v0.6.17
This commit is contained in:
parent
0d09d0c9fd
commit
ee12e09323
2
dist/button.js
vendored
2
dist/button.js
vendored
@ -1,4 +1,4 @@
|
||||
import { aj as s, ai as u, ak as e } from "./common/main-DfW15Flo.js";
|
||||
import { aj as s, ai as u, ak as e } from "./common/main-hfbRQs2Q.js";
|
||||
export {
|
||||
s as auth,
|
||||
u as default,
|
||||
|
||||
@ -3,8 +3,8 @@ var zt = (e) => {
|
||||
throw TypeError(e);
|
||||
};
|
||||
var Vn = (e, t, n) => t in e ? Ln(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
||||
var $ = (e, t, n) => Vn(e, typeof t != "symbol" ? t + "" : t, n), Bt = (e, t, n) => t.has(e) || zt("Cannot " + n);
|
||||
var y = (e, t, n) => (Bt(e, t, "read from private field"), n ? n.call(e) : t.get(e)), j = (e, t, n) => t.has(e) ? zt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), U = (e, t, n, a) => (Bt(e, t, "write to private field"), a ? a.call(e, n) : t.set(e, n), n);
|
||||
var N = (e, t, n) => Vn(e, typeof t != "symbol" ? t + "" : t, n), Bt = (e, t, n) => t.has(e) || zt("Cannot " + n);
|
||||
var y = (e, t, n) => (Bt(e, t, "read from private field"), n ? n.call(e) : t.get(e)), E = (e, t, n) => t.has(e) ? zt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), U = (e, t, n, a) => (Bt(e, t, "write to private field"), a ? a.call(e, n) : t.set(e, n), n);
|
||||
var Wt = (e, t, n, a) => ({
|
||||
set _(r) {
|
||||
U(e, t, r, n);
|
||||
@ -13,8 +13,8 @@ var Wt = (e, t, n, a) => ({
|
||||
return y(e, t, a);
|
||||
}
|
||||
});
|
||||
import { jsx as u, jsxs as O } from "react/jsx-runtime";
|
||||
import S, { useEffect as V, useState as A, useCallback as G, useRef as K, useContext as ie, useMemo as q, useId as yt, isValidElement as In, useLayoutEffect as Mn } from "react";
|
||||
import { jsx as u, jsxs as R } from "react/jsx-runtime";
|
||||
import S, { useEffect as V, useState as j, useCallback as G, useRef as K, useContext as ie, useMemo as q, useId as yt, isValidElement as In, useLayoutEffect as Mn } from "react";
|
||||
import b from "prop-types";
|
||||
import F from "classnames";
|
||||
import * as Dt from "react-is";
|
||||
@ -23,7 +23,7 @@ import m from "lodash";
|
||||
import Z, { Field as Rt, FieldContext as en } from "rc-field-form";
|
||||
import { M as pt, N as Le, a as Ve, _ as wt, S as Bn } from "./vender-FNiQWFaA.js";
|
||||
import tn from "immutability-helper";
|
||||
import { Space as Wn, Form as et, Input as Dn, Button as nt, Pagination as Un, Tree as qn, Breadcrumb as Kn, Table as _n, Empty as Hn, Popover as Jn, Popconfirm as Gn, Tooltip as Yn } from "antd";
|
||||
import { Space as Wn, Form as et, Input as Dn, Button as nt, Pagination as Un, Tree as qn, Breadcrumb as _n, Table as Kn, Empty as Hn, Popover as Jn, Popconfirm as Gn, Tooltip as Yn } from "antd";
|
||||
import { useMergedState as Xn } from "rc-util";
|
||||
import { generatePath as Qn, useInRouterContext as nn, useParams as Zn, useLocation as ea, createBrowserRouter as ta, Navigate as na } from "react-router-dom";
|
||||
import "rc-util/lib/hooks/useMergedState";
|
||||
@ -32,13 +32,13 @@ import ra from "rc-dialog";
|
||||
var Fe, ze, Re, ue, Pe, ve;
|
||||
class an {
|
||||
constructor(t, n) {
|
||||
j(this, Fe, /* @__PURE__ */ new Map());
|
||||
j(this, ze, !0);
|
||||
j(this, Re, []);
|
||||
j(this, ue);
|
||||
j(this, Pe, () => y(this, ue));
|
||||
j(this, ve, () => Promise.resolve());
|
||||
$(this, "get", (...t) => new Promise((n, a) => {
|
||||
E(this, Fe, /* @__PURE__ */ new Map());
|
||||
E(this, ze, !0);
|
||||
E(this, Re, []);
|
||||
E(this, ue);
|
||||
E(this, Pe, () => y(this, ue));
|
||||
E(this, ve, () => Promise.resolve());
|
||||
N(this, "get", (...t) => new Promise((n, a) => {
|
||||
const r = JSON.stringify(t);
|
||||
if (y(this, Fe).has(r)) return n(y(this, ve).call(this, y(this, ue), ...t));
|
||||
if (y(this, ue) === void 0) y(this, Re).push([t, n, a]), y(this, ze) && (U(this, ze, !1), Promise.resolve(typeof y(this, Pe) == "function" ? y(this, Pe).call(this) : y(this, Pe)).then((i) => U(this, ue, i || null)).finally(() => {
|
||||
@ -60,32 +60,32 @@ class an {
|
||||
}
|
||||
}
|
||||
Fe = new WeakMap(), ze = new WeakMap(), Re = new WeakMap(), ue = new WeakMap(), Pe = new WeakMap(), ve = new WeakMap();
|
||||
const Pr = () => u("div", { children: "Empty" }), Ke = S.createContext({ ele: {}, mount: () => {
|
||||
const Pr = () => u("div", { children: "Empty" }), _e = S.createContext({ ele: {}, mount: () => {
|
||||
}, unmount: () => {
|
||||
} }), J = ({ rootClassName: e, className: t, children: n, actions: a, title: r, subTitle: i, extras: o, style: s = {} }) => {
|
||||
const { mount: l, unmount: d } = S.useContext(Ke);
|
||||
const { mount: l, unmount: d } = S.useContext(_e);
|
||||
return J.Action({ children: a }), J.Title({ children: r }), J.SubTitle({ children: i }), J.Extra({ children: o }), V(() => (l("rootClassName", e), () => d(e)), [e]), u("div", { className: F("ff-container", t), style: s, children: n });
|
||||
}, Ze = (e) => ({ children: t, className: n }) => {
|
||||
const { mount: a, unmount: r } = S.useContext(Ke);
|
||||
const { mount: a, unmount: r } = S.useContext(_e);
|
||||
return V(() => (t && a(e, S.createElement("div", { key: `ff-${e}`, className: F(`ff-popup-${e}`, n) }, t)), () => r(e)), [n, t]), null;
|
||||
};
|
||||
J.Action = Ze("actions"), J.Title = Ze("title"), J.SubTitle = Ze("sub-title"), J.Extra = Ze("extras"), J.propTypes = { className: b.string, style: b.object, title: b.any, subTitle: b.any, actions: b.any, extras: b.any };
|
||||
const vr = () => u(J, { className: "ff-loading", children: O("div", { className: "loader", children: [O("div", { className: "square", children: [u("span", {}), u("span", {}), u("span", {})] }), O("div", { className: "square", children: [u("span", {}), u("span", {}), u("span", {})] }), O("div", { className: "square", children: [u("span", {}), u("span", {}), u("span", {})] }), O("div", { className: "square", children: [u("span", {}), u("span", {}), u("span", {})] })] }) }), $r = () => u("div", { children: "NotFound" }), rn = ({ children: e }) => {
|
||||
const [t, n] = A({}), a = G((i, o) => n((s) => ({ ...s, [i]: o })), []), r = G((i) => n((o) => ({ ...o, [i]: void 0 })), []);
|
||||
return typeof (e == null ? void 0 : e.type) == "string" ? e : u(Ke.Provider, { value: { ele: t, mount: a, unmount: r }, children: S.cloneElement(e, { className: t.rootClassName, title: t.title, subTitle: t["sub-title"], actions: t.actions, extras: t.extras }) });
|
||||
const vr = () => u(J, { className: "ff-loading", children: R("div", { className: "loader", children: [R("div", { className: "square", children: [u("span", {}), u("span", {}), u("span", {})] }), R("div", { className: "square", children: [u("span", {}), u("span", {}), u("span", {})] }), R("div", { className: "square", children: [u("span", {}), u("span", {}), u("span", {})] }), R("div", { className: "square", children: [u("span", {}), u("span", {}), u("span", {})] })] }) }), $r = () => u("div", { children: "NotFound" }), rn = ({ children: e }) => {
|
||||
const [t, n] = j({}), a = G((i, o) => n((s) => ({ ...s, [i]: o })), []), r = G((i) => n((o) => ({ ...o, [i]: void 0 })), []);
|
||||
return typeof (e == null ? void 0 : e.type) == "string" ? e : u(_e.Provider, { value: { ele: t, mount: a, unmount: r }, children: S.cloneElement(e, { className: t.rootClassName, title: t.title, subTitle: t["sub-title"], actions: t.actions, extras: t.extras }) });
|
||||
};
|
||||
rn.propTypes = { children: b.element.isRequired };
|
||||
const Ut = { close: ["M563.8 512l262.5-312.9c4.4-5.2 0.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9c-4.4 5.2-0.7 13.1 6.1 13.1h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"], check: ["M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474c-6.1-7.7-15.3-12.2-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1 0.4-12.8-6.3-12.8z"], info: ["M512 224m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z", "M544 392h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V400c0-4.4-3.6-8-8-8z"] }, Ot = ({ type: e, props: t }) => u("i", { ...t, children: u("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", fill: "currentColor", children: (Ut[e] || Ut.info).map((n, a) => u("path", { d: n }, a)) }) }), on = ({ className: e, content: t, icon: n, $close: a }) => O(S.Fragment, { children: [n && u("div", { className: F("ff-notification-icon", e), children: u(Ot, { type: n }) }), t] }), ia = ({}) => u(J, { children: "Confirm" });
|
||||
const Ut = { close: ["M563.8 512l262.5-312.9c4.4-5.2 0.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9c-4.4 5.2-0.7 13.1 6.1 13.1h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"], check: ["M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474c-6.1-7.7-15.3-12.2-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1 0.4-12.8-6.3-12.8z"], info: ["M512 224m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z", "M544 392h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V400c0-4.4-3.6-8-8-8z"] }, Ot = ({ type: e, props: t }) => u("i", { ...t, children: u("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", fill: "currentColor", children: (Ut[e] || Ut.info).map((n, a) => u("path", { d: n }, a)) }) }), on = ({ className: e, content: t, icon: n, $close: a }) => R(S.Fragment, { children: [n && u("div", { className: F("ff-notification-icon", e), children: u(Ot, { type: n }) }), t] }), ia = ({}) => u(J, { children: "Confirm" });
|
||||
var me, Oe;
|
||||
const oe = class oe {
|
||||
constructor() {
|
||||
j(this, Oe, /* @__PURE__ */ new Map());
|
||||
$(this, "init", (t) => U(this, Oe, new Map(t)));
|
||||
$(this, "check", (t) => !y(this, Oe).has(t) || y(this, Oe).get(t));
|
||||
E(this, Oe, /* @__PURE__ */ new Map());
|
||||
N(this, "init", (t) => U(this, Oe, new Map(t)));
|
||||
N(this, "check", (t) => !y(this, Oe).has(t) || y(this, Oe).get(t));
|
||||
if (y(oe, me)) return y(oe, me);
|
||||
}
|
||||
};
|
||||
me = new WeakMap(), Oe = new WeakMap(), j(oe, me, null), $(oe, "getInstance", () => (y(oe, me) || U(oe, me, new oe()), y(oe, me)));
|
||||
me = new WeakMap(), Oe = new WeakMap(), E(oe, me, null), N(oe, "getInstance", () => (y(oe, me) || U(oe, me, new oe()), y(oe, me)));
|
||||
let bt = oe;
|
||||
const oa = bt.getInstance(), sa = (e, t, n = "children") => {
|
||||
if (m.isEmpty(e)) return {};
|
||||
@ -101,13 +101,13 @@ const oa = bt.getInstance(), sa = (e, t, n = "children") => {
|
||||
var he, Be;
|
||||
const se = class se {
|
||||
constructor() {
|
||||
j(this, Be, null);
|
||||
$(this, "init", (t) => U(this, Be, t));
|
||||
$(this, "get", (t, n) => m.get(y(this, Be), t, n));
|
||||
E(this, Be, null);
|
||||
N(this, "init", (t) => U(this, Be, t));
|
||||
N(this, "get", (t, n) => m.get(y(this, Be), t, n));
|
||||
if (y(se, he)) return y(se, he);
|
||||
}
|
||||
};
|
||||
he = new WeakMap(), Be = new WeakMap(), j(se, he, null), $(se, "getInstance", () => (y(se, he) || U(se, he, new se()), y(se, he)));
|
||||
he = new WeakMap(), Be = new WeakMap(), E(se, he, null), N(se, "getInstance", () => (y(se, he) || U(se, he, new se()), y(se, he)));
|
||||
let Ct = se;
|
||||
const Ie = Ct.getInstance(), qt = { null2json: (e) => Object.create(), null2array: (e) => [], null2number: (e) => 0, null2bool: (e) => !1, null2string: (e) => "", null2integer: (e) => 0, null2float: (e) => 0, string2json: (e) => e ? JSON.parse(e) : "{}", string2array: (e) => e.substr(0, 1) === "[" && e.substr(-1) === "]" ? JSON.parse(e) : e.split(","), string2number: (e) => e == "" ? 0 : +e, string2integer: (e) => e == "" ? 0 : +e, string2float: (e) => e == "" ? 0 : +e, string2bool: (e) => {
|
||||
switch (`${e}`.toLowerCase()) {
|
||||
@ -123,7 +123,7 @@ const Ie = Ct.getInstance(), qt = { null2json: (e) => Object.create(), null2arra
|
||||
n = Array.isArray(e) ? "array" : typeof e, m.isObject(e) && (n = "json");
|
||||
const a = `${n}2${t}`;
|
||||
return Reflect.has(qt, a) ? qt[a](e) : e;
|
||||
}, la = (e) => e === null ? "null" : Array.isArray(e) ? "array" : typeof e == "object" ? "json" : typeof e == "boolean" ? "bool" : typeof e == "string" ? "string" : typeof e == "number" ? Number.isInteger(e) ? "integer" : "float" : typeof e, _e = (e = {}, t = {}, n = {}, a = "") => ln(e, (r, i) => i === "type" && r === "code") ? cn(e, t, n, a) : dn(e, t, a), ln = (e, t = () => !1) => m.some(e, (n) => !!m.some(n, t) || (m.isEmpty(n) || !m.isPlainObject(n) && !m.isArray(n) ? void 0 : ln(n, t))), cn = async (e = {}, t = {}, n = {}, a = "") => {
|
||||
}, la = (e) => e === null ? "null" : Array.isArray(e) ? "array" : typeof e == "object" ? "json" : typeof e == "boolean" ? "bool" : typeof e == "string" ? "string" : typeof e == "number" ? Number.isInteger(e) ? "integer" : "float" : typeof e, Ke = (e = {}, t = {}, n = {}, a = "") => ln(e, (r, i) => i === "type" && r === "code") ? cn(e, t, n, a) : dn(e, t, a), ln = (e, t = () => !1) => m.some(e, (n) => !!m.some(n, t) || (m.isEmpty(n) || !m.isPlainObject(n) && !m.isArray(n) ? void 0 : ln(n, t))), cn = async (e = {}, t = {}, n = {}, a = "") => {
|
||||
let r = /* @__PURE__ */ Object.create(null);
|
||||
for (let i in e) {
|
||||
let o;
|
||||
@ -213,12 +213,12 @@ const Ie = Ct.getInstance(), qt = { null2json: (e) => Object.create(), null2arra
|
||||
var rt, We, De, it;
|
||||
const ot = class ot {
|
||||
constructor(...t) {
|
||||
j(this, We, []);
|
||||
j(this, De, (t) => {
|
||||
E(this, We, []);
|
||||
E(this, De, (t) => {
|
||||
var n;
|
||||
for (let a of t) Array.isArray(a[0]) ? y(this, De).call(this, a) : y(this, We).push(y(n = ot, rt).call(n, a[0], a[1]));
|
||||
});
|
||||
$(this, "toValue", async (t, n = null) => {
|
||||
N(this, "toValue", async (t, n = null) => {
|
||||
const a = { getValue: () => t, getRecord: () => n };
|
||||
let r = t;
|
||||
for (const i of y(this, We)) try {
|
||||
@ -233,9 +233,9 @@ const ot = class ot {
|
||||
}
|
||||
return r;
|
||||
});
|
||||
$(this, "toRender", (t, n, a = null) => S.createElement(y(this, it), { value: t, record: n }, a));
|
||||
j(this, it, ({ value: t, record: n, children: a }) => {
|
||||
const [r, i] = A(a);
|
||||
N(this, "toRender", (t, n, a = null) => S.createElement(y(this, it), { value: t, record: n }, a));
|
||||
E(this, it, ({ value: t, record: n, children: a }) => {
|
||||
const [r, i] = j(a);
|
||||
return Je(() => {
|
||||
let o = !1;
|
||||
return i(a), this.toValue(t, n).then((s) => !o && i(s)).catch((s) => !o && i(`${s}`)), () => o = !0;
|
||||
@ -244,7 +244,7 @@ const ot = class ot {
|
||||
y(this, De).call(this, t);
|
||||
}
|
||||
};
|
||||
rt = new WeakMap(), We = new WeakMap(), De = new WeakMap(), it = new WeakMap(), j(ot, rt, m.memoize((t, n) => {
|
||||
rt = new WeakMap(), We = new WeakMap(), De = new WeakMap(), it = new WeakMap(), E(ot, rt, m.memoize((t, n) => {
|
||||
if (typeof t == "function") return t(n);
|
||||
if (typeof t == "string") return re.getWidgetComponent(t).then((a) => {
|
||||
var r;
|
||||
@ -269,21 +269,21 @@ const ee = S.createContext({ listCode: "", classNames: {}, getBase62params: (e,
|
||||
}, setSider: () => {
|
||||
}, setKeyword: () => {
|
||||
}, setCondition: () => {
|
||||
} }), Kt = ({ className: e, record: t, column: n, ...a }) => {
|
||||
} }), _t = ({ className: e, record: t, column: n, ...a }) => {
|
||||
if (n != null && n.editableByJs && (n != null && n.uuid)) {
|
||||
const { formSetting: r = { primaryKey: "id" }, widgetSetting: i = {}, widgetContainerSetting: o = {} } = (n == null ? void 0 : n.editableByJsSetting) || {};
|
||||
return u(v.Popover, { widget: ga, widgetData: { record: t, column: n }, widgetSetting: { widgetSetting: i, formSetting: r }, widgetContainerProps: { title: n != null && n.title ? `${n.title} - 编辑` : "编辑", ...o, width: (o == null ? void 0 : o.width) || 260, arrow: !0 }, children: u("td", { className: F("ff-data-list-cell-editable", e), ...a }) });
|
||||
return u($.Popover, { widget: ga, widgetData: { record: t, column: n }, widgetSetting: { widgetSetting: i, formSetting: r }, widgetContainerProps: { title: n != null && n.title ? `${n.title} - 编辑` : "编辑", ...o, width: (o == null ? void 0 : o.width) || 260, arrow: !0 }, children: u("td", { className: F("ff-data-list-cell-editable", e), ...a }) });
|
||||
}
|
||||
return u("td", { className: e, ...a });
|
||||
}, ga = ({ record: e, column: t, $close: n, $setting: a }) => {
|
||||
const r = K(la(m.get(e, t == null ? void 0 : t.dataIndex))), { listCode: i, onClickCallback: o } = ie(ee), [s] = Z.useForm(), { formSetting: l, widgetSetting: d } = a, c = (l == null ? void 0 : l.primaryKey) || "id", g = () => {
|
||||
s.setFieldsValue({ value: m.get(e, t == null ? void 0 : t.dataIndex), __PROPS__: e });
|
||||
};
|
||||
return Je(() => g(), [e, t == null ? void 0 : t.dataIndex, i]), u(J, { actions: O(S.Fragment, { children: [u(v, { size: "small", onClick: g, children: "重置" }), O(Wn.Compact, { block: !0, children: [u(v, { size: "small", widget: n, children: "取消" }), u(v, { type: "primary", size: "small", widget: () => s.validateFields().then(({ value: h }) => {
|
||||
return Je(() => g(), [e, t == null ? void 0 : t.dataIndex, i]), u(J, { actions: R(S.Fragment, { children: [u($, { size: "small", onClick: g, children: "重置" }), R(Wn.Compact, { block: !0, children: [u($, { size: "small", widget: n, children: "取消" }), u($, { type: "primary", size: "small", widget: () => s.validateFields().then(({ value: h }) => {
|
||||
const p = m.get(e, c.substring(c.indexOf(".") + 1));
|
||||
if (!p) throw "获取更新主键失败!";
|
||||
L.put(`/api/${i}-storeBy-${t == null ? void 0 : t.uuid}/${p}`, { value: h }).msg(() => o(2, e)).then(n);
|
||||
}).catch(console.warn), children: "保存" })] })] }), children: O(Z, { form: s, children: [u(At, { label: "", type: r.current, code: "value", widget: t == null ? void 0 : t.editableByJs, extras: d }), u(Rt, { noStyle: !0, name: ["__PROPS__"], children: () => {
|
||||
}).catch(console.warn), children: "保存" })] })] }), children: R(Z, { form: s, children: [u(At, { label: "", type: r.current, code: "value", widget: t == null ? void 0 : t.editableByJs, extras: d }), u(Rt, { noStyle: !0, name: ["__PROPS__"], children: () => {
|
||||
} })] }) });
|
||||
}, pa = (e) => function(t) {
|
||||
return e(t, getRecord());
|
||||
@ -293,15 +293,15 @@ const ee = S.createContext({ listCode: "", classNames: {}, getBase62params: (e,
|
||||
return n && s.push([n, a]), s.length > 0 ? (r != null && r.render && s.push([pa, r.render]), { ...r, onCell: o, render: (l, d) => new at(s).toRender(l, d, "-") }) : { ...r, onCell: o };
|
||||
}), [e, t]), ha = (e = {}) => q(() => {
|
||||
var t;
|
||||
return e.body ?? (e.body = { cell: Kt }), (t = e.body).cell ?? (t.cell = Kt), e;
|
||||
return e.body ?? (e.body = { cell: _t }), (t = e.body).cell ?? (t.cell = _t), e;
|
||||
}, [e]), Er = (e) => {
|
||||
const [t, n] = A({});
|
||||
const [t, n] = j({});
|
||||
return V(() => {
|
||||
let a = !1;
|
||||
return e && L.get(`/api/_/${e}`).then((r) => m.pick(r, ["uuid", "name", "code", "resource", "marginX", "marginY", "cols", "rowHeight", "primaryKey", "columns", "itemOperations", "batchOperations", "isConditionFormLayout", "layout", "tabs", "pageSize", "layoutConfig"])).then((r) => !a && n(r)), () => a = !0;
|
||||
}, [e]), t;
|
||||
}, jr = (e, t = {}) => {
|
||||
const [n, a] = A({ dataSource: [] });
|
||||
const [n, a] = j({ dataSource: [] });
|
||||
return He(() => {
|
||||
let r = !1;
|
||||
return e && L.get(`/api/${e}/${L.encode({ page: 1, ...t })}`).then((i) => !r && a(i)), () => r = !0;
|
||||
@ -329,11 +329,11 @@ const ee = S.createContext({ listCode: "", classNames: {}, getBase62params: (e,
|
||||
const x = m.get(o.current, f > -1 ? [f, "children", w, "children"] : [w, "children"]);
|
||||
o.current = tn(o.current, f > -1 ? { [f]: { children: { $splice: [[w, 1, { ...C, children: x }]] } } } : { $splice: [[w, 1, { ...C, children: x }]] });
|
||||
const P = new Map(k);
|
||||
s.current.forEach((E, R) => {
|
||||
var B;
|
||||
(B = P.get(R)) != null && B.some((I) => I == p) || s.current.set(R, E.filter((I) => I !== p));
|
||||
}), P.forEach((E, R) => {
|
||||
s.current.has(R) ? s.current.set(R, m.uniq([...s.current.get(R) || [], ...E])) : s.current.set(R, E);
|
||||
s.current.forEach((T, I) => {
|
||||
var A;
|
||||
(A = P.get(I)) != null && A.some((M) => M == p) || s.current.set(I, T.filter((M) => M !== p));
|
||||
}), P.forEach((T, I) => {
|
||||
s.current.has(I) ? s.current.set(I, m.uniq([...s.current.get(I) || [], ...T])) : s.current.set(I, T);
|
||||
});
|
||||
}).then(() => {
|
||||
i.current = !0, r();
|
||||
@ -352,23 +352,23 @@ const ee = S.createContext({ listCode: "", classNames: {}, getBase62params: (e,
|
||||
const s = q(() => m.pick(a.current, ["total", "tab", "page", "pageSize", "condition", "sider", "keyword"]), [a.current]);
|
||||
return Object.assign(s, { onTabChange: (l) => o({ tab: l, page: 1 }), onPageChange: (l, d) => o({ page: l, pageSize: d }), onPageSizeChange: (l) => o({ pageSize: l, page: 1 }), onConditionChange: (l, d) => o({ keyword: d, condition: tn(a.current.condition || {}, { $merge: l || {} }), page: 1 }), onSiderChange: (l) => o({ sider: l, page: 1 }), onKeywordChange: (l) => o({ keyword: l, page: 1 }), itemOperationsAccess: r.current, dataSource: i.current, onReload: o, payload: t == null ? void 0 : t.payload });
|
||||
}, wa = ({ listCode: e, className: t, layouts: n = {}, dataSource: a, isPaginate: r, isItemOperations: i, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: d, resource: c, primaryKey: g, title: h, itemGridLayout: p, $setting: f, tabs: w, isConditionFormLayout: C, isTreeSider: k, treeSiderConfig: x }) => {
|
||||
const { classNames: P, onClickCallback: E } = ie(ee), R = m.pick(f, ["column", "colWidth", "beforeRender", "afterRender", "style"]), B = un(l, d, g, c), I = G((M, T, z) => u(ba, { className: F("ff-data-list-framework-item", P.item), operations: i ? B(T) : [], data: c ? { [c]: T } : T, children: M, onClickCallback: E }), [c, g, i, E, l, d]);
|
||||
return O("div", { className: F("ff-data-list-framework", t), children: [u(n.sider, { isTreeSider: k, ...x }), O("div", { className: F("ff-data-list-container", P == null ? void 0 : P.container), children: [u(n.filter, { isConditionFormLayout: C }), u(n.toolbar, { title: h, tabs: w }), u(Ea, { ...R, ...p, primaryKey: g, itemRender: I, dataSource: a }), u(n.footer, { isPaginate: r, isOperations: o, operations: s })] })] });
|
||||
}, ba = ({ className: e, operations: t, children: n, data: a, onClickCallback: r }) => O("div", { className: F("data-list-grid-layout-item-container", e), children: [n, !!(t != null && t.length) && u("div", { className: "data-list-grid-layout-item-actions", children: t.map((i) => u("span", { className: "data-list-grid-layout-item-action", children: u(v.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, data: a, confirm: i.confirm, onAfterClick: (o) => o !== !1 && (r == null ? void 0 : r(i.isRefresh, a)) }, i.uuid || yt()) }, (i == null ? void 0 : i.uuid) || yt())) })] }), Ca = ({ listCode: e, className: t, layouts: n = {}, dataSource: a, columns: r, isItemOperations: i, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: d, resource: c, primaryKey: g, title: h, tabs: p, isPaginate: f, isTreeSider: w, treeSiderConfig: C, isConditionFormLayout: k, ...x }) => {
|
||||
const { classNames: P, onClickCallback: E } = ie(ee), R = un(l, d, g, c), B = St(l, d, a, g, c);
|
||||
return O("div", { className: F("ff-data-table-framework", t), children: [u(n.sider, { isTreeSider: w, ...C }), O("div", { className: F("ff-data-table-container", P == null ? void 0 : P.container), children: [u(n.filter, { isConditionFormLayout: k }), u(n.toolbar, { title: h, tabs: p }), u($a, { ...x, primaryKey: g, className: "ff-data-table-content", columns: r, dataSource: a, operationRender: B ? (I) => {
|
||||
var M;
|
||||
return u("div", { className: "ff-data-table-actions", children: (M = R(I)) == null ? void 0 : M.map((T, z) => u(v.Link, { size: "small", uuid: T.uuid, type: T.type, name: T.name, widget: T.widget, widgetType: T.widgetType, widgetProps: T.widgetProps, widgetData: T.widgetData, widgetSetting: T.widgetSetting, widgetContainerProps: T.widgetContainerSetting, data: I, confirm: T.confirm, onAfterClick: (N) => N !== !1 && (E == null ? void 0 : E(T.isRefresh, I)) }, T.uuid || z)) });
|
||||
const { classNames: P, onClickCallback: T } = ie(ee), I = m.pick(f, ["column", "colWidth", "beforeRender", "afterRender", "style"]), A = un(l, d, g, c), M = G((z, O, B) => u(ba, { className: F("ff-data-list-framework-item", P.item), operations: i ? A(O) : [], data: c ? { [c]: O } : O, children: z, onClickCallback: T }), [c, g, i, T, l, d]);
|
||||
return R("div", { className: F("ff-data-list-framework", t), children: [u(n.sider, { isTreeSider: k, ...x }), R("div", { className: F("ff-data-list-container", P == null ? void 0 : P.container), children: [u(n.filter, { isConditionFormLayout: C }), u(n.toolbar, { title: h, tabs: w }), u(Ea, { ...I, ...p, primaryKey: g, itemRender: M, dataSource: a }), u(n.footer, { isPaginate: r, isOperations: o, operations: s })] })] });
|
||||
}, ba = ({ className: e, operations: t, children: n, data: a, onClickCallback: r }) => R("div", { className: F("data-list-grid-layout-item-container", e), children: [n, !!(t != null && t.length) && u("div", { className: "data-list-grid-layout-item-actions", children: t.map((i) => u("span", { className: "data-list-grid-layout-item-action", children: u($.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, data: a, confirm: i.confirm, onAfterClick: (o) => o !== !1 && (r == null ? void 0 : r(i.isRefresh, a)) }, i.uuid || yt()) }, (i == null ? void 0 : i.uuid) || yt())) })] }), Ca = ({ listCode: e, className: t, layouts: n = {}, dataSource: a, columns: r, isItemOperations: i, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: d, resource: c, primaryKey: g, title: h, tabs: p, isPaginate: f, isTreeSider: w, treeSiderConfig: C, isConditionFormLayout: k, ...x }) => {
|
||||
const { classNames: P, onClickCallback: T } = ie(ee), I = un(l, d, g, c), A = St(l, d, a, g, c);
|
||||
return R("div", { className: F("ff-data-table-framework", t), children: [u(n.sider, { isTreeSider: w, ...C }), R("div", { className: F("ff-data-table-container", P == null ? void 0 : P.container), children: [u(n.filter, { isConditionFormLayout: k }), u(n.toolbar, { title: h, tabs: p }), u($a, { ...x, primaryKey: g, className: "ff-data-table-content", columns: r, dataSource: a, operationRender: A ? (M) => {
|
||||
var z;
|
||||
return u("div", { className: "ff-data-table-actions", children: (z = I(M)) == null ? void 0 : z.map((O, B) => u($.Link, { size: "small", uuid: O.uuid, type: O.type, name: O.name, widget: O.widget, widgetType: O.widgetType, widgetProps: O.widgetProps, widgetData: O.widgetData, widgetSetting: O.widgetSetting, widgetContainerProps: O.widgetContainerSetting, data: M, confirm: O.confirm, onAfterClick: (v) => v !== !1 && (T == null ? void 0 : T(O.isRefresh, M)) }, O.uuid || B)) });
|
||||
} : null }), u(n.footer, { isPaginate: f, isOperations: o, operations: s })] })] });
|
||||
}, Et = (e = [], t, n = null) => {
|
||||
var a;
|
||||
return (a = m.sortBy(e, ["y", "x"])) == null ? void 0 : a.map(({ i: r, x: i, y: o, w: s, h: l, field: { boxStyle: d, ...c } = {} }, g) => u("div", { className: "grid-layout-item", style: gn(i, o, s, l, d), children: u(t, { ...c, basicForm: n }) }, r ?? g));
|
||||
}, gn = (e, t, n, a, r = {}, i = 0) => {
|
||||
const o = { "--grid-layout-h": `${a}`, "--grid-layout-w": `${n}`, "--grid-layout-x": `${e}`, "--grid-layout-y": `${t}`, "--grid-layout-row-height-offset": "0px" };
|
||||
return r != null && r.autoHeight ? o.height = "fit-content" : o["--grid-layout-row"] = `${a}`, r != null && r.alignItems && (o["--grid-layout-box-align-items"] = r.alignItems), r != null && r.justifyContent && (o["--grid-layout-box-justify-content"] = r.justifyContent), o["--grid-layout-box-margin"] = _t(r == null ? void 0 : r.marginTop, r == null ? void 0 : r.marginRight, r == null ? void 0 : r.marginBottom, r == null ? void 0 : r.marginLeft), o["--grid-layout-box-padding"] = _t(r == null ? void 0 : r.paddingTop, r == null ? void 0 : r.paddingRight, r == null ? void 0 : r.paddingBottom, r == null ? void 0 : r.paddingLeft), i && (o.height = `${i}px`), o;
|
||||
}, _t = (e, t, n, a) => `${e || 0}px ${t || 0}px ${n || 0}px ${a || 0}px`, Ar = (e = "Text", t = "@pkg/ff/grid-layouts") => e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`, pn = ({ className: e, isConditionFormLayout: t }) => {
|
||||
return r != null && r.autoHeight ? o.height = "fit-content" : o["--grid-layout-row"] = `${a}`, r != null && r.alignItems && (o["--grid-layout-box-align-items"] = r.alignItems), r != null && r.justifyContent && (o["--grid-layout-box-justify-content"] = r.justifyContent), o["--grid-layout-box-margin"] = Kt(r == null ? void 0 : r.marginTop, r == null ? void 0 : r.marginRight, r == null ? void 0 : r.marginBottom, r == null ? void 0 : r.marginLeft), o["--grid-layout-box-padding"] = Kt(r == null ? void 0 : r.paddingTop, r == null ? void 0 : r.paddingRight, r == null ? void 0 : r.paddingBottom, r == null ? void 0 : r.paddingLeft), i && (o.height = `${i}px`), o;
|
||||
}, Kt = (e, t, n, a) => `${e || 0}px ${t || 0}px ${n || 0}px ${a || 0}px`, Ar = (e = "Text", t = "@pkg/ff/grid-layouts") => e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`, pn = ({ className: e, isConditionFormLayout: t }) => {
|
||||
var h, p;
|
||||
const [n, a] = A({}), { listCode: r, onKeywordChange: i, onConditionChange: o, getBase62params: s, classNames: l } = S.useContext(ee), { keyword: d, condition: c } = (s == null ? void 0 : s()) || {}, [g] = et.useForm();
|
||||
const [n, a] = j({}), { listCode: r, onKeywordChange: i, onConditionChange: o, getBase62params: s, classNames: l } = S.useContext(ee), { keyword: d, condition: c } = (s == null ? void 0 : s()) || {}, [g] = et.useForm();
|
||||
return V(() => {
|
||||
r && t && L.get(`/api/_/${r}/list-condition-form-layout`).then(({ resource: f, marginX: w, marginY: C, rowHeight: k, cols: x, fields: P }) => {
|
||||
a({ resource: f, itemMargin: [w, C], rowHeight: k, cols: x, fields: P });
|
||||
@ -383,48 +383,48 @@ const ee = S.createContext({ listCode: "", classNames: {}, getBase62params: (e,
|
||||
g.setFieldsValue({ keyword: f, ...w });
|
||||
} }) }) : u("div", { className: "ff-data-list-filter-default-form ff-grid-layout-form", children: u("div", { className: "grid-layout-item", style: gn(20, 0, 5, 2), children: u(et.Item, { name: ["keyword"], children: u(Dn.Search, { allowClear: !0, enterButton: "搜索", placeholder: "多关键字 | 分割", onSearch: (f) => i(f) }) }) }) }) }) });
|
||||
}, ka = ({ cols: e, fields: t, onReset: n }) => {
|
||||
const [a, r] = A(!1), i = q(() => t == null ? void 0 : t.toReversed().some((o) => o.y > 1 || o.x + o.w >= e - 5), [e, t]);
|
||||
return O(et.Item, { label: " ", style: { "--item-span": 5 }, className: F("ff-data-list-filter-actions", { expanded: a }), children: [u(nt, { onClick: n, children: "重置" }), u(nt, { type: "primary", htmlType: "submit", children: "查询" }), i && u(v.Link, { className: "ff-data-list-filter-expanded-button", widget: () => r((o) => !o), type: "primary", name: a ? "关闭" : "展开", icon: a ? "icon-up" : "icon-down", iconPosition: "end" })] });
|
||||
const [a, r] = j(!1), i = q(() => t == null ? void 0 : t.toReversed().some((o) => o.y > 1 || o.x + o.w >= e - 5), [e, t]);
|
||||
return R(et.Item, { label: " ", style: { "--item-span": 5 }, className: F("ff-data-list-filter-actions", { expanded: a }), children: [u(nt, { onClick: n, children: "重置" }), u(nt, { type: "primary", htmlType: "submit", children: "查询" }), i && u($.Link, { className: "ff-data-list-filter-expanded-button", widget: () => r((o) => !o), type: "primary", name: a ? "关闭" : "展开", icon: a ? "icon-up" : "icon-down", iconPosition: "end" })] });
|
||||
};
|
||||
pn.reservedFields = [{ x: 0, y: 0, h: 3, w: 5, field: { isVirtual: !0, widgetPrefix: "@pkg/ff/grid-layout-forms", widget: "Input", code: "keyword", label: "关键字", placeholder: "多关键字 | 分割", extras: { prefix: "icon-search" } } }];
|
||||
const Sa = ({ className: e, operations: t, isOperations: n, isPaginate: a }) => {
|
||||
const { onPageChange: r, onPageSizeChange: i, onClickCallback: o, getBase62params: s } = S.useContext(ee), { total: l, page: d, pageSize: c } = (s == null ? void 0 : s()) || {};
|
||||
return n && !m.isEmpty(t) || a ? O("div", { className: F("ff-data-list-footer", e), children: [u("div", { className: "ff-data-list-actions", children: t == null ? void 0 : t.map((g, h) => u(v, { uuid: g.uuid, type: g.type, name: g.name, widget: g.widget, widgetType: g.widgetType, widgetProps: g.widgetProps, widgetData: g.widgetData, widgetSetting: g.widgetSetting, widgetContainerProps: g.widgetContainerSetting, onAfterClick: (p) => p !== !1 && (o == null ? void 0 : o(g.isRefresh, null)) }, g.uuid || h)) }), a && u(Un, { size: "small", total: l, pageSize: c, showSizeChanger: !1, showTotal: (g) => `第 ${d} 页 / 总共 ${g} 条`, onChange: r, onShowSizeChange: i })] }) : null;
|
||||
return n && !m.isEmpty(t) || a ? R("div", { className: F("ff-data-list-footer", e), children: [u("div", { className: "ff-data-list-actions", children: t == null ? void 0 : t.map((g, h) => u($, { uuid: g.uuid, type: g.type, name: g.name, widget: g.widget, widgetType: g.widgetType, widgetProps: g.widgetProps, widgetData: g.widgetData, widgetSetting: g.widgetSetting, widgetContainerProps: g.widgetContainerSetting, onAfterClick: (p) => p !== !1 && (o == null ? void 0 : o(g.isRefresh, null)) }, g.uuid || h)) }), a && u(Un, { size: "small", total: l, pageSize: c, showSizeChanger: !1, showTotal: (g) => `第 ${d} 页 / 总共 ${g} 条`, onChange: r, onShowSizeChange: i })] }) : null;
|
||||
}, xa = [{ title: "parent 1", key: "0-0", children: [{ title: "parent 1-0", key: "0-0-0", disabled: !0, children: [{ title: "leaf", key: "0-0-0-0", disableCheckbox: !0 }, { title: "leaf", key: "0-0-0-1" }] }, { title: "parent 1-1", key: "0-0-1", children: [{ title: u("span", { style: { color: "#1677ff" }, children: "sss" }), key: "0-0-1-0" }] }] }], Pa = ({ className: e, width: t = 280, isTreeSider: n }) => {
|
||||
const { classNames: a } = ie(ee);
|
||||
return n ? u(qn.DirectoryTree, { className: F("ff-data-list-sider", a.sider, e), style: { "--sider-width": t }, showLine: !0, showIcon: !1, treeData: xa }) : null;
|
||||
}, va = ({ className: e, title: t, tabs: n }) => {
|
||||
const { getBase62params: a, onTabChange: r, onReload: i, classNames: o } = ie(ee), { tab: s } = (a == null ? void 0 : a()) || {}, [l, d] = Xn((n == null ? void 0 : n[0].value) ?? (n == null ? void 0 : n[0].code), { value: s, onChange: r });
|
||||
return O("div", { className: F("ff-data-list-toolbar", o.toolbar, e), children: [u("div", { className: "ff-data-list-title", children: t }), u(Kn, { className: "ff-data-list-tabs", itemRender: ({ label: c, code: g, value: h }) => u("span", { onClick: () => d(h ?? g), className: F("ff-data-list-tab", { active: (h ?? g) == l }), children: c }), items: n }), O("div", { className: "ff-data-list-actions", children: [u(v.Link, { icon: "icon-reload", widget: () => i() }), u(v.Link, { icon: "icon-setting" })] })] });
|
||||
}, mn = ({ isItemGridLayout: e, theme: t, themeProps: n, onClickCallback: a, onReload: r, listCode: i, total: o = 0, page: s = 0, onPageChange: l, pageSize: d = 30, onPageSizeChange: c, tab: g, onTabChange: h, keyword: p, onKeywordChange: f, condition: w, onConditionChange: C, sider: k, onSiderChange: x, layouts: P, classNames: E = {}, payload: R = {}, ...B }) => {
|
||||
const [I, M] = A(), T = G((N, _) => {
|
||||
const W = { tab: g, page: s, pageSize: d, keyword: p, sider: k, condition: w, total: o, payload: R };
|
||||
return N && N != "init" ? m.get(W, N, _) : W;
|
||||
}, [JSON.stringify(w), JSON.stringify(R), g, s, d, p, k, o]), z = q(() => {
|
||||
let N = { sider: Pa, filter: pn, footer: Sa, toolbar: va };
|
||||
P === !1 ? N = { sider: null, filter: null, footer: null, toolbar: null } : m.isPlainObject(P) && (N = Object.assign({}, N, P));
|
||||
for (const _ in N) if (N[_]) {
|
||||
if (In(N[_])) {
|
||||
const W = N[_];
|
||||
N[_] = (pe) => S.cloneElement(W, pe);
|
||||
return R("div", { className: F("ff-data-list-toolbar", o.toolbar, e), children: [u("div", { className: "ff-data-list-title", children: t }), u(_n, { className: "ff-data-list-tabs", itemRender: ({ label: c, code: g, value: h }) => u("span", { onClick: () => d(h ?? g), className: F("ff-data-list-tab", { active: (h ?? g) == l }), children: c }), items: n }), R("div", { className: "ff-data-list-actions", children: [u($.Link, { icon: "icon-reload", widget: () => i() }), u($.Link, { icon: "icon-setting" })] })] });
|
||||
}, mn = ({ isItemGridLayout: e, theme: t, themeProps: n, onClickCallback: a, onReload: r, listCode: i, total: o = 0, page: s = 0, onPageChange: l, pageSize: d = 30, onPageSizeChange: c, tab: g, onTabChange: h, keyword: p, onKeywordChange: f, condition: w, onConditionChange: C, sider: k, onSiderChange: x, layouts: P, classNames: T = {}, payload: I = {}, ...A }) => {
|
||||
const [M, z] = j(), O = G((v, _) => {
|
||||
const W = { tab: g, page: s, pageSize: d, keyword: p, sider: k, condition: w, total: o, payload: I };
|
||||
return v && v != "init" ? m.get(W, v, _) : W;
|
||||
}, [JSON.stringify(w), JSON.stringify(I), g, s, d, p, k, o]), B = q(() => {
|
||||
let v = { sider: Pa, filter: pn, footer: Sa, toolbar: va };
|
||||
P === !1 ? v = { sider: null, filter: null, footer: null, toolbar: null } : m.isPlainObject(P) && (v = Object.assign({}, v, P));
|
||||
for (const _ in v) if (v[_]) {
|
||||
if (In(v[_])) {
|
||||
const W = v[_];
|
||||
v[_] = (pe) => S.cloneElement(W, pe);
|
||||
}
|
||||
} else N[_] = () => u(S.Fragment, {});
|
||||
return N;
|
||||
} else v[_] = () => u(S.Fragment, {});
|
||||
return v;
|
||||
}, [P]);
|
||||
return V(() => {
|
||||
t ? re.getWidgetComponent(t).then((N) => {
|
||||
if (!N) throw `${t} not found`;
|
||||
return N;
|
||||
}).catch((N) => ({ default: () => `${N}` })).then((N) => M(S.createElement(N.default, { ...B, layouts: z, $setting: n }))) : M(u(e ? wa : Ca, { ...B, layouts: z, $setting: n }));
|
||||
}, [t, n]), u(ee.Provider, { value: { classNames: E, listCode: i, onClickCallback: a, onReload: r, getBase62params: T, onPageChange: l, onPageSizeChange: c, onTabChange: h, onSiderChange: x, onKeywordChange: f, onConditionChange: C, setPage: l, setPageSize: c, setTab: h, setSider: x, setKeyword: f, setCondition: C }, children: I && S.cloneElement(I, B) });
|
||||
t ? re.getWidgetComponent(t).then((v) => {
|
||||
if (!v) throw `${t} not found`;
|
||||
return v;
|
||||
}).catch((v) => ({ default: () => `${v}` })).then((v) => z(S.createElement(v.default, { ...A, layouts: B, $setting: n }))) : z(u(e ? wa : Ca, { ...A, layouts: B, $setting: n }));
|
||||
}, [t, n]), u(ee.Provider, { value: { classNames: T, listCode: i, onClickCallback: a, onReload: r, getBase62params: O, onPageChange: l, onPageSizeChange: c, onTabChange: h, onSiderChange: x, onKeywordChange: f, onConditionChange: C, setPage: l, setPageSize: c, setTab: h, setSider: x, setKeyword: f, setCondition: C }, children: M && S.cloneElement(M, A) });
|
||||
};
|
||||
mn.propTypes = { classNames: b.exact({ sider: b.string, filter: b.string, footer: b.string, toolbar: b.string, container: b.string, content: b.string, item: b.string }), layouts: b.oneOfType([b.exact({ sider: b.oneOfType([b.elementType, b.element]), filter: b.oneOfType([b.elementType, b.element]), footer: b.oneOfType([b.elementType, b.element]), toolbar: b.oneOfType([b.elementType, b.element]) }), b.bool]) };
|
||||
var fe, ge, $e, st;
|
||||
const le = class le {
|
||||
constructor() {
|
||||
j(this, ge, null);
|
||||
j(this, $e, /* @__PURE__ */ new Map());
|
||||
j(this, st, () => {
|
||||
E(this, ge, null);
|
||||
E(this, $e, /* @__PURE__ */ new Map());
|
||||
E(this, st, () => {
|
||||
if (y(this, ge)) return y(this, ge).port.postMessage({ command: "status", data: [] });
|
||||
U(this, ge, new SharedWorker(new URL("/ff-worker/res-ws.js", self.location))), y(this, ge).port.onmessage = (t) => {
|
||||
var n, a;
|
||||
@ -436,25 +436,25 @@ const le = class le {
|
||||
});
|
||||
}, y(this, ge).port.postMessage({ command: "status", data: [] });
|
||||
});
|
||||
$(this, "subscribe", (t, n = []) => (n ? Array.isArray(n) && n.length == 0 ? n = "*" : Array.isArray(n) || (n = [n].flat()) : n = "*", y(this, $e).set(t, n), y(this, $e).size == 1 && y(this, st).call(this), () => this.unsubscribe(t)));
|
||||
$(this, "unsubscribe", (t) => y(this, $e).delete(t));
|
||||
N(this, "subscribe", (t, n = []) => (n ? Array.isArray(n) && n.length == 0 ? n = "*" : Array.isArray(n) || (n = [n].flat()) : n = "*", y(this, $e).set(t, n), y(this, $e).size == 1 && y(this, st).call(this), () => this.unsubscribe(t)));
|
||||
N(this, "unsubscribe", (t) => y(this, $e).delete(t));
|
||||
if (y(le, fe)) return y(le, fe);
|
||||
}
|
||||
};
|
||||
fe = new WeakMap(), ge = new WeakMap(), $e = new WeakMap(), st = new WeakMap(), j(le, fe, null), $(le, "getInstance", () => (y(le, fe) || U(le, fe, new le()), y(le, fe)));
|
||||
fe = new WeakMap(), ge = new WeakMap(), $e = new WeakMap(), st = new WeakMap(), E(le, fe, null), N(le, "getInstance", () => (y(le, fe) || U(le, fe, new le()), y(le, fe)));
|
||||
let xt = le;
|
||||
const hn = xt.getInstance(), jt = S.forwardRef(({ listCode: e, base62params: t, className: n, theme: a, themeProps: r, layouts: i, classNames: o }, s) => {
|
||||
const [{ resource: l, primaryKey: d, batchOperations: c = [], itemOperations: g = [], columns: h = [], themeConfig: p, theme: f, isConditionFormLayout: w = !1, isTreeSider: C, treeSiderConfig: k, isItemGridLayout: x, itemGridLayout: P, title: E, isPaginate: R, tabs: B }, I] = A({ isItemGridLayout: !1, itemGridLayout: {} }), M = ya(e, t), [{ dataSource: T, itemOperationsAccess: z, condition: N, tab: _, keyword: W, page: pe, total: Ye, pageSize: Xe, sider: ut, onConditionChange: Q, onTabChange: vn, onKeywordChange: $n, onPageChange: Nn, onPageSizeChange: Tn, onSiderChange: Fn, onReload: gt, payload: Rn }, Mt] = fa(M, e, d, l), On = St(g, z, T, d), En = St(c);
|
||||
const [{ resource: l, primaryKey: d, batchOperations: c = [], itemOperations: g = [], columns: h = [], themeConfig: p, theme: f, isConditionFormLayout: w = !1, isTreeSider: C, treeSiderConfig: k, isItemGridLayout: x, itemGridLayout: P, title: T, isPaginate: I, tabs: A }, M] = j({ isItemGridLayout: !1, itemGridLayout: {} }), z = ya(e, t), [{ dataSource: O, itemOperationsAccess: B, condition: v, tab: _, keyword: W, page: pe, total: Ye, pageSize: Xe, sider: ut, onConditionChange: Q, onTabChange: vn, onKeywordChange: $n, onPageChange: Nn, onPageSizeChange: Tn, onSiderChange: Fn, onReload: gt, payload: Rn }, Mt] = fa(z, e, d, l), On = St(g, B, O, d), En = St(c);
|
||||
V(() => {
|
||||
let te = null;
|
||||
return e && L.get(`/api/_/${e}`).resp(({ data: Qe, res: An }) => {
|
||||
Qe != null && Qe.isDynamicRefresh && (te = hn.subscribe(() => gt(), An)), I(Qe);
|
||||
}).catch(() => I({})), () => te == null ? void 0 : te();
|
||||
Qe != null && Qe.isDynamicRefresh && (te = hn.subscribe(() => gt(), An)), M(Qe);
|
||||
}).catch(() => M({})), () => te == null ? void 0 : te();
|
||||
}, [e]), S.useImperativeHandle(s, () => ({ onReload: gt, onClickCallback: Mt }));
|
||||
const jn = { listCode: e, title: E, classNames: o, layouts: i, resource: l, primaryKey: d, theme: a || f, themeProps: r || p, isTreeSider: C, treeSiderConfig: k, isPaginate: R, tabs: B, isItemOperations: On, itemOperations: g == null ? void 0 : g.map((te) => m.isEmpty(te == null ? void 0 : te.confirm) ? te : { ...te, confirm: Object.assign({}, te.confirm, { getPopupContainer: () => document.body }) }), isBatchOperations: En, batchOperations: c, isItemGridLayout: x, columns: h, itemGridLayout: P, isConditionFormLayout: w, itemOperationsAccess: z, dataSource: T, onConditionChange: Q, onTabChange: vn, onKeywordChange: $n, onPageChange: Nn, onPageSizeChange: Tn, onSiderChange: Fn, condition: N, tab: _, keyword: W, page: pe, total: Ye, pageSize: Xe, sider: ut, payload: Rn };
|
||||
const jn = { listCode: e, title: T, classNames: o, layouts: i, resource: l, primaryKey: d, theme: a || f, themeProps: r || p, isTreeSider: C, treeSiderConfig: k, isPaginate: I, tabs: A, isItemOperations: On, itemOperations: g == null ? void 0 : g.map((te) => m.isEmpty(te == null ? void 0 : te.confirm) ? te : { ...te, confirm: Object.assign({}, te.confirm, { getPopupContainer: () => document.body }) }), isBatchOperations: En, batchOperations: c, isItemGridLayout: x, columns: h, itemGridLayout: P, isConditionFormLayout: w, itemOperationsAccess: B, dataSource: O, onConditionChange: Q, onTabChange: vn, onKeywordChange: $n, onPageChange: Nn, onPageSizeChange: Tn, onSiderChange: Fn, condition: v, tab: _, keyword: W, page: pe, total: Ye, pageSize: Xe, sider: ut, payload: Rn };
|
||||
return u(mn, { ...jn, className: F("ff-data-list-helper", n), onReload: gt, onClickCallback: Mt });
|
||||
}), fn = (e, t, n = !0) => n !== !0 && n-- <= 0 ? [] : m.isArray(e) && !m.isEmpty(e) ? e.reduce((a, r) => (Reflect.has(r, t) && Reflect.has(r, "children") && a.push(r[t]), Reflect.has(r, "children") && !m.isEmpty(r.children) ? a.concat(fn(r.children, t, n)) : a), []) : [], $a = ({ className: e, primaryKey: t, columns: n = [], dataSource: a = [], operationRender: r, operationWidth: i = 180, components: o = {}, ...s }) => {
|
||||
const { classNames: l } = ie(ee), d = K(null), c = K(null), [g, h] = A([]), [p, f] = A({ width: 0, height: 0 });
|
||||
const { classNames: l } = ie(ee), d = K(null), c = K(null), [g, h] = j([]), [p, f] = j({ width: 0, height: 0 });
|
||||
V(() => {
|
||||
h(fn(a, t));
|
||||
}, [a, t]), Mn(() => {
|
||||
@ -467,14 +467,14 @@ const hn = xt.getInstance(), jt = S.forwardRef(({ listCode: e, base62params: t,
|
||||
};
|
||||
}, []);
|
||||
const w = ma(n), C = ha(o);
|
||||
return u("div", { ref: c, className: F("ff-data-list-table", l.content, e), children: p.height ? u(_n, { bordered: !0, ...s, components: C, ref: d, rowKey: (k) => (k == null ? void 0 : k[t]) ?? Math.random(), columns: w == null ? void 0 : w.concat(r ? [{ title: "操作", align: "center", fixed: "right", width: `${Math.ceil(i / p.width * 100).toFixed(2)}%`, render: (k, x, P) => r(x, P) }] : []), dataSource: a, size: "middle", scroll: { x: "max-content", y: p.height - 50 }, pagination: !1, expandable: { defaultExpandAllRows: !0, expandRowByClick: !0, onExpandedRowsChange: h, expandedRowKeys: g } }) : null });
|
||||
return u("div", { ref: c, className: F("ff-data-list-table", l.content, e), children: p.height ? u(Kn, { bordered: !0, ...s, components: C, ref: d, rowKey: (k) => (k == null ? void 0 : k[t]) ?? Math.random(), columns: w == null ? void 0 : w.concat(r ? [{ title: "操作", align: "center", fixed: "right", width: `${Math.ceil(i / p.width * 100).toFixed(2)}%`, render: (k, x, P) => r(x, P) }] : []), dataSource: a, size: "middle", scroll: { x: "max-content", y: p.height - 50 }, pagination: !1, expandable: { defaultExpandAllRows: !0, expandRowByClick: !0, onExpandedRowsChange: h, expandedRowKeys: g } }) : null });
|
||||
}, Na = "RC_FORM_INTERNAL_HOOKS", Ta = (e) => {
|
||||
const [t, n] = S.useState({ items: [] });
|
||||
return V(() => {
|
||||
e && L.get(`/api/_/${e}`).then(({ uuid: a, code: r, name: i, resource: o, primaryKey: s, marginX: l, marginY: d, cols: c, rowHeight: g, fields: h, theme: p, themeSetting: f }) => ({ uuid: a, code: r, name: i, resource: o, primaryKey: s, marginX: l, marginY: d, cols: c, rowHeight: g, theme: p, themeProps: f, items: h })).then(n);
|
||||
e && L.get(`/api/_/${e}`).then(({ uuid: a, code: r, name: i, resource: o, primaryKey: s, marginX: l, marginY: d, cols: c, rowHeight: g, fields: h, theme: p, themeSetting: f, groups: w }) => ({ uuid: a, code: r, name: i, resource: o, primaryKey: s, marginX: l, marginY: d, cols: c, rowHeight: g, theme: p, themeProps: f, groups: w, items: h })).then(n);
|
||||
}, [e]), t;
|
||||
}, Fa = (e, { initialValue: t, initialValueLanguage: n, convertJs: a, convertJsSetting: r, type: i = "string" }, o = null) => {
|
||||
const s = K(!1), l = ie(en), [d, c] = A(), [g, h] = A(n != "javascript" && e ? l.getFieldValue(e) : void 0), { registerWatch: p } = l.getInternalHooks(Na) || {};
|
||||
const s = K(!1), l = ie(en), [d, c] = j(), [g, h] = j(n != "javascript" && e ? l.getFieldValue(e) : void 0), { registerWatch: p } = l.getInternalHooks(Na) || {};
|
||||
return V(() => p == null ? void 0 : p((f, w, C) => {
|
||||
if (!s.current) return;
|
||||
const k = m.get(w, e);
|
||||
@ -487,7 +487,7 @@ const hn = xt.getInstance(), jt = S.forwardRef(({ listCode: e, base62params: t,
|
||||
});
|
||||
}, [g, a, r]), [d ?? g, g];
|
||||
}, Lr = (e, t, n = null) => q(() => Et(e, t, n), [e]), yn = (e, t, n = {}, a = {}, r = {}, i = null) => {
|
||||
const o = ie(en), s = ct(), l = K(!0), d = K([]), [c, g] = A(t), [h, p] = A(), f = Z.useWatch((w) => JSON.stringify(m.pick(w, d.current)), o) || "{}";
|
||||
const o = ie(en), s = ct(), l = K(!0), d = K([]), [c, g] = j(t), [h, p] = j(), f = Z.useWatch((w) => JSON.stringify(m.pick(w, d.current)), o) || "{}";
|
||||
return Je(() => {
|
||||
e && xe.exec(e, n, { ...a, getFieldValueForBasicForm: (w) => r ? r.getFieldValue(w) : null, getFieldValue: m.wrap(o.getFieldValue, (w, C) => (d.current.some((k) => m.isEqual(k, C)) || (d.current.push(C), s()), w == null ? void 0 : w(C))), isFieldTouched: o.isFieldTouched, isFieldsTouched: o.isFieldsTouched }).then((w) => {
|
||||
l.current && (g(w), p(null));
|
||||
@ -496,7 +496,7 @@ const hn = xt.getInstance(), jt = S.forwardRef(({ listCode: e, base62params: t,
|
||||
});
|
||||
}, [e, f, o, n, a]), V(() => () => l.current = !1, []), e ? [i ? ae(c, i) : c, h] : [i ? ae(t, i) : t, null];
|
||||
}, Ra = ({ widget: e, widgetPrefix: t = "@pkg/ff/grid-layouts", basicForm: n, ...a }) => {
|
||||
const r = e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`, [i, o] = A();
|
||||
const r = e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`, [i, o] = j();
|
||||
return V(() => {
|
||||
r && re.getWidgetComponent(r).then(({ defaultProps: s = {}, default: l }) => ({ default: Oa(l, s, n) })).catch((s) => ({ default: () => `${s}` })).then((s) => o(S.createElement(s.default, a)));
|
||||
}, [r]), i;
|
||||
@ -507,7 +507,7 @@ const hn = xt.getInstance(), jt = S.forwardRef(({ listCode: e, base62params: t,
|
||||
}, [t == null ? void 0 : t.extras]), [k, x] = C(p);
|
||||
return u(e, { ...x, value: f, rawValue: w, $setting: Object.assign({}, o, k) });
|
||||
}, wn = ({ theme: e, basicForm: t, items: n = [{ key: "default", label: "默认" }], fields: a = [], itemRender: r, chunks: i = [], children: o, $setting: s = {}, ...l }) => {
|
||||
const [d, c] = A();
|
||||
const [d, c] = j();
|
||||
V(() => {
|
||||
e ? re.getWidgetComponent(e).then((h) => {
|
||||
if (!(h != null && h.default)) throw "not found";
|
||||
@ -516,46 +516,46 @@ const hn = xt.getInstance(), jt = S.forwardRef(({ listCode: e, base62params: t,
|
||||
}, [e]);
|
||||
const g = q(() => n == null ? void 0 : n.map((h) => ({ ...h, children: r(h, a == null ? void 0 : a.filter((p) => !(p != null && p.group) && h.key == "default" || p.group == h.key), h.key == "default" ? o : null) })).concat(i), [n, o, i]);
|
||||
return d && S.cloneElement(d, { items: g, basicForm: t, $setting: { ...s, ...l } });
|
||||
}, bn = ({ name: e, form: t = null, basicForm: n = null, style: a = {}, className: r, cols: i = 12, rowHeight: o = 21, containerPadding: s = [0, 0], itemMargin: l = [4, 0], formProps: d = {}, formFields: c = [], fields: g = [], data: h, theme: p, themeProps: f = {}, children: w, ...C }) => {
|
||||
const [k] = Z.useForm(t), x = q(() => [{ name: "__PROPS__", value: d }].concat(c), [d, c]);
|
||||
He(() => (k.setFieldsValue(h), () => k.resetFields()), [h]);
|
||||
const P = (E, R, B) => {
|
||||
const I = Et(R, Ra, n);
|
||||
return O("div", { className: F("ff-grid-layout", r), style: { ...a, "--grid-layout-item-margin-y": `${(l == null ? void 0 : l[0]) || 0}px`, "--grid-layout-item-margin-x": `${(l == null ? void 0 : l[1]) || 0}px`, "--grid-layout-container-padding-y": `${(s == null ? void 0 : s[0]) || 0}px`, "--grid-layout-container-padding-x": `${(s == null ? void 0 : s[1]) || 0}px`, "--grid-layout-cols": i, "--grid-layout-row-height": `${o}px` }, children: [I, B && S.cloneElement(B, { cols: i, rowHeight: o, itemMargin: l, containerPadding: s, fields: R, basicForm: n })] });
|
||||
}, bn = ({ name: e, form: t = null, basicForm: n = null, style: a = {}, className: r, cols: i = 12, rowHeight: o = 21, containerPadding: s = [0, 0], itemMargin: l = [4, 0], formProps: d = {}, formFields: c = [], fields: g = [], data: h, theme: p, themeProps: f = {}, groups: w = [{ key: "default", label: "默认" }], children: C, ...k }) => {
|
||||
const [x] = Z.useForm(t), P = q(() => [{ name: "__PROPS__", value: d }].concat(c), [d, c]);
|
||||
He(() => (x.setFieldsValue(h), () => x.resetFields()), [h]);
|
||||
const T = (I, A, M) => {
|
||||
const z = Et(A, Ra, n);
|
||||
return R("div", { className: F("ff-grid-layout", r), style: { ...a, "--grid-layout-item-margin-y": `${(l == null ? void 0 : l[0]) || 0}px`, "--grid-layout-item-margin-x": `${(l == null ? void 0 : l[1]) || 0}px`, "--grid-layout-container-padding-y": `${(s == null ? void 0 : s[0]) || 0}px`, "--grid-layout-container-padding-x": `${(s == null ? void 0 : s[1]) || 0}px`, "--grid-layout-cols": i, "--grid-layout-row-height": `${o}px` }, children: [z, M && S.cloneElement(M, { cols: i, rowHeight: o, itemMargin: l, containerPadding: s, fields: A, basicForm: n })] });
|
||||
};
|
||||
return u(Z, { ...C, fields: x, form: k, component: !1, children: p ? u(wn, { ...f, theme: p, itemRender: P, fields: g, children: w, basicForm: n }) : P(0, g, w) });
|
||||
return u(Z, { ...k, fields: P, form: x, component: !1, children: p ? u(wn, { ...f, items: w, theme: p, itemRender: T, fields: g, children: C, basicForm: n }) : T(0, g, C) });
|
||||
}, Vr = /* @__PURE__ */ ((e) => function({ code: t, data: n, ...a }) {
|
||||
const { uuid: r, resource: i, items: o, hides: s, rowHeight: l, marginX: d, marginY: c, cols: g, theme: h, themeProps: p } = Ta(t), f = q(() => [{ name: "__RESOURCE__", value: i }, { name: "__LAYOUT_KEY__", value: t }, { name: "__LAYOUT_UUID__", value: r }], [t, r, i]);
|
||||
return i && u(e, { name: t, theme: h, themeProps: p, ...a, fields: o, formFields: f, rowHeight: l, cols: g, itemMargin: [d, c], data: i ? { [i]: n } : n });
|
||||
const { uuid: r, resource: i, items: o, hides: s, rowHeight: l, marginX: d, marginY: c, cols: g, theme: h, themeProps: p, groups: f } = Ta(t) || {}, w = q(() => [{ name: "__RESOURCE__", value: i }, { name: "__LAYOUT_KEY__", value: t }, { name: "__LAYOUT_UUID__", value: r }], [t, r, i]);
|
||||
return i && u(e, { name: t, theme: h, themeProps: p, groups: f, ...a, fields: o, formFields: w, rowHeight: l, cols: g, itemMargin: [d, c], data: i ? { [i]: n } : n });
|
||||
})(bn), Ea = ({ column: e = 0, colWidth: t = 0, cols: n, rowHeight: a, itemMargin: r, fields: i, primaryKey: o, dataSource: s, itemClassName: l, beforeRender: d = null, afterRender: c = null, itemRender: g = (w, C, k) => w, empty: h = u(Hn, { description: null }), className: p, style: f = {} }) => {
|
||||
const { classNames: w } = ie(ee), C = q(() => u(bn, { cols: n, rowHeight: a, itemMargin: r, fields: i, className: l }), [i, n, a, r]), k = m.isEmpty(s);
|
||||
return O("div", { className: F("ff-data-list-content", w.content, p), style: Object.assign({}, f, e && { "--col-num": e }, t && { "--col-width": t }), children: [d == null ? void 0 : d(s), k ? h : s.map((x, P) => {
|
||||
const E = g(S.cloneElement(C, { data: x }), x, P);
|
||||
return S.cloneElement(E, { key: `${(x == null ? void 0 : x[o]) ?? P}-${ca(x)}` });
|
||||
return R("div", { className: F("ff-data-list-content", w.content, p), style: Object.assign({}, f, e && { "--col-num": e }, t && { "--col-width": t }), children: [d == null ? void 0 : d(s), k ? h : s.map((x, P) => {
|
||||
const T = g(S.cloneElement(C, { data: x }), x, P);
|
||||
return S.cloneElement(T, { key: `${(x == null ? void 0 : x[o]) ?? P}-${ca(x)}` });
|
||||
}), c == null ? void 0 : c(s)] });
|
||||
}, ja = ({ component: e, $props: t }) => {
|
||||
const { base62params: n } = _e(t, {});
|
||||
const { base62params: n } = Ke(t, {});
|
||||
return u(J, { children: u(jt, { listCode: e, base62params: L.decode(n) }) });
|
||||
}, Ir = () => u(Cn, {}), Cn = () => "Empty", Aa = ({ component: e, $setting: t, $props: n }) => {
|
||||
const [a, r] = A();
|
||||
const [a, r] = j();
|
||||
V(() => {
|
||||
if (!e) return r(u(Cn, { description: null }));
|
||||
re.getWidgetComponent(e).catch((o) => ({ default: () => `${o}` })).then((o) => S.createElement(o.default, { $setting: t })).then(r);
|
||||
}, [e]);
|
||||
const i = _e(n, {});
|
||||
const i = Ke(n, {});
|
||||
return a ? S.cloneElement(a, i) : null;
|
||||
}, Mr = () => "NotFoundPage";
|
||||
var ye, ne, we, be, Ue, qe;
|
||||
const ce = class ce {
|
||||
constructor() {
|
||||
j(this, ne, /* @__PURE__ */ new Map());
|
||||
j(this, we, {});
|
||||
j(this, be, null);
|
||||
$(this, "init", (t, n) => {
|
||||
E(this, ne, /* @__PURE__ */ new Map());
|
||||
E(this, we, {});
|
||||
E(this, be, null);
|
||||
N(this, "init", (t, n) => {
|
||||
U(this, ne, t), U(this, we, n);
|
||||
});
|
||||
$(this, "get", (t) => (y(this, ne).has(t) || (t = Array.from(y(this, ne).keys()).find((n) => y(this, ne).get(n).uri === t)), y(this, ne).get(t) || {}));
|
||||
$(this, "redirect", (t, n, a = {}) => {
|
||||
N(this, "get", (t) => (y(this, ne).has(t) || (t = Array.from(y(this, ne).keys()).find((n) => y(this, ne).get(n).uri === t)), y(this, ne).get(t) || {}));
|
||||
N(this, "redirect", (t, n, a = {}) => {
|
||||
const { uri: r, type: i, widgetProps: o } = this.get(t) || {}, { router: s, query: l, ...d } = n || {}, c = Object.assign({}, d, s), g = Object.assign({}, d, l);
|
||||
i == "list" && (c.base62params = L.encode(c != null && c.base62params ? c.base62params : c));
|
||||
let h = Qn(r || t, c);
|
||||
@ -563,17 +563,17 @@ const ce = class ce {
|
||||
for (const f in o || {}) (o == null ? void 0 : o.type) == "query" && Object.has(g, f) && p.append(f, JSON.stringify(g[f]));
|
||||
return p.size > 0 && (h = `${h}?${p.toString()}`), a != null && a.isOpenWindow ? window.open(h) : y(this, be).navigate(h, { replace: !!(a != null && a.isReplaceRouteHistory) });
|
||||
});
|
||||
$(this, "getMenus", (t) => {
|
||||
N(this, "getMenus", (t) => {
|
||||
var n;
|
||||
return ((n = y(this, we)) == null ? void 0 : n[t]) || [];
|
||||
});
|
||||
$(this, "findMenuPathByUuid", (t) => {
|
||||
N(this, "findMenuPathByUuid", (t) => {
|
||||
let n = [];
|
||||
for (const a in y(this, we)) if (n = y(this, Ue).call(this, y(this, we)[a], t, [a]), n.length > 1) return n;
|
||||
return n;
|
||||
});
|
||||
$(this, "getMenusByRouteUuid", (t) => y(this, qe).call(this, t, Object.values(y(this, we)).flat()));
|
||||
j(this, Ue, (t, n, a = []) => {
|
||||
N(this, "getMenusByRouteUuid", (t) => y(this, qe).call(this, t, Object.values(y(this, we)).flat()));
|
||||
E(this, Ue, (t, n, a = []) => {
|
||||
if (m.isEmpty(t)) return a;
|
||||
for (const { uuid: r, children: i } of t) {
|
||||
if (r == n) return a.concat(r);
|
||||
@ -581,26 +581,26 @@ const ce = class ce {
|
||||
}
|
||||
return a;
|
||||
});
|
||||
j(this, qe, (t, n) => {
|
||||
E(this, qe, (t, n) => {
|
||||
var r;
|
||||
let a = [];
|
||||
for (const i of n) i.widgetType == "redirect" && (i.uuid == t || i.widget == t ? a.push(i) : (r = i.children) != null && r.length && (a = a.concat(y(this, qe).call(this, t, i.children))));
|
||||
return a;
|
||||
});
|
||||
$(this, "getCurrentMenu", () => {
|
||||
N(this, "getCurrentMenu", () => {
|
||||
const { uuid: t } = this.getCurrentRoute() || {};
|
||||
if (!t) return;
|
||||
const n = this.getMenusByRouteUuid(t);
|
||||
return m.isEmpty(n) ? void 0 : n[0];
|
||||
});
|
||||
$(this, "getCurrentRoute", (t = 0) => {
|
||||
N(this, "getCurrentRoute", (t = 0) => {
|
||||
var a;
|
||||
const n = (a = y(this, be).state.matches[y(this, be).state.matches.length - 1 - t]) == null ? void 0 : a.route;
|
||||
if (!n) return null;
|
||||
for (let [r, i] of y(this, ne)) if (i.uri === n.path) return i;
|
||||
return null;
|
||||
});
|
||||
$(this, "getPageParams", (t) => {
|
||||
N(this, "getPageParams", (t) => {
|
||||
var r, i, o;
|
||||
let n = "", a = {};
|
||||
if (nn()) a = Zn(), n = (r = ea()) == null ? void 0 : r.search;
|
||||
@ -612,9 +612,9 @@ const ce = class ce {
|
||||
a[l] = s;
|
||||
}), t ? m.get(a, t) : a;
|
||||
});
|
||||
$(this, "createBrowserRouter", (t = {}) => {
|
||||
N(this, "createBrowserRouter", (t = {}) => {
|
||||
if (y(this, ne).size == 0) return null;
|
||||
const n = Ie.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/ff/frameworks/DefaultTheme"), a = Ie.get(re.checkUserToken() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"), r = { [n]: 0 }, i = (s, l) => () => Promise.all([re.getWidgetComponent(s), _e(l)]).then(([d, c]) => [d.default || function() {
|
||||
const n = Ie.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/ff/frameworks/DefaultTheme"), a = Ie.get(re.checkUserToken() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"), r = { [n]: 0 }, i = (s, l) => () => Promise.all([re.getWidgetComponent(s), Ke(l)]).then(([d, c]) => [d.default || function() {
|
||||
return `${s}`;
|
||||
}, c]).then(([d, c]) => ({ Component: () => S.createElement(rn, {}, S.createElement(d, { $setting: c })) })), o = Array.from(y(this, ne).values()).reduce((s, { uuid: l, uri: d, name: c, type: g, component: h, widgetSetting: p, widgetProps: f, isLogin: w, isLayout: C, extra: k }) => {
|
||||
let x = {}, P = 0;
|
||||
@ -625,11 +625,11 @@ const ce = class ce {
|
||||
case "fsdpf-component":
|
||||
x.element = S.createElement(Aa, { key: h, component: h, $setting: p, $props: f });
|
||||
}
|
||||
const E = (k == null ? void 0 : k.theme) ?? (k == null ? void 0 : k.layout);
|
||||
if (E) {
|
||||
const R = (k == null ? void 0 : k.themeProps) ?? (k == null ? void 0 : k.layoutProps);
|
||||
if (!r[E]) return r[E] = s.length, [...s, { path: "/", lazy: i(E, R), children: [{ path: d, ...x }] }];
|
||||
P = r[E];
|
||||
const T = (k == null ? void 0 : k.theme) ?? (k == null ? void 0 : k.layout);
|
||||
if (T) {
|
||||
const I = (k == null ? void 0 : k.themeProps) ?? (k == null ? void 0 : k.layoutProps);
|
||||
if (!r[T]) return r[T] = s.length, [...s, { path: "/", lazy: i(T, I), children: [{ path: d, ...x }] }];
|
||||
P = r[T];
|
||||
}
|
||||
return C && P > -1 ? (s[P].children.push({ path: d, ...x }), s) : [...s, { path: d, ...x }];
|
||||
}, [{ path: "/", lazy: i(n, {}), children: [] }]);
|
||||
@ -638,18 +638,18 @@ const ce = class ce {
|
||||
if (y(ce, ye)) return y(ce, ye);
|
||||
}
|
||||
};
|
||||
ye = new WeakMap(), ne = new WeakMap(), we = new WeakMap(), be = new WeakMap(), Ue = new WeakMap(), qe = new WeakMap(), j(ce, ye, null), $(ce, "getInstance", () => (y(ce, ye) || U(ce, ye, new ce()), y(ce, ye)));
|
||||
ye = new WeakMap(), ne = new WeakMap(), we = new WeakMap(), be = new WeakMap(), Ue = new WeakMap(), qe = new WeakMap(), E(ce, ye, null), N(ce, "getInstance", () => (y(ce, ye) || U(ce, ye, new ce()), y(ce, ye)));
|
||||
let Pt = ce;
|
||||
const La = ({ to: e, replace: t }) => nn() ? S.createElement(na, { to: e, replace: t }) : (window.document.location = e, "redirect"), Se = Pt.getInstance(), Te = new Worker(new URL("/ff-worker/index.js", self.location)), Ht = { getConfigure: (e) => Ie.get(e), route: { redirect: (...e) => Se.redirect(...e), getPageParams: (...e) => Se.getPageParams(...e), getCurrentRoute: () => Se.getCurrentRoute() }, popup: { notification: (...e) => X.notification(...e), success: (...e) => X.success(...e), error: (...e) => X.error(...e), form: (...e) => X.form(...e), modal: (...e) => X.modal(...e), confirm: (...e) => X.confirm(...e) } };
|
||||
var lt, Ee, Ce;
|
||||
const D = class D {
|
||||
constructor() {
|
||||
$(this, "exec", (t, n = {}, a = {}, r = "") => new Promise((i, o) => {
|
||||
N(this, "exec", (t, n = {}, a = {}, r = "") => new Promise((i, o) => {
|
||||
if (!/^(?!\s*(\/\/|\/\*|\*)).*?\S+/m.test(t)) return i();
|
||||
const s = Wt(D, lt)._++;
|
||||
y(D, Ee).set(s, a), D.mQueue.set(s, [i, o]), Te.postMessage({ id: s, session: r, category: "eval", method: t, args: n });
|
||||
}));
|
||||
$(this, "clear", (t) => Te.postMessage({ session: t, category: "clear" }));
|
||||
N(this, "clear", (t) => Te.postMessage({ session: t, category: "clear" }));
|
||||
if (y(D, Ce)) return y(D, Ce);
|
||||
Promise.resolve().then(() => sr).then((t) => {
|
||||
Ht.http = t.http;
|
||||
@ -669,7 +669,7 @@ const D = class D {
|
||||
}, !1);
|
||||
}
|
||||
};
|
||||
lt = new WeakMap(), Ee = new WeakMap(), Ce = new WeakMap(), $(D, "mQueue", /* @__PURE__ */ new Map()), j(D, lt, 0), j(D, Ee, /* @__PURE__ */ new Map()), j(D, Ce, null), $(D, "getInstance", () => (y(D, Ce) || U(D, Ce, new D()), y(D, Ce)));
|
||||
lt = new WeakMap(), Ee = new WeakMap(), Ce = new WeakMap(), N(D, "mQueue", /* @__PURE__ */ new Map()), E(D, lt, 0), E(D, Ee, /* @__PURE__ */ new Map()), E(D, Ce, null), N(D, "getInstance", () => (y(D, Ce) || U(D, Ce, new D()), y(D, Ce)));
|
||||
let vt = D;
|
||||
const xe = vt.getInstance(), ct = () => {
|
||||
const e = K(!0), [, t] = S.useReducer((n) => n + 1, 0);
|
||||
@ -680,7 +680,7 @@ const xe = vt.getInstance(), ct = () => {
|
||||
t.current = e;
|
||||
}, [e]), t.current;
|
||||
}, Br = (e) => {
|
||||
const [t, n] = A(e), a = K(null), r = G((i, o) => {
|
||||
const [t, n] = j(e), a = K(null), r = G((i, o) => {
|
||||
a.current = o, n(i);
|
||||
}, []);
|
||||
return V(() => {
|
||||
@ -696,14 +696,14 @@ const xe = vt.getInstance(), ct = () => {
|
||||
for (let a = 0; a < e.length; a++) e[a].value = ae((n = e[a]) == null ? void 0 : n.value, t), e[a] && Reflect.has(e[a], "children") && (e[a].children = kn(e[a].children, t));
|
||||
return e;
|
||||
}, Wr = (e, t = "json", n = "string", a, r = null) => {
|
||||
const [i] = Z.useForm(a), [o, s] = A([{ label: "无", value: "", disabled: !0 }]), l = K([]), d = Z.useWatch((c) => l.current.length === 0 ? null : m.pick(c, l.current), i) || null;
|
||||
const [i] = Z.useForm(a), [o, s] = j([{ label: "无", value: "", disabled: !0 }]), l = K([]), d = Z.useWatch((c) => l.current.length === 0 ? null : m.pick(c, l.current), i) || null;
|
||||
return V(() => {
|
||||
Array.isArray(e) ? s(e) : t === "javascript" && e ? xe.exec(e, {}, { getFieldValue: (c) => (l.current.includes(c) || l.current.push(c), i.getFieldValue(c)), getFieldValueForBasicForm: (c) => (l.current.includes(c) || l.current.push(c), r ? r.getFieldValue(c) : i.getFieldValue(c)) }).then((c) => {
|
||||
s(ae(c, "array"));
|
||||
}).catch((c) => console.error("useOptions", c)) : e && s(ae(e, "array"));
|
||||
}, [e, t, d]), kn(o, n);
|
||||
}, Dr = (e) => {
|
||||
const [t, n] = A(), a = { type: "GET" };
|
||||
const [t, n] = j(), a = { type: "GET" };
|
||||
if (typeof e == "string" ? a.url = e : m.isPlainObject(e) && Object.assign(a, e), !(a != null && a.url)) throw "url is required";
|
||||
const r = (i) => L.request(a, !1).resp((o) => (console.log("useSubscribeRequest", i), n(o), o));
|
||||
return He(() => {
|
||||
@ -715,13 +715,13 @@ const xe = vt.getInstance(), ct = () => {
|
||||
}, Va = (e) => {
|
||||
const [t, n] = S.useState({ items: [], hides: [] });
|
||||
return S.useEffect(() => {
|
||||
e && L.get(`/api/_/${e}`).then(({ pk: a, uuid: r, code: i, resource: o, align: s, cols: l, rowHeight: d, marginX: c, marginY: g, listenChangeFields: h, listenChangeFieldsFunc: p, fields: f, theme: w, themeSetting: C }) => ({ pk: a, uuid: r, code: i, resource: o, align: s, cols: l, rowHeight: d, marginX: c, marginY: g, theme: w, themeProps: C, listenChangeFields: h, listenChangeFieldsFunc: p, ...f.reduce((k, x) => {
|
||||
var P;
|
||||
return (P = x == null ? void 0 : x.field) != null && P.hidden ? k.hides.push(x == null ? void 0 : x.field) : k.items.push(x), k;
|
||||
e && L.get(`/api/_/${e}`).then(({ pk: a, uuid: r, code: i, resource: o, align: s, cols: l, rowHeight: d, marginX: c, marginY: g, listenChangeFields: h, listenChangeFieldsFunc: p, fields: f, theme: w, themeSetting: C, groups: k }) => ({ pk: a, uuid: r, code: i, resource: o, align: s, cols: l, rowHeight: d, marginX: c, marginY: g, theme: w, themeProps: C, groups: k, listenChangeFields: h, listenChangeFieldsFunc: p, ...f.reduce((x, P) => {
|
||||
var T;
|
||||
return (T = P == null ? void 0 : P.field) != null && T.hidden ? x.hides.push(P == null ? void 0 : P.field) : x.items.push(P), x;
|
||||
}, { items: [], hides: [] }) })).then(n);
|
||||
}, [e]), t;
|
||||
}, Ia = ({ max: e = 0, min: t = 0, type: n = "", message: a, pattern: r, required: i = !1, validator: o } = {}, s, l) => {
|
||||
const [d, c] = A([]);
|
||||
const [d, c] = j([]);
|
||||
return V(() => {
|
||||
const g = [];
|
||||
if (i) {
|
||||
@ -755,7 +755,7 @@ const xe = vt.getInstance(), ct = () => {
|
||||
c(g);
|
||||
}, [e, t, n, a, r, i, o]), d;
|
||||
}, Ma = (e, t, n) => {
|
||||
const [a, r] = A(null);
|
||||
const [a, r] = j(null);
|
||||
return V(() => {
|
||||
const { initDataUri: i = `/api/${e}`, initDataMethod: o = "GET" } = n || {};
|
||||
t && L.request({ method: o, url: m.trimEnd(`${i}/${t}`, "/") }).then((s) => {
|
||||
@ -801,29 +801,29 @@ const xe = vt.getInstance(), ct = () => {
|
||||
a.current = s, t == null || t(s);
|
||||
}];
|
||||
}, At = ({ widget: e = "Input", widgetPrefix: t = "@pkg/ff/grid-layout-forms", widgetDecorator: n, subWidgets: a = [], basicForm: r, ...i }) => {
|
||||
const o = sn(e, t), [s, l] = Wa(o, n, a, r), [d, c] = A();
|
||||
const o = sn(e, t), [s, l] = Wa(o, n, a, r), [d, c] = j();
|
||||
return V(() => {
|
||||
s && re.getWidgetComponent(s).then(({ defaultProps: g = {}, default: h }) => ({ default: Da(h, g, r) })).catch((g) => ({ default: () => `${g}` })).then((g) => c(S.createElement(g.default, i)));
|
||||
}, [s]), d && S.cloneElement(d, { ...i, ...l });
|
||||
}, Da = (e, t = {}, n = null) => (a) => {
|
||||
const { type: r, code: i, label: o, noStyle: s, placeholder: l, required: d = !1, extras: c, validators: g, help: h, isVirtual: p, $isReserved: f, initialValue: w, initialValueLanguage: C, ...k } = m.omit(m.merge({}, t, a), ["convertJs", "convertJsSetting", "widget", "widgetPerfix", "widgetDecorator", "subWidgets", "boxStyle"]), x = Ia(Object.assign({}, g, d ? { required: !0 } : {}), i, r), P = q(() => {
|
||||
const M = Object.keys((t == null ? void 0 : t.extras) || {});
|
||||
return m.over([m.partialRight(m.pick, M), m.partialRight(m.omit, M)]);
|
||||
}, [t == null ? void 0 : t.extras]), [E, R] = P(k), B = { label: o, noStyle: s, colon: !1, layout: "vertical" }, I = G((M) => M == null ? void 0 : ae(M, r), [r]);
|
||||
return u(Rt, { name: i, rules: x, initialValue: I(w), normalize: I, children: (M, T, z) => {
|
||||
var N;
|
||||
return u(e, { type: r, rcform: z, basicForm: n, itemProps: { validateStatus: T.errors.length > 0 ? "error" : "success", tooltip: h || null, help: T.errors.length > 0 ? T.errors.join("、") : null, required: ((N = x == null ? void 0 : x[0]) == null ? void 0 : N.required) || !1, ...B }, fieldProps: { placeholder: l, ...R, ...M }, $setting: Object.assign({}, c, E) });
|
||||
const z = Object.keys((t == null ? void 0 : t.extras) || {});
|
||||
return m.over([m.partialRight(m.pick, z), m.partialRight(m.omit, z)]);
|
||||
}, [t == null ? void 0 : t.extras]), [T, I] = P(k), A = { label: o, noStyle: s, colon: !1, layout: "vertical" }, M = G((z) => z == null ? void 0 : ae(z, r), [r]);
|
||||
return u(Rt, { name: i, rules: x, initialValue: M(w), normalize: M, children: (z, O, B) => {
|
||||
var v;
|
||||
return u(e, { type: r, rcform: B, basicForm: n, itemProps: { validateStatus: O.errors.length > 0 ? "error" : "success", tooltip: h || null, help: O.errors.length > 0 ? O.errors.join("、") : null, required: ((v = x == null ? void 0 : x[0]) == null ? void 0 : v.required) || !1, ...A }, fieldProps: { placeholder: l, ...I, ...z }, $setting: Object.assign({}, c, T) });
|
||||
} });
|
||||
}, Lt = ({ name: e, form: t = null, basicForm: n = null, style: a = {}, className: r, cols: i = 24, rowHeight: o = 16, itemMargin: s = [8, 16], containerPadding: l = [0, 0], fields: d = [], hides: c = [], primaryKey: g = 0, formProps: h = {}, formFields: p = [], listenChangeFields: f, listenChangeFieldsFunc: w, onValuesChange: C, theme: k, themeProps: x = {}, children: P, ...E }) => {
|
||||
const [R] = Z.useForm(t), B = G((T, z) => {
|
||||
C == null || C(T, z), w && Array.isArray(f) && xe.exec(w, { changedValues: T, allValues: z }, { getFieldValue: R.getFieldValue, setFieldValue: R.setFieldValue, setFieldsValue: R.setFieldsValue, isFieldTouched: R.isFieldTouched, isFieldsTouched: R.isFieldsTouched }).catch((N) => console.error("onFormValuesChange", e, N));
|
||||
}, [e, R, C, f, w]), I = q(() => [{ name: "__PROPS__", value: h }, { name: "__PRIMARY_KEY__", value: g }].concat(p), [g, h, p]), M = (T, z, N) => {
|
||||
const _ = Et(z, At, n);
|
||||
return O("div", { className: F("ff-grid-layout-form", r), style: { ...a, "--grid-layout-item-margin-x": `${(s == null ? void 0 : s[0]) ?? 8}px`, "--grid-layout-item-margin-y": `${(s == null ? void 0 : s[1]) ?? 16}px`, "--grid-layout-container-padding-y": `${(l == null ? void 0 : l[0]) || 0}px`, "--grid-layout-container-padding-x": `${(l == null ? void 0 : l[1]) || 0}px`, "--grid-layout-cols": i, "--grid-layout-row-height": `${o}px` }, children: [_, N && S.cloneElement(N, { cols: i, rowHeight: o, itemMargin: s, containerPadding: l, fields: z, basicForm: n })] });
|
||||
}, Lt = ({ name: e, form: t = null, basicForm: n = null, style: a = {}, className: r, cols: i = 24, rowHeight: o = 16, itemMargin: s = [8, 16], containerPadding: l = [0, 0], fields: d = [], hides: c = [], primaryKey: g = 0, formProps: h = {}, formFields: p = [], listenChangeFields: f, listenChangeFieldsFunc: w, onValuesChange: C, theme: k, themeProps: x = {}, groups: P = [{ key: "default", label: "默认" }], children: T, ...I }) => {
|
||||
const [A] = Z.useForm(t), M = G((B, v) => {
|
||||
C == null || C(B, v), w && Array.isArray(f) && xe.exec(w, { changedValues: B, allValues: v }, { getFieldValue: A.getFieldValue, setFieldValue: A.setFieldValue, setFieldsValue: A.setFieldsValue, isFieldTouched: A.isFieldTouched, isFieldsTouched: A.isFieldsTouched }).catch((_) => console.error("onFormValuesChange", e, _));
|
||||
}, [e, A, C, f, w]), z = q(() => [{ name: "__PROPS__", value: h }, { name: "__PRIMARY_KEY__", value: g }].concat(p), [g, h, p]), O = (B, v, _) => {
|
||||
const W = Et(v, At, n);
|
||||
return R("div", { className: F("ff-grid-layout-form", r), style: { ...a, "--grid-layout-item-margin-x": `${(s == null ? void 0 : s[0]) ?? 8}px`, "--grid-layout-item-margin-y": `${(s == null ? void 0 : s[1]) ?? 16}px`, "--grid-layout-container-padding-y": `${(l == null ? void 0 : l[0]) || 0}px`, "--grid-layout-container-padding-x": `${(l == null ? void 0 : l[1]) || 0}px`, "--grid-layout-cols": i, "--grid-layout-row-height": `${o}px` }, children: [W, _ && S.cloneElement(_, { cols: i, rowHeight: o, itemMargin: s, containerPadding: l, fields: v, basicForm: n })] });
|
||||
};
|
||||
return O(Z, { ...E, form: R, fields: I, onValuesChange: B, children: [k ? u(wn, { ...x, theme: k, itemRender: M, fields: d, children: P, basicForm: n }) : M(0, d, P), c == null ? void 0 : c.map((T) => {
|
||||
var z;
|
||||
return u(Rt, { name: T.code, children: u(Ua, { form: R, basicForm: n, name: T.code, type: T.type, initialValue: T.initialValue, initialValueLanguage: (z = T.extras) == null ? void 0 : z.initialValueLanguage }) }, JSON.stringify(T.code));
|
||||
return R(Z, { ...I, form: A, fields: z, onValuesChange: M, children: [k ? u(wn, { ...x, items: P, theme: k, itemRender: O, fields: d, children: T, basicForm: n }) : O(0, d, T), c == null ? void 0 : c.map((B) => {
|
||||
var v;
|
||||
return u(Rt, { name: B.code, children: u(Ua, { form: A, basicForm: n, name: B.code, type: B.type, initialValue: B.initialValue, initialValueLanguage: (v = B.extras) == null ? void 0 : v.initialValueLanguage }) }, JSON.stringify(B.code));
|
||||
})] });
|
||||
}, Ua = ({ type: e, initialValue: t, initialValueLanguage: n, onChange: a, basicForm: r }) => {
|
||||
const [i, o] = yn(n == "javascript" && t, n == "javascript" ? void 0 : t, {}, {}, r);
|
||||
@ -833,11 +833,11 @@ const xe = vt.getInstance(), ct = () => {
|
||||
};
|
||||
Lt.propTypes = { fields: b.array, hides: b.array };
|
||||
const qa = /* @__PURE__ */ ((e) => ({ code: t, isPreview: n = !1, ...a }) => {
|
||||
const { align: r, autoComplete: i, resource: o, items: s, hides: l, rowHeight: d, marginX: c, marginY: g, cols: h, listenChangeFields: p, listenChangeFieldsFunc: f, pk: w, uuid: C, theme: k, themeProps: x } = Va(t), P = q(() => [{ name: "__PK__", value: w }, { name: "__RESOURCE__", value: o }, { name: "__LAYOUT_KEY__", value: t }, { name: "__LAYOUT_UUID__", value: C }], [w, t, C, o]);
|
||||
return u(e, { name: t, autoComplete: i, theme: k, themeProps: x, ...a, formFields: P, listenChangeFields: p, listenChangeFieldsFunc: f, fields: s, hides: l, cols: h, rowHeight: d, itemMargin: [c, g] });
|
||||
const { align: r, autoComplete: i, resource: o, items: s, hides: l, rowHeight: d, marginX: c, marginY: g, cols: h, listenChangeFields: p, listenChangeFieldsFunc: f, pk: w, uuid: C, theme: k, themeProps: x, groups: P } = Va(t), T = q(() => [{ name: "__PK__", value: w }, { name: "__RESOURCE__", value: o }, { name: "__LAYOUT_KEY__", value: t }, { name: "__LAYOUT_UUID__", value: C }], [w, t, C, o]);
|
||||
return u(e, { name: t, autoComplete: i, theme: k, themeProps: x, groups: P, ...a, formFields: T, listenChangeFields: p, listenChangeFieldsFunc: f, fields: s, hides: l, cols: h, rowHeight: d, itemMargin: [c, g] });
|
||||
})(Lt), Sn = ({ $setting: e, $close: t, extras: n, code: a, primaryKey: r, ...i }) => {
|
||||
const [o] = Z.useForm(), s = Ba(o, a, r, e);
|
||||
return u(J, { actions: O(S.Fragment, { children: [u(v, { name: (e == null ? void 0 : e.okText) || "保存", type: "primary", widget: () => s({ onSuccess: t }) }), u(v, { name: (e == null ? void 0 : e.cancelText) || "取消", widget: () => t(!1) })] }), extras: n, children: u(qa, { form: o, code: a, primaryKey: r, ...i }) });
|
||||
return u(J, { actions: R(S.Fragment, { children: [u($, { name: (e == null ? void 0 : e.okText) || "保存", type: "primary", widget: () => s({ onSuccess: t }) }), u($, { name: (e == null ? void 0 : e.cancelText) || "取消", widget: () => t(!1) })] }), extras: n, children: u(qa, { form: o, code: a, primaryKey: r, ...i }) });
|
||||
}, Gt = /* @__PURE__ */ new Set(), $t = (e = [], t = 0) => {
|
||||
const n = e[t];
|
||||
if (n.length && !Gt.has(n)) {
|
||||
@ -850,7 +850,7 @@ const qa = /* @__PURE__ */ ((e) => ({ code: t, isPreview: n = !1, ...a }) => {
|
||||
}
|
||||
}, Nt = ({ className: e, type: t, style: n = {}, ...a }) => u("span", { role: "img", className: F("ff-iconfont", e), style: n, ...a, children: u("svg", { style: { width: "1em", height: "1em", fill: "currentColor", overflow: "hidden" }, viewBox: "0 0 1024 1024", children: u("use", { xlinkHref: `#${t}` }) }) });
|
||||
Nt.propTypes = { className: b.string, type: b.string.isRequired, style: b.object }, Nt.init = $t;
|
||||
const Ka = (e, t, n, a) => Se.redirect(n, t, a), _a = (e, t = {}, n, a = {}) => {
|
||||
const _a = (e, t, n, a) => Se.redirect(n, t, a), Ka = (e, t = {}, n, a = {}) => {
|
||||
var i;
|
||||
const r = (i = a.router) == null ? void 0 : i.reduce((o, [s, l, d]) => {
|
||||
const c = m.get(t, ["router", s]);
|
||||
@ -864,10 +864,10 @@ const Ka = (e, t, n, a) => Se.redirect(n, t, a), _a = (e, t = {}, n, a = {}) =>
|
||||
}, Xt = (e, t, n, a, r) => m.isString(n) && n ? re.getWidgetComponent(n).then(({ default: i }) => X.modal(i, { ...t, $setting: a }, r != null && r.title ? { ...r, title: m.template(r.title)(e) } : r)).catch((i) => {
|
||||
X.error(n, { content: i.toString() });
|
||||
}) : X.modal(n, { ...t, $setting: a }, r != null && r.title ? { ...r, title: m.template(r.title)(e) } : r), Ha = (e, t, n, a, r) => X.modal(Sn, { ...t, $setting: a, code: n }, r != null && r.title ? { ...r, title: m.template(r.title)(e) } : r), Ja = (e, t, n, a, r) => X.modal(jt, { base62params: t, $setting: a, listCode: n }, r != null && r.title ? { ...r, title: m.template(r.title)(e) } : r), Ga = ({ widget: e, widgetType: t, widgetData: n, widgetProps: a, widgetSetting: r, widgetContainerProps: i }, { onAfterClick: o, onBeforeClick: s } = {}) => {
|
||||
const l = ie(ee), [d, c] = A({ leading: !0, trailing: !1 }), g = q(() => {
|
||||
const l = ie(ee), [d, c] = j({ leading: !0, trailing: !1 }), g = q(() => {
|
||||
switch (t) {
|
||||
case "redirect":
|
||||
return m.partialRight(Ka, e, r);
|
||||
return m.partialRight(_a, e, r);
|
||||
case "func":
|
||||
return m.partialRight(Yt, (r == null ? void 0 : r.code) ?? e, { status: d, setStatus: c });
|
||||
case "component":
|
||||
@ -878,40 +878,40 @@ const Ka = (e, t, n, a) => Se.redirect(n, t, a), _a = (e, t = {}, n, a = {}) =>
|
||||
case "data-list":
|
||||
return m.partialRight(Ja, e, r, i);
|
||||
case "destroy":
|
||||
return m.partialRight(_a, e, r, i);
|
||||
return m.partialRight(Ka, e, r, i);
|
||||
default:
|
||||
if (It(e) || S.isValidElement(e)) return m.partialRight(Xt, e, r, i);
|
||||
if (m.isFunction(e)) return m.partialRight(Yt, (r == null ? void 0 : r.code) || e, { status: d, setStatus: c });
|
||||
}
|
||||
return (...h) => console.error("useButton unknown widgetType", t, ...h);
|
||||
}, [e, t]);
|
||||
return [m.debounce((h) => (s == null || s(h), Promise.resolve(_e(a, h, { list: l })).then((p) => g(h, { ...n, ...p })).then((p) => o == null ? void 0 : o(p)).catch(console.error)), 300, { leading: !0, trailing: !1 }), d];
|
||||
return [m.debounce((h) => (s == null || s(h), Promise.resolve(Ke(a, h, { list: l })).then((p) => g(h, { ...n, ...p })).then((p) => o == null ? void 0 : o(p)).catch(console.error)), 300, { leading: !0, trailing: !1 }), d];
|
||||
}, xn = ({ type: e, name: t, className: n, icon: a, iconPosition: r, size: i }, o = "default") => q(() => {
|
||||
const s = { type: "primary", className: F("ff-button", n), iconPosition: r, size: i };
|
||||
return e === "danger" ? s.danger = !0 : e === "default" && (s.type = e), o === "link" || o === "dashed" ? (s.type = o, e === "default" && (s.className = F(s.className, "ff-default"))) : o !== "circle" && o !== "round" || (s.shape = o), a && (s.icon = u(Nt, { type: a })), t && (s.children = t), s;
|
||||
}, [o, e, n, a, r]), dt = ({ data: e, widget: t, widgetType: n = "fsdpf-component", widgetData: a, widgetProps: r, widgetSetting: i, widgetContainerProps: o, onAfterClick: s, onBeforeClick: l, children: d, extras: c }) => {
|
||||
const g = ie(ee), [h, p] = A(!1), [f, w] = A("hover"), [C, k] = A({}), [x, P] = A(), { placement: E, align: R, zIndex: B, arrow: I = { pointAtCenter: !0 }, getPopupContainer: M, isPopupMountBodyContainer: T = !1, ...z } = o || {};
|
||||
const g = ie(ee), [h, p] = j(!1), [f, w] = j("hover"), [C, k] = j({}), [x, P] = j(), { placement: T, align: I, zIndex: A, arrow: M = { pointAtCenter: !0 }, getPopupContainer: z, isPopupMountBodyContainer: O = !0, ...B } = o || {};
|
||||
V(() => {
|
||||
n == "grid-layout-form" ? P(S.createElement(Sn, { ...a, $setting: i, code: t })) : n == "data-list" ? P(S.createElement(jt, { base62params: e, $setting: i, listCode: t })) : m.isString(t) ? re.getWidgetComponent(t).then(({ default: W }) => {
|
||||
P(S.createElement(W, { ...a, $setting: i }));
|
||||
}).catch((W) => P(W.toString())) : It(t) ? P(S.createElement(t, { ...a, $setting: i })) : S.isValidElement(t) && P(S.cloneElement(t, { ...a, $setting: i }));
|
||||
}, [t, n, a]), V(() => {
|
||||
Promise.resolve(_e(r, e, { list: g })).then(k);
|
||||
Promise.resolve(Ke(r, e, { list: g })).then(k);
|
||||
}, [r, e, g.getBase62params]);
|
||||
const N = (W, pe = !1) => (p(W), !W && w("hover"), W ? l == null ? void 0 : l(C) : s == null ? void 0 : s(pe)), _ = (W) => {
|
||||
const v = (W, pe = !1) => (p(W), !W && w("hover"), W ? l == null ? void 0 : l(C) : s == null ? void 0 : s(pe)), _ = (W) => {
|
||||
p(!0), w("click");
|
||||
};
|
||||
return u(Jn, { zIndex: B, placement: E, onPopupClick: _, onClick: _, open: h, align: R, arrow: I, trigger: f, getPopupContainer: M || T ? void 0 : (W) => W, content: u(Ya, { ...z, extras: c, children: x && S.cloneElement(x, { ...C, $close: (W) => N(!1, W) }) }), children: d, onOpenChange: N });
|
||||
return u(Jn, { zIndex: A, placement: T, onPopupClick: _, onClick: _, open: h, align: I, arrow: M, trigger: f, getPopupContainer: z || O ? void 0 : (W) => W, content: u(Ya, { ...B, extras: c, children: x && S.cloneElement(x, { ...C, $close: (W) => v(!1, W) }) }), children: d, onOpenChange: v });
|
||||
}, Ya = ({ title: e, className: t, classNames: n, children: a, extras: r, width: i, height: o, ...s }) => {
|
||||
const [l, d] = A({}), c = G((f, w) => d((C) => ({ ...C, [f]: w })), []), g = G((f) => d((w) => ({ ...w, [f]: void 0 })), []), h = e ? S.createElement("div", { className: "ff-popup-title" }, e) : l == null ? void 0 : l.title, p = r ?? S.createElement("div", { className: "ff-popup-reserved-extras" }, r);
|
||||
return u(Ke.Provider, { value: { ele: l, mount: c, unmount: g }, children: O("div", { className: F("ff-popup ff-popover", t, l.rootClassName), style: { width: i ?? 260, height: o }, ...s, children: [O("div", { className: F("ff-popup-header", "ff-popover-header", n == null ? void 0 : n.header), children: [h, l == null ? void 0 : l["sub-title"]] }), u("div", { className: F("ff-popup-body", "ff-popover-body", n == null ? void 0 : n.body), children: a }), O("div", { className: F("ff-popup-footer", "ff-popover-footer", n == null ? void 0 : n.footer), children: [p, l == null ? void 0 : l.extras, l == null ? void 0 : l.actions] })] }) });
|
||||
const [l, d] = j({}), c = G((f, w) => d((C) => ({ ...C, [f]: w })), []), g = G((f) => d((w) => ({ ...w, [f]: void 0 })), []), h = e ? S.createElement("div", { className: "ff-popup-title" }, e) : l == null ? void 0 : l.title, p = r ?? S.createElement("div", { className: "ff-popup-reserved-extras" }, r);
|
||||
return u(_e.Provider, { value: { ele: l, mount: c, unmount: g }, children: R("div", { className: F("ff-popup ff-popover", t, l.rootClassName), style: { width: i ?? 260, height: o }, ...s, children: [R("div", { className: F("ff-popup-header", "ff-popover-header", n == null ? void 0 : n.header), children: [h, l == null ? void 0 : l["sub-title"]] }), u("div", { className: F("ff-popup-body", "ff-popover-body", n == null ? void 0 : n.body), children: a }), R("div", { className: F("ff-popup-footer", "ff-popover-footer", n == null ? void 0 : n.footer), children: [p, l == null ? void 0 : l.extras, l == null ? void 0 : l.actions] })] }) });
|
||||
};
|
||||
dt.propTypes = { widgetType: b.oneOf(["fsdpf-component", "grid-layout-form", "data-list"]) };
|
||||
const Ge = (e) => function({ className: t, variant: n, children: a, name: r, icon: i, type: o = "default", iconPosition: s = "start", noAuthType: l, onAfterClick: d, onBeforeClick: c, data: g, loading: h, disabled: p, tooltip: f, confirm: w, widget: C = () => {
|
||||
}, widgetType: k, widgetData: x, widgetProps: P, widgetSetting: E, widgetContainerProps: R, ...B }) {
|
||||
const { mode: I, ...M } = R || {}, T = xn({ className: t, name: r, type: o, icon: i, iconPosition: s }, n ?? e), z = u(nt, { ...T, ...B, children: a || r });
|
||||
if (I === "popover" && !["destroy", "redirect", "func"].includes(k)) return u(dt, { data: g, widget: C, widgetType: k, widgetData: x, widgetProps: P, widgetSetting: E, widgetContainerProps: M, onAfterClick: d, onBeforeClick: c, children: z });
|
||||
const N = m.isEmpty(f) || !f.enabled ? {} : f, _ = m.isEmpty(w) ? { enabled: !1 } : Object.assign({ enabled: !0 }, w), [W, pe] = A(!1), [Ye, { disabled: Xe, loading: ut }] = Ga({ widget: C, widgetType: k, widgetData: x, widgetProps: P, widgetSetting: E, widgetContainerProps: M }, { onAfterClick: d, onBeforeClick: c });
|
||||
}, widgetType: k, widgetData: x, widgetProps: P, widgetSetting: T, widgetContainerProps: I, ...A }) {
|
||||
const { mode: M, ...z } = I || {}, O = xn({ className: t, name: r, type: o, icon: i, iconPosition: s }, n ?? e), B = u(nt, { ...O, ...A, children: a || r });
|
||||
if (M === "popover" && !["destroy", "redirect", "func"].includes(k)) return u(dt, { data: g, widget: C, widgetType: k, widgetData: x, widgetProps: P, widgetSetting: T, widgetContainerProps: z, onAfterClick: d, onBeforeClick: c, children: B });
|
||||
const v = m.isEmpty(f) || !f.enabled ? {} : f, _ = m.isEmpty(w) ? { enabled: !1 } : Object.assign({ enabled: !0 }, w), [W, pe] = j(!1), [Ye, { disabled: Xe, loading: ut }] = Ga({ widget: C, widgetType: k, widgetData: x, widgetProps: P, widgetSetting: T, widgetContainerProps: z }, { onAfterClick: d, onBeforeClick: c });
|
||||
return u(Gn, { okText: "确定", cancelText: "取消", getPopupContainer: (Q) => Q, ..._, disabled: Xe || p, open: W, onOpenChange: (Q) => {
|
||||
if (!Q) return pe(Q);
|
||||
_.enabled ? pe(Q) : Ye(g);
|
||||
@ -919,12 +919,12 @@ const Ge = (e) => function({ className: t, variant: n, children: a, name: r, ico
|
||||
Ye(g, Q);
|
||||
}, onClick: (Q) => {
|
||||
Q.stopPropagation();
|
||||
}, children: u(Yn, { getPopupContainer: (Q) => Q, ...N, title: W ? null : N == null ? void 0 : N.title, trigger: ["hover", "click"], children: S.cloneElement(z, { loading: ut || h, disabled: Xe || p }) }) });
|
||||
}, v = Ge("default");
|
||||
v.propTypes = { type: b.oneOf(["primary", "default", "danger", ""]), size: b.oneOf(["large", "middle", "small"]), name: b.string, icon: b.string, iconPosition: b.oneOf(["start", "end"]), data: b.any, widget: b.any, widgetType: b.oneOf(["destroy", "redirect", "func", "component", "fsdpf-component", "grid-layout-form", "grid-layout", "data-list"]), widgetData: b.object, widgetProps: b.object, widgetSetting: b.object, widgetContainerProps: b.object, tooltip: b.exact({ title: b.string.isRequired, placement: b.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: b.oneOfType([b.bool, b.number]), getPopupContainer: b.func }), confirm: b.exact({ title: b.string.isRequired, cancelText: b.string, okText: b.string, okType: b.oneOf(["primary", "default", "danger", ""]), placement: b.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: b.oneOfType([b.bool, b.number]), getPopupContainer: b.func, arrow: b.oneOfType([b.bool, b.exact({ pointAtCenter: b.bool })]) }) };
|
||||
}, children: u(Yn, { getPopupContainer: (Q) => Q, ...v, title: W ? null : v == null ? void 0 : v.title, trigger: ["hover", "click"], children: S.cloneElement(B, { loading: ut || h, disabled: Xe || p }) }) });
|
||||
}, $ = Ge("default");
|
||||
$.propTypes = { type: b.oneOf(["primary", "default", "danger", ""]), size: b.oneOf(["large", "middle", "small"]), name: b.string, icon: b.string, iconPosition: b.oneOf(["start", "end"]), data: b.any, widget: b.any, widgetType: b.oneOf(["destroy", "redirect", "func", "component", "fsdpf-component", "grid-layout-form", "grid-layout", "data-list"]), widgetData: b.object, widgetProps: b.object, widgetSetting: b.object, widgetContainerProps: b.object, tooltip: b.exact({ title: b.string.isRequired, placement: b.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: b.oneOfType([b.bool, b.number]), getPopupContainer: b.func }), confirm: b.exact({ title: b.string.isRequired, cancelText: b.string, okText: b.string, okType: b.oneOf(["primary", "default", "danger", ""]), placement: b.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: b.oneOfType([b.bool, b.number]), getPopupContainer: b.func, arrow: b.oneOfType([b.bool, b.exact({ pointAtCenter: b.bool })]) }) };
|
||||
const Xa = Ge("link"), Qa = Ge("circle"), Za = Ge("round"), er = Ge("dashed"), Qt = ({ options: e = [], triggerWeights: t = ["grid-layout-form", "grid-layout", "fsdpf-component", "print"], onAfterClick: n = (p, f, w) => {
|
||||
}, onBeforeClick: a = (p, f, w) => {
|
||||
}, labelVariant: r = "link", labelSize: i, labelRender: o, btnVariant: s, btnSize: l, btnRender: d = (p, f) => u(v, { ...p, data: f }, p.uuid || yt()), widgetContainerProps: c = {}, children: g, data: h }) => {
|
||||
}, labelVariant: r = "link", labelSize: i, labelRender: o, btnVariant: s, btnSize: l, btnRender: d = (p, f) => u($, { ...p, data: f }, p.uuid || yt()), widgetContainerProps: c = {}, children: g, data: h }) => {
|
||||
if (m.isEmpty(e)) return g;
|
||||
const [p, f] = q(() => (e || []).reduce((C, k) => {
|
||||
const x = t.indexOf(k.widgetType);
|
||||
@ -934,20 +934,20 @@ const Xa = Ge("link"), Qa = Ge("circle"), Za = Ge("round"), er = Ge("dashed"), Q
|
||||
const w = f.map((C) => d(Object.assign({ uuid: C.uuid, type: C.type, name: C.name, widget: C.widget, widgetType: C.widgetType, widgetProps: C.widgetProps, widgetData: C.widgetData, widgetSetting: C.widgetSetting, widgetContainerProps: C.widgetContainerSetting, confirm: C.confirm, onAfterClick: m.partialRight(n, C, h), onBeforeClick: m.partialRight(a, C, h) }, { size: l, variant: s }), h));
|
||||
return u(dt, { widget: p == null ? void 0 : p.widget, widgetType: p == null ? void 0 : p.widgetType, widgetProps: p == null ? void 0 : p.widgetProps, widgetSetting: p == null ? void 0 : p.widgetSetting, widgetContainerProps: Object.assign({}, c, p == null ? void 0 : p.widgetContainerProps), data: h, widgetData: p == null ? void 0 : p.widgetData, extras: w, onAfterClick: m.partialRight(n, p, h), onBeforeClick: m.partialRight(a, p, h), children: g });
|
||||
};
|
||||
Qt.propTypes = { triggerWeights: b.array, options: b.arrayOf(b.shape({ ...v.propTypes, widgetType: v.propTypes.widgetType.isRequired })), btnSize: v.propTypes.size, btnRender: b.func, btnVariant: b.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelVariant: b.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelRender: b.func, labelSize: v.propTypes.size, onAfterClick: b.func, onBeforeClick: b.func, widgetContainerProps: v.propTypes.widgetContainerProps, data: v.propTypes.data }, v.Link = Xa, v.Link.defaultProps = v.defaultProps, v.Link.propTypes = v.propTypes, v.Circle = Qa, v.Circle.defaultProps = v.defaultProps, v.Circle.propTypes = v.propTypes, v.Round = Za, v.Round.defaultProps = v.defaultProps, v.Round.propTypes = v.propTypes, v.Dashed = er, v.Dashed.defaultProps = v.defaultProps, v.Dashed.propTypes = v.propTypes, v.Popover = dt, v.GroupPopover = Qt;
|
||||
Qt.propTypes = { triggerWeights: b.array, options: b.arrayOf(b.shape({ ...$.propTypes, widgetType: $.propTypes.widgetType.isRequired })), btnSize: $.propTypes.size, btnRender: b.func, btnVariant: b.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelVariant: b.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelRender: b.func, labelSize: $.propTypes.size, onAfterClick: b.func, onBeforeClick: b.func, widgetContainerProps: $.propTypes.widgetContainerProps, data: $.propTypes.data }, $.Link = Xa, $.Link.defaultProps = $.defaultProps, $.Link.propTypes = $.propTypes, $.Circle = Qa, $.Circle.defaultProps = $.defaultProps, $.Circle.propTypes = $.propTypes, $.Round = Za, $.Round.defaultProps = $.defaultProps, $.Round.propTypes = $.propTypes, $.Dashed = er, $.Dashed.defaultProps = $.defaultProps, $.Dashed.propTypes = $.propTypes, $.Popover = dt, $.GroupPopover = Qt;
|
||||
const tr = ({ fields: e, formProps: t, $close: n }) => {
|
||||
const [a] = Z.useForm(), r = q(() => [{ name: "__PROPS__", value: t }], [t]);
|
||||
return u(J, { actions: O(S.Fragment, { children: [u(v, { name: "取消", widget: () => n(!1) }), u(v, { name: "确定", type: "primary", widget: () => a.validateFields(!0).then(n) })] }), children: u(Z, { fields: r, form: a, className: "ff-modal-form", children: e == null ? void 0 : e.map(({ code: i, ...o }) => u(At, { code: i, ...o }, i)) }) });
|
||||
}, nr = ({ className: e, classNames: t, $close: n, children: a, title: r, subTitle: i, actions: o, extras: s, ...l }) => O(aa, { ...l, prefixCls: "ff-drawer", className: F("ff-popup", e), maskMotion: { motionAppear: !0, motionName: "mask-motion" }, motion: (d) => ({ motionAppear: !0, motionName: `panel-motion-${d}` }), children: [O("div", { className: F("ff-popup-header", "ff-drawer-header", t == null ? void 0 : t.header), children: [u("button", { "aria-label": "Close", className: F("ff-popup-close", "ff-drawer-close", t == null ? void 0 : t.close), onClick: l.onClose, children: u(Ot, { type: "close" }) }), r, i] }), u("div", { className: F("ff-popup-body", "ff-drawer-body", t == null ? void 0 : t.body), children: a }), O("div", { className: F("ff-popup-footer", "ff-drawer-footer", t == null ? void 0 : t.footer), children: [s, o] })] }), ar = ({ className: e, classNames: t, $close: n, $event: a, children: r, title: i, subTitle: o, actions: s, extras: l, placement: d, ...c }) => {
|
||||
return u(J, { actions: R(S.Fragment, { children: [u($, { name: "取消", widget: () => n(!1) }), u($, { name: "确定", type: "primary", widget: () => a.validateFields(!0).then(n) })] }), children: u(Z, { fields: r, form: a, className: "ff-modal-form", children: e == null ? void 0 : e.map(({ code: i, ...o }) => u(At, { code: i, ...o }, i)) }) });
|
||||
}, nr = ({ className: e, classNames: t, $close: n, children: a, title: r, subTitle: i, actions: o, extras: s, ...l }) => R(aa, { ...l, prefixCls: "ff-drawer", className: F("ff-popup", e), maskMotion: { motionAppear: !0, motionName: "mask-motion" }, motion: (d) => ({ motionAppear: !0, motionName: `panel-motion-${d}` }), children: [R("div", { className: F("ff-popup-header", "ff-drawer-header", t == null ? void 0 : t.header), children: [u("button", { "aria-label": "Close", className: F("ff-popup-close", "ff-drawer-close", t == null ? void 0 : t.close), onClick: l.onClose, children: u(Ot, { type: "close" }) }), r, i] }), u("div", { className: F("ff-popup-body", "ff-drawer-body", t == null ? void 0 : t.body), children: a }), R("div", { className: F("ff-popup-footer", "ff-drawer-footer", t == null ? void 0 : t.footer), children: [s, o] })] }), ar = ({ className: e, classNames: t, $close: n, $event: a, children: r, title: i, subTitle: o, actions: s, extras: l, placement: d, ...c }) => {
|
||||
const g = (a == null ? void 0 : a.pageX) === void 0 ? { animation: null, maskAnimation: null, mousePosition: { x: null, y: null } } : { animation: "zoom", maskAnimation: "fade", mousePosition: { x: a == null ? void 0 : a.pageX, y: a == null ? void 0 : a.pageY } };
|
||||
return u(ra, { ...c, ...g, prefixCls: "ff-modal", modalRender: () => O("div", { className: F("ff-modal-content ff-popup", e), children: [O("div", { className: F("ff-popup-header", "ff-modal-header", t == null ? void 0 : t.header), children: [u("button", { "aria-label": "Close", className: F("ff-popup-close", "ff-modal-close", t == null ? void 0 : t.close), onClick: c.onClose, children: u(Ot, { type: "close" }) }), i, o] }), u("div", { className: F("ff-popup-body", "ff-modal-body", t == null ? void 0 : t.body), children: r }), O("div", { className: F("ff-popup-footer", "ff-modal-footer", t == null ? void 0 : t.footer), children: [l, s] })] }) });
|
||||
return u(ra, { ...c, ...g, prefixCls: "ff-modal", modalRender: () => R("div", { className: F("ff-modal-content ff-popup", e), children: [R("div", { className: F("ff-popup-header", "ff-modal-header", t == null ? void 0 : t.header), children: [u("button", { "aria-label": "Close", className: F("ff-popup-close", "ff-modal-close", t == null ? void 0 : t.close), onClick: c.onClose, children: u(Ot, { type: "close" }) }), i, o] }), u("div", { className: F("ff-popup-body", "ff-modal-body", t == null ? void 0 : t.body), children: r }), R("div", { className: F("ff-popup-footer", "ff-modal-footer", t == null ? void 0 : t.footer), children: [l, s] })] }) });
|
||||
}, Pn = ({ placement: e, $close: t, $event: n, children: a, title: r, ...i }) => {
|
||||
const [o, s] = A({}), [l, d] = A(!0), c = G((f, w) => s((C) => ({ ...C, [f]: w })), []), g = G((f) => s((w) => ({ ...w, [f]: void 0 })), []);
|
||||
const [o, s] = j({}), [l, d] = j(!0), c = G((f, w) => s((C) => ({ ...C, [f]: w })), []), g = G((f) => s((w) => ({ ...w, [f]: void 0 })), []);
|
||||
let h = { ...i, className: o.rootClassName, title: o.title || r && S.createElement("div", { className: F("ff-popup-title") }, r), subTitle: o["sub-title"], actions: o.actions, extras: o.extras, children: a, $close: t, $event: n, onClose: () => d(!1) };
|
||||
const p = () => {
|
||||
t(!1);
|
||||
};
|
||||
return u(Ke.Provider, { value: { ele: o, mount: c, unmount: g }, children: e && e !== "center" ? u(nr, { ...h, placement: e, open: l, afterOpenChange: (f) => !f && p() }) : u(ar, { ...h, visible: l, afterClose: p }) });
|
||||
return u(_e.Provider, { value: { ele: o, mount: c, unmount: g }, children: e && e !== "center" ? u(nr, { ...h, placement: e, open: l, afterOpenChange: (f) => !f && p() }) : u(ar, { ...h, visible: l, afterClose: p }) });
|
||||
};
|
||||
Pn.propTypes = { placement: b.oneOf(["center", "left", "top", "right", "bottom"]) };
|
||||
const Y = () => {
|
||||
@ -965,7 +965,7 @@ const Y = () => {
|
||||
if (s === on) return e.open({ ...d, key: c, content: S.createElement(s, { ...l, $close: () => e.close(c) }) });
|
||||
Y.$popups.set(c, S.createElement(Pn, { maskClosable: !1, $event: l == null ? void 0 : l.$event, ...d, key: c, $close: g }, S.isValidElement(s) ? S.cloneElement(s, { ...l, $close: g }) : s != null && s.name || Dt.isForwardRef(s) || (s == null ? void 0 : s.$$typeof) === Dt.ForwardRef ? S.createElement(s, { ...l, $close: g }) : s)), n();
|
||||
};
|
||||
return O(S.Fragment, { children: [Array.from(Y.$popups).map(([i, o]) => o), t] });
|
||||
return R(S.Fragment, { children: [Array.from(Y.$popups).map(([i, o]) => o), t] });
|
||||
};
|
||||
Y.$popups = /* @__PURE__ */ new Map(), Y.$index = 0, Y.$queue = [], Y.$onClick = (...e) => new Promise((t, n) => {
|
||||
Y.$queue.push([e, t, n]);
|
||||
@ -984,14 +984,14 @@ Le.configure({ showSpinner: !1 }), Ve.interceptors.request.use((e) => {
|
||||
var Ne, je;
|
||||
const H = class H {
|
||||
constructor() {
|
||||
$(this, "appUrl", "");
|
||||
N(this, "appUrl", "");
|
||||
return y(H, Ne) || (U(H, je, new wt()), U(H, Ne, new Proxy(this, { get: (t, n) => n === "init" ? t.init : n === "appUrl" ? t.appUrl : y(H, je)[n] }))), y(H, Ne);
|
||||
}
|
||||
init(t, n, a) {
|
||||
Ve.defaults.baseURL = this.appUrl = a, Ve.defaults.timeout = 15e3, y(H, je).init(t, n, Ve);
|
||||
}
|
||||
};
|
||||
Ne = new WeakMap(), je = new WeakMap(), j(H, Ne, null), j(H, je, null), $(H, "getInstance", () => y(H, Ne) ?? U(H, Ne, new H()));
|
||||
Ne = new WeakMap(), je = new WeakMap(), E(H, Ne, null), E(H, je, null), N(H, "getInstance", () => y(H, Ne) ?? U(H, Ne, new H()));
|
||||
let Tt = H;
|
||||
const L = Tt.getInstance();
|
||||
class Vt extends Error {
|
||||
@ -1008,8 +1008,8 @@ const ft = "mine", tt = "token";
|
||||
var ke, Ae;
|
||||
const de = class de {
|
||||
constructor() {
|
||||
j(this, Ae, /* @__PURE__ */ new Map());
|
||||
$(this, "setVendor", (t, n) => y(this, Ae).set(t, new an(n, async (a, r) => {
|
||||
E(this, Ae, /* @__PURE__ */ new Map());
|
||||
N(this, "setVendor", (t, n) => y(this, Ae).set(t, new an(n, async (a, r) => {
|
||||
var o, s;
|
||||
if (!(a != null && a.default)) throw "@pkg not found";
|
||||
let i = () => r;
|
||||
@ -1020,7 +1020,7 @@ const de = class de {
|
||||
}
|
||||
throw new Me(r);
|
||||
})));
|
||||
$(this, "getWidgetComponent", async (t) => {
|
||||
N(this, "getWidgetComponent", async (t) => {
|
||||
if (!t) throw "getWidgetComponent widget is required";
|
||||
if (t != null && t.startsWith("blob:") || t != null && t.startsWith("http:") || t != null && t.startsWith("https:")) return await import(t);
|
||||
const [, n] = t == null ? void 0 : t.split("@pkg/");
|
||||
@ -1031,12 +1031,12 @@ const de = class de {
|
||||
throw new Vt(t, a);
|
||||
}
|
||||
});
|
||||
$(this, "getRoutes", () => L.get("/api/my-router").then((t) => [...t, { uuid: "data-list-setting", isLayout: !0, uri: "/data-list-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/DataListSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "grid-layout-setting", isLayout: !0, uri: "/grid-layout-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/GridLayoutSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "grid-layout-form-setting", isLayout: !0, uri: "/grid-layout-form-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/GridLayoutFormSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "resource-api-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ResourceApiSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "charts-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ChartsSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "fsm-setting", isLayout: !0, uri: "/fsm-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/FsmSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "component-setting", isLayout: !0, uri: "/component-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ComponentSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "login", uri: "/login", name: "登录", type: "fsdpf-component", isLogin: !1, component: "@pkg/ff/components/Login" }, { uuid: "not-found", uri: "*", name: "Not Found", type: "fsdpf-component", isLogin: !1, component: "@pkg/ff/components/NotFound" }].map(({ uuid: n, ...a }) => [n, { uuid: n, ...a }])).then((t) => new Map(t)));
|
||||
$(this, "getMenus", () => L.get("/api/my-menu"));
|
||||
$(this, "getConfigure", () => L.get("api/init-configure"));
|
||||
$(this, "getWidgetOperationAuth", () => L.get("/api/init-widget-operation-auth").then((t) => t.reduce((n, { uuid: a, auth: r }) => [...n, [a, r]], [])));
|
||||
$(this, "getPhoneNumber", (t) => L.get(`/api/user-wx-phone-number/${t}`));
|
||||
$(this, "getUserToken", () => {
|
||||
N(this, "getRoutes", () => L.get("/api/my-router").then((t) => [...t, { uuid: "data-list-setting", isLayout: !0, uri: "/data-list-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/DataListSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "grid-layout-setting", isLayout: !0, uri: "/grid-layout-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/GridLayoutSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "grid-layout-form-setting", isLayout: !0, uri: "/grid-layout-form-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/GridLayoutFormSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "resource-api-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ResourceApiSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "charts-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ChartsSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "fsm-setting", isLayout: !0, uri: "/fsm-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/FsmSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "component-setting", isLayout: !0, uri: "/component-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ComponentSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "login", uri: "/login", name: "登录", type: "fsdpf-component", isLogin: !1, component: "@pkg/ff/components/Login" }, { uuid: "not-found", uri: "*", name: "Not Found", type: "fsdpf-component", isLogin: !1, component: "@pkg/ff/components/NotFound" }].map(({ uuid: n, ...a }) => [n, { uuid: n, ...a }])).then((t) => new Map(t)));
|
||||
N(this, "getMenus", () => L.get("/api/my-menu"));
|
||||
N(this, "getConfigure", () => L.get("api/init-configure"));
|
||||
N(this, "getWidgetOperationAuth", () => L.get("/api/init-widget-operation-auth").then((t) => t.reduce((n, { uuid: a, auth: r }) => [...n, [a, r]], [])));
|
||||
N(this, "getPhoneNumber", (t) => L.get(`/api/user-wx-phone-number/${t}`));
|
||||
N(this, "getUserToken", () => {
|
||||
const t = window.localStorage.getItem(tt);
|
||||
if (!t) return "";
|
||||
const n = t.split(".");
|
||||
@ -1045,14 +1045,14 @@ const de = class de {
|
||||
if (Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3) - a > 2592e3) throw "登录令牌已过期, 请重新登录!";
|
||||
return t;
|
||||
});
|
||||
$(this, "checkUserToken", () => {
|
||||
N(this, "checkUserToken", () => {
|
||||
try {
|
||||
return !!this.getUserToken();
|
||||
} catch {
|
||||
return !1;
|
||||
}
|
||||
});
|
||||
$(this, "getUserInfo", (t = !0) => {
|
||||
N(this, "getUserInfo", (t = !0) => {
|
||||
var n;
|
||||
try {
|
||||
const a = this.getUserToken();
|
||||
@ -1064,12 +1064,12 @@ const de = class de {
|
||||
}
|
||||
return Promise.resolve(null);
|
||||
});
|
||||
$(this, "login", (t, n, a = {}) => L.post("/api/user-token", { username: t, passwd: Bn.hash(n), platform: "web", ...a }).then(({ token: r }) => (window.localStorage.setItem(tt, r), r)));
|
||||
$(this, "logout", (t) => (window.localStorage.removeItem(ft), window.localStorage.removeItem(tt), t == null ? void 0 : t()));
|
||||
N(this, "login", (t, n, a = {}) => L.post("/api/user-token", { username: t, passwd: Bn.hash(n), platform: "web", ...a }).then(({ token: r }) => (window.localStorage.setItem(tt, r), r)));
|
||||
N(this, "logout", (t) => (window.localStorage.removeItem(ft), window.localStorage.removeItem(tt), t == null ? void 0 : t()));
|
||||
if (y(de, ke)) return y(de, ke);
|
||||
}
|
||||
};
|
||||
ke = new WeakMap(), Ae = new WeakMap(), j(de, ke, null), $(de, "getInstance", () => (y(de, ke) || U(de, ke, new de()), y(de, ke)));
|
||||
ke = new WeakMap(), Ae = new WeakMap(), E(de, ke, null), N(de, "getInstance", () => (y(de, ke) || U(de, ke, new de()), y(de, ke)));
|
||||
let Ft = de;
|
||||
const re = Ft.getInstance(), rr = S.createContext({ user: {}, initUser: () => {
|
||||
}, initUserComplete: !1 }), ir = S.createContext({ set: () => {
|
||||
@ -1132,11 +1132,11 @@ export {
|
||||
Wa as af,
|
||||
Ur as ag,
|
||||
Nt as ah,
|
||||
v as ai,
|
||||
$ as ai,
|
||||
oa as aj,
|
||||
Ga as ak,
|
||||
J as al,
|
||||
Ke as am,
|
||||
_e as am,
|
||||
rn as an,
|
||||
Y as ao,
|
||||
X as ap,
|
||||
@ -1151,7 +1151,7 @@ export {
|
||||
Ie as ay,
|
||||
xe as az,
|
||||
la as b,
|
||||
_e as c,
|
||||
Ke as c,
|
||||
ln as d,
|
||||
Tr as e,
|
||||
Fr as f,
|
||||
2
dist/components.js
vendored
2
dist/components.js
vendored
@ -1,4 +1,4 @@
|
||||
import { aq as s, ah as p, ar as n, as as r, ap as t } from "./common/main-DfW15Flo.js";
|
||||
import { aq as s, ah as p, ar as n, as as r, ap as t } from "./common/main-hfbRQs2Q.js";
|
||||
export {
|
||||
s as Empty,
|
||||
p as Icon,
|
||||
|
||||
2
dist/container.js
vendored
2
dist/container.js
vendored
@ -1,4 +1,4 @@
|
||||
import { am as s, aq as e, ar as p, as as n, an as t, ap as d, ao as r, al as u } from "./common/main-DfW15Flo.js";
|
||||
import { am as s, aq as e, ar as p, as as n, an as t, ap as d, ao as r, al as u } from "./common/main-hfbRQs2Q.js";
|
||||
export {
|
||||
s as Context,
|
||||
e as Empty,
|
||||
|
||||
2
dist/data-converter.js
vendored
2
dist/data-converter.js
vendored
@ -1,6 +1,6 @@
|
||||
import "lodash";
|
||||
import "react";
|
||||
import { D as p } from "./common/main-DfW15Flo.js";
|
||||
import { D as p } from "./common/main-hfbRQs2Q.js";
|
||||
export {
|
||||
p as default
|
||||
};
|
||||
|
||||
2
dist/data-list.js
vendored
2
dist/data-list.js
vendored
@ -1,4 +1,4 @@
|
||||
import { L as t, J as e, B as r, F as o, M as i, I as l, E as u, K as D, C as n, N as L, A as C, P as m, O as p, W as b, S as c, U as F, T as d, V as O, Q as S } from "./common/main-DfW15Flo.js";
|
||||
import { L as t, J as e, B as r, F as o, M as i, I as l, E as u, K as D, C as n, N as L, A as C, P as m, O as p, W as b, S as c, U as F, T as d, V as O, Q as S } from "./common/main-hfbRQs2Q.js";
|
||||
export {
|
||||
t as DataListContent,
|
||||
e as DataListContext,
|
||||
|
||||
2
dist/data-list/utils.js
vendored
2
dist/data-list/utils.js
vendored
@ -1,5 +1,5 @@
|
||||
import "lodash";
|
||||
import { p as t } from "../common/main-DfW15Flo.js";
|
||||
import { p as t } from "../common/main-hfbRQs2Q.js";
|
||||
export {
|
||||
t as getDefaultExpandRowKeys
|
||||
};
|
||||
|
||||
2
dist/grid-layout-form.js
vendored
2
dist/grid-layout-form.js
vendored
@ -1,4 +1,4 @@
|
||||
import { a7 as s, a9 as r, a8 as u, a6 as o, z as t, ae as m, ac as d, ad as F, ag as i, ab as g, aa as c, af as l } from "./common/main-DfW15Flo.js";
|
||||
import { a7 as s, a9 as r, a8 as u, a6 as o, z as t, ae as m, ac as d, ad as F, ag as i, ab as g, aa as c, af as l } from "./common/main-hfbRQs2Q.js";
|
||||
export {
|
||||
s as GridLayoutForm,
|
||||
r as GridLayoutFormHelper,
|
||||
|
||||
2
dist/grid-layout-form/utils.js
vendored
2
dist/grid-layout-form/utils.js
vendored
@ -1,5 +1,5 @@
|
||||
import "lodash";
|
||||
import { a as o, g } from "../common/main-DfW15Flo.js";
|
||||
import { a as o, g } from "../common/main-hfbRQs2Q.js";
|
||||
export {
|
||||
o as getNormalizeWidget,
|
||||
g as getOptionItemByValue
|
||||
|
||||
2
dist/grid-layout.js
vendored
2
dist/grid-layout.js
vendored
@ -1,4 +1,4 @@
|
||||
import { q as u, v as e, s as r, H as t, G as d, x as i, z as o, y, w as G } from "./common/main-DfW15Flo.js";
|
||||
import { q as u, v as e, s as r, H as t, G as d, x as i, z as o, y, w as G } from "./common/main-hfbRQs2Q.js";
|
||||
export {
|
||||
u as GridLayout,
|
||||
e as GridLayoutFramework,
|
||||
|
||||
2
dist/grid-layout/utils.js
vendored
2
dist/grid-layout/utils.js
vendored
@ -1,4 +1,4 @@
|
||||
import { l as t, o as a, n as l } from "../common/main-DfW15Flo.js";
|
||||
import { l as t, o as a, n as l } from "../common/main-hfbRQs2Q.js";
|
||||
export {
|
||||
t as getBoxStyle,
|
||||
a as getNormalizeFields,
|
||||
|
||||
2
dist/hooks.js
vendored
2
dist/hooks.js
vendored
@ -1,7 +1,7 @@
|
||||
import "lodash";
|
||||
import "rc-field-form";
|
||||
import "react";
|
||||
import { a3 as r, a2 as o, a4 as p, a0 as f, a1 as i, a5 as m, $ as c } from "./common/main-DfW15Flo.js";
|
||||
import { a3 as r, a2 as o, a4 as p, a0 as f, a1 as i, a5 as m, $ as c } from "./common/main-hfbRQs2Q.js";
|
||||
import { default as b } from "rc-util/lib/hooks/useMergedState";
|
||||
export {
|
||||
r as useDeepEffect,
|
||||
|
||||
2
dist/iconfont.js
vendored
2
dist/iconfont.js
vendored
@ -2,7 +2,7 @@ import "react/jsx-runtime";
|
||||
import "react";
|
||||
import "prop-types";
|
||||
import "classnames";
|
||||
import { ah as a } from "./common/main-DfW15Flo.js";
|
||||
import { ah as a } from "./common/main-hfbRQs2Q.js";
|
||||
export {
|
||||
a as default
|
||||
};
|
||||
|
||||
2
dist/index.js
vendored
2
dist/index.js
vendored
@ -1,4 +1,4 @@
|
||||
import { aB as s, aC as e, ax as o, ay as n, at as p, az as r, aw as c, av as u, au as f, aA as l } from "./common/main-DfW15Flo.js";
|
||||
import { aB as s, aC as e, ax as o, ay as n, at as p, az as r, aw as c, av as u, au as f, aA as l } from "./common/main-hfbRQs2Q.js";
|
||||
export {
|
||||
s as AppContext,
|
||||
e as AppGlobalParamsContext,
|
||||
|
||||
2
dist/pages.js
vendored
2
dist/pages.js
vendored
@ -1,4 +1,4 @@
|
||||
import { Y as t, X as e, Z as o, _ as g } from "./common/main-DfW15Flo.js";
|
||||
import { Y as t, X as e, Z as o, _ as g } from "./common/main-hfbRQs2Q.js";
|
||||
export {
|
||||
t as CustomPage,
|
||||
e as DataListPage,
|
||||
|
||||
2
dist/res-ws.js
vendored
2
dist/res-ws.js
vendored
@ -1,5 +1,5 @@
|
||||
import "lodash";
|
||||
import { R as a } from "./common/main-DfW15Flo.js";
|
||||
import { R as a } from "./common/main-hfbRQs2Q.js";
|
||||
export {
|
||||
a as default
|
||||
};
|
||||
|
||||
2
dist/utils.js
vendored
2
dist/utils.js
vendored
@ -1,5 +1,5 @@
|
||||
import "lodash";
|
||||
import { d as s, f as i, e as g, h as m, b as o, k as P, c as p, j as d, i as h, m as k, r as f, t as u, u as l } from "./common/main-DfW15Flo.js";
|
||||
import { d as s, f as i, e as g, h as m, b as o, k as P, c as p, j as d, i as h, m as k, r as f, t as u, u as l } from "./common/main-hfbRQs2Q.js";
|
||||
import "./common/vender-FNiQWFaA.js";
|
||||
export {
|
||||
s as deepSome,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ff",
|
||||
"private": true,
|
||||
"version": "0.6.16",
|
||||
"version": "0.6.17",
|
||||
"author": "www.fsdpf.com",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user