@splunk/react-ui 4.20.0 → 4.21.1
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 -441
- package/Anchor.js +147 -193
- package/Animation.js +142 -166
- package/AnimationToggle.js +197 -253
- package/Box.js +145 -194
- package/Breadcrumbs.js +288 -298
- package/Button.js +488 -613
- package/ButtonGroup.js +160 -212
- package/ButtonSimple.js +543 -562
- package/CHANGELOG.md +26 -0
- package/Calendar.js +1107 -1195
- package/Card.js +771 -746
- package/CardLayout.js +205 -223
- package/Chip.js +509 -612
- package/Clickable.js +416 -472
- package/CloseButton.js +165 -250
- package/Code.js +1808 -2172
- package/Code.js.LICENSE.txt +8 -0
- package/CollapsiblePanel.js +586 -675
- package/Color.js +1066 -1297
- package/ColumnLayout.js +402 -465
- package/ComboBox.js +892 -969
- package/Concertina.js +998 -963
- package/ControlGroup.js +687 -718
- package/Date.js +567 -697
- package/DefinitionList.js +308 -310
- package/Divider.js +149 -194
- package/Dropdown.js +459 -558
- package/DualListbox.js +1480 -1735
- package/EventListener.js +94 -165
- package/File.js +1051 -1173
- package/FormRows.js +885 -880
- package/Heading.js +216 -263
- package/Image.js +446 -558
- package/JSONTree.js +690 -699
- package/Layer.js +442 -582
- package/Link.js +336 -361
- package/List.js +213 -237
- package/Markdown.js +510 -612
- package/Menu.js +1109 -1331
- package/Message.js +474 -629
- package/MessageBar.js +387 -561
- package/Modal.js +810 -798
- package/ModalLayer.js +326 -343
- package/Monogram.js +308 -368
- package/Multiselect.js +3558 -3998
- package/Number.js +729 -843
- package/Paginator.js +510 -615
- package/Paragraph.js +145 -188
- package/Popover.js +1470 -1693
- package/Progress.js +301 -362
- package/RadioBar.js +610 -651
- package/RadioList.js +483 -544
- package/Resize.js +530 -623
- package/ResultsMenu.js +494 -597
- package/ScreenReaderContent.js +142 -187
- package/Scroll.js +595 -598
- package/ScrollContainerContext.js +197 -278
- package/Search.js +745 -817
- package/Select.js +2441 -2746
- package/SidePanel.js +390 -392
- package/Slider.js +668 -825
- package/SlidingPanels.js +639 -645
- package/SplitButton.js +464 -499
- package/StaticContent.js +161 -217
- package/StepBar.js +386 -466
- package/Switch.js +710 -764
- package/TabBar.js +724 -815
- package/TabLayout.js +406 -438
- package/Table.js +4842 -5121
- package/Text.js +1169 -1351
- package/TextArea.js +1097 -1307
- package/Tooltip.js +624 -721
- package/TransitionOpen.js +489 -546
- package/Typography.js +176 -229
- package/WaitSpinner.js +230 -298
- package/package.json +14 -15
- package/stubs-splunkui.d.ts +4 -1
- package/types/src/ComboBox/Option.d.ts +1 -1
- package/types/src/Concertina/Concertina.d.ts +4 -0
- package/types/src/JSONTree/JSONTreeContext.d.ts +7 -0
- package/types/src/JSONTree/TreeNode.d.ts +5 -0
- package/types/src/Link/Link.d.ts +7 -3
- package/types/src/Link/docs/examples/NewWindow.d.ts +2 -0
- package/types/src/Markdown/Markdown.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownHeading.d.ts +1 -1
- package/types/src/Menu/Item.d.ts +1 -1
- package/types/src/Menu/Menu.d.ts +1 -0
- package/types/src/MessageBar/docs/examples/WithActions.d.ts +2 -0
- package/types/src/Multiselect/Option.d.ts +1 -1
- package/types/src/Search/Option.d.ts +1 -1
- package/types/src/Select/Option.d.ts +1 -1
- package/types/src/Select/OptionBase.d.ts +1 -1
- package/types/src/fixtures/FetchOptions.d.ts +2 -8
- package/useForceUpdate.js +112 -146
- package/useKeyPress.js +74 -128
- package/usePrevious.js +65 -129
- package/useRovingFocus.js +122 -218
- package/types/src/Link/docs/examples/NewTab.d.ts +0 -2
- /package/types/src/Table/docs/examples/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
- /package/types/src/Table/docs/examples/prisma/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
package/File.js
CHANGED
|
@@ -1,1186 +1,1064 @@
|
|
|
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
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
69
|
-
/******/ __webpack_require__.n = function(module) {
|
|
70
|
-
/******/ var getter = module && module.__esModule ?
|
|
71
|
-
/******/ function getDefault() { return module['default']; } :
|
|
72
|
-
/******/ function getModuleExports() { return module; };
|
|
73
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
74
|
-
/******/ return getter;
|
|
75
|
-
/******/ };
|
|
76
|
-
/******/
|
|
77
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
|
78
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
79
|
-
/******/
|
|
80
|
-
/******/ // __webpack_public_path__
|
|
81
|
-
/******/ __webpack_require__.p = "";
|
|
82
|
-
/******/
|
|
83
|
-
/******/
|
|
84
|
-
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s = 173);
|
|
86
|
-
/******/ })
|
|
87
|
-
/************************************************************************/
|
|
88
|
-
/******/ ({
|
|
89
|
-
|
|
90
|
-
/***/ 0:
|
|
91
|
-
/***/ (function(module, exports) {
|
|
92
|
-
|
|
93
|
-
module.exports = require("@splunk/themes");
|
|
94
|
-
|
|
95
|
-
/***/ }),
|
|
96
|
-
|
|
97
|
-
/***/ 1:
|
|
98
|
-
/***/ (function(module, exports) {
|
|
99
|
-
|
|
100
|
-
module.exports = require("prop-types");
|
|
101
|
-
|
|
102
|
-
/***/ }),
|
|
103
|
-
|
|
104
|
-
/***/ 12:
|
|
105
|
-
/***/ (function(module, exports) {
|
|
106
|
-
|
|
107
|
-
module.exports = require("@splunk/react-ui/Clickable");
|
|
108
|
-
|
|
109
|
-
/***/ }),
|
|
110
|
-
|
|
111
|
-
/***/ 133:
|
|
112
|
-
/***/ (function(module, exports) {
|
|
113
|
-
|
|
114
|
-
module.exports = require("lodash/toUpper");
|
|
115
|
-
|
|
116
|
-
/***/ }),
|
|
117
|
-
|
|
118
|
-
/***/ 134:
|
|
119
|
-
/***/ (function(module, exports) {
|
|
120
|
-
|
|
121
|
-
module.exports = require("@splunk/react-ui/Progress");
|
|
122
|
-
|
|
123
|
-
/***/ }),
|
|
124
|
-
|
|
125
|
-
/***/ 16:
|
|
126
|
-
/***/ (function(module, exports) {
|
|
127
|
-
|
|
128
|
-
module.exports = require("@splunk/react-ui/EventListener");
|
|
129
|
-
|
|
130
|
-
/***/ }),
|
|
131
|
-
|
|
132
|
-
/***/ 173:
|
|
133
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
134
|
-
|
|
135
|
-
"use strict";
|
|
136
|
-
// ESM COMPAT FLAG
|
|
137
|
-
__webpack_require__.r(__webpack_exports__);
|
|
138
|
-
|
|
139
|
-
// EXPORTS
|
|
140
|
-
__webpack_require__.d(__webpack_exports__, "default", function() { return /* reexport */ src_File_File; });
|
|
141
|
-
__webpack_require__.d(__webpack_exports__, "Item", function() { return /* reexport */ File_Item; });
|
|
142
|
-
|
|
143
|
-
// EXTERNAL MODULE: external "react"
|
|
144
|
-
var external_react_ = __webpack_require__(2);
|
|
145
|
-
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
|
|
146
|
-
|
|
147
|
-
// EXTERNAL MODULE: external "prop-types"
|
|
148
|
-
var external_prop_types_ = __webpack_require__(1);
|
|
149
|
-
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
150
|
-
|
|
151
|
-
// EXTERNAL MODULE: external "lodash/debounce"
|
|
152
|
-
var debounce_ = __webpack_require__(68);
|
|
153
|
-
var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce_);
|
|
154
|
-
|
|
155
|
-
// EXTERNAL MODULE: external "lodash/omit"
|
|
156
|
-
var omit_ = __webpack_require__(5);
|
|
157
|
-
var omit_default = /*#__PURE__*/__webpack_require__.n(omit_);
|
|
158
|
-
|
|
159
|
-
// EXTERNAL MODULE: external "lodash/toUpper"
|
|
160
|
-
var toUpper_ = __webpack_require__(133);
|
|
161
|
-
var toUpper_default = /*#__PURE__*/__webpack_require__.n(toUpper_);
|
|
162
|
-
|
|
163
|
-
// EXTERNAL MODULE: external "lodash/isString"
|
|
164
|
-
var isString_ = __webpack_require__(23);
|
|
165
|
-
var isString_default = /*#__PURE__*/__webpack_require__.n(isString_);
|
|
166
|
-
|
|
167
|
-
// EXTERNAL MODULE: external "@splunk/react-ui/EventListener"
|
|
168
|
-
var EventListener_ = __webpack_require__(16);
|
|
169
|
-
var EventListener_default = /*#__PURE__*/__webpack_require__.n(EventListener_);
|
|
170
|
-
|
|
171
|
-
// EXTERNAL MODULE: external "@splunk/themes"
|
|
172
|
-
var themes_ = __webpack_require__(0);
|
|
173
|
-
|
|
174
|
-
// EXTERNAL MODULE: external "@splunk/ui-utils/i18n"
|
|
175
|
-
var i18n_ = __webpack_require__(4);
|
|
176
|
-
|
|
177
|
-
// EXTERNAL MODULE: external "@splunk/ui-utils/id"
|
|
178
|
-
var id_ = __webpack_require__(8);
|
|
179
|
-
|
|
180
|
-
// EXTERNAL MODULE: external "lodash/isUndefined"
|
|
181
|
-
var isUndefined_ = __webpack_require__(42);
|
|
182
|
-
var isUndefined_default = /*#__PURE__*/__webpack_require__.n(isUndefined_);
|
|
183
|
-
|
|
184
|
-
// EXTERNAL MODULE: external "@splunk/react-icons/Cross"
|
|
185
|
-
var Cross_ = __webpack_require__(26);
|
|
186
|
-
var Cross_default = /*#__PURE__*/__webpack_require__.n(Cross_);
|
|
187
|
-
|
|
188
|
-
// EXTERNAL MODULE: external "@splunk/react-icons/enterprise/Close"
|
|
189
|
-
var Close_ = __webpack_require__(27);
|
|
190
|
-
var Close_default = /*#__PURE__*/__webpack_require__.n(Close_);
|
|
191
|
-
|
|
192
|
-
// EXTERNAL MODULE: external "@splunk/react-ui/Progress"
|
|
193
|
-
var Progress_ = __webpack_require__(134);
|
|
194
|
-
var Progress_default = /*#__PURE__*/__webpack_require__.n(Progress_);
|
|
195
|
-
|
|
196
|
-
// EXTERNAL MODULE: external "@splunk/ui-utils/format"
|
|
197
|
-
var format_ = __webpack_require__(29);
|
|
198
|
-
|
|
199
|
-
// CONCATENATED MODULE: ./src/File/FileContext.tsx
|
|
200
|
-
|
|
201
|
-
var FileContext = /*#__PURE__*/Object(external_react_["createContext"])({
|
|
202
|
-
disabled: false
|
|
203
|
-
});
|
|
204
|
-
FileContext.displayName = 'File';
|
|
205
|
-
/* harmony default export */ var File_FileContext = (FileContext);
|
|
206
|
-
// EXTERNAL MODULE: external "@splunk/react-icons/SVGEnterprise"
|
|
207
|
-
var SVGEnterprise_ = __webpack_require__(34);
|
|
208
|
-
var SVGEnterprise_default = /*#__PURE__*/__webpack_require__.n(SVGEnterprise_);
|
|
209
|
-
|
|
210
|
-
// CONCATENATED MODULE: ./src/File/PaperClip.tsx
|
|
211
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
function PaperClip(props) {
|
|
216
|
-
return /*#__PURE__*/external_react_default.a.createElement(SVGEnterprise_default.a, _extends({
|
|
217
|
-
hideDefaultTooltip: true,
|
|
218
|
-
viewBox: "0 0 16 16",
|
|
219
|
-
width: "16px",
|
|
220
|
-
height: "16px"
|
|
221
|
-
}, props), /*#__PURE__*/external_react_default.a.createElement("path", {
|
|
222
|
-
d: "M8.624 14.7021C8.23332 15.0928 7.59989 15.0928 7.2092 14.7021L2.33962 9.83209C0.546941 8.03927 0.54695 5.1325 2.33964 3.33968C4.13162 1.54758 7.03672 1.54684 8.82962 3.33802L14.1746 8.67787C15.2682 9.77043 15.2687 11.5429 14.1756 12.636C13.083 13.7288 11.3115 13.7288 10.2189 12.636L4.87676 7.29338C4.48607 6.90266 4.48607 6.26917 4.87676 5.87845C5.26744 5.48773 5.90087 5.48773 6.29155 5.87845L11.6337 11.2211C11.9449 11.5324 12.4496 11.5324 12.7608 11.2211C13.0722 10.9097 13.0721 10.4048 12.7606 10.0936L7.41557 4.75369C6.40415 3.74325 4.76532 3.74367 3.75442 4.75463C2.74312 5.766 2.74312 7.40578 3.75441 8.41715L8.62399 13.2871C9.01468 13.6779 9.01468 14.3113 8.624 14.7021Z",
|
|
223
|
-
fill: "currentColor"
|
|
224
|
-
}));
|
|
225
|
-
}
|
|
226
|
-
// CONCATENATED MODULE: ./src/File/Retry.tsx
|
|
227
|
-
function Retry_extends() { Retry_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return Retry_extends.apply(this, arguments); }
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
function Retry(props) {
|
|
233
|
-
var _useSplunkTheme = Object(themes_["useSplunkTheme"])(),
|
|
234
|
-
density = _useSplunkTheme.density;
|
|
235
|
-
|
|
236
|
-
var size = density === 'compact' ? '20px' : '24px';
|
|
237
|
-
return /*#__PURE__*/external_react_default.a.createElement(SVGEnterprise_default.a, Retry_extends({
|
|
238
|
-
hideDefaultTooltip: true,
|
|
239
|
-
viewBox: "0 0 24 24",
|
|
240
|
-
width: size,
|
|
241
|
-
height: size
|
|
242
|
-
}, props), /*#__PURE__*/external_react_default.a.createElement("path", {
|
|
243
|
-
d: "M18.2685 14.3175L18.4349 14.9384C18.6078 14.558 18.7453 14.162 18.8452 13.7556C18.9449 13.3507 19.0068 12.9373 19.0303 12.521L19.0362 12.4167C19.0663 11.883 19.0409 11.3476 18.9604 10.8191L18.9462 10.7261C18.8794 10.287 18.7695 9.85559 18.6181 9.43803C18.4827 9.06459 18.3148 8.70378 18.1162 8.35979L18.0868 8.30889C17.8331 7.86964 17.5281 7.46215 17.1781 7.09503C16.9596 6.8658 16.7243 6.65314 16.4743 6.4588L16.318 6.33739C16.0132 6.10052 15.6825 5.88712 15.34 5.70564C14.95 5.49901 14.5348 5.32943 14.1132 5.20545C13.7201 5.08986 13.317 5.01136 12.9093 4.97099L12.8406 4.96419C12.4182 4.92237 11.993 4.91829 11.5699 4.95201C11.1331 4.98682 10.7005 5.06176 10.2774 5.17589L9.70069 5.33148C9.16747 5.47533 8.61859 5.15969 8.47474 4.62647C8.33089 4.09324 8.64653 3.54437 9.17976 3.40051L9.7565 3.24492C10.298 3.09883 10.8519 3.00289 11.411 2.95833C11.9526 2.91517 12.497 2.92038 13.0377 2.97392L13.1063 2.98072C13.6384 3.03341 14.1644 3.13584 14.6774 3.28668C15.2296 3.44906 15.7694 3.66976 16.2764 3.9384C16.7197 4.17329 17.1479 4.44938 17.5453 4.75819L17.7015 4.8796C18.0299 5.13478 18.3388 5.41401 18.6257 5.715C19.0853 6.19704 19.4858 6.73209 19.8188 7.30885L19.8482 7.35975C20.1055 7.80535 20.323 8.27272 20.4984 8.75646C20.6944 9.29736 20.8368 9.85624 20.9234 10.425L20.9376 10.518C21.0389 11.1833 21.0709 11.8573 21.033 12.5293L21.0271 12.6335C20.9967 13.1731 20.9164 13.7087 20.7873 14.2334C20.6488 14.7966 20.4548 15.3442 20.2083 15.8683L20.718 15.7317C21.2515 15.5888 21.7998 15.9054 21.9428 16.4389C22.0857 16.9723 21.7691 17.5207 21.2356 17.6636L18.8208 18.3106C18.0206 18.525 17.1981 18.0501 16.9837 17.2499L16.3367 14.8352C16.1937 14.3017 16.5103 13.7534 17.0438 13.6104C17.5773 13.4675 18.1256 13.7841 18.2685 14.3175ZM3.92363 7.90992L3.33327 8.06809C2.7998 8.21103 2.25147 7.89443 2.10854 7.36097C1.9656 6.8275 2.2822 6.27917 2.81566 6.13623L5.2305 5.48922C6.03069 5.27483 6.85318 5.7497 7.06759 6.54989L7.71463 8.96466C7.85757 9.49813 7.54099 10.0465 7.00752 10.1894C6.47405 10.3324 5.92572 10.0158 5.78278 9.4823L5.64111 8.9536C5.46988 9.32312 5.33225 9.70767 5.23007 10.1026C5.1256 10.5063 5.05872 10.9189 5.03027 11.3349L5.02314 11.4391C4.98667 11.9725 5.00567 12.5081 5.07982 13.0376L5.09286 13.1307C5.15447 13.5705 5.25921 14.0032 5.40556 14.4226C5.53644 14.7976 5.70008 15.1604 5.89456 15.5068L5.92334 15.558C6.17169 16.0003 6.47181 16.4114 6.81738 16.7826C7.03315 17.0145 7.26586 17.2299 7.51359 17.4273L7.66835 17.5505C7.97029 17.791 8.29849 18.0084 8.63879 18.1939C9.02626 18.4052 9.43938 18.5797 9.8595 18.7088C10.2512 18.829 10.6533 18.9124 11.0605 18.9576L11.1291 18.9652C11.551 19.0121 11.9761 19.0213 12.3996 18.9926C12.8368 18.963 13.2703 18.8933 13.6946 18.7842L14.2732 18.6355C14.8081 18.4981 15.3532 18.8202 15.4906 19.3552C15.6281 19.8901 15.3059 20.4351 14.771 20.5726L14.1924 20.7213C13.6492 20.8609 13.0943 20.9502 12.5346 20.988C11.9925 21.0247 11.4483 21.013 10.9083 20.953L10.8397 20.9454C10.3082 20.8863 9.78352 20.7776 9.27238 20.6206C8.72212 20.4517 8.18505 20.2245 7.68131 19.9498C7.24086 19.7097 6.81595 19.4285 6.42229 19.1149L6.26753 18.9917C5.94226 18.7326 5.6367 18.4497 5.35338 18.1453C4.89963 17.6578 4.50556 17.118 4.17948 16.5373L4.1507 16.486C3.89877 16.0374 3.6868 15.5674 3.51725 15.0816C3.32768 14.5384 3.192 13.9779 3.1122 13.4081L3.09915 13.315C3.0058 12.6485 2.98189 11.9741 3.0278 11.3027L3.03493 11.1985C3.07179 10.6594 3.15847 10.1248 3.29383 9.60161C3.44505 9.01718 3.65617 8.4503 3.92363 7.90992Z",
|
|
244
|
-
fill: "currentColor"
|
|
245
|
-
}));
|
|
246
|
-
}
|
|
247
|
-
// CONCATENATED MODULE: ./src/File/Trash.tsx
|
|
248
|
-
function Trash_extends() { Trash_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return Trash_extends.apply(this, arguments); }
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
function Trash(props) {
|
|
254
|
-
var _useSplunkTheme = Object(themes_["useSplunkTheme"])(),
|
|
255
|
-
density = _useSplunkTheme.density;
|
|
256
|
-
|
|
257
|
-
var size = density === 'compact' ? '20px' : '24px';
|
|
258
|
-
return /*#__PURE__*/external_react_default.a.createElement(SVGEnterprise_default.a, Trash_extends({
|
|
259
|
-
hideDefaultTooltip: true,
|
|
260
|
-
viewBox: "0 0 24 24",
|
|
261
|
-
width: size,
|
|
262
|
-
height: size
|
|
263
|
-
}, props), /*#__PURE__*/external_react_default.a.createElement("path", {
|
|
264
|
-
d: "M10 4V6H14V4H10ZM16 6H17H19H20C20.5523 6 21 6.44772 21 7C21 7.55228 20.5523 8 20 8H19V20.5C19 21.3284 18.3284 22 17.5 22H6.5C5.67157 22 5 21.3284 5 20.5V8H4C3.44772 8 3 7.55228 3 7C3 6.44772 3.44772 6 4 6H5H7H8V3.5C8 2.67157 8.67157 2 9.5 2H14.5C15.3284 2 16 2.67157 16 3.5V6ZM7 8V20H17V8H7ZM10.5858 14L9.2929 15.2929C8.90237 15.6834 8.90237 16.3166 9.2929 16.7071C9.68342 17.0976 10.3166 17.0976 10.7071 16.7071L12 15.4142L13.2929 16.7071C13.6834 17.0976 14.3166 17.0976 14.7071 16.7071C15.0976 16.3166 15.0976 15.6834 14.7071 15.2929L13.4142 14L14.7071 12.7071C15.0976 12.3166 15.0976 11.6834 14.7071 11.2929C14.3166 10.9024 13.6834 10.9024 13.2929 11.2929L12 12.5858L10.7071 11.2929C10.3166 10.9024 9.68342 10.9024 9.29289 11.2929C8.90237 11.6834 8.90237 12.3166 9.29289 12.7071L10.5858 14Z",
|
|
265
|
-
fill: "currentColor"
|
|
266
|
-
}));
|
|
267
|
-
}
|
|
268
|
-
// EXTERNAL MODULE: external "styled-components"
|
|
269
|
-
var external_styled_components_ = __webpack_require__(3);
|
|
270
|
-
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
|
|
271
|
-
|
|
272
|
-
// EXTERNAL MODULE: external "@splunk/react-ui/Box"
|
|
273
|
-
var Box_ = __webpack_require__(6);
|
|
274
|
-
var Box_default = /*#__PURE__*/__webpack_require__.n(Box_);
|
|
275
|
-
|
|
276
|
-
// EXTERNAL MODULE: external "@splunk/react-ui/Clickable"
|
|
277
|
-
var Clickable_ = __webpack_require__(12);
|
|
278
|
-
var Clickable_default = /*#__PURE__*/__webpack_require__.n(Clickable_);
|
|
279
|
-
|
|
280
|
-
// EXTERNAL MODULE: external "@splunk/themes/mixins"
|
|
281
|
-
var mixins_ = __webpack_require__(83);
|
|
282
|
-
|
|
283
|
-
// CONCATENATED MODULE: ./src/File/ItemStyles.ts
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
var StyledBox = external_styled_components_default()(Box_default.a).withConfig({
|
|
290
|
-
displayName: "ItemStyles__StyledBox",
|
|
291
|
-
componentId: "sc-1fsk3kr-0"
|
|
292
|
-
})(["position:relative;width:100%;max-width:400px;margin:", ";background-color:", ";border-radius:", ";min-height:32px;color:", ";", " ", " ", " ", ";"], Object(themes_["pick"])({
|
|
293
|
-
enterprise: '5px auto 0',
|
|
294
|
-
prisma: {
|
|
295
|
-
comfortable: '8px auto 0',
|
|
296
|
-
compact: '4px auto 0'
|
|
297
|
-
}
|
|
298
|
-
}), Object(themes_["pick"])({
|
|
299
|
-
enterprise: {
|
|
300
|
-
light: themes_["variables"].gray92,
|
|
301
|
-
dark: themes_["variables"].gray45
|
|
302
|
-
},
|
|
303
|
-
prisma: themes_["variables"].interactiveColorBackground
|
|
304
|
-
}), Object(themes_["pick"])({
|
|
305
|
-
enterprise: '2px',
|
|
306
|
-
prisma: themes_["variables"].borderRadius
|
|
307
|
-
}), Object(themes_["pick"])({
|
|
308
|
-
enterprise: themes_["variables"].textGray,
|
|
309
|
-
prisma: themes_["variables"].contentColorDefault
|
|
310
|
-
}), Object(themes_["pick"])({
|
|
311
|
-
prisma: Object(external_styled_components_["css"])(["border:1px solid ", ";padding-left:12px;"], themes_["variables"].neutral200),
|
|
312
|
-
enterprise: Object(external_styled_components_["css"])(["line-height:24px;"])
|
|
313
|
-
}), Object(themes_["pick"])({
|
|
314
|
-
enterprise: {
|
|
315
|
-
compact: Object(external_styled_components_["css"])(["min-height:24px;"])
|
|
316
|
-
}
|
|
317
|
-
}), function (_ref) {
|
|
318
|
-
var $error = _ref.$error;
|
|
319
|
-
return $error && Object(themes_["pick"])({
|
|
320
|
-
enterprise: Object(external_styled_components_["css"])(["box-shadow:inset 0 0 0 1px ", ";"], themes_["variables"].errorColor),
|
|
321
|
-
prisma: Object(external_styled_components_["css"])(["box-shadow:inset 0 0 0 1px ", ";background-color:", ";"], themes_["variables"].accentColorNegative, themes_["variables"].interactiveColorBackground)
|
|
322
|
-
});
|
|
323
|
-
}, function (_ref2) {
|
|
324
|
-
var $disabled = _ref2.$disabled;
|
|
325
|
-
return $disabled && Object(external_styled_components_["css"])(["cursor:not-allowed;background-color:", ";"], Object(themes_["pick"])({
|
|
326
|
-
enterprise: {
|
|
327
|
-
dark: themes_["variables"].gray60,
|
|
328
|
-
light: themes_["variables"].gray96
|
|
329
|
-
},
|
|
330
|
-
prisma: Object(mixins_["overlayColors"])(themes_["variables"].interactiveColorBackground, themes_["variables"].interactiveColorBackgroundDisabled)
|
|
331
|
-
}));
|
|
332
|
-
});
|
|
333
|
-
var StyledErrorText = external_styled_components_default.a.div.withConfig({
|
|
334
|
-
displayName: "ItemStyles__StyledErrorText",
|
|
335
|
-
componentId: "sc-1fsk3kr-1"
|
|
336
|
-
})(["font-size:", ";color:", ";line-height:16px;margin-top:4px;text-align:left;"], themes_["variables"].fontSizeSmall, themes_["variables"].accentColorNegative);
|
|
337
|
-
var StyledIconClickable = external_styled_components_default()(Clickable_default.a).withConfig({
|
|
338
|
-
displayName: "ItemStyles__StyledIconClickable",
|
|
339
|
-
componentId: "sc-1fsk3kr-2"
|
|
340
|
-
})(["color:", ";border-radius:", ";padding:", ";text-align:center;", " ", " &:focus{color:", ";", "}&:hover{background-color:", ";color:", ";}"], Object(themes_["pick"])({
|
|
341
|
-
enterprise: 'inherit',
|
|
342
|
-
prisma: themes_["variables"].contentColorDefault
|
|
343
|
-
}), Object(themes_["pick"])({
|
|
344
|
-
enterprise: '0 2px 2px 0',
|
|
345
|
-
prisma: '50%'
|
|
346
|
-
}), Object(themes_["pick"])({
|
|
347
|
-
enterprise: '3px 0',
|
|
348
|
-
prisma: {
|
|
349
|
-
comfortable: '0 8px',
|
|
350
|
-
compact: '0 6px'
|
|
351
|
-
}
|
|
352
|
-
}), Object(themes_["pick"])({
|
|
353
|
-
enterprise: Object(external_styled_components_["css"])(["flex-basis:", ";"], themes_["variables"].inputHeight)
|
|
354
|
-
}), function (_ref3) {
|
|
355
|
-
var $error = _ref3.$error;
|
|
356
|
-
return $error && Object(external_styled_components_["css"])(["", ""], Object(themes_["pick"])({
|
|
357
|
-
enterprise: Object(external_styled_components_["css"])(["border:1px solid ", ";border-left:none;"], themes_["variables"].errorColor)
|
|
358
|
-
}));
|
|
359
|
-
}, Object(themes_["pick"])({
|
|
360
|
-
enterprise: themes_["variables"].linkColor,
|
|
361
|
-
prisma: themes_["variables"].contentColorActive
|
|
362
|
-
}), Object(themes_["pick"])({
|
|
363
|
-
enterprise: Object(external_styled_components_["css"])(["box-shadow:", ";"], themes_["variables"].focusShadow),
|
|
364
|
-
prisma: Object(external_styled_components_["css"])(["background-color:", ";box-shadow:0 0 0 3px ", ";"], themes_["variables"].interactiveColorOverlayHover, themes_["variables"].focusColor)
|
|
365
|
-
}), Object(themes_["pick"])({
|
|
366
|
-
enterprise: {
|
|
367
|
-
light: themes_["variables"].gray96,
|
|
368
|
-
dark: themes_["variables"].gray30
|
|
369
|
-
},
|
|
370
|
-
prisma: themes_["variables"].interactiveColorOverlayHover
|
|
371
|
-
}), Object(themes_["pick"])({
|
|
372
|
-
enterprise: themes_["variables"].linkColor,
|
|
373
|
-
prisma: themes_["variables"].contentColorActive
|
|
374
|
-
})); // for Prisma theme only
|
|
375
|
-
|
|
376
|
-
var StyledTrashIcon = external_styled_components_default()(Clickable_default.a).withConfig({
|
|
377
|
-
displayName: "ItemStyles__StyledTrashIcon",
|
|
378
|
-
componentId: "sc-1fsk3kr-3"
|
|
379
|
-
})(["color:", ";border-radius:50%;padding:", ";margin-right:", ";text-align:center;&:focus{color:", ";background-color:", ";box-shadow:0 0 0 3px ", ";}&:hover{background-color:", ";color:", ";}"], themes_["variables"].contentColorDefault, Object(themes_["pick"])({
|
|
380
|
-
comfortable: '0 8px',
|
|
381
|
-
compact: '0 6px'
|
|
382
|
-
}), Object(themes_["pick"])({
|
|
383
|
-
comfortable: '0 4px',
|
|
384
|
-
compact: '0 6px'
|
|
385
|
-
}), themes_["variables"].contentColorActive, themes_["variables"].interactiveColorOverlayHover, themes_["variables"].focusColor, themes_["variables"].interactiveColorOverlayHover, themes_["variables"].contentColorActive);
|
|
386
|
-
var StyledLabel = external_styled_components_default.a.div.withConfig({
|
|
387
|
-
displayName: "ItemStyles__StyledLabel",
|
|
388
|
-
componentId: "sc-1fsk3kr-4"
|
|
389
|
-
})(["color:", ";overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex:1 0 0px;padding:", ";border-radius:", ";", ""], themes_["variables"].contentColorActive, Object(themes_["pick"])({
|
|
390
|
-
enterprise: '3px 0 3px 10px',
|
|
391
|
-
prisma: {
|
|
392
|
-
comfortable: '10px 0 10px 0',
|
|
393
|
-
compact: '6px 0 6px 0'
|
|
394
|
-
}
|
|
395
|
-
}), Object(themes_["pick"])({
|
|
396
|
-
enterprise: '2px',
|
|
397
|
-
prisma: themes_["variables"].borderRadius
|
|
398
|
-
}), function (_ref4) {
|
|
399
|
-
var $disabled = _ref4.$disabled;
|
|
400
|
-
return $disabled && Object(themes_["pick"])({
|
|
401
|
-
enterprise: {
|
|
402
|
-
light: Object(external_styled_components_["css"])(["color:", ";"], themes_["variables"].textGray),
|
|
403
|
-
dark: Object(external_styled_components_["css"])(["color:", ";"], themes_["variables"].textGray)
|
|
404
|
-
},
|
|
405
|
-
prisma: Object(external_styled_components_["css"])(["color:", ";"], themes_["variables"].contentColorDisabled)
|
|
406
|
-
});
|
|
407
|
-
}); // for Prisma theme only
|
|
408
|
-
|
|
409
|
-
var StyledPaperClipIcon = external_styled_components_default.a.div.withConfig({
|
|
410
|
-
displayName: "ItemStyles__StyledPaperClipIcon",
|
|
411
|
-
componentId: "sc-1fsk3kr-5"
|
|
412
|
-
})(["color:", ";padding:", ";", ""], themes_["variables"].neutral400, Object(themes_["pick"])({
|
|
413
|
-
comfortable: '8px 4px 8px 0',
|
|
414
|
-
compact: '4px 4px 4px 0'
|
|
415
|
-
}), function (_ref5) {
|
|
416
|
-
var $disabled = _ref5.$disabled;
|
|
417
|
-
return $disabled && Object(external_styled_components_["css"])(["color:", ";cursor:not-allowed;"], themes_["variables"].contentColorDisabled);
|
|
418
|
-
}); // for Prisma theme only
|
|
419
|
-
|
|
420
|
-
var StyledPercentage = external_styled_components_default.a.span.withConfig({
|
|
421
|
-
displayName: "ItemStyles__StyledPercentage",
|
|
422
|
-
componentId: "sc-1fsk3kr-6"
|
|
423
|
-
})(["color:", ";"], themes_["variables"].contentColorMuted); // for Prisma theme only
|
|
424
|
-
|
|
425
|
-
var StyledProgress = external_styled_components_default.a.div.withConfig({
|
|
426
|
-
displayName: "ItemStyles__StyledProgress",
|
|
427
|
-
componentId: "sc-1fsk3kr-7"
|
|
428
|
-
})(["position:absolute;left:0;top:0;width:", "%;height:100%;background:", ";transition:width 300ms;border-radius:", ";"], function (_ref6) {
|
|
429
|
-
var $uploadPercentage = _ref6.$uploadPercentage;
|
|
430
|
-
return $uploadPercentage;
|
|
431
|
-
}, themes_["variables"].interactiveColorOverlaySelected, themes_["variables"].borderRadius);
|
|
432
|
-
|
|
433
|
-
// CONCATENATED MODULE: ./src/File/Item.tsx
|
|
434
|
-
function Item_extends() { Item_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return Item_extends.apply(this, arguments); }
|
|
435
|
-
|
|
436
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
437
|
-
|
|
438
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
var propTypes = {
|
|
455
|
-
disabled: external_prop_types_default.a.bool,
|
|
456
|
-
elementRef: external_prop_types_default.a.oneOfType([external_prop_types_default.a.func, external_prop_types_default.a.object]),
|
|
457
|
-
error: external_prop_types_default.a.bool,
|
|
458
|
-
|
|
459
|
-
/** @private */
|
|
460
|
-
index: external_prop_types_default.a.number,
|
|
461
|
-
itemId: external_prop_types_default.a.any,
|
|
462
|
-
name: external_prop_types_default.a.string.isRequired,
|
|
463
|
-
|
|
464
|
-
/** If the uploadPercentage is 0, the item is assumed to be queued. If the upload is complete or
|
|
465
|
-
* not applicable, uploadPercentage must be undefined. */
|
|
466
|
-
uploadPercentage: external_prop_types_default.a.number
|
|
467
|
-
};
|
|
468
|
-
|
|
469
|
-
function Item(_ref) {
|
|
470
|
-
var disabled = _ref.disabled,
|
|
471
|
-
_ref$error = _ref.error,
|
|
472
|
-
error = _ref$error === void 0 ? false : _ref$error,
|
|
473
|
-
itemId = _ref.itemId,
|
|
474
|
-
name = _ref.name,
|
|
475
|
-
_ref$index = _ref.index,
|
|
476
|
-
index = _ref$index === void 0 ? 0 : _ref$index,
|
|
477
|
-
uploadPercentage = _ref.uploadPercentage,
|
|
478
|
-
otherProps = _objectWithoutProperties(_ref, ["disabled", "error", "itemId", "name", "index", "uploadPercentage"]);
|
|
479
|
-
|
|
480
|
-
// @docs-props-type ItemPropsBase
|
|
481
|
-
var _useSplunkTheme = Object(themes_["useSplunkTheme"])(),
|
|
482
|
-
isPrisma = _useSplunkTheme.isPrisma,
|
|
483
|
-
isEnterprise = _useSplunkTheme.isEnterprise,
|
|
484
|
-
isCompact = _useSplunkTheme.isCompact;
|
|
485
|
-
|
|
486
|
-
var prismaSize = isCompact ? '20px' : '24px';
|
|
487
|
-
|
|
488
|
-
var _useContext = Object(external_react_["useContext"])(FileContext),
|
|
489
|
-
handleRequestRemoveContext = _useContext.onRequestRemove;
|
|
490
|
-
|
|
491
|
-
function handleRequestRemove(e) {
|
|
492
|
-
e.preventDefault();
|
|
493
|
-
handleRequestRemoveContext === null || handleRequestRemoveContext === void 0 ? void 0 : handleRequestRemoveContext({
|
|
494
|
-
itemId: itemId,
|
|
495
|
-
name: name,
|
|
496
|
-
index: index
|
|
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 = r => {
|
|
12
|
+
/******/ var t = r && r.__esModule ?
|
|
13
|
+
/******/ () => r["default"]
|
|
14
|
+
/******/ : () => r
|
|
15
|
+
/******/;
|
|
16
|
+
e.d(t, {
|
|
17
|
+
a: t
|
|
18
|
+
});
|
|
19
|
+
/******/ return t;
|
|
20
|
+
/******/ };
|
|
21
|
+
/******/ })();
|
|
22
|
+
/******/
|
|
23
|
+
/******/ /* webpack/runtime/define property getters */
|
|
24
|
+
/******/ (() => {
|
|
25
|
+
/******/ // define getter functions for harmony exports
|
|
26
|
+
/******/ e.d = (r, t) => {
|
|
27
|
+
/******/ for (var a in t) {
|
|
28
|
+
/******/ if (e.o(t, a) && !e.o(r, a)) {
|
|
29
|
+
/******/ Object.defineProperty(r, a, {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: t[a]
|
|
32
|
+
});
|
|
33
|
+
/******/ }
|
|
34
|
+
/******/ }
|
|
35
|
+
/******/ };
|
|
36
|
+
/******/ })();
|
|
37
|
+
/******/
|
|
38
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
39
|
+
/******/ (() => {
|
|
40
|
+
/******/ e.o = (e, r) => Object.prototype.hasOwnProperty.call(e, r)
|
|
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 r = {};
|
|
60
|
+
// ESM COMPAT FLAG
|
|
61
|
+
e.r(r);
|
|
62
|
+
// EXPORTS
|
|
63
|
+
e.d(r, {
|
|
64
|
+
Item: () => /* reexport */ ne,
|
|
65
|
+
default: () => /* reexport */ Fe
|
|
497
66
|
});
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
67
|
+
// CONCATENATED MODULE: external "react"
|
|
68
|
+
const t = require("react");
|
|
69
|
+
var a = e.n(t);
|
|
70
|
+
// CONCATENATED MODULE: external "prop-types"
|
|
71
|
+
const n = require("prop-types");
|
|
72
|
+
var i = e.n(n);
|
|
73
|
+
// CONCATENATED MODULE: external "lodash/debounce"
|
|
74
|
+
const o = require("lodash/debounce");
|
|
75
|
+
var l = e.n(o);
|
|
76
|
+
// CONCATENATED MODULE: external "lodash/omit"
|
|
77
|
+
const s = require("lodash/omit");
|
|
78
|
+
var c = e.n(s);
|
|
79
|
+
// CONCATENATED MODULE: external "lodash/toUpper"
|
|
80
|
+
const p = require("lodash/toUpper");
|
|
81
|
+
var d = e.n(p);
|
|
82
|
+
// CONCATENATED MODULE: external "lodash/isString"
|
|
83
|
+
const u = require("lodash/isString");
|
|
84
|
+
var v = e.n(u);
|
|
85
|
+
// CONCATENATED MODULE: external "@splunk/react-ui/EventListener"
|
|
86
|
+
const f = require("@splunk/react-ui/EventListener");
|
|
87
|
+
var m = e.n(f);
|
|
88
|
+
// CONCATENATED MODULE: external "@splunk/themes"
|
|
89
|
+
const b = require("@splunk/themes");
|
|
90
|
+
// CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
|
|
91
|
+
const h = require("@splunk/ui-utils/i18n");
|
|
92
|
+
// CONCATENATED MODULE: external "@splunk/ui-utils/id"
|
|
93
|
+
const y = require("@splunk/ui-utils/id");
|
|
94
|
+
// CONCATENATED MODULE: external "lodash/isUndefined"
|
|
95
|
+
const g = require("lodash/isUndefined");
|
|
96
|
+
var C = e.n(g);
|
|
97
|
+
// CONCATENATED MODULE: external "@splunk/react-icons/Cross"
|
|
98
|
+
const x = require("@splunk/react-icons/Cross");
|
|
99
|
+
var k = e.n(x);
|
|
100
|
+
// CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Close"
|
|
101
|
+
const w = require("@splunk/react-icons/enterprise/Close");
|
|
102
|
+
var L = e.n(w);
|
|
103
|
+
// CONCATENATED MODULE: external "@splunk/react-ui/Progress"
|
|
104
|
+
const S = require("@splunk/react-ui/Progress");
|
|
105
|
+
var O = e.n(S);
|
|
106
|
+
// CONCATENATED MODULE: external "@splunk/ui-utils/format"
|
|
107
|
+
const I = require("@splunk/ui-utils/format");
|
|
108
|
+
// CONCATENATED MODULE: ./src/File/FileContext.tsx
|
|
109
|
+
var _ = (0, t.createContext)({
|
|
110
|
+
disabled: false
|
|
509
111
|
});
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
paddingRight: '4px'
|
|
112
|
+
_.displayName = "File";
|
|
113
|
+
/* harmony default export */ const E = _;
|
|
114
|
+
// CONCATENATED MODULE: external "@splunk/react-icons/SVGEnterprise"
|
|
115
|
+
const R = require("@splunk/react-icons/SVGEnterprise");
|
|
116
|
+
var D = e.n(R);
|
|
117
|
+
// CONCATENATED MODULE: ./src/File/PaperClip.tsx
|
|
118
|
+
function q() {
|
|
119
|
+
q = Object.assign || function(e) {
|
|
120
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
121
|
+
var t = arguments[r];
|
|
122
|
+
for (var a in t) {
|
|
123
|
+
if (Object.prototype.hasOwnProperty.call(t, a)) {
|
|
124
|
+
e[a] = t[a];
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return e;
|
|
129
|
+
};
|
|
130
|
+
return q.apply(this, arguments);
|
|
530
131
|
}
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
width: "
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
})(
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
})
|
|
643
|
-
var
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
enterprise: themes_["variables"].focusShadowInset,
|
|
648
|
-
prisma: themes_["variables"].focusShadow
|
|
649
|
-
}));
|
|
650
|
-
var StyledNormalText = external_styled_components_default.a.div.withConfig({
|
|
651
|
-
displayName: "FileStyles__StyledNormalText",
|
|
652
|
-
componentId: "sc-1wyh4cf-4"
|
|
653
|
-
})(["", " ", " ", " ", ""], Object(themes_["pick"])({
|
|
654
|
-
enterprise: Object(external_styled_components_["css"])(["display:inline-block;"]),
|
|
655
|
-
prisma: Object(external_styled_components_["css"])(["display:inline-flex;flex-direction:column;justify-content:center;text-align:center;color:", ";border:1px dashed ", ";padding:8px;border-radius:", ";min-height:128px;&:not(:last-child){margin-bottom:4px;}"], themes_["variables"].contentColorActive, themes_["variables"].contentColorMuted, themes_["variables"].borderRadius)
|
|
656
|
-
}), function (_ref) {
|
|
657
|
-
var $dragOver = _ref.$dragOver;
|
|
658
|
-
return $dragOver && Object(external_styled_components_["css"])(["", ""], Object(themes_["pick"])({
|
|
659
|
-
prisma: Object(external_styled_components_["css"])(["border:1px dashed ", ";background-color:", ";"], themes_["variables"].interactiveColorPrimary, themes_["mixins"].colorWithAlpha(themes_["variables"].interactiveColorPrimary, 0.1))
|
|
660
|
-
}));
|
|
661
|
-
}, function (_ref2) {
|
|
662
|
-
var $error = _ref2.$error,
|
|
663
|
-
$dragOver = _ref2.$dragOver;
|
|
664
|
-
return $error && !$dragOver && Object(themes_["pick"])({
|
|
665
|
-
prisma: Object(external_styled_components_["css"])(["border:1px dashed ", ";color:", ";background-color:", ";"], themes_["variables"].accentColorNegative, themes_["variables"].accentColorNegative, themes_["mixins"].colorWithAlpha(themes_["variables"].accentColorNegative, 0.1))
|
|
666
|
-
});
|
|
667
|
-
}, function (_ref3) {
|
|
668
|
-
var $disabled = _ref3.$disabled;
|
|
669
|
-
return $disabled && Object(external_styled_components_["css"])(["border:none;min-height:0;color:", ";cursor:not-allowed;"], Object(themes_["pick"])({
|
|
670
|
-
prisma: themes_["variables"].contentColorDisabled
|
|
671
|
-
}));
|
|
672
|
-
});
|
|
673
|
-
var StyledWindowText = external_styled_components_default.a.div.withConfig({
|
|
674
|
-
displayName: "FileStyles__StyledWindowText",
|
|
675
|
-
componentId: "sc-1wyh4cf-5"
|
|
676
|
-
})(["margin-top:", ";margin-bottom:", ";font-size:", ";", ""], Object(themes_["pick"])({
|
|
677
|
-
enterprise: Object(external_styled_components_["css"])(["calc(", " * 4)"], themes_["variables"].spacing),
|
|
678
|
-
prisma: Object(external_styled_components_["css"])(["calc(", " * 4)"], themes_["variables"].spacingLarge)
|
|
679
|
-
}), Object(themes_["pick"])({
|
|
680
|
-
enterprise: themes_["variables"].spacingHalf,
|
|
681
|
-
prisma: themes_["variables"].spacingMedium
|
|
682
|
-
}), themes_["variables"].fontSizeXLarge, Object(themes_["pick"])({
|
|
683
|
-
prisma: Object(external_styled_components_["css"])(["color:", ";"], themes_["variables"].contentColorActive)
|
|
684
|
-
}));
|
|
685
|
-
var StyledSubtitle = external_styled_components_default.a.div.withConfig({
|
|
686
|
-
displayName: "FileStyles__StyledSubtitle",
|
|
687
|
-
componentId: "sc-1wyh4cf-6"
|
|
688
|
-
})(["color:", ";padding:4px 8px;font-size:12px;line-height:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"], themes_["variables"].contentColorMuted);
|
|
689
|
-
var StyledHelp = external_styled_components_default.a.div.withConfig({
|
|
690
|
-
displayName: "FileStyles__StyledHelp",
|
|
691
|
-
componentId: "sc-1wyh4cf-7"
|
|
692
|
-
})(["margin-bottom:", ";"], Object(themes_["pick"])({
|
|
693
|
-
enterprise: themes_["variables"].spacingXLarge,
|
|
694
|
-
prisma: Object(external_styled_components_["css"])(["calc(", " * 1.5)"], themes_["variables"].spacingLarge)
|
|
695
|
-
}));
|
|
696
|
-
var StyledWindowDrop = external_styled_components_default.a.div.withConfig({
|
|
697
|
-
displayName: "FileStyles__StyledWindowDrop",
|
|
698
|
-
componentId: "sc-1wyh4cf-8"
|
|
699
|
-
})(["position:fixed;top:0;left:0;right:0;bottom:0;border:", ";z-index:", " + 10;"], Object(themes_["pick"])({
|
|
700
|
-
enterprise: "5px solid ".concat(themes_["variables"].accentColorL10),
|
|
701
|
-
prisma: "5px solid ".concat(themes_["variables"].interactiveColorPrimary)
|
|
702
|
-
}), themes_["variables"].zindexModal);
|
|
703
|
-
var StyledDropNormalTargetBox = external_styled_components_default()(Box_default.a).withConfig({
|
|
704
|
-
displayName: "FileStyles__StyledDropNormalTargetBox",
|
|
705
|
-
componentId: "sc-1wyh4cf-9"
|
|
706
|
-
})(["", ";flex-direction:column;justify-content:center;text-align:center;border-radius:", ";", " ", " ", " ", " ", " ", ""], themes_["mixins"].reset('flex'), themes_["variables"].borderRadius, Object(themes_["pick"])({
|
|
707
|
-
enterprise: Object(external_styled_components_["css"])(["line-height:calc(", " - 2px);"], themes_["variables"].inputHeight)
|
|
708
|
-
}), Object(themes_["pick"])({
|
|
709
|
-
enterprise: {
|
|
710
|
-
comfortable: Object(external_styled_components_["css"])(["min-height:73px;padding:", ";"], themes_["variables"].spacingQuarter),
|
|
711
|
-
compact: Object(external_styled_components_["css"])(["min-height:63px;padding:3px;"])
|
|
712
|
-
}
|
|
713
|
-
}), Object(themes_["pick"])({
|
|
714
|
-
enterprise: {
|
|
715
|
-
light: Object(external_styled_components_["css"])(["border:1px dashed ", ";"], themes_["variables"].borderColor),
|
|
716
|
-
dark: Object(external_styled_components_["css"])(["border:1px dashed ", ";"], themes_["variables"].textGray)
|
|
717
|
-
}
|
|
718
|
-
}), function (_ref4) {
|
|
719
|
-
var $dragOver = _ref4.$dragOver;
|
|
720
|
-
return $dragOver && Object(themes_["pick"])({
|
|
721
|
-
enterprise: Object(external_styled_components_["css"])(["border:1px solid ", ";"], themes_["variables"].accentColorL10)
|
|
722
|
-
});
|
|
723
|
-
}, function (_ref5) {
|
|
724
|
-
var $error = _ref5.$error,
|
|
725
|
-
$dragOver = _ref5.$dragOver;
|
|
726
|
-
return $error && !$dragOver && Object(themes_["pick"])({
|
|
727
|
-
enterprise: Object(external_styled_components_["css"])(["border:1px solid ", ";"], themes_["variables"].errorColor)
|
|
728
|
-
});
|
|
729
|
-
}, function (_ref6) {
|
|
730
|
-
var $disabled = _ref6.$disabled,
|
|
731
|
-
$fileCount = _ref6.$fileCount;
|
|
732
|
-
return $disabled && Object(external_styled_components_["css"])(["border:", ";color:", ";cursor:not-allowed;", " ", ""], Object(themes_["pick"])({
|
|
733
|
-
enterprise: 'none',
|
|
734
|
-
prisma: "1px solid ".concat(themes_["variables"].contentColorDisabled)
|
|
735
|
-
}), Object(themes_["pick"])({
|
|
736
|
-
enterprise: themes_["variables"].textGray,
|
|
737
|
-
prisma: themes_["variables"].contentColorDisabled
|
|
738
|
-
}), $fileCount === 0 && Object(themes_["pick"])({
|
|
739
|
-
enterprise: {
|
|
740
|
-
light: Object(external_styled_components_["css"])(["background-color:", ";"], themes_["variables"].gray96),
|
|
741
|
-
dark: Object(external_styled_components_["css"])(["background-color:", ";"], themes_["variables"].gray60)
|
|
742
|
-
},
|
|
743
|
-
prisma: Object(external_styled_components_["css"])(["border:1px dashed ", ";min-height:128px;"], themes_["variables"].contentColorDisabled)
|
|
744
|
-
}), $fileCount !== 0 && Object(themes_["pick"])({
|
|
745
|
-
prisma: Object(external_styled_components_["css"])(["", "{padding:0;}"],
|
|
746
|
-
/* sc-sel */
|
|
747
|
-
StyledNormalText)
|
|
748
|
-
}));
|
|
749
|
-
});
|
|
750
|
-
var StyledWindowDropTargetBox = external_styled_components_default()(Box_default.a).withConfig({
|
|
751
|
-
displayName: "FileStyles__StyledWindowDropTargetBox",
|
|
752
|
-
componentId: "sc-1wyh4cf-10"
|
|
753
|
-
})(["position:relative;text-align:center;min-height:250px;padding:", ";", ""], themes_["variables"].spacingLarge, function (_ref7) {
|
|
754
|
-
var $disabled = _ref7.$disabled;
|
|
755
|
-
return $disabled && Object(external_styled_components_["css"])(["color:", ";"], Object(themes_["pick"])({
|
|
756
|
-
enterprise: themes_["variables"].textGray,
|
|
757
|
-
prisma: themes_["variables"].contentColorMuted
|
|
758
|
-
}));
|
|
759
|
-
});
|
|
760
|
-
|
|
761
|
-
// CONCATENATED MODULE: ./src/File/File.tsx
|
|
762
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
763
|
-
|
|
764
|
-
function File_extends() { File_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return File_extends.apply(this, arguments); }
|
|
765
|
-
|
|
766
|
-
function File_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = File_objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
767
|
-
|
|
768
|
-
function File_objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
769
|
-
|
|
770
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
771
|
-
|
|
772
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
773
|
-
|
|
774
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
775
|
-
|
|
776
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
777
|
-
|
|
778
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
779
|
-
|
|
780
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
781
|
-
|
|
782
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
783
|
-
|
|
784
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
785
|
-
|
|
786
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
787
|
-
|
|
788
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
789
|
-
|
|
790
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
/** @public */
|
|
806
|
-
|
|
807
|
-
var File_propTypes = {
|
|
808
|
-
accept: external_prop_types_default.a.string,
|
|
809
|
-
allowMultiple: external_prop_types_default.a.bool,
|
|
810
|
-
children: external_prop_types_default.a.node,
|
|
811
|
-
disabled: external_prop_types_default.a.bool,
|
|
812
|
-
dropAnywhere: external_prop_types_default.a.bool,
|
|
813
|
-
elementRef: external_prop_types_default.a.oneOfType([external_prop_types_default.a.func, external_prop_types_default.a.object]),
|
|
814
|
-
fullscreen: external_prop_types_default.a.bool,
|
|
815
|
-
error: external_prop_types_default.a.bool,
|
|
816
|
-
help: external_prop_types_default.a.node,
|
|
817
|
-
name: external_prop_types_default.a.string,
|
|
818
|
-
onRequestAdd: external_prop_types_default.a.func,
|
|
819
|
-
onRequestRemove: external_prop_types_default.a.func,
|
|
820
|
-
onRequestRetry: external_prop_types_default.a.func,
|
|
821
|
-
|
|
822
|
-
/** @private. */
|
|
823
|
-
required: external_prop_types_default.a.bool,
|
|
824
|
-
supportsMessage: external_prop_types_default.a.node,
|
|
825
|
-
|
|
826
|
-
/** @private */
|
|
827
|
-
splunkTheme: external_prop_types_default.a.object
|
|
828
|
-
};
|
|
829
|
-
var defaultProps = {
|
|
830
|
-
allowMultiple: false,
|
|
831
|
-
disabled: false,
|
|
832
|
-
dropAnywhere: false,
|
|
833
|
-
error: false
|
|
834
|
-
};
|
|
835
|
-
|
|
836
|
-
/**
|
|
837
|
-
* File provides the ability to accept files and present uploaded files. It does not provide
|
|
838
|
-
* file readers, only a reference to the file. This can be used to post binary content, or
|
|
839
|
-
* upload using an array buffer.
|
|
840
|
-
*/
|
|
841
|
-
var File_File = /*#__PURE__*/function (_Component) {
|
|
842
|
-
_inherits(File, _Component);
|
|
843
|
-
|
|
844
|
-
var _super = _createSuper(File);
|
|
845
|
-
|
|
846
|
-
// @docs-props-type FilePropsBase
|
|
847
|
-
function File(props) {
|
|
848
|
-
var _this;
|
|
849
|
-
|
|
850
|
-
_classCallCheck(this, File);
|
|
851
|
-
|
|
852
|
-
_this = _super.call(this, props);
|
|
853
|
-
|
|
854
|
-
_defineProperty(_assertThisInitialized(_this), "inputId", void 0);
|
|
855
|
-
|
|
856
|
-
_defineProperty(_assertThisInitialized(_this), "inputCount", void 0);
|
|
857
|
-
|
|
858
|
-
_defineProperty(_assertThisInitialized(_this), "handleInputChange", function (e) {
|
|
859
|
-
var _e$currentTarget$file;
|
|
860
|
-
|
|
861
|
-
_this.addFiles((_e$currentTarget$file = e.currentTarget.files) !== null && _e$currentTarget$file !== void 0 ? _e$currentTarget$file : undefined);
|
|
862
|
-
});
|
|
863
|
-
|
|
864
|
-
_defineProperty(_assertThisInitialized(_this), "handleInputFocus", function () {
|
|
865
|
-
_this.setState({
|
|
866
|
-
focusedInput: true
|
|
867
|
-
});
|
|
868
|
-
});
|
|
869
|
-
|
|
870
|
-
_defineProperty(_assertThisInitialized(_this), "handleInputBlur", function () {
|
|
871
|
-
_this.setState({
|
|
872
|
-
focusedInput: false
|
|
873
|
-
});
|
|
874
|
-
});
|
|
875
|
-
|
|
876
|
-
_defineProperty(_assertThisInitialized(_this), "handleDragOver", function (e) {
|
|
877
|
-
if (!_this.state.dragOver) {
|
|
878
|
-
_this.setState({
|
|
879
|
-
dragOver: true
|
|
132
|
+
function j(e) {
|
|
133
|
+
|
|
134
|
+
return a().createElement(D(), q({
|
|
135
|
+
hideDefaultTooltip: true,
|
|
136
|
+
viewBox: "0 0 16 16",
|
|
137
|
+
width: "16px",
|
|
138
|
+
height: "16px"
|
|
139
|
+
}, e), a().createElement("path", {
|
|
140
|
+
d: "M8.624 14.7021C8.23332 15.0928 7.59989 15.0928 7.2092 14.7021L2.33962 9.83209C0.546941 8.03927 0.54695 5.1325 2.33964 3.33968C4.13162 1.54758 7.03672 1.54684 8.82962 3.33802L14.1746 8.67787C15.2682 9.77043 15.2687 11.5429 14.1756 12.636C13.083 13.7288 11.3115 13.7288 10.2189 12.636L4.87676 7.29338C4.48607 6.90266 4.48607 6.26917 4.87676 5.87845C5.26744 5.48773 5.90087 5.48773 6.29155 5.87845L11.6337 11.2211C11.9449 11.5324 12.4496 11.5324 12.7608 11.2211C13.0722 10.9097 13.0721 10.4048 12.7606 10.0936L7.41557 4.75369C6.40415 3.74325 4.76532 3.74367 3.75442 4.75463C2.74312 5.766 2.74312 7.40578 3.75441 8.41715L8.62399 13.2871C9.01468 13.6779 9.01468 14.3113 8.624 14.7021Z",
|
|
141
|
+
fill: "currentColor"
|
|
142
|
+
}));
|
|
143
|
+
}
|
|
144
|
+
// CONCATENATED MODULE: ./src/File/Retry.tsx
|
|
145
|
+
function P() {
|
|
146
|
+
P = Object.assign || function(e) {
|
|
147
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
148
|
+
var t = arguments[r];
|
|
149
|
+
for (var a in t) {
|
|
150
|
+
if (Object.prototype.hasOwnProperty.call(t, a)) {
|
|
151
|
+
e[a] = t[a];
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return e;
|
|
156
|
+
};
|
|
157
|
+
return P.apply(this, arguments);
|
|
158
|
+
}
|
|
159
|
+
function T(e) {
|
|
160
|
+
var r = (0, b.useSplunkTheme)(), t = r.density;
|
|
161
|
+
var n = t === "compact" ? "20px" : "24px";
|
|
162
|
+
|
|
163
|
+
return a().createElement(D(), P({
|
|
164
|
+
hideDefaultTooltip: true,
|
|
165
|
+
viewBox: "0 0 24 24",
|
|
166
|
+
width: n,
|
|
167
|
+
height: n
|
|
168
|
+
}, e), a().createElement("path", {
|
|
169
|
+
d: "M18.2685 14.3175L18.4349 14.9384C18.6078 14.558 18.7453 14.162 18.8452 13.7556C18.9449 13.3507 19.0068 12.9373 19.0303 12.521L19.0362 12.4167C19.0663 11.883 19.0409 11.3476 18.9604 10.8191L18.9462 10.7261C18.8794 10.287 18.7695 9.85559 18.6181 9.43803C18.4827 9.06459 18.3148 8.70378 18.1162 8.35979L18.0868 8.30889C17.8331 7.86964 17.5281 7.46215 17.1781 7.09503C16.9596 6.8658 16.7243 6.65314 16.4743 6.4588L16.318 6.33739C16.0132 6.10052 15.6825 5.88712 15.34 5.70564C14.95 5.49901 14.5348 5.32943 14.1132 5.20545C13.7201 5.08986 13.317 5.01136 12.9093 4.97099L12.8406 4.96419C12.4182 4.92237 11.993 4.91829 11.5699 4.95201C11.1331 4.98682 10.7005 5.06176 10.2774 5.17589L9.70069 5.33148C9.16747 5.47533 8.61859 5.15969 8.47474 4.62647C8.33089 4.09324 8.64653 3.54437 9.17976 3.40051L9.7565 3.24492C10.298 3.09883 10.8519 3.00289 11.411 2.95833C11.9526 2.91517 12.497 2.92038 13.0377 2.97392L13.1063 2.98072C13.6384 3.03341 14.1644 3.13584 14.6774 3.28668C15.2296 3.44906 15.7694 3.66976 16.2764 3.9384C16.7197 4.17329 17.1479 4.44938 17.5453 4.75819L17.7015 4.8796C18.0299 5.13478 18.3388 5.41401 18.6257 5.715C19.0853 6.19704 19.4858 6.73209 19.8188 7.30885L19.8482 7.35975C20.1055 7.80535 20.323 8.27272 20.4984 8.75646C20.6944 9.29736 20.8368 9.85624 20.9234 10.425L20.9376 10.518C21.0389 11.1833 21.0709 11.8573 21.033 12.5293L21.0271 12.6335C20.9967 13.1731 20.9164 13.7087 20.7873 14.2334C20.6488 14.7966 20.4548 15.3442 20.2083 15.8683L20.718 15.7317C21.2515 15.5888 21.7998 15.9054 21.9428 16.4389C22.0857 16.9723 21.7691 17.5207 21.2356 17.6636L18.8208 18.3106C18.0206 18.525 17.1981 18.0501 16.9837 17.2499L16.3367 14.8352C16.1937 14.3017 16.5103 13.7534 17.0438 13.6104C17.5773 13.4675 18.1256 13.7841 18.2685 14.3175ZM3.92363 7.90992L3.33327 8.06809C2.7998 8.21103 2.25147 7.89443 2.10854 7.36097C1.9656 6.8275 2.2822 6.27917 2.81566 6.13623L5.2305 5.48922C6.03069 5.27483 6.85318 5.7497 7.06759 6.54989L7.71463 8.96466C7.85757 9.49813 7.54099 10.0465 7.00752 10.1894C6.47405 10.3324 5.92572 10.0158 5.78278 9.4823L5.64111 8.9536C5.46988 9.32312 5.33225 9.70767 5.23007 10.1026C5.1256 10.5063 5.05872 10.9189 5.03027 11.3349L5.02314 11.4391C4.98667 11.9725 5.00567 12.5081 5.07982 13.0376L5.09286 13.1307C5.15447 13.5705 5.25921 14.0032 5.40556 14.4226C5.53644 14.7976 5.70008 15.1604 5.89456 15.5068L5.92334 15.558C6.17169 16.0003 6.47181 16.4114 6.81738 16.7826C7.03315 17.0145 7.26586 17.2299 7.51359 17.4273L7.66835 17.5505C7.97029 17.791 8.29849 18.0084 8.63879 18.1939C9.02626 18.4052 9.43938 18.5797 9.8595 18.7088C10.2512 18.829 10.6533 18.9124 11.0605 18.9576L11.1291 18.9652C11.551 19.0121 11.9761 19.0213 12.3996 18.9926C12.8368 18.963 13.2703 18.8933 13.6946 18.7842L14.2732 18.6355C14.8081 18.4981 15.3532 18.8202 15.4906 19.3552C15.6281 19.8901 15.3059 20.4351 14.771 20.5726L14.1924 20.7213C13.6492 20.8609 13.0943 20.9502 12.5346 20.988C11.9925 21.0247 11.4483 21.013 10.9083 20.953L10.8397 20.9454C10.3082 20.8863 9.78352 20.7776 9.27238 20.6206C8.72212 20.4517 8.18505 20.2245 7.68131 19.9498C7.24086 19.7097 6.81595 19.4285 6.42229 19.1149L6.26753 18.9917C5.94226 18.7326 5.6367 18.4497 5.35338 18.1453C4.89963 17.6578 4.50556 17.118 4.17948 16.5373L4.1507 16.486C3.89877 16.0374 3.6868 15.5674 3.51725 15.0816C3.32768 14.5384 3.192 13.9779 3.1122 13.4081L3.09915 13.315C3.0058 12.6485 2.98189 11.9741 3.0278 11.3027L3.03493 11.1985C3.07179 10.6594 3.15847 10.1248 3.29383 9.60161C3.44505 9.01718 3.65617 8.4503 3.92363 7.90992Z",
|
|
170
|
+
fill: "currentColor"
|
|
171
|
+
}));
|
|
172
|
+
}
|
|
173
|
+
// CONCATENATED MODULE: ./src/File/Trash.tsx
|
|
174
|
+
function $() {
|
|
175
|
+
$ = Object.assign || function(e) {
|
|
176
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
177
|
+
var t = arguments[r];
|
|
178
|
+
for (var a in t) {
|
|
179
|
+
if (Object.prototype.hasOwnProperty.call(t, a)) {
|
|
180
|
+
e[a] = t[a];
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return e;
|
|
185
|
+
};
|
|
186
|
+
return $.apply(this, arguments);
|
|
187
|
+
}
|
|
188
|
+
function N(e) {
|
|
189
|
+
var r = (0, b.useSplunkTheme)(), t = r.density;
|
|
190
|
+
var n = t === "compact" ? "20px" : "24px";
|
|
191
|
+
|
|
192
|
+
return a().createElement(D(), $({
|
|
193
|
+
hideDefaultTooltip: true,
|
|
194
|
+
viewBox: "0 0 24 24",
|
|
195
|
+
width: n,
|
|
196
|
+
height: n
|
|
197
|
+
}, e), a().createElement("path", {
|
|
198
|
+
d: "M10 4V6H14V4H10ZM16 6H17H19H20C20.5523 6 21 6.44772 21 7C21 7.55228 20.5523 8 20 8H19V20.5C19 21.3284 18.3284 22 17.5 22H6.5C5.67157 22 5 21.3284 5 20.5V8H4C3.44772 8 3 7.55228 3 7C3 6.44772 3.44772 6 4 6H5H7H8V3.5C8 2.67157 8.67157 2 9.5 2H14.5C15.3284 2 16 2.67157 16 3.5V6ZM7 8V20H17V8H7ZM10.5858 14L9.2929 15.2929C8.90237 15.6834 8.90237 16.3166 9.2929 16.7071C9.68342 17.0976 10.3166 17.0976 10.7071 16.7071L12 15.4142L13.2929 16.7071C13.6834 17.0976 14.3166 17.0976 14.7071 16.7071C15.0976 16.3166 15.0976 15.6834 14.7071 15.2929L13.4142 14L14.7071 12.7071C15.0976 12.3166 15.0976 11.6834 14.7071 11.2929C14.3166 10.9024 13.6834 10.9024 13.2929 11.2929L12 12.5858L10.7071 11.2929C10.3166 10.9024 9.68342 10.9024 9.29289 11.2929C8.90237 11.6834 8.90237 12.3166 9.29289 12.7071L10.5858 14Z",
|
|
199
|
+
fill: "currentColor"
|
|
200
|
+
}));
|
|
201
|
+
}
|
|
202
|
+
// CONCATENATED MODULE: external "styled-components"
|
|
203
|
+
const M = require("styled-components");
|
|
204
|
+
var F = e.n(M);
|
|
205
|
+
// CONCATENATED MODULE: external "@splunk/react-ui/Box"
|
|
206
|
+
const H = require("@splunk/react-ui/Box");
|
|
207
|
+
var A = e.n(H);
|
|
208
|
+
// CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
|
|
209
|
+
const B = require("@splunk/react-ui/Clickable");
|
|
210
|
+
var z = e.n(B);
|
|
211
|
+
// CONCATENATED MODULE: external "@splunk/themes/mixins"
|
|
212
|
+
const V = require("@splunk/themes/mixins");
|
|
213
|
+
// CONCATENATED MODULE: ./src/File/ItemStyles.ts
|
|
214
|
+
var Z = F()(A()).withConfig({
|
|
215
|
+
displayName: "ItemStyles__StyledBox",
|
|
216
|
+
componentId: "sc-1fsk3kr-0"
|
|
217
|
+
})([ "position:relative;width:100%;max-width:400px;margin:", ";background-color:", ";border-radius:", ";min-height:32px;color:", ";", " ", " ", " ", ";" ], (0,
|
|
218
|
+
b.pick)({
|
|
219
|
+
enterprise: "5px auto 0",
|
|
220
|
+
prisma: {
|
|
221
|
+
comfortable: "8px auto 0",
|
|
222
|
+
compact: "4px auto 0"
|
|
223
|
+
}
|
|
224
|
+
}), (0, b.pick)({
|
|
225
|
+
enterprise: {
|
|
226
|
+
light: b.variables.gray92,
|
|
227
|
+
dark: b.variables.gray45
|
|
228
|
+
},
|
|
229
|
+
prisma: b.variables.interactiveColorBackground
|
|
230
|
+
}), (0, b.pick)({
|
|
231
|
+
enterprise: "2px",
|
|
232
|
+
prisma: b.variables.borderRadius
|
|
233
|
+
}), (0, b.pick)({
|
|
234
|
+
enterprise: b.variables.textGray,
|
|
235
|
+
prisma: b.variables.contentColorDefault
|
|
236
|
+
}), (0, b.pick)({
|
|
237
|
+
prisma: (0, M.css)([ "border:1px solid ", ";padding-left:12px;" ], b.variables.neutral200),
|
|
238
|
+
enterprise: (0, M.css)([ "line-height:24px;" ])
|
|
239
|
+
}), (0, b.pick)({
|
|
240
|
+
enterprise: {
|
|
241
|
+
compact: (0, M.css)([ "min-height:24px;" ])
|
|
242
|
+
}
|
|
243
|
+
}), (function(e) {
|
|
244
|
+
var r = e.$error;
|
|
245
|
+
return r && (0, b.pick)({
|
|
246
|
+
enterprise: (0, M.css)([ "box-shadow:inset 0 0 0 1px ", ";" ], b.variables.errorColor),
|
|
247
|
+
prisma: (0, M.css)([ "box-shadow:inset 0 0 0 1px ", ";background-color:", ";" ], b.variables.accentColorNegative, b.variables.interactiveColorBackground)
|
|
880
248
|
});
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
});
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
249
|
+
}), (function(e) {
|
|
250
|
+
var r = e.$disabled;
|
|
251
|
+
return r && (0, M.css)([ "cursor:not-allowed;background-color:", ";" ], (0, b.pick)({
|
|
252
|
+
enterprise: {
|
|
253
|
+
dark: b.variables.gray60,
|
|
254
|
+
light: b.variables.gray96
|
|
255
|
+
},
|
|
256
|
+
prisma: (0, V.overlayColors)(b.variables.interactiveColorBackground, b.variables.interactiveColorBackgroundDisabled)
|
|
257
|
+
}));
|
|
258
|
+
}));
|
|
259
|
+
var G = F().div.withConfig({
|
|
260
|
+
displayName: "ItemStyles__StyledErrorText",
|
|
261
|
+
componentId: "sc-1fsk3kr-1"
|
|
262
|
+
})([ "font-size:", ";color:", ";line-height:16px;margin-top:4px;text-align:left;" ], b.variables.fontSizeSmall, b.variables.accentColorNegative);
|
|
263
|
+
var W = F()(z()).withConfig({
|
|
264
|
+
displayName: "ItemStyles__StyledIconClickable",
|
|
265
|
+
componentId: "sc-1fsk3kr-2"
|
|
266
|
+
})([ "color:", ";border-radius:", ";padding:", ";text-align:center;", " ", " &:focus{color:", ";", "}&:hover{background-color:", ";color:", ";}" ], (0,
|
|
267
|
+
b.pick)({
|
|
268
|
+
enterprise: "inherit",
|
|
269
|
+
prisma: b.variables.contentColorDefault
|
|
270
|
+
}), (0, b.pick)({
|
|
271
|
+
enterprise: "0 2px 2px 0",
|
|
272
|
+
prisma: "50%"
|
|
273
|
+
}), (0, b.pick)({
|
|
274
|
+
enterprise: "3px 0",
|
|
275
|
+
prisma: {
|
|
276
|
+
comfortable: "0 8px",
|
|
277
|
+
compact: "0 6px"
|
|
278
|
+
}
|
|
279
|
+
}), (0, b.pick)({
|
|
280
|
+
enterprise: (0, M.css)([ "flex-basis:", ";" ], b.variables.inputHeight)
|
|
281
|
+
}), (function(e) {
|
|
282
|
+
var r = e.$error;
|
|
283
|
+
return r && (0, M.css)([ "", "" ], (0, b.pick)({
|
|
284
|
+
enterprise: (0, M.css)([ "border:1px solid ", ";border-left:none;" ], b.variables.errorColor)
|
|
285
|
+
}));
|
|
286
|
+
}), (0, b.pick)({
|
|
287
|
+
enterprise: b.variables.linkColor,
|
|
288
|
+
prisma: b.variables.contentColorActive
|
|
289
|
+
}), (0, b.pick)({
|
|
290
|
+
enterprise: (0, M.css)([ "box-shadow:", ";" ], b.variables.focusShadow),
|
|
291
|
+
prisma: (0, M.css)([ "background-color:", ";box-shadow:0 0 0 3px ", ";" ], b.variables.interactiveColorOverlayHover, b.variables.focusColor)
|
|
292
|
+
}), (0, b.pick)({
|
|
293
|
+
enterprise: {
|
|
294
|
+
light: b.variables.gray96,
|
|
295
|
+
dark: b.variables.gray30
|
|
296
|
+
},
|
|
297
|
+
prisma: b.variables.interactiveColorOverlayHover
|
|
298
|
+
}), (0, b.pick)({
|
|
299
|
+
enterprise: b.variables.linkColor,
|
|
300
|
+
prisma: b.variables.contentColorActive
|
|
301
|
+
}));
|
|
302
|
+
// for Prisma theme only
|
|
303
|
+
var U = F()(z()).withConfig({
|
|
304
|
+
displayName: "ItemStyles__StyledTrashIcon",
|
|
305
|
+
componentId: "sc-1fsk3kr-3"
|
|
306
|
+
})([ "color:", ";border-radius:50%;padding:", ";margin-right:", ";text-align:center;&:focus{color:", ";background-color:", ";box-shadow:0 0 0 3px ", ";}&:hover{background-color:", ";color:", ";}" ], b.variables.contentColorDefault, (0,
|
|
307
|
+
b.pick)({
|
|
308
|
+
comfortable: "0 8px",
|
|
309
|
+
compact: "0 6px"
|
|
310
|
+
}), (0, b.pick)({
|
|
311
|
+
comfortable: "0 4px",
|
|
312
|
+
compact: "0 6px"
|
|
313
|
+
}), b.variables.contentColorActive, b.variables.interactiveColorOverlayHover, b.variables.focusColor, b.variables.interactiveColorOverlayHover, b.variables.contentColorActive);
|
|
314
|
+
var X = F().div.withConfig({
|
|
315
|
+
displayName: "ItemStyles__StyledLabel",
|
|
316
|
+
componentId: "sc-1fsk3kr-4"
|
|
317
|
+
})([ "color:", ";overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex:1 0 0px;padding:", ";border-radius:", ";", "" ], b.variables.contentColorActive, (0,
|
|
318
|
+
b.pick)({
|
|
319
|
+
enterprise: "3px 0 3px 10px",
|
|
320
|
+
prisma: {
|
|
321
|
+
comfortable: "10px 0 10px 0",
|
|
322
|
+
compact: "6px 0 6px 0"
|
|
323
|
+
}
|
|
324
|
+
}), (0, b.pick)({
|
|
325
|
+
enterprise: "2px",
|
|
326
|
+
prisma: b.variables.borderRadius
|
|
327
|
+
}), (function(e) {
|
|
328
|
+
var r = e.$disabled;
|
|
329
|
+
return r && (0, b.pick)({
|
|
330
|
+
enterprise: {
|
|
331
|
+
light: (0, M.css)([ "color:", ";" ], b.variables.textGray),
|
|
332
|
+
dark: (0, M.css)([ "color:", ";" ], b.variables.textGray)
|
|
333
|
+
},
|
|
334
|
+
prisma: (0, M.css)([ "color:", ";" ], b.variables.contentColorDisabled)
|
|
335
|
+
});
|
|
336
|
+
}));
|
|
337
|
+
// for Prisma theme only
|
|
338
|
+
var Q = F().div.withConfig({
|
|
339
|
+
displayName: "ItemStyles__StyledPaperClipIcon",
|
|
340
|
+
componentId: "sc-1fsk3kr-5"
|
|
341
|
+
})([ "color:", ";padding:", ";", "" ], b.variables.neutral400, (0, b.pick)({
|
|
342
|
+
comfortable: "8px 4px 8px 0",
|
|
343
|
+
compact: "4px 4px 4px 0"
|
|
344
|
+
}), (function(e) {
|
|
345
|
+
var r = e.$disabled;
|
|
346
|
+
return r && (0, M.css)([ "color:", ";cursor:not-allowed;" ], b.variables.contentColorDisabled);
|
|
347
|
+
}));
|
|
348
|
+
// for Prisma theme only
|
|
349
|
+
var J = F().span.withConfig({
|
|
350
|
+
displayName: "ItemStyles__StyledPercentage",
|
|
351
|
+
componentId: "sc-1fsk3kr-6"
|
|
352
|
+
})([ "color:", ";" ], b.variables.contentColorMuted);
|
|
353
|
+
// for Prisma theme only
|
|
354
|
+
var K = F().div.withConfig({
|
|
355
|
+
displayName: "ItemStyles__StyledProgress",
|
|
356
|
+
componentId: "sc-1fsk3kr-7"
|
|
357
|
+
})([ "position:absolute;left:0;top:0;width:", "%;height:100%;background:", ";transition:width 300ms;border-radius:", ";" ], (function(e) {
|
|
358
|
+
var r = e.$uploadPercentage;
|
|
359
|
+
return r;
|
|
360
|
+
}), b.variables.interactiveColorOverlaySelected, b.variables.borderRadius);
|
|
361
|
+
// CONCATENATED MODULE: ./src/File/Item.tsx
|
|
362
|
+
function Y() {
|
|
363
|
+
Y = Object.assign || function(e) {
|
|
364
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
365
|
+
var t = arguments[r];
|
|
366
|
+
for (var a in t) {
|
|
367
|
+
if (Object.prototype.hasOwnProperty.call(t, a)) {
|
|
368
|
+
e[a] = t[a];
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
return e;
|
|
373
|
+
};
|
|
374
|
+
return Y.apply(this, arguments);
|
|
375
|
+
}
|
|
376
|
+
function ee(e, r) {
|
|
377
|
+
if (e == null) return {};
|
|
378
|
+
var t = re(e, r);
|
|
379
|
+
var a, n;
|
|
380
|
+
if (Object.getOwnPropertySymbols) {
|
|
381
|
+
var i = Object.getOwnPropertySymbols(e);
|
|
382
|
+
for (n = 0; n < i.length; n++) {
|
|
383
|
+
a = i[n];
|
|
384
|
+
if (r.indexOf(a) >= 0) continue;
|
|
385
|
+
if (!Object.prototype.propertyIsEnumerable.call(e, a)) continue;
|
|
386
|
+
t[a] = e[a];
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
return t;
|
|
390
|
+
}
|
|
391
|
+
function re(e, r) {
|
|
392
|
+
if (e == null) return {};
|
|
393
|
+
var t = {};
|
|
394
|
+
var a = Object.keys(e);
|
|
395
|
+
var n, i;
|
|
396
|
+
for (i = 0; i < a.length; i++) {
|
|
397
|
+
n = a[i];
|
|
398
|
+
if (r.indexOf(n) >= 0) continue;
|
|
399
|
+
t[n] = e[n];
|
|
400
|
+
}
|
|
401
|
+
return t;
|
|
402
|
+
}
|
|
403
|
+
var te = {
|
|
404
|
+
disabled: i().bool,
|
|
405
|
+
elementRef: i().oneOfType([ i().func, i().object ]),
|
|
406
|
+
error: i().bool,
|
|
407
|
+
/** @private */
|
|
408
|
+
index: i().number,
|
|
409
|
+
itemId: i().any,
|
|
410
|
+
name: i().string.isRequired,
|
|
411
|
+
/** If the uploadPercentage is 0, the item is assumed to be queued. If the upload is complete or
|
|
412
|
+
* not applicable, uploadPercentage must be undefined. */
|
|
413
|
+
uploadPercentage: i().number
|
|
905
414
|
};
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
415
|
+
function ae(e) {
|
|
416
|
+
var r = e.disabled, n = e.error, i = n === void 0 ? false : n, o = e.itemId, l = e.name, s = e.index, c = s === void 0 ? 0 : s, p = e.uploadPercentage, d = ee(e, [ "disabled", "error", "itemId", "name", "index", "uploadPercentage" ]);
|
|
417
|
+
// @docs-props-type ItemPropsBase
|
|
418
|
+
var u = (0, b.useSplunkTheme)(), v = u.isPrisma, f = u.isEnterprise, m = u.isCompact;
|
|
419
|
+
var y = m ? "20px" : "24px";
|
|
420
|
+
var g = (0, t.useContext)(_), x = g.onRequestRemove;
|
|
421
|
+
function w(e) {
|
|
422
|
+
e.preventDefault();
|
|
423
|
+
x === null || x === void 0 ? void 0 : x({
|
|
424
|
+
itemId: o,
|
|
425
|
+
name: l,
|
|
426
|
+
index: c
|
|
427
|
+
});
|
|
428
|
+
}
|
|
429
|
+
var S = (0, t.useContext)(_), E = S.onRequestRetry;
|
|
430
|
+
function R(e) {
|
|
431
|
+
e.preventDefault();
|
|
432
|
+
E === null || E === void 0 ? void 0 : E({
|
|
433
|
+
itemId: o,
|
|
434
|
+
name: l,
|
|
435
|
+
index: c
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
var D = (0, t.useContext)(_), q = D.disabled;
|
|
439
|
+
var P = (0, I.sprintf)((0, h._)('Remove "%(filename)s"'), {
|
|
440
|
+
filename: l
|
|
926
441
|
});
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
(_this$props$onRequest2 = (_this$props2 = this.props).onRequestAdd) === null || _this$props$onRequest2 === void 0 ? void 0 : _this$props$onRequest2.call(_this$props2, [], {
|
|
931
|
-
name: name
|
|
442
|
+
var $ = (0, I.sprintf)((0, h._)('Retry "%(filename)s"'), {
|
|
443
|
+
filename: l
|
|
932
444
|
});
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
445
|
+
var M = (0, I.sprintf)((0, h._)('Uploading "%(filename)s"'), {
|
|
446
|
+
filename: l
|
|
447
|
+
});
|
|
448
|
+
var F = (0, h._)("Remove");
|
|
449
|
+
var H = a().createElement("span", null, a().createElement("span", {
|
|
450
|
+
style: {
|
|
451
|
+
paddingRight: "4px"
|
|
452
|
+
}
|
|
453
|
+
}, (0, h._)("Uploading ")), a().createElement(J, null, p, "%"));
|
|
454
|
+
var A = v && !C()(p) && p > 0 ? H : l;
|
|
455
|
+
var B = r !== undefined ? r : q;
|
|
456
|
+
|
|
457
|
+
return a().createElement(a().Fragment, null, a().createElement(Z, Y({
|
|
458
|
+
"data-test": "item",
|
|
459
|
+
"data-test-disabled": B,
|
|
460
|
+
"data-test-error": i
|
|
461
|
+
}, d, {
|
|
462
|
+
flex: true,
|
|
463
|
+
$error: i,
|
|
464
|
+
$disabled: B
|
|
465
|
+
}), v && C()(p) && a().createElement(Q, {
|
|
466
|
+
"data-test": "paper-clip",
|
|
467
|
+
$disabled: B
|
|
468
|
+
}, a().createElement(j, {
|
|
469
|
+
"aria-hidden": "true"
|
|
470
|
+
})), a().createElement(X, {
|
|
471
|
+
"data-test": "label",
|
|
472
|
+
$error: i,
|
|
473
|
+
$disabled: B
|
|
474
|
+
}, A), v && E && i && a().createElement(W, {
|
|
475
|
+
"data-test": "retry",
|
|
476
|
+
onClick: R,
|
|
477
|
+
"aria-label": $
|
|
478
|
+
}, a().createElement(T, {
|
|
479
|
+
screenReaderText: (0, h._)("Retry")
|
|
480
|
+
})), !B && (v && C()(p) && !i ? a().createElement(U, {
|
|
481
|
+
"data-test": "remove",
|
|
482
|
+
onClick: w,
|
|
483
|
+
"aria-label": P
|
|
484
|
+
}, a().createElement(N, {
|
|
485
|
+
screenReaderText: (0, h._)("Remove")
|
|
486
|
+
})) : a().createElement(W, {
|
|
487
|
+
"data-test": "remove",
|
|
488
|
+
$error: i,
|
|
489
|
+
onClick: w,
|
|
490
|
+
"aria-label": P
|
|
491
|
+
}, f ? a().createElement(L(), {
|
|
492
|
+
hideDefaultTooltip: true,
|
|
493
|
+
screenReaderText: F
|
|
494
|
+
}) : a().createElement(k(), {
|
|
495
|
+
"aria-label": F,
|
|
496
|
+
height: y,
|
|
497
|
+
width: y
|
|
498
|
+
}))), !C()(p) && p > 0 && (v ? a().createElement(K, {
|
|
499
|
+
$uploadPercentage: p,
|
|
500
|
+
"aria-label": M,
|
|
501
|
+
role: "progressbar",
|
|
502
|
+
"aria-valuenow": p,
|
|
503
|
+
"aria-valuemin": 0,
|
|
504
|
+
"aria-valuemax": 100
|
|
505
|
+
}) : a().createElement(O(), {
|
|
506
|
+
style: {
|
|
507
|
+
position: "absolute",
|
|
508
|
+
left: 0,
|
|
509
|
+
top: 0,
|
|
510
|
+
right: 0,
|
|
511
|
+
zIndex: 1
|
|
512
|
+
},
|
|
513
|
+
percentage: p,
|
|
514
|
+
"aria-label": M
|
|
515
|
+
}))), v && i && a().createElement(G, null, (0, h._)("Something went wrong.")));
|
|
516
|
+
}
|
|
517
|
+
ae.propTypes = te;
|
|
518
|
+
/* harmony default export */ const ne = ae;
|
|
519
|
+
// CONCATENATED MODULE: ./src/File/Icon.tsx
|
|
520
|
+
function ie() {
|
|
521
|
+
ie = Object.assign || function(e) {
|
|
522
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
523
|
+
var t = arguments[r];
|
|
524
|
+
for (var a in t) {
|
|
525
|
+
if (Object.prototype.hasOwnProperty.call(t, a)) {
|
|
526
|
+
e[a] = t[a];
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
return e;
|
|
531
|
+
};
|
|
532
|
+
return ie.apply(this, arguments);
|
|
936
533
|
}
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
534
|
+
function oe(e) {
|
|
535
|
+
|
|
536
|
+
return a().createElement(D(), ie({
|
|
537
|
+
hideDefaultTooltip: true,
|
|
538
|
+
screenReaderText: (0, h._)("File upload"),
|
|
539
|
+
viewBox: "0 0 72 88"
|
|
540
|
+
}, e), a().createElement("path", {
|
|
541
|
+
d: "M50,27 L68.0005854,27 C70.2022516,27 72,28.7919267 72,31.0023804 L72,83.9976196 C72,86.2074215 70.2094011,88 68.0005854,88 L3.99941455,88 C1.79774843,88 0,86.2080733 0,83.9976196 L0,31.0023804 C0,28.7925785 1.79059889,27 3.99941455,27 L21,27 L21,32 L5.99898406,32 C5.4472604,32 5,32.4408979 5,32.9958767 L5,82.0041233 C5,82.5541308 5.44605521,83 5.99898406,83 L66.0010159,83 C66.5527396,83 67,82.5591021 67,82.0041233 L67,32.9958767 C67,32.4458692 66.5539448,32 66.0010159,32 L50,32 L50,27 Z"
|
|
542
|
+
}), a().createElement("path", {
|
|
543
|
+
d: "M41.9634682,10 L41.9634682,28 L46.9634682,28 L46.9634682,5 L44.4634682,5 L23.9634682,5 L23.9634682,10 L41.9634682,10 Z",
|
|
544
|
+
transform: "translate(35.463468, 16.500000) rotate(-45.000000) translate(-35.463468, -16.500000) "
|
|
545
|
+
}), a().createElement("rect", {
|
|
546
|
+
x: "33",
|
|
547
|
+
y: "3",
|
|
548
|
+
width: "5",
|
|
549
|
+
height: "51"
|
|
550
|
+
}));
|
|
551
|
+
}
|
|
552
|
+
// CONCATENATED MODULE: ./src/File/FileStyles.ts
|
|
553
|
+
var le = F().input.withConfig({
|
|
554
|
+
displayName: "FileStyles__StyledInput",
|
|
555
|
+
componentId: "sc-1wyh4cf-0"
|
|
556
|
+
})([ "&[type='file']{width:0.1px;height:0.1px;opacity:0;overflow:hidden;position:absolute;z-index:-1;}" ]);
|
|
557
|
+
var se = (0, M.css)([ "fill:", ";" ], (0, b.pick)({
|
|
558
|
+
enterprise: {
|
|
559
|
+
light: b.variables.gray60,
|
|
560
|
+
dark: b.variables.gray80
|
|
561
|
+
}
|
|
562
|
+
}));
|
|
563
|
+
var ce = F()(oe).withConfig({
|
|
564
|
+
displayName: "FileStyles__StyledNormalIcon",
|
|
565
|
+
componentId: "sc-1wyh4cf-1"
|
|
566
|
+
})([ "", ";height:1.4em;width:1.4em;display:inline-block;vertical-align:middle;padding-bottom:3px;" ], se);
|
|
567
|
+
var pe = F()(oe).withConfig({
|
|
568
|
+
displayName: "FileStyles__StyledWindowIcon",
|
|
569
|
+
componentId: "sc-1wyh4cf-2"
|
|
570
|
+
})([ "", ";height:48px;width:48px;position:absolute;top:30px;left:50%;transform:translateX(-50%);" ], se);
|
|
571
|
+
var de = F().label.withConfig({
|
|
572
|
+
displayName: "FileStyles__StyledLink",
|
|
573
|
+
componentId: "sc-1wyh4cf-3"
|
|
574
|
+
})([ "", ";color:", ";cursor:pointer;font-size:inherit;font-weight:inherit;&:hover,&[data-focused]{text-decoration:underline;}&[data-focused]{box-shadow:", ";}" ], b.mixins.reset("inline"), b.variables.linkColor, (0,
|
|
575
|
+
b.pick)({
|
|
576
|
+
enterprise: b.variables.focusShadowInset,
|
|
577
|
+
prisma: b.variables.focusShadow
|
|
578
|
+
}));
|
|
579
|
+
var ue = F().div.withConfig({
|
|
580
|
+
displayName: "FileStyles__StyledNormalText",
|
|
581
|
+
componentId: "sc-1wyh4cf-4"
|
|
582
|
+
})([ "", " ", " ", " ", "" ], (0, b.pick)({
|
|
583
|
+
enterprise: (0, M.css)([ "display:inline-block;" ]),
|
|
584
|
+
prisma: (0, M.css)([ "display:inline-flex;flex-direction:column;justify-content:center;text-align:center;color:", ";border:1px dashed ", ";padding:8px;border-radius:", ";min-height:128px;&:not(:last-child){margin-bottom:4px;}" ], b.variables.contentColorActive, b.variables.contentColorMuted, b.variables.borderRadius)
|
|
585
|
+
}), (function(e) {
|
|
586
|
+
var r = e.$dragOver;
|
|
587
|
+
return r && (0, M.css)([ "", "" ], (0, b.pick)({
|
|
588
|
+
prisma: (0, M.css)([ "border:1px dashed ", ";background-color:", ";" ], b.variables.interactiveColorPrimary, b.mixins.colorWithAlpha(b.variables.interactiveColorPrimary, .1))
|
|
589
|
+
}));
|
|
590
|
+
}), (function(e) {
|
|
591
|
+
var r = e.$error, t = e.$dragOver;
|
|
592
|
+
return r && !t && (0, b.pick)({
|
|
593
|
+
prisma: (0, M.css)([ "border:1px dashed ", ";color:", ";background-color:", ";" ], b.variables.accentColorNegative, b.variables.accentColorNegative, b.mixins.colorWithAlpha(b.variables.accentColorNegative, .1))
|
|
963
594
|
});
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
595
|
+
}), (function(e) {
|
|
596
|
+
var r = e.$disabled;
|
|
597
|
+
return r && (0, M.css)([ "border:none;min-height:0;color:", ";cursor:not-allowed;" ], (0,
|
|
598
|
+
b.pick)({
|
|
599
|
+
prisma: b.variables.contentColorDisabled
|
|
600
|
+
}));
|
|
601
|
+
}));
|
|
602
|
+
var ve = F().div.withConfig({
|
|
603
|
+
displayName: "FileStyles__StyledWindowText",
|
|
604
|
+
componentId: "sc-1wyh4cf-5"
|
|
605
|
+
})([ "margin-top:", ";margin-bottom:", ";font-size:", ";", "" ], (0, b.pick)({
|
|
606
|
+
enterprise: (0, M.css)([ "calc(", " * 4)" ], b.variables.spacing),
|
|
607
|
+
prisma: (0, M.css)([ "calc(", " * 4)" ], b.variables.spacingLarge)
|
|
608
|
+
}), (0, b.pick)({
|
|
609
|
+
enterprise: b.variables.spacingHalf,
|
|
610
|
+
prisma: b.variables.spacingMedium
|
|
611
|
+
}), b.variables.fontSizeXLarge, (0, b.pick)({
|
|
612
|
+
prisma: (0, M.css)([ "color:", ";" ], b.variables.contentColorActive)
|
|
613
|
+
}));
|
|
614
|
+
var fe = F().div.withConfig({
|
|
615
|
+
displayName: "FileStyles__StyledSubtitle",
|
|
616
|
+
componentId: "sc-1wyh4cf-6"
|
|
617
|
+
})([ "color:", ";padding:4px 8px;font-size:12px;line-height:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;" ], b.variables.contentColorMuted);
|
|
618
|
+
var me = F().div.withConfig({
|
|
619
|
+
displayName: "FileStyles__StyledHelp",
|
|
620
|
+
componentId: "sc-1wyh4cf-7"
|
|
621
|
+
})([ "margin-bottom:", ";" ], (0, b.pick)({
|
|
622
|
+
enterprise: b.variables.spacingXLarge,
|
|
623
|
+
prisma: (0, M.css)([ "calc(", " * 1.5)" ], b.variables.spacingLarge)
|
|
624
|
+
}));
|
|
625
|
+
var be = F().div.withConfig({
|
|
626
|
+
displayName: "FileStyles__StyledWindowDrop",
|
|
627
|
+
componentId: "sc-1wyh4cf-8"
|
|
628
|
+
})([ "position:fixed;top:0;left:0;right:0;bottom:0;border:", ";z-index:", " + 10;" ], (0,
|
|
629
|
+
b.pick)({
|
|
630
|
+
enterprise: "5px solid ".concat(b.variables.accentColorL10),
|
|
631
|
+
prisma: "5px solid ".concat(b.variables.interactiveColorPrimary)
|
|
632
|
+
}), b.variables.zindexModal);
|
|
633
|
+
var he = F()(A()).withConfig({
|
|
634
|
+
displayName: "FileStyles__StyledDropNormalTargetBox",
|
|
635
|
+
componentId: "sc-1wyh4cf-9"
|
|
636
|
+
})([ "", ";flex-direction:column;justify-content:center;text-align:center;border-radius:", ";", " ", " ", " ", " ", " ", "" ], b.mixins.reset("flex"), b.variables.borderRadius, (0,
|
|
637
|
+
b.pick)({
|
|
638
|
+
enterprise: (0, M.css)([ "line-height:calc(", " - 2px);" ], b.variables.inputHeight)
|
|
639
|
+
}), (0, b.pick)({
|
|
640
|
+
enterprise: {
|
|
641
|
+
comfortable: (0, M.css)([ "min-height:73px;padding:", ";" ], b.variables.spacingQuarter),
|
|
642
|
+
compact: (0, M.css)([ "min-height:63px;padding:3px;" ])
|
|
643
|
+
}
|
|
644
|
+
}), (0, b.pick)({
|
|
645
|
+
enterprise: {
|
|
646
|
+
light: (0, M.css)([ "border:1px dashed ", ";" ], b.variables.borderColor),
|
|
647
|
+
dark: (0, M.css)([ "border:1px dashed ", ";" ], b.variables.textGray)
|
|
648
|
+
}
|
|
649
|
+
}), (function(e) {
|
|
650
|
+
var r = e.$dragOver;
|
|
651
|
+
return r && (0, b.pick)({
|
|
652
|
+
enterprise: (0, M.css)([ "border:1px solid ", ";" ], b.variables.accentColorL10)
|
|
981
653
|
});
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
654
|
+
}), (function(e) {
|
|
655
|
+
var r = e.$error, t = e.$dragOver;
|
|
656
|
+
return r && !t && (0, b.pick)({
|
|
657
|
+
enterprise: (0, M.css)([ "border:1px solid ", ";" ], b.variables.errorColor)
|
|
658
|
+
});
|
|
659
|
+
}), (function(e) {
|
|
660
|
+
var r = e.$disabled, t = e.$fileCount;
|
|
661
|
+
return r && (0, M.css)([ "border:", ";color:", ";cursor:not-allowed;", " ", "" ], (0,
|
|
662
|
+
b.pick)({
|
|
663
|
+
enterprise: "none",
|
|
664
|
+
prisma: "1px solid ".concat(b.variables.contentColorDisabled)
|
|
665
|
+
}), (0, b.pick)({
|
|
666
|
+
enterprise: b.variables.textGray,
|
|
667
|
+
prisma: b.variables.contentColorDisabled
|
|
668
|
+
}), t === 0 && (0, b.pick)({
|
|
669
|
+
enterprise: {
|
|
670
|
+
light: (0, M.css)([ "background-color:", ";" ], b.variables.gray96),
|
|
671
|
+
dark: (0, M.css)([ "background-color:", ";" ], b.variables.gray60)
|
|
672
|
+
},
|
|
673
|
+
prisma: (0, M.css)([ "border:1px dashed ", ";min-height:128px;" ], b.variables.contentColorDisabled)
|
|
674
|
+
}), t !== 0 && (0, b.pick)({
|
|
675
|
+
prisma: (0, M.css)([ "", "{padding:0;}" ],
|
|
676
|
+
/* sc-sel */
|
|
677
|
+
ue)
|
|
678
|
+
}));
|
|
679
|
+
}));
|
|
680
|
+
var ye = F()(A()).withConfig({
|
|
681
|
+
displayName: "FileStyles__StyledWindowDropTargetBox",
|
|
682
|
+
componentId: "sc-1wyh4cf-10"
|
|
683
|
+
})([ "position:relative;text-align:center;min-height:250px;padding:", ";", "" ], b.variables.spacingLarge, (function(e) {
|
|
684
|
+
var r = e.$disabled;
|
|
685
|
+
return r && (0, M.css)([ "color:", ";" ], (0, b.pick)({
|
|
686
|
+
enterprise: b.variables.textGray,
|
|
687
|
+
prisma: b.variables.contentColorMuted
|
|
688
|
+
}));
|
|
689
|
+
}));
|
|
690
|
+
// CONCATENATED MODULE: ./src/File/File.tsx
|
|
691
|
+
function ge(e) {
|
|
692
|
+
"@babel/helpers - typeof";
|
|
693
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
694
|
+
ge = function e(r) {
|
|
695
|
+
return typeof r;
|
|
696
|
+
};
|
|
697
|
+
} else {
|
|
698
|
+
ge = function e(r) {
|
|
699
|
+
return r && typeof Symbol === "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
|
|
700
|
+
};
|
|
701
|
+
}
|
|
702
|
+
return ge(e);
|
|
703
|
+
}
|
|
704
|
+
function Ce() {
|
|
705
|
+
Ce = Object.assign || function(e) {
|
|
706
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
707
|
+
var t = arguments[r];
|
|
708
|
+
for (var a in t) {
|
|
709
|
+
if (Object.prototype.hasOwnProperty.call(t, a)) {
|
|
710
|
+
e[a] = t[a];
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
return e;
|
|
715
|
+
};
|
|
716
|
+
return Ce.apply(this, arguments);
|
|
717
|
+
}
|
|
718
|
+
function xe(e, r) {
|
|
719
|
+
if (e == null) return {};
|
|
720
|
+
var t = ke(e, r);
|
|
721
|
+
var a, n;
|
|
722
|
+
if (Object.getOwnPropertySymbols) {
|
|
723
|
+
var i = Object.getOwnPropertySymbols(e);
|
|
724
|
+
for (n = 0; n < i.length; n++) {
|
|
725
|
+
a = i[n];
|
|
726
|
+
if (r.indexOf(a) >= 0) continue;
|
|
727
|
+
if (!Object.prototype.propertyIsEnumerable.call(e, a)) continue;
|
|
728
|
+
t[a] = e[a];
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
return t;
|
|
732
|
+
}
|
|
733
|
+
function ke(e, r) {
|
|
734
|
+
if (e == null) return {};
|
|
735
|
+
var t = {};
|
|
736
|
+
var a = Object.keys(e);
|
|
737
|
+
var n, i;
|
|
738
|
+
for (i = 0; i < a.length; i++) {
|
|
739
|
+
n = a[i];
|
|
740
|
+
if (r.indexOf(n) >= 0) continue;
|
|
741
|
+
t[n] = e[n];
|
|
742
|
+
}
|
|
743
|
+
return t;
|
|
744
|
+
}
|
|
745
|
+
function we(e, r) {
|
|
746
|
+
if (!(e instanceof r)) {
|
|
747
|
+
throw new TypeError("Cannot call a class as a function");
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
function Le(e, r) {
|
|
751
|
+
for (var t = 0; t < r.length; t++) {
|
|
752
|
+
var a = r[t];
|
|
753
|
+
a.enumerable = a.enumerable || false;
|
|
754
|
+
a.configurable = true;
|
|
755
|
+
if ("value" in a) a.writable = true;
|
|
756
|
+
Object.defineProperty(e, a.key, a);
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
function Se(e, r, t) {
|
|
760
|
+
if (r) Le(e.prototype, r);
|
|
761
|
+
if (t) Le(e, t);
|
|
762
|
+
return e;
|
|
763
|
+
}
|
|
764
|
+
function Oe(e, r) {
|
|
765
|
+
if (typeof r !== "function" && r !== null) {
|
|
766
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
767
|
+
}
|
|
768
|
+
e.prototype = Object.create(r && r.prototype, {
|
|
769
|
+
constructor: {
|
|
770
|
+
value: e,
|
|
771
|
+
writable: true,
|
|
772
|
+
configurable: true
|
|
773
|
+
}
|
|
991
774
|
});
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
"
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
}), /*#__PURE__*/external_react_default.a.createElement(EventListener_default.a, {
|
|
1054
|
-
target: window,
|
|
1055
|
-
eventType: "drop",
|
|
1056
|
-
listener: this.handleDrop
|
|
1057
|
-
})), /*#__PURE__*/external_react_default.a.createElement(File_FileContext.Provider, {
|
|
1058
|
-
value: {
|
|
1059
|
-
disabled: disabled,
|
|
1060
|
-
onRequestRemove: onRequestRemove ? handleRemove : undefined,
|
|
1061
|
-
onRequestRetry: onRequestRetry ? handleRetry : undefined
|
|
775
|
+
if (r) Ie(e, r);
|
|
776
|
+
}
|
|
777
|
+
function Ie(e, r) {
|
|
778
|
+
Ie = Object.setPrototypeOf || function e(r, t) {
|
|
779
|
+
r.__proto__ = t;
|
|
780
|
+
return r;
|
|
781
|
+
};
|
|
782
|
+
return Ie(e, r);
|
|
783
|
+
}
|
|
784
|
+
function _e(e) {
|
|
785
|
+
var r = De();
|
|
786
|
+
return function t() {
|
|
787
|
+
var a = qe(e), n;
|
|
788
|
+
if (r) {
|
|
789
|
+
var i = qe(this).constructor;
|
|
790
|
+
n = Reflect.construct(a, arguments, i);
|
|
791
|
+
} else {
|
|
792
|
+
n = a.apply(this, arguments);
|
|
793
|
+
}
|
|
794
|
+
return Ee(this, n);
|
|
795
|
+
};
|
|
796
|
+
}
|
|
797
|
+
function Ee(e, r) {
|
|
798
|
+
if (r && (ge(r) === "object" || typeof r === "function")) {
|
|
799
|
+
return r;
|
|
800
|
+
}
|
|
801
|
+
return Re(e);
|
|
802
|
+
}
|
|
803
|
+
function Re(e) {
|
|
804
|
+
if (e === void 0) {
|
|
805
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
806
|
+
}
|
|
807
|
+
return e;
|
|
808
|
+
}
|
|
809
|
+
function De() {
|
|
810
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
811
|
+
if (Reflect.construct.sham) return false;
|
|
812
|
+
if (typeof Proxy === "function") return true;
|
|
813
|
+
try {
|
|
814
|
+
Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
|
|
815
|
+
return true;
|
|
816
|
+
} catch (e) {
|
|
817
|
+
return false;
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
function qe(e) {
|
|
821
|
+
qe = Object.setPrototypeOf ? Object.getPrototypeOf : function e(r) {
|
|
822
|
+
return r.__proto__ || Object.getPrototypeOf(r);
|
|
823
|
+
};
|
|
824
|
+
return qe(e);
|
|
825
|
+
}
|
|
826
|
+
function je(e, r, t) {
|
|
827
|
+
if (r in e) {
|
|
828
|
+
Object.defineProperty(e, r, {
|
|
829
|
+
value: t,
|
|
830
|
+
enumerable: true,
|
|
831
|
+
configurable: true,
|
|
832
|
+
writable: true
|
|
833
|
+
});
|
|
834
|
+
} else {
|
|
835
|
+
e[r] = t;
|
|
1062
836
|
}
|
|
1063
|
-
|
|
837
|
+
return e;
|
|
1064
838
|
}
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
839
|
+
/** @public */ var Pe = {
|
|
840
|
+
accept: i().string,
|
|
841
|
+
allowMultiple: i().bool,
|
|
842
|
+
children: i().node,
|
|
843
|
+
disabled: i().bool,
|
|
844
|
+
dropAnywhere: i().bool,
|
|
845
|
+
elementRef: i().oneOfType([ i().func, i().object ]),
|
|
846
|
+
fullscreen: i().bool,
|
|
847
|
+
error: i().bool,
|
|
848
|
+
help: i().node,
|
|
849
|
+
name: i().string,
|
|
850
|
+
onRequestAdd: i().func,
|
|
851
|
+
onRequestRemove: i().func,
|
|
852
|
+
onRequestRetry: i().func,
|
|
853
|
+
/** @private. */
|
|
854
|
+
required: i().bool,
|
|
855
|
+
supportsMessage: i().node,
|
|
856
|
+
/** @private */
|
|
857
|
+
splunkTheme: i().object
|
|
858
|
+
};
|
|
859
|
+
var Te = {
|
|
860
|
+
allowMultiple: false,
|
|
861
|
+
disabled: false,
|
|
862
|
+
dropAnywhere: false,
|
|
863
|
+
error: false
|
|
864
|
+
};
|
|
865
|
+
/**
|
|
866
|
+
* File provides the ability to accept files and present uploaded files. It does not provide
|
|
867
|
+
* file readers, only a reference to the file. This can be used to post binary content, or
|
|
868
|
+
* upload using an array buffer.
|
|
869
|
+
*/ var $e = function(e) {
|
|
870
|
+
Oe(n, e);
|
|
871
|
+
var r = _e(n);
|
|
872
|
+
// @docs-props-type FilePropsBase
|
|
873
|
+
function n(e) {
|
|
874
|
+
var t;
|
|
875
|
+
we(this, n);
|
|
876
|
+
t = r.call(this, e);
|
|
877
|
+
je(Re(t), "inputId", void 0);
|
|
878
|
+
je(Re(t), "inputCount", void 0);
|
|
879
|
+
je(Re(t), "handleInputChange", (function(e) {
|
|
880
|
+
var r;
|
|
881
|
+
t.addFiles((r = e.currentTarget.files) !== null && r !== void 0 ? r : undefined);
|
|
882
|
+
}));
|
|
883
|
+
je(Re(t), "handleInputFocus", (function() {
|
|
884
|
+
t.setState({
|
|
885
|
+
focusedInput: true
|
|
886
|
+
});
|
|
887
|
+
}));
|
|
888
|
+
je(Re(t), "handleInputBlur", (function() {
|
|
889
|
+
t.setState({
|
|
890
|
+
focusedInput: false
|
|
891
|
+
});
|
|
892
|
+
}));
|
|
893
|
+
je(Re(t), "handleDragOver", (function(e) {
|
|
894
|
+
if (!t.state.dragOver) {
|
|
895
|
+
t.setState({
|
|
896
|
+
dragOver: true
|
|
897
|
+
});
|
|
898
|
+
}
|
|
899
|
+
e.preventDefault();
|
|
900
|
+
}));
|
|
901
|
+
je(Re(t), "handleDragLeave", (function() {
|
|
902
|
+
t.setState({
|
|
903
|
+
dragOver: false
|
|
904
|
+
});
|
|
905
|
+
}));
|
|
906
|
+
je(Re(t), "handleDrop", (function(e) {
|
|
907
|
+
var r;
|
|
908
|
+
e.preventDefault();
|
|
909
|
+
t.handleDragLeave();
|
|
910
|
+
t.addFiles((r = e.dataTransfer) === null || r === void 0 ? void 0 : r.files);
|
|
911
|
+
}));
|
|
912
|
+
t.state = {
|
|
913
|
+
dragOver: false,
|
|
914
|
+
focusedInput: false
|
|
915
|
+
};
|
|
916
|
+
t.inputId = (0, y.createDOMID)();
|
|
917
|
+
/* Each time a file is uploaded this is incremented and used to generate the
|
|
918
|
+
* file input's key. In this way we get a new input without a value. */ t.inputCount = 0;
|
|
919
|
+
t.handleDragLeave = l()(t.handleDragLeave, 300);
|
|
920
|
+
return t;
|
|
921
|
+
}
|
|
922
|
+
Se(n, [ {
|
|
923
|
+
key: "addFiles",
|
|
924
|
+
value: function e(r) {
|
|
925
|
+
var t = this.props.name;
|
|
926
|
+
if (r !== undefined && r.length > 0) {
|
|
927
|
+
var a, n;
|
|
928
|
+
var i = Array.from(r);
|
|
929
|
+
(a = (n = this.props).onRequestAdd) === null || a === void 0 ? void 0 : a.call(n, this.props.allowMultiple ? i : [ i[0] ], {
|
|
930
|
+
name: t
|
|
931
|
+
});
|
|
932
|
+
} else {
|
|
933
|
+
var o, l;
|
|
934
|
+
(o = (l = this.props).onRequestAdd) === null || o === void 0 ? void 0 : o.call(l, [], {
|
|
935
|
+
name: t
|
|
936
|
+
});
|
|
937
|
+
}
|
|
938
|
+
this.inputCount += 1;
|
|
939
|
+
}
|
|
940
|
+
}, {
|
|
941
|
+
key: "render",
|
|
942
|
+
value: function e() {
|
|
943
|
+
var r = this.props, n = r.accept, i = r.allowMultiple, o = r.children, l = r.disabled, s = r.dropAnywhere, p = r.error, u = r.fullscreen, f = r.help, b = r.name, y = r.onRequestRemove, g = r.onRequestRetry, C = r.required, x = r.splunkTheme, k = xe(r, [ "accept", "allowMultiple", "children", "disabled", "dropAnywhere", "error", "fullscreen", "help", "name", "onRequestRemove", "onRequestRetry", "required", "splunkTheme" ]);
|
|
944
|
+
var w = x.isPrisma;
|
|
945
|
+
var L = 0;
|
|
946
|
+
var S = t.Children.toArray(o).filter(t.isValidElement).map((function(e, r) {
|
|
947
|
+
L += 1;
|
|
948
|
+
|
|
949
|
+
return (0, t.cloneElement)(e, {
|
|
950
|
+
index: r,
|
|
951
|
+
key: e.key || e.props.itemId || "item-".concat(r)
|
|
952
|
+
});
|
|
953
|
+
}));
|
|
954
|
+
var O = u || s;
|
|
955
|
+
var I = O || l;
|
|
956
|
+
var _ = O && !l;
|
|
957
|
+
var R = u ? ye : he;
|
|
958
|
+
var D = u ? ve : ue;
|
|
959
|
+
var q = u ? pe : ce;
|
|
960
|
+
var j = I ? false : this.state.dragOver || false;
|
|
961
|
+
var P = v()(n) && d()(n.split(",").join(", "));
|
|
962
|
+
var T = function e(r) {
|
|
963
|
+
g === null || g === void 0 ? void 0 : g({
|
|
964
|
+
event: r,
|
|
965
|
+
filename: r.name,
|
|
966
|
+
index: r.index,
|
|
967
|
+
itemId: r.itemId,
|
|
968
|
+
name: b
|
|
969
|
+
});
|
|
970
|
+
};
|
|
971
|
+
var $ = function e(r) {
|
|
972
|
+
y === null || y === void 0 ? void 0 : y({
|
|
973
|
+
event: r,
|
|
974
|
+
index: r.index,
|
|
975
|
+
filename: r.name,
|
|
976
|
+
itemId: r.itemId,
|
|
977
|
+
name: b
|
|
978
|
+
});
|
|
979
|
+
};
|
|
980
|
+
var N = null;
|
|
981
|
+
if (this.props.supportsMessage) {
|
|
982
|
+
N = a().createElement(fe, {
|
|
983
|
+
"data-test": "file-supports"
|
|
984
|
+
}, this.props.supportsMessage);
|
|
985
|
+
} else if (w && !l) {
|
|
986
|
+
N = n ? a().createElement(fe, {
|
|
987
|
+
"data-test": "file-supports"
|
|
988
|
+
}, (0, h._)("Supports ".concat(P))) : a().createElement(fe, {
|
|
989
|
+
"data-test": "file-supports"
|
|
990
|
+
}, (0, h._)("Supports all file types"));
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
return a().createElement(R, Ce({
|
|
994
|
+
onDragOver: I ? undefined : this.handleDragOver,
|
|
995
|
+
onDragLeave: I ? undefined : this.handleDragLeave,
|
|
996
|
+
onDrop: I ? undefined : this.handleDrop,
|
|
997
|
+
$disabled: l,
|
|
998
|
+
$dragOver: j,
|
|
999
|
+
$error: p,
|
|
1000
|
+
$fileCount: L,
|
|
1001
|
+
"data-test": "file",
|
|
1002
|
+
"data-test-disabled": l,
|
|
1003
|
+
"data-test-error": p
|
|
1004
|
+
}, c()(k, "onRequestAdd", "onRequestRemove")), a().createElement(D, {
|
|
1005
|
+
$disabled: l,
|
|
1006
|
+
$dragOver: j,
|
|
1007
|
+
$error: p
|
|
1008
|
+
}, !l && !w && a().createElement(q, {
|
|
1009
|
+
$dragOver: j,
|
|
1010
|
+
$error: p
|
|
1011
|
+
}), " ", a().createElement("span", {
|
|
1012
|
+
"data-test": "file-label"
|
|
1013
|
+
}, !O && !l && (0, h._)("Drop your file here or"), _ && (0, h._)("Drop your file anywhere or"), " ", L === 0 && l && (0,
|
|
1014
|
+
h._)("No Files Selected"), a().createElement(de, {
|
|
1015
|
+
htmlFor: this.inputId,
|
|
1016
|
+
"data-test": "file-link",
|
|
1017
|
+
"data-focused": this.state.focusedInput || null
|
|
1018
|
+
}, a().createElement(le, {
|
|
1019
|
+
accept: n,
|
|
1020
|
+
"data-test": "file-input",
|
|
1021
|
+
disabled: l,
|
|
1022
|
+
id: this.inputId,
|
|
1023
|
+
key: "file-input-".concat(this.inputCount),
|
|
1024
|
+
multiple: i || undefined,
|
|
1025
|
+
onBlur: this.handleInputBlur,
|
|
1026
|
+
onChange: this.handleInputChange,
|
|
1027
|
+
onFocus: this.handleInputFocus,
|
|
1028
|
+
required: C,
|
|
1029
|
+
type: "file"
|
|
1030
|
+
}), !l && (0, h._)("upload file…"))), N), !l && f && a().createElement(me, {
|
|
1031
|
+
"data-test": "help"
|
|
1032
|
+
}, f), _ && this.state.dragOver && a().createElement(be, {
|
|
1033
|
+
"data-test": "file-window-drop",
|
|
1034
|
+
onDragLeave: this.handleDragLeave
|
|
1035
|
+
}), _ && a().createElement(a().Fragment, null, a().createElement(m(), {
|
|
1036
|
+
target: window,
|
|
1037
|
+
eventType: "dragover",
|
|
1038
|
+
listener: this.handleDragOver
|
|
1039
|
+
}), a().createElement(m(), {
|
|
1040
|
+
target: window,
|
|
1041
|
+
eventType: "drop",
|
|
1042
|
+
listener: this.handleDrop
|
|
1043
|
+
})), a().createElement(E.Provider, {
|
|
1044
|
+
value: {
|
|
1045
|
+
disabled: l,
|
|
1046
|
+
onRequestRemove: y ? $ : undefined,
|
|
1047
|
+
onRequestRetry: g ? T : undefined
|
|
1048
|
+
}
|
|
1049
|
+
}, S));
|
|
1050
|
+
}
|
|
1051
|
+
} ]);
|
|
1052
|
+
return n;
|
|
1053
|
+
}(t.Component);
|
|
1054
|
+
je($e, "propTypes", Pe);
|
|
1055
|
+
je($e, "defaultProps", Te);
|
|
1056
|
+
je($e, "Item", ne);
|
|
1057
|
+
var Ne = (0, b.withSplunkTheme)($e);
|
|
1058
|
+
var Me = Ne;
|
|
1059
|
+
Me.propTypes = $e.propTypes;
|
|
1060
|
+
Me.Item = ne;
|
|
1061
|
+
/* harmony default export */ const Fe = Me;
|
|
1062
|
+
// CONCATENATED MODULE: ./src/File/index.ts
|
|
1063
|
+
module.exports = r;
|
|
1064
|
+
/******/})();
|