@splunk/react-ui 4.19.0 → 4.21.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 +114 -230
- package/Anchor.js +74 -150
- package/Animation.js +52 -124
- package/AnimationToggle.js +86 -146
- package/Box.js +77 -153
- package/Breadcrumbs.d.ts +2 -0
- package/Breadcrumbs.js +207 -0
- package/Button.js +168 -316
- package/ButtonGroup.js +84 -168
- package/ButtonSimple.js +224 -324
- package/CHANGELOG.md +35 -0
- package/Calendar.js +264 -462
- package/Card.js +223 -371
- package/CardLayout.js +87 -163
- package/Chip.js +199 -323
- package/Clickable.js +132 -248
- package/CloseButton.js +92 -200
- package/Code.js +188 -251
- package/CollapsiblePanel.js +214 -370
- package/Color.js +267 -495
- package/ColumnLayout.js +152 -254
- package/ComboBox.js +197 -371
- package/Concertina.js +214 -374
- package/ControlGroup.js +164 -288
- package/Date.js +154 -304
- package/DefinitionList.js +104 -180
- package/Divider.js +80 -156
- package/Dropdown.js +121 -263
- package/DualListbox.js +408 -601
- package/EventListener.js +70 -138
- package/File.js +343 -547
- package/FormRows.js +232 -414
- package/Heading.js +94 -164
- package/Image.js +167 -323
- package/JSONTree.js +166 -314
- package/Layer.js +221 -388
- package/Link.js +133 -239
- package/List.js +85 -161
- package/Markdown.js +230 -355
- package/Menu.js +396 -647
- package/Message.js +248 -437
- package/MessageBar.js +220 -408
- package/Modal.js +201 -365
- package/ModalLayer.js +96 -196
- package/Monogram.js +112 -204
- package/Multiselect.js +2675 -2807
- package/Number.js +178 -334
- package/Paginator.js +170 -336
- package/Paragraph.js +77 -153
- package/Popover.js +436 -623
- package/Progress.js +139 -255
- package/RadioBar.js +156 -280
- package/RadioList.js +182 -282
- package/Resize.js +173 -307
- package/ResultsMenu.js +183 -304
- package/ScreenReaderContent.js +75 -151
- package/Scroll.js +125 -267
- package/ScrollContainerContext.js +129 -201
- package/Search.js +188 -354
- package/Select.js +1243 -1248
- package/SidePanel.js +106 -214
- package/Slider.js +198 -348
- package/SlidingPanels.js +138 -280
- package/SplitButton.js +141 -273
- package/StaticContent.js +84 -168
- package/StepBar.js +138 -246
- package/Switch.js +261 -385
- package/TabBar.js +261 -398
- package/TabLayout.js +122 -238
- package/Table.js +975 -1447
- package/Text.js +335 -549
- package/TextArea.js +315 -537
- package/Tooltip.js +152 -292
- package/TransitionOpen.js +118 -242
- package/Typography.js +81 -157
- package/WaitSpinner.js +117 -209
- package/package.json +20 -21
- package/stubs-splunkui.d.ts +4 -1
- package/types/src/Breadcrumbs/Breadcrumbs.d.ts +25 -0
- package/types/src/Breadcrumbs/Item.d.ts +42 -0
- package/types/src/Breadcrumbs/docs/examples/Adornments.d.ts +2 -0
- package/types/src/Breadcrumbs/docs/examples/Basic.d.ts +2 -0
- package/types/src/Breadcrumbs/index.d.ts +2 -0
- package/types/src/Code/Code.d.ts +1 -1
- package/types/src/ComboBox/Option.d.ts +1 -1
- package/types/src/Concertina/Concertina.d.ts +4 -0
- package/types/src/Link/Link.d.ts +12 -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/Compact.d.ts +4 -0
- package/types/src/Multiselect/Multiselect.d.ts +5 -0
- package/types/src/Multiselect/Option.d.ts +1 -1
- package/types/src/Multiselect/docs/examples/CompactSelectAll.d.ts +2 -0
- 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/Select/SelectAllOption.d.ts +14 -0
- package/types/src/Select/SelectBase.d.ts +11 -3
- package/types/src/Table/Table.d.ts +4 -0
- package/types/src/Text/Text.d.ts +3 -3
- package/types/src/TextArea/TextArea.d.ts +3 -3
- package/types/src/fixtures/FetchOptions.d.ts +2 -8
- package/useForceUpdate.js +46 -110
- package/useKeyPress.js +50 -107
- package/usePrevious.js +47 -111
- package/useRovingFocus.js +53 -133
- package/types/src/Link/docs/examples/NewTab.d.ts +0 -2
- package/types/src/Typography/docs/examples/Variants.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
|
@@ -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,113 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
/******/
|
|
3
|
-
/******/ // The
|
|
4
|
-
/******/ var
|
|
5
|
-
/******/
|
|
6
|
-
|
|
7
|
-
/******/
|
|
8
|
-
/******/
|
|
9
|
-
/******/ //
|
|
10
|
-
/******/
|
|
11
|
-
/******/
|
|
12
|
-
/******/
|
|
13
|
-
/******/
|
|
14
|
-
/******/
|
|
15
|
-
/******/
|
|
16
|
-
/******/
|
|
17
|
-
/******/
|
|
1
|
+
/******/ (() => { // webpackBootstrap
|
|
2
|
+
/******/ "use strict";
|
|
3
|
+
/******/ // The require scope
|
|
4
|
+
/******/ var __webpack_require__ = {};
|
|
5
|
+
/******/
|
|
6
|
+
/************************************************************************/
|
|
7
|
+
/******/ /* webpack/runtime/define property getters */
|
|
8
|
+
/******/ (() => {
|
|
9
|
+
/******/ // define getter functions for harmony exports
|
|
10
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
11
|
+
/******/ for(var key in definition) {
|
|
12
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
13
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
14
|
+
/******/ }
|
|
15
|
+
/******/ }
|
|
16
|
+
/******/ };
|
|
17
|
+
/******/ })();
|
|
18
|
+
/******/
|
|
19
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
20
|
+
/******/ (() => {
|
|
21
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
22
|
+
/******/ })();
|
|
23
|
+
/******/
|
|
24
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
25
|
+
/******/ (() => {
|
|
26
|
+
/******/ // define __esModule on exports
|
|
27
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
28
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
29
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
30
|
+
/******/ }
|
|
31
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
18
32
|
/******/ };
|
|
19
|
-
/******/
|
|
20
|
-
/******/
|
|
21
|
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
22
|
-
/******/
|
|
23
|
-
/******/ // Flag the module as loaded
|
|
24
|
-
/******/ module.l = true;
|
|
25
|
-
/******/
|
|
26
|
-
/******/ // Return the exports of the module
|
|
27
|
-
/******/ return module.exports;
|
|
28
|
-
/******/ }
|
|
29
|
-
/******/
|
|
30
|
-
/******/
|
|
31
|
-
/******/ // expose the modules object (__webpack_modules__)
|
|
32
|
-
/******/ __webpack_require__.m = modules;
|
|
33
|
-
/******/
|
|
34
|
-
/******/ // expose the module cache
|
|
35
|
-
/******/ __webpack_require__.c = installedModules;
|
|
36
|
-
/******/
|
|
37
|
-
/******/ // define getter function for harmony exports
|
|
38
|
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
39
|
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
40
|
-
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
41
|
-
/******/ }
|
|
42
|
-
/******/ };
|
|
43
|
-
/******/
|
|
44
|
-
/******/ // define __esModule on exports
|
|
45
|
-
/******/ __webpack_require__.r = function(exports) {
|
|
46
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
47
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
48
|
-
/******/ }
|
|
49
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
|
-
/******/ };
|
|
51
|
-
/******/
|
|
52
|
-
/******/ // create a fake namespace object
|
|
53
|
-
/******/ // mode & 1: value is a module id, require it
|
|
54
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
55
|
-
/******/ // mode & 4: return value when already ns object
|
|
56
|
-
/******/ // mode & 8|1: behave like require
|
|
57
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
58
|
-
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
59
|
-
/******/ if(mode & 8) return value;
|
|
60
|
-
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
61
|
-
/******/ var ns = Object.create(null);
|
|
62
|
-
/******/ __webpack_require__.r(ns);
|
|
63
|
-
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
64
|
-
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
65
|
-
/******/ return ns;
|
|
66
|
-
/******/ };
|
|
67
|
-
/******/
|
|
68
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
69
|
-
/******/ __webpack_require__.n = function(module) {
|
|
70
|
-
/******/ var getter = module && module.__esModule ?
|
|
71
|
-
/******/ function getDefault() { return module['default']; } :
|
|
72
|
-
/******/ function getModuleExports() { return module; };
|
|
73
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
74
|
-
/******/ return getter;
|
|
75
|
-
/******/ };
|
|
76
|
-
/******/
|
|
77
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
|
78
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
79
|
-
/******/
|
|
80
|
-
/******/ // __webpack_public_path__
|
|
81
|
-
/******/ __webpack_require__.p = "";
|
|
82
|
-
/******/
|
|
83
|
-
/******/
|
|
84
|
-
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s = 242);
|
|
86
|
-
/******/ })
|
|
33
|
+
/******/ })();
|
|
34
|
+
/******/
|
|
87
35
|
/************************************************************************/
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
/***/ 2:
|
|
91
|
-
/***/ (function(module, exports) {
|
|
92
|
-
|
|
93
|
-
module.exports = require("react");
|
|
94
|
-
|
|
95
|
-
/***/ }),
|
|
96
|
-
|
|
97
|
-
/***/ 242:
|
|
98
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
99
|
-
|
|
100
|
-
"use strict";
|
|
36
|
+
var __webpack_exports__ = {};
|
|
101
37
|
// ESM COMPAT FLAG
|
|
102
38
|
__webpack_require__.r(__webpack_exports__);
|
|
103
39
|
|
|
104
40
|
// EXPORTS
|
|
105
|
-
__webpack_require__.d(__webpack_exports__,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
var external_react_ = __webpack_require__(2);
|
|
41
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
42
|
+
"default": () => (/* reexport */ useForceUpdate_useForceUpdate)
|
|
43
|
+
});
|
|
109
44
|
|
|
110
|
-
|
|
45
|
+
;// CONCATENATED MODULE: external "react"
|
|
46
|
+
const external_react_namespaceObject = require("react");
|
|
47
|
+
;// CONCATENATED MODULE: ./src/useForceUpdate/useForceUpdate.tsx
|
|
111
48
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
112
49
|
|
|
113
50
|
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."); }
|
|
@@ -131,7 +68,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
131
68
|
|
|
132
69
|
function useForceUpdate() {
|
|
133
70
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
134
|
-
var _useReducer =
|
|
71
|
+
var _useReducer = (0,external_react_namespaceObject.useReducer)(function (x) {
|
|
135
72
|
return x + 1;
|
|
136
73
|
}, 0),
|
|
137
74
|
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
@@ -141,11 +78,10 @@ function useForceUpdate() {
|
|
|
141
78
|
return forceUpdate;
|
|
142
79
|
}
|
|
143
80
|
|
|
144
|
-
/* harmony default export */
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
81
|
+
/* harmony default export */ const useForceUpdate_useForceUpdate = (useForceUpdate);
|
|
82
|
+
;// CONCATENATED MODULE: ./src/useForceUpdate/index.ts
|
|
148
83
|
|
|
149
|
-
/***/ })
|
|
150
84
|
|
|
151
|
-
|
|
85
|
+
module.exports = __webpack_exports__;
|
|
86
|
+
/******/ })()
|
|
87
|
+
;
|
package/useKeyPress.js
CHANGED
|
@@ -1,100 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
/******/
|
|
3
|
-
/******/ // The
|
|
4
|
-
/******/ var
|
|
5
|
-
/******/
|
|
6
|
-
|
|
7
|
-
/******/
|
|
8
|
-
/******/
|
|
9
|
-
/******/ //
|
|
10
|
-
/******/
|
|
11
|
-
/******/
|
|
12
|
-
/******/
|
|
13
|
-
/******/
|
|
14
|
-
/******/
|
|
15
|
-
/******/
|
|
16
|
-
/******/
|
|
17
|
-
/******/
|
|
1
|
+
/******/ (() => { // webpackBootstrap
|
|
2
|
+
/******/ "use strict";
|
|
3
|
+
/******/ // The require scope
|
|
4
|
+
/******/ var __webpack_require__ = {};
|
|
5
|
+
/******/
|
|
6
|
+
/************************************************************************/
|
|
7
|
+
/******/ /* webpack/runtime/define property getters */
|
|
8
|
+
/******/ (() => {
|
|
9
|
+
/******/ // define getter functions for harmony exports
|
|
10
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
11
|
+
/******/ for(var key in definition) {
|
|
12
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
13
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
14
|
+
/******/ }
|
|
15
|
+
/******/ }
|
|
16
|
+
/******/ };
|
|
17
|
+
/******/ })();
|
|
18
|
+
/******/
|
|
19
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
20
|
+
/******/ (() => {
|
|
21
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
22
|
+
/******/ })();
|
|
23
|
+
/******/
|
|
24
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
25
|
+
/******/ (() => {
|
|
26
|
+
/******/ // define __esModule on exports
|
|
27
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
28
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
29
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
30
|
+
/******/ }
|
|
31
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
18
32
|
/******/ };
|
|
19
|
-
/******/
|
|
20
|
-
/******/
|
|
21
|
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
22
|
-
/******/
|
|
23
|
-
/******/ // Flag the module as loaded
|
|
24
|
-
/******/ module.l = true;
|
|
25
|
-
/******/
|
|
26
|
-
/******/ // Return the exports of the module
|
|
27
|
-
/******/ return module.exports;
|
|
28
|
-
/******/ }
|
|
29
|
-
/******/
|
|
30
|
-
/******/
|
|
31
|
-
/******/ // expose the modules object (__webpack_modules__)
|
|
32
|
-
/******/ __webpack_require__.m = modules;
|
|
33
|
-
/******/
|
|
34
|
-
/******/ // expose the module cache
|
|
35
|
-
/******/ __webpack_require__.c = installedModules;
|
|
36
|
-
/******/
|
|
37
|
-
/******/ // define getter function for harmony exports
|
|
38
|
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
39
|
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
40
|
-
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
41
|
-
/******/ }
|
|
42
|
-
/******/ };
|
|
43
|
-
/******/
|
|
44
|
-
/******/ // define __esModule on exports
|
|
45
|
-
/******/ __webpack_require__.r = function(exports) {
|
|
46
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
47
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
48
|
-
/******/ }
|
|
49
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
|
-
/******/ };
|
|
51
|
-
/******/
|
|
52
|
-
/******/ // create a fake namespace object
|
|
53
|
-
/******/ // mode & 1: value is a module id, require it
|
|
54
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
55
|
-
/******/ // mode & 4: return value when already ns object
|
|
56
|
-
/******/ // mode & 8|1: behave like require
|
|
57
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
58
|
-
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
59
|
-
/******/ if(mode & 8) return value;
|
|
60
|
-
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
61
|
-
/******/ var ns = Object.create(null);
|
|
62
|
-
/******/ __webpack_require__.r(ns);
|
|
63
|
-
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
64
|
-
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
65
|
-
/******/ return ns;
|
|
66
|
-
/******/ };
|
|
67
|
-
/******/
|
|
68
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
69
|
-
/******/ __webpack_require__.n = function(module) {
|
|
70
|
-
/******/ var getter = module && module.__esModule ?
|
|
71
|
-
/******/ function getDefault() { return module['default']; } :
|
|
72
|
-
/******/ function getModuleExports() { return module; };
|
|
73
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
74
|
-
/******/ return getter;
|
|
75
|
-
/******/ };
|
|
76
|
-
/******/
|
|
77
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
|
78
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
79
|
-
/******/
|
|
80
|
-
/******/ // __webpack_public_path__
|
|
81
|
-
/******/ __webpack_require__.p = "";
|
|
82
|
-
/******/
|
|
83
|
-
/******/
|
|
84
|
-
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s = 168);
|
|
86
|
-
/******/ })
|
|
33
|
+
/******/ })();
|
|
34
|
+
/******/
|
|
87
35
|
/************************************************************************/
|
|
88
|
-
|
|
36
|
+
var __webpack_exports__ = {};
|
|
37
|
+
// ESM COMPAT FLAG
|
|
38
|
+
__webpack_require__.r(__webpack_exports__);
|
|
89
39
|
|
|
90
|
-
|
|
91
|
-
|
|
40
|
+
// EXPORTS
|
|
41
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
42
|
+
"default": () => (/* binding */ src_useKeyPress),
|
|
43
|
+
useKeyPress: () => (/* binding */ useKeyPress)
|
|
44
|
+
});
|
|
92
45
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
97
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
46
|
+
;// CONCATENATED MODULE: external "react"
|
|
47
|
+
const external_react_namespaceObject = require("react");
|
|
48
|
+
;// CONCATENATED MODULE: ./src/useKeyPress/index.ts
|
|
98
49
|
|
|
99
50
|
/**
|
|
100
51
|
* TargetKey is any key available via event.key: [https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key).
|
|
@@ -130,14 +81,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
130
81
|
*/
|
|
131
82
|
|
|
132
83
|
function useKeyPress(targetKey, handler) {
|
|
133
|
-
var handleKeyUp =
|
|
84
|
+
var handleKeyUp = (0,external_react_namespaceObject.useCallback)(function (event) {
|
|
134
85
|
if (event.key === targetKey) {
|
|
135
86
|
handler(event);
|
|
136
87
|
event.preventDefault();
|
|
137
88
|
}
|
|
138
89
|
}, [handler, targetKey]); // eslint-disable-next-line consistent-return
|
|
139
90
|
|
|
140
|
-
|
|
91
|
+
(0,external_react_namespaceObject.useEffect)(function () {
|
|
141
92
|
if (typeof window !== 'undefined') {
|
|
142
93
|
window.addEventListener('keyup', handleKeyUp);
|
|
143
94
|
return function () {
|
|
@@ -146,15 +97,7 @@ function useKeyPress(targetKey, handler) {
|
|
|
146
97
|
}
|
|
147
98
|
}, [handleKeyUp]);
|
|
148
99
|
}
|
|
149
|
-
/* harmony default export */
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
/***/ 2:
|
|
154
|
-
/***/ (function(module, exports) {
|
|
155
|
-
|
|
156
|
-
module.exports = require("react");
|
|
157
|
-
|
|
158
|
-
/***/ })
|
|
159
|
-
|
|
160
|
-
/******/ });
|
|
100
|
+
/* harmony default export */ const src_useKeyPress = (useKeyPress);
|
|
101
|
+
module.exports = __webpack_exports__;
|
|
102
|
+
/******/ })()
|
|
103
|
+
;
|
package/usePrevious.js
CHANGED
|
@@ -1,113 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
/******/
|
|
3
|
-
/******/ // The
|
|
4
|
-
/******/ var
|
|
5
|
-
/******/
|
|
6
|
-
|
|
7
|
-
/******/
|
|
8
|
-
/******/
|
|
9
|
-
/******/ //
|
|
10
|
-
/******/
|
|
11
|
-
/******/
|
|
12
|
-
/******/
|
|
13
|
-
/******/
|
|
14
|
-
/******/
|
|
15
|
-
/******/
|
|
16
|
-
/******/
|
|
17
|
-
/******/
|
|
1
|
+
/******/ (() => { // webpackBootstrap
|
|
2
|
+
/******/ "use strict";
|
|
3
|
+
/******/ // The require scope
|
|
4
|
+
/******/ var __webpack_require__ = {};
|
|
5
|
+
/******/
|
|
6
|
+
/************************************************************************/
|
|
7
|
+
/******/ /* webpack/runtime/define property getters */
|
|
8
|
+
/******/ (() => {
|
|
9
|
+
/******/ // define getter functions for harmony exports
|
|
10
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
11
|
+
/******/ for(var key in definition) {
|
|
12
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
13
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
14
|
+
/******/ }
|
|
15
|
+
/******/ }
|
|
16
|
+
/******/ };
|
|
17
|
+
/******/ })();
|
|
18
|
+
/******/
|
|
19
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
20
|
+
/******/ (() => {
|
|
21
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
22
|
+
/******/ })();
|
|
23
|
+
/******/
|
|
24
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
25
|
+
/******/ (() => {
|
|
26
|
+
/******/ // define __esModule on exports
|
|
27
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
28
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
29
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
30
|
+
/******/ }
|
|
31
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
18
32
|
/******/ };
|
|
19
|
-
/******/
|
|
20
|
-
/******/
|
|
21
|
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
22
|
-
/******/
|
|
23
|
-
/******/ // Flag the module as loaded
|
|
24
|
-
/******/ module.l = true;
|
|
25
|
-
/******/
|
|
26
|
-
/******/ // Return the exports of the module
|
|
27
|
-
/******/ return module.exports;
|
|
28
|
-
/******/ }
|
|
29
|
-
/******/
|
|
30
|
-
/******/
|
|
31
|
-
/******/ // expose the modules object (__webpack_modules__)
|
|
32
|
-
/******/ __webpack_require__.m = modules;
|
|
33
|
-
/******/
|
|
34
|
-
/******/ // expose the module cache
|
|
35
|
-
/******/ __webpack_require__.c = installedModules;
|
|
36
|
-
/******/
|
|
37
|
-
/******/ // define getter function for harmony exports
|
|
38
|
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
39
|
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
40
|
-
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
41
|
-
/******/ }
|
|
42
|
-
/******/ };
|
|
43
|
-
/******/
|
|
44
|
-
/******/ // define __esModule on exports
|
|
45
|
-
/******/ __webpack_require__.r = function(exports) {
|
|
46
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
47
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
48
|
-
/******/ }
|
|
49
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
|
-
/******/ };
|
|
51
|
-
/******/
|
|
52
|
-
/******/ // create a fake namespace object
|
|
53
|
-
/******/ // mode & 1: value is a module id, require it
|
|
54
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
55
|
-
/******/ // mode & 4: return value when already ns object
|
|
56
|
-
/******/ // mode & 8|1: behave like require
|
|
57
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
58
|
-
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
59
|
-
/******/ if(mode & 8) return value;
|
|
60
|
-
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
61
|
-
/******/ var ns = Object.create(null);
|
|
62
|
-
/******/ __webpack_require__.r(ns);
|
|
63
|
-
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
64
|
-
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
65
|
-
/******/ return ns;
|
|
66
|
-
/******/ };
|
|
67
|
-
/******/
|
|
68
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
69
|
-
/******/ __webpack_require__.n = function(module) {
|
|
70
|
-
/******/ var getter = module && module.__esModule ?
|
|
71
|
-
/******/ function getDefault() { return module['default']; } :
|
|
72
|
-
/******/ function getModuleExports() { return module; };
|
|
73
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
74
|
-
/******/ return getter;
|
|
75
|
-
/******/ };
|
|
76
|
-
/******/
|
|
77
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
|
78
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
79
|
-
/******/
|
|
80
|
-
/******/ // __webpack_public_path__
|
|
81
|
-
/******/ __webpack_require__.p = "";
|
|
82
|
-
/******/
|
|
83
|
-
/******/
|
|
84
|
-
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s = 243);
|
|
86
|
-
/******/ })
|
|
33
|
+
/******/ })();
|
|
34
|
+
/******/
|
|
87
35
|
/************************************************************************/
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
/***/ 2:
|
|
91
|
-
/***/ (function(module, exports) {
|
|
92
|
-
|
|
93
|
-
module.exports = require("react");
|
|
94
|
-
|
|
95
|
-
/***/ }),
|
|
96
|
-
|
|
97
|
-
/***/ 243:
|
|
98
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
99
|
-
|
|
100
|
-
"use strict";
|
|
36
|
+
var __webpack_exports__ = {};
|
|
101
37
|
// ESM COMPAT FLAG
|
|
102
38
|
__webpack_require__.r(__webpack_exports__);
|
|
103
39
|
|
|
104
40
|
// EXPORTS
|
|
105
|
-
__webpack_require__.d(__webpack_exports__,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
var external_react_ = __webpack_require__(2);
|
|
41
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
42
|
+
"default": () => (/* reexport */ usePrevious_usePrevious)
|
|
43
|
+
});
|
|
109
44
|
|
|
110
|
-
|
|
45
|
+
;// CONCATENATED MODULE: external "react"
|
|
46
|
+
const external_react_namespaceObject = require("react");
|
|
47
|
+
;// CONCATENATED MODULE: ./src/usePrevious/usePrevious.tsx
|
|
111
48
|
|
|
112
49
|
/**
|
|
113
50
|
* This is a private component not intended for use outside @splunk/react-ui
|
|
@@ -120,18 +57,17 @@ var external_react_ = __webpack_require__(2);
|
|
|
120
57
|
*/
|
|
121
58
|
|
|
122
59
|
function usePrevious(value) {
|
|
123
|
-
var ref =
|
|
124
|
-
|
|
60
|
+
var ref = (0,external_react_namespaceObject.useRef)();
|
|
61
|
+
(0,external_react_namespaceObject.useEffect)(function () {
|
|
125
62
|
ref.current = value;
|
|
126
63
|
}, [value]);
|
|
127
64
|
return ref.current;
|
|
128
65
|
}
|
|
129
66
|
|
|
130
|
-
/* harmony default export */
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
67
|
+
/* harmony default export */ const usePrevious_usePrevious = (usePrevious);
|
|
68
|
+
;// CONCATENATED MODULE: ./src/usePrevious/index.ts
|
|
134
69
|
|
|
135
|
-
/***/ })
|
|
136
70
|
|
|
137
|
-
|
|
71
|
+
module.exports = __webpack_exports__;
|
|
72
|
+
/******/ })()
|
|
73
|
+
;
|