This commit is contained in:
what 2024-11-20 15:00:20 +08:00
parent e90f134280
commit afda35a01d
17 changed files with 187 additions and 187 deletions

2
dist/button.js vendored
View File

@ -1,4 +1,4 @@
import { U as s, T as u, V as e } from "./common/main-Bi37-NWo.js";
import { U as s, T as u, V as e } from "./common/main-GwmFPdzM.js";
import "prop-types";
export {
s as auth,

View File

@ -4,8 +4,8 @@ var Vt = (e) => {
};
var ba = (e, t, a) => t in e ? Ca(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
var k = (e, t, a) => ba(e, typeof t != "symbol" ? t + "" : t, a), At = (e, t, a) => t.has(e) || Vt("Cannot " + a);
var g = (e, t, a) => (At(e, t, "read from private field"), a ? a.call(e) : t.get(e)), P = (e, t, a) => t.has(e) ? Vt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, a), B = (e, t, a, n) => (At(e, t, "write to private field"), n ? n.call(e, a) : t.set(e, a), a);
var jt = (e, t, a, n) => ({
var g = (e, t, a) => (At(e, t, "read from private field"), a ? a.call(e) : t.get(e)), N = (e, t, a) => t.has(e) ? Vt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, a), B = (e, t, a, n) => (At(e, t, "write to private field"), n ? n.call(e, a) : t.set(e, a), a);
var It = (e, t, a, n) => ({
set _(r) {
B(e, t, r, a);
},
@ -14,51 +14,51 @@ var jt = (e, t, a, n) => ({
}
});
import { jsx as d, jsxs as $ } from "react/jsx-runtime";
import C, { useEffect as x, useState as N, useCallback as pe, useMemo as me, useContext as Xe, useRef as Y, useId as Yt, useLayoutEffect as ka } from "react";
import C, { useEffect as x, useState as P, useCallback as me, useMemo as ie, useContext as Xe, useRef as Y, useId as Yt, useLayoutEffect as ka } from "react";
import p from "lodash";
import R from "classnames";
import { Form as at, Input as va, Button as mt, Breadcrumb as Sa, Tree as Na, Pagination as Pa, Table as $a, Empty as xa, Popconfirm as Ea, Tooltip as Ta, Popover as Fa } from "antd";
import { Form as at, Input as va, Button as mt, Breadcrumb as Sa, Tree as Pa, Pagination as Na, Table as $a, Empty as xa, Popconfirm as Ea, Tooltip as Ta, Popover as Fa } from "antd";
import { useMergedState as Ra } from "rc-util";
import ee, { FieldContext as La, Field as Xt } from "rc-field-form";
import { useParams as Oa, generatePath as Va, createBrowserRouter as Aa, useInRouterContext as ja, Navigate as Ia } from "react-router-dom";
import { useParams as Oa, generatePath as Va, createBrowserRouter as Aa, useInRouterContext as Ia, Navigate as ja } from "react-router-dom";
import L from "prop-types";
import * as It from "react-is";
import * as jt from "react-is";
import { useNotification as Ma } from "rc-notification";
import { N as Be, a as Ue, w as ht, S as za } from "./vender-egxe712p.js";
import Mt from "immutability-helper";
import Wa from "rc-drawer";
import Ba from "rc-dialog";
var je, He, Ie, de, Fe, Re;
var Ie, He, je, ue, Fe, Re;
class Qt {
constructor(t, a) {
P(this, je, /* @__PURE__ */ new Map());
P(this, He, !0);
P(this, Ie, []);
P(this, de);
P(this, Fe, () => g(this, de));
P(this, Re, () => Promise.resolve());
N(this, Ie, /* @__PURE__ */ new Map());
N(this, He, !0);
N(this, je, []);
N(this, ue);
N(this, Fe, () => g(this, ue));
N(this, Re, () => Promise.resolve());
k(this, "get", (...t) => new Promise((a, n) => {
const r = JSON.stringify(t);
if (g(this, je).has(r)) return a(g(this, Re).call(this, g(this, de), ...t));
if (g(this, de) === void 0) g(this, Ie).push([t, a, n]), g(this, He) && (B(this, He, !1), Promise.resolve(typeof g(this, Fe) == "function" ? g(this, Fe).call(this) : g(this, Fe)).then((s) => B(this, de, s || null)).finally(() => {
g(this, Ie).forEach(([s, i, o]) => {
if (g(this, Ie).has(r)) return a(g(this, Re).call(this, g(this, ue), ...t));
if (g(this, ue) === void 0) g(this, je).push([t, a, n]), g(this, He) && (B(this, He, !1), Promise.resolve(typeof g(this, Fe) == "function" ? g(this, Fe).call(this) : g(this, Fe)).then((s) => B(this, ue, s || null)).finally(() => {
g(this, je).forEach(([s, i, o]) => {
try {
const l = g(this, Re).call(this, g(this, de), ...s);
g(this, je).set(JSON.stringify(s), l), i(l);
const l = g(this, Re).call(this, g(this, ue), ...s);
g(this, Ie).set(JSON.stringify(s), l), i(l);
} catch (l) {
o(l);
}
}), g(this, Ie).length = 0;
}), g(this, je).length = 0;
}));
else {
const s = g(this, Re).call(this, g(this, de), ...t);
g(this, je).set(r, s), a(s);
const s = g(this, Re).call(this, g(this, ue), ...t);
g(this, Ie).set(r, s), a(s);
}
}));
B(this, Re, a), B(this, Fe, t);
}
}
je = new WeakMap(), He = new WeakMap(), Ie = new WeakMap(), de = new WeakMap(), Fe = new WeakMap(), Re = new WeakMap();
Ie = new WeakMap(), He = new WeakMap(), je = new WeakMap(), ue = new WeakMap(), Fe = new WeakMap(), Re = new WeakMap();
const Kn = () => d("div", { children: "Empty" }), Qe = C.createContext({ ele: {}, mount: () => {
}, unmount: () => {
} }), K = ({ rootClassName: e, className: t, children: a, actions: n, title: r, subTitle: s, extras: i, style: o = {} }) => {
@ -69,8 +69,8 @@ const Kn = () => d("div", { children: "Empty" }), Qe = C.createContext({ ele: {}
return x(() => (n(e, C.createElement("div", { key: `ff-${e}`, className: R(`ff-popup-${e}`, a) }, t)), () => r(e)), [a, t]), null;
};
K.Action = tt("actions"), K.Title = tt("title"), K.SubTitle = tt("sub-title"), K.Extra = tt("extras"), K.propTypes = { className: L.string, style: L.object, title: L.any, subTitle: L.any, actions: L.any, extras: L.any };
const Gn = () => d(K, { className: "ff-loading", children: $("div", { className: "loader", children: [$("div", { className: "square", children: [d("span", {}), d("span", {}), d("span", {})] }), $("div", { className: "square", children: [d("span", {}), d("span", {}), d("span", {})] }), $("div", { className: "square", children: [d("span", {}), d("span", {}), d("span", {})] }), $("div", { className: "square", children: [d("span", {}), d("span", {}), d("span", {})] })] }) }), _n = () => d("div", { children: "NotFound" }), Zt = ({ children: e }) => {
const [t, a] = N({}), n = pe((s, i) => a((o) => ({ ...o, [s]: i })), []), r = pe((s) => a((i) => ({ ...i, [s]: void 0 })), []);
const _n = () => d(K, { className: "ff-loading", children: $("div", { className: "loader", children: [$("div", { className: "square", children: [d("span", {}), d("span", {}), d("span", {})] }), $("div", { className: "square", children: [d("span", {}), d("span", {}), d("span", {})] }), $("div", { className: "square", children: [d("span", {}), d("span", {}), d("span", {})] }), $("div", { className: "square", children: [d("span", {}), d("span", {}), d("span", {})] })] }) }), Gn = () => d("div", { children: "NotFound" }), Zt = ({ children: e }) => {
const [t, a] = P({}), n = me((s, i) => a((o) => ({ ...o, [s]: i })), []), r = me((s) => a((i) => ({ ...i, [s]: void 0 })), []);
return typeof (e == null ? void 0 : e.type) == "string" ? e : d(Qe.Provider, { value: { ele: t, mount: n, unmount: r }, children: C.cloneElement(e, { className: t.rootClassName, title: t.title, subTitle: t["sub-title"], actions: t.actions, extras: t.extras }) });
};
Zt.propTypes = { children: L.element.isRequired };
@ -78,25 +78,25 @@ const zt = { close: ["M563.8 512l262.5-312.9c4.4-5.2 0.7-13.1-6.1-13.1h-79.8c-4.
var ye, Me;
const te = class te {
constructor() {
P(this, Me, null);
N(this, Me, null);
k(this, "init", (t) => B(this, Me, new Map(t)));
k(this, "check", (t) => !g(this, Me).has(t) || g(this, Me).get(t));
if (g(te, ye)) return g(te, ye);
}
};
ye = new WeakMap(), Me = new WeakMap(), P(te, ye, null), k(te, "getInstance", () => (g(te, ye) || B(te, ye, new te()), g(te, ye)));
ye = new WeakMap(), Me = new WeakMap(), N(te, ye, null), k(te, "getInstance", () => (g(te, ye) || B(te, ye, new te()), g(te, ye)));
let ft = te;
const Da = ft.getInstance();
var we, Je;
const ae = class ae {
constructor() {
P(this, Je, null);
N(this, Je, null);
k(this, "init", (t) => B(this, Je, t));
k(this, "get", (t, a) => p.get(g(this, Je), t, a));
if (g(ae, we)) return g(ae, we);
}
};
we = new WeakMap(), Je = new WeakMap(), P(ae, we, null), k(ae, "getInstance", () => (g(ae, we) || B(ae, we, new ae()), g(ae, we)));
we = new WeakMap(), Je = new WeakMap(), N(ae, we, null), k(ae, "getInstance", () => (g(ae, we) || B(ae, we, new ae()), g(ae, we)));
let yt = ae;
const De = yt.getInstance(), Wt = { 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()) {
@ -120,14 +120,14 @@ const De = yt.getInstance(), Wt = { null2json: (e) => Object.create(), null2arra
const { type: o, value: l = "", default: u = n } = e[s];
switch (o) {
case "code":
i = await Pe.exec(l, t, a);
i = await Ne.exec(l, t, a);
break;
case "field":
i = p.get(t, l) ?? p.get(t, l.substring(l.indexOf(".") + 1));
break;
case "router":
case "query":
i = ge.getPageParams(l);
i = pe.getPageParams(l);
break;
case "string":
i = l;
@ -148,7 +148,7 @@ const De = yt.getInstance(), Wt = { null2json: (e) => Object.create(), null2arra
break;
case "router":
case "query":
s = ge.getPageParams(o);
s = pe.getPageParams(o);
break;
case "string":
s = o;
@ -159,13 +159,13 @@ const De = yt.getInstance(), Wt = { null2json: (e) => Object.create(), null2arra
}
return n;
}, {}), ut = (e, t) => e && typeof e == "object" ? Array.isArray(e) ? e.map((a) => ut(a, t)) : Object.keys(e).reduce((a, n) => (t[n] ? a[t[n]] = ut(e[n], t) : a[n] = ut(e[n], t), a), {}) : e;
var rt, Ke, Ge, st;
var rt, Ke, _e, st;
const it = class it {
constructor(...t) {
P(this, Ke, []);
P(this, Ge, (t) => {
N(this, Ke, []);
N(this, _e, (t) => {
var a;
for (let n of t) Array.isArray(n[0]) ? g(this, Ge).call(this, n) : g(this, Ke).push(g(a = it, rt).call(a, n[0], n[1]));
for (let n of t) Array.isArray(n[0]) ? g(this, _e).call(this, n) : g(this, Ke).push(g(a = it, rt).call(a, n[0], n[1]));
});
k(this, "toValue", async (t, a = null) => {
const n = { getValue: () => t, getRecord: () => a };
@ -179,44 +179,44 @@ const it = class it {
}, t);
});
k(this, "toRender", (t, a, n = null) => C.createElement(g(this, st), { value: t, record: a }, n));
P(this, st, ({ value: t, record: a, children: n }) => {
const [r, s] = N(n);
N(this, st, ({ value: t, record: a, children: n }) => {
const [r, s] = P(n);
return Ft(() => {
let i = !1;
return s(n), this.toValue(t, a).then((o) => Z(o, "string")).then((o) => !i && s(o)).catch((o) => !i && s(`${o}`)), () => i = !0;
}, [t, a]), r;
});
g(this, Ge).call(this, t);
g(this, _e).call(this, t);
}
};
rt = new WeakMap(), Ke = new WeakMap(), Ge = new WeakMap(), st = new WeakMap(), P(it, rt, p.memoize((t, a) => X.getWidgetComponent(t).then((n) => {
rt = new WeakMap(), Ke = new WeakMap(), _e = new WeakMap(), st = new WeakMap(), N(it, rt, p.memoize((t, a) => X.getWidgetComponent(t).then((n) => {
var r;
return ((r = n.default) == null ? void 0 : r.call(n, a)) || ((s) => s);
}), (t, a) => `${t}::${Z(a, "string")}`));
let wt = it;
const qa = (e, t = {}) => me(() => e == null ? void 0 : e.map(({ widgetByJs: a, widgetByJsSetting: n, ...r }, s) => a ? { ...r, render: (i, o) => new wt([a, n]).toRender(i, o, "-") } : r), [e, t]), Yn = (e) => {
const [t, a] = N({});
const qa = (e, t = {}) => ie(() => e == null ? void 0 : e.map(({ widgetByJs: a, widgetByJsSetting: n, ...r }, s) => a ? { ...r, render: (i, o) => new wt([a, n]).toRender(i, o, "-") } : r), [e, t]), Yn = (e) => {
const [t, a] = P({});
return x(() => {
let n = !1;
return e && E.get(`/api/_/${e}`).then((r) => p.pick(r, ["uuid", "name", "code", "resource", "marginX", "marginY", "cols", "rowHeight", "primaryKey", "columns", "itemOperations", "batchOperations", "isConditionFormLayout", "layout", "tabs", "pageSize", "layoutConfig"])).then((r) => !n && a(r)), () => n = !0;
}, [e]), t;
}, Xn = (e, t = {}) => {
const [a, n] = N({ dataSource: [] });
const [a, n] = P({ dataSource: [] });
return Ze(() => {
let r = !1;
return e && E.get(`/api/${e}/${E.encode({ page: 1, ...t })}`).then((s) => !r && n(s)), () => r = !0;
}, [e, t]), a;
}, Ct = (e, t = null, a = null, n = "id") => me(() => {
}, Ct = (e, t = null, a = null, n = "id") => ie(() => {
if (p.isEmpty(e) || !e.some(({ uuid: s }) => Da.check(s))) return !1;
if (p.isEmpty(a) || p.isEmpty(t)) return !0;
const r = t.map((s) => `${s == null ? void 0 : s[n]}`);
return e.some(({ uuid: s }) => !s || !a.has(s) || a.get(s).some((i) => r.includes(`${i}`)));
}, [e, t, a, n]), Ha = ({ className: e, itemClassName: t, classNames: a = {}, dataSource: n, isPaginate: r, isItemOperations: s, isBatchOperations: i, batchOperations: o, itemOperations: l, itemOperationsAccess: u, resource: c, primaryKey: m, title: h, itemGridLayout: f, $setting: y, tabs: b, isConditionFormLayout: w, isTreeSider: T, treeSiderConfig: W }) => {
const { getBase62params: q, onClickCallback: D, onTabChange: H } = Xe(Oe), { total: j, page: M, pageSize: I, tab: z } = (q == null ? void 0 : q()) || {}, G = pe((V, v, ie) => d(Ja, { className: R("ff-data-list-framework-item", t), operations: s && v ? l == null ? void 0 : l.filter((O) => !(m && O.uuid && u.has(O.uuid)) || u.get(O.uuid).includes(v == null ? void 0 : v[m])) : [], data: c ? { [c]: v } : v, children: V, onClickCallback: D }), [c, m, s, D, l, u]);
return $("div", { className: R("ff-data-list-framework", e), children: [d(la, { className: a == null ? void 0 : a.sider, isTreeSider: T, ...W }), $("div", { className: R("ff-data-list-container", a == null ? void 0 : a.container), children: [d(Tt, { className: a == null ? void 0 : a.filter, isConditionFormLayout: w }), d(oa, { title: h, className: a == null ? void 0 : a.toolbar, tabs: b, tab: z, onTabChange: H }), d(an, { ...f, className: a == null ? void 0 : a.content, style: { "--col-num": (y == null ? void 0 : y.colNum) || 1 }, primaryKey: m, itemRender: G, dataSource: n }), d(ca, { className: a == null ? void 0 : a.footer, isPaginate: r, isOperations: i, operations: o, total: j, page: M, pageSize: I })] })] });
const { getBase62params: q, onClickCallback: D, onTabChange: H } = Xe(Oe), { total: I, page: M, pageSize: j, tab: z } = (q == null ? void 0 : q()) || {}, _ = me((V, v, oe) => d(Ja, { className: R("ff-data-list-framework-item", t), operations: s && v ? l == null ? void 0 : l.filter((O) => !(m && O.uuid && u.has(O.uuid)) || u.get(O.uuid).includes(v == null ? void 0 : v[m])) : [], data: c ? { [c]: v } : v, children: V, onClickCallback: D }), [c, m, s, D, l, u]);
return $("div", { className: R("ff-data-list-framework", e), children: [d(la, { className: a == null ? void 0 : a.sider, isTreeSider: T, ...W }), $("div", { className: R("ff-data-list-container", a == null ? void 0 : a.container), children: [d(Tt, { className: a == null ? void 0 : a.filter, isConditionFormLayout: w }), d(oa, { title: h, className: a == null ? void 0 : a.toolbar, tabs: b, tab: z, onTabChange: H }), d(an, { ...f, className: a == null ? void 0 : a.content, style: { "--col-num": (y == null ? void 0 : y.colNum) || 1 }, primaryKey: m, itemRender: _, dataSource: n }), d(ca, { className: a == null ? void 0 : a.footer, isPaginate: r, isOperations: i, operations: o, total: I, page: M, pageSize: j })] })] });
}, Ja = ({ className: e, operations: t, children: a, data: n, onClickCallback: r }) => $("div", { className: R("data-list-grid-layout-item-container", e), children: [a, !!(t != null && t.length) && d("div", { className: "data-list-grid-layout-item-actions", children: t.map((s) => d("span", { className: "data-list-grid-layout-item-action", children: d(S.Link, { uuid: s.uuid, type: s.type, name: s.name, widget: s.widget, widgetType: s.widgetType, widgetProps: s.widgetProps, widgetSetting: s.widgetSetting, widgetContainerProps: s.widgetContainerSetting, data: n, onAfterClick: (i) => i !== !1 && (r == null ? void 0 : r(s.isRefresh, n)) }, s.uuid || useId()) }, (s == null ? void 0 : s.uuid) || useId())) })] }), Ka = ({ listCode: e, className: t, classNames: a = {}, itemClassName: n, dataSource: r, columns: s, isItemOperations: i, isBatchOperations: o, batchOperations: l, itemOperations: u, itemOperationsAccess: c, resource: m, primaryKey: h, title: f, tabs: y, isPaginate: b, isTreeSider: w, treeSiderConfig: T, isConditionFormLayout: W, ...q }) => {
const { getBase62params: D, onClickCallback: H, onTabChange: j } = Xe(Oe), { total: M, page: I, tab: z, pageSize: G } = (D == null ? void 0 : D()) || {}, V = Ct(u, r, c, h);
return $("div", { className: R("ff-data-table-framework", t), children: [d(la, { className: a == null ? void 0 : a.sider, isTreeSider: w, ...T }), $("div", { className: R("ff-data-table-container", a == null ? void 0 : a.container), children: [d(Tt, { listCode: e, isConditionFormLayout: W }), d(oa, { title: f, className: a == null ? void 0 : a.toolbar, tabs: y, tab: z, onTabChange: j }), d(Xa, { ...q, primaryKey: h, className: "ff-data-table-content", columns: s, dataSource: r, operationRender: V ? (v) => d("div", { className: "ff-data-table-actions", children: u == null ? void 0 : u.reduce((ie, O, he) => [...ie, d(S.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: v, onAfterClick: ($e) => $e !== !1 && (H == null ? void 0 : H(O.isRefresh, data)) }, O.uuid || he)], []) }) : null }), d(ca, { isPaginate: b, isOperations: o, operations: l, total: M, page: I, pageSize: G })] })] });
const { getBase62params: D, onClickCallback: H, onTabChange: I } = Xe(Oe), { total: M, page: j, tab: z, pageSize: _ } = (D == null ? void 0 : D()) || {}, V = Ct(u, r, c, h);
return $("div", { className: R("ff-data-table-framework", t), children: [d(la, { className: a == null ? void 0 : a.sider, isTreeSider: w, ...T }), $("div", { className: R("ff-data-table-container", a == null ? void 0 : a.container), children: [d(Tt, { listCode: e, isConditionFormLayout: W }), d(oa, { title: f, className: a == null ? void 0 : a.toolbar, tabs: y, tab: z, onTabChange: I }), d(Xa, { ...q, primaryKey: h, className: "ff-data-table-content", columns: s, dataSource: r, operationRender: V ? (v) => d("div", { className: "ff-data-table-actions", children: u == null ? void 0 : u.reduce((oe, O, he) => [...oe, d(S.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: v, onAfterClick: ($e) => $e !== !1 && (H == null ? void 0 : H(O.isRefresh, data)) }, O.uuid || he)], []) }) : null }), d(ca, { isPaginate: b, isOperations: o, operations: l, total: M, page: j, pageSize: _ })] })] });
}, Oe = C.createContext({ listCode: "", getBase62params: (e, t) => {
}, onReload: () => {
}, onClickCallback: () => {
@ -226,8 +226,8 @@ const qa = (e, t = {}) => me(() => e == null ? void 0 : e.map(({ widgetByJs: a,
}, onKeywordChange: () => {
}, onPageChange: () => {
}, onPageSizeChange: () => {
} }), Ga = ({ isItemGridLayout: e, theme: t, themeProps: a, onClickCallback: n, onReload: r, getBase62params: s, listCode: i, onPageChange: o, onPageSizeChange: l, onTabChange: u, onSiderChange: c, onKeywordChange: m, onConditonChange: h, ...f }) => {
const [y, b] = N();
} }), _a = ({ isItemGridLayout: e, theme: t, themeProps: a, onClickCallback: n, onReload: r, getBase62params: s, listCode: i, onPageChange: o, onPageSizeChange: l, onTabChange: u, onSiderChange: c, onKeywordChange: m, onConditonChange: h, ...f }) => {
const [y, b] = P();
return x(() => {
t ? X.getWidgetComponent(t).then((w) => {
if (!w) throw `${t} not found`;
@ -235,36 +235,36 @@ const qa = (e, t = {}) => me(() => e == null ? void 0 : e.map(({ widgetByJs: a,
}).catch((w) => ({ default: () => `${w}` })).then((w) => b(C.createElement(w.default, { ...f, $setting: a }))) : b(d(e ? Ha : Ka, { ...f, $setting: a }));
}, [t, a]), d(Oe.Provider, { value: { listCode: i, onClickCallback: n, onReload: r, getBase62params: s, onPageChange: o, onPageSizeChange: l, onTabChange: u, onSiderChange: c, onKeywordChange: m, onConditonChange: h }, children: y && C.cloneElement(y, f) });
};
var Ce, ue, Le, ot;
var Ce, ge, Le, ot;
const ne = class ne {
constructor() {
P(this, ue, null);
P(this, Le, /* @__PURE__ */ new Map());
P(this, ot, () => {
if (g(this, ue)) return g(this, ue).port.postMessage({ command: "status", data: [] });
B(this, ue, new SharedWorker(new URL("/ff-worker/res-ws.js", self.location))), g(this, ue).port.onmessage = (t) => {
N(this, ge, null);
N(this, Le, /* @__PURE__ */ new Map());
N(this, ot, () => {
if (g(this, ge)) return g(this, ge).port.postMessage({ command: "status", data: [] });
B(this, ge, new SharedWorker(new URL("/ff-worker/res-ws.js", self.location))), g(this, ge).port.onmessage = (t) => {
var a, n;
(a = t.data) != null && a.uuid ? g(this, Le).forEach((r, s) => {
var i;
(r == "*" || (i = r == null ? void 0 : r.includes) != null && i.call(r, t.data.uuid)) && s(t.data);
}) : ((n = t.data) == null ? void 0 : n.readyState) == WebSocket.CLOSED && E.get("/api/user-api-token").then(({ token: r, expire_at: s }) => {
g(this, ue).port.postMessage({ command: "initWs", data: [`ws${p.trimStart(E.appUrl, "http")}api/user-resource-status-ws?token=${r}`] });
g(this, ge).port.postMessage({ command: "initWs", data: [`ws${p.trimStart(E.appUrl, "http")}api/user-resource-status-ws?token=${r}`] });
});
}, g(this, ue).port.postMessage({ command: "status", data: [] });
}, g(this, ge).port.postMessage({ command: "status", data: [] });
});
k(this, "subscribe", (t, a = []) => (a ? Array.isArray(a) && a.length == 0 ? a = "*" : Array.isArray(a) || (a = [a].flat()) : a = "*", g(this, Le).set(t, a), g(this, Le).size == 1 && g(this, ot).call(this), () => this.unsubscribe(t)));
k(this, "unsubscribe", (t) => g(this, Le).delete(t));
if (g(ne, Ce)) return g(ne, Ce);
}
};
Ce = new WeakMap(), ue = new WeakMap(), Le = new WeakMap(), ot = new WeakMap(), P(ne, Ce, null), k(ne, "getInstance", () => (g(ne, Ce) || B(ne, Ce, new ne()), g(ne, Ce)));
Ce = new WeakMap(), ge = new WeakMap(), Le = new WeakMap(), ot = new WeakMap(), N(ne, Ce, null), k(ne, "getInstance", () => (g(ne, Ce) || B(ne, Ce, new ne()), g(ne, Ce)));
let bt = ne;
const sa = bt.getInstance(), Et = C.forwardRef(({ listCode: e, base62params: t, className: a, itemClassName: n, theme: r, themeProps: s, classNames: i }, o) => {
const l = ma(), u = Y(t), c = Y(/* @__PURE__ */ new Map()), m = Y([]), [{ resource: h, primaryKey: f, batchOperations: y = [], itemOperations: b = [], columns: w = [], themeConfig: T, theme: W, isConditionFormLayout: q = !1, isTreeSider: D, treeSiderConfig: H, isItemGridLayout: j, itemGridLayout: M, title: I, isPaginate: z, tabs: G }, V] = N({ isItemGridLayout: !1, itemGridLayout: {} }), v = p.throttle((F) => {
m.current = [], E.list(e, p.pick({ ...u.current, ...F }, ["tab", "page", "pageSize", "condition", "sider", "keyword"])).then(({ keyword: U, condition: Ve, total: xe, tab: fe, sider: Ee, page: oe, pageSize: le, operationsAccess: ce, dataSource: Te }) => {
u.current = { tab: fe, condition: Ve, sider: Ee, keyword: U, total: xe, pageSize: le, page: Te != null && Te.length ? oe : 1 }, m.current = Te, c.current = new Map(ce), l();
const l = ma(), u = Y(t), c = Y(/* @__PURE__ */ new Map()), m = Y([]), [{ resource: h, primaryKey: f, batchOperations: y = [], itemOperations: b = [], columns: w = [], themeConfig: T, theme: W, isConditionFormLayout: q = !1, isTreeSider: D, treeSiderConfig: H, isItemGridLayout: I, itemGridLayout: M, title: j, isPaginate: z, tabs: _ }, V] = P({ isItemGridLayout: !1, itemGridLayout: {} }), v = p.throttle((F) => {
m.current = [], E.list(e, p.pick({ ...u.current, ...F }, ["tab", "page", "pageSize", "condition", "sider", "keyword"])).then(({ keyword: U, condition: Ve, total: xe, tab: fe, sider: Ee, page: le, pageSize: ce, operationsAccess: de, dataSource: Te }) => {
u.current = { tab: fe, condition: Ve, sider: Ee, keyword: U, total: xe, pageSize: ce, page: Te != null && Te.length ? le : 1 }, m.current = Te, c.current = new Map(de), l();
});
}, 380, { leading: !1, trailing: !0 }), ie = Ct(b, m.current, c.current, f), O = Ct(y);
}, 380, { leading: !1, trailing: !0 }), oe = Ct(b, m.current, c.current, f), O = Ct(y);
x(() => {
let F = null;
return e && E.get(`/api/_/${e}`).resp(({ data: U, res: Ve }) => {
@ -278,28 +278,28 @@ const sa = bt.getInstance(), Et = C.forwardRef(({ listCode: e, base62params: t,
}, $e = (F = 0, U = null) => {
if (F === 2) {
const Ve = p.get(U, "__PARENT_ID__", ""), xe = p.get(U, f, p.get(U, [h, f], "")), fe = p.findIndex(m.current, ["__PARENT_ID__", Ve]), Ee = p.findIndex(fe > -1 ? p.get(m.current, [fe, "children"]) : m.current, [f, xe]);
Ee > -1 ? (E.get(`/api/${e}/detail/${xe}`).then((oe) => {
const le = p.get(m.current, fe > -1 ? [fe, "children", Ee, "children"] : [Ee, "children"]);
m.current = Mt(m.current, fe > -1 ? { [fe]: { children: { $splice: [[Ee, 1, { ...oe, children: le }]] } } } : { $splice: [[Ee, 1, { ...oe, children: le }]] }), l();
}), E.post(`/api/${e}/list-operations-access`, { ids: xe }).then((oe) => new Map(oe)).then((oe) => {
c.current.forEach((le, ce) => {
Ee > -1 ? (E.get(`/api/${e}/detail/${xe}`).then((le) => {
const ce = p.get(m.current, fe > -1 ? [fe, "children", Ee, "children"] : [Ee, "children"]);
m.current = Mt(m.current, fe > -1 ? { [fe]: { children: { $splice: [[Ee, 1, { ...le, children: ce }]] } } } : { $splice: [[Ee, 1, { ...le, children: ce }]] }), l();
}), E.post(`/api/${e}/list-operations-access`, { ids: xe }).then((le) => new Map(le)).then((le) => {
c.current.forEach((ce, de) => {
var Te;
(Te = oe.get(ce)) != null && Te.some((dt) => dt == xe) || c.current.set(ce, le.filter((dt) => dt !== xe));
}), oe.forEach((le, ce) => {
c.current.has(ce) ? c.current.set(ce, p.uniq([...c.current.get(ce) || [], ...le])) : c.current.set(ce, le);
(Te = le.get(de)) != null && Te.some((dt) => dt == xe) || c.current.set(de, ce.filter((dt) => dt !== xe));
}), le.forEach((ce, de) => {
c.current.has(de) ? c.current.set(de, p.uniq([...c.current.get(de) || [], ...ce])) : c.current.set(de, ce);
}), l();
})) : he();
} else F === 1 && he();
};
C.useImperativeHandle(o, () => ({ onReload: he, onClickCallback: $e }));
const ct = { listCode: e, title: I, itemClassName: n, classNames: i, resource: h, primaryKey: f, theme: r || W, themeProps: s || T, isTreeSider: D, treeSiderConfig: H, isPaginate: z, tabs: G, isItemOperations: ie, isBatchOperations: O, batchOperations: y, itemOperations: b, isItemGridLayout: j, columns: w, itemGridLayout: M, isConditionFormLayout: q, itemOperationsAccess: c.current, dataSource: m.current };
return d(Ga, { ...ct, className: R("ff-data-list-helper", a), getBase62params: (F, U, Ve = !1) => F == "init" ? t : F ? p.get(u.current, F, U) : u.current, onReload: he, onClickCallback: $e, onConditonChange: (F, U) => v({ keyword: U, condition: Mt(u.current.condition || {}, { $merge: F || {} }), page: 1 }), onTabChange: (F) => v({ tab: F, page: 1 }), onSiderChange: (F) => v({ sider: F, page: 1 }), onKeywordChange: (F) => v({ keyword: F, page: 1 }), onPageChange: (F, U) => v({ page: F, pageSize: U }), onPageSizeChange: (F) => v({ pageSize: F, page: 1 }) });
const ct = { listCode: e, title: j, itemClassName: n, classNames: i, resource: h, primaryKey: f, theme: r || W, themeProps: s || T, isTreeSider: D, treeSiderConfig: H, isPaginate: z, tabs: _, isItemOperations: oe, isBatchOperations: O, batchOperations: y, itemOperations: b, isItemGridLayout: I, columns: w, itemGridLayout: M, isConditionFormLayout: q, itemOperationsAccess: c.current, dataSource: m.current };
return d(_a, { ...ct, className: R("ff-data-list-helper", a), getBase62params: (F, U, Ve = !1) => F == "init" ? t : F ? p.get(u.current, F, U) : u.current, onReload: he, onClickCallback: $e, onConditonChange: (F, U) => v({ keyword: U, condition: Mt(u.current.condition || {}, { $merge: F || {} }), page: 1 }), onTabChange: (F) => v({ tab: F, page: 1 }), onSiderChange: (F) => v({ sider: F, page: 1 }), onKeywordChange: (F) => v({ keyword: F, page: 1 }), onPageChange: (F, U) => v({ page: F, pageSize: U }), onPageSizeChange: (F) => v({ pageSize: F, page: 1 }) });
}), ia = (e, t, a, n, r = {}, s = 0) => {
const i = { "--grid-layout-h": `${n}`, "--grid-layout-w": `${a}`, "--grid-layout-x": `${e}`, "--grid-layout-y": `${t}`, "--grid-layout-row-height-offset": "0px" };
return r != null && r.autoHeight ? i.height = "fit-content" : i["--grid-layout-row"] = `${n}`, i["--grid-layout-box-margin"] = Bt(r == null ? void 0 : r.marginTop, r == null ? void 0 : r.marginRight, r == null ? void 0 : r.marginBottom, r == null ? void 0 : r.marginLeft), i["--grid-layout-box-padding"] = Bt(r == null ? void 0 : r.paddingTop, r == null ? void 0 : r.paddingRight, r == null ? void 0 : r.paddingBottom, r == null ? void 0 : r.paddingLeft), s && (i.height = `${s}px`), i;
}, Bt = (e, t, a, n) => `${e || 0}px ${t || 0}px ${a || 0}px ${n || 0}px`, Tt = ({ className: e, isConditionFormLayout: t }) => {
var m, h;
const [a, n] = N({}), { listCode: r, onKeywordChange: s, onConditonChange: i, getBase62params: o } = C.useContext(Oe), { keyword: l, condition: u } = (o == null ? void 0 : o()) || {}, [c] = at.useForm();
const [a, n] = P({}), { listCode: r, onKeywordChange: s, onConditonChange: i, getBase62params: o } = C.useContext(Oe), { keyword: l, condition: u } = (o == null ? void 0 : o()) || {}, [c] = at.useForm();
return x(() => {
r && t && E.get(`/api/_/${r}/list-condition-form-layout`).then(({ resource: f, marginX: y, marginY: b, rowHeight: w, cols: T, fields: W }) => {
n({ resource: f, itemMargin: [y, b], rowHeight: w, cols: T, fields: W });
@ -309,24 +309,24 @@ const sa = bt.getInstance(), Et = C.forwardRef(({ listCode: e, base62params: t,
}, [JSON.stringify([l, u])]), d("div", { className: R("ff-data-list-filter", e), children: d(at, { form: c, layout: "vertical", autoComplete: "off", onFinish: ((m = a.fields) == null ? void 0 : m.length) > 1 ? (f) => i({ [a.resource]: f[a.resource] }, f.keyword) : () => {
}, onValuesChange: (f) => {
p.isEmpty(p.omit(f, ["keyword"])) || c.submit();
}, children: ((h = a.fields) == null ? void 0 : h.length) > 1 ? d(Rt, { ...a, children: d(_a, { onReset: () => {
}, children: ((h = a.fields) == null ? void 0 : h.length) > 1 ? d(Rt, { ...a, children: d(Ga, { onReset: () => {
const { keyword: f, condition: y } = o("init") || {};
c.setFieldsValue({ keyword: f, ...y });
} }) }) : d("div", { className: "ff-data-list-filter-default-form ff-grid-layout-form", children: d("div", { className: "grid-layout-item", style: ia(20, 0, 5, 2), children: d(at.Item, { name: ["keyword"], children: d(va.Search, { allowClear: !0, enterButton: "搜索", placeholder: "多关键字 | 分割", onSearch: (f) => s(f) }) }) }) }) }) });
}, _a = ({ cols: e, fields: t, onReset: a }) => {
const [n, r] = N(!1), s = me(() => t == null ? void 0 : t.toReversed().some((i) => i.y > 1 || i.x + i.w >= e - 5), [e, t]);
}, Ga = ({ cols: e, fields: t, onReset: a }) => {
const [n, r] = P(!1), s = ie(() => t == null ? void 0 : t.toReversed().some((i) => i.y > 1 || i.x + i.w >= e - 5), [e, t]);
return $(at.Item, { label: " ", style: { "--item-span": 5 }, className: R("ff-data-list-filter-actions", { expanded: n }), children: [d(mt, { onClick: a, children: "重置" }), d(mt, { type: "primary", htmlType: "submit", children: "查询" }), s && d(S.Link, { className: "ff-data-list-filter-expanded-button", widget: () => r((i) => !i), type: "primary", name: n ? "关闭" : "展开", icon: n ? "icon-up" : "icon-down", iconPosition: "end" })] });
};
Tt.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 oa = ({ className: e, title: t, tabs: a, tab: n, onTabChange: r }) => {
const [s, i] = Ra(a == null ? void 0 : a[0].value, { value: n, onChange: r });
return $("div", { className: R("ff-data-list-toolbar", e), children: [d("div", { className: "ff-data-list-title", children: t }), d(Sa, { className: "ff-data-list-tabs", itemRender: ({ label: o, code: l }) => d("span", { onClick: () => i(l), className: R("ff-data-list-tab", { active: l == s }), children: o }), items: a }), $("div", { className: "ff-data-list-actions", children: [d(S.Link, { icon: "icon-reload" }), d(S.Link, { icon: "icon-setting" })] })] });
}, Ya = [{ 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: d("span", { style: { color: "#1677ff" }, children: "sss" }), key: "0-0-1-0" }] }] }], la = ({ className: e, width: t = 280, isTreeSider: a }) => a ? d(Na.DirectoryTree, { className: R("ff-data-list-sider", e), style: { "--sider-width": t }, showLine: !0, showIcon: !1, treeData: Ya }) : null, ca = ({ className: e, operations: t, isOperations: a, isPaginate: n, total: r, page: s, pageSize: i }) => {
}, Ya = [{ 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: d("span", { style: { color: "#1677ff" }, children: "sss" }), key: "0-0-1-0" }] }] }], la = ({ className: e, width: t = 280, isTreeSider: a }) => a ? d(Pa.DirectoryTree, { className: R("ff-data-list-sider", e), style: { "--sider-width": t }, showLine: !0, showIcon: !1, treeData: Ya }) : null, ca = ({ className: e, operations: t, isOperations: a, isPaginate: n, total: r, page: s, pageSize: i }) => {
const { onPageChange: o, onPageSizeChange: l, onClickCallback: u } = C.useContext(Oe);
return a && !p.isEmpty(t) || n ? $("div", { className: R("ff-data-list-footer", e), children: [d("div", { className: "ff-data-list-actions", children: t == null ? void 0 : t.map((c, m) => d(S, { 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, onAfterClick: (h) => h !== !1 && (u == null ? void 0 : u(c.isRefresh, null)) }, c.uuid || m)) }), n && d(Pa, { size: "small", total: r, pageSize: i, showSizeChanger: !1, showTotal: (c) => `${s} 页 / 总共 ${c}`, onChange: o, onShowSizeChange: l })] }) : null;
return a && !p.isEmpty(t) || n ? $("div", { className: R("ff-data-list-footer", e), children: [d("div", { className: "ff-data-list-actions", children: t == null ? void 0 : t.map((c, m) => d(S, { 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, onAfterClick: (h) => h !== !1 && (u == null ? void 0 : u(c.isRefresh, null)) }, c.uuid || m)) }), n && d(Na, { size: "small", total: r, pageSize: i, showSizeChanger: !1, showTotal: (c) => `${s} 页 / 总共 ${c}`, onChange: o, onShowSizeChange: l })] }) : null;
}, da = (e, t, a = !0) => a !== !0 && a-- <= 0 ? [] : p.isArray(e) && !p.isEmpty(e) ? e.reduce((n, r) => (Reflect.has(r, t) && Reflect.has(r, "children") && n.push(r[t]), Reflect.has(r, "children") && !p.isEmpty(r.children) ? n.concat(da(r.children, t, a)) : n), []) : [], Xa = ({ className: e, primaryKey: t, columns: a = [], dataSource: n = [], operationRender: r, operationWidth: s = 180, ...i }) => {
Yt();
const o = Y(null), l = Y(null), [u, c] = N([]), [m, h] = N({ width: 0, height: 0 });
const o = Y(null), l = Y(null), [u, c] = P([]), [m, h] = P({ width: 0, height: 0 });
x(() => {
c(da(n, t));
}, [n, t]), ka(() => {
@ -341,21 +341,21 @@ const oa = ({ className: e, title: t, tabs: a, tab: n, onTabChange: r }) => {
const f = qa(a);
return d("div", { ref: l, className: R("ff-data-list-table", e), children: m.height ? d($a, { ...i, ref: o, rowKey: (y) => (y == null ? void 0 : y[t]) ?? Math.random(), columns: f == null ? void 0 : f.concat(r ? [{ title: "操作", align: "center", fixed: "right", width: `${Math.ceil(s / m.width * 100).toFixed(2)}%`, render: (y, b, w) => r(b, w) }] : []), dataSource: n, size: "middle", scroll: { x: "max-content", y: m.height - 50 }, pagination: !1, expandable: { defaultExpandAllRows: !0, expandRowByClick: !0, onExpandedRowsChange: c, expandedRowKeys: u } }) : null });
}, Qa = "RC_FORM_INTERNAL_HOOKS", ua = (e, { initialValue: t, initialValueLanguage: a, convertJs: n, convertJsSetting: r, type: s = "string" }, i = null) => {
const o = Y(!1), l = Xe(La), [u, c] = N(), [m, h] = N(a != "javascript" && e ? l.getFieldValue(e) : void 0), { registerWatch: f } = l.getInternalHooks(Qa) || {};
const o = Y(!1), l = Xe(La), [u, c] = P(), [m, h] = P(a != "javascript" && e ? l.getFieldValue(e) : void 0), { registerWatch: f } = l.getInternalHooks(Qa) || {};
return x(() => f == null ? void 0 : f((y, b, w) => {
if (!o.current) return;
const T = p.get(b, e);
p.isEqual(T, m) || h(Z(T, s));
}), [m]), x(() => {
a == "javascript" && t ? Pe.exec(t, {}, { getFieldValueForBasicForm: (y) => i ? i.getFieldValue(y) : l.getFieldValue(y), getFieldValue: (y) => l.getFieldValue(y) }).then((y) => h(Z(y, s))).catch((y) => notification.error({ message: `布局数据错误: ${JSON.stringify(y)}` })).finally(() => o.current = !0) : (t && h(Z(t ?? l.getFieldValue(e), s)), o.current = !0);
a == "javascript" && t ? Ne.exec(t, {}, { getFieldValueForBasicForm: (y) => i ? i.getFieldValue(y) : l.getFieldValue(y), getFieldValue: (y) => l.getFieldValue(y) }).then((y) => h(Z(y, s))).catch((y) => notification.error({ message: `布局数据错误: ${JSON.stringify(y)}` })).finally(() => o.current = !0) : (t && h(Z(t ?? l.getFieldValue(e), s)), o.current = !0);
}, [t, a]), Ze(() => {
o.current && n && X.getWidgetComponent(n).then(({ default: y }) => y({ value: m, record: l.getFieldsValue(!0), $setting: r })).then(c).catch((y) => console.error("布局数据转换错误: ", y, n));
}, [m, n, r]), [u || m, m];
}, ga = (e, t, a = "@pkg/ff/grid-layouts", n = null) => me(() => {
}, ga = (e, t, a = "@pkg/ff/grid-layouts", n = null) => ie(() => {
var r;
return (r = p.sortBy(e, ["y", "x"])) == null ? void 0 : r.map(({ i: s, x: i, y: o, w: l, h: u, field: { boxStyle: c, widgetPrefix: m = a, widget: h, ...f } }, y) => d("div", { className: "grid-layout-item", style: ia(i, o, l, u, c, h === "Height" && (f == null ? void 0 : f.initialValue)), children: d(Za, { ...f, basicForm: n, itemWidget: h != null && h.startsWith("@") || h != null && h.startsWith("blob:") ? h : `${m}/${h}`, itemWidgetRender: t }) }, s || y));
}, [e]), Za = ({ itemWidget: e, itemWidgetRender: t, basicForm: a, ...n }) => {
const [r, s] = N();
const [r, s] = P();
return x(() => {
X.getWidgetComponent(e).then(({ defaultProps: i = {}, default: o }) => {
s(C.createElement(t(o, i, a), n));
@ -364,7 +364,7 @@ const oa = ({ className: e, title: t, tabs: a, tab: n, onTabChange: r }) => {
});
}, [e]), r;
}, pa = ({ cols: e = 12, rowHeight: t = 21, fields: a = [], data: n, containerPadding: r = [0, 0], itemMargin: s = [4, 0], formProps: i = {}, className: o, ...l }) => {
const [u] = ee.useForm(), c = ga(a, en, "@pkg/ff/grid-layouts"), m = me(() => [{ name: "__PROPS__", value: i }], [i]);
const [u] = ee.useForm(), c = ga(a, en, "@pkg/ff/grid-layouts"), m = ie(() => [{ name: "__PROPS__", value: i }], [i]);
return Ze(() => {
u.setFieldsValue(n);
}, [n]), d(ee, { fields: m, form: u, component: !1, children: d("div", { ...l, className: R("ff-grid-layout", o), style: { "--grid-layout-item-margin-y": `${(s == null ? void 0 : s[0]) || 0}px`, "--grid-layout-item-margin-x": `${(s == null ? void 0 : s[1]) || 0}px`, "--grid-layout-container-padding-y": `${(r == null ? void 0 : r[0]) || 0}px`, "--grid-layout-container-padding-x": `${(r == null ? void 0 : r[1]) || 0}px`, "--grid-layout-cols": e, "--grid-layout-row-height": `${t}px` }, children: c }) });
@ -372,14 +372,14 @@ const oa = ({ className: e, title: t, tabs: a, tab: n, onTabChange: r }) => {
const { code: r, label: s, extras: i, isVirtual: o, initialValue: l, initialValueLanguage: u, convertJs: c, convertJsSetting: m, ...h } = p.merge({}, t, n), [f, y] = ua(o ? null : r, { initialValue: l, initialValueLanguage: u, convertJs: c, convertJsSetting: m, type: (h == null ? void 0 : h.type) || "string" }, a);
return d(e, { ...h, value: f, rawValue: y, $setting: i || {} });
}, Qn = (Ut = pa, function({ code: e, data: t, ...a }) {
const [n, r] = N({ resource: null, cols: 12, rowHeight: 21, fields: [] });
const [n, r] = P({ resource: null, cols: 12, rowHeight: 21, fields: [] });
return x(() => {
e && E.get(`/api/_/${e}`).then((s) => r(p.pick(s, ["resource", "cols", "rowHeight", "fields"])));
}, [e]), (n == null ? void 0 : n.resource) && d(Ut, { ...a, rowHeight: n.rowHeight, cols: n.cols, fields: n.fields, data: n != null && n.resource ? { [n == null ? void 0 : n.resource]: t } : {} });
});
var Ut;
const Zn = ({ widget: e, widgetPrefix: t = "@pkg/ff/grid-layouts", basicForm: a, ...n }) => {
const r = e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`, [s, i] = N();
const r = e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`, [s, i] = P();
return x(() => {
r && X.getWidgetComponent(r).then(({ defaultProps: o = {}, default: l }) => ({ default: tn(l, o, a) })).catch((o) => ({ default: () => `${o}` })).then((o) => i(C.createElement(o.default, n)));
}, [r]), s;
@ -387,26 +387,26 @@ const Zn = ({ widget: e, widgetPrefix: t = "@pkg/ff/grid-layouts", basicForm: a,
const { code: r, label: s, extras: i, isVirtual: o, initialValue: l, initialValueLanguage: u, convertJs: c, convertJsSetting: m, value: h, ...f } = p.merge({}, t, n), [y, b] = ua(o ? null : r, { initialValue: l, initialValueLanguage: u, convertJs: c, convertJsSetting: m, type: (f == null ? void 0 : f.type) || "string" }, a);
return d(e, { ...f, value: y, rawValue: b, $setting: i || {} });
}, an = ({ cols: e, rowHeight: t, itemMargin: a, fields: n, primaryKey: r, dataSource: s, itemClassName: i, itemRender: o = (m, h, f) => m, empty: l = d(xa, { description: null }), className: u, style: c = {} }) => {
const m = Yt(), h = me(() => d(pa, { cols: e, rowHeight: t, itemMargin: a, fields: n, className: i }), [n, e, t, a]);
const m = Yt(), h = ie(() => d(pa, { cols: e, rowHeight: t, itemMargin: a, fields: n, className: i }), [n, e, t, a]);
return d("div", { className: R("ff-data-list-content", u), style: c, children: p.isEmpty(s) ? l : s == null ? void 0 : s.map((f, y) => d(C.Fragment, { children: o(C.cloneElement(h, { data: f }), f, y) }, `${m}-${(f == null ? void 0 : f[r]) || y}`)) });
}, nn = ({ component: e }) => {
const { base62params: t } = Oa();
return d(K, { children: d(Et, { listCode: e, base62params: E.decode(t) }) });
}, rn = () => "Empty", sn = ({ component: e, $setting: t }) => {
const [a, n] = N();
const [a, n] = P();
x(() => {
if (!e) return n(d(rn, { description: null }));
X.getWidgetComponent(e).catch((s) => ({ default: () => `${s}` })).then((s) => C.createElement(s.default, { $setting: t })).then(n);
}, [e]);
const r = ge.getPageParams() || {};
const r = pe.getPageParams() || {};
return a ? C.cloneElement(a, r) : null;
};
var be, Q, ke, ve, _e, Ye;
var be, Q, ke, ve, Ge, Ye;
const re = class re {
constructor() {
P(this, Q, /* @__PURE__ */ new Map());
P(this, ke, {});
P(this, ve, null);
N(this, Q, /* @__PURE__ */ new Map());
N(this, ke, {});
N(this, ve, null);
k(this, "init", (t, a) => {
B(this, Q, t), B(this, ke, a);
});
@ -424,19 +424,19 @@ const re = class re {
});
k(this, "findMenuPathByUuid", (t) => {
let a = [];
for (const n in g(this, ke)) if (a = g(this, _e).call(this, g(this, ke)[n], t, [n]), a.length > 1) return a;
for (const n in g(this, ke)) if (a = g(this, Ge).call(this, g(this, ke)[n], t, [n]), a.length > 1) return a;
return a;
});
k(this, "getMenusByRouteUuid", (t) => g(this, Ye).call(this, t, Object.values(g(this, ke)).flat()));
P(this, _e, (t, a, n = []) => {
N(this, Ge, (t, a, n = []) => {
if (p.isEmpty(t)) return n;
for (const { uuid: r, children: s } of t) {
if (r == a) return n.concat(r);
if (!p.isEmpty(s)) return n.concat(r, g(this, _e).call(this, s, a));
if (!p.isEmpty(s)) return n.concat(r, g(this, Ge).call(this, s, a));
}
return n;
});
P(this, Ye, (t, a) => {
N(this, Ye, (t, a) => {
var r;
let n = [];
for (const s of a) s.widgetType == "redirect" && (s.uuid == t || s.widget == t ? n.push(s) : (r = s.children) != null && r.length && (n = n.concat(g(this, Ye).call(this, t, s.children))));
@ -486,14 +486,14 @@ const re = class re {
if (g(re, be)) return g(re, be);
}
};
be = new WeakMap(), Q = new WeakMap(), ke = new WeakMap(), ve = new WeakMap(), _e = new WeakMap(), Ye = new WeakMap(), P(re, be, null), k(re, "getInstance", () => (g(re, be) || B(re, be, new re()), g(re, be)));
be = new WeakMap(), Q = new WeakMap(), ke = new WeakMap(), ve = new WeakMap(), Ge = new WeakMap(), Ye = new WeakMap(), N(re, be, null), k(re, "getInstance", () => (g(re, be) || B(re, be, new re()), g(re, be)));
let kt = re;
const on = ({ to: e, replace: t }) => ja() ? C.createElement(Ia, { to: e, replace: t }) : (window.document.location = e, "redirect"), ge = kt.getInstance(), Ae = new Worker(new URL("/ff-worker/index.js", self.location)), Dt = { getConfigure: (e) => De.get(e), route: { redirect: (...e) => ge.redirect(...e), getPageParams: (...e) => ge.getPageParams(...e), getCurrentRoute: () => ge.getCurrentRoute() }, popup: { notification: (...e) => _.notification(...e), success: (...e) => _.success(...e), error: (...e) => _.error(...e), form: (...e) => _.form(...e), modal: (...e) => _.modal(...e), confirm: (...e) => _.confirm(...e) } };
const on = ({ to: e, replace: t }) => Ia() ? C.createElement(ja, { to: e, replace: t }) : (window.document.location = e, "redirect"), pe = kt.getInstance(), Ae = new Worker(new URL("/ff-worker/index.js", self.location)), Dt = { getConfigure: (e) => De.get(e), route: { redirect: (...e) => pe.redirect(...e), getPageParams: (...e) => pe.getPageParams(...e), getCurrentRoute: () => pe.getCurrentRoute() }, popup: { notification: (...e) => G.notification(...e), success: (...e) => G.success(...e), error: (...e) => G.error(...e), form: (...e) => G.form(...e), modal: (...e) => G.modal(...e), confirm: (...e) => G.confirm(...e) } };
var lt, ze, Se;
const A = class A {
constructor() {
k(this, "exec", (t, a = {}, n = {}, r = "") => new Promise((s, i) => {
const o = jt(A, lt)._++;
const o = It(A, lt)._++;
g(A, ze).set(o, n), A.mQueue.set(o, [s, i]), Ae.postMessage({ id: o, session: r, category: "eval", method: t, args: a });
}));
k(this, "clear", (t) => Ae.postMessage({ session: t, category: "clear" }));
@ -516,9 +516,9 @@ const A = class A {
}, !1);
}
};
lt = new WeakMap(), ze = new WeakMap(), Se = new WeakMap(), k(A, "mQueue", /* @__PURE__ */ new Map()), P(A, lt, 0), P(A, ze, /* @__PURE__ */ new Map()), P(A, Se, null), k(A, "getInstance", () => (g(A, Se) || B(A, Se, new A()), g(A, Se)));
lt = new WeakMap(), ze = new WeakMap(), Se = new WeakMap(), k(A, "mQueue", /* @__PURE__ */ new Map()), N(A, lt, 0), N(A, ze, /* @__PURE__ */ new Map()), N(A, Se, null), k(A, "getInstance", () => (g(A, Se) || B(A, Se, new A()), g(A, Se)));
let vt = A;
const Pe = vt.getInstance(), ma = () => {
const Ne = vt.getInstance(), ma = () => {
const e = Y(!0), [, t] = C.useReducer((a) => a + 1, 0);
return x(() => () => e.current = !1, []), () => e.current && t();
}, er = (e) => {
@ -527,7 +527,7 @@ const Pe = vt.getInstance(), ma = () => {
t.current = e;
}, [e]), t.current;
}, tr = (e) => {
const [t, a] = N(e), n = Y(null), r = pe((s, i) => {
const [t, a] = P(e), n = Y(null), r = me((s, i) => {
n.current = i, a(s);
}, []);
return x(() => {
@ -543,14 +543,14 @@ const Pe = vt.getInstance(), ma = () => {
for (let n = 0; n < e.length; n++) e[n].value = Z((a = e[n]) == null ? void 0 : a.value, t), e[n] && Reflect.has(e[n], "children") && (e[n].children = ha(e[n].children, t));
return e;
}, ar = (e, t = "json", a = "string", n, r = null) => {
const [s] = ee.useForm(n), [i, o] = N([{ label: "无", value: "", disabled: !0 }]), l = Y([]), u = ee.useWatch((c) => l.current.length === 0 ? null : p.pick(c, l.current), s) || null;
const [s] = ee.useForm(n), [i, o] = P([{ label: "无", value: "", disabled: !0 }]), l = Y([]), u = ee.useWatch((c) => l.current.length === 0 ? null : p.pick(c, l.current), s) || null;
return x(() => {
Array.isArray(e) ? o(e) : t === "javascript" && e ? Pe.exec(e, {}, { getFieldValue: (c) => (l.current.includes(c) || l.current.push(c), s.getFieldValue(c)), getFieldValueForBasicForm: (c) => (l.current.includes(c) || l.current.push(c), r ? r.getFieldValue(c) : s.getFieldValue(c)) }).then((c) => {
Array.isArray(e) ? o(e) : t === "javascript" && e ? Ne.exec(e, {}, { getFieldValue: (c) => (l.current.includes(c) || l.current.push(c), s.getFieldValue(c)), getFieldValueForBasicForm: (c) => (l.current.includes(c) || l.current.push(c), r ? r.getFieldValue(c) : s.getFieldValue(c)) }).then((c) => {
o(Z(c, "array"));
}) : e && o(Z(e, "array"));
}, [e, t, u]), ha(i, a);
}, nr = (e) => {
const [t, a] = N(), n = { type: "GET" };
const [t, a] = P(), n = { type: "GET" };
if (typeof e == "string" ? n.url = e : p.isPlainObject(e) && Object.assign(n, e), !(n != null && n.url)) throw "url is required";
const r = (s) => E.request(n, !1).resp((i) => (console.log("useSubscribeRequest", s), a(i), i));
return Ze(() => {
@ -568,7 +568,7 @@ const Pe = vt.getInstance(), ma = () => {
}, { items: [], hides: [] }) })).then(a);
}, [e]), t;
}, cn = ({ max: e = 0, min: t = 0, type: a = "", message: n, pattern: r, required: s = !1, validator: i } = {}, o, l) => {
const [u, c] = N([]);
const [u, c] = P([]);
return x(() => {
const m = [];
if (s) {
@ -595,14 +595,14 @@ const Pe = vt.getInstance(), ma = () => {
break;
case "validator":
i && m.push(({ getFieldValue: h }) => ({ validator: async (f, y) => {
const b = await Pe.exec(i, { value: y, fieldName: o }, { getFieldValue: h });
const b = await Ne.exec(i, { value: y, fieldName: o }, { getFieldValue: h });
return p.isString(b) && b ? Promise.reject(b) : p.isBoolean(b) && !b ? Promise.reject(n) : Promise.resolve();
} }));
}
c(m);
}, [e, t, a, n, r, s, i]), u;
}, dn = (e, t, a) => {
const [n, r] = N(null);
const [n, r] = P(null);
return x(() => {
const { initDataUri: s = `/api/${e}`, initDataMethod: i = "GET" } = a || {};
t && E.request({ method: i, url: p.trimEnd(`${s}/${t}`, "/") }).then((o) => {
@ -610,15 +610,15 @@ const Pe = vt.getInstance(), ma = () => {
});
}, [e, t, a]), n;
}, un = (e, t, a, n = {}) => {
const r = ma(), s = Y(!0), i = Y([]), [o, l] = N(a), u = ee.useWatch((c) => JSON.stringify(p.pick(c, i.current)), t) || "{}";
const r = ma(), s = Y(!0), i = Y([]), [o, l] = P(a), u = ee.useWatch((c) => JSON.stringify(p.pick(c, i.current)), t) || "{}";
return x(() => {
e && Pe.exec(e, n, { getFieldValue: p.wrap(t.getFieldValue, (c, m) => (i.current.some((h) => p.isEqual(h, m)) || (i.current.push(m), r()), c(m))), isFieldTouched: t.isFieldTouched, isFieldsTouched: t.isFieldsTouched }).then((c) => s.current && l(c));
e && Ne.exec(e, n, { getFieldValue: p.wrap(t.getFieldValue, (c, m) => (i.current.some((h) => p.isEqual(h, m)) || (i.current.push(m), r()), c(m))), isFieldTouched: t.isFieldTouched, isFieldsTouched: t.isFieldsTouched }).then((c) => s.current && l(c));
}, [e, u, t, n]), x(() => () => s.current = !1, []), o;
}, rr = ({ value: e, onChange: t }, a = null) => {
const n = C.useRef(), [r] = ee.useForm(a);
const n = Y(), [r] = ee.useForm(a);
return Ft(() => {
p.isEqual(n.current, e) || r.setFieldsValue(e);
}, [e]), x(() => () => r.resetFields(), []), [r, (s, i) => {
}, [e]), x(() => () => r.resetFields(), []), [ie(() => r.__INTERNAL__ ? r : { ...r, __INTERNAL__: {} }, [r]), (s, i) => {
n.current = i, t(i);
}];
}, gn = ({ type: e, initialValue: t, initialValueLanguage: a, onChange: n, form: r }) => {
@ -627,15 +627,15 @@ const Pe = vt.getInstance(), ma = () => {
a == "javascript" ? n(Z(s, e)) : t && n(Z(t, e));
}, [e, t, s]), null;
}, pn = ({ widget: e = "Input", widgetPrefix: t = "@pkg/ff/grid-layout-forms", widgetDecorator: a, subWidgets: n, basicForm: r, ...s }) => {
const i = e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`, [o, l] = N();
const i = e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`, [o, l] = P();
return x(() => {
i && X.getWidgetComponent(i).then(({ defaultProps: u = {}, default: c }) => ({ default: fa(c, u, r) })).catch((u) => ({ default: () => `${u}` })).then((u) => l(C.createElement(u.default, s)));
}, [i]), o && C.cloneElement(o, s);
}, fa = (e, t = {}, a = null) => (n) => {
const { type: r, code: s, label: i, noStyle: o, placeholder: l, extras: u, validators: c, help: m, isVirtual: h, $isReserved: f, initialValue: y, initialValueLanguage: b, convertJs: w, convertJsSetting: T, widgetPerfix: W, boxStyle: q, widgetDecorator: D, subWidgets: H, ...j } = { ...t, ...n }, M = cn(c || {}, s, r), I = { label: i, noStyle: o, colon: !1, layout: "vertical" }, z = { placeholder: l, ...j }, G = pe((V) => V == null ? void 0 : Z(V, r), [r]);
return d(Xt, { name: s, rules: M, initialValue: G(y), normalize: G, children: (V, v, ie) => {
const { type: r, code: s, label: i, noStyle: o, placeholder: l, extras: u, validators: c, help: m, isVirtual: h, $isReserved: f, initialValue: y, initialValueLanguage: b, convertJs: w, convertJsSetting: T, widgetPerfix: W, boxStyle: q, widgetDecorator: D, subWidgets: H, ...I } = { ...t, ...n }, M = cn(c || {}, s, r), j = { label: i, noStyle: o, colon: !1, layout: "vertical" }, z = { placeholder: l, ...I }, _ = me((V) => V == null ? void 0 : Z(V, r), [r]);
return d(Xt, { name: s, rules: M, initialValue: _(y), normalize: _, children: (V, v, oe) => {
var O;
return d(e, { type: r, rcform: ie, itemProps: { validateStatus: v.errors.length > 0 ? "error" : "success", tooltip: m, help: v.errors.length > 0 ? v.errors.join("、") : null, required: ((O = M == null ? void 0 : M[0]) == null ? void 0 : O.required) || !1, ...I }, fieldProps: { ...z, ...V }, $setting: u || {} });
return d(e, { type: r, rcform: oe, itemProps: { validateStatus: v.errors.length > 0 ? "error" : "success", tooltip: m, help: v.errors.length > 0 ? v.errors.join("、") : null, required: ((O = M == null ? void 0 : M[0]) == null ? void 0 : O.required) || !1, ...j }, fieldProps: { ...z, ...V }, $setting: u || {} });
} });
}, Rt = ({ cols: e = 24, rowHeight: t = 16, itemMargin: a = [8, 16], containerPadding: n = [0, 0], fields: r = [], children: s, basicForm: i = null }) => {
const o = ga(r, fa, "@pkg/ff/grid-layout-forms");
@ -644,10 +644,10 @@ const Pe = vt.getInstance(), ma = () => {
Rt.propTypes = { fields: L.array };
const mn = (qt = Rt, ({ code: e, layout: t, name: a, primaryKey: n = 0, style: r = {}, formProps: s = {}, form: i, isPreview: o = !1, className: l, onFinish: u, onValuesChange: c = () => {
}, ...m }) => {
const { align: h, autoComplete: f, resource: y, items: b, hides: w, rowHeight: T, marginX: W, marginY: q, cols: D, listenChangeFields: H, listenChangeFieldsFunc: j, pk: M, uuid: I } = ln(e), [z] = ee.useForm(i), G = me(() => [{ name: "__PK__", value: M }, { name: "__PROPS__", value: s }, { name: "__RESOURCE__", value: y }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: I }, { name: "__PRIMARY_KEY__", value: n }], [M, e, I, y, n, s]);
return $(ee, { className: l, name: a || e, layout: t || h, fields: G, form: z, autoComplete: f, style: { ...r, position: "relative" }, onFinish: u, onValuesChange: (V, v) => (({ changedValues: ie, allValues: O, listenChangeFields: he, listenChangeFieldsFunc: $e, onValuesChange: ct, code: F }) => {
ct(ie, O), $e && Array.isArray(he) && Pe.exec($e, { changedValues: ie, allValues: O }, { getFieldValue: z.getFieldValue, setFieldValue: z.setFieldValue, setFieldsValue: z.setFieldsValue, isFieldTouched: z.isFieldTouched, isFieldsTouched: z.isFieldsTouched });
})({ changedValues: V, allValues: v, listenChangeFields: H, listenChangeFieldsFunc: j, onValuesChange: c, code: e }), children: [d(qt, { ...m, form: z, code: e, fields: b, cols: D, rowHeight: T, itemMargin: [W, q] }), w == null ? void 0 : w.map((V) => {
const { align: h, autoComplete: f, resource: y, items: b, hides: w, rowHeight: T, marginX: W, marginY: q, cols: D, listenChangeFields: H, listenChangeFieldsFunc: I, pk: M, uuid: j } = ln(e), [z] = ee.useForm(i), _ = ie(() => [{ name: "__PK__", value: M }, { name: "__PROPS__", value: s }, { name: "__RESOURCE__", value: y }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: j }, { name: "__PRIMARY_KEY__", value: n }], [M, e, j, y, n, s]);
return $(ee, { className: l, name: a || e, layout: t || h, fields: _, form: z, autoComplete: f, style: { ...r, position: "relative" }, onFinish: u, onValuesChange: (V, v) => (({ changedValues: oe, allValues: O, listenChangeFields: he, listenChangeFieldsFunc: $e, onValuesChange: ct, code: F }) => {
ct(oe, O), $e && Array.isArray(he) && Ne.exec($e, { changedValues: oe, allValues: O }, { getFieldValue: z.getFieldValue, setFieldValue: z.setFieldValue, setFieldsValue: z.setFieldsValue, isFieldTouched: z.isFieldTouched, isFieldsTouched: z.isFieldsTouched });
})({ changedValues: V, allValues: v, listenChangeFields: H, listenChangeFieldsFunc: I, onValuesChange: c, code: e }), children: [d(qt, { ...m, form: z, code: e, fields: b, cols: D, rowHeight: T, itemMargin: [W, q] }), w == null ? void 0 : w.map((V) => {
var v;
return d(Xt, { name: V.code, children: d(gn, { form: z, name: V.code, type: V.type, initialValue: V.initialValue, initialValueLanguage: (v = V.extras) == null ? void 0 : v.initialValueLanguage }) }, JSON.stringify(V.code));
})] }, e);
@ -659,15 +659,15 @@ const ya = ({ $setting: e, $close: t, extras: a, code: n, primaryKey: r, ...s })
o && i.setFieldsValue(o);
}, [o]), d(K, { actions: $(C.Fragment, { children: [d(S, { name: "保存", type: "primary", widget: () => {
const l = i.getFieldValue("__RESOURCE__"), { initDataUri: u = `/api/${n}` } = e || {};
i.validateFields(!0).then((c) => l ? p.pick(c, [l]) : c).then((c) => E.post(r ? `${u}/${r}` : `${u}`, c).msg(t)).catch(() => _.error("请先完善表单信息", { duration: 2e3 }));
i.validateFields(!0).then((c) => l ? p.pick(c, [l]) : c).then((c) => E.post(r ? `${u}/${r}` : `${u}`, c).msg(t)).catch(() => G.error("请先完善表单信息", { duration: 2e3 }));
} }), d(S, { name: "取消", widget: () => t(!1) })] }), extras: a, children: d(mn, { form: i, code: n, primaryKey: r, ...s }) });
}, hn = (e, t, a, { isReplaceRouteHistory: n = !1 } = {}) => ge.redirect(a, t, { replace: n }), Ht = (e, t, a, { status: { loading: n, disabled: r }, setStatus: s }) => {
}, hn = (e, t, a, { isReplaceRouteHistory: n = !1 } = {}) => pe.redirect(a, t, { replace: n }), Ht = (e, t, a, { status: { loading: n, disabled: r }, setStatus: s }) => {
const i = { loading: (o) => o === void 0 ? n : s((l) => ({ ...l, loading: o })), disabled: (o) => o === void 0 ? r : s((l) => ({ ...l, disabled: o })) };
return p.isFunction(a) ? a.call(null, { ...t, ...i }) : p.isString(a) && a ? Pe.exec(a, t, i) : null;
}, Jt = (e, t, a, n, r) => p.isString(a) && a ? X.getWidgetComponent(a).then(({ default: s }) => _.modal(s, { ...t, $setting: n }, r != null && r.title ? { ...r, title: p.template(r.title)(e) } : r)).catch((s) => {
_.error(a, { content: s.toString() });
}) : _.modal(a, { ...t, $setting: n }, r != null && r.title ? { ...r, title: p.template(r.title)(e) } : r), fn = (e, t, a, n, r) => _.modal(ya, { ...t, $setting: n, code: a }, r != null && r.title ? { ...r, title: p.template(r.title)(e) } : r), yn = (e, t, a, n, r) => _.modal(Et, { base62params: t, $setting: n, listCode: a }, r != null && r.title ? { ...r, title: p.template(r.title)(e) } : r), wn = ({ widget: e, widgetType: t, widgetData: a, widgetProps: n, widgetSetting: r, widgetContainerProps: s }, { onAfterClick: i, onBeforeClick: o }) => {
const l = Xe(Oe), [u, c] = N({ leading: !0, trailing: !1 }), m = me(() => {
return p.isFunction(a) ? a.call(null, { ...t, ...i }) : p.isString(a) && a ? Ne.exec(a, t, i) : null;
}, Jt = (e, t, a, n, r) => p.isString(a) && a ? X.getWidgetComponent(a).then(({ default: s }) => G.modal(s, { ...t, $setting: n }, r != null && r.title ? { ...r, title: p.template(r.title)(e) } : r)).catch((s) => {
G.error(a, { content: s.toString() });
}) : G.modal(a, { ...t, $setting: n }, r != null && r.title ? { ...r, title: p.template(r.title)(e) } : r), fn = (e, t, a, n, r) => G.modal(ya, { ...t, $setting: n, code: a }, r != null && r.title ? { ...r, title: p.template(r.title)(e) } : r), yn = (e, t, a, n, r) => G.modal(Et, { base62params: t, $setting: n, listCode: a }, r != null && r.title ? { ...r, title: p.template(r.title)(e) } : r), wn = ({ widget: e, widgetType: t, widgetData: a, widgetProps: n, widgetSetting: r, widgetContainerProps: s }, { onAfterClick: i, onBeforeClick: o }) => {
const l = Xe(Oe), [u, c] = P({ leading: !0, trailing: !1 }), m = ie(() => {
switch (t) {
case "redirect":
return p.partialRight(hn, e, r);
@ -696,53 +696,53 @@ const ya = ({ $setting: e, $close: t, extras: a, code: n, primaryKey: r, ...s })
St(e, t + 1);
}), Kt.add(a), document.body.appendChild(n);
}
}, Nt = ({ className: e, type: t, style: a = {}, ...n }) => d("span", { role: "img", className: R("ff-iconfont", e), style: a, ...n, children: d("svg", { style: { width: "1em", height: "1em", fill: "currentColor", overflow: "hidden" }, viewBox: "0 0 1024 1024", children: d("use", { xlinkHref: `#${t}` }) }) });
Nt.propTypes = { className: L.string, type: L.string.isRequired, style: L.object }, Nt.init = St;
}, Pt = ({ className: e, type: t, style: a = {}, ...n }) => d("span", { role: "img", className: R("ff-iconfont", e), style: a, ...n, children: d("svg", { style: { width: "1em", height: "1em", fill: "currentColor", overflow: "hidden" }, viewBox: "0 0 1024 1024", children: d("use", { xlinkHref: `#${t}` }) }) });
Pt.propTypes = { className: L.string, type: L.string.isRequired, style: L.object }, Pt.init = St;
const et = (e) => function({ className: t, children: a, name: n, icon: r, type: s = "default", iconPosition: i = "start", noAuthType: o, onAfterClick: l, onBeforeClick: u, data: c, loading: m, disabled: h, tooltip: f, popConfirm: y, widget: b, widgetType: w, widgetData: T, widgetProps: W, widgetSetting: q, widgetContainerProps: D, ...H }) {
const j = { type: "primary", className: R("ff-button", t), iconPosition: i };
s === "danger" ? j.danger = !0 : s === "default" && (j.type = s), e === "link" || e === "dashed" ? (j.type = e, s === "default" && (j.className = R(j.className, "ff-default"))) : e !== "circle" && e !== "round" || (j.shape = e), r && (j.icon = d(Nt, { type: r }));
const [M, I] = N(!1), [z, { disabled: G, loading: V }] = wn({ widget: b, widgetType: w, widgetData: T, widgetProps: W, widgetSetting: q, widgetContainerProps: D }, { onAfterClick: l, onBeforeClick: u });
return d(Ea, { okText: "确定", cancelText: "取消", ...y || {}, disabled: G || h, open: M, onOpenChange: (v) => {
if (!v) return I(v);
y ? I(v) : z(c);
const I = { type: "primary", className: R("ff-button", t), iconPosition: i };
s === "danger" ? I.danger = !0 : s === "default" && (I.type = s), e === "link" || e === "dashed" ? (I.type = e, s === "default" && (I.className = R(I.className, "ff-default"))) : e !== "circle" && e !== "round" || (I.shape = e), r && (I.icon = d(Pt, { type: r }));
const [M, j] = P(!1), [z, { disabled: _, loading: V }] = wn({ widget: b, widgetType: w, widgetData: T, widgetProps: W, widgetSetting: q, widgetContainerProps: D }, { onAfterClick: l, onBeforeClick: u });
return d(Ea, { okText: "确定", cancelText: "取消", ...y || {}, disabled: _ || h, open: M, onOpenChange: (v) => {
if (!v) return j(v);
y ? j(v) : z(c);
}, onConfirm: () => {
z(c);
}, onClick: (v) => {
v.stopPropagation();
}, children: d(Ta, { ...f, title: M ? null : f == null ? void 0 : f.title, trigger: ["hover", "click"], children: d(mt, { loading: V || m, disabled: G || h, ...j, ...H, children: a || n }) }) });
}, S = et("default"), Cn = et("link"), bn = et("circle"), kn = et("round"), vn = et("dashed"), Gt = ({ data: e, widget: t, widgetType: a = "fsdpf-component", children: n, widgetData: r, widgetProps: s, widgetSetting: i, widgetContainerProps: o }) => {
const l = Xe(Oe), [u, c] = N(!1), [m, h] = N("hover"), [f, y] = N({}), [b, w] = N(), { placement: T, align: W, arrow: q = { pointAtCenter: !0 }, getPopupContainer: D, ...H } = o || {};
}, children: d(Ta, { ...f, title: M ? null : f == null ? void 0 : f.title, trigger: ["hover", "click"], children: d(mt, { loading: V || m, disabled: _ || h, ...I, ...H, children: a || n }) }) });
}, S = et("default"), Cn = et("link"), bn = et("circle"), kn = et("round"), vn = et("dashed"), _t = ({ data: e, widget: t, widgetType: a = "fsdpf-component", children: n, widgetData: r, widgetProps: s, widgetSetting: i, widgetContainerProps: o }) => {
const l = Xe(Oe), [u, c] = P(!1), [m, h] = P("hover"), [f, y] = P({}), [b, w] = P(), { placement: T, align: W, arrow: q = { pointAtCenter: !0 }, getPopupContainer: D, ...H } = o || {};
x(() => {
a == "grid-layout-form" ? w(C.createElement(ya, { ...r, $setting: i, code: t })) : a == "data-list" ? w(C.createElement(Et, { base62params: e, $setting: i, listCode: t })) : p.isString(t) ? X.getWidgetComponent(t).then(({ default: I }) => {
w(C.createElement(I, { ...r, $setting: i }));
}).catch((I) => w(I.toString())) : Ot(t) ? w(C.createElement(t, { ...r, $setting: i })) : C.isValidElement(t) && w(C.cloneElement(t, { ...r, $setting: i }));
a == "grid-layout-form" ? w(C.createElement(ya, { ...r, $setting: i, code: t })) : a == "data-list" ? w(C.createElement(Et, { base62params: e, $setting: i, listCode: t })) : p.isString(t) ? X.getWidgetComponent(t).then(({ default: j }) => {
w(C.createElement(j, { ...r, $setting: i }));
}).catch((j) => w(j.toString())) : Ot(t) ? w(C.createElement(t, { ...r, $setting: i })) : C.isValidElement(t) && w(C.cloneElement(t, { ...r, $setting: i }));
}, [t, a, r]), x(() => {
Promise.resolve(ta(s, e, { list: l })).then(y);
}, [s, e]);
const j = (I) => {
c(I), !I && h("hover");
}, M = (I) => {
const I = (j) => {
c(j), !j && h("hover");
}, M = (j) => {
c(!0), h("click");
};
return d(Fa, { zIndex: 1080, placement: T, onPopupClick: M, onClick: M, open: u, align: W, arrow: q, trigger: m, getPopupContainer: D, content: d(Sn, { ...H, children: b && C.cloneElement(b, { ...f, $close: () => j(!1) }) }), children: n, onOpenChange: j });
return d(Fa, { zIndex: 1080, placement: T, onPopupClick: M, onClick: M, open: u, align: W, arrow: q, trigger: m, getPopupContainer: D, content: d(Sn, { ...H, children: b && C.cloneElement(b, { ...f, $close: () => I(!1) }) }), children: n, onOpenChange: I });
}, Sn = ({ title: e, className: t, children: a, width: n, height: r, ...s }) => {
const [i, o] = N({}), l = pe((m, h) => o((f) => ({ ...f, [m]: h })), []), u = pe((m) => o((h) => ({ ...h, [m]: void 0 })), []), c = e ? C.createElement("div", { className: "ff-popup-title" }, e) : i == null ? void 0 : i.title;
const [i, o] = P({}), l = me((m, h) => o((f) => ({ ...f, [m]: h })), []), u = me((m) => o((h) => ({ ...h, [m]: void 0 })), []), c = e ? C.createElement("div", { className: "ff-popup-title" }, e) : i == null ? void 0 : i.title;
return d(Qe.Provider, { value: { ele: i, mount: l, unmount: u }, children: $("div", { className: R("ff-popup ff-popover", t), style: { width: n, height: r }, ...s, children: [$("div", { className: "ff-popup-header", children: [c, i == null ? void 0 : i["sub-title"]] }), a, $("div", { className: "ff-popup-footer", children: [i == null ? void 0 : i.extras, i == null ? void 0 : i.actions] })] }) });
};
Gt.propTypes = { widgetType: L.oneOf(["fsdpf-component", "grid-layout-form", "data-list"]) }, S.propTypes = { type: L.oneOf(["primary", "default", "danger", ""]), name: L.string, icon: L.string, iconPosition: L.oneOf(["start", "end"]), data: L.any, widget: L.any, widgetType: L.oneOf(["destroy", "redirect", "func", "fsdpf-component", "grid-layout-form", "grid-layout", "data-list"]), widgetData: L.object, widgetProps: L.object, widgetSetting: L.object, widgetContainerProps: L.object }, S.Link = Cn, S.Link.defaultProps = S.defaultProps, S.Link.propTypes = S.propTypes, S.Circle = bn, S.Circle.defaultProps = S.defaultProps, S.Circle.propTypes = S.propTypes, S.Round = kn, S.Round.defaultProps = S.defaultProps, S.Round.propTypes = S.propTypes, S.Dashed = vn, S.Dashed.defaultProps = S.defaultProps, S.Dashed.propTypes = S.propTypes, S.Popover = Gt;
const Nn = ({ fields: e, formProps: t, $close: a }) => {
const [n] = ee.useForm(), r = me(() => [{ name: "__PROPS__", value: t }], [t]);
_t.propTypes = { widgetType: L.oneOf(["fsdpf-component", "grid-layout-form", "data-list"]) }, S.propTypes = { type: L.oneOf(["primary", "default", "danger", ""]), name: L.string, icon: L.string, iconPosition: L.oneOf(["start", "end"]), data: L.any, widget: L.any, widgetType: L.oneOf(["destroy", "redirect", "func", "fsdpf-component", "grid-layout-form", "grid-layout", "data-list"]), widgetData: L.object, widgetProps: L.object, widgetSetting: L.object, widgetContainerProps: L.object }, S.Link = Cn, S.Link.defaultProps = S.defaultProps, S.Link.propTypes = S.propTypes, S.Circle = bn, S.Circle.defaultProps = S.defaultProps, S.Circle.propTypes = S.propTypes, S.Round = kn, S.Round.defaultProps = S.defaultProps, S.Round.propTypes = S.propTypes, S.Dashed = vn, S.Dashed.defaultProps = S.defaultProps, S.Dashed.propTypes = S.propTypes, S.Popover = _t;
const Pn = ({ fields: e, formProps: t, $close: a }) => {
const [n] = ee.useForm(), r = ie(() => [{ name: "__PROPS__", value: t }], [t]);
return d(K, { actions: $(C.Fragment, { children: [d(S, { name: "取消", widget: () => a(!1) }), d(S, { name: "确定", type: "primary", widget: () => n.validateFields(!0).then(a) })] }), children: d(ee, { fields: r, form: n, className: "ff-modal-form", children: e == null ? void 0 : e.map(({ code: s, ...i }) => d(pn, { code: s, ...i }, s)) }) });
}, Pn = ({ className: e, $close: t, children: a, title: n, subTitle: r, actions: s, extras: i, zIndex: o, ...l }) => $(Wa, { ...l, prefixCls: "ff-drawer", className: R("ff-popup", e), maskMotion: { motionAppear: !0, motionName: "mask-motion" }, motion: (u) => ({ motionAppear: !0, motionName: `panel-motion-${u}` }), children: [$("div", { className: "ff-popup-header", children: [d("button", { "aria-label": "Close", className: "ff-popup-close", onClick: l.onClose, children: d(xt, { type: "close" }) }), n, r] }), d("div", { className: "ff-popup-body", children: a }), $("div", { className: "ff-popup-footer", children: [i, s] })] }), $n = ({ className: e, $close: t, $event: a, children: n, title: r, subTitle: s, actions: i, extras: o, zIndex: l, placement: u, ...c }) => {
}, Nn = ({ className: e, $close: t, children: a, title: n, subTitle: r, actions: s, extras: i, zIndex: o, ...l }) => $(Wa, { ...l, prefixCls: "ff-drawer", className: R("ff-popup", e), maskMotion: { motionAppear: !0, motionName: "mask-motion" }, motion: (u) => ({ motionAppear: !0, motionName: `panel-motion-${u}` }), children: [$("div", { className: "ff-popup-header", children: [d("button", { "aria-label": "Close", className: "ff-popup-close", onClick: l.onClose, children: d(xt, { type: "close" }) }), n, r] }), d("div", { className: "ff-popup-body", children: a }), $("div", { className: "ff-popup-footer", children: [i, s] })] }), $n = ({ className: e, $close: t, $event: a, children: n, title: r, subTitle: s, actions: i, extras: o, zIndex: l, placement: u, ...c }) => {
const m = (a == null ? void 0 : a.pageX) === void 0 ? { animation: null, maskAnimation: null, mousePosition: { x: null, y: null } } : { animation: "zoom", maskAnimation: "fade", mousePosition: { x: a == null ? void 0 : a.pageX, y: a == null ? void 0 : a.pageY } };
return d(Ba, { ...c, ...m, prefixCls: "ff-modal", modalRender: () => $("div", { className: R("ff-modal-content ff-popup", e), children: [$("div", { className: "ff-popup-header", children: [d("button", { "aria-label": "Close", className: "ff-popup-close", onClick: c.onClose, children: d(xt, { type: "close" }) }), r, s] }), d("div", { className: "ff-popup-body", children: n }), $("div", { className: "ff-popup-footer", children: [o, i] })] }) });
}, wa = ({ placement: e, $close: t, $event: a, children: n, title: r, ...s }) => {
const [i, o] = N({}), [l, u] = N(!0), c = pe((y, b) => o((w) => ({ ...w, [y]: b })), []), m = pe((y) => o((b) => ({ ...b, [y]: void 0 })), []);
const [i, o] = P({}), [l, u] = P(!0), c = me((y, b) => o((w) => ({ ...w, [y]: b })), []), m = me((y) => o((b) => ({ ...b, [y]: void 0 })), []);
let h = { ...s, className: i.rootClassName, title: i.title || r && C.createElement("div", { className: R("ff-popup-title") }, r), subTitle: i["sub-title"], actions: i.actions, extras: i.extras, children: n, $close: t, $event: a, onClose: () => u(!1) };
const f = () => {
t(!1);
};
return d(Qe.Provider, { value: { ele: i, mount: c, unmount: m }, children: e && e !== "center" ? d(Pn, { ...h, placement: e, open: l, afterOpenChange: (y) => !y && f() }) : d($n, { ...h, visible: l, afterClose: f }) });
return d(Qe.Provider, { value: { ele: i, mount: c, unmount: m }, children: e && e !== "center" ? d(Nn, { ...h, placement: e, open: l, afterOpenChange: (y) => !y && f() }) : d($n, { ...h, visible: l, afterClose: f }) });
};
wa.propTypes = { placement: L.oneOf(["center", "left", "top", "right", "bottom"]) };
const J = () => {
@ -758,14 +758,14 @@ const J = () => {
const n = (s, i = {}, o = {}) => new Promise((l, u) => r([l, u], s, i, o)), r = ([s, i], o, l = {}, u = {}) => {
const c = J.$index++, m = (h) => ((f, y) => (J.$popups.delete(f), a(), y == null ? void 0 : y()))(c, () => s(h));
if (o === ea) return e.open({ ...u, key: c, content: C.createElement(o, { ...l, $close: () => e.close(c) }) });
J.$popups.set(c, C.createElement(wa, { zIndex: c, maskClosable: !1, $event: l == null ? void 0 : l.$event, ...u, key: c, $close: m }, C.isValidElement(o) ? C.cloneElement(o, { ...l, $close: m }) : o != null && o.name || It.isForwardRef(o) || (o == null ? void 0 : o.$$typeof) === It.ForwardRef ? C.createElement(o, { ...l, $close: m }) : o)), a();
J.$popups.set(c, C.createElement(wa, { zIndex: c, maskClosable: !1, $event: l == null ? void 0 : l.$event, ...u, key: c, $close: m }, C.isValidElement(o) ? C.cloneElement(o, { ...l, $close: m }) : o != null && o.name || jt.isForwardRef(o) || (o == null ? void 0 : o.$$typeof) === jt.ForwardRef ? C.createElement(o, { ...l, $close: m }) : o)), a();
};
return $(C.Fragment, { children: [Array.from(J.$popups).map(([s, i]) => i), t] });
};
J.$popups = /* @__PURE__ */ new Map(), J.$index = 0, J.$queue = [], J.$onClick = (...e) => new Promise((t, a) => {
J.$queue.push([e, t, a]);
});
const _t = (e, t, a = {}) => J.$onClick(e, t, a), gt = (e, { showProgress: t, duration: a, ...n } = { duration: 1.5 }) => J.$onClick(ea, { content: e, ...n }, { showProgress: t, duration: a }), _ = { modal: _t, confirm: (e, t = {}) => J.$onClick(Ua, { content: e, ...t }, { placement: "center" }), form: (e, t = {}, a = {}) => _t(Nn, { formProps: a, fields: e }, { placement: "center", ...t }).then((n) => {
const Gt = (e, t, a = {}) => J.$onClick(e, t, a), gt = (e, { showProgress: t, duration: a, ...n } = { duration: 1.5 }) => J.$onClick(ea, { content: e, ...n }, { showProgress: t, duration: a }), G = { modal: Gt, confirm: (e, t = {}) => J.$onClick(Ua, { content: e, ...t }, { placement: "center" }), form: (e, t = {}, a = {}) => Gt(Pn, { formProps: a, fields: e }, { placement: "center", ...t }).then((n) => {
if (n === !1) throw !1;
return n;
}), notification: gt, success: (e, t = { duration: 1.5 }) => gt(e, { ...t, className: "ff-notification-success", icon: "check" }), error: (e, t = { duration: 1.5 }) => gt(e, { ...t, className: "ff-notification-error", icon: "close" }) };
@ -775,10 +775,10 @@ Be.configure({ showSpinner: !1 }), Ue.interceptors.request.use((e) => {
return e.headers.Authorization = t ? `Bearer ${t} ` : void 0, Be.inc(), e;
}, (e) => (Be.done(), Promise.reject({ code: -1, msg: e }))), Ue.interceptors.response.use(({ data: e, headers: t }) => (Be.done(), { ...e, res: t == null ? void 0 : t.res }), function(e) {
return Be.done(), Promise.reject(e.message);
}), window.addEventListener("unhandledrejection", ht.onUnhandledRejection), ht.onMsg = (e, t) => _[[0, 1].includes(e) ? "success" : "error"](t).then(() => e === 20300 && ge.redirect(De.get("Common.WEBSITE_LOGIN_PAGE")));
const Pt = { appUrl: "", init: (e, t, a) => {
Pt.appUrl = a, Ue.defaults.baseURL = a, Ue.defaults.timeout = 15e3, Object.assign(Pt, new ht(e, t, Ue));
} }, E = Pt;
}), window.addEventListener("unhandledrejection", ht.onUnhandledRejection), ht.onMsg = (e, t) => G[[0, 1].includes(e) ? "success" : "error"](t).then(() => e === 20300 && pe.redirect(De.get("Common.WEBSITE_LOGIN_PAGE")));
const Nt = { appUrl: "", init: (e, t, a) => {
Nt.appUrl = a, Ue.defaults.baseURL = a, Ue.defaults.timeout = 15e3, Object.assign(Nt, new ht(e, t, Ue));
} }, E = Nt;
class Lt extends Error {
constructor(t, a) {
super(a), Error.captureStackTrace && Error.captureStackTrace(this, Lt), !a instanceof qe && (this.name = `${t} Error Runtime`);
@ -790,10 +790,10 @@ class qe extends Error {
}
}
const pt = "mine", nt = "token";
var Ne, We;
var Pe, We;
const se = class se {
constructor() {
P(this, We, /* @__PURE__ */ new Map());
N(this, We, /* @__PURE__ */ new Map());
k(this, "setVendor", (t, a) => g(this, We).set(t, new Qt(a, async (n, r) => {
var i, o;
if (!(n != null && n.default)) throw "@pkg not found";
@ -853,10 +853,10 @@ const se = class se {
k(this, "logout", () => {
window.localStorage.removeItem(pt), window.localStorage.removeItem(nt);
});
if (g(se, Ne)) return g(se, Ne);
if (g(se, Pe)) return g(se, Pe);
}
};
Ne = new WeakMap(), We = new WeakMap(), P(se, Ne, null), k(se, "getInstance", () => (g(se, Ne) || B(se, Ne, new se()), g(se, Ne)));
Pe = new WeakMap(), We = new WeakMap(), N(se, Pe, null), k(se, "getInstance", () => (g(se, Pe) || B(se, Pe, new se()), g(se, Pe)));
let $t = se;
const X = $t.getInstance(), xn = C.createContext({ user: {}, initUser: () => {
}, initUserComplete: !1 }), En = C.createContext({ set: () => {
@ -867,7 +867,7 @@ const X = $t.getInstance(), xn = C.createContext({ user: {}, initUser: () => {
if (!e || typeof window > "u") return;
let a = document.querySelector(`style[ff-style-token="${t}"]`);
return a ? (a.innerHTML = e, e) : (a = document.createElement("style"), a.setAttribute("ff-style-token", t), a.setAttribute("type", "text/css"), a.innerHTML = e, document.head.appendChild(a), e);
}, Fn = Object.freeze(Object.defineProperty({ __proto__: null, AppContext: xn, AppGlobalParamsContext: En, cache: Qt, configure: De, default: X, func: Pe, http: E, insertStyle: Tn, isReactComponent: Ot, route: ge }, Symbol.toStringTag, { value: "Module" })), Rn = (e, t, a = "children") => {
}, Fn = Object.freeze(Object.defineProperty({ __proto__: null, AppContext: xn, AppGlobalParamsContext: En, cache: Qt, configure: De, default: X, func: Ne, http: E, insertStyle: Tn, isReactComponent: Ot, route: pe }, Symbol.toStringTag, { value: "Module" })), Rn = (e, t, a = "children") => {
if (p.isEmpty(e)) return {};
const n = p.find(e, ["value", t]);
if (!p.isEmpty(n)) return n;
@ -898,7 +898,7 @@ export {
un as P,
rr as Q,
sa as R,
Nt as S,
Pt as S,
S as T,
Da as U,
wn as V,
@ -906,18 +906,18 @@ export {
Qe as X,
Zt as Y,
J as Z,
_,
G as _,
ia as a,
Gn as a0,
_n as a1,
_n as a0,
Gn as a1,
X as a2,
Ot as a3,
Tn as a4,
E as a5,
Qt as a6,
De as a7,
Pe as a8,
ge as a9,
Ne as a8,
pe as a9,
xn as aa,
En as ab,
Rn as ac,
@ -925,7 +925,7 @@ export {
pa as c,
Zn as d,
ga as e,
Ga as f,
_a as f,
ta as g,
Tt as h,
oa as i,

2
dist/components.js vendored
View File

@ -1,4 +1,4 @@
import { $ as s, S as p, a0 as n, a1 as t, _ as d } from "./common/main-Bi37-NWo.js";
import { $ as s, S as p, a0 as n, a1 as t, _ as d } from "./common/main-GwmFPdzM.js";
export {
s as Empty,
p as Icon,

2
dist/container.js vendored
View File

@ -1,4 +1,4 @@
import { X as o, $ as s, a0 as p, a1 as t, Y as d, _ as n, Z as r, W as u } from "./common/main-Bi37-NWo.js";
import { X as o, $ as s, a0 as p, a1 as t, Y as d, _ as n, Z as r, W as u } from "./common/main-GwmFPdzM.js";
export {
o as Context,
s as Empty,

View File

@ -1,6 +1,6 @@
import "lodash";
import "react";
import { D as p } from "./common/main-Bi37-NWo.js";
import { D as p } from "./common/main-GwmFPdzM.js";
export {
p as default
};

2
dist/data-list.js vendored
View File

@ -1,4 +1,4 @@
import { o as t, m as e, h as r, k as o, p as i, l as D, j as u, n as l, i as L, q as n, f as m, s as p, w as C, x as F, v as b } from "./common/main-Bi37-NWo.js";
import { o as t, m as e, h as r, k as o, p as i, l as D, j as u, n as l, i as L, q as n, f as m, s as p, w as C, x as F, v as b } from "./common/main-GwmFPdzM.js";
export {
t as DataListContent,
e as DataListContext,

View File

@ -1,5 +1,5 @@
import "lodash";
import { b as a } from "../common/main-Bi37-NWo.js";
import { b as a } from "../common/main-GwmFPdzM.js";
export {
a as getDefaultExpandRowKeys
};

View File

@ -1,4 +1,4 @@
import { J as s, L as r, K as u, I as o, P as t, O as d, Q as m, N as F, M as i } from "./common/main-Bi37-NWo.js";
import { J as s, L as r, K as u, I as o, P as t, O as d, Q as m, N as F, M as i } from "./common/main-GwmFPdzM.js";
export {
s as GridLayoutForm,
r as GridLayoutFormHelper,

View File

@ -1,5 +1,5 @@
import "lodash";
import { ac as a } from "../common/main-Bi37-NWo.js";
import { ac as a } from "../common/main-GwmFPdzM.js";
export {
a as getOptionItemByValue
};

2
dist/grid-layout.js vendored
View File

@ -1,4 +1,4 @@
import { c as d, d as e, H as u, G as i, u as t, e as o } from "./common/main-Bi37-NWo.js";
import { c as d, d as e, H as u, G as i, u as t, e as o } from "./common/main-GwmFPdzM.js";
export {
d as GridLayout,
e as GridLayoutWidget,

View File

@ -1,4 +1,4 @@
import { a as t } from "../common/main-Bi37-NWo.js";
import { a as t } from "../common/main-GwmFPdzM.js";
export {
t as getBoxStyle
};

2
dist/hooks.js vendored
View File

@ -1,7 +1,7 @@
import "lodash";
import "rc-field-form";
import "react";
import { C as r, B as o, E as p, z as i, A as f, F as m, y as c } from "./common/main-Bi37-NWo.js";
import { C as r, B as o, E as p, z as i, A as f, F as m, y as c } from "./common/main-GwmFPdzM.js";
import { _ as b } from "./common/vender-egxe712p.js";
export {
r as useDeepEffect,

2
dist/iconfont.js vendored
View File

@ -2,7 +2,7 @@ import "react/jsx-runtime";
import "react";
import "prop-types";
import "classnames";
import { S as a } from "./common/main-Bi37-NWo.js";
import { S as a } from "./common/main-GwmFPdzM.js";
export {
a as default
};

2
dist/index.js vendored
View File

@ -1,4 +1,4 @@
import { aa as t, ab as e, a6 as o, a7 as n, a2 as p, a8 as r, a5 as c, a4 as f, a3 as l, a9 as u } from "./common/main-Bi37-NWo.js";
import { aa as t, ab as e, a6 as o, a7 as n, a2 as p, a8 as r, a5 as c, a4 as f, a3 as l, a9 as u } from "./common/main-GwmFPdzM.js";
export {
t as AppContext,
e as AppGlobalParamsContext,

2
dist/res-ws.js vendored
View File

@ -1,5 +1,5 @@
import "lodash";
import { R as a } from "./common/main-Bi37-NWo.js";
import { R as a } from "./common/main-GwmFPdzM.js";
export {
a as default
};

2
dist/utils.js vendored
View File

@ -1,5 +1,5 @@
import "lodash";
import { g as a, r as i, t as o } from "./common/main-Bi37-NWo.js";
import { g as a, r as i, t as o } from "./common/main-GwmFPdzM.js";
export {
a as getWidgetPropsData,
i as replaceKeys,

View File

@ -1,7 +1,7 @@
{
"name": "ff",
"private": true,
"version": "0.4.23",
"version": "0.4.24",
"author": "www.fsdpf.com",
"type": "module",
"main": "./dist/index.js",