@splunk/react-ui 4.42.0 → 4.44.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/ButtonGroup.js +10 -11
- package/ButtonSimple.js +209 -209
- package/CHANGELOG.md +41 -0
- package/Clickable.js +1 -1
- package/Code.js +611 -426
- package/ComboBox.js +25 -32
- package/Date.js +42 -27
- package/Dropdown.js +1 -1
- package/DualListbox.js +1 -1
- package/JSONTree.js +30 -24
- package/MIGRATION.mdx +70 -54
- package/Menu.js +13 -9
- package/Multiselect.js +1 -1
- package/Number.js +345 -317
- package/Paginator.js +269 -251
- package/Popover.js +412 -345
- package/RadioList.js +44 -43
- package/ResultsMenu.d.ts +2 -0
- package/Search.js +56 -65
- package/Select.js +1 -1
- package/Slider.js +17 -13
- package/StaticContent.js +15 -13
- package/TabBar.js +4 -0
- package/Table.js +162 -153
- package/TransitionOpen.js +16 -14
- package/Tree.d.ts +2 -0
- package/Tree.js +20 -14
- package/package.json +6 -6
- package/types/src/Button/Button.d.ts +1 -0
- package/types/src/Code/Code.d.ts +1 -1
- package/types/src/ComboBox/ComboBox.d.ts +6 -3
- package/types/src/Date/Date.d.ts +3 -3
- package/types/src/Dropdown/docs/examples/TooltipButtonToggle.d.ts +2 -0
- package/types/src/Multiselect/Multiselect.d.ts +2 -0
- package/types/src/Number/Number.d.ts +4 -10
- package/types/src/Number/utils.d.ts +29 -0
- package/types/src/Paginator/Paginator.d.ts +15 -2
- package/types/src/Paginator/docs/examples/CustomPages.d.ts +2 -0
- package/types/src/Popover/Popover.d.ts +17 -8
- package/types/src/Popover/PopoverMenuContext.d.ts +6 -0
- package/types/src/Popover/PopoverProvider.d.ts +23 -0
- package/types/src/Popover/index.d.ts +2 -1
- package/types/src/RadioList/RadioList.d.ts +1 -1
- package/types/src/Select/SelectBase.d.ts +1 -1
- package/types/src/Select/docs/examples/Appearance.d.ts +1 -11
- package/types/src/Select/docs/examples/Basic.d.ts +1 -9
- package/types/src/Select/docs/examples/Children.d.ts +1 -9
- package/types/src/Select/docs/examples/Descriptions.d.ts +1 -9
- package/types/src/Select/docs/examples/Fetching.d.ts +1 -22
- package/types/src/Select/docs/examples/Filter.d.ts +1 -9
- package/types/src/Select/docs/examples/Headings.d.ts +1 -9
- package/types/src/Select/docs/examples/LoadMoreOnScrollBottom.d.ts +1 -24
- package/types/src/Select/docs/examples/Prefix.d.ts +1 -9
- package/types/src/Select/docs/examples/Truncate.d.ts +1 -9
- package/types/src/Slider/Slider.d.ts +1 -1
- package/types/src/StaticContent/StaticContent.d.ts +3 -1
- package/types/src/Table/docs/examples/Click.d.ts +2 -16
- package/types/src/Table/docs/examples/ClickRows.d.ts +2 -16
- package/types/src/Table/docs/examples/Complex.d.ts +2 -50
- package/types/src/Table/docs/examples/FilterColumnValues.d.ts +1 -13
- package/types/src/Table/docs/examples/HeadDropdownCell.d.ts +1 -17
- package/types/src/Table/docs/examples/ReorderColumns.d.ts +2 -21
- package/types/src/Table/docs/examples/ReorderRows.d.ts +2 -21
- package/types/src/Table/docs/examples/Resizable.d.ts +2 -23
- package/types/src/Table/docs/examples/ResizableFill.d.ts +2 -23
- package/types/src/Table/docs/examples/RowActions.d.ts +2 -39
- package/types/src/Table/docs/examples/Selectable.d.ts +2 -18
- package/types/src/Table/docs/examples/SortableColumns.d.ts +1 -11
- package/useResizeObserver.js +122 -90
- package/types/src/Dropdown/docs/examples/OtherToggles.d.ts +0 -2
- package/types/src/Popover/PopoverContext.d.ts +0 -6
|
@@ -1,21 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
interface Row {
|
|
4
|
-
age: number;
|
|
5
|
-
email: string;
|
|
6
|
-
name: string;
|
|
7
|
-
}
|
|
8
|
-
interface Header {
|
|
9
|
-
key: 'age' | 'email' | 'name';
|
|
10
|
-
label: string;
|
|
11
|
-
}
|
|
12
|
-
interface ExampleState {
|
|
13
|
-
data: Row[];
|
|
14
|
-
headers: Header[];
|
|
15
|
-
}
|
|
16
|
-
export default class ReorderRows extends Component<{}, ExampleState> {
|
|
17
|
-
constructor(props: {});
|
|
18
|
-
handleRequestMoveRow: TableRequestMoveRowHandler;
|
|
19
|
-
render(): JSX.Element;
|
|
20
|
-
}
|
|
21
|
-
export {};
|
|
1
|
+
declare function ReorderRows(): JSX.Element;
|
|
2
|
+
export default ReorderRows;
|
|
@@ -1,23 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
interface Row {
|
|
4
|
-
age: number;
|
|
5
|
-
email: string;
|
|
6
|
-
name: string;
|
|
7
|
-
}
|
|
8
|
-
interface Header {
|
|
9
|
-
key: 'age' | 'email' | 'name';
|
|
10
|
-
label: string;
|
|
11
|
-
minWidth: number;
|
|
12
|
-
width: number;
|
|
13
|
-
}
|
|
14
|
-
interface ExampleState {
|
|
15
|
-
data: Row[];
|
|
16
|
-
headers: Header[];
|
|
17
|
-
}
|
|
18
|
-
export default class Resizable extends Component<{}, ExampleState> {
|
|
19
|
-
constructor(props: {});
|
|
20
|
-
handleResizeColumn: TableRequestResizeColumnHandler;
|
|
21
|
-
render(): JSX.Element;
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
1
|
+
declare function Resizable(): JSX.Element;
|
|
2
|
+
export default Resizable;
|
|
@@ -1,23 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
interface Row {
|
|
4
|
-
age: number;
|
|
5
|
-
email: string;
|
|
6
|
-
name: string;
|
|
7
|
-
}
|
|
8
|
-
interface Header {
|
|
9
|
-
key: 'age' | 'email' | 'name';
|
|
10
|
-
label: string;
|
|
11
|
-
minWidth: number;
|
|
12
|
-
width: number | 'auto';
|
|
13
|
-
}
|
|
14
|
-
interface ExampleState {
|
|
15
|
-
data: Row[];
|
|
16
|
-
headers: Header[];
|
|
17
|
-
}
|
|
18
|
-
export default class Resizable extends Component<{}, ExampleState> {
|
|
19
|
-
constructor(props: {});
|
|
20
|
-
handleResizeColumn: TableRequestResizeColumnHandler;
|
|
21
|
-
render(): JSX.Element;
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
1
|
+
declare function ResizableFill(): JSX.Element;
|
|
2
|
+
export default ResizableFill;
|
|
@@ -1,39 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
interface Row {
|
|
4
|
-
age: number;
|
|
5
|
-
country: string;
|
|
6
|
-
email: string;
|
|
7
|
-
favoriteColor: string;
|
|
8
|
-
favoriteDay: string;
|
|
9
|
-
industry: string;
|
|
10
|
-
name: string;
|
|
11
|
-
occupation: string;
|
|
12
|
-
state: string;
|
|
13
|
-
}
|
|
14
|
-
interface Column {
|
|
15
|
-
label: string;
|
|
16
|
-
name: keyof Row;
|
|
17
|
-
visible: boolean;
|
|
18
|
-
}
|
|
19
|
-
interface ExampleState {
|
|
20
|
-
columns: Column[];
|
|
21
|
-
data: Row[];
|
|
22
|
-
primaryAction?: string;
|
|
23
|
-
primaryActionRowData?: string;
|
|
24
|
-
secondaryAction?: string;
|
|
25
|
-
secondaryActionRowData?: string;
|
|
26
|
-
}
|
|
27
|
-
export default class TableAction extends Component<{}, ExampleState> {
|
|
28
|
-
constructor(props: {});
|
|
29
|
-
handleRowClick: () => void;
|
|
30
|
-
handleShowHide: (e: React.MouseEvent, { name }: {
|
|
31
|
-
name: string;
|
|
32
|
-
}) => void;
|
|
33
|
-
handleEditActionClick: RowActionPrimaryClickHandler;
|
|
34
|
-
handleSaveActionClick: RowActionSecondaryClickHandler;
|
|
35
|
-
handleAddActionClick: RowActionSecondaryClickHandler;
|
|
36
|
-
handleDeleteActionClick: RowActionSecondaryClickHandler;
|
|
37
|
-
render(): JSX.Element;
|
|
38
|
-
}
|
|
39
|
-
export {};
|
|
1
|
+
declare function RowAction(): JSX.Element;
|
|
2
|
+
export default RowAction;
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
interface Row {
|
|
4
|
-
email: string;
|
|
5
|
-
name: string;
|
|
6
|
-
selected: boolean;
|
|
7
|
-
}
|
|
8
|
-
interface ExampleState {
|
|
9
|
-
data: Row[];
|
|
10
|
-
}
|
|
11
|
-
export default class Selectable extends Component<{}, ExampleState> {
|
|
12
|
-
constructor(props: {});
|
|
13
|
-
handleToggle: RowRequestToggleHandler;
|
|
14
|
-
handleToggleAll: () => void;
|
|
15
|
-
rowSelectionState(data: Row[]): "none" | "all" | "some";
|
|
16
|
-
render(): JSX.Element;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
1
|
+
declare function Selectable(): JSX.Element;
|
|
2
|
+
export default Selectable;
|
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { HeadCellSortHandler } from '@splunk/react-ui/Table';
|
|
3
|
-
interface ExampleState {
|
|
4
|
-
sortDir: 'asc' | 'desc';
|
|
5
|
-
sortKey: 'email' | 'name';
|
|
6
|
-
}
|
|
7
|
-
declare class SortableColumns extends Component<{}, ExampleState> {
|
|
8
|
-
constructor(props: {});
|
|
9
|
-
handleSort: HeadCellSortHandler;
|
|
10
|
-
render(): JSX.Element;
|
|
11
|
-
}
|
|
1
|
+
declare function SortableColumns(): JSX.Element;
|
|
12
2
|
export default SortableColumns;
|
package/useResizeObserver.js
CHANGED
|
@@ -1,19 +1,48 @@
|
|
|
1
1
|
/******/ (() => {
|
|
2
2
|
// webpackBootstrap
|
|
3
3
|
/******/ "use strict";
|
|
4
|
-
/******/
|
|
5
|
-
|
|
4
|
+
/******/ var e = {
|
|
5
|
+
/***/ 9497:
|
|
6
|
+
/***/ e => {
|
|
7
|
+
e.exports = require("react");
|
|
8
|
+
/***/
|
|
9
|
+
/******/ }
|
|
10
|
+
};
|
|
11
|
+
/************************************************************************/
|
|
12
|
+
/******/ // The module cache
|
|
13
|
+
/******/ var r = {};
|
|
14
|
+
/******/
|
|
15
|
+
/******/ // The require function
|
|
16
|
+
/******/ function t(n) {
|
|
17
|
+
/******/ // Check if module is in cache
|
|
18
|
+
/******/ var o = r[n];
|
|
19
|
+
/******/ if (o !== undefined) {
|
|
20
|
+
/******/ return o.exports;
|
|
21
|
+
/******/ }
|
|
22
|
+
/******/ // Create a new module (and put it into the cache)
|
|
23
|
+
/******/ var i = r[n] = {
|
|
24
|
+
/******/ // no module.id needed
|
|
25
|
+
/******/ // no module.loaded needed
|
|
26
|
+
/******/ exports: {}
|
|
27
|
+
/******/ };
|
|
28
|
+
/******/
|
|
29
|
+
/******/ // Execute the module function
|
|
30
|
+
/******/ e[n](i, i.exports, t);
|
|
31
|
+
/******/
|
|
32
|
+
/******/ // Return the exports of the module
|
|
33
|
+
/******/ return i.exports;
|
|
34
|
+
/******/ }
|
|
6
35
|
/******/
|
|
7
36
|
/************************************************************************/
|
|
8
37
|
/******/ /* webpack/runtime/define property getters */
|
|
9
38
|
/******/ (() => {
|
|
10
39
|
/******/ // define getter functions for harmony exports
|
|
11
|
-
/******/
|
|
12
|
-
/******/ for (var n in
|
|
13
|
-
/******/ if (
|
|
14
|
-
/******/ Object.defineProperty(
|
|
40
|
+
/******/ t.d = (e, r) => {
|
|
41
|
+
/******/ for (var n in r) {
|
|
42
|
+
/******/ if (t.o(r, n) && !t.o(e, n)) {
|
|
43
|
+
/******/ Object.defineProperty(e, n, {
|
|
15
44
|
enumerable: true,
|
|
16
|
-
get:
|
|
45
|
+
get: r[n]
|
|
17
46
|
});
|
|
18
47
|
/******/ }
|
|
19
48
|
/******/ }
|
|
@@ -22,14 +51,14 @@
|
|
|
22
51
|
/******/
|
|
23
52
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
24
53
|
/******/ (() => {
|
|
25
|
-
/******/
|
|
54
|
+
/******/ t.o = (e, r) => Object.prototype.hasOwnProperty.call(e, r)
|
|
26
55
|
/******/;
|
|
27
56
|
})();
|
|
28
57
|
/******/
|
|
29
58
|
/******/ /* webpack/runtime/make namespace object */
|
|
30
59
|
/******/ (() => {
|
|
31
60
|
/******/ // define __esModule on exports
|
|
32
|
-
/******/
|
|
61
|
+
/******/ t.r = e => {
|
|
33
62
|
/******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
|
|
34
63
|
/******/ Object.defineProperty(e, Symbol.toStringTag, {
|
|
35
64
|
value: "Module"
|
|
@@ -41,97 +70,100 @@
|
|
|
41
70
|
/******/ };
|
|
42
71
|
/******/ })();
|
|
43
72
|
/******/
|
|
44
|
-
/************************************************************************/ var
|
|
45
|
-
//
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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 i(e, r) {
|
|
61
|
-
if (e) {
|
|
62
|
-
if ("string" == typeof e) return u(e, r);
|
|
63
|
-
var t = {}.toString.call(e).slice(8, -1);
|
|
64
|
-
return "Object" === t && e.constructor && (t = e.constructor.name), "Map" === t || "Set" === t ? Array.from(e) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? u(e, r) : void 0;
|
|
73
|
+
/************************************************************************/ var n = {};
|
|
74
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
75
|
+
(() => {
|
|
76
|
+
// ESM COMPAT FLAG
|
|
77
|
+
t.r(n);
|
|
78
|
+
// EXPORTS
|
|
79
|
+
t.d(n, {
|
|
80
|
+
default: () => /* reexport */ c
|
|
81
|
+
});
|
|
82
|
+
// EXTERNAL MODULE: external "react"
|
|
83
|
+
var e = t(9497);
|
|
84
|
+
// CONCATENATED MODULE: ./src/useResizeObserver/useResizeObserver.ts
|
|
85
|
+
function r(e, r) {
|
|
86
|
+
return a(e) || l(e, r) || i(e, r) || o();
|
|
65
87
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
(null == r || r > e.length) && (r = e.length);
|
|
69
|
-
for (var t = 0, n = Array(r); t < r; t++) {
|
|
70
|
-
n[t] = e[t];
|
|
88
|
+
function o() {
|
|
89
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
71
90
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
91
|
+
function i(e, r) {
|
|
92
|
+
if (e) {
|
|
93
|
+
if ("string" == typeof e) return u(e, r);
|
|
94
|
+
var t = {}.toString.call(e).slice(8, -1);
|
|
95
|
+
return "Object" === t && e.constructor && (t = e.constructor.name), "Map" === t || "Set" === t ? Array.from(e) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? u(e, r) : void 0;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
function u(e, r) {
|
|
99
|
+
(null == r || r > e.length) && (r = e.length);
|
|
100
|
+
for (var t = 0, n = Array(r); t < r; t++) {
|
|
101
|
+
n[t] = e[t];
|
|
102
|
+
}
|
|
103
|
+
return n;
|
|
104
|
+
}
|
|
105
|
+
function l(e, r) {
|
|
106
|
+
var t = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
|
|
107
|
+
if (null != t) {
|
|
108
|
+
var n, o, i, u, l = [], a = !0, f = !1;
|
|
87
109
|
try {
|
|
88
|
-
if (
|
|
110
|
+
if (i = (t = t.call(e)).next, 0 === r) {
|
|
111
|
+
if (Object(t) !== t) return;
|
|
112
|
+
a = !1;
|
|
113
|
+
} else for (;!(a = (n = i.call(t)).done) && (l.push(n.value), l.length !== r); a = !0) {
|
|
114
|
+
}
|
|
115
|
+
} catch (e) {
|
|
116
|
+
f = !0, o = e;
|
|
89
117
|
} finally {
|
|
90
|
-
|
|
118
|
+
try {
|
|
119
|
+
if (!a && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
120
|
+
} finally {
|
|
121
|
+
if (f) throw o;
|
|
122
|
+
}
|
|
91
123
|
}
|
|
124
|
+
return l;
|
|
92
125
|
}
|
|
93
|
-
return l;
|
|
94
126
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
/**
|
|
127
|
+
function a(e) {
|
|
128
|
+
if (Array.isArray(e)) return e;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
100
131
|
* Watches a React ref element for changes in size.
|
|
101
132
|
*
|
|
102
133
|
* @param ref - The React ref to observe size changes on
|
|
103
|
-
*/
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
if (e) {
|
|
121
|
-
t.observe(e);
|
|
122
|
-
}
|
|
123
|
-
return function() {
|
|
134
|
+
*/ var f = function t(n) {
|
|
135
|
+
var o = (0, e.useState)({
|
|
136
|
+
width: 0,
|
|
137
|
+
height: 0
|
|
138
|
+
}), i = r(o, 2), u = i[0], l = i[1];
|
|
139
|
+
(0, e.useEffect)((function() {
|
|
140
|
+
var e = n.current;
|
|
141
|
+
if (typeof window !== "undefined" && window.ResizeObserver) {
|
|
142
|
+
var r = new ResizeObserver((function(e) {
|
|
143
|
+
if (e[0]) {
|
|
144
|
+
var r, t;
|
|
145
|
+
l({
|
|
146
|
+
width: (n === null || n === void 0 ? void 0 : (r = n.current) === null || r === void 0 ? void 0 : r.getBoundingClientRect().width) || 0,
|
|
147
|
+
height: (n === null || n === void 0 ? void 0 : (t = n.current) === null || t === void 0 ? void 0 : t.getBoundingClientRect().height) || 0
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
}));
|
|
124
151
|
if (e) {
|
|
125
|
-
|
|
152
|
+
r.observe(e);
|
|
126
153
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
154
|
+
return function() {
|
|
155
|
+
if (e) {
|
|
156
|
+
r.unobserve(e);
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
// Return a no-op function to satisfy consistent-return rule
|
|
161
|
+
return function() {};
|
|
162
|
+
}), [ n ]);
|
|
163
|
+
return u;
|
|
164
|
+
};
|
|
165
|
+
/* harmony default export */ const c = f;
|
|
166
|
+
}) // CONCATENATED MODULE: ./src/useResizeObserver/index.ts
|
|
167
|
+
();
|
|
168
|
+
module.exports = n;
|
|
137
169
|
/******/})();
|