v0.6.24
This commit is contained in:
2
dist/button.js
vendored
2
dist/button.js
vendored
@@ -1,4 +1,4 @@
|
||||
import { aj as s, ai as u, ak as e } from "./common/main-D7to3RZo.js";
|
||||
import { aj as s, ai as u, ak as e } from "./common/main-xbA_iREM.js";
|
||||
export {
|
||||
s as auth,
|
||||
u as default,
|
||||
|
||||
@@ -4,17 +4,17 @@ var ii = (t) => {
|
||||
};
|
||||
var tn = (t, e, i) => e in t ? en(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i;
|
||||
var P = (t, e, i) => tn(t, typeof e != "symbol" ? e + "" : e, i), ni = (t, e, i) => e.has(t) || ii("Cannot " + i);
|
||||
var c = (t, e, i) => (ni(t, e, "read from private field"), i ? i.call(t) : e.get(t)), v = (t, e, i) => e.has(t) ? ii("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), W = (t, e, i, n) => (ni(t, e, "write to private field"), n ? n.call(t, i) : e.set(t, i), i);
|
||||
var c = (t, e, i) => (ni(t, e, "read from private field"), i ? i.call(t) : e.get(t)), v = (t, e, i) => e.has(t) ? ii("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), U = (t, e, i, n) => (ni(t, e, "write to private field"), n ? n.call(t, i) : e.set(t, i), i);
|
||||
var ri = (t, e, i, n) => ({
|
||||
set _(r) {
|
||||
W(t, e, r, i);
|
||||
U(t, e, r, i);
|
||||
},
|
||||
get _() {
|
||||
return c(t, e, n);
|
||||
}
|
||||
});
|
||||
import { jsx as h, jsxs as F } from "react/jsx-runtime";
|
||||
import $, { useEffect as V, useState as L, useCallback as X, useRef as _, useContext as le, useMemo as q, useId as Lt, isValidElement as nn, useLayoutEffect as rn } from "react";
|
||||
import { jsx as h, jsxs as A } from "react/jsx-runtime";
|
||||
import $, { useEffect as V, useState as j, useCallback as X, useRef as _, useContext as le, useMemo as K, useId as Lt, isValidElement as nn, useLayoutEffect as rn } from "react";
|
||||
import ce from "pathe";
|
||||
import b from "prop-types";
|
||||
import R from "classnames";
|
||||
@@ -22,7 +22,7 @@ import * as ai from "react-is";
|
||||
import { useNotification as an } from "rc-notification";
|
||||
import m from "lodash";
|
||||
import ie, { Field as _t, FieldContext as wi } from "rc-field-form";
|
||||
import { M as Rt, N as _e, a as He, _ as jt, S as on } from "./vender-FNiQWFaA.js";
|
||||
import { M as Rt, N as He, a as De, s as jt, S as on } from "./vender-yKcgvbX-.js";
|
||||
import bi from "immutability-helper";
|
||||
import { Space as sn, Form as mt, Input as ln, Button as yt, Pagination as cn, Tree as dn, Breadcrumb as un, Table as pn, Empty as gn, Popover as hn, Popconfirm as mn, Tooltip as fn } from "antd";
|
||||
import { useMergedState as yn } from "rc-util";
|
||||
@@ -30,37 +30,37 @@ import { generatePath as wn, useInRouterContext as Ci, useParams as bn, useLocat
|
||||
import "rc-util/lib/hooks/useMergedState";
|
||||
import En from "rc-drawer";
|
||||
import Sn from "rc-dialog";
|
||||
var De, Ye, ze, we, Ae, Le;
|
||||
var ze, Ye, Be, we, Ae, Le;
|
||||
class ki {
|
||||
constructor(e, i) {
|
||||
v(this, De, /* @__PURE__ */ new Map());
|
||||
v(this, ze, /* @__PURE__ */ new Map());
|
||||
v(this, Ye, !0);
|
||||
v(this, ze, []);
|
||||
v(this, Be, []);
|
||||
v(this, we);
|
||||
v(this, Ae, () => c(this, we));
|
||||
v(this, Le, () => Promise.resolve());
|
||||
P(this, "get", (...e) => new Promise((i, n) => {
|
||||
const r = JSON.stringify(e);
|
||||
if (c(this, De).has(r)) return i(c(this, Le).call(this, c(this, we), ...e));
|
||||
if (c(this, we) === void 0) c(this, ze).push([e, i, n]), c(this, Ye) && (W(this, Ye, !1), Promise.resolve(typeof c(this, Ae) == "function" ? c(this, Ae).call(this) : c(this, Ae)).then((a) => W(this, we, a || null)).finally(() => {
|
||||
c(this, ze).forEach(([a, o, s]) => {
|
||||
if (c(this, ze).has(r)) return i(c(this, Le).call(this, c(this, we), ...e));
|
||||
if (c(this, we) === void 0) c(this, Be).push([e, i, n]), c(this, Ye) && (U(this, Ye, !1), Promise.resolve(typeof c(this, Ae) == "function" ? c(this, Ae).call(this) : c(this, Ae)).then((a) => U(this, we, a || null)).finally(() => {
|
||||
c(this, Be).forEach(([a, o, s]) => {
|
||||
try {
|
||||
const l = c(this, Le).call(this, c(this, we), ...a);
|
||||
c(this, De).set(JSON.stringify(a), l), o(l);
|
||||
c(this, ze).set(JSON.stringify(a), l), o(l);
|
||||
} catch (l) {
|
||||
s(l);
|
||||
}
|
||||
}), c(this, ze).length = 0;
|
||||
}), c(this, Be).length = 0;
|
||||
}));
|
||||
else {
|
||||
const a = c(this, Le).call(this, c(this, we), ...e);
|
||||
c(this, De).set(r, a), i(a);
|
||||
c(this, ze).set(r, a), i(a);
|
||||
}
|
||||
}));
|
||||
W(this, Le, i), W(this, Ae, e);
|
||||
U(this, Le, i), U(this, Ae, e);
|
||||
}
|
||||
}
|
||||
De = new WeakMap(), Ye = new WeakMap(), ze = new WeakMap(), we = new WeakMap(), Ae = new WeakMap(), Le = new WeakMap();
|
||||
ze = new WeakMap(), Ye = new WeakMap(), Be = new WeakMap(), we = new WeakMap(), Ae = new WeakMap(), Le = new WeakMap();
|
||||
const Kr = () => h("div", { children: "Empty" }), ot = $.createContext({ ele: {}, mount: () => {
|
||||
}, unmount: () => {
|
||||
} }), G = ({ rootClassName: t, className: e, children: i, actions: n, title: r, subTitle: a, extras: o, style: s = {} }) => {
|
||||
@@ -71,22 +71,22 @@ const Kr = () => h("div", { children: "Empty" }), ot = $.createContext({ ele: {}
|
||||
return V(() => (e && n(t, $.createElement("div", { key: `ff-${t}`, className: R(`ff-popup-${t}`, i) }, e)), () => r(t)), [i, e]), null;
|
||||
};
|
||||
G.Action = ht("actions"), G.Title = ht("title"), G.SubTitle = ht("sub-title"), G.Extra = ht("extras"), G.propTypes = { className: b.string, style: b.object, title: b.any, subTitle: b.any, actions: b.any, extras: b.any };
|
||||
const _r = () => h(G, { className: "ff-loading", children: F("div", { className: "loader", children: [F("div", { className: "square", children: [h("span", {}), h("span", {}), h("span", {})] }), F("div", { className: "square", children: [h("span", {}), h("span", {}), h("span", {})] }), F("div", { className: "square", children: [h("span", {}), h("span", {}), h("span", {})] }), F("div", { className: "square", children: [h("span", {}), h("span", {}), h("span", {})] })] }) }), Hr = () => h("div", { children: "NotFound" }), $i = ({ children: t }) => {
|
||||
const [e, i] = L({}), n = X((a, o) => i((s) => ({ ...s, [a]: o })), []), r = X((a) => i((o) => ({ ...o, [a]: void 0 })), []);
|
||||
const _r = () => h(G, { className: "ff-loading", children: A("div", { className: "loader", children: [A("div", { className: "square", children: [h("span", {}), h("span", {}), h("span", {})] }), A("div", { className: "square", children: [h("span", {}), h("span", {}), h("span", {})] }), A("div", { className: "square", children: [h("span", {}), h("span", {}), h("span", {})] }), A("div", { className: "square", children: [h("span", {}), h("span", {}), h("span", {})] })] }) }), Hr = () => h("div", { children: "NotFound" }), $i = ({ children: t }) => {
|
||||
const [e, i] = j({}), n = X((a, o) => i((s) => ({ ...s, [a]: o })), []), r = X((a) => i((o) => ({ ...o, [a]: void 0 })), []);
|
||||
return typeof (t == null ? void 0 : t.type) == "string" ? t : h(ot.Provider, { value: { ele: e, mount: n, unmount: r }, children: $.cloneElement(t, { className: e.rootClassName, title: e.title, subTitle: e["sub-title"], actions: e.actions, extras: e.extras }) });
|
||||
};
|
||||
$i.propTypes = { children: b.element.isRequired };
|
||||
const oi = { 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"] }, Ht = ({ type: t, props: e }) => h("i", { ...e, children: h("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", fill: "currentColor", children: (oi[t] || oi.info).map((i, n) => h("path", { d: i }, n)) }) }), Ei = ({ className: t, content: e, icon: i, $close: n }) => F($.Fragment, { children: [i && h("div", { className: R("ff-notification-icon", t), children: h(Ht, { type: i }) }), e] }), vn = ({}) => h(G, { children: "Confirm" });
|
||||
var Se, Be;
|
||||
const oi = { 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"] }, Ht = ({ type: t, props: e }) => h("i", { ...e, children: h("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", fill: "currentColor", children: (oi[t] || oi.info).map((i, n) => h("path", { d: i }, n)) }) }), Ei = ({ className: t, content: e, icon: i, $close: n }) => A($.Fragment, { children: [i && h("div", { className: R("ff-notification-icon", t), children: h(Ht, { type: i }) }), e] }), vn = ({}) => h(G, { children: "Confirm" });
|
||||
var Se, We;
|
||||
const de = class de {
|
||||
constructor() {
|
||||
v(this, Be, /* @__PURE__ */ new Map());
|
||||
P(this, "init", (e) => W(this, Be, new Map(e)));
|
||||
P(this, "check", (e) => !c(this, Be).has(e) || c(this, Be).get(e));
|
||||
v(this, We, /* @__PURE__ */ new Map());
|
||||
P(this, "init", (e) => U(this, We, new Map(e)));
|
||||
P(this, "check", (e) => !c(this, We).has(e) || c(this, We).get(e));
|
||||
if (c(de, Se)) return c(de, Se);
|
||||
}
|
||||
};
|
||||
Se = new WeakMap(), Be = new WeakMap(), v(de, Se, null), P(de, "getInstance", () => (c(de, Se) || W(de, Se, new de()), c(de, Se)));
|
||||
Se = new WeakMap(), We = new WeakMap(), v(de, Se, null), P(de, "getInstance", () => (c(de, Se) || U(de, Se, new de()), c(de, Se)));
|
||||
let It = de;
|
||||
const Si = It.getInstance(), xn = (t, e, i = "children") => {
|
||||
if (m.isEmpty(t)) return {};
|
||||
@@ -103,12 +103,12 @@ var ve, Ge;
|
||||
const ue = class ue {
|
||||
constructor() {
|
||||
v(this, Ge, null);
|
||||
P(this, "init", (e) => W(this, Ge, e));
|
||||
P(this, "init", (e) => U(this, Ge, e));
|
||||
P(this, "get", (e, i) => m.get(c(this, Ge), e, i));
|
||||
if (c(ue, ve)) return c(ue, ve);
|
||||
}
|
||||
};
|
||||
ve = new WeakMap(), Ge = new WeakMap(), v(ue, ve, null), P(ue, "getInstance", () => (c(ue, ve) || W(ue, ve, new ue()), c(ue, ve)));
|
||||
ve = new WeakMap(), Ge = new WeakMap(), v(ue, ve, null), P(ue, "getInstance", () => (c(ue, ve) || U(ue, ve, new ue()), c(ue, ve)));
|
||||
let Vt = ue;
|
||||
const Ve = Vt.getInstance(), si = { null2json: (t) => Object.create(), null2array: (t) => [], null2number: (t) => 0, null2bool: (t) => !1, null2string: (t) => "", null2integer: (t) => 0, null2float: (t) => 0, string2json: (t) => t ? JSON.parse(t) : "{}", string2array: (t) => t.substr(0, 1) === "[" && t.substr(-1) === "]" ? JSON.parse(t) : t.split(","), string2number: (t) => t == "" ? 0 : +t, string2integer: (t) => t == "" ? 0 : +t, string2float: (t) => t == "" ? 0 : +t, string2bool: (t) => {
|
||||
switch (`${t}`.toLowerCase()) {
|
||||
@@ -236,7 +236,7 @@ const $t = class $t {
|
||||
});
|
||||
P(this, "toRender", (e, i, n = null) => $.createElement(c(this, kt), { value: e, record: i }, n));
|
||||
v(this, kt, ({ value: e, record: i, children: n }) => {
|
||||
const [r, a] = L(n);
|
||||
const [r, a] = j(n);
|
||||
return ct(() => {
|
||||
let o = !1;
|
||||
return a(n), this.toValue(e, i).then((s) => !o && a(s)).catch((s) => !o && a(`${s}`)), () => o = !0;
|
||||
@@ -280,32 +280,32 @@ const ne = $.createContext({ listCode: "", classNames: {}, getBase62params: (t,
|
||||
const r = _(Pn(m.get(t, e == null ? void 0 : e.dataIndex))), { listCode: a, onClickCallback: o } = le(ne), [s] = ie.useForm(), { formSetting: l, widgetSetting: u } = n, d = (l == null ? void 0 : l.primaryKey) || "id", p = () => {
|
||||
s.setFieldsValue({ value: m.get(t, e == null ? void 0 : e.dataIndex), __PROPS__: t });
|
||||
};
|
||||
return ct(() => p(), [t, e == null ? void 0 : e.dataIndex, a]), h(G, { actions: F($.Fragment, { children: [h(N, { size: "small", onClick: p, children: "重置" }), F(sn.Compact, { block: !0, children: [h(N, { size: "small", widget: i, children: "取消" }), h(N, { type: "primary", size: "small", widget: () => s.validateFields().then(({ value: f }) => {
|
||||
return ct(() => p(), [t, e == null ? void 0 : e.dataIndex, a]), h(G, { actions: A($.Fragment, { children: [h(N, { size: "small", onClick: p, children: "重置" }), A(sn.Compact, { block: !0, children: [h(N, { size: "small", widget: i, children: "取消" }), h(N, { type: "primary", size: "small", widget: () => s.validateFields().then(({ value: f }) => {
|
||||
const g = m.get(t, d.substring(d.indexOf(".") + 1));
|
||||
if (!g) throw "获取更新主键失败!";
|
||||
I.put(`/api/${a}-storeBy-${e == null ? void 0 : e.uuid}/${g}`, { value: f }).msg(() => o(2, t)).then(i);
|
||||
}).catch(console.warn), children: "保存" })] })] }), children: F(ie, { form: s, children: [h(Gt, { label: "", type: r.current, code: "value", widget: e == null ? void 0 : e.editableByJs, extras: u }), h(_t, { noStyle: !0, name: ["__PROPS__"], children: () => {
|
||||
}).catch(console.warn), children: "保存" })] })] }), children: A(ie, { form: s, children: [h(Gt, { label: "", type: r.current, code: "value", widget: e == null ? void 0 : e.editableByJs, extras: u }), h(_t, { noStyle: !0, name: ["__PROPS__"], children: () => {
|
||||
} })] }) });
|
||||
}, Fn = (t) => function(e) {
|
||||
return t(e, getRecord());
|
||||
}, An = (t, e = {}) => q(() => {
|
||||
}, An = (t, e = {}) => K(() => {
|
||||
var i;
|
||||
return (i = t == null ? void 0 : t.filter(Boolean)) == null ? void 0 : i.map(({ widgetByJs: n, widgetByJsSetting: r, ...a }, o) => {
|
||||
const s = (u) => ({ record: u, column: a });
|
||||
let l = [];
|
||||
return n && l.push([n, r]), l.length > 0 ? (a != null && a.render && l.push([Fn, a.render]), { ...a, onCell: s, render: (u, d) => new wt(l).toRender(u, d, "-") }) : { ...a, onCell: s };
|
||||
});
|
||||
}, [t, e]), Ln = (t = {}) => q(() => {
|
||||
}, [t, e]), Ln = (t = {}) => K(() => {
|
||||
var e;
|
||||
return t.body ?? (t.body = { cell: li }), (e = t.body).cell ?? (e.cell = li), t;
|
||||
}, [t]), Zr = (t) => {
|
||||
const [e, i] = L({});
|
||||
const [e, i] = j({});
|
||||
return V(() => {
|
||||
let n = !1;
|
||||
return t && I.get(`/api/_/${t}`).then((r) => m.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;
|
||||
}, [t]), e;
|
||||
}, ea = (t, e = {}) => {
|
||||
const [i, n] = L({ dataSource: [] });
|
||||
const [i, n] = j({ dataSource: [] });
|
||||
return lt(() => {
|
||||
let r = !1;
|
||||
return t && I.get(`/api/${t}/${I.encode({ page: 1, ...e })}`).then((a) => !r && n(a)), () => r = !0;
|
||||
@@ -315,7 +315,7 @@ const ne = $.createContext({ listCode: "", classNames: {}, getBase62params: (t,
|
||||
return X((a) => t == null ? void 0 : t.filter((o) => !o.uuid || !e.has(o.uuid) || e.get(o.uuid).some((s) => s == r(a))), [t, e, r]);
|
||||
}, Dt = (t = [], e = /* @__PURE__ */ new Map(), i = [], n = "id", r) => {
|
||||
const a = X(r ? (o) => m.get(o, n, m.get(o, [r, n])) : (o) => m.get(o, n), [n, r]);
|
||||
return q(() => {
|
||||
return K(() => {
|
||||
if (m.isEmpty(t) || !t.some(({ uuid: s }) => Si.check(s))) return !1;
|
||||
if (m.isEmpty(e) || m.isEmpty(i)) return !0;
|
||||
const o = i.map((s) => a(s));
|
||||
@@ -333,11 +333,11 @@ const ne = $.createContext({ listCode: "", classNames: {}, getBase62params: (t,
|
||||
const S = m.get(o.current, y > -1 ? [y, "children", w, "children"] : [w, "children"]);
|
||||
o.current = bi(o.current, y > -1 ? { [y]: { children: { $splice: [[w, 1, { ...C, children: S }]] } } } : { $splice: [[w, 1, { ...C, children: S }]] });
|
||||
const E = new Map(k);
|
||||
s.current.forEach((T, O) => {
|
||||
var A;
|
||||
(A = E.get(O)) != null && A.some((M) => M == g) || s.current.set(O, T.filter((M) => M !== g));
|
||||
}), E.forEach((T, O) => {
|
||||
s.current.has(O) ? s.current.set(O, m.uniq([...s.current.get(O) || [], ...T])) : s.current.set(O, T);
|
||||
s.current.forEach((T, F) => {
|
||||
var L;
|
||||
(L = E.get(F)) != null && L.some((D) => D == g) || s.current.set(F, T.filter((D) => D !== g));
|
||||
}), E.forEach((T, F) => {
|
||||
s.current.has(F) ? s.current.set(F, m.uniq([...s.current.get(F) || [], ...T])) : s.current.set(F, T);
|
||||
});
|
||||
}).then(() => {
|
||||
a.current = !0, r();
|
||||
@@ -353,16 +353,16 @@ const ne = $.createContext({ listCode: "", classNames: {}, getBase62params: (t,
|
||||
ct(() => {
|
||||
a.current = [], t && o(e);
|
||||
}, [t, e]);
|
||||
const s = q(() => m.pick(n.current, ["total", "tab", "page", "pageSize", "condition", "sider", "keyword"]), [n.current]);
|
||||
const s = K(() => m.pick(n.current, ["total", "tab", "page", "pageSize", "condition", "sider", "keyword"]), [n.current]);
|
||||
return Object.assign(s, { onTabChange: (l) => o({ tab: l, page: 1 }), onPageChange: (l, u) => o({ page: l, pageSize: u }), onPageSizeChange: (l) => o({ pageSize: l, page: 1 }), onConditionChange: (l, u) => o({ keyword: u, condition: bi(n.current.condition || {}, { $merge: l || {} }), page: 1 }), onSiderChange: (l) => o({ sider: l, page: 1 }), onKeywordChange: (l) => o({ keyword: l, page: 1 }), itemOperationsAccess: r.current, dataSource: a.current, onReload: o, payload: e == null ? void 0 : e.payload });
|
||||
}, Vn = ({ listCode: t, className: e, layouts: i = {}, dataSource: n, isPaginate: r, isItemOperations: a, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: u, resource: d, primaryKey: p, title: f, itemGridLayout: g, $setting: y, tabs: w, isConditionFormLayout: C, isTreeSider: k, treeSiderConfig: S }) => {
|
||||
const { classNames: E, onClickCallback: T } = le(ne), O = m.pick(y, ["column", "colWidth", "beforeRender", "afterRender", "style"]), A = Ti(l, u, p, d), M = X((D, j, z) => h(Mn, { className: R("ff-data-list-framework-item", E.item), operations: a ? A(j) : [], data: d ? { [d]: j } : j, children: D, onClickCallback: T }), [d, p, a, T, l, u]);
|
||||
return F("div", { className: R("ff-data-list-framework", e), children: [h(i.sider, { isTreeSider: k, ...S }), F("div", { className: R("ff-data-list-container", E == null ? void 0 : E.container), children: [h(i.filter, { isConditionFormLayout: C }), h(i.toolbar, { title: f, tabs: w }), h(Xn, { ...O, ...g, primaryKey: p, itemRender: M, dataSource: n }), h(i.footer, { isPaginate: r, isOperations: o, operations: s })] })] });
|
||||
}, Mn = ({ className: t, operations: e, children: i, data: n, onClickCallback: r }) => F("div", { className: R("data-list-grid-layout-item", t), children: [h("div", { className: "data-list-grid-layout-item-container", children: i }), !!(e != null && e.length) && h("div", { className: "data-list-grid-layout-item-actions", children: e.map((a) => h("span", { className: "data-list-grid-layout-item-action", children: h(N.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: (o) => o !== !1 && (r == null ? void 0 : r(a.isRefresh, n)) }, a.uuid || Lt()) }, (a == null ? void 0 : a.uuid) || Lt())) })] }), Dn = ({ listCode: t, className: e, layouts: i = {}, dataSource: n, columns: r, isItemOperations: a, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: u, resource: d, primaryKey: p, title: f, tabs: g, isPaginate: y, isTreeSider: w, treeSiderConfig: C, isConditionFormLayout: k, ...S }) => {
|
||||
const { classNames: E, onClickCallback: T } = le(ne), O = Ti(l, u, p, d), A = Dt(l, u, n, p, d);
|
||||
return F("div", { className: R("ff-data-table-framework", e), children: [h(i.sider, { isTreeSider: w, ...C }), F("div", { className: R("ff-data-table-container", E == null ? void 0 : E.container), children: [h(i.filter, { isConditionFormLayout: k }), h(i.toolbar, { title: f, tabs: g }), h(Kn, { ...S, primaryKey: p, className: "ff-data-table-content", columns: r, dataSource: n, operationRender: A ? (M) => {
|
||||
var D;
|
||||
return h("div", { className: "ff-data-table-actions", children: (D = O(M)) == null ? void 0 : D.map((j, z) => h(N.Link, { size: "small", uuid: j.uuid, type: j.type, name: j.name, widget: j.widget, widgetType: j.widgetType, widgetProps: j.widgetProps, widgetData: j.widgetData, widgetSetting: j.widgetSetting, widgetContainerProps: j.widgetContainerSetting, data: M, confirm: j.confirm, onAfterClick: (x) => x !== !1 && (T == null ? void 0 : T(j.isRefresh, M)) }, j.uuid || z)) });
|
||||
const { classNames: E, onClickCallback: T } = le(ne), F = m.pick(y, ["column", "colWidth", "beforeRender", "afterRender", "style"]), L = Ti(l, u, p, d), D = X((W, O, M) => h(Mn, { className: R("ff-data-list-framework-item", E.item), operations: a ? L(O) : [], data: d ? { [d]: O } : O, children: W, onClickCallback: T }), [d, p, a, T, l, u]);
|
||||
return A("div", { className: R("ff-data-list-framework", e), children: [h(i.sider, { isTreeSider: k, ...S }), A("div", { className: R("ff-data-list-container", E == null ? void 0 : E.container), children: [h(i.filter, { isConditionFormLayout: C }), h(i.toolbar, { title: f, tabs: w }), h(Xn, { ...F, ...g, primaryKey: p, itemRender: D, dataSource: n }), h(i.footer, { isPaginate: r, isOperations: o, operations: s })] })] });
|
||||
}, Mn = ({ className: t, operations: e, children: i, data: n, onClickCallback: r }) => A("div", { className: R("data-list-grid-layout-item", t), children: [h("div", { className: "data-list-grid-layout-item-container", children: i }), !!(e != null && e.length) && h("div", { className: "data-list-grid-layout-item-actions", children: e.map((a) => h("span", { className: "data-list-grid-layout-item-action", children: h(N.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: (o) => o !== !1 && (r == null ? void 0 : r(a.isRefresh, n)) }, a.uuid || Lt()) }, (a == null ? void 0 : a.uuid) || Lt())) })] }), Dn = ({ listCode: t, className: e, layouts: i = {}, dataSource: n, columns: r, isItemOperations: a, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: u, resource: d, primaryKey: p, title: f, tabs: g, isPaginate: y, isTreeSider: w, treeSiderConfig: C, isConditionFormLayout: k, ...S }) => {
|
||||
const { classNames: E, onClickCallback: T } = le(ne), F = Ti(l, u, p, d), L = Dt(l, u, n, p, d);
|
||||
return A("div", { className: R("ff-data-table-framework", e), children: [h(i.sider, { isTreeSider: w, ...C }), A("div", { className: R("ff-data-table-container", E == null ? void 0 : E.container), children: [h(i.filter, { isConditionFormLayout: k }), h(i.toolbar, { title: f, tabs: g }), h(Kn, { ...S, primaryKey: p, className: "ff-data-table-content", columns: r, dataSource: n, operationRender: L ? (D) => {
|
||||
var W;
|
||||
return h("div", { className: "ff-data-table-actions", children: (W = F(D)) == null ? void 0 : W.map((O, M) => h(N.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: D, confirm: O.confirm, onAfterClick: (x) => x !== !1 && (T == null ? void 0 : T(O.isRefresh, D)) }, O.uuid || M)) });
|
||||
} : null }), h(i.footer, { isPaginate: y, isOperations: o, operations: s })] })] });
|
||||
}, Jt = (t = [], e, i = null) => {
|
||||
var n;
|
||||
@@ -372,7 +372,7 @@ const ne = $.createContext({ listCode: "", classNames: {}, getBase62params: (t,
|
||||
return r != null && r.autoHeight ? o.height = "fit-content" : o["--grid-layout-row"] = `${n}`, r != null && r.alignItems && (o["--grid-layout-box-align-items"] = r.alignItems), r != null && r.justifyContent && (o["--grid-layout-box-justify-content"] = r.justifyContent), o["--grid-layout-box-margin"] = ci(r == null ? void 0 : r.marginTop, r == null ? void 0 : r.marginRight, r == null ? void 0 : r.marginBottom, r == null ? void 0 : r.marginLeft), o["--grid-layout-box-padding"] = ci(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 && (o.height = `${a}px`), o;
|
||||
}, ci = (t, e, i, n) => `${t || 0}px ${e || 0}px ${i || 0}px ${n || 0}px`, ta = (t = "Text", e = "@pkg/ff/grid-layouts") => t != null && t.startsWith("@") || t != null && t.startsWith("blob:") ? t : `${e}/${t}`, Oi = ({ className: t, isConditionFormLayout: e }) => {
|
||||
var f, g;
|
||||
const [i, n] = L({}), { listCode: r, onKeywordChange: a, onConditionChange: o, getBase62params: s, classNames: l } = $.useContext(ne), { keyword: u, condition: d } = (s == null ? void 0 : s()) || {}, [p] = mt.useForm();
|
||||
const [i, n] = j({}), { listCode: r, onKeywordChange: a, onConditionChange: o, getBase62params: s, classNames: l } = $.useContext(ne), { keyword: u, condition: d } = (s == null ? void 0 : s()) || {}, [p] = mt.useForm();
|
||||
return V(() => {
|
||||
r && e && I.get(`/api/_/${r}/list-condition-form-layout`).then(({ resource: y, marginX: w, marginY: C, rowHeight: k, cols: S, fields: E }) => {
|
||||
n({ resource: y, itemMargin: [w, C], rowHeight: k, cols: S, fields: E });
|
||||
@@ -387,40 +387,40 @@ const ne = $.createContext({ listCode: "", classNames: {}, getBase62params: (t,
|
||||
p.setFieldsValue({ keyword: y, ...w });
|
||||
} }) }) : h("div", { className: "ff-data-list-filter-default-form ff-grid-layout-form", children: h("div", { className: "grid-layout-item", style: Ri(20, 0, 5, 2), children: h(mt.Item, { name: ["keyword"], children: h(ln.Search, { allowClear: !0, enterButton: "搜索", placeholder: "多关键字 | 分割", onSearch: (y) => a(y) }) }) }) }) }) });
|
||||
}, zn = ({ cols: t, fields: e, onReset: i }) => {
|
||||
const [n, r] = L(!1), a = q(() => e == null ? void 0 : e.toReversed().some((o) => o.y > 1 || o.x + o.w >= t - 5), [t, e]);
|
||||
return F(mt.Item, { label: " ", style: { "--item-span": 5 }, className: R("ff-data-list-filter-actions", { expanded: n }), children: [h(yt, { onClick: i, children: "重置" }), h(yt, { type: "primary", htmlType: "submit", children: "查询" }), a && h(N.Link, { className: "ff-data-list-filter-expanded-button", widget: () => r((o) => !o), type: "primary", name: n ? "关闭" : "展开", icon: n ? "icon-up" : "icon-down", iconPosition: "end" })] });
|
||||
const [n, r] = j(!1), a = K(() => e == null ? void 0 : e.toReversed().some((o) => o.y > 1 || o.x + o.w >= t - 5), [t, e]);
|
||||
return A(mt.Item, { label: " ", style: { "--item-span": 5 }, className: R("ff-data-list-filter-actions", { expanded: n }), children: [h(yt, { onClick: i, children: "重置" }), h(yt, { type: "primary", htmlType: "submit", children: "查询" }), a && h(N.Link, { className: "ff-data-list-filter-expanded-button", widget: () => r((o) => !o), type: "primary", name: n ? "关闭" : "展开", icon: n ? "icon-up" : "icon-down", iconPosition: "end" })] });
|
||||
};
|
||||
Oi.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 Bn = ({ className: t, operations: e, isOperations: i, isPaginate: n }) => {
|
||||
const { onPageChange: r, onPageSizeChange: a, onClickCallback: o, getBase62params: s } = $.useContext(ne), { total: l, page: u, pageSize: d } = (s == null ? void 0 : s()) || {};
|
||||
return i && !m.isEmpty(e) || n ? F("div", { className: R("ff-data-list-footer", t), children: [h("div", { className: "ff-data-list-actions", children: e == null ? void 0 : e.map((p, f) => h(N, { 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: (g) => g !== !1 && (o == null ? void 0 : o(p.isRefresh, null)) }, p.uuid || f)) }), n && h(cn, { size: "small", total: l, pageSize: d, showSizeChanger: !1, showTotal: (p) => `第 ${u} 页 / 总共 ${p} 条`, onChange: r, onShowSizeChange: a })] }) : null;
|
||||
return i && !m.isEmpty(e) || n ? A("div", { className: R("ff-data-list-footer", t), children: [h("div", { className: "ff-data-list-actions", children: e == null ? void 0 : e.map((p, f) => h(N, { 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: (g) => g !== !1 && (o == null ? void 0 : o(p.isRefresh, null)) }, p.uuid || f)) }), n && h(cn, { size: "small", total: l, pageSize: d, showSizeChanger: !1, showTotal: (p) => `第 ${u} 页 / 总共 ${p} 条`, onChange: r, onShowSizeChange: a })] }) : null;
|
||||
}, Wn = [{ 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: h("span", { style: { color: "#1677ff" }, children: "sss" }), key: "0-0-1-0" }] }] }], Un = ({ className: t, width: e = 280, isTreeSider: i }) => {
|
||||
const { classNames: n } = le(ne);
|
||||
return i ? h(dn.DirectoryTree, { className: R("ff-data-list-sider", n.sider, t), style: { "--sider-width": e }, showLine: !0, showIcon: !1, treeData: Wn }) : null;
|
||||
}, qn = ({ className: t, title: e, tabs: i }) => {
|
||||
const { getBase62params: n, onTabChange: r, onReload: a, classNames: o } = le(ne), { tab: s } = (n == null ? void 0 : n()) || {}, [l, u] = yn((i == null ? void 0 : i[0].value) ?? (i == null ? void 0 : i[0].code), { value: s, onChange: r });
|
||||
return F("div", { className: R("ff-data-list-toolbar", o.toolbar, t), children: [h("div", { className: "ff-data-list-title", children: e }), h(un, { className: "ff-data-list-tabs", itemRender: ({ label: d, code: p, value: f }) => h("span", { onClick: () => u(f ?? p), className: R("ff-data-list-tab", { active: (f ?? p) == l }), children: d }), items: i }), F("div", { className: "ff-data-list-actions", children: [h(N.Link, { icon: "icon-reload", widget: () => a() }), h(N.Link, { icon: "icon-setting" })] })] });
|
||||
}, Fi = ({ isItemGridLayout: t, theme: e, themeProps: i, onClickCallback: n, onReload: r, listCode: a, total: o = 0, page: s = 0, onPageChange: l, pageSize: u = 30, onPageSizeChange: d, tab: p, onTabChange: f, keyword: g, onKeywordChange: y, condition: w, onConditionChange: C, sider: k, onSiderChange: S, layouts: E, classNames: T = {}, payload: O = {}, ...A }) => {
|
||||
const [M, D] = L(), j = X((x, K) => {
|
||||
const B = { tab: p, page: s, pageSize: u, keyword: g, sider: k, condition: w, total: o, payload: O };
|
||||
return x && x != "init" ? m.get(B, x, K) : B;
|
||||
}, [JSON.stringify(w), JSON.stringify(O), p, s, u, g, k, o]), z = q(() => {
|
||||
return A("div", { className: R("ff-data-list-toolbar", o.toolbar, t), children: [h("div", { className: "ff-data-list-title", children: e }), h(un, { className: "ff-data-list-tabs", itemRender: ({ label: d, code: p, value: f }) => h("span", { onClick: () => u(f ?? p), className: R("ff-data-list-tab", { active: (f ?? p) == l }), children: d }), items: i }), A("div", { className: "ff-data-list-actions", children: [h(N.Link, { icon: "icon-reload", widget: () => a() }), h(N.Link, { icon: "icon-setting" })] })] });
|
||||
}, Fi = ({ isItemGridLayout: t, theme: e, themeProps: i, onClickCallback: n, onReload: r, listCode: a, total: o = 0, page: s = 0, onPageChange: l, pageSize: u = 30, onPageSizeChange: d, tab: p, onTabChange: f, keyword: g, onKeywordChange: y, condition: w, onConditionChange: C, sider: k, onSiderChange: S, layouts: E, classNames: T = {}, payload: F = {}, ...L }) => {
|
||||
const [D, W] = j(), O = X((x, B) => {
|
||||
const z = { tab: p, page: s, pageSize: u, keyword: g, sider: k, condition: w, total: o, payload: F };
|
||||
return x && x != "init" ? m.get(z, x, B) : z;
|
||||
}, [JSON.stringify(w), JSON.stringify(F), p, s, u, g, k, o]), M = K(() => {
|
||||
let x = { sider: Un, filter: Oi, footer: Bn, toolbar: qn };
|
||||
E === !1 ? x = { sider: null, filter: null, footer: null, toolbar: null } : m.isPlainObject(E) && (x = Object.assign({}, x, E));
|
||||
for (const K in x) if (x[K]) {
|
||||
if (nn(x[K])) {
|
||||
const B = x[K];
|
||||
x[K] = (Ee) => $.cloneElement(B, Ee);
|
||||
for (const B in x) if (x[B]) {
|
||||
if (nn(x[B])) {
|
||||
const z = x[B];
|
||||
x[B] = (Ee) => $.cloneElement(z, Ee);
|
||||
}
|
||||
} else x[K] = () => h($.Fragment, {});
|
||||
} else x[B] = () => h($.Fragment, {});
|
||||
return x;
|
||||
}, [E]);
|
||||
return V(() => {
|
||||
e ? se.getWidgetComponent(e).then((x) => {
|
||||
if (!x) throw `${e} not found`;
|
||||
return x;
|
||||
}).catch((x) => ({ default: () => `${x}` })).then((x) => D($.createElement(x.default, { ...A, layouts: z, $setting: i }))) : D(h(t ? Vn : Dn, { ...A, layouts: z, $setting: i }));
|
||||
}, [e, i]), h(ne.Provider, { value: { classNames: T, listCode: a, onClickCallback: n, onReload: r, getBase62params: j, onPageChange: l, onPageSizeChange: d, onTabChange: f, onSiderChange: S, onKeywordChange: y, onConditionChange: C, setPage: l, setPageSize: d, setTab: f, setSider: S, setKeyword: y, setCondition: C }, children: M && $.cloneElement(M, A) });
|
||||
}).catch((x) => ({ default: () => `${x}` })).then((x) => W($.createElement(x.default, { ...L, layouts: M, $setting: i }))) : W(h(t ? Vn : Dn, { ...L, layouts: M, $setting: i }));
|
||||
}, [e, i]), h(ne.Provider, { value: { classNames: T, listCode: a, onClickCallback: n, onReload: r, getBase62params: O, onPageChange: l, onPageSizeChange: d, onTabChange: f, onSiderChange: S, onKeywordChange: y, onConditionChange: C, setPage: l, setPageSize: d, setTab: f, setSider: S, setKeyword: y, setCondition: C }, children: D && $.cloneElement(D, L) });
|
||||
};
|
||||
Fi.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 xe, be, je, Et;
|
||||
@@ -430,7 +430,7 @@ const pe = class pe {
|
||||
v(this, je, /* @__PURE__ */ new Map());
|
||||
v(this, Et, () => {
|
||||
if (c(this, be)) return c(this, be).port.postMessage({ command: "status", data: [] });
|
||||
W(this, be, new SharedWorker(new URL("/ff-worker/res-ws.js", self.location))), c(this, be).port.onmessage = (e) => {
|
||||
U(this, be, new SharedWorker(new URL("/ff-worker/res-ws.js", self.location))), c(this, be).port.onmessage = (e) => {
|
||||
var i, n;
|
||||
(i = e.data) != null && i.uuid ? c(this, je).forEach((r, a) => {
|
||||
var o;
|
||||
@@ -445,20 +445,20 @@ const pe = class pe {
|
||||
if (c(pe, xe)) return c(pe, xe);
|
||||
}
|
||||
};
|
||||
xe = new WeakMap(), be = new WeakMap(), je = new WeakMap(), Et = new WeakMap(), v(pe, xe, null), P(pe, "getInstance", () => (c(pe, xe) || W(pe, xe, new pe()), c(pe, xe)));
|
||||
xe = new WeakMap(), be = new WeakMap(), je = new WeakMap(), Et = new WeakMap(), v(pe, xe, null), P(pe, "getInstance", () => (c(pe, xe) || U(pe, xe, new pe()), c(pe, xe)));
|
||||
let zt = pe;
|
||||
const Ai = zt.getInstance(), Yt = $.forwardRef(({ listCode: t, base62params: e, className: i, theme: n, themeProps: r, layouts: a, classNames: o }, s) => {
|
||||
const [{ resource: l, primaryKey: u, batchOperations: d = [], itemOperations: p = [], columns: f = [], themeConfig: g, theme: y, isConditionFormLayout: w = !1, isTreeSider: C, treeSiderConfig: k, isItemGridLayout: S, itemGridLayout: { themeConfig: E, ...T } = {}, title: O, isPaginate: A, tabs: M }, D] = L({ isItemGridLayout: !1, itemGridLayout: {} }), j = In(t, e), [{ dataSource: z, itemOperationsAccess: x, condition: K, tab: B, keyword: Ee, page: ut, total: pt, pageSize: Nt, sider: te, onConditionChange: Ui, onTabChange: qi, onKeywordChange: Ki, onPageChange: _i, onPageSizeChange: Hi, onSiderChange: Ji, onReload: Tt, payload: Yi }, ti] = jn(j, t, u, l), Gi = Dt(p, x, z, u), Xi = Dt(d);
|
||||
const [{ resource: l, primaryKey: u, batchOperations: d = [], itemOperations: p = [], columns: f = [], themeConfig: g, theme: y, isConditionFormLayout: w = !1, isTreeSider: C, treeSiderConfig: k, isItemGridLayout: S, itemGridLayout: { themeConfig: E, ...T } = {}, title: F, isPaginate: L, tabs: D }, W] = j({ isItemGridLayout: !1, itemGridLayout: {} }), O = In(t, e), [{ dataSource: M, itemOperationsAccess: x, condition: B, tab: z, keyword: Ee, page: ut, total: pt, pageSize: Nt, sider: te, onConditionChange: Ui, onTabChange: qi, onKeywordChange: Ki, onPageChange: _i, onPageSizeChange: Hi, onSiderChange: Ji, onReload: Tt, payload: Yi }, ti] = jn(O, t, u, l), Gi = Dt(p, x, M, u), Xi = Dt(d);
|
||||
V(() => {
|
||||
let re = null;
|
||||
return t && I.get(`/api/_/${t}`).resp(({ data: gt, res: Zi }) => {
|
||||
gt != null && gt.isDynamicRefresh && (re = Ai.subscribe(() => Tt(), Zi)), D(gt);
|
||||
}).catch(() => D({})), () => re == null ? void 0 : re();
|
||||
gt != null && gt.isDynamicRefresh && (re = Ai.subscribe(() => Tt(), Zi)), W(gt);
|
||||
}).catch(() => W({})), () => re == null ? void 0 : re();
|
||||
}, [t]), $.useImperativeHandle(s, () => ({ onReload: Tt, onClickCallback: ti }));
|
||||
const Qi = { listCode: t, title: O, classNames: o, layouts: a, resource: l, primaryKey: u, theme: n || y, themeProps: r || g, isTreeSider: C, treeSiderConfig: k, isPaginate: A, tabs: M, isItemOperations: Gi, itemOperations: p == null ? void 0 : p.map((re) => m.isEmpty(re == null ? void 0 : re.confirm) ? re : { ...re, confirm: Object.assign({}, re.confirm, { getPopupContainer: () => document.body }) }), isBatchOperations: Xi, batchOperations: d, isItemGridLayout: S, columns: f, itemGridLayout: { ...T, themeProps: E }, isConditionFormLayout: w, itemOperationsAccess: x, dataSource: z, onConditionChange: Ui, onTabChange: qi, onKeywordChange: Ki, onPageChange: _i, onPageSizeChange: Hi, onSiderChange: Ji, condition: K, tab: B, keyword: Ee, page: ut, total: pt, pageSize: Nt, sider: te, payload: Yi };
|
||||
const Qi = { listCode: t, title: F, classNames: o, layouts: a, resource: l, primaryKey: u, theme: n || y, themeProps: r || g, isTreeSider: C, treeSiderConfig: k, isPaginate: L, tabs: D, isItemOperations: Gi, itemOperations: p == null ? void 0 : p.map((re) => m.isEmpty(re == null ? void 0 : re.confirm) ? re : { ...re, confirm: Object.assign({}, re.confirm, { getPopupContainer: () => document.body }) }), isBatchOperations: Xi, batchOperations: d, isItemGridLayout: S, columns: f, itemGridLayout: { ...T, themeProps: E }, isConditionFormLayout: w, itemOperationsAccess: x, dataSource: M, onConditionChange: Ui, onTabChange: qi, onKeywordChange: Ki, onPageChange: _i, onPageSizeChange: Hi, onSiderChange: Ji, condition: B, tab: z, keyword: Ee, page: ut, total: pt, pageSize: Nt, sider: te, payload: Yi };
|
||||
return h(Fi, { ...Qi, className: R("ff-data-list-helper", i), onReload: Tt, onClickCallback: ti });
|
||||
}), Li = (t, e, i = !0) => i !== !0 && i-- <= 0 ? [] : m.isArray(t) && !m.isEmpty(t) ? t.reduce((n, r) => (Reflect.has(r, e) && Reflect.has(r, "children") && n.push(r[e]), Reflect.has(r, "children") && !m.isEmpty(r.children) ? n.concat(Li(r.children, e, i)) : n), []) : [], Kn = ({ className: t, primaryKey: e, columns: i = [], dataSource: n = [], operationRender: r, operationWidth: a = 180, components: o = {}, ...s }) => {
|
||||
const { classNames: l } = le(ne), u = _(null), d = _(null), [p, f] = L([]), [g, y] = L({ width: 0, height: 0 });
|
||||
const { classNames: l } = le(ne), u = _(null), d = _(null), [p, f] = j([]), [g, y] = j({ width: 0, height: 0 });
|
||||
V(() => {
|
||||
f(Li(n, e));
|
||||
}, [n, e]), rn(() => {
|
||||
@@ -478,7 +478,7 @@ const Ai = zt.getInstance(), Yt = $.forwardRef(({ listCode: t, base62params: e,
|
||||
t && I.get(`/api/_/${t}`).then(({ uuid: n, code: r, name: a, resource: o, primaryKey: s, marginX: l, marginY: u, cols: d, rowHeight: p, fields: f, theme: g, themeSetting: y, groups: w }) => ({ uuid: n, code: r, name: a, resource: o, primaryKey: s, marginX: l, marginY: u, cols: d, rowHeight: p, theme: g, themeProps: y, groups: w, items: f })).then(i);
|
||||
}, [t]), e;
|
||||
}, Jn = (t, { initialValue: e, initialValueLanguage: i, convertJs: n, convertJsSetting: r, type: a = "string" }, o = null) => {
|
||||
const s = _(!1), l = le(wi), [u, d] = L(), [p, f] = L(i != "javascript" && t ? l.getFieldValue(t) : void 0), { registerWatch: g } = l.getInternalHooks(_n) || {};
|
||||
const s = _(!1), l = le(wi), [u, d] = j(), [p, f] = j(i != "javascript" && t ? l.getFieldValue(t) : void 0), { registerWatch: g } = l.getInternalHooks(_n) || {};
|
||||
return V(() => g == null ? void 0 : g((y, w, C) => {
|
||||
if (!s.current) return;
|
||||
const k = m.get(w, t);
|
||||
@@ -490,8 +490,8 @@ const Ai = zt.getInstance(), Yt = $.forwardRef(({ listCode: t, base62params: e,
|
||||
d(y), console.error("布局数据转换错误: ", y, n);
|
||||
});
|
||||
}, [p, n, r]), [u ?? p, p];
|
||||
}, ia = (t, e, i = null) => q(() => Jt(t, e, i), [t]), ji = (t, e, i = {}, n = {}, r = {}, a = null) => {
|
||||
const o = le(wi), s = xt(), l = _(!0), u = _([]), [d, p] = L(e), [f, g] = L(), y = ie.useWatch((w) => JSON.stringify(m.pick(w, u.current)), o) || "{}";
|
||||
}, ia = (t, e, i = null) => K(() => Jt(t, e, i), [t]), ji = (t, e, i = {}, n = {}, r = {}, a = null) => {
|
||||
const o = le(wi), s = xt(), l = _(!0), u = _([]), [d, p] = j(e), [f, g] = j(), y = ie.useWatch((w) => JSON.stringify(m.pick(w, u.current)), o) || "{}";
|
||||
return ct(() => {
|
||||
t && Fe.exec(t, i, { ...n, getFieldValueForBasicForm: (w) => r ? r.getFieldValue(w) : null, getFieldValue: m.wrap(o.getFieldValue, (w, C) => (u.current.some((k) => m.isEqual(k, C)) || (u.current.push(C), s()), w == null ? void 0 : w(C))), isFieldTouched: o.isFieldTouched, isFieldsTouched: o.isFieldsTouched }).then((w) => {
|
||||
l.current && (p(w), g(null));
|
||||
@@ -500,48 +500,48 @@ const Ai = zt.getInstance(), Yt = $.forwardRef(({ listCode: t, base62params: e,
|
||||
});
|
||||
}, [t, y, o, i, n]), V(() => () => l.current = !1, []), t ? [a ? oe(d, a) : d, f] : [a ? oe(e, a) : e, null];
|
||||
}, Yn = ({ widget: t, widgetPrefix: e = "@pkg/ff/grid-layouts", basicForm: i, ...n }) => {
|
||||
const r = t != null && t.startsWith("@") || t != null && t.startsWith("blob:") ? t : `${e}/${t}`, [a, o] = L();
|
||||
const r = t != null && t.startsWith("@") || t != null && t.startsWith("blob:") ? t : `${e}/${t}`, [a, o] = j();
|
||||
return V(() => {
|
||||
r && se.getWidgetComponent(r).then(({ defaultProps: s = {}, default: l }) => ({ default: Gn(l, s, i) })).catch((s) => ({ default: () => `${s}` })).then((s) => o($.createElement(s.default, n)));
|
||||
}, [r]), a;
|
||||
}, Gn = (t, e = {}, i = null) => (n) => {
|
||||
const { code: r, label: a, extras: o, isVirtual: s, initialValue: l, initialValueLanguage: u, convertJs: d, convertJsSetting: p, value: f, ...g } = m.merge({}, e, n), [y, w] = Jn(s ? null : r, { initialValue: l, initialValueLanguage: u, convertJs: d, convertJsSetting: p, type: (g == null ? void 0 : g.type) || "string" }, i), C = q(() => {
|
||||
const { code: r, label: a, extras: o, isVirtual: s, initialValue: l, initialValueLanguage: u, convertJs: d, convertJsSetting: p, value: f, ...g } = m.merge({}, e, n), [y, w] = Jn(s ? null : r, { initialValue: l, initialValueLanguage: u, convertJs: d, convertJsSetting: p, type: (g == null ? void 0 : g.type) || "string" }, i), C = K(() => {
|
||||
const E = Object.keys((e == null ? void 0 : e.extras) || {});
|
||||
return m.over([m.partialRight(m.pick, E), m.partialRight(m.omit, E)]);
|
||||
}, [e == null ? void 0 : e.extras]), [k, S] = C(g);
|
||||
return h(t, { ...S, value: y, rawValue: w, $setting: Object.assign({}, o, k) });
|
||||
}, Ii = ({ theme: t, basicForm: e, items: i = [{ key: "default", label: "默认" }], fields: n = [], itemRender: r, chunks: a = [], children: o, $setting: s = {}, ...l }) => {
|
||||
const [u, d] = L();
|
||||
const [u, d] = j();
|
||||
V(() => {
|
||||
t ? se.getWidgetComponent(t).then((f) => {
|
||||
if (!(f != null && f.default)) throw "not found";
|
||||
return f;
|
||||
}).catch((f) => ({ default: () => `${t} ${f}` })).then((f) => d($.createElement(f.default, {}))) : d(null);
|
||||
}, [t]);
|
||||
const p = q(() => i == null ? void 0 : i.map((f) => ({ ...f, children: r(f, n == null ? void 0 : n.filter((g) => !(g != null && g.group) && f.key == "default" || g.group == f.key), f.key == "default" ? o : null) })).concat(a), [i, o, a]);
|
||||
const p = K(() => i == null ? void 0 : i.map((f) => ({ ...f, children: r(f, n == null ? void 0 : n.filter((g) => !(g != null && g.group) && f.key == "default" || g.group == f.key), f.key == "default" ? o : null) })).concat(a), [i, o, a]);
|
||||
return u && $.cloneElement(u, { items: p, basicForm: e, $setting: { ...s, ...l } });
|
||||
}, Vi = ({ name: t, form: e = null, basicForm: i = null, style: n = {}, className: r, cols: a = 12, rowHeight: o = 21, containerPadding: s = [0, 0], itemMargin: l = [4, 0], formProps: u = {}, formFields: d = [], fields: p = [], data: f, theme: g, themeProps: y = {}, groups: w = [{ key: "default", label: "默认" }], children: C, ...k }) => {
|
||||
const [S] = ie.useForm(e), E = q(() => [{ name: "__PROPS__", value: u }].concat(d), [u, d]);
|
||||
const [S] = ie.useForm(e), E = K(() => [{ name: "__PROPS__", value: u }].concat(d), [u, d]);
|
||||
lt(() => (S.setFieldsValue(f), () => S.resetFields()), [f]);
|
||||
const T = (O, A, M) => {
|
||||
const D = Jt(A, Yn, i);
|
||||
return F("div", { className: R("ff-grid-layout", r), style: { ...n, "--grid-layout-item-margin-y": `${(l == null ? void 0 : l[0]) || 0}px`, "--grid-layout-item-margin-x": `${(l == null ? void 0 : l[1]) || 0}px`, "--grid-layout-container-padding-y": `${(s == null ? void 0 : s[0]) || 0}px`, "--grid-layout-container-padding-x": `${(s == null ? void 0 : s[1]) || 0}px`, "--grid-layout-cols": a, "--grid-layout-row-height": `${o}px` }, children: [D, M && $.cloneElement(M, { cols: a, rowHeight: o, itemMargin: l, containerPadding: s, fields: A, basicForm: i })] });
|
||||
const T = (F, L, D) => {
|
||||
const W = Jt(L, Yn, i);
|
||||
return A("div", { className: R("ff-grid-layout", r), style: { ...n, "--grid-layout-item-margin-y": `${(l == null ? void 0 : l[0]) || 0}px`, "--grid-layout-item-margin-x": `${(l == null ? void 0 : l[1]) || 0}px`, "--grid-layout-container-padding-y": `${(s == null ? void 0 : s[0]) || 0}px`, "--grid-layout-container-padding-x": `${(s == null ? void 0 : s[1]) || 0}px`, "--grid-layout-cols": a, "--grid-layout-row-height": `${o}px` }, children: [W, D && $.cloneElement(D, { cols: a, rowHeight: o, itemMargin: l, containerPadding: s, fields: L, basicForm: i })] });
|
||||
};
|
||||
return h(ie, { ...k, fields: E, form: S, component: !1, children: g ? h(Ii, { ...y, items: w, theme: g, itemRender: T, fields: p, children: C, basicForm: i }) : T(0, p, C) });
|
||||
}, na = /* @__PURE__ */ ((t) => function({ code: e, data: i, ...n }) {
|
||||
const { uuid: r, resource: a, items: o, hides: s, rowHeight: l, marginX: u, marginY: d, cols: p, theme: f, themeProps: g, groups: y } = Hn(e) || {}, w = q(() => [{ name: "__RESOURCE__", value: a }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: r }], [e, r, a]);
|
||||
const { uuid: r, resource: a, items: o, hides: s, rowHeight: l, marginX: u, marginY: d, cols: p, theme: f, themeProps: g, groups: y } = Hn(e) || {}, w = K(() => [{ name: "__RESOURCE__", value: a }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: r }], [e, r, a]);
|
||||
return a && h(t, { name: e, theme: f, themeProps: g, groups: y, ...n, fields: o, formFields: w, rowHeight: l, cols: p, itemMargin: [u, d], data: a ? { [a]: i } : i });
|
||||
})(Vi), Xn = ({ column: t = 0, colWidth: e = 0, cols: i, rowHeight: n, itemMargin: r, fields: a, primaryKey: o, dataSource: s, itemClassName: l, beforeRender: u = null, afterRender: d = null, itemRender: p = (S, E, T) => S, empty: f = h(gn, { description: null }), className: g, style: y = {}, theme: w, themeProps: C = {}, groups: k = [{ key: "default", label: "默认" }] }) => {
|
||||
const { classNames: S } = le(ne), E = q(() => h(Vi, { groups: k, theme: w, themeProps: C, cols: i, rowHeight: n, itemMargin: r, fields: a, className: l }), [a, i, n, r, k, w, C]), T = m.isEmpty(s);
|
||||
return F("div", { className: R("ff-data-list-content", S.content, g), style: Object.assign({}, y, t && { "--col-num": t }, e && { "--col-width": e }), children: [u == null ? void 0 : u(s), T ? f : s.map((O, A) => {
|
||||
const M = p($.cloneElement(E, { data: O }), O, A);
|
||||
return $.cloneElement(M, { key: `${(O == null ? void 0 : O[o]) ?? A}-${Nn(O)}` });
|
||||
const { classNames: S } = le(ne), E = K(() => h(Vi, { groups: k, theme: w, themeProps: C, cols: i, rowHeight: n, itemMargin: r, fields: a, className: l }), [a, i, n, r, k, w, C]), T = m.isEmpty(s);
|
||||
return A("div", { className: R("ff-data-list-content", S.content, g), style: Object.assign({}, y, t && { "--col-num": t }, e && { "--col-width": e }), children: [u == null ? void 0 : u(s), T ? f : s.map((F, L) => {
|
||||
const D = p($.cloneElement(E, { data: F }), F, L);
|
||||
return $.cloneElement(D, { key: `${(F == null ? void 0 : F[o]) ?? L}-${Nn(F)}` });
|
||||
}), d == null ? void 0 : d(s)] });
|
||||
}, Qn = ({ component: t, $props: e }) => {
|
||||
const { base62params: i } = st(e, {});
|
||||
return h(G, { children: h(Yt, { listCode: t, base62params: I.decode(i) }) });
|
||||
}, ra = () => h(Mi, {}), Mi = () => "Empty", Zn = ({ component: t, $setting: e, $props: i }) => {
|
||||
const [n, r] = L();
|
||||
const [n, r] = j();
|
||||
V(() => {
|
||||
if (!t) return r(h(Mi, { description: null }));
|
||||
se.getWidgetComponent(t).catch((o) => ({ default: () => `${o}` })).then((o) => $.createElement(o.default, { $setting: e })).then(r);
|
||||
@@ -556,7 +556,7 @@ const ge = class ge {
|
||||
v(this, Ne, {});
|
||||
v(this, Te, null);
|
||||
P(this, "init", (e, i) => {
|
||||
W(this, ae, e), W(this, Ne, i);
|
||||
U(this, ae, e), U(this, Ne, i);
|
||||
});
|
||||
P(this, "get", (e) => (c(this, ae).has(e) || (e = Array.from(c(this, ae).keys()).find((i) => c(this, ae).get(i).uri === e)), c(this, ae).get(e) || {}));
|
||||
P(this, "redirect", (e, i, n = {}) => {
|
||||
@@ -631,36 +631,36 @@ const ge = class ge {
|
||||
}
|
||||
const T = (k == null ? void 0 : k.theme) ?? (k == null ? void 0 : k.layout);
|
||||
if (T) {
|
||||
const O = (k == null ? void 0 : k.themeProps) ?? (k == null ? void 0 : k.layoutProps);
|
||||
if (!r[T]) return r[T] = s.length, [...s, { path: "/", lazy: a(T, O), children: [{ path: u, ...S }] }];
|
||||
const F = (k == null ? void 0 : k.themeProps) ?? (k == null ? void 0 : k.layoutProps);
|
||||
if (!r[T]) return r[T] = s.length, [...s, { path: "/", lazy: a(T, F), children: [{ path: u, ...S }] }];
|
||||
E = r[T];
|
||||
}
|
||||
return C && E > -1 ? (s[E].children.push({ path: u, ...S }), s) : [...s, { path: u, ...S }];
|
||||
}, [{ path: "/", lazy: a(i, {}), children: [] }]);
|
||||
return o.push({ index: !0, element: $.createElement(er, { to: n, replace: !0 }) }), W(this, Te, kn(o, e));
|
||||
return o.push({ index: !0, element: $.createElement(er, { to: n, replace: !0 }) }), U(this, Te, kn(o, e));
|
||||
});
|
||||
if (c(ge, Pe)) return c(ge, Pe);
|
||||
}
|
||||
};
|
||||
Pe = new WeakMap(), ae = new WeakMap(), Ne = new WeakMap(), Te = new WeakMap(), Ze = new WeakMap(), et = new WeakMap(), v(ge, Pe, null), P(ge, "getInstance", () => (c(ge, Pe) || W(ge, Pe, new ge()), c(ge, Pe)));
|
||||
Pe = new WeakMap(), ae = new WeakMap(), Ne = new WeakMap(), Te = new WeakMap(), Ze = new WeakMap(), et = new WeakMap(), v(ge, Pe, null), P(ge, "getInstance", () => (c(ge, Pe) || U(ge, Pe, new ge()), c(ge, Pe)));
|
||||
let Bt = ge;
|
||||
const er = ({ to: t, replace: e }) => Ci() ? $.createElement($n, { to: t, replace: e }) : (window.document.location = t, "redirect"), $e = Bt.getInstance(), Me = new Worker(new URL("/ff-worker/index.js", self.location)), di = { getConfigure: (t) => Ve.get(t), route: { redirect: (...t) => $e.redirect(...t), getPageParams: (...t) => $e.getPageParams(...t), getCurrentRoute: () => $e.getCurrentRoute() }, popup: { notification: (...t) => ee.notification(...t), success: (...t) => ee.success(...t), error: (...t) => ee.error(...t), form: (...t) => ee.form(...t), modal: (...t) => ee.modal(...t), confirm: (...t) => ee.confirm(...t) } };
|
||||
var St, We, Re;
|
||||
const U = class U {
|
||||
var St, Ue, Re;
|
||||
const q = class q {
|
||||
constructor() {
|
||||
P(this, "exec", (e, i = {}, n = {}, r = "") => new Promise((a, o) => {
|
||||
if (!/^(?!\s*(\/\/|\/\*|\*)).*?\S+/m.test(e)) return a();
|
||||
const s = ri(U, St)._++;
|
||||
c(U, We).set(s, n), U.mQueue.set(s, [a, o]), Me.postMessage({ id: s, session: r, category: "eval", method: e, args: i });
|
||||
const s = ri(q, St)._++;
|
||||
c(q, Ue).set(s, n), q.mQueue.set(s, [a, o]), Me.postMessage({ id: s, session: r, category: "eval", method: e, args: i });
|
||||
}));
|
||||
P(this, "clear", (e) => Me.postMessage({ session: e, category: "clear" }));
|
||||
if (c(U, Re)) return c(U, Re);
|
||||
if (c(q, Re)) return c(q, Re);
|
||||
Promise.resolve().then(() => xr).then((e) => {
|
||||
di.http = e.http;
|
||||
}), Me.addEventListener("message", ({ data: { id: e, task_id: i, method: n, args: r, category: a, data: o, error: s, session: l } }) => {
|
||||
if (a === "eval" && U.mQueue.has(e)) s !== null ? U.mQueue.get(e)[1](s) : U.mQueue.get(e)[0](o), c(U, We).delete(e), U.mQueue.delete(e);
|
||||
if (a === "eval" && q.mQueue.has(e)) s !== null ? q.mQueue.get(e)[1](s) : q.mQueue.get(e)[0](o), c(q, Ue).delete(e), q.mQueue.delete(e);
|
||||
else if (a === "util") try {
|
||||
const u = m.get(di, n.split("/")) || m.get(c(U, We).get(i), n.split("/"));
|
||||
const u = m.get(di, n.split("/")) || m.get(c(q, Ue).get(i), n.split("/"));
|
||||
if (!m.isFunction(u)) throw `${n} not found`;
|
||||
Promise.resolve(Reflect.apply(u, void 0, r)).then((d) => {
|
||||
Me.postMessage({ id: e, task_id: i, category: a, method: n, args: r, session: l, data: d, error: null });
|
||||
@@ -673,8 +673,8 @@ const U = class U {
|
||||
}, !1);
|
||||
}
|
||||
};
|
||||
St = new WeakMap(), We = new WeakMap(), Re = new WeakMap(), P(U, "mQueue", /* @__PURE__ */ new Map()), v(U, St, 0), v(U, We, /* @__PURE__ */ new Map()), v(U, Re, null), P(U, "getInstance", () => (c(U, Re) || W(U, Re, new U()), c(U, Re)));
|
||||
let Wt = U;
|
||||
St = new WeakMap(), Ue = new WeakMap(), Re = new WeakMap(), P(q, "mQueue", /* @__PURE__ */ new Map()), v(q, St, 0), v(q, Ue, /* @__PURE__ */ new Map()), v(q, Re, null), P(q, "getInstance", () => (c(q, Re) || U(q, Re, new q()), c(q, Re)));
|
||||
let Wt = q;
|
||||
const Fe = Wt.getInstance(), xt = () => {
|
||||
const t = _(!0), [, e] = $.useReducer((i) => i + 1, 0);
|
||||
return V(() => () => t.current = !1, []), () => t.current && e();
|
||||
@@ -684,7 +684,7 @@ const Fe = Wt.getInstance(), xt = () => {
|
||||
e.current = t;
|
||||
}, [t]), e.current;
|
||||
}, sa = (t) => {
|
||||
const [e, i] = L(t), n = _(null), r = X((a, o) => {
|
||||
const [e, i] = j(t), n = _(null), r = X((a, o) => {
|
||||
n.current = o, i(a);
|
||||
}, []);
|
||||
return V(() => {
|
||||
@@ -700,14 +700,14 @@ const Fe = Wt.getInstance(), xt = () => {
|
||||
for (let n = 0; n < t.length; n++) t[n].value = oe((i = t[n]) == null ? void 0 : i.value, e), t[n] && Reflect.has(t[n], "children") && (t[n].children = Di(t[n].children, e));
|
||||
return t;
|
||||
}, la = (t, e = "json", i = "string", n, r = null) => {
|
||||
const [a] = ie.useForm(n), [o, s] = L([{ label: "无", value: "", disabled: !0 }]), l = _([]), u = ie.useWatch((d) => l.current.length === 0 ? null : m.pick(d, l.current), a) || null;
|
||||
const [a] = ie.useForm(n), [o, s] = j([{ label: "无", value: "", disabled: !0 }]), l = _([]), u = ie.useWatch((d) => l.current.length === 0 ? null : m.pick(d, l.current), a) || null;
|
||||
return V(() => {
|
||||
Array.isArray(t) ? s(t) : e === "javascript" && t ? Fe.exec(t, {}, { getFieldValue: (d) => (l.current.includes(d) || l.current.push(d), a.getFieldValue(d)), getFieldValueForBasicForm: (d) => (l.current.includes(d) || l.current.push(d), r ? r.getFieldValue(d) : a.getFieldValue(d)) }).then((d) => {
|
||||
s(oe(d, "array"));
|
||||
}).catch((d) => console.error("useOptions", d)) : t && s(oe(t, "array"));
|
||||
}, [t, e, u]), Di(o, i);
|
||||
}, ca = (t) => {
|
||||
const [e, i] = L(), n = { type: "GET" };
|
||||
const [e, i] = j(), n = { type: "GET" };
|
||||
if (typeof t == "string" ? n.url = t : m.isPlainObject(t) && Object.assign(n, t), !(n != null && n.url)) throw "url is required";
|
||||
const r = (a) => I.request(n, !1).resp((o) => (console.log("useSubscribeRequest", a), i(o), o));
|
||||
return lt(() => {
|
||||
@@ -725,7 +725,7 @@ const Fe = Wt.getInstance(), xt = () => {
|
||||
}, { items: [], hides: [] }) })).then(i);
|
||||
}, [t]), e;
|
||||
}, ir = ({ max: t = 0, min: e = 0, type: i = "", message: n, pattern: r, required: a = !1, validator: o } = {}, s, l) => {
|
||||
const [u, d] = L([]);
|
||||
const [u, d] = j([]);
|
||||
return V(() => {
|
||||
const p = [];
|
||||
if (a) {
|
||||
@@ -759,7 +759,7 @@ const Fe = Wt.getInstance(), xt = () => {
|
||||
d(p);
|
||||
}, [t, e, i, n, r, a, o]), u;
|
||||
}, nr = (t, e, i) => {
|
||||
const [n, r] = L(null);
|
||||
const [n, r] = j(null);
|
||||
return V(() => {
|
||||
const { initDataUri: a = `/api/${t}`, initDataMethod: o = "GET" } = i || {};
|
||||
e && I.request({ method: o, url: m.trimEnd(`${a}/${e}`, "/") }).then((s) => {
|
||||
@@ -780,7 +780,7 @@ const Fe = Wt.getInstance(), xt = () => {
|
||||
}, or = (t, e, i = [], n = {}) => {
|
||||
const r = _({}), a = _(), o = m.debounce(xt(), 180), s = ["disabled", "required"], l = (f, g) => {
|
||||
s.includes(f) && (r.current[f] = g), o();
|
||||
}, u = q(() => ({ setDisabled: (f) => l("disabled", f), setRequired: (f) => l("required", f), getDisabled: () => r.current.disabled, getRequired: () => r.current.required }), [e]), [d, p] = ji(e, -1, {}, u, n);
|
||||
}, u = K(() => ({ setDisabled: (f) => l("disabled", f), setRequired: (f) => l("required", f), getDisabled: () => r.current.disabled, getRequired: () => r.current.required }), [e]), [d, p] = ji(e, -1, {}, u, n);
|
||||
if (!p && a.current != d && (d >= 0 || !m.isEmpty(i == null ? void 0 : i[d]))) {
|
||||
a.current = d;
|
||||
const { widget: f, widgetPrefix: g, props: y } = i == null ? void 0 : i[d];
|
||||
@@ -791,7 +791,7 @@ const Fe = Wt.getInstance(), xt = () => {
|
||||
const n = _(), [r] = ie.useForm(i), a = _({});
|
||||
return ct(() => {
|
||||
m.isEqual(n.current, t) || r.setFieldsValue(t);
|
||||
}, [t]), V(() => () => r.resetFields(), []), [q(() => r.__INTERNAL__ ? r : { ...r, __INTERNAL__: { itemRef: (o) => (s) => {
|
||||
}, [t]), V(() => () => r.resetFields(), []), [K(() => r.__INTERNAL__ ? r : { ...r, __INTERNAL__: { itemRef: (o) => (s) => {
|
||||
const l = ui(o);
|
||||
s ? a.current[l] = s : delete a.current[l];
|
||||
} }, scrollToField: (o, s = {}) => {
|
||||
@@ -805,29 +805,29 @@ const Fe = Wt.getInstance(), xt = () => {
|
||||
n.current = s, e == null || e(s);
|
||||
}];
|
||||
}, Gt = ({ widget: t = "Input", widgetPrefix: e = "@pkg/ff/grid-layout-forms", widgetDecorator: i, subWidgets: n = [], basicForm: r, ...a }) => {
|
||||
const o = vi(t, e), [s, l] = or(o, i, n, r), [u, d] = L();
|
||||
const o = vi(t, e), [s, l] = or(o, i, n, r), [u, d] = j();
|
||||
return V(() => {
|
||||
s && se.getWidgetComponent(s).then(({ defaultProps: p = {}, default: f }) => ({ default: sr(f, p, r) })).catch((p) => ({ default: () => `${p}` })).then((p) => d($.createElement(p.default, a)));
|
||||
}, [s]), u && $.cloneElement(u, { ...a, ...l });
|
||||
}, sr = (t, e = {}, i = null) => (n) => {
|
||||
const { type: r, code: a, label: o, noStyle: s, placeholder: l, required: u = !1, extras: d, validators: p, help: f, isVirtual: g, $isReserved: y, initialValue: w, initialValueLanguage: C, ...k } = m.omit(m.merge({}, e, n), ["convertJs", "convertJsSetting", "widget", "widgetPerfix", "widgetDecorator", "subWidgets", "boxStyle"]), S = ir(Object.assign({}, p, u ? { required: !0 } : {}), a, r), E = q(() => {
|
||||
const D = Object.keys((e == null ? void 0 : e.extras) || {});
|
||||
return m.over([m.partialRight(m.pick, D), m.partialRight(m.omit, D)]);
|
||||
}, [e == null ? void 0 : e.extras]), [T, O] = E(k), A = { label: o, noStyle: s, colon: !1, layout: "vertical" }, M = X((D) => D == null ? void 0 : oe(D, r), [r]);
|
||||
return h(_t, { name: a, rules: S, initialValue: M(w), normalize: M, children: (D, j, z) => {
|
||||
var x;
|
||||
return h(t, { type: r, rcform: z, basicForm: i, itemProps: { validateStatus: j.errors.length > 0 ? "error" : "success", tooltip: f || null, help: j.errors.length > 0 ? j.errors.join("、") : null, required: ((x = S == null ? void 0 : S[0]) == null ? void 0 : x.required) || !1, ...A }, fieldProps: { placeholder: l, ...O, ...D }, $setting: Object.assign({}, d, T) });
|
||||
const { type: r, code: a, label: o, noStyle: s, style: l, placeholder: u, required: d = !1, extras: p, validators: f, help: g, isVirtual: y, $isReserved: w, initialValue: C, initialValueLanguage: k, ...S } = m.omit(m.merge({}, e, n), ["convertJs", "convertJsSetting", "widget", "widgetPerfix", "widgetDecorator", "subWidgets", "boxStyle"]), E = ir(Object.assign({}, f, d ? { required: !0 } : {}), a, r), T = K(() => {
|
||||
const O = Object.keys((e == null ? void 0 : e.extras) || {});
|
||||
return m.over([m.partialRight(m.pick, O), m.partialRight(m.omit, O)]);
|
||||
}, [e == null ? void 0 : e.extras]), [F, L] = T(S), D = { label: o, noStyle: s, style: l, colon: !1, layout: "vertical" }, W = X((O) => O == null ? void 0 : oe(O, r), [r]);
|
||||
return h(_t, { name: a, rules: E, initialValue: W(C), normalize: W, children: (O, M, x) => {
|
||||
var B;
|
||||
return h(t, { type: r, rcform: x, basicForm: i, itemProps: { validateStatus: M.errors.length > 0 ? "error" : "success", tooltip: g || null, help: M.errors.length > 0 ? M.errors.join("、") : null, required: ((B = E == null ? void 0 : E[0]) == null ? void 0 : B.required) || !1, ...D }, fieldProps: { placeholder: u, ...L, ...O }, $setting: Object.assign({}, p, F) });
|
||||
} });
|
||||
}, Xt = ({ name: t, form: e = null, basicForm: i = null, style: n = {}, className: r, cols: a = 24, rowHeight: o = 16, itemMargin: s = [8, 16], containerPadding: l = [0, 0], fields: u = [], hides: d = [], primaryKey: p = 0, formProps: f = {}, formFields: g = [], listenChangeFields: y, listenChangeFieldsFunc: w, onValuesChange: C, theme: k, themeProps: S = {}, groups: E = [{ key: "default", label: "默认" }], children: T, ...O }) => {
|
||||
const [A] = ie.useForm(e), M = X((z, x) => {
|
||||
C == null || C(z, x), w && Array.isArray(y) && Fe.exec(w, { changedValues: z, allValues: x }, { getFieldValue: A.getFieldValue, setFieldValue: A.setFieldValue, setFieldsValue: A.setFieldsValue, isFieldTouched: A.isFieldTouched, isFieldsTouched: A.isFieldsTouched }).catch((K) => console.error("onFormValuesChange", t, K));
|
||||
}, [t, A, C, y, w]), D = q(() => [{ name: "__PROPS__", value: f }, { name: "__PRIMARY_KEY__", value: p }].concat(g), [p, f, g]), j = (z, x, K) => {
|
||||
const B = Jt(x, Gt, i);
|
||||
return F("div", { className: R("ff-grid-layout-form", r), style: { ...n, "--grid-layout-item-margin-x": `${(s == null ? void 0 : s[0]) ?? 8}px`, "--grid-layout-item-margin-y": `${(s == null ? void 0 : s[1]) ?? 16}px`, "--grid-layout-container-padding-y": `${(l == null ? void 0 : l[0]) || 0}px`, "--grid-layout-container-padding-x": `${(l == null ? void 0 : l[1]) || 0}px`, "--grid-layout-cols": a, "--grid-layout-row-height": `${o}px` }, children: [B, K && $.cloneElement(K, { cols: a, rowHeight: o, itemMargin: s, containerPadding: l, fields: x, basicForm: i })] });
|
||||
}, Xt = ({ name: t, form: e = null, basicForm: i = null, style: n = {}, className: r, cols: a = 24, rowHeight: o = 16, itemMargin: s = [8, 16], containerPadding: l = [0, 0], fields: u = [], hides: d = [], primaryKey: p = 0, formProps: f = {}, formFields: g = [], listenChangeFields: y, listenChangeFieldsFunc: w, onValuesChange: C, theme: k, themeProps: S = {}, groups: E = [{ key: "default", label: "默认" }], children: T, ...F }) => {
|
||||
const [L] = ie.useForm(e), D = X((M, x) => {
|
||||
C == null || C(M, x), w && Array.isArray(y) && Fe.exec(w, { changedValues: M, allValues: x }, { getFieldValue: L.getFieldValue, setFieldValue: L.setFieldValue, setFieldsValue: L.setFieldsValue, isFieldTouched: L.isFieldTouched, isFieldsTouched: L.isFieldsTouched }).catch((B) => console.error("onFormValuesChange", t, B));
|
||||
}, [t, L, C, y, w]), W = K(() => [{ name: "__PROPS__", value: f }, { name: "__PRIMARY_KEY__", value: p }].concat(g), [p, f, g]), O = (M, x, B) => {
|
||||
const z = Jt(x, Gt, i);
|
||||
return A("div", { className: R("ff-grid-layout-form", r), style: { ...n, "--grid-layout-item-margin-x": `${(s == null ? void 0 : s[0]) ?? 8}px`, "--grid-layout-item-margin-y": `${(s == null ? void 0 : s[1]) ?? 16}px`, "--grid-layout-container-padding-y": `${(l == null ? void 0 : l[0]) || 0}px`, "--grid-layout-container-padding-x": `${(l == null ? void 0 : l[1]) || 0}px`, "--grid-layout-cols": a, "--grid-layout-row-height": `${o}px` }, children: [z, B && $.cloneElement(B, { cols: a, rowHeight: o, itemMargin: s, containerPadding: l, fields: x, basicForm: i })] });
|
||||
};
|
||||
return F(ie, { ...O, form: A, fields: D, onValuesChange: M, children: [k ? h(Ii, { ...S, items: E, theme: k, itemRender: j, fields: u, children: T, basicForm: i }) : j(0, u, T), d == null ? void 0 : d.map((z) => {
|
||||
return A(ie, { ...F, form: L, fields: W, onValuesChange: D, children: [k ? h(Ii, { ...S, items: E, theme: k, itemRender: O, fields: u, children: T, basicForm: i }) : O(0, u, T), d == null ? void 0 : d.map((M) => {
|
||||
var x;
|
||||
return h(_t, { name: z.code, children: h(lr, { form: A, basicForm: i, name: z.code, type: z.type, initialValue: z.initialValue, initialValueLanguage: (x = z.extras) == null ? void 0 : x.initialValueLanguage }) }, JSON.stringify(z.code));
|
||||
return h(_t, { name: M.code, children: h(lr, { form: L, basicForm: i, name: M.code, type: M.type, initialValue: M.initialValue, initialValueLanguage: (x = M.extras) == null ? void 0 : x.initialValueLanguage }) }, JSON.stringify(M.code));
|
||||
})] });
|
||||
}, lr = ({ type: t, initialValue: e, initialValueLanguage: i, onChange: n, basicForm: r }) => {
|
||||
const [a, o] = ji(i == "javascript" && e, i == "javascript" ? void 0 : e, {}, {}, r);
|
||||
@@ -837,11 +837,11 @@ const Fe = Wt.getInstance(), xt = () => {
|
||||
};
|
||||
Xt.propTypes = { fields: b.array, hides: b.array };
|
||||
const cr = /* @__PURE__ */ ((t) => ({ code: e, isPreview: i = !1, ...n }) => {
|
||||
const { align: r, autoComplete: a, resource: o, items: s, hides: l, rowHeight: u, marginX: d, marginY: p, cols: f, listenChangeFields: g, listenChangeFieldsFunc: y, pk: w, uuid: C, theme: k, themeProps: S, groups: E } = tr(e), T = q(() => [{ name: "__PK__", value: w }, { name: "__RESOURCE__", value: o }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: C }], [w, e, C, o]);
|
||||
const { align: r, autoComplete: a, resource: o, items: s, hides: l, rowHeight: u, marginX: d, marginY: p, cols: f, listenChangeFields: g, listenChangeFieldsFunc: y, pk: w, uuid: C, theme: k, themeProps: S, groups: E } = tr(e), T = K(() => [{ name: "__PK__", value: w }, { name: "__RESOURCE__", value: o }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: C }], [w, e, C, o]);
|
||||
return h(t, { name: e, autoComplete: a, theme: k, themeProps: S, groups: E, ...n, formFields: T, listenChangeFields: g, listenChangeFieldsFunc: y, fields: s, hides: l, cols: f, rowHeight: u, itemMargin: [d, p] });
|
||||
})(Xt), zi = ({ $setting: t, $close: e, extras: i, code: n, primaryKey: r, ...a }) => {
|
||||
const [o] = ie.useForm(), s = ar(o, n, r, t);
|
||||
return h(G, { actions: F($.Fragment, { children: [h(N, { name: (t == null ? void 0 : t.okText) || "保存", type: "primary", widget: () => s({ onSuccess: e }) }), h(N, { name: (t == null ? void 0 : t.cancelText) || "取消", widget: () => e(!1) })] }), extras: i, children: h(cr, { form: o, code: n, primaryKey: r, ...a }) });
|
||||
return h(G, { actions: A($.Fragment, { children: [h(N, { name: (t == null ? void 0 : t.okText) || "保存", type: "primary", widget: () => s({ onSuccess: e }) }), h(N, { name: (t == null ? void 0 : t.cancelText) || "取消", widget: () => e(!1) })] }), extras: i, children: h(cr, { form: o, code: n, primaryKey: r, ...a }) });
|
||||
}, pi = /* @__PURE__ */ new Set(), Ut = (t = [], e = 0) => {
|
||||
const i = t[e];
|
||||
if (i.length && !pi.has(i)) {
|
||||
@@ -868,7 +868,7 @@ const dr = (t, e, i, n) => $e.redirect(i, e, n), ur = (t, e = {}, i, n = {}) =>
|
||||
}, hi = (t, e, i, n, r) => m.isString(i) && i ? se.getWidgetComponent(i).then(({ default: a }) => ee.modal(a, { ...e, $setting: n }, r != null && r.title ? { ...r, title: m.template(r.title)(t) } : r)).catch((a) => {
|
||||
ee.error(i, { content: a.toString() });
|
||||
}) : ee.modal(i, { ...e, $setting: n }, r != null && r.title ? { ...r, title: m.template(r.title)(t) } : r), pr = (t, e, i, n, r) => ee.modal(zi, { ...e, $setting: n, code: i }, r != null && r.title ? { ...r, title: m.template(r.title)(t) } : r), gr = (t, e, i, n, r) => ee.modal(Yt, { base62params: e, $setting: n, listCode: i }, r != null && r.title ? { ...r, title: m.template(r.title)(t) } : r), hr = ({ widget: t, widgetType: e, widgetData: i, widgetProps: n, widgetSetting: r, widgetContainerProps: a }, { onAfterClick: o, onBeforeClick: s } = {}) => {
|
||||
const l = le(ne), [u, d] = L({ leading: !0, trailing: !1 }), p = q(() => {
|
||||
const l = le(ne), [u, d] = j({ leading: !0, trailing: !1 }), p = K(() => {
|
||||
switch (e) {
|
||||
case "redirect":
|
||||
return m.partialRight(dr, t, r);
|
||||
@@ -890,47 +890,47 @@ const dr = (t, e, i, n) => $e.redirect(i, e, n), ur = (t, e = {}, i, n = {}) =>
|
||||
return (...f) => console.error("useButton unknown widgetType", e, ...f);
|
||||
}, [t, e]);
|
||||
return [m.debounce((f) => (s == null || s(f), Promise.resolve(st(n, f, { list: l })).then((g) => p(f, { ...i, ...g })).then((g) => o == null ? void 0 : o(g)).catch(console.error)), 300, { leading: !0, trailing: !1 }), u];
|
||||
}, Bi = ({ type: t, name: e, className: i, icon: n, iconPosition: r, size: a }, o = "default") => q(() => {
|
||||
}, Bi = ({ type: t, name: e, className: i, icon: n, iconPosition: r, size: a }, o = "default") => K(() => {
|
||||
const s = { type: "primary", className: R("ff-button", i), iconPosition: r, size: a };
|
||||
return t === "danger" ? s.danger = !0 : t === "default" && (s.type = t), o === "link" || o === "dashed" ? (s.type = o, t === "default" && (s.className = R(s.className, "ff-default"))) : o !== "circle" && o !== "round" || (s.shape = o), n && (s.icon = h(bt, { type: n })), e && (s.children = e), s;
|
||||
}, [o, t, i, n, r]), Pt = ({ data: t, widget: e, widgetType: i = "fsdpf-component", widgetData: n, widgetProps: r, widgetSetting: a, widgetContainerProps: o, onAfterClick: s, onBeforeClick: l, children: u, extras: d }) => {
|
||||
const p = le(ne), [f, g] = L(!1), [y, w] = L("hover"), [C, k] = L({}), [S, E] = L(), { placement: T, align: O, zIndex: A, arrow: M = { pointAtCenter: !0 }, getPopupContainer: D, isPopupMountBodyContainer: j = !0, ...z } = o || {};
|
||||
const p = le(ne), [f, g] = j(!1), [y, w] = j("hover"), [C, k] = j({}), [S, E] = j(), { placement: T, align: F, zIndex: L, arrow: D = { pointAtCenter: !0 }, getPopupContainer: W, isPopupMountBodyContainer: O = !0, ...M } = o || {};
|
||||
V(() => {
|
||||
i == "grid-layout-form" ? E($.createElement(zi, { ...n, $setting: a, code: e })) : i == "data-list" ? E($.createElement(Yt, { base62params: t, $setting: a, listCode: e })) : m.isString(e) ? se.getWidgetComponent(e).then(({ default: B }) => {
|
||||
E($.createElement(B, { ...n, $setting: a }));
|
||||
}).catch((B) => E(B.toString())) : Zt(e) ? E($.createElement(e, { ...n, $setting: a })) : $.isValidElement(e) && E($.cloneElement(e, { ...n, $setting: a }));
|
||||
i == "grid-layout-form" ? E($.createElement(zi, { ...n, $setting: a, code: e })) : i == "data-list" ? E($.createElement(Yt, { base62params: t, $setting: a, listCode: e })) : m.isString(e) ? se.getWidgetComponent(e).then(({ default: z }) => {
|
||||
E($.createElement(z, { ...n, $setting: a }));
|
||||
}).catch((z) => E(z.toString())) : Zt(e) ? E($.createElement(e, { ...n, $setting: a })) : $.isValidElement(e) && E($.cloneElement(e, { ...n, $setting: a }));
|
||||
}, [e, i, n]), V(() => {
|
||||
Promise.resolve(st(r, t, { list: p })).then(k);
|
||||
}, [r, t, p.getBase62params]);
|
||||
const x = (B, Ee = !1) => (g(B), !B && w("hover"), B ? l == null ? void 0 : l(C) : s == null ? void 0 : s(Ee)), K = (B) => {
|
||||
const x = (z, Ee = !1) => (g(z), !z && w("hover"), z ? l == null ? void 0 : l(C) : s == null ? void 0 : s(Ee)), B = (z) => {
|
||||
g(!0), w("click");
|
||||
};
|
||||
return h(hn, { zIndex: A, placement: T, onPopupClick: K, onClick: K, open: f, align: O, arrow: M, trigger: y, getPopupContainer: D || j ? void 0 : (B) => B, content: h(mr, { ...z, extras: d, children: S && $.cloneElement(S, { ...C, $close: (B) => x(!1, B) }) }), children: u, onOpenChange: x });
|
||||
return h(hn, { zIndex: L, placement: T, onPopupClick: B, onClick: B, open: f, align: F, arrow: D, trigger: y, getPopupContainer: W || O ? void 0 : (z) => z, content: h(mr, { ...M, extras: d, children: S && $.cloneElement(S, { ...C, $close: (z) => x(!1, z) }) }), children: u, onOpenChange: x });
|
||||
}, mr = ({ title: t, className: e, classNames: i, children: n, extras: r, width: a, height: o, ...s }) => {
|
||||
const [l, u] = L({}), d = X((y, w) => u((C) => ({ ...C, [y]: w })), []), p = X((y) => u((w) => ({ ...w, [y]: void 0 })), []), f = t ? $.createElement("div", { className: "ff-popup-title" }, t) : l == null ? void 0 : l.title, g = r ?? $.createElement("div", { className: "ff-popup-reserved-extras" }, r);
|
||||
return h(ot.Provider, { value: { ele: l, mount: d, unmount: p }, children: F("div", { className: R("ff-popup ff-popover", e, l.rootClassName), style: { width: a ?? 260, height: o }, ...s, children: [F("div", { className: R("ff-popup-header", "ff-popover-header", i == null ? void 0 : i.header), children: [f, l == null ? void 0 : l["sub-title"]] }), h("div", { className: R("ff-popup-body", "ff-popover-body", i == null ? void 0 : i.body), children: n }), F("div", { className: R("ff-popup-footer", "ff-popover-footer", i == null ? void 0 : i.footer), children: [g, l == null ? void 0 : l.extras, l == null ? void 0 : l.actions] })] }) });
|
||||
const [l, u] = j({}), d = X((y, w) => u((C) => ({ ...C, [y]: w })), []), p = X((y) => u((w) => ({ ...w, [y]: void 0 })), []), f = t ? $.createElement("div", { className: "ff-popup-title" }, t) : l == null ? void 0 : l.title, g = r ?? $.createElement("div", { className: "ff-popup-reserved-extras" }, r);
|
||||
return h(ot.Provider, { value: { ele: l, mount: d, unmount: p }, children: A("div", { className: R("ff-popup ff-popover", e, l.rootClassName), style: { width: a ?? 260, height: o }, ...s, children: [A("div", { className: R("ff-popup-header", "ff-popover-header", i == null ? void 0 : i.header), children: [f, l == null ? void 0 : l["sub-title"]] }), h("div", { className: R("ff-popup-body", "ff-popover-body", i == null ? void 0 : i.body), children: n }), A("div", { className: R("ff-popup-footer", "ff-popover-footer", i == null ? void 0 : i.footer), children: [g, l == null ? void 0 : l.extras, l == null ? void 0 : l.actions] })] }) });
|
||||
};
|
||||
Pt.propTypes = { widgetType: b.oneOf(["fsdpf-component", "grid-layout-form", "data-list"]) };
|
||||
const dt = (t) => function({ className: e, variant: i, children: n, name: r, icon: a, type: o = "default", iconPosition: s = "start", noAuthType: l, onAfterClick: u, onBeforeClick: d, data: p, loading: f, disabled: g, tooltip: y, confirm: w, widget: C = () => {
|
||||
}, widgetType: k, widgetData: S, widgetProps: E, widgetSetting: T, widgetContainerProps: O, ...A }) {
|
||||
const { mode: M, ...D } = O || {}, j = Bi({ className: e, name: r, type: o, icon: a, iconPosition: s }, i ?? t), z = h(yt, { ...j, ...A, children: n || r });
|
||||
if (M === "popover" && !["destroy", "redirect", "func"].includes(k)) return h(Pt, { data: p, widget: C, widgetType: k, widgetData: S, widgetProps: E, widgetSetting: T, widgetContainerProps: D, onAfterClick: u, onBeforeClick: d, children: z });
|
||||
const x = m.isEmpty(y) || !y.enabled ? {} : y, K = m.isEmpty(w) ? { enabled: !1 } : Object.assign({ enabled: !0 }, w), [B, Ee] = L(!1), [ut, { disabled: pt, loading: Nt }] = hr({ widget: C, widgetType: k, widgetData: S, widgetProps: E, widgetSetting: T, widgetContainerProps: D }, { onAfterClick: u, onBeforeClick: d });
|
||||
return h(mn, { okText: "确定", cancelText: "取消", getPopupContainer: (te) => te, ...K, disabled: pt || g, open: B, onOpenChange: (te) => {
|
||||
}, widgetType: k, widgetData: S, widgetProps: E, widgetSetting: T, widgetContainerProps: F, ...L }) {
|
||||
const { mode: D, ...W } = F || {}, O = Bi({ className: e, name: r, type: o, icon: a, iconPosition: s }, i ?? t), M = h(yt, { ...O, ...L, children: n || r });
|
||||
if (D === "popover" && !["destroy", "redirect", "func"].includes(k)) return h(Pt, { data: p, widget: C, widgetType: k, widgetData: S, widgetProps: E, widgetSetting: T, widgetContainerProps: W, onAfterClick: u, onBeforeClick: d, children: M });
|
||||
const x = m.isEmpty(y) || !y.enabled ? {} : y, B = m.isEmpty(w) ? { enabled: !1 } : Object.assign({ enabled: !0 }, w), [z, Ee] = j(!1), [ut, { disabled: pt, loading: Nt }] = hr({ widget: C, widgetType: k, widgetData: S, widgetProps: E, widgetSetting: T, widgetContainerProps: W }, { onAfterClick: u, onBeforeClick: d });
|
||||
return h(mn, { okText: "确定", cancelText: "取消", getPopupContainer: (te) => te, ...B, disabled: pt || g, open: z, onOpenChange: (te) => {
|
||||
if (!te) return Ee(te);
|
||||
K.enabled ? Ee(te) : ut(p);
|
||||
B.enabled ? Ee(te) : ut(p);
|
||||
}, onConfirm: (te) => {
|
||||
ut(p, te);
|
||||
}, onClick: (te) => {
|
||||
te.stopPropagation();
|
||||
}, children: h(fn, { getPopupContainer: (te) => te, ...x, title: B ? null : x == null ? void 0 : x.title, trigger: ["hover", "click"], children: $.cloneElement(z, { loading: Nt || f, disabled: pt || g }) }) });
|
||||
}, children: h(fn, { getPopupContainer: (te) => te, ...x, title: z ? null : x == null ? void 0 : x.title, trigger: ["hover", "click"], children: $.cloneElement(M, { loading: Nt || f, disabled: pt || g }) }) });
|
||||
}, N = dt("default");
|
||||
N.propTypes = { type: b.oneOf(["primary", "default", "danger", ""]), size: b.oneOf(["large", "middle", "small"]), name: b.string, icon: b.string, iconPosition: b.oneOf(["start", "end"]), data: b.any, widget: b.any, widgetType: b.oneOf(["destroy", "redirect", "func", "component", "fsdpf-component", "grid-layout-form", "grid-layout", "data-list"]), widgetData: b.object, widgetProps: b.object, widgetSetting: b.object, widgetContainerProps: b.object, tooltip: b.exact({ title: b.string.isRequired, placement: b.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: b.oneOfType([b.bool, b.number]), getPopupContainer: b.func }), confirm: b.exact({ title: b.string.isRequired, cancelText: b.string, okText: b.string, okType: b.oneOf(["primary", "default", "danger", ""]), placement: b.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: b.oneOfType([b.bool, b.number]), getPopupContainer: b.func, arrow: b.oneOfType([b.bool, b.exact({ pointAtCenter: b.bool })]) }) };
|
||||
const fr = dt("link"), yr = dt("circle"), wr = dt("round"), br = dt("dashed"), mi = ({ options: t = [], triggerWeights: e = ["grid-layout-form", "grid-layout", "fsdpf-component", "print"], onAfterClick: i = (g, y, w) => {
|
||||
}, onBeforeClick: n = (g, y, w) => {
|
||||
}, labelVariant: r = "link", labelSize: a, labelRender: o, btnVariant: s, btnSize: l, btnRender: u = (g, y) => h(N, { ...g, data: y }, g.uuid || Lt()), widgetContainerProps: d = {}, children: p, data: f }) => {
|
||||
if (m.isEmpty(t)) return p;
|
||||
const [g, y] = q(() => (t || []).reduce((C, k) => {
|
||||
const [g, y] = K(() => (t || []).reduce((C, k) => {
|
||||
const S = e.indexOf(k.widgetType);
|
||||
return S === -1 ? C[1].push(k) : C[0] ? S < e.indexOf(C[0].widgetType) ? (C[1].push(C[0]), C[0] = k) : C[1].push(k) : C[0] = k, C;
|
||||
}, [null, []]), [t, e]);
|
||||
@@ -940,13 +940,13 @@ const fr = dt("link"), yr = dt("circle"), wr = dt("round"), br = dt("dashed"), m
|
||||
};
|
||||
mi.propTypes = { triggerWeights: b.array, options: b.arrayOf(b.shape({ ...N.propTypes, widgetType: N.propTypes.widgetType.isRequired })), btnSize: N.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: N.propTypes.size, onAfterClick: b.func, onBeforeClick: b.func, widgetContainerProps: N.propTypes.widgetContainerProps, data: N.propTypes.data }, N.Link = fr, N.Link.defaultProps = N.defaultProps, N.Link.propTypes = N.propTypes, N.Circle = yr, N.Circle.defaultProps = N.defaultProps, N.Circle.propTypes = N.propTypes, N.Round = wr, N.Round.defaultProps = N.defaultProps, N.Round.propTypes = N.propTypes, N.Dashed = br, N.Dashed.defaultProps = N.defaultProps, N.Dashed.propTypes = N.propTypes, N.Popover = Pt, N.GroupPopover = mi;
|
||||
const Cr = ({ fields: t, formProps: e, $close: i }) => {
|
||||
const [n] = ie.useForm(), r = q(() => [{ name: "__PROPS__", value: e }], [e]);
|
||||
return h(G, { actions: F($.Fragment, { children: [h(N, { name: "取消", widget: () => i(!1) }), h(N, { name: "确定", type: "primary", widget: () => n.validateFields(!0).then(i) })] }), children: h(ie, { fields: r, form: n, className: "ff-modal-form", children: t == null ? void 0 : t.map(({ code: a, ...o }) => h(Gt, { code: a, ...o }, a)) }) });
|
||||
}, kr = ({ className: t, classNames: e, $close: i, children: n, title: r, subTitle: a, actions: o, extras: s, ...l }) => F(En, { ...l, prefixCls: "ff-drawer", className: R("ff-popup", t), maskMotion: { motionAppear: !0, motionName: "mask-motion" }, motion: (u) => ({ motionAppear: !0, motionName: `panel-motion-${u}` }), children: [F("div", { className: R("ff-popup-header", "ff-drawer-header", e == null ? void 0 : e.header), children: [h("button", { "aria-label": "Close", className: R("ff-popup-close", "ff-drawer-close", e == null ? void 0 : e.close), onClick: l.onClose, children: h(Ht, { type: "close" }) }), r, a] }), h("div", { className: R("ff-popup-body", "ff-drawer-body", e == null ? void 0 : e.body), children: n }), F("div", { className: R("ff-popup-footer", "ff-drawer-footer", e == null ? void 0 : e.footer), children: [s, o] })] }), $r = ({ className: t, classNames: e, $close: i, $event: n, children: r, title: a, subTitle: o, actions: s, extras: l, placement: u, ...d }) => {
|
||||
const [n] = ie.useForm(), r = K(() => [{ name: "__PROPS__", value: e }], [e]);
|
||||
return h(G, { actions: A($.Fragment, { children: [h(N, { name: "取消", widget: () => i(!1) }), h(N, { name: "确定", type: "primary", widget: () => n.validateFields(!0).then(i) })] }), children: h(ie, { fields: r, form: n, className: "ff-modal-form", children: t == null ? void 0 : t.map(({ code: a, ...o }) => h(Gt, { code: a, ...o }, a)) }) });
|
||||
}, kr = ({ className: t, classNames: e, $close: i, children: n, title: r, subTitle: a, actions: o, extras: s, ...l }) => A(En, { ...l, prefixCls: "ff-drawer", className: R("ff-popup", t), maskMotion: { motionAppear: !0, motionName: "mask-motion" }, motion: (u) => ({ motionAppear: !0, motionName: `panel-motion-${u}` }), children: [A("div", { className: R("ff-popup-header", "ff-drawer-header", e == null ? void 0 : e.header), children: [h("button", { "aria-label": "Close", className: R("ff-popup-close", "ff-drawer-close", e == null ? void 0 : e.close), onClick: l.onClose, children: h(Ht, { type: "close" }) }), r, a] }), h("div", { className: R("ff-popup-body", "ff-drawer-body", e == null ? void 0 : e.body), children: n }), A("div", { className: R("ff-popup-footer", "ff-drawer-footer", e == null ? void 0 : e.footer), children: [s, o] })] }), $r = ({ className: t, classNames: e, $close: i, $event: n, children: r, title: a, subTitle: o, actions: s, extras: l, placement: u, ...d }) => {
|
||||
const p = (n == null ? void 0 : n.pageX) === void 0 ? { animation: null, maskAnimation: null, mousePosition: { x: null, y: null } } : { animation: "zoom", maskAnimation: "fade", mousePosition: { x: n == null ? void 0 : n.pageX, y: n == null ? void 0 : n.pageY } };
|
||||
return h(Sn, { ...d, ...p, prefixCls: "ff-modal", modalRender: () => F("div", { className: R("ff-modal-content ff-popup", t), children: [F("div", { className: R("ff-popup-header", "ff-modal-header", e == null ? void 0 : e.header), children: [h("button", { "aria-label": "Close", className: R("ff-popup-close", "ff-modal-close", e == null ? void 0 : e.close), onClick: d.onClose, children: h(Ht, { type: "close" }) }), a, o] }), h("div", { className: R("ff-popup-body", "ff-modal-body", e == null ? void 0 : e.body), children: r }), F("div", { className: R("ff-popup-footer", "ff-modal-footer", e == null ? void 0 : e.footer), children: [l, s] })] }) });
|
||||
return h(Sn, { ...d, ...p, prefixCls: "ff-modal", modalRender: () => A("div", { className: R("ff-modal-content ff-popup", t), children: [A("div", { className: R("ff-popup-header", "ff-modal-header", e == null ? void 0 : e.header), children: [h("button", { "aria-label": "Close", className: R("ff-popup-close", "ff-modal-close", e == null ? void 0 : e.close), onClick: d.onClose, children: h(Ht, { type: "close" }) }), a, o] }), h("div", { className: R("ff-popup-body", "ff-modal-body", e == null ? void 0 : e.body), children: r }), A("div", { className: R("ff-popup-footer", "ff-modal-footer", e == null ? void 0 : e.footer), children: [l, s] })] }) });
|
||||
}, Wi = ({ placement: t, $close: e, $event: i, children: n, title: r, ...a }) => {
|
||||
const [o, s] = L({}), [l, u] = L(!0), d = X((y, w) => s((C) => ({ ...C, [y]: w })), []), p = X((y) => s((w) => ({ ...w, [y]: void 0 })), []);
|
||||
const [o, s] = j({}), [l, u] = j(!0), d = X((y, w) => s((C) => ({ ...C, [y]: w })), []), p = X((y) => s((w) => ({ ...w, [y]: void 0 })), []);
|
||||
let f = { ...a, className: o.rootClassName, title: o.title || r && $.createElement("div", { className: R("ff-popup-title") }, r), subTitle: o["sub-title"], actions: o.actions, extras: o.extras, children: n, $close: e, $event: i, onClose: () => u(!1) };
|
||||
const g = () => {
|
||||
e(!1);
|
||||
@@ -969,7 +969,7 @@ const Z = () => {
|
||||
if (s === Ei) return t.open({ ...u, key: d, content: $.createElement(s, { ...l, $close: () => t.close(d) }) });
|
||||
Z.$popups.set(d, $.createElement(Wi, { maskClosable: !1, $event: l == null ? void 0 : l.$event, ...u, key: d, $close: p }, $.isValidElement(s) ? $.cloneElement(s, { ...l, $close: p }) : s != null && s.name || ai.isForwardRef(s) || (s == null ? void 0 : s.$$typeof) === ai.ForwardRef ? $.createElement(s, { ...l, $close: p }) : s)), i();
|
||||
};
|
||||
return F($.Fragment, { children: [Array.from(Z.$popups).map(([a, o]) => o), e] });
|
||||
return A($.Fragment, { children: [Array.from(Z.$popups).map(([a, o]) => o), e] });
|
||||
};
|
||||
Z.$popups = /* @__PURE__ */ new Map(), Z.$index = 0, Z.$queue = [], Z.$onClick = (...t) => new Promise((e, i) => {
|
||||
Z.$queue.push([t, e, i]);
|
||||
@@ -978,24 +978,27 @@ const fi = (t, e, i = {}) => Z.$onClick(t, e, i), Ft = (t, { showProgress: e, du
|
||||
if (n === !1) throw !1;
|
||||
return n;
|
||||
}), notification: Ft, success: (t, e = { duration: 1.5 }) => Ft(t, { ...e, className: "ff-notification-success", icon: "check" }), error: (t, e = { duration: 1.5 }) => Ft(t, { ...e, className: "ff-notification-error", icon: "close" }) };
|
||||
_e.configure({ showSpinner: !1 }), He.interceptors.request.use((t) => {
|
||||
He.configure({ showSpinner: !1 }), De.interceptors.request.use((t) => {
|
||||
t.headers.Platform = "web", t.headers.SaaS = window.localStorage.getItem("SaaS");
|
||||
const e = window.localStorage.getItem(ft);
|
||||
return t.headers.Authorization = e ? `Bearer ${e} ` : void 0, _e.inc(), t;
|
||||
}, (t) => (_e.done(), Promise.reject({ code: -1, msg: t }))), He.interceptors.response.use(({ data: t, headers: e }) => (_e.done(), { ...t, res: e == null ? void 0 : e.res }), function(t) {
|
||||
return _e.done(), Promise.reject(t.message);
|
||||
return t.headers.Authorization = e ? `Bearer ${e} ` : void 0, He.inc(), t;
|
||||
}, (t) => (He.done(), Promise.reject({ code: -1, msg: t }))), De.interceptors.response.use(({ data: t, headers: e }) => (He.done(), { ...t, res: e == null ? void 0 : e.res }), function(t) {
|
||||
return He.done(), Promise.reject(t.message);
|
||||
}), window.addEventListener("unhandledrejection", jt.onUnhandledRejection), jt.onMsg = (t, e) => ee[[0, 1].includes(t) ? "success" : "error"](e).then(() => t === 20300 && $e.redirect(Ve.get("Common.WEBSITE_LOGIN_PAGE")));
|
||||
var Ie, Ue;
|
||||
var Ie, qe;
|
||||
const J = class J {
|
||||
constructor() {
|
||||
P(this, "appUrl", "");
|
||||
return c(J, Ie) || (W(J, Ue, new jt()), W(J, Ie, new Proxy(this, { get: (e, i) => i === "init" ? e.init : i === "appUrl" ? e.appUrl : c(J, Ue)[i] }))), c(J, Ie);
|
||||
return c(J, Ie) || (U(J, qe, new jt()), U(J, Ie, new Proxy(this, { get: (e, i) => i === "init" ? e.init : i === "appUrl" ? e.appUrl : i === "driver" ? e.driver : c(J, qe)[i] }))), c(J, Ie);
|
||||
}
|
||||
init(e, i, n) {
|
||||
He.defaults.baseURL = this.appUrl = n, He.defaults.timeout = 15e3, c(J, Ue).init(e, i, He);
|
||||
De.defaults.baseURL = this.appUrl = n, De.defaults.timeout = 15e3, c(J, qe).init(e, i, De);
|
||||
}
|
||||
get driver() {
|
||||
return De;
|
||||
}
|
||||
};
|
||||
Ie = new WeakMap(), Ue = new WeakMap(), v(J, Ie, null), v(J, Ue, null), P(J, "getInstance", () => c(J, Ie) ?? W(J, Ie, new J()));
|
||||
Ie = new WeakMap(), qe = new WeakMap(), v(J, Ie, null), v(J, qe, null), P(J, "getInstance", () => c(J, Ie) ?? U(J, Ie, new J()));
|
||||
let qt = J;
|
||||
const I = qt.getInstance();
|
||||
class Qt extends Error {
|
||||
@@ -1009,11 +1012,11 @@ class Je extends Error {
|
||||
}
|
||||
}
|
||||
const At = "mine", ft = "token";
|
||||
var Oe, qe;
|
||||
var Oe, Ke;
|
||||
const he = class he {
|
||||
constructor() {
|
||||
v(this, qe, /* @__PURE__ */ new Map());
|
||||
P(this, "setVendor", (e, i) => c(this, qe).set(e, new ki(i, async (n, r) => {
|
||||
v(this, Ke, /* @__PURE__ */ new Map());
|
||||
P(this, "setVendor", (e, i) => c(this, Ke).set(e, new ki(i, async (n, r) => {
|
||||
var o, s;
|
||||
if (!(n != null && n.default)) throw "@pkg not found";
|
||||
let a = () => r;
|
||||
@@ -1030,7 +1033,7 @@ const he = class he {
|
||||
const [, i] = e == null ? void 0 : e.split("@pkg/");
|
||||
if (!i) throw new Je(e);
|
||||
try {
|
||||
return c(this, qe).has("pkg") ? await c(this, qe).get("pkg").get(i) : await import(`${I.appUrl}/api/pkg-import/web?name=${e}`);
|
||||
return c(this, Ke).has("pkg") ? await c(this, Ke).get("pkg").get(i) : await import(`${I.appUrl}/api/pkg-import/web?name=${e}`);
|
||||
} catch (n) {
|
||||
throw new Qt(e, n);
|
||||
}
|
||||
@@ -1077,7 +1080,7 @@ const he = class he {
|
||||
if (c(he, Oe)) return c(he, Oe);
|
||||
}
|
||||
};
|
||||
Oe = new WeakMap(), qe = new WeakMap(), v(he, Oe, null), P(he, "getInstance", () => (c(he, Oe) || W(he, Oe, new he()), c(he, Oe)));
|
||||
Oe = new WeakMap(), Ke = new WeakMap(), v(he, Oe, null), P(he, "getInstance", () => (c(he, Oe) || U(he, Oe, new he()), c(he, Oe)));
|
||||
let Kt = he;
|
||||
const se = Kt.getInstance(), Er = $.createContext({ user: {}, initUser: () => {
|
||||
}, initUserComplete: !1 }), Sr = $.createContext({ set: () => {
|
||||
@@ -1089,13 +1092,13 @@ const se = Kt.getInstance(), Er = $.createContext({ user: {}, initUser: () => {
|
||||
let i = document.querySelector(`style[ff-style-token="${e}"]`);
|
||||
return i ? (i.innerHTML = t, t) : (i = document.createElement("style"), i.setAttribute("ff-style-token", e), i.setAttribute("type", "text/css"), i.innerHTML = t, document.head.appendChild(i), t);
|
||||
}, xr = Object.freeze(Object.defineProperty({ __proto__: null, AppContext: Er, AppGlobalParamsContext: Sr, cache: ki, configure: Ve, default: se, func: Fe, http: I, insertStyle: vr, isReactComponent: Zt, route: $e }, Symbol.toStringTag, { value: "Module" }));
|
||||
var Ce, Ke, ke, me, fe, Q, Y, H, ye, tt, it, nt, rt, vt, at;
|
||||
var Ce, _e, ke, me, fe, Q, Y, H, ye, tt, it, nt, rt, vt, at;
|
||||
const ei = class ei {
|
||||
constructor(e, i = "/") {
|
||||
v(this, Ce, "/");
|
||||
v(this, Ke, /* @__PURE__ */ new Set());
|
||||
v(this, _e, /* @__PURE__ */ new Set());
|
||||
v(this, ke, (e) => {
|
||||
for (const i of c(this, Ke)) try {
|
||||
for (const i of c(this, _e)) try {
|
||||
i(e);
|
||||
} catch (n) {
|
||||
console.error("Error in VirtualFS event listener:", n);
|
||||
@@ -1206,7 +1209,7 @@ const ei = class ei {
|
||||
return new RegExp(`^${n}$`).test(e);
|
||||
});
|
||||
var n, r, a;
|
||||
W(this, Ce, i), this.root = { name: "/", type: "dir", children: [], lastModified: Date.now() }, Array.isArray(e) ? this.root.children = e : e && typeof e == "object" && (e.name && e.name !== "/" ? this.root.children.push(e) : (this.root = e, (n = this.root).name ?? (n.name = "/"), (r = this.root).children ?? (r.children = []), (a = this.root).lastModified ?? (a.lastModified = Date.now())));
|
||||
U(this, Ce, i), this.root = { name: "/", type: "dir", children: [], lastModified: Date.now() }, Array.isArray(e) ? this.root.children = e : e && typeof e == "object" && (e.name && e.name !== "/" ? this.root.children.push(e) : (this.root = e, (n = this.root).name ?? (n.name = "/"), (r = this.root).children ?? (r.children = []), (a = this.root).lastModified ?? (a.lastModified = Date.now())));
|
||||
}
|
||||
async stat(e) {
|
||||
const i = c(this, Q).call(this, e);
|
||||
@@ -1306,8 +1309,8 @@ const ei = class ei {
|
||||
}
|
||||
subscribe(e) {
|
||||
if (typeof e != "function") throw new Error("Callback must be a function");
|
||||
return c(this, Ke).add(e), () => {
|
||||
c(this, Ke).delete(e);
|
||||
return c(this, _e).add(e), () => {
|
||||
c(this, _e).delete(e);
|
||||
};
|
||||
}
|
||||
getWorkingDirectory() {
|
||||
@@ -1336,7 +1339,7 @@ const ei = class ei {
|
||||
return c(this, tt).call(this, l, r, s);
|
||||
}
|
||||
};
|
||||
Ce = new WeakMap(), Ke = new WeakMap(), ke = new WeakMap(), me = new WeakMap(), fe = new WeakMap(), Q = new WeakMap(), Y = new WeakMap(), H = new WeakMap(), ye = new WeakMap(), tt = new WeakMap(), it = new WeakMap(), nt = new WeakMap(), rt = new WeakMap(), vt = new WeakMap(), at = new WeakMap();
|
||||
Ce = new WeakMap(), _e = new WeakMap(), ke = new WeakMap(), me = new WeakMap(), fe = new WeakMap(), Q = new WeakMap(), Y = new WeakMap(), H = new WeakMap(), ye = new WeakMap(), tt = new WeakMap(), it = new WeakMap(), nt = new WeakMap(), rt = new WeakMap(), vt = new WeakMap(), at = new WeakMap();
|
||||
let yi = ei;
|
||||
const Pr = async (t, e = "/", i = "") => {
|
||||
try {
|
||||
File diff suppressed because it is too large
Load Diff
2
dist/components.js
vendored
2
dist/components.js
vendored
@@ -1,4 +1,4 @@
|
||||
import { aq as s, ah as p, ar as n, as as r, ap as t } from "./common/main-D7to3RZo.js";
|
||||
import { aq as s, ah as p, ar as n, as as r, ap as t } from "./common/main-xbA_iREM.js";
|
||||
export {
|
||||
s as Empty,
|
||||
p as Icon,
|
||||
|
||||
2
dist/container.js
vendored
2
dist/container.js
vendored
@@ -1,4 +1,4 @@
|
||||
import { am as s, aq as e, ar as p, as as n, an as t, ap as d, ao as r, al as u } from "./common/main-D7to3RZo.js";
|
||||
import { am as s, aq as e, ar as p, as as n, an as t, ap as d, ao as r, al as u } from "./common/main-xbA_iREM.js";
|
||||
export {
|
||||
s as Context,
|
||||
e as Empty,
|
||||
|
||||
2
dist/data-converter.js
vendored
2
dist/data-converter.js
vendored
@@ -1,6 +1,6 @@
|
||||
import "lodash";
|
||||
import "react";
|
||||
import { D as p } from "./common/main-D7to3RZo.js";
|
||||
import { D as p } from "./common/main-xbA_iREM.js";
|
||||
export {
|
||||
p as default
|
||||
};
|
||||
|
||||
2
dist/data-list.js
vendored
2
dist/data-list.js
vendored
@@ -1,4 +1,4 @@
|
||||
import { L as t, J as e, B as r, F as o, M as i, I as l, E as u, K as D, C as n, N as L, A as C, P as m, O as p, W as b, S as c, U as F, T as d, V as O, Q as S } from "./common/main-D7to3RZo.js";
|
||||
import { L as t, J as e, B as r, F as o, M as i, I as l, E as u, K as D, C as n, N as L, A as C, P as m, O as p, W as b, S as c, U as F, T as d, V as O, Q as S } from "./common/main-xbA_iREM.js";
|
||||
export {
|
||||
t as DataListContent,
|
||||
e as DataListContext,
|
||||
|
||||
2
dist/data-list/utils.js
vendored
2
dist/data-list/utils.js
vendored
@@ -1,5 +1,5 @@
|
||||
import "lodash";
|
||||
import { p as t } from "../common/main-D7to3RZo.js";
|
||||
import { p as t } from "../common/main-xbA_iREM.js";
|
||||
export {
|
||||
t as getDefaultExpandRowKeys
|
||||
};
|
||||
|
||||
2
dist/grid-layout-form.js
vendored
2
dist/grid-layout-form.js
vendored
@@ -1,4 +1,4 @@
|
||||
import { a7 as s, a9 as r, a8 as u, a6 as o, z as t, ae as m, ac as d, ad as F, ag as i, ab as g, aa as c, af as l } from "./common/main-D7to3RZo.js";
|
||||
import { a7 as s, a9 as r, a8 as u, a6 as o, z as t, ae as m, ac as d, ad as F, ag as i, ab as g, aa as c, af as l } from "./common/main-xbA_iREM.js";
|
||||
export {
|
||||
s as GridLayoutForm,
|
||||
r as GridLayoutFormHelper,
|
||||
|
||||
2
dist/grid-layout-form/utils.js
vendored
2
dist/grid-layout-form/utils.js
vendored
@@ -1,5 +1,5 @@
|
||||
import "lodash";
|
||||
import { a as o, g } from "../common/main-D7to3RZo.js";
|
||||
import { a as o, g } from "../common/main-xbA_iREM.js";
|
||||
export {
|
||||
o as getNormalizeWidget,
|
||||
g as getOptionItemByValue
|
||||
|
||||
2
dist/grid-layout.js
vendored
2
dist/grid-layout.js
vendored
@@ -1,4 +1,4 @@
|
||||
import { q as u, v as e, s as r, H as t, G as d, x as i, z as o, y, w as G } from "./common/main-D7to3RZo.js";
|
||||
import { q as u, v as e, s as r, H as t, G as d, x as i, z as o, y, w as G } from "./common/main-xbA_iREM.js";
|
||||
export {
|
||||
u as GridLayout,
|
||||
e as GridLayoutFramework,
|
||||
|
||||
2
dist/grid-layout/utils.js
vendored
2
dist/grid-layout/utils.js
vendored
@@ -1,4 +1,4 @@
|
||||
import { l as t, o as a, n as l } from "../common/main-D7to3RZo.js";
|
||||
import { l as t, o as a, n as l } from "../common/main-xbA_iREM.js";
|
||||
export {
|
||||
t as getBoxStyle,
|
||||
a as getNormalizeFields,
|
||||
|
||||
2
dist/hooks.js
vendored
2
dist/hooks.js
vendored
@@ -1,7 +1,7 @@
|
||||
import "lodash";
|
||||
import "rc-field-form";
|
||||
import "react";
|
||||
import { a3 as r, a2 as o, a4 as p, a0 as f, a1 as i, a5 as m, $ as c } from "./common/main-D7to3RZo.js";
|
||||
import { a3 as r, a2 as o, a4 as p, a0 as f, a1 as i, a5 as m, $ as c } from "./common/main-xbA_iREM.js";
|
||||
import { default as b } from "rc-util/lib/hooks/useMergedState";
|
||||
export {
|
||||
r as useDeepEffect,
|
||||
|
||||
2
dist/iconfont.js
vendored
2
dist/iconfont.js
vendored
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
|
||||
import "react";
|
||||
import "prop-types";
|
||||
import "classnames";
|
||||
import { ah as a } from "./common/main-D7to3RZo.js";
|
||||
import { ah as a } from "./common/main-xbA_iREM.js";
|
||||
export {
|
||||
a as default
|
||||
};
|
||||
|
||||
2
dist/index.js
vendored
2
dist/index.js
vendored
@@ -1,4 +1,4 @@
|
||||
import { aB as s, aC as e, ax as o, ay as n, at as p, az as r, aw as c, av as u, au as f, aA as l } from "./common/main-D7to3RZo.js";
|
||||
import { aB as s, aC as e, ax as o, ay as n, at as p, az as r, aw as c, av as u, au as f, aA as l } from "./common/main-xbA_iREM.js";
|
||||
export {
|
||||
s as AppContext,
|
||||
e as AppGlobalParamsContext,
|
||||
|
||||
2
dist/pages.js
vendored
2
dist/pages.js
vendored
@@ -1,4 +1,4 @@
|
||||
import { Y as t, X as e, Z as o, _ as g } from "./common/main-D7to3RZo.js";
|
||||
import { Y as t, X as e, Z as o, _ as g } from "./common/main-xbA_iREM.js";
|
||||
export {
|
||||
t as CustomPage,
|
||||
e as DataListPage,
|
||||
|
||||
2
dist/res-ws.js
vendored
2
dist/res-ws.js
vendored
@@ -1,5 +1,5 @@
|
||||
import "lodash";
|
||||
import { R as a } from "./common/main-D7to3RZo.js";
|
||||
import { R as a } from "./common/main-xbA_iREM.js";
|
||||
export {
|
||||
a as default
|
||||
};
|
||||
|
||||
2
dist/style.css
vendored
2
dist/style.css
vendored
File diff suppressed because one or more lines are too long
4
dist/utils.js
vendored
4
dist/utils.js
vendored
@@ -1,6 +1,6 @@
|
||||
import "lodash";
|
||||
import { d as s, f as i, e as g, h as m, b as o, k as P, c as p, j as d, i as h, m as k, r as f, t as u, u as l } from "./common/main-D7to3RZo.js";
|
||||
import "./common/vender-FNiQWFaA.js";
|
||||
import { d as s, f as i, e as g, h as m, b as o, k as P, c as p, j as d, i as h, m as k, r as f, t as u, u as l } from "./common/main-xbA_iREM.js";
|
||||
import "./common/vender-yKcgvbX-.js";
|
||||
export {
|
||||
s as deepSome,
|
||||
i as getPkgCategory,
|
||||
|
||||
2
dist/virtual-fs.js
vendored
2
dist/virtual-fs.js
vendored
@@ -1,5 +1,5 @@
|
||||
import "pathe";
|
||||
import { aD as o, aE as r } from "./common/main-D7to3RZo.js";
|
||||
import { aD as o, aE as r } from "./common/main-xbA_iREM.js";
|
||||
export {
|
||||
o as default,
|
||||
r as toTreePaths
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ff",
|
||||
"private": true,
|
||||
"version": "0.6.23",
|
||||
"version": "0.6.24",
|
||||
"author": "www.fsdpf.com",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
@@ -73,4 +73,4 @@
|
||||
"rc-util/lib/hooks/useMergedState"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user