@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.
Files changed (101) hide show
  1. package/Accordion.js +425 -441
  2. package/Anchor.js +147 -193
  3. package/Animation.js +142 -166
  4. package/AnimationToggle.js +197 -253
  5. package/Box.js +145 -194
  6. package/Breadcrumbs.js +288 -298
  7. package/Button.js +488 -613
  8. package/ButtonGroup.js +160 -212
  9. package/ButtonSimple.js +543 -562
  10. package/CHANGELOG.md +26 -0
  11. package/Calendar.js +1107 -1195
  12. package/Card.js +771 -746
  13. package/CardLayout.js +205 -223
  14. package/Chip.js +509 -612
  15. package/Clickable.js +416 -472
  16. package/CloseButton.js +165 -250
  17. package/Code.js +1808 -2172
  18. package/Code.js.LICENSE.txt +8 -0
  19. package/CollapsiblePanel.js +586 -675
  20. package/Color.js +1066 -1297
  21. package/ColumnLayout.js +402 -465
  22. package/ComboBox.js +892 -969
  23. package/Concertina.js +998 -963
  24. package/ControlGroup.js +687 -718
  25. package/Date.js +567 -697
  26. package/DefinitionList.js +308 -310
  27. package/Divider.js +149 -194
  28. package/Dropdown.js +459 -558
  29. package/DualListbox.js +1480 -1735
  30. package/EventListener.js +94 -165
  31. package/File.js +1051 -1173
  32. package/FormRows.js +885 -880
  33. package/Heading.js +216 -263
  34. package/Image.js +446 -558
  35. package/JSONTree.js +690 -699
  36. package/Layer.js +442 -582
  37. package/Link.js +336 -361
  38. package/List.js +213 -237
  39. package/Markdown.js +510 -612
  40. package/Menu.js +1109 -1331
  41. package/Message.js +474 -629
  42. package/MessageBar.js +387 -561
  43. package/Modal.js +810 -798
  44. package/ModalLayer.js +326 -343
  45. package/Monogram.js +308 -368
  46. package/Multiselect.js +3558 -3998
  47. package/Number.js +729 -843
  48. package/Paginator.js +510 -615
  49. package/Paragraph.js +145 -188
  50. package/Popover.js +1470 -1693
  51. package/Progress.js +301 -362
  52. package/RadioBar.js +610 -651
  53. package/RadioList.js +483 -544
  54. package/Resize.js +530 -623
  55. package/ResultsMenu.js +494 -597
  56. package/ScreenReaderContent.js +142 -187
  57. package/Scroll.js +595 -598
  58. package/ScrollContainerContext.js +197 -278
  59. package/Search.js +745 -817
  60. package/Select.js +2441 -2746
  61. package/SidePanel.js +390 -392
  62. package/Slider.js +668 -825
  63. package/SlidingPanels.js +639 -645
  64. package/SplitButton.js +464 -499
  65. package/StaticContent.js +161 -217
  66. package/StepBar.js +386 -466
  67. package/Switch.js +710 -764
  68. package/TabBar.js +724 -815
  69. package/TabLayout.js +406 -438
  70. package/Table.js +4842 -5121
  71. package/Text.js +1169 -1351
  72. package/TextArea.js +1097 -1307
  73. package/Tooltip.js +624 -721
  74. package/TransitionOpen.js +489 -546
  75. package/Typography.js +176 -229
  76. package/WaitSpinner.js +230 -298
  77. package/package.json +14 -15
  78. package/stubs-splunkui.d.ts +4 -1
  79. package/types/src/ComboBox/Option.d.ts +1 -1
  80. package/types/src/Concertina/Concertina.d.ts +4 -0
  81. package/types/src/JSONTree/JSONTreeContext.d.ts +7 -0
  82. package/types/src/JSONTree/TreeNode.d.ts +5 -0
  83. package/types/src/Link/Link.d.ts +7 -3
  84. package/types/src/Link/docs/examples/NewWindow.d.ts +2 -0
  85. package/types/src/Markdown/Markdown.d.ts +1 -1
  86. package/types/src/Markdown/renderers/MarkdownHeading.d.ts +1 -1
  87. package/types/src/Menu/Item.d.ts +1 -1
  88. package/types/src/Menu/Menu.d.ts +1 -0
  89. package/types/src/MessageBar/docs/examples/WithActions.d.ts +2 -0
  90. package/types/src/Multiselect/Option.d.ts +1 -1
  91. package/types/src/Search/Option.d.ts +1 -1
  92. package/types/src/Select/Option.d.ts +1 -1
  93. package/types/src/Select/OptionBase.d.ts +1 -1
  94. package/types/src/fixtures/FetchOptions.d.ts +2 -8
  95. package/useForceUpdate.js +112 -146
  96. package/useKeyPress.js +74 -128
  97. package/usePrevious.js +65 -129
  98. package/useRovingFocus.js +122 -218
  99. package/types/src/Link/docs/examples/NewTab.d.ts +0 -2
  100. /package/types/src/Table/docs/examples/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
  101. /package/types/src/Table/docs/examples/prisma/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
package/Paginator.js CHANGED
@@ -1,622 +1,517 @@
1
- module.exports =
2
- /******/ (function(modules) { // webpackBootstrap
3
- /******/ // The module cache
4
- /******/ var installedModules = {};
5
- /******/
6
- /******/ // The require function
7
- /******/ function __webpack_require__(moduleId) {
8
- /******/
9
- /******/ // Check if module is in cache
10
- /******/ if(installedModules[moduleId]) {
11
- /******/ return installedModules[moduleId].exports;
12
- /******/ }
13
- /******/ // Create a new module (and put it into the cache)
14
- /******/ var module = installedModules[moduleId] = {
15
- /******/ i: moduleId,
16
- /******/ l: false,
17
- /******/ exports: {}
18
- /******/ };
19
- /******/
20
- /******/ // Execute the module function
21
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
- /******/
23
- /******/ // Flag the module as loaded
24
- /******/ module.l = true;
25
- /******/
26
- /******/ // Return the exports of the module
27
- /******/ return module.exports;
28
- /******/ }
29
- /******/
30
- /******/
31
- /******/ // expose the modules object (__webpack_modules__)
32
- /******/ __webpack_require__.m = modules;
33
- /******/
34
- /******/ // expose the module cache
35
- /******/ __webpack_require__.c = installedModules;
36
- /******/
37
- /******/ // define getter function for harmony exports
38
- /******/ __webpack_require__.d = function(exports, name, getter) {
39
- /******/ if(!__webpack_require__.o(exports, name)) {
40
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41
- /******/ }
42
- /******/ };
43
- /******/
44
- /******/ // define __esModule on exports
45
- /******/ __webpack_require__.r = function(exports) {
46
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48
- /******/ }
49
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
50
- /******/ };
51
- /******/
52
- /******/ // create a fake namespace object
53
- /******/ // mode & 1: value is a module id, require it
54
- /******/ // mode & 2: merge all properties of value into the ns
55
- /******/ // mode & 4: return value when already ns object
56
- /******/ // mode & 8|1: behave like require
57
- /******/ __webpack_require__.t = function(value, mode) {
58
- /******/ if(mode & 1) value = __webpack_require__(value);
59
- /******/ if(mode & 8) return value;
60
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
- /******/ var ns = Object.create(null);
62
- /******/ __webpack_require__.r(ns);
63
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65
- /******/ return ns;
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 = 184);
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
- /***/ 149:
105
- /***/ (function(module, exports) {
106
-
107
- module.exports = require("@splunk/react-icons/DotsThreeHorizontal");
108
-
109
- /***/ }),
110
-
111
- /***/ 184:
112
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
113
-
114
- "use strict";
115
- // ESM COMPAT FLAG
116
- __webpack_require__.r(__webpack_exports__);
117
-
118
- // EXPORTS
119
- __webpack_require__.d(__webpack_exports__, "default", function() { return /* reexport */ Paginator_Paginator; });
120
-
121
- // EXTERNAL MODULE: external "react"
122
- var external_react_ = __webpack_require__(2);
123
- var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
124
-
125
- // EXTERNAL MODULE: external "prop-types"
126
- var external_prop_types_ = __webpack_require__(1);
127
- var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
128
-
129
- // EXTERNAL MODULE: external "@splunk/react-ui/Box"
130
- var Box_ = __webpack_require__(6);
131
- var Box_default = /*#__PURE__*/__webpack_require__.n(Box_);
132
-
133
- // EXTERNAL MODULE: external "@splunk/themes"
134
- var themes_ = __webpack_require__(0);
135
-
136
- // EXTERNAL MODULE: external "@splunk/ui-utils/format"
137
- var format_ = __webpack_require__(29);
138
-
139
- // EXTERNAL MODULE: external "@splunk/ui-utils/i18n"
140
- var i18n_ = __webpack_require__(4);
141
-
142
- // EXTERNAL MODULE: external "@splunk/react-icons/DotsThreeHorizontal"
143
- var DotsThreeHorizontal_ = __webpack_require__(149);
144
- var DotsThreeHorizontal_default = /*#__PURE__*/__webpack_require__.n(DotsThreeHorizontal_);
145
-
146
- // EXTERNAL MODULE: external "styled-components"
147
- var external_styled_components_ = __webpack_require__(3);
148
- var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
149
-
150
- // CONCATENATED MODULE: ./src/Paginator/PageSeparatorStyles.ts
151
-
152
-
153
- var StyledEllipsisWrapper = external_styled_components_default.a.span.withConfig({
154
- displayName: "PageSeparatorStyles__StyledEllipsisWrapper",
155
- componentId: "j50fqf-0"
156
- })(["display:flex;align-items:center;margin:", ";color:", ";"], Object(themes_["pick"])({
157
- enterprise: '0px 11px',
158
- prisma: '0px 20px'
159
- }), themes_["variables"].contentColorActive);
160
-
161
- // CONCATENATED MODULE: ./src/Paginator/PageSeparator.tsx
162
-
163
-
164
-
165
-
166
-
167
- function PageSeparator() {
168
- var _useSplunkTheme = Object(themes_["useSplunkTheme"])(),
169
- family = _useSplunkTheme.family;
170
-
171
- var content = family === 'enterprise' ? /*#__PURE__*/external_react_default.a.createElement("span", {
172
- role: "separator"
173
- }, "\u2026") : /*#__PURE__*/external_react_default.a.createElement(DotsThreeHorizontal_default.a, null);
174
- return /*#__PURE__*/external_react_default.a.createElement(StyledEllipsisWrapper, {
175
- role: "separator"
176
- }, content);
177
- }
178
-
179
- /* harmony default export */ var Paginator_PageSeparator = (PageSeparator);
180
- // EXTERNAL MODULE: external "lodash/keys"
181
- var keys_ = __webpack_require__(9);
182
- var keys_default = /*#__PURE__*/__webpack_require__.n(keys_);
183
-
184
- // EXTERNAL MODULE: external "lodash/omit"
185
- var omit_ = __webpack_require__(5);
186
- var omit_default = /*#__PURE__*/__webpack_require__.n(omit_);
187
-
188
- // EXTERNAL MODULE: external "@splunk/react-ui/ButtonSimple"
189
- var ButtonSimple_ = __webpack_require__(64);
190
- var ButtonSimple_default = /*#__PURE__*/__webpack_require__.n(ButtonSimple_);
191
-
192
- // CONCATENATED MODULE: ./src/Paginator/ButtonStyles.ts
193
-
194
-
195
-
196
- var StyledButtonSimple = external_styled_components_default()(ButtonSimple_default.a).withConfig({
197
- displayName: "ButtonStyles__StyledButtonSimple",
198
- componentId: "sc-1neztq7-0"
199
- })(["min-width:", ";min-height:", ";text-align:center;flex-shrink:0;", ""], themes_["variables"].inputHeight, themes_["variables"].inputHeight, Object(themes_["pick"])({
200
- enterprise: {
201
- comfortable: Object(external_styled_components_["css"])(["padding:", ";"], themes_["variables"].spacingQuarter),
202
- compact: Object(external_styled_components_["css"])(["padding:3px;"])
203
- },
204
- prisma: Object(external_styled_components_["css"])(["padding:", ";", " & + &{margin-left:8px;}"], Object(themes_["pick"])({
205
- comfortable: '5px 8px',
206
- compact: '4px'
207
- }), function (_ref) {
208
- var selected = _ref.selected;
209
- return selected && Object(external_styled_components_["css"])(["font-weight:", ";"], themes_["variables"].fontWeightBold);
210
- })
211
- }));
212
- var StyledPrevNext = external_styled_components_default.a.div.withConfig({
213
- displayName: "ButtonStyles__StyledPrevNext",
214
- componentId: "sc-1neztq7-1"
215
- })(["padding:", ";white-space:nowrap;"], Object(themes_["pick"])({
216
- enterprise: '0 3px',
217
- prisma: '0 8px'
218
- }));
219
-
220
- // CONCATENATED MODULE: ./src/Paginator/Button.tsx
221
- 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); }
222
-
223
- 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); }
224
-
225
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
226
-
227
- 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); } }
228
-
229
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
230
-
231
- 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); }
232
-
233
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
234
-
235
- 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); }; }
236
-
237
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
238
-
239
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
240
-
241
- 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; } }
242
-
243
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
244
-
245
- 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; }
246
-
247
-
248
-
249
-
250
-
251
-
252
- var propTypes = {
253
- children: external_prop_types_default.a.node,
254
- label: external_prop_types_default.a.node,
255
- onClick: external_prop_types_default.a.func,
256
- page: external_prop_types_default.a.number,
257
-
258
- /** @private */
259
- selected: external_prop_types_default.a.bool
260
- };
261
- var defaultProps = {
262
- selected: false
263
- };
264
-
265
- var Button_PaginatorButton = /*#__PURE__*/function (_Component) {
266
- _inherits(PaginatorButton, _Component);
267
-
268
- var _super = _createSuper(PaginatorButton);
269
-
270
- function PaginatorButton() {
271
- var _this;
272
-
273
- _classCallCheck(this, PaginatorButton);
274
-
275
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
276
- args[_key] = arguments[_key];
277
- }
278
-
279
- _this = _super.call.apply(_super, [this].concat(args));
280
-
281
- _defineProperty(_assertThisInitialized(_this), "handleClick", function (e) {
282
- var _this$props = _this.props,
283
- onClick = _this$props.onClick,
284
- page = _this$props.page;
285
- onClick === null || onClick === void 0 ? void 0 : onClick(e, {
286
- // @ts-expect-error - guaranteed by onClick on StyleButtonSimple below
287
- page: page
288
- });
1
+ /******/ (() => {
2
+ // webpackBootstrap
3
+ /******/ "use strict";
4
+ /******/ // The require scope
5
+ /******/ var e = {};
6
+ /******/
7
+ /************************************************************************/
8
+ /******/ /* webpack/runtime/compat get default export */
9
+ /******/ (() => {
10
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
11
+ /******/ e.n = t => {
12
+ /******/ var r = t && t.__esModule ?
13
+ /******/ () => t["default"]
14
+ /******/ : () => t
15
+ /******/;
16
+ e.d(r, {
17
+ a: r
18
+ });
19
+ /******/ return r;
20
+ /******/ };
21
+ /******/ })();
22
+ /******/
23
+ /******/ /* webpack/runtime/define property getters */
24
+ /******/ (() => {
25
+ /******/ // define getter functions for harmony exports
26
+ /******/ e.d = (t, r) => {
27
+ /******/ for (var n in r) {
28
+ /******/ if (e.o(r, n) && !e.o(t, n)) {
29
+ /******/ Object.defineProperty(t, n, {
30
+ enumerable: true,
31
+ get: r[n]
32
+ });
33
+ /******/ }
34
+ /******/ }
35
+ /******/ };
36
+ /******/ })();
37
+ /******/
38
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
39
+ /******/ (() => {
40
+ /******/ e.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t)
41
+ /******/;
42
+ })();
43
+ /******/
44
+ /******/ /* webpack/runtime/make namespace object */
45
+ /******/ (() => {
46
+ /******/ // define __esModule on exports
47
+ /******/ e.r = e => {
48
+ /******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
49
+ /******/ Object.defineProperty(e, Symbol.toStringTag, {
50
+ value: "Module"
51
+ });
52
+ /******/ }
53
+ /******/ Object.defineProperty(e, "__esModule", {
54
+ value: true
55
+ });
56
+ /******/ };
57
+ /******/ })();
58
+ /******/
59
+ /************************************************************************/ var t = {};
60
+ // ESM COMPAT FLAG
61
+ e.r(t);
62
+ // EXPORTS
63
+ e.d(t, {
64
+ default: () => /* reexport */ se
289
65
  });
290
-
291
- return _this;
292
- }
293
-
294
- _createClass(PaginatorButton, [{
295
- key: "render",
296
- value: function render() {
297
- var _this$props2 = this.props,
298
- children = _this$props2.children,
299
- label = _this$props2.label,
300
- page = _this$props2.page,
301
- selected = _this$props2.selected;
302
- return /*#__PURE__*/external_react_default.a.createElement(StyledButtonSimple, _extends({
303
- "data-test": "page",
304
- "data-test-page": page,
305
- appearance: "pill",
306
- onClick: page !== undefined ? this.handleClick : undefined,
307
- inline: false,
308
- selected: selected
309
- }, omit_default()(this.props, keys_default()(PaginatorButton.propTypes))), label, children && /*#__PURE__*/external_react_default.a.createElement(StyledPrevNext, null, children));
66
+ // CONCATENATED MODULE: external "react"
67
+ const r = require("react");
68
+ var n = e.n(r);
69
+ // CONCATENATED MODULE: external "prop-types"
70
+ const a = require("prop-types");
71
+ var o = e.n(a);
72
+ // CONCATENATED MODULE: external "@splunk/react-ui/Box"
73
+ const i = require("@splunk/react-ui/Box");
74
+ var l = e.n(i);
75
+ // CONCATENATED MODULE: external "@splunk/themes"
76
+ const s = require("@splunk/themes");
77
+ // CONCATENATED MODULE: external "@splunk/ui-utils/format"
78
+ const c = require("@splunk/ui-utils/format");
79
+ // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
80
+ const p = require("@splunk/ui-utils/i18n");
81
+ // CONCATENATED MODULE: external "@splunk/react-icons/DotsThreeHorizontal"
82
+ const u = require("@splunk/react-icons/DotsThreeHorizontal");
83
+ var f = e.n(u);
84
+ // CONCATENATED MODULE: external "styled-components"
85
+ const d = require("styled-components");
86
+ var v = e.n(d);
87
+ // CONCATENATED MODULE: ./src/Paginator/PageSeparatorStyles.ts
88
+ var y = v().span.withConfig({
89
+ displayName: "PageSeparatorStyles__StyledEllipsisWrapper",
90
+ componentId: "j50fqf-0"
91
+ })([ "display:flex;align-items:center;margin:", ";color:", ";" ], (0, s.pick)({
92
+ enterprise: "0px 11px",
93
+ prisma: "0px 20px"
94
+ }), s.variables.contentColorActive);
95
+ // CONCATENATED MODULE: ./src/Paginator/PageSeparator.tsx
96
+ function m() {
97
+ var e = (0, s.useSplunkTheme)(), t = e.family;
98
+ var r = t === "enterprise" ? n().createElement("span", {
99
+ role: "separator"
100
+ }, "…") : n().createElement(f(), null);
101
+
102
+ return n().createElement(y, {
103
+ role: "separator"
104
+ }, r);
310
105
  }
311
- }]);
312
-
313
- return PaginatorButton;
314
- }(external_react_["Component"]);
315
-
316
- _defineProperty(Button_PaginatorButton, "propTypes", propTypes);
317
-
318
- _defineProperty(Button_PaginatorButton, "defaultProps", defaultProps);
319
-
320
- /* harmony default export */ var Button = (Button_PaginatorButton);
321
- // EXTERNAL MODULE: external "@splunk/react-icons/enterprise/ChevronLeft"
322
- var ChevronLeft_ = __webpack_require__(66);
323
- var ChevronLeft_default = /*#__PURE__*/__webpack_require__.n(ChevronLeft_);
324
-
325
- // EXTERNAL MODULE: external "@splunk/react-icons/ChevronLeft"
326
- var react_icons_ChevronLeft_ = __webpack_require__(86);
327
- var react_icons_ChevronLeft_default = /*#__PURE__*/__webpack_require__.n(react_icons_ChevronLeft_);
328
-
329
- // EXTERNAL MODULE: external "@splunk/react-icons/enterprise/ChevronRight"
330
- var ChevronRight_ = __webpack_require__(38);
331
- var ChevronRight_default = /*#__PURE__*/__webpack_require__.n(ChevronRight_);
332
-
333
- // EXTERNAL MODULE: external "@splunk/react-icons/ChevronRight"
334
- var react_icons_ChevronRight_ = __webpack_require__(46);
335
- var react_icons_ChevronRight_default = /*#__PURE__*/__webpack_require__.n(react_icons_ChevronRight_);
336
-
337
- // CONCATENATED MODULE: ./src/Paginator/PaginatorStyles.ts
338
-
339
-
340
-
341
-
342
-
343
-
344
- var StyledEnterpriseChevronLeftIcon = external_styled_components_default()(ChevronLeft_default.a).withConfig({
345
- displayName: "PaginatorStyles__StyledEnterpriseChevronLeftIcon",
346
- componentId: "pmabsp-0"
347
- })(["margin:-1px 3px 0 0;"]);
348
- var StyledEnterpriseChevronRightIcon = external_styled_components_default()(ChevronRight_default.a).withConfig({
349
- displayName: "PaginatorStyles__StyledEnterpriseChevronRightIcon",
350
- componentId: "pmabsp-1"
351
- })(["margin:-1px 0 0 3px;"]);
352
- var compact = Object(external_styled_components_["css"])(["height:20px;width:20px;"]);
353
- var comfortable = Object(external_styled_components_["css"])(["height:24px;width:24px;"]);
354
- var StyledChevronLeftIcon = external_styled_components_default()(react_icons_ChevronLeft_default.a).withConfig({
355
- displayName: "PaginatorStyles__StyledChevronLeftIcon",
356
- componentId: "pmabsp-2"
357
- })(["margin:-2px 6px 0 0;color:", ";", ""], function (_ref) {
358
- var $disabled = _ref.$disabled;
359
- return $disabled ? themes_["variables"].contentColorDisabled : themes_["variables"].contentColorMuted;
360
- }, Object(themes_["pick"])({
361
- compact: compact,
362
- comfortable: comfortable
363
- }));
364
- var StyledChevronRightIcon = external_styled_components_default()(react_icons_ChevronRight_default.a).withConfig({
365
- displayName: "PaginatorStyles__StyledChevronRightIcon",
366
- componentId: "pmabsp-3"
367
- })(["margin:-2px 0 0 6px;color:", ";", ""], function (_ref2) {
368
- var $disabled = _ref2.$disabled;
369
- return $disabled ? themes_["variables"].contentColorDisabled : themes_["variables"].contentColorMuted;
370
- }, Object(themes_["pick"])({
371
- compact: compact,
372
- comfortable: comfortable
373
- }));
374
-
375
- // CONCATENATED MODULE: ./src/Paginator/Paginator.tsx
376
- function Paginator_extends() { Paginator_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 Paginator_extends.apply(this, arguments); }
377
-
378
- 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; }
379
-
380
- 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; }
381
-
382
-
383
-
384
-
385
-
386
-
387
-
388
-
389
-
390
-
391
- var Paginator_propTypes = {
392
- alwaysShowLastPageLink: external_prop_types_default.a.bool,
393
- current: external_prop_types_default.a.number,
394
- elementRef: external_prop_types_default.a.oneOfType([external_prop_types_default.a.func, external_prop_types_default.a.object]),
395
- numPageLinks: external_prop_types_default.a.number,
396
- onChange: external_prop_types_default.a.func,
397
- totalPages: external_prop_types_default.a.number
398
- };
399
-
400
- function Paginator(_ref) {
401
- var onChange = _ref.onChange,
402
- _ref$current = _ref.current,
403
- current = _ref$current === void 0 ? 1 : _ref$current,
404
- _ref$alwaysShowLastPa = _ref.alwaysShowLastPageLink,
405
- alwaysShowLastPageLink = _ref$alwaysShowLastPa === void 0 ? false : _ref$alwaysShowLastPa,
406
- _ref$numPageLinks = _ref.numPageLinks,
407
- numPageLinks = _ref$numPageLinks === void 0 ? 5 : _ref$numPageLinks,
408
- totalPages = _ref.totalPages,
409
- otherProps = _objectWithoutProperties(_ref, ["onChange", "current", "alwaysShowLastPageLink", "numPageLinks", "totalPages"]);
410
-
411
- // @docs-props-type PaginatorPropsBase
412
- var _useSplunkTheme = Object(themes_["useSplunkTheme"])(),
413
- isEnterprise = _useSplunkTheme.isEnterprise; // Can't show more links than total number of pages.
414
-
415
-
416
- var numLinks = Math.min(numPageLinks, totalPages);
417
- var loMid = Math.ceil(numLinks / 2);
418
- var hiMid = Math.ceil(totalPages - numLinks / 2);
419
- var pages = [];
420
-
421
- if (totalPages <= 1) {
422
- return null;
423
- }
424
-
425
- if ((current > totalPages || current < 1) && process.env.NODE_ENV !== "production") {
426
- throw new Error('Error in Paginator: Current page is out of bounds');
427
- }
428
-
429
- var firstPage;
430
- var lastPage;
431
-
432
- if (current <= loMid + 1) {
433
- // + 1 to avoid ellipsis between 1 and 2
434
- firstPage = 1;
435
- lastPage = firstPage + Math.min(totalPages, numLinks) - 1;
436
- } else if (current > loMid && current < hiMid) {
437
- lastPage = Math.ceil(current + (numLinks - 2) / 2);
438
- firstPage = lastPage - numLinks + 2;
439
- } else {
440
- // include page #1 to avoid ellipsis between 1 and 2
441
- firstPage = totalPages - numLinks === 1 ? 1 : totalPages - numLinks + 1;
442
- lastPage = totalPages;
443
- } // bump up the last page to avoid ellipsis
444
-
445
-
446
- lastPage = alwaysShowLastPageLink && lastPage + 1 === totalPages ? totalPages : lastPage;
447
- pages.push( /*#__PURE__*/external_react_default.a.createElement(Button, {
448
- "data-test": "prev",
449
- disabled: current === 1,
450
- onClick: onChange,
451
- page: current - 1,
452
- key: "prev",
453
- "aria-label": Object(i18n_["_"])('Go to previous page')
454
- }, isEnterprise ? /*#__PURE__*/external_react_default.a.createElement(StyledEnterpriseChevronLeftIcon, {
455
- hideDefaultTooltip: true,
456
- screenReaderText: null
457
- }) : /*#__PURE__*/external_react_default.a.createElement(StyledChevronLeftIcon, {
458
- $disabled: current === 1
459
- }), Object(i18n_["_"])('Prev')));
460
-
461
- if (current > loMid && totalPages > numLinks && firstPage !== 1) {
462
- pages.push( /*#__PURE__*/external_react_default.a.createElement(Button, {
463
- label: "1",
464
- key: "first",
465
- onClick: onChange,
466
- page: 1,
467
- "aria-label": Object(i18n_["_"])('Go to first page')
106
+ /* harmony default export */ const g = m;
107
+ // CONCATENATED MODULE: external "lodash/keys"
108
+ const b = require("lodash/keys");
109
+ var h = e.n(b);
110
+ // CONCATENATED MODULE: external "lodash/omit"
111
+ const k = require("lodash/omit");
112
+ var x = e.n(k);
113
+ // CONCATENATED MODULE: external "@splunk/react-ui/ButtonSimple"
114
+ const S = require("@splunk/react-ui/ButtonSimple");
115
+ var C = e.n(S);
116
+ // CONCATENATED MODULE: ./src/Paginator/ButtonStyles.ts
117
+ var _ = v()(C()).withConfig({
118
+ displayName: "ButtonStyles__StyledButtonSimple",
119
+ componentId: "sc-1neztq7-0"
120
+ })([ "min-width:", ";min-height:", ";text-align:center;flex-shrink:0;", "" ], s.variables.inputHeight, s.variables.inputHeight, (0,
121
+ s.pick)({
122
+ enterprise: {
123
+ comfortable: (0, d.css)([ "padding:", ";" ], s.variables.spacingQuarter),
124
+ compact: (0, d.css)([ "padding:3px;" ])
125
+ },
126
+ prisma: (0, d.css)([ "padding:", ";", " & + &{margin-left:8px;}" ], (0, s.pick)({
127
+ comfortable: "5px 8px",
128
+ compact: "4px"
129
+ }), (function(e) {
130
+ var t = e.selected;
131
+ return t && (0, d.css)([ "font-weight:", ";" ], s.variables.fontWeightBold);
132
+ }))
468
133
  }));
469
- pages.push( /*#__PURE__*/external_react_default.a.createElement(Paginator_PageSeparator, {
470
- "data-test": "page",
471
- key: "prevEllipsis"
134
+ var w = v().div.withConfig({
135
+ displayName: "ButtonStyles__StyledPrevNext",
136
+ componentId: "sc-1neztq7-1"
137
+ })([ "padding:", ";white-space:nowrap;" ], (0, s.pick)({
138
+ enterprise: "0 3px",
139
+ prisma: "0 8px"
472
140
  }));
473
- }
474
-
475
- for (var i = firstPage; i <= lastPage; i += 1) {
476
- var isCurrent = i === current;
477
- pages.push( /*#__PURE__*/external_react_default.a.createElement(Button, {
478
- label: String(i),
479
- selected: isCurrent,
480
- onClick: onChange,
481
- page: i,
482
- key: i,
483
- "aria-label": isCurrent ? Object(i18n_["_"])('Current page') : Object(format_["sprintf"])(Object(i18n_["_"])('Go to page %(pageNumber)d'), {
484
- pageNumber: i
485
- })
141
+ // CONCATENATED MODULE: ./src/Paginator/Button.tsx
142
+ function P(e) {
143
+ "@babel/helpers - typeof";
144
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
145
+ P = function e(t) {
146
+ return typeof t;
147
+ };
148
+ } else {
149
+ P = function e(t) {
150
+ return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
151
+ };
152
+ }
153
+ return P(e);
154
+ }
155
+ function O() {
156
+ O = Object.assign || function(e) {
157
+ for (var t = 1; t < arguments.length; t++) {
158
+ var r = arguments[t];
159
+ for (var n in r) {
160
+ if (Object.prototype.hasOwnProperty.call(r, n)) {
161
+ e[n] = r[n];
162
+ }
163
+ }
164
+ }
165
+ return e;
166
+ };
167
+ return O.apply(this, arguments);
168
+ }
169
+ function E(e, t) {
170
+ if (!(e instanceof t)) {
171
+ throw new TypeError("Cannot call a class as a function");
172
+ }
173
+ }
174
+ function j(e, t) {
175
+ for (var r = 0; r < t.length; r++) {
176
+ var n = t[r];
177
+ n.enumerable = n.enumerable || false;
178
+ n.configurable = true;
179
+ if ("value" in n) n.writable = true;
180
+ Object.defineProperty(e, n.key, n);
181
+ }
182
+ }
183
+ function q(e, t, r) {
184
+ if (t) j(e.prototype, t);
185
+ if (r) j(e, r);
186
+ return e;
187
+ }
188
+ function T(e, t) {
189
+ if (typeof t !== "function" && t !== null) {
190
+ throw new TypeError("Super expression must either be null or a function");
191
+ }
192
+ e.prototype = Object.create(t && t.prototype, {
193
+ constructor: {
194
+ value: e,
195
+ writable: true,
196
+ configurable: true
197
+ }
198
+ });
199
+ if (t) L(e, t);
200
+ }
201
+ function L(e, t) {
202
+ L = Object.setPrototypeOf || function e(t, r) {
203
+ t.__proto__ = r;
204
+ return t;
205
+ };
206
+ return L(e, t);
207
+ }
208
+ function N(e) {
209
+ var t = M();
210
+ return function r() {
211
+ var n = D(e), a;
212
+ if (t) {
213
+ var o = D(this).constructor;
214
+ a = Reflect.construct(n, arguments, o);
215
+ } else {
216
+ a = n.apply(this, arguments);
217
+ }
218
+ return R(this, a);
219
+ };
220
+ }
221
+ function R(e, t) {
222
+ if (t && (P(t) === "object" || typeof t === "function")) {
223
+ return t;
224
+ }
225
+ return I(e);
226
+ }
227
+ function I(e) {
228
+ if (e === void 0) {
229
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
230
+ }
231
+ return e;
232
+ }
233
+ function M() {
234
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
235
+ if (Reflect.construct.sham) return false;
236
+ if (typeof Proxy === "function") return true;
237
+ try {
238
+ Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
239
+ return true;
240
+ } catch (e) {
241
+ return false;
242
+ }
243
+ }
244
+ function D(e) {
245
+ D = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
246
+ return t.__proto__ || Object.getPrototypeOf(t);
247
+ };
248
+ return D(e);
249
+ }
250
+ function B(e, t, r) {
251
+ if (t in e) {
252
+ Object.defineProperty(e, t, {
253
+ value: r,
254
+ enumerable: true,
255
+ configurable: true,
256
+ writable: true
257
+ });
258
+ } else {
259
+ e[t] = r;
260
+ }
261
+ return e;
262
+ }
263
+ var G = {
264
+ children: o().node,
265
+ label: o().node,
266
+ onClick: o().func,
267
+ page: o().number,
268
+ /** @private */
269
+ selected: o().bool
270
+ };
271
+ var $ = {
272
+ selected: false
273
+ };
274
+ var z = function(e) {
275
+ T(r, e);
276
+ var t = N(r);
277
+ function r() {
278
+ var e;
279
+ E(this, r);
280
+ for (var n = arguments.length, a = new Array(n), o = 0; o < n; o++) {
281
+ a[o] = arguments[o];
282
+ }
283
+ e = t.call.apply(t, [ this ].concat(a));
284
+ B(I(e), "handleClick", (function(t) {
285
+ var r = e.props, n = r.onClick, a = r.page;
286
+ n === null || n === void 0 ? void 0 : n(t, {
287
+ // @ts-expect-error - guaranteed by onClick on StyleButtonSimple below
288
+ page: a
289
+ });
290
+ }));
291
+ return e;
292
+ }
293
+ q(r, [ {
294
+ key: "render",
295
+ value: function e() {
296
+ var t = this.props, a = t.children, o = t.label, i = t.page, l = t.selected;
297
+
298
+ return n().createElement(_, O({
299
+ "data-test": "page",
300
+ "data-test-page": i,
301
+ appearance: "pill",
302
+ onClick: i !== undefined ? this.handleClick : undefined,
303
+ inline: false,
304
+ selected: l
305
+ }, x()(this.props, h()(r.propTypes))), o, a && n().createElement(w, null, a));
306
+ }
307
+ } ]);
308
+ return r;
309
+ }(r.Component);
310
+ B(z, "propTypes", G);
311
+ B(z, "defaultProps", $);
312
+ /* harmony default export */ const H = z;
313
+ // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/ChevronLeft"
314
+ const A = require("@splunk/react-icons/enterprise/ChevronLeft");
315
+ var W = e.n(A);
316
+ // CONCATENATED MODULE: external "@splunk/react-icons/ChevronLeft"
317
+ const Q = require("@splunk/react-icons/ChevronLeft");
318
+ var V = e.n(Q);
319
+ // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/ChevronRight"
320
+ const F = require("@splunk/react-icons/enterprise/ChevronRight");
321
+ var J = e.n(F);
322
+ // CONCATENATED MODULE: external "@splunk/react-icons/ChevronRight"
323
+ const K = require("@splunk/react-icons/ChevronRight");
324
+ var U = e.n(K);
325
+ // CONCATENATED MODULE: ./src/Paginator/PaginatorStyles.ts
326
+ var X = v()(W()).withConfig({
327
+ displayName: "PaginatorStyles__StyledEnterpriseChevronLeftIcon",
328
+ componentId: "pmabsp-0"
329
+ })([ "margin:-1px 3px 0 0;" ]);
330
+ var Y = v()(J()).withConfig({
331
+ displayName: "PaginatorStyles__StyledEnterpriseChevronRightIcon",
332
+ componentId: "pmabsp-1"
333
+ })([ "margin:-1px 0 0 3px;" ]);
334
+ var Z = (0, d.css)([ "height:20px;width:20px;" ]);
335
+ var ee = (0, d.css)([ "height:24px;width:24px;" ]);
336
+ var te = v()(V()).withConfig({
337
+ displayName: "PaginatorStyles__StyledChevronLeftIcon",
338
+ componentId: "pmabsp-2"
339
+ })([ "margin:-2px 6px 0 0;color:", ";", "" ], (function(e) {
340
+ var t = e.$disabled;
341
+ return t ? s.variables.contentColorDisabled : s.variables.contentColorMuted;
342
+ }), (0, s.pick)({
343
+ compact: Z,
344
+ comfortable: ee
486
345
  }));
487
- }
488
-
489
- if (current <= hiMid && totalPages > numLinks && lastPage !== totalPages) {
490
- pages.push( /*#__PURE__*/external_react_default.a.createElement(Paginator_PageSeparator, {
491
- "data-test": "page",
492
- key: "nextEllipsis"
346
+ var re = v()(U()).withConfig({
347
+ displayName: "PaginatorStyles__StyledChevronRightIcon",
348
+ componentId: "pmabsp-3"
349
+ })([ "margin:-2px 0 0 6px;color:", ";", "" ], (function(e) {
350
+ var t = e.$disabled;
351
+ return t ? s.variables.contentColorDisabled : s.variables.contentColorMuted;
352
+ }), (0, s.pick)({
353
+ compact: Z,
354
+ comfortable: ee
493
355
  }));
494
-
495
- if (alwaysShowLastPageLink) {
496
- pages.push( /*#__PURE__*/external_react_default.a.createElement(Button, {
497
- "data-test": "last",
498
- label: String(totalPages),
499
- key: "last",
500
- onClick: onChange,
501
- page: totalPages,
502
- "aria-label": Object(i18n_["_"])('Go to last page')
503
- }));
356
+ // CONCATENATED MODULE: ./src/Paginator/Paginator.tsx
357
+ function ne() {
358
+ ne = Object.assign || function(e) {
359
+ for (var t = 1; t < arguments.length; t++) {
360
+ var r = arguments[t];
361
+ for (var n in r) {
362
+ if (Object.prototype.hasOwnProperty.call(r, n)) {
363
+ e[n] = r[n];
364
+ }
365
+ }
366
+ }
367
+ return e;
368
+ };
369
+ return ne.apply(this, arguments);
370
+ }
371
+ function ae(e, t) {
372
+ if (e == null) return {};
373
+ var r = oe(e, t);
374
+ var n, a;
375
+ if (Object.getOwnPropertySymbols) {
376
+ var o = Object.getOwnPropertySymbols(e);
377
+ for (a = 0; a < o.length; a++) {
378
+ n = o[a];
379
+ if (t.indexOf(n) >= 0) continue;
380
+ if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
381
+ r[n] = e[n];
382
+ }
383
+ }
384
+ return r;
385
+ }
386
+ function oe(e, t) {
387
+ if (e == null) return {};
388
+ var r = {};
389
+ var n = Object.keys(e);
390
+ var a, o;
391
+ for (o = 0; o < n.length; o++) {
392
+ a = n[o];
393
+ if (t.indexOf(a) >= 0) continue;
394
+ r[a] = e[a];
395
+ }
396
+ return r;
397
+ }
398
+ var ie = {
399
+ alwaysShowLastPageLink: o().bool,
400
+ current: o().number,
401
+ elementRef: o().oneOfType([ o().func, o().object ]),
402
+ numPageLinks: o().number,
403
+ onChange: o().func,
404
+ totalPages: o().number
405
+ };
406
+ function le(e) {
407
+ var t = e.onChange, r = e.current, a = r === void 0 ? 1 : r, o = e.alwaysShowLastPageLink, i = o === void 0 ? false : o, u = e.numPageLinks, f = u === void 0 ? 5 : u, d = e.totalPages, v = ae(e, [ "onChange", "current", "alwaysShowLastPageLink", "numPageLinks", "totalPages" ]);
408
+ // @docs-props-type PaginatorPropsBase
409
+ var y = (0, s.useSplunkTheme)(), m = y.isEnterprise;
410
+ // Can't show more links than total number of pages.
411
+ var b = Math.min(f, d);
412
+ var h = Math.ceil(b / 2);
413
+ var k = Math.ceil(d - b / 2);
414
+ var x = [];
415
+ if (d <= 1) {
416
+ return null;
417
+ }
418
+ if ((a > d || a < 1) && process.env.NODE_ENV !== "production") {}
419
+ var S;
420
+ var C;
421
+ if (a <= h + 1) {
422
+ // + 1 to avoid ellipsis between 1 and 2
423
+ S = 1;
424
+ C = S + Math.min(d, b) - 1;
425
+ } else if (a > h && a < k) {
426
+ C = Math.ceil(a + (b - 2) / 2);
427
+ S = C - b + 2;
428
+ } else {
429
+ // include page #1 to avoid ellipsis between 1 and 2
430
+ S = d - b === 1 ? 1 : d - b + 1;
431
+ C = d;
432
+ }
433
+ // bump up the last page to avoid ellipsis
434
+ C = i && C + 1 === d ? d : C;
435
+ x.push( n().createElement(H, {
436
+ "data-test": "prev",
437
+ disabled: a === 1,
438
+ onClick: t,
439
+ page: a - 1,
440
+ key: "prev",
441
+ "aria-label": (0, p._)("Go to previous page")
442
+ }, m ? n().createElement(X, {
443
+ hideDefaultTooltip: true,
444
+ screenReaderText: null
445
+ }) : n().createElement(te, {
446
+ $disabled: a === 1
447
+ }), (0, p._)("Prev")));
448
+ if (a > h && d > b && S !== 1) {
449
+ x.push( n().createElement(H, {
450
+ label: "1",
451
+ key: "first",
452
+ onClick: t,
453
+ page: 1,
454
+ "aria-label": (0, p._)("Go to first page")
455
+ }));
456
+ x.push( n().createElement(g, {
457
+ "data-test": "page",
458
+ key: "prevEllipsis"
459
+ }));
460
+ }
461
+ for (var _ = S; _ <= C; _ += 1) {
462
+ var w = _ === a;
463
+ x.push( n().createElement(H, {
464
+ label: String(_),
465
+ selected: w,
466
+ onClick: t,
467
+ page: _,
468
+ key: _,
469
+ "aria-label": w ? (0, p._)("Current page") : (0, c.sprintf)((0, p._)("Go to page %(pageNumber)d"), {
470
+ pageNumber: _
471
+ })
472
+ }));
473
+ }
474
+ if (a <= k && d > b && C !== d) {
475
+ x.push( n().createElement(g, {
476
+ "data-test": "page",
477
+ key: "nextEllipsis"
478
+ }));
479
+ if (i) {
480
+ x.push( n().createElement(H, {
481
+ "data-test": "last",
482
+ label: String(d),
483
+ key: "last",
484
+ onClick: t,
485
+ page: d,
486
+ "aria-label": (0, p._)("Go to last page")
487
+ }));
488
+ }
489
+ }
490
+ x.push( n().createElement(H, {
491
+ "data-test": "next",
492
+ disabled: a === d,
493
+ onClick: t,
494
+ page: a + 1,
495
+ key: "next",
496
+ "aria-label": (0, p._)("Go to next page")
497
+ }, (0, p._)("Next"), m ? n().createElement(Y, {
498
+ hideDefaultTooltip: true,
499
+ screenReaderText: null
500
+ }) : n().createElement(re, {
501
+ $disabled: a === d
502
+ })));
503
+
504
+ return n().createElement(l(), ne({
505
+ "data-test": "paginator",
506
+ "data-test-current": a,
507
+ flex: true,
508
+ inline: true,
509
+ role: "navigation",
510
+ "aria-label": (0, p._)("Pagination navigation")
511
+ }, v), x);
504
512
  }
505
- }
506
-
507
- pages.push( /*#__PURE__*/external_react_default.a.createElement(Button, {
508
- "data-test": "next",
509
- disabled: current === totalPages,
510
- onClick: onChange,
511
- page: current + 1,
512
- key: "next",
513
- "aria-label": Object(i18n_["_"])('Go to next page')
514
- }, Object(i18n_["_"])('Next'), isEnterprise ? /*#__PURE__*/external_react_default.a.createElement(StyledEnterpriseChevronRightIcon, {
515
- hideDefaultTooltip: true,
516
- screenReaderText: null
517
- }) : /*#__PURE__*/external_react_default.a.createElement(StyledChevronRightIcon, {
518
- $disabled: current === totalPages
519
- })));
520
- return /*#__PURE__*/external_react_default.a.createElement(Box_default.a, Paginator_extends({
521
- "data-test": "paginator",
522
- "data-test-current": current,
523
- flex: true,
524
- inline: true,
525
- role: "navigation",
526
- "aria-label": Object(i18n_["_"])('Pagination navigation')
527
- }, otherProps), pages);
528
- }
529
-
530
- Paginator.propTypes = Paginator_propTypes;
531
- /* harmony default export */ var Paginator_Paginator = (Paginator);
532
- // CONCATENATED MODULE: ./src/Paginator/index.ts
533
-
534
-
535
-
536
- /***/ }),
537
-
538
- /***/ 2:
539
- /***/ (function(module, exports) {
540
-
541
- module.exports = require("react");
542
-
543
- /***/ }),
544
-
545
- /***/ 29:
546
- /***/ (function(module, exports) {
547
-
548
- module.exports = require("@splunk/ui-utils/format");
549
-
550
- /***/ }),
551
-
552
- /***/ 3:
553
- /***/ (function(module, exports) {
554
-
555
- module.exports = require("styled-components");
556
-
557
- /***/ }),
558
-
559
- /***/ 38:
560
- /***/ (function(module, exports) {
561
-
562
- module.exports = require("@splunk/react-icons/enterprise/ChevronRight");
563
-
564
- /***/ }),
565
-
566
- /***/ 4:
567
- /***/ (function(module, exports) {
568
-
569
- module.exports = require("@splunk/ui-utils/i18n");
570
-
571
- /***/ }),
572
-
573
- /***/ 46:
574
- /***/ (function(module, exports) {
575
-
576
- module.exports = require("@splunk/react-icons/ChevronRight");
577
-
578
- /***/ }),
579
-
580
- /***/ 5:
581
- /***/ (function(module, exports) {
582
-
583
- module.exports = require("lodash/omit");
584
-
585
- /***/ }),
586
-
587
- /***/ 6:
588
- /***/ (function(module, exports) {
589
-
590
- module.exports = require("@splunk/react-ui/Box");
591
-
592
- /***/ }),
593
-
594
- /***/ 64:
595
- /***/ (function(module, exports) {
596
-
597
- module.exports = require("@splunk/react-ui/ButtonSimple");
598
-
599
- /***/ }),
600
-
601
- /***/ 66:
602
- /***/ (function(module, exports) {
603
-
604
- module.exports = require("@splunk/react-icons/enterprise/ChevronLeft");
605
-
606
- /***/ }),
607
-
608
- /***/ 86:
609
- /***/ (function(module, exports) {
610
-
611
- module.exports = require("@splunk/react-icons/ChevronLeft");
612
-
613
- /***/ }),
614
-
615
- /***/ 9:
616
- /***/ (function(module, exports) {
617
-
618
- module.exports = require("lodash/keys");
619
-
620
- /***/ })
621
-
622
- /******/ });
513
+ le.propTypes = ie;
514
+ /* harmony default export */ const se = le;
515
+ // CONCATENATED MODULE: ./src/Paginator/index.ts
516
+ module.exports = t;
517
+ /******/})();