0.4.21
This commit is contained in:
parent
c9bcea7c00
commit
a4853815af
2
dist/button.js
vendored
2
dist/button.js
vendored
@ -1,4 +1,4 @@
|
||||
import { T as s, S as u, U as e } from "./common/main-CB_qOise.js";
|
||||
import { T as s, S as u, U as e } from "./common/main-BSfbSUKo.js";
|
||||
import "prop-types";
|
||||
export {
|
||||
s as auth,
|
||||
|
@ -227,7 +227,7 @@ const Gt = mt.getInstance(), vt = C.forwardRef(({ listCode: e, base62params: t,
|
||||
const [n, r] = N(!1), s = me(() => t == null ? void 0 : t.toReversed().some((i) => i.y > 1 || i.x + i.w >= e - 5), [e, t]);
|
||||
return P(et.Item, { label: " ", style: { "--item-span": 5 }, className: R("ff-data-list-filter-actions", { expanded: n }), children: [c(ct, { onClick: a, children: "重置" }), c(ct, { type: "primary", htmlType: "submit", children: "查询" }), s && c(S.Link, { className: "ff-data-list-filter-expanded-button", widget: () => r((i) => !i), type: "primary", name: n ? "关闭" : "展开", icon: n ? "icon-up" : "icon-down", iconPosition: "end" })] });
|
||||
};
|
||||
St.reservedFields = [{ x: 0, y: 0, h: 3, w: 5, field: { isVirtual: !0, widgetPrefix: "@pkg/grid-layout-forms", widget: "Input", code: "keyword", label: "关键字", placeholder: "多关键字 | 分割", extras: { prefix: "icon-search" } } }];
|
||||
St.reservedFields = [{ x: 0, y: 0, h: 3, w: 5, field: { isVirtual: !0, widgetPrefix: "@pkg/ff/grid-layout-forms", widget: "Input", code: "keyword", label: "关键字", placeholder: "多关键字 | 分割", extras: { prefix: "icon-search" } } }];
|
||||
const Xt = ({ className: e, title: t, tabs: a, tab: n, onTabChange: r }) => {
|
||||
const [s, i] = Pa(a == null ? void 0 : a[0].value, { value: n, onChange: r });
|
||||
return P("div", { className: R("ff-data-list-toolbar", e), children: [c("div", { className: "ff-data-list-title", children: t }), c(ya, { className: "ff-data-list-tabs", itemRender: ({ label: o, code: l }) => c("span", { onClick: () => i(l), className: R("ff-data-list-tab", { active: l == s }), children: o }), items: a }), P("div", { className: "ff-data-list-actions", children: [c(S.Link, { icon: "icon-reload" }), c(S.Link, { icon: "icon-setting" })] })] });
|
||||
@ -321,7 +321,7 @@ const Xt = ({ className: e, title: t, tabs: a, tab: n, onTabChange: r }) => {
|
||||
}, [t, a]), Xe(() => {
|
||||
o.current && n && X.getWidgetComponent(n).then(({ default: y }) => y({ value: p, record: l.getFieldsValue(!0), $setting: r })).then(d).catch((y) => console.error("布局数据转换错误: ", y, n));
|
||||
}, [p, n, r]), [u || p, p];
|
||||
}, ia = (e, t, a = "@pkg/grid-layouts", n = null) => me(() => {
|
||||
}, ia = (e, t, a = "@pkg/ff/grid-layouts", n = null) => me(() => {
|
||||
var r;
|
||||
return (r = g.sortBy(e, ["y", "x"])) == null ? void 0 : r.map(({ i: s, x: i, y: o, w: l, h: u, field: { boxStyle: d, widgetPrefix: p = a, widget: h, ...f } }, y) => c("div", { className: "grid-layout-item", style: Yt(i, o, l, u, d, h === "Height" && (f == null ? void 0 : f.initialValue)), children: c(_a, { ...f, basicForm: n, itemWidget: h != null && h.startsWith("@") || h != null && h.startsWith("blob:") ? h : `${p}/${h}`, itemWidgetRender: t }) }, s || y));
|
||||
}, [e]), _a = ({ itemWidget: e, itemWidgetRender: t, basicForm: a, ...n }) => {
|
||||
@ -334,7 +334,7 @@ const Xt = ({ className: e, title: t, tabs: a, tab: n, onTabChange: r }) => {
|
||||
});
|
||||
}, [e]), r;
|
||||
}, oa = ({ cols: e = 12, rowHeight: t = 21, fields: a = [], data: n, containerPadding: r = [0, 0], itemMargin: s = [4, 0], formProps: i = {}, className: o, ...l }) => {
|
||||
const [u] = re.useForm(), d = ia(a, Ga, "@pkg/grid-layouts"), p = me(() => [{ name: "__PROPS__", value: i }], [i]);
|
||||
const [u] = re.useForm(), d = ia(a, Ga, "@pkg/ff/grid-layouts"), p = me(() => [{ name: "__PROPS__", value: i }], [i]);
|
||||
return Xe(() => {
|
||||
u.setFieldsValue(n);
|
||||
}, [n]), c(re, { fields: p, form: u, component: !1, children: c("div", { ...l, className: R("ff-grid-layout", o), style: { "--grid-layout-item-margin-y": `${(s == null ? void 0 : s[0]) || 0}px`, "--grid-layout-item-margin-x": `${(s == null ? void 0 : s[1]) || 0}px`, "--grid-layout-container-padding-y": `${(r == null ? void 0 : r[0]) || 0}px`, "--grid-layout-container-padding-x": `${(r == null ? void 0 : r[1]) || 0}px`, "--grid-layout-cols": e, "--grid-layout-row-height": `${t}px` }, children: d }) });
|
||||
@ -348,7 +348,7 @@ const Xt = ({ className: e, title: t, tabs: a, tab: n, onTabChange: r }) => {
|
||||
}, [e]), (n == null ? void 0 : n.resource) && c(jt, { ...a, rowHeight: n.rowHeight, cols: n.cols, fields: n.fields, data: n != null && n.resource ? { [n == null ? void 0 : n.resource]: t } : {} });
|
||||
});
|
||||
var jt;
|
||||
const Gn = ({ widget: e, widgetPrefix: t = "@pkg/grid-layouts", basicForm: a, ...n }) => {
|
||||
const Gn = ({ 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] = N();
|
||||
return x(() => {
|
||||
r && X.getWidgetComponent(r).then(({ defaultProps: o = {}, default: l }) => ({ default: Ya(l, o, a) })).catch((o) => ({ default: () => `${o}` })).then((o) => i(C.createElement(o.default, n)));
|
||||
@ -434,7 +434,7 @@ const ae = class ae {
|
||||
});
|
||||
k(this, "createBrowserRouter", (t = {}) => {
|
||||
if (m(this, Q).size == 0) return null;
|
||||
const a = De.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/frameworks/BasicLayout"), n = De.get(X.checkUserToken() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"), r = { [a]: 0 }, s = (o, l) => () => X.getWidgetComponent(o).then((u) => u.default || function() {
|
||||
const a = De.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/ff/frameworks/BasicLayout"), n = De.get(X.checkUserToken() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"), r = { [a]: 0 }, s = (o, l) => () => X.getWidgetComponent(o).then((u) => u.default || function() {
|
||||
return `${o}`;
|
||||
}).then((u) => ({ Component: () => C.createElement(Kt, {}, C.createElement(u, l)) })), i = Array.from(m(this, Q).values()).reduce((o, { uuid: l, uri: u, name: d, type: p, component: h, widgetSetting: f, isLogin: y, isLayout: b, extra: w }) => {
|
||||
let E = {}, W = 0;
|
||||
@ -589,7 +589,7 @@ const Pe = ft.getInstance(), la = () => {
|
||||
return x(() => {
|
||||
a == "javascript" ? n(ue(s, e)) : t && n(ue(t, e));
|
||||
}, [e, t, s]), null;
|
||||
}, cn = ({ widget: e = "Input", widgetPrefix: t = "@pkg/grid-layout-forms", widgetDecorator: a, subWidgets: n, basicForm: r, ...s }) => {
|
||||
}, cn = ({ widget: e = "Input", widgetPrefix: t = "@pkg/ff/grid-layout-forms", widgetDecorator: a, subWidgets: n, basicForm: r, ...s }) => {
|
||||
const i = e != null && e.startsWith("@") || e != null && e.startsWith("blob:") ? e : `${t}/${e}`, [o, l] = N();
|
||||
return x(() => {
|
||||
i && X.getWidgetComponent(i).then(({ defaultProps: u = {}, default: d }) => ({ default: da(d, u, r) })).catch((u) => ({ default: () => `${u}` })).then((u) => l(C.createElement(u.default, s)));
|
||||
@ -601,7 +601,7 @@ const Pe = ft.getInstance(), la = () => {
|
||||
return c(e, { type: r, rcform: se, itemProps: { validateStatus: v.errors.length > 0 ? "error" : "success", tooltip: p, help: v.errors.length > 0 ? v.errors.join("、") : null, required: ((O = M == null ? void 0 : M[0]) == null ? void 0 : O.required) || !1, ...I }, fieldProps: { ...z, ...V }, $setting: u || {} });
|
||||
} });
|
||||
}, Nt = ({ cols: e = 24, rowHeight: t = 16, itemMargin: a = [8, 16], containerPadding: n = [0, 0], fields: r = [], children: s, basicForm: i = null }) => {
|
||||
const o = ia(r, da, "@pkg/grid-layout-forms");
|
||||
const o = ia(r, da, "@pkg/ff/grid-layout-forms");
|
||||
return P("div", { className: "ff-grid-layout-form", style: { "--grid-layout-item-margin-x": `${(a == null ? void 0 : a[0]) ?? 8}px`, "--grid-layout-item-margin-y": `${(a == null ? void 0 : a[1]) ?? 16}px`, "--grid-layout-container-padding-y": `${(n == null ? void 0 : n[0]) || 0}px`, "--grid-layout-container-padding-x": `${(n == null ? void 0 : n[1]) || 0}px`, "--grid-layout-cols": e, "--grid-layout-row-height": `${t}px` }, children: [o, s && C.cloneElement(s, { cols: e, rowHeight: t, itemMargin: a, containerPadding: n, fields: r })] });
|
||||
};
|
||||
Nt.propTypes = { fields: L.array };
|
2
dist/components.js
vendored
2
dist/components.js
vendored
@ -1,4 +1,4 @@
|
||||
import { _ as s, Q as p, $ as n, a0 as t, Z as d } from "./common/main-CB_qOise.js";
|
||||
import { _ as s, Q as p, $ as n, a0 as t, Z as d } from "./common/main-BSfbSUKo.js";
|
||||
export {
|
||||
s as Empty,
|
||||
p as Icon,
|
||||
|
2
dist/container.js
vendored
2
dist/container.js
vendored
@ -1,4 +1,4 @@
|
||||
import { W as o, _ as s, $ as p, a0 as t, X as d, Z as n, Y as r, V as u } from "./common/main-CB_qOise.js";
|
||||
import { W as o, _ as s, $ as p, a0 as t, X as d, Z as n, Y as r, V as u } from "./common/main-BSfbSUKo.js";
|
||||
export {
|
||||
o as Context,
|
||||
s as Empty,
|
||||
|
2
dist/data-list.js
vendored
2
dist/data-list.js
vendored
@ -1,4 +1,4 @@
|
||||
import { n as s, l as e, f as i, j as o, o as r, k as D, i as l, m as u, h as L, p as n, D as d, q as m, s as F, w as p, x as C, v as b } from "./common/main-CB_qOise.js";
|
||||
import { n as s, l as e, f as i, j as o, o as r, k as D, i as l, m as u, h as L, p as n, D as d, q as m, s as F, w as p, x as C, v as b } from "./common/main-BSfbSUKo.js";
|
||||
export {
|
||||
s 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 { a as t } from "../common/main-CB_qOise.js";
|
||||
import { a as t } from "../common/main-BSfbSUKo.js";
|
||||
export {
|
||||
t as getDefaultExpandRowKeys
|
||||
};
|
||||
|
2
dist/grid-layout-form.js
vendored
2
dist/grid-layout-form.js
vendored
@ -1,4 +1,4 @@
|
||||
import { J as r, L as u, K as e, I as o, P as t, O as d, N as m, M as F } from "./common/main-CB_qOise.js";
|
||||
import { J as r, L as u, K as e, I as o, P as t, O as d, N as m, M as F } from "./common/main-BSfbSUKo.js";
|
||||
export {
|
||||
r as GridLayoutForm,
|
||||
u 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 { ab as a } from "../common/main-CB_qOise.js";
|
||||
import { ab as a } from "../common/main-BSfbSUKo.js";
|
||||
export {
|
||||
a as getOptionItemByValue
|
||||
};
|
||||
|
2
dist/grid-layout.js
vendored
2
dist/grid-layout.js
vendored
@ -1,4 +1,4 @@
|
||||
import { c as d, d as e, H as u, G as i, u as t, e as o } from "./common/main-CB_qOise.js";
|
||||
import { c as d, d as e, H as u, G as i, u as t, e as o } from "./common/main-BSfbSUKo.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 { g as t } from "../common/main-CB_qOise.js";
|
||||
import { g as t } from "../common/main-BSfbSUKo.js";
|
||||
export {
|
||||
t as getBoxStyle
|
||||
};
|
||||
|
2
dist/hooks.js
vendored
2
dist/hooks.js
vendored
@ -1,7 +1,7 @@
|
||||
import "lodash";
|
||||
import "rc-field-form";
|
||||
import "react";
|
||||
import { C as r, B as o, E as p, z as i, A as f, F as m, y as c } from "./common/main-CB_qOise.js";
|
||||
import { C as r, B as o, E as p, z as i, A as f, F as m, y as c } from "./common/main-BSfbSUKo.js";
|
||||
import { _ as b } from "./common/vender-egxe712p.js";
|
||||
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 { Q as a } from "./common/main-CB_qOise.js";
|
||||
import { Q as a } from "./common/main-BSfbSUKo.js";
|
||||
export {
|
||||
a as default
|
||||
};
|
||||
|
2
dist/index.js
vendored
2
dist/index.js
vendored
@ -1,4 +1,4 @@
|
||||
import { a9 as t, aa as e, a5 as o, a6 as n, a1 as p, a7 as r, a4 as c, a3 as f, a2 as l, a8 as u } from "./common/main-CB_qOise.js";
|
||||
import { a9 as t, aa as e, a5 as o, a6 as n, a1 as p, a7 as r, a4 as c, a3 as f, a2 as l, a8 as u } from "./common/main-BSfbSUKo.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-CB_qOise.js";
|
||||
import { R as a } from "./common/main-BSfbSUKo.js";
|
||||
export {
|
||||
a as default
|
||||
};
|
||||
|
2
dist/utils.js
vendored
2
dist/utils.js
vendored
@ -1,5 +1,5 @@
|
||||
import "lodash";
|
||||
import { b as a, r as i, t as o } from "./common/main-CB_qOise.js";
|
||||
import { b as a, r as i, t as o } from "./common/main-BSfbSUKo.js";
|
||||
export {
|
||||
a as getWidgetPropsData,
|
||||
i as replaceKeys,
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ff",
|
||||
"private": true,
|
||||
"version": "0.4.20",
|
||||
"version": "0.4.21",
|
||||
"author": "www.fsdpf.com",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
|
Loading…
Reference in New Issue
Block a user