v0.4.53
This commit is contained in:
parent
f527147597
commit
af55f8135a
2
dist/button.js
vendored
2
dist/button.js
vendored
@ -1,4 +1,4 @@
|
||||
import { a4 as s, a3 as u, a5 as e } from "./common/main-DCNTmsIE.js";
|
||||
import { a4 as s, a3 as u, a5 as e } from "./common/main-CAOXVHLy.js";
|
||||
export {
|
||||
s as auth,
|
||||
u as default,
|
||||
|
@ -25,7 +25,7 @@ import { useParams as Mi, generatePath as zi, createBrowserRouter as Di, useInRo
|
||||
import b from "prop-types";
|
||||
import * as At from "react-is";
|
||||
import { useNotification as Ui } from "rc-notification";
|
||||
import { N as Fe, a as Oe, T as pt, S as Wi } from "./vender-DMK1apIA.js";
|
||||
import { N as Fe, a as Oe, T as gt, S as Wi } from "./vender-DMK1apIA.js";
|
||||
import "rc-util/lib/hooks/useMergedState";
|
||||
import Hi from "rc-drawer";
|
||||
import Ki from "rc-dialog";
|
||||
@ -76,18 +76,18 @@ const ar = () => d(G, { className: "ff-loading", children: O("div", { className:
|
||||
};
|
||||
Yt.propTypes = { children: b.element.isRequired };
|
||||
const jt = { close: ["M563.8 512l262.5-312.9c4.4-5.2 0.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9c-4.4 5.2-0.7 13.1 6.1 13.1h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"], check: ["M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474c-6.1-7.7-15.3-12.2-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1 0.4-12.8-6.3-12.8z"], info: ["M512 224m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z", "M544 392h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V400c0-4.4-3.6-8-8-8z"] }, vt = ({ type: e, props: t }) => d("i", { ...t, children: d("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", fill: "currentColor", children: (jt[e] || jt.info).map((i, n) => d("path", { d: i }, n)) }) }), Xt = ({ className: e, content: t, icon: i, $close: n }) => O(k.Fragment, { children: [i && d("div", { className: I("ff-notification-icon", e), children: d(vt, { type: i }) }), t] }), Ji = ({}) => d(G, { children: "Confirm" });
|
||||
var pe, Ne;
|
||||
var ge, Ne;
|
||||
const te = class te {
|
||||
constructor() {
|
||||
R(this, Ne, /* @__PURE__ */ new Map());
|
||||
S(this, "init", (t) => B(this, Ne, new Map(t)));
|
||||
S(this, "check", (t) => !y(this, Ne).has(t) || y(this, Ne).get(t));
|
||||
if (y(te, pe)) return y(te, pe);
|
||||
if (y(te, ge)) return y(te, ge);
|
||||
}
|
||||
};
|
||||
pe = new WeakMap(), Ne = new WeakMap(), R(te, pe, null), S(te, "getInstance", () => (y(te, pe) || B(te, pe, new te()), y(te, pe)));
|
||||
let gt = te;
|
||||
const _i = gt.getInstance(), Gi = (e, t, i = "children") => {
|
||||
ge = new WeakMap(), Ne = new WeakMap(), R(te, ge, null), S(te, "getInstance", () => (y(te, ge) || B(te, ge, new te()), y(te, ge)));
|
||||
let pt = te;
|
||||
const _i = pt.getInstance(), Gi = (e, t, i = "children") => {
|
||||
if (c.isEmpty(e)) return {};
|
||||
const n = c.find(e, ["value", t]);
|
||||
if (!c.isEmpty(n)) return n;
|
||||
@ -98,16 +98,16 @@ const _i = gt.getInstance(), Gi = (e, t, i = "children") => {
|
||||
}
|
||||
return {};
|
||||
}, Qt = (e = "Input", t = "@pkg/ff/grid-layout-forms") => e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`;
|
||||
var ge, Ie;
|
||||
var pe, Ie;
|
||||
const ie = class ie {
|
||||
constructor() {
|
||||
R(this, Ie, null);
|
||||
S(this, "init", (t) => B(this, Ie, t));
|
||||
S(this, "get", (t, i) => c.get(y(this, Ie), t, i));
|
||||
if (y(ie, ge)) return y(ie, ge);
|
||||
if (y(ie, pe)) return y(ie, pe);
|
||||
}
|
||||
};
|
||||
ge = new WeakMap(), Ie = new WeakMap(), R(ie, ge, null), S(ie, "getInstance", () => (y(ie, ge) || B(ie, ge, new ie()), y(ie, ge)));
|
||||
pe = new WeakMap(), Ie = new WeakMap(), R(ie, pe, null), S(ie, "getInstance", () => (y(ie, pe) || B(ie, pe, new ie()), y(ie, pe)));
|
||||
let mt = ie;
|
||||
const Ae = mt.getInstance(), Vt = { 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()) {
|
||||
@ -223,7 +223,7 @@ const Yi = (e, t = {}) => H(() => e == null ? void 0 : e.map(({ widgetByJs: i, w
|
||||
let n = !1;
|
||||
return e && F.get(`/api/_/${e}`).then((r) => c.pick(r, ["uuid", "name", "code", "resource", "marginX", "marginY", "cols", "rowHeight", "primaryKey", "columns", "itemOperations", "batchOperations", "isConditionFormLayout", "layout", "tabs", "pageSize", "layoutConfig"])).then((r) => !n && i(r)), () => n = !0;
|
||||
}, [e]), t;
|
||||
}, pr = (e, t = {}) => {
|
||||
}, gr = (e, t = {}) => {
|
||||
const [i, n] = N({ dataSource: [] });
|
||||
return Ue(() => {
|
||||
let r = !1;
|
||||
@ -243,11 +243,11 @@ const Yi = (e, t = {}) => H(() => e == null ? void 0 : e.map(({ widgetByJs: i, w
|
||||
}, Xi = (e, t, i = "id", n = null) => {
|
||||
const r = rt(), a = U(!1), s = U(e.dataSource), o = U(e.itemOperationsAccess);
|
||||
return L(() => (s.current = e.dataSource, o.current = e.itemOperationsAccess, () => a.current = !1), [e.dataSource, e.itemOperationsAccess]), a.current && (e.dataSource = s.current, e.itemOperationsAccess = o.current), [e, (l = 0, u = null) => {
|
||||
var g, p;
|
||||
if (a.current = !1, l === 1) return (g = e.onReload) == null ? void 0 : g.call(e);
|
||||
var p, g;
|
||||
if (a.current = !1, l === 1) return (p = e.onReload) == null ? void 0 : p.call(e);
|
||||
if (l === 2) {
|
||||
const f = c.get(u, "__PARENT_ID__", ""), m = c.get(u, i, c.get(u, [n, i], "")), h = c.findIndex(s.current, ["__PARENT_ID__", f]), C = c.findIndex(h > -1 ? c.get(s.current, [h, "children"]) : s.current, [i, m]);
|
||||
if (C === -1) return (p = e.onReload) == null ? void 0 : p.call(e);
|
||||
if (C === -1) return (g = e.onReload) == null ? void 0 : g.call(e);
|
||||
Promise.all([F.get(`/api/${t}/detail/${m}`), F.post(`/api/${t}/list-operations-access`, { ids: m })]).then(([w, v]) => {
|
||||
const $ = c.get(s.current, h > -1 ? [h, "children", C, "children"] : [C, "children"]);
|
||||
s.current = Kt(s.current, h > -1 ? { [h]: { children: { $splice: [[C, 1, { ...w, children: $ }]] } } } : { $splice: [[C, 1, { ...w, children: $ }]] });
|
||||
@ -265,8 +265,8 @@ const Yi = (e, t = {}) => H(() => e == null ? void 0 : e.map(({ widgetByJs: i, w
|
||||
}];
|
||||
}, Qi = (e, t) => {
|
||||
const i = rt(), n = U(t), r = U(/* @__PURE__ */ new Map()), a = U([]), s = c.throttle((l) => {
|
||||
a.current = [], F.list(e, c.pick({ ...n.current, ...l }, ["tab", "page", "pageSize", "condition", "sider", "keyword"])).then(({ keyword: u, condition: g, total: p, tab: f, sider: m, page: h, pageSize: C, operationsAccess: w, dataSource: v }) => {
|
||||
n.current = { tab: f, condition: g, sider: m, keyword: u, total: p, pageSize: C, page: v != null && v.length ? h : 1 }, a.current = v, r.current = new Map(w), i();
|
||||
a.current = [], F.list(e, c.pick({ ...n.current, ...l }, ["tab", "page", "pageSize", "condition", "sider", "keyword"])).then(({ keyword: u, condition: p, total: g, tab: f, sider: m, page: h, pageSize: C, operationsAccess: w, dataSource: v }) => {
|
||||
n.current = { tab: f, condition: p, sider: m, keyword: u, total: g, pageSize: C, page: v != null && v.length ? h : 1 }, a.current = v, r.current = new Map(w), i();
|
||||
});
|
||||
}, 380, { leading: !1, trailing: !0 });
|
||||
at(() => {
|
||||
@ -274,12 +274,12 @@ const Yi = (e, t = {}) => H(() => e == null ? void 0 : e.map(({ widgetByJs: i, w
|
||||
}, [e, t]);
|
||||
const o = H(() => c.pick(n.current, ["total", "tab", "page", "pageSize", "condition", "sider", "keyword"]), [n.current]);
|
||||
return Object.assign(o, { onTabChange: (l) => s({ tab: l, page: 1 }), onPageChange: (l, u) => s({ page: l, pageSize: u }), onPageSizeChange: (l) => s({ pageSize: l, page: 1 }), onConditionChange: (l, u) => s({ keyword: u, condition: Kt(n.current.condition || {}, { $merge: l || {} }), page: 1 }), onSiderChange: (l) => s({ sider: l, page: 1 }), onKeywordChange: (l) => s({ keyword: l, page: 1 }), itemOperationsAccess: r.current, dataSource: a.current, onReload: s });
|
||||
}, Zi = ({ listCode: e, className: t, layouts: i, dataSource: n, isPaginate: r, isItemOperations: a, isBatchOperations: s, batchOperations: o, itemOperations: l, itemOperationsAccess: u, resource: g, primaryKey: p, title: f, itemGridLayout: m, $setting: h, tabs: C, isConditionFormLayout: w, isTreeSider: v, treeSiderConfig: $ }) => {
|
||||
const { classNames: T, onClickCallback: z } = oe(ee), M = ni(l, u, p, g), q = Y((A, j, x) => d(en, { className: I("ff-data-list-framework-item", T.item), operations: a ? M(j) : [], data: g ? { [g]: j } : j, children: A, onClickCallback: z }), [g, p, a, z, l, u]);
|
||||
return O("div", { className: I("ff-data-list-framework", t), children: [d(i.sider, { isTreeSider: v, ...$ }), O("div", { className: I("ff-data-list-container", T == null ? void 0 : T.container), children: [d(i.filter, { isConditionFormLayout: w }), d(i.toolbar, { title: f, tabs: C }), d(gn, { ...m, style: { "--col-num": (h == null ? void 0 : h.colNum) || 1 }, primaryKey: p, itemRender: q, dataSource: n }), d(i.footer, { isPaginate: r, isOperations: s, operations: o })] })] });
|
||||
}, en = ({ className: e, operations: t, children: i, data: n, onClickCallback: r }) => O("div", { className: I("data-list-grid-layout-item-container", e), children: [i, !!(t != null && t.length) && d("div", { className: "data-list-grid-layout-item-actions", children: t.map((a) => d("span", { className: "data-list-grid-layout-item-action", children: d(P.Link, { uuid: a.uuid, type: a.type, name: a.name, widget: a.widget, widgetType: a.widgetType, widgetProps: a.widgetProps, widgetSetting: a.widgetSetting, widgetContainerProps: a.widgetContainerSetting, data: n, confirm: a.confirm, onAfterClick: (s) => s !== !1 && (r == null ? void 0 : r(a.isRefresh, n)) }, a.uuid || Le()) }, (a == null ? void 0 : a.uuid) || Le())) })] }), tn = ({ listCode: e, className: t, layouts: i, dataSource: n, columns: r, isItemOperations: a, isBatchOperations: s, batchOperations: o, itemOperations: l, itemOperationsAccess: u, resource: g, primaryKey: p, title: f, tabs: m, isPaginate: h, isTreeSider: C, treeSiderConfig: w, isConditionFormLayout: v, ...$ }) => {
|
||||
const { classNames: T, onClickCallback: z } = oe(ee), M = ni(l, u, p, g), q = ht(n, l, u, p, g);
|
||||
return O("div", { className: I("ff-data-table-framework", t), children: [d(i.sider, { isTreeSider: C, ...w }), O("div", { className: I("ff-data-table-container", T == null ? void 0 : T.container), children: [d(i.filter, { isConditionFormLayout: v }), d(i.toolbar, { title: f, tabs: m }), d(ln, { ...$, primaryKey: p, className: "ff-data-table-content", columns: r, dataSource: n, operationRender: q ? (A) => {
|
||||
}, Zi = ({ listCode: e, className: t, layouts: i, dataSource: n, isPaginate: r, isItemOperations: a, isBatchOperations: s, batchOperations: o, itemOperations: l, itemOperationsAccess: u, resource: p, primaryKey: g, title: f, itemGridLayout: m, $setting: h, tabs: C, isConditionFormLayout: w, isTreeSider: v, treeSiderConfig: $ }) => {
|
||||
const { classNames: T, onClickCallback: z } = oe(ee), M = ni(l, u, g, p), q = Y((A, j, x) => d(en, { className: I("ff-data-list-framework-item", T.item), operations: a ? M(j) : [], data: p ? { [p]: j } : j, children: A, onClickCallback: z }), [p, g, a, z, l, u]);
|
||||
return O("div", { className: I("ff-data-list-framework", t), children: [d(i.sider, { isTreeSider: v, ...$ }), O("div", { className: I("ff-data-list-container", T == null ? void 0 : T.container), children: [d(i.filter, { isConditionFormLayout: w }), d(i.toolbar, { title: f, tabs: C }), d(pn, { ...m, style: { "--col-num": (h == null ? void 0 : h.colNum) || 1 }, primaryKey: g, itemRender: q, dataSource: n }), d(i.footer, { isPaginate: r, isOperations: s, operations: o })] })] });
|
||||
}, en = ({ className: e, operations: t, children: i, data: n, onClickCallback: r }) => O("div", { className: I("data-list-grid-layout-item-container", e), children: [i, !!(t != null && t.length) && d("div", { className: "data-list-grid-layout-item-actions", children: t.map((a) => d("span", { className: "data-list-grid-layout-item-action", children: d(P.Link, { uuid: a.uuid, type: a.type, name: a.name, widget: a.widget, widgetType: a.widgetType, widgetProps: a.widgetProps, widgetSetting: a.widgetSetting, widgetContainerProps: a.widgetContainerSetting, data: n, confirm: a.confirm, onAfterClick: (s) => s !== !1 && (r == null ? void 0 : r(a.isRefresh, n)) }, a.uuid || Le()) }, (a == null ? void 0 : a.uuid) || Le())) })] }), tn = ({ listCode: e, className: t, layouts: i, dataSource: n, columns: r, isItemOperations: a, isBatchOperations: s, batchOperations: o, itemOperations: l, itemOperationsAccess: u, resource: p, primaryKey: g, title: f, tabs: m, isPaginate: h, isTreeSider: C, treeSiderConfig: w, isConditionFormLayout: v, ...$ }) => {
|
||||
const { classNames: T, onClickCallback: z } = oe(ee), M = ni(l, u, g, p), q = ht(n, l, u, g, p);
|
||||
return O("div", { className: I("ff-data-table-framework", t), children: [d(i.sider, { isTreeSider: C, ...w }), O("div", { className: I("ff-data-table-container", T == null ? void 0 : T.container), children: [d(i.filter, { isConditionFormLayout: v }), d(i.toolbar, { title: f, tabs: m }), d(ln, { ...$, primaryKey: g, className: "ff-data-table-content", columns: r, dataSource: n, operationRender: q ? (A) => {
|
||||
var j;
|
||||
return d("div", { className: "ff-data-table-actions", children: (j = M(A)) == null ? void 0 : j.map((x, E) => d(P.Link, { size: "small", uuid: x.uuid, type: x.type, name: x.name, widget: x.widget, widgetType: x.widgetType, widgetProps: x.widgetProps, widgetData: x.widgetData, widgetSetting: x.widgetSetting, widgetContainerProps: x.widgetContainerSetting, data: A, confirm: x.confirm, onAfterClick: (V) => V !== !1 && (z == null ? void 0 : z(x.isRefresh, A)) }, x.uuid || E)) });
|
||||
} : null }), d(i.footer, { isPaginate: h, isOperations: s, operations: o })] })] });
|
||||
@ -295,21 +295,21 @@ const Yi = (e, t = {}) => H(() => e == null ? void 0 : e.map(({ widgetByJs: i, w
|
||||
} }), ri = (e, t, i, n, r = {}, a = 0) => {
|
||||
const s = { "--grid-layout-h": `${n}`, "--grid-layout-w": `${i}`, "--grid-layout-x": `${e}`, "--grid-layout-y": `${t}`, "--grid-layout-row-height-offset": "0px" };
|
||||
return r != null && r.autoHeight ? s.height = "fit-content" : s["--grid-layout-row"] = `${n}`, r != null && r.alignItems && (s["--grid-layout-box-align-items"] = r.alignItems), r != null && r.justifyContent && (s["--grid-layout-box-justify-content"] = r.justifyContent), s["--grid-layout-box-margin"] = It(r == null ? void 0 : r.marginTop, r == null ? void 0 : r.marginRight, r == null ? void 0 : r.marginBottom, r == null ? void 0 : r.marginLeft), s["--grid-layout-box-padding"] = It(r == null ? void 0 : r.paddingTop, r == null ? void 0 : r.paddingRight, r == null ? void 0 : r.paddingBottom, r == null ? void 0 : r.paddingLeft), a && (s.height = `${a}px`), s;
|
||||
}, It = (e, t, i, n) => `${e || 0}px ${t || 0}px ${i || 0}px ${n || 0}px`, gr = (e = "Text", t = "@pkg/ff/grid-layouts") => e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`, ai = ({ className: e, isConditionFormLayout: t }) => {
|
||||
}, It = (e, t, i, n) => `${e || 0}px ${t || 0}px ${i || 0}px ${n || 0}px`, pr = (e = "Text", t = "@pkg/ff/grid-layouts") => e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`, ai = ({ className: e, isConditionFormLayout: t }) => {
|
||||
var f, m;
|
||||
const [i, n] = N({}), { listCode: r, onKeywordChange: a, onConditionChange: s, getBase62params: o, classNames: l } = k.useContext(ee), { keyword: u, condition: g } = (o == null ? void 0 : o()) || {}, [p] = Ge.useForm();
|
||||
const [i, n] = N({}), { listCode: r, onKeywordChange: a, onConditionChange: s, getBase62params: o, classNames: l } = k.useContext(ee), { keyword: u, condition: p } = (o == null ? void 0 : o()) || {}, [g] = Ge.useForm();
|
||||
return L(() => {
|
||||
r && t && F.get(`/api/_/${r}/list-condition-form-layout`).then(({ resource: h, marginX: C, marginY: w, rowHeight: v, cols: $, fields: T }) => {
|
||||
n({ resource: h, itemMargin: [C, w], rowHeight: v, cols: $, fields: T });
|
||||
}).catch(() => n({}));
|
||||
}, [r, t]), L(() => {
|
||||
p.setFieldsValue({ keyword: u, ...g });
|
||||
}, [JSON.stringify([u, g])]), d("div", { className: I("ff-data-list-filter", l.filter, e), children: d(Ge, { form: p, layout: "vertical", autoComplete: "off", onFinish: ((f = i.fields) == null ? void 0 : f.length) > 1 ? (h) => s({ [i.resource]: h[i.resource] }, h.keyword) : () => {
|
||||
g.setFieldsValue({ keyword: u, ...p });
|
||||
}, [JSON.stringify([u, p])]), d("div", { className: I("ff-data-list-filter", l.filter, e), children: d(Ge, { form: g, layout: "vertical", autoComplete: "off", onFinish: ((f = i.fields) == null ? void 0 : f.length) > 1 ? (h) => s({ [i.resource]: h[i.resource] }, h.keyword) : () => {
|
||||
}, onValuesChange: (h) => {
|
||||
c.isEmpty(c.omit(h, ["keyword"])) || p.submit();
|
||||
c.isEmpty(c.omit(h, ["keyword"])) || g.submit();
|
||||
}, children: ((m = i.fields) == null ? void 0 : m.length) > 1 ? d(Pt, { ...i, children: d(nn, { onReset: () => {
|
||||
const { keyword: h, condition: C } = o("init") || {};
|
||||
p.setFieldsValue({ keyword: h, ...C });
|
||||
g.setFieldsValue({ keyword: h, ...C });
|
||||
} }) }) : d("div", { className: "ff-data-list-filter-default-form ff-grid-layout-form", children: d("div", { className: "grid-layout-item", style: ri(20, 0, 5, 2), children: d(Ge.Item, { name: ["keyword"], children: d(Ni.Search, { allowClear: !0, enterButton: "搜索", placeholder: "多关键字 | 分割", onSearch: (h) => a(h) }) }) }) }) }) });
|
||||
}, nn = ({ cols: e, fields: t, onReset: i }) => {
|
||||
const [n, r] = N(!1), a = H(() => t == null ? void 0 : t.toReversed().some((s) => s.y > 1 || s.x + s.w >= e - 5), [e, t]);
|
||||
@ -317,15 +317,15 @@ const Yi = (e, t = {}) => H(() => e == null ? void 0 : e.map(({ widgetByJs: i, w
|
||||
};
|
||||
ai.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 rn = ({ className: e, operations: t, isOperations: i, isPaginate: n }) => {
|
||||
const { onPageChange: r, onPageSizeChange: a, onClickCallback: s, getBase62params: o } = k.useContext(ee), { total: l, page: u, pageSize: g } = (o == null ? void 0 : o()) || {};
|
||||
return i && !c.isEmpty(t) || n ? O("div", { className: I("ff-data-list-footer", e), children: [d("div", { className: "ff-data-list-actions", children: t == null ? void 0 : t.map((p, f) => d(P, { uuid: p.uuid, type: p.type, name: p.name, widget: p.widget, widgetType: p.widgetType, widgetProps: p.widgetProps, widgetData: p.widgetData, widgetSetting: p.widgetSetting, widgetContainerProps: p.widgetContainerSetting, onAfterClick: (m) => m !== !1 && (s == null ? void 0 : s(p.isRefresh, null)) }, p.uuid || f)) }), n && d(Ri, { size: "small", total: l, pageSize: g, showSizeChanger: !1, showTotal: (p) => `第 ${u} 页 / 总共 ${p} 条`, onChange: r, onShowSizeChange: a })] }) : null;
|
||||
const { onPageChange: r, onPageSizeChange: a, onClickCallback: s, getBase62params: o } = k.useContext(ee), { total: l, page: u, pageSize: p } = (o == null ? void 0 : o()) || {};
|
||||
return i && !c.isEmpty(t) || n ? O("div", { className: I("ff-data-list-footer", e), children: [d("div", { className: "ff-data-list-actions", children: t == null ? void 0 : t.map((g, f) => d(P, { 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: (m) => m !== !1 && (s == null ? void 0 : s(g.isRefresh, null)) }, g.uuid || f)) }), n && d(Ri, { size: "small", total: l, pageSize: p, showSizeChanger: !1, showTotal: (g) => `第 ${u} 页 / 总共 ${g} 条`, onChange: r, onShowSizeChange: a })] }) : null;
|
||||
}, an = [{ 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" }] }] }], sn = ({ className: e, width: t = 280, isTreeSider: i }) => {
|
||||
const { classNames: n } = oe(ee);
|
||||
return i ? d(Ei.DirectoryTree, { className: I("ff-data-list-sider", n.sider, e), style: { "--sider-width": t }, showLine: !0, showIcon: !1, treeData: an }) : null;
|
||||
}, on = ({ className: e, title: t, tabs: i }) => {
|
||||
const { getBase62params: n, onTabChange: r, onReload: a, classNames: s } = oe(ee), { tab: o } = (n == null ? void 0 : n()) || {}, [l, u] = Ii((i == null ? void 0 : i[0].value) ?? (i == null ? void 0 : i[0].code), { value: o, onChange: r });
|
||||
return O("div", { className: I("ff-data-list-toolbar", s.toolbar, e), children: [d("div", { className: "ff-data-list-title", children: t }), d(Fi, { className: "ff-data-list-tabs", itemRender: ({ label: g, code: p, value: f }) => d("span", { onClick: () => u(f ?? p), className: I("ff-data-list-tab", { active: (f ?? p) == l }), children: g }), items: i }), O("div", { className: "ff-data-list-actions", children: [d(P.Link, { icon: "icon-reload", widget: () => a() }), d(P.Link, { icon: "icon-setting" })] })] });
|
||||
}, si = ({ isItemGridLayout: e, theme: t, themeProps: i, onClickCallback: n, onReload: r, listCode: a, total: s = 0, page: o = 0, onPageChange: l, pageSize: u = 30, onPageSizeChange: g, tab: p, onTabChange: f, keyword: m, onKeywordChange: h, condition: C, onConditionChange: w, sider: v, onSiderChange: $, layouts: T, classNames: z = {}, ...M }) => {
|
||||
return O("div", { className: I("ff-data-list-toolbar", s.toolbar, e), children: [d("div", { className: "ff-data-list-title", children: t }), d(Fi, { className: "ff-data-list-tabs", itemRender: ({ label: p, code: g, value: f }) => d("span", { onClick: () => u(f ?? g), className: I("ff-data-list-tab", { active: (f ?? g) == l }), children: p }), items: i }), O("div", { className: "ff-data-list-actions", children: [d(P.Link, { icon: "icon-reload", widget: () => a() }), d(P.Link, { icon: "icon-setting" })] })] });
|
||||
}, si = ({ isItemGridLayout: e, theme: t, themeProps: i, onClickCallback: n, onReload: r, listCode: a, total: s = 0, page: o = 0, onPageChange: l, pageSize: u = 30, onPageSizeChange: p, tab: g, onTabChange: f, keyword: m, onKeywordChange: h, condition: C, onConditionChange: w, sider: v, onSiderChange: $, layouts: T, classNames: z = {}, ...M }) => {
|
||||
const [q, A] = N(), j = H(() => {
|
||||
let x = { sider: sn, filter: ai, footer: rn, toolbar: on };
|
||||
T === !1 ? x = { sider: null, filter: null, footer: null, toolbar: null } : c.isPlainObject(T) && (x = Object.assign({}, x, T));
|
||||
@ -343,9 +343,9 @@ const rn = ({ className: e, operations: t, isOperations: i, isPaginate: n }) =>
|
||||
return x;
|
||||
}).catch((x) => ({ default: () => `${x}` })).then((x) => A(k.createElement(x.default, { ...M, layouts: j, $setting: i }))) : A(d(e ? Zi : tn, { ...M, layouts: j, $setting: i }));
|
||||
}, [t, i]), d(ee.Provider, { value: { classNames: z, listCode: a, onClickCallback: n, onReload: r, getBase62params: (x, E) => {
|
||||
const V = { tab: p, page: o, pageSize: u, keyword: m, sider: v, condition: C, total: s };
|
||||
const V = { tab: g, page: o, pageSize: u, keyword: m, sider: v, condition: C, total: s };
|
||||
return x && x != "init" ? V[x] ?? E : V;
|
||||
}, onPageChange: l, onPageSizeChange: g, onTabChange: f, onSiderChange: $, onKeywordChange: h, onConditionChange: w }, children: q && k.cloneElement(q, M) });
|
||||
}, onPageChange: l, onPageSizeChange: p, onTabChange: f, onSiderChange: $, onKeywordChange: h, onConditionChange: w }, children: q && k.cloneElement(q, M) });
|
||||
};
|
||||
si.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 me, de, ve, it;
|
||||
@ -373,19 +373,19 @@ const ne = class ne {
|
||||
me = new WeakMap(), de = new WeakMap(), ve = new WeakMap(), it = new WeakMap(), R(ne, me, null), S(ne, "getInstance", () => (y(ne, me) || B(ne, me, new ne()), y(ne, me)));
|
||||
let ft = ne;
|
||||
const oi = ft.getInstance(), St = k.forwardRef(({ listCode: e, base62params: t, className: i, theme: n, themeProps: r, layouts: a, classNames: s }, o) => {
|
||||
const [{ resource: l, primaryKey: u, batchOperations: g = [], itemOperations: p = [], columns: f = [], themeConfig: m, theme: h, isConditionFormLayout: C = !1, isTreeSider: w, treeSiderConfig: v, isItemGridLayout: $, itemGridLayout: T, title: z, isPaginate: M, tabs: q }, A] = N({ isItemGridLayout: !1, itemGridLayout: {} }), j = Qi(e, t), [{ dataSource: x, itemOperationsAccess: E, condition: V, tab: W, keyword: le, page: Se, total: K, pageSize: st, sider: He, onConditionChange: ot, onTabChange: Rt, onKeywordChange: yi, onPageChange: wi, onPageSizeChange: bi, onSiderChange: Ci, onReload: lt }, Et] = Xi(j, e, u, l), ki = ht(p, x, E, u), xi = ht(g);
|
||||
const [{ resource: l, primaryKey: u, batchOperations: p = [], itemOperations: g = [], columns: f = [], themeConfig: m, theme: h, isConditionFormLayout: C = !1, isTreeSider: w, treeSiderConfig: v, isItemGridLayout: $, itemGridLayout: T, title: z, isPaginate: M, tabs: q }, A] = N({ isItemGridLayout: !1, itemGridLayout: {} }), j = Qi(e, t), [{ dataSource: x, itemOperationsAccess: E, condition: V, tab: W, keyword: le, page: Se, total: K, pageSize: st, sider: He, onConditionChange: ot, onTabChange: Rt, onKeywordChange: yi, onPageChange: wi, onPageSizeChange: bi, onSiderChange: Ci, onReload: lt }, Et] = Xi(j, e, u, l), ki = ht(g, x, E, u), xi = ht(p);
|
||||
return L(() => {
|
||||
let Ke = null;
|
||||
return e && F.get(`/api/_/${e}`).resp(({ data: Je, res: vi }) => {
|
||||
Je != null && Je.isDynamicRefresh && (Ke = oi.subscribe(() => lt(), vi)), A(Je);
|
||||
}).catch(() => A({})), () => Ke == null ? void 0 : Ke();
|
||||
}, [e]), k.useImperativeHandle(o, () => ({ onReload: lt, onClickCallback: Et })), d(si, { listCode: e, title: z, classNames: s, layouts: a, resource: l, primaryKey: u, theme: n || h, themeProps: r || m, isTreeSider: w, treeSiderConfig: v, isPaginate: M, tabs: q, isItemOperations: ki, isBatchOperations: xi, batchOperations: g, itemOperations: p, isItemGridLayout: $, columns: f, itemGridLayout: T, isConditionFormLayout: C, itemOperationsAccess: E, dataSource: x, onConditionChange: ot, onTabChange: Rt, onKeywordChange: yi, onPageChange: wi, onPageSizeChange: bi, onSiderChange: Ci, condition: V, tab: W, keyword: le, page: Se, total: K, pageSize: st, sider: He, className: I("ff-data-list-helper", i), onReload: lt, onClickCallback: Et });
|
||||
}, [e]), k.useImperativeHandle(o, () => ({ onReload: lt, onClickCallback: Et })), d(si, { listCode: e, title: z, classNames: s, layouts: a, resource: l, primaryKey: u, theme: n || h, themeProps: r || m, isTreeSider: w, treeSiderConfig: v, isPaginate: M, tabs: q, isItemOperations: ki, isBatchOperations: xi, batchOperations: p, itemOperations: g, isItemGridLayout: $, columns: f, itemGridLayout: T, isConditionFormLayout: C, itemOperationsAccess: E, dataSource: x, onConditionChange: ot, onTabChange: Rt, onKeywordChange: yi, onPageChange: wi, onPageSizeChange: bi, onSiderChange: Ci, condition: V, tab: W, keyword: le, page: Se, total: K, pageSize: st, sider: He, className: I("ff-data-list-helper", i), onReload: lt, onClickCallback: Et });
|
||||
}), li = (e, t, i = !0) => i !== !0 && i-- <= 0 ? [] : c.isArray(e) && !c.isEmpty(e) ? e.reduce((n, r) => (Reflect.has(r, t) && Reflect.has(r, "children") && n.push(r[t]), Reflect.has(r, "children") && !c.isEmpty(r.children) ? n.concat(li(r.children, t, i)) : n), []) : [], ln = ({ className: e, primaryKey: t, columns: i = [], dataSource: n = [], operationRender: r, operationWidth: a = 180, ...s }) => {
|
||||
const { classNames: o } = oe(ee);
|
||||
Le();
|
||||
const l = U(null), u = U(null), [g, p] = N([]), [f, m] = N({ width: 0, height: 0 });
|
||||
const l = U(null), u = U(null), [p, g] = N([]), [f, m] = N({ width: 0, height: 0 });
|
||||
L(() => {
|
||||
p(li(n, t));
|
||||
g(li(n, t));
|
||||
}, [n, t]), $i(() => {
|
||||
const C = new ResizeObserver(() => {
|
||||
var w;
|
||||
@ -396,37 +396,37 @@ const oi = ft.getInstance(), St = k.forwardRef(({ listCode: e, base62params: t,
|
||||
};
|
||||
}, []);
|
||||
const h = Yi(i);
|
||||
return d("div", { ref: u, className: I("ff-data-list-table", o.content, e), children: f.height ? d(Oi, { ...s, ref: l, rowKey: (C) => (C == null ? void 0 : C[t]) ?? Math.random(), columns: h == null ? void 0 : h.concat(r ? [{ title: "操作", align: "center", fixed: "right", width: `${Math.ceil(a / f.width * 100).toFixed(2)}%`, render: (C, w, v) => r(w, v) }] : []), dataSource: n, size: "middle", scroll: { x: "max-content", y: f.height - 50 }, pagination: !1, expandable: { defaultExpandAllRows: !0, expandRowByClick: !0, onExpandedRowsChange: p, expandedRowKeys: g } }) : null });
|
||||
return d("div", { ref: u, className: I("ff-data-list-table", o.content, e), children: f.height ? d(Oi, { ...s, ref: l, rowKey: (C) => (C == null ? void 0 : C[t]) ?? Math.random(), columns: h == null ? void 0 : h.concat(r ? [{ title: "操作", align: "center", fixed: "right", width: `${Math.ceil(a / f.width * 100).toFixed(2)}%`, render: (C, w, v) => r(w, v) }] : []), dataSource: n, size: "middle", scroll: { x: "max-content", y: f.height - 50 }, pagination: !1, expandable: { defaultExpandAllRows: !0, expandRowByClick: !0, onExpandedRowsChange: g, expandedRowKeys: p } }) : null });
|
||||
}, cn = "RC_FORM_INTERNAL_HOOKS", dn = (e, { initialValue: t, initialValueLanguage: i, convertJs: n, convertJsSetting: r, type: a = "string" }, s = null) => {
|
||||
const o = U(!1), l = oe(Jt), [u, g] = N(), [p, f] = N(i != "javascript" && e ? l.getFieldValue(e) : void 0), { registerWatch: m } = l.getInternalHooks(cn) || {};
|
||||
const o = U(!1), l = oe(Jt), [u, p] = N(), [g, f] = N(i != "javascript" && e ? l.getFieldValue(e) : void 0), { registerWatch: m } = l.getInternalHooks(cn) || {};
|
||||
return L(() => m == null ? void 0 : m((h, C, w) => {
|
||||
if (!o.current) return;
|
||||
const v = c.get(C, e);
|
||||
c.isEqual(v, p) || f(Q(v, a));
|
||||
}), [p]), L(() => {
|
||||
c.isEqual(v, g) || f(Q(v, a));
|
||||
}), [g]), L(() => {
|
||||
i == "javascript" && t ? Ce.exec(t, {}, { getFieldValueForBasicForm: (h) => s ? s.getFieldValue(h) : l.getFieldValue(h), getFieldValue: (h) => l.getFieldValue(h) }).then((h) => f(Q(h, a))).catch((h) => notification.error({ message: `布局数据错误: ${JSON.stringify(h)}` })).finally(() => o.current = !0) : (t && f(Q(t ?? l.getFieldValue(e), a)), o.current = !0);
|
||||
}, [t, i]), Ue(() => {
|
||||
o.current && n && new Qe([n, r]).toValue(p, l.getFieldsValue(!0)).then(g).catch((h) => {
|
||||
g(h), console.error("布局数据转换错误: ", h, n);
|
||||
o.current && n && new Qe([n, r]).toValue(g, l.getFieldsValue(!0)).then(p).catch((h) => {
|
||||
p(h), console.error("布局数据转换错误: ", h, n);
|
||||
});
|
||||
}, [p, n, r]), [u ?? p, p];
|
||||
}, [g, n, r]), [u ?? g, g];
|
||||
}, ci = (e, t, i = null) => H(() => {
|
||||
var n;
|
||||
return (n = c.sortBy(e, ["y", "x"])) == null ? void 0 : n.map(({ i: r, x: a, y: s, w: o, h: l, field: { boxStyle: u, ...g } }, p) => d("div", { className: "grid-layout-item", style: ri(a, s, o, l, u), children: d(t, { ...g, basicForm: i }) }, r ?? p));
|
||||
return (n = c.sortBy(e, ["y", "x"])) == null ? void 0 : n.map(({ i: r, x: a, y: s, w: o, h: l, field: { boxStyle: u, ...p } }, g) => d("div", { className: "grid-layout-item", style: ri(a, s, o, l, u), children: d(t, { ...p, basicForm: i }) }, r ?? g));
|
||||
}, [e]), un = ({ widget: e, widgetPrefix: t = "@pkg/ff/grid-layouts", basicForm: i, ...n }) => {
|
||||
const r = e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`, [a, s] = N();
|
||||
return L(() => {
|
||||
r && se.getWidgetComponent(r).then(({ defaultProps: o = {}, default: l }) => ({ default: pn(l, o, i) })).catch((o) => ({ default: () => `${o}` })).then((o) => s(k.createElement(o.default, n)));
|
||||
r && se.getWidgetComponent(r).then(({ defaultProps: o = {}, default: l }) => ({ default: gn(l, o, i) })).catch((o) => ({ default: () => `${o}` })).then((o) => s(k.createElement(o.default, n)));
|
||||
}, [r]), a;
|
||||
}, pn = (e, t = {}, i = null) => (n) => {
|
||||
const { code: r, label: a, extras: s, isVirtual: o, initialValue: l, initialValueLanguage: u, convertJs: g, convertJsSetting: p, value: f, ...m } = c.merge({}, t, n), [h, C] = dn(o ? null : r, { initialValue: l, initialValueLanguage: u, convertJs: g, convertJsSetting: p, type: (m == null ? void 0 : m.type) || "string" }, i), w = H(() => {
|
||||
}, gn = (e, t = {}, i = null) => (n) => {
|
||||
const { code: r, label: a, extras: s, isVirtual: o, initialValue: l, initialValueLanguage: u, convertJs: p, convertJsSetting: g, value: f, ...m } = c.merge({}, t, n), [h, C] = dn(o ? null : r, { initialValue: l, initialValueLanguage: u, convertJs: p, convertJsSetting: g, type: (m == null ? void 0 : m.type) || "string" }, i), w = H(() => {
|
||||
const T = Object.keys((t == null ? void 0 : t.extras) || {});
|
||||
return c.over([c.partialRight(c.pick, T), c.partialRight(c.omit, T)]);
|
||||
}, [t == null ? void 0 : t.extras]), [v, $] = w(m);
|
||||
return d(e, { ...$, value: h, rawValue: C, $setting: Object.assign({}, s, v) });
|
||||
}, di = ({ className: e, cols: t = 12, rowHeight: i = 21, containerPadding: n = [0, 0], itemMargin: r = [4, 0], formProps: a = {}, fields: s = [], data: o, basicForm: l = null, ...u }) => {
|
||||
const [g] = Z.useForm(), p = ci(s, un, l), f = H(() => [{ name: "__PROPS__", value: a }], [a]);
|
||||
return Ue(() => (g.setFieldsValue(o), () => g.resetFields()), [o]), d(Z, { fields: f, form: g, component: !1, children: d("div", { ...u, className: I("ff-grid-layout", e), style: { "--grid-layout-item-margin-y": `${(r == null ? void 0 : r[0]) || 0}px`, "--grid-layout-item-margin-x": `${(r == null ? void 0 : r[1]) || 0}px`, "--grid-layout-container-padding-y": `${(n == null ? void 0 : n[0]) || 0}px`, "--grid-layout-container-padding-x": `${(n == null ? void 0 : n[1]) || 0}px`, "--grid-layout-cols": t, "--grid-layout-row-height": `${i}px` }, children: p }) });
|
||||
const [p] = Z.useForm(), g = ci(s, un, l), f = H(() => [{ name: "__PROPS__", value: a }], [a]);
|
||||
return Ue(() => (p.setFieldsValue(o), () => p.resetFields()), [o]), d(Z, { fields: f, form: p, component: !1, children: d("div", { ...u, className: I("ff-grid-layout", e), style: { "--grid-layout-item-margin-y": `${(r == null ? void 0 : r[0]) || 0}px`, "--grid-layout-item-margin-x": `${(r == null ? void 0 : r[1]) || 0}px`, "--grid-layout-container-padding-y": `${(n == null ? void 0 : n[0]) || 0}px`, "--grid-layout-container-padding-x": `${(n == null ? void 0 : n[1]) || 0}px`, "--grid-layout-cols": t, "--grid-layout-row-height": `${i}px` }, children: g }) });
|
||||
}, mr = (Mt = di, function({ code: e, data: t, ...i }) {
|
||||
const [n, r] = N({ resource: null, cols: 12, rowHeight: 21, fields: [] });
|
||||
return L(() => {
|
||||
@ -434,9 +434,9 @@ const oi = ft.getInstance(), St = k.forwardRef(({ listCode: e, base62params: t,
|
||||
}, [e]), (n == null ? void 0 : n.resource) && d(Mt, { ...i, rowHeight: n.rowHeight, cols: n.cols, fields: n.fields, data: n != null && n.resource ? { [n == null ? void 0 : n.resource]: t } : {} });
|
||||
});
|
||||
var Mt;
|
||||
const gn = ({ cols: e, rowHeight: t, itemMargin: i, fields: n, primaryKey: r, dataSource: a, itemClassName: s, itemRender: o = (p, f, m) => p, empty: l = d(Li, { description: null }), className: u, style: g = {} }) => {
|
||||
const { classNames: p } = oe(ee), f = Le(), m = H(() => d(di, { cols: e, rowHeight: t, itemMargin: i, fields: n, className: s }), [n, e, t, i]);
|
||||
return d("div", { className: I("ff-data-list-content", p.content, u), style: g, children: c.isEmpty(a) ? l : a.map((h, C) => {
|
||||
const pn = ({ cols: e, rowHeight: t, itemMargin: i, fields: n, primaryKey: r, dataSource: a, itemClassName: s, itemRender: o = (g, f, m) => g, empty: l = d(Li, { description: null }), className: u, style: p = {} }) => {
|
||||
const { classNames: g } = oe(ee), f = Le(), m = H(() => d(di, { cols: e, rowHeight: t, itemMargin: i, fields: n, className: s }), [n, e, t, i]);
|
||||
return d("div", { className: I("ff-data-list-content", g.content, u), style: p, children: c.isEmpty(a) ? l : a.map((h, C) => {
|
||||
const w = o(k.cloneElement(m, { data: h }), h, C);
|
||||
return k.cloneElement(w, { key: `${f}-${(h == null ? void 0 : h[r]) || C}` });
|
||||
}) });
|
||||
@ -517,9 +517,9 @@ const re = class re {
|
||||
if (y(this, X).size == 0) return null;
|
||||
const i = Ae.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/ff/frameworks/DefaultTheme"), n = Ae.get(se.checkUserToken() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"), r = { [i]: 0 }, a = (o, l) => () => se.getWidgetComponent(o).then((u) => u.default || function() {
|
||||
return `${o}`;
|
||||
}).then((u) => ({ Component: () => k.createElement(Yt, {}, k.createElement(u, l)) })), s = Array.from(y(this, X).values()).reduce((o, { uuid: l, uri: u, name: g, type: p, component: f, widgetSetting: m, isLogin: h, isLayout: C, extra: w }) => {
|
||||
}).then((u) => ({ Component: () => k.createElement(Yt, {}, k.createElement(u, l)) })), s = Array.from(y(this, X).values()).reduce((o, { uuid: l, uri: u, name: p, type: g, component: f, widgetSetting: m, isLogin: h, isLayout: C, extra: w }) => {
|
||||
let v = {}, $ = 0;
|
||||
switch (p) {
|
||||
switch (g) {
|
||||
case "list":
|
||||
v.element = k.createElement(mn, { component: f });
|
||||
break;
|
||||
@ -556,10 +556,10 @@ const D = class D {
|
||||
else if (a === "util") try {
|
||||
const u = c.get(zt, n.split("/")) || c.get(y(D, Re).get(i), n.split("/"));
|
||||
if (!c.isFunction(u)) throw `${n} not found`;
|
||||
Promise.resolve(Reflect.apply(u, void 0, r)).then((g) => {
|
||||
Pe.postMessage({ id: t, task_id: i, category: a, method: n, args: r, session: l, data: g, error: null });
|
||||
}).catch((g) => {
|
||||
Pe.postMessage({ id: t, task_id: i, category: a, method: n, args: r, session: l, data: null, error: g });
|
||||
Promise.resolve(Reflect.apply(u, void 0, r)).then((p) => {
|
||||
Pe.postMessage({ id: t, task_id: i, category: a, method: n, args: r, session: l, data: p, error: null });
|
||||
}).catch((p) => {
|
||||
Pe.postMessage({ id: t, task_id: i, category: a, method: n, args: r, session: l, data: null, error: p });
|
||||
});
|
||||
} catch (u) {
|
||||
Pe.postMessage({ id: t, task_id: i, category: a, method: n, args: r, session: l, data: null, error: u });
|
||||
@ -594,10 +594,10 @@ const Ce = wt.getInstance(), rt = () => {
|
||||
for (let n = 0; n < e.length; n++) e[n].value = Q((i = e[n]) == null ? void 0 : i.value, t), e[n] && Reflect.has(e[n], "children") && (e[n].children = ui(e[n].children, t));
|
||||
return e;
|
||||
}, yr = (e, t = "json", i = "string", n, r = null) => {
|
||||
const [a] = Z.useForm(n), [s, o] = N([{ label: "无", value: "", disabled: !0 }]), l = U([]), u = Z.useWatch((g) => l.current.length === 0 ? null : c.pick(g, l.current), a) || null;
|
||||
const [a] = Z.useForm(n), [s, o] = N([{ label: "无", value: "", disabled: !0 }]), l = U([]), u = Z.useWatch((p) => l.current.length === 0 ? null : c.pick(p, l.current), a) || null;
|
||||
return L(() => {
|
||||
Array.isArray(e) ? o(e) : t === "javascript" && e ? Ce.exec(e, {}, { getFieldValue: (g) => (l.current.includes(g) || l.current.push(g), a.getFieldValue(g)), getFieldValueForBasicForm: (g) => (l.current.includes(g) || l.current.push(g), r ? r.getFieldValue(g) : a.getFieldValue(g)) }).then((g) => {
|
||||
o(Q(g, "array"));
|
||||
Array.isArray(e) ? o(e) : t === "javascript" && e ? Ce.exec(e, {}, { getFieldValue: (p) => (l.current.includes(p) || l.current.push(p), a.getFieldValue(p)), getFieldValueForBasicForm: (p) => (l.current.includes(p) || l.current.push(p), r ? r.getFieldValue(p) : a.getFieldValue(p)) }).then((p) => {
|
||||
o(Q(p, "array"));
|
||||
}) : e && o(Q(e, "array"));
|
||||
}, [e, t, u]), ui(s, i);
|
||||
}, wr = (e) => {
|
||||
@ -613,15 +613,15 @@ const Ce = wt.getInstance(), rt = () => {
|
||||
}, wn = (e) => {
|
||||
const [t, i] = k.useState({ gridItems: [], hideItems: [] });
|
||||
return k.useEffect(() => {
|
||||
e && F.get(`/api/_/${e}`).then(({ pk: n, uuid: r, code: a, resource: s, align: o, cols: l, rowHeight: u, marginX: g, marginY: p, listenChangeFields: f, listenChangeFieldsFunc: m, fields: h }) => ({ pk: n, uuid: r, code: a, resource: s, align: o, cols: l, rowHeight: u, marginX: g, marginY: p, listenChangeFields: f, listenChangeFieldsFunc: m, ...h.reduce((C, w) => {
|
||||
e && F.get(`/api/_/${e}`).then(({ pk: n, uuid: r, code: a, resource: s, align: o, cols: l, rowHeight: u, marginX: p, marginY: g, listenChangeFields: f, listenChangeFieldsFunc: m, fields: h }) => ({ pk: n, uuid: r, code: a, resource: s, align: o, cols: l, rowHeight: u, marginX: p, marginY: g, listenChangeFields: f, listenChangeFieldsFunc: m, ...h.reduce((C, w) => {
|
||||
var v;
|
||||
return (v = w == null ? void 0 : w.field) != null && v.hidden ? C.hides.push(w == null ? void 0 : w.field) : C.items.push(w), C;
|
||||
}, { items: [], hides: [] }) })).then(i);
|
||||
}, [e]), t;
|
||||
}, bn = ({ max: e = 0, min: t = 0, type: i = "", message: n, pattern: r, required: a = !1, validator: s } = {}, o, l) => {
|
||||
const [u, g] = N([]);
|
||||
const [u, p] = N([]);
|
||||
return L(() => {
|
||||
const p = [];
|
||||
const g = [];
|
||||
if (a) {
|
||||
let f = l;
|
||||
switch (l) {
|
||||
@ -635,22 +635,22 @@ const Ce = wt.getInstance(), rt = () => {
|
||||
case "json":
|
||||
f = "object";
|
||||
}
|
||||
p.push({ type: f, required: !0, whitespace: !0, message: "该项必填" });
|
||||
g.push({ type: f, required: !0, whitespace: !0, message: "该项必填" });
|
||||
}
|
||||
switch (i) {
|
||||
case "string":
|
||||
p.push({ type: i, max: e, min: t, message: n || (t && e ? `字符必须在 ${t} ~ ${e} 之间` : `${e ? "最多能有" : "最少要有"} ${t || e} 个字符`) });
|
||||
g.push({ type: i, max: e, min: t, message: n || (t && e ? `字符必须在 ${t} ~ ${e} 之间` : `${e ? "最多能有" : "最少要有"} ${t || e} 个字符`) });
|
||||
break;
|
||||
case "pattern":
|
||||
p.push({ type: "string", pattern: r, message: n });
|
||||
g.push({ type: "string", pattern: r, message: n });
|
||||
break;
|
||||
case "validator":
|
||||
s && p.push(({ getFieldValue: f }) => ({ validator: async (m, h) => {
|
||||
s && g.push(({ getFieldValue: f }) => ({ validator: async (m, h) => {
|
||||
const C = await Ce.exec(s, { value: h, fieldName: o }, { getFieldValue: f });
|
||||
return c.isString(C) && C ? Promise.reject(C) : c.isBoolean(C) && !C ? Promise.reject(n) : Promise.resolve();
|
||||
} }));
|
||||
}
|
||||
g(p);
|
||||
p(g);
|
||||
}, [e, t, i, n, r, a, s]), u;
|
||||
}, Cn = (e, t, i) => {
|
||||
const [n, r] = N(null);
|
||||
@ -660,21 +660,21 @@ const Ce = wt.getInstance(), rt = () => {
|
||||
r(o);
|
||||
});
|
||||
}, [e, t, i]), n;
|
||||
}, pi = (e, t, i = {}, n = {}, r = {}) => {
|
||||
const a = oe(Jt), s = rt(), o = U(!0), l = U([]), [u, g] = N(t), p = Z.useWatch((f) => JSON.stringify(c.pick(f, l.current)), a) || "{}";
|
||||
}, gi = (e, t, i = {}, n = {}, r = {}) => {
|
||||
const a = oe(Jt), s = rt(), o = U(!0), l = U([]), [u, p] = N(t), g = Z.useWatch((f) => JSON.stringify(c.pick(f, l.current)), a) || "{}";
|
||||
return at(() => {
|
||||
e && Ce.exec(e, i, { ...n, getFieldValueForBasicForm: (f) => r ? r.getFieldValue(f) : null, getFieldValue: c.wrap(a.getFieldValue, (f, m) => (l.current.some((h) => c.isEqual(h, m)) || (l.current.push(m), s()), f == null ? void 0 : f(m))), isFieldTouched: a.isFieldTouched, isFieldsTouched: a.isFieldsTouched }).then((f) => o.current && g(f));
|
||||
}, [e, p, a, i, n]), L(() => () => o.current = !1, []), u;
|
||||
e && Ce.exec(e, i, { ...n, getFieldValueForBasicForm: (f) => r ? r.getFieldValue(f) : null, getFieldValue: c.wrap(a.getFieldValue, (f, m) => (l.current.some((h) => c.isEqual(h, m)) || (l.current.push(m), s()), f == null ? void 0 : f(m))), isFieldTouched: a.isFieldTouched, isFieldsTouched: a.isFieldsTouched }).then((f) => o.current && p(f));
|
||||
}, [e, g, a, i, n]), L(() => () => o.current = !1, []), u;
|
||||
}, kn = (e, t, i = [], n = {}) => {
|
||||
const r = U({});
|
||||
if (!t) return [e, r.current];
|
||||
const a = U(), s = c.debounce(rt(), 180), o = ["disabled", "required"], l = (p, f) => {
|
||||
o.includes(p) && (r.current[p] = f), s();
|
||||
}, u = H(() => ({ setDisabled: (p) => l("disabled", p), setRequired: (p) => l("required", p), getDisabled: () => r.current.disabled, getRequired: () => r.current.required }), [t]), g = pi(t, -1, {}, u, n) ?? -1;
|
||||
if (a.current != g && (g >= 0 || !c.isEmpty(i == null ? void 0 : i[g]))) {
|
||||
a.current = g;
|
||||
const { widget: p, widgetPrefix: f, props: m } = i == null ? void 0 : i[g];
|
||||
e = Qt(p, f), r.current = c.merge(m, c.pick(r.current, o));
|
||||
const a = U(), s = c.debounce(rt(), 180), o = ["disabled", "required"], l = (g, f) => {
|
||||
o.includes(g) && (r.current[g] = f), s();
|
||||
}, u = H(() => ({ setDisabled: (g) => l("disabled", g), setRequired: (g) => l("required", g), getDisabled: () => r.current.disabled, getRequired: () => r.current.required }), [t]), p = gi(t, -1, {}, u, n) ?? -1;
|
||||
if (a.current != p && (p >= 0 || !c.isEmpty(i == null ? void 0 : i[p]))) {
|
||||
a.current = p;
|
||||
const { widget: g, widgetPrefix: f, props: m } = i == null ? void 0 : i[p];
|
||||
e = Qt(g, f), r.current = c.merge(m, c.pick(r.current, o));
|
||||
}
|
||||
return [e, r.current];
|
||||
}, br = ({ value: e, onChange: t }, i = null) => {
|
||||
@ -685,35 +685,35 @@ const Ce = wt.getInstance(), rt = () => {
|
||||
n.current = s, t(s);
|
||||
}];
|
||||
}, xn = ({ type: e, initialValue: t, initialValueLanguage: i, onChange: n, basicForm: r }) => {
|
||||
const a = pi(i == "javascript" && t, i == "javascript" ? void 0 : t, {}, {}, r);
|
||||
const a = gi(i == "javascript" && t, i == "javascript" ? void 0 : t, {}, {}, r);
|
||||
return L(() => {
|
||||
i == "javascript" ? n(Q(a, e)) : t && n(Q(t, e));
|
||||
}, [e, t, a]), null;
|
||||
}, gi = ({ widget: e = "Input", widgetPrefix: t = "@pkg/ff/grid-layout-forms", widgetDecorator: i, subWidgets: n = [], basicForm: r, ...a }) => {
|
||||
const s = Qt(e, t), [o, l] = kn(s, i, n, r), [u, g] = N();
|
||||
}, pi = ({ widget: e = "Input", widgetPrefix: t = "@pkg/ff/grid-layout-forms", widgetDecorator: i, subWidgets: n = [], basicForm: r, ...a }) => {
|
||||
const s = Qt(e, t), [o, l] = kn(s, i, n, r), [u, p] = N();
|
||||
return L(() => {
|
||||
o && se.getWidgetComponent(o).then(({ defaultProps: p = {}, default: f }) => ({ default: vn(f, p, r) })).catch((p) => ({ default: () => `${p}` })).then((p) => g(k.createElement(p.default, a)));
|
||||
o && se.getWidgetComponent(o).then(({ defaultProps: g = {}, default: f }) => ({ default: vn(f, g, r) })).catch((g) => ({ default: () => `${g}` })).then((g) => p(k.createElement(g.default, a)));
|
||||
}, [o]), u && k.cloneElement(u, { ...a, ...l });
|
||||
}, vn = (e, t = {}, i = null) => (n) => {
|
||||
const { type: r, code: a, label: s, noStyle: o, placeholder: l, required: u = !1, extras: g, validators: p, help: f, isVirtual: m, $isReserved: h, initialValue: C, initialValueLanguage: w, ...v } = c.omit(c.merge({}, t, n), ["convertJs", "convertJsSetting", "widget", "widgetPerfix", "widgetDecorator", "subWidgets", "boxStyle"]), $ = bn(Object.assign({}, p, u ? { required: !0 } : {}), a, r), T = H(() => {
|
||||
const { type: r, code: a, label: s, noStyle: o, placeholder: l, required: u = !1, extras: p, validators: g, help: f, isVirtual: m, $isReserved: h, initialValue: C, initialValueLanguage: w, ...v } = c.omit(c.merge({}, t, n), ["convertJs", "convertJsSetting", "widget", "widgetPerfix", "widgetDecorator", "subWidgets", "boxStyle"]), $ = bn(Object.assign({}, g, u ? { required: !0 } : {}), a, r), T = H(() => {
|
||||
const j = Object.keys((t == null ? void 0 : t.extras) || {});
|
||||
return c.over([c.partialRight(c.pick, j), c.partialRight(c.omit, j)]);
|
||||
}, [t == null ? void 0 : t.extras]), [z, M] = T(v), q = { label: s, noStyle: o, colon: !1, layout: "vertical" }, A = Y((j) => j == null ? void 0 : Q(j, r), [r]);
|
||||
return d(_t, { name: a, rules: $, initialValue: A(C), normalize: A, children: (j, x, E) => {
|
||||
var V;
|
||||
return d(e, { type: r, rcform: E, basicForm: i, itemProps: { validateStatus: x.errors.length > 0 ? "error" : "success", tooltip: f, help: x.errors.length > 0 ? x.errors.join("、") : null, required: ((V = $ == null ? void 0 : $[0]) == null ? void 0 : V.required) || !1, ...q }, fieldProps: { placeholder: l, ...M, ...j }, $setting: Object.assign({}, g, z) });
|
||||
return d(e, { type: r, rcform: E, basicForm: i, itemProps: { validateStatus: x.errors.length > 0 ? "error" : "success", tooltip: f, help: x.errors.length > 0 ? x.errors.join("、") : null, required: ((V = $ == null ? void 0 : $[0]) == null ? void 0 : V.required) || !1, ...q }, fieldProps: { placeholder: l, ...M, ...j }, $setting: Object.assign({}, p, z) });
|
||||
} });
|
||||
}, Pt = ({ cols: e = 24, rowHeight: t = 16, itemMargin: i = [8, 16], containerPadding: n = [0, 0], fields: r = [], children: a, basicForm: s = null }) => {
|
||||
const o = ci(r, gi, s);
|
||||
const o = ci(r, pi, s);
|
||||
return O("div", { className: "ff-grid-layout-form", style: { "--grid-layout-item-margin-x": `${(i == null ? void 0 : i[0]) ?? 8}px`, "--grid-layout-item-margin-y": `${(i == null ? void 0 : i[1]) ?? 16}px`, "--grid-layout-container-padding-y": `${(n == null ? void 0 : n[0]) || 0}px`, "--grid-layout-container-padding-x": `${(n == null ? void 0 : n[1]) || 0}px`, "--grid-layout-cols": e, "--grid-layout-row-height": `${t}px` }, children: [o, a && k.cloneElement(a, { cols: e, rowHeight: t, itemMargin: i, containerPadding: n, fields: r })] });
|
||||
};
|
||||
Pt.propTypes = { fields: b.array };
|
||||
const Sn = (Dt = Pt, ({ code: e, layout: t, name: i, primaryKey: n = 0, style: r = {}, formProps: a = {}, form: s, basicForm: o, isPreview: l = !1, className: u, onFinish: g, onValuesChange: p = () => {
|
||||
const Sn = (Dt = Pt, ({ code: e, layout: t, name: i, primaryKey: n = 0, style: r = {}, formProps: a = {}, form: s, basicForm: o, isPreview: l = !1, className: u, onFinish: p, onValuesChange: g = () => {
|
||||
}, ...f }) => {
|
||||
const { align: m, autoComplete: h, resource: C, items: w, hides: v, rowHeight: $, marginX: T, marginY: z, cols: M, listenChangeFields: q, listenChangeFieldsFunc: A, pk: j, uuid: x } = wn(e), [E] = Z.useForm(s), V = H(() => [{ name: "__PK__", value: j }, { name: "__PROPS__", value: a }, { name: "__RESOURCE__", value: C }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: x }, { name: "__PRIMARY_KEY__", value: n }], [j, e, x, C, n, a]);
|
||||
return O(Z, { className: u, name: i || e, layout: t || m, fields: V, form: E, autoComplete: h, style: { ...r, position: "relative" }, onFinish: g, onValuesChange: (W, le) => (({ changedValues: Se, allValues: K, listenChangeFields: st, listenChangeFieldsFunc: He, onValuesChange: ot, code: Rt }) => {
|
||||
return O(Z, { className: u, name: i || e, layout: t || m, fields: V, form: E, autoComplete: h, style: { ...r, position: "relative" }, onFinish: p, onValuesChange: (W, le) => (({ changedValues: Se, allValues: K, listenChangeFields: st, listenChangeFieldsFunc: He, onValuesChange: ot, code: Rt }) => {
|
||||
ot(Se, K), He && Array.isArray(st) && Ce.exec(He, { changedValues: Se, allValues: K }, { getFieldValue: E.getFieldValue, setFieldValue: E.setFieldValue, setFieldsValue: E.setFieldsValue, isFieldTouched: E.isFieldTouched, isFieldsTouched: E.isFieldsTouched });
|
||||
})({ changedValues: W, allValues: le, listenChangeFields: q, listenChangeFieldsFunc: A, onValuesChange: p, code: e }), children: [d(Dt, { ...f, form: E, basicForm: o, code: e, fields: w, cols: M, rowHeight: $, itemMargin: [T, z] }), v == null ? void 0 : v.map((W) => {
|
||||
})({ changedValues: W, allValues: le, listenChangeFields: q, listenChangeFieldsFunc: A, onValuesChange: g, code: e }), children: [d(Dt, { ...f, form: E, basicForm: o, code: e, fields: w, cols: M, rowHeight: $, itemMargin: [T, z] }), v == null ? void 0 : v.map((W) => {
|
||||
var le;
|
||||
return d(_t, { name: W.code, children: d(xn, { form: E, basicForm: o, name: W.code, type: W.type, initialValue: W.initialValue, initialValueLanguage: (le = W.extras) == null ? void 0 : le.initialValueLanguage }) }, JSON.stringify(W.code));
|
||||
})] }, e);
|
||||
@ -725,7 +725,7 @@ const mi = ({ $setting: e, $close: t, extras: i, code: n, primaryKey: r, ...a })
|
||||
o && s.setFieldsValue(o);
|
||||
}, [o]), d(G, { actions: O(k.Fragment, { children: [d(P, { name: "保存", type: "primary", widget: () => {
|
||||
const l = s.getFieldValue("__RESOURCE__"), { initDataUri: u = `/api/${n}` } = e || {};
|
||||
s.validateFields(!0).then((g) => l ? c.pick(g, [l]) : g).then((g) => F.post(r ? `${u}/${r}` : `${u}`, g).msg(t)).catch(() => _.error("请先完善表单信息", { duration: 2e3 }));
|
||||
s.validateFields(!0).then((p) => l ? c.pick(p, [l]) : p).then((p) => F.post(r ? `${u}/${r}` : `${u}`, p).msg(t)).catch(() => _.error("请先完善表单信息", { duration: 2e3 }));
|
||||
} }), d(P, { name: "取消", widget: () => t(!1) })] }), extras: i, children: d(Sn, { form: s, code: n, primaryKey: r, ...a }) });
|
||||
}, qt = /* @__PURE__ */ new Set(), bt = (e = [], t = 0) => {
|
||||
const i = e[t];
|
||||
@ -742,9 +742,9 @@ Ct.propTypes = { className: b.string, type: b.string.isRequired, style: b.object
|
||||
const Pn = (e, t, i, { isReplaceRouteHistory: n = !1 } = {}) => ue.redirect(i, t, { replace: n }), Tn = (e, t = {}, i, n = {}) => {
|
||||
var a;
|
||||
const r = (a = n.router) == null ? void 0 : a.reduce((s, [o, l, u]) => {
|
||||
const g = c.get(t, ["router", o]);
|
||||
if (!g && g !== 0 && l) throw `请传入 ${u}`;
|
||||
return `${s}/${g}`;
|
||||
const p = c.get(t, ["router", o]);
|
||||
if (!p && p !== 0 && l) throw `请传入 ${u}`;
|
||||
return `${s}/${p}`;
|
||||
}, `/api/${i}`);
|
||||
return F.del(r, t.param).msg();
|
||||
}, Bt = (e, t, i, { status: { loading: n, disabled: r }, setStatus: a }) => {
|
||||
@ -753,12 +753,12 @@ const Pn = (e, t, i, { isReplaceRouteHistory: n = !1 } = {}) => ue.redirect(i, t
|
||||
}, Ut = (e, t, i, n, r) => c.isString(i) && i ? se.getWidgetComponent(i).then(({ default: a }) => _.modal(a, { ...t, $setting: n }, r != null && r.title ? { ...r, title: c.template(r.title)(e) } : r)).catch((a) => {
|
||||
_.error(i, { content: a.toString() });
|
||||
}) : _.modal(i, { ...t, $setting: n }, r != null && r.title ? { ...r, title: c.template(r.title)(e) } : r), $n = (e, t, i, n, r) => _.modal(mi, { ...t, $setting: n, code: i }, r != null && r.title ? { ...r, title: c.template(r.title)(e) } : r), Nn = (e, t, i, n, r) => _.modal(St, { base62params: t, $setting: n, listCode: i }, r != null && r.title ? { ...r, title: c.template(r.title)(e) } : r), Rn = ({ widget: e, widgetType: t, widgetData: i, widgetProps: n, widgetSetting: r, widgetContainerProps: a }, { onAfterClick: s, onBeforeClick: o }) => {
|
||||
const l = oe(ee), [u, g] = N({ leading: !0, trailing: !1 }), p = H(() => {
|
||||
const l = oe(ee), [u, p] = N({ leading: !0, trailing: !1 }), g = H(() => {
|
||||
switch (t) {
|
||||
case "redirect":
|
||||
return c.partialRight(Pn, e, r);
|
||||
case "func":
|
||||
return c.partialRight(Bt, (r == null ? void 0 : r.code) ?? e, { status: u, setStatus: g });
|
||||
return c.partialRight(Bt, (r == null ? void 0 : r.code) ?? e, { status: u, setStatus: p });
|
||||
case "fsdpf-component":
|
||||
return c.partialRight(Ut, e, r, a);
|
||||
case "grid-layout-form":
|
||||
@ -769,71 +769,71 @@ const Pn = (e, t, i, { isReplaceRouteHistory: n = !1 } = {}) => ue.redirect(i, t
|
||||
return c.partialRight(Tn, e, r, a);
|
||||
default:
|
||||
if (Nt(e) || k.isValidElement(e)) return c.partialRight(Ut, e, r, a);
|
||||
if (c.isFunction(e)) return c.partialRight(Bt, (r == null ? void 0 : r.code) || e, { status: u, setStatus: g });
|
||||
if (c.isFunction(e)) return c.partialRight(Bt, (r == null ? void 0 : r.code) || e, { status: u, setStatus: p });
|
||||
}
|
||||
return (...f) => console.error("useButton unknown widgetType", t, ...f);
|
||||
}, [e, t]);
|
||||
return [c.debounce((f) => (o == null || o(f), Promise.resolve(Zt(n, f, { list: l })).then((m) => p(f, { ...i, ...m })).then((m) => s == null ? void 0 : s(m)).catch(console.error)), 300, { leading: !0, trailing: !1 }), u];
|
||||
return [c.debounce((f) => (o == null || o(f), Promise.resolve(Zt(n, f, { list: l })).then((m) => g(f, { ...i, ...m })).then((m) => s == null ? void 0 : s(m)).catch(console.error)), 300, { leading: !0, trailing: !1 }), u];
|
||||
}, hi = ({ type: e, name: t, className: i, icon: n, iconPosition: r, size: a }, s = "default") => H(() => {
|
||||
const o = { type: "primary", className: I("ff-button", i), iconPosition: r, size: a };
|
||||
return e === "danger" ? o.danger = !0 : e === "default" && (o.type = e), s === "link" || s === "dashed" ? (o.type = s, e === "default" && (o.className = I(o.className, "ff-default"))) : s !== "circle" && s !== "round" || (o.shape = s), n && (o.icon = d(Ct, { type: n })), t && (o.children = t), o;
|
||||
}, [s, e, i, n, r]), We = (e) => function({ className: t, variant: i, children: n, name: r, icon: a, type: s = "default", iconPosition: o = "start", noAuthType: l, onAfterClick: u, onBeforeClick: g, data: p, loading: f, disabled: m, tooltip: h, confirm: C, widget: w = () => {
|
||||
}, [s, e, i, n, r]), We = (e) => function({ className: t, variant: i, children: n, name: r, icon: a, type: s = "default", iconPosition: o = "start", noAuthType: l, onAfterClick: u, onBeforeClick: p, data: g, loading: f, disabled: m, tooltip: h, confirm: C, widget: w = () => {
|
||||
}, widgetType: v, widgetData: $, widgetProps: T, widgetSetting: z, widgetContainerProps: M, ...q }) {
|
||||
const A = c.isEmpty(h) || !h.enabled ? {} : h, j = c.isEmpty(C) ? { enabled: !1 } : Object.assign({ enabled: !0 }, C), x = hi({ className: t, name: r, type: s, icon: a, iconPosition: o }, i ?? e), [E, V] = N(!1), [W, { disabled: le, loading: Se }] = Rn({ widget: w, widgetType: v, widgetData: $, widgetProps: T, widgetSetting: z, widgetContainerProps: M }, { onAfterClick: u, onBeforeClick: g });
|
||||
const A = c.isEmpty(h) || !h.enabled ? {} : h, j = c.isEmpty(C) ? { enabled: !1 } : Object.assign({ enabled: !0 }, C), x = hi({ className: t, name: r, type: s, icon: a, iconPosition: o }, i ?? e), [E, V] = N(!1), [W, { disabled: le, loading: Se }] = Rn({ widget: w, widgetType: v, widgetData: $, widgetProps: T, widgetSetting: z, widgetContainerProps: M }, { onAfterClick: u, onBeforeClick: p });
|
||||
return d(Ai, { okText: "确定", cancelText: "取消", getPopupContainer: (K) => K, ...j, disabled: le || m, open: E, onOpenChange: (K) => {
|
||||
if (!K) return V(K);
|
||||
j.enabled ? V(K) : W(p);
|
||||
j.enabled ? V(K) : W(g);
|
||||
}, onConfirm: () => {
|
||||
W(p);
|
||||
W(g);
|
||||
}, onClick: (K) => {
|
||||
K.stopPropagation();
|
||||
}, children: d(ji, { getPopupContainer: (K) => K, ...A, title: E ? null : A == null ? void 0 : A.title, trigger: ["hover", "click"], children: d(Xe, { loading: Se || f, disabled: le || m, ...x, ...q, children: n || r }) }) });
|
||||
}, P = We("default");
|
||||
P.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", "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 En = We("link"), Fn = We("circle"), On = We("round"), Ln = We("dashed"), Tt = ({ data: e, widget: t, widgetType: i = "fsdpf-component", widgetData: n, widgetProps: r, widgetSetting: a, widgetContainerProps: s, onAfterClick: o, onBeforeClick: l, children: u, extras: g }) => {
|
||||
const p = oe(ee), [f, m] = N(!1), [h, C] = N("hover"), [w, v] = N({}), [$, T] = N(), { placement: z, align: M, arrow: q = { pointAtCenter: !0 }, getPopupContainer: A, ...j } = s || {};
|
||||
const En = We("link"), Fn = We("circle"), On = We("round"), Ln = We("dashed"), Tt = ({ data: e, widget: t, widgetType: i = "fsdpf-component", widgetData: n, widgetProps: r, widgetSetting: a, widgetContainerProps: s, onAfterClick: o, onBeforeClick: l, children: u, extras: p }) => {
|
||||
const g = oe(ee), [f, m] = N(!1), [h, C] = N("hover"), [w, v] = N({}), [$, T] = N(), { placement: z, align: M, arrow: q = { pointAtCenter: !0 }, getPopupContainer: A, ...j } = s || {};
|
||||
L(() => {
|
||||
i == "grid-layout-form" ? T(k.createElement(mi, { ...n, $setting: a, code: t })) : i == "data-list" ? T(k.createElement(St, { base62params: e, $setting: a, listCode: t })) : c.isString(t) ? se.getWidgetComponent(t).then(({ default: V }) => {
|
||||
T(k.createElement(V, { ...n, $setting: a }));
|
||||
}).catch((V) => T(V.toString())) : Nt(t) ? T(k.createElement(t, { ...n, $setting: a })) : k.isValidElement(t) && T(k.cloneElement(t, { ...n, $setting: a }));
|
||||
}, [t, i, n]), L(() => {
|
||||
Promise.resolve(Zt(r, e, { list: p })).then(v);
|
||||
Promise.resolve(Zt(r, e, { list: g })).then(v);
|
||||
}, [r, e]);
|
||||
const x = (V, W = !1) => (m(V), !V && C("hover"), V ? l == null ? void 0 : l(w) : o == null ? void 0 : o(W)), E = (V) => {
|
||||
m(!0), C("click");
|
||||
};
|
||||
return d(Vi, { zIndex: 1080, placement: z, onPopupClick: E, onClick: E, open: f, align: M, arrow: q, trigger: h, getPopupContainer: A, content: d(An, { ...j, extras: g, children: $ && k.cloneElement($, { ...w, $close: (V) => x(!1, V) }) }), children: u, onOpenChange: x });
|
||||
return d(Vi, { zIndex: 1080, placement: z, onPopupClick: E, onClick: E, open: f, align: M, arrow: q, trigger: h, getPopupContainer: A, content: d(An, { ...j, extras: p, children: $ && k.cloneElement($, { ...w, $close: (V) => x(!1, V) }) }), children: u, onOpenChange: x });
|
||||
}, An = ({ title: e, className: t, children: i, extras: n, width: r, height: a, ...s }) => {
|
||||
const [o, l] = N({}), u = Y((m, h) => l((C) => ({ ...C, [m]: h })), []), g = Y((m) => l((h) => ({ ...h, [m]: void 0 })), []), p = e ? k.createElement("div", { className: "ff-popup-title" }, e) : o == null ? void 0 : o.title, f = n ?? k.createElement("div", { className: "ff-popup-reserved-extras" }, n);
|
||||
return d(Be.Provider, { value: { ele: o, mount: u, unmount: g }, children: O("div", { className: I("ff-popup ff-popover", t), style: { width: r, height: a }, ...s, children: [O("div", { className: "ff-popup-header", children: [p, o == null ? void 0 : o["sub-title"]] }), i, O("div", { className: "ff-popup-footer", children: [f, o == null ? void 0 : o.extras, o == null ? void 0 : o.actions] })] }) });
|
||||
const [o, l] = N({}), u = Y((m, h) => l((C) => ({ ...C, [m]: h })), []), p = Y((m) => l((h) => ({ ...h, [m]: void 0 })), []), g = e ? k.createElement("div", { className: "ff-popup-title" }, e) : o == null ? void 0 : o.title, f = n ?? k.createElement("div", { className: "ff-popup-reserved-extras" }, n);
|
||||
return d(Be.Provider, { value: { ele: o, mount: u, unmount: p }, children: O("div", { className: I("ff-popup ff-popover", t), style: { width: r, height: a }, ...s, children: [O("div", { className: "ff-popup-header", children: [g, o == null ? void 0 : o["sub-title"]] }), i, O("div", { className: "ff-popup-footer", children: [f, o == null ? void 0 : o.extras, o == null ? void 0 : o.actions] })] }) });
|
||||
};
|
||||
Tt.propTypes = { widgetType: b.oneOf(["fsdpf-component", "grid-layout-form", "data-list"]) };
|
||||
const Wt = ({ options: e = [], filterWeights: t = ["grid-layout-form", "grid-layout", "fsdpf-component", "print"], onAfterClick: i = (m, h, C) => {
|
||||
const Wt = ({ options: e = [], triggerWeights: t = ["grid-layout-form", "grid-layout", "fsdpf-component", "print"], onAfterClick: i = (m, h, C) => {
|
||||
}, onBeforeClick: n = (m, h, C) => {
|
||||
}, labelVariant: r = "link", labelSize: a, labelRender: s, btnVariant: o, btnSize: l, btnRender: u = (m, h) => d(P, { ...m, data: h }, m.uuid || Le()), widgetContainerProps: g = {}, children: p, data: f }) => {
|
||||
}, labelVariant: r = "link", labelSize: a, labelRender: s, btnVariant: o, btnSize: l, btnRender: u = (m, h) => d(P, { ...m, data: h }, m.uuid || Le()), widgetContainerProps: p = {}, children: g, data: f }) => {
|
||||
const [m, h] = H(() => e.reduce((w, v) => {
|
||||
const $ = t.indexOf(v.widgetType);
|
||||
return $ === -1 ? w[1].push(v) : w[0] ? $ < t.indexOf(w[0].widgetType) ? (w[1].push(w[0]), w[0] = v) : w[1].push(v) : w[0] = v, w;
|
||||
}, [null, []]), [e, t]);
|
||||
if (c.isEmpty(m) && c.isEmpty(h)) return p;
|
||||
s ? p = s(m, f) || p : p || (p = d(Xe, { ...hi({ ...m, size: a }, r) }));
|
||||
if (c.isEmpty(m) && c.isEmpty(h)) return g;
|
||||
s ? g = s(m, f) || g : g || (g = d(Xe, { ...hi({ ...m, size: a }, r) }));
|
||||
const C = h.map((w) => u(Object.assign({ uuid: w.uuid, type: w.type, name: w.name, widget: w.widget, widgetType: w.widgetType, widgetProps: w.widgetProps, widgetData: w.widgetData, widgetSetting: w.widgetSetting, widgetContainerProps: w.widgetContainerSetting, confirm: w.confirm, onAfterClick: c.partialRight(i, w, f), onBeforeClick: c.partialRight(n, w, f) }, { size: l, variant: o }), f));
|
||||
return d(Tt, { widget: m == null ? void 0 : m.widget, widgetType: m == null ? void 0 : m.widgetType, widgetProps: m == null ? void 0 : m.widgetProps, widgetSetting: m == null ? void 0 : m.widgetSetting, widgetContainerProps: Object.assign({}, g, m == null ? void 0 : m.widgetContainerProps), data: f, widgetData: m == null ? void 0 : m.widgetData, extras: C, onAfterClick: c.partialRight(i, m, f), onBeforeClick: c.partialRight(n, m, f), children: p });
|
||||
return d(Tt, { widget: m == null ? void 0 : m.widget, widgetType: m == null ? void 0 : m.widgetType, widgetProps: m == null ? void 0 : m.widgetProps, widgetSetting: m == null ? void 0 : m.widgetSetting, widgetContainerProps: Object.assign({}, p, m == null ? void 0 : m.widgetContainerProps), data: f, widgetData: m == null ? void 0 : m.widgetData, extras: C, onAfterClick: c.partialRight(i, m, f), onBeforeClick: c.partialRight(n, m, f), children: g });
|
||||
};
|
||||
Wt.propTypes = { filterWeights: b.array, options: b.arrayOf(b.shape({ ...P.propTypes, widgetType: P.propTypes.widgetType.isRequired })).isRequired, btnSize: P.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: P.propTypes.size, onAfterClick: b.func, onBeforeClick: b.func, widgetContainerProps: P.propTypes.widgetContainerProps, data: P.propTypes.data }, P.Link = En, P.Link.defaultProps = P.defaultProps, P.Link.propTypes = P.propTypes, P.Circle = Fn, P.Circle.defaultProps = P.defaultProps, P.Circle.propTypes = P.propTypes, P.Round = On, P.Round.defaultProps = P.defaultProps, P.Round.propTypes = P.propTypes, P.Dashed = Ln, P.Dashed.defaultProps = P.defaultProps, P.Dashed.propTypes = P.propTypes, P.Popover = Tt, P.GroupPopover = Wt;
|
||||
Wt.propTypes = { triggerWeights: b.array, options: b.arrayOf(b.shape({ ...P.propTypes, widgetType: P.propTypes.widgetType.isRequired })).isRequired, btnSize: P.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: P.propTypes.size, onAfterClick: b.func, onBeforeClick: b.func, widgetContainerProps: P.propTypes.widgetContainerProps, data: P.propTypes.data }, P.Link = En, P.Link.defaultProps = P.defaultProps, P.Link.propTypes = P.propTypes, P.Circle = Fn, P.Circle.defaultProps = P.defaultProps, P.Circle.propTypes = P.propTypes, P.Round = On, P.Round.defaultProps = P.defaultProps, P.Round.propTypes = P.propTypes, P.Dashed = Ln, P.Dashed.defaultProps = P.defaultProps, P.Dashed.propTypes = P.propTypes, P.Popover = Tt, P.GroupPopover = Wt;
|
||||
const jn = ({ fields: e, formProps: t, $close: i }) => {
|
||||
const [n] = Z.useForm(), r = H(() => [{ name: "__PROPS__", value: t }], [t]);
|
||||
return d(G, { actions: O(k.Fragment, { children: [d(P, { name: "取消", widget: () => i(!1) }), d(P, { name: "确定", type: "primary", widget: () => n.validateFields(!0).then(i) })] }), children: d(Z, { fields: r, form: n, className: "ff-modal-form", children: e == null ? void 0 : e.map(({ code: a, ...s }) => d(gi, { code: a, ...s }, a)) }) });
|
||||
}, Vn = ({ className: e, $close: t, children: i, title: n, subTitle: r, actions: a, extras: s, zIndex: o, ...l }) => O(Hi, { ...l, prefixCls: "ff-drawer", className: I("ff-popup", e), maskMotion: { motionAppear: !0, motionName: "mask-motion" }, motion: (u) => ({ motionAppear: !0, motionName: `panel-motion-${u}` }), children: [O("div", { className: "ff-popup-header", children: [d("button", { "aria-label": "Close", className: "ff-popup-close", onClick: l.onClose, children: d(vt, { type: "close" }) }), n, r] }), d("div", { className: "ff-popup-body", children: i }), O("div", { className: "ff-popup-footer", children: [s, a] })] }), In = ({ className: e, $close: t, $event: i, children: n, title: r, subTitle: a, actions: s, extras: o, zIndex: l, placement: u, ...g }) => {
|
||||
const p = (i == null ? void 0 : i.pageX) === void 0 ? { animation: null, maskAnimation: null, mousePosition: { x: null, y: null } } : { animation: "zoom", maskAnimation: "fade", mousePosition: { x: i == null ? void 0 : i.pageX, y: i == null ? void 0 : i.pageY } };
|
||||
return d(Ki, { ...g, ...p, prefixCls: "ff-modal", modalRender: () => O("div", { className: I("ff-modal-content ff-popup", e), children: [O("div", { className: "ff-popup-header", children: [d("button", { "aria-label": "Close", className: "ff-popup-close", onClick: g.onClose, children: d(vt, { type: "close" }) }), r, a] }), d("div", { className: "ff-popup-body", children: n }), O("div", { className: "ff-popup-footer", children: [o, s] })] }) });
|
||||
return d(G, { actions: O(k.Fragment, { children: [d(P, { name: "取消", widget: () => i(!1) }), d(P, { name: "确定", type: "primary", widget: () => n.validateFields(!0).then(i) })] }), children: d(Z, { fields: r, form: n, className: "ff-modal-form", children: e == null ? void 0 : e.map(({ code: a, ...s }) => d(pi, { code: a, ...s }, a)) }) });
|
||||
}, Vn = ({ className: e, $close: t, children: i, title: n, subTitle: r, actions: a, extras: s, zIndex: o, ...l }) => O(Hi, { ...l, prefixCls: "ff-drawer", className: I("ff-popup", e), maskMotion: { motionAppear: !0, motionName: "mask-motion" }, motion: (u) => ({ motionAppear: !0, motionName: `panel-motion-${u}` }), children: [O("div", { className: "ff-popup-header", children: [d("button", { "aria-label": "Close", className: "ff-popup-close", onClick: l.onClose, children: d(vt, { type: "close" }) }), n, r] }), d("div", { className: "ff-popup-body", children: i }), O("div", { className: "ff-popup-footer", children: [s, a] })] }), In = ({ className: e, $close: t, $event: i, children: n, title: r, subTitle: a, actions: s, extras: o, zIndex: l, placement: u, ...p }) => {
|
||||
const g = (i == null ? void 0 : i.pageX) === void 0 ? { animation: null, maskAnimation: null, mousePosition: { x: null, y: null } } : { animation: "zoom", maskAnimation: "fade", mousePosition: { x: i == null ? void 0 : i.pageX, y: i == null ? void 0 : i.pageY } };
|
||||
return d(Ki, { ...p, ...g, prefixCls: "ff-modal", modalRender: () => O("div", { className: I("ff-modal-content ff-popup", e), children: [O("div", { className: "ff-popup-header", children: [d("button", { "aria-label": "Close", className: "ff-popup-close", onClick: p.onClose, children: d(vt, { type: "close" }) }), r, a] }), d("div", { className: "ff-popup-body", children: n }), O("div", { className: "ff-popup-footer", children: [o, s] })] }) });
|
||||
}, fi = ({ placement: e, $close: t, $event: i, children: n, title: r, ...a }) => {
|
||||
const [s, o] = N({}), [l, u] = N(!0), g = Y((h, C) => o((w) => ({ ...w, [h]: C })), []), p = Y((h) => o((C) => ({ ...C, [h]: void 0 })), []);
|
||||
const [s, o] = N({}), [l, u] = N(!0), p = Y((h, C) => o((w) => ({ ...w, [h]: C })), []), g = Y((h) => o((C) => ({ ...C, [h]: void 0 })), []);
|
||||
let f = { ...a, className: s.rootClassName, title: s.title || r && k.createElement("div", { className: I("ff-popup-title") }, r), subTitle: s["sub-title"], actions: s.actions, extras: s.extras, children: n, $close: t, $event: i, onClose: () => u(!1) };
|
||||
const m = () => {
|
||||
t(!1);
|
||||
};
|
||||
return d(Be.Provider, { value: { ele: s, mount: g, unmount: p }, children: e && e !== "center" ? d(Vn, { ...f, placement: e, open: l, afterOpenChange: (h) => !h && m() }) : d(In, { ...f, visible: l, afterClose: m }) });
|
||||
return d(Be.Provider, { value: { ele: s, mount: p, unmount: g }, children: e && e !== "center" ? d(Vn, { ...f, placement: e, open: l, afterOpenChange: (h) => !h && m() }) : d(In, { ...f, visible: l, afterClose: m }) });
|
||||
};
|
||||
fi.propTypes = { placement: b.oneOf(["center", "left", "top", "right", "bottom"]) };
|
||||
const J = () => {
|
||||
@ -847,9 +847,9 @@ const J = () => {
|
||||
});
|
||||
}, []);
|
||||
const n = (a, s = {}, o = {}) => new Promise((l, u) => r([l, u], a, s, o)), r = ([a, s], o, l = {}, u = {}) => {
|
||||
const g = J.$index++, p = (f) => ((m, h) => (J.$popups.delete(m), i(), h == null ? void 0 : h()))(g, () => a(f));
|
||||
if (o === Xt) return e.open({ ...u, key: g, content: k.createElement(o, { ...l, $close: () => e.close(g) }) });
|
||||
J.$popups.set(g, k.createElement(fi, { zIndex: g, maskClosable: !1, $event: l == null ? void 0 : l.$event, ...u, key: g, $close: p }, k.isValidElement(o) ? k.cloneElement(o, { ...l, $close: p }) : o != null && o.name || At.isForwardRef(o) || (o == null ? void 0 : o.$$typeof) === At.ForwardRef ? k.createElement(o, { ...l, $close: p }) : o)), i();
|
||||
const p = J.$index++, g = (f) => ((m, h) => (J.$popups.delete(m), i(), h == null ? void 0 : h()))(p, () => a(f));
|
||||
if (o === Xt) return e.open({ ...u, key: p, content: k.createElement(o, { ...l, $close: () => e.close(p) }) });
|
||||
J.$popups.set(p, k.createElement(fi, { zIndex: p, maskClosable: !1, $event: l == null ? void 0 : l.$event, ...u, key: p, $close: g }, k.isValidElement(o) ? k.cloneElement(o, { ...l, $close: g }) : o != null && o.name || At.isForwardRef(o) || (o == null ? void 0 : o.$$typeof) === At.ForwardRef ? k.createElement(o, { ...l, $close: g }) : o)), i();
|
||||
};
|
||||
return O(k.Fragment, { children: [Array.from(J.$popups).map(([a, s]) => s), t] });
|
||||
};
|
||||
@ -866,9 +866,9 @@ Fe.configure({ showSpinner: !1 }), Oe.interceptors.request.use((e) => {
|
||||
return e.headers.Authorization = t ? `Bearer ${t} ` : void 0, Fe.inc(), e;
|
||||
}, (e) => (Fe.done(), Promise.reject({ code: -1, msg: e }))), Oe.interceptors.response.use(({ data: e, headers: t }) => (Fe.done(), { ...e, res: t == null ? void 0 : t.res }), function(e) {
|
||||
return Fe.done(), Promise.reject(e.message);
|
||||
}), window.addEventListener("unhandledrejection", pt.onUnhandledRejection), pt.onMsg = (e, t) => _[[0, 1].includes(e) ? "success" : "error"](t).then(() => e === 20300 && ue.redirect(Ae.get("Common.WEBSITE_LOGIN_PAGE")));
|
||||
}), window.addEventListener("unhandledrejection", gt.onUnhandledRejection), gt.onMsg = (e, t) => _[[0, 1].includes(e) ? "success" : "error"](t).then(() => e === 20300 && ue.redirect(Ae.get("Common.WEBSITE_LOGIN_PAGE")));
|
||||
const kt = { appUrl: "", init: (e, t, i) => {
|
||||
kt.appUrl = i, Oe.defaults.baseURL = i, Oe.defaults.timeout = 15e3, Object.assign(kt, new pt(e, t, Oe));
|
||||
kt.appUrl = i, Oe.defaults.baseURL = i, Oe.defaults.timeout = 15e3, Object.assign(kt, new gt(e, t, Oe));
|
||||
} }, F = kt;
|
||||
class $t extends Error {
|
||||
constructor(t, i) {
|
||||
@ -958,13 +958,13 @@ const se = xt.getInstance(), Mn = k.createContext({ user: {}, initUser: () => {
|
||||
return i ? (i.innerHTML = e, e) : (i = document.createElement("style"), i.setAttribute("ff-style-token", t), i.setAttribute("type", "text/css"), i.innerHTML = e, document.head.appendChild(i), e);
|
||||
}, qn = Object.freeze(Object.defineProperty({ __proto__: null, AppContext: Mn, AppGlobalParamsContext: zn, cache: Gt, configure: Ae, default: se, func: Ce, http: F, insertStyle: Dn, isReactComponent: Nt, route: ue }, Symbol.toStringTag, { value: "Module" }));
|
||||
export {
|
||||
pi as $,
|
||||
gi as $,
|
||||
Zi as A,
|
||||
tn as B,
|
||||
Yi as C,
|
||||
Qe as D,
|
||||
ur as E,
|
||||
pr as F,
|
||||
gr as F,
|
||||
mr as G,
|
||||
cn as H,
|
||||
ni as I,
|
||||
@ -981,7 +981,7 @@ export {
|
||||
wr as T,
|
||||
Sn as U,
|
||||
Pt as V,
|
||||
gi as W,
|
||||
pi as W,
|
||||
mi as X,
|
||||
wn as Y,
|
||||
bn as Z,
|
||||
@ -1018,7 +1018,7 @@ export {
|
||||
dr as f,
|
||||
Gi as g,
|
||||
ri as h,
|
||||
gr as i,
|
||||
pr as i,
|
||||
li as j,
|
||||
di as k,
|
||||
un as l,
|
||||
@ -1035,5 +1035,5 @@ export {
|
||||
St as w,
|
||||
ee as x,
|
||||
ln as y,
|
||||
gn as z
|
||||
pn as z
|
||||
};
|
2
dist/components.js
vendored
2
dist/components.js
vendored
@ -1,4 +1,4 @@
|
||||
import { ab as s, a2 as p, ac as d, ad as n, aa as t } from "./common/main-DCNTmsIE.js";
|
||||
import { ab as s, a2 as p, ac as d, ad as n, aa as t } from "./common/main-CAOXVHLy.js";
|
||||
export {
|
||||
s as Empty,
|
||||
p as Icon,
|
||||
|
2
dist/container.js
vendored
2
dist/container.js
vendored
@ -1,4 +1,4 @@
|
||||
import { a7 as o, ab as s, ac as d, ad as p, a8 as t, aa as n, a9 as r, a6 as u } from "./common/main-DCNTmsIE.js";
|
||||
import { a7 as o, ab as s, ac as d, ad as p, a8 as t, aa as n, a9 as r, a6 as u } from "./common/main-CAOXVHLy.js";
|
||||
export {
|
||||
o as Context,
|
||||
s 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-DCNTmsIE.js";
|
||||
import { D as p } from "./common/main-CAOXVHLy.js";
|
||||
export {
|
||||
p as default
|
||||
};
|
||||
|
2
dist/data-list.js
vendored
2
dist/data-list.js
vendored
@ -1,4 +1,4 @@
|
||||
import { z as t, x as e, p as r, v as o, A as i, w as u, s as D, y as l, q as L, B as n, o as p, C as m, L as C, F as c, J as F, I as b, K as d, E as k } from "./common/main-DCNTmsIE.js";
|
||||
import { z as t, x as e, p as r, v as o, A as i, w as u, s as D, y as l, q as L, B as n, o as p, C as m, L as C, F as c, J as F, I as b, K as d, E as k } from "./common/main-CAOXVHLy.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 { j as a } from "../common/main-DCNTmsIE.js";
|
||||
import { j as a } from "../common/main-CAOXVHLy.js";
|
||||
export {
|
||||
a as getDefaultExpandRowKeys
|
||||
};
|
||||
|
2
dist/grid-layout-form.js
vendored
2
dist/grid-layout-form.js
vendored
@ -1,4 +1,4 @@
|
||||
import { V as s, X as r, W as u, U as o, $ as t, _ as d, a1 as m, Z as F, Y as i, a0 as g } from "./common/main-DCNTmsIE.js";
|
||||
import { V as s, X as r, W as u, U as o, $ as t, _ as d, a1 as m, Z as F, Y as i, a0 as g } from "./common/main-CAOXVHLy.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 { g as o, a as g } from "../common/main-DCNTmsIE.js";
|
||||
import { g as o, a as g } from "../common/main-CAOXVHLy.js";
|
||||
export {
|
||||
o as getOptionItemByValue,
|
||||
g as getWidgetByNormalize
|
||||
|
2
dist/grid-layout.js
vendored
2
dist/grid-layout.js
vendored
@ -1,4 +1,4 @@
|
||||
import { k as d, l as e, H as i, G as t, m as u, n as o } from "./common/main-DCNTmsIE.js";
|
||||
import { k as d, l as e, H as i, G as t, m as u, n as o } from "./common/main-CAOXVHLy.js";
|
||||
export {
|
||||
d as GridLayout,
|
||||
e as GridLayoutWidget,
|
||||
|
2
dist/grid-layout/utils.js
vendored
2
dist/grid-layout/utils.js
vendored
@ -1,4 +1,4 @@
|
||||
import { h as o, i as a } from "../common/main-DCNTmsIE.js";
|
||||
import { h as o, i as a } from "../common/main-CAOXVHLy.js";
|
||||
export {
|
||||
o as getBoxStyle,
|
||||
a as getWidgetByNormalize
|
||||
|
2
dist/hooks.js
vendored
2
dist/hooks.js
vendored
@ -1,7 +1,7 @@
|
||||
import "lodash";
|
||||
import "rc-field-form";
|
||||
import "react";
|
||||
import { Q as r, P as o, S as p, N as f, O as i, T as m, M as c } from "./common/main-DCNTmsIE.js";
|
||||
import { Q as r, P as o, S as p, N as f, O as i, T as m, M as c } from "./common/main-CAOXVHLy.js";
|
||||
import { default as S } 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 { a2 as a } from "./common/main-DCNTmsIE.js";
|
||||
import { a2 as a } from "./common/main-CAOXVHLy.js";
|
||||
export {
|
||||
a as default
|
||||
};
|
||||
|
2
dist/index.js
vendored
2
dist/index.js
vendored
@ -1,4 +1,4 @@
|
||||
import { am as t, an as e, ai as o, aj as n, ae as p, ak as r, ah as c, ag as f, af as l, al as i } from "./common/main-DCNTmsIE.js";
|
||||
import { am as t, an as e, ai as o, aj as n, ae as p, ak as r, ah as c, ag as f, af as l, al as i } from "./common/main-CAOXVHLy.js";
|
||||
export {
|
||||
t as AppContext,
|
||||
e as AppGlobalParamsContext,
|
||||
|
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-DCNTmsIE.js";
|
||||
import { R as a } from "./common/main-CAOXVHLy.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, e as g, c as r, f as o, b as i, r as m, t as p, u as P } from "./common/main-DCNTmsIE.js";
|
||||
import { d as s, e as g, c as r, f as o, b as i, r as m, t as p, u as P } from "./common/main-CAOXVHLy.js";
|
||||
export {
|
||||
s as deepSome,
|
||||
g as getPkgCategory,
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ff",
|
||||
"private": true,
|
||||
"version": "0.4.52",
|
||||
"version": "0.4.53",
|
||||
"author": "www.fsdpf.com",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
|
Loading…
Reference in New Issue
Block a user