forked from mirrors/gecko-dev
Bug 1669956 - [devtools] Enable eslint for devtools/client/shared/components/reps. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D93370
This commit is contained in:
parent
15547ae76c
commit
cd1c9e51c2
157 changed files with 1029 additions and 439 deletions
|
|
@ -66,9 +66,6 @@ devtools/client/debugger/images/
|
|||
devtools/client/debugger/test/
|
||||
devtools/client/debugger/index.html
|
||||
|
||||
# Ignore devtools imported repositories
|
||||
devtools/client/shared/components/reps/
|
||||
|
||||
# Ignore devtools preferences files
|
||||
devtools/client/preferences/
|
||||
|
||||
|
|
|
|||
|
|
@ -2,16 +2,23 @@
|
|||
* 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 { MODE } = require("./reps/constants");
|
||||
const { REPS, getRep } = require("./reps/rep");
|
||||
const objectInspector = require("./object-inspector/index");
|
||||
"use strict";
|
||||
|
||||
const {
|
||||
MODE,
|
||||
} = require("devtools/client/shared/components/reps/reps/constants");
|
||||
const {
|
||||
REPS,
|
||||
getRep,
|
||||
} = require("devtools/client/shared/components/reps/reps/rep");
|
||||
const objectInspector = require("devtools/client/shared/components/reps/object-inspector/index");
|
||||
|
||||
const {
|
||||
parseURLEncodedText,
|
||||
parseURLParams,
|
||||
maybeEscapePropertyName,
|
||||
getGripPreviewItems,
|
||||
} = require("./reps/rep-utils");
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
|
||||
module.exports = {
|
||||
REPS,
|
||||
|
|
|
|||
|
|
@ -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/>. */
|
||||
|
||||
const { loadItemProperties } = require("./utils/load-properties");
|
||||
const { loadItemProperties } = require("devtools/client/shared/components/reps/object-inspector/utils/load-properties");
|
||||
const {
|
||||
getPathExpression,
|
||||
getParentFront,
|
||||
|
|
@ -10,8 +10,8 @@ const {
|
|||
getValue,
|
||||
nodeIsBucket,
|
||||
getFront,
|
||||
} = require("./utils/node");
|
||||
const { getLoadedProperties, getWatchpoints } = require("./reducer");
|
||||
} = require("devtools/client/shared/components/reps/object-inspector/utils/node");
|
||||
const { getLoadedProperties, getWatchpoints } = require("devtools/client/shared/components/reps/object-inspector/reducer");
|
||||
|
||||
/**
|
||||
* This action is responsible for expanding a given node, which also means that
|
||||
|
|
|
|||
|
|
@ -8,17 +8,17 @@ const {
|
|||
createElement,
|
||||
} = require("devtools/client/shared/vendor/react");
|
||||
const { connect } = require("devtools/client/shared/vendor/react-redux");
|
||||
const actions = require("../actions");
|
||||
const actions = require("devtools/client/shared/components/reps/object-inspector/actions");
|
||||
|
||||
const selectors = require("../reducer");
|
||||
const selectors = require("devtools/client/shared/components/reps/object-inspector/reducer");
|
||||
|
||||
import Components from "devtools-components";
|
||||
const Tree = createFactory(Components.Tree);
|
||||
require("./ObjectInspector.css");
|
||||
require("devtools/client/shared/components/reps/object-inspector/components/ObjectInspector.css");
|
||||
|
||||
const ObjectInspectorItem = createFactory(require("./ObjectInspectorItem"));
|
||||
const ObjectInspectorItem = createFactory(require("devtools/client/shared/components/reps/object-inspector/components/ObjectInspectorItem"));
|
||||
|
||||
const Utils = require("../utils/index");
|
||||
const Utils = require("devtools/client/shared/components/reps/object-inspector/utils/index");
|
||||
const { renderRep, shouldRenderRootsInReps } = Utils;
|
||||
const {
|
||||
getChildrenWithEvaluations,
|
||||
|
|
|
|||
|
|
@ -8,9 +8,11 @@ const dom = require("devtools/client/shared/vendor/react-dom-factories");
|
|||
const Services = require("Services");
|
||||
const isMacOS = Services.appinfo.OS === "Darwin";
|
||||
|
||||
const { MODE } = require("../../reps/constants");
|
||||
const {
|
||||
MODE,
|
||||
} = require("devtools/client/shared/components/reps/reps/constants");
|
||||
|
||||
const Utils = require("../utils/index");
|
||||
const Utils = require("devtools/client/shared/components/reps/object-inspector/utils/index");
|
||||
|
||||
const {
|
||||
getValue,
|
||||
|
|
|
|||
|
|
@ -2,9 +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/>. */
|
||||
|
||||
const ObjectInspector = require("./components/ObjectInspector");
|
||||
const utils = require("./utils/index");
|
||||
const reducer = require("./reducer");
|
||||
const actions = require("./actions");
|
||||
const ObjectInspector = require("devtools/client/shared/components/reps/object-inspector/components/ObjectInspector");
|
||||
const utils = require("devtools/client/shared/components/reps/object-inspector/utils/index");
|
||||
const reducer = require("devtools/client/shared/components/reps/object-inspector/reducer");
|
||||
const actions = require("devtools/client/shared/components/reps/object-inspector/actions");
|
||||
|
||||
module.exports = { ObjectInspector, utils, actions, reducer };
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
env: {
|
||||
jest: true,
|
||||
},
|
||||
};
|
||||
|
|
@ -2,9 +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/>. */
|
||||
|
||||
const { mountObjectInspector } = require("../test-utils");
|
||||
const { mountObjectInspector } = require("devtools/client/shared/components/reps/object-inspector/tests/test-utils");
|
||||
const { mount } = require("enzyme");
|
||||
const { createNode, NODE_TYPES } = require("../../utils/node");
|
||||
const { createNode, NODE_TYPES } = require("devtools/client/shared/components/reps/object-inspector/utils/node");
|
||||
const repsPath = "../../../reps";
|
||||
const { MODE } = require(`${repsPath}/constants`);
|
||||
const { Rep } = require(`${repsPath}/rep`);
|
||||
|
|
@ -12,8 +12,8 @@ const {
|
|||
formatObjectInspector,
|
||||
waitForDispatch,
|
||||
waitForLoadedProperties,
|
||||
} = require("../test-utils");
|
||||
const ObjectFront = require("../__mocks__/object-front");
|
||||
} = require("devtools/client/shared/components/reps/object-inspector/tests/test-utils");
|
||||
const ObjectFront = require("devtools/client/shared/components/reps/object-inspector/tests/__mocks__/object-front");
|
||||
const gripRepStubs = require(`${repsPath}/stubs/grip`);
|
||||
|
||||
function generateDefaults(overrides) {
|
||||
|
|
|
|||
|
|
@ -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 ObjectFront = require("../__mocks__/object-front");
|
||||
const { mountObjectInspector } = require("../test-utils");
|
||||
const ObjectFront = require("devtools/client/shared/components/reps/object-inspector/tests/__mocks__/object-front");
|
||||
const { mountObjectInspector } = require("devtools/client/shared/components/reps/object-inspector/tests/test-utils");
|
||||
|
||||
function generateDefaults(overrides) {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
/* global jest */
|
||||
|
||||
const { mountObjectInspector } = require("../test-utils");
|
||||
const ObjectFront = require("../__mocks__/object-front");
|
||||
const { LongStringFront } = require("../__mocks__/string-front");
|
||||
const { mountObjectInspector } = require("devtools/client/shared/components/reps/object-inspector/tests/test-utils");
|
||||
const ObjectFront = require("devtools/client/shared/components/reps/object-inspector/tests/__mocks__/object-front");
|
||||
const { LongStringFront } = require("devtools/client/shared/components/reps/object-inspector/tests/__mocks__/string-front");
|
||||
|
||||
const repsPath = "../../../reps";
|
||||
const longStringStubs = require(`${repsPath}/stubs/long-string`);
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@
|
|||
|
||||
/* global jest */
|
||||
|
||||
const { mountObjectInspector } = require("../test-utils");
|
||||
const ObjectFront = require("../__mocks__/object-front");
|
||||
const { mountObjectInspector } = require("devtools/client/shared/components/reps/object-inspector/tests/test-utils");
|
||||
const ObjectFront = require("devtools/client/shared/components/reps/object-inspector/tests/__mocks__/object-front");
|
||||
|
||||
const {
|
||||
createNode,
|
||||
makeNodesForEntries,
|
||||
makeNumericalBuckets,
|
||||
} = require("../../utils/node");
|
||||
} = require("devtools/client/shared/components/reps/object-inspector/utils/node");
|
||||
|
||||
const repsPath = "../../../reps";
|
||||
const gripRepStubs = require(`${repsPath}/stubs/grip`);
|
||||
|
|
|
|||
|
|
@ -4,16 +4,16 @@
|
|||
|
||||
/* global jest */
|
||||
|
||||
const { mountObjectInspector } = require("../test-utils");
|
||||
const { MODE } = require("../../../reps/constants");
|
||||
const { mountObjectInspector } = require("devtools/client/shared/components/reps/object-inspector/tests/test-utils");
|
||||
const { MODE } = require("devtools/client/shared/components/reps/reps/constants");
|
||||
const {
|
||||
formatObjectInspector,
|
||||
waitForDispatch,
|
||||
waitForLoadedProperties,
|
||||
} = require("../test-utils");
|
||||
const gripMapRepStubs = require("../../../reps/stubs/grip-map");
|
||||
const mapStubs = require("../../stubs/map");
|
||||
const ObjectFront = require("../__mocks__/object-front");
|
||||
} = require("devtools/client/shared/components/reps/object-inspector/tests/test-utils");
|
||||
const gripMapRepStubs = require("devtools/client/shared/components/reps/reps/stubs/grip-map");
|
||||
const mapStubs = require("devtools/client/shared/components/reps/object-inspector/stubs/map");
|
||||
const ObjectFront = require("devtools/client/shared/components/reps/object-inspector/tests/__mocks__/object-front");
|
||||
|
||||
function generateDefaults(overrides) {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
|
||||
|
||||
/* global jest */
|
||||
const { mountObjectInspector } = require("../test-utils");
|
||||
const { mountObjectInspector } = require("devtools/client/shared/components/reps/object-inspector/tests/test-utils");
|
||||
|
||||
const gripRepStubs = require("../../../reps/stubs/grip");
|
||||
const ObjectFront = require("../__mocks__/object-front");
|
||||
const gripRepStubs = require("devtools/client/shared/components/reps/reps/stubs/grip");
|
||||
const ObjectFront = require("devtools/client/shared/components/reps/object-inspector/tests/__mocks__/object-front");
|
||||
|
||||
function generateDefaults(overrides) {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -1,22 +1,22 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* 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 { mountObjectInspector } = require("../test-utils");
|
||||
const { mountObjectInspector } = require("devtools/client/shared/components/reps/object-inspector/tests/test-utils");
|
||||
|
||||
const repsPath = "../../../reps";
|
||||
const { MODE } = require(`${repsPath}/constants`);
|
||||
const ObjectFront = require("../__mocks__/object-front");
|
||||
const ObjectFront = require("devtools/client/shared/components/reps/object-inspector/tests/__mocks__/object-front");
|
||||
const gripRepStubs = require(`${repsPath}/stubs/grip`);
|
||||
const gripPropertiesStubs = require("../../stubs/grip");
|
||||
const gripPropertiesStubs = require("devtools/client/shared/components/reps/object-inspector/stubs/grip");
|
||||
const {
|
||||
formatObjectInspector,
|
||||
storeHasExactExpandedPaths,
|
||||
storeHasExpandedPath,
|
||||
storeHasLoadedProperty,
|
||||
waitForDispatch,
|
||||
} = require("../test-utils");
|
||||
const { createNode, NODE_TYPES } = require("../../utils/node");
|
||||
const { getExpandedPaths } = require("../../reducer");
|
||||
} = require("devtools/client/shared/components/reps/object-inspector/tests/test-utils");
|
||||
const { createNode, NODE_TYPES } = require("devtools/client/shared/components/reps/object-inspector/utils/node");
|
||||
const { getExpandedPaths } = require("devtools/client/shared/components/reps/object-inspector/reducer");
|
||||
|
||||
const protoStub = {
|
||||
prototype: {
|
||||
|
|
@ -48,7 +48,7 @@ function generateDefaults(overrides) {
|
|||
...overrides,
|
||||
};
|
||||
}
|
||||
const { LongStringFront } = require("../__mocks__/string-front");
|
||||
const { LongStringFront } = require("devtools/client/shared/components/reps/object-inspector/tests/__mocks__/string-front");
|
||||
|
||||
function getClient(overrides = {}) {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -2,12 +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 { mountObjectInspector } = require("../test-utils");
|
||||
const { MODE } = require("../../../reps/constants");
|
||||
const { createNode } = require("../../utils/node");
|
||||
const { mountObjectInspector } = require("devtools/client/shared/components/reps/object-inspector/tests/test-utils");
|
||||
const { MODE } = require("devtools/client/shared/components/reps/reps/constants");
|
||||
const { createNode } = require("devtools/client/shared/components/reps/object-inspector/utils/node");
|
||||
|
||||
const functionStubs = require("../../../reps/stubs/function");
|
||||
const ObjectFront = require("../__mocks__/object-front");
|
||||
const functionStubs = require("devtools/client/shared/components/reps/reps/stubs/function");
|
||||
const ObjectFront = require("devtools/client/shared/components/reps/object-inspector/tests/__mocks__/object-front");
|
||||
|
||||
function generateDefaults(overrides) {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -2,16 +2,16 @@
|
|||
* 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 { MODE } = require("../../../reps/constants");
|
||||
const { MODE } = require("devtools/client/shared/components/reps/reps/constants");
|
||||
const {
|
||||
formatObjectInspector,
|
||||
waitForLoadedProperties,
|
||||
mountObjectInspector,
|
||||
} = require("../test-utils");
|
||||
} = require("devtools/client/shared/components/reps/object-inspector/tests/test-utils");
|
||||
|
||||
const { makeNodesForProperties } = require("../../utils/node");
|
||||
const accessorStubs = require("../../../reps/stubs/accessor");
|
||||
const ObjectFront = require("../__mocks__/object-front");
|
||||
const { makeNodesForProperties } = require("devtools/client/shared/components/reps/object-inspector/utils/node");
|
||||
const accessorStubs = require("devtools/client/shared/components/reps/reps/stubs/accessor");
|
||||
const ObjectFront = require("devtools/client/shared/components/reps/object-inspector/tests/__mocks__/object-front");
|
||||
|
||||
function generateDefaults(overrides) {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -2,12 +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 { mountObjectInspector } = require("../test-utils");
|
||||
const { mountObjectInspector } = require("devtools/client/shared/components/reps/object-inspector/tests/test-utils");
|
||||
const repsPath = "../../../reps";
|
||||
const { MODE } = require(`${repsPath}/constants`);
|
||||
|
||||
const { formatObjectInspector, waitForDispatch } = require("../test-utils");
|
||||
const ObjectFront = require("../__mocks__/object-front");
|
||||
const { formatObjectInspector, waitForDispatch } = require("devtools/client/shared/components/reps/object-inspector/tests/test-utils");
|
||||
const ObjectFront = require("devtools/client/shared/components/reps/object-inspector/tests/__mocks__/object-front");
|
||||
const gripRepStubs = require(`${repsPath}/stubs/grip`);
|
||||
|
||||
function generateDefaults(overrides) {
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
|
||||
/* global jest */
|
||||
|
||||
const { mountObjectInspector } = require("../test-utils");
|
||||
const gripRepStubs = require("../../../reps/stubs/grip");
|
||||
const ObjectFront = require("../__mocks__/object-front");
|
||||
const { mountObjectInspector } = require("devtools/client/shared/components/reps/object-inspector/tests/test-utils");
|
||||
const gripRepStubs = require("devtools/client/shared/components/reps/reps/stubs/grip");
|
||||
const ObjectFront = require("devtools/client/shared/components/reps/object-inspector/tests/__mocks__/object-front");
|
||||
|
||||
const { formatObjectInspector } = require("../test-utils");
|
||||
const { formatObjectInspector } = require("devtools/client/shared/components/reps/object-inspector/tests/test-utils");
|
||||
|
||||
function generateDefaults(overrides) {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -3,15 +3,15 @@
|
|||
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
|
||||
|
||||
/* global jest */
|
||||
const { mountObjectInspector } = require("../test-utils");
|
||||
const { mountObjectInspector } = require("devtools/client/shared/components/reps/object-inspector/tests/test-utils");
|
||||
|
||||
const { MODE } = require("../../../reps/constants");
|
||||
const gripStubs = require("../../../reps/stubs/grip");
|
||||
const { MODE } = require("devtools/client/shared/components/reps/reps/constants");
|
||||
const gripStubs = require("devtools/client/shared/components/reps/reps/stubs/grip");
|
||||
const stub = gripStubs.get("testProxy");
|
||||
const proxySlots = gripStubs.get("testProxySlots");
|
||||
const { formatObjectInspector } = require("../test-utils");
|
||||
const { formatObjectInspector } = require("devtools/client/shared/components/reps/object-inspector/tests/test-utils");
|
||||
|
||||
const ObjectFront = require("../__mocks__/object-front");
|
||||
const ObjectFront = require("devtools/client/shared/components/reps/object-inspector/tests/__mocks__/object-front");
|
||||
function generateDefaults(overrides) {
|
||||
return {
|
||||
roots: [
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
/* global jest */
|
||||
|
||||
const { mountObjectInspector } = require("../test-utils");
|
||||
const ObjectFront = require("../__mocks__/object-front");
|
||||
const { LongStringFront } = require("../__mocks__/string-front");
|
||||
const { mountObjectInspector } = require("devtools/client/shared/components/reps/object-inspector/tests/test-utils");
|
||||
const ObjectFront = require("devtools/client/shared/components/reps/object-inspector/tests/__mocks__/object-front");
|
||||
const { LongStringFront } = require("devtools/client/shared/components/reps/object-inspector/tests/__mocks__/string-front");
|
||||
|
||||
const repsPath = "../../../reps";
|
||||
const longStringStubs = require(`${repsPath}/stubs/long-string`);
|
||||
|
|
|
|||
|
|
@ -2,11 +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 { createNode } = require("../../utils/node");
|
||||
const { waitForDispatch, mountObjectInspector } = require("../test-utils");
|
||||
const { createNode } = require("devtools/client/shared/components/reps/object-inspector/utils/node");
|
||||
const { waitForDispatch, mountObjectInspector } = require("devtools/client/shared/components/reps/object-inspector/tests/test-utils");
|
||||
|
||||
const gripWindowStubs = require("../../../reps/stubs/window");
|
||||
const ObjectFront = require("../__mocks__/object-front");
|
||||
const gripWindowStubs = require("devtools/client/shared/components/reps/reps/stubs/window");
|
||||
const ObjectFront = require("devtools/client/shared/components/reps/object-inspector/tests/__mocks__/object-front");
|
||||
const windowNode = createNode({
|
||||
name: "window",
|
||||
contents: { value: gripWindowStubs.get("Window") },
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@ const { createFactory } = require("devtools/client/shared/vendor/react");
|
|||
const { Provider } = require("devtools/client/shared/vendor/react-redux");
|
||||
const { combineReducers } = require("devtools/client/shared/vendor/redux");
|
||||
|
||||
const { thunk } = require("../../shared/redux/middleware/thunk");
|
||||
const { thunk } = require("devtools/client/shared/components/reps/shared/redux/middleware/thunk");
|
||||
const {
|
||||
waitUntilService,
|
||||
} = require("../../shared/redux/middleware/waitUntilService");
|
||||
} = require("devtools/client/shared/components/reps/shared/redux/middleware/waitUntilService");
|
||||
|
||||
/**
|
||||
* Redux store utils
|
||||
|
|
@ -20,19 +20,19 @@ const {
|
|||
|
||||
import { createStore, applyMiddleware } from "redux";
|
||||
|
||||
const objectInspector = require("../index");
|
||||
const objectInspector = require("devtools/client/shared/components/reps/object-inspector/index");
|
||||
const {
|
||||
getLoadedProperties,
|
||||
getLoadedPropertyKeys,
|
||||
getExpandedPaths,
|
||||
getExpandedPathKeys,
|
||||
} = require("../reducer");
|
||||
} = require("devtools/client/shared/components/reps/object-inspector/reducer");
|
||||
|
||||
const ObjectInspector = createFactory(objectInspector.ObjectInspector);
|
||||
|
||||
const {
|
||||
WAIT_UNTIL_TYPE,
|
||||
} = require("../../shared/redux/middleware/waitUntilService");
|
||||
} = require("devtools/client/shared/components/reps/shared/redux/middleware/waitUntilService");
|
||||
|
||||
/*
|
||||
* Takes an Enzyme wrapper (obtained with mount/shallow/…) and
|
||||
|
|
|
|||
|
|
@ -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/>. */
|
||||
|
||||
const { createNode, NODE_TYPES } = require("../../utils/node");
|
||||
const { createNode, NODE_TYPES } = require("devtools/client/shared/components/reps/object-inspector/utils/node");
|
||||
|
||||
describe("createNode", () => {
|
||||
it("returns null when contents is undefined", () => {
|
||||
|
|
|
|||
|
|
@ -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/>. */
|
||||
|
||||
const accessorStubs = require("../../../reps/stubs/accessor");
|
||||
const performanceStubs = require("../../stubs/performance");
|
||||
const gripMapStubs = require("../../../reps/stubs/grip-map");
|
||||
const gripArrayStubs = require("../../../reps/stubs/grip-array");
|
||||
const gripMapEntryStubs = require("../../../reps/stubs/grip-map-entry");
|
||||
const gripStubs = require("../../../reps/stubs/grip");
|
||||
const accessorStubs = require("devtools/client/shared/components/reps/reps/stubs/accessor");
|
||||
const performanceStubs = require("devtools/client/shared/components/reps/object-inspector/stubs/performance");
|
||||
const gripMapStubs = require("devtools/client/shared/components/reps/reps/stubs/grip-map");
|
||||
const gripArrayStubs = require("devtools/client/shared/components/reps/reps/stubs/grip-array");
|
||||
const gripMapEntryStubs = require("devtools/client/shared/components/reps/reps/stubs/grip-map-entry");
|
||||
const gripStubs = require("devtools/client/shared/components/reps/reps/stubs/grip");
|
||||
|
||||
const {
|
||||
createNode,
|
||||
getChildren,
|
||||
getValue,
|
||||
makeNodesForProperties,
|
||||
} = require("../../utils/node");
|
||||
} = require("devtools/client/shared/components/reps/object-inspector/utils/node");
|
||||
|
||||
function createRootNodeWithAccessorProperty(accessorStub) {
|
||||
const node = { name: "root", path: "rootpath" };
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ const {
|
|||
getClosestGripNode,
|
||||
makeNodesForEntries,
|
||||
makeNumericalBuckets,
|
||||
} = require("../../utils/node");
|
||||
} = require("devtools/client/shared/components/reps/object-inspector/utils/node");
|
||||
|
||||
const repsPath = "../../../reps";
|
||||
const gripRepStubs = require(`${repsPath}/stubs/grip`);
|
||||
|
|
|
|||
|
|
@ -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/>. */
|
||||
|
||||
const { getValue } = require("../../utils/node");
|
||||
const { getValue } = require("devtools/client/shared/components/reps/object-inspector/utils/node");
|
||||
|
||||
describe("getValue", () => {
|
||||
it("get the value from contents.value", () => {
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ const {
|
|||
nodeIsEntries,
|
||||
nodeIsMapEntry,
|
||||
nodeIsPrototype,
|
||||
} = require("../../utils/node");
|
||||
const gripArrayStubs = require("../../../reps/stubs/grip-array");
|
||||
} = require("devtools/client/shared/components/reps/object-inspector/utils/node");
|
||||
const gripArrayStubs = require("devtools/client/shared/components/reps/reps/stubs/grip-array");
|
||||
|
||||
const root = {
|
||||
path: "root",
|
||||
|
|
@ -227,7 +227,7 @@ describe("makeNodesForProperties", () => {
|
|||
});
|
||||
|
||||
it("object with entries", () => {
|
||||
const gripMapStubs = require("../../../reps/stubs/grip-map");
|
||||
const gripMapStubs = require("devtools/client/shared/components/reps/reps/stubs/grip-map");
|
||||
|
||||
const mapNode = createNode({
|
||||
name: "map",
|
||||
|
|
|
|||
|
|
@ -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 { createNode, makeNumericalBuckets } = require("../../utils/node");
|
||||
const gripArrayStubs = require("../../../reps/stubs/grip-array");
|
||||
const { createNode, makeNumericalBuckets } = require("devtools/client/shared/components/reps/object-inspector/utils/node");
|
||||
const gripArrayStubs = require("devtools/client/shared/components/reps/reps/stubs/grip-array");
|
||||
|
||||
describe("makeNumericalBuckets", () => {
|
||||
it("handles simple numerical buckets", () => {
|
||||
|
|
|
|||
|
|
@ -2,10 +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 gripArrayStubs = require("../../../reps/stubs/grip-array");
|
||||
const gripMapStubs = require("../../../reps/stubs/grip-map");
|
||||
const gripArrayStubs = require("devtools/client/shared/components/reps/reps/stubs/grip-array");
|
||||
const gripMapStubs = require("devtools/client/shared/components/reps/reps/stubs/grip-map");
|
||||
|
||||
const { createNode, nodeHasEntries } = require("../../utils/node");
|
||||
const { createNode, nodeHasEntries } = require("devtools/client/shared/components/reps/object-inspector/utils/node");
|
||||
|
||||
const createRootNode = value =>
|
||||
createNode({ name: "root", contents: { value } });
|
||||
|
|
|
|||
|
|
@ -2,9 +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/>. */
|
||||
|
||||
const gripWindowStubs = require("../../../reps/stubs/window");
|
||||
const gripWindowStubs = require("devtools/client/shared/components/reps/reps/stubs/window");
|
||||
|
||||
const { createNode, nodeIsWindow } = require("../../utils/node");
|
||||
const { createNode, nodeIsWindow } = require("devtools/client/shared/components/reps/object-inspector/utils/node");
|
||||
|
||||
const createRootNode = value =>
|
||||
createNode({ name: "root", contents: { value } });
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ const {
|
|||
createNode,
|
||||
makeNodesForEntries,
|
||||
nodeSupportsNumericalBucketing,
|
||||
} = require("../../utils/node");
|
||||
} = require("devtools/client/shared/components/reps/object-inspector/utils/node");
|
||||
|
||||
const createRootNode = stub =>
|
||||
createNode({
|
||||
|
|
@ -14,8 +14,8 @@ const createRootNode = stub =>
|
|||
contents: { value: stub },
|
||||
});
|
||||
|
||||
const gripArrayStubs = require("../../../reps/stubs/grip-array");
|
||||
const gripMapStubs = require("../../../reps/stubs/grip-map");
|
||||
const gripArrayStubs = require("devtools/client/shared/components/reps/reps/stubs/grip-array");
|
||||
const gripMapStubs = require("devtools/client/shared/components/reps/reps/stubs/grip-map");
|
||||
|
||||
describe("nodeSupportsNumericalBucketing", () => {
|
||||
it("returns true for Arrays", () => {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
const {
|
||||
makeNodesForPromiseProperties,
|
||||
nodeIsPromise,
|
||||
} = require("../../utils/node");
|
||||
} = require("devtools/client/shared/components/reps/object-inspector/utils/node");
|
||||
|
||||
describe("promises utils function", () => {
|
||||
it("is promise", () => {
|
||||
|
|
|
|||
|
|
@ -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/>. */
|
||||
|
||||
const Utils = require("../../utils/index");
|
||||
const Utils = require("devtools/client/shared/components/reps/object-inspector/utils/index");
|
||||
const { createNode, getChildren, makeNodesForEntries } = Utils.node;
|
||||
|
||||
const { shouldLoadItemEntries } = Utils.loadProperties;
|
||||
|
||||
const gripMapStubs = require("../../../reps/stubs/grip-map");
|
||||
const gripArrayStubs = require("../../../reps/stubs/grip-array");
|
||||
const gripStubs = require("../../../reps/stubs/grip");
|
||||
const gripMapStubs = require("devtools/client/shared/components/reps/reps/stubs/grip-map");
|
||||
const gripArrayStubs = require("devtools/client/shared/components/reps/reps/stubs/grip-array");
|
||||
const gripStubs = require("devtools/client/shared/components/reps/reps/stubs/grip");
|
||||
|
||||
describe("shouldLoadItemEntries", () => {
|
||||
it("returns true for an entries node", () => {
|
||||
|
|
|
|||
|
|
@ -2,12 +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 Utils = require("../../utils/index");
|
||||
const Utils = require("devtools/client/shared/components/reps/object-inspector/utils/index");
|
||||
const { createNode } = Utils.node;
|
||||
const { shouldLoadItemFullText } = Utils.loadProperties;
|
||||
|
||||
const longStringStubs = require("../../../reps/stubs/long-string");
|
||||
const symbolStubs = require("../../../reps/stubs/symbol");
|
||||
const longStringStubs = require("devtools/client/shared/components/reps/reps/stubs/long-string");
|
||||
const symbolStubs = require("devtools/client/shared/components/reps/reps/stubs/symbol");
|
||||
|
||||
describe("shouldLoadItemFullText", () => {
|
||||
it("returns true for a longString node with unloaded full text", () => {
|
||||
|
|
|
|||
|
|
@ -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/>. */
|
||||
|
||||
const Utils = require("../../utils/index");
|
||||
const Utils = require("devtools/client/shared/components/reps/object-inspector/utils/index");
|
||||
const {
|
||||
createNode,
|
||||
createGetterNode,
|
||||
|
|
@ -14,12 +14,12 @@ const {
|
|||
|
||||
const { shouldLoadItemIndexedProperties } = Utils.loadProperties;
|
||||
|
||||
const GripMapEntryRep = require("../../../reps/grip-map-entry");
|
||||
const accessorStubs = require("../../../reps/stubs/accessor");
|
||||
const gripMapStubs = require("../../../reps/stubs/grip-map");
|
||||
const gripArrayStubs = require("../../../reps/stubs/grip-array");
|
||||
const gripStubs = require("../../../reps/stubs/grip");
|
||||
const windowStubs = require("../../../reps/stubs/window");
|
||||
const GripMapEntryRep = require("devtools/client/shared/components/reps/reps/grip-map-entry");
|
||||
const accessorStubs = require("devtools/client/shared/components/reps/reps/stubs/accessor");
|
||||
const gripMapStubs = require("devtools/client/shared/components/reps/reps/stubs/grip-map");
|
||||
const gripArrayStubs = require("devtools/client/shared/components/reps/reps/stubs/grip-array");
|
||||
const gripStubs = require("devtools/client/shared/components/reps/reps/stubs/grip");
|
||||
const windowStubs = require("devtools/client/shared/components/reps/reps/stubs/window");
|
||||
|
||||
describe("shouldLoadItemIndexedProperties", () => {
|
||||
it("returns true for an array", () => {
|
||||
|
|
|
|||
|
|
@ -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/>. */
|
||||
|
||||
const Utils = require("../../utils/index");
|
||||
const Utils = require("devtools/client/shared/components/reps/object-inspector/utils/index");
|
||||
const {
|
||||
createNode,
|
||||
createGetterNode,
|
||||
|
|
@ -14,12 +14,12 @@ const {
|
|||
|
||||
const { shouldLoadItemNonIndexedProperties } = Utils.loadProperties;
|
||||
|
||||
const GripMapEntryRep = require("../../../reps/grip-map-entry");
|
||||
const accessorStubs = require("../../../reps/stubs/accessor");
|
||||
const gripMapStubs = require("../../../reps/stubs/grip-map");
|
||||
const gripArrayStubs = require("../../../reps/stubs/grip-array");
|
||||
const gripStubs = require("../../../reps/stubs/grip");
|
||||
const windowStubs = require("../../../reps/stubs/window");
|
||||
const GripMapEntryRep = require("devtools/client/shared/components/reps/reps/grip-map-entry");
|
||||
const accessorStubs = require("devtools/client/shared/components/reps/reps/stubs/accessor");
|
||||
const gripMapStubs = require("devtools/client/shared/components/reps/reps/stubs/grip-map");
|
||||
const gripArrayStubs = require("devtools/client/shared/components/reps/reps/stubs/grip-array");
|
||||
const gripStubs = require("devtools/client/shared/components/reps/reps/stubs/grip");
|
||||
const windowStubs = require("devtools/client/shared/components/reps/reps/stubs/window");
|
||||
|
||||
describe("shouldLoadItemNonIndexedProperties", () => {
|
||||
it("returns true for an array", () => {
|
||||
|
|
|
|||
|
|
@ -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/>. */
|
||||
|
||||
const Utils = require("../../utils/index");
|
||||
const Utils = require("devtools/client/shared/components/reps/object-inspector/utils/index");
|
||||
const {
|
||||
createNode,
|
||||
createGetterNode,
|
||||
|
|
@ -14,12 +14,12 @@ const {
|
|||
|
||||
const { shouldLoadItemPrototype } = Utils.loadProperties;
|
||||
|
||||
const GripMapEntryRep = require("../../../reps/grip-map-entry");
|
||||
const accessorStubs = require("../../../reps/stubs/accessor");
|
||||
const gripMapStubs = require("../../../reps/stubs/grip-map");
|
||||
const gripArrayStubs = require("../../../reps/stubs/grip-array");
|
||||
const gripStubs = require("../../../reps/stubs/grip");
|
||||
const windowStubs = require("../../../reps/stubs/window");
|
||||
const GripMapEntryRep = require("devtools/client/shared/components/reps/reps/grip-map-entry");
|
||||
const accessorStubs = require("devtools/client/shared/components/reps/reps/stubs/accessor");
|
||||
const gripMapStubs = require("devtools/client/shared/components/reps/reps/stubs/grip-map");
|
||||
const gripArrayStubs = require("devtools/client/shared/components/reps/reps/stubs/grip-array");
|
||||
const gripStubs = require("devtools/client/shared/components/reps/reps/stubs/grip");
|
||||
const windowStubs = require("devtools/client/shared/components/reps/reps/stubs/window");
|
||||
|
||||
describe("shouldLoadItemPrototype", () => {
|
||||
it("returns true for an array", () => {
|
||||
|
|
|
|||
|
|
@ -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/>. */
|
||||
|
||||
const Utils = require("../../utils/index");
|
||||
const Utils = require("devtools/client/shared/components/reps/object-inspector/utils/index");
|
||||
const {
|
||||
createNode,
|
||||
createGetterNode,
|
||||
|
|
@ -14,12 +14,12 @@ const {
|
|||
|
||||
const { shouldLoadItemSymbols } = Utils.loadProperties;
|
||||
|
||||
const GripMapEntryRep = require("../../../reps/grip-map-entry");
|
||||
const accessorStubs = require("../../../reps/stubs/accessor");
|
||||
const gripMapStubs = require("../../../reps/stubs/grip-map");
|
||||
const gripArrayStubs = require("../../../reps/stubs/grip-array");
|
||||
const gripStubs = require("../../../reps/stubs/grip");
|
||||
const windowStubs = require("../../../reps/stubs/window");
|
||||
const GripMapEntryRep = require("devtools/client/shared/components/reps/reps/grip-map-entry");
|
||||
const accessorStubs = require("devtools/client/shared/components/reps/reps/stubs/accessor");
|
||||
const gripMapStubs = require("devtools/client/shared/components/reps/reps/stubs/grip-map");
|
||||
const gripArrayStubs = require("devtools/client/shared/components/reps/reps/stubs/grip-array");
|
||||
const gripStubs = require("devtools/client/shared/components/reps/reps/stubs/grip");
|
||||
const windowStubs = require("devtools/client/shared/components/reps/reps/stubs/window");
|
||||
|
||||
describe("shouldLoadItemSymbols", () => {
|
||||
it("returns true for an array", () => {
|
||||
|
|
|
|||
|
|
@ -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/>. */
|
||||
|
||||
const Utils = require("../../utils/index");
|
||||
const Utils = require("devtools/client/shared/components/reps/object-inspector/utils/index");
|
||||
const { shouldRenderRootsInReps } = Utils;
|
||||
|
||||
const nullStubs = require("../../../reps/stubs/null");
|
||||
const numberStubs = require("../../../reps/stubs/number");
|
||||
const undefinedStubs = require("../../../reps/stubs/undefined");
|
||||
const gripStubs = require("../../../reps/stubs/grip");
|
||||
const gripArrayStubs = require("../../../reps/stubs/grip-array");
|
||||
const symbolStubs = require("../../../reps/stubs/symbol");
|
||||
const errorStubs = require("../../../reps/stubs/error");
|
||||
const bigIntStubs = require("../../../reps/stubs/big-int");
|
||||
const nullStubs = require("devtools/client/shared/components/reps/reps/stubs/null");
|
||||
const numberStubs = require("devtools/client/shared/components/reps/reps/stubs/number");
|
||||
const undefinedStubs = require("devtools/client/shared/components/reps/reps/stubs/undefined");
|
||||
const gripStubs = require("devtools/client/shared/components/reps/reps/stubs/grip");
|
||||
const gripArrayStubs = require("devtools/client/shared/components/reps/reps/stubs/grip-array");
|
||||
const symbolStubs = require("devtools/client/shared/components/reps/reps/stubs/symbol");
|
||||
const errorStubs = require("devtools/client/shared/components/reps/reps/stubs/error");
|
||||
const bigIntStubs = require("devtools/client/shared/components/reps/reps/stubs/big-int");
|
||||
|
||||
describe("shouldRenderRootsInReps", () => {
|
||||
it("returns true for a string", () => {
|
||||
|
|
|
|||
|
|
@ -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/>. */
|
||||
|
||||
const { getValue, nodeHasFullText } = require("../utils/node");
|
||||
const { getValue, nodeHasFullText } = require("devtools/client/shared/components/reps/object-inspector/utils/node");
|
||||
|
||||
async function enumIndexedProperties(objectFront, start, end) {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -2,16 +2,16 @@
|
|||
* 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 client = require("./client");
|
||||
const loadProperties = require("./load-properties");
|
||||
const node = require("./node");
|
||||
const client = require("devtools/client/shared/components/reps/object-inspector/utils/client");
|
||||
const loadProperties = require("devtools/client/shared/components/reps/object-inspector/utils/load-properties");
|
||||
const node = require("devtools/client/shared/components/reps/object-inspector/utils/node");
|
||||
const { nodeIsError, nodeIsPrimitive } = node;
|
||||
const selection = require("./selection");
|
||||
const selection = require("devtools/client/shared/components/reps/object-inspector/utils/selection");
|
||||
|
||||
const { MODE } = require("../../reps/constants");
|
||||
const { MODE } = require("devtools/client/shared/components/reps/reps/constants");
|
||||
const {
|
||||
REPS: { Rep, Grip },
|
||||
} = require("../../reps/rep");
|
||||
} = require("devtools/client/shared/components/reps/reps/rep");
|
||||
|
||||
function shouldRenderRootsInReps(roots, props = {}) {
|
||||
if (roots.length !== 1) {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const {
|
|||
enumSymbols,
|
||||
getFullText,
|
||||
getProxySlots,
|
||||
} = require("./client");
|
||||
} = require("devtools/client/shared/components/reps/object-inspector/utils/client");
|
||||
|
||||
const {
|
||||
getClosestGripNode,
|
||||
|
|
@ -27,7 +27,7 @@ const {
|
|||
nodeIsProxy,
|
||||
nodeNeedsNumericalBuckets,
|
||||
nodeIsLongString,
|
||||
} = require("./node");
|
||||
} = require("devtools/client/shared/components/reps/object-inspector/utils/node");
|
||||
|
||||
function loadItemProperties(item, client, loadedProperties) {
|
||||
const gripItem = getClosestGripNode(item);
|
||||
|
|
|
|||
|
|
@ -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/>. */
|
||||
|
||||
const { maybeEscapePropertyName } = require("../../reps/rep-utils");
|
||||
const ArrayRep = require("../../reps/array");
|
||||
const GripArrayRep = require("../../reps/grip-array");
|
||||
const GripMap = require("../../reps/grip-map");
|
||||
const GripMapEntryRep = require("../../reps/grip-map-entry");
|
||||
const ErrorRep = require("../../reps/error");
|
||||
const BigIntRep = require("../../reps/big-int");
|
||||
const { isLongString } = require("../../reps/string");
|
||||
const { maybeEscapePropertyName } = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
const ArrayRep = require("devtools/client/shared/components/reps/reps/array");
|
||||
const GripArrayRep = require("devtools/client/shared/components/reps/reps/grip-array");
|
||||
const GripMap = require("devtools/client/shared/components/reps/reps/grip-map");
|
||||
const GripMapEntryRep = require("devtools/client/shared/components/reps/reps/grip-map-entry");
|
||||
const ErrorRep = require("devtools/client/shared/components/reps/reps/error");
|
||||
const BigIntRep = require("devtools/client/shared/components/reps/reps/big-int");
|
||||
const { isLongString } = require("devtools/client/shared/components/reps/reps/string");
|
||||
|
||||
const MAX_NUMERICAL_PROPERTIES = 100;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
// ReactJS
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const {
|
||||
|
|
@ -10,8 +12,13 @@ const {
|
|||
} = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
|
||||
// Utils
|
||||
const { isGrip, wrapRender } = require("./rep-utils");
|
||||
const { rep: StringRep } = require("./string");
|
||||
const {
|
||||
isGrip,
|
||||
wrapRender,
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
const {
|
||||
rep: StringRep,
|
||||
} = require("devtools/client/shared/components/reps/reps/string");
|
||||
|
||||
/**
|
||||
* Renders Accessible object.
|
||||
|
|
|
|||
|
|
@ -2,14 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
// Dependencies
|
||||
const {
|
||||
button,
|
||||
span,
|
||||
} = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const { wrapRender } = require("./rep-utils");
|
||||
const { MODE } = require("./constants");
|
||||
const {
|
||||
wrapRender,
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
const {
|
||||
MODE,
|
||||
} = require("devtools/client/shared/components/reps/reps/constants");
|
||||
|
||||
/**
|
||||
* Renders an object. An object is represented by a list of its
|
||||
|
|
@ -31,7 +37,10 @@ function Accessor(props) {
|
|||
} = props;
|
||||
|
||||
if (evaluation) {
|
||||
const { Rep, Grip } = require("./rep");
|
||||
const {
|
||||
Rep,
|
||||
Grip,
|
||||
} = require("devtools/client/shared/components/reps/reps/rep");
|
||||
return span(
|
||||
{
|
||||
className: "objectBox objectBox-accessor objectTitle",
|
||||
|
|
|
|||
|
|
@ -2,11 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
// Dependencies
|
||||
const { span } = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const { wrapRender } = require("./rep-utils");
|
||||
const { MODE } = require("./constants");
|
||||
const {
|
||||
wrapRender,
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
const {
|
||||
MODE,
|
||||
} = require("devtools/client/shared/components/reps/reps/constants");
|
||||
|
||||
const ModePropType = PropTypes.oneOf(
|
||||
// @TODO Change this to Object.values when supported in Node's version of V8
|
||||
|
|
@ -125,7 +131,7 @@ ItemRep.propTypes = {
|
|||
};
|
||||
|
||||
function ItemRep(props) {
|
||||
const { Rep } = require("./rep");
|
||||
const { Rep } = require("devtools/client/shared/components/reps/reps/rep");
|
||||
|
||||
const { object, delim, mode } = props;
|
||||
return span(
|
||||
|
|
|
|||
|
|
@ -2,13 +2,21 @@
|
|||
* 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";
|
||||
|
||||
// ReactJS
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const { span } = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
|
||||
// Reps
|
||||
const { getGripType, isGrip, wrapRender } = require("./rep-utils");
|
||||
const { rep: StringRep } = require("./string");
|
||||
const {
|
||||
getGripType,
|
||||
isGrip,
|
||||
wrapRender,
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
const {
|
||||
rep: StringRep,
|
||||
} = require("devtools/client/shared/components/reps/reps/string");
|
||||
|
||||
/**
|
||||
* Renders DOM attribute
|
||||
|
|
|
|||
|
|
@ -2,11 +2,16 @@
|
|||
* 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";
|
||||
|
||||
// Dependencies
|
||||
const { span } = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
|
||||
const { getGripType, wrapRender } = require("./rep-utils");
|
||||
const {
|
||||
getGripType,
|
||||
wrapRender,
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
|
||||
/**
|
||||
* Renders a BigInt Number
|
||||
|
|
|
|||
|
|
@ -2,11 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
// Dependencies
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const { span } = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
|
||||
const { wrapRender } = require("./rep-utils");
|
||||
const {
|
||||
wrapRender,
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
|
||||
/**
|
||||
* Renders a caption. This template is used by other components
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
// Dependencies
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const { span } = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
|
|
@ -10,9 +12,11 @@ const {
|
|||
cropString,
|
||||
cropMultipleLines,
|
||||
wrapRender,
|
||||
} = require("./rep-utils");
|
||||
const { MODE } = require("./constants");
|
||||
const nodeConstants = require("../shared/dom-node-constants");
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
const {
|
||||
MODE,
|
||||
} = require("devtools/client/shared/components/reps/reps/constants");
|
||||
const nodeConstants = require("devtools/client/shared/components/reps/shared/dom-node-constants");
|
||||
|
||||
/**
|
||||
* Renders DOM comment node.
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
MODE: {
|
||||
TINY: Symbol("TINY"),
|
||||
|
|
|
|||
|
|
@ -2,12 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
// ReactJS
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const { span } = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
|
||||
// Reps
|
||||
const { getGripType, isGrip, wrapRender } = require("./rep-utils");
|
||||
const {
|
||||
getGripType,
|
||||
isGrip,
|
||||
wrapRender,
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
|
||||
/**
|
||||
* Used to render JS built-in Date() object.
|
||||
|
|
|
|||
|
|
@ -2,12 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
// ReactJS
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const { span } = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
|
||||
// Reps
|
||||
const { getGripType, isGrip, wrapRender } = require("./rep-utils");
|
||||
const {
|
||||
getGripType,
|
||||
isGrip,
|
||||
wrapRender,
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
|
||||
/**
|
||||
* Renders DOM documentType object.
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
// ReactJS
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const { span } = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
|
|
@ -12,7 +14,7 @@ const {
|
|||
isGrip,
|
||||
getURLDisplayString,
|
||||
wrapRender,
|
||||
} = require("./rep-utils");
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
|
||||
/**
|
||||
* Renders DOM document object.
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
// ReactJS
|
||||
const {
|
||||
button,
|
||||
|
|
@ -10,9 +12,17 @@ const {
|
|||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
|
||||
// Utils
|
||||
const { isGrip, wrapRender } = require("./rep-utils");
|
||||
const { rep: StringRep, isLongString } = require("./string");
|
||||
const { MODE } = require("./constants");
|
||||
const {
|
||||
isGrip,
|
||||
wrapRender,
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
const {
|
||||
rep: StringRep,
|
||||
isLongString,
|
||||
} = require("devtools/client/shared/components/reps/reps/string");
|
||||
const {
|
||||
MODE,
|
||||
} = require("devtools/client/shared/components/reps/reps/constants");
|
||||
const nodeConstants = require("devtools/shared/dom-node-constants");
|
||||
|
||||
const MAX_ATTRIBUTE_LENGTH = 50;
|
||||
|
|
|
|||
|
|
@ -2,15 +2,26 @@
|
|||
* 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";
|
||||
|
||||
// ReactJS
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const { span } = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
|
||||
// Utils
|
||||
const { isGrip, wrapRender } = require("./rep-utils");
|
||||
const { cleanFunctionName } = require("./function");
|
||||
const { isLongString } = require("./string");
|
||||
const { MODE } = require("./constants");
|
||||
const {
|
||||
isGrip,
|
||||
wrapRender,
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
const {
|
||||
cleanFunctionName,
|
||||
} = require("devtools/client/shared/components/reps/reps/function");
|
||||
const {
|
||||
isLongString,
|
||||
} = require("devtools/client/shared/components/reps/reps/string");
|
||||
const {
|
||||
MODE,
|
||||
} = require("devtools/client/shared/components/reps/reps/constants");
|
||||
|
||||
const IGNORED_SOURCE_URLS = ["debugger eval code"];
|
||||
|
||||
|
|
@ -77,7 +88,7 @@ function ErrorRep(props) {
|
|||
}
|
||||
|
||||
if (mode !== MODE.TINY) {
|
||||
const { Rep } = require("./rep");
|
||||
const { Rep } = require("devtools/client/shared/components/reps/reps/rep");
|
||||
content.push(
|
||||
Rep({
|
||||
...props,
|
||||
|
|
|
|||
|
|
@ -2,14 +2,21 @@
|
|||
* 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";
|
||||
|
||||
// ReactJS
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
|
||||
// Reps
|
||||
const { isGrip, wrapRender } = require("./rep-utils");
|
||||
const {
|
||||
isGrip,
|
||||
wrapRender,
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
|
||||
const { MODE } = require("./constants");
|
||||
const { rep } = require("./grip");
|
||||
const {
|
||||
MODE,
|
||||
} = require("devtools/client/shared/components/reps/reps/constants");
|
||||
const { rep } = require("devtools/client/shared/components/reps/reps/grip");
|
||||
|
||||
/**
|
||||
* Renders DOM event objects.
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
// ReactJS
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const {
|
||||
|
|
@ -10,8 +12,15 @@ const {
|
|||
} = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
|
||||
// Reps
|
||||
const { getGripType, isGrip, cropString, wrapRender } = require("./rep-utils");
|
||||
const { MODE } = require("./constants");
|
||||
const {
|
||||
getGripType,
|
||||
isGrip,
|
||||
cropString,
|
||||
wrapRender,
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
const {
|
||||
MODE,
|
||||
} = require("devtools/client/shared/components/reps/reps/constants");
|
||||
|
||||
const IGNORED_SOURCE_URLS = ["debugger eval code"];
|
||||
|
||||
|
|
|
|||
|
|
@ -2,21 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
// Dependencies
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const { span } = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
|
||||
const { lengthBubble } = require("../shared/grip-length-bubble");
|
||||
const {
|
||||
lengthBubble,
|
||||
} = require("devtools/client/shared/components/reps/shared/grip-length-bubble");
|
||||
const {
|
||||
interleave,
|
||||
getGripType,
|
||||
isGrip,
|
||||
wrapRender,
|
||||
ellipsisElement,
|
||||
} = require("./rep-utils");
|
||||
const { MODE } = require("./constants");
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
const {
|
||||
MODE,
|
||||
} = require("devtools/client/shared/components/reps/reps/constants");
|
||||
|
||||
const { ModePropType } = require("./array");
|
||||
const {
|
||||
ModePropType,
|
||||
} = require("devtools/client/shared/components/reps/reps/array");
|
||||
const DEFAULT_TITLE = "Array";
|
||||
|
||||
/**
|
||||
|
|
@ -157,7 +165,7 @@ function getPreviewItems(grip) {
|
|||
}
|
||||
|
||||
function arrayIterator(props, grip, max) {
|
||||
const { Rep } = require("./rep");
|
||||
const { Rep } = require("devtools/client/shared/components/reps/reps/rep");
|
||||
|
||||
let items = [];
|
||||
const gripLength = getLength(grip);
|
||||
|
|
|
|||
|
|
@ -2,13 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
// Dependencies
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const { span } = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
// Utils
|
||||
const { wrapRender } = require("./rep-utils");
|
||||
const PropRep = require("./prop-rep");
|
||||
const { MODE } = require("./constants");
|
||||
const {
|
||||
wrapRender,
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
const PropRep = require("devtools/client/shared/components/reps/reps/prop-rep");
|
||||
const {
|
||||
MODE,
|
||||
} = require("devtools/client/shared/components/reps/reps/constants");
|
||||
/**
|
||||
* Renders an map entry. A map entry is represented by its key,
|
||||
* a column and its value.
|
||||
|
|
|
|||
|
|
@ -2,20 +2,28 @@
|
|||
* 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";
|
||||
|
||||
// Dependencies
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const { span } = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
|
||||
const { lengthBubble } = require("../shared/grip-length-bubble");
|
||||
const {
|
||||
lengthBubble,
|
||||
} = require("devtools/client/shared/components/reps/shared/grip-length-bubble");
|
||||
const {
|
||||
interleave,
|
||||
isGrip,
|
||||
wrapRender,
|
||||
ellipsisElement,
|
||||
} = require("./rep-utils");
|
||||
const PropRep = require("./prop-rep");
|
||||
const { MODE } = require("./constants");
|
||||
const { ModePropType } = require("./array");
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
const PropRep = require("devtools/client/shared/components/reps/reps/prop-rep");
|
||||
const {
|
||||
MODE,
|
||||
} = require("devtools/client/shared/components/reps/reps/constants");
|
||||
const {
|
||||
ModePropType,
|
||||
} = require("devtools/client/shared/components/reps/reps/array");
|
||||
|
||||
/**
|
||||
* Renders an map. A map is represented by a list of its
|
||||
|
|
|
|||
|
|
@ -2,14 +2,22 @@
|
|||
* 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";
|
||||
|
||||
// ReactJS
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const { span } = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
|
||||
// Dependencies
|
||||
const { interleave, isGrip, wrapRender } = require("./rep-utils");
|
||||
const PropRep = require("./prop-rep");
|
||||
const { MODE } = require("./constants");
|
||||
const {
|
||||
interleave,
|
||||
isGrip,
|
||||
wrapRender,
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
const PropRep = require("devtools/client/shared/components/reps/reps/prop-rep");
|
||||
const {
|
||||
MODE,
|
||||
} = require("devtools/client/shared/components/reps/reps/constants");
|
||||
|
||||
/**
|
||||
* Renders generic grip. Grip is client representation
|
||||
|
|
@ -142,7 +150,7 @@ function safePropIterator(props, object, max) {
|
|||
|
||||
function propIterator(props, object, max) {
|
||||
if (object.preview && Object.keys(object.preview).includes("wrappedValue")) {
|
||||
const { Rep } = require("./rep");
|
||||
const { Rep } = require("devtools/client/shared/components/reps/reps/rep");
|
||||
|
||||
return [
|
||||
Rep({
|
||||
|
|
|
|||
|
|
@ -2,11 +2,16 @@
|
|||
* 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";
|
||||
|
||||
// Dependencies
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const { span } = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
|
||||
const { getGripType, wrapRender } = require("./rep-utils");
|
||||
const {
|
||||
getGripType,
|
||||
wrapRender,
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
|
||||
/**
|
||||
* Renders a Infinity object
|
||||
|
|
|
|||
|
|
@ -2,12 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
// Dependencies
|
||||
const { span } = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
|
||||
const { getGripType, wrapRender } = require("./rep-utils");
|
||||
const {
|
||||
getGripType,
|
||||
wrapRender,
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
|
||||
/**
|
||||
* Renders a NaN object
|
||||
|
|
|
|||
|
|
@ -2,12 +2,16 @@
|
|||
* 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";
|
||||
|
||||
// Dependencies
|
||||
const { span } = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
|
||||
const { wrapRender } = require("./rep-utils");
|
||||
const {
|
||||
wrapRender,
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
|
||||
/**
|
||||
* Renders null value
|
||||
|
|
|
|||
|
|
@ -2,11 +2,16 @@
|
|||
* 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";
|
||||
|
||||
// Dependencies
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const { span } = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
|
||||
const { getGripType, wrapRender } = require("./rep-utils");
|
||||
const {
|
||||
getGripType,
|
||||
wrapRender,
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
|
||||
/**
|
||||
* Renders a number
|
||||
|
|
|
|||
|
|
@ -2,14 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
// ReactJS
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const { span } = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
|
||||
// Reps
|
||||
const { isGrip, wrapRender } = require("./rep-utils");
|
||||
const {
|
||||
isGrip,
|
||||
wrapRender,
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
|
||||
const String = require("./string").rep;
|
||||
const String = require("devtools/client/shared/components/reps/reps/string")
|
||||
.rep;
|
||||
|
||||
/**
|
||||
* Renders a grip object with textual data.
|
||||
|
|
|
|||
|
|
@ -2,12 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
// ReactJS
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const { span } = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
|
||||
// Reps
|
||||
const { isGrip, getURLDisplayString, wrapRender } = require("./rep-utils");
|
||||
const {
|
||||
isGrip,
|
||||
getURLDisplayString,
|
||||
wrapRender,
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
|
||||
/**
|
||||
* Renders a grip object with URL data.
|
||||
|
|
|
|||
|
|
@ -2,13 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
// Dependencies
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const { span } = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
|
||||
const { wrapRender, ellipsisElement } = require("./rep-utils");
|
||||
const PropRep = require("./prop-rep");
|
||||
const { MODE } = require("./constants");
|
||||
const {
|
||||
wrapRender,
|
||||
ellipsisElement,
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
const PropRep = require("devtools/client/shared/components/reps/reps/prop-rep");
|
||||
const {
|
||||
MODE,
|
||||
} = require("devtools/client/shared/components/reps/reps/constants");
|
||||
|
||||
const DEFAULT_TITLE = "Object";
|
||||
|
||||
|
|
|
|||
|
|
@ -2,15 +2,23 @@
|
|||
* 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";
|
||||
|
||||
// ReactJS
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const { span } = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
|
||||
// Dependencies
|
||||
const { getGripType, isGrip, wrapRender } = require("./rep-utils");
|
||||
const {
|
||||
getGripType,
|
||||
isGrip,
|
||||
wrapRender,
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
|
||||
const PropRep = require("./prop-rep");
|
||||
const { MODE } = require("./constants");
|
||||
const PropRep = require("devtools/client/shared/components/reps/reps/prop-rep");
|
||||
const {
|
||||
MODE,
|
||||
} = require("devtools/client/shared/components/reps/reps/constants");
|
||||
|
||||
/**
|
||||
* Renders a DOM Promise object.
|
||||
|
|
@ -38,7 +46,7 @@ function PromiseRep(props) {
|
|||
};
|
||||
|
||||
if (props.mode === MODE.TINY) {
|
||||
const { Rep } = require("./rep");
|
||||
const { Rep } = require("devtools/client/shared/components/reps/reps/rep");
|
||||
|
||||
return span(
|
||||
config,
|
||||
|
|
|
|||
|
|
@ -2,12 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
// Dependencies
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const { span } = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
|
||||
const { maybeEscapePropertyName, wrapRender } = require("./rep-utils");
|
||||
const { MODE } = require("./constants");
|
||||
const {
|
||||
maybeEscapePropertyName,
|
||||
wrapRender,
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
const {
|
||||
MODE,
|
||||
} = require("devtools/client/shared/components/reps/reps/constants");
|
||||
|
||||
/**
|
||||
* Property for Obj (local JS objects), Grip (remote JS objects)
|
||||
|
|
@ -40,8 +47,8 @@ PropRep.propTypes = {
|
|||
*/
|
||||
|
||||
function PropRep(props) {
|
||||
const Grip = require("./grip");
|
||||
const { Rep } = require("./rep");
|
||||
const Grip = require("devtools/client/shared/components/reps/reps/grip");
|
||||
const { Rep } = require("devtools/client/shared/components/reps/reps/rep");
|
||||
const shouldRenderTooltip = props.shouldRenderTooltip;
|
||||
|
||||
let { name, mode, equal, suppressQuotes } = props;
|
||||
|
|
|
|||
|
|
@ -2,12 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
// ReactJS
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const { span } = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
|
||||
// Reps
|
||||
const { getGripType, isGrip, wrapRender, ELLIPSIS } = require("./rep-utils");
|
||||
const {
|
||||
getGripType,
|
||||
isGrip,
|
||||
wrapRender,
|
||||
ELLIPSIS,
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
|
||||
/**
|
||||
* Renders a grip object with regular expression.
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
// Dependencies
|
||||
const validProtocols = /(http|https|ftp|data|resource|chrome):/i;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,41 +2,43 @@
|
|||
* 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";
|
||||
|
||||
// Load all existing rep templates
|
||||
const Undefined = require("./undefined");
|
||||
const Null = require("./null");
|
||||
const StringRep = require("./string");
|
||||
const Number = require("./number");
|
||||
const ArrayRep = require("./array");
|
||||
const Obj = require("./object");
|
||||
const SymbolRep = require("./symbol");
|
||||
const InfinityRep = require("./infinity");
|
||||
const NaNRep = require("./nan");
|
||||
const Accessor = require("./accessor");
|
||||
const Undefined = require("devtools/client/shared/components/reps/reps/undefined");
|
||||
const Null = require("devtools/client/shared/components/reps/reps/null");
|
||||
const StringRep = require("devtools/client/shared/components/reps/reps/string");
|
||||
const Number = require("devtools/client/shared/components/reps/reps/number");
|
||||
const ArrayRep = require("devtools/client/shared/components/reps/reps/array");
|
||||
const Obj = require("devtools/client/shared/components/reps/reps/object");
|
||||
const SymbolRep = require("devtools/client/shared/components/reps/reps/symbol");
|
||||
const InfinityRep = require("devtools/client/shared/components/reps/reps/infinity");
|
||||
const NaNRep = require("devtools/client/shared/components/reps/reps/nan");
|
||||
const Accessor = require("devtools/client/shared/components/reps/reps/accessor");
|
||||
|
||||
// DOM types (grips)
|
||||
const Accessible = require("./accessible");
|
||||
const Attribute = require("./attribute");
|
||||
const BigInt = require("./big-int");
|
||||
const DateTime = require("./date-time");
|
||||
const Document = require("./document");
|
||||
const DocumentType = require("./document-type");
|
||||
const Event = require("./event");
|
||||
const Func = require("./function");
|
||||
const PromiseRep = require("./promise");
|
||||
const RegExp = require("./regexp");
|
||||
const StyleSheet = require("./stylesheet");
|
||||
const CommentNode = require("./comment-node");
|
||||
const ElementNode = require("./element-node");
|
||||
const TextNode = require("./text-node");
|
||||
const ErrorRep = require("./error");
|
||||
const Window = require("./window");
|
||||
const ObjectWithText = require("./object-with-text");
|
||||
const ObjectWithURL = require("./object-with-url");
|
||||
const GripArray = require("./grip-array");
|
||||
const GripMap = require("./grip-map");
|
||||
const GripMapEntry = require("./grip-map-entry");
|
||||
const Grip = require("./grip");
|
||||
const Accessible = require("devtools/client/shared/components/reps/reps/accessible");
|
||||
const Attribute = require("devtools/client/shared/components/reps/reps/attribute");
|
||||
const BigInt = require("devtools/client/shared/components/reps/reps/big-int");
|
||||
const DateTime = require("devtools/client/shared/components/reps/reps/date-time");
|
||||
const Document = require("devtools/client/shared/components/reps/reps/document");
|
||||
const DocumentType = require("devtools/client/shared/components/reps/reps/document-type");
|
||||
const Event = require("devtools/client/shared/components/reps/reps/event");
|
||||
const Func = require("devtools/client/shared/components/reps/reps/function");
|
||||
const PromiseRep = require("devtools/client/shared/components/reps/reps/promise");
|
||||
const RegExp = require("devtools/client/shared/components/reps/reps/regexp");
|
||||
const StyleSheet = require("devtools/client/shared/components/reps/reps/stylesheet");
|
||||
const CommentNode = require("devtools/client/shared/components/reps/reps/comment-node");
|
||||
const ElementNode = require("devtools/client/shared/components/reps/reps/element-node");
|
||||
const TextNode = require("devtools/client/shared/components/reps/reps/text-node");
|
||||
const ErrorRep = require("devtools/client/shared/components/reps/reps/error");
|
||||
const Window = require("devtools/client/shared/components/reps/reps/window");
|
||||
const ObjectWithText = require("devtools/client/shared/components/reps/reps/object-with-text");
|
||||
const ObjectWithURL = require("devtools/client/shared/components/reps/reps/object-with-url");
|
||||
const GripArray = require("devtools/client/shared/components/reps/reps/grip-array");
|
||||
const GripMap = require("devtools/client/shared/components/reps/reps/grip-map");
|
||||
const GripMapEntry = require("devtools/client/shared/components/reps/reps/grip-map-entry");
|
||||
const Grip = require("devtools/client/shared/components/reps/reps/grip");
|
||||
|
||||
// List of all registered template.
|
||||
// XXX there should be a way for extensions to register a new
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
// Dependencies
|
||||
const {
|
||||
a,
|
||||
|
|
@ -19,7 +21,7 @@ const {
|
|||
ELLIPSIS,
|
||||
uneatLastUrlCharsRegex,
|
||||
urlRegex,
|
||||
} = require("./rep-utils");
|
||||
} = require("devtools/client/shared/components/reps/reps/rep-utils");
|
||||
|
||||
/**
|
||||
* Renders a string. String value is enclosed within quotes.
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const stubs = new Map();
|
||||
stubs.set("Document", {
|
||||
actor: "server1.conn1.child1/accessible31",
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const stubs = new Map();
|
||||
|
||||
stubs.set("getter", {
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const stubs = new Map();
|
||||
stubs.set("Attribute", {
|
||||
type: "object",
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const stubs = new Map();
|
||||
stubs.set("1n", {
|
||||
type: "BigInt",
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const stubs = new Map();
|
||||
stubs.set("Comment", {
|
||||
type: "object",
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const stubs = new Map();
|
||||
stubs.set("DateTime", {
|
||||
type: "object",
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const stubs = new Map();
|
||||
stubs.set("html", {
|
||||
type: "object",
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const stubs = new Map();
|
||||
stubs.set("Document", {
|
||||
type: "object",
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const stubs = new Map();
|
||||
stubs.set("BodyNode", {
|
||||
type: "object",
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const stubs = new Map();
|
||||
stubs.set("SimpleError", {
|
||||
type: "object",
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const stubs = new Map();
|
||||
|
||||
stubs.set("testEvent", {
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const stubs = new Map();
|
||||
stubs.set("Failure", {
|
||||
type: "object",
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const stubs = new Map();
|
||||
stubs.set("Named", {
|
||||
type: "object",
|
||||
|
|
|
|||
|
|
@ -2,8 +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 { MODE } = require("../constants");
|
||||
const { maxLengthMap } = require("../grip-array");
|
||||
"use strict";
|
||||
|
||||
const {
|
||||
MODE,
|
||||
} = require("devtools/client/shared/components/reps/reps/constants");
|
||||
const {
|
||||
maxLengthMap,
|
||||
} = require("devtools/client/shared/components/reps/reps/grip-array");
|
||||
const stubs = new Map();
|
||||
|
||||
stubs.set("testBasic", {
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const stubs = new Map();
|
||||
stubs.set("A → 0", {
|
||||
type: "mapEntry",
|
||||
|
|
|
|||
|
|
@ -2,8 +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 { MODE } = require("../constants");
|
||||
const { maxLengthMap } = require("../grip-map");
|
||||
"use strict";
|
||||
|
||||
const {
|
||||
MODE,
|
||||
} = require("devtools/client/shared/components/reps/reps/constants");
|
||||
const {
|
||||
maxLengthMap,
|
||||
} = require("devtools/client/shared/components/reps/reps/grip-map");
|
||||
|
||||
const stubs = new Map();
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +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 { MODE } = require("../constants");
|
||||
const { maxLengthMap } = require("../grip");
|
||||
"use strict";
|
||||
|
||||
const {
|
||||
MODE,
|
||||
} = require("devtools/client/shared/components/reps/reps/constants");
|
||||
const {
|
||||
maxLengthMap,
|
||||
} = require("devtools/client/shared/components/reps/reps/grip");
|
||||
|
||||
const stubs = new Map();
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const stubs = new Map();
|
||||
stubs.set("Infinity", {
|
||||
type: "Infinity",
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const multilineFullText = `a\n${Array(20000)
|
||||
.fill("a")
|
||||
.join("")}`;
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const stubs = new Map();
|
||||
stubs.set("NaN", {
|
||||
type: "NaN",
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const stubs = new Map();
|
||||
stubs.set("Null", {
|
||||
type: "null",
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const stubs = new Map();
|
||||
stubs.set("Int", 5);
|
||||
stubs.set("True", true);
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const stubs = new Map();
|
||||
stubs.set("ShadowRule", {
|
||||
type: "object",
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const stubs = new Map();
|
||||
stubs.set("ObjectWithUrl", {
|
||||
type: "object",
|
||||
|
|
|
|||
|
|
@ -2,6 +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/>. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const stubs = new Map();
|
||||
stubs.set("Pending", {
|
||||
type: "object",
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue