@splunk/react-ui 4.20.0 → 4.21.1
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 +425 -441
- package/Anchor.js +147 -193
- package/Animation.js +142 -166
- package/AnimationToggle.js +197 -253
- package/Box.js +145 -194
- package/Breadcrumbs.js +288 -298
- package/Button.js +488 -613
- package/ButtonGroup.js +160 -212
- package/ButtonSimple.js +543 -562
- package/CHANGELOG.md +26 -0
- package/Calendar.js +1107 -1195
- package/Card.js +771 -746
- package/CardLayout.js +205 -223
- package/Chip.js +509 -612
- package/Clickable.js +416 -472
- package/CloseButton.js +165 -250
- package/Code.js +1808 -2172
- package/Code.js.LICENSE.txt +8 -0
- package/CollapsiblePanel.js +586 -675
- package/Color.js +1066 -1297
- package/ColumnLayout.js +402 -465
- package/ComboBox.js +892 -969
- package/Concertina.js +998 -963
- package/ControlGroup.js +687 -718
- package/Date.js +567 -697
- package/DefinitionList.js +308 -310
- package/Divider.js +149 -194
- package/Dropdown.js +459 -558
- package/DualListbox.js +1480 -1735
- package/EventListener.js +94 -165
- package/File.js +1051 -1173
- package/FormRows.js +885 -880
- package/Heading.js +216 -263
- package/Image.js +446 -558
- package/JSONTree.js +690 -699
- package/Layer.js +442 -582
- package/Link.js +336 -361
- package/List.js +213 -237
- package/Markdown.js +510 -612
- package/Menu.js +1109 -1331
- package/Message.js +474 -629
- package/MessageBar.js +387 -561
- package/Modal.js +810 -798
- package/ModalLayer.js +326 -343
- package/Monogram.js +308 -368
- package/Multiselect.js +3558 -3998
- package/Number.js +729 -843
- package/Paginator.js +510 -615
- package/Paragraph.js +145 -188
- package/Popover.js +1470 -1693
- package/Progress.js +301 -362
- package/RadioBar.js +610 -651
- package/RadioList.js +483 -544
- package/Resize.js +530 -623
- package/ResultsMenu.js +494 -597
- package/ScreenReaderContent.js +142 -187
- package/Scroll.js +595 -598
- package/ScrollContainerContext.js +197 -278
- package/Search.js +745 -817
- package/Select.js +2441 -2746
- package/SidePanel.js +390 -392
- package/Slider.js +668 -825
- package/SlidingPanels.js +639 -645
- package/SplitButton.js +464 -499
- package/StaticContent.js +161 -217
- package/StepBar.js +386 -466
- package/Switch.js +710 -764
- package/TabBar.js +724 -815
- package/TabLayout.js +406 -438
- package/Table.js +4842 -5121
- package/Text.js +1169 -1351
- package/TextArea.js +1097 -1307
- package/Tooltip.js +624 -721
- package/TransitionOpen.js +489 -546
- package/Typography.js +176 -229
- package/WaitSpinner.js +230 -298
- package/package.json +14 -15
- package/stubs-splunkui.d.ts +4 -1
- package/types/src/ComboBox/Option.d.ts +1 -1
- package/types/src/Concertina/Concertina.d.ts +4 -0
- package/types/src/JSONTree/JSONTreeContext.d.ts +7 -0
- package/types/src/JSONTree/TreeNode.d.ts +5 -0
- package/types/src/Link/Link.d.ts +7 -3
- package/types/src/Link/docs/examples/NewWindow.d.ts +2 -0
- package/types/src/Markdown/Markdown.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownHeading.d.ts +1 -1
- package/types/src/Menu/Item.d.ts +1 -1
- package/types/src/Menu/Menu.d.ts +1 -0
- package/types/src/MessageBar/docs/examples/WithActions.d.ts +2 -0
- package/types/src/Multiselect/Option.d.ts +1 -1
- package/types/src/Search/Option.d.ts +1 -1
- package/types/src/Select/Option.d.ts +1 -1
- package/types/src/Select/OptionBase.d.ts +1 -1
- package/types/src/fixtures/FetchOptions.d.ts +2 -8
- package/useForceUpdate.js +112 -146
- package/useKeyPress.js +74 -128
- package/usePrevious.js +65 -129
- package/useRovingFocus.js +122 -218
- package/types/src/Link/docs/examples/NewTab.d.ts +0 -2
- /package/types/src/Table/docs/examples/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
- /package/types/src/Table/docs/examples/prisma/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
package/stubs-splunkui.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ interface OptionPropsBase {
|
|
|
16
16
|
description?: string;
|
|
17
17
|
/**
|
|
18
18
|
* The description text may appear to the right of the label or under the label.
|
|
19
|
-
* @themeNotes
|
|
19
|
+
* @themeNotes 'right' is only supported in enterprise themes. Unsupported values will fall back to ‘bottom’.
|
|
20
20
|
*/
|
|
21
21
|
descriptionPosition?: 'right' | 'bottom';
|
|
22
22
|
/**
|
|
@@ -20,6 +20,10 @@ interface ConcertinaState {
|
|
|
20
20
|
scrollEl: Element | null;
|
|
21
21
|
targetTop?: number;
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated
|
|
25
|
+
* Concertina has been deprecated and will be removed in a future major version.
|
|
26
|
+
*/
|
|
23
27
|
declare class Concertina extends Component<ConcertinaProps, ConcertinaState> {
|
|
24
28
|
private panelPositions;
|
|
25
29
|
static propTypes: React.WeakValidationMap<ClassComponentProps<ConcertinaPropsBase, {}, "div", never>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import { JSONElement, JSONTreeClickValueHandler, JSONTreeClickKeyHandler } from './JSONTree';
|
|
3
|
+
import JSONTreeContext from './JSONTreeContext';
|
|
3
4
|
import { ClassComponentProps } from '../utils/types';
|
|
4
5
|
interface JSONTreeNodePropsBase {
|
|
5
6
|
path?: (string | number)[];
|
|
@@ -11,6 +12,7 @@ interface JSONTreeNodePropsBase {
|
|
|
11
12
|
onClickKey?: JSONTreeClickKeyHandler;
|
|
12
13
|
onClickValue?: JSONTreeClickValueHandler;
|
|
13
14
|
overflow?: 'wrap' | 'scroll';
|
|
15
|
+
shift?: boolean;
|
|
14
16
|
}
|
|
15
17
|
declare const defaultProps: Required<Pick<JSONTreeNodePropsBase, 'path' | 'defaultOpen' | 'expandChildren' | 'indent' | 'indentLevel' | 'overflow'>>;
|
|
16
18
|
declare type JSONTreeNodeProps = ClassComponentProps<JSONTreeNodePropsBase, typeof defaultProps, 'span'>;
|
|
@@ -23,6 +25,9 @@ interface JSONTreeNodeState {
|
|
|
23
25
|
declare class JSONTreeNode extends Component<JSONTreeNodeProps, JSONTreeNodeState> {
|
|
24
26
|
private regularIndent;
|
|
25
27
|
private closingIndent;
|
|
28
|
+
private mutableShift;
|
|
29
|
+
context: React.ContextType<typeof JSONTreeContext>;
|
|
30
|
+
static contextType: React.Context<JSONTreeContext>;
|
|
26
31
|
static propTypes: React.WeakValidationMap<ClassComponentProps<JSONTreeNodePropsBase, Required<Pick<JSONTreeNodePropsBase, "path" | "overflow" | "defaultOpen" | "expandChildren" | "indent" | "indentLevel">>, "span", never>>;
|
|
27
32
|
static defaultProps: Required<Pick<JSONTreeNodePropsBase, "path" | "overflow" | "defaultOpen" | "expandChildren" | "indent" | "indentLevel">>;
|
|
28
33
|
constructor(props: JSONTreeNodeProps);
|
package/types/src/Link/Link.d.ts
CHANGED
|
@@ -17,10 +17,14 @@ interface LinkPropsBase {
|
|
|
17
17
|
*/
|
|
18
18
|
elementRef?: React.Ref<HTMLButtonElement | HTMLAnchorElement>;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
20
|
+
* Open the link in a new context. Usually this will open the location in a new tab,
|
|
21
|
+
* but may open in a new window depending on the user's browser and settings.
|
|
22
|
+
*
|
|
23
|
+
* An icon and a message is added to indicate this behavior to users.
|
|
24
|
+
* "(Opens new window)" is the default message. This can be customized by passing
|
|
25
|
+
* a string instead of boolean to `openInNewContext`.
|
|
22
26
|
*/
|
|
23
|
-
openInNewContext?: boolean;
|
|
27
|
+
openInNewContext?: boolean | string;
|
|
24
28
|
/**
|
|
25
29
|
* The URL or path to link to.
|
|
26
30
|
*/
|
|
@@ -120,7 +120,7 @@ declare type MarkdownProps = ComponentProps<MarkdownPropsBase, 'div'>;
|
|
|
120
120
|
* The component prefers @splunk/react-ui components over plain HTML components. For example
|
|
121
121
|
* links are rendered as the `@splunk/react-ui/Link` component instead of plain `<a>` tag.
|
|
122
122
|
*/
|
|
123
|
-
declare function Markdown({ blockquoteRenderer, codeBlockRenderer, codeRenderer, headingRenderer, imageRenderer, itemRenderer, linkRenderer, listRenderer, paragraphRenderer, text, ...otherProps }: MarkdownProps): JSX.Element;
|
|
123
|
+
declare function Markdown({ blockquoteRenderer, codeBlockRenderer, codeRenderer, elementRef, headingRenderer, imageRenderer, itemRenderer, linkRenderer, listRenderer, paragraphRenderer, text, ...otherProps }: MarkdownProps): JSX.Element;
|
|
124
124
|
declare namespace Markdown {
|
|
125
125
|
var propTypes: {
|
|
126
126
|
blockquoteRenderer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { ComponentProps } from '../../utils/types';
|
|
4
4
|
interface MarkdownHeadingPropsBase {
|
|
5
|
-
children: React.ReactNode[];
|
|
5
|
+
children: React.ReactNode | React.ReactNode[];
|
|
6
6
|
level: 1 | 2 | 3 | 4 | 5 | 6;
|
|
7
7
|
}
|
|
8
8
|
declare type MarkdownHeadingProps = ComponentProps<MarkdownHeadingPropsBase, 'h1'>;
|
package/types/src/Menu/Item.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ interface ItemPropsBase {
|
|
|
19
19
|
description?: string;
|
|
20
20
|
/**
|
|
21
21
|
* The description text might appear to the right of the label or under the label.
|
|
22
|
-
* @themeNotes
|
|
22
|
+
* @themeNotes 'right' is only supported in enterprise themes. Unsupported values will fall back to ‘bottom’.
|
|
23
23
|
*/
|
|
24
24
|
descriptionPosition?: 'right' | 'bottom';
|
|
25
25
|
/**
|
package/types/src/Menu/Menu.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ interface OptionPropsBase {
|
|
|
22
22
|
description?: string;
|
|
23
23
|
/**
|
|
24
24
|
* The description text may appear to the right of the label or under the label.
|
|
25
|
-
* @themeNotes
|
|
25
|
+
* @themeNotes 'right' is only supported in enterprise themes. Unsupported values will fall back to ‘bottom’.
|
|
26
26
|
*/
|
|
27
27
|
descriptionPosition?: 'right' | 'bottom';
|
|
28
28
|
/**
|
|
@@ -18,7 +18,7 @@ interface OptionPropsBase {
|
|
|
18
18
|
description?: string;
|
|
19
19
|
/**
|
|
20
20
|
* The description text may appear to the right of the label or under the label.
|
|
21
|
-
* @themeNotes
|
|
21
|
+
* @themeNotes 'right' is only supported in enterprise themes. Unsupported values will fall back to ‘bottom’.
|
|
22
22
|
*/
|
|
23
23
|
descriptionPosition?: 'right' | 'bottom';
|
|
24
24
|
/**
|
|
@@ -16,7 +16,7 @@ interface OptionPropsBase {
|
|
|
16
16
|
description?: string;
|
|
17
17
|
/**
|
|
18
18
|
* The description text may appear to the right of the label or under the label.
|
|
19
|
-
* @themeNotes
|
|
19
|
+
* @themeNotes 'right' is only supported in enterprise themes. Unsupported values will fall back to ‘bottom’.
|
|
20
20
|
*/
|
|
21
21
|
descriptionPosition?: 'right' | 'bottom';
|
|
22
22
|
/**
|
|
@@ -20,7 +20,7 @@ interface OptionPropsBase {
|
|
|
20
20
|
description?: string;
|
|
21
21
|
/**
|
|
22
22
|
* The description text may appear to the right of the label or under the label.
|
|
23
|
-
* @themeNotes
|
|
23
|
+
* @themeNotes 'right' is only supported in enterprise themes. Unsupported values will fall back to ‘bottom’.
|
|
24
24
|
*/
|
|
25
25
|
descriptionPosition?: 'right' | 'bottom';
|
|
26
26
|
/**
|
|
@@ -59,17 +59,11 @@ export default class FetchOptions {
|
|
|
59
59
|
/**
|
|
60
60
|
* @return Option of given value;
|
|
61
61
|
*/
|
|
62
|
-
getOption: (value: number) =>
|
|
63
|
-
id: number;
|
|
64
|
-
title: string;
|
|
65
|
-
} | undefined;
|
|
62
|
+
getOption: (value: number) => Movie | undefined;
|
|
66
63
|
/**
|
|
67
64
|
* @return Options of given values;
|
|
68
65
|
*/
|
|
69
|
-
getSelectedOptions: (values: number[]) =>
|
|
70
|
-
id: number;
|
|
71
|
-
title: string;
|
|
72
|
-
}[];
|
|
66
|
+
getSelectedOptions: (values: number[]) => Movie[];
|
|
73
67
|
/**
|
|
74
68
|
* Get current length of indexes fetched.
|
|
75
69
|
*/
|
package/useForceUpdate.js
CHANGED
|
@@ -1,151 +1,117 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/******/
|
|
4
|
-
/******/
|
|
5
|
-
/******/
|
|
6
|
-
/******/
|
|
7
|
-
|
|
8
|
-
/******/
|
|
9
|
-
/******/
|
|
10
|
-
/******/
|
|
11
|
-
/******/
|
|
12
|
-
/******/
|
|
13
|
-
/******/
|
|
14
|
-
/******/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/******/
|
|
19
|
-
/******/
|
|
20
|
-
/******/
|
|
21
|
-
/******/
|
|
22
|
-
/******/
|
|
23
|
-
/******/
|
|
24
|
-
/******/
|
|
25
|
-
/******/
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/******/
|
|
29
|
-
/******/
|
|
30
|
-
/******/
|
|
31
|
-
/******/
|
|
32
|
-
/******/
|
|
33
|
-
/******/
|
|
34
|
-
/******/
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
/******/
|
|
38
|
-
/******/
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
/******/
|
|
42
|
-
/******/
|
|
43
|
-
/******/
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
__webpack_require__.r(__webpack_exports__);
|
|
103
|
-
|
|
104
|
-
// EXPORTS
|
|
105
|
-
__webpack_require__.d(__webpack_exports__, "default", function() { return /* reexport */ useForceUpdate_useForceUpdate; });
|
|
106
|
-
|
|
107
|
-
// EXTERNAL MODULE: external "react"
|
|
108
|
-
var external_react_ = __webpack_require__(2);
|
|
109
|
-
|
|
110
|
-
// CONCATENATED MODULE: ./src/useForceUpdate/useForceUpdate.tsx
|
|
111
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
112
|
-
|
|
113
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
114
|
-
|
|
115
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
116
|
-
|
|
117
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
118
|
-
|
|
119
|
-
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
120
|
-
|
|
121
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
/**
|
|
1
|
+
/******/ (() => {
|
|
2
|
+
// webpackBootstrap
|
|
3
|
+
/******/ "use strict";
|
|
4
|
+
/******/ // The require scope
|
|
5
|
+
/******/ var r = {};
|
|
6
|
+
/******/
|
|
7
|
+
/************************************************************************/
|
|
8
|
+
/******/ /* webpack/runtime/define property getters */
|
|
9
|
+
/******/ (() => {
|
|
10
|
+
/******/ // define getter functions for harmony exports
|
|
11
|
+
/******/ r.d = (e, t) => {
|
|
12
|
+
/******/ for (var n in t) {
|
|
13
|
+
/******/ if (r.o(t, n) && !r.o(e, n)) {
|
|
14
|
+
/******/ Object.defineProperty(e, n, {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: t[n]
|
|
17
|
+
});
|
|
18
|
+
/******/ }
|
|
19
|
+
/******/ }
|
|
20
|
+
/******/ };
|
|
21
|
+
/******/ })();
|
|
22
|
+
/******/
|
|
23
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
24
|
+
/******/ (() => {
|
|
25
|
+
/******/ r.o = (r, e) => Object.prototype.hasOwnProperty.call(r, e)
|
|
26
|
+
/******/;
|
|
27
|
+
})();
|
|
28
|
+
/******/
|
|
29
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
30
|
+
/******/ (() => {
|
|
31
|
+
/******/ // define __esModule on exports
|
|
32
|
+
/******/ r.r = r => {
|
|
33
|
+
/******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
|
|
34
|
+
/******/ Object.defineProperty(r, Symbol.toStringTag, {
|
|
35
|
+
value: "Module"
|
|
36
|
+
});
|
|
37
|
+
/******/ }
|
|
38
|
+
/******/ Object.defineProperty(r, "__esModule", {
|
|
39
|
+
value: true
|
|
40
|
+
});
|
|
41
|
+
/******/ };
|
|
42
|
+
/******/ })();
|
|
43
|
+
/******/
|
|
44
|
+
/************************************************************************/ var e = {};
|
|
45
|
+
// ESM COMPAT FLAG
|
|
46
|
+
r.r(e);
|
|
47
|
+
// EXPORTS
|
|
48
|
+
r.d(e, {
|
|
49
|
+
default: () => /* reexport */ c
|
|
50
|
+
});
|
|
51
|
+
// CONCATENATED MODULE: external "react"
|
|
52
|
+
const t = require("react");
|
|
53
|
+
// CONCATENATED MODULE: ./src/useForceUpdate/useForceUpdate.tsx
|
|
54
|
+
function n(r, e) {
|
|
55
|
+
return f(r) || i(r, e) || u(r, e) || o();
|
|
56
|
+
}
|
|
57
|
+
function o() {
|
|
58
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
59
|
+
}
|
|
60
|
+
function u(r, e) {
|
|
61
|
+
if (!r) return;
|
|
62
|
+
if (typeof r === "string") return a(r, e);
|
|
63
|
+
var t = Object.prototype.toString.call(r).slice(8, -1);
|
|
64
|
+
if (t === "Object" && r.constructor) t = r.constructor.name;
|
|
65
|
+
if (t === "Map" || t === "Set") return Array.from(r);
|
|
66
|
+
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return a(r, e);
|
|
67
|
+
}
|
|
68
|
+
function a(r, e) {
|
|
69
|
+
if (e == null || e > r.length) e = r.length;
|
|
70
|
+
for (var t = 0, n = new Array(e); t < e; t++) {
|
|
71
|
+
n[t] = r[t];
|
|
72
|
+
}
|
|
73
|
+
return n;
|
|
74
|
+
}
|
|
75
|
+
function i(r, e) {
|
|
76
|
+
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(r))) return;
|
|
77
|
+
var t = [];
|
|
78
|
+
var n = true;
|
|
79
|
+
var o = false;
|
|
80
|
+
var u = undefined;
|
|
81
|
+
try {
|
|
82
|
+
for (var a = r[Symbol.iterator](), i; !(n = (i = a.next()).done); n = true) {
|
|
83
|
+
t.push(i.value);
|
|
84
|
+
if (e && t.length === e) break;
|
|
85
|
+
}
|
|
86
|
+
} catch (r) {
|
|
87
|
+
o = true;
|
|
88
|
+
u = r;
|
|
89
|
+
} finally {
|
|
90
|
+
try {
|
|
91
|
+
if (!n && a["return"] != null) a["return"]();
|
|
92
|
+
} finally {
|
|
93
|
+
if (o) throw u;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return t;
|
|
97
|
+
}
|
|
98
|
+
function f(r) {
|
|
99
|
+
if (Array.isArray(r)) return r;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
125
102
|
* This is a private component not intended for use outside @splunk/react-ui
|
|
126
103
|
*
|
|
127
104
|
* Triggers a rerender of a functional component. Useful as an escape hatch when a render is needed regardless of state.
|
|
128
105
|
* See https://reactjs.org/docs/hooks-faq.html#is-there-something-like-forceupdate
|
|
129
106
|
*
|
|
130
|
-
*/
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
return forceUpdate;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/* harmony default export */ var useForceUpdate_useForceUpdate = (useForceUpdate);
|
|
145
|
-
// CONCATENATED MODULE: ./src/useForceUpdate/index.ts
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
/***/ })
|
|
150
|
-
|
|
151
|
-
/******/ });
|
|
107
|
+
*/ function l() {
|
|
108
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
109
|
+
var r = (0, t.useReducer)((function(r) {
|
|
110
|
+
return r + 1;
|
|
111
|
+
}), 0), e = n(r, 2), o = e[0], u = e[1];
|
|
112
|
+
return u;
|
|
113
|
+
}
|
|
114
|
+
/* harmony default export */ const c = l;
|
|
115
|
+
// CONCATENATED MODULE: ./src/useForceUpdate/index.ts
|
|
116
|
+
module.exports = e;
|
|
117
|
+
/******/})();
|