@splunk/react-ui 4.3.0 → 4.5.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/Accordion.js +37 -21
- package/Anchor.js +2 -2
- package/Animation.js +2 -2
- package/AnimationToggle.js +2 -2
- package/Box.js +2 -2
- package/Button.js +36 -12
- package/ButtonGroup.js +27 -6
- package/ButtonSimple.js +6 -6
- package/CHANGELOG.md +57 -0
- package/Calendar.js +14 -14
- package/Card.js +51 -25
- package/CardLayout.js +31 -10
- package/Chip.js +77 -53
- package/Clickable.js +6 -6
- package/CloseButton.js +6 -6
- package/Code.js +1279 -1120
- package/CollapsiblePanel.js +6 -6
- package/Color.js +180 -209
- package/ColumnLayout.js +4 -4
- package/ComboBox.js +22 -17
- package/Concertina.js +56 -51
- package/ControlGroup.js +121 -32
- package/Date.js +62 -25
- package/DefinitionList.js +2 -2
- package/Dropdown.js +12 -12
- package/EventListener.js +168 -0
- package/FetchOptions.js +8 -8
- package/File.js +122 -96
- package/FormRows.js +66 -58
- package/Heading.js +2 -2
- package/Image.js +14 -14
- package/JSONTree.js +5 -5
- package/Layer.js +32 -20
- package/Link.js +8 -8
- package/List.js +2 -2
- package/Markdown.js +250 -88
- package/Menu.js +70 -64
- package/Message.js +18 -18
- package/Modal.js +70 -16
- package/ModalLayer.js +4 -4
- package/Monogram.js +12 -11
- package/Multiselect.js +124 -80
- package/Number.js +44 -34
- package/Paginator.js +10 -10
- package/Paragraph.js +2 -2
- package/Popover.js +54 -40
- package/Progress.js +8 -8
- package/RadioBar.js +45 -38
- package/RadioList.js +2 -2
- package/Resize.js +19 -15
- package/ResultsMenu.js +6 -6
- package/ScreenReaderContent.js +2 -2
- package/Scroll.js +25 -23
- package/ScrollContainerContext.js +5 -5
- package/Search.d.ts +2 -0
- package/Search.js +797 -0
- package/Select.js +85 -45
- package/SidePanel.js +6 -6
- package/Slider.js +34 -30
- package/SlidingPanels.js +6 -6
- package/StaticContent.js +2 -2
- package/StepBar.js +56 -52
- package/Switch.js +8 -8
- package/TabBar.js +126 -85
- package/TabLayout.js +4 -5
- package/Table.js +266 -155
- package/Text.js +486 -401
- package/Tooltip.js +11 -11
- package/TransitionOpen.js +11 -11
- package/WaitSpinner.js +3 -4
- package/package.json +5 -6
- package/types/src/Accordion/AccordionContext.d.ts +10 -0
- package/types/src/Accordion/Panel.d.ts +0 -9
- package/types/src/Button/Button.d.ts +4 -2
- package/types/src/ButtonGroup/ButtonGroupContext.d.ts +7 -0
- package/types/src/ButtonSimple/ButtonSimple.d.ts +5 -5
- package/types/src/Card/Card.d.ts +2 -0
- package/types/src/CardLayout/CardLayoutContext.d.ts +8 -0
- package/types/src/Color/Color.d.ts +2 -2
- package/types/src/Color/Swatch.d.ts +4 -15
- package/types/src/ComboBox/ComboBox.d.ts +4 -3
- package/types/src/Concertina/ConcertinaContext.d.ts +8 -0
- package/types/src/Concertina/Panel.d.ts +2 -4
- package/types/src/ControlGroup/ControlGroup.d.ts +11 -1
- package/types/src/ControlGroup/ControlGroupContext.d.ts +15 -0
- package/types/src/Date/Date.d.ts +6 -4
- package/types/src/EventListener/EventListener.d.ts +18 -0
- package/types/src/EventListener/index.d.ts +2 -0
- package/types/src/File/File.d.ts +6 -4
- package/types/src/File/FileContext.d.ts +9 -0
- package/types/src/File/Item.d.ts +5 -10
- package/types/src/FormRows/FormRows.d.ts +2 -2
- package/types/src/FormRows/FormRowsContext.d.ts +10 -0
- package/types/src/FormRows/Row.d.ts +5 -16
- package/types/src/Markdown/Markdown.d.ts +2 -0
- package/types/src/Markdown/renderers/MarkdownBlockquote.d.ts +14 -0
- package/types/src/Markdown/renderers/MarkdownCode.d.ts +15 -0
- package/types/src/Markdown/renderers/MarkdownCodeBlock.d.ts +16 -0
- package/types/src/Markdown/renderers/MarkdownHeading.d.ts +15 -0
- package/types/src/Markdown/renderers/MarkdownImage.d.ts +18 -0
- package/types/src/Markdown/renderers/MarkdownItem.d.ts +14 -0
- package/types/src/Markdown/renderers/MarkdownLink.d.ts +18 -0
- package/types/src/Markdown/renderers/MarkdownList.d.ts +26 -0
- package/types/src/Markdown/renderers/MarkdownParagraph.d.ts +14 -0
- package/types/src/Markdown/renderers/index.d.ts +10 -0
- package/types/src/Modal/Modal.d.ts +15 -3
- package/types/src/Monogram/Monogram.d.ts +5 -1
- package/types/src/Multiselect/Compact.d.ts +12 -4
- package/types/src/Multiselect/Multiselect.d.ts +14 -4
- package/types/src/Multiselect/Normal.d.ts +7 -2
- package/types/src/Number/Number.d.ts +11 -7
- package/types/src/Popover/Popover.d.ts +2 -2
- package/types/src/RadioBar/Option.d.ts +1 -15
- package/types/src/RadioBar/RadioBar.d.ts +2 -2
- package/types/src/RadioBar/RadioBarContext.d.ts +9 -0
- package/types/src/Scroll/Inner.d.ts +2 -2
- package/types/src/ScrollContainerContext/ScrollContainerContext.d.ts +4 -4
- package/types/src/Search/Option.d.ts +60 -0
- package/types/src/Search/Search.d.ts +97 -0
- package/types/src/Search/index.d.ts +2 -0
- package/types/src/Select/Select.d.ts +6 -2
- package/types/src/Select/SelectBase.d.ts +12 -5
- package/types/src/Slider/Slider.d.ts +2 -2
- package/types/src/StepBar/Step.d.ts +1 -13
- package/types/src/StepBar/StepBarContext.d.ts +8 -0
- package/types/src/TabBar/Tab.d.ts +5 -13
- package/types/src/TabBar/TabBarContext.d.ts +14 -0
- package/types/src/Table/Body.d.ts +1 -1
- package/types/src/Table/Head.d.ts +3 -1
- package/types/src/Table/HeadCell.d.ts +1 -1
- package/types/src/Table/HeadInner.d.ts +3 -3
- package/types/src/Table/Row.d.ts +10 -3
- package/types/src/Table/Table.d.ts +10 -5
- package/types/src/Text/Text.d.ts +33 -12
- package/types/src/icons/Sort.d.ts +3 -0
- package/types/src/usePrevious/index.d.ts +2 -0
- package/types/src/usePrevious/usePrevious.d.ts +12 -0
- package/usePrevious.js +137 -0
package/Table.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 = 108);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ([
|
|
@@ -276,8 +276,7 @@ module.exports = require("@splunk/ui-utils/keyboard");
|
|
|
276
276
|
module.exports = require("@splunk/ui-utils/id");
|
|
277
277
|
|
|
278
278
|
/***/ }),
|
|
279
|
-
/* 11
|
|
280
|
-
/* 12 */
|
|
279
|
+
/* 11 */
|
|
281
280
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
282
281
|
|
|
283
282
|
"use strict";
|
|
@@ -303,38 +302,39 @@ function updateReactRef(ref, current) {
|
|
|
303
302
|
|
|
304
303
|
|
|
305
304
|
/***/ }),
|
|
305
|
+
/* 12 */,
|
|
306
306
|
/* 13 */,
|
|
307
307
|
/* 14 */
|
|
308
308
|
/***/ (function(module, exports) {
|
|
309
309
|
|
|
310
|
-
module.exports = require("@splunk/react-ui/
|
|
310
|
+
module.exports = require("@splunk/react-ui/EventListener");
|
|
311
311
|
|
|
312
312
|
/***/ }),
|
|
313
313
|
/* 15 */
|
|
314
314
|
/***/ (function(module, exports) {
|
|
315
315
|
|
|
316
|
-
module.exports = require("react-
|
|
316
|
+
module.exports = require("@splunk/react-ui/ScreenReaderContent");
|
|
317
317
|
|
|
318
318
|
/***/ }),
|
|
319
319
|
/* 16 */
|
|
320
320
|
/***/ (function(module, exports) {
|
|
321
321
|
|
|
322
|
-
module.exports = require("@splunk/react-ui/
|
|
322
|
+
module.exports = require("@splunk/react-ui/Popover");
|
|
323
323
|
|
|
324
324
|
/***/ }),
|
|
325
325
|
/* 17 */
|
|
326
326
|
/***/ (function(module, exports) {
|
|
327
327
|
|
|
328
|
-
module.exports = require("@splunk/react-ui/
|
|
328
|
+
module.exports = require("@splunk/react-ui/Button");
|
|
329
329
|
|
|
330
330
|
/***/ }),
|
|
331
|
-
/* 18
|
|
331
|
+
/* 18 */,
|
|
332
|
+
/* 19 */
|
|
332
333
|
/***/ (function(module, exports) {
|
|
333
334
|
|
|
334
335
|
module.exports = require("@splunk/react-ui/Dropdown");
|
|
335
336
|
|
|
336
337
|
/***/ }),
|
|
337
|
-
/* 19 */,
|
|
338
338
|
/* 20 */,
|
|
339
339
|
/* 21 */,
|
|
340
340
|
/* 22 */,
|
|
@@ -459,15 +459,16 @@ module.exports = require("@splunk/react-icons/Caret");
|
|
|
459
459
|
/* 42 */,
|
|
460
460
|
/* 43 */,
|
|
461
461
|
/* 44 */,
|
|
462
|
-
/* 45
|
|
462
|
+
/* 45 */,
|
|
463
|
+
/* 46 */
|
|
463
464
|
/***/ (function(module, exports) {
|
|
464
465
|
|
|
465
466
|
module.exports = require("@splunk/react-ui/Tooltip");
|
|
466
467
|
|
|
467
468
|
/***/ }),
|
|
468
|
-
/* 46 */,
|
|
469
469
|
/* 47 */,
|
|
470
|
-
/* 48
|
|
470
|
+
/* 48 */,
|
|
471
|
+
/* 49 */
|
|
471
472
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
472
473
|
|
|
473
474
|
"use strict";
|
|
@@ -490,19 +491,20 @@ function assertDefined(val, msg) {
|
|
|
490
491
|
|
|
491
492
|
|
|
492
493
|
/***/ }),
|
|
493
|
-
/* 49 */,
|
|
494
494
|
/* 50 */,
|
|
495
495
|
/* 51 */,
|
|
496
496
|
/* 52 */,
|
|
497
497
|
/* 53 */,
|
|
498
|
-
/* 54
|
|
498
|
+
/* 54 */,
|
|
499
|
+
/* 55 */,
|
|
500
|
+
/* 56 */
|
|
499
501
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
500
502
|
|
|
501
503
|
"use strict";
|
|
502
504
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MoreVertical; });
|
|
503
505
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
504
506
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
505
|
-
/* harmony import */ var _splunk_react_icons_MoreVertical__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
507
|
+
/* harmony import */ var _splunk_react_icons_MoreVertical__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
|
|
506
508
|
/* harmony import */ var _splunk_react_icons_MoreVertical__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_icons_MoreVertical__WEBPACK_IMPORTED_MODULE_1__);
|
|
507
509
|
/* harmony import */ var _ThemedIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
|
|
508
510
|
/* harmony import */ var _SVG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
|
|
@@ -532,20 +534,21 @@ function MoreVertical(props) {
|
|
|
532
534
|
}
|
|
533
535
|
|
|
534
536
|
/***/ }),
|
|
535
|
-
/*
|
|
537
|
+
/* 57 */
|
|
536
538
|
/***/ (function(module, exports) {
|
|
537
539
|
|
|
538
540
|
module.exports = require("@splunk/react-icons/MoreVertical");
|
|
539
541
|
|
|
540
542
|
/***/ }),
|
|
541
|
-
/*
|
|
543
|
+
/* 58 */,
|
|
544
|
+
/* 59 */
|
|
542
545
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
543
546
|
|
|
544
547
|
"use strict";
|
|
545
548
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ChevronDown; });
|
|
546
549
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
547
550
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
548
|
-
/* harmony import */ var _splunk_react_icons_ChevronDown__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
551
|
+
/* harmony import */ var _splunk_react_icons_ChevronDown__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(60);
|
|
549
552
|
/* harmony import */ var _splunk_react_icons_ChevronDown__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_icons_ChevronDown__WEBPACK_IMPORTED_MODULE_1__);
|
|
550
553
|
/* harmony import */ var _ThemedIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
|
|
551
554
|
/* harmony import */ var _SVG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
|
|
@@ -587,25 +590,22 @@ function ChevronDown(props) {
|
|
|
587
590
|
}
|
|
588
591
|
|
|
589
592
|
/***/ }),
|
|
590
|
-
/*
|
|
593
|
+
/* 60 */
|
|
591
594
|
/***/ (function(module, exports) {
|
|
592
595
|
|
|
593
596
|
module.exports = require("@splunk/react-icons/ChevronDown");
|
|
594
597
|
|
|
595
598
|
/***/ }),
|
|
596
|
-
/* 58 */,
|
|
597
|
-
/* 59 */,
|
|
598
|
-
/* 60 */,
|
|
599
599
|
/* 61 */,
|
|
600
|
-
/* 62
|
|
600
|
+
/* 62 */,
|
|
601
|
+
/* 63 */,
|
|
602
|
+
/* 64 */,
|
|
603
|
+
/* 65 */
|
|
601
604
|
/***/ (function(module, exports) {
|
|
602
605
|
|
|
603
606
|
module.exports = require("@splunk/react-ui/Switch");
|
|
604
607
|
|
|
605
608
|
/***/ }),
|
|
606
|
-
/* 63 */,
|
|
607
|
-
/* 64 */,
|
|
608
|
-
/* 65 */,
|
|
609
609
|
/* 66 */,
|
|
610
610
|
/* 67 */,
|
|
611
611
|
/* 68 */,
|
|
@@ -636,41 +636,44 @@ module.exports = require("@splunk/react-ui/Switch");
|
|
|
636
636
|
/* 93 */,
|
|
637
637
|
/* 94 */,
|
|
638
638
|
/* 95 */,
|
|
639
|
-
/* 96
|
|
639
|
+
/* 96 */,
|
|
640
|
+
/* 97 */,
|
|
641
|
+
/* 98 */,
|
|
642
|
+
/* 99 */
|
|
640
643
|
/***/ (function(module, exports) {
|
|
641
644
|
|
|
642
645
|
module.exports = require("react-resize-detector");
|
|
643
646
|
|
|
644
647
|
/***/ }),
|
|
645
|
-
/*
|
|
648
|
+
/* 100 */
|
|
646
649
|
/***/ (function(module, exports) {
|
|
647
650
|
|
|
648
|
-
module.exports = require("@splunk/react-icons/
|
|
651
|
+
module.exports = require("@splunk/react-icons/SortedDown");
|
|
649
652
|
|
|
650
653
|
/***/ }),
|
|
651
|
-
/*
|
|
654
|
+
/* 101 */
|
|
652
655
|
/***/ (function(module, exports) {
|
|
653
656
|
|
|
654
|
-
module.exports = require("@splunk/react-icons/
|
|
657
|
+
module.exports = require("@splunk/react-icons/SortedUp");
|
|
655
658
|
|
|
656
659
|
/***/ }),
|
|
657
|
-
/*
|
|
660
|
+
/* 102 */
|
|
658
661
|
/***/ (function(module, exports) {
|
|
659
662
|
|
|
660
|
-
module.exports = require("@splunk/react-icons/
|
|
663
|
+
module.exports = require("@splunk/react-icons/Sort");
|
|
661
664
|
|
|
662
665
|
/***/ }),
|
|
663
|
-
/*
|
|
666
|
+
/* 103 */
|
|
664
667
|
/***/ (function(module, exports) {
|
|
665
668
|
|
|
666
669
|
module.exports = require("@splunk/react-icons/Info");
|
|
667
670
|
|
|
668
671
|
/***/ }),
|
|
669
|
-
/* 101 */,
|
|
670
|
-
/* 102 */,
|
|
671
|
-
/* 103 */,
|
|
672
672
|
/* 104 */,
|
|
673
|
-
/* 105
|
|
673
|
+
/* 105 */,
|
|
674
|
+
/* 106 */,
|
|
675
|
+
/* 107 */,
|
|
676
|
+
/* 108 */
|
|
674
677
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
675
678
|
|
|
676
679
|
"use strict";
|
|
@@ -698,14 +701,14 @@ var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_pr
|
|
|
698
701
|
// EXTERNAL MODULE: external "lodash"
|
|
699
702
|
var external_lodash_ = __webpack_require__(4);
|
|
700
703
|
|
|
701
|
-
// EXTERNAL MODULE: external "react-event-listener"
|
|
702
|
-
var external_react_event_listener_ = __webpack_require__(15);
|
|
703
|
-
var external_react_event_listener_default = /*#__PURE__*/__webpack_require__.n(external_react_event_listener_);
|
|
704
|
-
|
|
705
704
|
// EXTERNAL MODULE: external "react-resize-detector"
|
|
706
|
-
var external_react_resize_detector_ = __webpack_require__(
|
|
705
|
+
var external_react_resize_detector_ = __webpack_require__(99);
|
|
707
706
|
var external_react_resize_detector_default = /*#__PURE__*/__webpack_require__.n(external_react_resize_detector_);
|
|
708
707
|
|
|
708
|
+
// EXTERNAL MODULE: external "@splunk/react-ui/EventListener"
|
|
709
|
+
var EventListener_ = __webpack_require__(14);
|
|
710
|
+
var EventListener_default = /*#__PURE__*/__webpack_require__.n(EventListener_);
|
|
711
|
+
|
|
709
712
|
// EXTERNAL MODULE: external "@splunk/ui-utils/keyboard"
|
|
710
713
|
var keyboard_ = __webpack_require__(9);
|
|
711
714
|
|
|
@@ -728,7 +731,7 @@ var Styled = external_styled_components_default.a.tbody.withConfig({
|
|
|
728
731
|
})(["", ""], themes_["mixins"].reset('table-row-group'));
|
|
729
732
|
|
|
730
733
|
// EXTERNAL MODULE: ./src/utils/updateReactRef.ts
|
|
731
|
-
var updateReactRef = __webpack_require__(
|
|
734
|
+
var updateReactRef = __webpack_require__(11);
|
|
732
735
|
|
|
733
736
|
// CONCATENATED MODULE: ./src/Table/Body.tsx
|
|
734
737
|
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); }
|
|
@@ -776,7 +779,7 @@ var propTypes = {
|
|
|
776
779
|
movableColumns: external_prop_types_default.a.bool,
|
|
777
780
|
|
|
778
781
|
/** @private. Generally passed by Table rather than added directly. */
|
|
779
|
-
rowExpansion: external_prop_types_default.a.oneOf(['single', 'multi', 'none']),
|
|
782
|
+
rowExpansion: external_prop_types_default.a.oneOf(['single', 'multi', 'none', 'controlled']),
|
|
780
783
|
|
|
781
784
|
/** @private. Generally passed by Table rather than added directly. */
|
|
782
785
|
onRequestMoveRow: external_prop_types_default.a.func,
|
|
@@ -927,7 +930,7 @@ var Body_Body = /*#__PURE__*/function (_Component) {
|
|
|
927
930
|
}
|
|
928
931
|
}, {
|
|
929
932
|
key: "handleRowExpansion",
|
|
930
|
-
value: function handleRowExpansion(key) {
|
|
933
|
+
value: function handleRowExpansion(event, key, onExpansion) {
|
|
931
934
|
var current = this.state.expanded;
|
|
932
935
|
|
|
933
936
|
if (this.props.rowExpansion === 'single') {
|
|
@@ -951,6 +954,8 @@ var Body_Body = /*#__PURE__*/function (_Component) {
|
|
|
951
954
|
});
|
|
952
955
|
}
|
|
953
956
|
}
|
|
957
|
+
|
|
958
|
+
onExpansion === null || onExpansion === void 0 ? void 0 : onExpansion(event);
|
|
954
959
|
}
|
|
955
960
|
}, {
|
|
956
961
|
key: "calculateGuideIndex",
|
|
@@ -1044,7 +1049,12 @@ var Body_Body = /*#__PURE__*/function (_Component) {
|
|
|
1044
1049
|
var key = child.key;
|
|
1045
1050
|
var oddOrEven = i % 2 ? 'even' : 'odd';
|
|
1046
1051
|
var stripe = stripeRows ? oddOrEven : 'none';
|
|
1047
|
-
var expanded = Object(external_lodash_["includes"])(_this2.state.expanded, key);
|
|
1052
|
+
var expanded = rowExpansion === 'controlled' ? child.props.expanded : Object(external_lodash_["includes"])(_this2.state.expanded, key);
|
|
1053
|
+
|
|
1054
|
+
var onExpansion = function onExpansion(e) {
|
|
1055
|
+
_this2.handleRowExpansion(e, key, child.props.onExpansion);
|
|
1056
|
+
};
|
|
1057
|
+
|
|
1048
1058
|
rows.push( /*#__PURE__*/Object(external_react_["cloneElement"])(child, {
|
|
1049
1059
|
index: i,
|
|
1050
1060
|
showRowGuideline: showRowGuideline,
|
|
@@ -1054,9 +1064,7 @@ var Body_Body = /*#__PURE__*/function (_Component) {
|
|
|
1054
1064
|
expandable: rowExpansion !== 'none',
|
|
1055
1065
|
draggable: !!onRequestMoveRow,
|
|
1056
1066
|
movableColumns: movableColumns,
|
|
1057
|
-
onExpansion:
|
|
1058
|
-
return _this2.handleRowExpansion(key);
|
|
1059
|
-
},
|
|
1067
|
+
onExpansion: onExpansion,
|
|
1060
1068
|
onRequestMoveRow: onRequestMoveRow ? _this2.onRequestMoveRow : undefined,
|
|
1061
1069
|
onDragStart: onRequestMoveRow ? _this2.handleDragStart : undefined,
|
|
1062
1070
|
key: child.key || child.props.dataId || i,
|
|
@@ -1114,7 +1122,10 @@ var StyledTableContainer = external_styled_components_default.a.div.withConfig({
|
|
|
1114
1122
|
var StyledTable = external_styled_components_default.a.table.withConfig({
|
|
1115
1123
|
displayName: "TableStyles__StyledTable",
|
|
1116
1124
|
componentId: "sc-1cmfss7-2"
|
|
1117
|
-
})(["", ";position:relative;border-collapse:collapse;border-spacing:0;min-width:100%;&[data-fixed-column='true']{table-layout:fixed;min-width:0;width:0;}@media print{width:100%;max-width:100%;table-layout:auto;}"], themes_["mixins"].reset('table'))
|
|
1125
|
+
})(["", ";position:relative;border-collapse:collapse;border-spacing:0;min-width:100%;&[data-fixed-column='true']{table-layout:fixed;min-width:0;width:0;}", " @media print{width:100%;max-width:100%;table-layout:auto;}"], themes_["mixins"].reset('table'), function (_ref) {
|
|
1126
|
+
var $resizableFillLayout = _ref.$resizableFillLayout;
|
|
1127
|
+
return $resizableFillLayout && Object(external_styled_components_["css"])(["width:100%;min-width:100%;table-layout:fixed;"]);
|
|
1128
|
+
});
|
|
1118
1129
|
var StyledDockedScrollbar = external_styled_components_default.a.div.withConfig({
|
|
1119
1130
|
displayName: "TableStyles__StyledDockedScrollbar",
|
|
1120
1131
|
componentId: "sc-1cmfss7-3"
|
|
@@ -1129,8 +1140,8 @@ var StyledTableCaption = external_styled_components_default.a.caption.withConfig
|
|
|
1129
1140
|
})(["padding:", ";font-size:", ";caption-side:", ";"], Object(themes_["pick"])({
|
|
1130
1141
|
enterprise: "".concat(themes_["variables"].spacingQuarter, " 0"),
|
|
1131
1142
|
prisma: "5px 0"
|
|
1132
|
-
}), themes_["variables"].fontSizeLarge, function (
|
|
1133
|
-
var side =
|
|
1143
|
+
}), themes_["variables"].fontSizeLarge, function (_ref2) {
|
|
1144
|
+
var side = _ref2.side;
|
|
1134
1145
|
return side;
|
|
1135
1146
|
});
|
|
1136
1147
|
|
|
@@ -1394,12 +1405,8 @@ Cell_defineProperty(Cell_Cell, "defaultProps", Cell_defaultProps);
|
|
|
1394
1405
|
// EXTERNAL MODULE: external "@splunk/ui-utils/i18n"
|
|
1395
1406
|
var i18n_ = __webpack_require__(5);
|
|
1396
1407
|
|
|
1397
|
-
// EXTERNAL MODULE: external "@splunk/react-icons/Sort"
|
|
1398
|
-
var Sort_ = __webpack_require__(97);
|
|
1399
|
-
var Sort_default = /*#__PURE__*/__webpack_require__.n(Sort_);
|
|
1400
|
-
|
|
1401
1408
|
// EXTERNAL MODULE: external "@splunk/react-icons/SortedDown"
|
|
1402
|
-
var SortedDown_ = __webpack_require__(
|
|
1409
|
+
var SortedDown_ = __webpack_require__(100);
|
|
1403
1410
|
var SortedDown_default = /*#__PURE__*/__webpack_require__.n(SortedDown_);
|
|
1404
1411
|
|
|
1405
1412
|
// EXTERNAL MODULE: ./src/icons/ThemedIcon.tsx
|
|
@@ -1422,7 +1429,7 @@ function Prisma24(_ref) {
|
|
|
1422
1429
|
return /*#__PURE__*/external_react_default.a.createElement(SVG["a" /* default */], SortedDown_extends({
|
|
1423
1430
|
viewBox: "0 0 24 24"
|
|
1424
1431
|
}, otherProps), /*#__PURE__*/external_react_default.a.createElement("path", {
|
|
1425
|
-
d: "M6.55086 12.
|
|
1432
|
+
d: "M6.55086 12.337C6.16033 11.9465 5.52717 11.9465 5.13664 12.337C4.74612 12.7276 4.74612 13.3607 5.13664 13.7512L10.9391 19.5537C11.5249 20.1395 12.4746 20.1395 13.0604 19.5537L18.8628 13.7513C19.2534 13.3607 19.2534 12.7276 18.8628 12.337C18.4723 11.9465 17.8391 11.9465 17.4486 12.337L13 16.7856V5.00244C13 4.45016 12.5523 4.00244 12 4.00244C11.4477 4.00244 11 4.45016 11 5.00244V16.7862L6.55086 12.337Z",
|
|
1426
1433
|
fill: "currentColor"
|
|
1427
1434
|
}));
|
|
1428
1435
|
}
|
|
@@ -1433,7 +1440,7 @@ function Prisma16(_ref2) {
|
|
|
1433
1440
|
return /*#__PURE__*/external_react_default.a.createElement(SVG["a" /* default */], SortedDown_extends({
|
|
1434
1441
|
viewBox: "0 0 16 16"
|
|
1435
1442
|
}, otherProps), /*#__PURE__*/external_react_default.a.createElement("path", {
|
|
1436
|
-
d: "M8.
|
|
1443
|
+
d: "M8 2C8.55228 2 9 2.44772 9 3V10.0858L11.7929 7.29289C12.1834 6.90237 12.8166 6.90237 13.2071 7.29289C13.5976 7.68342 13.5976 8.31658 13.2071 8.70711L9.06066 12.8536C8.47487 13.4393 7.52513 13.4393 6.93934 12.8536L2.79289 8.70711C2.40237 8.31658 2.40237 7.68342 2.79289 7.29289C3.18342 6.90237 3.81658 6.90237 4.20711 7.29289L7 10.0858V3C7 2.44772 7.44772 2 8 2Z",
|
|
1437
1444
|
fill: "currentColor"
|
|
1438
1445
|
}));
|
|
1439
1446
|
}
|
|
@@ -1446,7 +1453,7 @@ function SortedDown(props) {
|
|
|
1446
1453
|
}, props));
|
|
1447
1454
|
}
|
|
1448
1455
|
// EXTERNAL MODULE: external "@splunk/react-icons/SortedUp"
|
|
1449
|
-
var SortedUp_ = __webpack_require__(
|
|
1456
|
+
var SortedUp_ = __webpack_require__(101);
|
|
1450
1457
|
var SortedUp_default = /*#__PURE__*/__webpack_require__.n(SortedUp_);
|
|
1451
1458
|
|
|
1452
1459
|
// CONCATENATED MODULE: ./src/icons/SortedUp.tsx
|
|
@@ -1463,7 +1470,7 @@ function SortedUp_Prisma24(_ref) {
|
|
|
1463
1470
|
return /*#__PURE__*/external_react_default.a.createElement(SVG["a" /* default */], SortedUp_extends({
|
|
1464
1471
|
viewBox: "0 0 24 24"
|
|
1465
1472
|
}, otherProps), /*#__PURE__*/external_react_default.a.createElement("path", {
|
|
1466
|
-
d: "M6.55135 11.6631C6.16082 12.0536 5.52766 12.0536 5.13713 11.6631C4.74661 11.2725 4.74661 10.6394 5.13713 10.2488L10.9396 4.44642C11.5253 3.86064 12.4751 3.86063 13.0609 4.44642L18.8633 10.2488C19.2538 10.6394 19.2538 11.2725 18.8633 11.6631C18.4728 12.0536 17.8396 12.0536 17.4491 11.6631L13 7.
|
|
1473
|
+
d: "M6.55135 11.6631C6.16082 12.0536 5.52766 12.0536 5.13713 11.6631C4.74661 11.2725 4.74661 10.6394 5.13713 10.2488L10.9396 4.44642C11.5253 3.86064 12.4751 3.86063 13.0609 4.44642L18.8633 10.2488C19.2538 10.6394 19.2538 11.2725 18.8633 11.6631C18.4728 12.0536 17.8396 12.0536 17.4491 11.6631L13 7.21397V19.0009C13 19.5532 12.5523 20.0009 12 20.0009C11.4477 20.0009 11 19.5532 11 19.0009V7.21441L6.55135 11.6631Z",
|
|
1467
1474
|
fill: "currentColor"
|
|
1468
1475
|
}));
|
|
1469
1476
|
}
|
|
@@ -1474,7 +1481,7 @@ function SortedUp_Prisma16(_ref2) {
|
|
|
1474
1481
|
return /*#__PURE__*/external_react_default.a.createElement(SVG["a" /* default */], SortedUp_extends({
|
|
1475
1482
|
viewBox: "0 0 16 16"
|
|
1476
1483
|
}, otherProps), /*#__PURE__*/external_react_default.a.createElement("path", {
|
|
1477
|
-
d: "
|
|
1484
|
+
d: "M9 5.91414L11.7929 8.70703C12.1834 9.09756 12.8166 9.09756 13.2071 8.70703C13.5976 8.31651 13.5976 7.68334 13.2071 7.29282L9.06066 3.14637C8.47487 2.56059 7.52513 2.56058 6.93934 3.14637L2.79289 7.29282C2.40237 7.68334 2.40237 8.31651 2.79289 8.70703C3.18342 9.09756 3.81658 9.09756 4.20711 8.70703L7 5.91414V12.9999C7 13.5522 7.44772 13.9999 8 13.9999C8.55228 13.9999 9 13.5522 9 12.9999V5.91414Z",
|
|
1478
1485
|
fill: "currentColor"
|
|
1479
1486
|
}));
|
|
1480
1487
|
}
|
|
@@ -1486,11 +1493,52 @@ function SortedUp(props) {
|
|
|
1486
1493
|
Prisma24: SortedUp_Prisma24
|
|
1487
1494
|
}, props));
|
|
1488
1495
|
}
|
|
1496
|
+
// EXTERNAL MODULE: external "@splunk/react-icons/Sort"
|
|
1497
|
+
var Sort_ = __webpack_require__(102);
|
|
1498
|
+
var Sort_default = /*#__PURE__*/__webpack_require__.n(Sort_);
|
|
1499
|
+
|
|
1500
|
+
// CONCATENATED MODULE: ./src/icons/Sort.tsx
|
|
1501
|
+
function Sort_extends() { Sort_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return Sort_extends.apply(this, arguments); }
|
|
1502
|
+
|
|
1503
|
+
|
|
1504
|
+
|
|
1505
|
+
|
|
1506
|
+
|
|
1507
|
+
|
|
1508
|
+
function Sort_Prisma24(_ref) {
|
|
1509
|
+
var otherProps = Sort_extends({}, _ref);
|
|
1510
|
+
|
|
1511
|
+
return /*#__PURE__*/external_react_default.a.createElement(SVG["a" /* default */], Sort_extends({
|
|
1512
|
+
viewBox: "0 0 24 24"
|
|
1513
|
+
}, otherProps), /*#__PURE__*/external_react_default.a.createElement("path", {
|
|
1514
|
+
d: "M7.2788 9.00002C6.84609 9.00002 6.61768 9.51239 6.90691 9.83423L11.4078 14.8426C11.6065 15.0637 11.953 15.0636 12.1517 14.8425L16.6499 9.8341C16.939 9.51223 16.7106 9 16.2779 9L7.2788 9.00002Z",
|
|
1515
|
+
fill: "currentColor"
|
|
1516
|
+
}));
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
function Sort_Prisma16(_ref2) {
|
|
1520
|
+
var otherProps = Sort_extends({}, _ref2);
|
|
1521
|
+
|
|
1522
|
+
return /*#__PURE__*/external_react_default.a.createElement(SVG["a" /* default */], Sort_extends({
|
|
1523
|
+
viewBox: "0 0 16 16"
|
|
1524
|
+
}, otherProps), /*#__PURE__*/external_react_default.a.createElement("path", {
|
|
1525
|
+
d: "M6.93934 2.14662C7.52513 1.56083 8.47487 1.56083 9.06066 2.14662L11.7071 4.79306C12.0976 5.18359 12.0976 5.81675 11.7071 6.20728C11.3166 6.5978 10.6834 6.5978 10.2929 6.20728L9 4.91438V11.0859L10.2929 9.79297C10.6834 9.40244 11.3166 9.40244 11.7071 9.79297C12.0976 10.1835 12.0976 10.8167 11.7071 11.2072L9.06066 13.8536C8.47487 14.4394 7.52513 14.4394 6.93934 13.8536L4.29289 11.2072C3.90237 10.8167 3.90237 10.1835 4.29289 9.79297C4.68342 9.40244 5.31658 9.40244 5.70711 9.79297L7 11.0859V4.91438L5.70711 6.20728C5.31658 6.5978 4.68342 6.5978 4.29289 6.20728C3.90237 5.81675 3.90237 5.18359 4.29289 4.79306L6.93934 2.14662Z",
|
|
1526
|
+
fill: "currentColor"
|
|
1527
|
+
}));
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
function CaretDown(props) {
|
|
1531
|
+
return /*#__PURE__*/external_react_default.a.createElement(ThemedIcon["a" /* default */], Sort_extends({
|
|
1532
|
+
Enterprise: Sort_default.a,
|
|
1533
|
+
Prisma16: Sort_Prisma16,
|
|
1534
|
+
Prisma24: Sort_Prisma24
|
|
1535
|
+
}, props));
|
|
1536
|
+
}
|
|
1489
1537
|
// EXTERNAL MODULE: ./src/icons/CaretDown.tsx
|
|
1490
|
-
var
|
|
1538
|
+
var icons_CaretDown = __webpack_require__(36);
|
|
1491
1539
|
|
|
1492
1540
|
// EXTERNAL MODULE: external "@splunk/react-ui/ScreenReaderContent"
|
|
1493
|
-
var ScreenReaderContent_ = __webpack_require__(
|
|
1541
|
+
var ScreenReaderContent_ = __webpack_require__(15);
|
|
1494
1542
|
var ScreenReaderContent_default = /*#__PURE__*/__webpack_require__.n(ScreenReaderContent_);
|
|
1495
1543
|
|
|
1496
1544
|
// CONCATENATED MODULE: ./src/Table/HeadInnerStyles.ts
|
|
@@ -1523,10 +1571,7 @@ var StyledMenuIcon = external_styled_components_default.a.span.withConfig({
|
|
|
1523
1571
|
var StyledLabel = external_styled_components_default.a.span.withConfig({
|
|
1524
1572
|
displayName: "HeadInnerStyles__StyledLabel",
|
|
1525
1573
|
componentId: "sc-1sa0wng-2"
|
|
1526
|
-
})(["flex:0 1 auto;position:relative;word-wrap:break-word;word-break:break-word;
|
|
1527
|
-
enterprise: 1,
|
|
1528
|
-
prisma: 2
|
|
1529
|
-
}), Object(themes_["pick"])({
|
|
1574
|
+
})(["flex:0 1 auto;position:relative;word-wrap:break-word;word-break:break-word;", " ", " ", " ", " ", " + &{margin-left:", ";}"], Object(themes_["pick"])({
|
|
1530
1575
|
enterprise: function enterprise(_ref) {
|
|
1531
1576
|
var $align = _ref.$align;
|
|
1532
1577
|
return $align !== 'right' && Object(external_styled_components_["css"])(["display:flex;justify-content:space-between;"]);
|
|
@@ -1592,10 +1637,7 @@ var HeadInnerStyles_Styled = external_styled_components_default.a.div.withConfig
|
|
|
1592
1637
|
var StyledSortIcon = external_styled_components_default.a.span.withConfig({
|
|
1593
1638
|
displayName: "HeadInnerStyles__StyledSortIcon",
|
|
1594
1639
|
componentId: "sc-1sa0wng-4"
|
|
1595
|
-
})(["flex:0 0 auto;
|
|
1596
|
-
enterprise: 2,
|
|
1597
|
-
prisma: 1
|
|
1598
|
-
}), Object(themes_["pick"])({
|
|
1640
|
+
})(["flex:0 0 auto;", ";margin-top:-1px;", " color:", ";", ""], Object(themes_["pick"])({
|
|
1599
1641
|
enterprise: Object(external_styled_components_["css"])(["right:0;"]),
|
|
1600
1642
|
prisma: Object(external_styled_components_["css"])(["left:0;"])
|
|
1601
1643
|
}), Object(themes_["pick"])({
|
|
@@ -1612,11 +1654,6 @@ var StyledSortIcon = external_styled_components_default.a.span.withConfig({
|
|
|
1612
1654
|
enterprise: themes_["variables"].accentColor,
|
|
1613
1655
|
prisma: themes_["variables"].contentColorDefault
|
|
1614
1656
|
}));
|
|
1615
|
-
}, function (_ref6) {
|
|
1616
|
-
var $sorted = _ref6.$sorted;
|
|
1617
|
-
return !$sorted && Object(themes_["pick"])({
|
|
1618
|
-
prisma: Object(external_styled_components_["css"])(["display:none;"])
|
|
1619
|
-
});
|
|
1620
1657
|
});
|
|
1621
1658
|
var StyledResize = external_styled_components_default.a.button.withConfig({
|
|
1622
1659
|
displayName: "HeadInnerStyles__StyledResize",
|
|
@@ -1855,7 +1892,6 @@ function HeadInner_objectWithoutPropertiesLoose(source, excluded) { if (source =
|
|
|
1855
1892
|
|
|
1856
1893
|
|
|
1857
1894
|
|
|
1858
|
-
|
|
1859
1895
|
var HeadInner_propTypes = {
|
|
1860
1896
|
align: external_prop_types_default.a.oneOf(['left', 'center', 'right']),
|
|
1861
1897
|
columnId: external_prop_types_default.a.any,
|
|
@@ -1871,14 +1907,14 @@ var HeadInner_propTypes = {
|
|
|
1871
1907
|
resizable: external_prop_types_default.a.bool,
|
|
1872
1908
|
sortDir: external_prop_types_default.a.string,
|
|
1873
1909
|
truncate: external_prop_types_default.a.bool,
|
|
1874
|
-
width: external_prop_types_default.a.number
|
|
1910
|
+
width: external_prop_types_default.a.oneOfType([external_prop_types_default.a.number, external_prop_types_default.a.oneOf(['auto'])])
|
|
1875
1911
|
};
|
|
1876
1912
|
|
|
1877
1913
|
function HeadInner(_ref) {
|
|
1878
1914
|
var index = _ref.index,
|
|
1879
1915
|
columnId = _ref.columnId,
|
|
1880
1916
|
id = _ref.id,
|
|
1881
|
-
|
|
1917
|
+
widthProp = _ref.width,
|
|
1882
1918
|
onDragEnd = _ref.onDragEnd,
|
|
1883
1919
|
onAutosizeColumn = _ref.onAutosizeColumn,
|
|
1884
1920
|
_ref$align = _ref.align,
|
|
@@ -1932,20 +1968,44 @@ function HeadInner(_ref) {
|
|
|
1932
1968
|
return cloneEl === null || cloneEl === void 0 ? void 0 : cloneEl.remove();
|
|
1933
1969
|
};
|
|
1934
1970
|
}, [cloneEl]);
|
|
1971
|
+
var width;
|
|
1935
1972
|
|
|
1936
|
-
|
|
1937
|
-
|
|
1973
|
+
if (widthProp === 'auto') {
|
|
1974
|
+
var _el$parentElement;
|
|
1938
1975
|
|
|
1939
|
-
|
|
1976
|
+
var el = ref.current;
|
|
1977
|
+
var rect = el === null || el === void 0 ? void 0 : (_el$parentElement = el.parentElement) === null || _el$parentElement === void 0 ? void 0 : _el$parentElement.getBoundingClientRect();
|
|
1978
|
+
width = rect === null || rect === void 0 ? void 0 : rect.width;
|
|
1979
|
+
} else {
|
|
1980
|
+
width = widthProp;
|
|
1981
|
+
}
|
|
1940
1982
|
|
|
1941
1983
|
var handleResizeKeyDown = function handleResizeKeyDown(e) {
|
|
1942
1984
|
var key = Object(keyboard_["keycode"])(e.nativeEvent);
|
|
1943
1985
|
|
|
1944
|
-
if (onRequestResize === undefined ||
|
|
1986
|
+
if (onRequestResize === undefined || index === undefined) {
|
|
1987
|
+
return;
|
|
1988
|
+
}
|
|
1989
|
+
|
|
1990
|
+
if (widthProp === 'auto') {
|
|
1991
|
+
var _el$parentElement2;
|
|
1992
|
+
|
|
1993
|
+
var _el = ref.current;
|
|
1994
|
+
|
|
1995
|
+
var _rect = _el === null || _el === void 0 ? void 0 : (_el$parentElement2 = _el.parentElement) === null || _el$parentElement2 === void 0 ? void 0 : _el$parentElement2.getBoundingClientRect();
|
|
1996
|
+
|
|
1997
|
+
width = _rect === null || _rect === void 0 ? void 0 : _rect.width;
|
|
1998
|
+
} else {
|
|
1999
|
+
width = widthProp;
|
|
2000
|
+
}
|
|
2001
|
+
|
|
2002
|
+
if (width === undefined) {
|
|
1945
2003
|
return;
|
|
1946
2004
|
}
|
|
1947
2005
|
|
|
1948
2006
|
if (key === 'left') {
|
|
2007
|
+
e.preventDefault(); // prevent text selection
|
|
2008
|
+
|
|
1949
2009
|
var newWidth = Math.max(width - 10, 20);
|
|
1950
2010
|
onRequestResize(e, {
|
|
1951
2011
|
index: index,
|
|
@@ -1956,6 +2016,8 @@ function HeadInner(_ref) {
|
|
|
1956
2016
|
}
|
|
1957
2017
|
|
|
1958
2018
|
if (key === 'right') {
|
|
2019
|
+
e.preventDefault(); // prevent text selection
|
|
2020
|
+
|
|
1959
2021
|
var _newWidth = width + 10;
|
|
1960
2022
|
|
|
1961
2023
|
onRequestResize(e, {
|
|
@@ -1968,6 +2030,22 @@ function HeadInner(_ref) {
|
|
|
1968
2030
|
};
|
|
1969
2031
|
|
|
1970
2032
|
var handleStartResize = function handleStartResize(e) {
|
|
2033
|
+
if (widthProp === 'auto') {
|
|
2034
|
+
var _el2$parentElement;
|
|
2035
|
+
|
|
2036
|
+
var _el2 = ref.current;
|
|
2037
|
+
|
|
2038
|
+
var _rect2 = _el2 === null || _el2 === void 0 ? void 0 : (_el2$parentElement = _el2.parentElement) === null || _el2$parentElement === void 0 ? void 0 : _el2$parentElement.getBoundingClientRect();
|
|
2039
|
+
|
|
2040
|
+
width = _rect2 === null || _rect2 === void 0 ? void 0 : _rect2.width;
|
|
2041
|
+
} else {
|
|
2042
|
+
width = widthProp;
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2045
|
+
if (width === undefined) {
|
|
2046
|
+
return;
|
|
2047
|
+
}
|
|
2048
|
+
|
|
1971
2049
|
e.preventDefault(); // prevent text selection
|
|
1972
2050
|
|
|
1973
2051
|
setStartClientX(e.clientX);
|
|
@@ -1999,13 +2077,14 @@ function HeadInner(_ref) {
|
|
|
1999
2077
|
var el = ref.current;
|
|
2000
2078
|
|
|
2001
2079
|
if (e.dataTransfer.setDragImage && (el === null || el === void 0 ? void 0 : el.parentElement)) {
|
|
2002
|
-
var
|
|
2080
|
+
var _rect3 = el.parentElement.getBoundingClientRect();
|
|
2081
|
+
|
|
2003
2082
|
var clone = el.cloneNode(true);
|
|
2004
|
-
clone.style.width = "".concat(
|
|
2005
|
-
clone.style.height = "".concat(
|
|
2083
|
+
clone.style.width = "".concat(_rect3.width, "px");
|
|
2084
|
+
clone.style.height = "".concat(_rect3.height, "px");
|
|
2006
2085
|
clone.setAttribute('data-helper', 'true');
|
|
2007
2086
|
document.body.appendChild(clone);
|
|
2008
|
-
e.dataTransfer.setDragImage(clone, e.clientX -
|
|
2087
|
+
e.dataTransfer.setDragImage(clone, e.clientX - _rect3.left, e.clientY - _rect3.top);
|
|
2009
2088
|
setIsDragging(true);
|
|
2010
2089
|
setCloneEl(clone);
|
|
2011
2090
|
}
|
|
@@ -2041,11 +2120,15 @@ function HeadInner(_ref) {
|
|
|
2041
2120
|
$align: align,
|
|
2042
2121
|
$draggable: draggable,
|
|
2043
2122
|
$dragging: !!isDragging
|
|
2044
|
-
}, Object(external_lodash_["omit"])(otherProps, [].concat(_toConsumableArray(Object.keys(HeadInner.propTypes)), ['id']))), isResizing && /*#__PURE__*/external_react_default.a.createElement(
|
|
2045
|
-
target:
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
}),
|
|
2123
|
+
}, Object(external_lodash_["omit"])(otherProps, [].concat(_toConsumableArray(Object.keys(HeadInner.propTypes)), ['id']))), isResizing && /*#__PURE__*/external_react_default.a.createElement(external_react_default.a.Fragment, null, /*#__PURE__*/external_react_default.a.createElement(EventListener_default.a, {
|
|
2124
|
+
target: window,
|
|
2125
|
+
eventType: "mouseup",
|
|
2126
|
+
listener: handleEndResize
|
|
2127
|
+
}), /*#__PURE__*/external_react_default.a.createElement(EventListener_default.a, {
|
|
2128
|
+
target: window,
|
|
2129
|
+
eventType: "mousemove",
|
|
2130
|
+
listener: handleResize
|
|
2131
|
+
})), onRequestResize && resizable && /*#__PURE__*/external_react_default.a.createElement(StyledResize, {
|
|
2049
2132
|
onMouseDown: handleStartResize,
|
|
2050
2133
|
onDoubleClick: handleDoubleClick,
|
|
2051
2134
|
onKeyDown: handleResizeKeyDown,
|
|
@@ -2053,23 +2136,18 @@ function HeadInner(_ref) {
|
|
|
2053
2136
|
}), draggable && /*#__PURE__*/external_react_default.a.createElement(StyledDragContainer, null, /*#__PURE__*/external_react_default.a.createElement(Table_DragHandle, {
|
|
2054
2137
|
screenReaderContent: Object(i18n_["_"])('Press left or right arrow key to reorder the columns.')
|
|
2055
2138
|
})), /*#__PURE__*/external_react_default.a.createElement(StyledLabel, {
|
|
2056
|
-
$sorted: !!sortDir && sortDir !== 'none',
|
|
2057
2139
|
$align: align,
|
|
2058
2140
|
$truncate: truncate,
|
|
2059
2141
|
$fill: isMenu
|
|
2060
|
-
}, label,
|
|
2142
|
+
}, label, isMenu && /*#__PURE__*/external_react_default.a.createElement(StyledMenuIcon, null, /*#__PURE__*/external_react_default.a.createElement(icons_CaretDown["a" /* default */], {
|
|
2061
2143
|
enterpriseSize: 0.5,
|
|
2062
|
-
prismaSize: "small" // this icon indicates
|
|
2063
|
-
// so we need to avoid having the wrong screenReaderText when the column isn't sortable
|
|
2144
|
+
prismaSize: "small" // this icon indicates "has a menu" in all themes
|
|
2064
2145
|
,
|
|
2065
|
-
screenReaderText:
|
|
2146
|
+
screenReaderText: Object(i18n_["_"])('Click to open menu')
|
|
2066
2147
|
}))), sortDir && /*#__PURE__*/external_react_default.a.createElement(StyledSortIcon, {
|
|
2067
2148
|
$sorted: sortDir !== 'none'
|
|
2068
|
-
}, sortDir === 'none' &&
|
|
2069
|
-
|
|
2070
|
-
// hideDefaultTooltip causes react-icons to use an aria-label here
|
|
2071
|
-
external_react_default.a.createElement(Sort_default.a, {
|
|
2072
|
-
hideDefaultTooltip: true,
|
|
2149
|
+
}, sortDir === 'none' && /*#__PURE__*/external_react_default.a.createElement(CaretDown, {
|
|
2150
|
+
prismaSize: "small",
|
|
2073
2151
|
screenReaderText: Object(i18n_["_"])('Click to sort')
|
|
2074
2152
|
}), sortDir === 'asc' && /*#__PURE__*/external_react_default.a.createElement(SortedUp, {
|
|
2075
2153
|
prismaSize: "small",
|
|
@@ -2175,7 +2253,7 @@ var HeadCell_propTypes = {
|
|
|
2175
2253
|
* @private
|
|
2176
2254
|
*/
|
|
2177
2255
|
visible: external_prop_types_default.a.bool,
|
|
2178
|
-
width: external_prop_types_default.a.number,
|
|
2256
|
+
width: external_prop_types_default.a.oneOfType([external_prop_types_default.a.number, external_prop_types_default.a.oneOf(['auto'])]),
|
|
2179
2257
|
|
|
2180
2258
|
/** @private. */
|
|
2181
2259
|
variant: external_prop_types_default.a.oneOf(['toggleAll', 'info', 'actions'])
|
|
@@ -2368,7 +2446,7 @@ HeadCell_defineProperty(HeadCell_HeadCell, "defaultProps", HeadCell_defaultProps
|
|
|
2368
2446
|
|
|
2369
2447
|
/* harmony default export */ var Table_HeadCell = (HeadCell_HeadCell);
|
|
2370
2448
|
// EXTERNAL MODULE: external "@splunk/react-icons/Info"
|
|
2371
|
-
var Info_ = __webpack_require__(
|
|
2449
|
+
var Info_ = __webpack_require__(103);
|
|
2372
2450
|
var Info_default = /*#__PURE__*/__webpack_require__.n(Info_);
|
|
2373
2451
|
|
|
2374
2452
|
// EXTERNAL MODULE: ./src/icons/ChevronRight.tsx
|
|
@@ -2396,22 +2474,22 @@ function HeadExpandRowsIcon() {
|
|
|
2396
2474
|
});
|
|
2397
2475
|
}
|
|
2398
2476
|
// EXTERNAL MODULE: external "@splunk/react-ui/Button"
|
|
2399
|
-
var Button_ = __webpack_require__(
|
|
2477
|
+
var Button_ = __webpack_require__(17);
|
|
2400
2478
|
var Button_default = /*#__PURE__*/__webpack_require__.n(Button_);
|
|
2401
2479
|
|
|
2402
2480
|
// EXTERNAL MODULE: external "@splunk/react-ui/Dropdown"
|
|
2403
|
-
var Dropdown_ = __webpack_require__(
|
|
2481
|
+
var Dropdown_ = __webpack_require__(19);
|
|
2404
2482
|
var Dropdown_default = /*#__PURE__*/__webpack_require__.n(Dropdown_);
|
|
2405
2483
|
|
|
2406
2484
|
// EXTERNAL MODULE: external "@splunk/react-ui/Tooltip"
|
|
2407
|
-
var Tooltip_ = __webpack_require__(
|
|
2485
|
+
var Tooltip_ = __webpack_require__(46);
|
|
2408
2486
|
var Tooltip_default = /*#__PURE__*/__webpack_require__.n(Tooltip_);
|
|
2409
2487
|
|
|
2410
2488
|
// EXTERNAL MODULE: ./src/icons/ChevronDown.tsx
|
|
2411
|
-
var ChevronDown = __webpack_require__(
|
|
2489
|
+
var ChevronDown = __webpack_require__(59);
|
|
2412
2490
|
|
|
2413
2491
|
// EXTERNAL MODULE: ./src/icons/MoreVertical.tsx
|
|
2414
|
-
var MoreVertical = __webpack_require__(
|
|
2492
|
+
var MoreVertical = __webpack_require__(56);
|
|
2415
2493
|
|
|
2416
2494
|
// CONCATENATED MODULE: ./src/Table/RowDragCell.tsx
|
|
2417
2495
|
function RowDragCell_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { RowDragCell_typeof = function _typeof(obj) { return typeof obj; }; } else { RowDragCell_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return RowDragCell_typeof(obj); }
|
|
@@ -2693,7 +2771,7 @@ var StyledCellExpansionDisabled = external_styled_components_default()(Table_Cel
|
|
|
2693
2771
|
}));
|
|
2694
2772
|
|
|
2695
2773
|
// EXTERNAL MODULE: external "@splunk/react-ui/Switch"
|
|
2696
|
-
var Switch_ = __webpack_require__(
|
|
2774
|
+
var Switch_ = __webpack_require__(65);
|
|
2697
2775
|
var Switch_default = /*#__PURE__*/__webpack_require__.n(Switch_);
|
|
2698
2776
|
|
|
2699
2777
|
// CONCATENATED MODULE: ./src/Table/ToggleStyles.ts
|
|
@@ -2806,6 +2884,7 @@ function Row_extends() { Row_extends = Object.assign || function (target) { for
|
|
|
2806
2884
|
|
|
2807
2885
|
|
|
2808
2886
|
|
|
2887
|
+
|
|
2809
2888
|
var StyledStripeComponents = {
|
|
2810
2889
|
odd: StyledStripeOdd,
|
|
2811
2890
|
even: StyledStripeEven,
|
|
@@ -2831,8 +2910,6 @@ var Row_propTypes = {
|
|
|
2831
2910
|
|
|
2832
2911
|
/** @private. */
|
|
2833
2912
|
expandable: external_prop_types_default.a.bool,
|
|
2834
|
-
|
|
2835
|
-
/** @private. */
|
|
2836
2913
|
expanded: external_prop_types_default.a.bool,
|
|
2837
2914
|
expansionRow: external_prop_types_default.a.oneOfType([external_prop_types_default.a.element, external_prop_types_default.a.arrayOf(external_prop_types_default.a.element)]),
|
|
2838
2915
|
|
|
@@ -2848,8 +2925,6 @@ var Row_propTypes = {
|
|
|
2848
2925
|
|
|
2849
2926
|
/** @private. Generally passed by `Table` rather than added directly. */
|
|
2850
2927
|
onDragStart: external_prop_types_default.a.func,
|
|
2851
|
-
|
|
2852
|
-
/** @private. */
|
|
2853
2928
|
onExpansion: external_prop_types_default.a.func,
|
|
2854
2929
|
|
|
2855
2930
|
/** @private. This is passed through and works as expected. */
|
|
@@ -2897,6 +2972,8 @@ var Row_Row = /*#__PURE__*/function (_Component) {
|
|
|
2897
2972
|
|
|
2898
2973
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
2899
2974
|
|
|
2975
|
+
Row_defineProperty(Row_assertThisInitialized(_this), "elementRef", null);
|
|
2976
|
+
|
|
2900
2977
|
Row_defineProperty(Row_assertThisInitialized(_this), "handleClick", function (e) {
|
|
2901
2978
|
var _this$props = _this.props,
|
|
2902
2979
|
data = _this$props.data,
|
|
@@ -2904,7 +2981,11 @@ var Row_Row = /*#__PURE__*/function (_Component) {
|
|
|
2904
2981
|
var el = e.target;
|
|
2905
2982
|
|
|
2906
2983
|
while (el) {
|
|
2907
|
-
|
|
2984
|
+
if (_this.elementRef === el) {
|
|
2985
|
+
break;
|
|
2986
|
+
} // Ignore clicks on row-actions
|
|
2987
|
+
|
|
2988
|
+
|
|
2908
2989
|
if (el.tagName === 'BUTTON' || el.tagName === 'A') {
|
|
2909
2990
|
return;
|
|
2910
2991
|
}
|
|
@@ -2942,6 +3023,14 @@ var Row_Row = /*#__PURE__*/function (_Component) {
|
|
|
2942
3023
|
}
|
|
2943
3024
|
});
|
|
2944
3025
|
|
|
3026
|
+
Row_defineProperty(Row_assertThisInitialized(_this), "handleExpansion", function (e) {
|
|
3027
|
+
var _this$props4 = _this.props,
|
|
3028
|
+
data = _this$props4.data,
|
|
3029
|
+
onExpansion = _this$props4.onExpansion;
|
|
3030
|
+
e.preventDefault();
|
|
3031
|
+
onExpansion === null || onExpansion === void 0 ? void 0 : onExpansion(e, data);
|
|
3032
|
+
});
|
|
3033
|
+
|
|
2945
3034
|
Row_defineProperty(Row_assertThisInitialized(_this), "renderActionPrimary", function () {
|
|
2946
3035
|
var actionPrimary = _this.props.actionPrimary;
|
|
2947
3036
|
|
|
@@ -2950,6 +3039,7 @@ var Row_Row = /*#__PURE__*/function (_Component) {
|
|
|
2950
3039
|
onClick: function onClick(e) {
|
|
2951
3040
|
var _actionPrimary$props$, _actionPrimary$props;
|
|
2952
3041
|
|
|
3042
|
+
e.preventDefault();
|
|
2953
3043
|
return (_actionPrimary$props$ = (_actionPrimary$props = actionPrimary.props).onClick) === null || _actionPrimary$props$ === void 0 ? void 0 : _actionPrimary$props$.call(_actionPrimary$props, e, _this.props.data);
|
|
2954
3044
|
}
|
|
2955
3045
|
});
|
|
@@ -2969,6 +3059,7 @@ var Row_Row = /*#__PURE__*/function (_Component) {
|
|
|
2969
3059
|
onClick: function onClick(e) {
|
|
2970
3060
|
var _action$props$onClick, _action$props;
|
|
2971
3061
|
|
|
3062
|
+
e.preventDefault();
|
|
2972
3063
|
return (_action$props$onClick = (_action$props = action.props).onClick) === null || _action$props$onClick === void 0 ? void 0 : _action$props$onClick.call(_action$props, e, _this.props.data);
|
|
2973
3064
|
}
|
|
2974
3065
|
});
|
|
@@ -2984,36 +3075,41 @@ var Row_Row = /*#__PURE__*/function (_Component) {
|
|
|
2984
3075
|
return actionsSecondary;
|
|
2985
3076
|
});
|
|
2986
3077
|
|
|
3078
|
+
Row_defineProperty(Row_assertThisInitialized(_this), "handleMount", function (el) {
|
|
3079
|
+
Object(updateReactRef["a" /* updateReactRef */])(_this.props.elementRef, el);
|
|
3080
|
+
_this.elementRef = el;
|
|
3081
|
+
});
|
|
3082
|
+
|
|
2987
3083
|
return _this;
|
|
2988
3084
|
}
|
|
2989
3085
|
|
|
2990
3086
|
Row_createClass(Row, [{
|
|
2991
3087
|
key: "render",
|
|
2992
3088
|
value: function render() {
|
|
2993
|
-
var _this$
|
|
2994
|
-
actions = _this$
|
|
2995
|
-
actionPrimary = _this$
|
|
2996
|
-
actionsSecondary = _this$
|
|
2997
|
-
activeElementId = _this$
|
|
2998
|
-
children = _this$
|
|
2999
|
-
dataId = _this$
|
|
3000
|
-
disabled = _this$
|
|
3001
|
-
draggable = _this$
|
|
3002
|
-
elementRef = _this$
|
|
3003
|
-
expandable = _this$
|
|
3004
|
-
expanded = _this$
|
|
3005
|
-
expansionRow = _this$
|
|
3006
|
-
index = _this$
|
|
3007
|
-
movableColumns = _this$
|
|
3008
|
-
onClick = _this$
|
|
3009
|
-
onDragStart = _this$
|
|
3010
|
-
onExpansion = _this$
|
|
3011
|
-
onRequestMoveRow = _this$
|
|
3012
|
-
onRequestToggle = _this$
|
|
3013
|
-
selected = _this$
|
|
3014
|
-
showRowGuideline = _this$
|
|
3015
|
-
stripe = _this$
|
|
3016
|
-
otherProps = Row_objectWithoutProperties(_this$
|
|
3089
|
+
var _this$props5 = this.props,
|
|
3090
|
+
actions = _this$props5.actions,
|
|
3091
|
+
actionPrimary = _this$props5.actionPrimary,
|
|
3092
|
+
actionsSecondary = _this$props5.actionsSecondary,
|
|
3093
|
+
activeElementId = _this$props5.activeElementId,
|
|
3094
|
+
children = _this$props5.children,
|
|
3095
|
+
dataId = _this$props5.dataId,
|
|
3096
|
+
disabled = _this$props5.disabled,
|
|
3097
|
+
draggable = _this$props5.draggable,
|
|
3098
|
+
elementRef = _this$props5.elementRef,
|
|
3099
|
+
expandable = _this$props5.expandable,
|
|
3100
|
+
expanded = _this$props5.expanded,
|
|
3101
|
+
expansionRow = _this$props5.expansionRow,
|
|
3102
|
+
index = _this$props5.index,
|
|
3103
|
+
movableColumns = _this$props5.movableColumns,
|
|
3104
|
+
onClick = _this$props5.onClick,
|
|
3105
|
+
onDragStart = _this$props5.onDragStart,
|
|
3106
|
+
onExpansion = _this$props5.onExpansion,
|
|
3107
|
+
onRequestMoveRow = _this$props5.onRequestMoveRow,
|
|
3108
|
+
onRequestToggle = _this$props5.onRequestToggle,
|
|
3109
|
+
selected = _this$props5.selected,
|
|
3110
|
+
showRowGuideline = _this$props5.showRowGuideline,
|
|
3111
|
+
stripe = _this$props5.stripe,
|
|
3112
|
+
otherProps = Row_objectWithoutProperties(_this$props5, ["actions", "actionPrimary", "actionsSecondary", "activeElementId", "children", "dataId", "disabled", "draggable", "elementRef", "expandable", "expanded", "expansionRow", "index", "movableColumns", "onClick", "onDragStart", "onExpansion", "onRequestMoveRow", "onRequestToggle", "selected", "showRowGuideline", "stripe"]);
|
|
3017
3113
|
|
|
3018
3114
|
var childrenCloned = !onClick ? external_react_["Children"].toArray(children).map(function (child) {
|
|
3019
3115
|
return /*#__PURE__*/Object(external_react_["cloneElement"])(child, {
|
|
@@ -3038,7 +3134,7 @@ var Row_Row = /*#__PURE__*/function (_Component) {
|
|
|
3038
3134
|
"data-has-movable-columns": movableColumns ? 'true' : undefined,
|
|
3039
3135
|
disabled: !!disabled,
|
|
3040
3136
|
$expandable: !!expandable,
|
|
3041
|
-
ref:
|
|
3137
|
+
ref: this.handleMount,
|
|
3042
3138
|
tabIndex: onClick ? 0 : undefined
|
|
3043
3139
|
}, otherProps, {
|
|
3044
3140
|
onClick: onClick ? this.handleClick : undefined,
|
|
@@ -3073,7 +3169,7 @@ var Row_Row = /*#__PURE__*/function (_Component) {
|
|
|
3073
3169
|
"data-movable-column": dataMovableColumn,
|
|
3074
3170
|
"data-test": "expand",
|
|
3075
3171
|
expand: expanded,
|
|
3076
|
-
onClick:
|
|
3172
|
+
onClick: this.handleExpansion,
|
|
3077
3173
|
rowSpan: rowSpan,
|
|
3078
3174
|
variant: "expand"
|
|
3079
3175
|
}, /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
@@ -3323,10 +3419,11 @@ var Head_Head = /*#__PURE__*/function (_Component) {
|
|
|
3323
3419
|
var _this$el$firstElement, _this$el, _this$el$firstElement2;
|
|
3324
3420
|
|
|
3325
3421
|
var headRowCells = Array.from((_this$el$firstElement = (_this$el = this.el) === null || _this$el === void 0 ? void 0 : (_this$el$firstElement2 = _this$el.firstElementChild) === null || _this$el$firstElement2 === void 0 ? void 0 : _this$el$firstElement2.children) !== null && _this$el$firstElement !== void 0 ? _this$el$firstElement : []);
|
|
3326
|
-
|
|
3422
|
+
var result = headRowCells.map(function (el) {
|
|
3327
3423
|
var computedStyle = window.getComputedStyle(el);
|
|
3328
3424
|
return el.clientWidth - parseFloat(computedStyle.getPropertyValue('padding-right')) - parseFloat(computedStyle.getPropertyValue('padding-left'));
|
|
3329
3425
|
});
|
|
3426
|
+
return result;
|
|
3330
3427
|
}
|
|
3331
3428
|
}, {
|
|
3332
3429
|
key: "getClientHeight",
|
|
@@ -3495,7 +3592,7 @@ Head_defineProperty(Head_Head, "defaultProps", Head_defaultProps);
|
|
|
3495
3592
|
var id_ = __webpack_require__(10);
|
|
3496
3593
|
|
|
3497
3594
|
// EXTERNAL MODULE: external "@splunk/react-ui/Popover"
|
|
3498
|
-
var Popover_ = __webpack_require__(
|
|
3595
|
+
var Popover_ = __webpack_require__(16);
|
|
3499
3596
|
var Popover_default = /*#__PURE__*/__webpack_require__.n(Popover_);
|
|
3500
3597
|
|
|
3501
3598
|
// CONCATENATED MODULE: ./src/Table/HeadDropdownCell.tsx
|
|
@@ -4106,11 +4203,11 @@ var HeadTable_HeadTable = /*#__PURE__*/function (_Component) {
|
|
|
4106
4203
|
ref: elementRef
|
|
4107
4204
|
}, /*#__PURE__*/external_react_default.a.createElement(HeadTableStyles_Styled, HeadTable_extends({
|
|
4108
4205
|
"data-test": "".concat(headType, "-head-table"),
|
|
4206
|
+
"data-fixed-column": isFixedColumn ? 'true' : undefined,
|
|
4109
4207
|
style: Object(external_lodash_["extend"])({}, tableStyle, {
|
|
4110
4208
|
marginLeft: horizontalOffset,
|
|
4111
4209
|
width: isFixedColumn ? undefined : tableWidth
|
|
4112
|
-
})
|
|
4113
|
-
"data-fixed-column": isFixedColumn ? 'true' : undefined
|
|
4210
|
+
})
|
|
4114
4211
|
}, Object(external_lodash_["omit"])(otherProps, 'dragIndex')), clonedTHead));
|
|
4115
4212
|
}
|
|
4116
4213
|
}]);
|
|
@@ -4124,7 +4221,7 @@ HeadTable_defineProperty(HeadTable_HeadTable, "defaultProps", HeadTable_defaultP
|
|
|
4124
4221
|
|
|
4125
4222
|
/* harmony default export */ var Table_HeadTable = (HeadTable_HeadTable);
|
|
4126
4223
|
// EXTERNAL MODULE: ./src/utils/types.ts
|
|
4127
|
-
var types = __webpack_require__(
|
|
4224
|
+
var types = __webpack_require__(49);
|
|
4128
4225
|
|
|
4129
4226
|
// CONCATENATED MODULE: ./src/Table/Table.tsx
|
|
4130
4227
|
function Table_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { Table_typeof = function _typeof(obj) { return typeof obj; }; } else { Table_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return Table_typeof(obj); }
|
|
@@ -4198,7 +4295,7 @@ var Table_propTypes = {
|
|
|
4198
4295
|
onRequestToggleAllRows: external_prop_types_default.a.func,
|
|
4199
4296
|
onScroll: external_prop_types_default.a.func,
|
|
4200
4297
|
outerStyle: external_prop_types_default.a.object,
|
|
4201
|
-
rowExpansion: external_prop_types_default.a.oneOf(['single', 'multi', 'none']),
|
|
4298
|
+
rowExpansion: external_prop_types_default.a.oneOf(['single', 'multi', 'controlled', 'none']),
|
|
4202
4299
|
rowSelection: external_prop_types_default.a.oneOf(['all', 'some', 'none']),
|
|
4203
4300
|
stripeRows: external_prop_types_default.a.bool,
|
|
4204
4301
|
tableStyle: external_prop_types_default.a.object,
|
|
@@ -4211,7 +4308,8 @@ var Table_defaultProps = {
|
|
|
4211
4308
|
dockOffset: 0,
|
|
4212
4309
|
headType: 'inline',
|
|
4213
4310
|
rowExpansion: 'none',
|
|
4214
|
-
rowSelection: 'none'
|
|
4311
|
+
rowSelection: 'none',
|
|
4312
|
+
resizableFillLayout: false
|
|
4215
4313
|
};
|
|
4216
4314
|
|
|
4217
4315
|
var Table_Table = /*#__PURE__*/function (_Component) {
|
|
@@ -4666,6 +4764,7 @@ var Table_Table = /*#__PURE__*/function (_Component) {
|
|
|
4666
4764
|
var showDockedHeader = this.showDockedHeader();
|
|
4667
4765
|
|
|
4668
4766
|
if ((this.showFixed() || showDockedHeader) && this.props.headType !== 'inline') {
|
|
4767
|
+
// FIXME: handle inline
|
|
4669
4768
|
if (showDockedHeader) {
|
|
4670
4769
|
// Save the current head focus state so that it can be applied to the docked version
|
|
4671
4770
|
// after the `HeadTable` mounts.
|
|
@@ -4753,6 +4852,7 @@ var Table_Table = /*#__PURE__*/function (_Component) {
|
|
|
4753
4852
|
onRequestResizeColumn = _this$props4.onRequestResizeColumn,
|
|
4754
4853
|
onRequestToggleAllRows = _this$props4.onRequestToggleAllRows,
|
|
4755
4854
|
outerStyle = _this$props4.outerStyle,
|
|
4855
|
+
resizableFillLayout = _this$props4.resizableFillLayout,
|
|
4756
4856
|
rowSelection = _this$props4.rowSelection,
|
|
4757
4857
|
tableStyle = _this$props4.tableStyle;
|
|
4758
4858
|
var tHead;
|
|
@@ -4795,16 +4895,26 @@ var Table_Table = /*#__PURE__*/function (_Component) {
|
|
|
4795
4895
|
);
|
|
4796
4896
|
});
|
|
4797
4897
|
tHead = /*#__PURE__*/Object(external_react_["cloneElement"])(tHead, {}, headCells);
|
|
4798
|
-
var defaultScrollContainer = this.context ||
|
|
4898
|
+
var defaultScrollContainer = this.context || window;
|
|
4799
4899
|
var scrollContainer = this.isFixed() ? this.tableContainer : defaultScrollContainer;
|
|
4900
|
+
|
|
4901
|
+
if (resizableFillLayout) {
|
|
4902
|
+
isFixedColumn = false;
|
|
4903
|
+
}
|
|
4904
|
+
|
|
4800
4905
|
return /*#__PURE__*/external_react_default.a.createElement(TableStyles_Styled, Table_extends({
|
|
4801
4906
|
"data-test": "table",
|
|
4802
4907
|
ref: elementRef,
|
|
4803
4908
|
style: outerStyle,
|
|
4804
4909
|
"data-test-row-selection": onRequestToggleAllRows ? rowSelection : undefined
|
|
4805
|
-
}, Object(external_lodash_["omit"])(this.props, [].concat(Table_toConsumableArray(Object.keys(Table.propTypes)), ['style']))), /*#__PURE__*/external_react_default.a.createElement(
|
|
4806
|
-
target:
|
|
4807
|
-
|
|
4910
|
+
}, Object(external_lodash_["omit"])(this.props, [].concat(Table_toConsumableArray(Object.keys(Table.propTypes)), ['style']))), /*#__PURE__*/external_react_default.a.createElement(EventListener_default.a, {
|
|
4911
|
+
target: window,
|
|
4912
|
+
eventType: "scroll",
|
|
4913
|
+
listener: this.handleScroll,
|
|
4914
|
+
options: {
|
|
4915
|
+
passive: false,
|
|
4916
|
+
capture: true
|
|
4917
|
+
}
|
|
4808
4918
|
}), /*#__PURE__*/external_react_default.a.createElement(external_react_resize_detector_default.a, {
|
|
4809
4919
|
handleWidth: true,
|
|
4810
4920
|
onResize: this.handleResize
|
|
@@ -4822,7 +4932,8 @@ var Table_Table = /*#__PURE__*/function (_Component) {
|
|
|
4822
4932
|
},
|
|
4823
4933
|
"data-test": "main-table",
|
|
4824
4934
|
style: tableStyle,
|
|
4825
|
-
"data-fixed-column": isFixedColumn ? 'true' : undefined
|
|
4935
|
+
"data-fixed-column": isFixedColumn ? 'true' : undefined,
|
|
4936
|
+
$resizableFillLayout: resizableFillLayout
|
|
4826
4937
|
}, tCaption, tHead, tBody))), this.renderDockedScrollbar());
|
|
4827
4938
|
}
|
|
4828
4939
|
}]);
|