UNPKG

kepler.gl

Version:

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

173 lines (171 loc) 31.3 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); var _typeof = require("@babel/runtime/helpers/typeof"); Object.defineProperty(exports, "__esModule", { value: true }); exports.filterFunctionDefinition = filterFunctionDefinition; var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); var _reactRedux = require("react-redux"); var _react = _interopRequireWildcard(require("react")); var _utils = require("./utils"); var _utils2 = require("@kepler.gl/utils"); var _components = require("@kepler.gl/components"); function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; } 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; } 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) { (0, _defineProperty2["default"])(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; } // SPDX-License-Identifier: MIT // Copyright contributors to the kepler.gl project function filterFunctionDefinition(context) { return { name: 'filter', description: 'filter data by a field and value', properties: { datasetName: { type: 'string', description: 'The name of the dataset to filter. If not provided, use the first dataset or ask user to select or upload a dataset.' }, field: { type: 'string', description: 'The field to filter by' }, value: { type: 'string', description: 'The value to filter by' }, valueRange: { type: 'array', items: { type: 'string' }, description: 'The range of values to filter by. It could be a pair of min and max values, or multiple unique string values.' } }, required: ['datasetName', 'field'], callbackFunction: filterCallback, callbackFunctionContext: context, callbackMessage: filterCallbackMessage }; } function filterCallback(_x) { return _filterCallback.apply(this, arguments); } function _filterCallback() { _filterCallback = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(_ref) { var functionName, functionArgs, functionContext, _ref3, datasetName, field, value, valueRange, _ref4, datasets, filters, createOrUpdateFilter, setFilter, setFilterPlot, datasetError, datasetId, dataset, fieldError, selectField, filterValue, filterRange, setFilterValue, newFilter, updatedFilter; return _regenerator["default"].wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: functionName = _ref.functionName, functionArgs = _ref.functionArgs, functionContext = _ref.functionContext; _ref3 = functionArgs, datasetName = _ref3.datasetName, field = _ref3.field, value = _ref3.value, valueRange = _ref3.valueRange; _ref4 = functionContext, datasets = _ref4.datasets, filters = _ref4.filters, createOrUpdateFilter = _ref4.createOrUpdateFilter, setFilter = _ref4.setFilter, setFilterPlot = _ref4.setFilterPlot; // check if dataset exists datasetError = (0, _utils.checkDatasetNotExists)(datasets, datasetName, functionName); datasetId = Object.keys(datasets).find(function (dataId) { return datasets[dataId].label === datasetName; }); if (!(datasetError || !datasetId)) { _context.next = 7; break; } return _context.abrupt("return", Promise.resolve(datasetError)); case 7: dataset = datasets[datasetId]; // check if field exists fieldError = (0, _utils.checkFieldNotExists)(dataset, field, functionName); selectField = dataset.fields.find(function (f) { return f.name === field; }); if (!(fieldError || !selectField)) { _context.next = 12; break; } return _context.abrupt("return", Promise.resolve(fieldError)); case 12: filterValue = value; filterRange = valueRange; if ((selectField === null || selectField === void 0 ? void 0 : selectField.type) === 'integer' || (selectField === null || selectField === void 0 ? void 0 : selectField.type) === 'real') { filterValue = Number(value); filterRange = valueRange === null || valueRange === void 0 ? void 0 : valueRange.map(Number); } else if ((selectField === null || selectField === void 0 ? void 0 : selectField.type) === 'string') { filterValue = "".concat(value); filterRange = valueRange === null || valueRange === void 0 ? void 0 : valueRange.map(function (v) { return "".concat(v); }); } // TODO: add support for other field types like date, boolean, etc. setFilterValue = filterValue || filterRange || null; newFilter = _objectSpread(_objectSpread(_objectSpread({}, (0, _utils2.getDefaultFilter)({ dataId: datasetId })), (0, _utils2.getFilterProps)(selectField, dataset.getColumnFilterDomain(selectField))), {}, { value: setFilterValue, fieldIndex: selectField.fieldIdx }); // update the filter plot, so we can render the filter in the filter message component updatedFilter = (0, _utils2.updateFilterPlot)(datasets, newFilter, datasetId); // create filter only and apply the filter value later in the filter message component // await createOrUpdateFilter(updatedFilter.id, datasetId, selectField?.name); return _context.abrupt("return", Promise.resolve({ type: 'filter', name: functionName, result: _objectSpread(_objectSpread(_objectSpread({ success: true, datasetId: datasetId, filterId: updatedFilter.id }, filterRange ? { range: filterRange } : {}), filterValue ? { value: filterValue } : {}), {}, { details: "Filter created successfully for the dataset and field ".concat(field) }), data: { datasetId: datasetId, fieldName: selectField.name, filterIdx: filters.length, filter: updatedFilter, setFilter: setFilter, setFilterPlot: setFilterPlot, createOrUpdateFilter: createOrUpdateFilter } })); case 19: case "end": return _context.stop(); } }, _callee); })); return _filterCallback.apply(this, arguments); } var RangeFilterComponent = _components.appInjector.get(_components.RangeFilterFactory); function FilterMessage(_ref2) { var output = _ref2.output; var outputData = output.data; // run this when the component is mounted (0, _react.useEffect)(function () { outputData === null || outputData === void 0 || outputData.createOrUpdateFilter(outputData.filter.id, outputData.datasetId, outputData.fieldName, outputData.filter.value); }, [outputData]); var filters = (0, _reactRedux.useSelector)(function (state) { // @ts-ignore TODO: fix this: we need to get the updated filters from the visState, but nicely return state.demo.keplerGl.map.visState.filters; }); var filter = filters.find(function (f) { return f.id === (outputData === null || outputData === void 0 ? void 0 : outputData.filter.id); }); var onSetFilter = function onSetFilter(value) { return outputData === null || outputData === void 0 ? void 0 : outputData.setFilter(outputData.filterIdx, 'value', value); }; var onSetFilterPlot = function onSetFilterPlot(newProp, valueIndex) { outputData === null || outputData === void 0 || outputData.setFilterPlot(outputData.filterIdx, newProp, valueIndex); }; if (!outputData) { return /*#__PURE__*/_react["default"].createElement("div", null, "Something went wrong, filter not created."); } return filter && /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(RangeFilterComponent, { filter: filter, setFilter: onSetFilter, setFilterPlot: onSetFilterPlot })); } function filterCallbackMessage(props) { return /*#__PURE__*/_react["default"].createElement(FilterMessage, props); } //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfcmVhY3RSZWR1eCIsInJlcXVpcmUiLCJfcmVhY3QiLCJfaW50ZXJvcFJlcXVpcmVXaWxkY2FyZCIsIl91dGlscyIsIl91dGlsczIiLCJfY29tcG9uZW50cyIsIl9nZXRSZXF1aXJlV2lsZGNhcmRDYWNoZSIsImUiLCJXZWFrTWFwIiwiciIsInQiLCJfX2VzTW9kdWxlIiwiX3R5cGVvZiIsImhhcyIsImdldCIsIm4iLCJfX3Byb3RvX18iLCJhIiwiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJnZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IiLCJ1IiwiaGFzT3duUHJvcGVydHkiLCJjYWxsIiwiaSIsInNldCIsIm93bktleXMiLCJrZXlzIiwiZ2V0T3duUHJvcGVydHlTeW1ib2xzIiwibyIsImZpbHRlciIsImVudW1lcmFibGUiLCJwdXNoIiwi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