@nocobase/client 1.2.36-alpha → 1.2.38-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/collection-manager/templates/properties/index.d.ts +8 -1
- package/es/collection-manager/templates/sql.d.ts +1 -0
- package/es/collection-manager/templates/view.d.ts +1 -0
- package/es/index.mjs +144 -82
- package/es/schema-component/antd/upload/shared.d.ts +0 -3
- package/lib/index.js +46 -34
- package/lib/locale/en_US.js +3 -1
- package/lib/locale/zh-CN.js +4 -1
- package/package.json +5 -5
|
@@ -56,6 +56,13 @@ export declare const defaultConfigurableProperties: {
|
|
|
56
56
|
'x-decorator': string;
|
|
57
57
|
'x-component': string;
|
|
58
58
|
};
|
|
59
|
+
simplePaginate: {
|
|
60
|
+
'x-content': string;
|
|
61
|
+
type: string;
|
|
62
|
+
name: string;
|
|
63
|
+
'x-decorator': string;
|
|
64
|
+
'x-component': string;
|
|
65
|
+
};
|
|
59
66
|
presetFields: {
|
|
60
67
|
title: string;
|
|
61
68
|
type: string;
|
|
@@ -71,5 +78,5 @@ export declare const defaultConfigurableProperties: {
|
|
|
71
78
|
};
|
|
72
79
|
};
|
|
73
80
|
};
|
|
74
|
-
export type DefaultConfigurableKeys = 'name' | 'title' | 'inherits' | 'category' | 'autoGenId' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt' | 'sortable' | 'description' | 'presetFields';
|
|
81
|
+
export type DefaultConfigurableKeys = 'name' | 'title' | 'inherits' | 'category' | 'autoGenId' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt' | 'sortable' | 'description' | 'simplePaginate' | 'presetFields';
|
|
75
82
|
export declare const getConfigurableProperties: (...keys: DefaultConfigurableKeys[]) => Record<DefaultConfigurableKeys, any>;
|
package/es/index.mjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
var $e = Object.defineProperty, Ne = Object.defineProperties;
|
|
2
2
|
var ze = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
3
|
+
var be = Object.getOwnPropertySymbols;
|
|
4
4
|
var Me = Object.prototype.hasOwnProperty, Be = Object.prototype.propertyIsEnumerable;
|
|
5
5
|
var je = (e, t) => (t = Symbol[e]) ? t : Symbol.for("Symbol." + e);
|
|
6
|
-
var
|
|
6
|
+
var Ie = (e, t, o) => t in e ? $e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, g = (e, t) => {
|
|
7
7
|
for (var o in t || (t = {}))
|
|
8
|
-
Me.call(t, o) &&
|
|
9
|
-
if (
|
|
10
|
-
for (var o of
|
|
11
|
-
Be.call(t, o) &&
|
|
8
|
+
Me.call(t, o) && Ie(e, o, t[o]);
|
|
9
|
+
if (be)
|
|
10
|
+
for (var o of be(t))
|
|
11
|
+
Be.call(t, o) && Ie(e, o, t[o]);
|
|
12
12
|
return e;
|
|
13
13
|
}, F = (e, t) => Ne(e, ze(t));
|
|
14
14
|
var K = (e, t) => {
|
|
15
15
|
var o = {};
|
|
16
16
|
for (var n in e)
|
|
17
17
|
Me.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
|
|
18
|
-
if (e != null &&
|
|
19
|
-
for (var n of
|
|
18
|
+
if (e != null && be)
|
|
19
|
+
for (var n of be(e))
|
|
20
20
|
t.indexOf(n) < 0 && Be.call(e, n) && (o[n] = e[n]);
|
|
21
21
|
return o;
|
|
22
22
|
};
|
|
23
|
-
var P = (e, t, o) => (
|
|
23
|
+
var P = (e, t, o) => (Ie(e, typeof t != "symbol" ? t + "" : t, o), o);
|
|
24
24
|
var V = (e, t, o) => new Promise((n, r) => {
|
|
25
25
|
var i = (c) => {
|
|
26
26
|
try {
|
|
@@ -37,7 +37,7 @@ var V = (e, t, o) => new Promise((n, r) => {
|
|
|
37
37
|
}, l = (c) => c.done ? n(c.value) : Promise.resolve(c.value).then(i, a);
|
|
38
38
|
l((o = o.apply(e, t)).next());
|
|
39
39
|
});
|
|
40
|
-
var
|
|
40
|
+
var ye = (e, t, o) => (t = e[je("asyncIterator")]) ? t.call(e) : (e = e[je("iterator")](), t = {}, o = (n, r) => (r = e[n]) && (t[n] = (i) => new Promise((a, l, c) => (i = r.call(e, i), c = i.done, Promise.resolve(i.value).then((u) => a({ value: u, done: c }), l)))), o("next"), o("return"), t);
|
|
41
41
|
import "./index.css";
|
|
42
42
|
import "dayjs/plugin/isBetween";
|
|
43
43
|
import "dayjs/plugin/isSameOrAfter";
|
|
@@ -3977,7 +3977,7 @@ function addAppVersion(e, t) {
|
|
|
3977
3977
|
addAppVersion((n = e.properties) == null ? void 0 : n[o], t);
|
|
3978
3978
|
}), e;
|
|
3979
3979
|
}
|
|
3980
|
-
const name = "@nocobase/client", version$1 = "1.2.
|
|
3980
|
+
const name = "@nocobase/client", version$1 = "1.2.38-alpha", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
3981
3981
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
3982
3982
|
"@ant-design/cssinjs": "^1.11.1",
|
|
3983
3983
|
"@ant-design/icons": "^5.1.4",
|
|
@@ -3998,9 +3998,9 @@ const name = "@nocobase/client", version$1 = "1.2.36-alpha", license = "AGPL-3.0
|
|
|
3998
3998
|
"@formily/reactive-react": "^2.2.27",
|
|
3999
3999
|
"@formily/shared": "^2.2.27",
|
|
4000
4000
|
"@formily/validator": "^2.2.27",
|
|
4001
|
-
"@nocobase/evaluators": "1.2.
|
|
4002
|
-
"@nocobase/sdk": "1.2.
|
|
4003
|
-
"@nocobase/utils": "1.2.
|
|
4001
|
+
"@nocobase/evaluators": "1.2.38-alpha",
|
|
4002
|
+
"@nocobase/sdk": "1.2.38-alpha",
|
|
4003
|
+
"@nocobase/utils": "1.2.38-alpha",
|
|
4004
4004
|
ahooks: "^3.7.2",
|
|
4005
4005
|
antd: "^5.12.8",
|
|
4006
4006
|
"antd-style": "3.4.5",
|
|
@@ -6976,7 +6976,7 @@ function getPlugins(e) {
|
|
|
6976
6976
|
const r = [], i = {};
|
|
6977
6977
|
if (n) {
|
|
6978
6978
|
try {
|
|
6979
|
-
for (var c =
|
|
6979
|
+
for (var c = ye(o), u, d, p; u = !(d = yield c.next()).done; u = !1) {
|
|
6980
6980
|
const m = d.value;
|
|
6981
6981
|
const h = yield n(m.packageName);
|
|
6982
6982
|
h && (r.push([m.name, h.default]), i[m.packageName] = h.default);
|
|
@@ -7018,7 +7018,7 @@ let PluginManager$1 = class {
|
|
|
7018
7018
|
initStaticPlugins() {
|
|
7019
7019
|
return V(this, arguments, function* (t = []) {
|
|
7020
7020
|
try {
|
|
7021
|
-
for (var o =
|
|
7021
|
+
for (var o = ye(t), n, r, i; n = !(r = yield o.next()).done; n = !1) {
|
|
7022
7022
|
const a = r.value;
|
|
7023
7023
|
const l = Array.isArray(a) ? a[0] : a, c = Array.isArray(a) ? a[1] : void 0;
|
|
7024
7024
|
yield this.add(l, c);
|
|
@@ -7044,7 +7044,7 @@ let PluginManager$1 = class {
|
|
|
7044
7044
|
devDynamicImport: this.app.devDynamicImport
|
|
7045
7045
|
});
|
|
7046
7046
|
try {
|
|
7047
|
-
for (var i =
|
|
7047
|
+
for (var i = ye(n), a, l, c; a = !(l = yield i.next()).done; a = !1) {
|
|
7048
7048
|
const [u, d] = l.value;
|
|
7049
7049
|
const p = o.find((m) => m.name === u);
|
|
7050
7050
|
yield this.add(d, p);
|
|
@@ -15368,18 +15368,18 @@ const InternalTableBlockProvider = (e) => {
|
|
|
15368
15368
|
}
|
|
15369
15369
|
return { params: o, parseVariableLoading: n };
|
|
15370
15370
|
}, TableBlockProvider = withDynamicSchemaProps((e) => {
|
|
15371
|
-
const t = e.resource || e.association, o = useFieldSchema(), { getCollection: n, getCollectionField: r } = useCollectionManager_deprecated(e.dataSource), i = n(e.collection, e.dataSource), { treeTable: a } = (o == null ? void 0 : o["x-decorator-props"]) || {}, { params:
|
|
15372
|
-
let
|
|
15371
|
+
const t = e.resource || e.association, o = useFieldSchema(), { getCollection: n, getCollectionField: r } = useCollectionManager_deprecated(e.dataSource), i = n(e.collection, e.dataSource), { treeTable: a, pagingMode: l } = (o == null ? void 0 : o["x-decorator-props"]) || {}, { params: c, parseVariableLoading: u } = useTableBlockParamsCompat(e);
|
|
15372
|
+
let d = "children";
|
|
15373
15373
|
if (a)
|
|
15374
15374
|
if (t != null && t.includes(".")) {
|
|
15375
|
-
const
|
|
15376
|
-
|
|
15375
|
+
const m = r(t);
|
|
15376
|
+
m != null && m.treeChildren && (d = m.name), c.tree = !0;
|
|
15377
15377
|
} else {
|
|
15378
|
-
const
|
|
15379
|
-
|
|
15378
|
+
const m = i.fields.find((h) => h.treeChildren);
|
|
15379
|
+
m && (d = m.name), c.tree = !0;
|
|
15380
15380
|
}
|
|
15381
|
-
const
|
|
15382
|
-
return
|
|
15381
|
+
const p = useMemo(() => createForm(), [a]);
|
|
15382
|
+
return u ? null : /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: { treeTable: a }, children: /* @__PURE__ */ jsx(FormContext.Provider, { value: p, children: /* @__PURE__ */ jsx(BlockProvider, F(g({ name: e.name || "table" }, e), { params: c, runWhenParamsChanged: !0, children: /* @__PURE__ */ jsx(InternalTableBlockProvider, F(g({}, e), { childrenColumnName: d, params: c })) })) }) });
|
|
15383
15383
|
}), useTableBlockContext = () => useContext(TableBlockContext), useTableBlockProps = () => {
|
|
15384
15384
|
var l, c, u, d, p, m, h, f, x, C;
|
|
15385
15385
|
const e = useField(), t = useFieldSchema(), o = useTableBlockContext(), n = (u = (c = (l = t.parent) == null ? void 0 : l["x-decorator-props"]) == null ? void 0 : c.params) == null ? void 0 : u.sort, { getDataBlocks: r } = useFilterBlock(), i = (d = o == null ? void 0 : o.service) == null ? void 0 : d.loading, a = useMemo(() => {
|
|
@@ -18402,7 +18402,7 @@ const DynamicComponent$1 = (e) => {
|
|
|
18402
18402
|
collectionField: { uiSchema: o, collectionName: r },
|
|
18403
18403
|
uiSchema: o,
|
|
18404
18404
|
blockCollectionName: r
|
|
18405
|
-
}), m = useMemo(() => ({ minWidth: 150, maxWidth: 430
|
|
18405
|
+
}), m = useMemo(() => ({ minWidth: 150, maxWidth: 430 }), []), h = useCallback(
|
|
18406
18406
|
(y) => {
|
|
18407
18407
|
n({
|
|
18408
18408
|
mode: i,
|
|
@@ -18420,15 +18420,28 @@ const DynamicComponent$1 = (e) => {
|
|
|
18420
18420
|
});
|
|
18421
18421
|
},
|
|
18422
18422
|
[r, i, n]
|
|
18423
|
-
), C = useMemo(() => ({ minWidth: 460 }), []), S = useMemo(() => p(d, {
|
|
18423
|
+
), C = useMemo(() => ({ minWidth: 460, borderRadius: 0 }), []), S = useMemo(() => p(d, {
|
|
18424
18424
|
value: t == null ? void 0 : t.value
|
|
18425
18425
|
}), [p, t == null ? void 0 : t.value, d]), b = {
|
|
18426
18426
|
// 常量
|
|
18427
|
-
constant: /* @__PURE__ */ jsx(
|
|
18428
|
-
|
|
18429
|
-
|
|
18430
|
-
|
|
18431
|
-
|
|
18427
|
+
constant: /* @__PURE__ */ jsx(
|
|
18428
|
+
"div",
|
|
18429
|
+
{
|
|
18430
|
+
role: "button",
|
|
18431
|
+
"aria-label": "dynamic-component-linkage-rules",
|
|
18432
|
+
style: m,
|
|
18433
|
+
className: css`
|
|
18434
|
+
.ant-input-affix-wrapper {
|
|
18435
|
+
border-radius: 0px;
|
|
18436
|
+
}
|
|
18437
|
+
`,
|
|
18438
|
+
children: React.createElement(DynamicComponent$1, {
|
|
18439
|
+
value: t == null ? void 0 : t.value,
|
|
18440
|
+
schema: o,
|
|
18441
|
+
onChange: h
|
|
18442
|
+
})
|
|
18443
|
+
}
|
|
18444
|
+
),
|
|
18432
18445
|
// 表达式
|
|
18433
18446
|
express: /* @__PURE__ */ jsxs("div", { role: "button", "aria-label": "dynamic-component-linkage-rules", style: f, children: [
|
|
18434
18447
|
/* @__PURE__ */ jsx(
|
|
@@ -18459,7 +18472,7 @@ const DynamicComponent$1 = (e) => {
|
|
|
18459
18472
|
style: { width: 150 },
|
|
18460
18473
|
onChange: (y) => {
|
|
18461
18474
|
a(y), n({
|
|
18462
|
-
mode:
|
|
18475
|
+
mode: t == null ? void 0 : t.mode
|
|
18463
18476
|
});
|
|
18464
18477
|
},
|
|
18465
18478
|
children: [
|
|
@@ -18469,7 +18482,7 @@ const DynamicComponent$1 = (e) => {
|
|
|
18469
18482
|
]
|
|
18470
18483
|
}
|
|
18471
18484
|
),
|
|
18472
|
-
b[i]
|
|
18485
|
+
b[(t == null ? void 0 : t.mode) || i]
|
|
18473
18486
|
] });
|
|
18474
18487
|
}, findOption = (e = [], t) => {
|
|
18475
18488
|
var r;
|
|
@@ -18707,7 +18720,7 @@ const useStyles$f = createStyles(() => ({
|
|
|
18707
18720
|
return /* @__PURE__ */ jsx(
|
|
18708
18721
|
Input$3.TextArea,
|
|
18709
18722
|
{
|
|
18710
|
-
value: r.title,
|
|
18723
|
+
value: r.title || n("Linkage rule"),
|
|
18711
18724
|
defaultValue: n("Linkage rule"),
|
|
18712
18725
|
onChange: (a) => {
|
|
18713
18726
|
a.stopPropagation(), t.field.value.splice(o, 1, F(g({}, r), { title: a.target.value }));
|
|
@@ -19313,7 +19326,13 @@ const SchemaSettingsProvider = (e) => {
|
|
|
19313
19326
|
const k = useCallback(() => {
|
|
19314
19327
|
m(!1), A.reset();
|
|
19315
19328
|
}, [A]), w = useCallback(() => V(void 0, null, function* () {
|
|
19316
|
-
yield A.submit()
|
|
19329
|
+
yield A.submit();
|
|
19330
|
+
try {
|
|
19331
|
+
const O = A.values, z = Object.keys(O).reduce((R, j) => (A.query(j).take() && (R[j] = O[j]), R), {});
|
|
19332
|
+
yield o == null ? void 0 : o(cloneDeep$1(z)), m(!1);
|
|
19333
|
+
} catch (O) {
|
|
19334
|
+
console.error(O);
|
|
19335
|
+
}
|
|
19317
19336
|
}), [A, o]), M = useCallback(() => V(void 0, null, function* () {
|
|
19318
19337
|
!h && (i != null && i["x-uid"]) && (C["x-action-settings"].schemaUid = i["x-uid"], b.emit("patch", { schema: C }), yield v.resource("uiSchemas").insert({ values: i }), f(i["x-uid"])), typeof r == "function" && (r == null || r()), S.setVisible(!1), m(!0);
|
|
19319
19338
|
}), [v, S, b, C, i, h]), N = useCallback((O) => O.stopPropagation(), []);
|
|
@@ -21851,7 +21870,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
21851
21870
|
});
|
|
21852
21871
|
});
|
|
21853
21872
|
}, [R, Q, se, te]);
|
|
21854
|
-
const
|
|
21873
|
+
const ve = useCallback(
|
|
21855
21874
|
(Z, ne = !0) => {
|
|
21856
21875
|
if (!(ne && isPortalInBody(Z.target)) && (Z.preventDefault(), Z.stopPropagation(), !X && v)) {
|
|
21857
21876
|
const ie = () => {
|
|
@@ -21868,18 +21887,18 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
21868
21887
|
}
|
|
21869
21888
|
},
|
|
21870
21889
|
[o, X, re, d, j]
|
|
21871
|
-
),
|
|
21890
|
+
), Fe = useMemo(() => {
|
|
21872
21891
|
var Z;
|
|
21873
21892
|
return F(g({}, p), {
|
|
21874
21893
|
opacity: J && (((Z = R == null ? void 0 : R.data) == null ? void 0 : Z.hidden) || !v) && 0.1,
|
|
21875
21894
|
color: X ? "rgba(0, 0, 0, 0.25)" : null
|
|
21876
21895
|
});
|
|
21877
|
-
}, [J, (ee = R == null ? void 0 : R.data) == null ? void 0 : ee.hidden, p, X]),
|
|
21896
|
+
}, [J, (ee = R == null ? void 0 : R.data) == null ? void 0 : ee.hidden, p, X]), xe = useCallback(
|
|
21878
21897
|
(Z) => {
|
|
21879
21898
|
S == null || S(Z);
|
|
21880
21899
|
},
|
|
21881
21900
|
[S]
|
|
21882
|
-
),
|
|
21901
|
+
), Ce = () => {
|
|
21883
21902
|
var Z, ne;
|
|
21884
21903
|
return !J && ((Z = R == null ? void 0 : R.data) != null && Z.hidden || !v) ? null : /* @__PURE__ */ jsxs(
|
|
21885
21904
|
SortableItem,
|
|
@@ -21887,12 +21906,12 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
21887
21906
|
role: "button",
|
|
21888
21907
|
"aria-label": ae()
|
|
21889
21908
|
}, y), {
|
|
21890
|
-
onMouseEnter:
|
|
21909
|
+
onMouseEnter: xe,
|
|
21891
21910
|
loading: ((ne = R == null ? void 0 : R.data) == null ? void 0 : ne.loading) || m,
|
|
21892
21911
|
icon: typeof c == "string" ? /* @__PURE__ */ jsx(Icon, { type: c }) : c,
|
|
21893
21912
|
disabled: X,
|
|
21894
|
-
style:
|
|
21895
|
-
onClick:
|
|
21913
|
+
style: Fe,
|
|
21914
|
+
onClick: ve,
|
|
21896
21915
|
component: oe || Button,
|
|
21897
21916
|
className: cls(A, k, l, "nb-action"),
|
|
21898
21917
|
type: e.type === "danger" ? void 0 : e.type,
|
|
@@ -21902,10 +21921,10 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
21902
21921
|
]
|
|
21903
21922
|
})
|
|
21904
21923
|
);
|
|
21905
|
-
},
|
|
21924
|
+
}, Se = Ce(), de = /* @__PURE__ */ jsxs(
|
|
21906
21925
|
ActionContextProvider,
|
|
21907
21926
|
{
|
|
21908
|
-
button:
|
|
21927
|
+
button: Se,
|
|
21909
21928
|
visible: M,
|
|
21910
21929
|
setVisible: N,
|
|
21911
21930
|
formValueChanged: E,
|
|
@@ -21916,7 +21935,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
21916
21935
|
fieldSchema: D,
|
|
21917
21936
|
children: [
|
|
21918
21937
|
t && /* @__PURE__ */ jsx(RecursionField, { basePath: R.address, onlyRenderProperties: !0, schema: D }),
|
|
21919
|
-
!t &&
|
|
21938
|
+
!t && Ce(),
|
|
21920
21939
|
/* @__PURE__ */ jsx(VariablePopupRecordProvider, { children: !t && e.children }),
|
|
21921
21940
|
B
|
|
21922
21941
|
]
|
|
@@ -32636,8 +32655,8 @@ const toItem = (e) => {
|
|
|
32636
32655
|
}, e.response.data)), F(g({}, e), {
|
|
32637
32656
|
id: e.id || e.uid,
|
|
32638
32657
|
title: e.title || e.name,
|
|
32639
|
-
imageUrl: getImageByUrl(e.url, {
|
|
32640
|
-
exclude: [".png", ".jpg", ".jpeg", ".gif"]
|
|
32658
|
+
imageUrl: isImage(e) ? e.url : getImageByUrl(e.url, {
|
|
32659
|
+
exclude: [".png", ".jpg", ".jpeg", ".gif", ".svg", ".webp", ".bmp", ".ico"]
|
|
32641
32660
|
})
|
|
32642
32661
|
});
|
|
32643
32662
|
}, toFileList = (e) => toArr$1(e).filter(Boolean).map(toItem), Rules = {
|
|
@@ -34397,7 +34416,10 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
34397
34416
|
{
|
|
34398
34417
|
style: { zIndex: 1e3, color: "#a8a3a3" },
|
|
34399
34418
|
onClick: () => {
|
|
34400
|
-
action(() => (n
|
|
34419
|
+
action(() => (spliceArrayState(n, {
|
|
34420
|
+
startIndex: p,
|
|
34421
|
+
deleteCount: 1
|
|
34422
|
+
}), n.value.splice(p, 1), n.onInput(n.value)));
|
|
34401
34423
|
}
|
|
34402
34424
|
}
|
|
34403
34425
|
) }, "remove")
|
|
@@ -34631,17 +34653,49 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
34631
34653
|
const n = e, { index: t } = n, o = K(n, ["index"]);
|
|
34632
34654
|
return /* @__PURE__ */ jsx("div", F(g({ className: cls("nb-table-index"), style: { padding: "0 8px 0 16px" } }, o), { children: t }));
|
|
34633
34655
|
}, usePaginationProps$1 = (e, t) => {
|
|
34634
|
-
const { t: o } = useTranslation(), n = useMemo(
|
|
34656
|
+
const { t: o } = useTranslation(), n = useField(), { token: r } = useToken(), i = useMemo(
|
|
34635
34657
|
() => g(g({}, e), t),
|
|
34636
34658
|
[JSON.stringify(g(g({}, e), t))]
|
|
34637
|
-
),
|
|
34638
|
-
() =>
|
|
34639
|
-
|
|
34659
|
+
), { total: a, current: l, pageSize: c } = i || {}, u = useCallback(
|
|
34660
|
+
(p) => o("Total {{count}} items", { count: p }),
|
|
34661
|
+
[o, a]
|
|
34662
|
+
), d = useMemo(() => {
|
|
34663
|
+
var p;
|
|
34664
|
+
return a ? g({
|
|
34665
|
+
showTotal: u,
|
|
34640
34666
|
showSizeChanger: !0
|
|
34641
|
-
},
|
|
34642
|
-
|
|
34643
|
-
|
|
34644
|
-
|
|
34667
|
+
}, i) : F(g({
|
|
34668
|
+
showTotal: !1,
|
|
34669
|
+
simple: !0,
|
|
34670
|
+
showTitle: !1,
|
|
34671
|
+
showSizeChanger: !0,
|
|
34672
|
+
hideOnSinglePage: !1
|
|
34673
|
+
}, i), {
|
|
34674
|
+
total: ((p = n.value) == null ? void 0 : p.length) < c ? c * l : c * l + 1,
|
|
34675
|
+
className: css`
|
|
34676
|
+
.ant-pagination-simple-pager {
|
|
34677
|
+
display: none !important;
|
|
34678
|
+
}
|
|
34679
|
+
`,
|
|
34680
|
+
itemRender: (m, h, f) => h === "prev" ? /* @__PURE__ */ jsxs(
|
|
34681
|
+
"div",
|
|
34682
|
+
{
|
|
34683
|
+
style: { display: "flex" },
|
|
34684
|
+
className: css`
|
|
34685
|
+
.ant-pagination-item-link {
|
|
34686
|
+
min-width: ${r.controlHeight}px;
|
|
34687
|
+
}
|
|
34688
|
+
`,
|
|
34689
|
+
children: [
|
|
34690
|
+
f,
|
|
34691
|
+
" ",
|
|
34692
|
+
/* @__PURE__ */ jsx("div", { style: { marginLeft: "7px" }, children: l })
|
|
34693
|
+
]
|
|
34694
|
+
}
|
|
34695
|
+
) : f
|
|
34696
|
+
});
|
|
34697
|
+
}, [i, o, u]);
|
|
34698
|
+
return t === !1 || !t && e === !1 || d.total <= d.pageSize ? !1 : d;
|
|
34645
34699
|
}, headerClass = css`
|
|
34646
34700
|
max-width: 300px;
|
|
34647
34701
|
white-space: nowrap;
|
|
@@ -34699,7 +34753,7 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
34699
34753
|
`, HeaderWrapperComponent = (e) => /* @__PURE__ */ jsx(DndContext, { children: /* @__PURE__ */ jsx("thead", g({}, e)) }), HeaderCellComponent = (e) => /* @__PURE__ */ jsx("th", F(g({}, e), { className: cls(e.className, headerClass) })), BodyRowComponent = (e) => /* @__PURE__ */ jsx(SortableRow, g({}, e)), Table$1 = withDynamicSchemaProps(
|
|
34700
34754
|
observer$1((e) => {
|
|
34701
34755
|
var me, he, ge, fe;
|
|
34702
|
-
const { token: t } = useToken(),
|
|
34756
|
+
const { token: t } = useToken(), Se = omit$1(e, ["onBlur", "onFocus", "value"]), { pagination: o, useProps: n } = Se, r = K(Se, ["pagination", "useProps"]), de = (n == null ? void 0 : n()) || {}, { pagination: i } = de, a = K(de, ["pagination"]), pe = g(g({}, r), a), {
|
|
34703
34757
|
dragSort: l = !1,
|
|
34704
34758
|
showIndex: c = !0,
|
|
34705
34759
|
onRowSelectionChange: u,
|
|
@@ -34761,13 +34815,13 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
34761
34815
|
DndContext,
|
|
34762
34816
|
{
|
|
34763
34817
|
onDragEnd: (Z) => {
|
|
34764
|
-
var
|
|
34818
|
+
var Ae, ke, Te, we, Re, De;
|
|
34765
34819
|
if (!Z.active || !Z.over) {
|
|
34766
34820
|
console.warn("move cancel");
|
|
34767
34821
|
return;
|
|
34768
34822
|
}
|
|
34769
|
-
const ne = (Te = (
|
|
34770
|
-
b.move(ne, ie), N({ from: le, to:
|
|
34823
|
+
const ne = (Te = (ke = (Ae = Z.active) == null ? void 0 : Ae.data.current) == null ? void 0 : ke.sortable) == null ? void 0 : Te.index, ie = (De = (Re = (we = Z.over) == null ? void 0 : we.data.current) == null ? void 0 : Re.sortable) == null ? void 0 : De.index, le = b.value[ne] || Z.active, Pe = b.value[ie] || Z.over;
|
|
34824
|
+
b.move(ne, ie), N({ from: le, to: Pe });
|
|
34771
34825
|
},
|
|
34772
34826
|
children: /* @__PURE__ */ jsx("tbody", g({}, ee))
|
|
34773
34827
|
}
|
|
@@ -34807,11 +34861,10 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
34807
34861
|
};
|
|
34808
34862
|
},
|
|
34809
34863
|
renderCell: (ee, Z, ne, ie) => {
|
|
34810
|
-
var xe, Ce;
|
|
34811
34864
|
if (!l && !c)
|
|
34812
34865
|
return ie;
|
|
34813
|
-
const le =
|
|
34814
|
-
return le ? ne = ne + (le - 1) *
|
|
34866
|
+
const le = E == null ? void 0 : E.current, Pe = (E == null ? void 0 : E.pageSize) || 20;
|
|
34867
|
+
return le ? ne = ne + (le - 1) * Pe + 1 : ne = ne + 1, Z.__index && (ne = extractIndex(Z.__index)), /* @__PURE__ */ jsxs(
|
|
34815
34868
|
"div",
|
|
34816
34869
|
{
|
|
34817
34870
|
role: "button",
|
|
@@ -34850,7 +34903,8 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
34850
34903
|
b,
|
|
34851
34904
|
H,
|
|
34852
34905
|
D,
|
|
34853
|
-
re
|
|
34906
|
+
re,
|
|
34907
|
+
E
|
|
34854
34908
|
]
|
|
34855
34909
|
), se = useCallback(
|
|
34856
34910
|
({ children: ee }) => {
|
|
@@ -34866,22 +34920,22 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
34866
34920
|
[b, l, H]
|
|
34867
34921
|
), { height: ae, tableSizeRefCallback: ce } = useTableSize(), ue = useMemo(() => ({
|
|
34868
34922
|
x: "max-content"
|
|
34869
|
-
}), []),
|
|
34923
|
+
}), []), ve = useMemo(() => ({
|
|
34870
34924
|
x: "max-content",
|
|
34871
34925
|
y: ae
|
|
34872
|
-
}), [ae, ue]),
|
|
34926
|
+
}), [ae, ue]), Fe = useCallback(
|
|
34873
34927
|
(ee) => B.includes(ee[m]) ? L : "",
|
|
34874
34928
|
[B, L, m]
|
|
34875
|
-
),
|
|
34929
|
+
), xe = useCallback(
|
|
34876
34930
|
(ee, Z) => {
|
|
34877
34931
|
const ne = ee ? [...O, Z[I.getPrimaryKey()]] : O.filter((ie) => Z[I.getPrimaryKey()] !== ie);
|
|
34878
34932
|
z(ne), f == null || f(ee, Z);
|
|
34879
34933
|
},
|
|
34880
34934
|
[O, f, I]
|
|
34881
|
-
),
|
|
34882
|
-
onExpand:
|
|
34935
|
+
), Ce = useMemo(() => ({
|
|
34936
|
+
onExpand: xe,
|
|
34883
34937
|
expandedRowKeys: O
|
|
34884
|
-
}), [O,
|
|
34938
|
+
}), [O, xe]);
|
|
34885
34939
|
return /* @__PURE__ */ jsxs(
|
|
34886
34940
|
"div",
|
|
34887
34941
|
{
|
|
@@ -34921,10 +34975,10 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
34921
34975
|
components: oe,
|
|
34922
34976
|
onChange: d,
|
|
34923
34977
|
onRow: G,
|
|
34924
|
-
rowClassName:
|
|
34925
|
-
scroll:
|
|
34978
|
+
rowClassName: Fe,
|
|
34979
|
+
scroll: ve,
|
|
34926
34980
|
columns: y,
|
|
34927
|
-
expandable:
|
|
34981
|
+
expandable: Ce
|
|
34928
34982
|
})
|
|
34929
34983
|
) }),
|
|
34930
34984
|
b.errors.length > 0 && /* @__PURE__ */ jsx("div", { className: "ant-formily-item-error-help ant-formily-item-help ant-formily-item-help-enter ant-formily-item-help-enter-active", children: b.errors.map((ee) => ee.messages.map((Z) => /* @__PURE__ */ jsx("div", { children: Z }, Z))) })
|
|
@@ -44666,7 +44720,7 @@ const string = [
|
|
|
44666
44720
|
}
|
|
44667
44721
|
},
|
|
44668
44722
|
{
|
|
44669
|
-
label: '{{t("
|
|
44723
|
+
label: '{{t("is any of")}}',
|
|
44670
44724
|
value: "$anyOf",
|
|
44671
44725
|
schema: {
|
|
44672
44726
|
"x-component": "Select",
|
|
@@ -44674,7 +44728,7 @@ const string = [
|
|
|
44674
44728
|
}
|
|
44675
44729
|
},
|
|
44676
44730
|
{
|
|
44677
|
-
label: '{{t("
|
|
44731
|
+
label: '{{t("is none of")}}',
|
|
44678
44732
|
value: "$noneOf",
|
|
44679
44733
|
schema: {
|
|
44680
44734
|
"x-component": "Select",
|
|
@@ -44723,7 +44777,7 @@ const string = [
|
|
|
44723
44777
|
schema: { "x-component": "Select" }
|
|
44724
44778
|
},
|
|
44725
44779
|
{
|
|
44726
|
-
label: '{{t("
|
|
44780
|
+
label: '{{t("is any of")}}',
|
|
44727
44781
|
value: "$in",
|
|
44728
44782
|
schema: {
|
|
44729
44783
|
"x-component": "Select",
|
|
@@ -44731,7 +44785,7 @@ const string = [
|
|
|
44731
44785
|
}
|
|
44732
44786
|
},
|
|
44733
44787
|
{
|
|
44734
|
-
label: '{{t("
|
|
44788
|
+
label: '{{t("is none of")}}',
|
|
44735
44789
|
value: "$notIn",
|
|
44736
44790
|
schema: {
|
|
44737
44791
|
"x-component": "Select",
|
|
@@ -44750,7 +44804,7 @@ const string = [
|
|
|
44750
44804
|
{ label: '{{t("No")}}', value: "$isFalsy", noValue: !0 }
|
|
44751
44805
|
], tableoid = [
|
|
44752
44806
|
{
|
|
44753
|
-
label: '{{t("
|
|
44807
|
+
label: '{{t("is any of")}}',
|
|
44754
44808
|
value: "$childIn",
|
|
44755
44809
|
schema: {
|
|
44756
44810
|
"x-component": "CollectionSelect",
|
|
@@ -44758,7 +44812,7 @@ const string = [
|
|
|
44758
44812
|
}
|
|
44759
44813
|
},
|
|
44760
44814
|
{
|
|
44761
|
-
label: '{{t("
|
|
44815
|
+
label: '{{t("is none of")}}',
|
|
44762
44816
|
value: "$childNotIn",
|
|
44763
44817
|
schema: {
|
|
44764
44818
|
"x-component": "CollectionSelect",
|
|
@@ -44778,7 +44832,7 @@ const string = [
|
|
|
44778
44832
|
schema: { "x-component": "CollectionSelect" }
|
|
44779
44833
|
},
|
|
44780
44834
|
{
|
|
44781
|
-
label: '{{t("
|
|
44835
|
+
label: '{{t("is any of")}}',
|
|
44782
44836
|
value: "$in",
|
|
44783
44837
|
schema: {
|
|
44784
44838
|
"x-component": "CollectionSelect",
|
|
@@ -44786,7 +44840,7 @@ const string = [
|
|
|
44786
44840
|
}
|
|
44787
44841
|
},
|
|
44788
44842
|
{
|
|
44789
|
-
label: '{{t("
|
|
44843
|
+
label: '{{t("is none of")}}',
|
|
44790
44844
|
value: "$notIn",
|
|
44791
44845
|
schema: {
|
|
44792
44846
|
"x-component": "CollectionSelect",
|
|
@@ -45514,6 +45568,13 @@ const string = [
|
|
|
45514
45568
|
"x-decorator": "FormItem",
|
|
45515
45569
|
"x-component": "Input.TextArea"
|
|
45516
45570
|
},
|
|
45571
|
+
simplePaginate: {
|
|
45572
|
+
"x-content": '{{t("Use simple pagination mode")}}',
|
|
45573
|
+
type: "string",
|
|
45574
|
+
name: "simplePaginate",
|
|
45575
|
+
"x-decorator": "FormItem",
|
|
45576
|
+
"x-component": "Checkbox"
|
|
45577
|
+
},
|
|
45517
45578
|
presetFields: {
|
|
45518
45579
|
title: '{{t("Preset fields")}}',
|
|
45519
45580
|
type: "void",
|
|
@@ -48956,6 +49017,7 @@ class GeneralCollectionTemplate extends CollectionTemplate {
|
|
|
48956
49017
|
"inherits",
|
|
48957
49018
|
"category",
|
|
48958
49019
|
"description",
|
|
49020
|
+
"simplePaginate",
|
|
48959
49021
|
"presetFields"
|
|
48960
49022
|
));
|
|
48961
49023
|
}
|
|
@@ -11,9 +11,6 @@ import type { IUploadProps, UploadProps } from './type';
|
|
|
11
11
|
export declare const FILE_SIZE_LIMIT_DEFAULT: number;
|
|
12
12
|
export declare const isImage: (file: any) => any;
|
|
13
13
|
export declare const isPdf: (file: any) => any;
|
|
14
|
-
export declare const toMap: (fileList: any) => any;
|
|
15
|
-
export declare const toImages: (fileList: any) => any;
|
|
16
|
-
export declare const toArr: (value: any) => any[];
|
|
17
14
|
export declare const testOpts: (ext: RegExp, options: {
|
|
18
15
|
exclude?: string[];
|
|
19
16
|
include?: string[];
|