@splunk/visualizations-shared 25.13.1 → 26.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Downloader.js +66 -11
- package/Downloader.js.map +1 -1
- package/FileDownloader.js +105 -31
- package/FileDownloader.js.map +1 -1
- package/JSONSchemaUtils.js +13 -8
- package/JSONSchemaUtils.js.map +1 -1
- package/Message.js +23 -12
- package/Message.js.map +1 -1
- package/RemoteIcon.js +93 -41
- package/RemoteIcon.js.map +1 -1
- package/RemoteImage.js +51 -16
- package/RemoteImage.js.map +1 -1
- package/SanitizeProps.js +50 -25
- package/SanitizeProps.js.map +1 -1
- package/SizeAwareWrapper.js +47 -19
- package/SizeAwareWrapper.js.map +1 -1
- package/VisualizationDocPage.js +72 -26
- package/VisualizationDocPage.js.map +1 -1
- package/colorConstants.js +2 -2
- package/colorConstants.js.map +1 -1
- package/colorUtils.js +27 -14
- package/colorUtils.js.map +1 -1
- package/configUtils.js +4 -2
- package/configUtils.js.map +1 -1
- package/console.js +14 -2
- package/console.js.map +1 -1
- package/dataSourceUtils.js +12 -3
- package/dataSourceUtils.js.map +1 -1
- package/domUtils.js +2 -2
- package/domUtils.js.map +1 -1
- package/hocUtils.js +29 -15
- package/hocUtils.js.map +1 -1
- package/i18n.js +4 -2
- package/i18n.js.map +1 -1
- package/iconUtils.js +11 -12
- package/iconUtils.js.map +1 -1
- package/mapUtils.js +4 -0
- package/mapUtils.js.map +1 -1
- package/namedColors.js +2 -2
- package/namedColors.js.map +1 -1
- package/numberUtils.js +31 -21
- package/numberUtils.js.map +1 -1
- package/package.json +12 -14
- package/previewVizMessage.js +2 -2
- package/previewVizMessage.js.map +1 -1
- package/propUtils.js +77 -12
- package/propUtils.js.map +1 -1
- package/schemaUtils.js +10 -10
- package/schemaUtils.js.map +1 -1
- package/simpleXMLOptions.js +6 -6
- package/simpleXMLOptions.js.map +1 -1
- package/style.js +11 -6
- package/style.js.map +1 -1
- package/testHelper.js +2 -2
- package/testHelper.js.map +1 -1
- package/themeUtils.js +14 -13
- package/themeUtils.js.map +1 -1
- package/trellisUtils.js +77 -33
- package/trellisUtils.js.map +1 -1
package/SanitizeProps.js
CHANGED
|
@@ -87,7 +87,7 @@ module.exports =
|
|
|
87
87
|
/******/
|
|
88
88
|
/******/
|
|
89
89
|
/******/ // Load entry module and return exports
|
|
90
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
90
|
+
/******/ return __webpack_require__(__webpack_require__.s = 48);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
@@ -99,6 +99,13 @@ module.exports = require("react");
|
|
|
99
99
|
|
|
100
100
|
/***/ }),
|
|
101
101
|
|
|
102
|
+
/***/ 2:
|
|
103
|
+
/***/ (function(module, exports) {
|
|
104
|
+
|
|
105
|
+
module.exports = require("lodash");
|
|
106
|
+
|
|
107
|
+
/***/ }),
|
|
108
|
+
|
|
102
109
|
/***/ 22:
|
|
103
110
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
104
111
|
|
|
@@ -341,32 +348,32 @@ var createTestSchema = function createTestSchema(optionsSchema) {
|
|
|
341
348
|
type: 'object',
|
|
342
349
|
properties: optionsSchema
|
|
343
350
|
};
|
|
344
|
-
};
|
|
351
|
+
}; // Below 2 regexs are copied from dashboard-framework/packages/dashboard-utils/src/token.jsc
|
|
345
352
|
|
|
346
|
-
|
|
347
|
-
var TOKEN_NAMESPACE_PREFIX_PATTERN = /(\w+:)?/.source;
|
|
348
|
-
// ex: token.name|suh (old-style filter chain)
|
|
353
|
+
var TOKEN_NAMESPACE_PREFIX_PATTERN = /(\w+:)?/.source; // ex: token.name|suh (old-style filter chain)
|
|
349
354
|
// ex: token.name|lower|capitalize (new-style filter chain)
|
|
355
|
+
|
|
350
356
|
var TOKEN_NAME_CHARS_PATTERN = /([^$|:]+?)(\|[|\w]+)?/.source;
|
|
351
|
-
var TOKEN_PATTERN = /\$/.source + TOKEN_NAMESPACE_PREFIX_PATTERN + TOKEN_NAME_CHARS_PATTERN + /\$/.source;
|
|
352
|
-
// rgb and rgba regexes were derived from:
|
|
357
|
+
var TOKEN_PATTERN = /\$/.source + TOKEN_NAMESPACE_PREFIX_PATTERN + TOKEN_NAME_CHARS_PATTERN + /\$/.source; // rgb and rgba regexes were derived from:
|
|
353
358
|
// https://stackoverflow.com/questions/9585973/javascript-regular-expression-for-rgb-values/9586150
|
|
354
359
|
// https://github.com/regexhq/rgba-regex
|
|
355
360
|
// NOTE: this will incorrectly accept values like rgb(999,999,999), but may be overkill to specify a regex that limits values to <= 255
|
|
361
|
+
|
|
356
362
|
var rgbColorPattern = /^rgb\(\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/;
|
|
357
|
-
var rgbaColorPattern = /^rgba\(\s*(\d{1,3}%?),\s*(\d{1,3}%?),\s*(\d{1,3}%?),\s*(\d*(?:\.\d+)?)\)$/;
|
|
358
|
-
|
|
363
|
+
var rgbaColorPattern = /^rgba\(\s*(\d{1,3}%?),\s*(\d{1,3}%?),\s*(\d{1,3}%?),\s*(\d*(?:\.\d+)?)\)$/; // todo: rename this to COLOR_PATTERN and replace all occurences.
|
|
364
|
+
|
|
359
365
|
var colorPattern = '^#[0-9a-fA-F]{6}$|transparent';
|
|
360
366
|
var colorPatternWithRGBA = "".concat(colorPattern, "|").concat(rgbColorPattern.source, "|").concat(rgbaColorPattern.source);
|
|
361
367
|
var COLOR_OR_TOKEN_PATTERN = "".concat(colorPattern, "|").concat(TOKEN_PATTERN);
|
|
362
|
-
var COLOR_OR_TOKEN_PATTERN_WITH_RGBA = "".concat(colorPatternWithRGBA, "|").concat(TOKEN_PATTERN);
|
|
363
|
-
|
|
368
|
+
var COLOR_OR_TOKEN_PATTERN_WITH_RGBA = "".concat(colorPatternWithRGBA, "|").concat(TOKEN_PATTERN); // dynamic option DSL expressions always start with a >
|
|
369
|
+
|
|
364
370
|
var DYNAMIC_OPTIONS_DSL_PATTERN = /^>.*/.source;
|
|
365
371
|
/**
|
|
366
372
|
* Returns the regex string that matches each passed in value as well as tokens.
|
|
367
373
|
* @param {Array.<string>} values
|
|
368
374
|
* @returns {string}
|
|
369
375
|
*/
|
|
376
|
+
|
|
370
377
|
var getPattern = function getPattern(values) {
|
|
371
378
|
return values.reduce(function (accumulator, value) {
|
|
372
379
|
return "".concat(accumulator, "|^").concat(value, "$");
|
|
@@ -383,8 +390,8 @@ var getPattern = function getPattern(values) {
|
|
|
383
390
|
|
|
384
391
|
Object.defineProperty(exports, "__esModule", {
|
|
385
392
|
value: true
|
|
386
|
-
});
|
|
387
|
-
|
|
393
|
+
}); // Reference - https://www.w3.org/TR/css-color-4/#named-colors
|
|
394
|
+
|
|
388
395
|
exports.default = ['transparent', 'aliceblue', 'antiquewhite', 'aqua', 'aquamarine', 'azure', 'beige', 'bisque', 'black', 'blanchedalmond', 'blue', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'fuchsia', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'gray', 'green', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'lime', 'limegreen', 'linen', 'magenta', 'maroon', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'navy', 'oldlace', 'olive', 'olivedrab', 'orange', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'purple', 'rebeccapurple', 'red', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'silver', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'teal', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'white', 'whitesmoke', 'yellow', 'yellowgreen'];
|
|
389
396
|
|
|
390
397
|
/***/ }),
|
|
@@ -399,7 +406,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
399
406
|
value: true
|
|
400
407
|
});
|
|
401
408
|
exports.sanitizeArrayOfColors = exports.isArrayOfColors = exports.isColor = void 0;
|
|
409
|
+
|
|
402
410
|
var schemaUtils_1 = __webpack_require__(22);
|
|
411
|
+
|
|
403
412
|
var namedColors_1 = __webpack_require__(23);
|
|
404
413
|
/**
|
|
405
414
|
* Validates if a given string is a valid color
|
|
@@ -407,21 +416,28 @@ var namedColors_1 = __webpack_require__(23);
|
|
|
407
416
|
* @param {string} color
|
|
408
417
|
* @returns {boolean}
|
|
409
418
|
*/
|
|
419
|
+
|
|
420
|
+
|
|
410
421
|
function isColor() {
|
|
411
422
|
var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
423
|
+
|
|
412
424
|
if (typeof color !== 'string') {
|
|
413
425
|
return false;
|
|
414
426
|
}
|
|
427
|
+
|
|
415
428
|
if (color.charAt(0) === '#') {
|
|
416
429
|
color = color.substring(1); // eslint-disable-line no-param-reassign
|
|
430
|
+
|
|
417
431
|
return [3, 4, 6, 8].indexOf(color.length) > -1 && !Number.isNaN(parseInt(color, 16));
|
|
418
432
|
}
|
|
433
|
+
|
|
419
434
|
var trimmedColor = color.trim();
|
|
435
|
+
|
|
420
436
|
if (schemaUtils_1.rgbColorPattern.test(trimmedColor) || schemaUtils_1.rgbaColorPattern.test(trimmedColor)) {
|
|
421
437
|
return true;
|
|
422
438
|
}
|
|
423
|
-
|
|
424
|
-
// for future when we want to support rgb | hsl
|
|
439
|
+
|
|
440
|
+
return namedColors_1.default.includes(color.toLowerCase()); // for future when we want to support rgb | hsl
|
|
425
441
|
// return /^(rgb|hsl)a?\((\d+%?(deg|rad|grad|turn)?[,\s]+){2,3}[\s\/]*[\d\.]+%?\)$/i.test(color);
|
|
426
442
|
}
|
|
427
443
|
|
|
@@ -431,9 +447,11 @@ exports.isColor = isColor;
|
|
|
431
447
|
* @param colors
|
|
432
448
|
* @returns
|
|
433
449
|
*/
|
|
450
|
+
|
|
434
451
|
var isArrayOfColors = function isArrayOfColors(colors) {
|
|
435
452
|
return Array.isArray(colors) && colors.every(isColor);
|
|
436
453
|
};
|
|
454
|
+
|
|
437
455
|
exports.isArrayOfColors = isArrayOfColors;
|
|
438
456
|
/**
|
|
439
457
|
* Sanitizes an array of colors `arr` to replace any non-color values with undefined,
|
|
@@ -443,23 +461,18 @@ exports.isArrayOfColors = isArrayOfColors;
|
|
|
443
461
|
* @param {string} fallback
|
|
444
462
|
* @returns {string[]} sanitized array any non-color values replaced with `fallback`
|
|
445
463
|
*/
|
|
464
|
+
|
|
446
465
|
var sanitizeArrayOfColors = function sanitizeArrayOfColors(arr, fallback) {
|
|
447
466
|
return arr.map(function (entry) {
|
|
448
467
|
return isColor(entry) ? entry : fallback;
|
|
449
468
|
});
|
|
450
469
|
};
|
|
451
|
-
exports.sanitizeArrayOfColors = sanitizeArrayOfColors;
|
|
452
|
-
|
|
453
|
-
/***/ }),
|
|
454
|
-
|
|
455
|
-
/***/ 4:
|
|
456
|
-
/***/ (function(module, exports) {
|
|
457
470
|
|
|
458
|
-
|
|
471
|
+
exports.sanitizeArrayOfColors = sanitizeArrayOfColors;
|
|
459
472
|
|
|
460
473
|
/***/ }),
|
|
461
474
|
|
|
462
|
-
/***/
|
|
475
|
+
/***/ 48:
|
|
463
476
|
/***/ (function(module, exports, __webpack_require__) {
|
|
464
477
|
|
|
465
478
|
"use strict";
|
|
@@ -470,9 +483,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
470
483
|
});
|
|
471
484
|
exports.withSanitizedProps = exports.sanitize = void 0;
|
|
472
485
|
/* eslint-disable no-param-reassign */
|
|
486
|
+
|
|
473
487
|
var React = __webpack_require__(1);
|
|
474
|
-
|
|
488
|
+
|
|
489
|
+
var lodash_1 = __webpack_require__(2);
|
|
490
|
+
|
|
475
491
|
var colorUtils_1 = __webpack_require__(27);
|
|
492
|
+
|
|
476
493
|
var propsKeyValidators = {
|
|
477
494
|
backgroundColor: colorUtils_1.isColor,
|
|
478
495
|
deltaColor: colorUtils_1.isColor,
|
|
@@ -515,6 +532,7 @@ var propsKeyValidators = {
|
|
|
515
532
|
* @param {string} value
|
|
516
533
|
* @returns {boolean}
|
|
517
534
|
*/
|
|
535
|
+
|
|
518
536
|
function isValidProperty(key, value) {
|
|
519
537
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
520
538
|
return hasOwnProperty.call(propsKeyValidators, key) ? propsKeyValidators[key](value) : true;
|
|
@@ -528,16 +546,20 @@ function isValidProperty(key, value) {
|
|
|
528
546
|
* @param {T} props
|
|
529
547
|
* @returns {Partial<T>}
|
|
530
548
|
*/
|
|
549
|
+
|
|
550
|
+
|
|
531
551
|
function sanitize(props) {
|
|
532
552
|
return Object.keys(props).reduce(function (accum, key) {
|
|
533
|
-
if (key === 'options' && lodash_1.isPlainObject(props.options)) {
|
|
553
|
+
if (key === 'options' && (0, lodash_1.isPlainObject)(props.options)) {
|
|
534
554
|
accum[key] = sanitize(props.options);
|
|
535
555
|
} else if (isValidProperty(key, props[key])) {
|
|
536
556
|
accum[key] = props[key];
|
|
537
557
|
}
|
|
558
|
+
|
|
538
559
|
return accum;
|
|
539
560
|
}, {});
|
|
540
561
|
}
|
|
562
|
+
|
|
541
563
|
exports.sanitize = sanitize;
|
|
542
564
|
/**
|
|
543
565
|
* Helper HOC which will sanitize invalid props
|
|
@@ -546,13 +568,16 @@ exports.sanitize = sanitize;
|
|
|
546
568
|
* @param {React.ComponentType} WrappedComponent
|
|
547
569
|
* @returns {React.ComponentType}
|
|
548
570
|
*/
|
|
571
|
+
|
|
549
572
|
function withSanitizedProps(WrappedComponent) {
|
|
550
573
|
var Wrapper = function Wrapper(props) {
|
|
551
574
|
var sanitizedProps = sanitize(props);
|
|
552
575
|
return React.createElement(WrappedComponent, Object.assign({}, sanitizedProps));
|
|
553
576
|
};
|
|
577
|
+
|
|
554
578
|
return Wrapper;
|
|
555
579
|
}
|
|
580
|
+
|
|
556
581
|
exports.withSanitizedProps = withSanitizedProps;
|
|
557
582
|
|
|
558
583
|
/***/ })
|
package/SanitizeProps.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///./src/schemaUtils.js","webpack:///./src/namedColors.ts","webpack:///./src/colorUtils.ts","webpack:///external \"lodash\"","webpack:///./src/SanitizeProps.tsx"],"names":["$schema","$id","title","definitions","schemaArray","type","minItems","items","$ref","nonNegativeInteger","minimum","nonNegativeIntegerDefault0","allOf","default","simpleTypes","enum","stringArray","uniqueItems","properties","format","$comment","description","readOnly","examples","multipleOf","exclusiveMinimum","maximum","exclusiveMaximum","maxLength","minLength","pattern","additionalItems","anyOf","maxItems","contains","maxProperties","minProperties","required","additionalProperties","patternProperties","propertyNames","dependencies","const","contentMediaType","contentEncoding","if","then","else","oneOf","not","createTestSchema","optionsSchema","TOKEN_NAMESPACE_PREFIX_PATTERN","source","TOKEN_NAME_CHARS_PATTERN","TOKEN_PATTERN","rgbColorPattern","rgbaColorPattern","colorPattern","colorPatternWithRGBA","concat","COLOR_OR_TOKEN_PATTERN","COLOR_OR_TOKEN_PATTERN_WITH_RGBA","DYNAMIC_OPTIONS_DSL_PATTERN","getPattern","values","reduce","accumulator","value","exports","schemaUtils_1","require","namedColors_1","isColor","color","arguments","length","undefined","charAt","substring","indexOf","Number","isNaN","parseInt","trimmedColor","trim","test","includes","toLowerCase","isArrayOfColors","colors","Array","isArray","every","sanitizeArrayOfColors","arr","fallback","map","entry","React","lodash_1","colorUtils_1","propsKeyValidators","backgroundColor","deltaColor","trendColor","fontColor","fillColor","gaugeColor","majorColor","radialBackgroundColor","radialStrokeColor","sparklineFillColor","sparklineStrokeColor","strokeColor","strokeHighlightColor","headerBackgroundColor","rowBackgroundColorOdd","rowBackgroundColorEven","headerTextColor","rowTextColorOdd","rowTextColorEven","textColor","defaultFontColor","defaultBlockFontColor","sparklineAreaColor","iconColor","areaColor","nodeColor","nodeHighlightColor","linkColor","nodeTextColor","nodeTextHighlightColor","trellisBackgroundColor","isValidProperty","key","hasOwnProperty","Object","prototype","call","sanitize","props","keys","accum","isPlainObject","options","withSanitizedProps","WrappedComponent","Wrapper","sanitizedProps","createElement","assign"],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAA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AATA1E,OAAA,CAAAuE,QAAA,GAAAA,QAAA;AAWA;;;;;;;AAOA,SAAgBM,kBAAkBA,CAC9BC,gBAAwC;EAExC,IAAMC,OAAO,GAAG,SAAVA,OAAOA,CAAIP,KAAQ,EAAI;IACzB,IAAMQ,cAAc,GAAGT,QAAQ,CAACC,KAAK,CAAC;IACtC,OAAO1C,KAAA,CAAAmD,aAAA,CAACH,gBAAgB,EAAAV,MAAA,CAAAc,MAAA,KAAMF,cAAoB,EAAI;EAC1D,CAAC;EACD,OAAOD,OAAO;AAClB;AARA/E,OAAA,CAAA6E,kBAAA,GAAAA,kBAAA,C","file":"SanitizeProps.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 49);\n","module.exports = require(\"react\");","export default {\n $schema: 'http://json-schema.org/draft-07/schema#',\n $id: 'http://json-schema.org/draft-07/schema#',\n title: 'Core schema meta-schema',\n definitions: {\n schemaArray: {\n type: 'array',\n minItems: 1,\n items: { $ref: '#' },\n },\n nonNegativeInteger: {\n type: 'integer',\n minimum: 0,\n },\n nonNegativeIntegerDefault0: {\n allOf: [{ $ref: '#/definitions/nonNegativeInteger' }, { default: 0 }],\n },\n simpleTypes: {\n enum: ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'],\n },\n stringArray: {\n type: 'array',\n items: { type: 'string' },\n uniqueItems: true,\n default: [],\n },\n },\n type: ['object', 'boolean'],\n properties: {\n $id: {\n type: 'string',\n format: 'uri-reference',\n },\n $schema: {\n type: 'string',\n format: 'uri',\n },\n $ref: {\n type: 'string',\n format: 'uri-reference',\n },\n $comment: {\n type: 'string',\n },\n title: {\n type: 'string',\n },\n description: {\n type: 'string',\n },\n default: true,\n readOnly: {\n type: 'boolean',\n default: false,\n },\n examples: {\n type: 'array',\n items: true,\n },\n multipleOf: {\n type: 'number',\n exclusiveMinimum: 0,\n },\n maximum: {\n type: 'number',\n },\n exclusiveMaximum: {\n type: 'number',\n },\n minimum: {\n type: 'number',\n },\n exclusiveMinimum: {\n type: 'number',\n },\n maxLength: { $ref: '#/definitions/nonNegativeInteger' },\n minLength: { $ref: '#/definitions/nonNegativeIntegerDefault0' },\n pattern: {\n type: 'string',\n format: 'regex',\n },\n additionalItems: { $ref: '#' },\n items: {\n anyOf: [{ $ref: '#' }, { $ref: '#/definitions/schemaArray' }],\n default: true,\n },\n maxItems: { $ref: '#/definitions/nonNegativeInteger' },\n minItems: { $ref: '#/definitions/nonNegativeIntegerDefault0' },\n uniqueItems: {\n type: 'boolean',\n default: false,\n },\n contains: { $ref: '#' },\n maxProperties: { $ref: '#/definitions/nonNegativeInteger' },\n minProperties: { $ref: '#/definitions/nonNegativeIntegerDefault0' },\n required: { $ref: '#/definitions/stringArray' },\n additionalProperties: { $ref: '#' },\n definitions: {\n type: 'object',\n additionalProperties: { $ref: '#' },\n default: {},\n },\n properties: {\n type: 'object',\n additionalProperties: { $ref: '#' },\n default: {},\n },\n patternProperties: {\n type: 'object',\n additionalProperties: { $ref: '#' },\n propertyNames: { format: 'regex' },\n default: {},\n },\n dependencies: {\n type: 'object',\n additionalProperties: {\n anyOf: [{ $ref: '#' }, { $ref: '#/definitions/stringArray' }],\n },\n },\n propertyNames: { $ref: '#' },\n const: true,\n enum: {\n type: 'array',\n items: true,\n minItems: 1,\n uniqueItems: true,\n },\n type: {\n anyOf: [\n { $ref: '#/definitions/simpleTypes' },\n {\n type: 'array',\n items: { $ref: '#/definitions/simpleTypes' },\n minItems: 1,\n uniqueItems: true,\n },\n ],\n },\n format: { type: 'string' },\n contentMediaType: { type: 'string' },\n contentEncoding: { type: 'string' },\n if: { $ref: '#' },\n then: { $ref: '#' },\n else: { $ref: '#' },\n allOf: { $ref: '#/definitions/schemaArray' },\n anyOf: { $ref: '#/definitions/schemaArray' },\n oneOf: { $ref: '#/definitions/schemaArray' },\n not: { $ref: '#' },\n },\n default: true,\n};\n\nexport const createTestSchema = optionsSchema => ({\n $schema: 'http://json-schema.org/draft-07/schema#',\n $id: 'http://www.splunk.com/dashboard.schema.json',\n title: 'Dashboard Definition',\n description: 'Dashboard Definition',\n type: 'object',\n properties: optionsSchema,\n});\n\n// Below 2 regexs are copied from dashboard-framework/packages/dashboard-utils/src/token.jsc\nconst TOKEN_NAMESPACE_PREFIX_PATTERN = /(\\w+:)?/.source;\n// ex: token.name|suh (old-style filter chain)\n// ex: token.name|lower|capitalize (new-style filter chain)\nconst TOKEN_NAME_CHARS_PATTERN = /([^$|:]+?)(\\|[|\\w]+)?/.source;\n\nexport const TOKEN_PATTERN =\n /\\$/.source + TOKEN_NAMESPACE_PREFIX_PATTERN + TOKEN_NAME_CHARS_PATTERN + /\\$/.source;\n// rgb and rgba regexes were derived from:\n// https://stackoverflow.com/questions/9585973/javascript-regular-expression-for-rgb-values/9586150\n// https://github.com/regexhq/rgba-regex\n// NOTE: this will incorrectly accept values like rgb(999,999,999), but may be overkill to specify a regex that limits values to <= 255\nexport const rgbColorPattern = /^rgb\\(\\s*(\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/;\nexport const rgbaColorPattern = /^rgba\\(\\s*(\\d{1,3}%?),\\s*(\\d{1,3}%?),\\s*(\\d{1,3}%?),\\s*(\\d*(?:\\.\\d+)?)\\)$/;\n// todo: rename this to COLOR_PATTERN and replace all occurences.\nexport const colorPattern = '^#[0-9a-fA-F]{6}$|transparent';\nexport const colorPatternWithRGBA = `${colorPattern}|${rgbColorPattern.source}|${rgbaColorPattern.source}`;\nexport const COLOR_OR_TOKEN_PATTERN = `${colorPattern}|${TOKEN_PATTERN}`;\nexport const COLOR_OR_TOKEN_PATTERN_WITH_RGBA = `${colorPatternWithRGBA}|${TOKEN_PATTERN}`;\n// dynamic option DSL expressions always start with a >\nexport const DYNAMIC_OPTIONS_DSL_PATTERN = /^>.*/.source;\n/**\n * Returns the regex string that matches each passed in value as well as tokens.\n * @param {Array.<string>} values\n * @returns {string}\n */\nexport const getPattern = values =>\n values.reduce((accumulator, value) => `${accumulator}|^${value}$`, TOKEN_PATTERN);\n","// Reference - https://www.w3.org/TR/css-color-4/#named-colors\nexport default [\n 'transparent',\n 'aliceblue',\n 'antiquewhite',\n 'aqua',\n 'aquamarine',\n 'azure',\n 'beige',\n 'bisque',\n 'black',\n 'blanchedalmond',\n 'blue',\n 'blueviolet',\n 'brown',\n 'burlywood',\n 'cadetblue',\n 'chartreuse',\n 'chocolate',\n 'coral',\n 'cornflowerblue',\n 'cornsilk',\n 'crimson',\n 'cyan',\n 'darkblue',\n 'darkcyan',\n 'darkgoldenrod',\n 'darkgray',\n 'darkgreen',\n 'darkgrey',\n 'darkkhaki',\n 'darkmagenta',\n 'darkolivegreen',\n 'darkorange',\n 'darkorchid',\n 'darkred',\n 'darksalmon',\n 'darkseagreen',\n 'darkslateblue',\n 'darkslategray',\n 'darkslategrey',\n 'darkturquoise',\n 'darkviolet',\n 'deeppink',\n 'deepskyblue',\n 'dimgray',\n 'dimgrey',\n 'dodgerblue',\n 'firebrick',\n 'floralwhite',\n 'forestgreen',\n 'fuchsia',\n 'gainsboro',\n 'ghostwhite',\n 'gold',\n 'goldenrod',\n 'gray',\n 'green',\n 'greenyellow',\n 'grey',\n 'honeydew',\n 'hotpink',\n 'indianred',\n 'indigo',\n 'ivory',\n 'khaki',\n 'lavender',\n 'lavenderblush',\n 'lawngreen',\n 'lemonchiffon',\n 'lightblue',\n 'lightcoral',\n 'lightcyan',\n 'lightgoldenrodyellow',\n 'lightgray',\n 'lightgreen',\n 'lightgrey',\n 'lightpink',\n 'lightsalmon',\n 'lightseagreen',\n 'lightskyblue',\n 'lightslategray',\n 'lightslategrey',\n 'lightsteelblue',\n 'lightyellow',\n 'lime',\n 'limegreen',\n 'linen',\n 'magenta',\n 'maroon',\n 'mediumaquamarine',\n 'mediumblue',\n 'mediumorchid',\n 'mediumpurple',\n 'mediumseagreen',\n 'mediumslateblue',\n 'mediumspringgreen',\n 'mediumturquoise',\n 'mediumvioletred',\n 'midnightblue',\n 'mintcream',\n 'mistyrose',\n 'moccasin',\n 'navajowhite',\n 'navy',\n 'oldlace',\n 'olive',\n 'olivedrab',\n 'orange',\n 'orangered',\n 'orchid',\n 'palegoldenrod',\n 'palegreen',\n 'paleturquoise',\n 'palevioletred',\n 'papayawhip',\n 'peachpuff',\n 'peru',\n 'pink',\n 'plum',\n 'powderblue',\n 'purple',\n 'rebeccapurple',\n 'red',\n 'rosybrown',\n 'royalblue',\n 'saddlebrown',\n 'salmon',\n 'sandybrown',\n 'seagreen',\n 'seashell',\n 'sienna',\n 'silver',\n 'skyblue',\n 'slateblue',\n 'slategray',\n 'slategrey',\n 'snow',\n 'springgreen',\n 'steelblue',\n 'tan',\n 'teal',\n 'thistle',\n 'tomato',\n 'turquoise',\n 'violet',\n 'wheat',\n 'white',\n 'whitesmoke',\n 'yellow',\n 'yellowgreen',\n];\n","import { rgbColorPattern, rgbaColorPattern } from './schemaUtils';\nimport namedColors from './namedColors';\n\n/**\n * Validates if a given string is a valid color\n *\n * @param {string} color\n * @returns {boolean}\n */\nexport function isColor(color = ''): boolean {\n if (typeof color !== 'string') {\n return false;\n }\n if (color.charAt(0) === '#') {\n color = color.substring(1); // eslint-disable-line no-param-reassign\n return [3, 4, 6, 8].indexOf(color.length) > -1 && !Number.isNaN(parseInt(color, 16));\n }\n const trimmedColor = color.trim();\n if (rgbColorPattern.test(trimmedColor) || rgbaColorPattern.test(trimmedColor)) {\n return true;\n }\n return namedColors.includes(color.toLowerCase());\n // for future when we want to support rgb | hsl\n // return /^(rgb|hsl)a?\\((\\d+%?(deg|rad|grad|turn)?[,\\s]+){2,3}[\\s\\/]*[\\d\\.]+%?\\)$/i.test(color);\n}\n\n/**\n * Validates if a given array of strings is a valid array of colors\n * @param colors\n * @returns\n */\nexport const isArrayOfColors = (colors: string[]) => Array.isArray(colors) && colors.every(isColor);\n\n/**\n * Sanitizes an array of colors `arr` to replace any non-color values with undefined,\n * or the value of `fallback` if provided.\n *\n * @param arr\n * @param {string} fallback\n * @returns {string[]} sanitized array any non-color values replaced with `fallback`\n */\nexport const sanitizeArrayOfColors = (arr: any[], fallback?: string): string[] => {\n return arr.map(entry => (isColor(entry) ? entry : fallback));\n};\n","module.exports = require(\"lodash\");","/* eslint-disable no-param-reassign */\nimport * as React from 'react';\nimport { isPlainObject } from 'lodash';\nimport { isColor } from './colorUtils';\n\nconst propsKeyValidators = {\n backgroundColor: isColor,\n deltaColor: isColor, // SV react-visualizations & dashboard-visualizations\n trendColor: isColor, // SV visualizations\n fontColor: isColor,\n fillColor: isColor,\n gaugeColor: isColor,\n majorColor: isColor,\n radialBackgroundColor: isColor,\n radialStrokeColor: isColor,\n sparklineFillColor: isColor,\n sparklineStrokeColor: isColor,\n strokeColor: isColor,\n strokeHighlightColor: isColor,\n headerBackgroundColor: isColor,\n rowBackgroundColorOdd: isColor,\n rowBackgroundColorEven: isColor,\n headerTextColor: isColor,\n rowTextColorOdd: isColor,\n rowTextColorEven: isColor,\n color: isColor,\n textColor: isColor,\n defaultFontColor: isColor,\n defaultBlockFontColor: isColor,\n sparklineAreaColor: isColor,\n iconColor: isColor,\n areaColor: isColor,\n nodeColor: isColor,\n nodeHighlightColor: isColor,\n linkColor: isColor,\n nodeTextColor: isColor,\n nodeTextHighlightColor: isColor,\n trellisBackgroundColor: isColor,\n};\n\n/**\n * Validates if a given key value pair are valid\n * based on a set of predefined rules.\n *\n * @param {string} key\n * @param {string} value\n * @returns {boolean}\n */\nfunction isValidProperty(key: string, value: string): boolean {\n const { hasOwnProperty } = Object.prototype;\n return hasOwnProperty.call(propsKeyValidators, key) ? propsKeyValidators[key](value) : true;\n}\n\n/**\n * Validates every property in the key and return\n * only valid keys\n *\n * @export\n * @template T\n * @param {T} props\n * @returns {Partial<T>}\n */\nexport function sanitize<T extends Record<string, any>>(props: T): Partial<T> {\n return Object.keys(props).reduce((accum, key) => {\n if (key === 'options' && isPlainObject(props.options)) {\n accum[key] = sanitize(props.options);\n } else if (isValidProperty(key, props[key])) {\n accum[key] = props[key];\n }\n return accum;\n }, {});\n}\n\n/**\n * Helper HOC which will sanitize invalid props\n *\n * @export\n * @param {React.ComponentType} WrappedComponent\n * @returns {React.ComponentType}\n */\nexport function withSanitizedProps<T>(\n WrappedComponent: React.ComponentType<T>\n): React.ComponentType<Partial<T>> {\n const Wrapper = (props: T) => {\n const sanitizedProps = sanitize(props);\n return <WrappedComponent {...(sanitizedProps as T)} />;\n };\n return Wrapper;\n}\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///external \"lodash\"","webpack:///./src/schemaUtils.js","webpack:///./src/namedColors.ts","webpack:///./src/colorUtils.ts","webpack:///./src/SanitizeProps.tsx"],"names":["$schema","$id","title","definitions","schemaArray","type","minItems","items","$ref","nonNegativeInteger","minimum","nonNegativeIntegerDefault0","allOf","default","simpleTypes","enum","stringArray","uniqueItems","properties","format","$comment","description","readOnly","examples","multipleOf","exclusiveMinimum","maximum","exclusiveMaximum","maxLength","minLength","pattern","additionalItems","anyOf","maxItems","contains","maxProperties","minProperties","required","additionalProperties","patternProperties","propertyNames","dependencies","const","contentMediaType","contentEncoding","if","then","else","oneOf","not","createTestSchema","optionsSchema","TOKEN_NAMESPACE_PREFIX_PATTERN","TOKEN_NAME_CHARS_PATTERN","TOKEN_PATTERN","rgbColorPattern","rgbaColorPattern","colorPattern","colorPatternWithRGBA","COLOR_OR_TOKEN_PATTERN","COLOR_OR_TOKEN_PATTERN_WITH_RGBA","DYNAMIC_OPTIONS_DSL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ACvC,cADuC;AAE/C,SAAO,cAAc,CAAC,IAAf,CAAoB,kBAApB,EAAwC,GAAxC,IAA+C,kBAAkB,CAAC,GAAD,CAAlB,CAAwB,KAAxB,CAA/C,GAAgF,IAAvF;AACH;AAED;;;;;;;;AAQG;;;AACH,SAAgB,QAAhB,CAAwD,KAAxD,EAAgE;AAC5D,SAAO,MAAM,CAAC,IAAP,CAAY,KAAZ,EAAmB,MAAnB,CAA0B,UAAC,KAAD,EAAQ,GAAR,EAAe;AAC5C,QAAI,GAAG,KAAK,SAAR,IAAqB,4BAAc,KAAK,CAAC,OAApB,CAAzB,EAAuD;AACnD,WAAK,CAAC,GAAD,CAAL,GAAa,QAAQ,CAAC,KAAK,CAAC,OAAP,CAArB;AACH,KAFD,MAEO,IAAI,eAAe,CAAC,GAAD,EAAM,KAAK,CAAC,GAAD,CAAX,CAAnB,EAAsC;AACzC,WAAK,CAAC,GAAD,CAAL,GAAa,KAAK,CAAC,GAAD,CAAlB;AACH;;AACD,WAAO,KAAP;AACH,GAPM,EAOJ,EAPI,CAAP;AAQH;;AATD;AAWA;;;;;;AAMG;;AACH,SAAgB,kBAAhB,CACI,gBADJ,EAC4C;AAExC,MAAM,OAAO,GAAG,SAAV,OAAU,CAAC,KAAD,EAAa;AACzB,QAAM,cAAc,GAAG,QAAQ,CAAC,KAAD,CAA/B;AACA,WAAO,oBAAC,gBAAD,EAAiB,kBAAM,cAAN,CAAjB,CAAP;AACH,GAHD;;AAIA,SAAO,OAAP;AACH;;AARD,gD","file":"SanitizeProps.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 48);\n","module.exports = require(\"react\");","module.exports = require(\"lodash\");","export default {\n $schema: 'http://json-schema.org/draft-07/schema#',\n $id: 'http://json-schema.org/draft-07/schema#',\n title: 'Core schema meta-schema',\n definitions: {\n schemaArray: {\n type: 'array',\n minItems: 1,\n items: { $ref: '#' },\n },\n nonNegativeInteger: {\n type: 'integer',\n minimum: 0,\n },\n nonNegativeIntegerDefault0: {\n allOf: [{ $ref: '#/definitions/nonNegativeInteger' }, { default: 0 }],\n },\n simpleTypes: {\n enum: ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'],\n },\n stringArray: {\n type: 'array',\n items: { type: 'string' },\n uniqueItems: true,\n default: [],\n },\n },\n type: ['object', 'boolean'],\n properties: {\n $id: {\n type: 'string',\n format: 'uri-reference',\n },\n $schema: {\n type: 'string',\n format: 'uri',\n },\n $ref: {\n type: 'string',\n format: 'uri-reference',\n },\n $comment: {\n type: 'string',\n },\n title: {\n type: 'string',\n },\n description: {\n type: 'string',\n },\n default: true,\n readOnly: {\n type: 'boolean',\n default: false,\n },\n examples: {\n type: 'array',\n items: true,\n },\n multipleOf: {\n type: 'number',\n exclusiveMinimum: 0,\n },\n maximum: {\n type: 'number',\n },\n exclusiveMaximum: {\n type: 'number',\n },\n minimum: {\n type: 'number',\n },\n exclusiveMinimum: {\n type: 'number',\n },\n maxLength: { $ref: '#/definitions/nonNegativeInteger' },\n minLength: { $ref: '#/definitions/nonNegativeIntegerDefault0' },\n pattern: {\n type: 'string',\n format: 'regex',\n },\n additionalItems: { $ref: '#' },\n items: {\n anyOf: [{ $ref: '#' }, { $ref: '#/definitions/schemaArray' }],\n default: true,\n },\n maxItems: { $ref: '#/definitions/nonNegativeInteger' },\n minItems: { $ref: '#/definitions/nonNegativeIntegerDefault0' },\n uniqueItems: {\n type: 'boolean',\n default: false,\n },\n contains: { $ref: '#' },\n maxProperties: { $ref: '#/definitions/nonNegativeInteger' },\n minProperties: { $ref: '#/definitions/nonNegativeIntegerDefault0' },\n required: { $ref: '#/definitions/stringArray' },\n additionalProperties: { $ref: '#' },\n definitions: {\n type: 'object',\n additionalProperties: { $ref: '#' },\n default: {},\n },\n properties: {\n type: 'object',\n additionalProperties: { $ref: '#' },\n default: {},\n },\n patternProperties: {\n type: 'object',\n additionalProperties: { $ref: '#' },\n propertyNames: { format: 'regex' },\n default: {},\n },\n dependencies: {\n type: 'object',\n additionalProperties: {\n anyOf: [{ $ref: '#' }, { $ref: '#/definitions/stringArray' }],\n },\n },\n propertyNames: { $ref: '#' },\n const: true,\n enum: {\n type: 'array',\n items: true,\n minItems: 1,\n uniqueItems: true,\n },\n type: {\n anyOf: [\n { $ref: '#/definitions/simpleTypes' },\n {\n type: 'array',\n items: { $ref: '#/definitions/simpleTypes' },\n minItems: 1,\n uniqueItems: true,\n },\n ],\n },\n format: { type: 'string' },\n contentMediaType: { type: 'string' },\n contentEncoding: { type: 'string' },\n if: { $ref: '#' },\n then: { $ref: '#' },\n else: { $ref: '#' },\n allOf: { $ref: '#/definitions/schemaArray' },\n anyOf: { $ref: '#/definitions/schemaArray' },\n oneOf: { $ref: '#/definitions/schemaArray' },\n not: { $ref: '#' },\n },\n default: true,\n};\n\nexport const createTestSchema = optionsSchema => ({\n $schema: 'http://json-schema.org/draft-07/schema#',\n $id: 'http://www.splunk.com/dashboard.schema.json',\n title: 'Dashboard Definition',\n description: 'Dashboard Definition',\n type: 'object',\n properties: optionsSchema,\n});\n\n// Below 2 regexs are copied from dashboard-framework/packages/dashboard-utils/src/token.jsc\nconst TOKEN_NAMESPACE_PREFIX_PATTERN = /(\\w+:)?/.source;\n// ex: token.name|suh (old-style filter chain)\n// ex: token.name|lower|capitalize (new-style filter chain)\nconst TOKEN_NAME_CHARS_PATTERN = /([^$|:]+?)(\\|[|\\w]+)?/.source;\n\nexport const TOKEN_PATTERN =\n /\\$/.source + TOKEN_NAMESPACE_PREFIX_PATTERN + TOKEN_NAME_CHARS_PATTERN + /\\$/.source;\n// rgb and rgba regexes were derived from:\n// https://stackoverflow.com/questions/9585973/javascript-regular-expression-for-rgb-values/9586150\n// https://github.com/regexhq/rgba-regex\n// NOTE: this will incorrectly accept values like rgb(999,999,999), but may be overkill to specify a regex that limits values to <= 255\nexport const rgbColorPattern = /^rgb\\(\\s*(\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/;\nexport const rgbaColorPattern = /^rgba\\(\\s*(\\d{1,3}%?),\\s*(\\d{1,3}%?),\\s*(\\d{1,3}%?),\\s*(\\d*(?:\\.\\d+)?)\\)$/;\n// todo: rename this to COLOR_PATTERN and replace all occurences.\nexport const colorPattern = '^#[0-9a-fA-F]{6}$|transparent';\nexport const colorPatternWithRGBA = `${colorPattern}|${rgbColorPattern.source}|${rgbaColorPattern.source}`;\nexport const COLOR_OR_TOKEN_PATTERN = `${colorPattern}|${TOKEN_PATTERN}`;\nexport const COLOR_OR_TOKEN_PATTERN_WITH_RGBA = `${colorPatternWithRGBA}|${TOKEN_PATTERN}`;\n// dynamic option DSL expressions always start with a >\nexport const DYNAMIC_OPTIONS_DSL_PATTERN = /^>.*/.source;\n/**\n * Returns the regex string that matches each passed in value as well as tokens.\n * @param {Array.<string>} values\n * @returns {string}\n */\nexport const getPattern = values =>\n values.reduce((accumulator, value) => `${accumulator}|^${value}$`, TOKEN_PATTERN);\n","// Reference - https://www.w3.org/TR/css-color-4/#named-colors\nexport default [\n 'transparent',\n 'aliceblue',\n 'antiquewhite',\n 'aqua',\n 'aquamarine',\n 'azure',\n 'beige',\n 'bisque',\n 'black',\n 'blanchedalmond',\n 'blue',\n 'blueviolet',\n 'brown',\n 'burlywood',\n 'cadetblue',\n 'chartreuse',\n 'chocolate',\n 'coral',\n 'cornflowerblue',\n 'cornsilk',\n 'crimson',\n 'cyan',\n 'darkblue',\n 'darkcyan',\n 'darkgoldenrod',\n 'darkgray',\n 'darkgreen',\n 'darkgrey',\n 'darkkhaki',\n 'darkmagenta',\n 'darkolivegreen',\n 'darkorange',\n 'darkorchid',\n 'darkred',\n 'darksalmon',\n 'darkseagreen',\n 'darkslateblue',\n 'darkslategray',\n 'darkslategrey',\n 'darkturquoise',\n 'darkviolet',\n 'deeppink',\n 'deepskyblue',\n 'dimgray',\n 'dimgrey',\n 'dodgerblue',\n 'firebrick',\n 'floralwhite',\n 'forestgreen',\n 'fuchsia',\n 'gainsboro',\n 'ghostwhite',\n 'gold',\n 'goldenrod',\n 'gray',\n 'green',\n 'greenyellow',\n 'grey',\n 'honeydew',\n 'hotpink',\n 'indianred',\n 'indigo',\n 'ivory',\n 'khaki',\n 'lavender',\n 'lavenderblush',\n 'lawngreen',\n 'lemonchiffon',\n 'lightblue',\n 'lightcoral',\n 'lightcyan',\n 'lightgoldenrodyellow',\n 'lightgray',\n 'lightgreen',\n 'lightgrey',\n 'lightpink',\n 'lightsalmon',\n 'lightseagreen',\n 'lightskyblue',\n 'lightslategray',\n 'lightslategrey',\n 'lightsteelblue',\n 'lightyellow',\n 'lime',\n 'limegreen',\n 'linen',\n 'magenta',\n 'maroon',\n 'mediumaquamarine',\n 'mediumblue',\n 'mediumorchid',\n 'mediumpurple',\n 'mediumseagreen',\n 'mediumslateblue',\n 'mediumspringgreen',\n 'mediumturquoise',\n 'mediumvioletred',\n 'midnightblue',\n 'mintcream',\n 'mistyrose',\n 'moccasin',\n 'navajowhite',\n 'navy',\n 'oldlace',\n 'olive',\n 'olivedrab',\n 'orange',\n 'orangered',\n 'orchid',\n 'palegoldenrod',\n 'palegreen',\n 'paleturquoise',\n 'palevioletred',\n 'papayawhip',\n 'peachpuff',\n 'peru',\n 'pink',\n 'plum',\n 'powderblue',\n 'purple',\n 'rebeccapurple',\n 'red',\n 'rosybrown',\n 'royalblue',\n 'saddlebrown',\n 'salmon',\n 'sandybrown',\n 'seagreen',\n 'seashell',\n 'sienna',\n 'silver',\n 'skyblue',\n 'slateblue',\n 'slategray',\n 'slategrey',\n 'snow',\n 'springgreen',\n 'steelblue',\n 'tan',\n 'teal',\n 'thistle',\n 'tomato',\n 'turquoise',\n 'violet',\n 'wheat',\n 'white',\n 'whitesmoke',\n 'yellow',\n 'yellowgreen',\n];\n","import { rgbColorPattern, rgbaColorPattern } from './schemaUtils';\nimport namedColors from './namedColors';\n\n/**\n * Validates if a given string is a valid color\n *\n * @param {string} color\n * @returns {boolean}\n */\nexport function isColor(color = ''): boolean {\n if (typeof color !== 'string') {\n return false;\n }\n if (color.charAt(0) === '#') {\n color = color.substring(1); // eslint-disable-line no-param-reassign\n return [3, 4, 6, 8].indexOf(color.length) > -1 && !Number.isNaN(parseInt(color, 16));\n }\n const trimmedColor = color.trim();\n if (rgbColorPattern.test(trimmedColor) || rgbaColorPattern.test(trimmedColor)) {\n return true;\n }\n return namedColors.includes(color.toLowerCase());\n // for future when we want to support rgb | hsl\n // return /^(rgb|hsl)a?\\((\\d+%?(deg|rad|grad|turn)?[,\\s]+){2,3}[\\s\\/]*[\\d\\.]+%?\\)$/i.test(color);\n}\n\n/**\n * Validates if a given array of strings is a valid array of colors\n * @param colors\n * @returns\n */\nexport const isArrayOfColors = (colors: string[]) => Array.isArray(colors) && colors.every(isColor);\n\n/**\n * Sanitizes an array of colors `arr` to replace any non-color values with undefined,\n * or the value of `fallback` if provided.\n *\n * @param arr\n * @param {string} fallback\n * @returns {string[]} sanitized array any non-color values replaced with `fallback`\n */\nexport const sanitizeArrayOfColors = (arr: any[], fallback?: string): string[] => {\n return arr.map(entry => (isColor(entry) ? entry : fallback));\n};\n","/* eslint-disable no-param-reassign */\nimport * as React from 'react';\nimport { isPlainObject } from 'lodash';\nimport { isColor } from './colorUtils';\n\nconst propsKeyValidators = {\n backgroundColor: isColor,\n deltaColor: isColor, // SV react-visualizations & dashboard-visualizations\n trendColor: isColor, // SV visualizations\n fontColor: isColor,\n fillColor: isColor,\n gaugeColor: isColor,\n majorColor: isColor,\n radialBackgroundColor: isColor,\n radialStrokeColor: isColor,\n sparklineFillColor: isColor,\n sparklineStrokeColor: isColor,\n strokeColor: isColor,\n strokeHighlightColor: isColor,\n headerBackgroundColor: isColor,\n rowBackgroundColorOdd: isColor,\n rowBackgroundColorEven: isColor,\n headerTextColor: isColor,\n rowTextColorOdd: isColor,\n rowTextColorEven: isColor,\n color: isColor,\n textColor: isColor,\n defaultFontColor: isColor,\n defaultBlockFontColor: isColor,\n sparklineAreaColor: isColor,\n iconColor: isColor,\n areaColor: isColor,\n nodeColor: isColor,\n nodeHighlightColor: isColor,\n linkColor: isColor,\n nodeTextColor: isColor,\n nodeTextHighlightColor: isColor,\n trellisBackgroundColor: isColor,\n};\n\n/**\n * Validates if a given key value pair are valid\n * based on a set of predefined rules.\n *\n * @param {string} key\n * @param {string} value\n * @returns {boolean}\n */\nfunction isValidProperty(key: string, value: string): boolean {\n const { hasOwnProperty } = Object.prototype;\n return hasOwnProperty.call(propsKeyValidators, key) ? propsKeyValidators[key](value) : true;\n}\n\n/**\n * Validates every property in the key and return\n * only valid keys\n *\n * @export\n * @template T\n * @param {T} props\n * @returns {Partial<T>}\n */\nexport function sanitize<T extends Record<string, any>>(props: T): Partial<T> {\n return Object.keys(props).reduce((accum, key) => {\n if (key === 'options' && isPlainObject(props.options)) {\n accum[key] = sanitize(props.options);\n } else if (isValidProperty(key, props[key])) {\n accum[key] = props[key];\n }\n return accum;\n }, {});\n}\n\n/**\n * Helper HOC which will sanitize invalid props\n *\n * @export\n * @param {React.ComponentType} WrappedComponent\n * @returns {React.ComponentType}\n */\nexport function withSanitizedProps<T>(\n WrappedComponent: React.ComponentType<T>\n): React.ComponentType<Partial<T>> {\n const Wrapper = (props: T) => {\n const sanitizedProps = sanitize(props);\n return <WrappedComponent {...(sanitizedProps as T)} />;\n };\n return Wrapper;\n}\n"],"sourceRoot":""}
|
package/SizeAwareWrapper.js
CHANGED
|
@@ -87,7 +87,7 @@ module.exports =
|
|
|
87
87
|
/******/
|
|
88
88
|
/******/
|
|
89
89
|
/******/ // Load entry module and return exports
|
|
90
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
90
|
+
/******/ return __webpack_require__(__webpack_require__.s = 49);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
@@ -113,28 +113,21 @@ module.exports = require("@babel/runtime/helpers/assertThisInitialized");
|
|
|
113
113
|
|
|
114
114
|
/***/ }),
|
|
115
115
|
|
|
116
|
-
/***/
|
|
116
|
+
/***/ 3:
|
|
117
117
|
/***/ (function(module, exports) {
|
|
118
118
|
|
|
119
119
|
module.exports = require("@babel/runtime/helpers/defineProperty");
|
|
120
120
|
|
|
121
121
|
/***/ }),
|
|
122
122
|
|
|
123
|
-
/***/
|
|
123
|
+
/***/ 4:
|
|
124
124
|
/***/ (function(module, exports) {
|
|
125
125
|
|
|
126
126
|
module.exports = require("@babel/runtime/helpers/getPrototypeOf");
|
|
127
127
|
|
|
128
128
|
/***/ }),
|
|
129
129
|
|
|
130
|
-
/***/
|
|
131
|
-
/***/ (function(module, exports) {
|
|
132
|
-
|
|
133
|
-
module.exports = require("@babel/runtime/helpers/classCallCheck");
|
|
134
|
-
|
|
135
|
-
/***/ }),
|
|
136
|
-
|
|
137
|
-
/***/ 50:
|
|
130
|
+
/***/ 49:
|
|
138
131
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
139
132
|
|
|
140
133
|
"use strict";
|
|
@@ -149,9 +142,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
149
142
|
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__);
|
|
150
143
|
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9);
|
|
151
144
|
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__);
|
|
152
|
-
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
145
|
+
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4);
|
|
153
146
|
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__);
|
|
154
|
-
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
147
|
+
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3);
|
|
155
148
|
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__);
|
|
156
149
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(1);
|
|
157
150
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__);
|
|
@@ -164,24 +157,31 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
164
157
|
|
|
165
158
|
|
|
166
159
|
|
|
160
|
+
|
|
167
161
|
function _createSuper(Derived) {
|
|
168
162
|
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
163
|
+
|
|
169
164
|
return function _createSuperInternal() {
|
|
170
165
|
var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(Derived),
|
|
171
|
-
|
|
166
|
+
result;
|
|
167
|
+
|
|
172
168
|
if (hasNativeReflectConstruct) {
|
|
173
169
|
var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(this).constructor;
|
|
170
|
+
|
|
174
171
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
175
172
|
} else {
|
|
176
173
|
result = Super.apply(this, arguments);
|
|
177
174
|
}
|
|
175
|
+
|
|
178
176
|
return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, result);
|
|
179
177
|
};
|
|
180
178
|
}
|
|
179
|
+
|
|
181
180
|
function _isNativeReflectConstruct() {
|
|
182
181
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
183
182
|
if (Reflect.construct.sham) return false;
|
|
184
183
|
if (typeof Proxy === "function") return true;
|
|
184
|
+
|
|
185
185
|
try {
|
|
186
186
|
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
187
187
|
return true;
|
|
@@ -191,6 +191,7 @@ function _isNativeReflectConstruct() {
|
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
|
|
194
|
+
|
|
194
195
|
var styles = {
|
|
195
196
|
position: 'absolute',
|
|
196
197
|
width: 0,
|
|
@@ -198,23 +199,31 @@ var styles = {
|
|
|
198
199
|
visibility: 'hidden',
|
|
199
200
|
display: 'none'
|
|
200
201
|
};
|
|
202
|
+
|
|
201
203
|
var SizeAwareWrapper = /*#__PURE__*/function (_PureComponent) {
|
|
202
204
|
_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default()(SizeAwareWrapper, _PureComponent);
|
|
205
|
+
|
|
203
206
|
var _super = _createSuper(SizeAwareWrapper);
|
|
207
|
+
|
|
204
208
|
function SizeAwareWrapper(props) {
|
|
205
209
|
var _this;
|
|
210
|
+
|
|
206
211
|
_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, SizeAwareWrapper);
|
|
212
|
+
|
|
207
213
|
_this = _super.call(this, props);
|
|
214
|
+
|
|
208
215
|
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), "getElement", function () {
|
|
209
216
|
// it listens on the size of its parent elemnt
|
|
210
217
|
var parentElement = _this.el && _this.el.parentElement;
|
|
211
218
|
return parentElement;
|
|
212
219
|
});
|
|
220
|
+
|
|
213
221
|
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), "handleResize", function (entries) {
|
|
214
222
|
entries.forEach(function (entry) {
|
|
215
223
|
var _entry$contentRect = entry.contentRect,
|
|
216
|
-
|
|
217
|
-
|
|
224
|
+
width = _entry$contentRect.width,
|
|
225
|
+
height = _entry$contentRect.height; // use requestAnimationFrame to make sure width/height is updated in time
|
|
226
|
+
|
|
218
227
|
_this.animationFrameID = window.requestAnimationFrame(function () {
|
|
219
228
|
_this.setState({
|
|
220
229
|
width: width,
|
|
@@ -223,20 +232,24 @@ var SizeAwareWrapper = /*#__PURE__*/function (_PureComponent) {
|
|
|
223
232
|
});
|
|
224
233
|
});
|
|
225
234
|
});
|
|
235
|
+
|
|
226
236
|
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), "renderChildren", function () {
|
|
227
237
|
// expect children to be a function
|
|
228
238
|
var _this$state = _this.state,
|
|
229
|
-
|
|
230
|
-
|
|
239
|
+
width = _this$state.width,
|
|
240
|
+
height = _this$state.height;
|
|
231
241
|
var children = _this.props.children;
|
|
242
|
+
|
|
232
243
|
if (width != null && height != null && typeof children === 'function') {
|
|
233
244
|
return children({
|
|
234
245
|
width: width,
|
|
235
246
|
height: height
|
|
236
247
|
});
|
|
237
248
|
}
|
|
249
|
+
|
|
238
250
|
return null;
|
|
239
251
|
});
|
|
252
|
+
|
|
240
253
|
_this.state = {
|
|
241
254
|
width: null,
|
|
242
255
|
height: null
|
|
@@ -245,10 +258,12 @@ var SizeAwareWrapper = /*#__PURE__*/function (_PureComponent) {
|
|
|
245
258
|
_this.ro = _this.getResizeObserver();
|
|
246
259
|
return _this;
|
|
247
260
|
}
|
|
261
|
+
|
|
248
262
|
_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(SizeAwareWrapper, [{
|
|
249
263
|
key: "componentDidMount",
|
|
250
264
|
value: function componentDidMount() {
|
|
251
265
|
var resizableElement = this.getElement();
|
|
266
|
+
|
|
252
267
|
if (resizableElement) {
|
|
253
268
|
this.ro.observe(resizableElement);
|
|
254
269
|
}
|
|
@@ -257,9 +272,11 @@ var SizeAwareWrapper = /*#__PURE__*/function (_PureComponent) {
|
|
|
257
272
|
key: "componentWillUnmount",
|
|
258
273
|
value: function componentWillUnmount() {
|
|
259
274
|
var resizableElement = this.getElement();
|
|
275
|
+
|
|
260
276
|
if (resizableElement) {
|
|
261
277
|
this.ro.unobserve(resizableElement);
|
|
262
278
|
}
|
|
279
|
+
|
|
263
280
|
if (window && this.animationFrameID) {
|
|
264
281
|
window.cancelAnimationFrame(this.animationFrameID);
|
|
265
282
|
}
|
|
@@ -273,12 +290,14 @@ var SizeAwareWrapper = /*#__PURE__*/function (_PureComponent) {
|
|
|
273
290
|
unobserve: function unobserve() {}
|
|
274
291
|
};
|
|
275
292
|
}
|
|
293
|
+
|
|
276
294
|
return new ResizeObserver(this.handleResize);
|
|
277
295
|
}
|
|
278
296
|
}, {
|
|
279
297
|
key: "render",
|
|
280
298
|
value: function render() {
|
|
281
299
|
var _this2 = this;
|
|
300
|
+
|
|
282
301
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_7___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("div", {
|
|
283
302
|
key: "resize-detector",
|
|
284
303
|
style: styles,
|
|
@@ -288,12 +307,14 @@ var SizeAwareWrapper = /*#__PURE__*/function (_PureComponent) {
|
|
|
288
307
|
}), this.renderChildren());
|
|
289
308
|
}
|
|
290
309
|
}]);
|
|
310
|
+
|
|
291
311
|
return SizeAwareWrapper;
|
|
292
312
|
}(react__WEBPACK_IMPORTED_MODULE_7__["PureComponent"]);
|
|
313
|
+
|
|
293
314
|
SizeAwareWrapper.propTypes = {
|
|
294
315
|
children: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.any // eslint-disable-line react/forbid-prop-types
|
|
295
|
-
};
|
|
296
316
|
|
|
317
|
+
};
|
|
297
318
|
SizeAwareWrapper.defaultProps = {
|
|
298
319
|
children: null
|
|
299
320
|
};
|
|
@@ -301,6 +322,13 @@ SizeAwareWrapper.defaultProps = {
|
|
|
301
322
|
|
|
302
323
|
/***/ }),
|
|
303
324
|
|
|
325
|
+
/***/ 5:
|
|
326
|
+
/***/ (function(module, exports) {
|
|
327
|
+
|
|
328
|
+
module.exports = require("@babel/runtime/helpers/classCallCheck");
|
|
329
|
+
|
|
330
|
+
/***/ }),
|
|
331
|
+
|
|
304
332
|
/***/ 6:
|
|
305
333
|
/***/ (function(module, exports) {
|
|
306
334
|
|