UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

35 lines (34 loc) 1.43 kB
(function() { try { var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; e.SENTRY_RELEASE = { id: "3.20.0" }; var t = new e.Error().stack; t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "74a26cb7-6828-48ae-b86f-9d53fe430121", e._sentryDebugIdIdentifier = "sentry-dbid-74a26cb7-6828-48ae-b86f-9d53fe430121"); } catch {} })(); import { t as e } from "./jsx-runtime-BRhWrtmW.js"; import { i as t, n, r, t as i } from "./select-DvPNhCF6.js"; import { t as a } from "./settings-item-CAMlHscI.js"; //#region ../debug/src/lib/ui/enum-editor.tsx var o = e(), s = "__EMPTY__", c = (e) => e === "" ? s : e, l = (e) => e === s ? "" : e; function u(e) { let s = e.context.values.every((e) => typeof e == "string"), u = s ? (e) => e : (e) => JSON.stringify(e), d = s ? (e) => e : (e) => JSON.parse(e), f = c(u(e.value)), p = e.context.values.map((e) => ({ value: c(u(e)), label: u(e) })); return /* @__PURE__ */ (0, o.jsx)(a, { label: e.label, children: /* @__PURE__ */ (0, o.jsxs)(i, { value: f, onValueChange: (t) => { e.onChange(d(l(t))); }, children: [/* @__PURE__ */ (0, o.jsx)(r, {}), /* @__PURE__ */ (0, o.jsx)(n, { children: p.map((e) => /* @__PURE__ */ (0, o.jsx)(t, { value: e.value, children: e.label }, e.value)) })] }) }); } //#endregion export { u as EnumEditor };