v0.4.25
This commit is contained in:
@@ -24,7 +24,8 @@ import { useParams as Oa, generatePath as Va, createBrowserRouter as Aa, useInRo
|
||||
import L from "prop-types";
|
||||
import * as jt from "react-is";
|
||||
import { useNotification as Ma } from "rc-notification";
|
||||
import { N as Be, a as Ue, w as ht, S as za } from "./vender-egxe712p.js";
|
||||
import { N as Be, a as Ue, T as ht, S as za } from "./vender-DMK1apIA.js";
|
||||
import "rc-util/lib/hooks/useMergedState";
|
||||
import Mt from "immutability-helper";
|
||||
import Wa from "rc-drawer";
|
||||
import Ba from "rc-dialog";
|
||||
@@ -59,7 +60,7 @@ class Qt {
|
||||
}
|
||||
}
|
||||
Ie = new WeakMap(), He = new WeakMap(), je = new WeakMap(), ue = new WeakMap(), Fe = new WeakMap(), Re = new WeakMap();
|
||||
const Kn = () => d("div", { children: "Empty" }), Qe = C.createContext({ ele: {}, mount: () => {
|
||||
const _n = () => d("div", { children: "Empty" }), Qe = C.createContext({ ele: {}, mount: () => {
|
||||
}, unmount: () => {
|
||||
} }), K = ({ rootClassName: e, className: t, children: a, actions: n, title: r, subTitle: s, extras: i, style: o = {} }) => {
|
||||
const { mount: l, unmount: u } = C.useContext(Qe);
|
||||
@@ -69,7 +70,7 @@ const Kn = () => d("div", { children: "Empty" }), Qe = C.createContext({ ele: {}
|
||||
return x(() => (n(e, C.createElement("div", { key: `ff-${e}`, className: R(`ff-popup-${e}`, a) }, t)), () => r(e)), [a, t]), null;
|
||||
};
|
||||
K.Action = tt("actions"), K.Title = tt("title"), K.SubTitle = tt("sub-title"), K.Extra = tt("extras"), K.propTypes = { className: L.string, style: L.object, title: L.any, subTitle: L.any, actions: L.any, extras: L.any };
|
||||
const _n = () => d(K, { className: "ff-loading", children: $("div", { className: "loader", children: [$("div", { className: "square", children: [d("span", {}), d("span", {}), d("span", {})] }), $("div", { className: "square", children: [d("span", {}), d("span", {}), d("span", {})] }), $("div", { className: "square", children: [d("span", {}), d("span", {}), d("span", {})] }), $("div", { className: "square", children: [d("span", {}), d("span", {}), d("span", {})] })] }) }), Gn = () => d("div", { children: "NotFound" }), Zt = ({ children: e }) => {
|
||||
const Gn = () => d(K, { className: "ff-loading", children: $("div", { className: "loader", children: [$("div", { className: "square", children: [d("span", {}), d("span", {}), d("span", {})] }), $("div", { className: "square", children: [d("span", {}), d("span", {}), d("span", {})] }), $("div", { className: "square", children: [d("span", {}), d("span", {}), d("span", {})] }), $("div", { className: "square", children: [d("span", {}), d("span", {}), d("span", {})] })] }) }), Yn = () => d("div", { children: "NotFound" }), Zt = ({ children: e }) => {
|
||||
const [t, a] = P({}), n = me((s, i) => a((o) => ({ ...o, [s]: i })), []), r = me((s) => a((i) => ({ ...i, [s]: void 0 })), []);
|
||||
return typeof (e == null ? void 0 : e.type) == "string" ? e : d(Qe.Provider, { value: { ele: t, mount: n, unmount: r }, children: C.cloneElement(e, { className: t.rootClassName, title: t.title, subTitle: t["sub-title"], actions: t.actions, extras: t.extras }) });
|
||||
};
|
||||
@@ -194,13 +195,13 @@ rt = new WeakMap(), Ke = new WeakMap(), _e = new WeakMap(), st = new WeakMap(),
|
||||
return ((r = n.default) == null ? void 0 : r.call(n, a)) || ((s) => s);
|
||||
}), (t, a) => `${t}::${Z(a, "string")}`));
|
||||
let wt = it;
|
||||
const qa = (e, t = {}) => ie(() => e == null ? void 0 : e.map(({ widgetByJs: a, widgetByJsSetting: n, ...r }, s) => a ? { ...r, render: (i, o) => new wt([a, n]).toRender(i, o, "-") } : r), [e, t]), Yn = (e) => {
|
||||
const qa = (e, t = {}) => ie(() => e == null ? void 0 : e.map(({ widgetByJs: a, widgetByJsSetting: n, ...r }, s) => a ? { ...r, render: (i, o) => new wt([a, n]).toRender(i, o, "-") } : r), [e, t]), Xn = (e) => {
|
||||
const [t, a] = P({});
|
||||
return x(() => {
|
||||
let n = !1;
|
||||
return e && E.get(`/api/_/${e}`).then((r) => p.pick(r, ["uuid", "name", "code", "resource", "marginX", "marginY", "cols", "rowHeight", "primaryKey", "columns", "itemOperations", "batchOperations", "isConditionFormLayout", "layout", "tabs", "pageSize", "layoutConfig"])).then((r) => !n && a(r)), () => n = !0;
|
||||
}, [e]), t;
|
||||
}, Xn = (e, t = {}) => {
|
||||
}, Qn = (e, t = {}) => {
|
||||
const [a, n] = P({ dataSource: [] });
|
||||
return Ze(() => {
|
||||
let r = !1;
|
||||
@@ -371,14 +372,14 @@ const oa = ({ className: e, title: t, tabs: a, tab: n, onTabChange: r }) => {
|
||||
}, en = (e, t = {}, a = null) => (n) => {
|
||||
const { code: r, label: s, extras: i, isVirtual: o, initialValue: l, initialValueLanguage: u, convertJs: c, convertJsSetting: m, ...h } = p.merge({}, t, n), [f, y] = ua(o ? null : r, { initialValue: l, initialValueLanguage: u, convertJs: c, convertJsSetting: m, type: (h == null ? void 0 : h.type) || "string" }, a);
|
||||
return d(e, { ...h, value: f, rawValue: y, $setting: i || {} });
|
||||
}, Qn = (Ut = pa, function({ code: e, data: t, ...a }) {
|
||||
}, Zn = (Ut = pa, function({ code: e, data: t, ...a }) {
|
||||
const [n, r] = P({ resource: null, cols: 12, rowHeight: 21, fields: [] });
|
||||
return x(() => {
|
||||
e && E.get(`/api/_/${e}`).then((s) => r(p.pick(s, ["resource", "cols", "rowHeight", "fields"])));
|
||||
}, [e]), (n == null ? void 0 : n.resource) && d(Ut, { ...a, rowHeight: n.rowHeight, cols: n.cols, fields: n.fields, data: n != null && n.resource ? { [n == null ? void 0 : n.resource]: t } : {} });
|
||||
});
|
||||
var Ut;
|
||||
const Zn = ({ widget: e, widgetPrefix: t = "@pkg/ff/grid-layouts", basicForm: a, ...n }) => {
|
||||
const er = ({ widget: e, widgetPrefix: t = "@pkg/ff/grid-layouts", basicForm: a, ...n }) => {
|
||||
const r = e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`, [s, i] = P();
|
||||
return x(() => {
|
||||
r && X.getWidgetComponent(r).then(({ defaultProps: o = {}, default: l }) => ({ default: tn(l, o, a) })).catch((o) => ({ default: () => `${o}` })).then((o) => i(C.createElement(o.default, n)));
|
||||
@@ -521,12 +522,12 @@ let vt = A;
|
||||
const Ne = vt.getInstance(), ma = () => {
|
||||
const e = Y(!0), [, t] = C.useReducer((a) => a + 1, 0);
|
||||
return x(() => () => e.current = !1, []), () => e.current && t();
|
||||
}, er = (e) => {
|
||||
}, tr = (e) => {
|
||||
const t = Y();
|
||||
return x(() => {
|
||||
t.current = e;
|
||||
}, [e]), t.current;
|
||||
}, tr = (e) => {
|
||||
}, ar = (e) => {
|
||||
const [t, a] = P(e), n = Y(null), r = me((s, i) => {
|
||||
n.current = i, a(s);
|
||||
}, []);
|
||||
@@ -542,14 +543,14 @@ const Ne = vt.getInstance(), ma = () => {
|
||||
if (!Array.isArray(e)) return e;
|
||||
for (let n = 0; n < e.length; n++) e[n].value = Z((a = e[n]) == null ? void 0 : a.value, t), e[n] && Reflect.has(e[n], "children") && (e[n].children = ha(e[n].children, t));
|
||||
return e;
|
||||
}, ar = (e, t = "json", a = "string", n, r = null) => {
|
||||
}, nr = (e, t = "json", a = "string", n, r = null) => {
|
||||
const [s] = ee.useForm(n), [i, o] = P([{ label: "无", value: "", disabled: !0 }]), l = Y([]), u = ee.useWatch((c) => l.current.length === 0 ? null : p.pick(c, l.current), s) || null;
|
||||
return x(() => {
|
||||
Array.isArray(e) ? o(e) : t === "javascript" && e ? Ne.exec(e, {}, { getFieldValue: (c) => (l.current.includes(c) || l.current.push(c), s.getFieldValue(c)), getFieldValueForBasicForm: (c) => (l.current.includes(c) || l.current.push(c), r ? r.getFieldValue(c) : s.getFieldValue(c)) }).then((c) => {
|
||||
o(Z(c, "array"));
|
||||
}) : e && o(Z(e, "array"));
|
||||
}, [e, t, u]), ha(i, a);
|
||||
}, nr = (e) => {
|
||||
}, rr = (e) => {
|
||||
const [t, a] = P(), n = { type: "GET" };
|
||||
if (typeof e == "string" ? n.url = e : p.isPlainObject(e) && Object.assign(n, e), !(n != null && n.url)) throw "url is required";
|
||||
const r = (s) => E.request(n, !1).resp((i) => (console.log("useSubscribeRequest", s), a(i), i));
|
||||
@@ -614,7 +615,7 @@ const Ne = vt.getInstance(), ma = () => {
|
||||
return x(() => {
|
||||
e && Ne.exec(e, n, { getFieldValue: p.wrap(t.getFieldValue, (c, m) => (i.current.some((h) => p.isEqual(h, m)) || (i.current.push(m), r()), c(m))), isFieldTouched: t.isFieldTouched, isFieldsTouched: t.isFieldsTouched }).then((c) => s.current && l(c));
|
||||
}, [e, u, t, n]), x(() => () => s.current = !1, []), o;
|
||||
}, rr = ({ value: e, onChange: t }, a = null) => {
|
||||
}, sr = ({ value: e, onChange: t }, a = null) => {
|
||||
const n = Y(), [r] = ee.useForm(a);
|
||||
return Ft(() => {
|
||||
p.isEqual(n.current, e) || r.setFieldsValue(e);
|
||||
@@ -879,14 +880,14 @@ const X = $t.getInstance(), xn = C.createContext({ user: {}, initUser: () => {
|
||||
return {};
|
||||
};
|
||||
export {
|
||||
Kn as $,
|
||||
tr as A,
|
||||
_n as $,
|
||||
ar as A,
|
||||
Ze as B,
|
||||
Ft as C,
|
||||
wt as D,
|
||||
ar as E,
|
||||
nr as F,
|
||||
Qn as G,
|
||||
nr as E,
|
||||
rr as F,
|
||||
Zn as G,
|
||||
Qa as H,
|
||||
mn as I,
|
||||
Rt as J,
|
||||
@@ -896,7 +897,7 @@ export {
|
||||
cn as N,
|
||||
dn as O,
|
||||
un as P,
|
||||
rr as Q,
|
||||
sr as Q,
|
||||
sa as R,
|
||||
Pt as S,
|
||||
S as T,
|
||||
@@ -908,8 +909,8 @@ export {
|
||||
J as Z,
|
||||
G as _,
|
||||
ia as a,
|
||||
_n as a0,
|
||||
Gn as a1,
|
||||
Gn as a0,
|
||||
Yn as a1,
|
||||
X as a2,
|
||||
Ot as a3,
|
||||
Tn as a4,
|
||||
@@ -923,7 +924,7 @@ export {
|
||||
Rn as ac,
|
||||
da as b,
|
||||
pa as c,
|
||||
Zn as d,
|
||||
er as d,
|
||||
ga as e,
|
||||
_a as f,
|
||||
ta as g,
|
||||
@@ -941,9 +942,9 @@ export {
|
||||
qa as s,
|
||||
Z as t,
|
||||
ua as u,
|
||||
Yn as v,
|
||||
Xn as w,
|
||||
Xn as v,
|
||||
Qn as w,
|
||||
Ct as x,
|
||||
ma as y,
|
||||
er as z
|
||||
tr as z
|
||||
};
|
||||
1483
dist/common/vender-DMK1apIA.js
vendored
Normal file
1483
dist/common/vender-DMK1apIA.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1633
dist/common/vender-egxe712p.js
vendored
1633
dist/common/vender-egxe712p.js
vendored
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user