UNPKG

geostyler

Version:
87 lines (86 loc) 2.6 kB
import { jsxs as t, jsx as e } from "react/jsx-runtime"; /* empty css */ import { Form as m, Divider as R } from "antd"; import { FieldContainer as F } from "../FieldContainer/FieldContainer.js"; import { NameField as S } from "../NameField/NameField.js"; import { MinScaleDenominator as x } from "../ScaleDenominator/MinScaleDenominator.js"; import { MaxScaleDenominator as M } from "../ScaleDenominator/MaxScaleDenominator.js"; import { Renderer as N } from "../Renderer/Renderer/Renderer.js"; import { useGeoStylerComposition as D, useGeoStylerLocale as I } from "../../context/GeoStylerContext/GeoStylerContext.js"; import { getFormItemConfig as L } from "../../Util/FormItemUtil.js"; import { ElseRuleField as j } from "../Symbolizer/Field/ElseRuleField/ElseRuleField.js"; const K = (s) => { const c = D("Rule"), u = { ...s, ...c }, { maxScale: f, maxScaleField: o, minScale: d, minScaleField: i, name: p, nameField: n, onMaxScaleChange: h = () => { }, onMinScaleChange: C = () => { }, onNameChange: g = () => { }, symbolizers: v = [], elseRuleField: r, elseRule: b, onElseRuleChange: y = () => { } } = u, a = I("RuleFieldContainer"), l = L(); return /* @__PURE__ */ t(F, { className: "gs-rule-field-container", children: [ /* @__PURE__ */ t("div", { className: "gs-rule-field-container-header", children: [ (n == null ? void 0 : n.visibility) === !1 ? null : /* @__PURE__ */ e( m.Item, { ...l, label: a.nameFieldLabel, children: /* @__PURE__ */ e( S, { value: p, onChange: g, placeholder: a.nameFieldPlaceholder } ) } ), (i == null ? void 0 : i.visibility) === !1 ? null : /* @__PURE__ */ e( x, { value: d, onChange: C, ...l } ), (o == null ? void 0 : o.visibility) === !1 ? null : /* @__PURE__ */ e( M, { value: f, onChange: h, ...l } ), (r == null ? void 0 : r.visibility) === !1 ? null : /* @__PURE__ */ e( m.Item, { ...l, label: a.elseRuleFieldLabel, children: /* @__PURE__ */ e( j, { value: b, onChange: y } ) } ) ] }), /* @__PURE__ */ e(R, { type: "vertical" }), /* @__PURE__ */ e(N, { symbolizers: v }) ] }); }; export { K as RuleFieldContainer };