v0.4.55
This commit is contained in:
parent
d1d8e33d93
commit
90db6240ae
2
dist/button.js
vendored
2
dist/button.js
vendored
@ -1,4 +1,4 @@
|
||||
import { a4 as s, a3 as u, a5 as e } from "./common/main-CvDVi9au.js";
|
||||
import { a4 as s, a3 as u, a5 as e } from "./common/main-DHR-49jb.js";
|
||||
export {
|
||||
s as auth,
|
||||
u as default,
|
||||
|
@ -17,13 +17,13 @@ import { jsx as d, jsxs as O } from "react/jsx-runtime";
|
||||
import k, { useEffect as L, useState as N, useCallback as Y, useMemo as H, useRef as U, useContext as oe, useId as Le, isValidElement as Ti, useLayoutEffect as $i } from "react";
|
||||
import c from "lodash";
|
||||
import Kt from "immutability-helper";
|
||||
import { Form as Ge, Input as Ni, Button as Xe, Pagination as Ri, Tree as Ei, Breadcrumb as Fi, Table as Oi, Empty as Li, Popconfirm as Ai, Tooltip as ji, Popover as Vi } from "antd";
|
||||
import { Form as Ge, Input as Ni, Button as Xe, Pagination as Ri, Tree as Ei, Breadcrumb as Fi, Table as Oi, Empty as Li, Popconfirm as ji, Tooltip as Ai, Popover as Vi } from "antd";
|
||||
import { useMergedState as Ii } from "rc-util";
|
||||
import I from "classnames";
|
||||
import Z, { FieldContext as Jt, Field as _t } from "rc-field-form";
|
||||
import { useParams as Mi, generatePath as zi, createBrowserRouter as Di, useInRouterContext as Bi, Navigate as qi } from "react-router-dom";
|
||||
import b from "prop-types";
|
||||
import * as At from "react-is";
|
||||
import * as jt from "react-is";
|
||||
import { useNotification as Ui } from "rc-notification";
|
||||
import { N as Fe, a as Oe, T as gt, S as Wi } from "./vender-DMK1apIA.js";
|
||||
import "rc-util/lib/hooks/useMergedState";
|
||||
@ -75,7 +75,7 @@ const ar = () => d(G, { className: "ff-loading", children: O("div", { className:
|
||||
return typeof (e == null ? void 0 : e.type) == "string" ? e : d(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 }) });
|
||||
};
|
||||
Yt.propTypes = { children: b.element.isRequired };
|
||||
const jt = { close: ["M563.8 512l262.5-312.9c4.4-5.2 0.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9c-4.4 5.2-0.7 13.1 6.1 13.1h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"], check: ["M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474c-6.1-7.7-15.3-12.2-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1 0.4-12.8-6.3-12.8z"], info: ["M512 224m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z", "M544 392h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V400c0-4.4-3.6-8-8-8z"] }, vt = ({ type: e, props: t }) => d("i", { ...t, children: d("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", fill: "currentColor", children: (jt[e] || jt.info).map((i, n) => d("path", { d: i }, n)) }) }), Xt = ({ className: e, content: t, icon: i, $close: n }) => O(k.Fragment, { children: [i && d("div", { className: I("ff-notification-icon", e), children: d(vt, { type: i }) }), t] }), Ji = ({}) => d(G, { children: "Confirm" });
|
||||
const At = { close: ["M563.8 512l262.5-312.9c4.4-5.2 0.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9c-4.4 5.2-0.7 13.1 6.1 13.1h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"], check: ["M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474c-6.1-7.7-15.3-12.2-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1 0.4-12.8-6.3-12.8z"], info: ["M512 224m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z", "M544 392h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V400c0-4.4-3.6-8-8-8z"] }, vt = ({ type: e, props: t }) => d("i", { ...t, children: d("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", fill: "currentColor", children: (At[e] || At.info).map((i, n) => d("path", { d: i }, n)) }) }), Xt = ({ className: e, content: t, icon: i, $close: n }) => O(k.Fragment, { children: [i && d("div", { className: I("ff-notification-icon", e), children: d(vt, { type: i }) }), t] }), Ji = ({}) => d(G, { children: "Confirm" });
|
||||
var ge, Ne;
|
||||
const te = class te {
|
||||
constructor() {
|
||||
@ -109,7 +109,7 @@ const ie = class ie {
|
||||
};
|
||||
pe = new WeakMap(), Ie = new WeakMap(), R(ie, pe, null), S(ie, "getInstance", () => (y(ie, pe) || q(ie, pe, new ie()), y(ie, pe)));
|
||||
let mt = ie;
|
||||
const Ae = mt.getInstance(), Vt = { null2json: (e) => Object.create(), null2array: (e) => [], null2number: (e) => 0, null2bool: (e) => !1, null2string: (e) => "", null2integer: (e) => 0, null2float: (e) => 0, string2json: (e) => e ? JSON.parse(e) : "{}", string2array: (e) => e.substr(0, 1) === "[" && e.substr(-1) === "]" ? JSON.parse(e) : e.split(","), string2number: (e) => e == "" ? 0 : +e, string2integer: (e) => e == "" ? 0 : +e, string2float: (e) => e == "" ? 0 : +e, string2bool: (e) => {
|
||||
const je = 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()) {
|
||||
case "0":
|
||||
case "false":
|
||||
@ -254,7 +254,7 @@ const Yi = (e, t = {}) => H(() => e == null ? void 0 : e.map(({ widgetByJs: i, w
|
||||
const T = new Map(v);
|
||||
o.current.forEach((z, M) => {
|
||||
var B;
|
||||
(B = T.get(M)) != null && B.some((A) => A == m) || o.current.set(M, z.filter((A) => A !== m));
|
||||
(B = T.get(M)) != null && B.some((j) => j == m) || o.current.set(M, z.filter((j) => j !== m));
|
||||
}), T.forEach((z, M) => {
|
||||
o.current.has(M) ? o.current.set(M, c.uniq([...o.current.get(M) || [], ...z])) : o.current.set(M, z);
|
||||
});
|
||||
@ -275,13 +275,13 @@ const Yi = (e, t = {}) => H(() => e == null ? void 0 : e.map(({ widgetByJs: i, w
|
||||
const o = H(() => c.pick(n.current, ["total", "tab", "page", "pageSize", "condition", "sider", "keyword"]), [n.current]);
|
||||
return Object.assign(o, { onTabChange: (l) => s({ tab: l, page: 1 }), onPageChange: (l, u) => s({ page: l, pageSize: u }), onPageSizeChange: (l) => s({ pageSize: l, page: 1 }), onConditionChange: (l, u) => s({ keyword: u, condition: Kt(n.current.condition || {}, { $merge: l || {} }), page: 1 }), onSiderChange: (l) => s({ sider: l, page: 1 }), onKeywordChange: (l) => s({ keyword: l, page: 1 }), itemOperationsAccess: r.current, dataSource: a.current, onReload: s });
|
||||
}, Zi = ({ listCode: e, className: t, layouts: i, dataSource: n, isPaginate: r, isItemOperations: a, isBatchOperations: s, batchOperations: o, itemOperations: l, itemOperationsAccess: u, resource: p, primaryKey: g, title: h, itemGridLayout: m, $setting: f, tabs: C, isConditionFormLayout: w, isTreeSider: v, treeSiderConfig: $ }) => {
|
||||
const { classNames: T, onClickCallback: z } = oe(ee), M = ni(l, u, g, p), B = Y((A, j, x) => d(en, { className: I("ff-data-list-framework-item", T.item), operations: a ? M(j) : [], data: p ? { [p]: j } : j, children: A, onClickCallback: z }), [p, g, a, z, l, u]);
|
||||
const { classNames: T, onClickCallback: z } = oe(ee), M = ni(l, u, g, p), B = Y((j, A, x) => d(en, { className: I("ff-data-list-framework-item", T.item), operations: a ? M(A) : [], data: p ? { [p]: A } : A, children: j, onClickCallback: z }), [p, g, a, z, l, u]);
|
||||
return O("div", { className: I("ff-data-list-framework", t), children: [d(i.sider, { isTreeSider: v, ...$ }), O("div", { className: I("ff-data-list-container", T == null ? void 0 : T.container), children: [d(i.filter, { isConditionFormLayout: w }), d(i.toolbar, { title: h, tabs: C }), d(pn, { ...m, style: { "--col-num": (f == null ? void 0 : f.colNum) || 1 }, primaryKey: g, itemRender: B, dataSource: n }), d(i.footer, { isPaginate: r, isOperations: s, operations: o })] })] });
|
||||
}, en = ({ className: e, operations: t, children: i, data: n, onClickCallback: r }) => O("div", { className: I("data-list-grid-layout-item-container", e), children: [i, !!(t != null && t.length) && d("div", { className: "data-list-grid-layout-item-actions", children: t.map((a) => d("span", { className: "data-list-grid-layout-item-action", children: d(P.Link, { uuid: a.uuid, type: a.type, name: a.name, widget: a.widget, widgetType: a.widgetType, widgetProps: a.widgetProps, widgetSetting: a.widgetSetting, widgetContainerProps: a.widgetContainerSetting, data: n, confirm: a.confirm, onAfterClick: (s) => s !== !1 && (r == null ? void 0 : r(a.isRefresh, n)) }, a.uuid || Le()) }, (a == null ? void 0 : a.uuid) || Le())) })] }), tn = ({ listCode: e, className: t, layouts: i, dataSource: n, columns: r, isItemOperations: a, isBatchOperations: s, batchOperations: o, itemOperations: l, itemOperationsAccess: u, resource: p, primaryKey: g, title: h, tabs: m, isPaginate: f, isTreeSider: C, treeSiderConfig: w, isConditionFormLayout: v, ...$ }) => {
|
||||
const { classNames: T, onClickCallback: z } = oe(ee), M = ni(l, u, g, p), B = ht(n, l, u, g, p);
|
||||
return O("div", { className: I("ff-data-table-framework", t), children: [d(i.sider, { isTreeSider: C, ...w }), O("div", { className: I("ff-data-table-container", T == null ? void 0 : T.container), children: [d(i.filter, { isConditionFormLayout: v }), d(i.toolbar, { title: h, tabs: m }), d(ln, { ...$, primaryKey: g, className: "ff-data-table-content", columns: r, dataSource: n, operationRender: B ? (A) => {
|
||||
var j;
|
||||
return d("div", { className: "ff-data-table-actions", children: (j = M(A)) == null ? void 0 : j.map((x, E) => d(P.Link, { size: "small", uuid: x.uuid, type: x.type, name: x.name, widget: x.widget, widgetType: x.widgetType, widgetProps: x.widgetProps, widgetData: x.widgetData, widgetSetting: x.widgetSetting, widgetContainerProps: x.widgetContainerSetting, data: A, confirm: x.confirm, onAfterClick: (V) => V !== !1 && (z == null ? void 0 : z(x.isRefresh, A)) }, x.uuid || E)) });
|
||||
return O("div", { className: I("ff-data-table-framework", t), children: [d(i.sider, { isTreeSider: C, ...w }), O("div", { className: I("ff-data-table-container", T == null ? void 0 : T.container), children: [d(i.filter, { isConditionFormLayout: v }), d(i.toolbar, { title: h, tabs: m }), d(ln, { ...$, primaryKey: g, className: "ff-data-table-content", columns: r, dataSource: n, operationRender: B ? (j) => {
|
||||
var A;
|
||||
return d("div", { className: "ff-data-table-actions", children: (A = M(j)) == null ? void 0 : A.map((x, E) => d(P.Link, { size: "small", uuid: x.uuid, type: x.type, name: x.name, widget: x.widget, widgetType: x.widgetType, widgetProps: x.widgetProps, widgetData: x.widgetData, widgetSetting: x.widgetSetting, widgetContainerProps: x.widgetContainerSetting, data: j, confirm: x.confirm, onAfterClick: (V) => V !== !1 && (z == null ? void 0 : z(x.isRefresh, j)) }, x.uuid || E)) });
|
||||
} : null }), d(i.footer, { isPaginate: f, isOperations: s, operations: o })] })] });
|
||||
}, ee = k.createContext({ listCode: "", classNames: {}, getBase62params: (e, t) => {
|
||||
}, onReload: () => {
|
||||
@ -326,7 +326,7 @@ const rn = ({ className: e, operations: t, isOperations: i, isPaginate: n }) =>
|
||||
const { getBase62params: n, onTabChange: r, onReload: a, classNames: s } = oe(ee), { tab: o } = (n == null ? void 0 : n()) || {}, [l, u] = Ii((i == null ? void 0 : i[0].value) ?? (i == null ? void 0 : i[0].code), { value: o, onChange: r });
|
||||
return O("div", { className: I("ff-data-list-toolbar", s.toolbar, e), children: [d("div", { className: "ff-data-list-title", children: t }), d(Fi, { className: "ff-data-list-tabs", itemRender: ({ label: p, code: g, value: h }) => d("span", { onClick: () => u(h ?? g), className: I("ff-data-list-tab", { active: (h ?? g) == l }), children: p }), items: i }), O("div", { className: "ff-data-list-actions", children: [d(P.Link, { icon: "icon-reload", widget: () => a() }), d(P.Link, { icon: "icon-setting" })] })] });
|
||||
}, si = ({ isItemGridLayout: e, theme: t, themeProps: i, onClickCallback: n, onReload: r, listCode: a, total: s = 0, page: o = 0, onPageChange: l, pageSize: u = 30, onPageSizeChange: p, tab: g, onTabChange: h, keyword: m, onKeywordChange: f, condition: C, onConditionChange: w, sider: v, onSiderChange: $, layouts: T, classNames: z = {}, ...M }) => {
|
||||
const [B, A] = N(), j = H(() => {
|
||||
const [B, j] = N(), A = H(() => {
|
||||
let x = { sider: sn, filter: ai, footer: rn, toolbar: on };
|
||||
T === !1 ? x = { sider: null, filter: null, footer: null, toolbar: null } : c.isPlainObject(T) && (x = Object.assign({}, x, T));
|
||||
for (const E in x) if (x[E]) {
|
||||
@ -341,7 +341,7 @@ const rn = ({ className: e, operations: t, isOperations: i, isPaginate: n }) =>
|
||||
t ? se.getWidgetComponent(t).then((x) => {
|
||||
if (!x) throw `${t} not found`;
|
||||
return x;
|
||||
}).catch((x) => ({ default: () => `${x}` })).then((x) => A(k.createElement(x.default, { ...M, layouts: j, $setting: i }))) : A(d(e ? Zi : tn, { ...M, layouts: j, $setting: i }));
|
||||
}).catch((x) => ({ default: () => `${x}` })).then((x) => j(k.createElement(x.default, { ...M, layouts: A, $setting: i }))) : j(d(e ? Zi : tn, { ...M, layouts: A, $setting: i }));
|
||||
}, [t, i]), d(ee.Provider, { value: { classNames: z, listCode: a, onClickCallback: n, onReload: r, getBase62params: (x, E) => {
|
||||
const V = { tab: g, page: o, pageSize: u, keyword: m, sider: v, condition: C, total: s };
|
||||
return x && x != "init" ? V[x] ?? E : V;
|
||||
@ -373,12 +373,12 @@ const ne = class ne {
|
||||
me = new WeakMap(), de = new WeakMap(), ve = new WeakMap(), it = new WeakMap(), R(ne, me, null), S(ne, "getInstance", () => (y(ne, me) || q(ne, me, new ne()), y(ne, me)));
|
||||
let ft = ne;
|
||||
const oi = ft.getInstance(), St = k.forwardRef(({ listCode: e, base62params: t, className: i, theme: n, themeProps: r, layouts: a, classNames: s }, o) => {
|
||||
const [{ resource: l, primaryKey: u, batchOperations: p = [], itemOperations: g = [], columns: h = [], themeConfig: m, theme: f, isConditionFormLayout: C = !1, isTreeSider: w, treeSiderConfig: v, isItemGridLayout: $, itemGridLayout: T, title: z, isPaginate: M, tabs: B }, A] = N({ isItemGridLayout: !1, itemGridLayout: {} }), j = Qi(e, t), [{ dataSource: x, itemOperationsAccess: E, condition: V, tab: W, keyword: le, page: Se, total: K, pageSize: st, sider: He, onConditionChange: ot, onTabChange: Rt, onKeywordChange: yi, onPageChange: wi, onPageSizeChange: bi, onSiderChange: Ci, onReload: lt }, Et] = Xi(j, e, u, l), ki = ht(g, x, E, u), xi = ht(p);
|
||||
const [{ resource: l, primaryKey: u, batchOperations: p = [], itemOperations: g = [], columns: h = [], themeConfig: m, theme: f, isConditionFormLayout: C = !1, isTreeSider: w, treeSiderConfig: v, isItemGridLayout: $, itemGridLayout: T, title: z, isPaginate: M, tabs: B }, j] = N({ isItemGridLayout: !1, itemGridLayout: {} }), A = Qi(e, t), [{ dataSource: x, itemOperationsAccess: E, condition: V, tab: W, keyword: le, page: Se, total: K, pageSize: st, sider: He, onConditionChange: ot, onTabChange: Rt, onKeywordChange: yi, onPageChange: wi, onPageSizeChange: bi, onSiderChange: Ci, onReload: lt }, Et] = Xi(A, e, u, l), ki = ht(g, x, E, u), xi = ht(p);
|
||||
return L(() => {
|
||||
let Ke = null;
|
||||
return e && F.get(`/api/_/${e}`).resp(({ data: Je, res: vi }) => {
|
||||
Je != null && Je.isDynamicRefresh && (Ke = oi.subscribe(() => lt(), vi)), A(Je);
|
||||
}).catch(() => A({})), () => Ke == null ? void 0 : Ke();
|
||||
Je != null && Je.isDynamicRefresh && (Ke = oi.subscribe(() => lt(), vi)), j(Je);
|
||||
}).catch(() => j({})), () => Ke == null ? void 0 : Ke();
|
||||
}, [e]), k.useImperativeHandle(o, () => ({ onReload: lt, onClickCallback: Et })), d(si, { listCode: e, title: z, classNames: s, layouts: a, resource: l, primaryKey: u, theme: n || f, themeProps: r || m, isTreeSider: w, treeSiderConfig: v, isPaginate: M, tabs: B, isItemOperations: ki, isBatchOperations: xi, batchOperations: p, itemOperations: g, isItemGridLayout: $, columns: h, itemGridLayout: T, isConditionFormLayout: C, itemOperationsAccess: E, dataSource: x, onConditionChange: ot, onTabChange: Rt, onKeywordChange: yi, onPageChange: wi, onPageSizeChange: bi, onSiderChange: Ci, condition: V, tab: W, keyword: le, page: Se, total: K, pageSize: st, sider: He, className: I("ff-data-list-helper", i), onReload: lt, onClickCallback: Et });
|
||||
}), li = (e, t, i = !0) => i !== !0 && i-- <= 0 ? [] : c.isArray(e) && !c.isEmpty(e) ? e.reduce((n, r) => (Reflect.has(r, t) && Reflect.has(r, "children") && n.push(r[t]), Reflect.has(r, "children") && !c.isEmpty(r.children) ? n.concat(li(r.children, t, i)) : n), []) : [], ln = ({ className: e, primaryKey: t, columns: i = [], dataSource: n = [], operationRender: r, operationWidth: a = 180, ...s }) => {
|
||||
const { classNames: o } = oe(ee);
|
||||
@ -515,7 +515,7 @@ const re = class re {
|
||||
});
|
||||
S(this, "createBrowserRouter", (t = {}) => {
|
||||
if (y(this, X).size == 0) return null;
|
||||
const i = Ae.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/ff/frameworks/DefaultTheme"), n = Ae.get(se.checkUserToken() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"), r = { [i]: 0 }, a = (o, l) => () => se.getWidgetComponent(o).then((u) => u.default || function() {
|
||||
const i = je.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/ff/frameworks/DefaultTheme"), n = je.get(se.checkUserToken() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"), r = { [i]: 0 }, a = (o, l) => () => se.getWidgetComponent(o).then((u) => u.default || function() {
|
||||
return `${o}`;
|
||||
}).then((u) => ({ Component: () => k.createElement(Yt, {}, k.createElement(u, l)) })), s = Array.from(y(this, X).values()).reduce((o, { uuid: l, uri: u, name: p, type: g, component: h, widgetSetting: m, isLogin: f, isLayout: C, extra: w }) => {
|
||||
let v = {}, $ = 0;
|
||||
@ -539,7 +539,7 @@ const re = class re {
|
||||
};
|
||||
he = new WeakMap(), X = new WeakMap(), fe = new WeakMap(), ye = new WeakMap(), De = new WeakMap(), Be = new WeakMap(), R(re, he, null), S(re, "getInstance", () => (y(re, he) || q(re, he, new re()), y(re, he)));
|
||||
let yt = re;
|
||||
const yn = ({ to: e, replace: t }) => Bi() ? k.createElement(qi, { 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 yn = ({ to: e, replace: t }) => Bi() ? k.createElement(qi, { 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) => je.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, Re, we;
|
||||
const D = class D {
|
||||
constructor() {
|
||||
@ -696,12 +696,12 @@ const Ce = wt.getInstance(), rt = () => {
|
||||
}, [o]), u && k.cloneElement(u, { ...a, ...l });
|
||||
}, vn = (e, t = {}, i = null) => (n) => {
|
||||
const { type: r, code: a, label: s, noStyle: o, placeholder: l, required: u = !1, extras: p, validators: g, help: h, isVirtual: m, $isReserved: f, initialValue: C, initialValueLanguage: w, ...v } = c.omit(c.merge({}, t, n), ["convertJs", "convertJsSetting", "widget", "widgetPerfix", "widgetDecorator", "subWidgets", "boxStyle"]), $ = bn(Object.assign({}, g, u ? { required: !0 } : {}), a, r), T = H(() => {
|
||||
const j = Object.keys((t == null ? void 0 : t.extras) || {});
|
||||
return c.over([c.partialRight(c.pick, j), c.partialRight(c.omit, j)]);
|
||||
}, [t == null ? void 0 : t.extras]), [z, M] = T(v), B = { label: s, noStyle: o, colon: !1, layout: "vertical" }, A = Y((j) => j == null ? void 0 : Q(j, r), [r]);
|
||||
return d(_t, { name: a, rules: $, initialValue: A(C), normalize: A, children: (j, x, E) => {
|
||||
const A = Object.keys((t == null ? void 0 : t.extras) || {});
|
||||
return c.over([c.partialRight(c.pick, A), c.partialRight(c.omit, A)]);
|
||||
}, [t == null ? void 0 : t.extras]), [z, M] = T(v), B = { label: s, noStyle: o, colon: !1, layout: "vertical" }, j = Y((A) => A == null ? void 0 : Q(A, r), [r]);
|
||||
return d(_t, { name: a, rules: $, initialValue: j(C), normalize: j, children: (A, x, E) => {
|
||||
var V;
|
||||
return d(e, { type: r, rcform: E, basicForm: i, itemProps: { validateStatus: x.errors.length > 0 ? "error" : "success", tooltip: h, help: x.errors.length > 0 ? x.errors.join("、") : null, required: ((V = $ == null ? void 0 : $[0]) == null ? void 0 : V.required) || !1, ...B }, fieldProps: { placeholder: l, ...M, ...j }, $setting: Object.assign({}, p, z) });
|
||||
return d(e, { type: r, rcform: E, basicForm: i, itemProps: { validateStatus: x.errors.length > 0 ? "error" : "success", tooltip: h, help: x.errors.length > 0 ? x.errors.join("、") : null, required: ((V = $ == null ? void 0 : $[0]) == null ? void 0 : V.required) || !1, ...B }, fieldProps: { placeholder: l, ...M, ...A }, $setting: Object.assign({}, p, z) });
|
||||
} });
|
||||
}, Pt = ({ cols: e = 24, rowHeight: t = 16, itemMargin: i = [8, 16], containerPadding: n = [0, 0], fields: r = [], children: a, basicForm: s = null }) => {
|
||||
const o = ci(r, pi, s);
|
||||
@ -710,10 +710,10 @@ const Ce = wt.getInstance(), rt = () => {
|
||||
Pt.propTypes = { fields: b.array };
|
||||
const Sn = (Dt = Pt, ({ code: e, layout: t, name: i, primaryKey: n = 0, style: r = {}, formProps: a = {}, form: s, basicForm: o, isPreview: l = !1, className: u, onFinish: p, onValuesChange: g = () => {
|
||||
}, ...h }) => {
|
||||
const { align: m, autoComplete: f, resource: C, items: w, hides: v, rowHeight: $, marginX: T, marginY: z, cols: M, listenChangeFields: B, listenChangeFieldsFunc: A, pk: j, uuid: x } = wn(e), [E] = Z.useForm(s), V = H(() => [{ name: "__PK__", value: j }, { name: "__PROPS__", value: a }, { name: "__RESOURCE__", value: C }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: x }, { name: "__PRIMARY_KEY__", value: n }], [j, e, x, C, n, a]);
|
||||
const { align: m, autoComplete: f, resource: C, items: w, hides: v, rowHeight: $, marginX: T, marginY: z, cols: M, listenChangeFields: B, listenChangeFieldsFunc: j, pk: A, uuid: x } = wn(e), [E] = Z.useForm(s), V = H(() => [{ name: "__PK__", value: A }, { name: "__PROPS__", value: a }, { name: "__RESOURCE__", value: C }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: x }, { name: "__PRIMARY_KEY__", value: n }], [A, e, x, C, n, a]);
|
||||
return O(Z, { className: u, name: i || e, layout: t || m, fields: V, form: E, autoComplete: f, style: { ...r, position: "relative" }, onFinish: p, onValuesChange: (W, le) => (({ changedValues: Se, allValues: K, listenChangeFields: st, listenChangeFieldsFunc: He, onValuesChange: ot, code: Rt }) => {
|
||||
ot(Se, K), He && Array.isArray(st) && Ce.exec(He, { changedValues: Se, allValues: K }, { getFieldValue: E.getFieldValue, setFieldValue: E.setFieldValue, setFieldsValue: E.setFieldsValue, isFieldTouched: E.isFieldTouched, isFieldsTouched: E.isFieldsTouched });
|
||||
})({ changedValues: W, allValues: le, listenChangeFields: B, listenChangeFieldsFunc: A, onValuesChange: g, code: e }), children: [d(Dt, { ...h, form: E, basicForm: o, code: e, fields: w, cols: M, rowHeight: $, itemMargin: [T, z] }), v == null ? void 0 : v.map((W) => {
|
||||
})({ changedValues: W, allValues: le, listenChangeFields: B, listenChangeFieldsFunc: j, onValuesChange: g, code: e }), children: [d(Dt, { ...h, form: E, basicForm: o, code: e, fields: w, cols: M, rowHeight: $, itemMargin: [T, z] }), v == null ? void 0 : v.map((W) => {
|
||||
var le;
|
||||
return d(_t, { name: W.code, children: d(xn, { form: E, basicForm: o, name: W.code, type: W.type, initialValue: W.initialValue, initialValueLanguage: (le = W.extras) == null ? void 0 : le.initialValueLanguage }) }, JSON.stringify(W.code));
|
||||
})] }, e);
|
||||
@ -779,19 +779,19 @@ const Pn = (e, t, i, { isReplaceRouteHistory: n = !1 } = {}) => ue.redirect(i, t
|
||||
return e === "danger" ? o.danger = !0 : e === "default" && (o.type = e), s === "link" || s === "dashed" ? (o.type = s, e === "default" && (o.className = I(o.className, "ff-default"))) : s !== "circle" && s !== "round" || (o.shape = s), n && (o.icon = d(Ct, { type: n })), t && (o.children = t), o;
|
||||
}, [s, e, i, n, r]), We = (e) => function({ className: t, variant: i, children: n, name: r, icon: a, type: s = "default", iconPosition: o = "start", noAuthType: l, onAfterClick: u, onBeforeClick: p, data: g, loading: h, disabled: m, tooltip: f, confirm: C, widget: w = () => {
|
||||
}, widgetType: v, widgetData: $, widgetProps: T, widgetSetting: z, widgetContainerProps: M, ...B }) {
|
||||
const A = c.isEmpty(f) || !f.enabled ? {} : f, j = c.isEmpty(C) ? { enabled: !1 } : Object.assign({ enabled: !0 }, C), x = hi({ className: t, name: r, type: s, icon: a, iconPosition: o }, i ?? e), [E, V] = N(!1), [W, { disabled: le, loading: Se }] = Rn({ widget: w, widgetType: v, widgetData: $, widgetProps: T, widgetSetting: z, widgetContainerProps: M }, { onAfterClick: u, onBeforeClick: p });
|
||||
return d(Ai, { okText: "确定", cancelText: "取消", getPopupContainer: (K) => K, ...j, disabled: le || m, open: E, onOpenChange: (K) => {
|
||||
const j = c.isEmpty(f) || !f.enabled ? {} : f, A = c.isEmpty(C) ? { enabled: !1 } : Object.assign({ enabled: !0 }, C), x = hi({ className: t, name: r, type: s, icon: a, iconPosition: o }, i ?? e), [E, V] = N(!1), [W, { disabled: le, loading: Se }] = Rn({ widget: w, widgetType: v, widgetData: $, widgetProps: T, widgetSetting: z, widgetContainerProps: M }, { onAfterClick: u, onBeforeClick: p });
|
||||
return d(ji, { okText: "确定", cancelText: "取消", getPopupContainer: (K) => K, ...A, disabled: le || m, open: E, onOpenChange: (K) => {
|
||||
if (!K) return V(K);
|
||||
j.enabled ? V(K) : W(g);
|
||||
A.enabled ? V(K) : W(g);
|
||||
}, onConfirm: () => {
|
||||
W(g);
|
||||
}, onClick: (K) => {
|
||||
K.stopPropagation();
|
||||
}, children: d(ji, { getPopupContainer: (K) => K, ...A, title: E ? null : A == null ? void 0 : A.title, trigger: ["hover", "click"], children: d(Xe, { loading: Se || h, disabled: le || m, ...x, ...B, children: n || r }) }) });
|
||||
}, children: d(Ai, { getPopupContainer: (K) => K, ...j, title: E ? null : j == null ? void 0 : j.title, trigger: ["hover", "click"], children: d(Xe, { loading: Se || h, disabled: le || m, ...x, ...B, children: n || r }) }) });
|
||||
}, P = We("default");
|
||||
P.propTypes = { type: b.oneOf(["primary", "default", "danger", ""]), size: b.oneOf(["large", "middle", "small"]), name: b.string, icon: b.string, iconPosition: b.oneOf(["start", "end"]), data: b.any, widget: b.any, widgetType: b.oneOf(["destroy", "redirect", "func", "fsdpf-component", "grid-layout-form", "grid-layout", "data-list"]), widgetData: b.object, widgetProps: b.object, widgetSetting: b.object, widgetContainerProps: b.object, tooltip: b.exact({ title: b.string.isRequired, placement: b.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: b.oneOfType([b.bool, b.number]), getPopupContainer: b.func }), confirm: b.exact({ title: b.string.isRequired, cancelText: b.string, okText: b.string, okType: b.oneOf(["primary", "default", "danger", ""]), placement: b.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: b.oneOfType([b.bool, b.number]), getPopupContainer: b.func, arrow: b.oneOfType([b.bool, b.exact({ pointAtCenter: b.bool })]) }) };
|
||||
const En = We("link"), Fn = We("circle"), On = We("round"), Ln = We("dashed"), Tt = ({ data: e, widget: t, widgetType: i = "fsdpf-component", widgetData: n, widgetProps: r, widgetSetting: a, widgetContainerProps: s, onAfterClick: o, onBeforeClick: l, children: u, extras: p }) => {
|
||||
const g = oe(ee), [h, m] = N(!1), [f, C] = N("hover"), [w, v] = N({}), [$, T] = N(), { placement: z, align: M, arrow: B = { pointAtCenter: !0 }, getPopupContainer: A, ...j } = s || {};
|
||||
const g = oe(ee), [h, m] = N(!1), [f, C] = N("hover"), [w, v] = N({}), [$, T] = N(), { placement: z, align: M, arrow: B = { pointAtCenter: !0 }, getPopupContainer: j, ...A } = s || {};
|
||||
L(() => {
|
||||
i == "grid-layout-form" ? T(k.createElement(mi, { ...n, $setting: a, code: t })) : i == "data-list" ? T(k.createElement(St, { base62params: e, $setting: a, listCode: t })) : c.isString(t) ? se.getWidgetComponent(t).then(({ default: V }) => {
|
||||
T(k.createElement(V, { ...n, $setting: a }));
|
||||
@ -802,8 +802,8 @@ const En = We("link"), Fn = We("circle"), On = We("round"), Ln = We("dashed"), T
|
||||
const x = (V, W = !1) => (m(V), !V && C("hover"), V ? l == null ? void 0 : l(w) : o == null ? void 0 : o(W)), E = (V) => {
|
||||
m(!0), C("click");
|
||||
};
|
||||
return d(Vi, { zIndex: 1080, placement: z, onPopupClick: E, onClick: E, open: h, align: M, arrow: B, trigger: f, getPopupContainer: A, content: d(An, { ...j, extras: p, children: $ && k.cloneElement($, { ...w, $close: (V) => x(!1, V) }) }), children: u, onOpenChange: x });
|
||||
}, An = ({ title: e, className: t, children: i, extras: n, width: r, height: a, ...s }) => {
|
||||
return d(Vi, { zIndex: 1080, placement: z, onPopupClick: E, onClick: E, open: h, align: M, arrow: B, trigger: f, getPopupContainer: j, content: d(jn, { ...A, extras: p, children: $ && k.cloneElement($, { ...w, $close: (V) => x(!1, V) }) }), children: u, onOpenChange: x });
|
||||
}, jn = ({ title: e, className: t, children: i, extras: n, width: r, height: a, ...s }) => {
|
||||
const [o, l] = N({}), u = Y((m, f) => l((C) => ({ ...C, [m]: f })), []), p = Y((m) => l((f) => ({ ...f, [m]: void 0 })), []), g = e ? k.createElement("div", { className: "ff-popup-title" }, e) : o == null ? void 0 : o.title, h = n ?? k.createElement("div", { className: "ff-popup-reserved-extras" }, n);
|
||||
return d(qe.Provider, { value: { ele: o, mount: u, unmount: p }, children: O("div", { className: I("ff-popup ff-popover", t), style: { width: r, height: a }, ...s, children: [O("div", { className: "ff-popup-header", children: [g, o == null ? void 0 : o["sub-title"]] }), i, O("div", { className: "ff-popup-footer", children: [h, o == null ? void 0 : o.extras, o == null ? void 0 : o.actions] })] }) });
|
||||
};
|
||||
@ -816,12 +816,12 @@ const Wt = ({ options: e = [], triggerWeights: t = ["grid-layout-form", "grid-la
|
||||
const $ = t.indexOf(v.widgetType);
|
||||
return $ === -1 ? w[1].push(v) : w[0] ? $ < t.indexOf(w[0].widgetType) ? (w[1].push(w[0]), w[0] = v) : w[1].push(v) : w[0] = v, w;
|
||||
}, [null, []]), [e, t]);
|
||||
s ? g = s(m, h) || g : g || (g = d(Xe, { ...hi({ ...m, size: a }, r) }));
|
||||
s ? g = s(m, h) || g : g || (g = d(Xe, { ...hi(Object.assign(m != null && m.name || m != null && m.icon ? {} : { icon: "icon-location" }, m, { size: a }), r) }));
|
||||
const C = f.map((w) => u(Object.assign({ uuid: w.uuid, type: w.type, name: w.name, widget: w.widget, widgetType: w.widgetType, widgetProps: w.widgetProps, widgetData: w.widgetData, widgetSetting: w.widgetSetting, widgetContainerProps: w.widgetContainerSetting, confirm: w.confirm, onAfterClick: c.partialRight(i, w, h), onBeforeClick: c.partialRight(n, w, h) }, { size: l, variant: o }), h));
|
||||
return d(Tt, { widget: m == null ? void 0 : m.widget, widgetType: m == null ? void 0 : m.widgetType, widgetProps: m == null ? void 0 : m.widgetProps, widgetSetting: m == null ? void 0 : m.widgetSetting, widgetContainerProps: Object.assign({}, p, m == null ? void 0 : m.widgetContainerProps), data: h, widgetData: m == null ? void 0 : m.widgetData, extras: C, onAfterClick: c.partialRight(i, m, h), onBeforeClick: c.partialRight(n, m, h), children: g });
|
||||
};
|
||||
Wt.propTypes = { triggerWeights: b.array, options: b.arrayOf(b.shape({ ...P.propTypes, widgetType: P.propTypes.widgetType.isRequired })), btnSize: P.propTypes.size, btnRender: b.func, btnVariant: b.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelVariant: b.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelRender: b.func, labelSize: P.propTypes.size, onAfterClick: b.func, onBeforeClick: b.func, widgetContainerProps: P.propTypes.widgetContainerProps, data: P.propTypes.data }, P.Link = En, P.Link.defaultProps = P.defaultProps, P.Link.propTypes = P.propTypes, P.Circle = Fn, P.Circle.defaultProps = P.defaultProps, P.Circle.propTypes = P.propTypes, P.Round = On, P.Round.defaultProps = P.defaultProps, P.Round.propTypes = P.propTypes, P.Dashed = Ln, P.Dashed.defaultProps = P.defaultProps, P.Dashed.propTypes = P.propTypes, P.Popover = Tt, P.GroupPopover = Wt;
|
||||
const jn = ({ fields: e, formProps: t, $close: i }) => {
|
||||
const An = ({ fields: e, formProps: t, $close: i }) => {
|
||||
const [n] = Z.useForm(), r = H(() => [{ name: "__PROPS__", value: t }], [t]);
|
||||
return d(G, { actions: O(k.Fragment, { children: [d(P, { name: "取消", widget: () => i(!1) }), d(P, { name: "确定", type: "primary", widget: () => n.validateFields(!0).then(i) })] }), children: d(Z, { fields: r, form: n, className: "ff-modal-form", children: e == null ? void 0 : e.map(({ code: a, ...s }) => d(pi, { code: a, ...s }, a)) }) });
|
||||
}, Vn = ({ className: e, $close: t, children: i, title: n, subTitle: r, actions: a, extras: s, zIndex: o, ...l }) => O(Hi, { ...l, prefixCls: "ff-drawer", className: I("ff-popup", e), maskMotion: { motionAppear: !0, motionName: "mask-motion" }, motion: (u) => ({ motionAppear: !0, motionName: `panel-motion-${u}` }), children: [O("div", { className: "ff-popup-header", children: [d("button", { "aria-label": "Close", className: "ff-popup-close", onClick: l.onClose, children: d(vt, { type: "close" }) }), n, r] }), d("div", { className: "ff-popup-body", children: i }), O("div", { className: "ff-popup-footer", children: [s, a] })] }), In = ({ className: e, $close: t, $event: i, children: n, title: r, subTitle: a, actions: s, extras: o, zIndex: l, placement: u, ...p }) => {
|
||||
@ -849,14 +849,14 @@ const J = () => {
|
||||
const n = (a, s = {}, o = {}) => new Promise((l, u) => r([l, u], a, s, o)), r = ([a, s], o, l = {}, u = {}) => {
|
||||
const p = J.$index++, g = (h) => ((m, f) => (J.$popups.delete(m), i(), f == null ? void 0 : f()))(p, () => a(h));
|
||||
if (o === Xt) return e.open({ ...u, key: p, content: k.createElement(o, { ...l, $close: () => e.close(p) }) });
|
||||
J.$popups.set(p, k.createElement(fi, { zIndex: p, maskClosable: !1, $event: l == null ? void 0 : l.$event, ...u, key: p, $close: g }, k.isValidElement(o) ? k.cloneElement(o, { ...l, $close: g }) : o != null && o.name || At.isForwardRef(o) || (o == null ? void 0 : o.$$typeof) === At.ForwardRef ? k.createElement(o, { ...l, $close: g }) : o)), i();
|
||||
J.$popups.set(p, k.createElement(fi, { zIndex: p, maskClosable: !1, $event: l == null ? void 0 : l.$event, ...u, key: p, $close: g }, k.isValidElement(o) ? k.cloneElement(o, { ...l, $close: g }) : o != null && o.name || jt.isForwardRef(o) || (o == null ? void 0 : o.$$typeof) === jt.ForwardRef ? k.createElement(o, { ...l, $close: g }) : o)), i();
|
||||
};
|
||||
return O(k.Fragment, { children: [Array.from(J.$popups).map(([a, s]) => s), t] });
|
||||
};
|
||||
J.$popups = /* @__PURE__ */ new Map(), J.$index = 0, J.$queue = [], J.$onClick = (...e) => new Promise((t, i) => {
|
||||
J.$queue.push([e, t, i]);
|
||||
});
|
||||
const Ht = (e, t, i = {}) => J.$onClick(e, t, i), dt = (e, { showProgress: t, duration: i, ...n } = { duration: 1.5 }) => J.$onClick(Xt, { content: e, ...n }, { showProgress: t, duration: i }), _ = { modal: Ht, confirm: (e, t = {}) => J.$onClick(Ji, { content: e, ...t }, { placement: "center" }), form: (e, t = {}, i = {}) => Ht(jn, { formProps: i, fields: e }, { placement: "center", ...t }).then((n) => {
|
||||
const Ht = (e, t, i = {}) => J.$onClick(e, t, i), dt = (e, { showProgress: t, duration: i, ...n } = { duration: 1.5 }) => J.$onClick(Xt, { content: e, ...n }, { showProgress: t, duration: i }), _ = { modal: Ht, confirm: (e, t = {}) => J.$onClick(Ji, { content: e, ...t }, { placement: "center" }), form: (e, t = {}, i = {}) => Ht(An, { formProps: i, fields: e }, { placement: "center", ...t }).then((n) => {
|
||||
if (n === !1) throw !1;
|
||||
return n;
|
||||
}), notification: dt, success: (e, t = { duration: 1.5 }) => dt(e, { ...t, className: "ff-notification-success", icon: "check" }), error: (e, t = { duration: 1.5 }) => dt(e, { ...t, className: "ff-notification-error", icon: "close" }) };
|
||||
@ -866,18 +866,18 @@ Fe.configure({ showSpinner: !1 }), Oe.interceptors.request.use((e) => {
|
||||
return e.headers.Authorization = t ? `Bearer ${t} ` : void 0, Fe.inc(), e;
|
||||
}, (e) => (Fe.done(), Promise.reject({ code: -1, msg: e }))), Oe.interceptors.response.use(({ data: e, headers: t }) => (Fe.done(), { ...e, res: t == null ? void 0 : t.res }), function(e) {
|
||||
return Fe.done(), Promise.reject(e.message);
|
||||
}), window.addEventListener("unhandledrejection", gt.onUnhandledRejection), gt.onMsg = (e, t) => _[[0, 1].includes(e) ? "success" : "error"](t).then(() => e === 20300 && ue.redirect(Ae.get("Common.WEBSITE_LOGIN_PAGE")));
|
||||
}), window.addEventListener("unhandledrejection", gt.onUnhandledRejection), gt.onMsg = (e, t) => _[[0, 1].includes(e) ? "success" : "error"](t).then(() => e === 20300 && ue.redirect(je.get("Common.WEBSITE_LOGIN_PAGE")));
|
||||
const kt = { appUrl: "", init: (e, t, i) => {
|
||||
kt.appUrl = i, Oe.defaults.baseURL = i, Oe.defaults.timeout = 15e3, Object.assign(kt, new gt(e, t, Oe));
|
||||
} }, F = kt;
|
||||
class $t extends Error {
|
||||
constructor(t, i) {
|
||||
super(i), Error.captureStackTrace && Error.captureStackTrace(this, $t), !i instanceof je && (this.name = `${t} Error Runtime`);
|
||||
super(i), Error.captureStackTrace && Error.captureStackTrace(this, $t), !i instanceof Ae && (this.name = `${t} Error Runtime`);
|
||||
}
|
||||
}
|
||||
class je extends Error {
|
||||
class Ae extends Error {
|
||||
constructor(t, ...i) {
|
||||
super(...i), Error.captureStackTrace && Error.captureStackTrace(this, je), this.name = `${t} Not Found`;
|
||||
super(...i), Error.captureStackTrace && Error.captureStackTrace(this, Ae), this.name = `${t} Not Found`;
|
||||
}
|
||||
}
|
||||
const ut = "mine", Ye = "token";
|
||||
@ -894,13 +894,13 @@ const ae = class ae {
|
||||
case typeof (a = (o = n.default) == null ? void 0 : o[`./${r}/index.js`]):
|
||||
return a();
|
||||
}
|
||||
throw new je(r);
|
||||
throw new Ae(r);
|
||||
})));
|
||||
S(this, "getWidgetComponent", async (t) => {
|
||||
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);
|
||||
const [, i] = t == null ? void 0 : t.split("@pkg/");
|
||||
if (!i) throw new je(t);
|
||||
if (!i) throw new Ae(t);
|
||||
try {
|
||||
return y(this, Ee).has("pkg") ? await y(this, Ee).get("pkg").get(i) : await import(`${F.appUrl}/api/pkg-import/web?name=${t}`);
|
||||
} catch (n) {
|
||||
@ -956,7 +956,7 @@ const se = xt.getInstance(), Mn = k.createContext({ user: {}, initUser: () => {
|
||||
if (!e || typeof window > "u") return;
|
||||
let i = document.querySelector(`style[ff-style-token="${t}"]`);
|
||||
return i ? (i.innerHTML = e, e) : (i = document.createElement("style"), i.setAttribute("ff-style-token", t), i.setAttribute("type", "text/css"), i.innerHTML = e, document.head.appendChild(i), e);
|
||||
}, Bn = Object.freeze(Object.defineProperty({ __proto__: null, AppContext: Mn, AppGlobalParamsContext: zn, cache: Gt, configure: Ae, default: se, func: Ce, http: F, insertStyle: Dn, isReactComponent: Nt, route: ue }, Symbol.toStringTag, { value: "Module" }));
|
||||
}, Bn = Object.freeze(Object.defineProperty({ __proto__: null, AppContext: Mn, AppGlobalParamsContext: zn, cache: Gt, configure: je, default: se, func: Ce, http: F, insertStyle: Dn, isReactComponent: Nt, route: ue }, Symbol.toStringTag, { value: "Module" }));
|
||||
export {
|
||||
gi as $,
|
||||
Zi as A,
|
||||
@ -1006,7 +1006,7 @@ export {
|
||||
Dn as ag,
|
||||
F as ah,
|
||||
Gt as ai,
|
||||
Ae as aj,
|
||||
je as aj,
|
||||
Ce as ak,
|
||||
ue as al,
|
||||
Mn as am,
|
2
dist/components.js
vendored
2
dist/components.js
vendored
@ -1,4 +1,4 @@
|
||||
import { ab as s, a2 as p, ac as d, ad as n, aa as t } from "./common/main-CvDVi9au.js";
|
||||
import { ab as s, a2 as p, ac as d, ad as n, aa as t } from "./common/main-DHR-49jb.js";
|
||||
export {
|
||||
s as Empty,
|
||||
p as Icon,
|
||||
|
2
dist/container.js
vendored
2
dist/container.js
vendored
@ -1,4 +1,4 @@
|
||||
import { a7 as o, ab as s, ac as d, ad as p, a8 as t, aa as n, a9 as r, a6 as u } from "./common/main-CvDVi9au.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-DHR-49jb.js";
|
||||
export {
|
||||
o as Context,
|
||||
s as Empty,
|
||||
|
2
dist/data-converter.js
vendored
2
dist/data-converter.js
vendored
@ -1,6 +1,6 @@
|
||||
import "lodash";
|
||||
import "react";
|
||||
import { D as p } from "./common/main-CvDVi9au.js";
|
||||
import { D as p } from "./common/main-DHR-49jb.js";
|
||||
export {
|
||||
p as default
|
||||
};
|
||||
|
2
dist/data-list.js
vendored
2
dist/data-list.js
vendored
@ -1,4 +1,4 @@
|
||||
import { z as t, x as e, p as r, v as o, A as i, w as u, s as D, y as l, q as L, B as n, o as p, C as m, L as C, F as c, J as F, I as b, K as d, E as k } from "./common/main-CvDVi9au.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-DHR-49jb.js";
|
||||
export {
|
||||
t as DataListContent,
|
||||
e as DataListContext,
|
||||
|
2
dist/data-list/utils.js
vendored
2
dist/data-list/utils.js
vendored
@ -1,5 +1,5 @@
|
||||
import "lodash";
|
||||
import { j as a } from "../common/main-CvDVi9au.js";
|
||||
import { j as a } from "../common/main-DHR-49jb.js";
|
||||
export {
|
||||
a as getDefaultExpandRowKeys
|
||||
};
|
||||
|
2
dist/grid-layout-form.js
vendored
2
dist/grid-layout-form.js
vendored
@ -1,4 +1,4 @@
|
||||
import { V as s, X as r, W as u, U as o, $ as t, _ as d, a1 as m, Z as F, Y as i, a0 as g } from "./common/main-CvDVi9au.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-DHR-49jb.js";
|
||||
export {
|
||||
s as GridLayoutForm,
|
||||
r as GridLayoutFormHelper,
|
||||
|
2
dist/grid-layout-form/utils.js
vendored
2
dist/grid-layout-form/utils.js
vendored
@ -1,5 +1,5 @@
|
||||
import "lodash";
|
||||
import { g as o, a as g } from "../common/main-CvDVi9au.js";
|
||||
import { g as o, a as g } from "../common/main-DHR-49jb.js";
|
||||
export {
|
||||
o as getOptionItemByValue,
|
||||
g as getWidgetByNormalize
|
||||
|
2
dist/grid-layout.js
vendored
2
dist/grid-layout.js
vendored
@ -1,4 +1,4 @@
|
||||
import { k as d, l as e, H as i, G as t, m as u, n as o } from "./common/main-CvDVi9au.js";
|
||||
import { k as d, l as e, H as i, G as t, m as u, n as o } from "./common/main-DHR-49jb.js";
|
||||
export {
|
||||
d as GridLayout,
|
||||
e as GridLayoutWidget,
|
||||
|
2
dist/grid-layout/utils.js
vendored
2
dist/grid-layout/utils.js
vendored
@ -1,4 +1,4 @@
|
||||
import { h as o, i as a } from "../common/main-CvDVi9au.js";
|
||||
import { h as o, i as a } from "../common/main-DHR-49jb.js";
|
||||
export {
|
||||
o as getBoxStyle,
|
||||
a as getWidgetByNormalize
|
||||
|
2
dist/hooks.js
vendored
2
dist/hooks.js
vendored
@ -1,7 +1,7 @@
|
||||
import "lodash";
|
||||
import "rc-field-form";
|
||||
import "react";
|
||||
import { Q as r, P as o, S as p, N as f, O as i, T as m, M as c } from "./common/main-CvDVi9au.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-DHR-49jb.js";
|
||||
import { default as S } from "rc-util/lib/hooks/useMergedState";
|
||||
export {
|
||||
r as useDeepEffect,
|
||||
|
2
dist/iconfont.js
vendored
2
dist/iconfont.js
vendored
@ -2,7 +2,7 @@ import "react/jsx-runtime";
|
||||
import "react";
|
||||
import "prop-types";
|
||||
import "classnames";
|
||||
import { a2 as a } from "./common/main-CvDVi9au.js";
|
||||
import { a2 as a } from "./common/main-DHR-49jb.js";
|
||||
export {
|
||||
a as default
|
||||
};
|
||||
|
2
dist/index.js
vendored
2
dist/index.js
vendored
@ -1,4 +1,4 @@
|
||||
import { am as t, an as e, ai as o, aj as n, ae as p, ak as r, ah as c, ag as f, af as l, al as i } from "./common/main-CvDVi9au.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-DHR-49jb.js";
|
||||
export {
|
||||
t as AppContext,
|
||||
e as AppGlobalParamsContext,
|
||||
|
2
dist/res-ws.js
vendored
2
dist/res-ws.js
vendored
@ -1,5 +1,5 @@
|
||||
import "lodash";
|
||||
import { R as a } from "./common/main-CvDVi9au.js";
|
||||
import { R as a } from "./common/main-DHR-49jb.js";
|
||||
export {
|
||||
a as default
|
||||
};
|
||||
|
2
dist/utils.js
vendored
2
dist/utils.js
vendored
@ -1,5 +1,5 @@
|
||||
import "lodash";
|
||||
import { d as s, e as g, c as r, f as o, b as i, r as m, t as p, u as P } from "./common/main-CvDVi9au.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-DHR-49jb.js";
|
||||
export {
|
||||
s as deepSome,
|
||||
g as getPkgCategory,
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ff",
|
||||
"private": true,
|
||||
"version": "0.4.54",
|
||||
"version": "0.4.55",
|
||||
"author": "www.fsdpf.com",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
|
Loading…
Reference in New Issue
Block a user