Bug 1881745 - Convert all registered components from JSM to ESM. r=thunderbird-reviewers,ikey

Differential Revision: https://phabricator.services.mozilla.com/D202568

--HG--
rename : calendar/base/src/CalAlarm.jsm => calendar/base/src/CalAlarm.sys.mjs
rename : calendar/base/src/CalAlarmMonitor.jsm => calendar/base/src/CalAlarmMonitor.sys.mjs
rename : calendar/base/src/CalAlarmService.jsm => calendar/base/src/CalAlarmService.sys.mjs
rename : calendar/base/src/CalAttachment.jsm => calendar/base/src/CalAttachment.sys.mjs
rename : calendar/base/src/CalAttendee.jsm => calendar/base/src/CalAttendee.sys.mjs
rename : calendar/base/src/CalCalendarManager.jsm => calendar/base/src/CalCalendarManager.sys.mjs
rename : calendar/base/src/CalDateTime.jsm => calendar/base/src/CalDateTime.sys.mjs
rename : calendar/base/src/CalDefaultACLManager.jsm => calendar/base/src/CalDefaultACLManager.sys.mjs
rename : calendar/base/src/CalDeletedItems.jsm => calendar/base/src/CalDeletedItems.sys.mjs
rename : calendar/base/src/CalDuration.jsm => calendar/base/src/CalDuration.sys.mjs
rename : calendar/base/src/CalEvent.jsm => calendar/base/src/CalEvent.sys.mjs
rename : calendar/base/src/CalFreeBusyService.jsm => calendar/base/src/CalFreeBusyService.sys.mjs
rename : calendar/base/src/CalICSService.jsm => calendar/base/src/CalICSService.sys.mjs
rename : calendar/base/src/CalIcsParser.jsm => calendar/base/src/CalIcsParser.sys.mjs
rename : calendar/base/src/CalIcsSerializer.jsm => calendar/base/src/CalIcsSerializer.sys.mjs
rename : calendar/base/src/CalItipItem.jsm => calendar/base/src/CalItipItem.sys.mjs
rename : calendar/base/src/CalMimeConverter.jsm => calendar/base/src/CalMimeConverter.sys.mjs
rename : calendar/base/src/CalPeriod.jsm => calendar/base/src/CalPeriod.sys.mjs
rename : calendar/base/src/CalProtocolHandler.jsm => calendar/base/src/CalProtocolHandler.sys.mjs
rename : calendar/base/src/CalRecurrenceDate.jsm => calendar/base/src/CalRecurrenceDate.sys.mjs
rename : calendar/base/src/CalRecurrenceInfo.jsm => calendar/base/src/CalRecurrenceInfo.sys.mjs
rename : calendar/base/src/CalRecurrenceRule.jsm => calendar/base/src/CalRecurrenceRule.sys.mjs
rename : calendar/base/src/CalRelation.jsm => calendar/base/src/CalRelation.sys.mjs
rename : calendar/base/src/CalStartupService.jsm => calendar/base/src/CalStartupService.sys.mjs
rename : calendar/base/src/CalTimezoneService.jsm => calendar/base/src/CalTimezoneService.sys.mjs
rename : calendar/base/src/CalTodo.jsm => calendar/base/src/CalTodo.sys.mjs
rename : calendar/base/src/CalWeekInfoService.jsm => calendar/base/src/CalWeekInfoService.sys.mjs
rename : calendar/import-export/CalHtmlExport.jsm => calendar/import-export/CalHtmlExport.sys.mjs
rename : calendar/import-export/CalIcsImportExport.jsm => calendar/import-export/CalIcsImportExport.sys.mjs
rename : calendar/itip/CalItipEmailTransport.jsm => calendar/itip/CalItipEmailTransport.sys.mjs
rename : calendar/itip/CalItipProtocolHandler.jsm => calendar/itip/CalItipProtocolHandler.sys.mjs
rename : calendar/providers/caldav/CalDavCalendar.jsm => calendar/providers/caldav/CalDavCalendar.sys.mjs
rename : calendar/providers/composite/CalCompositeCalendar.jsm => calendar/providers/composite/CalCompositeCalendar.sys.mjs
rename : calendar/providers/memory/CalMemoryCalendar.jsm => calendar/providers/memory/CalMemoryCalendar.sys.mjs
rename : calendar/providers/storage/CalStorageCalendar.jsm => calendar/providers/storage/CalStorageCalendar.sys.mjs
rename : mail/components/AboutRedirector.jsm => mail/components/AboutRedirector.sys.mjs
rename : mail/components/MailGlue.jsm => mail/components/MailGlue.sys.mjs
rename : mail/components/StartupRecorder.jsm => mail/components/StartupRecorder.sys.mjs
rename : mail/components/activity/Activity.jsm => mail/components/activity/Activity.sys.mjs
rename : mail/components/activity/ActivityManager.jsm => mail/components/activity/ActivityManager.sys.mjs
rename : mail/components/activity/ActivityManagerUI.jsm => mail/components/activity/ActivityManagerUI.sys.mjs
rename : mail/components/devtools/devtools-loader.jsm => mail/components/devtools/devtools-loader.sys.mjs
rename : mail/components/migration/src/ThunderbirdProfileMigrator.jsm => mail/components/migration/src/ThunderbirdProfileMigrator.sys.mjs
rename : mail/components/prompts/PromptCollection.jsm => mail/components/prompts/PromptCollection.sys.mjs
rename : mail/extensions/am-e2e/AME2E.jsm => mail/extensions/am-e2e/AME2E.sys.mjs
rename : mailnews/addrbook/modules/AddrBookCard.jsm => mailnews/addrbook/modules/AddrBookCard.sys.mjs
rename : mailnews/addrbook/modules/AddrBookManager.jsm => mailnews/addrbook/modules/AddrBookManager.sys.mjs
rename : mailnews/addrbook/modules/CardDAVDirectory.jsm => mailnews/addrbook/modules/CardDAVDirectory.sys.mjs
rename : mailnews/addrbook/modules/LDAPConnection.jsm => mailnews/addrbook/modules/LDAPConnection.sys.mjs
rename : mailnews/addrbook/modules/LDAPDirectory.jsm => mailnews/addrbook/modules/LDAPDirectory.sys.mjs
rename : mailnews/addrbook/modules/LDAPDirectoryQuery.jsm => mailnews/addrbook/modules/LDAPDirectoryQuery.sys.mjs
rename : mailnews/addrbook/modules/LDAPOperation.jsm => mailnews/addrbook/modules/LDAPOperation.sys.mjs
rename : mailnews/addrbook/modules/LDAPProtocolHandler.jsm => mailnews/addrbook/modules/LDAPProtocolHandler.sys.mjs
rename : mailnews/addrbook/modules/LDAPReplicationService.jsm => mailnews/addrbook/modules/LDAPReplicationService.sys.mjs
rename : mailnews/addrbook/modules/LDAPService.jsm => mailnews/addrbook/modules/LDAPService.sys.mjs
rename : mailnews/addrbook/modules/LDAPSyncQuery.jsm => mailnews/addrbook/modules/LDAPSyncQuery.sys.mjs
rename : mailnews/addrbook/modules/LDAPURLParser.jsm => mailnews/addrbook/modules/LDAPURLParser.sys.mjs
rename : mailnews/addrbook/modules/SQLiteDirectory.jsm => mailnews/addrbook/modules/SQLiteDirectory.sys.mjs
rename : mailnews/addrbook/modules/VCardUtils.jsm => mailnews/addrbook/modules/VCardUtils.sys.mjs
rename : mailnews/addrbook/src/AbAutoCompleteMyDomain.jsm => mailnews/addrbook/src/AbAutoCompleteMyDomain.sys.mjs
rename : mailnews/addrbook/src/AbAutoCompleteSearch.jsm => mailnews/addrbook/src/AbAutoCompleteSearch.sys.mjs
rename : mailnews/addrbook/src/AbLDAPAttributeMap.jsm => mailnews/addrbook/src/AbLDAPAttributeMap.sys.mjs
rename : mailnews/addrbook/src/AbLDAPAutoCompleteSearch.jsm => mailnews/addrbook/src/AbLDAPAutoCompleteSearch.sys.mjs
rename : mailnews/base/src/FolderLookupService.jsm => mailnews/base/src/FolderLookupService.sys.mjs
rename : mailnews/base/src/MailNotificationManager.jsm => mailnews/base/src/MailNotificationManager.sys.mjs
rename : mailnews/base/src/MailNotificationService.jsm => mailnews/base/src/MailNotificationService.sys.mjs
rename : mailnews/base/src/MsgAsyncPrompter.jsm => mailnews/base/src/MsgAsyncPrompter.sys.mjs
rename : mailnews/base/src/OAuth2Module.jsm => mailnews/base/src/OAuth2Module.sys.mjs
rename : mailnews/compose/src/MailtoProtocolHandler.jsm => mailnews/compose/src/MailtoProtocolHandler.sys.mjs
rename : mailnews/compose/src/MessageSend.jsm => mailnews/compose/src/MessageSend.sys.mjs
rename : mailnews/compose/src/SMTPProtocolHandler.jsm => mailnews/compose/src/SMTPProtocolHandler.sys.mjs
rename : mailnews/compose/src/SmtpServer.jsm => mailnews/compose/src/SmtpServer.sys.mjs
rename : mailnews/compose/src/SmtpService.jsm => mailnews/compose/src/SmtpService.sys.mjs
rename : mailnews/db/gloda/components/GlodaAutoComplete.jsm => mailnews/db/gloda/components/GlodaAutoComplete.sys.mjs
rename : mailnews/db/gloda/components/MimeMessageEmitter.jsm => mailnews/db/gloda/components/MimeMessageEmitter.sys.mjs
rename : mailnews/extensions/mdn/MDNService.jsm => mailnews/extensions/mdn/MDNService.sys.mjs
rename : mailnews/extensions/newsblog/NewsBlog.jsm => mailnews/extensions/newsblog/NewsBlog.sys.mjs
rename : mailnews/extensions/offline-startup/OfflineStartup.jsm => mailnews/extensions/offline-startup/OfflineStartup.sys.mjs
rename : mailnews/imap/src/ImapModuleLoader.jsm => mailnews/imap/src/ImapModuleLoader.sys.mjs
rename : mailnews/import/src/SeamonkeyImport.jsm => mailnews/import/src/SeamonkeyImport.sys.mjs
rename : mailnews/import/src/ThunderbirdImport.jsm => mailnews/import/src/ThunderbirdImport.sys.mjs
rename : mailnews/jsaccount/test/unit/resources/TestJaMsgProtocolInfoComponent.jsm => mailnews/jsaccount/test/unit/resources/TestJaMsgProtocolInfoComponent.sys.mjs
rename : mailnews/local/src/Pop3IncomingServer.jsm => mailnews/local/src/Pop3IncomingServer.sys.mjs
rename : mailnews/local/src/Pop3ProtocolHandler.jsm => mailnews/local/src/Pop3ProtocolHandler.sys.mjs
rename : mailnews/local/src/Pop3ProtocolInfo.jsm => mailnews/local/src/Pop3ProtocolInfo.sys.mjs
rename : mailnews/local/src/Pop3Service.jsm => mailnews/local/src/Pop3Service.sys.mjs
rename : mailnews/mime/src/MimeJSComponents.jsm => mailnews/mime/src/MimeJSComponents.sys.mjs
rename : mailnews/news/src/NewsAutoCompleteSearch.jsm => mailnews/news/src/NewsAutoCompleteSearch.sys.mjs
rename : mailnews/news/src/NntpIncomingServer.jsm => mailnews/news/src/NntpIncomingServer.sys.mjs
rename : mailnews/news/src/NntpMessageService.jsm => mailnews/news/src/NntpMessageService.sys.mjs
rename : mailnews/news/src/NntpProtocolHandler.jsm => mailnews/news/src/NntpProtocolHandler.sys.mjs
rename : mailnews/news/src/NntpProtocolInfo.jsm => mailnews/news/src/NntpProtocolInfo.sys.mjs
rename : mailnews/news/src/NntpService.jsm => mailnews/news/src/NntpService.sys.mjs
rename : mailnews/search/src/MsgTraitService.jsm => mailnews/search/src/MsgTraitService.sys.mjs
extra : moz-landing-system : lando
This commit is contained in:
Martin Giger 2024-02-23 12:50:48 +00:00
Родитель 6f8216954b
Коммит ff911384e3
151 изменённых файлов: 458 добавлений и 671 удалений

Просмотреть файл

@ -2,11 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalAlarm"];
var { PluralForm } = ChromeUtils.importESModule("resource:///modules/PluralForm.sys.mjs");
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
var { XPCOMUtils } = ChromeUtils.importESModule("resource://gre/modules/XPCOMUtils.sys.mjs");
import { PluralForm } from "resource:///modules/PluralForm.sys.mjs";
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
const lazy = {};
@ -28,7 +26,7 @@ const ALARM_RELATED_END = Ci.calIAlarm.ALARM_RELATED_END;
* @implements {calIAlarm}
* @param {string} [icalString] - Optional iCal string for initializing existing alarms.
*/
function CalAlarm(icalString) {
export function CalAlarm(icalString) {
this.wrappedJSObject = this;
this.mProperties = new Map();
this.mPropertyParams = {};

Просмотреть файл

@ -2,9 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalAlarmMonitor"];
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
const lazy = {};
ChromeUtils.defineModuleGetter(lazy, "CalEvent", "resource:///modules/CalEvent.jsm");
@ -18,7 +16,7 @@ function peekAlarmWindow() {
* of the calendar-alarm-dialog. Both depend on their respective prefs to be
* set. This monitor is only used for DISPLAY type alarms.
*/
function CalAlarmMonitor() {
export function CalAlarmMonitor() {
this.wrappedJSObject = this;
this.mAlarms = [];
// A map from itemId to item.

Просмотреть файл

@ -2,10 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalAlarmService"];
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
var { XPCOMUtils } = ChromeUtils.importESModule("resource://gre/modules/XPCOMUtils.sys.mjs");
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
const lazy = {};
ChromeUtils.defineModuleGetter(lazy, "CalDateTime", "resource:///modules/CalDateTime.jsm");
@ -74,7 +72,7 @@ const IgnoredAlarmsStore = {
},
};
function CalAlarmService() {
export function CalAlarmService() {
this.wrappedJSObject = this;
this.mLoadedCalendars = {};

Просмотреть файл

@ -2,9 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalAttachment"];
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
/**
* Constructor for `calIAttachment` objects.
@ -13,7 +11,7 @@ var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.
* @implements {calIAttachment}
* @param {string} [icalString] - Optional iCal string for initializing existing attachments.
*/
function CalAttachment(icalString) {
export function CalAttachment(icalString) {
this.wrappedJSObject = this;
this.mProperties = new Map();
if (icalString) {

Просмотреть файл

@ -4,9 +4,7 @@
/* import-globals-from calItemBase.js */
var EXPORTED_SYMBOLS = ["CalAttendee"];
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
Services.scriptloader.loadSubScript("resource:///components/calItemBase.js");
@ -17,7 +15,7 @@ Services.scriptloader.loadSubScript("resource:///components/calItemBase.js");
* @implements {calIAttendee}
* @param {string} [icalString] - Optional iCal string for initializing existing attendees.
*/
function CalAttendee(icalString) {
export function CalAttendee(icalString) {
this.wrappedJSObject = this;
this.mProperties = new Map();
if (icalString) {

Просмотреть файл

@ -4,19 +4,18 @@
/* import-globals-from calCachedCalendar.js */
var EXPORTED_SYMBOLS = ["CalCalendarManager"];
import { AddonManager } from "resource://gre/modules/AddonManager.sys.mjs";
import { Preferences } from "resource://gre/modules/Preferences.sys.mjs";
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
const { AddonManager } = ChromeUtils.importESModule("resource://gre/modules/AddonManager.sys.mjs");
const { Preferences } = ChromeUtils.importESModule("resource://gre/modules/Preferences.sys.mjs");
const { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
const { calCachedCalendar } = ChromeUtils.import("resource:///components/calCachedCalendar.js");
const { setTimeout } = ChromeUtils.importESModule("resource://gre/modules/Timer.sys.mjs");
import { setTimeout } from "resource://gre/modules/Timer.sys.mjs";
var REGISTRY_BRANCH = "calendar.registry.";
var MAX_INT = Math.pow(2, 31) - 1;
var MIN_INT = -MAX_INT;
function CalCalendarManager() {
export function CalCalendarManager() {
this.wrappedJSObject = this;
this.mObservers = new cal.data.ListenerSet(Ci.calICalendarManagerObserver);
this.mCalendarObservers = new cal.data.ListenerSet(Ci.calIObserver);

Просмотреть файл

@ -2,8 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalDateTime"];
const { ICAL, unwrap, unwrapSetter } = ChromeUtils.import("resource:///modules/calendar/Ical.jsm");
const lazy = {};
@ -12,7 +10,7 @@ ChromeUtils.defineModuleGetter(lazy, "CalTimezone", "resource:///modules/CalTime
var UNIX_TIME_TO_PRTIME = 1000000;
function CalDateTime(innerObject) {
export function CalDateTime(innerObject) {
this.wrappedJSObject = this;
this.innerObject = innerObject || ICAL.Time.epochTime.clone();
}

Просмотреть файл

@ -2,11 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalDefaultACLManager"];
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
function CalDefaultACLManager() {
export function CalDefaultACLManager() {
this.mCalendarEntries = {};
}

Просмотреть файл

@ -2,9 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalDeletedItems"];
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
/**
* Handles remembering deleted items.
@ -13,7 +11,7 @@ var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.
* Note also that the code doesn't strictly check the calendar of the item,
* except when a calendar id is passed to getDeletedDate.
*/
function CalDeletedItems() {
export function CalDeletedItems() {
this.wrappedJSObject = this;
this.completedNotifier = {

Просмотреть файл

@ -2,11 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalDuration"];
const { ICAL, unwrap } = ChromeUtils.import("resource:///modules/calendar/Ical.jsm");
function CalDuration(innerObject) {
export function CalDuration(innerObject) {
this.innerObject = innerObject || new ICAL.Duration();
this.wrappedJSObject = this;
}

Просмотреть файл

@ -4,9 +4,7 @@
/* import-globals-from calItemBase.js */
var EXPORTED_SYMBOLS = ["CalEvent"];
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
Services.scriptloader.loadSubScript("resource:///components/calItemBase.js");
@ -17,7 +15,7 @@ Services.scriptloader.loadSubScript("resource:///components/calItemBase.js");
* @implements {calIEvent}
* @param {string} [icalString] - Optional iCal string for initializing existing events.
*/
function CalEvent(icalString) {
export function CalEvent(icalString) {
this.initItemBase();
this.eventPromotedProps = {
@ -30,6 +28,7 @@ function CalEvent(icalString) {
this.icalString = icalString;
}
}
var calEventClassID = Components.ID("{974339d5-ab86-4491-aaaf-2b2ca177c12b}");
var calEventInterfaces = [Ci.calIItemBase, Ci.calIEvent, Ci.calIInternalShallowCopy];
CalEvent.prototype = {

Просмотреть файл

@ -2,9 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalFreeBusyService"];
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
function CalFreeBusyListener(numOperations, finalListener) {
this.mFinalListener = finalListener;
@ -50,10 +48,11 @@ CalFreeBusyListener.prototype = {
},
};
function CalFreeBusyService() {
export function CalFreeBusyService() {
this.wrappedJSObject = this;
this.mProviders = new Set();
}
CalFreeBusyService.prototype = {
QueryInterface: ChromeUtils.generateQI(["calIFreeBusyProvider", "calIFreeBusyService"]),
classID: Components.ID("{29c56cd5-d36e-453a-acde-0083bd4fe6d3}"),

Просмотреть файл

@ -2,19 +2,19 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalIcalProperty", "CalICSService"];
const { ICAL, unwrapSetter, unwrapSingle, wrapGetter } = ChromeUtils.import(
"resource:///modules/calendar/Ical.jsm"
);
const { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
const lazy = {};
ChromeUtils.defineModuleGetter(lazy, "CalDateTime", "resource:///modules/CalDateTime.jsm");
ChromeUtils.defineModuleGetter(lazy, "CalDuration", "resource:///modules/CalDuration.jsm");
ChromeUtils.defineESModuleGetters(lazy, {
CalDateTime: "resource:///modules/CalDateTime.sys.mjs",
CalDuration: "resource:///modules/CalDuration.sys.mjs",
});
ChromeUtils.defineModuleGetter(lazy, "CalTimezone", "resource:///modules/CalTimezone.jsm");
function CalIcalProperty(innerObject) {
export function CalIcalProperty(innerObject) {
this.innerObject = innerObject || new ICAL.Property();
this.wrappedJSObject = this;
}
@ -564,7 +564,7 @@ calIcalComponent.prototype = {
},
};
function CalICSService() {
export function CalICSService() {
this.wrappedJSObject = this;
}

Просмотреть файл

@ -2,27 +2,29 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalIcsParser"];
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
var { NetUtil } = ChromeUtils.importESModule("resource://gre/modules/NetUtil.sys.mjs");
var { XPCOMUtils } = ChromeUtils.importESModule("resource://gre/modules/XPCOMUtils.sys.mjs");
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
import { NetUtil } from "resource://gre/modules/NetUtil.sys.mjs";
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
CalEvent: "resource:///modules/CalEvent.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(lazy, {
CalEvent: "resource:///modules/CalEvent.jsm",
CalTodo: "resource:///modules/CalTodo.jsm",
CalRecurrenceInfo: "resource:///modules/CalRecurrenceInfo.jsm",
});
function CalIcsParser() {
export function CalIcsParser() {
this.wrappedJSObject = this;
this.mItems = [];
this.mParentlessItems = [];
this.mComponents = [];
this.mProperties = [];
}
CalIcsParser.prototype = {
QueryInterface: ChromeUtils.generateQI(["calIIcsParser"]),
classID: Components.ID("{6fe88047-75b6-4874-80e8-5f5800f14984}"),

Просмотреть файл

@ -2,16 +2,15 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalIcsSerializer"];
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
function CalIcsSerializer() {
export function CalIcsSerializer() {
this.wrappedJSObject = this;
this.mItems = [];
this.mProperties = [];
this.mComponents = [];
}
CalIcsSerializer.prototype = {
QueryInterface: ChromeUtils.generateQI(["calIIcsSerializer"]),
classID: Components.ID("{207a6682-8ff1-4203-9160-729ec28c8766}"),

Просмотреть файл

@ -2,14 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalItipItem"];
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
function CalItipItem() {
export function CalItipItem() {
this.wrappedJSObject = this;
this.mCurrentItemIndex = 0;
}
CalItipItem.prototype = {
QueryInterface: ChromeUtils.generateQI(["calIItipItem"]),
classID: Components.ID("{f41392ab-dcad-4bad-818f-b3d1631c4d93}"),

Просмотреть файл

@ -2,11 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalMimeConverter"];
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
function CalMimeConverter() {
export function CalMimeConverter() {
this.wrappedJSObject = this;
}

Просмотреть файл

@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalPeriod"];
const { ICAL, unwrapSetter, wrapGetter } = ChromeUtils.import(
"resource:///modules/calendar/Ical.jsm"
);
const lazy = {};
ChromeUtils.defineModuleGetter(lazy, "CalDateTime", "resource:///modules/CalDateTime.jsm");
ChromeUtils.defineModuleGetter(lazy, "CalDuration", "resource:///modules/CalDuration.jsm");
ChromeUtils.defineESModuleGetters(lazy, {
CalDateTime: "resource:///modules/CalDateTime.sys.mjs",
CalDuration: "resource:///modules/CalDuration.sys.mjs",
});
function CalPeriod(innerObject) {
export function CalPeriod(innerObject) {
this.innerObject = innerObject || new ICAL.Period({});
this.wrappedJSObject = this;
}

Просмотреть файл

@ -2,15 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalProtocolHandlerWebcal", "CalProtocolHandlerWebcals"];
/**
* CalProtocolHandler.
*
* @param {string} scheme - The scheme to init for (webcal, webcals).
* @implements {nsIProtocolHandler}
*/
class CalProtocolHandlerWebcal {
export class CalProtocolHandlerWebcal {
QueryInterface = ChromeUtils.generateQI(["nsIProtocolHandler"]);
scheme = "webcal";
@ -49,15 +47,17 @@ class CalProtocolHandlerWebcal {
return false; // We are not overriding any special ports.
}
}
CalProtocolHandlerWebcal.prototype.classID = Components.ID(
"{1153c73a-39be-46aa-9ba9-656d188865ca}"
);
class CalProtocolHandlerWebcals extends CalProtocolHandlerWebcal {
export class CalProtocolHandlerWebcals extends CalProtocolHandlerWebcal {
scheme = "webcals";
httpScheme = "http";
httpPort = 443;
}
CalProtocolHandlerWebcals.prototype.classID = Components.ID(
"{bdf71224-365d-4493-856a-a7e74026f766}"
);

Просмотреть файл

@ -2,14 +2,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalRecurrenceDate"];
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
const lazy = {};
ChromeUtils.defineModuleGetter(lazy, "CalPeriod", "resource:///modules/CalPeriod.jsm");
ChromeUtils.defineESModuleGetters(lazy, {
CalPeriod: "resource:///modules/CalPeriod.sys.mjs",
});
function CalRecurrenceDate() {
export function CalRecurrenceDate() {
this.wrappedJSObject = this;
}

Просмотреть файл

@ -2,9 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalRecurrenceInfo"];
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
function getRidKey(date) {
if (!date) {
@ -24,7 +22,7 @@ function getRidKey(date) {
* @implements {calIRecurrenceInfo}
* @param {calIItemBase} [item] - Optional calendar item for which this recurrence applies.
*/
function CalRecurrenceInfo(item) {
export function CalRecurrenceInfo(item) {
this.wrappedJSObject = this;
this.mRecurrenceItems = [];
this.mExceptionMap = {};

Просмотреть файл

@ -2,18 +2,18 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalRecurrenceRule"];
const { ICAL, unwrapSetter, unwrapSingle, wrapGetter } = ChromeUtils.import(
"resource:///modules/calendar/Ical.jsm"
);
const { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
const lazy = {};
ChromeUtils.defineModuleGetter(lazy, "CalDateTime", "resource:///modules/CalDateTime.jsm");
ChromeUtils.defineModuleGetter(lazy, "CalIcalProperty", "resource:///modules/CalICSService.jsm");
ChromeUtils.defineESModuleGetters(lazy, {
CalDateTime: "resource:///modules/CalDateTime.sys.mjs",
CalIcalProperty: "resource:///modules/CalICSService.sys.mjs",
});
function CalRecurrenceRule(innerObject) {
export function CalRecurrenceRule(innerObject) {
this.innerObject = innerObject || new ICAL.Recur();
this.wrappedJSObject = this;
}

Просмотреть файл

@ -2,9 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalRelation"];
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
/**
* Constructor for `calIRelation` objects.
@ -13,13 +11,14 @@ var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.
* @implements {calIRelation}
* @param {string} [icalString] - Optional iCal string for initializing existing relations.
*/
function CalRelation(icalString) {
export function CalRelation(icalString) {
this.wrappedJSObject = this;
this.mProperties = new Map();
if (icalString) {
this.icalString = icalString;
}
}
CalRelation.prototype = {
QueryInterface: ChromeUtils.generateQI(["calIRelation"]),
classID: Components.ID("{76810fae-abad-4019-917a-08e95d5bbd68}"),

Просмотреть файл

@ -2,8 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalStartupService"];
/**
* Helper function to asynchronously call a certain method on the objects passed
* in 'services' in order (i.e wait until the first completes before calling the
@ -23,7 +21,7 @@ function callOrderedServices(method, services) {
}
}
function CalStartupService() {
export function CalStartupService() {
this.wrappedJSObject = this;
this.setupObservers();
}

Просмотреть файл

@ -2,11 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalTimezoneService"];
import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
var { AppConstants } = ChromeUtils.importESModule("resource://gre/modules/AppConstants.sys.mjs");
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
var { ICAL, unwrapSingle } = ChromeUtils.import("resource:///modules/calendar/Ical.jsm");
const { CalTimezone } = ChromeUtils.import("resource:///modules/CalTimezone.jsm");
@ -16,7 +15,7 @@ const TIMEZONE_CHANGED_TOPIC = "default-timezone-changed";
// CalTimezoneService acts as an implementation of both ICAL.TimezoneService and
// the XPCOM calITimezoneService used for providing timezone objects to calendar
// code.
function CalTimezoneService() {
export function CalTimezoneService() {
this.wrappedJSObject = this;
this._timezoneDatabase = Cc["@mozilla.org/calendar/timezone-database;1"].getService(

Просмотреть файл

@ -4,9 +4,7 @@
/* import-globals-from calItemBase.js */
var EXPORTED_SYMBOLS = ["CalTodo"];
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
Services.scriptloader.loadSubScript("resource:///components/calItemBase.js");
@ -17,7 +15,7 @@ Services.scriptloader.loadSubScript("resource:///components/calItemBase.js");
* @implements {calITodo}
* @param {string} [icalString] - Optional iCal string for initializing existing todos.
*/
function CalTodo(icalString) {
export function CalTodo(icalString) {
this.initItemBase();
this.todoPromotedProps = {

Просмотреть файл

@ -2,9 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalWeekInfoService"];
var { XPCOMUtils } = ChromeUtils.importESModule("resource://gre/modules/XPCOMUtils.sys.mjs");
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
const SUNDAY = 0;
const THURSDAY = 4;
@ -13,9 +11,10 @@ const lazy = {};
XPCOMUtils.defineLazyPreferenceGetter(lazy, "startWeekday", "calendar.week.start", SUNDAY);
function CalWeekInfoService() {
export function CalWeekInfoService() {
this.wrappedJSObject = this;
}
CalWeekInfoService.prototype = {
QueryInterface: ChromeUtils.generateQI(["calIWeekInfoService"]),
classID: Components.ID("{6877bbdd-f336-46f5-98ce-fe86d0285cc1}"),

Просмотреть файл

@ -8,7 +8,7 @@ Classes = [
{
"cid": "{7463258c-6ef3-40a2-89a9-bb349596e927}",
"contract_ids": ["@mozilla.org/calendar/acl-manager;1?type=default"],
"jsm": "resource:///modules/CalDefaultACLManager.jsm",
'esModule': "resource:///modules/CalDefaultACLManager.sys.mjs",
"constructor": "CalDefaultACLManager",
},
{
@ -21,110 +21,110 @@ Classes = [
{
"cid": "{e736f2bd-7640-4715-ab35-887dc866c587}",
"contract_ids": ["@mozilla.org/calendar/timezone-service;1"],
"jsm": "resource:///modules/CalTimezoneService.jsm",
'esModule': "resource:///modules/CalTimezoneService.sys.mjs",
"constructor": "CalTimezoneService",
},
{
"cid": "{b8db7c7f-c168-4e11-becb-f26c1c4f5f8f}",
"contract_ids": ["@mozilla.org/calendar/alarm;1"],
"jsm": "resource:///modules/CalAlarm.jsm",
'esModule': "resource:///modules/CalAlarm.sys.mjs",
"constructor": "CalAlarm",
},
{
"cid": "{4b7ae030-ed79-11d9-8cd6-0800200c9a66}",
"contract_ids": ["@mozilla.org/calendar/alarm-monitor;1"],
"jsm": "resource:///modules/CalAlarmMonitor.jsm",
'esModule': "resource:///modules/CalAlarmMonitor.sys.mjs",
"constructor": "CalAlarmMonitor",
},
{
"cid": "{7a9200dd-6a64-4fff-a798-c5802186e2cc}",
"contract_ids": ["@mozilla.org/calendar/alarm-service;1"],
"jsm": "resource:///modules/CalAlarmService.jsm",
'esModule': "resource:///modules/CalAlarmService.sys.mjs",
"constructor": "CalAlarmService",
},
{
"cid": "{5f76b352-ab75-4c2b-82c9-9206dbbf8571}",
"contract_ids": ["@mozilla.org/calendar/attachment;1"],
"jsm": "resource:///modules/CalAttachment.jsm",
'esModule': "resource:///modules/CalAttachment.sys.mjs",
"constructor": "CalAttachment",
},
{
"cid": "{5c8dcaa3-170c-4a73-8142-d531156f664d}",
"contract_ids": ["@mozilla.org/calendar/attendee;1"],
"jsm": "resource:///modules/CalAttendee.jsm",
'esModule': "resource:///modules/CalAttendee.sys.mjs",
"constructor": "CalAttendee",
},
{
"cid": "{f42585e7-e736-4600-985d-9624c1c51992}",
"contract_ids": ["@mozilla.org/calendar/manager;1"],
"jsm": "resource:///modules/CalCalendarManager.jsm",
'esModule': "resource:///modules/CalCalendarManager.sys.mjs",
"constructor": "CalCalendarManager",
},
{
"cid": "{36783242-ec94-4d8a-9248-d2679edd55b9}",
"contract_ids": ["@mozilla.org/calendar/datetime;1"],
"jsm": "resource:///modules/CalDateTime.jsm",
'esModule': "resource:///modules/CalDateTime.sys.mjs",
"constructor": "CalDateTime",
},
{
"cid": "{8e6799af-e7e9-4e6c-9a82-a2413e86d8c3}",
"contract_ids": ["@mozilla.org/calendar/deleted-items-manager;1"],
"jsm": "resource:///modules/CalDeletedItems.jsm",
'esModule': "resource:///modules/CalDeletedItems.sys.mjs",
"constructor": "CalDeletedItems",
"categories": {"profile-after-change": "deleted-items-manager"},
},
{
"cid": "{7436f480-c6fc-4085-9655-330b1ee22288}",
"contract_ids": ["@mozilla.org/calendar/duration;1"],
"jsm": "resource:///modules/CalDuration.jsm",
'esModule': "resource:///modules/CalDuration.sys.mjs",
"constructor": "CalDuration",
},
{
"cid": "{974339d5-ab86-4491-aaaf-2b2ca177c12b}",
"contract_ids": ["@mozilla.org/calendar/event;1"],
"jsm": "resource:///modules/CalEvent.jsm",
'esModule': "resource:///modules/CalEvent.sys.mjs",
"constructor": "CalEvent",
},
{
"cid": "{29c56cd5-d36e-453a-acde-0083bd4fe6d3}",
"contract_ids": ["@mozilla.org/calendar/freebusy-service;1"],
"jsm": "resource:///modules/CalFreeBusyService.jsm",
'esModule': "resource:///modules/CalFreeBusyService.sys.mjs",
"constructor": "CalFreeBusyService",
},
{
"cid": "{6fe88047-75b6-4874-80e8-5f5800f14984}",
"contract_ids": ["@mozilla.org/calendar/ics-parser;1"],
"jsm": "resource:///modules/CalIcsParser.jsm",
'esModule': "resource:///modules/CalIcsParser.sys.mjs",
"constructor": "CalIcsParser",
},
{
"cid": "{207a6682-8ff1-4203-9160-729ec28c8766}",
"contract_ids": ["@mozilla.org/calendar/ics-serializer;1"],
"jsm": "resource:///modules/CalIcsSerializer.jsm",
'esModule': "resource:///modules/CalIcsSerializer.sys.mjs",
"constructor": "CalIcsSerializer",
},
{
"cid": "{c61cb903-4408-41b3-bc22-da0b27efdfe1}",
"contract_ids": ["@mozilla.org/calendar/ics-service;1"],
"jsm": "resource:///modules/CalICSService.jsm",
'esModule': "resource:///modules/CalICSService.sys.mjs",
"constructor": "CalICSService",
},
{
"cid": "{f41392ab-dcad-4bad-818f-b3d1631c4d93}",
"contract_ids": ["@mozilla.org/calendar/itip-item;1"],
"jsm": "resource:///modules/CalItipItem.jsm",
'esModule': "resource:///modules/CalItipItem.sys.mjs",
"constructor": "CalItipItem",
},
{
"cid": "{394a281f-7299-45f7-8b1f-cce21258972f}",
"contract_ids": ["@mozilla.org/calendar/period;1"],
"jsm": "resource:///modules/CalPeriod.jsm",
'esModule': "resource:///modules/CalPeriod.sys.mjs",
"constructor": "CalPeriod",
},
{
"cid": "{1153c73a-39be-46aa-9ba9-656d188865ca}",
"contract_ids": ["@mozilla.org/network/protocol;1?name=webcal"],
"jsm": "resource:///modules/CalProtocolHandler.jsm",
'esModule': "resource:///modules/CalProtocolHandler.sys.mjs",
"constructor": "CalProtocolHandlerWebcal",
"protocol_config": {
"scheme": "webcal",
@ -141,7 +141,7 @@ Classes = [
{
"cid": "{bdf71224-365d-4493-856a-a7e74026f766}",
"contract_ids": ["@mozilla.org/network/protocol;1?name=webcals"],
"jsm": "resource:///modules/CalProtocolHandler.jsm",
'esModule': "resource:///modules/CalProtocolHandler.sys.mjs",
"constructor": "CalProtocolHandlerWebcals",
"protocol_config": {
"scheme": "webcals",
@ -158,50 +158,50 @@ Classes = [
{
"cid": "{806b6423-3aaa-4b26-afa3-de60563e9cec}",
"contract_ids": ["@mozilla.org/calendar/recurrence-date;1"],
"jsm": "resource:///modules/CalRecurrenceDate.jsm",
'esModule': "resource:///modules/CalRecurrenceDate.sys.mjs",
"constructor": "CalRecurrenceDate",
},
{
"cid": "{04027036-5884-4a30-b4af-f2cad79f6edf}",
"contract_ids": ["@mozilla.org/calendar/recurrence-info;1"],
"jsm": "resource:///modules/CalRecurrenceInfo.jsm",
'esModule': "resource:///modules/CalRecurrenceInfo.sys.mjs",
"constructor": "CalRecurrenceInfo",
},
{
"cid": "{df19281a-5389-4146-b941-798cb93a7f0d}",
"contract_ids": ["@mozilla.org/calendar/recurrence-rule;1"],
"jsm": "resource:///modules/CalRecurrenceRule.jsm",
'esModule': "resource:///modules/CalRecurrenceRule.sys.mjs",
"constructor": "CalRecurrenceRule",
},
{
"cid": "{76810fae-abad-4019-917a-08e95d5bbd68}",
"contract_ids": ["@mozilla.org/calendar/relation;1"],
"jsm": "resource:///modules/CalRelation.jsm",
'esModule': "resource:///modules/CalRelation.sys.mjs",
"constructor": "CalRelation",
},
{
"cid": "{7af51168-6abe-4a31-984d-6f8a3989212d}",
"contract_ids": ["@mozilla.org/calendar/todo;1"],
"jsm": "resource:///modules/CalTodo.jsm",
'esModule': "resource:///modules/CalTodo.sys.mjs",
"constructor": "CalTodo",
},
{
"cid": "{6877bbdd-f336-46f5-98ce-fe86d0285cc1}",
"contract_ids": ["@mozilla.org/calendar/weekinfo-service;1"],
"jsm": "resource:///modules/CalWeekInfoService.jsm",
'esModule': "resource:///modules/CalWeekInfoService.sys.mjs",
"constructor": "CalWeekInfoService",
},
{
"cid": "{2547331f-34c0-4a4b-b93c-b503538ba6d6}",
"contract_ids": ["@mozilla.org/calendar/startup-service;1"],
"jsm": "resource:///modules/CalStartupService.jsm",
'esModule': "resource:///modules/CalStartupService.sys.mjs",
"constructor": "CalStartupService",
"categories": {"profile-after-change": "calendar-startup-service"},
},
{
"cid": "{c70acb08-464e-4e55-899d-b2c84c5409fa}",
"contract_ids": ["@mozilla.org/calendar/mime-converter;1"],
"jsm": "resource:///modules/CalMimeConverter.jsm",
'esModule': "resource:///modules/CalMimeConverter.sys.mjs",
"constructor": "CalMimeConverter",
"categories": {"simple-mime-converters": "text/calendar"},
},

Просмотреть файл

@ -10,37 +10,37 @@ XPIDL_SOURCES += [
XPIDL_MODULE = "calbaseinternal"
EXTRA_JS_MODULES += [
"CalAlarm.jsm",
"CalAlarmMonitor.jsm",
"CalAlarmService.jsm",
"CalAttachment.jsm",
"CalAttendee.jsm",
"CalCalendarManager.jsm",
"CalDateTime.jsm",
"CalDefaultACLManager.jsm",
"CalDeletedItems.jsm",
"CalDuration.jsm",
"CalEvent.jsm",
"CalFreeBusyService.jsm",
"CalIcsParser.jsm",
"CalIcsSerializer.jsm",
"CalICSService.jsm",
"CalItipItem.jsm",
"CalAlarm.sys.mjs",
"CalAlarmMonitor.sys.mjs",
"CalAlarmService.sys.mjs",
"CalAttachment.sys.mjs",
"CalAttendee.sys.mjs",
"CalCalendarManager.sys.mjs",
"CalDateTime.sys.mjs",
"CalDefaultACLManager.sys.mjs",
"CalDeletedItems.sys.mjs",
"CalDuration.sys.mjs",
"CalEvent.sys.mjs",
"CalFreeBusyService.sys.mjs",
"CalIcsParser.sys.mjs",
"CalIcsSerializer.sys.mjs",
"CalICSService.sys.mjs",
"CalItipItem.sys.mjs",
"CalMetronome.jsm",
"CalMimeConverter.jsm",
"CalPeriod.jsm",
"CalProtocolHandler.jsm",
"CalMimeConverter.sys.mjs",
"CalPeriod.sys.mjs",
"CalProtocolHandler.sys.mjs",
"CalReadableStreamFactory.jsm",
"CalRecurrenceDate.jsm",
"CalRecurrenceInfo.jsm",
"CalRecurrenceRule.jsm",
"CalRelation.jsm",
"CalStartupService.jsm",
"CalRecurrenceDate.sys.mjs",
"CalRecurrenceInfo.sys.mjs",
"CalRecurrenceRule.sys.mjs",
"CalRelation.sys.mjs",
"CalStartupService.sys.mjs",
"CalTimezone.jsm",
"CalTimezoneService.jsm",
"CalTodo.jsm",
"CalTimezoneService.sys.mjs",
"CalTodo.sys.mjs",
"CalTransactionManager.jsm",
"CalWeekInfoService.jsm",
"CalWeekInfoService.sys.mjs",
]
EXPORTS += [

Просмотреть файл

@ -2,14 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalHtmlExporter"];
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
/**
* HTML Export Plugin
*/
function CalHtmlExporter() {
export function CalHtmlExporter() {
this.wrappedJSObject = this;
}

Просмотреть файл

@ -2,9 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalIcsImporter", "CalIcsExporter"];
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
// Shared functions
function getIcsFileTypes() {
@ -18,7 +16,7 @@ function getIcsFileTypes() {
];
}
function CalIcsImporter() {
export function CalIcsImporter() {
this.wrappedJSObject = this;
}
@ -35,7 +33,7 @@ CalIcsImporter.prototype = {
},
};
function CalIcsExporter() {
export function CalIcsExporter() {
this.wrappedJSObject = this;
}

Просмотреть файл

@ -8,21 +8,21 @@ Classes = [
{
'cid': '{1e3e33dc-445a-49de-b2b6-15b2a050bb9d}',
'contract_ids': ['@mozilla.org/calendar/import;1?type=ics'],
'jsm': 'resource:///modules/CalIcsImportExport.jsm',
'esModule': 'resource:///modules/CalIcsImportExport.sys.mjs',
'constructor': 'CalIcsImporter',
'categories': {'cal-importers': 'cal-ics-importer'},
},
{
'cid': '{a6a524ce-adff-4a0f-bb7d-d1aaad4adc60}',
'contract_ids': ['@mozilla.org/calendar/export;1?type=ics'],
'jsm': 'resource:///modules/CalIcsImportExport.jsm',
'esModule': 'resource:///modules/CalIcsImportExport.sys.mjs',
'constructor': 'CalIcsExporter',
'categories': {'cal-exporters': 'cal-ics-exporter'},
},
{
'cid': '{72d9ab35-9b1b-442a-8cd0-ae49f00b159b}',
'contract_ids': ['@mozilla.org/calendar/export;1?type=htmllist'],
'jsm': 'resource:///modules/CalHtmlExport.jsm',
'esModule': 'resource:///modules/CalHtmlExport.sys.mjs',
'constructor': 'CalHtmlExporter',
'categories': {'cal-exporters': 'cal-html-list-exporter'},
},

Просмотреть файл

@ -6,8 +6,8 @@
JAR_MANIFESTS += ["jar.mn"]
EXTRA_JS_MODULES += [
"CalHtmlExport.jsm",
"CalIcsImportExport.jsm",
"CalHtmlExport.sys.mjs",
"CalIcsImportExport.sys.mjs",
]
XPCOM_MANIFESTS += [

Просмотреть файл

@ -2,17 +2,15 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalItipEmailTransport", "CalItipDefaultEmailTransport"];
var { MailServices } = ChromeUtils.import("resource:///modules/MailServices.jsm");
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
/**
* CalItipEmailTransport is used to send iTIP messages via email. Outside
* callers should use the static `createInstance()` method instead of this
* constructor directly.
*/
class CalItipEmailTransport {
export class CalItipEmailTransport {
wrappedJSObject = this;
QueryInterface = ChromeUtils.generateQI(["calIItipTransport"]);
classID = Components.ID("{d4d7b59e-c9e0-4a7a-b5e8-5958f85515f0}");
@ -432,7 +430,7 @@ class CalItipNoEmailTransport extends CalItipEmailTransport {
* CalItipDefaultEmailTransport always uses the identity and account provided
* as default instead of the one configured for the calendar.
*/
class CalItipDefaultEmailTransport extends CalItipEmailTransport {
export class CalItipDefaultEmailTransport extends CalItipEmailTransport {
getIdentityAndAccount() {
return { identity: this.mDefaultIdentity, account: this.mDefaultAccount };
}

Просмотреть файл

@ -2,22 +2,20 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["ItipChannel", "ItipProtocolHandler", "ItipContentHandler"];
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
var { XPCOMUtils } = ChromeUtils.importESModule("resource://gre/modules/XPCOMUtils.sys.mjs");
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
const lazy = {};
XPCOMUtils.defineLazyModuleGetters(lazy, {
CalEvent: "resource:///modules/CalEvent.jsm",
ChromeUtils.defineESModuleGetters(lazy, {
CalEvent: "resource:///modules/CalEvent.sys.mjs",
});
function ItipChannel(URI, aLoadInfo) {
export function ItipChannel(URI, aLoadInfo) {
this.wrappedJSObject = this;
this.URI = this.originalURI = URI;
this.loadInfo = aLoadInfo;
}
ItipChannel.prototype = {
QueryInterface: ChromeUtils.generateQI(["nsIChannel", "nsIRequest"]),
classID: Components.ID("{643e0328-36f6-411d-a107-16238dff9cd7}"),
@ -66,9 +64,10 @@ ItipChannel.prototype = {
/**
* @implements {nsIProtocolHandler}
*/
function ItipProtocolHandler() {
export function ItipProtocolHandler() {
this.wrappedJSObject = this;
}
ItipProtocolHandler.prototype = {
QueryInterface: ChromeUtils.generateQI(["nsIProtocolHandler"]),
classID: Components.ID("{6e957006-b4ce-11d9-b053-001124736B74}"),
@ -81,9 +80,10 @@ ItipProtocolHandler.prototype = {
},
};
function ItipContentHandler() {
export function ItipContentHandler() {
this.wrappedJSObject = this;
}
ItipContentHandler.prototype = {
QueryInterface: ChromeUtils.generateQI(["nsIContentHandler"]),
classID: Components.ID("{47c31f2b-b4de-11d9-bfe6-001124736B74}"),

Просмотреть файл

@ -8,19 +8,19 @@ Classes = [
{
'cid': '{d4d7b59e-c9e0-4a7a-b5e8-5958f85515f0}',
'contract_ids': ['@mozilla.org/calendar/itip-transport;1?type=email'],
'jsm': 'resource:///modules/CalItipEmailTransport.jsm',
'esModule': 'resource:///modules/CalItipEmailTransport.sys.mjs',
'constructor': 'CalItipEmailTransport',
},
{
'cid': '{643e0328-36f6-411d-a107-16238dff9cd7}',
'contract_ids': ['@mozilla.org/calendar/itip-channel;1'],
'jsm': 'resource:///modules/CalItipProtocolHandler.jsm',
'esModule': 'resource:///modules/CalItipProtocolHandler.sys.mjs',
'constructor': 'ItipChannel',
},
{
'cid': '{6e957006-b4ce-11d9-b053-001124736B74}',
'contract_ids': ['@mozilla.org/network/protocol;1?name=moz-cal-handle-itip'],
'jsm': 'resource:///modules/CalItipProtocolHandler.jsm',
'esModule': 'resource:///modules/CalItipProtocolHandler.sys.mjs',
'constructor': 'ItipProtocolHandler',
'protocol_config': {
'scheme': 'moz-cal-handle-itip',
@ -33,7 +33,7 @@ Classes = [
{
'cid': '{47c31f2b-b4de-11d9-bfe6-001124736B74}',
'contract_ids': ['@mozilla.org/uriloader/content-handler;1?type=application/x-itip-internal'],
'jsm': 'resource:///modules/CalItipEmailTransport.jsm',
'esModule': 'resource:///modules/CalItipEmailTransport.sys.mjs',
'constructor': 'ItipContentHandler',
},
]

Просмотреть файл

@ -4,10 +4,10 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
EXTRA_JS_MODULES += [
"CalItipEmailTransport.jsm",
"CalItipEmailTransport.sys.mjs",
"CalItipMessageSender.jsm",
"CalItipOutgoingMessage.jsm",
"CalItipProtocolHandler.jsm",
"CalItipProtocolHandler.sys.mjs",
]
XPCOM_MANIFESTS += [

Просмотреть файл

@ -2,9 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalDavCalendar"];
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
var {
CalDavGenericRequest,
@ -32,7 +30,7 @@ var MIME_TEXT_XML = "text/xml; charset=utf-8";
var cIOL = Ci.calIOperationListener;
function CalDavCalendar() {
export function CalDavCalendar() {
this.initProviderBase();
this.unmappedProperties = [];
this.mUriParams = null;

Просмотреть файл

@ -8,7 +8,7 @@ Classes = [
{
'cid': '{a35fc6ea-3d92-11d9-89f9-00045ace3b8d}',
'contract_ids': ['@mozilla.org/calendar/calendar;1?type=caldav'],
'jsm': 'resource:///modules/CalDavCalendar.jsm',
'esModule': 'resource:///modules/CalDavCalendar.sys.mjs',
'constructor': 'CalDavCalendar',
},
]

Просмотреть файл

@ -6,7 +6,7 @@
DIRS += ["public"]
EXTRA_JS_MODULES += [
"CalDavCalendar.jsm",
"CalDavCalendar.sys.mjs",
"CalDavProvider.jsm",
]

Просмотреть файл

@ -2,9 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalCompositeCalendar"];
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
var { CalReadableStreamFactory } = ChromeUtils.import(
"resource:///modules/CalReadableStreamFactory.jsm"
@ -58,7 +56,7 @@ calCompositeCalendarObserverHelper.prototype = {
},
};
function CalCompositeCalendar() {
export function CalCompositeCalendar() {
this.mObserverHelper = new calCompositeCalendarObserverHelper(this);
this.wrappedJSObject = this;

Просмотреть файл

@ -8,7 +8,7 @@ Classes = [
{
'cid': '{aeff788d-63b0-4996-91fb-40a7654c6224}',
'contract_ids': ['@mozilla.org/calendar/calendar;1?type=composite'],
'jsm': 'resource:///modules/CalCompositeCalendar.jsm',
'esModule': 'resource:///modules/CalCompositeCalendar.sys.mjs',
'constructor': 'CalCompositeCalendar',
},
]

Просмотреть файл

@ -4,7 +4,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
EXTRA_JS_MODULES += [
"CalCompositeCalendar.jsm",
"CalCompositeCalendar.sys.mjs",
]
XPCOM_MANIFESTS += [

Просмотреть файл

@ -2,9 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CalMemoryCalendar"];
var { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
var { CalReadableStreamFactory } = ChromeUtils.import(
"resource:///modules/CalReadableStreamFactory.jsm"
@ -12,10 +10,11 @@ var { CalReadableStreamFactory } = ChromeUtils.import(
var cICL = Ci.calIChangeLog;
function CalMemoryCalendar() {
export function CalMemoryCalendar() {
this.initProviderBase();
this.initMemoryCalendar();
}
var calMemoryCalendarClassID = Components.ID("{bda0dd7f-0a2f-4fcf-ba08-5517e6fbf133}");
var calMemoryCalendarInterfaces = [
"calICalendar",

Просмотреть файл

@ -8,7 +8,7 @@ Classes = [
{
'cid': '{bda0dd7f-0a2f-4fcf-ba08-5517e6fbf133}',
'contract_ids': ['@mozilla.org/calendar/calendar;1?type=memory'],
'jsm': 'resource:///modules/CalMemoryCalendar.jsm',
'esModule': 'resource:///modules/CalMemoryCalendar.sys.mjs',
'constructor': 'CalMemoryCalendar',
},
]

Просмотреть файл

@ -4,7 +4,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
EXTRA_JS_MODULES += [
"CalMemoryCalendar.jsm",
"CalMemoryCalendar.sys.mjs",
]
XPCOM_MANIFESTS += [

Просмотреть файл

@ -2,9 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const EXPORTED_SYMBOLS = ["CalStorageCalendar"];
import { cal } from "resource:///modules/calendar/calUtils.sys.mjs";
const { cal } = ChromeUtils.importESModule("resource:///modules/calendar/calUtils.sys.mjs");
const { CalReadableStreamFactory } = ChromeUtils.import(
"resource:///modules/CalReadableStreamFactory.jsm"
);
@ -22,9 +21,10 @@ const { upgradeDB } = ChromeUtils.import("resource:///modules/calendar/calStorag
const kCalICalendar = Ci.calICalendar;
const cICL = Ci.calIChangeLog;
function CalStorageCalendar() {
export function CalStorageCalendar() {
this.initProviderBase();
}
var calStorageCalendarClassID = Components.ID("{b3eaa1c4-5dfe-4c0a-b62a-b3a514218461}");
var calStorageCalendarInterfaces = [
"calICalendar",

Просмотреть файл

@ -8,7 +8,7 @@ Classes = [
{
'cid': '{b3eaa1c4-5dfe-4c0a-b62a-b3a514218461}',
'contract_ids': ['@mozilla.org/calendar/calendar;1?type=storage'],
'jsm': 'resource:///modules/CalStorageCalendar.jsm',
'esModule': 'resource:///modules/CalStorageCalendar.sys.mjs',
'constructor': 'CalStorageCalendar',
},
]

Просмотреть файл

@ -4,7 +4,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
EXTRA_JS_MODULES += [
"CalStorageCalendar.jsm",
"CalStorageCalendar.sys.mjs",
]
XPCOM_MANIFESTS += [

Просмотреть файл

@ -28,8 +28,8 @@ const startupPhases = {
"before profile selection": {
allowlist: {
modules: new Set([
"resource:///modules/MailGlue.jsm",
"resource:///modules/StartupRecorder.jsm",
"resource:///modules/MailGlue.sys.mjs",
"resource:///modules/StartupRecorder.sys.mjs",
"resource://gre/modules/ActorManagerParent.sys.mjs",
"resource://gre/modules/AppConstants.sys.mjs",
"resource://gre/modules/CustomElementsListener.sys.mjs",
@ -52,8 +52,8 @@ const startupPhases = {
"resource:///modules/imXPCOMUtils.sys.mjs",
"resource:///modules/jsProtoHelper.sys.mjs",
"resource:///modules/logger.sys.mjs",
"resource:///modules/MailNotificationManager.jsm",
"resource:///modules/MailNotificationService.jsm",
"resource:///modules/MailNotificationManager.sys.mjs",
"resource:///modules/MailNotificationService.sys.mjs",
"resource:///modules/MsgIncomingServer.jsm",
]),
services: new Set([
@ -115,7 +115,7 @@ const startupPhases = {
"resource:///modules/gloda/NounTag.jsm",
"resource:///modules/index_im.sys.mjs",
"resource:///modules/jsmime.jsm",
"resource:///modules/MimeJSComponents.jsm",
"resource:///modules/MimeJSComponents.sys.mjs",
"resource:///modules/mimeParser.jsm",
"resource://gre/modules/BookmarkHTMLUtils.sys.mjs",
"resource://gre/modules/Bookmarks.sys.mjs",
@ -143,12 +143,12 @@ const startupPhases = {
"before becoming idle": {
denylist: {
modules: new Set([
"resource:///modules/AddrBookManager.jsm",
"resource:///modules/AddrBookManager.sys.mjs",
"resource:///modules/DisplayNameUtils.jsm",
"resource:///modules/gloda/Facet.jsm",
"resource:///modules/gloda/GlodaMsgSearcher.jsm",
"resource:///modules/gloda/SuffixTree.jsm",
"resource:///modules/GlodaAutoComplete.jsm",
"resource:///modules/GlodaAutoComplete.sys.mjs",
"resource:///modules/ImapIncomingServer.jsm",
"resource:///modules/ImapMessageMessageService.jsm",
"resource:///modules/ImapMessageService.jsm",
@ -157,19 +157,19 @@ const startupPhases = {
// the only IMAP implemention.
// "resource:///modules/ImapProtocolHandler.jsm",
"resource:///modules/ImapService.jsm",
"resource:///modules/NntpIncomingServer.jsm",
"resource:///modules/NntpMessageService.jsm",
"resource:///modules/NntpProtocolHandler.jsm",
"resource:///modules/NntpProtocolInfo.jsm",
"resource:///modules/NntpService.jsm",
"resource:///modules/Pop3IncomingServer.jsm",
"resource:///modules/Pop3ProtocolHandler.jsm",
"resource:///modules/Pop3ProtocolInfo.jsm",
"resource:///modules/NntpIncomingServer.sys.mjs",
"resource:///modules/NntpMessageService.sys.mjs",
"resource:///modules/NntpProtocolHandler.sys.mjs",
"resource:///modules/NntpProtocolInfo.sys.mjs",
"resource:///modules/NntpService.sys.mjs",
"resource:///modules/Pop3IncomingServer.sys.mjs",
"resource:///modules/Pop3ProtocolHandler.sys.mjs",
"resource:///modules/Pop3ProtocolInfo.sys.mjs",
// "resource:///modules/Pop3Service.jsm",
"resource:///modules/SmtpClient.jsm",
"resource:///modules/SMTPProtocolHandler.jsm",
"resource:///modules/SmtpServer.jsm",
"resource:///modules/SmtpService.jsm",
"resource:///modules/SMTPProtocolHandler.sys.mjs",
"resource:///modules/SmtpServer.sys.mjs",
"resource:///modules/SmtpService.sys.mjs",
"resource:///modules/TemplateUtils.jsm",
"resource://gre/modules/AsyncPrefs.sys.mjs",
"resource://gre/modules/LoginManagerContextMenu.sys.mjs",

Просмотреть файл

@ -2,9 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["AboutRedirector"];
export function AboutRedirector() {}
function AboutRedirector() {}
AboutRedirector.prototype = {
QueryInterface: ChromeUtils.generateQI(["nsIAboutModule"]),

Просмотреть файл

@ -3,17 +3,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var EXPORTED_SYMBOLS = ["MailGlue", "MailTelemetryForTests"];
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
const { AppConstants } = ChromeUtils.importESModule(
"resource://gre/modules/AppConstants.sys.mjs"
);
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
const lazy = {};
@ -274,7 +265,7 @@ const STARTUP_CRASHES_END_DELAY_MS = 30 * 1000;
* MailUtils.jsm instead.
*/
function MailGlue() {
export function MailGlue() {
XPCOMUtils.defineLazyServiceGetter(
this,
"_userIdleService",
@ -1395,7 +1386,7 @@ function reportUIConfiguration() {
* Export these functions so we can test them. This object shouldn't be
* accessed outside of a test (hence the name).
*/
var MailTelemetryForTests = {
export var MailTelemetryForTests = {
reportAccountTypes,
reportAccountSizes,
reportAddressBookTypes,

Просмотреть файл

@ -2,14 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["StartupRecorder"];
const Cm = Components.manager;
Cm.QueryInterface(Ci.nsIServiceManager);
const { AppConstants } = ChromeUtils.importESModule(
"resource://gre/modules/AppConstants.sys.mjs"
);
import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
let firstPaintNotification = "widget-first-paint";
// widget-first-paint fires much later than expected on Linux.
@ -59,7 +55,7 @@ const afterPaintListener = () => {
* This component only exists in nightly and debug builds, it doesn't ship in
* our release builds.
*/
function StartupRecorder() {
export function StartupRecorder() {
this.wrappedJSObject = this;
this.data = {
images: {
@ -74,6 +70,7 @@ function StartupRecorder() {
this._resolve = resolve;
});
}
StartupRecorder.prototype = {
QueryInterface: ChromeUtils.generateQI(["nsIObserver"]),

Просмотреть файл

@ -2,8 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["ActivityProcess", "ActivityEvent", "ActivityWarning"];
// Base class for ActivityProcess and ActivityEvent objects
function Activity() {
@ -54,7 +52,7 @@ Activity.prototype = {
},
};
function ActivityProcess() {
export function ActivityProcess() {
Activity.call(this);
this.bindingName = "activity-process-item";
this.groupingStyle = Ci.nsIActivity.GROUPING_STYLE_BYCONTEXT;
@ -236,7 +234,7 @@ ActivityProcess.prototype = {
QueryInterface: ChromeUtils.generateQI(["nsIActivityProcess", "nsIActivity"]),
};
function ActivityEvent() {
export function ActivityEvent() {
Activity.call(this);
this.bindingName = "activity-event-item";
this.groupingStyle = Ci.nsIActivity.GROUPING_STYLE_STANDALONE;
@ -280,7 +278,7 @@ ActivityEvent.prototype = {
QueryInterface: ChromeUtils.generateQI(["nsIActivityEvent", "nsIActivity"]),
};
function ActivityWarning() {
export function ActivityWarning() {
Activity.call(this);
this.bindingName = "activity-warning-item";
this.groupingStyle = Ci.nsIActivity.GROUPING_STYLE_BYCONTEXT;

Просмотреть файл

@ -3,9 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["ActivityManager"];
function ActivityManager() {}
export function ActivityManager() {}
ActivityManager.prototype = {
log: console.createInstance({

Просмотреть файл

@ -2,11 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["ActivityManagerUI"];
const ACTIVITY_MANAGER_URL = "chrome://messenger/content/activity.xhtml";
function ActivityManagerUI() {}
export function ActivityManagerUI() {}
ActivityManagerUI.prototype = {
show(aWindowContext, aID) {

Просмотреть файл

@ -8,31 +8,31 @@ Classes = [
{
'cid': '{B2C036A3-F7CE-401C-95EE-9C21505167FD}',
'contract_ids': ['@mozilla.org/activity-process;1'],
'jsm': 'resource:///modules/Activity.jsm',
'esModule': 'resource:///modules/Activity.sys.mjs',
'constructor': 'ActivityProcess',
},
{
'cid': '{87AAEB20-89D9-4B95-9542-3BF72405CAB2}',
'contract_ids': ['@mozilla.org/activity-event;1'],
'jsm': 'resource:///modules/Activity.jsm',
'esModule': 'resource:///modules/Activity.sys.mjs',
'constructor': 'ActivityEvent',
},
{
'cid': '{968BAC9E-798B-4952-B384-86B21B8CC71E}',
'contract_ids': ['@mozilla.org/activity-warning;1'],
'jsm': 'resource:///modules/Activity.jsm',
'esModule': 'resource:///modules/Activity.sys.mjs',
'constructor': 'ActivityWarning',
},
{
'cid': '{8aa5972e-19cb-41cc-9696-645f8a8d1a06}',
'contract_ids': ['@mozilla.org/activity-manager;1'],
'jsm': 'resource:///modules/ActivityManager.jsm',
'esModule': 'resource:///modules/ActivityManager.sys.mjs',
'constructor': 'ActivityManager',
},
{
'cid': '{5fa5974e-09cb-40cc-9696-643f8a8d9a06}',
'contract_ids': ['@mozilla.org/activity-manager-ui;1'],
'jsm': 'resource:///modules/ActivityManagerUI.jsm',
'esModule': 'resource:///modules/ActivityManagerUI.sys.mjs',
'constructor': 'ActivityManagerUI',
},
]

Просмотреть файл

@ -22,9 +22,9 @@ EXTRA_JS_MODULES.activity += [
]
EXTRA_JS_MODULES += [
"Activity.jsm",
"ActivityManager.jsm",
"ActivityManagerUI.jsm",
"Activity.sys.mjs",
"ActivityManager.sys.mjs",
"ActivityManagerUI.sys.mjs",
]
JAR_MANIFESTS += ["jar.mn"]

Просмотреть файл

@ -22,13 +22,13 @@ Classes = [
"@mozilla.org/network/protocol/about;1?what=import",
"@mozilla.org/network/protocol/about;1?what=profiling",
],
"jsm": "resource:///modules/AboutRedirector.jsm",
'esModule': "resource:///modules/AboutRedirector.sys.mjs",
"constructor": "AboutRedirector",
},
{
"cid": "{eb239c82-fac9-431e-98d7-11cacd0f71b8}",
"contract_ids": ["@mozilla.org/mail/mailglue;1"],
"jsm": "resource:///modules/MailGlue.jsm",
'esModule': "resource:///modules/MailGlue.sys.mjs",
"constructor": "MailGlue",
},
{
@ -70,7 +70,7 @@ if buildconfig.substs.get("MOZ_DEBUG") or buildconfig.substs.get("NIGHTLY_BUILD"
{
"cid": "{11c095b2-e42e-4bdf-9dd0-aed87595f6a4}",
"contract_ids": ["@mozilla.org/test/startuprecorder;1"],
"jsm": "resource:///modules/StartupRecorder.jsm",
'esModule': "resource:///modules/StartupRecorder.sys.mjs",
"constructor": "StartupRecorder",
},
]

Просмотреть файл

@ -8,7 +8,7 @@ Classes = [
{
'cid': '{089694e9-106a-4704-abf7-62a88545e194}',
'contract_ids': ['@mozilla.org/messenger/devtools-startup-clh;1'],
'jsm': 'resource:///modules/devtools-loader.jsm',
'esModule': 'resource:///modules/devtools-loader.sys.mjs',
'constructor': 'DevToolsStartup',
'categories': {'command-line-handler': 'm-aaa-tb-devtools'},
},

Просмотреть файл

@ -2,9 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
function DevToolsStartup() {}
export function DevToolsStartup() {}
DevToolsStartup.prototype = {
QueryInterface: ChromeUtils.generateQI(["nsICommandLineHandler"]),
@ -76,5 +74,3 @@ DevToolsStartup.prototype = {
DevToolsServer.registerAllActors();
},
};
var EXPORTED_SYMBOLS = ["DevToolsStartup"];

Просмотреть файл

@ -4,7 +4,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
EXTRA_JS_MODULES += [
"devtools-loader.jsm",
"devtools-loader.sys.mjs",
"tb-root-actor.js",
]

Просмотреть файл

@ -2,8 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const EXPORTED_SYMBOLS = ["ThunderbirdProfileMigrator"];
var { MailServices } = ChromeUtils.import(
"resource:///modules/MailServices.jsm"
);
@ -81,7 +79,7 @@ const IGNORE_DIRS = [
*
* @implements {nsIMailProfileMigrator}
*/
class ThunderbirdProfileMigrator {
export class ThunderbirdProfileMigrator {
QueryInterface = ChromeUtils.generateQI(["nsIMailProfileMigrator"]);
get wrappedJSObject() {

Просмотреть файл

@ -14,7 +14,7 @@ Classes = [
{
"cid": "{adb2e3a7-8df4-484a-b787-6c2184eb9756}",
"contract_ids": ["@mozilla.org/profile/migrator;1?app=mail&type=thunderbird"],
"jsm": "resource:///modules/ThunderbirdProfileMigrator.jsm",
'esModule': "resource:///modules/ThunderbirdProfileMigrator.sys.mjs",
"constructor": "ThunderbirdProfileMigrator",
},
{

Просмотреть файл

@ -23,7 +23,7 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
FINAL_LIBRARY = "mailcomps"
EXTRA_JS_MODULES += [
"ThunderbirdProfileMigrator.jsm",
"ThunderbirdProfileMigrator.sys.mjs",
]
XPCOM_MANIFESTS += [

Просмотреть файл

@ -32,15 +32,15 @@ EXTRA_COMPONENTS += [
]
EXTRA_JS_MODULES += [
"AboutRedirector.jsm",
"AboutRedirector.sys.mjs",
"AppIdleManager.jsm",
"MailGlue.jsm",
"MailGlue.sys.mjs",
"MessengerContentHandler.sys.mjs",
]
if CONFIG["MOZ_DEBUG"] or CONFIG["NIGHTLY_BUILD"]:
EXTRA_JS_MODULES += [
"StartupRecorder.jsm",
"StartupRecorder.sys.mjs",
]
XPCOM_MANIFESTS += [

Просмотреть файл

@ -2,16 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var EXPORTED_SYMBOLS = ["PromptCollection"];
/**
* Implements nsIPromptCollection
*
* @class PromptCollection
*/
class PromptCollection {
export class PromptCollection {
asyncBeforeUnloadCheck(browsingContext) {
let title;
let message;

Просмотреть файл

@ -6,7 +6,7 @@ Classes = [
{
'cid': '{7913837c-9623-11ea-bb37-0242ac130002}',
'contract_ids': ['@mozilla.org/embedcomp/prompt-collection;1'],
'jsm': 'resource:///modules/PromptCollection.jsm',
'esModule': 'resource:///modules/PromptCollection.sys.mjs',
'constructor': 'PromptCollection',
},
]

Просмотреть файл

@ -3,7 +3,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
EXTRA_JS_MODULES += [
"PromptCollection.jsm",
"PromptCollection.sys.mjs",
]
XPCOM_MANIFESTS += [

Просмотреть файл

@ -3,9 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["E2EService"];
function E2EService() {}
export function E2EService() {}
E2EService.prototype = {
name: "e2e",

Просмотреть файл

@ -8,7 +8,7 @@ Classes = [
{
'cid': '{d7aad508-991c-401a-8b3f-7e4e055e1e2b}',
'contract_ids': ['@mozilla.org/accountmanager/extension;1?name=e2e'],
'jsm': 'resource:///modules/AME2E.jsm',
'esModule': 'resource:///modules/AME2E.sys.mjs',
'constructor': 'E2EService',
'categories': {'mailnews-accountmanager-extensions': 'e2e-account-manager-extension'},
},

Просмотреть файл

@ -4,7 +4,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
EXTRA_JS_MODULES += [
"AME2E.jsm",
"AME2E.sys.mjs",
]
XPCOM_MANIFESTS += [

Просмотреть файл

@ -2,11 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at http://mozilla.org/MPL/2.0/. */
const EXPORTED_SYMBOLS = ["AddrBookCard"];
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
const lazy = {};
@ -22,7 +18,7 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
*
* @implements {nsIAbCard}
*/
function AddrBookCard() {
export function AddrBookCard() {
this._directoryUID = "";
this._properties = new Map([
["PopularityIndex", 0],

Просмотреть файл

@ -2,25 +2,20 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at http://mozilla.org/MPL/2.0/. */
const EXPORTED_SYMBOLS = ["AddrBookManager"];
import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
const { AppConstants } = ChromeUtils.importESModule(
"resource://gre/modules/AppConstants.sys.mjs"
);
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
MailGlue: "resource:///modules/MailGlue.sys.mjs",
clearTimeout: "resource://gre/modules/Timer.sys.mjs",
setTimeout: "resource://gre/modules/Timer.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(lazy, {
compareAddressBooks: "resource:///modules/AddrBookUtils.jsm",
MailGlue: "resource:///modules/MailGlue.jsm",
});
/** Test for valid directory URIs. */
@ -217,7 +212,8 @@ Services.prefs.addObserver("mail.showCondensedAddresses", () => {
* @implements {nsIAbManager}
* @implements {nsICommandLineHandler}
*/
function AddrBookManager() {}
export function AddrBookManager() {}
AddrBookManager.prototype = {
QueryInterface: ChromeUtils.generateQI([
"nsIAbManager",

Просмотреть файл

@ -2,17 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at http://mozilla.org/MPL/2.0/. */
const EXPORTED_SYMBOLS = ["CardDAVDirectory"];
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
const lazy = {};
const { SQLiteDirectory } = ChromeUtils.import(
"resource:///modules/SQLiteDirectory.jsm"
);
import { SQLiteDirectory } from "resource:///modules/SQLiteDirectory.sys.mjs";
ChromeUtils.defineESModuleGetters(lazy, {
clearInterval: "resource://gre/modules/Timer.sys.mjs",
@ -47,7 +41,7 @@ const log = console.createInstance({
/**
* Adds CardDAV sync to SQLiteDirectory.
*/
class CardDAVDirectory extends SQLiteDirectory {
export class CardDAVDirectory extends SQLiteDirectory {
/** nsIAbDirectory */
init(uri) {
@ -897,6 +891,7 @@ class CardDAVDirectory extends SQLiteDirectory {
return undefined;
}
}
CardDAVDirectory.prototype.classID = Components.ID(
"{1fa9941a-07d5-4a6f-9673-15327fc2b9ab}"
);

Просмотреть файл

@ -2,8 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const EXPORTED_SYMBOLS = ["LDAPConnection"];
const lazy = {};
ChromeUtils.defineModuleGetter(
@ -17,7 +15,7 @@ ChromeUtils.defineModuleGetter(
*
* @implements {nsILDAPConnection}
*/
class LDAPConnection {
export class LDAPConnection {
QueryInterface = ChromeUtils.generateQI(["nsILDAPConnection"]);
get bindName() {

Просмотреть файл

@ -2,14 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const EXPORTED_SYMBOLS = ["LDAPDirectory"];
const { AddrBookDirectory } = ChromeUtils.import(
"resource:///modules/AddrBookDirectory.jsm"
);
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
const { MailServices } = ChromeUtils.import(
"resource:///modules/MailServices.jsm"
);
@ -29,7 +26,7 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
* @implements {nsIAbDirectory}
*/
class LDAPDirectory extends AddrBookDirectory {
export class LDAPDirectory extends AddrBookDirectory {
QueryInterface = ChromeUtils.generateQI([
"nsIAbLDAPDirectory",
"nsIAbDirectory",

Просмотреть файл

@ -2,8 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const EXPORTED_SYMBOLS = ["LDAPDirectoryQuery"];
const { LDAPListenerBase } = ChromeUtils.import(
"resource:///modules/LDAPListenerBase.jsm"
);
@ -84,7 +82,7 @@ function boolConditionToFilter(attrMap, exp) {
* @implements {nsIAbDirectoryQuery}
* @implements {nsILDAPMessageListener}
*/
class LDAPDirectoryQuery extends LDAPListenerBase {
export class LDAPDirectoryQuery extends LDAPListenerBase {
QueryInterface = ChromeUtils.generateQI([
"nsIAbDirectoryQuery",
"nsILDAPMessageListener",

Просмотреть файл

@ -2,8 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const EXPORTED_SYMBOLS = ["LDAPOperation"];
const lazy = {};
ChromeUtils.defineModuleGetter(
@ -17,7 +15,7 @@ ChromeUtils.defineModuleGetter(
*
* @implements {nsILDAPOperation}
*/
class LDAPOperation {
export class LDAPOperation {
QueryInterface = ChromeUtils.generateQI(["nsILDAPOperation"]);
init(connection, listener, closure) {

Просмотреть файл

@ -2,12 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["LDAPProtocolHandler", "LDAPSProtocolHandler"];
/**
* @implements {nsIProtocolHandler}
*/
class LDAPProtocolHandler {
export class LDAPProtocolHandler {
QueryInterface = ChromeUtils.generateQI(["nsIProtocolHandler"]);
scheme = "ldap";
@ -25,17 +23,19 @@ class LDAPProtocolHandler {
return port == 389;
}
}
LDAPProtocolHandler.prototype.classID = Components.ID(
"{b3de9249-b0e5-4c12-8d91-c9a434fd80f5}"
);
class LDAPSProtocolHandler extends LDAPProtocolHandler {
export class LDAPSProtocolHandler extends LDAPProtocolHandler {
scheme = "ldaps";
allowPort(port, scheme) {
return port == 636;
}
}
LDAPSProtocolHandler.prototype.classID = Components.ID(
"{c85a5ef2-9c56-445f-b029-76889f2dd29b}"
);

Просмотреть файл

@ -3,14 +3,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const EXPORTED_SYMBOLS = ["LDAPReplicationService"];
const { LDAPListenerBase } = ChromeUtils.import(
"resource:///modules/LDAPListenerBase.jsm"
);
var { SQLiteDirectory } = ChromeUtils.import(
"resource:///modules/SQLiteDirectory.jsm"
);
import { SQLiteDirectory } from "resource:///modules/SQLiteDirectory.sys.mjs";
/**
* A service to replicate a LDAP directory to a local SQLite db.
@ -18,7 +14,7 @@ var { SQLiteDirectory } = ChromeUtils.import(
* @implements {nsIAbLDAPReplicationService}
* @implements {nsILDAPMessageListener}
*/
class LDAPReplicationService extends LDAPListenerBase {
export class LDAPReplicationService extends LDAPListenerBase {
QueryInterface = ChromeUtils.generateQI([
"nsIAbLDAPReplicationService",
"nsILDAPMessageListener",

Просмотреть файл

@ -2,12 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const EXPORTED_SYMBOLS = ["LDAPService"];
/**
* @implements {nsILDAPService}
*/
class LDAPService {
export class LDAPService {
QueryInterface = ChromeUtils.generateQI(["nsILDAPService"]);
createFilter(maxSize, pattern, prefix, suffix, attr, value) {

Просмотреть файл

@ -2,13 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const EXPORTED_SYMBOLS = ["LDAPSyncQuery"];
/**
* @implements {nsILDAPMessageListener}
* @implements {nsILDAPSyncQuery}
*/
class LDAPSyncQuery {
export class LDAPSyncQuery {
QueryInterface = ChromeUtils.generateQI([
"nsILDAPMessageListener",
"nsILDAPSyncQuery",

Просмотреть файл

@ -2,12 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const EXPORTED_SYMBOLS = ["LDAPURLParser"];
/**
* @implements {nsILDAPURLParser}
*/
class LDAPURLParser {
export class LDAPURLParser {
QueryInterface = ChromeUtils.generateQI(["nsILDAPURLParser"]);
parse(spec) {

Просмотреть файл

@ -2,20 +2,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at http://mozilla.org/MPL/2.0/. */
const EXPORTED_SYMBOLS = ["SQLiteDirectory"];
const { AddrBookDirectory } = ChromeUtils.import(
"resource:///modules/AddrBookDirectory.jsm"
);
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
const lazy = {};
const { AsyncShutdown } = ChromeUtils.importESModule(
"resource://gre/modules/AsyncShutdown.sys.mjs"
);
import { AsyncShutdown } from "resource://gre/modules/AsyncShutdown.sys.mjs";
ChromeUtils.defineESModuleGetters(lazy, {
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
@ -140,7 +134,7 @@ Services.obs.addObserver(async file => {
/**
* Adds SQLite storage to AddrBookDirectory.
*/
class SQLiteDirectory extends AddrBookDirectory {
export class SQLiteDirectory extends AddrBookDirectory {
init(uri) {
const uriParts = /^[\w-]+:\/\/([\w\.-]+\.\w+)$/.exec(uri);
if (!uriParts) {
@ -473,6 +467,7 @@ class SQLiteDirectory extends AddrBookDirectory {
return directories.get(fileName);
}
}
SQLiteDirectory.prototype.classID = Components.ID(
"{e96ee804-0bd3-472f-81a6-8a9d65277ad3}"
);

Просмотреть файл

@ -2,25 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at http://mozilla.org/MPL/2.0/. */
const EXPORTED_SYMBOLS = [
"VCardService",
"VCardMimeConverter",
"VCardProperties",
"VCardPropertyEntry",
"VCardUtils",
"BANISHED_PROPERTIES",
];
const { ICAL } = ChromeUtils.import("resource:///modules/calendar/Ical.jsm");
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
const lazy = {};
XPCOMUtils.defineLazyModuleGetters(lazy, {
AddrBookCard: "resource:///modules/AddrBookCard.jsm",
ChromeUtils.defineESModuleGetters(lazy, {
AddrBookCard: "resource:///modules/AddrBookCard.sys.mjs",
});
/**
@ -30,7 +17,7 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
* @see RFC 6350.
*/
var VCardUtils = {
export var VCardUtils = {
_decodeQuotedPrintable(value) {
const bytes = [];
for (let b = 0; b < value.length; b++) {
@ -228,7 +215,7 @@ var VCardUtils = {
},
};
function VCardService() {}
export function VCardService() {}
VCardService.prototype = {
QueryInterface: ChromeUtils.generateQI(["nsIMsgVCardService"]),
classID: Components.ID("{e2e0f615-bc5a-4441-a16b-a26e75949376}"),
@ -244,7 +231,7 @@ VCardService.prototype = {
},
};
function VCardMimeConverter() {}
export function VCardMimeConverter() {}
VCardMimeConverter.prototype = {
QueryInterface: ChromeUtils.generateQI(["nsISimpleMimeConverter"]),
classID: Components.ID("{dafab386-bd4c-4238-bb48-228fbc98ba29}"),
@ -308,7 +295,7 @@ VCardMimeConverter.prototype = {
},
};
const BANISHED_PROPERTIES = [
export const BANISHED_PROPERTIES = [
"UID",
"PrimaryEmail",
"SecondEmail",
@ -537,7 +524,7 @@ var typeMap = {
* Represents a single entry in a vCard ("contentline" in RFC6350 terms).
* The name, params, type and value are as returned by ICAL.
*/
class VCardPropertyEntry {
export class VCardPropertyEntry {
#name = null;
#params = null;
#type = null;
@ -638,7 +625,7 @@ class VCardPropertyEntry {
/**
* Represents an entire vCard as a collection of `VCardPropertyEntry` objects.
*/
class VCardProperties {
export class VCardProperties {
/**
* All of the vCard entries in this object.
*

Просмотреть файл

@ -6,19 +6,19 @@ Classes = [
{
"cid": "{e96ee804-0bd3-472f-81a6-8a9d65277ad3}",
"contract_ids": ["@mozilla.org/addressbook/directory;1?type=jsaddrbook"],
"jsm": "resource:///modules/SQLiteDirectory.jsm",
'esModule': "resource:///modules/SQLiteDirectory.sys.mjs",
"constructor": "SQLiteDirectory",
},
{
"cid": "{1143991d-31cd-4ea6-9c97-c587d990d724}",
"contract_ids": ["@mozilla.org/addressbook/jsaddrbookcard;1"],
"jsm": "resource:///modules/AddrBookCard.jsm",
'esModule': "resource:///modules/AddrBookCard.sys.mjs",
"constructor": "AddrBookCard",
},
{
"cid": "{224d3ef9-d81c-4d94-8826-a79a5835af93}",
"contract_ids": ["@mozilla.org/abmanager;1"],
"jsm": "resource:///modules/AddrBookManager.jsm",
'esModule': "resource:///modules/AddrBookManager.sys.mjs",
"constructor": "AddrBookManager",
"name": "AbManager",
"interfaces": ["nsIAbManager"],
@ -26,39 +26,39 @@ Classes = [
{
"cid": "{1fa9941a-07d5-4a6f-9673-15327fc2b9ab}",
"contract_ids": ["@mozilla.org/addressbook/directory;1?type=jscarddav"],
"jsm": "resource:///modules/CardDAVDirectory.jsm",
'esModule': "resource:///modules/CardDAVDirectory.sys.mjs",
"constructor": "CardDAVDirectory",
},
{
"cid": "{e2e0f615-bc5a-4441-a16b-a26e75949376}",
"contract_ids": ["@mozilla.org/addressbook/msgvcardservice;1"],
"jsm": "resource:///modules/VCardUtils.jsm",
'esModule': "resource:///modules/VCardUtils.sys.mjs",
"constructor": "VCardService",
},
{
"cid": "{e9fb36ec-c980-4a77-9f68-0eb10491eda8}",
"contract_ids": ["@mozilla.org/mimecth;1?type=text/vcard"],
"jsm": "resource:///modules/VCardUtils.jsm",
'esModule': "resource:///modules/VCardUtils.sys.mjs",
"constructor": "VCardMimeConverter",
"categories": {"simple-mime-converters": "text/vcard"},
},
{
"cid": "{dafab386-bd4c-4238-bb48-228fbc98ba29}",
"contract_ids": ["@mozilla.org/mimecth;1?type=text/x-vcard"],
"jsm": "resource:///modules/VCardUtils.jsm",
'esModule': "resource:///modules/VCardUtils.sys.mjs",
"constructor": "VCardMimeConverter",
"categories": {"simple-mime-converters": "text/x-vcard"},
},
{
"cid": "{f87b71b5-2a0f-4b37-8e4f-3c899f6b8432}",
"contract_ids": ["@mozilla.org/network/ldap-connection;1"],
"jsm": "resource:///modules/LDAPConnection.jsm",
'esModule': "resource:///modules/LDAPConnection.sys.mjs",
"constructor": "LDAPConnection",
},
{
"cid": "{a6f94ca4-cd2d-4983-bcf2-fe936190955c}",
"contract_ids": ["@mozilla.org/network/ldap-operation;1"],
"jsm": "resource:///modules/LDAPOperation.jsm",
'esModule': "resource:///modules/LDAPOperation.sys.mjs",
"constructor": "LDAPOperation",
},
{
@ -66,37 +66,37 @@ Classes = [
"contract_ids": [
"@mozilla.org/addressbook/directory;1?type=moz-abldapdirectory"
],
"jsm": "resource:///modules/LDAPDirectory.jsm",
'esModule': "resource:///modules/LDAPDirectory.sys.mjs",
"constructor": "LDAPDirectory",
},
{
"cid": "{5ad5d311-1a50-43db-a03c-63d45f443903}",
"contract_ids": ["@mozilla.org/addressbook/ldap-directory-query;1"],
"jsm": "resource:///modules/LDAPDirectoryQuery.jsm",
'esModule': "resource:///modules/LDAPDirectoryQuery.sys.mjs",
"constructor": "LDAPDirectoryQuery",
},
{
"cid": "{dbe204e8-ae09-11eb-b4c8-a7e4b3e6e82e}",
"contract_ids": ["@mozilla.org/addressbook/ldap-replication-service;1"],
"jsm": "resource:///modules/LDAPReplicationService.jsm",
'esModule': "resource:///modules/LDAPReplicationService.sys.mjs",
"constructor": "LDAPReplicationService",
},
{
"cid": "{e8b59b32-f83f-4d5f-8eb5-e3c1e5de0d47}",
"contract_ids": ["@mozilla.org/network/ldap-service;1"],
"jsm": "resource:///modules/LDAPService.jsm",
'esModule': "resource:///modules/LDAPService.sys.mjs",
"constructor": "LDAPService",
},
{
"cid": "{50ca73fa-7deb-42b9-9eec-e219e31e6d4b}",
"contract_ids": ["@mozilla.org/network/ldap-url-parser;1"],
"jsm": "resource:///modules/LDAPURLParser.jsm",
'esModule': "resource:///modules/LDAPURLParser.sys.mjs",
"constructor": "LDAPURLParser",
},
{
"cid": "{b3de9249-b0e5-4c12-8d91-c9a434fd80f5}",
"contract_ids": ["@mozilla.org/network/protocol;1?name=ldap"],
"jsm": "resource:///modules/LDAPProtocolHandler.jsm",
'esModule': "resource:///modules/LDAPProtocolHandler.sys.mjs",
"constructor": "LDAPProtocolHandler",
"protocol_config": {
"scheme": "ldap",
@ -111,7 +111,7 @@ Classes = [
{
"cid": "{c85a5ef2-9c56-445f-b029-76889f2dd29b}",
"contract_ids": ["@mozilla.org/network/protocol;1?name=ldaps"],
"jsm": "resource:///modules/LDAPProtocolHandler.jsm",
'esModule': "resource:///modules/LDAPProtocolHandler.sys.mjs",
"constructor": "LDAPSProtocolHandler",
"protocol_config": {
"scheme": "ldaps",
@ -130,7 +130,7 @@ if buildconfig.substs["MOZ_PREF_EXTENSIONS"]:
{
"cid": "{53d16809-1114-44e2-b585-41a2abb18f66}",
"contract_ids": ["@mozilla.org/ldapsyncquery;1"],
"jsm": "resource:///modules/LDAPSyncQuery.jsm",
'esModule': "resource:///modules/LDAPSyncQuery.sys.mjs",
"constructor": "LDAPSyncQuery",
},
]

Просмотреть файл

@ -3,31 +3,31 @@
# file, you can obtain one at http://mozilla.org/MPL/2.0/.
EXTRA_JS_MODULES += [
"AddrBookCard.jsm",
"AddrBookCard.sys.mjs",
"AddrBookDirectory.jsm",
"AddrBookMailingList.jsm",
"AddrBookManager.jsm",
"AddrBookManager.sys.mjs",
"AddrBookUtils.jsm",
"CardDAVDirectory.jsm",
"CardDAVDirectory.sys.mjs",
"CardDAVUtils.jsm",
"LDAPClient.jsm",
"LDAPConnection.jsm",
"LDAPDirectory.jsm",
"LDAPDirectoryQuery.jsm",
"LDAPConnection.sys.mjs",
"LDAPDirectory.sys.mjs",
"LDAPDirectoryQuery.sys.mjs",
"LDAPListenerBase.jsm",
"LDAPMessage.jsm",
"LDAPOperation.jsm",
"LDAPProtocolHandler.jsm",
"LDAPReplicationService.jsm",
"LDAPService.jsm",
"LDAPURLParser.jsm",
"LDAPOperation.sys.mjs",
"LDAPProtocolHandler.sys.mjs",
"LDAPReplicationService.sys.mjs",
"LDAPService.sys.mjs",
"LDAPURLParser.sys.mjs",
"QueryStringToExpression.jsm",
"SQLiteDirectory.jsm",
"VCardUtils.jsm",
"SQLiteDirectory.sys.mjs",
"VCardUtils.sys.mjs",
]
if CONFIG["MOZ_PREF_EXTENSIONS"]:
EXTRA_JS_MODULES += ["LDAPSyncQuery.jsm"]
EXTRA_JS_MODULES += ["LDAPSyncQuery.sys.mjs"]
XPCOM_MANIFESTS += [
"components.conf",

Просмотреть файл

@ -2,13 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["AbAutoCompleteMyDomain"];
var { MailServices } = ChromeUtils.import(
"resource:///modules/MailServices.jsm"
);
function AbAutoCompleteMyDomain() {}
export function AbAutoCompleteMyDomain() {}
AbAutoCompleteMyDomain.prototype = {
QueryInterface: ChromeUtils.generateQI(["nsIAutoCompleteSearch"]),

Просмотреть файл

@ -2,8 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["AbAutoCompleteSearch"];
var { MailServices } = ChromeUtils.import(
"resource:///modules/MailServices.jsm"
);
@ -99,7 +97,7 @@ nsAbAutoCompleteResult.prototype = {
]),
};
function AbAutoCompleteSearch() {}
export function AbAutoCompleteSearch() {}
AbAutoCompleteSearch.prototype = {
// This is set from a preference,

Просмотреть файл

@ -2,9 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["AbLDAPAttributeMap", "AbLDAPAttributeMapService"];
function AbLDAPAttributeMap() {
export function AbLDAPAttributeMap() {
this.mPropertyMap = {};
this.mAttrMap = {};
}
@ -192,7 +190,7 @@ AbLDAPAttributeMap.prototype = {
QueryInterface: ChromeUtils.generateQI(["nsIAbLDAPAttributeMap"]),
};
function AbLDAPAttributeMapService() {}
export function AbLDAPAttributeMapService() {}
AbLDAPAttributeMapService.prototype = {
mAttrMaps: {},

Просмотреть файл

@ -2,8 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["AbLDAPAutoCompleteSearch"];
var { MailServices } = ChromeUtils.import(
"resource:///modules/MailServices.jsm"
);
@ -78,7 +76,7 @@ nsAbLDAPAutoCompleteResult.prototype = {
]),
};
function AbLDAPAutoCompleteSearch() {
export function AbLDAPAutoCompleteSearch() {
Services.obs.addObserver(this, "quit-application");
this._timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
}

Просмотреть файл

@ -8,31 +8,31 @@ Classes = [
{
"cid": "{5b259db2-e451-4de9-8a6f-cfba91402973}",
"contract_ids": ["@mozilla.org/autocomplete/search;1?name=mydomain"],
"jsm": "resource:///modules/AbAutoCompleteMyDomain.jsm",
'esModule': "resource:///modules/AbAutoCompleteMyDomain.sys.mjs",
"constructor": "AbAutoCompleteMyDomain",
},
{
"cid": "{2f946df9-114c-41fe-8899-81f10daf4f0c}",
"contract_ids": ["@mozilla.org/autocomplete/search;1?name=addrbook"],
"jsm": "resource:///modules/AbAutoCompleteSearch.jsm",
'esModule': "resource:///modules/AbAutoCompleteSearch.sys.mjs",
"constructor": "AbAutoCompleteSearch",
},
{
"cid": "{127b341a-bdda-4270-85e1-edff569a9b85}",
"contract_ids": ["@mozilla.org/addressbook/ldap-attribute-map;1"],
"jsm": "resource:///modules/AbLDAPAttributeMap.jsm",
'esModule': "resource:///modules/AbLDAPAttributeMap.sys.mjs",
"constructor": "AbLDAPAttributeMap",
},
{
"cid": "{4ed7d5e1-8800-40da-9e78-c4f509d7ac5e}",
"contract_ids": ["@mozilla.org/addressbook/ldap-attribute-map-service;1"],
"jsm": "resource:///modules/AbLDAPAttributeMap.jsm",
'esModule': "resource:///modules/AbLDAPAttributeMap.sys.mjs",
"constructor": "AbLDAPAttributeMapService",
},
{
"cid": "{227e6482-fe9f-441f-9b7d-7b60375e7449}",
"contract_ids": ["@mozilla.org/autocomplete/search;1?name=ldap"],
"jsm": "resource:///modules/AbLDAPAutoCompleteSearch.jsm",
'esModule': "resource:///modules/AbLDAPAutoCompleteSearch.sys.mjs",
"constructor": "AbLDAPAutoCompleteSearch",
},
{

Просмотреть файл

@ -36,10 +36,10 @@ if CONFIG["OS_ARCH"] == "Darwin":
]
EXTRA_JS_MODULES += [
"AbAutoCompleteMyDomain.jsm",
"AbAutoCompleteSearch.jsm",
"AbLDAPAttributeMap.jsm",
"AbLDAPAutoCompleteSearch.jsm",
"AbAutoCompleteMyDomain.sys.mjs",
"AbAutoCompleteSearch.sys.mjs",
"AbLDAPAttributeMap.sys.mjs",
"AbLDAPAutoCompleteSearch.sys.mjs",
]
FINAL_LIBRARY = "mail"

Просмотреть файл

@ -6,10 +6,6 @@
* This module implements the folder lookup service (nsIFolderLookupService).
*/
"use strict";
var EXPORTED_SYMBOLS = ["FolderLookupService"];
// This ensures that the service is only created once.
var gCreated = false;
@ -19,7 +15,7 @@ var gCreated = false;
*
* @class
*/
function FolderLookupService() {
export function FolderLookupService() {
if (gCreated) {
throw Components.Exception("", Cr.NS_ERROR_ALREADY_INITIALIZED);
}

Просмотреть файл

@ -2,17 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const EXPORTED_SYMBOLS = ["MailNotificationManager"];
import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
const { AppConstants } = ChromeUtils.importESModule(
"resource://gre/modules/AppConstants.sys.mjs"
);
const { MailServices } = ChromeUtils.import(
"resource:///modules/MailServices.jsm"
);
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
const lazy = {};
@ -31,7 +26,7 @@ ChromeUtils.defineLazyGetter(
* A module that listens to folder change events, and show notifications for new
* mails if necessary.
*/
class MailNotificationManager {
export class MailNotificationManager {
QueryInterface = ChromeUtils.generateQI([
"nsIObserver",
"nsIFolderListener",

Просмотреть файл

@ -8,8 +8,6 @@
* information to platform-specific notification modules.
*/
var EXPORTED_SYMBOLS = ["NewMailNotificationService"];
var { MailServices } = ChromeUtils.import(
"resource:///modules/MailServices.jsm"
);
@ -21,7 +19,7 @@ var { MailServices } = ChromeUtils.import(
* @implements {nsIFolderListener}
* @implements {nsIObserver}
*/
class NewMailNotificationService {
export class NewMailNotificationService {
QueryInterface = ChromeUtils.generateQI([
"nsIObserver",
"nsIFolderListener",

Просмотреть файл

@ -2,8 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["MsgAsyncPrompter", "MsgAuthPrompt"];
const LoginInfo = Components.Constructor(
"@mozilla.org/login-manager/loginInfo;1",
"nsILoginInfo",
@ -97,7 +95,7 @@ runnablePrompter.prototype = {
},
};
function MsgAsyncPrompter() {
export function MsgAsyncPrompter() {
this._pendingPrompts = {};
// By default, only log warnings to the error console
// You can use the preference:
@ -183,7 +181,7 @@ MsgAsyncPrompter.prototype = {
*
* @implements {nsIAuthPrompt}
*/
class MsgAuthPrompt {
export class MsgAuthPrompt {
QueryInterface = ChromeUtils.generateQI(["nsIAuthPrompt"]);
static l10n = new Localization(["messenger/msgAuthPrompt.ftl"], true);

Просмотреть файл

@ -2,10 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var EXPORTED_SYMBOLS = ["OAuth2Module"];
var { OAuth2 } = ChromeUtils.import("resource:///modules/OAuth2.jsm");
var { OAuth2Providers } = ChromeUtils.import(
"resource:///modules/OAuth2Providers.jsm"
@ -18,7 +14,8 @@ var { OAuth2Providers } = ChromeUtils.import(
*
* @implements {msgIOAuth2Module}
*/
function OAuth2Module() {}
export function OAuth2Module() {}
OAuth2Module.prototype = {
QueryInterface: ChromeUtils.generateQI(["msgIOAuth2Module"]),

Просмотреть файл

@ -8,31 +8,31 @@ Classes = [
{
"cid": "{a30be08c-afc8-4fed-9af7-79778a23db23}",
"contract_ids": ["@mozilla.org/mail/folder-lookup;1"],
"jsm": "resource:///modules/FolderLookupService.jsm",
'esModule': "resource:///modules/FolderLookupService.sys.mjs",
"constructor": "FolderLookupService",
},
{
"cid": "{49b04761-23dd-45d7-903d-619418a4d319}",
"contract_ids": ["@mozilla.org/messenger/msgAsyncPrompter;1"],
"jsm": "resource:///modules/MsgAsyncPrompter.jsm",
'esModule': "resource:///modules/MsgAsyncPrompter.sys.mjs",
"constructor": "MsgAsyncPrompter",
},
{
"cid": "{26ebf3a7-3e52-4b7a-a89b-fa7c0b7506f9}",
"contract_ids": ["@mozilla.org/messenger/msgAuthPrompt;1"],
"jsm": "resource:///modules/MsgAsyncPrompter.jsm",
'esModule': "resource:///modules/MsgAsyncPrompter.sys.mjs",
"constructor": "MsgAuthPrompt",
},
{
"cid": "{b63d8e4c-bf60-439b-be0e-7c9f67291042}",
"contract_ids": ["@mozilla.org/mail/oauth2-module;1"],
"jsm": "resource:///modules/OAuth2Module.jsm",
'esModule': "resource:///modules/OAuth2Module.sys.mjs",
"constructor": "OAuth2Module",
},
{
"cid": "{740880e6-e299-4165-b82f-df1dcab3ae22}",
"contract_ids": ["@mozilla.org/newMailNotificationService;1"],
"jsm": "resource:///modules/MailNotificationService.jsm",
'esModule': "resource:///modules/MailNotificationService.sys.mjs",
"constructor": "NewMailNotificationService",
"name": "MailNotification",
"interfaces": ["mozINewMailNotificationService"],
@ -46,7 +46,7 @@ Classes = [
{
"cid": "{e9aef539-29db-4936-9fdc-40ba11c70cb3}",
"contract_ids": ["@mozilla.org/mail/notification-manager;1"],
"jsm": "resource:///modules/MailNotificationManager.jsm",
'esModule': "resource:///modules/MailNotificationManager.sys.mjs",
"constructor": "MailNotificationManager",
},
{

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше