@splunk/react-ui 4.14.0 → 4.16.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 +54 -51
- package/ButtonGroup.js +9 -9
- package/ButtonSimple.js +68 -64
- package/CHANGELOG.md +46 -0
- package/Calendar.js +124 -106
- package/Card.js +68 -68
- package/CardLayout.js +9 -9
- package/Chip.js +22 -22
- package/Clickable.js +38 -14
- package/CloseButton.js +23 -23
- package/Code.js +484 -436
- package/CollapsiblePanel.js +59 -34
- package/Color.js +297 -187
- package/ColumnLayout.js +18 -17
- package/ComboBox.js +81 -32
- package/Concertina.js +88 -27
- package/ControlGroup.js +81 -24
- package/Date.js +54 -36
- package/DefinitionList.js +14 -8
- package/Divider.d.ts +2 -0
- package/Divider.js +9 -9
- package/Dockerfile.enterprise.storybook +7 -0
- package/Dockerfile.prisma.storybook +7 -0
- package/Dockerfile.visual +10 -0
- package/Dropdown.js +78 -18
- package/EventListener.js +17 -17
- package/File.js +108 -46
- package/FormRows.js +38 -37
- package/Heading.js +83 -55
- package/Image.js +63 -38
- package/JSONTree.js +106 -21
- package/Layer.js +59 -34
- package/Link.js +17 -17
- package/List.js +3 -3
- package/MIGRATION.md +21 -0
- package/Markdown.js +71 -65
- package/Menu.js +155 -121
- package/Message.js +129 -129
- package/MessageBar.js +136 -136
- package/Modal.js +57 -32
- package/ModalLayer.js +15 -15
- package/Monogram.js +18 -17
- package/Multiselect.js +2807 -2310
- package/Number.js +74 -37
- package/Paginator.js +96 -83
- package/Paragraph.js +10 -10
- package/Popover.js +191 -54
- package/Progress.js +23 -22
- package/RadioBar.js +32 -14
- package/RadioList.js +17 -11
- package/Resize.js +33 -20
- package/ResultsMenu.js +36 -23
- package/ScreenReaderContent.js +9 -9
- package/Scroll.js +51 -26
- package/ScrollContainerContext.js +48 -48
- package/Search.js +68 -31
- package/Select.js +501 -204
- package/SidePanel.js +37 -24
- package/Slider.js +54 -24
- package/SlidingPanels.js +52 -14
- package/SplitButton.js +23 -22
- package/StaticContent.js +9 -9
- package/StepBar.js +22 -22
- package/Switch.js +18 -13
- package/TabBar.js +22 -22
- package/TabLayout.js +46 -18
- package/Table.js +424 -166
- package/Text.js +91 -49
- package/TextArea.d.ts +2 -0
- package/TextArea.js +127 -49
- package/Tooltip.js +236 -59
- package/TransitionOpen.js +39 -26
- package/Typography.d.ts +2 -0
- package/Typography.js +18 -17
- package/WaitSpinner.js +15 -15
- package/docker-compose.yml +42 -0
- package/package.json +13 -12
- package/test-runner-jest.config.js +11 -6
- package/types/src/Accordion/AccordionContext.d.ts +1 -0
- package/types/src/Button/Button.d.ts +5 -2
- package/types/src/Button/docs/examples/Basic.d.ts +2 -2
- package/types/src/Button/docs/examples/Selected.d.ts +2 -2
- package/types/src/ButtonGroup/ButtonGroupContext.d.ts +1 -0
- package/types/src/ButtonSimple/ButtonSimple.d.ts +10 -11
- package/types/src/Calendar/Calendar.d.ts +2 -0
- package/types/src/CardLayout/CardLayoutContext.d.ts +1 -0
- 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/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/ModalContext.d.ts +1 -0
- package/types/src/Multiselect/Compact.d.ts +14 -1
- package/types/src/Multiselect/Multiselect.d.ts +15 -1
- package/types/src/Multiselect/Normal.d.ts +2 -0
- 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/Select.d.ts +3 -1
- package/types/src/Select/SelectBase.d.ts +14 -0
- package/types/src/Slider/Slider.d.ts +5 -3
- 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/TabLayout/Panel.d.ts +3 -0
- package/types/src/TabLayout/TabLayout.d.ts +2 -0
- package/types/src/Table/Body.d.ts +2 -0
- package/types/src/Table/Head.d.ts +2 -0
- package/types/src/Table/Row.d.ts +11 -3
- package/types/src/Table/Table.d.ts +5 -3
- package/types/src/Table/TableContext.d.ts +1 -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 +16 -4
- package/types/src/Typography/Typography.d.ts +1 -1
- package/types/src/useForceUpdate/useForceUpdate.d.ts +1 -0
- package/useForceUpdate.js +9 -9
- package/useKeyPress.js +2 -2
- package/usePrevious.js +9 -9
- package/.storybook-visual/config/snapshotResolver.js +0 -29
- package/.storybook-visual/main.js +0 -22
- package/.storybook-visual/preview.jsx +0 -31
- package/.storybook-visual/scripts/test.sh +0 -108
- package/.storybook-visual/test-runner.js +0 -108
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 = 164);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ([
|
|
@@ -113,13 +113,13 @@ module.exports = require("styled-components");
|
|
|
113
113
|
/* 4 */
|
|
114
114
|
/***/ (function(module, exports) {
|
|
115
115
|
|
|
116
|
-
module.exports = require("
|
|
116
|
+
module.exports = require("@splunk/ui-utils/i18n");
|
|
117
117
|
|
|
118
118
|
/***/ }),
|
|
119
119
|
/* 5 */
|
|
120
120
|
/***/ (function(module, exports) {
|
|
121
121
|
|
|
122
|
-
module.exports = require("
|
|
122
|
+
module.exports = require("lodash/omit");
|
|
123
123
|
|
|
124
124
|
/***/ }),
|
|
125
125
|
/* 6 */
|
|
@@ -271,6 +271,18 @@ module.exports = require("@splunk/ui-utils/keyboard");
|
|
|
271
271
|
|
|
272
272
|
/***/ }),
|
|
273
273
|
/* 10 */
|
|
274
|
+
/***/ (function(module, exports) {
|
|
275
|
+
|
|
276
|
+
module.exports = require("lodash/keys");
|
|
277
|
+
|
|
278
|
+
/***/ }),
|
|
279
|
+
/* 11 */
|
|
280
|
+
/***/ (function(module, exports) {
|
|
281
|
+
|
|
282
|
+
module.exports = require("lodash/has");
|
|
283
|
+
|
|
284
|
+
/***/ }),
|
|
285
|
+
/* 12 */
|
|
274
286
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
275
287
|
|
|
276
288
|
"use strict";
|
|
@@ -296,46 +308,45 @@ function updateReactRef(ref, current) {
|
|
|
296
308
|
|
|
297
309
|
|
|
298
310
|
/***/ }),
|
|
299
|
-
/*
|
|
311
|
+
/* 13 */
|
|
300
312
|
/***/ (function(module, exports) {
|
|
301
313
|
|
|
302
314
|
module.exports = require("@splunk/ui-utils/id");
|
|
303
315
|
|
|
304
316
|
/***/ }),
|
|
305
|
-
/*
|
|
306
|
-
/*
|
|
307
|
-
/*
|
|
317
|
+
/* 14 */,
|
|
318
|
+
/* 15 */,
|
|
319
|
+
/* 16 */
|
|
308
320
|
/***/ (function(module, exports) {
|
|
309
321
|
|
|
310
322
|
module.exports = require("@splunk/react-ui/ScreenReaderContent");
|
|
311
323
|
|
|
312
324
|
/***/ }),
|
|
313
|
-
/*
|
|
325
|
+
/* 17 */
|
|
314
326
|
/***/ (function(module, exports) {
|
|
315
327
|
|
|
316
328
|
module.exports = require("@splunk/react-ui/EventListener");
|
|
317
329
|
|
|
318
330
|
/***/ }),
|
|
319
|
-
/*
|
|
331
|
+
/* 18 */
|
|
320
332
|
/***/ (function(module, exports) {
|
|
321
333
|
|
|
322
|
-
module.exports = require("
|
|
334
|
+
module.exports = require("lodash/includes");
|
|
323
335
|
|
|
324
336
|
/***/ }),
|
|
325
|
-
/*
|
|
326
|
-
/* 18 */
|
|
337
|
+
/* 19 */
|
|
327
338
|
/***/ (function(module, exports) {
|
|
328
339
|
|
|
329
|
-
module.exports = require("@splunk/react-ui/
|
|
340
|
+
module.exports = require("@splunk/react-ui/Button");
|
|
330
341
|
|
|
331
342
|
/***/ }),
|
|
332
|
-
/*
|
|
343
|
+
/* 20 */
|
|
333
344
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
334
345
|
|
|
335
346
|
"use strict";
|
|
336
347
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getWindow; });
|
|
337
348
|
/* unused harmony export ssrWindow */
|
|
338
|
-
/* harmony import */ var _ssrDocument__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
349
|
+
/* harmony import */ var _ssrDocument__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28);
|
|
339
350
|
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
340
351
|
|
|
341
352
|
var ssrWindow = {
|
|
@@ -404,19 +415,34 @@ function getWindow() {
|
|
|
404
415
|
|
|
405
416
|
|
|
406
417
|
/***/ }),
|
|
407
|
-
/*
|
|
418
|
+
/* 21 */
|
|
408
419
|
/***/ (function(module, exports) {
|
|
409
420
|
|
|
410
|
-
module.exports = require("
|
|
421
|
+
module.exports = require("lodash/isFinite");
|
|
411
422
|
|
|
412
423
|
/***/ }),
|
|
413
|
-
/* 21 */,
|
|
414
424
|
/* 22 */,
|
|
415
|
-
/* 23
|
|
416
|
-
|
|
417
|
-
|
|
425
|
+
/* 23 */
|
|
426
|
+
/***/ (function(module, exports) {
|
|
427
|
+
|
|
428
|
+
module.exports = require("@splunk/react-ui/Popover");
|
|
429
|
+
|
|
430
|
+
/***/ }),
|
|
431
|
+
/* 24 */
|
|
432
|
+
/***/ (function(module, exports) {
|
|
433
|
+
|
|
434
|
+
module.exports = require("@splunk/react-ui/Dropdown");
|
|
435
|
+
|
|
436
|
+
/***/ }),
|
|
437
|
+
/* 25 */
|
|
438
|
+
/***/ (function(module, exports) {
|
|
439
|
+
|
|
440
|
+
module.exports = require("lodash/isString");
|
|
441
|
+
|
|
442
|
+
/***/ }),
|
|
418
443
|
/* 26 */,
|
|
419
|
-
/* 27
|
|
444
|
+
/* 27 */,
|
|
445
|
+
/* 28 */
|
|
420
446
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
421
447
|
|
|
422
448
|
"use strict";
|
|
@@ -486,15 +512,27 @@ function getDocument() {
|
|
|
486
512
|
|
|
487
513
|
|
|
488
514
|
/***/ }),
|
|
489
|
-
/*
|
|
490
|
-
/*
|
|
515
|
+
/* 29 */,
|
|
516
|
+
/* 30 */,
|
|
517
|
+
/* 31 */
|
|
518
|
+
/***/ (function(module, exports) {
|
|
519
|
+
|
|
520
|
+
module.exports = require("lodash/throttle");
|
|
521
|
+
|
|
522
|
+
/***/ }),
|
|
523
|
+
/* 32 */,
|
|
524
|
+
/* 33 */,
|
|
525
|
+
/* 34 */,
|
|
526
|
+
/* 35 */,
|
|
527
|
+
/* 36 */,
|
|
528
|
+
/* 37 */
|
|
491
529
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
492
530
|
|
|
493
531
|
"use strict";
|
|
494
532
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ChevronRight; });
|
|
495
533
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
496
534
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
497
|
-
/* harmony import */ var _splunk_react_icons_ChevronRight__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
535
|
+
/* harmony import */ var _splunk_react_icons_ChevronRight__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(44);
|
|
498
536
|
/* harmony import */ var _splunk_react_icons_ChevronRight__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_icons_ChevronRight__WEBPACK_IMPORTED_MODULE_1__);
|
|
499
537
|
/* harmony import */ var _ThemedIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
|
|
500
538
|
/* harmony import */ var _SVG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
|
|
@@ -536,34 +574,48 @@ function ChevronRight(props) {
|
|
|
536
574
|
}
|
|
537
575
|
|
|
538
576
|
/***/ }),
|
|
539
|
-
/*
|
|
540
|
-
/*
|
|
541
|
-
/*
|
|
542
|
-
/*
|
|
543
|
-
/*
|
|
544
|
-
/*
|
|
577
|
+
/* 38 */,
|
|
578
|
+
/* 39 */,
|
|
579
|
+
/* 40 */,
|
|
580
|
+
/* 41 */,
|
|
581
|
+
/* 42 */,
|
|
582
|
+
/* 43 */,
|
|
583
|
+
/* 44 */
|
|
545
584
|
/***/ (function(module, exports) {
|
|
546
585
|
|
|
547
586
|
module.exports = require("@splunk/react-icons/ChevronRight");
|
|
548
587
|
|
|
549
588
|
/***/ }),
|
|
550
|
-
/*
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
589
|
+
/* 45 */
|
|
590
|
+
/***/ (function(module, exports) {
|
|
591
|
+
|
|
592
|
+
module.exports = require("@splunk/ui-utils/format");
|
|
593
|
+
|
|
594
|
+
/***/ }),
|
|
595
|
+
/* 46 */,
|
|
596
|
+
/* 47 */,
|
|
597
|
+
/* 48 */,
|
|
598
|
+
/* 49 */
|
|
599
|
+
/***/ (function(module, exports) {
|
|
600
|
+
|
|
601
|
+
module.exports = require("lodash/extend");
|
|
602
|
+
|
|
603
|
+
/***/ }),
|
|
604
|
+
/* 50 */
|
|
554
605
|
/***/ (function(module, exports) {
|
|
555
606
|
|
|
556
607
|
module.exports = require("@splunk/react-ui/ScrollContainerContext");
|
|
557
608
|
|
|
558
609
|
/***/ }),
|
|
559
|
-
/*
|
|
610
|
+
/* 51 */,
|
|
611
|
+
/* 52 */
|
|
560
612
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
561
613
|
|
|
562
614
|
"use strict";
|
|
563
615
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CaretDown; });
|
|
564
616
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
565
617
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
566
|
-
/* harmony import */ var _splunk_react_icons_Caret__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
618
|
+
/* harmony import */ var _splunk_react_icons_Caret__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(53);
|
|
567
619
|
/* harmony import */ var _splunk_react_icons_Caret__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_icons_Caret__WEBPACK_IMPORTED_MODULE_1__);
|
|
568
620
|
/* harmony import */ var _ThemedIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
|
|
569
621
|
/* harmony import */ var _SVG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
|
|
@@ -593,38 +645,60 @@ function CaretDown(props) {
|
|
|
593
645
|
}
|
|
594
646
|
|
|
595
647
|
/***/ }),
|
|
596
|
-
/*
|
|
648
|
+
/* 53 */
|
|
597
649
|
/***/ (function(module, exports) {
|
|
598
650
|
|
|
599
651
|
module.exports = require("@splunk/react-icons/Caret");
|
|
600
652
|
|
|
601
653
|
/***/ }),
|
|
602
|
-
/*
|
|
603
|
-
/*
|
|
604
|
-
/*
|
|
605
|
-
/*
|
|
606
|
-
/*
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
654
|
+
/* 54 */,
|
|
655
|
+
/* 55 */,
|
|
656
|
+
/* 56 */,
|
|
657
|
+
/* 57 */,
|
|
658
|
+
/* 58 */
|
|
659
|
+
/***/ (function(module, exports) {
|
|
660
|
+
|
|
661
|
+
module.exports = require("lodash/without");
|
|
662
|
+
|
|
663
|
+
/***/ }),
|
|
664
|
+
/* 59 */,
|
|
665
|
+
/* 60 */,
|
|
666
|
+
/* 61 */,
|
|
667
|
+
/* 62 */,
|
|
668
|
+
/* 63 */,
|
|
669
|
+
/* 64 */,
|
|
670
|
+
/* 65 */,
|
|
671
|
+
/* 66 */
|
|
612
672
|
/***/ (function(module, exports) {
|
|
613
673
|
|
|
614
674
|
module.exports = require("@splunk/react-icons/ChevronDown");
|
|
615
675
|
|
|
616
676
|
/***/ }),
|
|
617
|
-
/*
|
|
677
|
+
/* 67 */
|
|
618
678
|
/***/ (function(module, exports) {
|
|
619
679
|
|
|
620
680
|
module.exports = require("@splunk/react-ui/Tooltip");
|
|
621
681
|
|
|
622
682
|
/***/ }),
|
|
623
|
-
/*
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
683
|
+
/* 68 */
|
|
684
|
+
/***/ (function(module, exports) {
|
|
685
|
+
|
|
686
|
+
module.exports = require("lodash/isFunction");
|
|
687
|
+
|
|
688
|
+
/***/ }),
|
|
689
|
+
/* 69 */,
|
|
690
|
+
/* 70 */,
|
|
691
|
+
/* 71 */,
|
|
692
|
+
/* 72 */,
|
|
693
|
+
/* 73 */,
|
|
694
|
+
/* 74 */
|
|
695
|
+
/***/ (function(module, exports) {
|
|
696
|
+
|
|
697
|
+
module.exports = require("lodash/isNumber");
|
|
698
|
+
|
|
699
|
+
/***/ }),
|
|
700
|
+
/* 75 */,
|
|
701
|
+
/* 76 */
|
|
628
702
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
629
703
|
|
|
630
704
|
"use strict";
|
|
@@ -647,21 +721,23 @@ function assertDefined(val, msg) {
|
|
|
647
721
|
|
|
648
722
|
|
|
649
723
|
/***/ }),
|
|
650
|
-
/*
|
|
651
|
-
/*
|
|
652
|
-
/*
|
|
653
|
-
/*
|
|
654
|
-
/*
|
|
655
|
-
/*
|
|
656
|
-
/*
|
|
657
|
-
/*
|
|
724
|
+
/* 77 */,
|
|
725
|
+
/* 78 */,
|
|
726
|
+
/* 79 */,
|
|
727
|
+
/* 80 */,
|
|
728
|
+
/* 81 */,
|
|
729
|
+
/* 82 */,
|
|
730
|
+
/* 83 */,
|
|
731
|
+
/* 84 */,
|
|
732
|
+
/* 85 */,
|
|
733
|
+
/* 86 */
|
|
658
734
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
659
735
|
|
|
660
736
|
"use strict";
|
|
661
737
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MoreVertical; });
|
|
662
738
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
663
739
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
664
|
-
/* harmony import */ var _splunk_react_icons_MoreVertical__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
740
|
+
/* harmony import */ var _splunk_react_icons_MoreVertical__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(87);
|
|
665
741
|
/* harmony import */ var _splunk_react_icons_MoreVertical__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_icons_MoreVertical__WEBPACK_IMPORTED_MODULE_1__);
|
|
666
742
|
/* harmony import */ var _ThemedIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
|
|
667
743
|
/* harmony import */ var _SVG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
|
|
@@ -691,20 +767,26 @@ function MoreVertical(props) {
|
|
|
691
767
|
}
|
|
692
768
|
|
|
693
769
|
/***/ }),
|
|
694
|
-
/*
|
|
770
|
+
/* 87 */
|
|
695
771
|
/***/ (function(module, exports) {
|
|
696
772
|
|
|
697
773
|
module.exports = require("@splunk/react-icons/MoreVertical");
|
|
698
774
|
|
|
699
775
|
/***/ }),
|
|
700
|
-
/*
|
|
776
|
+
/* 88 */
|
|
777
|
+
/***/ (function(module, exports) {
|
|
778
|
+
|
|
779
|
+
module.exports = require("lodash/indexOf");
|
|
780
|
+
|
|
781
|
+
/***/ }),
|
|
782
|
+
/* 89 */
|
|
701
783
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
702
784
|
|
|
703
785
|
"use strict";
|
|
704
786
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ChevronDown; });
|
|
705
787
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
706
788
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
707
|
-
/* harmony import */ var _splunk_react_icons_ChevronDown__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
789
|
+
/* harmony import */ var _splunk_react_icons_ChevronDown__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(66);
|
|
708
790
|
/* harmony import */ var _splunk_react_icons_ChevronDown__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_icons_ChevronDown__WEBPACK_IMPORTED_MODULE_1__);
|
|
709
791
|
/* harmony import */ var _ThemedIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
|
|
710
792
|
/* harmony import */ var _SVG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
|
|
@@ -746,40 +828,18 @@ function ChevronDown(props) {
|
|
|
746
828
|
}
|
|
747
829
|
|
|
748
830
|
/***/ }),
|
|
749
|
-
/* 68 */,
|
|
750
|
-
/* 69 */,
|
|
751
|
-
/* 70 */,
|
|
752
|
-
/* 71 */,
|
|
753
|
-
/* 72 */
|
|
754
|
-
/***/ (function(module, exports) {
|
|
755
|
-
|
|
756
|
-
module.exports = require("@splunk/react-ui/Switch");
|
|
757
|
-
|
|
758
|
-
/***/ }),
|
|
759
|
-
/* 73 */,
|
|
760
|
-
/* 74 */,
|
|
761
|
-
/* 75 */,
|
|
762
|
-
/* 76 */,
|
|
763
|
-
/* 77 */,
|
|
764
|
-
/* 78 */,
|
|
765
|
-
/* 79 */,
|
|
766
|
-
/* 80 */,
|
|
767
|
-
/* 81 */,
|
|
768
|
-
/* 82 */,
|
|
769
|
-
/* 83 */,
|
|
770
|
-
/* 84 */,
|
|
771
|
-
/* 85 */,
|
|
772
|
-
/* 86 */,
|
|
773
|
-
/* 87 */,
|
|
774
|
-
/* 88 */,
|
|
775
|
-
/* 89 */,
|
|
776
831
|
/* 90 */,
|
|
777
832
|
/* 91 */,
|
|
778
833
|
/* 92 */,
|
|
779
834
|
/* 93 */,
|
|
780
835
|
/* 94 */,
|
|
781
836
|
/* 95 */,
|
|
782
|
-
/* 96
|
|
837
|
+
/* 96 */
|
|
838
|
+
/***/ (function(module, exports) {
|
|
839
|
+
|
|
840
|
+
module.exports = require("@splunk/react-ui/Switch");
|
|
841
|
+
|
|
842
|
+
/***/ }),
|
|
783
843
|
/* 97 */,
|
|
784
844
|
/* 98 */,
|
|
785
845
|
/* 99 */,
|
|
@@ -790,40 +850,109 @@ module.exports = require("@splunk/react-ui/Switch");
|
|
|
790
850
|
/* 104 */,
|
|
791
851
|
/* 105 */,
|
|
792
852
|
/* 106 */,
|
|
793
|
-
/* 107
|
|
853
|
+
/* 107 */,
|
|
854
|
+
/* 108 */,
|
|
855
|
+
/* 109 */,
|
|
856
|
+
/* 110 */,
|
|
857
|
+
/* 111 */
|
|
858
|
+
/***/ (function(module, exports) {
|
|
859
|
+
|
|
860
|
+
module.exports = require("lodash/findIndex");
|
|
861
|
+
|
|
862
|
+
/***/ }),
|
|
863
|
+
/* 112 */
|
|
864
|
+
/***/ (function(module, exports) {
|
|
865
|
+
|
|
866
|
+
module.exports = require("lodash/merge");
|
|
867
|
+
|
|
868
|
+
/***/ }),
|
|
869
|
+
/* 113 */,
|
|
870
|
+
/* 114 */,
|
|
871
|
+
/* 115 */,
|
|
872
|
+
/* 116 */,
|
|
873
|
+
/* 117 */,
|
|
874
|
+
/* 118 */,
|
|
875
|
+
/* 119 */,
|
|
876
|
+
/* 120 */,
|
|
877
|
+
/* 121 */,
|
|
878
|
+
/* 122 */,
|
|
879
|
+
/* 123 */,
|
|
880
|
+
/* 124 */,
|
|
881
|
+
/* 125 */,
|
|
882
|
+
/* 126 */,
|
|
883
|
+
/* 127 */,
|
|
884
|
+
/* 128 */,
|
|
885
|
+
/* 129 */,
|
|
886
|
+
/* 130 */,
|
|
887
|
+
/* 131 */,
|
|
888
|
+
/* 132 */,
|
|
889
|
+
/* 133 */,
|
|
890
|
+
/* 134 */,
|
|
891
|
+
/* 135 */,
|
|
892
|
+
/* 136 */,
|
|
893
|
+
/* 137 */,
|
|
894
|
+
/* 138 */,
|
|
895
|
+
/* 139 */,
|
|
896
|
+
/* 140 */,
|
|
897
|
+
/* 141 */,
|
|
898
|
+
/* 142 */,
|
|
899
|
+
/* 143 */,
|
|
900
|
+
/* 144 */,
|
|
901
|
+
/* 145 */,
|
|
902
|
+
/* 146 */,
|
|
903
|
+
/* 147 */,
|
|
904
|
+
/* 148 */,
|
|
905
|
+
/* 149 */,
|
|
906
|
+
/* 150 */,
|
|
907
|
+
/* 151 */,
|
|
908
|
+
/* 152 */,
|
|
909
|
+
/* 153 */
|
|
910
|
+
/***/ (function(module, exports) {
|
|
911
|
+
|
|
912
|
+
module.exports = require("lodash/forEach");
|
|
913
|
+
|
|
914
|
+
/***/ }),
|
|
915
|
+
/* 154 */
|
|
916
|
+
/***/ (function(module, exports) {
|
|
917
|
+
|
|
918
|
+
module.exports = require("lodash/isEqual");
|
|
919
|
+
|
|
920
|
+
/***/ }),
|
|
921
|
+
/* 155 */
|
|
794
922
|
/***/ (function(module, exports) {
|
|
795
923
|
|
|
796
924
|
module.exports = require("react-resize-detector");
|
|
797
925
|
|
|
798
926
|
/***/ }),
|
|
799
|
-
/*
|
|
927
|
+
/* 156 */
|
|
800
928
|
/***/ (function(module, exports) {
|
|
801
929
|
|
|
802
930
|
module.exports = require("@splunk/react-icons/SortedDown");
|
|
803
931
|
|
|
804
932
|
/***/ }),
|
|
805
|
-
/*
|
|
933
|
+
/* 157 */
|
|
806
934
|
/***/ (function(module, exports) {
|
|
807
935
|
|
|
808
936
|
module.exports = require("@splunk/react-icons/SortedUp");
|
|
809
937
|
|
|
810
938
|
/***/ }),
|
|
811
|
-
/*
|
|
939
|
+
/* 158 */
|
|
812
940
|
/***/ (function(module, exports) {
|
|
813
941
|
|
|
814
942
|
module.exports = require("@splunk/react-icons/Sort");
|
|
815
943
|
|
|
816
944
|
/***/ }),
|
|
817
|
-
/*
|
|
945
|
+
/* 159 */
|
|
818
946
|
/***/ (function(module, exports) {
|
|
819
947
|
|
|
820
948
|
module.exports = require("@splunk/react-icons/Info");
|
|
821
949
|
|
|
822
950
|
/***/ }),
|
|
823
|
-
/*
|
|
824
|
-
/*
|
|
825
|
-
/*
|
|
826
|
-
/*
|
|
951
|
+
/* 160 */,
|
|
952
|
+
/* 161 */,
|
|
953
|
+
/* 162 */,
|
|
954
|
+
/* 163 */,
|
|
955
|
+
/* 164 */
|
|
827
956
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
828
957
|
|
|
829
958
|
"use strict";
|
|
@@ -848,22 +977,58 @@ var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_)
|
|
|
848
977
|
var external_prop_types_ = __webpack_require__(1);
|
|
849
978
|
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
850
979
|
|
|
851
|
-
// EXTERNAL MODULE: external "lodash"
|
|
852
|
-
var
|
|
980
|
+
// EXTERNAL MODULE: external "lodash/forEach"
|
|
981
|
+
var forEach_ = __webpack_require__(153);
|
|
982
|
+
var forEach_default = /*#__PURE__*/__webpack_require__.n(forEach_);
|
|
983
|
+
|
|
984
|
+
// EXTERNAL MODULE: external "lodash/has"
|
|
985
|
+
var has_ = __webpack_require__(11);
|
|
986
|
+
var has_default = /*#__PURE__*/__webpack_require__.n(has_);
|
|
987
|
+
|
|
988
|
+
// EXTERNAL MODULE: external "lodash/indexOf"
|
|
989
|
+
var indexOf_ = __webpack_require__(88);
|
|
990
|
+
var indexOf_default = /*#__PURE__*/__webpack_require__.n(indexOf_);
|
|
991
|
+
|
|
992
|
+
// EXTERNAL MODULE: external "lodash/isEqual"
|
|
993
|
+
var isEqual_ = __webpack_require__(154);
|
|
994
|
+
var isEqual_default = /*#__PURE__*/__webpack_require__.n(isEqual_);
|
|
995
|
+
|
|
996
|
+
// EXTERNAL MODULE: external "lodash/isNumber"
|
|
997
|
+
var isNumber_ = __webpack_require__(74);
|
|
998
|
+
|
|
999
|
+
// EXTERNAL MODULE: external "lodash/omit"
|
|
1000
|
+
var omit_ = __webpack_require__(5);
|
|
1001
|
+
var omit_default = /*#__PURE__*/__webpack_require__.n(omit_);
|
|
1002
|
+
|
|
1003
|
+
// EXTERNAL MODULE: external "lodash/throttle"
|
|
1004
|
+
var throttle_ = __webpack_require__(31);
|
|
1005
|
+
var throttle_default = /*#__PURE__*/__webpack_require__.n(throttle_);
|
|
853
1006
|
|
|
854
1007
|
// EXTERNAL MODULE: external "react-resize-detector"
|
|
855
|
-
var external_react_resize_detector_ = __webpack_require__(
|
|
1008
|
+
var external_react_resize_detector_ = __webpack_require__(155);
|
|
856
1009
|
var external_react_resize_detector_default = /*#__PURE__*/__webpack_require__.n(external_react_resize_detector_);
|
|
857
1010
|
|
|
858
1011
|
// EXTERNAL MODULE: external "@splunk/react-ui/EventListener"
|
|
859
|
-
var EventListener_ = __webpack_require__(
|
|
1012
|
+
var EventListener_ = __webpack_require__(17);
|
|
860
1013
|
var EventListener_default = /*#__PURE__*/__webpack_require__.n(EventListener_);
|
|
861
1014
|
|
|
862
1015
|
// EXTERNAL MODULE: external "@splunk/ui-utils/keyboard"
|
|
863
1016
|
var keyboard_ = __webpack_require__(9);
|
|
864
1017
|
|
|
865
1018
|
// EXTERNAL MODULE: external "@splunk/react-ui/ScrollContainerContext"
|
|
866
|
-
var ScrollContainerContext_ = __webpack_require__(
|
|
1019
|
+
var ScrollContainerContext_ = __webpack_require__(50);
|
|
1020
|
+
|
|
1021
|
+
// EXTERNAL MODULE: external "lodash/findIndex"
|
|
1022
|
+
var findIndex_ = __webpack_require__(111);
|
|
1023
|
+
var findIndex_default = /*#__PURE__*/__webpack_require__.n(findIndex_);
|
|
1024
|
+
|
|
1025
|
+
// EXTERNAL MODULE: external "lodash/includes"
|
|
1026
|
+
var includes_ = __webpack_require__(18);
|
|
1027
|
+
var includes_default = /*#__PURE__*/__webpack_require__.n(includes_);
|
|
1028
|
+
|
|
1029
|
+
// EXTERNAL MODULE: external "lodash/without"
|
|
1030
|
+
var without_ = __webpack_require__(58);
|
|
1031
|
+
var without_default = /*#__PURE__*/__webpack_require__.n(without_);
|
|
867
1032
|
|
|
868
1033
|
// EXTERNAL MODULE: external "styled-components"
|
|
869
1034
|
var external_styled_components_ = __webpack_require__(3);
|
|
@@ -881,10 +1046,10 @@ var Styled = external_styled_components_default.a.tbody.withConfig({
|
|
|
881
1046
|
})(["", " z-index:0;"], themes_["mixins"].reset('table-row-group'));
|
|
882
1047
|
|
|
883
1048
|
// EXTERNAL MODULE: ./src/utils/updateReactRef.ts
|
|
884
|
-
var updateReactRef = __webpack_require__(
|
|
1049
|
+
var updateReactRef = __webpack_require__(12);
|
|
885
1050
|
|
|
886
1051
|
// EXTERNAL MODULE: ./src/utils/ssrWindow.ts
|
|
887
|
-
var ssrWindow = __webpack_require__(
|
|
1052
|
+
var ssrWindow = __webpack_require__(20);
|
|
888
1053
|
|
|
889
1054
|
// CONCATENATED MODULE: ./src/Table/Body.tsx
|
|
890
1055
|
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); }
|
|
@@ -923,6 +1088,10 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
923
1088
|
|
|
924
1089
|
|
|
925
1090
|
|
|
1091
|
+
|
|
1092
|
+
|
|
1093
|
+
|
|
1094
|
+
|
|
926
1095
|
var propTypes = {
|
|
927
1096
|
/** @private. Generally passed by Table rather than added directly. */
|
|
928
1097
|
actions: external_prop_types_default.a.bool,
|
|
@@ -938,6 +1107,9 @@ var propTypes = {
|
|
|
938
1107
|
/** @private. Generally passed by Table rather than added directly. */
|
|
939
1108
|
onRequestMoveRow: external_prop_types_default.a.func,
|
|
940
1109
|
|
|
1110
|
+
/** @private. Generally passed by Table rather than added directly. */
|
|
1111
|
+
primaryColumnIndex: external_prop_types_default.a.number,
|
|
1112
|
+
|
|
941
1113
|
/** @private. Generally passed by Table rather than added directly. */
|
|
942
1114
|
stripeRows: external_prop_types_default.a.bool
|
|
943
1115
|
};
|
|
@@ -1066,7 +1238,7 @@ var Body_Body = /*#__PURE__*/function (_Component) {
|
|
|
1066
1238
|
Object(updateReactRef["a" /* updateReactRef */])(_this.props.elementRef, el);
|
|
1067
1239
|
});
|
|
1068
1240
|
|
|
1069
|
-
_defineProperty(_assertThisInitialized(_this), "updateDragPosition",
|
|
1241
|
+
_defineProperty(_assertThisInitialized(_this), "updateDragPosition", throttle_default()(_this.updateDragPositionImpl, 100, {
|
|
1070
1242
|
trailing: false
|
|
1071
1243
|
}));
|
|
1072
1244
|
|
|
@@ -1089,7 +1261,7 @@ var Body_Body = /*#__PURE__*/function (_Component) {
|
|
|
1089
1261
|
var current = this.state.expanded;
|
|
1090
1262
|
|
|
1091
1263
|
if (this.props.rowExpansion === 'single') {
|
|
1092
|
-
if (
|
|
1264
|
+
if (includes_default()(current, key)) {
|
|
1093
1265
|
this.setState({
|
|
1094
1266
|
expanded: []
|
|
1095
1267
|
});
|
|
@@ -1099,9 +1271,9 @@ var Body_Body = /*#__PURE__*/function (_Component) {
|
|
|
1099
1271
|
});
|
|
1100
1272
|
}
|
|
1101
1273
|
} else if (this.props.rowExpansion === 'multi') {
|
|
1102
|
-
if (
|
|
1274
|
+
if (includes_default()(current, key)) {
|
|
1103
1275
|
this.setState({
|
|
1104
|
-
expanded:
|
|
1276
|
+
expanded: without_default()(current, key)
|
|
1105
1277
|
});
|
|
1106
1278
|
} else {
|
|
1107
1279
|
this.setState({
|
|
@@ -1124,7 +1296,7 @@ var Body_Body = /*#__PURE__*/function (_Component) {
|
|
|
1124
1296
|
}
|
|
1125
1297
|
|
|
1126
1298
|
this.rows = Array.from(this.el.children);
|
|
1127
|
-
var overIndex =
|
|
1299
|
+
var overIndex = findIndex_default()(this.rows, function (row) {
|
|
1128
1300
|
var rect = row.getBoundingClientRect();
|
|
1129
1301
|
return dragPosition > rect.top && dragPosition < rect.bottom;
|
|
1130
1302
|
});
|
|
@@ -1183,8 +1355,9 @@ var Body_Body = /*#__PURE__*/function (_Component) {
|
|
|
1183
1355
|
movableColumns = _this$props3.movableColumns,
|
|
1184
1356
|
onRequestMoveRow = _this$props3.onRequestMoveRow,
|
|
1185
1357
|
rowExpansion = _this$props3.rowExpansion,
|
|
1358
|
+
primaryColumnIndex = _this$props3.primaryColumnIndex,
|
|
1186
1359
|
stripeRows = _this$props3.stripeRows,
|
|
1187
|
-
otherProps = _objectWithoutProperties(_this$props3, ["actions", "children", "movableColumns", "onRequestMoveRow", "rowExpansion", "stripeRows"]);
|
|
1360
|
+
otherProps = _objectWithoutProperties(_this$props3, ["actions", "children", "movableColumns", "onRequestMoveRow", "rowExpansion", "primaryColumnIndex", "stripeRows"]);
|
|
1188
1361
|
|
|
1189
1362
|
var rows = [];
|
|
1190
1363
|
var guidelineRowIndex = this.calculateGuideIndex();
|
|
@@ -1205,7 +1378,7 @@ var Body_Body = /*#__PURE__*/function (_Component) {
|
|
|
1205
1378
|
var key = child.key;
|
|
1206
1379
|
var oddOrEven = i % 2 ? 'even' : 'odd';
|
|
1207
1380
|
var stripe = stripeRows ? oddOrEven : 'none';
|
|
1208
|
-
var expanded = rowExpansion === 'controlled' ? child.props.expanded :
|
|
1381
|
+
var expanded = rowExpansion === 'controlled' ? child.props.expanded : includes_default()(_this2.state.expanded, key);
|
|
1209
1382
|
|
|
1210
1383
|
var onExpansion = function onExpansion(e) {
|
|
1211
1384
|
_this2.handleRowExpansion(e, key, child.props.onExpansion);
|
|
@@ -1220,6 +1393,7 @@ var Body_Body = /*#__PURE__*/function (_Component) {
|
|
|
1220
1393
|
expandable: rowExpansion !== 'none',
|
|
1221
1394
|
draggable: !!onRequestMoveRow,
|
|
1222
1395
|
movableColumns: movableColumns,
|
|
1396
|
+
primaryColumnIndex: primaryColumnIndex,
|
|
1223
1397
|
onExpansion: onExpansion,
|
|
1224
1398
|
onRequestMoveRow: onRequestMoveRow ? _this2.onRequestMoveRow : undefined,
|
|
1225
1399
|
onDragStart: onRequestMoveRow ? _this2.handleDragStart : undefined,
|
|
@@ -1558,11 +1732,23 @@ Cell_defineProperty(Cell_Cell, "propTypes", Cell_propTypes);
|
|
|
1558
1732
|
Cell_defineProperty(Cell_Cell, "defaultProps", Cell_defaultProps);
|
|
1559
1733
|
|
|
1560
1734
|
/* harmony default export */ var Table_Cell = (Cell_Cell);
|
|
1735
|
+
// EXTERNAL MODULE: external "lodash/keys"
|
|
1736
|
+
var keys_ = __webpack_require__(10);
|
|
1737
|
+
var keys_default = /*#__PURE__*/__webpack_require__.n(keys_);
|
|
1738
|
+
|
|
1739
|
+
// EXTERNAL MODULE: external "lodash/isString"
|
|
1740
|
+
var isString_ = __webpack_require__(25);
|
|
1741
|
+
var isString_default = /*#__PURE__*/__webpack_require__.n(isString_);
|
|
1742
|
+
|
|
1743
|
+
// EXTERNAL MODULE: external "lodash/merge"
|
|
1744
|
+
var merge_ = __webpack_require__(112);
|
|
1745
|
+
var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
|
|
1746
|
+
|
|
1561
1747
|
// EXTERNAL MODULE: external "@splunk/ui-utils/i18n"
|
|
1562
|
-
var i18n_ = __webpack_require__(
|
|
1748
|
+
var i18n_ = __webpack_require__(4);
|
|
1563
1749
|
|
|
1564
1750
|
// EXTERNAL MODULE: external "@splunk/react-icons/SortedDown"
|
|
1565
|
-
var SortedDown_ = __webpack_require__(
|
|
1751
|
+
var SortedDown_ = __webpack_require__(156);
|
|
1566
1752
|
var SortedDown_default = /*#__PURE__*/__webpack_require__.n(SortedDown_);
|
|
1567
1753
|
|
|
1568
1754
|
// EXTERNAL MODULE: ./src/icons/ThemedIcon.tsx
|
|
@@ -1609,7 +1795,7 @@ function SortedDown(props) {
|
|
|
1609
1795
|
}, props));
|
|
1610
1796
|
}
|
|
1611
1797
|
// EXTERNAL MODULE: external "@splunk/react-icons/SortedUp"
|
|
1612
|
-
var SortedUp_ = __webpack_require__(
|
|
1798
|
+
var SortedUp_ = __webpack_require__(157);
|
|
1613
1799
|
var SortedUp_default = /*#__PURE__*/__webpack_require__.n(SortedUp_);
|
|
1614
1800
|
|
|
1615
1801
|
// CONCATENATED MODULE: ./src/icons/SortedUp.tsx
|
|
@@ -1650,7 +1836,7 @@ function SortedUp(props) {
|
|
|
1650
1836
|
}, props));
|
|
1651
1837
|
}
|
|
1652
1838
|
// EXTERNAL MODULE: external "@splunk/react-icons/Sort"
|
|
1653
|
-
var Sort_ = __webpack_require__(
|
|
1839
|
+
var Sort_ = __webpack_require__(158);
|
|
1654
1840
|
var Sort_default = /*#__PURE__*/__webpack_require__.n(Sort_);
|
|
1655
1841
|
|
|
1656
1842
|
// CONCATENATED MODULE: ./src/icons/Sort.tsx
|
|
@@ -1691,10 +1877,10 @@ function CaretDown(props) {
|
|
|
1691
1877
|
}, props));
|
|
1692
1878
|
}
|
|
1693
1879
|
// EXTERNAL MODULE: ./src/icons/CaretDown.tsx
|
|
1694
|
-
var icons_CaretDown = __webpack_require__(
|
|
1880
|
+
var icons_CaretDown = __webpack_require__(52);
|
|
1695
1881
|
|
|
1696
1882
|
// EXTERNAL MODULE: external "@splunk/react-ui/ScreenReaderContent"
|
|
1697
|
-
var ScreenReaderContent_ = __webpack_require__(
|
|
1883
|
+
var ScreenReaderContent_ = __webpack_require__(16);
|
|
1698
1884
|
var ScreenReaderContent_default = /*#__PURE__*/__webpack_require__.n(ScreenReaderContent_);
|
|
1699
1885
|
|
|
1700
1886
|
// CONCATENATED MODULE: ./src/Table/HeadInnerStyles.ts
|
|
@@ -2020,7 +2206,7 @@ function DragHandle(_ref) {
|
|
|
2020
2206
|
DragHandle.propTypes = DragHandle_propTypes;
|
|
2021
2207
|
/* harmony default export */ var Table_DragHandle = (DragHandle);
|
|
2022
2208
|
// EXTERNAL MODULE: ./src/utils/ssrDocument.ts
|
|
2023
|
-
var ssrDocument = __webpack_require__(
|
|
2209
|
+
var ssrDocument = __webpack_require__(28);
|
|
2024
2210
|
|
|
2025
2211
|
// CONCATENATED MODULE: ./src/Table/HeadInner.tsx
|
|
2026
2212
|
function HeadInner_extends() { HeadInner_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 HeadInner_extends.apply(this, arguments); }
|
|
@@ -2293,7 +2479,7 @@ function HeadInner(_ref) {
|
|
|
2293
2479
|
$align: align,
|
|
2294
2480
|
$draggable: draggable,
|
|
2295
2481
|
$dragging: !!isDragging
|
|
2296
|
-
},
|
|
2482
|
+
}, omit_default()(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, {
|
|
2297
2483
|
target: window,
|
|
2298
2484
|
eventType: "mouseup",
|
|
2299
2485
|
listener: handleEndResize
|
|
@@ -2386,6 +2572,8 @@ function HeadCell_defineProperty(obj, key, value) { if (key in obj) { Object.def
|
|
|
2386
2572
|
|
|
2387
2573
|
|
|
2388
2574
|
|
|
2575
|
+
|
|
2576
|
+
|
|
2389
2577
|
var HeadCell_propTypes = {
|
|
2390
2578
|
align: external_prop_types_default.a.oneOf(['left', 'center', 'right']),
|
|
2391
2579
|
children: external_prop_types_default.a.node,
|
|
@@ -2576,7 +2764,7 @@ var HeadCell_HeadCell = /*#__PURE__*/function (_Component) {
|
|
|
2576
2764
|
var draggable = !!onDragStart;
|
|
2577
2765
|
var sortable = !!onSort && !!sortDir;
|
|
2578
2766
|
var hasOnClick = onClick !== undefined;
|
|
2579
|
-
var mergedStyle =
|
|
2767
|
+
var mergedStyle = merge_default()(style, {
|
|
2580
2768
|
width: width
|
|
2581
2769
|
});
|
|
2582
2770
|
var truncate = hasActionsHead ? false : truncateProp;
|
|
@@ -2588,7 +2776,7 @@ var HeadCell_HeadCell = /*#__PURE__*/function (_Component) {
|
|
|
2588
2776
|
ref: elementRef,
|
|
2589
2777
|
"aria-sort": onSort && (this.sortDirAriaMapping[sortDir] || 'none'),
|
|
2590
2778
|
"data-test": "head-cell",
|
|
2591
|
-
"data-test-label":
|
|
2779
|
+
"data-test-label": isString_default()(children) ? children : undefined,
|
|
2592
2780
|
"data-test-sort-dir": onSort && sortDir,
|
|
2593
2781
|
id: visible ? id : undefined,
|
|
2594
2782
|
onClick: onSort || hasOnClick ? this.handleClick : undefined,
|
|
@@ -2598,7 +2786,7 @@ var HeadCell_HeadCell = /*#__PURE__*/function (_Component) {
|
|
|
2598
2786
|
$variant: variant,
|
|
2599
2787
|
$zIndex: zIndex,
|
|
2600
2788
|
$isFixed: headType === 'fixed'
|
|
2601
|
-
},
|
|
2789
|
+
}, omit_default()(this.props, [].concat(HeadCell_toConsumableArray(Object.keys(HeadCell.propTypes)), ['id', 'style'])), {
|
|
2602
2790
|
onKeyDown: draggable || onSort || hasOnClick ? this.handleKeyDown : undefined
|
|
2603
2791
|
}), /*#__PURE__*/external_react_default.a.createElement(Table_HeadInner, {
|
|
2604
2792
|
label: children,
|
|
@@ -2635,11 +2823,11 @@ HeadCell_defineProperty(HeadCell_HeadCell, "contextType", Table_TableContext);
|
|
|
2635
2823
|
|
|
2636
2824
|
/* harmony default export */ var Table_HeadCell = (HeadCell_HeadCell);
|
|
2637
2825
|
// EXTERNAL MODULE: external "@splunk/react-icons/Info"
|
|
2638
|
-
var Info_ = __webpack_require__(
|
|
2826
|
+
var Info_ = __webpack_require__(159);
|
|
2639
2827
|
var Info_default = /*#__PURE__*/__webpack_require__.n(Info_);
|
|
2640
2828
|
|
|
2641
2829
|
// EXTERNAL MODULE: ./src/icons/ChevronRight.tsx
|
|
2642
|
-
var ChevronRight = __webpack_require__(
|
|
2830
|
+
var ChevronRight = __webpack_require__(37);
|
|
2643
2831
|
|
|
2644
2832
|
// CONCATENATED MODULE: ./src/Table/HeadExpandRowsIcon.tsx
|
|
2645
2833
|
|
|
@@ -2663,22 +2851,25 @@ function HeadExpandRowsIcon() {
|
|
|
2663
2851
|
});
|
|
2664
2852
|
}
|
|
2665
2853
|
// EXTERNAL MODULE: external "@splunk/react-ui/Button"
|
|
2666
|
-
var Button_ = __webpack_require__(
|
|
2854
|
+
var Button_ = __webpack_require__(19);
|
|
2667
2855
|
var Button_default = /*#__PURE__*/__webpack_require__.n(Button_);
|
|
2668
2856
|
|
|
2669
2857
|
// EXTERNAL MODULE: external "@splunk/react-ui/Dropdown"
|
|
2670
|
-
var Dropdown_ = __webpack_require__(
|
|
2858
|
+
var Dropdown_ = __webpack_require__(24);
|
|
2671
2859
|
var Dropdown_default = /*#__PURE__*/__webpack_require__.n(Dropdown_);
|
|
2672
2860
|
|
|
2673
2861
|
// EXTERNAL MODULE: external "@splunk/react-ui/Tooltip"
|
|
2674
|
-
var Tooltip_ = __webpack_require__(
|
|
2862
|
+
var Tooltip_ = __webpack_require__(67);
|
|
2675
2863
|
var Tooltip_default = /*#__PURE__*/__webpack_require__.n(Tooltip_);
|
|
2676
2864
|
|
|
2865
|
+
// EXTERNAL MODULE: external "@splunk/ui-utils/format"
|
|
2866
|
+
var format_ = __webpack_require__(45);
|
|
2867
|
+
|
|
2677
2868
|
// EXTERNAL MODULE: ./src/icons/ChevronDown.tsx
|
|
2678
|
-
var ChevronDown = __webpack_require__(
|
|
2869
|
+
var ChevronDown = __webpack_require__(89);
|
|
2679
2870
|
|
|
2680
2871
|
// EXTERNAL MODULE: ./src/icons/MoreVertical.tsx
|
|
2681
|
-
var MoreVertical = __webpack_require__(
|
|
2872
|
+
var MoreVertical = __webpack_require__(86);
|
|
2682
2873
|
|
|
2683
2874
|
// CONCATENATED MODULE: ./src/Table/RowDragCell.tsx
|
|
2684
2875
|
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); }
|
|
@@ -2962,7 +3153,7 @@ var StyledCellExpansionDisabled = external_styled_components_default()(Table_Cel
|
|
|
2962
3153
|
}));
|
|
2963
3154
|
|
|
2964
3155
|
// EXTERNAL MODULE: external "@splunk/react-ui/Switch"
|
|
2965
|
-
var Switch_ = __webpack_require__(
|
|
3156
|
+
var Switch_ = __webpack_require__(96);
|
|
2966
3157
|
var Switch_default = /*#__PURE__*/__webpack_require__.n(Switch_);
|
|
2967
3158
|
|
|
2968
3159
|
// CONCATENATED MODULE: ./src/Table/ToggleStyles.ts
|
|
@@ -3077,6 +3268,7 @@ function Row_extends() { Row_extends = Object.assign || function (target) { for
|
|
|
3077
3268
|
|
|
3078
3269
|
|
|
3079
3270
|
|
|
3271
|
+
|
|
3080
3272
|
var StyledStripeComponents = {
|
|
3081
3273
|
odd: StyledStripeOdd,
|
|
3082
3274
|
even: StyledStripeEven,
|
|
@@ -3125,6 +3317,10 @@ var Row_propTypes = {
|
|
|
3125
3317
|
/** @private. Generally passed by `Table` rather than added directly. */
|
|
3126
3318
|
onRequestMoveRow: external_prop_types_default.a.func,
|
|
3127
3319
|
onRequestToggle: external_prop_types_default.a.func,
|
|
3320
|
+
|
|
3321
|
+
/** @private. Generally passed by `Table` rather than added directly. */
|
|
3322
|
+
primaryColumnIndex: external_prop_types_default.a.number,
|
|
3323
|
+
rowScreenReaderText: external_prop_types_default.a.string,
|
|
3128
3324
|
selected: external_prop_types_default.a.bool,
|
|
3129
3325
|
|
|
3130
3326
|
/** @private. Generally passed by `Table` rather than added directly. */
|
|
@@ -3134,7 +3330,8 @@ var Row_propTypes = {
|
|
|
3134
3330
|
stripe: external_prop_types_default.a.oneOf(['odd', 'even', 'none'])
|
|
3135
3331
|
};
|
|
3136
3332
|
var Row_defaultProps = {
|
|
3137
|
-
stripe: 'none'
|
|
3333
|
+
stripe: 'none',
|
|
3334
|
+
primaryColumnIndex: 0
|
|
3138
3335
|
};
|
|
3139
3336
|
var ActionsSecondaryToggle = /*#__PURE__*/external_react_default.a.forwardRef(function (props, ref) {
|
|
3140
3337
|
return /*#__PURE__*/external_react_default.a.createElement(Tooltip_default.a, Row_extends({
|
|
@@ -3278,6 +3475,8 @@ var Row_Row = /*#__PURE__*/function (_Component) {
|
|
|
3278
3475
|
Row_createClass(Row, [{
|
|
3279
3476
|
key: "render",
|
|
3280
3477
|
value: function render() {
|
|
3478
|
+
var _childrenCloned$prima;
|
|
3479
|
+
|
|
3281
3480
|
var _this$props5 = this.props,
|
|
3282
3481
|
actions = _this$props5.actions,
|
|
3283
3482
|
actionPrimary = _this$props5.actionPrimary,
|
|
@@ -3298,10 +3497,12 @@ var Row_Row = /*#__PURE__*/function (_Component) {
|
|
|
3298
3497
|
onExpansion = _this$props5.onExpansion,
|
|
3299
3498
|
onRequestMoveRow = _this$props5.onRequestMoveRow,
|
|
3300
3499
|
onRequestToggle = _this$props5.onRequestToggle,
|
|
3500
|
+
primaryColumnIndex = _this$props5.primaryColumnIndex,
|
|
3501
|
+
rowScreenReaderText = _this$props5.rowScreenReaderText,
|
|
3301
3502
|
selected = _this$props5.selected,
|
|
3302
3503
|
showRowGuideline = _this$props5.showRowGuideline,
|
|
3303
3504
|
stripe = _this$props5.stripe,
|
|
3304
|
-
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"]);
|
|
3505
|
+
otherProps = Row_objectWithoutProperties(_this$props5, ["actions", "actionPrimary", "actionsSecondary", "activeElementId", "children", "dataId", "disabled", "draggable", "elementRef", "expandable", "expanded", "expansionRow", "index", "movableColumns", "onClick", "onDragStart", "onExpansion", "onRequestMoveRow", "onRequestToggle", "primaryColumnIndex", "rowScreenReaderText", "selected", "showRowGuideline", "stripe"]);
|
|
3305
3506
|
|
|
3306
3507
|
var childrenCloned = !onClick ? external_react_["Children"].toArray(children).map(function (child) {
|
|
3307
3508
|
return /*#__PURE__*/Object(external_react_["cloneElement"])(child, {
|
|
@@ -3314,6 +3515,25 @@ var Row_Row = /*#__PURE__*/function (_Component) {
|
|
|
3314
3515
|
disabled: disabled
|
|
3315
3516
|
});
|
|
3316
3517
|
});
|
|
3518
|
+
var rowLabelValue;
|
|
3519
|
+
|
|
3520
|
+
if (rowScreenReaderText) {
|
|
3521
|
+
rowLabelValue = rowScreenReaderText;
|
|
3522
|
+
} else if ((_childrenCloned$prima = childrenCloned[primaryColumnIndex]) === null || _childrenCloned$prima === void 0 ? void 0 : _childrenCloned$prima.props.children) {
|
|
3523
|
+
var _childrenCloned$prima2;
|
|
3524
|
+
|
|
3525
|
+
rowLabelValue = "".concat((_childrenCloned$prima2 = childrenCloned[primaryColumnIndex]) === null || _childrenCloned$prima2 === void 0 ? void 0 : _childrenCloned$prima2.props.children);
|
|
3526
|
+
} else {
|
|
3527
|
+
var _childrenCloned$;
|
|
3528
|
+
|
|
3529
|
+
rowLabelValue = "".concat((_childrenCloned$ = childrenCloned[0]) === null || _childrenCloned$ === void 0 ? void 0 : _childrenCloned$.props.children);
|
|
3530
|
+
|
|
3531
|
+
if (false) {}
|
|
3532
|
+
}
|
|
3533
|
+
|
|
3534
|
+
var selectedString = Object(format_["sprintf"])(Object(i18n_["_"])('%(selected)s'), {
|
|
3535
|
+
selected: selected ? 'selected' : 'unselected'
|
|
3536
|
+
});
|
|
3317
3537
|
var StyledStripe = StyledStripeComponents[stripe];
|
|
3318
3538
|
var StyledCellToggle = disabled ? StyledCellSelectionDisabled : Table_Cell;
|
|
3319
3539
|
var rowSpan = expanded ? external_react_["Children"].count(expansionRow) + 1 : undefined;
|
|
@@ -3328,7 +3548,7 @@ var Row_Row = /*#__PURE__*/function (_Component) {
|
|
|
3328
3548
|
$expandable: !!expandable,
|
|
3329
3549
|
ref: this.handleMount,
|
|
3330
3550
|
tabIndex: onClick ? 0 : undefined
|
|
3331
|
-
},
|
|
3551
|
+
}, omit_default()(otherProps, 'data'), {
|
|
3332
3552
|
onClick: onClick ? this.handleClick : undefined,
|
|
3333
3553
|
onKeyDown: this.handleKeyDown,
|
|
3334
3554
|
$rowSelected: !!(onRequestToggle && selected)
|
|
@@ -3342,6 +3562,10 @@ var Row_Row = /*#__PURE__*/function (_Component) {
|
|
|
3342
3562
|
rowSpan: rowSpan,
|
|
3343
3563
|
showRowGuideline: showRowGuideline
|
|
3344
3564
|
}), onRequestToggle && /*#__PURE__*/external_react_default.a.createElement(StyledCellToggle, {
|
|
3565
|
+
"aria-label": Object(format_["sprintf"])(Object(i18n_["_"])('%(rowLabelValue)s %(selectedString)s'), {
|
|
3566
|
+
rowLabelValue: rowLabelValue,
|
|
3567
|
+
selectedString: selectedString
|
|
3568
|
+
}),
|
|
3345
3569
|
appearance: onClick ? 'rowLink' : 'data',
|
|
3346
3570
|
"data-test": "toggle",
|
|
3347
3571
|
variant: "toggle",
|
|
@@ -3469,6 +3693,9 @@ function Head_defineProperty(obj, key, value) { if (key in obj) { Object.defineP
|
|
|
3469
3693
|
|
|
3470
3694
|
|
|
3471
3695
|
|
|
3696
|
+
|
|
3697
|
+
|
|
3698
|
+
|
|
3472
3699
|
var Head_propTypes = {
|
|
3473
3700
|
/** @private. */
|
|
3474
3701
|
actions: external_prop_types_default.a.arrayOf(external_prop_types_default.a.node),
|
|
@@ -3653,7 +3880,7 @@ var Head_Head = /*#__PURE__*/function (_Component) {
|
|
|
3653
3880
|
}
|
|
3654
3881
|
|
|
3655
3882
|
this.cells = Array.from((_this$el$firstElement3 = (_this$el3 = this.el) === null || _this$el3 === void 0 ? void 0 : (_this$el3$firstElemen = _this$el3.firstElementChild) === null || _this$el3$firstElemen === void 0 ? void 0 : _this$el3$firstElemen.children) !== null && _this$el$firstElement3 !== void 0 ? _this$el$firstElement3 : []).slice(hasInfoColumn ? 1 : 0).slice(hasDragColumn ? 1 : 0).slice(onRequestToggleAllRows ? 1 : 0);
|
|
3656
|
-
var overIndex =
|
|
3883
|
+
var overIndex = findIndex_default()(this.cells, function (cell) {
|
|
3657
3884
|
var rect = cell.getBoundingClientRect();
|
|
3658
3885
|
return dragPosition !== undefined && dragPosition > rect.left && dragPosition < rect.right;
|
|
3659
3886
|
});
|
|
@@ -3693,6 +3920,7 @@ var Head_Head = /*#__PURE__*/function (_Component) {
|
|
|
3693
3920
|
onRequestResizeColumn = _this$props5.onRequestResizeColumn,
|
|
3694
3921
|
onRequestToggleAllRows = _this$props5.onRequestToggleAllRows,
|
|
3695
3922
|
rowSelection = _this$props5.rowSelection;
|
|
3923
|
+
var headType = this.context.headType;
|
|
3696
3924
|
var guidelineIndex = this.calculateGuideIndex();
|
|
3697
3925
|
var validChildren = external_react_["Children"].toArray(children).filter(external_react_["isValidElement"]);
|
|
3698
3926
|
var minimumIndex = validChildren.length + (actions.length || actionsColumnWidth ? 1 : 0);
|
|
@@ -3724,10 +3952,11 @@ var Head_Head = /*#__PURE__*/function (_Component) {
|
|
|
3724
3952
|
var toggleState = rowSelection === undefined ? undefined : toggleStateMap[rowSelection];
|
|
3725
3953
|
var ariaChecked = toggleState === 'some' ? 'mixed' : toggleState;
|
|
3726
3954
|
var defaultActionsColumnWidth = actionsColumnWidth || 48;
|
|
3955
|
+
var testHookValue = headType === 'fixed' ? 'fixed-head' : 'head';
|
|
3727
3956
|
return /*#__PURE__*/external_react_default.a.createElement(HeadStyles_Styled, Head_extends({
|
|
3728
3957
|
ref: this.handleMount,
|
|
3729
|
-
"data-test":
|
|
3730
|
-
},
|
|
3958
|
+
"data-test": testHookValue
|
|
3959
|
+
}, omit_default()(this.props, keys_default()(Head.propTypes))), /*#__PURE__*/external_react_default.a.createElement(Table_Row, null, hasDragColumn && /*#__PURE__*/external_react_default.a.createElement(StyledDragRow, {
|
|
3731
3960
|
key: "drag_rows_head_cell",
|
|
3732
3961
|
"data-test": "drag-rows-head-cell",
|
|
3733
3962
|
align: "center",
|
|
@@ -3789,6 +4018,8 @@ var Head_Head = /*#__PURE__*/function (_Component) {
|
|
|
3789
4018
|
return Head;
|
|
3790
4019
|
}(external_react_["Component"]);
|
|
3791
4020
|
|
|
4021
|
+
Head_defineProperty(Head_Head, "contextType", Table_TableContext);
|
|
4022
|
+
|
|
3792
4023
|
Head_defineProperty(Head_Head, "splunkUiType", 'Table.Head');
|
|
3793
4024
|
|
|
3794
4025
|
Head_defineProperty(Head_Head, "propTypes", Head_propTypes);
|
|
@@ -3796,11 +4027,19 @@ Head_defineProperty(Head_Head, "propTypes", Head_propTypes);
|
|
|
3796
4027
|
Head_defineProperty(Head_Head, "defaultProps", Head_defaultProps);
|
|
3797
4028
|
|
|
3798
4029
|
/* harmony default export */ var Table_Head = (Head_Head);
|
|
4030
|
+
// EXTERNAL MODULE: external "lodash/isFinite"
|
|
4031
|
+
var isFinite_ = __webpack_require__(21);
|
|
4032
|
+
var isFinite_default = /*#__PURE__*/__webpack_require__.n(isFinite_);
|
|
4033
|
+
|
|
4034
|
+
// EXTERNAL MODULE: external "lodash/isFunction"
|
|
4035
|
+
var isFunction_ = __webpack_require__(68);
|
|
4036
|
+
var isFunction_default = /*#__PURE__*/__webpack_require__.n(isFunction_);
|
|
4037
|
+
|
|
3799
4038
|
// EXTERNAL MODULE: external "@splunk/ui-utils/id"
|
|
3800
|
-
var id_ = __webpack_require__(
|
|
4039
|
+
var id_ = __webpack_require__(13);
|
|
3801
4040
|
|
|
3802
4041
|
// EXTERNAL MODULE: external "@splunk/react-ui/Popover"
|
|
3803
|
-
var Popover_ = __webpack_require__(
|
|
4042
|
+
var Popover_ = __webpack_require__(23);
|
|
3804
4043
|
var Popover_default = /*#__PURE__*/__webpack_require__.n(Popover_);
|
|
3805
4044
|
|
|
3806
4045
|
// CONCATENATED MODULE: ./src/Table/HeadDropdownCell.tsx
|
|
@@ -3852,6 +4091,11 @@ function HeadDropdownCell_defineProperty(obj, key, value) { if (key in obj) { Ob
|
|
|
3852
4091
|
|
|
3853
4092
|
|
|
3854
4093
|
|
|
4094
|
+
|
|
4095
|
+
|
|
4096
|
+
|
|
4097
|
+
|
|
4098
|
+
|
|
3855
4099
|
/** @public */
|
|
3856
4100
|
|
|
3857
4101
|
var possibleCloseReasons = ['clickAway', 'contentClick', 'escapeKey', 'offScreen', 'tabKey', 'toggleClick'];
|
|
@@ -3982,8 +4226,8 @@ var HeadDropdownCell_HeadDropdownCell = /*#__PURE__*/function (_Component) {
|
|
|
3982
4226
|
}
|
|
3983
4227
|
}
|
|
3984
4228
|
|
|
3985
|
-
if (_this.isOpen() &&
|
|
3986
|
-
if (
|
|
4229
|
+
if (_this.isOpen() && includes_default()(closeReasons, reason) && index !== undefined) {
|
|
4230
|
+
if (includes_default()(focusToggleReasons, reason)) {
|
|
3987
4231
|
_this.focus();
|
|
3988
4232
|
}
|
|
3989
4233
|
|
|
@@ -4099,7 +4343,7 @@ var HeadDropdownCell_HeadDropdownCell = /*#__PURE__*/function (_Component) {
|
|
|
4099
4343
|
isDragging: false,
|
|
4100
4344
|
open: false
|
|
4101
4345
|
};
|
|
4102
|
-
_this.controlledExternally =
|
|
4346
|
+
_this.controlledExternally = has_default()(props, 'open');
|
|
4103
4347
|
_this.popoverId = Object(id_["createDOMID"])('popover');
|
|
4104
4348
|
_this.cellId = Object(id_["createDOMID"])('cellId');
|
|
4105
4349
|
|
|
@@ -4176,7 +4420,7 @@ var HeadDropdownCell_HeadDropdownCell = /*#__PURE__*/function (_Component) {
|
|
|
4176
4420
|
var cellId = id || this.cellId;
|
|
4177
4421
|
var headType = this.context.headType;
|
|
4178
4422
|
return /*#__PURE__*/external_react_default.a.createElement(HeadCellStyles_Styled, HeadDropdownCell_extends({
|
|
4179
|
-
style:
|
|
4423
|
+
style: merge_default()(style, {
|
|
4180
4424
|
width: width
|
|
4181
4425
|
}),
|
|
4182
4426
|
"data-test": "head-cell",
|
|
@@ -4186,7 +4430,7 @@ var HeadDropdownCell_HeadDropdownCell = /*#__PURE__*/function (_Component) {
|
|
|
4186
4430
|
id: visible ? cellId : undefined,
|
|
4187
4431
|
tabIndex: visible ? 0 : undefined,
|
|
4188
4432
|
ref: this.handleMount
|
|
4189
|
-
},
|
|
4433
|
+
}, omit_default()(this.props, [].concat(HeadDropdownCell_toConsumableArray(Object.keys(HeadDropdownCell.propTypes)), ['id', 'style'])), {
|
|
4190
4434
|
onClick: this.handleClick,
|
|
4191
4435
|
onKeyDown: this.handleKeyDown,
|
|
4192
4436
|
"aria-haspopup": true,
|
|
@@ -4213,7 +4457,7 @@ var HeadDropdownCell_HeadDropdownCell = /*#__PURE__*/function (_Component) {
|
|
|
4213
4457
|
}), /*#__PURE__*/external_react_default.a.createElement(Popover_default.a, {
|
|
4214
4458
|
align: "center",
|
|
4215
4459
|
open: !!el && this.isOpen(),
|
|
4216
|
-
autoCloseWhenOffScreen:
|
|
4460
|
+
autoCloseWhenOffScreen: includes_default()(closeReasons, 'offScreen'),
|
|
4217
4461
|
anchor: el,
|
|
4218
4462
|
canCoverAnchor: canCoverHead,
|
|
4219
4463
|
retainFocus: retainFocus,
|
|
@@ -4223,10 +4467,10 @@ var HeadDropdownCell_HeadDropdownCell = /*#__PURE__*/function (_Component) {
|
|
|
4223
4467
|
id: this.popoverId,
|
|
4224
4468
|
"aria-labelledby": id || this.cellId,
|
|
4225
4469
|
takeFocus: takeFocus,
|
|
4226
|
-
pointTo: clientX !== undefined &&
|
|
4470
|
+
pointTo: clientX !== undefined && isFinite_default()(clientX) ? {
|
|
4227
4471
|
x: clientX - ((_el$getBoundingClient = el === null || el === void 0 ? void 0 : el.getBoundingClientRect().left) !== null && _el$getBoundingClient !== void 0 ? _el$getBoundingClient : 0)
|
|
4228
4472
|
} : undefined
|
|
4229
|
-
},
|
|
4473
|
+
}, isFunction_default()(children) ? function () {
|
|
4230
4474
|
return (
|
|
4231
4475
|
/*#__PURE__*/
|
|
4232
4476
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
@@ -4257,6 +4501,10 @@ HeadDropdownCell_defineProperty(HeadDropdownCell_HeadDropdownCell, "defaultProps
|
|
|
4257
4501
|
HeadDropdownCell_defineProperty(HeadDropdownCell_HeadDropdownCell, "contextType", Table_TableContext);
|
|
4258
4502
|
|
|
4259
4503
|
/* harmony default export */ var Table_HeadDropdownCell = (HeadDropdownCell_HeadDropdownCell);
|
|
4504
|
+
// EXTERNAL MODULE: external "lodash/extend"
|
|
4505
|
+
var extend_ = __webpack_require__(49);
|
|
4506
|
+
var extend_default = /*#__PURE__*/__webpack_require__.n(extend_);
|
|
4507
|
+
|
|
4260
4508
|
// CONCATENATED MODULE: ./src/Table/HeadTableStyles.ts
|
|
4261
4509
|
|
|
4262
4510
|
|
|
@@ -4312,6 +4560,7 @@ function HeadTable_defineProperty(obj, key, value) { if (key in obj) { Object.de
|
|
|
4312
4560
|
|
|
4313
4561
|
|
|
4314
4562
|
|
|
4563
|
+
|
|
4315
4564
|
var HeadTable_propTypes = {
|
|
4316
4565
|
cellWidths: external_prop_types_default.a.arrayOf(external_prop_types_default.a.number).isRequired,
|
|
4317
4566
|
dragIndex: external_prop_types_default.a.number,
|
|
@@ -4407,7 +4656,7 @@ var HeadTable_HeadTable = /*#__PURE__*/function (_Component) {
|
|
|
4407
4656
|
var cells = isFixedColumn ? external_react_["Children"].toArray(tHead.props.children) : // ensure consistent keys
|
|
4408
4657
|
external_react_["Children"].toArray(tHead.props.children).filter(external_react_["isValidElement"]).map(function (cell, i) {
|
|
4409
4658
|
return /*#__PURE__*/Object(external_react_["cloneElement"])(cell, {
|
|
4410
|
-
style:
|
|
4659
|
+
style: extend_default()({}, cell.props.style, {
|
|
4411
4660
|
width: cellWidths[i + indexOffset]
|
|
4412
4661
|
})
|
|
4413
4662
|
});
|
|
@@ -4425,11 +4674,11 @@ var HeadTable_HeadTable = /*#__PURE__*/function (_Component) {
|
|
|
4425
4674
|
}, /*#__PURE__*/external_react_default.a.createElement(HeadTableStyles_Styled, HeadTable_extends({
|
|
4426
4675
|
"data-test": "".concat(headType, "-head-table"),
|
|
4427
4676
|
"data-fixed-column": isFixedColumn ? 'true' : undefined,
|
|
4428
|
-
style:
|
|
4677
|
+
style: extend_default()({}, tableStyle, {
|
|
4429
4678
|
marginLeft: horizontalOffset,
|
|
4430
4679
|
width: isFixedColumn ? undefined : tableWidth
|
|
4431
4680
|
})
|
|
4432
|
-
},
|
|
4681
|
+
}, omit_default()(otherProps, 'dragIndex')), clonedTHead));
|
|
4433
4682
|
}
|
|
4434
4683
|
}]);
|
|
4435
4684
|
|
|
@@ -4442,7 +4691,7 @@ HeadTable_defineProperty(HeadTable_HeadTable, "defaultProps", HeadTable_defaultP
|
|
|
4442
4691
|
|
|
4443
4692
|
/* harmony default export */ var Table_HeadTable = (HeadTable_HeadTable);
|
|
4444
4693
|
// EXTERNAL MODULE: ./src/utils/types.ts
|
|
4445
|
-
var types = __webpack_require__(
|
|
4694
|
+
var types = __webpack_require__(76);
|
|
4446
4695
|
|
|
4447
4696
|
// CONCATENATED MODULE: ./src/Table/Table.tsx
|
|
4448
4697
|
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); }
|
|
@@ -4489,6 +4738,12 @@ function Table_defineProperty(obj, key, value) { if (key in obj) { Object.define
|
|
|
4489
4738
|
|
|
4490
4739
|
|
|
4491
4740
|
|
|
4741
|
+
|
|
4742
|
+
|
|
4743
|
+
|
|
4744
|
+
|
|
4745
|
+
|
|
4746
|
+
|
|
4492
4747
|
// Exposed as static members of the Table class
|
|
4493
4748
|
|
|
4494
4749
|
|
|
@@ -4519,6 +4774,7 @@ var Table_propTypes = {
|
|
|
4519
4774
|
onRequestToggleAllRows: external_prop_types_default.a.func,
|
|
4520
4775
|
onScroll: external_prop_types_default.a.func,
|
|
4521
4776
|
outerStyle: external_prop_types_default.a.object,
|
|
4777
|
+
primaryColumnIndex: external_prop_types_default.a.number,
|
|
4522
4778
|
rowExpansion: external_prop_types_default.a.oneOf(['single', 'multi', 'controlled', 'none']),
|
|
4523
4779
|
rowSelection: external_prop_types_default.a.oneOf(['all', 'some', 'none']),
|
|
4524
4780
|
stripeRows: external_prop_types_default.a.bool,
|
|
@@ -4533,7 +4789,8 @@ var Table_defaultProps = {
|
|
|
4533
4789
|
headType: 'inline',
|
|
4534
4790
|
rowExpansion: 'none',
|
|
4535
4791
|
rowSelection: 'none',
|
|
4536
|
-
resizableFillLayout: false
|
|
4792
|
+
resizableFillLayout: false,
|
|
4793
|
+
primaryColumnIndex: 0
|
|
4537
4794
|
};
|
|
4538
4795
|
|
|
4539
4796
|
var Table_Table = /*#__PURE__*/function (_Component) {
|
|
@@ -4563,7 +4820,7 @@ var Table_Table = /*#__PURE__*/function (_Component) {
|
|
|
4563
4820
|
}
|
|
4564
4821
|
|
|
4565
4822
|
var headCells = (_head$getEl = head.getEl()) === null || _head$getEl === void 0 ? void 0 : _head$getEl.children[0].children;
|
|
4566
|
-
var activeHeadCellIndex =
|
|
4823
|
+
var activeHeadCellIndex = indexOf_default()(headCells, document.activeElement);
|
|
4567
4824
|
|
|
4568
4825
|
if (activeHeadCellIndex > -1) {
|
|
4569
4826
|
return {
|
|
@@ -4573,7 +4830,7 @@ var Table_Table = /*#__PURE__*/function (_Component) {
|
|
|
4573
4830
|
}
|
|
4574
4831
|
|
|
4575
4832
|
var resizeButtons = (_head$getEl2 = head.getEl()) === null || _head$getEl2 === void 0 ? void 0 : _head$getEl2.querySelectorAll('[data-test=resize]');
|
|
4576
|
-
var activeResizeButtonIndex =
|
|
4833
|
+
var activeResizeButtonIndex = indexOf_default()(resizeButtons, document.activeElement);
|
|
4577
4834
|
|
|
4578
4835
|
if (activeResizeButtonIndex > -1) {
|
|
4579
4836
|
return {
|
|
@@ -4687,9 +4944,9 @@ var Table_Table = /*#__PURE__*/function (_Component) {
|
|
|
4687
4944
|
});
|
|
4688
4945
|
});
|
|
4689
4946
|
|
|
4690
|
-
Table_defineProperty(Table_assertThisInitialized(_this), "handleScroll",
|
|
4947
|
+
Table_defineProperty(Table_assertThisInitialized(_this), "handleScroll", throttle_default()(_this.updateDockedHeadState, 0));
|
|
4691
4948
|
|
|
4692
|
-
Table_defineProperty(Table_assertThisInitialized(_this), "handleResize",
|
|
4949
|
+
Table_defineProperty(Table_assertThisInitialized(_this), "handleResize", throttle_default()(_this.updateDockedHeadState, 50));
|
|
4693
4950
|
|
|
4694
4951
|
Table_defineProperty(Table_assertThisInitialized(_this), "handleContainerScroll", function (e) {
|
|
4695
4952
|
var _this$props$onScroll, _this$props;
|
|
@@ -4826,7 +5083,7 @@ var Table_Table = /*#__PURE__*/function (_Component) {
|
|
|
4826
5083
|
wrapper.style.left = '0';
|
|
4827
5084
|
wrapper.style.maxHeight = '10px';
|
|
4828
5085
|
wrapper.style.overflow = 'hidden';
|
|
4829
|
-
|
|
5086
|
+
forEach_default()(cells, function (cell) {
|
|
4830
5087
|
var clone = cell.cloneNode(true); // TS: this seems safe to assume?
|
|
4831
5088
|
|
|
4832
5089
|
clone.style.display = 'block';
|
|
@@ -4842,7 +5099,7 @@ var Table_Table = /*#__PURE__*/function (_Component) {
|
|
|
4842
5099
|
(_wrapper$parentNode = wrapper.parentNode) === null || _wrapper$parentNode === void 0 ? void 0 : _wrapper$parentNode.removeChild(wrapper);
|
|
4843
5100
|
});
|
|
4844
5101
|
|
|
4845
|
-
Table_defineProperty(Table_assertThisInitialized(_this), "updateDragPosition",
|
|
5102
|
+
Table_defineProperty(Table_assertThisInitialized(_this), "updateDragPosition", throttle_default()(_this.updateDragPositionImpl, 100, {
|
|
4846
5103
|
trailing: false
|
|
4847
5104
|
}));
|
|
4848
5105
|
|
|
@@ -4864,7 +5121,7 @@ var Table_Table = /*#__PURE__*/function (_Component) {
|
|
|
4864
5121
|
if (head && headTable) {
|
|
4865
5122
|
var cellWidths = head.getCellWidths();
|
|
4866
5123
|
|
|
4867
|
-
if (!
|
|
5124
|
+
if (!isEqual_default()(this.state.cellWidths, cellWidths)) {
|
|
4868
5125
|
this.updateDockedHeadState();
|
|
4869
5126
|
}
|
|
4870
5127
|
}
|
|
@@ -4928,6 +5185,7 @@ var Table_Table = /*#__PURE__*/function (_Component) {
|
|
|
4928
5185
|
actions: validActions.length > 0,
|
|
4929
5186
|
movableColumns: !!this.props.onRequestMoveColumn,
|
|
4930
5187
|
onRequestMoveRow: this.props.onRequestMoveRow,
|
|
5188
|
+
primaryColumnIndex: this.props.primaryColumnIndex,
|
|
4931
5189
|
rowExpansion: this.props.rowExpansion,
|
|
4932
5190
|
stripeRows: this.props.stripeRows
|
|
4933
5191
|
});
|
|
@@ -5097,7 +5355,7 @@ var Table_Table = /*#__PURE__*/function (_Component) {
|
|
|
5097
5355
|
if (!isFixedColumn) {
|
|
5098
5356
|
// if all the HeadCells are fixed width, then the table is fixed.
|
|
5099
5357
|
isFixedColumn = !external_react_["Children"].toArray(child.props.children).filter(external_react_["isValidElement"]).some(function (th) {
|
|
5100
|
-
return !
|
|
5358
|
+
return !has_default()(th.props, 'width');
|
|
5101
5359
|
});
|
|
5102
5360
|
}
|
|
5103
5361
|
} else if (splunkUiType === 'Table.Body') {
|
|
@@ -5136,7 +5394,7 @@ var Table_Table = /*#__PURE__*/function (_Component) {
|
|
|
5136
5394
|
ref: elementRef,
|
|
5137
5395
|
style: outerStyle,
|
|
5138
5396
|
"data-test-row-selection": onRequestToggleAllRows ? rowSelection : undefined
|
|
5139
|
-
},
|
|
5397
|
+
}, omit_default()(this.props, [].concat(Table_toConsumableArray(Object.keys(Table.propTypes)), ['style']))), /*#__PURE__*/external_react_default.a.createElement(EventListener_default.a, {
|
|
5140
5398
|
target: Object(ssrWindow["a" /* getWindow */])(),
|
|
5141
5399
|
eventType: "scroll",
|
|
5142
5400
|
listener: this.handleScroll,
|