--- 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_58__, __WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_6__) {
+})(this, function(__WEBPACK_EXTERNAL_MODULE_1__, __WEBPACK_EXTERNAL_MODULE_56__, __WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_7__) {
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 = 18);
+/******/ return __webpack_require__(__webpack_require__.s = 19);
/******/ })
/************************************************************************/
/******/ ([
/* 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__(19);
+__webpack_require__(20);
// Load all existing rep templates
-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 Undefined = __webpack_require__(21);
+const Null = __webpack_require__(22);
+const StringRep = __webpack_require__(6);
+const LongStringRep = __webpack_require__(23);
+const Number = __webpack_require__(24);
const ArrayRep = __webpack_require__(10);
-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);
+const Obj = __webpack_require__(25);
+const SymbolRep = __webpack_require__(26);
+const InfinityRep = __webpack_require__(27);
+const NaNRep = __webpack_require__(28);
+const Accessor = __webpack_require__(29);
// DOM types (grips)
-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 Attribute = __webpack_require__(30);
+const DateTime = __webpack_require__(31);
+const Document = __webpack_require__(32);
+const Event = __webpack_require__(33);
+const Func = __webpack_require__(34);
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 GripArray = __webpack_require__(13);
+const GripMap = __webpack_require__(14);
+const GripMapEntry = __webpack_require__(15);
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,22 +734,16 @@ 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/. */
@@ -939,16 +933,22 @@ 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,27 +1263,27 @@ module.exports = Grip;
/***/ }),
/* 9 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var _svgInlineReact = __webpack_require__(34);
+var _svgInlineReact = __webpack_require__(11);
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__(6);
+const React = __webpack_require__(7);
const PropTypes = __webpack_require__(2);
const svg = {
"open-inspector": __webpack_require__(36),
"jump-definition": __webpack_require__(37)
};
@@ -1456,16 +1456,114 @@ 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__(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
+};
+
+/***/ }),
+/* 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,
@@ -1484,17 +1582,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
};
/***/ }),
-/* 12 */
+/* 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/. */
@@ -1702,17 +1800,17 @@ maxLengthMap.set(MODE.LONG, 10);
module.exports = {
rep: wrapRender(GripArray),
supportsObject,
maxLengthMap,
getLength
};
/***/ }),
-/* 13 */
+/* 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/. */
@@ -1910,17 +2008,17 @@ maxLengthMap.set(MODE.LONG, 10);
module.exports = {
rep: wrapRender(GripMap),
supportsObject,
maxLengthMap,
getLength
};
/***/ }),
-/* 14 */
+/* 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/. */
@@ -1988,38 +2086,38 @@ function createGripMapEntry(key, value)
// Exports from this module
module.exports = {
rep: wrapRender(GripMapEntry),
createGripMapEntry,
supportsObject
};
/***/ }),
-/* 15 */
+/* 16 */
/***/ (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 client = __webpack_require__(16);
-const loadProperties = __webpack_require__(57);
-const node = __webpack_require__(17);
+const client = __webpack_require__(17);
+const loadProperties = __webpack_require__(55);
+const node = __webpack_require__(18);
module.exports = {
client,
loadProperties,
node
};
/***/ }),
-/* 16 */
+/* 17 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
async function enumIndexedProperties(objectClient, start, end) {
try {
const { iterator } = await objectClient.enumProperties({ ignoreNonIndexedProperties: true });
@@ -2084,32 +2182,32 @@ module.exports = {
enumEntries,
enumIndexedProperties,
enumNonIndexedProperties,
enumSymbols,
getPrototype
};
/***/ }),
-/* 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 { get, has } = __webpack_require__(58);
+const { get, has } = __webpack_require__(56);
const { maybeEscapePropertyName } = __webpack_require__(0);
const ArrayRep = __webpack_require__(10);
-const GripArrayRep = __webpack_require__(12);
-const GripMap = __webpack_require__(13);
-const GripMapEntryRep = __webpack_require__(14);
+const GripArrayRep = __webpack_require__(13);
+const GripMap = __webpack_require__(14);
+const GripMapEntryRep = __webpack_require__(15);
const MAX_NUMERICAL_PROPERTIES = 100;
const NODE_TYPES = {
BUCKET: Symbol("[n…n]"),
DEFAULT_PROPERTIES: Symbol("[default properties]"),
ENTRIES: Symbol("<entries>"),
GET: Symbol("<get>"),
@@ -2719,30 +2817,30 @@ module.exports = {
setNodeChildren,
sortProperties,
NODE_TYPES,
// Export for testing purpose.
SAFE_PATH_PREFIX
};
/***/ }),
-/* 18 */
+/* 19 */
/***/ (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__(48);
-const ObjectInspectorUtils = __webpack_require__(15);
+const ObjectInspectorUtils = __webpack_require__(16);
const {
parseURLEncodedText,
parseURLParams,
maybeEscapePropertyName,
getGripPreviewItems
} = __webpack_require__(0);
@@ -2754,23 +2852,23 @@ module.exports = {
parseURLEncodedText,
parseURLParams,
getGripPreviewItems,
ObjectInspector,
ObjectInspectorUtils
};
/***/ }),
-/* 19 */
+/* 20 */
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
-/* 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/. */
@@ -2802,17 +2900,17 @@ function supportsObject(object, noGrip =
// Exports from this module
module.exports = {
rep: wrapRender(Undefined),
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/. */
@@ -2844,17 +2942,17 @@ function supportsObject(object, noGrip =
// Exports from this module
module.exports = {
rep: wrapRender(Null),
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/. */
@@ -2921,17 +3019,17 @@ function supportsObject(object, noGrip =
// Exports from this module
module.exports = {
rep: wrapRender(LongStringRep),
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/. */
@@ -2973,17 +3071,17 @@ function supportsObject(object, noGrip =
// Exports from this module
module.exports = {
rep: wrapRender(Number),
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/. */
@@ -3151,17 +3249,17 @@ function supportsObject(object) {
// Exports from this module
module.exports = {
rep: wrapRender(ObjectRep),
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/. */
@@ -3203,17 +3301,17 @@ function supportsObject(object, noGrip =
// Exports from this module
module.exports = {
rep: wrapRender(SymbolRep),
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/. */
@@ -3251,17 +3349,17 @@ function supportsObject(object, noGrip =
// Exports from this module
module.exports = {
rep: wrapRender(InfinityRep),
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/. */
@@ -3288,17 +3386,17 @@ function supportsObject(object, noGrip =
// Exports from this module
module.exports = {
rep: wrapRender(NaNRep),
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/. */
@@ -3358,17 +3456,17 @@ function supportsObject(object, noGrip =
// Exports from this module
module.exports = {
rep: wrapRender(Accessor),
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/. */
@@ -3379,17 +3477,17 @@ const dom = __webpack_require__(1);
const { span } = dom;
// Reps
const {
getGripType,
isGrip,
wrapRender
} = __webpack_require__(0);
-const { rep: StringRep } = __webpack_require__(7);
+const { rep: StringRep } = __webpack_require__(6);
/**
* Renders DOM attribute
*/
Attribute.propTypes = {
object: PropTypes.object.isRequired
};
@@ -3419,17 +3517,17 @@ function supportsObject(grip, noGrip = f
}
module.exports = {
rep: wrapRender(Attribute),
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/. */
@@ -3486,17 +3584,17 @@ function supportsObject(grip, noGrip = f
// Exports from this module
module.exports = {
rep: wrapRender(DateTime),
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/. */
@@ -3553,17 +3651,17 @@ function supportsObject(object, noGrip =
// Exports from this module
module.exports = {
rep: wrapRender(Document),
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/. */
@@ -3660,17 +3758,17 @@ function supportsObject(grip, noGrip = f
// Exports from this module
module.exports = {
rep: wrapRender(Event),
supportsObject
};
/***/ }),
-/* 33 */
+/* 34 */
/***/ (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/. */
@@ -3821,114 +3919,16 @@ function supportsObject(grip, noGrip = f
module.exports = {
rep: wrapRender(FunctionRep),
supportsObject,
// exported for testing purpose.
getFunctionName
};
/***/ }),
-/* 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
@@ -4242,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__(11);
+const nodeConstants = __webpack_require__(12);
const dom = __webpack_require__(1);
const { span } = dom;
/**
* Renders DOM comment node.
*/
CommentNode.propTypes = {
object: PropTypes.object.isRequired,
@@ -4307,19 +4307,19 @@ module.exports = {
// ReactJS
const PropTypes = __webpack_require__(2);
// Utils
const {
isGrip,
wrapRender
} = __webpack_require__(0);
-const { rep: StringRep } = __webpack_require__(7);
+const { rep: StringRep } = __webpack_require__(6);
const { MODE } = __webpack_require__(3);
-const nodeConstants = __webpack_require__(11);
+const nodeConstants = __webpack_require__(12);
const Svg = __webpack_require__(9);
const dom = __webpack_require__(1);
const { span } = dom;
/**
* Renders DOM element node.
*/
@@ -4711,17 +4711,17 @@ module.exports = {
const PropTypes = __webpack_require__(2);
// Reps
const {
isGrip,
wrapRender
} = __webpack_require__(0);
-const String = __webpack_require__(7).rep;
+const String = __webpack_require__(6).rep;
const dom = __webpack_require__(1);
const { span } = dom;
/**
* Renders a grip object with textual data.
*/
ObjectWithText.propTypes = {
@@ -4839,36 +4839,36 @@ var _devtoolsComponents = __webpack_requ
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__(6);
+const { Component, createFactory } = __webpack_require__(7);
const PropTypes = __webpack_require__(2);
const dom = __webpack_require__(1);
const Tree = createFactory(_devtoolsComponents2.default.Tree);
-__webpack_require__(55);
-
-const classnames = __webpack_require__(56);
+__webpack_require__(53);
+
+const classnames = __webpack_require__(54);
const {
REPS: {
Rep,
Grip
}
} = __webpack_require__(4);
const {
MODE
} = __webpack_require__(3);
-const Utils = __webpack_require__(15);
+const Utils = __webpack_require__(16);
const {
getChildren,
getClosestGripNode,
getParent,
getValue,
nodeHasAccessors,
nodeHasProperties,
@@ -4937,17 +4937,25 @@ class ObjectInspector extends Component
self.getRoots = this.getRoots.bind(this);
}
shouldComponentUpdate(nextProps, nextState) {
const {
expandedPaths,
loadedProperties
} = this.state;
- return this.props.roots !== nextProps.roots || expandedPaths.size !== nextState.expandedPaths.size || loadedProperties.size !== nextState.loadedProperties.size || [...expandedPaths].some(key => !nextState.expandedPaths.has(key));
+
+ if (this.props.roots !== nextProps.roots) {
+ // Since the roots changed, we assume the properties did as well. Thus we can clear
+ // the cachedNodes to avoid bugs and memory leaks.
+ this.cachedNodes.clear();
+ return true;
+ }
+
+ return expandedPaths.size !== nextState.expandedPaths.size || loadedProperties.size !== nextState.loadedProperties.size || [...expandedPaths].some(key => !nextState.expandedPaths.has(key));
}
componentWillUnmount() {
const { releaseActor } = this.props;
if (typeof releaseActor !== "function") {
return;
}
@@ -5234,43 +5242,43 @@ module.exports = {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
-var _react = __webpack_require__(6);
+var _react = __webpack_require__(7);
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__(51);
+var _svgInlineReact = __webpack_require__(11);
var _svgInlineReact2 = _interopRequireDefault(_svgInlineReact);
-var _arrow = __webpack_require__(53);
+var _arrow = __webpack_require__(51);
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__(54);
+__webpack_require__(52);
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 {
@@ -6019,187 +6027,34 @@ class Tree extends Component {
}, nodes);
}
}
exports.default = Tree;
/***/ }),
/* 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>"
/***/ }),
-/* 54 */
+/* 52 */
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
-/* 55 */
+/* 53 */
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
-/* 56 */
+/* 54 */
/***/ (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 */
@@ -6244,49 +6099,49 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBP
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else {
window.classNames = classNames;
}
}());
/***/ }),
-/* 57 */
+/* 55 */
/***/ (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 {
enumEntries,
enumIndexedProperties,
enumNonIndexedProperties,
getPrototype,
enumSymbols
-} = __webpack_require__(16);
+} = __webpack_require__(17);
const {
getClosestGripNode,
getClosestNonBucketNode,
getValue,
nodeHasAccessors,
nodeHasAllEntriesInPreview,
nodeHasProperties,
nodeIsBucket,
nodeIsDefaultProperties,
nodeIsEntries,
nodeIsMapEntry,
nodeIsPrimitive,
nodeIsProxy,
nodeNeedsNumericalBuckets
-} = __webpack_require__(17);
+} = __webpack_require__(18);
function loadItemProperties(item, createObjectClient, loadedProperties) {
const [start, end] = item.meta ? [item.meta.startIndex, item.meta.endIndex] : [];
let objectClient;
const getObjectClient = () => {
if (objectClient) {
return objectClient;
@@ -6381,16 +6236,16 @@ module.exports = {
shouldLoadItemEntries,
shouldLoadItemIndexedProperties,
shouldLoadItemNonIndexedProperties,
shouldLoadItemPrototype,
shouldLoadItemSymbols
};
/***/ }),
-/* 58 */
+/* 56 */
/***/ (function(module, exports) {
-module.exports = __WEBPACK_EXTERNAL_MODULE_58__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_56__;
/***/ })
/******/ ]);
});
\ No newline at end of file