From b6465478cb22dc687855a47090e6e104d86a15bd Mon Sep 17 00:00:00 2001 From: what Date: Fri, 26 Sep 2025 09:46:30 +0800 Subject: [PATCH] v0.5.12 --- dist/button.js | 2 +- .../{main-DnobNY7x.js => main-DEetVaxx.js} | 869 +++++++++--------- dist/components.js | 2 +- dist/container.js | 2 +- dist/data-converter.js | 2 +- dist/data-list.js | 2 +- dist/data-list/utils.js | 2 +- dist/grid-layout-form.js | 2 +- dist/grid-layout-form/utils.js | 2 +- dist/grid-layout.js | 2 +- dist/grid-layout/utils.js | 2 +- dist/hooks.js | 2 +- dist/iconfont.js | 2 +- dist/index.js | 2 +- dist/pages.js | 2 +- dist/res-ws.js | 2 +- dist/style.css | 2 +- dist/utils.js | 2 +- package.json | 2 +- 19 files changed, 456 insertions(+), 449 deletions(-) rename dist/common/{main-DnobNY7x.js => main-DEetVaxx.js} (53%) diff --git a/dist/button.js b/dist/button.js index 086ddd2..93622b4 100644 --- a/dist/button.js +++ b/dist/button.js @@ -1,4 +1,4 @@ -import { a9 as s, a8 as u, aa as e } from "./common/main-DnobNY7x.js"; +import { a9 as s, a8 as u, aa as e } from "./common/main-DEetVaxx.js"; export { s as auth, u as default, diff --git a/dist/common/main-DnobNY7x.js b/dist/common/main-DEetVaxx.js similarity index 53% rename from dist/common/main-DnobNY7x.js rename to dist/common/main-DEetVaxx.js index 7f60ec2..ea05311 100644 --- a/dist/common/main-DnobNY7x.js +++ b/dist/common/main-DEetVaxx.js @@ -1,10 +1,10 @@ -var Ei = Object.defineProperty; -var Lt = (e) => { +var Oi = Object.defineProperty; +var At = (e) => { throw TypeError(e); }; -var Oi = (e, t, i) => t in e ? Ei(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i; -var $ = (e, t, i) => Oi(e, typeof t != "symbol" ? t + "" : t, i), At = (e, t, i) => t.has(e) || Lt("Cannot " + i); -var y = (e, t, i) => (At(e, t, "read from private field"), i ? i.call(e) : t.get(e)), E = (e, t, i) => t.has(e) ? Lt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, i), U = (e, t, i, n) => (At(e, t, "write to private field"), n ? n.call(e, i) : t.set(e, i), i); +var Ei = (e, t, i) => t in e ? Oi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i; +var P = (e, t, i) => Ei(e, typeof t != "symbol" ? t + "" : t, i), Lt = (e, t, i) => t.has(e) || At("Cannot " + i); +var y = (e, t, i) => (Lt(e, t, "read from private field"), i ? i.call(e) : t.get(e)), E = (e, t, i) => t.has(e) ? At("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, i), U = (e, t, i, n) => (Lt(e, t, "write to private field"), n ? n.call(e, i) : t.set(e, i), i); var Vt = (e, t, i, n) => ({ set _(r) { U(e, t, r, i); @@ -13,81 +13,81 @@ var Vt = (e, t, i, n) => ({ return y(e, t, n); } }); -import { jsx as p, jsxs as O } from "react/jsx-runtime"; -import x, { useEffect as L, useState as F, useCallback as X, useMemo as H, useRef as W, useContext as ce, useId as pt, isValidElement as ji, useLayoutEffect as Li } from "react"; +import { jsx as g, jsxs as j } from "react/jsx-runtime"; +import x, { useEffect as L, useState as O, useCallback as X, useMemo as H, useRef as W, useContext as ce, useId as mt, isValidElement as ji, useLayoutEffect as Ai } from "react"; import w from "prop-types"; import I from "classnames"; import * as It from "react-is"; -import { useNotification as Ai } from "rc-notification"; +import { useNotification as Li } from "rc-notification"; import d from "lodash"; import te, { FieldContext as Yt, Field as Xt } from "rc-field-form"; -import { M as ct, N as Oe, a as je, P as mt, S as Vi } from "./vender-CtjyT19B.js"; +import { M as dt, N as Le, a as Ve, P as ft, S as Vi } from "./vender-CtjyT19B.js"; import Qt from "immutability-helper"; -import { Form as Ge, Input as Ii, Button as Xe, Pagination as Mi, Tree as zi, Breadcrumb as Bi, Table as Di, Empty as qi, Popconfirm as Wi, Tooltip as Ui, Popover as Hi } from "antd"; +import { Form as Xe, Input as Ii, Button as Ze, Pagination as Mi, Tree as zi, Breadcrumb as Bi, Table as Di, Empty as qi, Popover as Wi, Popconfirm as Ui, Tooltip as Hi } from "antd"; import { useMergedState as Ji } from "rc-util"; import { generatePath as Ki, useInRouterContext as Zt, useParams as _i, useLocation as Gi, createBrowserRouter as Yi, Navigate as Xi } from "react-router-dom"; import "rc-util/lib/hooks/useMergedState"; import Qi from "rc-drawer"; import Zi from "rc-dialog"; -var Ne, Ve, Te, de, ve, Se; +var Fe, ze, Oe, ue, Se, Pe; class ei { constructor(t, i) { - E(this, Ne, /* @__PURE__ */ new Map()); - E(this, Ve, !0); - E(this, Te, []); - E(this, de); - E(this, ve, () => y(this, de)); - E(this, Se, () => Promise.resolve()); - $(this, "get", (...t) => new Promise((i, n) => { + E(this, Fe, /* @__PURE__ */ new Map()); + E(this, ze, !0); + E(this, Oe, []); + E(this, ue); + E(this, Se, () => y(this, ue)); + E(this, Pe, () => Promise.resolve()); + P(this, "get", (...t) => new Promise((i, n) => { const r = JSON.stringify(t); - if (y(this, Ne).has(r)) return i(y(this, Se).call(this, y(this, de), ...t)); - if (y(this, de) === void 0) y(this, Te).push([t, i, n]), y(this, Ve) && (U(this, Ve, !1), Promise.resolve(typeof y(this, ve) == "function" ? y(this, ve).call(this) : y(this, ve)).then((a) => U(this, de, a || null)).finally(() => { - y(this, Te).forEach(([a, o, s]) => { + if (y(this, Fe).has(r)) return i(y(this, Pe).call(this, y(this, ue), ...t)); + if (y(this, ue) === void 0) y(this, Oe).push([t, i, n]), y(this, ze) && (U(this, ze, !1), Promise.resolve(typeof y(this, Se) == "function" ? y(this, Se).call(this) : y(this, Se)).then((a) => U(this, ue, a || null)).finally(() => { + y(this, Oe).forEach(([a, o, s]) => { try { - const l = y(this, Se).call(this, y(this, de), ...a); - y(this, Ne).set(JSON.stringify(a), l), o(l); + const l = y(this, Pe).call(this, y(this, ue), ...a); + y(this, Fe).set(JSON.stringify(a), l), o(l); } catch (l) { s(l); } - }), y(this, Te).length = 0; + }), y(this, Oe).length = 0; })); else { - const a = y(this, Se).call(this, y(this, de), ...t); - y(this, Ne).set(r, a), i(a); + const a = y(this, Pe).call(this, y(this, ue), ...t); + y(this, Fe).set(r, a), i(a); } })); - U(this, Se, i), U(this, ve, t); + U(this, Pe, i), U(this, Se, t); } } -Ne = new WeakMap(), Ve = new WeakMap(), Te = new WeakMap(), de = new WeakMap(), ve = new WeakMap(), Se = new WeakMap(); -const ur = () => p("div", { children: "Empty" }), qe = x.createContext({ ele: {}, mount: () => { +Fe = new WeakMap(), ze = new WeakMap(), Oe = new WeakMap(), ue = new WeakMap(), Se = new WeakMap(), Pe = new WeakMap(); +const ur = () => g("div", { children: "Empty" }), He = x.createContext({ ele: {}, mount: () => { }, unmount: () => { } }), Y = ({ rootClassName: e, className: t, children: i, actions: n, title: r, subTitle: a, extras: o, style: s = {} }) => { - const { mount: l, unmount: u } = x.useContext(qe); - return Y.Action({ children: n }), Y.Title({ children: r }), Y.SubTitle({ children: a }), Y.Extra({ children: o }), L(() => (l("rootClassName", e), () => u(e)), [e]), p("div", { className: I("ff-container", t), style: s, children: i }); -}, _e = (e) => ({ children: t, className: i }) => { - const { mount: n, unmount: r } = x.useContext(qe); + const { mount: l, unmount: u } = x.useContext(He); + return Y.Action({ children: n }), Y.Title({ children: r }), Y.SubTitle({ children: a }), Y.Extra({ children: o }), L(() => (l("rootClassName", e), () => u(e)), [e]), g("div", { className: I("ff-container", t), style: s, children: i }); +}, Ye = (e) => ({ children: t, className: i }) => { + const { mount: n, unmount: r } = x.useContext(He); return L(() => (t && n(e, x.createElement("div", { key: `ff-${e}`, className: I(`ff-popup-${e}`, i) }, t)), () => r(e)), [i, t]), null; }; -Y.Action = _e("actions"), Y.Title = _e("title"), Y.SubTitle = _e("sub-title"), Y.Extra = _e("extras"), Y.propTypes = { className: w.string, style: w.object, title: w.any, subTitle: w.any, actions: w.any, extras: w.any }; -const gr = () => p(Y, { className: "ff-loading", children: O("div", { className: "loader", children: [O("div", { className: "square", children: [p("span", {}), p("span", {}), p("span", {})] }), O("div", { className: "square", children: [p("span", {}), p("span", {}), p("span", {})] }), O("div", { className: "square", children: [p("span", {}), p("span", {}), p("span", {})] }), O("div", { className: "square", children: [p("span", {}), p("span", {}), p("span", {})] })] }) }), pr = () => p("div", { children: "NotFound" }), ti = ({ children: e }) => { - const [t, i] = F({}), n = X((a, o) => i((s) => ({ ...s, [a]: o })), []), r = X((a) => i((o) => ({ ...o, [a]: void 0 })), []); - return typeof (e == null ? void 0 : e.type) == "string" ? e : p(qe.Provider, { value: { ele: t, mount: n, unmount: r }, children: x.cloneElement(e, { className: t.rootClassName, title: t.title, subTitle: t["sub-title"], actions: t.actions, extras: t.extras }) }); +Y.Action = Ye("actions"), Y.Title = Ye("title"), Y.SubTitle = Ye("sub-title"), Y.Extra = Ye("extras"), Y.propTypes = { className: w.string, style: w.object, title: w.any, subTitle: w.any, actions: w.any, extras: w.any }; +const gr = () => g(Y, { className: "ff-loading", children: j("div", { className: "loader", children: [j("div", { className: "square", children: [g("span", {}), g("span", {}), g("span", {})] }), j("div", { className: "square", children: [g("span", {}), g("span", {}), g("span", {})] }), j("div", { className: "square", children: [g("span", {}), g("span", {}), g("span", {})] }), j("div", { className: "square", children: [g("span", {}), g("span", {}), g("span", {})] })] }) }), pr = () => g("div", { children: "NotFound" }), ti = ({ children: e }) => { + const [t, i] = O({}), n = X((a, o) => i((s) => ({ ...s, [a]: o })), []), r = X((a) => i((o) => ({ ...o, [a]: void 0 })), []); + return typeof (e == null ? void 0 : e.type) == "string" ? e : g(He.Provider, { value: { ele: t, mount: n, unmount: r }, children: x.cloneElement(e, { className: t.rootClassName, title: t.title, subTitle: t["sub-title"], actions: t.actions, extras: t.extras }) }); }; ti.propTypes = { children: w.element.isRequired }; -const Mt = { 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"] }, $t = ({ type: e, props: t }) => p("i", { ...t, children: p("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", fill: "currentColor", children: (Mt[e] || Mt.info).map((i, n) => p("path", { d: i }, n)) }) }), ii = ({ className: e, content: t, icon: i, $close: n }) => O(x.Fragment, { children: [i && p("div", { className: I("ff-notification-icon", e), children: p($t, { type: i }) }), t] }), en = ({}) => p(Y, { children: "Confirm" }); -var pe, Re; +const Mt = { 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"] }, Tt = ({ type: e, props: t }) => g("i", { ...t, children: g("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", fill: "currentColor", children: (Mt[e] || Mt.info).map((i, n) => g("path", { d: i }, n)) }) }), ii = ({ className: e, content: t, icon: i, $close: n }) => j(x.Fragment, { children: [i && g("div", { className: I("ff-notification-icon", e), children: g(Tt, { type: i }) }), t] }), en = ({}) => g(Y, { children: "Confirm" }); +var pe, Ee; const ne = class ne { constructor() { - E(this, Re, /* @__PURE__ */ new Map()); - $(this, "init", (t) => U(this, Re, new Map(t))); - $(this, "check", (t) => !y(this, Re).has(t) || y(this, Re).get(t)); + E(this, Ee, /* @__PURE__ */ new Map()); + P(this, "init", (t) => U(this, Ee, new Map(t))); + P(this, "check", (t) => !y(this, Ee).has(t) || y(this, Ee).get(t)); if (y(ne, pe)) return y(ne, pe); } }; -pe = new WeakMap(), Re = new WeakMap(), E(ne, pe, null), $(ne, "getInstance", () => (y(ne, pe) || U(ne, pe, new ne()), y(ne, pe))); -let ft = ne; -const tn = ft.getInstance(), nn = (e, t, i = "children") => { +pe = new WeakMap(), Ee = new WeakMap(), E(ne, pe, null), P(ne, "getInstance", () => (y(ne, pe) || U(ne, pe, new ne()), y(ne, pe))); +let ht = ne; +const tn = ht.getInstance(), nn = (e, t, i = "children") => { if (d.isEmpty(e)) return {}; const n = d.find(e, ["value", t]); if (!d.isEmpty(n)) return n; @@ -98,18 +98,18 @@ const tn = ft.getInstance(), nn = (e, t, i = "children") => { } return {}; }, ni = (e = "Input", t = "@pkg/ff/grid-layout-forms") => e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`; -var me, Ie; +var me, Be; const re = class re { constructor() { - E(this, Ie, null); - $(this, "init", (t) => U(this, Ie, t)); - $(this, "get", (t, i) => d.get(y(this, Ie), t, i)); + E(this, Be, null); + P(this, "init", (t) => U(this, Be, t)); + P(this, "get", (t, i) => d.get(y(this, Be), t, i)); if (y(re, me)) return y(re, me); } }; -me = new WeakMap(), Ie = new WeakMap(), E(re, me, null), $(re, "getInstance", () => (y(re, me) || U(re, me, new re()), y(re, me))); -let ht = re; -const Le = ht.getInstance(), zt = { 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) => { +me = new WeakMap(), Be = new WeakMap(), E(re, me, null), P(re, "getInstance", () => (y(re, me) || U(re, me, new re()), y(re, me))); +let yt = re; +const Ie = yt.getInstance(), zt = { 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": @@ -123,7 +123,7 @@ const Le = ht.getInstance(), zt = { null2json: (e) => Object.create(), null2arra i = Array.isArray(e) ? "array" : typeof e, d.isObject(e) && (i = "json"); const n = `${i}2${t}`; return Reflect.has(zt, n) ? zt[n](e) : e; -}, We = (e = {}, t = {}, i = {}, n = "") => ri(e, (r, a) => a === "type" && r === "code") ? ai(e, t, i, n) : si(e, t, n), ri = (e, t = () => !1) => d.some(e, (i) => !!d.some(i, t) || (d.isEmpty(i) || !d.isPlainObject(i) && !d.isArray(i) ? void 0 : ri(i, t))), ai = async (e = {}, t = {}, i = {}, n = "") => { +}, Je = (e = {}, t = {}, i = {}, n = "") => ri(e, (r, a) => a === "type" && r === "code") ? ai(e, t, i, n) : si(e, t, n), ri = (e, t = () => !1) => d.some(e, (i) => !!d.some(i, t) || (d.isEmpty(i) || !d.isPlainObject(i) && !d.isArray(i) ? void 0 : ri(i, t))), ai = async (e = {}, t = {}, i = {}, n = "") => { let r = /* @__PURE__ */ Object.create(null); for (let a in e) { let o; @@ -169,7 +169,7 @@ const Le = ht.getInstance(), zt = { null2json: (e) => Object.create(), null2arra d.set(n, r, a); } return n; -}, {}), dt = (e, t) => e && typeof e == "object" ? Array.isArray(e) ? e.map((i) => dt(i, t)) : Object.keys(e).reduce((i, n) => (t[n] ? i[t[n]] = dt(e[n], t) : i[n] = dt(e[n], t), i), {}) : e, mr = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (e) => { +}, {}), ut = (e, t) => e && typeof e == "object" ? Array.isArray(e) ? e.map((i) => ut(i, t)) : Object.keys(e).reduce((i, n) => (t[n] ? i[t[n]] = ut(e[n], t) : i[n] = ut(e[n], t), i), {}) : e, mr = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (e) => { const t = 16 * Math.random() | 0; return (e === "x" ? t : 3 & t | 8).toString(16); }), fr = (e) => { @@ -182,22 +182,22 @@ const Le = ht.getInstance(), zt = { null2json: (e) => Object.create(), null2arra var t, i; return e ? (i = (t = e.match(/^@pkg(?:[^\/]*\/){1}(?[^\/]+)/)) == null ? void 0 : t.groups) == null ? void 0 : i.owner : ""; }, rn = (e, t = 32, i = "auto") => { - const n = yt(e), r = i === "auto" ? "x64" : i; - if (t === 32) return ct.x86.hash32(n).toString(); - if (t === 128) return r === "x64" ? ct.x64.hash128(n) : ct.x86.hash128(n); + const n = wt(e), r = i === "auto" ? "x64" : i; + if (t === 32) return dt.x86.hash32(n).toString(); + if (t === 128) return r === "x64" ? dt.x64.hash128(n) : dt.x86.hash128(n); throw new Error("bits 只能是 32 或 128"); -}, yt = (e) => e == null ? "null" : typeof e == "string" ? e : typeof e == "number" || typeof e == "boolean" ? String(e) : typeof e == "function" ? e.toString() : Array.isArray(e) ? "[" + e.map(yt).join(",") + "]" : typeof e == "object" ? "{" + Object.keys(e).sort().map((t) => `${t}:${yt(e[t])}`).join(",") + "}" : String(e); -var Ze, Me, ze, et; -const tt = class tt { +}, wt = (e) => e == null ? "null" : typeof e == "string" ? e : typeof e == "number" || typeof e == "boolean" ? String(e) : typeof e == "function" ? e.toString() : Array.isArray(e) ? "[" + e.map(wt).join(",") + "]" : typeof e == "object" ? "{" + Object.keys(e).sort().map((t) => `${t}:${wt(e[t])}`).join(",") + "}" : String(e); +var tt, De, qe, it; +const nt = class nt { constructor(...t) { - E(this, Me, []); - E(this, ze, (t) => { + E(this, De, []); + E(this, qe, (t) => { var i; - for (let n of t) Array.isArray(n[0]) ? y(this, ze).call(this, n) : y(this, Me).push(y(i = tt, Ze).call(i, n[0], n[1])); + for (let n of t) Array.isArray(n[0]) ? y(this, qe).call(this, n) : y(this, De).push(y(i = nt, tt).call(i, n[0], n[1])); }); - $(this, "toValue", async (t, i = null) => { + P(this, "toValue", async (t, i = null) => { const n = { getValue: () => t, getRecord: () => i }; - return await y(this, Me).reduce(async (r, a) => { + return await y(this, De).reduce(async (r, a) => { try { const o = await r; return (await a).call(n, o); @@ -206,38 +206,38 @@ const tt = class tt { } }, t); }); - $(this, "toRender", (t, i, n = null) => x.createElement(y(this, et), { value: t, record: i }, n)); - E(this, et, ({ value: t, record: i, children: n }) => { - const [r, a] = F(n); - return at(() => { + P(this, "toRender", (t, i, n = null) => x.createElement(y(this, it), { value: t, record: i }, n)); + E(this, it, ({ value: t, record: i, children: n }) => { + const [r, a] = O(n); + return ot(() => { let o = !1; return a(n), this.toValue(t, i).then((s) => ee(s, "string")).then((s) => !o && a(s)).catch((s) => !o && a(`${s}`)), () => o = !0; }, [t, i]), r; }); - y(this, ze).call(this, t); + y(this, qe).call(this, t); } }; -Ze = new WeakMap(), Me = new WeakMap(), ze = new WeakMap(), et = new WeakMap(), E(tt, Ze, d.memoize((t, i) => le.getWidgetComponent(t).then((n) => { +tt = new WeakMap(), De = new WeakMap(), qe = new WeakMap(), it = new WeakMap(), E(nt, tt, d.memoize((t, i) => le.getWidgetComponent(t).then((n) => { var r; return ((r = n.default) == null ? void 0 : r.call(n, i)) || ((a) => a); }), (t, i) => `${t}::${ee(i, "string")}`)); -let Qe = tt; -const an = (e, t = {}) => H(() => e == null ? void 0 : e.map(({ widgetByJs: i, widgetByJsSetting: n, ...r }, a) => i ? { ...r, render: (o, s) => new Qe([i, n]).toRender(o, s, "-") } : r), [e, t]), wr = (e) => { - const [t, i] = F({}); +let et = nt; +const an = (e, t = {}) => H(() => e == null ? void 0 : e.map(({ widgetByJs: i, widgetByJsSetting: n, ...r }, a) => i ? { ...r, render: (o, s) => new et([i, n]).toRender(o, s, "-") } : r), [e, t]), wr = (e) => { + const [t, i] = O({}); return L(() => { let n = !1; - return e && j.get(`/api/_/${e}`).then((r) => d.pick(r, ["uuid", "name", "code", "resource", "marginX", "marginY", "cols", "rowHeight", "primaryKey", "columns", "itemOperations", "batchOperations", "isConditionFormLayout", "layout", "tabs", "pageSize", "layoutConfig"])).then((r) => !n && i(r)), () => n = !0; + return e && A.get(`/api/_/${e}`).then((r) => d.pick(r, ["uuid", "name", "code", "resource", "marginX", "marginY", "cols", "rowHeight", "primaryKey", "columns", "itemOperations", "batchOperations", "isConditionFormLayout", "layout", "tabs", "pageSize", "layoutConfig"])).then((r) => !n && i(r)), () => n = !0; }, [e]), t; }, br = (e, t = {}) => { - const [i, n] = F({ dataSource: [] }); - return Ue(() => { + const [i, n] = O({ dataSource: [] }); + return Ke(() => { let r = !1; - return e && j.get(`/api/${e}/${j.encode({ page: 1, ...t })}`).then((a) => !r && n(a)), () => r = !0; + return e && A.get(`/api/${e}/${A.encode({ page: 1, ...t })}`).then((a) => !r && n(a)), () => r = !0; }, [e, t]), i; }, oi = (e = [], t = /* @__PURE__ */ new Map(), i = "id", n) => { const r = X(n ? (a) => d.get(a, i, d.get(a, [n, i])) : (a) => d.get(a, i), [i, n]); return X((a) => e == null ? void 0 : e.filter((o) => !o.uuid || !t.has(o.uuid) || t.get(o.uuid).some((s) => s == r(a))), [e, t, r]); -}, wt = (e = [], t = /* @__PURE__ */ new Map(), i = [], n = "id", r) => { +}, bt = (e = [], t = /* @__PURE__ */ new Map(), i = [], n = "id", r) => { const a = X(r ? (o) => d.get(o, n, d.get(o, [r, n])) : (o) => d.get(o, n), [n, r]); return H(() => { if (d.isEmpty(e) || !e.some(({ uuid: s }) => tn.check(s))) return !1; @@ -246,22 +246,22 @@ const an = (e, t = {}) => H(() => e == null ? void 0 : e.map(({ widgetByJs: i, w return e.some(({ uuid: s }) => !s || !t.has(s) || t.get(s).some((l) => o.some((u) => u == l))); }, [e, i, t, a]); }, sn = (e, t, i = "id", n = null) => { - const r = rt(), a = W(!1), o = W(e.dataSource), s = W(e.itemOperationsAccess); + const r = st(), a = W(!1), o = W(e.dataSource), s = W(e.itemOperationsAccess); return L(() => (o.current = e.dataSource, s.current = e.itemOperationsAccess, () => a.current = !1), [e.dataSource, e.itemOperationsAccess]), a.current && (e.dataSource = o.current, e.itemOperationsAccess = s.current), [e, (l = 0, u = null) => { - var c, g; + var c, p; if (a.current = !1, l === 1) return (c = e.onReload) == null ? void 0 : c.call(e); if (l === 2) { - const f = d.get(u, "__PARENT_ID__", ""), m = d.get(u, i, d.get(u, [n, i], "")), h = d.findIndex(o.current, ["__PARENT_ID__", f]), b = d.findIndex(h > -1 ? d.get(o.current, [h, "children"]) : o.current, [i, m]); - if (b === -1) return (g = e.onReload) == null ? void 0 : g.call(e); - Promise.all([j.get(`/api/${t}/detail/${m}`), j.post(`/api/${t}/list-operations-access`, { ids: m })]).then(([C, k]) => { - const P = d.get(o.current, h > -1 ? [h, "children", b, "children"] : [b, "children"]); - o.current = Qt(o.current, h > -1 ? { [h]: { children: { $splice: [[b, 1, { ...C, children: P }]] } } } : { $splice: [[b, 1, { ...C, children: P }]] }); - const S = new Map(k); - s.current.forEach((R, V) => { + const h = d.get(u, "__PARENT_ID__", ""), m = d.get(u, i, d.get(u, [n, i], "")), f = d.findIndex(o.current, ["__PARENT_ID__", h]), b = d.findIndex(f > -1 ? d.get(o.current, [f, "children"]) : o.current, [i, m]); + if (b === -1) return (p = e.onReload) == null ? void 0 : p.call(e); + Promise.all([A.get(`/api/${t}/detail/${m}`), A.post(`/api/${t}/list-operations-access`, { ids: m })]).then(([C, k]) => { + const S = d.get(o.current, f > -1 ? [f, "children", b, "children"] : [b, "children"]); + o.current = Qt(o.current, f > -1 ? { [f]: { children: { $splice: [[b, 1, { ...C, children: S }]] } } } : { $splice: [[b, 1, { ...C, children: S }]] }); + const v = new Map(k); + s.current.forEach((N, V) => { var q; - (q = S.get(V)) != null && q.some((A) => A == m) || s.current.set(V, R.filter((A) => A !== m)); - }), S.forEach((R, V) => { - s.current.has(V) ? s.current.set(V, d.uniq([...s.current.get(V) || [], ...R])) : s.current.set(V, R); + (q = v.get(V)) != null && q.some((B) => B == m) || s.current.set(V, N.filter((B) => B !== m)); + }), v.forEach((N, V) => { + s.current.has(V) ? s.current.set(V, d.uniq([...s.current.get(V) || [], ...N])) : s.current.set(V, N); }); }).then(() => { a.current = !0, r(); @@ -269,25 +269,25 @@ const an = (e, t = {}) => H(() => e == null ? void 0 : e.map(({ widgetByJs: i, w } }]; }, on = (e, t) => { - const i = rt(), n = W(t), r = W(/* @__PURE__ */ new Map()), a = W([]), o = d.throttle((l) => { - a.current = [], j.list(e, d.pick({ ...n.current, ...l }, ["tab", "page", "pageSize", "condition", "sider", "keyword"])).then(({ keyword: u, condition: c, total: g, tab: f, sider: m, page: h, pageSize: b, operationsAccess: C, dataSource: k }) => { - n.current = { tab: f, condition: c, sider: m, keyword: u, total: g, pageSize: b, page: k != null && k.length ? h : 1 }, a.current = k, r.current = new Map(C), i(); + const i = st(), n = W(t), r = W(/* @__PURE__ */ new Map()), a = W([]), o = d.throttle((l) => { + a.current = [], A.list(e, d.pick({ ...n.current, ...l }, ["tab", "page", "pageSize", "condition", "sider", "keyword"])).then(({ keyword: u, condition: c, total: p, tab: h, sider: m, page: f, pageSize: b, operationsAccess: C, dataSource: k }) => { + n.current = { tab: h, condition: c, sider: m, keyword: u, total: p, pageSize: b, page: k != null && k.length ? f : 1 }, a.current = k, r.current = new Map(C), i(); }); }, 380, { leading: !1, trailing: !0 }); - at(() => { + ot(() => { a.current = [], e && o(t); }, [e, t]); const s = H(() => d.pick(n.current, ["total", "tab", "page", "pageSize", "condition", "sider", "keyword"]), [n.current]); return Object.assign(s, { onTabChange: (l) => o({ tab: l, page: 1 }), onPageChange: (l, u) => o({ page: l, pageSize: u }), onPageSizeChange: (l) => o({ pageSize: l, page: 1 }), onConditionChange: (l, u) => o({ keyword: u, condition: Qt(n.current.condition || {}, { $merge: l || {} }), page: 1 }), onSiderChange: (l) => o({ sider: l, page: 1 }), onKeywordChange: (l) => o({ keyword: l, page: 1 }), itemOperationsAccess: r.current, dataSource: a.current, onReload: o, payload: t == null ? void 0 : t.payload }); -}, ln = ({ listCode: e, className: t, layouts: i, dataSource: n, isPaginate: r, isItemOperations: a, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: u, resource: c, primaryKey: g, title: f, itemGridLayout: m, $setting: h, tabs: b, isConditionFormLayout: C, isTreeSider: k, treeSiderConfig: P }) => { - const { classNames: S, onClickCallback: R } = ce(ie), V = d.pick(h, ["column", "colWidth", "beforeRender", "afterRender", "style"]), q = oi(l, u, g, c), A = X((M, T, z) => p(cn, { className: I("ff-data-list-framework-item", S.item), operations: a ? q(T) : [], data: c ? { [c]: T } : T, children: M, onClickCallback: R }), [c, g, a, R, l, u]); - return O("div", { className: I("ff-data-list-framework", t), children: [p(i.sider, { isTreeSider: k, ...P }), O("div", { className: I("ff-data-list-container", S == null ? void 0 : S.container), children: [p(i.filter, { isConditionFormLayout: C }), p(i.toolbar, { title: f, tabs: b }), p(kn, { ...V, ...m, primaryKey: g, itemRender: A, dataSource: n }), p(i.footer, { isPaginate: r, isOperations: o, operations: s })] })] }); -}, cn = ({ className: e, operations: t, children: i, data: n, onClickCallback: r }) => O("div", { className: I("data-list-grid-layout-item-container", e), children: [i, !!(t != null && t.length) && p("div", { className: "data-list-grid-layout-item-actions", children: t.map((a) => p("span", { className: "data-list-grid-layout-item-action", children: p(N.Link, { uuid: a.uuid, type: a.type, name: a.name, widget: a.widget, widgetType: a.widgetType, widgetProps: a.widgetProps, widgetSetting: a.widgetSetting, widgetContainerProps: a.widgetContainerSetting, data: n, confirm: a.confirm, onAfterClick: (o) => o !== !1 && (r == null ? void 0 : r(a.isRefresh, n)) }, a.uuid || pt()) }, (a == null ? void 0 : a.uuid) || pt())) })] }), dn = ({ listCode: e, className: t, layouts: i, dataSource: n, columns: r, isItemOperations: a, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: u, resource: c, primaryKey: g, title: f, tabs: m, isPaginate: h, isTreeSider: b, treeSiderConfig: C, isConditionFormLayout: k, ...P }) => { - const { classNames: S, onClickCallback: R } = ce(ie), V = oi(l, u, g, c), q = wt(l, u, n, g, c); - return O("div", { className: I("ff-data-table-framework", t), children: [p(i.sider, { isTreeSider: b, ...C }), O("div", { className: I("ff-data-table-container", S == null ? void 0 : S.container), children: [p(i.filter, { isConditionFormLayout: k }), p(i.toolbar, { title: f, tabs: m }), p(hn, { ...P, primaryKey: g, className: "ff-data-table-content", columns: r, dataSource: n, operationRender: q ? (A) => { +}, ln = ({ listCode: e, className: t, layouts: i, dataSource: n, isPaginate: r, isItemOperations: a, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: u, resource: c, primaryKey: p, title: h, itemGridLayout: m, $setting: f, tabs: b, isConditionFormLayout: C, isTreeSider: k, treeSiderConfig: S }) => { + const { classNames: v, onClickCallback: N } = ce(ie), V = d.pick(f, ["column", "colWidth", "beforeRender", "afterRender", "style"]), q = oi(l, u, p, c), B = X((M, R, z) => g(cn, { className: I("ff-data-list-framework-item", v.item), operations: a ? q(R) : [], data: c ? { [c]: R } : R, children: M, onClickCallback: N }), [c, p, a, N, l, u]); + return j("div", { className: I("ff-data-list-framework", t), children: [g(i.sider, { isTreeSider: k, ...S }), j("div", { className: I("ff-data-list-container", v == null ? void 0 : v.container), children: [g(i.filter, { isConditionFormLayout: C }), g(i.toolbar, { title: h, tabs: b }), g(kn, { ...V, ...m, primaryKey: p, itemRender: B, dataSource: n }), g(i.footer, { isPaginate: r, isOperations: o, operations: s })] })] }); +}, cn = ({ className: e, operations: t, children: i, data: n, onClickCallback: r }) => j("div", { className: I("data-list-grid-layout-item-container", e), children: [i, !!(t != null && t.length) && g("div", { className: "data-list-grid-layout-item-actions", children: t.map((a) => g("span", { className: "data-list-grid-layout-item-action", children: g($.Link, { uuid: a.uuid, type: a.type, name: a.name, widget: a.widget, widgetType: a.widgetType, widgetProps: a.widgetProps, widgetSetting: a.widgetSetting, widgetContainerProps: a.widgetContainerSetting, data: n, confirm: a.confirm, onAfterClick: (o) => o !== !1 && (r == null ? void 0 : r(a.isRefresh, n)) }, a.uuid || mt()) }, (a == null ? void 0 : a.uuid) || mt())) })] }), dn = ({ listCode: e, className: t, layouts: i, dataSource: n, columns: r, isItemOperations: a, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: u, resource: c, primaryKey: p, title: h, tabs: m, isPaginate: f, isTreeSider: b, treeSiderConfig: C, isConditionFormLayout: k, ...S }) => { + const { classNames: v, onClickCallback: N } = ce(ie), V = oi(l, u, p, c), q = bt(l, u, n, p, c); + return j("div", { className: I("ff-data-table-framework", t), children: [g(i.sider, { isTreeSider: b, ...C }), j("div", { className: I("ff-data-table-container", v == null ? void 0 : v.container), children: [g(i.filter, { isConditionFormLayout: k }), g(i.toolbar, { title: h, tabs: m }), g(hn, { ...S, primaryKey: p, className: "ff-data-table-content", columns: r, dataSource: n, operationRender: q ? (B) => { var M; - return p("div", { className: "ff-data-table-actions", children: (M = V(A)) == null ? void 0 : M.map((T, z) => p(N.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: A, confirm: T.confirm, onAfterClick: (v) => v !== !1 && (R == null ? void 0 : R(T.isRefresh, A)) }, T.uuid || z)) }); - } : null }), p(i.footer, { isPaginate: h, isOperations: o, operations: s })] })] }); + return g("div", { className: "ff-data-table-actions", children: (M = V(B)) == null ? void 0 : M.map((R, z) => g($.Link, { size: "small", uuid: R.uuid, type: R.type, name: R.name, widget: R.widget, widgetType: R.widgetType, widgetProps: R.widgetProps, widgetData: R.widgetData, widgetSetting: R.widgetSetting, widgetContainerProps: R.widgetContainerSetting, data: B, confirm: R.confirm, onAfterClick: (T) => T !== !1 && (N == null ? void 0 : N(R.isRefresh, B)) }, R.uuid || z)) }); + } : null }), g(i.footer, { isPaginate: f, isOperations: o, operations: s })] })] }); }, ie = x.createContext({ listCode: "", classNames: {}, getBase62params: (e, t) => { }, onReload: () => { }, onClickCallback: () => { @@ -301,97 +301,97 @@ const an = (e, t = {}) => H(() => e == null ? void 0 : e.map(({ widgetByJs: i, w const o = { "--grid-layout-h": `${n}`, "--grid-layout-w": `${i}`, "--grid-layout-x": `${e}`, "--grid-layout-y": `${t}`, "--grid-layout-row-height-offset": "0px" }; return r != null && r.autoHeight ? o.height = "fit-content" : o["--grid-layout-row"] = `${n}`, r != null && r.alignItems && (o["--grid-layout-box-align-items"] = r.alignItems), r != null && r.justifyContent && (o["--grid-layout-box-justify-content"] = r.justifyContent), o["--grid-layout-box-margin"] = Bt(r == null ? void 0 : r.marginTop, r == null ? void 0 : r.marginRight, r == null ? void 0 : r.marginBottom, r == null ? void 0 : r.marginLeft), o["--grid-layout-box-padding"] = Bt(r == null ? void 0 : r.paddingTop, r == null ? void 0 : r.paddingRight, r == null ? void 0 : r.paddingBottom, r == null ? void 0 : r.paddingLeft), a && (o.height = `${a}px`), o; }, Bt = (e, t, i, n) => `${e || 0}px ${t || 0}px ${i || 0}px ${n || 0}px`, Cr = (e = "Text", t = "@pkg/ff/grid-layouts") => e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`, ci = ({ className: e, isConditionFormLayout: t }) => { - var f, m; - const [i, n] = F({}), { listCode: r, onKeywordChange: a, onConditionChange: o, getBase62params: s, classNames: l } = x.useContext(ie), { keyword: u, condition: c } = (s == null ? void 0 : s()) || {}, [g] = Ge.useForm(); + var h, m; + const [i, n] = O({}), { listCode: r, onKeywordChange: a, onConditionChange: o, getBase62params: s, classNames: l } = x.useContext(ie), { keyword: u, condition: c } = (s == null ? void 0 : s()) || {}, [p] = Xe.useForm(); return L(() => { - r && t && j.get(`/api/_/${r}/list-condition-form-layout`).then(({ resource: h, marginX: b, marginY: C, rowHeight: k, cols: P, fields: S }) => { - n({ resource: h, itemMargin: [b, C], rowHeight: k, cols: P, fields: S }); + r && t && A.get(`/api/_/${r}/list-condition-form-layout`).then(({ resource: f, marginX: b, marginY: C, rowHeight: k, cols: S, fields: v }) => { + n({ resource: f, itemMargin: [b, C], rowHeight: k, cols: S, fields: v }); }).catch(() => n({})); }, [r, t]), L(() => { - g.setFieldsValue({ keyword: u, ...c }); - }, [JSON.stringify([u, c])]), p("div", { className: I("ff-data-list-filter", l.filter, e), children: p(Ge, { form: g, layout: "vertical", autoComplete: "off", onFinish: ((f = i.fields) == null ? void 0 : f.length) > 1 ? (h) => o({ [i.resource]: h[i.resource] }, h.keyword) : () => { - }, onValuesChange: (h) => { - d.isEmpty(d.omit(h, ["keyword"])) || g.submit(); - }, children: ((m = i.fields) == null ? void 0 : m.length) > 1 ? p(Tt, { ...i, children: p(un, { onReset: () => { - const { keyword: h, condition: b } = s("init") || {}; - g.setFieldsValue({ keyword: h, ...b }); - } }) }) : p("div", { className: "ff-data-list-filter-default-form ff-grid-layout-form", children: p("div", { className: "grid-layout-item", style: li(20, 0, 5, 2), children: p(Ge.Item, { name: ["keyword"], children: p(Ii.Search, { allowClear: !0, enterButton: "搜索", placeholder: "多关键字 | 分割", onSearch: (h) => a(h) }) }) }) }) }) }); + p.setFieldsValue({ keyword: u, ...c }); + }, [JSON.stringify([u, c])]), g("div", { className: I("ff-data-list-filter", l.filter, e), children: g(Xe, { form: p, layout: "vertical", autoComplete: "off", onFinish: ((h = i.fields) == null ? void 0 : h.length) > 1 ? (f) => o({ [i.resource]: f[i.resource] }, f.keyword) : () => { + }, onValuesChange: (f) => { + d.isEmpty(d.omit(f, ["keyword"])) || p.submit(); + }, children: ((m = i.fields) == null ? void 0 : m.length) > 1 ? g(Rt, { ...i, children: g(un, { onReset: () => { + const { keyword: f, condition: b } = s("init") || {}; + p.setFieldsValue({ keyword: f, ...b }); + } }) }) : g("div", { className: "ff-data-list-filter-default-form ff-grid-layout-form", children: g("div", { className: "grid-layout-item", style: li(20, 0, 5, 2), children: g(Xe.Item, { name: ["keyword"], children: g(Ii.Search, { allowClear: !0, enterButton: "搜索", placeholder: "多关键字 | 分割", onSearch: (f) => a(f) }) }) }) }) }) }); }, un = ({ cols: e, fields: t, onReset: i }) => { - const [n, r] = F(!1), a = H(() => t == null ? void 0 : t.toReversed().some((o) => o.y > 1 || o.x + o.w >= e - 5), [e, t]); - return O(Ge.Item, { label: " ", style: { "--item-span": 5 }, className: I("ff-data-list-filter-actions", { expanded: n }), children: [p(Xe, { onClick: i, children: "重置" }), p(Xe, { type: "primary", htmlType: "submit", children: "查询" }), a && p(N.Link, { className: "ff-data-list-filter-expanded-button", widget: () => r((o) => !o), type: "primary", name: n ? "关闭" : "展开", icon: n ? "icon-up" : "icon-down", iconPosition: "end" })] }); + const [n, r] = O(!1), a = H(() => t == null ? void 0 : t.toReversed().some((o) => o.y > 1 || o.x + o.w >= e - 5), [e, t]); + return j(Xe.Item, { label: " ", style: { "--item-span": 5 }, className: I("ff-data-list-filter-actions", { expanded: n }), children: [g(Ze, { onClick: i, children: "重置" }), g(Ze, { type: "primary", htmlType: "submit", children: "查询" }), a && g($.Link, { className: "ff-data-list-filter-expanded-button", widget: () => r((o) => !o), type: "primary", name: n ? "关闭" : "展开", icon: n ? "icon-up" : "icon-down", iconPosition: "end" })] }); }; ci.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 gn = ({ className: e, operations: t, isOperations: i, isPaginate: n }) => { const { onPageChange: r, onPageSizeChange: a, onClickCallback: o, getBase62params: s } = x.useContext(ie), { total: l, page: u, pageSize: c } = (s == null ? void 0 : s()) || {}; - return i && !d.isEmpty(t) || n ? O("div", { className: I("ff-data-list-footer", e), children: [p("div", { className: "ff-data-list-actions", children: t == null ? void 0 : t.map((g, f) => p(N, { uuid: g.uuid, type: g.type, name: g.name, widget: g.widget, widgetType: g.widgetType, widgetProps: g.widgetProps, widgetData: g.widgetData, widgetSetting: g.widgetSetting, widgetContainerProps: g.widgetContainerSetting, onAfterClick: (m) => m !== !1 && (o == null ? void 0 : o(g.isRefresh, null)) }, g.uuid || f)) }), n && p(Mi, { size: "small", total: l, pageSize: c, showSizeChanger: !1, showTotal: (g) => `第 ${u} 页 / 总共 ${g} 条`, onChange: r, onShowSizeChange: a })] }) : null; -}, pn = [{ 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: p("span", { style: { color: "#1677ff" }, children: "sss" }), key: "0-0-1-0" }] }] }], mn = ({ className: e, width: t = 280, isTreeSider: i }) => { + return i && !d.isEmpty(t) || n ? j("div", { className: I("ff-data-list-footer", e), children: [g("div", { className: "ff-data-list-actions", children: t == null ? void 0 : t.map((p, h) => g($, { uuid: p.uuid, type: p.type, name: p.name, widget: p.widget, widgetType: p.widgetType, widgetProps: p.widgetProps, widgetData: p.widgetData, widgetSetting: p.widgetSetting, widgetContainerProps: p.widgetContainerSetting, onAfterClick: (m) => m !== !1 && (o == null ? void 0 : o(p.isRefresh, null)) }, p.uuid || h)) }), n && g(Mi, { size: "small", total: l, pageSize: c, showSizeChanger: !1, showTotal: (p) => `第 ${u} 页 / 总共 ${p} 条`, onChange: r, onShowSizeChange: a })] }) : null; +}, pn = [{ 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" }] }] }], mn = ({ className: e, width: t = 280, isTreeSider: i }) => { const { classNames: n } = ce(ie); - return i ? p(zi.DirectoryTree, { className: I("ff-data-list-sider", n.sider, e), style: { "--sider-width": t }, showLine: !0, showIcon: !1, treeData: pn }) : null; + return i ? g(zi.DirectoryTree, { className: I("ff-data-list-sider", n.sider, e), style: { "--sider-width": t }, showLine: !0, showIcon: !1, treeData: pn }) : null; }, fn = ({ className: e, title: t, tabs: i }) => { const { getBase62params: n, onTabChange: r, onReload: a, classNames: o } = ce(ie), { tab: s } = (n == null ? void 0 : n()) || {}, [l, u] = Ji((i == null ? void 0 : i[0].value) ?? (i == null ? void 0 : i[0].code), { value: s, onChange: r }); - return O("div", { className: I("ff-data-list-toolbar", o.toolbar, e), children: [p("div", { className: "ff-data-list-title", children: t }), p(Bi, { className: "ff-data-list-tabs", itemRender: ({ label: c, code: g, value: f }) => p("span", { onClick: () => u(f ?? g), className: I("ff-data-list-tab", { active: (f ?? g) == l }), children: c }), items: i }), O("div", { className: "ff-data-list-actions", children: [p(N.Link, { icon: "icon-reload", widget: () => a() }), p(N.Link, { icon: "icon-setting" })] })] }); -}, di = ({ isItemGridLayout: e, theme: t, themeProps: i, onClickCallback: n, onReload: r, listCode: a, total: o = 0, page: s = 0, onPageChange: l, pageSize: u = 30, onPageSizeChange: c, tab: g, onTabChange: f, keyword: m, onKeywordChange: h, condition: b, onConditionChange: C, sider: k, onSiderChange: P, layouts: S, classNames: R = {}, payload: V = {}, ...q }) => { - const [A, M] = F(), T = X((v, B) => { - const K = { tab: g, page: s, pageSize: u, keyword: m, sider: k, condition: b, total: o, payload: V }; - return v && v != "init" ? d.get(K, v, B) : K; - }, [JSON.stringify(b), JSON.stringify(V), g, s, u, m, k, o]), z = H(() => { - let v = { sider: mn, filter: ci, footer: gn, toolbar: fn }; - S === !1 ? v = { sider: null, filter: null, footer: null, toolbar: null } : d.isPlainObject(S) && (v = Object.assign({}, v, S)); - for (const B in v) if (v[B]) { - if (ji(v[B])) { - const K = v[B]; - v[B] = (ge) => x.cloneElement(K, ge); + return j("div", { className: I("ff-data-list-toolbar", o.toolbar, e), children: [g("div", { className: "ff-data-list-title", children: t }), g(Bi, { className: "ff-data-list-tabs", itemRender: ({ label: c, code: p, value: h }) => g("span", { onClick: () => u(h ?? p), className: I("ff-data-list-tab", { active: (h ?? p) == l }), children: c }), items: i }), j("div", { className: "ff-data-list-actions", children: [g($.Link, { icon: "icon-reload", widget: () => a() }), g($.Link, { icon: "icon-setting" })] })] }); +}, di = ({ isItemGridLayout: e, theme: t, themeProps: i, onClickCallback: n, onReload: r, listCode: a, total: o = 0, page: s = 0, onPageChange: l, pageSize: u = 30, onPageSizeChange: c, tab: p, onTabChange: h, keyword: m, onKeywordChange: f, condition: b, onConditionChange: C, sider: k, onSiderChange: S, layouts: v, classNames: N = {}, payload: V = {}, ...q }) => { + const [B, M] = O(), R = X((T, F) => { + const J = { tab: p, page: s, pageSize: u, keyword: m, sider: k, condition: b, total: o, payload: V }; + return T && T != "init" ? d.get(J, T, F) : J; + }, [JSON.stringify(b), JSON.stringify(V), p, s, u, m, k, o]), z = H(() => { + let T = { sider: mn, filter: ci, footer: gn, toolbar: fn }; + v === !1 ? T = { sider: null, filter: null, footer: null, toolbar: null } : d.isPlainObject(v) && (T = Object.assign({}, T, v)); + for (const F in T) if (T[F]) { + if (ji(T[F])) { + const J = T[F]; + T[F] = (de) => x.cloneElement(J, de); } - } else v[B] = () => p(x.Fragment, {}); - return v; - }, [S]); + } else T[F] = () => g(x.Fragment, {}); + return T; + }, [v]); return L(() => { - t ? le.getWidgetComponent(t).then((v) => { - if (!v) throw `${t} not found`; - return v; - }).catch((v) => ({ default: () => `${v}` })).then((v) => M(x.createElement(v.default, { ...q, layouts: z, $setting: i }))) : M(p(e ? ln : dn, { ...q, layouts: z, $setting: i })); - }, [t, i]), p(ie.Provider, { value: { classNames: R, listCode: a, onClickCallback: n, onReload: r, getBase62params: T, onPageChange: l, onPageSizeChange: c, onTabChange: f, onSiderChange: P, onKeywordChange: h, onConditionChange: C }, children: A && x.cloneElement(A, q) }); + t ? le.getWidgetComponent(t).then((T) => { + if (!T) throw `${t} not found`; + return T; + }).catch((T) => ({ default: () => `${T}` })).then((T) => M(x.createElement(T.default, { ...q, layouts: z, $setting: i }))) : M(g(e ? ln : dn, { ...q, layouts: z, $setting: i })); + }, [t, i]), g(ie.Provider, { value: { classNames: N, listCode: a, onClickCallback: n, onReload: r, getBase62params: R, onPageChange: l, onPageSizeChange: c, onTabChange: h, onSiderChange: S, onKeywordChange: f, onConditionChange: C }, children: B && x.cloneElement(B, q) }); }; di.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 fe, ue, Pe, it; +var fe, ge, $e, rt; const ae = class ae { constructor() { - E(this, ue, null); - E(this, Pe, /* @__PURE__ */ new Map()); - E(this, it, () => { - if (y(this, ue)) return y(this, ue).port.postMessage({ command: "status", data: [] }); - U(this, ue, new SharedWorker(new URL("/ff-worker/res-ws.js", self.location))), y(this, ue).port.onmessage = (t) => { + E(this, ge, null); + E(this, $e, /* @__PURE__ */ new Map()); + E(this, rt, () => { + if (y(this, ge)) return y(this, ge).port.postMessage({ command: "status", data: [] }); + U(this, ge, new SharedWorker(new URL("/ff-worker/res-ws.js", self.location))), y(this, ge).port.onmessage = (t) => { var i, n; - (i = t.data) != null && i.uuid ? y(this, Pe).forEach((r, a) => { + (i = t.data) != null && i.uuid ? y(this, $e).forEach((r, a) => { var o; (r == "*" || (o = r == null ? void 0 : r.includes) != null && o.call(r, t.data.uuid)) && a(t.data); - }) : ((n = t.data) == null ? void 0 : n.readyState) == WebSocket.CLOSED && j.get("/api/user-api-token").then(({ token: r, expire_at: a }) => { - y(this, ue).port.postMessage({ command: "initWs", data: [`ws${d.trimStart(j.appUrl, "http")}api/user-resource-status-ws?token=${r}`] }); + }) : ((n = t.data) == null ? void 0 : n.readyState) == WebSocket.CLOSED && A.get("/api/user-api-token").then(({ token: r, expire_at: a }) => { + y(this, ge).port.postMessage({ command: "initWs", data: [`ws${d.trimStart(A.appUrl, "http")}api/user-resource-status-ws?token=${r}`] }); }); - }, y(this, ue).port.postMessage({ command: "status", data: [] }); + }, y(this, ge).port.postMessage({ command: "status", data: [] }); }); - $(this, "subscribe", (t, i = []) => (i ? Array.isArray(i) && i.length == 0 ? i = "*" : Array.isArray(i) || (i = [i].flat()) : i = "*", y(this, Pe).set(t, i), y(this, Pe).size == 1 && y(this, it).call(this), () => this.unsubscribe(t))); - $(this, "unsubscribe", (t) => y(this, Pe).delete(t)); + P(this, "subscribe", (t, i = []) => (i ? Array.isArray(i) && i.length == 0 ? i = "*" : Array.isArray(i) || (i = [i].flat()) : i = "*", y(this, $e).set(t, i), y(this, $e).size == 1 && y(this, rt).call(this), () => this.unsubscribe(t))); + P(this, "unsubscribe", (t) => y(this, $e).delete(t)); if (y(ae, fe)) return y(ae, fe); } }; -fe = new WeakMap(), ue = new WeakMap(), Pe = new WeakMap(), it = new WeakMap(), E(ae, fe, null), $(ae, "getInstance", () => (y(ae, fe) || U(ae, fe, new ae()), y(ae, fe))); -let bt = ae; -const ui = bt.getInstance(), Nt = x.forwardRef(({ listCode: e, base62params: t, className: i, theme: n, themeProps: r, layouts: a, classNames: o }, s) => { - const [{ resource: l, primaryKey: u, batchOperations: c = [], itemOperations: g = [], columns: f = [], themeConfig: m, theme: h, isConditionFormLayout: b = !1, isTreeSider: C, treeSiderConfig: k, isItemGridLayout: P, itemGridLayout: S, title: R, isPaginate: V, tabs: q }, A] = F({ isItemGridLayout: !1, itemGridLayout: {} }), M = on(e, t), [{ dataSource: T, itemOperationsAccess: z, condition: v, tab: B, keyword: K, page: ge, total: J, pageSize: st, sider: Je, onConditionChange: ot, onTabChange: Ot, onKeywordChange: xi, onPageChange: vi, onPageSizeChange: Si, onSiderChange: Pi, onReload: lt, payload: $i }, jt] = sn(M, e, u, l), Ni = wt(g, z, T, u), Ti = wt(c); +fe = new WeakMap(), ge = new WeakMap(), $e = new WeakMap(), rt = new WeakMap(), E(ae, fe, null), P(ae, "getInstance", () => (y(ae, fe) || U(ae, fe, new ae()), y(ae, fe))); +let Ct = ae; +const ui = Ct.getInstance(), Nt = x.forwardRef(({ listCode: e, base62params: t, className: i, theme: n, themeProps: r, layouts: a, classNames: o }, s) => { + const [{ resource: l, primaryKey: u, batchOperations: c = [], itemOperations: p = [], columns: h = [], themeConfig: m, theme: f, isConditionFormLayout: b = !1, isTreeSider: C, treeSiderConfig: k, isItemGridLayout: S, itemGridLayout: v, title: N, isPaginate: V, tabs: q }, B] = O({ isItemGridLayout: !1, itemGridLayout: {} }), M = on(e, t), [{ dataSource: R, itemOperationsAccess: z, condition: T, tab: F, keyword: J, page: de, total: ve, pageSize: Te, sider: Ne, onConditionChange: K, onTabChange: Et, onKeywordChange: xi, onPageChange: vi, onPageSizeChange: Si, onSiderChange: Pi, onReload: ct, payload: $i }, jt] = sn(M, e, u, l), Ti = bt(p, z, R, u), Ni = bt(c); L(() => { let Q = null; - return e && j.get(`/api/_/${e}`).resp(({ data: Ke, res: Fi }) => { - Ke != null && Ke.isDynamicRefresh && (Q = ui.subscribe(() => lt(), Fi)), A(Ke); - }).catch(() => A({})), () => Q == null ? void 0 : Q(); - }, [e]), x.useImperativeHandle(s, () => ({ onReload: lt, onClickCallback: jt })); - const Ri = { listCode: e, title: R, classNames: o, layouts: a, resource: l, primaryKey: u, theme: n || h, themeProps: r || m, isTreeSider: C, treeSiderConfig: k, isPaginate: V, tabs: q, isItemOperations: Ni, itemOperations: g == null ? void 0 : g.map((Q) => d.isEmpty(Q == null ? void 0 : Q.confirm) ? Q : { ...Q, confirm: Object.assign({}, Q.confirm, { getPopupContainer: () => document.body }) }), isBatchOperations: Ti, batchOperations: c, isItemGridLayout: P, columns: f, itemGridLayout: S, isConditionFormLayout: b, itemOperationsAccess: z, dataSource: T, onConditionChange: ot, onTabChange: Ot, onKeywordChange: xi, onPageChange: vi, onPageSizeChange: Si, onSiderChange: Pi, condition: v, tab: B, keyword: K, page: ge, total: J, pageSize: st, sider: Je, payload: $i }; - return p(di, { ...Ri, className: I("ff-data-list-helper", i), onReload: lt, onClickCallback: jt }); + return e && A.get(`/api/_/${e}`).resp(({ data: Ge, res: Fi }) => { + Ge != null && Ge.isDynamicRefresh && (Q = ui.subscribe(() => ct(), Fi)), B(Ge); + }).catch(() => B({})), () => Q == null ? void 0 : Q(); + }, [e]), x.useImperativeHandle(s, () => ({ onReload: ct, onClickCallback: jt })); + const Ri = { listCode: e, title: N, classNames: o, layouts: a, resource: l, primaryKey: u, theme: n || f, themeProps: r || m, isTreeSider: C, treeSiderConfig: k, isPaginate: V, tabs: q, isItemOperations: Ti, itemOperations: p == null ? void 0 : p.map((Q) => d.isEmpty(Q == null ? void 0 : Q.confirm) ? Q : { ...Q, confirm: Object.assign({}, Q.confirm, { getPopupContainer: () => document.body }) }), isBatchOperations: Ni, batchOperations: c, isItemGridLayout: S, columns: h, itemGridLayout: v, isConditionFormLayout: b, itemOperationsAccess: z, dataSource: R, onConditionChange: K, onTabChange: Et, onKeywordChange: xi, onPageChange: vi, onPageSizeChange: Si, onSiderChange: Pi, condition: T, tab: F, keyword: J, page: de, total: ve, pageSize: Te, sider: Ne, payload: $i }; + return g(di, { ...Ri, className: I("ff-data-list-helper", i), onReload: ct, onClickCallback: jt }); }), gi = (e, t, i = !0) => i !== !0 && i-- <= 0 ? [] : d.isArray(e) && !d.isEmpty(e) ? e.reduce((n, r) => (Reflect.has(r, t) && Reflect.has(r, "children") && n.push(r[t]), Reflect.has(r, "children") && !d.isEmpty(r.children) ? n.concat(gi(r.children, t, i)) : n), []) : [], hn = ({ className: e, primaryKey: t, columns: i = [], dataSource: n = [], operationRender: r, operationWidth: a = 180, ...o }) => { - const { classNames: s } = ce(ie), l = W(null), u = W(null), [c, g] = F([]), [f, m] = F({ width: 0, height: 0 }); + const { classNames: s } = ce(ie), l = W(null), u = W(null), [c, p] = O([]), [h, m] = O({ width: 0, height: 0 }); L(() => { - g(gi(n, t)); - }, [n, t]), Li(() => { + p(gi(n, t)); + }, [n, t]), Ai(() => { const b = new ResizeObserver(() => { var C; m({ width: ((C = l.current) == null ? void 0 : C.nativeElement.querySelector(".ant-table-body").scrollWidth) || u.current.offsetWidth, height: u.current.offsetHeight }); @@ -400,119 +400,119 @@ const ui = bt.getInstance(), Nt = x.forwardRef(({ listCode: e, base62params: t, u.current && b.unobserve(u.current); }; }, []); - const h = an(i); - return p("div", { ref: u, className: I("ff-data-list-table", s.content, e), children: f.height ? p(Di, { ...o, ref: l, rowKey: (b) => (b == null ? void 0 : b[t]) ?? Math.random(), columns: h == null ? void 0 : h.concat(r ? [{ title: "操作", align: "center", fixed: "right", width: `${Math.ceil(a / f.width * 100).toFixed(2)}%`, render: (b, C, k) => r(C, k) }] : []), dataSource: n, size: "middle", scroll: { x: "max-content", y: f.height - 50 }, pagination: !1, expandable: { defaultExpandAllRows: !0, expandRowByClick: !0, onExpandedRowsChange: g, expandedRowKeys: c } }) : null }); + const f = an(i); + return g("div", { ref: u, className: I("ff-data-list-table", s.content, e), children: h.height ? g(Di, { ...o, ref: l, rowKey: (b) => (b == null ? void 0 : b[t]) ?? Math.random(), columns: f == null ? void 0 : f.concat(r ? [{ title: "操作", align: "center", fixed: "right", width: `${Math.ceil(a / h.width * 100).toFixed(2)}%`, render: (b, C, k) => r(C, k) }] : []), dataSource: n, size: "middle", scroll: { x: "max-content", y: h.height - 50 }, pagination: !1, expandable: { defaultExpandAllRows: !0, expandRowByClick: !0, onExpandedRowsChange: p, expandedRowKeys: c } }) : null }); }, yn = "RC_FORM_INTERNAL_HOOKS", wn = (e, { initialValue: t, initialValueLanguage: i, convertJs: n, convertJsSetting: r, type: a = "string" }, o = null) => { - const s = W(!1), l = ce(Yt), [u, c] = F(), [g, f] = F(i != "javascript" && e ? l.getFieldValue(e) : void 0), { registerWatch: m } = l.getInternalHooks(yn) || {}; - return L(() => m == null ? void 0 : m((h, b, C) => { + const s = W(!1), l = ce(Yt), [u, c] = O(), [p, h] = O(i != "javascript" && e ? l.getFieldValue(e) : void 0), { registerWatch: m } = l.getInternalHooks(yn) || {}; + return L(() => m == null ? void 0 : m((f, b, C) => { if (!s.current) return; const k = d.get(b, e); - d.isEqual(k, g) || f(ee(k, a)); - }), [g]), L(() => { - i == "javascript" && t ? xe.exec(t, {}, { getFieldValueForBasicForm: (h) => o ? o.getFieldValue(h) : l.getFieldValue(h), getFieldValue: (h) => l.getFieldValue(h) }).then((h) => f(ee(h, a))).catch((h) => notification.error({ message: `布局数据错误: ${JSON.stringify(h)}` })).finally(() => s.current = !0) : (t && f(ee(t ?? l.getFieldValue(e), a)), s.current = !0); - }, [t, i]), Ue(() => { - s.current && n && new Qe([n, r]).toValue(g, l.getFieldsValue(!0)).then(c).catch((h) => { - c(h), console.error("布局数据转换错误: ", h, n); + d.isEqual(k, p) || h(ee(k, a)); + }), [p]), L(() => { + i == "javascript" && t ? xe.exec(t, {}, { getFieldValueForBasicForm: (f) => o ? o.getFieldValue(f) : l.getFieldValue(f), getFieldValue: (f) => l.getFieldValue(f) }).then((f) => h(ee(f, a))).catch((f) => notification.error({ message: `布局数据错误: ${JSON.stringify(f)}` })).finally(() => s.current = !0) : (t && h(ee(t ?? l.getFieldValue(e), a)), s.current = !0); + }, [t, i]), Ke(() => { + s.current && n && new et([n, r]).toValue(p, l.getFieldsValue(!0)).then(c).catch((f) => { + c(f), console.error("布局数据转换错误: ", f, n); }); - }, [g, n, r]), [u ?? g, g]; + }, [p, n, r]), [u ?? p, p]; }, pi = (e, t, i = null) => H(() => { var n; - return (n = d.sortBy(e, ["y", "x"])) == null ? void 0 : n.map(({ i: r, x: a, y: o, w: s, h: l, field: { boxStyle: u, ...c } }, g) => p("div", { className: "grid-layout-item", style: li(a, o, s, l, u), children: p(t, { ...c, basicForm: i }) }, r ?? g)); + return (n = d.sortBy(e, ["y", "x"])) == null ? void 0 : n.map(({ i: r, x: a, y: o, w: s, h: l, field: { boxStyle: u, ...c } }, p) => g("div", { className: "grid-layout-item", style: li(a, o, s, l, u), children: g(t, { ...c, basicForm: i }) }, r ?? p)); }, [e]), bn = ({ widget: e, widgetPrefix: t = "@pkg/ff/grid-layouts", basicForm: i, ...n }) => { - const r = e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`, [a, o] = F(); + const r = e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`, [a, o] = O(); return L(() => { r && le.getWidgetComponent(r).then(({ defaultProps: s = {}, default: l }) => ({ default: Cn(l, s, i) })).catch((s) => ({ default: () => `${s}` })).then((s) => o(x.createElement(s.default, n))); }, [r]), a; }, Cn = (e, t = {}, i = null) => (n) => { - const { code: r, label: a, extras: o, isVirtual: s, initialValue: l, initialValueLanguage: u, convertJs: c, convertJsSetting: g, value: f, ...m } = d.merge({}, t, n), [h, b] = wn(s ? null : r, { initialValue: l, initialValueLanguage: u, convertJs: c, convertJsSetting: g, type: (m == null ? void 0 : m.type) || "string" }, i), C = H(() => { - const S = Object.keys((t == null ? void 0 : t.extras) || {}); - return d.over([d.partialRight(d.pick, S), d.partialRight(d.omit, S)]); - }, [t == null ? void 0 : t.extras]), [k, P] = C(m); - return p(e, { ...P, value: h, rawValue: b, $setting: Object.assign({}, o, k) }); + const { code: r, label: a, extras: o, isVirtual: s, initialValue: l, initialValueLanguage: u, convertJs: c, convertJsSetting: p, value: h, ...m } = d.merge({}, t, n), [f, b] = wn(s ? null : r, { initialValue: l, initialValueLanguage: u, convertJs: c, convertJsSetting: p, type: (m == null ? void 0 : m.type) || "string" }, i), C = H(() => { + const v = Object.keys((t == null ? void 0 : t.extras) || {}); + return d.over([d.partialRight(d.pick, v), d.partialRight(d.omit, v)]); + }, [t == null ? void 0 : t.extras]), [k, S] = C(m); + return g(e, { ...S, value: f, rawValue: b, $setting: Object.assign({}, o, k) }); }, mi = ({ className: e, cols: t = 12, rowHeight: i = 21, containerPadding: n = [0, 0], itemMargin: r = [4, 0], formProps: a = {}, fields: o = [], data: s, basicForm: l = null, ...u }) => { - const [c] = te.useForm(), g = pi(o, bn, l), f = H(() => [{ name: "__PROPS__", value: a }], [a]); - return Ue(() => (c.setFieldsValue(s), () => c.resetFields()), [s]), p(te, { fields: f, form: c, component: !1, children: p("div", { ...u, className: I("ff-grid-layout", e), style: { "--grid-layout-item-margin-y": `${(r == null ? void 0 : r[0]) || 0}px`, "--grid-layout-item-margin-x": `${(r == null ? void 0 : r[1]) || 0}px`, "--grid-layout-container-padding-y": `${(n == null ? void 0 : n[0]) || 0}px`, "--grid-layout-container-padding-x": `${(n == null ? void 0 : n[1]) || 0}px`, "--grid-layout-cols": t, "--grid-layout-row-height": `${i}px` }, children: g }) }); + const [c] = te.useForm(), p = pi(o, bn, l), h = H(() => [{ name: "__PROPS__", value: a }], [a]); + return Ke(() => (c.setFieldsValue(s), () => c.resetFields()), [s]), g(te, { fields: h, form: c, component: !1, children: g("div", { ...u, className: I("ff-grid-layout", e), style: { "--grid-layout-item-margin-y": `${(r == null ? void 0 : r[0]) || 0}px`, "--grid-layout-item-margin-x": `${(r == null ? void 0 : r[1]) || 0}px`, "--grid-layout-container-padding-y": `${(n == null ? void 0 : n[0]) || 0}px`, "--grid-layout-container-padding-x": `${(n == null ? void 0 : n[1]) || 0}px`, "--grid-layout-cols": t, "--grid-layout-row-height": `${i}px` }, children: p }) }); }, kr = (Dt = mi, function({ code: e, data: t, ...i }) { - const [n, r] = F({ resource: null, cols: 12, rowHeight: 21, fields: [] }); + const [n, r] = O({ resource: null, cols: 12, rowHeight: 21, fields: [] }); return L(() => { - e && j.get(`/api/_/${e}`).then((a) => r(d.pick(a, ["resource", "cols", "rowHeight", "fields"]))); - }, [e]), (n == null ? void 0 : n.resource) && p(Dt, { ...i, rowHeight: n.rowHeight, cols: n.cols, fields: n.fields, data: n != null && n.resource ? { [n == null ? void 0 : n.resource]: t } : {} }); + e && A.get(`/api/_/${e}`).then((a) => r(d.pick(a, ["resource", "cols", "rowHeight", "fields"]))); + }, [e]), (n == null ? void 0 : n.resource) && g(Dt, { ...i, rowHeight: n.rowHeight, cols: n.cols, fields: n.fields, data: n != null && n.resource ? { [n == null ? void 0 : n.resource]: t } : {} }); }); var Dt; -const kn = ({ column: e = 0, colWidth: t = 0, cols: i, rowHeight: n, itemMargin: r, fields: a, primaryKey: o, dataSource: s, itemClassName: l, beforeRender: u = null, afterRender: c = null, itemRender: g = (b, C, k) => b, empty: f = p(qi, { description: null }), className: m, style: h = {} }) => { - const { classNames: b } = ce(ie), C = H(() => p(mi, { cols: i, rowHeight: n, itemMargin: r, fields: a, className: l }), [a, i, n, r]), k = d.isEmpty(s); - return O("div", { className: I("ff-data-list-content", b.content, m), style: Object.assign({}, h, e && { "--col-num": e }, t && { "--col-width": t }), children: [u == null ? void 0 : u(s), k ? f : s.map((P, S) => { - const R = g(x.cloneElement(C, { data: P }), P, S); - return x.cloneElement(R, { key: `${(P == null ? void 0 : P[o]) ?? S}-${rn(P)}` }); +const kn = ({ column: e = 0, colWidth: t = 0, cols: i, rowHeight: n, itemMargin: r, fields: a, primaryKey: o, dataSource: s, itemClassName: l, beforeRender: u = null, afterRender: c = null, itemRender: p = (b, C, k) => b, empty: h = g(qi, { description: null }), className: m, style: f = {} }) => { + const { classNames: b } = ce(ie), C = H(() => g(mi, { cols: i, rowHeight: n, itemMargin: r, fields: a, className: l }), [a, i, n, r]), k = d.isEmpty(s); + return j("div", { className: I("ff-data-list-content", b.content, m), style: Object.assign({}, f, e && { "--col-num": e }, t && { "--col-width": t }), children: [u == null ? void 0 : u(s), k ? h : s.map((S, v) => { + const N = p(x.cloneElement(C, { data: S }), S, v); + return x.cloneElement(N, { key: `${(S == null ? void 0 : S[o]) ?? v}-${rn(S)}` }); }), c == null ? void 0 : c(s)] }); }, xn = ({ component: e, $props: t }) => { - const { base62params: i } = We(t, {}); - return p(Y, { children: p(Nt, { listCode: e, base62params: j.decode(i) }) }); -}, xr = () => p(fi, {}), fi = () => "Empty", vn = ({ component: e, $setting: t, $props: i }) => { - const [n, r] = F(); + const { base62params: i } = Je(t, {}); + return g(Y, { children: g(Nt, { listCode: e, base62params: A.decode(i) }) }); +}, xr = () => g(fi, {}), fi = () => "Empty", vn = ({ component: e, $setting: t, $props: i }) => { + const [n, r] = O(); L(() => { - if (!e) return r(p(fi, { description: null })); + if (!e) return r(g(fi, { description: null })); le.getWidgetComponent(e).catch((o) => ({ default: () => `${o}` })).then((o) => x.createElement(o.default, { $setting: t })).then(r); }, [e]); - const a = We(i, {}); + const a = Je(i, {}); return n ? x.cloneElement(n, a) : null; }, vr = () => "NotFoundPage"; -var he, Z, ye, we, Be, De; +var he, Z, ye, we, We, Ue; const se = class se { constructor() { E(this, Z, /* @__PURE__ */ new Map()); E(this, ye, {}); E(this, we, null); - $(this, "init", (t, i) => { + P(this, "init", (t, i) => { U(this, Z, t), U(this, ye, i); }); - $(this, "get", (t) => (y(this, Z).has(t) || (t = Array.from(y(this, Z).keys()).find((i) => y(this, Z).get(i).uri === t)), y(this, Z).get(t) || {})); - $(this, "redirect", (t, i, n = {}) => { - const { uri: r, type: a, widgetProps: o } = this.get(t) || {}, { router: s, query: l, ...u } = i || {}, c = Object.assign({}, u, s), g = Object.assign({}, u, l); - a == "list" && (c.base62params = j.encode(c != null && c.base62params ? c.base62params : c)); - let f = Ki(r || t, c); + P(this, "get", (t) => (y(this, Z).has(t) || (t = Array.from(y(this, Z).keys()).find((i) => y(this, Z).get(i).uri === t)), y(this, Z).get(t) || {})); + P(this, "redirect", (t, i, n = {}) => { + const { uri: r, type: a, widgetProps: o } = this.get(t) || {}, { router: s, query: l, ...u } = i || {}, c = Object.assign({}, u, s), p = Object.assign({}, u, l); + a == "list" && (c.base62params = A.encode(c != null && c.base62params ? c.base62params : c)); + let h = Ki(r || t, c); const m = new URLSearchParams(); - for (const h in o || {}) (o == null ? void 0 : o.type) == "query" && Object.has(g, h) && m.append(h, JSON.stringify(g[h])); - return m.size > 0 && (f = `${f}?${m.toString()}`), n != null && n.isOpenWindow ? window.open(f) : y(this, we).navigate(f, { replace: !!(n != null && n.isReplaceRouteHistory) }); + for (const f in o || {}) (o == null ? void 0 : o.type) == "query" && Object.has(p, f) && m.append(f, JSON.stringify(p[f])); + return m.size > 0 && (h = `${h}?${m.toString()}`), n != null && n.isOpenWindow ? window.open(h) : y(this, we).navigate(h, { replace: !!(n != null && n.isReplaceRouteHistory) }); }); - $(this, "getMenus", (t) => { + P(this, "getMenus", (t) => { var i; return ((i = y(this, ye)) == null ? void 0 : i[t]) || []; }); - $(this, "findMenuPathByUuid", (t) => { + P(this, "findMenuPathByUuid", (t) => { let i = []; - for (const n in y(this, ye)) if (i = y(this, Be).call(this, y(this, ye)[n], t, [n]), i.length > 1) return i; + for (const n in y(this, ye)) if (i = y(this, We).call(this, y(this, ye)[n], t, [n]), i.length > 1) return i; return i; }); - $(this, "getMenusByRouteUuid", (t) => y(this, De).call(this, t, Object.values(y(this, ye)).flat())); - E(this, Be, (t, i, n = []) => { + P(this, "getMenusByRouteUuid", (t) => y(this, Ue).call(this, t, Object.values(y(this, ye)).flat())); + E(this, We, (t, i, n = []) => { if (d.isEmpty(t)) return n; for (const { uuid: r, children: a } of t) { if (r == i) return n.concat(r); - if (!d.isEmpty(a)) return n.concat(r, y(this, Be).call(this, a, i)); + if (!d.isEmpty(a)) return n.concat(r, y(this, We).call(this, a, i)); } return n; }); - E(this, De, (t, i) => { + E(this, Ue, (t, i) => { var r; let n = []; - for (const a of i) a.widgetType == "redirect" && (a.uuid == t || a.widget == t ? n.push(a) : (r = a.children) != null && r.length && (n = n.concat(y(this, De).call(this, t, a.children)))); + for (const a of i) a.widgetType == "redirect" && (a.uuid == t || a.widget == t ? n.push(a) : (r = a.children) != null && r.length && (n = n.concat(y(this, Ue).call(this, t, a.children)))); return n; }); - $(this, "getCurrentMenu", () => { + P(this, "getCurrentMenu", () => { const { uuid: t } = this.getCurrentRoute() || {}; if (!t) return; const i = this.getMenusByRouteUuid(t); return d.isEmpty(i) ? void 0 : i[0]; }); - $(this, "getCurrentRoute", (t = 0) => { + P(this, "getCurrentRoute", (t = 0) => { var n; const i = (n = y(this, we).state.matches[y(this, we).state.matches.length - 1 - t]) == null ? void 0 : n.route; if (!i) return null; for (let [r, a] of y(this, Z)) if (a.uri === i.path) return a; return null; }); - $(this, "getPageParams", (t) => { + P(this, "getPageParams", (t) => { var r, a, o; let i = "", n = {}; if (Zt()) n = _i(), i = (r = Gi()) == null ? void 0 : r.search; @@ -524,66 +524,66 @@ const se = class se { n[l] = s; }), t ? d.get(n, t) : n; }); - $(this, "createBrowserRouter", (t = {}) => { + P(this, "createBrowserRouter", (t = {}) => { if (y(this, Z).size == 0) return null; - const i = Le.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/ff/frameworks/DefaultTheme"), n = Le.get(le.checkUserToken() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"), r = { [i]: 0 }, a = (s, l) => () => Promise.all([le.getWidgetComponent(s), We(l)]).then(([u, c]) => [u.default || function() { + const i = Ie.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/ff/frameworks/DefaultTheme"), n = Ie.get(le.checkUserToken() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"), r = { [i]: 0 }, a = (s, l) => () => Promise.all([le.getWidgetComponent(s), Je(l)]).then(([u, c]) => [u.default || function() { return `${s}`; - }, c]).then(([u, c]) => ({ Component: () => x.createElement(ti, {}, x.createElement(u, { $setting: c })) })), o = Array.from(y(this, Z).values()).reduce((s, { uuid: l, uri: u, name: c, type: g, component: f, widgetSetting: m, widgetProps: h, isLogin: b, isLayout: C, extra: k }) => { - let P = {}, S = 0; - switch (g) { + }, c]).then(([u, c]) => ({ Component: () => x.createElement(ti, {}, x.createElement(u, { $setting: c })) })), o = Array.from(y(this, Z).values()).reduce((s, { uuid: l, uri: u, name: c, type: p, component: h, widgetSetting: m, widgetProps: f, isLogin: b, isLayout: C, extra: k }) => { + let S = {}, v = 0; + switch (p) { case "list": - P.element = x.createElement(xn, { component: f, $props: h }); + S.element = x.createElement(xn, { component: h, $props: f }); break; case "fsdpf-component": - P.element = x.createElement(vn, { key: f, component: f, $setting: m, $props: h }); + S.element = x.createElement(vn, { key: h, component: h, $setting: m, $props: f }); } - const R = (k == null ? void 0 : k.theme) ?? (k == null ? void 0 : k.layout); - if (R) { + const N = (k == null ? void 0 : k.theme) ?? (k == null ? void 0 : k.layout); + if (N) { const V = (k == null ? void 0 : k.themeProps) ?? (k == null ? void 0 : k.layoutProps); - if (!r[R]) return r[R] = s.length, [...s, { path: "/", lazy: a(R, V), children: [{ path: u, ...P }] }]; - S = r[R]; + if (!r[N]) return r[N] = s.length, [...s, { path: "/", lazy: a(N, V), children: [{ path: u, ...S }] }]; + v = r[N]; } - return C && S > -1 ? (s[S].children.push({ path: u, ...P }), s) : [...s, { path: u, ...P }]; + return C && v > -1 ? (s[v].children.push({ path: u, ...S }), s) : [...s, { path: u, ...S }]; }, [{ path: "/", lazy: a(i, {}), children: [] }]); return o.push({ index: !0, element: x.createElement(Sn, { to: n, replace: !0 }) }), U(this, we, Yi(o, t)); }); if (y(se, he)) return y(se, he); } }; -he = new WeakMap(), Z = new WeakMap(), ye = new WeakMap(), we = new WeakMap(), Be = new WeakMap(), De = new WeakMap(), E(se, he, null), $(se, "getInstance", () => (y(se, he) || U(se, he, new se()), y(se, he))); -let Ct = se; -const Sn = ({ to: e, replace: t }) => Zt() ? x.createElement(Xi, { to: e, replace: t }) : (window.document.location = e, "redirect"), ke = Ct.getInstance(), $e = new Worker(new URL("/ff-worker/index.js", self.location)), qt = { getConfigure: (e) => Le.get(e), route: { redirect: (...e) => ke.redirect(...e), getPageParams: (...e) => ke.getPageParams(...e), getCurrentRoute: () => ke.getCurrentRoute() }, popup: { notification: (...e) => G.notification(...e), success: (...e) => G.success(...e), error: (...e) => G.error(...e), form: (...e) => G.form(...e), modal: (...e) => G.modal(...e), confirm: (...e) => G.confirm(...e) } }; -var nt, Fe, be; +he = new WeakMap(), Z = new WeakMap(), ye = new WeakMap(), we = new WeakMap(), We = new WeakMap(), Ue = new WeakMap(), E(se, he, null), P(se, "getInstance", () => (y(se, he) || U(se, he, new se()), y(se, he))); +let kt = se; +const Sn = ({ to: e, replace: t }) => Zt() ? x.createElement(Xi, { to: e, replace: t }) : (window.document.location = e, "redirect"), ke = kt.getInstance(), Re = new Worker(new URL("/ff-worker/index.js", self.location)), qt = { getConfigure: (e) => Ie.get(e), route: { redirect: (...e) => ke.redirect(...e), getPageParams: (...e) => ke.getPageParams(...e), getCurrentRoute: () => ke.getCurrentRoute() }, popup: { notification: (...e) => G.notification(...e), success: (...e) => G.success(...e), error: (...e) => G.error(...e), form: (...e) => G.form(...e), modal: (...e) => G.modal(...e), confirm: (...e) => G.confirm(...e) } }; +var at, je, be; const D = class D { constructor() { - $(this, "exec", (t, i = {}, n = {}, r = "") => new Promise((a, o) => { + P(this, "exec", (t, i = {}, n = {}, r = "") => new Promise((a, o) => { if (!/^(?!\s*(\/\/|\/\*|\*)).*?\S+/m.test(t)) return a(); - const s = Vt(D, nt)._++; - y(D, Fe).set(s, n), D.mQueue.set(s, [a, o]), $e.postMessage({ id: s, session: r, category: "eval", method: t, args: i }); + const s = Vt(D, at)._++; + y(D, je).set(s, n), D.mQueue.set(s, [a, o]), Re.postMessage({ id: s, session: r, category: "eval", method: t, args: i }); })); - $(this, "clear", (t) => $e.postMessage({ session: t, category: "clear" })); + P(this, "clear", (t) => Re.postMessage({ session: t, category: "clear" })); if (y(D, be)) return y(D, be); Promise.resolve().then(() => _n).then((t) => { qt.http = t.http; - }), $e.addEventListener("message", ({ data: { id: t, task_id: i, method: n, args: r, category: a, data: o, error: s, session: l } }) => { - if (a === "eval" && D.mQueue.has(t)) s !== null ? D.mQueue.get(t)[1](s) : D.mQueue.get(t)[0](o), y(D, Fe).delete(t), D.mQueue.delete(t); + }), Re.addEventListener("message", ({ data: { id: t, task_id: i, method: n, args: r, category: a, data: o, error: s, session: l } }) => { + if (a === "eval" && D.mQueue.has(t)) s !== null ? D.mQueue.get(t)[1](s) : D.mQueue.get(t)[0](o), y(D, je).delete(t), D.mQueue.delete(t); else if (a === "util") try { - const u = d.get(qt, n.split("/")) || d.get(y(D, Fe).get(i), n.split("/")); + const u = d.get(qt, n.split("/")) || d.get(y(D, je).get(i), n.split("/")); if (!d.isFunction(u)) throw `${n} not found`; Promise.resolve(Reflect.apply(u, void 0, r)).then((c) => { - $e.postMessage({ id: t, task_id: i, category: a, method: n, args: r, session: l, data: c, error: null }); + Re.postMessage({ id: t, task_id: i, category: a, method: n, args: r, session: l, data: c, error: null }); }).catch((c) => { - $e.postMessage({ id: t, task_id: i, category: a, method: n, args: r, session: l, data: null, error: c }); + Re.postMessage({ id: t, task_id: i, category: a, method: n, args: r, session: l, data: null, error: c }); }); } catch (u) { - $e.postMessage({ id: t, task_id: i, category: a, method: n, args: r, session: l, data: null, error: u }); + Re.postMessage({ id: t, task_id: i, category: a, method: n, args: r, session: l, data: null, error: u }); } }, !1); } }; -nt = new WeakMap(), Fe = new WeakMap(), be = new WeakMap(), $(D, "mQueue", /* @__PURE__ */ new Map()), E(D, nt, 0), E(D, Fe, /* @__PURE__ */ new Map()), E(D, be, null), $(D, "getInstance", () => (y(D, be) || U(D, be, new D()), y(D, be))); -let kt = D; -const xe = kt.getInstance(), rt = () => { +at = new WeakMap(), je = new WeakMap(), be = new WeakMap(), P(D, "mQueue", /* @__PURE__ */ new Map()), E(D, at, 0), E(D, je, /* @__PURE__ */ new Map()), E(D, be, null), P(D, "getInstance", () => (y(D, be) || U(D, be, new D()), y(D, be))); +let xt = D; +const xe = xt.getInstance(), st = () => { const e = W(!0), [, t] = x.useReducer((i) => i + 1, 0); return L(() => () => e.current = !1, []), () => e.current && t(); }, Sr = (e) => { @@ -592,33 +592,33 @@ const xe = kt.getInstance(), rt = () => { t.current = e; }, [e]), t.current; }, Pr = (e) => { - const [t, i] = F(e), n = W(null), r = X((a, o) => { + const [t, i] = O(e), n = W(null), r = X((a, o) => { n.current = o, i(a); }, []); return L(() => { n.current && (n.current(t), n.current = null); }, [t]), [t, r]; -}, Ue = (e = (n) => { +}, Ke = (e = (n) => { }, t, i = d.isEqual) => { const n = x.useRef(); i(t, n.current) || (n.current = d.cloneDeep(t)), x.useEffect(e, [n.current]); -}, at = Ue, hi = (e, t = "string") => { +}, ot = Ke, hi = (e, t = "string") => { var i; if (!Array.isArray(e)) return e; for (let n = 0; n < e.length; n++) e[n].value = ee((i = e[n]) == null ? void 0 : i.value, t), e[n] && Reflect.has(e[n], "children") && (e[n].children = hi(e[n].children, t)); return e; }, $r = (e, t = "json", i = "string", n, r = null) => { - const [a] = te.useForm(n), [o, s] = F([{ label: "无", value: "", disabled: !0 }]), l = W([]), u = te.useWatch((c) => l.current.length === 0 ? null : d.pick(c, l.current), a) || null; + const [a] = te.useForm(n), [o, s] = O([{ label: "无", value: "", disabled: !0 }]), l = W([]), u = te.useWatch((c) => l.current.length === 0 ? null : d.pick(c, l.current), a) || null; return L(() => { Array.isArray(e) ? s(e) : t === "javascript" && e ? xe.exec(e, {}, { getFieldValue: (c) => (l.current.includes(c) || l.current.push(c), a.getFieldValue(c)), getFieldValueForBasicForm: (c) => (l.current.includes(c) || l.current.push(c), r ? r.getFieldValue(c) : a.getFieldValue(c)) }).then((c) => { s(ee(c, "array")); }) : e && s(ee(e, "array")); }, [e, t, u]), hi(o, i); -}, Nr = (e) => { - const [t, i] = F(), n = { type: "GET" }; +}, Tr = (e) => { + const [t, i] = O(), n = { type: "GET" }; if (typeof e == "string" ? n.url = e : d.isPlainObject(e) && Object.assign(n, e), !(n != null && n.url)) throw "url is required"; - const r = (a) => j.request(n, !1).resp((o) => (console.log("useSubscribeRequest", a), i(o), o)); - return Ue(() => { + const r = (a) => A.request(n, !1).resp((o) => (console.log("useSubscribeRequest", a), i(o), o)); + return Ke(() => { let a = null; return r().then((o) => { a = ui.subscribe(d.throttle(r, 180, { leading: !1, trailing: !0 }), o.res); @@ -627,73 +627,77 @@ const xe = kt.getInstance(), rt = () => { }, Pn = (e) => { const [t, i] = x.useState({ gridItems: [], hideItems: [] }); return x.useEffect(() => { - e && j.get(`/api/_/${e}`).then(({ pk: n, uuid: r, code: a, resource: o, align: s, cols: l, rowHeight: u, marginX: c, marginY: g, listenChangeFields: f, listenChangeFieldsFunc: m, fields: h }) => ({ pk: n, uuid: r, code: a, resource: o, align: s, cols: l, rowHeight: u, marginX: c, marginY: g, listenChangeFields: f, listenChangeFieldsFunc: m, ...h.reduce((b, C) => { + e && A.get(`/api/_/${e}`).then(({ pk: n, uuid: r, code: a, resource: o, align: s, cols: l, rowHeight: u, marginX: c, marginY: p, listenChangeFields: h, listenChangeFieldsFunc: m, fields: f }) => ({ pk: n, uuid: r, code: a, resource: o, align: s, cols: l, rowHeight: u, marginX: c, marginY: p, listenChangeFields: h, listenChangeFieldsFunc: m, ...f.reduce((b, C) => { var k; return (k = C == null ? void 0 : C.field) != null && k.hidden ? b.hides.push(C == null ? void 0 : C.field) : b.items.push(C), b; }, { items: [], hides: [] }) })).then(i); }, [e]), t; }, $n = ({ max: e = 0, min: t = 0, type: i = "", message: n, pattern: r, required: a = !1, validator: o } = {}, s, l) => { - const [u, c] = F([]); + const [u, c] = O([]); return L(() => { - const g = []; + const p = []; if (a) { - let f = l; + let h = l; switch (l) { case "number": case "string": case "array": break; case "bool": - f = "boolean"; + h = "boolean"; break; case "json": - f = "object"; + h = "object"; } - g.push({ type: f, required: !0, whitespace: !0, message: "该项必填" }); + p.push({ type: h, required: !0, whitespace: !0, message: "该项必填" }); } switch (i) { case "string": - g.push({ type: i, max: e, min: t, message: n || (t && e ? `字符必须在 ${t} ~ ${e} 之间` : `${e ? "最多能有" : "最少要有"} ${t || e} 个字符`) }); + p.push({ type: i, max: e, min: t, message: n || (t && e ? `字符必须在 ${t} ~ ${e} 之间` : `${e ? "最多能有" : "最少要有"} ${t || e} 个字符`) }); break; case "pattern": - g.push({ type: "string", pattern: r, message: n }); + p.push({ type: "string", pattern: r, message: n }); break; case "validator": - o && g.push(({ getFieldValue: f }) => ({ validator: async (m, h) => { - const b = await xe.exec(o, { value: h, fieldName: s }, { getFieldValue: f }); + o && p.push(({ getFieldValue: h }) => ({ validator: async (m, f) => { + const b = await xe.exec(o, { value: f, fieldName: s }, { getFieldValue: h }); return d.isString(b) && b ? Promise.reject(b) : d.isBoolean(b) && !b ? Promise.reject(n) : Promise.resolve(); } })); } - c(g); + c(p); }, [e, t, i, n, r, a, o]), u; -}, Nn = (e, t, i) => { - const [n, r] = F(null); +}, Tn = (e, t, i) => { + const [n, r] = O(null); return L(() => { const { initDataUri: a = `/api/${e}`, initDataMethod: o = "GET" } = i || {}; - t && j.request({ method: o, url: d.trimEnd(`${a}/${t}`, "/") }).then((s) => { + t && A.request({ method: o, url: d.trimEnd(`${a}/${t}`, "/") }).then((s) => { r(s); }); }, [e, t, i]), n; }, yi = (e, t, i = {}, n = {}, r = {}) => { - const a = ce(Yt), o = rt(), s = W(!0), l = W([]), [u, c] = F(t), g = te.useWatch((f) => JSON.stringify(d.pick(f, l.current)), a) || "{}"; - return at(() => { - e && xe.exec(e, i, { ...n, getFieldValueForBasicForm: (f) => r ? r.getFieldValue(f) : null, getFieldValue: d.wrap(a.getFieldValue, (f, m) => (l.current.some((h) => d.isEqual(h, m)) || (l.current.push(m), o()), f == null ? void 0 : f(m))), isFieldTouched: a.isFieldTouched, isFieldsTouched: a.isFieldsTouched }).then((f) => s.current && c(f)); - }, [e, g, a, i, n]), L(() => () => s.current = !1, []), u; -}, Tn = (e, t, i = [], n = {}) => { - const r = W({}); + const a = ce(Yt), o = st(), s = W(!0), l = W([]), [u, c] = O(t), [p, h] = O(), m = te.useWatch((f) => JSON.stringify(d.pick(f, l.current)), a) || "{}"; + return ot(() => { + e && xe.exec(e, i, { ...n, getFieldValueForBasicForm: (f) => r ? r.getFieldValue(f) : null, getFieldValue: d.wrap(a.getFieldValue, (f, b) => (l.current.some((C) => d.isEqual(C, b)) || (l.current.push(b), o()), f == null ? void 0 : f(b))), isFieldTouched: a.isFieldTouched, isFieldsTouched: a.isFieldsTouched }).then((f) => { + s.current && (c(f), h(null)); + }).catch((f) => { + s.current && (c(t), h(f)); + }); + }, [e, m, a, i, n]), L(() => () => s.current = !1, []), e ? [u, p] : [t, null]; +}, Nn = (e, t, i = [], n = {}) => { + const r = W({}), a = W(), o = d.debounce(st(), 180), s = ["disabled", "required"], l = (h, m) => { + s.includes(h) && (r.current[h] = m), o(); + }, u = H(() => ({ setDisabled: (h) => l("disabled", h), setRequired: (h) => l("required", h), getDisabled: () => r.current.disabled, getRequired: () => r.current.required }), [t]); if (!t) return [e, r.current]; - const a = W(), o = d.debounce(rt(), 180), s = ["disabled", "required"], l = (g, f) => { - s.includes(g) && (r.current[g] = f), o(); - }, u = H(() => ({ setDisabled: (g) => l("disabled", g), setRequired: (g) => l("required", g), getDisabled: () => r.current.disabled, getRequired: () => r.current.required }), [t]), c = yi(t, -1, {}, u, n) ?? -1; + const [c, p] = yi(t, -1, {}, u, n); if (a.current != c && (c >= 0 || !d.isEmpty(i == null ? void 0 : i[c]))) { a.current = c; - const { widget: g, widgetPrefix: f, props: m } = i == null ? void 0 : i[c]; - e = ni(g, f), r.current = d.merge(m, d.pick(r.current, s)); + const { widget: h, widgetPrefix: m, props: f } = i == null ? void 0 : i[c]; + e = ni(h, m), r.current = d.merge(f, d.pick(r.current, s)); } return [e, r.current]; -}, Wt = (e) => e === void 0 || e === !1 ? "" : (Array.isArray(e) ? e : [e]).join("_"), Tr = ({ value: e, onChange: t }, i = null) => { +}, Wt = (e) => e === void 0 || e === !1 ? "" : (Array.isArray(e) ? e : [e]).join("_"), Nr = ({ value: e, onChange: t }, i = null) => { const n = W(), [r] = te.useForm(i), a = W({}); - return at(() => { + return ot(() => { d.isEqual(n.current, e) || r.setFieldsValue(e); }, [e]), L(() => () => r.resetFields(), []), [H(() => r.__INTERNAL__ ? r : { ...r, __INTERNAL__: { itemRef: (o) => (s) => { const l = Wt(o); @@ -709,159 +713,162 @@ const xe = kt.getInstance(), rt = () => { n.current = s, t == null || t(s); }]; }, Rn = ({ type: e, initialValue: t, initialValueLanguage: i, onChange: n, basicForm: r }) => { - const a = yi(i == "javascript" && t, i == "javascript" ? void 0 : t, {}, {}, r); + const [a, o] = yi(i == "javascript" && t, i == "javascript" ? void 0 : t, {}, {}, r); return L(() => { i == "javascript" ? n(ee(a, e)) : t && n(ee(t, e)); }, [e, t, a]), null; }, wi = ({ widget: e = "Input", widgetPrefix: t = "@pkg/ff/grid-layout-forms", widgetDecorator: i, subWidgets: n = [], basicForm: r, ...a }) => { - const o = ni(e, t), [s, l] = Tn(o, i, n, r), [u, c] = F(); + const o = ni(e, t), [s, l] = Nn(o, i, n, r), [u, c] = O(); return L(() => { - s && le.getWidgetComponent(s).then(({ defaultProps: g = {}, default: f }) => ({ default: Fn(f, g, r) })).catch((g) => ({ default: () => `${g}` })).then((g) => c(x.createElement(g.default, a))); + s && le.getWidgetComponent(s).then(({ defaultProps: p = {}, default: h }) => ({ default: Fn(h, p, r) })).catch((p) => ({ default: () => `${p}` })).then((p) => c(x.createElement(p.default, a))); }, [s]), u && x.cloneElement(u, { ...a, ...l }); }, Fn = (e, t = {}, i = null) => (n) => { - const { type: r, code: a, label: o, noStyle: s, placeholder: l, required: u = !1, extras: c, validators: g, help: f, isVirtual: m, $isReserved: h, initialValue: b, initialValueLanguage: C, ...k } = d.omit(d.merge({}, t, n), ["convertJs", "convertJsSetting", "widget", "widgetPerfix", "widgetDecorator", "subWidgets", "boxStyle"]), P = $n(Object.assign({}, g, u ? { required: !0 } : {}), a, r), S = H(() => { + const { type: r, code: a, label: o, noStyle: s, placeholder: l, required: u = !1, extras: c, validators: p, help: h, isVirtual: m, $isReserved: f, initialValue: b, initialValueLanguage: C, ...k } = d.omit(d.merge({}, t, n), ["convertJs", "convertJsSetting", "widget", "widgetPerfix", "widgetDecorator", "subWidgets", "boxStyle"]), S = $n(Object.assign({}, p, u ? { required: !0 } : {}), a, r), v = H(() => { const M = Object.keys((t == null ? void 0 : t.extras) || {}); return d.over([d.partialRight(d.pick, M), d.partialRight(d.omit, M)]); - }, [t == null ? void 0 : t.extras]), [R, V] = S(k), q = { label: o, noStyle: s, colon: !1, layout: "vertical" }, A = X((M) => M == null ? void 0 : ee(M, r), [r]); - return p(Xt, { name: a, rules: P, initialValue: A(b), normalize: A, children: (M, T, z) => { - var v; - return p(e, { type: r, rcform: z, basicForm: i, itemProps: { validateStatus: T.errors.length > 0 ? "error" : "success", tooltip: f || null, help: T.errors.length > 0 ? T.errors.join("、") : null, required: ((v = P == null ? void 0 : P[0]) == null ? void 0 : v.required) || !1, ...q }, fieldProps: { placeholder: l, ...V, ...M }, $setting: Object.assign({}, c, R) }); + }, [t == null ? void 0 : t.extras]), [N, V] = v(k), q = { label: o, noStyle: s, colon: !1, layout: "vertical" }, B = X((M) => M == null ? void 0 : ee(M, r), [r]); + return g(Xt, { name: a, rules: S, initialValue: B(b), normalize: B, children: (M, R, z) => { + var T; + return g(e, { type: r, rcform: z, basicForm: i, itemProps: { validateStatus: R.errors.length > 0 ? "error" : "success", tooltip: h || null, help: R.errors.length > 0 ? R.errors.join("、") : null, required: ((T = S == null ? void 0 : S[0]) == null ? void 0 : T.required) || !1, ...q }, fieldProps: { placeholder: l, ...V, ...M }, $setting: Object.assign({}, c, N) }); } }); -}, Tt = ({ cols: e = 24, rowHeight: t = 16, itemMargin: i = [8, 16], containerPadding: n = [0, 0], fields: r = [], children: a, basicForm: o = null }) => { +}, Rt = ({ cols: e = 24, rowHeight: t = 16, itemMargin: i = [8, 16], containerPadding: n = [0, 0], fields: r = [], children: a, basicForm: o = null }) => { const s = pi(r, wi, o); - return O("div", { className: "ff-grid-layout-form", style: { "--grid-layout-item-margin-x": `${(i == null ? void 0 : i[0]) ?? 8}px`, "--grid-layout-item-margin-y": `${(i == null ? void 0 : i[1]) ?? 16}px`, "--grid-layout-container-padding-y": `${(n == null ? void 0 : n[0]) || 0}px`, "--grid-layout-container-padding-x": `${(n == null ? void 0 : n[1]) || 0}px`, "--grid-layout-cols": e, "--grid-layout-row-height": `${t}px` }, children: [s, a && x.cloneElement(a, { cols: e, rowHeight: t, itemMargin: i, containerPadding: n, fields: r })] }); + return j("div", { className: "ff-grid-layout-form", style: { "--grid-layout-item-margin-x": `${(i == null ? void 0 : i[0]) ?? 8}px`, "--grid-layout-item-margin-y": `${(i == null ? void 0 : i[1]) ?? 16}px`, "--grid-layout-container-padding-y": `${(n == null ? void 0 : n[0]) || 0}px`, "--grid-layout-container-padding-x": `${(n == null ? void 0 : n[1]) || 0}px`, "--grid-layout-cols": e, "--grid-layout-row-height": `${t}px` }, children: [s, a && x.cloneElement(a, { cols: e, rowHeight: t, itemMargin: i, containerPadding: n, fields: r })] }); }; -Tt.propTypes = { fields: w.array }; -const En = (Ut = Tt, ({ code: e, layout: t, name: i, primaryKey: n = 0, style: r = {}, formProps: a = {}, form: o, basicForm: s, isPreview: l = !1, className: u, onFinish: c, onValuesChange: g = () => { -}, ...f }) => { - const { align: m, autoComplete: h, resource: b, items: C, hides: k, rowHeight: P, marginX: S, marginY: R, cols: V, listenChangeFields: q, listenChangeFieldsFunc: A, pk: M, uuid: T } = Pn(e), [z] = te.useForm(o), v = H(() => [{ name: "__PK__", value: M }, { name: "__PROPS__", value: a }, { name: "__RESOURCE__", value: b }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: T }, { name: "__PRIMARY_KEY__", value: n }], [M, e, T, b, n, a]); - return O(te, { className: u, name: i || e, layout: t || m, fields: v, form: z, autoComplete: h, style: { ...r, position: "relative" }, onFinish: c, onValuesChange: (B, K) => (({ changedValues: ge, allValues: J, listenChangeFields: st, listenChangeFieldsFunc: Je, onValuesChange: ot, code: Ot }) => { - ot(ge, J), Je && Array.isArray(st) && xe.exec(Je, { changedValues: ge, allValues: J }, { getFieldValue: z.getFieldValue, setFieldValue: z.setFieldValue, setFieldsValue: z.setFieldsValue, isFieldTouched: z.isFieldTouched, isFieldsTouched: z.isFieldsTouched }); - })({ changedValues: B, allValues: K, listenChangeFields: q, listenChangeFieldsFunc: A, onValuesChange: g, code: e }), children: [p(Ut, { ...f, form: z, basicForm: s, code: e, fields: C, cols: V, rowHeight: P, itemMargin: [S, R] }), k == null ? void 0 : k.map((B) => { - var K; - return p(Xt, { name: B.code, children: p(Rn, { form: z, basicForm: s, name: B.code, type: B.type, initialValue: B.initialValue, initialValueLanguage: (K = B.extras) == null ? void 0 : K.initialValueLanguage }) }, JSON.stringify(B.code)); +Rt.propTypes = { fields: w.array }; +const On = (Ut = Rt, ({ code: e, layout: t, name: i, primaryKey: n = 0, style: r = {}, formProps: a = {}, form: o, basicForm: s, isPreview: l = !1, className: u, onFinish: c, onValuesChange: p = () => { +}, ...h }) => { + const { align: m, autoComplete: f, resource: b, items: C, hides: k, rowHeight: S, marginX: v, marginY: N, cols: V, listenChangeFields: q, listenChangeFieldsFunc: B, pk: M, uuid: R } = Pn(e), [z] = te.useForm(o), T = H(() => [{ name: "__PK__", value: M }, { name: "__PROPS__", value: a }, { name: "__RESOURCE__", value: b }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: R }, { name: "__PRIMARY_KEY__", value: n }], [M, e, R, b, n, a]); + return j(te, { className: u, name: i || e, layout: t || m, fields: T, form: z, autoComplete: f, style: { ...r, position: "relative" }, onFinish: c, onValuesChange: (F, J) => (({ changedValues: de, allValues: ve, listenChangeFields: Te, listenChangeFieldsFunc: Ne, onValuesChange: K, code: Et }) => { + K(de, ve), Ne && Array.isArray(Te) && xe.exec(Ne, { changedValues: de, allValues: ve }, { getFieldValue: z.getFieldValue, setFieldValue: z.setFieldValue, setFieldsValue: z.setFieldsValue, isFieldTouched: z.isFieldTouched, isFieldsTouched: z.isFieldsTouched }); + })({ changedValues: F, allValues: J, listenChangeFields: q, listenChangeFieldsFunc: B, onValuesChange: p, code: e }), children: [g(Ut, { ...h, form: z, basicForm: s, code: e, fields: C, cols: V, rowHeight: S, itemMargin: [v, N] }), k == null ? void 0 : k.map((F) => { + var J; + return g(Xt, { name: F.code, children: g(Rn, { form: z, basicForm: s, name: F.code, type: F.type, initialValue: F.initialValue, initialValueLanguage: (J = F.extras) == null ? void 0 : J.initialValueLanguage }) }, JSON.stringify(F.code)); })] }, e); }); var Ut; const bi = ({ $setting: e, $close: t, extras: i, code: n, primaryKey: r, ...a }) => { - const [o] = te.useForm(), s = Nn(n, r, e); + const [o] = te.useForm(), s = Tn(n, r, e); return L(() => { - s && o.setFieldsValue(s); - }, [s]), p(Y, { actions: O(x.Fragment, { children: [p(N, { name: "保存", type: "primary", widget: () => { - const l = o.getFieldValue("__RESOURCE__"), { initDataUri: u = `/api/${n}` } = e || {}; - o.validateFields(!0).then((c) => l ? d.pick(c, [l]) : c).then((c) => j.post(r ? `${u}/${r}` : `${u}`, c).msg(t)).catch(() => G.error("请先完善表单信息", { duration: 2e3 })); - } }), p(N, { name: "取消", widget: () => t(!1) })] }), extras: i, children: p(En, { form: o, code: n, primaryKey: r, ...a }) }); -}, Ht = /* @__PURE__ */ new Set(), xt = (e = [], t = 0) => { + s ? o.setFieldsValue(s) : o.resetFields(); + }, [s]), g(Y, { actions: j(x.Fragment, { children: [g($, { name: "保存", type: "primary", widget: () => { + const l = o.getFieldValue("__RESOURCE__"), { submitDataUri: u = `/api/${n}` } = e || {}; + o.validateFields(!0).then((c) => l ? d.pick(c, [l]) : c).then((c) => A.post(r ? `${u}/${r}` : `${u}`, c).msg(t)).catch(() => G.error("请先完善表单信息", { duration: 2e3 })); + } }), g($, { name: "取消", widget: () => t(!1) })] }), extras: i, children: g(On, { form: o, code: n, primaryKey: r, ...a }) }); +}, Ht = /* @__PURE__ */ new Set(), vt = (e = [], t = 0) => { const i = e[t]; if (i.length && !Ht.has(i)) { const n = document.createElement("script"); n.setAttribute("src", i), n.setAttribute("data-namespace", i), e.length > t + 1 && (n.onload = () => { - xt(e, t + 1); + vt(e, t + 1); }, n.onerror = () => { - xt(e, t + 1); + vt(e, t + 1); }), Ht.add(i), document.body.appendChild(n); } -}, vt = ({ className: e, type: t, style: i = {}, ...n }) => p("span", { role: "img", className: I("ff-iconfont", e), style: i, ...n, children: p("svg", { style: { width: "1em", height: "1em", fill: "currentColor", overflow: "hidden" }, viewBox: "0 0 1024 1024", children: p("use", { xlinkHref: `#${t}` }) }) }); -vt.propTypes = { className: w.string, type: w.string.isRequired, style: w.object }, vt.init = xt; -const On = (e, t, i, n) => ke.redirect(i, t, n), jn = (e, t = {}, i, n = {}) => { +}, St = ({ className: e, type: t, style: i = {}, ...n }) => g("span", { role: "img", className: I("ff-iconfont", e), style: i, ...n, children: g("svg", { style: { width: "1em", height: "1em", fill: "currentColor", overflow: "hidden" }, viewBox: "0 0 1024 1024", children: g("use", { xlinkHref: `#${t}` }) }) }); +St.propTypes = { className: w.string, type: w.string.isRequired, style: w.object }, St.init = vt; +const En = (e, t, i, n) => ke.redirect(i, t, n), jn = (e, t = {}, i, n = {}) => { var a; const r = (a = n.router) == null ? void 0 : a.reduce((o, [s, l, u]) => { const c = d.get(t, ["router", s]); if (!c && c !== 0 && l) throw `请传入 ${u}`; return `${o}/${c}`; }, `/api/${i}`); - return j.del(r, t.param).msg(); + return A.del(r, t.param).msg(); }, Jt = (e, t, i, { status: { loading: n, disabled: r }, setStatus: a }) => { const o = { loading: (s) => s === void 0 ? n : a((l) => ({ ...l, loading: s })), disabled: (s) => s === void 0 ? r : a((l) => ({ ...l, disabled: s })) }; return d.isFunction(i) ? i.call(null, { ...t, ...o }) : d.isString(i) && i ? xe.exec(i, t, o) : null; }, Kt = (e, t, i, n, r) => d.isString(i) && i ? le.getWidgetComponent(i).then(({ default: a }) => G.modal(a, { ...t, $setting: n }, r != null && r.title ? { ...r, title: d.template(r.title)(e) } : r)).catch((a) => { G.error(i, { content: a.toString() }); -}) : G.modal(i, { ...t, $setting: n }, r != null && r.title ? { ...r, title: d.template(r.title)(e) } : r), Ln = (e, t, i, n, r) => G.modal(bi, { ...t, $setting: n, code: i }, r != null && r.title ? { ...r, title: d.template(r.title)(e) } : r), An = (e, t, i, n, r) => G.modal(Nt, { base62params: t, $setting: n, listCode: i }, r != null && r.title ? { ...r, title: d.template(r.title)(e) } : r), Vn = ({ widget: e, widgetType: t, widgetData: i, widgetProps: n, widgetSetting: r, widgetContainerProps: a }, { onAfterClick: o, onBeforeClick: s }) => { - const l = ce(ie), [u, c] = F({ leading: !0, trailing: !1 }), g = H(() => { +}) : G.modal(i, { ...t, $setting: n }, r != null && r.title ? { ...r, title: d.template(r.title)(e) } : r), An = (e, t, i, n, r) => G.modal(bi, { ...t, $setting: n, code: i }, r != null && r.title ? { ...r, title: d.template(r.title)(e) } : r), Ln = (e, t, i, n, r) => G.modal(Nt, { base62params: t, $setting: n, listCode: i }, r != null && r.title ? { ...r, title: d.template(r.title)(e) } : r), Vn = ({ widget: e, widgetType: t, widgetData: i, widgetProps: n, widgetSetting: r, widgetContainerProps: a }, { onAfterClick: o, onBeforeClick: s }) => { + const l = ce(ie), [u, c] = O({ leading: !0, trailing: !1 }), p = H(() => { switch (t) { case "redirect": - return d.partialRight(On, e, r); + return d.partialRight(En, e, r); case "func": return d.partialRight(Jt, (r == null ? void 0 : r.code) ?? e, { status: u, setStatus: c }); + case "component": case "fsdpf-component": return d.partialRight(Kt, e, r, a); case "grid-layout-form": - return d.partialRight(Ln, e, r, a); - case "data-list": return d.partialRight(An, e, r, a); + case "data-list": + return d.partialRight(Ln, e, r, a); case "destroy": return d.partialRight(jn, e, r, a); default: - if (Et(e) || x.isValidElement(e)) return d.partialRight(Kt, e, r, a); + if (Ot(e) || x.isValidElement(e)) return d.partialRight(Kt, e, r, a); if (d.isFunction(e)) return d.partialRight(Jt, (r == null ? void 0 : r.code) || e, { status: u, setStatus: c }); } - return (...f) => console.error("useButton unknown widgetType", t, ...f); + return (...h) => console.error("useButton unknown widgetType", t, ...h); }, [e, t]); - return [d.debounce((f) => (s == null || s(f), Promise.resolve(We(n, f, { list: l })).then((m) => g(f, { ...i, ...m })).then((m) => o == null ? void 0 : o(m)).catch(console.error)), 300, { leading: !0, trailing: !1 }), u]; + return [d.debounce((h) => (s == null || s(h), Promise.resolve(Je(n, h, { list: l })).then((m) => p(h, { ...i, ...m })).then((m) => o == null ? void 0 : o(m)).catch(console.error)), 300, { leading: !0, trailing: !1 }), u]; }, Ci = ({ type: e, name: t, className: i, icon: n, iconPosition: r, size: a }, o = "default") => H(() => { const s = { type: "primary", className: I("ff-button", i), iconPosition: r, size: a }; - return e === "danger" ? s.danger = !0 : e === "default" && (s.type = e), o === "link" || o === "dashed" ? (s.type = o, e === "default" && (s.className = I(s.className, "ff-default"))) : o !== "circle" && o !== "round" || (s.shape = o), n && (s.icon = p(vt, { type: n })), t && (s.children = t), s; -}, [o, e, i, n, r]), He = (e) => function({ className: t, variant: i, children: n, name: r, icon: a, type: o = "default", iconPosition: s = "start", noAuthType: l, onAfterClick: u, onBeforeClick: c, data: g, loading: f, disabled: m, tooltip: h, confirm: b, widget: C = () => { -}, widgetType: k, widgetData: P, widgetProps: S, widgetSetting: R, widgetContainerProps: V, ...q }) { - const A = d.isEmpty(h) || !h.enabled ? {} : h, M = d.isEmpty(b) ? { enabled: !1 } : Object.assign({ enabled: !0 }, b), T = Ci({ className: t, name: r, type: o, icon: a, iconPosition: s }, i ?? e), [z, v] = F(!1), [B, { disabled: K, loading: ge }] = Vn({ widget: C, widgetType: k, widgetData: P, widgetProps: S, widgetSetting: R, widgetContainerProps: V }, { onAfterClick: u, onBeforeClick: c }); - return p(Wi, { okText: "确定", cancelText: "取消", getPopupContainer: (J) => J, ...M, disabled: K || m, open: z, onOpenChange: (J) => { - if (!J) return v(J); - M.enabled ? v(J) : B(g); - }, onConfirm: (J) => { - B(g, J); - }, onClick: (J) => { - J.stopPropagation(); - }, children: p(Ui, { getPopupContainer: (J) => J, ...A, title: z ? null : A == null ? void 0 : A.title, trigger: ["hover", "click"], children: p(Xe, { loading: ge || f, disabled: K || m, ...T, ...q, children: n || r }) }) }); -}, N = He("default"); -N.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", "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 In = He("link"), Mn = He("circle"), zn = He("round"), Bn = He("dashed"), Rt = ({ data: e, widget: t, widgetType: i = "fsdpf-component", widgetData: n, widgetProps: r, widgetSetting: a, widgetContainerProps: o, onAfterClick: s, onBeforeClick: l, children: u, extras: c }) => { - const g = ce(ie), [f, m] = F(!1), [h, b] = F("hover"), [C, k] = F({}), [P, S] = F(), { placement: R, align: V, arrow: q = { pointAtCenter: !0 }, getPopupContainer: A, ...M } = o || {}; + return e === "danger" ? s.danger = !0 : e === "default" && (s.type = e), o === "link" || o === "dashed" ? (s.type = o, e === "default" && (s.className = I(s.className, "ff-default"))) : o !== "circle" && o !== "round" || (s.shape = o), n && (s.icon = g(St, { type: n })), t && (s.children = t), s; +}, [o, e, i, n, r]), lt = ({ data: e, widget: t, widgetType: i = "fsdpf-component", widgetData: n, widgetProps: r, widgetSetting: a, widgetContainerProps: o, onAfterClick: s, onBeforeClick: l, children: u, extras: c }) => { + const p = ce(ie), [h, m] = O(!1), [f, b] = O("hover"), [C, k] = O({}), [S, v] = O(), { placement: N, align: V, zIndex: q, arrow: B = { pointAtCenter: !0 }, getPopupContainer: M, ...R } = o || {}; L(() => { - i == "grid-layout-form" ? S(x.createElement(bi, { ...n, $setting: a, code: t })) : i == "data-list" ? S(x.createElement(Nt, { base62params: e, $setting: a, listCode: t })) : d.isString(t) ? le.getWidgetComponent(t).then(({ default: v }) => { - S(x.createElement(v, { ...n, $setting: a })); - }).catch((v) => S(v.toString())) : Et(t) ? S(x.createElement(t, { ...n, $setting: a })) : x.isValidElement(t) && S(x.cloneElement(t, { ...n, $setting: a })); + i == "grid-layout-form" ? v(x.createElement(bi, { ...n, $setting: a, code: t })) : i == "data-list" ? v(x.createElement(Nt, { base62params: e, $setting: a, listCode: t })) : d.isString(t) ? le.getWidgetComponent(t).then(({ default: F }) => { + v(x.createElement(F, { ...n, $setting: a })); + }).catch((F) => v(F.toString())) : Ot(t) ? v(x.createElement(t, { ...n, $setting: a })) : x.isValidElement(t) && v(x.cloneElement(t, { ...n, $setting: a })); }, [t, i, n]), L(() => { - Promise.resolve(We(r, e, { list: g })).then(k); - }, [r, e, g.getBase62params]); - const T = (v, B = !1) => (m(v), !v && b("hover"), v ? l == null ? void 0 : l(C) : s == null ? void 0 : s(B)), z = (v) => { + Promise.resolve(Je(r, e, { list: p })).then(k); + }, [r, e, p.getBase62params]); + const z = (F, J = !1) => (m(F), !F && b("hover"), F ? l == null ? void 0 : l(C) : s == null ? void 0 : s(J)), T = (F) => { m(!0), b("click"); }; - return p(Hi, { placement: R, onPopupClick: z, onClick: z, open: f, align: V, arrow: q, trigger: h, getPopupContainer: A, content: p(Dn, { ...M, extras: c, children: P && x.cloneElement(P, { ...C, $close: (v) => T(!1, v) }) }), children: u, onOpenChange: T }); -}, Dn = ({ title: e, className: t, children: i, extras: n, width: r, height: a, ...o }) => { - const [s, l] = F({}), u = X((m, h) => l((b) => ({ ...b, [m]: h })), []), c = X((m) => l((h) => ({ ...h, [m]: void 0 })), []), g = e ? x.createElement("div", { className: "ff-popup-title" }, e) : s == null ? void 0 : s.title, f = n ?? x.createElement("div", { className: "ff-popup-reserved-extras" }, n); - return p(qe.Provider, { value: { ele: s, mount: u, unmount: c }, children: O("div", { className: I("ff-popup ff-popover", t, s.rootClassName), style: { width: r, height: a }, ...o, children: [O("div", { className: "ff-popup-header", children: [g, s == null ? void 0 : s["sub-title"]] }), i, O("div", { className: "ff-popup-footer", children: [f, s == null ? void 0 : s.extras, s == null ? void 0 : s.actions] })] }) }); + return g(Wi, { zIndex: q, placement: N, onPopupClick: T, onClick: T, open: h, align: V, arrow: B, trigger: f, getPopupContainer: M, content: g(In, { ...R, extras: c, children: S && x.cloneElement(S, { ...C, $close: (F) => z(!1, F) }) }), children: u, onOpenChange: z }); +}, In = ({ title: e, className: t, children: i, extras: n, width: r, height: a, ...o }) => { + const [s, l] = O({}), u = X((m, f) => l((b) => ({ ...b, [m]: f })), []), c = X((m) => l((f) => ({ ...f, [m]: void 0 })), []), p = e ? x.createElement("div", { className: "ff-popup-title" }, e) : s == null ? void 0 : s.title, h = n ?? x.createElement("div", { className: "ff-popup-reserved-extras" }, n); + return g(He.Provider, { value: { ele: s, mount: u, unmount: c }, children: j("div", { className: I("ff-popup ff-popover", t, s.rootClassName), style: { width: r, height: a }, ...o, children: [j("div", { className: "ff-popup-header", children: [p, s == null ? void 0 : s["sub-title"]] }), i, j("div", { className: "ff-popup-footer", children: [h, s == null ? void 0 : s.extras, s == null ? void 0 : s.actions] })] }) }); }; -Rt.propTypes = { widgetType: w.oneOf(["fsdpf-component", "grid-layout-form", "data-list"]) }; -const _t = ({ options: e = [], triggerWeights: t = ["grid-layout-form", "grid-layout", "fsdpf-component", "print"], onAfterClick: i = (m, h, b) => { -}, onBeforeClick: n = (m, h, b) => { -}, labelVariant: r = "link", labelSize: a, labelRender: o, btnVariant: s, btnSize: l, btnRender: u = (m, h) => p(N, { ...m, data: h }, m.uuid || pt()), widgetContainerProps: c = {}, children: g, data: f }) => { - if (d.isEmpty(e)) return g; - const [m, h] = H(() => (e || []).reduce((C, k) => { - const P = t.indexOf(k.widgetType); - return P === -1 ? C[1].push(k) : C[0] ? P < t.indexOf(C[0].widgetType) ? (C[1].push(C[0]), C[0] = k) : C[1].push(k) : C[0] = k, C; +lt.propTypes = { widgetType: w.oneOf(["fsdpf-component", "grid-layout-form", "data-list"]) }; +const _e = (e) => function({ className: t, variant: i, children: n, name: r, icon: a, type: o = "default", iconPosition: s = "start", noAuthType: l, onAfterClick: u, onBeforeClick: c, data: p, loading: h, disabled: m, tooltip: f, confirm: b, widget: C = () => { +}, widgetType: k, widgetData: S, widgetProps: v, widgetSetting: N, widgetContainerProps: V, ...q }) { + const { mode: B, ...M } = V || {}, R = Ci({ className: t, name: r, type: o, icon: a, iconPosition: s }, i ?? e), z = g(Ze, { ...R, ...q, children: n || r }); + if (B === "popover" && !["destroy", "redirect", "func"].includes(k)) return g(lt, { data: p, widget: C, widgetType: k, widgetData: S, widgetProps: v, widgetSetting: N, widgetContainerProps: M, onAfterClick: u, onBeforeClick: c, children: z }); + const T = d.isEmpty(f) || !f.enabled ? {} : f, F = d.isEmpty(b) ? { enabled: !1 } : Object.assign({ enabled: !0 }, b), [J, de] = O(!1), [ve, { disabled: Te, loading: Ne }] = Vn({ widget: C, widgetType: k, widgetData: S, widgetProps: v, widgetSetting: N, widgetContainerProps: M }, { onAfterClick: u, onBeforeClick: c }); + return g(Ui, { okText: "确定", cancelText: "取消", getPopupContainer: (K) => K, ...F, disabled: Te || m, open: J, onOpenChange: (K) => { + if (!K) return de(K); + F.enabled ? de(K) : ve(p); + }, onConfirm: (K) => { + ve(p, K); + }, onClick: (K) => { + K.stopPropagation(); + }, children: g(Hi, { getPopupContainer: (K) => K, ...T, title: J ? null : T == null ? void 0 : T.title, trigger: ["hover", "click"], children: x.cloneElement(z, { loading: Ne || h, disabled: Te || m }) }) }); +}, $ = _e("default"); +$.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 Mn = _e("link"), zn = _e("circle"), Bn = _e("round"), Dn = _e("dashed"), _t = ({ options: e = [], triggerWeights: t = ["grid-layout-form", "grid-layout", "fsdpf-component", "print"], onAfterClick: i = (m, f, b) => { +}, onBeforeClick: n = (m, f, b) => { +}, labelVariant: r = "link", labelSize: a, labelRender: o, btnVariant: s, btnSize: l, btnRender: u = (m, f) => g($, { ...m, data: f }, m.uuid || mt()), widgetContainerProps: c = {}, children: p, data: h }) => { + if (d.isEmpty(e)) return p; + const [m, f] = H(() => (e || []).reduce((C, k) => { + const S = t.indexOf(k.widgetType); + return S === -1 ? C[1].push(k) : C[0] ? S < 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 ? g = o(m, f) || g : g || (g = p(Xe, { ...Ci(Object.assign(m != null && m.name || m != null && m.icon ? {} : { icon: "icon-location" }, m, { size: a }), r) })); - const b = h.map((C) => u(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: d.partialRight(i, C, f), onBeforeClick: d.partialRight(n, C, f) }, { size: l, variant: s }), f)); - return p(Rt, { 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: f, widgetData: m == null ? void 0 : m.widgetData, extras: b, onAfterClick: d.partialRight(i, m, f), onBeforeClick: d.partialRight(n, m, f), children: g }); + o ? p = o(m, h) || p : p || (p = g(Ze, { ...Ci(Object.assign(m != null && m.name || m != null && m.icon ? {} : { icon: "icon-location" }, m, { size: a }), r) })); + const b = f.map((C) => u(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: d.partialRight(i, C, h), onBeforeClick: d.partialRight(n, C, h) }, { size: l, variant: s }), h)); + return g(lt, { 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: d.partialRight(i, m, h), onBeforeClick: d.partialRight(n, m, h), children: p }); }; -_t.propTypes = { triggerWeights: w.array, options: w.arrayOf(w.shape({ ...N.propTypes, widgetType: N.propTypes.widgetType.isRequired })), btnSize: N.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: N.propTypes.size, onAfterClick: w.func, onBeforeClick: w.func, widgetContainerProps: N.propTypes.widgetContainerProps, data: N.propTypes.data }, N.Link = In, N.Link.defaultProps = N.defaultProps, N.Link.propTypes = N.propTypes, N.Circle = Mn, N.Circle.defaultProps = N.defaultProps, N.Circle.propTypes = N.propTypes, N.Round = zn, N.Round.defaultProps = N.defaultProps, N.Round.propTypes = N.propTypes, N.Dashed = Bn, N.Dashed.defaultProps = N.defaultProps, N.Dashed.propTypes = N.propTypes, N.Popover = Rt, N.GroupPopover = _t; +_t.propTypes = { triggerWeights: w.array, options: w.arrayOf(w.shape({ ...$.propTypes, widgetType: $.propTypes.widgetType.isRequired })), btnSize: $.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: $.propTypes.size, onAfterClick: w.func, onBeforeClick: w.func, widgetContainerProps: $.propTypes.widgetContainerProps, data: $.propTypes.data }, $.Link = Mn, $.Link.defaultProps = $.defaultProps, $.Link.propTypes = $.propTypes, $.Circle = zn, $.Circle.defaultProps = $.defaultProps, $.Circle.propTypes = $.propTypes, $.Round = Bn, $.Round.defaultProps = $.defaultProps, $.Round.propTypes = $.propTypes, $.Dashed = Dn, $.Dashed.defaultProps = $.defaultProps, $.Dashed.propTypes = $.propTypes, $.Popover = lt, $.GroupPopover = _t; const qn = ({ fields: e, formProps: t, $close: i }) => { const [n] = te.useForm(), r = H(() => [{ name: "__PROPS__", value: t }], [t]); - return p(Y, { actions: O(x.Fragment, { children: [p(N, { name: "取消", widget: () => i(!1) }), p(N, { name: "确定", type: "primary", widget: () => n.validateFields(!0).then(i) })] }), children: p(te, { fields: r, form: n, className: "ff-modal-form", children: e == null ? void 0 : e.map(({ code: a, ...o }) => p(wi, { code: a, ...o }, a)) }) }); -}, Wn = ({ className: e, $close: t, children: i, title: n, subTitle: r, actions: a, extras: o, ...s }) => O(Qi, { ...s, prefixCls: "ff-drawer", className: I("ff-popup", e), maskMotion: { motionAppear: !0, motionName: "mask-motion" }, motion: (l) => ({ motionAppear: !0, motionName: `panel-motion-${l}` }), children: [O("div", { className: "ff-popup-header", children: [p("button", { "aria-label": "Close", className: "ff-popup-close", onClick: s.onClose, children: p($t, { type: "close" }) }), n, r] }), p("div", { className: "ff-popup-body", children: i }), O("div", { className: "ff-popup-footer", children: [o, a] })] }), Un = ({ className: e, $close: t, $event: i, children: n, title: r, subTitle: a, actions: o, extras: s, placement: l, ...u }) => { + return g(Y, { actions: j(x.Fragment, { children: [g($, { name: "取消", widget: () => i(!1) }), g($, { name: "确定", type: "primary", widget: () => n.validateFields(!0).then(i) })] }), children: g(te, { fields: r, form: n, className: "ff-modal-form", children: e == null ? void 0 : e.map(({ code: a, ...o }) => g(wi, { code: a, ...o }, a)) }) }); +}, Wn = ({ className: e, $close: t, children: i, title: n, subTitle: r, actions: a, extras: o, ...s }) => j(Qi, { ...s, prefixCls: "ff-drawer", className: I("ff-popup", e), maskMotion: { motionAppear: !0, motionName: "mask-motion" }, motion: (l) => ({ motionAppear: !0, motionName: `panel-motion-${l}` }), children: [j("div", { className: "ff-popup-header", children: [g("button", { "aria-label": "Close", className: "ff-popup-close", onClick: s.onClose, children: g(Tt, { type: "close" }) }), n, r] }), g("div", { className: "ff-popup-body", children: i }), j("div", { className: "ff-popup-footer", children: [o, a] })] }), Un = ({ className: e, $close: t, $event: i, children: n, title: r, subTitle: a, actions: o, extras: s, placement: l, ...u }) => { const c = (i == null ? void 0 : i.pageX) === void 0 ? { animation: null, maskAnimation: null, mousePosition: { x: null, y: null } } : { animation: "zoom", maskAnimation: "fade", mousePosition: { x: i == null ? void 0 : i.pageX, y: i == null ? void 0 : i.pageY } }; - return p(Zi, { ...u, ...c, prefixCls: "ff-modal", modalRender: () => O("div", { className: I("ff-modal-content ff-popup", e), children: [O("div", { className: "ff-popup-header", children: [p("button", { "aria-label": "Close", className: "ff-popup-close", onClick: u.onClose, children: p($t, { type: "close" }) }), r, a] }), p("div", { className: "ff-popup-body", children: n }), O("div", { className: "ff-popup-footer", children: [s, o] })] }) }); + return g(Zi, { ...u, ...c, prefixCls: "ff-modal", modalRender: () => j("div", { className: I("ff-modal-content ff-popup", e), children: [j("div", { className: "ff-popup-header", children: [g("button", { "aria-label": "Close", className: "ff-popup-close", onClick: u.onClose, children: g(Tt, { type: "close" }) }), r, a] }), g("div", { className: "ff-popup-body", children: n }), j("div", { className: "ff-popup-footer", children: [s, o] })] }) }); }, ki = ({ placement: e, $close: t, $event: i, children: n, title: r, ...a }) => { - const [o, s] = F({}), [l, u] = F(!0), c = X((h, b) => s((C) => ({ ...C, [h]: b })), []), g = X((h) => s((b) => ({ ...b, [h]: void 0 })), []); - let f = { ...a, className: o.rootClassName, title: o.title || r && x.createElement("div", { className: I("ff-popup-title") }, r), subTitle: o["sub-title"], actions: o.actions, extras: o.extras, children: n, $close: t, $event: i, onClose: () => u(!1) }; + const [o, s] = O({}), [l, u] = O(!0), c = X((f, b) => s((C) => ({ ...C, [f]: b })), []), p = X((f) => s((b) => ({ ...b, [f]: void 0 })), []); + let h = { ...a, className: o.rootClassName, title: o.title || r && x.createElement("div", { className: I("ff-popup-title") }, r), subTitle: o["sub-title"], actions: o.actions, extras: o.extras, children: n, $close: t, $event: i, onClose: () => u(!1) }; const m = () => { t(!1); }; - return p(qe.Provider, { value: { ele: o, mount: c, unmount: g }, children: e && e !== "center" ? p(Wn, { ...f, placement: e, open: l, afterOpenChange: (h) => !h && m() }) : p(Un, { ...f, visible: l, afterClose: m }) }); + return g(He.Provider, { value: { ele: o, mount: c, unmount: p }, children: e && e !== "center" ? g(Wn, { ...h, placement: e, open: l, afterOpenChange: (f) => !f && m() }) : g(Un, { ...h, visible: l, afterClose: m }) }); }; ki.propTypes = { placement: w.oneOf(["center", "left", "top", "right", "bottom"]) }; const _ = () => { - const [e, t] = Ai({ maxCount: 6, motion: { motionName: "ff-notification-fade", motionAppear: !0, motionEnter: !0, motionLeave: !0, onLeaveStart: (a) => { + const [e, t] = Li({ maxCount: 6, motion: { motionName: "ff-notification-fade", motionAppear: !0, motionEnter: !0, motionLeave: !0, onLeaveStart: (a) => { const { offsetHeight: o } = a; return { height: o }; }, onLeaveActive: () => ({ height: 0, opacity: 0, margin: 0 }) }, prefixCls: "ff-notification" }), [, i] = x.useReducer((a) => a + 1, 0); @@ -871,45 +878,45 @@ const _ = () => { }); }, []); const n = (a, o = {}, s = {}) => new Promise((l, u) => r([l, u], a, o, s)), r = ([a, o], s, l = {}, u = {}) => { - const c = _.$index++, g = (f) => ((m, h) => (_.$popups.delete(m), i(), h == null ? void 0 : h()))(c, () => a(f)); + const c = _.$index++, p = (h) => ((m, f) => (_.$popups.delete(m), i(), f == null ? void 0 : f()))(c, () => a(h)); if (s === ii) return e.open({ ...u, key: c, content: x.createElement(s, { ...l, $close: () => e.close(c) }) }); - _.$popups.set(c, x.createElement(ki, { maskClosable: !1, $event: l == null ? void 0 : l.$event, ...u, key: c, $close: g }, x.isValidElement(s) ? x.cloneElement(s, { ...l, $close: g }) : s != null && s.name || It.isForwardRef(s) || (s == null ? void 0 : s.$$typeof) === It.ForwardRef ? x.createElement(s, { ...l, $close: g }) : s)), i(); + _.$popups.set(c, x.createElement(ki, { maskClosable: !1, $event: l == null ? void 0 : l.$event, ...u, key: c, $close: p }, x.isValidElement(s) ? x.cloneElement(s, { ...l, $close: p }) : s != null && s.name || It.isForwardRef(s) || (s == null ? void 0 : s.$$typeof) === It.ForwardRef ? x.createElement(s, { ...l, $close: p }) : s)), i(); }; - return O(x.Fragment, { children: [Array.from(_.$popups).map(([a, o]) => o), t] }); + return j(x.Fragment, { children: [Array.from(_.$popups).map(([a, o]) => o), t] }); }; _.$popups = /* @__PURE__ */ new Map(), _.$index = 0, _.$queue = [], _.$onClick = (...e) => new Promise((t, i) => { _.$queue.push([e, t, i]); }); -const Gt = (e, t, i = {}) => _.$onClick(e, t, i), ut = (e, { showProgress: t, duration: i, ...n } = { duration: 1.5 }) => _.$onClick(ii, { content: e, ...n }, { showProgress: t, duration: i }), G = { modal: Gt, confirm: (e, t = {}) => _.$onClick(en, { content: e, ...t }, { placement: "center" }), form: (e, t = {}, i = {}) => Gt(qn, { formProps: i, fields: e }, { placement: "center", ...t }).then((n) => { +const Gt = (e, t, i = {}) => _.$onClick(e, t, i), gt = (e, { showProgress: t, duration: i, ...n } = { duration: 1.5 }) => _.$onClick(ii, { content: e, ...n }, { showProgress: t, duration: i }), G = { modal: Gt, confirm: (e, t = {}) => _.$onClick(en, { content: e, ...t }, { placement: "center" }), form: (e, t = {}, i = {}) => Gt(qn, { formProps: i, fields: e }, { placement: "center", ...t }).then((n) => { if (n === !1) throw !1; return n; -}), notification: ut, success: (e, t = { duration: 1.5 }) => ut(e, { ...t, className: "ff-notification-success", icon: "check" }), error: (e, t = { duration: 1.5 }) => ut(e, { ...t, className: "ff-notification-error", icon: "close" }) }; -Oe.configure({ showSpinner: !1 }), je.interceptors.request.use((e) => { +}), notification: gt, success: (e, t = { duration: 1.5 }) => gt(e, { ...t, className: "ff-notification-success", icon: "check" }), error: (e, t = { duration: 1.5 }) => gt(e, { ...t, className: "ff-notification-error", icon: "close" }) }; +Le.configure({ showSpinner: !1 }), Ve.interceptors.request.use((e) => { e.headers.Platform = "web", e.headers.SaaS = window.localStorage.getItem("SaaS"); - const t = window.localStorage.getItem(Ye); - return e.headers.Authorization = t ? `Bearer ${t} ` : void 0, Oe.inc(), e; -}, (e) => (Oe.done(), Promise.reject({ code: -1, msg: e }))), je.interceptors.response.use(({ data: e, headers: t }) => (Oe.done(), { ...e, res: t == null ? void 0 : t.res }), function(e) { - return Oe.done(), Promise.reject(e.message); -}), window.addEventListener("unhandledrejection", mt.onUnhandledRejection), mt.onMsg = (e, t) => G[[0, 1].includes(e) ? "success" : "error"](t).then(() => e === 20300 && ke.redirect(Le.get("Common.WEBSITE_LOGIN_PAGE"))); -const St = { appUrl: "", init: (e, t, i) => { - St.appUrl = i, je.defaults.baseURL = i, je.defaults.timeout = 15e3, Object.assign(St, new mt(e, t, je)); -} }, j = St; + const t = window.localStorage.getItem(Qe); + return e.headers.Authorization = t ? `Bearer ${t} ` : void 0, Le.inc(), e; +}, (e) => (Le.done(), Promise.reject({ code: -1, msg: e }))), Ve.interceptors.response.use(({ data: e, headers: t }) => (Le.done(), { ...e, res: t == null ? void 0 : t.res }), function(e) { + return Le.done(), Promise.reject(e.message); +}), window.addEventListener("unhandledrejection", ft.onUnhandledRejection), ft.onMsg = (e, t) => G[[0, 1].includes(e) ? "success" : "error"](t).then(() => e === 20300 && ke.redirect(Ie.get("Common.WEBSITE_LOGIN_PAGE"))); +const Pt = { appUrl: "", init: (e, t, i) => { + Pt.appUrl = i, Ve.defaults.baseURL = i, Ve.defaults.timeout = 15e3, Object.assign(Pt, new ft(e, t, Ve)); +} }, A = Pt; class Ft extends Error { constructor(t, i) { - super(i), Error.captureStackTrace && Error.captureStackTrace(this, Ft), !i instanceof Ae && (this.name = `${t} Error Runtime`); + super(i), Error.captureStackTrace && Error.captureStackTrace(this, Ft), !i instanceof Me && (this.name = `${t} Error Runtime`); } } -class Ae extends Error { +class Me extends Error { constructor(t, ...i) { - super(...i), Error.captureStackTrace && Error.captureStackTrace(this, Ae), this.name = `${t} Not Found`; + super(...i), Error.captureStackTrace && Error.captureStackTrace(this, Me), this.name = `${t} Not Found`; } } -const gt = "mine", Ye = "token"; -var Ce, Ee; +const pt = "mine", Qe = "token"; +var Ce, Ae; const oe = class oe { constructor() { - E(this, Ee, /* @__PURE__ */ new Map()); - $(this, "setVendor", (t, i) => y(this, Ee).set(t, new ei(i, async (n, r) => { + E(this, Ae, /* @__PURE__ */ new Map()); + P(this, "setVendor", (t, i) => y(this, Ae).set(t, new ei(i, async (n, r) => { var o, s; if (!(n != null && n.default)) throw "@pkg not found"; let a = () => r; @@ -918,26 +925,26 @@ const oe = class oe { case typeof (a = (s = n.default) == null ? void 0 : s[`./${r}/index.js`]): return a(); } - throw new Ae(r); + throw new Me(r); }))); - $(this, "getWidgetComponent", async (t) => { + P(this, "getWidgetComponent", async (t) => { if (!t) throw "getWidgetComponent widget is required"; if (t != null && t.startsWith("blob:") || t != null && t.startsWith("http:") || t != null && t.startsWith("https:")) return await import(t); const [, i] = t == null ? void 0 : t.split("@pkg/"); - if (!i) throw new Ae(t); + if (!i) throw new Me(t); try { - return y(this, Ee).has("pkg") ? await y(this, Ee).get("pkg").get(i) : await import(`${j.appUrl}/api/pkg-import/web?name=${t}`); + return y(this, Ae).has("pkg") ? await y(this, Ae).get("pkg").get(i) : await import(`${A.appUrl}/api/pkg-import/web?name=${t}`); } catch (n) { throw new Ft(t, n); } }); - $(this, "getRoutes", () => j.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: i, ...n }) => [i, { uuid: i, ...n }])).then((t) => new Map(t))); - $(this, "getMenus", () => j.get("/api/my-menu")); - $(this, "getConfigure", () => j.get("api/init-configure")); - $(this, "getWidgetOperationAuth", () => j.get("/api/init-widget-operation-auth").then((t) => t.reduce((i, { uuid: n, auth: r }) => [...i, [n, r]], []))); - $(this, "getPhoneNumber", (t) => j.get(`/api/user-wx-phone-number/${t}`)); - $(this, "getUserToken", () => { - const t = window.localStorage.getItem(Ye); + P(this, "getRoutes", () => A.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: i, ...n }) => [i, { uuid: i, ...n }])).then((t) => new Map(t))); + P(this, "getMenus", () => A.get("/api/my-menu")); + P(this, "getConfigure", () => A.get("api/init-configure")); + P(this, "getWidgetOperationAuth", () => A.get("/api/init-widget-operation-auth").then((t) => t.reduce((i, { uuid: n, auth: r }) => [...i, [n, r]], []))); + P(this, "getPhoneNumber", (t) => A.get(`/api/user-wx-phone-number/${t}`)); + P(this, "getUserToken", () => { + const t = window.localStorage.getItem(Qe); if (!t) return ""; const i = t.split("."); if (!Array.isArray(i) || i.length !== 3) throw "登录令牌无效!"; @@ -945,55 +952,55 @@ const oe = class oe { if (Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3) - n > 2592e3) throw "登录令牌已过期, 请重新登录!"; return t; }); - $(this, "checkUserToken", () => { + P(this, "checkUserToken", () => { try { return !!this.getUserToken(); } catch { return !1; } }); - $(this, "getUserInfo", (t = !0) => { + P(this, "getUserInfo", (t = !0) => { var i; try { const n = this.getUserToken(); if (!n) return Promise.resolve(null); - const { iat: r } = JSON.parse(window.atob((i = n == null ? void 0 : n.split(".")) == null ? void 0 : i[1])), { iat: a, ...o } = j.decode(window.localStorage.getItem(gt) || "", {}); - return a === r ? Promise.resolve(o) : j.get("/api/mine-info").then(({ User: s = null }) => (window.localStorage.setItem(gt, j.encode({ ...s, iat: r })), s)); + const { iat: r } = JSON.parse(window.atob((i = n == null ? void 0 : n.split(".")) == null ? void 0 : i[1])), { iat: a, ...o } = A.decode(window.localStorage.getItem(pt) || "", {}); + return a === r ? Promise.resolve(o) : A.get("/api/mine-info").then(({ User: s = null }) => (window.localStorage.setItem(pt, A.encode({ ...s, iat: r })), s)); } catch (n) { console.error(n), t && G.error("请登录").then(this.logout); } return Promise.resolve(null); }); - $(this, "login", (t, i, n = {}) => j.post("/api/user-token", { username: t, passwd: Vi.hash(i), platform: "web", ...n }).then(({ token: r }) => (window.localStorage.setItem(Ye, r), r))); - $(this, "logout", (t) => (window.localStorage.removeItem(gt), window.localStorage.removeItem(Ye), t == null ? void 0 : t())); + P(this, "login", (t, i, n = {}) => A.post("/api/user-token", { username: t, passwd: Vi.hash(i), platform: "web", ...n }).then(({ token: r }) => (window.localStorage.setItem(Qe, r), r))); + P(this, "logout", (t) => (window.localStorage.removeItem(pt), window.localStorage.removeItem(Qe), t == null ? void 0 : t())); if (y(oe, Ce)) return y(oe, Ce); } }; -Ce = new WeakMap(), Ee = new WeakMap(), E(oe, Ce, null), $(oe, "getInstance", () => (y(oe, Ce) || U(oe, Ce, new oe()), y(oe, Ce))); -let Pt = oe; -const le = Pt.getInstance(), Hn = x.createContext({ user: {}, initUser: () => { +Ce = new WeakMap(), Ae = new WeakMap(), E(oe, Ce, null), P(oe, "getInstance", () => (y(oe, Ce) || U(oe, Ce, new oe()), y(oe, Ce))); +let $t = oe; +const le = $t.getInstance(), Hn = x.createContext({ user: {}, initUser: () => { }, initUserComplete: !1 }), Jn = x.createContext({ set: () => { }, get: () => { }, assign: () => { }, currentRoute: () => { -} }), Et = (e) => !!(e != null && e.name) && (e.prototype instanceof x.Component || /^[A-Z]/.test(e.name)), Kn = (e, t) => { +} }), Ot = (e) => !!(e != null && e.name) && (e.prototype instanceof x.Component || /^[A-Z]/.test(e.name)), Kn = (e, t) => { if (!e || typeof window > "u") return; let i = document.querySelector(`style[ff-style-token="${t}"]`); return i ? (i.innerHTML = e, e) : (i = document.createElement("style"), i.setAttribute("ff-style-token", t), i.setAttribute("type", "text/css"), i.innerHTML = e, document.head.appendChild(i), e); -}, _n = Object.freeze(Object.defineProperty({ __proto__: null, AppContext: Hn, AppGlobalParamsContext: Jn, cache: ei, configure: Le, default: le, func: xe, http: j, insertStyle: Kn, isReactComponent: Et, route: ke }, Symbol.toStringTag, { value: "Module" })); +}, _n = Object.freeze(Object.defineProperty({ __proto__: null, AppContext: Hn, AppGlobalParamsContext: Jn, cache: ei, configure: Ie, default: le, func: xe, http: A, insertStyle: Kn, isReactComponent: Ot, route: ke }, Symbol.toStringTag, { value: "Module" })); export { wi as $, kn as A, ln as B, dn as C, - Qe as D, + et as D, an as E, wr as F, kr as G, yn as H, br as I, oi as J, - wt as K, + bt as K, sn as L, on as M, xn as N, @@ -1001,29 +1008,29 @@ export { xr as P, vr as Q, ui as R, - rt as S, + st as S, Sr as T, Pr as U, - Ue as V, - at as W, + Ke as V, + ot as W, $r as X, - Nr as Y, - En as Z, - Tt as _, + Tr as Y, + On as Z, + Rt as _, ni as a, bi as a0, Pn as a1, $n as a2, - Nn as a3, + Tn as a3, yi as a4, - Tn as a5, - Tr as a6, - vt as a7, - N as a8, + Nn as a5, + Nr as a6, + St as a7, + $ as a8, tn as a9, Vn as aa, Y as ab, - qe as ac, + He as ac, ti as ad, _ as ae, G as af, @@ -1031,16 +1038,16 @@ export { gr as ah, pr as ai, le as aj, - Et as ak, + Ot as ak, Kn as al, - j as am, + A as am, ei as an, - Le as ao, + Ie as ao, xe as ap, ke as aq, Hn as ar, Jn as as, - We as b, + Je as b, fr as c, ri as d, hr as e, @@ -1056,7 +1063,7 @@ export { pi as o, di as p, ci as q, - dt as r, + ut as r, fn as s, ee as t, mr as u, diff --git a/dist/components.js b/dist/components.js index e960a1b..6c68c04 100644 --- a/dist/components.js +++ b/dist/components.js @@ -1,4 +1,4 @@ -import { ag as s, a7 as p, ah as n, ai as t, af as d } from "./common/main-DnobNY7x.js"; +import { ag as s, a7 as p, ah as n, ai as t, af as d } from "./common/main-DEetVaxx.js"; export { s as Empty, p as Icon, diff --git a/dist/container.js b/dist/container.js index 65d433d..0fc6a26 100644 --- a/dist/container.js +++ b/dist/container.js @@ -1,4 +1,4 @@ -import { ac as o, ag as s, ah as d, ai as p, ad as t, af as n, ae as r, ab as u } from "./common/main-DnobNY7x.js"; +import { ac as o, ag as s, ah as d, ai as p, ad as t, af as n, ae as r, ab as u } from "./common/main-DEetVaxx.js"; export { o as Context, s as Empty, diff --git a/dist/data-converter.js b/dist/data-converter.js index 7fcf00c..5b5e609 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-DnobNY7x.js"; +import { D as p } from "./common/main-DEetVaxx.js"; export { p as default }; diff --git a/dist/data-list.js b/dist/data-list.js index ff621c7..80d63cc 100644 --- a/dist/data-list.js +++ b/dist/data-list.js @@ -1,4 +1,4 @@ -import { A as t, y as e, q as r, w as o, B as i, x as u, v as D, z as l, s as L, C as n, p, E as m, M as C, I as c, K as F, J as b, L as d, F as k } from "./common/main-DnobNY7x.js"; +import { A as t, y as e, q as r, w as o, B as i, x as u, v as D, z as l, s as L, C as n, p, E as m, M as C, I as c, K as F, J as b, L as d, F as k } from "./common/main-DEetVaxx.js"; export { t as DataListContent, e as DataListContext, diff --git a/dist/data-list/utils.js b/dist/data-list/utils.js index b2e0351..c0c7c96 100644 --- a/dist/data-list/utils.js +++ b/dist/data-list/utils.js @@ -1,5 +1,5 @@ import "lodash"; -import { k as a } from "../common/main-DnobNY7x.js"; +import { k as a } from "../common/main-DEetVaxx.js"; export { a as getDefaultExpandRowKeys }; diff --git a/dist/grid-layout-form.js b/dist/grid-layout-form.js index a1cc662..98ef628 100644 --- a/dist/grid-layout-form.js +++ b/dist/grid-layout-form.js @@ -1,4 +1,4 @@ -import { _ as s, a0 as r, $ as u, Z as o, a4 as t, a3 as d, a6 as m, a2 as F, a1 as i, a5 as g } from "./common/main-DnobNY7x.js"; +import { _ as s, a0 as r, $ as u, Z as o, a4 as t, a3 as d, a6 as m, a2 as F, a1 as i, a5 as g } from "./common/main-DEetVaxx.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 238d7a5..d413ef3 100644 --- a/dist/grid-layout-form/utils.js +++ b/dist/grid-layout-form/utils.js @@ -1,5 +1,5 @@ import "lodash"; -import { g as o, a as g } from "../common/main-DnobNY7x.js"; +import { g as o, a as g } from "../common/main-DEetVaxx.js"; export { o as getOptionItemByValue, g as getWidgetByNormalize diff --git a/dist/grid-layout.js b/dist/grid-layout.js index 7780d86..9e891b9 100644 --- a/dist/grid-layout.js +++ b/dist/grid-layout.js @@ -1,4 +1,4 @@ -import { l as d, m as e, H as i, G as o, n as t, o as u } from "./common/main-DnobNY7x.js"; +import { l as d, m as e, H as i, G as o, n as t, o as u } from "./common/main-DEetVaxx.js"; export { d as GridLayout, e as GridLayoutWidget, diff --git a/dist/grid-layout/utils.js b/dist/grid-layout/utils.js index b4c87e2..1357b0f 100644 --- a/dist/grid-layout/utils.js +++ b/dist/grid-layout/utils.js @@ -1,4 +1,4 @@ -import { i as o, j as a } from "../common/main-DnobNY7x.js"; +import { i as o, j as a } from "../common/main-DEetVaxx.js"; export { o as getBoxStyle, a as getWidgetByNormalize diff --git a/dist/hooks.js b/dist/hooks.js index 4b478b9..fb39df8 100644 --- a/dist/hooks.js +++ b/dist/hooks.js @@ -1,7 +1,7 @@ import "lodash"; import "rc-field-form"; import "react"; -import { W as r, V as o, X as p, T as f, U as i, Y as m, S as c } from "./common/main-DnobNY7x.js"; +import { W as r, V as o, X as p, T as f, U as i, Y as m, S as c } from "./common/main-DEetVaxx.js"; import { default as S } from "rc-util/lib/hooks/useMergedState"; export { r as useDeepEffect, diff --git a/dist/iconfont.js b/dist/iconfont.js index 3b0bb4c..1200a65 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 { a7 as a } from "./common/main-DnobNY7x.js"; +import { a7 as a } from "./common/main-DEetVaxx.js"; export { a as default }; diff --git a/dist/index.js b/dist/index.js index e45c1da..9ae572a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,4 +1,4 @@ -import { ar as t, as as e, an as o, ao as n, aj as p, ap as r, am as c, al as l, ak as f, aq as m } from "./common/main-DnobNY7x.js"; +import { ar as t, as as e, an as o, ao as n, aj as p, ap as r, am as c, al as l, ak as f, aq as m } from "./common/main-DEetVaxx.js"; export { t as AppContext, e as AppGlobalParamsContext, diff --git a/dist/pages.js b/dist/pages.js index 710fc5f..1de4b82 100644 --- a/dist/pages.js +++ b/dist/pages.js @@ -1,4 +1,4 @@ -import { O as t, N as e, P as o, Q as P } from "./common/main-DnobNY7x.js"; +import { O as t, N as e, P as o, Q as P } from "./common/main-DEetVaxx.js"; export { t as CustomPage, e as DataListPage, diff --git a/dist/res-ws.js b/dist/res-ws.js index b7f63ca..f5c3998 100644 --- a/dist/res-ws.js +++ b/dist/res-ws.js @@ -1,5 +1,5 @@ import "lodash"; -import { R as a } from "./common/main-DnobNY7x.js"; +import { R as a } from "./common/main-DEetVaxx.js"; export { a as default }; diff --git a/dist/style.css b/dist/style.css index afbf835..4194a73 100644 --- a/dist/style.css +++ b/dist/style.css @@ -1 +1 @@ -#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;-webkit-transform:rotate(3deg) translate(0px,-4px);-ms-transform:rotate(3deg) translate(0px,-4px);transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:solid 2px transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .spinner,.nprogress-custom-parent #nprogress .bar{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@keyframes nprogress-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.react-grid-layout .react-grid-item{box-sizing:border-box!important}.monaco-editor .parameter-hints-widget{border:0px}.monaco-editor .parameter-hints-widget .signature{padding:0}.monaco-editor .suggest-widget,.monaco-editor.vs-dark .suggest-widget{border:0px}.monaco-editor .rename-box{top:0}.ant-divider:has(+.ant-form .ant-divider:first-child){display:none}:root{--padding-lg: 24px;--padding-md: 16px;--padding-sm: 12px;--padding-xs: 8px;--padding-xss: 4px;--margin-lg: 24px;--margin-md: 16px;--margin-sm: 12px;--margin-xs: 8px;--margin-xss: 4px;--border-color: #f2f2f2;--bg-color: rgba(0, 0, 0, .02)}#root{height:100vh;background-color:#f0f2f5}*::-webkit-scrollbar-thumb{background:#aaa;border-radius:5px}*::-webkit-scrollbar-thumb:hover{background:#999}*::-webkit-scrollbar-track{background-color:#ddd}*::-webkit-scrollbar-corner{background-color:#ddd}*::-webkit-scrollbar{width:5px;height:5px}.ff-container{height:100%}.ff-loading{height:100vh;width:100%;background-color:#f0f2f5;display:flex;justify-content:center;align-items:center}.ff-loading .loader{-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:128px;height:80px}.ff-loading .loader .square{position:relative}.ff-loading .loader .square:nth-child(1){margin-left:0}.ff-loading .loader .square:nth-child(1) span{-webkit-animation:animsquare1 2s infinite ease-in;animation:animsquare1 2s infinite ease-in}.ff-loading .loader .square:nth-child(2){margin-left:44px}.ff-loading .loader .square:nth-child(2) span{-webkit-animation:animsquare2 2s infinite ease-in;animation:animsquare2 2s infinite ease-in}.ff-loading .loader .square:nth-child(3){margin-left:88px}.ff-loading .loader .square:nth-child(3) span{-webkit-animation:animsquare3 2s infinite ease-in;animation:animsquare3 2s infinite ease-in}.ff-loading .loader .square:nth-child(4){margin-left:132px}.ff-loading .loader .square:nth-child(4) span{-webkit-animation:animsquare4 2s infinite ease-in;animation:animsquare4 2s infinite ease-in}.ff-loading .loader .square span{position:absolute;top:0;left:20px;height:36px;width:36px;border-radius:2px;background-color:#fff}.ff-loading .loader .square span:nth-child(1){top:0;-webkit-animation-delay:0s;animation-delay:0s}.ff-loading .loader .square span:nth-child(2){top:44px;-webkit-animation-delay:.15s;animation-delay:.15s}.ff-loading .loader .square span:nth-child(3){top:88px;-webkit-animation-delay:.3s;animation-delay:.3s}@media (max-width: 550px){.ff-loading .loader{-webkit-transform:scale(.75);transform:scale(.75)}}@media (max-width: 440px){.ff-loading .loader{-webkit-transform:scale(.5);transform:scale(.5)}}@keyframes animsquare4{0%,5%,95%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}30%,70%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}@keyframes animsquare3{0%,10%,90%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}35%,65%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}@keyframes animsquare2{0%,15%,85%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}40%,60%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}@keyframes animsquare1{0%,20%,80%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}45%,55%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}.ff-notification{position:fixed;z-index:2000;display:flex;max-height:100vh;padding:20px;align-items:flex-end;width:380px;overflow-x:hidden;overflow-y:clip;height:100vh;box-sizing:content-box;pointer-events:none;flex-direction:column;gap:24px}.ff-notification-top,.ff-notification-topLeft,.ff-notification-topRight{top:0}.ff-notification-bottom,.ff-notification-bottomRight,.ff-notification-bottomLeft{bottom:0}.ff-notification-bottomRight,.ff-notification-topRight{right:0}.ff-notification-notice{position:relative;display:block;box-sizing:border-box;line-height:1.5;width:100%}.ff-notification-notice-wrapper{z-index:2000;pointer-events:auto;position:relative;display:block;box-sizing:border-box;border-radius:8px;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d;width:calc(100% - 40px);background-color:#fff;right:0}.ff-notification-notice-content{padding:14px 18px;display:flex;gap:8px;white-space:pre-wrap}.ff-notification-notice-content .ff-notification-icon.ff-notification-error{--bg-color: #ff4d4f}.ff-notification-notice-content .ff-notification-icon.ff-notification-success{--bg-color: #52c41a}.ff-notification-notice-content .ff-notification-icon.ff-notification-info{--bg-color: #1677ff}.ff-notification-notice-content .ff-notification-icon>*:first-child{width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;color:#fff;background-color:var(--bg-color)}.ff-notification-notice-progress{position:absolute;left:3px;right:3px;border-radius:1px;overflow:hidden;-moz-appearance:none;appearance:none;-webkit-appearance:none;display:block;inline-size:100%;block-size:2px;border:0}.ff-notification-notice-progress,.ff-notification-notice-progress::-webkit-progress-bar{background-color:#0000000a}.ff-notification-notice-progress::-moz-progress-bar{background-color:#31afff}.ff-notification-notice-progress::-webkit-progress-value{background-color:#31afff}.ff-notification-fade{overflow:hidden;transition:all .3s}.ff-notification-fade-appear-prepare{pointer-events:none;opacity:0!important}.ff-notification-fade-appear-start{transform:translate(100%);opacity:0}.ff-notification-fade-appear-active{transform:translate(0);opacity:1}.ff-data-list-framework{height:100%;--sider-width: 280px;--col-num: 1;--col-width: 200px;--gap: 8px;display:flex;gap:var(--gap)}.ff-data-list-framework .ff-data-list-container{width:100%;height:100%;row-gap:var(--gap);display:flex;flex-direction:column}.ff-data-list-framework .ff-data-list-container .ff-data-list-content{flex:1;overflow-y:auto;padding:calc(var(--gap) / 2)}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item{display:flex;flex-direction:column;justify-content:space-between;row-gap:8px;border-radius:4px;background-color:#fff;box-shadow:0 0 8px #00000014}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .ff-grid-layout{padding:8px}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions{margin-top:8px;display:flex;justify-content:space-between;border-top:1px solid #f0f0f0}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions .data-list-grid-layout-item-action{text-align:center;margin:2px 0;flex:1}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions .data-list-grid-layout-item-action:not(:last-child){border-right:1px solid #f0f0f0}.ff-data-table-framework{height:100%;--sider-width: 280px;--col-num: 1;--gap: 8px;display:flex;gap:var(--gap)}.ff-data-table-framework .ff-data-table-container{width:100%;height:100%;display:flex;flex-direction:column;row-gap:var(--gap)}.ff-data-list-filter:has(.ff-data-list-filter-actions:not(.expanded)){height:60px;overflow-y:hidden}.ff-data-list-filter .ff-data-list-filter-default-form.ff-grid-layout-form{--grid-layout-cols: 25;--grid-layout-item-margin-x: 8px;--grid-layout-item-margin-y: 16px}.ff-data-list-filter .ff-data-list-filter-actions{grid-column:span var(--itemp-span, 5) / calc(var(--grid-layout-cols, 25) + 1)}.ff-data-list-filter .ff-data-list-filter-actions:not(.expanded){grid-row:1}.ff-data-list-filter .ff-data-list-filter-actions .ff-data-list-filter-expanded-button{margin-left:8px}.ff-data-list-filter .ff-data-list-filter-actions .ant-form-item-control-input-content{display:flex;justify-content:flex-end;align-items:center;gap:8px}.ff-data-list-footer{padding-block-start:8px;display:flex;justify-content:space-between}.ff-data-list-footer .ff-data-list-actions{display:flex;justify-content:center;gap:8px}.ff-data-list-sider{width:var(--sider-width, 280px);overflow-y:auto;box-shadow:8px 0 4px -8px #0000000d}.ff-data-list-sider+.ff-data-list-container{width:calc(100% - var(--sider-width, 280px))}.ff-data-list-toolbar{gap:8px;display:flex;justify-content:space-between;align-items:center}.ff-data-list-toolbar .ff-data-list-title{color:#000000e0;font-weight:600;font-size:14px}.ff-data-list-toolbar .ff-data-list-actions{display:flex;justify-content:center;gap:8px}.ff-data-list-toolbar .ff-data-list-tabs{cursor:pointer}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab{color:#00000073}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab:hover{font-weight:600}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab.active{color:#1677ff;font-weight:600}.ff-data-list-item-operations{max-width:180px;display:flex;flex-wrap:wrap;gap:var(--margin-xss, 4px)}.ff-data-list-item-operations>.ant-btn:not(.ant-btn-circle){flex-grow:1}.ff-data-list-helper{height:100%}.ff-data-list-table{height:100%;overflow-y:hidden}.ff-data-list-table .ant-table *{scrollbar-width:auto;scrollbar-color:auto}.ff-grid-layout{--grid-layout-h: 1;--grid-layout-row: none;--grid-layout-row-height: 18px;--grid-layout-row-height-offset: 0px;--grid-layout-cols: 12;display:grid;grid-template-columns:repeat(var(--grid-layout-cols),1fr);grid-auto-rows:minmax(min-content,max-content);padding:var(--grid-layout-container-padding-y, 0) var(--grid-layout-container-padding-x, 0);padding-bottom:calc(var(--grid-layout-container-padding-y, 0) + var(--grid-layout-item-margin-y));column-gap:var(--grid-layout-item-margin-x);row-gap:var(--grid-layout-item-margin-y)}.ff-grid-layout .grid-layout-item{grid-row:span var(--grid-layout-h, 1);grid-column:calc(var(--grid-layout-x, 1) + 1)/calc(var(--grid-layout-x, 1) + var(--grid-layout-w, 1) + 1);height:calc(var(--grid-layout-row-height) * var(--grid-layout-h) + var(--grid-layout-row-height-offset));padding:var(--grid-layout-box-paddin);margin:var(--grid-layout-box-margin);display:var(--grid-layout-box-display, flex);align-items:var(--grid-layout-box-align-items, center);justify-content:var(--grid-layout-box-justify-content, normal)}.ff-data-list-content{display:grid;gap:var(--gap, 8px);grid-template-columns:repeat(var(--col-num, 5),1fr);grid-auto-rows:min-content}.ff-data-list-content[style*=--col-width]{grid-template-columns:repeat(auto-fill,minmax(var(--col-width, 280px),1fr))}.ff-grid-layout-form{--grid-layout-h: 1;--grid-layout-row: none;--grid-layout-row-height: 18px;--grid-layout-row-height-offset: 0px;--grid-layout-cols: 12;display:grid;grid-template-columns:repeat(var(--grid-layout-cols),1fr);grid-auto-rows:minmax(min-content,max-content);padding:var(--grid-layout-container-padding-y, 0) var(--grid-layout-container-padding-x, 0);padding-bottom:calc(var(--grid-layout-container-padding-y, 0) + var(--grid-layout-item-margin-y, 16px));column-gap:var(--grid-layout-item-margin-x, 8px);row-gap:var(--grid-layout-item-margin-y, 16px)}.ff-grid-layout-form .grid-layout-item{grid-row:span var(--grid-layout-h, 1);grid-column:calc(var(--grid-layout-x, 1) + 1)/calc(var(--grid-layout-x, 1) + var(--grid-layout-w, 1) + 1);height:calc(var(--grid-layout-row-height) * var(--grid-layout-h) + var(--grid-layout-row-height-offset));padding:var(--grid-layout-box-padding-y, 0) var(--grid-layout-box-padding-x, 0);margin:var(--grid-layout-box-margin)}.ff-iconfont{transform:scale(1.14);vertical-align:-.125em;display:inline-flex;align-items:center;justify-content:center}.ff-iconfont:not(:last-child){margin-right:8px}.ff-button.ant-btn-link,.ff-button.ant-btn-text{width:initial;padding:0;height:auto}.ff-default.ant-btn-link{color:#000000e0}.ant-btn-link.ant-btn:not(:disabled):focus-visible{outline:initial;outline-offset:initial;transition:initial}.ff-popover .ff-popup-header{margin-bottom:calc(var(--margin-sm) / 2)}.ff-popover .ff-popup-header:empty{display:none}.ff-popover .ff-popup-footer{display:flex;justify-content:space-between;margin-top:var(--margin-sm)}.ff-popover .ff-popup-footer:empty{display:none}.ff-modal-form{display:flex;flex-direction:column;gap:var(--modal-form-gap, 8px)}.mask-motion-enter-active,.mask-motion-appear-active,.mask-motion-leave-active{transition:all .3s}.mask-motion-enter,.mask-motion-appear{opacity:0}.mask-motion-enter-active,.mask-motion-appear-active,.mask-motion-leave{opacity:1}.mask-motion-leave-active{opacity:0}.panel-motion-left-enter-start,.panel-motion-left-appear-start,.panel-motion-left-leave-start{transition:none!important}.panel-motion-left-enter-active,.panel-motion-left-appear-active,.panel-motion-left-leave-active{transition:all .3s}.panel-motion-left-enter,.panel-motion-left-appear{transform:translate(-100%)}.panel-motion-left-enter-active,.panel-motion-left-appear-active,.panel-motion-left-leave{transform:translate(0)}.panel-motion-left-leave-active{transform:translate(-100%)!important}.panel-motion-right-enter-start,.panel-motion-right-appear-start,.panel-motion-right-leave-start{transition:none!important}.panel-motion-right-enter-active,.panel-motion-right-appear-active,.panel-motion-right-leave-active{transition:all .3s}.panel-motion-right-enter,.panel-motion-right-appear{transform:translate(100%)}.panel-motion-right-enter-active,.panel-motion-right-appear-active,.panel-motion-right-leave{transform:translate(0)}.panel-motion-right-leave-active{transform:translate(100%)!important}.panel-motion-top-enter-start,.panel-motion-top-appear-start,.panel-motion-top-leave-start{transition:none!important}.panel-motion-top-enter-active,.panel-motion-top-appear-active,.panel-motion-top-leave-active{transition:all .3s}.panel-motion-top-enter,.panel-motion-top-appear{transform:translateY(-100%)}.panel-motion-top-enter-active,.panel-motion-top-appear-active,.panel-motion-top-leave{transform:translateY(0)}.panel-motion-top-leave-active{transform:translateY(-100%)!important}.panel-motion-bottom-enter-start,.panel-motion-bottom-appear-start,.panel-motion-bottom-leave-start{transition:none!important}.panel-motion-bottom-enter-active,.panel-motion-bottom-appear-active,.panel-motion-bottom-leave-active{transition:all .3s}.panel-motion-bottom-enter,.panel-motion-bottom-appear{transform:translateY(100%)}.panel-motion-bottom-enter-active,.panel-motion-bottom-appear-active,.panel-motion-bottom-leave{transform:translateY(0)}.panel-motion-bottom-leave-active{transform:translateY(100%)!important}.ff-drawer-mask{top:0;right:0;bottom:0;left:0;position:absolute;z-index:1050;pointer-events:auto;background-color:var(--popup-mask-bg-color, rgba(0, 0, 0, .45))}.ff-drawer{top:0;right:0;bottom:0;left:0;position:fixed;z-index:1050;pointer-events:none}.ff-drawer .ff-popup-close{top:14px;right:0}.ff-drawer-inline{position:absolute}.ff-drawer-left .ff-drawer-content-wrapper{inset:0 auto 0 0;box-shadow:6px 0 16px #00000014,3px 0 6px -4px #0000001f,9px 0 28px 8px #0000000d}.ff-drawer-right .ff-drawer-content-wrapper{inset:0 0 0 auto;box-shadow:-6px 0 16px #00000014,-3px 0 6px -4px #0000001f,-9px 0 28px 8px #0000000d}.ff-drawer-top .ff-drawer-content-wrapper{top:0;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d}.ff-drawer-bottom .ff-drawer-content-wrapper{bottom:0;box-shadow:0 -6px 16px #00000014,0 -3px 6px -4px #0000001f,0 -9px 28px 8px #0000000d}.ff-drawer-top .ff-drawer-content-wrapper,.ff-drawer-bottom .ff-drawer-content-wrapper{inset-inline:0}.ff-drawer-content{width:100%;height:100%;overflow:auto;background-color:var(--popup-bg-color, #fff);pointer-events:auto}.ff-drawer .ff-popup-header{padding:16px 8px;border-bottom:1px solid rgba(5,5,5,.06)}.ff-drawer .ff-popup-footer{border-top:1px solid rgba(5,5,5,.06);padding:12px 8px}.ff-drawer .ff-popup-body{padding:8px}.ff-drawer-content-wrapper{position:absolute;z-index:1050;overflow:hidden;transition:transform .3s;max-width:100vw}.ff-drawer-content-wrapper-hidden{display:none}.ff-modal-mask{position:fixed;top:0;right:0;left:0;bottom:0;pointer-events:auto;background-color:var(--popup-mask-bg-color, rgba(0, 0, 0, .45));height:100%;filter:alpha(opacity=50);z-index:1050}.ff-modal-mask-hidden{display:none}.ff-modal-fade-enter,.ff-modal-fade-appear{opacity:0;animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.55,0,.55,.2);animation-play-state:paused}.ff-modal-fade-leave{animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.55,0,.55,.2);animation-play-state:paused}.ff-modal-fade-enter.ff-modal-fade-enter-active,.ff-modal-fade-appear.ff-modal-fade-appear-active{animation-name:rcDialogFadeIn;animation-play-state:running}.ff-modal-fade-leave.ff-modal-fade-leave-active{animation-name:rcDialogFadeOut;animation-play-state:running}@keyframes rcDialogFadeIn{0%{opacity:0}to{opacity:1}}@keyframes rcDialogFadeOut{0%{opacity:1}to{opacity:0}}.ff-modal{position:relative;top:100px;min-width:max(35vw,248px);padding:0;margin:0 auto}.ff-modal .ff-popup-close{position:absolute;top:14px;right:8px}.ff-modal .ff-popup-header:has(.ff-popup-title),.ff-modal .ff-popup-header:has(.ff-popup-sub-title){margin-bottom:8px}.ff-modal .ff-popup-footer:not(:empty){margin-top:12px}.ff-modal-wrap{position:fixed;overflow:auto;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.ff-modal-title{margin:0;font-size:14px;line-height:21px;font-weight:700}.ff-modal-content{position:relative;background-color:var(--popup-bg-color, #fff);border-radius:8px;background-clip:padding-box;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d;padding:20px 24px;max-height:calc(100vh - 150px)}.ff-modal-zoom-enter,.ff-modal-zoom-appear{opacity:0;animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-play-state:paused}.ff-modal-zoom-leave{animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.6,.04,.98,.34);animation-play-state:paused}.ff-modal-zoom-enter.ff-modal-zoom-enter-active,.ff-modal-zoom-appear.ff-modal-zoom-appear-active{animation-name:rcDialogZoomIn;animation-play-state:running}.ff-modal-zoom-leave.ff-modal-zoom-leave-active{animation-name:rcDialogZoomOut;animation-play-state:running}@keyframes rcDialogZoomIn{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes rcDialogZoomOut{0%{transform:scale(1)}to{opacity:0;transform:scale(0)}}.ff-popup-close{cursor:pointer;border:0;background:transparent;font-size:24px;position:absolute;line-height:1;color:#000;opacity:.5}.ff-popup-close:disabled{pointer-events:none}.ff-popup-close:hover{opacity:.65}.ff-popup{display:flex;flex-direction:column}.ff-popup-title,.ff-popup-sub-title{display:inline}.ff-popup-title{font-size:18px;font-weight:600}.ff-popup-footer{display:flex;gap:8px;justify-content:flex-end}.ff-popup-footer:empty{display:none}.ff-popup-reserved-extras,.ff-popup-extras,.ff-popup-actions{display:flex;align-items:center;gap:8px}.ff-popup-actions{margin-left:auto}.ff-popup-body{flex:1;overflow-y:auto} +#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;-webkit-transform:rotate(3deg) translate(0px,-4px);-ms-transform:rotate(3deg) translate(0px,-4px);transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:solid 2px transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .spinner,.nprogress-custom-parent #nprogress .bar{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@keyframes nprogress-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.react-grid-layout .react-grid-item{box-sizing:border-box!important}.monaco-editor .parameter-hints-widget{border:0px}.monaco-editor .parameter-hints-widget .signature{padding:0}.monaco-editor .suggest-widget,.monaco-editor.vs-dark .suggest-widget{border:0px}.monaco-editor .rename-box{top:0}.ant-divider:has(+.ant-form .ant-divider:first-child){display:none}:root{--padding-lg: 24px;--padding-md: 16px;--padding-sm: 12px;--padding-xs: 8px;--padding-xss: 4px;--margin-lg: 24px;--margin-md: 16px;--margin-sm: 12px;--margin-xs: 8px;--margin-xss: 4px;--border-color: #f2f2f2;--bg-color: rgba(0, 0, 0, .02)}#root{height:100vh;background-color:#f0f2f5}*::-webkit-scrollbar-thumb{background:#aaa;border-radius:5px}*::-webkit-scrollbar-thumb:hover{background:#999}*::-webkit-scrollbar-track{background-color:#ddd}*::-webkit-scrollbar-corner{background-color:#ddd}*::-webkit-scrollbar{width:5px;height:5px}.ff-container{height:100%}.ff-loading{height:100vh;width:100%;background-color:#f0f2f5;display:flex;justify-content:center;align-items:center}.ff-loading .loader{-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:128px;height:80px}.ff-loading .loader .square{position:relative}.ff-loading .loader .square:nth-child(1){margin-left:0}.ff-loading .loader .square:nth-child(1) span{-webkit-animation:animsquare1 2s infinite ease-in;animation:animsquare1 2s infinite ease-in}.ff-loading .loader .square:nth-child(2){margin-left:44px}.ff-loading .loader .square:nth-child(2) span{-webkit-animation:animsquare2 2s infinite ease-in;animation:animsquare2 2s infinite ease-in}.ff-loading .loader .square:nth-child(3){margin-left:88px}.ff-loading .loader .square:nth-child(3) span{-webkit-animation:animsquare3 2s infinite ease-in;animation:animsquare3 2s infinite ease-in}.ff-loading .loader .square:nth-child(4){margin-left:132px}.ff-loading .loader .square:nth-child(4) span{-webkit-animation:animsquare4 2s infinite ease-in;animation:animsquare4 2s infinite ease-in}.ff-loading .loader .square span{position:absolute;top:0;left:20px;height:36px;width:36px;border-radius:2px;background-color:#fff}.ff-loading .loader .square span:nth-child(1){top:0;-webkit-animation-delay:0s;animation-delay:0s}.ff-loading .loader .square span:nth-child(2){top:44px;-webkit-animation-delay:.15s;animation-delay:.15s}.ff-loading .loader .square span:nth-child(3){top:88px;-webkit-animation-delay:.3s;animation-delay:.3s}@media (max-width: 550px){.ff-loading .loader{-webkit-transform:scale(.75);transform:scale(.75)}}@media (max-width: 440px){.ff-loading .loader{-webkit-transform:scale(.5);transform:scale(.5)}}@keyframes animsquare4{0%,5%,95%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}30%,70%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}@keyframes animsquare3{0%,10%,90%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}35%,65%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}@keyframes animsquare2{0%,15%,85%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}40%,60%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}@keyframes animsquare1{0%,20%,80%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}45%,55%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}.ff-notification{position:fixed;z-index:2000;display:flex;max-height:100vh;padding:20px;align-items:flex-end;width:380px;overflow-x:hidden;overflow-y:clip;height:100vh;box-sizing:content-box;pointer-events:none;flex-direction:column;gap:24px}.ff-notification-top,.ff-notification-topLeft,.ff-notification-topRight{top:0}.ff-notification-bottom,.ff-notification-bottomRight,.ff-notification-bottomLeft{bottom:0}.ff-notification-bottomRight,.ff-notification-topRight{right:0}.ff-notification-notice{position:relative;display:block;box-sizing:border-box;line-height:1.5;width:100%}.ff-notification-notice-wrapper{z-index:2000;pointer-events:auto;position:relative;display:block;box-sizing:border-box;border-radius:8px;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d;width:calc(100% - 40px);background-color:#fff;right:0}.ff-notification-notice-content{padding:14px 18px;display:flex;gap:8px;white-space:pre-wrap}.ff-notification-notice-content .ff-notification-icon.ff-notification-error{--bg-color: #ff4d4f}.ff-notification-notice-content .ff-notification-icon.ff-notification-success{--bg-color: #52c41a}.ff-notification-notice-content .ff-notification-icon.ff-notification-info{--bg-color: #1677ff}.ff-notification-notice-content .ff-notification-icon>*:first-child{width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;color:#fff;background-color:var(--bg-color)}.ff-notification-notice-progress{position:absolute;left:3px;right:3px;border-radius:1px;overflow:hidden;-moz-appearance:none;appearance:none;-webkit-appearance:none;display:block;inline-size:100%;block-size:2px;border:0}.ff-notification-notice-progress,.ff-notification-notice-progress::-webkit-progress-bar{background-color:#0000000a}.ff-notification-notice-progress::-moz-progress-bar{background-color:#31afff}.ff-notification-notice-progress::-webkit-progress-value{background-color:#31afff}.ff-notification-fade{overflow:hidden;transition:all .3s}.ff-notification-fade-appear-prepare{pointer-events:none;opacity:0!important}.ff-notification-fade-appear-start{transform:translate(100%);opacity:0}.ff-notification-fade-appear-active{transform:translate(0);opacity:1}.ff-data-list-framework{height:100%;--sider-width: 280px;--col-num: 1;--col-width: 200px;--gap: 8px;display:flex;gap:var(--gap)}.ff-data-list-framework .ff-data-list-container{width:100%;height:100%;row-gap:var(--gap);display:flex;flex-direction:column}.ff-data-list-framework .ff-data-list-container .ff-data-list-content{flex:1;overflow-y:auto;padding:calc(var(--gap) / 2)}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item{display:flex;flex-direction:column;justify-content:space-between;row-gap:8px;border-radius:4px;background-color:#fff;box-shadow:0 0 8px #00000014}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .ff-grid-layout{padding:8px}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions{margin-top:8px;display:flex;justify-content:space-between;border-top:1px solid #f0f0f0}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions .data-list-grid-layout-item-action{text-align:center;margin:2px 0;flex:1}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions .data-list-grid-layout-item-action:not(:last-child){border-right:1px solid #f0f0f0}.ff-data-table-framework{height:100%;--sider-width: 280px;--col-num: 1;--gap: 8px;display:flex;gap:var(--gap)}.ff-data-table-framework .ff-data-table-container{width:100%;height:100%;display:flex;flex-direction:column;row-gap:var(--gap)}.ff-data-list-filter:has(.ff-data-list-filter-actions:not(.expanded)){height:60px;overflow-y:hidden}.ff-data-list-filter .ff-data-list-filter-default-form.ff-grid-layout-form{--grid-layout-cols: 25;--grid-layout-item-margin-x: 8px;--grid-layout-item-margin-y: 16px}.ff-data-list-filter .ff-data-list-filter-actions{grid-column:span var(--itemp-span, 5) / calc(var(--grid-layout-cols, 25) + 1)}.ff-data-list-filter .ff-data-list-filter-actions:not(.expanded){grid-row:1}.ff-data-list-filter .ff-data-list-filter-actions .ff-data-list-filter-expanded-button{margin-left:8px}.ff-data-list-filter .ff-data-list-filter-actions .ant-form-item-control-input-content{display:flex;justify-content:flex-end;align-items:center;gap:8px}.ff-data-list-footer{padding-block-start:8px;display:flex;justify-content:space-between}.ff-data-list-footer .ff-data-list-actions{display:flex;justify-content:center;gap:8px}.ff-data-list-sider{width:var(--sider-width, 280px);overflow-y:auto;box-shadow:8px 0 4px -8px #0000000d}.ff-data-list-sider+.ff-data-list-container{width:calc(100% - var(--sider-width, 280px))}.ff-data-list-toolbar{gap:8px;display:flex;justify-content:space-between;align-items:center}.ff-data-list-toolbar .ff-data-list-title{color:#000000e0;font-weight:600;font-size:14px}.ff-data-list-toolbar .ff-data-list-actions{display:flex;justify-content:center;gap:8px}.ff-data-list-toolbar .ff-data-list-tabs{cursor:pointer}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab{color:#00000073}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab:hover{font-weight:600}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab.active{color:#1677ff;font-weight:600}.ff-data-list-item-operations{max-width:180px;display:flex;flex-wrap:wrap;gap:var(--margin-xss, 4px)}.ff-data-list-item-operations>.ant-btn:not(.ant-btn-circle){flex-grow:1}.ff-data-list-helper{height:100%}.ff-data-list-table{height:100%;overflow-y:hidden}.ff-data-list-table .ant-table *{scrollbar-width:auto;scrollbar-color:auto}.ff-grid-layout{--grid-layout-h: 1;--grid-layout-row: none;--grid-layout-row-height: 18px;--grid-layout-row-height-offset: 0px;--grid-layout-cols: 12;display:grid;grid-template-columns:repeat(var(--grid-layout-cols),1fr);grid-auto-rows:minmax(min-content,max-content);padding:var(--grid-layout-container-padding-y, 0) var(--grid-layout-container-padding-x, 0);padding-bottom:calc(var(--grid-layout-container-padding-y, 0) + var(--grid-layout-item-margin-y));column-gap:var(--grid-layout-item-margin-x);row-gap:var(--grid-layout-item-margin-y)}.ff-grid-layout .grid-layout-item{grid-row:span var(--grid-layout-h, 1);grid-column:calc(var(--grid-layout-x, 1) + 1)/calc(var(--grid-layout-x, 1) + var(--grid-layout-w, 1) + 1);height:calc(var(--grid-layout-row-height) * var(--grid-layout-h) + var(--grid-layout-row-height-offset));padding:var(--grid-layout-box-paddin);margin:var(--grid-layout-box-margin);display:var(--grid-layout-box-display, flex);align-items:var(--grid-layout-box-align-items, center);justify-content:var(--grid-layout-box-justify-content, normal)}.ff-data-list-content{display:grid;gap:var(--gap, 8px);grid-template-columns:repeat(var(--col-num, 5),1fr);grid-auto-rows:min-content}.ff-data-list-content[style*=--col-width]{grid-template-columns:repeat(auto-fill,minmax(var(--col-width, 280px),1fr))}.ff-grid-layout-form{--grid-layout-h: 1;--grid-layout-row: none;--grid-layout-row-height: 18px;--grid-layout-row-height-offset: 0px;--grid-layout-cols: 12;display:grid;grid-template-columns:repeat(var(--grid-layout-cols),1fr);grid-auto-rows:minmax(min-content,max-content);padding:var(--grid-layout-container-padding-y, 0) var(--grid-layout-container-padding-x, 0);padding-bottom:calc(var(--grid-layout-container-padding-y, 0) + var(--grid-layout-item-margin-y, 16px));column-gap:var(--grid-layout-item-margin-x, 8px);row-gap:var(--grid-layout-item-margin-y, 16px)}.ff-grid-layout-form .grid-layout-item{grid-row:span var(--grid-layout-h, 1);grid-column:calc(var(--grid-layout-x, 1) + 1)/calc(var(--grid-layout-x, 1) + var(--grid-layout-w, 1) + 1);height:calc(var(--grid-layout-row-height) * var(--grid-layout-h) + var(--grid-layout-row-height-offset));padding:var(--grid-layout-box-padding-y, 0) var(--grid-layout-box-padding-x, 0);margin:var(--grid-layout-box-margin)}.ff-iconfont{transform:scale(1.14);vertical-align:-.125em;display:inline-flex;align-items:center;justify-content:center}.ff-iconfont:not(:last-child){margin-right:8px}.ff-popover .ff-popup-header{margin-bottom:calc(var(--margin-sm) / 2)}.ff-popover .ff-popup-header:empty{display:none}.ff-popover .ff-popup-footer{display:flex;justify-content:space-between;margin-top:var(--margin-sm)}.ff-popover .ff-popup-footer:empty{display:none}.ff-button.ant-btn-link,.ff-button.ant-btn-text{width:initial;padding:0;height:auto}.ff-default.ant-btn-link{color:#000000e0}.ant-btn-link.ant-btn:not(:disabled):focus-visible{outline:initial;outline-offset:initial;transition:initial}.ff-modal-form{display:flex;flex-direction:column;gap:var(--modal-form-gap, 8px)}.mask-motion-enter-active,.mask-motion-appear-active,.mask-motion-leave-active{transition:all .3s}.mask-motion-enter,.mask-motion-appear{opacity:0}.mask-motion-enter-active,.mask-motion-appear-active,.mask-motion-leave{opacity:1}.mask-motion-leave-active{opacity:0}.panel-motion-left-enter-start,.panel-motion-left-appear-start,.panel-motion-left-leave-start{transition:none!important}.panel-motion-left-enter-active,.panel-motion-left-appear-active,.panel-motion-left-leave-active{transition:all .3s}.panel-motion-left-enter,.panel-motion-left-appear{transform:translate(-100%)}.panel-motion-left-enter-active,.panel-motion-left-appear-active,.panel-motion-left-leave{transform:translate(0)}.panel-motion-left-leave-active{transform:translate(-100%)!important}.panel-motion-right-enter-start,.panel-motion-right-appear-start,.panel-motion-right-leave-start{transition:none!important}.panel-motion-right-enter-active,.panel-motion-right-appear-active,.panel-motion-right-leave-active{transition:all .3s}.panel-motion-right-enter,.panel-motion-right-appear{transform:translate(100%)}.panel-motion-right-enter-active,.panel-motion-right-appear-active,.panel-motion-right-leave{transform:translate(0)}.panel-motion-right-leave-active{transform:translate(100%)!important}.panel-motion-top-enter-start,.panel-motion-top-appear-start,.panel-motion-top-leave-start{transition:none!important}.panel-motion-top-enter-active,.panel-motion-top-appear-active,.panel-motion-top-leave-active{transition:all .3s}.panel-motion-top-enter,.panel-motion-top-appear{transform:translateY(-100%)}.panel-motion-top-enter-active,.panel-motion-top-appear-active,.panel-motion-top-leave{transform:translateY(0)}.panel-motion-top-leave-active{transform:translateY(-100%)!important}.panel-motion-bottom-enter-start,.panel-motion-bottom-appear-start,.panel-motion-bottom-leave-start{transition:none!important}.panel-motion-bottom-enter-active,.panel-motion-bottom-appear-active,.panel-motion-bottom-leave-active{transition:all .3s}.panel-motion-bottom-enter,.panel-motion-bottom-appear{transform:translateY(100%)}.panel-motion-bottom-enter-active,.panel-motion-bottom-appear-active,.panel-motion-bottom-leave{transform:translateY(0)}.panel-motion-bottom-leave-active{transform:translateY(100%)!important}.ff-drawer-mask{top:0;right:0;bottom:0;left:0;position:absolute;z-index:1050;pointer-events:auto;background-color:var(--popup-mask-bg-color, rgba(0, 0, 0, .45))}.ff-drawer{top:0;right:0;bottom:0;left:0;position:fixed;z-index:1050;pointer-events:none}.ff-drawer .ff-popup-close{top:14px;right:0}.ff-drawer-inline{position:absolute}.ff-drawer-left .ff-drawer-content-wrapper{inset:0 auto 0 0;box-shadow:6px 0 16px #00000014,3px 0 6px -4px #0000001f,9px 0 28px 8px #0000000d}.ff-drawer-right .ff-drawer-content-wrapper{inset:0 0 0 auto;box-shadow:-6px 0 16px #00000014,-3px 0 6px -4px #0000001f,-9px 0 28px 8px #0000000d}.ff-drawer-top .ff-drawer-content-wrapper{top:0;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d}.ff-drawer-bottom .ff-drawer-content-wrapper{bottom:0;box-shadow:0 -6px 16px #00000014,0 -3px 6px -4px #0000001f,0 -9px 28px 8px #0000000d}.ff-drawer-top .ff-drawer-content-wrapper,.ff-drawer-bottom .ff-drawer-content-wrapper{inset-inline:0}.ff-drawer-content{width:100%;height:100%;overflow:auto;background-color:var(--popup-bg-color, #fff);pointer-events:auto}.ff-drawer .ff-popup-header{padding:16px 8px;border-bottom:1px solid rgba(5,5,5,.06)}.ff-drawer .ff-popup-footer{border-top:1px solid rgba(5,5,5,.06);padding:12px 8px}.ff-drawer .ff-popup-body{padding:8px}.ff-drawer-content-wrapper{position:absolute;z-index:1050;overflow:hidden;transition:transform .3s;max-width:100vw}.ff-drawer-content-wrapper-hidden{display:none}.ff-modal-mask{position:fixed;top:0;right:0;left:0;bottom:0;pointer-events:auto;background-color:var(--popup-mask-bg-color, rgba(0, 0, 0, .45));height:100%;filter:alpha(opacity=50);z-index:1050}.ff-modal-mask-hidden{display:none}.ff-modal-fade-enter,.ff-modal-fade-appear{opacity:0;animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.55,0,.55,.2);animation-play-state:paused}.ff-modal-fade-leave{animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.55,0,.55,.2);animation-play-state:paused}.ff-modal-fade-enter.ff-modal-fade-enter-active,.ff-modal-fade-appear.ff-modal-fade-appear-active{animation-name:rcDialogFadeIn;animation-play-state:running}.ff-modal-fade-leave.ff-modal-fade-leave-active{animation-name:rcDialogFadeOut;animation-play-state:running}@keyframes rcDialogFadeIn{0%{opacity:0}to{opacity:1}}@keyframes rcDialogFadeOut{0%{opacity:1}to{opacity:0}}.ff-modal{position:relative;top:100px;min-width:max(35vw,248px);padding:0;margin:0 auto}.ff-modal .ff-popup-close{position:absolute;top:14px;right:8px}.ff-modal .ff-popup-header:has(.ff-popup-title),.ff-modal .ff-popup-header:has(.ff-popup-sub-title){margin-bottom:8px}.ff-modal .ff-popup-footer:not(:empty){margin-top:12px}.ff-modal-wrap{position:fixed;overflow:auto;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.ff-modal-title{margin:0;font-size:14px;line-height:21px;font-weight:700}.ff-modal-content{position:relative;background-color:var(--popup-bg-color, #fff);border-radius:8px;background-clip:padding-box;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d;padding:20px 24px;max-height:calc(100vh - 150px)}.ff-modal-zoom-enter,.ff-modal-zoom-appear{opacity:0;animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-play-state:paused}.ff-modal-zoom-leave{animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.6,.04,.98,.34);animation-play-state:paused}.ff-modal-zoom-enter.ff-modal-zoom-enter-active,.ff-modal-zoom-appear.ff-modal-zoom-appear-active{animation-name:rcDialogZoomIn;animation-play-state:running}.ff-modal-zoom-leave.ff-modal-zoom-leave-active{animation-name:rcDialogZoomOut;animation-play-state:running}@keyframes rcDialogZoomIn{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes rcDialogZoomOut{0%{transform:scale(1)}to{opacity:0;transform:scale(0)}}.ff-popup-close{cursor:pointer;border:0;background:transparent;font-size:24px;position:absolute;line-height:1;color:#000;opacity:.5}.ff-popup-close:disabled{pointer-events:none}.ff-popup-close:hover{opacity:.65}.ff-popup{display:flex;flex-direction:column}.ff-popup-title,.ff-popup-sub-title{display:inline}.ff-popup-title{font-size:18px;font-weight:600}.ff-popup-footer{display:flex;gap:8px;justify-content:flex-end}.ff-popup-footer:empty{display:none}.ff-popup-reserved-extras,.ff-popup-extras,.ff-popup-actions{display:flex;align-items:center;gap:8px}.ff-popup-actions{margin-left:auto}.ff-popup-body{flex:1;overflow-y:auto} diff --git a/dist/utils.js b/dist/utils.js index ac6e555..fe02f85 100644 --- a/dist/utils.js +++ b/dist/utils.js @@ -1,5 +1,5 @@ import "lodash"; -import { d as r, e as g, c as o, f as i, b as m, h as p, r as P, t as d, u as h } from "./common/main-DnobNY7x.js"; +import { d as r, e as g, c as o, f as i, b as m, h as p, r as P, t as d, u as h } from "./common/main-DEetVaxx.js"; import "./common/vender-CtjyT19B.js"; export { r as deepSome, diff --git a/package.json b/package.json index e4a6f2d..fa7b73e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ff", "private": true, - "version": "0.5.11", + "version": "0.5.12", "author": "www.fsdpf.com", "type": "module", "main": "./dist/index.js",