geostyler
Version:
Framework for styling geodata
66 lines (65 loc) • 1.91 kB
JavaScript
import { jsxs as u, jsx as l } from "react/jsx-runtime";
import { WellKnownNameField as w } from "../Field/WellKnownNameField/WellKnownNameField.js";
import { WellKnownNameEditor as C } from "../WellKnownNameEditor/WellKnownNameEditor.js";
import { Form as a } from "antd";
import c from "lodash-es/cloneDeep.js";
import { useGeoStylerComposition as h, useGeoStylerLocale as v, useGeoStylerUnsupportedProperties as N } from "../../../context/GeoStylerContext/GeoStylerContext.js";
import { VisibilityField as K } from "../Field/VisibilityField/VisibilityField.js";
import { getFormItemConfig as S } from "../../../Util/FormItemUtil.js";
const M = (p) => {
const b = h("MarkEditor"), f = { ...p, ...b }, {
onSymbolizerChange: e,
symbolizer: o,
visibilityField: n,
wellKnownNameField: r
} = f, m = v("MarkEditor"), {
getFormItemSupportProps: y
} = N(o), d = (t) => {
const i = c(o);
i.wellKnownName = t, e && e(i);
}, g = (t) => {
const i = c(o);
i.visibility = t, e && e(i);
}, s = S();
return /* @__PURE__ */ u("div", { className: "gs-mark-symbolizer-editor", children: [
(n == null ? void 0 : n.visibility) === !1 ? null : /* @__PURE__ */ l(
a.Item,
{
...s,
label: m.visibilityLabel,
children: /* @__PURE__ */ l(
K,
{
value: o.visibility,
onChange: g
}
)
}
),
(r == null ? void 0 : r.visibility) === !1 ? null : /* @__PURE__ */ l(
a.Item,
{
...s,
label: m.wellKnownNameFieldLabel,
...y("wellKnownName"),
children: /* @__PURE__ */ l(
w,
{
value: o.wellKnownName,
onChange: d
}
)
}
),
/* @__PURE__ */ l(
C,
{
symbolizer: o,
onSymbolizerChange: e
}
)
] });
};
export {
M as MarkEditor
};