@nocobase/client 1.4.1 → 1.4.3
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/index.mjs +436 -422
- package/lib/index.js +12 -8
- package/package.json +5 -5
package/es/index.mjs
CHANGED
|
@@ -3884,9 +3884,9 @@ class APIClient extends APIClient$1 {
|
|
|
3884
3884
|
return o.options = this.options, o.services = this.services, o.storage = this.storage, o.app = this.app, o.auth = this.auth, o.storagePrefix = this.storagePrefix, o.notification = this.notification, o;
|
|
3885
3885
|
}
|
|
3886
3886
|
getHeaders() {
|
|
3887
|
-
var r;
|
|
3888
|
-
const o = super.getHeaders(), n = this.app.getName();
|
|
3889
|
-
return n && (o["X-App"] = n), o["X-Timezone"] = getCurrentTimezone(), o["X-Hostname"] = (
|
|
3887
|
+
var r, i;
|
|
3888
|
+
const o = super.getHeaders(), n = (r = this.app) == null ? void 0 : r.getName();
|
|
3889
|
+
return n && (o["X-App"] = n), o["X-Timezone"] = getCurrentTimezone(), o["X-Hostname"] = (i = window == null ? void 0 : window.location) == null ? void 0 : i.hostname, o;
|
|
3890
3890
|
}
|
|
3891
3891
|
service(o) {
|
|
3892
3892
|
return this.services[o];
|
|
@@ -3894,8 +3894,10 @@ class APIClient extends APIClient$1 {
|
|
|
3894
3894
|
interceptors() {
|
|
3895
3895
|
this.axios.interceptors.request.use((o) => {
|
|
3896
3896
|
o.headers["X-With-ACL-Meta"] = !0;
|
|
3897
|
-
const n = this.
|
|
3898
|
-
return n
|
|
3897
|
+
const n = this.getHeaders();
|
|
3898
|
+
return Object.keys(n).forEach((r) => {
|
|
3899
|
+
o.headers[r] = n[r];
|
|
3900
|
+
}), o;
|
|
3899
3901
|
}), super.interceptors(), this.useNotificationMiddleware(), this.axios.interceptors.response.use(
|
|
3900
3902
|
(o) => o,
|
|
3901
3903
|
(o) => {
|
|
@@ -4293,7 +4295,7 @@ function addAppVersion(e, t) {
|
|
|
4293
4295
|
addAppVersion((n = e.properties) == null ? void 0 : n[o], t);
|
|
4294
4296
|
}), e;
|
|
4295
4297
|
}
|
|
4296
|
-
const name = "@nocobase/client", version$1 = "1.4.
|
|
4298
|
+
const name = "@nocobase/client", version$1 = "1.4.3", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
4297
4299
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
4298
4300
|
"@ant-design/cssinjs": "^1.11.1",
|
|
4299
4301
|
"@ant-design/icons": "^5.1.4",
|
|
@@ -4315,9 +4317,9 @@ const name = "@nocobase/client", version$1 = "1.4.1", license = "AGPL-3.0", main
|
|
|
4315
4317
|
"@formily/reactive-react": "^2.2.27",
|
|
4316
4318
|
"@formily/shared": "^2.2.27",
|
|
4317
4319
|
"@formily/validator": "^2.2.27",
|
|
4318
|
-
"@nocobase/evaluators": "1.4.
|
|
4319
|
-
"@nocobase/sdk": "1.4.
|
|
4320
|
-
"@nocobase/utils": "1.4.
|
|
4320
|
+
"@nocobase/evaluators": "1.4.3",
|
|
4321
|
+
"@nocobase/sdk": "1.4.3",
|
|
4322
|
+
"@nocobase/utils": "1.4.3",
|
|
4321
4323
|
ahooks: "^3.7.2",
|
|
4322
4324
|
antd: "5.12.8",
|
|
4323
4325
|
"antd-style": "3.7.1",
|
|
@@ -4998,7 +5000,7 @@ const TreeNode = (e) => {
|
|
|
4998
5000
|
const $ = a(A.interface);
|
|
4999
5001
|
if (!($ != null && $.filterable))
|
|
5000
5002
|
return;
|
|
5001
|
-
const { nested: L, children:
|
|
5003
|
+
const { nested: L, children: z, operators: j } = $.filterable, R = {
|
|
5002
5004
|
name: A.name,
|
|
5003
5005
|
title: ((B = A == null ? void 0 : A.uiSchema) == null ? void 0 : B.title) || A.name,
|
|
5004
5006
|
schema: A == null ? void 0 : A.uiSchema,
|
|
@@ -5008,7 +5010,7 @@ const TreeNode = (e) => {
|
|
|
5008
5010
|
if (!(A.target && D > 2)) {
|
|
5009
5011
|
if (D > 2)
|
|
5010
5012
|
return R;
|
|
5011
|
-
if (
|
|
5013
|
+
if (z != null && z.length && (R.children = z), L) {
|
|
5012
5014
|
const T = n(A.target), N = w(T, D + 1).filter(Boolean);
|
|
5013
5015
|
R.children = R.children || [], R.children.push(...N);
|
|
5014
5016
|
}
|
|
@@ -5017,8 +5019,8 @@ const TreeNode = (e) => {
|
|
|
5017
5019
|
}, w = (A, D) => {
|
|
5018
5020
|
const $ = [];
|
|
5019
5021
|
return A.forEach((L) => {
|
|
5020
|
-
const
|
|
5021
|
-
|
|
5022
|
+
const z = I(L, D);
|
|
5023
|
+
z && $.push(z);
|
|
5022
5024
|
}), $;
|
|
5023
5025
|
};
|
|
5024
5026
|
return w(v, 1);
|
|
@@ -8821,20 +8823,20 @@ class PluginSettingsManager {
|
|
|
8821
8823
|
const AppComponent = observer(
|
|
8822
8824
|
(o) => {
|
|
8823
8825
|
var n = o, { children: e } = n, t = K(n, ["children"]);
|
|
8824
|
-
var l
|
|
8825
|
-
const { app: r } = t, i = useCallback((
|
|
8826
|
-
console.error(
|
|
8827
|
-
const
|
|
8828
|
-
|
|
8826
|
+
var l;
|
|
8827
|
+
const { app: r } = t, i = useCallback((c, u) => {
|
|
8828
|
+
console.error(c);
|
|
8829
|
+
const d = new Error();
|
|
8830
|
+
d.stack = u.componentStack.trim(), console.error(d);
|
|
8829
8831
|
}, []);
|
|
8830
8832
|
useEffect(() => {
|
|
8831
8833
|
r.load();
|
|
8832
8834
|
}, [r]);
|
|
8833
8835
|
const a = r.getComponent("AppError");
|
|
8834
|
-
return r.loading ? r.renderComponent("AppSpin", { app: r }) : !r.maintained && r.maintaining ? r.renderComponent("AppMaintaining", { app: r }) : (
|
|
8836
|
+
return r.loading ? r.renderComponent("AppSpin", { app: r }) : !r.maintained && r.maintaining ? r.renderComponent("AppMaintaining", { app: r }) : (l = r.error) != null && l.code ? /* @__PURE__ */ jsx(a, { app: r, error: r.error }) : /* @__PURE__ */ jsx(
|
|
8835
8837
|
ErrorBoundary,
|
|
8836
8838
|
{
|
|
8837
|
-
FallbackComponent: (
|
|
8839
|
+
FallbackComponent: (c) => /* @__PURE__ */ jsx(a, x({ app: r, error: r.error }, c)),
|
|
8838
8840
|
onError: i,
|
|
8839
8841
|
children: /* @__PURE__ */ jsxs(ApplicationContext.Provider, { value: r, children: [
|
|
8840
8842
|
r.maintained && r.maintaining && r.renderComponent("AppMaintainingDialog", { app: r }),
|
|
@@ -9261,7 +9263,7 @@ function withInitializer(e) {
|
|
|
9261
9263
|
b ? b(y(R, { isInSubTable: i })) : r(d, y(R, { isInSubTable: i }), { onSuccess: p });
|
|
9262
9264
|
},
|
|
9263
9265
|
[b, y, r, d, p]
|
|
9264
|
-
), { wrapSSR: I, hashId: w, componentCls: k } = useSchemaInitializerStyles(), [A, D] = useState(!1), { token: $ } = theme.useToken(), L = useNiceDropdownMaxHeight([A]),
|
|
9266
|
+
), { wrapSSR: I, hashId: w, componentCls: k } = useSchemaInitializerStyles(), [A, D] = useState(!1), { token: $ } = theme.useToken(), L = useNiceDropdownMaxHeight([A]), z = useMemo(
|
|
9265
9267
|
() => x({
|
|
9266
9268
|
options: o,
|
|
9267
9269
|
style: C
|
|
@@ -9287,7 +9289,7 @@ function withInitializer(e) {
|
|
|
9287
9289
|
insert: v,
|
|
9288
9290
|
options: o
|
|
9289
9291
|
},
|
|
9290
|
-
children: f === !1 ? React.createElement(e,
|
|
9292
|
+
children: f === !1 ? React.createElement(e, z) : /* @__PURE__ */ jsx(
|
|
9291
9293
|
Popover,
|
|
9292
9294
|
F(x({
|
|
9293
9295
|
placement: "bottomLeft"
|
|
@@ -9324,7 +9326,7 @@ function withInitializer(e) {
|
|
|
9324
9326
|
}
|
|
9325
9327
|
)
|
|
9326
9328
|
),
|
|
9327
|
-
children: React.createElement(e,
|
|
9329
|
+
children: React.createElement(e, z)
|
|
9328
9330
|
})
|
|
9329
9331
|
)
|
|
9330
9332
|
}
|
|
@@ -10453,7 +10455,7 @@ const variablesStore = {}, getFieldPath = (e, t) => {
|
|
|
10453
10455
|
let w = mergeCtxWithLocalVariables(o.current, S);
|
|
10454
10456
|
const { fieldPath: k, dataSource: A, variableOption: D } = getFieldPath(v, I);
|
|
10455
10457
|
let $ = k;
|
|
10456
|
-
const { fieldPath: L } = getFieldPath(C, I),
|
|
10458
|
+
const { fieldPath: L } = getFieldPath(C, I), z = y.length === 1 ? D == null ? void 0 : D.collectionName : (R = r(L, A)) == null ? void 0 : R.target;
|
|
10457
10459
|
if (!(v in w))
|
|
10458
10460
|
throw new Error(`VariablesProvider: ${v} is not found`);
|
|
10459
10461
|
for (let M = 0; M < y.length; M++) {
|
|
@@ -10461,13 +10463,13 @@ const variablesStore = {}, getFieldPath = (e, t) => {
|
|
|
10461
10463
|
return {
|
|
10462
10464
|
value: w === void 0 ? D == null ? void 0 : D.defaultValue : w,
|
|
10463
10465
|
dataSource: A,
|
|
10464
|
-
collectionName:
|
|
10466
|
+
collectionName: z
|
|
10465
10467
|
};
|
|
10466
|
-
const T = y[M], { fieldPath: N } = getFieldPath(y.slice(0, M + 1).join("."), I),
|
|
10468
|
+
const T = y[M], { fieldPath: N } = getFieldPath(y.slice(0, M + 1).join("."), I), O = r(N, A), q = (B = i($)) == null ? void 0 : B.getPrimaryKey();
|
|
10467
10469
|
if (Array.isArray(w)) {
|
|
10468
10470
|
const E = w.map((U) => {
|
|
10469
|
-
if (!(b != null && b.doNotRequest) && shouldToRequest(U == null ? void 0 : U[T]) && (U == null ? void 0 : U[q]) != null &&
|
|
10470
|
-
const G = `/${$}/${U[
|
|
10471
|
+
if (!(b != null && b.doNotRequest) && shouldToRequest(U == null ? void 0 : U[T]) && (U == null ? void 0 : U[q]) != null && O != null && O.target) {
|
|
10472
|
+
const G = `/${$}/${U[O.sourceKey || q]}/${T}:${getAction(O.type)}`;
|
|
10471
10473
|
if (hasRequested(G))
|
|
10472
10474
|
return getRequested(G);
|
|
10473
10475
|
const H = n.request({
|
|
@@ -10481,9 +10483,9 @@ const variablesStore = {}, getFieldPath = (e, t) => {
|
|
|
10481
10483
|
}
|
|
10482
10484
|
return U == null ? void 0 : U[T];
|
|
10483
10485
|
});
|
|
10484
|
-
w = removeThroughCollectionFields(_.flatten(yield Promise.all(E)),
|
|
10485
|
-
} else if (!(b != null && b.doNotRequest) && shouldToRequest(w[T]) && w[q] != null && (
|
|
10486
|
-
const E = `/${$}/${w[
|
|
10486
|
+
w = removeThroughCollectionFields(_.flatten(yield Promise.all(E)), O);
|
|
10487
|
+
} else if (!(b != null && b.doNotRequest) && shouldToRequest(w[T]) && w[q] != null && (O != null && O.target)) {
|
|
10488
|
+
const E = `/${$}/${w[O.sourceKey || q]}/${T}:${getAction(O.type)}`;
|
|
10487
10489
|
let U = null;
|
|
10488
10490
|
if (hasRequested(E))
|
|
10489
10491
|
U = yield getRequested(E);
|
|
@@ -10497,10 +10499,10 @@ const variablesStore = {}, getFieldPath = (e, t) => {
|
|
|
10497
10499
|
});
|
|
10498
10500
|
stashRequested(E, G), U = yield G, clearRequested(E);
|
|
10499
10501
|
}
|
|
10500
|
-
raw(w)[T] || (raw(w)[T] = U.data.data), w = removeThroughCollectionFields(getValuesByPath(w, T),
|
|
10502
|
+
raw(w)[T] || (raw(w)[T] = U.data.data), w = removeThroughCollectionFields(getValuesByPath(w, T), O);
|
|
10501
10503
|
} else
|
|
10502
|
-
w = removeThroughCollectionFields(getValuesByPath(w, T),
|
|
10503
|
-
|
|
10504
|
+
w = removeThroughCollectionFields(getValuesByPath(w, T), O);
|
|
10505
|
+
O != null && O.target && ($ = O.target);
|
|
10504
10506
|
}
|
|
10505
10507
|
const j = a(
|
|
10506
10508
|
_.isFunction(w) ? w({ fieldOperator: b == null ? void 0 : b.fieldOperator, isParsingVariable: !0 }) : w
|
|
@@ -10508,7 +10510,7 @@ const variablesStore = {}, getFieldPath = (e, t) => {
|
|
|
10508
10510
|
return {
|
|
10509
10511
|
value: j === void 0 ? D.defaultValue : j,
|
|
10510
10512
|
dataSource: A,
|
|
10511
|
-
collectionName:
|
|
10513
|
+
collectionName: z
|
|
10512
10514
|
};
|
|
10513
10515
|
}),
|
|
10514
10516
|
[r]
|
|
@@ -11836,14 +11838,14 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
11836
11838
|
].filter(Boolean).map((c) => encodePathValue(c)).join("/")}`;
|
|
11837
11839
|
}, usePopupUtils = (e = {}) => {
|
|
11838
11840
|
const t = useNavigateNoUpdate(), o = useLocationNoUpdate(), n = useFieldSchema(), r = useDataSourceKey(), i = useCollectionRecord(), a = useCollectionParentRecord(), l = useCollection(), c = useCollectionManager(), u = useAssociationName(), { visible: d, setVisible: p } = useContext(PopupVisibleProviderContext) || { visible: !1, setVisible: _.noop }, { params: m } = useCurrentPopupContext(), h = useDataBlockRequest(), { isPopupVisibleControlledByURL: g } = usePopupSettings(), { setVisible: f } = useContext(ActionContext), { updatePopupContext: C } = usePopupContextInActionOrAssociationField(), S = useCurrentPopupContext(), b = useCallback(
|
|
11839
|
-
(
|
|
11841
|
+
(z) => {
|
|
11840
11842
|
var j;
|
|
11841
|
-
return (j =
|
|
11843
|
+
return (j = z || (a == null ? void 0 : a.data)) == null ? void 0 : j[c.getSourceKeyByAssociation(u)];
|
|
11842
11844
|
},
|
|
11843
11845
|
[a, u]
|
|
11844
11846
|
), y = useTableBlockContext(), v = e.setVisible || f, I = useCallback(
|
|
11845
11847
|
({
|
|
11846
|
-
tabKey:
|
|
11848
|
+
tabKey: z,
|
|
11847
11849
|
popupUid: j,
|
|
11848
11850
|
recordData: R,
|
|
11849
11851
|
sourceId: B,
|
|
@@ -11857,20 +11859,20 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
11857
11859
|
collection: M,
|
|
11858
11860
|
filterbytk: N,
|
|
11859
11861
|
sourceid: B,
|
|
11860
|
-
tab:
|
|
11862
|
+
tab: z
|
|
11861
11863
|
});
|
|
11862
11864
|
},
|
|
11863
11865
|
[u, c, l, r, a == null ? void 0 : a.data, u]
|
|
11864
11866
|
), w = useCallback(() => {
|
|
11865
|
-
const
|
|
11867
|
+
const z = {
|
|
11866
11868
|
dataSource: r,
|
|
11867
11869
|
collection: u || l == null ? void 0 : l.name,
|
|
11868
11870
|
association: u
|
|
11869
11871
|
};
|
|
11870
|
-
return _.omitBy(
|
|
11872
|
+
return _.omitBy(z, _.isNil);
|
|
11871
11873
|
}, [r, l, u]), k = useCallback(
|
|
11872
11874
|
({
|
|
11873
|
-
recordData:
|
|
11875
|
+
recordData: z,
|
|
11874
11876
|
parentRecordData: j,
|
|
11875
11877
|
collectionNameUsedInURL: R,
|
|
11876
11878
|
popupUidUsedInURL: B,
|
|
@@ -11879,10 +11881,10 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
11879
11881
|
if (!g())
|
|
11880
11882
|
return v == null ? void 0 : v(!0);
|
|
11881
11883
|
const T = (M == null ? void 0 : M["x-uid"]) || (n == null ? void 0 : n["x-uid"]), N = b(j);
|
|
11882
|
-
|
|
11883
|
-
const
|
|
11884
|
+
z = z || (i == null ? void 0 : i.data);
|
|
11885
|
+
const O = I({
|
|
11884
11886
|
popupUid: T,
|
|
11885
|
-
recordData:
|
|
11887
|
+
recordData: z,
|
|
11886
11888
|
sourceId: N,
|
|
11887
11889
|
collection: R,
|
|
11888
11890
|
puid: B
|
|
@@ -11890,7 +11892,7 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
11890
11892
|
let q = o.pathname;
|
|
11891
11893
|
_.last(q) === "/" && (q = q.slice(0, -1)), storePopupContext(T, {
|
|
11892
11894
|
schema: M || n,
|
|
11893
|
-
record: new CollectionRecord({ isNew: !1, data:
|
|
11895
|
+
record: new CollectionRecord({ isNew: !1, data: z }),
|
|
11894
11896
|
parentRecord: j ? new CollectionRecord({ isNew: !1, data: j }) : a,
|
|
11895
11897
|
service: h,
|
|
11896
11898
|
dataSource: r,
|
|
@@ -11898,7 +11900,7 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
11898
11900
|
association: u,
|
|
11899
11901
|
sourceId: N,
|
|
11900
11902
|
tableBlockContext: y
|
|
11901
|
-
}), C(w(), M), t(withSearchParams(`${q}${
|
|
11903
|
+
}), C(w(), M), t(withSearchParams(`${q}${O}`));
|
|
11902
11904
|
},
|
|
11903
11905
|
[
|
|
11904
11906
|
u,
|
|
@@ -11922,9 +11924,9 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
11922
11924
|
return v == null ? void 0 : v(!1);
|
|
11923
11925
|
t(withSearchParams(removeLastPopupPath(o.pathname)), { replace: !0 });
|
|
11924
11926
|
}, [g, v, t, o == null ? void 0 : o.pathname]), D = useCallback(
|
|
11925
|
-
(
|
|
11927
|
+
(z) => {
|
|
11926
11928
|
const j = b(), R = I({
|
|
11927
|
-
tabKey:
|
|
11929
|
+
tabKey: z,
|
|
11928
11930
|
popupUid: m == null ? void 0 : m.popupuid,
|
|
11929
11931
|
recordData: i == null ? void 0 : i.data,
|
|
11930
11932
|
sourceId: j
|
|
@@ -11935,9 +11937,9 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
11935
11937
|
});
|
|
11936
11938
|
},
|
|
11937
11939
|
[I, t, m == null ? void 0 : m.popupuid, i == null ? void 0 : i.data, o]
|
|
11938
|
-
), $ = useCallback((
|
|
11939
|
-
j.__popup =
|
|
11940
|
-
}, []), L = useCallback((
|
|
11940
|
+
), $ = useCallback((z, j) => {
|
|
11941
|
+
j.__popup = z;
|
|
11942
|
+
}, []), L = useCallback((z) => z.__popup, []);
|
|
11941
11943
|
return {
|
|
11942
11944
|
/**
|
|
11943
11945
|
* used to open popup by changing the url
|
|
@@ -12979,7 +12981,7 @@ const ColDivider = (e) => {
|
|
|
12979
12981
|
return;
|
|
12980
12982
|
const D = l.current, $ = D.previousElementSibling, L = D.nextElementSibling;
|
|
12981
12983
|
h["x-component-props"] = h["x-component-props"] || {}, g["x-component-props"] = g["x-component-props"] || {};
|
|
12982
|
-
const
|
|
12984
|
+
const z = D.clientWidth * (e.cols.length + 1) / e.cols.length, j = (100 * ($.getBoundingClientRect().width + z) / D.parentElement.clientWidth).toFixed(2), R = (100 * (L.getBoundingClientRect().width + z) / D.parentElement.clientWidth).toFixed(2);
|
|
12983
12985
|
_.set(h, "x-component-props.width", j), _.set(g, "x-component-props.width", R), i.emit("batchPatch", {
|
|
12984
12986
|
schemas: [
|
|
12985
12987
|
{
|
|
@@ -13272,8 +13274,8 @@ const TableColumnSchemaToolbar = (e) => /* @__PURE__ */ jsx(GridRowContext.Provi
|
|
|
13272
13274
|
),
|
|
13273
13275
|
onChange: useCallback(
|
|
13274
13276
|
({ current: h, pageSize: g }, f, C) => {
|
|
13275
|
-
var I, w, k, A, D, $, L,
|
|
13276
|
-
const S = (k = (w = (I = t.parent) == null ? void 0 : I["x-decorator-props"]) == null ? void 0 : w.params) == null ? void 0 : k.sort, b = C.order ? C.order === "ascend" ? [C.field] : [`-${C.field}`] : S || i.current.dragSortBy, y = g || (($ = (D = (A = t.parent) == null ? void 0 : A["x-decorator-props"]) == null ? void 0 : D.params) == null ? void 0 : $.pageSize), v = F(x({}, (j = (
|
|
13277
|
+
var I, w, k, A, D, $, L, z, j, R;
|
|
13278
|
+
const S = (k = (w = (I = t.parent) == null ? void 0 : I["x-decorator-props"]) == null ? void 0 : w.params) == null ? void 0 : k.sort, b = C.order ? C.order === "ascend" ? [C.field] : [`-${C.field}`] : S || i.current.dragSortBy, y = g || (($ = (D = (A = t.parent) == null ? void 0 : A["x-decorator-props"]) == null ? void 0 : D.params) == null ? void 0 : $.pageSize), v = F(x({}, (j = (z = (L = i.current) == null ? void 0 : L.service) == null ? void 0 : z.params) == null ? void 0 : j[0]), { page: h || 1, pageSize: y });
|
|
13277
13279
|
b && (v.sort = b), (R = i.current) == null || R.service.run(v);
|
|
13278
13280
|
},
|
|
13279
13281
|
[t.parent]
|
|
@@ -13287,11 +13289,11 @@ const TableColumnSchemaToolbar = (e) => /* @__PURE__ */ jsx(GridRowContext.Provi
|
|
|
13287
13289
|
}
|
|
13288
13290
|
const y = b.find((v) => v.uid === t.parent["x-uid"]);
|
|
13289
13291
|
b.forEach((v) => {
|
|
13290
|
-
var L,
|
|
13292
|
+
var L, z, j;
|
|
13291
13293
|
const I = C.find((R) => R.uid === v.uid);
|
|
13292
13294
|
if (!I)
|
|
13293
13295
|
return;
|
|
13294
|
-
const w = getSourceKey(y, I.field) || o.rowKey || "id", k = [h[w]], A = ((L = v.service.params) == null ? void 0 : L[0]) || {}, D = ((j = (
|
|
13296
|
+
const w = getSourceKey(y, I.field) || o.rowKey || "id", k = [h[w]], A = ((L = v.service.params) == null ? void 0 : L[0]) || {}, D = ((j = (z = v.service.params) == null ? void 0 : z[1]) == null ? void 0 : j.filters) || {};
|
|
13295
13297
|
if (f.includes(h[o.rowKey])) {
|
|
13296
13298
|
if (v.dataLoadingMode === "manual")
|
|
13297
13299
|
return v.clearData();
|
|
@@ -13644,10 +13646,10 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
|
|
|
13644
13646
|
var a, l, c, u, d, p, m, h, g, f, C, S, b, y, v, I;
|
|
13645
13647
|
const e = useField(), t = useTableSelectorContext(), o = useFieldSchema(), { getCollectionJoinField: n } = useCollectionManager_deprecated(), r = recursiveParent$1(o, "CollectionField"), i = n(r == null ? void 0 : r["x-collection-field"]);
|
|
13646
13648
|
return useEffect(() => {
|
|
13647
|
-
var k, A, D, $, L,
|
|
13649
|
+
var k, A, D, $, L, z, j, R, B, M, T, N, O;
|
|
13648
13650
|
if (!((k = t == null ? void 0 : t.service) != null && k.loading)) {
|
|
13649
13651
|
const q = (D = (A = t == null ? void 0 : t.service) == null ? void 0 : A.data) == null ? void 0 : D.data.map((E) => E);
|
|
13650
|
-
e.value = q, ($ = e == null ? void 0 : e.setInitialValue) == null || $.call(e, q), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (j = (
|
|
13652
|
+
e.value = q, ($ = e == null ? void 0 : e.setInitialValue) == null || $.call(e, q), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (j = (z = (L = t == null ? void 0 : t.service) == null ? void 0 : L.data) == null ? void 0 : z.meta) == null ? void 0 : j.pageSize, e.componentProps.pagination.total = (M = (B = (R = t == null ? void 0 : t.service) == null ? void 0 : R.data) == null ? void 0 : B.meta) == null ? void 0 : M.count, e.componentProps.pagination.current = (O = (N = (T = t == null ? void 0 : t.service) == null ? void 0 : T.data) == null ? void 0 : N.meta) == null ? void 0 : O.page;
|
|
13651
13653
|
}
|
|
13652
13654
|
}, [
|
|
13653
13655
|
i == null ? void 0 : i.foreignKey,
|
|
@@ -14793,7 +14795,7 @@ const useFormItemInitializerFields = (e) => {
|
|
|
14793
14795
|
]
|
|
14794
14796
|
})), [y, C == null ? void 0 : C.inherits, C == null ? void 0 : C.name, t, v, h]);
|
|
14795
14797
|
return r ? useMemo(() => {
|
|
14796
|
-
var
|
|
14798
|
+
var z;
|
|
14797
14799
|
const w = {
|
|
14798
14800
|
name: "currentRecord",
|
|
14799
14801
|
collectionName: C.name,
|
|
@@ -14864,7 +14866,7 @@ const useFormItemInitializerFields = (e) => {
|
|
|
14864
14866
|
else if (I[0].children.length)
|
|
14865
14867
|
if (l) {
|
|
14866
14868
|
if (I[0].children.length <= 1)
|
|
14867
|
-
return I[0].children = ((
|
|
14869
|
+
return I[0].children = ((z = I[0].children[0]) == null ? void 0 : z.children) || [], I;
|
|
14868
14870
|
$ = [w];
|
|
14869
14871
|
} else
|
|
14870
14872
|
$ = [w, D];
|
|
@@ -15596,10 +15598,10 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
15596
15598
|
t["x-settings"] || i,
|
|
15597
15599
|
t["x-settings-props"]
|
|
15598
15600
|
), b = useGridRowContext(), y = useGridContext(), v = useDataSourceManager(), I = v == null ? void 0 : v.getDataSources(), w = useDataSource(), k = (I == null ? void 0 : I.length) > 1 && w, A = ["FormItem", "ReadPrettyFormItem"].includes(r == null ? void 0 : r.componentName) ? `${r == null ? void 0 : r.name} ${m("(Fields only)")}` : r == null ? void 0 : r.name, D = useMemo(() => {
|
|
15599
|
-
var
|
|
15601
|
+
var z;
|
|
15600
15602
|
return {
|
|
15601
15603
|
insertPosition: "afterEnd",
|
|
15602
|
-
wrap: ((
|
|
15604
|
+
wrap: ((z = b == null ? void 0 : b.cols) == null ? void 0 : z.length) > 1 ? void 0 : gridRowColWrap,
|
|
15603
15605
|
Component: (j) => /* @__PURE__ */ jsx(
|
|
15604
15606
|
PlusOutlined,
|
|
15605
15607
|
F(x({}, j), {
|
|
@@ -15640,7 +15642,7 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
15640
15642
|
] }) })
|
|
15641
15643
|
] }) })) : null;
|
|
15642
15644
|
}, InternalSchemaToolbar = (e) => {
|
|
15643
|
-
var
|
|
15645
|
+
var O;
|
|
15644
15646
|
const t = useFieldSchema(), {
|
|
15645
15647
|
title: o,
|
|
15646
15648
|
initializer: n,
|
|
@@ -15667,11 +15669,11 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
15667
15669
|
), { render: $, exists: L } = useSchemaInitializerRender(
|
|
15668
15670
|
n || (t == null ? void 0 : t["x-initializer"]),
|
|
15669
15671
|
t == null ? void 0 : t["x-initializer-props"]
|
|
15670
|
-
),
|
|
15672
|
+
), z = useGridRowContext(), j = useGridContext(), R = useMemo(() => {
|
|
15671
15673
|
var q;
|
|
15672
15674
|
return {
|
|
15673
15675
|
insertPosition: "afterEnd",
|
|
15674
|
-
wrap: ((q =
|
|
15676
|
+
wrap: ((q = z == null ? void 0 : z.cols) == null ? void 0 : q.length) === 1 ? gridRowColWrap : void 0,
|
|
15675
15677
|
Component: (E) => /* @__PURE__ */ jsx(
|
|
15676
15678
|
PlusOutlined,
|
|
15677
15679
|
F(x({}, E), {
|
|
@@ -15681,7 +15683,7 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
15681
15683
|
})
|
|
15682
15684
|
)
|
|
15683
15685
|
};
|
|
15684
|
-
}, [b, (
|
|
15686
|
+
}, [b, (O = z == null ? void 0 : z.cols) == null ? void 0 : O.length]), B = useMemo(() => u === !1 ? null : /* @__PURE__ */ jsx(DragHandler, { children: /* @__PURE__ */ jsx(DragOutlined, { role: "button", "aria-label": b("drag-handler") }) }), [u, b]), M = useMemo(() => {
|
|
15685
15687
|
var q;
|
|
15686
15688
|
if (n === !1)
|
|
15687
15689
|
return null;
|
|
@@ -17152,7 +17154,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
17152
17154
|
"onMouseEnter",
|
|
17153
17155
|
"refreshDataBlockRequest",
|
|
17154
17156
|
"confirmTitle"
|
|
17155
|
-
]), { t: v } = useTranslation(), I = useDesigner(), w = useField(), k = useFieldSchema(), A = useCompile(), D = useCollectionRecordData(), $ = A((H = k["x-component-props"]) == null ? void 0 : H.confirm) || g, L = useMemo(() => (k == null ? void 0 : k["x-linkage-rules"]) || [], [k == null ? void 0 : k["x-linkage-rules"]]), { designable:
|
|
17157
|
+
]), { t: v } = useTranslation(), I = useDesigner(), w = useField(), k = useFieldSchema(), A = useCompile(), D = useCollectionRecordData(), $ = A((H = k["x-component-props"]) == null ? void 0 : H.confirm) || g, L = useMemo(() => (k == null ? void 0 : k["x-linkage-rules"]) || [], [k == null ? void 0 : k["x-linkage-rules"]]), { designable: z } = useDesignable(), j = useComponent(n) || n, R = useVariables(), B = useLocalVariables({ currentForm: { values: D, readPretty: !1 } }), { visibleWithURL: M, setVisibleWithURL: T } = usePopupUtils(), { setSubmitted: N } = useActionContext(), { getAriaLabel: O } = useGetAriaLabelOfAction(l), q = useCollectionParentRecordData(), E = useMemo(() => {
|
|
17156
17158
|
const W = l || A(k.title);
|
|
17157
17159
|
return _.isString(W) ? v(W) : W;
|
|
17158
17160
|
}, [l, k.title, v]);
|
|
@@ -17181,7 +17183,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
17181
17183
|
x({
|
|
17182
17184
|
containerRefKey: o,
|
|
17183
17185
|
fieldSchema: k,
|
|
17184
|
-
designable:
|
|
17186
|
+
designable: z,
|
|
17185
17187
|
field: w,
|
|
17186
17188
|
actionTitle: E,
|
|
17187
17189
|
icon: a,
|
|
@@ -17204,7 +17206,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
17204
17206
|
visibleWithURL: M,
|
|
17205
17207
|
setVisibleWithURL: T,
|
|
17206
17208
|
setSubmitted: N,
|
|
17207
|
-
getAriaLabel:
|
|
17209
|
+
getAriaLabel: O,
|
|
17208
17210
|
parentRecordData: q,
|
|
17209
17211
|
actionCallback: h
|
|
17210
17212
|
}, y)
|
|
@@ -17240,7 +17242,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
17240
17242
|
visibleWithURL: D,
|
|
17241
17243
|
setVisibleWithURL: $,
|
|
17242
17244
|
setSubmitted: L,
|
|
17243
|
-
getAriaLabel:
|
|
17245
|
+
getAriaLabel: z,
|
|
17244
17246
|
parentRecordData: j
|
|
17245
17247
|
} = ge, R = K(ge, [
|
|
17246
17248
|
"containerRefKey",
|
|
@@ -17271,7 +17273,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
17271
17273
|
"setSubmitted",
|
|
17272
17274
|
"getAriaLabel",
|
|
17273
17275
|
"parentRecordData"
|
|
17274
|
-
]), [B, M] = useState(!1), { wrapSSR: T, componentCls: N, hashId:
|
|
17276
|
+
]), [B, M] = useState(!1), { wrapSSR: T, componentCls: N, hashId: O } = useStyles$g(), [q, E] = useState(!1), U = n["x-toolbar-props"] || n["x-designer-props"], G = (ue = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : ue.openMode, H = (xe = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : xe.openSize, W = (de = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : de.refreshDataBlockRequest, { modal: X } = App.useApp(), J = useForm(), Y = useACLActionParamsContext(), { run: Q, element: Z, disabled: te } = (k == null ? void 0 : k(A)) || {}, ee = J.disabled || i.disabled || ((pe = i.data) == null ? void 0 : pe.disabled) || w || te, se = useMemo(() => {
|
|
17275
17277
|
var ce;
|
|
17276
17278
|
return F(x({}, I), {
|
|
17277
17279
|
opacity: r && (((ce = i == null ? void 0 : i.data) == null ? void 0 : ce.hidden) || !Y) && 0.1,
|
|
@@ -17290,10 +17292,10 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
17290
17292
|
tarComponent: d,
|
|
17291
17293
|
designerProps: U,
|
|
17292
17294
|
componentCls: N,
|
|
17293
|
-
hashId:
|
|
17295
|
+
hashId: O,
|
|
17294
17296
|
className: p,
|
|
17295
17297
|
others: R,
|
|
17296
|
-
getAriaLabel:
|
|
17298
|
+
getAriaLabel: z,
|
|
17297
17299
|
type: m,
|
|
17298
17300
|
Designer: h,
|
|
17299
17301
|
openMode: G,
|
|
@@ -17403,15 +17405,15 @@ function RenderButton({
|
|
|
17403
17405
|
setSubmitted: $,
|
|
17404
17406
|
confirmTitle: L
|
|
17405
17407
|
}) {
|
|
17406
|
-
const
|
|
17407
|
-
M.current =
|
|
17408
|
+
const z = useDataBlockRequest(), { t: j } = useTranslation(), { isPopupVisibleControlledByURL: R } = usePopupSettings(), { openPopup: B } = usePopupUtils(), M = useRef(null);
|
|
17409
|
+
M.current = z;
|
|
17408
17410
|
const T = useRef(null);
|
|
17409
17411
|
T.current = B;
|
|
17410
17412
|
const N = useCallback(
|
|
17411
|
-
(
|
|
17412
|
-
if (!(q && isPortalInBody(
|
|
17413
|
+
(O, q = !0) => {
|
|
17414
|
+
if (!(q && isPortalInBody(O.target)) && (O.preventDefault(), O.stopPropagation(), !a && o)) {
|
|
17413
17415
|
const E = () => {
|
|
17414
|
-
y ? y(
|
|
17416
|
+
y ? y(O, () => {
|
|
17415
17417
|
var U, G;
|
|
17416
17418
|
v !== !1 && ($ == null || $(!0), (G = (U = M.current) == null ? void 0 : U.refresh) == null || G.call(U));
|
|
17417
17419
|
}) : isBulkEditAction(I) || !R() ? (w(!0), k == null || k()) : ["view", "update", "create", "customize:popup"].includes(I["x-action"]) && I["x-uid"] ? T.current() : (w(!0), k == null || k());
|
|
@@ -18039,19 +18041,19 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18039
18041
|
config: {}
|
|
18040
18042
|
}, l = {}, c = {}, u = {}, d = [], p = {}, m = {}, h = {}, g = 1, f = 1;
|
|
18041
18043
|
function C(T) {
|
|
18042
|
-
var N,
|
|
18044
|
+
var N, O;
|
|
18043
18045
|
for (N = 0; N < T.length; N++)
|
|
18044
|
-
if (
|
|
18046
|
+
if (O = T[N], O === ".")
|
|
18045
18047
|
T.splice(N, 1), N -= 1;
|
|
18046
|
-
else if (
|
|
18048
|
+
else if (O === "..") {
|
|
18047
18049
|
if (N === 0 || N === 1 && T[2] === ".." || T[N - 1] === "..")
|
|
18048
18050
|
continue;
|
|
18049
18051
|
N > 0 && (T.splice(N - 1, 2), N -= 2);
|
|
18050
18052
|
}
|
|
18051
18053
|
}
|
|
18052
|
-
function S(T, N,
|
|
18054
|
+
function S(T, N, O) {
|
|
18053
18055
|
var q, E, U, G, H, W, X, J, Y, Q, Z, te, ee = N && N.split("/"), se = a.map, ie = se && se["*"];
|
|
18054
|
-
if (T && (T = T.split("/"), X = T.length - 1, a.nodeIdCompat && jsSuffixRegExp.test(T[X]) && (T[X] = T[X].replace(jsSuffixRegExp, "")), T[0].charAt(0) === "." && ee && (te = ee.slice(0, ee.length - 1), T = te.concat(T)), C(T), T = T.join("/")),
|
|
18056
|
+
if (T && (T = T.split("/"), X = T.length - 1, a.nodeIdCompat && jsSuffixRegExp.test(T[X]) && (T[X] = T[X].replace(jsSuffixRegExp, "")), T[0].charAt(0) === "." && ee && (te = ee.slice(0, ee.length - 1), T = te.concat(T)), C(T), T = T.join("/")), O && se && (ee || ie)) {
|
|
18055
18057
|
U = T.split("/");
|
|
18056
18058
|
e:
|
|
18057
18059
|
for (G = U.length; G > 0; G -= 1) {
|
|
@@ -18082,14 +18084,14 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18082
18084
|
})([T]), !0;
|
|
18083
18085
|
}
|
|
18084
18086
|
function v(T) {
|
|
18085
|
-
var N,
|
|
18086
|
-
return
|
|
18087
|
+
var N, O = T ? T.indexOf("!") : -1;
|
|
18088
|
+
return O > -1 && (N = T.substring(0, O), T = T.substring(O + 1, T.length)), [N, T];
|
|
18087
18089
|
}
|
|
18088
|
-
function I(T, N,
|
|
18090
|
+
function I(T, N, O, q) {
|
|
18089
18091
|
var E, U, G, H, W = null, X = N ? N.name : null, J = T, Y = !0, Q = "";
|
|
18090
|
-
return T || (Y = !1, T = "_@r" + (g += 1)), H = v(T), W = H[0], T = H[1], W && (W = S(W, X, q), U = getOwn(p, W)), T && (W ?
|
|
18092
|
+
return T || (Y = !1, T = "_@r" + (g += 1)), H = v(T), W = H[0], T = H[1], W && (W = S(W, X, q), U = getOwn(p, W)), T && (W ? O ? Q = T : U && U.normalize ? Q = U.normalize(T, function(Z) {
|
|
18091
18093
|
return S(Z, X, q);
|
|
18092
|
-
}) : Q = T.indexOf("!") === -1 ? S(T, X, q) : T : (Q = S(T, X, q), H = v(Q), W = H[0], Q = H[1],
|
|
18094
|
+
}) : Q = T.indexOf("!") === -1 ? S(T, X, q) : T : (Q = S(T, X, q), H = v(Q), W = H[0], Q = H[1], O = !0, E = n.nameToUrl(Q))), G = W && !U && !O ? "_unnormalized" + (f += 1) : "", {
|
|
18093
18095
|
prefix: W,
|
|
18094
18096
|
name: Q,
|
|
18095
18097
|
parentMap: N,
|
|
@@ -18101,16 +18103,16 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18101
18103
|
};
|
|
18102
18104
|
}
|
|
18103
18105
|
function w(T) {
|
|
18104
|
-
var N = T.id,
|
|
18105
|
-
return
|
|
18106
|
+
var N = T.id, O = getOwn(l, N);
|
|
18107
|
+
return O || (O = l[N] = new n.Module(T)), O;
|
|
18106
18108
|
}
|
|
18107
|
-
function k(T, N,
|
|
18109
|
+
function k(T, N, O) {
|
|
18108
18110
|
var q = T.id, E = getOwn(l, q);
|
|
18109
|
-
hasProp(p, q) && (!E || E.defineEmitComplete) ? N === "defined" &&
|
|
18111
|
+
hasProp(p, q) && (!E || E.defineEmitComplete) ? N === "defined" && O(p[q]) : (E = w(T), E.error && N === "error" ? O(E.error) : E.on(N, O));
|
|
18110
18112
|
}
|
|
18111
18113
|
function A(T, N) {
|
|
18112
|
-
var
|
|
18113
|
-
N ? N(T) : (each(
|
|
18114
|
+
var O = T.requireModules, q = !1;
|
|
18115
|
+
N ? N(T) : (each(O, function(E) {
|
|
18114
18116
|
var U = getOwn(l, E);
|
|
18115
18117
|
U && (U.error = T, U.events.error && (q = !0, U.emit("error", T)));
|
|
18116
18118
|
}), q || req.onError(T));
|
|
@@ -18143,15 +18145,15 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18143
18145
|
function $(T) {
|
|
18144
18146
|
delete l[T], delete c[T];
|
|
18145
18147
|
}
|
|
18146
|
-
function L(T, N,
|
|
18148
|
+
function L(T, N, O) {
|
|
18147
18149
|
var q = T.map.id;
|
|
18148
18150
|
T.error ? T.emit("error", T.error) : (N[q] = !0, each(T.depMaps, function(E, U) {
|
|
18149
18151
|
var G = E.id, H = getOwn(l, G);
|
|
18150
|
-
H && !T.depMatched[U] && !
|
|
18151
|
-
}),
|
|
18152
|
+
H && !T.depMatched[U] && !O[G] && (getOwn(N, G) ? (T.defineDep(U, p[G]), T.check()) : L(H, N, O));
|
|
18153
|
+
}), O[q] = !0);
|
|
18152
18154
|
}
|
|
18153
|
-
function
|
|
18154
|
-
var T, N,
|
|
18155
|
+
function z() {
|
|
18156
|
+
var T, N, O = a.waitSeconds * 1e3, q = O && n.startTime + O < (/* @__PURE__ */ new Date()).getTime(), E = [], U = [], G = !1, H = !0;
|
|
18155
18157
|
if (!t) {
|
|
18156
18158
|
if (t = !0, eachProp(c, function(W) {
|
|
18157
18159
|
var X = W.map, J = X.id;
|
|
@@ -18166,17 +18168,17 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18166
18168
|
H && each(U, function(W) {
|
|
18167
18169
|
L(W, {}, {});
|
|
18168
18170
|
}), (!q || N) && G && (isBrowser || isWebWorker) && !i && (i = setTimeout(function() {
|
|
18169
|
-
i = 0,
|
|
18171
|
+
i = 0, z();
|
|
18170
18172
|
}, 50)), t = !1;
|
|
18171
18173
|
}
|
|
18172
18174
|
}
|
|
18173
18175
|
o = function(T) {
|
|
18174
18176
|
this.events = getOwn(u, T.id) || {}, this.map = T, this.shim = getOwn(a.shim, T.id), this.depExports = [], this.depMaps = [], this.depMatched = [], this.pluginMaps = {}, this.depCount = 0;
|
|
18175
18177
|
}, o.prototype = {
|
|
18176
|
-
init: function(T, N,
|
|
18177
|
-
q = q || {}, !this.inited && (this.factory = N,
|
|
18178
|
+
init: function(T, N, O, q) {
|
|
18179
|
+
q = q || {}, !this.inited && (this.factory = N, O ? this.on("error", O) : this.events.error && (O = bind(this, function(E) {
|
|
18178
18180
|
this.emit("error", E);
|
|
18179
|
-
})), this.depMaps = T && T.slice(0), this.errback =
|
|
18181
|
+
})), this.depMaps = T && T.slice(0), this.errback = O, this.inited = !0, this.ignore = q.ignore, q.enabled || this.enabled ? this.enable() : this.check());
|
|
18180
18182
|
},
|
|
18181
18183
|
defineDep: function(T, N) {
|
|
18182
18184
|
this.depMatched[T] || (this.depMatched[T] = !0, this.depCount -= 1, this.depExports[T] = N);
|
|
@@ -18205,9 +18207,9 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18205
18207
|
*/
|
|
18206
18208
|
check: function() {
|
|
18207
18209
|
if (!(!this.enabled || this.enabling)) {
|
|
18208
|
-
var T, N,
|
|
18210
|
+
var T, N, O = this.map.id, q = this.depExports, E = this.exports, U = this.factory;
|
|
18209
18211
|
if (!this.inited)
|
|
18210
|
-
hasProp(n.defQueueMap,
|
|
18212
|
+
hasProp(n.defQueueMap, O) || this.fetch();
|
|
18211
18213
|
else if (this.error)
|
|
18212
18214
|
this.emit("error", this.error);
|
|
18213
18215
|
else if (!this.defining) {
|
|
@@ -18215,31 +18217,31 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18215
18217
|
if (isFunction(U)) {
|
|
18216
18218
|
if (this.events.error && this.map.isDefine || req.onError !== defaultOnError)
|
|
18217
18219
|
try {
|
|
18218
|
-
E = n.execCb(
|
|
18220
|
+
E = n.execCb(O, U, q, E);
|
|
18219
18221
|
} catch (H) {
|
|
18220
18222
|
T = H;
|
|
18221
18223
|
}
|
|
18222
18224
|
else
|
|
18223
|
-
E = n.execCb(
|
|
18225
|
+
E = n.execCb(O, U, q, E);
|
|
18224
18226
|
if (this.map.isDefine && E === void 0 && (N = this.module, N ? E = N.exports : this.usingExports && (E = this.exports)), T)
|
|
18225
18227
|
return T.requireMap = this.map, T.requireModules = this.map.isDefine ? [this.map.id] : null, T.requireType = this.map.isDefine ? "define" : "require", A(this.error = T);
|
|
18226
18228
|
} else
|
|
18227
18229
|
E = U;
|
|
18228
|
-
if (this.exports = E, this.map.isDefine && !this.ignore && (p[
|
|
18230
|
+
if (this.exports = E, this.map.isDefine && !this.ignore && (p[O] = E, req.onResourceLoad)) {
|
|
18229
18231
|
var G = [];
|
|
18230
18232
|
each(this.depMaps, function(H) {
|
|
18231
18233
|
G.push(H.normalizedMap || H);
|
|
18232
18234
|
}), req.onResourceLoad(n, this.map, G);
|
|
18233
18235
|
}
|
|
18234
|
-
$(
|
|
18236
|
+
$(O), this.defined = !0;
|
|
18235
18237
|
}
|
|
18236
18238
|
this.defining = !1, this.defined && !this.defineEmitted && (this.defineEmitted = !0, this.emit("defined", this.exports), this.defineEmitComplete = !0);
|
|
18237
18239
|
}
|
|
18238
18240
|
}
|
|
18239
18241
|
},
|
|
18240
18242
|
callPlugin: function() {
|
|
18241
|
-
var T = this.map, N = T.id,
|
|
18242
|
-
this.depMaps.push(
|
|
18243
|
+
var T = this.map, N = T.id, O = I(T.prefix);
|
|
18244
|
+
this.depMaps.push(O), k(O, "defined", bind(this, function(q) {
|
|
18243
18245
|
var E, U, G, H = getOwn(h, this.map.id), W = this.map.name, X = this.map.parentMap ? this.map.parentMap.name : null, J = n.makeRequire(T.parentMap, {
|
|
18244
18246
|
enableBuildCallback: !0
|
|
18245
18247
|
});
|
|
@@ -18295,11 +18297,11 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18295
18297
|
}
|
|
18296
18298
|
ee && (useInteractive = !0), this.depMaps.push(te), n.completeLoad(Z), J([Z], E);
|
|
18297
18299
|
}), q.load(T.name, J, E, a);
|
|
18298
|
-
})), n.enable(
|
|
18300
|
+
})), n.enable(O, this), this.pluginMaps[O.id] = O;
|
|
18299
18301
|
},
|
|
18300
18302
|
enable: function() {
|
|
18301
18303
|
c[this.map.id] = this, this.enabled = !0, this.enabling = !0, each(this.depMaps, bind(this, function(T, N) {
|
|
18302
|
-
var
|
|
18304
|
+
var O, q, E;
|
|
18303
18305
|
if (typeof T == "string") {
|
|
18304
18306
|
if (T = I(
|
|
18305
18307
|
T,
|
|
@@ -18316,27 +18318,27 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18316
18318
|
this.emit("error", U);
|
|
18317
18319
|
}));
|
|
18318
18320
|
}
|
|
18319
|
-
|
|
18321
|
+
O = T.id, q = l[O], !hasProp(r, O) && q && !q.enabled && n.enable(T, this);
|
|
18320
18322
|
})), eachProp(this.pluginMaps, bind(this, function(T) {
|
|
18321
18323
|
var N = getOwn(l, T.id);
|
|
18322
18324
|
N && !N.enabled && n.enable(T, this);
|
|
18323
18325
|
})), this.enabling = !1, this.check();
|
|
18324
18326
|
},
|
|
18325
18327
|
on: function(T, N) {
|
|
18326
|
-
var
|
|
18327
|
-
|
|
18328
|
+
var O = this.events[T];
|
|
18329
|
+
O || (O = this.events[T] = []), O.push(N);
|
|
18328
18330
|
},
|
|
18329
18331
|
emit: function(T, N) {
|
|
18330
|
-
each(this.events[T], function(
|
|
18331
|
-
|
|
18332
|
+
each(this.events[T], function(O) {
|
|
18333
|
+
O(N);
|
|
18332
18334
|
}), T === "error" && delete this.events[T];
|
|
18333
18335
|
}
|
|
18334
18336
|
};
|
|
18335
18337
|
function j(T) {
|
|
18336
18338
|
hasProp(p, T[0]) || w(I(T[0], null, !0)).init(T[1], T[2]);
|
|
18337
18339
|
}
|
|
18338
|
-
function R(T, N,
|
|
18339
|
-
T.detachEvent && !isOpera ? q && T.detachEvent(q, N) : T.removeEventListener(
|
|
18340
|
+
function R(T, N, O, q) {
|
|
18341
|
+
T.detachEvent && !isOpera ? q && T.detachEvent(q, N) : T.removeEventListener(O, N, !1);
|
|
18340
18342
|
}
|
|
18341
18343
|
function B(T) {
|
|
18342
18344
|
var N = T.currentTarget || T.srcElement;
|
|
@@ -18377,7 +18379,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18377
18379
|
return (U.indexOf("?") === -1 ? "?" : "&") + N;
|
|
18378
18380
|
};
|
|
18379
18381
|
}
|
|
18380
|
-
var
|
|
18382
|
+
var O = a.shim, q = {
|
|
18381
18383
|
paths: !0,
|
|
18382
18384
|
bundles: !0,
|
|
18383
18385
|
config: !0,
|
|
@@ -18392,8 +18394,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18392
18394
|
}), T.shim && (eachProp(T.shim, function(E, U) {
|
|
18393
18395
|
isArray(E) && (E = {
|
|
18394
18396
|
deps: E
|
|
18395
|
-
}), (E.exports || E.init) && !E.exportsFn && (E.exportsFn = n.makeShimExports(E)),
|
|
18396
|
-
}), a.shim =
|
|
18397
|
+
}), (E.exports || E.init) && !E.exportsFn && (E.exportsFn = n.makeShimExports(E)), O[U] = E;
|
|
18398
|
+
}), a.shim = O), T.packages && each(T.packages, function(E) {
|
|
18397
18399
|
var U, G;
|
|
18398
18400
|
E = typeof E == "string" ? { name: E } : E, G = E.name, U = E.location, U && (a.paths[G] = E.location), a.pkgs[G] = E.name + "/" + (E.main || "main").replace(currDirRegExp, "").replace(jsSuffixRegExp, "");
|
|
18399
18401
|
}), eachProp(l, function(E, U) {
|
|
@@ -18402,22 +18404,22 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18402
18404
|
},
|
|
18403
18405
|
makeShimExports: function(T) {
|
|
18404
18406
|
function N() {
|
|
18405
|
-
var
|
|
18406
|
-
return T.init && (
|
|
18407
|
+
var O;
|
|
18408
|
+
return T.init && (O = T.init.apply(global, arguments)), O || T.exports && getGlobal(T.exports);
|
|
18407
18409
|
}
|
|
18408
18410
|
return N;
|
|
18409
18411
|
},
|
|
18410
18412
|
makeRequire: function(T, N) {
|
|
18411
18413
|
N = N || {};
|
|
18412
|
-
function
|
|
18414
|
+
function O(q, E, U) {
|
|
18413
18415
|
var G, H, W;
|
|
18414
|
-
return N.enableBuildCallback && E && isFunction(E) && (E.__requireJsBuild = !0), typeof q == "string" ? isFunction(E) ? A(makeError("requireargs", "Invalid require call"), U) : T && hasProp(r, q) ? r[q](l[T.id]) : req.get ? req.get(n, q, T,
|
|
18416
|
+
return N.enableBuildCallback && E && isFunction(E) && (E.__requireJsBuild = !0), typeof q == "string" ? isFunction(E) ? A(makeError("requireargs", "Invalid require call"), U) : T && hasProp(r, q) ? r[q](l[T.id]) : req.get ? req.get(n, q, T, O) : (H = I(q, T, !1, !0), G = H.id, hasProp(p, G) ? p[G] : A(makeError("notloaded", 'Module name "' + G + '" has not been loaded yet for context: ' + e + (T ? "" : ". Use require([])")))) : (M(), n.nextTick(function() {
|
|
18415
18417
|
M(), W = w(I(null, T)), W.skipMap = N.skipMap, W.init(q, E, U, {
|
|
18416
18418
|
enabled: !0
|
|
18417
|
-
}),
|
|
18418
|
-
}),
|
|
18419
|
+
}), z();
|
|
18420
|
+
}), O);
|
|
18419
18421
|
}
|
|
18420
|
-
return mixin(
|
|
18422
|
+
return mixin(O, {
|
|
18421
18423
|
isBrowser,
|
|
18422
18424
|
/**
|
|
18423
18425
|
* Converts a module name + .extension into an URL path.
|
|
@@ -18438,13 +18440,13 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18438
18440
|
specified: function(q) {
|
|
18439
18441
|
return q = I(q, T, !1, !0).id, hasProp(p, q) || hasProp(l, q);
|
|
18440
18442
|
}
|
|
18441
|
-
}), T || (
|
|
18443
|
+
}), T || (O.undef = function(q) {
|
|
18442
18444
|
D();
|
|
18443
18445
|
var E = I(q, T, !0), U = getOwn(l, q);
|
|
18444
18446
|
U.undefed = !0, b(q), delete p[q], delete m[E.url], delete u[q], eachReverse(d, function(G, H) {
|
|
18445
18447
|
G[0] === q && d.splice(H, 1);
|
|
18446
18448
|
}), delete n.defQueueMap[q], U && (U.events.defined && (u[q] = U.events), $(q));
|
|
18447
|
-
}),
|
|
18449
|
+
}), O;
|
|
18448
18450
|
},
|
|
18449
18451
|
/**
|
|
18450
18452
|
* Called to enable a module if it is still in the registry
|
|
@@ -18463,15 +18465,15 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18463
18465
|
* @param {String} moduleName the name of the module to potentially complete.
|
|
18464
18466
|
*/
|
|
18465
18467
|
completeLoad: function(T) {
|
|
18466
|
-
var N,
|
|
18468
|
+
var N, O, q, E = getOwn(a.shim, T) || {}, U = E.exports;
|
|
18467
18469
|
for (D(); d.length; ) {
|
|
18468
|
-
if (
|
|
18469
|
-
if (
|
|
18470
|
+
if (O = d.shift(), O[0] === null) {
|
|
18471
|
+
if (O[0] = T, N)
|
|
18470
18472
|
break;
|
|
18471
18473
|
N = !0;
|
|
18472
18474
|
} else
|
|
18473
|
-
|
|
18474
|
-
j(
|
|
18475
|
+
O[0] === T && (N = !0);
|
|
18476
|
+
j(O);
|
|
18475
18477
|
}
|
|
18476
18478
|
if (n.defQueueMap = {}, q = getOwn(l, T), !N && !hasProp(p, T) && q && !q.inited) {
|
|
18477
18479
|
if (a.enforceDefine && (!U || !getGlobal(U)))
|
|
@@ -18483,7 +18485,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18483
18485
|
));
|
|
18484
18486
|
j([T, E.deps || [], E.exportsFn]);
|
|
18485
18487
|
}
|
|
18486
|
-
|
|
18488
|
+
z();
|
|
18487
18489
|
},
|
|
18488
18490
|
/**
|
|
18489
18491
|
* Converts a module name to a file path. Supports cases where
|
|
@@ -18492,10 +18494,10 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18492
18494
|
* it is assumed to have already been normalized. This is an
|
|
18493
18495
|
* internal API, not a public one. Use toUrl for the public API.
|
|
18494
18496
|
*/
|
|
18495
|
-
nameToUrl: function(T, N,
|
|
18497
|
+
nameToUrl: function(T, N, O) {
|
|
18496
18498
|
var q, E, U, G, H, W, X, J = getOwn(a.pkgs, T);
|
|
18497
18499
|
if (J && (T = J), X = getOwn(h, T), X)
|
|
18498
|
-
return n.nameToUrl(X, N,
|
|
18500
|
+
return n.nameToUrl(X, N, O);
|
|
18499
18501
|
if (req.jsExtRegExp.test(T))
|
|
18500
18502
|
H = T + (N || "");
|
|
18501
18503
|
else {
|
|
@@ -18504,7 +18506,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18504
18506
|
isArray(W) && (W = W[0]), E.splice(0, U, W);
|
|
18505
18507
|
break;
|
|
18506
18508
|
}
|
|
18507
|
-
H = E.join("/"), H += N || (/^data\:|^blob\:|\?/.test(H) ||
|
|
18509
|
+
H = E.join("/"), H += N || (/^data\:|^blob\:|\?/.test(H) || O ? "" : ".js"), H = (H.charAt(0) === "/" || H.match(/^[\w\+\.\-]+:/) ? "" : a.baseUrl) + H;
|
|
18508
18510
|
}
|
|
18509
18511
|
return a.urlArgs && !/^blob\:/.test(H) ? H + a.urlArgs(T, H) : H;
|
|
18510
18512
|
},
|
|
@@ -18520,8 +18522,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18520
18522
|
*
|
|
18521
18523
|
* @private
|
|
18522
18524
|
*/
|
|
18523
|
-
execCb: function(T, N,
|
|
18524
|
-
return N.apply(q,
|
|
18525
|
+
execCb: function(T, N, O, q) {
|
|
18526
|
+
return N.apply(q, O);
|
|
18525
18527
|
},
|
|
18526
18528
|
/**
|
|
18527
18529
|
* callback for script loads, used to check status of loading.
|
|
@@ -18542,13 +18544,13 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18542
18544
|
onScriptError: function(T) {
|
|
18543
18545
|
var N = B(T);
|
|
18544
18546
|
if (!y(N.id)) {
|
|
18545
|
-
var
|
|
18547
|
+
var O = [];
|
|
18546
18548
|
return eachProp(l, function(q, E) {
|
|
18547
18549
|
E.indexOf("_@r") !== 0 && each(q.depMaps, function(U) {
|
|
18548
18550
|
if (U.id === N.id)
|
|
18549
|
-
return
|
|
18551
|
+
return O.push(E), !0;
|
|
18550
18552
|
});
|
|
18551
|
-
}), A(makeError("scripterror", 'Script error for "' + N.id + (
|
|
18553
|
+
}), A(makeError("scripterror", 'Script error for "' + N.id + (O.length ? '", needed by: ' + O.join(", ") : '"'), T, [N.id]));
|
|
18552
18554
|
}
|
|
18553
18555
|
}
|
|
18554
18556
|
}, n.require = n.makeRequire(), n;
|
|
@@ -19090,10 +19092,10 @@ const useCollectionManager_deprecated = (e) => {
|
|
|
19090
19092
|
[t, p]
|
|
19091
19093
|
), v = useCallback(
|
|
19092
19094
|
(R, B = !1, M) => {
|
|
19093
|
-
var
|
|
19095
|
+
var O;
|
|
19094
19096
|
if (!R)
|
|
19095
19097
|
return [];
|
|
19096
|
-
const T = (
|
|
19098
|
+
const T = (O = p(M)) == null ? void 0 : O.getCollection(R);
|
|
19097
19099
|
return (T == null ? void 0 : T.getChildrenCollections(B)) || [];
|
|
19098
19100
|
},
|
|
19099
19101
|
[t, p]
|
|
@@ -19109,7 +19111,7 @@ const useCollectionManager_deprecated = (e) => {
|
|
|
19109
19111
|
const {
|
|
19110
19112
|
association: T = !1,
|
|
19111
19113
|
cached: N = {},
|
|
19112
|
-
collectionNames:
|
|
19114
|
+
collectionNames: O = [R],
|
|
19113
19115
|
maxDepth: q = 1,
|
|
19114
19116
|
allowAllTypes: E = !1,
|
|
19115
19117
|
exceptInterfaces: U = [],
|
|
@@ -19117,7 +19119,7 @@ const useCollectionManager_deprecated = (e) => {
|
|
|
19117
19119
|
usePrefix: H = !1,
|
|
19118
19120
|
dataSource: W
|
|
19119
19121
|
} = M || {};
|
|
19120
|
-
if (
|
|
19122
|
+
if (O.length - 1 > q)
|
|
19121
19123
|
return;
|
|
19122
19124
|
if (N[R])
|
|
19123
19125
|
return _.cloneDeep(N[R]);
|
|
@@ -19130,10 +19132,10 @@ const useCollectionManager_deprecated = (e) => {
|
|
|
19130
19132
|
value: H && G ? `${G}.${Q.name}` : Q.name,
|
|
19131
19133
|
label: f((te = Q == null ? void 0 : Q.uiSchema) == null ? void 0 : te.title) || Q.name
|
|
19132
19134
|
}, Q);
|
|
19133
|
-
return T && Q.target && (Z.children =
|
|
19135
|
+
return T && Q.target && (Z.children = O.includes(Q.target) ? [] : w(Q.target, B, F(x({}, M), {
|
|
19134
19136
|
cached: N,
|
|
19135
19137
|
dataSource: W,
|
|
19136
|
-
collectionNames: [...
|
|
19138
|
+
collectionNames: [...O, Q.target],
|
|
19137
19139
|
prefixFieldValue: H ? G ? `${G}.${Q.name}` : Q.name : "",
|
|
19138
19140
|
usePrefix: H
|
|
19139
19141
|
})), !((ee = Z.children) != null && ee.length)) ? null : Z;
|
|
@@ -19168,7 +19170,7 @@ const useCollectionManager_deprecated = (e) => {
|
|
|
19168
19170
|
return (B = $(R.interface)) == null ? void 0 : B.titleUsable;
|
|
19169
19171
|
},
|
|
19170
19172
|
[$]
|
|
19171
|
-
),
|
|
19173
|
+
), z = useCallback(
|
|
19172
19174
|
(R, B, M) => {
|
|
19173
19175
|
var T, N;
|
|
19174
19176
|
return (N = (T = p(M)) == null ? void 0 : T.getCollection(B)) == null ? void 0 : N.getParentCollectionFields(R);
|
|
@@ -19186,7 +19188,7 @@ const useCollectionManager_deprecated = (e) => {
|
|
|
19186
19188
|
getTemplate: j,
|
|
19187
19189
|
getInterface: $,
|
|
19188
19190
|
getCollections: d,
|
|
19189
|
-
getParentCollectionFields:
|
|
19191
|
+
getParentCollectionFields: z,
|
|
19190
19192
|
getInheritCollections: y,
|
|
19191
19193
|
getChildrenCollections: v,
|
|
19192
19194
|
refreshCM: g,
|
|
@@ -19426,7 +19428,7 @@ const useUserVariable = ({
|
|
|
19426
19428
|
collectionField: e,
|
|
19427
19429
|
noDisabled: r,
|
|
19428
19430
|
targetFieldSchema: i
|
|
19429
|
-
}), { urlSearchParamsSettings: L, shouldDisplay:
|
|
19431
|
+
}), { urlSearchParamsSettings: L, shouldDisplay: z } = useURLSearchParamsVariable();
|
|
19430
19432
|
return useMemo(() => [
|
|
19431
19433
|
u,
|
|
19432
19434
|
d,
|
|
@@ -19439,7 +19441,7 @@ const useUserVariable = ({
|
|
|
19439
19441
|
$ && D,
|
|
19440
19442
|
w && I,
|
|
19441
19443
|
A && k,
|
|
19442
|
-
|
|
19444
|
+
z && L
|
|
19443
19445
|
].filter(Boolean).filter(l), [
|
|
19444
19446
|
u,
|
|
19445
19447
|
d,
|
|
@@ -19457,7 +19459,7 @@ const useUserVariable = ({
|
|
|
19457
19459
|
D,
|
|
19458
19460
|
w,
|
|
19459
19461
|
I,
|
|
19460
|
-
|
|
19462
|
+
z,
|
|
19461
19463
|
L
|
|
19462
19464
|
]);
|
|
19463
19465
|
}, RemoveConditionContext = createContext(null);
|
|
@@ -21521,7 +21523,7 @@ const SchemaSettingsProvider = (e) => {
|
|
|
21521
21523
|
} catch (B) {
|
|
21522
21524
|
console.error(B);
|
|
21523
21525
|
}
|
|
21524
|
-
}), [D, o]),
|
|
21526
|
+
}), [D, o]), z = useCallback(() => V(void 0, null, function* () {
|
|
21525
21527
|
!g && (a != null && a["x-uid"]) && (S["x-action-settings"].schemaUid = a["x-uid"], y.emit("patch", { schema: S }), yield I.resource("uiSchemas").insert({ values: a }), f(a["x-uid"])), typeof i == "function" && (i == null || i()), b.setVisible(!1), h(!0);
|
|
21526
21528
|
}), [I, b, y, S, a, g]), j = useCallback((B) => B.stopPropagation(), []);
|
|
21527
21529
|
return /* @__PURE__ */ jsxs(zIndexContext.Provider, { value: A, children: [
|
|
@@ -21530,7 +21532,7 @@ const SchemaSettingsProvider = (e) => {
|
|
|
21530
21532
|
F(x({
|
|
21531
21533
|
title: v(t)
|
|
21532
21534
|
}, p), {
|
|
21533
|
-
onClick:
|
|
21535
|
+
onClick: z,
|
|
21534
21536
|
onKeyDown: j,
|
|
21535
21537
|
children: e.children || e.title
|
|
21536
21538
|
})
|
|
@@ -21564,7 +21566,7 @@ const SchemaSettingsProvider = (e) => {
|
|
|
21564
21566
|
});
|
|
21565
21567
|
SchemaSettingsActionModalItem.displayName = "SchemaSettingsActionModalItem";
|
|
21566
21568
|
const SchemaSettingsModalItem = (e) => {
|
|
21567
|
-
const
|
|
21569
|
+
const O = e, {
|
|
21568
21570
|
hidden: t,
|
|
21569
21571
|
title: o,
|
|
21570
21572
|
components: n,
|
|
@@ -21576,7 +21578,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21576
21578
|
width: u = "fit-content",
|
|
21577
21579
|
noRecord: d = !1,
|
|
21578
21580
|
ModalContextProvider: p = (q) => /* @__PURE__ */ jsx(Fragment, { children: q.children })
|
|
21579
|
-
} =
|
|
21581
|
+
} = O, m = K(O, [
|
|
21580
21582
|
"hidden",
|
|
21581
21583
|
"title",
|
|
21582
21584
|
"components",
|
|
@@ -21588,7 +21590,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21588
21590
|
"width",
|
|
21589
21591
|
"noRecord",
|
|
21590
21592
|
"ModalContextProvider"
|
|
21591
|
-
]), h = useContext(SchemaOptionsContext), g = useCollection_deprecated(), f = useAPIClient(), C = useApp(), { theme: S } = useGlobalTheme(), b = useBlockRequestContext(), y = useFormActiveFields(), { locale: v } = useContext(ConfigProvider.ConfigContext), I = useDataSourceManager(), w = useDataSourceKey(), k = useCollectionRecord(), { association: A } = useDataBlockProps() || {}, D = useFormBlockContext(), $ = useBlockContext(), { getOperators: L } = useOperators(),
|
|
21593
|
+
]), h = useContext(SchemaOptionsContext), g = useCollection_deprecated(), f = useAPIClient(), C = useApp(), { theme: S } = useGlobalTheme(), b = useBlockRequestContext(), y = useFormActiveFields(), { locale: v } = useContext(ConfigProvider.ConfigContext), I = useDataSourceManager(), w = useDataSourceKey(), k = useCollectionRecord(), { association: A } = useDataBlockProps() || {}, D = useFormBlockContext(), $ = useBlockContext(), { getOperators: L } = useOperators(), z = useLocationSearch(), j = useVariables(), { formValue: R, collection: B, parent: M } = useSubFormValue(), T = useCurrentPopupRecord(), N = useParentPopupRecord();
|
|
21592
21594
|
return t ? null : /* @__PURE__ */ jsx(
|
|
21593
21595
|
SchemaSettingsItem,
|
|
21594
21596
|
F(x({
|
|
@@ -21612,7 +21614,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21612
21614
|
{
|
|
21613
21615
|
name: "form",
|
|
21614
21616
|
getActiveFieldsName: y == null ? void 0 : y.getActiveFieldsName,
|
|
21615
|
-
children: /* @__PURE__ */ jsx(LocationSearchContext.Provider, { value:
|
|
21617
|
+
children: /* @__PURE__ */ jsx(LocationSearchContext.Provider, { value: z, children: /* @__PURE__ */ jsx(BlockRequestContext_deprecated.Provider, { value: b, children: /* @__PURE__ */ jsx(DataSourceApplicationProvider, { dataSourceManager: I, dataSource: w, children: /* @__PURE__ */ jsx(
|
|
21616
21618
|
AssociationOrCollectionProvider,
|
|
21617
21619
|
{
|
|
21618
21620
|
allowNull: !0,
|
|
@@ -21788,10 +21790,10 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21788
21790
|
}),
|
|
21789
21791
|
[o, a, l, S, m, h, u, p, w, r]
|
|
21790
21792
|
), D = useMemo(() => ({ ArrayCollapse: ArrayCollapse$2, FormLayout }), []), $ = useCallback(
|
|
21791
|
-
(
|
|
21793
|
+
(z) => {
|
|
21792
21794
|
var T;
|
|
21793
21795
|
const j = [];
|
|
21794
|
-
for (const N of
|
|
21796
|
+
for (const N of z.fieldReaction.rules)
|
|
21795
21797
|
j.push(_.pickBy(N, _.identity));
|
|
21796
21798
|
const R = S["x-component"] === "BlockTemplate" && ((T = S["x-component-props"]) == null ? void 0 : T.templateId), M = {
|
|
21797
21799
|
"x-uid": R && d(R).uid || S["x-uid"]
|
|
@@ -22474,8 +22476,8 @@ const useColumnSchema$1 = () => {
|
|
|
22474
22476
|
(n.componentProps.picker || "date") !== D.picker && !m && n.value && (n.value = void 0, n.initialValue = void 0, o.default = void 0, $.default = void 0), $["x-component-props"] = n.componentProps || {}, o["x-component-props"] = x(x({}, n.componentProps || {}), D), $["x-component-props"] = o["x-component-props"], n.componentProps = o["x-component-props"];
|
|
22475
22477
|
const L = n.path.entire.split(".");
|
|
22476
22478
|
L.pop();
|
|
22477
|
-
const
|
|
22478
|
-
n.query(`${
|
|
22479
|
+
const z = L.join(".");
|
|
22480
|
+
n.query(`${z}.*[0:].${o.name}`).forEach((j) => {
|
|
22479
22481
|
j.props.name === o.name && ((n.componentProps.picker || "date") !== D.picker && !m && (j.value = void 0, j.initialValue = void 0), j.setComponentProps(x({}, D)));
|
|
22480
22482
|
}), r.emit("patch", {
|
|
22481
22483
|
schema: $
|
|
@@ -22497,7 +22499,7 @@ const getActionContext = (e) => {
|
|
|
22497
22499
|
var o;
|
|
22498
22500
|
return ((o = e.fieldSchema) == null ? void 0 : o["x-action-context"]) || {};
|
|
22499
22501
|
}, SchemaSettingsDefaultValue = function e(t) {
|
|
22500
|
-
var T, N,
|
|
22502
|
+
var T, N, O;
|
|
22501
22503
|
const o = useFieldSchema(), n = (T = t == null ? void 0 : t.fieldSchema) != null ? T : o, r = useField(), { dn: i } = useDesignable(), { t: a } = useTranslation(), l = useActionContext(), c = getActionContext(l).collection;
|
|
22502
22504
|
let u;
|
|
22503
22505
|
const { getField: d } = useCollection_deprecated(), { getCollectionJoinField: p, getCollectionFields: m, getAllCollectionsInheritChain: h } = useCollectionManager_deprecated(), g = useVariables(), f = useLocalVariables(), C = useCollection_deprecated(), S = useRecord(), { form: b } = useFormBlockContext(), { getFields: y } = useCollectionFilterOptionsV2(C), { isInSubForm: v, isInSubTable: I } = useFlag() || {}, { name: w } = C, k = useMemo(
|
|
@@ -22505,9 +22507,9 @@ const getActionContext = (e) => {
|
|
|
22505
22507
|
[n, p, d]
|
|
22506
22508
|
), A = _.omit(n, "required");
|
|
22507
22509
|
k != null && k.target && (u = p(
|
|
22508
|
-
`${k.target}.${((
|
|
22510
|
+
`${k.target}.${((O = (N = n["x-component-props"]) == null ? void 0 : N.fieldNames) == null ? void 0 : O.label) || "id"}`
|
|
22509
22511
|
));
|
|
22510
|
-
const D = (k == null ? void 0 : k.interface) === "m2o" && findParentFieldSchema(n), $ = D && p(D == null ? void 0 : D["x-collection-field"]), L = useTableBlockContext(),
|
|
22512
|
+
const D = (k == null ? void 0 : k.interface) === "m2o" && findParentFieldSchema(n), $ = D && p(D == null ? void 0 : D["x-collection-field"]), L = useTableBlockContext(), z = (k == null ? void 0 : k.interface) === "m2m" || ($ == null ? void 0 : $.type) === "hasMany" && (k == null ? void 0 : k.interface) === "m2o", j = useCallback(
|
|
22511
22513
|
(q) => {
|
|
22512
22514
|
const E = q.find((G) => G.value === "$nForm"), U = m(w);
|
|
22513
22515
|
return !(U != null && U.length) && E && (E.children = formatVariableScop(y())), q;
|
|
@@ -22532,7 +22534,7 @@ const getActionContext = (e) => {
|
|
|
22532
22534
|
"x-component": "VariableInput",
|
|
22533
22535
|
"x-component-props": F(x({}, (n == null ? void 0 : n["x-component-props"]) || {}), {
|
|
22534
22536
|
collectionField: k,
|
|
22535
|
-
contextCollectionName:
|
|
22537
|
+
contextCollectionName: z ? c : "",
|
|
22536
22538
|
schema: k == null ? void 0 : k.uiSchema,
|
|
22537
22539
|
targetFieldSchema: n,
|
|
22538
22540
|
className: defaultInputStyle,
|
|
@@ -22580,7 +22582,7 @@ const getActionContext = (e) => {
|
|
|
22580
22582
|
A,
|
|
22581
22583
|
b,
|
|
22582
22584
|
h,
|
|
22583
|
-
|
|
22585
|
+
z,
|
|
22584
22586
|
f,
|
|
22585
22587
|
S,
|
|
22586
22588
|
j,
|
|
@@ -23355,8 +23357,8 @@ const useGetFilterOptions = () => {
|
|
|
23355
23357
|
};
|
|
23356
23358
|
});
|
|
23357
23359
|
}, TableColumnDesigner$1 = (e) => {
|
|
23358
|
-
var L,
|
|
23359
|
-
const { uiSchema: t, fieldSchema: o, collectionField: n } = e, { form: r } = useFormBlockContext(), { getInterface: i, getCollection: a } = useCollectionManager_deprecated(), l = useField(), { t: c } = useTranslation(), u = useFieldSchema(), { dn: d } = useDesignable(), p = ((L = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : L.fieldNames) || ((
|
|
23360
|
+
var L, z, j, R, B, M, T, N, O, q, E, U;
|
|
23361
|
+
const { uiSchema: t, fieldSchema: o, collectionField: n } = e, { form: r } = useFormBlockContext(), { getInterface: i, getCollection: a } = useCollectionManager_deprecated(), l = useField(), { t: c } = useTranslation(), u = useFieldSchema(), { dn: d } = useDesignable(), p = ((L = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : L.fieldNames) || ((z = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : z.fieldNames), m = useLabelFields$1((j = n == null ? void 0 : n.target) != null ? j : n == null ? void 0 : n.targetCollection), h = useColorFields((R = n == null ? void 0 : n.target) != null ? R : n == null ? void 0 : n.targetCollection), g = i(n == null ? void 0 : n.interface), f = a(n == null ? void 0 : n.target), C = isFileCollection$2(f), S = ["QuickEdit", "FormItem"].includes(o["x-decorator"]), { currentMode: b } = useAssociationFieldContext(), { isAllowToSetDefaultValue: y } = useIsAllowToSetDefaultValue({ collectionField: n, fieldSchema: o }), v = ["datetime", "createdAt", "updatedAt"].includes(n == null ? void 0 : n.interface), I = ["obo", "oho", "o2o", "o2m", "m2m", "m2o", "snapshot"].includes(
|
|
23360
23362
|
n == null ? void 0 : n.interface
|
|
23361
23363
|
), w = useFieldModeOptions({ fieldSchema: o }), k = ((B = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : B.mode) || "Select";
|
|
23362
23364
|
let A = "editable";
|
|
@@ -23398,7 +23400,7 @@ const useGetFilterOptions = () => {
|
|
|
23398
23400
|
SchemaSettingsDataScope,
|
|
23399
23401
|
{
|
|
23400
23402
|
collectionName: n == null ? void 0 : n.target,
|
|
23401
|
-
defaultFilter: ((
|
|
23403
|
+
defaultFilter: ((O = (N = (T = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : T.service) == null ? void 0 : N.params) == null ? void 0 : O.filter) || {},
|
|
23402
23404
|
form: r,
|
|
23403
23405
|
onSubmit: ({ filter: G }) => {
|
|
23404
23406
|
var W, X;
|
|
@@ -24592,8 +24594,8 @@ function useCollectValuesToSubmit() {
|
|
|
24592
24594
|
}), b = {}, y = Object.keys(f).map((D) => V(this, null, function* () {
|
|
24593
24595
|
const $ = f[D], L = i(D);
|
|
24594
24596
|
if (isVariable($)) {
|
|
24595
|
-
const { value:
|
|
24596
|
-
|
|
24597
|
+
const { value: z } = (yield p == null ? void 0 : p.parseVariable($, m)) || {};
|
|
24598
|
+
z != null && (b[D] = transformVariableValue(z, { targetCollectionField: L }));
|
|
24597
24599
|
} else
|
|
24598
24600
|
$ != null && $ !== "" && (b[D] = $);
|
|
24599
24601
|
}));
|
|
@@ -24628,11 +24630,11 @@ const useCreateActionProps = () => {
|
|
|
24628
24630
|
var j;
|
|
24629
24631
|
const { onSuccess: v, skipValidator: I, triggerWorkflows: w } = (j = u == null ? void 0 : u["x-action-settings"]) != null ? j : {}, { manualClose: k, redirecting: A, redirectTo: D, successMessage: $, actionAfterSuccess: L } = v || {};
|
|
24630
24632
|
I || (yield o.submit());
|
|
24631
|
-
const
|
|
24633
|
+
const z = yield f();
|
|
24632
24634
|
d.data = n.data || {}, d.data.loading = !0;
|
|
24633
24635
|
try {
|
|
24634
24636
|
const R = yield r[C]({
|
|
24635
|
-
values:
|
|
24637
|
+
values: z,
|
|
24636
24638
|
filterKeys: S,
|
|
24637
24639
|
filterByTk: e,
|
|
24638
24640
|
// TODO(refactor): should change to inject by plugin
|
|
@@ -24661,14 +24663,14 @@ const useCreateActionProps = () => {
|
|
|
24661
24663
|
return {
|
|
24662
24664
|
onClick() {
|
|
24663
24665
|
return V(this, null, function* () {
|
|
24664
|
-
var N,
|
|
24666
|
+
var N, O, q, E, U, G;
|
|
24665
24667
|
const k = u.map((H) => H.name), {
|
|
24666
24668
|
assignedValues: A = {},
|
|
24667
24669
|
onSuccess: D,
|
|
24668
24670
|
overwriteValues: $,
|
|
24669
24671
|
skipValidator: L,
|
|
24670
|
-
triggerWorkflows:
|
|
24671
|
-
} = (N = l == null ? void 0 : l["x-action-settings"]) != null ? N : {}, j = (
|
|
24672
|
+
triggerWorkflows: z
|
|
24673
|
+
} = (N = l == null ? void 0 : l["x-action-settings"]) != null ? N : {}, j = (O = i == null ? void 0 : i["x-component-props"]) == null ? void 0 : O.addChild, { successMessage: R } = D || {}, B = {}, M = Object.keys(A).map((H) => V(this, null, function* () {
|
|
24672
24674
|
const W = A[H], X = d(H);
|
|
24673
24675
|
if (isVariable(W)) {
|
|
24674
24676
|
const { value: J } = (yield C == null ? void 0 : C.parseVariable(W, S)) || {};
|
|
@@ -24696,7 +24698,7 @@ const useCreateActionProps = () => {
|
|
|
24696
24698
|
values: x(x(x({}, T), $), B),
|
|
24697
24699
|
filterKeys: v,
|
|
24698
24700
|
// TODO(refactor): should change to inject by plugin
|
|
24699
|
-
triggerWorkflows:
|
|
24701
|
+
triggerWorkflows: z != null && z.length ? z.map((W) => [W.workflowKey, W.context].filter(Boolean).join("!")).join(",") : void 0
|
|
24700
24702
|
});
|
|
24701
24703
|
if (c.data.loading = !1, c.data.data = H, (G = (U = n == null ? void 0 : n.service) == null ? void 0 : U.refresh) == null || G.call(U), r == null || r(!1), a == null || a(!0), !R)
|
|
24702
24704
|
return;
|
|
@@ -24803,13 +24805,13 @@ const useCreateActionProps = () => {
|
|
|
24803
24805
|
return {
|
|
24804
24806
|
onClick(f, C) {
|
|
24805
24807
|
return V(this, null, function* () {
|
|
24806
|
-
var
|
|
24808
|
+
var z, j, R;
|
|
24807
24809
|
const {
|
|
24808
24810
|
assignedValues: S = {},
|
|
24809
24811
|
onSuccess: b,
|
|
24810
24812
|
skipValidator: y,
|
|
24811
24813
|
triggerWorkflows: v
|
|
24812
|
-
} = (
|
|
24814
|
+
} = (z = r == null ? void 0 : r["x-action-settings"]) != null ? z : {}, { manualClose: I, redirecting: w, redirectTo: k, successMessage: A, actionAfterSuccess: D } = b || {}, $ = {}, L = Object.keys(S).map((B) => V(this, null, function* () {
|
|
24813
24815
|
const M = S[B], T = m(B);
|
|
24814
24816
|
if (isVariable(M)) {
|
|
24815
24817
|
const { value: N } = (yield u == null ? void 0 : u.parseVariable(M, d)) || {};
|
|
@@ -24844,7 +24846,7 @@ const useCreateActionProps = () => {
|
|
|
24844
24846
|
assignedValues: A = {},
|
|
24845
24847
|
onSuccess: D,
|
|
24846
24848
|
updateMode: $
|
|
24847
|
-
} = (N = i == null ? void 0 : i["x-action-settings"]) != null ? N : {}, { manualClose: L, redirecting:
|
|
24849
|
+
} = (N = i == null ? void 0 : i["x-action-settings"]) != null ? N : {}, { manualClose: L, redirecting: z, redirectTo: j, successMessage: R, actionAfterSuccess: B } = D || {};
|
|
24848
24850
|
m.data = e.data || {}, m.data.loading = !0;
|
|
24849
24851
|
const M = {}, T = Object.keys(A).map((q) => V(this, null, function* () {
|
|
24850
24852
|
const E = A[q], U = C(q);
|
|
@@ -24854,7 +24856,7 @@ const useCreateActionProps = () => {
|
|
|
24854
24856
|
} else
|
|
24855
24857
|
E != null && E !== "" && (M[q] = E);
|
|
24856
24858
|
}));
|
|
24857
|
-
yield Promise.all(T), (B === "previous" || !B &&
|
|
24859
|
+
yield Promise.all(T), (B === "previous" || !B && z !== !0) && (b == null || b(!1)), h.confirm({
|
|
24858
24860
|
title: p("Bulk update"),
|
|
24859
24861
|
content: p($ === "selected" ? "Update selected data?" : "Update all data?"),
|
|
24860
24862
|
onOk() {
|
|
@@ -24882,9 +24884,9 @@ const useCreateActionProps = () => {
|
|
|
24882
24884
|
t instanceof TableFieldResource || (W = (H = o == null ? void 0 : o.service) == null ? void 0 : H.refresh) == null || W.call(H), R && (L ? h.success({
|
|
24883
24885
|
title: d(R),
|
|
24884
24886
|
onOk: () => V(this, null, function* () {
|
|
24885
|
-
(
|
|
24887
|
+
(z && !B || B === "redirect") && j && (isURL(j) ? window.location.href = j : u(j));
|
|
24886
24888
|
})
|
|
24887
|
-
}) : (message.success(d(R)), (
|
|
24889
|
+
}) : (message.success(d(R)), (z && !B || B === "redirect") && j && (isURL(j) ? window.location.href = j : u(j))));
|
|
24888
24890
|
});
|
|
24889
24891
|
},
|
|
24890
24892
|
onCancel() {
|
|
@@ -24903,7 +24905,7 @@ const useCreateActionProps = () => {
|
|
|
24903
24905
|
onClick() {
|
|
24904
24906
|
return V(this, null, function* () {
|
|
24905
24907
|
var q, E, U, G;
|
|
24906
|
-
const { skipValidator: w, onSuccess: k, requestSettings: A } = (q = n == null ? void 0 : n["x-action-settings"]) != null ? q : {}, { manualClose: D, redirecting: $, redirectTo: L, successMessage:
|
|
24908
|
+
const { skipValidator: w, onSuccess: k, requestSettings: A } = (q = n == null ? void 0 : n["x-action-settings"]) != null ? q : {}, { manualClose: D, redirecting: $, redirectTo: L, successMessage: z, actionAfterSuccess: j } = k || {}, R = n == null ? void 0 : n["x-action"];
|
|
24907
24909
|
if (!A.url)
|
|
24908
24910
|
return;
|
|
24909
24911
|
w !== !0 && R === "customize:form:request" && (yield i.submit());
|
|
@@ -24920,7 +24922,7 @@ const useCreateActionProps = () => {
|
|
|
24920
24922
|
});
|
|
24921
24923
|
Object.assign(T, W);
|
|
24922
24924
|
}
|
|
24923
|
-
const
|
|
24925
|
+
const O = {
|
|
24924
24926
|
url: renderTemplate(A.url, { currentRecord: m, currentUser: g }),
|
|
24925
24927
|
method: A.method,
|
|
24926
24928
|
headers: parse(B)({ currentRecord: m, currentUser: g }),
|
|
@@ -24929,12 +24931,12 @@ const useCreateActionProps = () => {
|
|
|
24929
24931
|
};
|
|
24930
24932
|
f.data = c.data || {}, f.data.loading = !0;
|
|
24931
24933
|
try {
|
|
24932
|
-
yield e.request(x({},
|
|
24933
|
-
title: r(
|
|
24934
|
+
yield e.request(x({}, O)), f.data.loading = !1, u instanceof TableFieldResource || (U = (E = d == null ? void 0 : d.service) == null ? void 0 : E.refresh) == null || U.call(E), (G = p == null ? void 0 : p.refresh) == null || G.call(p), R === "customize:form:request" && (j === "previous" || !j && $ !== !0) && (S == null || S(!1)), z || (message.success(C("Saved successfully")), yield resetFormCorrectly(i), ($ && !j || j === "redirect") && L && (isURL(L) ? window.location.href = L : t(L))), D ? b.success({
|
|
24935
|
+
title: r(z),
|
|
24934
24936
|
onOk: () => V(this, null, function* () {
|
|
24935
24937
|
($ && !j || j === "redirect") && L && (isURL(L) ? window.location.href = L : t(L));
|
|
24936
24938
|
})
|
|
24937
|
-
}) : message.success(r(
|
|
24939
|
+
}) : message.success(r(z));
|
|
24938
24940
|
} finally {
|
|
24939
24941
|
f.data.loading = !1;
|
|
24940
24942
|
}
|
|
@@ -24953,7 +24955,7 @@ const useCreateActionProps = () => {
|
|
|
24953
24955
|
overwriteValues: D,
|
|
24954
24956
|
skipValidator: $,
|
|
24955
24957
|
triggerWorkflows: L
|
|
24956
|
-
} = (E = l == null ? void 0 : l["x-action-settings"]) != null ? E : {}, { manualClose:
|
|
24958
|
+
} = (E = l == null ? void 0 : l["x-action-settings"]) != null ? E : {}, { manualClose: z, redirecting: j, redirectTo: R, successMessage: B, actionAfterSuccess: M } = A || {}, T = {}, N = Object.keys(k).map((U) => V(this, null, function* () {
|
|
24957
24959
|
const G = k[U], H = d(U);
|
|
24958
24960
|
if (isVariable(G)) {
|
|
24959
24961
|
const { value: W } = (yield S == null ? void 0 : S.parseVariable(G, b)) || {};
|
|
@@ -24962,11 +24964,11 @@ const useCreateActionProps = () => {
|
|
|
24962
24964
|
G != null && G !== "" && (T[U] = G);
|
|
24963
24965
|
}));
|
|
24964
24966
|
yield Promise.all(N), $ || (yield e.submit());
|
|
24965
|
-
const
|
|
24967
|
+
const O = u.map((U) => U.name), q = getFormValues({
|
|
24966
24968
|
filterByTk: t,
|
|
24967
24969
|
field: o,
|
|
24968
24970
|
form: e,
|
|
24969
|
-
fieldNames:
|
|
24971
|
+
fieldNames: O,
|
|
24970
24972
|
getField: d,
|
|
24971
24973
|
resource: n,
|
|
24972
24974
|
actionFields: (y == null ? void 0 : y("form")) || []
|
|
@@ -24982,7 +24984,7 @@ const useCreateActionProps = () => {
|
|
|
24982
24984
|
triggerWorkflows: L != null && L.length ? L.map((U) => [U.workflowKey, U.context].filter(Boolean).join("!")).join(",") : void 0
|
|
24983
24985
|
})), h.data.loading = !1, w && (w == null || w()), (M === "previous" || !M && j !== !0) && (i == null || i(!1)), a == null || a(!1), !B)
|
|
24984
24986
|
return;
|
|
24985
|
-
|
|
24987
|
+
z ? f.success({
|
|
24986
24988
|
title: m(B),
|
|
24987
24989
|
onOk: () => V(this, null, function* () {
|
|
24988
24990
|
yield e.reset(), (j && !M || M === "redirect") && R && (isURL(R) ? window.location.href = R : c(R));
|
|
@@ -25193,7 +25195,7 @@ const useCreateActionProps = () => {
|
|
|
25193
25195
|
var o;
|
|
25194
25196
|
return ["select", "multipleSelect", "checkbox", "checkboxGroup", "chinaRegion"].includes(e == null ? void 0 : e.interface) && ((o = e == null ? void 0 : e.uiSchema) == null ? void 0 : o.enum);
|
|
25195
25197
|
}, useAssociationFilterBlockProps = () => {
|
|
25196
|
-
var v, I, w, k, A, D, $, L,
|
|
25198
|
+
var v, I, w, k, A, D, $, L, z, j;
|
|
25197
25199
|
const e = AssociationFilter.useAssociationField(), t = useFieldSchema(), o = useOptionalFieldList(), { getDataBlocks: n } = useFilterBlock(), r = e == null ? void 0 : e.name, i = useField(), { props: a } = useBlockRequestContext(), l = useDataSourceHeaders(a == null ? void 0 : a.dataSource), c = useCollectionManager_deprecated(), { filter: u, parseVariableLoading: d } = useParsedFilter({ filterOption: (I = (v = i.componentProps) == null ? void 0 : v.params) == null ? void 0 : I.filter });
|
|
25198
25200
|
let p, m, h, g, f, C, S, b;
|
|
25199
25201
|
C = e != null && e.target ? (w = c.getCollection(e.target)) == null ? void 0 : w.getPrimaryKey() : "id", S = ((A = (k = t["x-component-props"]) == null ? void 0 : k.fieldNames) == null ? void 0 : A.label) || C, { data: f, params: h, run: g } = useRequest(
|
|
@@ -25222,7 +25224,7 @@ const useCreateActionProps = () => {
|
|
|
25222
25224
|
g,
|
|
25223
25225
|
C,
|
|
25224
25226
|
($ = i.componentProps) == null ? void 0 : $.params,
|
|
25225
|
-
(
|
|
25227
|
+
(z = (L = i.componentProps) == null ? void 0 : L.params) == null ? void 0 : z.sort,
|
|
25226
25228
|
d
|
|
25227
25229
|
]);
|
|
25228
25230
|
const y = useCallback(
|
|
@@ -25232,17 +25234,17 @@ const useCreateActionProps = () => {
|
|
|
25232
25234
|
var G, H, W;
|
|
25233
25235
|
if (!B.find((X) => X.uid === T.uid))
|
|
25234
25236
|
return;
|
|
25235
|
-
const
|
|
25237
|
+
const O = `${M}${t.name}`, q = ((G = T.service.params) == null ? void 0 : G[0]) || {};
|
|
25236
25238
|
(W = (H = T.service.params) == null ? void 0 : H[1]) != null && W.filters || _.set(T.service.params, "[1].filters", {});
|
|
25237
25239
|
const E = T.service.params[1].filters;
|
|
25238
25240
|
if (R.length)
|
|
25239
|
-
E[
|
|
25241
|
+
E[O] = {
|
|
25240
25242
|
[b]: R
|
|
25241
25243
|
};
|
|
25242
25244
|
else {
|
|
25243
25245
|
if (T.dataLoadingMode === "manual")
|
|
25244
25246
|
return T.clearData();
|
|
25245
|
-
delete E[
|
|
25247
|
+
delete E[O];
|
|
25246
25248
|
}
|
|
25247
25249
|
const U = mergeFilter([...Object.values(E), T.defaultFilter]);
|
|
25248
25250
|
return T.doFilter(
|
|
@@ -25272,7 +25274,7 @@ const useCreateActionProps = () => {
|
|
|
25272
25274
|
p = M;
|
|
25273
25275
|
return;
|
|
25274
25276
|
}
|
|
25275
|
-
p = M.filter((
|
|
25277
|
+
p = M.filter((O) => O.label.includes(N));
|
|
25276
25278
|
};
|
|
25277
25279
|
} else
|
|
25278
25280
|
b = `${r}.${C}.$in`, p = (f == null ? void 0 : f.data) || [], m = (R) => {
|
|
@@ -25555,35 +25557,35 @@ const useSyncFromForm = (e, t, o) => {
|
|
|
25555
25557
|
const L = {
|
|
25556
25558
|
type: "duplicate",
|
|
25557
25559
|
tag: c((R = $.uiSchema) == null ? void 0 : R.title) || $.name
|
|
25558
|
-
},
|
|
25560
|
+
}, z = F(x({}, L), {
|
|
25559
25561
|
title: React.createElement(TreeNode, L),
|
|
25560
25562
|
key: v ? `${v}.${$.name}` : $.name,
|
|
25561
25563
|
isLeaf: !0,
|
|
25562
25564
|
field: $,
|
|
25563
25565
|
disabled: I
|
|
25564
|
-
}), j = w.find((B) => B.name ===
|
|
25566
|
+
}), j = w.find((B) => B.name === z.key);
|
|
25565
25567
|
if (["belongsTo", "belongsToMany"].includes($.type) && (!j || ["Select", "Picker"].includes(j == null ? void 0 : j.fieldMode)))
|
|
25566
|
-
L.type = "reference",
|
|
25568
|
+
L.type = "reference", z.type = "reference", z.title = React.createElement(TreeNode, F(x({}, L), { type: "reference" })), z.isLeaf = !1, z.children = m($.target, {
|
|
25567
25569
|
depth: b + 1,
|
|
25568
25570
|
maxDepth: y,
|
|
25569
|
-
prefix:
|
|
25571
|
+
prefix: z.key,
|
|
25570
25572
|
exclude: systemKeys
|
|
25571
25573
|
});
|
|
25572
25574
|
else if (["hasOne", "hasMany"].includes($.type) || ["Nester", "SubTable"].includes(j == null ? void 0 : j.fieldMode)) {
|
|
25573
25575
|
let B = !1;
|
|
25574
|
-
["hasOne", "hasMany"].includes($.type) && ["Select", "Picker"].includes(j == null ? void 0 : j.fieldMode) && (B = !0),
|
|
25576
|
+
["hasOne", "hasMany"].includes($.type) && ["Select", "Picker"].includes(j == null ? void 0 : j.fieldMode) && (B = !0), z.disabled = !0, z.isLeaf = !1, z.children = p(
|
|
25575
25577
|
$.target,
|
|
25576
25578
|
{
|
|
25577
25579
|
depth: b + 1,
|
|
25578
25580
|
maxDepth: y,
|
|
25579
|
-
prefix:
|
|
25581
|
+
prefix: z.key,
|
|
25580
25582
|
exclude: ["id", ...systemKeys],
|
|
25581
25583
|
disabled: B
|
|
25582
25584
|
},
|
|
25583
25585
|
w
|
|
25584
25586
|
);
|
|
25585
25587
|
}
|
|
25586
|
-
return
|
|
25588
|
+
return z;
|
|
25587
25589
|
}).filter(Boolean);
|
|
25588
25590
|
return f.set(k, D), D;
|
|
25589
25591
|
})(new LRUCache({ max: 100 })), m = /* @__PURE__ */ ((f) => (C, { prefix: S, maxDepth: b, depth: y = 0, exclude: v = [] }) => {
|
|
@@ -25593,7 +25595,7 @@ const useSyncFromForm = (e, t, o) => {
|
|
|
25593
25595
|
if (y > b)
|
|
25594
25596
|
return [];
|
|
25595
25597
|
const k = r(C).map((A) => {
|
|
25596
|
-
var L,
|
|
25598
|
+
var L, z;
|
|
25597
25599
|
if (!A.target || !A.interface || v.includes(A.name))
|
|
25598
25600
|
return;
|
|
25599
25601
|
const D = {
|
|
@@ -25602,7 +25604,7 @@ const useSyncFromForm = (e, t, o) => {
|
|
|
25602
25604
|
}, $ = S ? `${S}.${A.name}` : A.name;
|
|
25603
25605
|
return {
|
|
25604
25606
|
type: "preloading",
|
|
25605
|
-
tag: c((
|
|
25607
|
+
tag: c((z = A.uiSchema) == null ? void 0 : z.title) || A.name,
|
|
25606
25608
|
title: React.createElement(TreeNode, D),
|
|
25607
25609
|
key: $,
|
|
25608
25610
|
isLeaf: !1,
|
|
@@ -25633,8 +25635,8 @@ const useSyncFromForm = (e, t, o) => {
|
|
|
25633
25635
|
var w;
|
|
25634
25636
|
(w = v == null ? void 0 : v.reduceProperties) == null || w.call(v, (k, A) => {
|
|
25635
25637
|
var B, M, T;
|
|
25636
|
-
const D = k || I, $ = A["x-collection-field"] && n(A["x-collection-field"]), L = A.name.includes("."),
|
|
25637
|
-
if ($ && !(["hasOne", "hasMany"].includes($.type) || ["SubForm", "Nester"].includes((B = A["x-component-props"]) == null ? void 0 : B.mode)) && C.add(R), $ && (
|
|
25638
|
+
const D = k || I, $ = A["x-collection-field"] && n(A["x-collection-field"]), L = A.name.includes("."), z = $ && ["hasOne", "hasMany", "belongsTo", "belongsToMany"].includes($.type), j = !z && L ? getAssociationPath(A.name) : A.name, R = D === "" || !D ? j : D + "." + j;
|
|
25639
|
+
if ($ && !(["hasOne", "hasMany"].includes($.type) || ["SubForm", "Nester"].includes((B = A["x-component-props"]) == null ? void 0 : B.mode)) && C.add(R), $ && (z || L) && A["x-component"] !== "TableField") {
|
|
25638
25640
|
if (f.add({ name: R, fieldMode: ((M = A["x-component-props"]) == null ? void 0 : M.mode) || "Select" }), ["Nester", "SubTable"].includes((T = A["x-component-props"]) == null ? void 0 : T.mode)) {
|
|
25639
25641
|
const N = D && D !== "" ? D + "." + A.name : A.name;
|
|
25640
25642
|
S(A, N);
|
|
@@ -26484,7 +26486,7 @@ const useParseDefaultValue = () => {
|
|
|
26484
26486
|
const D = !t.name.toString().includes(".") && (d == null ? void 0 : d.getField(t.name)), {
|
|
26485
26487
|
value: $,
|
|
26486
26488
|
collectionName: L,
|
|
26487
|
-
dataSource:
|
|
26489
|
+
dataSource: z = "main"
|
|
26488
26490
|
} = yield o.parseVariable(t.default, n, {
|
|
26489
26491
|
fieldOperator: C(t.name)
|
|
26490
26492
|
});
|
|
@@ -26492,7 +26494,7 @@ const useParseDefaultValue = () => {
|
|
|
26492
26494
|
collectionName: D.target,
|
|
26493
26495
|
targetCollectionName: L,
|
|
26494
26496
|
dm: S,
|
|
26495
|
-
dataSource:
|
|
26497
|
+
dataSource: z
|
|
26496
26498
|
})) {
|
|
26497
26499
|
e.loading = !1;
|
|
26498
26500
|
return;
|
|
@@ -26508,8 +26510,8 @@ const useParseDefaultValue = () => {
|
|
|
26508
26510
|
const k = getVariableName(t.default), A = b(k);
|
|
26509
26511
|
return A ? (y(), reaction(
|
|
26510
26512
|
() => {
|
|
26511
|
-
const $ = { [k]: (A == null ? void 0 : A.ctx) || {} }, L = getPath(t.default),
|
|
26512
|
-
return
|
|
26513
|
+
const $ = { [k]: (A == null ? void 0 : A.ctx) || {} }, L = getPath(t.default), z = getValuesByPath($, L);
|
|
26514
|
+
return z === void 0 ? Math.random() : z;
|
|
26513
26515
|
},
|
|
26514
26516
|
() => v({ forceUpdate: !0 }),
|
|
26515
26517
|
{
|
|
@@ -26563,7 +26565,20 @@ const formItemWrapCss = css`
|
|
|
26563
26565
|
}, [t.description]), l = useMemo(() => cx(formItemWrapCss, {
|
|
26564
26566
|
[formItemLabelCss]: i === !1
|
|
26565
26567
|
}), [i]);
|
|
26566
|
-
return /* @__PURE__ */ jsx(CollectionFieldProvider, { allowNull: !0, children: /* @__PURE__ */ jsx(
|
|
26568
|
+
return /* @__PURE__ */ jsx(CollectionFieldProvider, { allowNull: !0, children: /* @__PURE__ */ jsx(
|
|
26569
|
+
BlockItem,
|
|
26570
|
+
{
|
|
26571
|
+
className: cx(
|
|
26572
|
+
"nb-form-item",
|
|
26573
|
+
css`
|
|
26574
|
+
.ant-formily-item-layout-horizontal .ant-formily-item-control {
|
|
26575
|
+
max-width: ${i === !1 ? "100% !important" : null};
|
|
26576
|
+
}
|
|
26577
|
+
`
|
|
26578
|
+
),
|
|
26579
|
+
children: /* @__PURE__ */ jsx(ACLCollectionFieldProvider, { children: /* @__PURE__ */ jsx(FormItem$1, F(x({ className: l }, e), { extra: a, wrapperStyle: r })) })
|
|
26580
|
+
}
|
|
26581
|
+
) });
|
|
26567
26582
|
}),
|
|
26568
26583
|
{ displayName: "FormItem" }
|
|
26569
26584
|
);
|
|
@@ -27902,7 +27917,7 @@ function Input$1(e) {
|
|
|
27902
27917
|
useAntdInputStyle(`${S}-input`);
|
|
27903
27918
|
const b = useCompile(), { t: y } = useTranslation(), v = useForm(), [I, w] = React.useState([]), [k, A] = React.useState([]), [D, $] = React.useState(
|
|
27904
27919
|
m || !!(n && t != null)
|
|
27905
|
-
), L = useMemo(() => parseValue(t, p), [p, t]),
|
|
27920
|
+
), L = useMemo(() => parseValue(t, p), [p, t]), z = typeof L == "string", j = z ? L : "", R = z ? null : L, B = Object.assign(
|
|
27906
27921
|
{
|
|
27907
27922
|
label: "label",
|
|
27908
27923
|
value: "value",
|
|
@@ -27915,8 +27930,8 @@ function Input$1(e) {
|
|
|
27915
27930
|
[B.value]: "$",
|
|
27916
27931
|
[B.label]: y("Constant")
|
|
27917
27932
|
} : i ? getTypedConstantOption(j, i, B) : null, [j, i]), T = (H = M == null ? void 0 : M.component) != null ? H : NullComponent, N = Array.isArray(i) ? (X = (W = i.find((J) => Array.isArray(J) && J[0] === j)) == null ? void 0 : W[1]) != null ? X : {} : {};
|
|
27918
|
-
let
|
|
27919
|
-
t == null ? a ? n && D ?
|
|
27933
|
+
let O;
|
|
27934
|
+
t == null ? a ? n && D ? O = ["$"] : O = [""] : n ? O = ["$"] : O = [" ", j] : O = n ? ["$"] : [" ", j], m && (O = ["$"]), useEffect(() => {
|
|
27920
27935
|
const Z = M != null ? M : {}, { component: J } = Z, Y = K(Z, ["component"]), Q = [
|
|
27921
27936
|
...a ? [
|
|
27922
27937
|
{
|
|
@@ -28066,7 +28081,7 @@ function Input$1(e) {
|
|
|
28066
28081
|
Cascader$1,
|
|
28067
28082
|
{
|
|
28068
28083
|
options: I,
|
|
28069
|
-
value: R != null ? R :
|
|
28084
|
+
value: R != null ? R : O,
|
|
28070
28085
|
onChange: E,
|
|
28071
28086
|
loadData: q,
|
|
28072
28087
|
changeOnSelect: u,
|
|
@@ -28356,7 +28371,7 @@ function TextArea(e) {
|
|
|
28356
28371
|
const { current: N } = m;
|
|
28357
28372
|
if (!N)
|
|
28358
28373
|
return;
|
|
28359
|
-
const
|
|
28374
|
+
const O = new Range();
|
|
28360
28375
|
if (y) {
|
|
28361
28376
|
if (k.join() === "-1,0,-1,0")
|
|
28362
28377
|
return;
|
|
@@ -28364,25 +28379,25 @@ function TextArea(e) {
|
|
|
28364
28379
|
if (E)
|
|
28365
28380
|
try {
|
|
28366
28381
|
const U = Array.from(N.childNodes);
|
|
28367
|
-
U.length && (k[0] === -1 ? k[1] &&
|
|
28382
|
+
U.length && (k[0] === -1 ? k[1] && O.setStartAfter(U[k[1] - 1]) : O.setStart(U[k[0]], k[1]), k[2] === -1 ? k[3] && O.setEndAfter(U[k[3] - 1]) : O.setEnd(U[k[2]], k[3])), O.collapse(!0), E.removeAllRanges(), E.addRange(O);
|
|
28368
28383
|
} catch (U) {
|
|
28369
28384
|
}
|
|
28370
28385
|
} else {
|
|
28371
28386
|
const { lastChild: E } = N;
|
|
28372
28387
|
if (E) {
|
|
28373
|
-
|
|
28374
|
-
const U = Array.from(N.childNodes), G =
|
|
28375
|
-
A([G,
|
|
28388
|
+
O.setStartAfter(E), O.setEndAfter(E);
|
|
28389
|
+
const U = Array.from(N.childNodes), G = O.startContainer === N ? -1 : U.indexOf(E), H = O.startContainer === N ? -1 : U.indexOf(E);
|
|
28390
|
+
A([G, O.startOffset, H, O.endOffset]);
|
|
28376
28391
|
}
|
|
28377
28392
|
}
|
|
28378
28393
|
}, [I]);
|
|
28379
28394
|
const $ = useCallback(
|
|
28380
28395
|
function(N) {
|
|
28381
|
-
const
|
|
28382
|
-
if (!q || !
|
|
28396
|
+
const O = N.filter((U) => !!U.trim()), { current: q } = m;
|
|
28397
|
+
if (!q || !O)
|
|
28383
28398
|
return;
|
|
28384
28399
|
q.focus();
|
|
28385
|
-
const E = createVariableTagHTML(
|
|
28400
|
+
const E = createVariableTagHTML(O.join("."), C);
|
|
28386
28401
|
pasteHTML(q, E, {
|
|
28387
28402
|
range: k
|
|
28388
28403
|
}), v(!0), A(getCurrentRange(q)), i(getValue(q, u));
|
|
@@ -28393,7 +28408,7 @@ function TextArea(e) {
|
|
|
28393
28408
|
S || (v(!0), A(getCurrentRange(N)), i(getValue(N, u)));
|
|
28394
28409
|
},
|
|
28395
28410
|
[S, i, D]
|
|
28396
|
-
),
|
|
28411
|
+
), z = useCallback(function({ currentTarget: N }) {
|
|
28397
28412
|
A(getCurrentRange(N));
|
|
28398
28413
|
}, []), j = useCallback(function(N) {
|
|
28399
28414
|
N.key === "Enter" && N.preventDefault();
|
|
@@ -28407,7 +28422,7 @@ function TextArea(e) {
|
|
|
28407
28422
|
), M = useCallback(
|
|
28408
28423
|
function(N) {
|
|
28409
28424
|
N.preventDefault();
|
|
28410
|
-
const
|
|
28425
|
+
const O = N.clipboardData.getData("text/html") || N.clipboardData.getData("text"), q = sanitizeHTML(O, {
|
|
28411
28426
|
allowedTags: ["span"],
|
|
28412
28427
|
allowedAttributes: {
|
|
28413
28428
|
span: ["data-variable", "contenteditable"]
|
|
@@ -28461,7 +28476,7 @@ function TextArea(e) {
|
|
|
28461
28476
|
role: "button",
|
|
28462
28477
|
"aria-label": "textbox",
|
|
28463
28478
|
onInput: L,
|
|
28464
|
-
onBlur:
|
|
28479
|
+
onBlur: z,
|
|
28465
28480
|
onKeyDown: j,
|
|
28466
28481
|
onPaste: M,
|
|
28467
28482
|
onCompositionStart: R,
|
|
@@ -33568,8 +33583,8 @@ const useFieldComponentOptions = () => {
|
|
|
33568
33583
|
const { refresh: t } = useDesignable(), o = useAPIClient(), { t: n } = useTranslation();
|
|
33569
33584
|
return useCallback(
|
|
33570
33585
|
(r) => {
|
|
33571
|
-
var f, C, S, b, y, v, I, w, k, A, D, $, L,
|
|
33572
|
-
const { active: i, over: a } = r, l = (C = (f = i == null ? void 0 : i.data) == null ? void 0 : f.current) == null ? void 0 : C.schema, c = (b = (S = a == null ? void 0 : a.data) == null ? void 0 : S.current) == null ? void 0 : b.schema, u = (v = (y = a == null ? void 0 : a.data) == null ? void 0 : y.current) == null ? void 0 : v.insertAdjacent, d = (w = (I = a == null ? void 0 : a.data) == null ? void 0 : I.current) == null ? void 0 : w.breakRemoveOn, p = (A = (k = a == null ? void 0 : a.data) == null ? void 0 : k.current) == null ? void 0 : A.wrapSchema, m = ($ = (D = a == null ? void 0 : a.data) == null ? void 0 : D.current) == null ? void 0 : $.onSuccess, h = (j = (
|
|
33586
|
+
var f, C, S, b, y, v, I, w, k, A, D, $, L, z, j;
|
|
33587
|
+
const { active: i, over: a } = r, l = (C = (f = i == null ? void 0 : i.data) == null ? void 0 : f.current) == null ? void 0 : C.schema, c = (b = (S = a == null ? void 0 : a.data) == null ? void 0 : S.current) == null ? void 0 : b.schema, u = (v = (y = a == null ? void 0 : a.data) == null ? void 0 : y.current) == null ? void 0 : v.insertAdjacent, d = (w = (I = a == null ? void 0 : a.data) == null ? void 0 : I.current) == null ? void 0 : w.breakRemoveOn, p = (A = (k = a == null ? void 0 : a.data) == null ? void 0 : k.current) == null ? void 0 : A.wrapSchema, m = ($ = (D = a == null ? void 0 : a.data) == null ? void 0 : D.current) == null ? void 0 : $.onSuccess, h = (j = (z = (L = a == null ? void 0 : a.data) == null ? void 0 : L.current) == null ? void 0 : z.removeParentsIfNoChildren) != null ? j : !0;
|
|
33573
33588
|
if (!l || !c) {
|
|
33574
33589
|
e == null || e(r);
|
|
33575
33590
|
return;
|
|
@@ -34089,7 +34104,7 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
|
|
|
34089
34104
|
"dataSource",
|
|
34090
34105
|
"toOptionsItem",
|
|
34091
34106
|
"popupMatchSelectWidth"
|
|
34092
|
-
]), C = useDataSourceKey(), S = useDataSourceHeaders(m || C), [b, y] = useState(!1), v = useRef(!1), I = useFieldSchema(), w = ((X = I["x-component-props"]) == null ? void 0 : X.addMode) === "quickAdd", { getField: k } = useCollection_deprecated(), A = useRef(null), { getCollectionJoinField: D, getInterface: $ } = useCollectionManager_deprecated(), L = I["x-collection-field"] || I.name,
|
|
34107
|
+
]), C = useDataSourceKey(), S = useDataSourceHeaders(m || C), [b, y] = useState(!1), v = useRef(!1), I = useFieldSchema(), w = ((X = I["x-component-props"]) == null ? void 0 : X.addMode) === "quickAdd", { getField: k } = useCollection_deprecated(), A = useRef(null), { getCollectionJoinField: D, getInterface: $ } = useCollectionManager_deprecated(), L = I["x-collection-field"] || I.name, z = k(L) || D(L), j = u || (z == null ? void 0 : z.target) && (t == null ? void 0 : t.label) && D(`${z.target}.${t.label}`), R = useMemo(() => {
|
|
34093
34108
|
var Y;
|
|
34094
34109
|
if (j != null && j.interface) {
|
|
34095
34110
|
const Q = $(j.interface), Z = ((Y = Q == null ? void 0 : Q.filterable) == null ? void 0 : Y.operators[0].value) || "$includes";
|
|
@@ -34125,7 +34140,7 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
|
|
|
34125
34140
|
}
|
|
34126
34141
|
},
|
|
34127
34142
|
[j == null ? void 0 : j.uiSchema, t]
|
|
34128
|
-
), { data: T, run: N, loading:
|
|
34143
|
+
), { data: T, run: N, loading: O } = useRequest(
|
|
34129
34144
|
F(x({
|
|
34130
34145
|
action: "list"
|
|
34131
34146
|
}, o), {
|
|
@@ -34195,7 +34210,7 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
|
|
|
34195
34210
|
value: r,
|
|
34196
34211
|
defaultValue: i
|
|
34197
34212
|
}, f), {
|
|
34198
|
-
loading: T ?
|
|
34213
|
+
loading: T ? O : !0,
|
|
34199
34214
|
options: h(M(G)),
|
|
34200
34215
|
rawOptions: G,
|
|
34201
34216
|
dropdownRender: (Y) => {
|
|
@@ -35161,7 +35176,7 @@ const useStyles$9 = genStyleHook("nb-page", (e) => {
|
|
|
35161
35176
|
] }) }) }) }) : null;
|
|
35162
35177
|
}, Page = (e) => {
|
|
35163
35178
|
var q, E, U;
|
|
35164
|
-
const
|
|
35179
|
+
const O = e, { children: t } = O, o = K(O, ["children"]), { t: n } = useTranslation(), r = useCompile(), { title: i, setTitle: a } = useDocumentTitle(), l = useFieldSchema(), c = useDesignable(), { theme: u } = useGlobalTheme(), { getAriaLabel: d } = useGetAriaLabelOfSchemaInitializer(), { tabUid: p, name: m } = useParams(), h = useRouterBasename(), [g, f] = useState(!1);
|
|
35165
35180
|
useEffect(() => {
|
|
35166
35181
|
setTimeout(() => {
|
|
35167
35182
|
f(!0);
|
|
@@ -35173,7 +35188,7 @@ const useStyles$9 = genStyleHook("nb-page", (e) => {
|
|
|
35173
35188
|
// 处理 searchParams 是为了兼容旧版的 tab 参数
|
|
35174
35189
|
() => p || I.get("tab") || Object.keys(l.properties || {}).shift(),
|
|
35175
35190
|
[l.properties, I, p]
|
|
35176
|
-
), [D, $] = useState(0), { wrapSSR: L, hashId:
|
|
35191
|
+
), [D, $] = useState(0), { wrapSSR: L, hashId: z, componentCls: j } = useStyles$9(), R = useStyles$a(), { token: B } = useToken(), M = b ? void 0 : l.title || r(i);
|
|
35177
35192
|
useRequest(
|
|
35178
35193
|
{
|
|
35179
35194
|
url: `/uiSchemas:getParentJsonSchema/${l["x-uid"]}`
|
|
@@ -35279,7 +35294,7 @@ const useStyles$9 = genStyleHook("nb-page", (e) => {
|
|
|
35279
35294
|
S
|
|
35280
35295
|
]);
|
|
35281
35296
|
return L(
|
|
35282
|
-
/* @__PURE__ */ jsxs("div", { className: `${j} ${
|
|
35297
|
+
/* @__PURE__ */ jsxs("div", { className: `${j} ${z} ${R.styles}`, children: [
|
|
35283
35298
|
/* @__PURE__ */ jsx(PageDesigner, { title: l.title || i }),
|
|
35284
35299
|
/* @__PURE__ */ jsx(
|
|
35285
35300
|
"div",
|
|
@@ -35630,35 +35645,35 @@ const AppendsTreeSelect = (e) => {
|
|
|
35630
35645
|
"filter",
|
|
35631
35646
|
"rootOption",
|
|
35632
35647
|
"loadData"
|
|
35633
|
-
]), d = useCompile(), { t: p } = useTranslation(), [m, h] = useState({}), g = i({ collection: r }), [f, C] = parseCollectionName(g), S = useApp(), { collectionManager: b } = S.dataSourceManager.getDataSource(f), y = (
|
|
35634
|
-
const R = b.getCollection(
|
|
35648
|
+
]), d = useCompile(), { t: p } = useTranslation(), [m, h] = useState({}), g = i({ collection: r }), [f, C] = parseCollectionName(g), S = useApp(), { collectionManager: b } = S.dataSourceManager.getDataSource(f), y = (z, j) => {
|
|
35649
|
+
const R = b.getCollection(z);
|
|
35635
35650
|
return R ? R.getAllFields(j) : [];
|
|
35636
|
-
}, v = Object.values(m), I = useMemo(() => e.multiple ? (o || []).map((
|
|
35637
|
-
(
|
|
35651
|
+
}, v = Object.values(m), I = useMemo(() => e.multiple ? (o || []).map((z) => m[z]).filter(Boolean) : o, [o, e.multiple, m]), w = useCallback(
|
|
35652
|
+
(z) => V(void 0, null, function* () {
|
|
35638
35653
|
if (c != null)
|
|
35639
|
-
return c(
|
|
35640
|
-
if (!
|
|
35641
|
-
const j =
|
|
35654
|
+
return c(z);
|
|
35655
|
+
if (!z.isLeaf && z.loadChildren) {
|
|
35656
|
+
const j = z.loadChildren(z);
|
|
35642
35657
|
h((R) => j.reduce((B, M) => Object.assign(B, { [M.value]: M }), x({}, R)));
|
|
35643
35658
|
}
|
|
35644
35659
|
}),
|
|
35645
35660
|
[c]
|
|
35646
35661
|
);
|
|
35647
35662
|
useEffect(() => {
|
|
35648
|
-
const
|
|
35663
|
+
const z = l ? F(x({}, l), {
|
|
35649
35664
|
id: l.value,
|
|
35650
35665
|
key: l.value,
|
|
35651
35666
|
title: l.label,
|
|
35652
35667
|
fullTitle: l.label,
|
|
35653
35668
|
isLeaf: !1
|
|
35654
|
-
}) : null, R = (c === null ? [] : getCollectionFieldOptions.call({ compile: d, getCollectionFields: y, filter: a }, C,
|
|
35655
|
-
|
|
35669
|
+
}) : null, R = (c === null ? [] : getCollectionFieldOptions.call({ compile: d, getCollectionFields: y, filter: a }, C, z)).reduce((B, M) => Object.assign(B, { [M.value]: M }), {});
|
|
35670
|
+
z && (R[z.value] = z), h(R);
|
|
35656
35671
|
}, [g, l, a, c]), useEffect(() => {
|
|
35657
|
-
const
|
|
35658
|
-
if (!(
|
|
35672
|
+
const z = e.multiple ? o : o ? [o] : [];
|
|
35673
|
+
if (!(z != null && z.length) || z.every((R) => !!m[R]))
|
|
35659
35674
|
return;
|
|
35660
35675
|
const j = [];
|
|
35661
|
-
|
|
35676
|
+
z.forEach((R) => {
|
|
35662
35677
|
const B = R.split(".");
|
|
35663
35678
|
let M = m[B[0]];
|
|
35664
35679
|
for (let T = 1; T < B.length && M; T++) {
|
|
@@ -35668,19 +35683,19 @@ const AppendsTreeSelect = (e) => {
|
|
|
35668
35683
|
break;
|
|
35669
35684
|
}
|
|
35670
35685
|
if (!M.isLeaf && M.loadChildren) {
|
|
35671
|
-
const
|
|
35672
|
-
|
|
35686
|
+
const O = M.loadChildren(M);
|
|
35687
|
+
O != null && O.length && (j.push(...O), M = O.find((q) => q.value === B.slice(0, T + 1).join(".")));
|
|
35673
35688
|
}
|
|
35674
35689
|
}
|
|
35675
35690
|
}), h((R) => j.reduce((B, M) => Object.assign(B, { [M.value]: M }), x({}, R)));
|
|
35676
35691
|
}, [o, v.length, e.multiple]);
|
|
35677
35692
|
const k = useCallback(
|
|
35678
|
-
(
|
|
35693
|
+
(z) => {
|
|
35679
35694
|
if (!e.multiple) {
|
|
35680
|
-
n(
|
|
35695
|
+
n(z);
|
|
35681
35696
|
return;
|
|
35682
35697
|
}
|
|
35683
|
-
const j =
|
|
35698
|
+
const j = z.map((M) => M.value).filter(Boolean), R = new Set(j), B = I.find((M) => !R.has(M.value));
|
|
35684
35699
|
if (B) {
|
|
35685
35700
|
const M = `${B.value}.`;
|
|
35686
35701
|
Object.keys(m).forEach((T) => {
|
|
@@ -35697,16 +35712,16 @@ const AppendsTreeSelect = (e) => {
|
|
|
35697
35712
|
},
|
|
35698
35713
|
[e.multiple, I, n, m]
|
|
35699
35714
|
), A = useCallback(
|
|
35700
|
-
(
|
|
35715
|
+
(z) => {
|
|
35701
35716
|
var N;
|
|
35702
|
-
const { value: j, onClose: R, disabled: B, closable: M } =
|
|
35717
|
+
const { value: j, onClose: R, disabled: B, closable: M } = z;
|
|
35703
35718
|
if (!j)
|
|
35704
35719
|
return null;
|
|
35705
35720
|
const { fullTitle: T } = (N = m[j]) != null ? N : {};
|
|
35706
35721
|
return /* @__PURE__ */ jsx(Tag, { closable: M && !B, onClose: R, children: T == null ? void 0 : T.join(" / ") });
|
|
35707
35722
|
},
|
|
35708
35723
|
[m]
|
|
35709
|
-
), D = Array.isArray(I) ? I.filter((
|
|
35724
|
+
), D = Array.isArray(I) ? I.filter((z) => z.value in m) : I, $ = e.multiple ? o : o != null ? [o] : [];
|
|
35710
35725
|
return /* @__PURE__ */ jsx(
|
|
35711
35726
|
TreeSelect$2,
|
|
35712
35727
|
x({
|
|
@@ -35751,20 +35766,20 @@ const AppendsTreeSelect = (e) => {
|
|
|
35751
35766
|
const k = uid();
|
|
35752
35767
|
return f.addEffects(k, () => {
|
|
35753
35768
|
onFieldInputValueChange("*", (A) => {
|
|
35754
|
-
var $, L,
|
|
35755
|
-
(filterAnalyses((
|
|
35769
|
+
var $, L, z, j, R;
|
|
35770
|
+
(filterAnalyses((z = (L = ($ = r.componentProps) == null ? void 0 : $.service) == null ? void 0 : L.params) == null ? void 0 : z.filter) || []).includes((j = A == null ? void 0 : A.props) == null ? void 0 : j.name) && r.value && isEqual(A == null ? void 0 : A.indexes, r == null ? void 0 : r.indexes) && ((R = A == null ? void 0 : A.props) == null ? void 0 : R.name) !== r.props.name && (r.setValue(void 0), p(void 0));
|
|
35756
35771
|
});
|
|
35757
35772
|
}), () => {
|
|
35758
35773
|
f.removeEffects(k);
|
|
35759
35774
|
};
|
|
35760
35775
|
}, []);
|
|
35761
35776
|
const y = (k) => V(void 0, null, function* () {
|
|
35762
|
-
var L,
|
|
35777
|
+
var L, z;
|
|
35763
35778
|
const { search: A, callBack: D } = k, {
|
|
35764
35779
|
data: { data: $ }
|
|
35765
35780
|
} = yield S.create({
|
|
35766
35781
|
values: {
|
|
35767
|
-
[((
|
|
35782
|
+
[((z = (L = r == null ? void 0 : r.componentProps) == null ? void 0 : L.fieldNames) == null ? void 0 : z.label) || "id"]: A
|
|
35768
35783
|
}
|
|
35769
35784
|
});
|
|
35770
35785
|
if ($) {
|
|
@@ -36361,8 +36376,8 @@ function Uploader(o) {
|
|
|
36361
36376
|
const D = k.fileList.filter(($) => $.status === "done");
|
|
36362
36377
|
if (D.length) {
|
|
36363
36378
|
const $ = [...a != null ? a : [], ...D.map((L) => {
|
|
36364
|
-
var
|
|
36365
|
-
return c((
|
|
36379
|
+
var z;
|
|
36380
|
+
return c((z = L.response) == null ? void 0 : z.data);
|
|
36366
36381
|
})];
|
|
36367
36382
|
l == null || l($);
|
|
36368
36383
|
}
|
|
@@ -36696,9 +36711,9 @@ const InternalFileManager = (e) => {
|
|
|
36696
36711
|
};
|
|
36697
36712
|
useEffect(() => {
|
|
36698
36713
|
if (t && Object.keys(t).length > 0) {
|
|
36699
|
-
const L = (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((
|
|
36700
|
-
const j =
|
|
36701
|
-
return F(x({},
|
|
36714
|
+
const L = (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((z) => {
|
|
36715
|
+
const j = z[p.label];
|
|
36716
|
+
return F(x({}, z), {
|
|
36702
36717
|
[p.label]: getLabelFormatValue$1(y(b), y(j))
|
|
36703
36718
|
});
|
|
36704
36719
|
});
|
|
@@ -36719,10 +36734,10 @@ const InternalFileManager = (e) => {
|
|
|
36719
36734
|
setSelectedRows: u,
|
|
36720
36735
|
collectionField: S
|
|
36721
36736
|
}, k = () => {
|
|
36722
|
-
const { setVisible: L } = useActionContext(), { multiple:
|
|
36737
|
+
const { setVisible: L } = useActionContext(), { multiple: z, selectedRows: j, onChange: R, options: B, collectionField: M } = useContext(RecordPickerContext);
|
|
36723
36738
|
return {
|
|
36724
36739
|
onClick() {
|
|
36725
|
-
R(
|
|
36740
|
+
R(z ? unionBy(j, B, (M == null ? void 0 : M.targetKey) || "id") : (j == null ? void 0 : j[0]) || null), L(!1);
|
|
36726
36741
|
}
|
|
36727
36742
|
};
|
|
36728
36743
|
};
|
|
@@ -36774,10 +36789,10 @@ const InternalFileManager = (e) => {
|
|
|
36774
36789
|
FormItem: FormItem$1
|
|
36775
36790
|
}
|
|
36776
36791
|
}), CascadeSelect = connect((e) => {
|
|
36777
|
-
var
|
|
36792
|
+
var z;
|
|
36778
36793
|
const { data: t, mapOptions: o, onChange: n, value: r } = e, [i, a] = useState([
|
|
36779
36794
|
{ key: void 0, children: [], value: null }
|
|
36780
|
-
]), [l, c] = useState(t), [u, d] = useState(!1), p = useCompile(), m = useAPIClient(), h = useServiceOptions$1(e), { options: g, field: f } = useAssociationFieldContext(), C = m.resource(g.target), { getCollectionJoinField: S, getInterface: b } = useCollectionManager_deprecated(), y = (
|
|
36795
|
+
]), [l, c] = useState(t), [u, d] = useState(!1), p = useCompile(), m = useAPIClient(), h = useServiceOptions$1(e), { options: g, field: f } = useAssociationFieldContext(), C = m.resource(g.target), { getCollectionJoinField: S, getInterface: b } = useCollectionManager_deprecated(), y = (z = f == null ? void 0 : f.componentProps) == null ? void 0 : z.fieldNames, v = (g == null ? void 0 : g.target) && (y == null ? void 0 : y.label) && S(`${g.target}.${y.label}`), I = useMemo(() => {
|
|
36781
36796
|
var j, R;
|
|
36782
36797
|
return v != null && v.interface && ((R = (j = b(v.interface)) == null ? void 0 : j.filterable) == null ? void 0 : R.operators[0].value) || "$includes";
|
|
36783
36798
|
}, [v]), w = useField();
|
|
@@ -36800,14 +36815,14 @@ const InternalFileManager = (e) => {
|
|
|
36800
36815
|
let B = p(R[y.label]);
|
|
36801
36816
|
if ((M = v == null ? void 0 : v.uiSchema) != null && M.enum)
|
|
36802
36817
|
if (Array.isArray(B))
|
|
36803
|
-
B = B.map((
|
|
36818
|
+
B = B.map((O, q) => {
|
|
36804
36819
|
var U, G;
|
|
36805
|
-
const E = (G = (U = v.uiSchema.enum).find) == null ? void 0 : G.call(U, (H) => H.value ===
|
|
36806
|
-
return E ? /* @__PURE__ */ jsx(Tag, { color: E.color, style: { marginRight: 3 }, children: (E == null ? void 0 : E.label) ||
|
|
36820
|
+
const E = (G = (U = v.uiSchema.enum).find) == null ? void 0 : G.call(U, (H) => H.value === O);
|
|
36821
|
+
return E ? /* @__PURE__ */ jsx(Tag, { color: E.color, style: { marginRight: 3 }, children: (E == null ? void 0 : E.label) || O }, q) : /* @__PURE__ */ jsx(Tag, { children: O }, O);
|
|
36807
36822
|
}).reverse();
|
|
36808
36823
|
else {
|
|
36809
|
-
const
|
|
36810
|
-
|
|
36824
|
+
const O = (N = (T = v.uiSchema.enum).find) == null ? void 0 : N.call(T, (q) => q.value === B);
|
|
36825
|
+
O && (B = /* @__PURE__ */ jsx(Tag, { color: O.color, children: O.label }));
|
|
36811
36826
|
}
|
|
36812
36827
|
return (v == null ? void 0 : v.type) === "date" && (B = dayjs(B).format("YYYY-MM-DD")), o ? o({
|
|
36813
36828
|
[y.label]: B || EMPTY,
|
|
@@ -36843,8 +36858,8 @@ const InternalFileManager = (e) => {
|
|
|
36843
36858
|
var M, T, N;
|
|
36844
36859
|
if (j) {
|
|
36845
36860
|
d(!0);
|
|
36846
|
-
const
|
|
36847
|
-
if (d(!1), c(
|
|
36861
|
+
const O = yield A({ parentId: R == null ? void 0 : R.key });
|
|
36862
|
+
if (d(!1), c(O), B === (i == null ? void 0 : i.length) - 1 && ((M = R == null ? void 0 : R.value) != null && M.id)) {
|
|
36848
36863
|
const q = yield A({ parentId: (T = R == null ? void 0 : R.value) == null ? void 0 : T.id }), E = [...i];
|
|
36849
36864
|
E.splice(B + 1), E[B] = F(x({}, E[B]), { value: R == null ? void 0 : R.value }), E[B + 1] = { key: (N = R == null ? void 0 : R.value) == null ? void 0 : N.id, children: (q == null ? void 0 : q.length) > 0 ? q : null }, a(E), n == null || n(E);
|
|
36850
36865
|
}
|
|
@@ -36880,7 +36895,7 @@ const InternalFileManager = (e) => {
|
|
|
36880
36895
|
onSearch: (N) => L(N, j),
|
|
36881
36896
|
fieldNames: y,
|
|
36882
36897
|
style: { minWidth: 150 },
|
|
36883
|
-
onChange: (N,
|
|
36898
|
+
onChange: (N, O) => D(N, O, R),
|
|
36884
36899
|
options: u ? [] : k(l),
|
|
36885
36900
|
onDropdownVisibleChange: (N) => $(N, j, R),
|
|
36886
36901
|
notFoundContent: u ? /* @__PURE__ */ jsx(Spin, { size: "small" }) : null
|
|
@@ -37096,7 +37111,7 @@ const InternalNesterCss = css`
|
|
|
37096
37111
|
}, InternalPicker = observer$1(
|
|
37097
37112
|
(e) => {
|
|
37098
37113
|
var j;
|
|
37099
|
-
const
|
|
37114
|
+
const z = e, { value: t, multiple: o, openSize: n, onChange: r, quickUpload: i, selectFile: a, shouldMountElement: l } = z, c = K(z, ["value", "multiple", "openSize", "onChange", "quickUpload", "selectFile", "shouldMountElement"]), u = useField(), d = useFieldNames$1(e), [p, m] = useState(!1), h = useFieldSchema(), g = useInsertSchema("Selector"), { options: f } = useAssociationFieldContext(), { collectionName: C } = useFormBlockContext(), S = useCompile(), b = useLabelUiSchema$1(f, (d == null ? void 0 : d.label) || "label"), y = h["x-add-new"], [v, I] = useState([]), w = useCollectionRecordData(), k = useMemo(() => t && Object.keys(t).length > 0 ? (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((B) => {
|
|
37100
37115
|
const M = B == null ? void 0 : B[d.label];
|
|
37101
37116
|
return F(x({}, B), {
|
|
37102
37117
|
[d.label]: getLabelFormatValue$1(S(b), S(M))
|
|
@@ -37121,13 +37136,13 @@ const InternalNesterCss = css`
|
|
|
37121
37136
|
const R = (f == null ? void 0 : f.targetKey) || "id", B = k.map((T) => T[R]).filter(Boolean);
|
|
37122
37137
|
return B.length ? { $and: [{ [`${R}.$ne`]: B }] } : {};
|
|
37123
37138
|
}, L = () => {
|
|
37124
|
-
const { setVisible: R } = useActionContext(), { multiple: B, selectedRows: M, onChange: T, options: N, collectionField:
|
|
37139
|
+
const { setVisible: R } = useActionContext(), { multiple: B, selectedRows: M, onChange: T, options: N, collectionField: O } = useContext(RecordPickerContext);
|
|
37125
37140
|
return {
|
|
37126
37141
|
onClick() {
|
|
37127
|
-
T(B ? unionBy(M, N, (
|
|
37142
|
+
T(B ? unionBy(M, N, (O == null ? void 0 : O.targetKey) || "id") : (M == null ? void 0 : M[0]) || null), R(!1);
|
|
37128
37143
|
},
|
|
37129
37144
|
style: {
|
|
37130
|
-
display: B !== !1 && ["o2m", "m2m", "mbm"].includes(
|
|
37145
|
+
display: B !== !1 && ["o2m", "m2m", "mbm"].includes(O == null ? void 0 : O.interface) ? "block" : "none"
|
|
37131
37146
|
}
|
|
37132
37147
|
};
|
|
37133
37148
|
};
|
|
@@ -37234,7 +37249,7 @@ const RenderRecord = React.memo(
|
|
|
37234
37249
|
const [f, C] = useState(!0), [S, b] = useState([]);
|
|
37235
37250
|
return useEffect(() => {
|
|
37236
37251
|
const y = toArr$3(h).map((v, I, w) => {
|
|
37237
|
-
const k = v == null ? void 0 : v[(e == null ? void 0 : e.label) || "label"], A = t ? transformNestedData(v).map((
|
|
37252
|
+
const k = v == null ? void 0 : v[(e == null ? void 0 : e.label) || "label"], A = t ? transformNestedData(v).map((z) => z == null ? void 0 : z[(e == null ? void 0 : e.label) || "label"]).join(" / ") : isObject(k) ? JSON.stringify(k) : k, D = toValue$3(o(A), "N/A"), $ = n(
|
|
37238
37253
|
(v == null ? void 0 : v.__collection) || (r == null ? void 0 : r.target),
|
|
37239
37254
|
(e == null ? void 0 : e.label) || "label"
|
|
37240
37255
|
), L = getLabelFormatValue$1(o($), D, !0);
|
|
@@ -37245,9 +37260,9 @@ const RenderRecord = React.memo(
|
|
|
37245
37260
|
onMouseEnter: () => {
|
|
37246
37261
|
g(!0);
|
|
37247
37262
|
},
|
|
37248
|
-
onClick: (
|
|
37263
|
+
onClick: (z) => {
|
|
37249
37264
|
var j;
|
|
37250
|
-
g(!0),
|
|
37265
|
+
g(!0), z.stopPropagation(), z.preventDefault(), l && c(schema$1.Viewer), u.properties && d({
|
|
37251
37266
|
recordData: v,
|
|
37252
37267
|
parentRecordData: p
|
|
37253
37268
|
}), (j = m == null ? void 0 : m.current) == null || j.setPopoverVisible(!1);
|
|
@@ -38035,8 +38050,8 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
38035
38050
|
width: I && !a ? 0 : ((A = b["x-component-props"]) == null ? void 0 : A.width) || 100,
|
|
38036
38051
|
render: (D, $) => {
|
|
38037
38052
|
var j;
|
|
38038
|
-
const L = (j = n.value) == null ? void 0 : j.indexOf($),
|
|
38039
|
-
return /* @__PURE__ */ jsx(SubFormProvider, { value: { value: $, collection: f, fieldSchema: r.parent }, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: $.__index || L, children: /* @__PURE__ */ jsx(RecordProvider, { isNew: isNewRecord($), record: $, parent: u, children: /* @__PURE__ */ jsx(ColumnFieldProvider, { schema: b, basePath:
|
|
38053
|
+
const L = (j = n.value) == null ? void 0 : j.indexOf($), z = n.address.concat($.__index || L);
|
|
38054
|
+
return /* @__PURE__ */ jsx(SubFormProvider, { value: { value: $, collection: f, fieldSchema: r.parent }, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: $.__index || L, children: /* @__PURE__ */ jsx(RecordProvider, { isNew: isNewRecord($), record: $, parent: u, children: /* @__PURE__ */ jsx(ColumnFieldProvider, { schema: b, basePath: z, children: /* @__PURE__ */ jsx("span", { role: "button", className: g, children: /* @__PURE__ */ jsx(RecursionField, { basePath: z, schema: b, onlyRenderProperties: !0 }) }) }) }) }) });
|
|
38040
38055
|
},
|
|
38041
38056
|
onCell: (D, $) => ({
|
|
38042
38057
|
record: D,
|
|
@@ -38255,7 +38270,7 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
38255
38270
|
return e ? /* @__PURE__ */ jsx("td", { style: r ? columnOpacityStyle : columnHiddenStyle, children: r ? t.children : /* @__PURE__ */ jsx("span", { style: displayNone, children: t.children }) }) : /* @__PURE__ */ jsx(InternalBodyCellComponent, x({}, t));
|
|
38256
38271
|
}, InternalNocoBaseTable = React.memo(
|
|
38257
38272
|
(e) => {
|
|
38258
|
-
const
|
|
38273
|
+
const S = e, {
|
|
38259
38274
|
tableHeight: t,
|
|
38260
38275
|
SortableWrapper: o,
|
|
38261
38276
|
tableSizeRefCallback: n,
|
|
@@ -38270,7 +38285,7 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
38270
38285
|
columns: m,
|
|
38271
38286
|
expandable: h,
|
|
38272
38287
|
field: g
|
|
38273
|
-
} =
|
|
38288
|
+
} = S, f = K(S, [
|
|
38274
38289
|
"tableHeight",
|
|
38275
38290
|
"SortableWrapper",
|
|
38276
38291
|
"tableSizeRefCallback",
|
|
@@ -38285,7 +38300,7 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
38285
38300
|
"columns",
|
|
38286
38301
|
"expandable",
|
|
38287
38302
|
"field"
|
|
38288
|
-
]);
|
|
38303
|
+
]), { token: C } = useToken();
|
|
38289
38304
|
return /* @__PURE__ */ jsxs(
|
|
38290
38305
|
"div",
|
|
38291
38306
|
{
|
|
@@ -38311,10 +38326,10 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
38311
38326
|
padding: 16px 8px;
|
|
38312
38327
|
}
|
|
38313
38328
|
.ant-table-middle .ant-table-cell {
|
|
38314
|
-
padding: 12px
|
|
38329
|
+
padding: 12px ${C.paddingXS}px;
|
|
38315
38330
|
}
|
|
38316
38331
|
.ant-table-small .ant-table-cell {
|
|
38317
|
-
padding: 8px
|
|
38332
|
+
padding: 8px ${C.paddingXS}px;
|
|
38318
38333
|
}
|
|
38319
38334
|
}
|
|
38320
38335
|
}
|
|
@@ -38345,7 +38360,7 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
38345
38360
|
expandable: h
|
|
38346
38361
|
})
|
|
38347
38362
|
) }),
|
|
38348
|
-
g.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: g.errors.map((
|
|
38363
|
+
g.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: g.errors.map((b) => b.messages.map((y) => /* @__PURE__ */ jsx("div", { children: y }, y))) })
|
|
38349
38364
|
]
|
|
38350
38365
|
}
|
|
38351
38366
|
);
|
|
@@ -38378,7 +38393,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
38378
38393
|
"loading",
|
|
38379
38394
|
"onClickRow"
|
|
38380
38395
|
]), b = useArrayField(S), y = useFieldSchema(), { size: v = "small" } = (y == null ? void 0 : y["x-component-props"]) || {}, I = useCollection(), k = ((ce = y == null ? void 0 : y.parent) == null ? void 0 : ce["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: A, allIncludesChildren: D } = k, $ = useMemoizedFn(S.onRowDragEnd || (() => {
|
|
38381
|
-
})), L = usePaginationProps$2(o, i),
|
|
38396
|
+
})), L = usePaginationProps$2(o, i), z = useTableColumns$1(S, L), [j, R] = useState(() => A ? D : []), [B, M] = useState(((ye = b == null ? void 0 : b.data) == null ? void 0 : ye.selectedRowKeys) || []), [T, N] = useState([]), O = (p == null ? void 0 : p.type) !== "none", q = useRef(/* @__PURE__ */ new Map()), E = useMemo(() => css`
|
|
38382
38397
|
& > td {
|
|
38383
38398
|
background-color: ${t.controlItemBgActive} !important;
|
|
38384
38399
|
}
|
|
@@ -38459,14 +38474,14 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
38459
38474
|
role: "button",
|
|
38460
38475
|
"aria-label": `table-index-${re}`,
|
|
38461
38476
|
className: cls(oe ? "checked" : floatLeftClass, rowSelectCheckboxWrapperClass, {
|
|
38462
|
-
[rowSelectCheckboxWrapperClassHover]:
|
|
38477
|
+
[rowSelectCheckboxWrapperClassHover]: O
|
|
38463
38478
|
}),
|
|
38464
38479
|
children: [
|
|
38465
38480
|
/* @__PURE__ */ jsxs("div", { className: cls(oe ? "checked" : null, rowSelectCheckboxContentClass), children: [
|
|
38466
38481
|
l && /* @__PURE__ */ jsx(SortHandle$1, { id: W(ne) }),
|
|
38467
38482
|
c && /* @__PURE__ */ jsx(TableIndex$2, { index: re })
|
|
38468
38483
|
] }),
|
|
38469
|
-
|
|
38484
|
+
O && /* @__PURE__ */ jsx(
|
|
38470
38485
|
"div",
|
|
38471
38486
|
{
|
|
38472
38487
|
className: cls(
|
|
@@ -38491,7 +38506,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
38491
38506
|
l,
|
|
38492
38507
|
b,
|
|
38493
38508
|
W,
|
|
38494
|
-
|
|
38509
|
+
O,
|
|
38495
38510
|
Q,
|
|
38496
38511
|
L
|
|
38497
38512
|
]
|
|
@@ -38542,7 +38557,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
38542
38557
|
onRow: G,
|
|
38543
38558
|
rowClassName: ge,
|
|
38544
38559
|
scroll: le,
|
|
38545
|
-
columns:
|
|
38560
|
+
columns: z,
|
|
38546
38561
|
expandable: xe,
|
|
38547
38562
|
field: b,
|
|
38548
38563
|
size: v
|
|
@@ -38596,7 +38611,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
38596
38611
|
border-radius: 0px;
|
|
38597
38612
|
`, SubTable = observer$1(
|
|
38598
38613
|
(e) => {
|
|
38599
|
-
var
|
|
38614
|
+
var z, j, R;
|
|
38600
38615
|
const { openSize: t } = e, { field: o, options: n } = useAssociationFieldContext(), { t: r } = useTranslation(), [i, a] = useState(!1), [l, c] = useState([]), u = useFieldNames$1(e), d = useFieldSchema(), p = useCompile(), m = useLabelUiSchema$1(n, (u == null ? void 0 : u.label) || "label"), h = useCollectionRecord(), g = useCollection(), { allowSelectExistingRecord: f, allowAddnew: C, allowDisassociation: S } = o.componentProps;
|
|
38601
38616
|
useSubTableSpecialCase({ field: o });
|
|
38602
38617
|
const b = (B, M) => {
|
|
@@ -38631,16 +38646,16 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
38631
38646
|
const { setVisible: B } = useActionContext(), { selectedRows: M, setSelectedRows: T } = useContext(RecordPickerContext);
|
|
38632
38647
|
return {
|
|
38633
38648
|
onClick() {
|
|
38634
|
-
var
|
|
38649
|
+
var O;
|
|
38635
38650
|
M.map((q) => o.value.push(markRecordAsNew(q))), o.onInput(o.value), o.initialValue = o.value, T([]), B(!1);
|
|
38636
|
-
const N = Math.ceil(o.value.length / (((
|
|
38651
|
+
const N = Math.ceil(o.value.length / (((O = o.componentProps) == null ? void 0 : O.pageSize) || 10));
|
|
38637
38652
|
A(N);
|
|
38638
38653
|
}
|
|
38639
38654
|
};
|
|
38640
38655
|
}, w = () => {
|
|
38641
38656
|
const B = (n == null ? void 0 : n.targetKey) || "id", M = (o.value || []).map((N) => N == null ? void 0 : N[B]).filter(Boolean);
|
|
38642
38657
|
return M.length ? { $and: [{ [`${B}.$ne`]: M }] } : {};
|
|
38643
|
-
}, [k, A] = useState(1), [D, $] = useState(((
|
|
38658
|
+
}, [k, A] = useState(1), [D, $] = useState(((z = o.componentProps) == null ? void 0 : z.pageSize) || 10);
|
|
38644
38659
|
useEffect(() => {
|
|
38645
38660
|
var B;
|
|
38646
38661
|
$((B = o.componentProps) == null ? void 0 : B.pageSize);
|
|
@@ -38826,10 +38841,10 @@ const ReadPretty$7 = observer$1(
|
|
|
38826
38841
|
InternalAssociationSelect.displayName = "InternalAssociationSelect";
|
|
38827
38842
|
const AssociationSelect = InternalAssociationSelect;
|
|
38828
38843
|
AssociationSelect.Designer = function e() {
|
|
38829
|
-
var B, M, T, N,
|
|
38844
|
+
var B, M, T, N, O, q, E, U, G, H, W;
|
|
38830
38845
|
const { getCollectionFields: t, getInterface: o, getCollectionJoinField: n, getCollection: r, isTitleField: i } = useCollectionManager_deprecated(), { getField: a } = useCollection_deprecated(), { form: l } = useFormBlockContext(), c = useField(), u = useFieldSchema(), { t: d } = useTranslation(), p = useFilterByTk(), { dn: m, refresh: h, insertAdjacent: g } = useDesignable(), f = useCompile(), C = useIsShowMultipleSwitch(), { isAllowToSetDefaultValue: S } = useIsAllowToSetDefaultValue(), b = a(u.name) || n(u["x-collection-field"]), y = useFieldComponentOptions(), v = c.address.segments.includes("__form_grid"), I = o(b == null ? void 0 : b.interface), w = (B = I == null ? void 0 : I.validateSchema) == null ? void 0 : B.call(I, u), k = (M = b == null ? void 0 : b.uiSchema) == null ? void 0 : M.title, A = b != null && b.target ? t(b == null ? void 0 : b.target) : [];
|
|
38831
38846
|
c.title === k || c.title;
|
|
38832
|
-
const D = useSortFields(b == null ? void 0 : b.target), $ = ((
|
|
38847
|
+
const D = useSortFields(b == null ? void 0 : b.target), $ = ((O = (N = (T = c.componentProps) == null ? void 0 : T.service) == null ? void 0 : N.params) == null ? void 0 : O.sort) || [];
|
|
38833
38848
|
useEffect(() => {
|
|
38834
38849
|
c.readPretty !== u["x-read-pretty"] && (c.readPretty = !!u["x-read-pretty"]);
|
|
38835
38850
|
}, [u["x-read-pretty"]]);
|
|
@@ -38841,7 +38856,7 @@ AssociationSelect.Designer = function e() {
|
|
|
38841
38856
|
direction: "asc"
|
|
38842
38857
|
});
|
|
38843
38858
|
c.readPretty || c.required;
|
|
38844
|
-
const
|
|
38859
|
+
const z = A.filter((X) => i(X)).map((X) => {
|
|
38845
38860
|
var J;
|
|
38846
38861
|
return {
|
|
38847
38862
|
value: X == null ? void 0 : X.name,
|
|
@@ -39192,7 +39207,7 @@ AssociationSelect.Designer = function e() {
|
|
|
39192
39207
|
SchemaSettingsSelectItem,
|
|
39193
39208
|
{
|
|
39194
39209
|
title: d("Title field"),
|
|
39195
|
-
options:
|
|
39210
|
+
options: z,
|
|
39196
39211
|
value: (W = (H = c == null ? void 0 : c.componentProps) == null ? void 0 : H.fieldNames) == null ? void 0 : W.label,
|
|
39197
39212
|
onChange: (X) => {
|
|
39198
39213
|
var Q, Z;
|
|
@@ -39225,7 +39240,7 @@ AssociationSelect.Designer = function e() {
|
|
|
39225
39240
|
] });
|
|
39226
39241
|
};
|
|
39227
39242
|
AssociationSelect.FilterDesigner = function e() {
|
|
39228
|
-
var I, w, k, A, D, $, L,
|
|
39243
|
+
var I, w, k, A, D, $, L, z, j, R, B;
|
|
39229
39244
|
const { getCollectionFields: t, getInterface: o, getCollectionJoinField: n } = useCollectionManager_deprecated(), { getField: r } = useCollection_deprecated(), { form: i } = useFormBlockContext(), a = useField(), l = useFieldSchema(), { t: c } = useTranslation(), { dn: u, refresh: d } = useDesignable(), p = useCompile(), m = r(l.name) || n(l["x-collection-field"]), h = o(m == null ? void 0 : m.interface), g = (I = h == null ? void 0 : h.validateSchema) == null ? void 0 : I.call(h, l), f = (w = m == null ? void 0 : m.uiSchema) == null ? void 0 : w.title, C = m != null && m.target ? t(m == null ? void 0 : m.target) : [];
|
|
39230
39245
|
a.title === f || a.title;
|
|
39231
39246
|
const S = useSortFields(m == null ? void 0 : m.target), b = ((D = (A = (k = a.componentProps) == null ? void 0 : k.service) == null ? void 0 : A.params) == null ? void 0 : D.sort) || [], y = b == null ? void 0 : b.map((M) => M.startsWith("-") ? {
|
|
@@ -39342,8 +39357,8 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
39342
39357
|
if (["percent"].includes(m == null ? void 0 : m.interface))
|
|
39343
39358
|
for (const E of T)
|
|
39344
39359
|
(E.maxValue || E.minValue) && (E.percentMode = !0), E.percentFormat && (E.percentFormats = !0);
|
|
39345
|
-
const
|
|
39346
|
-
a.validator =
|
|
39360
|
+
const O = _.concat([], ((q = m == null ? void 0 : m.uiSchema) == null ? void 0 : q["x-validator"]) || [], T);
|
|
39361
|
+
a.validator = O, l["x-validator"] = T, N["x-validator"] = T, u.emit("patch", {
|
|
39347
39362
|
schema: N
|
|
39348
39363
|
}), d();
|
|
39349
39364
|
}
|
|
@@ -39380,7 +39395,7 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
39380
39395
|
SchemaSettingsDataScope,
|
|
39381
39396
|
{
|
|
39382
39397
|
collectionName: m == null ? void 0 : m.target,
|
|
39383
|
-
defaultFilter: ((j = (
|
|
39398
|
+
defaultFilter: ((j = (z = (L = a.componentProps) == null ? void 0 : L.service) == null ? void 0 : z.params) == null ? void 0 : j.filter) || {},
|
|
39384
39399
|
form: i,
|
|
39385
39400
|
onSubmit: ({ filter: M }) => {
|
|
39386
39401
|
M = removeNullCondition(M), _.set(a.componentProps, "service.params.filter", M), l["x-component-props"] = a.componentProps, u.emit("patch", {
|
|
@@ -39484,10 +39499,10 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
39484
39499
|
options: v,
|
|
39485
39500
|
value: (B = (R = a == null ? void 0 : a.componentProps) == null ? void 0 : R.fieldNames) == null ? void 0 : B.label,
|
|
39486
39501
|
onChange: (M) => {
|
|
39487
|
-
var
|
|
39502
|
+
var O, q;
|
|
39488
39503
|
const T = {
|
|
39489
39504
|
"x-uid": l["x-uid"]
|
|
39490
|
-
}, N = F(x(x({}, (q = (
|
|
39505
|
+
}, N = F(x(x({}, (q = (O = m == null ? void 0 : m.uiSchema) == null ? void 0 : O["x-component-props"]) == null ? void 0 : q.fieldNames), a.componentProps.fieldNames), {
|
|
39491
39506
|
label: M
|
|
39492
39507
|
});
|
|
39493
39508
|
a.componentProps.fieldNames = N, l["x-component-props"] = l["x-component-props"] || {}, l["x-component-props"].fieldNames = N, T["x-component-props"] = l["x-component-props"], u.emit("patch", {
|
|
@@ -41026,8 +41041,8 @@ const InternalListBlockProvider = (e) => {
|
|
|
41026
41041
|
const d = i ? o.fontSizeLG * o.lineHeightLG + o.padding * 2 - 1 : 0, m = Object.keys(((g = t.parent.properties.actionBar) == null ? void 0 : g.properties) || {}).length > 0 || n ? o.controlHeight + 2 * o.marginLG : o.marginLG, h = u ? o.controlHeight + o.paddingLG + o.marginLG : o.marginLG;
|
|
41027
41042
|
return e - m - h - d;
|
|
41028
41043
|
}, InternalList = (e) => {
|
|
41029
|
-
var
|
|
41030
|
-
const { service: t } = useListBlockContext(), { run: o, params: n } = t, r = useFieldSchema(), i = useDesigner(), a = (
|
|
41044
|
+
var z, j, R;
|
|
41045
|
+
const { service: t } = useListBlockContext(), { run: o, params: n } = t, r = useFieldSchema(), i = useDesigner(), a = (z = t == null ? void 0 : t.data) == null ? void 0 : z.meta, { pageSize: l, count: c, hasNext: u, page: d } = a || {}, p = useField(), [m] = useState(/* @__PURE__ */ new Map()), { wrapSSR: h, componentCls: g, hashId: f } = useStyles$5(), C = useListBlockHeight(), { token: S } = theme.useToken(), b = useCallback(
|
|
41031
41046
|
(B) => (m.has(B) || m.set(
|
|
41032
41047
|
B,
|
|
41033
41048
|
new Schema({
|
|
@@ -42187,14 +42202,14 @@ const Menu = observer$1(
|
|
|
42187
42202
|
"children"
|
|
42188
42203
|
]), { t: d } = useTranslation(), p = useDesigner(), m = useFieldSchema(), { refresh: h } = useDesignable(), g = useAPIClient(), { render: f } = useSchemaInitializerRender(m["x-initializer"], m["x-initializer-props"]), C = useSideMenuRef(), [S, b] = useState(), [y, v] = useState(() => a || (r ? findKeysByUid(m, r) : [])), [I, w] = useState(!1), [k, A] = useState(() => ["inline", "mix"].includes(o) ? l || y : l), D = useMemo(() => {
|
|
42189
42204
|
var j;
|
|
42190
|
-
let
|
|
42205
|
+
let z;
|
|
42191
42206
|
if (n) {
|
|
42192
42207
|
const R = findKeysByUid(m, n);
|
|
42193
|
-
|
|
42208
|
+
z = (R == null ? void 0 : R[0]) || null;
|
|
42194
42209
|
} else
|
|
42195
|
-
|
|
42196
|
-
if (o === "mix" &&
|
|
42197
|
-
const R = (j = m.properties) == null ? void 0 : j[
|
|
42210
|
+
z = (y == null ? void 0 : y[0]) || null;
|
|
42211
|
+
if (o === "mix" && z) {
|
|
42212
|
+
const R = (j = m.properties) == null ? void 0 : j[z];
|
|
42198
42213
|
if ((R == null ? void 0 : R["x-component"]) === "Menu.SubMenu")
|
|
42199
42214
|
return R;
|
|
42200
42215
|
}
|
|
@@ -42205,8 +42220,8 @@ const Menu = observer$1(
|
|
|
42205
42220
|
b(void 0);
|
|
42206
42221
|
return;
|
|
42207
42222
|
}
|
|
42208
|
-
const
|
|
42209
|
-
b(
|
|
42223
|
+
const z = findKeysByUid(m, n);
|
|
42224
|
+
b(z), ["inline", "mix"].includes(o) && A(l || z);
|
|
42210
42225
|
}, [n]), useEffect(() => {
|
|
42211
42226
|
["inline", "mix"].includes(o) && A(y);
|
|
42212
42227
|
}, [y]);
|
|
@@ -42763,8 +42778,8 @@ const toValue = (e, t) => e == null ? t : e, ReadPrettyRecordPicker = observer$1
|
|
|
42763
42778
|
"a",
|
|
42764
42779
|
{
|
|
42765
42780
|
onClick: (L) => {
|
|
42766
|
-
var
|
|
42767
|
-
L.stopPropagation(), L.preventDefault(), l(!0), p(w), (
|
|
42781
|
+
var z;
|
|
42782
|
+
L.stopPropagation(), L.preventDefault(), l(!0), p(w), (z = C == null ? void 0 : C.current) == null || z.setPopoverVisible(!1);
|
|
42768
42783
|
},
|
|
42769
42784
|
children: $
|
|
42770
42785
|
}
|
|
@@ -44180,18 +44195,18 @@ const TableActionColumnDesigner = (e) => {
|
|
|
44180
44195
|
"sort-field"
|
|
44181
44196
|
);
|
|
44182
44197
|
}, TableBlockDesigner = () => {
|
|
44183
|
-
var A, D, $, L,
|
|
44184
|
-
const { name: e, title: t } = useCollection_deprecated(), { getCollectionField: o, getCollection: n } = useCollectionManager_deprecated(), r = useField(), i = useFieldSchema(), { form: a } = useFormBlockContext(), l = useSortFields(e), { service: c } = useTableBlockContext(), { t: u } = useTranslation(), { dn: d } = useDesignable(), { componentNamePrefix: p } = useBlockTemplateContext(), m = ((D = (A = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : A.params) == null ? void 0 : D.sort) || [], h = (($ = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : $.resource) || ((L = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : L.association), g = !((
|
|
44185
|
-
field:
|
|
44198
|
+
var A, D, $, L, z, j, R, B, M, T, N;
|
|
44199
|
+
const { name: e, title: t } = useCollection_deprecated(), { getCollectionField: o, getCollection: n } = useCollectionManager_deprecated(), r = useField(), i = useFieldSchema(), { form: a } = useFormBlockContext(), l = useSortFields(e), { service: c } = useTableBlockContext(), { t: u } = useTranslation(), { dn: d } = useDesignable(), { componentNamePrefix: p } = useBlockTemplateContext(), m = ((D = (A = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : A.params) == null ? void 0 : D.sort) || [], h = (($ = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : $.resource) || ((L = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : L.association), g = !((z = i == null ? void 0 : i["x-decorator-props"]) != null && z.disableTemplate), f = m == null ? void 0 : m.map((O) => O != null && O.startsWith("-") ? {
|
|
44200
|
+
field: O.substring(1),
|
|
44186
44201
|
direction: "desc"
|
|
44187
44202
|
} : {
|
|
44188
|
-
field:
|
|
44203
|
+
field: O,
|
|
44189
44204
|
direction: "asc"
|
|
44190
44205
|
}), C = useSchemaTemplate(), S = useCollection_deprecated(), { dragSort: b, resource: y } = r.decoratorProps, v = y && o(y), I = y != null && y.includes(".") ? (j = n(v == null ? void 0 : v.target)) == null ? void 0 : j.tree : !!(S != null && S.tree), w = useCallback(
|
|
44191
|
-
({ filter:
|
|
44192
|
-
|
|
44206
|
+
({ filter: O }) => {
|
|
44207
|
+
O = removeNullCondition(O);
|
|
44193
44208
|
const q = r.decoratorProps.params || {};
|
|
44194
|
-
q.filter =
|
|
44209
|
+
q.filter = O, r.decoratorProps.params = q, i["x-decorator-props"].params = q, d.emit("patch", {
|
|
44195
44210
|
schema: {
|
|
44196
44211
|
"x-uid": i["x-uid"],
|
|
44197
44212
|
"x-decorator-props": i["x-decorator-props"]
|
|
@@ -44209,11 +44224,11 @@ const TableActionColumnDesigner = (e) => {
|
|
|
44209
44224
|
title: u("Tree table"),
|
|
44210
44225
|
defaultChecked: !0,
|
|
44211
44226
|
checked: I ? r.decoratorProps.treeTable : !1,
|
|
44212
|
-
onChange: (
|
|
44227
|
+
onChange: (O) => {
|
|
44213
44228
|
var E;
|
|
44214
|
-
r.decoratorProps.treeTable =
|
|
44229
|
+
r.decoratorProps.treeTable = O, i["x-decorator-props"].treeTable = O;
|
|
44215
44230
|
const q = F(x({}, (E = c.params) == null ? void 0 : E[0]), {
|
|
44216
|
-
tree:
|
|
44231
|
+
tree: O ? !0 : null
|
|
44217
44232
|
});
|
|
44218
44233
|
d.emit("patch", {
|
|
44219
44234
|
schema: i
|
|
@@ -44226,13 +44241,13 @@ const TableActionColumnDesigner = (e) => {
|
|
|
44226
44241
|
{
|
|
44227
44242
|
title: u("Enable drag and drop sorting"),
|
|
44228
44243
|
checked: r.decoratorProps.dragSort,
|
|
44229
|
-
onChange: (
|
|
44230
|
-
|
|
44244
|
+
onChange: (O) => V(void 0, null, function* () {
|
|
44245
|
+
O && v && (yield k.resource("collections.fields", v.collectionName).update({
|
|
44231
44246
|
filterByTk: v.name,
|
|
44232
44247
|
values: {
|
|
44233
44248
|
sortable: !0
|
|
44234
44249
|
}
|
|
44235
|
-
})), r.decoratorProps.dragSort =
|
|
44250
|
+
})), r.decoratorProps.dragSort = O, i["x-decorator-props"].dragSort = O, d.emit("patch", {
|
|
44236
44251
|
schema: {
|
|
44237
44252
|
"x-uid": i["x-uid"],
|
|
44238
44253
|
"x-decorator-props": i["x-decorator-props"]
|
|
@@ -44326,9 +44341,9 @@ const TableActionColumnDesigner = (e) => {
|
|
|
44326
44341
|
}
|
|
44327
44342
|
}
|
|
44328
44343
|
},
|
|
44329
|
-
onSubmit: ({ sort:
|
|
44344
|
+
onSubmit: ({ sort: O }) => {
|
|
44330
44345
|
var U;
|
|
44331
|
-
const q =
|
|
44346
|
+
const q = O.map((G) => G.direction === "desc" ? `-${G.field}` : G.field), E = r.decoratorProps.params || {};
|
|
44332
44347
|
E.sort = q, r.decoratorProps.params = E, i["x-decorator-props"].params = E, d.emit("patch", {
|
|
44333
44348
|
schema: {
|
|
44334
44349
|
"x-uid": i["x-uid"],
|
|
@@ -44352,10 +44367,10 @@ const TableActionColumnDesigner = (e) => {
|
|
|
44352
44367
|
{ label: "100", value: 100 },
|
|
44353
44368
|
{ label: "200", value: 200 }
|
|
44354
44369
|
],
|
|
44355
|
-
onChange: (
|
|
44370
|
+
onChange: (O) => {
|
|
44356
44371
|
var E;
|
|
44357
44372
|
const q = r.decoratorProps.params || {};
|
|
44358
|
-
q.pageSize =
|
|
44373
|
+
q.pageSize = O, r.decoratorProps.params = q, i["x-decorator-props"].params = q, c.run(F(x({}, (E = c.params) == null ? void 0 : E[0]), { pageSize: O, page: 1 })), d.emit("patch", {
|
|
44359
44374
|
schema: {
|
|
44360
44375
|
"x-uid": i["x-uid"],
|
|
44361
44376
|
"x-decorator-props": i["x-decorator-props"]
|
|
@@ -44374,12 +44389,12 @@ const TableActionColumnDesigner = (e) => {
|
|
|
44374
44389
|
{ label: u("Middle"), value: "middle" },
|
|
44375
44390
|
{ label: u("Small"), value: "small" }
|
|
44376
44391
|
],
|
|
44377
|
-
onChange: (
|
|
44392
|
+
onChange: (O) => {
|
|
44378
44393
|
const q = i.reduceProperties((E, U) => {
|
|
44379
44394
|
if (U["x-component"] === "TableV2")
|
|
44380
44395
|
return U;
|
|
44381
44396
|
}, null);
|
|
44382
|
-
q["x-component-props"] = q["x-component-props"] || {}, q["x-component-props"].size =
|
|
44397
|
+
q["x-component-props"] = q["x-component-props"] || {}, q["x-component-props"].size = O, d.emit("patch", {
|
|
44383
44398
|
schema: {
|
|
44384
44399
|
"x-uid": q["x-uid"],
|
|
44385
44400
|
"x-decorator-props": q["x-component-props"]
|
|
@@ -44426,7 +44441,7 @@ TableField.ActionBar = observer$1(
|
|
|
44426
44441
|
{ displayName: "TableField.ActionBar" }
|
|
44427
44442
|
);
|
|
44428
44443
|
const TableSelectorDesigner = () => {
|
|
44429
|
-
var k, A, D, $, L,
|
|
44444
|
+
var k, A, D, $, L, z;
|
|
44430
44445
|
const { name: e, title: t } = useCollection_deprecated(), { getCollectionJoinField: o, getAllCollectionsInheritChain: n } = useCollectionManager_deprecated(), r = useField(), i = useFieldSchema(), { form: a } = useFormBlockContext(), l = useSortFields(e), { service: c, extraFilter: u } = useTableSelectorContext(), { t: d } = useTranslation(), { dn: p } = useDesignable(), m = ((A = (k = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : k.params) == null ? void 0 : A.sort) || [], h = recursiveParent$1(i, "CollectionField"), g = o(h == null ? void 0 : h["x-collection-field"]), f = m == null ? void 0 : m.map((j) => j.startsWith("-") ? {
|
|
44431
44446
|
field: j.substring(1),
|
|
44432
44447
|
direction: "desc"
|
|
@@ -44584,7 +44599,7 @@ const TableSelectorDesigner = () => {
|
|
|
44584
44599
|
SchemaSettingsSelectItem,
|
|
44585
44600
|
{
|
|
44586
44601
|
title: d("Records per page"),
|
|
44587
|
-
value: ((
|
|
44602
|
+
value: ((z = (L = r.decoratorProps) == null ? void 0 : L.params) == null ? void 0 : z.pageSize) || 20,
|
|
44588
44603
|
options: [
|
|
44589
44604
|
{ label: "5", value: 5 },
|
|
44590
44605
|
{ label: "10", value: 10 },
|
|
@@ -46540,14 +46555,14 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
46540
46555
|
const t = useRecord();
|
|
46541
46556
|
return /* @__PURE__ */ jsx(AddFieldAction, x({ item: t }, e));
|
|
46542
46557
|
}, AddFieldAction = (e) => {
|
|
46543
|
-
var
|
|
46544
|
-
const { scope: t, getContainer: o, item: n, children: r, trigger: i, align: a, database: l } = e, { getInterface: c, getTemplate: u, collections: d, getCollection: p } = useCollectionManager_deprecated(), [m, h] = useState(!1), [g, f] = useState(), [C, S] = useState({}), b = useCompile(), { t: y } = useTranslation(), { isDialect: v } = useDialect(), I = useFieldInterfaceOptions(), w = ((j = (
|
|
46558
|
+
var z, j;
|
|
46559
|
+
const { scope: t, getContainer: o, item: n, children: r, trigger: i, align: a, database: l } = e, { getInterface: c, getTemplate: u, collections: d, getCollection: p } = useCollectionManager_deprecated(), [m, h] = useState(!1), [g, f] = useState(), [C, S] = useState({}), b = useCompile(), { t: y } = useTranslation(), { isDialect: v } = useDialect(), I = useFieldInterfaceOptions(), w = ((j = (z = p(n.name)) == null ? void 0 : z.options) == null ? void 0 : j.fields) || n.fields || [], k = useMemo(() => d.map((R) => ({
|
|
46545
46560
|
label: b(R.title),
|
|
46546
46561
|
value: R.name
|
|
46547
46562
|
})), []), A = useCallback(() => {
|
|
46548
46563
|
const { availableFieldInterfaces: R } = u(n.template) || {}, { exclude: B, include: M } = R || {}, T = [];
|
|
46549
46564
|
return I.forEach((N) => {
|
|
46550
|
-
var
|
|
46565
|
+
var O;
|
|
46551
46566
|
if (N.key === "systemInfo")
|
|
46552
46567
|
T.push(F(x({}, N), {
|
|
46553
46568
|
children: N.children.filter((q) => q.hidden ? !1 : q.value === "tableoid" ? M != null && M.length ? M.includes(q.value) : (l == null ? void 0 : l.dialect) === "postgres" : typeof n[q.value] == "boolean" ? n[q.value] : !0)
|
|
@@ -46560,7 +46575,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
46560
46575
|
U && q.push(F(x({}, U), {
|
|
46561
46576
|
targetScope: E == null ? void 0 : E.targetScope
|
|
46562
46577
|
}));
|
|
46563
|
-
}) : B != null && B.length ? q = (
|
|
46578
|
+
}) : B != null && B.length ? q = (O = N == null ? void 0 : N.children) == null ? void 0 : O.filter((E) => !B.includes(E.name)) : q = N == null ? void 0 : N.children, q != null && q.length && T.push(F(x({}, N), {
|
|
46564
46579
|
children: q
|
|
46565
46580
|
}));
|
|
46566
46581
|
}
|
|
@@ -46739,14 +46754,14 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
46739
46754
|
"a",
|
|
46740
46755
|
F(x({}, a), {
|
|
46741
46756
|
onClick: () => V(void 0, null, function* () {
|
|
46742
|
-
var L,
|
|
46757
|
+
var L, z;
|
|
46743
46758
|
const { data: k } = yield g.resource("collections.fields", n.collectionName).get({
|
|
46744
46759
|
filterByTk: n.name,
|
|
46745
46760
|
appends: ["reverseField"]
|
|
46746
46761
|
});
|
|
46747
46762
|
b(k == null ? void 0 : k.data);
|
|
46748
46763
|
const A = l(n.interface), D = cloneDeep(k == null ? void 0 : k.data) || {};
|
|
46749
|
-
D != null && D.reverseField || (D.autoCreateReverseField = !1, D.reverseField = (L = A == null ? void 0 : A.default) == null ? void 0 : L.reverseField, set(D.reverseField, "name", `f_${uid()}`), set(D.reverseField, "uiSchema.title", (
|
|
46764
|
+
D != null && D.reverseField || (D.autoCreateReverseField = !1, D.reverseField = (L = A == null ? void 0 : A.default) == null ? void 0 : L.reverseField, set(D.reverseField, "name", `f_${uid()}`), set(D.reverseField, "uiSchema.title", (z = n.__parent) == null ? void 0 : z.title));
|
|
46750
46765
|
const $ = getSchema$7(A, D, n, C);
|
|
46751
46766
|
h($), p(!0);
|
|
46752
46767
|
}),
|
|
@@ -46852,7 +46867,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
46852
46867
|
run() {
|
|
46853
46868
|
return V(this, null, function* () {
|
|
46854
46869
|
yield j.submit();
|
|
46855
|
-
const
|
|
46870
|
+
const O = cloneDeep(j.values), q = omit$1(O, [
|
|
46856
46871
|
"key",
|
|
46857
46872
|
"uiSchemaUid",
|
|
46858
46873
|
"collectionName",
|
|
@@ -46870,7 +46885,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
46870
46885
|
});
|
|
46871
46886
|
}
|
|
46872
46887
|
};
|
|
46873
|
-
},
|
|
46888
|
+
}, z = useMemo(() => {
|
|
46874
46889
|
var j;
|
|
46875
46890
|
return (n == null ? void 0 : n.fields) || ((j = d(n.collectionName)) == null ? void 0 : j.options.fields.filter((R) => ["string", "bigInt", "integer"].includes(R.type)).map((R) => {
|
|
46876
46891
|
var B;
|
|
@@ -46923,7 +46938,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
46923
46938
|
isOverride: !0,
|
|
46924
46939
|
targetScope: { target: I(l), through: I(c) },
|
|
46925
46940
|
collections: $,
|
|
46926
|
-
scopeKeyOptions:
|
|
46941
|
+
scopeKeyOptions: z
|
|
46927
46942
|
}, t)
|
|
46928
46943
|
}
|
|
46929
46944
|
)
|
|
@@ -47374,14 +47389,14 @@ const getSchema$4 = (e, t, o) => {
|
|
|
47374
47389
|
};
|
|
47375
47390
|
})
|
|
47376
47391
|
};
|
|
47377
|
-
}),
|
|
47392
|
+
}), O = (q = M.fields.filter((E) => !["obo", "oho", "m2m", "o2m"].includes(E == null ? void 0 : E.interface))) == null ? void 0 : q.map((E) => {
|
|
47378
47393
|
var U;
|
|
47379
47394
|
return { value: E.name, key: E.name, label: l(((U = E.uiSchema) == null ? void 0 : U.title) || E.name) };
|
|
47380
47395
|
}).concat(N);
|
|
47381
47396
|
R.push({
|
|
47382
47397
|
value: B,
|
|
47383
47398
|
label: l(M.title || M.name),
|
|
47384
|
-
children:
|
|
47399
|
+
children: O
|
|
47385
47400
|
});
|
|
47386
47401
|
}), h(R);
|
|
47387
47402
|
}, [g, t]), useEffect(() => {
|
|
@@ -47390,11 +47405,11 @@ const getSchema$4 = (e, t, o) => {
|
|
|
47390
47405
|
if (R) {
|
|
47391
47406
|
u(!1), p([]);
|
|
47392
47407
|
const T = (M = Object.values((B = R == null ? void 0 : R.data) == null ? void 0 : B.fields)) == null ? void 0 : M.map((N) => {
|
|
47393
|
-
var
|
|
47408
|
+
var O, q;
|
|
47394
47409
|
if (N.source) {
|
|
47395
47410
|
const E = (i == null ? void 0 : i.data.find((U) => U.name === N.name)) || N;
|
|
47396
47411
|
return F(x({}, N), {
|
|
47397
|
-
uiSchema: F(x({}, omit$1(E.uiSchema, "rawTitle")), { title: ((
|
|
47412
|
+
uiSchema: F(x({}, omit$1(E.uiSchema, "rawTitle")), { title: ((O = E.uiSchema) == null ? void 0 : O.title) || E.name })
|
|
47398
47413
|
});
|
|
47399
47414
|
} else {
|
|
47400
47415
|
const E = (i == null ? void 0 : i.data.find((U) => U.name === N.name)) || N;
|
|
@@ -47404,16 +47419,16 @@ const getSchema$4 = (e, t, o) => {
|
|
|
47404
47419
|
}
|
|
47405
47420
|
});
|
|
47406
47421
|
b.value = T, setTimeout(() => {
|
|
47407
|
-
var N,
|
|
47408
|
-
p(T), y.setValuesIn("sources", (N = R.data) == null ? void 0 : N.sources), f((
|
|
47422
|
+
var N, O, q;
|
|
47423
|
+
p(T), y.setValuesIn("sources", (N = R.data) == null ? void 0 : N.sources), f((O = R.data) == null ? void 0 : O.sources), S((q = R == null ? void 0 : R.data) == null ? void 0 : q.unsupportedFields);
|
|
47409
47424
|
});
|
|
47410
47425
|
}
|
|
47411
47426
|
}).catch);
|
|
47412
47427
|
}, [t]);
|
|
47413
|
-
const
|
|
47428
|
+
const z = (R, B) => {
|
|
47414
47429
|
d.splice(B, 1, R), p(d), b.value = d.map((M) => {
|
|
47415
|
-
var N,
|
|
47416
|
-
const T = typeof M.source == "string" ? M.source : (q = (
|
|
47430
|
+
var N, O, q;
|
|
47431
|
+
const T = typeof M.source == "string" ? M.source : (q = (O = (N = M.source) == null ? void 0 : N.filter) == null ? void 0 : O.call(N, Boolean)) == null ? void 0 : q.join(".");
|
|
47417
47432
|
return F(x({}, M), {
|
|
47418
47433
|
source: T
|
|
47419
47434
|
});
|
|
@@ -47439,8 +47454,8 @@ const getSchema$4 = (e, t, o) => {
|
|
|
47439
47454
|
options: D(m),
|
|
47440
47455
|
onChange: (T, N) => {
|
|
47441
47456
|
var q;
|
|
47442
|
-
const
|
|
47443
|
-
|
|
47457
|
+
const O = (q = w(T == null ? void 0 : T[0])) == null ? void 0 : q.find((E) => E.name === last(T));
|
|
47458
|
+
z(F(x({}, B), { source: T, uiSchema: O == null ? void 0 : O.uiSchema }), M);
|
|
47444
47459
|
},
|
|
47445
47460
|
placeholder: l("Select field source")
|
|
47446
47461
|
}
|
|
@@ -47460,7 +47475,7 @@ const getSchema$4 = (e, t, o) => {
|
|
|
47460
47475
|
popupMatchSelectWidth: !1,
|
|
47461
47476
|
style: { width: "100%" },
|
|
47462
47477
|
options: (T == null ? void 0 : T.possibleTypes.map((N) => ({ label: N, value: N }))) || [],
|
|
47463
|
-
onChange: (N) =>
|
|
47478
|
+
onChange: (N) => z(F(x({}, T), { type: N }), M)
|
|
47464
47479
|
}
|
|
47465
47480
|
);
|
|
47466
47481
|
}
|
|
@@ -47478,12 +47493,12 @@ const getSchema$4 = (e, t, o) => {
|
|
|
47478
47493
|
defaultValue: R,
|
|
47479
47494
|
style: { width: "100%" },
|
|
47480
47495
|
popupMatchSelectWidth: !1,
|
|
47481
|
-
onChange: (
|
|
47496
|
+
onChange: (O) => {
|
|
47482
47497
|
var E;
|
|
47483
|
-
const q = I(
|
|
47484
|
-
|
|
47498
|
+
const q = I(O);
|
|
47499
|
+
z(F(x({}, T), { interface: O, uiSchema: (E = q == null ? void 0 : q.default) == null ? void 0 : E.uiSchema }), M);
|
|
47485
47500
|
},
|
|
47486
|
-
children: N.map((
|
|
47501
|
+
children: N.map((O) => /* @__PURE__ */ jsx(Select$1.OptGroup, { label: D(O.label), children: O.children.map((q) => /* @__PURE__ */ jsx(Select$1.Option, { value: q.name, children: D(q.label) }, q.value)) }, O.key))
|
|
47487
47502
|
}
|
|
47488
47503
|
);
|
|
47489
47504
|
}
|
|
@@ -47500,8 +47515,8 @@ const getSchema$4 = (e, t, o) => {
|
|
|
47500
47515
|
Input$3,
|
|
47501
47516
|
{
|
|
47502
47517
|
defaultValue: ((N = T == null ? void 0 : T.uiSchema) == null ? void 0 : N.title) || R,
|
|
47503
|
-
onChange: (
|
|
47504
|
-
F(x({}, T), { uiSchema: F(x({}, omit$1(T == null ? void 0 : T.uiSchema, "rawTitle")), { title:
|
|
47518
|
+
onChange: (O) => z(
|
|
47519
|
+
F(x({}, T), { uiSchema: F(x({}, omit$1(T == null ? void 0 : T.uiSchema, "rawTitle")), { title: O.target.value }) }),
|
|
47505
47520
|
M
|
|
47506
47521
|
)
|
|
47507
47522
|
}
|
|
@@ -47555,15 +47570,15 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
|
|
|
47555
47570
|
}, b = (y) => {
|
|
47556
47571
|
var v;
|
|
47557
47572
|
return (v = y.filter((I) => I.source || I.interface)) == null ? void 0 : v.map((I) => {
|
|
47558
|
-
var $, L,
|
|
47559
|
-
const w = typeof (I == null ? void 0 : I.source) == "string" ? ($ = I == null ? void 0 : I.source) == null ? void 0 : $.split(".") : I == null ? void 0 : I.source, k = (
|
|
47573
|
+
var $, L, z, j, R, B;
|
|
47574
|
+
const w = typeof (I == null ? void 0 : I.source) == "string" ? ($ = I == null ? void 0 : I.source) == null ? void 0 : $.split(".") : I == null ? void 0 : I.source, k = (z = (L = h(w == null ? void 0 : w[0])) == null ? void 0 : L.find((M) => M.name === (w == null ? void 0 : w[1]))) == null ? void 0 : z.uiSchema, A = ((j = I == null ? void 0 : I.uiSchema) == null ? void 0 : j.title) || (k == null ? void 0 : k.title) || I.name, D = I.source ? k : (B = (R = m(I.interface)) == null ? void 0 : R.default) == null ? void 0 : B.uiSchema;
|
|
47560
47575
|
return {
|
|
47561
47576
|
title: u(A),
|
|
47562
47577
|
dataIndex: I.name,
|
|
47563
47578
|
key: I.name,
|
|
47564
47579
|
width: 200,
|
|
47565
47580
|
render: (M, T, N) => {
|
|
47566
|
-
const
|
|
47581
|
+
const O = T[I.name], q = {
|
|
47567
47582
|
type: "object",
|
|
47568
47583
|
properties: {
|
|
47569
47584
|
[I.name]: {
|
|
@@ -47571,7 +47586,7 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
|
|
|
47571
47586
|
"x-component": D && w ? "CollectionField" : "Input",
|
|
47572
47587
|
"x-read-pretty": !0,
|
|
47573
47588
|
"x-collection-field": w == null ? void 0 : w.join("."),
|
|
47574
|
-
default: I.interface === "json" ? JSON.stringify(
|
|
47589
|
+
default: I.interface === "json" ? JSON.stringify(O) : O
|
|
47575
47590
|
}
|
|
47576
47591
|
}
|
|
47577
47592
|
};
|
|
@@ -47806,9 +47821,9 @@ const AsyncDataProvider = (e) => {
|
|
|
47806
47821
|
if (useEffect(() => {
|
|
47807
47822
|
var $;
|
|
47808
47823
|
const A = /* @__PURE__ */ new Map();
|
|
47809
|
-
i || (a && a.length ? Object.entries((a == null ? void 0 : a[0]) || {}).forEach(([L,
|
|
47824
|
+
i || (a && a.length ? Object.entries((a == null ? void 0 : a[0]) || {}).forEach(([L, z]) => {
|
|
47810
47825
|
var T;
|
|
47811
|
-
const j = l[L], R = inferInterface(L,
|
|
47826
|
+
const j = l[L], R = inferInterface(L, z), B = (T = C.current(R)) == null ? void 0 : T.default, M = (j == null ? void 0 : j.uiSchema) || (B == null ? void 0 : B.uiSchema) || {};
|
|
47812
47827
|
A.set(L, {
|
|
47813
47828
|
name: L,
|
|
47814
47829
|
interface: (j == null ? void 0 : j.interface) || R,
|
|
@@ -47819,13 +47834,13 @@ const AsyncDataProvider = (e) => {
|
|
|
47819
47834
|
}, M)
|
|
47820
47835
|
});
|
|
47821
47836
|
}) : Object.entries(l || {}).forEach(
|
|
47822
|
-
([L,
|
|
47837
|
+
([L, z]) => A.set(L, F(x({
|
|
47823
47838
|
name: L,
|
|
47824
47839
|
type: "string"
|
|
47825
|
-
},
|
|
47840
|
+
}, z), {
|
|
47826
47841
|
uiSchema: x({
|
|
47827
47842
|
title: L
|
|
47828
|
-
}, (
|
|
47843
|
+
}, (z == null ? void 0 : z.uiSchema) || {})
|
|
47829
47844
|
}))
|
|
47830
47845
|
)), ($ = c.value) != null && $.length && c.value.forEach((L) => {
|
|
47831
47846
|
A.has(L.name) && A.set(L.name, L);
|
|
@@ -47846,9 +47861,9 @@ const AsyncDataProvider = (e) => {
|
|
|
47846
47861
|
const $ = [...t];
|
|
47847
47862
|
$.splice(D, 1, A), o($), c.setValue(
|
|
47848
47863
|
$.map((L) => {
|
|
47849
|
-
var
|
|
47864
|
+
var z, j, R;
|
|
47850
47865
|
return F(x({}, L), {
|
|
47851
|
-
source: typeof L.source == "string" ? L.source : ((R = (j = (
|
|
47866
|
+
source: typeof L.source == "string" ? L.source : ((R = (j = (z = L.source) == null ? void 0 : z.filter) == null ? void 0 : j.call(z, Boolean)) == null ? void 0 : R.join(".")) || null
|
|
47852
47867
|
});
|
|
47853
47868
|
})
|
|
47854
47869
|
);
|
|
@@ -47873,11 +47888,11 @@ const AsyncDataProvider = (e) => {
|
|
|
47873
47888
|
allowClear: !0,
|
|
47874
47889
|
options: d(f),
|
|
47875
47890
|
placeholder: e("Select field source"),
|
|
47876
|
-
onChange: (
|
|
47877
|
-
let j = l[
|
|
47878
|
-
j != null && j.interface || (j = m((
|
|
47891
|
+
onChange: (z) => {
|
|
47892
|
+
let j = l[z == null ? void 0 : z[1]];
|
|
47893
|
+
j != null && j.interface || (j = m((z == null ? void 0 : z.join(".")) || "")), b(
|
|
47879
47894
|
F(x({}, L), {
|
|
47880
|
-
source:
|
|
47895
|
+
source: z,
|
|
47881
47896
|
interface: j == null ? void 0 : j.interface,
|
|
47882
47897
|
type: j == null ? void 0 : j.type,
|
|
47883
47898
|
uiSchema: j == null ? void 0 : j.uiSchema
|
|
@@ -47895,16 +47910,16 @@ const AsyncDataProvider = (e) => {
|
|
|
47895
47910
|
key: "interface",
|
|
47896
47911
|
width: 150,
|
|
47897
47912
|
render: (A, D, $) => {
|
|
47898
|
-
var
|
|
47913
|
+
var z;
|
|
47899
47914
|
const L = t[$];
|
|
47900
|
-
return L.source ? /* @__PURE__ */ jsx(Tag, { children: d((
|
|
47915
|
+
return L.source ? /* @__PURE__ */ jsx(Tag, { children: d((z = p(A)) == null ? void 0 : z.title) || A }) : /* @__PURE__ */ jsx(
|
|
47901
47916
|
Select$1,
|
|
47902
47917
|
{
|
|
47903
47918
|
defaultValue: L.interface || "input",
|
|
47904
47919
|
style: { width: "100%" },
|
|
47905
47920
|
popupMatchSelectWidth: !1,
|
|
47906
47921
|
onChange: (j) => {
|
|
47907
|
-
var B, M, T, N,
|
|
47922
|
+
var B, M, T, N, O;
|
|
47908
47923
|
const R = p(j);
|
|
47909
47924
|
b(
|
|
47910
47925
|
F(x({}, L), {
|
|
@@ -47912,7 +47927,7 @@ const AsyncDataProvider = (e) => {
|
|
|
47912
47927
|
uiSchema: F(x({}, (B = R == null ? void 0 : R.default) == null ? void 0 : B.uiSchema), {
|
|
47913
47928
|
title: ((T = (M = R == null ? void 0 : R.default) == null ? void 0 : M.uiSchema) == null ? void 0 : T.title) || ((N = L.uiSchema) == null ? void 0 : N.title)
|
|
47914
47929
|
}),
|
|
47915
|
-
type: (
|
|
47930
|
+
type: (O = R == null ? void 0 : R.default) == null ? void 0 : O.type
|
|
47916
47931
|
}),
|
|
47917
47932
|
$
|
|
47918
47933
|
);
|
|
@@ -47929,12 +47944,12 @@ const AsyncDataProvider = (e) => {
|
|
|
47929
47944
|
key: "title",
|
|
47930
47945
|
width: 180,
|
|
47931
47946
|
render: (A, D, $) => {
|
|
47932
|
-
var
|
|
47947
|
+
var z, j;
|
|
47933
47948
|
const L = t[$];
|
|
47934
47949
|
return /* @__PURE__ */ jsx(
|
|
47935
47950
|
Input$3,
|
|
47936
47951
|
{
|
|
47937
|
-
value: ((
|
|
47952
|
+
value: ((z = L.uiSchema) == null ? void 0 : z.title) || A,
|
|
47938
47953
|
defaultValue: ((j = L.uiSchema) == null ? void 0 : j.title) !== void 0 ? L.uiSchema.title : L == null ? void 0 : L.name,
|
|
47939
47954
|
onChange: (R) => b(F(x({}, L), { uiSchema: F(x({}, L == null ? void 0 : L.uiSchema), { title: R.target.value }) }), $)
|
|
47940
47955
|
}
|
|
@@ -54140,13 +54155,13 @@ const RolesResourcesActions = connect((e) => {
|
|
|
54140
54155
|
onChange: () => {
|
|
54141
54156
|
const L = m[k.name] || {
|
|
54142
54157
|
name: k.name
|
|
54143
|
-
},
|
|
54158
|
+
}, z = L.fields || [];
|
|
54144
54159
|
if (D) {
|
|
54145
|
-
const j =
|
|
54146
|
-
|
|
54160
|
+
const j = z.indexOf($.name);
|
|
54161
|
+
z.splice(j, 1);
|
|
54147
54162
|
} else
|
|
54148
|
-
|
|
54149
|
-
L.fields =
|
|
54163
|
+
z.push($.name);
|
|
54164
|
+
L.fields = z, m[k.name] = L, o(Object.values(m));
|
|
54150
54165
|
}
|
|
54151
54166
|
}
|
|
54152
54167
|
)
|
|
@@ -56006,8 +56021,8 @@ const useMenuProps = () => {
|
|
|
56006
56021
|
var D, $, L;
|
|
56007
56022
|
const A = (($ = Object.values(((D = f == null ? void 0 : f.root) == null ? void 0 : D.properties) || {}).shift()) == null ? void 0 : $.properties) || ((L = v == null ? void 0 : v.data) == null ? void 0 : L.properties);
|
|
56008
56023
|
if (h.current) {
|
|
56009
|
-
const
|
|
56010
|
-
|
|
56024
|
+
const z = A && Object.values(A).find((R) => R["x-uid"] === l.name && R["x-component"] === "Menu.Item"), j = c == null ? void 0 : c.pathname.includes("/settings");
|
|
56025
|
+
z || j ? h.current.style.display = "none" : h.current.style.display = "block";
|
|
56011
56026
|
}
|
|
56012
56027
|
}, [v == null ? void 0 : v.data, l.name, h, c == null ? void 0 : c.pathname]);
|
|
56013
56028
|
const w = useMemo(() => {
|
|
@@ -56977,7 +56992,7 @@ const ActionInitializerItem = (e) => {
|
|
|
56977
56992
|
), I = f || (i == null ? void 0 : i.targetKey) || "id", w = C || ((U = (E = a["x-component-props"]) == null ? void 0 : E.fieldNames) == null ? void 0 : U.label) || I, k = {
|
|
56978
56993
|
title: w || I,
|
|
56979
56994
|
key: I
|
|
56980
|
-
}, [A, D] = useState([]), [$, L] = useState(a.default || []), [
|
|
56995
|
+
}, [A, D] = useState([]), [$, L] = useState(a.default || []), [z, j] = useState(!0), R = useLabelUiSchema(i, (k == null ? void 0 : k.title) || "label");
|
|
56981
56996
|
if (useEffect(() => {
|
|
56982
56997
|
a.default && (d(a.default), L(a.default));
|
|
56983
56998
|
}, [a.default, d]), !i)
|
|
@@ -56994,7 +57009,7 @@ const ActionInitializerItem = (e) => {
|
|
|
56994
57009
|
})), y(!b), W.stopPropagation();
|
|
56995
57010
|
}, N = (W) => {
|
|
56996
57011
|
W.stopPropagation();
|
|
56997
|
-
},
|
|
57012
|
+
}, O = (W) => {
|
|
56998
57013
|
m(W);
|
|
56999
57014
|
}, q = (H = a.title) != null ? H : (G = i == null ? void 0 : i.uiSchema) == null ? void 0 : G.title;
|
|
57000
57015
|
return t(
|
|
@@ -57021,7 +57036,7 @@ const ActionInitializerItem = (e) => {
|
|
|
57021
57036
|
placeholder: "Search...",
|
|
57022
57037
|
className: "search",
|
|
57023
57038
|
onClick: N,
|
|
57024
|
-
onChange:
|
|
57039
|
+
onChange: O
|
|
57025
57040
|
}
|
|
57026
57041
|
) : c(q) }),
|
|
57027
57042
|
/* @__PURE__ */ jsx(
|
|
@@ -57042,7 +57057,7 @@ const ActionInitializerItem = (e) => {
|
|
|
57042
57057
|
className: "Tree",
|
|
57043
57058
|
onExpand: B,
|
|
57044
57059
|
expandedKeys: A,
|
|
57045
|
-
autoExpandParent:
|
|
57060
|
+
autoExpandParent: z,
|
|
57046
57061
|
treeData: u,
|
|
57047
57062
|
onSelect: M,
|
|
57048
57063
|
fieldNames: k,
|
|
@@ -57454,8 +57469,8 @@ const DataBlockInitializer = (e) => {
|
|
|
57454
57469
|
if (f)
|
|
57455
57470
|
return f(M);
|
|
57456
57471
|
if (T.template) {
|
|
57457
|
-
const
|
|
57458
|
-
y(t ? t(
|
|
57472
|
+
const O = yield w(T);
|
|
57473
|
+
y(t ? t(O, { item: T, fromOthersInPopup: N }) : O);
|
|
57459
57474
|
} else
|
|
57460
57475
|
o && o({ item: T, fromOthersInPopup: N });
|
|
57461
57476
|
v(!1);
|
|
@@ -57475,7 +57490,7 @@ const DataBlockInitializer = (e) => {
|
|
|
57475
57490
|
onClick: k,
|
|
57476
57491
|
currentText: S,
|
|
57477
57492
|
otherText: b
|
|
57478
|
-
}), D = useGetSchemaInitializerMenuItems(k), $ = useMemo(() => D(A, i), [D, A, i]), [L,
|
|
57493
|
+
}), D = useGetSchemaInitializerMenuItems(k), $ = useMemo(() => D(A, i), [D, A, i]), [L, z] = useState([]), j = useMenuSearch({ data: $, openKeys: L, hideSearch: u }), R = useMemo(() => {
|
|
57479
57494
|
let M = j.filter((T) => T.key !== "search" && T.key !== "empty");
|
|
57480
57495
|
return p && M.length === 1 ? M = M[0].children : M = j, [
|
|
57481
57496
|
{
|
|
@@ -57493,7 +57508,7 @@ const DataBlockInitializer = (e) => {
|
|
|
57493
57508
|
SchemaInitializerMenu,
|
|
57494
57509
|
{
|
|
57495
57510
|
onOpenChange: (M) => {
|
|
57496
|
-
|
|
57511
|
+
z(M);
|
|
57497
57512
|
},
|
|
57498
57513
|
items: R
|
|
57499
57514
|
}
|
|
@@ -61178,29 +61193,28 @@ class LocalePlugin extends Plugin {
|
|
|
61178
61193
|
}
|
|
61179
61194
|
}
|
|
61180
61195
|
const AppSpin = () => /* @__PURE__ */ jsx(Spin, { style: { position: "fixed", top: "50%", left: "50%", fontSize: 72, transform: "translate(-50%, -50%)" } }), useErrorProps = (e, t) => {
|
|
61181
|
-
var i, a
|
|
61182
|
-
const o = useAPIClient();
|
|
61196
|
+
var r, i, a;
|
|
61183
61197
|
if (!t)
|
|
61184
61198
|
return {};
|
|
61185
|
-
const
|
|
61186
|
-
switch (
|
|
61199
|
+
const o = ((a = (i = (r = t == null ? void 0 : t.response) == null ? void 0 : r.data) == null ? void 0 : i.errors) == null ? void 0 : a[0]) || t, n = getSubAppName(e.getPublicPath());
|
|
61200
|
+
switch (o.code) {
|
|
61187
61201
|
case "USER_HAS_NO_ROLES_ERR":
|
|
61188
61202
|
return {
|
|
61189
61203
|
title: e.i18n.t("Permission denied"),
|
|
61190
|
-
subTitle:
|
|
61204
|
+
subTitle: o.message,
|
|
61191
61205
|
extra: [
|
|
61192
61206
|
/* @__PURE__ */ jsx(
|
|
61193
61207
|
Button,
|
|
61194
61208
|
{
|
|
61195
61209
|
type: "primary",
|
|
61196
61210
|
onClick: () => {
|
|
61197
|
-
|
|
61211
|
+
e.apiClient.auth.setToken(null), window.location.reload();
|
|
61198
61212
|
},
|
|
61199
61213
|
children: e.i18n.t("Sign in with another account")
|
|
61200
61214
|
},
|
|
61201
61215
|
"try"
|
|
61202
61216
|
),
|
|
61203
|
-
|
|
61217
|
+
n ? /* @__PURE__ */ jsx(Button, { onClick: () => window.location.href = "/admin", children: e.i18n.t("Return to the main application") }, "back") : null
|
|
61204
61218
|
]
|
|
61205
61219
|
};
|
|
61206
61220
|
default:
|