geostyler
Version:
Framework for styling geodata
41 lines (40 loc) • 1.18 kB
JavaScript
import { jsxs as o, jsx as e } from "react/jsx-runtime";
/* empty css */
import { Divider as s, Tree as a, Button as c } from "antd";
import n from "../../Util/FilterUtil.js";
import { PlusOutlined as m } from "@ant-design/icons";
import { useGeoStylerLocale as f } from "../../context/GeoStylerContext/GeoStylerContext.js";
const x = ({
filter: r,
onEditFilterClick: i = () => {
}
}) => {
const l = f("FilterOverview");
let t = [];
return r && (t = n.filterToTree(r)), /* @__PURE__ */ o("div", { className: "gs-filter-overview", children: [
/* @__PURE__ */ e("h2", { children: l.filterTitle }),
/* @__PURE__ */ e(s, {}),
r ? /* @__PURE__ */ e(
a,
{
treeData: t,
defaultExpandAll: !0,
selectable: !1,
showLine: { showLeafIcon: !1 },
switcherIcon: /* @__PURE__ */ e("div", {}),
onClick: i
}
) : /* @__PURE__ */ e("div", { className: "gs-filter-overview-add", children: /* @__PURE__ */ e(
c,
{
type: "text",
icon: /* @__PURE__ */ e(m, {}),
size: "large",
onClick: i
}
) })
] });
};
export {
x as FilterOverview
};