@nocobase/client 2.0.31 → 2.0.33
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.
|
@@ -17,6 +17,13 @@ import { DetailsGridModel } from './DetailsGridModel';
|
|
|
17
17
|
* @param idx Form.List 的索引
|
|
18
18
|
*/
|
|
19
19
|
export declare function getValueWithIndex(record: any, fieldPath: string, idx?: string[]): any;
|
|
20
|
+
export declare function getDetailsItemValue(options: {
|
|
21
|
+
record: any;
|
|
22
|
+
currentObject?: any;
|
|
23
|
+
fieldPath: string;
|
|
24
|
+
prefixFieldPath?: string;
|
|
25
|
+
idx?: string[];
|
|
26
|
+
}): any;
|
|
20
27
|
export declare class DetailsItemModel extends DisplayItemModel<{
|
|
21
28
|
parent: DetailsGridModel;
|
|
22
29
|
subModels: {
|
package/es/index.mjs
CHANGED
|
@@ -80,7 +80,7 @@ import { ErrorBoundary } from "react-error-boundary";
|
|
|
80
80
|
import * as reactI18next from "react-i18next";
|
|
81
81
|
import { useTranslation, initReactI18next, Trans, I18nextProvider } from "react-i18next";
|
|
82
82
|
import * as nocobaseSDK from "@nocobase/sdk";
|
|
83
|
-
import { APIClient as APIClient$1, getSubAppName } from "@nocobase/sdk";
|
|
83
|
+
import { APIClient as APIClient$1, hasHeaderValue, getSubAppName } from "@nocobase/sdk";
|
|
84
84
|
import get$1 from "lodash/get";
|
|
85
85
|
import merge$1 from "lodash/merge";
|
|
86
86
|
import set$1 from "lodash/set";
|
|
@@ -3777,6 +3777,9 @@ const bp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3777
3777
|
get getDefaultOperator() {
|
|
3778
3778
|
return getDefaultOperator;
|
|
3779
3779
|
},
|
|
3780
|
+
get getDetailsItemValue() {
|
|
3781
|
+
return getDetailsItemValue;
|
|
3782
|
+
},
|
|
3780
3783
|
get getDisplayNumber() {
|
|
3781
3784
|
return getDisplayNumber;
|
|
3782
3785
|
},
|
|
@@ -3813,6 +3816,12 @@ const bp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3813
3816
|
get getRenderContent() {
|
|
3814
3817
|
return getRenderContent;
|
|
3815
3818
|
},
|
|
3819
|
+
get getSchemaSettingsConfirmZIndex() {
|
|
3820
|
+
return getSchemaSettingsConfirmZIndex;
|
|
3821
|
+
},
|
|
3822
|
+
get getSchemaSettingsDialogZIndex() {
|
|
3823
|
+
return getSchemaSettingsDialogZIndex;
|
|
3824
|
+
},
|
|
3816
3825
|
get getShouldChange() {
|
|
3817
3826
|
return getShouldChange;
|
|
3818
3827
|
},
|
|
@@ -5280,7 +5289,7 @@ class APIClient extends APIClient$1 {
|
|
|
5280
5289
|
o.headers["X-With-ACL-Meta"] = !0;
|
|
5281
5290
|
const n = this.getHeaders();
|
|
5282
5291
|
return Object.keys(n).forEach((r) => {
|
|
5283
|
-
o.headers
|
|
5292
|
+
hasHeaderValue(o.headers, r) || (o.headers[r] = n[r]);
|
|
5284
5293
|
}), o;
|
|
5285
5294
|
}), super.interceptors(), this.useNotificationMiddleware(), this.axios.interceptors.response.use(
|
|
5286
5295
|
(o) => o,
|
|
@@ -9964,7 +9973,7 @@ function addAppVersion(e, t) {
|
|
|
9964
9973
|
addAppVersion((n = e.properties) == null ? void 0 : n[o], t);
|
|
9965
9974
|
}), e;
|
|
9966
9975
|
}
|
|
9967
|
-
const name = "@nocobase/client", version = "2.0.
|
|
9976
|
+
const name = "@nocobase/client", version = "2.0.33", license = "Apache-2.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
9968
9977
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
9969
9978
|
"@ant-design/cssinjs": "^1.11.1",
|
|
9970
9979
|
"@ant-design/icons": "^5.6.1",
|
|
@@ -9987,10 +9996,10 @@ const name = "@nocobase/client", version = "2.0.31", license = "Apache-2.0", mai
|
|
|
9987
9996
|
"@formily/reactive-react": "^2.2.27",
|
|
9988
9997
|
"@formily/shared": "^2.2.27",
|
|
9989
9998
|
"@formily/validator": "^2.2.27",
|
|
9990
|
-
"@nocobase/evaluators": "2.0.
|
|
9991
|
-
"@nocobase/flow-engine": "2.0.
|
|
9992
|
-
"@nocobase/sdk": "2.0.
|
|
9993
|
-
"@nocobase/utils": "2.0.
|
|
9999
|
+
"@nocobase/evaluators": "2.0.33",
|
|
10000
|
+
"@nocobase/flow-engine": "2.0.33",
|
|
10001
|
+
"@nocobase/sdk": "2.0.33",
|
|
10002
|
+
"@nocobase/utils": "2.0.33",
|
|
9994
10003
|
"@tanstack/react-table": "^8.21.3",
|
|
9995
10004
|
"@types/tabulator-tables": "^6.2.6",
|
|
9996
10005
|
"acorn-jsx": "^5.3.2",
|
|
@@ -23217,8 +23226,8 @@ const findGridSchema = (e) => e.reduceProperties((t, o) => {
|
|
|
23217
23226
|
type: "divider"
|
|
23218
23227
|
};
|
|
23219
23228
|
return t(n), null;
|
|
23220
|
-
}, SchemaSettingsRemove = (e) => {
|
|
23221
|
-
const { disabled: t, confirm: o, title: n, removeParentsIfNoChildren: r, breakRemoveOn: i } = e, { dn: a, template: l } = useSchemaSettings(), { t: c } = useTranslation(), u = useField(), d = useCompile(), p = useFieldSchema(), m = useBlockTemplateContext(), h = useForm(), { modal: g } = App.useApp(), { removeActiveFieldName: f } = useFormActiveFields() || {}, { removeDataBlock: y } = useFilterBlock();
|
|
23229
|
+
}, getSchemaSettingsDialogZIndex = (e) => Math.max(getZIndex("modal", e + 10, 0), ICON_POPUP_Z_INDEX + 200), getSchemaSettingsConfirmZIndex = (e) => Math.max(getZIndex("modal", e, 1), 1e3), SchemaSettingsRemove = (e) => {
|
|
23230
|
+
const { disabled: t, confirm: o, title: n, removeParentsIfNoChildren: r, breakRemoveOn: i } = e, { dn: a, template: l } = useSchemaSettings(), { t: c } = useTranslation(), u = useField(), d = useCompile(), p = useFieldSchema(), m = useBlockTemplateContext(), h = useForm(), { modal: g } = App.useApp(), { removeActiveFieldName: f } = useFormActiveFields() || {}, { removeDataBlock: y } = useFilterBlock(), b = useZIndexContext(), S = getSchemaSettingsConfirmZIndex(b);
|
|
23222
23231
|
return /* @__PURE__ */ jsx(
|
|
23223
23232
|
SchemaSettingsItem,
|
|
23224
23233
|
{
|
|
@@ -23228,18 +23237,19 @@ const findGridSchema = (e) => e.reduceProperties((t, o) => {
|
|
|
23228
23237
|
onClick: () => {
|
|
23229
23238
|
g.confirm(A(x({
|
|
23230
23239
|
title: n ? d(n) : c("Delete block"),
|
|
23231
|
-
content: c("Are you sure you want to delete it?")
|
|
23240
|
+
content: c("Are you sure you want to delete it?"),
|
|
23241
|
+
zIndex: S
|
|
23232
23242
|
}, o), {
|
|
23233
23243
|
onOk() {
|
|
23234
23244
|
return L(this, null, function* () {
|
|
23235
|
-
var
|
|
23236
|
-
const
|
|
23245
|
+
var P;
|
|
23246
|
+
const F = {
|
|
23237
23247
|
removeParentsIfNoChildren: r,
|
|
23238
23248
|
breakRemoveOn: i
|
|
23239
23249
|
};
|
|
23240
|
-
u != null && u.required && (u.required = !1, p.required = !1), l && l.uid === p["x-uid"] && (m != null && m.dn) ? yield m == null ? void 0 : m.dn.remove(null,
|
|
23241
|
-
var
|
|
23242
|
-
(
|
|
23250
|
+
u != null && u.required && (u.required = !1, p.required = !1), l && l.uid === p["x-uid"] && (m != null && m.dn) ? yield m == null ? void 0 : m.dn.remove(null, F) : yield a.remove(null, F), yield (P = o == null ? void 0 : o.onOk) == null ? void 0 : P.call(o), delete h.values[p.name], a.refresh({ refreshParentSchema: !0 }), f == null || f(p.name), h == null || h.query(new RegExp(`${p.parent.name}.${p.name}$`)).forEach((v) => {
|
|
23251
|
+
var k, I;
|
|
23252
|
+
(k = v.setValue) == null || k.call(v, void 0), (I = v.setInitialValue) == null || I.call(v, void 0);
|
|
23243
23253
|
}), y(p["x-uid"]);
|
|
23244
23254
|
});
|
|
23245
23255
|
}
|
|
@@ -23395,7 +23405,7 @@ const SchemaSettingsSwitchItem = (e) => {
|
|
|
23395
23405
|
});
|
|
23396
23406
|
SchemaSettingsActionModalItem.displayName = "SchemaSettingsActionModalItem";
|
|
23397
23407
|
const SchemaSettingsModalItem = (e) => {
|
|
23398
|
-
const
|
|
23408
|
+
const X = e, {
|
|
23399
23409
|
hidden: t,
|
|
23400
23410
|
title: o,
|
|
23401
23411
|
components: n,
|
|
@@ -23406,9 +23416,9 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
23406
23416
|
initialValues: c,
|
|
23407
23417
|
width: u = "fit-content",
|
|
23408
23418
|
noRecord: d = !1,
|
|
23409
|
-
ModalContextProvider: p = (
|
|
23419
|
+
ModalContextProvider: p = (Q) => /* @__PURE__ */ jsx(Fragment$1, { children: Q.children }),
|
|
23410
23420
|
dialogRootClassName: m
|
|
23411
|
-
} =
|
|
23421
|
+
} = X, h = ee(X, [
|
|
23412
23422
|
"hidden",
|
|
23413
23423
|
"title",
|
|
23414
23424
|
"components",
|
|
@@ -23421,34 +23431,35 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
23421
23431
|
"noRecord",
|
|
23422
23432
|
"ModalContextProvider",
|
|
23423
23433
|
"dialogRootClassName"
|
|
23424
|
-
]), g = useContext(SchemaOptionsContext), f = useCollection(), y = useAPIClient(), b = useApp(), { theme: S } = useGlobalTheme(), C = useBlockRequestContext(), F = useFormActiveFields(), { locale: P } = useContext(ConfigProvider.ConfigContext), v = useDataSourceManager(), k = useDataSourceKey(), I = useCollectionRecord(), { association: M } = useDataBlockProps() || {}, E = useCurrentRecord(), $ = useFormBlockContext(), D = useBlockContext(), { getOperators: T } = useOperators(), w = useLocationSearch(), B = useVariables$1(), N = useContext(AllDataBlocksContext), j = useContext(SchemaComponentContext), O = useContext(VariableScopeContext$1), { formValue:
|
|
23434
|
+
]), g = useContext(SchemaOptionsContext), f = useCollection(), y = useAPIClient(), b = useApp(), { theme: S } = useGlobalTheme(), C = useBlockRequestContext(), F = useFormActiveFields(), { locale: P } = useContext(ConfigProvider.ConfigContext), v = useDataSourceManager(), k = useDataSourceKey(), I = useCollectionRecord(), { association: M } = useDataBlockProps() || {}, E = useCurrentRecord(), $ = useFormBlockContext(), D = useBlockContext(), { getOperators: T } = useOperators(), w = useLocationSearch(), B = useVariables$1(), N = useContext(AllDataBlocksContext), j = useContext(SchemaComponentContext), O = useContext(VariableScopeContext$1), q = useZIndexContext(), V = getSchemaSettingsDialogZIndex(q), { formValue: z, collection: U, parent: K } = useSubFormValue(), G = useCurrentPopupRecord(), W = useParentPopupRecord();
|
|
23425
23435
|
return t ? null : /* @__PURE__ */ jsx(
|
|
23426
23436
|
SchemaSettingsItem,
|
|
23427
23437
|
A(x({
|
|
23428
23438
|
title: o
|
|
23429
23439
|
}, h), {
|
|
23430
23440
|
onClick: () => L(void 0, null, function* () {
|
|
23431
|
-
const
|
|
23441
|
+
const Q = l ? yield l() : c, J = _.isFunction(e.schema) ? e.schema() : e.schema;
|
|
23432
23442
|
FormDialog(
|
|
23433
23443
|
{
|
|
23434
|
-
title:
|
|
23444
|
+
title: J.title || o,
|
|
23435
23445
|
width: u,
|
|
23436
23446
|
rootClassName: m,
|
|
23437
|
-
getContainer: () => document.body
|
|
23447
|
+
getContainer: () => document.body,
|
|
23448
|
+
zIndex: V
|
|
23438
23449
|
},
|
|
23439
23450
|
() => /* @__PURE__ */ jsx(VariableScopeContext$1.Provider, { value: O, children: /* @__PURE__ */ jsx(SchemaComponentContext.Provider, { value: j, children: /* @__PURE__ */ jsx(AllDataBlocksContext.Provider, { value: N, children: /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(CollectOperators, { defaultOperators: T(), children: /* @__PURE__ */ jsx(VariablesContext.Provider, { value: B, children: /* @__PURE__ */ jsx(BlockContext.Provider, { value: D, children: /* @__PURE__ */ jsx(
|
|
23440
23451
|
VariablePopupRecordProvider,
|
|
23441
23452
|
{
|
|
23442
|
-
recordData:
|
|
23443
|
-
collection:
|
|
23453
|
+
recordData: G == null ? void 0 : G.value,
|
|
23454
|
+
collection: G == null ? void 0 : G.collection,
|
|
23444
23455
|
parent: {
|
|
23445
|
-
recordData:
|
|
23446
|
-
collection:
|
|
23456
|
+
recordData: W == null ? void 0 : W.value,
|
|
23457
|
+
collection: W == null ? void 0 : W.collection
|
|
23447
23458
|
},
|
|
23448
23459
|
children: /* @__PURE__ */ jsx(CollectionRecordProvider, { record: d ? null : I, children: /* @__PURE__ */ jsx(CurrentRecordContextProvider, A(x({}, E), { children: /* @__PURE__ */ jsx(FormBlockContext$1.Provider, { value: $, children: /* @__PURE__ */ jsx(
|
|
23449
23460
|
SubFormProvider,
|
|
23450
23461
|
{
|
|
23451
|
-
value: { value:
|
|
23462
|
+
value: { value: z, collection: U, parent: K },
|
|
23452
23463
|
children: /* @__PURE__ */ jsx(
|
|
23453
23464
|
FormActiveFieldsProvider,
|
|
23454
23465
|
{
|
|
@@ -23485,12 +23496,12 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
23485
23496
|
min-width: 320px;
|
|
23486
23497
|
}
|
|
23487
23498
|
`,
|
|
23488
|
-
children: /* @__PURE__ */ jsx(ApplicationContext.Provider, { value: b, children: /* @__PURE__ */ jsx(APIClientProvider, { apiClient: y, children: /* @__PURE__ */ jsx(ConfigProvider, { locale: P, children: /* @__PURE__ */ jsx(zIndexContext.Provider, { value:
|
|
23499
|
+
children: /* @__PURE__ */ jsx(ApplicationContext.Provider, { value: b, children: /* @__PURE__ */ jsx(APIClientProvider, { apiClient: y, children: /* @__PURE__ */ jsx(ConfigProvider, { locale: P, children: /* @__PURE__ */ jsx(zIndexContext.Provider, { value: V, children: /* @__PURE__ */ jsx(
|
|
23489
23500
|
SchemaComponent,
|
|
23490
23501
|
{
|
|
23491
23502
|
components: n,
|
|
23492
23503
|
scope: r,
|
|
23493
|
-
schema:
|
|
23504
|
+
schema: J
|
|
23494
23505
|
}
|
|
23495
23506
|
) }) }) }) })
|
|
23496
23507
|
}
|
|
@@ -23509,10 +23520,10 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
23509
23520
|
) }) }) }) }) }) }) }),
|
|
23510
23521
|
S
|
|
23511
23522
|
).open({
|
|
23512
|
-
initialValues:
|
|
23523
|
+
initialValues: Q,
|
|
23513
23524
|
effects: i
|
|
23514
|
-
}).then((
|
|
23515
|
-
console.error(
|
|
23525
|
+
}).then((Z) => (a(Z), Z)).catch((Z) => {
|
|
23526
|
+
console.error(Z);
|
|
23516
23527
|
});
|
|
23517
23528
|
}),
|
|
23518
23529
|
children: e.children || e.title
|
|
@@ -30630,7 +30641,7 @@ const useStyles$a = genStyleHook("nb-markdown", (e, { isDarkTheme: t }) => {
|
|
|
30630
30641
|
}, t ? i : r)
|
|
30631
30642
|
};
|
|
30632
30643
|
}), parseMarkdown$1 = _.memoize((e) => L(void 0, null, function* () {
|
|
30633
|
-
return e && (yield import("./md-
|
|
30644
|
+
return e && (yield import("./md-BbvRKckr.mjs")).default.render(e);
|
|
30634
30645
|
}));
|
|
30635
30646
|
function useParseMarkdown$1(e) {
|
|
30636
30647
|
const [t, o] = useState(""), [n, r] = useState(!0);
|
|
@@ -72043,7 +72054,7 @@ BlockGridModel.registerFlow({
|
|
|
72043
72054
|
}
|
|
72044
72055
|
});
|
|
72045
72056
|
const parseMarkdown = _.memoize((e) => L(void 0, null, function* () {
|
|
72046
|
-
return e && (yield import("./md-
|
|
72057
|
+
return e && (yield import("./md-oH2RssNY.mjs")).default.render(e);
|
|
72047
72058
|
}));
|
|
72048
72059
|
function useParseMarkdown(e) {
|
|
72049
72060
|
const [t, o] = useState(""), [n, r] = useState(!0);
|
|
@@ -79468,6 +79479,18 @@ function getValueWithIndex(e, t, o) {
|
|
|
79468
79479
|
}
|
|
79469
79480
|
return get(e, r);
|
|
79470
79481
|
}
|
|
79482
|
+
function getDetailsItemValue(e) {
|
|
79483
|
+
const { record: t, currentObject: o, fieldPath: n, prefixFieldPath: r, idx: i } = e, a = getValueWithIndex(t, n, i);
|
|
79484
|
+
if (a !== void 0 || o == null)
|
|
79485
|
+
return a;
|
|
79486
|
+
if (r && n === r)
|
|
79487
|
+
return o;
|
|
79488
|
+
const l = r && n.startsWith(`${r}.`) ? n.slice(r.length + 1) : n;
|
|
79489
|
+
return l ? get(o, l) : o;
|
|
79490
|
+
}
|
|
79491
|
+
function normalizeDetailsAssociationValue(e, t) {
|
|
79492
|
+
return !isToManyAssociationField(e) || Array.isArray(t) ? t : t && typeof t == "object" && Array.isArray(t.rows) ? t.rows : t == null ? [] : [t];
|
|
79493
|
+
}
|
|
79471
79494
|
class DetailsItemModel extends DisplayItemModel {
|
|
79472
79495
|
static defineChildren(t) {
|
|
79473
79496
|
const o = t.collection;
|
|
@@ -79513,29 +79536,38 @@ class DetailsItemModel extends DisplayItemModel {
|
|
|
79513
79536
|
});
|
|
79514
79537
|
}
|
|
79515
79538
|
renderItem() {
|
|
79516
|
-
const t = this.subModels.field, o = this.context.fieldIndex, n = this.context.record, r = this.context.currentObject, i = this.context.item, a = this.context.getPropertyOptions("item"), l = o != null ? (() => {
|
|
79517
|
-
const
|
|
79518
|
-
|
|
79539
|
+
const t = this.subModels.field, o = this.context.fieldIndex, n = this.context.record, r = this.context.currentObject, i = this.context.item, a = this.context.getPropertyOptions("item"), l = this.context.prefixFieldPath, c = o != null ? (() => {
|
|
79540
|
+
const p = t.createFork({}, `${o}`);
|
|
79541
|
+
p.context.defineProperty("fieldIndex", {
|
|
79519
79542
|
get: () => o
|
|
79520
|
-
}),
|
|
79543
|
+
}), p.context.defineProperty("record", {
|
|
79521
79544
|
get: () => n,
|
|
79522
79545
|
cache: !1
|
|
79523
|
-
}),
|
|
79546
|
+
}), p.context.defineProperty("currentObject", {
|
|
79524
79547
|
get: () => r,
|
|
79525
79548
|
cache: !1
|
|
79526
79549
|
});
|
|
79527
|
-
const
|
|
79528
|
-
return
|
|
79550
|
+
const g = a || {}, { value: m } = g, h = ee(g, ["value"]);
|
|
79551
|
+
return p.context.defineProperty("item", A(x({}, h), {
|
|
79529
79552
|
get: () => i,
|
|
79530
79553
|
cache: !1
|
|
79531
|
-
})), this.context.pattern &&
|
|
79554
|
+
})), this.context.pattern && p.context.defineProperty("pattern", {
|
|
79532
79555
|
get: () => this.context.pattern
|
|
79533
|
-
}),
|
|
79534
|
-
})() : t,
|
|
79556
|
+
}), p;
|
|
79557
|
+
})() : t, u = this.context.pattern ? A(x(x({}, this.context.blockModel.props), this.props), {
|
|
79535
79558
|
pattern: this.context.pattern,
|
|
79536
79559
|
disabled: this.context.pattern === "readPretty"
|
|
79537
|
-
}) : x(x({}, this.context.blockModel.props), this.props),
|
|
79538
|
-
|
|
79560
|
+
}) : x(x({}, this.context.blockModel.props), this.props), d = normalizeDetailsAssociationValue(
|
|
79561
|
+
this.collectionField,
|
|
79562
|
+
getDetailsItemValue({
|
|
79563
|
+
record: n,
|
|
79564
|
+
currentObject: r,
|
|
79565
|
+
fieldPath: this.fieldPath,
|
|
79566
|
+
prefixFieldPath: l,
|
|
79567
|
+
idx: o
|
|
79568
|
+
})
|
|
79569
|
+
);
|
|
79570
|
+
return /* @__PURE__ */ jsx(FormItem$2, A(x({}, u), { value: d, children: /* @__PURE__ */ jsx(FieldModelRenderer, { model: c }) }));
|
|
79539
79571
|
}
|
|
79540
79572
|
}
|
|
79541
79573
|
DetailsItemModel.define({
|
|
@@ -79784,24 +79816,24 @@ function omitHiddenModelValuesFromSubmit(e, t) {
|
|
|
79784
79816
|
}
|
|
79785
79817
|
function submitHandler(e, t, o) {
|
|
79786
79818
|
return L(this, null, function* () {
|
|
79787
|
-
var c, u;
|
|
79819
|
+
var c, u, d;
|
|
79788
79820
|
const n = e.resource, r = e.blockModel, i = e != null && e.flowSettingsEnabled ? getValidationNamePathsExcludingHiddenModels(r) : null;
|
|
79789
79821
|
Array.isArray(i) ? i.length && (yield r.form.validateFields(i)) : yield r.form.validateFields();
|
|
79790
79822
|
const a = r.form.getFieldsValue(!0), l = omitHiddenModelValuesFromSubmit(a, r);
|
|
79791
79823
|
if (n instanceof SingleRecordResource) {
|
|
79792
79824
|
if (r instanceof EditFormModel) {
|
|
79793
|
-
const
|
|
79794
|
-
|
|
79825
|
+
const m = n.getMeta("currentFilterByTk");
|
|
79826
|
+
m ? n.setFilterByTk(m) : n.isNewRecord = !0;
|
|
79795
79827
|
}
|
|
79796
|
-
const
|
|
79797
|
-
r instanceof EditFormModel ? (n.isNewRecord = !1, (c = r.resetUserModifiedFields) == null || c.call(r), yield n.refresh()) : (r.form.resetFields(), (u = r.resetUserModifiedFields) == null || u.call(r),
|
|
79828
|
+
const p = o ? yield o(l) : yield n.save(l, t.requestConfig);
|
|
79829
|
+
r instanceof EditFormModel ? (n.isNewRecord = !1, (c = r.resetUserModifiedFields) == null || c.call(r), yield n.refresh()) : (r.form.resetFields(), r.emitter.emit("onFieldReset"), (u = r.resetUserModifiedFields) == null || u.call(r), e.view.inputArgs.collectionName === r.collection.name && e.view.inputArgs.onChange && e.view.inputArgs.onChange(p == null ? void 0 : p.data));
|
|
79798
79830
|
} else if (n instanceof MultiRecordResource) {
|
|
79799
|
-
const
|
|
79800
|
-
if (!
|
|
79831
|
+
const p = n.getMeta("currentFilterByTk");
|
|
79832
|
+
if (!p) {
|
|
79801
79833
|
e.message.error(e.t("No filterByTk found for multi-record resource."));
|
|
79802
79834
|
return;
|
|
79803
79835
|
}
|
|
79804
|
-
(yield o) ? yield o(l,
|
|
79836
|
+
(yield o) ? yield o(l, p) : yield n.update(p, l, t.requestConfig), (d = r.resetUserModifiedFields) == null || d.call(r);
|
|
79805
79837
|
}
|
|
79806
79838
|
});
|
|
79807
79839
|
}
|
|
@@ -84131,16 +84163,20 @@ const LargeFieldEdit = observer((a) => {
|
|
|
84131
84163
|
)
|
|
84132
84164
|
}
|
|
84133
84165
|
);
|
|
84134
|
-
}), handleModelName = (e) => ["RadioGroupFieldModel", "CheckboxGroupFieldModel"].includes(e) ? "SelectFieldModel" : e, MemoFieldRenderer = React.memo(FieldModelRenderer, (e, t) => e.value === t.value && e.model === t.model)
|
|
84166
|
+
}), handleModelName = (e) => ["RadioGroupFieldModel", "CheckboxGroupFieldModel"].includes(e) ? "SelectFieldModel" : e, MemoFieldRenderer = React.memo(FieldModelRenderer, (e, t) => e.value === t.value && e.model === t.model);
|
|
84167
|
+
function shouldCommitImmediately(e) {
|
|
84168
|
+
return Array.isArray(e) ? !0 : e && typeof e == "object" ? !("target" in e) : !1;
|
|
84169
|
+
}
|
|
84170
|
+
const FieldModelRendererOptimize = React.memo((e) => {
|
|
84135
84171
|
const c = e, { model: t, onChange: o, value: n } = c, r = ee(c, ["model", "onChange", "value"]), i = React.useRef(e == null ? void 0 : e.value);
|
|
84136
84172
|
useEffect(() => {
|
|
84137
84173
|
i.current = n;
|
|
84138
84174
|
}, [n]);
|
|
84139
84175
|
const a = React.useCallback(
|
|
84140
84176
|
(u) => {
|
|
84141
|
-
i.current = u;
|
|
84177
|
+
i.current = u, shouldCommitImmediately(u) && (o == null || o(u));
|
|
84142
84178
|
},
|
|
84143
|
-
[
|
|
84179
|
+
[o]
|
|
84144
84180
|
), l = React.useCallback(() => {
|
|
84145
84181
|
o == null || o(i.current);
|
|
84146
84182
|
}, [o]);
|
|
@@ -95801,6 +95837,7 @@ const models = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
|
|
|
95801
95837
|
formatNumber,
|
|
95802
95838
|
getAllDataModels,
|
|
95803
95839
|
getDefaultOperator,
|
|
95840
|
+
getDetailsItemValue,
|
|
95804
95841
|
getDisplayNumber,
|
|
95805
95842
|
getValueWithIndex,
|
|
95806
95843
|
injectRecordPickerPopupContext,
|
|
@@ -108678,6 +108715,7 @@ export {
|
|
|
108678
108715
|
getDatePickerLabels,
|
|
108679
108716
|
getDateRanges,
|
|
108680
108717
|
getDefaultOperator,
|
|
108718
|
+
getDetailsItemValue,
|
|
108681
108719
|
getDisplayNumber,
|
|
108682
108720
|
getFieldDefaultValue,
|
|
108683
108721
|
getFlowPageMenuSchema,
|
|
@@ -108690,6 +108728,8 @@ export {
|
|
|
108690
108728
|
getPageSchema,
|
|
108691
108729
|
getPopupPathFromParams,
|
|
108692
108730
|
getRenderContent,
|
|
108731
|
+
getSchemaSettingsConfirmZIndex,
|
|
108732
|
+
getSchemaSettingsDialogZIndex,
|
|
108693
108733
|
getShouldChange,
|
|
108694
108734
|
getSimpleModePaginationClassName,
|
|
108695
108735
|
getStoredPopupContext,
|
|
@@ -69,6 +69,8 @@ export interface SchemaSettingsRemoveProps {
|
|
|
69
69
|
removeParentsIfNoChildren?: boolean;
|
|
70
70
|
breakRemoveOn?: ISchema | ((s: ISchema) => boolean);
|
|
71
71
|
}
|
|
72
|
+
export declare const getSchemaSettingsDialogZIndex: (parentZIndex: number) => number;
|
|
73
|
+
export declare const getSchemaSettingsConfirmZIndex: (parentZIndex: number) => number;
|
|
72
74
|
export declare const SchemaSettingsRemove: FC<SchemaSettingsRemoveProps>;
|
|
73
75
|
export interface SchemaSettingsSelectItemProps extends Omit<SchemaSettingsItemProps, 'onChange' | 'onClick'>, Omit<SelectWithTitleProps, 'title' | 'defaultValue'> {
|
|
74
76
|
value?: SelectWithTitleProps['defaultValue'];
|