UNPKG

geostyler

Version:
110 lines (109 loc) 2.84 kB
import { jsxs as m, jsx as e } from "react/jsx-runtime"; import { useState as l } from "react"; import { Form as n } from "antd"; /* empty css */ import { ColorField as y } from "../Symbolizer/Field/ColorField/ColorField.js"; import { RadiusField as x } from "../Symbolizer/Field/RadiusField/RadiusField.js"; import { OpacityField as M } from "../Symbolizer/Field/OpacityField/OpacityField.js"; import { KindField as j } from "../Symbolizer/Field/KindField/KindField.js"; import { WellKnownNameField as B } from "../Symbolizer/Field/WellKnownNameField/WellKnownNameField.js"; import { ImageField as E } from "../Symbolizer/Field/ImageField/ImageField.js"; import { useGeoStylerLocale as O } from "../../context/GeoStylerContext/GeoStylerContext.js"; import { getFormItemConfig as R } from "../../Util/FormItemUtil.js"; const V = ({ onStylePropChange: a = () => { } }) => { const i = O("BulkEditor"), [s, c] = l(), [d, g] = l(), [u, p] = l(), [r, b] = l("Mark"), [f, h] = l(), [C, F] = l(), I = ["Mark", "Icon"], k = (o) => { c(o), a("color", o); }, v = (o) => { g(o), a("radius", o); }, K = (o) => { p(o), a("opacity", o); }, L = (o) => { h(o), a("wellKnownName", o); }, N = (o) => { F(o), a("image", o); }, t = R(); return /* @__PURE__ */ m("div", { className: "gs-bulkeditor", children: [ /* @__PURE__ */ e( n.Item, { ...t, label: i.colorLabel, children: /* @__PURE__ */ e( y, { value: s, onChange: k } ) } ), /* @__PURE__ */ e( n.Item, { ...t, label: i.radiusLabel, children: /* @__PURE__ */ e( x, { value: d, onChange: v } ) } ), /* @__PURE__ */ e( n.Item, { ...t, label: i.opacityLabel, children: /* @__PURE__ */ e( M, { value: u, onChange: K } ) } ), /* @__PURE__ */ m( n.Item, { ...t, label: i.symbolLabel, className: "gs-symbol-selection", children: [ /* @__PURE__ */ e( j, { value: r, onChange: b, symbolizerKinds: I } ), r === "Mark" && /* @__PURE__ */ e( B, { value: f, onChange: L } ), r === "Icon" && // TODO add iconLibraries config and viewhandling /* @__PURE__ */ e( E, { value: C, onChange: N, placeholder: i.imageFieldLabel } ) ] } ) ] }); }; export { V as BulkEditor };