@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/Calendar.js
CHANGED
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
e.r(t);
|
|
62
62
|
// EXPORTS
|
|
63
63
|
e.d(t, {
|
|
64
|
-
calendarActiveSelector: () => /* reexport */
|
|
65
|
-
default: () => /* reexport */
|
|
64
|
+
calendarActiveSelector: () => /* reexport */ ze,
|
|
65
|
+
default: () => /* reexport */ Ue
|
|
66
66
|
});
|
|
67
67
|
// CONCATENATED MODULE: external "react"
|
|
68
68
|
const r = require("react");
|
|
@@ -71,26 +71,26 @@
|
|
|
71
71
|
const a = require("prop-types");
|
|
72
72
|
var o = e.n(a);
|
|
73
73
|
// CONCATENATED MODULE: external "lodash/keys"
|
|
74
|
-
const
|
|
75
|
-
var
|
|
74
|
+
const i = require("lodash/keys");
|
|
75
|
+
var l = e.n(i);
|
|
76
76
|
// CONCATENATED MODULE: external "lodash/omit"
|
|
77
77
|
const u = require("lodash/omit");
|
|
78
78
|
var c = e.n(u);
|
|
79
79
|
// CONCATENATED MODULE: external "moment"
|
|
80
80
|
const s = require("moment");
|
|
81
|
-
var
|
|
81
|
+
var d = e.n(s);
|
|
82
82
|
// CONCATENATED MODULE: external "@splunk/ui-utils/id"
|
|
83
|
-
const
|
|
83
|
+
const f = require("@splunk/ui-utils/id");
|
|
84
84
|
// CONCATENATED MODULE: external "lodash/times"
|
|
85
|
-
const
|
|
86
|
-
var
|
|
85
|
+
const v = require("lodash/times");
|
|
86
|
+
var p = e.n(v);
|
|
87
87
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
88
88
|
const y = require("@splunk/themes");
|
|
89
89
|
// CONCATENATED MODULE: external "@splunk/ui-utils/keyboard"
|
|
90
90
|
const h = require("@splunk/ui-utils/keyboard");
|
|
91
91
|
// CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
|
|
92
|
-
const
|
|
93
|
-
var
|
|
92
|
+
const b = require("@splunk/react-ui/ScreenReaderContent");
|
|
93
|
+
var m = e.n(b);
|
|
94
94
|
// CONCATENATED MODULE: external "styled-components"
|
|
95
95
|
const Y = require("styled-components");
|
|
96
96
|
var g = e.n(Y);
|
|
@@ -131,84 +131,59 @@
|
|
|
131
131
|
componentId: "sc-1nryhyt-2"
|
|
132
132
|
})([ "", ";cursor:pointer;", ";", ";" ], y.mixins.reset("table-cell"), (0, y.pickVariant)("$today", {
|
|
133
133
|
true: {
|
|
134
|
-
enterprise: (0, Y.css)([ "& > ", "{background-color:", ";}&:focus{& > ", "{box-shadow:", ";}}" ],
|
|
135
|
-
|
|
136
|
-
D, (0, y.pick)({
|
|
134
|
+
enterprise: (0, Y.css)([ "& > ", "{background-color:", ";}&:focus{& > ", "{box-shadow:", ";}}" ], /* sc-sel */ D, (0,
|
|
135
|
+
y.pick)({
|
|
137
136
|
light: y.variables.gray92,
|
|
138
137
|
dark: y.variables.gray45
|
|
139
|
-
}),
|
|
140
|
-
/* sc-sel */
|
|
141
|
-
D, y.variables.focusShadow),
|
|
142
|
-
prisma: (0, Y.css)([ "& > ", "{box-shadow:inset 0 0 0 1px ", ";}&:focus{& > ", "{box-shadow:inset 0 0 0 1px ", ",", ";}}" ],
|
|
143
|
-
/* sc-sel */
|
|
144
|
-
D, y.variables.interactiveColorBorder,
|
|
145
|
-
/* sc-sel */
|
|
146
|
-
D, y.variables.interactiveColorBorder, y.variables.focusShadow)
|
|
138
|
+
}), /* sc-sel */ D, y.variables.focusShadow),
|
|
139
|
+
prisma: (0, Y.css)([ "& > ", "{box-shadow:inset 0 0 0 1px ", ";}&:focus{& > ", "{box-shadow:inset 0 0 0 1px ", ",", ";}}" ], /* sc-sel */ D, y.variables.interactiveColorBorder, /* sc-sel */ D, y.variables.interactiveColorBorder, y.variables.focusShadow)
|
|
147
140
|
},
|
|
148
|
-
false: (0, Y.css)([ "&:focus{& > ", "{box-shadow:", ";}}" ],
|
|
149
|
-
/* sc-sel */
|
|
150
|
-
D, y.variables.focusShadow)
|
|
141
|
+
false: (0, Y.css)([ "&:focus{& > ", "{box-shadow:", ";}}" ], /* sc-sel */ D, y.variables.focusShadow)
|
|
151
142
|
}), (0, y.pickVariant)("$selected", {
|
|
152
143
|
true: (0, y.pick)({
|
|
153
|
-
enterprise: (0, Y.css)([ "& > ", "{border-color:", ";}" ],
|
|
154
|
-
/* sc-sel */
|
|
155
|
-
D, y.variables.linkColor),
|
|
156
|
-
prisma: (0, Y.css)([ "& > ", "{background-color:", ";font-weight:", ";}" ],
|
|
157
|
-
/* sc-sel */
|
|
158
|
-
D, y.variables.interactiveColorOverlaySelected, y.variables.fontWeightBold)
|
|
144
|
+
enterprise: (0, Y.css)([ "& > ", "{border-color:", ";}" ], /* sc-sel */ D, y.variables.linkColor),
|
|
145
|
+
prisma: (0, Y.css)([ "& > ", "{background-color:", ";font-weight:", ";}" ], /* sc-sel */ D, y.variables.interactiveColorOverlaySelected, y.variables.fontWeightBold)
|
|
159
146
|
}),
|
|
160
147
|
false: (0, y.pick)({
|
|
161
|
-
enterprise: (0, Y.css)([ "&:hover{& > ", "{background-color:", ";color:", ";}}" ],
|
|
162
|
-
/* sc-sel */
|
|
163
|
-
D, y.variables.backgroundColorHover, y.variables.linkColor),
|
|
164
|
-
prisma: (0, Y.css)([ "&:hover{& > ", "{background-color:", ";}}" ],
|
|
165
|
-
/* sc-sel */
|
|
166
|
-
D, y.variables.interactiveColorOverlayHover)
|
|
148
|
+
enterprise: (0, Y.css)([ "&:hover{& > ", "{background-color:", ";color:", ";}}" ], /* sc-sel */ D, y.variables.backgroundColorHover, y.variables.linkColor),
|
|
149
|
+
prisma: (0, Y.css)([ "&:hover{& > ", "{background-color:", ";}}" ], /* sc-sel */ D, y.variables.interactiveColorOverlayHover)
|
|
167
150
|
})
|
|
168
151
|
}));
|
|
169
152
|
// CONCATENATED MODULE: ./src/Calendar/Day.tsx
|
|
170
153
|
function w() {
|
|
171
|
-
w = Object.assign
|
|
154
|
+
return w = Object.assign ? Object.assign.bind() : function(e) {
|
|
172
155
|
for (var t = 1; t < arguments.length; t++) {
|
|
173
156
|
var r = arguments[t];
|
|
174
157
|
for (var n in r) {
|
|
175
|
-
|
|
176
|
-
e[n] = r[n];
|
|
177
|
-
}
|
|
158
|
+
({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
178
159
|
}
|
|
179
160
|
}
|
|
180
161
|
return e;
|
|
181
|
-
};
|
|
182
|
-
return w.apply(this, arguments);
|
|
162
|
+
}, w.apply(null, arguments);
|
|
183
163
|
}
|
|
184
164
|
function O(e, t) {
|
|
185
|
-
if (
|
|
186
|
-
var r =
|
|
187
|
-
var n, a;
|
|
165
|
+
if (null == e) return {};
|
|
166
|
+
var r, n, a = S(e, t);
|
|
188
167
|
if (Object.getOwnPropertySymbols) {
|
|
189
168
|
var o = Object.getOwnPropertySymbols(e);
|
|
190
|
-
for (
|
|
191
|
-
|
|
192
|
-
if (t.indexOf(n) >= 0) continue;
|
|
193
|
-
if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
|
|
194
|
-
r[n] = e[n];
|
|
169
|
+
for (n = 0; n < o.length; n++) {
|
|
170
|
+
r = o[n], t.includes(r) || {}.propertyIsEnumerable.call(e, r) && (a[r] = e[r]);
|
|
195
171
|
}
|
|
196
172
|
}
|
|
197
|
-
return
|
|
173
|
+
return a;
|
|
198
174
|
}
|
|
199
|
-
function
|
|
200
|
-
if (
|
|
175
|
+
function S(e, t) {
|
|
176
|
+
if (null == e) return {};
|
|
201
177
|
var r = {};
|
|
202
|
-
var n
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
r[a] = e[a];
|
|
178
|
+
for (var n in e) {
|
|
179
|
+
if ({}.hasOwnProperty.call(e, n)) {
|
|
180
|
+
if (t.includes(n)) continue;
|
|
181
|
+
r[n] = e[n];
|
|
182
|
+
}
|
|
208
183
|
}
|
|
209
184
|
return r;
|
|
210
185
|
}
|
|
211
|
-
var
|
|
186
|
+
var C = {
|
|
212
187
|
active: o().bool,
|
|
213
188
|
locale: o().string,
|
|
214
189
|
onClick: o().func,
|
|
@@ -217,39 +192,39 @@
|
|
|
217
192
|
today: o().bool,
|
|
218
193
|
value: o().string
|
|
219
194
|
};
|
|
220
|
-
function
|
|
221
|
-
var t = e.active, a = t === void 0 ? false : t, o = e.locale,
|
|
195
|
+
function j(e) {
|
|
196
|
+
var t = e.active, a = t === void 0 ? false : t, o = e.locale, i = o === void 0 ? "en_US" : o, l = e.onClick, u = e.onKeyDown, c = e.selected, s = c === void 0 ? false : c, f = e.today, v = f === void 0 ? false : f, p = e.value, y = O(e, [ "active", "locale", "onClick", "onKeyDown", "selected", "today", "value" ]);
|
|
222
197
|
var h = (0, r.useCallback)((function(e) {
|
|
223
198
|
e.preventDefault();
|
|
224
|
-
|
|
225
|
-
value:
|
|
199
|
+
l === null || l === void 0 ? void 0 : l(e, {
|
|
200
|
+
value: p
|
|
226
201
|
});
|
|
227
|
-
}), [
|
|
228
|
-
var
|
|
202
|
+
}), [ l, p ]);
|
|
203
|
+
var b = (0, r.useCallback)((function(e) {
|
|
229
204
|
e.preventDefault();
|
|
230
205
|
u === null || u === void 0 ? void 0 : u(e, {
|
|
231
|
-
value:
|
|
206
|
+
value: p
|
|
232
207
|
});
|
|
233
|
-
}), [ u,
|
|
234
|
-
var
|
|
208
|
+
}), [ u, p ]);
|
|
209
|
+
var m = p && d()(p, "YYYY-MM-DD", i).format("D");
|
|
235
210
|
|
|
236
211
|
return n().createElement(k, w({
|
|
237
212
|
tabIndex: a ? 0 : -1,
|
|
238
213
|
"aria-selected": s,
|
|
239
|
-
"data-test-day":
|
|
214
|
+
"data-test-day": m,
|
|
240
215
|
"data-test": "day-of-month",
|
|
241
216
|
"data-active-day": a,
|
|
242
|
-
"data-is-today":
|
|
217
|
+
"data-is-today": v,
|
|
243
218
|
onClick: h,
|
|
244
|
-
onKeyDown:
|
|
245
|
-
$today:
|
|
219
|
+
onKeyDown: b,
|
|
220
|
+
$today: v,
|
|
246
221
|
$selected: s
|
|
247
|
-
}, y), n().createElement(D, null, n().createElement(M, null,
|
|
222
|
+
}, y), n().createElement(D, null, n().createElement(M, null, m)));
|
|
248
223
|
}
|
|
249
|
-
|
|
250
|
-
/* harmony default export */ const
|
|
224
|
+
j.propTypes = C;
|
|
225
|
+
/* harmony default export */ const x = j;
|
|
251
226
|
// CONCATENATED MODULE: ./src/Calendar/DateTableStyles.ts
|
|
252
|
-
var
|
|
227
|
+
var P = g().table.withConfig({
|
|
253
228
|
displayName: "DateTableStyles__Styled",
|
|
254
229
|
componentId: "sc-1lbrjq0-0"
|
|
255
230
|
})([ "", ";table-layout:fixed;border-spacing:", ";width:", ";margin:", ";" ], y.mixins.reset("table"), (0,
|
|
@@ -275,44 +250,36 @@
|
|
|
275
250
|
prisma: y.variables.fontSize
|
|
276
251
|
}));
|
|
277
252
|
// CONCATENATED MODULE: ./src/Calendar/DateTable.tsx
|
|
278
|
-
function
|
|
279
|
-
|
|
253
|
+
function _() {
|
|
254
|
+
return _ = Object.assign ? Object.assign.bind() : function(e) {
|
|
280
255
|
for (var t = 1; t < arguments.length; t++) {
|
|
281
256
|
var r = arguments[t];
|
|
282
257
|
for (var n in r) {
|
|
283
|
-
|
|
284
|
-
e[n] = r[n];
|
|
285
|
-
}
|
|
258
|
+
({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
286
259
|
}
|
|
287
260
|
}
|
|
288
261
|
return e;
|
|
289
|
-
};
|
|
290
|
-
return E.apply(this, arguments);
|
|
262
|
+
}, _.apply(null, arguments);
|
|
291
263
|
}
|
|
292
|
-
function
|
|
293
|
-
if (
|
|
294
|
-
var r = I(e, t);
|
|
295
|
-
var n, a;
|
|
264
|
+
function E(e, t) {
|
|
265
|
+
if (null == e) return {};
|
|
266
|
+
var r, n, a = I(e, t);
|
|
296
267
|
if (Object.getOwnPropertySymbols) {
|
|
297
268
|
var o = Object.getOwnPropertySymbols(e);
|
|
298
|
-
for (
|
|
299
|
-
|
|
300
|
-
if (t.indexOf(n) >= 0) continue;
|
|
301
|
-
if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
|
|
302
|
-
r[n] = e[n];
|
|
269
|
+
for (n = 0; n < o.length; n++) {
|
|
270
|
+
r = o[n], t.includes(r) || {}.propertyIsEnumerable.call(e, r) && (a[r] = e[r]);
|
|
303
271
|
}
|
|
304
272
|
}
|
|
305
|
-
return
|
|
273
|
+
return a;
|
|
306
274
|
}
|
|
307
275
|
function I(e, t) {
|
|
308
|
-
if (
|
|
276
|
+
if (null == e) return {};
|
|
309
277
|
var r = {};
|
|
310
|
-
var n
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
r[a] = e[a];
|
|
278
|
+
for (var n in e) {
|
|
279
|
+
if ({}.hasOwnProperty.call(e, n)) {
|
|
280
|
+
if (t.includes(n)) continue;
|
|
281
|
+
r[n] = e[n];
|
|
282
|
+
}
|
|
316
283
|
}
|
|
317
284
|
return r;
|
|
318
285
|
}
|
|
@@ -326,43 +293,43 @@
|
|
|
326
293
|
selectedValue: o().string.isRequired,
|
|
327
294
|
todayValue: o().string
|
|
328
295
|
};
|
|
329
|
-
function
|
|
330
|
-
return
|
|
296
|
+
function q(e) {
|
|
297
|
+
return p()(e, (function(e) {
|
|
331
298
|
|
|
332
299
|
return n().createElement("td", {
|
|
333
300
|
key: "".concat(e)
|
|
334
301
|
});
|
|
335
302
|
}));
|
|
336
303
|
}
|
|
337
|
-
function
|
|
338
|
-
var t = e.displayValue, r = e.endDate, a = e.highlightToday, o = e.locale,
|
|
339
|
-
var
|
|
340
|
-
var
|
|
341
|
-
while (
|
|
342
|
-
var y =
|
|
343
|
-
var h = y ===
|
|
344
|
-
var
|
|
345
|
-
var
|
|
346
|
-
|
|
304
|
+
function R(e) {
|
|
305
|
+
var t = e.displayValue, r = e.endDate, a = e.highlightToday, o = e.locale, i = e.onChange, l = e.onKeyDown, u = e.selectedDate, c = e.selectedValue, s = e.startDate, f = e.todayValue;
|
|
306
|
+
var v = d()(s).locale(o).startOf("month");
|
|
307
|
+
var p = [];
|
|
308
|
+
while (v.isSameOrBefore(r)) {
|
|
309
|
+
var y = v.format("YYYY-MM-DD");
|
|
310
|
+
var h = y === f;
|
|
311
|
+
var b = y === c;
|
|
312
|
+
var m = y === t;
|
|
313
|
+
p.push( n().createElement(x, {
|
|
347
314
|
key: y,
|
|
348
315
|
locale: o,
|
|
349
|
-
onClick:
|
|
350
|
-
onKeyDown:
|
|
351
|
-
active: u ?
|
|
316
|
+
onClick: i,
|
|
317
|
+
onKeyDown: l,
|
|
318
|
+
active: u ? m : h,
|
|
352
319
|
today: a && h,
|
|
353
320
|
value: y,
|
|
354
|
-
selected:
|
|
321
|
+
selected: b
|
|
355
322
|
}));
|
|
356
|
-
|
|
323
|
+
v.add(1, "day");
|
|
357
324
|
}
|
|
358
|
-
return
|
|
325
|
+
return p;
|
|
359
326
|
}
|
|
360
327
|
function B(e) {
|
|
361
328
|
return e.reduce((function(e, t, r) {
|
|
362
329
|
var n = Math.floor(r / 7);
|
|
363
330
|
e[n].push(t);
|
|
364
331
|
return e;
|
|
365
|
-
}),
|
|
332
|
+
}), p()(7, (function() {
|
|
366
333
|
return [];
|
|
367
334
|
}))).map((function(e, t) {
|
|
368
335
|
|
|
@@ -374,25 +341,25 @@
|
|
|
374
341
|
}
|
|
375
342
|
function F(e, t) {
|
|
376
343
|
|
|
377
|
-
return n().createElement("thead", null, n().createElement("tr", null,
|
|
378
|
-
var a =
|
|
379
|
-
var o =
|
|
344
|
+
return n().createElement("thead", null, n().createElement("tr", null, p()(7, (function(r) {
|
|
345
|
+
var a = d()().locale(e).weekday(r).format(t);
|
|
346
|
+
var o = d()().locale(e).weekday(r).format("dddd");
|
|
380
347
|
|
|
381
348
|
return n().createElement(T, {
|
|
382
349
|
key: a
|
|
383
|
-
}, n().createElement(
|
|
350
|
+
}, n().createElement(m(), null, o), n().createElement("span", {
|
|
384
351
|
"aria-hidden": true
|
|
385
352
|
}, a));
|
|
386
353
|
}))));
|
|
387
354
|
}
|
|
388
|
-
function
|
|
389
|
-
var t = e.displayValue, r = e.highlightToday, a = r === void 0 ? false : r, o = e.labelledBy,
|
|
390
|
-
var
|
|
391
|
-
var
|
|
392
|
-
var Y =
|
|
393
|
-
var g =
|
|
394
|
-
var M =
|
|
395
|
-
var D =
|
|
355
|
+
function N(e) {
|
|
356
|
+
var t = e.displayValue, r = e.highlightToday, a = r === void 0 ? false : r, o = e.labelledBy, i = e.locale, l = i === void 0 ? "en_US" : i, u = e.onChange, c = e.onInternalChange, s = e.selectedValue, f = e.todayValue, v = E(e, [ "displayValue", "highlightToday", "labelledBy", "locale", "onChange", "onInternalChange", "selectedValue", "todayValue" ]);
|
|
357
|
+
var p = (0, y.useSplunkTheme)(), b = p.family;
|
|
358
|
+
var m = b === "prisma" ? "dd" : "ddd";
|
|
359
|
+
var Y = d()(t, "YYYY-MM-DD", l);
|
|
360
|
+
var g = d()(s, "YYYY-MM-DD", l);
|
|
361
|
+
var M = d()(Y).startOf("month");
|
|
362
|
+
var D = d()(Y).endOf("month").startOf("day");
|
|
396
363
|
var k = function e(t, r) {
|
|
397
364
|
t.preventDefault();
|
|
398
365
|
u === null || u === void 0 ? void 0 : u(t, r);
|
|
@@ -401,73 +368,73 @@
|
|
|
401
368
|
var n = r.value;
|
|
402
369
|
t.preventDefault();
|
|
403
370
|
c === null || c === void 0 ? void 0 : c(t, {
|
|
404
|
-
value:
|
|
371
|
+
value: d()(n, "YYYY-MM-DD").add(-1, "d").format("YYYY-MM-DD")
|
|
405
372
|
});
|
|
406
373
|
};
|
|
407
374
|
var O = function e(t, r) {
|
|
408
375
|
var n = r.value;
|
|
409
376
|
t.preventDefault();
|
|
410
377
|
c === null || c === void 0 ? void 0 : c(t, {
|
|
411
|
-
value:
|
|
378
|
+
value: d()(n, "YYYY-MM-DD").add(1, "d").format("YYYY-MM-DD")
|
|
412
379
|
});
|
|
413
380
|
};
|
|
414
|
-
var
|
|
381
|
+
var S = function e(t, r) {
|
|
415
382
|
var n = r.value;
|
|
416
383
|
t.preventDefault();
|
|
417
384
|
c === null || c === void 0 ? void 0 : c(t, {
|
|
418
|
-
value:
|
|
385
|
+
value: d()(n, "YYYY-MM-DD").add(-1, "w").format("YYYY-MM-DD")
|
|
419
386
|
});
|
|
420
387
|
};
|
|
421
|
-
var
|
|
388
|
+
var C = function e(t, r) {
|
|
422
389
|
var n = r.value;
|
|
423
390
|
t.preventDefault();
|
|
424
391
|
c === null || c === void 0 ? void 0 : c(t, {
|
|
425
|
-
value:
|
|
392
|
+
value: d()(n, "YYYY-MM-DD").add(1, "w").format("YYYY-MM-DD")
|
|
426
393
|
});
|
|
427
394
|
};
|
|
428
|
-
var
|
|
395
|
+
var j = function e(t, r) {
|
|
429
396
|
var n = r.value;
|
|
430
397
|
t.preventDefault();
|
|
431
398
|
c === null || c === void 0 ? void 0 : c(t, {
|
|
432
|
-
value:
|
|
399
|
+
value: d()(n, "YYYY-MM-DD").add(-1, "M").format("YYYY-MM-DD")
|
|
433
400
|
});
|
|
434
401
|
};
|
|
435
|
-
var
|
|
402
|
+
var x = function e(t, r) {
|
|
436
403
|
var n = r.value;
|
|
437
404
|
t.preventDefault();
|
|
438
405
|
c === null || c === void 0 ? void 0 : c(t, {
|
|
439
|
-
value:
|
|
406
|
+
value: d()(n, "YYYY-MM-DD").add(1, "M").format("YYYY-MM-DD")
|
|
440
407
|
});
|
|
441
408
|
};
|
|
442
409
|
var T = function e(t, r) {
|
|
443
410
|
var n = r.value;
|
|
444
411
|
t.preventDefault();
|
|
445
412
|
c === null || c === void 0 ? void 0 : c(t, {
|
|
446
|
-
value:
|
|
413
|
+
value: d()(n, "YYYY-MM-DD").add(-1, "y").format("YYYY-MM-DD")
|
|
447
414
|
});
|
|
448
415
|
};
|
|
449
416
|
var I = function e(t, r) {
|
|
450
417
|
var n = r.value;
|
|
451
418
|
t.preventDefault();
|
|
452
419
|
c === null || c === void 0 ? void 0 : c(t, {
|
|
453
|
-
value:
|
|
420
|
+
value: d()(n, "YYYY-MM-DD").add(1, "y").format("YYYY-MM-DD")
|
|
454
421
|
});
|
|
455
422
|
};
|
|
456
423
|
var V = function e(t, r) {
|
|
457
424
|
var n = r.value;
|
|
458
425
|
t.preventDefault();
|
|
459
426
|
c === null || c === void 0 ? void 0 : c(t, {
|
|
460
|
-
value:
|
|
427
|
+
value: d()(n, "YYYY-MM-DD").startOf("week").format("YYYY-MM-DD")
|
|
461
428
|
});
|
|
462
429
|
};
|
|
463
|
-
var
|
|
430
|
+
var N = function e(t, r) {
|
|
464
431
|
var n = r.value;
|
|
465
432
|
t.preventDefault();
|
|
466
433
|
c === null || c === void 0 ? void 0 : c(t, {
|
|
467
|
-
value:
|
|
434
|
+
value: d()(n, "YYYY-MM-DD").endOf("week").format("YYYY-MM-DD")
|
|
468
435
|
});
|
|
469
436
|
};
|
|
470
|
-
var
|
|
437
|
+
var z = function e(t, r) {
|
|
471
438
|
var n = (0, h.keycode)(t.nativeEvent);
|
|
472
439
|
switch (n) {
|
|
473
440
|
case "enter":
|
|
@@ -476,11 +443,11 @@
|
|
|
476
443
|
break;
|
|
477
444
|
|
|
478
445
|
case "up":
|
|
479
|
-
|
|
446
|
+
S(t, r);
|
|
480
447
|
break;
|
|
481
448
|
|
|
482
449
|
case "down":
|
|
483
|
-
|
|
450
|
+
C(t, r);
|
|
484
451
|
break;
|
|
485
452
|
|
|
486
453
|
case "left":
|
|
@@ -495,7 +462,7 @@
|
|
|
495
462
|
if (t.shiftKey) {
|
|
496
463
|
T(t, r);
|
|
497
464
|
} else {
|
|
498
|
-
|
|
465
|
+
j(t, r);
|
|
499
466
|
}
|
|
500
467
|
break;
|
|
501
468
|
|
|
@@ -503,7 +470,7 @@
|
|
|
503
470
|
if (t.shiftKey) {
|
|
504
471
|
I(t, r);
|
|
505
472
|
} else {
|
|
506
|
-
|
|
473
|
+
x(t, r);
|
|
507
474
|
}
|
|
508
475
|
break;
|
|
509
476
|
|
|
@@ -512,36 +479,36 @@
|
|
|
512
479
|
break;
|
|
513
480
|
|
|
514
481
|
case "end":
|
|
515
|
-
|
|
482
|
+
N(t, r);
|
|
516
483
|
break;
|
|
517
484
|
|
|
518
485
|
default:
|
|
519
486
|
// do nothing
|
|
520
487
|
}
|
|
521
488
|
};
|
|
522
|
-
var
|
|
489
|
+
var H = q(M.format("e")).concat(R({
|
|
523
490
|
displayValue: t,
|
|
524
491
|
endDate: D,
|
|
525
492
|
highlightToday: a,
|
|
526
|
-
locale:
|
|
493
|
+
locale: l,
|
|
527
494
|
onChange: u,
|
|
528
|
-
onKeyDown:
|
|
495
|
+
onKeyDown: z,
|
|
529
496
|
selectedDate: g,
|
|
530
497
|
selectedValue: s,
|
|
531
498
|
startDate: M,
|
|
532
|
-
todayValue:
|
|
533
|
-
})).concat(
|
|
499
|
+
todayValue: f
|
|
500
|
+
})).concat(q(6 - D.format("e")));
|
|
534
501
|
|
|
535
|
-
return n().createElement(
|
|
502
|
+
return n().createElement(P, _({
|
|
536
503
|
role: "grid",
|
|
537
504
|
"aria-labelledby": o
|
|
538
|
-
},
|
|
505
|
+
}, v), F(l, m), n().createElement("tbody", null, B(H)));
|
|
539
506
|
}
|
|
540
|
-
|
|
541
|
-
/* harmony default export */ const
|
|
507
|
+
N.propTypes = V;
|
|
508
|
+
/* harmony default export */ const z = N;
|
|
542
509
|
// CONCATENATED MODULE: external "@splunk/react-icons/ChevronLeft"
|
|
543
|
-
const
|
|
544
|
-
var K = e.n(
|
|
510
|
+
const H = require("@splunk/react-icons/ChevronLeft");
|
|
511
|
+
var K = e.n(H);
|
|
545
512
|
// CONCATENATED MODULE: external "@splunk/react-icons/ChevronRight"
|
|
546
513
|
const A = require("@splunk/react-icons/ChevronRight");
|
|
547
514
|
var U = e.n(A);
|
|
@@ -574,139 +541,122 @@
|
|
|
574
541
|
// CONCATENATED MODULE: ./src/Calendar/MonthHeader.tsx
|
|
575
542
|
function te(e) {
|
|
576
543
|
"@babel/helpers - typeof";
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
}
|
|
582
|
-
te = function e(t) {
|
|
583
|
-
return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
584
|
-
};
|
|
585
|
-
}
|
|
586
|
-
return te(e);
|
|
544
|
+
return te = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
|
|
545
|
+
return typeof e;
|
|
546
|
+
} : function(e) {
|
|
547
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
548
|
+
}, te(e);
|
|
587
549
|
}
|
|
588
550
|
function re(e, t) {
|
|
589
|
-
if (
|
|
590
|
-
var r = ne(e, t);
|
|
591
|
-
var n, a;
|
|
551
|
+
if (null == e) return {};
|
|
552
|
+
var r, n, a = ne(e, t);
|
|
592
553
|
if (Object.getOwnPropertySymbols) {
|
|
593
554
|
var o = Object.getOwnPropertySymbols(e);
|
|
594
|
-
for (
|
|
595
|
-
|
|
596
|
-
if (t.indexOf(n) >= 0) continue;
|
|
597
|
-
if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
|
|
598
|
-
r[n] = e[n];
|
|
555
|
+
for (n = 0; n < o.length; n++) {
|
|
556
|
+
r = o[n], t.includes(r) || {}.propertyIsEnumerable.call(e, r) && (a[r] = e[r]);
|
|
599
557
|
}
|
|
600
558
|
}
|
|
601
|
-
return
|
|
559
|
+
return a;
|
|
602
560
|
}
|
|
603
561
|
function ne(e, t) {
|
|
604
|
-
if (
|
|
562
|
+
if (null == e) return {};
|
|
605
563
|
var r = {};
|
|
606
|
-
var n
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
r[a] = e[a];
|
|
564
|
+
for (var n in e) {
|
|
565
|
+
if ({}.hasOwnProperty.call(e, n)) {
|
|
566
|
+
if (t.includes(n)) continue;
|
|
567
|
+
r[n] = e[n];
|
|
568
|
+
}
|
|
612
569
|
}
|
|
613
570
|
return r;
|
|
614
571
|
}
|
|
615
572
|
function ae(e, t) {
|
|
616
|
-
if (!(e instanceof t))
|
|
617
|
-
throw new TypeError("Cannot call a class as a function");
|
|
618
|
-
}
|
|
573
|
+
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
|
|
619
574
|
}
|
|
620
575
|
function oe(e, t) {
|
|
621
576
|
for (var r = 0; r < t.length; r++) {
|
|
622
577
|
var n = t[r];
|
|
623
|
-
n.enumerable = n.enumerable ||
|
|
624
|
-
n.
|
|
625
|
-
if ("value" in n) n.writable = true;
|
|
626
|
-
Object.defineProperty(e, n.key, n);
|
|
578
|
+
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0),
|
|
579
|
+
Object.defineProperty(e, ye(n.key), n);
|
|
627
580
|
}
|
|
628
581
|
}
|
|
629
|
-
function
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
582
|
+
function ie(e, t, r) {
|
|
583
|
+
return t && oe(e.prototype, t), r && oe(e, r), Object.defineProperty(e, "prototype", {
|
|
584
|
+
writable: !1
|
|
585
|
+
}), e;
|
|
633
586
|
}
|
|
634
|
-
function
|
|
635
|
-
if (typeof t !== "
|
|
636
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
637
|
-
}
|
|
587
|
+
function le(e, t) {
|
|
588
|
+
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
|
|
638
589
|
e.prototype = Object.create(t && t.prototype, {
|
|
639
590
|
constructor: {
|
|
640
591
|
value: e,
|
|
641
|
-
writable:
|
|
642
|
-
configurable:
|
|
592
|
+
writable: !0,
|
|
593
|
+
configurable: !0
|
|
643
594
|
}
|
|
644
|
-
})
|
|
645
|
-
|
|
595
|
+
}), Object.defineProperty(e, "prototype", {
|
|
596
|
+
writable: !1
|
|
597
|
+
}), t && ue(e, t);
|
|
646
598
|
}
|
|
647
599
|
function ue(e, t) {
|
|
648
|
-
ue = Object.setPrototypeOf
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
};
|
|
652
|
-
return ue(e, t);
|
|
600
|
+
return ue = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
601
|
+
return e.__proto__ = t, e;
|
|
602
|
+
}, ue(e, t);
|
|
653
603
|
}
|
|
654
604
|
function ce(e) {
|
|
655
|
-
var t =
|
|
656
|
-
return function
|
|
657
|
-
var n =
|
|
605
|
+
var t = fe();
|
|
606
|
+
return function() {
|
|
607
|
+
var r, n = ve(e);
|
|
658
608
|
if (t) {
|
|
659
|
-
var
|
|
660
|
-
|
|
661
|
-
} else
|
|
662
|
-
|
|
663
|
-
}
|
|
664
|
-
return se(this, a);
|
|
609
|
+
var a = ve(this).constructor;
|
|
610
|
+
r = Reflect.construct(n, arguments, a);
|
|
611
|
+
} else r = n.apply(this, arguments);
|
|
612
|
+
return se(this, r);
|
|
665
613
|
};
|
|
666
614
|
}
|
|
667
615
|
function se(e, t) {
|
|
668
|
-
if (t && (te(t)
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
return fe(e);
|
|
616
|
+
if (t && ("object" == te(t) || "function" == typeof t)) return t;
|
|
617
|
+
if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
|
|
618
|
+
return de(e);
|
|
672
619
|
}
|
|
673
|
-
function
|
|
674
|
-
if (
|
|
675
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
676
|
-
}
|
|
620
|
+
function de(e) {
|
|
621
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
677
622
|
return e;
|
|
678
623
|
}
|
|
679
|
-
function
|
|
680
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
681
|
-
if (Reflect.construct.sham) return false;
|
|
682
|
-
if (typeof Proxy === "function") return true;
|
|
624
|
+
function fe() {
|
|
683
625
|
try {
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
return
|
|
688
|
-
}
|
|
626
|
+
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
|
|
627
|
+
} catch (e) {}
|
|
628
|
+
return (fe = function t() {
|
|
629
|
+
return !!e;
|
|
630
|
+
})();
|
|
689
631
|
}
|
|
690
|
-
function
|
|
691
|
-
|
|
692
|
-
return
|
|
693
|
-
};
|
|
694
|
-
return pe(e);
|
|
632
|
+
function ve(e) {
|
|
633
|
+
return ve = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
634
|
+
return e.__proto__ || Object.getPrototypeOf(e);
|
|
635
|
+
}, ve(e);
|
|
695
636
|
}
|
|
696
|
-
function
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
637
|
+
function pe(e, t, r) {
|
|
638
|
+
return (t = ye(t)) in e ? Object.defineProperty(e, t, {
|
|
639
|
+
value: r,
|
|
640
|
+
enumerable: !0,
|
|
641
|
+
configurable: !0,
|
|
642
|
+
writable: !0
|
|
643
|
+
}) : e[t] = r, e;
|
|
644
|
+
}
|
|
645
|
+
function ye(e) {
|
|
646
|
+
var t = he(e, "string");
|
|
647
|
+
return "symbol" == te(t) ? t : t + "";
|
|
648
|
+
}
|
|
649
|
+
function he(e, t) {
|
|
650
|
+
if ("object" != te(e) || !e) return e;
|
|
651
|
+
var r = e[Symbol.toPrimitive];
|
|
652
|
+
if (void 0 !== r) {
|
|
653
|
+
var n = r.call(e, t || "default");
|
|
654
|
+
if ("object" != te(n)) return n;
|
|
655
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
706
656
|
}
|
|
707
|
-
return e;
|
|
657
|
+
return ("string" === t ? String : Number)(e);
|
|
708
658
|
}
|
|
709
|
-
var
|
|
659
|
+
var be = {
|
|
710
660
|
headingId: o().string,
|
|
711
661
|
locale: o().string,
|
|
712
662
|
onChange: o().func,
|
|
@@ -714,11 +664,11 @@
|
|
|
714
664
|
splunkTheme: o().object,
|
|
715
665
|
value: o().string.isRequired
|
|
716
666
|
};
|
|
717
|
-
var
|
|
667
|
+
var me = {
|
|
718
668
|
locale: "en_US"
|
|
719
669
|
};
|
|
720
|
-
var
|
|
721
|
-
|
|
670
|
+
var Ye = function(e) {
|
|
671
|
+
le(r, e);
|
|
722
672
|
var t = ce(r);
|
|
723
673
|
function r() {
|
|
724
674
|
var e;
|
|
@@ -727,20 +677,20 @@
|
|
|
727
677
|
a[o] = arguments[o];
|
|
728
678
|
}
|
|
729
679
|
e = t.call.apply(t, [ this ].concat(a));
|
|
730
|
-
|
|
680
|
+
pe(de(e), "handlePrevMonthClick", (function(t) {
|
|
731
681
|
e.handleChange(t, -1);
|
|
732
682
|
}));
|
|
733
|
-
|
|
683
|
+
pe(de(e), "handleNextMonthClick", (function(t) {
|
|
734
684
|
e.handleChange(t, 1);
|
|
735
685
|
}));
|
|
736
686
|
return e;
|
|
737
687
|
}
|
|
738
|
-
|
|
688
|
+
ie(r, [ {
|
|
739
689
|
key: "handleChange",
|
|
740
690
|
value: function e(t, r) {
|
|
741
691
|
var n, a;
|
|
742
692
|
t.stopPropagation();
|
|
743
|
-
var o =
|
|
693
|
+
var o = d()(this.props.value, "YYYY-MM-DD").add(r, "M").format("YYYY-MM-DD");
|
|
744
694
|
(n = (a = this.props).onChange) === null || n === void 0 ? void 0 : n.call(a, t, {
|
|
745
695
|
value: o
|
|
746
696
|
});
|
|
@@ -748,26 +698,26 @@
|
|
|
748
698
|
}, {
|
|
749
699
|
key: "render",
|
|
750
700
|
value: function e() {
|
|
751
|
-
var t = this.props, a = t.headingId, o = t.locale,
|
|
752
|
-
var s =
|
|
753
|
-
var
|
|
754
|
-
var
|
|
701
|
+
var t = this.props, a = t.headingId, o = t.locale, i = t.value, l = t.splunkTheme, u = re(t, [ "headingId", "locale", "value", "splunkTheme" ]);
|
|
702
|
+
var s = l.isEnterprise, f = l.isPrisma;
|
|
703
|
+
var v = d()(i, "YYYY-MM-DD", o);
|
|
704
|
+
var p = v.format(r.getMonthYearFormat(o, f));
|
|
755
705
|
var h = {
|
|
756
706
|
flex: "0 0 auto"
|
|
757
707
|
};
|
|
758
|
-
var
|
|
759
|
-
var
|
|
708
|
+
var b = (0, Q._)("Previous month");
|
|
709
|
+
var m = (0, Q._)("Next month");
|
|
760
710
|
|
|
761
711
|
return n().createElement(y.SplunkThemeProvider, {
|
|
762
|
-
density:
|
|
712
|
+
density: f ? "comfortable" : l.density
|
|
763
713
|
}, n().createElement(Z, c()(u, "onChange"), n().createElement(J(), {
|
|
764
714
|
appearance: "subtle",
|
|
765
715
|
icon: s ? n().createElement(L(), {
|
|
766
716
|
hideDefaultTooltip: true,
|
|
767
|
-
screenReaderText:
|
|
717
|
+
screenReaderText: b,
|
|
768
718
|
size: 1
|
|
769
719
|
}) : n().createElement(K(), {
|
|
770
|
-
"aria-label":
|
|
720
|
+
"aria-label": b,
|
|
771
721
|
height: "24",
|
|
772
722
|
width: "24"
|
|
773
723
|
}),
|
|
@@ -777,14 +727,14 @@
|
|
|
777
727
|
}), n().createElement(ee, {
|
|
778
728
|
id: a,
|
|
779
729
|
"data-test": "header-label"
|
|
780
|
-
},
|
|
730
|
+
}, p), n().createElement(J(), {
|
|
781
731
|
appearance: "subtle",
|
|
782
732
|
icon: s ? n().createElement(X(), {
|
|
783
733
|
hideDefaultTooltip: true,
|
|
784
|
-
screenReaderText:
|
|
734
|
+
screenReaderText: m,
|
|
785
735
|
size: 1
|
|
786
736
|
}) : n().createElement(U(), {
|
|
787
|
-
"aria-label":
|
|
737
|
+
"aria-label": m,
|
|
788
738
|
height: "24",
|
|
789
739
|
width: "24"
|
|
790
740
|
}),
|
|
@@ -798,40 +748,44 @@
|
|
|
798
748
|
value: function e(t) {
|
|
799
749
|
var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
800
750
|
var a = t.toLowerCase().replace("_", "-");
|
|
801
|
-
return n ? r.monthYearFormatsShortForm[a] ||
|
|
802
|
-
|
|
803
|
-
r.monthYearFormatsShortForm[
|
|
804
|
-
|
|
751
|
+
return n ? r.monthYearFormatsShortForm[a] ||
|
|
752
|
+
// full locale match
|
|
753
|
+
r.monthYearFormatsShortForm[a.substr(0, 2)] ||
|
|
754
|
+
// language match
|
|
755
|
+
r.monthYearFormatsShortForm["default"] : r.monthYearFormats[a] ||
|
|
756
|
+
// full locale match
|
|
757
|
+
r.monthYearFormats[a.substr(0, 2)] ||
|
|
758
|
+
// language match
|
|
805
759
|
r.monthYearFormats["default"];
|
|
806
760
|
// default
|
|
807
761
|
}
|
|
808
762
|
} ]);
|
|
809
763
|
return r;
|
|
810
764
|
}(r.Component);
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
765
|
+
pe(Ye, "propTypes", be);
|
|
766
|
+
pe(Ye, "defaultProps", me);
|
|
767
|
+
pe(Ye, "monthYearFormats", {
|
|
814
768
|
default: "MMMM YYYY",
|
|
815
769
|
ja: "YYYY年MMM",
|
|
816
770
|
ko: "YYYY년 MMMM",
|
|
817
771
|
"zh-cn": "YYYY年MMM",
|
|
818
772
|
"zh-tw": "YYYY年MMM"
|
|
819
773
|
});
|
|
820
|
-
|
|
774
|
+
pe(Ye, "monthYearFormatsShortForm", {
|
|
821
775
|
default: "MMM YYYY",
|
|
822
776
|
ja: "YYYY年 MMM",
|
|
823
777
|
ko: "YYYY년 MMMM",
|
|
824
778
|
"zh-cn": "YYYY年 MMM",
|
|
825
779
|
"zh-tw": "YYYY年 MMM"
|
|
826
780
|
});
|
|
827
|
-
var
|
|
828
|
-
|
|
829
|
-
/* harmony default export */ const
|
|
781
|
+
var ge = (0, y.withSplunkTheme)(Ye);
|
|
782
|
+
ge.propTypes = Ye.propTypes;
|
|
783
|
+
/* harmony default export */ const Me = ge;
|
|
830
784
|
// CONCATENATED MODULE: external "@splunk/react-ui/Box"
|
|
831
|
-
const
|
|
832
|
-
var
|
|
785
|
+
const De = require("@splunk/react-ui/Box");
|
|
786
|
+
var ke = e.n(De);
|
|
833
787
|
// CONCATENATED MODULE: ./src/Calendar/CalendarStyles.ts
|
|
834
|
-
var
|
|
788
|
+
var we = g()(ke()).withConfig({
|
|
835
789
|
displayName: "CalendarStyles__StyledBox",
|
|
836
790
|
componentId: "sc-18925wt-0"
|
|
837
791
|
})([ "width:", ";padding:", ";" ], (0, y.pick)({
|
|
@@ -848,7 +802,7 @@
|
|
|
848
802
|
* @param ref - The React callback or object ref. Can be `null` or `undefined`.
|
|
849
803
|
* @param current - The new value of the ref.
|
|
850
804
|
*/
|
|
851
|
-
function
|
|
805
|
+
function Oe(e, t) {
|
|
852
806
|
if (e) {
|
|
853
807
|
if (typeof e === "function") {
|
|
854
808
|
e(t);
|
|
@@ -861,129 +815,114 @@
|
|
|
861
815
|
}
|
|
862
816
|
}
|
|
863
817
|
// CONCATENATED MODULE: ./src/Calendar/Calendar.tsx
|
|
864
|
-
function
|
|
818
|
+
function Se(e) {
|
|
865
819
|
"@babel/helpers - typeof";
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
}
|
|
871
|
-
we = function e(t) {
|
|
872
|
-
return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
873
|
-
};
|
|
874
|
-
}
|
|
875
|
-
return we(e);
|
|
820
|
+
return Se = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
|
|
821
|
+
return typeof e;
|
|
822
|
+
} : function(e) {
|
|
823
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
824
|
+
}, Se(e);
|
|
876
825
|
}
|
|
877
|
-
function
|
|
878
|
-
|
|
826
|
+
function Ce() {
|
|
827
|
+
return Ce = Object.assign ? Object.assign.bind() : function(e) {
|
|
879
828
|
for (var t = 1; t < arguments.length; t++) {
|
|
880
829
|
var r = arguments[t];
|
|
881
830
|
for (var n in r) {
|
|
882
|
-
|
|
883
|
-
e[n] = r[n];
|
|
884
|
-
}
|
|
831
|
+
({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
885
832
|
}
|
|
886
833
|
}
|
|
887
834
|
return e;
|
|
888
|
-
};
|
|
889
|
-
return Oe.apply(this, arguments);
|
|
835
|
+
}, Ce.apply(null, arguments);
|
|
890
836
|
}
|
|
891
|
-
function
|
|
892
|
-
if (!(e instanceof t))
|
|
893
|
-
throw new TypeError("Cannot call a class as a function");
|
|
894
|
-
}
|
|
837
|
+
function je(e, t) {
|
|
838
|
+
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
|
|
895
839
|
}
|
|
896
|
-
function
|
|
840
|
+
function xe(e, t) {
|
|
897
841
|
for (var r = 0; r < t.length; r++) {
|
|
898
842
|
var n = t[r];
|
|
899
|
-
n.enumerable = n.enumerable ||
|
|
900
|
-
n.
|
|
901
|
-
if ("value" in n) n.writable = true;
|
|
902
|
-
Object.defineProperty(e, n.key, n);
|
|
843
|
+
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0),
|
|
844
|
+
Object.defineProperty(e, Fe(n.key), n);
|
|
903
845
|
}
|
|
904
846
|
}
|
|
905
|
-
function
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
847
|
+
function Pe(e, t, r) {
|
|
848
|
+
return t && xe(e.prototype, t), r && xe(e, r), Object.defineProperty(e, "prototype", {
|
|
849
|
+
writable: !1
|
|
850
|
+
}), e;
|
|
909
851
|
}
|
|
910
|
-
function
|
|
911
|
-
if (typeof t !== "
|
|
912
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
913
|
-
}
|
|
852
|
+
function Te(e, t) {
|
|
853
|
+
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
|
|
914
854
|
e.prototype = Object.create(t && t.prototype, {
|
|
915
855
|
constructor: {
|
|
916
856
|
value: e,
|
|
917
|
-
writable:
|
|
918
|
-
configurable:
|
|
857
|
+
writable: !0,
|
|
858
|
+
configurable: !0
|
|
919
859
|
}
|
|
920
|
-
})
|
|
921
|
-
|
|
860
|
+
}), Object.defineProperty(e, "prototype", {
|
|
861
|
+
writable: !1
|
|
862
|
+
}), t && _e(e, t);
|
|
922
863
|
}
|
|
923
864
|
function _e(e, t) {
|
|
924
|
-
_e = Object.setPrototypeOf
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
};
|
|
928
|
-
return _e(e, t);
|
|
865
|
+
return _e = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
866
|
+
return e.__proto__ = t, e;
|
|
867
|
+
}, _e(e, t);
|
|
929
868
|
}
|
|
930
|
-
function
|
|
931
|
-
var t =
|
|
932
|
-
return function
|
|
933
|
-
var n =
|
|
869
|
+
function Ee(e) {
|
|
870
|
+
var t = qe();
|
|
871
|
+
return function() {
|
|
872
|
+
var r, n = Re(e);
|
|
934
873
|
if (t) {
|
|
935
|
-
var
|
|
936
|
-
|
|
937
|
-
} else
|
|
938
|
-
|
|
939
|
-
}
|
|
940
|
-
return Ee(this, a);
|
|
874
|
+
var a = Re(this).constructor;
|
|
875
|
+
r = Reflect.construct(n, arguments, a);
|
|
876
|
+
} else r = n.apply(this, arguments);
|
|
877
|
+
return Ie(this, r);
|
|
941
878
|
};
|
|
942
879
|
}
|
|
943
|
-
function
|
|
944
|
-
if (t && (
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
return Pe(e);
|
|
880
|
+
function Ie(e, t) {
|
|
881
|
+
if (t && ("object" == Se(t) || "function" == typeof t)) return t;
|
|
882
|
+
if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
|
|
883
|
+
return Ve(e);
|
|
948
884
|
}
|
|
949
|
-
function
|
|
950
|
-
if (
|
|
951
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
952
|
-
}
|
|
885
|
+
function Ve(e) {
|
|
886
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
953
887
|
return e;
|
|
954
888
|
}
|
|
955
|
-
function
|
|
956
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
957
|
-
if (Reflect.construct.sham) return false;
|
|
958
|
-
if (typeof Proxy === "function") return true;
|
|
889
|
+
function qe() {
|
|
959
890
|
try {
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
return
|
|
964
|
-
}
|
|
891
|
+
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
|
|
892
|
+
} catch (e) {}
|
|
893
|
+
return (qe = function t() {
|
|
894
|
+
return !!e;
|
|
895
|
+
})();
|
|
965
896
|
}
|
|
966
|
-
function
|
|
967
|
-
|
|
968
|
-
return
|
|
969
|
-
};
|
|
970
|
-
return Ve(e);
|
|
897
|
+
function Re(e) {
|
|
898
|
+
return Re = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
899
|
+
return e.__proto__ || Object.getPrototypeOf(e);
|
|
900
|
+
}, Re(e);
|
|
971
901
|
}
|
|
972
|
-
function
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
902
|
+
function Be(e, t, r) {
|
|
903
|
+
return (t = Fe(t)) in e ? Object.defineProperty(e, t, {
|
|
904
|
+
value: r,
|
|
905
|
+
enumerable: !0,
|
|
906
|
+
configurable: !0,
|
|
907
|
+
writable: !0
|
|
908
|
+
}) : e[t] = r, e;
|
|
909
|
+
}
|
|
910
|
+
function Fe(e) {
|
|
911
|
+
var t = Ne(e, "string");
|
|
912
|
+
return "symbol" == Se(t) ? t : t + "";
|
|
913
|
+
}
|
|
914
|
+
function Ne(e, t) {
|
|
915
|
+
if ("object" != Se(e) || !e) return e;
|
|
916
|
+
var r = e[Symbol.toPrimitive];
|
|
917
|
+
if (void 0 !== r) {
|
|
918
|
+
var n = r.call(e, t || "default");
|
|
919
|
+
if ("object" != Se(n)) return n;
|
|
920
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
982
921
|
}
|
|
983
|
-
return e;
|
|
922
|
+
return ("string" === t ? String : Number)(e);
|
|
984
923
|
}
|
|
985
|
-
var
|
|
986
|
-
var
|
|
924
|
+
var ze = '[data-active-day="true"]';
|
|
925
|
+
var He = {
|
|
987
926
|
describedBy: o().string,
|
|
988
927
|
highlightToday: o().bool,
|
|
989
928
|
labelledBy: o().string,
|
|
@@ -994,49 +933,49 @@
|
|
|
994
933
|
value: o().string,
|
|
995
934
|
elementRef: o().oneOfType([ o().func, o().object ])
|
|
996
935
|
};
|
|
997
|
-
var
|
|
936
|
+
var Ke = {
|
|
998
937
|
locale: "en_US",
|
|
999
|
-
value:
|
|
938
|
+
value: d()().format("YYYY-MM-DD")
|
|
1000
939
|
};
|
|
1001
|
-
var
|
|
1002
|
-
|
|
1003
|
-
var t =
|
|
940
|
+
var Ae = function(e) {
|
|
941
|
+
Te(r, e);
|
|
942
|
+
var t = Ee(r);
|
|
1004
943
|
function r(e) {
|
|
1005
944
|
var a;
|
|
1006
|
-
|
|
945
|
+
je(this, r);
|
|
1007
946
|
a = t.call(this, e);
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
947
|
+
Be(Ve(a), "monthHeaderId", void 0);
|
|
948
|
+
Be(Ve(a), "todayTimerId", void 0);
|
|
949
|
+
Be(Ve(a), "calendarRef", void 0);
|
|
950
|
+
Be(Ve(a), "handleMonthChange", (function(e, t) {
|
|
1012
951
|
var r = t.value;
|
|
1013
952
|
a.setState({
|
|
1014
953
|
internalValue: r,
|
|
1015
954
|
source: "month"
|
|
1016
955
|
});
|
|
1017
956
|
}));
|
|
1018
|
-
|
|
957
|
+
Be(Ve(a), "handleDayChange", (function(e, t) {
|
|
1019
958
|
var r = t.value;
|
|
1020
959
|
a.setState({
|
|
1021
960
|
internalValue: r,
|
|
1022
961
|
source: "day"
|
|
1023
962
|
});
|
|
1024
963
|
}));
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
964
|
+
Be(Ve(a), "handleCalendarMount", (function(e) {
|
|
965
|
+
Oe(a.calendarRef, e);
|
|
966
|
+
Oe(a.props.elementRef, e);
|
|
1028
967
|
}));
|
|
1029
968
|
a.state = {
|
|
1030
969
|
internalValue: e.value,
|
|
1031
970
|
todayValue: a.getToday(),
|
|
1032
971
|
source: null
|
|
1033
972
|
};
|
|
1034
|
-
a.monthHeaderId = (0,
|
|
973
|
+
a.monthHeaderId = (0, f.createDOMID)("header");
|
|
1035
974
|
a.calendarRef = n().createRef();
|
|
1036
975
|
if (false) {}
|
|
1037
976
|
return a;
|
|
1038
977
|
}
|
|
1039
|
-
|
|
978
|
+
Pe(r, [ {
|
|
1040
979
|
key: "componentDidMount",
|
|
1041
980
|
value: function e() {
|
|
1042
981
|
var t = this;
|
|
@@ -1070,49 +1009,49 @@
|
|
|
1070
1009
|
key: "focusActiveDay",
|
|
1071
1010
|
value: function e() {
|
|
1072
1011
|
var t, r;
|
|
1073
|
-
var n = (t = this.calendarRef) === null || t === void 0 ? void 0 : (r = t.current) === null || r === void 0 ? void 0 : r.querySelector(
|
|
1012
|
+
var n = (t = this.calendarRef) === null || t === void 0 ? void 0 : (r = t.current) === null || r === void 0 ? void 0 : r.querySelector(ze);
|
|
1074
1013
|
n === null || n === void 0 ? void 0 : n.focus();
|
|
1075
1014
|
}
|
|
1076
1015
|
}, {
|
|
1077
1016
|
key: "getToday",
|
|
1078
1017
|
value: function e() {
|
|
1079
|
-
var t =
|
|
1018
|
+
var t = d()().locale(this.props.locale).format("YYYY-MM-DD");
|
|
1080
1019
|
return t;
|
|
1081
1020
|
}
|
|
1082
1021
|
}, {
|
|
1083
1022
|
key: "render",
|
|
1084
1023
|
value: function e() {
|
|
1085
|
-
var t = this.props, a = t.describedBy, o = t.highlightToday,
|
|
1086
|
-
var
|
|
1024
|
+
var t = this.props, a = t.describedBy, o = t.highlightToday, i = t.labelledBy, u = t.locale, s = t.onChange, d = t.required, f = t.value;
|
|
1025
|
+
var v = this.state, p = v.internalValue, y = v.todayValue;
|
|
1087
1026
|
|
|
1088
|
-
return n().createElement(
|
|
1027
|
+
return n().createElement(we, Ce({
|
|
1089
1028
|
inline: true,
|
|
1090
|
-
"aria-labelledby":
|
|
1029
|
+
"aria-labelledby": i,
|
|
1091
1030
|
"aria-describedby": a,
|
|
1092
|
-
"aria-required":
|
|
1031
|
+
"aria-required": d,
|
|
1093
1032
|
"data-test": "calendar"
|
|
1094
|
-
}, c()(this.props,
|
|
1033
|
+
}, c()(this.props, l()(r.propTypes)), {
|
|
1095
1034
|
elementRef: this.handleCalendarMount
|
|
1096
|
-
}), n().createElement(
|
|
1035
|
+
}), n().createElement(Me, {
|
|
1097
1036
|
headingId: this.monthHeaderId,
|
|
1098
1037
|
locale: u,
|
|
1099
1038
|
onChange: this.handleMonthChange,
|
|
1100
|
-
value:
|
|
1101
|
-
}), n().createElement(
|
|
1102
|
-
displayValue:
|
|
1039
|
+
value: p
|
|
1040
|
+
}), n().createElement(z, {
|
|
1041
|
+
displayValue: p,
|
|
1103
1042
|
highlightToday: o,
|
|
1104
1043
|
labelledBy: this.monthHeaderId,
|
|
1105
1044
|
locale: u,
|
|
1106
1045
|
onChange: s,
|
|
1107
1046
|
onInternalChange: this.handleDayChange,
|
|
1108
|
-
selectedValue:
|
|
1047
|
+
selectedValue: f,
|
|
1109
1048
|
todayValue: y
|
|
1110
1049
|
}));
|
|
1111
1050
|
}
|
|
1112
1051
|
} ], [ {
|
|
1113
1052
|
key: "validateValue",
|
|
1114
1053
|
value: function e(t) {
|
|
1115
|
-
if (!
|
|
1054
|
+
if (!d()(t, "YYYY-MM-DD").isValid()) {
|
|
1116
1055
|
return new Error("Invalid value prop ".concat(t, " passed to Calendar. value must be a string date formatted 'YYYY-MM-DD'."));
|
|
1117
1056
|
}
|
|
1118
1057
|
return null;
|
|
@@ -1120,9 +1059,9 @@
|
|
|
1120
1059
|
} ]);
|
|
1121
1060
|
return r;
|
|
1122
1061
|
}(r.Component);
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
/* harmony default export */ const
|
|
1062
|
+
Be(Ae, "propTypes", He);
|
|
1063
|
+
Be(Ae, "defaultProps", Ke);
|
|
1064
|
+
/* harmony default export */ const Ue = Ae;
|
|
1126
1065
|
// CONCATENATED MODULE: ./src/Calendar/index.ts
|
|
1127
1066
|
module.exports = t;
|
|
1128
1067
|
/******/})();
|