UNPKG

kepler.gl

Version:

kepler.gl is a webgl based application to visualize large scale location data in the browser

40 lines (38 loc) 5.11 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = SingleSelectFilterFactory; var _react = _interopRequireDefault(require("react")); var _itemSelector = _interopRequireDefault(require("../common/item-selector/item-selector")); var _styledComponents = require("../common/styled-components"); var _localization = require("@kepler.gl/localization"); // SPDX-License-Identifier: MIT // Copyright contributors to the kepler.gl project function SingleSelectFilterFactory() { var SingleSelectFilter = function SingleSelectFilter(_ref) { var filter = _ref.filter, setFilter = _ref.setFilter; return /*#__PURE__*/_react["default"].createElement(_styledComponents.SidePanelSection, null, /*#__PURE__*/_react["default"].createElement(_styledComponents.PanelLabel, null, /*#__PURE__*/_react["default"].createElement(_localization.FormattedMessage, { id: 'misc.valueEquals' })), /*#__PURE__*/_react["default"].createElement(_itemSelector["default"], { selectedItems: filter.value, placeholder: "placeholder.selectValue", options: filter.domain, multiSelect: false, searchable: false, displayOption: function displayOption(d) { return String(d); }, getOptionValue: function getOptionValue(d) { return d; }, onChange: setFilter, inputTheme: "secondary" })); }; SingleSelectFilter.displayName = 'SingleSelectFilter'; return SingleSelectFilter; } //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfcmVhY3QiLCJfaW50ZXJvcFJlcXVpcmVEZWZhdWx0IiwicmVxdWlyZSIsIl9pdGVtU2VsZWN0b3IiLCJfc3R5bGVkQ29tcG9uZW50cyIsIl9sb2NhbGl6YXRpb24iLCJTaW5nbGVTZWxlY3RGaWx0ZXJGYWN0b3J5IiwiU2luZ2xlU2VsZWN0RmlsdGVyIiwiX3JlZiIsImZpbHRlciIsInNldEZpbHRlciIsImNyZWF0ZUVsZW1lbnQiLCJTaWRlUGFuZWxTZWN0aW9uIiwiUGFuZWxMYWJlbCIsIkZvcm1hdHRlZE1lc3NhZ2UiLCJpZC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