From f979a4124f9476129082266484fea276af9d5c61 Mon Sep 17 00:00:00 2001 From: what Date: Fri, 28 Jun 2024 09:26:11 +0800 Subject: [PATCH] v0.1.13 --- dist/button.js | 4 +- .../{main-D7BIypEq.js => main-D2ZjkFcD.js} | 1784 +++++++++-------- dist/common/vender-B-S-5jfg.js | 670 ------- dist/common/vender-CijlkmMW.js | 835 ++++++++ dist/components.js | 2 +- dist/container.js | 2 +- dist/data-list.js | 2 +- dist/grid-layout-form.js | 2 +- dist/grid-layout.js | 2 +- dist/hooks.js | 2 +- dist/index.js | 2 +- dist/res-ws.js | 2 +- dist/service.js | 2 +- dist/style.css | 2 +- dist/user.js | 2 +- dist/utils.js | 2 +- package.json | 8 +- 17 files changed, 1750 insertions(+), 1575 deletions(-) rename dist/common/{main-D7BIypEq.js => main-D2ZjkFcD.js} (50%) delete mode 100644 dist/common/vender-B-S-5jfg.js create mode 100644 dist/common/vender-CijlkmMW.js diff --git a/dist/button.js b/dist/button.js index 347db56..e4ac7eb 100644 --- a/dist/button.js +++ b/dist/button.js @@ -1,5 +1,5 @@ -import { E as s, B as u, C as e } from "./common/main-D7BIypEq.js"; -import "./common/vender-B-S-5jfg.js"; +import { E as s, B as u, C as e } from "./common/main-D2ZjkFcD.js"; +import "./common/vender-CijlkmMW.js"; export { s as auth, u as default, diff --git a/dist/common/main-D7BIypEq.js b/dist/common/main-D2ZjkFcD.js similarity index 50% rename from dist/common/main-D7BIypEq.js rename to dist/common/main-D2ZjkFcD.js index 7f5097d..45e9c4f 100644 --- a/dist/common/main-D7BIypEq.js +++ b/dist/common/main-D2ZjkFcD.js @@ -1,47 +1,47 @@ -var vn = Object.defineProperty; -var Cn = (e, t, n) => t in e ? vn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; -var V = (e, t, n) => (Cn(e, typeof t != "symbol" ? t + "" : t, n), n), Wt = (e, t, n) => { +var Rn = Object.defineProperty; +var kn = (e, t, n) => t in e ? Rn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; +var F = (e, t, n) => (kn(e, typeof t != "symbol" ? t + "" : t, n), n), Zt = (e, t, n) => { if (!t.has(e)) throw TypeError("Cannot " + n); }; -var u = (e, t, n) => (Wt(e, t, "read from private field"), n ? n.call(e) : t.get(e)), R = (e, t, n) => { +var u = (e, t, n) => (Zt(e, t, "read from private field"), n ? n.call(e) : t.get(e)), R = (e, t, n) => { if (t.has(e)) throw TypeError("Cannot add the same private member more than once"); t instanceof WeakSet ? t.add(e) : t.set(e, n); -}, x = (e, t, n, s) => (Wt(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n); -var Xe = (e, t, n, s) => ({ +}, U = (e, t, n, s) => (Zt(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n); +var He = (e, t, n, s) => ({ set _(r) { - x(e, t, r, n); + U(e, t, r, n); }, get _() { return u(e, t, s); } }); -import f from "lodash"; -import He from "axios"; -import v, { useMemo as le, useEffect as N, useRef as K, useState as k, useCallback as _, useContext as De, useLayoutEffect as Rn, useId as kn } from "react"; -import bt from "ff-request"; -import Fn from "https://assets.fsdpf.net/js/esm/spark-md5@3_0_2.min.js?url"; -import { jsx as d, jsxs as w, Fragment as Vn } from "react/jsx-runtime"; -import { QuestionOutlined as Ln, LoadingOutlined as Nn, createFromIconfontCN as In } from "@ant-design/icons"; -import Z from "classnames"; -import { P as S } from "./vender-B-S-5jfg.js"; -import Be, { Field as xt, FieldContext as En } from "rc-field-form"; -import { notification as Ut, Drawer as Pn, Modal as Wn, Form as Ye, ConfigProvider as Dt, Input as wn, Breadcrumb as Zn, Tree as Tn, Pagination as Gn, Table as Sn, Empty as $n, Popconfirm as zn, Tooltip as On, Button as xn, Popover as Un } from "antd"; -import { flushSync as Dn } from "react-dom"; -import wt from "immutability-helper"; -import { useParams as jn, generatePath as Xn, Navigate as Hn, createBrowserRouter as Bn } from "react-router-dom"; -const vt = ({ type: e, className: t, ...n }) => { +import d from "lodash"; +import Be from "axios"; +import v, { useMemo as le, useEffect as L, useRef as K, useState as k, useCallback as _, useContext as De, useLayoutEffect as Fn, useId as Vn } from "react"; +import vt from "ff-request"; +import Ln from "https://assets.fsdpf.net/js/esm/spark-md5@3_0_2.min.js?url"; +import { jsx as f, jsxs as Z, Fragment as Nn } from "react/jsx-runtime"; +import { QuestionOutlined as In, LoadingOutlined as wn, createFromIconfontCN as En } from "@ant-design/icons"; +import T from "classnames"; +import { P as S, N as Ye } from "./vender-CijlkmMW.js"; +import Ke, { Field as Dt, FieldContext as Wn } from "rc-field-form"; +import { notification as Xt, Drawer as Pn, Modal as Zn, Form as Me, ConfigProvider as jt, Input as Tn, Breadcrumb as Gn, Tree as Sn, Pagination as $n, Table as zn, Empty as On, Popconfirm as xn, Tooltip as Un, Button as Dn, Popover as Xn } from "antd"; +import { flushSync as jn } from "react-dom"; +import Tt from "immutability-helper"; +import { useParams as Hn, generatePath as Bn, Navigate as Yn, createBrowserRouter as Kn } from "react-router-dom"; +const Ct = ({ type: e, className: t, ...n }) => { if (!(e != null && e.startsWith("icon-"))) - return /* @__PURE__ */ d(Ln, {}); + return /* @__PURE__ */ f(In, {}); if (e === "icon-loading") - return /* @__PURE__ */ d(Nn, { className: t, ...n }); - const s = le(() => In({ scriptUrl: we.get("Common.ICONFONT", []) }), [we.get("Common.ICONFONT")]); - return /* @__PURE__ */ d(s, { type: e, className: Z("iconfont", t), ...n }); -}, Yn = ({ className: e, title: t, content: n, icon: s, $close: r, category: o, duration: i = 4.5 }) => { - const [a, l] = Ut.useNotification(); - return N(() => { - a[o || "open"]({ + return /* @__PURE__ */ f(wn, { className: t, ...n }); + const s = le(() => En({ scriptUrl: Pe.get("Common.ICONFONT", []) }), [Pe.get("Common.ICONFONT")]); + return /* @__PURE__ */ f(s, { type: e, className: T("iconfont", t), ...n }); +}, Mn = ({ className: e, title: t, content: n, icon: s, $close: r, category: o, duration: i = 4.5 }) => { + const [c, l] = Xt.useNotification(); + return L(() => { + c[o || "open"]({ className: e, message: t, description: n, @@ -50,47 +50,47 @@ const vt = ({ type: e, className: t, ...n }) => { onClose: () => r(!1) }); }, [t, n, s]), l; -}, Kn = ({ className: e, title: t, content: n, okText: s, $close: r, duration: o = 5e3 }) => { - var c; - const i = K(), [a, l] = k(); - return N(() => (a > 0 && (i.current = setTimeout(() => { - a <= 1 ? r() : l((p) => p - 1); - }, 1e3)), () => clearTimeout(i.current)), [a]), N(() => { +}, An = ({ className: e, title: t, content: n, okText: s, $close: r, duration: o = 5e3 }) => { + var a; + const i = K(), [c, l] = k(); + return L(() => (c > 0 && (i.current = setTimeout(() => { + c <= 1 ? r() : l((p) => p - 1); + }, 1e3)), () => clearTimeout(i.current)), [c]), L(() => { l(Math.max(Math.ceil(o / 1e3), 0)); - }, [o]), /* @__PURE__ */ d("div", { className: Z("ff-confirm", e), onClick: (p) => p.mpEvent.currentTarget.id === p.mpEvent.target.id && r(), children: /* @__PURE__ */ w("div", { className: "ff-confirm-container", children: [ - /* @__PURE__ */ d("div", { className: "ff-confirm-title", children: t }), - /* @__PURE__ */ d("div", { className: "ff-confirm-content", children: n }), - /* @__PURE__ */ w("div", { className: "ff-confirm-operations", children: [ - /* @__PURE__ */ w("div", { className: "ff-confirm-cancel", onClick: () => r(!1), children: [ + }, [o]), /* @__PURE__ */ f("div", { className: T("ff-confirm", e), onClick: (p) => p.mpEvent.currentTarget.id === p.mpEvent.target.id && r(), children: /* @__PURE__ */ Z("div", { className: "ff-confirm-container", children: [ + /* @__PURE__ */ f("div", { className: "ff-confirm-title", children: t }), + /* @__PURE__ */ f("div", { className: "ff-confirm-content", children: n }), + /* @__PURE__ */ Z("div", { className: "ff-confirm-operations", children: [ + /* @__PURE__ */ Z("div", { className: "ff-confirm-cancel", onClick: () => r(!1), children: [ "取消 (", - a, + c, ")" ] }), v.isValidElement(s) ? v.cloneElement(s, { onClick: () => r(!0), - className: Z("ff-confirm-ok", (c = s.props) == null ? void 0 : c.className) - }) : /* @__PURE__ */ d("div", { className: "ff-confirm-ok", onClick: () => r(!0), children: s || "确定" }) + className: T("ff-confirm-ok", (a = s.props) == null ? void 0 : a.className) + }) : /* @__PURE__ */ f("div", { className: "ff-confirm-ok", onClick: () => r(!0), children: s || "确定" }) ] }) ] }) }); -}, je = v.createContext({ +}, Xe = v.createContext({ ele: {}, mount: () => { }, unmount: () => { } -}), Y = ({ className: e, children: t, actions: n, title: s, subTitle: r, extras: o, style: i }) => (n && Y.Action({ children: n }), s && Y.Title({ children: s }), r && Y.SubTitle({ children: r }), o && Y.Extra({ children: o }), /* @__PURE__ */ d("div", { className: Z("ff-container", e), style: i, children: t })), it = (e) => ({ children: t, className: n }) => { - const { mount: s, unmount: r } = v.useContext(je); - return N(() => (s(e, v.createElement("div", { +}), Y = ({ className: e, children: t, actions: n, title: s, subTitle: r, extras: o, style: i }) => (n && Y.Action({ children: n }), s && Y.Title({ children: s }), r && Y.SubTitle({ children: r }), o && Y.Extra({ children: o }), /* @__PURE__ */ f("div", { className: T("ff-container", e), style: i, children: t })), ct = (e) => ({ children: t, className: n }) => { + const { mount: s, unmount: r } = v.useContext(Xe); + return L(() => (s(e, v.createElement("div", { key: `ff-${e}`, - className: Z(`ff-popup-${e}`, n) + className: T(`ff-popup-${e}`, n) }, t)), () => r(e)), [n, t]), null; }; -Y.Action = it("actions"); -Y.Title = it("title"); -Y.SubTitle = it("sub-title"); -Y.Extra = it("extras"); -const er = ({ name: e }) => { - const { ele: t } = v.useContext(je); +Y.Action = ct("actions"); +Y.Title = ct("title"); +Y.SubTitle = ct("sub-title"); +Y.Extra = ct("extras"); +const nr = ({ name: e }) => { + const { ele: t } = v.useContext(Xe); return t == null ? void 0 : t[e]; }; Y.propTypes = { @@ -110,142 +110,144 @@ Y.propTypes = { Y.defaultProps = { style: {} }; -const Mn = v.forwardRef(({ $close: e, children: t, className: n, title: s, ...r }, o) => { - const i = K(), [a, l] = k(!0), [c, p] = k({}), g = _((h, y) => p((b) => ({ ...b, [h]: y })), []), m = _((h) => p((y) => ({ ...y, [h]: void 0 })), []); +const Jn = v.forwardRef(({ $close: e, children: t, className: n, title: s, ...r }, o) => { + const i = K(), [c, l] = k(!0), [a, p] = k({}), g = _((h, y) => p((b) => ({ ...b, [h]: y })), []), m = _((h) => p((y) => ({ ...y, [h]: void 0 })), []); return v.useImperativeHandle(o, () => ({ handleClose: (h) => { i.current = h, l(!1); } - })), /* @__PURE__ */ d(je.Provider, { value: { ele: c, mount: g, unmount: m }, children: /* @__PURE__ */ d( + })), /* @__PURE__ */ f(Xe.Provider, { value: { ele: a, mount: g, unmount: m }, children: /* @__PURE__ */ f( Pn, { ...r, - title: s || (c == null ? void 0 : c.title), - open: a, - onClose: () => l(!1), + title: s || (a == null ? void 0 : a.title), + open: c, + onClose: () => { + i.current = !1, l(!1); + }, afterOpenChange: (h) => !h && e(i.current), - className: Z("ff-popup ff-drawer", n, c == null ? void 0 : c.className), - extra: c == null ? void 0 : c["sub-title"], + className: T("ff-popup ff-drawer", n, a == null ? void 0 : a.className), + extra: a == null ? void 0 : a["sub-title"], classNames: { header: "ff-popup-header", footer: "ff-popup-footer" }, - footer: c != null && c.extras || c != null && c.actions ? /* @__PURE__ */ w(v.Fragment, { children: [ - (c == null ? void 0 : c.extras) || /* @__PURE__ */ d("div", { className: "ff-popup-extras" }), - (c == null ? void 0 : c.actions) || /* @__PURE__ */ d("div", { className: "ff-popup-actions" }) + footer: a != null && a.extras || a != null && a.actions ? /* @__PURE__ */ Z(v.Fragment, { children: [ + (a == null ? void 0 : a.extras) || /* @__PURE__ */ f("div", { className: "ff-popup-extras" }), + (a == null ? void 0 : a.actions) || /* @__PURE__ */ f("div", { className: "ff-popup-actions" }) ] }) : void 0, children: t } ) }); -}), An = v.forwardRef(({ $close: e, children: t, className: n, title: s, ...r }, o) => { - const i = K(), [a, l] = k(!0), [c, p] = k({}), g = _((h, y) => p((b) => ({ ...b, [h]: y })), []), m = _((h) => p((y) => ({ ...y, [h]: void 0 })), []); +}), Qn = v.forwardRef(({ $close: e, children: t, className: n, title: s, ...r }, o) => { + const i = K(), [c, l] = k(!0), [a, p] = k({}), g = _((h, y) => p((b) => ({ ...b, [h]: y })), []), m = _((h) => p((y) => ({ ...y, [h]: void 0 })), []); return v.useImperativeHandle(o, () => ({ handleClose: (h) => { i.current = h, l(!1); } - })), /* @__PURE__ */ d(je.Provider, { value: { ele: c, mount: g, unmount: m }, children: /* @__PURE__ */ d( - Wn, + })), /* @__PURE__ */ f(Xe.Provider, { value: { ele: a, mount: g, unmount: m }, children: /* @__PURE__ */ f( + Zn, { ...r, - title: /* @__PURE__ */ w(Vn, { children: [ - s || (c == null ? void 0 : c.title), - c == null ? void 0 : c["sub-title"] + title: /* @__PURE__ */ Z(Nn, { children: [ + s || (a == null ? void 0 : a.title), + a == null ? void 0 : a["sub-title"] ] }), - open: a, + open: c, onCancel: () => { - i.current = Promise.reject(!1), l(!1); + i.current = !1, l(!1); }, afterOpenChange: (h) => !h && e(i.current), - className: Z("ff-popup ff-modal", n, c == null ? void 0 : c.className), + className: T("ff-popup ff-modal", n, a == null ? void 0 : a.className), keyboard: !0, classNames: { header: "ff-popup-header", footer: "ff-popup-footer" }, - footer: c != null && c.extras || c != null && c.actions ? /* @__PURE__ */ w(v.Fragment, { children: [ - (c == null ? void 0 : c.extras) || /* @__PURE__ */ d("div", { className: "ff-popup-extras" }), - (c == null ? void 0 : c.actions) || /* @__PURE__ */ d("div", { className: "ff-popup-actions" }) + footer: a != null && a.extras || a != null && a.actions ? /* @__PURE__ */ Z(v.Fragment, { children: [ + (a == null ? void 0 : a.extras) || /* @__PURE__ */ f("div", { className: "ff-popup-extras" }), + (a == null ? void 0 : a.actions) || /* @__PURE__ */ f("div", { className: "ff-popup-actions" }) ] }) : null, children: t } ) }); }); -var pe, ae, Ee, et; +var fe, ae, we, nt; const ee = class ee { constructor() { R(this, ae, null); - R(this, Ee, /* @__PURE__ */ new Map()); - R(this, et, () => { + R(this, we, /* @__PURE__ */ new Map()); + R(this, nt, () => { if (u(this, ae)) return u(this, ae).port.postMessage({ command: "status", data: [] }); - x(this, ae, new SharedWorker(new URL("data:text/plain;base64,Y29uc3QgcG9ydHMgPSBbXQpsZXQgd3MgPSBudWxsCgpmdW5jdGlvbiBpbml0V3ModXJsKSB7CiAgd3MgPSBuZXcgV2ViU29ja2V0KHVybCkKICB3cy5vbmNsb3NlID0gKGUpID0+IGNvbnNvbGUubG9nKCd3cyBjbG9zZWQnLCBlKQogIHdzLm9uZXJyb3IgPSAoZSkgPT4gY29uc29sZS5sb2coJ3dzIGVycm9yJywgZSkKICB3cy5vbm1lc3NhZ2UgPSAoeyBkYXRhIH0pID0+IHsKICAgIGNvbnN0IHZhbHVlID0gSlNPTi5wYXJzZShkYXRhKQogICAgcG9ydHMuZm9yRWFjaChwb3J0ID0+IHBvcnQucG9zdE1lc3NhZ2UodmFsdWUpKQogIH0KfQoKZnVuY3Rpb24gY2xvc2VXcygpIHsKICBpZiAoIXdzIHx8IHdzLnJlYWR5U3RhdGUgPT0gV2ViU29ja2V0Lk9QRU4pIHsKICAgIHdzLmNsb3NlKCkKICB9Cn0KCmZ1bmN0aW9uIHN0YXR1cygpIHsKICB0aGlzLnBvc3RNZXNzYWdlKHsgcmVhZHlTdGF0ZTogd3MgPyB3cy5yZWFkeVN0YXRlIDogV2ViU29ja2V0LkNMT1NFRCB9KQp9CgpzZWxmLm9uY29ubmVjdCA9IChlKSA9PiB7CiAgY29uc3QgcG9ydCA9IGUucG9ydHNbMF07CgogIHBvcnQub25tZXNzYWdlID0gKHsgZGF0YTogeyBjb21tYW5kLCBkYXRhIH0gfSkgPT4gewogICAgaWYgKGNvbW1hbmQgJiYgWydpbml0V3MnLCAnY2xvc2VXcycsICdzdGF0dXMnXS5pbmNsdWRlcyhjb21tYW5kKSkgUmVmbGVjdC5hcHBseShzZWxmPy5bY29tbWFuZF0sIHBvcnQsIGRhdGEgfHwgW10pCiAgfQoKICBwb3J0cy5wdXNoKHBvcnQpCn0K", self.location))), u(this, ae).port.onmessage = (t) => { + U(this, ae, new SharedWorker(new URL("data:text/plain;base64,Y29uc3QgcG9ydHMgPSBbXQpsZXQgd3MgPSBudWxsCgpmdW5jdGlvbiBpbml0V3ModXJsKSB7CiAgd3MgPSBuZXcgV2ViU29ja2V0KHVybCkKICB3cy5vbmNsb3NlID0gKGUpID0+IGNvbnNvbGUubG9nKCd3cyBjbG9zZWQnLCBlKQogIHdzLm9uZXJyb3IgPSAoZSkgPT4gY29uc29sZS5sb2coJ3dzIGVycm9yJywgZSkKICB3cy5vbm1lc3NhZ2UgPSAoeyBkYXRhIH0pID0+IHsKICAgIGNvbnN0IHZhbHVlID0gSlNPTi5wYXJzZShkYXRhKQogICAgcG9ydHMuZm9yRWFjaChwb3J0ID0+IHBvcnQucG9zdE1lc3NhZ2UodmFsdWUpKQogIH0KfQoKZnVuY3Rpb24gY2xvc2VXcygpIHsKICBpZiAoIXdzIHx8IHdzLnJlYWR5U3RhdGUgPT0gV2ViU29ja2V0Lk9QRU4pIHsKICAgIHdzLmNsb3NlKCkKICB9Cn0KCmZ1bmN0aW9uIHN0YXR1cygpIHsKICB0aGlzLnBvc3RNZXNzYWdlKHsgcmVhZHlTdGF0ZTogd3MgPyB3cy5yZWFkeVN0YXRlIDogV2ViU29ja2V0LkNMT1NFRCB9KQp9CgpzZWxmLm9uY29ubmVjdCA9IChlKSA9PiB7CiAgY29uc3QgcG9ydCA9IGUucG9ydHNbMF07CgogIHBvcnQub25tZXNzYWdlID0gKHsgZGF0YTogeyBjb21tYW5kLCBkYXRhIH0gfSkgPT4gewogICAgaWYgKGNvbW1hbmQgJiYgWydpbml0V3MnLCAnY2xvc2VXcycsICdzdGF0dXMnXS5pbmNsdWRlcyhjb21tYW5kKSkgUmVmbGVjdC5hcHBseShzZWxmPy5bY29tbWFuZF0sIHBvcnQsIGRhdGEgfHwgW10pCiAgfQoKICBwb3J0cy5wdXNoKHBvcnQpCn0K", self.location))), u(this, ae).port.onmessage = (t) => { var n, s; - (n = t.data) != null && n.uuid ? u(this, Ee).forEach((r, o) => { + (n = t.data) != null && n.uuid ? u(this, we).forEach((r, o) => { var i; (r == "*" || (i = r == null ? void 0 : r.includes) != null && i.call(r, t.data.uuid)) && o(t.data); }) : ((s = t.data) == null ? void 0 : s.readyState) == WebSocket.CLOSED && I.get("/api/user-api-token").then(({ token: r, expire_at: o }) => { - u(this, ae).port.postMessage({ command: "initWs", data: [`ws${f.trimStart(Nt, "http")}api/user-resource-status-ws?token=${r}`] }); + u(this, ae).port.postMessage({ command: "initWs", data: [`ws${d.trimStart(It, "http")}api/user-resource-status-ws?token=${r}`] }); }); }, u(this, ae).port.postMessage({ command: "status", data: [] }); }); - V(this, "subscribe", (t, n = []) => (n ? Array.isArray(n) && n.length == 0 ? n = "*" : Array.isArray(n) || (n = [n].flat()) : n = "*", u(this, Ee).set(t, n), u(this, Ee).size == 1 && u(this, et).call(this), () => this.unsubscribe(t))); - V(this, "unsubscribe", (t) => u(this, Ee).delete(t)); - if (u(ee, pe)) - return u(ee, pe); + F(this, "subscribe", (t, n = []) => (n ? Array.isArray(n) && n.length == 0 ? n = "*" : Array.isArray(n) || (n = [n].flat()) : n = "*", u(this, we).set(t, n), u(this, we).size == 1 && u(this, nt).call(this), () => this.unsubscribe(t))); + F(this, "unsubscribe", (t) => u(this, we).delete(t)); + if (u(ee, fe)) + return u(ee, fe); } }; -pe = new WeakMap(), ae = new WeakMap(), Ee = new WeakMap(), et = new WeakMap(), R(ee, pe, null), V(ee, "getInstance", () => (u(ee, pe) || x(ee, pe, new ee()), u(ee, pe))); -let dt = ee; -const jt = dt.getInstance(), Xt = () => { +fe = new WeakMap(), ae = new WeakMap(), we = new WeakMap(), nt = new WeakMap(), R(ee, fe, null), F(ee, "getInstance", () => (u(ee, fe) || U(ee, fe, new ee()), u(ee, fe))); +let ft = ee; +const Ht = ft.getInstance(), Bt = () => { const e = K(!0), [t, n] = k(0); - return N(() => () => e.current = !1, []), () => e.current && Dn(() => { + return L(() => () => e.current = !1, []), () => e.current && jn(() => { n(t + 1); }); -}, tr = ({ value: e, defaultValue: t, onChange: n }) => { - const s = Xt(), r = K(e !== void 0 ? e : t); +}, sr = ({ value: e, defaultValue: t, onChange: n }) => { + const s = Bt(), r = K(e !== void 0 ? e : t); e !== void 0 && (r.current = e); - const o = _(f.debounce((i) => { + const o = _(d.debounce((i) => { e === void 0 && (r.current = i, s()), n && n(i); }, 380, { leading: !0, trailing: !1 }), [e]); return [r.current, o]; -}, Zt = (e) => { +}, Gt = (e) => { const t = K(); - return N(() => { + return L(() => { t.current = e; }), t.current; -}, Jn = (e) => { +}, qn = (e) => { const t = K(), [n, s] = k(e); - return N(() => { - f.isFunction(t.current) && t.current(n); + return L(() => { + d.isFunction(t.current) && t.current(n); }, [n]), [n, function(r, o) { t.current = o, s(r); }]; -}, at = (e = v.EffectCallback, t, n = f.isEqual) => { +}, lt = (e = v.EffectCallback, t, n = d.isEqual) => { const s = v.useRef(t); (!s.current || !n(t, s.current)) && (s.current = t), v.useEffect(e, [s.current]); -}, Ht = (e, t = "string") => { +}, Yt = (e, t = "string") => { var n; if (!Array.isArray(e)) return e; for (let s = 0; s < e.length; s++) - e[s].value = f.toPrimitive((n = e[s]) == null ? void 0 : n.value, t), e[s] && Reflect.has(e[s], "children") && (e[s].children = Ht(e[s].children, t)); + e[s].value = d.toPrimitive((n = e[s]) == null ? void 0 : n.value, t), e[s] && Reflect.has(e[s], "children") && (e[s].children = Yt(e[s].children, t)); return e; -}, nr = (e, t = "json", n = "string", s, r = null) => { - const [o] = Be.useForm(s), [i, a] = k([{ label: "无", value: "", disabled: !0 }]), l = K([]), c = Be.useWatch((p) => l.current.length === 0 ? null : f.pick(p, l.current), o) || null; - return N(() => { - Array.isArray(e) ? a(e) : t === "javascript" && e ? Fe.exec(e, {}, { +}, rr = (e, t = "json", n = "string", s, r = null) => { + const [o] = Ke.useForm(s), [i, c] = k([{ label: "无", value: "", disabled: !0 }]), l = K([]), a = Ke.useWatch((p) => l.current.length === 0 ? null : d.pick(p, l.current), o) || null; + return L(() => { + Array.isArray(e) ? c(e) : t === "javascript" && e ? ke.exec(e, {}, { getFieldValue: (p) => (l.current.includes(p) || l.current.push(p), o.getFieldValue(p)), getFieldValueForBasicForm: (p) => (l.current.includes(p) || l.current.push(p), r ? r.getFieldValue(p) : o.getFieldValue(p)) }).then((p) => { - a(f.toPrimitive(p, "array")); - }) : e && a(f.toPrimitive(e, "array")); - }, [e, t, c]), Ht(i, n); -}, sr = (e) => { + c(d.toPrimitive(p, "array")); + }) : e && c(d.toPrimitive(e, "array")); + }, [e, t, a]), Yt(i, n); +}, or = (e) => { const [t, n] = k(), s = { type: "GET" }; - if (typeof e == "string" ? s.url = e : f.isPlainObject(e) && Object.assign(s, e), !(s != null && s.url)) + if (typeof e == "string" ? s.url = e : d.isPlainObject(e) && Object.assign(s, e), !(s != null && s.url)) throw "url is required"; const r = (o) => I.request(s, !1).resp((i) => (console.log("useSubscribeRequest", o), n(i), i)); - return at(() => { + return lt(() => { let o = null; return r().then((i) => { - o = jt.subscribe(f.throttle(r, 180, { leading: !1, trailing: !0 }), i.res); + o = Ht.subscribe(d.throttle(r, 180, { leading: !1, trailing: !0 }), i.res); }), () => o == null ? void 0 : o(); }, s), t; -}, Qn = (e) => { +}, _n = (e) => { const [t, n] = v.useState({ gridItems: [], hideItems: [] }); return v.useEffect(() => { e && I.get(`/api/_/${e}`).then(({ @@ -253,25 +255,25 @@ const jt = dt.getInstance(), Xt = () => { uuid: r, code: o, resource: i, - align: a, + align: c, listenChangeFields: l, - listenChangeFieldsFunc: c, + listenChangeFieldsFunc: a, fields: p }) => ({ pk: s, uuid: r, code: o, resource: i, - align: a, + align: c, listenChangeFields: l, - listenChangeFieldsFunc: c, + listenChangeFieldsFunc: a, ...p.reduce((g, m) => { var h; return (h = m == null ? void 0 : m.field) != null && h.hidden ? g.hides.push(m == null ? void 0 : m.field) : g.items.push(m), g; }, { items: [], hides: [] }) })).then(n); }, [e]), t; -}, qn = ({ +}, es = ({ max: e = 0, min: t = 0, type: n = "", @@ -279,9 +281,9 @@ const jt = dt.getInstance(), Xt = () => { pattern: r, required: o = !1, validator: i -} = {}, a, l) => { - const [c, p] = k([]); - return N(() => { +} = {}, c, l) => { + const [a, p] = k([]); + return L(() => { const g = []; if (o) { let m = l; @@ -314,47 +316,47 @@ const jt = dt.getInstance(), Xt = () => { case "validator": i && g.push(({ getFieldValue: m }) => ({ validator: async (h, y) => { - const b = await Fe.exec(i, { value: y, fieldName: a }, { getFieldValue: m }); - return f.isString(b) && b ? Promise.reject(b) : f.isBoolean(b) && !b ? Promise.reject(s) : Promise.resolve(); + const b = await ke.exec(i, { value: y, fieldName: c }, { getFieldValue: m }); + return d.isString(b) && b ? Promise.reject(b) : d.isBoolean(b) && !b ? Promise.reject(s) : Promise.resolve(); } })); break; } p(g); - }, [e, t, n, s, r, o, i]), c; -}, _n = (e, t, n) => { + }, [e, t, n, s, r, o, i]), a; +}, ts = (e, t, n) => { const [s, r] = k(null); - return N(() => { + return L(() => { const { initDataUri: o = `/api/${e}`, initDataMethod: i = "GET" } = n || {}; t && I.request({ method: i, - url: f.trimEnd(`${o}/${t}`, "/") - }).then((a) => { - r(a); + url: d.trimEnd(`${o}/${t}`, "/") + }).then((c) => { + r(c); }); }, [e, t, n]), s; -}, es = (e, t, n, s = {}) => { - const r = Xt(), o = K(!0), i = K([]), [a, l] = k(n), c = Be.useWatch((p) => JSON.stringify(f.pick(p, i.current)), t) || "{}"; - return N(() => { - e && Fe.exec(e, s, { - getFieldValue: f.wrap(t.getFieldValue, (p, g) => (i.current.some((m) => f.isEqual(m, g)) || (i.current.push(g), r()), p(g))), +}, ns = (e, t, n, s = {}) => { + const r = Bt(), o = K(!0), i = K([]), [c, l] = k(n), a = Ke.useWatch((p) => JSON.stringify(d.pick(p, i.current)), t) || "{}"; + return L(() => { + e && ke.exec(e, s, { + getFieldValue: d.wrap(t.getFieldValue, (p, g) => (i.current.some((m) => d.isEqual(m, g)) || (i.current.push(g), r()), p(g))), isFieldTouched: t.isFieldTouched, isFieldsTouched: t.isFieldsTouched }).then((p) => o.current && l(p)); - }, [e, c, t, s]), N(() => () => o.current = !1, []), a; -}, ts = (e) => ({ + }, [e, a, t, s]), L(() => () => o.current = !1, []), c; +}, ss = (e) => ({ code: t, layout: n, name: s, primaryKey: r = 0, style: o = {}, formProps: i = {}, - form: a, + form: c, isPreview: l = !1, - className: c, + className: a, onFinish: p, onValuesChange: g = () => { }, @@ -364,57 +366,57 @@ const jt = dt.getInstance(), Xt = () => { align: h, autoComplete: y, resource: b, - items: F, - hides: E, - rowHeight: T, - marginX: $, + items: N, + hides: w, + rowHeight: $, + marginX: E, marginY: Q, listenChangeFields: M, listenChangeFieldsFunc: G, - pk: P, + pk: W, uuid: z - } = Qn(t), [U] = Ye.useForm(a), D = ({ - changedValues: j, - allValues: O, - listenChangeFields: _e, - listenChangeFieldsFunc: ue, - onValuesChange: ct, + } = _n(t), [O] = Me.useForm(c), D = ({ + changedValues: X, + allValues: x, + listenChangeFields: ut, + listenChangeFieldsFunc: je, + onValuesChange: Fe, code: Et }) => { - ct(j, O), ue && Array.isArray(_e) && Fe.exec( - ue, - { changedValues: j, allValues: O }, + Fe(X, x), je && Array.isArray(ut) && ke.exec( + je, + { changedValues: X, allValues: x }, { - getFieldValue: U.getFieldValue, - setFieldsValue: U.setFieldsValue, - isFieldTouched: U.isFieldTouched, - isFieldsTouched: U.isFieldsTouched + getFieldValue: O.getFieldValue, + setFieldsValue: O.setFieldsValue, + isFieldTouched: O.isFieldTouched, + isFieldsTouched: O.isFieldsTouched } ); }, oe = le(() => [ - { name: "__PK__", value: P }, + { name: "__PK__", value: W }, { name: "__PROPS__", value: i }, { name: "__RESOURCE__", value: b }, { name: "__LAYOUT_KEY__", value: t }, { name: "__LAYOUT_UUID__", value: z }, { name: "__PRIMARY_KEY__", value: r } - ], [P, t, z, b, r, i]); - return /* @__PURE__ */ w( - Ye, + ], [W, t, z, b, r, i]); + return /* @__PURE__ */ Z( + Me, { - className: c, + className: a, requiredMark: !0, name: s || t, layout: n || h, fields: oe, - form: U, + form: O, autoComplete: y, style: { ...o, position: "relative" }, onFinish: p, - onValuesChange: (j, O) => D( + onValuesChange: (X, x) => D( { - changedValues: j, - allValues: O, + changedValues: X, + allValues: x, listenChangeFields: M, listenChangeFieldsFunc: G, onValuesChange: g, @@ -422,54 +424,54 @@ const jt = dt.getInstance(), Xt = () => { } ), children: [ - /* @__PURE__ */ d( + /* @__PURE__ */ f( e, { ...m, - form: U, + form: O, code: t, - fields: F, - rowHeight: T, - marginX: $, + fields: N, + rowHeight: $, + marginX: E, marginY: Q } ), - E == null ? void 0 : E.map((j) => { - var O; - return /* @__PURE__ */ d(xt, { name: j.code, children: /* @__PURE__ */ d( - ns, + w == null ? void 0 : w.map((X) => { + var x; + return /* @__PURE__ */ f(Dt, { name: X.code, children: /* @__PURE__ */ f( + rs, { - form: U, - name: j.code, - type: j.type, - initialValue: j.initialValue, - initialValueLanguage: (O = j.extras) == null ? void 0 : O.initialValueLanguage + form: O, + name: X.code, + type: X.type, + initialValue: X.initialValue, + initialValueLanguage: (x = X.extras) == null ? void 0 : x.initialValueLanguage } - ) }, JSON.stringify(j.code)); + ) }, JSON.stringify(X.code)); }) ] } ); -}, ns = ({ type: e, initialValue: t, initialValueLanguage: n, onChange: s, form: r }) => { - const o = es( +}, rs = ({ type: e, initialValue: t, initialValueLanguage: n, onChange: s, form: r }) => { + const o = ns( n == "javascript" && t, r, n == "javascript" ? void 0 : t, {} ); - return N(() => { - n == "javascript" ? s(f.toPrimitive(o, e)) : s(f.toPrimitive(t, e)); + return L(() => { + n == "javascript" ? s(d.toPrimitive(o, e)) : s(d.toPrimitive(t, e)); }, [e, t, o]), null; -}, ss = (e) => function({ code: n, data: s, ...r }) { +}, os = (e) => function({ code: n, data: s, ...r }) { const [o, i] = k({ resource: null, cols: 12, rowHeight: 21, fields: [] }); - return N(() => { - n && I.get(`/api/_/${n}`).then((a) => i(f.pick(a, ["resource", "cols", "rowHeight", "fields"]))); - }, [n]), (o == null ? void 0 : o.resource) && /* @__PURE__ */ d( + return L(() => { + n && I.get(`/api/_/${n}`).then((c) => i(d.pick(c, ["resource", "cols", "rowHeight", "fields"]))); + }, [n]), (o == null ? void 0 : o.resource) && /* @__PURE__ */ f( e, { ...r, @@ -479,28 +481,28 @@ const jt = dt.getInstance(), Xt = () => { data: o != null && o.resource ? { [o == null ? void 0 : o.resource]: s } : {} } ); -}, rs = "RC_FORM_INTERNAL_HOOKS", Bt = (e, { +}, is = "RC_FORM_INTERNAL_HOOKS", Kt = (e, { initialValue: t, initialValueLanguage: n, convertJs: s, convertJsSetting: r, type: o = "string" }, i = null) => { - const a = K(!1), l = De(En), [c, p] = k(), [g, m] = k(n == "javascript" || !e ? void 0 : l.getFieldValue(e)), { registerWatch: h } = l.getInternalHooks(rs) || {}; - return N(() => h == null ? void 0 : h((y, b, F) => { - if (!a.current) + const c = K(!1), l = De(Wn), [a, p] = k(), [g, m] = k(n == "javascript" || !e ? void 0 : l.getFieldValue(e)), { registerWatch: h } = l.getInternalHooks(is) || {}; + return L(() => h == null ? void 0 : h((y, b, N) => { + if (!c.current) return; - const E = f.get(b, e); - f.isEqual(E, g) || m(f.toPrimitive(E, o)); - }), [g]), N(() => { - n == "javascript" && t ? Fe.exec(t, {}, { + const w = d.get(b, e); + d.isEqual(w, g) || m(d.toPrimitive(w, o)); + }), [g]), L(() => { + n == "javascript" && t ? ke.exec(t, {}, { getFieldValueForBasicForm: (y) => i ? i.getFieldValue(y) : l.getFieldValue(y), getFieldValue: (y) => l.getFieldValue(y) - }).then((y) => m(f.toPrimitive(y, o))).catch((y) => notification.error({ message: `布局数据错误: ${JSON.stringify(y)}` })).finally(() => a.current = !0) : (t && m(f.toPrimitive(t ?? l.getFieldValue(e), o)), a.current = !0); - }, [t, n]), at(() => { - a.current && s && J.getWidgetComponent(s).then(({ default: y }) => y({ value: g, record: l.getFieldsValue(!0), $setting: r })).then(p).catch((y) => console.error("布局数据转换错误: ", y, s)); - }, [g, s, r]), [c || g, g]; -}, os = (e, t, n, s, r, o) => { + }).then((y) => m(d.toPrimitive(y, o))).catch((y) => notification.error({ message: `布局数据错误: ${JSON.stringify(y)}` })).finally(() => c.current = !0) : (t && m(d.toPrimitive(t ?? l.getFieldValue(e), o)), c.current = !0); + }, [t, n]), lt(() => { + c.current && s && J.getWidgetComponent(s).then(({ default: y }) => y({ value: g, record: l.getFieldsValue(!0), $setting: r })).then(p).catch((y) => console.error("布局数据转换错误: ", y, s)); + }, [g, s, r]), [a || g, g]; +}, as = (e, t, n, s, r, o) => { const i = { "--grid-layout-h": `${s}`, "--grid-layout-w": `${n}`, @@ -508,18 +510,18 @@ const jt = dt.getInstance(), Xt = () => { "--grid-layout-y": `${t}`, "--grid-layout-row-height-offset": "0px" }; - return r != null && r.autoHeight ? i.height = "fit-content" : i["--grid-layout-row"] = `${s}`, i["--grid-layout-box-margin"] = Tt(r == null ? void 0 : r.marginTop, r == null ? void 0 : r.marginRight, r == null ? void 0 : r.marginBottom, r == null ? void 0 : r.marginLeft), i["--grid-layout-box-padding"] = Tt(r == null ? void 0 : r.paddingTop, r == null ? void 0 : r.paddingRight, r == null ? void 0 : r.paddingBottom, r == null ? void 0 : r.paddingLeft), o && (i.height = `${o}px`), i; -}, Tt = (e, t, n, s) => `${e || 0}px ${t || 0}px ${n || 0}px ${s || 0}px`, Yt = ({ cols: e, rowHeight: t, fields: n, data: s, containerPadding: r = [0, 0], itemMargin: o = [4, 0], formProps: i = {}, className: a, ...l }) => { - const [c] = Be.useForm(), p = Kt(n, as, "@pkg/grid-layouts"), g = le(() => [ + return r != null && r.autoHeight ? i.height = "fit-content" : i["--grid-layout-row"] = `${s}`, i["--grid-layout-box-margin"] = St(r == null ? void 0 : r.marginTop, r == null ? void 0 : r.marginRight, r == null ? void 0 : r.marginBottom, r == null ? void 0 : r.marginLeft), i["--grid-layout-box-padding"] = St(r == null ? void 0 : r.paddingTop, r == null ? void 0 : r.paddingRight, r == null ? void 0 : r.paddingBottom, r == null ? void 0 : r.paddingLeft), o && (i.height = `${o}px`), i; +}, St = (e, t, n, s) => `${e || 0}px ${t || 0}px ${n || 0}px ${s || 0}px`, Mt = ({ cols: e, rowHeight: t, fields: n, data: s, containerPadding: r = [0, 0], itemMargin: o = [4, 0], formProps: i = {}, className: c, ...l }) => { + const [a] = Ke.useForm(), p = At(n, ls, "@pkg/grid-layouts"), g = le(() => [ { name: "__PROPS__", value: i } ], [i]); - return at(() => { - c.setFieldsValue(s); - }, [s]), /* @__PURE__ */ d(Be, { fields: g, form: c, component: !1, children: /* @__PURE__ */ d( + return lt(() => { + a.setFieldsValue(s); + }, [s]), /* @__PURE__ */ f(Ke, { fields: g, form: a, component: !1, children: /* @__PURE__ */ f( "div", { ...l, - className: Z("ff-grid-layout", a), + className: T("ff-grid-layout", c), style: { "--grid-layout-item-margin-y": `${(o == null ? void 0 : o[0]) || 0}px`, "--grid-layout-item-margin-x": `${(o == null ? void 0 : o[1]) || 0}px`, @@ -531,16 +533,16 @@ const jt = dt.getInstance(), Xt = () => { children: p } ) }); -}, Kt = (e, t, n = "@pkg/grid-layouts", s = null) => le(() => { +}, At = (e, t, n = "@pkg/grid-layouts", s = null) => le(() => { var r; - return (r = f.sortBy(e, ["y", "x"])) == null ? void 0 : r.map( - ({ i: o, x: i, y: a, w: l, h: c, field: { boxStyle: p, widgetPrefix: g = n, widget: m, ...h } }, y) => /* @__PURE__ */ d( + return (r = d.sortBy(e, ["y", "x"])) == null ? void 0 : r.map( + ({ i: o, x: i, y: c, w: l, h: a, field: { boxStyle: p, widgetPrefix: g = n, widget: m, ...h } }, y) => /* @__PURE__ */ f( "div", { className: "grid-layout-item", - style: os(i, a, l, c, p, m === "Height" && (h == null ? void 0 : h.initialValue)), - children: /* @__PURE__ */ d( - is, + style: as(i, c, l, a, p, m === "Height" && (h == null ? void 0 : h.initialValue)), + children: /* @__PURE__ */ f( + cs, { ...h, basicForm: s, @@ -552,103 +554,103 @@ const jt = dt.getInstance(), Xt = () => { o || y ) ); -}, [e]), is = ({ itemWidget: e, itemWidgetRender: t, basicForm: n, ...s }) => { +}, [e]), cs = ({ itemWidget: e, itemWidgetRender: t, basicForm: n, ...s }) => { const [r, o] = k(); - return N(() => { - J.getWidgetComponent(e).then(({ defaultProps: i, default: a }) => { - o(v.createElement(t(a, i, n), s)); + return L(() => { + J.getWidgetComponent(e).then(({ defaultProps: i, default: c }) => { + o(v.createElement(t(c, i, n), s)); }).catch((i) => o(e)); }, [e]), r; -}, as = (e, t, n = null) => (s) => { +}, ls = (e, t, n = null) => (s) => { const { code: r, label: o, extras: i, - isVirtual: a, + isVirtual: c, initialValue: l, - initialValueLanguage: c, + initialValueLanguage: a, convertJs: p, convertJsSetting: g, ...m - } = f.merge({}, t, s), [h, y] = Bt(a ? null : r, { + } = d.merge({}, t, s), [h, y] = Kt(c ? null : r, { initialValue: l, - initialValueLanguage: c, + initialValueLanguage: a, convertJs: p, convertJsSetting: g, type: (m == null ? void 0 : m.type) || "string" }, n); - return /* @__PURE__ */ d(e, { ...m, value: h, rawValue: y, $setting: i || {} }); -}, rr = ss(Yt), Mt = ({ widget: e, widgetPrefix: t, widgetDecorator: n, subWidgets: s, basicForm: r, ...o }) => { - const i = e != null && e.startsWith("@") ? e : `${t}/${e}`, [a, l] = k(); - return N(() => { - i && J.getWidgetComponent(i).then(({ defaultProps: c, default: p }) => ({ - default: At(p, c, r) - })).catch((c) => ({ default: () => `${c}` })).then((c) => l(v.createElement(c.default, o))); - }, [i]), a && v.cloneElement(a, o); + return /* @__PURE__ */ f(e, { ...m, value: h, rawValue: y, $setting: i || {} }); +}, ir = os(Mt), Jt = ({ widget: e, widgetPrefix: t, widgetDecorator: n, subWidgets: s, basicForm: r, ...o }) => { + const i = e != null && e.startsWith("@") ? e : `${t}/${e}`, [c, l] = k(); + return L(() => { + i && J.getWidgetComponent(i).then(({ defaultProps: a, default: p }) => ({ + default: Qt(p, a, r) + })).catch((a) => ({ default: () => `${a}` })).then((a) => l(v.createElement(a.default, o))); + }, [i]), c && v.cloneElement(c, o); }; -Mt.defaultProps = { +Jt.defaultProps = { widgetPrefix: "@pkg/grid-layout-forms", widget: "Input" }; -const At = (e, t, n = null) => (s) => { +const Qt = (e, t, n = null) => (s) => { const { type: r, code: o, label: i, - noStyle: a, + noStyle: c, placeholder: l, - extras: c, + extras: a, validators: p, help: g, isVirtual: m, initialValue: h, initialValueLanguage: y, convertJs: b, - convertJsSetting: F, - widgetPerfix: E, - boxStyle: T, - widgetDecorator: $, + convertJsSetting: N, + widgetPerfix: w, + boxStyle: $, + widgetDecorator: E, subWidgets: Q, ...M - } = { ...t, ...s }, G = qn(p || {}, o, r), P = { + } = { ...t, ...s }, G = es(p || {}, o, r), W = { label: i, - noStyle: a, + noStyle: c, colon: !1 }, z = { placeholder: l, ...M - }, U = _((D) => D == null ? void 0 : f.toPrimitive(D, r), [r]); - return /* @__PURE__ */ d( - xt, + }, O = _((D) => D == null ? void 0 : d.toPrimitive(D, r), [r]); + return /* @__PURE__ */ f( + Dt, { name: o, rules: G, - initialValue: U(h), - normalize: U, - children: (D, oe, j) => { - var O; - return /* @__PURE__ */ d( + initialValue: O(h), + normalize: O, + children: (D, oe, X) => { + var x; + return /* @__PURE__ */ f( e, { type: r, - rcform: j, + rcform: X, itemProps: { validateStatus: oe.errors.length > 0 ? "error" : "success", tooltip: g, help: oe.errors.length > 0 ? oe.errors.join("、") : null, - required: ((O = G == null ? void 0 : G[0]) == null ? void 0 : O.required) || !1, - ...P + required: ((x = G == null ? void 0 : G[0]) == null ? void 0 : x.required) || !1, + ...W }, fieldProps: { ...z, ...D }, - $setting: c || {} + $setting: a || {} } ); } } ); -}, Ct = ({ cols: e, rowHeight: t, itemMargin: n = [8, 8], containerPadding: s = [0, 0], fields: r }) => { - const o = Kt(r, At, "@pkg/grid-layout-forms"); - return /* @__PURE__ */ d(Dt, { theme: { components: { Form: { itemMarginBottom: 0 } } }, children: /* @__PURE__ */ d("div", { className: "ff-grid-layout-form", style: { +}, Rt = ({ cols: e, rowHeight: t, itemMargin: n = [8, 8], containerPadding: s = [0, 0], fields: r }) => { + const o = At(r, Qt, "@pkg/grid-layout-forms"); + return /* @__PURE__ */ f(jt, { theme: { components: { Form: { itemMarginBottom: 0 } } }, children: /* @__PURE__ */ f("div", { className: "ff-grid-layout-form", style: { "--grid-layout-item-margin-x": `${(n == null ? void 0 : n[0]) || 0}px`, "--grid-layout-item-margin-y": `${(n == null ? void 0 : n[1]) || 0}px`, "--grid-layout-container-padding-y": `${(s == null ? void 0 : s[0]) || 0}px`, @@ -657,72 +659,72 @@ const At = (e, t, n = null) => (s) => { "--grid-layout-row-height": `${t || 16}px` }, children: o }) }); }; -Ct.propTypes = { +Rt.propTypes = { fields: S.array.isRequired }; -Ct.defaultProps = { +Rt.defaultProps = { fields: [] }; -const cs = ts(Ct), Jt = ({ children: e }) => { - const [t, n] = k({}), s = _((o, i) => n((a) => ({ ...a, [o]: i })), []), r = _((o) => n((i) => ({ ...i, [o]: void 0 })), []); - return /* @__PURE__ */ d(je.Provider, { value: { ele: t, mount: s, unmount: r }, children: e }); +const us = ss(Rt), qt = ({ children: e }) => { + const [t, n] = k({}), s = _((o, i) => n((c) => ({ ...c, [o]: i })), []), r = _((o) => n((i) => ({ ...i, [o]: void 0 })), []); + return /* @__PURE__ */ f(Xe.Provider, { value: { ele: t, mount: s, unmount: r }, children: e }); }; -Jt.defaultProps = { +qt.defaultProps = { isDrawerRender: !1 }; -Jt.propTypes = { +qt.propTypes = { isDrawerRender: S.bool }; -const Qt = (e = {}, t = {}, n = {}, s = "") => f.deepSome(e, (r, o) => o === "type" && r === "code") ? qt(e, t, n, s) : _t(e, t, s), qt = async (e = {}, t = {}, n = {}, s = "") => { +const _t = (e = {}, t = {}, n = {}, s = "") => d.deepSome(e, (r, o) => o === "type" && r === "code") ? en(e, t, n, s) : tn(e, t, s), en = async (e = {}, t = {}, n = {}, s = "") => { let r = /* @__PURE__ */ Object.create(null); for (let o in e) { let i; if (Reflect.has(e[o], "type") && ["code", "field", "router", "query", "string"].includes(e[o].type)) { - const { type: a, value: l = "", default: c = s } = e[o]; - switch (a) { + const { type: c, value: l = "", default: a = s } = e[o]; + switch (c) { case "code": - i = await Fe.exec(l, t, n); + i = await ke.exec(l, t, n); break; case "field": - i = f.get(t, l) ?? f.get(t, l.substring(l.indexOf(".") + 1)); + i = d.get(t, l) ?? d.get(t, l.substring(l.indexOf(".") + 1)); break; case "router": case "query": - i = ke.getPageParams(l); + i = Re.getPageParams(l); break; case "string": i = l; } - i ?? (i = c); + i ?? (i = a); } else - i = await qt(e[o], t, n, s); - f.set(r, o, i); + i = await en(e[o], t, n, s); + d.set(r, o, i); } return r; -}, _t = (e = {}, t = {}, n = "") => Object.keys(e || {}).reduce((s, r) => { - if (f.isPlainObject(e[r])) { +}, tn = (e = {}, t = {}, n = "") => Object.keys(e || {}).reduce((s, r) => { + if (d.isPlainObject(e[r])) { let o; if (Reflect.has(e[r], "type") && ["field", "router", "query", "string"].includes(e[r].type)) { - const { type: i, value: a = "", default: l = n } = e[r]; + const { type: i, value: c = "", default: l = n } = e[r]; switch (i) { case "field": - o = f.get(t, a) ?? f.get(t, a.substring(a.indexOf(".") + 1)); + o = d.get(t, c) ?? d.get(t, c.substring(c.indexOf(".") + 1)); break; case "router": case "query": - o = ke.getPageParams(a); + o = Re.getPageParams(c); break; case "string": - o = a; + o = c; break; } o ?? (o = l); } else - o = _t(e[r], t, n); - f.set(s, r, o); + o = tn(e[r], t, n); + d.set(s, r, o); } return s; -}, {}), ls = ({ +}, {}), ds = ({ className: e, itemClassName: t, classNames: n, @@ -730,36 +732,35 @@ const Qt = (e = {}, t = {}, n = {}, s = "") => f.deepSome(e, (r, o) => o === "ty isPaginate: r, pageSize: o, isItemOperations: i, - isBatchOperations: a, + isBatchOperations: c, batchOperations: l, - itemOperations: c, + itemOperations: a, itemOperationsAccess: p, resource: g, primaryKey: m, title: h, itemGridLayout: y, $setting: b, - isTreeSider: F, - treeSiderConfig: E, - onClickCallback: T + isTreeSider: N, + treeSiderConfig: w }) => { - const { getBase62params: $ } = De(Ze), { total: Q, page: M } = $() || {}, G = _((P, z, U) => /* @__PURE__ */ d( - us, + const { getBase62params: $, onClickCallback: E } = De(Ze), { total: Q, page: M } = $() || {}, G = _((W, z, O) => /* @__PURE__ */ f( + fs, { - className: Z("ff-data-list-framework-item", t), - operations: i && z ? c == null ? void 0 : c.filter((D) => !m || !D.uuid || !p.has(D.uuid) ? !0 : p.get(D.uuid).includes(z == null ? void 0 : z[m])) : [], + className: T("ff-data-list-framework-item", t), + operations: i && z ? a == null ? void 0 : a.filter((D) => !m || !D.uuid || !p.has(D.uuid) ? !0 : p.get(D.uuid).includes(z == null ? void 0 : z[m])) : [], data: g ? { [g]: z } : z, - children: P, - onClickCallback: T + children: W, + onClickCallback: E } - ), [g, m, i, T, c, p]); - return /* @__PURE__ */ w("div", { className: Z("ff-data-list-framework", e), children: [ - /* @__PURE__ */ d(kt, { className: n == null ? void 0 : n.sider, isTreeSider: F, ...E }), - /* @__PURE__ */ w("div", { className: Z("ff-data-list-container", n == null ? void 0 : n.container), children: [ - /* @__PURE__ */ d(tn, { className: n == null ? void 0 : n.filter }), - /* @__PURE__ */ d(nn, { title: h, className: n == null ? void 0 : n.toolbar }), - /* @__PURE__ */ d( - an, + ), [g, m, i, E, a, p]); + return /* @__PURE__ */ Z("div", { className: T("ff-data-list-framework", e), children: [ + /* @__PURE__ */ f(Ft, { className: n == null ? void 0 : n.sider, isTreeSider: N, ...w }), + /* @__PURE__ */ Z("div", { className: T("ff-data-list-container", n == null ? void 0 : n.container), children: [ + /* @__PURE__ */ f(sn, { className: n == null ? void 0 : n.filter }), + /* @__PURE__ */ f(rn, { title: h, className: n == null ? void 0 : n.toolbar }), + /* @__PURE__ */ f( + ln, { ...y, className: n == null ? void 0 : n.content, @@ -769,12 +770,12 @@ const Qt = (e = {}, t = {}, n = {}, s = "") => f.deepSome(e, (r, o) => o === "ty dataSource: s } ), - /* @__PURE__ */ d( - sn, + /* @__PURE__ */ f( + on, { className: n == null ? void 0 : n.footer, isPaginate: r, - isOperations: a, + isOperations: c, operations: l, total: Q, page: M, @@ -783,25 +784,25 @@ const Qt = (e = {}, t = {}, n = {}, s = "") => f.deepSome(e, (r, o) => o === "ty ) ] }) ] }); -}, us = ({ className: e, operations: t, children: n, data: s, onClickCallback: r }) => /* @__PURE__ */ w("div", { className: Z("data-list-grid-layout-item-container", e), children: [ +}, fs = ({ className: e, operations: t, children: n, data: s, onClickCallback: r }) => /* @__PURE__ */ Z("div", { className: T("data-list-grid-layout-item-container", e), children: [ n, - !!(t != null && t.length) && /* @__PURE__ */ d("div", { className: "data-list-grid-layout-item-actions", children: t.map(({ isRefresh: o, ...i }) => /* @__PURE__ */ d("span", { className: "data-list-grid-layout-item-action", children: /* @__PURE__ */ d( + !!(t != null && t.length) && /* @__PURE__ */ f("div", { className: "data-list-grid-layout-item-actions", children: t.map((o) => /* @__PURE__ */ f("span", { className: "data-list-grid-layout-item-action", children: /* @__PURE__ */ f( C.Link, { - uuid: i.uuid, - type: i.type, - name: i.name, - widget: i.widget, - widgetType: i.widgetType, - widgetProps: i.widgetProps, - widgetSetting: i.widgetSetting, - widgetContainerProps: i.widgetContainerSetting, + uuid: o.uuid, + type: o.type, + name: o.name, + widget: o.widget, + widgetType: o.widgetType, + widgetProps: o.widgetProps, + widgetSetting: o.widgetSetting, + widgetContainerProps: o.widgetContainerSetting, data: s, - onAfterClick: (a) => r == null ? void 0 : r(i.isRefresh, s) + onAfterClick: (i) => i !== !1 && (r == null ? void 0 : r(o.isRefresh, s)) }, - i.uuid || useId() - ) }, (i == null ? void 0 : i.uuid) || useId())) }) -] }), ds = ({ + o.uuid || useId() + ) }, (o == null ? void 0 : o.uuid) || useId())) }) +] }), ps = ({ className: e, itemClassName: t, dataSource: n, @@ -809,59 +810,59 @@ const Qt = (e = {}, t = {}, n = {}, s = "") => f.deepSome(e, (r, o) => o === "ty isItemOperations: r, isBatchOperations: o, batchOperations: i, - itemOperations: a, + itemOperations: c, itemOperationsAccess: l, - resource: c, + resource: a, primaryKey: p, title: g, isPaginate: m, pageSize: h, isTreeSider: y, treeSiderConfig: b, - ...F + ...N }) => { - const { getBase62params: E, onClickCallback: T } = De(Ze), { total: $, page: Q } = E() || {}; - return /* @__PURE__ */ w("div", { className: Z("ff-data-table-framework", e), children: [ - /* @__PURE__ */ d(kt, { isTreeSider: y, ...b }), - /* @__PURE__ */ w("div", { className: "ff-data-table-container", children: [ - /* @__PURE__ */ d(tn, {}), - /* @__PURE__ */ d(nn, { title: g }), - /* @__PURE__ */ d( - on, + const { getBase62params: w, onClickCallback: $ } = De(Ze), { total: E, page: Q } = w() || {}; + return /* @__PURE__ */ Z("div", { className: T("ff-data-table-framework", e), children: [ + /* @__PURE__ */ f(Ft, { isTreeSider: y, ...b }), + /* @__PURE__ */ Z("div", { className: "ff-data-table-container", children: [ + /* @__PURE__ */ f(sn, {}), + /* @__PURE__ */ f(rn, { title: g }), + /* @__PURE__ */ f( + cn, { - ...F, + ...N, className: "ff-data-table-content", columns: s, dataSource: n, - operationRender: (M) => /* @__PURE__ */ d("div", { className: "ff-data-table-actions", children: a == null ? void 0 : a.reduce((G, P, z) => [ + operationRender: (M) => /* @__PURE__ */ f("div", { className: "ff-data-table-actions", children: c == null ? void 0 : c.reduce((G, W, z) => [ ...G, - /* @__PURE__ */ d( + /* @__PURE__ */ f( C.Link, { size: "small", - uuid: P.uuid, - type: P.type, - name: P.name, - widget: P.widget, - widgetType: P.widgetType, - widgetProps: P.widgetProps, - widgetSetting: P.widgetSetting, - widgetContainerProps: P.widgetContainerSetting, + uuid: W.uuid, + type: W.type, + name: W.name, + widget: W.widget, + widgetType: W.widgetType, + widgetProps: W.widgetProps, + widgetSetting: W.widgetSetting, + widgetContainerProps: W.widgetContainerSetting, data: M, - onAfterClick: (U) => T == null ? void 0 : T(P.isRefresh, M) + onAfterClick: (O) => O !== !1 && ($ == null ? void 0 : $(W.isRefresh, data)) }, - P.uuid || z + W.uuid || z ) ], []) }) } ), - /* @__PURE__ */ d( - sn, + /* @__PURE__ */ f( + on, { isPaginate: m, isOperations: o, operations: i, - total: $, + total: E, page: Q, pageSize: h } @@ -887,7 +888,7 @@ const Qt = (e = {}, t = {}, n = {}, s = "") => f.deepSome(e, (r, o) => o === "ty }, onPageSizeChange: () => { } -}), en = ({ +}), nn = ({ isItemGridLayout: e, theme: t, themeProps: n, @@ -895,41 +896,41 @@ const Qt = (e = {}, t = {}, n = {}, s = "") => f.deepSome(e, (r, o) => o === "ty onReload: r, getBase62params: o, onPageChange: i, - onPageSizeChange: a, + onPageSizeChange: c, onTabChange: l, - onSiderChange: c, + onSiderChange: a, onKeywordChange: p, onConditonChange: g, ...m }) => { const [h, y] = k(); - return N(() => { + return L(() => { t ? J.getWidgetComponent(t).then((b) => { if (!b) throw `${t} not found`; return b; }).catch((b) => ({ default: () => `${b}` })).then((b) => y(v.createElement(b.default, { ...m, $setting: n }))) : h || y(null); - }, [t, n]), /* @__PURE__ */ d(Ze.Provider, { value: { + }, [t, n]), /* @__PURE__ */ f(Ze.Provider, { value: { onClickCallback: s, onReload: r, getBase62params: o, onPageChange: i, - onPageSizeChange: a, + onPageSizeChange: c, onTabChange: l, - onSiderChange: c, + onSiderChange: a, onKeywordChange: p, onConditonChange: g - }, children: h ? v.cloneElement(h, { ...m, $setting: n }) : e ? /* @__PURE__ */ d(ls, { ...m, $setting: n }) : /* @__PURE__ */ d(ds, { ...m, $setting: n }) }); + }, children: h ? v.cloneElement(h, { ...m, $setting: n }) : e ? /* @__PURE__ */ f(ds, { ...m, $setting: n }) : /* @__PURE__ */ f(ps, { ...m, $setting: n }) }); }; -en.defaultProps = { +nn.defaultProps = { onReload: () => { }, getBase62params: () => { } }; -const fs = (e, t, n, s, r) => { +const hs = (e, t, n, s, r) => { const o = v.lazy(() => J.getWidgetComponent(e).catch((i) => ({ default: () => `${i}` }))); - return /* @__PURE__ */ d(v.Suspense, { children: /* @__PURE__ */ d( + return /* @__PURE__ */ f(v.Suspense, { children: /* @__PURE__ */ f( o, { value: t, @@ -938,17 +939,17 @@ const fs = (e, t, n, s, r) => { base62params: r } ) }, e); -}, ps = (e, t = {}) => (Zt(e), Zt(t), le(() => e == null ? void 0 : e.map(({ widgetByJs: s, widgetByJsSetting: r, ...o }, i) => s && !s.endsWith("/BasicShowFieldData") ? { +}, gs = (e, t = {}) => (Gt(e), Gt(t), le(() => e == null ? void 0 : e.map(({ widgetByJs: s, widgetByJsSetting: r, ...o }, i) => s && !s.endsWith("/BasicShowFieldData") ? { ...o, - render: (a, l) => { - const c = fs(s, a, l, r, t); - return f.isFunction(o == null ? void 0 : o.render) ? o.render(c, a, l) : c; + render: (c, l) => { + const a = hs(s, c, l, r, t); + return d.isFunction(o == null ? void 0 : o.render) ? o.render(a, c, l) : a; } -} : o), [e, t])), or = (e) => { +} : o), [e, t])), ar = (e) => { const [t, n] = k({}); - return N(() => { + return L(() => { let s = !1; - return e && I.get(`/api/_/${e}`).then((r) => f.pick(r, [ + return e && I.get(`/api/_/${e}`).then((r) => d.pick(r, [ "uuid", "name", "code", @@ -968,145 +969,148 @@ const fs = (e, t, n, s, r) => { "layoutConfig" ])).then((r) => !s && n(r)), () => s = !0; }, [e]), t; -}, ir = (e, t = {}) => { +}, cr = (e, t = {}) => { const [n, s] = k({ dataSource: [] }); - return at(() => { + return lt(() => { let r = !1; return e && I.get(`/api/${e}/${I.encode({ page: 1, ...t })}`).then((o) => !r && s(o)), () => r = !0; }, [e, t]), n; -}, Gt = (e, t = null, n = null, s = "id") => le(() => { - if (f.isEmpty(e) || !e.every(({ uuid: o }) => ks.check(o))) +}, $t = (e, t = null, n = null, s = "id") => le(() => { + if (d.isEmpty(e) || !e.every(({ uuid: o }) => Vs.check(o))) return !1; - if (f.isEmpty(n) || f.isEmpty(t)) + if (d.isEmpty(n) || d.isEmpty(t)) return !0; const r = t.map((o) => o == null ? void 0 : o[s]); return e.some(({ uuid: o }) => !o || !n.has(o) ? !0 : n.get(o).some((i) => r.includes(i))); -}, [e, t, n, s]), Rt = ({ listCode: e, base62params: t, className: n, itemClassName: s, theme: r, themeProps: o, classNames: i }) => { - const [{ tab: a, page: l, total: c, condition: p, sider: g, keyword: m, dataSource: h, itemOperationsAccess: y, pageSize: b }, F] = Jn(t), [{ - resource: E, - primaryKey: T, - batchOperations: $ = [], - itemOperations: Q = [], - columns: M = [], - themeConfig: G, - theme: P, - isTreeSider: z, - treeSiderConfig: U, - isItemGridLayout: D, - itemGridLayout: oe, - title: j, - isPaginate: O - }, _e] = k({ isItemGridLayout: !1, itemGridLayout: {} }), ue = (X) => I.list(e, { tab: a, page: l, total: c, condition: p, sider: g, keyword: m, ...X }).then(({ +}, [e, t, n, s]), kt = v.forwardRef(({ listCode: e, base62params: t, className: n, itemClassName: s, theme: r, themeProps: o, classNames: i }, c) => { + const [{ tab: l, page: a, total: p, condition: g, sider: m, keyword: h, dataSource: y, itemOperationsAccess: b, pageSize: N }, w] = qn(t), [{ + resource: $, + primaryKey: E, + batchOperations: Q = [], + itemOperations: M = [], + columns: G = [], + themeConfig: W, + theme: z, + isTreeSider: O, + treeSiderConfig: D, + isItemGridLayout: oe, + itemGridLayout: X, + title: x, + isPaginate: ut + }, je] = k({ isItemGridLayout: !1, itemGridLayout: {} }), Fe = (j) => I.list(e, { tab: l, page: a, total: p, condition: g, sider: m, keyword: h, ...j }).then(({ condition: H, - total: de, + total: ue, tab: Ve, - page: fe, + page: de, pageSize: Le, operationsAccess: ie, dataSource: B }) => { - F({ + w({ dataSource: B, pageSize: Le, - total: de, - page: fe, + total: ue, + page: de, tab: Ve, condition: H, - sider: g, - keyword: m, + sider: m, + keyword: h, itemOperationsAccess: new Map(ie) }); - }), ct = Gt(Q, h, y, T), Et = Gt($); - N(() => { - let X = null; - return e && I.get(`/api/_/${e}`).resp(({ data: H, res: de }) => { - H != null && H.isDynamicRefresh && (X = jt.subscribe(() => ue(), de)), _e(H); - }).catch(() => _e({})), F((H) => ({ ...H, dataSource: [] })), () => X == null ? void 0 : X(); - }, [e]), N(() => { - e && ue(t); + }), Et = $t(M, y, b, E), pn = $t(Q); + L(() => { + let j = null; + return e && I.get(`/api/_/${e}`).resp(({ data: H, res: ue }) => { + H != null && H.isDynamicRefresh && (j = Ht.subscribe(() => Fe(), ue)), je(H); + }).catch(() => je({})), w((H) => ({ ...H, dataSource: [] })), () => j == null ? void 0 : j(); + }, [e]), L(() => { + e && Fe(t); }, [t]); - const dn = () => { - }, fn = () => { - }, pn = () => { - }, hn = () => { - }, gn = (X, H) => ue({ page: X, pageSize: H }), mn = (X) => ue({ pageSize: X, page: 1 }), yn = (X, H) => { - const de = { tab: a, sider: g, keyword: m, page: l, pageSize: b, condition: p, total: c }; - return X ? f.get(de, X, H) : de; - }, lt = () => { - ue(); - }, bn = (X = 0, H = null) => { - if (X === 2) { - const de = f.get(H, "__PARENT_ID__", ""), Ve = f.get(H, T, ""), fe = f.findIndex(h, ["__PARENT_ID__", de]), Le = f.findIndex(fe > -1 ? f.get(h, [fe, "children"]) : h, [T, Ve]); + const hn = () => { + }, gn = () => { + }, mn = () => { + }, yn = () => { + }, bn = (j, H) => Fe({ page: j, pageSize: H }), vn = (j) => Fe({ pageSize: j, page: 1 }), Cn = (j, H) => { + const ue = { tab: l, sider: m, keyword: h, page: a, pageSize: N, condition: g, total: p }; + return j ? d.get(ue, j, H) : ue; + }, tt = () => { + Fe(); + }, Wt = (j = 0, H = null) => { + if (j === 2) { + const ue = d.get(H, "__PARENT_ID__", ""), Ve = d.get(H, E, d.get(H, [$, E], "")), de = d.findIndex(y, ["__PARENT_ID__", ue]), Le = d.findIndex(de > -1 ? d.get(y, [de, "children"]) : y, [E, Ve]); Le > -1 ? (I.get(`/api/${e}/detail/${Ve}`).then((ie) => { - F((B) => { - const Ne = f.get(B.dataSource, fe > -1 ? [fe, "children", Le, "children"] : [Le, "children"]); + w((B) => { + const Ne = d.get(B.dataSource, de > -1 ? [de, "children", Le, "children"] : [Le, "children"]); return { ...B, - dataSource: fe > -1 ? wt(B.dataSource, { [fe]: { children: { $splice: [[Le, 1, { ...ie, children: Ne }]] } } }) : wt(B.dataSource, { $splice: [[Le, 1, { ...ie, children: Ne }]] }) + dataSource: de > -1 ? Tt(B.dataSource, { [de]: { children: { $splice: [[Le, 1, { ...ie, children: Ne }]] } } }) : Tt(B.dataSource, { $splice: [[Le, 1, { ...ie, children: Ne }]] }) }; }); }), I.post(`/api/${e}/list-operations-access`, { ids: Ve }).then((ie) => new Map(ie)).then((ie) => { - F((B) => (B.itemOperationsAccess.forEach((Ne, Ie) => { + w((B) => (B.itemOperationsAccess.forEach((Ne, Ie) => { var Pt; - (Pt = ie.get(Ie)) != null && Pt.some((ut) => ut == Ve) || B.itemOperationsAccess.set(Ie, Ne.filter((ut) => ut !== Ve)); + (Pt = ie.get(Ie)) != null && Pt.some((dt) => dt == Ve) || B.itemOperationsAccess.set(Ie, Ne.filter((dt) => dt !== Ve)); }), ie.forEach((Ne, Ie) => { - B.itemOperationsAccess.has(Ie) ? B.itemOperationsAccess.set(Ie, f.uniq([...B.itemOperationsAccess.get(Ie) || [], ...Ne])) : B.itemOperationsAccess.set(Ie, Ne); + B.itemOperationsAccess.has(Ie) ? B.itemOperationsAccess.set(Ie, d.uniq([...B.itemOperationsAccess.get(Ie) || [], ...Ne])) : B.itemOperationsAccess.set(Ie, Ne); }), { ...B })); - })) : lt(); + })) : tt(); } else - X === 1 && lt(); + j === 1 && tt(); }; - return /* @__PURE__ */ d( - en, + return v.useImperativeHandle(c, () => ({ + onReload: tt, + onClickCallback: Wt + })), /* @__PURE__ */ f( + nn, { ...{ - title: j, + title: x, itemClassName: s, classNames: i, - resource: E, - primaryKey: T, - theme: r || P, - themeProps: o || G, - isPaginate: O, - pageSize: b, - page: l, - isTreeSider: z, - treeSiderConfig: U, - isItemOperations: ct, - isBatchOperations: Et, - batchOperations: $, - itemOperations: Q, - itemOperationsAccess: y, - dataSource: h, - isItemGridLayout: D, - columns: M, - itemGridLayout: oe + resource: $, + primaryKey: E, + theme: r || z, + themeProps: o || W, + isPaginate: ut, + pageSize: N, + page: a, + isTreeSider: O, + treeSiderConfig: D, + isItemOperations: Et, + isBatchOperations: pn, + batchOperations: Q, + itemOperations: M, + itemOperationsAccess: b, + dataSource: y, + isItemGridLayout: oe, + columns: G, + itemGridLayout: X }, - className: Z("ff-data-list-helper", n), - getBase62params: yn, - onReload: lt, - onClickCallback: bn, - onConditonChange: dn, - onTabChange: fn, - onSiderChange: pn, - onKeywordChange: hn, - onPageChange: gn, - onPageSizeChange: mn + className: T("ff-data-list-helper", n), + getBase62params: Cn, + onReload: tt, + onClickCallback: Wt, + onConditonChange: hn, + onTabChange: gn, + onSiderChange: mn, + onKeywordChange: yn, + onPageChange: bn, + onPageSizeChange: vn } ); -}, tn = ({ className: e }) => (v.useContext(Ze), /* @__PURE__ */ w("div", { className: Z("ff-data-list-filter", e), children: [ - /* @__PURE__ */ d( - wn, +}), sn = ({ className: e }) => (v.useContext(Ze), /* @__PURE__ */ Z("div", { className: T("ff-data-list-filter", e), children: [ + /* @__PURE__ */ f( + Tn, { placeholder: "关键字", style: { width: "30%", maxWidth: 300 }, - prefix: /* @__PURE__ */ d(vt, { type: "icon-search" }) + prefix: /* @__PURE__ */ f(Ct, { type: "icon-search" }) } ), - /* @__PURE__ */ w("div", { className: "ff-data-list-actions", children: [ - /* @__PURE__ */ d(C, { children: "重置" }), - /* @__PURE__ */ d(C, { type: "primary", children: "查询" }), - /* @__PURE__ */ d( + /* @__PURE__ */ Z("div", { className: "ff-data-list-actions", children: [ + /* @__PURE__ */ f(C, { children: "重置" }), + /* @__PURE__ */ f(C, { type: "primary", children: "查询" }), + /* @__PURE__ */ f( C.Link, { className: "ff-data-list-filter-submit-button", @@ -1117,18 +1121,18 @@ const fs = (e, t, n, s, r) => { } ) ] }) -] })), hs = [ +] })), ms = [ { title: "全部", className: "active" }, { title: "运行中" }, { title: "已上线" } -], nn = ({ className: e, title: t }) => /* @__PURE__ */ w("div", { className: Z("ff-data-list-toolbar", e), children: [ - /* @__PURE__ */ d("div", { className: "ff-data-list-title", children: t }), - /* @__PURE__ */ d(Zn, { className: "ff-data-list-tabs", items: hs }), - /* @__PURE__ */ w("div", { className: "ff-data-list-actions", children: [ - /* @__PURE__ */ d(C.Link, { icon: "icon-reload" }), - /* @__PURE__ */ d(C.Link, { icon: "icon-setting" }) +], rn = ({ className: e, title: t }) => /* @__PURE__ */ Z("div", { className: T("ff-data-list-toolbar", e), children: [ + /* @__PURE__ */ f("div", { className: "ff-data-list-title", children: t }), + /* @__PURE__ */ f(Gn, { className: "ff-data-list-tabs", items: ms }), + /* @__PURE__ */ Z("div", { className: "ff-data-list-actions", children: [ + /* @__PURE__ */ f(C.Link, { icon: "icon-reload" }), + /* @__PURE__ */ f(C.Link, { icon: "icon-setting" }) ] }) -] }), gs = [ +] }), ys = [ { title: "parent 1", key: "0-0", @@ -1154,7 +1158,7 @@ const fs = (e, t, n, s, r) => { key: "0-0-1", children: [ { - title: /* @__PURE__ */ d( + title: /* @__PURE__ */ f( "span", { style: { @@ -1169,23 +1173,23 @@ const fs = (e, t, n, s, r) => { } ] } -], kt = ({ className: e, width: t, isTreeSider: n }) => n ? /* @__PURE__ */ d( - Tn.DirectoryTree, +], Ft = ({ className: e, width: t, isTreeSider: n }) => n ? /* @__PURE__ */ f( + Sn.DirectoryTree, { - className: Z("ff-data-list-sider", e), + className: T("ff-data-list-sider", e), style: { "--sider-width": t }, showLine: !0, showIcon: !1, - treeData: gs + treeData: ys } ) : null; -kt.defaultProps = { +Ft.defaultProps = { width: 280 }; -const sn = ({ className: e, operations: t, isOperations: n, isPaginate: s, total: r, page: o, pageSize: i }) => { - const { onPageChange: a, onPageSizeChange: l, onClickCallback: c } = v.useContext(Ze); - return n && !f.isEmpty(t) || s ? /* @__PURE__ */ w("div", { className: Z("ff-data-list-footer", e), children: [ - /* @__PURE__ */ d("div", { className: "ff-data-list-actions", children: t == null ? void 0 : t.map((p, g) => /* @__PURE__ */ d( +const on = ({ className: e, operations: t, isOperations: n, isPaginate: s, total: r, page: o, pageSize: i }) => { + const { onPageChange: c, onPageSizeChange: l, onClickCallback: a } = v.useContext(Ze); + return n && !d.isEmpty(t) || s ? /* @__PURE__ */ Z("div", { className: T("ff-data-list-footer", e), children: [ + /* @__PURE__ */ f("div", { className: "ff-data-list-actions", children: t == null ? void 0 : t.map((p, g) => /* @__PURE__ */ f( C, { uuid: p.uuid, @@ -1196,24 +1200,24 @@ const sn = ({ className: e, operations: t, isOperations: n, isPaginate: s, total widgetProps: p.widgetProps, widgetSetting: p.widgetSetting, widgetContainerProps: p.widgetContainerSetting, - onAfterClick: (m) => c == null ? void 0 : c(p.isRefresh, null) + onAfterClick: (m) => m !== !1 && (a == null ? void 0 : a(p.isRefresh, null)) }, p.uuid || g )) }), - s && /* @__PURE__ */ d( - Gn, + s && /* @__PURE__ */ f( + $n, { size: "small", total: r, pageSize: i, showSizeChanger: !1, showTotal: (p) => `第 ${o} 页 / 总共 ${p} 条`, - onChange: a, + onChange: c, onShowSizeChange: l } ) ] }) : null; -}, rn = (e, t, n = !0) => n !== !0 && n-- <= 0 ? [] : f.isArray(e) && !f.isEmpty(e) ? e.reduce((s, r) => (Reflect.has(r, t) && Reflect.has(r, "children") && s.push(r[t]), Reflect.has(r, "children") && !f.isEmpty(r.children) ? s.concat(rn(r.children, t, n)) : s), []) : [], on = ({ +}, an = (e, t, n = !0) => n !== !0 && n-- <= 0 ? [] : d.isArray(e) && !d.isEmpty(e) ? e.reduce((s, r) => (Reflect.has(r, t) && Reflect.has(r, "children") && s.push(r[t]), Reflect.has(r, "children") && !d.isEmpty(r.children) ? s.concat(an(r.children, t, n)) : s), []) : [], cn = ({ className: e, primaryKey: t, columns: n, @@ -1222,14 +1226,14 @@ const sn = ({ className: e, operations: t, isOperations: n, isPaginate: s, total operationWidth: o, ...i }) => { - const a = K(null), l = K(null), [c, p] = k([]), [g, m] = k({ width: 0, height: 0 }); - N(() => { - p(rn(s, t)); - }, [s, t]), Rn(() => { + const c = K(null), l = K(null), [a, p] = k([]), [g, m] = k({ width: 0, height: 0 }); + L(() => { + p(an(s, t)); + }, [s, t]), Fn(() => { const y = new ResizeObserver(() => { var b; m({ - width: ((b = a.current) == null ? void 0 : b.nativeElement.querySelector(".ant-table-body").scrollWidth) || l.current.offsetWidth, + width: ((b = c.current) == null ? void 0 : b.nativeElement.querySelector(".ant-table-body").scrollWidth) || l.current.offsetWidth, height: l.current.offsetHeight }); }); @@ -1237,19 +1241,19 @@ const sn = ({ className: e, operations: t, isOperations: n, isPaginate: s, total l.current && y.unobserve(l.current); }; }, []); - const h = ps(n); - return /* @__PURE__ */ d("div", { ref: l, className: Z("ff-data-list-table", e), children: g.height ? /* @__PURE__ */ d( - Sn, + const h = gs(n); + return /* @__PURE__ */ f("div", { ref: l, className: T("ff-data-list-table", e), children: g.height ? /* @__PURE__ */ f( + zn, { ...i, - ref: a, + ref: c, rowKey: (y, b) => (y == null ? void 0 : y[t]) ?? b, columns: h == null ? void 0 : h.concat(r ? [{ title: "操作", align: "center", fixed: "right", width: `${Math.ceil(o / g.width * 100).toFixed(2)}%`, - render: (y, b, F) => r(b, F) + render: (y, b, N) => r(b, N) }] : []), dataSource: s, size: "middle", @@ -1259,48 +1263,48 @@ const sn = ({ className: e, operations: t, isOperations: n, isPaginate: s, total defaultExpandAllRows: !0, expandRowByClick: !0, onExpandedRowsChange: p, - expandedRowKeys: c + expandedRowKeys: a } } ) : null }); }; -on.defaultProps = { +cn.defaultProps = { operationWidth: 180, columns: [], dataSource: [] }; -const ms = ({ widget: e, widgetPrefix: t, basicForm: n, ...s }) => { +const bs = ({ widget: e, widgetPrefix: t, basicForm: n, ...s }) => { const r = e != null && e.startsWith("@") ? e : `${t}/${e}`, [o, i] = k(); - return N(() => { - r && J.getWidgetComponent(r).then(({ defaultProps: a, default: l }) => ({ - default: ys(l, a, n) - })).catch((a) => ({ default: () => `${a}` })).then((a) => i(v.createElement(a.default, s))); + return L(() => { + r && J.getWidgetComponent(r).then(({ defaultProps: c, default: l }) => ({ + default: vs(l, c, n) + })).catch((c) => ({ default: () => `${c}` })).then((c) => i(v.createElement(c.default, s))); }, [r]), o; -}, ys = (e, t, n = null) => (s) => { +}, vs = (e, t, n = null) => (s) => { const { code: r, label: o, extras: i, - isVirtual: a, + isVirtual: c, initialValue: l, - initialValueLanguage: c, + initialValueLanguage: a, convertJs: p, convertJsSetting: g, value: m, ...h - } = f.merge({}, t, s), [y, b] = Bt(a ? null : r, { + } = d.merge({}, t, s), [y, b] = Kt(c ? null : r, { initialValue: l, - initialValueLanguage: c, + initialValueLanguage: a, convertJs: p, convertJsSetting: g, type: (h == null ? void 0 : h.type) || "string" }, n); - return /* @__PURE__ */ d(e, { ...h, value: y, rawValue: b, $setting: i || {} }); + return /* @__PURE__ */ f(e, { ...h, value: y, rawValue: b, $setting: i || {} }); }; -ms.defaultProps = { +bs.defaultProps = { widgetPrefix: "@pkg/grid-layouts" }; -const an = ({ +const ln = ({ cols: e, rowHeight: t, itemMargin: n, @@ -1308,147 +1312,145 @@ const an = ({ primaryKey: r, itemRender: o, dataSource: i, - itemClassName: a, + itemClassName: c, empty: l, - className: c, + className: a, style: p }) => { - const g = kn(), m = le(() => /* @__PURE__ */ d( - Yt, + const g = Vn(), m = le(() => /* @__PURE__ */ f( + Mt, { cols: e, rowHeight: t, itemMargin: n, fields: s, - className: a + className: c } ), [s, e, t, n]); - return /* @__PURE__ */ d("div", { className: Z("ff-data-list-content", c), style: p, children: f.isEmpty(i) ? l : i == null ? void 0 : i.map((h, y) => /* @__PURE__ */ d(v.Fragment, { children: o(v.cloneElement(m, { data: h }), h, y) }, `${g}-${(h == null ? void 0 : h[r]) || y}`)) }); + return /* @__PURE__ */ f("div", { className: T("ff-data-list-content", a), style: p, children: d.isEmpty(i) ? l : i == null ? void 0 : i.map((h, y) => /* @__PURE__ */ f(v.Fragment, { children: o(v.cloneElement(m, { data: h }), h, y) }, `${g}-${(h == null ? void 0 : h[r]) || y}`)) }); }; -an.defaultProps = { +ln.defaultProps = { itemRender: (e, t, n) => e, - empty: /* @__PURE__ */ d($n, { description: null }), + empty: /* @__PURE__ */ f(On, { description: null }), style: {} }; -const bs = (e, t, { isReplaceRouteHistory: n = !1 } = {}) => ke.redirect(t, e, { replace: n }), St = (e, t, { status: { loading: n, disabled: s }, setStatus: r }) => { +const Cs = (e, t, { isReplaceRouteHistory: n = !1 } = {}) => Re.redirect(t, e, { replace: n }), zt = (e, t, { status: { loading: n, disabled: s }, setStatus: r }) => { const o = { - loading: (i) => i === void 0 ? n : r((a) => ({ ...a, loading: i })), - disabled: (i) => i === void 0 ? s : r((a) => ({ ...a, disabled: i })) + loading: (i) => i === void 0 ? n : r((c) => ({ ...c, loading: i })), + disabled: (i) => i === void 0 ? s : r((c) => ({ ...c, disabled: i })) }; - return f.isFunction(t) ? t.call(null, { ...e, ...o }) : f.isString(t) && t ? Fe.exec(t, e, o) : null; -}, $t = (e, t, n, s) => f.isString(t) && t ? J.getWidgetComponent(t).then(({ default: r }) => { - L.modal( - r, - { ...e, $setting: n, code: t }, - s - ); -}).catch((r) => { - L.error(t, { content: r.toString() }); -}) : L.modal( + return d.isFunction(t) ? t.call(null, { ...e, ...o }) : d.isString(t) && t ? ke.exec(t, e, o) : null; +}, Ot = (e, t, n, s) => d.isString(t) && t ? J.getWidgetComponent(t).then(({ default: r }) => V.modal( + r, + { ...e, $setting: n }, + s +)).catch((r) => { + V.error(t, { content: r.toString() }); +}) : V.modal( t, + { ...e, $setting: n }, + s +), Rs = (e, t, n, s) => V.modal( + un, { ...e, $setting: n, code: t }, s -), vs = (e, t, n, s) => L.modal( - cn, - { ...e, $setting: n, code: t }, - s -), Cs = (e, t, n, s) => L.modal( - Rt, +), ks = (e, t, n, s) => V.modal( + kt, { base62params: e, $setting: n, listCode: t }, s -), Rs = ({ +), Fs = ({ widget: e, widgetType: t, widgetData: n, widgetProps: s, widgetSetting: r, widgetContainerProps: o -}, { onAfterClick: i, onBeforeClick: a }) => { +}, { onAfterClick: i, onBeforeClick: c }) => { const l = De(Ze); - De(ln); - const [c, p] = k({ leading: !0, trailing: !1 }), g = le(() => { + De(dn); + const [a, p] = k({ leading: !0, trailing: !1 }), g = le(() => { switch (t) { case "redirect": - return f.partialRight(bs, e, r); + return d.partialRight(Cs, e, r); case "func": - return f.partialRight(St, (r == null ? void 0 : r.code) ?? e, { status: c, setStatus: p }); + return d.partialRight(zt, (r == null ? void 0 : r.code) ?? e, { status: a, setStatus: p }); case "fsdpf-component": - return f.partialRight($t, e, r, o); + return d.partialRight(Ot, e, r, o); case "grid-layout-form": - return f.partialRight(vs, e, r, o); + return d.partialRight(Rs, e, r, o); case "data-list": - return f.partialRight(Cs, e, r, o); + return d.partialRight(ks, e, r, o); default: - if (It(e)) - return f.partialRight($t, e, r, o); - if (f.isFunction(e)) - return f.partialRight(St, (r == null ? void 0 : r.code) || e, { status: c, setStatus: p }); + if (wt(e) || v.isValidElement(e)) + return d.partialRight(Ot, e, r, o); + if (d.isFunction(e)) + return d.partialRight(zt, (r == null ? void 0 : r.code) || e, { status: a, setStatus: p }); } return (...h) => console.error("useButton unknown widgetType", t, ...h); }, [e, t]); - return [f.debounce((h) => (a == null || a(h), Promise.resolve(Qt(s, h, { list: l })).then((y) => g({ ...n, ...y })).then((y) => i == null ? void 0 : i(y)).catch(console.error)), 300, { leading: !0, trailing: !1 }), c]; + return [d.debounce((h) => (c == null || c(h), Promise.resolve(_t(s, h, { list: l })).then((y) => g({ ...n, ...y })).then((y) => i == null ? void 0 : i(y)).catch(console.error)), 300, { leading: !0, trailing: !1 }), a]; }; -var he, Se; +var pe, Se; const te = class te { constructor() { R(this, Se, null); - V(this, "init", (t) => x(this, Se, new Map(t))); - V(this, "check", (t) => !u(this, Se).has(t) || u(this, Se).get(t)); - if (u(te, he)) - return u(te, he); + F(this, "init", (t) => U(this, Se, new Map(t))); + F(this, "check", (t) => !u(this, Se).has(t) || u(this, Se).get(t)); + if (u(te, pe)) + return u(te, pe); } }; -he = new WeakMap(), Se = new WeakMap(), R(te, he, null), V(te, "getInstance", () => (u(te, he) || x(te, he, new te()), u(te, he))); -let ft = te; -const ks = ft.getInstance(), qe = (e) => function({ +pe = new WeakMap(), Se = new WeakMap(), R(te, pe, null), F(te, "getInstance", () => (u(te, pe) || U(te, pe, new te()), u(te, pe))); +let pt = te; +const Vs = pt.getInstance(), et = (e) => function({ className: n, children: s, name: r, icon: o, type: i, - data: a, + data: c, noAuthType: l, - onAfterClick: c, + onAfterClick: a, onBeforeClick: p, loading: g, disabled: m, tooltip: h, popConfirm: y, widget: b, - widgetType: F, - widgetData: E, - widgetProps: T, - widgetSetting: $, + widgetType: N, + widgetData: w, + widgetProps: $, + widgetSetting: E, widgetContainerProps: Q, ...M }) { const G = { type: "primary", - className: Z("ff-button", n) + className: T("ff-button", n) }; - i === "danger" ? G.danger = !0 : i === "default" && (G.type = i), e === "link" || e === "dashed" ? (G.type = e, i === "default" && (G.className = Z(G.className, "ff-default"))) : (e === "circle" || e === "round") && (G.shape = e), o && (G.icon = /* @__PURE__ */ d(vt, { type: o })); - const [P, z] = k(!1), [U, { disabled: D, loading: oe }] = Rs({ widget: b, widgetType: F, widgetData: E, widgetProps: T, widgetSetting: $, widgetContainerProps: Q }, { onAfterClick: c, onBeforeClick: p }); - return /* @__PURE__ */ d( - zn, + i === "danger" ? G.danger = !0 : i === "default" && (G.type = i), e === "link" || e === "dashed" ? (G.type = e, i === "default" && (G.className = T(G.className, "ff-default"))) : (e === "circle" || e === "round") && (G.shape = e), o && (G.icon = /* @__PURE__ */ f(Ct, { type: o })); + const [W, z] = k(!1), [O, { disabled: D, loading: oe }] = Fs({ widget: b, widgetType: N, widgetData: w, widgetProps: $, widgetSetting: E, widgetContainerProps: Q }, { onAfterClick: a, onBeforeClick: p }); + return /* @__PURE__ */ f( + xn, { okText: "确定", cancelText: "取消", ...y || {}, disabled: D || m, - open: P, - onOpenChange: (O) => { - if (!O) - return z(O); - y ? z(O) : U(a); + open: W, + onOpenChange: (x) => { + if (!x) + return z(x); + y ? z(x) : O(c); }, onConfirm: () => { - U(a); + O(c); }, - onClick: (O) => { - O.stopPropagation(); + onClick: (x) => { + x.stopPropagation(); }, - children: /* @__PURE__ */ d(On, { ...h, title: P ? null : h == null ? void 0 : h.title, trigger: ["hover", "click"], children: /* @__PURE__ */ d( - xn, + children: /* @__PURE__ */ f(Un, { ...h, title: W ? null : h == null ? void 0 : h.title, trigger: ["hover", "click"], children: /* @__PURE__ */ f( + Dn, { loading: oe || g, disabled: D || m, @@ -1459,52 +1461,53 @@ const ks = ft.getInstance(), qe = (e) => function({ ) }) } ); -}, C = qe("default"), Fs = qe("link"), Vs = qe("circle"), Ls = qe("round"), Ns = qe("dashed"), Ft = ({ data: e, widget: t, widgetType: n, children: s, widgetData: r, widgetProps: o, widgetSetting: i, widgetContainerProps: a }) => { - const l = De(Ze), [c, p] = k(!1), [g, m] = k("hover"), [h, y] = k({}), [b, F] = k(); - N(() => { - n == "grid-layout-form" ? F(v.createElement(cn, { ...r, $setting: i, code: t })) : n == "data-list" ? F(v.createElement(Rt, { base62params: e, $setting: i, listCode: t })) : f.isString(t) ? J.getWidgetComponent(t).then(({ default: $ }) => { - F(v.createElement($, { ...r, $setting: i })); - }).catch(($) => F($.toString())) : It(t) ? F(v.createElement(t, { ...r, $setting: i })) : v.isValidElement(t) && F(v.cloneElement(t, { ...r, $setting: i })); - }, [n, r]), N(() => { - Promise.resolve(Qt(o, e, { list: l })).then(y); +}, C = et("default"), Ls = et("link"), Ns = et("circle"), Is = et("round"), ws = et("dashed"), Vt = ({ data: e, widget: t, widgetType: n, children: s, widgetData: r, widgetProps: o, widgetSetting: i, widgetContainerProps: c }) => { + const l = De(Ze), [a, p] = k(!1), [g, m] = k("hover"), [h, y] = k({}), [b, N] = k(); + L(() => { + n == "grid-layout-form" ? N(v.createElement(un, { ...r, $setting: i, code: t })) : n == "data-list" ? N(v.createElement(kt, { base62params: e, $setting: i, listCode: t })) : d.isString(t) ? J.getWidgetComponent(t).then(({ default: E }) => { + N(v.createElement(E, { ...r, $setting: i })); + }).catch((E) => N(E.toString())) : wt(t) ? N(v.createElement(t, { ...r, $setting: i })) : v.isValidElement(t) && N(v.cloneElement(t, { ...r, $setting: i })); + }, [t, n, r]), L(() => { + Promise.resolve(_t(o, e, { list: l })).then(y); }, [o, e]); - const E = ($) => { - p($), !$ && m("hover"); - }, T = () => { + const w = (E) => { + p(E), !E && m("hover"); + }, $ = () => { p(!0), m("click"); }; - return /* @__PURE__ */ d( - Un, + return /* @__PURE__ */ f( + Xn, { - ...a, - onPopupClick: T, - onClick: T, - open: c, + zIndex: 1e3, + ...c, + onPopupClick: $, + onClick: $, + open: a, trigger: g, - content: /* @__PURE__ */ d(Is, { children: b && v.cloneElement(b, { ...h, $close: () => E(!1) }) }), + content: /* @__PURE__ */ f(Es, { children: b && v.cloneElement(b, { ...h, $close: () => w(!1) }) }), children: s, - onOpenChange: E, + onOpenChange: w, overlayClassName: "ff-popup ff-popover" } ); -}, Is = ({ children: e }) => { - const [t, n] = k({}), s = _((o, i) => n((a) => ({ ...a, [o]: i })), []), r = _((o) => n((i) => ({ ...i, [o]: void 0 })), []); - return /* @__PURE__ */ w(je.Provider, { value: { ele: t, mount: s, unmount: r }, children: [ - t != null && t.title || t != null && t["sub-title"] ? /* @__PURE__ */ w("div", { className: "ff-popup-header", children: [ - (t == null ? void 0 : t.title) || /* @__PURE__ */ d("div", { className: "ff-popup-title" }), - (t == null ? void 0 : t["sub-title"]) || /* @__PURE__ */ d("div", { className: "ff-popup-sub-title" }) +}, Es = ({ children: e }) => { + const [t, n] = k({}), s = _((o, i) => n((c) => ({ ...c, [o]: i })), []), r = _((o) => n((i) => ({ ...i, [o]: void 0 })), []); + return /* @__PURE__ */ Z(Xe.Provider, { value: { ele: t, mount: s, unmount: r }, children: [ + t != null && t.title || t != null && t["sub-title"] ? /* @__PURE__ */ Z("div", { className: "ff-popup-header", children: [ + (t == null ? void 0 : t.title) || /* @__PURE__ */ f("div", { className: "ff-popup-title" }), + (t == null ? void 0 : t["sub-title"]) || /* @__PURE__ */ f("div", { className: "ff-popup-sub-title" }) ] }) : null, e, - t != null && t.extras || t != null && t.actions ? /* @__PURE__ */ w("div", { className: "ff-popup-footer", children: [ - (t == null ? void 0 : t.extras) || /* @__PURE__ */ d("div", { className: "ff-popup-extras" }), - (t == null ? void 0 : t.actions) || /* @__PURE__ */ d("div", { className: "ff-popup-actions" }) + t != null && t.extras || t != null && t.actions ? /* @__PURE__ */ Z("div", { className: "ff-popup-footer", children: [ + (t == null ? void 0 : t.extras) || /* @__PURE__ */ f("div", { className: "ff-popup-extras" }), + (t == null ? void 0 : t.actions) || /* @__PURE__ */ f("div", { className: "ff-popup-actions" }) ] }) : null ] }); }; -Ft.defaultProps = { +Vt.defaultProps = { widgetType: "fsdpf-component" }; -Ft.propTypes = { +Vt.propTypes = { widgetType: S.oneOf(["fsdpf-component", "grid-layout-form", "data-list"]) }; C.defaultProps = { @@ -1534,189 +1537,194 @@ C.propTypes = { widgetContainerProps: S.object // 容器配置 }; -C.Link = Fs; +C.Link = Ls; C.Link.defaultProps = C.defaultProps; C.Link.propTypes = C.propTypes; -C.Circle = Vs; +C.Circle = Ns; C.Circle.defaultProps = C.defaultProps; C.Circle.propTypes = C.propTypes; -C.Round = Ls; +C.Round = Is; C.Round.defaultProps = C.defaultProps; C.Round.propTypes = C.propTypes; -C.Dashed = Ns; +C.Dashed = ws; C.Dashed.defaultProps = C.defaultProps; C.Dashed.propTypes = C.propTypes; -C.Popover = Ft; -const cn = ({ $setting: e, $close: t, extras: n, code: s, primaryKey: r, ...o }) => { - const [i] = Ye.useForm(), a = _n(s, r, e); - N(() => { - a && i.setFieldsValue(a); - }, [a]); +C.Popover = Vt; +const un = ({ $setting: e, $close: t, extras: n, code: s, primaryKey: r, ...o }) => { + const [i] = Me.useForm(), c = ts(s, r, e); + L(() => { + c && i.setFieldsValue(c); + }, [c]); const l = () => { - const c = i.getFieldValue("__RESOURCE__"), { + const a = i.getFieldValue("__RESOURCE__"), { initDataUri: p = `/api/${s}` } = e || {}; - i.validateFields(!0).then((g) => c ? f.pick(g, [c]) : g).then((g) => I.post(r ? `${p}/${r}` : `${p}`, g).msg(t)).catch(() => L.error("请先完善表单信息", { duration: 2e3 })); + i.validateFields(!0).then((g) => a ? d.pick(g, [a]) : g).then((g) => I.post(r ? `${p}/${r}` : `${p}`, g).msg(t)).catch(() => V.error("请先完善表单信息", { duration: 2e3 })); }; - return /* @__PURE__ */ d( + return /* @__PURE__ */ f( Y, { - actions: /* @__PURE__ */ w(v.Fragment, { children: [ - /* @__PURE__ */ d(C, { name: "保存", type: "primary", widget: l }), - /* @__PURE__ */ d(C, { name: "取消", widget: () => t(!1) }) + actions: /* @__PURE__ */ Z(v.Fragment, { children: [ + /* @__PURE__ */ f(C, { name: "保存", type: "primary", widget: l }), + /* @__PURE__ */ f(C, { name: "取消", widget: () => t(!1) }) ] }), extras: n, - children: /* @__PURE__ */ d(cs, { form: i, code: s, primaryKey: r, ...o }) + children: /* @__PURE__ */ f(us, { form: i, code: s, primaryKey: r, ...o }) } ); -}, Es = (e, t, n = "children") => { - if (f.isEmpty(e)) +}, Ws = (e, t, n = "children") => { + if (d.isEmpty(e)) return {}; - const s = f.find(e, ["value", t]); - if (!f.isEmpty(s)) + const s = d.find(e, ["value", t]); + if (!d.isEmpty(s)) return s; const r = e.length; for (let o = 0; o < r; o++) { - const { [n]: i } = e[o], a = Es(i, t, n); - if (!f.isEmpty(a)) - return a; + const { [n]: i } = e[o], c = Ws(i, t, n); + if (!d.isEmpty(c)) + return c; } return {}; }, Ps = ({ fields: e, formProps: t, $close: n }) => { - const [s] = Ye.useForm(), r = () => s.validateFields(!0).then(n), o = le(() => [ + const [s] = Me.useForm(), r = () => s.validateFields(!0).then(n), o = le(() => [ { name: "__PROPS__", value: t } ], [t]); - return /* @__PURE__ */ d(Y, { actions: /* @__PURE__ */ w(v.Fragment, { children: [ - /* @__PURE__ */ d(C, { name: "取消", widget: () => n(Promise.reject(!1)) }), - /* @__PURE__ */ d(C, { name: "确定", type: "primary", widget: () => r() }) - ] }), children: /* @__PURE__ */ d(Dt, { theme: { components: { Form: { itemMarginBottom: 6 } } }, children: /* @__PURE__ */ d(Ye, { fields: o, layout: "vertical", form: s, children: e == null ? void 0 : e.map(({ code: i, ...a }) => /* @__PURE__ */ d(Mt, { code: i, ...a }, i)) }) }) }); + return /* @__PURE__ */ f(Y, { actions: /* @__PURE__ */ Z(v.Fragment, { children: [ + /* @__PURE__ */ f(C, { name: "取消", widget: () => n(!1) }), + /* @__PURE__ */ f(C, { name: "确定", type: "primary", widget: () => r() }) + ] }), children: /* @__PURE__ */ f(jt, { theme: { components: { Form: { itemMarginBottom: 6 } } }, children: /* @__PURE__ */ f(Me, { fields: o, layout: "vertical", form: s, children: e == null ? void 0 : e.map(({ code: i, ...c }) => /* @__PURE__ */ f(Jt, { code: i, ...c }, i)) }) }) }); }; -var tt, $e, ge, nt, st, Ke, rt, ze; +var st, $e, he, rt, ot, Ae, it, ze; const Ge = class Ge extends v.Component { constructor(n) { super(n); - R(this, tt, null); + R(this, st, null); R(this, $e, 0); - R(this, ge, /* @__PURE__ */ new Map()); - R(this, nt, (n) => new Promise((s) => { - const r = Xe(this, $e)._++; - u(this, ge).set(r, v.createElement(Yn, { + R(this, he, /* @__PURE__ */ new Map()); + R(this, rt, (n) => new Promise((s) => { + const r = He(this, $e)._++; + u(this, he).set(r, v.createElement(Mn, { ...n, key: r, $close: (o) => u(this, ze).call(this, r, () => s(o)) })), this.forceUpdate(); })); - R(this, st, (n, s) => new Promise((r) => { - const o = Xe(this, $e)._++; - u(this, ge).set(o, v.createElement(Kn, { + R(this, ot, (n, s) => new Promise((r) => { + const o = He(this, $e)._++; + u(this, he).set(o, v.createElement(An, { ...s, content: n, key: o, $close: (i) => u(this, ze).call(this, o, () => r(i)) })), this.forceUpdate(); })); - R(this, Ke, (n, s, { mode: r, ...o } = {}) => new Promise((i) => { - const a = Xe(this, $e)._++, l = { current: null }; - u(this, ge).set(a, v.createElement( - r == "drawer" ? Mn : An, + R(this, Ae, (n, s, { mode: r, ...o } = {}) => new Promise((i) => { + const c = He(this, $e)._++, l = { current: null }; + u(this, he).set(c, v.createElement( + r == "drawer" ? Jn : Qn, { ref: l, - key: a, + key: c, maskClosable: !1, ...o, - $close: (c) => u(this, ze).call(this, a, () => i(c)) + $close: (a) => u(this, ze).call(this, c, () => i(a)) }, v.createElement(n, { ...s, - $close: (c) => l.current.handleClose(c) + $close: (a) => l.current.handleClose(a) }) )), this.forceUpdate(); })); - R(this, rt, (n, s = {}, r = {}) => u(this, Ke).call(this, Ps, { formProps: r, fields: n }, s)); + R(this, it, (n, s = {}, r = {}) => u(this, Ae).call(this, Ps, { formProps: r, fields: n }, s).then((o) => { + if (o === !1) + throw !1; + return o; + })); R(this, ze, (n, s) => { - u(this, ge).delete(n), this.forceUpdate(s); + u(this, he).delete(n), this.forceUpdate(s); }); - Ge.modal = u(this, Ke), Ge.notification = u(this, nt), Ge.confirm = u(this, st), Ge.form = u(this, rt); + Ge.modal = u(this, Ae), Ge.notification = u(this, rt), Ge.confirm = u(this, ot), Ge.form = u(this, it); } componentWillUnmount() { var n, s; - (s = (n = u(this, tt)) == null ? void 0 : n[1]) == null || s.call(n); + (s = (n = u(this, st)) == null ? void 0 : n[1]) == null || s.call(n); } render() { - const n = Array.from(u(this, ge)); - return /* @__PURE__ */ d(v.Fragment, { children: n.map(([s, r]) => r) }); + const n = Array.from(u(this, he)); + return /* @__PURE__ */ f(v.Fragment, { children: n.map(([s, r]) => r) }); } }; -tt = new WeakMap(), $e = new WeakMap(), ge = new WeakMap(), nt = new WeakMap(), st = new WeakMap(), Ke = new WeakMap(), rt = new WeakMap(), ze = new WeakMap(); -let L = Ge; -L.notification = ({ title: e, content: t, icon: n, category: s, ...r }) => Promise.resolve(Ut[s || "open"]({ +st = new WeakMap(), $e = new WeakMap(), he = new WeakMap(), rt = new WeakMap(), ot = new WeakMap(), Ae = new WeakMap(), it = new WeakMap(), ze = new WeakMap(); +let V = Ge; +V.notification = ({ title: e, content: t, icon: n, category: s, ...r }) => Promise.resolve(Xt[s || "open"]({ ...r, - icon: n ? /* @__PURE__ */ d(vt, { type: n || "" }) : void 0, + icon: n ? /* @__PURE__ */ f(Ct, { type: n || "" }) : void 0, message: e, description: t })); -L.success = (e, t = {}) => L.notification({ title: e, category: "success", ...t }); -L.error = (e, t = {}) => L.notification({ title: e, category: "error", ...t }); -L.confirm = (e, t = {}) => L.notification({ content: e, ...t }); -L.form = (e, t = {}) => L.notification({ title: e, ...t }); -L.modal = (e = {}) => L.notification(e); -const pt = "mine", Vt = "token", Ws = "web", ws = 60 * 60 * 24 * 30, Lt = () => { - const e = window.localStorage.getItem(Vt); +V.success = (e, t = {}) => V.notification({ title: e, category: "success", ...t }); +V.error = (e, t = {}) => V.notification({ title: e, category: "error", ...t }); +V.confirm = (e, t = {}) => V.notification({ content: e, ...t }); +V.form = (e, t = {}) => V.notification({ title: e, ...t }); +V.modal = (e = {}) => V.notification(e); +const ht = "mine", Lt = "token", Zs = "web", Ts = 60 * 60 * 24 * 30, Nt = () => { + const e = window.localStorage.getItem(Lt); if (!e) return ""; const t = e.split("."); if (!Array.isArray(t) || t.length !== 3) throw "登录令牌无效!"; const { iat: n } = JSON.parse(window.atob(t[1])); - if (Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3) - n > ws) + if (Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3) - n > Ts) throw "登录令牌已过期, 请重新登录!"; return e; -}, Zs = () => { +}, Gs = () => { try { - return !!Lt(); + return !!Nt(); } catch { return !1; } -}, ar = (e = !0) => { +}, lr = (e = !0) => { var t; try { - const n = Lt(); + const n = Nt(); if (!n) return Promise.resolve(null); - const { iat: s } = JSON.parse(window.atob((t = n == null ? void 0 : n.split(".")) == null ? void 0 : t[1])), { iat: r, ...o } = I.decode(window.localStorage.getItem(pt) || "", {}); - return r === s ? Promise.resolve(o) : I.get("/api/mine-info").then(({ User: i = null }) => (window.localStorage.setItem(pt, I.encode({ ...i, iat: s })), i)); + const { iat: s } = JSON.parse(window.atob((t = n == null ? void 0 : n.split(".")) == null ? void 0 : t[1])), { iat: r, ...o } = I.decode(window.localStorage.getItem(ht) || "", {}); + return r === s ? Promise.resolve(o) : I.get("/api/mine-info").then(({ User: i = null }) => (window.localStorage.setItem(ht, I.encode({ ...i, iat: s })), i)); } catch (n) { - console.error(n), e && L.error("请登录").then(Ts); + console.error(n), e && V.error("请登录").then(Ss); } return Promise.resolve(null); -}, cr = (e, t, n = {}) => I.post("/api/user-token", { +}, ur = (e, t, n = {}) => I.post("/api/user-token", { username: e, - passwd: Fn.hash(t), - platform: Ws, + passwd: Ln.hash(t), + platform: Zs, ...n -}).then(({ token: s }) => (window.localStorage.setItem(Vt, s), s)), Ts = () => { - window.localStorage.removeItem(pt), window.localStorage.removeItem(Vt); +}).then(({ token: s }) => (window.localStorage.setItem(Lt, s), s)), Ss = () => { + window.localStorage.removeItem(ht), window.localStorage.removeItem(Lt); }; -He.interceptors.request.use((e) => { +Ye.configure({ showSpinner: !1 }); +Be.interceptors.request.use((e) => { e.headers.Platform = "web", e.headers.SaaS = window.localStorage.getItem("SaaS"); try { - const t = Lt(); + const t = Nt(); e.headers.Authorization = t ? `Bearer ${t} ` : void 0; } catch { } - return e; -}, (e) => Promise.reject({ code: -1, msg: e })); -He.interceptors.response.use(({ data: e, headers: t }) => ({ ...e, res: t == null ? void 0 : t.res }), function(e) { - return Promise.reject(e.message); + return Ye.inc(), e; +}, (e) => (Ye.done(), Promise.reject({ code: -1, msg: e }))); +Be.interceptors.response.use(({ data: e, headers: t }) => (Ye.done(), { ...e, res: t == null ? void 0 : t.res }), function(e) { + return Ye.done(), Promise.reject(e.message); }); -window.addEventListener("unhandledrejection", bt.onUnhandledRejection); -bt.onMsg = (e, t) => L[[0, 1].includes(e) ? "success" : "error"](t).then(() => e === 20300 && ke.redirect(we.get("Common.WEBSITE_LOGIN_PAGE"))); -const Gs = v.createContext({ +window.addEventListener("unhandledrejection", vt.onUnhandledRejection); +vt.onMsg = (e, t) => V[[0, 1].includes(e) ? "success" : "error"](t).then(() => e === 20300 && Re.redirect(Pe.get("Common.WEBSITE_LOGIN_PAGE"))); +const $s = v.createContext({ user: {}, initUser: () => { }, initUserComplete: !1 -}), ln = v.createContext({ +}), dn = v.createContext({ set: () => { }, get: () => { @@ -1726,27 +1734,27 @@ const Gs = v.createContext({ currentRoute: () => { } }); -var Oe, Me, xe, ce, Pe, We; -class un { +var Oe, Je, xe, ce, Ee, We; +class fn { constructor(t, n) { R(this, Oe, /* @__PURE__ */ new Map()); - R(this, Me, !0); + R(this, Je, !0); R(this, xe, []); R(this, ce, void 0); - R(this, Pe, () => u(this, ce)); + R(this, Ee, () => u(this, ce)); R(this, We, () => Promise.resolve()); - V(this, "get", (...t) => new Promise((n, s) => { + F(this, "get", (...t) => new Promise((n, s) => { const r = JSON.stringify(t); if (u(this, Oe).has(r)) return n(u(this, We).call(this, u(this, ce), ...t)); if (u(this, ce) === void 0) - u(this, xe).push([t, n, s]), u(this, Me) && (x(this, Me, !1), Promise.resolve(typeof u(this, Pe) == "function" ? u(this, Pe).call(this) : u(this, Pe)).then((o) => x(this, ce, o || null)).finally(() => { - u(this, xe).forEach(([o, i, a]) => { + u(this, xe).push([t, n, s]), u(this, Je) && (U(this, Je, !1), Promise.resolve(typeof u(this, Ee) == "function" ? u(this, Ee).call(this) : u(this, Ee)).then((o) => U(this, ce, o || null)).finally(() => { + u(this, xe).forEach(([o, i, c]) => { try { const l = u(this, We).call(this, u(this, ce), ...o); u(this, Oe).set(JSON.stringify(o), l), i(l); } catch (l) { - a(l); + c(l); } }), u(this, xe).length = 0; })); @@ -1755,105 +1763,105 @@ class un { u(this, Oe).set(r, o), n(o); } })); - x(this, We, n), x(this, Pe, t); + U(this, We, n), U(this, Ee, t); } } -Oe = new WeakMap(), Me = new WeakMap(), xe = new WeakMap(), ce = new WeakMap(), Pe = new WeakMap(), We = new WeakMap(); -var me, Ae; +Oe = new WeakMap(), Je = new WeakMap(), xe = new WeakMap(), ce = new WeakMap(), Ee = new WeakMap(), We = new WeakMap(); +var ge, Qe; const ne = class ne { constructor() { - R(this, Ae, null); - V(this, "init", (t) => x(this, Ae, t)); - V(this, "get", (t, n) => f.get(u(this, Ae), t, n)); - if (u(ne, me)) - return u(ne, me); + R(this, Qe, null); + F(this, "init", (t) => U(this, Qe, t)); + F(this, "get", (t, n) => d.get(u(this, Qe), t, n)); + if (u(ne, ge)) + return u(ne, ge); } }; -me = new WeakMap(), Ae = new WeakMap(), R(ne, me, null), V(ne, "getInstance", () => (u(ne, me) || x(ne, me, new ne()), u(ne, me))); -let ht = ne; -const we = ht.getInstance(), Ss = ({ component: e }) => { - const { base62params: t } = jn(); - return /* @__PURE__ */ d(Y, { children: /* @__PURE__ */ d( - Rt, +ge = new WeakMap(), Qe = new WeakMap(), R(ne, ge, null), F(ne, "getInstance", () => (u(ne, ge) || U(ne, ge, new ne()), u(ne, ge))); +let gt = ne; +const Pe = gt.getInstance(), zs = ({ component: e }) => { + const { base62params: t } = Hn(); + return /* @__PURE__ */ f(Y, { children: /* @__PURE__ */ f( + kt, { listCode: e, base62params: I.decode(t) } ) }); -}, $s = ({ component: e, $setting: t }) => { +}, Os = ({ component: e, $setting: t }) => { const [n, s] = k(); - N(() => { + L(() => { if (!e) - return s(/* @__PURE__ */ d(Empty, { description: null })); + return s(/* @__PURE__ */ f(Empty, { description: null })); J.getWidgetComponent(e).catch((o) => ({ default: () => `${o}` })).then((o) => v.createElement(o.default, { $setting: t })).then(s); }, [e]); const r = {}; return n ? v.cloneElement(n, r) : null; }; -var ye, q, be, ve, Je, Qe; +var me, q, ye, be, qe, _e; const se = class se { constructor() { R(this, q, /* @__PURE__ */ new Map()); - R(this, be, {}); - R(this, ve, null); - V(this, "init", (t, n) => { - x(this, q, t), x(this, be, n); + R(this, ye, {}); + R(this, be, null); + F(this, "init", (t, n) => { + U(this, q, t), U(this, ye, n); }); - V(this, "get", (t) => (u(this, q).has(t) || (t = Array.from(u(this, q).keys()).find((n) => u(this, q).get(n).uri === t)), u(this, q).get(t) || {})); - V(this, "redirect", (t, n, s = {}) => { + F(this, "get", (t) => (u(this, q).has(t) || (t = Array.from(u(this, q).keys()).find((n) => u(this, q).get(n).uri === t)), u(this, q).get(t) || {})); + F(this, "redirect", (t, n, s = {}) => { const { uri: r, type: o, widgetProps: i } = this.get(t) || {}; - let a = Xn(r || t, o != "list" ? n : f.mapValues(n, (c) => I.encode(c))); + let c = Bn(r || t, o != "list" ? n : d.mapValues(n, (a) => I.encode(a))); const l = new URLSearchParams(); - for (const c in i || {}) - (i == null ? void 0 : i.type) == "query" && l.append(c, n[c]); - return l.size > 0 && (a = `${a}?${l.toString()}`), u(this, ve).navigate(a, s); + for (const a in i || {}) + (i == null ? void 0 : i.type) == "query" && l.append(a, n[a]); + return l.size > 0 && (c = `${c}?${l.toString()}`), u(this, be).navigate(c, s); }); /** * * @param {*} category // user, system, navigator * @returns */ - V(this, "getMenus", (t) => { + F(this, "getMenus", (t) => { var n; - return ((n = u(this, be)) == null ? void 0 : n[t]) || []; + return ((n = u(this, ye)) == null ? void 0 : n[t]) || []; }); - V(this, "findMenuPathByUuid", (t) => { + F(this, "findMenuPathByUuid", (t) => { let n = []; - for (const s in u(this, be)) - if (n = u(this, Je).call(this, u(this, be)[s], t, [s]), n.length > 1) + for (const s in u(this, ye)) + if (n = u(this, qe).call(this, u(this, ye)[s], t, [s]), n.length > 1) return n; return n; }); - V(this, "getMenusByRouteUuid", (t) => u(this, Qe).call(this, t, Object.values(u(this, be)).flat())); - R(this, Je, (t, n, s = []) => { - if (f.isEmpty(t)) + F(this, "getMenusByRouteUuid", (t) => u(this, _e).call(this, t, Object.values(u(this, ye)).flat())); + R(this, qe, (t, n, s = []) => { + if (d.isEmpty(t)) return s; for (const { uuid: r, children: o } of t) { if (r == n) return s.concat(r); - if (!f.isEmpty(o)) - return s.concat(r, u(this, Je).call(this, o, n)); + if (!d.isEmpty(o)) + return s.concat(r, u(this, qe).call(this, o, n)); } return s; }); - R(this, Qe, (t, n) => { + R(this, _e, (t, n) => { var r; let s = []; for (const o of n) - o.widgetType == "redirect" && (o.uuid == t || o.widget == t ? s.push(o) : (r = o.children) != null && r.length && (s = s.concat(u(this, Qe).call(this, t, o.children)))); + o.widgetType == "redirect" && (o.uuid == t || o.widget == t ? s.push(o) : (r = o.children) != null && r.length && (s = s.concat(u(this, _e).call(this, t, o.children)))); return s; }); - V(this, "getCurrentMenu", () => { + F(this, "getCurrentMenu", () => { const { uuid: t } = this.getCurrentRoute() || {}; if (!t) return; const n = this.getMenusByRouteUuid(t); - if (!f.isEmpty(n)) + if (!d.isEmpty(n)) return n[0]; }); - V(this, "getCurrentRoute", (t = 0) => { + F(this, "getCurrentRoute", (t = 0) => { var s; - const n = (s = u(this, ve).state.matches[u(this, ve).state.matches.length - 1 - t]) == null ? void 0 : s.route; + const n = (s = u(this, be).state.matches[u(this, be).state.matches.length - 1 - t]) == null ? void 0 : s.route; if (!n) return null; for (let [r, o] of u(this, q)) @@ -1861,36 +1869,36 @@ const se = class se { return o; return null; }); - V(this, "getPageParams", (t) => { + F(this, "getPageParams", (t) => { var o; - const { location: n, matches: s } = u(this, ve).state, r = ((o = s[s.length - 1]) == null ? void 0 : o.params) || {}; - return n.search && new URLSearchParams(n.search).forEach((i, a) => { - r[a] = i; - }), t ? f.get(r, t) : r; + const { location: n, matches: s } = u(this, be).state, r = ((o = s[s.length - 1]) == null ? void 0 : o.params) || {}; + return n.search && new URLSearchParams(n.search).forEach((i, c) => { + r[c] = i; + }), t ? d.get(r, t) : r; }); - V(this, "createBrowserRouter", (t = {}) => { + F(this, "createBrowserRouter", (t = {}) => { if (u(this, q).size == 0) return null; - const n = we.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/frameworks/BasicLayout"), s = we.get(Zs() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"), r = { [n]: 0 }, o = Array.from(u(this, q).values()).reduce((i, { uuid: a, uri: l, name: c, type: p, component: g, widgetSetting: m, isLogin: h, isLayout: y, extra: b }) => { - let F = {}, E = 0; + const n = Pe.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/frameworks/BasicLayout"), s = Pe.get(Gs() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"), r = { [n]: 0 }, o = Array.from(u(this, q).values()).reduce((i, { uuid: c, uri: l, name: a, type: p, component: g, widgetSetting: m, isLogin: h, isLayout: y, extra: b }) => { + let N = {}, w = 0; switch (p) { case "list": - F.element = v.createElement(Ss, { component: g }); + N.element = v.createElement(zs, { component: g }); break; case "fsdpf-component": - F.element = v.createElement($s, { key: g, component: g, $setting: m }); + N.element = v.createElement(Os, { key: g, component: g, $setting: m }); break; } if (b != null && b.layout) if (r[b == null ? void 0 : b.layout]) - E = r[b == null ? void 0 : b.layout]; + w = r[b == null ? void 0 : b.layout]; else return r[b == null ? void 0 : b.layout] = i.length, [...i, { path: "/", - lazy: () => J.getWidgetComponent(b == null ? void 0 : b.layout).then((T) => ({ Component: T.default })), - children: [{ path: l, ...F }] + lazy: () => J.getWidgetComponent(b == null ? void 0 : b.layout).then(($) => ({ Component: $.default })), + children: [{ path: l, ...N }] }]; - return y && E > -1 ? (i[E].children.push({ path: l, ...F }), i) : [...i, { path: l, ...F }]; + return y && w > -1 ? (i[w].children.push({ path: l, ...N }), i) : [...i, { path: l, ...N }]; }, [ { path: "/", @@ -1898,74 +1906,74 @@ const se = class se { children: [] } ]); - return o.push({ index: !0, element: v.createElement(Hn, { to: s, replace: !0 }) }), x(this, ve, Bn(o, t)); + return o.push({ index: !0, element: v.createElement(Yn, { to: s, replace: !0 }) }), U(this, be, Kn(o, t)); }); - if (u(se, ye)) - return u(se, ye); + if (u(se, me)) + return u(se, me); } }; -ye = new WeakMap(), q = new WeakMap(), be = new WeakMap(), ve = new WeakMap(), Je = new WeakMap(), Qe = new WeakMap(), R(se, ye, null), V(se, "getInstance", () => (u(se, ye) || x(se, ye, new se()), u(se, ye))); -let gt = se; -const ke = gt.getInstance(), Te = new Worker(new URL("data:text/plain;base64,KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2ltcG9ydFNjcmlwdHMoImh0dHBzOi8vYXNzZXRzLmZzZHBmLm5ldC9qcy91bWQvbG9kYXNoQDRfMTdfMjEubWluLmpzIiwiaHR0cHM6Ly9hc3NldHMuZnNkcGYubmV0L2pzL3VtZC9sb2Rhc2gubWl4aW4uanMiKSxpbXBvcnRTY3JpcHRzKCJodHRwczovL2Fzc2V0cy5mc2RwZi5uZXQvanMvdW1kL21vbWVudEAyXzI5XzQubWluLmpzIiwiaHR0cHM6Ly9hc3NldHMuZnNkcGYubmV0L2pzL3VtZC9tb21lbnQubG9jYWxlLnpoLWNuLmpzIiksbW9tZW50LmxvY2FsZSgiemgtY24iKTtjb25zdCBVdGlsPShlLHMpPT57Y29uc3QgdD1VdGlsLm1zZ19pZCsrO3JldHVybiBuZXcgUHJveHkoKCk9Pnt9LHtnZXQoe3Jvb3Q6YX0sbil7Y29uc3Qgbz1hP2Ake2F9LyR7bn1gOm47cmV0dXJuIGZ1bmN0aW9uKC4uLmkpe3JldHVybiBuZXcgUHJvbWlzZSgocixsKT0+e1V0aWwubVF1ZXVlLnNldCh0LFtyLGxdKSxzZWxmLnBvc3RNZXNzYWdlKHtpZDp0LHRhc2tfaWQ6ZSxzZXNzaW9uOnMsY2F0ZWdvcnk6InV0aWwiLG1ldGhvZDpvLGFyZ3M6aX0pfSl9fSxhcHBseShhLG4sbyl7cmV0dXJuIG5ldyBQcm94eShPYmplY3QuY3JlYXRlKHtyb290Om9bMF18fG51bGx9KSx7Z2V0OnRoaXMuZ2V0fSl9fSl9O1V0aWwubXNnX2lkPTAsVXRpbC5tUXVldWU9bmV3IE1hcCxVdGlsLm1NZXRob2RXb3Jrc3BhY2U9bmV3IE1hcCxzZWxmLmFkZEV2ZW50TGlzdGVuZXIoIm1lc3NhZ2UiLGZ1bmN0aW9uKHtkYXRhOntpZDplLGRhdGE6cyxlcnJvcjp0LGNhdGVnb3J5OmF9fSl7YT09PSJ1dGlsIiYmKHQhPT1udWxsP1V0aWwubVF1ZXVlLmdldChlKVsxXSh0KTpVdGlsLm1RdWV1ZS5nZXQoZSlbMF0ocyksVXRpbC5tUXVldWUuZ2V0KGUpLFV0aWwubVF1ZXVlLmRlbGV0ZShlKSl9LCExKSxzZWxmLmFkZEV2ZW50TGlzdGVuZXIoIm1lc3NhZ2UiLCh7ZGF0YTp7aWQsbWV0aG9kLGFyZ3MsY2F0ZWdvcnksc2Vzc2lvbixzb3VyY2VVUkx9fSk9PntpZihjYXRlZ29yeSE9PSJldmFsIilyZXR1cm47c2Vzc2lvbiYmIVV0aWwubU1ldGhvZFdvcmtzcGFjZS5oYXMoc2Vzc2lvbikmJlV0aWwubU1ldGhvZFdvcmtzcGFjZS5zZXQoc2Vzc2lvbix7fSk7Y29uc3QgZXZhbERhdGFTb3VyY2VVUkw9c291cmNlVVJMP2AKLy8jIHNvdXJjZVVSTD1mZjovLy8uLyR7c291cmNlVVJMfWA6IiIsZXZhbERhdGE9ZXZhbChgKGFzeW5jIGZ1bmN0aW9uKHske09iamVjdC5rZXlzKGFyZ3MpLmpvaW4oIiwgIil9fSwgVXRpbCl7JHttZXRob2R9Cn0pJHtldmFsRGF0YVNvdXJjZVVSTH1gKS5jYWxsKHNlc3Npb24/VXRpbC5tTWV0aG9kV29ya3NwYWNlLmdldChzZXNzaW9uKTp7fSxhcmdzLFV0aWwoaWQsc2Vzc2lvbikpO3JldHVybiBQcm9taXNlLnJlc29sdmUoZXZhbERhdGEpLnRoZW4oZT0+e3NlbGYucG9zdE1lc3NhZ2Uoe2lkLHNlc3Npb24sY2F0ZWdvcnksZGF0YTplLGVycm9yOm51bGx9KX0pLmNhdGNoKGU9PntzZWxmLnBvc3RNZXNzYWdlKHtpZCxzZXNzaW9uLGNhdGVnb3J5LGRhdGE6bnVsbCxlcnJvcjplIGluc3RhbmNlb2YgRE9NRXhjZXB0aW9uJiZlLm5hbWU9PT0iRGF0YUNsb25lRXJyb3IiPyJEYXRhQ2xvbmVFcnJvciDov5Tlm57nu5Pmnpzlj6rog73kuLrnroDljZXmlbDmja7moLzlvI8iOmV9KX0pfSksc2VsZi5hZGRFdmVudExpc3RlbmVyKCJtZXNzYWdlIiwoe2RhdGE6e2NhdGVnb3J5OmUsc2Vzc2lvbjpzfX0pPT57ZT09PSJjbGVhciImJlV0aWwubU1ldGhvZFdvcmtzcGFjZS5kZWxldGUocyl9LCExKX0pKCk7Cg==", self.location)), zt = { - getConfigure: (e) => we.get(e), +me = new WeakMap(), q = new WeakMap(), ye = new WeakMap(), be = new WeakMap(), qe = new WeakMap(), _e = new WeakMap(), R(se, me, null), F(se, "getInstance", () => (u(se, me) || U(se, me, new se()), u(se, me))); +let mt = se; +const Re = mt.getInstance(), Te = new Worker(new URL("data:text/plain;base64,KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2ltcG9ydFNjcmlwdHMoImh0dHBzOi8vYXNzZXRzLmZzZHBmLm5ldC9qcy91bWQvbG9kYXNoQDRfMTdfMjEubWluLmpzIiwiaHR0cHM6Ly9hc3NldHMuZnNkcGYubmV0L2pzL3VtZC9sb2Rhc2gubWl4aW4uanMiKSxpbXBvcnRTY3JpcHRzKCJodHRwczovL2Fzc2V0cy5mc2RwZi5uZXQvanMvdW1kL21vbWVudEAyXzI5XzQubWluLmpzIiwiaHR0cHM6Ly9hc3NldHMuZnNkcGYubmV0L2pzL3VtZC9tb21lbnQubG9jYWxlLnpoLWNuLmpzIiksbW9tZW50LmxvY2FsZSgiemgtY24iKTtjb25zdCBVdGlsPShlLHMpPT57Y29uc3QgdD1VdGlsLm1zZ19pZCsrO3JldHVybiBuZXcgUHJveHkoKCk9Pnt9LHtnZXQoe3Jvb3Q6YX0sbil7Y29uc3Qgbz1hP2Ake2F9LyR7bn1gOm47cmV0dXJuIGZ1bmN0aW9uKC4uLmkpe3JldHVybiBuZXcgUHJvbWlzZSgocixsKT0+e1V0aWwubVF1ZXVlLnNldCh0LFtyLGxdKSxzZWxmLnBvc3RNZXNzYWdlKHtpZDp0LHRhc2tfaWQ6ZSxzZXNzaW9uOnMsY2F0ZWdvcnk6InV0aWwiLG1ldGhvZDpvLGFyZ3M6aX0pfSl9fSxhcHBseShhLG4sbyl7cmV0dXJuIG5ldyBQcm94eShPYmplY3QuY3JlYXRlKHtyb290Om9bMF18fG51bGx9KSx7Z2V0OnRoaXMuZ2V0fSl9fSl9O1V0aWwubXNnX2lkPTAsVXRpbC5tUXVldWU9bmV3IE1hcCxVdGlsLm1NZXRob2RXb3Jrc3BhY2U9bmV3IE1hcCxzZWxmLmFkZEV2ZW50TGlzdGVuZXIoIm1lc3NhZ2UiLGZ1bmN0aW9uKHtkYXRhOntpZDplLGRhdGE6cyxlcnJvcjp0LGNhdGVnb3J5OmF9fSl7YT09PSJ1dGlsIiYmKHQhPT1udWxsP1V0aWwubVF1ZXVlLmdldChlKVsxXSh0KTpVdGlsLm1RdWV1ZS5nZXQoZSlbMF0ocyksVXRpbC5tUXVldWUuZ2V0KGUpLFV0aWwubVF1ZXVlLmRlbGV0ZShlKSl9LCExKSxzZWxmLmFkZEV2ZW50TGlzdGVuZXIoIm1lc3NhZ2UiLCh7ZGF0YTp7aWQsbWV0aG9kLGFyZ3MsY2F0ZWdvcnksc2Vzc2lvbixzb3VyY2VVUkx9fSk9PntpZihjYXRlZ29yeSE9PSJldmFsIilyZXR1cm47c2Vzc2lvbiYmIVV0aWwubU1ldGhvZFdvcmtzcGFjZS5oYXMoc2Vzc2lvbikmJlV0aWwubU1ldGhvZFdvcmtzcGFjZS5zZXQoc2Vzc2lvbix7fSk7Y29uc3QgZXZhbERhdGFTb3VyY2VVUkw9c291cmNlVVJMP2AKLy8jIHNvdXJjZVVSTD1mZjovLy8uLyR7c291cmNlVVJMfWA6IiIsZXZhbERhdGE9ZXZhbChgKGFzeW5jIGZ1bmN0aW9uKHske09iamVjdC5rZXlzKGFyZ3MpLmpvaW4oIiwgIil9fSwgVXRpbCl7JHttZXRob2R9Cn0pJHtldmFsRGF0YVNvdXJjZVVSTH1gKS5jYWxsKHNlc3Npb24/VXRpbC5tTWV0aG9kV29ya3NwYWNlLmdldChzZXNzaW9uKTp7fSxhcmdzLFV0aWwoaWQsc2Vzc2lvbikpO3JldHVybiBQcm9taXNlLnJlc29sdmUoZXZhbERhdGEpLnRoZW4oZT0+e3NlbGYucG9zdE1lc3NhZ2Uoe2lkLHNlc3Npb24sY2F0ZWdvcnksZGF0YTplLGVycm9yOm51bGx9KX0pLmNhdGNoKGU9PntzZWxmLnBvc3RNZXNzYWdlKHtpZCxzZXNzaW9uLGNhdGVnb3J5LGRhdGE6bnVsbCxlcnJvcjplIGluc3RhbmNlb2YgRE9NRXhjZXB0aW9uJiZlLm5hbWU9PT0iRGF0YUNsb25lRXJyb3IiPyJEYXRhQ2xvbmVFcnJvciDov5Tlm57nu5Pmnpzlj6rog73kuLrnroDljZXmlbDmja7moLzlvI8iOmV9KX0pfSksc2VsZi5hZGRFdmVudExpc3RlbmVyKCJtZXNzYWdlIiwoe2RhdGE6e2NhdGVnb3J5OmUsc2Vzc2lvbjpzfX0pPT57ZT09PSJjbGVhciImJlV0aWwubU1ldGhvZFdvcmtzcGFjZS5kZWxldGUocyl9LCExKX0pKCk7Cg==", self.location)), xt = { + getConfigure: (e) => Pe.get(e), route: { - redirect: (...e) => ke.redirect(...e), - getPageParams: (...e) => ke.getPageParams(...e), - getCurrentRoute: () => ke.getCurrentRoute() + redirect: (...e) => Re.redirect(...e), + getPageParams: (...e) => Re.getPageParams(...e), + getCurrentRoute: () => Re.getCurrentRoute() }, modal: { - notification: (...e) => L.notification(...e), - success: (...e) => L.success(...e), - error: (...e) => L.error(...e), - form: (...e) => L.form(...e) + notification: (...e) => V.notification(...e), + success: (...e) => V.success(...e), + error: (...e) => V.error(...e), + form: (...e) => V.form(...e) }, popup: { - notification: (...e) => L.notification(...e), - success: (...e) => L.success(...e), - error: (...e) => L.error(...e), - form: (...e) => L.form(...e) + notification: (...e) => V.notification(...e), + success: (...e) => V.success(...e), + error: (...e) => V.error(...e), + form: (...e) => V.form(...e) } }; -var ot, Ue, Ce; -const W = class W { +var at, Ue, ve; +const P = class P { constructor() { - V(this, "exec", (t, n = {}, s = {}, r = "") => new Promise((o, i) => { - const a = Xe(W, ot)._++; - u(W, Ue).set(a, s), W.mQueue.set(a, [o, i]), Te.postMessage({ id: a, session: r, category: "eval", method: t, args: n }); + F(this, "exec", (t, n = {}, s = {}, r = "") => new Promise((o, i) => { + const c = He(P, at)._++; + u(P, Ue).set(c, s), P.mQueue.set(c, [o, i]), Te.postMessage({ id: c, session: r, category: "eval", method: t, args: n }); })); - V(this, "clear", (t) => Te.postMessage({ session: t, category: "clear" })); - if (u(W, Ce)) - return u(W, Ce); - Promise.resolve().then(() => zs).then((t) => { - zt.http = t.http; - }), Te.addEventListener("message", ({ data: { id: t, task_id: n, method: s, args: r, category: o, data: i, error: a, session: l } }) => { - if (o === "eval" && W.mQueue.has(t)) - a !== null ? W.mQueue.get(t)[1](a) : W.mQueue.get(t)[0](i), u(W, Ue).delete(t), W.mQueue.delete(t); + F(this, "clear", (t) => Te.postMessage({ session: t, category: "clear" })); + if (u(P, ve)) + return u(P, ve); + Promise.resolve().then(() => xs).then((t) => { + xt.http = t.http; + }), Te.addEventListener("message", ({ data: { id: t, task_id: n, method: s, args: r, category: o, data: i, error: c, session: l } }) => { + if (o === "eval" && P.mQueue.has(t)) + c !== null ? P.mQueue.get(t)[1](c) : P.mQueue.get(t)[0](i), u(P, Ue).delete(t), P.mQueue.delete(t); else if (o === "util") try { - const c = f.get(zt, s.split("/")) || f.get(u(W, Ue).get(n), s.split("/")); - if (!f.isFunction(c)) + const a = d.get(xt, s.split("/")) || d.get(u(P, Ue).get(n), s.split("/")); + if (!d.isFunction(a)) throw `${s} not found`; - Promise.resolve(Reflect.apply(c, void 0, r)).then((p) => { + Promise.resolve(Reflect.apply(a, void 0, r)).then((p) => { Te.postMessage({ id: t, task_id: n, category: o, method: s, args: r, session: l, data: p, error: null }); }).catch((p) => { Te.postMessage({ id: t, task_id: n, category: o, method: s, args: r, session: l, data: null, error: p }); }); - } catch (c) { - Te.postMessage({ id: t, task_id: n, category: o, method: s, args: r, session: l, data: null, error: c }); + } catch (a) { + Te.postMessage({ id: t, task_id: n, category: o, method: s, args: r, session: l, data: null, error: a }); } }, !1); } }; -ot = new WeakMap(), Ue = new WeakMap(), Ce = new WeakMap(), V(W, "mQueue", /* @__PURE__ */ new Map()), R(W, ot, 0), R(W, Ue, /* @__PURE__ */ new Map()), R(W, Ce, null), V(W, "getInstance", () => (u(W, Ce) || x(W, Ce, new W()), u(W, Ce))); -let mt = W; -const Fe = mt.getInstance(); -var Re, A; +at = new WeakMap(), Ue = new WeakMap(), ve = new WeakMap(), F(P, "mQueue", /* @__PURE__ */ new Map()), R(P, at, 0), R(P, Ue, /* @__PURE__ */ new Map()), R(P, ve, null), F(P, "getInstance", () => (u(P, ve) || U(P, ve, new P()), u(P, ve))); +let yt = P; +const ke = yt.getInstance(); +var Ce, A; const re = class re { constructor() { R(this, A, /* @__PURE__ */ new Map()); - V(this, "setVendor", (t, n) => u(this, A).set(t, new un(n, (s, r) => s.dynamicRequireFsdpfComponent(r)))); - V(this, "getWidgetComponent", async (t) => { + F(this, "setVendor", (t, n) => u(this, A).set(t, new fn(n, (s, r) => s.dynamicRequireFsdpfComponent(r)))); + F(this, "getWidgetComponent", async (t) => { if (!t) throw "getWidgetComponent widget is required"; const [, n] = t == null ? void 0 : t.split("@ff/"), [, s] = t == null ? void 0 : t.split("@app/"), [, r] = t == null ? void 0 : t.split("@pkg/"), [, o] = t == null ? void 0 : t.split("@fsdpf/"); @@ -1984,13 +1992,13 @@ const re = class re { throw i; } }); - if (u(re, Re)) - return u(re, Re); + if (u(re, Ce)) + return u(re, Ce); } }; -Re = new WeakMap(), A = new WeakMap(), R(re, Re, null), V(re, "getInstance", () => (u(re, Re) || x(re, Re, new re()), u(re, Re))); -let yt = re; -const J = yt.getInstance(), Ot = { +Ce = new WeakMap(), A = new WeakMap(), R(re, Ce, null), F(re, "getInstance", () => (u(re, Ce) || U(re, Ce, new re()), u(re, Ce))); +let bt = re; +const J = bt.getInstance(), Ut = { null2json: (e) => null, null2array: (e) => null, null2number: (e) => null, @@ -2048,48 +2056,48 @@ const J = yt.getInstance(), Ot = { boolean2bool: (e) => e, boolean2string: (e) => e ? "true" : "false" }; -f.mixin({ - toPairsDeep: (e, t) => f.flatMap( - f.toPairs(e), - ([n, s]) => f.isObjectLike(s) ? f.toPairsDeep(s, n) : [[`${f.isUndefined(t) ? "" : t + "."}${n}`, s]] +d.mixin({ + toPairsDeep: (e, t) => d.flatMap( + d.toPairs(e), + ([n, s]) => d.isObjectLike(s) ? d.toPairsDeep(s, n) : [[`${d.isUndefined(t) ? "" : t + "."}${n}`, s]] ), - deepSome: (e, t = () => !1) => f.some(e, (n) => { - if (f.some(n, t)) + deepSome: (e, t = () => !1) => d.some(e, (n) => { + if (d.some(n, t)) return !0; - if (!f.isEmpty(n) && (f.isPlainObject(n) || f.isArray(n))) - return f.deepSome(n, t); + if (!d.isEmpty(n) && (d.isPlainObject(n) || d.isArray(n))) + return d.deepSome(n, t); }), toPrimitive: (e, t) => { let n = "string"; - Array.isArray(e) ? n = "array" : n = typeof e, f.isObject(e) && (n = "json"); + Array.isArray(e) ? n = "array" : n = typeof e, d.isObject(e) && (n = "json"); const s = `${n}2${t}`; - return Reflect.has(Ot, s) ? Ot[s](e) : e; + return Reflect.has(Ut, s) ? Ut[s](e) : e; }, - replaceKeys: (e, t) => !e || typeof e != "object" ? e : Array.isArray(e) ? e.map((n) => f.replaceKeys(n, t)) : Object.keys(e).reduce((n, s) => (t[s] ? n[t[s]] = f.replaceKeys(e[s], t) : n[s] = f.replaceKeys(e[s], t), n), {}) + replaceKeys: (e, t) => !e || typeof e != "object" ? e : Array.isArray(e) ? e.map((n) => d.replaceKeys(n, t)) : Object.keys(e).reduce((n, s) => (t[s] ? n[t[s]] = d.replaceKeys(e[s], t) : n[s] = d.replaceKeys(e[s], t), n), {}) }); -let Nt = ""; +let It = ""; const I = { init: (e, t, n) => { - He.defaults.baseURL = Nt = n, He.defaults.timeout = 15e3, Object.assign(I, new bt(e, t, He)); + Be.defaults.baseURL = It = n, Be.defaults.timeout = 15e3, Object.assign(I, new vt(e, t, Be)); } -}, It = (e) => { +}, wt = (e) => { var t; return e && (e == null ? void 0 : e.name) && ((e == null ? void 0 : e.prototype) instanceof v.Component || (e == null ? void 0 : e.name.substr(0, 1)) === ((t = e.name.substr(0, 1)) == null ? void 0 : t.toUpperCase())); -}, zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ +}, xs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, - AppGlobalParamsContext: ln, + AppGlobalParamsContext: dn, get AppUrl() { - return Nt; + return It; }, - cache: un, - configure: we, + cache: fn, + configure: Pe, core: J, - default: Gs, - func: Fe, + default: $s, + func: ke, http: I, - isReactComponent: It, - route: ke -}, Symbol.toStringTag, { value: "Module" })), lr = () => I.get("/api/my-router").then((e) => [ + isReactComponent: wt, + route: Re +}, Symbol.toStringTag, { value: "Module" })), dr = () => I.get("/api/my-router").then((e) => [ ...e, { 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" } }, @@ -2100,68 +2108,68 @@ const I = { { 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: t, ...n }) => [t, { uuid: t, ...n }])).then((e) => new Map(e)), ur = () => I.get("/api/my-menu"), dr = () => I.get("api/init-configure"), fr = () => I.get("/api/init-widget-operation-auth").then((e) => e.reduce((t, { uuid: n, auth: s }) => [...t, [n, s]], [])), pr = (e) => I.get(`/api/user-wx-phone-number/${e}`); +].map(({ uuid: t, ...n }) => [t, { uuid: t, ...n }])).then((e) => new Map(e)), fr = () => I.get("/api/my-menu"), pr = () => I.get("api/init-configure"), hr = () => I.get("/api/init-widget-operation-auth").then((e) => e.reduce((t, { uuid: n, auth: s }) => [...t, [n, s]], [])), gr = (e) => I.get(`/api/user-wx-phone-number/${e}`); export { - we as $, - Gt as A, + Pe as $, + $t as A, C as B, - Rs as C, - en as D, - ks as E, + Fs as C, + nn as D, + Vs as E, Y as F, - rr as G, - cs as H, - Ct as I, - Mt as J, - cn as K, - es as L, - Es as M, - vt as N, - Lt as O, - Zs as P, - ar as Q, - jt as R, - je as S, - cr as T, - Ts as U, - Nt as V, + ir as G, + us as H, + Rt as I, + Jt as J, + un as K, + ns as L, + Ws as M, + Ct as N, + Nt as O, + Gs as P, + lr as Q, + Ht as R, + Xe as S, + ur as T, + Ss as U, + It as V, I as W, - It as X, - Gs as Y, - ln as Z, - un as _, - tr as a, - Fe as a0, + wt as X, + $s as Y, + dn as Z, + fn as _, + sr as a, + ke as a0, J as a1, - ke as a2, - lr as a3, - ur as a4, - dr as a5, - fr as a6, - pr as a7, - Zt as b, - Jn as c, - at as d, - nr as e, - sr as f, - er as g, - Jt as h, - L as i, - rn as j, - Yt as k, - ms as l, - tn as m, - nn as n, - kt as o, - sn as p, - Rt as q, + Re as a2, + dr as a3, + fr as a4, + pr as a5, + hr as a6, + gr as a7, + Gt as b, + qn as c, + lt as d, + rr as e, + or as f, + nr as g, + qt as h, + V as i, + an as j, + Mt as k, + bs as l, + sn as m, + rn as n, + Ft as o, + on as p, + kt as q, Ze as r, - on as s, - an as t, - Xt as u, - ls as v, - fs as w, - ps as x, - or as y, - ir as z + cn as s, + ln as t, + Bt as u, + ds as v, + hs as w, + gs as x, + ar as y, + cr as z }; diff --git a/dist/common/vender-B-S-5jfg.js b/dist/common/vender-B-S-5jfg.js deleted file mode 100644 index d929bcf..0000000 --- a/dist/common/vender-B-S-5jfg.js +++ /dev/null @@ -1,670 +0,0 @@ -function Ee(o) { - return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o; -} -var ae = { exports: {} }, V = { exports: {} }, h = {}; -/** @license React v16.13.1 - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -var se; -function ge() { - if (se) - return h; - se = 1; - var o = typeof Symbol == "function" && Symbol.for, j = o ? Symbol.for("react.element") : 60103, O = o ? Symbol.for("react.portal") : 60106, y = o ? Symbol.for("react.fragment") : 60107, S = o ? Symbol.for("react.strict_mode") : 60108, a = o ? Symbol.for("react.profiler") : 60114, P = o ? Symbol.for("react.provider") : 60109, l = o ? Symbol.for("react.context") : 60110, _ = o ? Symbol.for("react.async_mode") : 60111, g = o ? Symbol.for("react.concurrent_mode") : 60111, b = o ? Symbol.for("react.forward_ref") : 60112, E = o ? Symbol.for("react.suspense") : 60113, C = o ? Symbol.for("react.suspense_list") : 60120, w = o ? Symbol.for("react.memo") : 60115, M = o ? Symbol.for("react.lazy") : 60116, R = o ? Symbol.for("react.block") : 60121, I = o ? Symbol.for("react.fundamental") : 60117, Y = o ? Symbol.for("react.responder") : 60118, F = o ? Symbol.for("react.scope") : 60119; - function A(t) { - if (typeof t == "object" && t !== null) { - var k = t.$$typeof; - switch (k) { - case j: - switch (t = t.type, t) { - case _: - case g: - case y: - case a: - case S: - case E: - return t; - default: - switch (t = t && t.$$typeof, t) { - case l: - case b: - case M: - case w: - case P: - return t; - default: - return k; - } - } - case O: - return k; - } - } - } - function x(t) { - return A(t) === g; - } - return h.AsyncMode = _, h.ConcurrentMode = g, h.ContextConsumer = l, h.ContextProvider = P, h.Element = j, h.ForwardRef = b, h.Fragment = y, h.Lazy = M, h.Memo = w, h.Portal = O, h.Profiler = a, h.StrictMode = S, h.Suspense = E, h.isAsyncMode = function(t) { - return x(t) || A(t) === _; - }, h.isConcurrentMode = x, h.isContextConsumer = function(t) { - return A(t) === l; - }, h.isContextProvider = function(t) { - return A(t) === P; - }, h.isElement = function(t) { - return typeof t == "object" && t !== null && t.$$typeof === j; - }, h.isForwardRef = function(t) { - return A(t) === b; - }, h.isFragment = function(t) { - return A(t) === y; - }, h.isLazy = function(t) { - return A(t) === M; - }, h.isMemo = function(t) { - return A(t) === w; - }, h.isPortal = function(t) { - return A(t) === O; - }, h.isProfiler = function(t) { - return A(t) === a; - }, h.isStrictMode = function(t) { - return A(t) === S; - }, h.isSuspense = function(t) { - return A(t) === E; - }, h.isValidElementType = function(t) { - return typeof t == "string" || typeof t == "function" || t === y || t === g || t === a || t === S || t === E || t === C || typeof t == "object" && t !== null && (t.$$typeof === M || t.$$typeof === w || t.$$typeof === P || t.$$typeof === l || t.$$typeof === b || t.$$typeof === I || t.$$typeof === Y || t.$$typeof === F || t.$$typeof === R); - }, h.typeOf = A, h; -} -var T = {}; -/** @license React v16.13.1 - * react-is.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -var fe; -function Se() { - return fe || (fe = 1, process.env.NODE_ENV !== "production" && function() { - var o = typeof Symbol == "function" && Symbol.for, j = o ? Symbol.for("react.element") : 60103, O = o ? Symbol.for("react.portal") : 60106, y = o ? Symbol.for("react.fragment") : 60107, S = o ? Symbol.for("react.strict_mode") : 60108, a = o ? Symbol.for("react.profiler") : 60114, P = o ? Symbol.for("react.provider") : 60109, l = o ? Symbol.for("react.context") : 60110, _ = o ? Symbol.for("react.async_mode") : 60111, g = o ? Symbol.for("react.concurrent_mode") : 60111, b = o ? Symbol.for("react.forward_ref") : 60112, E = o ? Symbol.for("react.suspense") : 60113, C = o ? Symbol.for("react.suspense_list") : 60120, w = o ? Symbol.for("react.memo") : 60115, M = o ? Symbol.for("react.lazy") : 60116, R = o ? Symbol.for("react.block") : 60121, I = o ? Symbol.for("react.fundamental") : 60117, Y = o ? Symbol.for("react.responder") : 60118, F = o ? Symbol.for("react.scope") : 60119; - function A(r) { - return typeof r == "string" || typeof r == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. - r === y || r === g || r === a || r === S || r === E || r === C || typeof r == "object" && r !== null && (r.$$typeof === M || r.$$typeof === w || r.$$typeof === P || r.$$typeof === l || r.$$typeof === b || r.$$typeof === I || r.$$typeof === Y || r.$$typeof === F || r.$$typeof === R); - } - function x(r) { - if (typeof r == "object" && r !== null) { - var D = r.$$typeof; - switch (D) { - case j: - var B = r.type; - switch (B) { - case _: - case g: - case y: - case a: - case S: - case E: - return B; - default: - var ue = B && B.$$typeof; - switch (ue) { - case l: - case b: - case M: - case w: - case P: - return ue; - default: - return D; - } - } - case O: - return D; - } - } - } - var t = _, k = g, N = l, H = P, J = j, X = b, U = y, G = M, K = w, L = O, Z = a, q = S, W = E, z = !1; - function Q(r) { - return z || (z = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), e(r) || x(r) === _; - } - function e(r) { - return x(r) === g; - } - function n(r) { - return x(r) === l; - } - function f(r) { - return x(r) === P; - } - function u(r) { - return typeof r == "object" && r !== null && r.$$typeof === j; - } - function i(r) { - return x(r) === b; - } - function p(r) { - return x(r) === y; - } - function c(r) { - return x(r) === M; - } - function s(r) { - return x(r) === w; - } - function d(r) { - return x(r) === O; - } - function m(r) { - return x(r) === a; - } - function v(r) { - return x(r) === S; - } - function $(r) { - return x(r) === E; - } - T.AsyncMode = t, T.ConcurrentMode = k, T.ContextConsumer = N, T.ContextProvider = H, T.Element = J, T.ForwardRef = X, T.Fragment = U, T.Lazy = G, T.Memo = K, T.Portal = L, T.Profiler = Z, T.StrictMode = q, T.Suspense = W, T.isAsyncMode = Q, T.isConcurrentMode = e, T.isContextConsumer = n, T.isContextProvider = f, T.isElement = u, T.isForwardRef = i, T.isFragment = p, T.isLazy = c, T.isMemo = s, T.isPortal = d, T.isProfiler = m, T.isStrictMode = v, T.isSuspense = $, T.isValidElementType = A, T.typeOf = x; - }()), T; -} -var le; -function Te() { - return le || (le = 1, process.env.NODE_ENV === "production" ? V.exports = ge() : V.exports = Se()), V.exports; -} -/* -object-assign -(c) Sindre Sorhus -@license MIT -*/ -var ee, ye; -function Pe() { - if (ye) - return ee; - ye = 1; - var o = Object.getOwnPropertySymbols, j = Object.prototype.hasOwnProperty, O = Object.prototype.propertyIsEnumerable; - function y(a) { - if (a == null) - throw new TypeError("Object.assign cannot be called with null or undefined"); - return Object(a); - } - function S() { - try { - if (!Object.assign) - return !1; - var a = new String("abc"); - if (a[5] = "de", Object.getOwnPropertyNames(a)[0] === "5") - return !1; - for (var P = {}, l = 0; l < 10; l++) - P["_" + String.fromCharCode(l)] = l; - var _ = Object.getOwnPropertyNames(P).map(function(b) { - return P[b]; - }); - if (_.join("") !== "0123456789") - return !1; - var g = {}; - return "abcdefghijklmnopqrst".split("").forEach(function(b) { - g[b] = b; - }), Object.keys(Object.assign({}, g)).join("") === "abcdefghijklmnopqrst"; - } catch { - return !1; - } - } - return ee = S() ? Object.assign : function(a, P) { - for (var l, _ = y(a), g, b = 1; b < arguments.length; b++) { - l = Object(arguments[b]); - for (var E in l) - j.call(l, E) && (_[E] = l[E]); - if (o) { - g = o(l); - for (var C = 0; C < g.length; C++) - O.call(l, g[C]) && (_[g[C]] = l[g[C]]); - } - } - return _; - }, ee; -} -var re, pe; -function ce() { - if (pe) - return re; - pe = 1; - var o = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"; - return re = o, re; -} -var te, de; -function me() { - return de || (de = 1, te = Function.call.bind(Object.prototype.hasOwnProperty)), te; -} -var ne, ve; -function Oe() { - if (ve) - return ne; - ve = 1; - var o = function() { - }; - if (process.env.NODE_ENV !== "production") { - var j = ce(), O = {}, y = me(); - o = function(a) { - var P = "Warning: " + a; - typeof console < "u" && console.error(P); - try { - throw new Error(P); - } catch { - } - }; - } - function S(a, P, l, _, g) { - if (process.env.NODE_ENV !== "production") { - for (var b in a) - if (y(a, b)) { - var E; - try { - if (typeof a[b] != "function") { - var C = Error( - (_ || "React class") + ": " + l + " type `" + b + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[b] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`." - ); - throw C.name = "Invariant Violation", C; - } - E = a[b](P, b, _, l, null, j); - } catch (M) { - E = M; - } - if (E && !(E instanceof Error) && o( - (_ || "React class") + ": type specification of " + l + " `" + b + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof E + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)." - ), E instanceof Error && !(E.message in O)) { - O[E.message] = !0; - var w = g ? g() : ""; - o( - "Failed " + l + " type: " + E.message + (w ?? "") - ); - } - } - } - } - return S.resetWarningCache = function() { - process.env.NODE_ENV !== "production" && (O = {}); - }, ne = S, ne; -} -var oe, be; -function _e() { - if (be) - return oe; - be = 1; - var o = Te(), j = Pe(), O = ce(), y = me(), S = Oe(), a = function() { - }; - process.env.NODE_ENV !== "production" && (a = function(l) { - var _ = "Warning: " + l; - typeof console < "u" && console.error(_); - try { - throw new Error(_); - } catch { - } - }); - function P() { - return null; - } - return oe = function(l, _) { - var g = typeof Symbol == "function" && Symbol.iterator, b = "@@iterator"; - function E(e) { - var n = e && (g && e[g] || e[b]); - if (typeof n == "function") - return n; - } - var C = "<>", w = { - array: Y("array"), - bigint: Y("bigint"), - bool: Y("boolean"), - func: Y("function"), - number: Y("number"), - object: Y("object"), - string: Y("string"), - symbol: Y("symbol"), - any: F(), - arrayOf: A, - element: x(), - elementType: t(), - instanceOf: k, - node: X(), - objectOf: H, - oneOf: N, - oneOfType: J, - shape: G, - exact: K - }; - function M(e, n) { - return e === n ? e !== 0 || 1 / e === 1 / n : e !== e && n !== n; - } - function R(e, n) { - this.message = e, this.data = n && typeof n == "object" ? n : {}, this.stack = ""; - } - R.prototype = Error.prototype; - function I(e) { - if (process.env.NODE_ENV !== "production") - var n = {}, f = 0; - function u(p, c, s, d, m, v, $) { - if (d = d || C, v = v || s, $ !== O) { - if (_) { - var r = new Error( - "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types" - ); - throw r.name = "Invariant Violation", r; - } else if (process.env.NODE_ENV !== "production" && typeof console < "u") { - var D = d + ":" + s; - !n[D] && // Avoid spamming the console because they are often not actionable except for lib authors - f < 3 && (a( - "You are manually calling a React.PropTypes validation function for the `" + v + "` prop on `" + d + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details." - ), n[D] = !0, f++); - } - } - return c[s] == null ? p ? c[s] === null ? new R("The " + m + " `" + v + "` is marked as required " + ("in `" + d + "`, but its value is `null`.")) : new R("The " + m + " `" + v + "` is marked as required in " + ("`" + d + "`, but its value is `undefined`.")) : null : e(c, s, d, m, v); - } - var i = u.bind(null, !1); - return i.isRequired = u.bind(null, !0), i; - } - function Y(e) { - function n(f, u, i, p, c, s) { - var d = f[u], m = q(d); - if (m !== e) { - var v = W(d); - return new R( - "Invalid " + p + " `" + c + "` of type " + ("`" + v + "` supplied to `" + i + "`, expected ") + ("`" + e + "`."), - { expectedType: e } - ); - } - return null; - } - return I(n); - } - function F() { - return I(P); - } - function A(e) { - function n(f, u, i, p, c) { - if (typeof e != "function") - return new R("Property `" + c + "` of component `" + i + "` has invalid PropType notation inside arrayOf."); - var s = f[u]; - if (!Array.isArray(s)) { - var d = q(s); - return new R("Invalid " + p + " `" + c + "` of type " + ("`" + d + "` supplied to `" + i + "`, expected an array.")); - } - for (var m = 0; m < s.length; m++) { - var v = e(s, m, i, p, c + "[" + m + "]", O); - if (v instanceof Error) - return v; - } - return null; - } - return I(n); - } - function x() { - function e(n, f, u, i, p) { - var c = n[f]; - if (!l(c)) { - var s = q(c); - return new R("Invalid " + i + " `" + p + "` of type " + ("`" + s + "` supplied to `" + u + "`, expected a single ReactElement.")); - } - return null; - } - return I(e); - } - function t() { - function e(n, f, u, i, p) { - var c = n[f]; - if (!o.isValidElementType(c)) { - var s = q(c); - return new R("Invalid " + i + " `" + p + "` of type " + ("`" + s + "` supplied to `" + u + "`, expected a single ReactElement type.")); - } - return null; - } - return I(e); - } - function k(e) { - function n(f, u, i, p, c) { - if (!(f[u] instanceof e)) { - var s = e.name || C, d = Q(f[u]); - return new R("Invalid " + p + " `" + c + "` of type " + ("`" + d + "` supplied to `" + i + "`, expected ") + ("instance of `" + s + "`.")); - } - return null; - } - return I(n); - } - function N(e) { - if (!Array.isArray(e)) - return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? a( - "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])." - ) : a("Invalid argument supplied to oneOf, expected an array.")), P; - function n(f, u, i, p, c) { - for (var s = f[u], d = 0; d < e.length; d++) - if (M(s, e[d])) - return null; - var m = JSON.stringify(e, function($, r) { - var D = W(r); - return D === "symbol" ? String(r) : r; - }); - return new R("Invalid " + p + " `" + c + "` of value `" + String(s) + "` " + ("supplied to `" + i + "`, expected one of " + m + ".")); - } - return I(n); - } - function H(e) { - function n(f, u, i, p, c) { - if (typeof e != "function") - return new R("Property `" + c + "` of component `" + i + "` has invalid PropType notation inside objectOf."); - var s = f[u], d = q(s); - if (d !== "object") - return new R("Invalid " + p + " `" + c + "` of type " + ("`" + d + "` supplied to `" + i + "`, expected an object.")); - for (var m in s) - if (y(s, m)) { - var v = e(s, m, i, p, c + "." + m, O); - if (v instanceof Error) - return v; - } - return null; - } - return I(n); - } - function J(e) { - if (!Array.isArray(e)) - return process.env.NODE_ENV !== "production" && a("Invalid argument supplied to oneOfType, expected an instance of array."), P; - for (var n = 0; n < e.length; n++) { - var f = e[n]; - if (typeof f != "function") - return a( - "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + z(f) + " at index " + n + "." - ), P; - } - function u(i, p, c, s, d) { - for (var m = [], v = 0; v < e.length; v++) { - var $ = e[v], r = $(i, p, c, s, d, O); - if (r == null) - return null; - r.data && y(r.data, "expectedType") && m.push(r.data.expectedType); - } - var D = m.length > 0 ? ", expected one of type [" + m.join(", ") + "]" : ""; - return new R("Invalid " + s + " `" + d + "` supplied to " + ("`" + c + "`" + D + ".")); - } - return I(u); - } - function X() { - function e(n, f, u, i, p) { - return L(n[f]) ? null : new R("Invalid " + i + " `" + p + "` supplied to " + ("`" + u + "`, expected a ReactNode.")); - } - return I(e); - } - function U(e, n, f, u, i) { - return new R( - (e || "React class") + ": " + n + " type `" + f + "." + u + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + i + "`." - ); - } - function G(e) { - function n(f, u, i, p, c) { - var s = f[u], d = q(s); - if (d !== "object") - return new R("Invalid " + p + " `" + c + "` of type `" + d + "` " + ("supplied to `" + i + "`, expected `object`.")); - for (var m in e) { - var v = e[m]; - if (typeof v != "function") - return U(i, p, c, m, W(v)); - var $ = v(s, m, i, p, c + "." + m, O); - if ($) - return $; - } - return null; - } - return I(n); - } - function K(e) { - function n(f, u, i, p, c) { - var s = f[u], d = q(s); - if (d !== "object") - return new R("Invalid " + p + " `" + c + "` of type `" + d + "` " + ("supplied to `" + i + "`, expected `object`.")); - var m = j({}, f[u], e); - for (var v in m) { - var $ = e[v]; - if (y(e, v) && typeof $ != "function") - return U(i, p, c, v, W($)); - if (!$) - return new R( - "Invalid " + p + " `" + c + "` key `" + v + "` supplied to `" + i + "`.\nBad object: " + JSON.stringify(f[u], null, " ") + ` -Valid keys: ` + JSON.stringify(Object.keys(e), null, " ") - ); - var r = $(s, v, i, p, c + "." + v, O); - if (r) - return r; - } - return null; - } - return I(n); - } - function L(e) { - switch (typeof e) { - case "number": - case "string": - case "undefined": - return !0; - case "boolean": - return !e; - case "object": - if (Array.isArray(e)) - return e.every(L); - if (e === null || l(e)) - return !0; - var n = E(e); - if (n) { - var f = n.call(e), u; - if (n !== e.entries) { - for (; !(u = f.next()).done; ) - if (!L(u.value)) - return !1; - } else - for (; !(u = f.next()).done; ) { - var i = u.value; - if (i && !L(i[1])) - return !1; - } - } else - return !1; - return !0; - default: - return !1; - } - } - function Z(e, n) { - return e === "symbol" ? !0 : n ? n["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && n instanceof Symbol : !1; - } - function q(e) { - var n = typeof e; - return Array.isArray(e) ? "array" : e instanceof RegExp ? "object" : Z(n, e) ? "symbol" : n; - } - function W(e) { - if (typeof e > "u" || e === null) - return "" + e; - var n = q(e); - if (n === "object") { - if (e instanceof Date) - return "date"; - if (e instanceof RegExp) - return "regexp"; - } - return n; - } - function z(e) { - var n = W(e); - switch (n) { - case "array": - case "object": - return "an " + n; - case "boolean": - case "date": - case "regexp": - return "a " + n; - default: - return n; - } - } - function Q(e) { - return !e.constructor || !e.constructor.name ? C : e.constructor.name; - } - return w.checkPropTypes = S, w.resetWarningCache = S.resetWarningCache, w.PropTypes = w, w; - }, oe; -} -var ie, he; -function Re() { - if (he) - return ie; - he = 1; - var o = ce(); - function j() { - } - function O() { - } - return O.resetWarningCache = j, ie = function() { - function y(P, l, _, g, b, E) { - if (E !== o) { - var C = new Error( - "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types" - ); - throw C.name = "Invariant Violation", C; - } - } - y.isRequired = y; - function S() { - return y; - } - var a = { - array: y, - bigint: y, - bool: y, - func: y, - number: y, - object: y, - string: y, - symbol: y, - any: y, - arrayOf: S, - element: y, - elementType: y, - instanceOf: S, - node: y, - objectOf: S, - oneOf: S, - oneOfType: S, - shape: S, - exact: S, - checkPropTypes: O, - resetWarningCache: j - }; - return a.PropTypes = a, a; - }, ie; -} -if (process.env.NODE_ENV !== "production") { - var Ce = Te(), we = !0; - ae.exports = _e()(Ce.isElement, we); -} else - ae.exports = Re()(); -var xe = ae.exports; -const Ae = /* @__PURE__ */ Ee(xe); -export { - Ae as P -}; diff --git a/dist/common/vender-CijlkmMW.js b/dist/common/vender-CijlkmMW.js new file mode 100644 index 0000000..14c1c87 --- /dev/null +++ b/dist/common/vender-CijlkmMW.js @@ -0,0 +1,835 @@ +var Se = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; +function ge(s) { + return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s; +} +var ae = { exports: {} }, H = { exports: {} }, O = {}; +/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +var ce; +function Pe() { + if (ce) + return O; + ce = 1; + var s = typeof Symbol == "function" && Symbol.for, k = s ? Symbol.for("react.element") : 60103, i = s ? Symbol.for("react.portal") : 60106, u = s ? Symbol.for("react.fragment") : 60107, _ = s ? Symbol.for("react.strict_mode") : 60108, f = s ? Symbol.for("react.profiler") : 60114, A = s ? Symbol.for("react.provider") : 60109, y = s ? Symbol.for("react.context") : 60110, x = s ? Symbol.for("react.async_mode") : 60111, C = s ? Symbol.for("react.concurrent_mode") : 60111, g = s ? Symbol.for("react.forward_ref") : 60112, S = s ? Symbol.for("react.suspense") : 60113, M = s ? Symbol.for("react.suspense_list") : 60120, j = s ? Symbol.for("react.memo") : 60115, r = s ? Symbol.for("react.lazy") : 60116, n = s ? Symbol.for("react.block") : 60121, c = s ? Symbol.for("react.fundamental") : 60117, P = s ? Symbol.for("react.responder") : 60118, q = s ? Symbol.for("react.scope") : 60119; + function I(t) { + if (typeof t == "object" && t !== null) { + var $ = t.$$typeof; + switch ($) { + case k: + switch (t = t.type, t) { + case x: + case C: + case u: + case f: + case _: + case S: + return t; + default: + switch (t = t && t.$$typeof, t) { + case y: + case g: + case r: + case j: + case A: + return t; + default: + return $; + } + } + case i: + return $; + } + } + } + function l(t) { + return I(t) === C; + } + return O.AsyncMode = x, O.ConcurrentMode = C, O.ContextConsumer = y, O.ContextProvider = A, O.Element = k, O.ForwardRef = g, O.Fragment = u, O.Lazy = r, O.Memo = j, O.Portal = i, O.Profiler = f, O.StrictMode = _, O.Suspense = S, O.isAsyncMode = function(t) { + return l(t) || I(t) === x; + }, O.isConcurrentMode = l, O.isContextConsumer = function(t) { + return I(t) === y; + }, O.isContextProvider = function(t) { + return I(t) === A; + }, O.isElement = function(t) { + return typeof t == "object" && t !== null && t.$$typeof === k; + }, O.isForwardRef = function(t) { + return I(t) === g; + }, O.isFragment = function(t) { + return I(t) === u; + }, O.isLazy = function(t) { + return I(t) === r; + }, O.isMemo = function(t) { + return I(t) === j; + }, O.isPortal = function(t) { + return I(t) === i; + }, O.isProfiler = function(t) { + return I(t) === f; + }, O.isStrictMode = function(t) { + return I(t) === _; + }, O.isSuspense = function(t) { + return I(t) === S; + }, O.isValidElementType = function(t) { + return typeof t == "string" || typeof t == "function" || t === u || t === C || t === f || t === _ || t === S || t === M || typeof t == "object" && t !== null && (t.$$typeof === r || t.$$typeof === j || t.$$typeof === A || t.$$typeof === y || t.$$typeof === g || t.$$typeof === c || t.$$typeof === P || t.$$typeof === q || t.$$typeof === n); + }, O.typeOf = I, O; +} +var R = {}; +/** @license React v16.13.1 + * react-is.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +var fe; +function Oe() { + return fe || (fe = 1, process.env.NODE_ENV !== "production" && function() { + var s = typeof Symbol == "function" && Symbol.for, k = s ? Symbol.for("react.element") : 60103, i = s ? Symbol.for("react.portal") : 60106, u = s ? Symbol.for("react.fragment") : 60107, _ = s ? Symbol.for("react.strict_mode") : 60108, f = s ? Symbol.for("react.profiler") : 60114, A = s ? Symbol.for("react.provider") : 60109, y = s ? Symbol.for("react.context") : 60110, x = s ? Symbol.for("react.async_mode") : 60111, C = s ? Symbol.for("react.concurrent_mode") : 60111, g = s ? Symbol.for("react.forward_ref") : 60112, S = s ? Symbol.for("react.suspense") : 60113, M = s ? Symbol.for("react.suspense_list") : 60120, j = s ? Symbol.for("react.memo") : 60115, r = s ? Symbol.for("react.lazy") : 60116, n = s ? Symbol.for("react.block") : 60121, c = s ? Symbol.for("react.fundamental") : 60117, P = s ? Symbol.for("react.responder") : 60118, q = s ? Symbol.for("react.scope") : 60119; + function I(o) { + return typeof o == "string" || typeof o == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. + o === u || o === C || o === f || o === _ || o === S || o === M || typeof o == "object" && o !== null && (o.$$typeof === r || o.$$typeof === j || o.$$typeof === A || o.$$typeof === y || o.$$typeof === g || o.$$typeof === c || o.$$typeof === P || o.$$typeof === q || o.$$typeof === n); + } + function l(o) { + if (typeof o == "object" && o !== null) { + var U = o.$$typeof; + switch (U) { + case k: + var V = o.type; + switch (V) { + case x: + case C: + case u: + case f: + case _: + case S: + return V; + default: + var ue = V && V.$$typeof; + switch (ue) { + case y: + case g: + case r: + case j: + case A: + return ue; + default: + return U; + } + } + case i: + return U; + } + } + } + var t = x, $ = C, D = y, W = A, J = k, G = g, N = u, X = r, K = j, F = i, Z = f, L = _, z = S, B = !1; + function Q(o) { + return B || (B = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), e(o) || l(o) === x; + } + function e(o) { + return l(o) === C; + } + function a(o) { + return l(o) === y; + } + function b(o) { + return l(o) === A; + } + function v(o) { + return typeof o == "object" && o !== null && o.$$typeof === k; + } + function d(o) { + return l(o) === g; + } + function h(o) { + return l(o) === u; + } + function p(o) { + return l(o) === r; + } + function m(o) { + return l(o) === j; + } + function T(o) { + return l(o) === i; + } + function w(o) { + return l(o) === f; + } + function E(o) { + return l(o) === _; + } + function Y(o) { + return l(o) === S; + } + R.AsyncMode = t, R.ConcurrentMode = $, R.ContextConsumer = D, R.ContextProvider = W, R.Element = J, R.ForwardRef = G, R.Fragment = N, R.Lazy = X, R.Memo = K, R.Portal = F, R.Profiler = Z, R.StrictMode = L, R.Suspense = z, R.isAsyncMode = Q, R.isConcurrentMode = e, R.isContextConsumer = a, R.isContextProvider = b, R.isElement = v, R.isForwardRef = d, R.isFragment = h, R.isLazy = p, R.isMemo = m, R.isPortal = T, R.isProfiler = w, R.isStrictMode = E, R.isSuspense = Y, R.isValidElementType = I, R.typeOf = l; + }()), R; +} +var le; +function he() { + return le || (le = 1, process.env.NODE_ENV === "production" ? H.exports = Pe() : H.exports = Oe()), H.exports; +} +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/ +var ee, de; +function Re() { + if (de) + return ee; + de = 1; + var s = Object.getOwnPropertySymbols, k = Object.prototype.hasOwnProperty, i = Object.prototype.propertyIsEnumerable; + function u(f) { + if (f == null) + throw new TypeError("Object.assign cannot be called with null or undefined"); + return Object(f); + } + function _() { + try { + if (!Object.assign) + return !1; + var f = new String("abc"); + if (f[5] = "de", Object.getOwnPropertyNames(f)[0] === "5") + return !1; + for (var A = {}, y = 0; y < 10; y++) + A["_" + String.fromCharCode(y)] = y; + var x = Object.getOwnPropertyNames(A).map(function(g) { + return A[g]; + }); + if (x.join("") !== "0123456789") + return !1; + var C = {}; + return "abcdefghijklmnopqrst".split("").forEach(function(g) { + C[g] = g; + }), Object.keys(Object.assign({}, C)).join("") === "abcdefghijklmnopqrst"; + } catch { + return !1; + } + } + return ee = _() ? Object.assign : function(f, A) { + for (var y, x = u(f), C, g = 1; g < arguments.length; g++) { + y = Object(arguments[g]); + for (var S in y) + k.call(y, S) && (x[S] = y[S]); + if (s) { + C = s(y); + for (var M = 0; M < C.length; M++) + i.call(y, C[M]) && (x[C[M]] = y[C[M]]); + } + } + return x; + }, ee; +} +var re, pe; +function se() { + if (pe) + return re; + pe = 1; + var s = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"; + return re = s, re; +} +var te, ye; +function Te() { + return ye || (ye = 1, te = Function.call.bind(Object.prototype.hasOwnProperty)), te; +} +var ne, ve; +function _e() { + if (ve) + return ne; + ve = 1; + var s = function() { + }; + if (process.env.NODE_ENV !== "production") { + var k = se(), i = {}, u = Te(); + s = function(f) { + var A = "Warning: " + f; + typeof console < "u" && console.error(A); + try { + throw new Error(A); + } catch { + } + }; + } + function _(f, A, y, x, C) { + if (process.env.NODE_ENV !== "production") { + for (var g in f) + if (u(f, g)) { + var S; + try { + if (typeof f[g] != "function") { + var M = Error( + (x || "React class") + ": " + y + " type `" + g + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof f[g] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`." + ); + throw M.name = "Invariant Violation", M; + } + S = f[g](A, g, x, y, null, k); + } catch (r) { + S = r; + } + if (S && !(S instanceof Error) && s( + (x || "React class") + ": type specification of " + y + " `" + g + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof S + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)." + ), S instanceof Error && !(S.message in i)) { + i[S.message] = !0; + var j = C ? C() : ""; + s( + "Failed " + y + " type: " + S.message + (j ?? "") + ); + } + } + } + } + return _.resetWarningCache = function() { + process.env.NODE_ENV !== "production" && (i = {}); + }, ne = _, ne; +} +var oe, me; +function Ce() { + if (me) + return oe; + me = 1; + var s = he(), k = Re(), i = se(), u = Te(), _ = _e(), f = function() { + }; + process.env.NODE_ENV !== "production" && (f = function(y) { + var x = "Warning: " + y; + typeof console < "u" && console.error(x); + try { + throw new Error(x); + } catch { + } + }); + function A() { + return null; + } + return oe = function(y, x) { + var C = typeof Symbol == "function" && Symbol.iterator, g = "@@iterator"; + function S(e) { + var a = e && (C && e[C] || e[g]); + if (typeof a == "function") + return a; + } + var M = "<>", j = { + array: P("array"), + bigint: P("bigint"), + bool: P("boolean"), + func: P("function"), + number: P("number"), + object: P("object"), + string: P("string"), + symbol: P("symbol"), + any: q(), + arrayOf: I, + element: l(), + elementType: t(), + instanceOf: $, + node: G(), + objectOf: W, + oneOf: D, + oneOfType: J, + shape: X, + exact: K + }; + function r(e, a) { + return e === a ? e !== 0 || 1 / e === 1 / a : e !== e && a !== a; + } + function n(e, a) { + this.message = e, this.data = a && typeof a == "object" ? a : {}, this.stack = ""; + } + n.prototype = Error.prototype; + function c(e) { + if (process.env.NODE_ENV !== "production") + var a = {}, b = 0; + function v(h, p, m, T, w, E, Y) { + if (T = T || M, E = E || m, Y !== i) { + if (x) { + var o = new Error( + "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types" + ); + throw o.name = "Invariant Violation", o; + } else if (process.env.NODE_ENV !== "production" && typeof console < "u") { + var U = T + ":" + m; + !a[U] && // Avoid spamming the console because they are often not actionable except for lib authors + b < 3 && (f( + "You are manually calling a React.PropTypes validation function for the `" + E + "` prop on `" + T + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details." + ), a[U] = !0, b++); + } + } + return p[m] == null ? h ? p[m] === null ? new n("The " + w + " `" + E + "` is marked as required " + ("in `" + T + "`, but its value is `null`.")) : new n("The " + w + " `" + E + "` is marked as required in " + ("`" + T + "`, but its value is `undefined`.")) : null : e(p, m, T, w, E); + } + var d = v.bind(null, !1); + return d.isRequired = v.bind(null, !0), d; + } + function P(e) { + function a(b, v, d, h, p, m) { + var T = b[v], w = L(T); + if (w !== e) { + var E = z(T); + return new n( + "Invalid " + h + " `" + p + "` of type " + ("`" + E + "` supplied to `" + d + "`, expected ") + ("`" + e + "`."), + { expectedType: e } + ); + } + return null; + } + return c(a); + } + function q() { + return c(A); + } + function I(e) { + function a(b, v, d, h, p) { + if (typeof e != "function") + return new n("Property `" + p + "` of component `" + d + "` has invalid PropType notation inside arrayOf."); + var m = b[v]; + if (!Array.isArray(m)) { + var T = L(m); + return new n("Invalid " + h + " `" + p + "` of type " + ("`" + T + "` supplied to `" + d + "`, expected an array.")); + } + for (var w = 0; w < m.length; w++) { + var E = e(m, w, d, h, p + "[" + w + "]", i); + if (E instanceof Error) + return E; + } + return null; + } + return c(a); + } + function l() { + function e(a, b, v, d, h) { + var p = a[b]; + if (!y(p)) { + var m = L(p); + return new n("Invalid " + d + " `" + h + "` of type " + ("`" + m + "` supplied to `" + v + "`, expected a single ReactElement.")); + } + return null; + } + return c(e); + } + function t() { + function e(a, b, v, d, h) { + var p = a[b]; + if (!s.isValidElementType(p)) { + var m = L(p); + return new n("Invalid " + d + " `" + h + "` of type " + ("`" + m + "` supplied to `" + v + "`, expected a single ReactElement type.")); + } + return null; + } + return c(e); + } + function $(e) { + function a(b, v, d, h, p) { + if (!(b[v] instanceof e)) { + var m = e.name || M, T = Q(b[v]); + return new n("Invalid " + h + " `" + p + "` of type " + ("`" + T + "` supplied to `" + d + "`, expected ") + ("instance of `" + m + "`.")); + } + return null; + } + return c(a); + } + function D(e) { + if (!Array.isArray(e)) + return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? f( + "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])." + ) : f("Invalid argument supplied to oneOf, expected an array.")), A; + function a(b, v, d, h, p) { + for (var m = b[v], T = 0; T < e.length; T++) + if (r(m, e[T])) + return null; + var w = JSON.stringify(e, function(Y, o) { + var U = z(o); + return U === "symbol" ? String(o) : o; + }); + return new n("Invalid " + h + " `" + p + "` of value `" + String(m) + "` " + ("supplied to `" + d + "`, expected one of " + w + ".")); + } + return c(a); + } + function W(e) { + function a(b, v, d, h, p) { + if (typeof e != "function") + return new n("Property `" + p + "` of component `" + d + "` has invalid PropType notation inside objectOf."); + var m = b[v], T = L(m); + if (T !== "object") + return new n("Invalid " + h + " `" + p + "` of type " + ("`" + T + "` supplied to `" + d + "`, expected an object.")); + for (var w in m) + if (u(m, w)) { + var E = e(m, w, d, h, p + "." + w, i); + if (E instanceof Error) + return E; + } + return null; + } + return c(a); + } + function J(e) { + if (!Array.isArray(e)) + return process.env.NODE_ENV !== "production" && f("Invalid argument supplied to oneOfType, expected an instance of array."), A; + for (var a = 0; a < e.length; a++) { + var b = e[a]; + if (typeof b != "function") + return f( + "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + B(b) + " at index " + a + "." + ), A; + } + function v(d, h, p, m, T) { + for (var w = [], E = 0; E < e.length; E++) { + var Y = e[E], o = Y(d, h, p, m, T, i); + if (o == null) + return null; + o.data && u(o.data, "expectedType") && w.push(o.data.expectedType); + } + var U = w.length > 0 ? ", expected one of type [" + w.join(", ") + "]" : ""; + return new n("Invalid " + m + " `" + T + "` supplied to " + ("`" + p + "`" + U + ".")); + } + return c(v); + } + function G() { + function e(a, b, v, d, h) { + return F(a[b]) ? null : new n("Invalid " + d + " `" + h + "` supplied to " + ("`" + v + "`, expected a ReactNode.")); + } + return c(e); + } + function N(e, a, b, v, d) { + return new n( + (e || "React class") + ": " + a + " type `" + b + "." + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + d + "`." + ); + } + function X(e) { + function a(b, v, d, h, p) { + var m = b[v], T = L(m); + if (T !== "object") + return new n("Invalid " + h + " `" + p + "` of type `" + T + "` " + ("supplied to `" + d + "`, expected `object`.")); + for (var w in e) { + var E = e[w]; + if (typeof E != "function") + return N(d, h, p, w, z(E)); + var Y = E(m, w, d, h, p + "." + w, i); + if (Y) + return Y; + } + return null; + } + return c(a); + } + function K(e) { + function a(b, v, d, h, p) { + var m = b[v], T = L(m); + if (T !== "object") + return new n("Invalid " + h + " `" + p + "` of type `" + T + "` " + ("supplied to `" + d + "`, expected `object`.")); + var w = k({}, b[v], e); + for (var E in w) { + var Y = e[E]; + if (u(e, E) && typeof Y != "function") + return N(d, h, p, E, z(Y)); + if (!Y) + return new n( + "Invalid " + h + " `" + p + "` key `" + E + "` supplied to `" + d + "`.\nBad object: " + JSON.stringify(b[v], null, " ") + ` +Valid keys: ` + JSON.stringify(Object.keys(e), null, " ") + ); + var o = Y(m, E, d, h, p + "." + E, i); + if (o) + return o; + } + return null; + } + return c(a); + } + function F(e) { + switch (typeof e) { + case "number": + case "string": + case "undefined": + return !0; + case "boolean": + return !e; + case "object": + if (Array.isArray(e)) + return e.every(F); + if (e === null || y(e)) + return !0; + var a = S(e); + if (a) { + var b = a.call(e), v; + if (a !== e.entries) { + for (; !(v = b.next()).done; ) + if (!F(v.value)) + return !1; + } else + for (; !(v = b.next()).done; ) { + var d = v.value; + if (d && !F(d[1])) + return !1; + } + } else + return !1; + return !0; + default: + return !1; + } + } + function Z(e, a) { + return e === "symbol" ? !0 : a ? a["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && a instanceof Symbol : !1; + } + function L(e) { + var a = typeof e; + return Array.isArray(e) ? "array" : e instanceof RegExp ? "object" : Z(a, e) ? "symbol" : a; + } + function z(e) { + if (typeof e > "u" || e === null) + return "" + e; + var a = L(e); + if (a === "object") { + if (e instanceof Date) + return "date"; + if (e instanceof RegExp) + return "regexp"; + } + return a; + } + function B(e) { + var a = z(e); + switch (a) { + case "array": + case "object": + return "an " + a; + case "boolean": + case "date": + case "regexp": + return "a " + a; + default: + return a; + } + } + function Q(e) { + return !e.constructor || !e.constructor.name ? M : e.constructor.name; + } + return j.checkPropTypes = _, j.resetWarningCache = _.resetWarningCache, j.PropTypes = j, j; + }, oe; +} +var ie, be; +function we() { + if (be) + return ie; + be = 1; + var s = se(); + function k() { + } + function i() { + } + return i.resetWarningCache = k, ie = function() { + function u(A, y, x, C, g, S) { + if (S !== s) { + var M = new Error( + "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types" + ); + throw M.name = "Invariant Violation", M; + } + } + u.isRequired = u; + function _() { + return u; + } + var f = { + array: u, + bigint: u, + bool: u, + func: u, + number: u, + object: u, + string: u, + symbol: u, + any: u, + arrayOf: _, + element: u, + elementType: u, + instanceOf: _, + node: u, + objectOf: _, + oneOf: _, + oneOfType: _, + shape: _, + exact: _, + checkPropTypes: i, + resetWarningCache: k + }; + return f.PropTypes = f, f; + }, ie; +} +if (process.env.NODE_ENV !== "production") { + var xe = he(), Ae = !0; + ae.exports = Ce()(xe.isElement, Ae); +} else + ae.exports = we()(); +var Ie = ae.exports; +const je = /* @__PURE__ */ ge(Ie); +var Ee = { exports: {} }; +/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress + * @license MIT */ +(function(s, k) { + (function(i, u) { + s.exports = u(); + })(Se, function() { + var i = {}; + i.version = "0.2.0"; + var u = i.settings = { + minimum: 0.08, + easing: "ease", + positionUsing: "", + speed: 200, + trickle: !0, + trickleRate: 0.02, + trickleSpeed: 800, + showSpinner: !0, + barSelector: '[role="bar"]', + spinnerSelector: '[role="spinner"]', + parent: "body", + template: '
' + }; + i.configure = function(r) { + var n, c; + for (n in r) + c = r[n], c !== void 0 && r.hasOwnProperty(n) && (u[n] = c); + return this; + }, i.status = null, i.set = function(r) { + var n = i.isStarted(); + r = _(r, u.minimum, 1), i.status = r === 1 ? null : r; + var c = i.render(!n), P = c.querySelector(u.barSelector), q = u.speed, I = u.easing; + return c.offsetWidth, y(function(l) { + u.positionUsing === "" && (u.positionUsing = i.getPositioningCSS()), x(P, A(r, q, I)), r === 1 ? (x(c, { + transition: "none", + opacity: 1 + }), c.offsetWidth, setTimeout(function() { + x(c, { + transition: "all " + q + "ms linear", + opacity: 0 + }), setTimeout(function() { + i.remove(), l(); + }, q); + }, q)) : setTimeout(l, q); + }), this; + }, i.isStarted = function() { + return typeof i.status == "number"; + }, i.start = function() { + i.status || i.set(0); + var r = function() { + setTimeout(function() { + i.status && (i.trickle(), r()); + }, u.trickleSpeed); + }; + return u.trickle && r(), this; + }, i.done = function(r) { + return !r && !i.status ? this : i.inc(0.3 + 0.5 * Math.random()).set(1); + }, i.inc = function(r) { + var n = i.status; + return n ? (typeof r != "number" && (r = (1 - n) * _(Math.random() * n, 0.1, 0.95)), n = _(n + r, 0, 0.994), i.set(n)) : i.start(); + }, i.trickle = function() { + return i.inc(Math.random() * u.trickleRate); + }, function() { + var r = 0, n = 0; + i.promise = function(c) { + return !c || c.state() === "resolved" ? this : (n === 0 && i.start(), r++, n++, c.always(function() { + n--, n === 0 ? (r = 0, i.done()) : i.set((r - n) / r); + }), this); + }; + }(), i.render = function(r) { + if (i.isRendered()) + return document.getElementById("nprogress"); + g(document.documentElement, "nprogress-busy"); + var n = document.createElement("div"); + n.id = "nprogress", n.innerHTML = u.template; + var c = n.querySelector(u.barSelector), P = r ? "-100" : f(i.status || 0), q = document.querySelector(u.parent), I; + return x(c, { + transition: "all 0 linear", + transform: "translate3d(" + P + "%,0,0)" + }), u.showSpinner || (I = n.querySelector(u.spinnerSelector), I && j(I)), q != document.body && g(q, "nprogress-custom-parent"), q.appendChild(n), n; + }, i.remove = function() { + S(document.documentElement, "nprogress-busy"), S(document.querySelector(u.parent), "nprogress-custom-parent"); + var r = document.getElementById("nprogress"); + r && j(r); + }, i.isRendered = function() { + return !!document.getElementById("nprogress"); + }, i.getPositioningCSS = function() { + var r = document.body.style, n = "WebkitTransform" in r ? "Webkit" : "MozTransform" in r ? "Moz" : "msTransform" in r ? "ms" : "OTransform" in r ? "O" : ""; + return n + "Perspective" in r ? "translate3d" : n + "Transform" in r ? "translate" : "margin"; + }; + function _(r, n, c) { + return r < n ? n : r > c ? c : r; + } + function f(r) { + return (-1 + r) * 100; + } + function A(r, n, c) { + var P; + return u.positionUsing === "translate3d" ? P = { transform: "translate3d(" + f(r) + "%,0,0)" } : u.positionUsing === "translate" ? P = { transform: "translate(" + f(r) + "%,0)" } : P = { "margin-left": f(r) + "%" }, P.transition = "all " + n + "ms " + c, P; + } + var y = /* @__PURE__ */ function() { + var r = []; + function n() { + var c = r.shift(); + c && c(n); + } + return function(c) { + r.push(c), r.length == 1 && n(); + }; + }(), x = /* @__PURE__ */ function() { + var r = ["Webkit", "O", "Moz", "ms"], n = {}; + function c(l) { + return l.replace(/^-ms-/, "ms-").replace(/-([\da-z])/gi, function(t, $) { + return $.toUpperCase(); + }); + } + function P(l) { + var t = document.body.style; + if (l in t) + return l; + for (var $ = r.length, D = l.charAt(0).toUpperCase() + l.slice(1), W; $--; ) + if (W = r[$] + D, W in t) + return W; + return l; + } + function q(l) { + return l = c(l), n[l] || (n[l] = P(l)); + } + function I(l, t, $) { + t = q(t), l.style[t] = $; + } + return function(l, t) { + var $ = arguments, D, W; + if ($.length == 2) + for (D in t) + W = t[D], W !== void 0 && t.hasOwnProperty(D) && I(l, D, W); + else + I(l, $[1], $[2]); + }; + }(); + function C(r, n) { + var c = typeof r == "string" ? r : M(r); + return c.indexOf(" " + n + " ") >= 0; + } + function g(r, n) { + var c = M(r), P = c + n; + C(c, n) || (r.className = P.substring(1)); + } + function S(r, n) { + var c = M(r), P; + C(r, n) && (P = c.replace(" " + n + " ", " "), r.className = P.substring(1, P.length - 1)); + } + function M(r) { + return (" " + (r.className || "") + " ").replace(/\s+/gi, " "); + } + function j(r) { + r && r.parentNode && r.parentNode.removeChild(r); + } + return i; + }); +})(Ee); +var Me = Ee.exports; +const $e = /* @__PURE__ */ ge(Me); +export { + $e as N, + je as P +}; diff --git a/dist/components.js b/dist/components.js index fbf7701..0b88847 100644 --- a/dist/components.js +++ b/dist/components.js @@ -1,4 +1,4 @@ -import { N as a, i as r } from "./common/main-D7BIypEq.js"; +import { N as a, i as r } from "./common/main-D2ZjkFcD.js"; export { a as Icon, r as Popup diff --git a/dist/container.js b/dist/container.js index 3a7c862..e58fc15 100644 --- a/dist/container.js +++ b/dist/container.js @@ -1,4 +1,4 @@ -import { S as o, h as r, i as s, g as t, F } from "./common/main-D7BIypEq.js"; +import { S as o, h as r, i as s, g as t, F } from "./common/main-D2ZjkFcD.js"; export { o as Context, r as FFPageRender, diff --git a/dist/data-list.js b/dist/data-list.js index 8235861..52b63c5 100644 --- a/dist/data-list.js +++ b/dist/data-list.js @@ -1,4 +1,4 @@ -import { t as s, r as e, m as r, p as o, v as i, q as D, o as l, s as u, n as L, v as n, D as d, w as m, x as F, z as p, A as C, y as b } from "./common/main-D7BIypEq.js"; +import { t as s, r as e, m as r, p as o, v as i, q as D, o as l, s as u, n as L, v as n, D as d, w as m, x as F, z as p, A as C, y as b } from "./common/main-D2ZjkFcD.js"; export { s as DataListContent, e as DataListContext, diff --git a/dist/grid-layout-form.js b/dist/grid-layout-form.js index f61cba8..23eb99a 100644 --- a/dist/grid-layout-form.js +++ b/dist/grid-layout-form.js @@ -1,4 +1,4 @@ -import { I as o, K as r, J as t, H as s, M as u, L as d } from "./common/main-D7BIypEq.js"; +import { I as o, K as r, J as t, H as s, M as u, L as d } from "./common/main-D2ZjkFcD.js"; export { o as GridLayoutForm, r as GridLayoutFormHelper, diff --git a/dist/grid-layout.js b/dist/grid-layout.js index 95f0db0..92320aa 100644 --- a/dist/grid-layout.js +++ b/dist/grid-layout.js @@ -1,4 +1,4 @@ -import { k as d, l as o, G as r } from "./common/main-D7BIypEq.js"; +import { k as d, l as o, G as r } from "./common/main-D2ZjkFcD.js"; export { d as GridLayout, o as GridLayoutWidget, diff --git a/dist/hooks.js b/dist/hooks.js index a38f9f2..ce929fa 100644 --- a/dist/hooks.js +++ b/dist/hooks.js @@ -2,7 +2,7 @@ import "lodash"; import "rc-field-form"; import "react"; import "react-dom"; -import { d as p, e as r, b as i, a as m, c as b, f as c, u as f } from "./common/main-D7BIypEq.js"; +import { d as p, e as r, b as i, a as m, c as b, f as c, u as f } from "./common/main-D2ZjkFcD.js"; export { p as useDeepEqualEffect, r as useOptions, diff --git a/dist/index.js b/dist/index.js index dbaed1d..c647fa4 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,7 +1,7 @@ import "lodash"; import "axios"; import "react"; -import { Z as e, V as m, _ as c, $ as i, a1 as n, Y as f, a0 as l, W as u, X as h, a2 as x } from "./common/main-D7BIypEq.js"; +import { Z as e, V as m, _ as c, $ as i, a1 as n, Y as f, a0 as l, W as u, X as h, a2 as x } from "./common/main-D2ZjkFcD.js"; import "ff-request"; export { e as AppGlobalParamsContext, diff --git a/dist/res-ws.js b/dist/res-ws.js index 7e285a1..ab5d888 100644 --- a/dist/res-ws.js +++ b/dist/res-ws.js @@ -1,5 +1,5 @@ import "lodash"; -import { R as a } from "./common/main-D7BIypEq.js"; +import { R as a } from "./common/main-D2ZjkFcD.js"; export { a as default }; diff --git a/dist/service.js b/dist/service.js index e57c218..1f1a027 100644 --- a/dist/service.js +++ b/dist/service.js @@ -1,4 +1,4 @@ -import { a5 as t, a4 as g, a7 as s, a3 as o, a6 as r } from "./common/main-D7BIypEq.js"; +import { a5 as t, a4 as g, a7 as s, a3 as o, a6 as r } from "./common/main-D2ZjkFcD.js"; export { t as getConfigure, g as getMenus, diff --git a/dist/style.css b/dist/style.css index e031e4e..db208b9 100644 --- a/dist/style.css +++ b/dist/style.css @@ -1 +1 @@ -.ff-container{height:100%;padding:var(--ff-padding, 0px);background-color:var(--ff-bg-color, #fff)}.ff-drawer .ant-drawer-header{padding:0 8px 0 0}.ff-drawer .ant-drawer-header .ant-drawer-title{height:50px;line-height:50px}.ff-drawer .ant-drawer-header .ant-drawer-close{margin-inline-end:0}.ff-drawer .ant-drawer-body{padding:8px}.ff-drawer .ant-popup-footer{padding:0 8px;height:46px;align-items:center;display:flex}.ff-drawer .ant-popup-footer .ff-popup-extras,.ff-drawer .ant-popup-footer .ff-popup-actions{display:flex;gap:4px}.ff-drawer .ant-popup-footer .ff-popup-extras{flex:1}.ff-modal>div:not([aria-hidden]){height:inherit}.ff-modal>div:not([aria-hidden])>.ant-modal-content{height:inherit;display:flex;flex-direction:column}.ff-modal>div:not([aria-hidden])>.ant-modal-content>.ant-modal-body{flex:1;overflow-y:overlay}.ff-modal .ff-popup-footer{height:46px;align-items:center;display:flex}.ff-modal .ff-popup-footer .ff-popup-extras,.ff-modal .ff-popup-footer .ff-popup-actions{display:flex;gap:4px}.ff-modal .ff-popup-footer .ff-popup-extras{flex:1}.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, 8px)}.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-data-list-framework{height:100%;--sider-width: 280px;--col-num: 1;--gap: 8px;display:flex;gap:8px}.ff-data-list-framework .ff-data-list-sider{width:var(--sider-width);overflow-y:auto;box-shadow:8px 0 4px -8px #0000000d}.ff-data-list-framework .ff-data-list-sider+.ff-data-list-container{width:calc(100% - var(--sider-width))}.ff-data-list-framework .ff-data-list-container{width:100%;height:100%;row-gap:8px;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%;display:flex;flex-direction:column}.ff-data-table-framework .ff-data-table-toolbar{display:flex}.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{display:flex;justify-content:space-between}.ff-data-list-filter .ant-input-prefix{color:#00000073}.ff-data-list-filter .ff-data-list-filter-submit-button{margin-left:8px}.ff-data-list-filter .ff-data-list-actions{display:flex;justify-content: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-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 .ant-breadcrumb-link{color:#00000073}.ff-data-list-toolbar .ff-data-list-tabs .ant-breadcrumb-link:hover{font-weight:600}.ff-data-list-toolbar .ff-data-list-tabs .ant-breadcrumb-link.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-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-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)}page-container{--bg-color: #fff;--mask-bg-color: rgba(0, 0, 0, .6)}page-container .ff-notification{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center}page-container .ff-notification .ff-notification-container{color:#fff;border-radius:12rpx;background-color:#0009;height:fit-content;padding:28rpx;max-width:50%;max-height:50%;text-align:center}page-container .ff-notification .ff-notification-container .iconfont.ff-notification-icon{font-size:62rpx}page-container .ff-notification .ff-notification-container .iconfont.ff-notification-icon+view{margin-top:20rpx}page-container .ff-confirm{display:flex;align-items:center;justify-content:center;color:var(--text-color, #737373);background-color:#0006}page-container .ff-confirm .ff-confirm-container{background-color:#fff;width:80%;min-height:240rpx;max-height:80%;border-radius:12rpx;padding:38rpx;display:flex;flex-direction:column;gap:18rpx}page-container .ff-confirm .ff-confirm-container .ff-confirm-title{font-size:36rpx;text-align:center}page-container .ff-confirm .ff-confirm-container .ff-confirm-content{flex:1;overflow-y:auto;min-height:1.8em;max-height:70vh}page-container .ff-confirm .ff-confirm-container .ff-confirm-operations{display:flex;gap:38rpx}page-container .ff-confirm .ff-confirm-container .ff-confirm-operations .ff-confirm-ok,page-container .ff-confirm .ff-confirm-container .ff-confirm-operations .ff-confirm-cancel{flex:1;border-radius:32rpx;padding:10rpx 0;text-align:center}page-container .ff-confirm .ff-confirm-container .ff-confirm-operations .ff-confirm-cancel{box-shadow:0 0 3rpx var(--text-color, #737373);border:1rpx solid var(--text-color, #737373)}page-container .ff-confirm .ff-confirm-container .ff-confirm-operations .ff-confirm-ok{color:#fff;background-color:var(--primary-color, #1890ff)}page-container .ff-modal>div:not([aria-hidden]){height:inherit}page-container .ff-modal>div:not([aria-hidden])>.ant-modal-content{height:inherit;display:flex;flex-direction:column}page-container .ff-modal>div:not([aria-hidden])>.ant-modal-content>.ant-modal-body{flex:1;overflow-y:overlay}page-container .ff-modal .ff-popup-footer{height:46px;align-items:center;display:flex}page-container .ff-modal .ff-popup-footer .ff-popup-extras,page-container .ff-modal .ff-popup-footer .ff-popup-actions{display:flex;gap:4px}page-container .ff-modal .ff-popup-footer .ff-popup-extras{flex:1}: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}.ant-form-vertical .ant-form-item-label,.ant-form.ant-vertical .ant-form-item-label{padding-bottom:0;text-align:start}.ant-form-vertical .ant-form-item-row,.ant-form.ant-vertical .ant-form-item-row{flex-direction:column}.ant-form-item .ant-form-item-label>label{height:22px}.anticon.iconfont{transform:scale(1.14)}.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}*::-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} +#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)}}.ff-container{height:100%;padding:var(--ff-padding, 0px);background-color:var(--ff-bg-color, #fff)}.ff-drawer .ant-drawer-header{padding:0 8px 0 0}.ff-drawer .ant-drawer-header .ant-drawer-title{height:50px;line-height:50px}.ff-drawer .ant-drawer-header .ant-drawer-close{margin-inline-end:0}.ff-drawer .ant-drawer-body{padding:8px}.ff-drawer .ff-popup-footer{padding:8px;height:46px;align-items:center;display:flex}.ff-drawer .ff-popup-footer .ff-popup-extras,.ff-drawer .ff-popup-footer .ff-popup-actions{display:flex;gap:4px}.ff-drawer .ff-popup-footer .ff-popup-extras{flex:1}.ff-modal>div:not([aria-hidden]){height:inherit}.ff-modal>div:not([aria-hidden])>.ant-modal-content{height:inherit;display:flex;flex-direction:column}.ff-modal>div:not([aria-hidden])>.ant-modal-content>.ant-modal-body{flex:1;overflow-y:overlay}.ff-modal .ff-popup-footer{height:46px;align-items:center;display:flex}.ff-modal .ff-popup-footer .ff-popup-extras,.ff-modal .ff-popup-footer .ff-popup-actions{display:flex;gap:4px}.ff-modal .ff-popup-footer .ff-popup-extras{flex:1}.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, 8px)}.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-data-list-framework{height:100%;--sider-width: 280px;--col-num: 1;--gap: 8px;display:flex;gap:8px}.ff-data-list-framework .ff-data-list-sider{width:var(--sider-width);overflow-y:auto;box-shadow:8px 0 4px -8px #0000000d}.ff-data-list-framework .ff-data-list-sider+.ff-data-list-container{width:calc(100% - var(--sider-width))}.ff-data-list-framework .ff-data-list-container{width:100%;height:100%;row-gap:8px;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%;display:flex;flex-direction:column}.ff-data-table-framework .ff-data-table-toolbar{display:flex}.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{display:flex;justify-content:space-between}.ff-data-list-filter .ant-input-prefix{color:#00000073}.ff-data-list-filter .ff-data-list-filter-submit-button{margin-left:8px}.ff-data-list-filter .ff-data-list-actions{display:flex;justify-content: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-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 .ant-breadcrumb-link{color:#00000073}.ff-data-list-toolbar .ff-data-list-tabs .ant-breadcrumb-link:hover{font-weight:600}.ff-data-list-toolbar .ff-data-list-tabs .ant-breadcrumb-link.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-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-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)}page-container{--bg-color: #fff;--mask-bg-color: rgba(0, 0, 0, .6)}page-container .ff-notification{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center}page-container .ff-notification .ff-notification-container{color:#fff;border-radius:12rpx;background-color:#0009;height:fit-content;padding:28rpx;max-width:50%;max-height:50%;text-align:center}page-container .ff-notification .ff-notification-container .iconfont.ff-notification-icon{font-size:62rpx}page-container .ff-notification .ff-notification-container .iconfont.ff-notification-icon+view{margin-top:20rpx}page-container .ff-confirm{display:flex;align-items:center;justify-content:center;color:var(--text-color, #737373);background-color:#0006}page-container .ff-confirm .ff-confirm-container{background-color:#fff;width:80%;min-height:240rpx;max-height:80%;border-radius:12rpx;padding:38rpx;display:flex;flex-direction:column;gap:18rpx}page-container .ff-confirm .ff-confirm-container .ff-confirm-title{font-size:36rpx;text-align:center}page-container .ff-confirm .ff-confirm-container .ff-confirm-content{flex:1;overflow-y:auto;min-height:1.8em;max-height:70vh}page-container .ff-confirm .ff-confirm-container .ff-confirm-operations{display:flex;gap:38rpx}page-container .ff-confirm .ff-confirm-container .ff-confirm-operations .ff-confirm-ok,page-container .ff-confirm .ff-confirm-container .ff-confirm-operations .ff-confirm-cancel{flex:1;border-radius:32rpx;padding:10rpx 0;text-align:center}page-container .ff-confirm .ff-confirm-container .ff-confirm-operations .ff-confirm-cancel{box-shadow:0 0 3rpx var(--text-color, #737373);border:1rpx solid var(--text-color, #737373)}page-container .ff-confirm .ff-confirm-container .ff-confirm-operations .ff-confirm-ok{color:#fff;background-color:var(--primary-color, #1890ff)}page-container .ff-modal>div:not([aria-hidden]){height:inherit}page-container .ff-modal>div:not([aria-hidden])>.ant-modal-content{height:inherit;display:flex;flex-direction:column}page-container .ff-modal>div:not([aria-hidden])>.ant-modal-content>.ant-modal-body{flex:1;overflow-y:overlay}page-container .ff-modal .ff-popup-footer{height:46px;align-items:center;display:flex}page-container .ff-modal .ff-popup-footer .ff-popup-extras,page-container .ff-modal .ff-popup-footer .ff-popup-actions{display:flex;gap:4px}page-container .ff-modal .ff-popup-footer .ff-popup-extras{flex:1}: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}.ant-form-vertical .ant-form-item-label,.ant-form.ant-vertical .ant-form-item-label{padding-bottom:0;text-align:start}.ant-form-vertical .ant-form-item-row,.ant-form.ant-vertical .ant-form-item-row{flex-direction:column}.ant-form-item .ant-form-item-label>label{height:22px}.anticon.iconfont{transform:scale(1.14)}.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}*::-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} diff --git a/dist/user.js b/dist/user.js index a03e019..d3827a8 100644 --- a/dist/user.js +++ b/dist/user.js @@ -3,7 +3,7 @@ import "react/jsx-runtime"; import "react"; import "@ant-design/icons"; import "classnames"; -import { P as p, Q as a, O as g, T as n, U } from "./common/main-D7BIypEq.js"; +import { P as p, Q as a, O as g, T as n, U } from "./common/main-D2ZjkFcD.js"; export { p as checkUserToken, a as getUserInfo, diff --git a/dist/utils.js b/dist/utils.js index e87cad5..06da4bd 100644 --- a/dist/utils.js +++ b/dist/utils.js @@ -1,5 +1,5 @@ import "lodash"; -import { j as a } from "./common/main-D7BIypEq.js"; +import { j as a } from "./common/main-D2ZjkFcD.js"; export { a as getDefaultExpandRowKeys }; diff --git a/package.json b/package.json index dc0da29..66b9167 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ff", "private": true, - "version": "0.1.12", + "version": "0.1.13", "type": "module", "files": [ "dist/" @@ -28,14 +28,16 @@ "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview" }, - "dependencies": {}, + "dependencies": { + "nprogress": "^0.2.0" + }, "peerDependencies": { "antd": "^5.17.0", "axios": "^1.5.0", "classnames": "^2.5.1", "ff-request": "git+https://git.fsdpf.net/npm/ff-request-dist.git", - "lodash": "^4.17.21", "immutability-helper": "^3.1.1", + "lodash": "^4.17.21", "rc-field-form": "^1.44.0", "rc-util": "^5.41.0", "react": "^18.2.0",