UNPKG

geostyler

Version:
54 lines (53 loc) 1.29 kB
import { jsx as t, jsxs as o } from "react/jsx-runtime"; import { Select as u, Button as d } from "antd"; import { FunctionUI as e } from "../../FunctionUI/FunctionUI.js"; import { isGeoStylerFunction as x } from "geostyler-style"; import { FunctionOutlined as S } from "@ant-design/icons"; /* empty css */ const E = ({ className: p, functionUiProps: c, onCancel: i, onChange: r, selectProps: l, value: s }) => { let m = "string-expression-select"; return p && (m += ` ${p}`), x(s) ? /* @__PURE__ */ t("span", { className: m, children: /* @__PURE__ */ t( e, { type: "string", value: s, ...c, onChange: r, onCancel: () => i == null ? void 0 : i("string") } ) }) : /* @__PURE__ */ o("span", { className: m, children: [ /* @__PURE__ */ t( u, { value: s, onChange: (f) => { f === null && (r == null || r(void 0)), r == null || r(f); }, ...l } ), /* @__PURE__ */ t( d, { icon: /* @__PURE__ */ t(S, {}), onClick: () => { r == null || r({ name: "property", args: [""] }); } } ) ] }); }; export { E as StringExpressionSelect, E as default };