@splunk/react-ui 4.37.0 → 4.39.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 +131 -153
- package/Anchor.js +50 -58
- package/Animation.js +64 -59
- package/AnimationToggle.js +59 -61
- package/Box.js +59 -67
- package/Breadcrumbs.js +113 -127
- package/Button.js +208 -219
- package/ButtonGroup.js +41 -49
- package/ButtonSimple.js +264 -295
- package/CHANGELOG.md +50 -1
- package/Calendar.js +353 -414
- package/Card.js +183 -243
- package/CardLayout.js +86 -83
- package/Chip.js +104 -122
- package/Clickable.js +180 -198
- package/CloseButton.js +52 -60
- package/Code.js +24 -31
- package/CollapsiblePanel.js +172 -202
- package/Color.js +1107 -980
- package/ColumnLayout.js +72 -96
- package/ComboBox.js +267 -305
- package/Concertina.js +406 -454
- package/ControlGroup.js +165 -194
- package/Date.js +116 -131
- package/DefinitionList.js +125 -149
- package/Divider.js +81 -79
- package/Dropdown.js +226 -237
- package/DualListbox.js +150 -186
- package/EventListener.js +4 -1
- package/File.js +1032 -955
- package/FormRows.js +281 -334
- package/Heading.js +27 -35
- package/Image.js +101 -116
- package/JSONTree.js +301 -344
- package/Layer.js +118 -126
- package/Link.js +141 -159
- package/List.js +61 -77
- package/MIGRATION.mdx +92 -38
- package/Markdown.js +288 -347
- package/Menu.js +512 -530
- package/Message.js +173 -196
- package/MessageBar.js +58 -66
- package/Modal.js +241 -290
- package/ModalLayer.js +130 -148
- package/Monogram.js +138 -138
- package/Multiselect.js +1600 -1923
- package/Number.js +159 -178
- package/Paginator.js +296 -335
- package/Paragraph.js +24 -32
- package/Popover.js +448 -441
- package/Progress.js +65 -75
- package/RadioBar.js +301 -303
- package/RadioList.js +77 -119
- package/Resize.js +105 -127
- package/ResultsMenu.js +373 -385
- package/ScreenReaderContent.js +130 -94
- package/Scroll.js +209 -244
- package/Search.js +375 -384
- package/Select.js +1076 -1354
- package/SidePanel.js +122 -142
- package/Slider.js +192 -222
- package/SlidingPanels.js +238 -270
- package/SplitButton.js +222 -245
- package/StaticContent.js +68 -76
- package/StepBar.js +206 -205
- package/Switch.js +211 -236
- package/TabBar.js +222 -258
- package/TabLayout.js +114 -139
- package/Table.js +2017 -2180
- package/Text.js +401 -512
- package/TextArea.js +411 -441
- package/Tooltip.js +116 -132
- package/TransitionOpen.js +160 -178
- package/Tree.js +268 -287
- package/Typography.js +48 -52
- package/WaitSpinner.js +60 -68
- package/cypress/support/commands.ts +9 -0
- package/cypress/support/index.d.ts +6 -0
- package/cypress/tsconfig.cypress.json +1 -0
- package/docker-compose.yml +0 -1
- package/package.json +17 -17
- package/types/src/Button/Button.d.ts +20 -6
- package/types/src/ButtonSimple/ButtonSimple.d.ts +2 -2
- package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +1 -1
- package/types/src/Color/Color.d.ts +5 -2
- package/types/src/Color/Palette.d.ts +6 -2
- package/types/src/ComboBox/Option.d.ts +1 -1
- package/types/src/ControlGroup/ControlGroup.d.ts +1 -2
- package/types/src/Date/Date.d.ts +2 -3
- package/types/src/File/File.d.ts +2 -3
- package/types/src/File/Retry.d.ts +1 -2
- package/types/src/Link/Link.d.ts +3 -4
- package/types/src/Menu/Item.d.ts +24 -8
- package/types/src/Menu/Menu.d.ts +3 -3
- package/types/src/Menu/docs/examples/Adornments.d.ts +2 -0
- package/types/src/Menu/docs/examples/SelectableWithAdornments.d.ts +2 -0
- package/types/src/ModalLayer/ModalLayer.d.ts +1 -1
- package/types/src/Multiselect/Option.d.ts +2 -0
- package/types/src/Number/Number.d.ts +3 -3
- package/types/src/Popover/Popover.d.ts +3 -4
- package/types/src/RadioBar/RadioBar.d.ts +2 -2
- package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
- package/types/src/ScrollContainerContext/ScrollContainerContext.d.ts +2 -2
- package/types/src/Search/Option.d.ts +16 -3
- package/types/src/Select/Option.d.ts +3 -1
- package/types/src/Select/OptionBase.d.ts +7 -5
- package/types/src/Select/Select.d.ts +2 -2
- package/types/src/Select/SelectAllOption.d.ts +4 -4
- package/types/src/Select/SelectBase.d.ts +0 -1
- package/types/src/SidePanel/SidePanel.d.ts +1 -1
- package/types/src/Slider/Slider.d.ts +2 -3
- package/types/src/Slider/docs/examples/Error.d.ts +2 -0
- package/types/src/SlidingPanels/SlidingPanels.d.ts +1 -1
- package/types/src/StepBar/Step.d.ts +1 -2
- package/types/src/TabBar/Tab.d.ts +1 -1
- package/types/src/TabBar/TabBar.d.ts +3 -1
- package/types/src/TabLayout/TabLayout.d.ts +2 -0
- package/types/src/Table/HeadDropdownCell.d.ts +2 -0
- package/types/src/Table/Table.d.ts +0 -1
- package/types/src/Table/docs/examples/StripeRows.d.ts +2 -0
- package/types/src/Text/IconOutlinedHide.d.ts +1 -2
- package/types/src/Text/IconOutlinedView.d.ts +1 -2
- package/types/src/Text/Text.d.ts +6 -4
- package/types/src/Text/docs/examples/Dimmed.d.ts +2 -0
- package/types/src/TextArea/TextArea.d.ts +2 -2
- package/types/src/Tooltip/Tooltip.d.ts +4 -4
- package/types/src/TransitionOpen/TransitionOpen.d.ts +1 -1
- package/useForceUpdate.js +30 -32
- package/useKeyPress.js +1 -1
- package/types/src/Button/docs/examples/Selected.d.ts +0 -2
- package/types/src/ButtonGroup/docs/examples/prisma/Basic.d.ts +0 -1
- package/types/src/File/docs/examples/prisma/Error.d.ts +0 -1
- package/types/src/Menu/docs/examples/Icons.d.ts +0 -2
- package/types/src/Menu/docs/examples/SelectableWithIcons.d.ts +0 -2
- package/types/src/Slider/docs/examples/prisma/Error.d.ts +0 -2
- package/types/src/TabBar/docs/examples/prisma/Context.d.ts +0 -2
- package/types/src/TabLayout/docs/examples/prisma/Context.d.ts +0 -2
- package/types/src/Table/docs/examples/prisma/Basic.d.ts +0 -2
- /package/types/src/Date/docs/examples/{prisma/WithoutCalendar.d.ts → WithoutCalendar.d.ts} +0 -0
- /package/types/src/Message/docs/examples/{prisma/Title.d.ts → Title.d.ts} +0 -0
- /package/types/src/StepBar/docs/examples/{prisma/Error.d.ts → Error.d.ts} +0 -0
- /package/types/src/TabBar/docs/examples/{prisma/Disabled.d.ts → Disabled.d.ts} +0 -0
package/Date.js
CHANGED
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
e.r(t);
|
|
62
62
|
// EXPORTS
|
|
63
63
|
e.d(t, {
|
|
64
|
-
DateWithoutTheme: () => /* reexport */
|
|
65
|
-
default: () => /* reexport */
|
|
64
|
+
DateWithoutTheme: () => /* reexport */ N,
|
|
65
|
+
default: () => /* reexport */ z
|
|
66
66
|
});
|
|
67
67
|
// CONCATENATED MODULE: external "react"
|
|
68
68
|
const n = require("react");
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
},
|
|
115
115
|
prisma: "150px"
|
|
116
116
|
}));
|
|
117
|
-
var
|
|
117
|
+
var w = C().div.withConfig({
|
|
118
118
|
displayName: "DateStyles__IconContainer",
|
|
119
119
|
componentId: "kacgdc-1"
|
|
120
120
|
})([ "align-items:center;color:", ";display:flex;padding:", ";pointer-events:none;" ], (0,
|
|
@@ -127,20 +127,17 @@
|
|
|
127
127
|
}));
|
|
128
128
|
// CONCATENATED MODULE: ./src/Date/Icon.tsx
|
|
129
129
|
function T() {
|
|
130
|
-
T = Object.assign
|
|
130
|
+
return T = Object.assign ? Object.assign.bind() : function(e) {
|
|
131
131
|
for (var t = 1; t < arguments.length; t++) {
|
|
132
132
|
var n = arguments[t];
|
|
133
133
|
for (var a in n) {
|
|
134
|
-
|
|
135
|
-
e[a] = n[a];
|
|
136
|
-
}
|
|
134
|
+
({}).hasOwnProperty.call(n, a) && (e[a] = n[a]);
|
|
137
135
|
}
|
|
138
136
|
}
|
|
139
137
|
return e;
|
|
140
|
-
};
|
|
141
|
-
return T.apply(this, arguments);
|
|
138
|
+
}, T.apply(null, arguments);
|
|
142
139
|
}
|
|
143
|
-
function
|
|
140
|
+
function I(e) {
|
|
144
141
|
var t = (0, b.useSplunkTheme)(), n = t.density;
|
|
145
142
|
var o = n === "compact" ? "20px" : "24px";
|
|
146
143
|
|
|
@@ -174,128 +171,115 @@
|
|
|
174
171
|
}
|
|
175
172
|
}
|
|
176
173
|
// CONCATENATED MODULE: ./src/Date/Date.tsx
|
|
177
|
-
function
|
|
174
|
+
function D(e) {
|
|
178
175
|
"@babel/helpers - typeof";
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}
|
|
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);
|
|
176
|
+
return D = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
|
|
177
|
+
return typeof e;
|
|
178
|
+
} : function(e) {
|
|
179
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
180
|
+
}, D(e);
|
|
189
181
|
}
|
|
190
182
|
function V() {
|
|
191
|
-
V = Object.assign
|
|
183
|
+
return V = Object.assign ? Object.assign.bind() : function(e) {
|
|
192
184
|
for (var t = 1; t < arguments.length; t++) {
|
|
193
185
|
var n = arguments[t];
|
|
194
186
|
for (var a in n) {
|
|
195
|
-
|
|
196
|
-
e[a] = n[a];
|
|
197
|
-
}
|
|
187
|
+
({}).hasOwnProperty.call(n, a) && (e[a] = n[a]);
|
|
198
188
|
}
|
|
199
189
|
}
|
|
200
190
|
return e;
|
|
201
|
-
};
|
|
202
|
-
return V.apply(this, arguments);
|
|
191
|
+
}, V.apply(null, arguments);
|
|
203
192
|
}
|
|
204
193
|
function j(e, t) {
|
|
205
|
-
if (!(e instanceof t))
|
|
206
|
-
throw new TypeError("Cannot call a class as a function");
|
|
207
|
-
}
|
|
194
|
+
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
|
|
208
195
|
}
|
|
209
|
-
function
|
|
196
|
+
function P(e, t) {
|
|
210
197
|
for (var n = 0; n < t.length; n++) {
|
|
211
198
|
var a = t[n];
|
|
212
|
-
a.enumerable = a.enumerable ||
|
|
213
|
-
a.
|
|
214
|
-
if ("value" in a) a.writable = true;
|
|
215
|
-
Object.defineProperty(e, a.key, a);
|
|
199
|
+
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0),
|
|
200
|
+
Object.defineProperty(e, W(a.key), a);
|
|
216
201
|
}
|
|
217
202
|
}
|
|
218
|
-
function
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
203
|
+
function F(e, t, n) {
|
|
204
|
+
return t && P(e.prototype, t), n && P(e, n), Object.defineProperty(e, "prototype", {
|
|
205
|
+
writable: !1
|
|
206
|
+
}), e;
|
|
222
207
|
}
|
|
223
|
-
function
|
|
224
|
-
if (typeof t !== "
|
|
225
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
226
|
-
}
|
|
208
|
+
function M(e, t) {
|
|
209
|
+
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
|
|
227
210
|
e.prototype = Object.create(t && t.prototype, {
|
|
228
211
|
constructor: {
|
|
229
212
|
value: e,
|
|
230
|
-
writable:
|
|
231
|
-
configurable:
|
|
213
|
+
writable: !0,
|
|
214
|
+
configurable: !0
|
|
232
215
|
}
|
|
233
|
-
})
|
|
234
|
-
|
|
216
|
+
}), Object.defineProperty(e, "prototype", {
|
|
217
|
+
writable: !1
|
|
218
|
+
}), t && _(e, t);
|
|
235
219
|
}
|
|
236
|
-
function
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
};
|
|
241
|
-
return P(e, t);
|
|
220
|
+
function _(e, t) {
|
|
221
|
+
return _ = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
222
|
+
return e.__proto__ = t, e;
|
|
223
|
+
}, _(e, t);
|
|
242
224
|
}
|
|
243
|
-
function
|
|
225
|
+
function E(e) {
|
|
244
226
|
var t = H();
|
|
245
|
-
return function
|
|
246
|
-
var a = K(e)
|
|
227
|
+
return function() {
|
|
228
|
+
var n, a = K(e);
|
|
247
229
|
if (t) {
|
|
248
|
-
var
|
|
249
|
-
|
|
250
|
-
} else
|
|
251
|
-
|
|
252
|
-
}
|
|
253
|
-
return R(this, o);
|
|
230
|
+
var o = K(this).constructor;
|
|
231
|
+
n = Reflect.construct(a, arguments, o);
|
|
232
|
+
} else n = a.apply(this, arguments);
|
|
233
|
+
return q(this, n);
|
|
254
234
|
};
|
|
255
235
|
}
|
|
256
|
-
function
|
|
257
|
-
if (t && (
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
return E(e);
|
|
236
|
+
function q(e, t) {
|
|
237
|
+
if (t && ("object" == D(t) || "function" == typeof t)) return t;
|
|
238
|
+
if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
|
|
239
|
+
return R(e);
|
|
261
240
|
}
|
|
262
|
-
function
|
|
263
|
-
if (
|
|
264
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
265
|
-
}
|
|
241
|
+
function R(e) {
|
|
242
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
266
243
|
return e;
|
|
267
244
|
}
|
|
268
245
|
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
246
|
try {
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
return
|
|
277
|
-
}
|
|
247
|
+
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
|
|
248
|
+
} catch (e) {}
|
|
249
|
+
return (H = function t() {
|
|
250
|
+
return !!e;
|
|
251
|
+
})();
|
|
278
252
|
}
|
|
279
253
|
function K(e) {
|
|
280
|
-
K = Object.setPrototypeOf ? Object.getPrototypeOf : function
|
|
281
|
-
return
|
|
282
|
-
};
|
|
283
|
-
return K(e);
|
|
254
|
+
return K = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
255
|
+
return e.__proto__ || Object.getPrototypeOf(e);
|
|
256
|
+
}, K(e);
|
|
284
257
|
}
|
|
285
|
-
function
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
258
|
+
function B(e, t, n) {
|
|
259
|
+
return (t = W(t)) in e ? Object.defineProperty(e, t, {
|
|
260
|
+
value: n,
|
|
261
|
+
enumerable: !0,
|
|
262
|
+
configurable: !0,
|
|
263
|
+
writable: !0
|
|
264
|
+
}) : e[t] = n, e;
|
|
265
|
+
}
|
|
266
|
+
function W(e) {
|
|
267
|
+
var t = A(e, "string");
|
|
268
|
+
return "symbol" == D(t) ? t : t + "";
|
|
269
|
+
}
|
|
270
|
+
function A(e, t) {
|
|
271
|
+
if ("object" != D(e) || !e) return e;
|
|
272
|
+
var n = e[Symbol.toPrimitive];
|
|
273
|
+
if (void 0 !== n) {
|
|
274
|
+
var a = n.call(e, t || "default");
|
|
275
|
+
if ("object" != D(a)) return a;
|
|
276
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
295
277
|
}
|
|
296
|
-
return e;
|
|
278
|
+
return ("string" === t ? String : Number)(e);
|
|
297
279
|
}
|
|
298
|
-
|
|
280
|
+
/** @public */
|
|
281
|
+
/** @public */
|
|
282
|
+
/** @public */ var Y = {
|
|
299
283
|
defaultValue: r().string,
|
|
300
284
|
describedBy: r().string,
|
|
301
285
|
disabled: r().bool,
|
|
@@ -317,7 +301,7 @@
|
|
|
317
301
|
splunkTheme: r().object,
|
|
318
302
|
value: r().string
|
|
319
303
|
};
|
|
320
|
-
var
|
|
304
|
+
var $ = {
|
|
321
305
|
disabled: false,
|
|
322
306
|
error: false,
|
|
323
307
|
highlightToday: false,
|
|
@@ -325,9 +309,9 @@
|
|
|
325
309
|
inputOnly: false,
|
|
326
310
|
locale: "en_US"
|
|
327
311
|
};
|
|
328
|
-
var
|
|
329
|
-
|
|
330
|
-
var t =
|
|
312
|
+
var N = function(e) {
|
|
313
|
+
M(n, e);
|
|
314
|
+
var t = E(n);
|
|
331
315
|
// @docs-props-type DatePropsBase
|
|
332
316
|
/**
|
|
333
317
|
* This static value can be used to convert a moment date to a compatible string
|
|
@@ -343,16 +327,16 @@
|
|
|
343
327
|
var a;
|
|
344
328
|
j(this, n);
|
|
345
329
|
a = t.call(this, e);
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
330
|
+
B(R(a), "controlledExternally", void 0);
|
|
331
|
+
B(R(a), "focusCalledInternally", false);
|
|
332
|
+
B(R(a), "popoverId", void 0);
|
|
333
|
+
B(R(a), "calendar", null);
|
|
334
|
+
B(R(a), "openWithFocus", false);
|
|
335
|
+
B(R(a), "applyTextChange", (function(e) {
|
|
352
336
|
var t = p()(a.state.tempTextInputDate, "l", a.props.locale);
|
|
353
337
|
if (t.isValid()) {
|
|
354
338
|
a.handleDateChange(e, {
|
|
355
|
-
value: t.format(
|
|
339
|
+
value: t.format(n.momentFormat)
|
|
356
340
|
}, "textInput");
|
|
357
341
|
} else {
|
|
358
342
|
a.setState({
|
|
@@ -361,7 +345,7 @@
|
|
|
361
345
|
});
|
|
362
346
|
}
|
|
363
347
|
}));
|
|
364
|
-
|
|
348
|
+
B(R(a), "handleDateChange", (function(e, t, n) {
|
|
365
349
|
var o = t.value;
|
|
366
350
|
if (n !== "textInput") {
|
|
367
351
|
a.focusCalledInternally = true;
|
|
@@ -385,7 +369,7 @@
|
|
|
385
369
|
});
|
|
386
370
|
}
|
|
387
371
|
}));
|
|
388
|
-
|
|
372
|
+
B(R(a), "handleFocus", (function(e, t) {
|
|
389
373
|
var n, o;
|
|
390
374
|
if (a.focusCalledInternally) {
|
|
391
375
|
a.focusCalledInternally = false;
|
|
@@ -396,7 +380,7 @@
|
|
|
396
380
|
}
|
|
397
381
|
(n = (o = a.props).onFocus) === null || n === void 0 ? void 0 : n.call(o, e, t);
|
|
398
382
|
}));
|
|
399
|
-
|
|
383
|
+
B(R(a), "handleClick", (function(e) {
|
|
400
384
|
var t, n;
|
|
401
385
|
if (!a.props.inputOnly && !a.state.calendarOpen) {
|
|
402
386
|
a.setState({
|
|
@@ -405,14 +389,14 @@
|
|
|
405
389
|
}
|
|
406
390
|
(t = (n = a.props).onClick) === null || t === void 0 ? void 0 : t.call(n, e);
|
|
407
391
|
}));
|
|
408
|
-
|
|
392
|
+
B(R(a), "handleInputChange", (function(e, t) {
|
|
409
393
|
var n = t.value;
|
|
410
394
|
a.setState({
|
|
411
395
|
tempTextInputDate: n,
|
|
412
396
|
calendarOpen: !a.props.inputOnly
|
|
413
397
|
});
|
|
414
398
|
}));
|
|
415
|
-
|
|
399
|
+
B(R(a), "handleKeyDown", (function(e) {
|
|
416
400
|
var t, n;
|
|
417
401
|
var o = (0, d.keycode)(e.nativeEvent);
|
|
418
402
|
if (o === "enter" || o === "tab") {
|
|
@@ -436,21 +420,21 @@
|
|
|
436
420
|
}
|
|
437
421
|
(t = (n = a.props).onKeyDown) === null || t === void 0 ? void 0 : t.call(n, e);
|
|
438
422
|
}));
|
|
439
|
-
|
|
423
|
+
B(R(a), "handleMount", (function(e) {
|
|
440
424
|
a.setState({
|
|
441
425
|
anchor: e
|
|
442
426
|
});
|
|
443
427
|
S(a.props.elementRef, e);
|
|
444
428
|
}));
|
|
445
|
-
|
|
429
|
+
B(R(a), "handleInputMount", (function(e) {
|
|
446
430
|
a.setState({
|
|
447
431
|
input: e
|
|
448
432
|
});
|
|
449
433
|
}));
|
|
450
|
-
|
|
434
|
+
B(R(a), "handleCalendarMount", (function(e) {
|
|
451
435
|
a.calendar = e;
|
|
452
436
|
}));
|
|
453
|
-
|
|
437
|
+
B(R(a), "handleRequestClose", (function(e) {
|
|
454
438
|
var t = e.event, n = e.reason;
|
|
455
439
|
if ((n === "clickAway" || n === "escapeKey") && t !== undefined && t.target !== a.state.anchor) {
|
|
456
440
|
a.applyTextChange(t);
|
|
@@ -461,7 +445,7 @@
|
|
|
461
445
|
}
|
|
462
446
|
}));
|
|
463
447
|
a.controlledExternally = i()(e, "value");
|
|
464
|
-
var o = a.isControlled() ? e.value : e.defaultValue || p()().locale(e.locale).format(
|
|
448
|
+
var o = a.isControlled() ? e.value : e.defaultValue || p()().locale(e.locale).format(n.momentFormat);
|
|
465
449
|
a.state = {
|
|
466
450
|
anchor: null,
|
|
467
451
|
calendarOpen: false,
|
|
@@ -473,7 +457,7 @@
|
|
|
473
457
|
if (false) {}
|
|
474
458
|
return a;
|
|
475
459
|
}
|
|
476
|
-
|
|
460
|
+
F(n, [ {
|
|
477
461
|
key: "componentDidUpdate",
|
|
478
462
|
value: function e(t, n) {
|
|
479
463
|
if (false) {}
|
|
@@ -496,7 +480,7 @@
|
|
|
496
480
|
}, {
|
|
497
481
|
key: "getTextInputValue",
|
|
498
482
|
value: function e() {
|
|
499
|
-
return this.state.tempTextInputDate === undefined ? p()(this.getValue(),
|
|
483
|
+
return this.state.tempTextInputDate === undefined ? p()(this.getValue(), n.momentFormat, this.props.locale).format("l") : this.state.tempTextInputDate;
|
|
500
484
|
}
|
|
501
485
|
}, {
|
|
502
486
|
key: "isControlled",
|
|
@@ -517,10 +501,10 @@
|
|
|
517
501
|
var t = this.props, n = t.disabled, o = t.highlightToday, r = t.inputOnly, l = t.locale, i = t.splunkTheme;
|
|
518
502
|
var u = i.isPrisma;
|
|
519
503
|
var c = this.getValue();
|
|
520
|
-
var p = u && !r && a().createElement(
|
|
504
|
+
var p = u && !r && a().createElement(w, {
|
|
521
505
|
"aria-hidden": true,
|
|
522
506
|
$disabled: n
|
|
523
|
-
}, a().createElement(
|
|
507
|
+
}, a().createElement(I, null));
|
|
524
508
|
var f;
|
|
525
509
|
var d = {};
|
|
526
510
|
if (!r) {
|
|
@@ -564,20 +548,21 @@
|
|
|
564
548
|
} ]);
|
|
565
549
|
return n;
|
|
566
550
|
}(n.Component);
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
if (!p()(e,
|
|
551
|
+
B(N, "propTypes", Y);
|
|
552
|
+
B(N, "defaultProps", $);
|
|
553
|
+
B(N, "momentFormat", "YYYY-MM-DD");
|
|
554
|
+
B(N, "validateValue", (function(e) {
|
|
555
|
+
if (!p()(e, N.momentFormat).isValid()) {
|
|
572
556
|
// eslint-disable-next-line no-console
|
|
573
557
|
console.error('Invalid date string value "'.concat(e, '" provided to Moment.'));
|
|
574
558
|
}
|
|
575
559
|
}));
|
|
576
|
-
var
|
|
577
|
-
var
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
/* harmony default export */ const
|
|
581
|
-
//
|
|
560
|
+
var Z = (0, b.withSplunkTheme)(N);
|
|
561
|
+
var U = Z;
|
|
562
|
+
U.propTypes = N.propTypes;
|
|
563
|
+
U.momentFormat = N.momentFormat;
|
|
564
|
+
/* harmony default export */ const z = U;
|
|
565
|
+
// only for styled components using Date
|
|
566
|
+
// CONCATENATED MODULE: ./src/Date/index.ts
|
|
582
567
|
module.exports = t;
|
|
583
568
|
/******/})();
|