forked from mirrors/gecko-dev
Bug 1808202 - Convert newtab DeDupe.jsm, ActorConstants.jsm and Actions.jsm to ES modules and update imports. r=Mardak
Depends on D165820 Differential Revision: https://phabricator.services.mozilla.com/D165821
This commit is contained in:
parent
0d9268a86c
commit
0196053126
97 changed files with 2000 additions and 1666 deletions
|
|
@ -6,8 +6,11 @@
|
|||
|
||||
const EXPORTED_SYMBOLS = ["ASRouterChild"];
|
||||
|
||||
const { MESSAGE_TYPE_LIST, MESSAGE_TYPE_HASH: msg } = ChromeUtils.import(
|
||||
"resource://activity-stream/common/ActorConstants.jsm"
|
||||
const {
|
||||
MESSAGE_TYPE_LIST,
|
||||
MESSAGE_TYPE_HASH: msg,
|
||||
} = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/common/ActorConstants.sys.mjs"
|
||||
);
|
||||
const VALID_TYPES = new Set(MESSAGE_TYPE_LIST);
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ const EXPORTED_SYMBOLS = ["ASRouterParent", "ASRouterTabs"];
|
|||
|
||||
const {
|
||||
MESSAGE_TYPE_HASH: { BLOCK_MESSAGE_BY_ID },
|
||||
} = ChromeUtils.import("resource://activity-stream/common/ActorConstants.jsm");
|
||||
} = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/common/ActorConstants.sys.mjs"
|
||||
);
|
||||
const { ASRouterNewTabHook } = ChromeUtils.import(
|
||||
"resource://activity-stream/lib/ASRouterNewTabHook.jsm"
|
||||
);
|
||||
|
|
|
|||
|
|
@ -3,18 +3,18 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
"use strict";
|
||||
|
||||
const MAIN_MESSAGE_TYPE = "ActivityStream:Main";
|
||||
const CONTENT_MESSAGE_TYPE = "ActivityStream:Content";
|
||||
const PRELOAD_MESSAGE_TYPE = "ActivityStream:PreloadedBrowser";
|
||||
const UI_CODE = 1;
|
||||
const BACKGROUND_PROCESS = 2;
|
||||
export const MAIN_MESSAGE_TYPE = "ActivityStream:Main";
|
||||
export const CONTENT_MESSAGE_TYPE = "ActivityStream:Content";
|
||||
export const PRELOAD_MESSAGE_TYPE = "ActivityStream:PreloadedBrowser";
|
||||
export const UI_CODE = 1;
|
||||
export const BACKGROUND_PROCESS = 2;
|
||||
|
||||
/**
|
||||
* globalImportContext - Are we in UI code (i.e. react, a dom) or some kind of background process?
|
||||
* Use this in action creators if you need different logic
|
||||
* for ui/background processes.
|
||||
*/
|
||||
const globalImportContext =
|
||||
export const globalImportContext =
|
||||
typeof Window === "undefined" ? BACKGROUND_PROCESS : UI_CODE;
|
||||
|
||||
// Create an object that avoids accidental differing key/value pairs:
|
||||
|
|
@ -22,7 +22,8 @@ const globalImportContext =
|
|||
// INIT: "INIT",
|
||||
// UNINIT: "UNINIT"
|
||||
// }
|
||||
const actionTypes = {};
|
||||
export const actionTypes = {};
|
||||
|
||||
for (const type of [
|
||||
"ABOUT_SPONSORED_TOP_SITES",
|
||||
"ADDONS_INFO_REQUEST",
|
||||
|
|
@ -385,7 +386,7 @@ function WebExtEvent(type, data, importContext = globalImportContext) {
|
|||
return importContext === UI_CODE ? AlsoToMain(action) : action;
|
||||
}
|
||||
|
||||
const actionCreators = {
|
||||
export const actionCreators = {
|
||||
BroadcastToContent,
|
||||
UserEvent,
|
||||
DiscoveryStreamUserEvent,
|
||||
|
|
@ -403,7 +404,7 @@ const actionCreators = {
|
|||
};
|
||||
|
||||
// These are helpers to test for certain kinds of actions
|
||||
const actionUtils = {
|
||||
export const actionUtils = {
|
||||
isSendToMain(action) {
|
||||
if (!action.meta) {
|
||||
return false;
|
||||
|
|
@ -454,15 +455,3 @@ const actionUtils = {
|
|||
},
|
||||
_RouteMessage,
|
||||
};
|
||||
|
||||
const EXPORTED_SYMBOLS = [
|
||||
"actionTypes",
|
||||
"actionCreators",
|
||||
"actionUtils",
|
||||
"globalImportContext",
|
||||
"UI_CODE",
|
||||
"BACKGROUND_PROCESS",
|
||||
"MAIN_MESSAGE_TYPE",
|
||||
"CONTENT_MESSAGE_TYPE",
|
||||
"PRELOAD_MESSAGE_TYPE",
|
||||
];
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
"use strict";
|
||||
|
||||
const MESSAGE_TYPE_LIST = [
|
||||
export const MESSAGE_TYPE_LIST = [
|
||||
"BLOCK_MESSAGE_BY_ID",
|
||||
"USER_ACTION",
|
||||
"IMPRESSION",
|
||||
|
|
@ -42,9 +42,7 @@ const MESSAGE_TYPE_LIST = [
|
|||
"RESET_GROUPS_STATE",
|
||||
];
|
||||
|
||||
const MESSAGE_TYPE_HASH = MESSAGE_TYPE_LIST.reduce((hash, value) => {
|
||||
export const MESSAGE_TYPE_HASH = MESSAGE_TYPE_LIST.reduce((hash, value) => {
|
||||
hash[value] = value;
|
||||
return hash;
|
||||
}, {});
|
||||
|
||||
const EXPORTED_SYMBOLS = ["MESSAGE_TYPE_LIST", "MESSAGE_TYPE_HASH"];
|
||||
|
|
@ -2,7 +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/. */
|
||||
|
||||
class Dedupe {
|
||||
export class Dedupe {
|
||||
constructor(createKey) {
|
||||
this.createKey = createKey || this.defaultCreateKey;
|
||||
}
|
||||
|
|
@ -34,5 +34,3 @@ class Dedupe {
|
|||
return result.map(m => Array.from(m.values()));
|
||||
}
|
||||
}
|
||||
|
||||
const EXPORTED_SYMBOLS = ["Dedupe"];
|
||||
|
|
@ -3,11 +3,11 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
"use strict";
|
||||
|
||||
const { actionTypes: at } = ChromeUtils.import(
|
||||
"resource://activity-stream/common/Actions.jsm"
|
||||
const { actionTypes: at } = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/common/Actions.sys.mjs"
|
||||
);
|
||||
const { Dedupe } = ChromeUtils.import(
|
||||
"resource://activity-stream/common/Dedupe.jsm"
|
||||
const { Dedupe } = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/common/Dedupe.sys.mjs"
|
||||
);
|
||||
|
||||
const TOP_SITES_DEFAULT_ROWS = 1;
|
||||
|
|
|
|||
|
|
@ -2,7 +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/. */
|
||||
|
||||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { Base } from "content-src/components/Base/Base";
|
||||
import { DetectUserSessionStart } from "content-src/lib/detect-user-session-start";
|
||||
import { initStore } from "content-src/lib/init-store";
|
||||
|
|
|
|||
|
|
@ -2,8 +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/. */
|
||||
|
||||
import { MESSAGE_TYPE_HASH as msg } from "common/ActorConstants.jsm";
|
||||
import { actionTypes as at } from "common/Actions.jsm";
|
||||
import { MESSAGE_TYPE_HASH as msg } from "common/ActorConstants.sys.mjs";
|
||||
import { actionTypes as at } from "common/Actions.sys.mjs";
|
||||
import { ASRouterUtils } from "./asrouter-utils";
|
||||
import { generateBundles } from "./rich-text-strings";
|
||||
import { ImpressionsWrapper } from "./components/ImpressionsWrapper/ImpressionsWrapper";
|
||||
|
|
|
|||
|
|
@ -2,8 +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/. */
|
||||
|
||||
import { MESSAGE_TYPE_HASH as msg } from "common/ActorConstants.jsm";
|
||||
import { actionCreators as ac } from "common/Actions.jsm";
|
||||
import { MESSAGE_TYPE_HASH as msg } from "common/ActorConstants.sys.mjs";
|
||||
import { actionCreators as ac } from "common/Actions.sys.mjs";
|
||||
|
||||
export const ASRouterUtils = {
|
||||
addListener(listener) {
|
||||
|
|
|
|||
|
|
@ -2,7 +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/. */
|
||||
|
||||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { ASRouterUtils } from "../../asrouter/asrouter-utils";
|
||||
import { connect } from "react-redux";
|
||||
import React from "react";
|
||||
|
|
|
|||
|
|
@ -2,7 +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/. */
|
||||
|
||||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { ASRouterAdmin } from "content-src/components/ASRouterAdmin/ASRouterAdmin";
|
||||
import { ASRouterUISurface } from "../../asrouter/asrouter-content";
|
||||
import { ConfirmDialog } from "content-src/components/ConfirmDialog/ConfirmDialog";
|
||||
|
|
|
|||
|
|
@ -2,7 +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/. */
|
||||
|
||||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { cardContextTypes } from "./types";
|
||||
import { connect } from "react-redux";
|
||||
import { ContextMenuButton } from "content-src/components/ContextMenu/ContextMenuButton";
|
||||
|
|
|
|||
|
|
@ -2,7 +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/. */
|
||||
|
||||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { perfService as perfSvc } from "content-src/lib/perf-service";
|
||||
import React from "react";
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +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/. */
|
||||
|
||||
import { actionCreators as ac, actionTypes } from "common/Actions.jsm";
|
||||
import { actionCreators as ac, actionTypes } from "common/Actions.sys.mjs";
|
||||
import { connect } from "react-redux";
|
||||
import React from "react";
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import React from "react";
|
||||
import { actionCreators as ac } from "common/Actions.jsm";
|
||||
import { actionCreators as ac } from "common/Actions.sys.mjs";
|
||||
|
||||
export class ContentSection extends React.PureComponent {
|
||||
constructor(props) {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,10 @@ import { DSEmptyState } from "../DSEmptyState/DSEmptyState.jsx";
|
|||
import { TopicsWidget } from "../TopicsWidget/TopicsWidget.jsx";
|
||||
import { SafeAnchor } from "../SafeAnchor/SafeAnchor";
|
||||
import { FluentOrText } from "../../FluentOrText/FluentOrText.jsx";
|
||||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import React, { useEffect, useState, useRef, useCallback } from "react";
|
||||
import { connect, useSelector } from "react-redux";
|
||||
const WIDGET_IDS = {
|
||||
|
|
|
|||
|
|
@ -2,7 +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/. */
|
||||
|
||||
import { actionCreators as ac } from "common/Actions.jsm";
|
||||
import { actionCreators as ac } from "common/Actions.sys.mjs";
|
||||
import { CardGrid } from "content-src/components/DiscoveryStreamComponents/CardGrid/CardGrid";
|
||||
import { DSDismiss } from "content-src/components/DiscoveryStreamComponents/DSDismiss/DSDismiss";
|
||||
import { LinkMenuOptions } from "content-src/lib/link-menu-options";
|
||||
|
|
|
|||
|
|
@ -2,7 +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/. */
|
||||
|
||||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { DSImage } from "../DSImage/DSImage.jsx";
|
||||
import { DSLinkMenu } from "../DSLinkMenu/DSLinkMenu";
|
||||
import { ImpressionStats } from "../../DiscoveryStreamImpressionStats/ImpressionStats";
|
||||
|
|
|
|||
|
|
@ -2,7 +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/. */
|
||||
|
||||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import React from "react";
|
||||
|
||||
export class DSEmptyState extends React.PureComponent {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
import { LinkMenu } from "content-src/components/LinkMenu/LinkMenu";
|
||||
import { ContextMenuButton } from "content-src/components/ContextMenu/ContextMenuButton";
|
||||
import { actionCreators as ac } from "common/Actions.jsm";
|
||||
import { actionCreators as ac } from "common/Actions.sys.mjs";
|
||||
import React from "react";
|
||||
|
||||
export class DSLinkMenu extends React.PureComponent {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import React from "react";
|
||||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { ModalOverlayWrapper } from "content-src/asrouter/components/ModalOverlay/ModalOverlay";
|
||||
|
||||
export class DSPrivacyModal extends React.PureComponent {
|
||||
|
|
|
|||
|
|
@ -2,7 +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/. */
|
||||
|
||||
import { actionCreators as ac } from "common/Actions.jsm";
|
||||
import { actionCreators as ac } from "common/Actions.sys.mjs";
|
||||
import { LinkMenu } from "content-src/components/LinkMenu/LinkMenu";
|
||||
import { ContextMenuButton } from "content-src/components/ContextMenu/ContextMenuButton";
|
||||
import { ImpressionStats } from "../../DiscoveryStreamImpressionStats/ImpressionStats";
|
||||
|
|
|
|||
|
|
@ -2,7 +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/. */
|
||||
|
||||
import { actionCreators as ac } from "common/Actions.jsm";
|
||||
import { actionCreators as ac } from "common/Actions.sys.mjs";
|
||||
import { DSDismiss } from "content-src/components/DiscoveryStreamComponents/DSDismiss/DSDismiss";
|
||||
import { DSImage } from "../DSImage/DSImage.jsx";
|
||||
import { ImpressionStats } from "../../DiscoveryStreamImpressionStats/ImpressionStats";
|
||||
|
|
|
|||
|
|
@ -2,7 +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/. */
|
||||
|
||||
import { actionCreators as ac } from "common/Actions.jsm";
|
||||
import { actionCreators as ac } from "common/Actions.sys.mjs";
|
||||
import React from "react";
|
||||
import { SafeAnchor } from "../SafeAnchor/SafeAnchor";
|
||||
import { FluentOrText } from "content-src/components/FluentOrText/FluentOrText";
|
||||
|
|
|
|||
|
|
@ -2,7 +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/. */
|
||||
|
||||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import React from "react";
|
||||
|
||||
export class SafeAnchor extends React.PureComponent {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import React from "react";
|
||||
import { actionCreators as ac } from "common/Actions.jsm";
|
||||
import { actionCreators as ac } from "common/Actions.sys.mjs";
|
||||
import { SafeAnchor } from "../SafeAnchor/SafeAnchor";
|
||||
import { ImpressionStats } from "../../DiscoveryStreamImpressionStats/ImpressionStats";
|
||||
import { connect } from "react-redux";
|
||||
|
|
|
|||
|
|
@ -2,7 +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/. */
|
||||
|
||||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { TOP_SITES_SOURCE } from "../TopSites/TopSitesConstants";
|
||||
import React from "react";
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +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/. */
|
||||
|
||||
import { actionCreators as ac } from "common/Actions.jsm";
|
||||
import { actionCreators as ac } from "common/Actions.sys.mjs";
|
||||
import { connect } from "react-redux";
|
||||
import { ContextMenu } from "content-src/components/ContextMenu/ContextMenu";
|
||||
import { LinkMenuOptions } from "content-src/lib/link-menu-options";
|
||||
|
|
|
|||
|
|
@ -5,7 +5,10 @@
|
|||
/* globals ContentSearchUIController, ContentSearchHandoffUIController */
|
||||
"use strict";
|
||||
|
||||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { connect } from "react-redux";
|
||||
import { IS_NEWTAB } from "content-src/lib/constants";
|
||||
import React from "react";
|
||||
|
|
|
|||
|
|
@ -2,7 +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/. */
|
||||
|
||||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { Card, PlaceholderCard } from "content-src/components/Card/Card";
|
||||
import { CollapsibleSection } from "content-src/components/CollapsibleSection/CollapsibleSection";
|
||||
import { ComponentPerfTimer } from "content-src/components/ComponentPerfTimer/ComponentPerfTimer";
|
||||
|
|
|
|||
|
|
@ -2,7 +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/. */
|
||||
|
||||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import React from "react";
|
||||
import { TOP_SITES_SOURCE } from "./TopSitesConstants";
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +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/. */
|
||||
|
||||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import {
|
||||
MIN_RICH_FAVICON_SIZE,
|
||||
MIN_SMALL_FAVICON_SIZE,
|
||||
|
|
|
|||
|
|
@ -2,7 +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/. */
|
||||
|
||||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { A11yLinkButton } from "content-src/components/A11yLinkButton/A11yLinkButton";
|
||||
import React from "react";
|
||||
import { TOP_SITES_SOURCE } from "./TopSitesConstants";
|
||||
|
|
|
|||
|
|
@ -2,7 +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/. */
|
||||
|
||||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import React from "react";
|
||||
|
||||
const VISIBLE = "visible";
|
||||
|
|
|
|||
|
|
@ -2,7 +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/. */
|
||||
|
||||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { MIN_RICH_FAVICON_SIZE, TOP_SITES_SOURCE } from "./TopSitesConstants";
|
||||
import { CollapsibleSection } from "content-src/components/CollapsibleSection/CollapsibleSection";
|
||||
import { ComponentPerfTimer } from "content-src/components/ComponentPerfTimer/ComponentPerfTimer";
|
||||
|
|
|
|||
|
|
@ -2,7 +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/. */
|
||||
|
||||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { perfService as perfSvc } from "content-src/lib/perf-service";
|
||||
|
||||
const VISIBLE = "visible";
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import {
|
|||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
actionUtils as au,
|
||||
} from "common/Actions.jsm";
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { applyMiddleware, combineReducers, createStore } from "redux";
|
||||
|
||||
export const MERGE_STORE_ACTION = "NEW_TAB_INITIAL_STATE";
|
||||
|
|
|
|||
|
|
@ -2,7 +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/. */
|
||||
|
||||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
|
||||
const _OpenInPrivateWindow = site => ({
|
||||
id: "newtab-menu-open-new-private-window",
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -43,8 +43,8 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||
XPCOMUtils.defineLazyServiceGetters(lazy, {
|
||||
BrowserHandler: ["@mozilla.org/browser/clh;1", "nsIBrowserHandler"],
|
||||
});
|
||||
const { actionCreators: ac } = ChromeUtils.import(
|
||||
"resource://activity-stream/common/Actions.jsm"
|
||||
const { actionCreators: ac } = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/common/Actions.sys.mjs"
|
||||
);
|
||||
|
||||
const { CFRMessageProvider } = ChromeUtils.import(
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ const { ASRouterPreferences } = ChromeUtils.import(
|
|||
"resource://activity-stream/lib/ASRouterPreferences.jsm"
|
||||
);
|
||||
|
||||
const { MESSAGE_TYPE_HASH: msg } = ChromeUtils.import(
|
||||
"resource://activity-stream/common/ActorConstants.jsm"
|
||||
const { MESSAGE_TYPE_HASH: msg } = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/common/ActorConstants.sys.mjs"
|
||||
);
|
||||
|
||||
class ASRouterParentProcessMessageHandler {
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
const { actionTypes: at, actionCreators: ac } = ChromeUtils.import(
|
||||
"resource://activity-stream/common/Actions.jsm"
|
||||
const { actionTypes: at, actionCreators: ac } = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/common/Actions.sys.mjs"
|
||||
);
|
||||
|
||||
const HTML_NS = "http://www.w3.org/1999/xhtml";
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
|
||||
// NB: Eagerly load modules that will be loaded/constructed/initialized in the
|
||||
// common case to avoid the overhead of wrapping and detecting lazy loading.
|
||||
const { actionCreators: ac, actionTypes: at } = ChromeUtils.import(
|
||||
"resource://activity-stream/common/Actions.jsm"
|
||||
const { actionCreators: ac, actionTypes: at } = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/common/Actions.sys.mjs"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
|
|
|
|||
|
|
@ -26,7 +26,9 @@ const {
|
|||
actionCreators: ac,
|
||||
actionTypes: at,
|
||||
actionUtils: au,
|
||||
} = ChromeUtils.import("resource://activity-stream/common/Actions.jsm");
|
||||
} = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/common/Actions.sys.mjs"
|
||||
);
|
||||
|
||||
const ABOUT_NEW_TAB_URL = "about:newtab";
|
||||
const ABOUT_HOME_URL = "about:home";
|
||||
|
|
@ -47,7 +49,7 @@ class ActivityStreamMessageChannel {
|
|||
* ActivityStreamMessageChannel - This module connects a Redux store to a RemotePageManager in Firefox.
|
||||
* Call .createChannel to start the connection, and .destroyChannel to destroy it.
|
||||
* You should use the BroadcastToContent, AlsoToOneContent, and AlsoToMain action creators
|
||||
* in common/Actions.jsm to help you create actions that will be automatically routed
|
||||
* in common/Actions.sys.mjs to help you create actions that will be automatically routed
|
||||
* to the correct location.
|
||||
*
|
||||
* @param {object} options
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ ChromeUtils.defineModuleGetter(
|
|||
const { setTimeout, clearTimeout } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Timer.sys.mjs"
|
||||
);
|
||||
const { actionTypes: at, actionCreators: ac } = ChromeUtils.import(
|
||||
"resource://activity-stream/common/Actions.jsm"
|
||||
const { actionTypes: at, actionCreators: ac } = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/common/Actions.sys.mjs"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
|
|
|
|||
|
|
@ -2,8 +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 { actionTypes: at } = ChromeUtils.import(
|
||||
"resource://activity-stream/common/Actions.jsm"
|
||||
const { actionTypes: at } = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/common/Actions.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
"use strict";
|
||||
|
||||
const { actionTypes: at } = ChromeUtils.import(
|
||||
"resource://activity-stream/common/Actions.jsm"
|
||||
const { actionTypes: at } = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/common/Actions.sys.mjs"
|
||||
);
|
||||
const { getDomain } = ChromeUtils.import(
|
||||
"resource://activity-stream/lib/TippyTopProvider.jsm"
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
"use strict";
|
||||
|
||||
const { actionTypes: at } = ChromeUtils.import(
|
||||
"resource://activity-stream/common/Actions.jsm"
|
||||
const { actionTypes: at } = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/common/Actions.sys.mjs"
|
||||
);
|
||||
|
||||
const { shortURL } = ChromeUtils.import(
|
||||
|
|
@ -17,8 +17,8 @@ const {
|
|||
TOP_SITES_DEFAULT_ROWS,
|
||||
TOP_SITES_MAX_SITES_PER_ROW,
|
||||
} = ChromeUtils.import("resource://activity-stream/common/Reducers.jsm");
|
||||
const { Dedupe } = ChromeUtils.import(
|
||||
"resource://activity-stream/common/Dedupe.jsm"
|
||||
const { Dedupe } = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/common/Dedupe.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
"use strict";
|
||||
|
||||
const { actionCreators: ac, actionTypes: at } = ChromeUtils.import(
|
||||
"resource://activity-stream/common/Actions.jsm"
|
||||
const { actionCreators: ac, actionTypes: at } = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/common/Actions.sys.mjs"
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -11,7 +11,9 @@ const {
|
|||
actionCreators: ac,
|
||||
actionTypes: at,
|
||||
actionUtils: au,
|
||||
} = ChromeUtils.import("resource://activity-stream/common/Actions.jsm");
|
||||
} = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/common/Actions.sys.mjs"
|
||||
);
|
||||
const { shortURL } = ChromeUtils.import(
|
||||
"resource://activity-stream/lib/ShortURL.jsm"
|
||||
);
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
"use strict";
|
||||
|
||||
const { actionCreators: ac, actionTypes: at } = ChromeUtils.import(
|
||||
"resource://activity-stream/common/Actions.jsm"
|
||||
const { actionCreators: ac, actionTypes: at } = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/common/Actions.sys.mjs"
|
||||
);
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||
"resource://activity-stream/lib/PersonalityProvider/PersonalityProvider.jsm",
|
||||
});
|
||||
|
||||
const { actionTypes: at, actionCreators: ac } = ChromeUtils.import(
|
||||
"resource://activity-stream/common/Actions.jsm"
|
||||
const { actionTypes: at, actionCreators: ac } = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/common/Actions.sys.mjs"
|
||||
);
|
||||
const PREF_PERSONALIZATION_MODEL_KEYS =
|
||||
"discoverystream.personalization.modelKeys";
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ const { EventEmitter } = ChromeUtils.importESModule(
|
|||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
const { actionCreators: ac, actionTypes: at } = ChromeUtils.import(
|
||||
"resource://activity-stream/common/Actions.jsm"
|
||||
const { actionCreators: ac, actionTypes: at } = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/common/Actions.sys.mjs"
|
||||
);
|
||||
const { getDefaultOptions } = ChromeUtils.import(
|
||||
"resource://activity-stream/lib/ActivityStreamStorage.jsm"
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
"use strict";
|
||||
|
||||
const { actionTypes: at } = ChromeUtils.import(
|
||||
"resource://activity-stream/common/Actions.jsm"
|
||||
const { actionTypes: at } = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/common/Actions.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@
|
|||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
const { MESSAGE_TYPE_HASH: msg } = ChromeUtils.import(
|
||||
"resource://activity-stream/common/ActorConstants.jsm"
|
||||
const { MESSAGE_TYPE_HASH: msg } = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/common/ActorConstants.sys.mjs"
|
||||
);
|
||||
|
||||
const { actionTypes: at, actionUtils: au } = ChromeUtils.import(
|
||||
"resource://activity-stream/common/Actions.jsm"
|
||||
const { actionTypes: at, actionUtils: au } = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/common/Actions.sys.mjs"
|
||||
);
|
||||
const { Prefs } = ChromeUtils.import(
|
||||
"resource://activity-stream/lib/ActivityStreamPrefs.jsm"
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
|
|||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const { actionCreators: ac, actionTypes: at } = ChromeUtils.import(
|
||||
"resource://activity-stream/common/Actions.jsm"
|
||||
const { actionCreators: ac, actionTypes: at } = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/common/Actions.sys.mjs"
|
||||
);
|
||||
const { TippyTopProvider } = ChromeUtils.import(
|
||||
"resource://activity-stream/lib/TippyTopProvider.jsm"
|
||||
|
|
@ -16,8 +16,8 @@ const { TippyTopProvider } = ChromeUtils.import(
|
|||
const { insertPinned, TOP_SITES_MAX_SITES_PER_ROW } = ChromeUtils.import(
|
||||
"resource://activity-stream/common/Reducers.jsm"
|
||||
);
|
||||
const { Dedupe } = ChromeUtils.import(
|
||||
"resource://activity-stream/common/Dedupe.jsm"
|
||||
const { Dedupe } = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/common/Dedupe.sys.mjs"
|
||||
);
|
||||
const { shortURL } = ChromeUtils.import(
|
||||
"resource://activity-stream/lib/ShortURL.jsm"
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
"use strict";
|
||||
|
||||
const { actionTypes: at, actionCreators: ac } = ChromeUtils.import(
|
||||
"resource://activity-stream/common/Actions.jsm"
|
||||
const { actionTypes: at, actionCreators: ac } = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/common/Actions.sys.mjs"
|
||||
);
|
||||
const { Prefs } = ChromeUtils.import(
|
||||
"resource://activity-stream/lib/ActivityStreamPrefs.jsm"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
import { CONTENT_MESSAGE_TYPE, MAIN_MESSAGE_TYPE } from "common/Actions.jsm";
|
||||
import {
|
||||
CONTENT_MESSAGE_TYPE,
|
||||
MAIN_MESSAGE_TYPE,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import Joi from "joi-browser";
|
||||
|
||||
export const baseKeys = {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*eslint max-nested-callbacks: ["error", 10]*/
|
||||
import { ASRouterChild } from "actors/ASRouterChild.jsm";
|
||||
import { MESSAGE_TYPE_HASH as msg } from "common/ActorConstants.jsm";
|
||||
import { MESSAGE_TYPE_HASH as msg } from "common/ActorConstants.sys.mjs";
|
||||
import { GlobalOverrider } from "test/unit/utils";
|
||||
|
||||
describe("ASRouterChild", () => {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { ASRouterParent } from "actors/ASRouterParent.jsm";
|
||||
import { MESSAGE_TYPE_HASH as msg } from "common/ActorConstants.jsm";
|
||||
import { MESSAGE_TYPE_HASH as msg } from "common/ActorConstants.sys.mjs";
|
||||
|
||||
describe("ASRouterParent", () => {
|
||||
let asRouterParent = null;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { ASRouterParentProcessMessageHandler } from "lib/ASRouterParentProcessMessageHandler.jsm";
|
||||
import { _ASRouter } from "lib/ASRouter.jsm";
|
||||
import { MESSAGE_TYPE_HASH as msg } from "common/ActorConstants.jsm";
|
||||
import { MESSAGE_TYPE_HASH as msg } from "common/ActorConstants.sys.mjs";
|
||||
|
||||
describe("ASRouterParentProcessMessageHandler", () => {
|
||||
let handler = null;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import {
|
|||
MAIN_MESSAGE_TYPE,
|
||||
PRELOAD_MESSAGE_TYPE,
|
||||
UI_CODE,
|
||||
} from "common/Actions.jsm";
|
||||
} from "common/Actions.sys.mjs";
|
||||
|
||||
describe("Actions", () => {
|
||||
it("should set globalImportContext to UI_CODE", () => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Dedupe } from "common/Dedupe.jsm";
|
||||
import { Dedupe } from "common/Dedupe.sys.mjs";
|
||||
|
||||
describe("Dedupe", () => {
|
||||
let instance;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ const {
|
|||
Search,
|
||||
ASRouter,
|
||||
} = reducers;
|
||||
import { actionTypes as at } from "common/Actions.jsm";
|
||||
import { actionTypes as at } from "common/Actions.sys.mjs";
|
||||
|
||||
describe("Reducers", () => {
|
||||
describe("App", () => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import {
|
||||
ASRouterAdminInner,
|
||||
CollapseToggle,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import { ErrorBoundary } from "content-src/components/ErrorBoundary/ErrorBoundar
|
|||
import React from "react";
|
||||
import { Search } from "content-src/components/Search/Search";
|
||||
import { shallow } from "enzyme";
|
||||
import { actionCreators as ac } from "common/Actions.jsm";
|
||||
import { actionCreators as ac } from "common/Actions.sys.mjs";
|
||||
|
||||
describe("<Base>", () => {
|
||||
let DEFAULT_PROPS = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import {
|
||||
_Card as Card,
|
||||
PlaceholderCard,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { ComponentPerfTimer } from "content-src/components/ComponentPerfTimer/ComponentPerfTimer";
|
||||
import createMockRaf from "mock-raf";
|
||||
import React from "react";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { _ConfirmDialog as ConfirmDialog } from "content-src/components/ConfirmDialog/ConfirmDialog";
|
||||
import React from "react";
|
||||
import { shallow } from "enzyme";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { actionCreators as ac } from "common/Actions.jsm";
|
||||
import { actionCreators as ac } from "common/Actions.sys.mjs";
|
||||
import { ContentSection } from "content-src/components/CustomizeMenu/ContentSection/ContentSection";
|
||||
import { mount } from "enzyme";
|
||||
import React from "react";
|
||||
|
|
|
|||
|
|
@ -12,7 +12,10 @@ import {
|
|||
PlaceholderDSCard,
|
||||
} from "content-src/components/DiscoveryStreamComponents/DSCard/DSCard";
|
||||
import { TopicsWidget } from "content-src/components/DiscoveryStreamComponents/TopicsWidget/TopicsWidget";
|
||||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import React from "react";
|
||||
import { shallow, mount } from "enzyme";
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,10 @@ import {
|
|||
StatusMessage,
|
||||
SponsorLabel,
|
||||
} from "content-src/components/DiscoveryStreamComponents/DSContextFooter/DSContextFooter";
|
||||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { DSLinkMenu } from "content-src/components/DiscoveryStreamComponents/DSLinkMenu/DSLinkMenu";
|
||||
import React from "react";
|
||||
import { INITIAL_STATE } from "common/Reducers.jsm";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { DSPrivacyModal } from "content-src/components/DiscoveryStreamComponents/DSPrivacyModal/DSPrivacyModal";
|
||||
import { shallow, mount } from "enzyme";
|
||||
import { actionCreators as ac } from "common/Actions.jsm";
|
||||
import { actionCreators as ac } from "common/Actions.sys.mjs";
|
||||
import React from "react";
|
||||
|
||||
describe("Discovery Stream <DSPrivacyModal>", () => {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import {
|
|||
ImpressionStats,
|
||||
INTERSECTION_RATIO,
|
||||
} from "content-src/components/DiscoveryStreamImpressionStats/ImpressionStats";
|
||||
import { actionTypes as at } from "common/Actions.jsm";
|
||||
import { actionTypes as at } from "common/Actions.sys.mjs";
|
||||
import React from "react";
|
||||
import { shallow } from "enzyme";
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,10 @@ import {
|
|||
TopicsWidget,
|
||||
} from "content-src/components/DiscoveryStreamComponents/TopicsWidget/TopicsWidget";
|
||||
import { SafeAnchor } from "content-src/components/DiscoveryStreamComponents/SafeAnchor/SafeAnchor";
|
||||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { mount } from "enzyme";
|
||||
import React from "react";
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import {
|
|||
SectionIntl,
|
||||
_Sections as Sections,
|
||||
} from "content-src/components/Sections/Sections";
|
||||
import { actionTypes as at } from "common/Actions.jsm";
|
||||
import { actionTypes as at } from "common/Actions.sys.mjs";
|
||||
import { mount, shallow } from "enzyme";
|
||||
import { PlaceholderCard } from "content-src/components/Card/Card";
|
||||
import { PocketLoggedInCta } from "content-src/components/PocketLoggedInCta/PocketLoggedInCta";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { GlobalOverrider } from "test/unit/utils";
|
||||
import { MIN_RICH_FAVICON_SIZE } from "content-src/components/TopSites/TopSitesConstants";
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import {
|
|||
TopSiteImpressionWrapper,
|
||||
INTERSECTION_RATIO,
|
||||
} from "content-src/components/TopSites/TopSiteImpressionWrapper";
|
||||
import { actionTypes as at } from "common/Actions.jsm";
|
||||
import { actionTypes as at } from "common/Actions.sys.mjs";
|
||||
import React from "react";
|
||||
import { shallow } from "enzyme";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { DetectUserSessionStart } from "content-src/lib/detect-user-session-start";
|
||||
|
||||
describe("detectUserSessionStart", () => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { addNumberReducer, GlobalOverrider } from "test/unit/utils";
|
||||
import {
|
||||
EARLY_QUEUED_ACTIONS,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { combineReducers, createStore } from "redux";
|
||||
import { actionTypes as at } from "common/Actions.jsm";
|
||||
import { actionTypes as at } from "common/Actions.sys.mjs";
|
||||
import { GlobalOverrider } from "test/unit/utils";
|
||||
import { reducers } from "common/Reducers.jsm";
|
||||
import { selectLayoutRender } from "content-src/lib/selectLayoutRender";
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@ import {
|
|||
AboutPreferences,
|
||||
PREFERENCES_LOADED_EVENT,
|
||||
} from "lib/AboutPreferences.jsm";
|
||||
import { actionTypes as at, actionCreators as ac } from "common/Actions.jsm";
|
||||
import {
|
||||
actionTypes as at,
|
||||
actionCreators as ac,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { GlobalOverrider } from "test/unit/utils";
|
||||
|
||||
describe("AboutPreferences Feed", () => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { CONTENT_MESSAGE_TYPE } from "common/Actions.jsm";
|
||||
import { CONTENT_MESSAGE_TYPE } from "common/Actions.sys.mjs";
|
||||
import { ActivityStream, PREFS_CONFIG } from "lib/ActivityStream.jsm";
|
||||
import { GlobalOverrider } from "test/unit/utils";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import {
|
||||
ActivityStreamMessageChannel,
|
||||
DEFAULT_OPTIONS,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import {
|
|||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
actionUtils as au,
|
||||
} from "common/Actions.jsm";
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { combineReducers, createStore } from "redux";
|
||||
import { GlobalOverrider } from "test/unit/utils";
|
||||
import { DiscoveryStreamFeed } from "lib/DiscoveryStreamFeed.jsm";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { actionTypes as at } from "common/Actions.jsm";
|
||||
import { actionTypes as at } from "common/Actions.sys.mjs";
|
||||
import { DownloadsManager } from "lib/DownloadsManager.jsm";
|
||||
import { GlobalOverrider } from "test/unit/utils";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
"use strict";
|
||||
import { FaviconFeed, fetchIconFromRedirects } from "lib/FaviconFeed.jsm";
|
||||
import { actionTypes as at } from "common/Actions.jsm";
|
||||
import { actionTypes as at } from "common/Actions.sys.mjs";
|
||||
import { GlobalOverrider } from "test/unit/utils";
|
||||
|
||||
const FAKE_ENDPOINT = "https://foo.com/";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
import { actionTypes as at } from "common/Actions.jsm";
|
||||
import { Dedupe } from "common/Dedupe.jsm";
|
||||
import { actionTypes as at } from "common/Actions.sys.mjs";
|
||||
import { Dedupe } from "common/Dedupe.sys.mjs";
|
||||
import { GlobalOverrider } from "test/unit/utils";
|
||||
import injector from "inject!lib/HighlightsFeed.jsm";
|
||||
import { Screenshots } from "lib/Screenshots.jsm";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { NewTabInit } from "lib/NewTabInit.jsm";
|
||||
|
||||
describe("NewTabInit", () => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { GlobalOverrider } from "test/unit/utils";
|
||||
import injector from "inject!lib/PlacesFeed.jsm";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { GlobalOverrider } from "test/unit/utils";
|
||||
import { PrefsFeed } from "lib/PrefsFeed.jsm";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { RecommendationProvider } from "lib/RecommendationProvider.jsm";
|
||||
import { combineReducers, createStore } from "redux";
|
||||
import { reducers } from "common/Reducers.jsm";
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import {
|
|||
CONTENT_MESSAGE_TYPE,
|
||||
MAIN_MESSAGE_TYPE,
|
||||
PRELOAD_MESSAGE_TYPE,
|
||||
} from "common/Actions.jsm";
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { EventEmitter, GlobalOverrider } from "test/unit/utils";
|
||||
import { SectionsFeed, SectionsManager } from "lib/SectionsManager.jsm";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { SYSTEM_TICK_INTERVAL, SystemTickFeed } from "lib/SystemTickFeed.jsm";
|
||||
import { actionTypes as at } from "common/Actions.jsm";
|
||||
import { actionTypes as at } from "common/Actions.sys.mjs";
|
||||
|
||||
describe("System Tick Feed", () => {
|
||||
let instance;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import {
|
|||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
actionUtils as au,
|
||||
} from "common/Actions.jsm";
|
||||
} from "common/Actions.sys.mjs";
|
||||
import {
|
||||
ASRouterEventPing,
|
||||
BasePing,
|
||||
|
|
@ -14,7 +14,7 @@ import {
|
|||
import { FakePrefs, GlobalOverrider } from "test/unit/utils";
|
||||
import { ASRouterPreferences } from "lib/ASRouterPreferences.jsm";
|
||||
import injector from "inject!lib/TelemetryFeed.jsm";
|
||||
import { MESSAGE_TYPE_HASH as msg } from "common/ActorConstants.jsm";
|
||||
import { MESSAGE_TYPE_HASH as msg } from "common/ActorConstants.sys.mjs";
|
||||
|
||||
const FAKE_UUID = "{foo-123-foo}";
|
||||
const FAKE_ROUTER_MESSAGE_PROVIDER = [{ id: "cfr", enabled: true }];
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
"use strict";
|
||||
|
||||
import { actionCreators as ac, actionTypes as at } from "common/Actions.jsm";
|
||||
import {
|
||||
actionCreators as ac,
|
||||
actionTypes as at,
|
||||
} from "common/Actions.sys.mjs";
|
||||
import { FakePrefs, GlobalOverrider } from "test/unit/utils";
|
||||
import {
|
||||
insertPinned,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { FakePrefs, GlobalOverrider } from "test/unit/utils";
|
||||
import { actionTypes as at } from "common/Actions.jsm";
|
||||
import { actionTypes as at } from "common/Actions.sys.mjs";
|
||||
import injector from "inject!lib/TopStoriesFeed.jsm";
|
||||
|
||||
describe("Top Stories Feed", () => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue