Bug 1359338 - Update reps bundle to 0.7.0. r=Honza
MozReview-Commit-ID: IomllBwp21b
--- a/devtools/client/shared/components/reps/reps.js
+++ b/devtools/client/shared/components/reps/reps.js
@@ -56,28 +56,30 @@ return /******/ (function(modules) { //
const { MODE } = __webpack_require__(1);
const { REPS, getRep } = __webpack_require__(2);
const {
createFactories,
parseURLEncodedText,
parseURLParams,
getSelectableInInspectorGrips,
- maybeEscapePropertyName
+ maybeEscapePropertyName,
+ getGripPreviewItems
} = __webpack_require__(3);
module.exports = {
REPS,
getRep,
MODE,
createFactories,
maybeEscapePropertyName,
parseURLEncodedText,
parseURLParams,
- getSelectableInInspectorGrips
+ getSelectableInInspectorGrips,
+ getGripPreviewItems
};
/***/ },
/* 1 */
/***/ function(module, exports) {
module.exports = {
MODE: {
@@ -571,37 +573,47 @@ return /******/ (function(modules) { //
// Set or Map Grip
if (grip.preview && grip.preview.entries) {
return grip.preview.entries.reduce((res, entry) => res.concat(entry), []);
}
// Event Grip
if (grip.preview && grip.preview.target) {
- return [grip.preview.target];
+ let keys = Object.keys(grip.preview.properties);
+ let values = Object.values(grip.preview.properties);
+ return [grip.preview.target, ...keys, ...values];
+ }
+
+ // RegEx Grip
+ if (grip.displayString) {
+ return [grip.displayString];
}
// Generic Grip
if (grip.preview && grip.preview.ownProperties) {
let propertiesValues = Object.values(grip.preview.ownProperties).map(property => property.value || property);
+ let propertyKeys = Object.keys(grip.preview.ownProperties);
+ propertiesValues = propertiesValues.concat(propertyKeys);
+
// ArrayBuffer Grip
if (grip.preview.safeGetterValues) {
propertiesValues = propertiesValues.concat(Object.values(grip.preview.safeGetterValues).map(property => property.getterValue || property));
}
return propertiesValues;
}
return [];
}
/**
* Returns a new element wrapped with a component, props.objectLink if it exists,
- * or a span if there are multiple childs, or directly the child if only one is passed.
+ * or a span if there are multiple children, or directly the child if only one is passed.
*
* @param {Object} props A Rep "props" object that may contain `objectLink`
* and `object` properties.
* @param {Object} config Object to pass as props to the `objectLink` component.
* @param {...Element} children Elements to be wrapped with the `objectLink` component.
* @return {Element} Element, wrapped or not, depending if `objectLink`
* was supplied in props.
*/
@@ -634,17 +646,18 @@ return /******/ (function(modules) { //
wrapRender,
cropMultipleLines,
parseURLParams,
parseURLEncodedText,
getFileName,
getURLDisplayString,
getSelectableInInspectorGrips,
maybeEscapePropertyName,
- safeObjectLink
+ safeObjectLink,
+ getGripPreviewItems
};
/***/ },
/* 4 */
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_4__;