--- a/devtools/client/shared/components/reps/reps.js
+++ b/devtools/client/shared/components/reps/reps.js
@@ -2,17 +2,17 @@
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("devtools/client/shared/vendor/react-dom-factories"), require("devtools/client/shared/vendor/lodash"), require("devtools/client/shared/vendor/react-prop-types"), require("devtools/client/shared/vendor/react"));
else if(typeof define === 'function' && define.amd)
define(["devtools/client/shared/vendor/react-dom-factories", "devtools/client/shared/vendor/lodash", "devtools/client/shared/vendor/react-prop-types", "devtools/client/shared/vendor/react"], factory);
else {
var a = typeof exports === 'object' ? factory(require("devtools/client/shared/vendor/react-dom-factories"), require("devtools/client/shared/vendor/lodash"), require("devtools/client/shared/vendor/react-prop-types"), require("devtools/client/shared/vendor/react")) : factory(root["devtools/client/shared/vendor/react-dom-factories"], root["devtools/client/shared/vendor/lodash"], root["devtools/client/shared/vendor/react-prop-types"], root["devtools/client/shared/vendor/react"]);
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
}
-})(this, function(__WEBPACK_EXTERNAL_MODULE_1__, __WEBPACK_EXTERNAL_MODULE_53__, __WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_7__) {
+})(this, function(__WEBPACK_EXTERNAL_MODULE_1__, __WEBPACK_EXTERNAL_MODULE_58__, __WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_6__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
@@ -65,17 +65,17 @@ return /******/ (function(modules) { //
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/assets/build";
/******/
/******/ // Load entry module and return exports
-/******/ return __webpack_require__(__webpack_require__.s = 17);
+/******/ return __webpack_require__(__webpack_require__.s = 18);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -518,50 +518,50 @@ module.exports = {
"use strict";
/* 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/. */
-__webpack_require__(18);
+__webpack_require__(19);
// Load all existing rep templates
-const Undefined = __webpack_require__(19);
-const Null = __webpack_require__(20);
-const StringRep = __webpack_require__(6);
-const LongStringRep = __webpack_require__(21);
-const Number = __webpack_require__(22);
+const Undefined = __webpack_require__(20);
+const Null = __webpack_require__(21);
+const StringRep = __webpack_require__(7);
+const LongStringRep = __webpack_require__(22);
+const Number = __webpack_require__(23);
const ArrayRep = __webpack_require__(10);
-const Obj = __webpack_require__(23);
-const SymbolRep = __webpack_require__(24);
-const InfinityRep = __webpack_require__(25);
-const NaNRep = __webpack_require__(26);
-const Accessor = __webpack_require__(27);
+const Obj = __webpack_require__(24);
+const SymbolRep = __webpack_require__(25);
+const InfinityRep = __webpack_require__(26);
+const NaNRep = __webpack_require__(27);
+const Accessor = __webpack_require__(28);
// DOM types (grips)
-const Attribute = __webpack_require__(28);
-const DateTime = __webpack_require__(29);
-const Document = __webpack_require__(30);
-const Event = __webpack_require__(31);
-const Func = __webpack_require__(32);
-const PromiseRep = __webpack_require__(36);
-const RegExp = __webpack_require__(37);
-const StyleSheet = __webpack_require__(38);
-const CommentNode = __webpack_require__(39);
-const ElementNode = __webpack_require__(40);
-const TextNode = __webpack_require__(41);
-const ErrorRep = __webpack_require__(42);
-const Window = __webpack_require__(43);
-const ObjectWithText = __webpack_require__(44);
-const ObjectWithURL = __webpack_require__(45);
-const GripArray = __webpack_require__(13);
-const GripMap = __webpack_require__(14);
-const GripMapEntry = __webpack_require__(15);
+const Attribute = __webpack_require__(29);
+const DateTime = __webpack_require__(30);
+const Document = __webpack_require__(31);
+const Event = __webpack_require__(32);
+const Func = __webpack_require__(33);
+const PromiseRep = __webpack_require__(38);
+const RegExp = __webpack_require__(39);
+const StyleSheet = __webpack_require__(40);
+const CommentNode = __webpack_require__(41);
+const ElementNode = __webpack_require__(42);
+const TextNode = __webpack_require__(43);
+const ErrorRep = __webpack_require__(44);
+const Window = __webpack_require__(45);
+const ObjectWithText = __webpack_require__(46);
+const ObjectWithURL = __webpack_require__(47);
+const GripArray = __webpack_require__(12);
+const GripMap = __webpack_require__(13);
+const GripMapEntry = __webpack_require__(14);
const Grip = __webpack_require__(8);
// List of all registered template.
// XXX there should be a way for extensions to register a new
// or modify an existing rep.
let reps = [RegExp, StyleSheet, Event, DateTime, CommentNode, ElementNode, TextNode, Attribute, LongStringRep, Func, PromiseRep, ArrayRep, Document, Window, ObjectWithText, ObjectWithURL, ErrorRep, GripArray, GripMap, GripMapEntry, Grip, Undefined, Null, StringRep, Number, SymbolRep, InfinityRep, NaNRep, Accessor];
/**
@@ -734,16 +734,22 @@ function PropRep(props) {
}, equal), Rep(Object.assign({}, props))];
}
// Exports from this module
module.exports = wrapRender(PropRep);
/***/ }),
/* 6 */
+/***/ (function(module, exports) {
+
+module.exports = __WEBPACK_EXTERNAL_MODULE_6__;
+
+/***/ }),
+/* 7 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -933,22 +939,16 @@ function supportsObject(object, noGrip =
// Exports from this module
module.exports = {
rep: wrapRender(StringRep),
supportsObject
};
/***/ }),
-/* 7 */
-/***/ (function(module, exports) {
-
-module.exports = __WEBPACK_EXTERNAL_MODULE_7__;
-
-/***/ }),
/* 8 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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
@@ -1263,33 +1263,33 @@ module.exports = Grip;
/***/ }),
/* 9 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var _svgInlineReact = __webpack_require__(11);
+var _svgInlineReact = __webpack_require__(34);
var _svgInlineReact2 = _interopRequireDefault(_svgInlineReact);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/* 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 React = __webpack_require__(7);
+const React = __webpack_require__(6);
const PropTypes = __webpack_require__(2);
const svg = {
- "open-inspector": __webpack_require__(34),
- "jump-definition": __webpack_require__(35)
+ "open-inspector": __webpack_require__(36),
+ "jump-definition": __webpack_require__(37)
};
Svg.propTypes = {
className: PropTypes.string
};
function Svg(name, props) {
if (!svg[name]) {
@@ -1456,114 +1456,16 @@ module.exports = {
/***/ }),
/* 11 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-var _react = __webpack_require__(7);
-
-var _react2 = _interopRequireDefault(_react);
-
-var _propTypes = __webpack_require__(2);
-
-var _util = __webpack_require__(33);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
-var process = process || { env: {} };
-
-var InlineSVG = function (_React$Component) {
- _inherits(InlineSVG, _React$Component);
-
- function InlineSVG() {
- _classCallCheck(this, InlineSVG);
-
- return _possibleConstructorReturn(this, (InlineSVG.__proto__ || Object.getPrototypeOf(InlineSVG)).apply(this, arguments));
- }
-
- _createClass(InlineSVG, [{
- key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps(_ref) {
- var children = _ref.children;
-
- if ("production" !== process.env.NODE_ENV && children != null) {
- console.info('<InlineSVG />: `children` prop will be ignored.');
- }
- }
- }, {
- key: 'render',
- value: function render() {
- var Element = void 0,
- __html = void 0,
- svgProps = void 0;
-
- var _props = this.props,
- element = _props.element,
- raw = _props.raw,
- src = _props.src,
- otherProps = _objectWithoutProperties(_props, ['element', 'raw', 'src']);
-
- if (raw === true) {
- Element = 'svg';
- svgProps = (0, _util.extractSVGProps)(src);
- __html = (0, _util.getSVGFromSource)(src).innerHTML;
- }
- __html = __html || src;
- Element = Element || element;
- svgProps = svgProps || {};
-
- return _react2.default.createElement(Element, _extends({}, svgProps, otherProps, { src: null, children: null,
- dangerouslySetInnerHTML: { __html: __html } }));
- }
- }]);
-
- return InlineSVG;
-}(_react2.default.Component);
-
-exports.default = InlineSVG;
-
-
-InlineSVG.defaultProps = {
- element: 'i',
- raw: false,
- src: ''
-};
-
-InlineSVG.propTypes = {
- src: _propTypes.string.isRequired,
- element: _propTypes.string,
- raw: _propTypes.bool
-};
-
-/***/ }),
-/* 12 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
/* 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/. */
module.exports = {
ELEMENT_NODE: 1,
ATTRIBUTE_NODE: 2,
TEXT_NODE: 3,
@@ -1582,17 +1484,17 @@ module.exports = {
DOCUMENT_POSITION_PRECEDING: 0x02,
DOCUMENT_POSITION_FOLLOWING: 0x04,
DOCUMENT_POSITION_CONTAINS: 0x08,
DOCUMENT_POSITION_CONTAINED_BY: 0x10,
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 0x20
};
/***/ }),
-/* 13 */
+/* 12 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -1800,17 +1702,17 @@ maxLengthMap.set(MODE.LONG, 10);
module.exports = {
rep: wrapRender(GripArray),
supportsObject,
maxLengthMap,
getLength
};
/***/ }),
-/* 14 */
+/* 13 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -2008,17 +1910,17 @@ maxLengthMap.set(MODE.LONG, 10);
module.exports = {
rep: wrapRender(GripMap),
supportsObject,
maxLengthMap,
getLength
};
/***/ }),
-/* 15 */
+/* 14 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -2086,32 +1988,128 @@ function createGripMapEntry(key, value)
// Exports from this module
module.exports = {
rep: wrapRender(GripMapEntry),
createGripMapEntry,
supportsObject
};
/***/ }),
-/* 16 */
+/* 15 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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 { get, has } = __webpack_require__(53);
+const client = __webpack_require__(16);
+const loadProperties = __webpack_require__(57);
+const node = __webpack_require__(17);
+
+module.exports = {
+ client,
+ loadProperties,
+ node
+};
+
+/***/ }),
+/* 16 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+async function enumIndexedProperties(objectClient, start, end) {
+ try {
+ const { iterator } = await objectClient.enumProperties({ ignoreNonIndexedProperties: true });
+ const response = await iteratorSlice(iterator, start, end);
+ return response;
+ } catch (e) {
+ console.error("Error in enumIndexedProperties", e);
+ return {};
+ }
+} /* 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/. */
+
+async function enumNonIndexedProperties(objectClient, start, end) {
+ try {
+ const { iterator } = await objectClient.enumProperties({ ignoreIndexedProperties: true });
+ const response = await iteratorSlice(iterator, start, end);
+ return response;
+ } catch (e) {
+ console.error("Error in enumNonIndexedProperties", e);
+ return {};
+ }
+}
+
+async function enumEntries(objectClient, start, end) {
+ try {
+ const { iterator } = await objectClient.enumEntries();
+ const response = await iteratorSlice(iterator, start, end);
+ return response;
+ } catch (e) {
+ console.error("Error in enumEntries", e);
+ return {};
+ }
+}
+
+async function enumSymbols(objectClient, start, end) {
+ try {
+ const { iterator } = await objectClient.enumSymbols();
+ const response = await iteratorSlice(iterator, start, end);
+ return response;
+ } catch (e) {
+ console.error("Error in enumSymbols", e);
+ return {};
+ }
+}
+
+async function getPrototype(objectClient) {
+ if (typeof objectClient.getPrototype !== "function") {
+ console.error("objectClient.getPrototype is not a function");
+ return Promise.resolve({});
+ }
+ return objectClient.getPrototype();
+}
+
+function iteratorSlice(iterator, start, end) {
+ start = start || 0;
+ const count = end ? end - start + 1 : iterator.count;
+ return iterator.slice(start, count);
+}
+
+module.exports = {
+ enumEntries,
+ enumIndexedProperties,
+ enumNonIndexedProperties,
+ enumSymbols,
+ getPrototype
+};
+
+/***/ }),
+/* 17 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+/* 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 { get, has } = __webpack_require__(58);
const { maybeEscapePropertyName } = __webpack_require__(0);
const ArrayRep = __webpack_require__(10);
-const GripArrayRep = __webpack_require__(13);
-const GripMap = __webpack_require__(14);
-const GripMapEntryRep = __webpack_require__(15);
+const GripArrayRep = __webpack_require__(12);
+const GripMap = __webpack_require__(13);
+const GripMapEntryRep = __webpack_require__(14);
const MAX_NUMERICAL_PROPERTIES = 100;
const NODE_TYPES = {
BUCKET: Symbol("[n…n]"),
DEFAULT_PROPERTIES: Symbol("[default properties]"),
ENTRIES: Symbol("<entries>"),
GET: Symbol("<get>"),
@@ -2679,53 +2677,16 @@ function getClosestNonBucketNode(item) {
const parent = getParent(item);
if (!parent) {
return null;
}
return getClosestNonBucketNode(parent);
}
-function shouldLoadItemIndexedProperties(item, loadedProperties = new Map()) {
- const gripItem = getClosestGripNode(item);
- const value = getValue(gripItem);
-
- return value && nodeHasProperties(gripItem) && !loadedProperties.has(item.path) && !nodeIsProxy(item) && !nodeNeedsNumericalBuckets(item) && !nodeIsEntries(getClosestNonBucketNode(item))
- // The data is loaded when expanding the window node.
- && !nodeIsDefaultProperties(item);
-}
-
-function shouldLoadItemNonIndexedProperties(item, loadedProperties = new Map()) {
- const gripItem = getClosestGripNode(item);
- const value = getValue(gripItem);
-
- return value && nodeHasProperties(gripItem) && !loadedProperties.has(item.path) && !nodeIsProxy(item) && !nodeIsEntries(getClosestNonBucketNode(item)) && !nodeIsBucket(item)
- // The data is loaded when expanding the window node.
- && !nodeIsDefaultProperties(item);
-}
-
-function shouldLoadItemEntries(item, loadedProperties = new Map()) {
- const gripItem = getClosestGripNode(item);
- const value = getValue(gripItem);
-
- return value && nodeIsEntries(getClosestNonBucketNode(item)) && !nodeHasAllEntriesInPreview(gripItem) && !loadedProperties.has(item.path) && !nodeNeedsNumericalBuckets(item);
-}
-
-function shouldLoadItemPrototype(item, loadedProperties = new Map()) {
- const value = getValue(item);
-
- return value && !loadedProperties.has(item.path) && !nodeIsBucket(item) && !nodeIsMapEntry(item) && !nodeIsEntries(item) && !nodeIsDefaultProperties(item) && !nodeHasAccessors(item) && !nodeIsPrimitive(item);
-}
-
-function shouldLoadItemSymbols(item, loadedProperties = new Map()) {
- const value = getValue(item);
-
- return value && !loadedProperties.has(item.path) && !nodeIsBucket(item) && !nodeIsMapEntry(item) && !nodeIsEntries(item) && !nodeIsDefaultProperties(item) && !nodeHasAccessors(item) && !nodeIsPrimitive(item) && !nodeIsProxy(item);
-}
-
module.exports = {
createNode,
getChildren,
getClosestGripNode,
getClosestNonBucketNode,
getParent,
getNumericalPropertiesCount,
getValue,
@@ -2751,42 +2712,37 @@ module.exports = {
nodeIsPromise,
nodeIsPrototype,
nodeIsProxy,
nodeIsSetter,
nodeIsWindow,
nodeNeedsNumericalBuckets,
nodeSupportsNumericalBucketing,
setNodeChildren,
- shouldLoadItemEntries,
- shouldLoadItemIndexedProperties,
- shouldLoadItemNonIndexedProperties,
- shouldLoadItemPrototype,
- shouldLoadItemSymbols,
sortProperties,
NODE_TYPES,
// Export for testing purpose.
SAFE_PATH_PREFIX
};
/***/ }),
-/* 17 */
+/* 18 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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 { MODE } = __webpack_require__(3);
const { REPS, getRep } = __webpack_require__(4);
-const ObjectInspector = __webpack_require__(46);
-const ObjectInspectorUtils = __webpack_require__(16);
+const ObjectInspector = __webpack_require__(48);
+const ObjectInspectorUtils = __webpack_require__(15);
const {
parseURLEncodedText,
parseURLParams,
maybeEscapePropertyName,
getGripPreviewItems
} = __webpack_require__(0);
@@ -2798,23 +2754,23 @@ module.exports = {
parseURLEncodedText,
parseURLParams,
getGripPreviewItems,
ObjectInspector,
ObjectInspectorUtils
};
/***/ }),
-/* 18 */
+/* 19 */
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
-/* 19 */
+/* 20 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -2846,17 +2802,17 @@ function supportsObject(object, noGrip =
// Exports from this module
module.exports = {
rep: wrapRender(Undefined),
supportsObject
};
/***/ }),
-/* 20 */
+/* 21 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -2888,17 +2844,17 @@ function supportsObject(object, noGrip =
// Exports from this module
module.exports = {
rep: wrapRender(Null),
supportsObject
};
/***/ }),
-/* 21 */
+/* 22 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -2965,17 +2921,17 @@ function supportsObject(object, noGrip =
// Exports from this module
module.exports = {
rep: wrapRender(LongStringRep),
supportsObject
};
/***/ }),
-/* 22 */
+/* 23 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -3017,17 +2973,17 @@ function supportsObject(object, noGrip =
// Exports from this module
module.exports = {
rep: wrapRender(Number),
supportsObject
};
/***/ }),
-/* 23 */
+/* 24 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -3195,17 +3151,17 @@ function supportsObject(object) {
// Exports from this module
module.exports = {
rep: wrapRender(ObjectRep),
supportsObject
};
/***/ }),
-/* 24 */
+/* 25 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -3247,17 +3203,17 @@ function supportsObject(object, noGrip =
// Exports from this module
module.exports = {
rep: wrapRender(SymbolRep),
supportsObject
};
/***/ }),
-/* 25 */
+/* 26 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -3295,17 +3251,17 @@ function supportsObject(object, noGrip =
// Exports from this module
module.exports = {
rep: wrapRender(InfinityRep),
supportsObject
};
/***/ }),
-/* 26 */
+/* 27 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -3332,17 +3288,17 @@ function supportsObject(object, noGrip =
// Exports from this module
module.exports = {
rep: wrapRender(NaNRep),
supportsObject
};
/***/ }),
-/* 27 */
+/* 28 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -3402,17 +3358,17 @@ function supportsObject(object, noGrip =
// Exports from this module
module.exports = {
rep: wrapRender(Accessor),
supportsObject
};
/***/ }),
-/* 28 */
+/* 29 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -3423,17 +3379,17 @@ const dom = __webpack_require__(1);
const { span } = dom;
// Reps
const {
getGripType,
isGrip,
wrapRender
} = __webpack_require__(0);
-const { rep: StringRep } = __webpack_require__(6);
+const { rep: StringRep } = __webpack_require__(7);
/**
* Renders DOM attribute
*/
Attribute.propTypes = {
object: PropTypes.object.isRequired
};
@@ -3463,17 +3419,17 @@ function supportsObject(grip, noGrip = f
}
module.exports = {
rep: wrapRender(Attribute),
supportsObject
};
/***/ }),
-/* 29 */
+/* 30 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -3530,17 +3486,17 @@ function supportsObject(grip, noGrip = f
// Exports from this module
module.exports = {
rep: wrapRender(DateTime),
supportsObject
};
/***/ }),
-/* 30 */
+/* 31 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -3597,17 +3553,17 @@ function supportsObject(object, noGrip =
// Exports from this module
module.exports = {
rep: wrapRender(Document),
supportsObject
};
/***/ }),
-/* 31 */
+/* 32 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -3704,17 +3660,17 @@ function supportsObject(grip, noGrip = f
// Exports from this module
module.exports = {
rep: wrapRender(Event),
supportsObject
};
/***/ }),
-/* 32 */
+/* 33 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -3865,17 +3821,115 @@ function supportsObject(grip, noGrip = f
module.exports = {
rep: wrapRender(FunctionRep),
supportsObject,
// exported for testing purpose.
getFunctionName
};
/***/ }),
-/* 33 */
+/* 34 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _react = __webpack_require__(6);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _propTypes = __webpack_require__(2);
+
+var _util = __webpack_require__(35);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var process = process || { env: {} };
+
+var InlineSVG = function (_React$Component) {
+ _inherits(InlineSVG, _React$Component);
+
+ function InlineSVG() {
+ _classCallCheck(this, InlineSVG);
+
+ return _possibleConstructorReturn(this, (InlineSVG.__proto__ || Object.getPrototypeOf(InlineSVG)).apply(this, arguments));
+ }
+
+ _createClass(InlineSVG, [{
+ key: 'componentWillReceiveProps',
+ value: function componentWillReceiveProps(_ref) {
+ var children = _ref.children;
+
+ if ("production" !== process.env.NODE_ENV && children != null) {
+ console.info('<InlineSVG />: `children` prop will be ignored.');
+ }
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var Element = void 0,
+ __html = void 0,
+ svgProps = void 0;
+
+ var _props = this.props,
+ element = _props.element,
+ raw = _props.raw,
+ src = _props.src,
+ otherProps = _objectWithoutProperties(_props, ['element', 'raw', 'src']);
+
+ if (raw === true) {
+ Element = 'svg';
+ svgProps = (0, _util.extractSVGProps)(src);
+ __html = (0, _util.getSVGFromSource)(src).innerHTML;
+ }
+ __html = __html || src;
+ Element = Element || element;
+ svgProps = svgProps || {};
+
+ return _react2.default.createElement(Element, _extends({}, svgProps, otherProps, { src: null, children: null,
+ dangerouslySetInnerHTML: { __html: __html } }));
+ }
+ }]);
+
+ return InlineSVG;
+}(_react2.default.Component);
+
+exports.default = InlineSVG;
+
+
+InlineSVG.defaultProps = {
+ element: 'i',
+ raw: false,
+ src: ''
+};
+
+InlineSVG.propTypes = {
+ src: _propTypes.string.isRequired,
+ element: _propTypes.string,
+ raw: _propTypes.bool
+};
+
+/***/ }),
+/* 35 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -3920,29 +3974,29 @@ function getSVGFromSource(src) {
// get <svg /> element props
function extractSVGProps(src) {
var map = getSVGFromSource(src).attributes;
return map.length > 0 ? serializeAttrs(map) : null;
}
/***/ }),
-/* 34 */
+/* 36 */
/***/ (function(module, exports) {
module.exports = "<!-- 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/. --><svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8,3L12,3L12,7L14,7L14,8L12,8L12,12L8,12L8,14L7,14L7,12L3,12L3,8L1,8L1,7L3,7L3,3L7,3L7,1L8,1L8,3ZM10,10L10,5L5,5L5,10L10,10Z\"></path></svg>"
/***/ }),
-/* 35 */
+/* 37 */
/***/ (function(module, exports) {
module.exports = "<!-- 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/. --><svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><g stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" stroke-linecap=\"round\"><g id=\"arrow\" transform=\"translate(1.000000, 3.000000)\"><path d=\"M4.5,0.5 L6.5,2.5\"></path><path d=\"M4.5,2.5 L6.5,4.5\" transform=\"translate(5.500000, 3.500000) scale(1, -1) translate(-5.500000, -3.500000) \"></path><path d=\"M6.00090144,2.5 C4.67806937,2.5 3.67938478,2.5 3.00484766,2.5 C1.99304199,2.5 1.01049805,3.5168457 0.993840144,4.52403846 C0.988750751,4.54723808 0.988750751,5.87097168 0.993840144,8.49523926\" id=\"Path-2\" stroke-linejoin=\"round\"></path></g><g id=\"content-lines\" transform=\"translate(9.000000, 2.000000)\"><path d=\"M1.5,3.5 L5.5,3.5\"></path><path d=\"M0.5,1.5 L5.5,1.5\"></path><path d=\"M0.5,5.5 L5.5,5.5\"></path></g></g></svg>"
/***/ }),
-/* 36 */
+/* 38 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -4042,17 +4096,17 @@ function supportsObject(object, noGrip =
// Exports from this module
module.exports = {
rep: wrapRender(PromiseRep),
supportsObject
};
/***/ }),
-/* 37 */
+/* 39 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -4101,17 +4155,17 @@ function supportsObject(object, noGrip =
// Exports from this module
module.exports = {
rep: wrapRender(RegExp),
supportsObject
};
/***/ }),
-/* 38 */
+/* 40 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -4169,17 +4223,17 @@ function supportsObject(object, noGrip =
// Exports from this module
module.exports = {
rep: wrapRender(StyleSheet),
supportsObject
};
/***/ }),
-/* 39 */
+/* 41 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -4188,17 +4242,17 @@ module.exports = {
const PropTypes = __webpack_require__(2);
const {
isGrip,
cropString,
cropMultipleLines,
wrapRender
} = __webpack_require__(0);
const { MODE } = __webpack_require__(3);
-const nodeConstants = __webpack_require__(12);
+const nodeConstants = __webpack_require__(11);
const dom = __webpack_require__(1);
const { span } = dom;
/**
* Renders DOM comment node.
*/
CommentNode.propTypes = {
object: PropTypes.object.isRequired,
@@ -4235,17 +4289,17 @@ function supportsObject(object, noGrip =
// Exports from this module
module.exports = {
rep: wrapRender(CommentNode),
supportsObject
};
/***/ }),
-/* 40 */
+/* 42 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -4253,19 +4307,19 @@ module.exports = {
// ReactJS
const PropTypes = __webpack_require__(2);
// Utils
const {
isGrip,
wrapRender
} = __webpack_require__(0);
-const { rep: StringRep } = __webpack_require__(6);
+const { rep: StringRep } = __webpack_require__(7);
const { MODE } = __webpack_require__(3);
-const nodeConstants = __webpack_require__(12);
+const nodeConstants = __webpack_require__(11);
const Svg = __webpack_require__(9);
const dom = __webpack_require__(1);
const { span } = dom;
/**
* Renders DOM element node.
*/
@@ -4367,17 +4421,17 @@ function supportsObject(object, noGrip =
// Exports from this module
module.exports = {
rep: wrapRender(ElementNode),
supportsObject
};
/***/ }),
-/* 41 */
+/* 43 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -4476,17 +4530,17 @@ function supportsObject(grip, noGrip = f
// Exports from this module
module.exports = {
rep: wrapRender(TextNode),
supportsObject
};
/***/ }),
-/* 42 */
+/* 44 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -4560,17 +4614,17 @@ function supportsObject(object, noGrip =
// Exports from this module
module.exports = {
rep: wrapRender(ErrorRep),
supportsObject
};
/***/ }),
-/* 43 */
+/* 45 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -4638,17 +4692,17 @@ function supportsObject(object, noGrip =
// Exports from this module
module.exports = {
rep: wrapRender(WindowRep),
supportsObject
};
/***/ }),
-/* 44 */
+/* 46 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -4657,17 +4711,17 @@ module.exports = {
const PropTypes = __webpack_require__(2);
// Reps
const {
isGrip,
wrapRender
} = __webpack_require__(0);
-const String = __webpack_require__(6).rep;
+const String = __webpack_require__(7).rep;
const dom = __webpack_require__(1);
const { span } = dom;
/**
* Renders a grip object with textual data.
*/
ObjectWithText.propTypes = {
@@ -4703,17 +4757,17 @@ function supportsObject(grip, noGrip = f
// Exports from this module
module.exports = {
rep: wrapRender(ObjectWithText),
supportsObject
};
/***/ }),
-/* 45 */
+/* 47 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* 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/. */
@@ -4769,82 +4823,75 @@ function supportsObject(grip, noGrip = f
// Exports from this module
module.exports = {
rep: wrapRender(ObjectWithURL),
supportsObject
};
/***/ }),
-/* 46 */
+/* 48 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var _devtoolsComponents = __webpack_require__(47);
+var _devtoolsComponents = __webpack_require__(49);
var _devtoolsComponents2 = _interopRequireDefault(_devtoolsComponents);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/* 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 { Component, createFactory } = __webpack_require__(7);
+const { Component, createFactory } = __webpack_require__(6);
const PropTypes = __webpack_require__(2);
const dom = __webpack_require__(1);
const Tree = createFactory(_devtoolsComponents2.default.Tree);
-__webpack_require__(51);
-
-const classnames = __webpack_require__(52);
+__webpack_require__(55);
+
+const classnames = __webpack_require__(56);
const {
REPS: {
Rep,
Grip
}
} = __webpack_require__(4);
const {
MODE
} = __webpack_require__(3);
+const Utils = __webpack_require__(15);
+
const {
getChildren,
getClosestGripNode,
getParent,
getValue,
nodeHasAccessors,
nodeHasProperties,
nodeIsDefaultProperties,
nodeIsFunction,
nodeIsGetter,
nodeIsMapEntry,
nodeIsMissingArguments,
nodeIsOptimizedOut,
nodeIsPrimitive,
nodeIsPrototype,
nodeIsSetter,
- nodeIsWindow,
- shouldLoadItemEntries,
- shouldLoadItemIndexedProperties,
- shouldLoadItemNonIndexedProperties,
- shouldLoadItemPrototype,
- shouldLoadItemSymbols
-} = __webpack_require__(16);
+ nodeIsWindow
+} = Utils.node;
const {
- enumEntries,
- enumIndexedProperties,
- enumNonIndexedProperties,
- getPrototype,
- enumSymbols
-} = __webpack_require__(54);
+ loadItemProperties
+} = Utils.loadProperties;
// This implements a component that renders an interactive inspector
// for looking at JavaScript objects. It expects descriptions of
// objects from the protocol, and will dynamically fetch child
// properties as objects are expanded.
//
// If you want to inspect a single object, pass the name and the
// protocol descriptor of it:
@@ -4959,89 +5006,42 @@ class ObjectInspector extends Component
return {
expandedPaths: newPaths
};
});
if (expand === true) {
const gripItem = getClosestGripNode(item);
const value = getValue(gripItem);
-
const path = item.path;
- const [start, end] = item.meta ? [item.meta.startIndex, item.meta.endIndex] : [];
-
- let promises = [];
- let objectClient;
- const getObjectClient = () => {
- if (objectClient) {
- return objectClient;
- }
- return this.props.createObjectClient(value);
- };
-
- if (shouldLoadItemIndexedProperties(item, loadedProperties)) {
- promises.push(enumIndexedProperties(getObjectClient(), start, end));
- }
-
- if (shouldLoadItemNonIndexedProperties(item, loadedProperties)) {
- promises.push(enumNonIndexedProperties(getObjectClient(), start, end));
- }
-
- if (shouldLoadItemEntries(item, loadedProperties)) {
- promises.push(enumEntries(getObjectClient(), start, end));
- }
-
- if (shouldLoadItemPrototype(item, loadedProperties)) {
- promises.push(getPrototype(getObjectClient()));
- }
-
- if (shouldLoadItemSymbols(item, loadedProperties)) {
- promises.push(enumSymbols(getObjectClient(), start, end));
- }
-
- if (promises.length > 0) {
- // Set the loading state with the pending promises.
+
+ const onItemPropertiesLoaded = loadItemProperties(item, this.props.createObjectClient, loadedProperties);
+ if (onItemPropertiesLoaded !== null) {
this.setState((prevState, props) => {
const nextLoading = new Map(prevState.loading);
- nextLoading.set(path, promises);
+ nextLoading.set(path, onItemPropertiesLoaded);
return {
loading: nextLoading
};
});
- const responses = await Promise.all(promises);
-
- // Let's loop through the responses to build a single response object.
- const response = responses.reduce((accumulator, res) => {
- Object.entries(res).forEach(([k, v]) => {
- if (accumulator.hasOwnProperty(k)) {
- if (Array.isArray(accumulator[k])) {
- accumulator[k].push(...v);
- } else if (typeof accumulator[k] === "object") {
- accumulator[k] = Object.assign({}, accumulator[k], v);
- }
- } else {
- accumulator[k] = v;
- }
- });
- return accumulator;
- }, {});
+ const properties = await onItemPropertiesLoaded;
this.setState((prevState, props) => {
const nextLoading = new Map(prevState.loading);
nextLoading.delete(path);
const isRoot = this.props.roots.some(root => {
const rootValue = getValue(root);
return rootValue && rootValue.actor === value.actor;
});
return {
actors: isRoot ? prevState.actors : new Set(prevState.actors).add(value.actor),
- loadedProperties: new Map(prevState.loadedProperties).set(path, response),
+ loadedProperties: new Map(prevState.loadedProperties).set(path, properties),
loading: nextLoading
};
});
}
}
}
focusItem(item) {
@@ -5205,76 +5205,72 @@ ObjectInspector.propTypes = {
onFocus: PropTypes.func,
onDoubleClick: PropTypes.func,
onLabelClick: PropTypes.func
};
module.exports = ObjectInspector;
/***/ }),
-/* 47 */
+/* 49 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var _tree = __webpack_require__(50);
+
+var _tree2 = _interopRequireDefault(_tree);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+module.exports = {
+ Tree: _tree2.default
+}; /* 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/. */
+
+/***/ }),
+/* 50 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
-var _tree = __webpack_require__(48);
-
-var _tree2 = _interopRequireDefault(_tree);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-exports.default = {
- Tree: _tree2.default
-}; /* 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/. */
-
-/***/ }),
-/* 48 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-var _react = __webpack_require__(7);
+var _react = __webpack_require__(6);
var _react2 = _interopRequireDefault(_react);
var _reactDomFactories = __webpack_require__(1);
var _reactDomFactories2 = _interopRequireDefault(_reactDomFactories);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
-var _svgInlineReact = __webpack_require__(11);
+var _svgInlineReact = __webpack_require__(51);
var _svgInlineReact2 = _interopRequireDefault(_svgInlineReact);
-var _arrow = __webpack_require__(49);
+var _arrow = __webpack_require__(53);
var _arrow2 = _interopRequireDefault(_arrow);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const { Component, createFactory, createElement } = _react2.default; /* 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/. */
-__webpack_require__(50);
+__webpack_require__(54);
const AUTO_EXPAND_DEPTH = 0; // depth
/**
* An arrow that displays whether its node is expanded (▼) or collapsed
* (▶). When its node has no children, it is hidden.
*/
class ArrowExpander extends Component {
@@ -6022,35 +6018,188 @@ class Tree extends Component {
style
}, nodes);
}
}
exports.default = Tree;
/***/ }),
-/* 49 */
+/* 51 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _react = __webpack_require__(6);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _propTypes = __webpack_require__(2);
+
+var _util = __webpack_require__(52);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var process = process || { env: {} };
+
+var InlineSVG = function (_React$Component) {
+ _inherits(InlineSVG, _React$Component);
+
+ function InlineSVG() {
+ _classCallCheck(this, InlineSVG);
+
+ return _possibleConstructorReturn(this, (InlineSVG.__proto__ || Object.getPrototypeOf(InlineSVG)).apply(this, arguments));
+ }
+
+ _createClass(InlineSVG, [{
+ key: 'componentWillReceiveProps',
+ value: function componentWillReceiveProps(_ref) {
+ var children = _ref.children;
+
+ if ("production" !== process.env.NODE_ENV && children != null) {
+ console.info('<InlineSVG />: `children` prop will be ignored.');
+ }
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var Element = void 0,
+ __html = void 0,
+ svgProps = void 0;
+
+ var _props = this.props,
+ element = _props.element,
+ raw = _props.raw,
+ src = _props.src,
+ otherProps = _objectWithoutProperties(_props, ['element', 'raw', 'src']);
+
+ if (raw === true) {
+ Element = 'svg';
+ svgProps = (0, _util.extractSVGProps)(src);
+ __html = (0, _util.getSVGFromSource)(src).innerHTML;
+ }
+ __html = __html || src;
+ Element = Element || element;
+ svgProps = svgProps || {};
+
+ return _react2.default.createElement(Element, _extends({}, svgProps, otherProps, { src: null, children: null,
+ dangerouslySetInnerHTML: { __html: __html } }));
+ }
+ }]);
+
+ return InlineSVG;
+}(_react2.default.Component);
+
+exports.default = InlineSVG;
+
+
+InlineSVG.defaultProps = {
+ element: 'i',
+ raw: false,
+ src: ''
+};
+
+InlineSVG.propTypes = {
+ src: _propTypes.string.isRequired,
+ element: _propTypes.string,
+ raw: _propTypes.bool
+};
+
+/***/ }),
+/* 52 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.convertReactSVGDOMProperty = convertReactSVGDOMProperty;
+exports.startsWith = startsWith;
+exports.serializeAttrs = serializeAttrs;
+exports.getSVGFromSource = getSVGFromSource;
+exports.extractSVGProps = extractSVGProps;
+// Transform DOM prop/attr names applicable to `<svg>` element but react-limited
+
+function convertReactSVGDOMProperty(str) {
+ return str.replace(/[-|:]([a-z])/g, function (g) {
+ return g[1].toUpperCase();
+ });
+}
+
+function startsWith(str, substring) {
+ return str.indexOf(substring) === 0;
+}
+
+var DataPropPrefix = 'data-';
+// Serialize `Attr` objects in `NamedNodeMap`
+function serializeAttrs(map) {
+ var ret = {};
+ for (var prop, i = 0; i < map.length; i++) {
+ var key = map[i].name;
+ if (!startsWith(key, DataPropPrefix)) {
+ prop = convertReactSVGDOMProperty(key);
+ }
+ ret[prop] = map[i].value;
+ }
+ return ret;
+}
+
+function getSVGFromSource(src) {
+ var svgContainer = document.createElement('div');
+ svgContainer.innerHTML = src;
+ var svg = svgContainer.firstElementChild;
+ svg.remove(); // deref from parent element
+ return svg;
+}
+
+// get <svg /> element props
+function extractSVGProps(src) {
+ var map = getSVGFromSource(src).attributes;
+ return map.length > 0 ? serializeAttrs(map) : null;
+}
+
+/***/ }),
+/* 53 */
/***/ (function(module, exports) {
module.exports = "<!-- 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/. --><svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8 13.4c-.5 0-.9-.2-1.2-.6L.4 5.2C0 4.7-.1 4.3.2 3.7S1 3 1.6 3h12.8c.6 0 1.2.1 1.4.7.3.6.2 1.1-.2 1.6l-6.4 7.6c-.3.4-.7.5-1.2.5z\"></path></svg>"
/***/ }),
-/* 50 */
+/* 54 */
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
-/* 51 */
+/* 55 */
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
-/* 52 */
+/* 56 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
Copyright (c) 2016 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/* global define */
@@ -6095,91 +6244,153 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBP
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else {
window.classNames = classNames;
}
}());
/***/ }),
-/* 53 */
-/***/ (function(module, exports) {
-
-module.exports = __WEBPACK_EXTERNAL_MODULE_53__;
-
-/***/ }),
-/* 54 */
+/* 57 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-async function enumIndexedProperties(objectClient, start, end) {
- try {
- const { iterator } = await objectClient.enumProperties({ ignoreNonIndexedProperties: true });
- const response = await iteratorSlice(iterator, start, end);
- return response;
- } catch (e) {
- console.error("Error in enumIndexedProperties", e);
- return {};
- }
-} /* 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/. */
-
-async function enumNonIndexedProperties(objectClient, start, end) {
- try {
- const { iterator } = await objectClient.enumProperties({ ignoreIndexedProperties: true });
- const response = await iteratorSlice(iterator, start, end);
- return response;
- } catch (e) {
- console.error("Error in enumNonIndexedProperties", e);
- return {};
- }
-}
-
-async function enumEntries(objectClient, start, end) {
- try {
- const { iterator } = await objectClient.enumEntries();
- const response = await iteratorSlice(iterator, start, end);
- return response;
- } catch (e) {
- console.error("Error in enumEntries", e);
- return {};
- }
-}
-
-async function enumSymbols(objectClient, start, end) {
- try {
- const { iterator } = await objectClient.enumSymbols();
- const response = await iteratorSlice(iterator, start, end);
- return response;
- } catch (e) {
- console.error("Error in enumSymbols", e);
- return {};
- }
-}
-
-async function getPrototype(objectClient) {
- if (typeof objectClient.getPrototype !== "function") {
- console.error("objectClient.getPrototype is not a function");
- return Promise.resolve({});
- }
- return objectClient.getPrototype();
-}
-
-function iteratorSlice(iterator, start, end) {
- start = start || 0;
- const count = end ? end - start + 1 : iterator.count;
- return iterator.slice(start, count);
+/* 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 {
+ enumEntries,
+ enumIndexedProperties,
+ enumNonIndexedProperties,
+ getPrototype,
+ enumSymbols
+} = __webpack_require__(16);
+
+const {
+ getClosestGripNode,
+ getClosestNonBucketNode,
+ getValue,
+ nodeHasAccessors,
+ nodeHasAllEntriesInPreview,
+ nodeHasProperties,
+ nodeIsBucket,
+ nodeIsDefaultProperties,
+ nodeIsEntries,
+ nodeIsMapEntry,
+ nodeIsPrimitive,
+ nodeIsProxy,
+ nodeNeedsNumericalBuckets
+} = __webpack_require__(17);
+
+function loadItemProperties(item, createObjectClient, loadedProperties) {
+ const [start, end] = item.meta ? [item.meta.startIndex, item.meta.endIndex] : [];
+
+ let objectClient;
+ const getObjectClient = () => {
+ if (objectClient) {
+ return objectClient;
+ }
+
+ const gripItem = getClosestGripNode(item);
+ const value = getValue(gripItem);
+ return createObjectClient(value);
+ };
+
+ let loadingPromises = [];
+ if (shouldLoadItemIndexedProperties(item, loadedProperties)) {
+ loadingPromises.push(enumIndexedProperties(getObjectClient(), start, end));
+ }
+
+ if (shouldLoadItemNonIndexedProperties(item, loadedProperties)) {
+ loadingPromises.push(enumNonIndexedProperties(getObjectClient(), start, end));
+ }
+
+ if (shouldLoadItemEntries(item, loadedProperties)) {
+ loadingPromises.push(enumEntries(getObjectClient(), start, end));
+ }
+
+ if (shouldLoadItemPrototype(item, loadedProperties)) {
+ loadingPromises.push(getPrototype(getObjectClient()));
+ }
+
+ if (shouldLoadItemSymbols(item, loadedProperties)) {
+ loadingPromises.push(enumSymbols(getObjectClient(), start, end));
+ }
+
+ if (loadingPromises.length === 0) {
+ return null;
+ }
+
+ return Promise.all(loadingPromises).then(responses => responses.reduce((accumulator, res) => {
+ // Let's loop through the responses to build a single response object.
+ Object.entries(res).forEach(([k, v]) => {
+ if (accumulator.hasOwnProperty(k)) {
+ if (Array.isArray(accumulator[k])) {
+ accumulator[k].push(...v);
+ } else if (typeof accumulator[k] === "object") {
+ accumulator[k] = Object.assign({}, accumulator[k], v);
+ }
+ } else {
+ accumulator[k] = v;
+ }
+ });
+ return accumulator;
+ }, {}));
+}
+
+function shouldLoadItemIndexedProperties(item, loadedProperties = new Map()) {
+ const gripItem = getClosestGripNode(item);
+ const value = getValue(gripItem);
+
+ return value && nodeHasProperties(gripItem) && !loadedProperties.has(item.path) && !nodeIsProxy(item) && !nodeNeedsNumericalBuckets(item) && !nodeIsEntries(getClosestNonBucketNode(item))
+ // The data is loaded when expanding the window node.
+ && !nodeIsDefaultProperties(item);
+}
+
+function shouldLoadItemNonIndexedProperties(item, loadedProperties = new Map()) {
+ const gripItem = getClosestGripNode(item);
+ const value = getValue(gripItem);
+
+ return value && nodeHasProperties(gripItem) && !loadedProperties.has(item.path) && !nodeIsProxy(item) && !nodeIsEntries(getClosestNonBucketNode(item)) && !nodeIsBucket(item)
+ // The data is loaded when expanding the window node.
+ && !nodeIsDefaultProperties(item);
+}
+
+function shouldLoadItemEntries(item, loadedProperties = new Map()) {
+ const gripItem = getClosestGripNode(item);
+ const value = getValue(gripItem);
+
+ return value && nodeIsEntries(getClosestNonBucketNode(item)) && !nodeHasAllEntriesInPreview(gripItem) && !loadedProperties.has(item.path) && !nodeNeedsNumericalBuckets(item);
+}
+
+function shouldLoadItemPrototype(item, loadedProperties = new Map()) {
+ const value = getValue(item);
+
+ return value && !loadedProperties.has(item.path) && !nodeIsBucket(item) && !nodeIsMapEntry(item) && !nodeIsEntries(item) && !nodeIsDefaultProperties(item) && !nodeHasAccessors(item) && !nodeIsPrimitive(item);
+}
+
+function shouldLoadItemSymbols(item, loadedProperties = new Map()) {
+ const value = getValue(item);
+
+ return value && !loadedProperties.has(item.path) && !nodeIsBucket(item) && !nodeIsMapEntry(item) && !nodeIsEntries(item) && !nodeIsDefaultProperties(item) && !nodeHasAccessors(item) && !nodeIsPrimitive(item) && !nodeIsProxy(item);
}
module.exports = {
- enumEntries,
- enumIndexedProperties,
- enumNonIndexedProperties,
- enumSymbols,
- getPrototype
+ loadItemProperties,
+ shouldLoadItemEntries,
+ shouldLoadItemIndexedProperties,
+ shouldLoadItemNonIndexedProperties,
+ shouldLoadItemPrototype,
+ shouldLoadItemSymbols
};
+/***/ }),
+/* 58 */
+/***/ (function(module, exports) {
+
+module.exports = __WEBPACK_EXTERNAL_MODULE_58__;
+
/***/ })
/******/ ]);
});
\ No newline at end of file