[IMP] mail, *: define template in models
*: snailmail, website_livechat This commit adds definition of component template in the models. This allows not defining JS of component for most view models. Task-3053061 closes odoo/odoo#104641 Related: odoo/enterprise#33491 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
-26
@@ -1,26 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useRefToModel } from '@mail/component_hooks/use_ref_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class ActivityButtonView extends Component {
|
||||
|
||||
setup() {
|
||||
super.setup();
|
||||
useRefToModel({ fieldName: 'buttonRef', refName: 'button' });
|
||||
}
|
||||
|
||||
get activityButtonView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(ActivityButtonView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.ActivityButtonView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(ActivityButtonView);
|
||||
@@ -1,20 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class ActivityListView extends Component {
|
||||
|
||||
get activityListView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(ActivityListView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.ActivityListView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(ActivityListView);
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class ActivityListViewItem extends Component {
|
||||
|
||||
get activityListViewItem() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(ActivityListViewItem, {
|
||||
props: { record: Object },
|
||||
template: 'mail.ActivityListViewItem',
|
||||
});
|
||||
|
||||
registerMessagingComponent(ActivityListViewItem);
|
||||
@@ -1,35 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useRefToModel } from '@mail/component_hooks/use_ref_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import Popover from "web.Popover";
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class ActivityView extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useRefToModel({ fieldName: 'markDoneButtonRef', refName: 'markDoneButton', });
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {ActivityView}
|
||||
*/
|
||||
get activityView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(ActivityView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.ActivityView',
|
||||
components: { Popover },
|
||||
});
|
||||
|
||||
registerMessagingComponent(ActivityView);
|
||||
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class ActivityBoxView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {ActivityBoxView}
|
||||
*/
|
||||
get activityBoxView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(ActivityBoxView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.ActivityBoxView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(ActivityBoxView);
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useRefToModel } from '@mail/component_hooks/use_ref_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component, onMounted } from '@odoo/owl';
|
||||
|
||||
export class ActivityMarkDonePopoverContentView extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useRefToModel({ fieldName: 'feedbackTextareaRef', refName: 'feedbackTextarea' });
|
||||
onMounted(this.activityMarkDonePopoverContentView.onMounted);
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {ActivityMarkDonePopoverContentView}
|
||||
*/
|
||||
get activityMarkDonePopoverContentView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(ActivityMarkDonePopoverContentView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.ActivityMarkDonePopoverContentView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(ActivityMarkDonePopoverContentView);
|
||||
@@ -1,36 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useComponentToModel } from '@mail/component_hooks/use_component_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class AttachmentBoxView extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useComponentToModel({ fieldName: 'component' });
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Public
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @returns {AttachmentBoxView|undefined}
|
||||
*/
|
||||
get attachmentBoxView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(AttachmentBoxView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.AttachmentBoxView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(AttachmentBoxView);
|
||||
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class AttachmentCard extends Component {
|
||||
|
||||
/**
|
||||
* @returns {AttachmentCard}
|
||||
*/
|
||||
get attachmentCard() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(AttachmentCard, {
|
||||
props: { record: Object },
|
||||
template: 'mail.AttachmentCard',
|
||||
});
|
||||
|
||||
registerMessagingComponent(AttachmentCard);
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useComponentToModel } from '@mail/component_hooks/use_component_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class AttachmentDeleteConfirmView extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
useComponentToModel({ fieldName: 'component' });
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {AttachmentDeleteConfirmView}
|
||||
*/
|
||||
get attachmentDeleteConfirmView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(AttachmentDeleteConfirmView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.AttachmentDeleteConfirmView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(AttachmentDeleteConfirmView);
|
||||
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class AttachmentImage extends Component {
|
||||
|
||||
/**
|
||||
* @returns {AttachmentImage}
|
||||
*/
|
||||
get attachmentImage() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(AttachmentImage, {
|
||||
props: { record: Object },
|
||||
template: 'mail.AttachmentImage',
|
||||
});
|
||||
|
||||
registerMessagingComponent(AttachmentImage);
|
||||
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class AttachmentList extends Component {
|
||||
|
||||
/**
|
||||
* @returns {AttachmentList}
|
||||
*/
|
||||
get attachmentList() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(AttachmentList, {
|
||||
props: { record: Object },
|
||||
template: 'mail.AttachmentList',
|
||||
});
|
||||
|
||||
registerMessagingComponent(AttachmentList);
|
||||
@@ -1,77 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useComponentToModel } from '@mail/component_hooks/use_component_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component, onMounted, onWillUnmount } from '@odoo/owl';
|
||||
|
||||
export class AutocompleteInputView extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useComponentToModel({ fieldName: 'component' });
|
||||
onMounted(() => this._mounted());
|
||||
onWillUnmount(() => this._willUnmount());
|
||||
}
|
||||
|
||||
_mounted() {
|
||||
if (!this.root.el) {
|
||||
return;
|
||||
}
|
||||
if (this.autocompleteInputView.isFocusOnMount) {
|
||||
this.root.el.focus();
|
||||
}
|
||||
|
||||
const args = {
|
||||
autoFocus: true,
|
||||
select: (ev, ui) => {
|
||||
if (this.autocompleteInputView) {
|
||||
this.autocompleteInputView.onSelect(ev, ui);
|
||||
}
|
||||
},
|
||||
source: (req, res) => {
|
||||
if (this.autocompleteInputView) {
|
||||
this.autocompleteInputView.onSource(req, res);
|
||||
}
|
||||
},
|
||||
html: this.autocompleteInputView.isHtml,
|
||||
};
|
||||
|
||||
if (this.autocompleteInputView.customClass) {
|
||||
args.classes = { 'ui-autocomplete': this.autocompleteInputView.customClass };
|
||||
}
|
||||
|
||||
const autoCompleteElem = $(this.root.el).autocomplete(args);
|
||||
// Resize the autocomplete dropdown options to handle the long strings
|
||||
// By setting the width of dropdown based on the width of the input element.
|
||||
autoCompleteElem.data('ui-autocomplete')._resizeMenu = function () {
|
||||
const ul = this.menu.element;
|
||||
ul.outerWidth(this.element.outerWidth());
|
||||
};
|
||||
}
|
||||
|
||||
_willUnmount() {
|
||||
if (!this.root.el) {
|
||||
return;
|
||||
}
|
||||
$(this.root.el).autocomplete('destroy');
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {AutocompleteInputView}
|
||||
*/
|
||||
get autocompleteInputView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(AutocompleteInputView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.AutocompleteInputView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(AutocompleteInputView);
|
||||
@@ -1,32 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useRefToModel } from '@mail/component_hooks/use_ref_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class CallActionListView extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useRefToModel({ fieldName: 'moreButtonRef', refName: 'moreButton' });
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {CallActionListView}
|
||||
*/
|
||||
get callActionListView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(CallActionListView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.CallActionListView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(CallActionListView);
|
||||
@@ -1,32 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useRefToModel } from '@mail/component_hooks/use_ref_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class CallDemoView extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useRefToModel({ fieldName: 'audioRef', refName: 'audio' });
|
||||
useRefToModel({ fieldName: 'videoRef', refName: 'video' });
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {CallDemoView}
|
||||
*/
|
||||
get callDemoView() {
|
||||
return this.props.record;
|
||||
}
|
||||
}
|
||||
|
||||
Object.assign(CallDemoView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.CallDemoView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(CallDemoView);
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class CallInviteRequestPopup extends Component {
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Getters / Setters
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @returns {CallInviteRequestPopup}
|
||||
*/
|
||||
get callInviteRequestPopup() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(CallInviteRequestPopup, {
|
||||
props: { record: Object },
|
||||
template: 'mail.CallInviteRequestPopup',
|
||||
});
|
||||
|
||||
registerMessagingComponent(CallInviteRequestPopup);
|
||||
@@ -1,44 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useComponentToModel } from '@mail/component_hooks/use_component_to_model';
|
||||
import { useUpdateToModel } from '@mail/component_hooks/use_update_to_model';
|
||||
import { useRefToModel } from '@mail/component_hooks/use_ref_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component, onMounted, onWillUnmount } from '@odoo/owl';
|
||||
|
||||
export class CallMainView extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useComponentToModel({ fieldName: 'component' });
|
||||
useRefToModel({ fieldName: 'tileContainerRef', refName: 'tileContainer', });
|
||||
useUpdateToModel({ methodName: 'onComponentUpdate' });
|
||||
onMounted(() => {
|
||||
this.resizeObserver = new ResizeObserver(() => this.callMainView.onResize());
|
||||
this.resizeObserver.observe(this.root.el);
|
||||
});
|
||||
onWillUnmount(() => this.resizeObserver.disconnect());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Getters / Setters
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @returns {CallMainView}
|
||||
*/
|
||||
get callMainView() {
|
||||
return this.props.record;
|
||||
}
|
||||
}
|
||||
|
||||
Object.assign(CallMainView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.CallMainView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(CallMainView);
|
||||
@@ -1,32 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useComponentToModel } from '@mail/component_hooks/use_component_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class CallOptionMenu extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useComponentToModel({ fieldName: 'component' });
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {CallOptionMenu}
|
||||
*/
|
||||
get callOptionMenu() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(CallOptionMenu, {
|
||||
props: { record: Object },
|
||||
template: 'mail.CallOptionMenu',
|
||||
});
|
||||
|
||||
registerMessagingComponent(CallOptionMenu);
|
||||
@@ -1,36 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useRefToModel } from '@mail/component_hooks/use_ref_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class CallParticipantCard extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useRefToModel({ fieldName: 'volumeMenuAnchorRef', refName: 'volumeMenuAnchor' });
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Getters / Setters
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @returns {Thread|undefined}
|
||||
*/
|
||||
get callParticipantCard() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(CallParticipantCard, {
|
||||
props: { record: Object },
|
||||
template: 'mail.CallParticipantCard',
|
||||
});
|
||||
|
||||
registerMessagingComponent(CallParticipantCard);
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class CallParticipantCardPopoverContentView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {CallParticipantCardPopoverContentView}
|
||||
*/
|
||||
get callParticipantCardPopoverContentView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(CallParticipantCardPopoverContentView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.CallParticipantCardPopoverContentView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(CallParticipantCardPopoverContentView);
|
||||
@@ -1,38 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useComponentToModel } from '@mail/component_hooks/use_component_to_model';
|
||||
import { useUpdateToModel } from '@mail/component_hooks/use_update_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class CallParticipantVideoView extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useComponentToModel({ fieldName: 'component' });
|
||||
useUpdateToModel({ methodName: 'onComponentUpdate' });
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Getters / Setters
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @returns {CallParticipantVideoView}
|
||||
*/
|
||||
get callParticipantVideoView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(CallParticipantVideoView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.CallParticipantVideoView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(CallParticipantVideoView);
|
||||
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class CallSettingsMenu extends Component {
|
||||
|
||||
/**
|
||||
* @returns {CallSettingsMenu}
|
||||
*/
|
||||
get callSettingsMenu() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(CallSettingsMenu, {
|
||||
props: { record: Object },
|
||||
template: 'mail.CallSettingsMenu',
|
||||
});
|
||||
|
||||
registerMessagingComponent(CallSettingsMenu);
|
||||
@@ -1,26 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class CallSidebarView extends Component {
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Getters / Setters
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @returns {CallSidebarView}
|
||||
*/
|
||||
get callSidebarView() {
|
||||
return this.props.record;
|
||||
}
|
||||
}
|
||||
|
||||
Object.assign(CallSidebarView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.CallSidebarView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(CallSidebarView);
|
||||
@@ -1,29 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
// TODO a nice-to-have would be a resize handle under the videos.
|
||||
|
||||
export class CallView extends Component {
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Getters / Setters
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @returns {CallView}
|
||||
*/
|
||||
get callView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(CallView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.CallView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(CallView);
|
||||
@@ -1,33 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useComponentToModel } from '@mail/component_hooks/use_component_to_model';
|
||||
import { useRefToModel } from '@mail/component_hooks/use_ref_to_model';
|
||||
import { useUpdateToModel } from '@mail/component_hooks/use_update_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class ChannelInvitationForm extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useComponentToModel({ fieldName: 'component' });
|
||||
useRefToModel({ fieldName: 'searchInputRef', refName: 'searchInput' });
|
||||
useUpdateToModel({ methodName: 'onComponentUpdate' });
|
||||
}
|
||||
|
||||
get channelInvitationForm() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(ChannelInvitationForm, {
|
||||
props: { record: Object },
|
||||
template: 'mail.ChannelInvitationForm',
|
||||
});
|
||||
|
||||
registerMessagingComponent(ChannelInvitationForm);
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class ChannelInvitationFormSelectablePartnerView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {ChannelInvitationFormSelectablePartnerView}
|
||||
*/
|
||||
get channelInvitationFormSelectablePartnerView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(ChannelInvitationFormSelectablePartnerView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.ChannelInvitationFormSelectablePartnerView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(ChannelInvitationFormSelectablePartnerView);
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class ChannelInvitationFormSelectedPartnerView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {ChannelInvitationFormSelectedPartnerView}
|
||||
*/
|
||||
get channelInvitationFormSelectedPartnerView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(ChannelInvitationFormSelectedPartnerView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.ChannelInvitationFormSelectedPartnerView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(ChannelInvitationFormSelectedPartnerView);
|
||||
@@ -1,25 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class ChannelMemberView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {ChannelMemberView}
|
||||
*/
|
||||
get channelMemberView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(ChannelMemberView, {
|
||||
props: {
|
||||
record: Object,
|
||||
},
|
||||
template: 'mail.ChannelMemberView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(ChannelMemberView);
|
||||
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class ChannelMemberListView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {ChannelMemberListView}
|
||||
*/
|
||||
get channelMemberListView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(ChannelMemberListView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.ChannelMemberListView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(ChannelMemberListView);
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class ChannelMemberListCategoryView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {ChannelMemberListCategoryView}
|
||||
*/
|
||||
get record() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(ChannelMemberListCategoryView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.ChannelMemberListCategoryView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(ChannelMemberListCategoryView);
|
||||
@@ -1,32 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useRefToModel } from '@mail/component_hooks/use_ref_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class ChannelPreviewView extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useRefToModel({ fieldName: 'markAsReadRef', refName: 'markAsRead' });
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {ChannelPreviewView}
|
||||
*/
|
||||
get channelPreviewView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(ChannelPreviewView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.ChannelPreviewView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(ChannelPreviewView);
|
||||
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class ChatWindowHeaderView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {ChatWindowHeaderView}
|
||||
*/
|
||||
get chatWindowHeaderView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(ChatWindowHeaderView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.ChatWindowHeaderView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(ChatWindowHeaderView);
|
||||
@@ -1,36 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useComponentToModel } from '@mail/component_hooks/use_component_to_model';
|
||||
import { useRefToModel } from '@mail/component_hooks/use_ref_to_model';
|
||||
import { useUpdateToModel } from '@mail/component_hooks/use_update_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class ChatWindowHiddenMenuView extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useComponentToModel({ fieldName: 'component' });
|
||||
useRefToModel({ fieldName: 'listRef', refName: 'list' });
|
||||
useUpdateToModel({ methodName: 'onComponentUpdate' });
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {ChatWindowHiddenMenuView}
|
||||
*/
|
||||
get chatWindowHiddenMenuView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(ChatWindowHiddenMenuView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.ChatWindowHiddenMenuView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(ChatWindowHiddenMenuView);
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class ChatWindowHiddenMenuItemView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {ChatWindowHiddenMenuItemView}
|
||||
*/
|
||||
get chatWindowHiddenMenuItemView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(ChatWindowHiddenMenuItemView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.ChatWindowHiddenMenuItemView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(ChatWindowHiddenMenuItemView);
|
||||
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class ChatterTopbar extends Component {
|
||||
|
||||
/**
|
||||
* @returns {ChatterTopbar}
|
||||
*/
|
||||
get chatterTopbar() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(ChatterTopbar, {
|
||||
props: { record: Object },
|
||||
template: 'mail.ChatterTopbar',
|
||||
});
|
||||
|
||||
registerMessagingComponent(ChatterTopbar);
|
||||
@@ -1,38 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useComponentToModel } from '@mail/component_hooks/use_component_to_model';
|
||||
import { useRefToModel } from '@mail/component_hooks/use_ref_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class ComposerView extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useComponentToModel({ fieldName: 'component' });
|
||||
useRefToModel({ fieldName: 'buttonEmojisRef', refName: 'buttonEmojis' });
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Public
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @returns {ComposerView}
|
||||
*/
|
||||
get composerView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(ComposerView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.ComposerView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(ComposerView);
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class ComposerSuggestedRecipientListView extends Component {
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Public
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @returns {ComposerSuggestedRecipientListView}
|
||||
*/
|
||||
get composerSuggestedRecipientListView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(ComposerSuggestedRecipientListView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.ComposerSuggestedRecipientListView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(ComposerSuggestedRecipientListView);
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class ComposerSuggestionListView extends Component {
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Public
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @returns {ComposerSuggestionListView}
|
||||
*/
|
||||
get composerSuggestionListView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(ComposerSuggestionListView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.ComposerSuggestionListView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(ComposerSuggestionListView);
|
||||
-38
@@ -1,38 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useComponentToModel } from '@mail/component_hooks/use_component_to_model';
|
||||
import { useUpdateToModel } from '@mail/component_hooks/use_update_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class ComposerSuggestionView extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useComponentToModel({ fieldName: 'component' });
|
||||
useUpdateToModel({ methodName: 'onComponentUpdate' });
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Public
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @returns {ComposerSuggestionView}
|
||||
*/
|
||||
get composerSuggestionView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(ComposerSuggestionView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.ComposerSuggestionView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(ComposerSuggestionView);
|
||||
@@ -1,41 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useComponentToModel } from '@mail/component_hooks/use_component_to_model';
|
||||
import { useRefToModel } from '@mail/component_hooks/use_ref_to_model';
|
||||
import { useUpdateToModel } from '@mail/component_hooks/use_update_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class ComposerTextInputView extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useComponentToModel({ fieldName: 'component' });
|
||||
useRefToModel({ fieldName: 'mirroredTextareaRef', refName: 'mirroredTextarea' });
|
||||
useRefToModel({ fieldName: 'textareaRef', refName: 'textarea' });
|
||||
/**
|
||||
* Updates the composer text input content when composer is mounted
|
||||
* as textarea content can't be changed from the DOM.
|
||||
*/
|
||||
useUpdateToModel({ methodName: 'onComponentUpdate' });
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {ComposerTextInputView}
|
||||
*/
|
||||
get composerTextInputView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(ComposerTextInputView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.ComposerTextInputView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(ComposerTextInputView);
|
||||
@@ -1,32 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useComponentToModel } from '@mail/component_hooks/use_component_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class DeleteMessageConfirmView extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useComponentToModel({ fieldName: 'component' });
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {DeleteMessageConfirmView}
|
||||
*/
|
||||
get deleteMessageConfirmView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(DeleteMessageConfirmView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.DeleteMessageConfirmView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(DeleteMessageConfirmView);
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class DiscussMobileMailboxSelectionView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {DiscussMobileMailboxSelectionView}
|
||||
*/
|
||||
get discussMobileMailboxSelectionView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(DiscussMobileMailboxSelectionView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.DiscussMobileMailboxSelectionView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(DiscussMobileMailboxSelectionView);
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class DiscussMobileMailboxSelectionItemView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {DiscussMobileMailboxSelectionItemView}
|
||||
*/
|
||||
get discussMobileMailboxSelectionItemView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(DiscussMobileMailboxSelectionItemView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.DiscussMobileMailboxSelectionItemView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(DiscussMobileMailboxSelectionItemView);
|
||||
@@ -1,34 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useRefToModel } from '@mail/component_hooks/use_ref_to_model';
|
||||
import { useUpdateToModel } from '@mail/component_hooks/use_update_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class DiscussSidebarView extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useRefToModel({ fieldName: 'quickSearchInputRef', refName: 'quickSearchInput' });
|
||||
useUpdateToModel({ methodName: 'onComponentUpdate' });
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {DiscussSidebarView}
|
||||
*/
|
||||
get discussSidebarView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(DiscussSidebarView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.DiscussSidebarView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(DiscussSidebarView);
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class DiscussSidebarCategory extends Component {
|
||||
|
||||
/**
|
||||
* @returns {DiscussSidebarCategory}
|
||||
*/
|
||||
get category() {
|
||||
return this.props.record;
|
||||
}
|
||||
}
|
||||
|
||||
Object.assign(DiscussSidebarCategory, {
|
||||
props: { record: Object },
|
||||
template: 'mail.DiscussSidebarCategory',
|
||||
});
|
||||
|
||||
registerMessagingComponent(DiscussSidebarCategory);
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class DiscussSidebarCategoryItem extends Component {
|
||||
|
||||
/**
|
||||
* @returns {DiscussSidebarCategoryItem}
|
||||
*/
|
||||
get categoryItem() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(DiscussSidebarCategoryItem, {
|
||||
props: { record: Object },
|
||||
template: 'mail.DiscussSidebarCategoryItem',
|
||||
});
|
||||
|
||||
registerMessagingComponent(DiscussSidebarCategoryItem);
|
||||
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class DiscussSidebarMailboxView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {DiscussSidebarMailboxView}
|
||||
*/
|
||||
get discussSidebarMailboxView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(DiscussSidebarMailboxView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.DiscussSidebarMailboxView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(DiscussSidebarMailboxView);
|
||||
@@ -1,27 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class DropZoneView extends Component {
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Public
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @returns {DropZoneView}
|
||||
*/
|
||||
get dropZoneView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(DropZoneView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.DropZoneView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(DropZoneView);
|
||||
@@ -1,21 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class EmojiCategoryBarView extends Component {
|
||||
/**
|
||||
* @returns {EmojiCategoryBarView}
|
||||
*/
|
||||
get emojiCategoryBarView() {
|
||||
return this.props.record;
|
||||
}
|
||||
}
|
||||
|
||||
Object.assign(EmojiCategoryBarView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.EmojiCategoryBarView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(EmojiCategoryBarView);
|
||||
@@ -1,21 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class EmojiCategoryView extends Component {
|
||||
/**
|
||||
* @returns {EmojiCategoryView}
|
||||
*/
|
||||
get emojiCategoryView() {
|
||||
return this.props.record;
|
||||
}
|
||||
}
|
||||
|
||||
Object.assign(EmojiCategoryView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.EmojiCategoryView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(EmojiCategoryView);
|
||||
@@ -1,21 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class EmojiGridItemView extends Component {
|
||||
/**
|
||||
* @returns {EmojiGridItemView}
|
||||
*/
|
||||
get emojiGridItemView() {
|
||||
return this.props.record;
|
||||
}
|
||||
}
|
||||
|
||||
Object.assign(EmojiGridItemView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.EmojiGridItemView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(EmojiGridItemView);
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class EmojiGridLoadingScreen extends Component {
|
||||
/**
|
||||
* @returns {EmojiGridLoadingScreen}
|
||||
*/
|
||||
get EmojiGridLoadingScreen() {
|
||||
return this.props.record;
|
||||
}
|
||||
}
|
||||
|
||||
Object.assign(EmojiGridLoadingScreen, {
|
||||
props: { record: Object },
|
||||
template: 'mail.EmojiGridLoadingScreen',
|
||||
});
|
||||
|
||||
registerMessagingComponent(EmojiGridLoadingScreen);
|
||||
@@ -1,21 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class EmojiGridRowView extends Component {
|
||||
/**
|
||||
* @returns {EmojiGridRowView}
|
||||
*/
|
||||
get emojiGridRowView() {
|
||||
return this.props.record;
|
||||
}
|
||||
}
|
||||
|
||||
Object.assign(EmojiGridRowView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.EmojiGridRowView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(EmojiGridRowView);
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class EmojiGridSearchNoContentView extends Component {
|
||||
/**
|
||||
* @returns {EmojiGridSearchNoContentView}
|
||||
*/
|
||||
get emojiGridSearchNoContentView() {
|
||||
return this.props.record;
|
||||
}
|
||||
}
|
||||
|
||||
Object.assign(EmojiGridSearchNoContentView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.EmojiGridSearchNoContentView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(EmojiGridSearchNoContentView);
|
||||
@@ -1,21 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class EmojiGridSectionView extends Component {
|
||||
/**
|
||||
* @returns {EmojiGridSectionView}
|
||||
*/
|
||||
get emojiGridSectionView() {
|
||||
return this.props.record;
|
||||
}
|
||||
}
|
||||
|
||||
Object.assign(EmojiGridSectionView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.EmojiGridSectionView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(EmojiGridSectionView);
|
||||
@@ -1,30 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
import { useRefToModel } from '@mail/component_hooks/use_ref_to_model';
|
||||
import { useUpdateToModel } from '@mail/component_hooks/use_update_to_model';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class EmojiGridView extends Component {
|
||||
setup() {
|
||||
useRefToModel({ fieldName: 'containerRef', refName: 'containerRef'});
|
||||
useRefToModel({ fieldName: 'listRef', refName: 'listRef'});
|
||||
useRefToModel({ fieldName: 'viewBlockRef', refName: 'viewBlockRef'});
|
||||
useUpdateToModel({ methodName: 'onComponentUpdate' });
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {EmojiGridView}
|
||||
*/
|
||||
get emojiGridView() {
|
||||
return this.props.record;
|
||||
}
|
||||
}
|
||||
|
||||
Object.assign(EmojiGridView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.EmojiGridView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(EmojiGridView);
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class EmojiPickerHeaderActionListView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {EmojiPickerHeaderActionListView}
|
||||
*/
|
||||
get emojiPickerHeaderActionListView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(EmojiPickerHeaderActionListView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.EmojiPickerHeaderActionListView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(EmojiPickerHeaderActionListView);
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class EmojiPickerHeaderActionView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {EmojiPickerHeaderActionView}
|
||||
*/
|
||||
get emojiPickerHeaderActionView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(EmojiPickerHeaderActionView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.EmojiPickerHeaderActionView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(EmojiPickerHeaderActionView);
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class EmojiPickerHeaderView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {EmojiPickerHeaderView}
|
||||
*/
|
||||
get emojiPickerHeaderView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(EmojiPickerHeaderView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.EmojiPickerHeaderView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(EmojiPickerHeaderView);
|
||||
@@ -1,25 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
import { useComponentToModel } from '@mail/component_hooks/use_component_to_model';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class EmojiPickerView extends Component {
|
||||
setup() {
|
||||
useComponentToModel({ fieldName: 'component' });
|
||||
}
|
||||
/**
|
||||
* @returns {EmojiPickerView}
|
||||
*/
|
||||
get emojiPickerView() {
|
||||
return this.props.record;
|
||||
}
|
||||
}
|
||||
|
||||
Object.assign(EmojiPickerView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.EmojiPickerView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(EmojiPickerView);
|
||||
@@ -1,33 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
import { useRefToModel } from '@mail/component_hooks/use_ref_to_model';
|
||||
import { useUpdateToModel } from '@mail/component_hooks/use_update_to_model';
|
||||
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class EmojiSearchBarView extends Component {
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useRefToModel({ fieldName: 'inputRef', refName: 'input' });
|
||||
useUpdateToModel({ methodName: 'onComponentUpdate', modelName: 'EmojiSearchBarView' });
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {EmojiSearchBarView}
|
||||
*/
|
||||
get emojiSearchBarView() {
|
||||
return this.props.record;
|
||||
}
|
||||
}
|
||||
|
||||
Object.assign(EmojiSearchBarView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.EmojiSearchBarView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(EmojiSearchBarView);
|
||||
@@ -1,21 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class EmojiView extends Component {
|
||||
/**
|
||||
* @returns {EmojiView}
|
||||
*/
|
||||
get emojiView() {
|
||||
return this.props.record;
|
||||
}
|
||||
}
|
||||
|
||||
Object.assign(EmojiView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.EmojiView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(EmojiView);
|
||||
@@ -1,27 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class FollowButtonView extends Component {
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Public
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @return {FollowButtonView}
|
||||
*/
|
||||
get followButtonView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(FollowButtonView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.FollowButtonView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(FollowButtonView);
|
||||
@@ -1,21 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class FollowerView extends Component {
|
||||
/**
|
||||
* @returns {FollowerView}
|
||||
*/
|
||||
get followerView() {
|
||||
return this.props.record;
|
||||
}
|
||||
}
|
||||
|
||||
Object.assign(FollowerView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.FollowerView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(FollowerView);
|
||||
@@ -1,36 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useRefToModel } from '@mail/component_hooks/use_ref_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class FollowerListMenuView extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useRefToModel({ fieldName: 'dropdownRef', refName: 'dropdown' });
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Public
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @return {FollowerListMenuView}
|
||||
*/
|
||||
get followerListMenuView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(FollowerListMenuView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.FollowerListMenuView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(FollowerListMenuView);
|
||||
@@ -1,27 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class FollowerSubtypeView extends Component {
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Public
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @returns {FollowerSubtypeView}
|
||||
*/
|
||||
get followerSubtypeView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(FollowerSubtypeView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.FollowerSubtypeView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(FollowerSubtypeView);
|
||||
@@ -1,36 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useComponentToModel } from '@mail/component_hooks/use_component_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class FollowerSubtypeList extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useComponentToModel({ fieldName: 'component' });
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Public
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @returns {FollowerSubtypeList}
|
||||
*/
|
||||
get followerSubtypeList() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(FollowerSubtypeList, {
|
||||
props: { record: Object },
|
||||
template: 'mail.FollowerSubtypeList',
|
||||
});
|
||||
|
||||
registerMessagingComponent(FollowerSubtypeList);
|
||||
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
class LinkPreviewAsideView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {LinkPreviewAsideView}
|
||||
*/
|
||||
get linkPreviewAsideView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(LinkPreviewAsideView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.LinkPreviewAsideView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(LinkPreviewAsideView);
|
||||
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
class LinkPreviewCardView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {LinkPreviewCardView}
|
||||
*/
|
||||
get linkPreviewCardView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(LinkPreviewCardView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.LinkPreviewCardView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(LinkPreviewCardView);
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useComponentToModel } from '@mail/component_hooks/use_component_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class LinkPreviewDeleteConfirmView extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useComponentToModel({ fieldName: 'component' });
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {DeleteMessageConfirmView}
|
||||
*/
|
||||
get linkPreviewDeleteConfirmView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(LinkPreviewDeleteConfirmView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.LinkPreviewDeleteConfirmView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(LinkPreviewDeleteConfirmView);
|
||||
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
class LinkPreviewImageView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {LinkPreviewImageView}
|
||||
*/
|
||||
get linkPreviewImageView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(LinkPreviewImageView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.LinkPreviewImageView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(LinkPreviewImageView);
|
||||
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
class LinkPreviewListView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {LinkPreviewListView}
|
||||
*/
|
||||
get linkPreviewListView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(LinkPreviewListView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.LinkPreviewListView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(LinkPreviewListView);
|
||||
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
class LinkPreviewVideoView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {LinkPreviewVideoView}
|
||||
*/
|
||||
get linkPreviewVideoView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(LinkPreviewVideoView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.LinkPreviewVideoView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(LinkPreviewVideoView);
|
||||
@@ -1,27 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class MailTemplateView extends Component {
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Public
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @returns {MailTemplateView}
|
||||
*/
|
||||
get mailTemplateView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(MailTemplateView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.MailTemplateView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(MailTemplateView);
|
||||
@@ -1,38 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useComponentToModel } from '@mail/component_hooks/use_component_to_model';
|
||||
import { useRefToModel } from '@mail/component_hooks/use_ref_to_model';
|
||||
import { useUpdateToModel } from '@mail/component_hooks/use_update_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class MessageView extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useComponentToModel({ fieldName: 'component' });
|
||||
useRefToModel({ fieldName: 'contentRef', refName: 'content' });
|
||||
useRefToModel({ fieldName: 'notificationIconRef', refName: 'notificationIcon' });
|
||||
useRefToModel({ fieldName: 'prettyBodyRef', refName: 'prettyBody' });
|
||||
useUpdateToModel({ methodName: 'onComponentUpdate' });
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {MessageView}
|
||||
*/
|
||||
get messageView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(MessageView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.MessageView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(MessageView);
|
||||
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class MessageActionList extends Component {
|
||||
|
||||
/**
|
||||
* @returns {MessageActionList}
|
||||
*/
|
||||
get messageActionList() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(MessageActionList, {
|
||||
props: { record: Object },
|
||||
template: "mail.MessageActionList",
|
||||
});
|
||||
|
||||
registerMessagingComponent(MessageActionList);
|
||||
@@ -1,32 +0,0 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { useRefToModel } from '@mail/component_hooks/use_ref_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class MessageActionView extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useRefToModel({ fieldName: 'actionRef', refName: 'action' });
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {MessageActionView}
|
||||
*/
|
||||
get messageActionView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(MessageActionView, {
|
||||
props: { record: Object },
|
||||
template: "mail.MessageActionView",
|
||||
});
|
||||
|
||||
registerMessagingComponent(MessageActionView);
|
||||
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class MessageAuthorPrefixView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {MessageAuthorPrefixView}
|
||||
*/
|
||||
get messageAuthorPrefixView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(MessageAuthorPrefixView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.MessageAuthorPrefixView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(MessageAuthorPrefixView);
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class MessageInReplyToView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {MessageInReplyToView}
|
||||
*/
|
||||
get messageInReplyToView() {
|
||||
return this.props.record;
|
||||
}
|
||||
}
|
||||
|
||||
Object.assign(MessageInReplyToView, {
|
||||
props: { record: Object },
|
||||
template: "mail.MessageInReplyToView",
|
||||
});
|
||||
|
||||
registerMessagingComponent(MessageInReplyToView);
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class MessageNotificationPopoverContentView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {MessageNotificationPopoverContentView}
|
||||
*/
|
||||
get messageNotificationPopoverContentView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(MessageNotificationPopoverContentView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.MessageNotificationPopoverContentView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(MessageNotificationPopoverContentView);
|
||||
@@ -1,20 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class MessageReactionGroup extends Component {
|
||||
|
||||
get messageReactionGroup() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(MessageReactionGroup, {
|
||||
props: { record: Object },
|
||||
template: 'mail.MessageReactionGroup',
|
||||
});
|
||||
|
||||
registerMessagingComponent(MessageReactionGroup);
|
||||
@@ -1,26 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class MessageSeenIndicatorView extends Component {
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Public
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @returns {MessageSeenIndicatorView}
|
||||
*/
|
||||
get messageSeenIndicatorView() {
|
||||
return this.props.record;
|
||||
}
|
||||
}
|
||||
|
||||
Object.assign(MessageSeenIndicatorView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.MessageSeenIndicatorView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(MessageSeenIndicatorView);
|
||||
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class MessagingMenuTabView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {MessagingMenuTabView}
|
||||
*/
|
||||
get messagingMenuTabView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(MessagingMenuTabView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.MessagingMenuTabView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(MessagingMenuTabView);
|
||||
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class MobileMessagingNavbarView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {MobileMessagingNavbarView}
|
||||
*/
|
||||
get mobileMessagingNavbarView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(MobileMessagingNavbarView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.MobileMessagingNavbarView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(MobileMessagingNavbarView);
|
||||
@@ -1,36 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useRefToModel } from '@mail/component_hooks/use_ref_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class NotificationGroupView extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useRefToModel({ fieldName: 'markAsReadRef', refName: 'markAsRead' });
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Public
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @returns {NotificationGroupView}
|
||||
*/
|
||||
get notificationGroupView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(NotificationGroupView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.NotificationGroupView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(NotificationGroupView);
|
||||
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class NotificationListView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {NotificationListView}
|
||||
*/
|
||||
get notificationListView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(NotificationListView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.NotificationListView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(NotificationListView);
|
||||
-34
@@ -1,34 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useComponentToModel } from '@mail/component_hooks/use_component_to_model';
|
||||
import { useUpdateToModel } from '@mail/component_hooks/use_update_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
class NotificationMessageView extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useComponentToModel({ fieldName: 'component' });
|
||||
useUpdateToModel({ methodName: 'onComponentUpdate' });
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {NotificationMessageView}
|
||||
*/
|
||||
get notificationMessageView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(NotificationMessageView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.NotificationMessageView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(NotificationMessageView);
|
||||
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class NotificationRequestView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {NotificationRequestView}
|
||||
*/
|
||||
get notificationRequestView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(NotificationRequestView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.NotificationRequestView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(NotificationRequestView);
|
||||
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class PersonaImStatusIconView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {PersonaImStatusIconView}
|
||||
*/
|
||||
get personaImStatusIconView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(PersonaImStatusIconView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.PersonaImStatusIconView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(PersonaImStatusIconView);
|
||||
@@ -1,42 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useComponentToModel } from '@mail/component_hooks/use_component_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { usePosition } from '@web/core/position_hook';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class PopoverView extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useComponentToModel({ fieldName: 'component' });
|
||||
usePosition(
|
||||
() => this.popoverView.anchorRef && this.popoverView.anchorRef.el,
|
||||
{
|
||||
popper: "root",
|
||||
margin: 16,
|
||||
position: this.popoverView.position,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {PopoverView|undefined}
|
||||
*/
|
||||
get popoverView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(PopoverView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.PopoverView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(PopoverView);
|
||||
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class ThreadIconView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {ThreadIconView}
|
||||
*/
|
||||
get threadIconView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(ThreadIconView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.ThreadIconView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(ThreadIconView);
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class ThreadTextualTypingStatusView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {ThreadTextualTypingStatusView}
|
||||
*/
|
||||
get threadTextualTypingStatusView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(ThreadTextualTypingStatusView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.ThreadTextualTypingStatusView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(ThreadTextualTypingStatusView);
|
||||
@@ -1,23 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class ThreadTypingIconView extends Component {
|
||||
|
||||
/**
|
||||
* @returns {ThreadTypingIconView}
|
||||
*/
|
||||
get threadTypingIconView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(ThreadTypingIconView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.ThreadTypingIconView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(ThreadTypingIconView);
|
||||
@@ -1,27 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class ThreadView extends Component {
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Public
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @returns {ThreadView}
|
||||
*/
|
||||
get threadView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(ThreadView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.ThreadView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(ThreadView);
|
||||
@@ -1,41 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useRefToModel } from '@mail/component_hooks/use_ref_to_model';
|
||||
import { useUpdateToModel } from '@mail/component_hooks/use_update_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class ThreadViewTopbar extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useRefToModel({ fieldName: 'guestNameInputRef', refName: 'guestNameInput' });
|
||||
useRefToModel({ fieldName: 'inviteButtonRef', refName: 'inviteButton' });
|
||||
useRefToModel({ fieldName: 'threadNameInputRef', refName: 'threadNameInput' });
|
||||
useRefToModel({ fieldName: 'threadDescriptionInputRef', refName: 'threadDescriptionInput' });
|
||||
useUpdateToModel({ methodName: 'onComponentUpdate' });
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Public
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @returns {ThreadViewTopbar}
|
||||
*/
|
||||
get threadViewTopbar() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(ThreadViewTopbar, {
|
||||
props: { record: Object },
|
||||
template: 'mail.ThreadViewTopbar',
|
||||
});
|
||||
|
||||
registerMessagingComponent(ThreadViewTopbar);
|
||||
@@ -1,34 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useRefToModel } from '@mail/component_hooks/use_ref_to_model';
|
||||
import { useUpdateToModel } from '@mail/component_hooks/use_update_to_model';
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
export class WelcomeView extends Component {
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
setup() {
|
||||
super.setup();
|
||||
useRefToModel({ fieldName: 'guestNameInputRef', modelName: 'WelcomeView', refName: 'guestNameInput' });
|
||||
useUpdateToModel({ methodName: 'onComponentUpdate', modelName: 'WelcomeView' });
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {WelcomeView}
|
||||
*/
|
||||
get welcomeView() {
|
||||
return this.props.record;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Object.assign(WelcomeView, {
|
||||
props: { record: Object },
|
||||
template: 'mail.WelcomeView',
|
||||
});
|
||||
|
||||
registerMessagingComponent(WelcomeView);
|
||||
@@ -379,6 +379,7 @@ function patchRecordMethods(patch) {
|
||||
|
||||
/**
|
||||
* @param {Object} definition The JSON definition of the model to register.
|
||||
* @param {function} [definition.componentSetup]
|
||||
* @param {Object} [definition.fields]
|
||||
* @param {string} [definition.identifyingMode='and']
|
||||
* @param {Object} [definition.lifecycleHooks]
|
||||
@@ -388,15 +389,17 @@ function patchRecordMethods(patch) {
|
||||
* @param {Object[]} [definition.onChanges]
|
||||
* @param {Object} [definition.recordGetters] Deprecated; use fields instead.
|
||||
* @param {Object} [definition.recordMethods]
|
||||
* @param {string} [definition.template]
|
||||
* @param {string} [definition.templateGetter]
|
||||
*/
|
||||
export function registerModel({ fields, identifyingMode = 'and', lifecycleHooks, modelGetters, modelMethods, name, onChanges, recordGetters, recordMethods }) {
|
||||
export function registerModel({ componentSetup, fields, identifyingMode = 'and', lifecycleHooks, modelGetters, modelMethods, name, onChanges, recordGetters, recordMethods, template, templateGetter }) {
|
||||
if (!name) {
|
||||
throw new Error("Model is lacking a name.");
|
||||
}
|
||||
if (registry.has(name)) {
|
||||
throw new Error(`Cannot register model "${name}": model has already been registered.`);
|
||||
}
|
||||
const sectionNames = ['name', 'identifyingMode', 'lifecycleHooks', 'modelMethods', 'modelGetters', 'recordMethods', 'recordGetters', 'fields', 'onChanges'];
|
||||
const sectionNames = ['name', 'template', 'templateGetter', 'componentSetup', 'identifyingMode', 'lifecycleHooks', 'modelMethods', 'modelGetters', 'recordMethods', 'recordGetters', 'fields', 'onChanges'];
|
||||
const invalidSectionNames = Object.keys(arguments[0]).filter(x => !sectionNames.includes(x));
|
||||
if (invalidSectionNames.length > 0) {
|
||||
throw new Error(`Cannot register model "${name}": model definition contains unknown key(s): ${invalidSectionNames.join(", ")}`);
|
||||
@@ -412,6 +415,15 @@ export function registerModel({ fields, identifyingMode = 'and', lifecycleHooks,
|
||||
['fields', new Map()],
|
||||
['onChanges', []],
|
||||
]));
|
||||
if (template) {
|
||||
registry.get(name).set('template', template);
|
||||
if (templateGetter) {
|
||||
registry.get(name).set('templateGetter', templateGetter);
|
||||
}
|
||||
if (componentSetup) {
|
||||
registry.get(name).set('componentSetup', componentSetup);
|
||||
}
|
||||
}
|
||||
if (lifecycleHooks) {
|
||||
addLifecycleHooks(name, lifecycleHooks);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,10 @@ import { RelationSet } from '@mail/model/model_field_relation_set';
|
||||
import { Listener } from '@mail/model/model_listener';
|
||||
import { followRelations } from '@mail/model/model_utils';
|
||||
import { makeDeferred } from '@mail/utils/deferred';
|
||||
import { registerMessagingComponent, unregisterMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
import { Component } from '@odoo/owl';
|
||||
|
||||
/**
|
||||
* Object that manage models and records, notably their update cycle: whenever
|
||||
* some records are requested for update (either with model static method
|
||||
@@ -167,6 +171,10 @@ export class ModelManager {
|
||||
destroy() {
|
||||
this.messaging.delete();
|
||||
for (const model of Object.values(this.models)) {
|
||||
if (model.hasComponent) {
|
||||
unregisterMessagingComponent(model.name);
|
||||
model.hasComponent = false;
|
||||
}
|
||||
delete model.__fieldList;
|
||||
delete model.__fieldMap;
|
||||
delete model.__identifyingFieldNames;
|
||||
@@ -385,6 +393,27 @@ export class ModelManager {
|
||||
*/
|
||||
_applyModelDefinition(model) {
|
||||
const definition = registry.get(model.name);
|
||||
if (definition.get('template')) {
|
||||
const ModelComponent = { [model.name]: class extends Component {} }[model.name];
|
||||
if (definition.get('componentSetup')) {
|
||||
Object.assign(ModelComponent.prototype, { setup() {
|
||||
return definition.get('componentSetup').call(this);
|
||||
} });
|
||||
}
|
||||
Object.defineProperty(
|
||||
ModelComponent.prototype,
|
||||
definition.get('templateGetter') ? definition.get('templateGetter') : 'record',
|
||||
{ get() {
|
||||
return this.props.record;
|
||||
} },
|
||||
);
|
||||
Object.assign(ModelComponent, {
|
||||
props: { record: Object },
|
||||
template: definition.get('template'),
|
||||
});
|
||||
registerMessagingComponent(ModelComponent);
|
||||
model.hasComponent = true;
|
||||
}
|
||||
Object.assign(model, Object.fromEntries(definition.get('modelMethods')));
|
||||
Object.assign(model.prototype, Object.fromEntries(definition.get('recordMethods')));
|
||||
for (const [getterName, getter] of definition.get('modelGetters')) {
|
||||
|
||||
@@ -5,6 +5,8 @@ import { attr, many, one } from '@mail/model/model_field';
|
||||
|
||||
registerModel({
|
||||
name: 'ActivityBoxView',
|
||||
template: 'mail.ActivityBoxView',
|
||||
templateGetter: 'activityBoxView',
|
||||
recordMethods: {
|
||||
/**
|
||||
* Handles click on activity box title.
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { useRefToModel } from '@mail/component_hooks/use_ref_to_model';
|
||||
import { registerModel } from '@mail/model/model_core';
|
||||
import { attr, one } from '@mail/model/model_field';
|
||||
import { clear } from '@mail/model/model_field_command';
|
||||
|
||||
registerModel({
|
||||
name: 'ActivityButtonView',
|
||||
template: 'mail.ActivityButtonView',
|
||||
templateGetter: 'activityButtonView',
|
||||
componentSetup() {
|
||||
useRefToModel({ fieldName: 'buttonRef', refName: 'button' });
|
||||
},
|
||||
identifyingMode: 'xor',
|
||||
recordMethods: {
|
||||
onClick(ev) {
|
||||
|
||||
@@ -8,6 +8,8 @@ import session from 'web.session';
|
||||
|
||||
registerModel({
|
||||
name: 'ActivityListView',
|
||||
template: 'mail.ActivityListView',
|
||||
templateGetter: 'activityListView',
|
||||
lifecycleHooks: {
|
||||
async _created() {
|
||||
if (this.activities.length === 0) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user