@nocobase/client 1.7.10 → 1.7.13
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.
|
@@ -73,6 +73,12 @@ export declare class CheckboxFieldInterface extends CollectionFieldInterface {
|
|
|
73
73
|
};
|
|
74
74
|
};
|
|
75
75
|
selected?: undefined;
|
|
76
|
+
} | {
|
|
77
|
+
label: string;
|
|
78
|
+
value: string;
|
|
79
|
+
noValue: boolean;
|
|
80
|
+
selected?: undefined;
|
|
81
|
+
schema?: undefined;
|
|
76
82
|
})[];
|
|
77
83
|
};
|
|
78
84
|
schemaInitialize(schema: ISchema, { block }: {
|
|
@@ -211,6 +211,12 @@ export declare const boolean: ({
|
|
|
211
211
|
};
|
|
212
212
|
};
|
|
213
213
|
selected?: undefined;
|
|
214
|
+
} | {
|
|
215
|
+
label: string;
|
|
216
|
+
value: string;
|
|
217
|
+
noValue: boolean;
|
|
218
|
+
selected?: undefined;
|
|
219
|
+
schema?: undefined;
|
|
214
220
|
})[];
|
|
215
221
|
export declare const tableoid: {
|
|
216
222
|
label: string;
|
package/es/index.mjs
CHANGED
|
@@ -5241,7 +5241,9 @@ const date = dayjs(), spaceCSS = css`
|
|
|
5241
5241
|
]
|
|
5242
5242
|
}
|
|
5243
5243
|
}
|
|
5244
|
-
}
|
|
5244
|
+
},
|
|
5245
|
+
{ label: "{{ t('is empty') }}", value: "$empty", noValue: !0 },
|
|
5246
|
+
{ label: "{{ t('is not empty') }}", value: "$notEmpty", noValue: !0 }
|
|
5245
5247
|
], tableoid = [
|
|
5246
5248
|
{
|
|
5247
5249
|
label: '{{t("is any of")}}',
|
|
@@ -8709,7 +8711,7 @@ function addAppVersion(e, t) {
|
|
|
8709
8711
|
addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
|
|
8710
8712
|
}), e;
|
|
8711
8713
|
}
|
|
8712
|
-
const name = "@nocobase/client", version = "1.7.
|
|
8714
|
+
const name = "@nocobase/client", version = "1.7.13", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
8713
8715
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
8714
8716
|
"@ant-design/cssinjs": "^1.11.1",
|
|
8715
8717
|
"@ant-design/icons": "^5.6.1",
|
|
@@ -8730,9 +8732,9 @@ const name = "@nocobase/client", version = "1.7.10", license = "AGPL-3.0", main
|
|
|
8730
8732
|
"@formily/reactive-react": "^2.2.27",
|
|
8731
8733
|
"@formily/shared": "^2.2.27",
|
|
8732
8734
|
"@formily/validator": "^2.2.27",
|
|
8733
|
-
"@nocobase/evaluators": "1.7.
|
|
8734
|
-
"@nocobase/sdk": "1.7.
|
|
8735
|
-
"@nocobase/utils": "1.7.
|
|
8735
|
+
"@nocobase/evaluators": "1.7.13",
|
|
8736
|
+
"@nocobase/sdk": "1.7.13",
|
|
8737
|
+
"@nocobase/utils": "1.7.13",
|
|
8736
8738
|
ahooks: "^3.7.2",
|
|
8737
8739
|
antd: "5.24.2",
|
|
8738
8740
|
"antd-style": "3.7.1",
|
|
@@ -10288,7 +10290,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10288
10290
|
"loading",
|
|
10289
10291
|
"onClickRow",
|
|
10290
10292
|
"value"
|
|
10291
|
-
]), y = useArrayField$1(S), v = useFieldSchema(), { size: F = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, I = useCollection(), R = ((be = v == null ? void 0 : v.parent) == null ? void 0 : be["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: B,
|
|
10293
|
+
]), y = useArrayField$1(S), v = useFieldSchema(), { size: F = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, I = useCollection(), R = ((be = v == null ? void 0 : v.parent) == null ? void 0 : be["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: B, enableIndexColumn: N } = R, $ = useMemoizedFn(S.onRowDragEnd || (() => {
|
|
10292
10294
|
})), L = usePaginationProps$3(n, a, e), w = useTableColumns$2(S, L), [O, j] = useState(() => D ? B : []), [k, M] = useState(((Se = y == null ? void 0 : y.data) == null ? void 0 : Se.selectedRowKeys) || []), [q, E] = useState([]), V = (p == null ? void 0 : p.type) !== "none", G = useRef(/* @__PURE__ */ new Map()), U = useMemo(() => css`
|
|
10293
10295
|
& > td {
|
|
10294
10296
|
background-color: ${t.controlItemBgActive} !important;
|
|
@@ -10509,7 +10511,7 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10509
10511
|
fieldNames: l,
|
|
10510
10512
|
collection: c,
|
|
10511
10513
|
association: u,
|
|
10512
|
-
|
|
10514
|
+
enableIndexColumn: d
|
|
10513
10515
|
} = e, p = useField(), { resource: m, service: h } = useBlockRequestContext(), g = useFieldSchema(), [f, C] = useState(!!(l || i)), { heightProps: b } = useBlockHeightProps(), S = useRef(null);
|
|
10514
10516
|
useEffect(() => {
|
|
10515
10517
|
C(l || i);
|
|
@@ -10550,7 +10552,7 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10550
10552
|
setExpandFlag: v,
|
|
10551
10553
|
heightProps: b,
|
|
10552
10554
|
association: u,
|
|
10553
|
-
|
|
10555
|
+
enableIndexColumn: d
|
|
10554
10556
|
}),
|
|
10555
10557
|
[
|
|
10556
10558
|
y,
|
|
@@ -16380,7 +16382,8 @@ const BlockTemplateContext = createContext({ componentNamePrefix: "" }), BlockTe
|
|
|
16380
16382
|
"polygon",
|
|
16381
16383
|
"circle",
|
|
16382
16384
|
"point",
|
|
16383
|
-
"lineString"
|
|
16385
|
+
"lineString",
|
|
16386
|
+
"vditor"
|
|
16384
16387
|
];
|
|
16385
16388
|
function useTableColumnInitializerFields() {
|
|
16386
16389
|
const { name: e, currentFields: t = [] } = useCollection_deprecated(), { getInterface: n, getCollection: o } = useCollectionManager_deprecated(), a = useFieldSchema()["x-component"] === "AssociationField.SubTable", i = useForm(), l = a ? i.readPretty : !0;
|
|
@@ -22632,13 +22635,18 @@ ReadPretty$c.Input = (e) => {
|
|
|
22632
22635
|
"div",
|
|
22633
22636
|
{
|
|
22634
22637
|
className: cls(t, e.className),
|
|
22635
|
-
style: x({
|
|
22638
|
+
style: x({
|
|
22639
|
+
display: "flex",
|
|
22640
|
+
alignItems: "center",
|
|
22641
|
+
overflowWrap: "break-word",
|
|
22642
|
+
whiteSpace: "normal"
|
|
22643
|
+
}, e.style),
|
|
22636
22644
|
children: [
|
|
22637
|
-
e.addonBefore,
|
|
22638
|
-
e.prefix,
|
|
22645
|
+
n(e.addonBefore),
|
|
22646
|
+
n(e.prefix),
|
|
22639
22647
|
e.ellipsis ? /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: e.ellipsis, children: o }) : o,
|
|
22640
|
-
e.suffix,
|
|
22641
|
-
e.addonAfter
|
|
22648
|
+
n(e.suffix),
|
|
22649
|
+
n(e.addonAfter)
|
|
22642
22650
|
]
|
|
22643
22651
|
}
|
|
22644
22652
|
);
|
|
@@ -24552,7 +24560,6 @@ const useAllAccessDesktopRoutes = () => useContext(AllAccessDesktopRoutesContext
|
|
|
24552
24560
|
padding: 0px 50px;
|
|
24553
24561
|
}
|
|
24554
24562
|
`, className1$1 = css`
|
|
24555
|
-
width: 168px;
|
|
24556
24563
|
height: var(--nb-header-height);
|
|
24557
24564
|
margin-right: 4px;
|
|
24558
24565
|
display: inline-flex;
|
|
@@ -24560,6 +24567,13 @@ const useAllAccessDesktopRoutes = () => useContext(AllAccessDesktopRoutesContext
|
|
|
24560
24567
|
color: #fff;
|
|
24561
24568
|
padding: 0;
|
|
24562
24569
|
align-items: center;
|
|
24570
|
+
`, className1WithFixedWidth = css`
|
|
24571
|
+
${className1$1}
|
|
24572
|
+
width: 168px;
|
|
24573
|
+
`, className1WithAutoWidth = css`
|
|
24574
|
+
${className1$1}
|
|
24575
|
+
width: auto;
|
|
24576
|
+
min-width: 168px;
|
|
24563
24577
|
`, className2 = css`
|
|
24564
24578
|
object-fit: contain;
|
|
24565
24579
|
width: 100%;
|
|
@@ -24599,9 +24613,9 @@ const LayoutContent = () => {
|
|
|
24599
24613
|
/* @__PURE__ */ jsx(ShowTipWhenNoPages, {})
|
|
24600
24614
|
] }) });
|
|
24601
24615
|
}, NocoBaseLogo = () => {
|
|
24602
|
-
var
|
|
24603
|
-
const e = useSystemSettings(), { token: t } = useToken(), n = useMemo(() => ({ fontSize: t.fontSizeHeading3 }), [t.fontSizeHeading3]), o = (
|
|
24604
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
24616
|
+
var a, i, l, c, u, d, p, m;
|
|
24617
|
+
const e = useSystemSettings(), { token: t } = useToken(), n = useMemo(() => ({ fontSize: t.fontSizeHeading3 }), [t.fontSizeHeading3]), o = (l = (i = (a = e == null ? void 0 : e.data) == null ? void 0 : a.data) == null ? void 0 : i.logo) == null ? void 0 : l.url, r = o ? /* @__PURE__ */ jsx("img", { className: className2, src: (d = (u = (c = e == null ? void 0 : e.data) == null ? void 0 : c.data) == null ? void 0 : u.logo) == null ? void 0 : d.url }) : /* @__PURE__ */ jsx("span", { style: n, className: className3, children: (m = (p = e == null ? void 0 : e.data) == null ? void 0 : p.data) == null ? void 0 : m.title });
|
|
24618
|
+
return /* @__PURE__ */ jsx("div", { className: o ? className1WithFixedWidth : className1WithAutoWidth, children: e != null && e.loading ? null : r });
|
|
24605
24619
|
}, MenuSchemaToolbarWithContainer = () => {
|
|
24606
24620
|
const e = useRef(null), [t, n] = React.useState(null);
|
|
24607
24621
|
return useEffect(() => {
|
|
@@ -30251,7 +30265,7 @@ const DragHandler = (e) => {
|
|
|
30251
30265
|
Select$1,
|
|
30252
30266
|
{
|
|
30253
30267
|
value: t == null ? void 0 : t.unit,
|
|
30254
|
-
style: { maxWidth: 140
|
|
30268
|
+
style: { maxWidth: 140 },
|
|
30255
30269
|
onChange: (d) => {
|
|
30256
30270
|
const p = P(x({}, t), {
|
|
30257
30271
|
unit: d
|
|
@@ -30263,7 +30277,8 @@ const DragHandler = (e) => {
|
|
|
30263
30277
|
{ value: "week", label: r("Calendar week") },
|
|
30264
30278
|
{ value: "month", label: r("Calendar Month") },
|
|
30265
30279
|
{ value: "year", label: r("Calendar Year") }
|
|
30266
|
-
]
|
|
30280
|
+
],
|
|
30281
|
+
popupMatchSelectWidth: !0
|
|
30267
30282
|
},
|
|
30268
30283
|
"unit"
|
|
30269
30284
|
)
|
|
@@ -34079,14 +34094,14 @@ const expendableActionSettings = new SchemaSettings({
|
|
|
34079
34094
|
options: d,
|
|
34080
34095
|
value: ((h = l["x-component-props"]) == null ? void 0 : h.component) || ((g = d[0]) == null ? void 0 : g.value),
|
|
34081
34096
|
onChange(f) {
|
|
34082
|
-
var
|
|
34083
|
-
const C = d.find((
|
|
34097
|
+
var y;
|
|
34098
|
+
const C = d.find((v) => v.value === f), b = ((y = C == null ? void 0 : C.useProps) == null ? void 0 : y.call(C)) || {}, S = x(x({
|
|
34084
34099
|
component: f
|
|
34085
|
-
},
|
|
34086
|
-
_.set(l, "x-component-props",
|
|
34100
|
+
}, b), f === o.uiSchema["x-component"] ? o.uiSchema["x-component-props"] : {});
|
|
34101
|
+
_.set(l, "x-component-props", S), t.componentProps = S, c.emit("patch", {
|
|
34087
34102
|
schema: {
|
|
34088
34103
|
"x-uid": l["x-uid"],
|
|
34089
|
-
"x-component-props":
|
|
34104
|
+
"x-component-props": S
|
|
34090
34105
|
}
|
|
34091
34106
|
});
|
|
34092
34107
|
}
|
|
@@ -35346,9 +35361,9 @@ const enabledIndexColumn$1 = {
|
|
|
35346
35361
|
const e = useField(), t = useFieldSchema(), { t: n } = useTranslation(), { dn: o } = useDesignable();
|
|
35347
35362
|
return {
|
|
35348
35363
|
title: n("Enable index column"),
|
|
35349
|
-
checked: e.decoratorProps.
|
|
35364
|
+
checked: e.decoratorProps.enableIndexColumn !== !1,
|
|
35350
35365
|
onChange: (r) => z(void 0, null, function* () {
|
|
35351
|
-
e.decoratorProps = e.decoratorProps || {}, e.decoratorProps.
|
|
35366
|
+
e.decoratorProps = e.decoratorProps || {}, e.decoratorProps.enableIndexColumn = r, t["x-decorator-props"].enableIndexColumn = r, o.emit("patch", {
|
|
35352
35367
|
schema: {
|
|
35353
35368
|
"x-uid": t["x-uid"],
|
|
35354
35369
|
"x-decorator-props": t["x-decorator-props"]
|
|
@@ -37693,9 +37708,9 @@ const dividerSettings = new SchemaSettings({
|
|
|
37693
37708
|
const e = useField(), t = useFieldSchema(), { t: n } = useTranslation(), { dn: o } = useDesignable();
|
|
37694
37709
|
return {
|
|
37695
37710
|
title: n("Enable index column"),
|
|
37696
|
-
checked: e.componentProps.
|
|
37711
|
+
checked: e.componentProps.enableIndexColumn !== !1,
|
|
37697
37712
|
onChange: (r) => z(void 0, null, function* () {
|
|
37698
|
-
e.componentProps = e.componentProps || {}, e.componentProps.
|
|
37713
|
+
e.componentProps = e.componentProps || {}, e.componentProps.enableIndexColumn = r, t["x-component-props"].enableIndexColumn = r, o.emit("patch", {
|
|
37699
37714
|
schema: {
|
|
37700
37715
|
"x-uid": t["x-uid"],
|
|
37701
37716
|
"x-component-props": t["x-component-props"]
|
|
@@ -43128,8 +43143,8 @@ const Upload = connect(
|
|
|
43128
43143
|
);
|
|
43129
43144
|
Upload.ReadPretty = ReadPretty$9;
|
|
43130
43145
|
function useSizeHint(e) {
|
|
43131
|
-
const t = e != null ? e : FILE_SIZE_LIMIT_DEFAULT, { t: n, i18n: o } = useTranslation();
|
|
43132
|
-
return
|
|
43146
|
+
const t = e != null ? e : FILE_SIZE_LIMIT_DEFAULT, { t: n, i18n: o } = useTranslation(), r = filesize(t, { base: 2, standard: "jedec", locale: o.language });
|
|
43147
|
+
return t !== 0 ? n("File size should not exceed {{size}}.", { size: r }) : "";
|
|
43133
43148
|
}
|
|
43134
43149
|
function DefaultThumbnailPreviewer({ file: e }) {
|
|
43135
43150
|
var r;
|
|
@@ -44034,7 +44049,11 @@ const InternalNesterCardCss = css`
|
|
|
44034
44049
|
}, N = () => {
|
|
44035
44050
|
const k = (f == null ? void 0 : f.targetKey) || "id", M = T.map((E) => E[k]).filter(Boolean);
|
|
44036
44051
|
return M.length ? { $and: [{ [`${k}.$ne`]: M }] } : {};
|
|
44037
|
-
}
|
|
44052
|
+
};
|
|
44053
|
+
useEffect(() => {
|
|
44054
|
+
t || F([]);
|
|
44055
|
+
}, [t]);
|
|
44056
|
+
const $ = () => {
|
|
44038
44057
|
const { setVisible: k } = useActionContext(), { multiple: M, selectedRows: q, onChange: E, options: V, collectionField: G } = useContext(RecordPickerContext);
|
|
44039
44058
|
return {
|
|
44040
44059
|
onClick() {
|
|
@@ -44460,76 +44479,95 @@ const defaultModeToComponent = {
|
|
|
44460
44479
|
return /* @__PURE__ */ jsx(AssociationFieldModeContext.Provider, { value: a, children: e.children });
|
|
44461
44480
|
}, useAssociationFieldModeContext = () => React.useContext(AssociationFieldModeContext), AssociationFieldProvider = observer$1(
|
|
44462
44481
|
(e) => {
|
|
44463
|
-
var
|
|
44464
|
-
const t = useField(), n = useCollectionManager(), o = useFieldSchema(), r = useAPIClient();
|
|
44482
|
+
var S, y, v;
|
|
44483
|
+
const t = useField(), n = useCollectionManager(), o = useFieldSchema(), r = useAPIClient(), a = useSchemaOptionsContext(), i = useRef(null);
|
|
44465
44484
|
useSchemaComponentContext();
|
|
44466
|
-
const
|
|
44485
|
+
const l = ((S = o["x-component-props"]) == null ? void 0 : S.multiple) !== !1, c = ((y = o["x-component-props"]) == null ? void 0 : y.allowDissociate) !== !1, u = useMemo(
|
|
44467
44486
|
() => n.getCollectionField(o["x-collection-field"]),
|
|
44468
44487
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
44469
44488
|
[o["x-collection-field"], o.name]
|
|
44470
|
-
),
|
|
44489
|
+
), d = useMemo(
|
|
44471
44490
|
() => {
|
|
44472
|
-
var
|
|
44473
|
-
return ((
|
|
44491
|
+
var F;
|
|
44492
|
+
return ((F = n.getCollection(u == null ? void 0 : u.target)) == null ? void 0 : F.template) === "file";
|
|
44474
44493
|
},
|
|
44475
44494
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
44476
44495
|
[o["x-collection-field"]]
|
|
44477
|
-
),
|
|
44496
|
+
), p = useMemo(
|
|
44478
44497
|
() => {
|
|
44479
|
-
var
|
|
44480
|
-
return ((
|
|
44498
|
+
var F;
|
|
44499
|
+
return ((F = o["x-component-props"]) == null ? void 0 : F.mode) || (d ? "FileManager" : "Select");
|
|
44481
44500
|
},
|
|
44482
44501
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
44483
|
-
[(
|
|
44484
|
-
), [
|
|
44502
|
+
[(v = o["x-component-props"]) == null ? void 0 : v.mode]
|
|
44503
|
+
), [m, h] = useState(!t.readPretty), { loading: g, run: f } = useRequest(
|
|
44485
44504
|
() => {
|
|
44486
|
-
var
|
|
44487
|
-
const
|
|
44488
|
-
if (!o.default || !["Picker", "Select"].includes(
|
|
44505
|
+
var T;
|
|
44506
|
+
const F = u.targetKey;
|
|
44507
|
+
if (!o.default || !["Picker", "Select"].includes(p) || !_.isObject(o.default))
|
|
44489
44508
|
return Promise.reject(null);
|
|
44490
|
-
const
|
|
44491
|
-
return _.isUndefined(
|
|
44492
|
-
resource:
|
|
44493
|
-
action: Array.isArray(
|
|
44494
|
-
headers: getDataSourceHeaders((
|
|
44509
|
+
const I = Array.isArray(o.default) ? o.default.map((R) => R[F]) : o.default[F];
|
|
44510
|
+
return _.isUndefined(I) || _.isNil(I) || _.isNaN(I) ? Promise.reject(null) : r.request({
|
|
44511
|
+
resource: u.target,
|
|
44512
|
+
action: Array.isArray(I) ? "list" : "get",
|
|
44513
|
+
headers: getDataSourceHeaders((T = n == null ? void 0 : n.dataSource) == null ? void 0 : T.key),
|
|
44495
44514
|
params: {
|
|
44496
44515
|
filter: {
|
|
44497
|
-
[
|
|
44516
|
+
[F]: I
|
|
44498
44517
|
}
|
|
44499
44518
|
}
|
|
44500
44519
|
});
|
|
44501
44520
|
},
|
|
44502
44521
|
{
|
|
44503
44522
|
manual: !0,
|
|
44504
|
-
onSuccess(
|
|
44505
|
-
var
|
|
44506
|
-
t.initialValue = (
|
|
44523
|
+
onSuccess(F) {
|
|
44524
|
+
var I;
|
|
44525
|
+
t.initialValue = (I = F == null ? void 0 : F.data) == null ? void 0 : I.data;
|
|
44507
44526
|
}
|
|
44508
44527
|
}
|
|
44509
|
-
), { active:
|
|
44510
|
-
|
|
44511
|
-
var
|
|
44512
|
-
if (
|
|
44513
|
-
if (
|
|
44514
|
-
|
|
44528
|
+
), { active: C } = useKeepAlive();
|
|
44529
|
+
if (useEffect(() => {
|
|
44530
|
+
var F;
|
|
44531
|
+
if (C) {
|
|
44532
|
+
if (h(!0), !u) {
|
|
44533
|
+
h(!1);
|
|
44515
44534
|
return;
|
|
44516
44535
|
}
|
|
44517
|
-
if (["Picker", "Select"].includes(
|
|
44518
|
-
var
|
|
44519
|
-
return delete
|
|
44536
|
+
if (["Picker", "Select"].includes(p) && o.default && f(), t.value && t.form.__template && ["Nester", "SubTable", "PopoverNester"].includes(p) && (["belongsTo", "hasOne"].includes(u.type) ? ((F = t.value) != null && F[u.targetKey] && delete t.value[u.targetKey], t.value = x(x({}, t.initialValue), t.value)) : ["belongsToMany", "hasMany"].includes(u.type) && Array.isArray(t.value) && (t.value = t.value.map((I) => {
|
|
44537
|
+
var T;
|
|
44538
|
+
return delete I[u.targetKey], x(x({}, (T = t.initialValue) == null ? void 0 : T[0]), I);
|
|
44520
44539
|
}))), t.value !== null && t.value !== void 0) {
|
|
44521
|
-
["Nester", "PopoverNester"].includes(
|
|
44540
|
+
["Nester", "PopoverNester"].includes(p) && Array.isArray(t.value) && t.value.length === 0 && ["belongsToMany", "hasMany", "belongsToArray"].includes(u.type) && (t.value = [markRecordAsNew({})]), h(!1);
|
|
44522
44541
|
return;
|
|
44523
44542
|
}
|
|
44524
|
-
["Nester"].includes(
|
|
44543
|
+
["Nester"].includes(p) && (["belongsTo", "hasOne"].includes(u.type) ? t.value = {} : ["belongsToMany", "hasMany", "belongsToArray"].includes(u.type) && (t.value = [markRecordAsNew({})])), p === "SubTable" && (t.value = []), h(!1);
|
|
44525
44544
|
}
|
|
44526
|
-
}, [
|
|
44545
|
+
}, [p, u, t, C]), m || g)
|
|
44546
|
+
return null;
|
|
44547
|
+
const b = P(x({}, a.components), {
|
|
44548
|
+
FormItem: (F) => /* @__PURE__ */ jsx(
|
|
44549
|
+
FormItem,
|
|
44550
|
+
P(x({}, F), {
|
|
44551
|
+
getPopupContainer: (I) => i.current || document.body
|
|
44552
|
+
})
|
|
44553
|
+
)
|
|
44554
|
+
});
|
|
44555
|
+
return u ? /* @__PURE__ */ jsx("div", { ref: i, children: /* @__PURE__ */ jsx(
|
|
44527
44556
|
AssociationFieldContext.Provider,
|
|
44528
44557
|
{
|
|
44529
|
-
value: { options:
|
|
44530
|
-
children:
|
|
44558
|
+
value: { options: u, field: t, fieldSchema: o, allowMultiple: l, allowDissociate: c, currentMode: p },
|
|
44559
|
+
children: /* @__PURE__ */ jsx(
|
|
44560
|
+
SchemaOptionsContext.Provider,
|
|
44561
|
+
{
|
|
44562
|
+
value: {
|
|
44563
|
+
components: b,
|
|
44564
|
+
scope: a.scope
|
|
44565
|
+
},
|
|
44566
|
+
children: e.children
|
|
44567
|
+
}
|
|
44568
|
+
)
|
|
44531
44569
|
}
|
|
44532
|
-
) : null;
|
|
44570
|
+
) }) : null;
|
|
44533
44571
|
},
|
|
44534
44572
|
{ displayName: "AssociationFieldProvider" }
|
|
44535
44573
|
), InternalField = (e) => {
|
|
@@ -45474,7 +45512,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
45474
45512
|
onExpand: g,
|
|
45475
45513
|
loading: f,
|
|
45476
45514
|
onClickRow: C,
|
|
45477
|
-
|
|
45515
|
+
enableIndexColumn: b
|
|
45478
45516
|
} = ce, S = W(ce, [
|
|
45479
45517
|
"dragSort",
|
|
45480
45518
|
"showIndex",
|
|
@@ -45486,7 +45524,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
45486
45524
|
"onExpand",
|
|
45487
45525
|
"loading",
|
|
45488
45526
|
"onClickRow",
|
|
45489
|
-
"
|
|
45527
|
+
"enableIndexColumn"
|
|
45490
45528
|
]), y = useArrayField(S), v = useFieldSchema(), { size: F = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, I = useCollection(), R = ((Ce = v == null ? void 0 : v.parent) == null ? void 0 : Ce["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: B } = R, N = useMemoizedFn(S.onRowDragEnd || (() => {
|
|
45491
45529
|
})), $ = usePaginationProps$2(n, a), L = useTableColumns$1(S, $), [w, O] = useState(() => D ? B : []), [j, k] = useState(((be = y == null ? void 0 : y.data) == null ? void 0 : be.selectedRowKeys) || []), [M, q] = useState([]), E = (p == null ? void 0 : p.type) !== "none", V = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
|
|
45492
45530
|
& > td {
|
|
@@ -45714,7 +45752,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
45714
45752
|
`, SubTable = observer$1(
|
|
45715
45753
|
(e) => {
|
|
45716
45754
|
var k, M, q;
|
|
45717
|
-
const { openSize: t } = e, { field: n, options: o, fieldSchema: r } = useAssociationFieldContext(), { t: a } = useTranslation(), [i, l] = useState(!1), [c, u] = useState([]), d = useFieldNames$1(e), p = useFieldSchema(), m = useCompile(), h = useLabelUiSchema$1(o, (d == null ? void 0 : d.label) || "label"), g = useCollectionRecord(), f = useCollection(), { allowSelectExistingRecord: C, allowAddnew: b, allowDisassociation: S,
|
|
45755
|
+
const { openSize: t } = e, { field: n, options: o, fieldSchema: r } = useAssociationFieldContext(), { t: a } = useTranslation(), [i, l] = useState(!1), [c, u] = useState([]), d = useFieldNames$1(e), p = useFieldSchema(), m = useCompile(), h = useLabelUiSchema$1(o, (d == null ? void 0 : d.label) || "label"), g = useCollectionRecord(), f = useCollection(), { allowSelectExistingRecord: C, allowAddnew: b, allowDisassociation: S, enableIndexColumn: y } = n.componentProps;
|
|
45718
45756
|
useSubTableSpecialCase({ rootField: n, rootSchema: r });
|
|
45719
45757
|
const v = (E, V) => {
|
|
45720
45758
|
if (V !== void 0 && isArr(n.value) && E !== V)
|
|
@@ -45810,7 +45848,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
45810
45848
|
n.editable ? a("Please add or select record") : a("No data")
|
|
45811
45849
|
] })
|
|
45812
45850
|
},
|
|
45813
|
-
|
|
45851
|
+
enableIndexColumn: y !== !1,
|
|
45814
45852
|
footer: () => /* @__PURE__ */ jsx("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: n.editable && /* @__PURE__ */ jsxs(
|
|
45815
45853
|
Space$1,
|
|
45816
45854
|
{
|
|
@@ -50243,7 +50281,7 @@ const TableActionColumnDesigner = (e) => {
|
|
|
50243
50281
|
title: u("Enable index column"),
|
|
50244
50282
|
checked: ((N = r.decoratorProps) == null ? void 0 : N.enableSelectColumn) !== !1,
|
|
50245
50283
|
onChange: (k) => z(void 0, null, function* () {
|
|
50246
|
-
r.decoratorProps = r.decoratorProps || {}, r.decoratorProps.
|
|
50284
|
+
r.decoratorProps = r.decoratorProps || {}, r.decoratorProps.enableIndexColumn = k, a["x-decorator-props"].enableIndexColumn = k, d.emit("patch", {
|
|
50247
50285
|
schema: {
|
|
50248
50286
|
"x-uid": a["x-uid"],
|
|
50249
50287
|
"x-decorator-props": a["x-decorator-props"]
|
|
@@ -52796,7 +52834,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
52796
52834
|
});
|
|
52797
52835
|
S(T == null ? void 0 : T.data);
|
|
52798
52836
|
const R = l(o.interface), D = cloneDeep(T == null ? void 0 : T.data) || {};
|
|
52799
|
-
D != null && D.reverseField
|
|
52837
|
+
D != null && D.reverseField ? D.autoCreateReverseField = !0 : (D.autoCreateReverseField = !1, D.reverseField = (N = R == null ? void 0 : R.default) == null ? void 0 : N.reverseField, set$1(D.reverseField, "name", `f_${uid()}`), set$1(D.reverseField, "uiSchema.title", ($ = o.__parent) == null ? void 0 : $.title));
|
|
52800
52838
|
const B = getSchema$7(R, D, o, C);
|
|
52801
52839
|
h(B), p(!0);
|
|
52802
52840
|
}),
|
|
@@ -58011,7 +58049,10 @@ class InheritanceCollectionMixin extends Collection {
|
|
|
58011
58049
|
return l > 0 && (r.splice(l), r.forEach((u) => {
|
|
58012
58050
|
const d = this.collectionManager.getCollection(u);
|
|
58013
58051
|
c = c.concat(d.getCurrentFields());
|
|
58014
|
-
})), this.parentCollectionFields[n] = i.filter((u) =>
|
|
58052
|
+
})), this.parentCollectionFields[n] = i.filter((u) => {
|
|
58053
|
+
const d = c.find((p) => p.name === u.name);
|
|
58054
|
+
return (d == null ? void 0 : d.collectionName) !== this.name;
|
|
58055
|
+
}), this.parentCollectionFields[n];
|
|
58015
58056
|
}
|
|
58016
58057
|
getAllCollectionsInheritChain() {
|
|
58017
58058
|
if (this.allCollectionsInheritChain)
|