kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
148 lines (147 loc) • 23.7 kB
JavaScript
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.PureFeatureActionPanelFactory = PureFeatureActionPanelFactory;
exports["default"] = FeatureActionPanelFactory;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
var _react = _interopRequireWildcard(require("react"));
var _reactIntl = require("react-intl");
var _copyToClipboard = _interopRequireDefault(require("copy-to-clipboard"));
var _react2 = require("@floating-ui/react");
var _classnames = _interopRequireDefault(require("classnames"));
var _styledComponents = _interopRequireDefault(require("styled-components"));
var _utils = require("@kepler.gl/utils");
var _actionPanel = _interopRequireWildcard(require("../common/action-panel"));
var _icons = require("../common/icons");
var _templateObject; // SPDX-License-Identifier: MIT
// Copyright contributors to the kepler.gl project
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; }
var LAYOVER_OFFSET = 4;
var StyledActionsLayer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n .layer-panel-item-disabled {\n color: ", ";\n }\n"])), function (props) {
return props.theme.textColor;
});
var defaultActionIcons = {
remove: _icons.Trash,
layer: _icons.Layers,
copy: _icons.Copy,
copied: _icons.Checkmark
};
PureFeatureActionPanelFactory.deps = [];
function PureFeatureActionPanelFactory() {
var FeatureActionPanel = function FeatureActionPanel(_ref) {
var className = _ref.className,
datasets = _ref.datasets,
selectedFeature = _ref.selectedFeature,
_ref$position = _ref.position,
position = _ref$position === void 0 ? null : _ref$position,
layers = _ref.layers,
currentFilter = _ref.currentFilter,
onToggleLayer = _ref.onToggleLayer,
onDeleteFeature = _ref.onDeleteFeature,
_ref$actionIcons = _ref.actionIcons,
actionIcons = _ref$actionIcons === void 0 ? defaultActionIcons : _ref$actionIcons,
children = _ref.children,
onClose = _ref.onClose;
var _useState = (0, _react.useState)(false),
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
copied = _useState2[0],
setCopied = _useState2[1];
var _ref2 = currentFilter || {},
_ref2$layerId = _ref2.layerId,
layerId = _ref2$layerId === void 0 ? [] : _ref2$layerId;
var intl = (0, _reactIntl.useIntl)();
var _useFloating = (0, _react2.useFloating)({
open: true,
onOpenChange: function onOpenChange(v) {
if (!v && onClose) {
onClose();
}
}
}),
refs = _useFloating.refs,
context = _useFloating.context;
var dismiss = (0, _react2.useDismiss)(context);
var _useInteractions = (0, _react2.useInteractions)([dismiss]),
getFloatingProps = _useInteractions.getFloatingProps;
var copyGeometry = (0, _react.useCallback)(function () {
if (selectedFeature !== null && selectedFeature !== void 0 && selectedFeature.geometry) (0, _copyToClipboard["default"])(JSON.stringify(selectedFeature.geometry));
setCopied(true);
}, [selectedFeature === null || selectedFeature === void 0 ? void 0 : selectedFeature.geometry]);
if (!position) {
return null;
}
var isFilterLayerDisabled = !(0, _utils.canApplyFeatureFilter)(selectedFeature);
return /*#__PURE__*/_react["default"].createElement(StyledActionsLayer, (0, _extends2["default"])({
ref: refs.setFloating
}, getFloatingProps(), {
className: (0, _classnames["default"])('feature-action-panel', className),
style: {
top: "".concat(position.y + LAYOVER_OFFSET, "px"),
left: "".concat(position.x + LAYOVER_OFFSET, "px")
}
}), /*#__PURE__*/_react["default"].createElement(_actionPanel["default"], null, /*#__PURE__*/_react["default"].createElement(_actionPanel.ActionPanelItem, {
className: "editor-layers-list",
label: intl.formatMessage({
id: 'editor.filterLayer',
defaultMessage: 'Filter layers'
}),
Icon: actionIcons.layer,
isDisabled: isFilterLayerDisabled,
tooltipText: isFilterLayerDisabled ? intl.formatMessage({
id: 'editor.filterLayerDisabled'
}) : null
}, layers.length ? layers.map(function (layer, index) {
return /*#__PURE__*/_react["default"].createElement(_actionPanel.ActionPanelItem, {
key: index,
label: layer.config.label
// @ts-ignore
,
color: datasets[layer.config.dataId].color,
isSelection: true,
isActive: layerId.includes(layer.id),
onClick: function onClick() {
return onToggleLayer(layer);
},
className: "layer-panel-item"
});
}) : /*#__PURE__*/_react["default"].createElement(_actionPanel.ActionPanelItem, {
key: 'no-layers',
label: intl.formatMessage({
id: 'editor.noLayersToFilter',
defaultMessage: 'No layers to filter'
}),
isSelection: false,
isActive: false,
className: "layer-panel-item-disabled"
})), /*#__PURE__*/_react["default"].createElement(_actionPanel.ActionPanelItem, {
label: intl.formatMessage({
id: 'editor.copyGeometry',
defaultMessage: 'Copy Geometry'
}),
className: "delete-panel-item",
Icon: copied ? actionIcons.copied : actionIcons.copy,
onClick: copyGeometry
}), children, /*#__PURE__*/_react["default"].createElement(_actionPanel.ActionPanelItem, {
label: intl.formatMessage({
id: 'tooltip.delete',
defaultMessage: 'Delete'
}),
className: "delete-panel-item",
Icon: actionIcons.remove,
onClick: onDeleteFeature
})));
};
FeatureActionPanel.displayName = 'FeatureActionPanel';
return FeatureActionPanel;
}
FeatureActionPanelFactory.deps = PureFeatureActionPanelFactory.deps;
function FeatureActionPanelFactory() {
return PureFeatureActionPanelFactory();
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2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ZWQ9e2lzRmlsdGVyTGF5ZXJEaXNhYmxlZH1cbiAgICAgICAgICAgIHRvb2x0aXBUZXh0PXtcbiAgICAgICAgICAgICAgaXNGaWx0ZXJMYXllckRpc2FibGVkID8gaW50bC5mb3JtYXRNZXNzYWdlKHtpZDogJ2VkaXRvci5maWx0ZXJMYXllckRpc2FibGVkJ30pIDogbnVsbFxuICAgICAgICAgICAgfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIHtsYXllcnMubGVuZ3RoID8gKFxuICAgICAgICAgICAgICBsYXllcnMubWFwKChsYXllciwgaW5kZXgpID0+IChcbiAgICAgICAgICAgICAgICA8QWN0aW9uUGFuZWxJdGVtXG4gICAgICAgICAgICAgICAgICBrZXk9e2luZGV4fVxuICAgICAgICAgICAgICAgICAgbGFiZWw9e2xheWVyLmNvbmZpZy5sYWJlbH1cbiAgICAgICAgICAgICAgICAgIC8vIEB0cy1pZ25vcmVcbiAgICAgICAgICAgICAgICAgIGNvbG9yPXtkYXRhc2V0c1tsYXllci5jb25maWcuZGF0YUlkXS5jb2xvcn1cbiAgICAgICAgICAgICAgICAgIGlzU2VsZWN0aW9uPXt0cnVlfVxuICAgICAgICAgICAgICAgICAgaXNBY3RpdmU9e2xheWVySWQuaW5jbHVkZXMobGF5ZXIuaWQpfVxuICAgICAgICAgICAgICAgICAgb25DbGljaz17KCkgPT4gb25Ub2dnbGVMYXllcihsYXllcil9XG4gICAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJsYXllci1wYW5lbC1pdGVtXCJcbiAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICApKVxuICAgICAgICAgICAgKSA6IChcbiAgICAgICAgICAgICAgPEFjdGlvblBhbmVsSXRlbVxuICAgICAgICAgICAgICAgIGtleT17J25vLWxheWVycyd9XG4gICAgICAgICAgICAgICAgbGFiZWw9e2ludGwuZm9ybWF0TWVzc2FnZSh7XG4gICAgICAgICAgICAgICAgICBpZDogJ2VkaXRvci5ub0xheWVyc1RvRmls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