@nocobase/client 1.9.37 → 1.9.38
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/block-provider/TableUidContext.d.ts +10 -0
- package/es/index.mjs +159 -139
- package/lib/index.js +82 -82
- package/package.json +5 -5
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
/// <reference types="react" />
|
|
10
|
+
export declare const TableUidContext: import("react").Context<string>;
|
package/es/index.mjs
CHANGED
|
@@ -8855,7 +8855,7 @@ function addAppVersion(e, t) {
|
|
|
8855
8855
|
addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
|
|
8856
8856
|
}), e;
|
|
8857
8857
|
}
|
|
8858
|
-
const name = "@nocobase/client", version = "1.9.
|
|
8858
|
+
const name = "@nocobase/client", version = "1.9.38", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
8859
8859
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
8860
8860
|
"@ant-design/cssinjs": "^1.11.1",
|
|
8861
8861
|
"@ant-design/icons": "^5.6.1",
|
|
@@ -8876,9 +8876,9 @@ const name = "@nocobase/client", version = "1.9.37", license = "AGPL-3.0", main
|
|
|
8876
8876
|
"@formily/reactive-react": "^2.2.27",
|
|
8877
8877
|
"@formily/shared": "^2.2.27",
|
|
8878
8878
|
"@formily/validator": "^2.2.27",
|
|
8879
|
-
"@nocobase/evaluators": "1.9.
|
|
8880
|
-
"@nocobase/sdk": "1.9.
|
|
8881
|
-
"@nocobase/utils": "1.9.
|
|
8879
|
+
"@nocobase/evaluators": "1.9.38",
|
|
8880
|
+
"@nocobase/sdk": "1.9.38",
|
|
8881
|
+
"@nocobase/utils": "1.9.38",
|
|
8882
8882
|
ahooks: "^3.7.2",
|
|
8883
8883
|
antd: "5.24.2",
|
|
8884
8884
|
"antd-mobile": "^5.41.1",
|
|
@@ -9914,93 +9914,93 @@ const SubFormProvider = (e) => {
|
|
|
9914
9914
|
fieldSchema: n,
|
|
9915
9915
|
parent: o
|
|
9916
9916
|
};
|
|
9917
|
-
}, useColumnSettings = (e) => {
|
|
9918
|
-
const { t } = useTranslation(), n = `nocobase_table_column_settings_${
|
|
9917
|
+
}, TableUidContext = createContext(null), useColumnSettings = (e) => {
|
|
9918
|
+
const { t } = useTranslation(), n = useContext(TableUidContext), o = `nocobase_table_column_settings_${n}`, r = useCallback(() => {
|
|
9919
9919
|
try {
|
|
9920
|
-
const
|
|
9921
|
-
return
|
|
9922
|
-
} catch (
|
|
9923
|
-
return console.warn("Failed to parse table column settings from localStorage:",
|
|
9920
|
+
const l = localStorage.getItem(o);
|
|
9921
|
+
return l ? JSON.parse(l) : null;
|
|
9922
|
+
} catch (l) {
|
|
9923
|
+
return console.warn("Failed to parse table column settings from localStorage:", l), null;
|
|
9924
9924
|
}
|
|
9925
|
-
}, [
|
|
9926
|
-
(
|
|
9925
|
+
}, [o]), a = useCallback(
|
|
9926
|
+
(l) => {
|
|
9927
9927
|
try {
|
|
9928
|
-
const
|
|
9929
|
-
localStorage.setItem(
|
|
9930
|
-
const
|
|
9928
|
+
const c = JSON.stringify(l);
|
|
9929
|
+
localStorage.setItem(o, c);
|
|
9930
|
+
const u = new CustomEvent("nocobase-table-settings-changed", {
|
|
9931
9931
|
detail: {
|
|
9932
|
-
key:
|
|
9933
|
-
tableId:
|
|
9934
|
-
settings:
|
|
9932
|
+
key: o,
|
|
9933
|
+
tableId: n,
|
|
9934
|
+
settings: l
|
|
9935
9935
|
}
|
|
9936
9936
|
});
|
|
9937
|
-
window.dispatchEvent(
|
|
9938
|
-
} catch (
|
|
9939
|
-
console.warn("Failed to save table column settings to localStorage:",
|
|
9937
|
+
window.dispatchEvent(u);
|
|
9938
|
+
} catch (c) {
|
|
9939
|
+
console.warn("Failed to save table column settings to localStorage:", c), message.error(t("Failed to save table settings"));
|
|
9940
9940
|
}
|
|
9941
9941
|
},
|
|
9942
|
-
[
|
|
9943
|
-
),
|
|
9942
|
+
[o, n, t]
|
|
9943
|
+
), i = useCallback(() => {
|
|
9944
9944
|
try {
|
|
9945
|
-
localStorage.removeItem(
|
|
9946
|
-
const
|
|
9945
|
+
localStorage.removeItem(o);
|
|
9946
|
+
const l = new CustomEvent("nocobase-table-settings-changed", {
|
|
9947
9947
|
detail: {
|
|
9948
|
-
key:
|
|
9949
|
-
tableId:
|
|
9948
|
+
key: o,
|
|
9949
|
+
tableId: n,
|
|
9950
9950
|
settings: null
|
|
9951
9951
|
}
|
|
9952
9952
|
});
|
|
9953
|
-
window.dispatchEvent(
|
|
9954
|
-
} catch (
|
|
9955
|
-
console.warn("Failed to clear table column settings from localStorage:",
|
|
9953
|
+
window.dispatchEvent(l);
|
|
9954
|
+
} catch (l) {
|
|
9955
|
+
console.warn("Failed to clear table column settings from localStorage:", l), message.error(t("Failed to clear table settings"));
|
|
9956
9956
|
}
|
|
9957
|
-
}, [
|
|
9957
|
+
}, [o, n, t]);
|
|
9958
9958
|
return {
|
|
9959
|
-
getSettings:
|
|
9960
|
-
saveSettings:
|
|
9961
|
-
clearSettings:
|
|
9959
|
+
getSettings: r,
|
|
9960
|
+
saveSettings: a,
|
|
9961
|
+
clearSettings: i
|
|
9962
9962
|
};
|
|
9963
9963
|
}, useTableColumnIntegration = (e, t = !0) => {
|
|
9964
|
-
const n =
|
|
9964
|
+
const n = useContext(TableUidContext), { getSettings: o } = useColumnSettings(), [r, a] = useState(0);
|
|
9965
9965
|
useEffect(() => {
|
|
9966
|
-
const
|
|
9967
|
-
const { key:
|
|
9968
|
-
(
|
|
9966
|
+
const c = (u) => {
|
|
9967
|
+
const { key: d, tableId: p } = u.detail;
|
|
9968
|
+
(d.includes(n) || p === n) && a((m) => m + 1);
|
|
9969
9969
|
};
|
|
9970
|
-
return window.addEventListener("nocobase-table-settings-changed",
|
|
9971
|
-
window.removeEventListener("nocobase-table-settings-changed",
|
|
9970
|
+
return window.addEventListener("nocobase-table-settings-changed", c), () => {
|
|
9971
|
+
window.removeEventListener("nocobase-table-settings-changed", c);
|
|
9972
9972
|
};
|
|
9973
|
-
}, [
|
|
9974
|
-
const
|
|
9973
|
+
}, [n]);
|
|
9974
|
+
const i = useMemo(() => o(), [o, r]);
|
|
9975
9975
|
return {
|
|
9976
9976
|
columns: useMemo(() => {
|
|
9977
|
-
if (!t || !
|
|
9977
|
+
if (!t || !i || i.length === 0)
|
|
9978
9978
|
return e;
|
|
9979
|
-
const
|
|
9980
|
-
|
|
9981
|
-
|
|
9979
|
+
const c = /* @__PURE__ */ new Map();
|
|
9980
|
+
i.forEach((h) => {
|
|
9981
|
+
c.set(h.key, h);
|
|
9982
9982
|
});
|
|
9983
|
-
const
|
|
9984
|
-
const
|
|
9985
|
-
if (
|
|
9986
|
-
const
|
|
9987
|
-
return P(x({},
|
|
9988
|
-
columnHidden:
|
|
9989
|
-
fixed:
|
|
9990
|
-
width:
|
|
9991
|
-
_orderIndex:
|
|
9983
|
+
const u = e.map((h) => {
|
|
9984
|
+
const g = c.get(h.key);
|
|
9985
|
+
if (g) {
|
|
9986
|
+
const f = h.columnHidden || !g.visible, C = g.width || h.width, b = g.fixed || h.fixed;
|
|
9987
|
+
return P(x({}, h), {
|
|
9988
|
+
columnHidden: f,
|
|
9989
|
+
fixed: b,
|
|
9990
|
+
width: C,
|
|
9991
|
+
_orderIndex: g.order
|
|
9992
9992
|
});
|
|
9993
9993
|
}
|
|
9994
|
-
return
|
|
9995
|
-
}),
|
|
9996
|
-
|
|
9997
|
-
|
|
9998
|
-
}),
|
|
9999
|
-
const
|
|
10000
|
-
return
|
|
10001
|
-
delete
|
|
10002
|
-
}),
|
|
10003
|
-
}, [e,
|
|
9994
|
+
return h;
|
|
9995
|
+
}), d = [], p = [];
|
|
9996
|
+
u.forEach((h) => {
|
|
9997
|
+
h._orderIndex !== void 0 ? d.push(h) : p.push(h);
|
|
9998
|
+
}), d.sort((h, g) => (h._orderIndex || 0) - (g._orderIndex || 0));
|
|
9999
|
+
const m = [...d, ...p];
|
|
10000
|
+
return m.forEach((h) => {
|
|
10001
|
+
delete h._orderIndex;
|
|
10002
|
+
}), m;
|
|
10003
|
+
}, [e, i])
|
|
10004
10004
|
};
|
|
10005
10005
|
}, TableSkeleton = ({ rows: e = 5, columns: t = 6 }) => {
|
|
10006
10006
|
const { token: n } = useToken$1(), o = n.controlHeight * 2.06, r = n.controlHeight * 1.75, a = useMemo(
|
|
@@ -10869,7 +10869,7 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10869
10869
|
else
|
|
10870
10870
|
u = "__nochildren__";
|
|
10871
10871
|
const d = useMemo(() => createForm(), [i]);
|
|
10872
|
-
return c ? null : /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: { treeTable: i }, children: /* @__PURE__ */ jsx(FormContext.Provider, { value: d, children: /* @__PURE__ */ jsx(BlockProvider, P(x({ name: e.name || "table" }, e), { params: l, runWhenParamsChanged: !0, children: /* @__PURE__ */ jsx(InternalTableBlockProvider, P(x({}, e), { childrenColumnName: u, params: l })) })) }) });
|
|
10872
|
+
return c ? null : /* @__PURE__ */ jsx(TableUidContext.Provider, { value: n["x-uid"], children: /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: { treeTable: i }, children: /* @__PURE__ */ jsx(FormContext.Provider, { value: d, children: /* @__PURE__ */ jsx(BlockProvider, P(x({ name: e.name || "table" }, e), { params: l, runWhenParamsChanged: !0, children: /* @__PURE__ */ jsx(InternalTableBlockProvider, P(x({}, e), { childrenColumnName: u, params: l })) })) }) }) });
|
|
10873
10873
|
}), useTableBlockContext = () => useContext(TableBlockContext), useTableBlockContextBasicValue = () => useContext(TableBlockContextBasicValue), NOOP = () => {
|
|
10874
10874
|
}, CollectOperatorsContext = createContext(null), CollectOperators = (e) => {
|
|
10875
10875
|
const t = useRef(e.defaultOperators || {}), n = useCallback((i, l) => {
|
|
@@ -30076,72 +30076,74 @@ const useCreateActionProps = () => {
|
|
|
30076
30076
|
}, [e, t, n, o]);
|
|
30077
30077
|
}, useEditTableActionProps = () => {
|
|
30078
30078
|
const e = useField(), t = useFieldSchema(), n = useTableColumns$2(), o = useCallback(() => {
|
|
30079
|
-
let
|
|
30080
|
-
for (;
|
|
30081
|
-
const
|
|
30082
|
-
if (!(
|
|
30079
|
+
let h = t;
|
|
30080
|
+
for (; h; ) {
|
|
30081
|
+
const g = (C) => {
|
|
30082
|
+
if (!(C != null && C.properties))
|
|
30083
30083
|
return null;
|
|
30084
|
-
for (const
|
|
30085
|
-
const
|
|
30086
|
-
if (
|
|
30084
|
+
for (const b in C.properties) {
|
|
30085
|
+
const S = C.properties[b];
|
|
30086
|
+
if (S["x-component"] === "TableV2")
|
|
30087
|
+
return S;
|
|
30088
|
+
const y = g(S);
|
|
30089
|
+
if (y)
|
|
30087
30090
|
return y;
|
|
30088
|
-
const v = f(y);
|
|
30089
|
-
if (v)
|
|
30090
|
-
return v;
|
|
30091
30091
|
}
|
|
30092
30092
|
return null;
|
|
30093
|
-
},
|
|
30094
|
-
if (
|
|
30095
|
-
return
|
|
30096
|
-
if (!
|
|
30093
|
+
}, f = g(h);
|
|
30094
|
+
if (f)
|
|
30095
|
+
return f;
|
|
30096
|
+
if (!h.parent)
|
|
30097
30097
|
break;
|
|
30098
|
-
|
|
30098
|
+
h = h.parent;
|
|
30099
30099
|
}
|
|
30100
|
-
return
|
|
30101
|
-
}, [t]), r = useMemo(() => o(), [o])
|
|
30100
|
+
return h;
|
|
30101
|
+
}, [t]), r = useMemo(() => o(), [o]);
|
|
30102
|
+
useMemo(() => (r == null ? void 0 : r["x-uid"]) || "default", [r]);
|
|
30103
|
+
const { getSettings: a, saveSettings: i, clearSettings: l } = useColumnSettings(), [c, u] = useState(a()), d = useMemo(() => {
|
|
30102
30104
|
if (n.length === 0)
|
|
30103
30105
|
return [];
|
|
30104
|
-
if (!
|
|
30106
|
+
if (!c || c.length === 0)
|
|
30105
30107
|
return n;
|
|
30106
|
-
const
|
|
30107
|
-
return
|
|
30108
|
-
|
|
30109
|
-
}), n.map((
|
|
30110
|
-
const
|
|
30111
|
-
return
|
|
30112
|
-
visible:
|
|
30113
|
-
order:
|
|
30114
|
-
width:
|
|
30115
|
-
fixed:
|
|
30116
|
-
}) :
|
|
30117
|
-
}).sort((
|
|
30118
|
-
}, [n,
|
|
30108
|
+
const h = /* @__PURE__ */ new Map();
|
|
30109
|
+
return c.forEach((f) => {
|
|
30110
|
+
h.set(f.key, f);
|
|
30111
|
+
}), n.map((f) => {
|
|
30112
|
+
const C = h.get(f.key);
|
|
30113
|
+
return C ? P(x({}, f), {
|
|
30114
|
+
visible: C.visible,
|
|
30115
|
+
order: C.order,
|
|
30116
|
+
width: C.width || f.width,
|
|
30117
|
+
fixed: C.fixed || f.fixed
|
|
30118
|
+
}) : f;
|
|
30119
|
+
}).sort((f, C) => (f.order || 0) - (C.order || 0));
|
|
30120
|
+
}, [n, c]);
|
|
30119
30121
|
useEffect(() => {
|
|
30120
|
-
|
|
30121
|
-
}, [
|
|
30122
|
-
const
|
|
30123
|
-
(
|
|
30124
|
-
if (!(
|
|
30122
|
+
d.length > 0 && (e.dataSource = d);
|
|
30123
|
+
}, [d, e]);
|
|
30124
|
+
const p = useCallback(
|
|
30125
|
+
(h) => {
|
|
30126
|
+
if (!(h != null && h.columns) || !Array.isArray(h.columns))
|
|
30125
30127
|
return;
|
|
30126
|
-
const
|
|
30127
|
-
key:
|
|
30128
|
-
title:
|
|
30129
|
-
dataIndex:
|
|
30130
|
-
visible:
|
|
30131
|
-
fixed:
|
|
30132
|
-
width:
|
|
30133
|
-
order:
|
|
30128
|
+
const g = h.columns.map((f, C) => ({
|
|
30129
|
+
key: f.key,
|
|
30130
|
+
title: f.title,
|
|
30131
|
+
dataIndex: f.dataIndex,
|
|
30132
|
+
visible: f.visible,
|
|
30133
|
+
fixed: f.fixed,
|
|
30134
|
+
width: f.width,
|
|
30135
|
+
order: C
|
|
30134
30136
|
}));
|
|
30135
|
-
|
|
30137
|
+
i(g);
|
|
30136
30138
|
},
|
|
30137
|
-
[
|
|
30138
|
-
),
|
|
30139
|
-
|
|
30140
|
-
}, [
|
|
30139
|
+
[i]
|
|
30140
|
+
), m = useCallback(() => {
|
|
30141
|
+
l(), u(a());
|
|
30142
|
+
}, [l]);
|
|
30141
30143
|
return {
|
|
30142
|
-
columns:
|
|
30143
|
-
onSubmit:
|
|
30144
|
-
onReset:
|
|
30144
|
+
columns: d,
|
|
30145
|
+
onSubmit: p,
|
|
30146
|
+
onReset: m
|
|
30145
30147
|
};
|
|
30146
30148
|
}, useDetailsPaginationProps = () => {
|
|
30147
30149
|
var r, a, i, l, c, u, d, p, m, h, g, f, C, b, S, y, v;
|
|
@@ -33049,7 +33051,7 @@ const createSubmitActionSettings = new SchemaSettings({
|
|
|
33049
33051
|
l
|
|
33050
33052
|
)) && d.push(!0), t.stateOfLinkageRules = P(x({}, t.stateOfLinkageRules), {
|
|
33051
33053
|
disabled: d
|
|
33052
|
-
}), t.disabled = last(d), t.componentProps.disabled = last(d);
|
|
33054
|
+
}), t.data = t.data || {}, t.data.disabled = last(d), t.componentProps.disabled = last(d);
|
|
33053
33055
|
break;
|
|
33054
33056
|
case ActionType.Active:
|
|
33055
33057
|
(yield conditionAnalyses(
|
|
@@ -33057,13 +33059,13 @@ const createSubmitActionSettings = new SchemaSettings({
|
|
|
33057
33059
|
l
|
|
33058
33060
|
)) ? d.push(!1) : d.push(!!((g = t.componentProps) != null && g.disabled)), t.stateOfLinkageRules = P(x({}, t.stateOfLinkageRules), {
|
|
33059
33061
|
disabled: d
|
|
33060
|
-
}), t.disabled = last(d), t.componentProps.disabled = last(d);
|
|
33062
|
+
}), t.data = t.data || {}, t.data.disabled = last(d), t.componentProps.disabled = last(d);
|
|
33061
33063
|
break;
|
|
33062
33064
|
default:
|
|
33063
33065
|
return null;
|
|
33064
33066
|
}
|
|
33065
33067
|
}), setInitialActionState = (e) => {
|
|
33066
|
-
e.data = e.data || {}, e.display = "visible", e.
|
|
33068
|
+
e.data = e.data || {}, e.display = "visible", e.data.hidden = !1, e.data.disabled = !1, e.componentProps.disabled = !1;
|
|
33067
33069
|
}, MenuGroup = (e) => e.children;
|
|
33068
33070
|
function ButtonEditor$1(e) {
|
|
33069
33071
|
var i, l, c, u, d;
|
|
@@ -40368,7 +40370,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40368
40370
|
element: Z,
|
|
40369
40371
|
disabled: Q,
|
|
40370
40372
|
loading: ne
|
|
40371
|
-
} = (F == null ? void 0 : F(w)) || {}, ee = Y.disabled ||
|
|
40373
|
+
} = (F == null ? void 0 : F(w)) || {}, ee = Y.disabled || ((he = a.data) == null ? void 0 : he.disabled) || I || Q, re = useMemo(() => {
|
|
40372
40374
|
var fe;
|
|
40373
40375
|
return P(x({}, v), {
|
|
40374
40376
|
opacity: r && (((fe = a == null ? void 0 : a.data) == null ? void 0 : fe.hidden) || !X) && 0.1,
|
|
@@ -40515,14 +40517,14 @@ const RenderButton = ({
|
|
|
40515
40517
|
return;
|
|
40516
40518
|
G.preventDefault(), G.stopPropagation();
|
|
40517
40519
|
const U = yield getVariableValue(M(F == null ? void 0 : F.title, { title: E(y.title) }), V), K = yield getVariableValue(M(F == null ? void 0 : F.content, { title: E(y.title) }), V);
|
|
40518
|
-
if (
|
|
40520
|
+
if (!a && n) {
|
|
40519
40521
|
const J = () => {
|
|
40520
40522
|
b ? b(G, () => {
|
|
40521
40523
|
var Z, Q;
|
|
40522
40524
|
S !== !1 && (T == null || T(!0), (Q = (Z = N()) == null ? void 0 : Z.refresh) == null || Q.call(Z));
|
|
40523
40525
|
}) : isBulkEditAction(y) || !j() ? (v(!0), I == null || I()) : ["view", "update", "create", "customize:popup"].includes(y["x-action"]) && y["x-uid"] ? A.current() : (v(!0), I == null || I());
|
|
40524
40526
|
};
|
|
40525
|
-
(F == null ? void 0 : F.enable) !== !1 && (F != null && F.content) ? ((Y = y["x-action-settings"]) != null && Y.skipValidator || (yield (X = z == null ? void 0 : z.submit) == null ? void 0 : X.call(z)), w.confirm({
|
|
40527
|
+
(F == null ? void 0 : F.enable) !== !1 && (F != null && F.content) ? ((Y = y == null ? void 0 : y["x-action-settings"]) != null && Y.skipValidator || (yield (X = z == null ? void 0 : z.submit) == null ? void 0 : X.call(z)), w.confirm({
|
|
40526
40528
|
title: M(U, { title: D || B || (t == null ? void 0 : t.title) }),
|
|
40527
40529
|
content: M(K, { title: D || B || (t == null ? void 0 : t.title) }),
|
|
40528
40530
|
onOk: J
|
|
@@ -55666,7 +55668,10 @@ const supportTypes = ["string", "bigInt", "integer", "uuid", "uid", "nanoid"], S
|
|
|
55666
55668
|
}, OverridingCollectionField = (e) => {
|
|
55667
55669
|
const t = useRecord(), n = useCollectionParentRecordData();
|
|
55668
55670
|
return /* @__PURE__ */ jsx(OverridingFieldAction, x({ item: t, parentItem: n }, e));
|
|
55669
|
-
}, getIsOverriding = (e, t, n) =>
|
|
55671
|
+
}, getIsOverriding = (e, t, n) => {
|
|
55672
|
+
const o = t.find((r) => r.name === n.name);
|
|
55673
|
+
return (o == null ? void 0 : o.collectionName) === e;
|
|
55674
|
+
}, OverridingFieldAction = (e) => {
|
|
55670
55675
|
const { scope: t, getContainer: n, item: o, parentItem: r, children: a, currentCollection: i } = e, { target: l, through: c } = o, { getInterface: u, getCollection: d, getCurrentCollectionFields: p, getChildrenCollections: m, collections: h } = useCollectionManager_deprecated(), [g, f] = useState(!1), [C, b] = useState({}), S = useAPIClient(), { t: y } = useTranslation(), v = useCompile(), I = (j) => {
|
|
55671
55676
|
var O;
|
|
55672
55677
|
return j && ((O = m(j)) == null ? void 0 : O.map(($) => $.name).concat([j]));
|
|
@@ -56047,6 +56052,9 @@ const getSchema$4 = (e, t, n) => {
|
|
|
56047
56052
|
[uid()]: {
|
|
56048
56053
|
type: "void",
|
|
56049
56054
|
"x-component": "Action.Drawer",
|
|
56055
|
+
"x-component-props": {
|
|
56056
|
+
getContainer: o
|
|
56057
|
+
},
|
|
56050
56058
|
"x-decorator": "Form",
|
|
56051
56059
|
"x-decorator-props": {
|
|
56052
56060
|
useValues: "{{ useValuesFromRecord }}"
|
|
@@ -56091,11 +56099,14 @@ const getSchema$4 = (e, t, n) => {
|
|
|
56091
56099
|
};
|
|
56092
56100
|
}, useValuesFromRecord = (e) => {
|
|
56093
56101
|
const t = useRecord(), n = useRequest(
|
|
56094
|
-
() =>
|
|
56095
|
-
|
|
56096
|
-
|
|
56097
|
-
|
|
56098
|
-
|
|
56102
|
+
() => {
|
|
56103
|
+
var r;
|
|
56104
|
+
return Promise.resolve({
|
|
56105
|
+
data: P(x({}, omit$1(cloneDeep(t), ["__parent", "__collectionName"])), {
|
|
56106
|
+
category: (r = t == null ? void 0 : t.category) == null ? void 0 : r.map((a) => a.id)
|
|
56107
|
+
})
|
|
56108
|
+
});
|
|
56109
|
+
},
|
|
56099
56110
|
P(x({}, e), {
|
|
56100
56111
|
manual: !0
|
|
56101
56112
|
})
|
|
@@ -56128,7 +56139,8 @@ const getSchema$4 = (e, t, n) => {
|
|
|
56128
56139
|
const g = i(o.template), f = getSchema$3(
|
|
56129
56140
|
x({}, g),
|
|
56130
56141
|
o,
|
|
56131
|
-
m
|
|
56142
|
+
m,
|
|
56143
|
+
n
|
|
56132
56144
|
);
|
|
56133
56145
|
d(f), c(!0);
|
|
56134
56146
|
}),
|
|
@@ -61260,28 +61272,36 @@ class CollectionPlugin extends Plugin {
|
|
|
61260
61272
|
addFieldInterfaceGroups() {
|
|
61261
61273
|
this.dataSourceManager.addFieldInterfaceGroups({
|
|
61262
61274
|
basic: {
|
|
61263
|
-
label: '{{t("Basic")}}'
|
|
61275
|
+
label: '{{t("Basic")}}',
|
|
61276
|
+
order: 1
|
|
61264
61277
|
},
|
|
61265
61278
|
choices: {
|
|
61266
|
-
label: '{{t("Choices")}}'
|
|
61279
|
+
label: '{{t("Choices")}}',
|
|
61280
|
+
order: 20
|
|
61267
61281
|
},
|
|
61268
61282
|
media: {
|
|
61269
|
-
label: '{{t("Media")}}'
|
|
61283
|
+
label: '{{t("Media")}}',
|
|
61284
|
+
order: 40
|
|
61270
61285
|
},
|
|
61271
61286
|
datetime: {
|
|
61272
|
-
label: '{{t("Date & Time")}}'
|
|
61287
|
+
label: '{{t("Date & Time")}}',
|
|
61288
|
+
order: 80
|
|
61273
61289
|
},
|
|
61274
61290
|
relation: {
|
|
61275
|
-
label: '{{t("Relation")}}'
|
|
61291
|
+
label: '{{t("Relation")}}',
|
|
61292
|
+
order: 100
|
|
61276
61293
|
},
|
|
61277
61294
|
advanced: {
|
|
61278
|
-
label: '{{t("Advanced type")}}'
|
|
61295
|
+
label: '{{t("Advanced type")}}',
|
|
61296
|
+
order: 200
|
|
61279
61297
|
},
|
|
61280
61298
|
systemInfo: {
|
|
61281
|
-
label: '{{t("System info")}}'
|
|
61299
|
+
label: '{{t("System info")}}',
|
|
61300
|
+
order: 400
|
|
61282
61301
|
},
|
|
61283
61302
|
others: {
|
|
61284
|
-
label: '{{t("Others")}}'
|
|
61303
|
+
label: '{{t("Others")}}',
|
|
61304
|
+
order: 800
|
|
61285
61305
|
}
|
|
61286
61306
|
});
|
|
61287
61307
|
}
|