From 582143d7c9e4ec5f432bb4837619eef46c6eeae1 Mon Sep 17 00:00:00 2001 From: what Date: Fri, 23 Aug 2024 16:04:57 +0800 Subject: [PATCH] v0.4.10 --- dist/button.js | 2 +- .../{main-CQFNsPcH.js => main-BpYqfQKX.js} | 484 +++++++++--------- dist/components.js | 2 +- dist/container.js | 2 +- dist/data-list.js | 2 +- dist/data-list/utils.js | 2 +- dist/grid-layout-form.js | 2 +- dist/grid-layout-form/utils.js | 2 +- dist/grid-layout.js | 2 +- dist/grid-layout/utils.js | 2 +- dist/hooks.js | 2 +- dist/iconfont.js | 2 +- dist/index.js | 2 +- dist/res-ws.js | 2 +- dist/style.css | 2 +- package.json | 2 +- 16 files changed, 257 insertions(+), 257 deletions(-) rename dist/common/{main-CQFNsPcH.js => main-BpYqfQKX.js} (71%) diff --git a/dist/button.js b/dist/button.js index cf13ed2..196d657 100644 --- a/dist/button.js +++ b/dist/button.js @@ -1,4 +1,4 @@ -import { P as s, O as u, Q as e } from "./common/main-CQFNsPcH.js"; +import { P as s, O as u, Q as e } from "./common/main-BpYqfQKX.js"; import "prop-types"; export { s as auth, diff --git a/dist/common/main-CQFNsPcH.js b/dist/common/main-BpYqfQKX.js similarity index 71% rename from dist/common/main-CQFNsPcH.js rename to dist/common/main-BpYqfQKX.js index 4a5ace1..ad8e6fd 100644 --- a/dist/common/main-CQFNsPcH.js +++ b/dist/common/main-BpYqfQKX.js @@ -1,27 +1,27 @@ var ga = Object.defineProperty; -var Nt = (e) => { +var $t = (e) => { throw TypeError(e); }; var pa = (e, t, a) => t in e ? ga(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a; -var v = (e, t, a) => pa(e, typeof t != "symbol" ? t + "" : t, a), xt = (e, t, a) => t.has(e) || Nt("Cannot " + a); -var p = (e, t, a) => (xt(e, t, "read from private field"), a ? a.call(e) : t.get(e)), F = (e, t, a) => t.has(e) ? Nt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, a), z = (e, t, a, n) => (xt(e, t, "write to private field"), n ? n.call(e, a) : t.set(e, a), a); +var k = (e, t, a) => pa(e, typeof t != "symbol" ? t + "" : t, a), xt = (e, t, a) => t.has(e) || $t("Cannot " + a); +var p = (e, t, a) => (xt(e, t, "read from private field"), a ? a.call(e) : t.get(e)), F = (e, t, a) => t.has(e) ? $t("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, a), B = (e, t, a, n) => (xt(e, t, "write to private field"), n ? n.call(e, a) : t.set(e, a), a); var Et = (e, t, a, n) => ({ set _(i) { - z(e, t, i, a); + B(e, t, i, a); }, get _() { return p(e, t, n); } }); -import { jsx as c, jsxs as $ } from "react/jsx-runtime"; -import b, { useEffect as N, useState as P, useCallback as ge, useMemo as pe, useContext as Ge, useRef as Q, useId as Dt, useLayoutEffect as ma } from "react"; +import { jsx as c, jsxs as N } from "react/jsx-runtime"; +import C, { useEffect as $, useState as P, useCallback as ge, useMemo as pe, useContext as Ge, useRef as Q, useId as Dt, useLayoutEffect as ma } from "react"; import g from "lodash"; import R from "classnames"; -import { Form as Ze, Input as ha, Button as lt, Breadcrumb as fa, Tree as ya, Pagination as wa, Table as ba, Empty as Ca, Popconfirm as va, Tooltip as ka, Popover as Sa } from "antd"; +import { Form as Ze, Input as ha, Button as lt, Breadcrumb as fa, Tree as ya, Pagination as wa, Table as Ca, Empty as ba, Popconfirm as ka, Tooltip as va, Popover as Sa } from "antd"; import { useMergedState as Pa } from "rc-util"; -import re, { FieldContext as $a, Field as Wt } from "rc-field-form"; -import { useParams as Na, generatePath as xa, createBrowserRouter as Ea, useInRouterContext as Ta, Navigate as Fa } from "react-router-dom"; -import L from "prop-types"; +import re, { FieldContext as Na, Field as Wt } from "rc-field-form"; +import { useParams as $a, generatePath as xa, createBrowserRouter as Ea, useInRouterContext as Ta, Navigate as Fa } from "react-router-dom"; +import O from "prop-types"; import "react-is"; import { useNotification as Ra } from "rc-notification"; import { N as Be, a as Ue, w as ct, S as Oa } from "./vender-DDOSHWIo.js"; @@ -53,10 +53,10 @@ class Jt { F(this, de); F(this, Fe, () => p(this, de)); F(this, Re, () => Promise.resolve()); - v(this, "get", (...t) => new Promise((a, n) => { + k(this, "get", (...t) => new Promise((a, n) => { const i = JSON.stringify(t); if (p(this, Ie).has(i)) return a(p(this, Re).call(this, p(this, de), ...t)); - if (p(this, de) === void 0) p(this, Ae).push([t, a, n]), p(this, qe) && (z(this, qe, !1), Promise.resolve(typeof p(this, Fe) == "function" ? p(this, Fe).call(this) : p(this, Fe)).then((r) => z(this, de, r || null)).finally(() => { + if (p(this, de) === void 0) p(this, Ae).push([t, a, n]), p(this, qe) && (B(this, qe, !1), Promise.resolve(typeof p(this, Fe) == "function" ? p(this, Fe).call(this) : p(this, Fe)).then((r) => B(this, de, r || null)).finally(() => { p(this, Ae).forEach(([r, s, o]) => { try { const l = p(this, Re).call(this, p(this, de), ...r); @@ -71,36 +71,36 @@ class Jt { p(this, Ie).set(i, r), a(r); } })); - z(this, Re, a), z(this, Fe, t); + B(this, Re, a), B(this, Fe, t); } } Ie = new WeakMap(), qe = new WeakMap(), Ae = new WeakMap(), de = new WeakMap(), Fe = new WeakMap(), Re = new WeakMap(); -const Dn = () => c("div", { children: "Empty" }), _e = b.createContext({ ele: {}, mount: () => { +const Dn = () => c("div", { children: "Empty" }), _e = C.createContext({ ele: {}, mount: () => { }, unmount: () => { -} }), H = ({ rootClassName: e, className: t, children: a, actions: n, title: i, subTitle: r, extras: s, style: o = {} }) => { - const { mount: l, unmount: u } = b.useContext(_e); - return n && H.Action({ children: n }), i && H.Title({ children: i }), r && H.SubTitle({ children: r }), s && H.Extra({ children: s }), N(() => (l("rootClassName", e), () => u(e)), [e]), c("div", { className: R("ff-container", t), style: o, children: a }); +} }), q = ({ rootClassName: e, className: t, children: a, actions: n, title: i, subTitle: r, extras: s, style: o = {} }) => { + const { mount: l, unmount: u } = C.useContext(_e); + return n && q.Action({ children: n }), i && q.Title({ children: i }), r && q.SubTitle({ children: r }), s && q.Extra({ children: s }), $(() => (l("rootClassName", e), () => u(e)), [e]), c("div", { className: R("ff-container", t), style: o, children: a }); }, Xe = (e) => ({ children: t, className: a }) => { - const { mount: n, unmount: i } = b.useContext(_e); - return N(() => (n(e, b.createElement("div", { key: `ff-${e}`, className: R(`ff-popup-${e}`, a) }, t)), () => i(e)), [a, t]), null; + const { mount: n, unmount: i } = C.useContext(_e); + return $(() => (n(e, C.createElement("div", { key: `ff-${e}`, className: R(`ff-popup-${e}`, a) }, t)), () => i(e)), [a, t]), null; }; -H.Action = Xe("actions"), H.Title = Xe("title"), H.SubTitle = Xe("sub-title"), H.Extra = Xe("extras"), H.propTypes = { className: L.string, style: L.object, title: L.any, subTitle: L.any, actions: L.any, extras: L.any }; -const Wn = () => c(H, { className: "ff-loading", children: $("div", { className: "loader", children: [$("div", { className: "square", children: [c("span", {}), c("span", {}), c("span", {})] }), $("div", { className: "square", children: [c("span", {}), c("span", {}), c("span", {})] }), $("div", { className: "square", children: [c("span", {}), c("span", {}), c("span", {})] }), $("div", { className: "square", children: [c("span", {}), c("span", {}), c("span", {})] })] }) }), qn = () => c("div", { children: "NotFound" }), Kt = ({ children: e }) => { +q.Action = Xe("actions"), q.Title = Xe("title"), q.SubTitle = Xe("sub-title"), q.Extra = Xe("extras"), q.propTypes = { className: O.string, style: O.object, title: O.any, subTitle: O.any, actions: O.any, extras: O.any }; +const Wn = () => c(q, { className: "ff-loading", children: N("div", { className: "loader", children: [N("div", { className: "square", children: [c("span", {}), c("span", {}), c("span", {})] }), N("div", { className: "square", children: [c("span", {}), c("span", {}), c("span", {})] }), N("div", { className: "square", children: [c("span", {}), c("span", {}), c("span", {})] }), N("div", { className: "square", children: [c("span", {}), c("span", {}), c("span", {})] })] }) }), qn = () => c("div", { children: "NotFound" }), Kt = ({ children: e }) => { const [t, a] = P({}), n = ge((r, s) => a((o) => ({ ...o, [r]: s })), []), i = ge((r) => a((s) => ({ ...s, [r]: void 0 })), []); - return typeof (e == null ? void 0 : e.type) == "string" ? e : c(_e.Provider, { value: { ele: t, mount: n, unmount: i }, children: b.cloneElement(e, { className: t.rootClassName, title: t.title, subTitle: t["sub-title"], actions: t.actions, extras: t.extras }) }); + return typeof (e == null ? void 0 : e.type) == "string" ? e : c(_e.Provider, { value: { ele: t, mount: n, unmount: i }, children: C.cloneElement(e, { className: t.rootClassName, title: t.title, subTitle: t["sub-title"], actions: t.actions, extras: t.extras }) }); }; -Kt.propTypes = { children: L.element.isRequired }; -const Rt = { 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"] }, Ct = ({ type: e, props: t }) => c("i", { ...t, children: c("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", fill: "currentColor", children: (Rt[e] || Rt.info).map((a, n) => c("path", { d: a }, n)) }) }), Gt = ({ className: e, content: t, icon: a, $close: n }) => $(b.Fragment, { children: [a && c("div", { className: R("ff-notification-icon", e), children: c(Ct, { type: a }) }), t] }), ja = ({}) => c(H, { children: "Confirm" }); +Kt.propTypes = { children: O.element.isRequired }; +const Rt = { 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"] }, bt = ({ type: e, props: t }) => c("i", { ...t, children: c("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", fill: "currentColor", children: (Rt[e] || Rt.info).map((a, n) => c("path", { d: a }, n)) }) }), Gt = ({ className: e, content: t, icon: a, $close: n }) => N(C.Fragment, { children: [a && c("div", { className: R("ff-notification-icon", e), children: c(bt, { type: a }) }), t] }), ja = ({}) => c(q, { children: "Confirm" }); var fe, Me; const ee = class ee { constructor() { F(this, Me, null); - v(this, "init", (t) => z(this, Me, new Map(t))); - v(this, "check", (t) => !p(this, Me).has(t) || p(this, Me).get(t)); + k(this, "init", (t) => B(this, Me, new Map(t))); + k(this, "check", (t) => !p(this, Me).has(t) || p(this, Me).get(t)); if (p(ee, fe)) return p(ee, fe); } }; -fe = new WeakMap(), Me = new WeakMap(), F(ee, fe, null), v(ee, "getInstance", () => (p(ee, fe) || z(ee, fe, new ee()), p(ee, fe))); +fe = new WeakMap(), Me = new WeakMap(), F(ee, fe, null), k(ee, "getInstance", () => (p(ee, fe) || B(ee, fe, new ee()), p(ee, fe))); let dt = ee; const Ia = dt.getInstance(), _t = (e = {}, t = {}, a = {}, n = "") => g.deepSome(e, (i, r) => r === "type" && i === "code") ? Yt(e, t, a, n) : Qt(e, t, n), Yt = async (e = {}, t = {}, a = {}, n = "") => { let i = /* @__PURE__ */ Object.create(null); @@ -110,7 +110,7 @@ const Ia = dt.getInstance(), _t = (e = {}, t = {}, a = {}, n = "") => g.deepSome const { type: o, value: l = "", default: u = n } = e[r]; switch (o) { case "code": - s = await $e.exec(l, t, a); + s = await Ne.exec(l, t, a); break; case "field": s = g.get(t, l) ?? g.get(t, l.substring(l.indexOf(".") + 1)); @@ -153,22 +153,22 @@ var ye, He; const te = class te { constructor() { F(this, He, null); - v(this, "init", (t) => z(this, He, t)); - v(this, "get", (t, a) => g.get(p(this, He), t, a)); + k(this, "init", (t) => B(this, He, t)); + k(this, "get", (t, a) => g.get(p(this, He), t, a)); if (p(te, ye)) return p(te, ye); } }; -ye = new WeakMap(), He = new WeakMap(), F(te, ye, null), v(te, "getInstance", () => (p(te, ye) || z(te, ye, new te()), p(te, ye))); +ye = new WeakMap(), He = new WeakMap(), F(te, ye, null), k(te, "getInstance", () => (p(te, ye) || B(te, ye, new te()), p(te, ye))); let ut = te; const De = ut.getInstance(), Aa = (e, t, a, n, i) => { - const r = b.lazy(() => X.getWidgetComponent(e).catch((s) => ({ default: () => `${s}` }))); - return c(b.Suspense, { children: c(r, { value: t, record: a, $setting: n, base62params: i }) }, e); + const r = C.lazy(() => X.getWidgetComponent(e).catch((s) => ({ default: () => `${s}` }))); + return c(C.Suspense, { children: c(r, { value: t, record: a, $setting: n, base62params: i }) }, e); }, Ma = (e, t = {}) => (jt(e), jt(t), pe(() => e == null ? void 0 : e.map(({ widgetByJs: a, widgetByJsSetting: n, ...i }, r) => a && !a.endsWith("/BasicShowFieldData") ? { ...i, render: (s, o) => { const l = Aa(a, s, o, n, t); return g.isFunction(i == null ? void 0 : i.render) ? i.render(l, s, o) : l; } } : i), [e, t])), Hn = (e) => { const [t, a] = P({}); - return N(() => { + return $(() => { let n = !1; return e && x.get(`/api/_/${e}`).then((i) => g.pick(i, ["uuid", "name", "code", "resource", "marginX", "marginY", "cols", "rowHeight", "primaryKey", "columns", "itemOperations", "batchOperations", "isConditionFormLayout", "layout", "tabs", "pageSize", "layoutConfig"])).then((i) => !n && a(i)), () => n = !0; }, [e]), t; @@ -183,13 +183,13 @@ const De = ut.getInstance(), Aa = (e, t, a, n, i) => { if (g.isEmpty(a) || g.isEmpty(t)) return !0; const i = t.map((r) => r == null ? void 0 : r[n]); return e.some(({ uuid: r }) => !r || !a.has(r) || a.get(r).some((s) => i.includes(s))); -}, [e, t, a, n]), za = ({ className: e, itemClassName: t, classNames: a = {}, dataSource: n, isPaginate: i, isItemOperations: r, isBatchOperations: s, batchOperations: o, itemOperations: l, itemOperationsAccess: u, resource: d, primaryKey: m, title: f, itemGridLayout: h, $setting: y, tabs: C, isConditionFormLayout: w, isTreeSider: E, treeSiderConfig: A }) => { - const { getBase62params: _, onClickCallback: W, onTabChange: D } = Ge(Le), { total: O, page: U, pageSize: J, tab: M } = _() || {}, K = ge((j, k, se) => c(Ba, { className: R("ff-data-list-framework-item", t), operations: r && k ? l == null ? void 0 : l.filter((V) => !(m && V.uuid && u.has(V.uuid)) || u.get(V.uuid).includes(k == null ? void 0 : k[m])) : [], data: d ? { [d]: k } : k, children: j, onClickCallback: W }), [d, m, r, W, l, u]); - return $("div", { className: R("ff-data-list-framework", e), children: [c(ta, { className: a == null ? void 0 : a.sider, isTreeSider: E, ...A }), $("div", { className: R("ff-data-list-container", a == null ? void 0 : a.container), children: [c(kt, { className: a == null ? void 0 : a.filter, isConditionFormLayout: w }), c(ea, { title: f, className: a == null ? void 0 : a.toolbar, tabs: C, tab: M, onTabChange: D }), c(Ya, { ...h, className: a == null ? void 0 : a.content, style: { "--col-num": (y == null ? void 0 : y.colNum) || 1 }, primaryKey: m, itemRender: K, dataSource: n }), c(aa, { className: a == null ? void 0 : a.footer, isPaginate: i, isOperations: s, operations: o, total: O, page: U, pageSize: J })] })] }); -}, Ba = ({ className: e, operations: t, children: a, data: n, onClickCallback: i }) => $("div", { className: R("data-list-grid-layout-item-container", e), children: [a, !!(t != null && t.length) && c("div", { className: "data-list-grid-layout-item-actions", children: t.map((r) => c("span", { className: "data-list-grid-layout-item-action", children: c(S.Link, { uuid: r.uuid, type: r.type, name: r.name, widget: r.widget, widgetType: r.widgetType, widgetProps: r.widgetProps, widgetSetting: r.widgetSetting, widgetContainerProps: r.widgetContainerSetting, data: n, onAfterClick: (s) => s !== !1 && (i == null ? void 0 : i(r.isRefresh, n)) }, r.uuid || useId()) }, (r == null ? void 0 : r.uuid) || useId())) })] }), Ua = ({ listCode: e, className: t, classNames: a = {}, itemClassName: n, dataSource: i, columns: r, isItemOperations: s, isBatchOperations: o, batchOperations: l, itemOperations: u, itemOperationsAccess: d, resource: m, primaryKey: f, title: h, tabs: y, isPaginate: C, isTreeSider: w, treeSiderConfig: E, isConditionFormLayout: A, ..._ }) => { - const { getBase62params: W, onClickCallback: D, onTabChange: O } = Ge(Le), { total: U, page: J, tab: M, pageSize: K } = W() || {}, j = gt(u, i, d, f); - return $("div", { className: R("ff-data-table-framework", t), children: [c(ta, { className: a == null ? void 0 : a.sider, isTreeSider: w, ...E }), $("div", { className: R("ff-data-table-container", a == null ? void 0 : a.container), children: [c(kt, { listCode: e, isConditionFormLayout: A }), c(ea, { title: h, className: a == null ? void 0 : a.toolbar, tabs: y, tab: M, onTabChange: O }), c(Ha, { ..._, className: "ff-data-table-content", columns: r, dataSource: i, operationRender: j ? (k) => c("div", { className: "ff-data-table-actions", children: u == null ? void 0 : u.reduce((se, V, me) => [...se, c(S.Link, { size: "small", uuid: V.uuid, type: V.type, name: V.name, widget: V.widget, widgetType: V.widgetType, widgetProps: V.widgetProps, widgetData: V.widgetData, widgetSetting: V.widgetSetting, widgetContainerProps: V.widgetContainerSetting, data: k, onAfterClick: (Ne) => Ne !== !1 && (D == null ? void 0 : D(V.isRefresh, data)) }, V.uuid || me)], []) }) : null }), c(aa, { isPaginate: C, isOperations: o, operations: l, total: U, page: J, pageSize: K })] })] }); -}, Le = b.createContext({ listCode: "", getBase62params: (e, t) => { +}, [e, t, a, n]), za = ({ className: e, itemClassName: t, classNames: a = {}, dataSource: n, isPaginate: i, isItemOperations: r, isBatchOperations: s, batchOperations: o, itemOperations: l, itemOperationsAccess: u, resource: d, primaryKey: m, title: f, itemGridLayout: h, $setting: y, tabs: b, isConditionFormLayout: w, isTreeSider: E, treeSiderConfig: M }) => { + const { getBase62params: _, onClickCallback: H, onTabChange: D } = Ge(Le), { total: A, page: L, pageSize: J, tab: z } = _() || {}, K = ge((j, v, se) => c(Ba, { className: R("ff-data-list-framework-item", t), operations: r && v ? l == null ? void 0 : l.filter((V) => !(m && V.uuid && u.has(V.uuid)) || u.get(V.uuid).includes(v == null ? void 0 : v[m])) : [], data: d ? { [d]: v } : v, children: j, onClickCallback: H }), [d, m, r, H, l, u]); + return N("div", { className: R("ff-data-list-framework", e), children: [c(ta, { className: a == null ? void 0 : a.sider, isTreeSider: E, ...M }), N("div", { className: R("ff-data-list-container", a == null ? void 0 : a.container), children: [c(vt, { className: a == null ? void 0 : a.filter, isConditionFormLayout: w }), c(ea, { title: f, className: a == null ? void 0 : a.toolbar, tabs: b, tab: z, onTabChange: D }), c(Ya, { ...h, className: a == null ? void 0 : a.content, style: { "--col-num": (y == null ? void 0 : y.colNum) || 1 }, primaryKey: m, itemRender: K, dataSource: n }), c(aa, { className: a == null ? void 0 : a.footer, isPaginate: i, isOperations: s, operations: o, total: A, page: L, pageSize: J })] })] }); +}, Ba = ({ className: e, operations: t, children: a, data: n, onClickCallback: i }) => N("div", { className: R("data-list-grid-layout-item-container", e), children: [a, !!(t != null && t.length) && c("div", { className: "data-list-grid-layout-item-actions", children: t.map((r) => c("span", { className: "data-list-grid-layout-item-action", children: c(S.Link, { uuid: r.uuid, type: r.type, name: r.name, widget: r.widget, widgetType: r.widgetType, widgetProps: r.widgetProps, widgetSetting: r.widgetSetting, widgetContainerProps: r.widgetContainerSetting, data: n, onAfterClick: (s) => s !== !1 && (i == null ? void 0 : i(r.isRefresh, n)) }, r.uuid || useId()) }, (r == null ? void 0 : r.uuid) || useId())) })] }), Ua = ({ listCode: e, className: t, classNames: a = {}, itemClassName: n, dataSource: i, columns: r, isItemOperations: s, isBatchOperations: o, batchOperations: l, itemOperations: u, itemOperationsAccess: d, resource: m, primaryKey: f, title: h, tabs: y, isPaginate: b, isTreeSider: w, treeSiderConfig: E, isConditionFormLayout: M, ..._ }) => { + const { getBase62params: H, onClickCallback: D, onTabChange: A } = Ge(Le), { total: L, page: J, tab: z, pageSize: K } = H() || {}, j = gt(u, i, d, f); + return N("div", { className: R("ff-data-table-framework", t), children: [c(ta, { className: a == null ? void 0 : a.sider, isTreeSider: w, ...E }), N("div", { className: R("ff-data-table-container", a == null ? void 0 : a.container), children: [c(vt, { listCode: e, isConditionFormLayout: M }), c(ea, { title: h, className: a == null ? void 0 : a.toolbar, tabs: y, tab: z, onTabChange: A }), c(Ha, { ..._, className: "ff-data-table-content", columns: r, dataSource: i, operationRender: j ? (v) => c("div", { className: "ff-data-table-actions", children: u == null ? void 0 : u.reduce((se, V, me) => [...se, c(S.Link, { size: "small", uuid: V.uuid, type: V.type, name: V.name, widget: V.widget, widgetType: V.widgetType, widgetProps: V.widgetProps, widgetData: V.widgetData, widgetSetting: V.widgetSetting, widgetContainerProps: V.widgetContainerSetting, data: v, onAfterClick: ($e) => $e !== !1 && (D == null ? void 0 : D(V.isRefresh, data)) }, V.uuid || me)], []) }) : null }), c(aa, { isPaginate: b, isOperations: o, operations: l, total: L, page: J, pageSize: K })] })] }); +}, Le = C.createContext({ listCode: "", getBase62params: (e, t) => { }, onReload: () => { }, onClickCallback: () => { }, onConditonChange: () => { @@ -199,13 +199,13 @@ const De = ut.getInstance(), Aa = (e, t, a, n, i) => { }, onPageChange: () => { }, onPageSizeChange: () => { } }), Da = ({ isItemGridLayout: e, theme: t, themeProps: a, onClickCallback: n, onReload: i, getBase62params: r, listCode: s, onPageChange: o, onPageSizeChange: l, onTabChange: u, onSiderChange: d, onKeywordChange: m, onConditonChange: f, ...h }) => { - const [y, C] = P(); - return N(() => { + const [y, b] = P(); + return $(() => { t ? X.getWidgetComponent(t).then((w) => { if (!w) throw `${t} not found`; return w; - }).catch((w) => ({ default: () => `${w}` })).then((w) => C(b.createElement(w.default, { ...h, $setting: a }))) : y || C(null); - }, [t, a]), c(Le.Provider, { value: { listCode: s, onClickCallback: n, onReload: i, getBase62params: r, onPageChange: o, onPageSizeChange: l, onTabChange: u, onSiderChange: d, onKeywordChange: m, onConditonChange: f }, children: y ? b.cloneElement(y, { ...h, $setting: a }) : c(e ? za : Ua, { ...h, $setting: a }) }); + }).catch((w) => ({ default: () => `${w}` })).then((w) => b(C.createElement(w.default, { ...h, $setting: a }))) : y || b(null); + }, [t, a]), c(Le.Provider, { value: { listCode: s, onClickCallback: n, onReload: i, getBase62params: r, onPageChange: o, onPageSizeChange: l, onTabChange: u, onSiderChange: d, onKeywordChange: m, onConditonChange: f }, children: y ? C.cloneElement(y, { ...h, $setting: a }) : c(e ? za : Ua, { ...h, $setting: a }) }); }; var we, ue, Oe, at; const ae = class ae { @@ -214,7 +214,7 @@ const ae = class ae { F(this, Oe, /* @__PURE__ */ new Map()); F(this, at, () => { if (p(this, ue)) return p(this, ue).port.postMessage({ command: "status", data: [] }); - z(this, ue, new SharedWorker(new URL("/ff-worker/res-ws.js", self.location))), p(this, ue).port.onmessage = (t) => { + B(this, ue, new SharedWorker(new URL("/ff-worker/res-ws.js", self.location))), p(this, ue).port.onmessage = (t) => { var a, n; (a = t.data) != null && a.uuid ? p(this, Oe).forEach((i, r) => { var s; @@ -224,32 +224,32 @@ const ae = class ae { }); }, p(this, ue).port.postMessage({ command: "status", data: [] }); }); - v(this, "subscribe", (t, a = []) => (a ? Array.isArray(a) && a.length == 0 ? a = "*" : Array.isArray(a) || (a = [a].flat()) : a = "*", p(this, Oe).set(t, a), p(this, Oe).size == 1 && p(this, at).call(this), () => this.unsubscribe(t))); - v(this, "unsubscribe", (t) => p(this, Oe).delete(t)); + k(this, "subscribe", (t, a = []) => (a ? Array.isArray(a) && a.length == 0 ? a = "*" : Array.isArray(a) || (a = [a].flat()) : a = "*", p(this, Oe).set(t, a), p(this, Oe).size == 1 && p(this, at).call(this), () => this.unsubscribe(t))); + k(this, "unsubscribe", (t) => p(this, Oe).delete(t)); if (p(ae, we)) return p(ae, we); } }; -we = new WeakMap(), ue = new WeakMap(), Oe = new WeakMap(), at = new WeakMap(), F(ae, we, null), v(ae, "getInstance", () => (p(ae, we) || z(ae, we, new ae()), p(ae, we))); +we = new WeakMap(), ue = new WeakMap(), Oe = new WeakMap(), at = new WeakMap(), F(ae, we, null), k(ae, "getInstance", () => (p(ae, we) || B(ae, we, new ae()), p(ae, we))); let pt = ae; -const Xt = pt.getInstance(), vt = b.forwardRef(({ listCode: e, base62params: t, className: a, itemClassName: n, theme: i, themeProps: r, classNames: s }, o) => { - const l = oa(), u = Q(t), d = Q(/* @__PURE__ */ new Map()), m = Q([]), [{ resource: f, primaryKey: h, batchOperations: y = [], itemOperations: C = [], columns: w = [], themeConfig: E, theme: A, isConditionFormLayout: _ = !1, isTreeSider: W, treeSiderConfig: D, isItemGridLayout: O, itemGridLayout: U, title: J, isPaginate: M, tabs: K }, j] = P({ isItemGridLayout: !1, itemGridLayout: {} }), k = g.throttle((T) => { - m.current = [], x.list(e, g.pick({ ...u.current, ...T }, ["tab", "page", "pageSize", "condition", "sider", "keyword"])).then(({ keyword: B, condition: Ve, total: xe, tab: he, sider: Ee, page: oe, pageSize: le, operationsAccess: ce, dataSource: Te }) => { - u.current = { tab: he, condition: Ve, sider: Ee, keyword: B, total: xe, pageSize: le, page: Te != null && Te.length ? oe : 1 }, m.current = Te, d.current = new Map(ce), l(); +const Xt = pt.getInstance(), kt = C.forwardRef(({ listCode: e, base62params: t, className: a, itemClassName: n, theme: i, themeProps: r, classNames: s }, o) => { + const l = oa(), u = Q(t), d = Q(/* @__PURE__ */ new Map()), m = Q([]), [{ resource: f, primaryKey: h, batchOperations: y = [], itemOperations: b = [], columns: w = [], themeConfig: E, theme: M, isConditionFormLayout: _ = !1, isTreeSider: H, treeSiderConfig: D, isItemGridLayout: A, itemGridLayout: L, title: J, isPaginate: z, tabs: K }, j] = P({ isItemGridLayout: !1, itemGridLayout: {} }), v = g.throttle((T) => { + m.current = [], x.list(e, g.pick({ ...u.current, ...T }, ["tab", "page", "pageSize", "condition", "sider", "keyword"])).then(({ keyword: U, condition: Ve, total: xe, tab: he, sider: Ee, page: oe, pageSize: le, operationsAccess: ce, dataSource: Te }) => { + u.current = { tab: he, condition: Ve, sider: Ee, keyword: U, total: xe, pageSize: le, page: Te != null && Te.length ? oe : 1 }, m.current = Te, d.current = new Map(ce), l(); }); - }, 380, { leading: !1, trailing: !0 }), se = gt(C, m.current, d.current, h), V = gt(y); - N(() => { + }, 380, { leading: !1, trailing: !0 }), se = gt(b, m.current, d.current, h), V = gt(y); + $(() => { let T = null; - return e && x.get(`/api/_/${e}`).resp(({ data: B, res: Ve }) => { - B != null && B.isDynamicRefresh && (T = Xt.subscribe(() => k(), Ve)), u.current.pageSize = B.pageSize, j(B); + return e && x.get(`/api/_/${e}`).resp(({ data: U, res: Ve }) => { + U != null && U.isDynamicRefresh && (T = Xt.subscribe(() => v(), Ve)), u.current.pageSize = U.pageSize, j(U); }).catch(() => j({})), () => T == null ? void 0 : T(); }, [e]), tn(() => { - e && k(t); + e && v(t); }, [e, t]); const me = () => { - k(); - }, Ne = (T = 0, B = null) => { + v(); + }, $e = (T = 0, U = null) => { if (T === 2) { - const Ve = g.get(B, "__PARENT_ID__", ""), xe = g.get(B, h, g.get(B, [f, h], "")), he = g.findIndex(m.current, ["__PARENT_ID__", Ve]), Ee = g.findIndex(he > -1 ? g.get(m.current, [he, "children"]) : m.current, [h, xe]); + const Ve = g.get(U, "__PARENT_ID__", ""), xe = g.get(U, h, g.get(U, [f, h], "")), he = g.findIndex(m.current, ["__PARENT_ID__", Ve]), Ee = g.findIndex(he > -1 ? g.get(m.current, [he, "children"]) : m.current, [h, xe]); Ee > -1 ? (x.get(`/api/${e}/detail/${xe}`).then((oe) => { const le = g.get(m.current, he > -1 ? [he, "children", Ee, "children"] : [Ee, "children"]); m.current = Tt(m.current, he > -1 ? { [he]: { children: { $splice: [[Ee, 1, { ...oe, children: le }]] } } } : { $splice: [[Ee, 1, { ...oe, children: le }]] }), l(); @@ -263,20 +263,20 @@ const Xt = pt.getInstance(), vt = b.forwardRef(({ listCode: e, base62params: t, })) : me(); } else T === 1 && me(); }; - b.useImperativeHandle(o, () => ({ onReload: me, onClickCallback: Ne })); - const it = { listCode: e, title: J, itemClassName: n, classNames: s, resource: f, primaryKey: h, theme: i || A, themeProps: r || E, isTreeSider: W, treeSiderConfig: D, isPaginate: M, tabs: K, isItemOperations: se, isBatchOperations: V, batchOperations: y, itemOperations: C, isItemGridLayout: O, columns: w, itemGridLayout: U, isConditionFormLayout: _, itemOperationsAccess: d.current, dataSource: m.current }; - return c(Da, { ...it, className: R("ff-data-list-helper", a), getBase62params: (T, B, Ve = !1) => T == "init" ? t : T ? g.get(u.current, T, B) : u.current, onReload: me, onClickCallback: Ne, onConditonChange: (T, B) => k({ keyword: B, condition: Tt(u.current.condition || {}, { $merge: T || {} }), page: 1 }), onTabChange: (T) => k({ tab: T, page: 1 }), onSiderChange: (T) => k({ sider: T, page: 1 }), onKeywordChange: (T) => k({ keyword: T, page: 1 }), onPageChange: (T, B) => k({ page: T, pageSize: B }), onPageSizeChange: (T) => k({ pageSize: T, page: 1 }) }); + C.useImperativeHandle(o, () => ({ onReload: me, onClickCallback: $e })); + const it = { listCode: e, title: J, itemClassName: n, classNames: s, resource: f, primaryKey: h, theme: i || M, themeProps: r || E, isTreeSider: H, treeSiderConfig: D, isPaginate: z, tabs: K, isItemOperations: se, isBatchOperations: V, batchOperations: y, itemOperations: b, isItemGridLayout: A, columns: w, itemGridLayout: L, isConditionFormLayout: _, itemOperationsAccess: d.current, dataSource: m.current }; + return c(Da, { ...it, className: R("ff-data-list-helper", a), getBase62params: (T, U, Ve = !1) => T == "init" ? t : T ? g.get(u.current, T, U) : u.current, onReload: me, onClickCallback: $e, onConditonChange: (T, U) => v({ keyword: U, condition: Tt(u.current.condition || {}, { $merge: T || {} }), page: 1 }), onTabChange: (T) => v({ tab: T, page: 1 }), onSiderChange: (T) => v({ sider: T, page: 1 }), onKeywordChange: (T) => v({ keyword: T, page: 1 }), onPageChange: (T, U) => v({ page: T, pageSize: U }), onPageSizeChange: (T) => v({ pageSize: T, page: 1 }) }); }), Zt = (e, t, a, n, i = {}, r = 0) => { const s = { "--grid-layout-h": `${n}`, "--grid-layout-w": `${a}`, "--grid-layout-x": `${e}`, "--grid-layout-y": `${t}`, "--grid-layout-row-height-offset": "0px" }; return i != null && i.autoHeight ? s.height = "fit-content" : s["--grid-layout-row"] = `${n}`, s["--grid-layout-box-margin"] = Ot(i == null ? void 0 : i.marginTop, i == null ? void 0 : i.marginRight, i == null ? void 0 : i.marginBottom, i == null ? void 0 : i.marginLeft), s["--grid-layout-box-padding"] = Ot(i == null ? void 0 : i.paddingTop, i == null ? void 0 : i.paddingRight, i == null ? void 0 : i.paddingBottom, i == null ? void 0 : i.paddingLeft), r && (s.height = `${r}px`), s; -}, Ot = (e, t, a, n) => `${e || 0}px ${t || 0}px ${a || 0}px ${n || 0}px`, kt = ({ className: e, isConditionFormLayout: t }) => { +}, Ot = (e, t, a, n) => `${e || 0}px ${t || 0}px ${a || 0}px ${n || 0}px`, vt = ({ className: e, isConditionFormLayout: t }) => { var m, f; - const [a, n] = P({}), { listCode: i, onKeywordChange: r, onConditonChange: s, getBase62params: o } = b.useContext(Le), { keyword: l, condition: u } = o() || {}, [d] = Ze.useForm(); - return N(() => { - i && t && x.get(`/api/_/${i}/list-condition-form-layout`).then(({ resource: h, marginX: y, marginY: C, rowHeight: w, cols: E, fields: A }) => { - n({ resource: h, itemMargin: [y, C], rowHeight: w, cols: E, fields: A }); + const [a, n] = P({}), { listCode: i, onKeywordChange: r, onConditonChange: s, getBase62params: o } = C.useContext(Le), { keyword: l, condition: u } = o() || {}, [d] = Ze.useForm(); + return $(() => { + i && t && x.get(`/api/_/${i}/list-condition-form-layout`).then(({ resource: h, marginX: y, marginY: b, rowHeight: w, cols: E, fields: M }) => { + n({ resource: h, itemMargin: [y, b], rowHeight: w, cols: E, fields: M }); }).catch(() => n({})); - }, [i, t]), N(() => { + }, [i, t]), $(() => { d.setFieldsValue({ keyword: l, ...u }); }, [JSON.stringify([l, u])]), c("div", { className: R("ff-data-list-filter", e), children: c(Ze, { form: d, layout: "vertical", autoComplete: "off", onFinish: ((m = a.fields) == null ? void 0 : m.length) > 1 ? (h) => s({ [a.resource]: h[a.resource] }, h.keyword) : () => { }, onValuesChange: (h) => { @@ -287,39 +287,39 @@ const Xt = pt.getInstance(), vt = b.forwardRef(({ listCode: e, base62params: t, } }) }) : c("div", { className: "ff-data-list-filter-default-form ff-grid-layout-form", children: c("div", { className: "grid-layout-item", style: Zt(20, 0, 5, 2), children: c(Ze.Item, { name: ["keyword"], children: c(ha.Search, { allowClear: !0, enterButton: "搜索", placeholder: "多关键字 | 分割", onSearch: (h) => r(h) }) }) }) }) }) }); }, Wa = ({ cols: e, fields: t, onReset: a }) => { const [n, i] = P(!1), r = pe(() => t == null ? void 0 : t.toReversed().some((s) => s.y > 1 || s.x + s.w >= e - 5), [e, t]); - return $(Ze.Item, { label: " ", style: { "--item-span": 5 }, className: R("ff-data-list-filter-actions", { expanded: n }), children: [c(lt, { onClick: a, children: "重置" }), c(lt, { type: "primary", htmlType: "submit", children: "查询" }), r && c(S.Link, { className: "ff-data-list-filter-expanded-button", widget: () => i((s) => !s), type: "primary", name: n ? "关闭" : "展开", icon: n ? "icon-up" : "icon-down", iconPosition: "end" })] }); + return N(Ze.Item, { label: " ", style: { "--item-span": 5 }, className: R("ff-data-list-filter-actions", { expanded: n }), children: [c(lt, { onClick: a, children: "重置" }), c(lt, { type: "primary", htmlType: "submit", children: "查询" }), r && c(S.Link, { className: "ff-data-list-filter-expanded-button", widget: () => i((s) => !s), type: "primary", name: n ? "关闭" : "展开", icon: n ? "icon-up" : "icon-down", iconPosition: "end" })] }); }; -kt.reservedFields = [{ x: 0, y: 0, h: 3, w: 5, field: { isVirtual: !0, widgetPrefix: "@pkg/grid-layout-forms", widget: "Input", code: "keyword", label: "关键字", placeholder: "多关键字 | 分割", extras: { prefix: "icon-search" } } }]; +vt.reservedFields = [{ x: 0, y: 0, h: 3, w: 5, field: { isVirtual: !0, widgetPrefix: "@pkg/grid-layout-forms", widget: "Input", code: "keyword", label: "关键字", placeholder: "多关键字 | 分割", extras: { prefix: "icon-search" } } }]; const ea = ({ className: e, title: t, tabs: a, tab: n, onTabChange: i }) => { const [r, s] = Pa(a == null ? void 0 : a[0].value, { value: n, onChange: i }); - return $("div", { className: R("ff-data-list-toolbar", e), children: [c("div", { className: "ff-data-list-title", children: t }), c(fa, { className: "ff-data-list-tabs", itemRender: ({ label: o, code: l }) => c("span", { onClick: () => s(l), className: R("ff-data-list-tab", { active: l == r }), children: o }), items: a }), $("div", { className: "ff-data-list-actions", children: [c(S.Link, { icon: "icon-reload" }), c(S.Link, { icon: "icon-setting" })] })] }); + return N("div", { className: R("ff-data-list-toolbar", e), children: [c("div", { className: "ff-data-list-title", children: t }), c(fa, { className: "ff-data-list-tabs", itemRender: ({ label: o, code: l }) => c("span", { onClick: () => s(l), className: R("ff-data-list-tab", { active: l == r }), children: o }), items: a }), N("div", { className: "ff-data-list-actions", children: [c(S.Link, { icon: "icon-reload" }), c(S.Link, { icon: "icon-setting" })] })] }); }, qa = [{ 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: c("span", { style: { color: "#1677ff" }, children: "sss" }), key: "0-0-1-0" }] }] }], ta = ({ className: e, width: t = 280, isTreeSider: a }) => a ? c(ya.DirectoryTree, { className: R("ff-data-list-sider", e), style: { "--sider-width": t }, showLine: !0, showIcon: !1, treeData: qa }) : null, aa = ({ className: e, operations: t, isOperations: a, isPaginate: n, total: i, page: r, pageSize: s }) => { - const { onPageChange: o, onPageSizeChange: l, onClickCallback: u } = b.useContext(Le); - return a && !g.isEmpty(t) || n ? $("div", { className: R("ff-data-list-footer", e), children: [c("div", { className: "ff-data-list-actions", children: t == null ? void 0 : t.map((d, m) => c(S, { uuid: d.uuid, type: d.type, name: d.name, widget: d.widget, widgetType: d.widgetType, widgetProps: d.widgetProps, widgetData: d.widgetData, widgetSetting: d.widgetSetting, widgetContainerProps: d.widgetContainerSetting, onAfterClick: (f) => f !== !1 && (u == null ? void 0 : u(d.isRefresh, null)) }, d.uuid || m)) }), n && c(wa, { size: "small", total: i, pageSize: s, showSizeChanger: !1, showTotal: (d) => `第 ${r} 页 / 总共 ${d} 条`, onChange: o, onShowSizeChange: l })] }) : null; + const { onPageChange: o, onPageSizeChange: l, onClickCallback: u } = C.useContext(Le); + return a && !g.isEmpty(t) || n ? N("div", { className: R("ff-data-list-footer", e), children: [c("div", { className: "ff-data-list-actions", children: t == null ? void 0 : t.map((d, m) => c(S, { uuid: d.uuid, type: d.type, name: d.name, widget: d.widget, widgetType: d.widgetType, widgetProps: d.widgetProps, widgetData: d.widgetData, widgetSetting: d.widgetSetting, widgetContainerProps: d.widgetContainerSetting, onAfterClick: (f) => f !== !1 && (u == null ? void 0 : u(d.isRefresh, null)) }, d.uuid || m)) }), n && c(wa, { size: "small", total: i, pageSize: s, showSizeChanger: !1, showTotal: (d) => `第 ${r} 页 / 总共 ${d} 条`, onChange: o, onShowSizeChange: l })] }) : null; }, na = (e, t, a = !0) => a !== !0 && a-- <= 0 ? [] : g.isArray(e) && !g.isEmpty(e) ? e.reduce((n, i) => (Reflect.has(i, t) && Reflect.has(i, "children") && n.push(i[t]), Reflect.has(i, "children") && !g.isEmpty(i.children) ? n.concat(na(i.children, t, a)) : n), []) : [], Ha = ({ className: e, primaryKey: t, columns: a = [], dataSource: n = [], operationRender: i, operationWidth: r = 180, ...s }) => { Dt(); const o = Q(null), l = Q(null), [u, d] = P([]), [m, f] = P({ width: 0, height: 0 }); - N(() => { + $(() => { d(na(n, t)); }, [n, t]), ma(() => { const y = new ResizeObserver(() => { - var C; - f({ width: ((C = o.current) == null ? void 0 : C.nativeElement.querySelector(".ant-table-body").scrollWidth) || l.current.offsetWidth, height: l.current.offsetHeight }); + var b; + f({ width: ((b = o.current) == null ? void 0 : b.nativeElement.querySelector(".ant-table-body").scrollWidth) || l.current.offsetWidth, height: l.current.offsetHeight }); }); return l.current && y.observe(l.current), () => { l.current && y.unobserve(l.current); }; }, []); const h = Ma(a); - return c("div", { ref: l, className: R("ff-data-list-table", e), children: m.height ? c(ba, { ...s, ref: o, rowKey: (y) => (y == null ? void 0 : y[t]) ?? Math.random(), columns: h == null ? void 0 : h.concat(i ? [{ title: "操作", align: "center", fixed: "right", width: `${Math.ceil(r / m.width * 100).toFixed(2)}%`, render: (y, C, w) => i(C, w) }] : []), dataSource: n, size: "middle", scroll: { x: "max-content", y: m.height - 50 }, pagination: !1, expandable: { defaultExpandAllRows: !0, expandRowByClick: !0, onExpandedRowsChange: d, expandedRowKeys: u } }) : null }); + return c("div", { ref: l, className: R("ff-data-list-table", e), children: m.height ? c(Ca, { ...s, ref: o, rowKey: (y) => (y == null ? void 0 : y[t]) ?? Math.random(), columns: h == null ? void 0 : h.concat(i ? [{ title: "操作", align: "center", fixed: "right", width: `${Math.ceil(r / m.width * 100).toFixed(2)}%`, render: (y, b, w) => i(b, w) }] : []), dataSource: n, size: "middle", scroll: { x: "max-content", y: m.height - 50 }, pagination: !1, expandable: { defaultExpandAllRows: !0, expandRowByClick: !0, onExpandedRowsChange: d, expandedRowKeys: u } }) : null }); }, Ja = "RC_FORM_INTERNAL_HOOKS", ia = (e, { initialValue: t, initialValueLanguage: a, convertJs: n, convertJsSetting: i, type: r = "string" }, s = null) => { - const o = Q(!1), l = Ge($a), [u, d] = P(), [m, f] = P(a != "javascript" && e ? l.getFieldValue(e) : void 0), { registerWatch: h } = l.getInternalHooks(Ja) || {}; - return N(() => h == null ? void 0 : h((y, C, w) => { + const o = Q(!1), l = Ge(Na), [u, d] = P(), [m, f] = P(a != "javascript" && e ? l.getFieldValue(e) : void 0), { registerWatch: h } = l.getInternalHooks(Ja) || {}; + return $(() => h == null ? void 0 : h((y, b, w) => { if (!o.current) return; - const E = g.get(C, e); + const E = g.get(b, e); g.isEqual(E, m) || f(g.toPrimitive(E, r)); - }), [m]), N(() => { - a == "javascript" && t ? $e.exec(t, {}, { getFieldValueForBasicForm: (y) => s ? s.getFieldValue(y) : l.getFieldValue(y), getFieldValue: (y) => l.getFieldValue(y) }).then((y) => f(g.toPrimitive(y, r))).catch((y) => notification.error({ message: `布局数据错误: ${JSON.stringify(y)}` })).finally(() => o.current = !0) : (t && f(g.toPrimitive(t ?? l.getFieldValue(e), r)), o.current = !0); + }), [m]), $(() => { + a == "javascript" && t ? Ne.exec(t, {}, { getFieldValueForBasicForm: (y) => s ? s.getFieldValue(y) : l.getFieldValue(y), getFieldValue: (y) => l.getFieldValue(y) }).then((y) => f(g.toPrimitive(y, r))).catch((y) => notification.error({ message: `布局数据错误: ${JSON.stringify(y)}` })).finally(() => o.current = !0) : (t && f(g.toPrimitive(t ?? l.getFieldValue(e), r)), o.current = !0); }, [t, a]), Ye(() => { o.current && n && X.getWidgetComponent(n).then(({ default: y }) => y({ value: m, record: l.getFieldsValue(!0), $setting: i })).then(d).catch((y) => console.error("布局数据转换错误: ", y, n)); }, [m, n, i]), [u || m, m]; @@ -328,9 +328,9 @@ const ea = ({ className: e, title: t, tabs: a, tab: n, onTabChange: i }) => { return (i = g.sortBy(e, ["y", "x"])) == null ? void 0 : i.map(({ i: r, x: s, y: o, w: l, h: u, field: { boxStyle: d, widgetPrefix: m = a, widget: f, ...h } }, y) => c("div", { className: "grid-layout-item", style: Zt(s, o, l, u, d, f === "Height" && (h == null ? void 0 : h.initialValue)), children: c(Ka, { ...h, basicForm: n, itemWidget: f != null && f.startsWith("@") ? f : `${m}/${f}`, itemWidgetRender: t }) }, r || y)); }, [e]), Ka = ({ itemWidget: e, itemWidgetRender: t, basicForm: a, ...n }) => { const [i, r] = P(); - return N(() => { + return $(() => { X.getWidgetComponent(e).then(({ defaultProps: s = {}, default: o }) => { - r(b.createElement(t(o, s, a), n)); + r(C.createElement(t(o, s, a), n)); }).catch((s) => { console.error(s), r(e); }); @@ -345,59 +345,59 @@ const ea = ({ className: e, title: t, tabs: a, tab: n, onTabChange: i }) => { return c(e, { ...f, value: h, rawValue: y, $setting: s || {} }); }, Kn = (Lt = sa, function({ code: e, data: t, ...a }) { const [n, i] = P({ resource: null, cols: 12, rowHeight: 21, fields: [] }); - return N(() => { + return $(() => { e && x.get(`/api/_/${e}`).then((r) => i(g.pick(r, ["resource", "cols", "rowHeight", "fields"]))); }, [e]), (n == null ? void 0 : n.resource) && c(Lt, { ...a, rowHeight: n.rowHeight, cols: n.cols, fields: n.fields, data: n != null && n.resource ? { [n == null ? void 0 : n.resource]: t } : {} }); }); var Lt; const Gn = ({ widget: e, widgetPrefix: t = "@pkg/grid-layouts", basicForm: a, ...n }) => { const i = e != null && e.startsWith("@") ? e : `${t}/${e}`, [r, s] = P(); - return N(() => { - i && X.getWidgetComponent(i).then(({ defaultProps: o = {}, default: l }) => ({ default: _a(l, o, a) })).catch((o) => ({ default: () => `${o}` })).then((o) => s(b.createElement(o.default, n))); + return $(() => { + i && X.getWidgetComponent(i).then(({ defaultProps: o = {}, default: l }) => ({ default: _a(l, o, a) })).catch((o) => ({ default: () => `${o}` })).then((o) => s(C.createElement(o.default, n))); }, [i]), r; }, _a = (e, t = {}, a = null) => (n) => { - const { code: i, label: r, extras: s, isVirtual: o, initialValue: l, initialValueLanguage: u, convertJs: d, convertJsSetting: m, value: f, ...h } = g.merge({}, t, n), [y, C] = ia(o ? null : i, { initialValue: l, initialValueLanguage: u, convertJs: d, convertJsSetting: m, type: (h == null ? void 0 : h.type) || "string" }, a); - return c(e, { ...h, value: y, rawValue: C, $setting: s || {} }); -}, Ya = ({ cols: e, rowHeight: t, itemMargin: a, fields: n, primaryKey: i, dataSource: r, itemClassName: s, itemRender: o = (m, f, h) => m, empty: l = c(Ca, { description: null }), className: u, style: d = {} }) => { + const { code: i, label: r, extras: s, isVirtual: o, initialValue: l, initialValueLanguage: u, convertJs: d, convertJsSetting: m, value: f, ...h } = g.merge({}, t, n), [y, b] = ia(o ? null : i, { initialValue: l, initialValueLanguage: u, convertJs: d, convertJsSetting: m, type: (h == null ? void 0 : h.type) || "string" }, a); + return c(e, { ...h, value: y, rawValue: b, $setting: s || {} }); +}, Ya = ({ cols: e, rowHeight: t, itemMargin: a, fields: n, primaryKey: i, dataSource: r, itemClassName: s, itemRender: o = (m, f, h) => m, empty: l = c(ba, { description: null }), className: u, style: d = {} }) => { const m = Dt(), f = pe(() => c(sa, { cols: e, rowHeight: t, itemMargin: a, fields: n, className: s }), [n, e, t, a]); - return c("div", { className: R("ff-data-list-content", u), style: d, children: g.isEmpty(r) ? l : r == null ? void 0 : r.map((h, y) => c(b.Fragment, { children: o(b.cloneElement(f, { data: h }), h, y) }, `${m}-${(h == null ? void 0 : h[i]) || y}`)) }); + return c("div", { className: R("ff-data-list-content", u), style: d, children: g.isEmpty(r) ? l : r == null ? void 0 : r.map((h, y) => c(C.Fragment, { children: o(C.cloneElement(f, { data: h }), h, y) }, `${m}-${(h == null ? void 0 : h[i]) || y}`)) }); }, Qa = ({ component: e }) => { - const { base62params: t } = Na(); - return c(H, { children: c(vt, { listCode: e, base62params: x.decode(t) }) }); + const { base62params: t } = $a(); + return c(q, { children: c(kt, { listCode: e, base62params: x.decode(t) }) }); }, Xa = () => "Empty", Za = ({ component: e, $setting: t }) => { const [a, n] = P(); - return N(() => { + return $(() => { if (!e) return n(c(Xa, { description: null })); - X.getWidgetComponent(e).catch((i) => ({ default: () => `${i}` })).then((i) => b.createElement(i.default, { $setting: t })).then(n); - }, [e]), a ? b.cloneElement(a, {}) : null; + X.getWidgetComponent(e).catch((i) => ({ default: () => `${i}` })).then((i) => C.createElement(i.default, { $setting: t })).then(n); + }, [e]), a ? C.cloneElement(a, {}) : null; }; -var be, Z, Ce, ve, Je, Ke; +var Ce, Z, be, ke, Je, Ke; const ne = class ne { constructor() { F(this, Z, /* @__PURE__ */ new Map()); - F(this, Ce, {}); - F(this, ve, null); - v(this, "init", (t, a) => { - z(this, Z, t), z(this, Ce, a); + F(this, be, {}); + F(this, ke, null); + k(this, "init", (t, a) => { + B(this, Z, t), B(this, be, a); }); - v(this, "get", (t) => (p(this, Z).has(t) || (t = Array.from(p(this, Z).keys()).find((a) => p(this, Z).get(a).uri === t)), p(this, Z).get(t) || {})); - v(this, "redirect", (t, a, n = {}) => { + k(this, "get", (t) => (p(this, Z).has(t) || (t = Array.from(p(this, Z).keys()).find((a) => p(this, Z).get(a).uri === t)), p(this, Z).get(t) || {})); + k(this, "redirect", (t, a, n = {}) => { const { uri: i, type: r, widgetProps: s } = this.get(t) || {}; let o = xa(i || t, r != "list" ? a : g.mapValues(a, (u) => x.encode(u))); const l = new URLSearchParams(); for (const u in s || {}) (s == null ? void 0 : s.type) == "query" && l.append(u, a[u]); - return l.size > 0 && (o = `${o}?${l.toString()}`), p(this, ve).navigate(o, n); + return l.size > 0 && (o = `${o}?${l.toString()}`), p(this, ke).navigate(o, n); }); - v(this, "getMenus", (t) => { + k(this, "getMenus", (t) => { var a; - return ((a = p(this, Ce)) == null ? void 0 : a[t]) || []; + return ((a = p(this, be)) == null ? void 0 : a[t]) || []; }); - v(this, "findMenuPathByUuid", (t) => { + k(this, "findMenuPathByUuid", (t) => { let a = []; - for (const n in p(this, Ce)) if (a = p(this, Je).call(this, p(this, Ce)[n], t, [n]), a.length > 1) return a; + for (const n in p(this, be)) if (a = p(this, Je).call(this, p(this, be)[n], t, [n]), a.length > 1) return a; return a; }); - v(this, "getMenusByRouteUuid", (t) => p(this, Ke).call(this, t, Object.values(p(this, Ce)).flat())); + k(this, "getMenusByRouteUuid", (t) => p(this, Ke).call(this, t, Object.values(p(this, be)).flat())); F(this, Je, (t, a, n = []) => { if (g.isEmpty(t)) return n; for (const { uuid: i, children: r } of t) { @@ -412,62 +412,62 @@ const ne = class ne { for (const r of a) r.widgetType == "redirect" && (r.uuid == t || r.widget == t ? n.push(r) : (i = r.children) != null && i.length && (n = n.concat(p(this, Ke).call(this, t, r.children)))); return n; }); - v(this, "getCurrentMenu", () => { + k(this, "getCurrentMenu", () => { const { uuid: t } = this.getCurrentRoute() || {}; if (!t) return; const a = this.getMenusByRouteUuid(t); return g.isEmpty(a) ? void 0 : a[0]; }); - v(this, "getCurrentRoute", (t = 0) => { + k(this, "getCurrentRoute", (t = 0) => { var n; - const a = (n = p(this, ve).state.matches[p(this, ve).state.matches.length - 1 - t]) == null ? void 0 : n.route; + const a = (n = p(this, ke).state.matches[p(this, ke).state.matches.length - 1 - t]) == null ? void 0 : n.route; if (!a) return null; for (let [i, r] of p(this, Z)) if (r.uri === a.path) return r; return null; }); - v(this, "getPageParams", (t) => { + k(this, "getPageParams", (t) => { var r; - const { location: a, matches: n } = p(this, ve).state, i = ((r = n[n.length - 1]) == null ? void 0 : r.params) || {}; + const { location: a, matches: n } = p(this, ke).state, i = ((r = n[n.length - 1]) == null ? void 0 : r.params) || {}; return a.search && new URLSearchParams(a.search).forEach((s, o) => { i[o] = s; }), t ? g.get(i, t) : i; }); - v(this, "createBrowserRouter", (t = {}) => { + k(this, "createBrowserRouter", (t = {}) => { if (p(this, Z).size == 0) return null; const a = De.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/frameworks/BasicLayout"), n = De.get(X.checkUserToken() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"), i = { [a]: 0 }, r = (o, l) => () => X.getWidgetComponent(o).then((u) => u.default || function() { return `${o}`; - }).then((u) => ({ Component: () => b.createElement(Kt, {}, b.createElement(u, l)) })), s = Array.from(p(this, Z).values()).reduce((o, { uuid: l, uri: u, name: d, type: m, component: f, widgetSetting: h, isLogin: y, isLayout: C, extra: w }) => { - let E = {}, A = 0; + }).then((u) => ({ Component: () => C.createElement(Kt, {}, C.createElement(u, l)) })), s = Array.from(p(this, Z).values()).reduce((o, { uuid: l, uri: u, name: d, type: m, component: f, widgetSetting: h, isLogin: y, isLayout: b, extra: w }) => { + let E = {}, M = 0; switch (m) { case "list": - E.element = b.createElement(Qa, { component: f }); + E.element = C.createElement(Qa, { component: f }); break; case "fsdpf-component": - E.element = b.createElement(Za, { key: f, component: f, $setting: h }); + E.element = C.createElement(Za, { key: f, component: f, $setting: h }); } if (w != null && w.layout) { if (!i[w == null ? void 0 : w.layout]) return i[w == null ? void 0 : w.layout] = o.length, [...o, { path: "/", lazy: r(w == null ? void 0 : w.layout, {}), children: [{ path: u, ...E }] }]; - A = i[w == null ? void 0 : w.layout]; + M = i[w == null ? void 0 : w.layout]; } - return C && A > -1 ? (o[A].children.push({ path: u, ...E }), o) : [...o, { path: u, ...E }]; + return b && M > -1 ? (o[M].children.push({ path: u, ...E }), o) : [...o, { path: u, ...E }]; }, [{ path: "/", lazy: r(a, {}), children: [] }]); - return s.push({ index: !0, element: b.createElement(en, { to: n, replace: !0 }) }), z(this, ve, Ea(s, t)); + return s.push({ index: !0, element: C.createElement(en, { to: n, replace: !0 }) }), B(this, ke, Ea(s, t)); }); - if (p(ne, be)) return p(ne, be); + if (p(ne, Ce)) return p(ne, Ce); } }; -be = new WeakMap(), Z = new WeakMap(), Ce = new WeakMap(), ve = new WeakMap(), Je = new WeakMap(), Ke = new WeakMap(), F(ne, be, null), v(ne, "getInstance", () => (p(ne, be) || z(ne, be, new ne()), p(ne, be))); +Ce = new WeakMap(), Z = new WeakMap(), be = new WeakMap(), ke = new WeakMap(), Je = new WeakMap(), Ke = new WeakMap(), F(ne, Ce, null), k(ne, "getInstance", () => (p(ne, Ce) || B(ne, Ce, new ne()), p(ne, Ce))); let mt = ne; -const en = ({ to: e, replace: t }) => Ta() ? b.createElement(Fa, { to: e, replace: t }) : (window.document.location = e, "redirect"), Pe = mt.getInstance(), je = new Worker(new URL("/ff-worker/index.js", self.location)), Vt = { getConfigure: (e) => De.get(e), route: { redirect: (...e) => Pe.redirect(...e), getPageParams: (...e) => Pe.getPageParams(...e), getCurrentRoute: () => Pe.getCurrentRoute() }, popup: { notification: (...e) => G.notification(...e), success: (...e) => G.success(...e), error: (...e) => G.error(...e), form: (...e) => G.form(...e), modal: (...e) => G.modal(...e), confirm: (...e) => G.confirm(...e) } }; -var nt, ze, ke; +const en = ({ to: e, replace: t }) => Ta() ? C.createElement(Fa, { to: e, replace: t }) : (window.document.location = e, "redirect"), Pe = mt.getInstance(), je = new Worker(new URL("/ff-worker/index.js", self.location)), Vt = { getConfigure: (e) => De.get(e), route: { redirect: (...e) => Pe.redirect(...e), getPageParams: (...e) => Pe.getPageParams(...e), getCurrentRoute: () => Pe.getCurrentRoute() }, popup: { notification: (...e) => G.notification(...e), success: (...e) => G.success(...e), error: (...e) => G.error(...e), form: (...e) => G.form(...e), modal: (...e) => G.modal(...e), confirm: (...e) => G.confirm(...e) } }; +var nt, ze, ve; const I = class I { constructor() { - v(this, "exec", (t, a = {}, n = {}, i = "") => new Promise((r, s) => { + k(this, "exec", (t, a = {}, n = {}, i = "") => new Promise((r, s) => { const o = Et(I, nt)._++; p(I, ze).set(o, n), I.mQueue.set(o, [r, s]), je.postMessage({ id: o, session: i, category: "eval", method: t, args: a }); })); - v(this, "clear", (t) => je.postMessage({ session: t, category: "clear" })); - if (p(I, ke)) return p(I, ke); + k(this, "clear", (t) => je.postMessage({ session: t, category: "clear" })); + if (p(I, ve)) return p(I, ve); Promise.resolve().then(() => Pn).then((t) => { Vt.http = t.http; }), je.addEventListener("message", ({ data: { id: t, task_id: a, method: n, args: i, category: r, data: s, error: o, session: l } }) => { @@ -486,27 +486,27 @@ const I = class I { }, !1); } }; -nt = new WeakMap(), ze = new WeakMap(), ke = new WeakMap(), v(I, "mQueue", /* @__PURE__ */ new Map()), F(I, nt, 0), F(I, ze, /* @__PURE__ */ new Map()), F(I, ke, null), v(I, "getInstance", () => (p(I, ke) || z(I, ke, new I()), p(I, ke))); +nt = new WeakMap(), ze = new WeakMap(), ve = new WeakMap(), k(I, "mQueue", /* @__PURE__ */ new Map()), F(I, nt, 0), F(I, ze, /* @__PURE__ */ new Map()), F(I, ve, null), k(I, "getInstance", () => (p(I, ve) || B(I, ve, new I()), p(I, ve))); let ht = I; -const $e = ht.getInstance(), oa = () => { - const e = Q(!0), [, t] = b.useReducer((a) => a + 1, 0); - return N(() => () => e.current = !1, []), () => e.current && t(); +const Ne = ht.getInstance(), oa = () => { + const e = Q(!0), [, t] = C.useReducer((a) => a + 1, 0); + return $(() => () => e.current = !1, []), () => e.current && t(); }, jt = (e) => { const t = Q(); - return N(() => { + return $(() => { t.current = e; }, [e]), t.current; }, _n = (e) => { const [t, a] = P(e), n = Q(null), i = ge((r, s) => { n.current = s, a(r); }, []); - return N(() => { + return $(() => { n.current && (n.current(t), n.current = null); }, [t]), [t, i]; }, Ye = (e = (n) => { }, t, a = g.isEqual) => { - const n = b.useRef(t); - a(t, n.current) || (n.current = t), b.useEffect(e, [n.current]); + const n = C.useRef(t); + a(t, n.current) || (n.current = t), C.useEffect(e, [n.current]); }, tn = Ye, la = (e, t = "string") => { var a; if (!Array.isArray(e)) return e; @@ -514,8 +514,8 @@ const $e = ht.getInstance(), oa = () => { return e; }, Yn = (e, t = "json", a = "string", n, i = null) => { const [r] = re.useForm(n), [s, o] = P([{ label: "无", value: "", disabled: !0 }]), l = Q([]), u = re.useWatch((d) => l.current.length === 0 ? null : g.pick(d, l.current), r) || null; - return N(() => { - Array.isArray(e) ? o(e) : t === "javascript" && e ? $e.exec(e, {}, { getFieldValue: (d) => (l.current.includes(d) || l.current.push(d), r.getFieldValue(d)), getFieldValueForBasicForm: (d) => (l.current.includes(d) || l.current.push(d), i ? i.getFieldValue(d) : r.getFieldValue(d)) }).then((d) => { + return $(() => { + Array.isArray(e) ? o(e) : t === "javascript" && e ? Ne.exec(e, {}, { getFieldValue: (d) => (l.current.includes(d) || l.current.push(d), r.getFieldValue(d)), getFieldValueForBasicForm: (d) => (l.current.includes(d) || l.current.push(d), i ? i.getFieldValue(d) : r.getFieldValue(d)) }).then((d) => { o(g.toPrimitive(d, "array")); }) : e && o(g.toPrimitive(e, "array")); }, [e, t, u]), la(s, a); @@ -530,16 +530,16 @@ const $e = ht.getInstance(), oa = () => { }), () => r == null ? void 0 : r(); }, n), t; }, an = (e) => { - const [t, a] = b.useState({ gridItems: [], hideItems: [] }); - return b.useEffect(() => { - e && x.get(`/api/_/${e}`).then(({ pk: n, uuid: i, code: r, resource: s, align: o, cols: l, rowHeight: u, marginX: d, marginY: m, listenChangeFields: f, listenChangeFieldsFunc: h, fields: y }) => ({ pk: n, uuid: i, code: r, resource: s, align: o, cols: l, rowHeight: u, marginX: d, marginY: m, listenChangeFields: f, listenChangeFieldsFunc: h, ...y.reduce((C, w) => { + const [t, a] = C.useState({ gridItems: [], hideItems: [] }); + return C.useEffect(() => { + e && x.get(`/api/_/${e}`).then(({ pk: n, uuid: i, code: r, resource: s, align: o, cols: l, rowHeight: u, marginX: d, marginY: m, listenChangeFields: f, listenChangeFieldsFunc: h, fields: y }) => ({ pk: n, uuid: i, code: r, resource: s, align: o, cols: l, rowHeight: u, marginX: d, marginY: m, listenChangeFields: f, listenChangeFieldsFunc: h, ...y.reduce((b, w) => { var E; - return (E = w == null ? void 0 : w.field) != null && E.hidden ? C.hides.push(w == null ? void 0 : w.field) : C.items.push(w), C; + return (E = w == null ? void 0 : w.field) != null && E.hidden ? b.hides.push(w == null ? void 0 : w.field) : b.items.push(w), b; }, { items: [], hides: [] }) })).then(a); }, [e]), t; }, nn = ({ max: e = 0, min: t = 0, type: a = "", message: n, pattern: i, required: r = !1, validator: s } = {}, o, l) => { const [u, d] = P([]); - return N(() => { + return $(() => { const m = []; if (r) { let f = l; @@ -565,15 +565,15 @@ const $e = ht.getInstance(), oa = () => { break; case "validator": s && m.push(({ getFieldValue: f }) => ({ validator: async (h, y) => { - const C = await $e.exec(s, { value: y, fieldName: o }, { getFieldValue: f }); - return g.isString(C) && C ? Promise.reject(C) : g.isBoolean(C) && !C ? Promise.reject(n) : Promise.resolve(); + const b = await Ne.exec(s, { value: y, fieldName: o }, { getFieldValue: f }); + return g.isString(b) && b ? Promise.reject(b) : g.isBoolean(b) && !b ? Promise.reject(n) : Promise.resolve(); } })); } d(m); }, [e, t, a, n, i, r, s]), u; }, rn = (e, t, a) => { const [n, i] = P(null); - return N(() => { + return $(() => { const { initDataUri: r = `/api/${e}`, initDataMethod: s = "GET" } = a || {}; t && x.request({ method: s, url: g.trimEnd(`${r}/${t}`, "/") }).then((o) => { i(o); @@ -581,55 +581,55 @@ const $e = ht.getInstance(), oa = () => { }, [e, t, a]), n; }, sn = (e, t, a, n = {}) => { const i = oa(), r = Q(!0), s = Q([]), [o, l] = P(a), u = re.useWatch((d) => JSON.stringify(g.pick(d, s.current)), t) || "{}"; - return N(() => { - e && $e.exec(e, n, { getFieldValue: g.wrap(t.getFieldValue, (d, m) => (s.current.some((f) => g.isEqual(f, m)) || (s.current.push(m), i()), d(m))), isFieldTouched: t.isFieldTouched, isFieldsTouched: t.isFieldsTouched }).then((d) => r.current && l(d)); - }, [e, u, t, n]), N(() => () => r.current = !1, []), o; + return $(() => { + e && Ne.exec(e, n, { getFieldValue: g.wrap(t.getFieldValue, (d, m) => (s.current.some((f) => g.isEqual(f, m)) || (s.current.push(m), i()), d(m))), isFieldTouched: t.isFieldTouched, isFieldsTouched: t.isFieldsTouched }).then((d) => r.current && l(d)); + }, [e, u, t, n]), $(() => () => r.current = !1, []), o; }, on = ({ type: e, initialValue: t, initialValueLanguage: a, onChange: n, form: i }) => { const r = sn(a == "javascript" && t, i, a == "javascript" ? void 0 : t, {}); - return N(() => { + return $(() => { n(a == "javascript" ? g.toPrimitive(r, e) : g.toPrimitive(t, e)); }, [e, t, r]), null; }, ln = ({ widget: e = "Input", widgetPrefix: t = "@pkg/grid-layout-forms", widgetDecorator: a, subWidgets: n, basicForm: i, ...r }) => { const s = e != null && e.startsWith("@") ? e : `${t}/${e}`, [o, l] = P(); - return N(() => { - s && X.getWidgetComponent(s).then(({ defaultProps: u = {}, default: d }) => ({ default: ca(d, u, i) })).catch((u) => ({ default: () => `${u}` })).then((u) => l(b.createElement(u.default, r))); - }, [s]), o && b.cloneElement(o, r); + return $(() => { + s && X.getWidgetComponent(s).then(({ defaultProps: u = {}, default: d }) => ({ default: ca(d, u, i) })).catch((u) => ({ default: () => `${u}` })).then((u) => l(C.createElement(u.default, r))); + }, [s]), o && C.cloneElement(o, r); }, ca = (e, t = {}, a = null) => (n) => { - const { type: i, code: r, label: s, noStyle: o, placeholder: l, extras: u, validators: d, help: m, isVirtual: f, $isReserved: h, initialValue: y, initialValueLanguage: C, convertJs: w, convertJsSetting: E, widgetPerfix: A, boxStyle: _, widgetDecorator: W, subWidgets: D, ...O } = { ...t, ...n }, U = nn(d || {}, r, i), J = { label: s, noStyle: o, colon: !1, layout: "vertical" }, M = { placeholder: l, ...O }, K = ge((j) => j == null ? void 0 : g.toPrimitive(j, i), [i]); - return c(Wt, { name: r, rules: U, initialValue: K(y), normalize: K, children: (j, k, se) => { + const { type: i, code: r, label: s, noStyle: o, placeholder: l, extras: u, validators: d, help: m, isVirtual: f, $isReserved: h, initialValue: y, initialValueLanguage: b, convertJs: w, convertJsSetting: E, widgetPerfix: M, boxStyle: _, widgetDecorator: H, subWidgets: D, ...A } = { ...t, ...n }, L = nn(d || {}, r, i), J = { label: s, noStyle: o, colon: !1, layout: "vertical" }, z = { placeholder: l, ...A }, K = ge((j) => j == null ? void 0 : g.toPrimitive(j, i), [i]); + return c(Wt, { name: r, rules: L, initialValue: K(y), normalize: K, children: (j, v, se) => { var V; - return c(e, { type: i, rcform: se, itemProps: { validateStatus: k.errors.length > 0 ? "error" : "success", tooltip: m, help: k.errors.length > 0 ? k.errors.join("、") : null, required: ((V = U == null ? void 0 : U[0]) == null ? void 0 : V.required) || !1, ...J }, fieldProps: { ...M, ...j }, $setting: u || {} }); + return c(e, { type: i, rcform: se, itemProps: { validateStatus: v.errors.length > 0 ? "error" : "success", tooltip: m, help: v.errors.length > 0 ? v.errors.join("、") : null, required: ((V = L == null ? void 0 : L[0]) == null ? void 0 : V.required) || !1, ...J }, fieldProps: { ...z, ...j }, $setting: u || {} }); } }); }, St = ({ cols: e = 24, rowHeight: t = 16, itemMargin: a = [8, 16], containerPadding: n = [0, 0], fields: i = [], children: r }) => { const s = ra(i, ca, "@pkg/grid-layout-forms"); - return $("div", { className: "ff-grid-layout-form", style: { "--grid-layout-item-margin-x": `${(a == null ? void 0 : a[0]) ?? 8}px`, "--grid-layout-item-margin-y": `${(a == null ? void 0 : a[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, r && b.cloneElement(r, { cols: e, rowHeight: t, itemMargin: a, containerPadding: n, fields: i })] }); + return N("div", { className: "ff-grid-layout-form", style: { "--grid-layout-item-margin-x": `${(a == null ? void 0 : a[0]) ?? 8}px`, "--grid-layout-item-margin-y": `${(a == null ? void 0 : a[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, r && C.cloneElement(r, { cols: e, rowHeight: t, itemMargin: a, containerPadding: n, fields: i })] }); }; -St.propTypes = { fields: L.array }; +St.propTypes = { fields: O.array }; const cn = (It = St, ({ code: e, layout: t, name: a, primaryKey: n = 0, style: i = {}, formProps: r = {}, form: s, isPreview: o = !1, className: l, onFinish: u, onValuesChange: d = () => { }, ...m }) => { - const { align: f, autoComplete: h, resource: y, items: C, hides: w, rowHeight: E, marginX: A, marginY: _, cols: W, listenChangeFields: D, listenChangeFieldsFunc: O, pk: U, uuid: J } = an(e), [M] = re.useForm(s), K = pe(() => [{ name: "__PK__", value: U }, { name: "__PROPS__", value: r }, { name: "__RESOURCE__", value: y }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: J }, { name: "__PRIMARY_KEY__", value: n }], [U, e, J, y, n, r]); - return $(re, { className: l, name: a || e, layout: t || f, fields: K, form: M, autoComplete: h, style: { ...i, position: "relative" }, onFinish: u, onValuesChange: (j, k) => (({ changedValues: se, allValues: V, listenChangeFields: me, listenChangeFieldsFunc: Ne, onValuesChange: it, code: T }) => { - it(se, V), Ne && Array.isArray(me) && $e.exec(Ne, { changedValues: se, allValues: V }, { getFieldValue: M.getFieldValue, setFieldsValue: M.setFieldsValue, isFieldTouched: M.isFieldTouched, isFieldsTouched: M.isFieldsTouched }); - })({ changedValues: j, allValues: k, listenChangeFields: D, listenChangeFieldsFunc: O, onValuesChange: d, code: e }), children: [c(It, { ...m, form: M, code: e, fields: C, cols: W, rowHeight: E, itemMargin: [A, _] }), w == null ? void 0 : w.map((j) => { - var k; - return c(Wt, { name: j.code, children: c(on, { form: M, name: j.code, type: j.type, initialValue: j.initialValue, initialValueLanguage: (k = j.extras) == null ? void 0 : k.initialValueLanguage }) }, JSON.stringify(j.code)); + const { align: f, autoComplete: h, resource: y, items: b, hides: w, rowHeight: E, marginX: M, marginY: _, cols: H, listenChangeFields: D, listenChangeFieldsFunc: A, pk: L, uuid: J } = an(e), [z] = re.useForm(s), K = pe(() => [{ name: "__PK__", value: L }, { name: "__PROPS__", value: r }, { name: "__RESOURCE__", value: y }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: J }, { name: "__PRIMARY_KEY__", value: n }], [L, e, J, y, n, r]); + return N(re, { className: l, name: a || e, layout: t || f, fields: K, form: z, autoComplete: h, style: { ...i, position: "relative" }, onFinish: u, onValuesChange: (j, v) => (({ changedValues: se, allValues: V, listenChangeFields: me, listenChangeFieldsFunc: $e, onValuesChange: it, code: T }) => { + it(se, V), $e && Array.isArray(me) && Ne.exec($e, { changedValues: se, allValues: V }, { getFieldValue: z.getFieldValue, setFieldsValue: z.setFieldsValue, isFieldTouched: z.isFieldTouched, isFieldsTouched: z.isFieldsTouched }); + })({ changedValues: j, allValues: v, listenChangeFields: D, listenChangeFieldsFunc: A, onValuesChange: d, code: e }), children: [c(It, { ...m, form: z, code: e, fields: b, cols: H, rowHeight: E, itemMargin: [M, _] }), w == null ? void 0 : w.map((j) => { + var v; + return c(Wt, { name: j.code, children: c(on, { form: z, name: j.code, type: j.type, initialValue: j.initialValue, initialValueLanguage: (v = j.extras) == null ? void 0 : v.initialValueLanguage }) }, JSON.stringify(j.code)); })] }); }); var It; const da = ({ $setting: e, $close: t, extras: a, code: n, primaryKey: i, ...r }) => { const [s] = re.useForm(), o = rn(n, i, e); - return N(() => { + return $(() => { o && s.setFieldsValue(o); - }, [o]), c(H, { actions: $(b.Fragment, { children: [c(S, { name: "保存", type: "primary", widget: () => { + }, [o]), c(q, { actions: N(C.Fragment, { children: [c(S, { name: "保存", type: "primary", widget: () => { const l = s.getFieldValue("__RESOURCE__"), { initDataUri: u = `/api/${n}` } = e || {}; s.validateFields(!0).then((d) => l ? g.pick(d, [l]) : d).then((d) => x.post(i ? `${u}/${i}` : `${u}`, d).msg(t)).catch(() => G.error("请先完善表单信息", { duration: 2e3 })); } }), c(S, { name: "取消", widget: () => t(!1) })] }), extras: a, children: c(cn, { form: s, code: n, primaryKey: i, ...r }) }); }, dn = (e, t, { isReplaceRouteHistory: a = !1 } = {}) => Pe.redirect(t, e, { replace: a }), At = (e, t, { status: { loading: a, disabled: n }, setStatus: i }) => { const r = { loading: (s) => s === void 0 ? a : i((o) => ({ ...o, loading: s })), disabled: (s) => s === void 0 ? n : i((o) => ({ ...o, disabled: s })) }; - return g.isFunction(t) ? t.call(null, { ...e, ...r }) : g.isString(t) && t ? $e.exec(t, e, r) : null; + return g.isFunction(t) ? t.call(null, { ...e, ...r }) : g.isString(t) && t ? Ne.exec(t, e, r) : null; }, Mt = (e, t, a, n) => g.isString(t) && t ? X.getWidgetComponent(t).then(({ default: i }) => G.modal(i, { ...e, $setting: a }, n)).catch((i) => { G.error(t, { content: i.toString() }); -}) : G.modal(t, { ...e, $setting: a }, n), un = (e, t, a, n) => G.modal(da, { ...e, $setting: a, code: t }, n), gn = (e, t, a, n) => G.modal(vt, { base62params: e, $setting: a, listCode: t }, n), pn = ({ widget: e, widgetType: t, widgetData: a, widgetProps: n, widgetSetting: i, widgetContainerProps: r }, { onAfterClick: s, onBeforeClick: o }) => { +}) : G.modal(t, { ...e, $setting: a }, n), un = (e, t, a, n) => G.modal(da, { ...e, $setting: a, code: t }, n), gn = (e, t, a, n) => G.modal(kt, { base62params: e, $setting: a, listCode: t }, n), pn = ({ widget: e, widgetType: t, widgetData: a, widgetProps: n, widgetSetting: i, widgetContainerProps: r }, { onAfterClick: s, onBeforeClick: o }) => { const l = Ge(Le), [u, d] = P({ leading: !0, trailing: !1 }), m = pe(() => { switch (t) { case "redirect": @@ -643,7 +643,7 @@ const da = ({ $setting: e, $close: t, extras: a, code: n, primaryKey: i, ...r }) case "data-list": return g.partialRight(gn, e, i, r); default: - if ($t(e) || b.isValidElement(e)) return g.partialRight(Mt, e, i, r); + if (Nt(e) || C.isValidElement(e)) return g.partialRight(Mt, e, i, r); if (g.isFunction(e)) return g.partialRight(At, (i == null ? void 0 : i.code) || e, { status: u, setStatus: d }); } return (...f) => console.error("useButton unknown widgetType", t, ...f); @@ -660,75 +660,75 @@ const da = ({ $setting: e, $close: t, extras: a, code: n, primaryKey: i, ...r }) }), zt.add(a), document.body.appendChild(n); } }, yt = ({ className: e, type: t, style: a = {}, ...n }) => c("span", { role: "img", className: R("ff-iconfont", e), style: a, ...n, children: c("svg", { style: { width: "1em", height: "1em", fill: "currentColor", overflow: "hidden" }, viewBox: "0 0 1024 1024", children: c("use", { xlinkHref: `#${t}` }) }) }); -yt.propTypes = { className: L.string, type: L.string.isRequired, style: L.object }, yt.init = ft; -const Qe = (e) => function({ className: t, children: a, name: n, icon: i, type: r = "default", iconPosition: s = "start", noAuthType: o, onAfterClick: l, onBeforeClick: u, data: d, loading: m, disabled: f, tooltip: h, popConfirm: y, widget: C, widgetType: w, widgetData: E, widgetProps: A, widgetSetting: _, widgetContainerProps: W, ...D }) { - const O = { type: "primary", className: R("ff-button", t), iconPosition: s }; - r === "danger" ? O.danger = !0 : r === "default" && (O.type = r), e === "link" || e === "dashed" ? (O.type = e, r === "default" && (O.className = R(O.className, "ff-default"))) : e !== "circle" && e !== "round" || (O.shape = e), i && (O.icon = c(yt, { type: i })); - const [U, J] = P(!1), [M, { disabled: K, loading: j }] = pn({ widget: C, widgetType: w, widgetData: E, widgetProps: A, widgetSetting: _, widgetContainerProps: W }, { onAfterClick: l, onBeforeClick: u }); - return c(va, { okText: "确定", cancelText: "取消", ...y || {}, disabled: K || f, open: U, onOpenChange: (k) => { - if (!k) return J(k); - y ? J(k) : M(d); +yt.propTypes = { className: O.string, type: O.string.isRequired, style: O.object }, yt.init = ft; +const Qe = (e) => function({ className: t, children: a, name: n, icon: i, type: r = "default", iconPosition: s = "start", noAuthType: o, onAfterClick: l, onBeforeClick: u, data: d, loading: m, disabled: f, tooltip: h, popConfirm: y, widget: b, widgetType: w, widgetData: E, widgetProps: M, widgetSetting: _, widgetContainerProps: H, ...D }) { + const A = { type: "primary", className: R("ff-button", t), iconPosition: s }; + r === "danger" ? A.danger = !0 : r === "default" && (A.type = r), e === "link" || e === "dashed" ? (A.type = e, r === "default" && (A.className = R(A.className, "ff-default"))) : e !== "circle" && e !== "round" || (A.shape = e), i && (A.icon = c(yt, { type: i })); + const [L, J] = P(!1), [z, { disabled: K, loading: j }] = pn({ widget: b, widgetType: w, widgetData: E, widgetProps: M, widgetSetting: _, widgetContainerProps: H }, { onAfterClick: l, onBeforeClick: u }); + return c(ka, { okText: "确定", cancelText: "取消", ...y || {}, disabled: K || f, open: L, onOpenChange: (v) => { + if (!v) return J(v); + y ? J(v) : z(d); }, onConfirm: () => { - M(d); - }, onClick: (k) => { - k.stopPropagation(); - }, children: c(ka, { ...h, title: U ? null : h == null ? void 0 : h.title, trigger: ["hover", "click"], children: c(lt, { loading: j || m, disabled: K || f, ...O, ...D, children: a || n }) }) }); + z(d); + }, onClick: (v) => { + v.stopPropagation(); + }, children: c(va, { ...h, title: L ? null : h == null ? void 0 : h.title, trigger: ["hover", "click"], children: c(lt, { loading: j || m, disabled: K || f, ...A, ...D, children: a || n }) }) }); }, S = Qe("default"), mn = Qe("link"), hn = Qe("circle"), fn = Qe("round"), yn = Qe("dashed"), Bt = ({ data: e, widget: t, widgetType: a = "fsdpf-component", children: n, widgetData: i, widgetProps: r, widgetSetting: s, widgetContainerProps: o }) => { - const l = Ge(Le), [u, d] = P(!1), [m, f] = P("hover"), [h, y] = P({}), [C, w] = P(), { placement: E, align: A, ..._ } = o || {}; - N(() => { - a == "grid-layout-form" ? w(b.createElement(da, { ...i, $setting: s, code: t })) : a == "data-list" ? w(b.createElement(vt, { base62params: e, $setting: s, listCode: t })) : g.isString(t) ? X.getWidgetComponent(t).then(({ default: O }) => { - w(b.createElement(O, { ...i, $setting: s })); - }).catch((O) => w(O.toString())) : $t(t) ? w(b.createElement(t, { ...i, $setting: s })) : b.isValidElement(t) && w(b.cloneElement(t, { ...i, $setting: s })); - }, [t, a, i]), N(() => { + const l = Ge(Le), [u, d] = P(!1), [m, f] = P("hover"), [h, y] = P({}), [b, w] = P(), { placement: E, align: M, arrow: _ = { pointAtCenter: !0 }, ...H } = o || {}; + $(() => { + a == "grid-layout-form" ? w(C.createElement(da, { ...i, $setting: s, code: t })) : a == "data-list" ? w(C.createElement(kt, { base62params: e, $setting: s, listCode: t })) : g.isString(t) ? X.getWidgetComponent(t).then(({ default: L }) => { + w(C.createElement(L, { ...i, $setting: s })); + }).catch((L) => w(L.toString())) : Nt(t) ? w(C.createElement(t, { ...i, $setting: s })) : C.isValidElement(t) && w(C.cloneElement(t, { ...i, $setting: s })); + }, [t, a, i]), $(() => { Promise.resolve(_t(r, e, { list: l })).then(y); }, [r, e]); - const W = (O) => { - d(O), !O && f("hover"); - }, D = () => { + const D = (L) => { + d(L), !L && f("hover"); + }, A = () => { d(!0), f("click"); }; - return c(Sa, { zIndex: 1e3, placement: E, onPopupClick: D, onClick: D, open: u, align: A, trigger: m, content: c(wn, { ..._, children: C && b.cloneElement(C, { ...h, $close: () => W(!1) }) }), children: n, onOpenChange: W }); + return c(Sa, { zIndex: 1080, placement: E, onPopupClick: A, onClick: A, open: u, align: M, arrow: _, trigger: m, content: c(wn, { ...H, children: b && C.cloneElement(b, { ...h, $close: () => D(!1) }) }), children: n, onOpenChange: D }); }, wn = ({ title: e, className: t, children: a, width: n, height: i, ...r }) => { - const [s, o] = P({}), l = ge((m, f) => o((h) => ({ ...h, [m]: f })), []), u = ge((m) => o((f) => ({ ...f, [m]: void 0 })), []), d = e ? b.createElement("div", { className: "ff-popup-title" }, e) : s == null ? void 0 : s.title; - return c(_e.Provider, { value: { ele: s, mount: l, unmount: u }, children: $("div", { className: R("ff-popup ff-popover", t), style: { width: n, height: i }, ...r, children: [d || s != null && s["sub-title"] ? $("div", { className: "ff-popup-header", children: [d || c("div", { className: "ff-popup-title" }), (s == null ? void 0 : s["sub-title"]) || c("div", { className: "ff-popup-sub-title" })] }) : null, a, s != null && s.extras || s != null && s.actions ? $("div", { className: "ff-popup-footer", children: [(s == null ? void 0 : s.extras) || c("div", { className: "ff-popup-extras" }), (s == null ? void 0 : s.actions) || c("div", { className: "ff-popup-actions" })] }) : null] }) }); + const [s, o] = P({}), l = ge((m, f) => o((h) => ({ ...h, [m]: f })), []), u = ge((m) => o((f) => ({ ...f, [m]: void 0 })), []), d = e ? C.createElement("div", { className: "ff-popup-title" }, e) : s == null ? void 0 : s.title; + return c(_e.Provider, { value: { ele: s, mount: l, unmount: u }, children: N("div", { className: R("ff-popup ff-popover", t), style: { width: n, height: i }, ...r, children: [N("div", { className: "ff-popup-header", children: [d, s == null ? void 0 : s["sub-title"]] }), a, N("div", { className: "ff-popup-footer", children: [s == null ? void 0 : s.extras, s == null ? void 0 : s.actions] })] }) }); }; -Bt.propTypes = { widgetType: L.oneOf(["fsdpf-component", "grid-layout-form", "data-list"]) }, S.propTypes = { type: L.oneOf(["primary", "default", "danger", ""]), name: L.string, icon: L.string, iconPosition: L.oneOf(["start", "end"]), data: L.any, widget: L.any, widgetType: L.oneOf(["destroy", "redirect", "func", "fsdpf-component", "grid-layout-form", "grid-layout", "data-list"]), widgetData: L.object, widgetProps: L.object, widgetSetting: L.object, widgetContainerProps: L.object }, S.Link = mn, S.Link.defaultProps = S.defaultProps, S.Link.propTypes = S.propTypes, S.Circle = hn, S.Circle.defaultProps = S.defaultProps, S.Circle.propTypes = S.propTypes, S.Round = fn, S.Round.defaultProps = S.defaultProps, S.Round.propTypes = S.propTypes, S.Dashed = yn, S.Dashed.defaultProps = S.defaultProps, S.Dashed.propTypes = S.propTypes, S.Popover = Bt; -const bn = ({ fields: e, formProps: t, $close: a }) => { +Bt.propTypes = { widgetType: O.oneOf(["fsdpf-component", "grid-layout-form", "data-list"]) }, S.propTypes = { type: O.oneOf(["primary", "default", "danger", ""]), name: O.string, icon: O.string, iconPosition: O.oneOf(["start", "end"]), data: O.any, widget: O.any, widgetType: O.oneOf(["destroy", "redirect", "func", "fsdpf-component", "grid-layout-form", "grid-layout", "data-list"]), widgetData: O.object, widgetProps: O.object, widgetSetting: O.object, widgetContainerProps: O.object }, S.Link = mn, S.Link.defaultProps = S.defaultProps, S.Link.propTypes = S.propTypes, S.Circle = hn, S.Circle.defaultProps = S.defaultProps, S.Circle.propTypes = S.propTypes, S.Round = fn, S.Round.defaultProps = S.defaultProps, S.Round.propTypes = S.propTypes, S.Dashed = yn, S.Dashed.defaultProps = S.defaultProps, S.Dashed.propTypes = S.propTypes, S.Popover = Bt; +const Cn = ({ fields: e, formProps: t, $close: a }) => { const [n] = re.useForm(), i = pe(() => [{ name: "__PROPS__", value: t }], [t]); - return c(H, { actions: $(b.Fragment, { children: [c(S, { name: "取消", widget: () => a(!1) }), c(S, { name: "确定", type: "primary", widget: () => n.validateFields(!0).then(a) })] }), children: c(re, { fields: i, form: n, className: "ff-modal-form", children: e == null ? void 0 : e.map(({ code: r, ...s }) => c(ln, { code: r, ...s }, r)) }) }); -}, Cn = ({ className: e, $close: t, children: a, title: n, subTitle: i, actions: r, extras: s, zIndex: o, ...l }) => $(La, { ...l, prefixCls: "ff-drawer", className: R("ff-popup", e), height: 378, maskMotion: { motionAppear: !0, motionName: "mask-motion" }, motion: (u) => ({ motionAppear: !0, motionName: `panel-motion-${u}` }), children: [$("div", { className: "ff-popup-header", children: [c("button", { "aria-label": "Close", className: "ff-popup-close", onClick: l.onClose, children: c(Ct, { type: "close" }) }), n, i] }), c("div", { className: "ff-popup-body", children: a }), $("div", { className: "ff-popup-footer", children: [s, r] })] }), vn = ({ className: e, $close: t, $event: a, children: n, title: i, subTitle: r, actions: s, extras: o, zIndex: l, placement: u, ...d }) => { + return c(q, { actions: N(C.Fragment, { children: [c(S, { name: "取消", widget: () => a(!1) }), c(S, { name: "确定", type: "primary", widget: () => n.validateFields(!0).then(a) })] }), children: c(re, { fields: i, form: n, className: "ff-modal-form", children: e == null ? void 0 : e.map(({ code: r, ...s }) => c(ln, { code: r, ...s }, r)) }) }); +}, bn = ({ className: e, $close: t, children: a, title: n, subTitle: i, actions: r, extras: s, zIndex: o, ...l }) => N(La, { ...l, prefixCls: "ff-drawer", className: R("ff-popup", e), height: 378, maskMotion: { motionAppear: !0, motionName: "mask-motion" }, motion: (u) => ({ motionAppear: !0, motionName: `panel-motion-${u}` }), children: [N("div", { className: "ff-popup-header", children: [c("button", { "aria-label": "Close", className: "ff-popup-close", onClick: l.onClose, children: c(bt, { type: "close" }) }), n, i] }), c("div", { className: "ff-popup-body", children: a }), N("div", { className: "ff-popup-footer", children: [s, r] })] }), kn = ({ className: e, $close: t, $event: a, children: n, title: i, subTitle: r, actions: s, extras: o, zIndex: l, placement: u, ...d }) => { const m = (a == null ? void 0 : a.pageX) === void 0 ? { animation: null, maskAnimation: null, mousePosition: { x: null, y: null } } : { animation: "zoom", maskAnimation: "fade", mousePosition: { x: a == null ? void 0 : a.pageX, y: a == null ? void 0 : a.pageY } }; - return c(Va, { ...d, ...m, prefixCls: "ff-modal", modalRender: () => $("div", { className: R("ff-modal-content ff-popup", e), children: [$("div", { className: "ff-popup-header", children: [c("button", { "aria-label": "Close", className: "ff-popup-close", onClick: d.onClose, children: c(Ct, { type: "close" }) }), i, r] }), c("div", { className: "ff-popup-body", children: n }), $("div", { className: "ff-popup-footer", children: [o, s] })] }) }); + return c(Va, { ...d, ...m, prefixCls: "ff-modal", modalRender: () => N("div", { className: R("ff-modal-content ff-popup", e), children: [N("div", { className: "ff-popup-header", children: [c("button", { "aria-label": "Close", className: "ff-popup-close", onClick: d.onClose, children: c(bt, { type: "close" }) }), i, r] }), c("div", { className: "ff-popup-body", children: n }), N("div", { className: "ff-popup-footer", children: [o, s] })] }) }); }, ua = ({ placement: e, $close: t, $event: a, children: n, title: i, ...r }) => { - const [s, o] = P({}), [l, u] = P(!0), d = ge((y, C) => o((w) => ({ ...w, [y]: C })), []), m = ge((y) => o((C) => ({ ...C, [y]: void 0 })), []); - let f = { ...r, className: s.rootClassName, title: s.title || i && b.createElement("div", { className: R("ff-popup-title") }, i), subTitle: s["sub-title"], actions: s.actions, extras: s.extras, children: n, $close: t, $event: a, onClose: () => u(!1) }; + const [s, o] = P({}), [l, u] = P(!0), d = ge((y, b) => o((w) => ({ ...w, [y]: b })), []), m = ge((y) => o((b) => ({ ...b, [y]: void 0 })), []); + let f = { ...r, className: s.rootClassName, title: s.title || i && C.createElement("div", { className: R("ff-popup-title") }, i), subTitle: s["sub-title"], actions: s.actions, extras: s.extras, children: n, $close: t, $event: a, onClose: () => u(!1) }; const h = () => { t(!1); }; - return c(_e.Provider, { value: { ele: s, mount: d, unmount: m }, children: e && e !== "center" ? c(Cn, { ...f, placement: e, open: l, afterOpenChange: (y) => !y && h() }) : c(vn, { ...f, visible: l, afterClose: h }) }); + return c(_e.Provider, { value: { ele: s, mount: d, unmount: m }, children: e && e !== "center" ? c(bn, { ...f, placement: e, open: l, afterOpenChange: (y) => !y && h() }) : c(kn, { ...f, visible: l, afterClose: h }) }); }; -ua.propTypes = { placement: L.oneOf(["center", "left", "top", "right", "bottom"]) }; -const q = () => { +ua.propTypes = { placement: O.oneOf(["center", "left", "top", "right", "bottom"]) }; +const W = () => { const [e, t] = Ra({ maxCount: 6, motion: { motionName: "ff-notification-fade", motionAppear: !0, motionEnter: !0, motionLeave: !0, onLeaveStart: (r) => { const { offsetHeight: s } = r; return { height: s }; - }, onLeaveActive: () => ({ height: 0, opacity: 0, margin: 0 }) }, prefixCls: "ff-notification" }), [, a] = b.useReducer((r) => r + 1, 0); - N(() => { - q.$onClick = n, q.$queue.forEach(([r, s, o], l, u) => { + }, onLeaveActive: () => ({ height: 0, opacity: 0, margin: 0 }) }, prefixCls: "ff-notification" }), [, a] = C.useReducer((r) => r + 1, 0); + $(() => { + W.$onClick = n, W.$queue.forEach(([r, s, o], l, u) => { i([s, o], ...r), delete u[l]; }); }, []); const n = (r, s = {}, o = {}) => new Promise((l, u) => i([l, u], r, s, o)), i = ([r, s], o, l = {}, u = {}) => { - const d = q.$index++, m = (f) => ((h, y) => (q.$popups.delete(h), a(), y == null ? void 0 : y()))(d, () => r(f)); - if (o === Gt) return e.open({ ...u, key: d, content: b.createElement(o, { ...l, $close: () => e.close(d) }) }); - q.$popups.set(d, b.createElement(ua, { zIndex: d, maskClosable: !1, $event: l == null ? void 0 : l.$event, ...u, key: d, $close: m }, b.isValidElement(o) ? b.cloneElement(o, { ...l, $close: m }) : o != null && o.name ? b.createElement(o, { ...l, $close: m }) : o)), a(); + const d = W.$index++, m = (f) => ((h, y) => (W.$popups.delete(h), a(), y == null ? void 0 : y()))(d, () => r(f)); + if (o === Gt) return e.open({ ...u, key: d, content: C.createElement(o, { ...l, $close: () => e.close(d) }) }); + W.$popups.set(d, C.createElement(ua, { zIndex: d, maskClosable: !1, $event: l == null ? void 0 : l.$event, ...u, key: d, $close: m }, C.isValidElement(o) ? C.cloneElement(o, { ...l, $close: m }) : o != null && o.name ? C.createElement(o, { ...l, $close: m }) : o)), a(); }; - return $(b.Fragment, { children: [Array.from(q.$popups).map(([r, s]) => s), t] }); + return N(C.Fragment, { children: [Array.from(W.$popups).map(([r, s]) => s), t] }); }; -q.$popups = /* @__PURE__ */ new Map(), q.$index = 0, q.$queue = [], q.$onClick = (...e) => new Promise((t, a) => { - q.$queue.push([e, t, a]); +W.$popups = /* @__PURE__ */ new Map(), W.$index = 0, W.$queue = [], W.$onClick = (...e) => new Promise((t, a) => { + W.$queue.push([e, t, a]); }); -const Ut = (e, t, a = {}) => q.$onClick(e, t, a), st = (e, { showProgress: t, duration: a, ...n } = { duration: 1.5 }) => q.$onClick(Gt, { content: e, ...n }, { showProgress: t, duration: a }), G = { modal: Ut, confirm: (e, t = {}) => q.$onClick(ja, { content: e, ...t }, { placement: "center" }), form: (e, t = {}, a = {}) => Ut(bn, { formProps: a, fields: e }, { placement: "center", ...t }).then((n) => { +const Ut = (e, t, a = {}) => W.$onClick(e, t, a), st = (e, { showProgress: t, duration: a, ...n } = { duration: 1.5 }) => W.$onClick(Gt, { content: e, ...n }, { showProgress: t, duration: a }), G = { modal: Ut, confirm: (e, t = {}) => W.$onClick(ja, { content: e, ...t }, { placement: "center" }), form: (e, t = {}, a = {}) => Ut(Cn, { formProps: a, fields: e }, { placement: "center", ...t }).then((n) => { if (n === !1) throw !1; return n; }), notification: st, success: (e, t = { duration: 1.5 }) => st(e, { ...t, className: "ff-notification-success", icon: "check" }), error: (e, t = { duration: 1.5 }) => st(e, { ...t, className: "ff-notification-error", icon: "close" }) }; @@ -757,7 +757,7 @@ var Se, Y; const ie = class ie { constructor() { F(this, Y, /* @__PURE__ */ new Map()); - v(this, "setVendor", (t, a) => p(this, Y).set(t, new Jt(a, async (n, i) => { + k(this, "setVendor", (t, a) => p(this, Y).set(t, new Jt(a, async (n, i) => { var s, o; if (!(n != null && n.default)) throw "@pkg not found"; let r = () => i; @@ -768,7 +768,7 @@ const ie = class ie { } throw new We(i); }))); - v(this, "getWidgetComponent", async (t) => { + k(this, "getWidgetComponent", async (t) => { if (!t) throw "getWidgetComponent widget is required"; const [, a] = t == null ? void 0 : t.split("@ff/"), [, n] = t == null ? void 0 : t.split("@app/"), [, i] = t == null ? void 0 : t.split("@pkg/"), [, r] = t == null ? void 0 : t.split("@fsdpf/"); try { @@ -788,12 +788,12 @@ const ie = class ie { throw new Pt(t, s); } }); - v(this, "getRoutes", () => x.get("/api/my-router").then((t) => [...t, { uuid: "data-list-setting", isLayout: !0, uri: "/data-list-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/DataListSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, { uuid: "grid-layout-setting", isLayout: !0, uri: "/grid-layout-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/GridLayoutSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, { uuid: "grid-layout-form-setting", isLayout: !0, uri: "/grid-layout-form-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/GridLayoutFormSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, { uuid: "resource-api-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/ResourceApiSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, { uuid: "charts-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/ChartsSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, { uuid: "fsm-setting", isLayout: !0, uri: "/fsm-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/FsmSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, { uuid: "component-setting", isLayout: !0, uri: "/component-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/ComponentSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, { uuid: "login", uri: "/login", name: "登录", type: "fsdpf-component", isLogin: !1, component: "@pkg/components/ff/Login" }, { uuid: "not-found", uri: "*", name: "Not Found", type: "fsdpf-component", isLogin: !1, component: "@pkg/components/ff/NotFound" }].map(({ uuid: a, ...n }) => [a, { uuid: a, ...n }])).then((t) => new Map(t))); - v(this, "getMenus", () => x.get("/api/my-menu")); - v(this, "getConfigure", () => x.get("api/init-configure")); - v(this, "getWidgetOperationAuth", () => x.get("/api/init-widget-operation-auth").then((t) => t.reduce((a, { uuid: n, auth: i }) => [...a, [n, i]], []))); - v(this, "getPhoneNumber", (t) => x.get(`/api/user-wx-phone-number/${t}`)); - v(this, "getUserToken", () => { + k(this, "getRoutes", () => x.get("/api/my-router").then((t) => [...t, { uuid: "data-list-setting", isLayout: !0, uri: "/data-list-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/DataListSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, { uuid: "grid-layout-setting", isLayout: !0, uri: "/grid-layout-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/GridLayoutSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, { uuid: "grid-layout-form-setting", isLayout: !0, uri: "/grid-layout-form-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/GridLayoutFormSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, { uuid: "resource-api-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/ResourceApiSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, { uuid: "charts-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/ChartsSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, { uuid: "fsm-setting", isLayout: !0, uri: "/fsm-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/FsmSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, { uuid: "component-setting", isLayout: !0, uri: "/component-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/ComponentSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, { uuid: "login", uri: "/login", name: "登录", type: "fsdpf-component", isLogin: !1, component: "@pkg/components/ff/Login" }, { uuid: "not-found", uri: "*", name: "Not Found", type: "fsdpf-component", isLogin: !1, component: "@pkg/components/ff/NotFound" }].map(({ uuid: a, ...n }) => [a, { uuid: a, ...n }])).then((t) => new Map(t))); + k(this, "getMenus", () => x.get("/api/my-menu")); + k(this, "getConfigure", () => x.get("api/init-configure")); + k(this, "getWidgetOperationAuth", () => x.get("/api/init-widget-operation-auth").then((t) => t.reduce((a, { uuid: n, auth: i }) => [...a, [n, i]], []))); + k(this, "getPhoneNumber", (t) => x.get(`/api/user-wx-phone-number/${t}`)); + k(this, "getUserToken", () => { const t = window.localStorage.getItem(tt); if (!t) return ""; const a = t.split("."); @@ -802,14 +802,14 @@ const ie = class ie { if (Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3) - n > 2592e3) throw "登录令牌已过期, 请重新登录!"; return t; }); - v(this, "checkUserToken", () => { + k(this, "checkUserToken", () => { try { return !!this.getUserToken(); } catch { return !1; } }); - v(this, "getUserInfo", (t = !0) => { + k(this, "getUserInfo", (t = !0) => { var a; try { const n = this.getUserToken(); @@ -821,33 +821,33 @@ const ie = class ie { } return Promise.resolve(null); }); - v(this, "login", (t, a, n = {}) => x.post("/api/user-token", { username: t, passwd: Oa.hash(a), platform: "web", ...n }).then(({ token: i }) => (window.localStorage.setItem(tt, i), i))); - v(this, "logout", () => { + k(this, "login", (t, a, n = {}) => x.post("/api/user-token", { username: t, passwd: Oa.hash(a), platform: "web", ...n }).then(({ token: i }) => (window.localStorage.setItem(tt, i), i))); + k(this, "logout", () => { window.localStorage.removeItem(ot), window.localStorage.removeItem(tt); }); if (p(ie, Se)) return p(ie, Se); } }; -Se = new WeakMap(), Y = new WeakMap(), F(ie, Se, null), v(ie, "getInstance", () => (p(ie, Se) || z(ie, Se, new ie()), p(ie, Se))); -let bt = ie; -const X = bt.getInstance(), kn = b.createContext({ user: {}, initUser: () => { -}, initUserComplete: !1 }), Sn = b.createContext({ set: () => { +Se = new WeakMap(), Y = new WeakMap(), F(ie, Se, null), k(ie, "getInstance", () => (p(ie, Se) || B(ie, Se, new ie()), p(ie, Se))); +let Ct = ie; +const X = Ct.getInstance(), vn = C.createContext({ user: {}, initUser: () => { +}, initUserComplete: !1 }), Sn = C.createContext({ set: () => { }, get: () => { }, assign: () => { }, currentRoute: () => { -} }), $t = (e) => !!(e != null && e.name) && (e.prototype instanceof b.Component || /^[A-Z]/.test(e.name)), Pn = Object.freeze(Object.defineProperty({ __proto__: null, AppContext: kn, AppGlobalParamsContext: Sn, cache: Jt, configure: De, default: X, func: $e, http: x, isReactComponent: $t, route: Pe }, Symbol.toStringTag, { value: "Module" })), $n = (e, t, a = "children") => { +} }), Nt = (e) => !!(e != null && e.name) && (e.prototype instanceof C.Component || /^[A-Z]/.test(e.name)), Pn = Object.freeze(Object.defineProperty({ __proto__: null, AppContext: vn, AppGlobalParamsContext: Sn, cache: Jt, configure: De, default: X, func: Ne, http: x, isReactComponent: Nt, route: Pe }, Symbol.toStringTag, { value: "Module" })), Nn = (e, t, a = "children") => { if (g.isEmpty(e)) return {}; const n = g.find(e, ["value", t]); if (!g.isEmpty(n)) return n; const i = e.length; for (let r = 0; r < i; r++) { - const { [a]: s } = e[r], o = $n(s, t, a); + const { [a]: s } = e[r], o = Nn(s, t, a); if (!g.isEmpty(o)) return o; } return {}; }; export { - $t as $, + Nt as $, Yn as A, Qn as B, cn as C, @@ -866,10 +866,10 @@ export { Ia as P, pn as Q, Xt as R, - H as S, + q as S, _e as T, Kt as U, - q as V, + W as V, G as W, Dn as X, Wn as Y, @@ -879,20 +879,20 @@ export { x as a0, Jt as a1, De as a2, - $e as a3, + Ne as a3, Pe as a4, - kn as a5, + vn as a5, Sn as a6, - $n as a7, + Nn as a7, sa as b, Gn as c, ra as d, - kt as e, + vt as e, ea as f, Zt as g, ta as h, aa as i, - vt as j, + kt as j, Le as k, Ha as l, Ya as m, diff --git a/dist/components.js b/dist/components.js index 30842fa..88f9555 100644 --- a/dist/components.js +++ b/dist/components.js @@ -1,4 +1,4 @@ -import { X as s, N as p, Y as n, Z as t, W as d } from "./common/main-CQFNsPcH.js"; +import { X as s, N as p, Y as n, Z as t, W as d } from "./common/main-BpYqfQKX.js"; export { s as Empty, p as Icon, diff --git a/dist/container.js b/dist/container.js index cbaa31e..3d50c6e 100644 --- a/dist/container.js +++ b/dist/container.js @@ -1,4 +1,4 @@ -import { T as o, X as s, Y as p, Z as t, U as d, W as n, V as r, S as u } from "./common/main-CQFNsPcH.js"; +import { T as o, X as s, Y as p, Z as t, U as d, W as n, V as r, S as u } from "./common/main-BpYqfQKX.js"; export { o as Context, s as Empty, diff --git a/dist/data-list.js b/dist/data-list.js index 916ee0b..29ec8fd 100644 --- a/dist/data-list.js +++ b/dist/data-list.js @@ -1,4 +1,4 @@ -import { m as s, k as e, e as r, i, n as o, j as D, h as l, l as u, f as L, o as n, D as d, p as m, q as F, s as p, t as C, r as b } from "./common/main-CQFNsPcH.js"; +import { m as s, k as e, e as r, i, n as o, j as D, h as l, l as u, f as L, o as n, D as d, p as m, q as F, s as p, t as C, r as b } from "./common/main-BpYqfQKX.js"; export { s as DataListContent, e as DataListContext, diff --git a/dist/data-list/utils.js b/dist/data-list/utils.js index 59ddaee..2f1aa6f 100644 --- a/dist/data-list/utils.js +++ b/dist/data-list/utils.js @@ -1,5 +1,5 @@ import "lodash"; -import { a as t } from "../common/main-CQFNsPcH.js"; +import { a as t } from "../common/main-BpYqfQKX.js"; export { t as getDefaultExpandRowKeys }; diff --git a/dist/grid-layout-form.js b/dist/grid-layout-form.js index 70fabbd..8cda983 100644 --- a/dist/grid-layout-form.js +++ b/dist/grid-layout-form.js @@ -1,4 +1,4 @@ -import { E as r, I as u, F as e, C as o, M as t, L as F, K as d, J as m } from "./common/main-CQFNsPcH.js"; +import { E as r, I as u, F as e, C as o, M as t, L as F, K as d, J as m } from "./common/main-BpYqfQKX.js"; export { r as GridLayoutForm, u as GridLayoutFormHelper, diff --git a/dist/grid-layout-form/utils.js b/dist/grid-layout-form/utils.js index 2316bc5..a525c6e 100644 --- a/dist/grid-layout-form/utils.js +++ b/dist/grid-layout-form/utils.js @@ -1,5 +1,5 @@ import "lodash"; -import { a7 as a } from "../common/main-CQFNsPcH.js"; +import { a7 as a } from "../common/main-BpYqfQKX.js"; export { a as getOptionItemByValue }; diff --git a/dist/grid-layout.js b/dist/grid-layout.js index 484bdc1..7a4dc81 100644 --- a/dist/grid-layout.js +++ b/dist/grid-layout.js @@ -1,4 +1,4 @@ -import { b as d, c as e, H as u, G as i, u as t, d as o } from "./common/main-CQFNsPcH.js"; +import { b as d, c as e, H as u, G as i, u as t, d as o } from "./common/main-BpYqfQKX.js"; export { d as GridLayout, e as GridLayoutWidget, diff --git a/dist/grid-layout/utils.js b/dist/grid-layout/utils.js index eb61a07..e05a79e 100644 --- a/dist/grid-layout/utils.js +++ b/dist/grid-layout/utils.js @@ -1,4 +1,4 @@ -import { g as t } from "../common/main-CQFNsPcH.js"; +import { g as t } from "../common/main-BpYqfQKX.js"; export { t as getBoxStyle }; diff --git a/dist/hooks.js b/dist/hooks.js index 253b3ed..c942f14 100644 --- a/dist/hooks.js +++ b/dist/hooks.js @@ -1,7 +1,7 @@ import "lodash"; import "rc-field-form"; import "react"; -import { z as p, y as i, A as o, w as r, x as f, B as c, v as m } from "./common/main-CQFNsPcH.js"; +import { z as p, y as i, A as o, w as r, x as f, B as c, v as m } from "./common/main-BpYqfQKX.js"; export { p as useDeepEffect, i as useDeepEqualEffect, diff --git a/dist/iconfont.js b/dist/iconfont.js index 0c8c4b3..94d1f3c 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 { N as a } from "./common/main-CQFNsPcH.js"; +import { N as a } from "./common/main-BpYqfQKX.js"; export { a as default }; diff --git a/dist/index.js b/dist/index.js index 7a5101a..db54a2f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,4 +1,4 @@ -import { a5 as t, a6 as e, a1 as o, a2 as p, _ as n, a3 as c, a0 as r, $ as f, a4 as u } from "./common/main-CQFNsPcH.js"; +import { a5 as t, a6 as e, a1 as o, a2 as p, _ as n, a3 as c, a0 as r, $ as f, a4 as u } from "./common/main-BpYqfQKX.js"; export { t as AppContext, e as AppGlobalParamsContext, diff --git a/dist/res-ws.js b/dist/res-ws.js index 03cc5b7..f7d9345 100644 --- a/dist/res-ws.js +++ b/dist/res-ws.js @@ -1,5 +1,5 @@ import "lodash"; -import { R as a } from "./common/main-CQFNsPcH.js"; +import { R as a } from "./common/main-BpYqfQKX.js"; export { a as default }; diff --git a/dist/style.css b/dist/style.css index 98ecea4..6375405 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-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-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-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-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-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-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);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)}.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);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-footer{display:flex;justify-content:space-between;margin-top:var(--margin-xs)}.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}.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:relative;background-color:var(--popup-bg-color, #fff);border-radius:8px;background-clip:padding-box;max-height:calc(100vh - 150px);min-width:max(35vw,600px);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-extras,.ff-popup-actions{display:flex;align-items:center;gap:8px}.ff-popup-extras{flex:1}.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;--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-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-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-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-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-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-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)}.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: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}.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:relative;background-color:var(--popup-bg-color, #fff);border-radius:8px;background-clip:padding-box;max-height:calc(100vh - 150px);min-width:max(35vw,600px);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-extras,.ff-popup-actions{display:flex;align-items:center;gap:8px}.ff-popup-extras{flex:1}.ff-popup-body{flex:1;overflow-y:auto} diff --git a/package.json b/package.json index 9cab9c9..6b66567 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ff", "private": true, - "version": "0.4.9", + "version": "0.4.10", "author": "www.fsdpf.com", "type": "module", "main": "./dist/index.js",