diff --git a/dist/button.js b/dist/button.js index 1b989ea..b7188bd 100644 --- a/dist/button.js +++ b/dist/button.js @@ -1,4 +1,4 @@ -import { a9 as s, a8 as u, aa as e } from "./common/main-D0zIbJsd.js"; +import { a9 as s, a8 as u, aa as e } from "./common/main-iMRzW1Jg.js"; export { s as auth, u as default, diff --git a/dist/common/main-D0zIbJsd.js b/dist/common/main-iMRzW1Jg.js similarity index 76% rename from dist/common/main-D0zIbJsd.js rename to dist/common/main-iMRzW1Jg.js index c910793..9bb023d 100644 --- a/dist/common/main-D0zIbJsd.js +++ b/dist/common/main-iMRzW1Jg.js @@ -1,10 +1,10 @@ -var Fi = Object.defineProperty; +var Ei = Object.defineProperty; var Ot = (e) => { throw TypeError(e); }; -var Ri = (e, t, i) => t in e ? Fi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i; -var S = (e, t, i) => Ri(e, typeof t != "symbol" ? t + "" : t, i), jt = (e, t, i) => t.has(e) || Ot("Cannot " + i); -var y = (e, t, i) => (jt(e, t, "read from private field"), i ? i.call(e) : t.get(e)), O = (e, t, i) => t.has(e) ? Ot("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, i), H = (e, t, i, n) => (jt(e, t, "write to private field"), n ? n.call(e, i) : t.set(e, i), i); +var Fi = (e, t, i) => t in e ? Ei(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i; +var S = (e, t, i) => Fi(e, typeof t != "symbol" ? t + "" : t, i), jt = (e, t, i) => t.has(e) || Ot("Cannot " + i); +var y = (e, t, i) => (jt(e, t, "read from private field"), i ? i.call(e) : t.get(e)), j = (e, t, i) => t.has(e) ? Ot("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, i), H = (e, t, i, n) => (jt(e, t, "write to private field"), n ? n.call(e, i) : t.set(e, i), i); var Lt = (e, t, i, n) => ({ set _(r) { H(e, t, r, i); @@ -14,7 +14,7 @@ var Lt = (e, t, i, n) => ({ } }); import { jsx as g, jsxs as A } from "react/jsx-runtime"; -import k, { useEffect as V, useState as F, useCallback as X, useMemo as W, useRef as U, useContext as ce, useId as Ae, isValidElement as Oi, useLayoutEffect as ji } from "react"; +import k, { useEffect as V, useState as O, useCallback as X, useMemo as D, useRef as U, useContext as ce, useId as Ae, isValidElement as Oi, useLayoutEffect as ji } from "react"; import w from "prop-types"; import M from "classnames"; import * as At from "react-is"; @@ -23,33 +23,33 @@ import u from "lodash"; import te, { FieldContext as _t, Field as Gt } from "rc-field-form"; import { N as je, a as Le, P as pt, S as Ai } from "./vender-C0IfHU5B.js"; import Yt from "immutability-helper"; -import { Form as Xe, Input as Vi, Button as Ze, Pagination as Ii, Tree as Mi, Breadcrumb as zi, Table as Bi, Empty as qi, Popconfirm as Di, Tooltip as Ui, Popover as Wi } from "antd"; +import { Form as Xe, Input as Vi, Button as Ze, Pagination as Ii, Tree as Mi, Breadcrumb as zi, Table as Bi, Empty as qi, Popconfirm as Wi, Tooltip as Di, Popover as Ui } from "antd"; import { useMergedState as Hi } from "rc-util"; import { generatePath as Ji, useInRouterContext as Xt, useParams as Ki, useLocation as _i, createBrowserRouter as Gi, Navigate as Yi } from "react-router-dom"; import "rc-util/lib/hooks/useMergedState"; import Xi from "rc-drawer"; import Qi from "rc-dialog"; -var Ne, Me, Ee, ue, Se, ve; +var Ne, Me, Re, ue, Se, ve; class Qt { constructor(t, i) { - O(this, Ne, /* @__PURE__ */ new Map()); - O(this, Me, !0); - O(this, Ee, []); - O(this, ue); - O(this, Se, () => y(this, ue)); - O(this, ve, () => Promise.resolve()); + j(this, Ne, /* @__PURE__ */ new Map()); + j(this, Me, !0); + j(this, Re, []); + j(this, ue); + j(this, Se, () => y(this, ue)); + j(this, ve, () => Promise.resolve()); S(this, "get", (...t) => new Promise((i, n) => { const r = JSON.stringify(t); if (y(this, Ne).has(r)) return i(y(this, ve).call(this, y(this, ue), ...t)); - if (y(this, ue) === void 0) y(this, Ee).push([t, i, n]), y(this, Me) && (H(this, Me, !1), Promise.resolve(typeof y(this, Se) == "function" ? y(this, Se).call(this) : y(this, Se)).then((a) => H(this, ue, a || null)).finally(() => { - y(this, Ee).forEach(([a, o, s]) => { + if (y(this, ue) === void 0) y(this, Re).push([t, i, n]), y(this, Me) && (H(this, Me, !1), Promise.resolve(typeof y(this, Se) == "function" ? y(this, Se).call(this) : y(this, Se)).then((a) => H(this, ue, a || null)).finally(() => { + y(this, Re).forEach(([a, o, s]) => { try { const l = y(this, ve).call(this, y(this, ue), ...a); y(this, Ne).set(JSON.stringify(a), l), o(l); } catch (l) { s(l); } - }), y(this, Ee).length = 0; + }), y(this, Re).length = 0; })); else { const a = y(this, ve).call(this, y(this, ue), ...t); @@ -59,33 +59,33 @@ class Qt { H(this, ve, i), H(this, Se, t); } } -Ne = new WeakMap(), Me = new WeakMap(), Ee = new WeakMap(), ue = new WeakMap(), Se = new WeakMap(), ve = new WeakMap(); -const cr = () => g("div", { children: "Empty" }), We = k.createContext({ ele: {}, mount: () => { +Ne = new WeakMap(), Me = new WeakMap(), Re = new WeakMap(), ue = new WeakMap(), Se = new WeakMap(), ve = new WeakMap(); +const cr = () => g("div", { children: "Empty" }), Ue = k.createContext({ ele: {}, mount: () => { }, unmount: () => { } }), G = ({ rootClassName: e, className: t, children: i, actions: n, title: r, subTitle: a, extras: o, style: s = {} }) => { - const { mount: l, unmount: p } = k.useContext(We); + const { mount: l, unmount: p } = k.useContext(Ue); return G.Action({ children: n }), G.Title({ children: r }), G.SubTitle({ children: a }), G.Extra({ children: o }), V(() => (l("rootClassName", e), () => p(e)), [e]), g("div", { className: M("ff-container", t), style: s, children: i }); }, Ye = (e) => ({ children: t, className: i }) => { - const { mount: n, unmount: r } = k.useContext(We); + const { mount: n, unmount: r } = k.useContext(Ue); return V(() => (t && n(e, k.createElement("div", { key: `ff-${e}`, className: M(`ff-popup-${e}`, i) }, t)), () => r(e)), [i, t]), null; }; G.Action = Ye("actions"), G.Title = Ye("title"), G.SubTitle = Ye("sub-title"), G.Extra = Ye("extras"), G.propTypes = { className: w.string, style: w.object, title: w.any, subTitle: w.any, actions: w.any, extras: w.any }; const dr = () => g(G, { className: "ff-loading", children: A("div", { className: "loader", children: [A("div", { className: "square", children: [g("span", {}), g("span", {}), g("span", {})] }), A("div", { className: "square", children: [g("span", {}), g("span", {}), g("span", {})] }), A("div", { className: "square", children: [g("span", {}), g("span", {}), g("span", {})] }), A("div", { className: "square", children: [g("span", {}), g("span", {}), g("span", {})] })] }) }), ur = () => g("div", { children: "NotFound" }), Zt = ({ children: e }) => { - const [t, i] = F({}), n = X((a, o) => i((s) => ({ ...s, [a]: o })), []), r = X((a) => i((o) => ({ ...o, [a]: void 0 })), []); - return typeof (e == null ? void 0 : e.type) == "string" ? e : g(We.Provider, { value: { ele: t, mount: n, unmount: r }, children: k.cloneElement(e, { className: t.rootClassName, title: t.title, subTitle: t["sub-title"], actions: t.actions, extras: t.extras }) }); + const [t, i] = O({}), n = X((a, o) => i((s) => ({ ...s, [a]: o })), []), r = X((a) => i((o) => ({ ...o, [a]: void 0 })), []); + return typeof (e == null ? void 0 : e.type) == "string" ? e : g(Ue.Provider, { value: { ele: t, mount: n, unmount: r }, children: k.cloneElement(e, { className: t.rootClassName, title: t.title, subTitle: t["sub-title"], actions: t.actions, extras: t.extras }) }); }; Zt.propTypes = { children: w.element.isRequired }; const Vt = { 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"] }, vt = ({ type: e, props: t }) => g("i", { ...t, children: g("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", fill: "currentColor", children: (Vt[e] || Vt.info).map((i, n) => g("path", { d: i }, n)) }) }), ei = ({ className: e, content: t, icon: i, $close: n }) => A(k.Fragment, { children: [i && g("div", { className: M("ff-notification-icon", e), children: g(vt, { type: i }) }), t] }), Zi = ({}) => g(G, { children: "Confirm" }); -var pe, Fe; +var pe, Ee; const ne = class ne { constructor() { - O(this, Fe, /* @__PURE__ */ new Map()); - S(this, "init", (t) => H(this, Fe, new Map(t))); - S(this, "check", (t) => !y(this, Fe).has(t) || y(this, Fe).get(t)); + j(this, Ee, /* @__PURE__ */ new Map()); + S(this, "init", (t) => H(this, Ee, new Map(t))); + S(this, "check", (t) => !y(this, Ee).has(t) || y(this, Ee).get(t)); if (y(ne, pe)) return y(ne, pe); } }; -pe = new WeakMap(), Fe = new WeakMap(), O(ne, pe, null), S(ne, "getInstance", () => (y(ne, pe) || H(ne, pe, new ne()), y(ne, pe))); +pe = new WeakMap(), Ee = new WeakMap(), j(ne, pe, null), S(ne, "getInstance", () => (y(ne, pe) || H(ne, pe, new ne()), y(ne, pe))); let mt = ne; const en = mt.getInstance(), tn = (e, t, i = "children") => { if (u.isEmpty(e)) return {}; @@ -101,13 +101,13 @@ const en = mt.getInstance(), tn = (e, t, i = "children") => { var me, ze; const re = class re { constructor() { - O(this, ze, null); + j(this, ze, null); S(this, "init", (t) => H(this, ze, t)); S(this, "get", (t, i) => u.get(y(this, ze), t, i)); if (y(re, me)) return y(re, me); } }; -me = new WeakMap(), ze = new WeakMap(), O(re, me, null), S(re, "getInstance", () => (y(re, me) || H(re, me, new re()), y(re, me))); +me = new WeakMap(), ze = new WeakMap(), j(re, me, null), S(re, "getInstance", () => (y(re, me) || H(re, me, new re()), y(re, me))); let ht = re; const Ve = ht.getInstance(), It = { null2json: (e) => Object.create(), null2array: (e) => [], null2number: (e) => 0, null2bool: (e) => !1, null2string: (e) => "", null2integer: (e) => 0, null2float: (e) => 0, string2json: (e) => e ? JSON.parse(e) : "{}", string2array: (e) => e.substr(0, 1) === "[" && e.substr(-1) === "]" ? JSON.parse(e) : e.split(","), string2number: (e) => e == "" ? 0 : +e, string2integer: (e) => e == "" ? 0 : +e, string2float: (e) => e == "" ? 0 : +e, string2bool: (e) => { switch (`${e}`.toLowerCase()) { @@ -185,8 +185,8 @@ const Ve = ht.getInstance(), It = { null2json: (e) => Object.create(), null2arra var tt, Be, qe, it; const nt = class nt { constructor(...t) { - O(this, Be, []); - O(this, qe, (t) => { + j(this, Be, []); + j(this, qe, (t) => { var i; for (let n of t) Array.isArray(n[0]) ? y(this, qe).call(this, n) : y(this, Be).push(y(i = nt, tt).call(i, n[0], n[1])); }); @@ -202,8 +202,8 @@ const nt = class nt { }, t); }); S(this, "toRender", (t, i, n = null) => k.createElement(y(this, it), { value: t, record: i }, n)); - O(this, it, ({ value: t, record: i, children: n }) => { - const [r, a] = F(n); + j(this, it, ({ value: t, record: i, children: n }) => { + const [r, a] = O(n); return ot(() => { let o = !1; return a(n), this.toValue(t, i).then((s) => ee(s, "string")).then((s) => !o && a(s)).catch((s) => !o && a(`${s}`)), () => o = !0; @@ -212,19 +212,19 @@ const nt = class nt { y(this, qe).call(this, t); } }; -tt = new WeakMap(), Be = new WeakMap(), qe = new WeakMap(), it = new WeakMap(), O(nt, tt, u.memoize((t, i) => le.getWidgetComponent(t).then((n) => { +tt = new WeakMap(), Be = new WeakMap(), qe = new WeakMap(), it = new WeakMap(), j(nt, tt, u.memoize((t, i) => le.getWidgetComponent(t).then((n) => { var r; return ((r = n.default) == null ? void 0 : r.call(n, i)) || ((a) => a); }), (t, i) => `${t}::${ee(i, "string")}`)); let et = nt; -const nn = (e, t = {}) => W(() => e == null ? void 0 : e.map(({ widgetByJs: i, widgetByJsSetting: n, ...r }, a) => i ? { ...r, render: (o, s) => new et([i, n]).toRender(o, s, "-") } : r), [e, t]), fr = (e) => { - const [t, i] = F({}); +const nn = (e, t = {}) => D(() => e == null ? void 0 : e.map(({ widgetByJs: i, widgetByJsSetting: n, ...r }, a) => i ? { ...r, render: (o, s) => new et([i, n]).toRender(o, s, "-") } : r), [e, t]), fr = (e) => { + const [t, i] = O({}); return V(() => { let n = !1; return e && L.get(`/api/_/${e}`).then((r) => u.pick(r, ["uuid", "name", "code", "resource", "marginX", "marginY", "cols", "rowHeight", "primaryKey", "columns", "itemOperations", "batchOperations", "isConditionFormLayout", "layout", "tabs", "pageSize", "layoutConfig"])).then((r) => !n && i(r)), () => n = !0; }, [e]), t; }, yr = (e, t = {}) => { - const [i, n] = F({ dataSource: [] }); + const [i, n] = O({ dataSource: [] }); return Je(() => { let r = !1; return e && L.get(`/api/${e}/${L.encode({ page: 1, ...t })}`).then((a) => !r && n(a)), () => r = !0; @@ -234,7 +234,7 @@ const nn = (e, t = {}) => W(() => e == null ? void 0 : e.map(({ widgetByJs: i, w return X((a) => e == null ? void 0 : e.filter((o) => !o.uuid || !t.has(o.uuid) || t.get(o.uuid).some((s) => s == r(a))), [e, t, r]); }, ft = (e = [], t = /* @__PURE__ */ new Map(), i = [], n = "id", r) => { const a = X(r ? (o) => u.get(o, n, u.get(o, [r, n])) : (o) => u.get(o, n), [n, r]); - return W(() => { + return D(() => { if (u.isEmpty(e) || !e.some(({ uuid: s }) => en.check(s))) return !1; if (u.isEmpty(t) || u.isEmpty(i)) return !0; const o = i.map((s) => a(s)); @@ -246,15 +246,15 @@ const nn = (e, t = {}) => W(() => e == null ? void 0 : e.map(({ widgetByJs: i, w var c, d; if (a.current = !1, l === 1) return (c = e.onReload) == null ? void 0 : c.call(e); if (l === 2) { - const f = u.get(p, "__PARENT_ID__", ""), m = u.get(p, i, u.get(p, [n, i], "")), h = u.findIndex(o.current, ["__PARENT_ID__", f]), C = u.findIndex(h > -1 ? u.get(o.current, [h, "children"]) : o.current, [i, m]); + const f = u.get(p, "__PARENT_ID__", ""), h = u.get(p, i, u.get(p, [n, i], "")), m = u.findIndex(o.current, ["__PARENT_ID__", f]), C = u.findIndex(m > -1 ? u.get(o.current, [m, "children"]) : o.current, [i, h]); if (C === -1) return (d = e.onReload) == null ? void 0 : d.call(e); - Promise.all([L.get(`/api/${t}/detail/${m}`), L.post(`/api/${t}/list-operations-access`, { ids: m })]).then(([b, x]) => { - const T = u.get(o.current, h > -1 ? [h, "children", C, "children"] : [C, "children"]); - o.current = Yt(o.current, h > -1 ? { [h]: { children: { $splice: [[C, 1, { ...b, children: T }]] } } } : { $splice: [[C, 1, { ...b, children: T }]] }); + Promise.all([L.get(`/api/${t}/detail/${h}`), L.post(`/api/${t}/list-operations-access`, { ids: h })]).then(([b, x]) => { + const $ = u.get(o.current, m > -1 ? [m, "children", C, "children"] : [C, "children"]); + o.current = Yt(o.current, m > -1 ? { [m]: { children: { $splice: [[C, 1, { ...b, children: $ }]] } } } : { $splice: [[C, 1, { ...b, children: $ }]] }); const P = new Map(x); s.current.forEach((N, I) => { - var D; - (D = P.get(I)) != null && D.some((z) => z == m) || s.current.set(I, N.filter((z) => z !== m)); + var W; + (W = P.get(I)) != null && W.some((z) => z == h) || s.current.set(I, N.filter((z) => z !== h)); }), P.forEach((N, I) => { s.current.has(I) ? s.current.set(I, u.uniq([...s.current.get(I) || [], ...N])) : s.current.set(I, N); }); @@ -265,24 +265,27 @@ const nn = (e, t = {}) => W(() => e == null ? void 0 : e.map(({ widgetByJs: i, w }]; }, an = (e, t) => { const i = st(), n = U(t), r = U(/* @__PURE__ */ new Map()), a = U([]), o = u.throttle((l) => { - a.current = [], L.list(e, u.pick({ ...n.current, ...l }, ["tab", "page", "pageSize", "condition", "sider", "keyword"])).then(({ keyword: p, condition: c, total: d, tab: f, sider: m, page: h, pageSize: C, operationsAccess: b, dataSource: x }) => { - n.current = { tab: f, condition: c, sider: m, keyword: p, total: d, pageSize: C, page: x != null && x.length ? h : 1 }, a.current = x, r.current = new Map(b), i(); + a.current = [], L.list(e, u.pick({ ...n.current, ...l }, ["tab", "page", "pageSize", "condition", "sider", "keyword"])).then(({ keyword: p, condition: c, total: d, tab: f, sider: h, page: m, pageSize: C, operationsAccess: b, dataSource: x }) => { + n.current = { tab: f, condition: c, sider: h, keyword: p, total: d, pageSize: C, page: x != null && x.length ? m : 1 }, a.current = x, r.current = new Map(b), i(); }); }, 380, { leading: !1, trailing: !0 }); ot(() => { a.current = [], e && o(t); }, [e, t]); - const s = W(() => u.pick(n.current, ["total", "tab", "page", "pageSize", "condition", "sider", "keyword"]), [n.current]); + const s = D(() => u.pick(n.current, ["total", "tab", "page", "pageSize", "condition", "sider", "keyword"]), [n.current]); return Object.assign(s, { onTabChange: (l) => o({ tab: l, page: 1 }), onPageChange: (l, p) => o({ page: l, pageSize: p }), onPageSizeChange: (l) => o({ pageSize: l, page: 1 }), onConditionChange: (l, p) => o({ keyword: p, condition: Yt(n.current.condition || {}, { $merge: l || {} }), page: 1 }), onSiderChange: (l) => o({ sider: l, page: 1 }), onKeywordChange: (l) => o({ keyword: l, page: 1 }), itemOperationsAccess: r.current, dataSource: a.current, onReload: o, payload: t == null ? void 0 : t.payload }); -}, sn = ({ listCode: e, className: t, layouts: i, dataSource: n, isPaginate: r, isItemOperations: a, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: p, resource: c, primaryKey: d, title: f, itemGridLayout: m, $setting: h, tabs: C, isConditionFormLayout: b, isTreeSider: x, treeSiderConfig: T }) => { - const { classNames: P, onClickCallback: N } = ce(ie), I = si(l, p, d, c), D = X((z, j, R) => g(on, { className: M("ff-data-list-framework-item", P.item), operations: a ? I(j) : [], data: c ? { [c]: j } : j, children: z, onClickCallback: N }), [c, d, a, N, l, p]); - return A("div", { className: M("ff-data-list-framework", t), children: [g(i.sider, { isTreeSider: x, ...T }), A("div", { className: M("ff-data-list-container", P == null ? void 0 : P.container), children: [g(i.filter, { isConditionFormLayout: b }), g(i.toolbar, { title: f, tabs: C }), g(bn, { ...m, style: { "--col-num": (h == null ? void 0 : h.colNum) || 1 }, primaryKey: d, itemRender: D, dataSource: n }), g(i.footer, { isPaginate: r, isOperations: o, operations: s })] })] }); -}, on = ({ className: e, operations: t, children: i, data: n, onClickCallback: r }) => A("div", { className: M("data-list-grid-layout-item-container", e), children: [i, !!(t != null && t.length) && g("div", { className: "data-list-grid-layout-item-actions", children: t.map((a) => g("span", { className: "data-list-grid-layout-item-action", children: g(v.Link, { uuid: a.uuid, type: a.type, name: a.name, widget: a.widget, widgetType: a.widgetType, widgetProps: a.widgetProps, widgetSetting: a.widgetSetting, widgetContainerProps: a.widgetContainerSetting, data: n, confirm: a.confirm, onAfterClick: (o) => o !== !1 && (r == null ? void 0 : r(a.isRefresh, n)) }, a.uuid || Ae()) }, (a == null ? void 0 : a.uuid) || Ae())) })] }), ln = ({ listCode: e, className: t, layouts: i, dataSource: n, columns: r, isItemOperations: a, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: p, resource: c, primaryKey: d, title: f, tabs: m, isPaginate: h, isTreeSider: C, treeSiderConfig: b, isConditionFormLayout: x, ...T }) => { - const { classNames: P, onClickCallback: N } = ce(ie), I = si(l, p, d, c), D = ft(l, p, n, d, c); - return A("div", { className: M("ff-data-table-framework", t), children: [g(i.sider, { isTreeSider: C, ...b }), A("div", { className: M("ff-data-table-container", P == null ? void 0 : P.container), children: [g(i.filter, { isConditionFormLayout: x }), g(i.toolbar, { title: f, tabs: m }), g(mn, { ...T, primaryKey: d, className: "ff-data-table-content", columns: r, dataSource: n, operationRender: D ? (z) => { - var j; - return g("div", { className: "ff-data-table-actions", children: (j = I(z)) == null ? void 0 : j.map((R, B) => g(v.Link, { size: "small", uuid: R.uuid, type: R.type, name: R.name, widget: R.widget, widgetType: R.widgetType, widgetProps: R.widgetProps, widgetData: R.widgetData, widgetSetting: R.widgetSetting, widgetContainerProps: R.widgetContainerSetting, data: z, confirm: R.confirm, onAfterClick: ($) => $ !== !1 && (N == null ? void 0 : N(R.isRefresh, z)) }, R.uuid || B)) }); - } : null }), g(i.footer, { isPaginate: h, isOperations: o, operations: s })] })] }); +}, sn = ({ listCode: e, className: t, layouts: i, dataSource: n, isPaginate: r, isItemOperations: a, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: p, resource: c, primaryKey: d, title: f, itemGridLayout: h, $setting: m, tabs: C, isConditionFormLayout: b, isTreeSider: x, treeSiderConfig: $ }) => { + const { classNames: P, onClickCallback: N } = ce(ie), I = si(l, p, d, c), W = X((E, R, B) => g(on, { className: M("ff-data-list-framework-item", P.item), operations: a ? I(R) : [], data: c ? { [c]: R } : R, children: E, onClickCallback: N }), [c, d, a, N, l, p]), z = D(() => { + let E = {}; + return m != null && m.column && (E["--col-num"] = m.column), m != null && m.colNum && (E["--col-num"] = m.colNum), m != null && m.colWidth && (E["--col-width"] = m.colWidth), E; + }, [m]); + return A("div", { className: M("ff-data-list-framework", t), children: [g(i.sider, { isTreeSider: x, ...$ }), A("div", { className: M("ff-data-list-container", P == null ? void 0 : P.container), children: [g(i.filter, { isConditionFormLayout: b }), g(i.toolbar, { title: f, tabs: C }), g(bn, { ...h, style: z, primaryKey: d, itemRender: W, dataSource: n }), g(i.footer, { isPaginate: r, isOperations: o, operations: s })] })] }); +}, on = ({ className: e, operations: t, children: i, data: n, onClickCallback: r }) => A("div", { className: M("data-list-grid-layout-item-container", e), children: [i, !!(t != null && t.length) && g("div", { className: "data-list-grid-layout-item-actions", children: t.map((a) => g("span", { className: "data-list-grid-layout-item-action", children: g(v.Link, { uuid: a.uuid, type: a.type, name: a.name, widget: a.widget, widgetType: a.widgetType, widgetProps: a.widgetProps, widgetSetting: a.widgetSetting, widgetContainerProps: a.widgetContainerSetting, data: n, confirm: a.confirm, onAfterClick: (o) => o !== !1 && (r == null ? void 0 : r(a.isRefresh, n)) }, a.uuid || Ae()) }, (a == null ? void 0 : a.uuid) || Ae())) })] }), ln = ({ listCode: e, className: t, layouts: i, dataSource: n, columns: r, isItemOperations: a, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: p, resource: c, primaryKey: d, title: f, tabs: h, isPaginate: m, isTreeSider: C, treeSiderConfig: b, isConditionFormLayout: x, ...$ }) => { + const { classNames: P, onClickCallback: N } = ce(ie), I = si(l, p, d, c), W = ft(l, p, n, d, c); + return A("div", { className: M("ff-data-table-framework", t), children: [g(i.sider, { isTreeSider: C, ...b }), A("div", { className: M("ff-data-table-container", P == null ? void 0 : P.container), children: [g(i.filter, { isConditionFormLayout: x }), g(i.toolbar, { title: f, tabs: h }), g(mn, { ...$, primaryKey: d, className: "ff-data-table-content", columns: r, dataSource: n, operationRender: W ? (z) => { + var E; + return g("div", { className: "ff-data-table-actions", children: (E = I(z)) == null ? void 0 : E.map((R, B) => g(v.Link, { size: "small", uuid: R.uuid, type: R.type, name: R.name, widget: R.widget, widgetType: R.widgetType, widgetProps: R.widgetProps, widgetData: R.widgetData, widgetSetting: R.widgetSetting, widgetContainerProps: R.widgetContainerSetting, data: z, confirm: R.confirm, onAfterClick: (T) => T !== !1 && (N == null ? void 0 : N(R.isRefresh, z)) }, R.uuid || B)) }); + } : null }), g(i.footer, { isPaginate: m, isOperations: o, operations: s })] })] }); }, ie = k.createContext({ listCode: "", classNames: {}, getBase62params: (e, t) => { }, onReload: () => { }, onClickCallback: () => { @@ -296,64 +299,64 @@ const nn = (e, t = {}) => W(() => e == null ? void 0 : e.map(({ widgetByJs: i, w const o = { "--grid-layout-h": `${n}`, "--grid-layout-w": `${i}`, "--grid-layout-x": `${e}`, "--grid-layout-y": `${t}`, "--grid-layout-row-height-offset": "0px" }; return r != null && r.autoHeight ? o.height = "fit-content" : o["--grid-layout-row"] = `${n}`, r != null && r.alignItems && (o["--grid-layout-box-align-items"] = r.alignItems), r != null && r.justifyContent && (o["--grid-layout-box-justify-content"] = r.justifyContent), o["--grid-layout-box-margin"] = Mt(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"] = Mt(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; }, Mt = (e, t, i, n) => `${e || 0}px ${t || 0}px ${i || 0}px ${n || 0}px`, wr = (e = "Text", t = "@pkg/ff/grid-layouts") => e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`, li = ({ className: e, isConditionFormLayout: t }) => { - var f, m; - const [i, n] = F({}), { listCode: r, onKeywordChange: a, onConditionChange: o, getBase62params: s, classNames: l } = k.useContext(ie), { keyword: p, condition: c } = (s == null ? void 0 : s()) || {}, [d] = Xe.useForm(); + var f, h; + const [i, n] = O({}), { listCode: r, onKeywordChange: a, onConditionChange: o, getBase62params: s, classNames: l } = k.useContext(ie), { keyword: p, condition: c } = (s == null ? void 0 : s()) || {}, [d] = Xe.useForm(); return V(() => { - r && t && L.get(`/api/_/${r}/list-condition-form-layout`).then(({ resource: h, marginX: C, marginY: b, rowHeight: x, cols: T, fields: P }) => { - n({ resource: h, itemMargin: [C, b], rowHeight: x, cols: T, fields: P }); + r && t && L.get(`/api/_/${r}/list-condition-form-layout`).then(({ resource: m, marginX: C, marginY: b, rowHeight: x, cols: $, fields: P }) => { + n({ resource: m, itemMargin: [C, b], rowHeight: x, cols: $, fields: P }); }).catch(() => n({})); }, [r, t]), V(() => { d.setFieldsValue({ keyword: p, ...c }); - }, [JSON.stringify([p, c])]), g("div", { className: M("ff-data-list-filter", l.filter, e), children: g(Xe, { form: d, layout: "vertical", autoComplete: "off", onFinish: ((f = i.fields) == null ? void 0 : f.length) > 1 ? (h) => o({ [i.resource]: h[i.resource] }, h.keyword) : () => { - }, onValuesChange: (h) => { - u.isEmpty(u.omit(h, ["keyword"])) || d.submit(); - }, children: ((m = i.fields) == null ? void 0 : m.length) > 1 ? g($t, { ...i, children: g(cn, { onReset: () => { - const { keyword: h, condition: C } = s("init") || {}; - d.setFieldsValue({ keyword: h, ...C }); - } }) }) : g("div", { className: "ff-data-list-filter-default-form ff-grid-layout-form", children: g("div", { className: "grid-layout-item", style: oi(20, 0, 5, 2), children: g(Xe.Item, { name: ["keyword"], children: g(Vi.Search, { allowClear: !0, enterButton: "搜索", placeholder: "多关键字 | 分割", onSearch: (h) => a(h) }) }) }) }) }) }); + }, [JSON.stringify([p, c])]), g("div", { className: M("ff-data-list-filter", l.filter, e), children: g(Xe, { form: d, layout: "vertical", autoComplete: "off", onFinish: ((f = i.fields) == null ? void 0 : f.length) > 1 ? (m) => o({ [i.resource]: m[i.resource] }, m.keyword) : () => { + }, onValuesChange: (m) => { + u.isEmpty(u.omit(m, ["keyword"])) || d.submit(); + }, children: ((h = i.fields) == null ? void 0 : h.length) > 1 ? g(Tt, { ...i, children: g(cn, { onReset: () => { + const { keyword: m, condition: C } = s("init") || {}; + d.setFieldsValue({ keyword: m, ...C }); + } }) }) : g("div", { className: "ff-data-list-filter-default-form ff-grid-layout-form", children: g("div", { className: "grid-layout-item", style: oi(20, 0, 5, 2), children: g(Xe.Item, { name: ["keyword"], children: g(Vi.Search, { allowClear: !0, enterButton: "搜索", placeholder: "多关键字 | 分割", onSearch: (m) => a(m) }) }) }) }) }) }); }, cn = ({ cols: e, fields: t, onReset: i }) => { - const [n, r] = F(!1), a = W(() => t == null ? void 0 : t.toReversed().some((o) => o.y > 1 || o.x + o.w >= e - 5), [e, t]); + const [n, r] = O(!1), a = D(() => t == null ? void 0 : t.toReversed().some((o) => o.y > 1 || o.x + o.w >= e - 5), [e, t]); return A(Xe.Item, { label: " ", style: { "--item-span": 5 }, className: M("ff-data-list-filter-actions", { expanded: n }), children: [g(Ze, { onClick: i, children: "重置" }), g(Ze, { type: "primary", htmlType: "submit", children: "查询" }), a && g(v.Link, { className: "ff-data-list-filter-expanded-button", widget: () => r((o) => !o), type: "primary", name: n ? "关闭" : "展开", icon: n ? "icon-up" : "icon-down", iconPosition: "end" })] }); }; li.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 dn = ({ className: e, operations: t, isOperations: i, isPaginate: n }) => { const { onPageChange: r, onPageSizeChange: a, onClickCallback: o, getBase62params: s } = k.useContext(ie), { total: l, page: p, pageSize: c } = (s == null ? void 0 : s()) || {}; - return i && !u.isEmpty(t) || n ? A("div", { className: M("ff-data-list-footer", e), children: [g("div", { className: "ff-data-list-actions", children: t == null ? void 0 : t.map((d, f) => g(v, { uuid: d.uuid, type: d.type, name: d.name, widget: d.widget, widgetType: d.widgetType, widgetProps: d.widgetProps, widgetData: d.widgetData, widgetSetting: d.widgetSetting, widgetContainerProps: d.widgetContainerSetting, onAfterClick: (m) => m !== !1 && (o == null ? void 0 : o(d.isRefresh, null)) }, d.uuid || f)) }), n && g(Ii, { size: "small", total: l, pageSize: c, showSizeChanger: !1, showTotal: (d) => `第 ${p} 页 / 总共 ${d} 条`, onChange: r, onShowSizeChange: a })] }) : null; + return i && !u.isEmpty(t) || n ? A("div", { className: M("ff-data-list-footer", e), children: [g("div", { className: "ff-data-list-actions", children: t == null ? void 0 : t.map((d, f) => g(v, { uuid: d.uuid, type: d.type, name: d.name, widget: d.widget, widgetType: d.widgetType, widgetProps: d.widgetProps, widgetData: d.widgetData, widgetSetting: d.widgetSetting, widgetContainerProps: d.widgetContainerSetting, onAfterClick: (h) => h !== !1 && (o == null ? void 0 : o(d.isRefresh, null)) }, d.uuid || f)) }), n && g(Ii, { size: "small", total: l, pageSize: c, showSizeChanger: !1, showTotal: (d) => `第 ${p} 页 / 总共 ${d} 条`, onChange: r, onShowSizeChange: a })] }) : null; }, un = [{ title: "parent 1", key: "0-0", children: [{ title: "parent 1-0", key: "0-0-0", disabled: !0, children: [{ title: "leaf", key: "0-0-0-0", disableCheckbox: !0 }, { title: "leaf", key: "0-0-0-1" }] }, { title: "parent 1-1", key: "0-0-1", children: [{ title: g("span", { style: { color: "#1677ff" }, children: "sss" }), key: "0-0-1-0" }] }] }], gn = ({ className: e, width: t = 280, isTreeSider: i }) => { const { classNames: n } = ce(ie); return i ? g(Mi.DirectoryTree, { className: M("ff-data-list-sider", n.sider, e), style: { "--sider-width": t }, showLine: !0, showIcon: !1, treeData: un }) : null; }, pn = ({ className: e, title: t, tabs: i }) => { const { getBase62params: n, onTabChange: r, onReload: a, classNames: o } = ce(ie), { tab: s } = (n == null ? void 0 : n()) || {}, [l, p] = Hi((i == null ? void 0 : i[0].value) ?? (i == null ? void 0 : i[0].code), { value: s, onChange: r }); return A("div", { className: M("ff-data-list-toolbar", o.toolbar, e), children: [g("div", { className: "ff-data-list-title", children: t }), g(zi, { className: "ff-data-list-tabs", itemRender: ({ label: c, code: d, value: f }) => g("span", { onClick: () => p(f ?? d), className: M("ff-data-list-tab", { active: (f ?? d) == l }), children: c }), items: i }), A("div", { className: "ff-data-list-actions", children: [g(v.Link, { icon: "icon-reload", widget: () => a() }), g(v.Link, { icon: "icon-setting" })] })] }); -}, ci = ({ isItemGridLayout: e, theme: t, themeProps: i, onClickCallback: n, onReload: r, listCode: a, total: o = 0, page: s = 0, onPageChange: l, pageSize: p = 30, onPageSizeChange: c, tab: d, onTabChange: f, keyword: m, onKeywordChange: h, condition: C, onConditionChange: b, sider: x, onSiderChange: T, layouts: P, classNames: N = {}, payload: I = {}, ...D }) => { - const [z, j] = F(), R = X(($, E) => { - const J = { tab: d, page: s, pageSize: p, keyword: m, sider: x, condition: C, total: o, payload: I }; - return $ && $ != "init" ? u.get(J, $, E) : J; - }, [JSON.stringify(C), JSON.stringify(I), d, s, p, m, x, o]), B = W(() => { - let $ = { sider: gn, filter: li, footer: dn, toolbar: pn }; - P === !1 ? $ = { sider: null, filter: null, footer: null, toolbar: null } : u.isPlainObject(P) && ($ = Object.assign({}, $, P)); - for (const E in $) if ($[E]) { - if (Oi($[E])) { - const J = $[E]; - $[E] = (de) => k.cloneElement(J, de); +}, ci = ({ isItemGridLayout: e, theme: t, themeProps: i, onClickCallback: n, onReload: r, listCode: a, total: o = 0, page: s = 0, onPageChange: l, pageSize: p = 30, onPageSizeChange: c, tab: d, onTabChange: f, keyword: h, onKeywordChange: m, condition: C, onConditionChange: b, sider: x, onSiderChange: $, layouts: P, classNames: N = {}, payload: I = {}, ...W }) => { + const [z, E] = O(), R = X((T, F) => { + const J = { tab: d, page: s, pageSize: p, keyword: h, sider: x, condition: C, total: o, payload: I }; + return T && T != "init" ? u.get(J, T, F) : J; + }, [JSON.stringify(C), JSON.stringify(I), d, s, p, h, x, o]), B = D(() => { + let T = { sider: gn, filter: li, footer: dn, toolbar: pn }; + P === !1 ? T = { sider: null, filter: null, footer: null, toolbar: null } : u.isPlainObject(P) && (T = Object.assign({}, T, P)); + for (const F in T) if (T[F]) { + if (Oi(T[F])) { + const J = T[F]; + T[F] = (de) => k.cloneElement(J, de); } - } else $[E] = () => g(k.Fragment, {}); - return $; + } else T[F] = () => g(k.Fragment, {}); + return T; }, [P]); return V(() => { - t ? le.getWidgetComponent(t).then(($) => { - if (!$) throw `${t} not found`; - return $; - }).catch(($) => ({ default: () => `${$}` })).then(($) => j(k.createElement($.default, { ...D, layouts: B, $setting: i }))) : j(g(e ? sn : ln, { ...D, layouts: B, $setting: i })); - }, [t, i]), g(ie.Provider, { value: { classNames: N, listCode: a, onClickCallback: n, onReload: r, getBase62params: R, onPageChange: l, onPageSizeChange: c, onTabChange: f, onSiderChange: T, onKeywordChange: h, onConditionChange: b }, children: z && k.cloneElement(z, D) }); + t ? le.getWidgetComponent(t).then((T) => { + if (!T) throw `${t} not found`; + return T; + }).catch((T) => ({ default: () => `${T}` })).then((T) => E(k.createElement(T.default, { ...W, layouts: B, $setting: i }))) : E(g(e ? sn : ln, { ...W, layouts: B, $setting: i })); + }, [t, i]), g(ie.Provider, { value: { classNames: N, listCode: a, onClickCallback: n, onReload: r, getBase62params: R, onPageChange: l, onPageSizeChange: c, onTabChange: f, onSiderChange: $, onKeywordChange: m, onConditionChange: b }, children: z && k.cloneElement(z, W) }); }; ci.propTypes = { classNames: w.exact({ sider: w.string, filter: w.string, footer: w.string, toolbar: w.string, container: w.string, content: w.string, item: w.string }), layouts: w.oneOfType([w.exact({ sider: w.oneOfType([w.elementType, w.element]), filter: w.oneOfType([w.elementType, w.element]), footer: w.oneOfType([w.elementType, w.element]), toolbar: w.oneOfType([w.elementType, w.element]) }), w.bool]) }; var he, ge, Pe, rt; const ae = class ae { constructor() { - O(this, ge, null); - O(this, Pe, /* @__PURE__ */ new Map()); - O(this, rt, () => { + j(this, ge, null); + j(this, Pe, /* @__PURE__ */ new Map()); + j(this, rt, () => { if (y(this, ge)) return y(this, ge).port.postMessage({ command: "status", data: [] }); H(this, ge, new SharedWorker(new URL("/ff-worker/res-ws.js", self.location))), y(this, ge).port.onmessage = (t) => { var i, n; @@ -370,83 +373,83 @@ const ae = class ae { if (y(ae, he)) return y(ae, he); } }; -he = new WeakMap(), ge = new WeakMap(), Pe = new WeakMap(), rt = new WeakMap(), O(ae, he, null), S(ae, "getInstance", () => (y(ae, he) || H(ae, he, new ae()), y(ae, he))); +he = new WeakMap(), ge = new WeakMap(), Pe = new WeakMap(), rt = new WeakMap(), j(ae, he, null), S(ae, "getInstance", () => (y(ae, he) || H(ae, he, new ae()), y(ae, he))); let yt = ae; const di = yt.getInstance(), Pt = k.forwardRef(({ listCode: e, base62params: t, className: i, theme: n, themeProps: r, layouts: a, classNames: o }, s) => { - const [{ resource: l, primaryKey: p, batchOperations: c = [], itemOperations: d = [], columns: f = [], themeConfig: m, theme: h, isConditionFormLayout: C = !1, isTreeSider: b, treeSiderConfig: x, isItemGridLayout: T, itemGridLayout: P, title: N, isPaginate: I, tabs: D }, z] = F({ isItemGridLayout: !1, itemGridLayout: {} }), j = an(e, t), [{ dataSource: R, itemOperationsAccess: B, condition: $, tab: E, keyword: J, page: de, total: $e, pageSize: Y, sider: _e, onConditionChange: lt, onTabChange: Ft, onKeywordChange: ki, onPageChange: xi, onPageSizeChange: Si, onSiderChange: vi, onReload: ct, payload: Pi }, Rt] = rn(j, e, p, l), $i = ft(d, B, R, p), Ti = ft(c); + const [{ resource: l, primaryKey: p, batchOperations: c = [], itemOperations: d = [], columns: f = [], themeConfig: h, theme: m, isConditionFormLayout: C = !1, isTreeSider: b, treeSiderConfig: x, isItemGridLayout: $, itemGridLayout: P, title: N, isPaginate: I, tabs: W }, z] = O({ isItemGridLayout: !1, itemGridLayout: {} }), E = an(e, t), [{ dataSource: R, itemOperationsAccess: B, condition: T, tab: F, keyword: J, page: de, total: Te, pageSize: Y, sider: _e, onConditionChange: lt, onTabChange: Et, onKeywordChange: ki, onPageChange: xi, onPageSizeChange: Si, onSiderChange: vi, onReload: ct, payload: Pi }, Ft] = rn(E, e, p, l), Ti = ft(d, B, R, p), $i = ft(c); V(() => { let Q = null; - return e && L.get(`/api/_/${e}`).resp(({ data: Ge, res: Ei }) => { - Ge != null && Ge.isDynamicRefresh && (Q = di.subscribe(() => ct(), Ei)), z(Ge); + return e && L.get(`/api/_/${e}`).resp(({ data: Ge, res: Ri }) => { + Ge != null && Ge.isDynamicRefresh && (Q = di.subscribe(() => ct(), Ri)), z(Ge); }).catch(() => z({})), () => Q == null ? void 0 : Q(); - }, [e]), k.useImperativeHandle(s, () => ({ onReload: ct, onClickCallback: Rt })); - const Ni = { listCode: e, title: N, classNames: o, layouts: a, resource: l, primaryKey: p, theme: n || h, themeProps: r || m, isTreeSider: b, treeSiderConfig: x, isPaginate: I, tabs: D, isItemOperations: $i, itemOperations: d == null ? void 0 : d.map((Q) => u.isEmpty(Q == null ? void 0 : Q.confirm) ? Q : { ...Q, confirm: Object.assign({}, Q.confirm, { getPopupContainer: () => document.body }) }), isBatchOperations: Ti, batchOperations: c, isItemGridLayout: T, columns: f, itemGridLayout: P, isConditionFormLayout: C, itemOperationsAccess: B, dataSource: R, onConditionChange: lt, onTabChange: Ft, onKeywordChange: ki, onPageChange: xi, onPageSizeChange: Si, onSiderChange: vi, condition: $, tab: E, keyword: J, page: de, total: $e, pageSize: Y, sider: _e, payload: Pi }; - return g(ci, { ...Ni, className: M("ff-data-list-helper", i), onReload: ct, onClickCallback: Rt }); + }, [e]), k.useImperativeHandle(s, () => ({ onReload: ct, onClickCallback: Ft })); + const Ni = { listCode: e, title: N, classNames: o, layouts: a, resource: l, primaryKey: p, theme: n || m, themeProps: r || h, isTreeSider: b, treeSiderConfig: x, isPaginate: I, tabs: W, isItemOperations: Ti, itemOperations: d == null ? void 0 : d.map((Q) => u.isEmpty(Q == null ? void 0 : Q.confirm) ? Q : { ...Q, confirm: Object.assign({}, Q.confirm, { getPopupContainer: () => document.body }) }), isBatchOperations: $i, batchOperations: c, isItemGridLayout: $, columns: f, itemGridLayout: P, isConditionFormLayout: C, itemOperationsAccess: B, dataSource: R, onConditionChange: lt, onTabChange: Et, onKeywordChange: ki, onPageChange: xi, onPageSizeChange: Si, onSiderChange: vi, condition: T, tab: F, keyword: J, page: de, total: Te, pageSize: Y, sider: _e, payload: Pi }; + return g(ci, { ...Ni, className: M("ff-data-list-helper", i), onReload: ct, onClickCallback: Ft }); }), ui = (e, t, i = !0) => i !== !0 && i-- <= 0 ? [] : u.isArray(e) && !u.isEmpty(e) ? e.reduce((n, r) => (Reflect.has(r, t) && Reflect.has(r, "children") && n.push(r[t]), Reflect.has(r, "children") && !u.isEmpty(r.children) ? n.concat(ui(r.children, t, i)) : n), []) : [], mn = ({ className: e, primaryKey: t, columns: i = [], dataSource: n = [], operationRender: r, operationWidth: a = 180, ...o }) => { const { classNames: s } = ce(ie); Ae(); - const l = U(null), p = U(null), [c, d] = F([]), [f, m] = F({ width: 0, height: 0 }); + const l = U(null), p = U(null), [c, d] = O([]), [f, h] = O({ width: 0, height: 0 }); V(() => { d(ui(n, t)); }, [n, t]), ji(() => { const C = new ResizeObserver(() => { var b; - m({ width: ((b = l.current) == null ? void 0 : b.nativeElement.querySelector(".ant-table-body").scrollWidth) || p.current.offsetWidth, height: p.current.offsetHeight }); + h({ width: ((b = l.current) == null ? void 0 : b.nativeElement.querySelector(".ant-table-body").scrollWidth) || p.current.offsetWidth, height: p.current.offsetHeight }); }); return p.current && C.observe(p.current), () => { p.current && C.unobserve(p.current); }; }, []); - const h = nn(i); - return g("div", { ref: p, className: M("ff-data-list-table", s.content, e), children: f.height ? g(Bi, { ...o, ref: l, rowKey: (C) => (C == null ? void 0 : C[t]) ?? Math.random(), columns: h == null ? void 0 : h.concat(r ? [{ title: "操作", align: "center", fixed: "right", width: `${Math.ceil(a / f.width * 100).toFixed(2)}%`, render: (C, b, x) => r(b, x) }] : []), dataSource: n, size: "middle", scroll: { x: "max-content", y: f.height - 50 }, pagination: !1, expandable: { defaultExpandAllRows: !0, expandRowByClick: !0, onExpandedRowsChange: d, expandedRowKeys: c } }) : null }); + const m = nn(i); + return g("div", { ref: p, className: M("ff-data-list-table", s.content, e), children: f.height ? g(Bi, { ...o, ref: l, rowKey: (C) => (C == null ? void 0 : C[t]) ?? Math.random(), columns: m == null ? void 0 : m.concat(r ? [{ title: "操作", align: "center", fixed: "right", width: `${Math.ceil(a / f.width * 100).toFixed(2)}%`, render: (C, b, x) => r(b, x) }] : []), dataSource: n, size: "middle", scroll: { x: "max-content", y: f.height - 50 }, pagination: !1, expandable: { defaultExpandAllRows: !0, expandRowByClick: !0, onExpandedRowsChange: d, expandedRowKeys: c } }) : null }); }, hn = "RC_FORM_INTERNAL_HOOKS", fn = (e, { initialValue: t, initialValueLanguage: i, convertJs: n, convertJsSetting: r, type: a = "string" }, o = null) => { - const s = U(!1), l = ce(_t), [p, c] = F(), [d, f] = F(i != "javascript" && e ? l.getFieldValue(e) : void 0), { registerWatch: m } = l.getInternalHooks(hn) || {}; - return V(() => m == null ? void 0 : m((h, C, b) => { + const s = U(!1), l = ce(_t), [p, c] = O(), [d, f] = O(i != "javascript" && e ? l.getFieldValue(e) : void 0), { registerWatch: h } = l.getInternalHooks(hn) || {}; + return V(() => h == null ? void 0 : h((m, C, b) => { if (!s.current) return; const x = u.get(C, e); u.isEqual(x, d) || f(ee(x, a)); }), [d]), V(() => { - i == "javascript" && t ? xe.exec(t, {}, { getFieldValueForBasicForm: (h) => o ? o.getFieldValue(h) : l.getFieldValue(h), getFieldValue: (h) => l.getFieldValue(h) }).then((h) => f(ee(h, a))).catch((h) => notification.error({ message: `布局数据错误: ${JSON.stringify(h)}` })).finally(() => s.current = !0) : (t && f(ee(t ?? l.getFieldValue(e), a)), s.current = !0); + i == "javascript" && t ? xe.exec(t, {}, { getFieldValueForBasicForm: (m) => o ? o.getFieldValue(m) : l.getFieldValue(m), getFieldValue: (m) => l.getFieldValue(m) }).then((m) => f(ee(m, a))).catch((m) => notification.error({ message: `布局数据错误: ${JSON.stringify(m)}` })).finally(() => s.current = !0) : (t && f(ee(t ?? l.getFieldValue(e), a)), s.current = !0); }, [t, i]), Je(() => { - s.current && n && new et([n, r]).toValue(d, l.getFieldsValue(!0)).then(c).catch((h) => { - c(h), console.error("布局数据转换错误: ", h, n); + s.current && n && new et([n, r]).toValue(d, l.getFieldsValue(!0)).then(c).catch((m) => { + c(m), console.error("布局数据转换错误: ", m, n); }); }, [d, n, r]), [p ?? d, d]; -}, gi = (e, t, i = null) => W(() => { +}, gi = (e, t, i = null) => D(() => { var n; return (n = u.sortBy(e, ["y", "x"])) == null ? void 0 : n.map(({ i: r, x: a, y: o, w: s, h: l, field: { boxStyle: p, ...c } }, d) => g("div", { className: "grid-layout-item", style: oi(a, o, s, l, p), children: g(t, { ...c, basicForm: i }) }, r ?? d)); }, [e]), yn = ({ widget: e, widgetPrefix: t = "@pkg/ff/grid-layouts", basicForm: i, ...n }) => { - const r = e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`, [a, o] = F(); + const r = e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`, [a, o] = O(); return V(() => { r && le.getWidgetComponent(r).then(({ defaultProps: s = {}, default: l }) => ({ default: wn(l, s, i) })).catch((s) => ({ default: () => `${s}` })).then((s) => o(k.createElement(s.default, n))); }, [r]), a; }, wn = (e, t = {}, i = null) => (n) => { - const { code: r, label: a, extras: o, isVirtual: s, initialValue: l, initialValueLanguage: p, convertJs: c, convertJsSetting: d, value: f, ...m } = u.merge({}, t, n), [h, C] = fn(s ? null : r, { initialValue: l, initialValueLanguage: p, convertJs: c, convertJsSetting: d, type: (m == null ? void 0 : m.type) || "string" }, i), b = W(() => { + const { code: r, label: a, extras: o, isVirtual: s, initialValue: l, initialValueLanguage: p, convertJs: c, convertJsSetting: d, value: f, ...h } = u.merge({}, t, n), [m, C] = fn(s ? null : r, { initialValue: l, initialValueLanguage: p, convertJs: c, convertJsSetting: d, type: (h == null ? void 0 : h.type) || "string" }, i), b = D(() => { const P = Object.keys((t == null ? void 0 : t.extras) || {}); return u.over([u.partialRight(u.pick, P), u.partialRight(u.omit, P)]); - }, [t == null ? void 0 : t.extras]), [x, T] = b(m); - return g(e, { ...T, value: h, rawValue: C, $setting: Object.assign({}, o, x) }); + }, [t == null ? void 0 : t.extras]), [x, $] = b(h); + return g(e, { ...$, value: m, rawValue: C, $setting: Object.assign({}, o, x) }); }, pi = ({ className: e, cols: t = 12, rowHeight: i = 21, containerPadding: n = [0, 0], itemMargin: r = [4, 0], formProps: a = {}, fields: o = [], data: s, basicForm: l = null, ...p }) => { - const [c] = te.useForm(), d = gi(o, yn, l), f = W(() => [{ name: "__PROPS__", value: a }], [a]); + const [c] = te.useForm(), d = gi(o, yn, l), f = D(() => [{ name: "__PROPS__", value: a }], [a]); return Je(() => (c.setFieldsValue(s), () => c.resetFields()), [s]), g(te, { fields: f, form: c, component: !1, children: g("div", { ...p, className: M("ff-grid-layout", e), style: { "--grid-layout-item-margin-y": `${(r == null ? void 0 : r[0]) || 0}px`, "--grid-layout-item-margin-x": `${(r == null ? void 0 : r[1]) || 0}px`, "--grid-layout-container-padding-y": `${(n == null ? void 0 : n[0]) || 0}px`, "--grid-layout-container-padding-x": `${(n == null ? void 0 : n[1]) || 0}px`, "--grid-layout-cols": t, "--grid-layout-row-height": `${i}px` }, children: d }) }); }, br = (zt = pi, function({ code: e, data: t, ...i }) { - const [n, r] = F({ resource: null, cols: 12, rowHeight: 21, fields: [] }); + const [n, r] = O({ resource: null, cols: 12, rowHeight: 21, fields: [] }); return V(() => { e && L.get(`/api/_/${e}`).then((a) => r(u.pick(a, ["resource", "cols", "rowHeight", "fields"]))); }, [e]), (n == null ? void 0 : n.resource) && g(zt, { ...i, rowHeight: n.rowHeight, cols: n.cols, fields: n.fields, data: n != null && n.resource ? { [n == null ? void 0 : n.resource]: t } : {} }); }); var zt; -const bn = ({ cols: e, rowHeight: t, itemMargin: i, fields: n, primaryKey: r, dataSource: a, itemClassName: o, itemRender: s = (d, f, m) => d, empty: l = g(qi, { description: null }), className: p, style: c = {} }) => { - const { classNames: d } = ce(ie), f = Ae(), m = W(() => g(pi, { cols: e, rowHeight: t, itemMargin: i, fields: n, className: o }), [n, e, t, i]); - return g("div", { className: M("ff-data-list-content", d.content, p), style: c, children: u.isEmpty(a) ? l : a.map((h, C) => { - const b = s(k.cloneElement(m, { data: h }), h, C); - return k.cloneElement(b, { key: `${f}-${(h == null ? void 0 : h[r]) || C}` }); +const bn = ({ cols: e, rowHeight: t, itemMargin: i, fields: n, primaryKey: r, dataSource: a, itemClassName: o, itemRender: s = (d, f, h) => d, empty: l = g(qi, { description: null }), className: p, style: c = {} }) => { + const { classNames: d } = ce(ie), f = Ae(), h = D(() => g(pi, { cols: e, rowHeight: t, itemMargin: i, fields: n, className: o }), [n, e, t, i]); + return g("div", { className: M("ff-data-list-content", d.content, p), style: c, children: u.isEmpty(a) ? l : a.map((m, C) => { + const b = s(k.cloneElement(h, { data: m }), m, C); + return k.cloneElement(b, { key: `${f}-${(m == null ? void 0 : m[r]) || C}` }); }) }); }, Cn = ({ component: e, $props: t }) => { const { base62params: i } = He(t, {}); return g(G, { children: g(Pt, { listCode: e, base62params: L.decode(i) }) }); }, Cr = () => g(mi, {}), mi = () => "Empty", kn = ({ component: e, $setting: t, $props: i }) => { - const [n, r] = F(); + const [n, r] = O(); V(() => { if (!e) return r(g(mi, { description: null })); le.getWidgetComponent(e).catch((o) => ({ default: () => `${o}` })).then((o) => k.createElement(o.default, { $setting: t })).then(r); @@ -454,12 +457,12 @@ const bn = ({ cols: e, rowHeight: t, itemMargin: i, fields: n, primaryKey: r, da const a = He(i, {}); return n ? k.cloneElement(n, a) : null; }, kr = () => "NotFoundPage"; -var fe, Z, ye, we, De, Ue; +var fe, Z, ye, we, We, De; const se = class se { constructor() { - O(this, Z, /* @__PURE__ */ new Map()); - O(this, ye, {}); - O(this, we, null); + j(this, Z, /* @__PURE__ */ new Map()); + j(this, ye, {}); + j(this, we, null); S(this, "init", (t, i) => { H(this, Z, t), H(this, ye, i); }); @@ -468,9 +471,9 @@ const se = class se { const { uri: r, type: a, widgetProps: o } = this.get(t) || {}, { router: s, query: l, ...p } = i || {}, c = Object.assign({}, p, s), d = Object.assign({}, p, l); a == "list" && (c.base62params = L.encode(c != null && c.base62params ? c.base62params : c)); let f = Ji(r || t, c); - const m = new URLSearchParams(); - for (const h in o || {}) (o == null ? void 0 : o.type) == "query" && Object.has(d, h) && m.append(h, JSON.stringify(d[h])); - return m.size > 0 && (f = `${f}?${m.toString()}`), n != null && n.isOpenWindow ? window.open(f) : y(this, we).navigate(f, { replace: !!(n != null && n.isReplaceRouteHistory) }); + const h = new URLSearchParams(); + for (const m in o || {}) (o == null ? void 0 : o.type) == "query" && Object.has(d, m) && h.append(m, JSON.stringify(d[m])); + return h.size > 0 && (f = `${f}?${h.toString()}`), n != null && n.isOpenWindow ? window.open(f) : y(this, we).navigate(f, { replace: !!(n != null && n.isReplaceRouteHistory) }); }); S(this, "getMenus", (t) => { var i; @@ -478,22 +481,22 @@ const se = class se { }); S(this, "findMenuPathByUuid", (t) => { let i = []; - for (const n in y(this, ye)) if (i = y(this, De).call(this, y(this, ye)[n], t, [n]), i.length > 1) return i; + for (const n in y(this, ye)) if (i = y(this, We).call(this, y(this, ye)[n], t, [n]), i.length > 1) return i; return i; }); - S(this, "getMenusByRouteUuid", (t) => y(this, Ue).call(this, t, Object.values(y(this, ye)).flat())); - O(this, De, (t, i, n = []) => { + S(this, "getMenusByRouteUuid", (t) => y(this, De).call(this, t, Object.values(y(this, ye)).flat())); + j(this, We, (t, i, n = []) => { if (u.isEmpty(t)) return n; for (const { uuid: r, children: a } of t) { if (r == i) return n.concat(r); - if (!u.isEmpty(a)) return n.concat(r, y(this, De).call(this, a, i)); + if (!u.isEmpty(a)) return n.concat(r, y(this, We).call(this, a, i)); } return n; }); - O(this, Ue, (t, i) => { + j(this, De, (t, i) => { var r; let n = []; - for (const a of i) a.widgetType == "redirect" && (a.uuid == t || a.widget == t ? n.push(a) : (r = a.children) != null && r.length && (n = n.concat(y(this, Ue).call(this, t, a.children)))); + for (const a of i) a.widgetType == "redirect" && (a.uuid == t || a.widget == t ? n.push(a) : (r = a.children) != null && r.length && (n = n.concat(y(this, De).call(this, t, a.children)))); return n; }); S(this, "getCurrentMenu", () => { @@ -525,60 +528,60 @@ const se = class se { if (y(this, Z).size == 0) return null; const i = Ve.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/ff/frameworks/DefaultTheme"), n = Ve.get(le.checkUserToken() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"), r = { [i]: 0 }, a = (s, l) => () => Promise.all([le.getWidgetComponent(s), He(l)]).then(([p, c]) => [p.default || function() { return `${s}`; - }, c]).then(([p, c]) => ({ Component: () => k.createElement(Zt, {}, k.createElement(p, { $setting: c })) })), o = Array.from(y(this, Z).values()).reduce((s, { uuid: l, uri: p, name: c, type: d, component: f, widgetSetting: m, widgetProps: h, isLogin: C, isLayout: b, extra: x }) => { - let T = {}, P = 0; + }, c]).then(([p, c]) => ({ Component: () => k.createElement(Zt, {}, k.createElement(p, { $setting: c })) })), o = Array.from(y(this, Z).values()).reduce((s, { uuid: l, uri: p, name: c, type: d, component: f, widgetSetting: h, widgetProps: m, isLogin: C, isLayout: b, extra: x }) => { + let $ = {}, P = 0; switch (d) { case "list": - T.element = k.createElement(Cn, { component: f, $props: h }); + $.element = k.createElement(Cn, { component: f, $props: m }); break; case "fsdpf-component": - T.element = k.createElement(kn, { key: f, component: f, $setting: m, $props: h }); + $.element = k.createElement(kn, { key: f, component: f, $setting: h, $props: m }); } const N = (x == null ? void 0 : x.theme) ?? (x == null ? void 0 : x.layout); if (N) { const I = (x == null ? void 0 : x.themeProps) ?? (x == null ? void 0 : x.layoutProps); - if (!r[N]) return r[N] = s.length, [...s, { path: "/", lazy: a(N, I), children: [{ path: p, ...T }] }]; + if (!r[N]) return r[N] = s.length, [...s, { path: "/", lazy: a(N, I), children: [{ path: p, ...$ }] }]; P = r[N]; } - return b && P > -1 ? (s[P].children.push({ path: p, ...T }), s) : [...s, { path: p, ...T }]; + return b && P > -1 ? (s[P].children.push({ path: p, ...$ }), s) : [...s, { path: p, ...$ }]; }, [{ path: "/", lazy: a(i, {}), children: [] }]); return o.push({ index: !0, element: k.createElement(xn, { to: n, replace: !0 }) }), H(this, we, Gi(o, t)); }); if (y(se, fe)) return y(se, fe); } }; -fe = new WeakMap(), Z = new WeakMap(), ye = new WeakMap(), we = new WeakMap(), De = new WeakMap(), Ue = new WeakMap(), O(se, fe, null), S(se, "getInstance", () => (y(se, fe) || H(se, fe, new se()), y(se, fe))); +fe = new WeakMap(), Z = new WeakMap(), ye = new WeakMap(), we = new WeakMap(), We = new WeakMap(), De = new WeakMap(), j(se, fe, null), S(se, "getInstance", () => (y(se, fe) || H(se, fe, new se()), y(se, fe))); let wt = se; -const xn = ({ to: e, replace: t }) => Xt() ? k.createElement(Yi, { to: e, replace: t }) : (window.document.location = e, "redirect"), ke = wt.getInstance(), Te = new Worker(new URL("/ff-worker/index.js", self.location)), Bt = { getConfigure: (e) => Ve.get(e), route: { redirect: (...e) => ke.redirect(...e), getPageParams: (...e) => ke.getPageParams(...e), getCurrentRoute: () => ke.getCurrentRoute() }, popup: { notification: (...e) => _.notification(...e), success: (...e) => _.success(...e), error: (...e) => _.error(...e), form: (...e) => _.form(...e), modal: (...e) => _.modal(...e), confirm: (...e) => _.confirm(...e) } }; -var at, Re, be; +const xn = ({ to: e, replace: t }) => Xt() ? k.createElement(Yi, { to: e, replace: t }) : (window.document.location = e, "redirect"), ke = wt.getInstance(), $e = new Worker(new URL("/ff-worker/index.js", self.location)), Bt = { getConfigure: (e) => Ve.get(e), route: { redirect: (...e) => ke.redirect(...e), getPageParams: (...e) => ke.getPageParams(...e), getCurrentRoute: () => ke.getCurrentRoute() }, popup: { notification: (...e) => _.notification(...e), success: (...e) => _.success(...e), error: (...e) => _.error(...e), form: (...e) => _.form(...e), modal: (...e) => _.modal(...e), confirm: (...e) => _.confirm(...e) } }; +var at, Fe, be; const q = class q { constructor() { S(this, "exec", (t, i = {}, n = {}, r = "") => new Promise((a, o) => { if (!/^(?!\s*(\/\/|\/\*|\*)).*?\S+/m.test(t)) return a(); const s = Lt(q, at)._++; - y(q, Re).set(s, n), q.mQueue.set(s, [a, o]), Te.postMessage({ id: s, session: r, category: "eval", method: t, args: i }); + y(q, Fe).set(s, n), q.mQueue.set(s, [a, o]), $e.postMessage({ id: s, session: r, category: "eval", method: t, args: i }); })); - S(this, "clear", (t) => Te.postMessage({ session: t, category: "clear" })); + S(this, "clear", (t) => $e.postMessage({ session: t, category: "clear" })); if (y(q, be)) return y(q, be); Promise.resolve().then(() => Jn).then((t) => { Bt.http = t.http; - }), Te.addEventListener("message", ({ data: { id: t, task_id: i, method: n, args: r, category: a, data: o, error: s, session: l } }) => { - if (a === "eval" && q.mQueue.has(t)) s !== null ? q.mQueue.get(t)[1](s) : q.mQueue.get(t)[0](o), y(q, Re).delete(t), q.mQueue.delete(t); + }), $e.addEventListener("message", ({ data: { id: t, task_id: i, method: n, args: r, category: a, data: o, error: s, session: l } }) => { + if (a === "eval" && q.mQueue.has(t)) s !== null ? q.mQueue.get(t)[1](s) : q.mQueue.get(t)[0](o), y(q, Fe).delete(t), q.mQueue.delete(t); else if (a === "util") try { - const p = u.get(Bt, n.split("/")) || u.get(y(q, Re).get(i), n.split("/")); + const p = u.get(Bt, n.split("/")) || u.get(y(q, Fe).get(i), n.split("/")); if (!u.isFunction(p)) throw `${n} not found`; Promise.resolve(Reflect.apply(p, void 0, r)).then((c) => { - Te.postMessage({ id: t, task_id: i, category: a, method: n, args: r, session: l, data: c, error: null }); + $e.postMessage({ id: t, task_id: i, category: a, method: n, args: r, session: l, data: c, error: null }); }).catch((c) => { - Te.postMessage({ id: t, task_id: i, category: a, method: n, args: r, session: l, data: null, error: c }); + $e.postMessage({ id: t, task_id: i, category: a, method: n, args: r, session: l, data: null, error: c }); }); } catch (p) { - Te.postMessage({ id: t, task_id: i, category: a, method: n, args: r, session: l, data: null, error: p }); + $e.postMessage({ id: t, task_id: i, category: a, method: n, args: r, session: l, data: null, error: p }); } }, !1); } }; -at = new WeakMap(), Re = new WeakMap(), be = new WeakMap(), S(q, "mQueue", /* @__PURE__ */ new Map()), O(q, at, 0), O(q, Re, /* @__PURE__ */ new Map()), O(q, be, null), S(q, "getInstance", () => (y(q, be) || H(q, be, new q()), y(q, be))); +at = new WeakMap(), Fe = new WeakMap(), be = new WeakMap(), S(q, "mQueue", /* @__PURE__ */ new Map()), j(q, at, 0), j(q, Fe, /* @__PURE__ */ new Map()), j(q, be, null), S(q, "getInstance", () => (y(q, be) || H(q, be, new q()), y(q, be))); let bt = q; const xe = bt.getInstance(), st = () => { const e = U(!0), [, t] = k.useReducer((i) => i + 1, 0); @@ -589,7 +592,7 @@ const xe = bt.getInstance(), st = () => { t.current = e; }, [e]), t.current; }, Sr = (e) => { - const [t, i] = F(e), n = U(null), r = X((a, o) => { + const [t, i] = O(e), n = U(null), r = X((a, o) => { n.current = o, i(a); }, []); return V(() => { @@ -605,14 +608,14 @@ const xe = bt.getInstance(), st = () => { for (let n = 0; n < e.length; n++) e[n].value = ee((i = e[n]) == null ? void 0 : i.value, t), e[n] && Reflect.has(e[n], "children") && (e[n].children = hi(e[n].children, t)); return e; }, vr = (e, t = "json", i = "string", n, r = null) => { - const [a] = te.useForm(n), [o, s] = F([{ label: "无", value: "", disabled: !0 }]), l = U([]), p = te.useWatch((c) => l.current.length === 0 ? null : u.pick(c, l.current), a) || null; + const [a] = te.useForm(n), [o, s] = O([{ label: "无", value: "", disabled: !0 }]), l = U([]), p = te.useWatch((c) => l.current.length === 0 ? null : u.pick(c, l.current), a) || null; return V(() => { Array.isArray(e) ? s(e) : t === "javascript" && e ? xe.exec(e, {}, { getFieldValue: (c) => (l.current.includes(c) || l.current.push(c), a.getFieldValue(c)), getFieldValueForBasicForm: (c) => (l.current.includes(c) || l.current.push(c), r ? r.getFieldValue(c) : a.getFieldValue(c)) }).then((c) => { s(ee(c, "array")); }) : e && s(ee(e, "array")); }, [e, t, p]), hi(o, i); }, Pr = (e) => { - const [t, i] = F(), n = { type: "GET" }; + const [t, i] = O(), n = { type: "GET" }; if (typeof e == "string" ? n.url = e : u.isPlainObject(e) && Object.assign(n, e), !(n != null && n.url)) throw "url is required"; const r = (a) => L.request(n, !1).resp((o) => (console.log("useSubscribeRequest", a), i(o), o)); return Je(() => { @@ -624,13 +627,13 @@ const xe = bt.getInstance(), st = () => { }, Sn = (e) => { const [t, i] = k.useState({ gridItems: [], hideItems: [] }); return k.useEffect(() => { - e && L.get(`/api/_/${e}`).then(({ pk: n, uuid: r, code: a, resource: o, align: s, cols: l, rowHeight: p, marginX: c, marginY: d, listenChangeFields: f, listenChangeFieldsFunc: m, fields: h }) => ({ pk: n, uuid: r, code: a, resource: o, align: s, cols: l, rowHeight: p, marginX: c, marginY: d, listenChangeFields: f, listenChangeFieldsFunc: m, ...h.reduce((C, b) => { + e && L.get(`/api/_/${e}`).then(({ pk: n, uuid: r, code: a, resource: o, align: s, cols: l, rowHeight: p, marginX: c, marginY: d, listenChangeFields: f, listenChangeFieldsFunc: h, fields: m }) => ({ pk: n, uuid: r, code: a, resource: o, align: s, cols: l, rowHeight: p, marginX: c, marginY: d, listenChangeFields: f, listenChangeFieldsFunc: h, ...m.reduce((C, b) => { var x; return (x = b == null ? void 0 : b.field) != null && x.hidden ? C.hides.push(b == null ? void 0 : b.field) : C.items.push(b), C; }, { items: [], hides: [] }) })).then(i); }, [e]), t; }, vn = ({ max: e = 0, min: t = 0, type: i = "", message: n, pattern: r, required: a = !1, validator: o } = {}, s, l) => { - const [p, c] = F([]); + const [p, c] = O([]); return V(() => { const d = []; if (a) { @@ -656,15 +659,15 @@ const xe = bt.getInstance(), st = () => { d.push({ type: "string", pattern: r, message: n }); break; case "validator": - o && d.push(({ getFieldValue: f }) => ({ validator: async (m, h) => { - const C = await xe.exec(o, { value: h, fieldName: s }, { getFieldValue: f }); + o && d.push(({ getFieldValue: f }) => ({ validator: async (h, m) => { + const C = await xe.exec(o, { value: m, fieldName: s }, { getFieldValue: f }); return u.isString(C) && C ? Promise.reject(C) : u.isBoolean(C) && !C ? Promise.reject(n) : Promise.resolve(); } })); } c(d); }, [e, t, i, n, r, a, o]), p; }, Pn = (e, t, i) => { - const [n, r] = F(null); + const [n, r] = O(null); return V(() => { const { initDataUri: a = `/api/${e}`, initDataMethod: o = "GET" } = i || {}; t && L.request({ method: o, url: u.trimEnd(`${a}/${t}`, "/") }).then((s) => { @@ -672,27 +675,27 @@ const xe = bt.getInstance(), st = () => { }); }, [e, t, i]), n; }, fi = (e, t, i = {}, n = {}, r = {}) => { - const a = ce(_t), o = st(), s = U(!0), l = U([]), [p, c] = F(t), d = te.useWatch((f) => JSON.stringify(u.pick(f, l.current)), a) || "{}"; + const a = ce(_t), o = st(), s = U(!0), l = U([]), [p, c] = O(t), d = te.useWatch((f) => JSON.stringify(u.pick(f, l.current)), a) || "{}"; return ot(() => { - e && xe.exec(e, i, { ...n, getFieldValueForBasicForm: (f) => r ? r.getFieldValue(f) : null, getFieldValue: u.wrap(a.getFieldValue, (f, m) => (l.current.some((h) => u.isEqual(h, m)) || (l.current.push(m), o()), f == null ? void 0 : f(m))), isFieldTouched: a.isFieldTouched, isFieldsTouched: a.isFieldsTouched }).then((f) => s.current && c(f)); + e && xe.exec(e, i, { ...n, getFieldValueForBasicForm: (f) => r ? r.getFieldValue(f) : null, getFieldValue: u.wrap(a.getFieldValue, (f, h) => (l.current.some((m) => u.isEqual(m, h)) || (l.current.push(h), o()), f == null ? void 0 : f(h))), isFieldTouched: a.isFieldTouched, isFieldsTouched: a.isFieldsTouched }).then((f) => s.current && c(f)); }, [e, d, a, i, n]), V(() => () => s.current = !1, []), p; -}, $n = (e, t, i = [], n = {}) => { +}, Tn = (e, t, i = [], n = {}) => { const r = U({}); if (!t) return [e, r.current]; const a = U(), o = u.debounce(st(), 180), s = ["disabled", "required"], l = (d, f) => { s.includes(d) && (r.current[d] = f), o(); - }, p = W(() => ({ setDisabled: (d) => l("disabled", d), setRequired: (d) => l("required", d), getDisabled: () => r.current.disabled, getRequired: () => r.current.required }), [t]), c = fi(t, -1, {}, p, n) ?? -1; + }, p = D(() => ({ setDisabled: (d) => l("disabled", d), setRequired: (d) => l("required", d), getDisabled: () => r.current.disabled, getRequired: () => r.current.required }), [t]), c = fi(t, -1, {}, p, n) ?? -1; if (a.current != c && (c >= 0 || !u.isEmpty(i == null ? void 0 : i[c]))) { a.current = c; - const { widget: d, widgetPrefix: f, props: m } = i == null ? void 0 : i[c]; - e = ti(d, f), r.current = u.merge(m, u.pick(r.current, s)); + const { widget: d, widgetPrefix: f, props: h } = i == null ? void 0 : i[c]; + e = ti(d, f), r.current = u.merge(h, u.pick(r.current, s)); } return [e, r.current]; -}, qt = (e) => e === void 0 || e === !1 ? "" : (Array.isArray(e) ? e : [e]).join("_"), $r = ({ value: e, onChange: t }, i = null) => { +}, qt = (e) => e === void 0 || e === !1 ? "" : (Array.isArray(e) ? e : [e]).join("_"), Tr = ({ value: e, onChange: t }, i = null) => { const n = U(), [r] = te.useForm(i), a = U({}); return ot(() => { u.isEqual(n.current, e) || r.setFieldsValue(e); - }, [e]), V(() => () => r.resetFields(), []), [W(() => r.__INTERNAL__ ? r : { ...r, __INTERNAL__: { itemRef: (o) => (s) => { + }, [e]), V(() => () => r.resetFields(), []), [D(() => r.__INTERNAL__ ? r : { ...r, __INTERNAL__: { itemRef: (o) => (s) => { const l = qt(o); s ? a.current[l] = s : delete a.current[l]; } }, scrollToField: (o, s = {}) => { @@ -705,41 +708,41 @@ const xe = bt.getInstance(), st = () => { } }, [r]), (o, s) => { n.current = s, t == null || t(s); }]; -}, Tn = ({ type: e, initialValue: t, initialValueLanguage: i, onChange: n, basicForm: r }) => { +}, $n = ({ type: e, initialValue: t, initialValueLanguage: i, onChange: n, basicForm: r }) => { const a = fi(i == "javascript" && t, i == "javascript" ? void 0 : t, {}, {}, r); return V(() => { i == "javascript" ? n(ee(a, e)) : t && n(ee(t, e)); }, [e, t, a]), null; }, yi = ({ widget: e = "Input", widgetPrefix: t = "@pkg/ff/grid-layout-forms", widgetDecorator: i, subWidgets: n = [], basicForm: r, ...a }) => { - const o = ti(e, t), [s, l] = $n(o, i, n, r), [p, c] = F(); + const o = ti(e, t), [s, l] = Tn(o, i, n, r), [p, c] = O(); return V(() => { s && le.getWidgetComponent(s).then(({ defaultProps: d = {}, default: f }) => ({ default: Nn(f, d, r) })).catch((d) => ({ default: () => `${d}` })).then((d) => c(k.createElement(d.default, a))); }, [s]), p && k.cloneElement(p, { ...a, ...l }); }, Nn = (e, t = {}, i = null) => (n) => { - const { type: r, code: a, label: o, noStyle: s, placeholder: l, required: p = !1, extras: c, validators: d, help: f, isVirtual: m, $isReserved: h, initialValue: C, initialValueLanguage: b, ...x } = u.omit(u.merge({}, t, n), ["convertJs", "convertJsSetting", "widget", "widgetPerfix", "widgetDecorator", "subWidgets", "boxStyle"]), T = vn(Object.assign({}, d, p ? { required: !0 } : {}), a, r), P = W(() => { - const j = Object.keys((t == null ? void 0 : t.extras) || {}); - return u.over([u.partialRight(u.pick, j), u.partialRight(u.omit, j)]); - }, [t == null ? void 0 : t.extras]), [N, I] = P(x), D = { label: o, noStyle: s, colon: !1, layout: "vertical" }, z = X((j) => j == null ? void 0 : ee(j, r), [r]); - return g(Gt, { name: a, rules: T, initialValue: z(C), normalize: z, children: (j, R, B) => { - var $; - return g(e, { type: r, rcform: B, basicForm: i, itemProps: { validateStatus: R.errors.length > 0 ? "error" : "success", tooltip: f || null, help: R.errors.length > 0 ? R.errors.join("、") : null, required: (($ = T == null ? void 0 : T[0]) == null ? void 0 : $.required) || !1, ...D }, fieldProps: { placeholder: l, ...I, ...j }, $setting: Object.assign({}, c, N) }); + const { type: r, code: a, label: o, noStyle: s, placeholder: l, required: p = !1, extras: c, validators: d, help: f, isVirtual: h, $isReserved: m, initialValue: C, initialValueLanguage: b, ...x } = u.omit(u.merge({}, t, n), ["convertJs", "convertJsSetting", "widget", "widgetPerfix", "widgetDecorator", "subWidgets", "boxStyle"]), $ = vn(Object.assign({}, d, p ? { required: !0 } : {}), a, r), P = D(() => { + const E = Object.keys((t == null ? void 0 : t.extras) || {}); + return u.over([u.partialRight(u.pick, E), u.partialRight(u.omit, E)]); + }, [t == null ? void 0 : t.extras]), [N, I] = P(x), W = { label: o, noStyle: s, colon: !1, layout: "vertical" }, z = X((E) => E == null ? void 0 : ee(E, r), [r]); + return g(Gt, { name: a, rules: $, initialValue: z(C), normalize: z, children: (E, R, B) => { + var T; + return g(e, { type: r, rcform: B, basicForm: i, itemProps: { validateStatus: R.errors.length > 0 ? "error" : "success", tooltip: f || null, help: R.errors.length > 0 ? R.errors.join("、") : null, required: ((T = $ == null ? void 0 : $[0]) == null ? void 0 : T.required) || !1, ...W }, fieldProps: { placeholder: l, ...I, ...E }, $setting: Object.assign({}, c, N) }); } }); -}, $t = ({ cols: e = 24, rowHeight: t = 16, itemMargin: i = [8, 16], containerPadding: n = [0, 0], fields: r = [], children: a, basicForm: o = null }) => { +}, Tt = ({ cols: e = 24, rowHeight: t = 16, itemMargin: i = [8, 16], containerPadding: n = [0, 0], fields: r = [], children: a, basicForm: o = null }) => { const s = gi(r, yi, o); return A("div", { className: "ff-grid-layout-form", style: { "--grid-layout-item-margin-x": `${(i == null ? void 0 : i[0]) ?? 8}px`, "--grid-layout-item-margin-y": `${(i == null ? void 0 : i[1]) ?? 16}px`, "--grid-layout-container-padding-y": `${(n == null ? void 0 : n[0]) || 0}px`, "--grid-layout-container-padding-x": `${(n == null ? void 0 : n[1]) || 0}px`, "--grid-layout-cols": e, "--grid-layout-row-height": `${t}px` }, children: [s, a && k.cloneElement(a, { cols: e, rowHeight: t, itemMargin: i, containerPadding: n, fields: r })] }); }; -$t.propTypes = { fields: w.array }; -const En = (Dt = $t, ({ code: e, layout: t, name: i, primaryKey: n = 0, style: r = {}, formProps: a = {}, form: o, basicForm: s, isPreview: l = !1, className: p, onFinish: c, onValuesChange: d = () => { +Tt.propTypes = { fields: w.array }; +const Rn = (Wt = Tt, ({ code: e, layout: t, name: i, primaryKey: n = 0, style: r = {}, formProps: a = {}, form: o, basicForm: s, isPreview: l = !1, className: p, onFinish: c, onValuesChange: d = () => { }, ...f }) => { - const { align: m, autoComplete: h, resource: C, items: b, hides: x, rowHeight: T, marginX: P, marginY: N, cols: I, listenChangeFields: D, listenChangeFieldsFunc: z, pk: j, uuid: R } = Sn(e), [B] = te.useForm(o), $ = W(() => [{ name: "__PK__", value: j }, { name: "__PROPS__", value: a }, { name: "__RESOURCE__", value: C }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: R }, { name: "__PRIMARY_KEY__", value: n }], [j, e, R, C, n, a]); - return A(te, { className: p, name: i || e, layout: t || m, fields: $, form: B, autoComplete: h, style: { ...r, position: "relative" }, onFinish: c, onValuesChange: (E, J) => (({ changedValues: de, allValues: $e, listenChangeFields: Y, listenChangeFieldsFunc: _e, onValuesChange: lt, code: Ft }) => { - lt(de, $e), _e && Array.isArray(Y) && xe.exec(_e, { changedValues: de, allValues: $e }, { getFieldValue: B.getFieldValue, setFieldValue: B.setFieldValue, setFieldsValue: B.setFieldsValue, isFieldTouched: B.isFieldTouched, isFieldsTouched: B.isFieldsTouched }); - })({ changedValues: E, allValues: J, listenChangeFields: D, listenChangeFieldsFunc: z, onValuesChange: d, code: e }), children: [g(Dt, { ...f, form: B, basicForm: s, code: e, fields: b, cols: I, rowHeight: T, itemMargin: [P, N] }), x == null ? void 0 : x.map((E) => { + const { align: h, autoComplete: m, resource: C, items: b, hides: x, rowHeight: $, marginX: P, marginY: N, cols: I, listenChangeFields: W, listenChangeFieldsFunc: z, pk: E, uuid: R } = Sn(e), [B] = te.useForm(o), T = D(() => [{ name: "__PK__", value: E }, { name: "__PROPS__", value: a }, { name: "__RESOURCE__", value: C }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: R }, { name: "__PRIMARY_KEY__", value: n }], [E, e, R, C, n, a]); + return A(te, { className: p, name: i || e, layout: t || h, fields: T, form: B, autoComplete: m, style: { ...r, position: "relative" }, onFinish: c, onValuesChange: (F, J) => (({ changedValues: de, allValues: Te, listenChangeFields: Y, listenChangeFieldsFunc: _e, onValuesChange: lt, code: Et }) => { + lt(de, Te), _e && Array.isArray(Y) && xe.exec(_e, { changedValues: de, allValues: Te }, { getFieldValue: B.getFieldValue, setFieldValue: B.setFieldValue, setFieldsValue: B.setFieldsValue, isFieldTouched: B.isFieldTouched, isFieldsTouched: B.isFieldsTouched }); + })({ changedValues: F, allValues: J, listenChangeFields: W, listenChangeFieldsFunc: z, onValuesChange: d, code: e }), children: [g(Wt, { ...f, form: B, basicForm: s, code: e, fields: b, cols: I, rowHeight: $, itemMargin: [P, N] }), x == null ? void 0 : x.map((F) => { var J; - return g(Gt, { name: E.code, children: g(Tn, { form: B, basicForm: s, name: E.code, type: E.type, initialValue: E.initialValue, initialValueLanguage: (J = E.extras) == null ? void 0 : J.initialValueLanguage }) }, JSON.stringify(E.code)); + return g(Gt, { name: F.code, children: g($n, { form: B, basicForm: s, name: F.code, type: F.type, initialValue: F.initialValue, initialValueLanguage: (J = F.extras) == null ? void 0 : J.initialValueLanguage }) }, JSON.stringify(F.code)); })] }, e); }); -var Dt; +var Wt; const wi = ({ $setting: e, $close: t, extras: i, code: n, primaryKey: r, ...a }) => { const [o] = te.useForm(), s = Pn(n, r, e); return V(() => { @@ -747,20 +750,20 @@ const wi = ({ $setting: e, $close: t, extras: i, code: n, primaryKey: r, ...a }) }, [s]), g(G, { actions: A(k.Fragment, { children: [g(v, { name: "保存", type: "primary", widget: () => { const l = o.getFieldValue("__RESOURCE__"), { initDataUri: p = `/api/${n}` } = e || {}; o.validateFields(!0).then((c) => l ? u.pick(c, [l]) : c).then((c) => L.post(r ? `${p}/${r}` : `${p}`, c).msg(t)).catch(() => _.error("请先完善表单信息", { duration: 2e3 })); - } }), g(v, { name: "取消", widget: () => t(!1) })] }), extras: i, children: g(En, { form: o, code: n, primaryKey: r, ...a }) }); -}, Ut = /* @__PURE__ */ new Set(), Ct = (e = [], t = 0) => { + } }), g(v, { name: "取消", widget: () => t(!1) })] }), extras: i, children: g(Rn, { form: o, code: n, primaryKey: r, ...a }) }); +}, Dt = /* @__PURE__ */ new Set(), Ct = (e = [], t = 0) => { const i = e[t]; - if (i.length && !Ut.has(i)) { + if (i.length && !Dt.has(i)) { const n = document.createElement("script"); n.setAttribute("src", i), n.setAttribute("data-namespace", i), e.length > t + 1 && (n.onload = () => { Ct(e, t + 1); }, n.onerror = () => { Ct(e, t + 1); - }), Ut.add(i), document.body.appendChild(n); + }), Dt.add(i), document.body.appendChild(n); } }, kt = ({ className: e, type: t, style: i = {}, ...n }) => g("span", { role: "img", className: M("ff-iconfont", e), style: i, ...n, children: g("svg", { style: { width: "1em", height: "1em", fill: "currentColor", overflow: "hidden" }, viewBox: "0 0 1024 1024", children: g("use", { xlinkHref: `#${t}` }) }) }); kt.propTypes = { className: w.string, type: w.string.isRequired, style: w.object }, kt.init = Ct; -const Fn = (e, t, i, n) => ke.redirect(i, t, n), Rn = (e, t = {}, i, n = {}) => { +const En = (e, t, i, n) => ke.redirect(i, t, n), Fn = (e, t = {}, i, n = {}) => { var a; const r = (a = n.router) == null ? void 0 : a.reduce((o, [s, l, p]) => { const c = u.get(t, ["router", s]); @@ -768,18 +771,18 @@ const Fn = (e, t, i, n) => ke.redirect(i, t, n), Rn = (e, t = {}, i, n = {}) => return `${o}/${c}`; }, `/api/${i}`); return L.del(r, t.param).msg(); -}, Wt = (e, t, i, { status: { loading: n, disabled: r }, setStatus: a }) => { +}, Ut = (e, t, i, { status: { loading: n, disabled: r }, setStatus: a }) => { const o = { loading: (s) => s === void 0 ? n : a((l) => ({ ...l, loading: s })), disabled: (s) => s === void 0 ? r : a((l) => ({ ...l, disabled: s })) }; return u.isFunction(i) ? i.call(null, { ...t, ...o }) : u.isString(i) && i ? xe.exec(i, t, o) : null; }, Ht = (e, t, i, n, r) => u.isString(i) && i ? le.getWidgetComponent(i).then(({ default: a }) => _.modal(a, { ...t, $setting: n }, r != null && r.title ? { ...r, title: u.template(r.title)(e) } : r)).catch((a) => { _.error(i, { content: a.toString() }); }) : _.modal(i, { ...t, $setting: n }, r != null && r.title ? { ...r, title: u.template(r.title)(e) } : r), On = (e, t, i, n, r) => _.modal(wi, { ...t, $setting: n, code: i }, r != null && r.title ? { ...r, title: u.template(r.title)(e) } : r), jn = (e, t, i, n, r) => _.modal(Pt, { base62params: t, $setting: n, listCode: i }, r != null && r.title ? { ...r, title: u.template(r.title)(e) } : r), Ln = ({ widget: e, widgetType: t, widgetData: i, widgetProps: n, widgetSetting: r, widgetContainerProps: a }, { onAfterClick: o, onBeforeClick: s }) => { - const l = ce(ie), [p, c] = F({ leading: !0, trailing: !1 }), d = W(() => { + const l = ce(ie), [p, c] = O({ leading: !0, trailing: !1 }), d = D(() => { switch (t) { case "redirect": - return u.partialRight(Fn, e, r); + return u.partialRight(En, e, r); case "func": - return u.partialRight(Wt, (r == null ? void 0 : r.code) ?? e, { status: p, setStatus: c }); + return u.partialRight(Ut, (r == null ? void 0 : r.code) ?? e, { status: p, setStatus: c }); case "fsdpf-component": return u.partialRight(Ht, e, r, a); case "grid-layout-form": @@ -787,74 +790,74 @@ const Fn = (e, t, i, n) => ke.redirect(i, t, n), Rn = (e, t = {}, i, n = {}) => case "data-list": return u.partialRight(jn, e, r, a); case "destroy": - return u.partialRight(Rn, e, r, a); + return u.partialRight(Fn, e, r, a); default: - if (Et(e) || k.isValidElement(e)) return u.partialRight(Ht, e, r, a); - if (u.isFunction(e)) return u.partialRight(Wt, (r == null ? void 0 : r.code) || e, { status: p, setStatus: c }); + if (Rt(e) || k.isValidElement(e)) return u.partialRight(Ht, e, r, a); + if (u.isFunction(e)) return u.partialRight(Ut, (r == null ? void 0 : r.code) || e, { status: p, setStatus: c }); } return (...f) => console.error("useButton unknown widgetType", t, ...f); }, [e, t]); - return [u.debounce((f) => (s == null || s(f), Promise.resolve(He(n, f, { list: l })).then((m) => d(f, { ...i, ...m })).then((m) => o == null ? void 0 : o(m)).catch(console.error)), 300, { leading: !0, trailing: !1 }), p]; -}, bi = ({ type: e, name: t, className: i, icon: n, iconPosition: r, size: a }, o = "default") => W(() => { + return [u.debounce((f) => (s == null || s(f), Promise.resolve(He(n, f, { list: l })).then((h) => d(f, { ...i, ...h })).then((h) => o == null ? void 0 : o(h)).catch(console.error)), 300, { leading: !0, trailing: !1 }), p]; +}, bi = ({ type: e, name: t, className: i, icon: n, iconPosition: r, size: a }, o = "default") => D(() => { const s = { type: "primary", className: M("ff-button", i), iconPosition: r, size: a }; return e === "danger" ? s.danger = !0 : e === "default" && (s.type = e), o === "link" || o === "dashed" ? (s.type = o, e === "default" && (s.className = M(s.className, "ff-default"))) : o !== "circle" && o !== "round" || (s.shape = o), n && (s.icon = g(kt, { type: n })), t && (s.children = t), s; -}, [o, e, i, n, r]), Ke = (e) => function({ className: t, variant: i, children: n, name: r, icon: a, type: o = "default", iconPosition: s = "start", noAuthType: l, onAfterClick: p, onBeforeClick: c, data: d, loading: f, disabled: m, tooltip: h, confirm: C, widget: b = () => { -}, widgetType: x, widgetData: T, widgetProps: P, widgetSetting: N, widgetContainerProps: I, ...D }) { - const z = W(() => ai(), []), j = u.isEmpty(h) || !h.enabled ? {} : h, R = u.isEmpty(C) ? { enabled: !1 } : Object.assign({ enabled: !0 }, C), B = bi({ className: t, name: r, type: o, icon: a, iconPosition: s }, i ?? e), [$, E] = F(!1), [J, { disabled: de, loading: $e }] = Ln({ widget: b, widgetType: x, widgetData: T, widgetProps: P, widgetSetting: N, widgetContainerProps: I }, { onAfterClick: p, onBeforeClick: c }); - return g(Di, { zIndex: z, okText: "确定", cancelText: "取消", getPopupContainer: (Y) => Y, ...R, disabled: de || m, open: $, onOpenChange: (Y) => { - if (!Y) return E(Y); - R.enabled ? E(Y) : J(d); +}, [o, e, i, n, r]), Ke = (e) => function({ className: t, variant: i, children: n, name: r, icon: a, type: o = "default", iconPosition: s = "start", noAuthType: l, onAfterClick: p, onBeforeClick: c, data: d, loading: f, disabled: h, tooltip: m, confirm: C, widget: b = () => { +}, widgetType: x, widgetData: $, widgetProps: P, widgetSetting: N, widgetContainerProps: I, ...W }) { + const z = D(() => ai(), []), E = u.isEmpty(m) || !m.enabled ? {} : m, R = u.isEmpty(C) ? { enabled: !1 } : Object.assign({ enabled: !0 }, C), B = bi({ className: t, name: r, type: o, icon: a, iconPosition: s }, i ?? e), [T, F] = O(!1), [J, { disabled: de, loading: Te }] = Ln({ widget: b, widgetType: x, widgetData: $, widgetProps: P, widgetSetting: N, widgetContainerProps: I }, { onAfterClick: p, onBeforeClick: c }); + return g(Wi, { zIndex: z, okText: "确定", cancelText: "取消", getPopupContainer: (Y) => Y, ...R, disabled: de || h, open: T, onOpenChange: (Y) => { + if (!Y) return F(Y); + R.enabled ? F(Y) : J(d); }, onConfirm: () => { J(d); }, onClick: (Y) => { Y.stopPropagation(); - }, children: g(Ui, { zIndex: z, getPopupContainer: (Y) => Y, ...j, title: $ ? null : j == null ? void 0 : j.title, trigger: ["hover", "click"], children: g(Ze, { loading: $e || f, disabled: de || m, ...B, ...D, children: n || r }) }) }); + }, children: g(Di, { zIndex: z, getPopupContainer: (Y) => Y, ...E, title: T ? null : E == null ? void 0 : E.title, trigger: ["hover", "click"], children: g(Ze, { loading: Te || f, disabled: de || h, ...B, ...W, children: n || r }) }) }); }, v = Ke("default"); v.propTypes = { type: w.oneOf(["primary", "default", "danger", ""]), size: w.oneOf(["large", "middle", "small"]), name: w.string, icon: w.string, iconPosition: w.oneOf(["start", "end"]), data: w.any, widget: w.any, widgetType: w.oneOf(["destroy", "redirect", "func", "fsdpf-component", "grid-layout-form", "grid-layout", "data-list"]), widgetData: w.object, widgetProps: w.object, widgetSetting: w.object, widgetContainerProps: w.object, tooltip: w.exact({ title: w.string.isRequired, placement: w.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: w.oneOfType([w.bool, w.number]), getPopupContainer: w.func }), confirm: w.exact({ title: w.string.isRequired, cancelText: w.string, okText: w.string, okType: w.oneOf(["primary", "default", "danger", ""]), placement: w.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: w.oneOfType([w.bool, w.number]), getPopupContainer: w.func, arrow: w.oneOfType([w.bool, w.exact({ pointAtCenter: w.bool })]) }) }; -const An = Ke("link"), Vn = Ke("circle"), In = Ke("round"), Mn = Ke("dashed"), Tt = ({ data: e, widget: t, widgetType: i = "fsdpf-component", widgetData: n, widgetProps: r, widgetSetting: a, widgetContainerProps: o, onAfterClick: s, onBeforeClick: l, children: p, extras: c }) => { - const d = W(() => ai(), []), f = ce(ie), [m, h] = F(!1), [C, b] = F("hover"), [x, T] = F({}), [P, N] = F(), { placement: I, align: D, arrow: z = { pointAtCenter: !0 }, getPopupContainer: j, ...R } = o || {}; +const An = Ke("link"), Vn = Ke("circle"), In = Ke("round"), Mn = Ke("dashed"), $t = ({ data: e, widget: t, widgetType: i = "fsdpf-component", widgetData: n, widgetProps: r, widgetSetting: a, widgetContainerProps: o, onAfterClick: s, onBeforeClick: l, children: p, extras: c }) => { + const d = D(() => ai(), []), f = ce(ie), [h, m] = O(!1), [C, b] = O("hover"), [x, $] = O({}), [P, N] = O(), { placement: I, align: W, arrow: z = { pointAtCenter: !0 }, getPopupContainer: E, ...R } = o || {}; V(() => { - i == "grid-layout-form" ? N(k.createElement(wi, { ...n, $setting: a, code: t })) : i == "data-list" ? N(k.createElement(Pt, { base62params: e, $setting: a, listCode: t })) : u.isString(t) ? le.getWidgetComponent(t).then(({ default: E }) => { - N(k.createElement(E, { ...n, $setting: a })); - }).catch((E) => N(E.toString())) : Et(t) ? N(k.createElement(t, { ...n, $setting: a })) : k.isValidElement(t) && N(k.cloneElement(t, { ...n, $setting: a })); + i == "grid-layout-form" ? N(k.createElement(wi, { ...n, $setting: a, code: t })) : i == "data-list" ? N(k.createElement(Pt, { base62params: e, $setting: a, listCode: t })) : u.isString(t) ? le.getWidgetComponent(t).then(({ default: F }) => { + N(k.createElement(F, { ...n, $setting: a })); + }).catch((F) => N(F.toString())) : Rt(t) ? N(k.createElement(t, { ...n, $setting: a })) : k.isValidElement(t) && N(k.cloneElement(t, { ...n, $setting: a })); }, [t, i, n]), V(() => { - Promise.resolve(He(r, e, { list: f })).then(T); + Promise.resolve(He(r, e, { list: f })).then($); }, [r, e, f.getBase62params]); - const B = (E, J = !1) => (h(E), !E && b("hover"), E ? l == null ? void 0 : l(x) : s == null ? void 0 : s(J)), $ = (E) => { - h(!0), b("click"); + const B = (F, J = !1) => (m(F), !F && b("hover"), F ? l == null ? void 0 : l(x) : s == null ? void 0 : s(J)), T = (F) => { + m(!0), b("click"); }; - return g(Wi, { zIndex: d, placement: I, onPopupClick: $, onClick: $, open: m, align: D, arrow: z, trigger: C, getPopupContainer: j, content: g(zn, { ...R, extras: c, children: P && k.cloneElement(P, { ...x, $close: (E) => B(!1, E) }) }), children: p, onOpenChange: B }); + return g(Ui, { zIndex: d, placement: I, onPopupClick: T, onClick: T, open: h, align: W, arrow: z, trigger: C, getPopupContainer: E, content: g(zn, { ...R, extras: c, children: P && k.cloneElement(P, { ...x, $close: (F) => B(!1, F) }) }), children: p, onOpenChange: B }); }, zn = ({ title: e, className: t, children: i, extras: n, width: r, height: a, ...o }) => { - const [s, l] = F({}), p = X((m, h) => l((C) => ({ ...C, [m]: h })), []), c = X((m) => l((h) => ({ ...h, [m]: void 0 })), []), d = e ? k.createElement("div", { className: "ff-popup-title" }, e) : s == null ? void 0 : s.title, f = n ?? k.createElement("div", { className: "ff-popup-reserved-extras" }, n); - return g(We.Provider, { value: { ele: s, mount: p, unmount: c }, children: A("div", { className: M("ff-popup ff-popover", t, s.rootClassName), style: { width: r, height: a }, ...o, children: [A("div", { className: "ff-popup-header", children: [d, s == null ? void 0 : s["sub-title"]] }), i, A("div", { className: "ff-popup-footer", children: [f, s == null ? void 0 : s.extras, s == null ? void 0 : s.actions] })] }) }); + const [s, l] = O({}), p = X((h, m) => l((C) => ({ ...C, [h]: m })), []), c = X((h) => l((m) => ({ ...m, [h]: void 0 })), []), d = e ? k.createElement("div", { className: "ff-popup-title" }, e) : s == null ? void 0 : s.title, f = n ?? k.createElement("div", { className: "ff-popup-reserved-extras" }, n); + return g(Ue.Provider, { value: { ele: s, mount: p, unmount: c }, children: A("div", { className: M("ff-popup ff-popover", t, s.rootClassName), style: { width: r, height: a }, ...o, children: [A("div", { className: "ff-popup-header", children: [d, s == null ? void 0 : s["sub-title"]] }), i, A("div", { className: "ff-popup-footer", children: [f, s == null ? void 0 : s.extras, s == null ? void 0 : s.actions] })] }) }); }; -Tt.propTypes = { widgetType: w.oneOf(["fsdpf-component", "grid-layout-form", "data-list"]) }; -const Jt = ({ options: e = [], triggerWeights: t = ["grid-layout-form", "grid-layout", "fsdpf-component", "print"], onAfterClick: i = (m, h, C) => { -}, onBeforeClick: n = (m, h, C) => { -}, labelVariant: r = "link", labelSize: a, labelRender: o, btnVariant: s, btnSize: l, btnRender: p = (m, h) => g(v, { ...m, data: h }, m.uuid || Ae()), widgetContainerProps: c = {}, children: d, data: f }) => { +$t.propTypes = { widgetType: w.oneOf(["fsdpf-component", "grid-layout-form", "data-list"]) }; +const Jt = ({ options: e = [], triggerWeights: t = ["grid-layout-form", "grid-layout", "fsdpf-component", "print"], onAfterClick: i = (h, m, C) => { +}, onBeforeClick: n = (h, m, C) => { +}, labelVariant: r = "link", labelSize: a, labelRender: o, btnVariant: s, btnSize: l, btnRender: p = (h, m) => g(v, { ...h, data: m }, h.uuid || Ae()), widgetContainerProps: c = {}, children: d, data: f }) => { if (u.isEmpty(e)) return d; - const [m, h] = W(() => (e || []).reduce((b, x) => { - const T = t.indexOf(x.widgetType); - return T === -1 ? b[1].push(x) : b[0] ? T < t.indexOf(b[0].widgetType) ? (b[1].push(b[0]), b[0] = x) : b[1].push(x) : b[0] = x, b; + const [h, m] = D(() => (e || []).reduce((b, x) => { + const $ = t.indexOf(x.widgetType); + return $ === -1 ? b[1].push(x) : b[0] ? $ < t.indexOf(b[0].widgetType) ? (b[1].push(b[0]), b[0] = x) : b[1].push(x) : b[0] = x, b; }, [null, []]), [e, t]); - o ? d = o(m, f) || d : d || (d = g(Ze, { ...bi(Object.assign(m != null && m.name || m != null && m.icon ? {} : { icon: "icon-location" }, m, { size: a }), r) })); - const C = h.map((b) => p(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: u.partialRight(i, b, f), onBeforeClick: u.partialRight(n, b, f) }, { size: l, variant: s }), f)); - return g(Tt, { widget: m == null ? void 0 : m.widget, widgetType: m == null ? void 0 : m.widgetType, widgetProps: m == null ? void 0 : m.widgetProps, widgetSetting: m == null ? void 0 : m.widgetSetting, widgetContainerProps: Object.assign({}, c, m == null ? void 0 : m.widgetContainerProps), data: f, widgetData: m == null ? void 0 : m.widgetData, extras: C, onAfterClick: u.partialRight(i, m, f), onBeforeClick: u.partialRight(n, m, f), children: d }); + o ? d = o(h, f) || d : d || (d = g(Ze, { ...bi(Object.assign(h != null && h.name || h != null && h.icon ? {} : { icon: "icon-location" }, h, { size: a }), r) })); + const C = m.map((b) => p(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: u.partialRight(i, b, f), onBeforeClick: u.partialRight(n, b, f) }, { size: l, variant: s }), f)); + return g($t, { widget: h == null ? void 0 : h.widget, widgetType: h == null ? void 0 : h.widgetType, widgetProps: h == null ? void 0 : h.widgetProps, widgetSetting: h == null ? void 0 : h.widgetSetting, widgetContainerProps: Object.assign({}, c, h == null ? void 0 : h.widgetContainerProps), data: f, widgetData: h == null ? void 0 : h.widgetData, extras: C, onAfterClick: u.partialRight(i, h, f), onBeforeClick: u.partialRight(n, h, f), children: d }); }; -Jt.propTypes = { triggerWeights: w.array, options: w.arrayOf(w.shape({ ...v.propTypes, widgetType: v.propTypes.widgetType.isRequired })), btnSize: v.propTypes.size, btnRender: w.func, btnVariant: w.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelVariant: w.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelRender: w.func, labelSize: v.propTypes.size, onAfterClick: w.func, onBeforeClick: w.func, widgetContainerProps: v.propTypes.widgetContainerProps, data: v.propTypes.data }, v.Link = An, v.Link.defaultProps = v.defaultProps, v.Link.propTypes = v.propTypes, v.Circle = Vn, v.Circle.defaultProps = v.defaultProps, v.Circle.propTypes = v.propTypes, v.Round = In, v.Round.defaultProps = v.defaultProps, v.Round.propTypes = v.propTypes, v.Dashed = Mn, v.Dashed.defaultProps = v.defaultProps, v.Dashed.propTypes = v.propTypes, v.Popover = Tt, v.GroupPopover = Jt; +Jt.propTypes = { triggerWeights: w.array, options: w.arrayOf(w.shape({ ...v.propTypes, widgetType: v.propTypes.widgetType.isRequired })), btnSize: v.propTypes.size, btnRender: w.func, btnVariant: w.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelVariant: w.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelRender: w.func, labelSize: v.propTypes.size, onAfterClick: w.func, onBeforeClick: w.func, widgetContainerProps: v.propTypes.widgetContainerProps, data: v.propTypes.data }, v.Link = An, v.Link.defaultProps = v.defaultProps, v.Link.propTypes = v.propTypes, v.Circle = Vn, v.Circle.defaultProps = v.defaultProps, v.Circle.propTypes = v.propTypes, v.Round = In, v.Round.defaultProps = v.defaultProps, v.Round.propTypes = v.propTypes, v.Dashed = Mn, v.Dashed.defaultProps = v.defaultProps, v.Dashed.propTypes = v.propTypes, v.Popover = $t, v.GroupPopover = Jt; const Bn = ({ fields: e, formProps: t, $close: i }) => { - const [n] = te.useForm(), r = W(() => [{ name: "__PROPS__", value: t }], [t]); + const [n] = te.useForm(), r = D(() => [{ name: "__PROPS__", value: t }], [t]); return g(G, { actions: A(k.Fragment, { children: [g(v, { name: "取消", widget: () => i(!1) }), g(v, { name: "确定", type: "primary", widget: () => n.validateFields(!0).then(i) })] }), children: g(te, { fields: r, form: n, className: "ff-modal-form", children: e == null ? void 0 : e.map(({ code: a, ...o }) => g(yi, { code: a, ...o }, a)) }) }); -}, qn = ({ className: e, $close: t, children: i, title: n, subTitle: r, actions: a, extras: o, ...s }) => A(Xi, { ...s, prefixCls: "ff-drawer", className: M("ff-popup", e), maskMotion: { motionAppear: !0, motionName: "mask-motion" }, motion: (l) => ({ motionAppear: !0, motionName: `panel-motion-${l}` }), children: [A("div", { className: "ff-popup-header", children: [g("button", { "aria-label": "Close", className: "ff-popup-close", onClick: s.onClose, children: g(vt, { type: "close" }) }), n, r] }), g("div", { className: "ff-popup-body", children: i }), A("div", { className: "ff-popup-footer", children: [o, a] })] }), Dn = ({ className: e, $close: t, $event: i, children: n, title: r, subTitle: a, actions: o, extras: s, placement: l, ...p }) => { +}, qn = ({ className: e, $close: t, children: i, title: n, subTitle: r, actions: a, extras: o, ...s }) => A(Xi, { ...s, prefixCls: "ff-drawer", className: M("ff-popup", e), maskMotion: { motionAppear: !0, motionName: "mask-motion" }, motion: (l) => ({ motionAppear: !0, motionName: `panel-motion-${l}` }), children: [A("div", { className: "ff-popup-header", children: [g("button", { "aria-label": "Close", className: "ff-popup-close", onClick: s.onClose, children: g(vt, { type: "close" }) }), n, r] }), g("div", { className: "ff-popup-body", children: i }), A("div", { className: "ff-popup-footer", children: [o, a] })] }), Wn = ({ className: e, $close: t, $event: i, children: n, title: r, subTitle: a, actions: o, extras: s, placement: l, ...p }) => { const c = (i == null ? void 0 : i.pageX) === void 0 ? { animation: null, maskAnimation: null, mousePosition: { x: null, y: null } } : { animation: "zoom", maskAnimation: "fade", mousePosition: { x: i == null ? void 0 : i.pageX, y: i == null ? void 0 : i.pageY } }; return g(Qi, { ...p, ...c, prefixCls: "ff-modal", modalRender: () => A("div", { className: M("ff-modal-content ff-popup", e), children: [A("div", { className: "ff-popup-header", children: [g("button", { "aria-label": "Close", className: "ff-popup-close", onClick: p.onClose, children: g(vt, { type: "close" }) }), r, a] }), g("div", { className: "ff-popup-body", children: n }), A("div", { className: "ff-popup-footer", children: [s, o] })] }) }); }, Ci = ({ placement: e, $close: t, $event: i, children: n, title: r, ...a }) => { - const [o, s] = F({}), [l, p] = F(!0), c = X((h, C) => s((b) => ({ ...b, [h]: C })), []), d = X((h) => s((C) => ({ ...C, [h]: void 0 })), []); + const [o, s] = O({}), [l, p] = O(!0), c = X((m, C) => s((b) => ({ ...b, [m]: C })), []), d = X((m) => s((C) => ({ ...C, [m]: void 0 })), []); let f = { ...a, className: o.rootClassName, title: o.title || r && k.createElement("div", { className: M("ff-popup-title") }, r), subTitle: o["sub-title"], actions: o.actions, extras: o.extras, children: n, $close: t, $event: i, onClose: () => p(!1) }; - const m = () => { + const h = () => { t(!1); }; - return g(We.Provider, { value: { ele: o, mount: c, unmount: d }, children: e && e !== "center" ? g(qn, { ...f, placement: e, open: l, afterOpenChange: (h) => !h && m() }) : g(Dn, { ...f, visible: l, afterClose: m }) }); + return g(Ue.Provider, { value: { ele: o, mount: c, unmount: d }, children: e && e !== "center" ? g(qn, { ...f, placement: e, open: l, afterOpenChange: (m) => !m && h() }) : g(Wn, { ...f, visible: l, afterClose: h }) }); }; Ci.propTypes = { placement: w.oneOf(["center", "left", "top", "right", "bottom"]) }; const K = () => { @@ -868,7 +871,7 @@ const K = () => { }); }, []); const n = (a, o = {}, s = {}) => new Promise((l, p) => r([l, p], a, o, s)), r = ([a, o], s, l = {}, p = {}) => { - const c = K.$index++, d = (f) => ((m, h) => (K.$popups.delete(m), i(), h == null ? void 0 : h()))(c, () => a(f)); + const c = K.$index++, d = (f) => ((h, m) => (K.$popups.delete(h), i(), m == null ? void 0 : m()))(c, () => a(f)); if (s === ei) return e.open({ ...p, key: c, content: k.createElement(s, { ...l, $close: () => e.close(c) }) }); K.$popups.set(c, k.createElement(Ci, { zIndex: c, maskClosable: !1, $event: l == null ? void 0 : l.$event, ...p, key: c, $close: d }, k.isValidElement(s) ? k.cloneElement(s, { ...l, $close: d }) : s != null && s.name || At.isForwardRef(s) || (s == null ? void 0 : s.$$typeof) === At.ForwardRef ? k.createElement(s, { ...l, $close: d }) : s)), i(); }; @@ -905,7 +908,7 @@ const gt = "mine", Qe = "token"; var Ce, Oe; const oe = class oe { constructor() { - O(this, Oe, /* @__PURE__ */ new Map()); + j(this, Oe, /* @__PURE__ */ new Map()); S(this, "setVendor", (t, i) => y(this, Oe).set(t, new Qt(i, async (n, r) => { var o, s; if (!(n != null && n.default)) throw "@pkg not found"; @@ -966,18 +969,18 @@ const oe = class oe { if (y(oe, Ce)) return y(oe, Ce); } }; -Ce = new WeakMap(), Oe = new WeakMap(), O(oe, Ce, null), S(oe, "getInstance", () => (y(oe, Ce) || H(oe, Ce, new oe()), y(oe, Ce))); +Ce = new WeakMap(), Oe = new WeakMap(), j(oe, Ce, null), S(oe, "getInstance", () => (y(oe, Ce) || H(oe, Ce, new oe()), y(oe, Ce))); let St = oe; -const le = St.getInstance(), Un = k.createContext({ user: {}, initUser: () => { -}, initUserComplete: !1 }), Wn = k.createContext({ set: () => { +const le = St.getInstance(), Dn = k.createContext({ user: {}, initUser: () => { +}, initUserComplete: !1 }), Un = k.createContext({ set: () => { }, get: () => { }, assign: () => { }, currentRoute: () => { -} }), Et = (e) => !!(e != null && e.name) && (e.prototype instanceof k.Component || /^[A-Z]/.test(e.name)), Hn = (e, t) => { +} }), Rt = (e) => !!(e != null && e.name) && (e.prototype instanceof k.Component || /^[A-Z]/.test(e.name)), Hn = (e, t) => { if (!e || typeof window > "u") return; let i = document.querySelector(`style[ff-style-token="${t}"]`); return i ? (i.innerHTML = e, e) : (i = document.createElement("style"), i.setAttribute("ff-style-token", t), i.setAttribute("type", "text/css"), i.innerHTML = e, document.head.appendChild(i), e); -}, Jn = Object.freeze(Object.defineProperty({ __proto__: null, AppContext: Un, AppGlobalParamsContext: Wn, cache: Qt, configure: Ve, default: le, func: xe, http: L, insertStyle: Hn, isReactComponent: Et, route: ke }, Symbol.toStringTag, { value: "Module" })); +}, Jn = Object.freeze(Object.defineProperty({ __proto__: null, AppContext: Dn, AppGlobalParamsContext: Un, cache: Qt, configure: Ve, default: le, func: xe, http: L, insertStyle: Hn, isReactComponent: Rt, route: ke }, Symbol.toStringTag, { value: "Module" })); export { yi as $, bn as A, @@ -1005,22 +1008,22 @@ export { ot as W, vr as X, Pr as Y, - En as Z, - $t as _, + Rn as Z, + Tt as _, ti as a, wi as a0, Sn as a1, vn as a2, Pn as a3, fi as a4, - $n as a5, - $r as a6, + Tn as a5, + Tr as a6, kt as a7, v as a8, en as a9, Ln as aa, G as ab, - We as ac, + Ue as ac, Zt as ad, K as ae, _ as af, @@ -1028,15 +1031,15 @@ export { dr as ah, ur as ai, le as aj, - Et as ak, + Rt as ak, Hn as al, L as am, Qt as an, Ve as ao, xe as ap, ke as aq, - Un as ar, - Wn as as, + Dn as ar, + Un as as, He as b, pr as c, ii as d, diff --git a/dist/components.js b/dist/components.js index e0141ba..995d6f7 100644 --- a/dist/components.js +++ b/dist/components.js @@ -1,4 +1,4 @@ -import { ag as s, a7 as p, ah as n, ai as t, af as d } from "./common/main-D0zIbJsd.js"; +import { ag as s, a7 as p, ah as n, ai as t, af as d } from "./common/main-iMRzW1Jg.js"; export { s as Empty, p as Icon, diff --git a/dist/container.js b/dist/container.js index fcdb059..4b98239 100644 --- a/dist/container.js +++ b/dist/container.js @@ -1,4 +1,4 @@ -import { ac as o, ag as s, ah as d, ai as p, ad as t, af as n, ae as r, ab as u } from "./common/main-D0zIbJsd.js"; +import { ac as o, ag as s, ah as d, ai as p, ad as t, af as n, ae as r, ab as u } from "./common/main-iMRzW1Jg.js"; export { o as Context, s as Empty, diff --git a/dist/data-converter.js b/dist/data-converter.js index 5b25cea..b48934d 100644 --- a/dist/data-converter.js +++ b/dist/data-converter.js @@ -1,6 +1,6 @@ import "lodash"; import "react"; -import { D as p } from "./common/main-D0zIbJsd.js"; +import { D as p } from "./common/main-iMRzW1Jg.js"; export { p as default }; diff --git a/dist/data-list.js b/dist/data-list.js index cd35849..e898636 100644 --- a/dist/data-list.js +++ b/dist/data-list.js @@ -1,4 +1,4 @@ -import { A as t, y as e, q as r, w as o, B as i, x as u, v as D, z as l, s as L, C as n, p, E as m, M as C, I as c, K as F, J as b, L as d, F as k } from "./common/main-D0zIbJsd.js"; +import { A as t, y as e, q as r, w as o, B as i, x as u, v as D, z as l, s as L, C as n, p, E as m, M as C, I as c, K as F, J as b, L as d, F as k } from "./common/main-iMRzW1Jg.js"; export { t as DataListContent, e as DataListContext, diff --git a/dist/data-list/utils.js b/dist/data-list/utils.js index 3791454..6222374 100644 --- a/dist/data-list/utils.js +++ b/dist/data-list/utils.js @@ -1,5 +1,5 @@ import "lodash"; -import { k as a } from "../common/main-D0zIbJsd.js"; +import { k as a } from "../common/main-iMRzW1Jg.js"; export { a as getDefaultExpandRowKeys }; diff --git a/dist/grid-layout-form.js b/dist/grid-layout-form.js index 46d1aa4..d8a0663 100644 --- a/dist/grid-layout-form.js +++ b/dist/grid-layout-form.js @@ -1,4 +1,4 @@ -import { _ as s, a0 as r, $ as u, Z as o, a4 as t, a3 as d, a6 as m, a2 as F, a1 as i, a5 as g } from "./common/main-D0zIbJsd.js"; +import { _ as s, a0 as r, $ as u, Z as o, a4 as t, a3 as d, a6 as m, a2 as F, a1 as i, a5 as g } from "./common/main-iMRzW1Jg.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 9212b69..41bd420 100644 --- a/dist/grid-layout-form/utils.js +++ b/dist/grid-layout-form/utils.js @@ -1,5 +1,5 @@ import "lodash"; -import { g as o, a as g } from "../common/main-D0zIbJsd.js"; +import { g as o, a as g } from "../common/main-iMRzW1Jg.js"; export { o as getOptionItemByValue, g as getWidgetByNormalize diff --git a/dist/grid-layout.js b/dist/grid-layout.js index 105c69e..75b0e95 100644 --- a/dist/grid-layout.js +++ b/dist/grid-layout.js @@ -1,4 +1,4 @@ -import { l as d, m as e, H as i, G as o, n as t, o as u } from "./common/main-D0zIbJsd.js"; +import { l as d, m as e, H as i, G as o, n as t, o as u } from "./common/main-iMRzW1Jg.js"; export { d as GridLayout, e as GridLayoutWidget, diff --git a/dist/grid-layout/utils.js b/dist/grid-layout/utils.js index ab9dc7b..4738b47 100644 --- a/dist/grid-layout/utils.js +++ b/dist/grid-layout/utils.js @@ -1,4 +1,4 @@ -import { i as o, j as a } from "../common/main-D0zIbJsd.js"; +import { i as o, j as a } from "../common/main-iMRzW1Jg.js"; export { o as getBoxStyle, a as getWidgetByNormalize diff --git a/dist/hooks.js b/dist/hooks.js index 67924ee..85a95dd 100644 --- a/dist/hooks.js +++ b/dist/hooks.js @@ -1,7 +1,7 @@ import "lodash"; import "rc-field-form"; import "react"; -import { W as r, V as o, X as p, T as f, U as i, Y as m, S as c } from "./common/main-D0zIbJsd.js"; +import { W as r, V as o, X as p, T as f, U as i, Y as m, S as c } from "./common/main-iMRzW1Jg.js"; import { default as S } from "rc-util/lib/hooks/useMergedState"; export { r as useDeepEffect, diff --git a/dist/iconfont.js b/dist/iconfont.js index 60a788f..16e37f8 100644 --- a/dist/iconfont.js +++ b/dist/iconfont.js @@ -2,7 +2,7 @@ import "react/jsx-runtime"; import "react"; import "prop-types"; import "classnames"; -import { a7 as a } from "./common/main-D0zIbJsd.js"; +import { a7 as a } from "./common/main-iMRzW1Jg.js"; export { a as default }; diff --git a/dist/index.js b/dist/index.js index 95bcbb3..2d2634e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,4 +1,4 @@ -import { ar as t, as as e, an as o, ao as n, aj as p, ap as r, am as c, al as l, ak as f, aq as m } from "./common/main-D0zIbJsd.js"; +import { ar as t, as as e, an as o, ao as n, aj as p, ap as r, am as c, al as l, ak as f, aq as m } from "./common/main-iMRzW1Jg.js"; export { t as AppContext, e as AppGlobalParamsContext, diff --git a/dist/pages.js b/dist/pages.js index 8967ac0..a2612c3 100644 --- a/dist/pages.js +++ b/dist/pages.js @@ -1,4 +1,4 @@ -import { O as t, N as e, P as o, Q as P } from "./common/main-D0zIbJsd.js"; +import { O as t, N as e, P as o, Q as P } from "./common/main-iMRzW1Jg.js"; export { t as CustomPage, e as DataListPage, diff --git a/dist/res-ws.js b/dist/res-ws.js index 217ec72..8a5f9b8 100644 --- a/dist/res-ws.js +++ b/dist/res-ws.js @@ -1,5 +1,5 @@ import "lodash"; -import { R as a } from "./common/main-D0zIbJsd.js"; +import { R as a } from "./common/main-iMRzW1Jg.js"; export { a as default }; diff --git a/dist/style.css b/dist/style.css index fb0cf6a..da62257 100644 --- a/dist/style.css +++ b/dist/style.css @@ -1 +1 @@ -#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;-webkit-transform:rotate(3deg) translate(0px,-4px);-ms-transform:rotate(3deg) translate(0px,-4px);transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:solid 2px transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .spinner,.nprogress-custom-parent #nprogress .bar{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@keyframes nprogress-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.react-grid-layout .react-grid-item{box-sizing:border-box!important}.monaco-editor .parameter-hints-widget{border:0px}.monaco-editor .parameter-hints-widget .signature{padding:0}.monaco-editor .suggest-widget,.monaco-editor.vs-dark .suggest-widget{border:0px}.monaco-editor .rename-box{top:0}.ant-divider:has(+.ant-form .ant-divider:first-child){display:none}:root{--padding-lg: 24px;--padding-md: 16px;--padding-sm: 12px;--padding-xs: 8px;--padding-xss: 4px;--margin-lg: 24px;--margin-md: 16px;--margin-sm: 12px;--margin-xs: 8px;--margin-xss: 4px;--border-color: #f2f2f2;--bg-color: rgba(0, 0, 0, .02)}#root{height:100vh;background-color:#f0f2f5}*::-webkit-scrollbar-thumb{background:#aaa;border-radius:5px}*::-webkit-scrollbar-thumb:hover{background:#999}*::-webkit-scrollbar-track{background-color:#ddd}*::-webkit-scrollbar-corner{background-color:#ddd}*::-webkit-scrollbar{width:5px;height:5px}.ff-container{height:100%}.ff-loading{height:100vh;width:100%;background-color:#f0f2f5;display:flex;justify-content:center;align-items:center}.ff-loading .loader{-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:128px;height:80px}.ff-loading .loader .square{position:relative}.ff-loading .loader .square:nth-child(1){margin-left:0}.ff-loading .loader .square:nth-child(1) span{-webkit-animation:animsquare1 2s infinite ease-in;animation:animsquare1 2s infinite ease-in}.ff-loading .loader .square:nth-child(2){margin-left:44px}.ff-loading .loader .square:nth-child(2) span{-webkit-animation:animsquare2 2s infinite ease-in;animation:animsquare2 2s infinite ease-in}.ff-loading .loader .square:nth-child(3){margin-left:88px}.ff-loading .loader .square:nth-child(3) span{-webkit-animation:animsquare3 2s infinite ease-in;animation:animsquare3 2s infinite ease-in}.ff-loading .loader .square:nth-child(4){margin-left:132px}.ff-loading .loader .square:nth-child(4) span{-webkit-animation:animsquare4 2s infinite ease-in;animation:animsquare4 2s infinite ease-in}.ff-loading .loader .square span{position:absolute;top:0;left:20px;height:36px;width:36px;border-radius:2px;background-color:#fff}.ff-loading .loader .square span:nth-child(1){top:0;-webkit-animation-delay:0s;animation-delay:0s}.ff-loading .loader .square span:nth-child(2){top:44px;-webkit-animation-delay:.15s;animation-delay:.15s}.ff-loading .loader .square span:nth-child(3){top:88px;-webkit-animation-delay:.3s;animation-delay:.3s}@media (max-width: 550px){.ff-loading .loader{-webkit-transform:scale(.75);transform:scale(.75)}}@media (max-width: 440px){.ff-loading .loader{-webkit-transform:scale(.5);transform:scale(.5)}}@keyframes animsquare4{0%,5%,95%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}30%,70%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}@keyframes animsquare3{0%,10%,90%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}35%,65%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}@keyframes animsquare2{0%,15%,85%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}40%,60%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}@keyframes animsquare1{0%,20%,80%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}45%,55%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}.ff-notification{position:fixed;z-index:2000;display:flex;max-height:100vh;padding:20px;align-items:flex-end;width:380px;overflow-x:hidden;overflow-y:clip;height:100vh;box-sizing:content-box;pointer-events:none;flex-direction:column;gap:24px}.ff-notification-top,.ff-notification-topLeft,.ff-notification-topRight{top:0}.ff-notification-bottom,.ff-notification-bottomRight,.ff-notification-bottomLeft{bottom:0}.ff-notification-bottomRight,.ff-notification-topRight{right:0}.ff-notification-notice{position:relative;display:block;box-sizing:border-box;line-height:1.5;width:100%}.ff-notification-notice-wrapper{z-index:2000;pointer-events:auto;position:relative;display:block;box-sizing:border-box;border-radius:8px;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d;width:calc(100% - 40px);background-color:#fff;right:0}.ff-notification-notice-content{padding:14px 18px;display:flex;gap:8px;white-space:pre-wrap}.ff-notification-notice-content .ff-notification-icon.ff-notification-error{--bg-color: #ff4d4f}.ff-notification-notice-content .ff-notification-icon.ff-notification-success{--bg-color: #52c41a}.ff-notification-notice-content .ff-notification-icon.ff-notification-info{--bg-color: #1677ff}.ff-notification-notice-content .ff-notification-icon>*:first-child{width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;color:#fff;background-color:var(--bg-color)}.ff-notification-notice-progress{position:absolute;left:3px;right:3px;border-radius:1px;overflow:hidden;-moz-appearance:none;appearance:none;-webkit-appearance:none;display:block;inline-size:100%;block-size:2px;border:0}.ff-notification-notice-progress,.ff-notification-notice-progress::-webkit-progress-bar{background-color:#0000000a}.ff-notification-notice-progress::-moz-progress-bar{background-color:#31afff}.ff-notification-notice-progress::-webkit-progress-value{background-color:#31afff}.ff-notification-fade{overflow:hidden;transition:all .3s}.ff-notification-fade-appear-prepare{pointer-events:none;opacity:0!important}.ff-notification-fade-appear-start{transform:translate(100%);opacity:0}.ff-notification-fade-appear-active{transform:translate(0);opacity:1}.ff-data-list-framework{height:100%;--sider-width: 280px;--col-num: 1;--gap: 8px;display:flex;gap:var(--gap)}.ff-data-list-framework .ff-data-list-container{width:100%;height:100%;row-gap:var(--gap);display:flex;flex-direction:column}.ff-data-list-framework .ff-data-list-container .ff-data-list-content{flex:1;overflow-y:auto;display:grid;gap:var(--gap);padding:calc(var(--gap) / 2);grid-template-columns:repeat(var(--col-num),1fr);grid-auto-rows:min-content}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item{display:flex;flex-direction:column;justify-content:space-between;row-gap:8px;border-radius:4px;background-color:#fff;box-shadow:0 0 8px #00000014}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .ff-grid-layout{padding:8px}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions{margin-top:8px;display:flex;justify-content:space-between;border-top:1px solid #f0f0f0}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions .data-list-grid-layout-item-action{text-align:center;margin:2px 0;flex:1}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions .data-list-grid-layout-item-action:not(:last-child){border-right:1px solid #f0f0f0}.ff-data-table-framework{height:100%;--sider-width: 280px;--col-num: 1;--gap: 8px;display:flex;gap:var(--gap)}.ff-data-table-framework .ff-data-table-container{width:100%;height:100%;display:flex;flex-direction:column;row-gap:var(--gap)}.ff-data-list-filter:has(.ff-data-list-filter-actions:not(.expanded)){height:60px;overflow-y:hidden}.ff-data-list-filter .ff-data-list-filter-default-form.ff-grid-layout-form{--grid-layout-cols: 25;--grid-layout-item-margin-x: 8px;--grid-layout-item-margin-y: 16px}.ff-data-list-filter .ff-data-list-filter-actions{grid-column:span var(--itemp-span, 5) / calc(var(--grid-layout-cols, 25) + 1)}.ff-data-list-filter .ff-data-list-filter-actions:not(.expanded){grid-row:1}.ff-data-list-filter .ff-data-list-filter-actions .ff-data-list-filter-expanded-button{margin-left:8px}.ff-data-list-filter .ff-data-list-filter-actions .ant-form-item-control-input-content{display:flex;justify-content:flex-end;align-items:center;gap:8px}.ff-data-list-footer{padding-block-start:8px;display:flex;justify-content:space-between}.ff-data-list-footer .ff-data-list-actions{display:flex;justify-content:center;gap:8px}.ff-data-list-sider{width:var(--sider-width, 280px);overflow-y:auto;box-shadow:8px 0 4px -8px #0000000d}.ff-data-list-sider+.ff-data-list-container{width:calc(100% - var(--sider-width, 280px))}.ff-data-list-toolbar{gap:8px;display:flex;justify-content:space-between;align-items:center}.ff-data-list-toolbar .ff-data-list-title{color:#000000e0;font-weight:600;font-size:14px}.ff-data-list-toolbar .ff-data-list-actions{display:flex;justify-content:center;gap:8px}.ff-data-list-toolbar .ff-data-list-tabs{cursor:pointer}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab{color:#00000073}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab:hover{font-weight:600}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab.active{color:#1677ff;font-weight:600}.ff-data-list-item-operations{max-width:180px;display:flex;flex-wrap:wrap;gap:var(--margin-xss, 4px)}.ff-data-list-item-operations>.ant-btn:not(.ant-btn-circle){flex-grow:1}.ff-data-list-helper{height:100%}.ff-data-list-table{height:100%;overflow-y:hidden}.ff-data-list-table .ant-table *{scrollbar-width:auto;scrollbar-color:auto}.ff-grid-layout{--grid-layout-h: 1;--grid-layout-row: none;--grid-layout-row-height: 18px;--grid-layout-row-height-offset: 0px;--grid-layout-cols: 12;display:grid;grid-template-columns:repeat(var(--grid-layout-cols),1fr);grid-auto-rows:minmax(min-content,max-content);padding:var(--grid-layout-container-padding-y, 0) var(--grid-layout-container-padding-x, 0);padding-bottom:calc(var(--grid-layout-container-padding-y, 0) + var(--grid-layout-item-margin-y));column-gap:var(--grid-layout-item-margin-x);row-gap:var(--grid-layout-item-margin-y)}.ff-grid-layout .grid-layout-item{grid-row:span var(--grid-layout-h, 1);grid-column:calc(var(--grid-layout-x, 1) + 1)/calc(var(--grid-layout-x, 1) + var(--grid-layout-w, 1) + 1);height:calc(var(--grid-layout-row-height) * var(--grid-layout-h) + var(--grid-layout-row-height-offset));padding:var(--grid-layout-box-paddin);margin:var(--grid-layout-box-margin);display:var(--grid-layout-box-display, flex);align-items:var(--grid-layout-box-align-items, center);justify-content:var(--grid-layout-box-justify-content, normal)}.ff-grid-layout-form{--grid-layout-h: 1;--grid-layout-row: none;--grid-layout-row-height: 18px;--grid-layout-row-height-offset: 0px;--grid-layout-cols: 12;display:grid;grid-template-columns:repeat(var(--grid-layout-cols),1fr);grid-auto-rows:minmax(min-content,max-content);padding:var(--grid-layout-container-padding-y, 0) var(--grid-layout-container-padding-x, 0);padding-bottom:calc(var(--grid-layout-container-padding-y, 0) + var(--grid-layout-item-margin-y, 16px));column-gap:var(--grid-layout-item-margin-x, 8px);row-gap:var(--grid-layout-item-margin-y, 16px)}.ff-grid-layout-form .grid-layout-item{grid-row:span var(--grid-layout-h, 1);grid-column:calc(var(--grid-layout-x, 1) + 1)/calc(var(--grid-layout-x, 1) + var(--grid-layout-w, 1) + 1);height:calc(var(--grid-layout-row-height) * var(--grid-layout-h) + var(--grid-layout-row-height-offset));padding:var(--grid-layout-box-padding-y, 0) var(--grid-layout-box-padding-x, 0);margin:var(--grid-layout-box-margin)}.ff-iconfont{transform:scale(1.14);vertical-align:-.125em;display:inline-flex;align-items:center;justify-content:center}.ff-iconfont:not(:last-child){margin-right:8px}.ff-button.ant-btn-link,.ff-button.ant-btn-text{width:initial;padding:0;height:auto}.ff-default.ant-btn-link{color:#000000e0}.ant-btn-link.ant-btn:not(:disabled):focus-visible{outline:initial;outline-offset:initial;transition:initial}.ff-popover .ff-popup-header{margin-bottom:calc(var(--margin-sm) / 2)}.ff-popover .ff-popup-header:empty{display:none}.ff-popover .ff-popup-footer{display:flex;justify-content:space-between;margin-top:var(--margin-sm)}.ff-popover .ff-popup-footer:empty{display:none}.ff-modal-form{display:flex;flex-direction:column;gap:var(--modal-form-gap, 8px)}.mask-motion-enter-active,.mask-motion-appear-active,.mask-motion-leave-active{transition:all .3s}.mask-motion-enter,.mask-motion-appear{opacity:0}.mask-motion-enter-active,.mask-motion-appear-active,.mask-motion-leave{opacity:1}.mask-motion-leave-active{opacity:0}.panel-motion-left-enter-start,.panel-motion-left-appear-start,.panel-motion-left-leave-start{transition:none!important}.panel-motion-left-enter-active,.panel-motion-left-appear-active,.panel-motion-left-leave-active{transition:all .3s}.panel-motion-left-enter,.panel-motion-left-appear{transform:translate(-100%)}.panel-motion-left-enter-active,.panel-motion-left-appear-active,.panel-motion-left-leave{transform:translate(0)}.panel-motion-left-leave-active{transform:translate(-100%)!important}.panel-motion-right-enter-start,.panel-motion-right-appear-start,.panel-motion-right-leave-start{transition:none!important}.panel-motion-right-enter-active,.panel-motion-right-appear-active,.panel-motion-right-leave-active{transition:all .3s}.panel-motion-right-enter,.panel-motion-right-appear{transform:translate(100%)}.panel-motion-right-enter-active,.panel-motion-right-appear-active,.panel-motion-right-leave{transform:translate(0)}.panel-motion-right-leave-active{transform:translate(100%)!important}.panel-motion-top-enter-start,.panel-motion-top-appear-start,.panel-motion-top-leave-start{transition:none!important}.panel-motion-top-enter-active,.panel-motion-top-appear-active,.panel-motion-top-leave-active{transition:all .3s}.panel-motion-top-enter,.panel-motion-top-appear{transform:translateY(-100%)}.panel-motion-top-enter-active,.panel-motion-top-appear-active,.panel-motion-top-leave{transform:translateY(0)}.panel-motion-top-leave-active{transform:translateY(-100%)!important}.panel-motion-bottom-enter-start,.panel-motion-bottom-appear-start,.panel-motion-bottom-leave-start{transition:none!important}.panel-motion-bottom-enter-active,.panel-motion-bottom-appear-active,.panel-motion-bottom-leave-active{transition:all .3s}.panel-motion-bottom-enter,.panel-motion-bottom-appear{transform:translateY(100%)}.panel-motion-bottom-enter-active,.panel-motion-bottom-appear-active,.panel-motion-bottom-leave{transform:translateY(0)}.panel-motion-bottom-leave-active{transform:translateY(100%)!important}.ff-drawer-mask{top:0;right:0;bottom:0;left:0;position:absolute;z-index:1050;pointer-events:auto;background-color:var(--popup-mask-bg-color, rgba(0, 0, 0, .45))}.ff-drawer{top:0;right:0;bottom:0;left:0;position:fixed;z-index:1050;pointer-events:none}.ff-drawer .ff-popup-close{top:14px;right:0}.ff-drawer-inline{position:absolute}.ff-drawer-left .ff-drawer-content-wrapper{inset:0 auto 0 0;box-shadow:6px 0 16px #00000014,3px 0 6px -4px #0000001f,9px 0 28px 8px #0000000d}.ff-drawer-right .ff-drawer-content-wrapper{inset:0 0 0 auto;box-shadow:-6px 0 16px #00000014,-3px 0 6px -4px #0000001f,-9px 0 28px 8px #0000000d}.ff-drawer-top .ff-drawer-content-wrapper{top:0;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d}.ff-drawer-bottom .ff-drawer-content-wrapper{bottom:0;box-shadow:0 -6px 16px #00000014,0 -3px 6px -4px #0000001f,0 -9px 28px 8px #0000000d}.ff-drawer-top .ff-drawer-content-wrapper,.ff-drawer-bottom .ff-drawer-content-wrapper{inset-inline:0}.ff-drawer-content{width:100%;height:100%;overflow:auto;background-color:var(--popup-bg-color, #fff);pointer-events:auto}.ff-drawer .ff-popup-header{padding:16px 8px;border-bottom:1px solid rgba(5,5,5,.06)}.ff-drawer .ff-popup-footer{border-top:1px solid rgba(5,5,5,.06);padding:12px 8px}.ff-drawer .ff-popup-body{padding:8px}.ff-drawer-content-wrapper{position:absolute;z-index:1050;overflow:hidden;transition:transform .3s;max-width:100vw}.ff-drawer-content-wrapper-hidden{display:none}.ff-modal-mask{position:fixed;top:0;right:0;left:0;bottom:0;pointer-events:auto;background-color:var(--popup-mask-bg-color, rgba(0, 0, 0, .45));height:100%;filter:alpha(opacity=50);z-index:1050}.ff-modal-mask-hidden{display:none}.ff-modal-fade-enter,.ff-modal-fade-appear{opacity:0;animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.55,0,.55,.2);animation-play-state:paused}.ff-modal-fade-leave{animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.55,0,.55,.2);animation-play-state:paused}.ff-modal-fade-enter.ff-modal-fade-enter-active,.ff-modal-fade-appear.ff-modal-fade-appear-active{animation-name:rcDialogFadeIn;animation-play-state:running}.ff-modal-fade-leave.ff-modal-fade-leave-active{animation-name:rcDialogFadeOut;animation-play-state:running}@keyframes rcDialogFadeIn{0%{opacity:0}to{opacity:1}}@keyframes rcDialogFadeOut{0%{opacity:1}to{opacity:0}}.ff-modal{position:relative;top:100px;width:min-content;margin:0 auto;max-height:calc(100vh - 150px);min-width:max(35vw,248px)}.ff-modal .ff-popup-close{top:14px;right:8px}.ff-modal .ff-popup-header:has(.ff-popup-title),.ff-modal .ff-popup-header:has(.ff-popup-sub-title){margin-bottom:8px}.ff-modal .ff-popup-footer:not(:empty){margin-top:12px}.ff-modal-wrap{position:fixed;overflow:auto;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.ff-modal-title{margin:0;font-size:14px;line-height:21px;font-weight:700}.ff-modal-content{position:absolute;top:0;right:0;bottom:0;left:0;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}.ff-modal-zoom-enter,.ff-modal-zoom-appear{opacity:0;animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-play-state:paused}.ff-modal-zoom-leave{animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.6,.04,.98,.34);animation-play-state:paused}.ff-modal-zoom-enter.ff-modal-zoom-enter-active,.ff-modal-zoom-appear.ff-modal-zoom-appear-active{animation-name:rcDialogZoomIn;animation-play-state:running}.ff-modal-zoom-leave.ff-modal-zoom-leave-active{animation-name:rcDialogZoomOut;animation-play-state:running}@keyframes rcDialogZoomIn{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes rcDialogZoomOut{0%{transform:scale(1)}to{opacity:0;transform:scale(0)}}.ff-popup-close{cursor:pointer;border:0;background:transparent;font-size:24px;position:absolute;line-height:1;color:#000;opacity:.5}.ff-popup-close:disabled{pointer-events:none}.ff-popup-close:hover{opacity:.65}.ff-popup{display:flex;flex-direction:column}.ff-popup-title,.ff-popup-sub-title{display:inline}.ff-popup-title{font-size:18px;font-weight:600}.ff-popup-footer{display:flex;gap:8px;justify-content:flex-end}.ff-popup-footer:empty{display:none}.ff-popup-reserved-extras,.ff-popup-extras,.ff-popup-actions{display:flex;align-items:center;gap:8px}.ff-popup-actions{margin-left:auto}.ff-popup-body{flex:1;overflow-y:auto} +#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;-webkit-transform:rotate(3deg) translate(0px,-4px);-ms-transform:rotate(3deg) translate(0px,-4px);transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:solid 2px transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .spinner,.nprogress-custom-parent #nprogress .bar{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@keyframes nprogress-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.react-grid-layout .react-grid-item{box-sizing:border-box!important}.monaco-editor .parameter-hints-widget{border:0px}.monaco-editor .parameter-hints-widget .signature{padding:0}.monaco-editor .suggest-widget,.monaco-editor.vs-dark .suggest-widget{border:0px}.monaco-editor .rename-box{top:0}.ant-divider:has(+.ant-form .ant-divider:first-child){display:none}:root{--padding-lg: 24px;--padding-md: 16px;--padding-sm: 12px;--padding-xs: 8px;--padding-xss: 4px;--margin-lg: 24px;--margin-md: 16px;--margin-sm: 12px;--margin-xs: 8px;--margin-xss: 4px;--border-color: #f2f2f2;--bg-color: rgba(0, 0, 0, .02)}#root{height:100vh;background-color:#f0f2f5}*::-webkit-scrollbar-thumb{background:#aaa;border-radius:5px}*::-webkit-scrollbar-thumb:hover{background:#999}*::-webkit-scrollbar-track{background-color:#ddd}*::-webkit-scrollbar-corner{background-color:#ddd}*::-webkit-scrollbar{width:5px;height:5px}.ff-container{height:100%}.ff-loading{height:100vh;width:100%;background-color:#f0f2f5;display:flex;justify-content:center;align-items:center}.ff-loading .loader{-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:128px;height:80px}.ff-loading .loader .square{position:relative}.ff-loading .loader .square:nth-child(1){margin-left:0}.ff-loading .loader .square:nth-child(1) span{-webkit-animation:animsquare1 2s infinite ease-in;animation:animsquare1 2s infinite ease-in}.ff-loading .loader .square:nth-child(2){margin-left:44px}.ff-loading .loader .square:nth-child(2) span{-webkit-animation:animsquare2 2s infinite ease-in;animation:animsquare2 2s infinite ease-in}.ff-loading .loader .square:nth-child(3){margin-left:88px}.ff-loading .loader .square:nth-child(3) span{-webkit-animation:animsquare3 2s infinite ease-in;animation:animsquare3 2s infinite ease-in}.ff-loading .loader .square:nth-child(4){margin-left:132px}.ff-loading .loader .square:nth-child(4) span{-webkit-animation:animsquare4 2s infinite ease-in;animation:animsquare4 2s infinite ease-in}.ff-loading .loader .square span{position:absolute;top:0;left:20px;height:36px;width:36px;border-radius:2px;background-color:#fff}.ff-loading .loader .square span:nth-child(1){top:0;-webkit-animation-delay:0s;animation-delay:0s}.ff-loading .loader .square span:nth-child(2){top:44px;-webkit-animation-delay:.15s;animation-delay:.15s}.ff-loading .loader .square span:nth-child(3){top:88px;-webkit-animation-delay:.3s;animation-delay:.3s}@media (max-width: 550px){.ff-loading .loader{-webkit-transform:scale(.75);transform:scale(.75)}}@media (max-width: 440px){.ff-loading .loader{-webkit-transform:scale(.5);transform:scale(.5)}}@keyframes animsquare4{0%,5%,95%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}30%,70%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}@keyframes animsquare3{0%,10%,90%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}35%,65%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}@keyframes animsquare2{0%,15%,85%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}40%,60%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}@keyframes animsquare1{0%,20%,80%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}45%,55%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}.ff-notification{position:fixed;z-index:2000;display:flex;max-height:100vh;padding:20px;align-items:flex-end;width:380px;overflow-x:hidden;overflow-y:clip;height:100vh;box-sizing:content-box;pointer-events:none;flex-direction:column;gap:24px}.ff-notification-top,.ff-notification-topLeft,.ff-notification-topRight{top:0}.ff-notification-bottom,.ff-notification-bottomRight,.ff-notification-bottomLeft{bottom:0}.ff-notification-bottomRight,.ff-notification-topRight{right:0}.ff-notification-notice{position:relative;display:block;box-sizing:border-box;line-height:1.5;width:100%}.ff-notification-notice-wrapper{z-index:2000;pointer-events:auto;position:relative;display:block;box-sizing:border-box;border-radius:8px;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d;width:calc(100% - 40px);background-color:#fff;right:0}.ff-notification-notice-content{padding:14px 18px;display:flex;gap:8px;white-space:pre-wrap}.ff-notification-notice-content .ff-notification-icon.ff-notification-error{--bg-color: #ff4d4f}.ff-notification-notice-content .ff-notification-icon.ff-notification-success{--bg-color: #52c41a}.ff-notification-notice-content .ff-notification-icon.ff-notification-info{--bg-color: #1677ff}.ff-notification-notice-content .ff-notification-icon>*:first-child{width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;color:#fff;background-color:var(--bg-color)}.ff-notification-notice-progress{position:absolute;left:3px;right:3px;border-radius:1px;overflow:hidden;-moz-appearance:none;appearance:none;-webkit-appearance:none;display:block;inline-size:100%;block-size:2px;border:0}.ff-notification-notice-progress,.ff-notification-notice-progress::-webkit-progress-bar{background-color:#0000000a}.ff-notification-notice-progress::-moz-progress-bar{background-color:#31afff}.ff-notification-notice-progress::-webkit-progress-value{background-color:#31afff}.ff-notification-fade{overflow:hidden;transition:all .3s}.ff-notification-fade-appear-prepare{pointer-events:none;opacity:0!important}.ff-notification-fade-appear-start{transform:translate(100%);opacity:0}.ff-notification-fade-appear-active{transform:translate(0);opacity:1}.ff-data-list-framework{height:100%;--sider-width: 280px;--col-num: 1;--col-width: 200px;--gap: 8px;display:flex;gap:var(--gap)}.ff-data-list-framework .ff-data-list-container{width:100%;height:100%;row-gap:var(--gap);display:flex;flex-direction:column}.ff-data-list-framework .ff-data-list-container .ff-data-list-content{flex:1;overflow-y:auto;display:grid;gap:var(--gap);padding:calc(var(--gap) / 2);grid-template-columns:repeat(var(--col-num),1fr);grid-auto-rows:min-content}.ff-data-list-framework .ff-data-list-container .ff-data-list-content[style*=--col-width]{grid-template-columns:repeat(auto-fit,minmax(var(--col-num),1fr))}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item{display:flex;flex-direction:column;justify-content:space-between;row-gap:8px;border-radius:4px;background-color:#fff;box-shadow:0 0 8px #00000014}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .ff-grid-layout{padding:8px}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions{margin-top:8px;display:flex;justify-content:space-between;border-top:1px solid #f0f0f0}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions .data-list-grid-layout-item-action{text-align:center;margin:2px 0;flex:1}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions .data-list-grid-layout-item-action:not(:last-child){border-right:1px solid #f0f0f0}.ff-data-table-framework{height:100%;--sider-width: 280px;--col-num: 1;--gap: 8px;display:flex;gap:var(--gap)}.ff-data-table-framework .ff-data-table-container{width:100%;height:100%;display:flex;flex-direction:column;row-gap:var(--gap)}.ff-data-list-filter:has(.ff-data-list-filter-actions:not(.expanded)){height:60px;overflow-y:hidden}.ff-data-list-filter .ff-data-list-filter-default-form.ff-grid-layout-form{--grid-layout-cols: 25;--grid-layout-item-margin-x: 8px;--grid-layout-item-margin-y: 16px}.ff-data-list-filter .ff-data-list-filter-actions{grid-column:span var(--itemp-span, 5) / calc(var(--grid-layout-cols, 25) + 1)}.ff-data-list-filter .ff-data-list-filter-actions:not(.expanded){grid-row:1}.ff-data-list-filter .ff-data-list-filter-actions .ff-data-list-filter-expanded-button{margin-left:8px}.ff-data-list-filter .ff-data-list-filter-actions .ant-form-item-control-input-content{display:flex;justify-content:flex-end;align-items:center;gap:8px}.ff-data-list-footer{padding-block-start:8px;display:flex;justify-content:space-between}.ff-data-list-footer .ff-data-list-actions{display:flex;justify-content:center;gap:8px}.ff-data-list-sider{width:var(--sider-width, 280px);overflow-y:auto;box-shadow:8px 0 4px -8px #0000000d}.ff-data-list-sider+.ff-data-list-container{width:calc(100% - var(--sider-width, 280px))}.ff-data-list-toolbar{gap:8px;display:flex;justify-content:space-between;align-items:center}.ff-data-list-toolbar .ff-data-list-title{color:#000000e0;font-weight:600;font-size:14px}.ff-data-list-toolbar .ff-data-list-actions{display:flex;justify-content:center;gap:8px}.ff-data-list-toolbar .ff-data-list-tabs{cursor:pointer}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab{color:#00000073}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab:hover{font-weight:600}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab.active{color:#1677ff;font-weight:600}.ff-data-list-item-operations{max-width:180px;display:flex;flex-wrap:wrap;gap:var(--margin-xss, 4px)}.ff-data-list-item-operations>.ant-btn:not(.ant-btn-circle){flex-grow:1}.ff-data-list-helper{height:100%}.ff-data-list-table{height:100%;overflow-y:hidden}.ff-data-list-table .ant-table *{scrollbar-width:auto;scrollbar-color:auto}.ff-grid-layout{--grid-layout-h: 1;--grid-layout-row: none;--grid-layout-row-height: 18px;--grid-layout-row-height-offset: 0px;--grid-layout-cols: 12;display:grid;grid-template-columns:repeat(var(--grid-layout-cols),1fr);grid-auto-rows:minmax(min-content,max-content);padding:var(--grid-layout-container-padding-y, 0) var(--grid-layout-container-padding-x, 0);padding-bottom:calc(var(--grid-layout-container-padding-y, 0) + var(--grid-layout-item-margin-y));column-gap:var(--grid-layout-item-margin-x);row-gap:var(--grid-layout-item-margin-y)}.ff-grid-layout .grid-layout-item{grid-row:span var(--grid-layout-h, 1);grid-column:calc(var(--grid-layout-x, 1) + 1)/calc(var(--grid-layout-x, 1) + var(--grid-layout-w, 1) + 1);height:calc(var(--grid-layout-row-height) * var(--grid-layout-h) + var(--grid-layout-row-height-offset));padding:var(--grid-layout-box-paddin);margin:var(--grid-layout-box-margin);display:var(--grid-layout-box-display, flex);align-items:var(--grid-layout-box-align-items, center);justify-content:var(--grid-layout-box-justify-content, normal)}.ff-grid-layout-form{--grid-layout-h: 1;--grid-layout-row: none;--grid-layout-row-height: 18px;--grid-layout-row-height-offset: 0px;--grid-layout-cols: 12;display:grid;grid-template-columns:repeat(var(--grid-layout-cols),1fr);grid-auto-rows:minmax(min-content,max-content);padding:var(--grid-layout-container-padding-y, 0) var(--grid-layout-container-padding-x, 0);padding-bottom:calc(var(--grid-layout-container-padding-y, 0) + var(--grid-layout-item-margin-y, 16px));column-gap:var(--grid-layout-item-margin-x, 8px);row-gap:var(--grid-layout-item-margin-y, 16px)}.ff-grid-layout-form .grid-layout-item{grid-row:span var(--grid-layout-h, 1);grid-column:calc(var(--grid-layout-x, 1) + 1)/calc(var(--grid-layout-x, 1) + var(--grid-layout-w, 1) + 1);height:calc(var(--grid-layout-row-height) * var(--grid-layout-h) + var(--grid-layout-row-height-offset));padding:var(--grid-layout-box-padding-y, 0) var(--grid-layout-box-padding-x, 0);margin:var(--grid-layout-box-margin)}.ff-iconfont{transform:scale(1.14);vertical-align:-.125em;display:inline-flex;align-items:center;justify-content:center}.ff-iconfont:not(:last-child){margin-right:8px}.ff-button.ant-btn-link,.ff-button.ant-btn-text{width:initial;padding:0;height:auto}.ff-default.ant-btn-link{color:#000000e0}.ant-btn-link.ant-btn:not(:disabled):focus-visible{outline:initial;outline-offset:initial;transition:initial}.ff-popover .ff-popup-header{margin-bottom:calc(var(--margin-sm) / 2)}.ff-popover .ff-popup-header:empty{display:none}.ff-popover .ff-popup-footer{display:flex;justify-content:space-between;margin-top:var(--margin-sm)}.ff-popover .ff-popup-footer:empty{display:none}.ff-modal-form{display:flex;flex-direction:column;gap:var(--modal-form-gap, 8px)}.mask-motion-enter-active,.mask-motion-appear-active,.mask-motion-leave-active{transition:all .3s}.mask-motion-enter,.mask-motion-appear{opacity:0}.mask-motion-enter-active,.mask-motion-appear-active,.mask-motion-leave{opacity:1}.mask-motion-leave-active{opacity:0}.panel-motion-left-enter-start,.panel-motion-left-appear-start,.panel-motion-left-leave-start{transition:none!important}.panel-motion-left-enter-active,.panel-motion-left-appear-active,.panel-motion-left-leave-active{transition:all .3s}.panel-motion-left-enter,.panel-motion-left-appear{transform:translate(-100%)}.panel-motion-left-enter-active,.panel-motion-left-appear-active,.panel-motion-left-leave{transform:translate(0)}.panel-motion-left-leave-active{transform:translate(-100%)!important}.panel-motion-right-enter-start,.panel-motion-right-appear-start,.panel-motion-right-leave-start{transition:none!important}.panel-motion-right-enter-active,.panel-motion-right-appear-active,.panel-motion-right-leave-active{transition:all .3s}.panel-motion-right-enter,.panel-motion-right-appear{transform:translate(100%)}.panel-motion-right-enter-active,.panel-motion-right-appear-active,.panel-motion-right-leave{transform:translate(0)}.panel-motion-right-leave-active{transform:translate(100%)!important}.panel-motion-top-enter-start,.panel-motion-top-appear-start,.panel-motion-top-leave-start{transition:none!important}.panel-motion-top-enter-active,.panel-motion-top-appear-active,.panel-motion-top-leave-active{transition:all .3s}.panel-motion-top-enter,.panel-motion-top-appear{transform:translateY(-100%)}.panel-motion-top-enter-active,.panel-motion-top-appear-active,.panel-motion-top-leave{transform:translateY(0)}.panel-motion-top-leave-active{transform:translateY(-100%)!important}.panel-motion-bottom-enter-start,.panel-motion-bottom-appear-start,.panel-motion-bottom-leave-start{transition:none!important}.panel-motion-bottom-enter-active,.panel-motion-bottom-appear-active,.panel-motion-bottom-leave-active{transition:all .3s}.panel-motion-bottom-enter,.panel-motion-bottom-appear{transform:translateY(100%)}.panel-motion-bottom-enter-active,.panel-motion-bottom-appear-active,.panel-motion-bottom-leave{transform:translateY(0)}.panel-motion-bottom-leave-active{transform:translateY(100%)!important}.ff-drawer-mask{top:0;right:0;bottom:0;left:0;position:absolute;z-index:1050;pointer-events:auto;background-color:var(--popup-mask-bg-color, rgba(0, 0, 0, .45))}.ff-drawer{top:0;right:0;bottom:0;left:0;position:fixed;z-index:1050;pointer-events:none}.ff-drawer .ff-popup-close{top:14px;right:0}.ff-drawer-inline{position:absolute}.ff-drawer-left .ff-drawer-content-wrapper{inset:0 auto 0 0;box-shadow:6px 0 16px #00000014,3px 0 6px -4px #0000001f,9px 0 28px 8px #0000000d}.ff-drawer-right .ff-drawer-content-wrapper{inset:0 0 0 auto;box-shadow:-6px 0 16px #00000014,-3px 0 6px -4px #0000001f,-9px 0 28px 8px #0000000d}.ff-drawer-top .ff-drawer-content-wrapper{top:0;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d}.ff-drawer-bottom .ff-drawer-content-wrapper{bottom:0;box-shadow:0 -6px 16px #00000014,0 -3px 6px -4px #0000001f,0 -9px 28px 8px #0000000d}.ff-drawer-top .ff-drawer-content-wrapper,.ff-drawer-bottom .ff-drawer-content-wrapper{inset-inline:0}.ff-drawer-content{width:100%;height:100%;overflow:auto;background-color:var(--popup-bg-color, #fff);pointer-events:auto}.ff-drawer .ff-popup-header{padding:16px 8px;border-bottom:1px solid rgba(5,5,5,.06)}.ff-drawer .ff-popup-footer{border-top:1px solid rgba(5,5,5,.06);padding:12px 8px}.ff-drawer .ff-popup-body{padding:8px}.ff-drawer-content-wrapper{position:absolute;z-index:1050;overflow:hidden;transition:transform .3s;max-width:100vw}.ff-drawer-content-wrapper-hidden{display:none}.ff-modal-mask{position:fixed;top:0;right:0;left:0;bottom:0;pointer-events:auto;background-color:var(--popup-mask-bg-color, rgba(0, 0, 0, .45));height:100%;filter:alpha(opacity=50);z-index:1050}.ff-modal-mask-hidden{display:none}.ff-modal-fade-enter,.ff-modal-fade-appear{opacity:0;animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.55,0,.55,.2);animation-play-state:paused}.ff-modal-fade-leave{animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.55,0,.55,.2);animation-play-state:paused}.ff-modal-fade-enter.ff-modal-fade-enter-active,.ff-modal-fade-appear.ff-modal-fade-appear-active{animation-name:rcDialogFadeIn;animation-play-state:running}.ff-modal-fade-leave.ff-modal-fade-leave-active{animation-name:rcDialogFadeOut;animation-play-state:running}@keyframes rcDialogFadeIn{0%{opacity:0}to{opacity:1}}@keyframes rcDialogFadeOut{0%{opacity:1}to{opacity:0}}.ff-modal{position:relative;top:100px;width:min-content;margin:0 auto;max-height:calc(100vh - 150px);min-width:max(35vw,248px)}.ff-modal .ff-popup-close{top:14px;right:8px}.ff-modal .ff-popup-header:has(.ff-popup-title),.ff-modal .ff-popup-header:has(.ff-popup-sub-title){margin-bottom:8px}.ff-modal .ff-popup-footer:not(:empty){margin-top:12px}.ff-modal-wrap{position:fixed;overflow:auto;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.ff-modal-title{margin:0;font-size:14px;line-height:21px;font-weight:700}.ff-modal-content{position:absolute;top:0;right:0;bottom:0;left:0;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}.ff-modal-zoom-enter,.ff-modal-zoom-appear{opacity:0;animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-play-state:paused}.ff-modal-zoom-leave{animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.6,.04,.98,.34);animation-play-state:paused}.ff-modal-zoom-enter.ff-modal-zoom-enter-active,.ff-modal-zoom-appear.ff-modal-zoom-appear-active{animation-name:rcDialogZoomIn;animation-play-state:running}.ff-modal-zoom-leave.ff-modal-zoom-leave-active{animation-name:rcDialogZoomOut;animation-play-state:running}@keyframes rcDialogZoomIn{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes rcDialogZoomOut{0%{transform:scale(1)}to{opacity:0;transform:scale(0)}}.ff-popup-close{cursor:pointer;border:0;background:transparent;font-size:24px;position:absolute;line-height:1;color:#000;opacity:.5}.ff-popup-close:disabled{pointer-events:none}.ff-popup-close:hover{opacity:.65}.ff-popup{display:flex;flex-direction:column}.ff-popup-title,.ff-popup-sub-title{display:inline}.ff-popup-title{font-size:18px;font-weight:600}.ff-popup-footer{display:flex;gap:8px;justify-content:flex-end}.ff-popup-footer:empty{display:none}.ff-popup-reserved-extras,.ff-popup-extras,.ff-popup-actions{display:flex;align-items:center;gap:8px}.ff-popup-actions{margin-left:auto}.ff-popup-body{flex:1;overflow-y:auto} diff --git a/dist/utils.js b/dist/utils.js index 5feecfa..0f23c6d 100644 --- a/dist/utils.js +++ b/dist/utils.js @@ -1,5 +1,5 @@ import "lodash"; -import { d as g, e as o, c as p, f as i, h as m, b as P, r as d, t as u, u as k } from "./common/main-D0zIbJsd.js"; +import { d as g, e as o, c as p, f as i, h as m, b as P, r as d, t as u, u as k } from "./common/main-iMRzW1Jg.js"; import "react/jsx-runtime"; import "react"; export { diff --git a/package.json b/package.json index 3bde908..f806dfd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ff", "private": true, - "version": "0.5.3", + "version": "0.5.4", "author": "www.fsdpf.com", "type": "module", "main": "./dist/index.js",