@nocobase/client 1.5.6 → 1.5.8

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 CHANGED
@@ -58,7 +58,7 @@ import * as ahooks from "ahooks";
58
58
  import { useSetState, useRequest as useRequest$1, useBoolean, useUpdate, useMemoizedFn, useDeepCompareEffect, useLocalStorageState, useEventListener, useCreation, useDebounce } from "ahooks";
59
59
  import * as antd from "antd";
60
60
  import { notification, Result, Button, Space as Space$1, Radio as Radio$1, Input as Input$3, Tag, Spin, Select as Select$1, theme as theme$1, App, ConfigProvider, message, Popover, Menu as Menu$1, Modal, Typography, Tooltip, Skeleton, Table as Table$3, Drawer as Drawer$1, Slider, Tree as Tree$2, Alert, Flex, Switch, Divider as Divider$1, Empty, DatePicker as DatePicker$1, Card, Collapse, Badge, Dropdown, Cascader as Cascader$1, Image, InputNumber as InputNumber$1, Tabs as Tabs$1, TreeSelect as TreeSelect$2, Upload as Upload$1, Progress, AutoComplete as AutoComplete$1, Checkbox as Checkbox$1, ColorPicker as ColorPicker$1, List as List$1, Col, QRCode, Pagination as Pagination$1, TimePicker as TimePicker$1, Row, Popconfirm, Layout as Layout$1 } from "antd";
61
- import _, { filter, get, capitalize, cloneDeep as cloneDeep$1, isArray, every, some, findIndex, set, isObject as isObject$1, isEmpty as isEmpty$1, isString, omit, isEqual, concat, last, clone, debounce, castArray, uniqBy, differenceBy, unionBy, isFunction as isFunction$1, isBoolean, uniq as uniq$2, pick as pick$1 } from "lodash";
61
+ import _, { filter, get, capitalize, cloneDeep as cloneDeep$1, isArray, every, some, findIndex, set, isObject as isObject$1, isEmpty as isEmpty$1, isString, omit, isEqual, concat, last, clone, debounce, castArray, uniqBy, differenceBy, unionBy, isFunction as isFunction$1, isBoolean, toString, uniq as uniq$2, pick as pick$1 } from "lodash";
62
62
  import template from "lodash/template";
63
63
  import React, { createContext, useContext, useMemo, useRef, useEffect, isValidElement, useCallback, memo, useState, Suspense, useDeferredValue, createElement, Fragment as Fragment$1, startTransition, useLayoutEffect, forwardRef, useImperativeHandle, lazy as lazy$1, createRef } from "react";
64
64
  import * as ReactRouterDom from "react-router-dom";
@@ -8861,7 +8861,7 @@ const useNiceDropdownMaxHeight = (e = []) => {
8861
8861
  }, FlagContext = React.createContext(null), FlagProvider = (e) => /* @__PURE__ */ jsx(FlagContext.Provider, { value: e, children: e.children }), useFlag = () => useContext(FlagContext) || {}, { ConfigContext } = ConfigProvider, useConfig = () => useContext(ConfigContext), usePrefixCls = (e, t) => {
8862
8862
  const { getPrefixCls: n } = useContext(ConfigProvider.ConfigContext) || {};
8863
8863
  return "ConfigContext" in ConfigProvider ? (n == null ? void 0 : n(e, t == null ? void 0 : t.prefixCls)) || "" : `ant-${e != null ? e : ""}`;
8864
- }, useToken = () => theme$1.useToken(), loading$1 = (e = "Loading...", t) => q(void 0, null, function* () {
8864
+ }, useToken = () => theme$1.useToken(), loading = (e = "Loading...", t) => q(void 0, null, function* () {
8865
8865
  let n = null;
8866
8866
  const o = setTimeout(() => {
8867
8867
  n = message.loading(e);
@@ -10490,14 +10490,14 @@ const Table$2 = withDynamicSchemaProps(
10490
10490
  "onClickRow",
10491
10491
  "value"
10492
10492
  ]), y = useArrayField$1(S), v = useFieldSchema(), { size: F = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, I = useCollection(), k = ((ce = v == null ? void 0 : v.parent) == null ? void 0 : ce["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: M } = k, z = useMemoizedFn(S.onRowDragEnd || (() => {
10493
- })), L = usePaginationProps$3(n, i, e), $ = useTableColumns$2(S, L), [w, B] = useState(() => D ? M : []), [j, T] = useState(((Ce = y == null ? void 0 : y.data) == null ? void 0 : Ce.selectedRowKeys) || []), [N, O] = useState([]), V = (p == null ? void 0 : p.type) !== "none", E = useRef(/* @__PURE__ */ new Map()), U = useMemo(() => css`
10493
+ })), L = usePaginationProps$3(n, i, e), $ = useTableColumns$2(S, L), [w, B] = useState(() => D ? M : []), [j, T] = useState(((Ce = y == null ? void 0 : y.data) == null ? void 0 : Ce.selectedRowKeys) || []), [N, O] = useState([]), V = (p == null ? void 0 : p.type) !== "none", E = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
10494
10494
  & > td {
10495
10495
  background-color: ${t.controlItemBgActive} !important;
10496
10496
  }
10497
10497
  &:hover > td {
10498
10498
  background-color: ${t.controlItemBgActiveHover} !important;
10499
10499
  }
10500
- `, [t.controlItemBgActive, t.controlItemBgActiveHover]), G = useMemo(() => C ? U : "", [U, C]), H = useMemo(() => C ? (re, ee) => ({
10500
+ `, [t.controlItemBgActive, t.controlItemBgActiveHover]), U = useMemo(() => C ? G : "", [G, C]), H = useMemo(() => C ? (re, ee) => ({
10501
10501
  onClick: (ne) => {
10502
10502
  isPortalInBody(ne.target) || C(re, O, N);
10503
10503
  },
@@ -10628,8 +10628,8 @@ const Table$2 = withDynamicSchemaProps(
10628
10628
  x: "max-content",
10629
10629
  y: ie
10630
10630
  }), [ie, J]), xe = useCallback(
10631
- (re) => N.includes(re[m]) ? G : "",
10632
- [N, G, JSON.stringify(m)]
10631
+ (re) => N.includes(re[m]) ? U : "",
10632
+ [N, U, JSON.stringify(m)]
10633
10633
  ), pe = useCallback(
10634
10634
  (re, ee) => {
10635
10635
  const ne = re ? [...w, ee[I.getPrimaryKey()]] : w.filter((se) => ee[I.getPrimaryKey()] !== se);
@@ -10780,15 +10780,14 @@ const InternalTableBlockProvider = (e) => {
10780
10780
  return c ? null : /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: { treeTable: a }, children: /* @__PURE__ */ jsx(FormContext.Provider, { value: d, children: /* @__PURE__ */ jsx(BlockProvider, P(x({ name: e.name || "table" }, e), { params: l, runWhenParamsChanged: !0, children: /* @__PURE__ */ jsx(InternalTableBlockProvider, P(x({}, e), { childrenColumnName: u, params: l })) })) }) });
10781
10781
  }), useTableBlockContext = () => useContext(TableBlockContext), useTableBlockContextBasicValue = () => useContext(TableBlockContextBasicValue), ActionContext = createContext({});
10782
10782
  ActionContext.displayName = "ActionContext";
10783
- let loading = !1;
10784
10783
  const ActionContextProvider = React.memo(
10785
10784
  (e) => {
10786
10785
  const [t, n] = useState(!1), { visible: o } = x(x({}, e), e.value), { setSubmitted: r } = x(x({}, e), e.value), i = useBlockServiceInActionButton(), a = useIsSubPageClosedByPageMenu(useFieldSchema());
10787
- useEffect(() => (q(void 0, null, function* () {
10788
- o === !1 && i && !loading && (t || a) && (loading = !0, yield i.refreshAsync(), loading = !1, r == null || r(!0));
10789
- }), () => {
10790
- n(!1);
10791
- }), [o, i == null ? void 0 : i.refresh, r, a]);
10786
+ useEffect(() => {
10787
+ q(void 0, null, function* () {
10788
+ o === !1 && i && !i.loading && (t || a) && (i.loading = !0, yield i.refreshAsync(), i.loading = !1, n(!1), r == null || r(!0));
10789
+ });
10790
+ }, [o, i == null ? void 0 : i.refresh, r, a]);
10792
10791
  const l = useMemo(() => P(x(x({}, e), e == null ? void 0 : e.value), { submitted: t, setSubmitted: n }), [e, t]);
10793
10792
  return /* @__PURE__ */ jsx(ActionContext.Provider, { value: l, children: e.children });
10794
10793
  }
@@ -10908,15 +10907,15 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
10908
10907
  return I == null ? void 0 : I(!0);
10909
10908
  const O = N || o, V = O == null ? void 0 : O["x-uid"], E = y(B);
10910
10909
  w = w || (i == null ? void 0 : i.data);
10911
- const U = R({
10910
+ const G = R({
10912
10911
  popupUid: V,
10913
10912
  recordData: w,
10914
10913
  sourceId: E,
10915
10914
  collection: j,
10916
10915
  puid: T
10917
10916
  });
10918
- let G = n.pathname;
10919
- if (_.last(G) === "/" && (G = G.slice(0, -1)), storePopupContext(V, {
10917
+ let U = n.pathname;
10918
+ if (_.last(U) === "/" && (U = U.slice(0, -1)), storePopupContext(V, {
10920
10919
  schema: O,
10921
10920
  record: new CollectionRecord({ isNew: !1, data: w }),
10922
10921
  parentRecord: B ? new CollectionRecord({ isNew: !1, data: B }) : a,
@@ -10930,7 +10929,7 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
10930
10929
  const H = h + 1;
10931
10930
  if (getPopupLayerState(H))
10932
10931
  return;
10933
- t(withSearchParams(`${G}${U}`)), setPopupLayerState(H, !0);
10932
+ t(withSearchParams(`${U}${G}`)), setPopupLayerState(H, !0);
10934
10933
  } else
10935
10934
  console.error(
10936
10935
  `[NocoBase] The popup schema is invalid, please check the schema:
@@ -15178,7 +15177,7 @@ const useGetAriaLabelOfDesigner = () => {
15178
15177
  return $(T);
15179
15178
  if (j != null && j.InitializerComponent || j != null && j.renderSchemaInitializer)
15180
15179
  return j != null && j.InitializerComponent ? /* @__PURE__ */ jsx(j.InitializerComponent, x({}, T)) : (W = j.renderSchemaInitializer) == null ? void 0 : W.call(j, T);
15181
- }, [j, o, T, w, $]), V = useMemo(() => r !== !1 && L ? z() : null, [L, z, r]), E = useRef(null), U = "hidden";
15180
+ }, [j, o, T, w, $]), V = useMemo(() => r !== !1 && L ? z() : null, [L, z, r]), E = useRef(null), G = "hidden";
15182
15181
  useEffect(() => {
15183
15182
  const W = E.current;
15184
15183
  let Y = W == null ? void 0 : W.parentElement;
@@ -15188,17 +15187,17 @@ const useGetAriaLabelOfDesigner = () => {
15188
15187
  return;
15189
15188
  function J() {
15190
15189
  var Z;
15191
- W && (W.classList.remove(U), (Z = e.onVisibleChange) == null || Z.call(e, !0));
15190
+ W && (W.classList.remove(G), (Z = e.onVisibleChange) == null || Z.call(e, !0));
15192
15191
  }
15193
15192
  function X() {
15194
15193
  var Z;
15195
- W && (W.classList.add(U), (Z = e.onVisibleChange) == null || Z.call(e, !1));
15194
+ W && (W.classList.add(G), (Z = e.onVisibleChange) == null || Z.call(e, !1));
15196
15195
  }
15197
15196
  return window.getComputedStyle(Y).position === "static" && (Y.style.position = "relative"), Y.addEventListener("mouseenter", J), Y.addEventListener("mouseleave", X), () => {
15198
15197
  Y.removeEventListener("mouseenter", J), Y.removeEventListener("mouseleave", X);
15199
15198
  };
15200
15199
  }, [e.onVisibleChange]);
15201
- const G = useMemo(
15200
+ const U = useMemo(
15202
15201
  () => x({
15203
15202
  border: c ? "auto" : 0,
15204
15203
  background: i ? "auto" : 0
@@ -15209,8 +15208,8 @@ const useGetAriaLabelOfDesigner = () => {
15209
15208
  "div",
15210
15209
  {
15211
15210
  ref: E,
15212
- className: cls(C, b, m, "schema-toolbar", U),
15213
- style: G,
15211
+ className: cls(C, b, m, "schema-toolbar", G),
15212
+ style: U,
15214
15213
  children: [
15215
15214
  M && /* @__PURE__ */ jsx("div", { className: "toolbar-title", children: /* @__PURE__ */ jsxs(Space$1, { size: 2, children: [
15216
15215
  /* @__PURE__ */ jsx("span", { className: "toolbar-title-tag", children: R ? `${g(R == null ? void 0 : R.displayName)} > ${M[0]}` : M[0] }, M[0]),
@@ -16574,7 +16573,7 @@ const ActionLink = withDynamicSchemaProps(
16574
16573
  }
16575
16574
  }), handleError = console.log, Action = withDynamicSchemaProps(
16576
16575
  React.memo((e) => {
16577
- var U;
16576
+ var G;
16578
16577
  const E = useProps(e), {
16579
16578
  popover: t,
16580
16579
  containerRefKey: n,
@@ -16614,15 +16613,15 @@ const ActionLink = withDynamicSchemaProps(
16614
16613
  "onMouseEnter",
16615
16614
  "refreshDataBlockRequest",
16616
16615
  "confirmTitle"
16617
- ]), v = useDesigner(), F = useField(), I = useFieldSchema(), R = useCompile(), k = useCollectionRecordData(), D = R((U = I["x-component-props"]) == null ? void 0 : U.confirm) || g, M = useMemo(() => (I == null ? void 0 : I["x-linkage-rules"]) || [], [I == null ? void 0 : I["x-linkage-rules"]]), { designable: z } = useDesignable(), L = useComponent(o) || o, $ = useVariables$1(), w = useLocalVariables$1({ currentForm: { values: k, readPretty: !1 } }), { visibleWithURL: B, setVisibleWithURL: j } = usePopupUtils(), { setSubmitted: T } = useActionContext(), { getAriaLabel: N } = useGetAriaLabelOfAction(l), O = useCollectionParentRecordData();
16616
+ ]), v = useDesigner(), F = useField(), I = useFieldSchema(), R = useCompile(), k = useCollectionRecordData(), D = R((G = I["x-component-props"]) == null ? void 0 : G.confirm) || g, M = useMemo(() => (I == null ? void 0 : I["x-linkage-rules"]) || [], [I == null ? void 0 : I["x-linkage-rules"]]), { designable: z } = useDesignable(), L = useComponent(o) || o, $ = useVariables$1(), w = useLocalVariables$1({ currentForm: { values: k, readPretty: !1 } }), { visibleWithURL: B, setVisibleWithURL: j } = usePopupUtils(), { setSubmitted: T } = useActionContext(), { getAriaLabel: N } = useGetAriaLabelOfAction(l), O = useCollectionParentRecordData();
16618
16617
  useEffect(() => {
16619
- F.stateOfLinkageRules && setInitialActionState(F), F.stateOfLinkageRules = {}, M.filter((G) => !G.disabled).forEach((G) => {
16618
+ F.stateOfLinkageRules && setInitialActionState(F), F.stateOfLinkageRules = {}, M.filter((U) => !U.disabled).forEach((U) => {
16620
16619
  var H;
16621
- (H = G.actions) == null || H.forEach((W) => {
16620
+ (H = U.actions) == null || H.forEach((W) => {
16622
16621
  linkageAction({
16623
16622
  operator: W.operator,
16624
16623
  field: F,
16625
- condition: G.condition,
16624
+ condition: U.condition,
16626
16625
  variables: $,
16627
16626
  localVariables: w
16628
16627
  });
@@ -16630,8 +16629,8 @@ const ActionLink = withDynamicSchemaProps(
16630
16629
  });
16631
16630
  }, [F, M, w, $]);
16632
16631
  const V = useCallback(
16633
- (G) => {
16634
- C == null || C(G);
16632
+ (U) => {
16633
+ C == null || C(U);
16635
16634
  },
16636
16635
  [C]
16637
16636
  );
@@ -16727,7 +16726,7 @@ const ActionLink = withDynamicSchemaProps(
16727
16726
  "setSubmitted",
16728
16727
  "getAriaLabel",
16729
16728
  "parentRecordData"
16730
- ]), [w, B] = useState(!1), { wrapSSR: j, componentCls: T, hashId: N } = useStyles$e(), [O, V] = useState(!1), E = o["x-toolbar-props"] || o["x-designer-props"], U = (pe = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : pe.openMode, G = (fe = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : fe.openSize, H = (me = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : me.refreshDataBlockRequest, { modal: W } = App.useApp(), Y = useForm(), J = useACLActionParamsContext(), { run: X, element: Q, disabled: Z } = (I == null ? void 0 : I(R)) || {}, oe = Y.disabled || i.disabled || ((he = i.data) == null ? void 0 : he.disabled) || F || Z, te = useMemo(() => {
16729
+ ]), [w, B] = useState(!1), { wrapSSR: j, componentCls: T, hashId: N } = useStyles$e(), [O, V] = useState(!1), E = o["x-toolbar-props"] || o["x-designer-props"], G = (pe = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : pe.openMode, U = (fe = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : fe.openSize, H = (me = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : me.refreshDataBlockRequest, { modal: W } = App.useApp(), Y = useForm(), J = useACLActionParamsContext(), { run: X, element: Q, disabled: Z } = (I == null ? void 0 : I(R)) || {}, oe = Y.disabled || i.disabled || ((he = i.data) == null ? void 0 : he.disabled) || F || Z, te = useMemo(() => {
16731
16730
  var ce;
16732
16731
  return P(x({}, v), {
16733
16732
  opacity: r && (((ce = i == null ? void 0 : i.data) == null ? void 0 : ce.hidden) || !J) && 0.1,
@@ -16775,8 +16774,8 @@ const ActionLink = withDynamicSchemaProps(
16775
16774
  setVisible: ae,
16776
16775
  formValueChanged: O,
16777
16776
  setFormValueChanged: V,
16778
- openMode: U,
16779
- openSize: G,
16777
+ openMode: G,
16778
+ openSize: U,
16780
16779
  containerRefKey: n,
16781
16780
  fieldSchema: o,
16782
16781
  setSubmitted: M,
@@ -17939,21 +17938,21 @@ https://requirejs.org/docs/errors.html#` + e);
17939
17938
  }
17940
17939
  }
17941
17940
  function b(T, N, O) {
17942
- var V, E, U, G, H, W, Y, J, X, Q, Z, oe, te = N && N.split("/"), ie = a.map, ae = ie && ie["*"];
17941
+ var V, E, G, U, H, W, Y, J, X, Q, Z, oe, te = N && N.split("/"), ie = a.map, ae = ie && ie["*"];
17943
17942
  if (T && (T = T.split("/"), Y = T.length - 1, a.nodeIdCompat && jsSuffixRegExp.test(T[Y]) && (T[Y] = T[Y].replace(jsSuffixRegExp, "")), T[0].charAt(0) === "." && te && (oe = te.slice(0, te.length - 1), T = oe.concat(T)), C(T), T = T.join("/")), O && ie && (te || ae)) {
17944
- U = T.split("/");
17943
+ G = T.split("/");
17945
17944
  e:
17946
- for (G = U.length; G > 0; G -= 1) {
17947
- if (W = U.slice(0, G).join("/"), te) {
17945
+ for (U = G.length; U > 0; U -= 1) {
17946
+ if (W = G.slice(0, U).join("/"), te) {
17948
17947
  for (H = te.length; H > 0; H -= 1)
17949
17948
  if (E = getOwn(ie, te.slice(0, H).join("/")), E && (E = getOwn(E, W), E)) {
17950
- J = E, X = G;
17949
+ J = E, X = U;
17951
17950
  break e;
17952
17951
  }
17953
17952
  }
17954
- !Q && ae && getOwn(ae, W) && (Q = getOwn(ae, W), Z = G);
17953
+ !Q && ae && getOwn(ae, W) && (Q = getOwn(ae, W), Z = U);
17955
17954
  }
17956
- !J && Q && (J = Q, X = Z), J && (U.splice(0, X, J), T = U.join("/"));
17955
+ !J && Q && (J = Q, X = Z), J && (G.splice(0, X, J), T = G.join("/"));
17957
17956
  }
17958
17957
  return V = getOwn(a.pkgs, T), V || T;
17959
17958
  }
@@ -17975,18 +17974,18 @@ https://requirejs.org/docs/errors.html#` + e);
17975
17974
  return O > -1 && (N = T.substring(0, O), T = T.substring(O + 1, T.length)), [N, T];
17976
17975
  }
17977
17976
  function F(T, N, O, V) {
17978
- var E, U, G, H, W = null, Y = N ? N.name : null, J = T, X = !0, Q = "";
17979
- return T || (X = !1, T = "_@r" + (g += 1)), H = v(T), W = H[0], T = H[1], W && (W = b(W, Y, V), U = getOwn(p, W)), T && (W ? O ? Q = T : U && U.normalize ? Q = U.normalize(T, function(Z) {
17977
+ var E, G, U, H, W = null, Y = N ? N.name : null, J = T, X = !0, Q = "";
17978
+ return T || (X = !1, T = "_@r" + (g += 1)), H = v(T), W = H[0], T = H[1], W && (W = b(W, Y, V), G = getOwn(p, W)), T && (W ? O ? Q = T : G && G.normalize ? Q = G.normalize(T, function(Z) {
17980
17979
  return b(Z, Y, V);
17981
- }) : Q = T.indexOf("!") === -1 ? b(T, Y, V) : T : (Q = b(T, Y, V), H = v(Q), W = H[0], Q = H[1], O = !0, E = o.nameToUrl(Q))), G = W && !U && !O ? "_unnormalized" + (f += 1) : "", {
17980
+ }) : Q = T.indexOf("!") === -1 ? b(T, Y, V) : T : (Q = b(T, Y, V), H = v(Q), W = H[0], Q = H[1], O = !0, E = o.nameToUrl(Q))), U = W && !G && !O ? "_unnormalized" + (f += 1) : "", {
17982
17981
  prefix: W,
17983
17982
  name: Q,
17984
17983
  parentMap: N,
17985
- unnormalized: !!G,
17984
+ unnormalized: !!U,
17986
17985
  url: E,
17987
17986
  originalName: J,
17988
17987
  isDefine: X,
17989
- id: (W ? W + "!" + Q : Q) + G
17988
+ id: (W ? W + "!" + Q : Q) + U
17990
17989
  };
17991
17990
  }
17992
17991
  function I(T) {
@@ -18000,8 +17999,8 @@ https://requirejs.org/docs/errors.html#` + e);
18000
17999
  function k(T, N) {
18001
18000
  var O = T.requireModules, V = !1;
18002
18001
  N ? N(T) : (each(O, function(E) {
18003
- var U = getOwn(l, E);
18004
- U && (U.error = T, U.events.error && (V = !0, U.emit("error", T)));
18002
+ var G = getOwn(l, E);
18003
+ G && (G.error = T, G.events.error && (V = !0, G.emit("error", T)));
18005
18004
  }), V || req.onError(T));
18006
18005
  }
18007
18006
  function D() {
@@ -18034,27 +18033,27 @@ https://requirejs.org/docs/errors.html#` + e);
18034
18033
  }
18035
18034
  function z(T, N, O) {
18036
18035
  var V = T.map.id;
18037
- T.error ? T.emit("error", T.error) : (N[V] = !0, each(T.depMaps, function(E, U) {
18038
- var G = E.id, H = getOwn(l, G);
18039
- H && !T.depMatched[U] && !O[G] && (getOwn(N, G) ? (T.defineDep(U, p[G]), T.check()) : z(H, N, O));
18036
+ T.error ? T.emit("error", T.error) : (N[V] = !0, each(T.depMaps, function(E, G) {
18037
+ var U = E.id, H = getOwn(l, U);
18038
+ H && !T.depMatched[G] && !O[U] && (getOwn(N, U) ? (T.defineDep(G, p[U]), T.check()) : z(H, N, O));
18040
18039
  }), O[V] = !0);
18041
18040
  }
18042
18041
  function L() {
18043
- var T, N, O = a.waitSeconds * 1e3, V = O && o.startTime + O < (/* @__PURE__ */ new Date()).getTime(), E = [], U = [], G = !1, H = !0;
18042
+ var T, N, O = a.waitSeconds * 1e3, V = O && o.startTime + O < (/* @__PURE__ */ new Date()).getTime(), E = [], G = [], U = !1, H = !0;
18044
18043
  if (!t) {
18045
18044
  if (t = !0, eachProp(c, function(W) {
18046
18045
  var Y = W.map, J = Y.id;
18047
- if (W.enabled && (Y.isDefine || U.push(W), !W.error)) {
18046
+ if (W.enabled && (Y.isDefine || G.push(W), !W.error)) {
18048
18047
  if (!W.inited && V)
18049
- y(J) ? (N = !0, G = !0) : (E.push(J), S(J));
18050
- else if (!W.inited && W.fetched && Y.isDefine && (G = !0, !Y.prefix))
18048
+ y(J) ? (N = !0, U = !0) : (E.push(J), S(J));
18049
+ else if (!W.inited && W.fetched && Y.isDefine && (U = !0, !Y.prefix))
18051
18050
  return H = !1;
18052
18051
  }
18053
18052
  }), V && E.length)
18054
18053
  return T = makeError("timeout", "Load timeout for modules: " + E, null, E), T.contextName = o.contextName, k(T);
18055
- H && each(U, function(W) {
18054
+ H && each(G, function(W) {
18056
18055
  z(W, {}, {});
18057
- }), (!V || N) && G && (isBrowser || isWebWorker) && !i && (i = setTimeout(function() {
18056
+ }), (!V || N) && U && (isBrowser || isWebWorker) && !i && (i = setTimeout(function() {
18058
18057
  i = 0, L();
18059
18058
  }, 50)), t = !1;
18060
18059
  }
@@ -18094,31 +18093,31 @@ https://requirejs.org/docs/errors.html#` + e);
18094
18093
  */
18095
18094
  check: function() {
18096
18095
  if (!(!this.enabled || this.enabling)) {
18097
- var T, N, O = this.map.id, V = this.depExports, E = this.exports, U = this.factory;
18096
+ var T, N, O = this.map.id, V = this.depExports, E = this.exports, G = this.factory;
18098
18097
  if (!this.inited)
18099
18098
  hasProp(o.defQueueMap, O) || this.fetch();
18100
18099
  else if (this.error)
18101
18100
  this.emit("error", this.error);
18102
18101
  else if (!this.defining) {
18103
18102
  if (this.defining = !0, this.depCount < 1 && !this.defined) {
18104
- if (isFunction(U)) {
18103
+ if (isFunction(G)) {
18105
18104
  if (this.events.error && this.map.isDefine || req.onError !== defaultOnError)
18106
18105
  try {
18107
- E = o.execCb(O, U, V, E);
18106
+ E = o.execCb(O, G, V, E);
18108
18107
  } catch (H) {
18109
18108
  T = H;
18110
18109
  }
18111
18110
  else
18112
- E = o.execCb(O, U, V, E);
18111
+ E = o.execCb(O, G, V, E);
18113
18112
  if (this.map.isDefine && E === void 0 && (N = this.module, N ? E = N.exports : this.usingExports && (E = this.exports)), T)
18114
18113
  return T.requireMap = this.map, T.requireModules = this.map.isDefine ? [this.map.id] : null, T.requireType = this.map.isDefine ? "define" : "require", k(this.error = T);
18115
18114
  } else
18116
- E = U;
18115
+ E = G;
18117
18116
  if (this.exports = E, this.map.isDefine && !this.ignore && (p[O] = E, req.onResourceLoad)) {
18118
- var G = [];
18117
+ var U = [];
18119
18118
  each(this.depMaps, function(H) {
18120
- G.push(H.normalizedMap || H);
18121
- }), req.onResourceLoad(o, this.map, G);
18119
+ U.push(H.normalizedMap || H);
18120
+ }), req.onResourceLoad(o, this.map, U);
18122
18121
  }
18123
18122
  M(O), this.defined = !0;
18124
18123
  }
@@ -18129,30 +18128,30 @@ https://requirejs.org/docs/errors.html#` + e);
18129
18128
  callPlugin: function() {
18130
18129
  var T = this.map, N = T.id, O = F(T.prefix);
18131
18130
  this.depMaps.push(O), R(O, "defined", bind(this, function(V) {
18132
- var E, U, G, H = getOwn(h, this.map.id), W = this.map.name, Y = this.map.parentMap ? this.map.parentMap.name : null, J = o.makeRequire(T.parentMap, {
18131
+ var E, G, U, H = getOwn(h, this.map.id), W = this.map.name, Y = this.map.parentMap ? this.map.parentMap.name : null, J = o.makeRequire(T.parentMap, {
18133
18132
  enableBuildCallback: !0
18134
18133
  });
18135
18134
  if (this.map.unnormalized) {
18136
18135
  V.normalize && (W = V.normalize(W, function(X) {
18137
18136
  return b(X, Y, !0);
18138
- }) || ""), U = F(
18137
+ }) || ""), G = F(
18139
18138
  T.prefix + "!" + W,
18140
18139
  this.map.parentMap,
18141
18140
  !0
18142
18141
  ), R(
18143
- U,
18142
+ G,
18144
18143
  "defined",
18145
18144
  bind(this, function(X) {
18146
- this.map.normalizedMap = U, this.init([], function() {
18145
+ this.map.normalizedMap = G, this.init([], function() {
18147
18146
  return X;
18148
18147
  }, null, {
18149
18148
  enabled: !0,
18150
18149
  ignore: !0
18151
18150
  });
18152
18151
  })
18153
- ), G = getOwn(l, U.id), G && (this.depMaps.push(U), this.events.error && G.on("error", bind(this, function(X) {
18152
+ ), U = getOwn(l, G.id), U && (this.depMaps.push(G), this.events.error && U.on("error", bind(this, function(X) {
18154
18153
  this.emit("error", X);
18155
- })), G.enable());
18154
+ })), U.enable());
18156
18155
  return;
18157
18156
  }
18158
18157
  if (H) {
@@ -18199,10 +18198,10 @@ https://requirejs.org/docs/errors.html#` + e);
18199
18198
  this.depExports[N] = E(this);
18200
18199
  return;
18201
18200
  }
18202
- this.depCount += 1, R(T, "defined", bind(this, function(U) {
18203
- this.undefed || (this.defineDep(N, U), this.check());
18204
- })), this.errback ? R(T, "error", bind(this, this.errback)) : this.events.error && R(T, "error", bind(this, function(U) {
18205
- this.emit("error", U);
18201
+ this.depCount += 1, R(T, "defined", bind(this, function(G) {
18202
+ this.undefed || (this.defineDep(N, G), this.check());
18203
+ })), this.errback ? R(T, "error", bind(this, this.errback)) : this.events.error && R(T, "error", bind(this, function(G) {
18204
+ this.emit("error", G);
18206
18205
  }));
18207
18206
  }
18208
18207
  O = T.id, V = l[O], !hasProp(r, O) && V && !V.enabled && o.enable(T, this);
@@ -18262,8 +18261,8 @@ https://requirejs.org/docs/errors.html#` + e);
18262
18261
  configure: function(T) {
18263
18262
  if (T.baseUrl && T.baseUrl.charAt(T.baseUrl.length - 1) !== "/" && (T.baseUrl += "/"), typeof T.urlArgs == "string") {
18264
18263
  var N = T.urlArgs;
18265
- T.urlArgs = function(E, U) {
18266
- return (U.indexOf("?") === -1 ? "?" : "&") + N;
18264
+ T.urlArgs = function(E, G) {
18265
+ return (G.indexOf("?") === -1 ? "?" : "&") + N;
18267
18266
  };
18268
18267
  }
18269
18268
  var O = a.shim, V = {
@@ -18272,21 +18271,21 @@ https://requirejs.org/docs/errors.html#` + e);
18272
18271
  config: !0,
18273
18272
  map: !0
18274
18273
  };
18275
- eachProp(T, function(E, U) {
18276
- V[U] ? (a[U] || (a[U] = {}), mixin(a[U], E, !0, !0)) : a[U] = E;
18277
- }), T.bundles && eachProp(T.bundles, function(E, U) {
18278
- each(E, function(G) {
18279
- G !== U && (h[G] = U);
18274
+ eachProp(T, function(E, G) {
18275
+ V[G] ? (a[G] || (a[G] = {}), mixin(a[G], E, !0, !0)) : a[G] = E;
18276
+ }), T.bundles && eachProp(T.bundles, function(E, G) {
18277
+ each(E, function(U) {
18278
+ U !== G && (h[U] = G);
18280
18279
  });
18281
- }), T.shim && (eachProp(T.shim, function(E, U) {
18280
+ }), T.shim && (eachProp(T.shim, function(E, G) {
18282
18281
  isArray(E) && (E = {
18283
18282
  deps: E
18284
- }), (E.exports || E.init) && !E.exportsFn && (E.exportsFn = o.makeShimExports(E)), O[U] = E;
18283
+ }), (E.exports || E.init) && !E.exportsFn && (E.exportsFn = o.makeShimExports(E)), O[G] = E;
18285
18284
  }), a.shim = O), T.packages && each(T.packages, function(E) {
18286
- var U, G;
18287
- 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, "");
18288
- }), eachProp(l, function(E, U) {
18289
- !E.inited && !E.map.unnormalized && (E.map = F(U, null, !0));
18285
+ var G, U;
18286
+ E = typeof E == "string" ? { name: E } : E, U = E.name, G = E.location, G && (a.paths[U] = E.location), a.pkgs[U] = E.name + "/" + (E.main || "main").replace(currDirRegExp, "").replace(jsSuffixRegExp, "");
18287
+ }), eachProp(l, function(E, G) {
18288
+ !E.inited && !E.map.unnormalized && (E.map = F(G, null, !0));
18290
18289
  }), (T.deps || T.callback) && o.require(T.deps || [], T.callback);
18291
18290
  },
18292
18291
  makeShimExports: function(T) {
@@ -18298,10 +18297,10 @@ https://requirejs.org/docs/errors.html#` + e);
18298
18297
  },
18299
18298
  makeRequire: function(T, N) {
18300
18299
  N = N || {};
18301
- function O(V, E, U) {
18302
- var G, H, W;
18303
- return N.enableBuildCallback && E && isFunction(E) && (E.__requireJsBuild = !0), typeof V == "string" ? isFunction(E) ? k(makeError("requireargs", "Invalid require call"), U) : T && hasProp(r, V) ? r[V](l[T.id]) : req.get ? req.get(o, V, T, O) : (H = F(V, T, !1, !0), G = H.id, hasProp(p, G) ? p[G] : k(makeError("notloaded", 'Module name "' + G + '" has not been loaded yet for context: ' + e + (T ? "" : ". Use require([])")))) : (j(), o.nextTick(function() {
18304
- j(), W = I(F(null, T)), W.skipMap = N.skipMap, W.init(V, E, U, {
18300
+ function O(V, E, G) {
18301
+ var U, H, W;
18302
+ return N.enableBuildCallback && E && isFunction(E) && (E.__requireJsBuild = !0), typeof V == "string" ? isFunction(E) ? k(makeError("requireargs", "Invalid require call"), G) : T && hasProp(r, V) ? r[V](l[T.id]) : req.get ? req.get(o, V, T, O) : (H = F(V, T, !1, !0), U = H.id, hasProp(p, U) ? p[U] : k(makeError("notloaded", 'Module name "' + U + '" has not been loaded yet for context: ' + e + (T ? "" : ". Use require([])")))) : (j(), o.nextTick(function() {
18303
+ j(), W = I(F(null, T)), W.skipMap = N.skipMap, W.init(V, E, G, {
18305
18304
  enabled: !0
18306
18305
  }), L();
18307
18306
  }), O);
@@ -18314,8 +18313,8 @@ https://requirejs.org/docs/errors.html#` + e);
18314
18313
  * plain URLs like nameToUrl.
18315
18314
  */
18316
18315
  toUrl: function(V) {
18317
- var E, U = V.lastIndexOf("."), G = V.split("/")[0], H = G === "." || G === "..";
18318
- return U !== -1 && (!H || U > 1) && (E = V.substring(U, V.length), V = V.substring(0, U)), o.nameToUrl(b(
18316
+ var E, G = V.lastIndexOf("."), U = V.split("/")[0], H = U === "." || U === "..";
18317
+ return G !== -1 && (!H || G > 1) && (E = V.substring(G, V.length), V = V.substring(0, G)), o.nameToUrl(b(
18319
18318
  V,
18320
18319
  T && T.id,
18321
18320
  !0
@@ -18329,10 +18328,10 @@ https://requirejs.org/docs/errors.html#` + e);
18329
18328
  }
18330
18329
  }), T || (O.undef = function(V) {
18331
18330
  D();
18332
- var E = F(V, T, !0), U = getOwn(l, V);
18333
- U.undefed = !0, S(V), delete p[V], delete m[E.url], delete u[V], eachReverse(d, function(G, H) {
18334
- G[0] === V && d.splice(H, 1);
18335
- }), delete o.defQueueMap[V], U && (U.events.defined && (u[V] = U.events), M(V));
18331
+ var E = F(V, T, !0), G = getOwn(l, V);
18332
+ G.undefed = !0, S(V), delete p[V], delete m[E.url], delete u[V], eachReverse(d, function(U, H) {
18333
+ U[0] === V && d.splice(H, 1);
18334
+ }), delete o.defQueueMap[V], G && (G.events.defined && (u[V] = G.events), M(V));
18336
18335
  }), O;
18337
18336
  },
18338
18337
  /**
@@ -18352,7 +18351,7 @@ https://requirejs.org/docs/errors.html#` + e);
18352
18351
  * @param {String} moduleName the name of the module to potentially complete.
18353
18352
  */
18354
18353
  completeLoad: function(T) {
18355
- var N, O, V, E = getOwn(a.shim, T) || {}, U = E.exports;
18354
+ var N, O, V, E = getOwn(a.shim, T) || {}, G = E.exports;
18356
18355
  for (D(); d.length; ) {
18357
18356
  if (O = d.shift(), O[0] === null) {
18358
18357
  if (O[0] = T, N)
@@ -18363,7 +18362,7 @@ https://requirejs.org/docs/errors.html#` + e);
18363
18362
  $(O);
18364
18363
  }
18365
18364
  if (o.defQueueMap = {}, V = getOwn(l, T), !N && !hasProp(p, T) && V && !V.inited) {
18366
- if (a.enforceDefine && (!U || !getGlobal(U)))
18365
+ if (a.enforceDefine && (!G || !getGlobal(G)))
18367
18366
  return y(T) ? void 0 : k(makeError(
18368
18367
  "nodefine",
18369
18368
  "No define call for " + T,
@@ -18382,15 +18381,15 @@ https://requirejs.org/docs/errors.html#` + e);
18382
18381
  * internal API, not a public one. Use toUrl for the public API.
18383
18382
  */
18384
18383
  nameToUrl: function(T, N, O) {
18385
- var V, E, U, G, H, W, Y, J = getOwn(a.pkgs, T);
18384
+ var V, E, G, U, H, W, Y, J = getOwn(a.pkgs, T);
18386
18385
  if (J && (T = J), Y = getOwn(h, T), Y)
18387
18386
  return o.nameToUrl(Y, N, O);
18388
18387
  if (req.jsExtRegExp.test(T))
18389
18388
  H = T + (N || "");
18390
18389
  else {
18391
- for (V = a.paths, E = T.split("/"), U = E.length; U > 0; U -= 1)
18392
- if (G = E.slice(0, U).join("/"), W = getOwn(V, G), W) {
18393
- isArray(W) && (W = W[0]), E.splice(0, U, W);
18390
+ for (V = a.paths, E = T.split("/"), G = E.length; G > 0; G -= 1)
18391
+ if (U = E.slice(0, G).join("/"), W = getOwn(V, U), W) {
18392
+ isArray(W) && (W = W[0]), E.splice(0, G, W);
18394
18393
  break;
18395
18394
  }
18396
18395
  H = E.join("/"), H += N || (/^data\:|^blob\:|\?/.test(H) || O ? "" : ".js"), H = (H.charAt(0) === "/" || H.match(/^[\w\+\.\-]+:/) ? "" : a.baseUrl) + H;
@@ -18433,8 +18432,8 @@ https://requirejs.org/docs/errors.html#` + e);
18433
18432
  if (!y(N.id)) {
18434
18433
  var O = [];
18435
18434
  return eachProp(l, function(V, E) {
18436
- E.indexOf("_@r") !== 0 && each(V.depMaps, function(U) {
18437
- if (U.id === N.id)
18435
+ E.indexOf("_@r") !== 0 && each(V.depMaps, function(G) {
18436
+ if (G.id === N.id)
18438
18437
  return O.push(E), !0;
18439
18438
  });
18440
18439
  }), k(makeError("scripterror", 'Script error for "' + N.id + (O.length ? '", needed by: ' + O.join(", ") : '"'), T, [N.id]));
@@ -19056,8 +19055,8 @@ const useCollectionManager_deprecated = (e) => {
19056
19055
  collectionNames: O = [w],
19057
19056
  maxDepth: V = 1,
19058
19057
  allowAllTypes: E = !1,
19059
- exceptInterfaces: U = [],
19060
- prefixFieldValue: G = "",
19058
+ exceptInterfaces: G = [],
19059
+ prefixFieldValue: U = "",
19061
19060
  usePrefix: H = !1,
19062
19061
  dataSource: W
19063
19062
  } = j || {};
@@ -19067,18 +19066,18 @@ const useCollectionManager_deprecated = (e) => {
19067
19066
  return _.cloneDeep(N[w]);
19068
19067
  typeof B == "string" && (B = [B]);
19069
19068
  const Y = b(w, W), J = (X = Y == null ? void 0 : Y.filter(
19070
- (Q) => Q.interface && !U.includes(Q.interface) && (E || B.includes(Q.type) || (T && Q.target && Q.target !== w && Array.isArray(T) ? T.includes(Q.interface) : !1))
19069
+ (Q) => Q.interface && !G.includes(Q.interface) && (E || B.includes(Q.type) || (T && Q.target && Q.target !== w && Array.isArray(T) ? T.includes(Q.interface) : !1))
19071
19070
  )) == null ? void 0 : X.map((Q) => {
19072
19071
  var oe, te;
19073
19072
  const Z = x({
19074
- value: H && G ? `${G}.${Q.name}` : Q.name,
19073
+ value: H && U ? `${U}.${Q.name}` : Q.name,
19075
19074
  label: f((oe = Q == null ? void 0 : Q.uiSchema) == null ? void 0 : oe.title) || Q.name
19076
19075
  }, Q);
19077
19076
  return T && Q.target && (Z.children = O.includes(Q.target) ? [] : I(Q.target, B, P(x({}, j), {
19078
19077
  cached: N,
19079
19078
  dataSource: W,
19080
19079
  collectionNames: [...O, Q.target],
19081
- prefixFieldValue: H ? G ? `${G}.${Q.name}` : Q.name : "",
19080
+ prefixFieldValue: H ? U ? `${U}.${Q.name}` : Q.name : "",
19082
19081
  usePrefix: H
19083
19082
  })), !((te = Z.children) != null && te.length)) ? null : Z;
19084
19083
  }).filter(Boolean);
@@ -19228,7 +19227,7 @@ function FormDialog(e, t, n, o) {
19228
19227
  open: (p) => q(this, null, function* () {
19229
19228
  return r.promise || (r.promise = new Promise((m, h) => q(this, null, function* () {
19230
19229
  try {
19231
- p = yield loading$1(l.loadingText, () => applyMiddleware(p, r.openMiddlewares)), r.form = r.form || createForm(p);
19230
+ p = yield loading(l.loadingText, () => applyMiddleware(p, r.openMiddlewares)), r.form = r.form || createForm(p);
19232
19231
  } catch (g) {
19233
19232
  h(g);
19234
19233
  }
@@ -19246,7 +19245,7 @@ function FormDialog(e, t, n, o) {
19246
19245
  });
19247
19246
  },
19248
19247
  () => q(this, null, function* () {
19249
- yield loading$1(l.loadingText, () => applyMiddleware(r.form, r.cancelMiddlewares)), d.close();
19248
+ yield loading(l.loadingText, () => applyMiddleware(r.form, r.cancelMiddlewares)), d.close();
19250
19249
  })
19251
19250
  )
19252
19251
  );
@@ -19325,47 +19324,50 @@ const useAPITokenVariable = ({
19325
19324
  },
19326
19325
  [e, t]
19327
19326
  );
19328
- }, filterProperties = (e) => e["x-component"] === "Action.Container";
19327
+ }, filterProperties = (e) => e["x-component"] === "Action.Container", FieldLink = (e) => {
19328
+ const d = e, { WrappedComponent: t } = d, n = K(d, ["WrappedComponent"]), o = useFieldSchema(), { openPopup: r } = usePopupUtils(), i = useRef(!1), a = useInsertSchema(), l = useRef(o);
19329
+ l.current = o;
19330
+ const c = useCallback(() => l.current, []), u = useCallback(() => {
19331
+ o.properties || (a(popupSchema), i.current = !0), i.current ? (setTimeout(() => {
19332
+ r({ customActionSchema: c() });
19333
+ }), i.current = !1) : o.properties && r();
19334
+ }, [o, a, r, c]);
19335
+ return /* @__PURE__ */ jsx("a", { onClick: u, children: /* @__PURE__ */ jsx(t, x({}, n)) });
19336
+ };
19329
19337
  function withPopupWrapper(e) {
19330
19338
  return (t) => {
19331
- const [n, o] = useState(!1), [r, i] = useState(!1), a = useInsertSchema(), l = useCollection(), c = useActionContext(), u = useField(), d = useFieldSchema(), { enableLink: p, openMode: m, openSize: h } = (d == null ? void 0 : d["x-component-props"]) || {}, { visibleWithURL: g, setVisibleWithURL: f } = usePopupUtils(), { openPopup: C } = usePopupUtils(), b = useRef(!1), S = useRef(d);
19332
- S.current = d;
19333
- const y = useCallback(() => S.current, []), v = useCallback(() => {
19334
- d.properties || (a(popupSchema), b.current = !0), b.current ? (setTimeout(() => {
19335
- C({
19336
- customActionSchema: y()
19337
- });
19338
- }), b.current = !1) : d.properties && C();
19339
- }, [d, a, C, y]), { setSubmitted: F } = c, I = useCallback(
19340
- (R) => {
19341
- o == null || o(R), f == null || f(R);
19342
- },
19343
- [f]
19344
- );
19345
- return p ? /* @__PURE__ */ jsx(PopupVisibleProvider, { visible: !1, children: /* @__PURE__ */ jsxs(
19339
+ const [n, o] = useState(!1), [r, i] = useState(!1), a = useCollection(), l = useActionContext(), c = useField(), u = useFieldSchema(), { enableLink: d, openMode: p, openSize: m } = (u == null ? void 0 : u["x-component-props"]) || {}, { visibleWithURL: h, setVisibleWithURL: g } = usePopupUtils(), f = useCallback(
19340
+ (S) => {
19341
+ o == null || o(S), g == null || g(S);
19342
+ },
19343
+ [g]
19344
+ ), C = useRef(u);
19345
+ C.current = u;
19346
+ const { setSubmitted: b } = l;
19347
+ return d ? /* @__PURE__ */ jsx(PopupVisibleProvider, { visible: !1, children: /* @__PURE__ */ jsxs(
19346
19348
  ActionContextProvider,
19347
19349
  {
19348
19350
  button: /* @__PURE__ */ jsx(e, x({}, t)),
19349
- visible: n || g,
19350
- setVisible: I,
19351
+ visible: n || h,
19352
+ setVisible: f,
19351
19353
  formValueChanged: r,
19352
19354
  setFormValueChanged: i,
19353
- openMode: m,
19354
- openSize: h,
19355
+ openMode: p,
19356
+ openSize: m,
19355
19357
  containerRefKey: "field-popup",
19356
- fieldSchema: d,
19357
- setSubmitted: F,
19358
+ fieldSchema: u,
19359
+ setSubmitted: b,
19358
19360
  children: [
19359
- /* @__PURE__ */ jsx(CollectionProvider, { name: l.name, children: /* @__PURE__ */ jsx(SchemaComponentOptions, { children: /* @__PURE__ */ jsx(VariablePopupRecordProvider, { children: /* @__PURE__ */ jsx(
19361
+ /* @__PURE__ */ jsx(CollectionProvider, { name: a.name, children: /* @__PURE__ */ jsx(SchemaComponentOptions, { children: /* @__PURE__ */ jsx(VariablePopupRecordProvider, { children: /* @__PURE__ */ jsx(
19360
19362
  NocoBaseRecursionField,
19361
19363
  {
19362
19364
  onlyRenderProperties: !0,
19363
- basePath: u == null ? void 0 : u.address,
19364
- schema: d,
19365
+ basePath: c == null ? void 0 : c.address,
19366
+ schema: u,
19365
19367
  filterProperties
19366
19368
  }
19367
19369
  ) }) }) }),
19368
- /* @__PURE__ */ jsx("a", { onClick: v, children: /* @__PURE__ */ jsx(e, x({}, t)) })
19370
+ /* @__PURE__ */ jsx(FieldLink, P(x({}, t), { WrappedComponent: e }))
19369
19371
  ]
19370
19372
  }
19371
19373
  ) }) : /* @__PURE__ */ jsx(e, x({}, t));
@@ -22466,9 +22468,9 @@ const SchemaSettingsModalItem = (e) => {
22466
22468
  title: n
22467
22469
  }, m), {
22468
22470
  onClick: () => q(void 0, null, function* () {
22469
- const E = l ? yield l() : c, U = _.isFunction(e.schema) ? e.schema() : e.schema;
22471
+ const E = l ? yield l() : c, G = _.isFunction(e.schema) ? e.schema() : e.schema;
22470
22472
  FormDialog(
22471
- { title: U.title || n, width: u },
22473
+ { title: G.title || n, width: u },
22472
22474
  () => /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(CollectOperators, { defaultOperators: L(), children: /* @__PURE__ */ jsx(VariablesContext.Provider, { value: w, children: /* @__PURE__ */ jsx(BlockContext.Provider, { value: z, children: /* @__PURE__ */ jsx(
22473
22475
  VariablePopupRecordProvider,
22474
22476
  {
@@ -22509,7 +22511,7 @@ const SchemaSettingsModalItem = (e) => {
22509
22511
  {
22510
22512
  components: o,
22511
22513
  scope: r,
22512
- schema: U
22514
+ schema: G
22513
22515
  }
22514
22516
  ) }) }) })
22515
22517
  }
@@ -22524,8 +22526,8 @@ const SchemaSettingsModalItem = (e) => {
22524
22526
  ).open({
22525
22527
  initialValues: E,
22526
22528
  effects: i
22527
- }).then((G) => (a(G), G)).catch((G) => {
22528
- console.error(G);
22529
+ }).then((U) => (a(U), U)).catch((U) => {
22530
+ console.error(U);
22529
22531
  });
22530
22532
  }),
22531
22533
  children: e.children || e.title
@@ -23372,8 +23374,8 @@ const getActionContext = (e) => {
23372
23374
  ));
23373
23375
  const D = (R == null ? void 0 : R.interface) === "m2o" && findParentFieldSchema(o), M = D && p(D == null ? void 0 : D["x-collection-field"]), z = useTableBlockContext(), L = (R == null ? void 0 : R.interface) === "m2m" || (R == null ? void 0 : R.interface) === "mbm" || (M == null ? void 0 : M.type) === "hasMany" && (R == null ? void 0 : R.interface) === "m2o", $ = useCallback(
23374
23376
  (V) => {
23375
- const E = V.find((G) => G.value === "$nForm"), U = m(I);
23376
- return !(U != null && U.length) && E && (E.children = formatVariableScop(y())), V;
23377
+ const E = V.find((U) => U.value === "$nForm"), G = m(I);
23378
+ return !(G != null && G.length) && E && (E.children = formatVariableScop(y())), V;
23377
23379
  },
23378
23380
  [y, I]
23379
23381
  ), w = useMemo(() => ({
@@ -23409,26 +23411,26 @@ const getActionContext = (e) => {
23409
23411
  getAllCollectionsInheritChain: h
23410
23412
  }),
23411
23413
  renderSchemaComponent: function(E) {
23412
- const U = useMemo(() => _.cloneDeep(k) || {}, []);
23413
- U["x-read-pretty"] = !1, U["x-disabled"] = !1, _.set(U, "x-decorator-props.showTitle", !1);
23414
- const G = getFieldDefaultValue(U, R);
23415
- R.target && U["x-component-props"] && (U["x-component-props"].mode = "Select"), R != null && R.uiSchema.type && (U.type = R.uiSchema.type), (R == null ? void 0 : R.uiSchema["x-component"]) === "Checkbox" && (_.set(U, "x-component-props.defaultChecked", G), U.type = "void");
23414
+ const G = useMemo(() => _.cloneDeep(k) || {}, []);
23415
+ G["x-read-pretty"] = !1, G["x-disabled"] = !1, _.set(G, "x-decorator-props.showTitle", !1);
23416
+ const U = getFieldDefaultValue(G, R);
23417
+ R.target && G["x-component-props"] && (G["x-component-props"].mode = "Select"), R != null && R.uiSchema.type && (G.type = R.uiSchema.type), (R == null ? void 0 : R.uiSchema["x-component"]) === "Checkbox" && (_.set(G, "x-component-props.defaultChecked", U), G.type = "void");
23416
23418
  const H = useMemo(
23417
- () => P(x({}, U || {}), {
23419
+ () => P(x({}, G || {}), {
23418
23420
  "x-decorator": "FormItem",
23419
- "x-component-props": P(x({}, U["x-component-props"]), {
23421
+ "x-component-props": P(x({}, G["x-component-props"]), {
23420
23422
  collectionName: R == null ? void 0 : R.collectionName,
23421
23423
  targetField: u,
23422
- defaultValue: isVariable(G) ? "" : G,
23424
+ defaultValue: isVariable(U) ? "" : U,
23423
23425
  style: {
23424
23426
  width: "100%",
23425
23427
  verticalAlign: "top",
23426
23428
  minWidth: "200px"
23427
23429
  }
23428
23430
  }),
23429
- default: isVariable(G) ? "" : G
23431
+ default: isVariable(U) ? "" : U
23430
23432
  }),
23431
- [U, G]
23433
+ [G, U]
23432
23434
  );
23433
23435
  return _.set(H, "x-component-props.onChange", E.onChange), /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(SchemaComponent, { schema: H }) });
23434
23436
  }
@@ -23453,11 +23455,11 @@ const getActionContext = (e) => {
23453
23455
  g
23454
23456
  ]), j = useCallback(
23455
23457
  (V) => {
23456
- var U, G, H;
23458
+ var G, U, H;
23457
23459
  const E = {
23458
23460
  "x-uid": o["x-uid"]
23459
23461
  };
23460
- o.default = (U = V.default) != null ? U : null, isVariable(V.default) || (G = r.setInitialValue) == null || G.call(r, V.default), E.default = (H = V.default) != null ? H : null, i.emit("patch", {
23462
+ o.default = (G = V.default) != null ? G : null, isVariable(V.default) || (U = r.setInitialValue) == null || U.call(r, V.default), E.default = (H = V.default) != null ? H : null, i.emit("patch", {
23461
23463
  schema: E,
23462
23464
  currentSchema: n
23463
23465
  });
@@ -24240,15 +24242,15 @@ const useGetFilterOptions = () => {
24240
24242
  };
24241
24243
  });
24242
24244
  }, TableColumnDesigner$1 = (e) => {
24243
- var z, L, $, w, B, j, T, N, O, V, E, U;
24245
+ var z, L, $, w, B, j, T, N, O, V, E, G;
24244
24246
  const { uiSchema: t, fieldSchema: n, collectionField: o } = e, { form: r } = useFormBlockContext(), { getInterface: i, getCollection: a } = useCollectionManager_deprecated(), l = useField(), { t: c } = useTranslation(), u = useFieldSchema(), { dn: d } = useDesignable(), p = ((z = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : z.fieldNames) || ((L = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : L.fieldNames), m = useLabelFields$1(($ = o == null ? void 0 : o.target) != null ? $ : o == null ? void 0 : o.targetCollection), h = useColorFields((w = o == null ? void 0 : o.target) != null ? w : o == null ? void 0 : o.targetCollection), g = i(o == null ? void 0 : o.interface), f = a(o == null ? void 0 : o.target), C = isFileCollection$2(f), b = ["QuickEdit", "FormItem"].includes(n["x-decorator"]), { currentMode: S } = useAssociationFieldContext(), { isAllowToSetDefaultValue: y } = useIsAllowToSetDefaultValue({ collectionField: o, fieldSchema: n }), v = ["datetime", "createdAt", "updatedAt"].includes(o == null ? void 0 : o.interface), F = ["obo", "oho", "o2o", "o2m", "m2m", "m2o", "snapshot"].includes(
24245
24247
  o == null ? void 0 : o.interface
24246
24248
  ), I = useFieldModeOptions({ fieldSchema: n }), R = ((B = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : B.mode) || "Select";
24247
24249
  let k = "editable";
24248
24250
  n["x-disabled"] === !0 && (k = "readonly"), n["x-read-pretty"] === !0 && (k = "read-pretty");
24249
24251
  const D = F && R === "Select", M = () => {
24250
- const { name: G } = useCollection(), { linkageRulesProps: H } = useSchemaToolbar();
24251
- return /* @__PURE__ */ jsx(SchemaSettingsLinkageRules, x({ category: "style" }, P(x({}, H), { collectionName: G })));
24252
+ const { name: U } = useCollection(), { linkageRulesProps: H } = useSchemaToolbar();
24253
+ return /* @__PURE__ */ jsx(SchemaSettingsLinkageRules, x({ category: "style" }, P(x({}, H), { collectionName: U })));
24252
24254
  };
24253
24255
  return /* @__PURE__ */ jsxs(GeneralSchemaDesigner, { disableInitializer: !0, children: [
24254
24256
  /* @__PURE__ */ jsx(
@@ -24269,8 +24271,8 @@ const useGetFilterOptions = () => {
24269
24271
  }
24270
24272
  }
24271
24273
  },
24272
- onSubmit: ({ title: G }) => {
24273
- G && (l.title = G, u.title = G, d.emit("patch", {
24274
+ onSubmit: ({ title: U }) => {
24275
+ U && (l.title = U, u.title = U, d.emit("patch", {
24274
24276
  schema: {
24275
24277
  "x-uid": u["x-uid"],
24276
24278
  title: u.title
@@ -24285,12 +24287,12 @@ const useGetFilterOptions = () => {
24285
24287
  collectionName: o == null ? void 0 : o.target,
24286
24288
  defaultFilter: ((O = (N = (T = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : T.service) == null ? void 0 : N.params) == null ? void 0 : O.filter) || {},
24287
24289
  form: r,
24288
- onSubmit: ({ filter: G }) => {
24290
+ onSubmit: ({ filter: U }) => {
24289
24291
  var W, Y;
24290
- G = removeNullCondition(G), set(l.componentProps, "service.params.filter", G), n["x-component-props"] = l.componentProps;
24292
+ U = removeNullCondition(U), set(l.componentProps, "service.params.filter", U), n["x-component-props"] = l.componentProps;
24291
24293
  const H = (Y = l.path) == null ? void 0 : Y.splice(((W = l.path) == null ? void 0 : W.length) - 1, 1);
24292
24294
  l.form.query(`${H.concat("*." + n.name)}`).forEach((J) => {
24293
- J.componentProps.service = J.componentProps.service || { params: {} }, J.componentProps.service.params.filter = G;
24295
+ J.componentProps.service = J.componentProps.service || { params: {} }, J.componentProps.service.params.filter = U;
24294
24296
  }), d.emit("patch", {
24295
24297
  schema: {
24296
24298
  "x-uid": n["x-uid"],
@@ -24316,13 +24318,13 @@ const useGetFilterOptions = () => {
24316
24318
  }
24317
24319
  }
24318
24320
  },
24319
- onSubmit: ({ width: G }) => {
24321
+ onSubmit: ({ width: U }) => {
24320
24322
  const H = u["x-component-props"] || {};
24321
- H.width = G;
24323
+ H.width = U;
24322
24324
  const W = {
24323
24325
  "x-uid": u["x-uid"]
24324
24326
  };
24325
- W["x-component-props"] = H, u["x-component-props"] = H, l.componentProps.width = G, d.emit("patch", {
24327
+ W["x-component-props"] = H, u["x-component-props"] = H, l.componentProps.width = U, d.emit("patch", {
24326
24328
  schema: W
24327
24329
  }), d.refresh();
24328
24330
  }
@@ -24334,13 +24336,13 @@ const useGetFilterOptions = () => {
24334
24336
  {
24335
24337
  title: c("Sortable"),
24336
24338
  checked: l.componentProps.sorter,
24337
- onChange: (G) => {
24339
+ onChange: (U) => {
24338
24340
  const H = {
24339
24341
  "x-uid": u["x-uid"]
24340
24342
  };
24341
24343
  u["x-component-props"] = P(x({}, u["x-component-props"]), {
24342
- sorter: G
24343
- }), H["x-component-props"] = u["x-component-props"], l.componentProps.sorter = G, d.emit("patch", {
24344
+ sorter: U
24345
+ }), H["x-component-props"] = u["x-component-props"], l.componentProps.sorter = U, d.emit("patch", {
24344
24346
  schema: H
24345
24347
  }), d.refresh();
24346
24348
  }
@@ -24353,11 +24355,11 @@ const useGetFilterOptions = () => {
24353
24355
  {
24354
24356
  title: c("Enable link"),
24355
24357
  checked: ((E = n["x-component-props"]) == null ? void 0 : E.enableLink) !== !1,
24356
- onChange: (G) => {
24358
+ onChange: (U) => {
24357
24359
  n["x-component-props"] = P(x({}, n == null ? void 0 : n["x-component-props"]), {
24358
- enableLink: G
24360
+ enableLink: U
24359
24361
  }), l.componentProps = P(x({}, n == null ? void 0 : n["x-component-props"]), {
24360
- enableLink: G
24362
+ enableLink: U
24361
24363
  }), d.emit("patch", {
24362
24364
  schema: {
24363
24365
  "x-uid": n["x-uid"],
@@ -24373,10 +24375,10 @@ const useGetFilterOptions = () => {
24373
24375
  title: c("Title field"),
24374
24376
  options: m,
24375
24377
  value: p == null ? void 0 : p.label,
24376
- onChange: (G) => {
24378
+ onChange: (U) => {
24377
24379
  var Y, J, X, Q, Z;
24378
24380
  const H = P(x(x({}, (J = (Y = o == null ? void 0 : o.uiSchema) == null ? void 0 : Y["x-component-props"]) == null ? void 0 : J.fieldNames), (X = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : X.fieldNames), {
24379
- label: G
24381
+ label: U
24380
24382
  });
24381
24383
  _.set(n, "x-component-props.fieldNames", H);
24382
24384
  const W = (Z = l.path) == null ? void 0 : Z.splice(((Q = l.path) == null ? void 0 : Q.length) - 1, 1);
@@ -24401,11 +24403,11 @@ const useGetFilterOptions = () => {
24401
24403
  { label: c("Tag"), value: "Tag" }
24402
24404
  ].filter(Boolean) : I,
24403
24405
  value: R,
24404
- onChange: (G) => {
24406
+ onChange: (U) => {
24405
24407
  const H = {
24406
24408
  "x-uid": n["x-uid"]
24407
24409
  };
24408
- n["x-component-props"] = n["x-component-props"] || {}, n["x-component-props"].mode = G, H["x-component-props"] = n["x-component-props"], l.componentProps = l.componentProps || {}, l.componentProps.mode = G, d.emit("patch", {
24410
+ n["x-component-props"] = n["x-component-props"] || {}, n["x-component-props"].mode = U, H["x-component-props"] = n["x-component-props"], l.componentProps = l.componentProps || {}, l.componentProps.mode = U, d.emit("patch", {
24409
24411
  schema: H
24410
24412
  }), d.refresh();
24411
24413
  }
@@ -24417,12 +24419,12 @@ const useGetFilterOptions = () => {
24417
24419
  {
24418
24420
  title: c("Tag color field"),
24419
24421
  options: h,
24420
- value: (U = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : U.tagColorField,
24421
- onChange: (G) => {
24422
+ value: (G = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : G.tagColorField,
24423
+ onChange: (U) => {
24422
24424
  const H = {
24423
24425
  "x-uid": n["x-uid"]
24424
24426
  };
24425
- n["x-component-props"] = n["x-component-props"] || {}, n["x-component-props"].tagColorField = G, H["x-component-props"] = n["x-component-props"], l.componentProps.tagColorField = G, d.emit("patch", {
24427
+ n["x-component-props"] = n["x-component-props"] || {}, n["x-component-props"].tagColorField = U, H["x-component-props"] = n["x-component-props"], l.componentProps.tagColorField = U, d.emit("patch", {
24426
24428
  schema: H
24427
24429
  }), d.refresh();
24428
24430
  }
@@ -24434,15 +24436,15 @@ const useGetFilterOptions = () => {
24434
24436
  {
24435
24437
  title: c("Required"),
24436
24438
  checked: n.required,
24437
- onChange: (G) => {
24439
+ onChange: (U) => {
24438
24440
  var Y, J;
24439
24441
  const H = {
24440
24442
  "x-uid": n["x-uid"]
24441
24443
  };
24442
- n.required = G, H.required = G;
24444
+ n.required = U, H.required = U;
24443
24445
  const W = (J = l.path) == null ? void 0 : J.splice(((Y = l.path) == null ? void 0 : Y.length) - 1, 1);
24444
24446
  l.form.query(`${W.concat("*." + n.name)}`).forEach((X) => {
24445
- X.required = G;
24447
+ X.required = U;
24446
24448
  }), d.emit("patch", {
24447
24449
  schema: H
24448
24450
  }), d.refresh();
@@ -24460,12 +24462,12 @@ const useGetFilterOptions = () => {
24460
24462
  { label: c("Easy-reading"), value: "read-pretty" }
24461
24463
  ],
24462
24464
  value: k,
24463
- onChange: (G) => {
24465
+ onChange: (U) => {
24464
24466
  var Y, J;
24465
24467
  const H = {
24466
24468
  "x-uid": n["x-uid"]
24467
24469
  }, W = (J = l.path) == null ? void 0 : J.splice(((Y = l.path) == null ? void 0 : Y.length) - 1, 1);
24468
- switch (G) {
24470
+ switch (U) {
24469
24471
  case "readonly": {
24470
24472
  n["x-read-pretty"] = !1, n["x-disabled"] = !0, H["x-read-pretty"] = !1, H["x-disabled"] = !0, l.form.query(`${W.concat("*." + n.name)}`).forEach((X) => {
24471
24473
  X.readonly = !0, X.disabled = !0;
@@ -24497,11 +24499,11 @@ const useGetFilterOptions = () => {
24497
24499
  SchemaSettingsSortingRule,
24498
24500
  {
24499
24501
  fieldSchema: n,
24500
- onSubmitCallBack: (G) => {
24502
+ onSubmitCallBack: (U) => {
24501
24503
  var W, Y;
24502
24504
  const H = (Y = l.path) == null ? void 0 : Y.splice(((W = l.path) == null ? void 0 : W.length) - 1, 1);
24503
24505
  l.form.query(`${H.concat("*." + n.name)}`).forEach((J) => {
24504
- J.componentProps.service = J.componentProps.service || { params: {} }, J.componentProps.service.params.sort = G;
24506
+ J.componentProps.service = J.componentProps.service || { params: {} }, J.componentProps.service.params.sort = U;
24505
24507
  });
24506
24508
  }
24507
24509
  }
@@ -25549,7 +25551,7 @@ const useCreateActionProps = () => {
25549
25551
  return {
25550
25552
  onClick() {
25551
25553
  return q(this, null, function* () {
25552
- var N, O, V, E, U, G;
25554
+ var N, O, V, E, G, U;
25553
25555
  const R = u.map((H) => H.name), {
25554
25556
  assignedValues: k = {},
25555
25557
  onSuccess: D,
@@ -25586,7 +25588,7 @@ const useCreateActionProps = () => {
25586
25588
  // TODO(refactor): should change to inject by plugin
25587
25589
  triggerWorkflows: L != null && L.length ? L.map((W) => [W.workflowKey, W.context].filter(Boolean).join("!")).join(",") : void 0
25588
25590
  });
25589
- if (c.data.loading = !1, c.data.data = H, (G = (U = o == null ? void 0 : o.service) == null ? void 0 : U.refresh) == null || G.call(U), r == null || r(!1), a == null || a(!0), !w)
25591
+ if (c.data.loading = !1, c.data.data = H, (U = (G = o == null ? void 0 : o.service) == null ? void 0 : G.refresh) == null || U.call(G), r == null || r(!1), a == null || a(!0), !w)
25590
25592
  return;
25591
25593
  message.success(h(w));
25592
25594
  } catch (H) {
@@ -25737,10 +25739,10 @@ const useCreateActionProps = () => {
25737
25739
  } = (N = i == null ? void 0 : i["x-action-settings"]) != null ? N : {}, { manualClose: z, redirecting: L, redirectTo: $, successMessage: w, actionAfterSuccess: B } = D || {};
25738
25740
  m.data = e.data || {}, m.data.loading = !0;
25739
25741
  const j = {}, T = Object.keys(k).map((V) => q(this, null, function* () {
25740
- const E = k[V], U = C(V);
25742
+ const E = k[V], G = C(V);
25741
25743
  if (isVariable(E)) {
25742
- const { value: G } = (yield g == null ? void 0 : g.parseVariable(E, b)) || {};
25743
- G && (j[V] = transformVariableValue(G, { targetCollectionField: U }));
25744
+ const { value: U } = (yield g == null ? void 0 : g.parseVariable(E, b)) || {};
25745
+ U && (j[V] = transformVariableValue(U, { targetCollectionField: G }));
25744
25746
  } else
25745
25747
  E != null && E !== "" && (j[V] = E);
25746
25748
  }));
@@ -25749,8 +25751,8 @@ const useCreateActionProps = () => {
25749
25751
  content: p(M === "selected" ? "Update selected data?" : "Update all data?"),
25750
25752
  onOk() {
25751
25753
  return q(this, null, function* () {
25752
- var U, G, H, W;
25753
- const { filter: V } = (G = (U = o.params) == null ? void 0 : U[0]) != null ? G : {}, E = {
25754
+ var G, U, H, W;
25755
+ const { filter: V } = (U = (G = o.params) == null ? void 0 : G[0]) != null ? U : {}, E = {
25754
25756
  values: x({}, j),
25755
25757
  filter: V,
25756
25758
  forceUpdate: !1
@@ -25792,7 +25794,7 @@ const useCreateActionProps = () => {
25792
25794
  return {
25793
25795
  onClick() {
25794
25796
  return q(this, null, function* () {
25795
- var V, E, U, G;
25797
+ var V, E, G, U;
25796
25798
  const { skipValidator: I, onSuccess: R, requestSettings: k } = (V = o == null ? void 0 : o["x-action-settings"]) != null ? V : {}, { manualClose: D, redirecting: M, redirectTo: z, successMessage: L, actionAfterSuccess: $ } = R || {}, w = o == null ? void 0 : o["x-action"];
25797
25799
  if (!k.url)
25798
25800
  return;
@@ -25819,7 +25821,7 @@ const useCreateActionProps = () => {
25819
25821
  };
25820
25822
  f.data = c.data || {}, f.data.loading = !0;
25821
25823
  try {
25822
- 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), w === "customize:form:request" && ($ === "previous" || !$ && M !== !0) && (b == null || b(!1)), L || (message.success(C("Saved successfully")), yield resetFormCorrectly(i), (M && !$ || $ === "redirect") && z && (isURL(z) ? window.location.href = z : t(z))), D ? S.success({
25824
+ yield e.request(x({}, O)), f.data.loading = !1, u instanceof TableFieldResource || (G = (E = d == null ? void 0 : d.service) == null ? void 0 : E.refresh) == null || G.call(E), (U = p == null ? void 0 : p.refresh) == null || U.call(p), w === "customize:form:request" && ($ === "previous" || !$ && M !== !0) && (b == null || b(!1)), L || (message.success(C("Saved successfully")), yield resetFormCorrectly(i), (M && !$ || $ === "redirect") && z && (isURL(z) ? window.location.href = z : t(z))), D ? S.success({
25823
25825
  title: r(L),
25824
25826
  onOk: () => q(this, null, function* () {
25825
25827
  (M && !$ || $ === "redirect") && z && (isURL(z) ? window.location.href = z : t(z));
@@ -25843,16 +25845,16 @@ const useCreateActionProps = () => {
25843
25845
  overwriteValues: D,
25844
25846
  skipValidator: M,
25845
25847
  triggerWorkflows: z
25846
- } = (E = l == null ? void 0 : l["x-action-settings"]) != null ? E : {}, { manualClose: L, redirecting: $, redirectTo: w, successMessage: B, actionAfterSuccess: j } = k || {}, T = {}, N = Object.keys(R).map((U) => q(this, null, function* () {
25847
- const G = R[U], H = d(U);
25848
- if (isVariable(G)) {
25849
- const { value: W } = (yield b == null ? void 0 : b.parseVariable(G, S)) || {};
25850
- W && (T[U] = transformVariableValue(W, { targetCollectionField: H }));
25848
+ } = (E = l == null ? void 0 : l["x-action-settings"]) != null ? E : {}, { manualClose: L, redirecting: $, redirectTo: w, successMessage: B, actionAfterSuccess: j } = k || {}, T = {}, N = Object.keys(R).map((G) => q(this, null, function* () {
25849
+ const U = R[G], H = d(G);
25850
+ if (isVariable(U)) {
25851
+ const { value: W } = (yield b == null ? void 0 : b.parseVariable(U, S)) || {};
25852
+ W && (T[G] = transformVariableValue(W, { targetCollectionField: H }));
25851
25853
  } else
25852
- G != null && G !== "" && (T[U] = G);
25854
+ U != null && U !== "" && (T[G] = U);
25853
25855
  }));
25854
25856
  yield Promise.all(N), M || (yield e.submit());
25855
- const O = u.map((U) => U.name), V = getFormValues({
25857
+ const O = u.map((G) => G.name), V = getFormValues({
25856
25858
  filterByTk: t,
25857
25859
  field: n,
25858
25860
  form: e,
@@ -25869,7 +25871,7 @@ const useCreateActionProps = () => {
25869
25871
  }, C), {
25870
25872
  updateAssociationValues: g,
25871
25873
  // TODO(refactor): should change to inject by plugin
25872
- triggerWorkflows: z != null && z.length ? z.map((U) => [U.workflowKey, U.context].filter(Boolean).join("!")).join(",") : void 0
25874
+ triggerWorkflows: z != null && z.length ? z.map((G) => [G.workflowKey, G.context].filter(Boolean).join("!")).join(",") : void 0
25873
25875
  })), h.data.loading = !1, I && (I == null || I()), (j === "previous" || !j && $ !== !0) && (i == null || i(!1)), a == null || a(!1), !B)
25874
25876
  return;
25875
25877
  L ? f.success({
@@ -25878,7 +25880,7 @@ const useCreateActionProps = () => {
25878
25880
  yield e.reset(), ($ && !j || j === "redirect") && w && (isURL(w) ? window.location.href = w : c(w));
25879
25881
  })
25880
25882
  }) : (message.success(m(B)), ($ && !j || j === "redirect" || j === "redirect") && w && (isURL(w) ? window.location.href = w : c(w)));
25881
- } catch (U) {
25883
+ } catch (G) {
25882
25884
  h.data.loading = !1;
25883
25885
  }
25884
25886
  });
@@ -26100,10 +26102,10 @@ const useCreateActionProps = () => {
26100
26102
  (w) => {
26101
26103
  const { targets: B, uid: j } = findFilterTargets(t);
26102
26104
  o().forEach((T) => {
26103
- var G, H, W;
26105
+ var U, H, W;
26104
26106
  if (!B.find((Y) => Y.uid === T.uid))
26105
26107
  return;
26106
- const O = `${j}${t.name}`, V = ((G = T.service.params) == null ? void 0 : G[0]) || {};
26108
+ const O = `${j}${t.name}`, V = ((U = T.service.params) == null ? void 0 : U[0]) || {};
26107
26109
  (W = (H = T.service.params) == null ? void 0 : H[1]) != null && W.filters || _.set(T.service.params, "[1].filters", {});
26108
26110
  const E = T.service.params[1].filters;
26109
26111
  if (w.length)
@@ -26115,11 +26117,11 @@ const useCreateActionProps = () => {
26115
26117
  return T.clearData();
26116
26118
  delete E[O];
26117
26119
  }
26118
- const U = mergeFilter([...Object.values(E), T.defaultFilter]);
26120
+ const G = mergeFilter([...Object.values(E), T.defaultFilter]);
26119
26121
  return T.doFilter(
26120
26122
  P(x({}, V), {
26121
26123
  page: 1,
26122
- filter: U
26124
+ filter: G
26123
26125
  }),
26124
26126
  { filters: E }
26125
26127
  );
@@ -26747,7 +26749,10 @@ const UnitConversion = ({ unitConversionType: e }) => {
26747
26749
  { value: "0.01", label: "1.00" },
26748
26750
  { value: "0.001", label: "1.000" },
26749
26751
  { value: "0.0001", label: "1.0000" },
26750
- { value: "0.00001", label: "1.00000" }
26752
+ { value: "0.00001", label: "1.00000" },
26753
+ { value: "0.000001", label: "1.000000" },
26754
+ { value: "0.0000001", label: "1.0000000" },
26755
+ { value: "0.00000001", label: "1.00000000" }
26751
26756
  ]
26752
26757
  },
26753
26758
  addonBefore: {
@@ -26879,7 +26884,7 @@ const UnitConversion = ({ unitConversionType: e }) => {
26879
26884
  ] });
26880
26885
  }, BlockItemCard = React.forwardRef((o, n) => {
26881
26886
  var r = o, { children: e } = r, t = K(r, ["children"]);
26882
- const { token: i } = useToken$1(), a = useMemo(() => ({ marginBottom: i.marginBlock }), [i.marginBlock]);
26887
+ const { token: i } = useToken$1(), a = useMemo(() => ({ marginBottom: i.marginBlock, height: t.height || "100%" }), [i.marginBlock]);
26883
26888
  return /* @__PURE__ */ jsx(Card, P(x({ ref: n, bordered: !1, style: a }, t), { children: e }));
26884
26889
  });
26885
26890
  BlockItemCard.displayName = "BlockItemCard";
@@ -27268,35 +27273,31 @@ const FilterFormDesigner = () => /* @__PURE__ */ jsx(GeneralSchemaDesigner, { sc
27268
27273
  "title-field"
27269
27274
  ) : null;
27270
27275
  }, isDisplayField = (e) => e.includes("."), useLazyLoadDisplayAssociationFieldsOfForm = () => {
27271
- var S;
27272
- const { name: e } = useCollection_deprecated(), { getCollectionJoinField: t } = useCollectionManager_deprecated(), n = useForm(), o = useCollectionRecordData(), r = useFieldSchema(), i = useVariables$1(), a = useField(), { formValue: l } = useSubFormValue(), { isInSubForm: c, isInSubTable: u } = useFlag() || {}, { getAssociationAppends: d } = useAssociationNames(), p = r.name.toString(), m = useMemo(() => hasPreload(o, p), [o, p]), h = useRef(null), g = useRef(null);
27273
- h.current == null && isDisplayField(p) && (h.current = t(`${e}.${p}`)), g.current == null && isDisplayField(p) && (g.current = t(`${e}.${p.split(".")[0]}`));
27274
- const f = useMemo(() => !isDisplayField(p) || !i || e === "fields" || !h.current || m, [p, i, e, h.current, m]), C = f ? {} : untracked(() => _.cloneDeep(c || u ? l : n.values)), b = isDisplayField(p) && g.current ? _.get(C, `${p.split(".")[0]}.${((S = g.current) == null ? void 0 : S.targetKey) || "id"}`) : void 0;
27276
+ var C;
27277
+ const { name: e } = useCollection_deprecated(), { getCollectionJoinField: t } = useCollectionManager_deprecated(), n = useForm(), o = useFieldSchema(), r = useVariables$1(), i = useField(), { formValue: a } = useSubFormValue(), { isInSubForm: l, isInSubTable: c } = useFlag() || {}, { getAssociationAppends: u } = useAssociationNames(), d = o.name.toString(), p = useRef(null), m = useRef(null);
27278
+ p.current == null && isDisplayField(d) && (p.current = t(`${e}.${d}`)), m.current == null && isDisplayField(d) && (m.current = t(`${e}.${d.split(".")[0]}`));
27279
+ const h = useMemo(() => !isDisplayField(d) || !r || e === "fields" || !p.current, [d, r, e, p.current]), g = h ? {} : untracked(() => _.cloneDeep(l || c ? a : n.values)), f = isDisplayField(d) && m.current ? _.get(g, `${d.split(".")[0]}.${((C = m.current) == null ? void 0 : C.targetKey) || "id"}`) : void 0;
27275
27280
  useEffect(() => {
27276
- if (f || _.isEmpty(C))
27281
+ if (h || _.isEmpty(g))
27277
27282
  return;
27278
- const y = {
27283
+ const b = {
27279
27284
  name: "$nForm",
27280
- ctx: C,
27285
+ ctx: g,
27281
27286
  collectionName: e
27282
- }, v = `{{ $nForm.${p} }}`;
27283
- if (b == null)
27287
+ }, S = `{{ $nForm.${d} }}`;
27288
+ if (f == null)
27284
27289
  return;
27285
- const { appends: F } = d();
27286
- i.parseVariable(v, y, { appends: F }).then(({ value: I }) => {
27290
+ const { appends: y } = u();
27291
+ r.parseVariable(S, b, { appends: y }).then(({ value: v }) => {
27287
27292
  nextTick(() => {
27288
- const R = transformVariableValue(I, { targetCollectionField: h.current });
27289
- _.isEmpty(R) && !_.isNumber(R) ? a.value = null : a.value = R;
27293
+ const F = transformVariableValue(v, { targetCollectionField: p.current });
27294
+ _.isEmpty(F) && !_.isNumber(F) ? i.value = null : i.value = F;
27290
27295
  });
27291
- }).catch((I) => {
27292
- console.error(I);
27296
+ }).catch((v) => {
27297
+ console.error(v);
27293
27298
  });
27294
- }, [b, f]);
27299
+ }, [f, h]);
27295
27300
  };
27296
- function hasPreload(e, t) {
27297
- const n = _.get(e, t);
27298
- return n != null && JSON.stringify(n) !== "[{}]" && JSON.stringify(n) !== "{}";
27299
- }
27300
27301
  function forEachLinkageRule(e, t) {
27301
27302
  e.forEach((n) => {
27302
27303
  var o;
@@ -27999,7 +28000,7 @@ const HeightMode = {
27999
28000
  },
28000
28001
  "x-validator": [
28001
28002
  {
28002
- minimum: 200
28003
+ minimum: 40
28003
28004
  }
28004
28005
  ],
28005
28006
  "x-reactions": {
@@ -29045,7 +29046,7 @@ function Input$1(e) {
29045
29046
  n(`{{${J.join(".")}}}`, X);
29046
29047
  },
29047
29048
  [$, w, n]
29048
- ), U = useCallback(() => {
29049
+ ), G = useCallback(() => {
29049
29050
  var J;
29050
29051
  if (M(!!o), (J = j == null ? void 0 : j.children) != null && J.length) {
29051
29052
  const X = j.children[0].default();
@@ -29073,7 +29074,7 @@ function Input$1(e) {
29073
29074
  I([...F]), k([...Q]);
29074
29075
  });
29075
29076
  }, [w, F.length]);
29076
- const G = e.disabled || v.disabled;
29077
+ const U = e.disabled || v.disabled;
29077
29078
  return g(
29078
29079
  /* @__PURE__ */ jsxs(Space$1.Compact, { style: l, className: cls(C, f, c), children: [
29079
29080
  w ? /* @__PURE__ */ jsxs(
@@ -29094,7 +29095,7 @@ function Input$1(e) {
29094
29095
  .ant-input {
29095
29096
  overflow: auto;
29096
29097
  white-space: nowrap;
29097
- ${G ? "" : "padding-right: 28px;"}
29098
+ ${U ? "" : "padding-right: 28px;"}
29098
29099
 
29099
29100
  .ant-tag {
29100
29101
  display: inline;
@@ -29113,21 +29114,21 @@ function Input$1(e) {
29113
29114
  role: "button",
29114
29115
  "aria-label": "variable-tag",
29115
29116
  style: { overflow: "hidden" },
29116
- className: cx("ant-input", { "ant-input-disabled": G }, f),
29117
+ className: cx("ant-input", { "ant-input-disabled": U }, f),
29117
29118
  children: /* @__PURE__ */ jsx(Tag, { color: "blue", children: R.map((J, X) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
29118
29119
  X ? " / " : "",
29119
29120
  J
29120
29121
  ] }, J)) })
29121
29122
  }
29122
29123
  ),
29123
- G ? null : /* @__PURE__ */ jsx(
29124
+ U ? null : /* @__PURE__ */ jsx(
29124
29125
  "span",
29125
29126
  {
29126
29127
  role: "button",
29127
29128
  "aria-label": "icon-close",
29128
29129
  className: cx("clear-button"),
29129
29130
  unselectable: "on",
29130
- onClick: U,
29131
+ onClick: G,
29131
29132
  children: /* @__PURE__ */ jsx(CloseCircleFilled, {})
29132
29133
  }
29133
29134
  )
@@ -29152,7 +29153,7 @@ function Input$1(e) {
29152
29153
  loadData: V,
29153
29154
  changeOnSelect: u,
29154
29155
  fieldNames: d,
29155
- disabled: G,
29156
+ disabled: U,
29156
29157
  children: r != null ? r : /* @__PURE__ */ jsx(
29157
29158
  XButton,
29158
29159
  {
@@ -29160,7 +29161,7 @@ function Input$1(e) {
29160
29161
  margin-left: -1px;
29161
29162
  `),
29162
29163
  type: w ? "primary" : "default",
29163
- disabled: G
29164
+ disabled: U
29164
29165
  }
29165
29166
  )
29166
29167
  }
@@ -29444,22 +29445,22 @@ function TextArea(e) {
29444
29445
  const E = (V = window.getSelection) == null ? void 0 : V.call(window);
29445
29446
  if (E)
29446
29447
  try {
29447
- const U = Array.from(N.childNodes);
29448
- U.length && (R[0] === -1 ? R[1] && O.setStartAfter(U[R[1] - 1]) : O.setStart(U[R[0]], R[1]), R[2] === -1 ? R[3] && O.setEndAfter(U[R[3] - 1]) : O.setEnd(U[R[2]], R[3])), O.collapse(!0), E.removeAllRanges(), E.addRange(O);
29449
- } catch (U) {
29448
+ const G = Array.from(N.childNodes);
29449
+ G.length && (R[0] === -1 ? R[1] && O.setStartAfter(G[R[1] - 1]) : O.setStart(G[R[0]], R[1]), R[2] === -1 ? R[3] && O.setEndAfter(G[R[3] - 1]) : O.setEnd(G[R[2]], R[3])), O.collapse(!0), E.removeAllRanges(), E.addRange(O);
29450
+ } catch (G) {
29450
29451
  }
29451
29452
  } else {
29452
29453
  const { lastChild: E } = N;
29453
29454
  if (E) {
29454
29455
  O.setStartAfter(E), O.setEndAfter(E);
29455
- const U = Array.from(N.childNodes), G = O.startContainer === N ? -1 : U.indexOf(E), H = O.startContainer === N ? -1 : U.indexOf(E);
29456
- k([G, O.startOffset, H, O.endOffset]);
29456
+ const G = Array.from(N.childNodes), U = O.startContainer === N ? -1 : G.indexOf(E), H = O.startContainer === N ? -1 : G.indexOf(E);
29457
+ k([U, O.startOffset, H, O.endOffset]);
29457
29458
  }
29458
29459
  }
29459
29460
  }, [F]);
29460
29461
  const M = useCallback(
29461
29462
  function(N) {
29462
- const O = N.filter((U) => !!U.trim()), { current: V } = m;
29463
+ const O = N.filter((G) => !!G.trim()), { current: V } = m;
29463
29464
  if (!V || !O)
29464
29465
  return;
29465
29466
  V.focus();
@@ -29497,10 +29498,10 @@ function TextArea(e) {
29497
29498
  span: ["ant-tag", "ant-tag-*"]
29498
29499
  },
29499
29500
  transformTags: {
29500
- span(E, U) {
29501
- return U["data-variable"] ? {
29501
+ span(E, G) {
29502
+ return G["data-variable"] ? {
29502
29503
  tagName: E,
29503
- attribs: U
29504
+ attribs: G
29504
29505
  } : {};
29505
29506
  }
29506
29507
  }
@@ -33144,11 +33145,11 @@ const tableBlockSettings = new SchemaSettings({
33144
33145
  name: "fieldSettings:component:CascadeSelect",
33145
33146
  items: [fieldComponent$7, titleField$2, ellipsisSettingsItem]
33146
33147
  }), SchemaSettingsDateRange = function e(t) {
33147
- var R, k, D, M, z, L, $, w, B, j, T, N, O, V, E, U;
33148
+ var R, k, D, M, z, L, $, w, B, j, T, N, O, V, E, G;
33148
33149
  const { fieldSchema: n } = t, o = useField(), { dn: r } = useDesignable(), { t: i } = useTranslation(), { getCollectionJoinField: a } = useCollectionManager_deprecated(), { isInSubForm: l, isInSubTable: c } = useFlag() || {}, u = a(n == null ? void 0 : n["x-collection-field"]) || {}, d = ((R = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : R.showTime) || ((D = (k = u == null ? void 0 : u.uiSchema) == null ? void 0 : k["x-component-props"]) == null ? void 0 : D.showTime) || !1, p = ((M = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : M.dateFormat) || ((L = (z = u == null ? void 0 : u.uiSchema) == null ? void 0 : z["x-component-props"]) == null ? void 0 : L.dateFormat) || "YYYY-MM-DD", m = (($ = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : $.timeFormat) || ((B = (w = u == null ? void 0 : u.uiSchema) == null ? void 0 : w["x-component-props"]) == null ? void 0 : B.timeFormat) || "HH:mm:ss", h = ((j = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : j.picker) || ((N = (T = u == null ? void 0 : u.uiSchema) == null ? void 0 : T["x-component-props"]) == null ? void 0 : N.picker) || "date";
33149
33150
  n["x-read-pretty"] || o.readOnly || o.readPretty;
33150
- const g = (O = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : O._minDate, f = (V = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : V._maxDate, C = ((E = u == null ? void 0 : u.uiSchema) == null ? void 0 : E["x-component-props"].gmt) || !1, b = ((U = u == null ? void 0 : u.uiSchema) == null ? void 0 : U["x-component-props"].utc) || !1, S = useRecord(), { form: y } = useFormBlockContext(), v = useCallback(
33151
- (G) => /* @__PURE__ */ jsx(
33151
+ const g = (O = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : O._minDate, f = (V = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : V._maxDate, C = ((E = u == null ? void 0 : u.uiSchema) == null ? void 0 : E["x-component-props"].gmt) || !1, b = ((G = u == null ? void 0 : u.uiSchema) == null ? void 0 : G["x-component-props"].utc) || !1, S = useRecord(), { form: y } = useFormBlockContext(), v = useCallback(
33152
+ (U) => /* @__PURE__ */ jsx(
33152
33153
  SchemaComponent,
33153
33154
  {
33154
33155
  schema: {
@@ -33174,9 +33175,9 @@ const tableBlockSettings = new SchemaSettings({
33174
33175
  ),
33175
33176
  [p, C, h, d, m, b]
33176
33177
  ), F = useCallback(
33177
- (G) => /* @__PURE__ */ jsx(
33178
+ (U) => /* @__PURE__ */ jsx(
33178
33179
  VariableInput,
33179
- P(x({}, G), {
33180
+ P(x({}, U), {
33180
33181
  form: y,
33181
33182
  record: S,
33182
33183
  noDisabled: !0,
@@ -33185,12 +33186,12 @@ const tableBlockSettings = new SchemaSettings({
33185
33186
  ),
33186
33187
  [n, y, S, v]
33187
33188
  );
33188
- function I(G) {
33189
- if (G != null) {
33190
- if (typeof G == "string")
33191
- return G;
33192
- if (typeof G == "object" && Object.prototype.hasOwnProperty.call(G, "value"))
33193
- return I(G.value);
33189
+ function I(U) {
33190
+ if (U != null) {
33191
+ if (typeof U == "string")
33192
+ return U;
33193
+ if (typeof U == "object" && Object.prototype.hasOwnProperty.call(U, "value"))
33194
+ return I(U.value);
33194
33195
  }
33195
33196
  }
33196
33197
  return /* @__PURE__ */ jsx(
@@ -33224,27 +33225,27 @@ const tableBlockSettings = new SchemaSettings({
33224
33225
  }
33225
33226
  }
33226
33227
  },
33227
- onSubmit: (G) => {
33228
+ onSubmit: (U) => {
33228
33229
  const H = {
33229
33230
  "x-uid": n["x-uid"]
33230
33231
  };
33231
33232
  H["x-component-props"] = o.componentProps || {}, n["x-component-props"] = P(x({}, o.componentProps || {}), {
33232
- _maxDate: I(G == null ? void 0 : G._maxDate),
33233
- _minDate: I(G == null ? void 0 : G._minDate)
33233
+ _maxDate: I(U == null ? void 0 : U._maxDate),
33234
+ _minDate: I(U == null ? void 0 : U._minDate)
33234
33235
  }), H["x-component-props"] = n["x-component-props"], o.componentProps = n["x-component-props"];
33235
33236
  const W = o.path.entire.split(".");
33236
33237
  W.pop();
33237
33238
  const Y = W.join(".");
33238
33239
  o.query(`${Y}.*[0:].${n.name}`).forEach((J) => {
33239
33240
  J.props.name === n.name && J.setComponentProps({
33240
- _maxDate: I(G == null ? void 0 : G._maxDate),
33241
- _minDate: I(G == null ? void 0 : G._minDate)
33241
+ _maxDate: I(U == null ? void 0 : U._maxDate),
33242
+ _minDate: I(U == null ? void 0 : U._minDate)
33242
33243
  });
33243
33244
  }), r.emit("patch", {
33244
33245
  schema: H
33245
33246
  }), r.refresh();
33246
33247
  },
33247
- ModalContextProvider: (G) => /* @__PURE__ */ jsx(FlagProvider, { isInSubForm: l, isInSubTable: c, isInFormDataTemplate: !0, children: G.children })
33248
+ ModalContextProvider: (U) => /* @__PURE__ */ jsx(FlagProvider, { isInSubForm: l, isInSubTable: c, isInFormDataTemplate: !0, children: U.children })
33248
33249
  }
33249
33250
  );
33250
33251
  }, datePickerComponentFieldSettings = new SchemaSettings({
@@ -34738,6 +34739,12 @@ const useBuiltInVariables = () => {
34738
34739
  defaultValue: a
34739
34740
  }
34740
34741
  ], [t, e, o, a, r, i]) };
34742
+ }, cache = /* @__PURE__ */ new Map(), cacheLazyLoadedValues = (e, t, n) => {
34743
+ const o = cache.get(e);
34744
+ o ? o[t] = n : cache.set(e, { [t]: n });
34745
+ }, getCachedLazyLoadedValues = (e, t) => {
34746
+ const n = cache.get(e);
34747
+ return n == null ? void 0 : n[t];
34741
34748
  }, filterEmptyValues = (e) => Array.isArray(e) ? e.filter((t) => t === 0 || t === !1 || t) : e, TYPE_TO_ACTION = {
34742
34749
  hasMany: "list?pageSize=9999",
34743
34750
  belongsTo: "get",
@@ -34777,44 +34784,52 @@ const variablesStore = {}, getFieldPath = (e, t) => {
34777
34784
  dataSource: k,
34778
34785
  collectionName: L
34779
34786
  };
34780
- const T = y[j], { fieldPath: N } = getFieldPath(y.slice(0, j + 1).join("."), F), O = r(N, k), V = (B = i(M, k)) == null ? void 0 : B.getPrimaryKey();
34787
+ const T = y[j], N = y.slice(0, j + 1).join("."), { fieldPath: O } = getFieldPath(N, F), V = r(O, k), E = (B = i(M, k)) == null ? void 0 : B.getPrimaryKey();
34781
34788
  if (Array.isArray(I)) {
34782
- const E = I.map((U) => {
34783
- if (!(S != null && S.doNotRequest) && shouldToRequest(U == null ? void 0 : U[T]) && (U == null ? void 0 : U[V]) != null && O != null && O.target) {
34784
- const G = `/${M}/${U[O.sourceKey || V]}/${T}:${getAction(O.type)}`;
34785
- if (hasRequested(G))
34786
- return getRequested(G);
34787
- const H = o.request({
34789
+ const G = I.map((U) => {
34790
+ if (!(S != null && S.doNotRequest) && shouldToRequest(U == null ? void 0 : U[T], U, N) && (U == null ? void 0 : U[E]) != null && V != null && V.target) {
34791
+ const H = `/${M}/${U[V.sourceKey || E]}/${T}:${getAction(V.type)}`;
34792
+ if (hasRequested(H))
34793
+ return getRequested(H);
34794
+ const W = o.request({
34788
34795
  headers: getDataSourceHeaders(k),
34789
- url: G,
34796
+ url: H,
34790
34797
  params: {
34791
34798
  appends: S == null ? void 0 : S.appends
34792
34799
  }
34793
- }).then((W) => (clearRequested(G), U[T] = W.data.data, U[T]));
34794
- return stashRequested(G, H), H;
34800
+ }).then((Y) => {
34801
+ clearRequested(H);
34802
+ const J = Y.data.data;
34803
+ return cacheLazyLoadedValues(U, N, J), J;
34804
+ });
34805
+ return stashRequested(H, W), W;
34795
34806
  }
34796
- return U == null ? void 0 : U[T];
34807
+ return getCachedLazyLoadedValues(U, N) || (U == null ? void 0 : U[T]);
34797
34808
  });
34798
- I = removeThroughCollectionFields(_.flatten(yield Promise.all(E)), O);
34799
- } else if (!(S != null && S.doNotRequest) && shouldToRequest(I[T]) && I[V] != null && (O != null && O.target)) {
34800
- const E = `/${M}/${I[O.sourceKey || V]}/${T}:${getAction(O.type)}`;
34809
+ I = removeThroughCollectionFields(_.flatten(yield Promise.all(G)), V);
34810
+ } else if (!(S != null && S.doNotRequest) && shouldToRequest(I[T], I, N) && I[E] != null && (V != null && V.target)) {
34811
+ const G = `/${M}/${I[V.sourceKey || E]}/${T}:${getAction(V.type)}`;
34801
34812
  let U = null;
34802
- if (hasRequested(E))
34803
- U = yield getRequested(E);
34813
+ if (hasRequested(G))
34814
+ U = yield getRequested(G);
34804
34815
  else {
34805
- const G = o.request({
34816
+ const W = o.request({
34806
34817
  headers: getDataSourceHeaders(k),
34807
- url: E,
34818
+ url: G,
34808
34819
  params: {
34809
34820
  appends: S == null ? void 0 : S.appends
34810
34821
  }
34811
34822
  });
34812
- stashRequested(E, G), U = yield G, clearRequested(E);
34823
+ stashRequested(G, W), U = yield W, clearRequested(G);
34813
34824
  }
34814
- raw(I)[T] || (raw(I)[T] = U.data.data), I = removeThroughCollectionFields(getValuesByPath(I, T), O);
34825
+ const H = U.data.data;
34826
+ getCachedLazyLoadedValues(I, N) || cacheLazyLoadedValues(I, N, H), I = removeThroughCollectionFields(H, V);
34815
34827
  } else
34816
- I = removeThroughCollectionFields(getValuesByPath(I, T), O);
34817
- O != null && O.target && (M = O.target);
34828
+ I = removeThroughCollectionFields(
34829
+ getCachedLazyLoadedValues(I, N) || getValuesByPath(I, T),
34830
+ V
34831
+ );
34832
+ V != null && V.target && (M = V.target);
34818
34833
  }
34819
34834
  const $ = a(
34820
34835
  _.isFunction(I) ? I({ fieldOperator: S == null ? void 0 : S.fieldOperator, isParsingVariable: !0 }) : I
@@ -34847,9 +34862,9 @@ const variablesStore = {}, getFieldPath = (e, t) => {
34847
34862
  [c]
34848
34863
  ), h = useCallback(
34849
34864
  /**
34850
- * 将变量字符串解析为真正的值
34851
- * @param str 变量字符串
34852
- * @param localVariables 局部变量,解析完成后会被清除
34865
+ * Parse the variable string to the actual value
34866
+ * @param str Variable string
34867
+ * @param localVariables Local variables, will be cleared after parsing
34853
34868
  * @returns
34854
34869
  */
34855
34870
  (C, b, S) => q(void 0, null, function* () {
@@ -34903,15 +34918,15 @@ const variablesStore = {}, getFieldPath = (e, t) => {
34903
34918
  };
34904
34919
  VariablesProvider.displayName = "VariablesProvider";
34905
34920
  const VariablesProvider$1 = VariablesProvider;
34906
- function shouldToRequest(e) {
34907
- let t = !1;
34908
- return untracked(() => {
34921
+ function shouldToRequest(e, t, n) {
34922
+ let o = !1;
34923
+ return getCachedLazyLoadedValues(t, n) ? !1 : (untracked(() => {
34909
34924
  if (JSON.stringify(e) === "[{}]" || JSON.stringify(e) === "{}") {
34910
- t = !0;
34925
+ o = !0;
34911
34926
  return;
34912
34927
  }
34913
- t = _.isEmpty(e);
34914
- }), t;
34928
+ o = _.isEmpty(e);
34929
+ }), o);
34915
34930
  }
34916
34931
  function mergeCtxWithLocalVariables(e, t) {
34917
34932
  return e = x({}, e), t == null || t.forEach((n) => {
@@ -35177,7 +35192,7 @@ function addAppVersion(e, t) {
35177
35192
  addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
35178
35193
  }), e;
35179
35194
  }
35180
- const name = "@nocobase/client", version = "1.5.6", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
35195
+ const name = "@nocobase/client", version = "1.5.8", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
35181
35196
  "@ahooksjs/use-url-state": "3.5.1",
35182
35197
  "@ant-design/cssinjs": "^1.11.1",
35183
35198
  "@ant-design/icons": "^5.1.4",
@@ -35199,9 +35214,9 @@ const name = "@nocobase/client", version = "1.5.6", license = "AGPL-3.0", main =
35199
35214
  "@formily/reactive-react": "^2.2.27",
35200
35215
  "@formily/shared": "^2.2.27",
35201
35216
  "@formily/validator": "^2.2.27",
35202
- "@nocobase/evaluators": "1.5.6",
35203
- "@nocobase/sdk": "1.5.6",
35204
- "@nocobase/utils": "1.5.6",
35217
+ "@nocobase/evaluators": "1.5.8",
35218
+ "@nocobase/sdk": "1.5.8",
35219
+ "@nocobase/utils": "1.5.8",
35205
35220
  ahooks: "^3.7.2",
35206
35221
  antd: "5.12.8",
35207
35222
  "antd-style": "3.7.1",
@@ -36583,7 +36598,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
36583
36598
  useEffect(() => {
36584
36599
  v.current && N();
36585
36600
  }, [V]);
36586
- const U = (X) => q(void 0, null, function* () {
36601
+ const G = (X) => q(void 0, null, function* () {
36587
36602
  var Q;
36588
36603
  N({
36589
36604
  filter: mergeFilter([
@@ -36595,7 +36610,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
36595
36610
  (Q = n == null ? void 0 : n.params) == null ? void 0 : Q.filter
36596
36611
  ])
36597
36612
  }), k.current = X;
36598
- }), G = useMemo(() => {
36613
+ }), U = useMemo(() => {
36599
36614
  var oe;
36600
36615
  const X = r || i;
36601
36616
  if (!((oe = T == null ? void 0 : T.data) != null && oe.length))
@@ -36612,7 +36627,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
36612
36627
  filterOption: !1,
36613
36628
  filterSort: null,
36614
36629
  fieldNames: t,
36615
- onSearch: U,
36630
+ onSearch: G,
36616
36631
  onDropdownVisibleChange: (X) => {
36617
36632
  y(X), k.current = null, X && N(), v.current = !0;
36618
36633
  },
@@ -36621,10 +36636,10 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
36621
36636
  defaultValue: i
36622
36637
  }, f), {
36623
36638
  loading: T ? O : !0,
36624
- options: h(j(G)),
36625
- rawOptions: G,
36639
+ options: h(j(U)),
36640
+ rawOptions: U,
36626
36641
  dropdownRender: (X) => {
36627
- const Q = G.some((Z) => Z[t.label] === k.current);
36642
+ const Q = U.some((Z) => Z[t.label] === k.current);
36628
36643
  return /* @__PURE__ */ jsx(Fragment, { children: I ? /* @__PURE__ */ jsxs(Fragment, { children: [
36629
36644
  !((T == null ? void 0 : T.data.length) === 0 && (k != null && k.current)) && X,
36630
36645
  (T == null ? void 0 : T.data.length) > 0 && (k == null ? void 0 : k.current) && !Q && /* @__PURE__ */ jsx(Divider$1, { style: { margin: 0 } }),
@@ -37734,7 +37749,7 @@ function navigateToTab({
37734
37749
  basename: n,
37735
37750
  pathname: o = window.location.pathname
37736
37751
  }) {
37737
- o = o.replace(n, ""), o.endsWith("/") && (o = o.slice(0, -1)), o.startsWith("/") || (o = `/${o}`), isTabPage(o) ? t(`${o.replace(/\/tabs\/[^/]+$/, `/tabs/${e}`)}`, { replace: !0 }) : t(`${o}/tabs/${e}`, { replace: !0 });
37752
+ o = o.replace(n, ""), o.endsWith("/") && (o = o.slice(0, -1)), o.startsWith("/") || (o = `/${o}`), isTabPage(o) ? t(withSearchParams(`${o.replace(/\/tabs\/[^/]+$/, `/tabs/${e}`)}`), { replace: !0 }) : t(withSearchParams(`${o}/tabs/${e}`), { replace: !0 });
37738
37753
  }
37739
37754
  function isTabPage(e) {
37740
37755
  e.endsWith("/") && (e = e.slice(0, -1));
@@ -38101,6 +38116,9 @@ const AppendsTreeSelect = (e) => {
38101
38116
  loadData: I
38102
38117
  }, u)
38103
38118
  );
38119
+ }, AssociationFieldAddNewer = (e) => {
38120
+ const t = useContext(SchemaComponentContext);
38121
+ return /* @__PURE__ */ jsx(SchemaComponentContext.Provider, { value: P(x({}, t), { draggable: !0 }), children: /* @__PURE__ */ jsx(Action.Container, x({}, e)) });
38104
38122
  }, filterAnalyses = (e) => {
38105
38123
  if (!e)
38106
38124
  return;
@@ -38125,7 +38143,7 @@ const AppendsTreeSelect = (e) => {
38125
38143
  return f.addEffects(k, () => {
38126
38144
  onFieldInputValueChange("*", (D) => {
38127
38145
  var z, L, $, w, B;
38128
- (filterAnalyses(($ = (L = (z = r.componentProps) == null ? void 0 : z.service) == null ? void 0 : L.params) == null ? void 0 : $.filter) || []).includes((w = D == null ? void 0 : D.props) == null ? void 0 : w.name) && r.value && isEqual(D == null ? void 0 : D.indexes, r == null ? void 0 : r.indexes) && ((B = D == null ? void 0 : D.props) == null ? void 0 : B.name) !== r.props.name && (r.setValue(void 0), p(void 0));
38146
+ (filterAnalyses(($ = (L = (z = r.componentProps) == null ? void 0 : z.service) == null ? void 0 : L.params) == null ? void 0 : $.filter) || []).includes((w = D == null ? void 0 : D.props) == null ? void 0 : w.name) && r.value && isEqual(D == null ? void 0 : D.indexes, r == null ? void 0 : r.indexes) && ((B = D == null ? void 0 : D.props) == null ? void 0 : B.name) !== r.props.name && (r.setValue(null), p(null));
38129
38147
  });
38130
38148
  }), () => {
38131
38149
  f.removeEffects(k);
@@ -38159,7 +38177,7 @@ const AppendsTreeSelect = (e) => {
38159
38177
  ]
38160
38178
  }
38161
38179
  );
38162
- return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(Space$1.Compact, { style: { display: "flex" }, children: [
38180
+ return console.log(i), /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(Space$1.Compact, { style: { display: "flex" }, children: [
38163
38181
  /* @__PURE__ */ jsx(
38164
38182
  RemoteSelect,
38165
38183
  P(x({
@@ -39177,8 +39195,8 @@ const InternalFileManager = (e) => {
39177
39195
  if ((j = v == null ? void 0 : v.uiSchema) != null && j.enum)
39178
39196
  if (Array.isArray(B))
39179
39197
  B = B.map((O, V) => {
39180
- var U, G;
39181
- const E = (G = (U = v.uiSchema.enum).find) == null ? void 0 : G.call(U, (H) => H.value === O);
39198
+ var G, U;
39199
+ const E = (U = (G = v.uiSchema.enum).find) == null ? void 0 : U.call(G, (H) => H.value === O);
39182
39200
  return E ? /* @__PURE__ */ jsx(Tag, { color: E.color, style: { marginRight: 3 }, children: (E == null ? void 0 : E.label) || O }, V) : /* @__PURE__ */ jsx(Tag, { children: O }, O);
39183
39201
  }).reverse();
39184
39202
  else {
@@ -40799,7 +40817,7 @@ const Table$1 = withDynamicSchemaProps(
40799
40817
  &:hover > td {
40800
40818
  background-color: ${t.controlItemBgActiveHover} !important;
40801
40819
  }
40802
- `, [t.controlItemBgActive, t.controlItemBgActiveHover]), U = useMemo(() => C ? E : "", [E, C]), G = useMemo(() => C ? (ee, ne) => ({
40820
+ `, [t.controlItemBgActive, t.controlItemBgActiveHover]), G = useMemo(() => C ? E : "", [E, C]), U = useMemo(() => C ? (ee, ne) => ({
40803
40821
  onClick: (se) => {
40804
40822
  isPortalInBody(se.target) || C(ee, N, T);
40805
40823
  },
@@ -40927,8 +40945,8 @@ const Table$1 = withDynamicSchemaProps(
40927
40945
  x: "max-content",
40928
40946
  y: Y.length > 0 ? te : void 0
40929
40947
  }), [te, ae, Y]), xe = useCallback(
40930
- (ee) => T.includes(ee[m]) ? U : "",
40931
- [T, U, JSON.stringify(m)]
40948
+ (ee) => T.includes(ee[m]) ? G : "",
40949
+ [T, G, JSON.stringify(m)]
40932
40950
  ), pe = useCallback(
40933
40951
  (ee, ne) => {
40934
40952
  const se = ee ? [...$, ne[F.getPrimaryKey()]] : $.filter((le) => ne[F.getPrimaryKey()] !== le);
@@ -40953,7 +40971,7 @@ const Table$1 = withDynamicSchemaProps(
40953
40971
  paginationProps: z,
40954
40972
  components: X,
40955
40973
  onTableChange: d,
40956
- onRow: G,
40974
+ onRow: U,
40957
40975
  rowClassName: xe,
40958
40976
  scroll: ue,
40959
40977
  columns: L,
@@ -41041,14 +41059,14 @@ const Table$1 = withDynamicSchemaProps(
41041
41059
  const { setVisible: O } = useActionContext(), { selectedRows: V, setSelectedRows: E } = useContext(RecordPickerContext);
41042
41060
  return {
41043
41061
  onClick() {
41044
- var G;
41062
+ var U;
41045
41063
  Array.isArray(n.value) || (n.value = []), V.forEach((H) => n.value.push(markRecordAsNew(H))), n.onInput(n.value), n.initialValue = n.value, E([]), O(!1);
41046
- const U = Math.ceil(n.value.length / (((G = n.componentProps) == null ? void 0 : G.pageSize) || 10));
41047
- D(U);
41064
+ const G = Math.ceil(n.value.length / (((U = n.componentProps) == null ? void 0 : U.pageSize) || 10));
41065
+ D(G);
41048
41066
  }
41049
41067
  };
41050
41068
  }, R = () => {
41051
- const O = (o == null ? void 0 : o.targetKey) || "id", V = (n.value || []).map((U) => U == null ? void 0 : U[O]).filter(Boolean);
41069
+ const O = (o == null ? void 0 : o.targetKey) || "id", V = (n.value || []).map((G) => G == null ? void 0 : G[O]).filter(Boolean);
41052
41070
  return V.length ? { $and: [{ [`${O}.$ne`]: V }] } : {};
41053
41071
  }, [k, D] = useState(1), [M, z] = useState(((B = n.componentProps) == null ? void 0 : B.pageSize) || 10);
41054
41072
  useEffect(() => {
@@ -41062,8 +41080,8 @@ const Table$1 = withDynamicSchemaProps(
41062
41080
  current: k > O ? O : k,
41063
41081
  pageSize: M || 10,
41064
41082
  total: n == null ? void 0 : n.value,
41065
- onChange: (E, U) => {
41066
- D(E), z(U), n.onInput(n.value);
41083
+ onChange: (E, G) => {
41084
+ D(E), z(G), n.onInput(n.value);
41067
41085
  },
41068
41086
  showSizeChanger: !0,
41069
41087
  pageSizeOptions: ["10", "20", "50", "100"],
@@ -41178,7 +41196,7 @@ const Table$1 = withDynamicSchemaProps(
41178
41196
  ), AssociationField = connect(Editable$1, mapReadPretty(ReadPretty$8));
41179
41197
  AssociationField.SubTable = SubTable;
41180
41198
  AssociationField.Nester = Nester;
41181
- AssociationField.AddNewer = Action.Container;
41199
+ AssociationField.AddNewer = AssociationFieldAddNewer;
41182
41200
  AssociationField.Selector = Action.Container;
41183
41201
  AssociationField.Viewer = Action.Container;
41184
41202
  AssociationField.InternalSelect = InternalPicker;
@@ -41264,7 +41282,7 @@ const ReadPretty$7 = observer$1(
41264
41282
  InternalAssociationSelect.displayName = "InternalAssociationSelect";
41265
41283
  const AssociationSelect = InternalAssociationSelect;
41266
41284
  AssociationSelect.Designer = function e() {
41267
- var B, j, T, N, O, V, E, U, G, H, W;
41285
+ var B, j, T, N, O, V, E, G, U, H, W;
41268
41286
  const { getCollectionFields: t, getInterface: n, getCollectionJoinField: o, 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: b } = useIsAllowToSetDefaultValue(), S = a(u.name) || o(u["x-collection-field"]), y = useFieldComponentOptions(), v = c.address.segments.includes("__form_grid"), F = n(S == null ? void 0 : S.interface), I = (B = F == null ? void 0 : F.validateSchema) == null ? void 0 : B.call(F, u), R = (j = S == null ? void 0 : S.uiSchema) == null ? void 0 : j.title, k = S != null && S.target ? t(S == null ? void 0 : S.target) : [];
41269
41287
  c.title === R || c.title;
41270
41288
  const D = useSortFields(S == null ? void 0 : S.target), M = ((O = (N = (T = c.componentProps) == null ? void 0 : T.service) == null ? void 0 : N.params) == null ? void 0 : O.sort) || [];
@@ -41494,7 +41512,7 @@ AssociationSelect.Designer = function e() {
41494
41512
  SchemaSettingsDataScope,
41495
41513
  {
41496
41514
  collectionName: S == null ? void 0 : S.target,
41497
- defaultFilter: ((G = (U = (E = c.componentProps) == null ? void 0 : E.service) == null ? void 0 : U.params) == null ? void 0 : G.filter) || {},
41515
+ defaultFilter: ((U = (G = (E = c.componentProps) == null ? void 0 : E.service) == null ? void 0 : G.params) == null ? void 0 : U.filter) || {},
41498
41516
  form: l,
41499
41517
  onSubmit: ({ filter: Y }) => {
41500
41518
  Y = removeNullCondition(Y), _.set(c.componentProps, "service.params.filter", Y), u["x-component-props"] = c.componentProps, m.emit("patch", {
@@ -43091,11 +43109,8 @@ const IconPicker = connect(
43091
43109
  mapReadPretty((e) => isValid(e.value) ? /* @__PURE__ */ jsx(Icon, { type: e.value }) : /* @__PURE__ */ jsx("div", {}))
43092
43110
  );
43093
43111
  function countDecimalPlaces(e) {
43094
- const t = Number(e);
43095
- if (!Number.isFinite(t))
43096
- return 0;
43097
- const n = String(t).split(".")[1];
43098
- return n ? n.length : 0;
43112
+ const t = toString(e);
43113
+ return t.includes(".") ? t.split(".")[1].replace(/0+$/, "").length : 0;
43099
43114
  }
43100
43115
  const separators = {
43101
43116
  "0,0.00": { thousands: ",", decimal: "." },
@@ -46766,14 +46781,14 @@ const TableActionColumnDesigner = (e) => {
46766
46781
  }
46767
46782
  },
46768
46783
  onSubmit: ({ sort: O }) => {
46769
- var U;
46770
- const V = O.map((G) => G.direction === "desc" ? `-${G.field}` : G.field), E = r.decoratorProps.params || {};
46784
+ var G;
46785
+ const V = O.map((U) => U.direction === "desc" ? `-${U.field}` : U.field), E = r.decoratorProps.params || {};
46771
46786
  E.sort = V, r.decoratorProps.params = E, i["x-decorator-props"].params = E, d.emit("patch", {
46772
46787
  schema: {
46773
46788
  "x-uid": i["x-uid"],
46774
46789
  "x-decorator-props": i["x-decorator-props"]
46775
46790
  }
46776
- }), c.run(P(x({}, (U = c.params) == null ? void 0 : U[0]), { sort: V }));
46791
+ }), c.run(P(x({}, (G = c.params) == null ? void 0 : G[0]), { sort: V }));
46777
46792
  }
46778
46793
  }
46779
46794
  ),
@@ -46814,9 +46829,9 @@ const TableActionColumnDesigner = (e) => {
46814
46829
  { label: u("Small"), value: "small" }
46815
46830
  ],
46816
46831
  onChange: (O) => {
46817
- const V = i.reduceProperties((E, U) => {
46818
- if (U["x-component"] === "TableV2")
46819
- return U;
46832
+ const V = i.reduceProperties((E, G) => {
46833
+ if (G["x-component"] === "TableV2")
46834
+ return G;
46820
46835
  }, null);
46821
46836
  V["x-component-props"] = V["x-component-props"] || {}, V["x-component-props"].size = O, d.emit("patch", {
46822
46837
  schema: {
@@ -48677,9 +48692,9 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
48677
48692
  else {
48678
48693
  let V = [];
48679
48694
  j != null && j.length ? j.forEach((E) => {
48680
- var G;
48681
- const U = (G = N == null ? void 0 : N.children) == null ? void 0 : G.find((H) => [E, E.interface].includes(H.name));
48682
- U && V.push(P(x({}, U), {
48695
+ var U;
48696
+ const G = (U = N == null ? void 0 : N.children) == null ? void 0 : U.find((H) => [E, E.interface].includes(H.name));
48697
+ G && V.push(P(x({}, G), {
48683
48698
  targetScope: E == null ? void 0 : E.targetScope
48684
48699
  }));
48685
48700
  }) : B != null && B.length ? V = (O = N == null ? void 0 : N.children) == null ? void 0 : O.filter((E) => !B.includes(E.name)) : V = N == null ? void 0 : N.children, V != null && V.length && T.push(P(x({}, N), {
@@ -49483,22 +49498,22 @@ const getSchema$4 = (e, t, n) => {
49483
49498
  g.forEach((B) => {
49484
49499
  var V;
49485
49500
  const j = v(B), N = R(B).map((E) => {
49486
- const U = k(E, B);
49501
+ const G = k(E, B);
49487
49502
  return {
49488
49503
  type: "group",
49489
49504
  key: E,
49490
49505
  label: l("Parent collection fields") + l(`(${v(E).title})`),
49491
- children: U.filter((G) => !["hasOne", "hasMany", "belongsToMany"].includes(G == null ? void 0 : G.type)).map((G) => {
49506
+ children: G.filter((U) => !["hasOne", "hasMany", "belongsToMany"].includes(U == null ? void 0 : U.type)).map((U) => {
49492
49507
  var H;
49493
49508
  return {
49494
- value: G.name,
49495
- label: l((H = G.uiSchema) == null ? void 0 : H.title)
49509
+ value: U.name,
49510
+ label: l((H = U.uiSchema) == null ? void 0 : H.title)
49496
49511
  };
49497
49512
  })
49498
49513
  };
49499
49514
  }), O = (V = j.fields.filter((E) => !["obo", "oho", "m2m", "o2m"].includes(E == null ? void 0 : E.interface))) == null ? void 0 : V.map((E) => {
49500
- var U;
49501
- return { value: E.name, key: E.name, label: l(((U = E.uiSchema) == null ? void 0 : U.title) || E.name) };
49515
+ var G;
49516
+ return { value: E.name, key: E.name, label: l(((G = E.uiSchema) == null ? void 0 : G.title) || E.name) };
49502
49517
  }).concat(N);
49503
49518
  w.push({
49504
49519
  value: B,
@@ -49514,12 +49529,12 @@ const getSchema$4 = (e, t, n) => {
49514
49529
  const T = (j = Object.values((B = w == null ? void 0 : w.data) == null ? void 0 : B.fields)) == null ? void 0 : j.map((N) => {
49515
49530
  var O, V;
49516
49531
  if (N.source) {
49517
- const E = (i == null ? void 0 : i.data.find((U) => U.name === N.name)) || N;
49532
+ const E = (i == null ? void 0 : i.data.find((G) => G.name === N.name)) || N;
49518
49533
  return P(x({}, N), {
49519
49534
  uiSchema: P(x({}, omit(E.uiSchema, "rawTitle")), { title: ((O = E.uiSchema) == null ? void 0 : O.title) || E.name })
49520
49535
  });
49521
49536
  } else {
49522
- const E = (i == null ? void 0 : i.data.find((U) => U.name === N.name)) || N;
49537
+ const E = (i == null ? void 0 : i.data.find((G) => G.name === N.name)) || N;
49523
49538
  return P(x({}, E), {
49524
49539
  uiSchema: P(x({}, omit(E.uiSchema, "rawTitle")), { title: ((V = E.uiSchema) == null ? void 0 : V.title) || E.name })
49525
49540
  });
@@ -54886,9 +54901,9 @@ const useACLCustomContext = () => useContext(ACLCustomContext), useACLRolesCheck
54886
54901
  let o = !1;
54887
54902
  return e.ignoreScope && (o = !0), t != null && t["x-acl-ignore-scope"] && (o = !0), (r = t == null ? void 0 : t["x-acl-action-props"]) != null && r.skipScopeCheck && (o = !0), n || (o = !0), o;
54888
54903
  }, useAllowedActions = () => {
54889
- var t, n;
54890
- const e = useResourceActionContext();
54891
- return (n = (t = e == null ? void 0 : e.data) == null ? void 0 : t.meta) == null ? void 0 : n.allowedActions;
54904
+ var n, o, r, i;
54905
+ const e = useResourceActionContext(), t = useDataBlockRequest();
54906
+ return ((o = (n = e == null ? void 0 : e.data) == null ? void 0 : n.meta) == null ? void 0 : o.allowedActions) || ((i = (r = t == null ? void 0 : t.data) == null ? void 0 : r.meta) == null ? void 0 : i.allowedActions);
54892
54907
  }, useResourceName = () => {
54893
54908
  var n;
54894
54909
  const e = useResourceActionContext(), t = useDataBlockProps();
@@ -58906,7 +58921,7 @@ const ActionInitializerItem = (e) => {
58906
58921
  };
58907
58922
  }), { Panel } = Collapse, AssociationFilterItem = withDynamicSchemaProps(
58908
58923
  (e) => {
58909
- var E, U, G, H;
58924
+ var E, G, U, H;
58910
58925
  const { wrapSSR: t, componentCls: n, hashId: o } = useStyles(), { token: r } = useToken(), i = AssociationFilter.useAssociationField(), a = useFieldSchema(), l = useDesigner(), c = useCompile(), {
58911
58926
  list: u,
58912
58927
  onSelected: d,
@@ -58921,7 +58936,7 @@ const ActionInitializerItem = (e) => {
58921
58936
  } = useProps(e), [S, y] = useState(!1), v = useMemo(
58922
58937
  () => b && (i != null && i.name) ? [i.name] : [],
58923
58938
  [i == null ? void 0 : i.name, b]
58924
- ), F = f || (i == null ? void 0 : i.targetKey) || "id", I = C || ((U = (E = a["x-component-props"]) == null ? void 0 : E.fieldNames) == null ? void 0 : U.label) || F, R = {
58939
+ ), F = f || (i == null ? void 0 : i.targetKey) || "id", I = C || ((G = (E = a["x-component-props"]) == null ? void 0 : E.fieldNames) == null ? void 0 : G.label) || F, R = {
58925
58940
  title: I || F,
58926
58941
  key: F
58927
58942
  }, [k, D] = useState([]), [M, z] = useState(a.default || []), [L, $] = useState(!0), w = useLabelUiSchema(i, (R == null ? void 0 : R.title) || "label");
@@ -58943,7 +58958,7 @@ const ActionInitializerItem = (e) => {
58943
58958
  W.stopPropagation();
58944
58959
  }, O = (W) => {
58945
58960
  m(W);
58946
- }, V = (H = a.title) != null ? H : (G = i == null ? void 0 : i.uiSchema) == null ? void 0 : G.title;
58961
+ }, V = (H = a.title) != null ? H : (U = i == null ? void 0 : i.uiSchema) == null ? void 0 : U.title;
58947
58962
  return t(
58948
58963
  /* @__PURE__ */ jsxs(SortableItem, { className: cls(n, o, "nb-block-item", e.className, "SortableItem"), children: [
58949
58964
  /* @__PURE__ */ jsx(l, {}),