@splunk/react-ui 4.13.0 → 4.15.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/.dockerignore +2 -0
- package/Accordion.js +41 -16
- package/Anchor.js +9 -9
- package/Animation.js +6 -6
- package/AnimationToggle.js +2 -2
- package/Box.js +9 -9
- package/Button.js +47 -46
- package/ButtonGroup.js +9 -9
- package/ButtonSimple.js +14 -14
- package/CHANGELOG.md +46 -1
- package/Calendar.js +460 -147
- package/Card.js +85 -83
- package/CardLayout.js +9 -9
- package/Chip.js +23 -23
- package/Clickable.js +39 -15
- package/CloseButton.js +23 -23
- package/Code.js +484 -436
- package/CollapsiblePanel.js +64 -35
- package/Color.js +298 -188
- package/ColumnLayout.js +18 -17
- package/ComboBox.js +81 -32
- package/Concertina.js +89 -28
- package/ControlGroup.js +85 -27
- package/Date.js +134 -58
- package/DefinitionList.js +14 -8
- package/Divider.d.ts +2 -0
- package/Divider.js +194 -0
- package/Dockerfile.enterprise.storybook +7 -0
- package/Dockerfile.prisma.storybook +7 -0
- package/Dockerfile.visual +10 -0
- package/Dropdown.js +79 -19
- package/EventListener.js +17 -17
- package/File.js +96 -43
- package/FormRows.js +40 -39
- package/Heading.js +83 -55
- package/Image.js +67 -42
- package/JSONTree.js +106 -21
- package/Layer.js +130 -28
- package/Link.js +17 -17
- package/List.js +3 -3
- package/Markdown.js +71 -65
- package/Menu.js +155 -121
- package/Message.js +135 -135
- package/MessageBar.js +136 -136
- package/Modal.js +99 -48
- package/ModalLayer.js +15 -15
- package/Monogram.js +18 -17
- package/Multiselect.js +2788 -2310
- package/Number.js +76 -37
- package/Paginator.js +99 -86
- package/Paragraph.js +10 -10
- package/Popover.js +343 -48
- package/Progress.js +23 -22
- package/RadioBar.js +32 -14
- package/RadioList.js +17 -11
- package/Resize.js +34 -21
- package/ResultsMenu.js +44 -31
- package/ScreenReaderContent.js +9 -9
- package/Scroll.js +52 -27
- package/ScrollContainerContext.js +157 -6
- package/Search.js +71 -34
- package/Select.js +347 -69
- package/SidePanel.js +37 -24
- package/Slider.js +50 -20
- package/SlidingPanels.js +56 -18
- package/SplitButton.js +27 -26
- package/StaticContent.js +9 -9
- package/StepBar.js +22 -22
- package/Switch.js +18 -13
- package/TabBar.js +28 -28
- package/TabLayout.js +43 -18
- package/Table.js +549 -158
- package/Text.js +93 -50
- package/TextArea.d.ts +2 -0
- package/TextArea.js +134 -56
- package/Tooltip.js +246 -63
- package/TransitionOpen.js +63 -26
- package/Typography.d.ts +2 -0
- package/Typography.js +17 -16
- package/WaitSpinner.js +15 -81
- package/docker-compose.yml +42 -0
- package/package.json +20 -20
- package/test-runner-jest.config.js +23 -5
- package/types/src/Accordion/AccordionContext.d.ts +1 -0
- package/types/src/Button/docs/examples/Selected.d.ts +2 -2
- package/types/src/ButtonGroup/ButtonGroupContext.d.ts +1 -0
- package/types/src/Calendar/Calendar.d.ts +17 -2
- package/types/src/Calendar/DateTable.d.ts +7 -3
- package/types/src/Calendar/Day.d.ts +14 -5
- package/types/src/CardLayout/CardLayoutContext.d.ts +1 -0
- package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +7 -3
- package/types/src/Concertina/ConcertinaContext.d.ts +1 -0
- package/types/src/ControlGroup/ControlGroup.d.ts +15 -8
- package/types/src/ControlGroup/docs/examples/HelpWithErrorText.d.ts +2 -0
- package/types/src/ControlGroup/docs/examples/Required.d.ts +2 -0
- package/types/src/Date/Date.d.ts +17 -8
- package/types/src/Date/docs/examples/CustomDate.d.ts +2 -2
- package/types/src/Date/docs/examples/Disabled.d.ts +2 -2
- package/types/src/Date/docs/examples/prisma/WithoutCalendar.d.ts +2 -0
- package/types/src/Divider/Divider.d.ts +20 -0
- package/types/src/Divider/docs/examples/AriaHidden.d.ts +2 -0
- package/types/src/Divider/docs/examples/Basic.d.ts +2 -0
- package/types/src/Divider/docs/examples/CustomStyle.d.ts +2 -0
- package/types/src/Divider/docs/examples/Vertical.d.ts +2 -0
- package/types/src/Divider/index.d.ts +1 -0
- package/types/src/File/File.d.ts +4 -2
- package/types/src/File/FileContext.d.ts +1 -0
- package/types/src/FormRows/FormRowsContext.d.ts +1 -0
- package/types/src/Markdown/renderers/MarkdownLink.d.ts +1 -1
- package/types/src/Menu/MenuContext.d.ts +1 -0
- package/types/src/Modal/Modal.d.ts +7 -3
- package/types/src/Modal/ModalContext.d.ts +2 -0
- package/types/src/Multiselect/Compact.d.ts +10 -1
- package/types/src/Multiselect/Multiselect.d.ts +12 -1
- package/types/src/Multiselect/Normal.d.ts +2 -0
- package/types/src/Number/Number.d.ts +5 -1
- package/types/src/Popover/Popover.d.ts +25 -5
- package/types/src/Popover/PopoverContext.d.ts +1 -0
- package/types/src/RadioBar/RadioBar.d.ts +5 -3
- package/types/src/RadioBar/RadioBarContext.d.ts +1 -0
- package/types/src/RadioList/RadioList.d.ts +5 -1
- package/types/src/RadioList/RadioListContext.d.ts +1 -0
- package/types/src/Select/SelectBase.d.ts +2 -0
- package/types/src/Slider/Slider.d.ts +5 -3
- package/types/src/SplitButton/docs/examples/Disabled.d.ts +1 -1
- package/types/src/SplitButton/docs/examples/prisma/Disabled.d.ts +1 -1
- package/types/src/StepBar/StepBarContext.d.ts +1 -0
- package/types/src/Switch/Switch.d.ts +2 -0
- package/types/src/TabBar/TabBarContext.d.ts +1 -0
- package/types/src/Table/Head.d.ts +2 -0
- package/types/src/Table/TableContext.d.ts +1 -0
- package/types/src/Table/docs/examples/FilterColumnValues.d.ts +14 -0
- package/types/src/Text/Text.d.ts +5 -3
- package/types/src/TextArea/TextArea.d.ts +5 -3
- package/types/src/Tooltip/Tooltip.d.ts +26 -9
- package/types/src/TransitionOpen/TransitionOpen.d.ts +7 -3
- package/types/src/WaitSpinner/WaitSpinner.d.ts +1 -1
- package/types/src/useForceUpdate/useForceUpdate.d.ts +1 -0
- package/types/src/useKeyPress/index.d.ts +37 -0
- package/useForceUpdate.js +9 -9
- package/{useIsSsr.js → useKeyPress.js} +56 -49
- package/usePrevious.js +9 -9
- package/types/src/useIsSsr/index.d.ts +0 -2
- package/types/src/useIsSsr/useIsSsr.d.ts +0 -8
package/JSONTree.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 186);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -101,14 +101,35 @@ module.exports = require("prop-types");
|
|
|
101
101
|
|
|
102
102
|
/***/ }),
|
|
103
103
|
|
|
104
|
-
/***/
|
|
104
|
+
/***/ 10:
|
|
105
|
+
/***/ (function(module, exports) {
|
|
106
|
+
|
|
107
|
+
module.exports = require("lodash/keys");
|
|
108
|
+
|
|
109
|
+
/***/ }),
|
|
110
|
+
|
|
111
|
+
/***/ 113:
|
|
112
|
+
/***/ (function(module, exports) {
|
|
113
|
+
|
|
114
|
+
module.exports = require("lodash/isObject");
|
|
115
|
+
|
|
116
|
+
/***/ }),
|
|
117
|
+
|
|
118
|
+
/***/ 118:
|
|
119
|
+
/***/ (function(module, exports) {
|
|
120
|
+
|
|
121
|
+
module.exports = require("lodash/fill");
|
|
122
|
+
|
|
123
|
+
/***/ }),
|
|
124
|
+
|
|
125
|
+
/***/ 14:
|
|
105
126
|
/***/ (function(module, exports) {
|
|
106
127
|
|
|
107
128
|
module.exports = require("@splunk/react-ui/Clickable");
|
|
108
129
|
|
|
109
130
|
/***/ }),
|
|
110
131
|
|
|
111
|
-
/***/
|
|
132
|
+
/***/ 186:
|
|
112
133
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
113
134
|
|
|
114
135
|
"use strict";
|
|
@@ -126,15 +147,44 @@ var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_)
|
|
|
126
147
|
var external_prop_types_ = __webpack_require__(1);
|
|
127
148
|
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
128
149
|
|
|
129
|
-
// EXTERNAL MODULE: external "lodash"
|
|
130
|
-
var
|
|
150
|
+
// EXTERNAL MODULE: external "lodash/isString"
|
|
151
|
+
var isString_ = __webpack_require__(25);
|
|
152
|
+
var isString_default = /*#__PURE__*/__webpack_require__.n(isString_);
|
|
153
|
+
|
|
154
|
+
// EXTERNAL MODULE: external "lodash/fill"
|
|
155
|
+
var fill_ = __webpack_require__(118);
|
|
156
|
+
var fill_default = /*#__PURE__*/__webpack_require__.n(fill_);
|
|
157
|
+
|
|
158
|
+
// EXTERNAL MODULE: external "lodash/isArray"
|
|
159
|
+
var isArray_ = __webpack_require__(73);
|
|
160
|
+
var isArray_default = /*#__PURE__*/__webpack_require__.n(isArray_);
|
|
161
|
+
|
|
162
|
+
// EXTERNAL MODULE: external "lodash/isEmpty"
|
|
163
|
+
var isEmpty_ = __webpack_require__(91);
|
|
164
|
+
var isEmpty_default = /*#__PURE__*/__webpack_require__.n(isEmpty_);
|
|
165
|
+
|
|
166
|
+
// EXTERNAL MODULE: external "lodash/isNumber"
|
|
167
|
+
var isNumber_ = __webpack_require__(74);
|
|
168
|
+
var isNumber_default = /*#__PURE__*/__webpack_require__.n(isNumber_);
|
|
169
|
+
|
|
170
|
+
// EXTERNAL MODULE: external "lodash/isObject"
|
|
171
|
+
var isObject_ = __webpack_require__(113);
|
|
172
|
+
var isObject_default = /*#__PURE__*/__webpack_require__.n(isObject_);
|
|
173
|
+
|
|
174
|
+
// EXTERNAL MODULE: external "lodash/keys"
|
|
175
|
+
var keys_ = __webpack_require__(10);
|
|
176
|
+
var keys_default = /*#__PURE__*/__webpack_require__.n(keys_);
|
|
177
|
+
|
|
178
|
+
// EXTERNAL MODULE: external "lodash/repeat"
|
|
179
|
+
var repeat_ = __webpack_require__(79);
|
|
180
|
+
var repeat_default = /*#__PURE__*/__webpack_require__.n(repeat_);
|
|
131
181
|
|
|
132
182
|
// EXTERNAL MODULE: external "styled-components"
|
|
133
183
|
var external_styled_components_ = __webpack_require__(3);
|
|
134
184
|
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
|
|
135
185
|
|
|
136
186
|
// EXTERNAL MODULE: external "@splunk/react-ui/Clickable"
|
|
137
|
-
var Clickable_ = __webpack_require__(
|
|
187
|
+
var Clickable_ = __webpack_require__(14);
|
|
138
188
|
var Clickable_default = /*#__PURE__*/__webpack_require__.n(Clickable_);
|
|
139
189
|
|
|
140
190
|
// EXTERNAL MODULE: external "@splunk/themes"
|
|
@@ -268,6 +318,13 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
268
318
|
|
|
269
319
|
|
|
270
320
|
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
271
328
|
var propTypes = {
|
|
272
329
|
path: external_prop_types_default.a.arrayOf(external_prop_types_default.a.oneOfType([external_prop_types_default.a.number, external_prop_types_default.a.string])),
|
|
273
330
|
defaultOpen: external_prop_types_default.a.bool,
|
|
@@ -360,8 +417,8 @@ var TreeNode_JSONTreeNode = /*#__PURE__*/function (_Component) {
|
|
|
360
417
|
};
|
|
361
418
|
}
|
|
362
419
|
|
|
363
|
-
_this.regularIndent =
|
|
364
|
-
_this.closingIndent =
|
|
420
|
+
_this.regularIndent = fill_default()(Array(props.indentLevel), repeat_default()("\xA0", props.indent));
|
|
421
|
+
_this.closingIndent = fill_default()(Array(props.indentLevel - 1), repeat_default()("\xA0", props.indent));
|
|
365
422
|
return _this;
|
|
366
423
|
}
|
|
367
424
|
|
|
@@ -393,14 +450,14 @@ var TreeNode_JSONTreeNode = /*#__PURE__*/function (_Component) {
|
|
|
393
450
|
expandChildren = _this$props3.expandChildren,
|
|
394
451
|
overflow = _this$props3.overflow,
|
|
395
452
|
path = _this$props3.path;
|
|
396
|
-
var isPrimitive = !
|
|
453
|
+
var isPrimitive = !isObject_default()(value); // isObject is true for arrays
|
|
397
454
|
|
|
398
455
|
var representation = value; // determine if value should be represented as a simple string
|
|
399
456
|
// or as a child node
|
|
400
457
|
|
|
401
458
|
if (!isPrimitive) {
|
|
402
|
-
if (
|
|
403
|
-
representation =
|
|
459
|
+
if (isEmpty_default()(value)) {
|
|
460
|
+
representation = isArray_default()(value) ? '[]' : '{}';
|
|
404
461
|
} else {
|
|
405
462
|
representation = /*#__PURE__*/external_react_default.a.createElement(JSONTreeNode, {
|
|
406
463
|
obj: value,
|
|
@@ -424,7 +481,7 @@ var TreeNode_JSONTreeNode = /*#__PURE__*/function (_Component) {
|
|
|
424
481
|
} // for string or number representations, apply styles and optional interactivity
|
|
425
482
|
|
|
426
483
|
|
|
427
|
-
if (
|
|
484
|
+
if (isString_default()(representation) || isNumber_default()(representation)) {
|
|
428
485
|
var valueType = value === null ? 'null' : // TS: bigint, function, symbol are prevented by JSONElement type
|
|
429
486
|
_typeof(value);
|
|
430
487
|
|
|
@@ -472,11 +529,11 @@ var TreeNode_JSONTreeNode = /*#__PURE__*/function (_Component) {
|
|
|
472
529
|
obj = _this$props4.obj,
|
|
473
530
|
path = _this$props4.path;
|
|
474
531
|
|
|
475
|
-
if (
|
|
476
|
-
return
|
|
532
|
+
if (isObject_default()(obj) || isArray_default()(obj)) {
|
|
533
|
+
return keys_default()(obj).map(function (mapKey, index, properties) {
|
|
477
534
|
var value = obj[mapKey]; // TS: should be safe based on (recursive) JSONElement type
|
|
478
535
|
|
|
479
|
-
var key =
|
|
536
|
+
var key = isArray_default()(obj) ? parseInt(mapKey, 10) : mapKey;
|
|
480
537
|
var propertyDataPath = path.length === 0 ? ".".concat(key) : ".".concat(path.join('.'), ".").concat(key);
|
|
481
538
|
|
|
482
539
|
var representation = _this5.renderValue({
|
|
@@ -484,7 +541,7 @@ var TreeNode_JSONTreeNode = /*#__PURE__*/function (_Component) {
|
|
|
484
541
|
value: value
|
|
485
542
|
});
|
|
486
543
|
|
|
487
|
-
var propertyElement = !
|
|
544
|
+
var propertyElement = !isArray_default()(obj) ? _this5.renderKey(key) : undefined;
|
|
488
545
|
return /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
489
546
|
key: propertyDataPath,
|
|
490
547
|
role: "treeitem",
|
|
@@ -506,11 +563,11 @@ var TreeNode_JSONTreeNode = /*#__PURE__*/function (_Component) {
|
|
|
506
563
|
value: function render() {
|
|
507
564
|
var open = this.state.open;
|
|
508
565
|
var obj = this.props.obj;
|
|
509
|
-
var isExpandable =
|
|
566
|
+
var isExpandable = isObject_default()(obj) && !isEmpty_default()(obj) || isArray_default()(obj) && obj.length > 0;
|
|
510
567
|
return /*#__PURE__*/external_react_default.a.createElement("span", {
|
|
511
568
|
"data-test": isExpandable ? 'node' : null,
|
|
512
569
|
"data-test-expanded": isExpandable ? this.state.open : null
|
|
513
|
-
}, isExpandable && (
|
|
570
|
+
}, isExpandable && (isArray_default()(obj) ? '[' : '{'), isExpandable && this.renderExpandLink(), !isExpandable || open ? this.renderObject() : null, !isExpandable || open ? this.closingIndent : null, isExpandable && (isArray_default()(obj) ? ']' : '}'));
|
|
514
571
|
}
|
|
515
572
|
}]);
|
|
516
573
|
|
|
@@ -574,7 +631,7 @@ function JSONTree(_ref) {
|
|
|
574
631
|
otherProps = _objectWithoutProperties(_ref, ["elementRef", "expandChildren", "indent", "json", "onClickKey", "onClickValue", "overflow"]);
|
|
575
632
|
|
|
576
633
|
// @docs-props-type JSONTreePropsBase
|
|
577
|
-
var obj =
|
|
634
|
+
var obj = isString_default()(json) ? JSON.parse(json) : json;
|
|
578
635
|
var StyledCode = overflow === 'wrap' ? StyledWrapCode : StyledScrollCode;
|
|
579
636
|
return /*#__PURE__*/external_react_default.a.createElement(StyledCode, _extends({
|
|
580
637
|
"data-language": "language-json",
|
|
@@ -607,6 +664,13 @@ module.exports = require("react");
|
|
|
607
664
|
|
|
608
665
|
/***/ }),
|
|
609
666
|
|
|
667
|
+
/***/ 25:
|
|
668
|
+
/***/ (function(module, exports) {
|
|
669
|
+
|
|
670
|
+
module.exports = require("lodash/isString");
|
|
671
|
+
|
|
672
|
+
/***/ }),
|
|
673
|
+
|
|
610
674
|
/***/ 3:
|
|
611
675
|
/***/ (function(module, exports) {
|
|
612
676
|
|
|
@@ -614,10 +678,31 @@ module.exports = require("styled-components");
|
|
|
614
678
|
|
|
615
679
|
/***/ }),
|
|
616
680
|
|
|
617
|
-
/***/
|
|
681
|
+
/***/ 73:
|
|
682
|
+
/***/ (function(module, exports) {
|
|
683
|
+
|
|
684
|
+
module.exports = require("lodash/isArray");
|
|
685
|
+
|
|
686
|
+
/***/ }),
|
|
687
|
+
|
|
688
|
+
/***/ 74:
|
|
689
|
+
/***/ (function(module, exports) {
|
|
690
|
+
|
|
691
|
+
module.exports = require("lodash/isNumber");
|
|
692
|
+
|
|
693
|
+
/***/ }),
|
|
694
|
+
|
|
695
|
+
/***/ 79:
|
|
696
|
+
/***/ (function(module, exports) {
|
|
697
|
+
|
|
698
|
+
module.exports = require("lodash/repeat");
|
|
699
|
+
|
|
700
|
+
/***/ }),
|
|
701
|
+
|
|
702
|
+
/***/ 91:
|
|
618
703
|
/***/ (function(module, exports) {
|
|
619
704
|
|
|
620
|
-
module.exports = require("lodash");
|
|
705
|
+
module.exports = require("lodash/isEmpty");
|
|
621
706
|
|
|
622
707
|
/***/ })
|
|
623
708
|
|
package/Layer.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 214);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -101,7 +101,14 @@ module.exports = require("prop-types");
|
|
|
101
101
|
|
|
102
102
|
/***/ }),
|
|
103
103
|
|
|
104
|
-
/***/
|
|
104
|
+
/***/ 119:
|
|
105
|
+
/***/ (function(module, exports) {
|
|
106
|
+
|
|
107
|
+
module.exports = require("lodash/pull");
|
|
108
|
+
|
|
109
|
+
/***/ }),
|
|
110
|
+
|
|
111
|
+
/***/ 162:
|
|
105
112
|
/***/ (function(module, exports) {
|
|
106
113
|
|
|
107
114
|
var g;
|
|
@@ -128,14 +135,28 @@ module.exports = g;
|
|
|
128
135
|
|
|
129
136
|
/***/ }),
|
|
130
137
|
|
|
131
|
-
/***/
|
|
138
|
+
/***/ 17:
|
|
132
139
|
/***/ (function(module, exports) {
|
|
133
140
|
|
|
134
141
|
module.exports = require("@splunk/react-ui/EventListener");
|
|
135
142
|
|
|
136
143
|
/***/ }),
|
|
137
144
|
|
|
138
|
-
/***/
|
|
145
|
+
/***/ 18:
|
|
146
|
+
/***/ (function(module, exports) {
|
|
147
|
+
|
|
148
|
+
module.exports = require("lodash/includes");
|
|
149
|
+
|
|
150
|
+
/***/ }),
|
|
151
|
+
|
|
152
|
+
/***/ 2:
|
|
153
|
+
/***/ (function(module, exports) {
|
|
154
|
+
|
|
155
|
+
module.exports = require("react");
|
|
156
|
+
|
|
157
|
+
/***/ }),
|
|
158
|
+
|
|
159
|
+
/***/ 214:
|
|
139
160
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
140
161
|
|
|
141
162
|
"use strict";
|
|
@@ -153,24 +174,33 @@ var external_react_ = __webpack_require__(2);
|
|
|
153
174
|
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
|
|
154
175
|
|
|
155
176
|
// EXTERNAL MODULE: external "react-dom"
|
|
156
|
-
var external_react_dom_ = __webpack_require__(
|
|
177
|
+
var external_react_dom_ = __webpack_require__(93);
|
|
157
178
|
|
|
158
179
|
// EXTERNAL MODULE: external "prop-types"
|
|
159
180
|
var external_prop_types_ = __webpack_require__(1);
|
|
160
181
|
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
161
182
|
|
|
162
|
-
// EXTERNAL MODULE: external "lodash"
|
|
163
|
-
var
|
|
183
|
+
// EXTERNAL MODULE: external "lodash/includes"
|
|
184
|
+
var includes_ = __webpack_require__(18);
|
|
185
|
+
var includes_default = /*#__PURE__*/__webpack_require__.n(includes_);
|
|
186
|
+
|
|
187
|
+
// EXTERNAL MODULE: external "lodash/last"
|
|
188
|
+
var last_ = __webpack_require__(94);
|
|
189
|
+
var last_default = /*#__PURE__*/__webpack_require__.n(last_);
|
|
190
|
+
|
|
191
|
+
// EXTERNAL MODULE: external "lodash/pull"
|
|
192
|
+
var pull_ = __webpack_require__(119);
|
|
193
|
+
var pull_default = /*#__PURE__*/__webpack_require__.n(pull_);
|
|
164
194
|
|
|
165
195
|
// EXTERNAL MODULE: external "@splunk/ui-utils/keyboard"
|
|
166
196
|
var keyboard_ = __webpack_require__(9);
|
|
167
197
|
|
|
168
198
|
// EXTERNAL MODULE: external "@splunk/react-ui/EventListener"
|
|
169
|
-
var EventListener_ = __webpack_require__(
|
|
199
|
+
var EventListener_ = __webpack_require__(17);
|
|
170
200
|
var EventListener_default = /*#__PURE__*/__webpack_require__.n(EventListener_);
|
|
171
201
|
|
|
172
202
|
// EXTERNAL MODULE: ./src/Layer/LayerStack.tsx
|
|
173
|
-
var LayerStack = __webpack_require__(
|
|
203
|
+
var LayerStack = __webpack_require__(95);
|
|
174
204
|
|
|
175
205
|
// EXTERNAL MODULE: external "styled-components"
|
|
176
206
|
var external_styled_components_ = __webpack_require__(3);
|
|
@@ -190,6 +220,9 @@ var StyledLayer = external_styled_components_default.a.div.withConfig({
|
|
|
190
220
|
return $separateStackingContexts && Object(external_styled_components_["css"])(["isolation:isolate;z-index:", ";"], themes_["variables"].zindexLayer);
|
|
191
221
|
});
|
|
192
222
|
|
|
223
|
+
// EXTERNAL MODULE: ./src/utils/ssrDocument.ts
|
|
224
|
+
var ssrDocument = __webpack_require__(28);
|
|
225
|
+
|
|
193
226
|
// CONCATENATED MODULE: ./src/Layer/Layer.tsx
|
|
194
227
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
195
228
|
|
|
@@ -223,6 +256,9 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
223
256
|
|
|
224
257
|
|
|
225
258
|
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
226
262
|
/** @public */
|
|
227
263
|
|
|
228
264
|
var possibleCloseReasons = ['clickAway', 'escapeKey'];
|
|
@@ -267,7 +303,7 @@ var Layer_Layer = /*#__PURE__*/function (_Component) {
|
|
|
267
303
|
var _this$props$onRequest, _this$props;
|
|
268
304
|
|
|
269
305
|
// clicks inside the layer should not be considered clickAways
|
|
270
|
-
if (!_this.props.open || !
|
|
306
|
+
if (!_this.props.open || !includes_default()(_this.props.closeReasons, 'clickAway') || _this.layerClickEvent === event) {
|
|
271
307
|
return;
|
|
272
308
|
}
|
|
273
309
|
|
|
@@ -278,7 +314,7 @@ var Layer_Layer = /*#__PURE__*/function (_Component) {
|
|
|
278
314
|
});
|
|
279
315
|
|
|
280
316
|
_defineProperty(_assertThisInitialized(_this), "handleKeyDownOnWindow", function (event) {
|
|
281
|
-
if (_this.props.open && Object(keyboard_["keycode"])(event) === 'esc' &&
|
|
317
|
+
if (_this.props.open && Object(keyboard_["keycode"])(event) === 'esc' && last_default()(_this.getLayerStack()) === _assertThisInitialized(_this) && includes_default()(_this.props.closeReasons, 'escapeKey')) {
|
|
282
318
|
var _this$props$onRequest2, _this$props2;
|
|
283
319
|
|
|
284
320
|
(_this$props$onRequest2 = (_this$props2 = _this.props).onRequestClose) === null || _this$props$onRequest2 === void 0 ? void 0 : _this$props$onRequest2.call(_this$props2, {
|
|
@@ -288,6 +324,8 @@ var Layer_Layer = /*#__PURE__*/function (_Component) {
|
|
|
288
324
|
}
|
|
289
325
|
});
|
|
290
326
|
|
|
327
|
+
var document = Object(ssrDocument["a" /* getDocument */])();
|
|
328
|
+
|
|
291
329
|
if (!Layer.layerContainer) {
|
|
292
330
|
Layer.layerContainer = document.createElement('div');
|
|
293
331
|
Layer.layerContainer.setAttribute('data-test', 'layer-container');
|
|
@@ -310,13 +348,13 @@ var Layer_Layer = /*#__PURE__*/function (_Component) {
|
|
|
310
348
|
if (!prevProps.open && this.props.open) {
|
|
311
349
|
this.getLayerStack().push(this);
|
|
312
350
|
} else if (prevProps.open && !this.props.open) {
|
|
313
|
-
|
|
351
|
+
pull_default()(this.getLayerStack(), this);
|
|
314
352
|
}
|
|
315
353
|
}
|
|
316
354
|
}, {
|
|
317
355
|
key: "componentWillUnmount",
|
|
318
356
|
value: function componentWillUnmount() {
|
|
319
|
-
|
|
357
|
+
pull_default()(this.getLayerStack(), this);
|
|
320
358
|
}
|
|
321
359
|
}, {
|
|
322
360
|
key: "getLayerStack",
|
|
@@ -390,10 +428,74 @@ _defineProperty(Layer_Layer, "contextType", LayerStack["b" /* LayerStackContext
|
|
|
390
428
|
|
|
391
429
|
/***/ }),
|
|
392
430
|
|
|
393
|
-
/***/
|
|
394
|
-
/***/ (function(module,
|
|
431
|
+
/***/ 28:
|
|
432
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
433
|
+
|
|
434
|
+
"use strict";
|
|
435
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getDocument; });
|
|
436
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ssrDocument; });
|
|
437
|
+
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
438
|
+
var ssrDocument = {
|
|
439
|
+
body: {
|
|
440
|
+
appendChild: function appendChild() {
|
|
441
|
+
return [];
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
addEventListener: function addEventListener() {},
|
|
445
|
+
removeEventListener: function removeEventListener() {},
|
|
446
|
+
activeElement: {
|
|
447
|
+
blur: function blur() {},
|
|
448
|
+
nodeName: ''
|
|
449
|
+
},
|
|
450
|
+
querySelector: function querySelector() {
|
|
451
|
+
return null;
|
|
452
|
+
},
|
|
453
|
+
querySelectorAll: function querySelectorAll() {
|
|
454
|
+
return [];
|
|
455
|
+
},
|
|
456
|
+
getElementById: function getElementById() {
|
|
457
|
+
return null;
|
|
458
|
+
},
|
|
459
|
+
createEvent: function createEvent() {
|
|
460
|
+
return {
|
|
461
|
+
initEvent: function initEvent() {}
|
|
462
|
+
};
|
|
463
|
+
},
|
|
464
|
+
createElement: function createElement() {
|
|
465
|
+
return {
|
|
466
|
+
children: [],
|
|
467
|
+
childNodes: [],
|
|
468
|
+
style: {},
|
|
469
|
+
setAttribute: function setAttribute() {},
|
|
470
|
+
getElementsByTagName: function getElementsByTagName() {
|
|
471
|
+
return [];
|
|
472
|
+
}
|
|
473
|
+
};
|
|
474
|
+
},
|
|
475
|
+
createElementNS: function createElementNS() {
|
|
476
|
+
return {};
|
|
477
|
+
},
|
|
478
|
+
importNode: function importNode() {
|
|
479
|
+
return null;
|
|
480
|
+
},
|
|
481
|
+
location: {
|
|
482
|
+
hash: '',
|
|
483
|
+
host: '',
|
|
484
|
+
hostname: '',
|
|
485
|
+
href: '',
|
|
486
|
+
origin: '',
|
|
487
|
+
pathname: '',
|
|
488
|
+
protocol: '',
|
|
489
|
+
search: ''
|
|
490
|
+
}
|
|
491
|
+
};
|
|
492
|
+
|
|
493
|
+
function getDocument() {
|
|
494
|
+
var doc = typeof document !== 'undefined' ? document : ssrDocument;
|
|
495
|
+
return doc;
|
|
496
|
+
}
|
|
497
|
+
|
|
395
498
|
|
|
396
|
-
module.exports = require("react");
|
|
397
499
|
|
|
398
500
|
/***/ }),
|
|
399
501
|
|
|
@@ -404,21 +506,28 @@ module.exports = require("styled-components");
|
|
|
404
506
|
|
|
405
507
|
/***/ }),
|
|
406
508
|
|
|
407
|
-
/***/
|
|
509
|
+
/***/ 9:
|
|
408
510
|
/***/ (function(module, exports) {
|
|
409
511
|
|
|
410
|
-
module.exports = require("
|
|
512
|
+
module.exports = require("@splunk/ui-utils/keyboard");
|
|
411
513
|
|
|
412
514
|
/***/ }),
|
|
413
515
|
|
|
414
|
-
/***/
|
|
516
|
+
/***/ 93:
|
|
415
517
|
/***/ (function(module, exports) {
|
|
416
518
|
|
|
417
519
|
module.exports = require("react-dom");
|
|
418
520
|
|
|
419
521
|
/***/ }),
|
|
420
522
|
|
|
421
|
-
/***/
|
|
523
|
+
/***/ 94:
|
|
524
|
+
/***/ (function(module, exports) {
|
|
525
|
+
|
|
526
|
+
module.exports = require("lodash/last");
|
|
527
|
+
|
|
528
|
+
/***/ }),
|
|
529
|
+
|
|
530
|
+
/***/ 95:
|
|
422
531
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
423
532
|
|
|
424
533
|
"use strict";
|
|
@@ -477,14 +586,7 @@ function LayerStackGlobalProvider(_ref) {
|
|
|
477
586
|
|
|
478
587
|
LayerStackGlobalProvider.propTypes = propTypes;
|
|
479
588
|
|
|
480
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(
|
|
481
|
-
|
|
482
|
-
/***/ }),
|
|
483
|
-
|
|
484
|
-
/***/ 9:
|
|
485
|
-
/***/ (function(module, exports) {
|
|
486
|
-
|
|
487
|
-
module.exports = require("@splunk/ui-utils/keyboard");
|
|
589
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(162)))
|
|
488
590
|
|
|
489
591
|
/***/ })
|
|
490
592
|
|
package/Link.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 215);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -101,14 +101,21 @@ module.exports = require("prop-types");
|
|
|
101
101
|
|
|
102
102
|
/***/ }),
|
|
103
103
|
|
|
104
|
-
/***/
|
|
104
|
+
/***/ 14:
|
|
105
105
|
/***/ (function(module, exports) {
|
|
106
106
|
|
|
107
107
|
module.exports = require("@splunk/react-ui/Clickable");
|
|
108
108
|
|
|
109
109
|
/***/ }),
|
|
110
110
|
|
|
111
|
-
/***/
|
|
111
|
+
/***/ 2:
|
|
112
|
+
/***/ (function(module, exports) {
|
|
113
|
+
|
|
114
|
+
module.exports = require("react");
|
|
115
|
+
|
|
116
|
+
/***/ }),
|
|
117
|
+
|
|
118
|
+
/***/ 215:
|
|
112
119
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
113
120
|
|
|
114
121
|
"use strict";
|
|
@@ -127,21 +134,21 @@ var external_prop_types_ = __webpack_require__(1);
|
|
|
127
134
|
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
128
135
|
|
|
129
136
|
// EXTERNAL MODULE: external "@splunk/react-ui/Dropdown"
|
|
130
|
-
var Dropdown_ = __webpack_require__(
|
|
137
|
+
var Dropdown_ = __webpack_require__(24);
|
|
131
138
|
|
|
132
139
|
// EXTERNAL MODULE: external "@splunk/ui-utils/i18n"
|
|
133
|
-
var i18n_ = __webpack_require__(
|
|
140
|
+
var i18n_ = __webpack_require__(4);
|
|
134
141
|
|
|
135
142
|
// EXTERNAL MODULE: external "styled-components"
|
|
136
143
|
var external_styled_components_ = __webpack_require__(3);
|
|
137
144
|
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
|
|
138
145
|
|
|
139
146
|
// EXTERNAL MODULE: external "@splunk/react-icons/External"
|
|
140
|
-
var External_ = __webpack_require__(
|
|
147
|
+
var External_ = __webpack_require__(60);
|
|
141
148
|
var External_default = /*#__PURE__*/__webpack_require__.n(External_);
|
|
142
149
|
|
|
143
150
|
// EXTERNAL MODULE: external "@splunk/react-ui/Clickable"
|
|
144
|
-
var Clickable_ = __webpack_require__(
|
|
151
|
+
var Clickable_ = __webpack_require__(14);
|
|
145
152
|
var Clickable_default = /*#__PURE__*/__webpack_require__.n(Clickable_);
|
|
146
153
|
|
|
147
154
|
// EXTERNAL MODULE: external "@splunk/themes"
|
|
@@ -295,20 +302,13 @@ _defineProperty(Link_Link, Dropdown_["legacyRefMode"], true);
|
|
|
295
302
|
|
|
296
303
|
/***/ }),
|
|
297
304
|
|
|
298
|
-
/***/
|
|
305
|
+
/***/ 24:
|
|
299
306
|
/***/ (function(module, exports) {
|
|
300
307
|
|
|
301
308
|
module.exports = require("@splunk/react-ui/Dropdown");
|
|
302
309
|
|
|
303
310
|
/***/ }),
|
|
304
311
|
|
|
305
|
-
/***/ 2:
|
|
306
|
-
/***/ (function(module, exports) {
|
|
307
|
-
|
|
308
|
-
module.exports = require("react");
|
|
309
|
-
|
|
310
|
-
/***/ }),
|
|
311
|
-
|
|
312
312
|
/***/ 3:
|
|
313
313
|
/***/ (function(module, exports) {
|
|
314
314
|
|
|
@@ -316,14 +316,14 @@ module.exports = require("styled-components");
|
|
|
316
316
|
|
|
317
317
|
/***/ }),
|
|
318
318
|
|
|
319
|
-
/***/
|
|
319
|
+
/***/ 4:
|
|
320
320
|
/***/ (function(module, exports) {
|
|
321
321
|
|
|
322
322
|
module.exports = require("@splunk/ui-utils/i18n");
|
|
323
323
|
|
|
324
324
|
/***/ }),
|
|
325
325
|
|
|
326
|
-
/***/
|
|
326
|
+
/***/ 60:
|
|
327
327
|
/***/ (function(module, exports) {
|
|
328
328
|
|
|
329
329
|
module.exports = require("@splunk/react-icons/External");
|
package/List.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 193);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -101,7 +101,7 @@ module.exports = require("prop-types");
|
|
|
101
101
|
|
|
102
102
|
/***/ }),
|
|
103
103
|
|
|
104
|
-
/***/
|
|
104
|
+
/***/ 193:
|
|
105
105
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
106
106
|
|
|
107
107
|
"use strict";
|
|
@@ -133,7 +133,7 @@ var themes_ = __webpack_require__(0);
|
|
|
133
133
|
var StyledOl = external_styled_components_default.a.ol.withConfig({
|
|
134
134
|
displayName: "ListStyles__StyledOl",
|
|
135
135
|
componentId: "sc-1yyh8l9-0"
|
|
136
|
-
})(["", ";list-style-type:", ";padding-left:40px;margin-bottom:1.3em;margin-top:1em;"], themes_["mixins"].reset('block'), function (_ref) {
|
|
136
|
+
})(["", ";", ";list-style-type:", ";padding-left:40px;margin-bottom:1.3em;margin-top:1em;"], themes_["mixins"].reset('block'), themes_["mixins"].typography('body'), function (_ref) {
|
|
137
137
|
var $type = _ref.$type;
|
|
138
138
|
return $type;
|
|
139
139
|
});
|