kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
273 lines (272 loc) • 45.7 kB
JavaScript
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.LegendColorDisplayFactory = LegendColorDisplayFactory;
exports.LegendRowEditorFactory = LegendRowEditorFactory;
exports.LegendRowFactory = LegendRowFactory;
exports.ResetColorLabelFactory = ResetColorLabelFactory;
exports["default"] = void 0;
exports.useLayerColorLegends = useLayerColorLegends;
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
var _react = _interopRequireWildcard(require("/Users/ihordykhta/Desktop/unfolded/kepler.gl/node_modules/react"));
var _styledComponents = _interopRequireWildcard(require("/Users/ihordykhta/Desktop/unfolded/kepler.gl/node_modules/styled-components"));
var _src = require("/Users/ihordykhta/Desktop/unfolded/kepler.gl/src/constants/src");
var _src2 = require("/Users/ihordykhta/Desktop/unfolded/kepler.gl/src/utils/src");
var _icons = require("./icons");
var _styledComponents2 = require("./styled-components");
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6; // 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; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
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; }
var ROW_H = 15;
var GAP = 2;
var RECT_W = 20;
var stopClickPropagation = function stopClickPropagation(e) {
return e.stopPropagation();
};
var inputCss = (0, _styledComponents.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n input {\n pointer-events: none;\n }\n"])));
var StyledLegend = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n ", ";\n ", ";\n overflow: auto;\n margin-bottom: ", "px;\n display: grid;\n grid-row-gap: ", "px;\n padding: 2px 0;\n\n ", "\n"])), function (props) {
return props.theme.sidePanelScrollBar;
}, function (props) {
return props.isExpanded ? '' : "max-height: 156px;";
}, GAP, GAP, function (props) {
return props.disableEdit ? inputCss : '';
});
var StyledLegendRow = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n height: 20px;\n"])));
function ResetColorLabelFactory() {
return (0, _styledComponents["default"])(_icons.Reset)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n cursor: pointer;\n\n &:hover {\n color: ", ";\n }\n "])), function (props) {
return props.theme.labelColorLT;
}, function (props) {
return props.theme.panelHeaderIconHover;
});
}
var StyleInlineInput = (0, _styledComponents["default"])(_styledComponents2.InlineInput)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n font-size: 9.5px;\n line-height: ", "px;\n height: ", "px;\n color: ", ";\n width: unset;\n padding: 2px;\n flex: 1;\n margin: 0 ", "px;\n :hover {\n height: ", "px;\n }\n"])), ROW_H, ROW_H, function (props) {
return props.theme.textColor;
}, GAP, ROW_H);
function LegendRowEditorFactory() {
var LegendRowEditor = function LegendRowEditor(_ref) {
var color = _ref.color,
label = _ref.label,
onEdit = _ref.onEdit,
_ref$disabled = _ref.disabled,
disabled = _ref$disabled === void 0 ? false : _ref$disabled;
var onChange = (0, _react.useCallback)(function (event) {
return onEdit(event.target.value);
}, [onEdit]);
return /*#__PURE__*/_react["default"].createElement(StyleInlineInput, {
type: "text",
className: "legend__label__title__editor",
value: label,
onClick: stopClickPropagation,
onChange: onChange,
disabled: disabled,
id: "".concat(color, ":input-legend-label")
});
};
LegendRowEditor.displayName = 'LegendRowEditor';
return LegendRowEditor;
}
var LegendRowStyle = {
width: "".concat(RECT_W, "px"),
height: "".concat(ROW_H, "px")
};
function LegendColorDisplayFactory() {
var LegendColorDisplay = function LegendColorDisplay(_ref2) {
var color = _ref2.color;
var style = (0, _react.useMemo)(function () {
return _objectSpread(_objectSpread({}, LegendRowStyle), {}, {
backgroundColor: color,
marginRight: "".concat(GAP, "px")
});
}, [color]);
return /*#__PURE__*/_react["default"].createElement("div", {
style: style,
className: "legend-row-color"
});
};
return LegendColorDisplay;
}
var StyledLabel = _styledComponents["default"].div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n font-size: 10px;\n color: ", ";\n padding-left: 2px;\n"])), function (props) {
return props.theme.textColor;
});
LegendRowFactory.deps = [LegendColorDisplayFactory, LegendRowEditorFactory, ResetColorLabelFactory];
function LegendRowFactory(LegendColorDisplay, LegendRowEditor, ResetColorLabel) {
var LegendRow = function LegendRow(_ref3) {
var _ref3$label = _ref3.label,
label = _ref3$label === void 0 ? '' : _ref3$label,
displayLabel = _ref3.displayLabel,
color = _ref3.color,
onUpdateLabel = _ref3.onUpdateLabel,
onResetLabel = _ref3.onResetLabel;
var onEdit = (0, _react.useCallback)(function (newLabel) {
return onUpdateLabel && onUpdateLabel(color, newLabel);
}, [color, onUpdateLabel]);
var onReset = (0, _react.useCallback)(function () {
return onResetLabel && onResetLabel(color);
}, [color, onResetLabel]);
var value = displayLabel ? label.toString() : '';
return /*#__PURE__*/_react["default"].createElement(StyledLegendRow, null, /*#__PURE__*/_react["default"].createElement(LegendColorDisplay, {
color: color
}), onUpdateLabel ? /*#__PURE__*/_react["default"].createElement(LegendRowEditor, {
disabled: !onUpdateLabel,
label: value,
color: color,
onEdit: onEdit
}) : /*#__PURE__*/_react["default"].createElement(StyledLabel, null, value), onResetLabel ? /*#__PURE__*/_react["default"].createElement(ResetColorLabel, {
onClick: onReset,
height: "16px"
}) : null);
};
LegendRow.displayName = 'LegendRow';
return LegendRow;
}
var overrideColorLegends = function overrideColorLegends(colorLegends, overrides) {
var data = overrides.data,
labels = overrides.labels;
var newColorLegends = (0, _toConsumableArray2["default"])(colorLegends);
data.forEach(function (datum, index) {
var currentIndex = colorLegends.findIndex(function (d) {
return d.data === datum;
});
if (currentIndex !== -1) {
newColorLegends[currentIndex] = {
label: labels[index],
data: datum,
override: true
};
newColorLegends[currentIndex].label = labels[index];
} else {
newColorLegends.push({
data: datum,
label: labels[index],
override: true
});
}
});
return newColorLegends;
};
/**
* Overrides legend labels with color legends.
* @param param0 Legend info and override parameters.
* @returns Original or overriden lenends.
*/
function overrideByCustomLegend(_ref4) {
var colorLegends = _ref4.colorLegends,
currentLegends = _ref4.currentLegends;
if (colorLegends && (0, _src2.isObject)(colorLegends)) {
// override labels with color legends
var data = Object.keys(colorLegends);
var labels = Object.values(colorLegends);
return overrideColorLegends(currentLegends, {
data: data,
labels: labels
});
}
return currentLegends;
}
function useLayerColorLegends(layer, scaleType, domain, range, isFixed, fieldType, labelFormat, mapState) {
var scale = (0, _react.useMemo)(function () {
return (0, _src2.getLayerColorScale)({
range: range,
domain: domain,
scaleType: scaleType,
isFixed: isFixed,
layer: layer
});
}, [range, domain, scaleType, isFixed, layer]);
var scaleByZoom = (0, _react.useMemo)(function () {
return (0, _src2.getVisualChannelScaleByZoom)({
scale: scale,
layer: layer,
mapState: mapState
});
}, [scale, layer, mapState]);
var currentLegends = (0, _react.useMemo)(function () {
if (scaleType === _src.SCALE_TYPES.customOrdinal && range !== null && range !== void 0 && range.colorMap) {
var colorBreaks = (0, _src2.colorMapToCategoricalColorBreaks)(range.colorMap);
return colorBreaks === null || colorBreaks === void 0 ? void 0 : colorBreaks.map(function (cb) {
return {
data: cb.data,
label: Array.isArray(cb.label) ? cb.label.length > 5 ? "".concat(cb.label.length, " selected") : cb.label : cb.label || ''
};
});
}
return (0, _src2.getLegendOfScale)({
scale: scaleByZoom,
scaleType: scaleType,
labelFormat: labelFormat,
fieldType: fieldType
});
}, [range, scaleByZoom, scaleType, labelFormat, fieldType]);
var LegendsWithCustomLegends = (0, _react.useMemo)(function () {
return overrideByCustomLegend({
colorLegends: range === null || range === void 0 ? void 0 : range.colorLegends,
currentLegends: currentLegends
});
}, [range === null || range === void 0 ? void 0 : range.colorLegends, currentLegends]);
return LegendsWithCustomLegends || [];
}
ColorLegendFactory.deps = [LegendRowFactory];
function ColorLegendFactory(LegendRow) {
var ColorLegend = function ColorLegend(_ref5) {
var layer = _ref5.layer,
isFixed = _ref5.isFixed,
isExpanded = _ref5.isExpanded,
domain = _ref5.domain,
range = _ref5.range,
labelFormat = _ref5.labelFormat,
scaleType = _ref5.scaleType,
fieldType = _ref5.fieldType,
mapState = _ref5.mapState,
onUpdateColorLegend = _ref5.onUpdateColorLegend,
_ref5$displayLabel = _ref5.displayLabel,
displayLabel = _ref5$displayLabel === void 0 ? true : _ref5$displayLabel,
_ref5$disableEdit = _ref5.disableEdit,
disableEdit = _ref5$disableEdit === void 0 ? false : _ref5$disableEdit;
var _ref6 = range || {},
colorLegends = _ref6.colorLegends;
var legends = useLayerColorLegends(layer, scaleType, domain, range, isFixed, fieldType, labelFormat, mapState);
var onUpdateLabel = (0, _react.useCallback)(function (color, newValue) {
if (onUpdateColorLegend) {
onUpdateColorLegend(_objectSpread(_objectSpread({}, colorLegends), {}, (0, _defineProperty2["default"])({}, color, newValue)));
}
}, [onUpdateColorLegend, colorLegends]);
var onResetLabel = (0, _react.useCallback)(function (color) {
/* eslint-disable no-unused-vars */
// @ts-ignore
var _ = colorLegends[color],
rest = (0, _objectWithoutProperties2["default"])(colorLegends, [color].map(_toPropertyKey));
if (onUpdateColorLegend && rest) {
onUpdateColorLegend(rest);
}
/* eslint-enable no-unused-vars */
}, [onUpdateColorLegend, colorLegends]);
return /*#__PURE__*/_react["default"].createElement(StyledLegend, {
className: "styled-color-legend",
disableEdit: disableEdit,
isExpanded: isExpanded
}, legends.map(function (legend, i) {
return /*#__PURE__*/_react["default"].createElement(LegendRow, {
key: "".concat(legend.data, "-").concat(i),
label: legend.label,
displayLabel: displayLabel,
color: legend.data,
onUpdateLabel: !disableEdit ? onUpdateLabel : undefined,
onResetLabel: legend.override && !disableEdit ? onResetLabel : undefined
});
}));
};
return _react["default"].memo(ColorLegend);
}
var _default = exports["default"] = ColorLegendFactory;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6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VwZGF0ZUNvbG9yTGVnZW5kKSB7XG4gICAgICAgICAgb25VcGRhdGVDb2xvckxlZ2VuZCh7XG4gICAgICAgICAgICAuLi5jb2xvckxlZ2VuZHMsXG4gICAgICAgICAgICBbY29sb3JdOiBuZXdWYWx1ZVxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgW29uVXBkYXRlQ29sb3JMZWdlbmQsIGNvbG9yTGVnZW5kc11cbiAgICApO1xuXG4gICAgY29uc3Qgb25SZXNldExhYmVsID0gdXNlQ2FsbGJhY2soXG4gICAgICBjb2xvciA9PiB7XG4gICAgICAgIC8qIGVzbGludC1kaXNhYmxlIG5vLXVudXNlZC12YXJzICovXG4gICAgICAgIC8vIEB0cy1pZ25vcmVcbiAgICAgICAgY29uc3Qge1tjb2xvcl06IF8sIC4uLnJlc3R9ID0gY29sb3JMZWdlbmRzO1xuICAgICAgICBpZiAob25VcGRhdGVDb2xvckxlZ2VuZCAmJiByZXN0KSB7XG4gICAgICAgICAgb25VcGRhdGVDb2xvckxlZ2VuZChyZXN0KTtcbiAgICAgICAgfVxuICAgICAgICAvKiBlc2xpbnQtZW5hYmxlIG5vLXVudXNlZC12YXJzICovXG4gICAgICB9LFxuICAgICAgW29uVXBkYXRlQ29sb3JMZWdlbmQsIGNvbG9yTGVnZW5kc11cbiAgICApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIDxTdHlsZWRMZWdlbmRcbiAgICAgICAgY2xhc3NOYW1lPVwic3R5bGVkLWNvbG9yLWxlZ2VuZFwiXG4gICAgICAgIGRpc2FibGVFZGl0PXtkaXNhYmxlRWRpdH1cbiAgICAgICAgaXNFeHBhbmRlZD17aXNFeHBhbmRlZH1cbiAgICAgID5cbiAgICAgICAge2xlZ2VuZHMubWFwKChsZWdlbmQsIGkpID0+IChcbiAgICAgICAgICA8TGVnZW5kUm93XG4gICAgICAgICAgICBrZXk9e2Ake2xlZ2VuZC5kYXRhfS0ke2l9YH1cbiAgICAgIC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