This commit is contained in:
what 2025-01-17 09:15:47 +08:00
parent c50651c267
commit 0943704703
17 changed files with 102 additions and 101 deletions

2
dist/button.js vendored
View File

@ -1,4 +1,4 @@
import { a4 as s, a3 as u, a5 as e } from "./common/main-RYPExuUh.js"; import { a4 as s, a3 as u, a5 as e } from "./common/main-CUkfhMHd.js";
export { export {
s as auth, s as auth,
u as default, u as default,

View File

@ -3,7 +3,7 @@ var Rt = (e) => {
throw TypeError(e); throw TypeError(e);
}; };
var Ti = (e, t, i) => t in e ? Pi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i; var Ti = (e, t, i) => t in e ? Pi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
var S = (e, t, i) => Ti(e, typeof t != "symbol" ? t + "" : t, i), Ot = (e, t, i) => t.has(e) || Rt("Cannot " + i); var v = (e, t, i) => Ti(e, typeof t != "symbol" ? t + "" : t, i), Ot = (e, t, i) => t.has(e) || Rt("Cannot " + i);
var y = (e, t, i) => (Ot(e, t, "read from private field"), i ? i.call(e) : t.get(e)), R = (e, t, i) => t.has(e) ? Rt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, i), W = (e, t, i, n) => (Ot(e, t, "write to private field"), n ? n.call(e, i) : t.set(e, i), i); var y = (e, t, i) => (Ot(e, t, "read from private field"), i ? i.call(e) : t.get(e)), R = (e, t, i) => t.has(e) ? Rt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, i), W = (e, t, i, n) => (Ot(e, t, "write to private field"), n ? n.call(e, i) : t.set(e, i), i);
var Lt = (e, t, i, n) => ({ var Lt = (e, t, i, n) => ({
set _(r) { set _(r) {
@ -38,7 +38,7 @@ class Yt {
R(this, ce); R(this, ce);
R(this, ke, () => y(this, ce)); R(this, ke, () => y(this, ce));
R(this, xe, () => Promise.resolve()); R(this, xe, () => Promise.resolve());
S(this, "get", (...t) => new Promise((i, n) => { v(this, "get", (...t) => new Promise((i, n) => {
const r = JSON.stringify(t); const r = JSON.stringify(t);
if (y(this, Te).has(r)) return i(y(this, xe).call(this, y(this, ce), ...t)); if (y(this, Te).has(r)) return i(y(this, xe).call(this, y(this, ce), ...t));
if (y(this, ce) === void 0) y(this, Ne).push([t, i, n]), y(this, Ve) && (W(this, Ve, !1), Promise.resolve(typeof y(this, ke) == "function" ? y(this, ke).call(this) : y(this, ke)).then((a) => W(this, ce, a || null)).finally(() => { if (y(this, ce) === void 0) y(this, Ne).push([t, i, n]), y(this, Ve) && (W(this, Ve, !1), Promise.resolve(typeof y(this, ke) == "function" ? y(this, ke).call(this) : y(this, ke)).then((a) => W(this, ce, a || null)).finally(() => {
@ -75,17 +75,17 @@ const sr = () => g(G, { className: "ff-loading", children: L("div", { className:
return typeof (e == null ? void 0 : e.type) == "string" ? e : g(qe.Provider, { value: { ele: t, mount: n, unmount: r }, children: k.cloneElement(e, { className: t.rootClassName, title: t.title, subTitle: t["sub-title"], actions: t.actions, extras: t.extras }) }); return typeof (e == null ? void 0 : e.type) == "string" ? e : g(qe.Provider, { value: { ele: t, mount: n, unmount: r }, children: k.cloneElement(e, { className: t.rootClassName, title: t.title, subTitle: t["sub-title"], actions: t.actions, extras: t.extras }) });
}; };
Xt.propTypes = { children: b.element.isRequired }; Xt.propTypes = { children: b.element.isRequired };
const jt = { close: ["M563.8 512l262.5-312.9c4.4-5.2 0.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9c-4.4 5.2-0.7 13.1 6.1 13.1h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"], check: ["M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474c-6.1-7.7-15.3-12.2-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1 0.4-12.8-6.3-12.8z"], info: ["M512 224m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z", "M544 392h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V400c0-4.4-3.6-8-8-8z"] }, vt = ({ type: e, props: t }) => g("i", { ...t, children: g("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", fill: "currentColor", children: (jt[e] || jt.info).map((i, n) => g("path", { d: i }, n)) }) }), Qt = ({ className: e, content: t, icon: i, $close: n }) => L(k.Fragment, { children: [i && g("div", { className: I("ff-notification-icon", e), children: g(vt, { type: i }) }), t] }), _i = ({}) => g(G, { children: "Confirm" }); const jt = { close: ["M563.8 512l262.5-312.9c4.4-5.2 0.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9c-4.4 5.2-0.7 13.1 6.1 13.1h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"], check: ["M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474c-6.1-7.7-15.3-12.2-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1 0.4-12.8-6.3-12.8z"], info: ["M512 224m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z", "M544 392h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V400c0-4.4-3.6-8-8-8z"] }, St = ({ type: e, props: t }) => g("i", { ...t, children: g("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", fill: "currentColor", children: (jt[e] || jt.info).map((i, n) => g("path", { d: i }, n)) }) }), Qt = ({ className: e, content: t, icon: i, $close: n }) => L(k.Fragment, { children: [i && g("div", { className: I("ff-notification-icon", e), children: g(St, { type: i }) }), t] }), _i = ({}) => g(G, { children: "Confirm" });
var ge, $e; var ge, $e;
const ie = class ie { const ie = class ie {
constructor() { constructor() {
R(this, $e, /* @__PURE__ */ new Map()); R(this, $e, /* @__PURE__ */ new Map());
S(this, "init", (t) => W(this, $e, new Map(t))); v(this, "init", (t) => W(this, $e, new Map(t)));
S(this, "check", (t) => !y(this, $e).has(t) || y(this, $e).get(t)); v(this, "check", (t) => !y(this, $e).has(t) || y(this, $e).get(t));
if (y(ie, ge)) return y(ie, ge); if (y(ie, ge)) return y(ie, ge);
} }
}; };
ge = new WeakMap(), $e = new WeakMap(), R(ie, ge, null), S(ie, "getInstance", () => (y(ie, ge) || W(ie, ge, new ie()), y(ie, ge))); ge = new WeakMap(), $e = new WeakMap(), R(ie, ge, null), v(ie, "getInstance", () => (y(ie, ge) || W(ie, ge, new ie()), y(ie, ge)));
let pt = ie; let pt = ie;
const Gi = pt.getInstance(), Yi = (e, t, i = "children") => { const Gi = pt.getInstance(), Yi = (e, t, i = "children") => {
if (c.isEmpty(e)) return {}; if (c.isEmpty(e)) return {};
@ -102,12 +102,12 @@ var pe, Ie;
const ne = class ne { const ne = class ne {
constructor() { constructor() {
R(this, Ie, null); R(this, Ie, null);
S(this, "init", (t) => W(this, Ie, t)); v(this, "init", (t) => W(this, Ie, t));
S(this, "get", (t, i) => c.get(y(this, Ie), t, i)); v(this, "get", (t, i) => c.get(y(this, Ie), t, i));
if (y(ne, pe)) return y(ne, pe); if (y(ne, pe)) return y(ne, pe);
} }
}; };
pe = new WeakMap(), Ie = new WeakMap(), R(ne, pe, null), S(ne, "getInstance", () => (y(ne, pe) || W(ne, pe, new ne()), y(ne, pe))); pe = new WeakMap(), Ie = new WeakMap(), R(ne, pe, null), v(ne, "getInstance", () => (y(ne, pe) || W(ne, pe, new ne()), y(ne, pe)));
let mt = ne; let mt = ne;
const Ae = mt.getInstance(), Vt = { null2json: (e) => Object.create(), null2array: (e) => [], null2number: (e) => 0, null2bool: (e) => !1, null2string: (e) => "", null2integer: (e) => 0, null2float: (e) => 0, string2json: (e) => e ? JSON.parse(e) : "{}", string2array: (e) => e.substr(0, 1) === "[" && e.substr(-1) === "]" ? JSON.parse(e) : e.split(","), string2number: (e) => e == "" ? 0 : +e, string2integer: (e) => e == "" ? 0 : +e, string2float: (e) => e == "" ? 0 : +e, string2bool: (e) => { const Ae = mt.getInstance(), Vt = { null2json: (e) => Object.create(), null2array: (e) => [], null2number: (e) => 0, null2bool: (e) => !1, null2string: (e) => "", null2integer: (e) => 0, null2float: (e) => 0, string2json: (e) => e ? JSON.parse(e) : "{}", string2array: (e) => e.substr(0, 1) === "[" && e.substr(-1) === "]" ? JSON.parse(e) : e.split(","), string2number: (e) => e == "" ? 0 : +e, string2integer: (e) => e == "" ? 0 : +e, string2float: (e) => e == "" ? 0 : +e, string2bool: (e) => {
switch (`${e}`.toLowerCase()) { switch (`${e}`.toLowerCase()) {
@ -190,7 +190,7 @@ const tt = class tt {
var i; var i;
for (let n of t) Array.isArray(n[0]) ? y(this, ze).call(this, n) : y(this, Me).push(y(i = tt, Ze).call(i, n[0], n[1])); for (let n of t) Array.isArray(n[0]) ? y(this, ze).call(this, n) : y(this, Me).push(y(i = tt, Ze).call(i, n[0], n[1]));
}); });
S(this, "toValue", async (t, i = null) => { v(this, "toValue", async (t, i = null) => {
const n = { getValue: () => t, getRecord: () => i }; const n = { getValue: () => t, getRecord: () => i };
return await y(this, Me).reduce(async (r, a) => { return await y(this, Me).reduce(async (r, a) => {
try { try {
@ -201,7 +201,7 @@ const tt = class tt {
} }
}, t); }, t);
}); });
S(this, "toRender", (t, i, n = null) => k.createElement(y(this, et), { value: t, record: i }, n)); v(this, "toRender", (t, i, n = null) => k.createElement(y(this, et), { value: t, record: i }, n));
R(this, et, ({ value: t, record: i, children: n }) => { R(this, et, ({ value: t, record: i, children: n }) => {
const [r, a] = F(n); const [r, a] = F(n);
return at(() => { return at(() => {
@ -281,7 +281,7 @@ const Xi = (e, t = {}) => H(() => e == null ? void 0 : e.map(({ widgetByJs: i, w
const { classNames: T, onClickCallback: z } = le(te), M = ri(l, u, d, p), q = ht(l, u, n, d, p); const { classNames: T, onClickCallback: z } = le(te), M = ri(l, u, d, p), q = ht(l, u, n, d, p);
return L("div", { className: I("ff-data-table-framework", t), children: [g(i.sider, { isTreeSider: C, ...w }), L("div", { className: I("ff-data-table-container", T == null ? void 0 : T.container), children: [g(i.filter, { isConditionFormLayout: x }), g(i.toolbar, { title: h, tabs: m }), g(cn, { ...N, primaryKey: d, className: "ff-data-table-content", columns: r, dataSource: n, operationRender: q ? (j) => { return L("div", { className: I("ff-data-table-framework", t), children: [g(i.sider, { isTreeSider: C, ...w }), L("div", { className: I("ff-data-table-container", T == null ? void 0 : T.container), children: [g(i.filter, { isConditionFormLayout: x }), g(i.toolbar, { title: h, tabs: m }), g(cn, { ...N, primaryKey: d, className: "ff-data-table-content", columns: r, dataSource: n, operationRender: q ? (j) => {
var V; var V;
return g("div", { className: "ff-data-table-actions", children: (V = M(j)) == null ? void 0 : V.map(($, v) => g(P.Link, { size: "small", uuid: $.uuid, type: $.type, name: $.name, widget: $.widget, widgetType: $.widgetType, widgetProps: $.widgetProps, widgetData: $.widgetData, widgetSetting: $.widgetSetting, widgetContainerProps: $.widgetContainerSetting, data: j, confirm: $.confirm, onAfterClick: (E) => E !== !1 && (z == null ? void 0 : z($.isRefresh, j)) }, $.uuid || v)) }); return g("div", { className: "ff-data-table-actions", children: (V = M(j)) == null ? void 0 : V.map(($, S) => g(P.Link, { size: "small", uuid: $.uuid, type: $.type, name: $.name, widget: $.widget, widgetType: $.widgetType, widgetProps: $.widgetProps, widgetData: $.widgetData, widgetSetting: $.widgetSetting, widgetContainerProps: $.widgetContainerSetting, data: j, confirm: $.confirm, onAfterClick: (E) => E !== !1 && (z == null ? void 0 : z($.isRefresh, j)) }, $.uuid || S)) });
} : null }), g(i.footer, { isPaginate: f, isOperations: o, operations: s })] })] }); } : null }), g(i.footer, { isPaginate: f, isOperations: o, operations: s })] })] });
}, te = k.createContext({ listCode: "", classNames: {}, getBase62params: (e, t) => { }, te = k.createContext({ listCode: "", classNames: {}, getBase62params: (e, t) => {
}, onReload: () => { }, onReload: () => {
@ -326,38 +326,38 @@ const an = ({ className: e, operations: t, isOperations: i, isPaginate: n }) =>
const { getBase62params: n, onTabChange: r, onReload: a, classNames: o } = le(te), { tab: s } = (n == null ? void 0 : n()) || {}, [l, u] = Mi((i == null ? void 0 : i[0].value) ?? (i == null ? void 0 : i[0].code), { value: s, onChange: r }); const { getBase62params: n, onTabChange: r, onReload: a, classNames: o } = le(te), { tab: s } = (n == null ? void 0 : n()) || {}, [l, u] = Mi((i == null ? void 0 : i[0].value) ?? (i == null ? void 0 : i[0].code), { value: s, onChange: r });
return L("div", { className: I("ff-data-list-toolbar", o.toolbar, e), children: [g("div", { className: "ff-data-list-title", children: t }), g(Oi, { className: "ff-data-list-tabs", itemRender: ({ label: p, code: d, value: h }) => g("span", { onClick: () => u(h ?? d), className: I("ff-data-list-tab", { active: (h ?? d) == l }), children: p }), items: i }), L("div", { className: "ff-data-list-actions", children: [g(P.Link, { icon: "icon-reload", widget: () => a() }), g(P.Link, { icon: "icon-setting" })] })] }); return L("div", { className: I("ff-data-list-toolbar", o.toolbar, e), children: [g("div", { className: "ff-data-list-title", children: t }), g(Oi, { className: "ff-data-list-tabs", itemRender: ({ label: p, code: d, value: h }) => g("span", { onClick: () => u(h ?? d), className: I("ff-data-list-tab", { active: (h ?? d) == l }), children: p }), items: i }), L("div", { className: "ff-data-list-actions", children: [g(P.Link, { icon: "icon-reload", widget: () => a() }), g(P.Link, { icon: "icon-setting" })] })] });
}, oi = ({ isItemGridLayout: e, theme: t, themeProps: i, onClickCallback: n, onReload: r, listCode: a, total: o = 0, page: s = 0, onPageChange: l, pageSize: u = 30, onPageSizeChange: p, tab: d, onTabChange: h, keyword: m, onKeywordChange: f, condition: C, onConditionChange: w, sider: x, onSiderChange: N, layouts: T, classNames: z = {}, ...M }) => { }, oi = ({ isItemGridLayout: e, theme: t, themeProps: i, onClickCallback: n, onReload: r, listCode: a, total: o = 0, page: s = 0, onPageChange: l, pageSize: u = 30, onPageSizeChange: p, tab: d, onTabChange: h, keyword: m, onKeywordChange: f, condition: C, onConditionChange: w, sider: x, onSiderChange: N, layouts: T, classNames: z = {}, ...M }) => {
const [q, j] = F(), V = Y((v, E) => { const [q, j] = F(), V = Y((S, E) => {
const B = { tab: d, page: s, pageSize: u, keyword: m, sider: x, condition: C, total: o }; const B = { tab: d, page: s, pageSize: u, keyword: m, sider: x, condition: C, total: o };
return v && v != "init" ? c.get(B, v, E) : B; return S && S != "init" ? c.get(B, S, E) : B;
}, [JSON.stringify(C), d, s, u, m, x, o]), $ = H(() => { }, [JSON.stringify(C), d, s, u, m, x, o]), $ = H(() => {
let v = { sider: on, filter: si, footer: an, toolbar: ln }; let S = { sider: on, filter: si, footer: an, toolbar: ln };
T === !1 ? v = { sider: null, filter: null, footer: null, toolbar: null } : c.isPlainObject(T) && (v = Object.assign({}, v, T)); T === !1 ? S = { sider: null, filter: null, footer: null, toolbar: null } : c.isPlainObject(T) && (S = Object.assign({}, S, T));
for (const E in v) if (v[E]) { for (const E in S) if (S[E]) {
if (Ni(v[E])) { if (Ni(S[E])) {
const B = v[E]; const B = S[E];
v[E] = (X) => k.cloneElement(B, X); S[E] = (X) => k.cloneElement(B, X);
} }
} else v[E] = () => g(k.Fragment, {}); } else S[E] = () => g(k.Fragment, {});
return v; return S;
}, [T]); }, [T]);
return A(() => { return A(() => {
t ? oe.getWidgetComponent(t).then((v) => { t ? oe.getWidgetComponent(t).then((S) => {
if (!v) throw `${t} not found`; if (!S) throw `${t} not found`;
return v; return S;
}).catch((v) => ({ default: () => `${v}` })).then((v) => j(k.createElement(v.default, { ...M, layouts: $, $setting: i }))) : j(g(e ? en : nn, { ...M, layouts: $, $setting: i })); }).catch((S) => ({ default: () => `${S}` })).then((S) => j(k.createElement(S.default, { ...M, layouts: $, $setting: i }))) : j(g(e ? en : nn, { ...M, layouts: $, $setting: i }));
}, [t, i]), g(te.Provider, { value: { classNames: z, listCode: a, onClickCallback: n, onReload: r, getBase62params: V, onPageChange: l, onPageSizeChange: p, onTabChange: h, onSiderChange: N, onKeywordChange: f, onConditionChange: w }, children: q && k.cloneElement(q, M) }); }, [t, i]), g(te.Provider, { value: { classNames: z, listCode: a, onClickCallback: n, onReload: r, getBase62params: V, onPageChange: l, onPageSizeChange: p, onTabChange: h, onSiderChange: N, onKeywordChange: f, onConditionChange: w }, children: q && k.cloneElement(q, M) });
}; };
oi.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]) }; oi.propTypes = { classNames: b.exact({ sider: b.string, filter: b.string, footer: b.string, toolbar: b.string, container: b.string, content: b.string, item: b.string }), layouts: b.oneOfType([b.exact({ sider: b.oneOfType([b.elementType, b.element]), filter: b.oneOfType([b.elementType, b.element]), footer: b.oneOfType([b.elementType, b.element]), toolbar: b.oneOfType([b.elementType, b.element]) }), b.bool]) };
var me, de, ve, it; var me, de, Se, it;
const re = class re { const re = class re {
constructor() { constructor() {
R(this, de, null); R(this, de, null);
R(this, ve, /* @__PURE__ */ new Map()); R(this, Se, /* @__PURE__ */ new Map());
R(this, it, () => { R(this, it, () => {
if (y(this, de)) return y(this, de).port.postMessage({ command: "status", data: [] }); if (y(this, de)) return y(this, de).port.postMessage({ command: "status", data: [] });
W(this, de, new SharedWorker(new URL("/ff-worker/res-ws.js", self.location))), y(this, de).port.onmessage = (t) => { W(this, de, new SharedWorker(new URL("/ff-worker/res-ws.js", self.location))), y(this, de).port.onmessage = (t) => {
var i, n; var i, n;
(i = t.data) != null && i.uuid ? y(this, ve).forEach((r, a) => { (i = t.data) != null && i.uuid ? y(this, Se).forEach((r, a) => {
var o; var o;
(r == "*" || (o = r == null ? void 0 : r.includes) != null && o.call(r, t.data.uuid)) && a(t.data); (r == "*" || (o = r == null ? void 0 : r.includes) != null && o.call(r, t.data.uuid)) && a(t.data);
}) : ((n = t.data) == null ? void 0 : n.readyState) == WebSocket.CLOSED && O.get("/api/user-api-token").then(({ token: r, expire_at: a }) => { }) : ((n = t.data) == null ? void 0 : n.readyState) == WebSocket.CLOSED && O.get("/api/user-api-token").then(({ token: r, expire_at: a }) => {
@ -365,21 +365,21 @@ const re = class re {
}); });
}, y(this, de).port.postMessage({ command: "status", data: [] }); }, y(this, de).port.postMessage({ command: "status", data: [] });
}); });
S(this, "subscribe", (t, i = []) => (i ? Array.isArray(i) && i.length == 0 ? i = "*" : Array.isArray(i) || (i = [i].flat()) : i = "*", y(this, ve).set(t, i), y(this, ve).size == 1 && y(this, it).call(this), () => this.unsubscribe(t))); v(this, "subscribe", (t, i = []) => (i ? Array.isArray(i) && i.length == 0 ? i = "*" : Array.isArray(i) || (i = [i].flat()) : i = "*", y(this, Se).set(t, i), y(this, Se).size == 1 && y(this, it).call(this), () => this.unsubscribe(t)));
S(this, "unsubscribe", (t) => y(this, ve).delete(t)); v(this, "unsubscribe", (t) => y(this, Se).delete(t));
if (y(re, me)) return y(re, me); if (y(re, me)) return y(re, me);
} }
}; };
me = new WeakMap(), de = new WeakMap(), ve = new WeakMap(), it = new WeakMap(), R(re, me, null), S(re, "getInstance", () => (y(re, me) || W(re, me, new re()), y(re, me))); me = new WeakMap(), de = new WeakMap(), Se = new WeakMap(), it = new WeakMap(), R(re, me, null), v(re, "getInstance", () => (y(re, me) || W(re, me, new re()), y(re, me)));
let ft = re; let ft = re;
const li = ft.getInstance(), St = k.forwardRef(({ listCode: e, base62params: t, className: i, theme: n, themeProps: r, layouts: a, classNames: o }, s) => { const li = ft.getInstance(), vt = k.forwardRef(({ listCode: e, base62params: t, className: i, theme: n, themeProps: r, layouts: a, classNames: o }, s) => {
const [{ resource: l, primaryKey: u, batchOperations: p = [], itemOperations: d = [], columns: h = [], themeConfig: m, theme: f, isConditionFormLayout: C = !1, isTreeSider: w, treeSiderConfig: x, isItemGridLayout: N, itemGridLayout: T, title: z, isPaginate: M, tabs: q }, j] = F({ isItemGridLayout: !1, itemGridLayout: {} }), V = Zi(e, t), [{ dataSource: $, itemOperationsAccess: v, condition: E, tab: B, keyword: X, page: Se, total: K, pageSize: st, sider: He, onConditionChange: ot, onTabChange: Ft, onKeywordChange: wi, onPageChange: bi, onPageSizeChange: Ci, onSiderChange: ki, onReload: lt }, Et] = Qi(V, e, u, l), xi = ht(d, v, $, u), vi = ht(p); const [{ resource: l, primaryKey: u, batchOperations: p = [], itemOperations: d = [], columns: h = [], themeConfig: m, theme: f, isConditionFormLayout: C = !1, isTreeSider: w, treeSiderConfig: x, isItemGridLayout: N, itemGridLayout: T, title: z, isPaginate: M, tabs: q }, j] = F({ isItemGridLayout: !1, itemGridLayout: {} }), V = Zi(e, t), [{ dataSource: $, itemOperationsAccess: S, condition: E, tab: B, keyword: X, page: ve, total: K, pageSize: st, sider: He, onConditionChange: ot, onTabChange: Ft, onKeywordChange: wi, onPageChange: bi, onPageSizeChange: Ci, onSiderChange: ki, onReload: lt }, Et] = Qi(V, e, u, l), xi = ht(d, S, $, u), Si = ht(p);
return A(() => { return A(() => {
let Ke = null; let Ke = null;
return e && O.get(`/api/_/${e}`).resp(({ data: Je, res: Si }) => { return e && O.get(`/api/_/${e}`).resp(({ data: Je, res: vi }) => {
Je != null && Je.isDynamicRefresh && (Ke = li.subscribe(() => lt(), Si)), j(Je); Je != null && Je.isDynamicRefresh && (Ke = li.subscribe(() => lt(), vi)), j(Je);
}).catch(() => j({})), () => Ke == null ? void 0 : Ke(); }).catch(() => j({})), () => Ke == null ? void 0 : Ke();
}, [e]), k.useImperativeHandle(s, () => ({ onReload: lt, onClickCallback: Et })), g(oi, { listCode: e, title: z, classNames: o, layouts: a, resource: l, primaryKey: u, theme: n || f, themeProps: r || m, isTreeSider: w, treeSiderConfig: x, isPaginate: M, tabs: q, isItemOperations: xi, isBatchOperations: vi, batchOperations: p, itemOperations: d, isItemGridLayout: N, columns: h, itemGridLayout: T, isConditionFormLayout: C, itemOperationsAccess: v, dataSource: $, onConditionChange: ot, onTabChange: Ft, onKeywordChange: wi, onPageChange: bi, onPageSizeChange: Ci, onSiderChange: ki, condition: E, tab: B, keyword: X, page: Se, total: K, pageSize: st, sider: He, className: I("ff-data-list-helper", i), onReload: lt, onClickCallback: Et }); }, [e]), k.useImperativeHandle(s, () => ({ onReload: lt, onClickCallback: Et })), g(oi, { listCode: e, title: z, classNames: o, layouts: a, resource: l, primaryKey: u, theme: n || f, themeProps: r || m, isTreeSider: w, treeSiderConfig: x, isPaginate: M, tabs: q, isItemOperations: xi, isBatchOperations: Si, batchOperations: p, itemOperations: d, isItemGridLayout: N, columns: h, itemGridLayout: T, isConditionFormLayout: C, itemOperationsAccess: S, dataSource: $, onConditionChange: ot, onTabChange: Ft, onKeywordChange: wi, onPageChange: bi, onPageSizeChange: Ci, onSiderChange: ki, condition: E, tab: B, keyword: X, page: ve, total: K, pageSize: st, sider: He, className: I("ff-data-list-helper", i), onReload: lt, onClickCallback: Et });
}), ci = (e, t, i = !0) => i !== !0 && i-- <= 0 ? [] : c.isArray(e) && !c.isEmpty(e) ? e.reduce((n, r) => (Reflect.has(r, t) && Reflect.has(r, "children") && n.push(r[t]), Reflect.has(r, "children") && !c.isEmpty(r.children) ? n.concat(ci(r.children, t, i)) : n), []) : [], cn = ({ className: e, primaryKey: t, columns: i = [], dataSource: n = [], operationRender: r, operationWidth: a = 180, ...o }) => { }), ci = (e, t, i = !0) => i !== !0 && i-- <= 0 ? [] : c.isArray(e) && !c.isEmpty(e) ? e.reduce((n, r) => (Reflect.has(r, t) && Reflect.has(r, "children") && n.push(r[t]), Reflect.has(r, "children") && !c.isEmpty(r.children) ? n.concat(ci(r.children, t, i)) : n), []) : [], cn = ({ className: e, primaryKey: t, columns: i = [], dataSource: n = [], operationRender: r, operationWidth: a = 180, ...o }) => {
const { classNames: s } = le(te); const { classNames: s } = le(te);
Le(); Le();
@ -442,7 +442,7 @@ const mn = ({ cols: e, rowHeight: t, itemMargin: i, fields: n, primaryKey: r, da
}) }); }) });
}, hn = ({ component: e }) => { }, hn = ({ component: e }) => {
const { base62params: t } = zi(); const { base62params: t } = zi();
return g(G, { children: g(St, { listCode: e, base62params: O.decode(t) }) }); return g(G, { children: g(vt, { listCode: e, base62params: O.decode(t) }) });
}, fn = () => "Empty", yn = ({ component: e, $setting: t }) => { }, fn = () => "Empty", yn = ({ component: e, $setting: t }) => {
const [i, n] = F(); const [i, n] = F();
A(() => { A(() => {
@ -458,27 +458,27 @@ const ae = class ae {
R(this, Q, /* @__PURE__ */ new Map()); R(this, Q, /* @__PURE__ */ new Map());
R(this, fe, {}); R(this, fe, {});
R(this, ye, null); R(this, ye, null);
S(this, "init", (t, i) => { v(this, "init", (t, i) => {
W(this, Q, t), W(this, fe, i); W(this, Q, t), W(this, fe, i);
}); });
S(this, "get", (t) => (y(this, Q).has(t) || (t = Array.from(y(this, Q).keys()).find((i) => y(this, Q).get(i).uri === t)), y(this, Q).get(t) || {})); v(this, "get", (t) => (y(this, Q).has(t) || (t = Array.from(y(this, Q).keys()).find((i) => y(this, Q).get(i).uri === t)), y(this, Q).get(t) || {}));
S(this, "redirect", (t, i, n = {}) => { v(this, "redirect", (t, i, n = {}) => {
const { uri: r, type: a, widgetProps: o } = this.get(t) || {}; const { uri: r, type: a, widgetProps: o } = this.get(t) || {};
let s = Di(r || t, a != "list" ? i : c.mapValues(i, (u) => O.encode(u))); let s = Di(r || t, a != "list" ? i : c.mapValues(i, (u) => O.encode(u)));
const l = new URLSearchParams(); const l = new URLSearchParams();
for (const u in o || {}) (o == null ? void 0 : o.type) == "query" && l.append(u, i[u]); for (const u in o || {}) (o == null ? void 0 : o.type) == "query" && l.append(u, i[u]);
return l.size > 0 && (s = `${s}?${l.toString()}`), y(this, ye).navigate(s, n); return l.size > 0 && (s = `${s}?${l.toString()}`), y(this, ye).navigate(s, n);
}); });
S(this, "getMenus", (t) => { v(this, "getMenus", (t) => {
var i; var i;
return ((i = y(this, fe)) == null ? void 0 : i[t]) || []; return ((i = y(this, fe)) == null ? void 0 : i[t]) || [];
}); });
S(this, "findMenuPathByUuid", (t) => { v(this, "findMenuPathByUuid", (t) => {
let i = []; let i = [];
for (const n in y(this, fe)) if (i = y(this, De).call(this, y(this, fe)[n], t, [n]), i.length > 1) return i; for (const n in y(this, fe)) if (i = y(this, De).call(this, y(this, fe)[n], t, [n]), i.length > 1) return i;
return i; return i;
}); });
S(this, "getMenusByRouteUuid", (t) => y(this, Be).call(this, t, Object.values(y(this, fe)).flat())); v(this, "getMenusByRouteUuid", (t) => y(this, Be).call(this, t, Object.values(y(this, fe)).flat()));
R(this, De, (t, i, n = []) => { R(this, De, (t, i, n = []) => {
if (c.isEmpty(t)) return n; if (c.isEmpty(t)) return n;
for (const { uuid: r, children: a } of t) { for (const { uuid: r, children: a } of t) {
@ -493,27 +493,27 @@ const ae = class ae {
for (const a of i) a.widgetType == "redirect" && (a.uuid == t || a.widget == t ? n.push(a) : (r = a.children) != null && r.length && (n = n.concat(y(this, Be).call(this, t, a.children)))); for (const a of i) a.widgetType == "redirect" && (a.uuid == t || a.widget == t ? n.push(a) : (r = a.children) != null && r.length && (n = n.concat(y(this, Be).call(this, t, a.children))));
return n; return n;
}); });
S(this, "getCurrentMenu", () => { v(this, "getCurrentMenu", () => {
const { uuid: t } = this.getCurrentRoute() || {}; const { uuid: t } = this.getCurrentRoute() || {};
if (!t) return; if (!t) return;
const i = this.getMenusByRouteUuid(t); const i = this.getMenusByRouteUuid(t);
return c.isEmpty(i) ? void 0 : i[0]; return c.isEmpty(i) ? void 0 : i[0];
}); });
S(this, "getCurrentRoute", (t = 0) => { v(this, "getCurrentRoute", (t = 0) => {
var n; var n;
const i = (n = y(this, ye).state.matches[y(this, ye).state.matches.length - 1 - t]) == null ? void 0 : n.route; const i = (n = y(this, ye).state.matches[y(this, ye).state.matches.length - 1 - t]) == null ? void 0 : n.route;
if (!i) return null; if (!i) return null;
for (let [r, a] of y(this, Q)) if (a.uri === i.path) return a; for (let [r, a] of y(this, Q)) if (a.uri === i.path) return a;
return null; return null;
}); });
S(this, "getPageParams", (t) => { v(this, "getPageParams", (t) => {
var a, o; var a, o;
const { location: i = {}, matches: n = [] } = ((a = y(this, ye)) == null ? void 0 : a.state) || {}, r = ((o = n[n.length - 1]) == null ? void 0 : o.params) || {}; const { location: i = {}, matches: n = [] } = ((a = y(this, ye)) == null ? void 0 : a.state) || {}, r = ((o = n[n.length - 1]) == null ? void 0 : o.params) || {};
return i.search && new URLSearchParams(i.search).forEach((s, l) => { return i.search && new URLSearchParams(i.search).forEach((s, l) => {
r[l] = s; r[l] = s;
}), t ? c.get(r, t) : r; }), t ? c.get(r, t) : r;
}); });
S(this, "createBrowserRouter", (t = {}) => { v(this, "createBrowserRouter", (t = {}) => {
if (y(this, Q).size == 0) return null; if (y(this, Q).size == 0) return null;
const i = Ae.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/ff/frameworks/DefaultTheme"), n = Ae.get(oe.checkUserToken() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"), r = { [i]: 0 }, a = (s, l) => () => oe.getWidgetComponent(s).then((u) => u.default || function() { const i = Ae.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/ff/frameworks/DefaultTheme"), n = Ae.get(oe.checkUserToken() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"), r = { [i]: 0 }, a = (s, l) => () => oe.getWidgetComponent(s).then((u) => u.default || function() {
return `${s}`; return `${s}`;
@ -537,17 +537,18 @@ const ae = class ae {
if (y(ae, he)) return y(ae, he); if (y(ae, he)) return y(ae, he);
} }
}; };
he = new WeakMap(), Q = new WeakMap(), fe = new WeakMap(), ye = new WeakMap(), De = new WeakMap(), Be = new WeakMap(), R(ae, he, null), S(ae, "getInstance", () => (y(ae, he) || W(ae, he, new ae()), y(ae, he))); he = new WeakMap(), Q = new WeakMap(), fe = new WeakMap(), ye = new WeakMap(), De = new WeakMap(), Be = new WeakMap(), R(ae, he, null), v(ae, "getInstance", () => (y(ae, he) || W(ae, he, new ae()), y(ae, he)));
let yt = ae; let yt = ae;
const wn = ({ to: e, replace: t }) => qi() ? k.createElement(Ui, { to: e, replace: t }) : (window.document.location = e, "redirect"), ue = yt.getInstance(), Pe = new Worker(new URL("/ff-worker/index.js", self.location)), zt = { getConfigure: (e) => Ae.get(e), route: { redirect: (...e) => ue.redirect(...e), getPageParams: (...e) => ue.getPageParams(...e), getCurrentRoute: () => ue.getCurrentRoute() }, popup: { notification: (...e) => _.notification(...e), success: (...e) => _.success(...e), error: (...e) => _.error(...e), form: (...e) => _.form(...e), modal: (...e) => _.modal(...e), confirm: (...e) => _.confirm(...e) } }; const wn = ({ to: e, replace: t }) => qi() ? k.createElement(Ui, { to: e, replace: t }) : (window.document.location = e, "redirect"), ue = yt.getInstance(), Pe = new Worker(new URL("/ff-worker/index.js", self.location)), zt = { getConfigure: (e) => Ae.get(e), route: { redirect: (...e) => ue.redirect(...e), getPageParams: (...e) => ue.getPageParams(...e), getCurrentRoute: () => ue.getCurrentRoute() }, popup: { notification: (...e) => _.notification(...e), success: (...e) => _.success(...e), error: (...e) => _.error(...e), form: (...e) => _.form(...e), modal: (...e) => _.modal(...e), confirm: (...e) => _.confirm(...e) } };
var nt, Fe, we; var nt, Fe, we;
const D = class D { const D = class D {
constructor() { constructor() {
S(this, "exec", (t, i = {}, n = {}, r = "") => new Promise((a, o) => { v(this, "exec", (t, i = {}, n = {}, r = "") => new Promise((a, o) => {
if (!/^(?!\s*(\/\/|\/\*|\*)).*?\S+/m.test(t)) return a();
const s = Lt(D, nt)._++; const s = Lt(D, nt)._++;
y(D, Fe).set(s, n), D.mQueue.set(s, [a, o]), Pe.postMessage({ id: s, session: r, category: "eval", method: t, args: i }); y(D, Fe).set(s, n), D.mQueue.set(s, [a, o]), Pe.postMessage({ id: s, session: r, category: "eval", method: t, args: i });
})); }));
S(this, "clear", (t) => Pe.postMessage({ session: t, category: "clear" })); v(this, "clear", (t) => Pe.postMessage({ session: t, category: "clear" }));
if (y(D, we)) return y(D, we); if (y(D, we)) return y(D, we);
Promise.resolve().then(() => qn).then((t) => { Promise.resolve().then(() => qn).then((t) => {
zt.http = t.http; zt.http = t.http;
@ -567,7 +568,7 @@ const D = class D {
}, !1); }, !1);
} }
}; };
nt = new WeakMap(), Fe = new WeakMap(), we = new WeakMap(), S(D, "mQueue", /* @__PURE__ */ new Map()), R(D, nt, 0), R(D, Fe, /* @__PURE__ */ new Map()), R(D, we, null), S(D, "getInstance", () => (y(D, we) || W(D, we, new D()), y(D, we))); nt = new WeakMap(), Fe = new WeakMap(), we = new WeakMap(), v(D, "mQueue", /* @__PURE__ */ new Map()), R(D, nt, 0), R(D, Fe, /* @__PURE__ */ new Map()), R(D, we, null), v(D, "getInstance", () => (y(D, we) || W(D, we, new D()), y(D, we)));
let wt = D; let wt = D;
const Ce = wt.getInstance(), rt = () => { const Ce = wt.getInstance(), rt = () => {
const e = U(!0), [, t] = k.useReducer((i) => i + 1, 0); const e = U(!0), [, t] = k.useReducer((i) => i + 1, 0);
@ -694,7 +695,7 @@ const Ce = wt.getInstance(), rt = () => {
} }, [r]), (o, s) => { } }, [r]), (o, s) => {
n.current = s, t == null || t(s); n.current = s, t == null || t(s);
}]; }];
}, vn = ({ type: e, initialValue: t, initialValueLanguage: i, onChange: n, basicForm: r }) => { }, Sn = ({ type: e, initialValue: t, initialValueLanguage: i, onChange: n, basicForm: r }) => {
const a = pi(i == "javascript" && t, i == "javascript" ? void 0 : t, {}, {}, r); const a = pi(i == "javascript" && t, i == "javascript" ? void 0 : t, {}, {}, r);
return A(() => { return A(() => {
i == "javascript" ? n(Z(a, e)) : t && n(Z(t, e)); i == "javascript" ? n(Z(a, e)) : t && n(Z(t, e));
@ -702,16 +703,16 @@ const Ce = wt.getInstance(), rt = () => {
}, mi = ({ widget: e = "Input", widgetPrefix: t = "@pkg/ff/grid-layout-forms", widgetDecorator: i, subWidgets: n = [], basicForm: r, ...a }) => { }, mi = ({ widget: e = "Input", widgetPrefix: t = "@pkg/ff/grid-layout-forms", widgetDecorator: i, subWidgets: n = [], basicForm: r, ...a }) => {
const o = Zt(e, t), [s, l] = xn(o, i, n, r), [u, p] = F(); const o = Zt(e, t), [s, l] = xn(o, i, n, r), [u, p] = F();
return A(() => { return A(() => {
s && oe.getWidgetComponent(s).then(({ defaultProps: d = {}, default: h }) => ({ default: Sn(h, d, r) })).catch((d) => ({ default: () => `${d}` })).then((d) => p(k.createElement(d.default, a))); s && oe.getWidgetComponent(s).then(({ defaultProps: d = {}, default: h }) => ({ default: vn(h, d, r) })).catch((d) => ({ default: () => `${d}` })).then((d) => p(k.createElement(d.default, a)));
}, [s]), u && k.cloneElement(u, { ...a, ...l }); }, [s]), u && k.cloneElement(u, { ...a, ...l });
}, Sn = (e, t = {}, i = null) => (n) => { }, vn = (e, t = {}, i = null) => (n) => {
const { type: r, code: a, label: o, noStyle: s, placeholder: l, required: u = !1, extras: p, validators: d, help: h, isVirtual: m, $isReserved: f, initialValue: C, initialValueLanguage: w, ...x } = c.omit(c.merge({}, t, n), ["convertJs", "convertJsSetting", "widget", "widgetPerfix", "widgetDecorator", "subWidgets", "boxStyle"]), N = Cn(Object.assign({}, d, u ? { required: !0 } : {}), a, r), T = H(() => { const { type: r, code: a, label: o, noStyle: s, placeholder: l, required: u = !1, extras: p, validators: d, help: h, isVirtual: m, $isReserved: f, initialValue: C, initialValueLanguage: w, ...x } = c.omit(c.merge({}, t, n), ["convertJs", "convertJsSetting", "widget", "widgetPerfix", "widgetDecorator", "subWidgets", "boxStyle"]), N = Cn(Object.assign({}, d, u ? { required: !0 } : {}), a, r), T = H(() => {
const V = Object.keys((t == null ? void 0 : t.extras) || {}); const V = Object.keys((t == null ? void 0 : t.extras) || {});
return c.over([c.partialRight(c.pick, V), c.partialRight(c.omit, V)]); return c.over([c.partialRight(c.pick, V), c.partialRight(c.omit, V)]);
}, [t == null ? void 0 : t.extras]), [z, M] = T(x), q = { label: o, noStyle: s, colon: !1, layout: "vertical" }, j = Y((V) => V == null ? void 0 : Z(V, r), [r]); }, [t == null ? void 0 : t.extras]), [z, M] = T(x), q = { label: o, noStyle: s, colon: !1, layout: "vertical" }, j = Y((V) => V == null ? void 0 : Z(V, r), [r]);
return g(Gt, { name: a, rules: N, initialValue: j(C), normalize: j, children: (V, $, v) => { return g(Gt, { name: a, rules: N, initialValue: j(C), normalize: j, children: (V, $, S) => {
var E; var E;
return g(e, { type: r, rcform: v, basicForm: i, itemProps: { validateStatus: $.errors.length > 0 ? "error" : "success", tooltip: h, help: $.errors.length > 0 ? $.errors.join("、") : null, required: ((E = N == null ? void 0 : N[0]) == null ? void 0 : E.required) || !1, ...q }, fieldProps: { placeholder: l, ...M, ...V }, $setting: Object.assign({}, p, z) }); return g(e, { type: r, rcform: S, basicForm: i, itemProps: { validateStatus: $.errors.length > 0 ? "error" : "success", tooltip: h, help: $.errors.length > 0 ? $.errors.join("、") : null, required: ((E = N == null ? void 0 : N[0]) == null ? void 0 : E.required) || !1, ...q }, fieldProps: { placeholder: l, ...M, ...V }, $setting: Object.assign({}, p, z) });
} }); } });
}, Pt = ({ cols: e = 24, rowHeight: t = 16, itemMargin: i = [8, 16], containerPadding: n = [0, 0], fields: r = [], children: a, basicForm: o = null }) => { }, Pt = ({ cols: e = 24, rowHeight: t = 16, itemMargin: i = [8, 16], containerPadding: n = [0, 0], fields: r = [], children: a, basicForm: o = null }) => {
const s = di(r, mi, o); const s = di(r, mi, o);
@ -720,12 +721,12 @@ const Ce = wt.getInstance(), rt = () => {
Pt.propTypes = { fields: b.array }; Pt.propTypes = { fields: b.array };
const Pn = (Bt = Pt, ({ code: e, layout: t, name: i, primaryKey: n = 0, style: r = {}, formProps: a = {}, form: o, basicForm: s, isPreview: l = !1, className: u, onFinish: p, onValuesChange: d = () => { const Pn = (Bt = Pt, ({ code: e, layout: t, name: i, primaryKey: n = 0, style: r = {}, formProps: a = {}, form: o, basicForm: s, isPreview: l = !1, className: u, onFinish: p, onValuesChange: d = () => {
}, ...h }) => { }, ...h }) => {
const { align: m, autoComplete: f, resource: C, items: w, hides: x, rowHeight: N, marginX: T, marginY: z, cols: M, listenChangeFields: q, listenChangeFieldsFunc: j, pk: V, uuid: $ } = bn(e), [v] = ee.useForm(o), E = H(() => [{ name: "__PK__", value: V }, { name: "__PROPS__", value: a }, { name: "__RESOURCE__", value: C }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: $ }, { name: "__PRIMARY_KEY__", value: n }], [V, e, $, C, n, a]); const { align: m, autoComplete: f, resource: C, items: w, hides: x, rowHeight: N, marginX: T, marginY: z, cols: M, listenChangeFields: q, listenChangeFieldsFunc: j, pk: V, uuid: $ } = bn(e), [S] = ee.useForm(o), E = H(() => [{ name: "__PK__", value: V }, { name: "__PROPS__", value: a }, { name: "__RESOURCE__", value: C }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: $ }, { name: "__PRIMARY_KEY__", value: n }], [V, e, $, C, n, a]);
return L(ee, { className: u, name: i || e, layout: t || m, fields: E, form: v, autoComplete: f, style: { ...r, position: "relative" }, onFinish: p, onValuesChange: (B, X) => (({ changedValues: Se, allValues: K, listenChangeFields: st, listenChangeFieldsFunc: He, onValuesChange: ot, code: Ft }) => { return L(ee, { className: u, name: i || e, layout: t || m, fields: E, form: S, autoComplete: f, style: { ...r, position: "relative" }, onFinish: p, onValuesChange: (B, X) => (({ changedValues: ve, allValues: K, listenChangeFields: st, listenChangeFieldsFunc: He, onValuesChange: ot, code: Ft }) => {
ot(Se, K), He && Array.isArray(st) && Ce.exec(He, { changedValues: Se, allValues: K }, { getFieldValue: v.getFieldValue, setFieldValue: v.setFieldValue, setFieldsValue: v.setFieldsValue, isFieldTouched: v.isFieldTouched, isFieldsTouched: v.isFieldsTouched }); ot(ve, K), He && Array.isArray(st) && Ce.exec(He, { changedValues: ve, allValues: K }, { getFieldValue: S.getFieldValue, setFieldValue: S.setFieldValue, setFieldsValue: S.setFieldsValue, isFieldTouched: S.isFieldTouched, isFieldsTouched: S.isFieldsTouched });
})({ changedValues: B, allValues: X, listenChangeFields: q, listenChangeFieldsFunc: j, onValuesChange: d, code: e }), children: [g(Bt, { ...h, form: v, basicForm: s, code: e, fields: w, cols: M, rowHeight: N, itemMargin: [T, z] }), x == null ? void 0 : x.map((B) => { })({ changedValues: B, allValues: X, listenChangeFields: q, listenChangeFieldsFunc: j, onValuesChange: d, code: e }), children: [g(Bt, { ...h, form: S, basicForm: s, code: e, fields: w, cols: M, rowHeight: N, itemMargin: [T, z] }), x == null ? void 0 : x.map((B) => {
var X; var X;
return g(Gt, { name: B.code, children: g(vn, { form: v, basicForm: s, name: B.code, type: B.type, initialValue: B.initialValue, initialValueLanguage: (X = B.extras) == null ? void 0 : X.initialValueLanguage }) }, JSON.stringify(B.code)); return g(Gt, { name: B.code, children: g(Sn, { form: S, basicForm: s, name: B.code, type: B.type, initialValue: B.initialValue, initialValueLanguage: (X = B.extras) == null ? void 0 : X.initialValueLanguage }) }, JSON.stringify(B.code));
})] }, e); })] }, e);
}); });
var Bt; var Bt;
@ -762,7 +763,7 @@ const Tn = (e, t, i, { isReplaceRouteHistory: n = !1 } = {}) => ue.redirect(i, t
return c.isFunction(i) ? i.call(null, { ...t, ...o }) : c.isString(i) && i ? Ce.exec(i, t, o) : null; return c.isFunction(i) ? i.call(null, { ...t, ...o }) : c.isString(i) && i ? Ce.exec(i, t, o) : null;
}, Wt = (e, t, i, n, r) => c.isString(i) && i ? oe.getWidgetComponent(i).then(({ default: a }) => _.modal(a, { ...t, $setting: n }, r != null && r.title ? { ...r, title: c.template(r.title)(e) } : r)).catch((a) => { }, Wt = (e, t, i, n, r) => c.isString(i) && i ? oe.getWidgetComponent(i).then(({ default: a }) => _.modal(a, { ...t, $setting: n }, r != null && r.title ? { ...r, title: c.template(r.title)(e) } : r)).catch((a) => {
_.error(i, { content: a.toString() }); _.error(i, { content: a.toString() });
}) : _.modal(i, { ...t, $setting: n }, r != null && r.title ? { ...r, title: c.template(r.title)(e) } : r), $n = (e, t, i, n, r) => _.modal(hi, { ...t, $setting: n, code: i }, r != null && r.title ? { ...r, title: c.template(r.title)(e) } : r), Fn = (e, t, i, n, r) => _.modal(St, { base62params: t, $setting: n, listCode: i }, r != null && r.title ? { ...r, title: c.template(r.title)(e) } : r), En = ({ widget: e, widgetType: t, widgetData: i, widgetProps: n, widgetSetting: r, widgetContainerProps: a }, { onAfterClick: o, onBeforeClick: s }) => { }) : _.modal(i, { ...t, $setting: n }, r != null && r.title ? { ...r, title: c.template(r.title)(e) } : r), $n = (e, t, i, n, r) => _.modal(hi, { ...t, $setting: n, code: i }, r != null && r.title ? { ...r, title: c.template(r.title)(e) } : r), Fn = (e, t, i, n, r) => _.modal(vt, { base62params: t, $setting: n, listCode: i }, r != null && r.title ? { ...r, title: c.template(r.title)(e) } : r), En = ({ widget: e, widgetType: t, widgetData: i, widgetProps: n, widgetSetting: r, widgetContainerProps: a }, { onAfterClick: o, onBeforeClick: s }) => {
const l = le(te), [u, p] = F({ leading: !0, trailing: !1 }), d = H(() => { const l = le(te), [u, p] = F({ leading: !0, trailing: !1 }), d = H(() => {
switch (t) { switch (t) {
case "redirect": case "redirect":
@ -789,30 +790,30 @@ const Tn = (e, t, i, { isReplaceRouteHistory: n = !1 } = {}) => ue.redirect(i, t
return e === "danger" ? s.danger = !0 : e === "default" && (s.type = e), o === "link" || o === "dashed" ? (s.type = o, e === "default" && (s.className = I(s.className, "ff-default"))) : o !== "circle" && o !== "round" || (s.shape = o), n && (s.icon = g(Ct, { type: n })), t && (s.children = t), s; return e === "danger" ? s.danger = !0 : e === "default" && (s.type = e), o === "link" || o === "dashed" ? (s.type = o, e === "default" && (s.className = I(s.className, "ff-default"))) : o !== "circle" && o !== "round" || (s.shape = o), n && (s.icon = g(Ct, { type: n })), t && (s.children = t), s;
}, [o, e, i, n, r]), We = (e) => function({ className: t, variant: i, children: n, name: r, icon: a, type: o = "default", iconPosition: s = "start", noAuthType: l, onAfterClick: u, onBeforeClick: p, data: d, loading: h, disabled: m, tooltip: f, confirm: C, widget: w = () => { }, [o, e, i, n, r]), We = (e) => function({ className: t, variant: i, children: n, name: r, icon: a, type: o = "default", iconPosition: s = "start", noAuthType: l, onAfterClick: u, onBeforeClick: p, data: d, loading: h, disabled: m, tooltip: f, confirm: C, widget: w = () => {
}, widgetType: x, widgetData: N, widgetProps: T, widgetSetting: z, widgetContainerProps: M, ...q }) { }, widgetType: x, widgetData: N, widgetProps: T, widgetSetting: z, widgetContainerProps: M, ...q }) {
const j = c.isEmpty(f) || !f.enabled ? {} : f, V = c.isEmpty(C) ? { enabled: !1 } : Object.assign({ enabled: !0 }, C), $ = fi({ className: t, name: r, type: o, icon: a, iconPosition: s }, i ?? e), [v, E] = F(!1), [B, { disabled: X, loading: Se }] = En({ widget: w, widgetType: x, widgetData: N, widgetProps: T, widgetSetting: z, widgetContainerProps: M }, { onAfterClick: u, onBeforeClick: p }); const j = c.isEmpty(f) || !f.enabled ? {} : f, V = c.isEmpty(C) ? { enabled: !1 } : Object.assign({ enabled: !0 }, C), $ = fi({ className: t, name: r, type: o, icon: a, iconPosition: s }, i ?? e), [S, E] = F(!1), [B, { disabled: X, loading: ve }] = En({ widget: w, widgetType: x, widgetData: N, widgetProps: T, widgetSetting: z, widgetContainerProps: M }, { onAfterClick: u, onBeforeClick: p });
return g(ji, { okText: "确定", cancelText: "取消", getPopupContainer: (K) => K, ...V, disabled: X || m, open: v, onOpenChange: (K) => { return g(ji, { okText: "确定", cancelText: "取消", getPopupContainer: (K) => K, ...V, disabled: X || m, open: S, onOpenChange: (K) => {
if (!K) return E(K); if (!K) return E(K);
V.enabled ? E(K) : B(d); V.enabled ? E(K) : B(d);
}, onConfirm: () => { }, onConfirm: () => {
B(d); B(d);
}, onClick: (K) => { }, onClick: (K) => {
K.stopPropagation(); K.stopPropagation();
}, children: g(Vi, { getPopupContainer: (K) => K, ...j, title: v ? null : j == null ? void 0 : j.title, trigger: ["hover", "click"], children: g(Xe, { loading: Se || h, disabled: X || m, ...$, ...q, children: n || r }) }) }); }, children: g(Vi, { getPopupContainer: (K) => K, ...j, title: S ? null : j == null ? void 0 : j.title, trigger: ["hover", "click"], children: g(Xe, { loading: ve || h, disabled: X || m, ...$, ...q, children: n || r }) }) });
}, P = We("default"); }, P = We("default");
P.propTypes = { type: b.oneOf(["primary", "default", "danger", ""]), size: b.oneOf(["large", "middle", "small"]), name: b.string, icon: b.string, iconPosition: b.oneOf(["start", "end"]), data: b.any, widget: b.any, widgetType: b.oneOf(["destroy", "redirect", "func", "fsdpf-component", "grid-layout-form", "grid-layout", "data-list"]), widgetData: b.object, widgetProps: b.object, widgetSetting: b.object, widgetContainerProps: b.object, tooltip: b.exact({ title: b.string.isRequired, placement: b.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: b.oneOfType([b.bool, b.number]), getPopupContainer: b.func }), confirm: b.exact({ title: b.string.isRequired, cancelText: b.string, okText: b.string, okType: b.oneOf(["primary", "default", "danger", ""]), placement: b.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: b.oneOfType([b.bool, b.number]), getPopupContainer: b.func, arrow: b.oneOfType([b.bool, b.exact({ pointAtCenter: b.bool })]) }) }; P.propTypes = { type: b.oneOf(["primary", "default", "danger", ""]), size: b.oneOf(["large", "middle", "small"]), name: b.string, icon: b.string, iconPosition: b.oneOf(["start", "end"]), data: b.any, widget: b.any, widgetType: b.oneOf(["destroy", "redirect", "func", "fsdpf-component", "grid-layout-form", "grid-layout", "data-list"]), widgetData: b.object, widgetProps: b.object, widgetSetting: b.object, widgetContainerProps: b.object, tooltip: b.exact({ title: b.string.isRequired, placement: b.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: b.oneOfType([b.bool, b.number]), getPopupContainer: b.func }), confirm: b.exact({ title: b.string.isRequired, cancelText: b.string, okText: b.string, okType: b.oneOf(["primary", "default", "danger", ""]), placement: b.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: b.oneOfType([b.bool, b.number]), getPopupContainer: b.func, arrow: b.oneOfType([b.bool, b.exact({ pointAtCenter: b.bool })]) }) };
const Rn = We("link"), On = We("circle"), Ln = We("round"), An = We("dashed"), Tt = ({ data: e, widget: t, widgetType: i = "fsdpf-component", widgetData: n, widgetProps: r, widgetSetting: a, widgetContainerProps: o, onAfterClick: s, onBeforeClick: l, children: u, extras: p }) => { const Rn = We("link"), On = We("circle"), Ln = We("round"), An = We("dashed"), Tt = ({ data: e, widget: t, widgetType: i = "fsdpf-component", widgetData: n, widgetProps: r, widgetSetting: a, widgetContainerProps: o, onAfterClick: s, onBeforeClick: l, children: u, extras: p }) => {
const d = le(te), [h, m] = F(!1), [f, C] = F("hover"), [w, x] = F({}), [N, T] = F(), { placement: z, align: M, arrow: q = { pointAtCenter: !0 }, getPopupContainer: j, ...V } = o || {}; const d = le(te), [h, m] = F(!1), [f, C] = F("hover"), [w, x] = F({}), [N, T] = F(), { placement: z, align: M, arrow: q = { pointAtCenter: !0 }, getPopupContainer: j, ...V } = o || {};
A(() => { A(() => {
i == "grid-layout-form" ? T(k.createElement(hi, { ...n, $setting: a, code: t })) : i == "data-list" ? T(k.createElement(St, { base62params: e, $setting: a, listCode: t })) : c.isString(t) ? oe.getWidgetComponent(t).then(({ default: E }) => { i == "grid-layout-form" ? T(k.createElement(hi, { ...n, $setting: a, code: t })) : i == "data-list" ? T(k.createElement(vt, { base62params: e, $setting: a, listCode: t })) : c.isString(t) ? oe.getWidgetComponent(t).then(({ default: E }) => {
T(k.createElement(E, { ...n, $setting: a })); T(k.createElement(E, { ...n, $setting: a }));
}).catch((E) => T(E.toString())) : $t(t) ? T(k.createElement(t, { ...n, $setting: a })) : k.isValidElement(t) && T(k.cloneElement(t, { ...n, $setting: a })); }).catch((E) => T(E.toString())) : $t(t) ? T(k.createElement(t, { ...n, $setting: a })) : k.isValidElement(t) && T(k.cloneElement(t, { ...n, $setting: a }));
}, [t, i, n]), A(() => { }, [t, i, n]), A(() => {
Promise.resolve(ei(r, e, { list: d })).then(x); Promise.resolve(ei(r, e, { list: d })).then(x);
}, [r, e, d.getBase62params]); }, [r, e, d.getBase62params]);
const $ = (E, B = !1) => (m(E), !E && C("hover"), E ? l == null ? void 0 : l(w) : s == null ? void 0 : s(B)), v = (E) => { const $ = (E, B = !1) => (m(E), !E && C("hover"), E ? l == null ? void 0 : l(w) : s == null ? void 0 : s(B)), S = (E) => {
m(!0), C("click"); m(!0), C("click");
}; };
return g(Ii, { zIndex: 1080, placement: z, onPopupClick: v, onClick: v, open: h, align: M, arrow: q, trigger: f, getPopupContainer: j, content: g(jn, { ...V, extras: p, children: N && k.cloneElement(N, { ...w, $close: (E) => $(!1, E) }) }), children: u, onOpenChange: $ }); return g(Ii, { zIndex: 1080, placement: z, onPopupClick: S, onClick: S, open: h, align: M, arrow: q, trigger: f, getPopupContainer: j, content: g(jn, { ...V, extras: p, children: N && k.cloneElement(N, { ...w, $close: (E) => $(!1, E) }) }), children: u, onOpenChange: $ });
}, jn = ({ title: e, className: t, children: i, extras: n, width: r, height: a, ...o }) => { }, jn = ({ title: e, className: t, children: i, extras: n, width: r, height: a, ...o }) => {
const [s, l] = F({}), u = Y((m, f) => l((C) => ({ ...C, [m]: f })), []), p = Y((m) => l((f) => ({ ...f, [m]: void 0 })), []), d = e ? k.createElement("div", { className: "ff-popup-title" }, e) : s == null ? void 0 : s.title, h = n ?? k.createElement("div", { className: "ff-popup-reserved-extras" }, n); const [s, l] = F({}), u = Y((m, f) => l((C) => ({ ...C, [m]: f })), []), p = Y((m) => l((f) => ({ ...f, [m]: void 0 })), []), d = e ? k.createElement("div", { className: "ff-popup-title" }, e) : s == null ? void 0 : s.title, h = n ?? k.createElement("div", { className: "ff-popup-reserved-extras" }, n);
return g(qe.Provider, { value: { ele: s, mount: u, unmount: p }, children: L("div", { className: I("ff-popup ff-popover", t, s.rootClassName), style: { width: r, height: a }, ...o, children: [L("div", { className: "ff-popup-header", children: [d, s == null ? void 0 : s["sub-title"]] }), i, L("div", { className: "ff-popup-footer", children: [h, s == null ? void 0 : s.extras, s == null ? void 0 : s.actions] })] }) }); return g(qe.Provider, { value: { ele: s, mount: u, unmount: p }, children: L("div", { className: I("ff-popup ff-popover", t, s.rootClassName), style: { width: r, height: a }, ...o, children: [L("div", { className: "ff-popup-header", children: [d, s == null ? void 0 : s["sub-title"]] }), i, L("div", { className: "ff-popup-footer", children: [h, s == null ? void 0 : s.extras, s == null ? void 0 : s.actions] })] }) });
@ -834,9 +835,9 @@ Ht.propTypes = { triggerWeights: b.array, options: b.arrayOf(b.shape({ ...P.prop
const Vn = ({ fields: e, formProps: t, $close: i }) => { const Vn = ({ fields: e, formProps: t, $close: i }) => {
const [n] = ee.useForm(), r = H(() => [{ name: "__PROPS__", value: t }], [t]); const [n] = ee.useForm(), r = H(() => [{ name: "__PROPS__", value: t }], [t]);
return g(G, { actions: L(k.Fragment, { children: [g(P, { name: "取消", widget: () => i(!1) }), g(P, { name: "确定", type: "primary", widget: () => n.validateFields(!0).then(i) })] }), children: g(ee, { fields: r, form: n, className: "ff-modal-form", children: e == null ? void 0 : e.map(({ code: a, ...o }) => g(mi, { code: a, ...o }, a)) }) }); return g(G, { actions: L(k.Fragment, { children: [g(P, { name: "取消", widget: () => i(!1) }), g(P, { name: "确定", type: "primary", widget: () => n.validateFields(!0).then(i) })] }), children: g(ee, { fields: r, form: n, className: "ff-modal-form", children: e == null ? void 0 : e.map(({ code: a, ...o }) => g(mi, { code: a, ...o }, a)) }) });
}, In = ({ className: e, $close: t, children: i, title: n, subTitle: r, actions: a, extras: o, zIndex: s, ...l }) => L(Ki, { ...l, prefixCls: "ff-drawer", className: I("ff-popup", e), maskMotion: { motionAppear: !0, motionName: "mask-motion" }, motion: (u) => ({ motionAppear: !0, motionName: `panel-motion-${u}` }), children: [L("div", { className: "ff-popup-header", children: [g("button", { "aria-label": "Close", className: "ff-popup-close", onClick: l.onClose, children: g(vt, { type: "close" }) }), n, r] }), g("div", { className: "ff-popup-body", children: i }), L("div", { className: "ff-popup-footer", children: [o, a] })] }), Mn = ({ className: e, $close: t, $event: i, children: n, title: r, subTitle: a, actions: o, extras: s, zIndex: l, placement: u, ...p }) => { }, In = ({ className: e, $close: t, children: i, title: n, subTitle: r, actions: a, extras: o, zIndex: s, ...l }) => L(Ki, { ...l, prefixCls: "ff-drawer", className: I("ff-popup", e), maskMotion: { motionAppear: !0, motionName: "mask-motion" }, motion: (u) => ({ motionAppear: !0, motionName: `panel-motion-${u}` }), children: [L("div", { className: "ff-popup-header", children: [g("button", { "aria-label": "Close", className: "ff-popup-close", onClick: l.onClose, children: g(St, { type: "close" }) }), n, r] }), g("div", { className: "ff-popup-body", children: i }), L("div", { className: "ff-popup-footer", children: [o, a] })] }), Mn = ({ className: e, $close: t, $event: i, children: n, title: r, subTitle: a, actions: o, extras: s, zIndex: l, placement: u, ...p }) => {
const d = (i == null ? void 0 : i.pageX) === void 0 ? { animation: null, maskAnimation: null, mousePosition: { x: null, y: null } } : { animation: "zoom", maskAnimation: "fade", mousePosition: { x: i == null ? void 0 : i.pageX, y: i == null ? void 0 : i.pageY } }; const d = (i == null ? void 0 : i.pageX) === void 0 ? { animation: null, maskAnimation: null, mousePosition: { x: null, y: null } } : { animation: "zoom", maskAnimation: "fade", mousePosition: { x: i == null ? void 0 : i.pageX, y: i == null ? void 0 : i.pageY } };
return g(Ji, { ...p, ...d, prefixCls: "ff-modal", modalRender: () => L("div", { className: I("ff-modal-content ff-popup", e), children: [L("div", { className: "ff-popup-header", children: [g("button", { "aria-label": "Close", className: "ff-popup-close", onClick: p.onClose, children: g(vt, { type: "close" }) }), r, a] }), g("div", { className: "ff-popup-body", children: n }), L("div", { className: "ff-popup-footer", children: [s, o] })] }) }); return g(Ji, { ...p, ...d, prefixCls: "ff-modal", modalRender: () => L("div", { className: I("ff-modal-content ff-popup", e), children: [L("div", { className: "ff-popup-header", children: [g("button", { "aria-label": "Close", className: "ff-popup-close", onClick: p.onClose, children: g(St, { type: "close" }) }), r, a] }), g("div", { className: "ff-popup-body", children: n }), L("div", { className: "ff-popup-footer", children: [s, o] })] }) });
}, yi = ({ placement: e, $close: t, $event: i, children: n, title: r, ...a }) => { }, yi = ({ placement: e, $close: t, $event: i, children: n, title: r, ...a }) => {
const [o, s] = F({}), [l, u] = F(!0), p = Y((f, C) => s((w) => ({ ...w, [f]: C })), []), d = Y((f) => s((C) => ({ ...C, [f]: void 0 })), []); const [o, s] = F({}), [l, u] = F(!0), p = Y((f, C) => s((w) => ({ ...w, [f]: C })), []), d = Y((f) => s((C) => ({ ...C, [f]: void 0 })), []);
let h = { ...a, className: o.rootClassName, title: o.title || r && k.createElement("div", { className: I("ff-popup-title") }, r), subTitle: o["sub-title"], actions: o.actions, extras: o.extras, children: n, $close: t, $event: i, onClose: () => u(!1) }; let h = { ...a, className: o.rootClassName, title: o.title || r && k.createElement("div", { className: I("ff-popup-title") }, r), subTitle: o["sub-title"], actions: o.actions, extras: o.extras, children: n, $close: t, $event: i, onClose: () => u(!1) };
@ -895,7 +896,7 @@ var be, Ee;
const se = class se { const se = class se {
constructor() { constructor() {
R(this, Ee, /* @__PURE__ */ new Map()); R(this, Ee, /* @__PURE__ */ new Map());
S(this, "setVendor", (t, i) => y(this, Ee).set(t, new Yt(i, async (n, r) => { v(this, "setVendor", (t, i) => y(this, Ee).set(t, new Yt(i, async (n, r) => {
var o, s; var o, s;
if (!(n != null && n.default)) throw "@pkg not found"; if (!(n != null && n.default)) throw "@pkg not found";
let a = () => r; let a = () => r;
@ -906,7 +907,7 @@ const se = class se {
} }
throw new je(r); throw new je(r);
}))); })));
S(this, "getWidgetComponent", async (t) => { v(this, "getWidgetComponent", async (t) => {
if (!t) throw "getWidgetComponent widget is required"; if (!t) throw "getWidgetComponent widget is required";
if (t != null && t.startsWith("blob:") || t != null && t.startsWith("http:") || t != null && t.startsWith("https:")) return await import(t); if (t != null && t.startsWith("blob:") || t != null && t.startsWith("http:") || t != null && t.startsWith("https:")) return await import(t);
const [, i] = t == null ? void 0 : t.split("@pkg/"); const [, i] = t == null ? void 0 : t.split("@pkg/");
@ -917,12 +918,12 @@ const se = class se {
throw new Nt(t, n); throw new Nt(t, n);
} }
}); });
S(this, "getRoutes", () => O.get("/api/my-router").then((t) => [...t, { uuid: "data-list-setting", isLayout: !0, uri: "/data-list-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/DataListSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "grid-layout-setting", isLayout: !0, uri: "/grid-layout-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/GridLayoutSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "grid-layout-form-setting", isLayout: !0, uri: "/grid-layout-form-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/GridLayoutFormSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "resource-api-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ResourceApiSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "charts-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ChartsSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "fsm-setting", isLayout: !0, uri: "/fsm-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/FsmSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "component-setting", isLayout: !0, uri: "/component-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ComponentSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "login", uri: "/login", name: "登录", type: "fsdpf-component", isLogin: !1, component: "@pkg/ff/components/Login" }, { uuid: "not-found", uri: "*", name: "Not Found", type: "fsdpf-component", isLogin: !1, component: "@pkg/ff/components/NotFound" }].map(({ uuid: i, ...n }) => [i, { uuid: i, ...n }])).then((t) => new Map(t))); v(this, "getRoutes", () => O.get("/api/my-router").then((t) => [...t, { uuid: "data-list-setting", isLayout: !0, uri: "/data-list-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/DataListSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "grid-layout-setting", isLayout: !0, uri: "/grid-layout-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/GridLayoutSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "grid-layout-form-setting", isLayout: !0, uri: "/grid-layout-form-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/GridLayoutFormSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "resource-api-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ResourceApiSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "charts-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ChartsSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "fsm-setting", isLayout: !0, uri: "/fsm-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/FsmSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "component-setting", isLayout: !0, uri: "/component-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ComponentSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "login", uri: "/login", name: "登录", type: "fsdpf-component", isLogin: !1, component: "@pkg/ff/components/Login" }, { uuid: "not-found", uri: "*", name: "Not Found", type: "fsdpf-component", isLogin: !1, component: "@pkg/ff/components/NotFound" }].map(({ uuid: i, ...n }) => [i, { uuid: i, ...n }])).then((t) => new Map(t)));
S(this, "getMenus", () => O.get("/api/my-menu")); v(this, "getMenus", () => O.get("/api/my-menu"));
S(this, "getConfigure", () => O.get("api/init-configure")); v(this, "getConfigure", () => O.get("api/init-configure"));
S(this, "getWidgetOperationAuth", () => O.get("/api/init-widget-operation-auth").then((t) => t.reduce((i, { uuid: n, auth: r }) => [...i, [n, r]], []))); v(this, "getWidgetOperationAuth", () => O.get("/api/init-widget-operation-auth").then((t) => t.reduce((i, { uuid: n, auth: r }) => [...i, [n, r]], [])));
S(this, "getPhoneNumber", (t) => O.get(`/api/user-wx-phone-number/${t}`)); v(this, "getPhoneNumber", (t) => O.get(`/api/user-wx-phone-number/${t}`));
S(this, "getUserToken", () => { v(this, "getUserToken", () => {
const t = window.localStorage.getItem(Ye); const t = window.localStorage.getItem(Ye);
if (!t) return ""; if (!t) return "";
const i = t.split("."); const i = t.split(".");
@ -931,14 +932,14 @@ const se = class se {
if (Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3) - n > 2592e3) throw "登录令牌已过期, 请重新登录!"; if (Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3) - n > 2592e3) throw "登录令牌已过期, 请重新登录!";
return t; return t;
}); });
S(this, "checkUserToken", () => { v(this, "checkUserToken", () => {
try { try {
return !!this.getUserToken(); return !!this.getUserToken();
} catch { } catch {
return !1; return !1;
} }
}); });
S(this, "getUserInfo", (t = !0) => { v(this, "getUserInfo", (t = !0) => {
var i; var i;
try { try {
const n = this.getUserToken(); const n = this.getUserToken();
@ -950,12 +951,12 @@ const se = class se {
} }
return Promise.resolve(null); return Promise.resolve(null);
}); });
S(this, "login", (t, i, n = {}) => O.post("/api/user-token", { username: t, passwd: Hi.hash(i), platform: "web", ...n }).then(({ token: r }) => (window.localStorage.setItem(Ye, r), r))); v(this, "login", (t, i, n = {}) => O.post("/api/user-token", { username: t, passwd: Hi.hash(i), platform: "web", ...n }).then(({ token: r }) => (window.localStorage.setItem(Ye, r), r)));
S(this, "logout", (t) => (window.localStorage.removeItem(ut), window.localStorage.removeItem(Ye), t == null ? void 0 : t())); v(this, "logout", (t) => (window.localStorage.removeItem(ut), window.localStorage.removeItem(Ye), t == null ? void 0 : t()));
if (y(se, be)) return y(se, be); if (y(se, be)) return y(se, be);
} }
}; };
be = new WeakMap(), Ee = new WeakMap(), R(se, be, null), S(se, "getInstance", () => (y(se, be) || W(se, be, new se()), y(se, be))); be = new WeakMap(), Ee = new WeakMap(), R(se, be, null), v(se, "getInstance", () => (y(se, be) || W(se, be, new se()), y(se, be)));
let xt = se; let xt = se;
const oe = xt.getInstance(), zn = k.createContext({ user: {}, initUser: () => { const oe = xt.getInstance(), zn = k.createContext({ user: {}, initUser: () => {
}, initUserComplete: !1 }), Dn = k.createContext({ set: () => { }, initUserComplete: !1 }), Dn = k.createContext({ set: () => {
@ -1042,7 +1043,7 @@ export {
Z as t, Z as t,
lr as u, lr as u,
an as v, an as v,
St as w, vt as w,
te as x, te as x,
cn as y, cn as y,
mn as z mn as z

2
dist/components.js vendored
View File

@ -1,4 +1,4 @@
import { ab as s, a2 as p, ac as d, ad as n, aa as t } from "./common/main-RYPExuUh.js"; import { ab as s, a2 as p, ac as d, ad as n, aa as t } from "./common/main-CUkfhMHd.js";
export { export {
s as Empty, s as Empty,
p as Icon, p as Icon,

2
dist/container.js vendored
View File

@ -1,4 +1,4 @@
import { a7 as o, ab as s, ac as d, ad as p, a8 as t, aa as n, a9 as r, a6 as u } from "./common/main-RYPExuUh.js"; import { a7 as o, ab as s, ac as d, ad as p, a8 as t, aa as n, a9 as r, a6 as u } from "./common/main-CUkfhMHd.js";
export { export {
o as Context, o as Context,
s as Empty, s as Empty,

View File

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

2
dist/data-list.js vendored
View File

@ -1,4 +1,4 @@
import { z as t, x as e, p as r, v as o, A as i, w as u, s as D, y as l, q as L, B as n, o as p, C as m, L as C, F as c, J as F, I as b, K as d, E as k } from "./common/main-RYPExuUh.js"; import { z as t, x as e, p as r, v as o, A as i, w as u, s as D, y as l, q as L, B as n, o as p, C as m, L as C, F as c, J as F, I as b, K as d, E as k } from "./common/main-CUkfhMHd.js";
export { export {
t as DataListContent, t as DataListContent,
e as DataListContext, e as DataListContext,

View File

@ -1,5 +1,5 @@
import "lodash"; import "lodash";
import { j as a } from "../common/main-RYPExuUh.js"; import { j as a } from "../common/main-CUkfhMHd.js";
export { export {
a as getDefaultExpandRowKeys a as getDefaultExpandRowKeys
}; };

View File

@ -1,4 +1,4 @@
import { V as s, X as r, W as u, U as o, $ as t, _ as d, a1 as m, Z as F, Y as i, a0 as g } from "./common/main-RYPExuUh.js"; import { V as s, X as r, W as u, U as o, $ as t, _ as d, a1 as m, Z as F, Y as i, a0 as g } from "./common/main-CUkfhMHd.js";
export { export {
s as GridLayoutForm, s as GridLayoutForm,
r as GridLayoutFormHelper, r as GridLayoutFormHelper,

View File

@ -1,5 +1,5 @@
import "lodash"; import "lodash";
import { g as o, a as g } from "../common/main-RYPExuUh.js"; import { g as o, a as g } from "../common/main-CUkfhMHd.js";
export { export {
o as getOptionItemByValue, o as getOptionItemByValue,
g as getWidgetByNormalize g as getWidgetByNormalize

2
dist/grid-layout.js vendored
View File

@ -1,4 +1,4 @@
import { k as d, l as e, H as i, G as t, m as u, n as o } from "./common/main-RYPExuUh.js"; import { k as d, l as e, H as i, G as t, m as u, n as o } from "./common/main-CUkfhMHd.js";
export { export {
d as GridLayout, d as GridLayout,
e as GridLayoutWidget, e as GridLayoutWidget,

View File

@ -1,4 +1,4 @@
import { h as o, i as a } from "../common/main-RYPExuUh.js"; import { h as o, i as a } from "../common/main-CUkfhMHd.js";
export { export {
o as getBoxStyle, o as getBoxStyle,
a as getWidgetByNormalize a as getWidgetByNormalize

2
dist/hooks.js vendored
View File

@ -1,7 +1,7 @@
import "lodash"; import "lodash";
import "rc-field-form"; import "rc-field-form";
import "react"; import "react";
import { Q as r, P as o, S as p, N as f, O as i, T as m, M as c } from "./common/main-RYPExuUh.js"; import { Q as r, P as o, S as p, N as f, O as i, T as m, M as c } from "./common/main-CUkfhMHd.js";
import { default as S } from "rc-util/lib/hooks/useMergedState"; import { default as S } from "rc-util/lib/hooks/useMergedState";
export { export {
r as useDeepEffect, r as useDeepEffect,

2
dist/iconfont.js vendored
View File

@ -2,7 +2,7 @@ import "react/jsx-runtime";
import "react"; import "react";
import "prop-types"; import "prop-types";
import "classnames"; import "classnames";
import { a2 as a } from "./common/main-RYPExuUh.js"; import { a2 as a } from "./common/main-CUkfhMHd.js";
export { export {
a as default a as default
}; };

2
dist/index.js vendored
View File

@ -1,4 +1,4 @@
import { am as t, an as e, ai as o, aj as n, ae as p, ak as r, ah as c, ag as f, af as l, al as i } from "./common/main-RYPExuUh.js"; import { am as t, an as e, ai as o, aj as n, ae as p, ak as r, ah as c, ag as f, af as l, al as i } from "./common/main-CUkfhMHd.js";
export { export {
t as AppContext, t as AppContext,
e as AppGlobalParamsContext, e as AppGlobalParamsContext,

2
dist/res-ws.js vendored
View File

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

2
dist/utils.js vendored
View File

@ -1,5 +1,5 @@
import "lodash"; import "lodash";
import { d as s, e as g, c as r, f as o, b as i, r as m, t as p, u as P } from "./common/main-RYPExuUh.js"; import { d as s, e as g, c as r, f as o, b as i, r as m, t as p, u as P } from "./common/main-CUkfhMHd.js";
export { export {
s as deepSome, s as deepSome,
g as getPkgCategory, g as getPkgCategory,

View File

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