@splunk/react-ui 4.21.0 → 4.22.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 +425 -325
- package/Anchor.js +147 -117
- package/Animation.js +142 -94
- package/AnimationToggle.js +197 -193
- package/Box.js +145 -118
- package/Breadcrumbs.js +288 -206
- package/Button.js +488 -465
- package/ButtonGroup.js +160 -128
- package/ButtonSimple.js +543 -462
- package/CHANGELOG.md +24 -3
- package/Calendar.js +1111 -1001
- package/Card.js +771 -598
- package/CardLayout.js +205 -147
- package/Chip.js +509 -488
- package/Clickable.js +414 -352
- package/CloseButton.js +165 -142
- package/Code.js +1807 -2084
- package/CollapsiblePanel.js +586 -519
- package/Color.js +1068 -1068
- package/ColumnLayout.js +402 -363
- package/ComboBox.js +903 -794
- package/Concertina.js +997 -802
- package/ControlGroup.js +687 -594
- package/Date.js +567 -547
- package/DefinitionList.js +308 -234
- package/Divider.js +149 -118
- package/Dropdown.js +459 -416
- package/DualListbox.js +1479 -1541
- package/EventListener.js +94 -97
- package/File.js +1051 -969
- package/FormRows.js +883 -696
- package/Heading.js +216 -193
- package/Image.js +446 -402
- package/JSONTree.js +690 -551
- package/Layer.js +437 -410
- package/Link.js +336 -255
- package/List.js +213 -161
- package/Markdown.js +509 -487
- package/Menu.js +1104 -1056
- package/Message.js +475 -441
- package/MessageBar.js +387 -373
- package/Modal.js +810 -634
- package/ModalLayer.js +326 -243
- package/Monogram.js +308 -276
- package/Multiselect.js +3564 -3364
- package/Number.js +729 -687
- package/Paginator.js +510 -449
- package/Paragraph.js +145 -112
- package/Popover.js +1459 -1432
- package/Progress.js +301 -246
- package/RadioBar.js +634 -527
- package/RadioList.js +483 -444
- package/Resize.js +530 -489
- package/ResultsMenu.js +479 -455
- package/ScreenReaderContent.js +142 -111
- package/Scroll.js +595 -456
- package/ScrollContainerContext.js +197 -206
- package/Search.js +756 -650
- package/Select.js +2446 -2345
- package/SidePanel.js +390 -284
- package/Slider.js +680 -676
- package/SlidingPanels.js +639 -503
- package/SplitButton.js +464 -367
- package/StaticContent.js +161 -133
- package/StepBar.js +386 -358
- package/Switch.js +710 -640
- package/TabBar.js +741 -680
- package/TabLayout.js +406 -322
- package/Table.js +4974 -4616
- package/Text.js +1170 -1138
- package/TextArea.js +1102 -1090
- package/Tooltip.js +624 -581
- package/TransitionOpen.js +489 -422
- package/Typography.js +176 -153
- package/WaitSpinner.js +230 -206
- package/package.json +7 -7
- package/types/src/Color/Color.d.ts +0 -1
- package/types/src/JSONTree/JSONTreeContext.d.ts +7 -0
- package/types/src/JSONTree/TreeNode.d.ts +5 -0
- package/types/src/RadioBar/RadioBar.d.ts +1 -0
- package/types/src/ResultsMenu/ResultsMenu.d.ts +0 -2
- package/types/src/Select/docs/examples/Icons.d.ts +1 -9
- package/types/src/Slider/Slider.d.ts +1 -0
- package/types/src/TabBar/Tab.d.ts +10 -1
- package/types/src/TabBar/TabBar.d.ts +4 -2
- package/types/src/Table/Head.d.ts +7 -3
- package/types/src/Table/Table.d.ts +3 -2
- package/types/src/Table/TableContext.d.ts +2 -0
- package/useForceUpdate.js +112 -82
- package/useKeyPress.js +74 -71
- package/usePrevious.js +65 -65
- package/useRovingFocus.js +122 -138
package/Date.js
CHANGED
|
@@ -1,244 +1,335 @@
|
|
|
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
|
-
const
|
|
69
|
-
var
|
|
70
|
-
|
|
71
|
-
const
|
|
72
|
-
var
|
|
73
|
-
|
|
74
|
-
const
|
|
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
|
-
|
|
103
|
-
|
|
104
|
-
}), (0,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}))
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
})
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
1
|
+
/******/ (() => {
|
|
2
|
+
// webpackBootstrap
|
|
3
|
+
/******/ "use strict";
|
|
4
|
+
/******/ // The require scope
|
|
5
|
+
/******/ var e = {};
|
|
6
|
+
/******/
|
|
7
|
+
/************************************************************************/
|
|
8
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
9
|
+
/******/ (() => {
|
|
10
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
11
|
+
/******/ e.n = t => {
|
|
12
|
+
/******/ var n = t && t.__esModule ?
|
|
13
|
+
/******/ () => t["default"]
|
|
14
|
+
/******/ : () => t
|
|
15
|
+
/******/;
|
|
16
|
+
e.d(n, {
|
|
17
|
+
a: n
|
|
18
|
+
});
|
|
19
|
+
/******/ return n;
|
|
20
|
+
/******/ };
|
|
21
|
+
/******/ })();
|
|
22
|
+
/******/
|
|
23
|
+
/******/ /* webpack/runtime/define property getters */
|
|
24
|
+
/******/ (() => {
|
|
25
|
+
/******/ // define getter functions for harmony exports
|
|
26
|
+
/******/ e.d = (t, n) => {
|
|
27
|
+
/******/ for (var a in n) {
|
|
28
|
+
/******/ if (e.o(n, a) && !e.o(t, a)) {
|
|
29
|
+
/******/ Object.defineProperty(t, a, {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: n[a]
|
|
32
|
+
});
|
|
33
|
+
/******/ }
|
|
34
|
+
/******/ }
|
|
35
|
+
/******/ };
|
|
36
|
+
/******/ })();
|
|
37
|
+
/******/
|
|
38
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
39
|
+
/******/ (() => {
|
|
40
|
+
/******/ e.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t)
|
|
41
|
+
/******/;
|
|
42
|
+
})();
|
|
43
|
+
/******/
|
|
44
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
45
|
+
/******/ (() => {
|
|
46
|
+
/******/ // define __esModule on exports
|
|
47
|
+
/******/ e.r = e => {
|
|
48
|
+
/******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
|
|
49
|
+
/******/ Object.defineProperty(e, Symbol.toStringTag, {
|
|
50
|
+
value: "Module"
|
|
51
|
+
});
|
|
52
|
+
/******/ }
|
|
53
|
+
/******/ Object.defineProperty(e, "__esModule", {
|
|
54
|
+
value: true
|
|
55
|
+
});
|
|
56
|
+
/******/ };
|
|
57
|
+
/******/ })();
|
|
58
|
+
/******/
|
|
59
|
+
/************************************************************************/ var t = {};
|
|
60
|
+
// ESM COMPAT FLAG
|
|
61
|
+
e.r(t);
|
|
62
|
+
// EXPORTS
|
|
63
|
+
e.d(t, {
|
|
64
|
+
DateWithoutTheme: () => /* reexport */ Y,
|
|
65
|
+
default: () => /* reexport */ Z
|
|
66
|
+
});
|
|
67
|
+
// CONCATENATED MODULE: external "react"
|
|
68
|
+
const n = require("react");
|
|
69
|
+
var a = e.n(n);
|
|
70
|
+
// CONCATENATED MODULE: external "prop-types"
|
|
71
|
+
const o = require("prop-types");
|
|
72
|
+
var r = e.n(o);
|
|
73
|
+
// CONCATENATED MODULE: external "lodash/has"
|
|
74
|
+
const l = require("lodash/has");
|
|
75
|
+
var i = e.n(l);
|
|
76
|
+
// CONCATENATED MODULE: external "lodash/omit"
|
|
77
|
+
const u = require("lodash/omit");
|
|
78
|
+
var s = e.n(u);
|
|
79
|
+
// CONCATENATED MODULE: external "moment"
|
|
80
|
+
const c = require("moment");
|
|
81
|
+
var p = e.n(c);
|
|
82
|
+
// CONCATENATED MODULE: external "@splunk/ui-utils/id"
|
|
83
|
+
const f = require("@splunk/ui-utils/id");
|
|
84
|
+
// CONCATENATED MODULE: external "@splunk/ui-utils/keyboard"
|
|
85
|
+
const d = require("@splunk/ui-utils/keyboard");
|
|
86
|
+
// CONCATENATED MODULE: external "@splunk/react-ui/Calendar"
|
|
87
|
+
const h = require("@splunk/react-ui/Calendar");
|
|
88
|
+
var v = e.n(h);
|
|
89
|
+
// CONCATENATED MODULE: external "@splunk/react-ui/Popover"
|
|
90
|
+
const y = require("@splunk/react-ui/Popover");
|
|
91
|
+
var m = e.n(y);
|
|
92
|
+
// CONCATENATED MODULE: external "@splunk/themes"
|
|
93
|
+
const b = require("@splunk/themes");
|
|
94
|
+
// CONCATENATED MODULE: external "styled-components"
|
|
95
|
+
const g = require("styled-components");
|
|
96
|
+
var C = e.n(g);
|
|
97
|
+
// CONCATENATED MODULE: external "@splunk/react-ui/Text"
|
|
98
|
+
const O = require("@splunk/react-ui/Text");
|
|
99
|
+
var x = e.n(O);
|
|
100
|
+
// CONCATENATED MODULE: ./src/Date/DateStyles.ts
|
|
101
|
+
var k = C()(x()).withConfig({
|
|
102
|
+
displayName: "DateStyles__StyledText",
|
|
103
|
+
componentId: "kacgdc-0"
|
|
104
|
+
})([ "cursor:", ";&[data-inline]{flex-basis:", ";width:", ";}" ], (0, b.pickVariant)("$disabled", {
|
|
105
|
+
false: "text",
|
|
106
|
+
true: "not-allowed"
|
|
107
|
+
}), (0, b.pick)({
|
|
108
|
+
enterprise: "105px",
|
|
109
|
+
prisma: "150px"
|
|
110
|
+
}), (0, b.pick)({
|
|
111
|
+
enterprise: {
|
|
112
|
+
comfortable: "105px",
|
|
113
|
+
compact: "80px"
|
|
114
|
+
},
|
|
115
|
+
prisma: "150px"
|
|
116
|
+
}));
|
|
117
|
+
var I = C().div.withConfig({
|
|
118
|
+
displayName: "DateStyles__IconContainer",
|
|
119
|
+
componentId: "kacgdc-1"
|
|
120
|
+
})([ "align-items:center;color:", ";display:flex;padding:", ";pointer-events:none;" ], (0,
|
|
121
|
+
b.pickVariant)("$disabled", {
|
|
122
|
+
false: b.variables.contentColorMuted,
|
|
123
|
+
true: b.variables.contentColorDisabled
|
|
124
|
+
}), (0, b.pick)({
|
|
125
|
+
comfortable: "0 8px",
|
|
126
|
+
compact: "0 6px"
|
|
127
|
+
}));
|
|
128
|
+
// CONCATENATED MODULE: ./src/Date/Icon.tsx
|
|
129
|
+
function T() {
|
|
130
|
+
T = Object.assign || function(e) {
|
|
131
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
132
|
+
var n = arguments[t];
|
|
133
|
+
for (var a in n) {
|
|
134
|
+
if (Object.prototype.hasOwnProperty.call(n, a)) {
|
|
135
|
+
e[a] = n[a];
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return e;
|
|
140
|
+
};
|
|
141
|
+
return T.apply(this, arguments);
|
|
142
|
+
}
|
|
143
|
+
function D(e) {
|
|
144
|
+
var t = (0, b.useSplunkTheme)(), n = t.density;
|
|
145
|
+
var o = n === "compact" ? "20px" : "24px";
|
|
146
|
+
|
|
147
|
+
return a().createElement("svg", T({
|
|
148
|
+
viewBox: "0 0 24 24",
|
|
149
|
+
width: o,
|
|
150
|
+
height: o
|
|
151
|
+
}, e), a().createElement("path", {
|
|
152
|
+
fill: "currentColor",
|
|
153
|
+
fillRule: "evenodd",
|
|
154
|
+
d: "M16.6001 2C17.1524 2 17.6001 2.44772 17.6001 3V4H19C20.1046 4 21 4.89543 21 6V8.5V9.5V19.5C21 19.7761 20.7761 20 20.5 20H3.5C3.22386 20 3 19.7761 3 19.5V9.5V8.5V6C3 4.89543 3.89543 4 5 4H6.6001V3C6.6001 2.44772 7.04781 2 7.6001 2C8.15238 2 8.6001 2.44772 8.6001 3V4H15.6001V3C15.6001 2.44772 16.0478 2 16.6001 2ZM6.6001 6C6.6001 6.55228 7.04781 7 7.6001 7C8.15238 7 8.6001 6.55228 8.6001 6H15.6001C15.6001 6.55228 16.0478 7 16.6001 7C17.1524 7 17.6001 6.55228 17.6001 6H19V8H5L5 6H6.6001ZM19 10H5V18H19V10Z"
|
|
155
|
+
}));
|
|
156
|
+
}
|
|
157
|
+
// CONCATENATED MODULE: ./src/utils/updateReactRef.ts
|
|
158
|
+
/**
|
|
144
159
|
* Updates a React ref. Callback refs and object refs (from `createRef` and `useRef`) are supported.
|
|
145
160
|
*
|
|
146
161
|
* @param ref - The React callback or object ref. Can be `null` or `undefined`.
|
|
147
162
|
* @param current - The new value of the ref.
|
|
148
163
|
*/
|
|
149
|
-
function
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
164
|
+
function S(e, t) {
|
|
165
|
+
if (e) {
|
|
166
|
+
if (typeof e === "function") {
|
|
167
|
+
e(t);
|
|
168
|
+
} else {
|
|
169
|
+
// the public signature of this util uses React.Ref<T> to mirror the way React types refs.
|
|
170
|
+
// the intention here is to signal "we will take care of setting 'current', not you".
|
|
171
|
+
e.current = t;
|
|
172
|
+
// eslint-disable-line no-param-reassign
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
// CONCATENATED MODULE: ./src/Date/Date.tsx
|
|
177
|
+
function w(e) {
|
|
178
|
+
"@babel/helpers - typeof";
|
|
179
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
180
|
+
w = function e(t) {
|
|
181
|
+
return typeof t;
|
|
182
|
+
};
|
|
183
|
+
} else {
|
|
184
|
+
w = function e(t) {
|
|
185
|
+
return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
return w(e);
|
|
157
189
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
function
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
190
|
+
function V() {
|
|
191
|
+
V = Object.assign || function(e) {
|
|
192
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
193
|
+
var n = arguments[t];
|
|
194
|
+
for (var a in n) {
|
|
195
|
+
if (Object.prototype.hasOwnProperty.call(n, a)) {
|
|
196
|
+
e[a] = n[a];
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
return e;
|
|
201
|
+
};
|
|
202
|
+
return V.apply(this, arguments);
|
|
203
|
+
}
|
|
204
|
+
function j(e, t) {
|
|
205
|
+
if (!(e instanceof t)) {
|
|
206
|
+
throw new TypeError("Cannot call a class as a function");
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
function F(e, t) {
|
|
210
|
+
for (var n = 0; n < t.length; n++) {
|
|
211
|
+
var a = t[n];
|
|
212
|
+
a.enumerable = a.enumerable || false;
|
|
213
|
+
a.configurable = true;
|
|
214
|
+
if ("value" in a) a.writable = true;
|
|
215
|
+
Object.defineProperty(e, a.key, a);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
function M(e, t, n) {
|
|
219
|
+
if (t) F(e.prototype, t);
|
|
220
|
+
if (n) F(e, n);
|
|
221
|
+
return e;
|
|
222
|
+
}
|
|
223
|
+
function _(e, t) {
|
|
224
|
+
if (typeof t !== "function" && t !== null) {
|
|
225
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
226
|
+
}
|
|
227
|
+
e.prototype = Object.create(t && t.prototype, {
|
|
228
|
+
constructor: {
|
|
229
|
+
value: e,
|
|
230
|
+
writable: true,
|
|
231
|
+
configurable: true
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
if (t) P(e, t);
|
|
235
|
+
}
|
|
236
|
+
function P(e, t) {
|
|
237
|
+
P = Object.setPrototypeOf || function e(t, n) {
|
|
238
|
+
t.__proto__ = n;
|
|
239
|
+
return t;
|
|
240
|
+
};
|
|
241
|
+
return P(e, t);
|
|
242
|
+
}
|
|
243
|
+
function q(e) {
|
|
244
|
+
var t = H();
|
|
245
|
+
return function n() {
|
|
246
|
+
var a = K(e), o;
|
|
247
|
+
if (t) {
|
|
248
|
+
var r = K(this).constructor;
|
|
249
|
+
o = Reflect.construct(a, arguments, r);
|
|
250
|
+
} else {
|
|
251
|
+
o = a.apply(this, arguments);
|
|
252
|
+
}
|
|
253
|
+
return E(this, o);
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
function E(e, t) {
|
|
257
|
+
if (t && (w(t) === "object" || typeof t === "function")) {
|
|
258
|
+
return t;
|
|
259
|
+
}
|
|
260
|
+
return R(e);
|
|
261
|
+
}
|
|
262
|
+
function R(e) {
|
|
263
|
+
if (e === void 0) {
|
|
264
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
265
|
+
}
|
|
266
|
+
return e;
|
|
267
|
+
}
|
|
268
|
+
function H() {
|
|
269
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
270
|
+
if (Reflect.construct.sham) return false;
|
|
271
|
+
if (typeof Proxy === "function") return true;
|
|
272
|
+
try {
|
|
273
|
+
Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
|
|
274
|
+
return true;
|
|
275
|
+
} catch (e) {
|
|
276
|
+
return false;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
function K(e) {
|
|
280
|
+
K = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
|
|
281
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
282
|
+
};
|
|
283
|
+
return K(e);
|
|
284
|
+
}
|
|
285
|
+
function W(e, t, n) {
|
|
286
|
+
if (t in e) {
|
|
287
|
+
Object.defineProperty(e, t, {
|
|
288
|
+
value: n,
|
|
289
|
+
enumerable: true,
|
|
290
|
+
configurable: true,
|
|
291
|
+
writable: true
|
|
292
|
+
});
|
|
293
|
+
} else {
|
|
294
|
+
e[t] = n;
|
|
295
|
+
}
|
|
296
|
+
return e;
|
|
297
|
+
}
|
|
298
|
+
var A = {
|
|
299
|
+
defaultValue: r().string,
|
|
300
|
+
describedBy: r().string,
|
|
301
|
+
disabled: r().bool,
|
|
302
|
+
elementRef: r().oneOfType([ r().func, r().object ]),
|
|
303
|
+
error: r().bool,
|
|
304
|
+
highlightToday: r().bool,
|
|
305
|
+
inline: r().bool,
|
|
306
|
+
inputId: r().string,
|
|
307
|
+
inputOnly: r().bool,
|
|
308
|
+
labelledBy: r().string,
|
|
309
|
+
locale: r().string,
|
|
310
|
+
name: r().string,
|
|
311
|
+
onBlur: r().func,
|
|
312
|
+
onChange: r().func,
|
|
313
|
+
onClick: r().func,
|
|
314
|
+
onFocus: r().func,
|
|
315
|
+
onKeyDown: r().func,
|
|
316
|
+
/** @private */
|
|
317
|
+
splunkTheme: r().object,
|
|
318
|
+
value: r().string
|
|
319
|
+
};
|
|
320
|
+
var B = {
|
|
321
|
+
disabled: false,
|
|
322
|
+
error: false,
|
|
323
|
+
highlightToday: false,
|
|
324
|
+
inline: true,
|
|
325
|
+
inputOnly: false,
|
|
326
|
+
locale: "en_US"
|
|
327
|
+
};
|
|
328
|
+
var Y = function(e) {
|
|
329
|
+
_(n, e);
|
|
330
|
+
var t = q(n);
|
|
331
|
+
// @docs-props-type DatePropsBase
|
|
332
|
+
/**
|
|
242
333
|
* This static value can be used to convert a moment date to a compatible string
|
|
243
334
|
* to set the `value` prop.
|
|
244
335
|
* ```
|
|
@@ -248,319 +339,248 @@ var _Date = /*#__PURE__*/function (_Component) {
|
|
|
248
339
|
* @name momentFormat
|
|
249
340
|
* @memberOf Date
|
|
250
341
|
* @type string
|
|
251
|
-
*/
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
342
|
+
*/ function n(e) {
|
|
343
|
+
var a;
|
|
344
|
+
j(this, n);
|
|
345
|
+
a = t.call(this, e);
|
|
346
|
+
W(R(a), "controlledExternally", void 0);
|
|
347
|
+
W(R(a), "focusCalledInternally", false);
|
|
348
|
+
W(R(a), "popoverId", void 0);
|
|
349
|
+
W(R(a), "calendar", null);
|
|
350
|
+
W(R(a), "openWithFocus", false);
|
|
351
|
+
W(R(a), "applyTextChange", (function(e) {
|
|
352
|
+
var t = p()(a.state.tempTextInputDate, "l", a.props.locale);
|
|
353
|
+
if (t.isValid()) {
|
|
354
|
+
a.handleDateChange(e, {
|
|
355
|
+
value: t.format(Y.momentFormat)
|
|
356
|
+
}, "textInput");
|
|
357
|
+
} else {
|
|
358
|
+
a.setState({
|
|
359
|
+
calendarOpen: false,
|
|
360
|
+
tempTextInputDate: undefined
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
}));
|
|
364
|
+
W(R(a), "handleDateChange", (function(e, t, n) {
|
|
365
|
+
var o = t.value;
|
|
366
|
+
if (n !== "textInput") {
|
|
367
|
+
a.focusCalledInternally = true;
|
|
368
|
+
a.focus();
|
|
369
|
+
}
|
|
370
|
+
if (a.getValue() !== o) {
|
|
371
|
+
var r, l;
|
|
372
|
+
a.setState({
|
|
373
|
+
calendarOpen: false,
|
|
374
|
+
tempTextInputDate: undefined,
|
|
375
|
+
value: a.isControlled() ? undefined : o
|
|
376
|
+
});
|
|
377
|
+
var i = a.props.name;
|
|
378
|
+
(r = (l = a.props).onChange) === null || r === void 0 ? void 0 : r.call(l, e, {
|
|
379
|
+
value: o,
|
|
380
|
+
name: i
|
|
381
|
+
});
|
|
382
|
+
} else {
|
|
383
|
+
a.setState({
|
|
384
|
+
calendarOpen: false
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
}));
|
|
388
|
+
W(R(a), "handleFocus", (function(e) {
|
|
389
|
+
var t, n;
|
|
390
|
+
if (a.focusCalledInternally) {
|
|
391
|
+
a.focusCalledInternally = false;
|
|
392
|
+
} else if (!a.props.inputOnly) {
|
|
393
|
+
a.setState({
|
|
394
|
+
calendarOpen: true
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
(t = (n = a.props).onFocus) === null || t === void 0 ? void 0 : t.call(n, e);
|
|
398
|
+
}));
|
|
399
|
+
W(R(a), "handleClick", (function(e) {
|
|
400
|
+
var t, n, o;
|
|
401
|
+
if (document.activeElement !== a.state.input && ((t = a.state.anchor) === null || t === void 0 ? void 0 : t.contains(e.target))) {
|
|
402
|
+
a.focus();
|
|
403
|
+
}
|
|
404
|
+
if (!a.props.inputOnly && !a.state.calendarOpen) {
|
|
405
|
+
a.setState({
|
|
406
|
+
calendarOpen: true
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
(n = (o = a.props).onClick) === null || n === void 0 ? void 0 : n.call(o, e);
|
|
410
|
+
}));
|
|
411
|
+
W(R(a), "handleInputChange", (function(e, t) {
|
|
412
|
+
var n = t.value;
|
|
413
|
+
a.setState({
|
|
414
|
+
tempTextInputDate: n,
|
|
415
|
+
calendarOpen: !a.props.inputOnly
|
|
416
|
+
});
|
|
417
|
+
}));
|
|
418
|
+
W(R(a), "handleKeyDown", (function(e) {
|
|
419
|
+
var t, n;
|
|
420
|
+
var o = (0, d.keycode)(e.nativeEvent);
|
|
421
|
+
if (o === "enter" || o === "tab") {
|
|
422
|
+
a.applyTextChange(e);
|
|
423
|
+
} else if (!a.props.inputOnly && o === "down") {
|
|
424
|
+
e.preventDefault();
|
|
425
|
+
if (!a.state.calendarOpen) {
|
|
426
|
+
a.openWithFocus = true;
|
|
427
|
+
a.setState({
|
|
428
|
+
calendarOpen: true
|
|
429
|
+
});
|
|
430
|
+
} else if (a.calendar) {
|
|
431
|
+
a.calendar.focusActiveDay();
|
|
432
|
+
}
|
|
433
|
+
} else if (o === "esc") {
|
|
434
|
+
a.setState({
|
|
435
|
+
calendarOpen: false,
|
|
436
|
+
tempTextInputDate: undefined
|
|
437
|
+
});
|
|
438
|
+
a.focus();
|
|
439
|
+
}
|
|
440
|
+
(t = (n = a.props).onKeyDown) === null || t === void 0 ? void 0 : t.call(n, e);
|
|
441
|
+
}));
|
|
442
|
+
W(R(a), "handleMount", (function(e) {
|
|
443
|
+
a.setState({
|
|
444
|
+
anchor: e
|
|
445
|
+
});
|
|
446
|
+
S(a.props.elementRef, e);
|
|
447
|
+
}));
|
|
448
|
+
W(R(a), "handleInputMount", (function(e) {
|
|
449
|
+
a.setState({
|
|
450
|
+
input: e
|
|
451
|
+
});
|
|
452
|
+
}));
|
|
453
|
+
W(R(a), "handleCalendarMount", (function(e) {
|
|
454
|
+
a.calendar = e;
|
|
455
|
+
}));
|
|
456
|
+
W(R(a), "handleRequestClose", (function(e) {
|
|
457
|
+
var t = e.event, n = e.reason;
|
|
458
|
+
if ((n === "clickAway" || n === "escapeKey") && t !== undefined && t.target !== a.state.anchor) {
|
|
459
|
+
a.applyTextChange(t);
|
|
460
|
+
if (n === "escapeKey") {
|
|
461
|
+
a.focusCalledInternally = true;
|
|
462
|
+
a.focus();
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}));
|
|
466
|
+
a.controlledExternally = i()(e, "value");
|
|
467
|
+
var o = a.isControlled() ? e.value : e.defaultValue || p()().locale(e.locale).format(Y.momentFormat);
|
|
468
|
+
a.state = {
|
|
469
|
+
anchor: null,
|
|
470
|
+
calendarOpen: false,
|
|
471
|
+
input: null,
|
|
472
|
+
value: a.isControlled() ? undefined : o
|
|
473
|
+
};
|
|
474
|
+
a.popoverId = (0, f.createDOMID)("calendar");
|
|
475
|
+
if (false) {}
|
|
476
|
+
if (false) {}
|
|
477
|
+
return a;
|
|
371
478
|
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
(_this$props$onKeyDown = (_this$props4 = _this.props).onKeyDown) === null || _this$props$onKeyDown === void 0 ? void 0 : _this$props$onKeyDown.call(_this$props4, e);
|
|
382
|
-
});
|
|
383
|
-
|
|
384
|
-
_defineProperty(_assertThisInitialized(_this), "handleMount", function (el) {
|
|
385
|
-
_this.setState({
|
|
386
|
-
anchor: el
|
|
387
|
-
});
|
|
388
|
-
|
|
389
|
-
updateReactRef(_this.props.elementRef, el);
|
|
390
|
-
});
|
|
391
|
-
|
|
392
|
-
_defineProperty(_assertThisInitialized(_this), "handleInputMount", function (el) {
|
|
393
|
-
_this.setState({
|
|
394
|
-
input: el
|
|
395
|
-
});
|
|
396
|
-
});
|
|
397
|
-
|
|
398
|
-
_defineProperty(_assertThisInitialized(_this), "handleCalendarMount", function (el) {
|
|
399
|
-
_this.calendar = el;
|
|
400
|
-
});
|
|
401
|
-
|
|
402
|
-
_defineProperty(_assertThisInitialized(_this), "handleRequestClose", function (_ref3) {
|
|
403
|
-
var event = _ref3.event,
|
|
404
|
-
reason = _ref3.reason;
|
|
405
|
-
|
|
406
|
-
if ((reason === 'clickAway' || reason === 'escapeKey') && event !== undefined && event.target !== _this.state.anchor) {
|
|
407
|
-
_this.applyTextChange(event);
|
|
408
|
-
|
|
409
|
-
if (reason === 'escapeKey') {
|
|
410
|
-
_this.focusCalledInternally = true;
|
|
411
|
-
|
|
412
|
-
_this.focus();
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
});
|
|
416
|
-
|
|
417
|
-
_this.controlledExternally = has_default()(props, 'value');
|
|
418
|
-
var dateString = _this.isControlled() ? props.value : props.defaultValue || external_moment_default()().locale(props.locale).format(_Date.momentFormat);
|
|
419
|
-
_this.state = {
|
|
420
|
-
anchor: null,
|
|
421
|
-
calendarOpen: false,
|
|
422
|
-
input: null,
|
|
423
|
-
value: _this.isControlled() ? undefined : dateString
|
|
424
|
-
};
|
|
425
|
-
_this.popoverId = (0,id_namespaceObject.createDOMID)('calendar');
|
|
426
|
-
|
|
427
|
-
if (false) {}
|
|
428
|
-
|
|
429
|
-
if (false) {}
|
|
430
|
-
|
|
431
|
-
return _this;
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
_createClass(Date, [{
|
|
435
|
-
key: "componentDidUpdate",
|
|
436
|
-
value: function componentDidUpdate(prevProps, prevState) {
|
|
437
|
-
if (false) {}
|
|
438
|
-
|
|
439
|
-
if (false) {}
|
|
440
|
-
|
|
441
|
-
if (false) {}
|
|
442
|
-
/**
|
|
479
|
+
M(n, [ {
|
|
480
|
+
key: "componentDidUpdate",
|
|
481
|
+
value: function e(t, n) {
|
|
482
|
+
if (false) {}
|
|
483
|
+
if (false) {}
|
|
484
|
+
if (false) {}
|
|
485
|
+
/**
|
|
443
486
|
* If `openWithFocus` and `calendarOpen` are set the user is attempting to navigate to the dropdown, but it's closed.
|
|
444
487
|
* On the first update following the state change set focus to the active day within the calendar.
|
|
445
|
-
*/
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
value: function isControlled() {
|
|
468
|
-
return this.controlledExternally;
|
|
469
|
-
}
|
|
470
|
-
/**
|
|
488
|
+
*/ if (this.openWithFocus && this.state.calendarOpen && n.calendarOpen !== this.state.calendarOpen) {
|
|
489
|
+
var a;
|
|
490
|
+
this.openWithFocus = false;
|
|
491
|
+
(a = this.calendar) === null || a === void 0 ? void 0 : a.focusActiveDay();
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}, {
|
|
495
|
+
key: "getValue",
|
|
496
|
+
value: function e() {
|
|
497
|
+
return this.isControlled() ? this.props.value : this.state.value;
|
|
498
|
+
}
|
|
499
|
+
}, {
|
|
500
|
+
key: "getTextInputValue",
|
|
501
|
+
value: function e() {
|
|
502
|
+
return this.state.tempTextInputDate === undefined ? p()(this.getValue(), Y.momentFormat, this.props.locale).format("l") : this.state.tempTextInputDate;
|
|
503
|
+
}
|
|
504
|
+
}, {
|
|
505
|
+
key: "isControlled",
|
|
506
|
+
value: function e() {
|
|
507
|
+
return this.controlledExternally;
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
471
510
|
* Place focus on the input.
|
|
472
|
-
*/
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
_defineProperty(_Date, "validateValue", function (value) {
|
|
549
|
-
if (!external_moment_default()(value, _Date.momentFormat).isValid()) {
|
|
550
|
-
// eslint-disable-next-line no-console
|
|
551
|
-
console.error("Invalid date string value \"".concat(value, "\" provided to Moment."));
|
|
552
|
-
}
|
|
553
|
-
});
|
|
554
|
-
|
|
555
|
-
var DateWithThemeBase = (0,themes_namespaceObject.withSplunkTheme)(_Date);
|
|
556
|
-
var DateWithTheme = DateWithThemeBase;
|
|
557
|
-
DateWithTheme.propTypes = _Date.propTypes;
|
|
558
|
-
DateWithTheme.momentFormat = _Date.momentFormat;
|
|
559
|
-
/* harmony default export */ const Date_Date = (DateWithTheme);
|
|
560
|
-
|
|
561
|
-
;// CONCATENATED MODULE: ./src/Date/index.ts
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
module.exports = __webpack_exports__;
|
|
565
|
-
/******/ })()
|
|
566
|
-
;
|
|
511
|
+
*/ }, {
|
|
512
|
+
key: "focus",
|
|
513
|
+
value: function e() {
|
|
514
|
+
var t;
|
|
515
|
+
(t = this.state.input) === null || t === void 0 ? void 0 : t.focus();
|
|
516
|
+
}
|
|
517
|
+
}, {
|
|
518
|
+
key: "render",
|
|
519
|
+
value: function e() {
|
|
520
|
+
var t = this.props, n = t.disabled, o = t.highlightToday, r = t.inputOnly, l = t.locale, i = t.splunkTheme;
|
|
521
|
+
var u = i.isPrisma;
|
|
522
|
+
var c = this.getValue();
|
|
523
|
+
var p = u && !r && a().createElement(I, {
|
|
524
|
+
"aria-hidden": true,
|
|
525
|
+
$disabled: n
|
|
526
|
+
}, a().createElement(D, null));
|
|
527
|
+
var f;
|
|
528
|
+
var d = {};
|
|
529
|
+
if (!r) {
|
|
530
|
+
d.role = "combobox";
|
|
531
|
+
d["aria-controls"] = this.state.calendarOpen ? this.popoverId : undefined;
|
|
532
|
+
d["aria-expanded"] = n ? false : this.state.calendarOpen;
|
|
533
|
+
d["aria-haspopup"] = true;
|
|
534
|
+
f = a().createElement(m(), {
|
|
535
|
+
anchor: this.state.anchor,
|
|
536
|
+
id: this.popoverId,
|
|
537
|
+
open: n ? false : this.state.calendarOpen,
|
|
538
|
+
onRequestClose: this.handleRequestClose
|
|
539
|
+
}, a().createElement(v(), {
|
|
540
|
+
ref: this.handleCalendarMount,
|
|
541
|
+
highlightToday: o,
|
|
542
|
+
locale: l,
|
|
543
|
+
onChange: this.handleDateChange,
|
|
544
|
+
value: c
|
|
545
|
+
}));
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
return a().createElement(k, V({
|
|
549
|
+
autoCapitalize: "off",
|
|
550
|
+
autoComplete: "off",
|
|
551
|
+
autoCorrect: "off",
|
|
552
|
+
spellCheck: false,
|
|
553
|
+
"data-test": "date",
|
|
554
|
+
"data-test-value": c,
|
|
555
|
+
"data-test-popover-id": this.popoverId,
|
|
556
|
+
elementRef: this.handleMount,
|
|
557
|
+
inputRef: this.handleInputMount,
|
|
558
|
+
onChange: this.handleInputChange,
|
|
559
|
+
onClick: this.handleClick,
|
|
560
|
+
onFocus: this.handleFocus,
|
|
561
|
+
onKeyDown: this.handleKeyDown,
|
|
562
|
+
value: this.getTextInputValue(),
|
|
563
|
+
startAdornment: p,
|
|
564
|
+
$disabled: n
|
|
565
|
+
}, d, s()(this.props, "className", "defaultValue", "elementRef", "inputOnly", "multiline", "locale", "onChange", "onClick", "onFocus", "onKeyDown", "onSelect", "spellCheck", "value")), f);
|
|
566
|
+
}
|
|
567
|
+
} ]);
|
|
568
|
+
return n;
|
|
569
|
+
}(n.Component);
|
|
570
|
+
W(Y, "propTypes", A);
|
|
571
|
+
W(Y, "defaultProps", B);
|
|
572
|
+
W(Y, "momentFormat", "YYYY-MM-DD");
|
|
573
|
+
W(Y, "validateValue", (function(e) {
|
|
574
|
+
if (!p()(e, Y.momentFormat).isValid()) {
|
|
575
|
+
// eslint-disable-next-line no-console
|
|
576
|
+
console.error('Invalid date string value "'.concat(e, '" provided to Moment.'));
|
|
577
|
+
}
|
|
578
|
+
}));
|
|
579
|
+
var $ = (0, b.withSplunkTheme)(Y);
|
|
580
|
+
var N = $;
|
|
581
|
+
N.propTypes = Y.propTypes;
|
|
582
|
+
N.momentFormat = Y.momentFormat;
|
|
583
|
+
/* harmony default export */ const Z = N;
|
|
584
|
+
// CONCATENATED MODULE: ./src/Date/index.ts
|
|
585
|
+
module.exports = t;
|
|
586
|
+
/******/})();
|