diff --git a/dist/button.js b/dist/button.js index a78e155..3605c68 100644 --- a/dist/button.js +++ b/dist/button.js @@ -1,4 +1,4 @@ -import { B as e, n as r } from "./common/main-B944cmcs.js"; +import { B as e, n as r } from "./common/main-CJT9_qCi.js"; import "./common/vender-B-S-5jfg.js"; export { e as default, diff --git a/dist/common/main-B944cmcs.js b/dist/common/main-CJT9_qCi.js similarity index 66% rename from dist/common/main-B944cmcs.js rename to dist/common/main-CJT9_qCi.js index aaf7bdb..32706ac 100644 --- a/dist/common/main-B944cmcs.js +++ b/dist/common/main-CJT9_qCi.js @@ -1,6 +1,6 @@ -var Ct = Object.defineProperty; -var Lt = (e, t, n) => t in e ? Ct(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; -var N = (e, t, n) => (Lt(e, typeof t != "symbol" ? t + "" : t, n), n), Be = (e, t, n) => { +var Lt = Object.defineProperty; +var kt = (e, t, n) => t in e ? Lt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; +var N = (e, t, n) => (kt(e, typeof t != "symbol" ? t + "" : t, n), n), Be = (e, t, n) => { if (!t.has(e)) throw TypeError("Cannot " + n); }; @@ -9,7 +9,7 @@ var f = (e, t, n) => (Be(e, t, "read from private field"), n ? n.call(e) : t.get throw TypeError("Cannot add the same private member more than once"); t instanceof WeakSet ? t.add(e) : t.set(e, n); }, G = (e, t, n, s) => (Be(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n); -var ve = (e, t, n, s) => ({ +var Fe = (e, t, n, s) => ({ set _(r) { G(e, t, r, n); }, @@ -18,29 +18,29 @@ var ve = (e, t, n, s) => ({ } }); import m from "lodash"; -import Re from "axios"; -import y, { useMemo as q, useEffect as R, useRef as P, useState as V, useCallback as se, useContext as st } from "react"; -import He from "ff-request"; -import kt from "https://assets.fsdpf.net/js/esm/spark-md5@3_0_2.min.js?url"; -import { jsx as h, jsxs as I, Fragment as Nt } from "react/jsx-runtime"; -import { QuestionOutlined as Wt, LoadingOutlined as Zt, createFromIconfontCN as Et } from "@ant-design/icons"; +import Ce from "axios"; +import y, { useMemo as q, useEffect as C, useRef as j, useState as R, useCallback as oe, useContext as st } from "react"; +import xe from "ff-request"; +import Nt from "https://assets.fsdpf.net/js/esm/spark-md5@3_0_2.min.js?url"; +import { jsx as h, jsxs as P, Fragment as Wt } from "react/jsx-runtime"; +import { QuestionOutlined as Zt, LoadingOutlined as Et, createFromIconfontCN as Tt } from "@ant-design/icons"; import $ from "classnames"; -import { notification as rt, Drawer as Tt, Modal as wt, Form as ue, ConfigProvider as Gt, Popconfirm as Ot, Tooltip as $t, Button as Fe, Popover as ot } from "antd"; +import { notification as rt, Drawer as wt, Modal as Gt, Form as de, ConfigProvider as Ot, Popconfirm as $t, Tooltip as It, Button as Re, Popover as ot } from "antd"; import { P as W } from "./vender-B-S-5jfg.js"; -import Ve, { Field as it, FieldContext as It } from "rc-field-form"; -import { flushSync as Pt } from "react-dom"; -import { useParams as jt, generatePath as zt, createBrowserRouter as Ut } from "react-router-dom"; -const at = ({ type: e, className: t, ...n }) => { +import Ve, { Field as it, FieldContext as Pt } from "rc-field-form"; +import { flushSync as jt } from "react-dom"; +import { useParams as at, generatePath as zt, createBrowserRouter as Ut } from "react-router-dom"; +const lt = ({ type: e, className: t, ...n }) => { if (!(e != null && e.startsWith("icon-"))) - return /* @__PURE__ */ h(Wt, {}); + return /* @__PURE__ */ h(Zt, {}); if (e === "icon-loading") - return /* @__PURE__ */ h(Zt, { className: t, ...n }); - const s = q(() => Et({ scriptUrl: re.get("Common.ICONFONT", []) }), [re.get("Common.ICONFONT")]); + return /* @__PURE__ */ h(Et, { className: t, ...n }); + const s = q(() => Tt({ scriptUrl: ie.get("Common.ICONFONT", []) }), [ie.get("Common.ICONFONT")]); return /* @__PURE__ */ h(s, { type: e, className: $("iconfont", t), ...n }); }, Xt = ({ className: e, title: t, content: n, icon: s, $close: r, category: o, duration: i = 4.5 }) => { - const [l, c] = rt.useNotification(); - return R(() => { - l[o || "open"]({ + const [a, c] = rt.useNotification(); + return C(() => { + a[o || "open"]({ className: e, message: t, description: n, @@ -50,52 +50,52 @@ const at = ({ type: e, className: t, ...n }) => { }); }, [t, n, s]), c; }, Dt = ({ className: e, title: t, content: n, okText: s, $close: r, duration: o = 5e3 }) => { - var a; - const i = P(), [l, c] = V(); - return R(() => (l > 0 && (i.current = setTimeout(() => { - l <= 1 ? r() : c((d) => d - 1); - }, 1e3)), () => clearTimeout(i.current)), [l]), R(() => { + var l; + const i = j(), [a, c] = R(); + return C(() => (a > 0 && (i.current = setTimeout(() => { + a <= 1 ? r() : c((d) => d - 1); + }, 1e3)), () => clearTimeout(i.current)), [a]), C(() => { c(Math.max(Math.ceil(o / 1e3), 0)); - }, [o]), /* @__PURE__ */ h("div", { className: $("ff-toast-confirm", e), onClick: (d) => d.mpEvent.currentTarget.id === d.mpEvent.target.id && r(), children: /* @__PURE__ */ I("div", { className: "ff-toast-confirm-container", children: [ + }, [o]), /* @__PURE__ */ h("div", { className: $("ff-toast-confirm", e), onClick: (d) => d.mpEvent.currentTarget.id === d.mpEvent.target.id && r(), children: /* @__PURE__ */ P("div", { className: "ff-toast-confirm-container", children: [ /* @__PURE__ */ h("div", { className: "ff-toast-confirm-title", children: t }), /* @__PURE__ */ h("div", { className: "ff-toast-confirm-content", children: n }), - /* @__PURE__ */ I("div", { className: "ff-toast-confirm-operations", children: [ - /* @__PURE__ */ I("div", { className: "ff-toast-confirm-cancel", onClick: () => r(!1), children: [ + /* @__PURE__ */ P("div", { className: "ff-toast-confirm-operations", children: [ + /* @__PURE__ */ P("div", { className: "ff-toast-confirm-cancel", onClick: () => r(!1), children: [ "取消 (", - l, + a, ")" ] }), y.isValidElement(s) ? y.cloneElement(s, { onClick: () => r(!0), - className: $("ff-toast-confirm-ok", (a = s.props) == null ? void 0 : a.className) + className: $("ff-toast-confirm-ok", (l = s.props) == null ? void 0 : l.className) }) : /* @__PURE__ */ h("div", { className: "ff-toast-confirm-ok", onClick: () => r(!0), children: s || "确定" }) ] }) ] }) }); -}, oe = y.createContext({ +}, ae = y.createContext({ ele: {}, mount: () => { }, unmount: () => { } -}), H = ({ className: e, rootClassName: t, children: n, actions: s, title: r, subTitle: o, extras: i }) => { - const { mount: l, unmount: c } = y.useContext(oe); - return R(() => (l("className", t), () => c("className")), [t]), s && H.Action({ children: s }), r && H.Title({ children: r }), o && H.SubTitle({ children: o }), i && H.Extra({ children: i }), /* @__PURE__ */ h("div", { className: $("ff-container", e), children: n }); +}), x = ({ className: e, rootClassName: t, children: n, actions: s, title: r, subTitle: o, extras: i }) => { + const { mount: a, unmount: c } = y.useContext(ae); + return C(() => (a("className", t), () => c("className")), [t]), s && x.Action({ children: s }), r && x.Title({ children: r }), o && x.SubTitle({ children: o }), i && x.Extra({ children: i }), /* @__PURE__ */ h("div", { className: $("ff-container", e), children: n }); }, je = (e) => ({ children: t, className: n }) => { - const { mount: s, unmount: r } = y.useContext(oe); - return R(() => (s(e, y.createElement("div", { + const { mount: s, unmount: r } = y.useContext(ae); + return C(() => (s(e, y.createElement("div", { key: `ff-${e}`, className: $(`ff-toast-${e}`, n) }, t)), () => r(e)), [n, t]), null; }; -H.Action = je("actions"); -H.Title = je("title"); -H.SubTitle = je("sub-title"); -H.Extra = je("extras"); +x.Action = je("actions"); +x.Title = je("title"); +x.SubTitle = je("sub-title"); +x.Extra = je("extras"); const Yn = ({ name: e }) => { - const { ele: t } = y.useContext(oe); + const { ele: t } = y.useContext(ae); return t == null ? void 0 : t[e]; }; -H.propTypes = { +x.propTypes = { // root className rootClassName: W.string, // 容器 className @@ -110,106 +110,106 @@ H.propTypes = { extras: W.any }; const St = y.forwardRef(({ $close: e, children: t, className: n, title: s, ...r }, o) => { - const i = P(), [l, c] = V(!0), [a, d] = V({}), g = se((u, b) => d((v) => ({ ...v, [u]: b })), []), p = se((u) => d((b) => ({ ...b, [u]: void 0 })), []); + const i = j(), [a, c] = R(!0), [l, d] = R({}), g = oe((u, b) => d((v) => ({ ...v, [u]: b })), []), p = oe((u) => d((b) => ({ ...b, [u]: void 0 })), []); return y.useImperativeHandle(o, () => ({ handleClose: (u) => { i.current = u, c(!1); } - })), /* @__PURE__ */ h(oe.Provider, { value: { ele: a, mount: g, unmount: p }, children: /* @__PURE__ */ h( - Tt, + })), /* @__PURE__ */ h(ae.Provider, { value: { ele: l, mount: g, unmount: p }, children: /* @__PURE__ */ h( + wt, { ...r, - title: s || (a == null ? void 0 : a.title), - open: l, + title: s || (l == null ? void 0 : l.title), + open: a, onClose: () => c(!1), afterOpenChange: (u) => !u && e(i.current), - className: $("ff-toast ff-toast-drawer", n, a == null ? void 0 : a.className), - extra: a == null ? void 0 : a["sub-title"], + className: $("ff-toast ff-toast-drawer", n, l == null ? void 0 : l.className), + extra: l == null ? void 0 : l["sub-title"], classNames: { header: "ff-toast-header", footer: "ff-toast-footer" }, - footer: a != null && a.extras || a != null && a.actions ? /* @__PURE__ */ I(y.Fragment, { children: [ - (a == null ? void 0 : a.extras) || /* @__PURE__ */ h("div", { className: "ff-toast-extras" }), - (a == null ? void 0 : a.actions) || /* @__PURE__ */ h("div", { className: "ff-toast-actions" }) + footer: l != null && l.extras || l != null && l.actions ? /* @__PURE__ */ P(y.Fragment, { children: [ + (l == null ? void 0 : l.extras) || /* @__PURE__ */ h("div", { className: "ff-toast-extras" }), + (l == null ? void 0 : l.actions) || /* @__PURE__ */ h("div", { className: "ff-toast-actions" }) ] }) : void 0, children: t } ) }); -}), Ht = y.forwardRef(({ $close: e, children: t, className: n, title: s, ...r }, o) => { - const i = P(), [l, c] = V(!0), [a, d] = V({}), g = se((u, b) => d((v) => ({ ...v, [u]: b })), []), p = se((u) => d((b) => ({ ...b, [u]: void 0 })), []); +}), xt = y.forwardRef(({ $close: e, children: t, className: n, title: s, ...r }, o) => { + const i = j(), [a, c] = R(!0), [l, d] = R({}), g = oe((u, b) => d((v) => ({ ...v, [u]: b })), []), p = oe((u) => d((b) => ({ ...b, [u]: void 0 })), []); return y.useImperativeHandle(o, () => ({ handleClose: (u) => { i.current = u, c(!1); } - })), /* @__PURE__ */ h(oe.Provider, { value: { ele: a, mount: g, unmount: p }, children: /* @__PURE__ */ h( - wt, + })), /* @__PURE__ */ h(ae.Provider, { value: { ele: l, mount: g, unmount: p }, children: /* @__PURE__ */ h( + Gt, { ...r, - title: /* @__PURE__ */ I(Nt, { children: [ - s || (a == null ? void 0 : a.title), - a == null ? void 0 : a["sub-title"] + title: /* @__PURE__ */ P(Wt, { children: [ + s || (l == null ? void 0 : l.title), + l == null ? void 0 : l["sub-title"] ] }), - open: l, + open: a, onCancel: () => { i.current = !1, c(!1); }, afterOpenChange: (u) => !u && e(i.current), - className: $("ff-toast ff-toast-modal", n, a == null ? void 0 : a.className), + className: $("ff-toast ff-toast-modal", n, l == null ? void 0 : l.className), keyboard: !0, classNames: { header: "ff-toast-header", footer: "ff-toast-footer" }, - footer: a != null && a.extras || a != null && a.actions ? /* @__PURE__ */ I(y.Fragment, { children: [ - (a == null ? void 0 : a.extras) || /* @__PURE__ */ h("div", { className: "ff-toast-extras" }), - (a == null ? void 0 : a.actions) || /* @__PURE__ */ h("div", { className: "ff-toast-actions" }) + footer: l != null && l.extras || l != null && l.actions ? /* @__PURE__ */ P(y.Fragment, { children: [ + (l == null ? void 0 : l.extras) || /* @__PURE__ */ h("div", { className: "ff-toast-extras" }), + (l == null ? void 0 : l.actions) || /* @__PURE__ */ h("div", { className: "ff-toast-actions" }) ] }) : void 0, children: t } ) }); }); -var we, de, K, Ge, Oe, $e, Ie, fe; -const ce = class ce extends y.Component { +var we, fe, K, Ge, Oe, $e, Ie, me; +const ue = class ue extends y.Component { constructor(n) { super(n); F(this, we, null); - F(this, de, 0); + F(this, fe, 0); F(this, K, /* @__PURE__ */ new Map()); F(this, Ge, (n) => new Promise((s) => { - const r = ve(this, de)._++; + const r = Fe(this, fe)._++; f(this, K).set(r, y.createElement(Xt, { ...n, key: r, - $close: (o) => f(this, fe).call(this, r, () => s(o)) + $close: (o) => f(this, me).call(this, r, () => s(o)) })), this.forceUpdate(); })); F(this, Oe, (n, s) => new Promise((r) => { - const o = ve(this, de)._++; + const o = Fe(this, fe)._++; f(this, K).set(o, y.createElement(Dt, { ...s, content: n, key: o, - $close: (i) => f(this, fe).call(this, o, () => r(i)) + $close: (i) => f(this, me).call(this, o, () => r(i)) })), this.forceUpdate(); })); F(this, $e, (n, s, { mode: r, ...o } = {}) => new Promise((i) => { - const l = ve(this, de)._++, c = { current: null }; - f(this, K).set(l, y.createElement( - r == "drawer" ? St : Ht, + const a = Fe(this, fe)._++, c = { current: null }; + f(this, K).set(a, y.createElement( + r == "drawer" ? St : xt, { ref: c, - key: l, + key: a, maskClosable: !1, ...o, - $close: (a) => f(this, fe).call(this, l, () => i(a)) + $close: (l) => f(this, me).call(this, a, () => i(l)) }, y.createElement(n, { ...s, - $close: (a) => c.current.handleClose(a) + $close: (l) => c.current.handleClose(l) }) )), this.forceUpdate(); })); F(this, Ie, (n, s) => { }); - F(this, fe, (n, s) => { + F(this, me, (n, s) => { f(this, K).delete(n), this.forceUpdate(s); }); - ce.modal = f(this, $e), ce.notification = f(this, Ge), ce.confirm = f(this, Oe), ce.form = f(this, Ie); + ue.modal = f(this, $e), ue.notification = f(this, Ge), ue.confirm = f(this, Oe), ue.form = f(this, Ie); } componentWillUnmount() { var n, s; @@ -217,14 +217,14 @@ const ce = class ce extends y.Component { } render() { const n = Array.from(f(this, K)); - return /* @__PURE__ */ h(oe.Provider, { value: {}, children: n.map(([s, r]) => r) }); + return /* @__PURE__ */ h(ae.Provider, { value: {}, children: n.map(([s, r]) => r) }); } }; -we = new WeakMap(), de = new WeakMap(), K = new WeakMap(), Ge = new WeakMap(), Oe = new WeakMap(), $e = new WeakMap(), Ie = new WeakMap(), fe = new WeakMap(); -let Z = ce; +we = new WeakMap(), fe = new WeakMap(), K = new WeakMap(), Ge = new WeakMap(), Oe = new WeakMap(), $e = new WeakMap(), Ie = new WeakMap(), me = new WeakMap(); +let Z = ue; Z.notification = ({ title: e, content: t, icon: n, category: s, ...r }) => Promise.resolve(rt[s || "open"]({ ...r, - icon: n ? /* @__PURE__ */ h(at, { type: n || "" }) : void 0, + icon: n ? /* @__PURE__ */ h(lt, { type: n || "" }) : void 0, message: e, description: t })); @@ -233,8 +233,8 @@ Z.error = (e, t = {}) => Z.notification({ title: e, category: "error", ...t }); Z.confirm = (e, t = {}) => Z.notification({ content: e, ...t }); Z.form = (e = {}) => Z.notification(e); Z.modal = (e = {}) => Z.notification(e); -const ze = "mine", xe = "token", xt = "web", Yt = 60 * 60 * 24 * 30, Ye = () => { - const e = window.localStorage.getItem(xe); +const ze = "mine", He = "token", Ht = "web", Yt = 60 * 60 * 24 * 30, Ye = () => { + const e = window.localStorage.getItem(He); if (!e) return ""; const t = e.split("."); @@ -264,13 +264,13 @@ const ze = "mine", xe = "token", xt = "web", Yt = 60 * 60 * 24 * 30, Ye = () => return Promise.resolve(null); }, Kn = (e, t, n = {}) => L.post("/api/user-token", { username: e, - passwd: kt.hash(t), - platform: xt, + passwd: Nt.hash(t), + platform: Ht, ...n -}).then(({ token: s }) => (window.localStorage.setItem(xe, s), s)), Kt = () => { - window.localStorage.removeItem(ze), window.localStorage.removeItem(xe); +}).then(({ token: s }) => (window.localStorage.setItem(He, s), s)), Kt = () => { + window.localStorage.removeItem(ze), window.localStorage.removeItem(He); }; -Re.interceptors.request.use((e) => { +Ce.interceptors.request.use((e) => { e.headers.Platform = "web", e.headers.SaaS = window.localStorage.getItem("SaaS"); try { const t = Ye(); @@ -279,17 +279,17 @@ Re.interceptors.request.use((e) => { } return e; }, (e) => Promise.reject({ code: -1, msg: e })); -Re.interceptors.response.use(({ data: e, headers: t }) => ({ ...e, res: t == null ? void 0 : t.Res }), function(e) { +Ce.interceptors.response.use(({ data: e, headers: t }) => ({ ...e, res: t == null ? void 0 : t.Res }), function(e) { return Promise.reject(e.message); }); -window.addEventListener("unhandledrejection", He.onUnhandledRejection); -He.onToast = (e, t) => Z[[0, 1].includes(e) ? "success" : "error"](t).then(() => e === 20300 && Ae.redirect(re.get("Common.WEBSITE_LOGIN_PAGE"))); +window.addEventListener("unhandledrejection", xe.onUnhandledRejection); +xe.onToast = (e, t) => Z[[0, 1].includes(e) ? "success" : "error"](t).then(() => e === 20300 && Ae.redirect(ie.get("Common.WEBSITE_LOGIN_PAGE"))); const At = y.createContext({ user: {}, initUser: () => { }, initUserComplete: !1 -}), lt = y.createContext({ +}), ct = y.createContext({ set: () => { }, get: () => { @@ -299,136 +299,136 @@ const At = y.createContext({ currentRoute: () => { } }); -var me, Ce, he, Y, te, ne; -class ct { +var he, Le, ge, Y, ne, se; +class ut { constructor(t, n) { - F(this, me, /* @__PURE__ */ new Map()); - F(this, Ce, !0); - F(this, he, []); + F(this, he, /* @__PURE__ */ new Map()); + F(this, Le, !0); + F(this, ge, []); F(this, Y, void 0); - F(this, te, () => f(this, Y)); - F(this, ne, () => Promise.resolve()); + F(this, ne, () => f(this, Y)); + F(this, se, () => Promise.resolve()); N(this, "get", (...t) => new Promise((n, s) => { const r = JSON.stringify(t); - if (f(this, me).has(r)) - return n(f(this, ne).call(this, f(this, Y), ...t)); + if (f(this, he).has(r)) + return n(f(this, se).call(this, f(this, Y), ...t)); if (f(this, Y) === void 0) - f(this, he).push([t, n, s]), f(this, Ce) && (G(this, Ce, !1), Promise.resolve(typeof f(this, te) == "function" ? f(this, te).call(this) : f(this, te)).then((o) => G(this, Y, o || null)).finally(() => { - f(this, he).forEach(([o, i, l]) => { + f(this, ge).push([t, n, s]), f(this, Le) && (G(this, Le, !1), Promise.resolve(typeof f(this, ne) == "function" ? f(this, ne).call(this) : f(this, ne)).then((o) => G(this, Y, o || null)).finally(() => { + f(this, ge).forEach(([o, i, a]) => { try { - const c = f(this, ne).call(this, f(this, Y), ...o); - f(this, me).set(JSON.stringify(o), c), i(c); + const c = f(this, se).call(this, f(this, Y), ...o); + f(this, he).set(JSON.stringify(o), c), i(c); } catch (c) { - l(c); + a(c); } - }), f(this, he).length = 0; + }), f(this, ge).length = 0; })); else { - const o = f(this, ne).call(this, f(this, Y), ...t); - f(this, me).set(r, o), n(o); + const o = f(this, se).call(this, f(this, Y), ...t); + f(this, he).set(r, o), n(o); } })); - G(this, ne, n), G(this, te, t); + G(this, se, n), G(this, ne, t); } } -me = new WeakMap(), Ce = new WeakMap(), he = new WeakMap(), Y = new WeakMap(), te = new WeakMap(), ne = new WeakMap(); -var A, Le; -const z = class z { +he = new WeakMap(), Le = new WeakMap(), ge = new WeakMap(), Y = new WeakMap(), ne = new WeakMap(), se = new WeakMap(); +var A, ke; +const U = class U { constructor() { - F(this, Le, null); - N(this, "init", (t) => G(this, Le, t)); - N(this, "get", (t, n) => m.get(f(this, Le), t, n)); - if (f(z, A)) - return f(z, A); + F(this, ke, null); + N(this, "init", (t) => G(this, ke, t)); + N(this, "get", (t, n) => m.get(f(this, ke), t, n)); + if (f(U, A)) + return f(U, A); } }; -A = new WeakMap(), Le = new WeakMap(), F(z, A, null), N(z, "getInstance", () => (f(z, A) || G(z, A, new z()), f(z, A))); -let Ue = z; -const re = Ue.getInstance(), le = new Worker(new URL("data:text/plain;base64,KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2ltcG9ydFNjcmlwdHMoImh0dHBzOi8vYXNzZXRzLmZzZHBmLm5ldC9qcy91bWQvbG9kYXNoQDRfMTdfMjEubWluLmpzIiwiaHR0cHM6Ly9hc3NldHMuZnNkcGYubmV0L2pzL3VtZC9sb2Rhc2gubWl4aW4uanMiKSxpbXBvcnRTY3JpcHRzKCJodHRwczovL2Fzc2V0cy5mc2RwZi5uZXQvanMvdW1kL21vbWVudEAyXzI5XzQubWluLmpzIiwiaHR0cHM6Ly9hc3NldHMuZnNkcGYubmV0L2pzL3VtZC9tb21lbnQubG9jYWxlLnpoLWNuLmpzIiksbW9tZW50LmxvY2FsZSgiemgtY24iKTtjb25zdCBVdGlsPShlLHMpPT57Y29uc3QgdD1VdGlsLm1zZ19pZCsrO3JldHVybiBuZXcgUHJveHkoKCk9Pnt9LHtnZXQoe3Jvb3Q6YX0sbil7Y29uc3Qgbz1hP2Ake2F9LyR7bn1gOm47cmV0dXJuIGZ1bmN0aW9uKC4uLmkpe3JldHVybiBuZXcgUHJvbWlzZSgocixsKT0+e1V0aWwubVF1ZXVlLnNldCh0LFtyLGxdKSxzZWxmLnBvc3RNZXNzYWdlKHtpZDp0LHRhc2tfaWQ6ZSxzZXNzaW9uOnMsY2F0ZWdvcnk6InV0aWwiLG1ldGhvZDpvLGFyZ3M6aX0pfSl9fSxhcHBseShhLG4sbyl7cmV0dXJuIG5ldyBQcm94eShPYmplY3QuY3JlYXRlKHtyb290Om9bMF18fG51bGx9KSx7Z2V0OnRoaXMuZ2V0fSl9fSl9O1V0aWwubXNnX2lkPTAsVXRpbC5tUXVldWU9bmV3IE1hcCxVdGlsLm1NZXRob2RXb3Jrc3BhY2U9bmV3IE1hcCxzZWxmLmFkZEV2ZW50TGlzdGVuZXIoIm1lc3NhZ2UiLGZ1bmN0aW9uKHtkYXRhOntpZDplLGRhdGE6cyxlcnJvcjp0LGNhdGVnb3J5OmF9fSl7YT09PSJ1dGlsIiYmKHQhPT1udWxsP1V0aWwubVF1ZXVlLmdldChlKVsxXSh0KTpVdGlsLm1RdWV1ZS5nZXQoZSlbMF0ocyksVXRpbC5tUXVldWUuZ2V0KGUpLFV0aWwubVF1ZXVlLmRlbGV0ZShlKSl9LCExKSxzZWxmLmFkZEV2ZW50TGlzdGVuZXIoIm1lc3NhZ2UiLCh7ZGF0YTp7aWQsbWV0aG9kLGFyZ3MsY2F0ZWdvcnksc2Vzc2lvbixzb3VyY2VVUkx9fSk9PntpZihjYXRlZ29yeSE9PSJldmFsIilyZXR1cm47c2Vzc2lvbiYmIVV0aWwubU1ldGhvZFdvcmtzcGFjZS5oYXMoc2Vzc2lvbikmJlV0aWwubU1ldGhvZFdvcmtzcGFjZS5zZXQoc2Vzc2lvbix7fSk7Y29uc3QgZXZhbERhdGFTb3VyY2VVUkw9c291cmNlVVJMP2AKLy8jIHNvdXJjZVVSTD1mZjovLy8uLyR7c291cmNlVVJMfWA6IiIsZXZhbERhdGE9ZXZhbChgKGFzeW5jIGZ1bmN0aW9uKHske09iamVjdC5rZXlzKGFyZ3MpLmpvaW4oIiwgIil9fSwgVXRpbCl7JHttZXRob2R9Cn0pJHtldmFsRGF0YVNvdXJjZVVSTH1gKS5jYWxsKHNlc3Npb24/VXRpbC5tTWV0aG9kV29ya3NwYWNlLmdldChzZXNzaW9uKTp7fSxhcmdzLFV0aWwoaWQsc2Vzc2lvbikpO3JldHVybiBQcm9taXNlLnJlc29sdmUoZXZhbERhdGEpLnRoZW4oZT0+e3NlbGYucG9zdE1lc3NhZ2Uoe2lkLHNlc3Npb24sY2F0ZWdvcnksZGF0YTplLGVycm9yOm51bGx9KX0pLmNhdGNoKGU9PntzZWxmLnBvc3RNZXNzYWdlKHtpZCxzZXNzaW9uLGNhdGVnb3J5LGRhdGE6bnVsbCxlcnJvcjplIGluc3RhbmNlb2YgRE9NRXhjZXB0aW9uJiZlLm5hbWU9PT0iRGF0YUNsb25lRXJyb3IiPyJEYXRhQ2xvbmVFcnJvciDov5Tlm57nu5Pmnpzlj6rog73kuLrnroDljZXmlbDmja7moLzlvI8iOmV9KX0pfSksc2VsZi5hZGRFdmVudExpc3RlbmVyKCJtZXNzYWdlIiwoe2RhdGE6e2NhdGVnb3J5OmUsc2Vzc2lvbjpzfX0pPT57ZT09PSJjbGVhciImJlV0aWwubU1ldGhvZFdvcmtzcGFjZS5kZWxldGUocyl9LCExKX0pKCk7Cg==", self.location)), Qe = { - getConfigure: (e) => re.get(e) +A = new WeakMap(), ke = new WeakMap(), F(U, A, null), N(U, "getInstance", () => (f(U, A) || G(U, A, new U()), f(U, A))); +let Ue = U; +const ie = Ue.getInstance(), ce = new Worker(new URL("data:text/plain;base64,KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2ltcG9ydFNjcmlwdHMoImh0dHBzOi8vYXNzZXRzLmZzZHBmLm5ldC9qcy91bWQvbG9kYXNoQDRfMTdfMjEubWluLmpzIiwiaHR0cHM6Ly9hc3NldHMuZnNkcGYubmV0L2pzL3VtZC9sb2Rhc2gubWl4aW4uanMiKSxpbXBvcnRTY3JpcHRzKCJodHRwczovL2Fzc2V0cy5mc2RwZi5uZXQvanMvdW1kL21vbWVudEAyXzI5XzQubWluLmpzIiwiaHR0cHM6Ly9hc3NldHMuZnNkcGYubmV0L2pzL3VtZC9tb21lbnQubG9jYWxlLnpoLWNuLmpzIiksbW9tZW50LmxvY2FsZSgiemgtY24iKTtjb25zdCBVdGlsPShlLHMpPT57Y29uc3QgdD1VdGlsLm1zZ19pZCsrO3JldHVybiBuZXcgUHJveHkoKCk9Pnt9LHtnZXQoe3Jvb3Q6YX0sbil7Y29uc3Qgbz1hP2Ake2F9LyR7bn1gOm47cmV0dXJuIGZ1bmN0aW9uKC4uLmkpe3JldHVybiBuZXcgUHJvbWlzZSgocixsKT0+e1V0aWwubVF1ZXVlLnNldCh0LFtyLGxdKSxzZWxmLnBvc3RNZXNzYWdlKHtpZDp0LHRhc2tfaWQ6ZSxzZXNzaW9uOnMsY2F0ZWdvcnk6InV0aWwiLG1ldGhvZDpvLGFyZ3M6aX0pfSl9fSxhcHBseShhLG4sbyl7cmV0dXJuIG5ldyBQcm94eShPYmplY3QuY3JlYXRlKHtyb290Om9bMF18fG51bGx9KSx7Z2V0OnRoaXMuZ2V0fSl9fSl9O1V0aWwubXNnX2lkPTAsVXRpbC5tUXVldWU9bmV3IE1hcCxVdGlsLm1NZXRob2RXb3Jrc3BhY2U9bmV3IE1hcCxzZWxmLmFkZEV2ZW50TGlzdGVuZXIoIm1lc3NhZ2UiLGZ1bmN0aW9uKHtkYXRhOntpZDplLGRhdGE6cyxlcnJvcjp0LGNhdGVnb3J5OmF9fSl7YT09PSJ1dGlsIiYmKHQhPT1udWxsP1V0aWwubVF1ZXVlLmdldChlKVsxXSh0KTpVdGlsLm1RdWV1ZS5nZXQoZSlbMF0ocyksVXRpbC5tUXVldWUuZ2V0KGUpLFV0aWwubVF1ZXVlLmRlbGV0ZShlKSl9LCExKSxzZWxmLmFkZEV2ZW50TGlzdGVuZXIoIm1lc3NhZ2UiLCh7ZGF0YTp7aWQsbWV0aG9kLGFyZ3MsY2F0ZWdvcnksc2Vzc2lvbixzb3VyY2VVUkx9fSk9PntpZihjYXRlZ29yeSE9PSJldmFsIilyZXR1cm47c2Vzc2lvbiYmIVV0aWwubU1ldGhvZFdvcmtzcGFjZS5oYXMoc2Vzc2lvbikmJlV0aWwubU1ldGhvZFdvcmtzcGFjZS5zZXQoc2Vzc2lvbix7fSk7Y29uc3QgZXZhbERhdGFTb3VyY2VVUkw9c291cmNlVVJMP2AKLy8jIHNvdXJjZVVSTD1mZjovLy8uLyR7c291cmNlVVJMfWA6IiIsZXZhbERhdGE9ZXZhbChgKGFzeW5jIGZ1bmN0aW9uKHske09iamVjdC5rZXlzKGFyZ3MpLmpvaW4oIiwgIil9fSwgVXRpbCl7JHttZXRob2R9Cn0pJHtldmFsRGF0YVNvdXJjZVVSTH1gKS5jYWxsKHNlc3Npb24/VXRpbC5tTWV0aG9kV29ya3NwYWNlLmdldChzZXNzaW9uKTp7fSxhcmdzLFV0aWwoaWQsc2Vzc2lvbikpO3JldHVybiBQcm9taXNlLnJlc29sdmUoZXZhbERhdGEpLnRoZW4oZT0+e3NlbGYucG9zdE1lc3NhZ2Uoe2lkLHNlc3Npb24sY2F0ZWdvcnksZGF0YTplLGVycm9yOm51bGx9KX0pLmNhdGNoKGU9PntzZWxmLnBvc3RNZXNzYWdlKHtpZCxzZXNzaW9uLGNhdGVnb3J5LGRhdGE6bnVsbCxlcnJvcjplIGluc3RhbmNlb2YgRE9NRXhjZXB0aW9uJiZlLm5hbWU9PT0iRGF0YUNsb25lRXJyb3IiPyJEYXRhQ2xvbmVFcnJvciDov5Tlm57nu5Pmnpzlj6rog73kuLrnroDljZXmlbDmja7moLzlvI8iOmV9KX0pfSksc2VsZi5hZGRFdmVudExpc3RlbmVyKCJtZXNzYWdlIiwoe2RhdGE6e2NhdGVnb3J5OmUsc2Vzc2lvbjpzfX0pPT57ZT09PSJjbGVhciImJlV0aWwubU1ldGhvZFdvcmtzcGFjZS5kZWxldGUocyl9LCExKX0pKCk7Cg==", self.location)), Qe = { + getConfigure: (e) => ie.get(e) }; -var Pe, ge, M; +var Pe, pe, M; const k = class k { constructor() { N(this, "exec", (t, n = {}, s = {}, r = "") => new Promise((o, i) => { - const l = ve(k, Pe)._++; - f(k, ge).set(l, s), k.mQueue.set(l, [o, i]), le.postMessage({ id: l, session: r, category: "eval", method: t, args: n }); + const a = Fe(k, Pe)._++; + f(k, pe).set(a, s), k.mQueue.set(a, [o, i]), ce.postMessage({ id: a, session: r, category: "eval", method: t, args: n }); })); - N(this, "clear", (t) => le.postMessage({ session: t, category: "clear" })); + N(this, "clear", (t) => ce.postMessage({ session: t, category: "clear" })); if (f(k, M)) return f(k, M); Promise.resolve().then(() => Zn).then((t) => { Qe.http = t.http; - }), le.addEventListener("message", ({ data: { id: t, task_id: n, method: s, args: r, category: o, data: i, error: l, session: c } }) => { + }), ce.addEventListener("message", ({ data: { id: t, task_id: n, method: s, args: r, category: o, data: i, error: a, session: c } }) => { if (o === "eval" && k.mQueue.has(t)) - l !== null ? k.mQueue.get(t)[1](l) : k.mQueue.get(t)[0](i), f(k, ge).delete(t), k.mQueue.delete(t); + a !== null ? k.mQueue.get(t)[1](a) : k.mQueue.get(t)[0](i), f(k, pe).delete(t), k.mQueue.delete(t); else if (o === "util") try { - const a = m.get(Qe, s.split("/")) || m.get(f(k, ge).get(n), s.split("/")); - if (!m.isFunction(a)) + const l = m.get(Qe, s.split("/")) || m.get(f(k, pe).get(n), s.split("/")); + if (!m.isFunction(l)) throw `${s} not found`; - Promise.resolve(Reflect.apply(a, void 0, r)).then((d) => { - le.postMessage({ id: t, task_id: n, category: o, method: s, args: r, session: c, data: d, error: null }); + Promise.resolve(Reflect.apply(l, void 0, r)).then((d) => { + ce.postMessage({ id: t, task_id: n, category: o, method: s, args: r, session: c, data: d, error: null }); }).catch((d) => { - le.postMessage({ id: t, task_id: n, category: o, method: s, args: r, session: c, data: null, error: d }); + ce.postMessage({ id: t, task_id: n, category: o, method: s, args: r, session: c, data: null, error: d }); }); - } catch (a) { - le.postMessage({ id: t, task_id: n, category: o, method: s, args: r, session: c, data: null, error: a }); + } catch (l) { + ce.postMessage({ id: t, task_id: n, category: o, method: s, args: r, session: c, data: null, error: l }); } }, !1); } }; -Pe = new WeakMap(), ge = new WeakMap(), M = new WeakMap(), N(k, "mQueue", /* @__PURE__ */ new Map()), F(k, Pe, 0), F(k, ge, /* @__PURE__ */ new Map()), F(k, M, null), N(k, "getInstance", () => (f(k, M) || G(k, M, new k()), f(k, M))); +Pe = new WeakMap(), pe = new WeakMap(), M = new WeakMap(), N(k, "mQueue", /* @__PURE__ */ new Map()), F(k, Pe, 0), F(k, pe, /* @__PURE__ */ new Map()), F(k, M, null), N(k, "getInstance", () => (f(k, M) || G(k, M, new k()), f(k, M))); let Xe = k; -const ie = Xe.getInstance(); -var B, D; -const U = class U { +const _ = Xe.getInstance(); +var B, S; +const X = class X { constructor() { - F(this, D, /* @__PURE__ */ new Map()); - N(this, "setVendor", (t, n) => f(this, D).set(t, new ct(n, (s, r) => s.dynamicRequireFsdpfComponent(r)))); + F(this, S, /* @__PURE__ */ new Map()); + N(this, "setVendor", (t, n) => f(this, S).set(t, new ut(n, (s, r) => s.dynamicRequireFsdpfComponent(r)))); N(this, "getWidgetComponent", async (t) => { if (!t) throw "getWidgetComponent widget is required"; const [, n] = t == null ? void 0 : t.split("@app/"), [, s] = t == null ? void 0 : t.split("@pkg/"), [, r] = t == null ? void 0 : t.split("@fsdpf/"); try { switch (!0) { - case (!!n && f(this, D).has("pkg")): - return await f(this, D).get("pkg").get(n); - case (!!s && f(this, D).has("pkg")): - return await f(this, D).get("pkg").get(s); - case (!!r && f(this, D).has("pkg")): - return await f(this, D).get("pkg").get(r); + case (!!n && f(this, S).has("pkg")): + return await f(this, S).get("pkg").get(n); + case (!!s && f(this, S).has("pkg")): + return await f(this, S).get("pkg").get(s); + case (!!r && f(this, S).has("pkg")): + return await f(this, S).get("pkg").get(r); } } catch (o) { throw o; } }); - if (f(U, B)) - return f(U, B); + if (f(X, B)) + return f(X, B); } }; -B = new WeakMap(), D = new WeakMap(), F(U, B, null), N(U, "getInstance", () => (f(U, B) || G(U, B, new U()), f(U, B))); -let De = U; -const x = De.getInstance(), Mt = () => "Table", ut = () => { - const e = P(!0), [t, n] = V(0); - return R(() => () => e.current = !1, []), () => e.current && Pt(() => { +B = new WeakMap(), S = new WeakMap(), F(X, B, null), N(X, "getInstance", () => (f(X, B) || G(X, B, new X()), f(X, B))); +let De = X; +const H = De.getInstance(), Mt = () => "Table", dt = () => { + const e = j(!0), [t, n] = R(0); + return C(() => () => e.current = !1, []), () => e.current && jt(() => { n(t + 1); }); }, An = ({ value: e, defaultValue: t, onChange: n }) => { - const s = ut(), r = P(e !== void 0 ? e : t); + const s = dt(), r = j(e !== void 0 ? e : t); e !== void 0 && (r.current = e); - const o = se(m.debounce((i) => { + const o = oe(m.debounce((i) => { e === void 0 && (r.current = i, s()), n && n(i); }, 380, { leading: !0, trailing: !1 }), [e]); return [r.current, o]; }, qe = (e) => { - const t = P(); - return R(() => { + const t = j(); + return C(() => { t.current = e; }), t.current; }, Mn = (e) => { - const t = P(), [n, s] = V(e); - return R(() => { + const t = j(), [n, s] = R(e); + return C(() => { m.isFunction(t.current) && t.current(n); }, [n]), [n, function(r, o) { t.current = o, s(r); @@ -436,23 +436,23 @@ const x = De.getInstance(), Mt = () => "Table", ut = () => { }, Je = (e = y.EffectCallback, t, n = m.isEqual) => { const s = y.useRef(t); (!s.current || !n(t, s.current)) && (s.current = t), y.useEffect(e, [s.current]); -}, dt = (e, t = "string") => { +}, ft = (e, t = "string") => { var n; if (!Array.isArray(e)) return e; for (let s = 0; s < e.length; s++) - e[s].value = m.toPrimitive((n = e[s]) == null ? void 0 : n.value, t), e[s] && Reflect.has(e[s], "children") && (e[s].children = dt(e[s].children, t)); + e[s].value = m.toPrimitive((n = e[s]) == null ? void 0 : n.value, t), e[s] && Reflect.has(e[s], "children") && (e[s].children = ft(e[s].children, t)); return e; }, Bn = (e, t = "json", n = "string", s, r = null) => { - const [o] = Ve.useForm(s), [i, l] = V([{ label: "无", value: "", disabled: !0 }]), c = P([]), a = Ve.useWatch((d) => c.current.length === 0 ? null : m.pick(d, c.current), o) || null; - return R(() => { - Array.isArray(e) ? l(e) : t === "javascript" && e ? ie.exec(e, {}, { + const [o] = Ve.useForm(s), [i, a] = R([{ label: "无", value: "", disabled: !0 }]), c = j([]), l = Ve.useWatch((d) => c.current.length === 0 ? null : m.pick(d, c.current), o) || null; + return C(() => { + Array.isArray(e) ? a(e) : t === "javascript" && e ? _.exec(e, {}, { getFieldValue: (d) => (c.current.includes(d) || c.current.push(d), o.getFieldValue(d)), getFieldValueForBasicForm: (d) => (c.current.includes(d) || c.current.push(d), r ? r.getFieldValue(d) : o.getFieldValue(d)) }).then((d) => { - l(m.toPrimitive(d, "array")); - }) : e && l(m.toPrimitive(e, "array")); - }, [e, t, a]), dt(i, n); + a(m.toPrimitive(d, "array")); + }) : e && a(m.toPrimitive(e, "array")); + }, [e, t, l]), ft(i, n); }, Bt = (e) => { const [t, n] = y.useState({ gridItems: [], hideItems: [] }); return y.useEffect(() => { @@ -461,18 +461,18 @@ const x = De.getInstance(), Mt = () => "Table", ut = () => { uuid: r, code: o, resource: i, - align: l, + align: a, listenChangeFields: c, - listenChangeFieldsFunc: a, + listenChangeFieldsFunc: l, fields: d }) => ({ pk: s, uuid: r, code: o, resource: i, - align: l, + align: a, listenChangeFields: c, - listenChangeFieldsFunc: a, + listenChangeFieldsFunc: l, ...d.reduce((g, p) => { var u; return (u = p == null ? void 0 : p.field) != null && u.hidden ? g.hides.push(p == null ? void 0 : p.field) : g.items.push(p), g; @@ -487,9 +487,9 @@ const x = De.getInstance(), Mt = () => "Table", ut = () => { pattern: r, required: o = !1, validator: i -} = {}, l, c) => { - const [a, d] = V([]); - return R(() => { +} = {}, a, c) => { + const [l, d] = R([]); + return C(() => { const g = []; if (o) { let p = c; @@ -522,17 +522,17 @@ const x = De.getInstance(), Mt = () => "Table", ut = () => { case "validator": i && g.push(({ getFieldValue: p }) => ({ validator: async (u, b) => { - const v = await ie.exec(i, { value: b, fieldName: l }, { getFieldValue: p }); + const v = await _.exec(i, { value: b, fieldName: a }, { getFieldValue: p }); return m.isString(v) && v ? Promise.reject(v) : m.isBoolean(v) && !v ? Promise.reject(s) : Promise.resolve(); } })); break; } d(g); - }, [e, t, n, s, r, o, i]), a; + }, [e, t, n, s, r, o, i]), l; }, qt = (e, t, n) => { - const [s, r] = V(null); - return R(() => { + const [s, r] = R(null); + return C(() => { const { initDataUri: o = `/api/${e}`, initDataMethod: i = "GET" @@ -540,19 +540,19 @@ const x = De.getInstance(), Mt = () => "Table", ut = () => { L.request({ method: i, url: m.trimEnd(`${o}/${t}`, "/") - }).then((l) => { - r(l); + }).then((a) => { + r(a); }); }, [e, t, n]), s; }, _t = (e, t, n, s = {}) => { - const r = ut(), o = P(!0), i = P([]), [l, c] = V(n), a = Ve.useWatch((d) => JSON.stringify(m.pick(d, i.current)), t) || "{}"; - return R(() => { - e && ie.exec(e, s, { + const r = dt(), o = j(!0), i = j([]), [a, c] = R(n), l = Ve.useWatch((d) => JSON.stringify(m.pick(d, i.current)), t) || "{}"; + return C(() => { + e && _.exec(e, s, { getFieldValue: m.wrap(t.getFieldValue, (d, g) => (i.current.some((p) => m.isEqual(p, g)) || (i.current.push(g), r()), d(g))), isFieldTouched: t.isFieldTouched, isFieldsTouched: t.isFieldsTouched }).then((d) => o.current && c(d)); - }, [e, a, t, s]), R(() => () => o.current = !1, []), l; + }, [e, l, t, s]), C(() => () => o.current = !1, []), a; }, en = (e) => ({ code: t, layout: n, @@ -560,9 +560,9 @@ const x = De.getInstance(), Mt = () => "Table", ut = () => { primaryKey: r = 0, style: o = {}, formProps: i = {}, - form: l, + form: a, isPreview: c = !1, - className: a, + className: l, onFinish: d, onValuesChange: g = () => { }, @@ -572,16 +572,16 @@ const x = De.getInstance(), Mt = () => "Table", ut = () => { align: u, autoComplete: b, resource: v, - items: j, - hides: ae, + items: z, + hides: le, rowHeight: Ze, marginX: Ee, marginY: Te, - listenChangeFields: ye, + listenChangeFields: be, listenChangeFieldsFunc: T, - pk: _, - uuid: ee - } = Bt(t), [E] = ue.useForm(l), J = ({ + pk: ee, + uuid: te + } = Bt(t), [E] = de.useForm(a), J = ({ changedValues: w, allValues: O, listenChangeFields: Vt, @@ -589,7 +589,7 @@ const x = De.getInstance(), Mt = () => "Table", ut = () => { onValuesChange: En, code: Tn }) => { - Me && Array.isArray(Vt) && ie.exec( + Me && Array.isArray(Vt) && _.exec( Me, { changedValues: w, allValues: O }, { @@ -599,22 +599,22 @@ const x = De.getInstance(), Mt = () => "Table", ut = () => { isFieldsTouched: E.isFieldsTouched } ); - }, be = q(() => [ - { name: "__PK__", value: _ }, + }, ve = q(() => [ + { name: "__PK__", value: ee }, { name: "__PROPS__", value: i }, { name: "__RESOURCE__", value: v }, { name: "__LAYOUT_KEY__", value: t }, - { name: "__LAYOUT_UUID__", value: ee }, + { name: "__LAYOUT_UUID__", value: te }, { name: "__PRIMARY_KEY__", value: r } - ], [_, t, ee, v, r, i]); - return /* @__PURE__ */ I( - ue, + ], [ee, t, te, v, r, i]); + return /* @__PURE__ */ P( + de, { - className: a, + className: l, requiredMark: !0, name: s || t, layout: n || u, - fields: be, + fields: ve, form: E, autoComplete: b, style: { ...o, position: "relative" }, @@ -623,7 +623,7 @@ const x = De.getInstance(), Mt = () => "Table", ut = () => { { changedValues: w, allValues: O, - listenChangeFields: ye, + listenChangeFields: be, listenChangeFieldsFunc: T, onValuesChange: g, code: t @@ -636,13 +636,13 @@ const x = De.getInstance(), Mt = () => "Table", ut = () => { ...p, form: E, code: t, - fields: j, + fields: z, rowHeight: Ze, marginX: Ee, marginY: Te } ), - ae == null ? void 0 : ae.map((w) => { + le == null ? void 0 : le.map((w) => { var O; return /* @__PURE__ */ h(it, { name: w.code, children: /* @__PURE__ */ h( tn, @@ -665,18 +665,18 @@ const x = De.getInstance(), Mt = () => "Table", ut = () => { n == "javascript" ? void 0 : t, {} ); - return R(() => { + return C(() => { n == "javascript" ? s(m.toPrimitive(o, e)) : s(m.toPrimitive(t, e)); }, [e, t, o]), null; }, nn = (e) => function({ code: n, data: s, ...r }) { - const [o, i] = V({ + const [o, i] = R({ resource: null, cols: 12, rowHeight: 21, fields: [] }); - return R(() => { - n && L.get(`/api/_/${n}`).then((l) => i(m.pick(l, ["resource", "cols", "rowHeight", "fields"]))); + return C(() => { + n && L.get(`/api/_/${n}`).then((a) => i(m.pick(a, ["resource", "cols", "rowHeight", "fields"]))); }, [n]), (o == null ? void 0 : o.resource) && /* @__PURE__ */ h( e, { @@ -687,22 +687,22 @@ const x = De.getInstance(), Mt = () => "Table", ut = () => { data: o != null && o.resource ? { [o == null ? void 0 : o.resource]: s } : {} } ); -}, ft = (e, { +}, mt = (e, { initialValue: t, initialValueLanguage: n, convertJs: s, convertJsSetting: r, type: o = "string" }, i = null) => { - const l = P(!1), c = st(It), [a, d] = V(), [g, p] = V(n == "javascript" || !e ? void 0 : c.getFieldValue(e)); - return R(() => { - n == "javascript" && t ? ie.exec(t, {}, { + const a = j(!1), c = st(Pt), [l, d] = R(), [g, p] = R(n == "javascript" || !e ? void 0 : c.getFieldValue(e)); + return C(() => { + n == "javascript" && t ? _.exec(t, {}, { getFieldValueForBasicForm: (u) => i ? i.getFieldValue(u) : c.getFieldValue(u), getFieldValue: (u) => c.getFieldValue(u) - }).then((u) => p(m.toPrimitive(u, o))).catch((u) => notification.error({ message: `布局数据错误: ${JSON.stringify(u)}` })).finally(() => l.current = !0) : (t && p(m.toPrimitive(t || c.getFieldValue(e) || t, o)), l.current = !0); + }).then((u) => p(m.toPrimitive(u, o))).catch((u) => notification.error({ message: `布局数据错误: ${JSON.stringify(u)}` })).finally(() => a.current = !0) : (t && p(m.toPrimitive(t || c.getFieldValue(e) || t, o)), a.current = !0); }, [t, n]), Je(() => { - l.current && s && x.getWidgetComponent(s).then(({ default: u }) => u({ value: g, record: c.getFieldsValue(!0), $setting: r })).then(d).catch((u) => console.error("布局数据转换错误: ", u, s)); - }, [g, s, r]), [a || g, g]; + a.current && s && H.getWidgetComponent(s).then(({ default: u }) => u({ value: g, record: c.getFieldsValue(!0), $setting: r })).then(d).catch((u) => console.error("布局数据转换错误: ", u, s)); + }, [g, s, r]), [l || g, g]; }, sn = (e, t, n, s, r, o) => { const i = { "--grid-layout-h": `${s}`, @@ -712,17 +712,17 @@ const x = De.getInstance(), Mt = () => "Table", ut = () => { "--grid-layout-row-height-offset": "0px" }; return r != null && r.autoHeight ? i.height = "fit-content" : i["--grid-layout-row"] = `${s}`, i["--grid-layout-box-margin"] = _e(r == null ? void 0 : r.marginTop, r == null ? void 0 : r.marginRight, r == null ? void 0 : r.marginBottom, r == null ? void 0 : r.marginLeft), i["--grid-layout-box-padding"] = _e(r == null ? void 0 : r.paddingTop, r == null ? void 0 : r.paddingRight, r == null ? void 0 : r.paddingBottom, r == null ? void 0 : r.paddingLeft), o && (i.height = `${o}px`), i; -}, _e = (e, t, n, s) => `${e || 0}px ${t || 0}px ${n || 0}px ${s || 0}px`, mt = ({ cols: e, rowHeight: t, fields: n, data: s, containerPadding: r = [0, 0], itemMargin: o = [4, 0], formProps: i = {}, className: l, ...c }) => { - const [a] = Ve.useForm(), d = ht(n, on, "@pkg/grid-layouts"), g = q(() => [ +}, _e = (e, t, n, s) => `${e || 0}px ${t || 0}px ${n || 0}px ${s || 0}px`, ht = ({ cols: e, rowHeight: t, fields: n, data: s, containerPadding: r = [0, 0], itemMargin: o = [4, 0], formProps: i = {}, className: a, ...c }) => { + const [l] = Ve.useForm(), d = gt(n, on, "@pkg/grid-layouts"), g = q(() => [ { name: "__PROPS__", value: i } ], [i]); return Je(() => { - a.setFieldsValue(s); - }, [s]), /* @__PURE__ */ h(Ve, { fields: g, form: a, component: !1, children: /* @__PURE__ */ h( + l.setFieldsValue(s); + }, [s]), /* @__PURE__ */ h(Ve, { fields: g, form: l, component: !1, children: /* @__PURE__ */ h( "div", { ...c, - className: $("ff-grid-layout", l), + className: $("ff-grid-layout", a), style: { "--grid-layout-item-margin-y": `${(o == null ? void 0 : o[0]) || 0}px`, "--grid-layout-item-margin-x": `${(o == null ? void 0 : o[1]) || 0}px`, @@ -734,14 +734,14 @@ const x = De.getInstance(), Mt = () => "Table", ut = () => { children: d } ) }); -}, ht = (e, t, n = "@pkg/grid-layouts", s = null) => q(() => { +}, gt = (e, t, n = "@pkg/grid-layouts", s = null) => q(() => { var r; return (r = m.sortBy(e, ["y", "x"])) == null ? void 0 : r.map( - ({ i: o, x: i, y: l, w: c, h: a, field: { boxStyle: d, widgetPrefix: g = n, widget: p, ...u } }, b) => /* @__PURE__ */ h( + ({ i: o, x: i, y: a, w: c, h: l, field: { boxStyle: d, widgetPrefix: g = n, widget: p, ...u } }, b) => /* @__PURE__ */ h( "div", { className: "grid-layout-item", - style: sn(i, l, c, a, d, p === "Height" && (u == null ? void 0 : u.initialValue)), + style: sn(i, a, c, l, d, p === "Height" && (u == null ? void 0 : u.initialValue)), children: /* @__PURE__ */ h( rn, { @@ -756,10 +756,10 @@ const x = De.getInstance(), Mt = () => "Table", ut = () => { ) ); }, [e]), rn = ({ itemWidget: e, itemWidgetRender: t, basicForm: n, ...s }) => { - const [r, o] = V(); - return R(() => { - x.getWidgetComponent(e).then(({ defaultProps: i, default: l }) => { - o(y.createElement(t(l, i, n), s)); + const [r, o] = R(); + return C(() => { + H.getWidgetComponent(e).then(({ defaultProps: i, default: a }) => { + o(y.createElement(t(a, i, n), s)); }).catch((i) => o(e)); }, [e]), r; }, on = (e, t, n = null) => (s) => { @@ -767,59 +767,59 @@ const x = De.getInstance(), Mt = () => "Table", ut = () => { code: r, label: o, extras: i, - isVirtual: l, + isVirtual: a, initialValue: c, - initialValueLanguage: a, + initialValueLanguage: l, convertJs: d, convertJsSetting: g, ...p - } = m.merge({}, t, s), [u, b] = ft(l ? null : r, { + } = m.merge({}, t, s), [u, b] = mt(a ? null : r, { initialValue: c, - initialValueLanguage: a, + initialValueLanguage: l, convertJs: d, convertJsSetting: g, type: (p == null ? void 0 : p.type) || "string" }, n); return /* @__PURE__ */ h(e, { ...p, value: u, rawValue: b, $setting: i || {} }); -}, Qn = nn(mt), gt = ({ widget: e, widgetPrefix: t, widgetDecorator: n, subWidgets: s, basicForm: r, ...o }) => { - const i = e != null && e.startsWith("@") ? e : `${t}/${e}`, [l, c] = V(); - return R(() => { - i && x.getWidgetComponent(i).then(({ defaultProps: a, default: d }) => ({ - default: pt(d, a, r) - })).catch((a) => ({ default: () => `${a}` })).then((a) => c(y.createElement(a.default, o))); - }, [i]), l && y.cloneElement(l, o); +}, Qn = nn(ht), pt = ({ widget: e, widgetPrefix: t, widgetDecorator: n, subWidgets: s, basicForm: r, ...o }) => { + const i = e != null && e.startsWith("@") ? e : `${t}/${e}`, [a, c] = R(); + return C(() => { + i && H.getWidgetComponent(i).then(({ defaultProps: l, default: d }) => ({ + default: yt(d, l, r) + })).catch((l) => ({ default: () => `${l}` })).then((l) => c(y.createElement(l.default, o))); + }, [i]), a && y.cloneElement(a, o); }; -gt.defaultProps = { +pt.defaultProps = { widgetPrefix: "@pkg/grid-layout-forms", widget: "Input" }; -const pt = (e, t, n = null) => (s) => { +const yt = (e, t, n = null) => (s) => { const { type: r, code: o, label: i, - noStyle: l, + noStyle: a, placeholder: c, - extras: a, + extras: l, validators: d, help: g, isVirtual: p, initialValue: u, initialValueLanguage: b, convertJs: v, - convertJsSetting: j, - widgetPerfix: ae, + convertJsSetting: z, + widgetPerfix: le, boxStyle: Ze, widgetDecorator: Ee, subWidgets: Te, - ...ye - } = { ...t, ...s }, T = Qt(d || {}, o, r), _ = { + ...be + } = { ...t, ...s }, T = Qt(d || {}, o, r), ee = { label: i, - noStyle: l, + noStyle: a, colon: !1 - }, ee = { + }, te = { placeholder: c, - ...ye + ...be }; return /* @__PURE__ */ h( it, @@ -827,30 +827,30 @@ const pt = (e, t, n = null) => (s) => { name: o, rules: T, normalize: (E) => E == null ? void 0 : m.toPrimitive(E, r), - children: (E, J, be) => { + children: (E, J, ve) => { var w; return /* @__PURE__ */ h( e, { type: r, - rcform: be, + rcform: ve, itemProps: { validateStatus: J.errors.length > 0 ? "error" : "success", tooltip: g, help: J.errors.length > 0 ? J.errors.join("、") : null, required: ((w = T == null ? void 0 : T[0]) == null ? void 0 : w.required) || !1, - ..._ + ...ee }, - fieldProps: { ...ee, ...E }, - $setting: a || {} + fieldProps: { ...te, ...E }, + $setting: l || {} } ); } } ); }, Ke = ({ cols: e, rowHeight: t, itemMargin: n = [8, 8], containerPadding: s = [0, 0], fields: r }) => { - const o = ht(r, pt, "@pkg/grid-layout-forms"); - return /* @__PURE__ */ h(Gt, { theme: { components: { Form: { itemMarginBottom: 0 } } }, children: /* @__PURE__ */ h("div", { className: "ff-grid-layout-form", style: { + const o = gt(r, yt, "@pkg/grid-layout-forms"); + return /* @__PURE__ */ h(Ot, { theme: { components: { Form: { itemMarginBottom: 0 } } }, children: /* @__PURE__ */ h("div", { className: "ff-grid-layout-form", style: { "--grid-layout-item-margin-x": `${(n == null ? void 0 : n[0]) || 0}px`, "--grid-layout-item-margin-y": `${(n == null ? void 0 : n[1]) || 0}px`, "--grid-layout-container-padding-y": `${(s == null ? void 0 : s[0]) || 0}px`, @@ -865,61 +865,67 @@ Ke.propTypes = { Ke.defaultProps = { fields: [] }; -const an = en(Ke), yt = ({ children: e }) => { - const [t, n] = V({}), s = se((o, i) => n((l) => ({ ...l, [o]: i })), []), r = se((o) => n((i) => ({ ...i, [o]: void 0 })), []); - return /* @__PURE__ */ h(oe.Provider, { value: { ele: t, mount: s, unmount: r }, children: e }); +const an = en(Ke), bt = ({ children: e }) => { + const [t, n] = R({}), s = oe((o, i) => n((a) => ({ ...a, [o]: i })), []), r = oe((o) => n((i) => ({ ...i, [o]: void 0 })), []); + return /* @__PURE__ */ h(ae.Provider, { value: { ele: t, mount: s, unmount: r }, children: e }); }; -yt.defaultProps = { +bt.defaultProps = { isDrawerRender: !1 }; -yt.propTypes = { +bt.propTypes = { isDrawerRender: W.bool }; -const ln = (e = {}, t = {}, n = {}, s = "") => m.deepSome(e, (r, o) => o === "type" && r === "code") ? bt(e, t, n, s) : vt(e, t, n, s), bt = async (e = {}, t = {}, n = {}, s = "") => { +const ln = (e = {}, t = {}, n = {}, s = "") => m.deepSome(e, (r, o) => o === "type" && r === "code") ? vt(e, t, n, s) : Ft(e, t, n, s), vt = async (e = {}, t = {}, n = {}, s = "") => { let r = /* @__PURE__ */ Object.create(null); for (let o in e) if (Reflect.has(e[o], "type") && ["code", "field", "router", "query", "string"].includes(e[o].type)) { - const { type: i, value: l = "", default: c = s } = e[o]; + const { type: i, value: a = "", default: c = s } = e[o]; switch (i) { case "code": - r[o] = await ie.exec(l, n, {}) || c; + r[o] = await _.exec(a, n, {}) || c; break; case "field": - r[o] = m.get(n, l, c); + r[o] = m.get(n, a, c); break; case "router": - r[o] = t[l] || c; + r[o] = t[a] || c; break; case "query": r[o] = m.get(t.$query, o) || c; break; case "string": - r[o] = l || c; + r[o] = a || c; } } else - r[o] = await bt(e[o], t, n, s); + r[o] = await vt(e[o], t, n, s); return r; -}, vt = (e = {}, t = {}, n = {}, s = "") => Object.keys(e || {}).reduce((r, o) => { +}, Ft = (e = {}, t = {}, n = {}, s = "") => Object.keys(e || {}).reduce((r, o) => { if (m.isPlainObject(e[o])) if (Reflect.has(e[o], "type") && ["field", "router", "query", "string"].includes(e[o].type)) { - const { type: i, value: l = "", default: c = s } = e[o]; + const { type: i, value: a = "", default: c = s } = e[o]; switch (i) { case "field": - r[o] = m.get(n, l, c); + r[o] = m.get(n, a, c); break; case "router": - r[o] = t[l] || c; + r[o] = t[a] || c; break; case "query": r[o] = m.get(t.$query, o) || c; break; case "string": - r[o] = l || c; + r[o] = a || c; } } else - r[o] = vt(e[o], t, n, s); + r[o] = Ft(e[o], t, n, s); return r; -}, {}), cn = (e, t, { isReplaceRouteHistory: n = !1 } = {}) => Ae.redirect(t, e, { replace: n }), et = (e, t) => m.isFunction(t) ? t.call(null, e) : null, tt = (e, t, n, s) => Z.modal( +}, {}), cn = (e, t, { isReplaceRouteHistory: n = !1 } = {}) => Ae.redirect(t, e, { replace: n }), et = (e, t, { status: { loading: n, disabled: s }, setStatus: r }) => { + const o = { + loading: (i) => i === void 0 ? n : r((a) => ({ ...a, loading: i })), + disabled: (i) => i === void 0 ? s : r((a) => ({ ...a, disabled: i })) + }; + return m.isFunction(t) ? t.call(null, { ...e, ...o }) : m.isString(t) && t ? _.exec(t, e, o) : null; +}, tt = (e, t, n, s) => Z.modal( t, { ...e, $setting: n, code: t }, s @@ -927,90 +933,99 @@ const ln = (e = {}, t = {}, n = {}, s = "") => m.deepSome(e, (r, o) => o === "ty pn, { ...e, $setting: n, code: t }, s -), dn = ({ widget: e, widgetType: t, widgetData: n, widgetProps: s, widgetSetting: r, widgetContainerProps: o }, { onAfterClick: i, onBeforeClick: l }) => { - const c = st(lt), a = q(() => { +), dn = ({ + widget: e, + widgetType: t, + widgetData: n, + widgetProps: s, + widgetSetting: r, + widgetContainerProps: o +}, { onAfterClick: i, onBeforeClick: a }) => { + let c = at(); + st(ct); + const [l, d] = R({ leading: !0, trailing: !1 }), g = q(() => { switch (t) { case "redirect": return m.partialRight(cn, e, r); case "func": - return m.partialRight(et, (r == null ? void 0 : r.code) || e); + return m.partialRight(et, (r == null ? void 0 : r.code) || e, { status: l, setStatus: d }); case "fsdpf-component": return m.partialRight(tt, e, r, o); case "grid-layout-form": return m.partialRight(un, e, r, o); default: - if (Rt(e)) + if (Ct(e)) return m.partialRight(tt, e, r, o); if (m.isFunction(e)) - return m.partialRight(et, (r == null ? void 0 : r.code) || e); + return m.partialRight(et, (r == null ? void 0 : r.code) || e, { status: l, setStatus: d }); } - return (...g) => console.error("useButton unknown widgetType", t, ...g); + return (...u) => console.error("useButton unknown widgetType", t, ...u); }, [e, t]); - return [m.debounce((g) => (l == null || l(g), Promise.resolve(ln(s, c, g)).then((p) => a({ ...n, ...p })).then((p) => i == null ? void 0 : i(p))), 300, { leading: !0, trailing: !1 }), { disabled: !1, loading: !1 }]; + return [m.debounce((u) => (a == null || a(u), Promise.resolve(ln(s, c, u)).then((b) => g({ ...n, ...b })).then((b) => i == null ? void 0 : i(b))), 300, { leading: !0, trailing: !1 }), l]; }, We = (e) => function({ className: n, children: s, name: r, icon: o, type: i, - data: l, + data: a, noAuthType: c, - onAfterClick: a, + onAfterClick: l, onBeforeClick: d, loading: g, disabled: p, tooltip: u, popConfirm: b, widget: v, - widgetType: j, - widgetData: ae, + widgetType: z, + widgetData: le, widgetProps: Ze, widgetSetting: Ee, widgetContainerProps: Te, - ...ye + ...be }) { const T = { type: "primary", className: $("ff-button", n) }; - i === "danger" ? T.danger = !0 : i === "default" && (T.type = i), e === "link" || e === "dashed" ? (T.type = e, i === "default" && (T.className = $(T.className, "ff-default"))) : (e === "circle" || e === "round") && (T.shape = e), o && (T.icon = /* @__PURE__ */ h(at, { type: o })); - const [_, ee] = V(!1), [E, { disabled: J, loading: be }] = dn({ widget: v, widgetType: j, widgetData: ae, widgetProps: Ze, widgetSetting: Ee, widgetContainerProps: Te }, { onAfterClick: a, onBeforeClick: d }); + i === "danger" ? T.danger = !0 : i === "default" && (T.type = i), e === "link" || e === "dashed" ? (T.type = e, i === "default" && (T.className = $(T.className, "ff-default"))) : (e === "circle" || e === "round") && (T.shape = e), o && (T.icon = /* @__PURE__ */ h(lt, { type: o })); + const [ee, te] = R(!1), [E, { disabled: J, loading: ve }] = dn({ widget: v, widgetType: z, widgetData: le, widgetProps: Ze, widgetSetting: Ee, widgetContainerProps: Te }, { onAfterClick: l, onBeforeClick: d }); return /* @__PURE__ */ h( - Ot, + $t, { okText: "确定", cancelText: "取消", ...b || {}, disabled: J || p, - open: _, + open: ee, onOpenChange: (O) => { if (!O) - return ee(O); - b ? ee(O) : E(l); + return te(O); + b ? te(O) : E(a); }, onConfirm: () => { - E(l); + E(a); }, onClick: (O) => { O.stopPropagation(); }, - children: /* @__PURE__ */ h($t, { ...u, title: _ ? null : u == null ? void 0 : u.title, trigger: ["hover", "click"], children: /* @__PURE__ */ h( - Fe, + children: /* @__PURE__ */ h(It, { ...u, title: ee ? null : u == null ? void 0 : u.title, trigger: ["hover", "click"], children: /* @__PURE__ */ h( + Re, { - loading: be || g, + loading: ve || g, disabled: J || p, ...T, - ...ye, + ...be, children: s || r } ) }) } ); -}, C = We("default"), fn = We("link"), mn = We("circle"), hn = We("round"), gn = We("dashed"); -C.defaultProps = { +}, V = We("default"), fn = We("link"), mn = We("circle"), hn = We("round"), gn = We("dashed"); +V.defaultProps = { type: "default" }; -C.propTypes = { +V.propTypes = { type: W.oneOf(["primary", "default", "danger"]), name: W.string, // 按钮名称 @@ -1031,35 +1046,35 @@ C.propTypes = { widgetContainerProps: W.object // 容器配置 }; -C.Link = fn; -C.Link.defaultProps = C.defaultProps; -C.Link.propTypes = C.propTypes; -C.Circle = mn; -C.Circle.defaultProps = C.defaultProps; -C.Circle.propTypes = C.propTypes; -C.Round = hn; -C.Round.defaultProps = C.defaultProps; -C.Round.propTypes = C.propTypes; -C.Dashed = gn; -C.Dashed.defaultProps = C.defaultProps; -C.Dashed.propTypes = C.propTypes; +V.Link = fn; +V.Link.defaultProps = V.defaultProps; +V.Link.propTypes = V.propTypes; +V.Circle = mn; +V.Circle.defaultProps = V.defaultProps; +V.Circle.propTypes = V.propTypes; +V.Round = hn; +V.Round.defaultProps = V.defaultProps; +V.Round.propTypes = V.propTypes; +V.Dashed = gn; +V.Dashed.defaultProps = V.defaultProps; +V.Dashed.propTypes = V.propTypes; const pn = ({ $setting: e, $close: t, extras: n, code: s, primaryKey: r, ...o }) => { - const [i] = ue.useForm(), l = qt(s, r, e); - R(() => { - l && i.setFieldsValue(l); - }, [l]); + const [i] = de.useForm(), a = qt(s, r, e); + C(() => { + a && i.setFieldsValue(a); + }, [a]); const c = () => { - const a = i.getFieldValue("__RESOURCE__"), { + const l = i.getFieldValue("__RESOURCE__"), { initDataUri: d = `/api/${s}` } = e || {}; - i.validateFields(!0).then((g) => a ? m.pick(g, [a]) : g).then((g) => L.post(r ? `${d}/${r}` : `${d}`, g).msg(t)).catch(() => Toast.error("请先完善表单信息", { duration: 2e3 })); + i.validateFields(!0).then((g) => l ? m.pick(g, [l]) : g).then((g) => L.post(r ? `${d}/${r}` : `${d}`, g).msg(t)).catch(() => Toast.error("请先完善表单信息", { duration: 2e3 })); }; return /* @__PURE__ */ h( - H, + x, { - actions: /* @__PURE__ */ I(y.Fragment, { children: [ - /* @__PURE__ */ h(C, { name: "保存", type: "primary", widget: c }), - /* @__PURE__ */ h(C, { name: "取消", widget: () => t(!1) }) + actions: /* @__PURE__ */ P(y.Fragment, { children: [ + /* @__PURE__ */ h(V, { name: "保存", type: "primary", widget: c }), + /* @__PURE__ */ h(V, { name: "取消", widget: () => t(!1) }) ] }), extras: n, children: /* @__PURE__ */ h(an, { form: i, code: s, primaryKey: r, ...o }) @@ -1073,16 +1088,16 @@ const pn = ({ $setting: e, $close: t, extras: n, code: s, primaryKey: r, ...o }) return s; const r = e.length; for (let o = 0; o < r; o++) { - const { [n]: i } = e[o], l = yn(i, t, n); - if (!m.isEmpty(l)) - return l; + const { [n]: i } = e[o], a = yn(i, t, n); + if (!m.isEmpty(a)) + return a; } return {}; }, bn = ({ listCode: e, className: t, record: n, props: s, children: r, cb: o, ...i }) => { var d, g; - const [l, c] = V(!1), a = () => { + const [a, c] = R(!1), l = () => { }; - return s != null && s.editableByJs && (s != null && s.uuid) && ((d = a(s.uuid)) != null && d.auth) ? /* @__PURE__ */ h( + return s != null && s.editableByJs && (s != null && s.uuid) && ((d = l(s.uuid)) != null && d.auth) ? /* @__PURE__ */ h( ot, { overlayClassName: "ff-data-list-editable-popover", @@ -1090,7 +1105,7 @@ const pn = ({ $setting: e, $close: t, extras: n, code: s, primaryKey: r, ...o }) trigger: ["contextMenu"], placement: (s == null ? void 0 : s.align) === "right" ? "topRight" : "topLeft", arrowPointAtCenter: (s == null ? void 0 : s.align) === "center", - open: l, + open: a, onOpenChange: c, overlayStyle: { width: ((g = s == null ? void 0 : s.editableByJsSetting) == null ? void 0 : g.width) || 260 }, content: /* @__PURE__ */ h(vn, { ...s, listCode: e, record: n, onCancel: () => { @@ -1099,11 +1114,11 @@ const pn = ({ $setting: e, $close: t, extras: n, code: s, primaryKey: r, ...o }) children: /* @__PURE__ */ h("td", { className: $(t, "ff-data-list-editable-cell"), children: r, ...i }) } ) : /* @__PURE__ */ h("td", { className: t, children: r, ...i }); -}, vn = ({ dataIndex: e, record: t, onCancel: n, uuid: s, title: r, type: o, listCode: i, editableByJs: l, editableByJsSetting: c, cb: a }) => { - const [d] = ue.useForm(), g = (c == null ? void 0 : c.primaryKey) || "", p = () => d.validateFields().then(({ value: b }) => { +}, vn = ({ dataIndex: e, record: t, onCancel: n, uuid: s, title: r, type: o, listCode: i, editableByJs: a, editableByJsSetting: c, cb: l }) => { + const [d] = de.useForm(), g = (c == null ? void 0 : c.primaryKey) || "", p = () => d.validateFields().then(({ value: b }) => { const v = m.get(t, g.substring(g.indexOf(".") + 1)); if (v) - L.put(`/api/${i}-storeBy-${s}/${v}`, { value: b }).msg(a).then(n); + L.put(`/api/${i}-storeBy-${s}/${v}`, { value: b }).msg(l).then(n); else throw "获取更新主键失败!"; }).catch(console.warn), u = () => { @@ -1112,50 +1127,50 @@ const pn = ({ $setting: e, $close: t, extras: n, code: s, primaryKey: r, ...o }) __PROPS__: JSON.parse(JSON.stringify(t)) }); }; - return R(() => { + return C(() => { u(); - }, [JSON.stringify(t)]), /* @__PURE__ */ I(ue, { form: d, layout: "vertical", children: [ + }, [JSON.stringify(t)]), /* @__PURE__ */ P(de, { form: d, layout: "vertical", children: [ /* @__PURE__ */ h( - gt, + pt, { label: null, code: ["value"], - widget: l, + widget: a, placeholder: r, ...m.omit(c, ["primaryKey", "width", "height"]) } ), - /* @__PURE__ */ h(ue.Item, { noStyle: !0, name: ["__PROPS__"], children: /* @__PURE__ */ h("div", {}) }), - /* @__PURE__ */ I("div", { className: "fsdpf-editable-popover-footer", children: [ - /* @__PURE__ */ h(Fe, { size: "small", onClick: u, children: "重置" }), - /* @__PURE__ */ I(Fe.Group, { children: [ - /* @__PURE__ */ h(Fe, { size: "small", onClick: n, children: "取消" }), - /* @__PURE__ */ h(Fe, { size: "small", type: "primary", onClick: p, children: "确定" }) + /* @__PURE__ */ h(de.Item, { noStyle: !0, name: ["__PROPS__"], children: /* @__PURE__ */ h("div", {}) }), + /* @__PURE__ */ P("div", { className: "fsdpf-editable-popover-footer", children: [ + /* @__PURE__ */ h(Re, { size: "small", onClick: u, children: "重置" }), + /* @__PURE__ */ P(Re.Group, { children: [ + /* @__PURE__ */ h(Re, { size: "small", onClick: n, children: "取消" }), + /* @__PURE__ */ h(Re, { size: "small", type: "primary", onClick: p, children: "确定" }) ] }) ] }) ] }); }, Fn = ({ widget: e, widgetPrefix: t, basicForm: n, ...s }) => { - const r = e != null && e.startsWith("@") ? e : `${t}/${e}`, [o, i] = V(); - return R(() => { - r && x.getWidgetComponent(r).then(({ defaultProps: l, default: c }) => ({ - default: Rn(c, l, n) - })).catch((l) => ({ default: () => `${l}` })).then((l) => i(y.createElement(l.default, s))); + const r = e != null && e.startsWith("@") ? e : `${t}/${e}`, [o, i] = R(); + return C(() => { + r && H.getWidgetComponent(r).then(({ defaultProps: a, default: c }) => ({ + default: Rn(c, a, n) + })).catch((a) => ({ default: () => `${a}` })).then((a) => i(y.createElement(a.default, s))); }, [r]), o; }, Rn = (e, t, n = null) => (s) => { const { code: r, label: o, extras: i, - isVirtual: l, + isVirtual: a, initialValue: c, - initialValueLanguage: a, + initialValueLanguage: l, convertJs: d, convertJsSetting: g, value: p, ...u - } = m.merge({}, t, s), [b, v] = ft(l ? null : r, { + } = m.merge({}, t, s), [b, v] = mt(a ? null : r, { initialValue: c, - initialValueLanguage: a, + initialValueLanguage: l, convertJs: d, convertJsSetting: g, type: (u == null ? void 0 : u.type) || "string" @@ -1165,14 +1180,14 @@ const pn = ({ $setting: e, $close: t, extras: n, code: s, primaryKey: r, ...o }) Fn.defaultProps = { widgetPrefix: "@pkg/grid-layouts" }; -const Vn = ({ className: e, children: t, itemOperations: n, resource: s, $setting: r }) => /* @__PURE__ */ h("div", { className: $("ff-data-list-grid-layout-items", e), children: y.Children.map(t, (o) => /* @__PURE__ */ h( - Cn, +const Cn = ({ className: e, children: t, itemOperations: n, resource: s, $setting: r }) => /* @__PURE__ */ h("div", { className: $("ff-data-list-grid-layout-items", e), children: y.Children.map(t, (o) => /* @__PURE__ */ h( + Vn, { operations: n, data: s ? { [s]: o.props.data } : o.props.data, children: o } -)) }), Cn = ({ operations: e, children: t, data: n }) => m.isEmpty(e) ? t : /* @__PURE__ */ h( +)) }), Vn = ({ operations: e, children: t, data: n }) => m.isEmpty(e) ? t : /* @__PURE__ */ h( ot, { destroyTooltipOnHide: !0, @@ -1181,7 +1196,7 @@ const Vn = ({ className: e, children: t, itemOperations: n, resource: s, $settin mouseLeaveDelay: 0.2, placement: "topRight", content: /* @__PURE__ */ h("div", { className: "ff-data-list-item-operations flex-grow-1", children: e == null ? void 0 : e.map(({ isRefresh: s, ...r }) => /* @__PURE__ */ h( - C, + V, { ...r, data: n, @@ -1191,31 +1206,31 @@ const Vn = ({ className: e, children: t, itemOperations: n, resource: s, $settin )) }), children: t } -), Ln = ({ theme: e, themeProps: t, itemClassName: n, className: s, dataSource: r, fields: o, itemOperations: i, resource: l, ...c }) => { - const a = q(() => /* @__PURE__ */ h(mt, { ...c, fields: o }), [o, c]), d = q(() => r == null ? void 0 : r.map((u, b) => y.cloneElement(a, { key: b, data: u })), [r, a]), g = q(() => e ? y.lazy(() => x.getWidgetComponent(e).catch((u) => ({ default: () => `${u}` }))) : null, [e]), p = { +), Ln = ({ theme: e, themeProps: t, itemClassName: n, className: s, dataSource: r, fields: o, itemOperations: i, resource: a, ...c }) => { + const l = q(() => /* @__PURE__ */ h(ht, { ...c, fields: o }), [o, c]), d = q(() => r == null ? void 0 : r.map((u, b) => y.cloneElement(l, { key: b, data: u })), [r, l]), g = q(() => e ? y.lazy(() => H.getWidgetComponent(e).catch((u) => ({ default: () => `${u}` }))) : null, [e]), p = { $setting: t, - resource: l, + resource: a, itemOperations: i, className: s, itemClassName: n, children: d }; - return g ? /* @__PURE__ */ h(y.Suspense, { fallback: /* @__PURE__ */ h("div", { style: { width: "100%", height: "100%" } }), children: /* @__PURE__ */ h(g, { ...p }) }) : /* @__PURE__ */ h(Vn, { ...p }); + return g ? /* @__PURE__ */ h(y.Suspense, { fallback: /* @__PURE__ */ h("div", { style: { width: "100%", height: "100%" } }), children: /* @__PURE__ */ h(g, { ...p }) }) : /* @__PURE__ */ h(Cn, { ...p }); }, kn = ({ listCode: e, base62params: t, className: n, theme: s, themeProps: r, itemClassName: o }) => { - const [i, l] = V(), [{ + const [i, a] = R(), [{ resource: c, - cols: a, + cols: l, rowHeight: d, fields: g, itemOperations: p = [], marginX: u, marginY: b - }, v] = V({ marginX: 0, marginY: 0 }); - return R(() => { + }, v] = R({ marginX: 0, marginY: 0 }); + return C(() => { L.get(`/api/_/${e}/list-grid-layout`).then(v).catch(() => v({})); - }, [e]), R(() => { - L.list(e, t).then(({ dataSource: j }) => { - l(j); + }, [e]), C(() => { + L.list(e, t).then(({ dataSource: z }) => { + a(z); }); }, [t]), /* @__PURE__ */ h( Ln, @@ -1223,7 +1238,7 @@ const Vn = ({ className: e, children: t, itemOperations: n, resource: s, $settin className: n, itemClassName: o, dataSource: i, - cols: a, + cols: l, rowHeight: d, fields: g, resource: c, @@ -1234,7 +1249,7 @@ const Vn = ({ className: e, children: t, itemOperations: n, resource: s, $settin } ); }, Nn = (e, t, n, s, r) => { - const o = y.lazy(() => x.getWidgetComponent(e).catch((i) => ({ default: () => `${i}` }))); + const o = y.lazy(() => H.getWidgetComponent(e).catch((i) => ({ default: () => `${i}` }))); return /* @__PURE__ */ h(y.Suspense, { children: /* @__PURE__ */ h( o, { @@ -1246,13 +1261,13 @@ const Vn = ({ className: e, children: t, itemOperations: n, resource: s, $settin ) }, e); }, qn = (e, t = {}) => (qe(e), qe(t), e == null ? void 0 : e.map(({ widgetByJs: s, widgetByJsSetting: r, ...o }, i) => s && !s.endsWith("/BasicShowFieldData") ? { ...o, - render: (l, c) => { - const a = Nn(s, l, c, r, t); - return m.isFunction(o == null ? void 0 : o.render) ? o.render(a, l, c) : a; + render: (a, c) => { + const l = Nn(s, a, c, r, t); + return m.isFunction(o == null ? void 0 : o.render) ? o.render(l, a, c) : l; } } : o)), _n = (e) => { - const [t, n] = V({}); - return R(() => { + const [t, n] = R({}); + return C(() => { let s = !1; return e && L.get(`/api/_/${e}`).then((r) => m.pick(r, [ "uuid", @@ -1275,7 +1290,7 @@ const Vn = ({ className: e, children: t, itemOperations: n, resource: s, $settin ])).then((r) => !s && n(r)), () => s = !0; }, [e]), t; }, es = (e, t = {}) => { - const [n, s] = V({ dataSource: [] }); + const [n, s] = R({ dataSource: [] }); return Je(() => { let r = !1; return e && L.get(`/api/${e}/${L.encode({ page: 1, ...t })}`).then((o) => !r && s(o)), () => r = !0; @@ -1283,8 +1298,8 @@ const Vn = ({ className: e, children: t, itemOperations: n, resource: s, $settin }; Mt.EditableCell = bn; const Wn = ({ component: e }) => { - const [t, n] = V({}), { base62params: s } = jt(); - return R(() => { + const [t, n] = R({}), { base62params: s } = at(); + return C(() => { e ? L.get(`/api/_/${e}`).then(n) : n({}); }, [e]), /* @__PURE__ */ h( kn, @@ -1296,23 +1311,23 @@ const Wn = ({ component: e }) => { } ); }; -var Q, S, pe, ke, Ne; -const X = class X { +var Q, I, ye, re, Ne; +const D = class D { constructor() { - F(this, S, /* @__PURE__ */ new Map()); - F(this, pe, {}); - F(this, ke, null); + F(this, I, /* @__PURE__ */ new Map()); + F(this, ye, {}); + F(this, re, null); N(this, "init", (t, n) => { - G(this, S, t), G(this, pe, n); + G(this, I, t), G(this, ye, n); }); - N(this, "get", (t) => (f(this, S).has(t) || (t = Array.from(f(this, S).keys()).find((n) => f(this, S).get(n).uri === t)), f(this, S).get(t) || {})); + N(this, "get", (t) => (f(this, I).has(t) || (t = Array.from(f(this, I).keys()).find((n) => f(this, I).get(n).uri === t)), f(this, I).get(t) || {})); N(this, "redirect", (t, n, s = {}) => { const { uri: r, type: o, widgetProps: i } = this.get(t); - let l = zt(r, o != "list" ? n : m.mapValues(n, (a) => L.encode(a))); + let a = zt(r, o != "list" ? n : m.mapValues(n, (l) => L.encode(l))); const c = new URLSearchParams(); - for (const a in i || {}) - (i == null ? void 0 : i.type) == "query" && c.append(a, n[a]); - return c.size > 0 && (l = `${l}?${c.toString()}`), f(this, ke).navigate(l, s); + for (const l in i || {}) + (i == null ? void 0 : i.type) == "query" && c.append(l, n[l]); + return c.size > 0 && (a = `${a}?${c.toString()}`), f(this, re).navigate(a, s); }); /** * @@ -1321,16 +1336,26 @@ const X = class X { */ N(this, "getMenus", (t) => { var n; - return ((n = f(this, pe)) == null ? void 0 : n[t]) || []; + return ((n = f(this, ye)) == null ? void 0 : n[t]) || []; }); N(this, "getCurrentMenu", () => { var s, r; - const t = getCurrentPages(), n = Object.values(f(this, pe)).flat(); + const t = getCurrentPages(), n = Object.values(f(this, ye)).flat(); for (let o = t.length - 1; o >= 0; o--) if ((s = t[o].query) != null && s.c) return f(this, Ne).call(this, (r = t[o].query) == null ? void 0 : r.c, n); return null; }); + N(this, "getCurrentRoute", (t = 0) => { + var s; + const n = (s = f(this, re).state.matches[f(this, re).state.matches.length - 1 - t]) == null ? void 0 : s.route; + if (!n) + return null; + for (let [r, o] of f(this, I)) + if (o.uri === n.path) + return o; + return null; + }); F(this, Ne, (t, n) => { var s; for (const r of n) { @@ -1345,18 +1370,18 @@ const X = class X { return null; }); N(this, "createBrowserRouter", (t = {}) => { - if (f(this, S).size == 0) + if (f(this, I).size == 0) return null; - const n = re.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/frameworks/BasicLayout"); - re.get(Jt() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"); - const s = { [n]: 0 }, r = Array.from(f(this, S).values()).reduce((o, { uuid: i, uri: l, name: c, type: a, component: d, isLogin: g, isLayout: p, extra: u }) => { + const n = ie.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/frameworks/BasicLayout"); + ie.get(Jt() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"); + const s = { [n]: 0 }, r = Array.from(f(this, I).values()).reduce((o, { uuid: i, uri: a, name: c, type: l, component: d, isLogin: g, isLayout: p, extra: u }) => { let b = {}, v = 0; - switch (a) { + switch (l) { case "list": b.element = y.createElement(Wn, { component: d }); break; case "fsdpf-component": - b.lazy = () => x.getWidgetComponent(d).then((j) => ({ Component: j.default })); + b.lazy = () => H.getWidgetComponent(d).then((z) => ({ Component: z.default })); break; } if (u != null && u.layout) @@ -1365,25 +1390,25 @@ const X = class X { else return s[u == null ? void 0 : u.layout] = o.length, [...o, { path: "/", - lazy: () => x.getWidgetComponent(u == null ? void 0 : u.layout).then((j) => ({ Component: j.default })), - children: [{ path: l, ...b }] + lazy: () => H.getWidgetComponent(u == null ? void 0 : u.layout).then((z) => ({ Component: z.default })), + children: [{ path: a, ...b }] }]; - return p && v > -1 ? (o[v].children.push({ path: l, ...b }), o) : [...o, { path: l, ...b }]; + return p && v > -1 ? (o[v].children.push({ path: a, ...b }), o) : [...o, { path: a, ...b }]; }, [ { path: "/", - lazy: () => x.getWidgetComponent(n).then((o) => ({ Component: o.default })), + lazy: () => H.getWidgetComponent(n).then((o) => ({ Component: o.default })), children: [] } ]); - return G(this, ke, Ut(r, t)); + return G(this, re, Ut(r, t)); }); - if (f(X, Q)) - return f(X, Q); + if (f(D, Q)) + return f(D, Q); } }; -Q = new WeakMap(), S = new WeakMap(), pe = new WeakMap(), ke = new WeakMap(), Ne = new WeakMap(), F(X, Q, null), N(X, "getInstance", () => (f(X, Q) || G(X, Q, new X()), f(X, Q))); -let Se = X; +Q = new WeakMap(), I = new WeakMap(), ye = new WeakMap(), re = new WeakMap(), Ne = new WeakMap(), F(D, Q, null), N(D, "getInstance", () => (f(D, Q) || G(D, Q, new D()), f(D, Q))); +let Se = D; const Ae = Se.getInstance(), nt = { null2json: (e) => null, null2array: (e) => null, @@ -1461,27 +1486,27 @@ m.mixin({ }, replaceKeys: (e, t) => !e || typeof e != "object" ? e : Array.isArray(e) ? e.map((n) => m.replaceKeys(n, t)) : Object.keys(e).reduce((n, s) => (t[s] ? n[t[s]] = m.replaceKeys(e[s], t) : n[s] = m.replaceKeys(e[s], t), n), {}) }); -let Ft = ""; +let Rt = ""; const L = { init: (e, t, n) => { - Re.defaults.baseURL = Ft = n, Re.defaults.timeout = 15e3, Object.assign(L, new He(e, t, Re)); + Ce.defaults.baseURL = Rt = n, Ce.defaults.timeout = 15e3, Object.assign(L, new xe(e, t, Ce)); } -}, Rt = (e) => { +}, Ct = (e) => { var t; return e && (e == null ? void 0 : e.name) && ((e == null ? void 0 : e.prototype) instanceof y.Component || (e == null ? void 0 : e.name.substr(0, 1)) === ((t = e.name.substr(0, 1)) == null ? void 0 : t.toUpperCase())); }, Zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, - AppGlobalParamsContext: lt, + AppGlobalParamsContext: ct, get AppUrl() { - return Ft; + return Rt; }, - cache: ct, - configure: re, - core: x, + cache: ut, + configure: ie, + core: H, default: At, - func: ie, + func: _, http: L, - isReactComponent: Rt, + isReactComponent: Ct, route: Ae }, Symbol.toStringTag, { value: "Module" })), ts = () => L.get("/api/my-router").then((e) => [ ...e, @@ -1497,24 +1522,24 @@ const L = { ].map(({ uuid: t, ...n }) => [t, { uuid: t, ...n }])).then((e) => new Map(e)), ns = () => L.get("/api/my-menu"), ss = () => L.get("api/init-configure"), rs = () => L.get("/api/init-widget-operation-auth"), os = (e) => L.get(`/api/user-wx-phone-number/${e}`); export { _n as A, - C as B, + V as B, es as C, Ln as D, - Ft as E, + Rt as E, Z as F, an as G, L as H, - at as I, - Rt as J, + lt as I, + Ct as J, At as K, - lt as L, - ct as M, - re as N, - ie as O, - x as P, + ct as L, + ut as M, + ie as N, + _ as O, + H as P, Ae as Q, ts as R, - oe as S, + ae as S, Mt as T, ns as U, ss as V, @@ -1529,19 +1554,19 @@ export { Ye as g, Je as h, Bn as i, - H as j, + x as j, Yn as k, Kn as l, - yt as m, + bt as m, dn as n, Ke as o, - gt as p, + pt as p, pn as q, _t as r, yn as s, Qn as t, - ut as u, - mt as v, + dt as u, + ht as v, Fn as w, kn as x, Nn as y, diff --git a/dist/components.js b/dist/components.js index 14fc09b..f03d92f 100644 --- a/dist/components.js +++ b/dist/components.js @@ -1,4 +1,4 @@ -import { I as s, F as r } from "./common/main-B944cmcs.js"; +import { I as s, F as r } from "./common/main-CJT9_qCi.js"; export { s as Icon, r as Toast diff --git a/dist/container.js b/dist/container.js index 7961e8d..7b01efe 100644 --- a/dist/container.js +++ b/dist/container.js @@ -1,4 +1,4 @@ -import { S as s, m as t, F as o, k as r, j as F } from "./common/main-B944cmcs.js"; +import { S as s, m as t, F as o, k as r, j as F } from "./common/main-CJT9_qCi.js"; export { s as Context, t as FFPageRender, diff --git a/dist/data-list.js b/dist/data-list.js index 61901f0..ca74af7 100644 --- a/dist/data-list.js +++ b/dist/data-list.js @@ -1,4 +1,4 @@ -import { D as e, x as t, T as u, y as r, z as d, C as i, A as l } from "./common/main-B944cmcs.js"; +import { D as e, x as t, T as u, y as r, z as d, C as i, A as l } from "./common/main-CJT9_qCi.js"; export { e as DataList, t as DataListHelper, diff --git a/dist/grid-layout-form.js b/dist/grid-layout-form.js index c4c62b9..42af764 100644 --- a/dist/grid-layout-form.js +++ b/dist/grid-layout-form.js @@ -1,4 +1,4 @@ -import { o as r, q as e, p as s, G as t, s as u, r as d } from "./common/main-B944cmcs.js"; +import { o as r, q as e, p as s, G as t, s as u, r as d } from "./common/main-CJT9_qCi.js"; export { r as GridLayoutForm, e as GridLayoutFormHelper, diff --git a/dist/grid-layout.js b/dist/grid-layout.js index 47f8f95..e1125bd 100644 --- a/dist/grid-layout.js +++ b/dist/grid-layout.js @@ -1,4 +1,4 @@ -import { v as d, w as o, t as r } from "./common/main-B944cmcs.js"; +import { v as d, w as o, t as r } from "./common/main-CJT9_qCi.js"; export { d as GridLayout, o as GridLayoutWidget, diff --git a/dist/hooks.js b/dist/hooks.js index 7e354aa..e3919ba 100644 --- a/dist/hooks.js +++ b/dist/hooks.js @@ -3,7 +3,7 @@ import "rc-field-form"; import "react"; import "react-dom"; import "axios"; -import { h as r, i, e as m, d as f, f as l, u as c } from "./common/main-B944cmcs.js"; +import { h as r, i, e as m, d as f, f as l, u as c } from "./common/main-CJT9_qCi.js"; export { r as useDeepEqualEffect, i as useOptions, diff --git a/dist/index.js b/dist/index.js index 4331604..41dfffa 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,7 +1,7 @@ import "lodash"; import "axios"; import "react"; -import { L as e, E as m, M as c, N as i, P as n, K as f, O as l, H as u, J as h, Q as x } from "./common/main-B944cmcs.js"; +import { L as e, E as m, M as c, N as i, P as n, K as f, O as l, H as u, J as h, Q as x } from "./common/main-CJT9_qCi.js"; import "ff-request"; export { e as AppGlobalParamsContext, diff --git a/dist/service.js b/dist/service.js index 465c500..520862b 100644 --- a/dist/service.js +++ b/dist/service.js @@ -1,4 +1,4 @@ -import { V as g, U as s, X as a, R as o, W as r } from "./common/main-B944cmcs.js"; +import { V as g, U as s, X as a, R as o, W as r } from "./common/main-CJT9_qCi.js"; export { g as getConfigure, s as getMenus, diff --git a/dist/user.js b/dist/user.js index 138d60a..a534c13 100644 --- a/dist/user.js +++ b/dist/user.js @@ -3,7 +3,7 @@ import "react/jsx-runtime"; import "react"; import "@ant-design/icons"; import "classnames"; -import { c as m, a as p, g, l as n, b as c } from "./common/main-B944cmcs.js"; +import { c as m, a as p, g, l as n, b as c } from "./common/main-CJT9_qCi.js"; export { m as checkUserToken, p as getUserInfo, diff --git a/package.json b/package.json index dab41fc..19ce99e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ff", "private": true, - "version": "0.1.4", + "version": "0.1.5", "type": "module", "files": [ "dist/" @@ -21,7 +21,7 @@ }, "scripts": { "dev": "vite", - "build": "vite build --emptyOutDir", + "build": "vite build", "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview" },