td-stylekit 30.4.2 → 30.5.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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [30.5.1](https://github.com/treasure-data/td-stylekit/compare/v30.5.0...v30.5.1) (2025-02-06)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **CON-16017:** Restore code overwritten in rebase ([#1630](https://github.com/treasure-data/td-stylekit/issues/1630)) ([fad515d](https://github.com/treasure-data/td-stylekit/commit/fad515d37830cce737043a63c7981ca1efb75cab))
|
|
7
|
+
|
|
8
|
+
# [30.5.0](https://github.com/treasure-data/td-stylekit/compare/v30.4.2...v30.5.0) (2025-01-31)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **CON-17900:** Add icons for web and sending config ([#1626](https://github.com/treasure-data/td-stylekit/issues/1626)) ([30c1eb2](https://github.com/treasure-data/td-stylekit/commit/30c1eb26d9457b13c5aa1ea6263f8538bbee4995))
|
|
14
|
+
|
|
1
15
|
## [30.4.2](https://github.com/treasure-data/td-stylekit/compare/v30.4.1...v30.4.2) (2025-01-27)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -226,6 +226,8 @@ export type IconTypes = {
|
|
|
226
226
|
SegmentEditorNavIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
227
227
|
SegmentReport: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
228
228
|
SegmentReportIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
229
|
+
SendingConfiguration: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
230
|
+
SendingConfigurationIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
229
231
|
Setting: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
230
232
|
SettingIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
231
233
|
Share: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
@@ -326,6 +328,8 @@ export type IconTypes = {
|
|
|
326
328
|
UtilizationIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
327
329
|
View: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
328
330
|
ViewIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
331
|
+
Web: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
332
|
+
WebIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
329
333
|
Workflow: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
330
334
|
WorkflowIcon: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
|
331
335
|
Workflows: React.ComponentType<JSX.IntrinsicElements['svg']>;
|
package/dist/es/Icon/types.js
CHANGED
|
@@ -411,7 +411,14 @@ export const types = {typesv5: {Activation: /*#__PURE__*/React.createElement("pa
|
|
|
411
411
|
}),SegmentReport: /*#__PURE__*/React.createElement("path", {
|
|
412
412
|
d: "M6 4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm12 1.6h-3v3.1h3.4V6a.4.4 0 0 0-.4-.4m.4 4.7H15v3.4h3.4zm0 5H15v3.1h3a.4.4 0 0 0 .4-.4zM9 13.7v-3.4H5.6v3.4zm-3.4 1.6H9v3.1H6a.4.4 0 0 1-.4-.4zm0-6.6H9V5.6H6a.4.4 0 0 0-.4.4z",
|
|
413
413
|
fillRule: "evenodd"
|
|
414
|
-
}),
|
|
414
|
+
}),SendingConfiguration: /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("path", {
|
|
415
|
+
d: "M16.554 6.223 10.433 9.93a.85.85 0 0 1-.866 0L3.421 6.255a.48.48 0 0 1-.152-.697A1.41 1.41 0 0 1 4.4 5h11.2c.439 0 .829.196 1.084.501a.48.48 0 0 1-.13.722"
|
|
416
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
417
|
+
d: "m3.512 8.087 6.055 3.623c.265.158.601.158.866 0l6.054-3.664c.223-.135.513.018.513.271v1.705A5.5 5.5 0 0 0 11.022 16H4.4c-.774 0-1.4-.601-1.4-1.344V8.36c0-.252.29-.406.512-.273"
|
|
418
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
419
|
+
d: "M18.848 12.4c.328.166.376.555.24.825l-.005.012c-.142.248-.15.58 0 .891.193.3.48.43.748.397l.029-.002c.17 0 .319.082.422.185a.6.6 0 0 1 .185.423v.7c0 .382-.311.608-.607.608a.98.98 0 0 0-.786.41c-.172.282-.145.601.003.866.11.155.128.337.07.502a.76.76 0 0 1-.342.39l-.516.283-.005.002c-.268.134-.655.087-.822-.238-.153-.263-.407-.439-.729-.439-.28 0-.578.18-.728.44a.65.65 0 0 1-.334.303.5.5 0 0 1-.456-.027l-.596-.321c-.328-.167-.376-.556-.241-.826l.003-.007.003-.005c.142-.248.15-.58-.001-.89a.92.92 0 0 0-.776-.443.64.64 0 0 1-.406-.147.54.54 0 0 1-.201-.414v-.7c0-.382.31-.608.607-.608a.79.79 0 0 0 .735-.451c.178-.284.15-.609-.001-.877-.186-.29-.034-.657.317-.839l.503-.32.021-.013c.27-.134.656-.087.823.238.152.264.407.439.728.439.328 0 .57-.18.672-.42l.006-.012c.166-.331.556-.38.827-.245l.006.004zm-2.115 4.219a1.12 1.12 0 1 0 0-2.24 1.12 1.12 0 0 0 0 2.24",
|
|
420
|
+
fillRule: "evenodd"
|
|
421
|
+
})),Setting: /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("path", {
|
|
415
422
|
d: "M11.5 10.303a1 1 0 0 0-1.999-.05H8a.8.8 0 0 0 0 1.6h1.501a1 1 0 0 0 1.999-.05zM12 13.303a1 1 0 0 1 1 1v1.5a1 1 0 0 1-1.999.05H8a.8.8 0 1 1 0-1.6h3.001a1 1 0 0 1 .999-.95M12.6 11.053a.8.8 0 0 1 .8-.8H16a.8.8 0 0 1 0 1.6h-2.6a.8.8 0 0 1-.8-.8M16 14.253a.8.8 0 0 1 0 1.6h-1.245a.8.8 0 1 1 0-1.6z"
|
|
416
423
|
}), /*#__PURE__*/React.createElement("path", {
|
|
417
424
|
d: "M4 6.5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm2.2 1.622a.5.5 0 0 0-.5.5V17.5a.3.3 0 0 0 .3.3h12a.3.3 0 0 0 .3-.3V8.622a.5.5 0 0 0-.5-.5z",
|
|
@@ -581,7 +588,10 @@ export const types = {typesv5: {Activation: /*#__PURE__*/React.createElement("pa
|
|
|
581
588
|
}), /*#__PURE__*/React.createElement("path", {
|
|
582
589
|
d: "M4.072 11.678c.574-1.22 2.943-5.495 7.93-5.495 4.968 0 7.338 4.245 7.923 5.483.1.213.1.456 0 .669-.585 1.237-2.955 5.482-7.924 5.482-4.986 0-7.355-4.275-7.929-5.496a.76.76 0 0 1 0-.643M8.366 12a3.636 3.636 0 1 0 7.272 0 3.636 3.636 0 0 0-7.272 0",
|
|
583
590
|
fillRule: "evenodd"
|
|
584
|
-
})),
|
|
591
|
+
})),Web: /*#__PURE__*/React.createElement("path", {
|
|
592
|
+
d: "M6 6a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2zm2 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m2-1a1 1 0 1 0 0 2h4a1 1 0 1 0 0-2zm5 4v4a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1v-4z",
|
|
593
|
+
fillRule: "evenodd"
|
|
594
|
+
}),Workflow: /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("path", {
|
|
585
595
|
d: "M6 12a6 6 0 0 1 9.825-4.623l-.837.837a.46.46 0 0 0 .326.786h3.078a.46.46 0 0 0 .46-.46V5.462a.46.46 0 0 0-.785-.326l-.823.822A8 8 0 1 0 11.852 20H12a1 1 0 1 0 0-2 6 6 0 0 1-6-6M18.852 11a1 1 0 0 1 1 1v.026a1 1 0 1 1-2-.006V12a1 1 0 0 1 1-1M18.425 14.614a1 1 0 0 1 .369 1.365l-.026.045a1 1 0 1 1-1.728-1.008l.02-.033a1 1 0 0 1 1.365-.37M16.236 17.548a1 1 0 0 1-.36 1.368l-.045.026a1 1 0 0 1-.996-1.735l.034-.02a1 1 0 0 1 1.367.361"
|
|
586
596
|
}), /*#__PURE__*/React.createElement("path", {
|
|
587
597
|
d: "m10.784 15.015 4.346-2.585a.5.5 0 0 0 0-.86l-4.346-2.585a.5.5 0 0 0-.756.43v5.17a.5.5 0 0 0 .756.43"
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
2
|
-
import type { ListRowProps } from 'react-virtualized';
|
|
3
1
|
import type { Theme } from '../../ThemeProvider';
|
|
4
2
|
import type { OptionType } from './OptionTypes';
|
|
5
3
|
import type { MenuListComponentProps } from 'react-select';
|
|
@@ -9,8 +7,5 @@ export type MenuListProps = {
|
|
|
9
7
|
rowHeight?: number;
|
|
10
8
|
onMenuScrollToBottom?: () => void;
|
|
11
9
|
} & Omit<MenuListComponentProps<OptionType, boolean>, 'maxHeight'>;
|
|
12
|
-
export declare
|
|
13
|
-
rowRenderer: ({ key, index, style }: ListRowProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
|
-
render(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
|
-
}
|
|
10
|
+
export declare const MenuList: ({ children, maxHeight, onMenuScrollToBottom, rowHeight, selectProps }: MenuListProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
16
11
|
//# sourceMappingURL=MenuList.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -12,16 +11,7 @@ var _elements = require("../elements");
|
|
|
12
11
|
var _ThemeProvider = require("../../ThemeProvider");
|
|
13
12
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
14
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
-
function
|
|
16
|
-
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, _toPropertyKey(descriptor.key), descriptor); } }
|
|
17
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
18
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
19
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
20
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
21
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
22
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
23
|
-
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 } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
24
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
14
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
25
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27
17
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -41,97 +31,111 @@ var StyledRow = /*#__PURE__*/(0, _base["default"])('div', process.env.NODE_ENV =
|
|
|
41
31
|
}, (0, _ThemeProvider.getOverrides)(_ThemeProvider.Overridable.Select.StyledRow)({
|
|
42
32
|
theme: theme
|
|
43
33
|
}));
|
|
44
|
-
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
45
|
-
var
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
34
|
+
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9TZWxlY3QvY29tcG9uZW50cy9NZW51TGlzdC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBaUJrQiIsImZpbGUiOiIuLi8uLi8uLi8uLi9zcmMvU2VsZWN0L2NvbXBvbmVudHMvTWVudUxpc3QudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgUmVhY3RFbGVtZW50LCB1c2VSZWYgfSBmcm9tICdyZWFjdCdcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJ1xuaW1wb3J0IHsgQXV0b1NpemVyLCBMaXN0IH0gZnJvbSAncmVhY3QtdmlydHVhbGl6ZWQnXG5pbXBvcnQgdHlwZSB7IExpc3RSb3dQcm9wcyB9IGZyb20gJ3JlYWN0LXZpcnR1YWxpemVkJ1xuaW1wb3J0IHsgTm9SZXN1bHRzTWVzc2FnZSB9IGZyb20gJy4uL2VsZW1lbnRzJ1xuaW1wb3J0IHsgZ2V0T3ZlcnJpZGVzLCBPdmVycmlkYWJsZSB9IGZyb20gJ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GVpZ2h0fVxuICAgICAgICAgIHJvd0NvdW50PXtyb3dDb3VudH1cbiAgICAgICAgICByb3dIZWlnaHQ9eyh7IGluZGV4IH0pID0+XG4gICAgICAgICAgICBpbmRleCA9PT0gcm93Q291bnQgLSAxID8gcm93SGVpZ2h0IC0gMSA6IHJvd0hlaWdodFxuICAgICAgICAgIH1cbiAgICAgICAgICByb3dSZW5kZXJlcj17cm93UmVuZGVyZXJ9XG4gICAgICAgICAgc2Nyb2xsVG9JbmRleD17c2Nyb2xsVG9JbmRleH1cbiAgICAgICAgICBvblJvd3NSZW5kZXJlZD17KHsgc3RvcEluZGV4IH06IHsgc3RvcEluZGV4OiBudW1iZXIgfSkgPT4ge1xuICAgICAgICAgICAgLy8gTGlzdGVuIGZvciB1c2VyIHNjcm9sbGluZyB0byBib3R0b20gb2YgbG9hZGVkIGxpc3RcbiAgICAgICAgICAgIGlmIChzdG9wSW5kZXggPj0gcm93Q291bnQgLSAxICYmIG9uTWVudVNjcm9sbFRvQm90dG9tKSB7XG4gICAgICAgICAgICAgIG9uTWVudVNjcm9sbFRvQm90dG9tKClcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICA8L0F1dG9TaXplcj5cbiAgKVxufVxuIl19 */");
|
|
35
|
+
var valueIsOptionType = function valueIsOptionType(value) {
|
|
36
|
+
return !!value && !Array.isArray(value) && _typeof(value) === 'object' && 'value' in value;
|
|
37
|
+
};
|
|
38
|
+
var MenuList = exports.MenuList = function MenuList(_ref2) {
|
|
39
|
+
var children = _ref2.children,
|
|
40
|
+
_ref2$maxHeight = _ref2.maxHeight,
|
|
41
|
+
maxHeight = _ref2$maxHeight === void 0 ? 255 : _ref2$maxHeight,
|
|
42
|
+
onMenuScrollToBottom = _ref2.onMenuScrollToBottom,
|
|
43
|
+
_ref2$rowHeight = _ref2.rowHeight,
|
|
44
|
+
_rowHeight = _ref2$rowHeight === void 0 ? 33 : _ref2$rowHeight,
|
|
45
|
+
selectProps = _ref2.selectProps;
|
|
46
|
+
var rows = Array.isArray(children) ? children : [];
|
|
47
|
+
var rowCountRef = (0, _react.useRef)(null);
|
|
48
|
+
var rowCount = rows.length;
|
|
49
|
+
var fullListHeight = rowCount * _rowHeight - 1; // Need to subtract 1px for lack of border bottom on last option
|
|
50
|
+
|
|
51
|
+
// Keep track of the row count to determine if the list has changed since initially rendered
|
|
52
|
+
// This will happen on a paginated list when the user scrolls to the bottom
|
|
53
|
+
if (rowCountRef.current === null) {
|
|
54
|
+
rowCountRef.current = rowCount;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Find the focused child based on the isFocused prop on the child node
|
|
58
|
+
var focusedChild = rows.find(function (child) {
|
|
59
|
+
return child && child.props.isFocused;
|
|
60
|
+
});
|
|
61
|
+
var focusedOptionIndex = focusedChild ? rows.indexOf(focusedChild) : 0;
|
|
62
|
+
|
|
63
|
+
// Find the selected child based on the select value prop
|
|
64
|
+
// This is needed for a paginated list as the options may not have the isFocused prop
|
|
65
|
+
// or the selected value option hasn't loaded yet
|
|
66
|
+
var value = valueIsOptionType(selectProps.value) ? selectProps.value.value : undefined;
|
|
67
|
+
var selectedValueIndex = value ? rows.findIndex(function (child) {
|
|
68
|
+
return child && child.props.value === value;
|
|
69
|
+
}) : undefined;
|
|
70
|
+
|
|
71
|
+
// If the select is using the paginated onMenuScrollToBottom use the selected value index as the scroll to index
|
|
72
|
+
// but only if the list is not loading or new pages haven't been added, this will prevent flickering
|
|
73
|
+
// with the forced focused scrolling back
|
|
74
|
+
// Otherwise if not paginating use the focused option index which is determined by the isFocused prop on the option
|
|
75
|
+
var scrollToIndex = onMenuScrollToBottom ? selectProps.isLoading || rowCountRef.current !== null && rowCountRef.current !== rowCount ? undefined : selectedValueIndex : focusedOptionIndex;
|
|
76
|
+
var rowRenderer = function rowRenderer(_ref3) {
|
|
77
|
+
var key = _ref3.key,
|
|
78
|
+
index = _ref3.index,
|
|
79
|
+
style = _ref3.style;
|
|
80
|
+
return (0, _jsxRuntime.jsx)(StyledRow, {
|
|
81
|
+
"data-gs-c": gsC(rows[index]),
|
|
82
|
+
"data-gs": gs("src", "select", "components", "styled-row"),
|
|
83
|
+
style: _objectSpread({}, style),
|
|
84
|
+
children: rows[index]
|
|
85
|
+
}, key);
|
|
86
|
+
};
|
|
87
|
+
if (!rowCount) {
|
|
88
|
+
return (0, _jsxRuntime.jsx)(_elements.NoResultsMessage, {
|
|
89
|
+
"data-gs-c": gsC(selectProps.noResultsMessage || 'No results found'),
|
|
90
|
+
"data-gs": gs("src", "select", "components", "no-results-message"),
|
|
91
|
+
children: selectProps.noResultsMessage || 'No results found'
|
|
64
92
|
});
|
|
65
|
-
return _this;
|
|
66
93
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
94
|
+
return (0, _jsxRuntime.jsx)(_reactVirtualized.AutoSizer, {
|
|
95
|
+
"data-gs-c": gsC(function children(_ref4) {
|
|
96
|
+
var width = _ref4.width;
|
|
97
|
+
return (0, _jsxRuntime.jsx)(_reactVirtualized.List, {
|
|
98
|
+
"data-gs": gs("src", "select", "components", "auto-sizer", "list"),
|
|
99
|
+
width: width,
|
|
100
|
+
height: fullListHeight < maxHeight ? fullListHeight : maxHeight,
|
|
101
|
+
rowCount: rowCount,
|
|
102
|
+
rowHeight: function rowHeight(_ref5) {
|
|
103
|
+
var index = _ref5.index;
|
|
104
|
+
return index === rowCount - 1 ? _rowHeight - 1 : _rowHeight;
|
|
105
|
+
},
|
|
106
|
+
rowRenderer: rowRenderer,
|
|
107
|
+
scrollToIndex: scrollToIndex,
|
|
108
|
+
onRowsRendered: function onRowsRendered(_ref6) {
|
|
109
|
+
var stopIndex = _ref6.stopIndex;
|
|
110
|
+
// Listen for user scrolling to bottom of loaded list
|
|
111
|
+
if (stopIndex >= rowCount - 1 && onMenuScrollToBottom) {
|
|
112
|
+
onMenuScrollToBottom();
|
|
113
|
+
}
|
|
114
|
+
}
|
|
86
115
|
});
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
}),
|
|
111
|
-
"data-gs": gs("src", "select", "components", "auto-sizer"),
|
|
112
|
-
disableHeight: true,
|
|
113
|
-
children: function children(_ref3) {
|
|
114
|
-
var width = _ref3.width;
|
|
115
|
-
return (0, _jsxRuntime.jsx)(_reactVirtualized.List, {
|
|
116
|
-
"data-gs": gs("src", "select", "components", "auto-sizer", "list"),
|
|
117
|
-
width: width,
|
|
118
|
-
height: fullListHeight < maxHeight ? fullListHeight : maxHeight,
|
|
119
|
-
rowCount: rowCount,
|
|
120
|
-
rowHeight: function rowHeight(_ref4) {
|
|
121
|
-
var index = _ref4.index;
|
|
122
|
-
return index === rowCount - 1 ? _rowHeight - 1 : _rowHeight;
|
|
123
|
-
},
|
|
124
|
-
rowRenderer: _this2.rowRenderer,
|
|
125
|
-
scrollToIndex: focusedOptionIndex,
|
|
126
|
-
onRowsRendered: function onRowsRendered(_ref5) {
|
|
127
|
-
var stopIndex = _ref5.stopIndex;
|
|
128
|
-
if (stopIndex >= rowCount - 1 && _this2.props.onMenuScrollToBottom) {
|
|
129
|
-
_this2.props.onMenuScrollToBottom();
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
});
|
|
116
|
+
}),
|
|
117
|
+
"data-gs": gs("src", "select", "components", "auto-sizer"),
|
|
118
|
+
disableHeight: true,
|
|
119
|
+
children: function children(_ref4) {
|
|
120
|
+
var width = _ref4.width;
|
|
121
|
+
return (0, _jsxRuntime.jsx)(_reactVirtualized.List, {
|
|
122
|
+
"data-gs": gs("src", "select", "components", "auto-sizer", "list"),
|
|
123
|
+
width: width,
|
|
124
|
+
height: fullListHeight < maxHeight ? fullListHeight : maxHeight,
|
|
125
|
+
rowCount: rowCount,
|
|
126
|
+
rowHeight: function rowHeight(_ref5) {
|
|
127
|
+
var index = _ref5.index;
|
|
128
|
+
return index === rowCount - 1 ? _rowHeight - 1 : _rowHeight;
|
|
129
|
+
},
|
|
130
|
+
rowRenderer: rowRenderer,
|
|
131
|
+
scrollToIndex: scrollToIndex,
|
|
132
|
+
onRowsRendered: function onRowsRendered(_ref6) {
|
|
133
|
+
var stopIndex = _ref6.stopIndex;
|
|
134
|
+
if (stopIndex >= rowCount - 1 && onMenuScrollToBottom) {
|
|
135
|
+
onMenuScrollToBottom();
|
|
136
|
+
}
|
|
133
137
|
}
|
|
134
138
|
});
|
|
135
139
|
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
140
|
+
});
|
|
141
|
+
};
|