diff --git a/dist/button.js b/dist/button.js index f271aba..9bfeb0d 100644 --- a/dist/button.js +++ b/dist/button.js @@ -1,4 +1,4 @@ -import { ah as s, ag as u, ai as e } from "./common/main-DIjtGOtT.js"; +import { ah as s, ag as u, ai as e } from "./common/main-Bo_1as7N.js"; export { s as auth, u as default, diff --git a/dist/common/main-DIjtGOtT.js b/dist/common/main-Bo_1as7N.js similarity index 59% rename from dist/common/main-DIjtGOtT.js rename to dist/common/main-Bo_1as7N.js index 190241e..27815a6 100644 --- a/dist/common/main-DIjtGOtT.js +++ b/dist/common/main-Bo_1as7N.js @@ -1,11 +1,11 @@ var Ln = Object.defineProperty; -var Bt = (e) => { +var zt = (e) => { throw TypeError(e); }; var Vn = (e, t, n) => t in e ? Ln(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; -var N = (e, t, n) => Vn(e, typeof t != "symbol" ? t + "" : t, n), Dt = (e, t, n) => t.has(e) || Bt("Cannot " + n); -var y = (e, t, n) => (Dt(e, t, "read from private field"), n ? n.call(e) : t.get(e)), j = (e, t, n) => t.has(e) ? Bt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), q = (e, t, n, a) => (Dt(e, t, "write to private field"), a ? a.call(e, n) : t.set(e, n), n); -var Ut = (e, t, n, a) => ({ +var N = (e, t, n) => Vn(e, typeof t != "symbol" ? t + "" : t, n), Bt = (e, t, n) => t.has(e) || zt("Cannot " + n); +var y = (e, t, n) => (Bt(e, t, "read from private field"), n ? n.call(e) : t.get(e)), j = (e, t, n) => t.has(e) ? zt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), q = (e, t, n, a) => (Bt(e, t, "write to private field"), a ? a.call(e, n) : t.set(e, n), n); +var Dt = (e, t, n, a) => ({ set _(i) { q(e, t, i, n); }, @@ -13,38 +13,38 @@ var Ut = (e, t, n, a) => ({ return y(e, t, a); } }); -import { jsx as g, jsxs as O } from "react/jsx-runtime"; +import { jsx as u, jsxs as O } from "react/jsx-runtime"; import S, { useEffect as V, useState as A, useCallback as G, useRef as K, useContext as ie, useMemo as W, useId as yt, isValidElement as In, useLayoutEffect as Mn } from "react"; -import b from "prop-types"; +import w from "prop-types"; import R from "classnames"; -import * as qt from "react-is"; +import * as Ut from "react-is"; import { useNotification as zn } from "rc-notification"; -import m from "lodash"; -import Z, { Field as Ft, FieldContext as tn } from "rc-field-form"; +import p from "lodash"; +import Z, { Field as Ft, FieldContext as en } from "rc-field-form"; import { M as pt, N as Le, a as Ve, _ as wt, S as Bn } from "./vender-FNiQWFaA.js"; -import nn from "immutability-helper"; +import tn from "immutability-helper"; import { Space as Dn, Form as et, Input as Un, Button as nt, Pagination as qn, Tree as Wn, Breadcrumb as Kn, Table as _n, Empty as Hn, Popover as Jn, Popconfirm as Gn, Tooltip as Yn } from "antd"; import { useMergedState as Xn } from "rc-util"; -import { generatePath as Qn, useInRouterContext as an, useParams as Zn, useLocation as ea, createBrowserRouter as ta, Navigate as na } from "react-router-dom"; +import { generatePath as Qn, useInRouterContext as nn, useParams as Zn, useLocation as ea, createBrowserRouter as ta, Navigate as na } from "react-router-dom"; import "rc-util/lib/hooks/useMergedState"; import aa from "rc-drawer"; import ia from "rc-dialog"; -var Re, ze, Fe, ue, xe, Pe; -class rn { +var Re, ze, Fe, de, Pe, ve; +class an { constructor(t, n) { j(this, Re, /* @__PURE__ */ new Map()); j(this, ze, !0); j(this, Fe, []); - j(this, ue); - j(this, xe, () => y(this, ue)); - j(this, Pe, () => Promise.resolve()); + j(this, de); + j(this, Pe, () => y(this, de)); + j(this, ve, () => Promise.resolve()); N(this, "get", (...t) => new Promise((n, a) => { const i = JSON.stringify(t); - if (y(this, Re).has(i)) return n(y(this, Pe).call(this, y(this, ue), ...t)); - if (y(this, ue) === void 0) y(this, Fe).push([t, n, a]), y(this, ze) && (q(this, ze, !1), Promise.resolve(typeof y(this, xe) == "function" ? y(this, xe).call(this) : y(this, xe)).then((r) => q(this, ue, r || null)).finally(() => { + if (y(this, Re).has(i)) return n(y(this, ve).call(this, y(this, de), ...t)); + if (y(this, de) === void 0) y(this, Fe).push([t, n, a]), y(this, ze) && (q(this, ze, !1), Promise.resolve(typeof y(this, Pe) == "function" ? y(this, Pe).call(this) : y(this, Pe)).then((r) => q(this, de, r || null)).finally(() => { y(this, Fe).forEach(([r, o, s]) => { try { - const l = y(this, Pe).call(this, y(this, ue), ...r); + const l = y(this, ve).call(this, y(this, de), ...r); y(this, Re).set(JSON.stringify(r), l), o(l); } catch (l) { s(l); @@ -52,30 +52,30 @@ class rn { }), y(this, Fe).length = 0; })); else { - const r = y(this, Pe).call(this, y(this, ue), ...t); + const r = y(this, ve).call(this, y(this, de), ...t); y(this, Re).set(i, r), n(r); } })); - q(this, Pe, n), q(this, xe, t); + q(this, ve, n), q(this, Pe, t); } } -Re = new WeakMap(), ze = new WeakMap(), Fe = new WeakMap(), ue = new WeakMap(), xe = new WeakMap(), Pe = new WeakMap(); -const vi = () => g("div", { children: "Empty" }), Ke = S.createContext({ ele: {}, mount: () => { +Re = new WeakMap(), ze = new WeakMap(), Fe = new WeakMap(), de = new WeakMap(), Pe = new WeakMap(), ve = new WeakMap(); +const xi = () => u("div", { children: "Empty" }), Ke = S.createContext({ ele: {}, mount: () => { }, unmount: () => { } }), J = ({ rootClassName: e, className: t, children: n, actions: a, title: i, subTitle: r, extras: o, style: s = {} }) => { - const { mount: l, unmount: p } = S.useContext(Ke); - return J.Action({ children: a }), J.Title({ children: i }), J.SubTitle({ children: r }), J.Extra({ children: o }), V(() => (l("rootClassName", e), () => p(e)), [e]), g("div", { className: R("ff-container", t), style: s, children: n }); + const { mount: l, unmount: g } = S.useContext(Ke); + return J.Action({ children: a }), J.Title({ children: i }), J.SubTitle({ children: r }), J.Extra({ children: o }), V(() => (l("rootClassName", e), () => g(e)), [e]), u("div", { className: R("ff-container", t), style: s, children: n }); }, Ze = (e) => ({ children: t, className: n }) => { const { mount: a, unmount: i } = S.useContext(Ke); return V(() => (t && a(e, S.createElement("div", { key: `ff-${e}`, className: R(`ff-popup-${e}`, n) }, t)), () => i(e)), [n, t]), null; }; -J.Action = Ze("actions"), J.Title = Ze("title"), J.SubTitle = Ze("sub-title"), J.Extra = Ze("extras"), J.propTypes = { className: b.string, style: b.object, title: b.any, subTitle: b.any, actions: b.any, extras: b.any }; -const xi = () => g(J, { className: "ff-loading", children: O("div", { className: "loader", children: [O("div", { className: "square", children: [g("span", {}), g("span", {}), g("span", {})] }), O("div", { className: "square", children: [g("span", {}), g("span", {}), g("span", {})] }), O("div", { className: "square", children: [g("span", {}), g("span", {}), g("span", {})] }), O("div", { className: "square", children: [g("span", {}), g("span", {}), g("span", {})] })] }) }), Pi = () => g("div", { children: "NotFound" }), on = ({ children: e }) => { +J.Action = Ze("actions"), J.Title = Ze("title"), J.SubTitle = Ze("sub-title"), J.Extra = Ze("extras"), J.propTypes = { className: w.string, style: w.object, title: w.any, subTitle: w.any, actions: w.any, extras: w.any }; +const Pi = () => u(J, { className: "ff-loading", children: O("div", { className: "loader", children: [O("div", { className: "square", children: [u("span", {}), u("span", {}), u("span", {})] }), O("div", { className: "square", children: [u("span", {}), u("span", {}), u("span", {})] }), O("div", { className: "square", children: [u("span", {}), u("span", {}), u("span", {})] }), O("div", { className: "square", children: [u("span", {}), u("span", {}), u("span", {})] })] }) }), vi = () => u("div", { children: "NotFound" }), rn = ({ children: e }) => { const [t, n] = A({}), a = G((r, o) => n((s) => ({ ...s, [r]: o })), []), i = G((r) => n((o) => ({ ...o, [r]: void 0 })), []); - return typeof (e == null ? void 0 : e.type) == "string" ? e : g(Ke.Provider, { value: { ele: t, mount: a, unmount: i }, children: S.cloneElement(e, { className: t.rootClassName, title: t.title, subTitle: t["sub-title"], actions: t.actions, extras: t.extras }) }); + return typeof (e == null ? void 0 : e.type) == "string" ? e : u(Ke.Provider, { value: { ele: t, mount: a, unmount: i }, children: S.cloneElement(e, { className: t.rootClassName, title: t.title, subTitle: t["sub-title"], actions: t.actions, extras: t.extras }) }); }; -on.propTypes = { children: b.element.isRequired }; -const Wt = { close: ["M563.8 512l262.5-312.9c4.4-5.2 0.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9c-4.4 5.2-0.7 13.1 6.1 13.1h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"], check: ["M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474c-6.1-7.7-15.3-12.2-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1 0.4-12.8-6.3-12.8z"], info: ["M512 224m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z", "M544 392h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V400c0-4.4-3.6-8-8-8z"] }, Et = ({ type: e, props: t }) => g("i", { ...t, children: g("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", fill: "currentColor", children: (Wt[e] || Wt.info).map((n, a) => g("path", { d: n }, a)) }) }), sn = ({ className: e, content: t, icon: n, $close: a }) => O(S.Fragment, { children: [n && g("div", { className: R("ff-notification-icon", e), children: g(Et, { type: n }) }), t] }), ra = ({}) => g(J, { children: "Confirm" }); +rn.propTypes = { children: w.element.isRequired }; +const qt = { close: ["M563.8 512l262.5-312.9c4.4-5.2 0.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9c-4.4 5.2-0.7 13.1 6.1 13.1h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"], check: ["M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474c-6.1-7.7-15.3-12.2-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1 0.4-12.8-6.3-12.8z"], info: ["M512 224m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z", "M544 392h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V400c0-4.4-3.6-8-8-8z"] }, Et = ({ type: e, props: t }) => u("i", { ...t, children: u("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", fill: "currentColor", children: (qt[e] || qt.info).map((n, a) => u("path", { d: n }, a)) }) }), on = ({ className: e, content: t, icon: n, $close: a }) => O(S.Fragment, { children: [n && u("div", { className: R("ff-notification-icon", e), children: u(Et, { type: n }) }), t] }), ra = ({}) => u(J, { children: "Confirm" }); var me, Ee; const re = class re { constructor() { @@ -88,28 +88,28 @@ const re = class re { me = new WeakMap(), Ee = new WeakMap(), j(re, me, null), N(re, "getInstance", () => (y(re, me) || q(re, me, new re()), y(re, me))); let bt = re; const oa = bt.getInstance(), sa = (e, t, n = "children") => { - if (m.isEmpty(e)) return {}; - const a = m.find(e, ["value", t]); - if (!m.isEmpty(a)) return a; + if (p.isEmpty(e)) return {}; + const a = p.find(e, ["value", t]); + if (!p.isEmpty(a)) return a; const i = e.length; for (let r = 0; r < i; r++) { const { [n]: o } = e[r], s = sa(o, t, n); - if (!m.isEmpty(s)) return s; + if (!p.isEmpty(s)) return s; } return {}; -}, ln = (e = "Input", t = "@pkg/ff/grid-layout-forms") => e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`; +}, sn = (e = "Input", t = "@pkg/ff/grid-layout-forms") => e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`; var fe, Be; const oe = class oe { constructor() { j(this, Be, null); N(this, "init", (t) => q(this, Be, t)); - N(this, "get", (t, n) => m.get(y(this, Be), t, n)); + N(this, "get", (t, n) => p.get(y(this, Be), t, n)); if (y(oe, fe)) return y(oe, fe); } }; fe = new WeakMap(), Be = new WeakMap(), j(oe, fe, null), N(oe, "getInstance", () => (y(oe, fe) || q(oe, fe, new oe()), y(oe, fe))); let Ct = oe; -const Ie = Ct.getInstance(), Kt = { null2json: (e) => Object.create(), null2array: (e) => [], null2number: (e) => 0, null2bool: (e) => !1, null2string: (e) => "", null2integer: (e) => 0, null2float: (e) => 0, string2json: (e) => e ? JSON.parse(e) : "{}", string2array: (e) => e.substr(0, 1) === "[" && e.substr(-1) === "]" ? JSON.parse(e) : e.split(","), string2number: (e) => e == "" ? 0 : +e, string2integer: (e) => e == "" ? 0 : +e, string2float: (e) => e == "" ? 0 : +e, string2bool: (e) => { +const Ie = Ct.getInstance(), Wt = { null2json: (e) => Object.create(), null2array: (e) => [], null2number: (e) => 0, null2bool: (e) => !1, null2string: (e) => "", null2integer: (e) => 0, null2float: (e) => 0, string2json: (e) => e ? JSON.parse(e) : "{}", string2array: (e) => e.substr(0, 1) === "[" && e.substr(-1) === "]" ? JSON.parse(e) : e.split(","), string2number: (e) => e == "" ? 0 : +e, string2integer: (e) => e == "" ? 0 : +e, string2float: (e) => e == "" ? 0 : +e, string2bool: (e) => { switch (`${e}`.toLowerCase()) { case "0": case "false": @@ -118,27 +118,27 @@ const Ie = Ct.getInstance(), Kt = { null2json: (e) => Object.create(), null2arra return !1; } return !!e; -}, string2string: (e) => e, json2json: (e) => e, json2array: (e) => e ? Object.values(e) : [], json2number: (e) => Object.keys(e).length, json2integer: (e) => Object.keys(e).length, json2float: (e) => Object.keys(e).length, json2bool: (e) => Object.keys(e).length > 0, json2string: (e) => e ? JSON.stringify(e) : "", array2json: (e) => ({ ...e }), array2array: (e) => e, array2number: (e) => e.length, array2integer: (e) => e.length, array2float: (e) => e.length, array2bool: (e) => e.length > 0, array2string: (e) => JSON.stringify(e), number2json: (e) => ({}), number2array: (e) => [e], number2number: (e) => e, number2integer: (e) => e, number2float: (e) => e, number2bool: (e) => !!e, number2string: (e) => e.toString(), boolean2json: (e) => ({}), boolean2array: (e) => [], boolean2number: (e) => +e, boolean2integer: (e) => +e, boolean2float: (e) => +e, boolean2bool: (e) => e, boolean2string: (e) => e ? "true" : "false" }, de = (e, t) => { +}, string2string: (e) => e, json2json: (e) => e, json2array: (e) => e ? Object.values(e) : [], json2number: (e) => Object.keys(e).length, json2integer: (e) => Object.keys(e).length, json2float: (e) => Object.keys(e).length, json2bool: (e) => Object.keys(e).length > 0, json2string: (e) => e ? JSON.stringify(e) : "", array2json: (e) => ({ ...e }), array2array: (e) => e, array2number: (e) => e.length, array2integer: (e) => e.length, array2float: (e) => e.length, array2bool: (e) => e.length > 0, array2string: (e) => JSON.stringify(e), number2json: (e) => ({}), number2array: (e) => [e], number2number: (e) => e, number2integer: (e) => e, number2float: (e) => e, number2bool: (e) => !!e, number2string: (e) => e.toString(), boolean2json: (e) => ({}), boolean2array: (e) => [], boolean2number: (e) => +e, boolean2integer: (e) => +e, boolean2float: (e) => +e, boolean2bool: (e) => e, boolean2string: (e) => e ? "true" : "false" }, ge = (e, t) => { let n = "string"; - n = Array.isArray(e) ? "array" : typeof e, m.isObject(e) && (n = "json"); + n = Array.isArray(e) ? "array" : typeof e, p.isObject(e) && (n = "json"); const a = `${n}2${t}`; - return Reflect.has(Kt, a) ? Kt[a](e) : e; -}, la = (e) => e === null ? "null" : Array.isArray(e) ? "array" : typeof e == "object" ? "json" : typeof e == "boolean" ? "bool" : typeof e == "string" ? "string" : typeof e == "number" ? Number.isInteger(e) ? "integer" : "float" : typeof e, _e = (e = {}, t = {}, n = {}, a = "") => cn(e, (i, r) => r === "type" && i === "code") ? dn(e, t, n, a) : un(e, t, a), cn = (e, t = () => !1) => m.some(e, (n) => !!m.some(n, t) || (m.isEmpty(n) || !m.isPlainObject(n) && !m.isArray(n) ? void 0 : cn(n, t))), dn = async (e = {}, t = {}, n = {}, a = "") => { + return Reflect.has(Wt, a) ? Wt[a](e) : e; +}, la = (e) => e === null ? "null" : Array.isArray(e) ? "array" : typeof e == "object" ? "json" : typeof e == "boolean" ? "bool" : typeof e == "string" ? "string" : typeof e == "number" ? Number.isInteger(e) ? "integer" : "float" : typeof e, _e = (e = {}, t = {}, n = {}, a = "") => ln(e, (i, r) => r === "type" && i === "code") ? cn(e, t, n, a) : dn(e, t, a), ln = (e, t = () => !1) => p.some(e, (n) => !!p.some(n, t) || (p.isEmpty(n) || !p.isPlainObject(n) && !p.isArray(n) ? void 0 : ln(n, t))), cn = async (e = {}, t = {}, n = {}, a = "") => { let i = /* @__PURE__ */ Object.create(null); for (let r in e) { let o; if (Reflect.has(e[r], "type") && ["code", "field", "router", "query", "string"].includes(e[r].type)) { - const { type: s, value: l = "", default: p = a } = e[r]; + const { type: s, value: l = "", default: g = a } = e[r]; switch (s) { case "code": try { - o = await ve.exec(l, t, n); + o = await xe.exec(l, t, n); } catch (c) { console.error("getWidgetPropsData", c); } break; case "field": - o = m.get(t, l) ?? m.get(t, l.substring(l.indexOf(".") + 1)); + o = p.get(t, l) ?? p.get(t, l.substring(l.indexOf(".") + 1)); break; case "router": case "query": @@ -147,19 +147,19 @@ const Ie = Ct.getInstance(), Kt = { null2json: (e) => Object.create(), null2arra case "string": o = l; } - o ?? (o = p); - } else o = await dn(e[r], t, n, a); - m.set(i, r, o); + o ?? (o = g); + } else o = await cn(e[r], t, n, a); + p.set(i, r, o); } return i; -}, un = (e = {}, t = {}, n = "") => Object.keys(e || {}).reduce((a, i) => { - if (m.isPlainObject(e[i])) { +}, dn = (e = {}, t = {}, n = "") => Object.keys(e || {}).reduce((a, i) => { + if (p.isPlainObject(e[i])) { let r; if (Reflect.has(e[i], "type") && ["field", "router", "query", "string"].includes(e[i].type)) { const { type: o, value: s = "", default: l = n } = e[i]; switch (o) { case "field": - r = m.get(t, s) ?? m.get(t, s.substring(s.indexOf(".") + 1)); + r = p.get(t, s) ?? p.get(t, s.substring(s.indexOf(".") + 1)); break; case "router": case "query": @@ -169,8 +169,8 @@ const Ie = Ct.getInstance(), Kt = { null2json: (e) => Object.create(), null2arra r = s; } r ?? (r = l); - } else r = un(e[i], t, n); - m.set(a, i, r); + } else r = dn(e[i], t, n); + p.set(a, i, r); } return a; }, {}), mt = (e, t) => e && typeof e == "object" ? Array.isArray(e) ? e.map((n) => mt(n, t)) : Object.keys(e).reduce((n, a) => (t[a] ? n[t[a]] = mt(e[a], t) : n[a] = mt(e[a], t), n), {}) : e, Ni = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (e) => { @@ -232,7 +232,7 @@ const ot = class ot { y(this, Ue).call(this, t); } }; -it = new WeakMap(), De = new WeakMap(), Ue = new WeakMap(), rt = new WeakMap(), j(ot, it, m.memoize((t, n) => { +it = new WeakMap(), De = new WeakMap(), Ue = new WeakMap(), rt = new WeakMap(), j(ot, it, p.memoize((t, n) => { if (typeof t == "function") return t(n); if (typeof t == "string") return ae.getWidgetComponent(t).then((a) => { var i; @@ -257,36 +257,36 @@ const ee = S.createContext({ listCode: "", classNames: {}, getBase62params: (e, }, setSider: () => { }, setKeyword: () => { }, setCondition: () => { -} }), _t = ({ className: e, record: t, column: n, ...a }) => { +} }), Kt = ({ className: e, record: t, column: n, ...a }) => { if (n != null && n.editableByJs && (n != null && n.uuid)) { const { formSetting: i = { primaryKey: "id" }, widgetSetting: r = {}, widgetContainerSetting: o = {} } = (n == null ? void 0 : n.editableByJsSetting) || {}; - return g(P.Popover, { widget: ua, widgetData: { record: t, column: n }, widgetSetting: { widgetSetting: r, formSetting: i }, widgetContainerProps: { title: n != null && n.title ? `${n.title} - 编辑` : "编辑", ...o, width: (o == null ? void 0 : o.width) || 260, arrow: !0 }, children: g("td", { className: R("ff-data-list-cell-editable", e), ...a }) }); + return u(v.Popover, { widget: ua, widgetData: { record: t, column: n }, widgetSetting: { widgetSetting: r, formSetting: i }, widgetContainerProps: { title: n != null && n.title ? `${n.title} - 编辑` : "编辑", ...o, width: (o == null ? void 0 : o.width) || 260, arrow: !0 }, children: u("td", { className: R("ff-data-list-cell-editable", e), ...a }) }); } - return g("td", { className: e, ...a }); + return u("td", { className: e, ...a }); }, ua = ({ record: e, column: t, $close: n, $setting: a }) => { - const i = K(la(m.get(e, t == null ? void 0 : t.dataIndex))), { listCode: r, onClickCallback: o } = ie(ee), [s] = Z.useForm(), { formSetting: l, widgetSetting: p } = a, c = (l == null ? void 0 : l.primaryKey) || "id", d = () => { - s.setFieldsValue({ value: m.get(e, t == null ? void 0 : t.dataIndex), __PROPS__: e }); + const i = K(la(p.get(e, t == null ? void 0 : t.dataIndex))), { listCode: r, onClickCallback: o } = ie(ee), [s] = Z.useForm(), { formSetting: l, widgetSetting: g } = a, c = (l == null ? void 0 : l.primaryKey) || "id", d = () => { + s.setFieldsValue({ value: p.get(e, t == null ? void 0 : t.dataIndex), __PROPS__: e }); }; - return Je(() => d(), [e, t == null ? void 0 : t.dataIndex, r]), g(J, { actions: O(S.Fragment, { children: [g(P, { size: "small", onClick: d, children: "重置" }), O(Dn.Compact, { block: !0, children: [g(P, { size: "small", widget: n, children: "取消" }), g(P, { type: "primary", size: "small", widget: () => s.validateFields().then(({ value: h }) => { - const f = m.get(e, c.substring(c.indexOf(".") + 1)); - if (!f) throw "获取更新主键失败!"; - L.put(`/api/${r}-storeBy-${t == null ? void 0 : t.uuid}/${f}`, { value: h }).msg(() => o(2, e)).then(n); - }).catch(console.warn), children: "保存" })] })] }), children: O(Z, { form: s, children: [g(Lt, { label: "", type: i.current, code: "value", widget: t == null ? void 0 : t.editableByJs, extras: p }), g(Ft, { noStyle: !0, name: ["__PROPS__"], children: () => { + return Je(() => d(), [e, t == null ? void 0 : t.dataIndex, r]), u(J, { actions: O(S.Fragment, { children: [u(v, { size: "small", onClick: d, children: "重置" }), O(Dn.Compact, { block: !0, children: [u(v, { size: "small", widget: n, children: "取消" }), u(v, { type: "primary", size: "small", widget: () => s.validateFields().then(({ value: h }) => { + const m = p.get(e, c.substring(c.indexOf(".") + 1)); + if (!m) throw "获取更新主键失败!"; + L.put(`/api/${r}-storeBy-${t == null ? void 0 : t.uuid}/${m}`, { value: h }).msg(() => o(2, e)).then(n); + }).catch(console.warn), children: "保存" })] })] }), children: O(Z, { form: s, children: [u(At, { label: "", type: i.current, code: "value", widget: t == null ? void 0 : t.editableByJs, extras: g }), u(Ft, { noStyle: !0, name: ["__PROPS__"], children: () => { } })] }) }); }, ga = (e) => function(t) { return e(t, getRecord()); }, pa = (e, t = {}) => W(() => e == null ? void 0 : e.map(({ widgetByJs: n, widgetByJsSetting: a, ...i }, r) => { const o = (l) => ({ record: l, column: i }); let s = []; - return n && s.push([n, a]), s.length > 0 ? (i != null && i.render && s.push([ga, i.render]), { ...i, onCell: o, render: (l, p) => new at(s).toRender(l, p, "-") }) : { ...i, onCell: o }; + return n && s.push([n, a]), s.length > 0 ? (i != null && i.render && s.push([ga, i.render]), { ...i, onCell: o, render: (l, g) => new at(s).toRender(l, g, "-") }) : { ...i, onCell: o }; }), [e, t]), ma = (e = {}) => W(() => { var t; - return e.body ?? (e.body = { cell: _t }), (t = e.body).cell ?? (t.cell = _t), e; + return e.body ?? (e.body = { cell: Kt }), (t = e.body).cell ?? (t.cell = Kt), e; }, [e]), Fi = (e) => { const [t, n] = A({}); return V(() => { let a = !1; - return e && L.get(`/api/_/${e}`).then((i) => m.pick(i, ["uuid", "name", "code", "resource", "marginX", "marginY", "cols", "rowHeight", "primaryKey", "columns", "itemOperations", "batchOperations", "isConditionFormLayout", "layout", "tabs", "pageSize", "layoutConfig"])).then((i) => !a && n(i)), () => a = !0; + return e && L.get(`/api/_/${e}`).then((i) => p.pick(i, ["uuid", "name", "code", "resource", "marginX", "marginY", "cols", "rowHeight", "primaryKey", "columns", "itemOperations", "batchOperations", "isConditionFormLayout", "layout", "tabs", "pageSize", "layoutConfig"])).then((i) => !a && n(i)), () => a = !0; }, [e]), t; }, Ei = (e, t = {}) => { const [n, a] = A({ dataSource: [] }); @@ -294,34 +294,34 @@ const ee = S.createContext({ listCode: "", classNames: {}, getBase62params: (e, let i = !1; return e && L.get(`/api/${e}/${L.encode({ page: 1, ...t })}`).then((r) => !i && a(r)), () => i = !0; }, [e, t]), n; -}, gn = (e = [], t = /* @__PURE__ */ new Map(), n = "id", a) => { - const i = G(a ? (r) => m.get(r, n, m.get(r, [a, n])) : (r) => m.get(r, n), [n, a]); +}, un = (e = [], t = /* @__PURE__ */ new Map(), n = "id", a) => { + const i = G(a ? (r) => p.get(r, n, p.get(r, [a, n])) : (r) => p.get(r, n), [n, a]); return G((r) => e == null ? void 0 : e.filter((o) => !o.uuid || !t.has(o.uuid) || t.get(o.uuid).some((s) => s == i(r))), [e, t, i]); }, St = (e = [], t = /* @__PURE__ */ new Map(), n = [], a = "id", i) => { - const r = G(i ? (o) => m.get(o, a, m.get(o, [i, a])) : (o) => m.get(o, a), [a, i]); + const r = G(i ? (o) => p.get(o, a, p.get(o, [i, a])) : (o) => p.get(o, a), [a, i]); return W(() => { - if (m.isEmpty(e) || !e.some(({ uuid: s }) => oa.check(s))) return !1; - if (m.isEmpty(t) || m.isEmpty(n)) return !0; + if (p.isEmpty(e) || !e.some(({ uuid: s }) => oa.check(s))) return !1; + if (p.isEmpty(t) || p.isEmpty(n)) return !0; const o = n.map((s) => r(s)); - return e.some(({ uuid: s }) => !s || !t.has(s) || t.get(s).some((l) => o.some((p) => p == l))); + return e.some(({ uuid: s }) => !s || !t.has(s) || t.get(s).some((l) => o.some((g) => g == l))); }, [e, n, t, r]); }, fa = (e, t, n = "id", a = null) => { const i = ct(), r = K(!1), o = K(e.dataSource), s = K(e.itemOperationsAccess); - return V(() => (o.current = e.dataSource, s.current = e.itemOperationsAccess, () => r.current = !1), [e.dataSource, e.itemOperationsAccess]), r.current && (e.dataSource = o.current, e.itemOperationsAccess = s.current), [e, (l = 0, p = null) => { + return V(() => (o.current = e.dataSource, s.current = e.itemOperationsAccess, () => r.current = !1), [e.dataSource, e.itemOperationsAccess]), r.current && (e.dataSource = o.current, e.itemOperationsAccess = s.current), [e, (l = 0, g = null) => { var c, d; if (r.current = !1, l === 1) return (c = e.onReload) == null ? void 0 : c.call(e); if (l === 2) { - const h = m.get(p, "__PARENT_ID__", ""), f = m.get(p, n, m.get(p, [a, n], "")), u = m.findIndex(o.current, ["__PARENT_ID__", h]), w = m.findIndex(u > -1 ? m.get(o.current, [u, "children"]) : o.current, [n, f]); - if (w === -1) return (d = e.onReload) == null ? void 0 : d.call(e); - Promise.all([L.get(`/api/${t}/detail/${f}`), L.post(`/api/${t}/list-operations-access`, { ids: f })]).then(([C, k]) => { - const v = m.get(o.current, u > -1 ? [u, "children", w, "children"] : [w, "children"]); - o.current = nn(o.current, u > -1 ? { [u]: { children: { $splice: [[w, 1, { ...C, children: v }]] } } } : { $splice: [[w, 1, { ...C, children: v }]] }); - const x = new Map(k); + const h = p.get(g, "__PARENT_ID__", ""), m = p.get(g, n, p.get(g, [a, n], "")), f = p.findIndex(o.current, ["__PARENT_ID__", h]), b = p.findIndex(f > -1 ? p.get(o.current, [f, "children"]) : o.current, [n, m]); + if (b === -1) return (d = e.onReload) == null ? void 0 : d.call(e); + Promise.all([L.get(`/api/${t}/detail/${m}`), L.post(`/api/${t}/list-operations-access`, { ids: m })]).then(([C, k]) => { + const x = p.get(o.current, f > -1 ? [f, "children", b, "children"] : [b, "children"]); + o.current = tn(o.current, f > -1 ? { [f]: { children: { $splice: [[b, 1, { ...C, children: x }]] } } } : { $splice: [[b, 1, { ...C, children: x }]] }); + const P = new Map(k); s.current.forEach((E, F) => { var B; - (B = x.get(F)) != null && B.some((M) => M == f) || s.current.set(F, E.filter((M) => M !== f)); - }), x.forEach((E, F) => { - s.current.has(F) ? s.current.set(F, m.uniq([...s.current.get(F) || [], ...E])) : s.current.set(F, E); + (B = P.get(F)) != null && B.some((M) => M == m) || s.current.set(F, E.filter((M) => M !== m)); + }), P.forEach((E, F) => { + s.current.has(F) ? s.current.set(F, p.uniq([...s.current.get(F) || [], ...E])) : s.current.set(F, E); }); }).then(() => { r.current = !0, i(); @@ -329,205 +329,205 @@ const ee = S.createContext({ listCode: "", classNames: {}, getBase62params: (e, } }]; }, ha = (e, t) => { - const n = ct(), a = K(t), i = K(/* @__PURE__ */ new Map()), r = K([]), o = m.throttle((l) => { - r.current = [], L.list(e, m.pick({ ...a.current, ...l }, ["tab", "page", "pageSize", "condition", "sider", "keyword"])).then(({ keyword: p, condition: c, total: d, tab: h, sider: f, page: u, pageSize: w, operationsAccess: C, dataSource: k }) => { - a.current = { tab: h, condition: c, sider: f, keyword: p, total: d, pageSize: w, page: k != null && k.length ? u : 1 }, r.current = k, i.current = new Map(C), n(); + const n = ct(), a = K(t), i = K(/* @__PURE__ */ new Map()), r = K([]), o = p.throttle((l) => { + r.current = [], L.list(e, p.pick({ ...a.current, ...l }, ["tab", "page", "pageSize", "condition", "sider", "keyword"])).then(({ keyword: g, condition: c, total: d, tab: h, sider: m, page: f, pageSize: b, operationsAccess: C, dataSource: k }) => { + a.current = { tab: h, condition: c, sider: m, keyword: g, total: d, pageSize: b, page: k != null && k.length ? f : 1 }, r.current = k, i.current = new Map(C), n(); }); }, 380, { leading: !1, trailing: !0 }); Je(() => { r.current = [], e && o(t); }, [e, t]); - const s = W(() => m.pick(a.current, ["total", "tab", "page", "pageSize", "condition", "sider", "keyword"]), [a.current]); - return Object.assign(s, { onTabChange: (l) => o({ tab: l, page: 1 }), onPageChange: (l, p) => o({ page: l, pageSize: p }), onPageSizeChange: (l) => o({ pageSize: l, page: 1 }), onConditionChange: (l, p) => o({ keyword: p, condition: nn(a.current.condition || {}, { $merge: l || {} }), page: 1 }), onSiderChange: (l) => o({ sider: l, page: 1 }), onKeywordChange: (l) => o({ keyword: l, page: 1 }), itemOperationsAccess: i.current, dataSource: r.current, onReload: o, payload: t == null ? void 0 : t.payload }); -}, ya = ({ listCode: e, className: t, layouts: n = {}, dataSource: a, isPaginate: i, isItemOperations: r, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: p, resource: c, primaryKey: d, title: h, itemGridLayout: f, $setting: u, tabs: w, isConditionFormLayout: C, isTreeSider: k, treeSiderConfig: v }) => { - const { classNames: x, onClickCallback: E } = ie(ee), F = m.pick(u, ["column", "colWidth", "beforeRender", "afterRender", "style"]), B = gn(l, p, d, c), M = G((I, T, z) => g(wa, { className: R("ff-data-list-framework-item", x.item), operations: r ? B(T) : [], data: c ? { [c]: T } : T, children: I, onClickCallback: E }), [c, d, r, E, l, p]); - return O("div", { className: R("ff-data-list-framework", t), children: [g(n.sider, { isTreeSider: k, ...v }), O("div", { className: R("ff-data-list-container", x == null ? void 0 : x.container), children: [g(n.filter, { isConditionFormLayout: C }), g(n.toolbar, { title: h, tabs: w }), g(Ea, { ...F, ...f, primaryKey: d, itemRender: M, dataSource: a }), g(n.footer, { isPaginate: i, isOperations: o, operations: s })] })] }); -}, wa = ({ className: e, operations: t, children: n, data: a, onClickCallback: i }) => O("div", { className: R("data-list-grid-layout-item-container", e), children: [n, !!(t != null && t.length) && g("div", { className: "data-list-grid-layout-item-actions", children: t.map((r) => g("span", { className: "data-list-grid-layout-item-action", children: g(P.Link, { uuid: r.uuid, type: r.type, name: r.name, widget: r.widget, widgetType: r.widgetType, widgetProps: r.widgetProps, widgetSetting: r.widgetSetting, widgetContainerProps: r.widgetContainerSetting, data: a, confirm: r.confirm, onAfterClick: (o) => o !== !1 && (i == null ? void 0 : i(r.isRefresh, a)) }, r.uuid || yt()) }, (r == null ? void 0 : r.uuid) || yt())) })] }), ba = ({ listCode: e, className: t, layouts: n = {}, dataSource: a, columns: i, isItemOperations: r, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: p, resource: c, primaryKey: d, title: h, tabs: f, isPaginate: u, isTreeSider: w, treeSiderConfig: C, isConditionFormLayout: k, ...v }) => { - const { classNames: x, onClickCallback: E } = ie(ee), F = gn(l, p, d, c), B = St(l, p, a, d, c); - return O("div", { className: R("ff-data-table-framework", t), children: [g(n.sider, { isTreeSider: w, ...C }), O("div", { className: R("ff-data-table-container", x == null ? void 0 : x.container), children: [g(n.filter, { isConditionFormLayout: k }), g(n.toolbar, { title: h, tabs: f }), g(Pa, { ...v, primaryKey: d, className: "ff-data-table-content", columns: i, dataSource: a, operationRender: B ? (M) => { + const s = W(() => p.pick(a.current, ["total", "tab", "page", "pageSize", "condition", "sider", "keyword"]), [a.current]); + return Object.assign(s, { onTabChange: (l) => o({ tab: l, page: 1 }), onPageChange: (l, g) => o({ page: l, pageSize: g }), onPageSizeChange: (l) => o({ pageSize: l, page: 1 }), onConditionChange: (l, g) => o({ keyword: g, condition: tn(a.current.condition || {}, { $merge: l || {} }), page: 1 }), onSiderChange: (l) => o({ sider: l, page: 1 }), onKeywordChange: (l) => o({ keyword: l, page: 1 }), itemOperationsAccess: i.current, dataSource: r.current, onReload: o, payload: t == null ? void 0 : t.payload }); +}, ya = ({ listCode: e, className: t, layouts: n = {}, dataSource: a, isPaginate: i, isItemOperations: r, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: g, resource: c, primaryKey: d, title: h, itemGridLayout: m, $setting: f, tabs: b, isConditionFormLayout: C, isTreeSider: k, treeSiderConfig: x }) => { + const { classNames: P, onClickCallback: E } = ie(ee), F = p.pick(f, ["column", "colWidth", "beforeRender", "afterRender", "style"]), B = un(l, g, d, c), M = G((I, T, z) => u(wa, { className: R("ff-data-list-framework-item", P.item), operations: r ? B(T) : [], data: c ? { [c]: T } : T, children: I, onClickCallback: E }), [c, d, r, E, l, g]); + return O("div", { className: R("ff-data-list-framework", t), children: [u(n.sider, { isTreeSider: k, ...x }), O("div", { className: R("ff-data-list-container", P == null ? void 0 : P.container), children: [u(n.filter, { isConditionFormLayout: C }), u(n.toolbar, { title: h, tabs: b }), u(Ea, { ...F, ...m, primaryKey: d, itemRender: M, dataSource: a }), u(n.footer, { isPaginate: i, isOperations: o, operations: s })] })] }); +}, wa = ({ className: e, operations: t, children: n, data: a, onClickCallback: i }) => O("div", { className: R("data-list-grid-layout-item-container", e), children: [n, !!(t != null && t.length) && u("div", { className: "data-list-grid-layout-item-actions", children: t.map((r) => u("span", { className: "data-list-grid-layout-item-action", children: u(v.Link, { uuid: r.uuid, type: r.type, name: r.name, widget: r.widget, widgetType: r.widgetType, widgetProps: r.widgetProps, widgetSetting: r.widgetSetting, widgetContainerProps: r.widgetContainerSetting, data: a, confirm: r.confirm, onAfterClick: (o) => o !== !1 && (i == null ? void 0 : i(r.isRefresh, a)) }, r.uuid || yt()) }, (r == null ? void 0 : r.uuid) || yt())) })] }), ba = ({ listCode: e, className: t, layouts: n = {}, dataSource: a, columns: i, isItemOperations: r, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: g, resource: c, primaryKey: d, title: h, tabs: m, isPaginate: f, isTreeSider: b, treeSiderConfig: C, isConditionFormLayout: k, ...x }) => { + const { classNames: P, onClickCallback: E } = ie(ee), F = un(l, g, d, c), B = St(l, g, a, d, c); + return O("div", { className: R("ff-data-table-framework", t), children: [u(n.sider, { isTreeSider: b, ...C }), O("div", { className: R("ff-data-table-container", P == null ? void 0 : P.container), children: [u(n.filter, { isConditionFormLayout: k }), u(n.toolbar, { title: h, tabs: m }), u(va, { ...x, primaryKey: d, className: "ff-data-table-content", columns: i, dataSource: a, operationRender: B ? (M) => { var I; - return g("div", { className: "ff-data-table-actions", children: (I = F(M)) == null ? void 0 : I.map((T, z) => g(P.Link, { size: "small", uuid: T.uuid, type: T.type, name: T.name, widget: T.widget, widgetType: T.widgetType, widgetProps: T.widgetProps, widgetData: T.widgetData, widgetSetting: T.widgetSetting, widgetContainerProps: T.widgetContainerSetting, data: M, confirm: T.confirm, onAfterClick: ($) => $ !== !1 && (E == null ? void 0 : E(T.isRefresh, M)) }, T.uuid || z)) }); - } : null }), g(n.footer, { isPaginate: u, isOperations: o, operations: s })] })] }); + return u("div", { className: "ff-data-table-actions", children: (I = F(M)) == null ? void 0 : I.map((T, z) => u(v.Link, { size: "small", uuid: T.uuid, type: T.type, name: T.name, widget: T.widget, widgetType: T.widgetType, widgetProps: T.widgetProps, widgetData: T.widgetData, widgetSetting: T.widgetSetting, widgetContainerProps: T.widgetContainerSetting, data: M, confirm: T.confirm, onAfterClick: ($) => $ !== !1 && (E == null ? void 0 : E(T.isRefresh, M)) }, T.uuid || z)) }); + } : null }), u(n.footer, { isPaginate: f, isOperations: o, operations: s })] })] }); }, Ot = (e, t, n = null) => { var a; - return (a = m.sortBy(e, ["y", "x"])) == null ? void 0 : a.map(({ i, x: r, y: o, w: s, h: l, field: { boxStyle: p, ...c } }, d) => g("div", { className: "grid-layout-item", style: pn(r, o, s, l, p), children: g(t, { ...c, basicForm: n }) }, i ?? d)); -}, pn = (e, t, n, a, i = {}, r = 0) => { + return (a = p.sortBy(e, ["y", "x"])) == null ? void 0 : a.map(({ i, x: r, y: o, w: s, h: l, field: { boxStyle: g, ...c } }, d) => u("div", { className: "grid-layout-item", style: gn(r, o, s, l, g), children: u(t, { ...c, basicForm: n }) }, i ?? d)); +}, gn = (e, t, n, a, i = {}, r = 0) => { const o = { "--grid-layout-h": `${a}`, "--grid-layout-w": `${n}`, "--grid-layout-x": `${e}`, "--grid-layout-y": `${t}`, "--grid-layout-row-height-offset": "0px" }; - return i != null && i.autoHeight ? o.height = "fit-content" : o["--grid-layout-row"] = `${a}`, i != null && i.alignItems && (o["--grid-layout-box-align-items"] = i.alignItems), i != null && i.justifyContent && (o["--grid-layout-box-justify-content"] = i.justifyContent), o["--grid-layout-box-margin"] = Ht(i == null ? void 0 : i.marginTop, i == null ? void 0 : i.marginRight, i == null ? void 0 : i.marginBottom, i == null ? void 0 : i.marginLeft), o["--grid-layout-box-padding"] = Ht(i == null ? void 0 : i.paddingTop, i == null ? void 0 : i.paddingRight, i == null ? void 0 : i.paddingBottom, i == null ? void 0 : i.paddingLeft), r && (o.height = `${r}px`), o; -}, Ht = (e, t, n, a) => `${e || 0}px ${t || 0}px ${n || 0}px ${a || 0}px`, Oi = (e = "Text", t = "@pkg/ff/grid-layouts") => e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`, mn = ({ className: e, isConditionFormLayout: t }) => { - var h, f; - const [n, a] = A({}), { listCode: i, onKeywordChange: r, onConditionChange: o, getBase62params: s, classNames: l } = S.useContext(ee), { keyword: p, condition: c } = (s == null ? void 0 : s()) || {}, [d] = et.useForm(); + return i != null && i.autoHeight ? o.height = "fit-content" : o["--grid-layout-row"] = `${a}`, i != null && i.alignItems && (o["--grid-layout-box-align-items"] = i.alignItems), i != null && i.justifyContent && (o["--grid-layout-box-justify-content"] = i.justifyContent), o["--grid-layout-box-margin"] = _t(i == null ? void 0 : i.marginTop, i == null ? void 0 : i.marginRight, i == null ? void 0 : i.marginBottom, i == null ? void 0 : i.marginLeft), o["--grid-layout-box-padding"] = _t(i == null ? void 0 : i.paddingTop, i == null ? void 0 : i.paddingRight, i == null ? void 0 : i.paddingBottom, i == null ? void 0 : i.paddingLeft), r && (o.height = `${r}px`), o; +}, _t = (e, t, n, a) => `${e || 0}px ${t || 0}px ${n || 0}px ${a || 0}px`, Oi = (e = "Text", t = "@pkg/ff/grid-layouts") => e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`, pn = ({ className: e, isConditionFormLayout: t }) => { + var h, m; + const [n, a] = A({}), { listCode: i, onKeywordChange: r, onConditionChange: o, getBase62params: s, classNames: l } = S.useContext(ee), { keyword: g, condition: c } = (s == null ? void 0 : s()) || {}, [d] = et.useForm(); return V(() => { - i && t && L.get(`/api/_/${i}/list-condition-form-layout`).then(({ resource: u, marginX: w, marginY: C, rowHeight: k, cols: v, fields: x }) => { - a({ resource: u, itemMargin: [w, C], rowHeight: k, cols: v, fields: x }); + i && t && L.get(`/api/_/${i}/list-condition-form-layout`).then(({ resource: f, marginX: b, marginY: C, rowHeight: k, cols: x, fields: P }) => { + a({ resource: f, itemMargin: [b, C], rowHeight: k, cols: x, fields: P }); }).catch(() => a({})); }, [i, t]), V(() => { - d.setFieldsValue({ keyword: p, ...c }); - }, [JSON.stringify([p, c])]), g("div", { className: R("ff-data-list-filter", l.filter, e), children: g(et, { form: d, layout: "vertical", autoComplete: "off", onFinish: ((h = n.fields) == null ? void 0 : h.length) > 1 ? (u) => o({ [n.resource]: u[n.resource] }, u.keyword) : () => { - }, onValuesChange: (u) => { - m.isEmpty(m.omit(u, ["keyword"])) || d.submit(); - }, children: ((f = n.fields) == null ? void 0 : f.length) > 1 ? g(Vt, { ...n, children: g(Ca, { onReset: () => { - const { keyword: u, condition: w } = s("init") || {}; - d.setFieldsValue({ keyword: u, ...w }); - } }) }) : g("div", { className: "ff-data-list-filter-default-form ff-grid-layout-form", children: g("div", { className: "grid-layout-item", style: pn(20, 0, 5, 2), children: g(et.Item, { name: ["keyword"], children: g(Un.Search, { allowClear: !0, enterButton: "搜索", placeholder: "多关键字 | 分割", onSearch: (u) => r(u) }) }) }) }) }) }); + d.setFieldsValue({ keyword: g, ...c }); + }, [JSON.stringify([g, c])]), u("div", { className: R("ff-data-list-filter", l.filter, e), children: u(et, { form: d, layout: "vertical", autoComplete: "off", onFinish: ((h = n.fields) == null ? void 0 : h.length) > 1 ? (f) => o({ [n.resource]: f[n.resource] }, f.keyword) : () => { + }, onValuesChange: (f) => { + p.isEmpty(p.omit(f, ["keyword"])) || d.submit(); + }, children: ((m = n.fields) == null ? void 0 : m.length) > 1 ? u(Lt, { ...n, children: u(Ca, { onReset: () => { + const { keyword: f, condition: b } = s("init") || {}; + d.setFieldsValue({ keyword: f, ...b }); + } }) }) : u("div", { className: "ff-data-list-filter-default-form ff-grid-layout-form", children: u("div", { className: "grid-layout-item", style: gn(20, 0, 5, 2), children: u(et.Item, { name: ["keyword"], children: u(Un.Search, { allowClear: !0, enterButton: "搜索", placeholder: "多关键字 | 分割", onSearch: (f) => r(f) }) }) }) }) }) }); }, Ca = ({ cols: e, fields: t, onReset: n }) => { const [a, i] = A(!1), r = W(() => t == null ? void 0 : t.toReversed().some((o) => o.y > 1 || o.x + o.w >= e - 5), [e, t]); - return O(et.Item, { label: " ", style: { "--item-span": 5 }, className: R("ff-data-list-filter-actions", { expanded: a }), children: [g(nt, { onClick: n, children: "重置" }), g(nt, { type: "primary", htmlType: "submit", children: "查询" }), r && g(P.Link, { className: "ff-data-list-filter-expanded-button", widget: () => i((o) => !o), type: "primary", name: a ? "关闭" : "展开", icon: a ? "icon-up" : "icon-down", iconPosition: "end" })] }); + return O(et.Item, { label: " ", style: { "--item-span": 5 }, className: R("ff-data-list-filter-actions", { expanded: a }), children: [u(nt, { onClick: n, children: "重置" }), u(nt, { type: "primary", htmlType: "submit", children: "查询" }), r && u(v.Link, { className: "ff-data-list-filter-expanded-button", widget: () => i((o) => !o), type: "primary", name: a ? "关闭" : "展开", icon: a ? "icon-up" : "icon-down", iconPosition: "end" })] }); }; -mn.reservedFields = [{ x: 0, y: 0, h: 3, w: 5, field: { isVirtual: !0, widgetPrefix: "@pkg/ff/grid-layout-forms", widget: "Input", code: "keyword", label: "关键字", placeholder: "多关键字 | 分割", extras: { prefix: "icon-search" } } }]; +pn.reservedFields = [{ x: 0, y: 0, h: 3, w: 5, field: { isVirtual: !0, widgetPrefix: "@pkg/ff/grid-layout-forms", widget: "Input", code: "keyword", label: "关键字", placeholder: "多关键字 | 分割", extras: { prefix: "icon-search" } } }]; const ka = ({ className: e, operations: t, isOperations: n, isPaginate: a }) => { - const { onPageChange: i, onPageSizeChange: r, onClickCallback: o, getBase62params: s } = S.useContext(ee), { total: l, page: p, pageSize: c } = (s == null ? void 0 : s()) || {}; - return n && !m.isEmpty(t) || a ? O("div", { className: R("ff-data-list-footer", e), children: [g("div", { className: "ff-data-list-actions", children: t == null ? void 0 : t.map((d, h) => g(P, { uuid: d.uuid, type: d.type, name: d.name, widget: d.widget, widgetType: d.widgetType, widgetProps: d.widgetProps, widgetData: d.widgetData, widgetSetting: d.widgetSetting, widgetContainerProps: d.widgetContainerSetting, onAfterClick: (f) => f !== !1 && (o == null ? void 0 : o(d.isRefresh, null)) }, d.uuid || h)) }), a && g(qn, { size: "small", total: l, pageSize: c, showSizeChanger: !1, showTotal: (d) => `第 ${p} 页 / 总共 ${d} 条`, onChange: i, onShowSizeChange: r })] }) : null; -}, Sa = [{ title: "parent 1", key: "0-0", children: [{ title: "parent 1-0", key: "0-0-0", disabled: !0, children: [{ title: "leaf", key: "0-0-0-0", disableCheckbox: !0 }, { title: "leaf", key: "0-0-0-1" }] }, { title: "parent 1-1", key: "0-0-1", children: [{ title: g("span", { style: { color: "#1677ff" }, children: "sss" }), key: "0-0-1-0" }] }] }], va = ({ className: e, width: t = 280, isTreeSider: n }) => { + const { onPageChange: i, onPageSizeChange: r, onClickCallback: o, getBase62params: s } = S.useContext(ee), { total: l, page: g, pageSize: c } = (s == null ? void 0 : s()) || {}; + return n && !p.isEmpty(t) || a ? O("div", { className: R("ff-data-list-footer", e), children: [u("div", { className: "ff-data-list-actions", children: t == null ? void 0 : t.map((d, h) => u(v, { uuid: d.uuid, type: d.type, name: d.name, widget: d.widget, widgetType: d.widgetType, widgetProps: d.widgetProps, widgetData: d.widgetData, widgetSetting: d.widgetSetting, widgetContainerProps: d.widgetContainerSetting, onAfterClick: (m) => m !== !1 && (o == null ? void 0 : o(d.isRefresh, null)) }, d.uuid || h)) }), a && u(qn, { size: "small", total: l, pageSize: c, showSizeChanger: !1, showTotal: (d) => `第 ${g} 页 / 总共 ${d} 条`, onChange: i, onShowSizeChange: r })] }) : null; +}, Sa = [{ title: "parent 1", key: "0-0", children: [{ title: "parent 1-0", key: "0-0-0", disabled: !0, children: [{ title: "leaf", key: "0-0-0-0", disableCheckbox: !0 }, { title: "leaf", key: "0-0-0-1" }] }, { title: "parent 1-1", key: "0-0-1", children: [{ title: u("span", { style: { color: "#1677ff" }, children: "sss" }), key: "0-0-1-0" }] }] }], xa = ({ className: e, width: t = 280, isTreeSider: n }) => { const { classNames: a } = ie(ee); - return n ? g(Wn.DirectoryTree, { className: R("ff-data-list-sider", a.sider, e), style: { "--sider-width": t }, showLine: !0, showIcon: !1, treeData: Sa }) : null; -}, xa = ({ className: e, title: t, tabs: n }) => { - const { getBase62params: a, onTabChange: i, onReload: r, classNames: o } = ie(ee), { tab: s } = (a == null ? void 0 : a()) || {}, [l, p] = Xn((n == null ? void 0 : n[0].value) ?? (n == null ? void 0 : n[0].code), { value: s, onChange: i }); - return O("div", { className: R("ff-data-list-toolbar", o.toolbar, e), children: [g("div", { className: "ff-data-list-title", children: t }), g(Kn, { className: "ff-data-list-tabs", itemRender: ({ label: c, code: d, value: h }) => g("span", { onClick: () => p(h ?? d), className: R("ff-data-list-tab", { active: (h ?? d) == l }), children: c }), items: n }), O("div", { className: "ff-data-list-actions", children: [g(P.Link, { icon: "icon-reload", widget: () => r() }), g(P.Link, { icon: "icon-setting" })] })] }); -}, fn = ({ isItemGridLayout: e, theme: t, themeProps: n, onClickCallback: a, onReload: i, listCode: r, total: o = 0, page: s = 0, onPageChange: l, pageSize: p = 30, onPageSizeChange: c, tab: d, onTabChange: h, keyword: f, onKeywordChange: u, condition: w, onConditionChange: C, sider: k, onSiderChange: v, layouts: x, classNames: E = {}, payload: F = {}, ...B }) => { + return n ? u(Wn.DirectoryTree, { className: R("ff-data-list-sider", a.sider, e), style: { "--sider-width": t }, showLine: !0, showIcon: !1, treeData: Sa }) : null; +}, Pa = ({ className: e, title: t, tabs: n }) => { + const { getBase62params: a, onTabChange: i, onReload: r, classNames: o } = ie(ee), { tab: s } = (a == null ? void 0 : a()) || {}, [l, g] = Xn((n == null ? void 0 : n[0].value) ?? (n == null ? void 0 : n[0].code), { value: s, onChange: i }); + return O("div", { className: R("ff-data-list-toolbar", o.toolbar, e), children: [u("div", { className: "ff-data-list-title", children: t }), u(Kn, { className: "ff-data-list-tabs", itemRender: ({ label: c, code: d, value: h }) => u("span", { onClick: () => g(h ?? d), className: R("ff-data-list-tab", { active: (h ?? d) == l }), children: c }), items: n }), O("div", { className: "ff-data-list-actions", children: [u(v.Link, { icon: "icon-reload", widget: () => r() }), u(v.Link, { icon: "icon-setting" })] })] }); +}, mn = ({ isItemGridLayout: e, theme: t, themeProps: n, onClickCallback: a, onReload: i, listCode: r, total: o = 0, page: s = 0, onPageChange: l, pageSize: g = 30, onPageSizeChange: c, tab: d, onTabChange: h, keyword: m, onKeywordChange: f, condition: b, onConditionChange: C, sider: k, onSiderChange: x, layouts: P, classNames: E = {}, payload: F = {}, ...B }) => { const [M, I] = A(), T = G(($, _) => { - const D = { tab: d, page: s, pageSize: p, keyword: f, sider: k, condition: w, total: o, payload: F }; - return $ && $ != "init" ? m.get(D, $, _) : D; - }, [JSON.stringify(w), JSON.stringify(F), d, s, p, f, k, o]), z = W(() => { - let $ = { sider: va, filter: mn, footer: ka, toolbar: xa }; - x === !1 ? $ = { sider: null, filter: null, footer: null, toolbar: null } : m.isPlainObject(x) && ($ = Object.assign({}, $, x)); + const D = { tab: d, page: s, pageSize: g, keyword: m, sider: k, condition: b, total: o, payload: F }; + return $ && $ != "init" ? p.get(D, $, _) : D; + }, [JSON.stringify(b), JSON.stringify(F), d, s, g, m, k, o]), z = W(() => { + let $ = { sider: xa, filter: pn, footer: ka, toolbar: Pa }; + P === !1 ? $ = { sider: null, filter: null, footer: null, toolbar: null } : p.isPlainObject(P) && ($ = Object.assign({}, $, P)); for (const _ in $) if ($[_]) { if (In($[_])) { const D = $[_]; $[_] = (pe) => S.cloneElement(D, pe); } - } else $[_] = () => g(S.Fragment, {}); + } else $[_] = () => u(S.Fragment, {}); return $; - }, [x]); + }, [P]); return V(() => { t ? ae.getWidgetComponent(t).then(($) => { if (!$) throw `${t} not found`; return $; - }).catch(($) => ({ default: () => `${$}` })).then(($) => I(S.createElement($.default, { ...B, layouts: z, $setting: n }))) : I(g(e ? ya : ba, { ...B, layouts: z, $setting: n })); - }, [t, n]), g(ee.Provider, { value: { classNames: E, listCode: r, onClickCallback: a, onReload: i, getBase62params: T, onPageChange: l, onPageSizeChange: c, onTabChange: h, onSiderChange: v, onKeywordChange: u, onConditionChange: C, setPage: l, setPageSize: c, setTab: h, setSider: v, setKeyword: u, setCondition: C }, children: M && S.cloneElement(M, B) }); + }).catch(($) => ({ default: () => `${$}` })).then(($) => I(S.createElement($.default, { ...B, layouts: z, $setting: n }))) : I(u(e ? ya : ba, { ...B, layouts: z, $setting: n })); + }, [t, n]), u(ee.Provider, { value: { classNames: E, listCode: r, onClickCallback: a, onReload: i, getBase62params: T, onPageChange: l, onPageSizeChange: c, onTabChange: h, onSiderChange: x, onKeywordChange: f, onConditionChange: C, setPage: l, setPageSize: c, setTab: h, setSider: x, setKeyword: f, setCondition: C }, children: M && S.cloneElement(M, B) }); }; -fn.propTypes = { classNames: b.exact({ sider: b.string, filter: b.string, footer: b.string, toolbar: b.string, container: b.string, content: b.string, item: b.string }), layouts: b.oneOfType([b.exact({ sider: b.oneOfType([b.elementType, b.element]), filter: b.oneOfType([b.elementType, b.element]), footer: b.oneOfType([b.elementType, b.element]), toolbar: b.oneOfType([b.elementType, b.element]) }), b.bool]) }; -var he, ge, Ne, st; +mn.propTypes = { classNames: w.exact({ sider: w.string, filter: w.string, footer: w.string, toolbar: w.string, container: w.string, content: w.string, item: w.string }), layouts: w.oneOfType([w.exact({ sider: w.oneOfType([w.elementType, w.element]), filter: w.oneOfType([w.elementType, w.element]), footer: w.oneOfType([w.elementType, w.element]), toolbar: w.oneOfType([w.elementType, w.element]) }), w.bool]) }; +var he, ue, Ne, st; const se = class se { constructor() { - j(this, ge, null); + j(this, ue, null); j(this, Ne, /* @__PURE__ */ new Map()); j(this, st, () => { - if (y(this, ge)) return y(this, ge).port.postMessage({ command: "status", data: [] }); - q(this, ge, new SharedWorker(new URL("/ff-worker/res-ws.js", self.location))), y(this, ge).port.onmessage = (t) => { + if (y(this, ue)) return y(this, ue).port.postMessage({ command: "status", data: [] }); + q(this, ue, new SharedWorker(new URL("/ff-worker/res-ws.js", self.location))), y(this, ue).port.onmessage = (t) => { var n, a; (n = t.data) != null && n.uuid ? y(this, Ne).forEach((i, r) => { var o; (i == "*" || (o = i == null ? void 0 : i.includes) != null && o.call(i, t.data.uuid)) && r(t.data); }) : ((a = t.data) == null ? void 0 : a.readyState) == WebSocket.CLOSED && L.get("/api/user-api-token").then(({ token: i, expire_at: r }) => { - y(this, ge).port.postMessage({ command: "initWs", data: [`ws${m.trimStart(L.appUrl, "http")}api/user-resource-status-ws?token=${i}`] }); + y(this, ue).port.postMessage({ command: "initWs", data: [`ws${p.trimStart(L.appUrl, "http")}api/user-resource-status-ws?token=${i}`] }); }); - }, y(this, ge).port.postMessage({ command: "status", data: [] }); + }, y(this, ue).port.postMessage({ command: "status", data: [] }); }); N(this, "subscribe", (t, n = []) => (n ? Array.isArray(n) && n.length == 0 ? n = "*" : Array.isArray(n) || (n = [n].flat()) : n = "*", y(this, Ne).set(t, n), y(this, Ne).size == 1 && y(this, st).call(this), () => this.unsubscribe(t))); N(this, "unsubscribe", (t) => y(this, Ne).delete(t)); if (y(se, he)) return y(se, he); } }; -he = new WeakMap(), ge = new WeakMap(), Ne = new WeakMap(), st = new WeakMap(), j(se, he, null), N(se, "getInstance", () => (y(se, he) || q(se, he, new se()), y(se, he))); -let vt = se; -const hn = vt.getInstance(), jt = S.forwardRef(({ listCode: e, base62params: t, className: n, theme: a, themeProps: i, layouts: r, classNames: o }, s) => { - const [{ resource: l, primaryKey: p, batchOperations: c = [], itemOperations: d = [], columns: h = [], themeConfig: f, theme: u, isConditionFormLayout: w = !1, isTreeSider: C, treeSiderConfig: k, isItemGridLayout: v, itemGridLayout: x, title: E, isPaginate: F, tabs: B }, M] = A({ isItemGridLayout: !1, itemGridLayout: {} }), I = ha(e, t), [{ dataSource: T, itemOperationsAccess: z, condition: $, tab: _, keyword: D, page: pe, total: Ye, pageSize: Xe, sider: ut, onConditionChange: Q, onTabChange: Pn, onKeywordChange: Nn, onPageChange: Tn, onPageSizeChange: $n, onSiderChange: Rn, onReload: gt, payload: Fn }, zt] = fa(I, e, p, l), En = St(d, z, T, p), On = St(c); +he = new WeakMap(), ue = new WeakMap(), Ne = new WeakMap(), st = new WeakMap(), j(se, he, null), N(se, "getInstance", () => (y(se, he) || q(se, he, new se()), y(se, he))); +let xt = se; +const fn = xt.getInstance(), jt = S.forwardRef(({ listCode: e, base62params: t, className: n, theme: a, themeProps: i, layouts: r, classNames: o }, s) => { + const [{ resource: l, primaryKey: g, batchOperations: c = [], itemOperations: d = [], columns: h = [], themeConfig: m, theme: f, isConditionFormLayout: b = !1, isTreeSider: C, treeSiderConfig: k, isItemGridLayout: x, itemGridLayout: P, title: E, isPaginate: F, tabs: B }, M] = A({ isItemGridLayout: !1, itemGridLayout: {} }), I = ha(e, t), [{ dataSource: T, itemOperationsAccess: z, condition: $, tab: _, keyword: D, page: pe, total: Ye, pageSize: Xe, sider: ut, onConditionChange: Q, onTabChange: vn, onKeywordChange: Nn, onPageChange: Tn, onPageSizeChange: $n, onSiderChange: Rn, onReload: gt, payload: Fn }, Mt] = fa(I, e, g, l), En = St(d, z, T, g), On = St(c); V(() => { let te = null; return e && L.get(`/api/_/${e}`).resp(({ data: Qe, res: An }) => { - Qe != null && Qe.isDynamicRefresh && (te = hn.subscribe(() => gt(), An)), M(Qe); + Qe != null && Qe.isDynamicRefresh && (te = fn.subscribe(() => gt(), An)), M(Qe); }).catch(() => M({})), () => te == null ? void 0 : te(); - }, [e]), S.useImperativeHandle(s, () => ({ onReload: gt, onClickCallback: zt })); - const jn = { listCode: e, title: E, classNames: o, layouts: r, resource: l, primaryKey: p, theme: a || u, themeProps: i || f, isTreeSider: C, treeSiderConfig: k, isPaginate: F, tabs: B, isItemOperations: En, itemOperations: d == null ? void 0 : d.map((te) => m.isEmpty(te == null ? void 0 : te.confirm) ? te : { ...te, confirm: Object.assign({}, te.confirm, { getPopupContainer: () => document.body }) }), isBatchOperations: On, batchOperations: c, isItemGridLayout: v, columns: h, itemGridLayout: x, isConditionFormLayout: w, itemOperationsAccess: z, dataSource: T, onConditionChange: Q, onTabChange: Pn, onKeywordChange: Nn, onPageChange: Tn, onPageSizeChange: $n, onSiderChange: Rn, condition: $, tab: _, keyword: D, page: pe, total: Ye, pageSize: Xe, sider: ut, payload: Fn }; - return g(fn, { ...jn, className: R("ff-data-list-helper", n), onReload: gt, onClickCallback: zt }); -}), yn = (e, t, n = !0) => n !== !0 && n-- <= 0 ? [] : m.isArray(e) && !m.isEmpty(e) ? e.reduce((a, i) => (Reflect.has(i, t) && Reflect.has(i, "children") && a.push(i[t]), Reflect.has(i, "children") && !m.isEmpty(i.children) ? a.concat(yn(i.children, t, n)) : a), []) : [], Pa = ({ className: e, primaryKey: t, columns: n = [], dataSource: a = [], operationRender: i, operationWidth: r = 180, components: o = {}, ...s }) => { - const { classNames: l } = ie(ee), p = K(null), c = K(null), [d, h] = A([]), [f, u] = A({ width: 0, height: 0 }); + }, [e]), S.useImperativeHandle(s, () => ({ onReload: gt, onClickCallback: Mt })); + const jn = { listCode: e, title: E, classNames: o, layouts: r, resource: l, primaryKey: g, theme: a || f, themeProps: i || m, isTreeSider: C, treeSiderConfig: k, isPaginate: F, tabs: B, isItemOperations: En, itemOperations: d == null ? void 0 : d.map((te) => p.isEmpty(te == null ? void 0 : te.confirm) ? te : { ...te, confirm: Object.assign({}, te.confirm, { getPopupContainer: () => document.body }) }), isBatchOperations: On, batchOperations: c, isItemGridLayout: x, columns: h, itemGridLayout: P, isConditionFormLayout: b, itemOperationsAccess: z, dataSource: T, onConditionChange: Q, onTabChange: vn, onKeywordChange: Nn, onPageChange: Tn, onPageSizeChange: $n, onSiderChange: Rn, condition: $, tab: _, keyword: D, page: pe, total: Ye, pageSize: Xe, sider: ut, payload: Fn }; + return u(mn, { ...jn, className: R("ff-data-list-helper", n), onReload: gt, onClickCallback: Mt }); +}), hn = (e, t, n = !0) => n !== !0 && n-- <= 0 ? [] : p.isArray(e) && !p.isEmpty(e) ? e.reduce((a, i) => (Reflect.has(i, t) && Reflect.has(i, "children") && a.push(i[t]), Reflect.has(i, "children") && !p.isEmpty(i.children) ? a.concat(hn(i.children, t, n)) : a), []) : [], va = ({ className: e, primaryKey: t, columns: n = [], dataSource: a = [], operationRender: i, operationWidth: r = 180, components: o = {}, ...s }) => { + const { classNames: l } = ie(ee), g = K(null), c = K(null), [d, h] = A([]), [m, f] = A({ width: 0, height: 0 }); V(() => { - h(yn(a, t)); + h(hn(a, t)); }, [a, t]), Mn(() => { const k = new ResizeObserver(() => { - var v; - u({ width: ((v = p.current) == null ? void 0 : v.nativeElement.querySelector(".ant-table-body").scrollWidth) || c.current.offsetWidth, height: c.current.offsetHeight }); + var x; + f({ width: ((x = g.current) == null ? void 0 : x.nativeElement.querySelector(".ant-table-body").scrollWidth) || c.current.offsetWidth, height: c.current.offsetHeight }); }); return c.current && k.observe(c.current), () => { c.current && k.unobserve(c.current); }; }, []); - const w = pa(n), C = ma(o); - return g("div", { ref: c, className: R("ff-data-list-table", l.content, e), children: f.height ? g(_n, { bordered: !0, ...s, components: C, ref: p, rowKey: (k) => (k == null ? void 0 : k[t]) ?? Math.random(), columns: w == null ? void 0 : w.concat(i ? [{ title: "操作", align: "center", fixed: "right", width: `${Math.ceil(r / f.width * 100).toFixed(2)}%`, render: (k, v, x) => i(v, x) }] : []), dataSource: a, size: "middle", scroll: { x: "max-content", y: f.height - 50 }, pagination: !1, expandable: { defaultExpandAllRows: !0, expandRowByClick: !0, onExpandedRowsChange: h, expandedRowKeys: d } }) : null }); + const b = pa(n), C = ma(o); + return u("div", { ref: c, className: R("ff-data-list-table", l.content, e), children: m.height ? u(_n, { bordered: !0, ...s, components: C, ref: g, rowKey: (k) => (k == null ? void 0 : k[t]) ?? Math.random(), columns: b == null ? void 0 : b.concat(i ? [{ title: "操作", align: "center", fixed: "right", width: `${Math.ceil(r / m.width * 100).toFixed(2)}%`, render: (k, x, P) => i(x, P) }] : []), dataSource: a, size: "middle", scroll: { x: "max-content", y: m.height - 50 }, pagination: !1, expandable: { defaultExpandAllRows: !0, expandRowByClick: !0, onExpandedRowsChange: h, expandedRowKeys: d } }) : null }); }, Na = "RC_FORM_INTERNAL_HOOKS", Ta = (e) => { const [t, n] = S.useState({ items: [] }); return V(() => { - e && L.get(`/api/_/${e}`).then(({ uuid: a, code: i, name: r, resource: o, primaryKey: s, marginX: l, marginY: p, cols: c, rowHeight: d, fields: h, theme: f, themeSetting: u }) => ({ uuid: a, code: i, name: r, resource: o, primaryKey: s, marginX: l, marginY: p, cols: c, rowHeight: d, theme: f, themeProps: u, items: h })).then(n); + e && L.get(`/api/_/${e}`).then(({ uuid: a, code: i, name: r, resource: o, primaryKey: s, marginX: l, marginY: g, cols: c, rowHeight: d, fields: h, theme: m, themeSetting: f }) => ({ uuid: a, code: i, name: r, resource: o, primaryKey: s, marginX: l, marginY: g, cols: c, rowHeight: d, theme: m, themeProps: f, items: h })).then(n); }, [e]), t; }, $a = (e, { initialValue: t, initialValueLanguage: n, convertJs: a, convertJsSetting: i, type: r = "string" }, o = null) => { - const s = K(!1), l = ie(tn), [p, c] = A(), [d, h] = A(n != "javascript" && e ? l.getFieldValue(e) : void 0), { registerWatch: f } = l.getInternalHooks(Na) || {}; - return V(() => f == null ? void 0 : f((u, w, C) => { + const s = K(!1), l = ie(en), [g, c] = A(), [d, h] = A(n != "javascript" && e ? l.getFieldValue(e) : void 0), { registerWatch: m } = l.getInternalHooks(Na) || {}; + return V(() => m == null ? void 0 : m((f, b, C) => { if (!s.current) return; - const k = m.get(w, e); - m.isEqual(k, d) || h(de(k, r)); + const k = p.get(b, e); + p.isEqual(k, d) || h(ge(k, r)); }), [d]), V(() => { - n == "javascript" && t ? ve.exec(t, {}, { getFieldValueForBasicForm: (u) => o ? o.getFieldValue(u) : l.getFieldValue(u), getFieldValue: (u) => l.getFieldValue(u) }).then((u) => h(de(u, r))).catch((u) => notification.error({ message: `布局数据错误: ${JSON.stringify(u)}` })).finally(() => s.current = !0) : (t && h(de(t ?? l.getFieldValue(e), r)), s.current = !0); + n == "javascript" && t ? xe.exec(t, {}, { getFieldValueForBasicForm: (f) => o ? o.getFieldValue(f) : l.getFieldValue(f), getFieldValue: (f) => l.getFieldValue(f) }).then((f) => h(ge(f, r))).catch((f) => notification.error({ message: `布局数据错误: ${JSON.stringify(f)}` })).finally(() => s.current = !0) : (t && h(ge(t ?? l.getFieldValue(e), r)), s.current = !0); }, [t, n]), He(() => { - s.current && a && new at([a, i]).toValue(d, l.getFieldsValue(!0)).then(c).catch((u) => { - c(u), console.error("布局数据转换错误: ", u, a); + s.current && a && new at([a, i]).toValue(d, l.getFieldsValue(!0)).then(c).catch((f) => { + c(f), console.error("布局数据转换错误: ", f, a); }); - }, [d, a, i]), [p ?? d, d]; -}, ji = (e, t, n = null) => W(() => Ot(e, t, n), [e]), At = (e, t, n = {}, a = {}, i = {}) => { - const r = ie(tn), o = ct(), s = K(!0), l = K([]), [p, c] = A(t), [d, h] = A(), f = Z.useWatch((u) => JSON.stringify(m.pick(u, l.current)), r) || "{}"; + }, [d, a, i]), [g ?? d, d]; +}, ji = (e, t, n = null) => W(() => Ot(e, t, n), [e]), yn = (e, t, n = {}, a = {}, i = {}) => { + const r = ie(en), o = ct(), s = K(!0), l = K([]), [g, c] = A(t), [d, h] = A(), m = Z.useWatch((f) => JSON.stringify(p.pick(f, l.current)), r) || "{}"; return Je(() => { - e && ve.exec(e, n, { ...a, getFieldValueForBasicForm: (u) => i ? i.getFieldValue(u) : null, getFieldValue: m.wrap(r.getFieldValue, (u, w) => (l.current.some((C) => m.isEqual(C, w)) || (l.current.push(w), o()), u == null ? void 0 : u(w))), isFieldTouched: r.isFieldTouched, isFieldsTouched: r.isFieldsTouched }).then((u) => { - s.current && (c(u), h(null)); - }).catch((u) => { - s.current && (c(t), h(u)); + e && xe.exec(e, n, { ...a, getFieldValueForBasicForm: (f) => i ? i.getFieldValue(f) : null, getFieldValue: p.wrap(r.getFieldValue, (f, b) => (l.current.some((C) => p.isEqual(C, b)) || (l.current.push(b), o()), f == null ? void 0 : f(b))), isFieldTouched: r.isFieldTouched, isFieldsTouched: r.isFieldsTouched }).then((f) => { + s.current && (c(f), h(null)); + }).catch((f) => { + s.current && (c(t), h(f)); }); - }, [e, f, r, n, a]), V(() => () => s.current = !1, []), e ? [p, d] : [t, null]; + }, [e, m, r, n, a]), V(() => () => s.current = !1, []), e ? [g, d] : [t, null]; }, Ra = ({ widget: e, widgetPrefix: t = "@pkg/ff/grid-layouts", basicForm: n, ...a }) => { const i = e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`, [r, o] = A(); return V(() => { i && ae.getWidgetComponent(i).then(({ defaultProps: s = {}, default: l }) => ({ default: Fa(l, s, n) })).catch((s) => ({ default: () => `${s}` })).then((s) => o(S.createElement(s.default, a))); }, [i]), r; }, Fa = (e, t = {}, n = null) => (a) => { - const { code: i, label: r, extras: o, isVirtual: s, initialValue: l, initialValueLanguage: p, convertJs: c, convertJsSetting: d, value: h, ...f } = m.merge({}, t, a), [u, w] = $a(s ? null : i, { initialValue: l, initialValueLanguage: p, convertJs: c, convertJsSetting: d, type: (f == null ? void 0 : f.type) || "string" }, n), C = W(() => { - const x = Object.keys((t == null ? void 0 : t.extras) || {}); - return m.over([m.partialRight(m.pick, x), m.partialRight(m.omit, x)]); - }, [t == null ? void 0 : t.extras]), [k, v] = C(f); - return g(e, { ...v, value: u, rawValue: w, $setting: Object.assign({}, o, k) }); -}, wn = ({ theme: e, basicForm: t, items: n = [{ key: "default", label: "默认" }], fields: a = [], itemRender: i, activeKeyFunc: r = "", chunks: o = [], widgetSetting: s = {}, children: l }) => { - const [p, c] = A(); + const { code: i, label: r, extras: o, isVirtual: s, initialValue: l, initialValueLanguage: g, convertJs: c, convertJsSetting: d, value: h, ...m } = p.merge({}, t, a), [f, b] = $a(s ? null : i, { initialValue: l, initialValueLanguage: g, convertJs: c, convertJsSetting: d, type: (m == null ? void 0 : m.type) || "string" }, n), C = W(() => { + const P = Object.keys((t == null ? void 0 : t.extras) || {}); + return p.over([p.partialRight(p.pick, P), p.partialRight(p.omit, P)]); + }, [t == null ? void 0 : t.extras]), [k, x] = C(m); + return u(e, { ...x, value: f, rawValue: b, $setting: Object.assign({}, o, k) }); +}, wn = ({ theme: e, items: t = [{ key: "default", label: "默认" }], fields: n = [], itemRender: a, chunks: i = [], widgetSetting: r = {}, children: o }) => { + const [s, l] = A(); V(() => { - e ? ae.getWidgetComponent(e).then((u) => { - if (!(u != null && u.default)) throw "not found"; - return u; - }).catch((u) => ({ default: () => `${e} ${u}` })).then((u) => c(S.createElement(u.default, {}))) : c(null); + e ? ae.getWidgetComponent(e).then((c) => { + if (!(c != null && c.default)) throw "not found"; + return c; + }).catch((c) => ({ default: () => `${e} ${c}` })).then((c) => l(S.createElement(c.default, {}))) : l(null); }, [e]); - const d = W(() => n == null ? void 0 : n.map((u) => ({ ...u, children: i(u, a == null ? void 0 : a.filter((w) => !(w != null && w.group) && u.key == "default" || w.group == u.key), u.key == "default" ? l : null) })).concat(o), [n, l, o]), [h, f] = At(r, d == null ? void 0 : d.map((u) => u.key), {}, {}, t); - return f && console.log(e, "activeKeyFunc", f), p && S.cloneElement(p, { activeKey: de(h, "array"), items: d, $setting: s }); -}, bn = ({ name: e, form: t = null, basicForm: n = null, style: a = {}, className: i, cols: r = 12, rowHeight: o = 21, containerPadding: s = [0, 0], itemMargin: l = [4, 0], formProps: p = {}, formFields: c = [], fields: d = [], data: h, theme: f, themeProps: u = {}, children: w, ...C }) => { - const [k] = Z.useForm(t), v = W(() => [{ name: "__PROPS__", value: p }].concat(c), [p, c]); + const g = W(() => t == null ? void 0 : t.map((c) => ({ ...c, children: a(c, n == null ? void 0 : n.filter((d) => !(d != null && d.group) && c.key == "default" || d.group == c.key), c.key == "default" ? o : null) })).concat(i), [t, o, i]); + return s && S.cloneElement(s, { items: g, basicForm, $setting: r }); +}, bn = ({ name: e, form: t = null, basicForm: n = null, style: a = {}, className: i, cols: r = 12, rowHeight: o = 21, containerPadding: s = [0, 0], itemMargin: l = [4, 0], formProps: g = {}, formFields: c = [], fields: d = [], data: h, theme: m, themeProps: f = {}, children: b, ...C }) => { + const [k] = Z.useForm(t), x = W(() => [{ name: "__PROPS__", value: g }].concat(c), [g, c]); He(() => (k.setFieldsValue(h), () => k.resetFields()), [h]); - const x = (E, F) => { + const P = (E, F) => { const B = Ot(E, Ra, n); return O("div", { className: R("ff-grid-layout", i), style: { ...a, "--grid-layout-item-margin-y": `${(l == null ? void 0 : l[0]) || 0}px`, "--grid-layout-item-margin-x": `${(l == null ? void 0 : l[1]) || 0}px`, "--grid-layout-container-padding-y": `${(s == null ? void 0 : s[0]) || 0}px`, "--grid-layout-container-padding-x": `${(s == null ? void 0 : s[1]) || 0}px`, "--grid-layout-cols": r, "--grid-layout-row-height": `${o}px` }, children: [B, F && S.cloneElement(F, { cols: r, rowHeight: o, itemMargin: l, containerPadding: s, fields: E, basicForm: n })] }); }; - return g(Z, { ...C, fields: v, form: k, component: !1, children: f ? g(wn, { ...u, theme: f, itemRender: x, fields: d, children: w }) : x(d, w) }); + return u(Z, { ...C, fields: x, form: k, component: !1, children: m ? u(wn, { ...f, theme: m, itemRender: P, fields: d, children: b }) : P(d, b) }); }, Ai = /* @__PURE__ */ ((e) => function({ code: t, data: n, ...a }) { - const { uuid: i, resource: r, items: o, hides: s, rowHeight: l, marginX: p, marginY: c, cols: d, theme: h, themeProps: f } = Ta(t), u = W(() => [{ name: "__RESOURCE__", value: r }, { name: "__LAYOUT_KEY__", value: t }, { name: "__LAYOUT_UUID__", value: i }], [t, i, r]); - return r && g(e, { name: t, theme: h, themeProps: f, ...a, fields: o, formFields: u, rowHeight: l, cols: d, itemMargin: [p, c], data: r ? { [r]: n } : n }); -})(bn), Ea = ({ column: e = 0, colWidth: t = 0, cols: n, rowHeight: a, itemMargin: i, fields: r, primaryKey: o, dataSource: s, itemClassName: l, beforeRender: p = null, afterRender: c = null, itemRender: d = (w, C, k) => w, empty: h = g(Hn, { description: null }), className: f, style: u = {} }) => { - const { classNames: w } = ie(ee), C = W(() => g(bn, { cols: n, rowHeight: a, itemMargin: i, fields: r, className: l }), [r, n, a, i]), k = m.isEmpty(s); - return O("div", { className: R("ff-data-list-content", w.content, f), style: Object.assign({}, u, e && { "--col-num": e }, t && { "--col-width": t }), children: [p == null ? void 0 : p(s), k ? h : s.map((v, x) => { - const E = d(S.cloneElement(C, { data: v }), v, x); - return S.cloneElement(E, { key: `${(v == null ? void 0 : v[o]) ?? x}-${ca(v)}` }); + const { uuid: i, resource: r, items: o, hides: s, rowHeight: l, marginX: g, marginY: c, cols: d, theme: h, themeProps: m } = Ta(t), f = W(() => [{ name: "__RESOURCE__", value: r }, { name: "__LAYOUT_KEY__", value: t }, { name: "__LAYOUT_UUID__", value: i }], [t, i, r]); + return r && u(e, { name: t, theme: h, themeProps: m, ...a, fields: o, formFields: f, rowHeight: l, cols: d, itemMargin: [g, c], data: r ? { [r]: n } : n }); +})(bn), Ea = ({ column: e = 0, colWidth: t = 0, cols: n, rowHeight: a, itemMargin: i, fields: r, primaryKey: o, dataSource: s, itemClassName: l, beforeRender: g = null, afterRender: c = null, itemRender: d = (b, C, k) => b, empty: h = u(Hn, { description: null }), className: m, style: f = {} }) => { + const { classNames: b } = ie(ee), C = W(() => u(bn, { cols: n, rowHeight: a, itemMargin: i, fields: r, className: l }), [r, n, a, i]), k = p.isEmpty(s); + return O("div", { className: R("ff-data-list-content", b.content, m), style: Object.assign({}, f, e && { "--col-num": e }, t && { "--col-width": t }), children: [g == null ? void 0 : g(s), k ? h : s.map((x, P) => { + const E = d(S.cloneElement(C, { data: x }), x, P); + return S.cloneElement(E, { key: `${(x == null ? void 0 : x[o]) ?? P}-${ca(x)}` }); }), c == null ? void 0 : c(s)] }); }, Oa = ({ component: e, $props: t }) => { const { base62params: n } = _e(t, {}); - return g(J, { children: g(jt, { listCode: e, base62params: L.decode(n) }) }); -}, Li = () => g(Cn, {}), Cn = () => "Empty", ja = ({ component: e, $setting: t, $props: n }) => { + return u(J, { children: u(jt, { listCode: e, base62params: L.decode(n) }) }); +}, Li = () => u(Cn, {}), Cn = () => "Empty", ja = ({ component: e, $setting: t, $props: n }) => { const [a, i] = A(); V(() => { - if (!e) return i(g(Cn, { description: null })); + if (!e) return i(u(Cn, { description: null })); ae.getWidgetComponent(e).catch((o) => ({ default: () => `${o}` })).then((o) => S.createElement(o.default, { $setting: t })).then(i); }, [e]); const r = _e(n, {}); @@ -544,12 +544,12 @@ const le = class le { }); N(this, "get", (t) => (y(this, ne).has(t) || (t = Array.from(y(this, ne).keys()).find((n) => y(this, ne).get(n).uri === t)), y(this, ne).get(t) || {})); N(this, "redirect", (t, n, a = {}) => { - const { uri: i, type: r, widgetProps: o } = this.get(t) || {}, { router: s, query: l, ...p } = n || {}, c = Object.assign({}, p, s), d = Object.assign({}, p, l); + const { uri: i, type: r, widgetProps: o } = this.get(t) || {}, { router: s, query: l, ...g } = n || {}, c = Object.assign({}, g, s), d = Object.assign({}, g, l); r == "list" && (c.base62params = L.encode(c != null && c.base62params ? c.base62params : c)); let h = Qn(i || t, c); - const f = new URLSearchParams(); - for (const u in o || {}) (o == null ? void 0 : o.type) == "query" && Object.has(d, u) && f.append(u, JSON.stringify(d[u])); - return f.size > 0 && (h = `${h}?${f.toString()}`), a != null && a.isOpenWindow ? window.open(h) : y(this, be).navigate(h, { replace: !!(a != null && a.isReplaceRouteHistory) }); + const m = new URLSearchParams(); + for (const f in o || {}) (o == null ? void 0 : o.type) == "query" && Object.has(d, f) && m.append(f, JSON.stringify(d[f])); + return m.size > 0 && (h = `${h}?${m.toString()}`), a != null && a.isOpenWindow ? window.open(h) : y(this, be).navigate(h, { replace: !!(a != null && a.isReplaceRouteHistory) }); }); N(this, "getMenus", (t) => { var n; @@ -562,10 +562,10 @@ const le = class le { }); N(this, "getMenusByRouteUuid", (t) => y(this, We).call(this, t, Object.values(y(this, we)).flat())); j(this, qe, (t, n, a = []) => { - if (m.isEmpty(t)) return a; + if (p.isEmpty(t)) return a; for (const { uuid: i, children: r } of t) { if (i == n) return a.concat(i); - if (!m.isEmpty(r)) return a.concat(i, y(this, qe).call(this, r, n)); + if (!p.isEmpty(r)) return a.concat(i, y(this, qe).call(this, r, n)); } return a; }); @@ -579,7 +579,7 @@ const le = class le { const { uuid: t } = this.getCurrentRoute() || {}; if (!t) return; const n = this.getMenusByRouteUuid(t); - return m.isEmpty(n) ? void 0 : n[0]; + return p.isEmpty(n) ? void 0 : n[0]; }); N(this, "getCurrentRoute", (t = 0) => { var a; @@ -591,35 +591,35 @@ const le = class le { N(this, "getPageParams", (t) => { var i, r, o; let n = "", a = {}; - if (an()) a = Zn(), n = (i = ea()) == null ? void 0 : i.search; + if (nn()) a = Zn(), n = (i = ea()) == null ? void 0 : i.search; else { const { location: s = {}, matches: l = [] } = ((r = y(this, be)) == null ? void 0 : r.state) || {}; a = ((o = l[l.length - 1]) == null ? void 0 : o.params) || {}, n = s.search; } return n && new URLSearchParams(n).forEach((s, l) => { a[l] = s; - }), t ? m.get(a, t) : a; + }), t ? p.get(a, t) : a; }); N(this, "createBrowserRouter", (t = {}) => { if (y(this, ne).size == 0) return null; - const n = Ie.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/ff/frameworks/DefaultTheme"), a = Ie.get(ae.checkUserToken() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"), i = { [n]: 0 }, r = (s, l) => () => Promise.all([ae.getWidgetComponent(s), _e(l)]).then(([p, c]) => [p.default || function() { + const n = Ie.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/ff/frameworks/DefaultTheme"), a = Ie.get(ae.checkUserToken() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"), i = { [n]: 0 }, r = (s, l) => () => Promise.all([ae.getWidgetComponent(s), _e(l)]).then(([g, c]) => [g.default || function() { return `${s}`; - }, c]).then(([p, c]) => ({ Component: () => S.createElement(on, {}, S.createElement(p, { $setting: c })) })), o = Array.from(y(this, ne).values()).reduce((s, { uuid: l, uri: p, name: c, type: d, component: h, widgetSetting: f, widgetProps: u, isLogin: w, isLayout: C, extra: k }) => { - let v = {}, x = 0; + }, c]).then(([g, c]) => ({ Component: () => S.createElement(rn, {}, S.createElement(g, { $setting: c })) })), o = Array.from(y(this, ne).values()).reduce((s, { uuid: l, uri: g, name: c, type: d, component: h, widgetSetting: m, widgetProps: f, isLogin: b, isLayout: C, extra: k }) => { + let x = {}, P = 0; switch (d) { case "list": - v.element = S.createElement(Oa, { component: h, $props: u }); + x.element = S.createElement(Oa, { component: h, $props: f }); break; case "fsdpf-component": - v.element = S.createElement(ja, { key: h, component: h, $setting: f, $props: u }); + x.element = S.createElement(ja, { key: h, component: h, $setting: m, $props: f }); } const E = (k == null ? void 0 : k.theme) ?? (k == null ? void 0 : k.layout); if (E) { const F = (k == null ? void 0 : k.themeProps) ?? (k == null ? void 0 : k.layoutProps); - if (!i[E]) return i[E] = s.length, [...s, { path: "/", lazy: r(E, F), children: [{ path: p, ...v }] }]; - x = i[E]; + if (!i[E]) return i[E] = s.length, [...s, { path: "/", lazy: r(E, F), children: [{ path: g, ...x }] }]; + P = i[E]; } - return C && x > -1 ? (s[x].children.push({ path: p, ...v }), s) : [...s, { path: p, ...v }]; + return C && P > -1 ? (s[P].children.push({ path: g, ...x }), s) : [...s, { path: g, ...x }]; }, [{ path: "/", lazy: r(n, {}), children: [] }]); return o.push({ index: !0, element: S.createElement(Aa, { to: a, replace: !0 }) }), q(this, be, ta(o, t)); }); @@ -627,39 +627,39 @@ const le = class le { } }; ye = new WeakMap(), ne = new WeakMap(), we = new WeakMap(), be = new WeakMap(), qe = new WeakMap(), We = new WeakMap(), j(le, ye, null), N(le, "getInstance", () => (y(le, ye) || q(le, ye, new le()), y(le, ye))); -let xt = le; -const Aa = ({ to: e, replace: t }) => an() ? S.createElement(na, { to: e, replace: t }) : (window.document.location = e, "redirect"), Se = xt.getInstance(), $e = new Worker(new URL("/ff-worker/index.js", self.location)), Jt = { getConfigure: (e) => Ie.get(e), route: { redirect: (...e) => Se.redirect(...e), getPageParams: (...e) => Se.getPageParams(...e), getCurrentRoute: () => Se.getCurrentRoute() }, popup: { notification: (...e) => X.notification(...e), success: (...e) => X.success(...e), error: (...e) => X.error(...e), form: (...e) => X.form(...e), modal: (...e) => X.modal(...e), confirm: (...e) => X.confirm(...e) } }; +let Pt = le; +const Aa = ({ to: e, replace: t }) => nn() ? S.createElement(na, { to: e, replace: t }) : (window.document.location = e, "redirect"), Se = Pt.getInstance(), $e = new Worker(new URL("/ff-worker/index.js", self.location)), Ht = { getConfigure: (e) => Ie.get(e), route: { redirect: (...e) => Se.redirect(...e), getPageParams: (...e) => Se.getPageParams(...e), getCurrentRoute: () => Se.getCurrentRoute() }, popup: { notification: (...e) => X.notification(...e), success: (...e) => X.success(...e), error: (...e) => X.error(...e), form: (...e) => X.form(...e), modal: (...e) => X.modal(...e), confirm: (...e) => X.confirm(...e) } }; var lt, Oe, Ce; const U = class U { constructor() { N(this, "exec", (t, n = {}, a = {}, i = "") => new Promise((r, o) => { if (!/^(?!\s*(\/\/|\/\*|\*)).*?\S+/m.test(t)) return r(); - const s = Ut(U, lt)._++; + const s = Dt(U, lt)._++; y(U, Oe).set(s, a), U.mQueue.set(s, [r, o]), $e.postMessage({ id: s, session: i, category: "eval", method: t, args: n }); })); N(this, "clear", (t) => $e.postMessage({ session: t, category: "clear" })); if (y(U, Ce)) return y(U, Ce); Promise.resolve().then(() => oi).then((t) => { - Jt.http = t.http; + Ht.http = t.http; }), $e.addEventListener("message", ({ data: { id: t, task_id: n, method: a, args: i, category: r, data: o, error: s, session: l } }) => { if (r === "eval" && U.mQueue.has(t)) s !== null ? U.mQueue.get(t)[1](s) : U.mQueue.get(t)[0](o), y(U, Oe).delete(t), U.mQueue.delete(t); else if (r === "util") try { - const p = m.get(Jt, a.split("/")) || m.get(y(U, Oe).get(n), a.split("/")); - if (!m.isFunction(p)) throw `${a} not found`; - Promise.resolve(Reflect.apply(p, void 0, i)).then((c) => { + const g = p.get(Ht, a.split("/")) || p.get(y(U, Oe).get(n), a.split("/")); + if (!p.isFunction(g)) throw `${a} not found`; + Promise.resolve(Reflect.apply(g, void 0, i)).then((c) => { $e.postMessage({ id: t, task_id: n, category: r, method: a, args: i, session: l, data: c, error: null }); }).catch((c) => { $e.postMessage({ id: t, task_id: n, category: r, method: a, args: i, session: l, data: null, error: c }); }); - } catch (p) { - $e.postMessage({ id: t, task_id: n, category: r, method: a, args: i, session: l, data: null, error: p }); + } catch (g) { + $e.postMessage({ id: t, task_id: n, category: r, method: a, args: i, session: l, data: null, error: g }); } }, !1); } }; lt = new WeakMap(), Oe = new WeakMap(), Ce = new WeakMap(), N(U, "mQueue", /* @__PURE__ */ new Map()), j(U, lt, 0), j(U, Oe, /* @__PURE__ */ new Map()), j(U, Ce, null), N(U, "getInstance", () => (y(U, Ce) || q(U, Ce, new U()), y(U, Ce))); -let Pt = U; -const ve = Pt.getInstance(), ct = () => { +let vt = U; +const xe = vt.getInstance(), ct = () => { const e = K(!0), [, t] = S.useReducer((n) => n + 1, 0); return V(() => () => e.current = !1, []), () => e.current && t(); }, Ii = (e) => { @@ -675,41 +675,41 @@ const ve = Pt.getInstance(), ct = () => { a.current && (a.current(t), a.current = null); }, [t]), [t, i]; }, He = (e = (a) => { -}, t, n = m.isEqual) => { +}, t, n = p.isEqual) => { const a = S.useRef(); - n(t, a.current) || (a.current = m.cloneDeep(t)), S.useEffect(e, [a.current]); + n(t, a.current) || (a.current = p.cloneDeep(t)), S.useEffect(e, [a.current]); }, Je = He, kn = (e, t = "string") => { var n; if (!Array.isArray(e)) return e; - for (let a = 0; a < e.length; a++) e[a].value = de((n = e[a]) == null ? void 0 : n.value, t), e[a] && Reflect.has(e[a], "children") && (e[a].children = kn(e[a].children, t)); + for (let a = 0; a < e.length; a++) e[a].value = ge((n = e[a]) == null ? void 0 : n.value, t), e[a] && Reflect.has(e[a], "children") && (e[a].children = kn(e[a].children, t)); return e; }, zi = (e, t = "json", n = "string", a, i = null) => { - const [r] = Z.useForm(a), [o, s] = A([{ label: "无", value: "", disabled: !0 }]), l = K([]), p = Z.useWatch((c) => l.current.length === 0 ? null : m.pick(c, l.current), r) || null; + const [r] = Z.useForm(a), [o, s] = A([{ label: "无", value: "", disabled: !0 }]), l = K([]), g = Z.useWatch((c) => l.current.length === 0 ? null : p.pick(c, l.current), r) || null; return V(() => { - Array.isArray(e) ? s(e) : t === "javascript" && e ? ve.exec(e, {}, { getFieldValue: (c) => (l.current.includes(c) || l.current.push(c), r.getFieldValue(c)), getFieldValueForBasicForm: (c) => (l.current.includes(c) || l.current.push(c), i ? i.getFieldValue(c) : r.getFieldValue(c)) }).then((c) => { - s(de(c, "array")); - }).catch((c) => console.error("useOptions", c)) : e && s(de(e, "array")); - }, [e, t, p]), kn(o, n); + Array.isArray(e) ? s(e) : t === "javascript" && e ? xe.exec(e, {}, { getFieldValue: (c) => (l.current.includes(c) || l.current.push(c), r.getFieldValue(c)), getFieldValueForBasicForm: (c) => (l.current.includes(c) || l.current.push(c), i ? i.getFieldValue(c) : r.getFieldValue(c)) }).then((c) => { + s(ge(c, "array")); + }).catch((c) => console.error("useOptions", c)) : e && s(ge(e, "array")); + }, [e, t, g]), kn(o, n); }, Bi = (e) => { const [t, n] = A(), a = { type: "GET" }; - if (typeof e == "string" ? a.url = e : m.isPlainObject(e) && Object.assign(a, e), !(a != null && a.url)) throw "url is required"; + if (typeof e == "string" ? a.url = e : p.isPlainObject(e) && Object.assign(a, e), !(a != null && a.url)) throw "url is required"; const i = (r) => L.request(a, !1).resp((o) => (console.log("useSubscribeRequest", r), n(o), o)); return He(() => { let r = null; return i().then((o) => { - r = hn.subscribe(m.throttle(i, 180, { leading: !1, trailing: !0 }), o.res); + r = fn.subscribe(p.throttle(i, 180, { leading: !1, trailing: !0 }), o.res); }), () => r == null ? void 0 : r(); }, a), t; }, La = (e) => { const [t, n] = S.useState({ items: [], hides: [] }); return S.useEffect(() => { - e && L.get(`/api/_/${e}`).then(({ pk: a, uuid: i, code: r, resource: o, align: s, cols: l, rowHeight: p, marginX: c, marginY: d, listenChangeFields: h, listenChangeFieldsFunc: f, fields: u, theme: w, themeSetting: C }) => ({ pk: a, uuid: i, code: r, resource: o, align: s, cols: l, rowHeight: p, marginX: c, marginY: d, theme: w, themeProps: C, listenChangeFields: h, listenChangeFieldsFunc: f, ...u.reduce((k, v) => { - var x; - return (x = v == null ? void 0 : v.field) != null && x.hidden ? k.hides.push(v == null ? void 0 : v.field) : k.items.push(v), k; + e && L.get(`/api/_/${e}`).then(({ pk: a, uuid: i, code: r, resource: o, align: s, cols: l, rowHeight: g, marginX: c, marginY: d, listenChangeFields: h, listenChangeFieldsFunc: m, fields: f, theme: b, themeSetting: C }) => ({ pk: a, uuid: i, code: r, resource: o, align: s, cols: l, rowHeight: g, marginX: c, marginY: d, theme: b, themeProps: C, listenChangeFields: h, listenChangeFieldsFunc: m, ...f.reduce((k, x) => { + var P; + return (P = x == null ? void 0 : x.field) != null && P.hidden ? k.hides.push(x == null ? void 0 : x.field) : k.items.push(x), k; }, { items: [], hides: [] }) })).then(n); }, [e]), t; }, Va = ({ max: e = 0, min: t = 0, type: n = "", message: a, pattern: i, required: r = !1, validator: o } = {}, s, l) => { - const [p, c] = A([]); + const [g, c] = A([]); return V(() => { const d = []; if (r) { @@ -735,230 +735,230 @@ const ve = Pt.getInstance(), ct = () => { d.push({ type: "string", pattern: i, message: a }); break; case "validator": - o && d.push(({ getFieldValue: h }) => ({ validator: async (f, u) => { - const w = await ve.exec(o, { value: u, fieldName: s }, { getFieldValue: h }); - return m.isString(w) && w ? Promise.reject(w) : m.isBoolean(w) && !w ? Promise.reject(a) : Promise.resolve(); + o && d.push(({ getFieldValue: h }) => ({ validator: async (m, f) => { + const b = await xe.exec(o, { value: f, fieldName: s }, { getFieldValue: h }); + return p.isString(b) && b ? Promise.reject(b) : p.isBoolean(b) && !b ? Promise.reject(a) : Promise.resolve(); } })); } c(d); - }, [e, t, n, a, i, r, o]), p; + }, [e, t, n, a, i, r, o]), g; }, Ia = (e, t, n) => { const [a, i] = A(null); return V(() => { const { initDataUri: r = `/api/${e}`, initDataMethod: o = "GET" } = n || {}; - t && L.request({ method: o, url: m.trimEnd(`${r}/${t}`, "/") }).then((s) => { + t && L.request({ method: o, url: p.trimEnd(`${r}/${t}`, "/") }).then((s) => { i(s); }); }, [e, t, n]), a; }, Ma = (e, t, n) => G((a, i = { serialize: (r) => r, onSuccess: () => { }, onFail: (r) => (r == null ? void 0 : r.errorFields) && X.error("请先完善表单信息", { duration: 2e3 }) }) => { const r = a.getFieldValue("__RESOURCE__"), { submitDataUri: o = `/api/${e}`, submitDataMethod: s = "POST" } = n || {}; - return a.validateFields().then((l) => r ? m.pick(l, [r]) : l).then(i.serialize).then((l) => L.request({ method: s, url: m.trimEnd(`${o}/${t || ""}`, "/"), data: l }).msg(i.onSuccess)).catch(i.onFail); + return a.validateFields().then((l) => r ? p.pick(l, [r]) : l).then(i.serialize).then((l) => L.request({ method: s, url: p.trimEnd(`${o}/${t || ""}`, "/"), data: l }).msg(i.onSuccess)).catch(i.onFail); }, [e, t, n]), za = (e, t, n, a) => { const i = Ia(t, n, a); V(() => { i ? e.setFieldsValue(i) : e.resetFields(); }, [e, i]); const r = Ma(t, n, a); - return m.partial(r, e); + return p.partial(r, e); }, Ba = (e, t, n = [], a = {}) => { - const i = K({}), r = K(), o = m.debounce(ct(), 180), s = ["disabled", "required"], l = (h, f) => { - s.includes(h) && (i.current[h] = f), o(); - }, p = W(() => ({ setDisabled: (h) => l("disabled", h), setRequired: (h) => l("required", h), getDisabled: () => i.current.disabled, getRequired: () => i.current.required }), [t]), [c, d] = At(t, -1, {}, p, a); - if (!d && r.current != c && (c >= 0 || !m.isEmpty(n == null ? void 0 : n[c]))) { + const i = K({}), r = K(), o = p.debounce(ct(), 180), s = ["disabled", "required"], l = (h, m) => { + s.includes(h) && (i.current[h] = m), o(); + }, g = W(() => ({ setDisabled: (h) => l("disabled", h), setRequired: (h) => l("required", h), getDisabled: () => i.current.disabled, getRequired: () => i.current.required }), [t]), [c, d] = yn(t, -1, {}, g, a); + if (!d && r.current != c && (c >= 0 || !p.isEmpty(n == null ? void 0 : n[c]))) { r.current = c; - const { widget: h, widgetPrefix: f, props: u } = n == null ? void 0 : n[c]; - e = ln(h, f), i.current = m.merge(u, m.pick(i.current, s)); + const { widget: h, widgetPrefix: m, props: f } = n == null ? void 0 : n[c]; + e = sn(h, m), i.current = p.merge(f, p.pick(i.current, s)); } return [e, i.current]; -}, Gt = (e) => e === void 0 || e === !1 ? "" : (Array.isArray(e) ? e : [e]).join("_"), Di = ({ value: e, onChange: t }, n = null) => { +}, Jt = (e) => e === void 0 || e === !1 ? "" : (Array.isArray(e) ? e : [e]).join("_"), Di = ({ value: e, onChange: t }, n = null) => { const a = K(), [i] = Z.useForm(n), r = K({}); return Je(() => { - m.isEqual(a.current, e) || i.setFieldsValue(e); + p.isEqual(a.current, e) || i.setFieldsValue(e); }, [e]), V(() => () => i.resetFields(), []), [W(() => i.__INTERNAL__ ? i : { ...i, __INTERNAL__: { itemRef: (o) => (s) => { - const l = Gt(o); + const l = Jt(o); s ? r.current[l] = s : delete r.current[l]; } }, scrollToField: (o, s = {}) => { console.warn("useMergedFormValuesChange scrollToField not work, unreferenced antd form"); }, focusField: (o) => { console.warn("useMergedFormValuesChange focusField not work, unreferenced antd form"); }, getFieldInstance: (o) => { - const s = Gt(o); + const s = Jt(o); return r.current[s]; } }, [i]), (o, s) => { a.current = s, t == null || t(s); }]; -}, Lt = ({ widget: e = "Input", widgetPrefix: t = "@pkg/ff/grid-layout-forms", widgetDecorator: n, subWidgets: a = [], basicForm: i, ...r }) => { - const o = ln(e, t), [s, l] = Ba(o, n, a, i), [p, c] = A(); +}, At = ({ widget: e = "Input", widgetPrefix: t = "@pkg/ff/grid-layout-forms", widgetDecorator: n, subWidgets: a = [], basicForm: i, ...r }) => { + const o = sn(e, t), [s, l] = Ba(o, n, a, i), [g, c] = A(); return V(() => { s && ae.getWidgetComponent(s).then(({ defaultProps: d = {}, default: h }) => ({ default: Da(h, d, i) })).catch((d) => ({ default: () => `${d}` })).then((d) => c(S.createElement(d.default, r))); - }, [s]), p && S.cloneElement(p, { ...r, ...l }); + }, [s]), g && S.cloneElement(g, { ...r, ...l }); }, Da = (e, t = {}, n = null) => (a) => { - const { type: i, code: r, label: o, noStyle: s, placeholder: l, required: p = !1, extras: c, validators: d, help: h, isVirtual: f, $isReserved: u, initialValue: w, initialValueLanguage: C, ...k } = m.omit(m.merge({}, t, a), ["convertJs", "convertJsSetting", "widget", "widgetPerfix", "widgetDecorator", "subWidgets", "boxStyle"]), v = Va(Object.assign({}, d, p ? { required: !0 } : {}), r, i), x = W(() => { + const { type: i, code: r, label: o, noStyle: s, placeholder: l, required: g = !1, extras: c, validators: d, help: h, isVirtual: m, $isReserved: f, initialValue: b, initialValueLanguage: C, ...k } = p.omit(p.merge({}, t, a), ["convertJs", "convertJsSetting", "widget", "widgetPerfix", "widgetDecorator", "subWidgets", "boxStyle"]), x = Va(Object.assign({}, d, g ? { required: !0 } : {}), r, i), P = W(() => { const I = Object.keys((t == null ? void 0 : t.extras) || {}); - return m.over([m.partialRight(m.pick, I), m.partialRight(m.omit, I)]); - }, [t == null ? void 0 : t.extras]), [E, F] = x(k), B = { label: o, noStyle: s, colon: !1, layout: "vertical" }, M = G((I) => I == null ? void 0 : de(I, i), [i]); - return g(Ft, { name: r, rules: v, initialValue: M(w), normalize: M, children: (I, T, z) => { + return p.over([p.partialRight(p.pick, I), p.partialRight(p.omit, I)]); + }, [t == null ? void 0 : t.extras]), [E, F] = P(k), B = { label: o, noStyle: s, colon: !1, layout: "vertical" }, M = G((I) => I == null ? void 0 : ge(I, i), [i]); + return u(Ft, { name: r, rules: x, initialValue: M(b), normalize: M, children: (I, T, z) => { var $; - return g(e, { type: i, rcform: z, basicForm: n, itemProps: { validateStatus: T.errors.length > 0 ? "error" : "success", tooltip: h || null, help: T.errors.length > 0 ? T.errors.join("、") : null, required: (($ = v == null ? void 0 : v[0]) == null ? void 0 : $.required) || !1, ...B }, fieldProps: { placeholder: l, ...F, ...I }, $setting: Object.assign({}, c, E) }); + return u(e, { type: i, rcform: z, basicForm: n, itemProps: { validateStatus: T.errors.length > 0 ? "error" : "success", tooltip: h || null, help: T.errors.length > 0 ? T.errors.join("、") : null, required: (($ = x == null ? void 0 : x[0]) == null ? void 0 : $.required) || !1, ...B }, fieldProps: { placeholder: l, ...F, ...I }, $setting: Object.assign({}, c, E) }); } }); -}, Vt = ({ name: e, form: t = null, basicForm: n = null, style: a = {}, className: i, cols: r = 24, rowHeight: o = 16, itemMargin: s = [8, 16], containerPadding: l = [0, 0], fields: p = [], hides: c = [], primaryKey: d = 0, formProps: h = {}, formFields: f = [], listenChangeFields: u, listenChangeFieldsFunc: w, onValuesChange: C, theme: k, themeProps: v = {}, children: x, ...E }) => { +}, Lt = ({ name: e, form: t = null, basicForm: n = null, style: a = {}, className: i, cols: r = 24, rowHeight: o = 16, itemMargin: s = [8, 16], containerPadding: l = [0, 0], fields: g = [], hides: c = [], primaryKey: d = 0, formProps: h = {}, formFields: m = [], listenChangeFields: f, listenChangeFieldsFunc: b, onValuesChange: C, theme: k, themeProps: x = {}, children: P, ...E }) => { const [F] = Z.useForm(t), B = G((T, z) => { - C == null || C(T, z), w && Array.isArray(u) && ve.exec(w, { changedValues: T, allValues: z }, { getFieldValue: F.getFieldValue, setFieldValue: F.setFieldValue, setFieldsValue: F.setFieldsValue, isFieldTouched: F.isFieldTouched, isFieldsTouched: F.isFieldsTouched }).catch(($) => console.error("onFormValuesChange", e, $)); - }, [e, F, C, u, w]), M = W(() => [{ name: "__PROPS__", value: h }, { name: "__PRIMARY_KEY__", value: d }].concat(f), [d, h, f]), I = (T, z) => { - const $ = Ot(T, Lt, n); + C == null || C(T, z), b && Array.isArray(f) && xe.exec(b, { changedValues: T, allValues: z }, { getFieldValue: F.getFieldValue, setFieldValue: F.setFieldValue, setFieldsValue: F.setFieldsValue, isFieldTouched: F.isFieldTouched, isFieldsTouched: F.isFieldsTouched }).catch(($) => console.error("onFormValuesChange", e, $)); + }, [e, F, C, f, b]), M = W(() => [{ name: "__PROPS__", value: h }, { name: "__PRIMARY_KEY__", value: d }].concat(m), [d, h, m]), I = (T, z) => { + const $ = Ot(T, At, n); return O("div", { className: R("ff-grid-layout-form", i), style: { ...a, "--grid-layout-item-margin-x": `${(s == null ? void 0 : s[0]) ?? 8}px`, "--grid-layout-item-margin-y": `${(s == null ? void 0 : s[1]) ?? 16}px`, "--grid-layout-container-padding-y": `${(l == null ? void 0 : l[0]) || 0}px`, "--grid-layout-container-padding-x": `${(l == null ? void 0 : l[1]) || 0}px`, "--grid-layout-cols": r, "--grid-layout-row-height": `${o}px` }, children: [$, z && S.cloneElement(z, { cols: r, rowHeight: o, itemMargin: s, containerPadding: l, fields: T, basicForm: n })] }); }; - return O(Z, { ...E, form: F, fields: M, onValuesChange: B, children: [k ? g(wn, { ...v, theme: k, itemRender: I, fields: p, children: x }) : I(p, x), c == null ? void 0 : c.map((T) => { + return O(Z, { ...E, form: F, fields: M, onValuesChange: B, children: [k ? u(wn, { ...x, theme: k, itemRender: I, fields: g, children: P }) : I(g, P), c == null ? void 0 : c.map((T) => { var z; - return g(Ft, { name: T.code, children: g(Ua, { form: F, basicForm: n, name: T.code, type: T.type, initialValue: T.initialValue, initialValueLanguage: (z = T.extras) == null ? void 0 : z.initialValueLanguage }) }, JSON.stringify(T.code)); + return u(Ft, { name: T.code, children: u(Ua, { form: F, basicForm: n, name: T.code, type: T.type, initialValue: T.initialValue, initialValueLanguage: (z = T.extras) == null ? void 0 : z.initialValueLanguage }) }, JSON.stringify(T.code)); })] }); }, Ua = ({ type: e, initialValue: t, initialValueLanguage: n, onChange: a, basicForm: i }) => { - const [r, o] = At(n == "javascript" && t, n == "javascript" ? void 0 : t, {}, {}, i); + const [r, o] = yn(n == "javascript" && t, n == "javascript" ? void 0 : t, {}, {}, i); return V(() => { - n == "javascript" ? a(de(r, e)) : t && a(de(t, e)); + n == "javascript" ? a(ge(r, e)) : t && a(ge(t, e)); }, [e, t, r]), null; }; -Vt.propTypes = { fields: b.array, hides: b.array }; +Lt.propTypes = { fields: w.array, hides: w.array }; const qa = /* @__PURE__ */ ((e) => ({ code: t, isPreview: n = !1, ...a }) => { - const { align: i, autoComplete: r, resource: o, items: s, hides: l, rowHeight: p, marginX: c, marginY: d, cols: h, listenChangeFields: f, listenChangeFieldsFunc: u, pk: w, uuid: C, theme: k, themeProps: v } = La(t), x = W(() => [{ name: "__PK__", value: w }, { name: "__RESOURCE__", value: o }, { name: "__LAYOUT_KEY__", value: t }, { name: "__LAYOUT_UUID__", value: C }], [w, t, C, o]); - return g(e, { name: t, autoComplete: r, theme: k, themeProps: v, ...a, formFields: x, listenChangeFields: f, listenChangeFieldsFunc: u, fields: s, hides: l, cols: h, rowHeight: p, itemMargin: [c, d] }); -})(Vt), Sn = ({ $setting: e, $close: t, extras: n, code: a, primaryKey: i, ...r }) => { + const { align: i, autoComplete: r, resource: o, items: s, hides: l, rowHeight: g, marginX: c, marginY: d, cols: h, listenChangeFields: m, listenChangeFieldsFunc: f, pk: b, uuid: C, theme: k, themeProps: x } = La(t), P = W(() => [{ name: "__PK__", value: b }, { name: "__RESOURCE__", value: o }, { name: "__LAYOUT_KEY__", value: t }, { name: "__LAYOUT_UUID__", value: C }], [b, t, C, o]); + return u(e, { name: t, autoComplete: r, theme: k, themeProps: x, ...a, formFields: P, listenChangeFields: m, listenChangeFieldsFunc: f, fields: s, hides: l, cols: h, rowHeight: g, itemMargin: [c, d] }); +})(Lt), Sn = ({ $setting: e, $close: t, extras: n, code: a, primaryKey: i, ...r }) => { const [o] = Z.useForm(), s = za(o, a, i, e); - return g(J, { actions: O(S.Fragment, { children: [g(P, { name: (e == null ? void 0 : e.okText) || "保存", type: "primary", widget: () => s({ onSuccess: t }) }), g(P, { name: (e == null ? void 0 : e.cancelText) || "取消", widget: () => t(!1) })] }), extras: n, children: g(qa, { form: o, code: a, primaryKey: i, ...r }) }); -}, Yt = /* @__PURE__ */ new Set(), Nt = (e = [], t = 0) => { + return u(J, { actions: O(S.Fragment, { children: [u(v, { name: (e == null ? void 0 : e.okText) || "保存", type: "primary", widget: () => s({ onSuccess: t }) }), u(v, { name: (e == null ? void 0 : e.cancelText) || "取消", widget: () => t(!1) })] }), extras: n, children: u(qa, { form: o, code: a, primaryKey: i, ...r }) }); +}, Gt = /* @__PURE__ */ new Set(), Nt = (e = [], t = 0) => { const n = e[t]; - if (n.length && !Yt.has(n)) { + if (n.length && !Gt.has(n)) { const a = document.createElement("script"); a.setAttribute("src", n), a.setAttribute("data-namespace", n), e.length > t + 1 && (a.onload = () => { Nt(e, t + 1); }, a.onerror = () => { Nt(e, t + 1); - }), Yt.add(n), document.body.appendChild(a); + }), Gt.add(n), document.body.appendChild(a); } -}, Tt = ({ className: e, type: t, style: n = {}, ...a }) => g("span", { role: "img", className: R("ff-iconfont", e), style: n, ...a, children: g("svg", { style: { width: "1em", height: "1em", fill: "currentColor", overflow: "hidden" }, viewBox: "0 0 1024 1024", children: g("use", { xlinkHref: `#${t}` }) }) }); -Tt.propTypes = { className: b.string, type: b.string.isRequired, style: b.object }, Tt.init = Nt; +}, Tt = ({ className: e, type: t, style: n = {}, ...a }) => u("span", { role: "img", className: R("ff-iconfont", e), style: n, ...a, children: u("svg", { style: { width: "1em", height: "1em", fill: "currentColor", overflow: "hidden" }, viewBox: "0 0 1024 1024", children: u("use", { xlinkHref: `#${t}` }) }) }); +Tt.propTypes = { className: w.string, type: w.string.isRequired, style: w.object }, Tt.init = Nt; const Wa = (e, t, n, a) => Se.redirect(n, t, a), Ka = (e, t = {}, n, a = {}) => { var r; - const i = (r = a.router) == null ? void 0 : r.reduce((o, [s, l, p]) => { - const c = m.get(t, ["router", s]); - if (!c && c !== 0 && l) throw `请传入 ${p}`; + const i = (r = a.router) == null ? void 0 : r.reduce((o, [s, l, g]) => { + const c = p.get(t, ["router", s]); + if (!c && c !== 0 && l) throw `请传入 ${g}`; return `${o}/${c}`; }, `/api/${n}`); return L.del(i, t.param).msg(); -}, Xt = (e, t, n, { status: { loading: a, disabled: i }, setStatus: r }) => { +}, Yt = (e, t, n, { status: { loading: a, disabled: i }, setStatus: r }) => { const o = { loading: (s) => s === void 0 ? a : r((l) => ({ ...l, loading: s })), disabled: (s) => s === void 0 ? i : r((l) => ({ ...l, disabled: s })) }; - return m.isFunction(n) ? n.call(null, { ...t, ...o }) : m.isString(n) && n ? ve.exec(n, t, o) : null; -}, Qt = (e, t, n, a, i) => m.isString(n) && n ? ae.getWidgetComponent(n).then(({ default: r }) => X.modal(r, { ...t, $setting: a }, i != null && i.title ? { ...i, title: m.template(i.title)(e) } : i)).catch((r) => { + return p.isFunction(n) ? n.call(null, { ...t, ...o }) : p.isString(n) && n ? xe.exec(n, t, o) : null; +}, Xt = (e, t, n, a, i) => p.isString(n) && n ? ae.getWidgetComponent(n).then(({ default: r }) => X.modal(r, { ...t, $setting: a }, i != null && i.title ? { ...i, title: p.template(i.title)(e) } : i)).catch((r) => { X.error(n, { content: r.toString() }); -}) : X.modal(n, { ...t, $setting: a }, i != null && i.title ? { ...i, title: m.template(i.title)(e) } : i), _a = (e, t, n, a, i) => X.modal(Sn, { ...t, $setting: a, code: n }, i != null && i.title ? { ...i, title: m.template(i.title)(e) } : i), Ha = (e, t, n, a, i) => X.modal(jt, { base62params: t, $setting: a, listCode: n }, i != null && i.title ? { ...i, title: m.template(i.title)(e) } : i), Ja = ({ widget: e, widgetType: t, widgetData: n, widgetProps: a, widgetSetting: i, widgetContainerProps: r }, { onAfterClick: o, onBeforeClick: s } = {}) => { - const l = ie(ee), [p, c] = A({ leading: !0, trailing: !1 }), d = W(() => { +}) : X.modal(n, { ...t, $setting: a }, i != null && i.title ? { ...i, title: p.template(i.title)(e) } : i), _a = (e, t, n, a, i) => X.modal(Sn, { ...t, $setting: a, code: n }, i != null && i.title ? { ...i, title: p.template(i.title)(e) } : i), Ha = (e, t, n, a, i) => X.modal(jt, { base62params: t, $setting: a, listCode: n }, i != null && i.title ? { ...i, title: p.template(i.title)(e) } : i), Ja = ({ widget: e, widgetType: t, widgetData: n, widgetProps: a, widgetSetting: i, widgetContainerProps: r }, { onAfterClick: o, onBeforeClick: s } = {}) => { + const l = ie(ee), [g, c] = A({ leading: !0, trailing: !1 }), d = W(() => { switch (t) { case "redirect": - return m.partialRight(Wa, e, i); + return p.partialRight(Wa, e, i); case "func": - return m.partialRight(Xt, (i == null ? void 0 : i.code) ?? e, { status: p, setStatus: c }); + return p.partialRight(Yt, (i == null ? void 0 : i.code) ?? e, { status: g, setStatus: c }); case "component": case "fsdpf-component": - return m.partialRight(Qt, e, i, r); + return p.partialRight(Xt, e, i, r); case "grid-layout-form": - return m.partialRight(_a, e, i, r); + return p.partialRight(_a, e, i, r); case "data-list": - return m.partialRight(Ha, e, i, r); + return p.partialRight(Ha, e, i, r); case "destroy": - return m.partialRight(Ka, e, i, r); + return p.partialRight(Ka, e, i, r); default: - if (Mt(e) || S.isValidElement(e)) return m.partialRight(Qt, e, i, r); - if (m.isFunction(e)) return m.partialRight(Xt, (i == null ? void 0 : i.code) || e, { status: p, setStatus: c }); + if (It(e) || S.isValidElement(e)) return p.partialRight(Xt, e, i, r); + if (p.isFunction(e)) return p.partialRight(Yt, (i == null ? void 0 : i.code) || e, { status: g, setStatus: c }); } return (...h) => console.error("useButton unknown widgetType", t, ...h); }, [e, t]); - return [m.debounce((h) => (s == null || s(h), Promise.resolve(_e(a, h, { list: l })).then((f) => d(h, { ...n, ...f })).then((f) => o == null ? void 0 : o(f)).catch(console.error)), 300, { leading: !0, trailing: !1 }), p]; -}, vn = ({ type: e, name: t, className: n, icon: a, iconPosition: i, size: r }, o = "default") => W(() => { + return [p.debounce((h) => (s == null || s(h), Promise.resolve(_e(a, h, { list: l })).then((m) => d(h, { ...n, ...m })).then((m) => o == null ? void 0 : o(m)).catch(console.error)), 300, { leading: !0, trailing: !1 }), g]; +}, xn = ({ type: e, name: t, className: n, icon: a, iconPosition: i, size: r }, o = "default") => W(() => { const s = { type: "primary", className: R("ff-button", n), iconPosition: i, size: r }; - return e === "danger" ? s.danger = !0 : e === "default" && (s.type = e), o === "link" || o === "dashed" ? (s.type = o, e === "default" && (s.className = R(s.className, "ff-default"))) : o !== "circle" && o !== "round" || (s.shape = o), a && (s.icon = g(Tt, { type: a })), t && (s.children = t), s; -}, [o, e, n, a, i]), dt = ({ data: e, widget: t, widgetType: n = "fsdpf-component", widgetData: a, widgetProps: i, widgetSetting: r, widgetContainerProps: o, onAfterClick: s, onBeforeClick: l, children: p, extras: c }) => { - const d = ie(ee), [h, f] = A(!1), [u, w] = A("hover"), [C, k] = A({}), [v, x] = A(), { placement: E, align: F, zIndex: B, arrow: M = { pointAtCenter: !0 }, getPopupContainer: I, isPopupMountBodyContainer: T = !1, ...z } = o || {}; + return e === "danger" ? s.danger = !0 : e === "default" && (s.type = e), o === "link" || o === "dashed" ? (s.type = o, e === "default" && (s.className = R(s.className, "ff-default"))) : o !== "circle" && o !== "round" || (s.shape = o), a && (s.icon = u(Tt, { type: a })), t && (s.children = t), s; +}, [o, e, n, a, i]), dt = ({ data: e, widget: t, widgetType: n = "fsdpf-component", widgetData: a, widgetProps: i, widgetSetting: r, widgetContainerProps: o, onAfterClick: s, onBeforeClick: l, children: g, extras: c }) => { + const d = ie(ee), [h, m] = A(!1), [f, b] = A("hover"), [C, k] = A({}), [x, P] = A(), { placement: E, align: F, zIndex: B, arrow: M = { pointAtCenter: !0 }, getPopupContainer: I, isPopupMountBodyContainer: T = !1, ...z } = o || {}; V(() => { - n == "grid-layout-form" ? x(S.createElement(Sn, { ...a, $setting: r, code: t })) : n == "data-list" ? x(S.createElement(jt, { base62params: e, $setting: r, listCode: t })) : m.isString(t) ? ae.getWidgetComponent(t).then(({ default: D }) => { - x(S.createElement(D, { ...a, $setting: r })); - }).catch((D) => x(D.toString())) : Mt(t) ? x(S.createElement(t, { ...a, $setting: r })) : S.isValidElement(t) && x(S.cloneElement(t, { ...a, $setting: r })); + n == "grid-layout-form" ? P(S.createElement(Sn, { ...a, $setting: r, code: t })) : n == "data-list" ? P(S.createElement(jt, { base62params: e, $setting: r, listCode: t })) : p.isString(t) ? ae.getWidgetComponent(t).then(({ default: D }) => { + P(S.createElement(D, { ...a, $setting: r })); + }).catch((D) => P(D.toString())) : It(t) ? P(S.createElement(t, { ...a, $setting: r })) : S.isValidElement(t) && P(S.cloneElement(t, { ...a, $setting: r })); }, [t, n, a]), V(() => { Promise.resolve(_e(i, e, { list: d })).then(k); }, [i, e, d.getBase62params]); - const $ = (D, pe = !1) => (f(D), !D && w("hover"), D ? l == null ? void 0 : l(C) : s == null ? void 0 : s(pe)), _ = (D) => { - f(!0), w("click"); + const $ = (D, pe = !1) => (m(D), !D && b("hover"), D ? l == null ? void 0 : l(C) : s == null ? void 0 : s(pe)), _ = (D) => { + m(!0), b("click"); }; - return g(Jn, { zIndex: B, placement: E, onPopupClick: _, onClick: _, open: h, align: F, arrow: M, trigger: u, getPopupContainer: I || T ? void 0 : (D) => D, content: g(Ga, { ...z, extras: c, children: v && S.cloneElement(v, { ...C, $close: (D) => $(!1, D) }) }), children: p, onOpenChange: $ }); + return u(Jn, { zIndex: B, placement: E, onPopupClick: _, onClick: _, open: h, align: F, arrow: M, trigger: f, getPopupContainer: I || T ? void 0 : (D) => D, content: u(Ga, { ...z, extras: c, children: x && S.cloneElement(x, { ...C, $close: (D) => $(!1, D) }) }), children: g, onOpenChange: $ }); }, Ga = ({ title: e, className: t, classNames: n, children: a, extras: i, width: r, height: o, ...s }) => { - const [l, p] = A({}), c = G((u, w) => p((C) => ({ ...C, [u]: w })), []), d = G((u) => p((w) => ({ ...w, [u]: void 0 })), []), h = e ? S.createElement("div", { className: "ff-popup-title" }, e) : l == null ? void 0 : l.title, f = i ?? S.createElement("div", { className: "ff-popup-reserved-extras" }, i); - return g(Ke.Provider, { value: { ele: l, mount: c, unmount: d }, children: O("div", { className: R("ff-popup ff-popover", t, l.rootClassName), style: { width: r ?? 260, height: o }, ...s, children: [O("div", { className: R("ff-popup-header", "ff-popover-header", n == null ? void 0 : n.header), children: [h, l == null ? void 0 : l["sub-title"]] }), g("div", { className: R("ff-popup-body", "ff-popover-body", n == null ? void 0 : n.body), children: a }), O("div", { className: R("ff-popup-footer", "ff-popover-footer", n == null ? void 0 : n.footer), children: [f, l == null ? void 0 : l.extras, l == null ? void 0 : l.actions] })] }) }); + const [l, g] = A({}), c = G((f, b) => g((C) => ({ ...C, [f]: b })), []), d = G((f) => g((b) => ({ ...b, [f]: void 0 })), []), h = e ? S.createElement("div", { className: "ff-popup-title" }, e) : l == null ? void 0 : l.title, m = i ?? S.createElement("div", { className: "ff-popup-reserved-extras" }, i); + return u(Ke.Provider, { value: { ele: l, mount: c, unmount: d }, children: O("div", { className: R("ff-popup ff-popover", t, l.rootClassName), style: { width: r ?? 260, height: o }, ...s, children: [O("div", { className: R("ff-popup-header", "ff-popover-header", n == null ? void 0 : n.header), children: [h, l == null ? void 0 : l["sub-title"]] }), u("div", { className: R("ff-popup-body", "ff-popover-body", n == null ? void 0 : n.body), children: a }), O("div", { className: R("ff-popup-footer", "ff-popover-footer", n == null ? void 0 : n.footer), children: [m, l == null ? void 0 : l.extras, l == null ? void 0 : l.actions] })] }) }); }; -dt.propTypes = { widgetType: b.oneOf(["fsdpf-component", "grid-layout-form", "data-list"]) }; -const Ge = (e) => function({ className: t, variant: n, children: a, name: i, icon: r, type: o = "default", iconPosition: s = "start", noAuthType: l, onAfterClick: p, onBeforeClick: c, data: d, loading: h, disabled: f, tooltip: u, confirm: w, widget: C = () => { -}, widgetType: k, widgetData: v, widgetProps: x, widgetSetting: E, widgetContainerProps: F, ...B }) { - const { mode: M, ...I } = F || {}, T = vn({ className: t, name: i, type: o, icon: r, iconPosition: s }, n ?? e), z = g(nt, { ...T, ...B, children: a || i }); - if (M === "popover" && !["destroy", "redirect", "func"].includes(k)) return g(dt, { data: d, widget: C, widgetType: k, widgetData: v, widgetProps: x, widgetSetting: E, widgetContainerProps: I, onAfterClick: p, onBeforeClick: c, children: z }); - const $ = m.isEmpty(u) || !u.enabled ? {} : u, _ = m.isEmpty(w) ? { enabled: !1 } : Object.assign({ enabled: !0 }, w), [D, pe] = A(!1), [Ye, { disabled: Xe, loading: ut }] = Ja({ widget: C, widgetType: k, widgetData: v, widgetProps: x, widgetSetting: E, widgetContainerProps: I }, { onAfterClick: p, onBeforeClick: c }); - return g(Gn, { okText: "确定", cancelText: "取消", getPopupContainer: (Q) => Q, ..._, disabled: Xe || f, open: D, onOpenChange: (Q) => { +dt.propTypes = { widgetType: w.oneOf(["fsdpf-component", "grid-layout-form", "data-list"]) }; +const Ge = (e) => function({ className: t, variant: n, children: a, name: i, icon: r, type: o = "default", iconPosition: s = "start", noAuthType: l, onAfterClick: g, onBeforeClick: c, data: d, loading: h, disabled: m, tooltip: f, confirm: b, widget: C = () => { +}, widgetType: k, widgetData: x, widgetProps: P, widgetSetting: E, widgetContainerProps: F, ...B }) { + const { mode: M, ...I } = F || {}, T = xn({ className: t, name: i, type: o, icon: r, iconPosition: s }, n ?? e), z = u(nt, { ...T, ...B, children: a || i }); + if (M === "popover" && !["destroy", "redirect", "func"].includes(k)) return u(dt, { data: d, widget: C, widgetType: k, widgetData: x, widgetProps: P, widgetSetting: E, widgetContainerProps: I, onAfterClick: g, onBeforeClick: c, children: z }); + const $ = p.isEmpty(f) || !f.enabled ? {} : f, _ = p.isEmpty(b) ? { enabled: !1 } : Object.assign({ enabled: !0 }, b), [D, pe] = A(!1), [Ye, { disabled: Xe, loading: ut }] = Ja({ widget: C, widgetType: k, widgetData: x, widgetProps: P, widgetSetting: E, widgetContainerProps: I }, { onAfterClick: g, onBeforeClick: c }); + return u(Gn, { okText: "确定", cancelText: "取消", getPopupContainer: (Q) => Q, ..._, disabled: Xe || m, open: D, onOpenChange: (Q) => { if (!Q) return pe(Q); _.enabled ? pe(Q) : Ye(d); }, onConfirm: (Q) => { Ye(d, Q); }, onClick: (Q) => { Q.stopPropagation(); - }, children: g(Yn, { getPopupContainer: (Q) => Q, ...$, title: D ? null : $ == null ? void 0 : $.title, trigger: ["hover", "click"], children: S.cloneElement(z, { loading: ut || h, disabled: Xe || f }) }) }); -}, P = Ge("default"); -P.propTypes = { type: b.oneOf(["primary", "default", "danger", ""]), size: b.oneOf(["large", "middle", "small"]), name: b.string, icon: b.string, iconPosition: b.oneOf(["start", "end"]), data: b.any, widget: b.any, widgetType: b.oneOf(["destroy", "redirect", "func", "component", "fsdpf-component", "grid-layout-form", "grid-layout", "data-list"]), widgetData: b.object, widgetProps: b.object, widgetSetting: b.object, widgetContainerProps: b.object, tooltip: b.exact({ title: b.string.isRequired, placement: b.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: b.oneOfType([b.bool, b.number]), getPopupContainer: b.func }), confirm: b.exact({ title: b.string.isRequired, cancelText: b.string, okText: b.string, okType: b.oneOf(["primary", "default", "danger", ""]), placement: b.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: b.oneOfType([b.bool, b.number]), getPopupContainer: b.func, arrow: b.oneOfType([b.bool, b.exact({ pointAtCenter: b.bool })]) }) }; -const Ya = Ge("link"), Xa = Ge("circle"), Qa = Ge("round"), Za = Ge("dashed"), Zt = ({ options: e = [], triggerWeights: t = ["grid-layout-form", "grid-layout", "fsdpf-component", "print"], onAfterClick: n = (f, u, w) => { -}, onBeforeClick: a = (f, u, w) => { -}, labelVariant: i = "link", labelSize: r, labelRender: o, btnVariant: s, btnSize: l, btnRender: p = (f, u) => g(P, { ...f, data: u }, f.uuid || yt()), widgetContainerProps: c = {}, children: d, data: h }) => { - if (m.isEmpty(e)) return d; - const [f, u] = W(() => (e || []).reduce((C, k) => { - const v = t.indexOf(k.widgetType); - return v === -1 ? C[1].push(k) : C[0] ? v < t.indexOf(C[0].widgetType) ? (C[1].push(C[0]), C[0] = k) : C[1].push(k) : C[0] = k, C; + }, children: u(Yn, { getPopupContainer: (Q) => Q, ...$, title: D ? null : $ == null ? void 0 : $.title, trigger: ["hover", "click"], children: S.cloneElement(z, { loading: ut || h, disabled: Xe || m }) }) }); +}, v = Ge("default"); +v.propTypes = { type: w.oneOf(["primary", "default", "danger", ""]), size: w.oneOf(["large", "middle", "small"]), name: w.string, icon: w.string, iconPosition: w.oneOf(["start", "end"]), data: w.any, widget: w.any, widgetType: w.oneOf(["destroy", "redirect", "func", "component", "fsdpf-component", "grid-layout-form", "grid-layout", "data-list"]), widgetData: w.object, widgetProps: w.object, widgetSetting: w.object, widgetContainerProps: w.object, tooltip: w.exact({ title: w.string.isRequired, placement: w.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: w.oneOfType([w.bool, w.number]), getPopupContainer: w.func }), confirm: w.exact({ title: w.string.isRequired, cancelText: w.string, okText: w.string, okType: w.oneOf(["primary", "default", "danger", ""]), placement: w.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: w.oneOfType([w.bool, w.number]), getPopupContainer: w.func, arrow: w.oneOfType([w.bool, w.exact({ pointAtCenter: w.bool })]) }) }; +const Ya = Ge("link"), Xa = Ge("circle"), Qa = Ge("round"), Za = Ge("dashed"), Qt = ({ options: e = [], triggerWeights: t = ["grid-layout-form", "grid-layout", "fsdpf-component", "print"], onAfterClick: n = (m, f, b) => { +}, onBeforeClick: a = (m, f, b) => { +}, labelVariant: i = "link", labelSize: r, labelRender: o, btnVariant: s, btnSize: l, btnRender: g = (m, f) => u(v, { ...m, data: f }, m.uuid || yt()), widgetContainerProps: c = {}, children: d, data: h }) => { + if (p.isEmpty(e)) return d; + const [m, f] = W(() => (e || []).reduce((C, k) => { + const x = t.indexOf(k.widgetType); + return x === -1 ? C[1].push(k) : C[0] ? x < t.indexOf(C[0].widgetType) ? (C[1].push(C[0]), C[0] = k) : C[1].push(k) : C[0] = k, C; }, [null, []]), [e, t]); - o ? d = o(f, h) || d : d || (d = g(nt, { ...vn(Object.assign(f != null && f.name || f != null && f.icon ? {} : { icon: "icon-location" }, f, { size: r }), i) })); - const w = u.map((C) => p(Object.assign({ uuid: C.uuid, type: C.type, name: C.name, widget: C.widget, widgetType: C.widgetType, widgetProps: C.widgetProps, widgetData: C.widgetData, widgetSetting: C.widgetSetting, widgetContainerProps: C.widgetContainerSetting, confirm: C.confirm, onAfterClick: m.partialRight(n, C, h), onBeforeClick: m.partialRight(a, C, h) }, { size: l, variant: s }), h)); - return g(dt, { widget: f == null ? void 0 : f.widget, widgetType: f == null ? void 0 : f.widgetType, widgetProps: f == null ? void 0 : f.widgetProps, widgetSetting: f == null ? void 0 : f.widgetSetting, widgetContainerProps: Object.assign({}, c, f == null ? void 0 : f.widgetContainerProps), data: h, widgetData: f == null ? void 0 : f.widgetData, extras: w, onAfterClick: m.partialRight(n, f, h), onBeforeClick: m.partialRight(a, f, h), children: d }); + o ? d = o(m, h) || d : d || (d = u(nt, { ...xn(Object.assign(m != null && m.name || m != null && m.icon ? {} : { icon: "icon-location" }, m, { size: r }), i) })); + const b = f.map((C) => g(Object.assign({ uuid: C.uuid, type: C.type, name: C.name, widget: C.widget, widgetType: C.widgetType, widgetProps: C.widgetProps, widgetData: C.widgetData, widgetSetting: C.widgetSetting, widgetContainerProps: C.widgetContainerSetting, confirm: C.confirm, onAfterClick: p.partialRight(n, C, h), onBeforeClick: p.partialRight(a, C, h) }, { size: l, variant: s }), h)); + return u(dt, { widget: m == null ? void 0 : m.widget, widgetType: m == null ? void 0 : m.widgetType, widgetProps: m == null ? void 0 : m.widgetProps, widgetSetting: m == null ? void 0 : m.widgetSetting, widgetContainerProps: Object.assign({}, c, m == null ? void 0 : m.widgetContainerProps), data: h, widgetData: m == null ? void 0 : m.widgetData, extras: b, onAfterClick: p.partialRight(n, m, h), onBeforeClick: p.partialRight(a, m, h), children: d }); }; -Zt.propTypes = { triggerWeights: b.array, options: b.arrayOf(b.shape({ ...P.propTypes, widgetType: P.propTypes.widgetType.isRequired })), btnSize: P.propTypes.size, btnRender: b.func, btnVariant: b.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelVariant: b.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelRender: b.func, labelSize: P.propTypes.size, onAfterClick: b.func, onBeforeClick: b.func, widgetContainerProps: P.propTypes.widgetContainerProps, data: P.propTypes.data }, P.Link = Ya, P.Link.defaultProps = P.defaultProps, P.Link.propTypes = P.propTypes, P.Circle = Xa, P.Circle.defaultProps = P.defaultProps, P.Circle.propTypes = P.propTypes, P.Round = Qa, P.Round.defaultProps = P.defaultProps, P.Round.propTypes = P.propTypes, P.Dashed = Za, P.Dashed.defaultProps = P.defaultProps, P.Dashed.propTypes = P.propTypes, P.Popover = dt, P.GroupPopover = Zt; +Qt.propTypes = { triggerWeights: w.array, options: w.arrayOf(w.shape({ ...v.propTypes, widgetType: v.propTypes.widgetType.isRequired })), btnSize: v.propTypes.size, btnRender: w.func, btnVariant: w.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelVariant: w.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelRender: w.func, labelSize: v.propTypes.size, onAfterClick: w.func, onBeforeClick: w.func, widgetContainerProps: v.propTypes.widgetContainerProps, data: v.propTypes.data }, v.Link = Ya, v.Link.defaultProps = v.defaultProps, v.Link.propTypes = v.propTypes, v.Circle = Xa, v.Circle.defaultProps = v.defaultProps, v.Circle.propTypes = v.propTypes, v.Round = Qa, v.Round.defaultProps = v.defaultProps, v.Round.propTypes = v.propTypes, v.Dashed = Za, v.Dashed.defaultProps = v.defaultProps, v.Dashed.propTypes = v.propTypes, v.Popover = dt, v.GroupPopover = Qt; const ei = ({ fields: e, formProps: t, $close: n }) => { const [a] = Z.useForm(), i = W(() => [{ name: "__PROPS__", value: t }], [t]); - return g(J, { actions: O(S.Fragment, { children: [g(P, { name: "取消", widget: () => n(!1) }), g(P, { name: "确定", type: "primary", widget: () => a.validateFields(!0).then(n) })] }), children: g(Z, { fields: i, form: a, className: "ff-modal-form", children: e == null ? void 0 : e.map(({ code: r, ...o }) => g(Lt, { code: r, ...o }, r)) }) }); -}, ti = ({ className: e, classNames: t, $close: n, children: a, title: i, subTitle: r, actions: o, extras: s, ...l }) => O(aa, { ...l, prefixCls: "ff-drawer", className: R("ff-popup", e), maskMotion: { motionAppear: !0, motionName: "mask-motion" }, motion: (p) => ({ motionAppear: !0, motionName: `panel-motion-${p}` }), children: [O("div", { className: R("ff-popup-header", "ff-drawer-header", t == null ? void 0 : t.header), children: [g("button", { "aria-label": "Close", className: R("ff-popup-close", "ff-drawer-close", t == null ? void 0 : t.close), onClick: l.onClose, children: g(Et, { type: "close" }) }), i, r] }), g("div", { className: R("ff-popup-body", "ff-drawer-body", t == null ? void 0 : t.body), children: a }), O("div", { className: R("ff-popup-footer", "ff-drawer-footer", t == null ? void 0 : t.footer), children: [s, o] })] }), ni = ({ className: e, classNames: t, $close: n, $event: a, children: i, title: r, subTitle: o, actions: s, extras: l, placement: p, ...c }) => { + return u(J, { actions: O(S.Fragment, { children: [u(v, { name: "取消", widget: () => n(!1) }), u(v, { name: "确定", type: "primary", widget: () => a.validateFields(!0).then(n) })] }), children: u(Z, { fields: i, form: a, className: "ff-modal-form", children: e == null ? void 0 : e.map(({ code: r, ...o }) => u(At, { code: r, ...o }, r)) }) }); +}, ti = ({ className: e, classNames: t, $close: n, children: a, title: i, subTitle: r, actions: o, extras: s, ...l }) => O(aa, { ...l, prefixCls: "ff-drawer", className: R("ff-popup", e), maskMotion: { motionAppear: !0, motionName: "mask-motion" }, motion: (g) => ({ motionAppear: !0, motionName: `panel-motion-${g}` }), children: [O("div", { className: R("ff-popup-header", "ff-drawer-header", t == null ? void 0 : t.header), children: [u("button", { "aria-label": "Close", className: R("ff-popup-close", "ff-drawer-close", t == null ? void 0 : t.close), onClick: l.onClose, children: u(Et, { type: "close" }) }), i, r] }), u("div", { className: R("ff-popup-body", "ff-drawer-body", t == null ? void 0 : t.body), children: a }), O("div", { className: R("ff-popup-footer", "ff-drawer-footer", t == null ? void 0 : t.footer), children: [s, o] })] }), ni = ({ className: e, classNames: t, $close: n, $event: a, children: i, title: r, subTitle: o, actions: s, extras: l, placement: g, ...c }) => { const d = (a == null ? void 0 : a.pageX) === void 0 ? { animation: null, maskAnimation: null, mousePosition: { x: null, y: null } } : { animation: "zoom", maskAnimation: "fade", mousePosition: { x: a == null ? void 0 : a.pageX, y: a == null ? void 0 : a.pageY } }; - return g(ia, { ...c, ...d, prefixCls: "ff-modal", modalRender: () => O("div", { className: R("ff-modal-content ff-popup", e), children: [O("div", { className: R("ff-popup-header", "ff-modal-header", t == null ? void 0 : t.header), children: [g("button", { "aria-label": "Close", className: R("ff-popup-close", "ff-modal-close", t == null ? void 0 : t.close), onClick: c.onClose, children: g(Et, { type: "close" }) }), r, o] }), g("div", { className: R("ff-popup-body", "ff-modal-body", t == null ? void 0 : t.body), children: i }), O("div", { className: R("ff-popup-footer", "ff-modal-footer", t == null ? void 0 : t.footer), children: [l, s] })] }) }); -}, xn = ({ placement: e, $close: t, $event: n, children: a, title: i, ...r }) => { - const [o, s] = A({}), [l, p] = A(!0), c = G((u, w) => s((C) => ({ ...C, [u]: w })), []), d = G((u) => s((w) => ({ ...w, [u]: void 0 })), []); - let h = { ...r, className: o.rootClassName, title: o.title || i && S.createElement("div", { className: R("ff-popup-title") }, i), subTitle: o["sub-title"], actions: o.actions, extras: o.extras, children: a, $close: t, $event: n, onClose: () => p(!1) }; - const f = () => { + return u(ia, { ...c, ...d, prefixCls: "ff-modal", modalRender: () => O("div", { className: R("ff-modal-content ff-popup", e), children: [O("div", { className: R("ff-popup-header", "ff-modal-header", t == null ? void 0 : t.header), children: [u("button", { "aria-label": "Close", className: R("ff-popup-close", "ff-modal-close", t == null ? void 0 : t.close), onClick: c.onClose, children: u(Et, { type: "close" }) }), r, o] }), u("div", { className: R("ff-popup-body", "ff-modal-body", t == null ? void 0 : t.body), children: i }), O("div", { className: R("ff-popup-footer", "ff-modal-footer", t == null ? void 0 : t.footer), children: [l, s] })] }) }); +}, Pn = ({ placement: e, $close: t, $event: n, children: a, title: i, ...r }) => { + const [o, s] = A({}), [l, g] = A(!0), c = G((f, b) => s((C) => ({ ...C, [f]: b })), []), d = G((f) => s((b) => ({ ...b, [f]: void 0 })), []); + let h = { ...r, className: o.rootClassName, title: o.title || i && S.createElement("div", { className: R("ff-popup-title") }, i), subTitle: o["sub-title"], actions: o.actions, extras: o.extras, children: a, $close: t, $event: n, onClose: () => g(!1) }; + const m = () => { t(!1); }; - return g(Ke.Provider, { value: { ele: o, mount: c, unmount: d }, children: e && e !== "center" ? g(ti, { ...h, placement: e, open: l, afterOpenChange: (u) => !u && f() }) : g(ni, { ...h, visible: l, afterClose: f }) }); + return u(Ke.Provider, { value: { ele: o, mount: c, unmount: d }, children: e && e !== "center" ? u(ti, { ...h, placement: e, open: l, afterOpenChange: (f) => !f && m() }) : u(ni, { ...h, visible: l, afterClose: m }) }); }; -xn.propTypes = { placement: b.oneOf(["center", "left", "top", "right", "bottom"]) }; +Pn.propTypes = { placement: w.oneOf(["center", "left", "top", "right", "bottom"]) }; const Y = () => { const [e, t] = zn({ maxCount: 6, motion: { motionName: "ff-notification-fade", motionAppear: !0, motionEnter: !0, motionLeave: !0, onLeaveStart: (r) => { const { offsetHeight: o } = r; return { height: o }; }, onLeaveActive: () => ({ height: 0, opacity: 0, margin: 0 }) }, prefixCls: "ff-notification" }), [, n] = S.useReducer((r) => r + 1, 0); V(() => { - Y.$onClick = a, Y.$queue.forEach(([r, o, s], l, p) => { - i([o, s], ...r), delete p[l]; + Y.$onClick = a, Y.$queue.forEach(([r, o, s], l, g) => { + i([o, s], ...r), delete g[l]; }); }, []); - const a = (r, o = {}, s = {}) => new Promise((l, p) => i([l, p], r, o, s)), i = ([r, o], s, l = {}, p = {}) => { - const c = Y.$index++, d = (h) => ((f, u) => (Y.$popups.delete(f), n(), u == null ? void 0 : u()))(c, () => r(h)); - if (s === sn) return e.open({ ...p, key: c, content: S.createElement(s, { ...l, $close: () => e.close(c) }) }); - Y.$popups.set(c, S.createElement(xn, { maskClosable: !1, $event: l == null ? void 0 : l.$event, ...p, key: c, $close: d }, S.isValidElement(s) ? S.cloneElement(s, { ...l, $close: d }) : s != null && s.name || qt.isForwardRef(s) || (s == null ? void 0 : s.$$typeof) === qt.ForwardRef ? S.createElement(s, { ...l, $close: d }) : s)), n(); + const a = (r, o = {}, s = {}) => new Promise((l, g) => i([l, g], r, o, s)), i = ([r, o], s, l = {}, g = {}) => { + const c = Y.$index++, d = (h) => ((m, f) => (Y.$popups.delete(m), n(), f == null ? void 0 : f()))(c, () => r(h)); + if (s === on) return e.open({ ...g, key: c, content: S.createElement(s, { ...l, $close: () => e.close(c) }) }); + Y.$popups.set(c, S.createElement(Pn, { maskClosable: !1, $event: l == null ? void 0 : l.$event, ...g, key: c, $close: d }, S.isValidElement(s) ? S.cloneElement(s, { ...l, $close: d }) : s != null && s.name || Ut.isForwardRef(s) || (s == null ? void 0 : s.$$typeof) === Ut.ForwardRef ? S.createElement(s, { ...l, $close: d }) : s)), n(); }; return O(S.Fragment, { children: [Array.from(Y.$popups).map(([r, o]) => o), t] }); }; Y.$popups = /* @__PURE__ */ new Map(), Y.$index = 0, Y.$queue = [], Y.$onClick = (...e) => new Promise((t, n) => { Y.$queue.push([e, t, n]); }); -const en = (e, t, n = {}) => Y.$onClick(e, t, n), ft = (e, { showProgress: t, duration: n, ...a } = { duration: 1.5 }) => Y.$onClick(sn, { content: e, ...a }, { showProgress: t, duration: n }), X = { modal: en, confirm: (e, t = {}) => Y.$onClick(ra, { content: e, ...t }, { placement: "center" }), form: (e, t = {}, n = {}) => en(ei, { formProps: n, fields: e }, { placement: "center", ...t }).then((a) => { +const Zt = (e, t, n = {}) => Y.$onClick(e, t, n), ft = (e, { showProgress: t, duration: n, ...a } = { duration: 1.5 }) => Y.$onClick(on, { content: e, ...a }, { showProgress: t, duration: n }), X = { modal: Zt, confirm: (e, t = {}) => Y.$onClick(ra, { content: e, ...t }, { placement: "center" }), form: (e, t = {}, n = {}) => Zt(ei, { formProps: n, fields: e }, { placement: "center", ...t }).then((a) => { if (a === !1) throw !1; return a; }), notification: ft, success: (e, t = { duration: 1.5 }) => ft(e, { ...t, className: "ff-notification-success", icon: "check" }), error: (e, t = { duration: 1.5 }) => ft(e, { ...t, className: "ff-notification-error", icon: "close" }) }; @@ -982,9 +982,9 @@ const H = class H { Te = new WeakMap(), je = new WeakMap(), j(H, Te, null), j(H, je, null), N(H, "getInstance", () => y(H, Te) ?? q(H, Te, new H())); let $t = H; const L = $t.getInstance(); -class It extends Error { +class Vt extends Error { constructor(t, n) { - super(n), Error.captureStackTrace && Error.captureStackTrace(this, It), !n instanceof Me && (this.name = `${t} Error Runtime`); + super(n), Error.captureStackTrace && Error.captureStackTrace(this, Vt), !n instanceof Me && (this.name = `${t} Error Runtime`); } } class Me extends Error { @@ -997,7 +997,7 @@ var ke, Ae; const ce = class ce { constructor() { j(this, Ae, /* @__PURE__ */ new Map()); - N(this, "setVendor", (t, n) => y(this, Ae).set(t, new rn(n, async (a, i) => { + N(this, "setVendor", (t, n) => y(this, Ae).set(t, new an(n, async (a, i) => { var o, s; if (!(a != null && a.default)) throw "@pkg not found"; let r = () => i; @@ -1016,7 +1016,7 @@ const ce = class ce { try { return y(this, Ae).has("pkg") ? await y(this, Ae).get("pkg").get(n) : await import(`${L.appUrl}/api/pkg-import/web?name=${t}`); } catch (a) { - throw new It(t, a); + throw new Vt(t, a); } }); N(this, "getRoutes", () => L.get("/api/my-router").then((t) => [...t, { uuid: "data-list-setting", isLayout: !0, uri: "/data-list-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/DataListSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "grid-layout-setting", isLayout: !0, uri: "/grid-layout-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/GridLayoutSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "grid-layout-form-setting", isLayout: !0, uri: "/grid-layout-form-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/GridLayoutFormSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "resource-api-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ResourceApiSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "charts-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ChartsSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "fsm-setting", isLayout: !0, uri: "/fsm-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/FsmSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "component-setting", isLayout: !0, uri: "/component-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ComponentSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "login", uri: "/login", name: "登录", type: "fsdpf-component", isLogin: !1, component: "@pkg/ff/components/Login" }, { uuid: "not-found", uri: "*", name: "Not Found", type: "fsdpf-component", isLogin: !1, component: "@pkg/ff/components/NotFound" }].map(({ uuid: n, ...a }) => [n, { uuid: n, ...a }])).then((t) => new Map(t))); @@ -1064,22 +1064,22 @@ const ae = Rt.getInstance(), ai = S.createContext({ user: {}, initUser: () => { }, get: () => { }, assign: () => { }, currentRoute: () => { -} }), Mt = (e) => !!(e != null && e.name) && (e.prototype instanceof S.Component || /^[A-Z]/.test(e.name)), ri = (e, t) => { +} }), It = (e) => !!(e != null && e.name) && (e.prototype instanceof S.Component || /^[A-Z]/.test(e.name)), ri = (e, t) => { if (!e || typeof window > "u") return; let n = document.querySelector(`style[ff-style-token="${t}"]`); return n ? (n.innerHTML = e, e) : (n = document.createElement("style"), n.setAttribute("ff-style-token", t), n.setAttribute("type", "text/css"), n.innerHTML = e, document.head.appendChild(n), e); -}, oi = Object.freeze(Object.defineProperty({ __proto__: null, AppContext: ai, AppGlobalParamsContext: ii, cache: rn, configure: Ie, default: ae, func: ve, http: L, insertStyle: ri, isReactComponent: Mt, route: Se }, Symbol.toStringTag, { value: "Module" })); +}, oi = Object.freeze(Object.defineProperty({ __proto__: null, AppContext: ai, AppGlobalParamsContext: ii, cache: an, configure: Ie, default: ae, func: xe, http: L, insertStyle: ri, isReactComponent: It, route: Se }, Symbol.toStringTag, { value: "Module" })); export { Mi as $, - xa as A, - va as B, + Pa as A, + xa as B, ka as C, at as D, jt as E, ee as F, Ai as G, Na as H, - Pa as I, + va as I, Ea as J, ya as K, ba as L, @@ -1087,8 +1087,8 @@ export { ma as N, Fi as O, Ei as P, - gn as Q, - hn as R, + un as Q, + fn as R, St as S, fa as T, ha as U, @@ -1098,14 +1098,14 @@ export { Vi as Y, ct as Z, Ii as _, - ln as a, + sn as a, He as a0, Je as a1, zi as a2, Bi as a3, qa as a4, - Vt as a5, - Lt as a6, + Lt as a5, + At as a6, Sn as a7, La as a8, Va as a9, @@ -1116,49 +1116,49 @@ export { Ba as ad, Di as ae, Tt as af, - P as ag, + v as ag, oa as ah, Ja as ai, J as aj, Ke as ak, - on as al, + rn as al, Y as am, X as an, - vi as ao, - xi as ap, - Pi as aq, + xi as ao, + Pi as ap, + vi as aq, ae as ar, - Mt as as, + It as as, ri as at, L as au, - rn as av, + an as av, Ie as aw, - ve as ax, + xe as ax, Se as ay, ai as az, la as b, _e as c, - cn as d, + ln as d, Ti as e, $i as f, sa as g, Ri as h, ca as i, - pn as j, + gn as j, Oi as k, Ot as l, da as m, - yn as n, + hn as n, bn as o, Ra as p, wn as q, mt as r, Ta as s, - de as t, + ge as t, Ni as u, $a as v, ji as w, - At as x, - fn as y, - mn as z + yn as x, + mn as y, + pn as z }; diff --git a/dist/components.js b/dist/components.js index e890155..b96c051 100644 --- a/dist/components.js +++ b/dist/components.js @@ -1,4 +1,4 @@ -import { ao as p, af as s, ap as n, aq as t, an as d } from "./common/main-DIjtGOtT.js"; +import { ao as p, af as s, ap as n, aq as t, an as d } from "./common/main-Bo_1as7N.js"; export { p as Empty, s as Icon, diff --git a/dist/container.js b/dist/container.js index 504f9e0..47e2990 100644 --- a/dist/container.js +++ b/dist/container.js @@ -1,4 +1,4 @@ -import { ak as e, ao as s, ap as p, aq as n, al as t, an as d, am as r, aj as u } from "./common/main-DIjtGOtT.js"; +import { ak as e, ao as s, ap as p, aq as n, al as t, an as d, am as r, aj as u } from "./common/main-Bo_1as7N.js"; export { e as Context, s as Empty, diff --git a/dist/data-converter.js b/dist/data-converter.js index 49a1181..5d81cd0 100644 --- a/dist/data-converter.js +++ b/dist/data-converter.js @@ -1,6 +1,6 @@ import "lodash"; import "react"; -import { D as p } from "./common/main-DIjtGOtT.js"; +import { D as p } from "./common/main-Bo_1as7N.js"; export { p as default }; diff --git a/dist/data-list.js b/dist/data-list.js index 1ade831..1a113af 100644 --- a/dist/data-list.js +++ b/dist/data-list.js @@ -1,4 +1,4 @@ -import { J as t, F as e, z as r, C as o, K as i, E as l, B as u, I as D, A as n, L, y as C, N as m, M as p, U as b, P as c, S as F, Q as d, T as O, O as S } from "./common/main-DIjtGOtT.js"; +import { J as t, F as e, z as r, C as o, K as i, E as l, B as u, I as D, A as n, L, y as C, N as m, M as p, U as b, P as c, S as F, Q as d, T as O, O as S } from "./common/main-Bo_1as7N.js"; export { t as DataListContent, e as DataListContext, diff --git a/dist/data-list/utils.js b/dist/data-list/utils.js index 1ca394a..ea6e191 100644 --- a/dist/data-list/utils.js +++ b/dist/data-list/utils.js @@ -1,5 +1,5 @@ import "lodash"; -import { n as a } from "../common/main-DIjtGOtT.js"; +import { n as a } from "../common/main-Bo_1as7N.js"; export { a as getDefaultExpandRowKeys }; diff --git a/dist/grid-layout-form.js b/dist/grid-layout-form.js index 5c7b37b..f4c5031 100644 --- a/dist/grid-layout-form.js +++ b/dist/grid-layout-form.js @@ -1,4 +1,4 @@ -import { a5 as s, a7 as r, a6 as u, a4 as o, x as t, ac as m, aa as d, ab as F, ae as i, a9 as c, a8 as g, ad as l } from "./common/main-DIjtGOtT.js"; +import { a5 as s, a7 as r, a6 as u, a4 as o, x as t, ac as m, aa as d, ab as F, ae as i, a9 as c, a8 as g, ad as l } from "./common/main-Bo_1as7N.js"; export { s as GridLayoutForm, r as GridLayoutFormHelper, diff --git a/dist/grid-layout-form/utils.js b/dist/grid-layout-form/utils.js index 06a661c..9ef4728 100644 --- a/dist/grid-layout-form/utils.js +++ b/dist/grid-layout-form/utils.js @@ -1,5 +1,5 @@ import "lodash"; -import { a as o, g } from "../common/main-DIjtGOtT.js"; +import { a as o, g } from "../common/main-Bo_1as7N.js"; export { o as getNormalizeWidget, g as getOptionItemByValue diff --git a/dist/grid-layout.js b/dist/grid-layout.js index b4a05a9..786793c 100644 --- a/dist/grid-layout.js +++ b/dist/grid-layout.js @@ -1,4 +1,4 @@ -import { o as u, q as e, p as r, H as t, G as d, v as o, x as i, w as G, s as y } from "./common/main-DIjtGOtT.js"; +import { o as u, q as e, p as r, H as t, G as d, v as o, x as i, w as G, s as y } from "./common/main-Bo_1as7N.js"; export { u as GridLayout, e as GridLayoutFramework, diff --git a/dist/grid-layout/utils.js b/dist/grid-layout/utils.js index 6f8c887..26e00ba 100644 --- a/dist/grid-layout/utils.js +++ b/dist/grid-layout/utils.js @@ -1,4 +1,4 @@ -import { j as a, l, k as o } from "../common/main-DIjtGOtT.js"; +import { j as a, l, k as o } from "../common/main-Bo_1as7N.js"; export { a as getBoxStyle, l as getNormalizeFields, diff --git a/dist/hooks.js b/dist/hooks.js index ac0c4c5..4dc46b7 100644 --- a/dist/hooks.js +++ b/dist/hooks.js @@ -1,7 +1,7 @@ import "lodash"; import "rc-field-form"; import "react"; -import { a1 as r, a0 as o, a2 as p, _ as f, $ as i, a3 as m, Z as c } from "./common/main-DIjtGOtT.js"; +import { a1 as r, a0 as o, a2 as p, _ as f, $ as i, a3 as m, Z as c } from "./common/main-Bo_1as7N.js"; import { default as b } from "rc-util/lib/hooks/useMergedState"; export { r as useDeepEffect, diff --git a/dist/iconfont.js b/dist/iconfont.js index 961ff67..3c32b32 100644 --- a/dist/iconfont.js +++ b/dist/iconfont.js @@ -2,7 +2,7 @@ import "react/jsx-runtime"; import "react"; import "prop-types"; import "classnames"; -import { af as a } from "./common/main-DIjtGOtT.js"; +import { af as a } from "./common/main-Bo_1as7N.js"; export { a as default }; diff --git a/dist/index.js b/dist/index.js index 790fa83..051c153 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,4 +1,4 @@ -import { az as t, aA as e, av as o, aw as n, ar as p, ax as r, au as c, at as u, as as f, ay as l } from "./common/main-DIjtGOtT.js"; +import { az as t, aA as e, av as o, aw as n, ar as p, ax as r, au as c, at as u, as as f, ay as l } from "./common/main-Bo_1as7N.js"; export { t as AppContext, e as AppGlobalParamsContext, diff --git a/dist/pages.js b/dist/pages.js index dd5ef3e..669e631 100644 --- a/dist/pages.js +++ b/dist/pages.js @@ -1,4 +1,4 @@ -import { W as t, V as e, X as o, Y as g } from "./common/main-DIjtGOtT.js"; +import { W as t, V as e, X as o, Y as g } from "./common/main-Bo_1as7N.js"; export { t as CustomPage, e as DataListPage, diff --git a/dist/res-ws.js b/dist/res-ws.js index b6d5555..d722a07 100644 --- a/dist/res-ws.js +++ b/dist/res-ws.js @@ -1,5 +1,5 @@ import "lodash"; -import { R as a } from "./common/main-DIjtGOtT.js"; +import { R as a } from "./common/main-Bo_1as7N.js"; export { a as default }; diff --git a/dist/utils.js b/dist/utils.js index 8ce81b1..aae4483 100644 --- a/dist/utils.js +++ b/dist/utils.js @@ -1,5 +1,5 @@ import "lodash"; -import { d as r, f as i, e as g, h as m, b as o, c as p, i as P, m as d, r as k, t as u, u as h } from "./common/main-DIjtGOtT.js"; +import { d as r, f as i, e as g, h as m, b as o, c as p, i as P, m as d, r as k, t as u, u as h } from "./common/main-Bo_1as7N.js"; import "./common/vender-FNiQWFaA.js"; export { r as deepSome, diff --git a/package.json b/package.json index d6566a5..7167583 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ff", "private": true, - "version": "0.6.10", + "version": "0.6.11", "author": "www.fsdpf.com", "type": "module", "main": "./dist/index.js",