diff --git a/dist/button.js b/dist/button.js index 66dda25..82431bc 100644 --- a/dist/button.js +++ b/dist/button.js @@ -1,4 +1,4 @@ -import { am as s, al as u, an as e } from "./common/main-CVUJh_JV.js"; +import { am as s, al as u, an as e } from "./common/main-BF14mrhu.js"; export { s as auth, u as default, diff --git a/dist/common/main-CVUJh_JV.js b/dist/common/main-BF14mrhu.js similarity index 50% rename from dist/common/main-CVUJh_JV.js rename to dist/common/main-BF14mrhu.js index 58ccc34..1c8928e 100644 --- a/dist/common/main-CVUJh_JV.js +++ b/dist/common/main-BF14mrhu.js @@ -1,11 +1,11 @@ var Ai = Object.defineProperty; -var bn = (t) => { +var Cn = (t) => { throw TypeError(t); }; var Ii = (t, e, n) => e in t ? Ai(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n; -var T = (t, e, n) => Ii(t, typeof e != "symbol" ? e + "" : e, n), Cn = (t, e, n) => e.has(t) || bn("Cannot " + n); -var d = (t, e, n) => (Cn(t, e, "read from private field"), n ? n.call(t) : e.get(t)), v = (t, e, n) => e.has(t) ? bn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), K = (t, e, n, i) => (Cn(t, e, "write to private field"), i ? i.call(t, n) : e.set(t, n), n); -var kn = (t, e, n, i) => ({ +var T = (t, e, n) => Ii(t, typeof e != "symbol" ? e + "" : e, n), kn = (t, e, n) => e.has(t) || Cn("Cannot " + n); +var d = (t, e, n) => (kn(t, e, "read from private field"), n ? n.call(t) : e.get(t)), x = (t, e, n) => e.has(t) ? Cn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), K = (t, e, n, i) => (kn(t, e, "write to private field"), i ? i.call(t, n) : e.set(t, n), n); +var Sn = (t, e, n, i) => ({ set _(r) { K(t, e, r, n); }, @@ -13,143 +13,143 @@ var kn = (t, e, n, i) => ({ return d(t, e, i); } }); -import { jsx as m, jsxs as I } from "react/jsx-runtime"; +import { jsx as h, jsxs as I } from "react/jsx-runtime"; import E, { useEffect as U, useState as L, useCallback as G, useRef as J, useContext as ge, useMemo as z, useId as Dt, isValidElement as Li, useLayoutEffect as Mi } from "react"; import he from "pathe"; import C from "prop-types"; import j from "classnames"; import { useNotification as Vi } from "rc-notification"; -import f from "lodash"; -import oe, { Field as Zt, FieldContext as Mn } from "rc-field-form"; -import { useMountedState as Di, useDeepCompareEffect as en, useUpdateEffect as Vn, usePrevious as Dn } from "react-use"; -import { _ as Sn, M as It, N as tt, b as De, i as Wt, c as Wi, S as Bi } from "./vender-hQk7ADWo.js"; +import y from "lodash"; +import { useMountedState as Di, useDeepCompareEffect as Zt, useUpdateEffect as en, usePrevious as Vn } from "react-use"; +import ae, { Field as tn, FieldContext as Dn } from "rc-field-form"; +import { _ as En, M as It, N as tt, b as De, i as Wt, c as Wi, S as Bi } from "./vender-hQk7ADWo.js"; import zi from "rc-util/lib/hooks/useMergedState"; import Wn from "immutability-helper"; -import { Space as Bt, Form as bt, Input as Ui, Button as kt, Pagination as qi, Tree as Ki, Breadcrumb as Hi, Empty as zt, Table as En, Popover as _i, Popconfirm as Ji, Tooltip as Gi, Divider as Yi } from "antd"; +import { Space as Bt, Form as bt, Input as Ui, Button as kt, Pagination as qi, Tree as Ki, Breadcrumb as Hi, Empty as zt, Table as Pn, Popover as _i, Popconfirm as Ji, Tooltip as Gi, Divider as Yi } from "antd"; import { useMergedState as Xi } from "rc-util"; import { generatePath as Qi, useInRouterContext as Bn, useParams as Zi, useLocation as er, createBrowserRouter as tr, Navigate as nr } from "react-router-dom"; import ir from "rc-drawer"; import rr from "rc-dialog"; -import * as xn from "react-is"; +import * as $n from "react-is"; var He, it, _e, $e, We, Be; class zn { constructor(e, n) { - v(this, He, /* @__PURE__ */ new Map()); - v(this, it, !0); - v(this, _e, []); - v(this, $e); - v(this, We, () => d(this, $e)); - v(this, Be, () => Promise.resolve()); + x(this, He, /* @__PURE__ */ new Map()); + x(this, it, !0); + x(this, _e, []); + x(this, $e); + x(this, We, () => d(this, $e)); + x(this, Be, () => Promise.resolve()); T(this, "get", (...e) => new Promise((n, i) => { const r = JSON.stringify(e); if (d(this, He).has(r)) return n(d(this, Be).call(this, d(this, $e), ...e)); - if (d(this, $e) === void 0) d(this, _e).push([e, n, i]), d(this, it) && (K(this, it, !1), Promise.resolve(typeof d(this, We) == "function" ? d(this, We).call(this) : d(this, We)).then((a) => K(this, $e, a || null)).finally(() => { - d(this, _e).forEach(([a, o, s]) => { + if (d(this, $e) === void 0) d(this, _e).push([e, n, i]), d(this, it) && (K(this, it, !1), Promise.resolve(typeof d(this, We) == "function" ? d(this, We).call(this) : d(this, We)).then((o) => K(this, $e, o || null)).finally(() => { + d(this, _e).forEach(([o, a, s]) => { try { - const l = d(this, Be).call(this, d(this, $e), ...a); - d(this, He).set(JSON.stringify(a), l), o(l); + const l = d(this, Be).call(this, d(this, $e), ...o); + d(this, He).set(JSON.stringify(o), l), a(l); } catch (l) { s(l); } }), d(this, _e).length = 0; })); else { - const a = d(this, Be).call(this, d(this, $e), ...e); - d(this, He).set(r, a), n(a); + const o = d(this, Be).call(this, d(this, $e), ...e); + d(this, He).set(r, o), n(o); } })); K(this, Be, n), K(this, We, e); } } He = new WeakMap(), it = new WeakMap(), _e = new WeakMap(), $e = new WeakMap(), We = new WeakMap(), Be = new WeakMap(); -const Oa = () => m("div", { children: "Empty" }), ht = E.createContext({ ele: {}, mount: () => { +const Ro = () => h("div", { children: "Empty" }), ht = E.createContext({ ele: {}, mount: () => { }, unmount: () => { -} }), te = ({ rootClassName: t, className: e, children: n, actions: i, title: r, subTitle: a, extras: o, style: s = {} }) => { +} }), ne = ({ rootClassName: t, className: e, children: n, actions: i, title: r, subTitle: o, extras: a, style: s = {} }) => { const { mount: l, unmount: c } = E.useContext(ht); - return te.Action({ children: i }), te.Title({ children: r }), te.SubTitle({ children: a }), te.Extra({ children: o }), U(() => (l("rootClassName", t), () => c(t)), [t]), m("div", { className: j("ff-container", e), style: s, children: n }); + return ne.Action({ children: i }), ne.Title({ children: r }), ne.SubTitle({ children: o }), ne.Extra({ children: a }), U(() => (l("rootClassName", t), () => c(t)), [t]), h("div", { className: j("ff-container", e), style: s, children: n }); }, wt = (t) => ({ children: e, className: n }) => { const { mount: i, unmount: r } = E.useContext(ht); return U(() => (e && i(t, E.createElement("div", { key: `ff-${t}`, className: j(`ff-popup-${t}`, n) }, e)), () => r(t)), [n, e]), null; }; -te.Action = wt("actions"), te.Title = wt("title"), te.SubTitle = wt("sub-title"), te.Extra = wt("extras"), te.propTypes = { className: C.string, style: C.object, title: C.any, subTitle: C.any, actions: C.any, extras: C.any }; -const Ra = () => m(te, { className: "ff-loading", children: I("div", { className: "loader", children: [I("div", { className: "square", children: [m("span", {}), m("span", {}), m("span", {})] }), I("div", { className: "square", children: [m("span", {}), m("span", {}), m("span", {})] }), I("div", { className: "square", children: [m("span", {}), m("span", {}), m("span", {})] }), I("div", { className: "square", children: [m("span", {}), m("span", {}), m("span", {})] })] }) }), Fa = () => m("div", { children: "NotFound" }), Un = ({ children: t }) => { - const [e, n] = L({}), i = G((a, o) => n((s) => ({ ...s, [a]: o })), []), r = G((a) => n((o) => ({ ...o, [a]: void 0 })), []); - return typeof (t == null ? void 0 : t.type) == "string" ? t : m(ht.Provider, { value: { ele: e, mount: i, unmount: r }, children: E.cloneElement(t, { className: e.rootClassName, title: e.title, subTitle: e["sub-title"], actions: e.actions, extras: e.extras }) }); +ne.Action = wt("actions"), ne.Title = wt("title"), ne.SubTitle = wt("sub-title"), ne.Extra = wt("extras"), ne.propTypes = { className: C.string, style: C.object, title: C.any, subTitle: C.any, actions: C.any, extras: C.any }; +const Fo = () => h(ne, { className: "ff-loading", children: I("div", { className: "loader", children: [I("div", { className: "square", children: [h("span", {}), h("span", {}), h("span", {})] }), I("div", { className: "square", children: [h("span", {}), h("span", {}), h("span", {})] }), I("div", { className: "square", children: [h("span", {}), h("span", {}), h("span", {})] }), I("div", { className: "square", children: [h("span", {}), h("span", {}), h("span", {})] })] }) }), jo = () => h("div", { children: "NotFound" }), Un = ({ children: t }) => { + const [e, n] = L({}), i = G((o, a) => n((s) => ({ ...s, [o]: a })), []), r = G((o) => n((a) => ({ ...a, [o]: void 0 })), []); + return typeof (t == null ? void 0 : t.type) == "string" ? t : h(ht.Provider, { value: { ele: e, mount: i, unmount: r }, children: E.cloneElement(t, { className: e.rootClassName, title: e.title, subTitle: e["sub-title"], actions: e.actions, extras: e.extras }) }); }; Un.propTypes = { children: C.element.isRequired }; -const $n = { 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"] }, tn = ({ type: t, props: e }) => m("i", { ...e, children: m("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", fill: "currentColor", children: ($n[t] || $n.info).map((n, i) => m("path", { d: n }, i)) }) }), qn = ({ className: t, content: e, icon: n, $close: i }) => I(E.Fragment, { children: [n && m("div", { className: j("ff-notification-icon", t), children: m(tn, { type: n }) }), e] }), ar = ({}) => m(te, { children: "Confirm" }); +const xn = { 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"] }, nn = ({ type: t, props: e }) => h("i", { ...e, children: h("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", fill: "currentColor", children: (xn[t] || xn.info).map((n, i) => h("path", { d: n }, i)) }) }), qn = ({ className: t, content: e, icon: n, $close: i }) => I(E.Fragment, { children: [n && h("div", { className: j("ff-notification-icon", t), children: h(nn, { type: n }) }), e] }), or = ({}) => h(ne, { children: "Confirm" }); var Oe, Je; const me = class me { constructor() { - v(this, Je, /* @__PURE__ */ new Map()); + x(this, Je, /* @__PURE__ */ new Map()); T(this, "init", (e) => K(this, Je, new Map(e))); T(this, "check", (e) => !d(this, Je).has(e) || d(this, Je).get(e)); if (d(me, Oe)) return d(me, Oe); } }; -Oe = new WeakMap(), Je = new WeakMap(), v(me, Oe, null), T(me, "getInstance", () => (d(me, Oe) || K(me, Oe, new me()), d(me, Oe))); +Oe = new WeakMap(), Je = new WeakMap(), x(me, Oe, null), T(me, "getInstance", () => (d(me, Oe) || K(me, Oe, new me()), d(me, Oe))); let Ut = me; -const Kn = Ut.getInstance(), or = (t, e, n = "children") => { - if (f.isEmpty(t)) return {}; - const i = f.find(t, ["value", e]); - if (!f.isEmpty(i)) return i; +const Kn = Ut.getInstance(), ar = (t, e, n = "children") => { + if (y.isEmpty(t)) return {}; + const i = y.find(t, ["value", e]); + if (!y.isEmpty(i)) return i; const r = t.length; - for (let a = 0; a < r; a++) { - const { [n]: o } = t[a], s = or(o, e, n); - if (!f.isEmpty(s)) return s; + for (let o = 0; o < r; o++) { + const { [n]: a } = t[o], s = ar(a, e, n); + if (!y.isEmpty(s)) return s; } return {}; }, Hn = (t = "Input", e = "@pkg/ff/grid-layout-forms") => t != null && t.startsWith("@") || t != null && t.startsWith("blob:") ? t : `${e}/${t}`; var Re, rt; const fe = class fe { constructor() { - v(this, rt, null); + x(this, rt, null); T(this, "init", (e) => K(this, rt, e)); - T(this, "get", (e, n) => f.get(d(this, rt), e, n)); + T(this, "get", (e, n) => y.get(d(this, rt), e, n)); if (d(fe, Re)) return d(fe, Re); } }; -Re = new WeakMap(), rt = new WeakMap(), v(fe, Re, null), T(fe, "getInstance", () => (d(fe, Re) || K(fe, Re, new fe()), d(fe, Re))); +Re = new WeakMap(), rt = new WeakMap(), x(fe, Re, null), T(fe, "getInstance", () => (d(fe, Re) || K(fe, Re, new fe()), d(fe, Re))); let qt = fe; const qe = qt.getInstance(); -var Ge, xt, at, ot, $t; +var Ge, Pt, ot, at, $t; const Te = class Te { constructor(...e) { - v(this, at, []); - v(this, ot, (e) => { + x(this, ot, []); + x(this, at, (e) => { var n; - for (let i of e) Array.isArray(i[0]) ? d(this, ot).call(this, i) : d(this, at).push(d(n = Te, xt).call(n, i[0], i[1])); + for (let i of e) Array.isArray(i[0]) ? d(this, at).call(this, i) : d(this, ot).push(d(n = Te, Pt).call(n, i[0], i[1])); }); T(this, "toValue", async (e, n = null) => { const i = { getValue: () => e, getRecord: () => n }; let r = e; - for (const a of d(this, at)) try { - const o = await a; - if (typeof o != "function") { - console.warn("middleware is not a function, skip:", o); + for (const o of d(this, ot)) try { + const a = await o; + if (typeof a != "function") { + console.warn("middleware is not a function, skip:", a); continue; } - r = await o.call(i, r); - } catch (o) { - console.error("middleware error, skip:", o); + r = await a.call(i, r); + } catch (a) { + console.error("middleware error, skip:", a); } return r; }); T(this, "toRender", (e, n, i = null) => E.createElement(d(this, $t), { value: e, record: n }, i)); - v(this, $t, ({ value: e, record: n, children: i }) => { - const [r, a] = L(i), o = Di(); - return en(() => { - a(i), this.toValue(e, n).then((s) => o() && a(s)).catch((s) => o() && a(`${s}`)); + x(this, $t, ({ value: e, record: n, children: i }) => { + const [r, o] = L(i), a = Di(); + return Zt(() => { + o(i), this.toValue(e, n).then((s) => a() && o(s)).catch((s) => a() && o(`${s}`)); }, [e, n]), r; }); - d(this, ot).call(this, e); + d(this, at).call(this, e); } }; -Ge = new WeakMap(), xt = new WeakMap(), at = new WeakMap(), ot = new WeakMap(), $t = new WeakMap(), v(Te, Ge, null), v(Te, xt, f.memoize((e, n) => { +Ge = new WeakMap(), Pt = new WeakMap(), ot = new WeakMap(), at = new WeakMap(), $t = new WeakMap(), x(Te, Ge, null), x(Te, Pt, y.memoize((e, n) => { if (typeof e == "function") return e(n); if (typeof e == "string") return se.getWidgetComponent(e).then((i) => { var r; - return ((r = i.default) == null ? void 0 : r.call(i, n)) || ((a) => a); + return ((r = i.default) == null ? void 0 : r.call(i, n)) || ((o) => o); }); throw new TypeError("middleware must be a string or a function"); }, (...e) => { @@ -175,19 +175,19 @@ const le = E.createContext({ listCode: "", classNames: {}, getBase62params: (t, }, setCondition: () => { } }), vn = ({ className: t, record: e, column: n, ...i }) => { if (n != null && n.editableByJs && (n != null && n.uuid)) { - const { formSetting: r = { primaryKey: "id" }, widgetSetting: a = {}, widgetContainerSetting: o = {} } = (n == null ? void 0 : n.editableByJsSetting) || {}; - return m(R.Popover, { widget: _n, widgetData: { record: e, column: n }, widgetSetting: { widgetSetting: a, formSetting: r }, widgetContainerProps: { title: n != null && n.title ? `${n.title} - 编辑` : "编辑", width: 260, zIndex: 1050, arrow: !0, ...o }, children: m("td", { className: j("ff-data-list-cell-editable", t), ...i }) }); + const { formSetting: r = { primaryKey: "id" }, widgetSetting: o = {}, widgetContainerSetting: a = {} } = (n == null ? void 0 : n.editableByJsSetting) || {}; + return h(R.Popover, { widget: _n, widgetData: { record: e, column: n }, widgetSetting: { widgetSetting: o, formSetting: r }, widgetContainerProps: { title: n != null && n.title ? `${n.title} - 编辑` : "编辑", width: 260, zIndex: 1050, arrow: !0, ...a }, children: h("td", { className: j("ff-data-list-cell-editable", t), ...i }) }); } - return m("td", { className: t, ...i }); + return h("td", { className: t, ...i }); }, _n = ({ record: t, column: e, $close: n, $setting: i }) => { - const r = J(Fr(f.get(t, e == null ? void 0 : e.dataIndex))), { listCode: a, onClickCallback: o } = ge(le), [s] = oe.useForm(), { formSetting: l, widgetSetting: c } = i, { primaryKey: u = "id", help: p, validators: h } = l || {}, g = () => { - s.setFieldsValue({ value: f.get(t, e == null ? void 0 : e.dataIndex), __PROPS__: t }); + const r = J(Fr(y.get(t, e == null ? void 0 : e.dataIndex))), { listCode: o, onClickCallback: a } = ge(le), [s] = ae.useForm(), { formSetting: l, widgetSetting: c } = i, { primaryKey: u = "id", help: p, validators: m } = l || {}, g = () => { + s.setFieldsValue({ value: y.get(t, e == null ? void 0 : e.dataIndex), __PROPS__: t }); }; - return Rt(() => g(), [t, e == null ? void 0 : e.dataIndex, a]), m(te, { actions: I(E.Fragment, { children: [m(R, { size: "small", onClick: g, children: "重置" }), I(Bt.Compact, { block: !0, children: [m(R, { size: "small", widget: n, children: "取消" }), m(R, { type: "primary", size: "small", widget: () => s.validateFields().then(({ value: y }) => { - const w = f.get(t, u.substring(u.indexOf(".") + 1)); - if (!w) throw "获取更新主键失败!"; - W.put(`/api/${a}-storeBy-${e == null ? void 0 : e.uuid}/${w}`, { value: y }).msg(() => o(2, t)).then(n); - }).catch(console.warn), children: "保存" })] })] }), children: I(oe, { form: s, children: [m(an, { label: "", code: "value", type: r.current, widget: e == null ? void 0 : e.editableByJs, help: p, extras: c, validators: h }), m(Zt, { noStyle: !0, name: ["__PROPS__"], children: () => { + return Rt(() => g(), [t, e == null ? void 0 : e.dataIndex, o]), h(ne, { actions: I(E.Fragment, { children: [h(R, { size: "small", onClick: g, children: "重置" }), I(Bt.Compact, { block: !0, children: [h(R, { size: "small", widget: n, children: "取消" }), h(R, { type: "primary", size: "small", widget: () => s.validateFields().then(({ value: w }) => { + const f = y.get(t, u.substring(u.indexOf(".") + 1)); + if (!f) throw "获取更新主键失败!"; + W.put(`/api/${o}-storeBy-${e == null ? void 0 : e.uuid}/${f}`, { value: w }).msg(() => a(2, t)).then(n); + }).catch(console.warn), children: "保存" })] })] }), children: I(ae, { form: s, children: [h(an, { label: "", code: "value", type: r.current, widget: e == null ? void 0 : e.editableByJs, help: p, extras: c, validators: m }), h(tn, { noStyle: !0, name: ["__PROPS__"], children: () => { } })] }) }); }; _n.displayName = "DataListCellEditableContainer"; @@ -196,309 +196,309 @@ const sr = (t) => function(e) { }, lr = async ({ widgetByJs: t, widgetByJsSetting: e }) => { const n = await se.getWidgetComponent(t).then((i) => i.default || ((r) => r)); return function(i) { - return m(n, { value: i, $setting: e }); + return h(n, { value: i, $setting: e }); }; }, cr = (t, e = {}) => z(() => { var n; - return (n = t == null ? void 0 : t.filter(Boolean)) == null ? void 0 : n.map(({ widgetByJs: i, widgetByJsSetting: r, middlewares: a, ...o }, s) => { - const l = (c) => ({ record: c, column: o }); - return a || (a = []), i && a.push([lr, { widgetByJs: i, widgetByJsSetting: r }]), a.length > 0 ? (o != null && o.render && a.push([sr, o.render]), { ...o, onCell: l, render: (c, u) => new St(a).toRender(c, u, "-") }) : { ...o, onCell: l }; + return (n = t == null ? void 0 : t.filter(Boolean)) == null ? void 0 : n.map(({ widgetByJs: i, widgetByJsSetting: r, middlewares: o, ...a }, s) => { + const l = (c) => ({ record: c, column: a }); + return o || (o = []), i && o.push([lr, { widgetByJs: i, widgetByJsSetting: r }]), o.length > 0 ? (a != null && a.render && o.push([sr, a.render]), { ...a, onCell: l, render: (c, u) => new St(o).toRender(c, u, "-") }) : { ...a, onCell: l }; }); }, [t, e]), dr = (t = {}) => z(() => { var e; return t.body ?? (t.body = { cell: vn }), (e = t.body).cell ?? (e.cell = vn), t; -}, [t]), ja = (t) => { +}, [t]), Ao = (t) => { const [e, n] = L({}); return U(() => { let i = !1; - return t && W.get(`/api/_/${t}`).then((r) => f.pick(r, ["uuid", "name", "code", "resource", "marginX", "marginY", "cols", "rowHeight", "primaryKey", "columns", "itemOperations", "batchOperations", "isConditionFormLayout", "layout", "tabs", "pageSize", "layoutConfig", "selectionType"])).then((r) => !i && n(r)), () => i = !0; + return t && W.get(`/api/_/${t}`).then((r) => y.pick(r, ["uuid", "name", "code", "resource", "marginX", "marginY", "cols", "rowHeight", "primaryKey", "columns", "itemOperations", "batchOperations", "isConditionFormLayout", "layout", "tabs", "pageSize", "layoutConfig", "selectionType"])).then((r) => !i && n(r)), () => i = !0; }, [t]), e; -}, Aa = (t, e = {}) => { +}, Io = (t, e = {}) => { const [n, i] = L({ dataSource: [] }); return mt(() => { let r = !1; - return t && W.get(`/api/${t}/${W.encode({ page: 1, ...e })}`).then((a) => !r && i(a)), () => r = !0; + return t && W.get(`/api/${t}/${W.encode({ page: 1, ...e })}`).then((o) => !r && i(o)), () => r = !0; }, [t, e]), n; }, Jn = (t = [], e = /* @__PURE__ */ new Map(), n = "id", i) => { - const r = G(i ? (a) => f.get(a, n, f.get(a, [i, n])) : (a) => f.get(a, n), [n, i]); - return G((a) => t == null ? void 0 : t.filter((o) => !o.uuid || !e.has(o.uuid) || e.get(o.uuid).some((s) => s == r(a))), [t, e, r]); + const r = G(i ? (o) => y.get(o, n, y.get(o, [i, n])) : (o) => y.get(o, n), [n, i]); + return G((o) => t == null ? void 0 : t.filter((a) => !a.uuid || !e.has(a.uuid) || e.get(a.uuid).some((s) => s == r(o))), [t, e, r]); }, Kt = (t = [], e = /* @__PURE__ */ new Map(), n = [], i = "id", r) => { - const a = G(r ? (o) => f.get(o, i, f.get(o, [r, i])) : (o) => f.get(o, i), [i, r]); + const o = G(r ? (a) => y.get(a, i, y.get(a, [r, i])) : (a) => y.get(a, i), [i, r]); return z(() => { - if (f.isEmpty(t) || !t.some(({ uuid: s }) => Kn.check(s))) return !1; - if (f.isEmpty(e) || f.isEmpty(n)) return !0; - const o = n.map((s) => a(s)); - return t.some(({ uuid: s }) => !s || !e.has(s) || e.get(s).some((l) => o.some((c) => c == l))); - }, [t, n, e, a]); + if (y.isEmpty(t) || !t.some(({ uuid: s }) => Kn.check(s))) return !1; + if (y.isEmpty(e) || y.isEmpty(n)) return !0; + const a = n.map((s) => o(s)); + return t.some(({ uuid: s }) => !s || !e.has(s) || e.get(s).some((l) => a.some((c) => c == l))); + }, [t, n, e, o]); }, ur = (t, e, n = "id", i = null) => { - const r = Ot(), a = J(!1), o = J(t.dataSource), s = J(t.itemOperationsAccess); - return U(() => (o.current = t.dataSource, s.current = t.itemOperationsAccess, () => a.current = !1), [t.dataSource, t.itemOperationsAccess]), a.current && (t.dataSource = o.current, t.itemOperationsAccess = s.current), [t, (l = 0, c = null) => { + const r = Ot(), o = J(!1), a = J(t.dataSource), s = J(t.itemOperationsAccess); + return U(() => (a.current = t.dataSource, s.current = t.itemOperationsAccess, () => o.current = !1), [t.dataSource, t.itemOperationsAccess]), o.current && (t.dataSource = a.current, t.itemOperationsAccess = s.current), [t, (l = 0, c = null) => { var u, p; - if (a.current = !1, l === 1) return (u = t.onReload) == null ? void 0 : u.call(t); + if (o.current = !1, l === 1) return (u = t.onReload) == null ? void 0 : u.call(t); if (l === 2) { - const h = f.get(c, "__PARENT_ID__", ""), g = f.get(c, n, f.get(c, [i, n], "")), y = f.findIndex(o.current, ["__PARENT_ID__", h]), w = f.findIndex(y > -1 ? f.get(o.current, [y, "children"]) : o.current, [n, g]); - if (w === -1) return (p = t.onReload) == null ? void 0 : p.call(t); + const m = y.get(c, "__PARENT_ID__", ""), g = y.get(c, n, y.get(c, [i, n], "")), w = y.findIndex(a.current, ["__PARENT_ID__", m]), f = y.findIndex(w > -1 ? y.get(a.current, [w, "children"]) : a.current, [n, g]); + if (f === -1) return (p = t.onReload) == null ? void 0 : p.call(t); Promise.all([W.get(`/api/${e}/detail/${g}`), W.post(`/api/${e}/list-operations-access`, { ids: g })]).then(([S, b]) => { - const $ = f.get(o.current, y > -1 ? [y, "children", w, "children"] : [w, "children"]); - o.current = Wn(o.current, y > -1 ? { [y]: { children: { $splice: [[w, 1, { ...S, children: $ }]] } } } : { $splice: [[w, 1, { ...S, children: $ }]] }); + const P = y.get(a.current, w > -1 ? [w, "children", f, "children"] : [f, "children"]); + a.current = Wn(a.current, w > -1 ? { [w]: { children: { $splice: [[f, 1, { ...S, children: P }]] } } } : { $splice: [[f, 1, { ...S, children: P }]] }); const k = new Map(b); - s.current.forEach((x, F) => { + s.current.forEach(($, F) => { var A; - (A = k.get(F)) != null && A.some((O) => O == g) || s.current.set(F, x.filter((O) => O !== g)); - }), k.forEach((x, F) => { - s.current.has(F) ? s.current.set(F, f.uniq([...s.current.get(F) || [], ...x])) : s.current.set(F, x); + (A = k.get(F)) != null && A.some((O) => O == g) || s.current.set(F, $.filter((O) => O !== g)); + }), k.forEach(($, F) => { + s.current.has(F) ? s.current.set(F, y.uniq([...s.current.get(F) || [], ...$])) : s.current.set(F, $); }); }).then(() => { - a.current = !0, r(); + o.current = !0, r(); }); } }]; }, pr = (t, e) => { - const n = Ot(), i = J(e), r = J(/* @__PURE__ */ new Map()), a = J([]), o = f.throttle((l) => { - a.current = [], W.list(t, f.pick({ ...i.current, ...l }, ["tab", "page", "pageSize", "condition", "sider", "keyword"])).then(({ keyword: c, condition: u, total: p, tab: h, sider: g, page: y, pageSize: w, operationsAccess: S, dataSource: b }) => { - i.current = { tab: h, condition: u, sider: g, keyword: c, total: p, pageSize: w, page: b != null && b.length ? y : 1 }, a.current = b, r.current = new Map(S), n(); + const n = Ot(), i = J(e), r = J(/* @__PURE__ */ new Map()), o = J([]), a = y.throttle((l) => { + o.current = [], W.list(t, y.pick({ ...i.current, ...l }, ["tab", "page", "pageSize", "condition", "sider", "keyword"])).then(({ keyword: c, condition: u, total: p, tab: m, sider: g, page: w, pageSize: f, operationsAccess: S, dataSource: b }) => { + i.current = { tab: m, condition: u, sider: g, keyword: c, total: p, pageSize: f, page: b != null && b.length ? w : 1 }, o.current = b, r.current = new Map(S), n(); }); }, 380, { leading: !1, trailing: !0 }); Rt(() => { - a.current = [], t && o(e); + o.current = [], t && a(e); }, [t, e]); - const s = z(() => f.pick(i.current, ["total", "tab", "page", "pageSize", "condition", "sider", "keyword"]), [i.current]); - return Object.assign(s, { onTabChange: (l) => o({ tab: l, page: 1 }), onPageChange: (l, c) => o({ page: l, pageSize: c }), onPageSizeChange: (l) => o({ pageSize: l, page: 1 }), onConditionChange: (l, c) => o({ keyword: c, condition: Wn(i.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: e == null ? void 0 : e.payload }); -}, gr = ({ listCode: t, className: e, layouts: n = {}, dataSource: i, isPaginate: r, isItemOperations: a, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: c, resource: u, primaryKey: p, title: h, itemGridLayout: g, $setting: y, tabs: w, isConditionFormLayout: S, isTreeSider: b, treeSiderConfig: $, rowSelection: k }) => { - const { classNames: x, onClickCallback: F } = ge(le), A = f.pick(y, ["column", "colWidth", "beforeRender", "afterRender", "style", "itemMargin", "containerPadding"]), O = y == null ? void 0 : y.isMarkSelected, N = Jn(l, c, p, u), V = G((P, M, D) => m(hr, { isMarkSelected: O, className: j("ff-data-list-framework-item", x == null ? void 0 : x.item), operations: a ? N(M) : [], data: u ? { [u]: M } : M, children: P, onClickCallback: F }), [O, u, p, a, F, l, c]); - return I("div", { className: j("ff-data-list-framework", e), children: [m(n.sider, { isTreeSider: b, ...$ }), I("div", { className: j("ff-data-list-container", x == null ? void 0 : x.container), children: [m(n.filter, { isConditionFormLayout: S }), m(n.toolbar, { title: h, tabs: w }), m(Nr, { ...A, ...g, rowSelection: k, empty: m(n.empty, { className: x == null ? void 0 : x.empty }), primaryKey: p, itemRender: V, dataSource: i }), m(n.footer, { isPaginate: r, isOperations: o, operations: s })] })] }); -}, hr = ({ className: t, operations: e, children: n, data: i, onClickCallback: r, onSelect: a, isMarkSelected: o, isSelected: s, selectionType: l }) => I("div", { className: j("data-list-grid-layout-item", { "is-mark-selected": o, "is-selected": s, "is-selectable": !!l }, t), onClick: a, children: [m("div", { className: "data-list-grid-layout-item-container", children: n }), !!(e != null && e.length) && m("div", { className: "data-list-grid-layout-item-actions", children: e.map((c) => m("span", { className: "data-list-grid-layout-item-action", children: m(R.Link, { uuid: c.uuid, type: c.type, name: c.name, widget: c.widget, widgetType: c.widgetType, widgetProps: c.widgetProps, widgetSetting: c.widgetSetting, widgetContainerProps: c.widgetContainerSetting, data: i, confirm: c.confirm, onAfterClick: (u) => u !== !1 && (r == null ? void 0 : r(c.isRefresh, i)) }, c.uuid || Dt()) }, (c == null ? void 0 : c.uuid) || Dt())) })] }), mr = ({ listCode: t, className: e, layouts: n = {}, dataSource: i, columns: r, isItemOperations: a, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: c, resource: u, primaryKey: p, title: h, tabs: g, isPaginate: y, rowSelection: w, isTreeSider: S, treeSiderConfig: b, isConditionFormLayout: $, ...k }) => { - const { classNames: x, onClickCallback: F } = ge(le), A = Jn(l, c, p, u), O = Kt(l, c, i, p, u); - return I("div", { className: j("ff-data-table-framework", e), children: [m(n.sider, { isTreeSider: S, ...b }), I("div", { className: j("ff-data-table-container", x == null ? void 0 : x.container), children: [m(n.filter, { isConditionFormLayout: $ }), m(n.toolbar, { title: h, tabs: g }), m(Sr, { ...k, primaryKey: p, className: "ff-data-table-content", columns: r, dataSource: i, rowSelection: w, operationRender: O ? (N) => { + const s = z(() => y.pick(i.current, ["total", "tab", "page", "pageSize", "condition", "sider", "keyword"]), [i.current]); + return Object.assign(s, { onTabChange: (l) => a({ tab: l, page: 1 }), onPageChange: (l, c) => a({ page: l, pageSize: c }), onPageSizeChange: (l) => a({ pageSize: l, page: 1 }), onConditionChange: (l, c) => a({ keyword: c, condition: Wn(i.current.condition || {}, { $merge: l || {} }), page: 1 }), onSiderChange: (l) => a({ sider: l, page: 1 }), onKeywordChange: (l) => a({ keyword: l, page: 1 }), itemOperationsAccess: r.current, dataSource: o.current, onReload: a, payload: e == null ? void 0 : e.payload }); +}, gr = ({ listCode: t, className: e, layouts: n = {}, dataSource: i, isPaginate: r, isItemOperations: o, isBatchOperations: a, batchOperations: s, itemOperations: l, itemOperationsAccess: c, resource: u, primaryKey: p, title: m, itemGridLayout: g, $setting: w, tabs: f, isConditionFormLayout: S, isTreeSider: b, treeSiderConfig: P, rowSelection: k }) => { + const { classNames: $, onClickCallback: F } = ge(le), A = y.pick(w, ["column", "colWidth", "beforeRender", "afterRender", "style", "itemMargin", "containerPadding"]), O = w == null ? void 0 : w.isMarkSelected, N = Jn(l, c, p, u), V = G((v, M, D) => h(hr, { isMarkSelected: O, className: j("ff-data-list-framework-item", $ == null ? void 0 : $.item), operations: o ? N(M) : [], data: u ? { [u]: M } : M, children: v, onClickCallback: F }), [O, u, p, o, F, l, c]); + return I("div", { className: j("ff-data-list-framework", e), children: [h(n.sider, { isTreeSider: b, ...P }), I("div", { className: j("ff-data-list-container", $ == null ? void 0 : $.container), children: [h(n.filter, { isConditionFormLayout: S }), h(n.toolbar, { title: m, tabs: f }), h(Nr, { ...A, ...g, rowSelection: k, empty: h(n.empty, { className: $ == null ? void 0 : $.empty }), primaryKey: p, itemRender: V, dataSource: i }), h(n.footer, { isPaginate: r, isOperations: a, operations: s })] })] }); +}, hr = ({ className: t, operations: e, children: n, data: i, onClickCallback: r, onSelect: o, isMarkSelected: a, isSelected: s, selectionType: l }) => I("div", { className: j("data-list-grid-layout-item", { "is-mark-selected": a, "is-selected": s, "is-selectable": !!l }, t), onClick: o, children: [h("div", { className: "data-list-grid-layout-item-container", children: n }), !!(e != null && e.length) && h("div", { className: "data-list-grid-layout-item-actions", children: e.map((c) => h("span", { className: "data-list-grid-layout-item-action", children: h(R.Link, { uuid: c.uuid, type: c.type, name: c.name, widget: c.widget, widgetType: c.widgetType, widgetProps: c.widgetProps, widgetSetting: c.widgetSetting, widgetContainerProps: c.widgetContainerSetting, data: i, confirm: c.confirm, onAfterClick: (u) => u !== !1 && (r == null ? void 0 : r(c.isRefresh, i)) }, c.uuid || Dt()) }, (c == null ? void 0 : c.uuid) || Dt())) })] }), mr = ({ listCode: t, className: e, layouts: n = {}, dataSource: i, columns: r, isItemOperations: o, isBatchOperations: a, batchOperations: s, itemOperations: l, itemOperationsAccess: c, resource: u, primaryKey: p, title: m, tabs: g, isPaginate: w, rowSelection: f, isTreeSider: S, treeSiderConfig: b, isConditionFormLayout: P, ...k }) => { + const { classNames: $, onClickCallback: F } = ge(le), A = Jn(l, c, p, u), O = Kt(l, c, i, p, u); + return I("div", { className: j("ff-data-table-framework", e), children: [h(n.sider, { isTreeSider: S, ...b }), I("div", { className: j("ff-data-table-container", $ == null ? void 0 : $.container), children: [h(n.filter, { isConditionFormLayout: P }), h(n.toolbar, { title: m, tabs: g }), h(Sr, { ...k, primaryKey: p, className: "ff-data-table-content", columns: r, dataSource: i, rowSelection: f, operationRender: O ? (N) => { var V; - return m("div", { className: "ff-data-table-actions", children: (V = A(N)) == null ? void 0 : V.map((P, M) => m(R.Link, { size: "small", 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, data: N, confirm: P.confirm, onAfterClick: (D) => D !== !1 && (F == null ? void 0 : F(P.isRefresh, N)) }, P.uuid || M)) }); - } : null }), m(n.footer, { isPaginate: y, isOperations: o, operations: s })] })] }); -}, nn = (t = [], e, n = null) => { + return h("div", { className: "ff-data-table-actions", children: (V = A(N)) == null ? void 0 : V.map((v, M) => h(R.Link, { size: "small", uuid: v.uuid, type: v.type, name: v.name, widget: v.widget, widgetType: v.widgetType, widgetProps: v.widgetProps, widgetData: v.widgetData, widgetSetting: v.widgetSetting, widgetContainerProps: v.widgetContainerSetting, data: N, confirm: v.confirm, onAfterClick: (D) => D !== !1 && (F == null ? void 0 : F(v.isRefresh, N)) }, v.uuid || M)) }); + } : null }), h(n.footer, { isPaginate: w, isOperations: a, operations: s })] })] }); +}, rn = (t = [], e, n = null) => { var i; - return (i = f.sortBy(t, ["y", "x"])) == null ? void 0 : i.map(({ i: r, x: a, y: o, w: s, h: l, field: { boxStyle: c, ...u } = {} }, p) => m("div", { className: "grid-layout-item", style: Gn(a, o, s, l, c), children: m(e, { ...u, basicForm: n }) }, r ?? p)); -}, Gn = (t, e, n, i, r = {}, a = 0) => { - const o = { "--grid-layout-h": `${i}`, "--grid-layout-w": `${n}`, "--grid-layout-x": `${t}`, "--grid-layout-y": `${e}`, "--grid-layout-row-height-offset": "0px" }; - return r != null && r.autoHeight ? o.height = "fit-content" : o["--grid-layout-row"] = `${i}`, 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"] = Pn(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"] = Pn(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; -}, Pn = (t, e, n, i) => `${t || 0}px ${e || 0}px ${n || 0}px ${i || 0}px`, Ia = (t = "Text", e = "@pkg/ff/grid-layouts") => t != null && t.startsWith("@") || t != null && t.startsWith("blob:") ? t : `${e}/${t}`, Yn = (t) => Object.keys(t).reduce((e, n) => (/^on[A-Z]/.test(n) && (e[n] = t[n]), e), {}), Xn = ({ className: t, isConditionFormLayout: e }) => { - var h, g; - const [n, i] = L({}), { listCode: r, onKeywordChange: a, onConditionChange: o, getBase62params: s, classNames: l } = E.useContext(le), { keyword: c, condition: u } = (s == null ? void 0 : s()) || {}, [p] = bt.useForm(); + return (i = y.sortBy(t, ["y", "x"])) == null ? void 0 : i.map(({ i: r, x: o, y: a, w: s, h: l, field: { boxStyle: c, ...u } = {} }, p) => h("div", { className: "grid-layout-item", style: Gn(o, a, s, l, c), children: h(e, { ...u, basicForm: n }) }, r ?? p)); +}, Gn = (t, e, n, i, r = {}, o = 0) => { + const a = { "--grid-layout-h": `${i}`, "--grid-layout-w": `${n}`, "--grid-layout-x": `${t}`, "--grid-layout-y": `${e}`, "--grid-layout-row-height-offset": "0px" }; + return r != null && r.autoHeight ? a.height = "fit-content" : a["--grid-layout-row"] = `${i}`, r != null && r.alignItems && (a["--grid-layout-box-align-items"] = r.alignItems), r != null && r.justifyContent && (a["--grid-layout-box-justify-content"] = r.justifyContent), a["--grid-layout-box-margin"] = Nn(r == null ? void 0 : r.marginTop, r == null ? void 0 : r.marginRight, r == null ? void 0 : r.marginBottom, r == null ? void 0 : r.marginLeft), a["--grid-layout-box-padding"] = Nn(r == null ? void 0 : r.paddingTop, r == null ? void 0 : r.paddingRight, r == null ? void 0 : r.paddingBottom, r == null ? void 0 : r.paddingLeft), o && (a.height = `${o}px`), a; +}, Nn = (t, e, n, i) => `${t || 0}px ${e || 0}px ${n || 0}px ${i || 0}px`, Lo = (t = "Text", e = "@pkg/ff/grid-layouts") => t != null && t.startsWith("@") || t != null && t.startsWith("blob:") ? t : `${e}/${t}`, Yn = (t) => Object.keys(t).reduce((e, n) => (/^on[A-Z]/.test(n) && (e[n] = t[n]), e), {}), Xn = ({ className: t, isConditionFormLayout: e }) => { + var m, g; + const [n, i] = L({}), { listCode: r, onKeywordChange: o, onConditionChange: a, getBase62params: s, classNames: l } = E.useContext(le), { keyword: c, condition: u } = (s == null ? void 0 : s()) || {}, [p] = bt.useForm(); return U(() => { - r && e && W.get(`/api/_/${r}/list-condition-form-layout`).then(({ resource: y, marginX: w, marginY: S, rowHeight: b, cols: $, fields: k }) => { - i({ resource: y, itemMargin: [w, S], rowHeight: b, cols: $, fields: k }); + r && e && W.get(`/api/_/${r}/list-condition-form-layout`).then(({ resource: w, marginX: f, marginY: S, rowHeight: b, cols: P, fields: k }) => { + i({ resource: w, itemMargin: [f, S], rowHeight: b, cols: P, fields: k }); }).catch(() => i({})); }, [r, e]), U(() => { p.setFieldsValue({ keyword: c, ...u }); - }, [JSON.stringify([c, u])]), m("div", { className: j("ff-data-list-filter", l.filter, t), children: m(bt, { form: p, layout: "vertical", autoComplete: "off", onFinish: ((h = n.fields) == null ? void 0 : h.length) > 1 ? (y) => o({ [n.resource]: y[n.resource] }, y.keyword) : () => { - }, onValuesChange: (y) => { - f.isEmpty(f.omit(y, ["keyword"])) || p.submit(); - }, children: ((g = n.fields) == null ? void 0 : g.length) > 1 ? m(on, { ...n, children: m(fr, { onReset: () => { - const { keyword: y, condition: w } = s("init") || {}; - p.setFieldsValue({ keyword: y, ...w }); - } }) }) : m("div", { className: "ff-data-list-filter-default-form ff-grid-layout-form", children: m("div", { className: "grid-layout-item", style: Gn(20, 0, 5, 2), children: m(bt.Item, { name: ["keyword"], children: m(Ui.Search, { allowClear: !0, enterButton: "搜索", placeholder: "多关键字 | 分割", onSearch: (y) => a(y) }) }) }) }) }) }); + }, [JSON.stringify([c, u])]), h("div", { className: j("ff-data-list-filter", l.filter, t), children: h(bt, { form: p, layout: "vertical", autoComplete: "off", onFinish: ((m = n.fields) == null ? void 0 : m.length) > 1 ? (w) => a({ [n.resource]: w[n.resource] }, w.keyword) : () => { + }, onValuesChange: (w) => { + y.isEmpty(y.omit(w, ["keyword"])) || p.submit(); + }, children: ((g = n.fields) == null ? void 0 : g.length) > 1 ? h(sn, { ...n, children: h(fr, { onReset: () => { + const { keyword: w, condition: f } = s("init") || {}; + p.setFieldsValue({ keyword: w, ...f }); + } }) }) : h("div", { className: "ff-data-list-filter-default-form ff-grid-layout-form", children: h("div", { className: "grid-layout-item", style: Gn(20, 0, 5, 2), children: h(bt.Item, { name: ["keyword"], children: h(Ui.Search, { allowClear: !0, enterButton: "搜索", placeholder: "多关键字 | 分割", onSearch: (w) => o(w) }) }) }) }) }) }); }, fr = ({ cols: t, fields: e, onReset: n }) => { - const [i, r] = L(!1), a = z(() => e == null ? void 0 : e.toReversed().some((o) => o.y > 1 || o.x + o.w >= t - 5), [t, e]); - return I(bt.Item, { label: " ", style: { "--item-span": 5 }, className: j("ff-data-list-filter-actions", { expanded: i }), children: [m(kt, { onClick: n, children: "重置" }), m(kt, { type: "primary", htmlType: "submit", children: "查询" }), a && m(R.Link, { className: "ff-data-list-filter-expanded-button", widget: () => r((o) => !o), type: "primary", name: i ? "关闭" : "展开", icon: i ? "icon-up" : "icon-down", iconPosition: "end" })] }); + const [i, r] = L(!1), o = z(() => e == null ? void 0 : e.toReversed().some((a) => a.y > 1 || a.x + a.w >= t - 5), [t, e]); + return I(bt.Item, { label: " ", style: { "--item-span": 5 }, className: j("ff-data-list-filter-actions", { expanded: i }), children: [h(kt, { onClick: n, children: "重置" }), h(kt, { type: "primary", htmlType: "submit", children: "查询" }), o && h(R.Link, { className: "ff-data-list-filter-expanded-button", widget: () => r((a) => !a), type: "primary", name: i ? "关闭" : "展开", icon: i ? "icon-up" : "icon-down", iconPosition: "end" })] }); }; Xn.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 yr = ({ className: t, operations: e, isOperations: n, isPaginate: i }) => { - const { onPageChange: r, onPageSizeChange: a, onClickCallback: o, getBase62params: s } = E.useContext(le), { total: l, page: c, pageSize: u } = (s == null ? void 0 : s()) || {}; - return n && !f.isEmpty(e) || i ? I("div", { className: j("ff-data-list-footer", t), children: [m("div", { className: "ff-data-list-actions", children: e == null ? void 0 : e.map((p, h) => m(R, { 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: (g) => g !== !1 && (o == null ? void 0 : o(p.isRefresh, null)) }, p.uuid || h)) }), i && m(qi, { size: "small", total: l, pageSize: u, showSizeChanger: !1, showTotal: (p) => `第 ${c} 页 / 总共 ${p} 条`, onChange: r, onShowSizeChange: a })] }) : null; -}, wr = [{ 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: m("span", { style: { color: "#1677ff" }, children: "sss" }), key: "0-0-1-0" }] }] }], br = ({ className: t, width: e = 280, isTreeSider: n }) => { + const { onPageChange: r, onPageSizeChange: o, onClickCallback: a, getBase62params: s } = E.useContext(le), { total: l, page: c, pageSize: u } = (s == null ? void 0 : s()) || {}; + return n && !y.isEmpty(e) || i ? I("div", { className: j("ff-data-list-footer", t), children: [h("div", { className: "ff-data-list-actions", children: e == null ? void 0 : e.map((p, m) => h(R, { 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: (g) => g !== !1 && (a == null ? void 0 : a(p.isRefresh, null)) }, p.uuid || m)) }), i && h(qi, { size: "small", total: l, pageSize: u, showSizeChanger: !1, showTotal: (p) => `第 ${c} 页 / 总共 ${p} 条`, onChange: r, onShowSizeChange: o })] }) : null; +}, wr = [{ 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: h("span", { style: { color: "#1677ff" }, children: "sss" }), key: "0-0-1-0" }] }] }], br = ({ className: t, width: e = 280, isTreeSider: n }) => { const { classNames: i } = ge(le); - return n ? m(Ki.DirectoryTree, { className: j("ff-data-list-sider", i.sider, t), style: { "--sider-width": e }, showLine: !0, showIcon: !1, treeData: wr }) : null; + return n ? h(Ki.DirectoryTree, { className: j("ff-data-list-sider", i.sider, t), style: { "--sider-width": e }, showLine: !0, showIcon: !1, treeData: wr }) : null; }, Cr = ({ className: t, title: e, tabs: n }) => { - const { getBase62params: i, onTabChange: r, onReload: a, classNames: o } = ge(le), { tab: s } = (i == null ? void 0 : i()) || {}, [l, c] = Xi((n == null ? void 0 : n[0].value) ?? (n == null ? void 0 : n[0].code), { value: s, onChange: r }); - return I("div", { className: j("ff-data-list-toolbar", o.toolbar, t), children: [m("div", { className: "ff-data-list-title", children: e }), m(Hi, { className: "ff-data-list-tabs", itemRender: ({ label: u, code: p, value: h }) => m("span", { onClick: () => c(h ?? p), className: j("ff-data-list-tab", { active: (h ?? p) == l }), children: u }), items: n }), I("div", { className: "ff-data-list-actions", children: [m(R.Link, { icon: "icon-reload", widget: () => a() }), m(R.Link, { icon: "icon-setting" })] })] }); -}, kr = ({ className: t, ...e }) => m(zt, { className: j(t, "ff-data-list-empty"), image: zt.PRESENTED_IMAGE_SIMPLE, ...e }), Qn = ({ isItemGridLayout: t, theme: e, themeProps: n, onClickCallback: i, onReload: r, listCode: a, total: o = 0, page: s = 0, onPageChange: l, pageSize: c = 30, onPageSizeChange: u, tab: p, onTabChange: h, keyword: g, onKeywordChange: y, condition: w, onConditionChange: S, sider: b, onSiderChange: $, layouts: k, classNames: x = {}, payload: F = {}, dataSource: A = [], rowSelection: O, getSelectedRows: N, primaryKey: V, ...P }) => { - const [M, D] = L(), B = N ?? (() => A), X = G((q, ce) => { - const H = { tab: p, page: s, pageSize: c, keyword: g, sider: b, condition: w, total: o, payload: F }; - return q && q != "init" ? f.get(H, q, ce) : H; - }, [JSON.stringify(w), JSON.stringify(F), p, s, c, g, b, o]), xe = z(() => { + const { getBase62params: i, onTabChange: r, onReload: o, classNames: a } = ge(le), { tab: s } = (i == null ? void 0 : i()) || {}, [l, c] = Xi((n == null ? void 0 : n[0].value) ?? (n == null ? void 0 : n[0].code), { value: s, onChange: r }); + return I("div", { className: j("ff-data-list-toolbar", a.toolbar, t), children: [h("div", { className: "ff-data-list-title", children: e }), h(Hi, { className: "ff-data-list-tabs", itemRender: ({ label: u, code: p, value: m }) => h("span", { onClick: () => c(m ?? p), className: j("ff-data-list-tab", { active: (m ?? p) == l }), children: u }), items: n }), I("div", { className: "ff-data-list-actions", children: [h(R.Link, { icon: "icon-reload", widget: () => o() }), h(R.Link, { icon: "icon-setting" })] })] }); +}, kr = ({ className: t, ...e }) => h(zt, { className: j(t, "ff-data-list-empty"), image: zt.PRESENTED_IMAGE_SIMPLE, ...e }), Qn = ({ isItemGridLayout: t, theme: e, themeProps: n, onClickCallback: i, onReload: r, listCode: o, total: a = 0, page: s = 0, onPageChange: l, pageSize: c = 30, onPageSizeChange: u, tab: p, onTabChange: m, keyword: g, onKeywordChange: w, condition: f, onConditionChange: S, sider: b, onSiderChange: P, layouts: k, classNames: $ = {}, payload: F = {}, dataSource: A = [], rowSelection: O, getSelectedRows: N, primaryKey: V, ...v }) => { + const [M, D] = L(), B = N ?? (() => A), Q = G((q, ce) => { + const H = { tab: p, page: s, pageSize: c, keyword: g, sider: b, condition: f, total: a, payload: F }; + return q && q != "init" ? y.get(H, q, ce) : H; + }, [JSON.stringify(f), JSON.stringify(F), p, s, c, g, b, a]), Pe = z(() => { let q = { sider: br, filter: Xn, footer: yr, toolbar: Cr, empty: kr }; - k === !1 ? q = { sider: null, filter: null, footer: null, toolbar: null, empty: null } : f.isPlainObject(k) && (q = Object.assign({}, q, k)); + k === !1 ? q = { sider: null, filter: null, footer: null, toolbar: null, empty: null } : y.isPlainObject(k) && (q = Object.assign({}, q, k)); for (const ce in q) if (q[ce]) { if (Li(q[ce])) { const H = q[ce]; q[ce] = (yt) => E.cloneElement(H, yt); } - } else q[ce] = () => m(E.Fragment, {}); + } else q[ce] = () => h(E.Fragment, {}); return q; }, [k]); return U(() => { e ? se.getWidgetComponent(e).then((q) => { if (!q) throw `${e} not found`; return q; - }).catch((q) => ({ default: () => `${q}` })).then((q) => D(E.createElement(q.default, { ...P, layouts: xe, $setting: n }))) : D(m(t ? gr : mr, { ...P, layouts: xe, $setting: n })); - }, [e, n]), m(le.Provider, { value: { classNames: x, listCode: a, onClickCallback: i, onReload: r, getBase62params: X, onPageChange: l, onPageSizeChange: u, onTabChange: h, onSiderChange: $, onKeywordChange: y, onConditionChange: S, setPage: l, setPageSize: u, setTab: h, setSider: $, setKeyword: y, setCondition: S, getSelectedRows: B }, children: M && E.cloneElement(M, { dataSource: A, primaryKey: V, rowSelection: O, ...P }) }); + }).catch((q) => ({ default: () => `${q}` })).then((q) => D(E.createElement(q.default, { ...v, layouts: Pe, $setting: n }))) : D(h(t ? gr : mr, { ...v, layouts: Pe, $setting: n })); + }, [e, n]), h(le.Provider, { value: { classNames: $, listCode: o, onClickCallback: i, onReload: r, getBase62params: Q, onPageChange: l, onPageSizeChange: u, onTabChange: m, onSiderChange: P, onKeywordChange: w, onConditionChange: S, setPage: l, setPageSize: u, setTab: m, setSider: P, setKeyword: w, setCondition: S, getSelectedRows: B }, children: M && E.cloneElement(M, { dataSource: A, primaryKey: V, rowSelection: O, ...v }) }); }; Qn.propTypes = { classNames: C.exact({ sider: C.string, filter: C.string, footer: C.string, toolbar: C.string, container: C.string, content: C.string, item: C.string, empty: C.string }), layouts: C.oneOfType([C.exact({ sider: C.oneOfType([C.elementType, C.element]), filter: C.oneOfType([C.elementType, C.element]), footer: C.oneOfType([C.elementType, C.element]), toolbar: C.oneOfType([C.elementType, C.element]), empty: C.oneOfType([C.elementType, C.element]) }), C.bool]) }; -var Fe, ve, ze, vt; +var Fe, xe, ze, xt; const ye = class ye { constructor() { - v(this, ve, null); - v(this, ze, /* @__PURE__ */ new Map()); - v(this, vt, () => { - if (d(this, ve)) return d(this, ve).port.postMessage({ command: "status", data: [] }); - K(this, ve, new SharedWorker(new URL("/ff-worker/res-ws.js", self.location))), d(this, ve).port.onmessage = (e) => { + x(this, xe, null); + x(this, ze, /* @__PURE__ */ new Map()); + x(this, xt, () => { + if (d(this, xe)) return d(this, xe).port.postMessage({ command: "status", data: [] }); + K(this, xe, new SharedWorker(new URL("/ff-worker/res-ws.js", self.location))), d(this, xe).port.onmessage = (e) => { var n, i; - (n = e.data) != null && n.uuid ? d(this, ze).forEach((r, a) => { - var o; - (r == "*" || (o = r == null ? void 0 : r.includes) != null && o.call(r, e.data.uuid)) && a(e.data); - }) : ((i = e.data) == null ? void 0 : i.readyState) == WebSocket.CLOSED && W.get("/api/user-api-token").then(({ token: r, expire_at: a }) => { - d(this, ve).port.postMessage({ command: "initWs", data: [`ws${f.trimStart(W.appUrl, "http")}api/user-resource-status-ws?token=${r}`] }); + (n = e.data) != null && n.uuid ? d(this, ze).forEach((r, o) => { + var a; + (r == "*" || (a = r == null ? void 0 : r.includes) != null && a.call(r, e.data.uuid)) && o(e.data); + }) : ((i = e.data) == null ? void 0 : i.readyState) == WebSocket.CLOSED && W.get("/api/user-api-token").then(({ token: r, expire_at: o }) => { + d(this, xe).port.postMessage({ command: "initWs", data: [`ws${y.trimStart(W.appUrl, "http")}api/user-resource-status-ws?token=${r}`] }); }); - }, d(this, ve).port.postMessage({ command: "status", data: [] }); + }, d(this, xe).port.postMessage({ command: "status", data: [] }); }); - T(this, "subscribe", (e, n = []) => (n ? Array.isArray(n) && n.length == 0 ? n = "*" : Array.isArray(n) || (n = [n].flat()) : n = "*", d(this, ze).set(e, n), d(this, ze).size == 1 && d(this, vt).call(this), () => this.unsubscribe(e))); + T(this, "subscribe", (e, n = []) => (n ? Array.isArray(n) && n.length == 0 ? n = "*" : Array.isArray(n) || (n = [n].flat()) : n = "*", d(this, ze).set(e, n), d(this, ze).size == 1 && d(this, xt).call(this), () => this.unsubscribe(e))); T(this, "unsubscribe", (e) => d(this, ze).delete(e)); if (d(ye, Fe)) return d(ye, Fe); } }; -Fe = new WeakMap(), ve = new WeakMap(), ze = new WeakMap(), vt = new WeakMap(), v(ye, Fe, null), T(ye, "getInstance", () => (d(ye, Fe) || K(ye, Fe, new ye()), d(ye, Fe))); +Fe = new WeakMap(), xe = new WeakMap(), ze = new WeakMap(), xt = new WeakMap(), x(ye, Fe, null), T(ye, "getInstance", () => (d(ye, Fe) || K(ye, Fe, new ye()), d(ye, Fe))); let Ht = ye; -const Zn = Ht.getInstance(), rn = E.forwardRef(({ listCode: t, base62params: e, className: n, theme: i, themeProps: r, layouts: a, classNames: o, rowSelection: s = null, onDataSourceChange: l }, c) => { - const [{ resource: u, primaryKey: p, batchOperations: h = [], itemOperations: g = [], columns: y = [], isConditionFormLayout: w = !1, isTreeSider: S, treeSiderConfig: b, theme: $, themeConfig: k, isItemGridLayout: x, itemGridLayout: { themeConfig: F, ...A } = {}, title: O, isPaginate: N, tabs: V, selectionType: P }, M] = L({ isItemGridLayout: !1, itemGridLayout: {} }), { type: D = P, selectedRowKeys: B, defaultSelectedRowKeys: X, onChange: xe, ...q } = s ?? {}, ce = pr(t, e), [{ dataSource: H, itemOperationsAccess: yt, condition: hi, tab: mi, keyword: fi, page: dn, total: un, pageSize: pn, sider: yi, onConditionChange: wi, onTabChange: bi, onKeywordChange: Ci, onPageChange: ki, onPageSizeChange: Si, onSiderChange: Ei, onReload: jt, payload: xi }, gn] = ur(ce, t, p, u), $i = Sn(l); - Vn(() => { - $i(H, { primaryKey: p, page: dn, pageSize: pn, total: un }); +const Zn = Ht.getInstance(), on = E.forwardRef(({ listCode: t, base62params: e, className: n, theme: i, themeProps: r, layouts: o, classNames: a, rowSelection: s = null, onDataSourceChange: l }, c) => { + const [{ resource: u, primaryKey: p, batchOperations: m = [], itemOperations: g = [], columns: w = [], isConditionFormLayout: f = !1, isTreeSider: S, treeSiderConfig: b, theme: P, themeConfig: k, isItemGridLayout: $, itemGridLayout: { themeConfig: F, ...A } = {}, title: O, isPaginate: N, tabs: V, selectionType: v }, M] = L({ isItemGridLayout: !1, itemGridLayout: {} }), { type: D = v, selectedRowKeys: B, defaultSelectedRowKeys: Q, onChange: Pe, ...q } = s ?? {}, ce = pr(t, e), [{ dataSource: H, itemOperationsAccess: yt, condition: hi, tab: mi, keyword: fi, page: un, total: pn, pageSize: gn, sider: yi, onConditionChange: wi, onTabChange: bi, onKeywordChange: Ci, onPageChange: ki, onPageSizeChange: Si, onSiderChange: Ei, onReload: jt, payload: Pi }, hn] = ur(ce, t, p, u), $i = En(l); + en(() => { + $i(H, { primaryKey: p, page: un, pageSize: gn, total: pn }); }, [H]); - const [hn, vi] = zi([], { defaultValue: X ?? [], value: B }), [mn, Pi] = L([]), fn = G(() => D ? mn : H, [D, mn, H]), Ni = Kt(g, yt, H, p), Ti = Kt(h); + const [mn, xi] = zi([], { defaultValue: Q ?? [], value: B }), [fn, vi] = L([]), yn = G(() => D ? fn : H, [D, fn, H]), Ni = Kt(g, yt, H, p), Ti = Kt(m); U(() => { - let Q = null; + let Z = null; return t && W.get(`/api/_/${t}`).resp(({ data: Ve, res: At }) => { - Ve != null && Ve.isDynamicRefresh && (Q = Zn.subscribe(() => jt(), At)), M(Ve); - }).catch(() => M({})), () => Q == null ? void 0 : Q(); - }, [t]), E.useImperativeHandle(c, () => ({ onReload: jt, onClickCallback: gn, getSelectedRows: fn })); - const yn = Sn((Q, Ve) => { - Pi((At) => { - const wn = new Map(At.map((de) => [de == null ? void 0 : de[p], de])); - return Ve.forEach((de) => wn.set(de == null ? void 0 : de[p], de)), Q.map((de) => wn.get(de)).filter(Boolean); - }), vi(Q), xe == null || xe(Q, Ve); - }), Oi = z(() => D ? { columnWidth: 80, ...q, type: D, selectedRowKeys: hn, onChange: yn } : void 0, [D, hn, yn, s]), Ri = z(() => f.merge({}, k, r), [k, r]), Fi = z(() => g == null ? void 0 : g.map((Q) => f.isEmpty(Q == null ? void 0 : Q.confirm) ? Q : { ...Q, confirm: Object.assign({}, Q.confirm, { getPopupContainer: () => document.body }) }), [g]), ji = z(() => ({ ...A, themeProps: F }), [A, F]); - return m(Qn, { listCode: t, title: O, classNames: o, layouts: a, resource: u, primaryKey: p, theme: i || $, themeProps: Ri, isTreeSider: S, treeSiderConfig: b, isPaginate: N, rowSelection: Oi, getSelectedRows: fn, tabs: V, isItemOperations: Ni, itemOperations: Fi, isBatchOperations: Ti, batchOperations: h, isItemGridLayout: x, columns: y, itemGridLayout: ji, isConditionFormLayout: w, itemOperationsAccess: yt, dataSource: H, onConditionChange: wi, onTabChange: bi, onKeywordChange: Ci, onPageChange: ki, onPageSizeChange: Si, onSiderChange: Ei, condition: hi, tab: mi, keyword: fi, page: dn, total: un, pageSize: pn, sider: yi, payload: xi, className: j("ff-data-list-helper", n), onReload: jt, onClickCallback: gn }); -}), ei = (t, e, n = !0) => n !== !0 && n-- <= 0 ? [] : f.isArray(t) && !f.isEmpty(t) ? t.reduce((i, r) => (Reflect.has(r, e) && Reflect.has(r, "children") && i.push(r[e]), Reflect.has(r, "children") && !f.isEmpty(r.children) ? i.concat(ei(r.children, e, n)) : i), []) : [], Sr = ({ className: t, primaryKey: e, columns: n = [], dataSource: i = [], operationRender: r, operationWidth: a = 180, components: o = {}, rowSelection: s, ...l }) => { - const { classNames: c } = ge(le), u = J(null), p = J(null), [h, g] = L([]), [y, w] = L({ width: 0, height: 0 }); + Ve != null && Ve.isDynamicRefresh && (Z = Zn.subscribe(() => jt(), At)), M(Ve); + }).catch(() => M({})), () => Z == null ? void 0 : Z(); + }, [t]), E.useImperativeHandle(c, () => ({ onReload: jt, onClickCallback: hn, getSelectedRows: yn })); + const wn = En((Z, Ve) => { + vi((At) => { + const bn = new Map(At.map((de) => [de == null ? void 0 : de[p], de])); + return Ve.forEach((de) => bn.set(de == null ? void 0 : de[p], de)), Z.map((de) => bn.get(de)).filter(Boolean); + }), xi(Z), Pe == null || Pe(Z, Ve); + }), Oi = z(() => D ? { columnWidth: 80, ...q, type: D, selectedRowKeys: mn, onChange: wn } : void 0, [D, mn, wn, s]), Ri = z(() => y.merge({}, k, r), [k, r]), Fi = z(() => g == null ? void 0 : g.map((Z) => y.isEmpty(Z == null ? void 0 : Z.confirm) ? Z : { ...Z, confirm: Object.assign({}, Z.confirm, { getPopupContainer: () => document.body }) }), [g]), ji = z(() => ({ ...A, themeProps: F }), [A, F]); + return h(Qn, { listCode: t, title: O, classNames: a, layouts: o, resource: u, primaryKey: p, theme: i || P, themeProps: Ri, isTreeSider: S, treeSiderConfig: b, isPaginate: N, rowSelection: Oi, getSelectedRows: yn, tabs: V, isItemOperations: Ni, itemOperations: Fi, isBatchOperations: Ti, batchOperations: m, isItemGridLayout: $, columns: w, itemGridLayout: ji, isConditionFormLayout: f, itemOperationsAccess: yt, dataSource: H, onConditionChange: wi, onTabChange: bi, onKeywordChange: Ci, onPageChange: ki, onPageSizeChange: Si, onSiderChange: Ei, condition: hi, tab: mi, keyword: fi, page: un, total: pn, pageSize: gn, sider: yi, payload: Pi, className: j("ff-data-list-helper", n), onReload: jt, onClickCallback: hn }); +}), ei = (t, e, n = !0) => n !== !0 && n-- <= 0 ? [] : y.isArray(t) && !y.isEmpty(t) ? t.reduce((i, r) => (Reflect.has(r, e) && Reflect.has(r, "children") && i.push(r[e]), Reflect.has(r, "children") && !y.isEmpty(r.children) ? i.concat(ei(r.children, e, n)) : i), []) : [], Sr = ({ className: t, primaryKey: e, columns: n = [], dataSource: i = [], operationRender: r, operationWidth: o = 180, components: a = {}, rowSelection: s, ...l }) => { + const { classNames: c } = ge(le), u = J(null), p = J(null), [m, g] = L([]), [w, f] = L({ width: 0, height: 0 }); U(() => { g(ei(i, e)); }, [i, e]), Mi(() => { const k = new ResizeObserver(() => { - var x; - w({ width: ((x = u.current) == null ? void 0 : x.nativeElement.querySelector(".ant-table-body").scrollWidth) || p.current.offsetWidth, height: p.current.offsetHeight }); + var $; + f({ width: (($ = u.current) == null ? void 0 : $.nativeElement.querySelector(".ant-table-body").scrollWidth) || p.current.offsetWidth, height: p.current.offsetHeight }); }); return p.current && k.observe(p.current), () => { p.current && k.unobserve(p.current); }; }, []); const S = z(() => { - if (!(y != null && y.width) || !(n != null && n.length)) return n; - const k = (s ? s.columnWidth ?? 32 : 0) + (r ? a : 0), x = n.reduce((O, N) => O + (N != null && N.isWidthFixed && N.width ? N.width : 0), 0), F = n.filter((O) => !(O != null && O.isWidthFixed)).reduce((O, N) => O + ((N == null ? void 0 : N.width) ?? 100), 0); - if (x + F + k >= y.width) return n; - const A = y.width - x - k; + if (!(w != null && w.width) || !(n != null && n.length)) return n; + const k = (s ? s.columnWidth ?? 32 : 0) + (r ? o : 0), $ = n.reduce((O, N) => O + (N != null && N.isWidthFixed && N.width ? N.width : 0), 0), F = n.filter((O) => !(O != null && O.isWidthFixed)).reduce((O, N) => O + ((N == null ? void 0 : N.width) ?? 100), 0); + if ($ + F + k >= w.width) return n; + const A = w.width - $ - k; return n.map((O) => O != null && O.isWidthFixed ? O : { ...O, width: Math.floor(A * ((O == null ? void 0 : O.width) ?? 100) / F) }); - }, [n, y.width, s, r, a]), b = cr(S), $ = dr(o); - return m("div", { ref: p, className: j("ff-data-list-table", c.content, t), children: y.height ? m(En, { bordered: !0, ...l, components: $, ref: u, rowKey: (k) => (k == null ? void 0 : k[e]) ?? Math.random(), rowSelection: s, columns: (() => { - var x, F; + }, [n, w.width, s, r, o]), b = cr(S), P = dr(a); + return h("div", { ref: p, className: j("ff-data-list-table", c.content, t), children: w.height ? h(Pn, { bordered: !0, ...l, components: P, ref: u, rowKey: (k) => (k == null ? void 0 : k[e]) ?? Math.random(), rowSelection: s, columns: (() => { + var $, F; const k = [...b ?? []]; - return s && k.splice((F = (x = k[0]) == null ? void 0 : x.key) != null && F.startsWith("__") ? 1 : 0, 0, En.SELECTION_COLUMN), r && k.push({ title: "操作", align: "center", fixed: "right", width: `${Math.ceil(a / y.width * 100).toFixed(2)}%`, render: (A, O, N) => r(O, N) }), k; - })(), dataSource: i, size: "middle", scroll: { x: "max-content", y: y.height - 50 }, pagination: !1, expandable: { defaultExpandAllRows: !0, expandRowByClick: !0, onExpandedRowsChange: g, expandedRowKeys: h } }) : null }); -}, Er = "RC_FORM_INTERNAL_HOOKS", xr = (t) => { + return s && k.splice((F = ($ = k[0]) == null ? void 0 : $.key) != null && F.startsWith("__") ? 1 : 0, 0, Pn.SELECTION_COLUMN), r && k.push({ title: "操作", align: "center", fixed: "right", width: `${Math.ceil(o / w.width * 100).toFixed(2)}%`, render: (A, O, N) => r(O, N) }), k; + })(), dataSource: i, size: "middle", scroll: { x: "max-content", y: w.height - 50 }, pagination: !1, expandable: { defaultExpandAllRows: !0, expandRowByClick: !0, onExpandedRowsChange: g, expandedRowKeys: m } }) : null }); +}, Er = "RC_FORM_INTERNAL_HOOKS", Pr = (t) => { const [e, n] = E.useState({ items: [] }); return U(() => { - t && W.get(`/api/_/${t}`).then(({ uuid: i, code: r, name: a, resource: o, primaryKey: s, marginX: l, marginY: c, cols: u, rowHeight: p, fields: h, theme: g, themeSetting: y, groups: w }) => ({ uuid: i, code: r, name: a, resource: o, primaryKey: s, marginX: l, marginY: c, cols: u, rowHeight: p, theme: g, themeProps: y, groups: w, items: h })).then(n); + t && W.get(`/api/_/${t}`).then(({ uuid: i, code: r, name: o, resource: a, primaryKey: s, marginX: l, marginY: c, cols: u, rowHeight: p, fields: m, theme: g, themeSetting: w, groups: f }) => ({ uuid: i, code: r, name: o, resource: a, primaryKey: s, marginX: l, marginY: c, cols: u, rowHeight: p, theme: g, themeProps: w, groups: f, items: m })).then(n); }, [t]), e; -}, $r = (t, { initialValue: e, initialValueLanguage: n, convertJs: i, convertJsSetting: r, type: a = "string" }, o = null) => { - const s = J(!1), l = ge(Mn), [c, u] = L(), [p, h] = L(n != "javascript" && t ? l.getFieldValue(t) : void 0), { registerWatch: g } = l.getInternalHooks(Er) || {}; - return U(() => g == null ? void 0 : g((y, w, S) => { +}, $r = (t, { initialValue: e, initialValueLanguage: n, convertJs: i, convertJsSetting: r, type: o = "string" }, a = null) => { + const s = J(!1), l = ge(Dn), [c, u] = L(), [p, m] = L(n != "javascript" && t ? l.getFieldValue(t) : void 0), { registerWatch: g } = l.getInternalHooks(Er) || {}; + return U(() => g == null ? void 0 : g((w, f, S) => { if (!s.current) return; - const b = f.get(w, t); - f.isEqual(b, p) || h(pe(b, a)); + const b = y.get(f, t); + y.isEqual(b, p) || m(pe(b, o)); }), [p]), U(() => { - n == "javascript" && e ? Me.exec(e, {}, { getFieldValueForBasicForm: (y) => o ? o.getFieldValue(y) : l.getFieldValue(y), getFieldValue: (y) => l.getFieldValue(y) }).then((y) => h(pe(y, a))).catch((y) => notification.error({ message: `布局数据错误: ${JSON.stringify(y)}` })).finally(() => s.current = !0) : (e && h(pe(e ?? l.getFieldValue(t), a)), s.current = !0); + n == "javascript" && e ? Me.exec(e, {}, { getFieldValueForBasicForm: (w) => a ? a.getFieldValue(w) : l.getFieldValue(w), getFieldValue: (w) => l.getFieldValue(w) }).then((w) => m(pe(w, o))).catch((w) => notification.error({ message: `布局数据错误: ${JSON.stringify(w)}` })).finally(() => s.current = !0) : (e && m(pe(e ?? l.getFieldValue(t), o)), s.current = !0); }, [e, n]), mt(() => { - s.current && i && new St([i, r]).toValue(p, l.getFieldsValue(!0)).then(u).catch((y) => { - u(y), console.error("布局数据转换错误: ", y, i); + s.current && i && new St([i, r]).toValue(p, l.getFieldsValue(!0)).then(u).catch((w) => { + u(w), console.error("布局数据转换错误: ", w, i); }); }, [p, i, r]), [c ?? p, p]; -}, La = (t, e, n = null) => z(() => nn(t, e, n), [t]), ti = (t, e, n = {}, i = {}, r = {}, a = null) => { - const o = ge(Mn), s = Ot(), l = J(!0), c = J([]), [u, p] = L(e), [h, g] = L(), y = oe.useWatch((w) => JSON.stringify(f.pick(w, c.current)), o) || "{}"; +}, Mo = (t, e, n = null) => z(() => rn(t, e, n), [t]), ti = (t, e, n = {}, i = {}, r = {}, o = null) => { + const a = ge(Dn), s = Ot(), l = J(!0), c = J([]), [u, p] = L(e), [m, g] = L(), w = ae.useWatch((f) => JSON.stringify(y.pick(f, c.current)), a) || "{}"; return Rt(() => { - t && Me.exec(t, n, { ...i, getFieldValueForBasicForm: (w) => r ? r.getFieldValue(w) : null, getFieldValue: f.wrap(o.getFieldValue, (w, S) => (c.current.some((b) => f.isEqual(b, S)) || (c.current.push(S), s()), w == null ? void 0 : w(S))), isFieldTouched: o.isFieldTouched, isFieldsTouched: o.isFieldsTouched }).then((w) => { - l.current && (p(w), g(null)); - }).catch((w) => { - l.current && (p(e), g(w)); + t && Me.exec(t, n, { ...i, getFieldValueForBasicForm: (f) => r ? r.getFieldValue(f) : null, getFieldValue: y.wrap(a.getFieldValue, (f, S) => (c.current.some((b) => y.isEqual(b, S)) || (c.current.push(S), s()), f == null ? void 0 : f(S))), isFieldTouched: a.isFieldTouched, isFieldsTouched: a.isFieldsTouched }).then((f) => { + l.current && (p(f), g(null)); + }).catch((f) => { + l.current && (p(e), g(f)); }); - }, [t, y, o, n, i]), U(() => () => l.current = !1, []), t ? [a ? pe(u, a) : u, h] : [a ? pe(e, a) : e, null]; -}, vr = ({ widget: t, widgetPrefix: e = "@pkg/ff/grid-layouts", basicForm: n, ...i }) => { - const r = t != null && t.startsWith("@") || t != null && t.startsWith("blob:") ? t : `${e}/${t}`, [a, o] = L(); + }, [t, w, a, n, i]), U(() => () => l.current = !1, []), t ? [o ? pe(u, o) : u, m] : [o ? pe(e, o) : e, null]; +}, xr = ({ widget: t, widgetPrefix: e = "@pkg/ff/grid-layouts", basicForm: n, ...i }) => { + const r = t != null && t.startsWith("@") || t != null && t.startsWith("blob:") ? t : `${e}/${t}`, [o, a] = L(); return U(() => { - r && se.getWidgetComponent(r).then(({ defaultProps: s = {}, default: l }) => ({ default: Pr(l, s, n) })).catch((s) => ({ default: () => `${s}` })).then((s) => o(E.createElement(s.default, i))); - }, [r]), a; -}, Pr = (t, e = {}, n = null) => (i) => { - const { code: r, label: a, extras: o, isVirtual: s, initialValue: l, initialValueLanguage: c, convertJs: u, convertJsSetting: p, value: h, ...g } = f.merge({}, e, i), [y, w] = $r(s ? null : r, { initialValue: l, initialValueLanguage: c, convertJs: u, convertJsSetting: p, type: (g == null ? void 0 : g.type) || "string" }, n), S = z(() => { + r && se.getWidgetComponent(r).then(({ defaultProps: s = {}, default: l }) => ({ default: vr(l, s, n) })).catch((s) => ({ default: () => `${s}` })).then((s) => a(E.createElement(s.default, i))); + }, [r]), o; +}, vr = (t, e = {}, n = null) => (i) => { + const { code: r, label: o, extras: a, isVirtual: s, initialValue: l, initialValueLanguage: c, convertJs: u, convertJsSetting: p, value: m, ...g } = y.merge({}, e, i), [w, f] = $r(s ? null : r, { initialValue: l, initialValueLanguage: c, convertJs: u, convertJsSetting: p, type: (g == null ? void 0 : g.type) || "string" }, n), S = z(() => { const k = Object.keys((e == null ? void 0 : e.extras) || {}); - return f.over([f.partialRight(f.pick, k), f.partialRight(f.omit, k)]); - }, [e == null ? void 0 : e.extras]), [b, $] = S(g); - return m(t, { ...$, value: y, rawValue: w, $setting: Object.assign({}, o, b) }); -}, ni = ({ theme: t, basicForm: e, items: n = [{ key: "default", label: "默认" }], fields: i = [], itemRender: r, chunks: a = [], children: o, $setting: s = {}, ...l }) => { + return y.over([y.partialRight(y.pick, k), y.partialRight(y.omit, k)]); + }, [e == null ? void 0 : e.extras]), [b, P] = S(g); + return h(t, { ...P, value: w, rawValue: f, $setting: Object.assign({}, a, b) }); +}, ni = ({ theme: t, basicForm: e, items: n = [{ key: "default", label: "默认" }], fields: i = [], itemRender: r, chunks: o = [], children: a, $setting: s = {}, ...l }) => { const [c, u] = L(); U(() => { - t ? se.getWidgetComponent(t).then((h) => { - if (!(h != null && h.default)) throw "not found"; - return h; - }).catch((h) => ({ default: () => `${t} ${h}` })).then((h) => u(E.createElement(h.default, {}))) : u(null); + t ? se.getWidgetComponent(t).then((m) => { + if (!(m != null && m.default)) throw "not found"; + return m; + }).catch((m) => ({ default: () => `${t} ${m}` })).then((m) => u(E.createElement(m.default, {}))) : u(null); }, [t]); - const p = z(() => n == null ? void 0 : n.map((h) => ({ ...h, children: r(h, i == null ? void 0 : i.filter((g) => !(g != null && g.group) && h.key == "default" || g.group == h.key), h.key == "default" ? o : null) })).concat(a), [n, o, a]); + const p = z(() => n == null ? void 0 : n.map((m) => ({ ...m, children: r(m, i == null ? void 0 : i.filter((g) => !(g != null && g.group) && m.key == "default" || g.group == m.key), m.key == "default" ? a : null) })).concat(o), [n, a, o]); return c && E.cloneElement(c, { items: p, basicForm: e, $setting: { ...s, ...l } }); -}, ii = ({ name: t, form: e = null, basicForm: n = null, style: i = {}, className: r, cols: a = 12, rowHeight: o = 21, containerPadding: s = [0, 0], itemMargin: l = [4, 0], formProps: c = {}, formFields: u = [], fields: p = [], data: h, theme: g, themeProps: y = {}, groups: w = [{ key: "default", label: "默认" }], children: S, ...b }) => { - const [$] = oe.useForm(e), k = z(() => [{ name: "__PROPS__", value: c }].concat(u), [c, u]); - mt(() => ($.setFieldsValue(h), () => $.resetFields()), [h]); - const x = (F, A, O) => { - const N = nn(A, vr, n), V = Yn(b); - return I("div", { ...V, className: j("ff-grid-layout", r), style: { ...i, "--grid-layout-item-margin-y": `${(l == null ? void 0 : l[0]) || 0}px`, "--grid-layout-item-margin-x": `${(l == null ? void 0 : l[1]) || 0}px`, "--grid-layout-container-padding-y": `${(s == null ? void 0 : s[0]) || 0}px`, "--grid-layout-container-padding-x": `${(s == null ? void 0 : s[1]) || 0}px`, "--grid-layout-cols": a, "--grid-layout-row-height": `${o}px` }, children: [N, O && E.cloneElement(O, { cols: a, rowHeight: o, itemMargin: l, containerPadding: s, fields: A, basicForm: n })] }); +}, ii = ({ name: t, form: e = null, basicForm: n = null, style: i = {}, className: r, cols: o = 12, rowHeight: a = 21, containerPadding: s = [0, 0], itemMargin: l = [4, 0], formProps: c = {}, formFields: u = [], fields: p = [], data: m, theme: g, themeProps: w = {}, groups: f = [{ key: "default", label: "默认" }], children: S, ...b }) => { + const [P] = ae.useForm(e), k = z(() => [{ name: "__PROPS__", value: c }].concat(u), [c, u]); + mt(() => (P.setFieldsValue(m), () => P.resetFields()), [m]); + const $ = (F, A, O) => { + const N = rn(A, xr, n), V = Yn(b); + return I("div", { ...V, className: j("ff-grid-layout", r), style: { ...i, "--grid-layout-item-margin-y": `${(l == null ? void 0 : l[0]) || 0}px`, "--grid-layout-item-margin-x": `${(l == null ? void 0 : l[1]) || 0}px`, "--grid-layout-container-padding-y": `${(s == null ? void 0 : s[0]) || 0}px`, "--grid-layout-container-padding-x": `${(s == null ? void 0 : s[1]) || 0}px`, "--grid-layout-cols": o, "--grid-layout-row-height": `${a}px` }, children: [N, O && E.cloneElement(O, { cols: o, rowHeight: a, itemMargin: l, containerPadding: s, fields: A, basicForm: n })] }); }; - return m(oe, { ...b, fields: k, form: $, component: !1, children: g ? m(ni, { ...y, items: w, theme: g, itemRender: x, fields: p, children: S, basicForm: n }) : x(0, p, S) }); -}, Ma = /* @__PURE__ */ ((t) => function({ code: e, data: n, ...i }) { - const { uuid: r, resource: a, items: o, hides: s, rowHeight: l, marginX: c, marginY: u, cols: p, theme: h, themeProps: g, groups: y } = xr(e) || {}, w = z(() => [{ name: "__RESOURCE__", value: a }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: r }], [e, r, a]); - return a && m(t, { name: e, theme: h, themeProps: g, groups: y, ...i, fields: o, formFields: w, rowHeight: l, cols: p, itemMargin: [c, u], data: a ? { [a]: n } : n }); -})(ii), Nr = ({ column: t = 0, colWidth: e = 0, cols: n, rowHeight: i, itemMargin: r, containerPadding: a, fields: o, primaryKey: s, dataSource: l, beforeRender: c = null, afterRender: u = null, itemClassName: p, itemRender: h = (x, F, A) => x, empty: g = m(zt, { description: null }), className: y, style: w = {}, theme: S, themeProps: b = {}, groups: $ = [{ key: "default", label: "默认" }], rowSelection: k }) => { - const { classNames: x } = ge(le), F = G((N) => { + return h(ae, { ...b, fields: k, form: P, component: !1, children: g ? h(ni, { ...w, items: f, theme: g, itemRender: $, fields: p, children: S, basicForm: n }) : $(0, p, S) }); +}, Vo = /* @__PURE__ */ ((t) => function({ code: e, data: n, ...i }) { + const { uuid: r, resource: o, items: a, hides: s, rowHeight: l, marginX: c, marginY: u, cols: p, theme: m, themeProps: g, groups: w } = Pr(e) || {}, f = z(() => [{ name: "__RESOURCE__", value: o }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: r }], [e, r, o]); + return o && h(t, { name: e, theme: m, themeProps: g, groups: w, ...i, fields: a, formFields: f, rowHeight: l, cols: p, itemMargin: [c, u], data: o ? { [o]: n } : n }); +})(ii), Nr = ({ column: t = 0, colWidth: e = 0, cols: n, rowHeight: i, itemMargin: r, containerPadding: o, fields: a, primaryKey: s, dataSource: l, beforeRender: c = null, afterRender: u = null, itemClassName: p, itemRender: m = ($, F, A) => $, empty: g = h(zt, { description: null }), className: w, style: f = {}, theme: S, themeProps: b = {}, groups: P = [{ key: "default", label: "默认" }], rowSelection: k }) => { + const { classNames: $ } = ge(le), F = G((N) => { if (!k) return; - const { selectedRowKeys: V = [], onChange: P, type: M = "checkbox" } = k, D = N == null ? void 0 : N[s]; + const { selectedRowKeys: V = [], onChange: v, type: M = "checkbox" } = k, D = N == null ? void 0 : N[s]; let B; - B = M === "radio" ? [D] : V.includes(D) ? V.filter((X) => X !== D) : [...V, D], P == null || P(B, l.filter((X) => B.includes(X == null ? void 0 : X[s]))); - }, [k, s, l]), A = z(() => m(ii, { groups: $, theme: S, themeProps: b, cols: n, rowHeight: i, itemMargin: r, containerPadding: a, fields: o, className: p }), [o, n, i, r, a, $, S, b]), O = f.isEmpty(l); - return I("div", { className: j("ff-data-list-content", x.content, y), style: Object.assign({}, w, t && { "--col-num": t }, e && { "--col-width": e }), children: [c == null ? void 0 : c(l), O ? g : l.map((N, V) => { + B = M === "radio" ? [D] : V.includes(D) ? V.filter((Q) => Q !== D) : [...V, D], v == null || v(B, l.filter((Q) => B.includes(Q == null ? void 0 : Q[s]))); + }, [k, s, l]), A = z(() => h(ii, { groups: P, theme: S, themeProps: b, cols: n, rowHeight: i, itemMargin: r, containerPadding: o, fields: a, className: p }), [a, n, i, r, o, P, S, b]), O = y.isEmpty(l); + return I("div", { className: j("ff-data-list-content", $.content, w), style: Object.assign({}, f, t && { "--col-num": t }, e && { "--col-width": e }), children: [c == null ? void 0 : c(l), O ? g : l.map((N, V) => { var B; - const P = (N == null ? void 0 : N[s]) ?? V, M = `${P}-${jr(N)}`, D = h(E.cloneElement(A, { data: N }), N, V); - return E.cloneElement(D, { key: M, ...k && { isSelected: (B = k == null ? void 0 : k.selectedRowKeys) == null ? void 0 : B.includes(P), selectionType: k.type ?? "checkbox", onSelect: () => F(N) } }); + const v = (N == null ? void 0 : N[s]) ?? V, M = `${v}-${jr(N)}`, D = m(E.cloneElement(A, { data: N }), N, V); + return E.cloneElement(D, { key: M, ...k && { isSelected: (B = k == null ? void 0 : k.selectedRowKeys) == null ? void 0 : B.includes(v), selectionType: k.type ?? "checkbox", onSelect: () => F(N) } }); }), u == null ? void 0 : u(l)] }); }, Tr = ({ component: t, $props: e }) => { const { base62params: n } = Tt(e, {}); - return m(te, { children: m(rn, { listCode: t, base62params: W.decode(n) }) }); -}, Va = () => m(ri, {}), ri = () => "Empty", Or = ({ component: t, $setting: e, $props: n }) => { - const [i, r] = L(), [a, o] = ci(n); + return h(ne, { children: h(on, { listCode: t, base62params: W.decode(n) }) }); +}, Do = () => h(ri, {}), ri = () => "Empty", Or = ({ component: t, $setting: e, $props: n }) => { + const [i, r] = L(), [o, a] = ci(n); return U(() => { - if (!t) return r(m(ri, { description: null })); + if (!t) return r(h(ri, { description: null })); se.getWidgetComponent(t).catch((s) => ({ default: () => `${s}` })).then((s) => E.createElement(s.default, { $setting: e })).then(r); - }, [t]), i ? E.cloneElement(i, { ...a, $setProps: o }) : null; -}, Da = () => "NotFoundPage"; + }, [t]), i ? E.cloneElement(i, { ...o, $setProps: a }) : null; +}, Wo = () => "NotFoundPage"; var je, ue, Ae, Ce, st, lt; const we = class we { constructor() { - v(this, ue, /* @__PURE__ */ new Map()); - v(this, Ae, {}); - v(this, Ce, null); + x(this, ue, /* @__PURE__ */ new Map()); + x(this, Ae, {}); + x(this, Ce, null); T(this, "init", (e, n) => { K(this, ue, e), K(this, Ae, n); }); T(this, "get", (e) => (d(this, ue).has(e) || (e = Array.from(d(this, ue).keys()).find((n) => d(this, ue).get(n).uri === e)), d(this, ue).get(e) || {})); T(this, "redirect", (e, n, i = {}) => { - var y; - const { uri: r, type: a, widgetProps: o } = this.get(e) || {}, { router: s, query: l, ...c } = n || {}, u = Object.assign({}, c, s), p = Object.assign({}, c, l); - a == "list" && (u.base62params = W.encode(u != null && u.base62params ? u.base62params : u)); - let h = Qi(r || e, u); + var w; + const { uri: r, type: o, widgetProps: a } = this.get(e) || {}, { router: s, query: l, ...c } = n || {}, u = Object.assign({}, c, s), p = Object.assign({}, c, l); + o == "list" && (u.base62params = W.encode(u != null && u.base62params ? u.base62params : u)); + let m = Qi(r || e, u); const g = new URLSearchParams(); - for (const w in o || {}) ((y = o[w]) == null ? void 0 : y.type) == "query" && Object.has(p, w) && g.append(w, JSON.stringify(p[w])); - return g.size > 0 && (h = `${h}?${g.toString()}`), i != null && i.isOpenWindow ? window.open(h) : d(this, Ce).navigate(h, { replace: !!(i != null && i.isReplaceRouteHistory) }); + for (const f in a || {}) ((w = a[f]) == null ? void 0 : w.type) == "query" && Object.has(p, f) && g.append(f, JSON.stringify(p[f])); + return g.size > 0 && (m = `${m}?${g.toString()}`), i != null && i.isOpenWindow ? window.open(m) : d(this, Ce).navigate(m, { replace: !!(i != null && i.isReplaceRouteHistory) }); }); T(this, "getMenus", (e) => { var n; @@ -510,106 +510,106 @@ const we = class we { return n; }); T(this, "getMenusByRouteUuid", (e) => d(this, lt).call(this, e, Object.values(d(this, Ae)).flat())); - v(this, st, (e, n, i = []) => { - if (f.isEmpty(e)) return i; - for (const { uuid: r, children: a } of e) { + x(this, st, (e, n, i = []) => { + if (y.isEmpty(e)) return i; + for (const { uuid: r, children: o } of e) { if (r == n) return i.concat(r); - if (!f.isEmpty(a)) return i.concat(r, d(this, st).call(this, a, n)); + if (!y.isEmpty(o)) return i.concat(r, d(this, st).call(this, o, n)); } return i; }); - v(this, lt, (e, n) => { + x(this, lt, (e, n) => { var r; let i = []; - for (const a of n) a.widgetType == "redirect" && (a.uuid == e || a.widget == e ? i.push(a) : (r = a.children) != null && r.length && (i = i.concat(d(this, lt).call(this, e, a.children)))); + for (const o of n) o.widgetType == "redirect" && (o.uuid == e || o.widget == e ? i.push(o) : (r = o.children) != null && r.length && (i = i.concat(d(this, lt).call(this, e, o.children)))); return i; }); T(this, "getCurrentMenu", () => { const { uuid: e } = this.getCurrentRoute() || {}; if (!e) return; const n = this.getMenusByRouteUuid(e); - return f.isEmpty(n) ? void 0 : n[0]; + return y.isEmpty(n) ? void 0 : n[0]; }); T(this, "getCurrentRoute", (e = 0) => { var i; const n = (i = d(this, Ce).state.matches[d(this, Ce).state.matches.length - 1 - e]) == null ? void 0 : i.route; if (!n) return null; - for (let [r, a] of d(this, ue)) if (a.uri === n.path) return a; + for (let [r, o] of d(this, ue)) if (o.uri === n.path) return o; return null; }); T(this, "getPageParams", (e) => { - var o, s; - const { location: n = {}, matches: i = [] } = ((o = d(this, Ce)) == null ? void 0 : o.state) || {}, r = { ...((s = i[i.length - 1]) == null ? void 0 : s.params) || {} }, a = n.search; - return a && new URLSearchParams(a).forEach((l, c) => { + var a, s; + const { location: n = {}, matches: i = [] } = ((a = d(this, Ce)) == null ? void 0 : a.state) || {}, r = { ...((s = i[i.length - 1]) == null ? void 0 : s.params) || {} }, o = n.search; + return o && new URLSearchParams(o).forEach((l, c) => { r[c] = l; - }), e ? f.get(r, e) : r; + }), e ? y.get(r, e) : r; }); T(this, "usePageParams", (e) => { var i; let n = Bn() ? { ...Zi(), ...Object.fromEntries(new URLSearchParams(((i = er()) == null ? void 0 : i.search) ?? "")) } : this.getPageParams(); - return e ? f.get(n, e) : n; + return e ? y.get(n, e) : n; }); T(this, "createBrowserRouter", (e = {}) => { if (d(this, ue).size == 0) return null; if (d(this, Ce)) return d(this, Ce); - const n = qe.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/ff/frameworks/DefaultTheme"), i = qe.get(se.checkUserToken() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"), r = { [n]: 0 }, a = (s, l) => () => Promise.all([se.getWidgetComponent(s), Tt(l)]).then(([c, u]) => [c.default || function() { + const n = qe.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/ff/frameworks/DefaultTheme"), i = qe.get(se.checkUserToken() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"), r = { [n]: 0 }, o = (s, l) => () => Promise.all([se.getWidgetComponent(s), Tt(l)]).then(([c, u]) => [c.default || function() { return `${s}`; - }, u]).then(([c, u]) => ({ Component: () => E.createElement(Un, {}, E.createElement(c, { $setting: u })) })), o = Array.from(d(this, ue).values()).reduce((s, { uuid: l, uri: c, name: u, type: p, component: h, widgetSetting: g, widgetProps: y, isLogin: w, isLayout: S, extra: b }) => { - let $ = {}, k = 0; + }, u]).then(([c, u]) => ({ Component: () => E.createElement(Un, {}, E.createElement(c, { $setting: u })) })), a = Array.from(d(this, ue).values()).reduce((s, { uuid: l, uri: c, name: u, type: p, component: m, widgetSetting: g, widgetProps: w, isLogin: f, isLayout: S, extra: b }) => { + let P = {}, k = 0; switch (p) { case "list": - $.element = E.createElement(Tr, { component: h, $props: y }); + P.element = E.createElement(Tr, { component: m, $props: w }); break; case "fsdpf-component": - $.element = E.createElement(Or, { key: h, component: h, $setting: g, $props: y }); + P.element = E.createElement(Or, { key: m, component: m, $setting: g, $props: w }); } - const x = (b == null ? void 0 : b.theme) ?? (b == null ? void 0 : b.layout); - if (x) { + const $ = (b == null ? void 0 : b.theme) ?? (b == null ? void 0 : b.layout); + if ($) { const F = (b == null ? void 0 : b.themeProps) ?? (b == null ? void 0 : b.layoutProps); - if (!r[x]) return r[x] = s.length, [...s, { path: "/", lazy: a(x, F), children: [{ path: c, ...$ }] }]; - k = r[x]; + if (!r[$]) return r[$] = s.length, [...s, { path: "/", lazy: o($, F), children: [{ path: c, ...P }] }]; + k = r[$]; } - return S && k > -1 ? (s[k].children.push({ path: c, ...$ }), s) : [...s, { path: c, ...$ }]; - }, [{ path: "/", lazy: a(n, {}), children: [] }]); - return o.push({ index: !0, element: E.createElement(Rr, { to: i, replace: !0 }) }), K(this, Ce, tr(o, e)); + return S && k > -1 ? (s[k].children.push({ path: c, ...P }), s) : [...s, { path: c, ...P }]; + }, [{ path: "/", lazy: o(n, {}), children: [] }]); + return a.push({ index: !0, element: E.createElement(Rr, { to: i, replace: !0 }) }), K(this, Ce, tr(a, e)); }); if (d(we, je)) return d(we, je); } }; -je = new WeakMap(), ue = new WeakMap(), Ae = new WeakMap(), Ce = new WeakMap(), st = new WeakMap(), lt = new WeakMap(), v(we, je, null), T(we, "getInstance", () => (d(we, je) || K(we, je, new we()), d(we, je))); +je = new WeakMap(), ue = new WeakMap(), Ae = new WeakMap(), Ce = new WeakMap(), st = new WeakMap(), lt = new WeakMap(), x(we, je, null), T(we, "getInstance", () => (d(we, je) || K(we, je, new we()), d(we, je))); let _t = we; -const Rr = ({ to: t, replace: e }) => Bn() ? E.createElement(nr, { to: t, replace: e }) : (window.document.location = t, "redirect"), ae = _t.getInstance(), Ke = new Worker(new URL("/ff-worker/index.js", self.location)), Nn = { generateUUID: () => Lr(), getConfigure: (t) => qe.get(t), route: { redirect: (...t) => ae.redirect(...t), getPageParams: (...t) => ae.getPageParams(...t), getCurrentRoute: () => ae.getCurrentRoute() }, popup: { notification: (...t) => re.notification(...t), success: (...t) => re.success(...t), error: (...t) => re.error(...t), form: (...t) => re.form(...t), modal: (...t) => re.modal(...t), confirm: (...t) => re.confirm(...t) } }; -var Pt, Ye, Ie; +const Rr = ({ to: t, replace: e }) => Bn() ? E.createElement(nr, { to: t, replace: e }) : (window.document.location = t, "redirect"), oe = _t.getInstance(), Ke = new Worker(new URL("/ff-worker/index.js", self.location)), Tn = { generateUUID: () => Lr(), getConfigure: (t) => qe.get(t), route: { redirect: (...t) => oe.redirect(...t), getPageParams: (...t) => oe.getPageParams(...t), getCurrentRoute: () => oe.getCurrentRoute() }, popup: { notification: (...t) => re.notification(...t), success: (...t) => re.success(...t), error: (...t) => re.error(...t), form: (...t) => re.form(...t), modal: (...t) => re.modal(...t), confirm: (...t) => re.confirm(...t) } }; +var vt, Ye, Ie; const _ = class _ { constructor() { - T(this, "exec", (e, n = {}, i = {}, r = "") => new Promise((a, o) => { - if (!/^(?!\s*(\/\/|\/\*|\*)).*?\S+/m.test(e)) return a(); - const s = kn(_, Pt)._++; - d(_, Ye).set(s, i), _.mQueue.set(s, [a, o]), Ke.postMessage({ id: s, session: r, category: "eval", method: e, args: n }); + T(this, "exec", (e, n = {}, i = {}, r = "") => new Promise((o, a) => { + if (!/^(?!\s*(\/\/|\/\*|\*)).*?\S+/m.test(e)) return o(); + const s = Sn(_, vt)._++; + d(_, Ye).set(s, i), _.mQueue.set(s, [o, a]), Ke.postMessage({ id: s, session: r, category: "eval", method: e, args: n }); })); T(this, "clear", (e) => Ke.postMessage({ session: e, category: "clear" })); if (d(_, Ie)) return d(_, Ie); - Promise.resolve().then(() => da).then((e) => { - Nn.http = e.http; - }), Ke.addEventListener("message", ({ data: { id: e, task_id: n, method: i, args: r, category: a, data: o, error: s, session: l } }) => { - if (a === "eval" && _.mQueue.has(e)) s !== null ? _.mQueue.get(e)[1](s) : _.mQueue.get(e)[0](o), d(_, Ye).delete(e), _.mQueue.delete(e); - else if (a === "util") try { - const c = f.get(Nn, i.split("/")) || f.get(d(_, Ye).get(n), i.split("/")); - if (!f.isFunction(c)) throw `${i} not found`; + Promise.resolve().then(() => uo).then((e) => { + Tn.http = e.http; + }), Ke.addEventListener("message", ({ data: { id: e, task_id: n, method: i, args: r, category: o, data: a, error: s, session: l } }) => { + if (o === "eval" && _.mQueue.has(e)) s !== null ? _.mQueue.get(e)[1](s) : _.mQueue.get(e)[0](a), d(_, Ye).delete(e), _.mQueue.delete(e); + else if (o === "util") try { + const c = y.get(Tn, i.split("/")) || y.get(d(_, Ye).get(n), i.split("/")); + if (!y.isFunction(c)) throw `${i} not found`; Promise.resolve(Reflect.apply(c, void 0, r)).then((u) => { - Ke.postMessage({ id: e, task_id: n, category: a, method: i, args: r, session: l, data: u, error: null }); + Ke.postMessage({ id: e, task_id: n, category: o, method: i, args: r, session: l, data: u, error: null }); }).catch((u) => { - Ke.postMessage({ id: e, task_id: n, category: a, method: i, args: r, session: l, data: null, error: u }); + Ke.postMessage({ id: e, task_id: n, category: o, method: i, args: r, session: l, data: null, error: u }); }); } catch (c) { - Ke.postMessage({ id: e, task_id: n, category: a, method: i, args: r, session: l, data: null, error: c }); + Ke.postMessage({ id: e, task_id: n, category: o, method: i, args: r, session: l, data: null, error: c }); } }, !1); } }; -Pt = new WeakMap(), Ye = new WeakMap(), Ie = new WeakMap(), T(_, "mQueue", /* @__PURE__ */ new Map()), v(_, Pt, 0), v(_, Ye, /* @__PURE__ */ new Map()), v(_, Ie, null), T(_, "getInstance", () => (d(_, Ie) || K(_, Ie, new _()), d(_, Ie))); +vt = new WeakMap(), Ye = new WeakMap(), Ie = new WeakMap(), T(_, "mQueue", /* @__PURE__ */ new Map()), x(_, vt, 0), x(_, Ye, /* @__PURE__ */ new Map()), x(_, Ie, null), T(_, "getInstance", () => (d(_, Ie) || K(_, Ie, new _()), d(_, Ie))); let Jt = _; -const Me = Jt.getInstance(), Tn = { null2json: (t) => Object.create(), null2array: (t) => [], null2number: (t) => 0, null2bool: (t) => !1, null2string: (t) => "", null2integer: (t) => 0, null2float: (t) => 0, string2json: (t) => t ? JSON.parse(t) : "{}", string2array: (t) => t.substr(0, 1) === "[" && t.substr(-1) === "]" ? JSON.parse(t) : t.split(","), string2number: (t) => t == "" ? 0 : +t, string2integer: (t) => t == "" ? 0 : +t, string2float: (t) => t == "" ? 0 : +t, string2bool: (t) => { +const Me = Jt.getInstance(), On = { null2json: (t) => Object.create(), null2array: (t) => [], null2number: (t) => 0, null2bool: (t) => !1, null2string: (t) => "", null2integer: (t) => 0, null2float: (t) => 0, string2json: (t) => t ? JSON.parse(t) : "{}", string2array: (t) => t.substr(0, 1) === "[" && t.substr(-1) === "]" ? JSON.parse(t) : t.split(","), string2number: (t) => t == "" ? 0 : +t, string2integer: (t) => t == "" ? 0 : +t, string2float: (t) => t == "" ? 0 : +t, string2bool: (t) => { switch (`${t}`.toLowerCase()) { case "0": case "false": @@ -620,69 +620,69 @@ const Me = Jt.getInstance(), Tn = { null2json: (t) => Object.create(), null2arra return !!t; }, string2string: (t) => t, json2json: (t) => t, json2array: (t) => t ? Object.values(t) : [], json2number: (t) => Object.keys(t).length, json2integer: (t) => Object.keys(t).length, json2float: (t) => Object.keys(t).length, json2bool: (t) => Object.keys(t).length > 0, json2string: (t) => t ? JSON.stringify(t) : "", array2json: (t) => ({ ...t }), array2array: (t) => t, array2number: (t) => t.length, array2integer: (t) => t.length, array2float: (t) => t.length, array2bool: (t) => t.length > 0, array2string: (t) => JSON.stringify(t), number2json: (t) => ({}), number2array: (t) => [t], number2number: (t) => t, number2integer: (t) => t, number2float: (t) => t, number2bool: (t) => !!t, number2string: (t) => t.toString(), boolean2json: (t) => ({}), boolean2array: (t) => [], boolean2number: (t) => +t, boolean2integer: (t) => +t, boolean2float: (t) => +t, boolean2bool: (t) => t, boolean2string: (t) => t ? "true" : "false" }, pe = (t, e) => { let n = "string"; - n = Array.isArray(t) ? "array" : typeof t, f.isObject(t) && (n = "json"); + n = Array.isArray(t) ? "array" : typeof t, y.isObject(t) && (n = "json"); const i = `${n}2${e}`; - return Reflect.has(Tn, i) ? Tn[i](t) : t; -}, Fr = (t) => t === null ? "null" : Array.isArray(t) ? "array" : typeof t == "object" ? "json" : typeof t == "boolean" ? "bool" : typeof t == "string" ? "string" : typeof t == "number" ? Number.isInteger(t) ? "integer" : "float" : typeof t, Tt = (t = {}, e = {}, n = {}, i = "") => ai(t, (r, a) => a === "type" && r === "code") ? oi(t, e, n, i) : si(t, e, i), ai = (t, e = () => !1) => f.some(t, (n) => !!f.some(n, e) || (f.isEmpty(n) || !f.isPlainObject(n) && !f.isArray(n) ? void 0 : ai(n, e))), oi = async (t = {}, e = {}, n = {}, i = "") => { + return Reflect.has(On, i) ? On[i](t) : t; +}, Fr = (t) => t === null ? "null" : Array.isArray(t) ? "array" : typeof t == "object" ? "json" : typeof t == "boolean" ? "bool" : typeof t == "string" ? "string" : typeof t == "number" ? Number.isInteger(t) ? "integer" : "float" : typeof t, Tt = (t = {}, e = {}, n = {}, i = "") => oi(t, (r, o) => o === "type" && r === "code") ? ai(t, e, n, i) : si(t, e, i), oi = (t, e = () => !1) => y.some(t, (n) => !!y.some(n, e) || (y.isEmpty(n) || !y.isPlainObject(n) && !y.isArray(n) ? void 0 : oi(n, e))), ai = async (t = {}, e = {}, n = {}, i = "") => { let r = /* @__PURE__ */ Object.create(null); - for (let a in t) { - let o; - if (Reflect.has(t[a], "type") && ["code", "field", "router", "query", "string"].includes(t[a].type)) { - const { type: s, value: l = "", default: c = i } = t[a]; + for (let o in t) { + let a; + if (Reflect.has(t[o], "type") && ["code", "field", "router", "query", "string"].includes(t[o].type)) { + const { type: s, value: l = "", default: c = i } = t[o]; switch (s) { case "code": try { - o = await Me.exec(l, e, n); + a = await Me.exec(l, e, n); } catch (u) { console.error("getWidgetPropsData", u); } break; case "field": - o = f.get(e, l) ?? f.get(e, l.substring(l.indexOf(".") + 1)); + a = y.get(e, l) ?? y.get(e, l.substring(l.indexOf(".") + 1)); break; case "router": case "query": - o = ae.getPageParams(l); + a = oe.getPageParams(l); break; case "string": - o = l; + a = l; } - o ?? (o = c); - } else o = await oi(t[a], e, n, i); - f.set(r, a, o); + a ?? (a = c); + } else a = await ai(t[o], e, n, i); + y.set(r, o, a); } return r; }, si = (t = {}, e = {}, n = "") => Object.keys(t || {}).reduce((i, r) => { - if (f.isPlainObject(t[r])) { - let a; + if (y.isPlainObject(t[r])) { + let o; if (Reflect.has(t[r], "type") && ["field", "router", "query", "string"].includes(t[r].type)) { - const { type: o, value: s = "", default: l = n } = t[r]; - switch (o) { + const { type: a, value: s = "", default: l = n } = t[r]; + switch (a) { case "field": - a = f.get(e, s) ?? f.get(e, s.substring(s.indexOf(".") + 1)); + o = y.get(e, s) ?? y.get(e, s.substring(s.indexOf(".") + 1)); break; case "router": case "query": - a = ae.getPageParams(s); + o = oe.getPageParams(s); break; case "string": - a = s; + o = s; } - a ?? (a = l); - } else a = si(t[r], e, n); - f.set(i, r, a); + o ?? (o = l); + } else o = si(t[r], e, n); + y.set(i, r, o); } return i; -}, {}), Lt = (t, e) => t && typeof t == "object" ? Array.isArray(t) ? t.map((n) => Lt(n, e)) : Object.keys(t).reduce((n, i) => (e[i] ? n[e[i]] = Lt(t[i], e) : n[i] = Lt(t[i], e), n), {}) : t, Wa = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (t) => { +}, {}), Lt = (t, e) => t && typeof t == "object" ? Array.isArray(t) ? t.map((n) => Lt(n, e)) : Object.keys(t).reduce((n, i) => (e[i] ? n[e[i]] = Lt(t[i], e) : n[i] = Lt(t[i], e), n), {}) : t, Bo = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (t) => { const e = 16 * Math.random() | 0; return (t === "x" ? e : 3 & e | 8).toString(16); -}), Ba = (t) => { +}), zo = (t) => { var e, n; return t ? (n = (e = t.match(/^@pkg(?:[^\/]*\/){3}(?[^\/]+)/)) == null ? void 0 : e.groups) == null ? void 0 : n.name : ""; -}, za = (t) => { +}, Uo = (t) => { var e, n; return t ? (n = (e = t.match(/^@pkg(?:[^\/]*\/){2}(?[^\/]+)/)) == null ? void 0 : e.groups) == null ? void 0 : n.category : ""; -}, Ua = (t) => { +}, qo = (t) => { var e, n; return t ? (n = (e = t.match(/^@pkg(?:[^\/]*\/){1}(?[^\/]+)/)) == null ? void 0 : e.groups) == null ? void 0 : n.owner : ""; }, jr = (t, e = 32, n = "auto") => { @@ -694,8 +694,8 @@ const Me = Jt.getInstance(), Tn = { null2json: (t) => Object.create(), null2arra let t = 1; const e = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new Map(); return (...i) => i.length === 0 ? "" : i.map((r) => { - return String((a = r) === null || typeof a != "object" && typeof a != "function" ? (n.has(a) || n.set(a, t++), n.get(a)) : (e.has(a) || e.set(a, t++), e.get(a))); - var a; + return String((o = r) === null || typeof o != "object" && typeof o != "function" ? (n.has(o) || n.set(o, t++), n.get(o)) : (e.has(o) || e.set(o, t++), e.get(o))); + var o; }).join("::"); }, Ir = (t) => { if (!t || typeof t != "string" || t.startsWith("/") || t.startsWith("./") || t.startsWith("../")) return !1; @@ -705,7 +705,7 @@ const Me = Jt.getInstance(), Tn = { null2json: (t) => Object.create(), null2arra } catch { return !1; } -}, qa = (t, e = "") => { +}, Ko = (t, e = "") => { if (!t || typeof t != "string" || Ir(t)) return t; let n = e; return !n && typeof window < "u" && window.location && (n = `${window.location.protocol}//${window.location.host}`), t.startsWith("/") ? n ? `${n}${t}` : t : n ? `${n}/${t}` : t; @@ -715,87 +715,87 @@ const Me = Jt.getInstance(), Tn = { null2json: (t) => Object.create(), null2arra }), Ot = () => { const t = J(!0), [, e] = E.useReducer((n) => n + 1, 0); return U(() => () => t.current = !1, []), () => t.current && e(); -}, Ka = (t) => { - const [e, n] = L(t), i = J(null), r = G((a, o) => { - i.current = o, n(a); +}, Ho = (t) => { + const [e, n] = L(t), i = J(null), r = G((o, a) => { + i.current = a, n(o); }, []); return U(() => { i.current && (i.current(e), i.current = null); }, [e]), [e, r]; }, mt = (t = (i) => { -}, e, n = f.isEqual) => { +}, e, n = y.isEqual) => { const i = E.useRef(); - n(e, i.current) || (i.current = f.cloneDeep(e)), E.useEffect(t, [i.current]); + n(e, i.current) || (i.current = y.cloneDeep(e)), E.useEffect(t, [i.current]); }, Rt = mt, li = (t, e = "string") => { var n; if (!Array.isArray(t)) return t; for (let i = 0; i < t.length; i++) t[i].value = pe((n = t[i]) == null ? void 0 : n.value, e), t[i] && Reflect.has(t[i], "children") && (t[i].children = li(t[i].children, e)); return t; -}, Ha = (t, e = "json", n = "string", i, r = null) => { - const [a] = oe.useForm(i), [o, s] = L([{ label: "无", value: "", disabled: !0 }]), l = J([]), c = oe.useWatch((u) => l.current.length === 0 ? null : f.pick(u, l.current), a) || null; +}, _o = (t, e = "json", n = "string", i, r = null) => { + const [o] = ae.useForm(i), [a, s] = L([{ label: "无", value: "", disabled: !0 }]), l = J([]), c = ae.useWatch((u) => l.current.length === 0 ? null : y.pick(u, l.current), o) || null; return U(() => { - Array.isArray(t) ? s(t) : e === "javascript" && t ? Me.exec(t, {}, { getFieldValue: (u) => (l.current.includes(u) || l.current.push(u), a.getFieldValue(u)), getFieldValueForBasicForm: (u) => (l.current.includes(u) || l.current.push(u), r ? r.getFieldValue(u) : a.getFieldValue(u)) }).then((u) => { + Array.isArray(t) ? s(t) : e === "javascript" && t ? Me.exec(t, {}, { getFieldValue: (u) => (l.current.includes(u) || l.current.push(u), o.getFieldValue(u)), getFieldValueForBasicForm: (u) => (l.current.includes(u) || l.current.push(u), r ? r.getFieldValue(u) : o.getFieldValue(u)) }).then((u) => { s(pe(u, "array")); }).catch((u) => console.error("useOptions", u)) : t && s(pe(t, "array")); - }, [t, e, c]), li(o, n); -}, _a = (t) => { + }, [t, e, c]), li(a, n); +}, Jo = (t) => { const [e, n] = L(), i = { type: "GET" }; - if (typeof t == "string" ? i.url = t : f.isPlainObject(t) && Object.assign(i, t), !(i != null && i.url)) throw "url is required"; - const r = (a) => W.request(i, !1).resp((o) => (console.log("useSubscribeRequest", a), n(o), o)); + if (typeof t == "string" ? i.url = t : y.isPlainObject(t) && Object.assign(i, t), !(i != null && i.url)) throw "url is required"; + const r = (o) => W.request(i, !1).resp((a) => (console.log("useSubscribeRequest", o), n(a), a)); return mt(() => { - let a = null; - return r().then((o) => { - a = Zn.subscribe(f.throttle(r, 180, { leading: !1, trailing: !0 }), o.res); - }), () => a == null ? void 0 : a(); + let o = null; + return r().then((a) => { + o = Zn.subscribe(y.throttle(r, 180, { leading: !1, trailing: !0 }), a.res); + }), () => o == null ? void 0 : o(); }, i), e; }, Mr = (t, e) => G((n) => { const i = {}; - for (const [r, a] of Object.entries(n)) { - const o = t == null ? void 0 : t[r]; - if ((o == null ? void 0 : o.type) === "router" || (o == null ? void 0 : o.type) === "query") { - const s = ae.getCurrentRoute(); - s != null && s.uuid && ae.redirect(s.uuid, { ...ae.getPageParams(), [o.type]: { [o.value || r]: a } }, { isReplaceRouteHistory: !0 }); - } else i[r] = a; + for (const [r, o] of Object.entries(n)) { + const a = t == null ? void 0 : t[r]; + if ((a == null ? void 0 : a.type) === "router" || (a == null ? void 0 : a.type) === "query") { + const s = oe.getCurrentRoute(); + s != null && s.uuid && oe.redirect(s.uuid, { ...oe.getPageParams(), [a.type]: { [a.value || r]: o } }, { isReplaceRouteHistory: !0 }); + } else i[r] = o; } Object.keys(i).length > 0 && e(i); }, [t, e]), ci = (t, e = {}, n = {}, i = []) => { - const [r, a] = L({}), [o, s] = L({}), l = Dn(o), c = ae.usePageParams(); - en(() => { + const [r, o] = L({}), [a, s] = L({}), l = Vn(a), c = oe.usePageParams(); + Zt(() => { Promise.resolve(Tt(t, e, n)).then(s); - }, [t, e, c, ...i]), Vn(() => { - const h = l ?? {}, g = Object.keys({ ...h, ...o }).reduce((y, w) => (h[w] !== o[w] && (y[w] = o[w]), y), {}); - Object.keys(g).length > 0 && a((y) => ({ ...y, ...g })); - }, [o]); - const u = Mr(t, (h) => { - a((g) => ({ ...g, ...h })); - }), p = z(() => Object.fromEntries(Object.entries(r).filter(([h, g]) => g !== o[h])), [r, o]); + }, [t, e, c, ...i]), en(() => { + const m = l ?? {}, g = Object.keys({ ...m, ...a }).reduce((w, f) => (m[f] !== a[f] && (w[f] = a[f]), w), {}); + Object.keys(g).length > 0 && o((w) => ({ ...w, ...g })); + }, [a]); + const u = Mr(t, (m) => { + o((g) => ({ ...g, ...m })); + }), p = z(() => Object.fromEntries(Object.entries(r).filter(([m, g]) => g !== a[m])), [r, a]); return [r, u, p]; }, Vr = (t) => { const [e, n] = E.useState({ items: [], hides: [] }); return E.useEffect(() => { - t && W.get(`/api/_/${t}`).then(({ pk: i, uuid: r, code: a, resource: o, align: s, cols: l, rowHeight: c, marginX: u, marginY: p, listenChangeFields: h, listenChangeFieldsFunc: g, fields: y, theme: w, themeSetting: S, groups: b }) => ({ pk: i, uuid: r, code: a, resource: o, align: s, cols: l, rowHeight: c, marginX: u, marginY: p, theme: w, themeProps: S, groups: b, listenChangeFields: h, listenChangeFieldsFunc: g, ...y.reduce(($, k) => { - var x; - return (x = k == null ? void 0 : k.field) != null && x.hidden ? $.hides.push(k == null ? void 0 : k.field) : $.items.push(k), $; + t && W.get(`/api/_/${t}`).then(({ pk: i, uuid: r, code: o, resource: a, align: s, cols: l, rowHeight: c, marginX: u, marginY: p, listenChangeFields: m, listenChangeFieldsFunc: g, fields: w, theme: f, themeSetting: S, groups: b }) => ({ pk: i, uuid: r, code: o, resource: a, align: s, cols: l, rowHeight: c, marginX: u, marginY: p, theme: f, themeProps: S, groups: b, listenChangeFields: m, listenChangeFieldsFunc: g, ...w.reduce((P, k) => { + var $; + return ($ = k == null ? void 0 : k.field) != null && $.hidden ? P.hides.push(k == null ? void 0 : k.field) : P.items.push(k), P; }, { items: [], hides: [] }) })).then(n); }, [t]), e; -}, Dr = ({ max: t = 0, min: e = 0, type: n = "", message: i, pattern: r, required: a = !1, validator: o } = {}, s, l) => { +}, Dr = ({ max: t = 0, min: e = 0, type: n = "", message: i, pattern: r, required: o = !1, validator: a } = {}, s, l) => { const [c, u] = L([]); return U(() => { const p = []; - if (a) { - let h = l; + if (o) { + let m = l; switch (l) { case "number": case "string": case "array": break; case "bool": - h = "boolean"; + m = "boolean"; break; case "json": - h = "object"; + m = "object"; } - p.push({ type: h, required: !0, whitespace: !0, message: "该项必填" }); + p.push({ type: m, required: !0, whitespace: !0, message: "该项必填" }); } switch (n) { case "string": @@ -805,245 +805,266 @@ const Me = Jt.getInstance(), Tn = { null2json: (t) => Object.create(), null2arra p.push({ type: "string", pattern: r, message: i }); break; case "validator": - o && p.push(({ getFieldValue: h }) => ({ validator: async (g, y) => { - const w = await Me.exec(o, { value: y, fieldName: s }, { getFieldValue: h }); - return f.isString(w) && w ? Promise.reject(w) : f.isBoolean(w) && !w ? Promise.reject(i) : Promise.resolve(); + a && p.push(({ getFieldValue: m }) => ({ validator: async (g, w) => { + const f = await Me.exec(a, { value: w, fieldName: s }, { getFieldValue: m }); + return y.isString(f) && f ? Promise.reject(f) : y.isBoolean(f) && !f ? Promise.reject(i) : Promise.resolve(); } })); } u(p); - }, [t, e, n, i, r, a, o]), c; + }, [t, e, n, i, r, o, a]), c; }, Wr = (t, e, n) => { const [i, r] = L(null); return U(() => { - const { initDataUri: a = `/api/${t}`, initDataMethod: o = "GET" } = n || {}; - e && W.request({ method: o, url: f.trimEnd(`${a}/${e}`, "/") }).then((s) => { + const { initDataUri: o = `/api/${t}`, initDataMethod: a = "GET" } = n || {}; + e && W.request({ method: a, url: y.trimEnd(`${o}/${e}`, "/") }).then((s) => { r(s); }); }, [t, e, n]), i; -}, Br = (t, e, n) => G((i, r = { serialize: (a) => a, onSuccess: () => { -}, onFail: (a) => (a == null ? void 0 : a.errorFields) && re.error("请先完善表单信息", { duration: 2e3 }) }) => { - const a = i.getFieldValue("__RESOURCE__"), { submitDataUri: o = `/api/${t}`, submitDataMethod: s = "POST" } = n || {}; - return i.validateFields().then((l) => a ? f.pick(l, [a]) : l).then(r.serialize).then((l) => W.request({ method: s, url: f.trimEnd(`${o}/${e || ""}`, "/"), data: l }).msg(r.onSuccess)).catch(r.onFail); +}, Br = (t, e, n) => G((i, r = { serialize: (o) => o, onSuccess: () => { +}, onFail: (o) => (o == null ? void 0 : o.errorFields) && re.error("请先完善表单信息", { duration: 2e3 }) }) => { + const o = i.getFieldValue("__RESOURCE__"), { submitDataUri: a = `/api/${t}`, submitDataMethod: s = "POST" } = n || {}; + return i.validateFields().then((l) => o ? y.pick(l, [o]) : l).then(r.serialize).then((l) => W.request({ method: s, url: y.trimEnd(`${a}/${e || ""}`, "/"), data: l }).msg(r.onSuccess)).catch(r.onFail); }, [t, e, n]), zr = (t, e, n, i) => { const r = Wr(e, n, i); U(() => { r ? t.setFieldsValue(r) : t.resetFields(); }, [t, r]); - const a = Br(e, n, i); - return f.partial(a, t); + const o = Br(e, n, i); + return y.partial(o, t); }, Ur = (t, e, n = [], i = {}) => { - const r = J({}), a = J(), o = f.debounce(Ot(), 180), s = ["disabled", "required"], l = (h, g) => { - s.includes(h) && (r.current[h] = g), o(); - }, c = z(() => ({ setDisabled: (h) => l("disabled", h), setRequired: (h) => l("required", h), getDisabled: () => r.current.disabled, getRequired: () => r.current.required }), [e]), [u, p] = ti(e, -1, {}, c, i); - if (!p && a.current != u && (u >= 0 || !f.isEmpty(n == null ? void 0 : n[u]))) { - a.current = u; - const { widget: h, widgetPrefix: g, props: y } = n == null ? void 0 : n[u]; - t = Hn(h, g), r.current = f.merge(y, f.pick(r.current, s)); + const r = J({}), o = J(), a = y.debounce(Ot(), 180), s = ["disabled", "required"], l = (m, g) => { + s.includes(m) && (r.current[m] = g), a(); + }, c = z(() => ({ setDisabled: (m) => l("disabled", m), setRequired: (m) => l("required", m), getDisabled: () => r.current.disabled, getRequired: () => r.current.required }), [e]), [u, p] = ti(e, -1, {}, c, i); + if (!p && o.current != u && (u >= 0 || !y.isEmpty(n == null ? void 0 : n[u]))) { + o.current = u; + const { widget: m, widgetPrefix: g, props: w } = n == null ? void 0 : n[u]; + t = Hn(m, g), r.current = y.merge(w, y.pick(r.current, s)); } return [t, r.current]; -}, On = (t) => t === void 0 || t === !1 ? "" : (Array.isArray(t) ? t : [t]).join("_"), Ja = ({ value: t, onChange: e }, n = null) => { - const i = J(), [r] = oe.useForm(n), a = J({}); +}, Rn = (t) => t === void 0 || t === !1 ? "" : (Array.isArray(t) ? t : [t]).join("_"), Go = ({ value: t, onChange: e }, n = null) => { + const i = J(), [r] = ae.useForm(n), o = J({}); return Rt(() => { - f.isEqual(i.current, t) || r.setFieldsValue(t); - }, [t]), U(() => () => r.resetFields(), []), [z(() => r.__INTERNAL__ ? r : { ...r, __INTERNAL__: { itemRef: (o) => (s) => { - const l = On(o); - s ? a.current[l] = s : delete a.current[l]; - } }, scrollToField: (o, s = {}) => { + y.isEqual(i.current, t) || r.setFieldsValue(t); + }, [t]), U(() => () => r.resetFields(), []), [z(() => r.__INTERNAL__ ? r : { ...r, __INTERNAL__: { itemRef: (a) => (s) => { + const l = Rn(a); + s ? o.current[l] = s : delete o.current[l]; + } }, scrollToField: (a, s = {}) => { console.warn("useMergedFormValuesChange scrollToField not work, unreferenced antd form"); - }, focusField: (o) => { + }, focusField: (a) => { console.warn("useMergedFormValuesChange focusField not work, unreferenced antd form"); - }, getFieldInstance: (o) => { - const s = On(o); - return a.current[s]; - } }, [r]), (o, s) => { + }, getFieldInstance: (a) => { + const s = Rn(a); + return o.current[s]; + } }, [r]), (a, s) => { i.current = s, e == null || e(s); }]; -}, an = ({ widget: t = "Input", widgetPrefix: e = "@pkg/ff/grid-layout-forms", widgetDecorator: n, subWidgets: i = [], basicForm: r, ...a }) => { - const o = Hn(t, e), [s, l] = Ur(o, n, i, r), [c, u] = L(); +}, an = ({ widget: t = "Input", widgetPrefix: e = "@pkg/ff/grid-layout-forms", widgetDecorator: n, subWidgets: i = [], basicForm: r, ...o }) => { + const a = Hn(t, e), [s, l] = Ur(a, n, i, r), [c, u] = L(); return U(() => { - s && se.getWidgetComponent(s).then(({ defaultProps: p = {}, default: h }) => ({ default: qr(h, p, r) })).catch((p) => ({ default: () => `${p}` })).then((p) => u(E.createElement(p.default, a))); - }, [s]), c && E.cloneElement(c, { ...a, ...l }); + s && se.getWidgetComponent(s).then(({ defaultProps: p = {}, default: m }) => ({ default: qr(m, p, r) })).catch((p) => ({ default: () => `${p}` })).then((p) => u(E.createElement(p.default, o))); + }, [s]), c && E.cloneElement(c, { ...o, ...l }); }, qr = (t, e = {}, n = null) => (i) => { - const { type: r, code: a, label: o, noStyle: s, style: l, placeholder: c, required: u = !1, extras: p, validators: h, help: g, isVirtual: y, $isReserved: w, initialValue: S, initialValueLanguage: b, ...$ } = f.omit(f.merge({}, e, i), ["convertJs", "convertJsSetting", "widget", "widgetPerfix", "widgetDecorator", "subWidgets", "boxStyle"]), k = Dr(Object.assign({}, h, u ? { required: !0 } : {}), a, r), x = z(() => { + const { type: r, code: o, label: a, noStyle: s, style: l, placeholder: c, required: u = !1, extras: p, validators: m, help: g, isVirtual: w, $isReserved: f, initialValue: S, initialValueLanguage: b, ...P } = y.omit(y.merge({}, e, i), ["convertJs", "convertJsSetting", "widget", "widgetPerfix", "widgetDecorator", "subWidgets", "boxStyle"]), k = Dr(Object.assign({}, m, u ? { required: !0 } : {}), o, r), $ = z(() => { const V = Object.keys((e == null ? void 0 : e.extras) || {}); - return f.over([f.partialRight(f.pick, V), f.partialRight(f.omit, V)]); - }, [e == null ? void 0 : e.extras]), [F, A] = x($), O = { label: o, noStyle: s, style: l, colon: !1, layout: "vertical" }, N = G((V) => V == null ? void 0 : pe(V, r), [r]); - return m(Zt, { name: a, rules: k, initialValue: N(S), normalize: N, children: (V, P, M) => { + return y.over([y.partialRight(y.pick, V), y.partialRight(y.omit, V)]); + }, [e == null ? void 0 : e.extras]), [F, A] = $(P), O = { label: a, noStyle: s, style: l, colon: !1, layout: "vertical" }, N = G((V) => V == null ? void 0 : pe(V, r), [r]); + return h(tn, { name: o, rules: k, initialValue: N(S), normalize: N, children: (V, v, M) => { var D; - return m(t, { type: r, rcform: M, basicForm: n, itemProps: { validateStatus: P.errors.length > 0 ? "error" : "success", tooltip: g || null, help: P.errors.length > 0 ? P.errors.join("、") : null, required: ((D = k == null ? void 0 : k[0]) == null ? void 0 : D.required) || !1, ...O }, fieldProps: { placeholder: c, ...A, ...V }, $setting: Object.assign({}, p, F) }); + return h(t, { type: r, rcform: M, basicForm: n, itemProps: { validateStatus: v.errors.length > 0 ? "error" : "success", tooltip: g || null, help: v.errors.length > 0 ? v.errors.join("、") : null, required: ((D = k == null ? void 0 : k[0]) == null ? void 0 : D.required) || !1, ...O }, fieldProps: { placeholder: c, ...A, ...V }, $setting: Object.assign({}, p, F) }); } }); -}, on = ({ name: t, form: e = null, basicForm: n = null, style: i = {}, className: r, cols: a = 24, rowHeight: o = 16, itemMargin: s = [8, 16], containerPadding: l = [0, 0], fields: c = [], hides: u = [], primaryKey: p = 0, formProps: h = {}, formFields: g = [], listenChangeFields: y, listenChangeFieldsFunc: w, onValuesChange: S, theme: b, themeProps: $ = {}, groups: k = [{ key: "default", label: "默认" }], children: x, ...F }) => { - const [A] = oe.useForm(e), O = G((P, M) => { - S == null || S(P, M), w && Array.isArray(y) && Me.exec(w, { changedValues: P, allValues: M }, { getFieldValue: A.getFieldValue, setFieldValue: A.setFieldValue, setFieldsValue: A.setFieldsValue, isFieldTouched: A.isFieldTouched, isFieldsTouched: A.isFieldsTouched }).catch((D) => console.error("onFormValuesChange", t, D)); - }, [t, A, S, y, w]), N = z(() => [{ name: "__PROPS__", value: h }, { name: "__PRIMARY_KEY__", value: p }].concat(g), [p, h, g]), V = (P, M, D) => { - const B = nn(M, an, n), X = Yn(F); - return I("div", { ...X, className: j("ff-grid-layout-form", r), style: { ...i, "--grid-layout-item-margin-x": `${(s == null ? void 0 : s[0]) ?? 8}px`, "--grid-layout-item-margin-y": `${(s == null ? void 0 : s[1]) ?? 16}px`, "--grid-layout-container-padding-y": `${(l == null ? void 0 : l[0]) || 0}px`, "--grid-layout-container-padding-x": `${(l == null ? void 0 : l[1]) || 0}px`, "--grid-layout-cols": a, "--grid-layout-row-height": `${o}px` }, children: [B, D && E.cloneElement(D, { cols: a, rowHeight: o, itemMargin: s, containerPadding: l, fields: M, basicForm: n })] }); +}, sn = ({ name: t, form: e = null, basicForm: n = null, style: i = {}, className: r, cols: o = 24, rowHeight: a = 16, itemMargin: s = [8, 16], containerPadding: l = [0, 0], fields: c = [], hides: u = [], primaryKey: p = 0, formProps: m = {}, formFields: g = [], listenChangeFields: w, listenChangeFieldsFunc: f, onValuesChange: S, theme: b, themeProps: P = {}, groups: k = [{ key: "default", label: "默认" }], children: $, ...F }) => { + const [A] = ae.useForm(e), O = G((v, M) => { + S == null || S(v, M), f && Array.isArray(w) && Me.exec(f, { changedValues: v, allValues: M }, { getFieldValue: A.getFieldValue, setFieldValue: A.setFieldValue, setFieldsValue: A.setFieldsValue, isFieldTouched: A.isFieldTouched, isFieldsTouched: A.isFieldsTouched }).catch((D) => console.error("onFormValuesChange", t, D)); + }, [t, A, S, w, f]), N = z(() => [{ name: "__PROPS__", value: m }, { name: "__PRIMARY_KEY__", value: p }].concat(g), [p, m, g]), V = (v, M, D) => { + const B = rn(M, an, n), Q = Yn(F); + return I("div", { ...Q, className: j("ff-grid-layout-form", r), style: { ...i, "--grid-layout-item-margin-x": `${(s == null ? void 0 : s[0]) ?? 8}px`, "--grid-layout-item-margin-y": `${(s == null ? void 0 : s[1]) ?? 16}px`, "--grid-layout-container-padding-y": `${(l == null ? void 0 : l[0]) || 0}px`, "--grid-layout-container-padding-x": `${(l == null ? void 0 : l[1]) || 0}px`, "--grid-layout-cols": o, "--grid-layout-row-height": `${a}px` }, children: [B, D && E.cloneElement(D, { cols: o, rowHeight: a, itemMargin: s, containerPadding: l, fields: M, basicForm: n })] }); }; - return I(oe, { ...F, form: A, fields: N, onValuesChange: O, children: [b ? m(ni, { ...$, items: k, theme: b, itemRender: V, fields: c, children: x, basicForm: n }) : V(0, c, x), u == null ? void 0 : u.map((P) => { + return I(ae, { ...F, form: A, fields: N, onValuesChange: O, children: [b ? h(ni, { ...P, items: k, theme: b, itemRender: V, fields: c, children: $, basicForm: n }) : V(0, c, $), u == null ? void 0 : u.map((v) => { var M; - return m(Zt, { name: P.code, children: m(Kr, { form: A, basicForm: n, name: P.code, type: P.type, initialValue: P.initialValue, initialValueLanguage: (M = P.extras) == null ? void 0 : M.initialValueLanguage }) }, JSON.stringify(P.code)); + return h(tn, { name: v.code, children: h(Kr, { form: A, basicForm: n, name: v.code, type: v.type, initialValue: v.initialValue, initialValueLanguage: (M = v.extras) == null ? void 0 : M.initialValueLanguage }) }, JSON.stringify(v.code)); })] }); }, Kr = ({ type: t, initialValue: e, initialValueLanguage: n, onChange: i, basicForm: r }) => { - const [a, o] = ti(n == "javascript" && e, n == "javascript" ? void 0 : e, {}, {}, r); + const [o, a] = ti(n == "javascript" && e, n == "javascript" ? void 0 : e, {}, {}, r); return U(() => { - n == "javascript" ? i(pe(a, t)) : e && i(pe(e, t)); - }, [t, e, a]), null; + n == "javascript" ? i(pe(o, t)) : e && i(pe(e, t)); + }, [t, e, o]), null; }; -on.propTypes = { fields: C.array, hides: C.array }; +sn.propTypes = { fields: C.array, hides: C.array }; const Hr = /* @__PURE__ */ ((t) => ({ code: e, isPreview: n = !1, ...i }) => { - const { align: r, autoComplete: a, resource: o, items: s, hides: l, rowHeight: c, marginX: u, marginY: p, cols: h, listenChangeFields: g, listenChangeFieldsFunc: y, pk: w, uuid: S, theme: b, themeProps: $, groups: k } = Vr(e), x = z(() => [{ name: "__PK__", value: w }, { name: "__RESOURCE__", value: o }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: S }], [w, e, S, o]); - return m(t, { name: e, autoComplete: a, theme: b, themeProps: $, groups: k, ...i, formFields: x, listenChangeFields: g, listenChangeFieldsFunc: y, fields: s, hides: l, cols: h, rowHeight: c, itemMargin: [u, p] }); -})(on), di = ({ $setting: t, $close: e, extras: n, code: i, primaryKey: r, ...a }) => { - const [o] = oe.useForm(), s = zr(o, i, r, t); - return m(te, { actions: I(E.Fragment, { children: [m(R, { name: (t == null ? void 0 : t.okText) || "保存", type: "primary", widget: () => s({ onSuccess: e }) }), m(R, { name: (t == null ? void 0 : t.cancelText) || "取消", widget: () => e(!1) })] }), extras: n, children: m(Hr, { form: o, code: i, primaryKey: r, ...a }) }); -}, Rn = /* @__PURE__ */ new Set(), Yt = (t = [], e = 0) => { + const { align: r, autoComplete: o, resource: a, items: s, hides: l, rowHeight: c, marginX: u, marginY: p, cols: m, listenChangeFields: g, listenChangeFieldsFunc: w, pk: f, uuid: S, theme: b, themeProps: P, groups: k } = Vr(e), $ = z(() => [{ name: "__PK__", value: f }, { name: "__RESOURCE__", value: a }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: S }], [f, e, S, a]); + return h(t, { name: e, autoComplete: o, theme: b, themeProps: P, groups: k, ...i, formFields: $, listenChangeFields: g, listenChangeFieldsFunc: w, fields: s, hides: l, cols: m, rowHeight: c, itemMargin: [u, p] }); +})(sn), di = ({ $setting: t, $close: e, extras: n, code: i, primaryKey: r, ...o }) => { + const [a] = ae.useForm(), s = zr(a, i, r, t); + return h(ne, { actions: I(E.Fragment, { children: [h(R, { name: (t == null ? void 0 : t.okText) || "保存", type: "primary", widget: () => s({ onSuccess: e }) }), h(R, { name: (t == null ? void 0 : t.cancelText) || "取消", widget: () => e(!1) })] }), extras: n, children: h(Hr, { form: a, code: i, primaryKey: r, ...o }) }); +}, Fn = /* @__PURE__ */ new Set(), Yt = (t = [], e = 0) => { const n = t[e]; - if (n.length && !Rn.has(n)) { + if (n.length && !Fn.has(n)) { const i = document.createElement("script"); i.setAttribute("src", n), i.setAttribute("data-namespace", n), t.length > e + 1 && (i.onload = () => { Yt(t, e + 1); }, i.onerror = () => { Yt(t, e + 1); - }), Rn.add(n), document.body.appendChild(i); + }), Fn.add(n), document.body.appendChild(i); } -}, Et = ({ className: t, type: e, style: n = {}, ...i }) => m("span", { role: "img", className: j("ff-iconfont", t), style: n, ...i, children: m("svg", { style: { width: "1em", height: "1em", fill: "currentColor", overflow: "hidden" }, viewBox: "0 0 1024 1024", children: m("use", { xlinkHref: `#${e}` }) }) }); +}, Et = ({ className: t, type: e, style: n = {}, ...i }) => h("span", { role: "img", className: j("ff-iconfont", t), style: n, ...i, children: h("svg", { style: { width: "1em", height: "1em", fill: "currentColor", overflow: "hidden" }, viewBox: "0 0 1024 1024", children: h("use", { xlinkHref: `#${e}` }) }) }); Et.propTypes = { className: C.string, type: C.string.isRequired, style: C.object }, Et.init = Yt; -const _r = (t, e, n, i) => ae.redirect(n, e, i), Jr = (t, e = {}, n, i = {}) => { - var a; - const r = (a = i.router) == null ? void 0 : a.reduce((o, [s, l, c]) => { - const u = f.get(e, ["router", s]); +const _r = (t, e, n, i) => oe.redirect(n, e, i), Jr = (t, e = {}, n, i = {}) => { + var o; + const r = (o = i.router) == null ? void 0 : o.reduce((a, [s, l, c]) => { + const u = y.get(e, ["router", s]); if (!u && u !== 0 && l) throw `请传入 ${c}`; - return `${o}/${u}`; + return `${a}/${u}`; }, `/api/${n}`); return W.del(r, e.param).msg(); -}, Fn = (t, e, n, { status: { loading: i, disabled: r }, setStatus: a, listFn: o }) => { - const s = { loading: (l) => l === void 0 ? i : a((c) => ({ ...c, loading: l })), disabled: (l) => l === void 0 ? r : a((c) => ({ ...c, disabled: l })), list: o }; - return f.isFunction(n) ? n.call(null, e, s) : f.isString(n) && n ? Me.exec(n, e, s) : null; -}, jn = (t, e, n, i, r) => f.isString(n) && n ? se.getWidgetComponent(n).then(({ default: a }) => re.modal(a, { ...e, $setting: i }, r != null && r.title ? { ...r, title: f.template(r.title)(t) } : r)).catch((a) => { - re.error(n, { content: a.toString() }); -}) : re.modal(n, { ...e, $setting: i }, r != null && r.title ? { ...r, title: f.template(r.title)(t) } : r), Gr = (t, e, n, i, r) => re.modal(di, { ...e, $setting: i, code: n }, r != null && r.title ? { ...r, title: f.template(r.title)(t) } : r), Yr = (t, e, n, i, r) => re.modal(rn, { ...i, base62params: e, listCode: n }, r != null && r.title ? { ...r, title: f.template(r.title)(t) } : r), Xr = ({ widget: t, widgetType: e, widgetData: n, widgetProps: i, widgetSetting: r, widgetContainerProps: a }, { onAfterClick: o, onBeforeClick: s } = {}) => { - const l = ge(le), [c, u] = L({ leading: !0, trailing: !1 }), p = z(() => { +}, jn = (t, e, n, { status: { loading: i, disabled: r }, setStatus: o, listFn: a }) => { + const s = { loading: (l) => l === void 0 ? i : o((c) => ({ ...c, loading: l })), disabled: (l) => l === void 0 ? r : o((c) => ({ ...c, disabled: l })), list: a }; + return y.isFunction(n) ? n.call(null, e, s) : y.isString(n) && n ? Me.exec(n, e, s) : null; +}, An = (t, e, n, i, r) => y.isString(n) && n ? se.getWidgetComponent(n).then(({ default: o }) => re.modal(o, { ...e, $setting: i }, r != null && r.title ? { ...r, title: y.template(r.title)(t) } : r)).catch((o) => { + re.error(n, { content: o.toString() }); +}) : re.modal(n, { ...e, $setting: i }, r != null && r.title ? { ...r, title: y.template(r.title)(t) } : r), Gr = (t, e, n, i, r) => re.modal(di, { ...e, $setting: i, code: n }, r != null && r.title ? { ...r, title: y.template(r.title)(t) } : r), Yr = (t, e, n, i, r) => re.modal(on, { ...i, base62params: e, listCode: n }, r != null && r.title ? { ...r, title: y.template(r.title)(t) } : r), Xr = ({ widget: t, widgetType: e, widgetData: n, widgetProps: i, widgetSetting: r, widgetContainerProps: o }, { onAfterClick: a, onBeforeClick: s } = {}) => { + const l = ge(le), [c, u] = L({ leading: !0, trailing: !1 }), p = J(null), [m, g] = z(() => { switch (e) { case "redirect": - return f.partialRight(_r, t, r); + return [y.partialRight(_r, t, r), null]; case "func": - return f.partialRight(Fn, (r == null ? void 0 : r.code) ?? t, { status: c, setStatus: u, listFn: l }); + return [y.partialRight(jn, (r == null ? void 0 : r.code) ?? t, { status: c, setStatus: u, listFn: l }), null]; case "component": case "fsdpf-component": - return f.partialRight(jn, t, r, a); + return [y.partialRight(An, t, r, o), (f) => ({ $setting: f })]; case "grid-layout-form": - return f.partialRight(Gr, t, r, a); + return [y.partialRight(Gr, t, r, o), (f) => ({ $setting: f })]; case "data-list": - return f.partialRight(Yr, t, r, a); + return [y.partialRight(Yr, t, r, o), (f) => f]; case "destroy": - return f.partialRight(Jr, t, r, a); + return [y.partialRight(Jr, t, r, o), null]; default: - if (ln(t) || E.isValidElement(t)) return f.partialRight(jn, t, r, a); - if (f.isFunction(t)) return f.partialRight(Fn, (r == null ? void 0 : r.code) || t, { status: c, setStatus: u }); + if (cn(t) || E.isValidElement(t)) return [y.partialRight(An, t, r, o), (f) => ({ $setting: f })]; + if (y.isFunction(t)) return [y.partialRight(jn, (r == null ? void 0 : r.code) || t, { status: c, setStatus: u }), null]; } - return (...h) => console.error("useButton unknown widgetType", e, ...h); - }, [t, e, r, a, l.getBase62params, l.getSelectedRows]); - return [f.debounce((h) => (s == null || s(h), Promise.resolve(Tt(i, h, { list: l })).then((g) => p(h, { ...n, ...g })).then((g) => o == null ? void 0 : o(g)).catch(console.error)), 300, { leading: !0, trailing: !1 }), c]; -}, ui = ({ type: t, name: e, className: n, icon: i, iconPosition: r, size: a }, o = "default") => z(() => { - const s = { type: "primary", className: j("ff-button", n), iconPosition: r, size: a }; - return t === "danger" ? s.danger = !0 : t === "default" && (s.type = t), o === "link" || o === "dashed" ? (s.type = o, t === "default" && (s.className = j(s.className, "ff-default"))) : o !== "circle" && o !== "round" || (s.shape = o), i && (s.icon = m(Et, { type: i })), e && (s.children = e), s; -}, [o, t, n, i, r]), Ft = ({ data: t, widget: e, widgetType: n = "fsdpf-component", widgetData: i, widgetProps: r, widgetSetting: a, widgetContainerProps: o, onAfterClick: s, onBeforeClick: l, children: c, extras: u }) => { - const p = ge(le), [h, g] = L(!1), [y, w] = L("hover"), [S, b] = ci(r, t, { list: p }, [p.getBase62params, p.getSelectedRows]), [$, k] = L(), { placement: x, align: F, zIndex: A, arrow: O = { pointAtCenter: !0 }, getPopupContainer: N, isPopupMountBodyContainer: V = !0, ...P } = o || {}; + return [(...f) => console.error("useButton unknown widgetType", e, ...f), null]; + }, [t, e, r, o, l.getBase62params, l.getSelectedRows]), w = y.debounce((f) => (s == null || s(f), Promise.resolve(Tt(i, f, { list: l })).then((S) => { + const b = m(f, { ...n, ...S }); + return b != null && b.update && g && (p.current = (P, k) => b.update(g(P), k)), b; + }).then((S) => a == null ? void 0 : a(S)).catch(console.error)), 300, { leading: !0, trailing: !1 }); + return en(() => { + var f; + (f = p.current) == null || f.call(p, r, o); + }, [r, o]), [w, c]; +}, ui = ({ type: t, name: e, className: n, icon: i, iconPosition: r, size: o }, a = "default") => z(() => { + const s = { type: "primary", className: j("ff-button", n), iconPosition: r, size: o }; + return t === "danger" ? s.danger = !0 : t === "default" && (s.type = t), a === "link" || a === "dashed" ? (s.type = a, t === "default" && (s.className = j(s.className, "ff-default"))) : a !== "circle" && a !== "round" || (s.shape = a), i && (s.icon = h(Et, { type: i })), e && (s.children = e), s; +}, [a, t, n, i, r]), Ft = ({ data: t, widget: e, widgetType: n = "fsdpf-component", widgetData: i, widgetProps: r, widgetSetting: o, widgetContainerProps: a, onAfterClick: s, onBeforeClick: l, children: c, extras: u }) => { + const p = ge(le), [m, g] = L(!1), [w, f] = L("hover"), [S, b] = ci(r, t, { list: p }, [p.getBase62params, p.getSelectedRows]), [P, k] = L(), { placement: $, align: F, zIndex: A, arrow: O = { pointAtCenter: !0 }, getPopupContainer: N, isPopupMountBodyContainer: V = !0, ...v } = a || {}; U(() => { - n == "grid-layout-form" ? k(E.createElement(di, { ...i, $setting: a, code: e })) : n == "data-list" ? k(E.createElement(rn, { base62params: t, $setting: a, listCode: e })) : f.isString(e) ? se.getWidgetComponent(e).then(({ default: B }) => { - k(E.createElement(B, { ...i, $setting: a })); - }).catch((B) => k(B.toString())) : E.isValidElement(e) ? k(E.cloneElement(e, { ...i, $setting: a })) : (ln(e) || f.isFunction(e) && ["component", "fsdpf-component"].includes(n)) && k(E.createElement(e, { ...i, $setting: a })); + n == "grid-layout-form" ? k(E.createElement(di, { ...i, $setting: o, code: e })) : n == "data-list" ? k(E.createElement(on, { base62params: t, $setting: o, listCode: e })) : y.isString(e) ? se.getWidgetComponent(e).then(({ default: B }) => { + k(E.createElement(B, { ...i, $setting: o })); + }).catch((B) => k(B.toString())) : E.isValidElement(e) ? k(E.cloneElement(e, { ...i, $setting: o })) : (cn(e) || y.isFunction(e) && ["component", "fsdpf-component"].includes(n)) && k(E.createElement(e, { ...i, $setting: o })); }, [e, n, i]); - const M = (B, X = !1) => (g(B), !B && w("hover"), B ? l == null ? void 0 : l(S) : s == null ? void 0 : s(X)), D = (B) => { - g(!0), w("click"); + const M = (B, Q = !1) => (g(B), !B && f("hover"), B ? l == null ? void 0 : l(S) : s == null ? void 0 : s(Q)), D = (B) => { + g(!0), f("click"); }; - return m(_i, { zIndex: A, placement: x, onPopupClick: D, onClick: D, open: h, align: F, arrow: O, trigger: y, getPopupContainer: N || V ? void 0 : (B) => B, content: m(Qr, { ...P, extras: u, children: $ && E.cloneElement($, { ...S, $setProps: b, $close: (B) => M(!1, B) }) }), children: c, onOpenChange: M }); -}, Qr = ({ title: t, className: e, classNames: n, children: i, extras: r, width: a, height: o, ...s }) => { - const [l, c] = L({}), u = G((y, w) => c((S) => ({ ...S, [y]: w })), []), p = G((y) => c((w) => ({ ...w, [y]: void 0 })), []), h = t ? E.createElement("div", { className: "ff-popup-title" }, t) : l == null ? void 0 : l.title, g = r ?? E.createElement("div", { className: "ff-popup-reserved-extras" }, r); - return m(ht.Provider, { value: { ele: l, mount: u, unmount: p }, children: I("div", { className: j("ff-popup ff-popover", e, l.rootClassName), style: { width: a ?? 260, height: o }, ...s, children: [I("div", { className: j("ff-popup-header", "ff-popover-header", n == null ? void 0 : n.header), children: [h, l == null ? void 0 : l["sub-title"]] }), m("div", { className: j("ff-popup-body", "ff-popover-body", n == null ? void 0 : n.body), children: i }), I("div", { className: j("ff-popup-footer", "ff-popover-footer", n == null ? void 0 : n.footer), children: [g, l == null ? void 0 : l.extras, l == null ? void 0 : l.actions] })] }) }); + return h(_i, { zIndex: A, placement: $, onPopupClick: D, onClick: D, open: m, align: F, arrow: O, trigger: w, getPopupContainer: N || V ? void 0 : (B) => B, content: h(Qr, { ...v, extras: u, children: P && E.cloneElement(P, { ...S, $setProps: b, $close: (B) => M(!1, B) }) }), children: c, onOpenChange: M }); +}, Qr = ({ title: t, className: e, classNames: n, children: i, extras: r, width: o, height: a, ...s }) => { + const [l, c] = L({}), u = G((w, f) => c((S) => ({ ...S, [w]: f })), []), p = G((w) => c((f) => ({ ...f, [w]: void 0 })), []), m = t ? E.createElement("div", { className: "ff-popup-title" }, t) : l == null ? void 0 : l.title, g = r ?? E.createElement("div", { className: "ff-popup-reserved-extras" }, r); + return h(ht.Provider, { value: { ele: l, mount: u, unmount: p }, children: I("div", { className: j("ff-popup ff-popover", e, l.rootClassName), style: { width: o ?? 260, height: a }, ...s, children: [I("div", { className: j("ff-popup-header", "ff-popover-header", n == null ? void 0 : n.header), children: [m, l == null ? void 0 : l["sub-title"]] }), h("div", { className: j("ff-popup-body", "ff-popover-body", n == null ? void 0 : n.body), children: i }), I("div", { className: j("ff-popup-footer", "ff-popover-footer", n == null ? void 0 : n.footer), children: [g, l == null ? void 0 : l.extras, l == null ? void 0 : l.actions] })] }) }); }; Ft.propTypes = { widgetType: C.oneOf(["fsdpf-component", "grid-layout-form", "data-list"]) }; -const ft = (t) => function({ className: e, variant: n, children: i, name: r, icon: a, type: o = "default", iconPosition: s = "start", noAuthType: l, onAfterClick: c, onBeforeClick: u, data: p, loading: h, disabled: g, tooltip: y, confirm: w, widget: S = () => { -}, widgetType: b, widgetData: $, widgetProps: k, widgetSetting: x, widgetContainerProps: F, ...A }) { - const { mode: O, ...N } = F || {}, V = ui({ className: e, name: r, type: o, icon: a, iconPosition: s }, n ?? t), P = m(kt, { ...V, ...A, children: i || r }); - if (O === "popover" && !["destroy", "redirect", "func"].includes(b)) return m(Ft, { data: p, widget: S, widgetType: b, widgetData: $, widgetProps: k, widgetSetting: x, widgetContainerProps: N, onAfterClick: c, onBeforeClick: u, children: P }); - const M = f.isEmpty(y) || !y.enabled ? {} : y, D = f.isEmpty(w) ? { enabled: !1 } : Object.assign({ enabled: !0 }, w), [B, X] = L(!1), [xe, { disabled: q, loading: ce }] = Xr({ widget: S, widgetType: b, widgetData: $, widgetProps: k, widgetSetting: x, widgetContainerProps: N }, { onAfterClick: c, onBeforeClick: u }); - return m(Ji, { okText: "确定", cancelText: "取消", getPopupContainer: (H) => H, ...D, disabled: q || g, open: B, onOpenChange: (H) => { - if (!H) return X(H); - D.enabled ? X(H) : xe(p); +const ft = (t) => function({ className: e, variant: n, children: i, name: r, icon: o, type: a = "default", iconPosition: s = "start", noAuthType: l, onAfterClick: c, onBeforeClick: u, data: p, loading: m, disabled: g, tooltip: w, confirm: f, widget: S = () => { +}, widgetType: b, widgetData: P, widgetProps: k, widgetSetting: $, widgetContainerProps: F, ...A }) { + const { mode: O, ...N } = F || {}, V = ui({ className: e, name: r, type: a, icon: o, iconPosition: s }, n ?? t), v = h(kt, { ...V, ...A, children: i || r }); + if (O === "popover" && !["destroy", "redirect", "func"].includes(b)) return h(Ft, { data: p, widget: S, widgetType: b, widgetData: P, widgetProps: k, widgetSetting: $, widgetContainerProps: N, onAfterClick: c, onBeforeClick: u, children: v }); + const M = y.isEmpty(w) || !w.enabled ? {} : w, D = y.isEmpty(f) ? { enabled: !1 } : Object.assign({ enabled: !0 }, f), [B, Q] = L(!1), [Pe, { disabled: q, loading: ce }] = Xr({ widget: S, widgetType: b, widgetData: P, widgetProps: k, widgetSetting: $, widgetContainerProps: N }, { onAfterClick: c, onBeforeClick: u }); + return h(Ji, { okText: "确定", cancelText: "取消", getPopupContainer: (H) => H, ...D, disabled: q || g, open: B, onOpenChange: (H) => { + if (!H) return Q(H); + D.enabled ? Q(H) : Pe(p); }, onConfirm: (H) => { - xe(p, H); + Pe(p, H); }, onClick: (H) => { H.stopPropagation(); - }, children: m(Gi, { getPopupContainer: (H) => H, ...M, title: B ? null : M == null ? void 0 : M.title, trigger: ["hover", "click"], children: E.cloneElement(P, { loading: ce || h, disabled: q || g }) }) }); + }, children: h(Gi, { getPopupContainer: (H) => H, ...M, title: B ? null : M == null ? void 0 : M.title, trigger: ["hover", "click"], children: E.cloneElement(v, { loading: ce || m, disabled: q || g }) }) }); }, R = ft("default"); R.propTypes = { type: C.oneOf(["primary", "default", "danger", ""]), size: C.oneOf(["large", "middle", "small"]), name: C.string, icon: C.string, iconPosition: C.oneOf(["start", "end"]), data: C.any, widget: C.any, widgetType: C.oneOf(["destroy", "redirect", "func", "component", "fsdpf-component", "grid-layout-form", "grid-layout", "data-list"]), widgetData: C.object, widgetProps: C.object, widgetSetting: C.object, widgetContainerProps: C.object, tooltip: C.exact({ title: C.string.isRequired, placement: C.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: C.oneOfType([C.bool, C.number]), getPopupContainer: C.func }), confirm: C.exact({ title: C.string.isRequired, cancelText: C.string, okText: C.string, okType: C.oneOf(["primary", "default", "danger", ""]), placement: C.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: C.oneOfType([C.bool, C.number]), getPopupContainer: C.func, arrow: C.oneOfType([C.bool, C.exact({ pointAtCenter: C.bool })]) }) }; -const Zr = ft("link"), ea = ft("circle"), ta = ft("round"), na = ft("dashed"), An = ({ options: t = [], triggerWeights: e = ["grid-layout-form", "grid-layout", "fsdpf-component", "print"], onAfterClick: n = (g, y, w) => { -}, onBeforeClick: i = (g, y, w) => { -}, labelVariant: r = "link", labelSize: a, labelRender: o, btnVariant: s, btnSize: l, btnRender: c = (g, y) => m(R, { ...g, data: y }, g.uuid || Dt()), widgetContainerProps: u = {}, children: p, data: h }) => { - if (f.isEmpty(t)) return p; - l ?? (l = a), s ?? (s = r); - const [g, y] = z(() => (t || []).reduce((b, $) => { - const k = e.indexOf($.widgetType); - return k === -1 ? b[1].push($) : b[0] ? k < e.indexOf(b[0].widgetType) ? (b[1].push(b[0]), b[0] = $) : b[1].push($) : b[0] = $, b; +const Zr = ft("link"), eo = ft("circle"), to = ft("round"), no = ft("dashed"), In = ({ options: t = [], triggerWeights: e = ["grid-layout-form", "grid-layout", "fsdpf-component", "print"], onAfterClick: n = (g, w, f) => { +}, onBeforeClick: i = (g, w, f) => { +}, labelVariant: r = "link", labelSize: o, labelRender: a, btnVariant: s, btnSize: l, btnRender: c = (g, w) => h(R, { ...g, data: w }, g.uuid || Dt()), widgetContainerProps: u = {}, children: p, data: m }) => { + if (y.isEmpty(t)) return p; + l ?? (l = o), s ?? (s = r); + const [g, w] = z(() => (t || []).reduce((b, P) => { + const k = e.indexOf(P.widgetType); + return k === -1 ? b[1].push(P) : b[0] ? k < e.indexOf(b[0].widgetType) ? (b[1].push(b[0]), b[0] = P) : b[1].push(P) : b[0] = P, b; }, [null, []]), [t, e]); - o ? p = o(g, h) || p : p || (p = m(kt, { ...ui(Object.assign(g != null && g.name || g != null && g.icon ? {} : { icon: "icon-location" }, g, { size: a }), r) })); - const w = y.map((b) => c(Object.assign({ uuid: b.uuid, type: b.type, name: b.name, widget: b.widget, widgetType: b.widgetType, widgetProps: b.widgetProps, widgetData: b.widgetData, widgetSetting: b.widgetSetting, widgetContainerProps: b.widgetContainerSetting, confirm: b.confirm, onAfterClick: f.partialRight(n, b, h), onBeforeClick: f.partialRight(i, b, h) }, { size: l, variant: s }), h)); - let S = w; - return (w == null ? void 0 : w.length) > 1 && (S = s == "link" ? m(Bt, { split: m(Yi, { type: "vertical" }), size: l, children: w }) : m(Bt.Compact, { size: l, children: w })), g ? m(Ft, { widget: g == null ? void 0 : g.widget, widgetType: g == null ? void 0 : g.widgetType, widgetProps: g == null ? void 0 : g.widgetProps, widgetSetting: g == null ? void 0 : g.widgetSetting, widgetContainerProps: Object.assign({}, u, g == null ? void 0 : g.widgetContainerProps), data: h, widgetData: g == null ? void 0 : g.widgetData, extras: S, onAfterClick: f.partialRight(n, g, h), onBeforeClick: f.partialRight(i, g, h), children: p }) : S; + a ? p = a(g, m) || p : p || (p = h(kt, { ...ui(Object.assign(g != null && g.name || g != null && g.icon ? {} : { icon: "icon-location" }, g, { size: o }), r) })); + const f = w.map((b) => c(Object.assign({ uuid: b.uuid, type: b.type, name: b.name, widget: b.widget, widgetType: b.widgetType, widgetProps: b.widgetProps, widgetData: b.widgetData, widgetSetting: b.widgetSetting, widgetContainerProps: b.widgetContainerSetting, confirm: b.confirm, onAfterClick: y.partialRight(n, b, m), onBeforeClick: y.partialRight(i, b, m) }, { size: l, variant: s }), m)); + let S = f; + return (f == null ? void 0 : f.length) > 1 && (S = s == "link" ? h(Bt, { split: h(Yi, { type: "vertical" }), size: l, children: f }) : h(Bt.Compact, { size: l, children: f })), g ? h(Ft, { widget: g == null ? void 0 : g.widget, widgetType: g == null ? void 0 : g.widgetType, widgetProps: g == null ? void 0 : g.widgetProps, widgetSetting: g == null ? void 0 : g.widgetSetting, widgetContainerProps: Object.assign({}, u, g == null ? void 0 : g.widgetContainerProps), data: m, widgetData: g == null ? void 0 : g.widgetData, extras: S, onAfterClick: y.partialRight(n, g, m), onBeforeClick: y.partialRight(i, g, m), children: p }) : S; }; -An.propTypes = { triggerWeights: C.array, options: C.arrayOf(C.shape({ ...R.propTypes, widgetType: R.propTypes.widgetType.isRequired })), btnSize: R.propTypes.size, btnRender: C.func, btnVariant: C.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelVariant: C.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelRender: C.func, labelSize: R.propTypes.size, onAfterClick: C.func, onBeforeClick: C.func, widgetContainerProps: R.propTypes.widgetContainerProps, data: R.propTypes.data }, R.Link = Zr, R.Link.defaultProps = R.defaultProps, R.Link.propTypes = R.propTypes, R.Circle = ea, R.Circle.defaultProps = R.defaultProps, R.Circle.propTypes = R.propTypes, R.Round = ta, R.Round.defaultProps = R.defaultProps, R.Round.propTypes = R.propTypes, R.Dashed = na, R.Dashed.defaultProps = R.defaultProps, R.Dashed.propTypes = R.propTypes, R.Popover = Ft, R.GroupPopover = An; -const ia = ({ fields: t, formProps: e, $close: n }) => { - const [i] = oe.useForm(), r = z(() => [{ name: "__PROPS__", value: e }], [e]); - return m(te, { actions: I(E.Fragment, { children: [m(R, { name: "取消", widget: () => n(!1) }), m(R, { name: "确定", type: "primary", widget: () => i.validateFields(!0).then(n) })] }), children: m(oe, { fields: r, form: i, className: "ff-modal-form", children: t == null ? void 0 : t.map(({ code: a, ...o }) => m(an, { code: a, ...o }, a)) }) }); -}, ra = ({ className: t, classNames: e, $close: n, children: i, title: r, subTitle: a, actions: o, extras: s, ...l }) => I(ir, { ...l, prefixCls: "ff-drawer", className: j("ff-popup", t), maskMotion: { motionAppear: !0, motionName: "mask-motion" }, motion: (c) => ({ motionAppear: !0, motionName: `panel-motion-${c}` }), children: [I("div", { className: j("ff-popup-header", "ff-drawer-header", e == null ? void 0 : e.header), children: [m("button", { "aria-label": "Close", className: j("ff-popup-close", "ff-drawer-close", e == null ? void 0 : e.close), onClick: l.onClose, children: m(tn, { type: "close" }) }), r, a] }), m("div", { className: j("ff-popup-body", "ff-drawer-body", e == null ? void 0 : e.body), children: i }), I("div", { className: j("ff-popup-footer", "ff-drawer-footer", e == null ? void 0 : e.footer), children: [s, o] })] }), aa = ({ className: t, classNames: e, $close: n, $event: i, children: r, title: a, subTitle: o, actions: s, extras: l, placement: c, ...u }) => { - const { style: p, rest: h } = ((y, w = ["height", "width", "style"]) => { - const S = { ...y }, b = {}; - for (const $ of w) $ === "style" ? Object.assign(b, S.style) : S[$] !== void 0 && (b[$] = S[$]), delete S[$]; +In.propTypes = { triggerWeights: C.array, options: C.arrayOf(C.shape({ ...R.propTypes, widgetType: R.propTypes.widgetType.isRequired })), btnSize: R.propTypes.size, btnRender: C.func, btnVariant: C.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelVariant: C.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelRender: C.func, labelSize: R.propTypes.size, onAfterClick: C.func, onBeforeClick: C.func, widgetContainerProps: R.propTypes.widgetContainerProps, data: R.propTypes.data }, R.Link = Zr, R.Link.defaultProps = R.defaultProps, R.Link.propTypes = R.propTypes, R.Circle = eo, R.Circle.defaultProps = R.defaultProps, R.Circle.propTypes = R.propTypes, R.Round = to, R.Round.defaultProps = R.defaultProps, R.Round.propTypes = R.propTypes, R.Dashed = no, R.Dashed.defaultProps = R.defaultProps, R.Dashed.propTypes = R.propTypes, R.Popover = Ft, R.GroupPopover = In; +const io = ({ fields: t, formProps: e, $close: n }) => { + const [i] = ae.useForm(), r = z(() => [{ name: "__PROPS__", value: e }], [e]); + return h(ne, { actions: I(E.Fragment, { children: [h(R, { name: "取消", widget: () => n(!1) }), h(R, { name: "确定", type: "primary", widget: () => i.validateFields(!0).then(n) })] }), children: h(ae, { fields: r, form: i, className: "ff-modal-form", children: t == null ? void 0 : t.map(({ code: o, ...a }) => h(an, { code: o, ...a }, o)) }) }); +}, ro = ({ className: t, classNames: e, $close: n, children: i, title: r, subTitle: o, actions: a, extras: s, ...l }) => I(ir, { ...l, prefixCls: "ff-drawer", className: j("ff-popup", t), maskMotion: { motionAppear: !0, motionName: "mask-motion" }, motion: (c) => ({ motionAppear: !0, motionName: `panel-motion-${c}` }), children: [I("div", { className: j("ff-popup-header", "ff-drawer-header", e == null ? void 0 : e.header), children: [h("button", { "aria-label": "Close", className: j("ff-popup-close", "ff-drawer-close", e == null ? void 0 : e.close), onClick: l.onClose, children: h(nn, { type: "close" }) }), r, o] }), h("div", { className: j("ff-popup-body", "ff-drawer-body", e == null ? void 0 : e.body), children: i }), I("div", { className: j("ff-popup-footer", "ff-drawer-footer", e == null ? void 0 : e.footer), children: [s, a] })] }), oo = ({ className: t, classNames: e, $close: n, $event: i, children: r, title: o, subTitle: a, actions: s, extras: l, placement: c, ...u }) => { + const { style: p, rest: m } = ((w, f = ["height", "width", "style"]) => { + const S = { ...w }, b = {}; + for (const P of f) P === "style" ? Object.assign(b, S.style) : S[P] !== void 0 && (b[P] = S[P]), delete S[P]; return { style: b, rest: S }; })(u), g = (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 m(rr, { ...h, ...g, prefixCls: "ff-modal", className: j("ff-popup", t), modalRender: () => I(E.Fragment, { children: [m("button", { className: j("ff-popup-close", "ff-modal-close", e == null ? void 0 : e.close), onClick: h.onClose, children: m(tn, { type: "close" }) }), I("div", { className: j("ff-modal-content"), style: p, children: [I("div", { className: j("ff-popup-header", "ff-modal-header", e == null ? void 0 : e.header), children: [a, o] }), m("div", { className: j("ff-popup-body", "ff-modal-body", e == null ? void 0 : e.body), children: r }), I("div", { className: j("ff-popup-footer", "ff-modal-footer", e == null ? void 0 : e.footer), children: [l, s] })] })] }) }); -}, pi = ({ placement: t, $close: e, $event: n, children: i, title: r, ...a }) => { - const [o, s] = L({}), [l, c] = L(!0), u = G((y, w) => s((S) => ({ ...S, [y]: w })), []), p = G((y) => s((w) => ({ ...w, [y]: void 0 })), []); - let h = { ...a, className: o.rootClassName, title: o.title || r && E.createElement("div", { className: j("ff-popup-title") }, r), subTitle: o["sub-title"], actions: o.actions, extras: o.extras, children: i, $close: e, $event: n, onClose: () => c(!1) }; + return h(rr, { ...m, ...g, prefixCls: "ff-modal", className: j("ff-popup", t), modalRender: () => I(E.Fragment, { children: [h("button", { className: j("ff-popup-close", "ff-modal-close", e == null ? void 0 : e.close), onClick: m.onClose, children: h(nn, { type: "close" }) }), I("div", { className: j("ff-modal-content"), style: p, children: [I("div", { className: j("ff-popup-header", "ff-modal-header", e == null ? void 0 : e.header), children: [o, a] }), h("div", { className: j("ff-popup-body", "ff-modal-body", e == null ? void 0 : e.body), children: r }), I("div", { className: j("ff-popup-footer", "ff-modal-footer", e == null ? void 0 : e.footer), children: [l, s] })] })] }) }); +}, pi = ({ placement: t, $close: e, $event: n, children: i, title: r, ...o }) => { + const [a, s] = L({}), [l, c] = L(!0), u = G((w, f) => s((S) => ({ ...S, [w]: f })), []), p = G((w) => s((f) => ({ ...f, [w]: void 0 })), []); + let m = { ...o, className: a.rootClassName, title: a.title || r && E.createElement("div", { className: j("ff-popup-title") }, r), subTitle: a["sub-title"], actions: a.actions, extras: a.extras, children: i, $close: e, $event: n, onClose: () => c(!1) }; const g = () => { e(!1); }; - return m(ht.Provider, { value: { ele: o, mount: u, unmount: p }, children: t && t !== "center" ? m(ra, { ...h, placement: t, open: l, afterOpenChange: (y) => !y && g() }) : m(aa, { ...h, visible: l, afterClose: g }) }); + return h(ht.Provider, { value: { ele: a, mount: u, unmount: p }, children: t && t !== "center" ? h(ro, { ...m, placement: t, open: l, afterOpenChange: (w) => !w && g() }) : h(oo, { ...m, visible: l, afterClose: g }) }); }; pi.propTypes = { placement: C.oneOf(["center", "left", "top", "right", "bottom"]) }; -const oa = ({ widget: t, widgetProps: e, $close: n, onSetProps: i }) => { - const [r, a] = L(e || {}), o = Dn(e); - en(() => { - const l = o ?? {}, c = e ?? {}, u = Object.keys({ ...l, ...c }).reduce((p, h) => (l[h] !== c[h] && (p[h] = c[h]), p), {}); - Object.keys(u).length > 0 && a((p) => ({ ...p, ...u })); +const ao = ({ widget: t, widgetProps: e, $close: n, onSetProps: i }) => { + const [r, o] = L(e || {}), a = Vn(e); + Zt(() => { + const l = a ?? {}, c = e ?? {}, u = Object.keys({ ...l, ...c }).reduce((p, m) => (l[m] !== c[m] && (p[m] = c[m]), p), {}); + Object.keys(u).length > 0 && o((p) => ({ ...p, ...u })); }, [e]); const s = G((l) => { - a((c) => ({ ...c, ...l })), i == null || i(l); + o((c) => ({ ...c, ...l })), i == null || i(l); }, [i]); - return E.isValidElement(t) ? E.cloneElement(t, { ...r, $close: n, $setProps: s }) : t != null && t.name || xn.isForwardRef(t) || (t == null ? void 0 : t.$$typeof) === xn.ForwardRef ? E.createElement(t, { ...r, $close: n, $setProps: s }) : t; -}, ie = () => { - const [t, e] = Vi({ 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" }), [, n] = E.useReducer((a) => a + 1, 0); + return E.isValidElement(t) ? E.cloneElement(t, { ...r, $close: n, $setProps: s }) : t != null && t.name || $n.isForwardRef(t) || (t == null ? void 0 : t.$$typeof) === $n.ForwardRef ? E.createElement(t, { ...r, $close: n, $setProps: s }) : t; +}, X = () => { + const [t, e] = Vi({ maxCount: 6, motion: { motionName: "ff-notification-fade", motionAppear: !0, motionEnter: !0, motionLeave: !0, onLeaveStart: (o) => { + const { offsetHeight: a } = o; + return { height: a }; + }, onLeaveActive: () => ({ height: 0, opacity: 0, margin: 0 }) }, prefixCls: "ff-notification" }), [, n] = E.useReducer((o) => o + 1, 0); U(() => { - ie.$onClick = i, ie.$queue.forEach(([a, o, s], l, c) => { - r([o, s], ...a), delete c[l]; - }); + X.$onClick = i, X.$queue.forEach(([o, a, s, l]) => { + l == null || l(r([a, s], ...o)); + }), X.$queue = []; }, []); - const i = (a, o = {}, s = {}) => new Promise((l, c) => r([l, c], a, o, s)), r = ([a, o], s, l = {}, c = {}) => { - const u = ie.$index++, p = (y) => ((w, S) => (ie.$popups.delete(w), n(), S == null ? void 0 : S()))(u, () => a(y)); - if (s === qn) return t.open({ ...c, key: u, content: E.createElement(s, { ...l, $close: () => t.close(u) }) }); - const { $setProps: h, ...g } = l; - ie.$popups.set(u, E.createElement(pi, { maskClosable: !1, $event: g == null ? void 0 : g.$event, ...c, key: u, $close: p }, E.createElement(oa, { widget: s, widgetProps: g, $close: p, onSetProps: h }))), n(); + const i = (o, a = {}, s = {}) => { + let l; + const c = new Promise((u, p) => { + l = r([u, p], o, a, s); + }); + return c.update = l, c; + }, r = ([o, a], s, l = {}, c = {}) => { + const u = X.$index++; + if (s === qn) return t.open({ ...c, key: u, content: E.createElement(s, { ...l, $close: () => t.close(u) }) }), () => { + }; + const { $setProps: p, ...m } = l; + return X.$popups.set(u, { widget: s, widgetProps: m, widgetContainerProps: c, $close: (g) => ((w, f) => (X.$popups.delete(w), n(), f == null ? void 0 : f()))(u, () => o(g)), onSetProps: p }), n(), (g, w) => { + const f = X.$popups.get(u); + f && (X.$popups.set(u, { ...f, widgetProps: g ? { ...f.widgetProps, ...g } : f.widgetProps, widgetContainerProps: w ? { ...f.widgetContainerProps, ...w } : f.widgetContainerProps }), n()); + }; }; - return I(E.Fragment, { children: [Array.from(ie.$popups).map(([a, o]) => o), e] }); + return I(E.Fragment, { children: [Array.from(X.$popups).map(([o, { widget: a, widgetProps: s, widgetContainerProps: l, $close: c, onSetProps: u }]) => h(pi, { maskClosable: !1, $event: s == null ? void 0 : s.$event, ...l, $close: c, children: h(ao, { widget: a, widgetProps: s, $close: c, onSetProps: u }) }, o)), e] }); }; -ie.$popups = /* @__PURE__ */ new Map(), ie.$index = 0, ie.$queue = [], ie.$onClick = (...t) => new Promise((e, n) => { - ie.$queue.push([t, e, n]); -}); -const In = (t, e, n = {}) => ie.$onClick(t, e, n), Mt = (t, { showProgress: e, duration: n, ...i } = { duration: 1.5 }) => ie.$onClick(qn, { content: t, ...i }, { showProgress: e, duration: n }), re = { modal: In, confirm: (t, e = {}) => ie.$onClick(ar, { content: t, ...e }, { placement: "center" }), form: (t, e = {}, n = {}) => In(ia, { formProps: n, fields: t }, { placement: "center", ...e }).then((i) => { +X.$popups = /* @__PURE__ */ new Map(), X.$index = 0, X.$queue = [], X.$onClick = (...t) => { + const e = new Promise((n, i) => { + X.$queue.push([t, n, i, (r) => { + e.update = r; + }]); + }); + return e; +}; +const Ln = (t, e, n = {}) => X.$onClick(t, e, n), Mt = (t, { showProgress: e, duration: n, ...i } = { duration: 1.5 }) => X.$onClick(qn, { content: t, ...i }, { showProgress: e, duration: n }), re = { modal: Ln, confirm: (t, e = {}) => X.$onClick(or, { content: t, ...e }, { placement: "center" }), form: (t, e = {}, n = {}) => Ln(io, { formProps: n, fields: t }, { placement: "center", ...e }).then((i) => { if (i === !1) throw !1; return i; }), notification: Mt, success: (t, e = { duration: 1.5 }) => Mt(t, { ...e, className: "ff-notification-success", icon: "check" }), error: (t, e = { duration: 1.5 }) => Mt(t, { ...e, className: "ff-notification-error", icon: "close" }) }; @@ -1054,22 +1075,22 @@ const gi = () => { }; De.interceptors.request.use((t) => (Object.assign(t.headers, gi()), tt.inc(), t), (t) => (tt.done(), Promise.reject({ code: -1, msg: t }))), De.interceptors.response.use(({ data: t, headers: e }) => (tt.done(), { ...t, res: e == null ? void 0 : e.res }), function(t) { return tt.done(), Promise.reject(t.message); -}), window.addEventListener("unhandledrejection", Wt.onUnhandledRejection), Wt.onMsg = (t, e) => re[[0, 1].includes(t) ? "success" : "error"](e).then(() => t === 20300 && ae.redirect(qe.get("Common.WEBSITE_LOGIN_PAGE"))); +}), window.addEventListener("unhandledrejection", Wt.onUnhandledRejection), Wt.onMsg = (t, e) => re[[0, 1].includes(t) ? "success" : "error"](e).then(() => t === 20300 && oe.redirect(qe.get("Common.WEBSITE_LOGIN_PAGE"))); var Xe, Ue, Qe; -const Z = class Z { +const ee = class ee { constructor() { T(this, "appUrl", ""); - v(this, Xe, null); - return d(Z, Ue) || (K(Z, Qe, new Wt()), K(Z, Ue, new Proxy(this, { get(e, n) { + x(this, Xe, null); + return d(ee, Ue) || (K(ee, Qe, new Wt()), K(ee, Ue, new Proxy(this, { get(e, n) { if (n in e) { const i = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e), n); return i != null && i.get ? Reflect.get(e, n, e) : typeof e[n] == "function" ? e[n].bind(e) : e[n]; } - return d(Z, Qe)[n]; - } }))), d(Z, Ue); + return d(ee, Qe)[n]; + } }))), d(ee, Ue); } init(e, n, i) { - De.defaults.baseURL = this.appUrl = i, De.defaults.timeout = 15e3, d(Z, Qe).init(e, n, De); + De.defaults.baseURL = this.appUrl = i, De.defaults.timeout = 15e3, d(ee, Qe).init(e, n, De); } get driver() { return De; @@ -1085,12 +1106,12 @@ const Z = class Z { (e = d(this, Xe)) == null || e.restore(), K(this, Xe, null); } }; -Xe = new WeakMap(), Ue = new WeakMap(), Qe = new WeakMap(), v(Z, Ue), v(Z, Qe), T(Z, "getInstance", () => d(Z, Ue) ?? K(Z, Ue, new Z())); -let Xt = Z; +Xe = new WeakMap(), Ue = new WeakMap(), Qe = new WeakMap(), x(ee, Ue), x(ee, Qe), T(ee, "getInstance", () => d(ee, Ue) ?? K(ee, Ue, new ee())); +let Xt = ee; const W = Xt.getInstance(); -class sn extends Error { +class ln extends Error { constructor(e, n) { - super(n), Error.captureStackTrace && Error.captureStackTrace(this, sn), !n instanceof nt && (this.name = `${e} Error Runtime`); + super(n), Error.captureStackTrace && Error.captureStackTrace(this, ln), !n instanceof nt && (this.name = `${e} Error Runtime`); } } class nt extends Error { @@ -1102,15 +1123,15 @@ const Vt = "mine", Ct = "token"; var Le, Ze; const be = class be { constructor() { - v(this, Ze, /* @__PURE__ */ new Map()); + x(this, Ze, /* @__PURE__ */ new Map()); T(this, "setVendor", (e, n) => d(this, Ze).set(e, new zn(n, async (i, r) => { - var o, s; + var a, s; if (!(i != null && i.default)) throw "@pkg not found"; - let a = () => r; + let o = () => r; switch ("function") { - case typeof (a = (o = i.default) == null ? void 0 : o[`./${r}/index.jsx`]): - case typeof (a = (s = i.default) == null ? void 0 : s[`./${r}/index.js`]): - return a(); + case typeof (o = (a = i.default) == null ? void 0 : a[`./${r}/index.jsx`]): + case typeof (o = (s = i.default) == null ? void 0 : s[`./${r}/index.js`]): + return o(); } throw new nt(r); }))); @@ -1122,7 +1143,7 @@ const be = class be { try { return d(this, Ze).has("pkg") ? await d(this, Ze).get("pkg").get(n) : await import(`${W.appUrl}/api/pkg-import/web?name=${e}`); } catch (i) { - throw new sn(e, i); + throw new ln(e, i); } }); T(this, "getRoutes", () => W.get("/api/my-router").then((e) => [...e, { uuid: "data-list-setting", isLayout: !0, uri: "/data-list-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/DataListSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "grid-layout-setting", isLayout: !0, uri: "/grid-layout-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/GridLayoutSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "grid-layout-form-setting", isLayout: !0, uri: "/grid-layout-form-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/GridLayoutFormSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "resource-api-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ResourceApiSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "charts-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ChartsSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "fsm-setting", isLayout: !0, uri: "/fsm-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/FsmSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "component-setting", isLayout: !0, uri: "/component-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ComponentSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "login", uri: "/login", name: "登录", type: "fsdpf-component", isLogin: !1, component: "@pkg/ff/components/Login" }, { uuid: "not-found", uri: "*", name: "Not Found", type: "fsdpf-component", isLogin: !1, component: "@pkg/ff/components/NotFound" }].map(({ uuid: n, ...i }) => [n, { uuid: n, ...i }])).then((e) => new Map(e))); @@ -1151,8 +1172,8 @@ const be = class be { try { const i = this.getUserToken(); if (!i) return Promise.resolve(null); - const { iat: r } = JSON.parse(window.atob((n = i == null ? void 0 : i.split(".")) == null ? void 0 : n[1])), { iat: a, ...o } = W.decode(window.localStorage.getItem(Vt) || "", {}); - return a === r ? Promise.resolve(o) : W.get("/api/mine-info").then(({ User: s = null }) => (window.localStorage.setItem(Vt, W.encode({ ...s, iat: r })), s)); + const { iat: r } = JSON.parse(window.atob((n = i == null ? void 0 : i.split(".")) == null ? void 0 : n[1])), { iat: o, ...a } = W.decode(window.localStorage.getItem(Vt) || "", {}); + return o === r ? Promise.resolve(a) : W.get("/api/mine-info").then(({ User: s = null }) => (window.localStorage.setItem(Vt, W.encode({ ...s, iat: r })), s)); } catch (i) { console.error(i), e && re.error("请登录").then(this.logout); } @@ -1162,19 +1183,19 @@ const be = class be { T(this, "logout", (e) => (window.localStorage.removeItem(Vt), window.localStorage.removeItem(Ct), e == null ? void 0 : e())); T(this, "initAppEnv", async () => { const [e, n, i, r] = await Promise.all([this.getWidgetOperationAuth(), this.getRoutes(), this.getMenus(), this.getConfigure()]); - return Kn.init(e), qe.init(r), ae.init(n, i), Et.init(qe.get("Common.ICONFONT")), { widgetOperationAuth: e, routes: n, menus: i, configures: r }; + return Kn.init(e), qe.init(r), oe.init(n, i), Et.init(qe.get("Common.ICONFONT")), { widgetOperationAuth: e, routes: n, menus: i, configures: r }; }); if (d(be, Le)) return d(be, Le); } }; -Le = new WeakMap(), Ze = new WeakMap(), v(be, Le, null), T(be, "getInstance", () => (d(be, Le) || K(be, Le, new be()), d(be, Le))); +Le = new WeakMap(), Ze = new WeakMap(), x(be, Le, null), T(be, "getInstance", () => (d(be, Le) || K(be, Le, new be()), d(be, Le))); let Qt = be; -const se = Qt.getInstance(), sa = E.createContext({ user: {}, initUser: () => { -}, initUserComplete: !1 }), la = E.createContext({ set: () => { +const se = Qt.getInstance(), so = E.createContext({ user: {}, initUser: () => { +}, initUserComplete: !1 }), lo = E.createContext({ set: () => { }, get: () => { }, assign: () => { }, currentRoute: () => { -} }), ln = (t) => { +} }), cn = (t) => { if (!t) return !1; if (t.prototype instanceof E.Component || t.$$typeof) return !0; if (typeof t == "function") { @@ -1182,222 +1203,222 @@ const se = Qt.getInstance(), sa = E.createContext({ user: {}, initUser: () => { return !e || /^[A-Z]/.test(e); } return !1; -}, ca = (t, e) => { +}, co = (t, e) => { if (!t || typeof window > "u") return; let n = document.querySelector(`style[ff-style-token="${e}"]`); return n ? (n.innerHTML = t, t) : (n = document.createElement("style"), n.setAttribute("ff-style-token", e), n.setAttribute("type", "text/css"), n.innerHTML = t, document.head.appendChild(n), t); -}, da = Object.freeze(Object.defineProperty({ __proto__: null, AppContext: sa, AppGlobalParamsContext: la, cache: zn, configure: qe, default: se, func: Me, http: W, insertStyle: ca, isReactComponent: ln, route: ae }, Symbol.toStringTag, { value: "Module" })); -var Pe, et, Ne, ke, Se, ne, ee, Y, Ee, ct, dt, ut, pt, Nt, gt; -const cn = class cn { +}, uo = Object.freeze(Object.defineProperty({ __proto__: null, AppContext: so, AppGlobalParamsContext: lo, cache: zn, configure: qe, default: se, func: Me, http: W, insertStyle: co, isReactComponent: cn, route: oe }, Symbol.toStringTag, { value: "Module" })); +var ve, et, Ne, ke, Se, ie, te, Y, Ee, ct, dt, ut, pt, Nt, gt; +const dn = class dn { constructor(e, n = "/") { - v(this, Pe, "/"); - v(this, et, /* @__PURE__ */ new Set()); - v(this, Ne, (e) => { + x(this, ve, "/"); + x(this, et, /* @__PURE__ */ new Set()); + x(this, Ne, (e) => { for (const n of d(this, et)) try { n(e); } catch (i) { console.error("Error in VirtualFS event listener:", i); } }); - v(this, ke, (e) => { + x(this, ke, (e) => { const n = Date.now(); - if (e && (e.lastModified = n), d(this, Pe) != "/") { - const i = d(this, Y).call(this, d(this, Pe)); + if (e && (e.lastModified = n), d(this, ve) != "/") { + const i = d(this, Y).call(this, d(this, ve)); i && (i.lastModified = n); } this.root.lastModified = n; }); - v(this, Se, (e) => { + x(this, Se, (e) => { let n = he.normalize(e); return n.startsWith("/") || (n = "/" + n), n.length > 1 && n.endsWith("/") && (n = n.slice(0, -1)), n; }); - v(this, ne, (e) => { - const n = he.join(d(this, Pe), e); + x(this, ie, (e) => { + const n = he.join(d(this, ve), e); return d(this, Se).call(this, n); }); - v(this, ee, (e) => { + x(this, te, (e) => { if (!e || typeof e != "string") return !1; const n = d(this, Se).call(this, e); return !n.includes("..") && n.startsWith("/"); }); - v(this, Y, (e) => { - var a; + x(this, Y, (e) => { + var o; const n = d(this, Se).call(this, e); if (n === "/") return this.root; - const i = n.split("/").filter((o) => o); + const i = n.split("/").filter((a) => a); let r = this.root; - for (const o of i) { + for (const a of i) { if (r.type !== "dir") return null; - const s = (a = r.children) == null ? void 0 : a.find((l) => l.name === o); + const s = (o = r.children) == null ? void 0 : o.find((l) => l.name === a); if (!s) return null; r = s; } return r; }); - v(this, Ee, (e) => { + x(this, Ee, (e) => { const n = d(this, Se).call(this, e), i = he.basename(n), r = he.dirname(n); return { parent: d(this, Y).call(this, r), name: i }; }); - v(this, ct, (e, n, i) => i === !1 ? e : i === "root" ? e.map((r) => he.join(n, r)) : i === !0 || i === "working" ? e.map((r) => he.relative(d(this, Pe), he.join(n, r))) : e); - v(this, dt, async (e, n, i, r = "") => { - const a = [], o = d(this, Y).call(this, e); - if (!o || o.type !== "dir") return a; - const s = o.children; + x(this, ct, (e, n, i) => i === !1 ? e : i === "root" ? e.map((r) => he.join(n, r)) : i === !0 || i === "working" ? e.map((r) => he.relative(d(this, ve), he.join(n, r))) : e); + x(this, dt, async (e, n, i, r = "") => { + const o = [], a = d(this, Y).call(this, e); + if (!a || a.type !== "dir") return o; + const s = a.children; for (const l of s) { const c = l.name, u = e === "/" ? `/${c}` : `${e}/${c}`, p = r ? `${r}/${c}` : c; try { - if (l.type === "file") n(i ? p : c) && a.push(p); + if (l.type === "file") n(i ? p : c) && o.push(p); else if (l.type === "dir" && i) { - const h = await d(this, dt).call(this, u, n, i, p); - a.push(...h); + const m = await d(this, dt).call(this, u, n, i, p); + o.push(...m); } } catch { continue; } } - return a; + return o; }); - v(this, ut, async (e, n, i, r = "") => { - const a = [], o = Array.isArray(n) ? n : [n], s = d(this, Y).call(this, e); - if (!s || s.type !== "dir") return a; + x(this, ut, async (e, n, i, r = "") => { + const o = [], a = Array.isArray(n) ? n : [n], s = d(this, Y).call(this, e); + if (!s || s.type !== "dir") return o; if (!i) { - for (const c of o) if (d(this, pt).call(this, c)) { + for (const c of a) if (d(this, pt).call(this, c)) { const u = await d(this, Nt).call(this, e, c); - a.push(...u); + o.push(...u); } else { const u = he.join(e, c), p = d(this, Se).call(this, u); - d(this, Y).call(this, p) && a.push(c); + d(this, Y).call(this, p) && o.push(c); } - return a; + return o; } const l = s.children; for (const c of l) { - const u = c.name, p = e === "/" ? `/${u}` : `${e}/${u}`, h = r ? `${r}/${u}` : u; + const u = c.name, p = e === "/" ? `/${u}` : `${e}/${u}`, m = r ? `${r}/${u}` : u; try { - if (c.type === "file") for (const g of o) { - let y = !1; - if (y = d(this, pt).call(this, g) ? d(this, gt).call(this, u, g) : u === g, y) { - a.push(h); + if (c.type === "file") for (const g of a) { + let w = !1; + if (w = d(this, pt).call(this, g) ? d(this, gt).call(this, u, g) : u === g, w) { + o.push(m); break; } } else if (c.type === "dir") { - const g = await d(this, ut).call(this, p, n, i, h); - a.push(...g); + const g = await d(this, ut).call(this, p, n, i, m); + o.push(...g); } } catch { continue; } } - return a; + return o; }); - v(this, pt, (e) => /[*?[\]{}]/.test(e)); - v(this, Nt, async (e, n) => { + x(this, pt, (e) => /[*?[\]{}]/.test(e)); + x(this, Nt, async (e, n) => { const i = [], r = d(this, Y).call(this, e); if (!r || r.type !== "dir") return i; - const a = r.children.map((o) => o.name); - for (const o of a) d(this, gt).call(this, o, n) && i.push(o); + const o = r.children.map((a) => a.name); + for (const a of o) d(this, gt).call(this, a, n) && i.push(a); return i; }); - v(this, gt, (e, n) => { - const i = n.replace(/\./g, "\\.").replace(/\*/g, ".*").replace(/\?/g, ".").replace(/\{([^}]+)\}/g, (r, a) => "(" + a.split(",").join("|") + ")"); + x(this, gt, (e, n) => { + const i = n.replace(/\./g, "\\.").replace(/\*/g, ".*").replace(/\?/g, ".").replace(/\{([^}]+)\}/g, (r, o) => "(" + o.split(",").join("|") + ")"); return new RegExp(`^${i}$`).test(e); }); - var i, r, a; - K(this, Pe, n), this.root = { name: "/", type: "dir", children: [], lastModified: Date.now() }, Array.isArray(e) ? this.root.children = e : e && typeof e == "object" && (e.name && e.name !== "/" ? this.root.children.push(e) : (this.root = e, (i = this.root).name ?? (i.name = "/"), (r = this.root).children ?? (r.children = []), (a = this.root).lastModified ?? (a.lastModified = Date.now()))); + var i, r, o; + K(this, ve, n), this.root = { name: "/", type: "dir", children: [], lastModified: Date.now() }, Array.isArray(e) ? this.root.children = e : e && typeof e == "object" && (e.name && e.name !== "/" ? this.root.children.push(e) : (this.root = e, (i = this.root).name ?? (i.name = "/"), (r = this.root).children ?? (r.children = []), (o = this.root).lastModified ?? (o.lastModified = Date.now()))); } async stat(e) { - const n = d(this, ne).call(this, e); - if (!d(this, ee).call(this, n)) throw new Error(`EINVAL: invalid path '${e}'`); + const n = d(this, ie).call(this, e); + if (!d(this, te).call(this, n)) throw new Error(`EINVAL: invalid path '${e}'`); const i = d(this, Y).call(this, n); if (!i) throw new Error(`ENOENT: no such file or directory, stat '${e}'`); return { isFile: () => i.type === "file", isDirectory: () => i.type === "dir", lastModified: i.lastModified }; } async dir(e) { - const n = d(this, ne).call(this, e); - if (!d(this, ee).call(this, n)) throw new Error(`EINVAL: invalid path '${e}'`); + const n = d(this, ie).call(this, e); + if (!d(this, te).call(this, n)) throw new Error(`EINVAL: invalid path '${e}'`); const i = d(this, Y).call(this, n); if (!i) throw new Error(`ENOENT: no such file or directory, scandir '${e}'`); if (i.type !== "dir") throw new Error(`ENOTDIR: not a directory, scandir '${e}'`); return i.children.map((r) => r.name); } async readFile(e) { - const n = d(this, ne).call(this, e); - if (!d(this, ee).call(this, n)) throw new Error(`EINVAL: invalid path '${e}'`); + const n = d(this, ie).call(this, e); + if (!d(this, te).call(this, n)) throw new Error(`EINVAL: invalid path '${e}'`); const i = d(this, Y).call(this, n); if (!i) throw new Error(`ENOENT: no such file or directory, open '${e}'`); if (i.type !== "file") throw new Error("EISDIR: illegal operation on a directory, read"); return i.content || ""; } async writeFile(e, n) { - const i = d(this, ne).call(this, e); - if (!d(this, ee).call(this, i)) throw new Error(`EINVAL: invalid path '${e}'`); - const { parent: r, name: a } = d(this, Ee).call(this, i); + const i = d(this, ie).call(this, e); + if (!d(this, te).call(this, i)) throw new Error(`EINVAL: invalid path '${e}'`); + const { parent: r, name: o } = d(this, Ee).call(this, i); if (!r) throw new Error(`ENOENT: no such file or directory, open '${e}'`); if (r.type !== "dir") throw new Error("ENOTDIR: not a directory"); - const o = r.children.findIndex((c) => c.name === a), s = o >= 0, l = { name: a, type: "file", content: n, lastModified: Date.now() }; - s ? r.children[o] = l : r.children.push(l), d(this, ke).call(this, r), d(this, Ne).call(this, { action: s ? "update" : "create", path: i, type: "file", timestamp: Date.now() }); + const a = r.children.findIndex((c) => c.name === o), s = a >= 0, l = { name: o, type: "file", content: n, lastModified: Date.now() }; + s ? r.children[a] = l : r.children.push(l), d(this, ke).call(this, r), d(this, Ne).call(this, { action: s ? "update" : "create", path: i, type: "file", timestamp: Date.now() }); } async mkdir(e, n = {}) { - const i = d(this, ne).call(this, e); - if (!d(this, ee).call(this, i)) throw new Error(`EINVAL: invalid path '${e}'`); + const i = d(this, ie).call(this, e); + if (!d(this, te).call(this, i)) throw new Error(`EINVAL: invalid path '${e}'`); const { recursive: r } = n; if (r) { - const a = i.split("/").filter((s) => s); - let o = "/"; - for (const s of a) - if (o = he.join(o, s), !d(this, Y).call(this, o)) { - const { parent: l, name: c } = d(this, Ee).call(this, o); + const o = i.split("/").filter((s) => s); + let a = "/"; + for (const s of o) + if (a = he.join(a, s), !d(this, Y).call(this, a)) { + const { parent: l, name: c } = d(this, Ee).call(this, a); if (l && l.type === "dir") { const u = { name: c, type: "dir", children: [], lastModified: Date.now() }; - l.children.push(u), d(this, ke).call(this, l), d(this, Ne).call(this, { action: "create", path: d(this, Se).call(this, o), type: "dir", timestamp: Date.now() }); + l.children.push(u), d(this, ke).call(this, l), d(this, Ne).call(this, { action: "create", path: d(this, Se).call(this, a), type: "dir", timestamp: Date.now() }); } } } else { - const { parent: a, name: o } = d(this, Ee).call(this, i); - if (!a) throw new Error(`ENOENT: no such file or directory, mkdir '${e}'`); - if (a.type !== "dir") throw new Error("ENOTDIR: not a directory"); - if (a.children.find((l) => l.name === o)) throw new Error(`EEXIST: file already exists, mkdir '${e}'`); - const s = { name: o, type: "dir", children: [], lastModified: Date.now() }; - a.children.push(s), d(this, ke).call(this, a), d(this, Ne).call(this, { action: "create", path: i, type: "dir", timestamp: Date.now() }); + const { parent: o, name: a } = d(this, Ee).call(this, i); + if (!o) throw new Error(`ENOENT: no such file or directory, mkdir '${e}'`); + if (o.type !== "dir") throw new Error("ENOTDIR: not a directory"); + if (o.children.find((l) => l.name === a)) throw new Error(`EEXIST: file already exists, mkdir '${e}'`); + const s = { name: a, type: "dir", children: [], lastModified: Date.now() }; + o.children.push(s), d(this, ke).call(this, o), d(this, Ne).call(this, { action: "create", path: i, type: "dir", timestamp: Date.now() }); } } async unlink(e) { - const n = d(this, ne).call(this, e); - if (!d(this, ee).call(this, n)) throw new Error(`EINVAL: invalid path '${e}'`); + const n = d(this, ie).call(this, e); + if (!d(this, te).call(this, n)) throw new Error(`EINVAL: invalid path '${e}'`); const { parent: i, name: r } = d(this, Ee).call(this, n); if (!i) throw new Error(`ENOENT: no such file or directory, unlink '${e}'`); - const a = i.children.findIndex((o) => o.name === r); - if (a < 0) throw new Error(`ENOENT: no such file or directory, unlink '${e}'`); - if (i.children[a].type !== "file") throw new Error(`EISDIR: illegal operation on a directory, unlink '${e}'`); - i.children.splice(a, 1), d(this, ke).call(this, i), d(this, Ne).call(this, { action: "delete", path: n, type: "file", timestamp: Date.now() }); + const o = i.children.findIndex((a) => a.name === r); + if (o < 0) throw new Error(`ENOENT: no such file or directory, unlink '${e}'`); + if (i.children[o].type !== "file") throw new Error(`EISDIR: illegal operation on a directory, unlink '${e}'`); + i.children.splice(o, 1), d(this, ke).call(this, i), d(this, Ne).call(this, { action: "delete", path: n, type: "file", timestamp: Date.now() }); } async rmdir(e, n = {}) { - const i = d(this, ne).call(this, e); - if (!d(this, ee).call(this, i)) throw new Error(`EINVAL: invalid path '${e}'`); - const { parent: r, name: a } = d(this, Ee).call(this, i); + const i = d(this, ie).call(this, e); + if (!d(this, te).call(this, i)) throw new Error(`EINVAL: invalid path '${e}'`); + const { parent: r, name: o } = d(this, Ee).call(this, i); if (!r) throw new Error(`ENOENT: no such file or directory, rmdir '${e}'`); - const o = r.children.findIndex((l) => l.name === a); - if (o < 0) throw new Error(`ENOENT: no such file or directory, rmdir '${e}'`); - const s = r.children[o]; + const a = r.children.findIndex((l) => l.name === o); + if (a < 0) throw new Error(`ENOENT: no such file or directory, rmdir '${e}'`); + const s = r.children[a]; if (s.type !== "dir") throw new Error(`ENOTDIR: not a directory, rmdir '${e}'`); if (!n.recursive && s.children.length > 0) throw new Error(`ENOTEMPTY: directory not empty, rmdir '${e}'`); - r.children.splice(o, 1), d(this, ke).call(this, r), d(this, Ne).call(this, { action: "delete", path: i, type: "dir", timestamp: Date.now() }); + r.children.splice(a, 1), d(this, ke).call(this, r), d(this, Ne).call(this, { action: "delete", path: i, type: "dir", timestamp: Date.now() }); } async rename(e, n) { - const i = d(this, ne).call(this, e), r = d(this, ne).call(this, n); - if (!d(this, ee).call(this, i)) throw new Error(`EINVAL: invalid path '${e}'`); - if (!d(this, ee).call(this, r)) throw new Error(`EINVAL: invalid path '${n}'`); + const i = d(this, ie).call(this, e), r = d(this, ie).call(this, n); + if (!d(this, te).call(this, i)) throw new Error(`EINVAL: invalid path '${e}'`); + if (!d(this, te).call(this, r)) throw new Error(`EINVAL: invalid path '${n}'`); if (!d(this, Y).call(this, i)) throw new Error(`ENOENT: no such file or directory, rename '${e}' -> '${n}'`); - const { parent: a, name: o } = d(this, Ee).call(this, i), { parent: s, name: l } = d(this, Ee).call(this, r); + const { parent: o, name: a } = d(this, Ee).call(this, i), { parent: s, name: l } = d(this, Ee).call(this, r); if (!s) throw new Error(`ENOENT: no such file or directory, rename '${e}' -> '${n}'`); if (d(this, Y).call(this, r)) throw new Error(`EEXIST: file already exists, rename '${e}' -> '${n}'`); - const c = a.children.findIndex((p) => p.name === o), u = { ...a.children[c], name: l, lastModified: Date.now() }; - a.children.splice(c, 1), s.children.push(u), d(this, ke).call(this, a), a !== s && d(this, ke).call(this, s), d(this, Ne).call(this, { action: "rename", path: r, oldPath: i, type: u.type, timestamp: Date.now() }); + const c = o.children.findIndex((p) => p.name === a), u = { ...o.children[c], name: l, lastModified: Date.now() }; + o.children.splice(c, 1), s.children.push(u), d(this, ke).call(this, o), o !== s && d(this, ke).call(this, s), d(this, Ne).call(this, { action: "rename", path: r, oldPath: i, type: u.type, timestamp: Date.now() }); } async exists(e) { - const n = d(this, ne).call(this, e); - return d(this, ee).call(this, n) ? d(this, Y).call(this, n) !== null : !1; + const n = d(this, ie).call(this, e); + return d(this, te).call(this, n) ? d(this, Y).call(this, n) !== null : !1; } getLastModified() { return this.root.lastModified; @@ -1409,42 +1430,42 @@ const cn = class cn { }; } getWorkingDirectory() { - return d(this, Pe); + return d(this, ve); } scope(e = "/") { const n = d(this, Se).call(this, e); - if (!d(this, ee).call(this, n)) throw new Error(`EINVAL: invalid path '${e}'`); + if (!d(this, te).call(this, n)) throw new Error(`EINVAL: invalid path '${e}'`); const i = d(this, Y).call(this, n); if (!i) throw new Error(`ENOENT: no such file or directory '${e}'`); if (i.type !== "dir") throw new Error(`ENOTDIR: not a directory '${e}'`); - return i.children ?? (i.children = []), i.lastModified ?? (i.lastModified = Date.now()), new cn(this.root, n); + return i.children ?? (i.children = []), i.lastModified ?? (i.lastModified = Date.now()), new dn(this.root, n); } async findFiles(e, n, i = {}) { - const r = d(this, ne).call(this, e); - if (!d(this, ee).call(this, r)) throw new Error(`EINVAL: invalid path '${e}'`); - const a = d(this, Y).call(this, r); - if (!a) throw new Error(`ENOENT: no such file or directory '${e}'`); - if (a.type !== "dir") throw new Error(`ENOTDIR: not a directory '${e}'`); - const { recursive: o = !1, fullPath: s = !1 } = i; + const r = d(this, ie).call(this, e); + if (!d(this, te).call(this, r)) throw new Error(`EINVAL: invalid path '${e}'`); + const o = d(this, Y).call(this, r); + if (!o) throw new Error(`ENOENT: no such file or directory '${e}'`); + if (o.type !== "dir") throw new Error(`ENOTDIR: not a directory '${e}'`); + const { recursive: a = !1, fullPath: s = !1 } = i; if (typeof n == "function") { - const c = await d(this, dt).call(this, r, n, o); + const c = await d(this, dt).call(this, r, n, a); return d(this, ct).call(this, c, r, s); } - const l = await d(this, ut).call(this, r, n, o); + const l = await d(this, ut).call(this, r, n, a); return d(this, ct).call(this, l, r, s); } }; -Pe = new WeakMap(), et = new WeakMap(), Ne = new WeakMap(), ke = new WeakMap(), Se = new WeakMap(), ne = new WeakMap(), ee = new WeakMap(), Y = new WeakMap(), Ee = new WeakMap(), ct = new WeakMap(), dt = new WeakMap(), ut = new WeakMap(), pt = new WeakMap(), Nt = new WeakMap(), gt = new WeakMap(); -let Ln = cn; -const ua = async (t, e = "/", n = "") => { +ve = new WeakMap(), et = new WeakMap(), Ne = new WeakMap(), ke = new WeakMap(), Se = new WeakMap(), ie = new WeakMap(), te = new WeakMap(), Y = new WeakMap(), Ee = new WeakMap(), ct = new WeakMap(), dt = new WeakMap(), ut = new WeakMap(), pt = new WeakMap(), Nt = new WeakMap(), gt = new WeakMap(); +let Mn = dn; +const po = async (t, e = "/", n = "") => { try { - const i = await t.stat(e), r = e === "/" ? "/" : he.basename(e), a = { title: r, key: n ? `${n}${e}` : e, isLeaf: i.isFile() }; + const i = await t.stat(e), r = e === "/" ? "/" : he.basename(e), o = { title: r, key: n ? `${n}${e}` : e, isLeaf: i.isFile() }; if (i.isDirectory()) { - const o = await t.dir(e); - if (o.length > 0) { - a.children = []; + const a = await t.dir(e); + if (a.length > 0) { + o.children = []; const s = [], l = []; - for (const c of o) { + for (const c of a) { const u = e === "/" ? `/${c}` : `${e}/${c}`; try { (await t.stat(u)).isDirectory() ? s.push(c) : l.push(c); @@ -1456,69 +1477,69 @@ const ua = async (t, e = "/", n = "") => { for (const c of [...s, ...l]) { const u = e === "/" ? `/${c}` : `${e}/${c}`; try { - const p = await ua(t, u, n); - a.children.push(p); + const p = await po(t, u, n); + o.children.push(p); } catch (p) { console.warn(`Failed to process ${u}:`, p.message); } } } } - return a; + return o; } catch { return null; } }; export { - qa as $, + Ko as $, dr as A, - ja as B, - Aa as C, + Ao as B, + Io as C, St as D, Jn as E, Kt as F, - Ma as G, + Vo as G, Er as H, ur as I, pr as J, Tr as K, Or as L, - Va as M, - Da as N, + Do as M, + Wo as N, pe as O, Fr as P, Tt as Q, Zn as R, - ai as S, + oi as S, Lt as T, - Wa as U, - Ba as V, - za as W, - Ua as X, + Bo as U, + zo as V, + Uo as W, + qo as X, jr as Y, Ar as Z, Ir as _, Hn as a, Lr as a0, Ot as a1, - Ka as a2, + Ho as a2, mt as a3, Rt as a4, - Ha as a5, - _a as a6, + _o as a5, + Jo as a6, Mr as a7, ci as a8, Hr as a9, zn as aA, qe as aB, Me as aC, - ae as aD, - sa as aE, - la as aF, - Ln as aG, - ua as aH, - oa as aI, - on as aa, + oe as aD, + so as aE, + lo as aF, + Mn as aG, + po as aH, + ao as aI, + sn as aa, an as ab, di as ac, Vr as ad, @@ -1527,43 +1548,43 @@ export { Br as ag, zr as ah, Ur as ai, - Ja as aj, + Go as aj, Et as ak, R as al, Kn as am, Xr as an, - te as ao, + ne as ao, ht as ap, Un as aq, - ie as ar, + X as ar, re as as, - Oa as at, - Ra as au, - Fa as av, + Ro as at, + Fo as au, + jo as av, se as aw, - ln as ax, - ca as ay, + cn as ax, + co as ay, W as az, Gn as b, - Ia as c, + Lo as c, Yn as d, - nn as e, + rn as e, ei as f, - or as g, + ar as g, ii as h, - vr as i, + xr as i, ni as j, $r as k, - La as l, + Mo as l, ti as m, Qn as n, Xn as o, Cr as p, br as q, yr as r, - rn as s, + on as s, le as t, - xr as u, + Pr as u, Sr as v, Nr as w, gr as x, diff --git a/dist/components.js b/dist/components.js index de1e96e..6891c10 100644 --- a/dist/components.js +++ b/dist/components.js @@ -1,4 +1,4 @@ -import { at as s, ak as p, au as r, av as t, as as e, aI as n } from "./common/main-CVUJh_JV.js"; +import { at as s, ak as p, au as r, av as t, as as e, aI as n } from "./common/main-BF14mrhu.js"; export { s as Empty, p as Icon, diff --git a/dist/container.js b/dist/container.js index 0bb758d..eca6af0 100644 --- a/dist/container.js +++ b/dist/container.js @@ -1,4 +1,4 @@ -import { ap as s, at as e, au as p, av as t, aq as d, as as n, ar as r, ao as u } from "./common/main-CVUJh_JV.js"; +import { ap as s, at as e, au as p, av as t, aq as d, as as n, ar as r, ao as u } from "./common/main-BF14mrhu.js"; export { s as Context, e as Empty, diff --git a/dist/data-converter.js b/dist/data-converter.js index 8a46d8b..f0d1fbe 100644 --- a/dist/data-converter.js +++ b/dist/data-converter.js @@ -1,6 +1,6 @@ import "lodash"; import "react"; -import { D as i } from "./common/main-CVUJh_JV.js"; +import { D as i } from "./common/main-BF14mrhu.js"; import "react-use"; export { i as default diff --git a/dist/data-list.js b/dist/data-list.js index ccda806..4ce6139 100644 --- a/dist/data-list.js +++ b/dist/data-list.js @@ -1,4 +1,4 @@ -import { w as t, t as e, o as r, r as o, x as i, s as l, q as u, v as n, p as D, y as L, n as p, A as C, z as m, J as b, C as c, F, E as d, I as k, B as w } from "./common/main-CVUJh_JV.js"; +import { w as t, t as e, o as r, r as o, x as i, s as l, q as u, v as n, p as D, y as L, n as p, A as C, z as m, J as b, C as c, F, E as d, I as k, B as w } from "./common/main-BF14mrhu.js"; export { t as DataListContent, e as DataListContext, diff --git a/dist/data-list/utils.js b/dist/data-list/utils.js index d3fc33e..526a700 100644 --- a/dist/data-list/utils.js +++ b/dist/data-list/utils.js @@ -1,5 +1,5 @@ import "lodash"; -import { f as a } from "../common/main-CVUJh_JV.js"; +import { f as a } from "../common/main-BF14mrhu.js"; export { a as getDefaultExpandRowKeys }; diff --git a/dist/grid-layout-form.js b/dist/grid-layout-form.js index e0b87a3..3bc6319 100644 --- a/dist/grid-layout-form.js +++ b/dist/grid-layout-form.js @@ -1,4 +1,4 @@ -import { aa as s, ac as r, ab as u, a9 as o, m as t, ah as m, af as d, ag as i, aj as F, ae as g, ad as c, ai as l } from "./common/main-CVUJh_JV.js"; +import { aa as s, ac as r, ab as u, a9 as o, m as t, ah as m, af as d, ag as i, aj as F, ae as g, ad as c, ai as l } from "./common/main-BF14mrhu.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 3aeabf4..5a1c5cd 100644 --- a/dist/grid-layout-form/utils.js +++ b/dist/grid-layout-form/utils.js @@ -1,5 +1,5 @@ import "lodash"; -import { a as o, g } from "../common/main-CVUJh_JV.js"; +import { a as o, g } from "../common/main-BF14mrhu.js"; export { o as getNormalizeWidget, g as getOptionItemByValue diff --git a/dist/grid-layout.js b/dist/grid-layout.js index 0914575..e7f5d9a 100644 --- a/dist/grid-layout.js +++ b/dist/grid-layout.js @@ -1,4 +1,4 @@ -import { h as u, j as e, i as r, H as t, G as d, k as i, m as o, l as G, u as l } from "./common/main-CVUJh_JV.js"; +import { h as u, j as e, i as r, H as t, G as d, k as i, m as o, l as G, u as l } from "./common/main-BF14mrhu.js"; export { u as GridLayout, e as GridLayoutFramework, diff --git a/dist/grid-layout/utils.js b/dist/grid-layout/utils.js index d23f75b..41d5402 100644 --- a/dist/grid-layout/utils.js +++ b/dist/grid-layout/utils.js @@ -1,4 +1,4 @@ -import { b as a, d as o, e as s, c as g } from "../common/main-CVUJh_JV.js"; +import { b as a, d as o, e as s, c as g } from "../common/main-BF14mrhu.js"; export { a as getBoxStyle, o as getEventProps, diff --git a/dist/hooks.js b/dist/hooks.js index b54fddd..3f7e575 100644 --- a/dist/hooks.js +++ b/dist/hooks.js @@ -2,7 +2,7 @@ import "lodash"; import "rc-field-form"; import "react"; import "react-use"; -import { a4 as u, a3 as o, a5 as i, a2 as f, a6 as m, a1 as d, a8 as c, a7 as l } from "./common/main-CVUJh_JV.js"; +import { a4 as u, a3 as o, a5 as i, a2 as f, a6 as m, a1 as d, a8 as c, a7 as l } from "./common/main-BF14mrhu.js"; import { default as b } from "rc-util/lib/hooks/useMergedState"; import { a as x } from "./common/vender-hQk7ADWo.js"; export { diff --git a/dist/iconfont.js b/dist/iconfont.js index 575032e..e210a4f 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 { ak as a } from "./common/main-CVUJh_JV.js"; +import { ak as a } from "./common/main-BF14mrhu.js"; export { a as default }; diff --git a/dist/index.js b/dist/index.js index 86f60c1..e2f0141 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,4 +1,4 @@ -import { aE as t, aF as e, aA as o, aB as n, aw as p, aC as r, az as c, ay as f, ax as l, aD as u } from "./common/main-CVUJh_JV.js"; +import { aE as t, aF as e, aA as o, aB as n, aw as p, aC as r, az as c, ay as f, ax as l, aD as u } from "./common/main-BF14mrhu.js"; export { t as AppContext, e as AppGlobalParamsContext, diff --git a/dist/pages.js b/dist/pages.js index a41d56e..6e615df 100644 --- a/dist/pages.js +++ b/dist/pages.js @@ -1,4 +1,4 @@ -import { L as t, K as e, M as o, N as g } from "./common/main-CVUJh_JV.js"; +import { L as t, K as e, M as o, N as g } from "./common/main-BF14mrhu.js"; export { t as CustomPage, e as DataListPage, diff --git a/dist/res-ws.js b/dist/res-ws.js index 77fd322..1e74ecd 100644 --- a/dist/res-ws.js +++ b/dist/res-ws.js @@ -1,5 +1,5 @@ import "lodash"; -import { R as a } from "./common/main-CVUJh_JV.js"; +import { R as a } from "./common/main-BF14mrhu.js"; export { a as default }; diff --git a/dist/style.css b/dist/style.css index f66f644..ece447c 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}input:-webkit-autofill,textarea:-webkit-autofill,select:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #fff inset!important;-webkit-text-fill-color:#000!important;transition:background-color 9999s ease-in-out 0s}: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-cell-editable:after{content:" ";display:block;position:absolute;width:0px;height:0px;bottom:0;right:0;border-style:solid;border-color:rgba(0,0,0,.45) transparent;border-width:0 0 var(--padding-xs, 8px) var(--padding-xs, 8px)}.ff-data-list-framework{height:100%;--sider-width: 280px;--col-num: 1;--col-width: 200px;--gap: 8px;--item-bg-color: #fff;--item-box-shadow: 0px 0px 8px rgba(0, 0, 0, .08);--item-selected-color: rgba(0, 122, 255, .1);--item-selected-bg-color: rgba(0, 122, 255, .01);--item-selected-mark-size: 8px;--item-selected-mark-color: rgba(0, 122, 255, .8);--item-selected-border-width: 1px;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-content{flex:1;overflow-y:auto;padding:calc(var(--gap) / 2)}.ff-data-list-framework :where(.data-list-grid-layout-item){border-radius:4px;background-color:var(--item-bg-color);border:var(--item-selected-border-width) solid transparent;box-shadow:var(--item-box-shadow);transition:border-color .2s,background-color .2s}.ff-data-list-framework .data-list-grid-layout-item{display:flex;flex-direction:column;justify-content:space-between;row-gap:var(--gap);position:relative;overflow-x:hidden}.ff-data-list-framework .data-list-grid-layout-item.is-selectable:hover{background-color:var(--item-selected-bg-color)}.ff-data-list-framework .data-list-grid-layout-item.is-selected{background-color:var(--item-selected-bg-color);border-color:var(--item-selected-color)}.ff-data-list-framework .data-list-grid-layout-item.is-selected.is-mark-selected:after{content:" ";display:block;position:absolute;width:0px;height:0px;top:0;right:0;border-style:solid;border-color:var(--item-selected-mark-color) transparent;border-width:var(--item-selected-mark-size) 0 0 var(--item-selected-mark-size)}.ff-data-list-framework .data-list-grid-layout-item .data-list-grid-layout-item-container{padding:var(--gap)}.ff-data-list-framework .data-list-grid-layout-item .data-list-grid-layout-item-actions{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #f0f0f0;height:32px}.ff-data-list-framework .data-list-grid-layout-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 .data-list-grid-layout-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-empty{display:flex;align-items:center;justify-content:center}.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-header{margin-bottom:calc(var(--margin-sm) / 2)}.ff-popover-header:empty{display:none}.ff-popover-footer{padding-top:12px}.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-close{font-size:24px;top:14px;right:0;position:absolute;color:#000;opacity:.5;background:transparent;line-height:1}.ff-drawer-close:hover{opacity:.65}.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-header{padding:16px 8px;border-bottom:1px solid rgba(5,5,5,.06)}.ff-drawer-footer{border-top:1px solid rgba(5,5,5,.06);padding:12px 8px}.ff-drawer-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;width:fit-content;min-width:max(35vw,248px);padding:0;margin:0 auto}.ff-modal-close{position:fixed;top:32px;right:32px;display:flex;color:#fff;background-color:#0000001a;border-radius:50%;font-size:18px;padding:12px;outline:0;border:0;transition:background-color .3s}.ff-modal-close:hover{background-color:#0003}.ff-modal-close svg{display:block}.ff-modal-header:has(.ff-popup-title),.ff-modal-header:has(.ff-popup-sub-title){margin-bottom:8px}.ff-modal-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{display:flex;flex-direction:column;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}.ff-popup-close:disabled{pointer-events:none}.ff-popup{display:flex;flex-direction:column}.ff-popup-title,.ff-popup-sub-title{display:inline}.ff-popup-title{font-size:16px;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-reserved-extras:empty,.ff-popup-extras:empty,.ff-popup-actions:empty{display:none}.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}input:-webkit-autofill,textarea:-webkit-autofill,select:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #fff inset!important;-webkit-text-fill-color:#000!important;transition:background-color 9999s ease-in-out 0s}: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-cell-editable:after{content:" ";display:block;position:absolute;width:0px;height:0px;bottom:0;right:0;border-style:solid;border-color:rgba(0,0,0,.45) transparent;border-width:0 0 var(--padding-xs, 8px) var(--padding-xs, 8px)}.ff-data-list-framework{height:100%;--sider-width: 280px;--col-num: 1;--col-width: 200px;--gap: 8px;--item-bg-color: #fff;--item-box-shadow: 0px 0px 8px rgba(0, 0, 0, .08);--item-selected-color: rgba(0, 122, 255, .1);--item-selected-bg-color: rgba(0, 122, 255, .01);--item-selected-mark-size: 8px;--item-selected-mark-color: rgba(0, 122, 255, .8);--item-selected-border-width: 1px;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-content{flex:1;overflow-y:auto;padding:calc(var(--gap) / 2)}.ff-data-list-framework :where(.data-list-grid-layout-item){border-radius:4px;background-color:var(--item-bg-color);border:var(--item-selected-border-width) solid transparent;box-shadow:var(--item-box-shadow);transition:border-color .2s,background-color .2s}.ff-data-list-framework .data-list-grid-layout-item{display:flex;flex-direction:column;justify-content:space-between;row-gap:var(--gap);position:relative;overflow-x:hidden}.ff-data-list-framework .data-list-grid-layout-item.is-selectable:hover{background-color:var(--item-selected-bg-color)}.ff-data-list-framework .data-list-grid-layout-item.is-selected{background-color:var(--item-selected-bg-color);border-color:var(--item-selected-color)}.ff-data-list-framework .data-list-grid-layout-item.is-selected.is-mark-selected:after{content:" ";display:block;position:absolute;width:0px;height:0px;top:0;right:0;border-style:solid;border-color:var(--item-selected-mark-color) transparent;border-width:var(--item-selected-mark-size) 0 0 var(--item-selected-mark-size)}.ff-data-list-framework .data-list-grid-layout-item .data-list-grid-layout-item-container{padding:var(--gap)}.ff-data-list-framework .data-list-grid-layout-item .data-list-grid-layout-item-actions{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #f0f0f0;height:32px}.ff-data-list-framework .data-list-grid-layout-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 .data-list-grid-layout-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-empty{display:flex;align-items:center;justify-content:center}.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-header{margin-bottom:calc(var(--margin-sm) / 2)}.ff-popover-header:empty{display:none}.ff-popover-footer{padding-top:12px}.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-close{font-size:24px;top:14px;right:0;position:absolute;color:#000;opacity:.5;background:transparent;line-height:1}.ff-drawer-close:hover{opacity:.65}.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-top .ff-drawer-content,.ff-drawer-bottom .ff-drawer-content{height:auto;max-height:100vh}.ff-drawer-content{width:100%;height:100%;overflow:auto;background-color:var(--popup-bg-color, #fff);pointer-events:auto}.ff-drawer-header{padding:16px 8px;border-bottom:1px solid rgba(5,5,5,.06)}.ff-drawer-footer{border-top:1px solid rgba(5,5,5,.06);padding:12px 8px}.ff-drawer-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;width:fit-content;min-width:max(35vw,248px);padding:0;margin:0 auto}.ff-modal-close{position:fixed;top:32px;right:32px;display:flex;color:#fff;background-color:#0000001a;border-radius:50%;font-size:18px;padding:12px;outline:0;border:0;transition:background-color .3s}.ff-modal-close:hover{background-color:#0003}.ff-modal-close svg{display:block}.ff-modal-header:has(.ff-popup-title),.ff-modal-header:has(.ff-popup-sub-title){margin-bottom:8px}.ff-modal-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{display:flex;flex-direction:column;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}.ff-popup-close:disabled{pointer-events:none}.ff-popup{display:flex;flex-direction:column}.ff-popup-title,.ff-popup-sub-title{display:inline}.ff-popup-title{font-size:16px;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-reserved-extras:empty,.ff-popup-extras:empty,.ff-popup-actions:empty{display:none}.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 52bb7c1..ffb34a4 100644 --- a/dist/utils.js +++ b/dist/utils.js @@ -1,5 +1,5 @@ import "lodash"; -import { S as r, a0 as i, W as g, V as o, X as P, P as m, $ as p, Q as U, _ as d, Y as h, Z as k, T as n, O as f, U as l } from "./common/main-CVUJh_JV.js"; +import { S as r, a0 as i, W as g, V as o, X as P, P as m, $ as p, Q as U, _ as d, Y as h, Z as k, T as n, O as f, U as l } from "./common/main-BF14mrhu.js"; import "./common/vender-hQk7ADWo.js"; export { r as deepSome, diff --git a/dist/virtual-fs.js b/dist/virtual-fs.js index 5518d4e..afe053f 100644 --- a/dist/virtual-fs.js +++ b/dist/virtual-fs.js @@ -1,5 +1,5 @@ import "pathe"; -import { aG as o, aH as r } from "./common/main-CVUJh_JV.js"; +import { aG as o, aH as r } from "./common/main-BF14mrhu.js"; export { o as default, r as toTreePaths diff --git a/package.json b/package.json index d7c5075..054a422 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ff", "private": true, - "version": "0.6.51", + "version": "0.6.52", "author": "www.fsdpf.com", "type": "module", "main": "./dist/index.js",