@nocobase/client 1.5.0-beta.14 → 1.5.0-beta.16

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
@@ -5811,24 +5811,24 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
5811
5811
  const D = {
5812
5812
  type: "duplicate",
5813
5813
  tag: c((z = T.uiSchema) == null ? void 0 : z.title) || T.name
5814
- }, N = P(x({}, D), {
5814
+ }, $ = P(x({}, D), {
5815
5815
  role: "button",
5816
5816
  title: React.createElement(TreeNode, P(x({}, D), { displayType: t })),
5817
5817
  key: R ? `${R}.${T.name}` : T.name,
5818
5818
  isLeaf: !0,
5819
5819
  field: T
5820
5820
  });
5821
- return ["belongsTo", "belongsToMany"].includes(T.type) ? (D.type = "reference", N.type = "reference", N.title = React.createElement(TreeNode, P(x({}, D), { type: "reference", displayType: t })), N.isLeaf = !1, N.children = m(T.target, {
5821
+ return ["belongsTo", "belongsToMany"].includes(T.type) ? (D.type = "reference", $.type = "reference", $.title = React.createElement(TreeNode, P(x({}, D), { type: "reference", displayType: t })), $.isLeaf = !1, $.children = m(T.target, {
5822
5822
  depth: F + 1,
5823
5823
  maxDepth: A,
5824
- prefix: N.key,
5824
+ prefix: $.key,
5825
5825
  exclude: systemKeys
5826
- })) : ["hasOne", "hasMany"].includes(T.type) && (N.isLeaf = !1, N.children = p(T.target, {
5826
+ })) : ["hasOne", "hasMany"].includes(T.type) && ($.isLeaf = !1, $.children = p(T.target, {
5827
5827
  depth: F + 1,
5828
5828
  maxDepth: A,
5829
- prefix: N.key,
5829
+ prefix: $.key,
5830
5830
  exclude: ["id", ...systemKeys]
5831
- })), N;
5831
+ })), $;
5832
5832
  }).filter(Boolean), m = (y, { prefix: v, maxDepth: F, depth: A = 0, exclude: R = [] }) => A > F ? [] : o(y).map((T) => {
5833
5833
  var z;
5834
5834
  if (!T.target || !T.interface || R.includes(T.name))
@@ -5836,15 +5836,15 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
5836
5836
  const D = {
5837
5837
  type: "preloading",
5838
5838
  tag: c((z = T.uiSchema) == null ? void 0 : z.title) || T.name
5839
- }, N = v ? `${v}.${T.name}` : T.name;
5839
+ }, $ = v ? `${v}.${T.name}` : T.name;
5840
5840
  return {
5841
5841
  role: "button",
5842
5842
  title: React.createElement(TreeNode, P(x({}, D), { displayType: t })),
5843
- key: N,
5843
+ key: $,
5844
5844
  isLeaf: !1,
5845
5845
  field: T,
5846
5846
  children: m(T.target, {
5847
- prefix: N,
5847
+ prefix: $,
5848
5848
  depth: A + 1,
5849
5849
  maxDepth: F,
5850
5850
  exclude: R
@@ -5863,8 +5863,8 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
5863
5863
  return h(F || R.treeData);
5864
5864
  try {
5865
5865
  return p(y, { exclude: ["id", ...systemKeys], maxDepth: 1 });
5866
- } catch (N) {
5867
- return console.error(N), [];
5866
+ } catch ($) {
5867
+ return console.error($), [];
5868
5868
  }
5869
5869
  }, []), f = useCallback((y) => (v) => new Promise((F) => {
5870
5870
  if (v.children.length)
@@ -5882,17 +5882,17 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
5882
5882
  getOnCheck: C,
5883
5883
  getScopeDataSource: (y) => {
5884
5884
  const v = o(y), F = (T, D) => {
5885
- var M, B;
5885
+ var M, N;
5886
5886
  if (!T.interface)
5887
5887
  return;
5888
- const N = a(T.interface);
5889
- if (!(N != null && N.filterable))
5888
+ const $ = a(T.interface);
5889
+ if (!($ != null && $.filterable))
5890
5890
  return;
5891
- const { nested: z, children: L, operators: $ } = N.filterable, w = {
5891
+ const { nested: z, children: L, operators: B } = $.filterable, w = {
5892
5892
  name: T.name,
5893
5893
  title: ((M = T == null ? void 0 : T.uiSchema) == null ? void 0 : M.title) || T.name,
5894
5894
  schema: T == null ? void 0 : T.uiSchema,
5895
- operators: ((B = $ == null ? void 0 : $.filter) == null ? void 0 : B.call($, (k) => !(k != null && k.visible) || k.visible(T))) || [],
5895
+ operators: ((N = B == null ? void 0 : B.filter) == null ? void 0 : N.call(B, (k) => !(k != null && k.visible) || k.visible(T))) || [],
5896
5896
  interface: T.interface
5897
5897
  };
5898
5898
  if (!(T.target && D > 2)) {
@@ -5905,11 +5905,11 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
5905
5905
  return w;
5906
5906
  }
5907
5907
  }, A = (T, D) => {
5908
- const N = [];
5908
+ const $ = [];
5909
5909
  return T.forEach((z) => {
5910
5910
  const L = F(z, D);
5911
- L && N.push(L);
5912
- }), N;
5911
+ L && $.push(L);
5912
+ }), $;
5913
5913
  };
5914
5914
  return A(v, 1);
5915
5915
  },
@@ -8996,15 +8996,15 @@ function withInitializer(e) {
8996
8996
  S ? S(y(M, { isInSubTable: i })) : r(d, y(M, { isInSubTable: i }), { onSuccess: p });
8997
8997
  },
8998
8998
  [S, y, i, r, d, p]
8999
- ), { wrapSSR: F, hashId: A, componentCls: R } = useSchemaInitializerStyles(), [T, D] = useState(!1), { token: N } = theme$1.useToken(), z = useNiceDropdownMaxHeight([T]), L = useMemo(
8999
+ ), { wrapSSR: F, hashId: A, componentCls: R } = useSchemaInitializerStyles(), [T, D] = useState(!1), { token: $ } = theme$1.useToken(), z = useNiceDropdownMaxHeight([T]), L = useMemo(
9000
9000
  () => x({
9001
9001
  options: n,
9002
9002
  style: C
9003
9003
  }, b),
9004
9004
  [b, n, C]
9005
- ), $ = useMemo(() => css`
9005
+ ), B = useMemo(() => css`
9006
9006
  .ant-popover-inner {
9007
- padding: ${`${N.paddingXXS}px 0`};
9007
+ padding: ${`${$.paddingXXS}px 0`};
9008
9008
  .ant-menu-submenu-title {
9009
9009
  margin-block: 0;
9010
9010
  }
@@ -9012,7 +9012,7 @@ function withInitializer(e) {
9012
9012
  padding: 0;
9013
9013
  }
9014
9014
  }
9015
- `, [N.paddingXXS]), w = useMemo(
9015
+ `, [$.paddingXXS]), w = useMemo(
9016
9016
  () => ({
9017
9017
  maxHeight: z,
9018
9018
  overflowY: "auto"
@@ -9034,7 +9034,7 @@ function withInitializer(e) {
9034
9034
  placement: "bottomLeft"
9035
9035
  }, h), {
9036
9036
  arrow: !1,
9037
- overlayClassName: $,
9037
+ overlayClassName: B,
9038
9038
  open: T,
9039
9039
  onOpenChange: D,
9040
9040
  content: F(
@@ -9044,10 +9044,10 @@ function withInitializer(e) {
9044
9044
  theme: {
9045
9045
  components: {
9046
9046
  Menu: {
9047
- itemHeight: N.marginXL,
9048
- borderRadius: N.borderRadiusSM,
9049
- itemBorderRadius: N.borderRadiusSM,
9050
- subMenuItemBorderRadius: N.borderRadiusSM
9047
+ itemHeight: $.marginXL,
9048
+ borderRadius: $.borderRadiusSM,
9049
+ itemBorderRadius: $.borderRadiusSM,
9050
+ subMenuItemBorderRadius: $.borderRadiusSM
9051
9051
  }
9052
9052
  }
9053
9053
  },
@@ -10086,11 +10086,11 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
10086
10086
  }
10087
10087
  `, [n.paddingContentVerticalLG, n.marginSM, n.margin]), b = useCollection(), S = useMemo(
10088
10088
  () => u == null ? void 0 : u.map((v) => {
10089
- var z, L, $;
10089
+ var z, L, B;
10090
10090
  const F = v.reduceProperties((w, M) => {
10091
10091
  if (isCollectionFieldComponent(M))
10092
10092
  return w.concat([M]);
10093
- }, []), A = (F == null ? void 0 : F.length) > 0 ? F[0].name : v.name, R = !!((z = v["x-component-props"]) != null && z.columnHidden), { uiSchema: T, defaultValue: D, interface: N } = (b == null ? void 0 : b.getField(A)) || {};
10093
+ }, []), A = (F == null ? void 0 : F.length) > 0 ? F[0].name : v.name, R = !!((z = v["x-component-props"]) != null && z.columnHidden), { uiSchema: T, defaultValue: D, interface: $ } = (b == null ? void 0 : b.getField(A)) || {};
10094
10094
  return T && (T.default = D), P(x({
10095
10095
  title: /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: h, children: /* @__PURE__ */ jsx(
10096
10096
  NocoBaseRecursionField,
@@ -10106,11 +10106,11 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
10106
10106
  sorter: (L = v["x-component-props"]) == null ? void 0 : L.sorter,
10107
10107
  columnHidden: R
10108
10108
  }, v["x-component-props"]), {
10109
- width: R && !a ? 0 : (($ = v["x-component-props"]) == null ? void 0 : $.width) || 100,
10110
- render: (w, M, B) => {
10109
+ width: R && !a ? 0 : ((B = v["x-component-props"]) == null ? void 0 : B.width) || 100,
10110
+ render: (w, M, N) => {
10111
10111
  var j, O;
10112
10112
  const { enableLink: k } = Object.values(v.properties)[0]["x-component-props"] || {};
10113
- return !k && ["sequence", "input", "textarea", "phone", "email"].includes(N) ? /* @__PURE__ */ jsx(
10113
+ return !k && ["sequence", "input", "textarea", "phone", "email"].includes($) ? /* @__PURE__ */ jsx(
10114
10114
  RenderTextInCell,
10115
10115
  {
10116
10116
  value: g(w || _.get(M, Object.keys(v.properties)[0])),
@@ -10125,7 +10125,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
10125
10125
  filterProperties: f,
10126
10126
  schemaToolbarBigger: C,
10127
10127
  field: o,
10128
- index: B
10128
+ index: N
10129
10129
  }
10130
10130
  ) });
10131
10131
  },
@@ -10246,7 +10246,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
10246
10246
  display: none !important;
10247
10247
  }
10248
10248
  `,
10249
- itemRender: (D, N, z) => N === "prev" ? /* @__PURE__ */ jsxs(
10249
+ itemRender: (D, $, z) => $ === "prev" ? /* @__PURE__ */ jsxs(
10250
10250
  "div",
10251
10251
  {
10252
10252
  style: { display: "flex" },
@@ -10492,8 +10492,8 @@ const Table$2 = withDynamicSchemaProps(
10492
10492
  "loading",
10493
10493
  "onClickRow",
10494
10494
  "value"
10495
- ]), y = useArrayField$1(S), v = useFieldSchema(), { size: F = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, A = useCollection(), T = ((ce = v == null ? void 0 : v.parent) == null ? void 0 : ce["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: N } = T, z = useMemoizedFn(S.onRowDragEnd || (() => {
10496
- })), L = usePaginationProps$3(n, i, e), $ = useTableColumns$2(S, L), [w, M] = useState(() => D ? N : []), [B, k] = useState(((Ce = y == null ? void 0 : y.data) == null ? void 0 : Ce.selectedRowKeys) || []), [j, O] = useState([]), q = (p == null ? void 0 : p.type) !== "none", E = useRef(/* @__PURE__ */ new Map()), U = useMemo(() => css`
10495
+ ]), y = useArrayField$1(S), v = useFieldSchema(), { size: F = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, A = useCollection(), T = ((ce = v == null ? void 0 : v.parent) == null ? void 0 : ce["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: $ } = T, z = useMemoizedFn(S.onRowDragEnd || (() => {
10496
+ })), L = usePaginationProps$3(n, i, e), B = useTableColumns$2(S, L), [w, M] = useState(() => D ? $ : []), [N, k] = useState(((Ce = y == null ? void 0 : y.data) == null ? void 0 : Ce.selectedRowKeys) || []), [j, O] = useState([]), q = (p == null ? void 0 : p.type) !== "none", E = useRef(/* @__PURE__ */ new Map()), U = useMemo(() => css`
10497
10497
  & > td {
10498
10498
  background-color: ${t.controlItemBgActive} !important;
10499
10499
  }
@@ -10511,9 +10511,9 @@ const Table$2 = withDynamicSchemaProps(
10511
10511
  record: re
10512
10512
  }), [C, j]);
10513
10513
  useDeepCompareEffect(() => {
10514
- const re = D ? N : [];
10514
+ const re = D ? $ : [];
10515
10515
  _.isEqual(re, w) || M(re);
10516
- }, [D, N]);
10516
+ }, [D, $]);
10517
10517
  const W = useCallback((re) => {
10518
10518
  if (m)
10519
10519
  return X(re);
@@ -10559,7 +10559,7 @@ const Table$2 = withDynamicSchemaProps(
10559
10559
  () => ({
10560
10560
  rowSelection: ee ? x({
10561
10561
  type: "checkbox",
10562
- selectedRowKeys: B,
10562
+ selectedRowKeys: N,
10563
10563
  onChange(re, Z) {
10564
10564
  y.data = y.data || {}, y.data.selectedRowKeys = re, y.data.selectedRowData = Z, k(re), u == null || u(re, Z);
10565
10565
  },
@@ -10604,7 +10604,7 @@ const Table$2 = withDynamicSchemaProps(
10604
10604
  }),
10605
10605
  [
10606
10606
  ee,
10607
- B,
10607
+ N,
10608
10608
  u,
10609
10609
  c,
10610
10610
  l,
@@ -10661,7 +10661,7 @@ const Table$2 = withDynamicSchemaProps(
10661
10661
  onRow: H,
10662
10662
  rowClassName: xe,
10663
10663
  scroll: ue,
10664
- columns: $,
10664
+ columns: B,
10665
10665
  expandable: fe,
10666
10666
  field: y,
10667
10667
  size: F
@@ -10874,12 +10874,12 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
10874
10874
  ({
10875
10875
  tabKey: w,
10876
10876
  popupUid: M,
10877
- recordData: B,
10877
+ recordData: N,
10878
10878
  sourceId: k,
10879
10879
  collection: j,
10880
10880
  puid: O
10881
10881
  }) => {
10882
- const q = c.getFilterByTK(u || l, B);
10882
+ const q = c.getFilterByTK(u || l, N);
10883
10883
  return getPopupPathFromParams({
10884
10884
  popupuid: M,
10885
10885
  puid: O,
@@ -10901,7 +10901,7 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
10901
10901
  ({
10902
10902
  recordData: w,
10903
10903
  parentRecordData: M,
10904
- collectionNameUsedInURL: B,
10904
+ collectionNameUsedInURL: N,
10905
10905
  popupUidUsedInURL: k,
10906
10906
  customActionSchema: j
10907
10907
  } = {}) => {
@@ -10913,7 +10913,7 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
10913
10913
  popupUid: q,
10914
10914
  recordData: w,
10915
10915
  sourceId: E,
10916
- collection: B,
10916
+ collection: N,
10917
10917
  puid: k
10918
10918
  });
10919
10919
  let G = n.pathname;
@@ -10957,27 +10957,27 @@ ${JSON.stringify(O, null, 2)}`
10957
10957
  F,
10958
10958
  h
10959
10959
  ]
10960
- ), N = useCallback(() => {
10960
+ ), $ = useCallback(() => {
10961
10961
  if (!f())
10962
10962
  return A == null ? void 0 : A(!1);
10963
10963
  t(withSearchParams(removeLastPopupPath(n.pathname)), { replace: !0 }), removePopupLayerState(h);
10964
10964
  }, [f, A, t, n == null ? void 0 : n.pathname, h]), z = useCallback(
10965
10965
  (w) => {
10966
- const M = y(), B = R({
10966
+ const M = y(), N = R({
10967
10967
  tabKey: w,
10968
10968
  popupUid: m == null ? void 0 : m.popupuid,
10969
10969
  recordData: i == null ? void 0 : i.data,
10970
10970
  sourceId: M
10971
10971
  });
10972
10972
  let k = removeLastPopupPath(n.pathname);
10973
- _.last(k) === "/" && (k = k.slice(0, -1)), t(`${k}${B}`, {
10973
+ _.last(k) === "/" && (k = k.slice(0, -1)), t(`${k}${N}`, {
10974
10974
  replace: !0
10975
10975
  });
10976
10976
  },
10977
10977
  [R, t, m == null ? void 0 : m.popupuid, i == null ? void 0 : i.data, n]
10978
10978
  ), L = useCallback((w, M) => {
10979
10979
  M.__popup = w;
10980
- }, []), $ = useCallback((w) => w.__popup, []);
10980
+ }, []), B = useCallback((w) => w.__popup, []);
10981
10981
  return {
10982
10982
  /**
10983
10983
  * used to open popup by changing the url
@@ -10986,9 +10986,9 @@ ${JSON.stringify(O, null, 2)}`
10986
10986
  /**
10987
10987
  * used to close popup by changing the url
10988
10988
  */
10989
- closePopup: N,
10989
+ closePopup: $,
10990
10990
  savePopupSchemaToSchema: L,
10991
- getPopupSchemaFromSchema: $,
10991
+ getPopupSchemaFromSchema: B,
10992
10992
  context: S,
10993
10993
  /**
10994
10994
  * @deprecated
@@ -12034,24 +12034,24 @@ const breakRemoveOnGrid = (e) => e["x-component"] === "Grid", breakRemoveOnRow =
12034
12034
  if (!r || !S)
12035
12035
  return;
12036
12036
  n.current = T.active.id;
12037
- const D = l.current, N = D.previousElementSibling, z = D.nextElementSibling;
12038
- v([N.clientWidth, z.clientWidth]);
12037
+ const D = l.current, $ = D.previousElementSibling, z = D.nextElementSibling;
12038
+ v([$.clientWidth, z.clientWidth]);
12039
12039
  },
12040
12040
  onDragMove(T) {
12041
12041
  if (!r || !S)
12042
12042
  return;
12043
12043
  n.current === T.active.id && (n.current = n.current + "_move");
12044
- const D = l.current, N = D.previousElementSibling, z = D.nextElementSibling;
12045
- N.style.width = `${y[0] + T.delta.x}px`, z.style.width = `${y[1] - T.delta.x}px`;
12044
+ const D = l.current, $ = D.previousElementSibling, z = D.nextElementSibling;
12045
+ $.style.width = `${y[0] + T.delta.x}px`, z.style.width = `${y[1] - T.delta.x}px`;
12046
12046
  },
12047
12047
  onDragEnd(T) {
12048
12048
  var M;
12049
12049
  if (!r || !n.current || (M = n.current) != null && M.startsWith(T.active.id) && !n.current.endsWith("_move") || y[0] <= 0 || y[1] <= 0 || (v([0, 0]), !h || !g))
12050
12050
  return;
12051
- const D = l.current, N = D.previousElementSibling, z = D.nextElementSibling;
12051
+ const D = l.current, $ = D.previousElementSibling, z = D.nextElementSibling;
12052
12052
  h["x-component-props"] = h["x-component-props"] || {}, g["x-component-props"] = g["x-component-props"] || {};
12053
- const L = D.clientWidth * (e.cols.length + 1) / e.cols.length, $ = (100 * (N.getBoundingClientRect().width + L) / D.parentElement.clientWidth).toFixed(2), w = (100 * (z.getBoundingClientRect().width + L) / D.parentElement.clientWidth).toFixed(2);
12054
- _.set(h, "x-component-props.width", $), _.set(g, "x-component-props.width", w), o.emit("batchPatch", {
12053
+ const L = D.clientWidth * (e.cols.length + 1) / e.cols.length, B = (100 * ($.getBoundingClientRect().width + L) / D.parentElement.clientWidth).toFixed(2), w = (100 * (z.getBoundingClientRect().width + L) / D.parentElement.clientWidth).toFixed(2);
12054
+ _.set(h, "x-component-props.width", B), _.set(g, "x-component-props.width", w), o.emit("batchPatch", {
12055
12055
  schemas: [
12056
12056
  {
12057
12057
  "x-uid": h["x-uid"],
@@ -12362,8 +12362,8 @@ const useTableBlockProps = () => {
12362
12362
  ),
12363
12363
  onChange: useCallback(
12364
12364
  ({ current: S, pageSize: y }, v, F) => {
12365
- var N, z, L, $, w, M, B, k, j, O;
12366
- const A = (L = (z = (N = t.parent) == null ? void 0 : N["x-decorator-props"]) == null ? void 0 : z.params) == null ? void 0 : L.sort, R = F.order ? F.order === "ascend" ? [F.field] : [`-${F.field}`] : A || i.dragSortBy, T = y || ((M = (w = ($ = t.parent) == null ? void 0 : $["x-decorator-props"]) == null ? void 0 : w.params) == null ? void 0 : M.pageSize), D = P(x({}, (j = (k = (B = a.current) == null ? void 0 : B.service) == null ? void 0 : k.params) == null ? void 0 : j[0]), { page: S || 1, pageSize: T });
12365
+ var $, z, L, B, w, M, N, k, j, O;
12366
+ const A = (L = (z = ($ = t.parent) == null ? void 0 : $["x-decorator-props"]) == null ? void 0 : z.params) == null ? void 0 : L.sort, R = F.order ? F.order === "ascend" ? [F.field] : [`-${F.field}`] : A || i.dragSortBy, T = y || ((M = (w = (B = t.parent) == null ? void 0 : B["x-decorator-props"]) == null ? void 0 : w.params) == null ? void 0 : M.pageSize), D = P(x({}, (j = (k = (N = a.current) == null ? void 0 : N.service) == null ? void 0 : k.params) == null ? void 0 : j[0]), { page: S || 1, pageSize: T });
12367
12367
  R && (D.sort = R), (O = a.current) == null || O.service.run(D);
12368
12368
  },
12369
12369
  [t.parent]
@@ -12371,17 +12371,17 @@ const useTableBlockProps = () => {
12371
12371
  onClickRow: useCallback(
12372
12372
  (S, y, v) => {
12373
12373
  const { targets: F, uid: A } = findFilterTargets(t), R = r();
12374
- if (!F || !F.some((D) => R.some((N) => N.uid === D.uid))) {
12374
+ if (!F || !F.some((D) => R.some(($) => $.uid === D.uid))) {
12375
12375
  y((D) => D.length ? [] : D);
12376
12376
  return;
12377
12377
  }
12378
12378
  const T = R.find((D) => D.uid === t.parent["x-uid"]);
12379
12379
  R.forEach((D) => {
12380
- var B, k, j;
12381
- const N = F.find((O) => O.uid === D.uid);
12382
- if (!N)
12380
+ var N, k, j;
12381
+ const $ = F.find((O) => O.uid === D.uid);
12382
+ if (!$)
12383
12383
  return;
12384
- const z = getSourceKey(T, N.field) || i.rowKey || "id", L = [S[z]], $ = ((B = D.service.params) == null ? void 0 : B[0]) || {}, w = ((j = (k = D.service.params) == null ? void 0 : k[1]) == null ? void 0 : j.filters) || {};
12384
+ const z = getSourceKey(T, $.field) || i.rowKey || "id", L = [S[z]], B = ((N = D.service.params) == null ? void 0 : N[0]) || {}, w = ((j = (k = D.service.params) == null ? void 0 : k[1]) == null ? void 0 : j.filters) || {};
12385
12385
  if (v.includes(S[i.rowKey])) {
12386
12386
  if (D.dataLoadingMode === "manual")
12387
12387
  return D.clearData();
@@ -12390,8 +12390,8 @@ const useTableBlockProps = () => {
12390
12390
  w[A] = {
12391
12391
  $and: [
12392
12392
  {
12393
- [N.field || i.rowKey]: {
12394
- [N.field ? "$in" : "$eq"]: L
12393
+ [$.field || i.rowKey]: {
12394
+ [$.field ? "$in" : "$eq"]: L
12395
12395
  }
12396
12396
  }
12397
12397
  ]
@@ -12401,7 +12401,7 @@ const useTableBlockProps = () => {
12401
12401
  D.defaultFilter
12402
12402
  ]);
12403
12403
  return D.doFilter(
12404
- P(x({}, $), {
12404
+ P(x({}, B), {
12405
12405
  page: 1,
12406
12406
  filter: M
12407
12407
  }),
@@ -12768,10 +12768,10 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
12768
12768
  var a, l, c, u, d, p, m, h, g, f, C, b, S, y, v, F;
12769
12769
  const e = useField(), t = useTableSelectorContext(), n = useFieldSchema(), { getCollectionJoinField: o } = useCollectionManager_deprecated(), r = recursiveParent$1(n, "CollectionField"), i = o(r == null ? void 0 : r["x-collection-field"]);
12770
12770
  return useEffect(() => {
12771
- var R, T, D, N, z, L, $, w, M, B, k, j, O;
12771
+ var R, T, D, $, z, L, B, w, M, N, k, j, O;
12772
12772
  if (!((R = t == null ? void 0 : t.service) != null && R.loading)) {
12773
12773
  const q = (D = (T = t == null ? void 0 : t.service) == null ? void 0 : T.data) == null ? void 0 : D.data.map((E) => E);
12774
- e.value = q, (N = e == null ? void 0 : e.setInitialValue) == null || N.call(e, q), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = ($ = (L = (z = t == null ? void 0 : t.service) == null ? void 0 : z.data) == null ? void 0 : L.meta) == null ? void 0 : $.pageSize, e.componentProps.pagination.total = (B = (M = (w = t == null ? void 0 : t.service) == null ? void 0 : w.data) == null ? void 0 : M.meta) == null ? void 0 : B.count, e.componentProps.pagination.current = (O = (j = (k = t == null ? void 0 : t.service) == null ? void 0 : k.data) == null ? void 0 : j.meta) == null ? void 0 : O.page;
12774
+ e.value = q, ($ = e == null ? void 0 : e.setInitialValue) == null || $.call(e, q), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (B = (L = (z = t == null ? void 0 : t.service) == null ? void 0 : z.data) == null ? void 0 : L.meta) == null ? void 0 : B.pageSize, e.componentProps.pagination.total = (N = (M = (w = t == null ? void 0 : t.service) == null ? void 0 : w.data) == null ? void 0 : M.meta) == null ? void 0 : N.count, e.componentProps.pagination.current = (O = (j = (k = t == null ? void 0 : t.service) == null ? void 0 : k.data) == null ? void 0 : j.meta) == null ? void 0 : O.page;
12775
12775
  }
12776
12776
  }, [
12777
12777
  i == null ? void 0 : i.foreignKey,
@@ -13542,8 +13542,8 @@ const useFormItemInitializerFields = (e) => {
13542
13542
  Component: "CollectionFieldInitializer",
13543
13543
  remove: removeGridFormItem,
13544
13544
  schemaInitialize: (D) => {
13545
- var N;
13546
- (N = h == null ? void 0 : h.schemaInitialize) == null || N.call(h, D, {
13545
+ var $;
13546
+ ($ = h == null ? void 0 : h.schemaInitialize) == null || $.call(h, D, {
13547
13547
  field: m,
13548
13548
  block: l,
13549
13549
  readPretty: a,
@@ -13553,9 +13553,9 @@ const useFormItemInitializerFields = (e) => {
13553
13553
  },
13554
13554
  schema: S
13555
13555
  };
13556
- return l == "Kanban" && (y.find = (D, N, z) => {
13556
+ return l == "Kanban" && (y.find = (D, $, z) => {
13557
13557
  const L = findSchema(D, "x-component", l);
13558
- return findSchema(L, N, z);
13558
+ return findSchema(L, $, z);
13559
13559
  }), y;
13560
13560
  });
13561
13561
  }, useFilterFormItemInitializerFields = (e) => {
@@ -13918,8 +13918,8 @@ const useFormItemInitializerFields = (e) => {
13918
13918
  t: h,
13919
13919
  componentNamePrefix: m
13920
13920
  }).sort((D) => {
13921
- const N = _.toArray((C == null ? void 0 : C.inherits) || []);
13922
- if (D.name === (C == null ? void 0 : C.name) || N.some((z) => z === D.name))
13921
+ const $ = _.toArray((C == null ? void 0 : C.inherits) || []);
13922
+ if (D.name === (C == null ? void 0 : C.name) || $.some((z) => z === D.name))
13923
13923
  return -1;
13924
13924
  })
13925
13925
  ]
@@ -13981,33 +13981,33 @@ const useFormItemInitializerFields = (e) => {
13981
13981
  hideChildrenIfSingleCollection: !1,
13982
13982
  fromOthersInPopup: !0,
13983
13983
  componentType: T[t] || t,
13984
- filter({ collection: $, associationField: w }) {
13985
- return u ? u($) : !0;
13984
+ filter({ collection: B, associationField: w }) {
13985
+ return u ? u(B) : !0;
13986
13986
  },
13987
- onClick($) {
13988
- c(P(x({}, $), { fromOthersInPopup: !0 }));
13987
+ onClick(B) {
13988
+ c(P(x({}, B), { fromOthersInPopup: !0 }));
13989
13989
  }
13990
13990
  })
13991
13991
  };
13992
- let N;
13992
+ let $;
13993
13993
  const z = b.length ? R : null;
13994
13994
  if (F[0].children.length && b.length)
13995
- l ? N = [A, z] : N = [A, z, D];
13995
+ l ? $ = [A, z] : $ = [A, z, D];
13996
13996
  else if (F[0].children.length)
13997
13997
  if (l) {
13998
13998
  if (F[0].children.length <= 1)
13999
13999
  return F[0].children = ((L = F[0].children[0]) == null ? void 0 : L.children) || [], F;
14000
- N = [A];
14000
+ $ = [A];
14001
14001
  } else
14002
- N = [A, D];
14002
+ $ = [A, D];
14003
14003
  else
14004
- l ? N = [z] : N = [z, D];
14004
+ l ? $ = [z] : $ = [z, D];
14005
14005
  return [
14006
14006
  {
14007
14007
  name: "records",
14008
14008
  label: h("Records"),
14009
14009
  type: "subMenu",
14010
- children: N.filter(Boolean)
14010
+ children: $.filter(Boolean)
14011
14011
  }
14012
14012
  ];
14013
14013
  }, [
@@ -14722,7 +14722,7 @@ const useGetAriaLabelOfDesigner = () => {
14722
14722
  display: block !important;
14723
14723
  }
14724
14724
  `, GeneralSchemaDesigner = (e) => {
14725
- var N, z;
14725
+ var $, z;
14726
14726
  const t = useFieldSchema(), {
14727
14727
  disableInitializer: n,
14728
14728
  title: o,
@@ -14743,16 +14743,16 @@ const useGetAriaLabelOfDesigner = () => {
14743
14743
  return {
14744
14744
  insertPosition: "afterEnd",
14745
14745
  wrap: ((L = S == null ? void 0 : S.cols) == null ? void 0 : L.length) > 1 ? void 0 : gridRowColWrap,
14746
- Component: ($) => /* @__PURE__ */ jsx(
14746
+ Component: (B) => /* @__PURE__ */ jsx(
14747
14747
  PlusOutlined,
14748
- P(x({}, $), {
14748
+ P(x({}, B), {
14749
14749
  role: "button",
14750
14750
  "aria-label": g("schema-initializer"),
14751
14751
  style: { cursor: "pointer", fontSize: 14 }
14752
14752
  })
14753
14753
  )
14754
14754
  };
14755
- }, [g, (N = S == null ? void 0 : S.cols) == null ? void 0 : N.length]);
14755
+ }, [g, ($ = S == null ? void 0 : S.cols) == null ? void 0 : $.length]);
14756
14756
  return d ? /* @__PURE__ */ jsx(SchemaToolbarProvider, P(x({}, a), { children: /* @__PURE__ */ jsxs("div", { className: cls("general-schema-designer", overrideAntdCSS), children: [
14757
14757
  o && /* @__PURE__ */ jsx("div", { className: cls("general-schema-designer-title", titleCss), children: /* @__PURE__ */ jsxs(Space$1, { size: 2, children: [
14758
14758
  /* @__PURE__ */ jsx("span", { className: "title-tag", children: c && R ? `${h(R == null ? void 0 : R.displayName)} > ${h(o)}` : h(o) }),
@@ -14806,13 +14806,13 @@ const useGetAriaLabelOfDesigner = () => {
14806
14806
  if (Array.isArray(n))
14807
14807
  return g(n);
14808
14808
  }
14809
- }, [n]), { render: N, exists: z } = useSchemaSettingsRender(
14809
+ }, [n]), { render: $, exists: z } = useSchemaSettingsRender(
14810
14810
  r || (t == null ? void 0 : t["x-settings"]),
14811
14811
  t == null ? void 0 : t["x-settings-props"]
14812
- ), { render: L, exists: $ } = useSchemaInitializerRender(
14812
+ ), { render: L, exists: B } = useSchemaInitializerRender(
14813
14813
  o || (t == null ? void 0 : t["x-initializer"]),
14814
14814
  t == null ? void 0 : t["x-initializer-props"]
14815
- ), w = useGridRowContext(), M = useGridContext(), B = useMemo(() => {
14815
+ ), w = useGridRowContext(), M = useGridContext(), N = useMemo(() => {
14816
14816
  var H;
14817
14817
  return {
14818
14818
  insertPosition: "afterEnd",
@@ -14830,11 +14830,11 @@ const useGetAriaLabelOfDesigner = () => {
14830
14830
  var H;
14831
14831
  if (o === !1)
14832
14832
  return null;
14833
- if ($)
14834
- return L(B);
14833
+ if (B)
14834
+ return L(N);
14835
14835
  if (M != null && M.InitializerComponent || M != null && M.renderSchemaInitializer)
14836
- return M != null && M.InitializerComponent ? /* @__PURE__ */ jsx(M.InitializerComponent, x({}, B)) : (H = M.renderSchemaInitializer) == null ? void 0 : H.call(M, B);
14837
- }, [M, o, B, $, L]), O = useMemo(() => r !== !1 && z ? N() : null, [z, N, r]), q = useRef(null), E = "hidden";
14836
+ return M != null && M.InitializerComponent ? /* @__PURE__ */ jsx(M.InitializerComponent, x({}, N)) : (H = M.renderSchemaInitializer) == null ? void 0 : H.call(M, N);
14837
+ }, [M, o, N, B, L]), O = useMemo(() => r !== !1 && z ? $() : null, [z, $, r]), q = useRef(null), E = "hidden";
14838
14838
  useEffect(() => {
14839
14839
  const H = q.current;
14840
14840
  let W = H == null ? void 0 : H.parentElement;
@@ -16318,21 +16318,21 @@ const ActionLink = withDynamicSchemaProps(
16318
16318
  "onMouseEnter",
16319
16319
  "refreshDataBlockRequest",
16320
16320
  "confirmTitle"
16321
- ]), v = useDesigner(), F = useField(), A = useFieldSchema(), R = useCompile(), T = useCollectionRecordData(), D = R((U = A["x-component-props"]) == null ? void 0 : U.confirm) || g, N = useMemo(() => (A == null ? void 0 : A["x-linkage-rules"]) || [], [A == null ? void 0 : A["x-linkage-rules"]]), { designable: z } = useDesignable(), L = useComponent(o) || o, $ = useVariables$1(), w = useLocalVariables$1({ currentForm: { values: T, readPretty: !1 } }), { visibleWithURL: M, setVisibleWithURL: B } = usePopupUtils(), { setSubmitted: k } = useActionContext(), { getAriaLabel: j } = useGetAriaLabelOfAction(l), O = useCollectionParentRecordData();
16321
+ ]), v = useDesigner(), F = useField(), A = useFieldSchema(), R = useCompile(), T = useCollectionRecordData(), D = R((U = A["x-component-props"]) == null ? void 0 : U.confirm) || g, $ = useMemo(() => (A == null ? void 0 : A["x-linkage-rules"]) || [], [A == null ? void 0 : A["x-linkage-rules"]]), { designable: z } = useDesignable(), L = useComponent(o) || o, B = useVariables$1(), w = useLocalVariables$1({ currentForm: { values: T, readPretty: !1 } }), { visibleWithURL: M, setVisibleWithURL: N } = usePopupUtils(), { setSubmitted: k } = useActionContext(), { getAriaLabel: j } = useGetAriaLabelOfAction(l), O = useCollectionParentRecordData();
16322
16322
  useEffect(() => {
16323
- F.stateOfLinkageRules && setInitialActionState(F), F.stateOfLinkageRules = {}, N.filter((G) => !G.disabled).forEach((G) => {
16323
+ F.stateOfLinkageRules && setInitialActionState(F), F.stateOfLinkageRules = {}, $.filter((G) => !G.disabled).forEach((G) => {
16324
16324
  var H;
16325
16325
  (H = G.actions) == null || H.forEach((W) => {
16326
16326
  linkageAction({
16327
16327
  operator: W.operator,
16328
16328
  field: F,
16329
16329
  condition: G.condition,
16330
- variables: $,
16330
+ variables: B,
16331
16331
  localVariables: w
16332
16332
  });
16333
16333
  });
16334
16334
  });
16335
- }, [F, N, w, $]);
16335
+ }, [F, $, w, B]);
16336
16336
  const q = useCallback(
16337
16337
  (G) => {
16338
16338
  C == null || C(G);
@@ -16364,7 +16364,7 @@ const ActionLink = withDynamicSchemaProps(
16364
16364
  propsDisabled: m,
16365
16365
  useAction: r,
16366
16366
  visibleWithURL: M,
16367
- setVisibleWithURL: B,
16367
+ setVisibleWithURL: N,
16368
16368
  setSubmitted: k,
16369
16369
  getAriaLabel: j,
16370
16370
  parentRecordData: O,
@@ -16400,10 +16400,10 @@ const ActionLink = withDynamicSchemaProps(
16400
16400
  actionCallback: R,
16401
16401
  visibleWithURL: T,
16402
16402
  setVisibleWithURL: D,
16403
- setSubmitted: N,
16403
+ setSubmitted: $,
16404
16404
  getAriaLabel: z,
16405
16405
  parentRecordData: L
16406
- } = xe, $ = K(xe, [
16406
+ } = xe, B = K(xe, [
16407
16407
  "containerRefKey",
16408
16408
  "fieldSchema",
16409
16409
  "designable",
@@ -16431,7 +16431,7 @@ const ActionLink = withDynamicSchemaProps(
16431
16431
  "setSubmitted",
16432
16432
  "getAriaLabel",
16433
16433
  "parentRecordData"
16434
- ]), [w, M] = useState(!1), { wrapSSR: B, componentCls: k, hashId: j } = useStyles$e(), [O, q] = 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(), X = useForm(), Y = useACLActionParamsContext(), { run: J, element: Q, disabled: ee } = (A == null ? void 0 : A(R)) || {}, oe = X.disabled || i.disabled || ((he = i.data) == null ? void 0 : he.disabled) || F || ee, te = useMemo(() => {
16434
+ ]), [w, M] = useState(!1), { wrapSSR: N, componentCls: k, hashId: j } = useStyles$e(), [O, q] = 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(), X = useForm(), Y = useACLActionParamsContext(), { run: J, element: Q, disabled: ee } = (A == null ? void 0 : A(R)) || {}, oe = X.disabled || i.disabled || ((he = i.data) == null ? void 0 : he.disabled) || F || ee, te = useMemo(() => {
16435
16435
  var ce;
16436
16436
  return P(x({}, v), {
16437
16437
  opacity: r && (((ce = i == null ? void 0 : i.data) == null ? void 0 : ce.hidden) || !Y) && 0.1,
@@ -16451,7 +16451,7 @@ const ActionLink = withDynamicSchemaProps(
16451
16451
  componentCls: k,
16452
16452
  hashId: j,
16453
16453
  className: d,
16454
- others: $,
16454
+ others: B,
16455
16455
  getAriaLabel: z,
16456
16456
  type: p,
16457
16457
  Designer: m,
@@ -16462,7 +16462,7 @@ const ActionLink = withDynamicSchemaProps(
16462
16462
  run: J,
16463
16463
  confirm: g,
16464
16464
  modal: W,
16465
- setSubmitted: N,
16465
+ setSubmitted: $,
16466
16466
  confirmTitle: f,
16467
16467
  title: y
16468
16468
  }, ae = useCallback(
@@ -16483,7 +16483,7 @@ const ActionLink = withDynamicSchemaProps(
16483
16483
  openSize: G,
16484
16484
  containerRefKey: n,
16485
16485
  fieldSchema: o,
16486
- setSubmitted: N,
16486
+ setSubmitted: $,
16487
16487
  children: [
16488
16488
  C && /* @__PURE__ */ jsx(NocoBaseRecursionField, { basePath: i.address, onlyRenderProperties: !0, schema: o }),
16489
16489
  !C && /* @__PURE__ */ jsx(RenderButton, x({}, ie)),
@@ -16492,7 +16492,7 @@ const ActionLink = withDynamicSchemaProps(
16492
16492
  ]
16493
16493
  }
16494
16494
  ) });
16495
- return isBulkEditAction(o) && (ue = /* @__PURE__ */ jsx(TabsContextProvider, { children: ue })), B(
16495
+ return isBulkEditAction(o) && (ue = /* @__PURE__ */ jsx(TabsContextProvider, { children: ue })), N(
16496
16496
  b ? /* @__PURE__ */ jsx(RecordProvider, { record: null, parent: L, children: /* @__PURE__ */ jsx(TreeRecordProvider, { parent: S, children: ue }) }) : ue
16497
16497
  );
16498
16498
  });
@@ -16562,22 +16562,22 @@ const RenderButton = ({
16562
16562
  modal: R,
16563
16563
  setSubmitted: T,
16564
16564
  confirmTitle: D,
16565
- title: N
16565
+ title: $
16566
16566
  }) => {
16567
- const { getDataBlockRequest: z } = useDataBlockRequestGetter(), { t: L } = useTranslation(), { isPopupVisibleControlledByURL: $ } = usePopupSettings(), { openPopup: w } = usePopupUtils(), M = useRef(null);
16567
+ const { getDataBlockRequest: z } = useDataBlockRequestGetter(), { t: L } = useTranslation(), { isPopupVisibleControlledByURL: B } = usePopupSettings(), { openPopup: w } = usePopupUtils(), M = useRef(null);
16568
16568
  M.current = w;
16569
- const B = useCallback(
16569
+ const N = useCallback(
16570
16570
  (k, j = !0) => {
16571
16571
  if (!(j && isPortalInBody(k.target)) && (k.preventDefault(), k.stopPropagation(), !i && n)) {
16572
16572
  const O = () => {
16573
16573
  b ? b(k, () => {
16574
16574
  var q, E;
16575
16575
  S !== !1 && (T == null || T(!0), (E = (q = z()) == null ? void 0 : q.refresh) == null || E.call(q));
16576
- }) : isBulkEditAction(y) || !$() ? (v(!0), F == null || F()) : ["view", "update", "create", "customize:popup"].includes(y["x-action"]) && y["x-uid"] ? M.current() : (v(!0), F == null || F());
16576
+ }) : isBulkEditAction(y) || !B() ? (v(!0), F == null || F()) : ["view", "update", "create", "customize:popup"].includes(y["x-action"]) && y["x-uid"] ? M.current() : (v(!0), F == null || F());
16577
16577
  };
16578
16578
  (A == null ? void 0 : A.enable) !== !1 && (A != null && A.content) ? R.confirm({
16579
- title: L(A.title, { title: D || N || (t == null ? void 0 : t.title) }),
16580
- content: L(A.content, { title: D || N || (t == null ? void 0 : t.title) }),
16579
+ title: L(A.title, { title: D || $ || (t == null ? void 0 : t.title) }),
16580
+ content: L(A.content, { title: D || $ || (t == null ? void 0 : t.title) }),
16581
16581
  onOk: O
16582
16582
  }) : O();
16583
16583
  }
@@ -16591,7 +16591,7 @@ const RenderButton = ({
16591
16591
  i,
16592
16592
  t,
16593
16593
  y,
16594
- $,
16594
+ B,
16595
16595
  R,
16596
16596
  b,
16597
16597
  S,
@@ -16599,7 +16599,7 @@ const RenderButton = ({
16599
16599
  T,
16600
16600
  v,
16601
16601
  L,
16602
- N,
16602
+ $,
16603
16603
  z
16604
16604
  ]
16605
16605
  );
@@ -16615,7 +16615,7 @@ const RenderButton = ({
16615
16615
  buttonStyle: a,
16616
16616
  handleMouseEnter: l,
16617
16617
  getAriaLabel: g,
16618
- handleButtonClick: B,
16618
+ handleButtonClick: N,
16619
16619
  tarComponent: c,
16620
16620
  componentCls: d,
16621
16621
  hashId: p,
@@ -16623,7 +16623,7 @@ const RenderButton = ({
16623
16623
  type: f,
16624
16624
  Designer: C,
16625
16625
  designerProps: u,
16626
- title: N
16626
+ title: $
16627
16627
  }, h)
16628
16628
  );
16629
16629
  };
@@ -17732,7 +17732,7 @@ https://requirejs.org/docs/errors.html#` + e);
17732
17732
  };
17733
17733
  }
17734
17734
  };
17735
- function N(k) {
17735
+ function $(k) {
17736
17736
  delete l[k], delete c[k];
17737
17737
  }
17738
17738
  function z(k, j, O) {
@@ -17823,7 +17823,7 @@ https://requirejs.org/docs/errors.html#` + e);
17823
17823
  G.push(H.normalizedMap || H);
17824
17824
  }), req.onResourceLoad(o, this.map, G);
17825
17825
  }
17826
- N(O), this.defined = !0;
17826
+ $(O), this.defined = !0;
17827
17827
  }
17828
17828
  this.defining = !1, this.defined && !this.defineEmitted && (this.defineEmitted = !0, this.emit("defined", this.exports), this.defineEmitComplete = !0);
17829
17829
  }
@@ -17870,7 +17870,7 @@ https://requirejs.org/docs/errors.html#` + e);
17870
17870
  });
17871
17871
  }), E.error = bind(this, function(J) {
17872
17872
  this.inited = !0, this.error = J, J.requireModules = [j], eachProp(l, function(Q) {
17873
- Q.map.id.indexOf(j + "_unnormalized") === 0 && N(Q.map.id);
17873
+ Q.map.id.indexOf(j + "_unnormalized") === 0 && $(Q.map.id);
17874
17874
  }), T(J);
17875
17875
  }), E.fromText = bind(this, function(J, Q) {
17876
17876
  var ee = k.name, oe = F(ee), te = useInteractive;
@@ -17924,7 +17924,7 @@ https://requirejs.org/docs/errors.html#` + e);
17924
17924
  }), k === "error" && delete this.events[k];
17925
17925
  }
17926
17926
  };
17927
- function $(k) {
17927
+ function B(k) {
17928
17928
  hasProp(p, k[0]) || A(F(k[0], null, !0)).init(k[1], k[2]);
17929
17929
  }
17930
17930
  function w(k, j, O, q) {
@@ -17937,12 +17937,12 @@ https://requirejs.org/docs/errors.html#` + e);
17937
17937
  id: j && j.getAttribute("data-requiremodule")
17938
17938
  };
17939
17939
  }
17940
- function B() {
17940
+ function N() {
17941
17941
  var k;
17942
17942
  for (D(); d.length; ) {
17943
17943
  if (k = d.shift(), k[0] === null)
17944
17944
  return T(makeError("mismatch", "Mismatched anonymous define() module: " + k[k.length - 1]));
17945
- $(k);
17945
+ B(k);
17946
17946
  }
17947
17947
  o.defQueueMap = {};
17948
17948
  }
@@ -18003,8 +18003,8 @@ https://requirejs.org/docs/errors.html#` + e);
18003
18003
  j = j || {};
18004
18004
  function O(q, E, U) {
18005
18005
  var G, H, W;
18006
- return j.enableBuildCallback && E && isFunction(E) && (E.__requireJsBuild = !0), typeof q == "string" ? isFunction(E) ? T(makeError("requireargs", "Invalid require call"), U) : k && hasProp(r, q) ? r[q](l[k.id]) : req.get ? req.get(o, q, k, O) : (H = F(q, k, !1, !0), G = H.id, hasProp(p, G) ? p[G] : T(makeError("notloaded", 'Module name "' + G + '" has not been loaded yet for context: ' + e + (k ? "" : ". Use require([])")))) : (B(), o.nextTick(function() {
18007
- B(), W = A(F(null, k)), W.skipMap = j.skipMap, W.init(q, E, U, {
18006
+ return j.enableBuildCallback && E && isFunction(E) && (E.__requireJsBuild = !0), typeof q == "string" ? isFunction(E) ? T(makeError("requireargs", "Invalid require call"), U) : k && hasProp(r, q) ? r[q](l[k.id]) : req.get ? req.get(o, q, k, O) : (H = F(q, k, !1, !0), G = H.id, hasProp(p, G) ? p[G] : T(makeError("notloaded", 'Module name "' + G + '" has not been loaded yet for context: ' + e + (k ? "" : ". Use require([])")))) : (N(), o.nextTick(function() {
18007
+ N(), W = A(F(null, k)), W.skipMap = j.skipMap, W.init(q, E, U, {
18008
18008
  enabled: !0
18009
18009
  }), L();
18010
18010
  }), O);
@@ -18035,7 +18035,7 @@ https://requirejs.org/docs/errors.html#` + e);
18035
18035
  var E = F(q, k, !0), U = getOwn(l, q);
18036
18036
  U.undefed = !0, S(q), delete p[q], delete m[E.url], delete u[q], eachReverse(d, function(G, H) {
18037
18037
  G[0] === q && d.splice(H, 1);
18038
- }), delete o.defQueueMap[q], U && (U.events.defined && (u[q] = U.events), N(q));
18038
+ }), delete o.defQueueMap[q], U && (U.events.defined && (u[q] = U.events), $(q));
18039
18039
  }), O;
18040
18040
  },
18041
18041
  /**
@@ -18063,7 +18063,7 @@ https://requirejs.org/docs/errors.html#` + e);
18063
18063
  j = !0;
18064
18064
  } else
18065
18065
  O[0] === k && (j = !0);
18066
- $(O);
18066
+ B(O);
18067
18067
  }
18068
18068
  if (o.defQueueMap = {}, q = getOwn(l, k), !j && !hasProp(p, k) && q && !q.inited) {
18069
18069
  if (a.enforceDefine && (!U || !getGlobal(U)))
@@ -18073,7 +18073,7 @@ https://requirejs.org/docs/errors.html#` + e);
18073
18073
  null,
18074
18074
  [k]
18075
18075
  ));
18076
- $([k, E.deps || [], E.exportsFn]);
18076
+ B([k, E.deps || [], E.exportsFn]);
18077
18077
  }
18078
18078
  L();
18079
18079
  },
@@ -18632,12 +18632,12 @@ const useCollectionManager_deprecated = (e) => {
18632
18632
  const t = useDataSourceManager(), n = useDataSource(), o = useCollectionManager(), r = e || (n == null ? void 0 : n.key) || void 0, [i, a] = useState(uid()), { refresh: l } = useSchemaComponentContext(), c = useMemo(
18633
18633
  () => {
18634
18634
  var w;
18635
- return (w = t == null ? void 0 : t.collectionFieldInterfaceManager) == null ? void 0 : w.getFieldInterfaces().reduce((M, B) => (M[B.name] = B, M), {});
18635
+ return (w = t == null ? void 0 : t.collectionFieldInterfaceManager) == null ? void 0 : w.getFieldInterfaces().reduce((M, N) => (M[N.name] = N, M), {});
18636
18636
  },
18637
18637
  [t, i]
18638
18638
  ), u = useMemo(() => t == null ? void 0 : t.collectionTemplateManager.getCollectionTemplates(), [t, i]), d = useCallback(() => {
18639
18639
  var w, M;
18640
- return (M = (w = t == null ? void 0 : t.getDataSource(r)) == null ? void 0 : w.collectionManager) == null ? void 0 : M.getCollections().map((B) => B.getOptions());
18640
+ return (M = (w = t == null ? void 0 : t.getDataSource(r)) == null ? void 0 : w.collectionManager) == null ? void 0 : M.getCollections().map((N) => N.getOptions());
18641
18641
  }, [t, n]), p = useCallback(
18642
18642
  (w) => {
18643
18643
  var M;
@@ -18662,8 +18662,8 @@ const useCollectionManager_deprecated = (e) => {
18662
18662
  [t]
18663
18663
  ), f = useCompile(), C = useCallback(
18664
18664
  (w, M) => {
18665
- var B, k;
18666
- return ((k = (B = p(M)) == null ? void 0 : B.getCollection(w)) == null ? void 0 : k.getInheritedFields()) || [];
18665
+ var N, k;
18666
+ return ((k = (N = p(M)) == null ? void 0 : N.getCollection(w)) == null ? void 0 : k.getInheritedFields()) || [];
18667
18667
  },
18668
18668
  [t, p]
18669
18669
  ), b = useCallback(
@@ -18671,40 +18671,40 @@ const useCollectionManager_deprecated = (e) => {
18671
18671
  var k, j;
18672
18672
  if (!w)
18673
18673
  return [];
18674
- const B = (k = p(M)) == null ? void 0 : k.getCollection(w);
18675
- return ((j = B == null ? void 0 : B.getAllFields) == null ? void 0 : j.call(B)) || (B == null ? void 0 : B.getFields()) || [];
18674
+ const N = (k = p(M)) == null ? void 0 : k.getCollection(w);
18675
+ return ((j = N == null ? void 0 : N.getAllFields) == null ? void 0 : j.call(N)) || (N == null ? void 0 : N.getFields()) || [];
18676
18676
  },
18677
18677
  [t, p]
18678
18678
  ), S = useCallback(
18679
18679
  (w, M) => {
18680
- var B;
18680
+ var N;
18681
18681
  if (!(!w || w.split(".").length < 2))
18682
- return (B = p(M)) == null ? void 0 : B.getCollectionField(w);
18682
+ return (N = p(M)) == null ? void 0 : N.getCollectionField(w);
18683
18683
  },
18684
18684
  [t, p]
18685
18685
  ), y = useCallback(
18686
18686
  (w, M) => {
18687
- var B, k;
18688
- return w ? ((k = (B = p(M)) == null ? void 0 : B.getCollection(w)) == null ? void 0 : k.getParentCollectionsName()) || [] : [];
18687
+ var N, k;
18688
+ return w ? ((k = (N = p(M)) == null ? void 0 : N.getCollection(w)) == null ? void 0 : k.getParentCollectionsName()) || [] : [];
18689
18689
  },
18690
18690
  [t, p]
18691
18691
  ), v = useCallback(
18692
- (w, M = !1, B) => {
18692
+ (w, M = !1, N) => {
18693
18693
  var O;
18694
18694
  if (!w)
18695
18695
  return [];
18696
- const k = (O = p(B)) == null ? void 0 : O.getCollection(w);
18696
+ const k = (O = p(N)) == null ? void 0 : O.getCollection(w);
18697
18697
  return (k == null ? void 0 : k.getChildrenCollections(M)) || [];
18698
18698
  },
18699
18699
  [t, p]
18700
18700
  ), F = useCallback(
18701
18701
  (w, M) => {
18702
- var B, k;
18703
- return w ? ((k = (B = p(M)) == null ? void 0 : B.getCollection(w)) == null ? void 0 : k.getCurrentFields()) || [] : [];
18702
+ var N, k;
18703
+ return w ? ((k = (N = p(M)) == null ? void 0 : N.getCollection(w)) == null ? void 0 : k.getCurrentFields()) || [] : [];
18704
18704
  },
18705
18705
  [t, p]
18706
18706
  ), A = useCallback(
18707
- (w, M = "string", B) => {
18707
+ (w, M = "string", N) => {
18708
18708
  var J;
18709
18709
  const {
18710
18710
  association: k = !1,
@@ -18716,7 +18716,7 @@ const useCollectionManager_deprecated = (e) => {
18716
18716
  prefixFieldValue: G = "",
18717
18717
  usePrefix: H = !1,
18718
18718
  dataSource: W
18719
- } = B || {};
18719
+ } = N || {};
18720
18720
  if (O.length - 1 > q)
18721
18721
  return;
18722
18722
  if (j[w])
@@ -18730,7 +18730,7 @@ const useCollectionManager_deprecated = (e) => {
18730
18730
  value: H && G ? `${G}.${Q.name}` : Q.name,
18731
18731
  label: f((oe = Q == null ? void 0 : Q.uiSchema) == null ? void 0 : oe.title) || Q.name
18732
18732
  }, Q);
18733
- return k && Q.target && (ee.children = O.includes(Q.target) ? [] : A(Q.target, M, P(x({}, B), {
18733
+ return k && Q.target && (ee.children = O.includes(Q.target) ? [] : A(Q.target, M, P(x({}, N), {
18734
18734
  cached: j,
18735
18735
  dataSource: W,
18736
18736
  collectionNames: [...O, Q.target],
@@ -18743,38 +18743,38 @@ const useCollectionManager_deprecated = (e) => {
18743
18743
  [b]
18744
18744
  ), R = useCallback(
18745
18745
  (w, M) => {
18746
- var B;
18747
- return (B = p(M)) == null ? void 0 : B.getCollection(w);
18746
+ var N;
18747
+ return (N = p(M)) == null ? void 0 : N.getCollection(w);
18748
18748
  },
18749
18749
  [t, p]
18750
18750
  ), T = useCallback(
18751
18751
  (w, M) => {
18752
- var B, k;
18753
- return (k = (B = p(M)) == null ? void 0 : B.getCollection(w)) == null ? void 0 : k.getAllCollectionsInheritChain();
18752
+ var N, k;
18753
+ return (k = (N = p(M)) == null ? void 0 : N.getCollection(w)) == null ? void 0 : k.getAllCollectionsInheritChain();
18754
18754
  },
18755
18755
  [t, p]
18756
18756
  ), D = useCallback(
18757
18757
  (w, M) => () => {
18758
- var B, k;
18759
- return (k = (B = p(M)) == null ? void 0 : B.getCollection(w)) == null ? void 0 : k.getInheritCollectionsChain();
18758
+ var N, k;
18759
+ return (k = (N = p(M)) == null ? void 0 : N.getCollection(w)) == null ? void 0 : k.getInheritCollectionsChain();
18760
18760
  },
18761
18761
  [t, p]
18762
- ), N = useCallback(
18762
+ ), $ = useCallback(
18763
18763
  (w) => t == null ? void 0 : t.collectionFieldInterfaceManager.getFieldInterface(w),
18764
18764
  [t]
18765
18765
  ), z = useCallback(
18766
18766
  (w) => {
18767
18767
  var M;
18768
- return (M = N(w.interface)) == null ? void 0 : M.titleUsable;
18768
+ return (M = $(w.interface)) == null ? void 0 : M.titleUsable;
18769
18769
  },
18770
- [N]
18770
+ [$]
18771
18771
  ), L = useCallback(
18772
- (w, M, B) => {
18772
+ (w, M, N) => {
18773
18773
  var k, j;
18774
- return (j = (k = p(B)) == null ? void 0 : k.getCollection(M)) == null ? void 0 : j.getParentCollectionFields(w);
18774
+ return (j = (k = p(N)) == null ? void 0 : k.getCollection(M)) == null ? void 0 : j.getParentCollectionFields(w);
18775
18775
  },
18776
18776
  [t, p]
18777
- ), $ = useCallback(
18777
+ ), B = useCallback(
18778
18778
  (w = "general") => t == null ? void 0 : t.collectionTemplateManager.getCollectionTemplate(w),
18779
18779
  [t]
18780
18780
  );
@@ -18783,8 +18783,8 @@ const useCollectionManager_deprecated = (e) => {
18783
18783
  interfaces: c,
18784
18784
  collections: m,
18785
18785
  templates: u,
18786
- getTemplate: $,
18787
- getInterface: N,
18786
+ getTemplate: B,
18787
+ getInterface: $,
18788
18788
  getCollections: d,
18789
18789
  getParentCollectionFields: L,
18790
18790
  getInheritCollections: y,
@@ -19081,7 +19081,7 @@ const BaseVariableContext = React.createContext(null), BaseVariableProvider = (e
19081
19081
  isDisabled: f || isDisabledDefault,
19082
19082
  getCollectionField: C.getCollectionField,
19083
19083
  deprecated: p
19084
- }) || []).sort((D, N) => D.isLeaf && !N.isLeaf ? -1 : !D.isLeaf && N.isLeaf ? 1 : 0).sort((D, N) => D.disabled && !N.disabled ? 1 : !D.disabled && N.disabled ? -1 : 0);
19084
+ }) || []).sort((D, $) => D.isLeaf && !$.isLeaf ? -1 : !D.isLeaf && $.isLeaf ? 1 : 0).sort((D, $) => D.disabled && !$.disabled ? 1 : !D.disabled && $.disabled ? -1 : 0);
19085
19085
  if (T.length === 0) {
19086
19086
  y.disabled = !0, y.isLeaf = !0, A();
19087
19087
  return;
@@ -19244,12 +19244,42 @@ const DatePickerContext = React.createContext({ utc: !0 }), useDatePickerContext
19244
19244
  mapProps(mapRangePicker()),
19245
19245
  mapReadPretty(ReadPretty$d.DateRangePicker)
19246
19246
  ), DatePicker = (e) => {
19247
- const { utc: t = !0 } = useDatePickerContext(), n = Array.isArray(e.value) ? e.value[0] : e.value, o = P(x({
19247
+ const { utc: t = !0 } = useDatePickerContext(), n = Array.isArray(e.value) ? e.value[0] : e.value, { parseVariable: o } = useVariables$1() || {}, r = useLocalVariables$1(), [i, a] = useState(null), [l, c] = useState(null), u = useRef(null);
19248
+ useEffect(() => (u.current && u.current(), u.current = autorun(() => {
19249
+ d();
19250
+ }), () => {
19251
+ u.current();
19252
+ }), [e._maxDate, e._minDate, r, o]);
19253
+ const d = () => V(void 0, null, function* () {
19254
+ let m = e._minDate ? Promise.resolve(dayjs(e._minDate)) : Promise.resolve(null), h = e._maxDate ? Promise.resolve(dayjs(e._maxDate)) : Promise.resolve(null);
19255
+ isVariable(e._maxDate) && (h = o(e._maxDate, r).then((y) => dayjs(y.value))), isVariable(e._minDate) && (m = o(e._minDate, r).then((y) => dayjs(y.value)));
19256
+ const [g, f] = yield Promise.all([m, h]), C = Array.from({ length: 60 }, (y, v) => v), b = (y) => {
19257
+ if (!y || !g && !f)
19258
+ return !1;
19259
+ const v = dayjs(y);
19260
+ return v.isBefore(g, "minute") || v.isAfter(f, "minute");
19261
+ }, S = (y) => {
19262
+ if (!y || !g && !f)
19263
+ return { disabledHours: () => [], disabledMinutes: () => [], disabledSeconds: () => [] };
19264
+ const v = dayjs(y), F = v.isSame(g, "day"), A = v.isSame(f, "day");
19265
+ return {
19266
+ disabledHours: () => {
19267
+ const $ = [];
19268
+ return F && $.push(...Array.from({ length: g.hour() }, (z, L) => L)), A && $.push(...Array.from({ length: 24 - f.hour() }, (z, L) => L + f.hour() + 1)), $;
19269
+ },
19270
+ disabledMinutes: ($) => F && $ === g.hour() ? C.filter((z) => z < g.minute()) : A && $ === f.hour() ? C.filter((z) => z > f.minute()) : [],
19271
+ disabledSeconds: ($, z) => F && $ === g.hour() && z === g.minute() ? C.filter((L) => L < g.second()) : A && $ === f.hour() && z === f.minute() ? C.filter((L) => L > f.second()) : []
19272
+ };
19273
+ };
19274
+ a(() => b), c(() => S);
19275
+ }), p = P(x({
19248
19276
  utc: t
19249
19277
  }, e), {
19278
+ disabledDate: i,
19279
+ disabledTime: l,
19250
19280
  showTime: e.showTime ? { defaultValue: dayjs("00:00:00", "HH:mm:ss") } : !1
19251
19281
  });
19252
- return /* @__PURE__ */ jsx(InternalDatePicker, P(x({}, o), { value: n }));
19282
+ return /* @__PURE__ */ jsx(InternalDatePicker, P(x({}, p), { value: n }));
19253
19283
  };
19254
19284
  DatePicker.ReadPretty = ReadPretty$d.DatePicker;
19255
19285
  DatePicker.RangePicker = function e(t) {
@@ -20071,8 +20101,8 @@ const ParentCollectionProvider = (e) => {
20071
20101
  targetFieldSchema: i,
20072
20102
  record: a
20073
20103
  }) => {
20074
- var $;
20075
- const { filterVariables: l = () => !0 } = useVariables$1() || {}, c = ($ = a == null ? void 0 : a.__parent) == null ? void 0 : $.__collectionName, { currentUserSettings: u } = useCurrentUserVariable({
20104
+ var B;
20105
+ const { filterVariables: l = () => !0 } = useVariables$1() || {}, c = (B = a == null ? void 0 : a.__parent) == null ? void 0 : B.__collectionName, { currentUserSettings: u } = useCurrentUserVariable({
20076
20106
  maxDepth: 3,
20077
20107
  uiSchema: n,
20078
20108
  collectionField: e,
@@ -20114,7 +20144,7 @@ const ParentCollectionProvider = (e) => {
20114
20144
  collectionField: e,
20115
20145
  noDisabled: r,
20116
20146
  targetFieldSchema: i
20117
- }), { currentParentRecordSettings: D, shouldDisplayCurrentParentRecord: N } = useCurrentParentRecordVariable({
20147
+ }), { currentParentRecordSettings: D, shouldDisplayCurrentParentRecord: $ } = useCurrentParentRecordVariable({
20118
20148
  schema: n,
20119
20149
  collectionName: c,
20120
20150
  collectionField: e,
@@ -20130,7 +20160,7 @@ const ParentCollectionProvider = (e) => {
20130
20160
  C && f,
20131
20161
  S && b,
20132
20162
  v && y,
20133
- N && D,
20163
+ $ && D,
20134
20164
  A && F,
20135
20165
  T && R,
20136
20166
  L && z
@@ -20147,7 +20177,7 @@ const ParentCollectionProvider = (e) => {
20147
20177
  b,
20148
20178
  v,
20149
20179
  y,
20150
- N,
20180
+ $,
20151
20181
  D,
20152
20182
  A,
20153
20183
  F,
@@ -21375,7 +21405,8 @@ const DynamicComponent$1 = (e) => {
21375
21405
  onChange: (f) => {
21376
21406
  d(f);
21377
21407
  },
21378
- placeholder: r("Select field")
21408
+ placeholder: r("Select field"),
21409
+ treeNodeFilterProp: "title"
21379
21410
  }
21380
21411
  ),
21381
21412
  /* @__PURE__ */ jsx(
@@ -22226,19 +22257,19 @@ const SchemaSettingsSwitchItem = (e) => {
22226
22257
  useEffect(() => {
22227
22258
  D.setInitialValues(cloneDeep$1(r));
22228
22259
  }, [JSON.stringify(r || {})]);
22229
- const N = useCallback(() => {
22260
+ const $ = useCallback(() => {
22230
22261
  h(!1), D.reset();
22231
22262
  }, [D]), z = useCallback(() => V(void 0, null, function* () {
22232
22263
  yield D.submit();
22233
22264
  try {
22234
- const M = D.values, B = Object.keys(M).reduce((k, j) => (D.query(j).take() && (k[j] = M[j]), k), {});
22235
- yield n == null ? void 0 : n(cloneDeep$1(B)), h(!1);
22265
+ const M = D.values, N = Object.keys(M).reduce((k, j) => (D.query(j).take() && (k[j] = M[j]), k), {});
22266
+ yield n == null ? void 0 : n(cloneDeep$1(N)), h(!1);
22236
22267
  } catch (M) {
22237
22268
  console.error(M);
22238
22269
  }
22239
22270
  }), [D, n]), L = useCallback(() => V(void 0, null, function* () {
22240
22271
  !g && (a != null && a["x-uid"]) && (b["x-action-settings"].schemaUid = a["x-uid"], y.emit("patch", { schema: b }), yield F.resource("uiSchemas").insert({ values: a }), f(a["x-uid"])), typeof i == "function" && (i == null || i()), S.setVisible(!1), h(!0);
22241
- }), [F, S, y, b, a, g]), $ = useCallback((M) => M.stopPropagation(), []);
22272
+ }), [F, S, y, b, a, g]), B = useCallback((M) => M.stopPropagation(), []);
22242
22273
  return /* @__PURE__ */ jsxs(zIndexContext.Provider, { value: T, children: [
22243
22274
  /* @__PURE__ */ jsx(
22244
22275
  SchemaSettingsItem,
@@ -22246,7 +22277,7 @@ const SchemaSettingsSwitchItem = (e) => {
22246
22277
  title: v(t)
22247
22278
  }, p), {
22248
22279
  onClick: L,
22249
- onKeyDown: $,
22280
+ onKeyDown: B,
22250
22281
  children: e.children || e.title
22251
22282
  })
22252
22283
  ),
@@ -22259,10 +22290,10 @@ const SchemaSettingsSwitchItem = (e) => {
22259
22290
  }, p), {
22260
22291
  destroyOnClose: !0,
22261
22292
  open: m,
22262
- onCancel: N,
22293
+ onCancel: $,
22263
22294
  zIndex: T,
22264
22295
  footer: /* @__PURE__ */ jsxs(Space$1, { children: [
22265
- /* @__PURE__ */ jsx(Button, { onClick: N, children: C("Cancel") }),
22296
+ /* @__PURE__ */ jsx(Button, { onClick: $, children: C("Cancel") }),
22266
22297
  /* @__PURE__ */ jsx(Button, { type: "primary", onClick: z, children: C("Submit") })
22267
22298
  ] }),
22268
22299
  children: /* @__PURE__ */ jsx(FormActiveFieldsProvider, { name: "form", getActiveFieldsName: A == null ? void 0 : A.getActiveFieldsName, children: /* @__PURE__ */ jsx(FormProvider, { form: D, children: /* @__PURE__ */ jsxs(FormLayout, { layout: "vertical", children: [
@@ -22303,7 +22334,7 @@ const SchemaSettingsModalItem = (e) => {
22303
22334
  "width",
22304
22335
  "noRecord",
22305
22336
  "ModalContextProvider"
22306
- ]), h = useContext(SchemaOptionsContext), g = useCollection(), f = useAPIClient(), C = useApp(), { theme: b } = useGlobalTheme(), S = useBlockRequestContext(), y = useFormActiveFields(), { locale: v } = useContext(ConfigProvider.ConfigContext), F = useDataSourceManager(), A = useDataSourceKey(), R = useCollectionRecord(), { association: T } = useDataBlockProps() || {}, D = useFormBlockContext(), N = useBlockContext(), { getOperators: z } = useOperators(), L = useLocationSearch(), $ = useVariables$1(), { formValue: w, collection: M, parent: B } = useSubFormValue(), k = useCurrentPopupRecord(), j = useParentPopupRecord();
22337
+ ]), h = useContext(SchemaOptionsContext), g = useCollection(), f = useAPIClient(), C = useApp(), { theme: b } = useGlobalTheme(), S = useBlockRequestContext(), y = useFormActiveFields(), { locale: v } = useContext(ConfigProvider.ConfigContext), F = useDataSourceManager(), A = useDataSourceKey(), R = useCollectionRecord(), { association: T } = useDataBlockProps() || {}, D = useFormBlockContext(), $ = useBlockContext(), { getOperators: z } = useOperators(), L = useLocationSearch(), B = useVariables$1(), { formValue: w, collection: M, parent: N } = useSubFormValue(), k = useCurrentPopupRecord(), j = useParentPopupRecord();
22307
22338
  return t ? null : /* @__PURE__ */ jsx(
22308
22339
  SchemaSettingsItem,
22309
22340
  P(x({
@@ -22313,7 +22344,7 @@ const SchemaSettingsModalItem = (e) => {
22313
22344
  const q = l ? yield l() : c, E = _.isFunction(e.schema) ? e.schema() : e.schema;
22314
22345
  FormDialog(
22315
22346
  { title: E.title || n, width: u },
22316
- () => /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(CollectOperators, { defaultOperators: z(), children: /* @__PURE__ */ jsx(VariablesContext.Provider, { value: $, children: /* @__PURE__ */ jsx(BlockContext.Provider, { value: N, children: /* @__PURE__ */ jsx(
22347
+ () => /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(CollectOperators, { defaultOperators: z(), children: /* @__PURE__ */ jsx(VariablesContext.Provider, { value: B, children: /* @__PURE__ */ jsx(BlockContext.Provider, { value: $, children: /* @__PURE__ */ jsx(
22317
22348
  VariablePopupRecordProvider,
22318
22349
  {
22319
22350
  recordData: k == null ? void 0 : k.value,
@@ -22322,7 +22353,7 @@ const SchemaSettingsModalItem = (e) => {
22322
22353
  recordData: j == null ? void 0 : j.value,
22323
22354
  collection: j == null ? void 0 : j.collection
22324
22355
  },
22325
- children: /* @__PURE__ */ jsx(CollectionRecordProvider, { record: d ? null : R, children: /* @__PURE__ */ jsx(FormBlockContext$1.Provider, { value: D, children: /* @__PURE__ */ jsx(SubFormProvider, { value: { value: w, collection: M, parent: B }, children: /* @__PURE__ */ jsx(
22356
+ children: /* @__PURE__ */ jsx(CollectionRecordProvider, { record: d ? null : R, children: /* @__PURE__ */ jsx(FormBlockContext$1.Provider, { value: D, children: /* @__PURE__ */ jsx(SubFormProvider, { value: { value: w, collection: M, parent: N }, children: /* @__PURE__ */ jsx(
22326
22357
  FormActiveFieldsProvider,
22327
22358
  {
22328
22359
  name: "form",
@@ -22502,22 +22533,22 @@ const SchemaSettingsModalItem = (e) => {
22502
22533
  }
22503
22534
  }),
22504
22535
  [n, a, l, b, m, h, u, p, A, r]
22505
- ), D = useMemo(() => ({ ArrayCollapse: ArrayCollapse$2, FormLayout }), []), N = useCallback(
22536
+ ), D = useMemo(() => ({ ArrayCollapse: ArrayCollapse$2, FormLayout }), []), $ = useCallback(
22506
22537
  (L) => {
22507
22538
  var k;
22508
- const $ = [];
22539
+ const B = [];
22509
22540
  for (const j of L.fieldReaction.rules)
22510
- $.push(_.pickBy(j, _.identity));
22511
- const w = b["x-component"] === "BlockTemplate" && ((k = b["x-component-props"]) == null ? void 0 : k.templateId), B = {
22541
+ B.push(_.pickBy(j, _.identity));
22542
+ const w = b["x-component"] === "BlockTemplate" && ((k = b["x-component-props"]) == null ? void 0 : k.templateId), N = {
22512
22543
  "x-uid": w && d(w).uid || b["x-uid"]
22513
22544
  };
22514
- b[F] = $, B[F] = $, c.emit("patch", {
22515
- schema: B
22545
+ b[F] = B, N[F] = B, c.emit("patch", {
22546
+ schema: N
22516
22547
  }), c.refresh(), i == null || i();
22517
22548
  },
22518
22549
  [c, d, b, F, i]
22519
22550
  );
22520
- return /* @__PURE__ */ jsx(SchemaSettingsModalItem, { title: R, components: D, width: 770, schema: T, onSubmit: N });
22551
+ return /* @__PURE__ */ jsx(SchemaSettingsModalItem, { title: R, components: D, width: 770, schema: T, onSubmit: $ });
22521
22552
  }, useDataTemplates = (e) => {
22522
22553
  const t = useFieldSchema();
22523
22554
  if (e)
@@ -23165,17 +23196,17 @@ const designerCss$4 = ({ margin: e = "-18px -16px", padding: t = "18px 16px" } =
23165
23196
  }
23166
23197
  },
23167
23198
  onSubmit: (D) => {
23168
- const N = {
23199
+ const $ = {
23169
23200
  "x-uid": n["x-uid"]
23170
23201
  };
23171
- (o.componentProps.picker || "date") !== D.picker && !m && o.value && (o.value = void 0, o.initialValue = void 0, n.default = void 0, N.default = void 0), N["x-component-props"] = o.componentProps || {}, n["x-component-props"] = x(x({}, o.componentProps || {}), D), N["x-component-props"] = n["x-component-props"], o.componentProps = n["x-component-props"];
23202
+ (o.componentProps.picker || "date") !== D.picker && !m && o.value && (o.value = void 0, o.initialValue = void 0, n.default = void 0, $.default = void 0), $["x-component-props"] = o.componentProps || {}, n["x-component-props"] = x(x({}, o.componentProps || {}), D), $["x-component-props"] = n["x-component-props"], o.componentProps = n["x-component-props"];
23172
23203
  const z = o.path.entire.split(".");
23173
23204
  z.pop();
23174
23205
  const L = z.join(".");
23175
- o.query(`${L}.*[0:].${n.name}`).forEach(($) => {
23176
- $.props.name === n.name && ((o.componentProps.picker || "date") !== D.picker && !m && ($.value = void 0, $.initialValue = void 0), $.setComponentProps(x({}, D)));
23206
+ o.query(`${L}.*[0:].${n.name}`).forEach((B) => {
23207
+ B.props.name === n.name && ((o.componentProps.picker || "date") !== D.picker && !m && (B.value = void 0, B.initialValue = void 0), B.setComponentProps(x({}, D)));
23177
23208
  }), r.emit("patch", {
23178
- schema: N
23209
+ schema: $
23179
23210
  }), r.refresh();
23180
23211
  }
23181
23212
  }
@@ -23204,7 +23235,7 @@ const getActionContext = (e) => {
23204
23235
  R != null && R.target && (u = p(
23205
23236
  `${R.target}.${((O = (j = o["x-component-props"]) == null ? void 0 : j.fieldNames) == null ? void 0 : O.label) || "id"}`
23206
23237
  ));
23207
- const D = (R == null ? void 0 : R.interface) === "m2o" && findParentFieldSchema(o), N = D && p(D == null ? void 0 : D["x-collection-field"]), z = useTableBlockContext(), L = (R == null ? void 0 : R.interface) === "m2m" || (N == null ? void 0 : N.type) === "hasMany" && (R == null ? void 0 : R.interface) === "m2o", $ = useCallback(
23238
+ const D = (R == null ? void 0 : R.interface) === "m2o" && findParentFieldSchema(o), $ = D && p(D == null ? void 0 : D["x-collection-field"]), z = useTableBlockContext(), L = (R == null ? void 0 : R.interface) === "m2m" || ($ == null ? void 0 : $.type) === "hasMany" && (R == null ? void 0 : R.interface) === "m2o", B = useCallback(
23208
23239
  (q) => {
23209
23240
  const E = q.find((G) => G.value === "$nForm"), U = m(A);
23210
23241
  return !(U != null && U.length) && E && (E.children = formatVariableScop(y())), q;
@@ -23235,7 +23266,7 @@ const getActionContext = (e) => {
23235
23266
  className: defaultInputStyle,
23236
23267
  form: S,
23237
23268
  record: b,
23238
- returnScope: $,
23269
+ returnScope: B,
23239
23270
  shouldChange: getShouldChange({
23240
23271
  collectionField: R,
23241
23272
  variables: g,
@@ -23280,12 +23311,12 @@ const getActionContext = (e) => {
23280
23311
  L,
23281
23312
  f,
23282
23313
  b,
23283
- $,
23314
+ B,
23284
23315
  a,
23285
23316
  z.collection,
23286
23317
  u,
23287
23318
  g
23288
- ]), B = useCallback(
23319
+ ]), N = useCallback(
23289
23320
  (q) => {
23290
23321
  var U, G, H;
23291
23322
  const E = {
@@ -23305,7 +23336,7 @@ const getActionContext = (e) => {
23305
23336
  components: w,
23306
23337
  width: 800,
23307
23338
  schema: M,
23308
- onSubmit: B,
23339
+ onSubmit: N,
23309
23340
  ModalContextProvider: (q) => /* @__PURE__ */ jsx(FlagProvider, { isInSubForm: v, isInSubTable: F, isInSetDefaultValueDialog: !0, children: q.children })
23310
23341
  }
23311
23342
  );
@@ -24074,13 +24105,13 @@ const useGetFilterOptions = () => {
24074
24105
  };
24075
24106
  });
24076
24107
  }, TableColumnDesigner$1 = (e) => {
24077
- var z, L, $, w, M, B, k, j, O, q, E, U;
24078
- 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(
24108
+ var z, L, B, w, M, N, k, j, O, q, E, U;
24109
+ 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((B = o == null ? void 0 : o.target) != null ? B : 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(
24079
24110
  o == null ? void 0 : o.interface
24080
24111
  ), A = useFieldModeOptions({ fieldSchema: n }), R = ((M = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : M.mode) || "Select";
24081
24112
  let T = "editable";
24082
24113
  n["x-disabled"] === !0 && (T = "readonly"), n["x-read-pretty"] === !0 && (T = "read-pretty");
24083
- const D = F && R === "Select", N = () => {
24114
+ const D = F && R === "Select", $ = () => {
24084
24115
  const { name: G } = useCollection(), { linkageRulesProps: H } = useSchemaToolbar();
24085
24116
  return /* @__PURE__ */ jsx(SchemaSettingsLinkageRules, x({ category: "style" }, P(x({}, H), { collectionName: G })));
24086
24117
  };
@@ -24096,7 +24127,7 @@ const useGetFilterOptions = () => {
24096
24127
  title: {
24097
24128
  title: c("Column title"),
24098
24129
  default: u == null ? void 0 : u.title,
24099
- description: `${c("Original field title: ")}${((B = o == null ? void 0 : o.uiSchema) == null ? void 0 : B.title) || (n == null ? void 0 : n.title)}`,
24130
+ description: `${c("Original field title: ")}${((N = o == null ? void 0 : o.uiSchema) == null ? void 0 : N.title) || (n == null ? void 0 : n.title)}`,
24100
24131
  "x-decorator": "FormItem",
24101
24132
  "x-component": "Input",
24102
24133
  "x-component-props": {}
@@ -24162,7 +24193,7 @@ const useGetFilterOptions = () => {
24162
24193
  }
24163
24194
  }
24164
24195
  ),
24165
- /* @__PURE__ */ jsx(N, {}),
24196
+ /* @__PURE__ */ jsx($, {}),
24166
24197
  g && g.sortable === !0 && !S && /* @__PURE__ */ jsx(
24167
24198
  SchemaSettingsSwitchItem,
24168
24199
  {
@@ -25312,12 +25343,12 @@ function useCollectValuesToSubmit() {
25312
25343
  resource: o,
25313
25344
  actionFields: (d == null ? void 0 : d("form")) || []
25314
25345
  }), S = {}, y = Object.keys(f).map((D) => V(this, null, function* () {
25315
- const N = f[D], z = i(D);
25316
- if (isVariable(N)) {
25317
- const { value: L } = (yield p == null ? void 0 : p.parseVariable(N, m)) || {};
25346
+ const $ = f[D], z = i(D);
25347
+ if (isVariable($)) {
25348
+ const { value: L } = (yield p == null ? void 0 : p.parseVariable($, m)) || {};
25318
25349
  L != null && (S[D] = transformVariableValue(L, { targetCollectionField: z }));
25319
25350
  } else
25320
- N != null && N !== "" && (S[D] = N);
25351
+ $ != null && $ !== "" && (S[D] = $);
25321
25352
  }));
25322
25353
  if (yield Promise.all(y), (A = u == null ? void 0 : u["x-component-props"]) == null ? void 0 : A.addChild) {
25323
25354
  const D = a();
@@ -25347,8 +25378,8 @@ const useCreateActionProps = () => {
25347
25378
  return {
25348
25379
  onClick() {
25349
25380
  return V(this, null, function* () {
25350
- var $;
25351
- const { onSuccess: v, skipValidator: F, triggerWorkflows: A } = ($ = u == null ? void 0 : u["x-action-settings"]) != null ? $ : {}, { manualClose: R, redirecting: T, redirectTo: D, successMessage: N, actionAfterSuccess: z } = v || {};
25381
+ var B;
25382
+ const { onSuccess: v, skipValidator: F, triggerWorkflows: A } = (B = u == null ? void 0 : u["x-action-settings"]) != null ? B : {}, { manualClose: R, redirecting: T, redirectTo: D, successMessage: $, actionAfterSuccess: z } = v || {};
25352
25383
  F || (yield n.submit());
25353
25384
  const L = yield f();
25354
25385
  d.data = o.data || {}, d.data.loading = !0;
@@ -25361,16 +25392,16 @@ const useCreateActionProps = () => {
25361
25392
  triggerWorkflows: A != null && A.length ? A.map((M) => [M.workflowKey, M.context].filter(Boolean).join("!")).join(",") : void 0,
25362
25393
  updateAssociationValues: g
25363
25394
  });
25364
- if ((z === "previous" || !z && T !== !0) && (i == null || i(!1)), a == null || a(!0), l == null || l(!1), d.data.loading = !1, d.data.data = w, !N) {
25395
+ if ((z === "previous" || !z && T !== !0) && (i == null || i(!1)), a == null || a(!0), l == null || l(!1), d.data.loading = !1, d.data.data = w, !$) {
25365
25396
  message.success(h("Saved successfully")), yield resetFormCorrectly(n), (T && !z || z === "redirect") && D && (isURL(D) ? window.location.href = D : c(D));
25366
25397
  return;
25367
25398
  }
25368
25399
  R ? m.success({
25369
- title: p(N),
25400
+ title: p($),
25370
25401
  onOk: () => V(this, null, function* () {
25371
25402
  yield resetFormCorrectly(n), (T && !z || z === "redirect") && D && (isURL(D) ? window.location.href = D : c(D));
25372
25403
  })
25373
- }) : (message.success(p(N)), yield resetFormCorrectly(n), (T && !z || z === "redirect") && D && (isURL(D) ? window.location.href = D : c(D)));
25404
+ }) : (message.success(p($)), yield resetFormCorrectly(n), (T && !z || z === "redirect") && D && (isURL(D) ? window.location.href = D : c(D)));
25374
25405
  } catch (w) {
25375
25406
  d.data.loading = !1;
25376
25407
  }
@@ -25387,10 +25418,10 @@ const useCreateActionProps = () => {
25387
25418
  const R = u.map((H) => H.name), {
25388
25419
  assignedValues: T = {},
25389
25420
  onSuccess: D,
25390
- overwriteValues: N,
25421
+ overwriteValues: $,
25391
25422
  skipValidator: z,
25392
25423
  triggerWorkflows: L
25393
- } = (j = l == null ? void 0 : l["x-action-settings"]) != null ? j : {}, $ = (O = i == null ? void 0 : i["x-component-props"]) == null ? void 0 : O.addChild, { successMessage: w } = D || {}, M = {}, B = Object.keys(T).map((H) => V(this, null, function* () {
25424
+ } = (j = l == null ? void 0 : l["x-action-settings"]) != null ? j : {}, B = (O = i == null ? void 0 : i["x-component-props"]) == null ? void 0 : O.addChild, { successMessage: w } = D || {}, M = {}, N = Object.keys(T).map((H) => V(this, null, function* () {
25394
25425
  const W = T[H], X = d(H);
25395
25426
  if (isVariable(W)) {
25396
25427
  const { value: Y } = (yield C == null ? void 0 : C.parseVariable(W, b)) || {};
@@ -25398,7 +25429,7 @@ const useCreateActionProps = () => {
25398
25429
  } else
25399
25430
  W != null && W !== "" && (M[H] = W);
25400
25431
  }));
25401
- yield Promise.all(B), z || (yield e.submit());
25432
+ yield Promise.all(N), z || (yield e.submit());
25402
25433
  const k = getFormValues({
25403
25434
  filterByTk: g,
25404
25435
  field: t,
@@ -25408,14 +25439,14 @@ const useCreateActionProps = () => {
25408
25439
  resource: n,
25409
25440
  actionFields: (S == null ? void 0 : S("form")) || []
25410
25441
  });
25411
- if ($) {
25442
+ if (B) {
25412
25443
  const H = p();
25413
25444
  k[(q = H == null ? void 0 : H.name) != null ? q : "parent"] = f, k[(E = H == null ? void 0 : H.foreignKey) != null ? E : "parentId"] = f.id;
25414
25445
  }
25415
25446
  c.data = t.data || {}, c.data.loading = !0;
25416
25447
  try {
25417
25448
  const H = yield n[y]({
25418
- values: x(x(x({}, k), N), M),
25449
+ values: x(x(x({}, k), $), M),
25419
25450
  filterKeys: v,
25420
25451
  // TODO(refactor): should change to inject by plugin
25421
25452
  triggerWorkflows: L != null && L.length ? L.map((W) => [W.workflowKey, W.context].filter(Boolean).join("!")).join(",") : void 0
@@ -25527,26 +25558,26 @@ const useCreateActionProps = () => {
25527
25558
  return {
25528
25559
  onClick(f, C) {
25529
25560
  return V(this, null, function* () {
25530
- var L, $, w;
25561
+ var L, B, w;
25531
25562
  const {
25532
25563
  assignedValues: b = {},
25533
25564
  onSuccess: S,
25534
25565
  skipValidator: y,
25535
25566
  triggerWorkflows: v
25536
- } = (L = r == null ? void 0 : r["x-action-settings"]) != null ? L : {}, { manualClose: F, redirecting: A, redirectTo: R, successMessage: T, actionAfterSuccess: D } = S || {}, N = {}, z = Object.keys(b).map((M) => V(this, null, function* () {
25537
- const B = b[M], k = m(M);
25538
- if (isVariable(B)) {
25539
- const { value: j } = (yield u == null ? void 0 : u.parseVariable(B, d)) || {};
25540
- j && (N[M] = transformVariableValue(j, { targetCollectionField: k }));
25567
+ } = (L = r == null ? void 0 : r["x-action-settings"]) != null ? L : {}, { manualClose: F, redirecting: A, redirectTo: R, successMessage: T, actionAfterSuccess: D } = S || {}, $ = {}, z = Object.keys(b).map((M) => V(this, null, function* () {
25568
+ const N = b[M], k = m(M);
25569
+ if (isVariable(N)) {
25570
+ const { value: j } = (yield u == null ? void 0 : u.parseVariable(N, d)) || {};
25571
+ j && ($[M] = transformVariableValue(j, { targetCollectionField: k }));
25541
25572
  } else
25542
- B != null && B !== "" && (N[M] = B);
25573
+ N != null && N !== "" && ($[M] = N);
25543
25574
  }));
25544
25575
  yield Promise.all(z), y === !1 && (yield l.submit()), yield e.update({
25545
25576
  filterByTk: o,
25546
- values: x({}, N),
25577
+ values: x({}, $),
25547
25578
  // TODO(refactor): should change to inject by plugin
25548
25579
  triggerWorkflows: v != null && v.length ? v.map((M) => [M.workflowKey, M.context].filter(Boolean).join("!")).join(",") : void 0
25549
- }), (D === "previous" || !D && A !== !0) && (h == null || h(!1)), C && (C == null || C()), e instanceof TableFieldResource || (w = ($ = t == null ? void 0 : t.service) == null ? void 0 : $.refresh) == null || w.call($), T && (F ? c.success({
25580
+ }), (D === "previous" || !D && A !== !0) && (h == null || h(!1)), C && (C == null || C()), e instanceof TableFieldResource || (w = (B = t == null ? void 0 : t.service) == null ? void 0 : B.refresh) == null || w.call(B), T && (F ? c.success({
25550
25581
  title: a(T),
25551
25582
  onOk: () => V(this, null, function* () {
25552
25583
  (A && !D || D === "redirect") && R && (isURL(R) ? window.location.href = R : i(R));
@@ -25567,29 +25598,29 @@ const useCreateActionProps = () => {
25567
25598
  const {
25568
25599
  assignedValues: T = {},
25569
25600
  onSuccess: D,
25570
- updateMode: N
25571
- } = (j = i == null ? void 0 : i["x-action-settings"]) != null ? j : {}, { manualClose: z, redirecting: L, redirectTo: $, successMessage: w, actionAfterSuccess: M } = D || {};
25601
+ updateMode: $
25602
+ } = (j = i == null ? void 0 : i["x-action-settings"]) != null ? j : {}, { manualClose: z, redirecting: L, redirectTo: B, successMessage: w, actionAfterSuccess: M } = D || {};
25572
25603
  m.data = e.data || {}, m.data.loading = !0;
25573
- const B = {}, k = Object.keys(T).map((q) => V(this, null, function* () {
25604
+ const N = {}, k = Object.keys(T).map((q) => V(this, null, function* () {
25574
25605
  const E = T[q], U = C(q);
25575
25606
  if (isVariable(E)) {
25576
25607
  const { value: G } = (yield g == null ? void 0 : g.parseVariable(E, b)) || {};
25577
- G && (B[q] = transformVariableValue(G, { targetCollectionField: U }));
25608
+ G && (N[q] = transformVariableValue(G, { targetCollectionField: U }));
25578
25609
  } else
25579
- E != null && E !== "" && (B[q] = E);
25610
+ E != null && E !== "" && (N[q] = E);
25580
25611
  }));
25581
25612
  yield Promise.all(k), (M === "previous" || !M && L !== !0) && (S == null || S(!1)), h.confirm({
25582
25613
  title: p("Bulk update"),
25583
- content: p(N === "selected" ? "Update selected data?" : "Update all data?"),
25614
+ content: p($ === "selected" ? "Update selected data?" : "Update all data?"),
25584
25615
  onOk() {
25585
25616
  return V(this, null, function* () {
25586
25617
  var U, G, H, W;
25587
25618
  const { filter: q } = (G = (U = o.params) == null ? void 0 : U[0]) != null ? G : {}, E = {
25588
- values: x({}, B),
25619
+ values: x({}, N),
25589
25620
  filter: q,
25590
25621
  forceUpdate: !1
25591
25622
  };
25592
- if (N === "selected") {
25623
+ if ($ === "selected") {
25593
25624
  if (!(c != null && c.length)) {
25594
25625
  message.error(p("Please select the records to be updated")), m.data.loading = !1;
25595
25626
  return;
@@ -25606,9 +25637,9 @@ const useCreateActionProps = () => {
25606
25637
  t instanceof TableFieldResource || (W = (H = n == null ? void 0 : n.service) == null ? void 0 : H.refresh) == null || W.call(H), w && (z ? h.success({
25607
25638
  title: d(w),
25608
25639
  onOk: () => V(this, null, function* () {
25609
- (L && !M || M === "redirect") && $ && (isURL($) ? window.location.href = $ : u($));
25640
+ (L && !M || M === "redirect") && B && (isURL(B) ? window.location.href = B : u(B));
25610
25641
  })
25611
- }) : (message.success(d(w)), (L && !M || M === "redirect") && $ && (isURL($) ? window.location.href = $ : u($))));
25642
+ }) : (message.success(d(w)), (L && !M || M === "redirect") && B && (isURL(B) ? window.location.href = B : u(B))));
25612
25643
  });
25613
25644
  },
25614
25645
  onCancel() {
@@ -25627,11 +25658,11 @@ const useCreateActionProps = () => {
25627
25658
  onClick() {
25628
25659
  return V(this, null, function* () {
25629
25660
  var q, E, U, G;
25630
- const { skipValidator: A, onSuccess: R, requestSettings: T } = (q = o == null ? void 0 : o["x-action-settings"]) != null ? q : {}, { manualClose: D, redirecting: N, redirectTo: z, successMessage: L, actionAfterSuccess: $ } = R || {}, w = o == null ? void 0 : o["x-action"];
25661
+ const { skipValidator: A, onSuccess: R, requestSettings: T } = (q = o == null ? void 0 : o["x-action-settings"]) != null ? q : {}, { manualClose: D, redirecting: $, redirectTo: z, successMessage: L, actionAfterSuccess: B } = R || {}, w = o == null ? void 0 : o["x-action"];
25631
25662
  if (!T.url)
25632
25663
  return;
25633
25664
  A !== !0 && w === "customize:form:request" && (yield i.submit());
25634
- const M = T.headers ? JSON.parse(T.headers) : {}, B = T.params ? JSON.parse(T.params) : {}, k = T.data ? JSON.parse(T.data) : {};
25665
+ const M = T.headers ? JSON.parse(T.headers) : {}, N = T.params ? JSON.parse(T.params) : {}, k = T.data ? JSON.parse(T.data) : {};
25635
25666
  if (w === "customize:form:request" && ["POST", "PUT", "PATCH"].includes(T.method)) {
25636
25667
  const H = a.map((X) => X.name), W = getFormValues({
25637
25668
  filterByTk: n,
@@ -25648,15 +25679,15 @@ const useCreateActionProps = () => {
25648
25679
  url: renderTemplate(T.url, { currentRecord: m, currentUser: g }),
25649
25680
  method: T.method,
25650
25681
  headers: parse(M)({ currentRecord: m, currentUser: g }),
25651
- params: parse(B)({ currentRecord: m, currentUser: g }),
25682
+ params: parse(N)({ currentRecord: m, currentUser: g }),
25652
25683
  data: parse(k)({ currentRecord: m, currentUser: g })
25653
25684
  };
25654
25685
  f.data = c.data || {}, f.data.loading = !0;
25655
25686
  try {
25656
- 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" || !$ && N !== !0) && (b == null || b(!1)), L || (message.success(C("Saved successfully")), yield resetFormCorrectly(i), (N && !$ || $ === "redirect") && z && (isURL(z) ? window.location.href = z : t(z))), D ? S.success({
25687
+ 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" && (B === "previous" || !B && $ !== !0) && (b == null || b(!1)), L || (message.success(C("Saved successfully")), yield resetFormCorrectly(i), ($ && !B || B === "redirect") && z && (isURL(z) ? window.location.href = z : t(z))), D ? S.success({
25657
25688
  title: r(L),
25658
25689
  onOk: () => V(this, null, function* () {
25659
- (N && !$ || $ === "redirect") && z && (isURL(z) ? window.location.href = z : t(z));
25690
+ ($ && !B || B === "redirect") && z && (isURL(z) ? window.location.href = z : t(z));
25660
25691
  })
25661
25692
  }) : message.success(r(L));
25662
25693
  } finally {
@@ -25675,9 +25706,9 @@ const useCreateActionProps = () => {
25675
25706
  assignedValues: R = {},
25676
25707
  onSuccess: T,
25677
25708
  overwriteValues: D,
25678
- skipValidator: N,
25709
+ skipValidator: $,
25679
25710
  triggerWorkflows: z
25680
- } = (E = l == null ? void 0 : l["x-action-settings"]) != null ? E : {}, { manualClose: L, redirecting: $, redirectTo: w, successMessage: M, actionAfterSuccess: B } = T || {}, k = {}, j = Object.keys(R).map((U) => V(this, null, function* () {
25711
+ } = (E = l == null ? void 0 : l["x-action-settings"]) != null ? E : {}, { manualClose: L, redirecting: B, redirectTo: w, successMessage: M, actionAfterSuccess: N } = T || {}, k = {}, j = Object.keys(R).map((U) => V(this, null, function* () {
25681
25712
  const G = R[U], H = d(U);
25682
25713
  if (isVariable(G)) {
25683
25714
  const { value: W } = (yield b == null ? void 0 : b.parseVariable(G, S)) || {};
@@ -25685,7 +25716,7 @@ const useCreateActionProps = () => {
25685
25716
  } else
25686
25717
  G != null && G !== "" && (k[U] = G);
25687
25718
  }));
25688
- yield Promise.all(j), N || (yield e.submit());
25719
+ yield Promise.all(j), $ || (yield e.submit());
25689
25720
  const O = u.map((U) => U.name), q = getFormValues({
25690
25721
  filterByTk: t,
25691
25722
  field: n,
@@ -25704,14 +25735,14 @@ const useCreateActionProps = () => {
25704
25735
  updateAssociationValues: g,
25705
25736
  // TODO(refactor): should change to inject by plugin
25706
25737
  triggerWorkflows: z != null && z.length ? z.map((U) => [U.workflowKey, U.context].filter(Boolean).join("!")).join(",") : void 0
25707
- })), h.data.loading = !1, A && (A == null || A()), (B === "previous" || !B && $ !== !0) && (i == null || i(!1)), a == null || a(!1), !M)
25738
+ })), h.data.loading = !1, A && (A == null || A()), (N === "previous" || !N && B !== !0) && (i == null || i(!1)), a == null || a(!1), !M)
25708
25739
  return;
25709
25740
  L ? f.success({
25710
25741
  title: m(M),
25711
25742
  onOk: () => V(this, null, function* () {
25712
- yield e.reset(), ($ && !B || B === "redirect") && w && (isURL(w) ? window.location.href = w : c(w));
25743
+ yield e.reset(), (B && !N || N === "redirect") && w && (isURL(w) ? window.location.href = w : c(w));
25713
25744
  })
25714
- }) : (message.success(m(M)), ($ && !B || B === "redirect" || B === "redirect") && w && (isURL(w) ? window.location.href = w : c(w)));
25745
+ }) : (message.success(m(M)), (B && !N || N === "redirect" || N === "redirect") && w && (isURL(w) ? window.location.href = w : c(w)));
25715
25746
  } catch (U) {
25716
25747
  h.data.loading = !1;
25717
25748
  }
@@ -25868,7 +25899,7 @@ const useCreateActionProps = () => {
25868
25899
  /** 渲染 Collapse 的列表数据 */
25869
25900
  list: (d == null ? void 0 : d.data) || [],
25870
25901
  onSelected: (F) => {
25871
- var R, T, D, N;
25902
+ var R, T, D, $;
25872
25903
  const A = ((T = (R = t.params) == null ? void 0 : R[1]) == null ? void 0 : T.filters) || {};
25873
25904
  F.length ? A[`af.${c}`] = {
25874
25905
  [`${c}.${i}.$in`]: F
@@ -25876,7 +25907,7 @@ const useCreateActionProps = () => {
25876
25907
  P(x({}, (D = t.params) == null ? void 0 : D[0]), {
25877
25908
  pageSize: 200,
25878
25909
  page: 1,
25879
- filter: mergeFilter([...Object.values(A), (N = n == null ? void 0 : n.params) == null ? void 0 : N.filter])
25910
+ filter: mergeFilter([...Object.values(A), ($ = n == null ? void 0 : n.params) == null ? void 0 : $.filter])
25880
25911
  }),
25881
25912
  { filters: A }
25882
25913
  );
@@ -25898,7 +25929,7 @@ const useCreateActionProps = () => {
25898
25929
  var n;
25899
25930
  return ["select", "multipleSelect", "checkbox", "checkboxGroup", "chinaRegion"].includes(e == null ? void 0 : e.interface) && ((n = e == null ? void 0 : e.uiSchema) == null ? void 0 : n.enum);
25900
25931
  }, useAssociationFilterBlockProps = () => {
25901
- var v, F, A, R, T, D, N, z, L, $;
25932
+ var v, F, A, R, T, D, $, z, L, B;
25902
25933
  const e = AssociationFilter.useAssociationField(), t = useFieldSchema(), n = useOptionalFieldList(), { getDataBlocks: o } = useFilterBlock(), r = e == null ? void 0 : e.name, i = useField(), { props: a } = useBlockRequestContext(), l = useDataSourceHeaders(a == null ? void 0 : a.dataSource), c = useCollectionManager(), { filter: u, parseVariableLoading: d } = useParsedFilter({ filterOption: (F = (v = i.componentProps) == null ? void 0 : v.params) == null ? void 0 : F.filter });
25903
25934
  let p, m, h, g, f, C, b, S;
25904
25935
  C = e != null && e.target ? (A = c == null ? void 0 : c.getCollection(e.target)) == null ? void 0 : A.getPrimaryKey() : "id", b = ((T = (R = t["x-component-props"]) == null ? void 0 : R.fieldNames) == null ? void 0 : T.label) || C, { data: f, params: h, run: g } = useRequest(
@@ -25926,18 +25957,18 @@ const useCreateActionProps = () => {
25926
25957
  b,
25927
25958
  g,
25928
25959
  C,
25929
- (N = i.componentProps) == null ? void 0 : N.params,
25960
+ ($ = i.componentProps) == null ? void 0 : $.params,
25930
25961
  (L = (z = i.componentProps) == null ? void 0 : z.params) == null ? void 0 : L.sort,
25931
25962
  d
25932
25963
  ]);
25933
25964
  const y = useCallback(
25934
25965
  (w) => {
25935
- const { targets: M, uid: B } = findFilterTargets(t);
25966
+ const { targets: M, uid: N } = findFilterTargets(t);
25936
25967
  o().forEach((k) => {
25937
25968
  var G, H, W;
25938
25969
  if (!M.find((X) => X.uid === k.uid))
25939
25970
  return;
25940
- const O = `${B}${t.name}`, q = ((G = k.service.params) == null ? void 0 : G[0]) || {};
25971
+ const O = `${N}${t.name}`, q = ((G = k.service.params) == null ? void 0 : G[0]) || {};
25941
25972
  (W = (H = k.service.params) == null ? void 0 : H[1]) != null && W.filters || _.set(k.service.params, "[1].filters", {});
25942
25973
  const E = k.service.params[1].filters;
25943
25974
  if (w.length)
@@ -25969,15 +26000,15 @@ const useCreateActionProps = () => {
25969
26000
  multipleSelect: "$anyOf",
25970
26001
  checkbox: "$in",
25971
26002
  checkboxGroup: "$anyOf"
25972
- }, B = (($ = w == null ? void 0 : w.uiSchema) == null ? void 0 : $.enum) || [];
25973
- C = "value", b = "label", p = B, h = {}, g = () => {
26003
+ }, N = ((B = w == null ? void 0 : w.uiSchema) == null ? void 0 : B.enum) || [];
26004
+ C = "value", b = "label", p = N, h = {}, g = () => {
25974
26005
  }, S = `${w.name}.${M[w.interface]}`, m = (k) => {
25975
26006
  const j = k.target.value;
25976
26007
  if (!j) {
25977
- p = B;
26008
+ p = N;
25978
26009
  return;
25979
26010
  }
25980
- p = B.filter((O) => O.label.includes(j));
26011
+ p = N.filter((O) => O.label.includes(j));
25981
26012
  };
25982
26013
  } else
25983
26014
  S = `${r}.${C}.$in`, p = (f == null ? void 0 : f.data) || [], m = (w) => {
@@ -26259,31 +26290,31 @@ const useSyncFromForm = (e, t, n) => {
26259
26290
  return T;
26260
26291
  if (S > y)
26261
26292
  return [];
26262
- const D = r(C).map((N) => {
26293
+ const D = r(C).map(($) => {
26263
26294
  var w;
26264
- if (b.includes(N.name) || !N.interface || ["sort", "password", "sequence"].includes(N.type))
26295
+ if (b.includes($.name) || !$.interface || ["sort", "password", "sequence"].includes($.type))
26265
26296
  return;
26266
26297
  const z = {
26267
26298
  type: "duplicate",
26268
- tag: c((w = N.uiSchema) == null ? void 0 : w.title) || N.name
26299
+ tag: c((w = $.uiSchema) == null ? void 0 : w.title) || $.name
26269
26300
  }, L = P(x({}, z), {
26270
26301
  title: React.createElement(TreeNode, z),
26271
- key: v ? `${v}.${N.name}` : N.name,
26302
+ key: v ? `${v}.${$.name}` : $.name,
26272
26303
  isLeaf: !0,
26273
- field: N,
26304
+ field: $,
26274
26305
  disabled: F
26275
- }), $ = A.find((M) => M.name === L.key);
26276
- if (["belongsTo", "belongsToMany"].includes(N.type) && (!$ || ["Select", "Picker"].includes($ == null ? void 0 : $.fieldMode)))
26277
- z.type = "reference", L.type = "reference", L.title = React.createElement(TreeNode, P(x({}, z), { type: "reference" })), L.isLeaf = !1, L.children = m(N.target, {
26306
+ }), B = A.find((M) => M.name === L.key);
26307
+ if (["belongsTo", "belongsToMany"].includes($.type) && (!B || ["Select", "Picker"].includes(B == null ? void 0 : B.fieldMode)))
26308
+ z.type = "reference", L.type = "reference", L.title = React.createElement(TreeNode, P(x({}, z), { type: "reference" })), L.isLeaf = !1, L.children = m($.target, {
26278
26309
  depth: S + 1,
26279
26310
  maxDepth: y,
26280
26311
  prefix: L.key,
26281
26312
  exclude: systemKeys
26282
26313
  });
26283
- else if (["hasOne", "hasMany"].includes(N.type) || ["Nester", "SubTable"].includes($ == null ? void 0 : $.fieldMode)) {
26314
+ else if (["hasOne", "hasMany"].includes($.type) || ["Nester", "SubTable"].includes(B == null ? void 0 : B.fieldMode)) {
26284
26315
  let M = !1;
26285
- ["hasOne", "hasMany"].includes(N.type) && ["Select", "Picker"].includes($ == null ? void 0 : $.fieldMode) && (M = !0), L.disabled = !0, L.isLeaf = !1, L.children = p(
26286
- N.target,
26316
+ ["hasOne", "hasMany"].includes($.type) && ["Select", "Picker"].includes(B == null ? void 0 : B.fieldMode) && (M = !0), L.disabled = !0, L.isLeaf = !1, L.children = p(
26317
+ $.target,
26287
26318
  {
26288
26319
  depth: S + 1,
26289
26320
  maxDepth: y,
@@ -26310,16 +26341,16 @@ const useSyncFromForm = (e, t, n) => {
26310
26341
  const D = {
26311
26342
  type: "preloading",
26312
26343
  tag: c((z = T.uiSchema) == null ? void 0 : z.title) || T.name
26313
- }, N = b ? `${b}.${T.name}` : T.name;
26344
+ }, $ = b ? `${b}.${T.name}` : T.name;
26314
26345
  return {
26315
26346
  type: "preloading",
26316
26347
  tag: c((L = T.uiSchema) == null ? void 0 : L.title) || T.name,
26317
26348
  title: React.createElement(TreeNode, D),
26318
- key: N,
26349
+ key: $,
26319
26350
  isLeaf: !1,
26320
26351
  field: T,
26321
26352
  children: m(T.target, {
26322
- prefix: N,
26353
+ prefix: $,
26323
26354
  depth: y + 1,
26324
26355
  maxDepth: S,
26325
26356
  exclude: v
@@ -26343,10 +26374,10 @@ const useSyncFromForm = (e, t, n) => {
26343
26374
  const f = /* @__PURE__ */ new Set([]), C = /* @__PURE__ */ new Set([]), b = (v, F) => {
26344
26375
  var A;
26345
26376
  (A = v == null ? void 0 : v.reduceProperties) == null || A.call(v, (R, T) => {
26346
- var M, B, k;
26347
- const D = R || F, N = T["x-collection-field"] && o(T["x-collection-field"]), z = T.name.includes("."), L = N && ["hasOne", "hasMany", "belongsTo", "belongsToMany"].includes(N.type), $ = !L && z ? getAssociationPath(T.name) : T.name, w = D === "" || !D ? $ : D + "." + $;
26348
- if (N && !(["hasOne", "hasMany"].includes(N.type) || ["SubForm", "Nester"].includes((M = T["x-component-props"]) == null ? void 0 : M.mode)) && C.add(w), N && (L || z) && T["x-component"] !== "TableField") {
26349
- if (f.add({ name: w, fieldMode: ((B = T["x-component-props"]) == null ? void 0 : B.mode) || "Select" }), ["Nester", "SubTable"].includes((k = T["x-component-props"]) == null ? void 0 : k.mode)) {
26377
+ var M, N, k;
26378
+ const D = R || F, $ = T["x-collection-field"] && o(T["x-collection-field"]), z = T.name.includes("."), L = $ && ["hasOne", "hasMany", "belongsTo", "belongsToMany"].includes($.type), B = !L && z ? getAssociationPath(T.name) : T.name, w = D === "" || !D ? B : D + "." + B;
26379
+ if ($ && !(["hasOne", "hasMany"].includes($.type) || ["SubForm", "Nester"].includes((M = T["x-component-props"]) == null ? void 0 : M.mode)) && C.add(w), $ && (L || z) && T["x-component"] !== "TableField") {
26380
+ if (f.add({ name: w, fieldMode: ((N = T["x-component-props"]) == null ? void 0 : N.mode) || "Select" }), ["Nester", "SubTable"].includes((k = T["x-component-props"]) == null ? void 0 : k.mode)) {
26350
26381
  const j = D && D !== "" ? D + "." + T.name : T.name;
26351
26382
  b(T, j);
26352
26383
  }
@@ -27343,7 +27374,7 @@ const useParseDefaultValue = () => {
27343
27374
  if (n && e && (isVariable(t.default) && e.value == null || e.value === t.default || R)) {
27344
27375
  isVariable(e.value) && (yield e.reset({ forceClear: !0 })), e.loading = !0;
27345
27376
  const D = !t.name.toString().includes(".") && (d == null ? void 0 : d.getField(t.name)), {
27346
- value: N,
27377
+ value: $,
27347
27378
  collectionName: z,
27348
27379
  dataSource: L = "main"
27349
27380
  } = yield n.parseVariable(t.default, o, {
@@ -27358,10 +27389,10 @@ const useParseDefaultValue = () => {
27358
27389
  e.loading = !1;
27359
27390
  return;
27360
27391
  }
27361
- const $ = transformVariableValue(N, {
27392
+ const B = transformVariableValue($, {
27362
27393
  targetCollectionField: D
27363
27394
  });
27364
- $ == null || $ === "" ? e.mounted && (e.setInitialValue(null), yield e.reset({ forceClear: !0 })) : p() ? h === 0 && m($) : e.setInitialValue($), e.loading = !1;
27395
+ B == null || B === "" ? e.mounted && (e.setInitialValue(null), yield e.reset({ forceClear: !0 })) : p() ? h === 0 && m(B) : e.setInitialValue(B), e.loading = !1;
27365
27396
  } else
27366
27397
  !/\{\{.+\}\}/g.test(t.default) && e.setInitialValue && e.setInitialValue(t.default);
27367
27398
  }), v = _.debounce(y, DEBOUNCE_WAIT);
@@ -27369,7 +27400,7 @@ const useParseDefaultValue = () => {
27369
27400
  const R = getVariableName(t.default), T = S(R);
27370
27401
  return T ? (y(), reaction(
27371
27402
  () => {
27372
- const N = { [R]: (T == null ? void 0 : T.ctx) || {} }, z = getPath(t.default), L = getValuesByPath(N, z);
27403
+ const $ = { [R]: (T == null ? void 0 : T.ctx) || {} }, z = getPath(t.default), L = getValuesByPath($, z);
27373
27404
  return L === void 0 ? Math.random() : L;
27374
27405
  },
27375
27406
  () => v({ forceUpdate: !0 }),
@@ -28748,24 +28779,24 @@ function Input$1(e) {
28748
28779
  hideVariableButton: m
28749
28780
  } = e, h = typeof e.scope == "function" ? e.scope() : e.scope, { wrapSSR: g, hashId: f, componentCls: C, rootPrefixCls: b } = useStyles$b({ hideVariableButton: m });
28750
28781
  useAntdInputStyle(`${b}-input`);
28751
- const S = useCompile(), { t: y } = useTranslation(), v = useForm(), [F, A] = React.useState([]), [R, T] = React.useState([]), [D, N] = React.useState(
28782
+ const S = useCompile(), { t: y } = useTranslation(), v = useForm(), [F, A] = React.useState([]), [R, T] = React.useState([]), [D, $] = React.useState(
28752
28783
  m || !!(o && t != null)
28753
- ), z = useMemo(() => parseValue(t, p), [p, t]), L = typeof z == "string", $ = L ? z : "", w = L ? null : z, M = Object.assign(
28784
+ ), z = useMemo(() => parseValue(t, p), [p, t]), L = typeof z == "string", B = L ? z : "", w = L ? null : z, M = Object.assign(
28754
28785
  {
28755
28786
  label: "label",
28756
28787
  value: "value",
28757
28788
  children: "children"
28758
28789
  },
28759
28790
  d != null ? d : {}
28760
- ), B = useMemo(() => o ? {
28791
+ ), N = useMemo(() => o ? {
28761
28792
  value: "$",
28762
28793
  label: y("Constant"),
28763
28794
  [M.value]: "$",
28764
28795
  [M.label]: y("Constant")
28765
- } : i ? getTypedConstantOption($, i, M) : null, [$, i]), k = (H = B == null ? void 0 : B.component) != null ? H : NullComponent, j = Array.isArray(i) ? (X = (W = i.find((Y) => Array.isArray(Y) && Y[0] === $)) == null ? void 0 : W[1]) != null ? X : {} : {};
28796
+ } : i ? getTypedConstantOption(B, i, M) : null, [B, i]), k = (H = N == null ? void 0 : N.component) != null ? H : NullComponent, j = Array.isArray(i) ? (X = (W = i.find((Y) => Array.isArray(Y) && Y[0] === B)) == null ? void 0 : W[1]) != null ? X : {} : {};
28766
28797
  let O;
28767
- t == null ? a ? o && D ? O = ["$"] : O = [""] : o ? O = ["$"] : O = [" ", $] : O = o ? ["$"] : [" ", $], m && (O = ["$"]), useEffect(() => {
28768
- const ee = B != null ? B : {}, { component: Y } = ee, J = K(ee, ["component"]), Q = [
28798
+ t == null ? a ? o && D ? O = ["$"] : O = [""] : o ? O = ["$"] : O = [" ", B] : O = o ? ["$"] : [" ", B], m && (O = ["$"]), useEffect(() => {
28799
+ const ee = N != null ? N : {}, { component: Y } = ee, J = K(ee, ["component"]), Q = [
28769
28800
  ...a ? [
28770
28801
  {
28771
28802
  value: "",
@@ -28774,11 +28805,11 @@ function Input$1(e) {
28774
28805
  [M.label]: y("Null")
28775
28806
  }
28776
28807
  ] : [],
28777
- ...B ? [S(J)] : [],
28808
+ ...N ? [S(J)] : [],
28778
28809
  ...h ? [...h] : []
28779
28810
  ].filter((oe) => !oe.deprecated || (w == null ? void 0 : w[0]) === oe[M.value]);
28780
28811
  A(Q);
28781
- }, [h, w, B, a]);
28812
+ }, [h, w, N, a]);
28782
28813
  const q = (Y) => V(this, null, function* () {
28783
28814
  var Q;
28784
28815
  const J = Y[Y.length - 1];
@@ -28797,29 +28828,29 @@ function Input$1(e) {
28797
28828
  (Y, J) => {
28798
28829
  var Q, ee, oe;
28799
28830
  if (Y[0] === "$") {
28800
- N(!0), w && n(null, J);
28831
+ $(!0), w && n(null, J);
28801
28832
  return;
28802
28833
  } else
28803
- N(!1);
28834
+ $(!1);
28804
28835
  if (Y[0] === "") {
28805
28836
  n(null);
28806
28837
  return;
28807
28838
  }
28808
28839
  if (Y[0] === " ") {
28809
- Y[1] ? Y[1] !== $ && n((oe = (ee = (Q = ConstantTypes[Y[1]]) == null ? void 0 : Q.default) == null ? void 0 : ee.call(Q)) != null ? oe : null, J) : w && n(null, J);
28840
+ Y[1] ? Y[1] !== B && n((oe = (ee = (Q = ConstantTypes[Y[1]]) == null ? void 0 : Q.default) == null ? void 0 : ee.call(Q)) != null ? oe : null, J) : w && n(null, J);
28810
28841
  return;
28811
28842
  }
28812
28843
  n(`{{${Y.join(".")}}}`, J);
28813
28844
  },
28814
- [$, w, n]
28845
+ [B, w, n]
28815
28846
  ), U = useCallback(() => {
28816
28847
  var Y;
28817
- if (N(!!o), (Y = B == null ? void 0 : B.children) != null && Y.length) {
28818
- const J = B.children[0].default();
28848
+ if ($(!!o), (Y = N == null ? void 0 : N.children) != null && Y.length) {
28849
+ const J = N.children[0].default();
28819
28850
  return n(J);
28820
28851
  }
28821
28852
  n(null);
28822
- }, [B]);
28853
+ }, [N]);
28823
28854
  useEffect(() => {
28824
28855
  V(this, null, function* () {
28825
28856
  var ee;
@@ -29224,7 +29255,7 @@ function TextArea(e) {
29224
29255
  }
29225
29256
  }
29226
29257
  }, [F]);
29227
- const N = useCallback(
29258
+ const $ = useCallback(
29228
29259
  function(j) {
29229
29260
  const O = j.filter((U) => !!U.trim()), { current: q } = m;
29230
29261
  if (!q || !O)
@@ -29243,7 +29274,7 @@ function TextArea(e) {
29243
29274
  [b, i, D]
29244
29275
  ), L = useCallback(function({ currentTarget: j }) {
29245
29276
  T(getCurrentRange(j));
29246
- }, []), $ = useCallback(function(j) {
29277
+ }, []), B = useCallback(function(j) {
29247
29278
  j.key === "Enter" && j.preventDefault();
29248
29279
  }, []), w = useCallback(function() {
29249
29280
  S(!0);
@@ -29252,7 +29283,7 @@ function TextArea(e) {
29252
29283
  S(!1), v(!0), T(getCurrentRange(j)), i(getValue(j, u));
29253
29284
  },
29254
29285
  [i, D]
29255
- ), B = useCallback(
29286
+ ), N = useCallback(
29256
29287
  function(j) {
29257
29288
  j.preventDefault();
29258
29289
  const O = j.clipboardData.getData("text/html") || j.clipboardData.getData("text"), q = sanitizeHTML(O, {
@@ -29310,8 +29341,8 @@ function TextArea(e) {
29310
29341
  "aria-label": "textbox",
29311
29342
  onInput: z,
29312
29343
  onBlur: L,
29313
- onKeyDown: $,
29314
- onPaste: B,
29344
+ onKeyDown: B,
29345
+ onPaste: N,
29315
29346
  onCompositionStart: w,
29316
29347
  onCompositionEnd: M,
29317
29348
  placeholder: e.placeholder,
@@ -29349,7 +29380,7 @@ function TextArea(e) {
29349
29380
  {
29350
29381
  options: h,
29351
29382
  setOptions: g,
29352
- onInsert: N,
29383
+ onInsert: $,
29353
29384
  changeOnSelect: a,
29354
29385
  fieldNames: c || defaultFieldNames$2
29355
29386
  }
@@ -32897,7 +32928,111 @@ const tableBlockSettings = new SchemaSettings({
32897
32928
  }, cascadeSelectComponentFieldSettings = new SchemaSettings({
32898
32929
  name: "fieldSettings:component:CascadeSelect",
32899
32930
  items: [fieldComponent$7, titleField$2, ellipsisSettingsItem]
32900
- }), datePickerComponentFieldSettings = new SchemaSettings({
32931
+ }), SchemaSettingsDateRange = function e(t) {
32932
+ var R, T, D, $, z, L, B, w, M, N, k, j, O, q, E, U;
32933
+ 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 = (T = u == null ? void 0 : u.uiSchema) == null ? void 0 : T["x-component-props"]) == null ? void 0 : D.showTime) || !1, p = (($ = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : $.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 = ((B = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : B.timeFormat) || ((M = (w = u == null ? void 0 : u.uiSchema) == null ? void 0 : w["x-component-props"]) == null ? void 0 : M.timeFormat) || "HH:mm:ss", h = ((N = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : N.picker) || ((j = (k = u == null ? void 0 : u.uiSchema) == null ? void 0 : k["x-component-props"]) == null ? void 0 : j.picker) || "date";
32934
+ n["x-read-pretty"] || o.readOnly || o.readPretty;
32935
+ const g = (O = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : O._minDate, f = (q = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : q._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(
32936
+ (G) => /* @__PURE__ */ jsx(
32937
+ SchemaComponent,
32938
+ {
32939
+ schema: {
32940
+ "x-component": "DatePicker",
32941
+ "x-component-props": {
32942
+ dateFormat: p,
32943
+ timeFormat: m,
32944
+ gmt: C,
32945
+ utc: b,
32946
+ picker: h,
32947
+ showTime: d,
32948
+ placeholder: '{{t("Please select time or variable")}}',
32949
+ style: {
32950
+ minWidth: 385
32951
+ }
32952
+ },
32953
+ name: "value",
32954
+ "x-read-pretty": !1,
32955
+ "x-validator": void 0,
32956
+ "x-decorator": void 0
32957
+ }
32958
+ }
32959
+ ),
32960
+ [p, C, h, d, m, b]
32961
+ ), F = useCallback(
32962
+ (G) => /* @__PURE__ */ jsx(
32963
+ VariableInput,
32964
+ P(x({}, G), {
32965
+ form: y,
32966
+ record: S,
32967
+ noDisabled: !0,
32968
+ renderSchemaComponent: v
32969
+ })
32970
+ ),
32971
+ [n, y, S, v]
32972
+ );
32973
+ function A(G) {
32974
+ if (G != null) {
32975
+ if (typeof G == "string")
32976
+ return G;
32977
+ if (typeof G == "object" && Object.prototype.hasOwnProperty.call(G, "value"))
32978
+ return A(G.value);
32979
+ }
32980
+ }
32981
+ return /* @__PURE__ */ jsx(
32982
+ SchemaSettingsModalItem,
32983
+ {
32984
+ title: i("Date range limit"),
32985
+ schema: {
32986
+ type: "object",
32987
+ "x-decorator": "",
32988
+ properties: {
32989
+ _minDate: {
32990
+ type: "string",
32991
+ title: '{{t("MinDate")}}',
32992
+ "x-decorator": "FormItem",
32993
+ "x-component": F,
32994
+ "x-component-props": {
32995
+ name: "_minDate"
32996
+ },
32997
+ //日期和使用变量设置的默认值不同
32998
+ default: isVariable(g) ? g : { value: g }
32999
+ },
33000
+ _maxDate: {
33001
+ type: "string",
33002
+ title: '{{t("MaxDate")}}',
33003
+ "x-decorator": "FormItem",
33004
+ "x-component": F,
33005
+ "x-component-props": {
33006
+ name: "_maxDate"
33007
+ },
33008
+ default: isVariable(f) ? f : { value: f }
33009
+ }
33010
+ }
33011
+ },
33012
+ onSubmit: (G) => {
33013
+ const H = {
33014
+ "x-uid": n["x-uid"]
33015
+ };
33016
+ H["x-component-props"] = o.componentProps || {}, n["x-component-props"] = P(x({}, o.componentProps || {}), {
33017
+ _maxDate: A(G == null ? void 0 : G._maxDate),
33018
+ _minDate: A(G == null ? void 0 : G._minDate)
33019
+ }), H["x-component-props"] = n["x-component-props"], o.componentProps = n["x-component-props"];
33020
+ const W = o.path.entire.split(".");
33021
+ W.pop();
33022
+ const X = W.join(".");
33023
+ o.query(`${X}.*[0:].${n.name}`).forEach((Y) => {
33024
+ Y.props.name === n.name && Y.setComponentProps({
33025
+ _maxDate: A(G == null ? void 0 : G._maxDate),
33026
+ _minDate: A(G == null ? void 0 : G._minDate)
33027
+ });
33028
+ }), r.emit("patch", {
33029
+ schema: H
33030
+ }), r.refresh();
33031
+ },
33032
+ ModalContextProvider: (G) => /* @__PURE__ */ jsx(FlagProvider, { isInSubForm: l, isInSubTable: c, isInFormDataTemplate: !0, children: G.children })
33033
+ }
33034
+ );
33035
+ }, datePickerComponentFieldSettings = new SchemaSettings({
32901
33036
  name: "fieldSettings:component:DatePicker",
32902
33037
  items: [
32903
33038
  {
@@ -32910,6 +33045,20 @@ const tableBlockSettings = new SchemaSettings({
32910
33045
  };
32911
33046
  }
32912
33047
  },
33048
+ {
33049
+ name: "dateScopeSelect",
33050
+ Component: SchemaSettingsDateRange,
33051
+ useComponentProps() {
33052
+ const e = useFieldSchema(), { fieldSchema: t } = useColumnSchema$1();
33053
+ return {
33054
+ fieldSchema: t || e
33055
+ };
33056
+ },
33057
+ useVisible() {
33058
+ const { fieldSchema: e } = useColumnSchema$1(), t = useFieldSchema(), n = e || t;
33059
+ return !(n != null && n["x-read-pretty"]);
33060
+ }
33061
+ },
32913
33062
  ellipsisSettingsItem,
32914
33063
  enableLinkSettingsItem,
32915
33064
  openModeSettingsItem
@@ -34385,22 +34534,22 @@ const variablesStore = {}, getFieldPath = (e, t) => {
34385
34534
  const y = C.split("."), v = y[0], F = mergeVariableToCollectionNameWithLocalVariables(variablesStore, b);
34386
34535
  let A = mergeCtxWithLocalVariables(n.current, b);
34387
34536
  const { fieldPath: R, dataSource: T, variableOption: D } = getFieldPath(v, F);
34388
- let N = R;
34537
+ let $ = R;
34389
34538
  const { fieldPath: z } = getFieldPath(C, F), L = y.length === 1 ? D == null ? void 0 : D.collectionName : (w = r(z, T)) == null ? void 0 : w.target;
34390
34539
  if (!(v in A))
34391
34540
  throw new Error(`VariablesProvider: ${v} is not found`);
34392
- for (let B = 0; B < y.length; B++) {
34541
+ for (let N = 0; N < y.length; N++) {
34393
34542
  if (A == null)
34394
34543
  return {
34395
34544
  value: A === void 0 ? D == null ? void 0 : D.defaultValue : A,
34396
34545
  dataSource: T,
34397
34546
  collectionName: L
34398
34547
  };
34399
- const k = y[B], { fieldPath: j } = getFieldPath(y.slice(0, B + 1).join("."), F), O = r(j, T), q = (M = i(N, T)) == null ? void 0 : M.getPrimaryKey();
34548
+ const k = y[N], { fieldPath: j } = getFieldPath(y.slice(0, N + 1).join("."), F), O = r(j, T), q = (M = i($, T)) == null ? void 0 : M.getPrimaryKey();
34400
34549
  if (Array.isArray(A)) {
34401
34550
  const E = A.map((U) => {
34402
34551
  if (!(S != null && S.doNotRequest) && shouldToRequest(U == null ? void 0 : U[k]) && (U == null ? void 0 : U[q]) != null && O != null && O.target) {
34403
- const G = `/${N}/${U[O.sourceKey || q]}/${k}:${getAction(O.type)}`;
34552
+ const G = `/${$}/${U[O.sourceKey || q]}/${k}:${getAction(O.type)}`;
34404
34553
  if (hasRequested(G))
34405
34554
  return getRequested(G);
34406
34555
  const H = o.request({
@@ -34416,7 +34565,7 @@ const variablesStore = {}, getFieldPath = (e, t) => {
34416
34565
  });
34417
34566
  A = removeThroughCollectionFields(_.flatten(yield Promise.all(E)), O);
34418
34567
  } else if (!(S != null && S.doNotRequest) && shouldToRequest(A[k]) && A[q] != null && (O != null && O.target)) {
34419
- const E = `/${N}/${A[O.sourceKey || q]}/${k}:${getAction(O.type)}`;
34568
+ const E = `/${$}/${A[O.sourceKey || q]}/${k}:${getAction(O.type)}`;
34420
34569
  let U = null;
34421
34570
  if (hasRequested(E))
34422
34571
  U = yield getRequested(E);
@@ -34433,13 +34582,13 @@ const variablesStore = {}, getFieldPath = (e, t) => {
34433
34582
  raw(A)[k] || (raw(A)[k] = U.data.data), A = removeThroughCollectionFields(getValuesByPath(A, k), O);
34434
34583
  } else
34435
34584
  A = removeThroughCollectionFields(getValuesByPath(A, k), O);
34436
- O != null && O.target && (N = O.target);
34585
+ O != null && O.target && ($ = O.target);
34437
34586
  }
34438
- const $ = a(
34587
+ const B = a(
34439
34588
  _.isFunction(A) ? A({ fieldOperator: S == null ? void 0 : S.fieldOperator, isParsingVariable: !0 }) : A
34440
34589
  );
34441
34590
  return {
34442
- value: $ === void 0 ? D.defaultValue : $,
34591
+ value: B === void 0 ? D.defaultValue : B,
34443
34592
  dataSource: T,
34444
34593
  collectionName: L
34445
34594
  };
@@ -34803,7 +34952,7 @@ function addAppVersion(e, t) {
34803
34952
  addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
34804
34953
  }), e;
34805
34954
  }
34806
- const name = "@nocobase/client", version = "1.5.0-beta.14", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
34955
+ const name = "@nocobase/client", version = "1.5.0-beta.16", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
34807
34956
  "@ahooksjs/use-url-state": "3.5.1",
34808
34957
  "@ant-design/cssinjs": "^1.11.1",
34809
34958
  "@ant-design/icons": "^5.1.4",
@@ -34825,9 +34974,9 @@ const name = "@nocobase/client", version = "1.5.0-beta.14", license = "AGPL-3.0"
34825
34974
  "@formily/reactive-react": "^2.2.27",
34826
34975
  "@formily/shared": "^2.2.27",
34827
34976
  "@formily/validator": "^2.2.27",
34828
- "@nocobase/evaluators": "1.5.0-beta.14",
34829
- "@nocobase/sdk": "1.5.0-beta.14",
34830
- "@nocobase/utils": "1.5.0-beta.14",
34977
+ "@nocobase/evaluators": "1.5.0-beta.16",
34978
+ "@nocobase/sdk": "1.5.0-beta.16",
34979
+ "@nocobase/utils": "1.5.0-beta.16",
34831
34980
  ahooks: "^3.7.2",
34832
34981
  antd: "5.12.8",
34833
34982
  "antd-style": "3.7.1",
@@ -35594,8 +35743,8 @@ const useFieldComponentOptions = () => {
35594
35743
  const { refresh: t } = useDesignable(), n = useAPIClient(), { t: o } = useTranslation();
35595
35744
  return useCallback(
35596
35745
  (r) => {
35597
- var f, C, b, S, y, v, F, A, R, T, D, N, z, L, $;
35598
- const { active: i, over: a } = r, l = (C = (f = i == null ? void 0 : i.data) == null ? void 0 : f.current) == null ? void 0 : C.schema, c = (S = (b = a == null ? void 0 : a.data) == null ? void 0 : b.current) == null ? void 0 : S.schema, u = (v = (y = a == null ? void 0 : a.data) == null ? void 0 : y.current) == null ? void 0 : v.insertAdjacent, d = (A = (F = a == null ? void 0 : a.data) == null ? void 0 : F.current) == null ? void 0 : A.breakRemoveOn, p = (T = (R = a == null ? void 0 : a.data) == null ? void 0 : R.current) == null ? void 0 : T.wrapSchema, m = (N = (D = a == null ? void 0 : a.data) == null ? void 0 : D.current) == null ? void 0 : N.onSuccess, h = ($ = (L = (z = a == null ? void 0 : a.data) == null ? void 0 : z.current) == null ? void 0 : L.removeParentsIfNoChildren) != null ? $ : !0;
35746
+ var f, C, b, S, y, v, F, A, R, T, D, $, z, L, B;
35747
+ const { active: i, over: a } = r, l = (C = (f = i == null ? void 0 : i.data) == null ? void 0 : f.current) == null ? void 0 : C.schema, c = (S = (b = a == null ? void 0 : a.data) == null ? void 0 : b.current) == null ? void 0 : S.schema, u = (v = (y = a == null ? void 0 : a.data) == null ? void 0 : y.current) == null ? void 0 : v.insertAdjacent, d = (A = (F = a == null ? void 0 : a.data) == null ? void 0 : F.current) == null ? void 0 : A.breakRemoveOn, p = (T = (R = a == null ? void 0 : a.data) == null ? void 0 : R.current) == null ? void 0 : T.wrapSchema, m = ($ = (D = a == null ? void 0 : a.data) == null ? void 0 : D.current) == null ? void 0 : $.onSuccess, h = (B = (L = (z = a == null ? void 0 : a.data) == null ? void 0 : z.current) == null ? void 0 : L.removeParentsIfNoChildren) != null ? B : !0;
35599
35748
  if (!l || !c) {
35600
35749
  e == null || e(r);
35601
35750
  return;
@@ -36130,30 +36279,30 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
36130
36279
  "dataSource",
36131
36280
  "toOptionsItem",
36132
36281
  "popupMatchSelectWidth"
36133
- ]), C = useDataSourceKey(), b = useDataSourceHeaders(m || C), [S, y] = useState(!1), v = useRef(!1), F = useFieldSchema(), A = ((X = F["x-component-props"]) == null ? void 0 : X.addMode) === "quickAdd", { getField: R } = useCollection_deprecated(), T = useRef(null), { getCollectionJoinField: D, getInterface: N } = useCollectionManager_deprecated(), z = F["x-collection-field"] || F.name, L = R(z) || D(z), $ = u || (L == null ? void 0 : L.target) && (t == null ? void 0 : t.label) && D(`${L.target}.${t.label}`), w = useMemo(() => {
36282
+ ]), C = useDataSourceKey(), b = useDataSourceHeaders(m || C), [S, y] = useState(!1), v = useRef(!1), F = useFieldSchema(), A = ((X = F["x-component-props"]) == null ? void 0 : X.addMode) === "quickAdd", { getField: R } = useCollection_deprecated(), T = useRef(null), { getCollectionJoinField: D, getInterface: $ } = useCollectionManager_deprecated(), z = F["x-collection-field"] || F.name, L = R(z) || D(z), B = u || (L == null ? void 0 : L.target) && (t == null ? void 0 : t.label) && D(`${L.target}.${t.label}`), w = useMemo(() => {
36134
36283
  var J;
36135
- if ($ != null && $.interface) {
36136
- const Q = N($.interface), ee = ((J = Q == null ? void 0 : Q.filterable) == null ? void 0 : J.operators[0].value) || "$includes";
36137
- return $.type === "string" ? "$includes" : ee;
36284
+ if (B != null && B.interface) {
36285
+ const Q = $(B.interface), ee = ((J = Q == null ? void 0 : Q.filterable) == null ? void 0 : J.operators[0].value) || "$includes";
36286
+ return B.type === "string" ? "$includes" : ee;
36138
36287
  }
36139
36288
  return "$includes";
36140
- }, [$]), M = useCompile(), B = useCallback(
36289
+ }, [B]), M = useCompile(), N = useCallback(
36141
36290
  (J) => {
36142
36291
  try {
36143
36292
  return J.filter((Q) => ["number", "string"].includes(typeof Q[t.value]) || !Q[t.value]).map((Q) => {
36144
36293
  var oe;
36145
36294
  let ee = M(Q[t.label]);
36146
- if ((oe = $ == null ? void 0 : $.uiSchema) != null && oe.enum)
36295
+ if ((oe = B == null ? void 0 : B.uiSchema) != null && oe.enum)
36147
36296
  if (Array.isArray(ee))
36148
36297
  ee = ee.map((te, ie) => {
36149
- const ae = $.uiSchema.enum.find((ue) => ue.value === te);
36298
+ const ae = B.uiSchema.enum.find((ue) => ue.value === te);
36150
36299
  return ae ? /* @__PURE__ */ jsx(Tag, { role: "button", color: ae.color, style: { marginRight: 3 }, children: (ae == null ? void 0 : ae.label) || te }, ie) : /* @__PURE__ */ jsx(Tag, { role: "button", children: te }, te);
36151
36300
  }).reverse();
36152
36301
  else {
36153
- const te = $.uiSchema.enum.find((ie) => ie.value === ee);
36302
+ const te = B.uiSchema.enum.find((ie) => ie.value === ee);
36154
36303
  te && (ee = /* @__PURE__ */ jsx(Tag, { role: "button", color: te.color, children: te.label }));
36155
36304
  }
36156
- return ($ == null ? void 0 : $.type) === "date" && (ee = dayjs(ee).format("YYYY-MM-DD")), c ? c({
36305
+ return (B == null ? void 0 : B.type) === "date" && (ee = dayjs(ee).format("YYYY-MM-DD")), c ? c({
36157
36306
  [t.label]: ee || EMPTY$1,
36158
36307
  [t.value]: Q[t.value]
36159
36308
  }) : P(x({}, Q), {
@@ -36165,7 +36314,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
36165
36314
  return console.error(Q), J;
36166
36315
  }
36167
36316
  },
36168
- [$ == null ? void 0 : $.uiSchema, t]
36317
+ [B == null ? void 0 : B.uiSchema, t]
36169
36318
  ), { data: k, run: j, loading: O } = useRequest(
36170
36319
  P(x({
36171
36320
  action: "list"
@@ -36237,7 +36386,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
36237
36386
  defaultValue: i
36238
36387
  }, f), {
36239
36388
  loading: k ? O : !0,
36240
- options: h(B(G)),
36389
+ options: h(N(G)),
36241
36390
  rawOptions: G,
36242
36391
  dropdownRender: (J) => {
36243
36392
  const Q = G.some((ee) => ee[t.label] === T.current);
@@ -36315,11 +36464,11 @@ const useFormDataTemplates = () => {
36315
36464
  d(A), m(null), t == null || t.reset();
36316
36465
  }), []), v = useCallback((A, R, T) => V(void 0, null, function* () {
36317
36466
  const D = P(x({}, R), { dataId: A });
36318
- m(R), fetchTemplateData(h, D, T).then((N) => (t && N && (t.reset(), t.__template = !0, forEach(N, (z, L) => {
36319
- var $;
36320
- z && (t.values[L] = z, ($ = t == null ? void 0 : t.setInitialValuesIn) == null || $.call(t, L, z));
36321
- })), N)).catch((N) => {
36322
- console.error(N);
36467
+ m(R), fetchTemplateData(h, D, T).then(($) => (t && $ && (t.reset(), t.__template = !0, forEach($, (z, L) => {
36468
+ var B;
36469
+ z && (t.values[L] = z, (B = t == null ? void 0 : t.setInitialValuesIn) == null || B.call(t, L, z));
36470
+ })), $)).catch(($) => {
36471
+ console.error($);
36323
36472
  });
36324
36473
  }), []);
36325
36474
  if (!i || !r)
@@ -37619,16 +37768,16 @@ const AppendsTreeSelect = (e) => {
37619
37768
  "filter",
37620
37769
  "rootOption",
37621
37770
  "loadData"
37622
- ]), d = useCompile(), { t: p } = useTranslation(), [m, h] = useState({}), g = i({ collection: r }), [f, C] = parseCollectionName(g), b = useApp(), { collectionManager: S } = b.dataSourceManager.getDataSource(f), y = (L, $) => {
37771
+ ]), d = useCompile(), { t: p } = useTranslation(), [m, h] = useState({}), g = i({ collection: r }), [f, C] = parseCollectionName(g), b = useApp(), { collectionManager: S } = b.dataSourceManager.getDataSource(f), y = (L, B) => {
37623
37772
  const w = S.getCollection(L);
37624
- return w ? w.getAllFields($) : [];
37773
+ return w ? w.getAllFields(B) : [];
37625
37774
  }, v = Object.values(m), F = useMemo(() => e.multiple ? (n || []).map((L) => m[L]).filter(Boolean) : n, [n, e.multiple, m]), A = useCallback(
37626
37775
  (L) => V(void 0, null, function* () {
37627
37776
  if (c != null)
37628
37777
  return c(L);
37629
37778
  if (!L.isLeaf && L.loadChildren) {
37630
- const $ = L.loadChildren(L);
37631
- h((w) => $.reduce((M, B) => Object.assign(M, { [B.value]: B }), x({}, w)));
37779
+ const B = L.loadChildren(L);
37780
+ h((w) => B.reduce((M, N) => Object.assign(M, { [N.value]: N }), x({}, w)));
37632
37781
  }
37633
37782
  }),
37634
37783
  [c]
@@ -37640,28 +37789,28 @@ const AppendsTreeSelect = (e) => {
37640
37789
  title: l.label,
37641
37790
  fullTitle: l.label,
37642
37791
  isLeaf: !1
37643
- }) : null, w = (c === null ? [] : getCollectionFieldOptions.call({ compile: d, getCollectionFields: y, filter: a }, C, L)).reduce((M, B) => Object.assign(M, { [B.value]: B }), {});
37792
+ }) : null, w = (c === null ? [] : getCollectionFieldOptions.call({ compile: d, getCollectionFields: y, filter: a }, C, L)).reduce((M, N) => Object.assign(M, { [N.value]: N }), {});
37644
37793
  L && (w[L.value] = L), h(w);
37645
37794
  }, [g, l, a, c]), useEffect(() => {
37646
37795
  const L = e.multiple ? n : n ? [n] : [];
37647
37796
  if (!(L != null && L.length) || L.every((w) => !!m[w]))
37648
37797
  return;
37649
- const $ = [];
37798
+ const B = [];
37650
37799
  L.forEach((w) => {
37651
37800
  const M = w.split(".");
37652
- let B = m[M[0]];
37653
- for (let k = 1; k < M.length && B; k++) {
37801
+ let N = m[M[0]];
37802
+ for (let k = 1; k < M.length && N; k++) {
37654
37803
  const j = M.slice(0, k + 1).join(".");
37655
37804
  if (m[j]) {
37656
- B = m[j];
37805
+ N = m[j];
37657
37806
  break;
37658
37807
  }
37659
- if (!B.isLeaf && B.loadChildren) {
37660
- const O = B.loadChildren(B);
37661
- O != null && O.length && ($.push(...O), B = O.find((q) => q.value === M.slice(0, k + 1).join(".")));
37808
+ if (!N.isLeaf && N.loadChildren) {
37809
+ const O = N.loadChildren(N);
37810
+ O != null && O.length && (B.push(...O), N = O.find((q) => q.value === M.slice(0, k + 1).join(".")));
37662
37811
  }
37663
37812
  }
37664
- }), h((w) => $.reduce((M, B) => Object.assign(M, { [B.value]: B }), x({}, w)));
37813
+ }), h((w) => B.reduce((M, N) => Object.assign(M, { [N.value]: N }), x({}, w)));
37665
37814
  }, [n, v.length, e.multiple]);
37666
37815
  const R = useCallback(
37667
37816
  (L) => {
@@ -37669,15 +37818,15 @@ const AppendsTreeSelect = (e) => {
37669
37818
  o(L);
37670
37819
  return;
37671
37820
  }
37672
- const $ = L.map((B) => B.value).filter(Boolean), w = new Set($), M = F.find((B) => !w.has(B.value));
37821
+ const B = L.map((N) => N.value).filter(Boolean), w = new Set(B), M = F.find((N) => !w.has(N.value));
37673
37822
  if (M) {
37674
- const B = `${M.value}.`;
37823
+ const N = `${M.value}.`;
37675
37824
  Object.keys(m).forEach((k) => {
37676
- k.startsWith(B) && w.delete(k);
37825
+ k.startsWith(N) && w.delete(k);
37677
37826
  });
37678
37827
  } else
37679
- $.forEach((B) => {
37680
- const k = B.split(".");
37828
+ B.forEach((N) => {
37829
+ const k = N.split(".");
37681
37830
  if (k.length)
37682
37831
  for (let j = 1; j <= k.length; j++)
37683
37832
  w.add(k.slice(0, j).join("."));
@@ -37688,14 +37837,14 @@ const AppendsTreeSelect = (e) => {
37688
37837
  ), T = useCallback(
37689
37838
  (L) => {
37690
37839
  var j;
37691
- const { value: $, onClose: w, disabled: M, closable: B } = L;
37692
- if (!$)
37840
+ const { value: B, onClose: w, disabled: M, closable: N } = L;
37841
+ if (!B)
37693
37842
  return null;
37694
- const { fullTitle: k } = (j = m[$]) != null ? j : {};
37695
- return /* @__PURE__ */ jsx(Tag, { closable: B && !M, onClose: w, children: k == null ? void 0 : k.join(" / ") });
37843
+ const { fullTitle: k } = (j = m[B]) != null ? j : {};
37844
+ return /* @__PURE__ */ jsx(Tag, { closable: N && !M, onClose: w, children: k == null ? void 0 : k.join(" / ") });
37696
37845
  },
37697
37846
  [m]
37698
- ), D = Array.isArray(F) ? F.filter((L) => L.value in m) : F, N = e.multiple ? n : n != null ? [n] : [];
37847
+ ), D = Array.isArray(F) ? F.filter((L) => L.value in m) : F, $ = e.multiple ? n : n != null ? [n] : [];
37699
37848
  return /* @__PURE__ */ jsx(
37700
37849
  TreeSelect$2,
37701
37850
  x({
@@ -37704,7 +37853,7 @@ const AppendsTreeSelect = (e) => {
37704
37853
  value: D,
37705
37854
  placeholder: p("Select field"),
37706
37855
  showCheckedStrategy: TreeSelect$2.SHOW_ALL,
37707
- treeDefaultExpandedKeys: N,
37856
+ treeDefaultExpandedKeys: $,
37708
37857
  allowClear: {
37709
37858
  clearIcon: /* @__PURE__ */ jsx(CloseCircleFilled, { role: "button", "aria-label": "icon-close" })
37710
37859
  },
@@ -37740,8 +37889,8 @@ const AppendsTreeSelect = (e) => {
37740
37889
  const R = uid();
37741
37890
  return f.addEffects(R, () => {
37742
37891
  onFieldInputValueChange("*", (T) => {
37743
- var N, z, L, $, w;
37744
- (filterAnalyses((L = (z = (N = r.componentProps) == null ? void 0 : N.service) == null ? void 0 : z.params) == null ? void 0 : L.filter) || []).includes(($ = T == null ? void 0 : T.props) == null ? void 0 : $.name) && r.value && isEqual(T == null ? void 0 : T.indexes, r == null ? void 0 : r.indexes) && ((w = T == null ? void 0 : T.props) == null ? void 0 : w.name) !== r.props.name && (r.setValue(void 0), p(void 0));
37892
+ var $, z, L, B, w;
37893
+ (filterAnalyses((L = (z = ($ = r.componentProps) == null ? void 0 : $.service) == null ? void 0 : z.params) == null ? void 0 : L.filter) || []).includes((B = T == null ? void 0 : T.props) == null ? void 0 : B.name) && r.value && isEqual(T == null ? void 0 : T.indexes, r == null ? void 0 : r.indexes) && ((w = T == null ? void 0 : T.props) == null ? void 0 : w.name) !== r.props.name && (r.setValue(void 0), p(void 0));
37745
37894
  });
37746
37895
  }), () => {
37747
37896
  f.removeEffects(R);
@@ -37750,18 +37899,18 @@ const AppendsTreeSelect = (e) => {
37750
37899
  const y = (R) => V(void 0, null, function* () {
37751
37900
  var z, L;
37752
37901
  const { search: T, callBack: D } = R, {
37753
- data: { data: N }
37902
+ data: { data: $ }
37754
37903
  } = yield b.create({
37755
37904
  values: {
37756
37905
  [((L = (z = r == null ? void 0 : r.componentProps) == null ? void 0 : z.fieldNames) == null ? void 0 : L.label) || "id"]: T
37757
37906
  }
37758
37907
  });
37759
- if (N) {
37908
+ if ($) {
37760
37909
  if (["m2m", "o2m"].includes(l == null ? void 0 : l.interface) && g !== !1) {
37761
- const $ = f.getValuesIn(r.path) || [];
37762
- $.push(N), f.setValuesIn(r.path, $), r.onInput($);
37910
+ const B = f.getValuesIn(r.path) || [];
37911
+ B.push($), f.setValuesIn(r.path, B), r.onInput(B);
37763
37912
  } else
37764
- f.setValuesIn(r.path, N), r.onInput(N);
37913
+ f.setValuesIn(r.path, $), r.onInput($);
37765
37914
  isFunction(D) && (D == null || D()), message.success(h("Saved successfully"));
37766
37915
  }
37767
37916
  }), v = (R) => /* @__PURE__ */ jsxs(
@@ -38347,17 +38496,17 @@ function Uploader(n) {
38347
38496
  (R) => {
38348
38497
  var T;
38349
38498
  if (i) {
38350
- const D = R.fileList.filter((N) => N.status === "done");
38499
+ const D = R.fileList.filter(($) => $.status === "done");
38351
38500
  if (D.length) {
38352
- const N = [...a != null ? a : [], ...D.map((z) => {
38501
+ const $ = [...a != null ? a : [], ...D.map((z) => {
38353
38502
  var L;
38354
38503
  return c((L = z.response) == null ? void 0 : L.data);
38355
38504
  })];
38356
- l == null || l(N);
38505
+ l == null || l($);
38357
38506
  }
38358
- d(R.fileList.filter((N) => N.status !== "done").map(normalizeFile));
38507
+ d(R.fileList.filter(($) => $.status !== "done").map(normalizeFile));
38359
38508
  } else {
38360
- const D = R.fileList.find((N) => N.uid === R.file.uid);
38509
+ const D = R.fileList.find(($) => $.uid === R.file.uid);
38361
38510
  D.status === "done" ? (l == null || l(c((T = D.response) == null ? void 0 : T.data)), d([])) : d([normalizeFile(D)]);
38362
38511
  }
38363
38512
  },
@@ -38679,16 +38828,16 @@ function FileSelector(e) {
38679
38828
  );
38680
38829
  }
38681
38830
  const InternalFileManager = (e) => {
38682
- var D, N;
38831
+ var D, $;
38683
38832
  const T = e, { value: t, multiple: n, onChange: o } = T, r = K(T, ["value", "multiple", "onChange"]), i = useFieldSchema(), [a, l] = useState(!1), [c, u] = useState([]), d = useInsertSchema$1("Selector"), p = useFieldNames$1(e), { designable: m } = useDesignable(), h = useField(), [g, f] = useState([]), { getField: C } = useCollection_deprecated(), b = C(h.props.name), S = useLabelUiSchema$1(b == null ? void 0 : b.target, (p == null ? void 0 : p.label) || "label"), y = useCompile(), { modalProps: v } = useActionContext(), F = (z) => {
38684
- z.stopPropagation(), z.preventDefault(), m ? d(schema$1.Selector) : i.reduceProperties(($, w) => w["x-component"] === "AssociationField.Selector" ? w : $, null) || i.addProperty("selector", schema$1.Selector), l(!0), u([]);
38833
+ z.stopPropagation(), z.preventDefault(), m ? d(schema$1.Selector) : i.reduceProperties((B, w) => w["x-component"] === "AssociationField.Selector" ? w : B, null) || i.addProperty("selector", schema$1.Selector), l(!0), u([]);
38685
38834
  };
38686
38835
  useEffect(() => {
38687
38836
  if (t && Object.keys(t).length > 0) {
38688
38837
  const z = (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((L) => {
38689
- const $ = L[p.label];
38838
+ const B = L[p.label];
38690
38839
  return P(x({}, L), {
38691
- [p.label]: getLabelFormatValue$1(y(S), y($))
38840
+ [p.label]: getLabelFormatValue$1(y(S), y(B))
38692
38841
  });
38693
38842
  });
38694
38843
  f(z);
@@ -38708,10 +38857,10 @@ const InternalFileManager = (e) => {
38708
38857
  setSelectedRows: u,
38709
38858
  collectionField: b
38710
38859
  }, R = () => {
38711
- const { setVisible: z } = useActionContext(), { multiple: L, selectedRows: $, onChange: w, options: M, collectionField: B } = useContext(RecordPickerContext);
38860
+ const { setVisible: z } = useActionContext(), { multiple: L, selectedRows: B, onChange: w, options: M, collectionField: N } = useContext(RecordPickerContext);
38712
38861
  return {
38713
38862
  onClick() {
38714
- w(L ? unionBy($, M, (B == null ? void 0 : B.targetKey) || "id") : ($ == null ? void 0 : $[0]) || null), z(!1);
38863
+ w(L ? unionBy(B, M, (N == null ? void 0 : N.targetKey) || "id") : (B == null ? void 0 : B[0]) || null), z(!1);
38715
38864
  }
38716
38865
  };
38717
38866
  };
@@ -38722,7 +38871,7 @@ const InternalFileManager = (e) => {
38722
38871
  value: n ? g : g == null ? void 0 : g[0],
38723
38872
  multiple: n,
38724
38873
  quickUpload: ((D = i["x-component-props"]) == null ? void 0 : D.quickUpload) !== !1,
38725
- selectFile: ((N = i["x-component-props"]) == null ? void 0 : N.selectFile) !== !1,
38874
+ selectFile: (($ = i["x-component-props"]) == null ? void 0 : $.selectFile) !== !1,
38726
38875
  action: `${b == null ? void 0 : b.target}:create`,
38727
38876
  onSelect: F,
38728
38877
  onChange: o
@@ -38767,27 +38916,27 @@ const InternalFileManager = (e) => {
38767
38916
  const { data: t, mapOptions: n, onChange: o, value: r } = e, [i, a] = useState([
38768
38917
  { key: void 0, children: [], value: null }
38769
38918
  ]), [l, c] = useState(t), [u, d] = useState(!1), p = useCompile(), m = useAPIClient(), h = useServiceOptions$1(e), { options: g, field: f } = useAssociationFieldContext(), C = m.resource(g.target), { getCollectionJoinField: b, getInterface: S } = useCollectionManager_deprecated(), y = (L = f == null ? void 0 : f.componentProps) == null ? void 0 : L.fieldNames, v = (g == null ? void 0 : g.target) && (y == null ? void 0 : y.label) && b(`${g.target}.${y.label}`), F = useMemo(() => {
38770
- var $, w;
38771
- return v != null && v.interface && ((w = ($ = S(v.interface)) == null ? void 0 : $.filterable) == null ? void 0 : w.operators[0].value) || "$includes";
38919
+ var B, w;
38920
+ return v != null && v.interface && ((w = (B = S(v.interface)) == null ? void 0 : B.filterable) == null ? void 0 : w.operators[0].value) || "$includes";
38772
38921
  }, [v]), A = useField();
38773
38922
  useEffect(() => {
38774
- var $;
38923
+ var B;
38775
38924
  if (r) {
38776
- const w = Array.isArray(r) ? extractLastNonNullValueObjects(r == null ? void 0 : r.filter((B) => B.value), !0) : transformNestedData(r), M = ($ = w == null ? void 0 : w.map) == null ? void 0 : $.call(w, (B) => ({
38777
- key: B.parentId,
38925
+ const w = Array.isArray(r) ? extractLastNonNullValueObjects(r == null ? void 0 : r.filter((N) => N.value), !0) : transformNestedData(r), M = (B = w == null ? void 0 : w.map) == null ? void 0 : B.call(w, (N) => ({
38926
+ key: N.parentId,
38778
38927
  children: [],
38779
- value: B
38928
+ value: N
38780
38929
  }));
38781
38930
  a(M);
38782
38931
  }
38783
38932
  }, []);
38784
38933
  const R = useCallback(
38785
- ($) => {
38934
+ (B) => {
38786
38935
  try {
38787
- return $ == null ? void 0 : $.filter((w) => ["number", "string"].includes(typeof w[y.value])).map((w) => {
38788
- var B, k, j;
38936
+ return B == null ? void 0 : B.filter((w) => ["number", "string"].includes(typeof w[y.value])).map((w) => {
38937
+ var N, k, j;
38789
38938
  let M = p(w[y.label]);
38790
- if ((B = v == null ? void 0 : v.uiSchema) != null && B.enum)
38939
+ if ((N = v == null ? void 0 : v.uiSchema) != null && N.enum)
38791
38940
  if (Array.isArray(M))
38792
38941
  M = M.map((O, q) => {
38793
38942
  var U, G;
@@ -38807,52 +38956,52 @@ const InternalFileManager = (e) => {
38807
38956
  });
38808
38957
  }).filter(Boolean);
38809
38958
  } catch (w) {
38810
- return console.error(w), $;
38959
+ return console.error(w), B;
38811
38960
  }
38812
38961
  },
38813
38962
  [v == null ? void 0 : v.uiSchema, y]
38814
- ), T = ($) => V(void 0, null, function* () {
38963
+ ), T = (B) => V(void 0, null, function* () {
38815
38964
  var M;
38816
38965
  const w = yield C.list({
38817
38966
  pageSize: 200,
38818
38967
  params: h == null ? void 0 : h.params,
38819
- filter: mergeFilter([$]),
38820
- tree: $.parentId ? void 0 : !0
38968
+ filter: mergeFilter([B]),
38969
+ tree: B.parentId ? void 0 : !0
38821
38970
  });
38822
38971
  return (M = w == null ? void 0 : w.data) == null ? void 0 : M.data;
38823
- }), D = ($, w, M) => V(void 0, null, function* () {
38824
- const B = yield T({ parentId: w == null ? void 0 : w.id }), k = [...i];
38825
- if (k.splice(M + 1), k[M] = P(x({}, k[M]), { value: w }), w != null && w.id && (k[M + 1] = { key: w == null ? void 0 : w.id, children: (B == null ? void 0 : B.length) > 0 ? B : null }), a(k), ["o2m", "m2m"].includes(g.interface)) {
38972
+ }), D = (B, w, M) => V(void 0, null, function* () {
38973
+ const N = yield T({ parentId: w == null ? void 0 : w.id }), k = [...i];
38974
+ if (k.splice(M + 1), k[M] = P(x({}, k[M]), { value: w }), w != null && w.id && (k[M + 1] = { key: w == null ? void 0 : w.id, children: (N == null ? void 0 : N.length) > 0 ? N : null }), a(k), ["o2m", "m2m"].includes(g.interface)) {
38826
38975
  const j = Array.isArray(f.fieldValue) ? f.fieldValue : [];
38827
38976
  j[A.index] = w, f.fieldValue = j;
38828
38977
  } else
38829
38978
  f.value = w;
38830
38979
  o == null || o(k);
38831
- }), N = ($, w, M) => V(void 0, null, function* () {
38832
- var B, k, j;
38833
- if ($) {
38980
+ }), $ = (B, w, M) => V(void 0, null, function* () {
38981
+ var N, k, j;
38982
+ if (B) {
38834
38983
  d(!0);
38835
38984
  const O = yield T({ parentId: w == null ? void 0 : w.key });
38836
- if (d(!1), c(O), M === (i == null ? void 0 : i.length) - 1 && ((B = w == null ? void 0 : w.value) != null && B.id)) {
38985
+ if (d(!1), c(O), M === (i == null ? void 0 : i.length) - 1 && ((N = w == null ? void 0 : w.value) != null && N.id)) {
38837
38986
  const q = yield T({ parentId: (k = w == null ? void 0 : w.value) == null ? void 0 : k.id }), E = [...i];
38838
38987
  E.splice(M + 1), E[M] = P(x({}, E[M]), { value: w == null ? void 0 : w.value }), E[M + 1] = { key: (j = w == null ? void 0 : w.value) == null ? void 0 : j.id, children: (q == null ? void 0 : q.length) > 0 ? q : null }, a(E), o == null || o(E);
38839
38988
  }
38840
38989
  }
38841
- }), z = ($, w) => V(void 0, null, function* () {
38842
- const M = $ ? {
38990
+ }), z = (B, w) => V(void 0, null, function* () {
38991
+ const M = B ? {
38843
38992
  [y.label]: {
38844
- [F]: $
38993
+ [F]: B
38845
38994
  }
38846
38995
  } : {};
38847
38996
  d(!0);
38848
- const B = yield T(P(x({}, M), {
38997
+ const N = yield T(P(x({}, M), {
38849
38998
  parentId: w == null ? void 0 : w.key
38850
38999
  }));
38851
- d(!1), c(B);
39000
+ d(!1), c(N);
38852
39001
  });
38853
- return /* @__PURE__ */ jsx(Space$1, { wrap: !0, children: i.map(($, w) => {
38854
- var M, B, k;
38855
- return $.children && /* @__PURE__ */ jsx(
39002
+ return /* @__PURE__ */ jsx(Space$1, { wrap: !0, children: i.map((B, w) => {
39003
+ var M, N, k;
39004
+ return B.children && /* @__PURE__ */ jsx(
38856
39005
  Select$1,
38857
39006
  {
38858
39007
  disabled: f.disabled,
@@ -38862,19 +39011,19 @@ const InternalFileManager = (e) => {
38862
39011
  filterOption: !1,
38863
39012
  filterSort: null,
38864
39013
  defaultValue: {
38865
- label: (M = $ == null ? void 0 : $.value) == null ? void 0 : M[y.label],
38866
- value: (B = $ == null ? void 0 : $.value) == null ? void 0 : B[y.value]
39014
+ label: (M = B == null ? void 0 : B.value) == null ? void 0 : M[y.label],
39015
+ value: (N = B == null ? void 0 : B.value) == null ? void 0 : N[y.value]
38867
39016
  },
38868
39017
  labelInValue: !0,
38869
- onSearch: (j) => z(j, $),
39018
+ onSearch: (j) => z(j, B),
38870
39019
  fieldNames: y,
38871
39020
  style: { minWidth: 150 },
38872
39021
  onChange: (j, O) => D(j, O, w),
38873
39022
  options: u ? [] : R(l),
38874
- onDropdownVisibleChange: (j) => N(j, $, w),
39023
+ onDropdownVisibleChange: (j) => $(j, B, w),
38875
39024
  notFoundContent: u ? /* @__PURE__ */ jsx(Spin, { size: "small" }) : null
38876
39025
  },
38877
- `${(k = $.value) == null ? void 0 : k.id}+ ${$.key} + ${y.label}`
39026
+ `${(k = B.value) == null ? void 0 : k.id}+ ${B.key} + ${y.label}`
38878
39027
  );
38879
39028
  }) });
38880
39029
  }), AssociationCascadeSelect = connect((e) => /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(CascadeSelect, x({}, e)) })), InternalCascadeSelect = observer$1(
@@ -39084,11 +39233,11 @@ const InternalNesterCss = css`
39084
39233
  });
39085
39234
  }, InternalPicker = observer$1(
39086
39235
  (e) => {
39087
- var $;
39236
+ var B;
39088
39237
  const L = e, { value: t, multiple: n, openSize: o, onChange: r, quickUpload: i, selectFile: a, shouldMountElement: l } = L, c = K(L, ["value", "multiple", "openSize", "onChange", "quickUpload", "selectFile", "shouldMountElement"]), u = useField(), d = useFieldNames$1(e), [p, m] = useState(!1), h = useFieldSchema(), g = useInsertSchema$1("Selector"), { options: f } = useAssociationFieldContext(), { collectionName: C } = useFormBlockContext(), b = useCompile(), S = useLabelUiSchema$1(f, (d == null ? void 0 : d.label) || "label"), y = h["x-add-new"], [v, F] = useState([]), A = useCollectionRecordData(), R = useMemo(() => t && Object.keys(t).length > 0 ? (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((M) => {
39089
- const B = M == null ? void 0 : M[d.label];
39238
+ const N = M == null ? void 0 : M[d.label];
39090
39239
  return P(x({}, M), {
39091
- [d.label]: getLabelFormatValue$1(b(S), b(B))
39240
+ [d.label]: getLabelFormatValue$1(b(S), b(N))
39092
39241
  });
39093
39242
  }) : [], [t, d == null ? void 0 : d.label]), T = {
39094
39243
  size: "small",
@@ -39106,14 +39255,14 @@ const InternalNesterCss = css`
39106
39255
  }, D = () => {
39107
39256
  var w;
39108
39257
  return n == null ? null : Array.isArray(t) ? (w = t.filter(Boolean)) == null ? void 0 : w.map((M) => M == null ? void 0 : M[d.value]) : t == null ? void 0 : t[d.value];
39109
- }, N = () => {
39258
+ }, $ = () => {
39110
39259
  const w = (f == null ? void 0 : f.targetKey) || "id", M = R.map((k) => k[w]).filter(Boolean);
39111
39260
  return M.length ? { $and: [{ [`${w}.$ne`]: M }] } : {};
39112
39261
  }, z = () => {
39113
- const { setVisible: w } = useActionContext(), { multiple: M, selectedRows: B, onChange: k, options: j, collectionField: O } = useContext(RecordPickerContext);
39262
+ const { setVisible: w } = useActionContext(), { multiple: M, selectedRows: N, onChange: k, options: j, collectionField: O } = useContext(RecordPickerContext);
39114
39263
  return {
39115
39264
  onClick() {
39116
- k(M ? unionBy(B, j, (O == null ? void 0 : O.targetKey) || "id") : (B == null ? void 0 : B[0]) || null), w(!1);
39265
+ k(M ? unionBy(N, j, (O == null ? void 0 : O.targetKey) || "id") : (N == null ? void 0 : N[0]) || null), w(!1);
39117
39266
  },
39118
39267
  style: {
39119
39268
  display: M !== !1 && ["o2m", "m2m", "mbm"].includes(O == null ? void 0 : O.interface) ? "block" : "none"
@@ -39143,7 +39292,7 @@ const InternalNesterCss = css`
39143
39292
  r([]), F([]);
39144
39293
  return;
39145
39294
  }
39146
- const M = R == null ? void 0 : R.filter((B) => w.includes(B[d.value]));
39295
+ const M = R == null ? void 0 : R.filter((N) => w.includes(N[d.value]));
39147
39296
  r(M), F(M);
39148
39297
  }
39149
39298
  } else {
@@ -39170,12 +39319,12 @@ const InternalNesterCss = css`
39170
39319
  ActionContextProvider,
39171
39320
  {
39172
39321
  value: {
39173
- openSize: (($ = h["x-component-props"]) == null ? void 0 : $.openSize) || o,
39322
+ openSize: ((B = h["x-component-props"]) == null ? void 0 : B.openSize) || o,
39174
39323
  openMode: "drawer",
39175
39324
  visible: p,
39176
39325
  setVisible: m
39177
39326
  },
39178
- children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, T), { children: /* @__PURE__ */ jsx(CollectionProvider_deprecated, { name: f == null ? void 0 : f.target, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: { filter: N() }, children: /* @__PURE__ */ jsx(
39327
+ children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, T), { children: /* @__PURE__ */ jsx(CollectionProvider_deprecated, { name: f == null ? void 0 : f.target, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: { filter: $() }, children: /* @__PURE__ */ jsx(
39179
39328
  SchemaComponentOptions,
39180
39329
  {
39181
39330
  scope: {
@@ -39225,10 +39374,10 @@ const RenderRecord = React.memo(
39225
39374
  const F = useCallback(() => v.current, []);
39226
39375
  return useEffect(() => {
39227
39376
  const A = toArr$3(h).map((R, T, D) => {
39228
- const N = R == null ? void 0 : R[(e == null ? void 0 : e.label) || "label"], z = t ? transformNestedData(R).map((M) => M == null ? void 0 : M[(e == null ? void 0 : e.label) || "label"]).join(" / ") : isObject(N) ? JSON.stringify(N) : N, L = toValue$3(n(z), "N/A"), $ = o(
39377
+ const $ = R == null ? void 0 : R[(e == null ? void 0 : e.label) || "label"], z = t ? transformNestedData(R).map((M) => M == null ? void 0 : M[(e == null ? void 0 : e.label) || "label"]).join(" / ") : isObject($) ? JSON.stringify($) : $, L = toValue$3(n(z), "N/A"), B = o(
39229
39378
  (R == null ? void 0 : R.__collection) || (r == null ? void 0 : r.target),
39230
39379
  (e == null ? void 0 : e.label) || "label"
39231
- ), w = getLabelFormatValue$1(n($), L, !0);
39380
+ ), w = getLabelFormatValue$1(n(B), L, !0);
39232
39381
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
39233
39382
  /* @__PURE__ */ jsx("span", { children: i ? w : a !== !1 ? /* @__PURE__ */ jsx(
39234
39383
  "a",
@@ -39237,7 +39386,7 @@ const RenderRecord = React.memo(
39237
39386
  g(!0);
39238
39387
  },
39239
39388
  onClick: (M) => {
39240
- var B;
39389
+ var N;
39241
39390
  g(!0), M.stopPropagation(), M.preventDefault(), l && !u.properties && (c(schema$1.Viewer), y.current = !0), y.current ? (setTimeout(() => {
39242
39391
  d({
39243
39392
  recordData: R,
@@ -39247,7 +39396,7 @@ const RenderRecord = React.memo(
39247
39396
  }), y.current = !1) : u.properties && d({
39248
39397
  recordData: R,
39249
39398
  parentRecordData: p
39250
- }), (B = m == null ? void 0 : m.current) == null || B.setPopoverVisible(!1);
39399
+ }), (N = m == null ? void 0 : m.current) == null || N.setPopoverVisible(!1);
39251
39400
  },
39252
39401
  children: w
39253
39402
  }
@@ -39651,7 +39800,7 @@ const CreateAction = observer$1(
39651
39800
  const { onClick: t } = e, n = useCollection_deprecated(), o = useFieldSchema(), r = useField(), i = useForm(), a = useVariables$1(), l = useAclCheckFn(), c = o["x-enable-children"] || [], u = o == null ? void 0 : o["x-allow-add-to-current"], d = (R = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : R.linkageFromForm, p = r.componentProps.type === "danger" ? void 0 : r.componentProps.type || "primary", { getChildrenCollections: m } = useCollectionManager_deprecated(), h = m(n.name), g = useMemo(() => c.map((T) => {
39652
39801
  if (!T)
39653
39802
  return;
39654
- const D = h.find((N) => N.name === T.collection);
39803
+ const D = h.find(($) => $.name === T.collection);
39655
39804
  if (D)
39656
39805
  return P(x({}, D.getOptions()), {
39657
39806
  title: T.title || D.title
@@ -39666,9 +39815,9 @@ const CreateAction = observer$1(
39666
39815
  return useEffect(() => {
39667
39816
  r.stateOfLinkageRules = {}, f.filter((T) => !T.disabled).forEach((T) => {
39668
39817
  var D;
39669
- (D = T.actions) == null || D.forEach((N) => {
39818
+ (D = T.actions) == null || D.forEach(($) => {
39670
39819
  linkageAction({
39671
- operator: N.operator,
39820
+ operator: $.operator,
39672
39821
  field: r,
39673
39822
  condition: T.condition,
39674
39823
  variables: a,
@@ -39937,7 +40086,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
39937
40086
  S.current = t;
39938
40087
  const y = useCallback(() => S.current, []);
39939
40088
  return /* @__PURE__ */ jsx(Fragment, { children: toArr$3(e.value).map((F, A, R) => {
39940
- const T = F == null ? void 0 : F[(r == null ? void 0 : r.label) || "label"], D = g ? transformNestedData(F).map((L) => L == null ? void 0 : L[(r == null ? void 0 : r.label) || "label"]).join(" / ") : isObject(T) ? JSON.stringify(T) : T, N = toValue$2(l(D), "N/A"), z = getTabFormatValue(l(u), N, F[o]);
40089
+ const T = F == null ? void 0 : F[(r == null ? void 0 : r.label) || "label"], D = g ? transformNestedData(F).map((L) => L == null ? void 0 : L[(r == null ? void 0 : r.label) || "label"]).join(" / ") : isObject(T) ? JSON.stringify(T) : T, $ = toValue$2(l(D), "N/A"), z = getTabFormatValue(l(u), $, F[o]);
39941
40090
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
39942
40091
  /* @__PURE__ */ jsx("span", { children: d ? z : n !== !1 ? /* @__PURE__ */ jsx(
39943
40092
  "a",
@@ -39946,7 +40095,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
39946
40095
  e.setBtnHover(!0);
39947
40096
  },
39948
40097
  onClick: (L) => {
39949
- var $;
40098
+ var B;
39950
40099
  e.setBtnHover(!0), L.stopPropagation(), L.preventDefault(), c && !t.properties && (i(schema$1.Viewer), b.current = !0), b.current ? setTimeout(() => {
39951
40100
  f({
39952
40101
  recordData: F,
@@ -39956,7 +40105,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
39956
40105
  }) : f({
39957
40106
  recordData: F,
39958
40107
  parentRecordData: C
39959
- }), ($ = p == null ? void 0 : p.current) == null || $.setPopoverVisible(!1);
40108
+ }), (B = p == null ? void 0 : p.current) == null || B.setPopoverVisible(!1);
39960
40109
  },
39961
40110
  children: z
39962
40111
  }
@@ -40021,9 +40170,9 @@ const useColumnsDeepMemoized = (e) => {
40021
40170
  `, [n.paddingContentVerticalLG, n.marginSM]), f = useCollection(), C = useMemo(
40022
40171
  () => d == null ? void 0 : d.map((S) => {
40023
40172
  var A, R, T;
40024
- const y = S.reduceProperties((D, N) => {
40025
- if (isCollectionFieldComponent(N))
40026
- return D.concat([N]);
40173
+ const y = S.reduceProperties((D, $) => {
40174
+ if (isCollectionFieldComponent($))
40175
+ return D.concat([$]);
40027
40176
  }, []), v = (y == null ? void 0 : y.length) > 0 ? y[0].name : S.name, F = !!((A = S["x-component-props"]) != null && A.columnHidden);
40028
40177
  return P(x({
40029
40178
  title: /* @__PURE__ */ jsx(RecursionField, { name: S.name, schema: S, onlyRenderSelf: !0 }),
@@ -40033,15 +40182,15 @@ const useColumnsDeepMemoized = (e) => {
40033
40182
  columnHidden: F
40034
40183
  }, S["x-component-props"]), {
40035
40184
  width: F && !a ? 0 : ((T = S["x-component-props"]) == null ? void 0 : T.width) || 100,
40036
- render: (D, N) => {
40037
- var $;
40038
- const z = ($ = o.value) == null ? void 0 : $.indexOf(N), L = o.address.concat(N.__index || z);
40039
- return /* @__PURE__ */ jsx(SubFormProvider, { value: { value: N, collection: f, fieldSchema: r.parent }, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: N.__index || z, children: /* @__PURE__ */ jsx(RecordProvider, { isNew: isNewRecord(N), record: N, parent: u, children: /* @__PURE__ */ jsx(ColumnFieldProvider, { schema: S, basePath: L, children: /* @__PURE__ */ jsx("span", { role: "button", className: g, children: /* @__PURE__ */ jsx(RecursionField, { basePath: L, schema: S, onlyRenderProperties: !0 }) }) }) }) }) });
40185
+ render: (D, $) => {
40186
+ var B;
40187
+ const z = (B = o.value) == null ? void 0 : B.indexOf($), L = o.address.concat($.__index || z);
40188
+ return /* @__PURE__ */ jsx(SubFormProvider, { value: { value: $, collection: f, fieldSchema: r.parent }, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: $.__index || z, children: /* @__PURE__ */ jsx(RecordProvider, { isNew: isNewRecord($), record: $, parent: u, children: /* @__PURE__ */ jsx(ColumnFieldProvider, { schema: S, basePath: L, children: /* @__PURE__ */ jsx("span", { role: "button", className: g, children: /* @__PURE__ */ jsx(RecursionField, { basePath: L, schema: S, onlyRenderProperties: !0 }) }) }) }) }) });
40040
40189
  },
40041
- onCell: (D, N) => ({
40190
+ onCell: (D, $) => ({
40042
40191
  record: D,
40043
40192
  schema: S,
40044
- rowIndex: N,
40193
+ rowIndex: $,
40045
40194
  isSubTable: e.isSubTable,
40046
40195
  columnHidden: F
40047
40196
  }),
@@ -40161,7 +40310,7 @@ const useColumnsDeepMemoized = (e) => {
40161
40310
  display: none !important;
40162
40311
  }
40163
40312
  `,
40164
- itemRender: (D, N, z) => N === "prev" ? /* @__PURE__ */ jsxs(
40313
+ itemRender: (D, $, z) => $ === "prev" ? /* @__PURE__ */ jsxs(
40165
40314
  "div",
40166
40315
  {
40167
40316
  style: { display: "flex" },
@@ -40377,8 +40526,8 @@ const Table$1 = withDynamicSchemaProps(
40377
40526
  "onExpand",
40378
40527
  "loading",
40379
40528
  "onClickRow"
40380
- ]), S = useArrayField(b), y = useFieldSchema(), { size: v = "small" } = (y == null ? void 0 : y["x-component-props"]) || {}, F = useCollection(), R = ((ce = y == null ? void 0 : y.parent) == null ? void 0 : ce["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: T, allIncludesChildren: D } = R, N = useMemoizedFn(b.onRowDragEnd || (() => {
40381
- })), z = usePaginationProps$2(n, i), L = useTableColumns$1(b, z), [$, w] = useState(() => T ? D : []), [M, B] = useState(((Ce = S == null ? void 0 : S.data) == null ? void 0 : Ce.selectedRowKeys) || []), [k, j] = useState([]), O = (p == null ? void 0 : p.type) !== "none", q = useRef(/* @__PURE__ */ new Map()), E = useMemo(() => css`
40529
+ ]), S = useArrayField(b), y = useFieldSchema(), { size: v = "small" } = (y == null ? void 0 : y["x-component-props"]) || {}, F = useCollection(), R = ((ce = y == null ? void 0 : y.parent) == null ? void 0 : ce["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: T, allIncludesChildren: D } = R, $ = useMemoizedFn(b.onRowDragEnd || (() => {
40530
+ })), z = usePaginationProps$2(n, i), L = useTableColumns$1(b, z), [B, w] = useState(() => T ? D : []), [M, N] = useState(((Ce = S == null ? void 0 : S.data) == null ? void 0 : Ce.selectedRowKeys) || []), [k, j] = useState([]), O = (p == null ? void 0 : p.type) !== "none", q = useRef(/* @__PURE__ */ new Map()), E = useMemo(() => css`
40382
40531
  & > td {
40383
40532
  background-color: ${t.controlItemBgActive} !important;
40384
40533
  }
@@ -40393,7 +40542,7 @@ const Table$1 = withDynamicSchemaProps(
40393
40542
  }) : null, [C, k]);
40394
40543
  useDeepCompareEffect(() => {
40395
40544
  const Z = T ? D : [];
40396
- _.isEqual(Z, $) || w(Z);
40545
+ _.isEqual(Z, B) || w(Z);
40397
40546
  }, [T, D]);
40398
40547
  const H = useCallback((Z) => {
40399
40548
  if (m)
@@ -40421,10 +40570,10 @@ const Table$1 = withDynamicSchemaProps(
40421
40570
  return;
40422
40571
  }
40423
40572
  const le = (ve = (ye = (Se = se.active) == null ? void 0 : Se.data.current) == null ? void 0 : ye.sortable) == null ? void 0 : ve.index, de = (Re = (Fe = (Pe = se.over) == null ? void 0 : Pe.data.current) == null ? void 0 : Fe.sortable) == null ? void 0 : Re.index, be = S.value[le] || se.active, Ie = S.value[de] || se.over;
40424
- S.move(le, de), N({ from: be, to: Ie });
40573
+ S.move(le, de), $({ from: be, to: Ie });
40425
40574
  }, []);
40426
40575
  return /* @__PURE__ */ jsx(DndContext, { onDragEnd: ne, children: /* @__PURE__ */ jsx("tbody", x({}, Z)) });
40427
- }, [S, N]);
40576
+ }, [S, $]);
40428
40577
  Y.displayName = "BodyWrapperComponent";
40429
40578
  const J = useMemo(() => ({
40430
40579
  header: {
@@ -40442,7 +40591,7 @@ const Table$1 = withDynamicSchemaProps(
40442
40591
  type: "checkbox",
40443
40592
  selectedRowKeys: M,
40444
40593
  onChange(Z, ne) {
40445
- S.data = S.data || {}, S.data.selectedRowKeys = Z, S.data.selectedRowData = ne, B(Z), u == null || u(Z, ne);
40594
+ S.data = S.data || {}, S.data.selectedRowKeys = Z, S.data.selectedRowData = ne, N(Z), u == null || u(Z, ne);
40446
40595
  },
40447
40596
  getCheckboxProps(Z) {
40448
40597
  return {
@@ -40517,14 +40666,14 @@ const Table$1 = withDynamicSchemaProps(
40517
40666
  [k, U, JSON.stringify(m)]
40518
40667
  ), pe = useCallback(
40519
40668
  (Z, ne) => {
40520
- const se = Z ? [...$, ne[F.getPrimaryKey()]] : $.filter((le) => ne[F.getPrimaryKey()] !== le);
40669
+ const se = Z ? [...B, ne[F.getPrimaryKey()]] : B.filter((le) => ne[F.getPrimaryKey()] !== le);
40521
40670
  w(se), g == null || g(Z, ne);
40522
40671
  },
40523
- [$, g, F]
40672
+ [B, g, F]
40524
40673
  ), fe = useMemo(() => ({
40525
40674
  onExpand: pe,
40526
- expandedRowKeys: $
40527
- }), [$, pe]);
40675
+ expandedRowKeys: B
40676
+ }), [B, pe]);
40528
40677
  return (
40529
40678
  // If spinning is set to undefined, it will cause the subtable to always display loading, so we need to convert it here
40530
40679
  /* @__PURE__ */ jsx(Spin, { spinning: !!f, children: /* @__PURE__ */ jsx(
@@ -40592,7 +40741,7 @@ const Table$1 = withDynamicSchemaProps(
40592
40741
  }
40593
40742
  `, SubTable = observer$1(
40594
40743
  (e) => {
40595
- var w, M, B, k;
40744
+ var w, M, N, k;
40596
40745
  const { openSize: t } = e, { field: n, options: o } = useAssociationFieldContext(), { t: r } = useTranslation(), [i, a] = useState(!1), [l, c] = useState([]), u = useFieldNames$1(e), d = useFieldSchema(), p = useCompile(), m = useLabelUiSchema$1(o, (u == null ? void 0 : u.label) || "label"), h = useCollectionRecord(), g = useCollection(), { allowSelectExistingRecord: f, allowAddnew: C, allowDisassociation: b } = n.componentProps;
40597
40746
  useSubTableSpecialCase({ field: n });
40598
40747
  const S = (j, O) => {
@@ -40636,10 +40785,10 @@ const Table$1 = withDynamicSchemaProps(
40636
40785
  }, A = () => {
40637
40786
  const j = (o == null ? void 0 : o.targetKey) || "id", O = (n.value || []).map((E) => E == null ? void 0 : E[j]).filter(Boolean);
40638
40787
  return O.length ? { $and: [{ [`${j}.$ne`]: O }] } : {};
40639
- }, [R, T] = useState(1), [D, N] = useState(((w = n.componentProps) == null ? void 0 : w.pageSize) || 10);
40788
+ }, [R, T] = useState(1), [D, $] = useState(((w = n.componentProps) == null ? void 0 : w.pageSize) || 10);
40640
40789
  useEffect(() => {
40641
40790
  var j;
40642
- N((j = n.componentProps) == null ? void 0 : j.pageSize);
40791
+ $((j = n.componentProps) == null ? void 0 : j.pageSize);
40643
40792
  }, [(M = n.componentProps) == null ? void 0 : M.pageSize]);
40644
40793
  const z = useMemo(() => {
40645
40794
  var O;
@@ -40649,13 +40798,13 @@ const Table$1 = withDynamicSchemaProps(
40649
40798
  pageSize: D || 10,
40650
40799
  total: n == null ? void 0 : n.value,
40651
40800
  onChange: (q, E) => {
40652
- T(q), N(E), n.onInput(n.value);
40801
+ T(q), $(E), n.onInput(n.value);
40653
40802
  },
40654
40803
  showSizeChanger: !0,
40655
40804
  pageSizeOptions: ["10", "20", "50", "100"],
40656
40805
  hideOnSinglePage: !1
40657
40806
  };
40658
- }, [(B = n.value) == null ? void 0 : B.length, D, R]), L = () => {
40807
+ }, [(N = n.value) == null ? void 0 : N.length, D, R]), L = () => {
40659
40808
  const { field: j } = useAssociationFieldContext();
40660
40809
  return {
40661
40810
  run() {
@@ -40665,7 +40814,7 @@ const Table$1 = withDynamicSchemaProps(
40665
40814
  return T(O), j.onInput(j.value);
40666
40815
  }
40667
40816
  };
40668
- }, $ = () => ({
40817
+ }, B = () => ({
40669
40818
  run() {
40670
40819
  a(!0);
40671
40820
  }
@@ -40716,7 +40865,7 @@ const Table$1 = withDynamicSchemaProps(
40716
40865
  f && /* @__PURE__ */ jsx(
40717
40866
  Action.Link,
40718
40867
  {
40719
- useAction: $,
40868
+ useAction: B,
40720
40869
  title: /* @__PURE__ */ jsxs(Space$1, { style: { gap: 2 }, children: [
40721
40870
  /* @__PURE__ */ jsx(ZoomInOutlined, {}),
40722
40871
  " ",
@@ -40850,14 +40999,14 @@ const ReadPretty$7 = observer$1(
40850
40999
  InternalAssociationSelect.displayName = "InternalAssociationSelect";
40851
41000
  const AssociationSelect = InternalAssociationSelect;
40852
41001
  AssociationSelect.Designer = function e() {
40853
- var M, B, k, j, O, q, E, U, G, H, W;
40854
- 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), A = (M = F == null ? void 0 : F.validateSchema) == null ? void 0 : M.call(F, u), R = (B = S == null ? void 0 : S.uiSchema) == null ? void 0 : B.title, T = S != null && S.target ? t(S == null ? void 0 : S.target) : [];
41002
+ var M, N, k, j, O, q, E, U, G, H, W;
41003
+ 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), A = (M = F == null ? void 0 : F.validateSchema) == null ? void 0 : M.call(F, u), R = (N = S == null ? void 0 : S.uiSchema) == null ? void 0 : N.title, T = S != null && S.target ? t(S == null ? void 0 : S.target) : [];
40855
41004
  c.title === R || c.title;
40856
- const D = useSortFields(S == null ? void 0 : S.target), N = ((O = (j = (k = c.componentProps) == null ? void 0 : k.service) == null ? void 0 : j.params) == null ? void 0 : O.sort) || [];
41005
+ const D = useSortFields(S == null ? void 0 : S.target), $ = ((O = (j = (k = c.componentProps) == null ? void 0 : k.service) == null ? void 0 : j.params) == null ? void 0 : O.sort) || [];
40857
41006
  useEffect(() => {
40858
41007
  c.readPretty !== u["x-read-pretty"] && (c.readPretty = !!u["x-read-pretty"]);
40859
41008
  }, [u["x-read-pretty"]]);
40860
- const z = N == null ? void 0 : N.map((X) => X.startsWith("-") ? {
41009
+ const z = $ == null ? void 0 : $.map((X) => X.startsWith("-") ? {
40861
41010
  field: X.substring(1),
40862
41011
  direction: "desc"
40863
41012
  } : {
@@ -40872,8 +41021,8 @@ AssociationSelect.Designer = function e() {
40872
41021
  label: f((Y = X == null ? void 0 : X.uiSchema) == null ? void 0 : Y.title) || (X == null ? void 0 : X.name)
40873
41022
  };
40874
41023
  });
40875
- let $ = "editable";
40876
- u["x-disabled"] === !0 && ($ = "readonly"), u["x-read-pretty"] === !0 && ($ = "read-pretty");
41024
+ let B = "editable";
41025
+ u["x-disabled"] === !0 && (B = "readonly"), u["x-read-pretty"] === !0 && (B = "read-pretty");
40877
41026
  const w = _.omit(u, "required");
40878
41027
  return /* @__PURE__ */ jsxs(GeneralSchemaDesigner, { children: [
40879
41028
  /* @__PURE__ */ jsx(GeneralSchemaItems, {}),
@@ -41186,7 +41335,7 @@ AssociationSelect.Designer = function e() {
41186
41335
  { label: d("Readonly"), value: "readonly" },
41187
41336
  { label: d("Easy-reading"), value: "read-pretty" }
41188
41337
  ],
41189
- value: $,
41338
+ value: B,
41190
41339
  onChange: (X) => {
41191
41340
  const Y = {
41192
41341
  "x-uid": u["x-uid"]
@@ -41249,22 +41398,22 @@ AssociationSelect.Designer = function e() {
41249
41398
  ] });
41250
41399
  };
41251
41400
  AssociationSelect.FilterDesigner = function e() {
41252
- var F, A, R, T, D, N, z, L, $, w, M;
41401
+ var F, A, R, T, D, $, z, L, B, w, M;
41253
41402
  const { getCollectionFields: t, getInterface: n, getCollectionJoinField: o } = useCollectionManager_deprecated(), { getField: r } = useCollection_deprecated(), { form: i } = useFormBlockContext(), a = useField(), l = useFieldSchema(), { t: c } = useTranslation(), { dn: u, refresh: d } = useDesignable(), p = useCompile(), m = r(l.name) || o(l["x-collection-field"]), h = n(m == null ? void 0 : m.interface), g = (F = h == null ? void 0 : h.validateSchema) == null ? void 0 : F.call(h, l), f = (A = m == null ? void 0 : m.uiSchema) == null ? void 0 : A.title, C = m != null && m.target ? t(m == null ? void 0 : m.target) : [];
41254
41403
  a.title === f || a.title;
41255
- const b = useSortFields(m == null ? void 0 : m.target), S = ((D = (T = (R = a.componentProps) == null ? void 0 : R.service) == null ? void 0 : T.params) == null ? void 0 : D.sort) || [], y = S == null ? void 0 : S.map((B) => B.startsWith("-") ? {
41256
- field: B.substring(1),
41404
+ const b = useSortFields(m == null ? void 0 : m.target), S = ((D = (T = (R = a.componentProps) == null ? void 0 : R.service) == null ? void 0 : T.params) == null ? void 0 : D.sort) || [], y = S == null ? void 0 : S.map((N) => N.startsWith("-") ? {
41405
+ field: N.substring(1),
41257
41406
  direction: "desc"
41258
41407
  } : {
41259
- field: B,
41408
+ field: N,
41260
41409
  direction: "asc"
41261
41410
  });
41262
41411
  a.readPretty || a.required;
41263
- const v = C.filter((B) => !(B != null && B.target) && B.type !== "boolean").map((B) => {
41412
+ const v = C.filter((N) => !(N != null && N.target) && N.type !== "boolean").map((N) => {
41264
41413
  var k;
41265
41414
  return {
41266
- value: B == null ? void 0 : B.name,
41267
- label: p((k = B == null ? void 0 : B.uiSchema) == null ? void 0 : k.title) || (B == null ? void 0 : B.name)
41415
+ value: N == null ? void 0 : N.name,
41416
+ label: p((k = N == null ? void 0 : N.uiSchema) == null ? void 0 : k.title) || (N == null ? void 0 : N.name)
41268
41417
  };
41269
41418
  });
41270
41419
  return l["x-disabled"], l["x-read-pretty"], /* @__PURE__ */ jsxs(GeneralSchemaDesigner, { children: [
@@ -41355,10 +41504,10 @@ AssociationSelect.FilterDesigner = function e() {
41355
41504
  }
41356
41505
  }
41357
41506
  },
41358
- onSubmit: (B) => {
41507
+ onSubmit: (N) => {
41359
41508
  var q;
41360
41509
  const k = [];
41361
- for (const E of B.rules)
41510
+ for (const E of N.rules)
41362
41511
  k.push(_.pickBy(E, _.identity));
41363
41512
  const j = {
41364
41513
  "x-uid": l["x-uid"]
@@ -41373,7 +41522,7 @@ AssociationSelect.FilterDesigner = function e() {
41373
41522
  }
41374
41523
  }
41375
41524
  ),
41376
- i && !(i != null && i.readPretty) && ((N = m == null ? void 0 : m.uiSchema) == null ? void 0 : N.type) && /* @__PURE__ */ jsx(
41525
+ i && !(i != null && i.readPretty) && (($ = m == null ? void 0 : m.uiSchema) == null ? void 0 : $.type) && /* @__PURE__ */ jsx(
41377
41526
  SchemaSettingsModalItem,
41378
41527
  {
41379
41528
  title: c("Set default value"),
@@ -41390,11 +41539,11 @@ AssociationSelect.FilterDesigner = function e() {
41390
41539
  })
41391
41540
  }
41392
41541
  },
41393
- onSubmit: (B) => {
41542
+ onSubmit: (N) => {
41394
41543
  const k = {
41395
41544
  "x-uid": l["x-uid"]
41396
41545
  };
41397
- a.value !== B.default && (a.value = B.default), l.default = B.default, k.default = B.default, u.emit("patch", {
41546
+ a.value !== N.default && (a.value = N.default), l.default = N.default, k.default = N.default, u.emit("patch", {
41398
41547
  schema: k
41399
41548
  }), d();
41400
41549
  }
@@ -41404,10 +41553,10 @@ AssociationSelect.FilterDesigner = function e() {
41404
41553
  SchemaSettingsDataScope,
41405
41554
  {
41406
41555
  collectionName: m == null ? void 0 : m.target,
41407
- defaultFilter: (($ = (L = (z = a.componentProps) == null ? void 0 : z.service) == null ? void 0 : L.params) == null ? void 0 : $.filter) || {},
41556
+ defaultFilter: ((B = (L = (z = a.componentProps) == null ? void 0 : z.service) == null ? void 0 : L.params) == null ? void 0 : B.filter) || {},
41408
41557
  form: i,
41409
- onSubmit: ({ filter: B }) => {
41410
- B = removeNullCondition(B), _.set(a.componentProps, "service.params.filter", B), l["x-component-props"] = a.componentProps, u.emit("patch", {
41558
+ onSubmit: ({ filter: N }) => {
41559
+ N = removeNullCondition(N), _.set(a.componentProps, "service.params.filter", N), l["x-component-props"] = a.componentProps, u.emit("patch", {
41411
41560
  schema: {
41412
41561
  "x-uid": l["x-uid"],
41413
41562
  "x-component-props": a.componentProps
@@ -41490,8 +41639,8 @@ AssociationSelect.FilterDesigner = function e() {
41490
41639
  }
41491
41640
  }
41492
41641
  },
41493
- onSubmit: ({ sort: B }) => {
41494
- const k = B.map((j) => j.direction === "desc" ? `-${j.field}` : j.field);
41642
+ onSubmit: ({ sort: N }) => {
41643
+ const k = N.map((j) => j.direction === "desc" ? `-${j.field}` : j.field);
41495
41644
  _.set(a.componentProps, "service.params.sort", k), l["x-component-props"] = a.componentProps, u.emit("patch", {
41496
41645
  schema: {
41497
41646
  "x-uid": l["x-uid"],
@@ -41507,12 +41656,12 @@ AssociationSelect.FilterDesigner = function e() {
41507
41656
  title: c("Title field"),
41508
41657
  options: v,
41509
41658
  value: (M = (w = a == null ? void 0 : a.componentProps) == null ? void 0 : w.fieldNames) == null ? void 0 : M.label,
41510
- onChange: (B) => {
41659
+ onChange: (N) => {
41511
41660
  var O, q;
41512
41661
  const k = {
41513
41662
  "x-uid": l["x-uid"]
41514
41663
  }, j = P(x(x({}, (q = (O = m == null ? void 0 : m.uiSchema) == null ? void 0 : O["x-component-props"]) == null ? void 0 : q.fieldNames), a.componentProps.fieldNames), {
41515
- label: B
41664
+ label: N
41516
41665
  });
41517
41666
  a.componentProps.fieldNames = j, l["x-component-props"] = l["x-component-props"] || {}, l["x-component-props"].fieldNames = j, k["x-component-props"] = l["x-component-props"], u.emit("patch", {
41518
41667
  schema: k
@@ -43043,7 +43192,7 @@ const InternalListBlockProvider = (e) => {
43043
43192
  return e - m - h - d;
43044
43193
  }, InternalList = withSkeletonComponent(
43045
43194
  (e) => {
43046
- var L, $, w;
43195
+ var L, B, w;
43047
43196
  const { service: t } = useListBlockContext(), { run: n, params: o } = t, r = useFieldSchema(), i = useDesigner(), a = (L = t == null ? void 0 : t.data) == null ? void 0 : L.meta, { pageSize: l, count: c, hasNext: u, page: d } = a || {}, p = useField(), [m] = useState(/* @__PURE__ */ new Map()), { wrapSSR: h, componentCls: g, hashId: f } = useStyles$5(), C = useListBlockHeight(), { token: b } = theme$1.useToken(), S = useCallback(
43048
43197
  (M) => (m.has(M) || m.set(
43049
43198
  M,
@@ -43056,10 +43205,10 @@ const InternalListBlockProvider = (e) => {
43056
43205
  ), m.get(M)),
43057
43206
  [r.properties, m]
43058
43207
  ), y = [5, 10, 20, 50, 100, 200], v = useCallback(
43059
- (M, B) => {
43208
+ (M, N) => {
43060
43209
  n(P(x({}, o == null ? void 0 : o[0]), {
43061
43210
  page: M,
43062
- pageSize: B
43211
+ pageSize: N
43063
43212
  }));
43064
43213
  },
43065
43214
  [n, o]
@@ -43090,7 +43239,7 @@ const InternalListBlockProvider = (e) => {
43090
43239
  display: none !important;
43091
43240
  }
43092
43241
  `,
43093
- itemRender: (B, k, j) => k === "prev" ? /* @__PURE__ */ jsxs(
43242
+ itemRender: (N, k, j) => k === "prev" ? /* @__PURE__ */ jsxs(
43094
43243
  "div",
43095
43244
  {
43096
43245
  style: { display: "flex" },
@@ -43145,17 +43294,17 @@ const InternalListBlockProvider = (e) => {
43145
43294
  children: /* @__PURE__ */ jsx(
43146
43295
  List$1,
43147
43296
  P(x({}, e), {
43148
- pagination: !a || !(($ = p.value) != null && $.length) ? !1 : z,
43297
+ pagination: !a || !((B = p.value) != null && B.length) ? !1 : z,
43149
43298
  loading: t == null ? void 0 : t.loading,
43150
- children: (w = p.value) != null && w.length ? p.value.map((M, B) => /* @__PURE__ */ jsx(
43299
+ children: (w = p.value) != null && w.length ? p.value.map((M, N) => /* @__PURE__ */ jsx(
43151
43300
  NocoBaseRecursionField,
43152
43301
  {
43153
43302
  basePath: p.address,
43154
- name: B,
43303
+ name: N,
43155
43304
  onlyRenderProperties: !0,
43156
- schema: S(B)
43305
+ schema: S(N)
43157
43306
  },
43158
- B
43307
+ N
43159
43308
  )) : null
43160
43309
  })
43161
43310
  )
@@ -43721,8 +43870,8 @@ const useMenuTranslation = () => useTranslation("lm-menus"), toItems$1 = (e = {}
43721
43870
  onFieldChange("target", (A) => {
43722
43871
  var T, D;
43723
43872
  const [, R] = ((D = (T = A == null ? void 0 : A.value) == null ? void 0 : T.split) == null ? void 0 : D.call(T, "||")) || [];
43724
- A.query("position").take((N) => {
43725
- N.dataSource = R === "Menu.SubMenu" ? [
43873
+ A.query("position").take(($) => {
43874
+ $.dataSource = R === "Menu.SubMenu" ? [
43726
43875
  { label: i("Before"), value: "beforeBegin" },
43727
43876
  { label: i("After"), value: "afterEnd" },
43728
43877
  { label: i("Inner"), value: "beforeEnd" }
@@ -43798,8 +43947,8 @@ const useMenuTranslation = () => useTranslation("lm-menus"), toItems$1 = (e = {}
43798
43947
  }
43799
43948
  }), [p, i]), b = useCallback(
43800
43949
  ({ target: F, position: A }) => {
43801
- var N;
43802
- const [R] = ((N = F == null ? void 0 : F.split) == null ? void 0 : N.call(F, "||")) || [];
43950
+ var $;
43951
+ const [R] = (($ = F == null ? void 0 : F.split) == null ? void 0 : $.call(F, "||")) || [];
43803
43952
  if (!R)
43804
43953
  return;
43805
43954
  const T = findByUid(a, R), D = createDesignable({
@@ -44208,14 +44357,14 @@ const Menu = React.memo((e) => {
44208
44357
  var L;
44209
44358
  let z;
44210
44359
  if (o) {
44211
- const $ = findKeysByUid(f, o);
44212
- z = ($ == null ? void 0 : $[0]) || null;
44360
+ const B = findKeysByUid(f, o);
44361
+ z = (B == null ? void 0 : B[0]) || null;
44213
44362
  } else
44214
44363
  z = (F == null ? void 0 : F[0]) || null;
44215
44364
  if (n === "mix" && z) {
44216
- const $ = (L = f.properties) == null ? void 0 : L[z];
44217
- if (($ == null ? void 0 : $["x-component"]) === "Menu.SubMenu")
44218
- return $;
44365
+ const B = (L = f.properties) == null ? void 0 : L[z];
44366
+ if ((B == null ? void 0 : B["x-component"]) === "Menu.SubMenu")
44367
+ return B;
44219
44368
  }
44220
44369
  return null;
44221
44370
  }, [F, n, f, o]);
@@ -44229,7 +44378,7 @@ const Menu = React.memo((e) => {
44229
44378
  }, [o]), useEffect(() => {
44230
44379
  ["inline", "mix"].includes(n) && T(F);
44231
44380
  }, [F]);
44232
- const N = useContext(SchemaComponentContext);
44381
+ const $ = useContext(SchemaComponentContext);
44233
44382
  return /* @__PURE__ */ jsx(DndContext, { children: /* @__PURE__ */ jsx(MenuItemDesignerContext.Provider, { value: g, children: /* @__PURE__ */ jsxs(MenuModeContext.Provider, { value: n, children: [
44234
44383
  /* @__PURE__ */ jsx(
44235
44384
  HeaderMenu,
@@ -44246,7 +44395,7 @@ const Menu = React.memo((e) => {
44246
44395
  defaultSelectedKeys: F,
44247
44396
  defaultOpenKeys: R,
44248
44397
  selectedKeys: y,
44249
- designable: N.designable,
44398
+ designable: $.designable,
44250
44399
  render: b,
44251
44400
  children: l
44252
44401
  }
@@ -44264,7 +44413,7 @@ const Menu = React.memo((e) => {
44264
44413
  render: b,
44265
44414
  t: h,
44266
44415
  api: C,
44267
- designable: N.designable
44416
+ designable: $.designable
44268
44417
  }
44269
44418
  )
44270
44419
  ] }) }) });
@@ -44780,16 +44929,16 @@ const toValue = (e, t) => e == null ? t : e, ReadPrettyRecordPicker = observer$1
44780
44929
  if (isShowFilePicker(h))
44781
44930
  return u ? /* @__PURE__ */ jsx(Preview, x({}, e)) : null;
44782
44931
  const b = () => toArr$3(e.value).map((A, R, T) => {
44783
- const D = toValue(m(A == null ? void 0 : A[(i == null ? void 0 : i.label) || "label"]), "N/A"), N = getLabelFormatValue(h, D, !0);
44932
+ const D = toValue(m(A == null ? void 0 : A[(i == null ? void 0 : i.label) || "label"]), "N/A"), $ = getLabelFormatValue(h, D, !0);
44784
44933
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
44785
- /* @__PURE__ */ jsx("span", { className: "test-record-picker-read-pretty-item", children: g || f ? N : /* @__PURE__ */ jsx(
44934
+ /* @__PURE__ */ jsx("span", { className: "test-record-picker-read-pretty-item", children: g || f ? $ : /* @__PURE__ */ jsx(
44786
44935
  "a",
44787
44936
  {
44788
44937
  onClick: (z) => {
44789
44938
  var L;
44790
44939
  z.stopPropagation(), z.preventDefault(), l(!0), p(A), (L = C == null ? void 0 : C.current) == null || L.setPopoverVisible(!1);
44791
44940
  },
44792
- children: N
44941
+ children: $
44793
44942
  }
44794
44943
  ) }),
44795
44944
  R < T.length - 1 ? /* @__PURE__ */ jsx("span", { style: { marginRight: 4, color: "#aaa" }, children: "," }) : null
@@ -45617,8 +45766,8 @@ const useStyles$2 = genStyleHook("nb-rich-text", (e) => {
45617
45766
  "aria-label": `checkbox-${y.name}`
45618
45767
  }),
45619
45768
  renderCell: (y, v, F, A) => {
45620
- var D, N;
45621
- const R = (D = e == null ? void 0 : e.pagination) == null ? void 0 : D.current, T = ((N = e == null ? void 0 : e.pagination) == null ? void 0 : N.pageSize) || 20;
45769
+ var D, $;
45770
+ const R = (D = e == null ? void 0 : e.pagination) == null ? void 0 : D.current, T = (($ = e == null ? void 0 : e.pagination) == null ? void 0 : $.pageSize) || 20;
45622
45771
  return R && (F = F + (R - 1) * T), /* @__PURE__ */ jsxs(
45623
45772
  "div",
45624
45773
  {
@@ -46203,14 +46352,14 @@ const TableActionColumnDesigner = (e) => {
46203
46352
  "sort-field"
46204
46353
  );
46205
46354
  }, TableBlockDesigner = () => {
46206
- var T, D, N, z, L, $, w, M, B, k, j;
46207
- const { name: e, title: t } = useCollection_deprecated(), { getCollectionField: n, getCollection: o } = useCollectionManager_deprecated(), r = useField(), i = useFieldSchema(), { form: a } = useFormBlockContext(), l = useSortFields(e), { service: c } = useTableBlockContext(), { t: u } = useTranslation(), { dn: d } = useDesignable(), { componentNamePrefix: p } = useBlockTemplateContext(), m = ((D = (T = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : T.params) == null ? void 0 : D.sort) || [], h = ((N = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : N.resource) || ((z = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : z.association), g = !((L = i == null ? void 0 : i["x-decorator-props"]) != null && L.disableTemplate), f = m == null ? void 0 : m.map((O) => O != null && O.startsWith("-") ? {
46355
+ var T, D, $, z, L, B, w, M, N, k, j;
46356
+ const { name: e, title: t } = useCollection_deprecated(), { getCollectionField: n, getCollection: o } = useCollectionManager_deprecated(), r = useField(), i = useFieldSchema(), { form: a } = useFormBlockContext(), l = useSortFields(e), { service: c } = useTableBlockContext(), { t: u } = useTranslation(), { dn: d } = useDesignable(), { componentNamePrefix: p } = useBlockTemplateContext(), m = ((D = (T = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : T.params) == null ? void 0 : D.sort) || [], h = (($ = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : $.resource) || ((z = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : z.association), g = !((L = i == null ? void 0 : i["x-decorator-props"]) != null && L.disableTemplate), f = m == null ? void 0 : m.map((O) => O != null && O.startsWith("-") ? {
46208
46357
  field: O.substring(1),
46209
46358
  direction: "desc"
46210
46359
  } : {
46211
46360
  field: O,
46212
46361
  direction: "asc"
46213
- }), C = useSchemaTemplate(), b = useCollection_deprecated(), { dragSort: S, resource: y } = r.decoratorProps, v = y && n(y), F = y != null && y.includes(".") ? ($ = o(v == null ? void 0 : v.target)) == null ? void 0 : $.tree : !!(b != null && b.tree), A = useCallback(
46362
+ }), C = useSchemaTemplate(), b = useCollection_deprecated(), { dragSort: S, resource: y } = r.decoratorProps, v = y && n(y), F = y != null && y.includes(".") ? (B = o(v == null ? void 0 : v.target)) == null ? void 0 : B.tree : !!(b != null && b.tree), A = useCallback(
46214
46363
  ({ filter: O }) => {
46215
46364
  O = removeNullCondition(O);
46216
46365
  const q = r.decoratorProps.params || {};
@@ -46366,7 +46515,7 @@ const TableActionColumnDesigner = (e) => {
46366
46515
  SchemaSettingsSelectItem,
46367
46516
  {
46368
46517
  title: u("Records per page"),
46369
- value: ((k = (B = r.decoratorProps) == null ? void 0 : B.params) == null ? void 0 : k.pageSize) || 20,
46518
+ value: ((k = (N = r.decoratorProps) == null ? void 0 : N.params) == null ? void 0 : k.pageSize) || 20,
46370
46519
  options: [
46371
46520
  { label: "5", value: 5 },
46372
46521
  { label: "10", value: 10 },
@@ -46449,29 +46598,29 @@ TableField.ActionBar = observer$1(
46449
46598
  { displayName: "TableField.ActionBar" }
46450
46599
  );
46451
46600
  const TableSelectorDesigner = () => {
46452
- var R, T, D, N, z, L;
46453
- const { name: e, title: t } = useCollection_deprecated(), { getCollectionJoinField: n, getAllCollectionsInheritChain: o } = useCollectionManager_deprecated(), r = useField(), i = useFieldSchema(), { form: a } = useFormBlockContext(), l = useSortFields(e), { service: c, extraFilter: u } = useTableSelectorContext(), { t: d } = useTranslation(), { dn: p } = useDesignable(), m = ((T = (R = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : R.params) == null ? void 0 : T.sort) || [], h = recursiveParent$1(i, "CollectionField"), g = n(h == null ? void 0 : h["x-collection-field"]), f = m == null ? void 0 : m.map(($) => $.startsWith("-") ? {
46454
- field: $.substring(1),
46601
+ var R, T, D, $, z, L;
46602
+ const { name: e, title: t } = useCollection_deprecated(), { getCollectionJoinField: n, getAllCollectionsInheritChain: o } = useCollectionManager_deprecated(), r = useField(), i = useFieldSchema(), { form: a } = useFormBlockContext(), l = useSortFields(e), { service: c, extraFilter: u } = useTableSelectorContext(), { t: d } = useTranslation(), { dn: p } = useDesignable(), m = ((T = (R = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : R.params) == null ? void 0 : T.sort) || [], h = recursiveParent$1(i, "CollectionField"), g = n(h == null ? void 0 : h["x-collection-field"]), f = m == null ? void 0 : m.map((B) => B.startsWith("-") ? {
46603
+ field: B.substring(1),
46455
46604
  direction: "desc"
46456
46605
  } : {
46457
- field: $,
46606
+ field: B,
46458
46607
  direction: "asc"
46459
46608
  }), C = useSchemaTemplate(), b = useCollection_deprecated(), { dragSort: S } = r.decoratorProps, y = useRecord(), v = useVariables$1(), { currentFormCollection: F } = useContext(RecordPickerContext), A = useLocalVariables$1({ collectionName: F });
46460
46609
  return /* @__PURE__ */ jsxs(GeneralSchemaDesigner, { template: C, title: t || e, disableInitializer: !0, children: [
46461
46610
  /* @__PURE__ */ jsx(
46462
46611
  SchemaSettingsDataScope,
46463
46612
  {
46464
- defaultFilter: ((N = (D = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : D.params) == null ? void 0 : N.filter) || {},
46613
+ defaultFilter: (($ = (D = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : D.params) == null ? void 0 : $.filter) || {},
46465
46614
  form: a,
46466
- onSubmit: ({ filter: $ }) => {
46467
- var B;
46468
- $ = removeNullCondition($);
46615
+ onSubmit: ({ filter: B }) => {
46616
+ var N;
46617
+ B = removeNullCondition(B);
46469
46618
  const w = r.decoratorProps.params || {};
46470
- w.filter = $, r.decoratorProps.params = w, i["x-decorator-props"].params = w;
46471
- let M = _.cloneDeep($);
46619
+ w.filter = B, r.decoratorProps.params = w, i["x-decorator-props"].params = w;
46620
+ let M = _.cloneDeep(B);
46472
46621
  u && (M ? M = {
46473
46622
  $and: [u, M]
46474
- } : M = u), c.run(P(x({}, (B = c.params) == null ? void 0 : B[0]), { filter: M, page: 1 })), p.emit("patch", {
46623
+ } : M = u), c.run(P(x({}, (N = c.params) == null ? void 0 : N[0]), { filter: M, page: 1 })), p.emit("patch", {
46475
46624
  schema: {
46476
46625
  "x-uid": i["x-uid"],
46477
46626
  "x-decorator-props": i["x-decorator-props"]
@@ -46479,14 +46628,14 @@ const TableSelectorDesigner = () => {
46479
46628
  });
46480
46629
  },
46481
46630
  collectionName: e,
46482
- dynamicComponent: ($) => /* @__PURE__ */ jsx(
46631
+ dynamicComponent: (B) => /* @__PURE__ */ jsx(
46483
46632
  VariableInput,
46484
- P(x({}, $), {
46633
+ P(x({}, B), {
46485
46634
  form: a,
46486
- collectionField: $.collectionField,
46635
+ collectionField: B.collectionField,
46487
46636
  record: y,
46488
46637
  shouldChange: getShouldChange({
46489
- collectionField: $.collectionField,
46638
+ collectionField: B.collectionField,
46490
46639
  variables: v,
46491
46640
  localVariables: A,
46492
46641
  getAllCollectionsInheritChain: o
@@ -46503,11 +46652,11 @@ const TableSelectorDesigner = () => {
46503
46652
  title: d("Tree table"),
46504
46653
  defaultChecked: !0,
46505
46654
  checked: r.decoratorProps.treeTable,
46506
- onChange: ($) => {
46655
+ onChange: (B) => {
46507
46656
  var M;
46508
- r.form.clearFormGraph(`${r.address}.*`), r.decoratorProps.treeTable = $, i["x-decorator-props"].treeTable = $;
46657
+ r.form.clearFormGraph(`${r.address}.*`), r.decoratorProps.treeTable = B, i["x-decorator-props"].treeTable = B;
46509
46658
  const w = P(x({}, (M = c.params) == null ? void 0 : M[0]), {
46510
- tree: $ ? !0 : null
46659
+ tree: B ? !0 : null
46511
46660
  });
46512
46661
  p.emit("patch", {
46513
46662
  schema: i
@@ -46591,15 +46740,15 @@ const TableSelectorDesigner = () => {
46591
46740
  }
46592
46741
  }
46593
46742
  },
46594
- onSubmit: ({ sort: $ }) => {
46595
- var B;
46596
- const w = $.map((k) => k.direction === "desc" ? `-${k.field}` : k.field), M = r.decoratorProps.params || {};
46743
+ onSubmit: ({ sort: B }) => {
46744
+ var N;
46745
+ const w = B.map((k) => k.direction === "desc" ? `-${k.field}` : k.field), M = r.decoratorProps.params || {};
46597
46746
  M.sort = w, r.decoratorProps.params = M, i["x-decorator-props"].params = M, p.emit("patch", {
46598
46747
  schema: {
46599
46748
  "x-uid": i["x-uid"],
46600
46749
  "x-decorator-props": i["x-decorator-props"]
46601
46750
  }
46602
- }), c.run(P(x({}, (B = c.params) == null ? void 0 : B[0]), { sort: w }));
46751
+ }), c.run(P(x({}, (N = c.params) == null ? void 0 : N[0]), { sort: w }));
46603
46752
  }
46604
46753
  }
46605
46754
  ),
@@ -46616,10 +46765,10 @@ const TableSelectorDesigner = () => {
46616
46765
  { label: "100", value: 100 },
46617
46766
  { label: "200", value: 200 }
46618
46767
  ],
46619
- onChange: ($) => {
46768
+ onChange: (B) => {
46620
46769
  var M;
46621
46770
  const w = r.decoratorProps.params || {};
46622
- w.pageSize = $, r.decoratorProps.params = w, i["x-decorator-props"].params = w, c.run(P(x({}, (M = c.params) == null ? void 0 : M[0]), { pageSize: $, page: 1 })), p.emit("patch", {
46771
+ w.pageSize = B, r.decoratorProps.params = w, i["x-decorator-props"].params = w, c.run(P(x({}, (M = c.params) == null ? void 0 : M[0]), { pageSize: B, page: 1 })), p.emit("patch", {
46623
46772
  schema: {
46624
46773
  "x-uid": i["x-uid"],
46625
46774
  "x-decorator-props": i["x-decorator-props"]
@@ -48046,11 +48195,11 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
48046
48195
  if (R && y) {
48047
48196
  const D = ((T = r(R)) == null ? void 0 : T.fields) || [];
48048
48197
  o(
48049
- D == null ? void 0 : D.filter((N) => supportTypes.includes(N.type)).map((N) => {
48198
+ D == null ? void 0 : D.filter(($) => supportTypes.includes($.type)).map(($) => {
48050
48199
  var z;
48051
48200
  return {
48052
- value: N.name,
48053
- label: g(((z = N.uiSchema) == null ? void 0 : z.title) || N.name)
48201
+ value: $.name,
48202
+ label: g(((z = $.uiSchema) == null ? void 0 : z.title) || $.name)
48054
48203
  };
48055
48204
  })
48056
48205
  );
@@ -48232,21 +48381,21 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
48232
48381
  const t = useRecord();
48233
48382
  return /* @__PURE__ */ jsx(AddFieldAction, x({ item: t }, e));
48234
48383
  }, AddFieldAction = (e) => {
48235
- var L, $;
48236
- const { scope: t, getContainer: n, item: o, children: r, trigger: i, align: a, database: l } = e, { getInterface: c, getTemplate: u, collections: d, getCollection: p } = useCollectionManager_deprecated(), [m, h] = useState(!1), [g, f] = useState(), [C, b] = useState({}), S = useCompile(), { t: y } = useTranslation(), { isDialect: v } = useDialect(), F = useFieldInterfaceOptions(), A = (($ = (L = p(o.name)) == null ? void 0 : L.options) == null ? void 0 : $.fields) || o.fields || [], R = useMemo(() => d.map((w) => ({
48384
+ var L, B;
48385
+ const { scope: t, getContainer: n, item: o, children: r, trigger: i, align: a, database: l } = e, { getInterface: c, getTemplate: u, collections: d, getCollection: p } = useCollectionManager_deprecated(), [m, h] = useState(!1), [g, f] = useState(), [C, b] = useState({}), S = useCompile(), { t: y } = useTranslation(), { isDialect: v } = useDialect(), F = useFieldInterfaceOptions(), A = ((B = (L = p(o.name)) == null ? void 0 : L.options) == null ? void 0 : B.fields) || o.fields || [], R = useMemo(() => d.map((w) => ({
48237
48386
  label: S(w.title),
48238
48387
  value: w.name
48239
48388
  })), []), T = useCallback(() => {
48240
- const { availableFieldInterfaces: w } = u(o.template) || {}, { exclude: M, include: B } = w || {}, k = [];
48389
+ const { availableFieldInterfaces: w } = u(o.template) || {}, { exclude: M, include: N } = w || {}, k = [];
48241
48390
  return F.forEach((j) => {
48242
48391
  var O;
48243
48392
  if (j.key === "systemInfo")
48244
48393
  k.push(P(x({}, j), {
48245
- children: j.children.filter((q) => q.hidden ? !1 : q.value === "tableoid" ? B != null && B.length ? B.includes(q.value) : (l == null ? void 0 : l.dialect) === "postgres" : typeof o[q.value] == "boolean" ? o[q.value] : !0)
48394
+ children: j.children.filter((q) => q.hidden ? !1 : q.value === "tableoid" ? N != null && N.length ? N.includes(q.value) : (l == null ? void 0 : l.dialect) === "postgres" : typeof o[q.value] == "boolean" ? o[q.value] : !0)
48246
48395
  }));
48247
48396
  else {
48248
48397
  let q = [];
48249
- B != null && B.length ? B.forEach((E) => {
48398
+ N != null && N.length ? N.forEach((E) => {
48250
48399
  var G;
48251
48400
  const U = (G = j == null ? void 0 : j.children) == null ? void 0 : G.find((H) => [E, E.interface].includes(H.name));
48252
48401
  U && q.push(P(x({}, U), {
@@ -48264,28 +48413,28 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
48264
48413
  label: S(w.label),
48265
48414
  title: S(w.label),
48266
48415
  key: w.label,
48267
- children: w.children.filter((B) => ["m2o"].includes(B.name)).map((B) => ({
48268
- label: S(B.title),
48269
- title: S(B.title),
48270
- key: B.name,
48271
- dataTargetScope: B.targetScope
48416
+ children: w.children.filter((N) => ["m2o"].includes(N.name)).map((N) => ({
48417
+ label: S(N.title),
48418
+ title: S(N.title),
48419
+ key: N.name,
48420
+ dataTargetScope: N.targetScope
48272
48421
  }))
48273
48422
  } : {
48274
48423
  type: "group",
48275
48424
  label: S(w.label),
48276
48425
  title: S(w.label),
48277
48426
  key: w.label,
48278
- children: w == null ? void 0 : w.children.filter((B) => !["o2o", "subTable", "linkTo"].includes(B.name)).map((B) => ({
48279
- label: S(B.title),
48280
- title: S(B.title),
48281
- key: B.name,
48282
- dataTargetScope: B.targetScope
48427
+ children: w == null ? void 0 : w.children.filter((N) => !["o2o", "subTable", "linkTo"].includes(N.name)).map((N) => ({
48428
+ label: S(N.title),
48429
+ title: S(N.title),
48430
+ key: N.name,
48431
+ dataTargetScope: N.targetScope
48283
48432
  }))
48284
48433
  };
48285
48434
  }).filter((w) => {
48286
48435
  var M;
48287
48436
  return (M = w == null ? void 0 : w.children) == null ? void 0 : M.length;
48288
- }), [T]), N = useMemo(() => ({
48437
+ }), [T]), $ = useMemo(() => ({
48289
48438
  style: {
48290
48439
  maxHeight: "60vh",
48291
48440
  overflow: "auto"
@@ -48293,8 +48442,8 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
48293
48442
  onClick: (w) => {
48294
48443
  const M = w.item.props["data-targetScope"];
48295
48444
  M && f(M);
48296
- const B = getSchema$8(c(w.key), o, S);
48297
- B && (b(B), h(!0));
48445
+ const N = getSchema$8(c(w.key), o, S);
48446
+ N && (b(N), h(!0));
48298
48447
  },
48299
48448
  items: D
48300
48449
  }), [c, D, o]), z = useMemo(() => A.filter((w) => ["string", "bigInt", "integer"].includes(w.type)).map((w) => {
@@ -48305,7 +48454,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
48305
48454
  };
48306
48455
  }), [A == null ? void 0 : A.length]);
48307
48456
  return o.template !== "sql" && /* @__PURE__ */ jsx(RecordProvider, { record: o, children: /* @__PURE__ */ jsxs(ActionContextProvider, { value: { visible: m, setVisible: h }, children: [
48308
- /* @__PURE__ */ jsx(Dropdown, { getPopupContainer: n, trigger: i, align: a, menu: N, children: r || /* @__PURE__ */ jsx(Button, { icon: /* @__PURE__ */ jsx(PlusOutlined, {}), type: "primary", children: y("Add field") }) }),
48457
+ /* @__PURE__ */ jsx(Dropdown, { getPopupContainer: n, trigger: i, align: a, menu: $, children: r || /* @__PURE__ */ jsx(Button, { icon: /* @__PURE__ */ jsx(PlusOutlined, {}), type: "primary", children: y("Add field") }) }),
48309
48458
  /* @__PURE__ */ jsx(
48310
48459
  SchemaComponent,
48311
48460
  {
@@ -48439,8 +48588,8 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
48439
48588
  S(R == null ? void 0 : R.data);
48440
48589
  const T = l(o.interface), D = cloneDeep(R == null ? void 0 : R.data) || {};
48441
48590
  D != null && D.reverseField || (D.autoCreateReverseField = !1, D.reverseField = (z = T == null ? void 0 : T.default) == null ? void 0 : z.reverseField, set$1(D.reverseField, "name", `f_${uid()}`), set$1(D.reverseField, "uiSchema.title", (L = o.__parent) == null ? void 0 : L.title));
48442
- const N = getSchema$7(T, D, o, C);
48443
- h(N), p(!0);
48591
+ const $ = getSchema$7(T, D, o, C);
48592
+ h($), p(!0);
48444
48593
  }),
48445
48594
  children: i || f("Edit")
48446
48595
  })
@@ -48532,19 +48681,19 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
48532
48681
  const t = useRecord(), n = useCollectionParentRecordData();
48533
48682
  return /* @__PURE__ */ jsx(OverridingFieldAction, x({ item: t, parentItem: n }, e));
48534
48683
  }, getIsOverriding = (e, t, n) => t.find((r) => r.name === n.name).collectionName === e, OverridingFieldAction = (e) => {
48535
- const { scope: t, getContainer: n, item: o, parentItem: r, children: i, currentCollection: a } = e, { target: l, through: c } = o, { getInterface: u, getCollection: d, getCurrentCollectionFields: p, getChildrenCollections: m, collections: h } = useCollectionManager_deprecated(), [g, f] = useState(!1), [C, b] = useState({}), S = useAPIClient(), { t: y } = useTranslation(), v = useCompile(), F = ($) => {
48684
+ const { scope: t, getContainer: n, item: o, parentItem: r, children: i, currentCollection: a } = e, { target: l, through: c } = o, { getInterface: u, getCollection: d, getCurrentCollectionFields: p, getChildrenCollections: m, collections: h } = useCollectionManager_deprecated(), [g, f] = useState(!1), [C, b] = useState({}), S = useAPIClient(), { t: y } = useTranslation(), v = useCompile(), F = (B) => {
48536
48685
  var M;
48537
- return $ && ((M = m($)) == null ? void 0 : M.map((B) => B.name).concat([$]));
48538
- }, [A, R] = useState({}), T = p(a), D = getIsOverriding(a, T, o), N = useMemo(() => h.map(($) => ({
48539
- label: v($.title),
48540
- value: $.name
48686
+ return B && ((M = m(B)) == null ? void 0 : M.map((N) => N.name).concat([B]));
48687
+ }, [A, R] = useState({}), T = p(a), D = getIsOverriding(a, T, o), $ = useMemo(() => h.map((B) => ({
48688
+ label: v(B.title),
48689
+ value: B.name
48541
48690
  })), []), z = () => {
48542
- const $ = useForm(), { refresh: w } = useResourceActionContext(), { refreshCM: M } = useCollectionManager_deprecated(), B = useActionContext(), { resource: k } = useResourceContext();
48691
+ const B = useForm(), { refresh: w } = useResourceActionContext(), { refreshCM: M } = useCollectionManager_deprecated(), N = useActionContext(), { resource: k } = useResourceContext();
48543
48692
  return {
48544
48693
  run() {
48545
48694
  return V(this, null, function* () {
48546
- yield $.submit();
48547
- const O = cloneDeep($.values), q = omit(O, [
48695
+ yield B.submit();
48696
+ const O = cloneDeep(B.values), q = omit(O, [
48548
48697
  "key",
48549
48698
  "uiSchemaUid",
48550
48699
  "collectionName",
@@ -48558,13 +48707,13 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
48558
48707
  ]);
48559
48708
  yield k.create({
48560
48709
  values: q
48561
- }), yield $.reset(), yield M(), yield w(), B.setVisible(!1);
48710
+ }), yield B.reset(), yield M(), yield w(), N.setVisible(!1);
48562
48711
  });
48563
48712
  }
48564
48713
  };
48565
48714
  }, L = useMemo(() => {
48566
- var $;
48567
- return (o == null ? void 0 : o.fields) || (($ = d(o.collectionName)) == null ? void 0 : $.options.fields.filter((w) => ["string", "bigInt", "integer"].includes(w.type)).map((w) => {
48715
+ var B;
48716
+ return (o == null ? void 0 : o.fields) || ((B = d(o.collectionName)) == null ? void 0 : B.options.fields.filter((w) => ["string", "bigInt", "integer"].includes(w.type)).map((w) => {
48568
48717
  var M;
48569
48718
  return {
48570
48719
  value: w.name,
@@ -48578,18 +48727,18 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
48578
48727
  {
48579
48728
  disabled: D,
48580
48729
  onClick: () => V(void 0, null, function* () {
48581
- var $;
48730
+ var B;
48582
48731
  if (!D) {
48583
48732
  const { data: w } = yield S.resource("collections.fields", o.collectionName).get({
48584
48733
  filterByTk: o.name,
48585
48734
  appends: ["reverseField"]
48586
48735
  });
48587
48736
  R(w == null ? void 0 : w.data);
48588
- const M = u(o.interface), B = cloneDeep(w == null ? void 0 : w.data) || {};
48589
- B != null && B.reverseField || (B.autoCreateReverseField = !1, B.reverseField = ($ = M.default) == null ? void 0 : $.reverseField, set(B.reverseField, "name", `f_${uid()}`), set(B.reverseField, "uiSchema.title", o.__parent.title));
48737
+ const M = u(o.interface), N = cloneDeep(w == null ? void 0 : w.data) || {};
48738
+ N != null && N.reverseField || (N.autoCreateReverseField = !1, N.reverseField = (B = M.default) == null ? void 0 : B.reverseField, set(N.reverseField, "name", `f_${uid()}`), set(N.reverseField, "uiSchema.title", o.__parent.title));
48590
48739
  const k = getSchema$6(
48591
48740
  P(x({}, M), {
48592
- default: B
48741
+ default: N
48593
48742
  }),
48594
48743
  o,
48595
48744
  v
@@ -48614,7 +48763,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
48614
48763
  override: !0,
48615
48764
  isOverride: !0,
48616
48765
  targetScope: { target: F(l), through: F(c) },
48617
- collections: N,
48766
+ collections: $,
48618
48767
  scopeKeyOptions: L
48619
48768
  }, t)
48620
48769
  }
@@ -49052,7 +49201,7 @@ const getSchema$4 = (e, t, n) => {
49052
49201
  const w = [];
49053
49202
  g.forEach((M) => {
49054
49203
  var q;
49055
- const B = v(M), j = R(M).map((E) => {
49204
+ const N = v(M), j = R(M).map((E) => {
49056
49205
  const U = T(E, M);
49057
49206
  return {
49058
49207
  type: "group",
@@ -49066,22 +49215,22 @@ const getSchema$4 = (e, t, n) => {
49066
49215
  };
49067
49216
  })
49068
49217
  };
49069
- }), O = (q = B.fields.filter((E) => !["obo", "oho", "m2m", "o2m"].includes(E == null ? void 0 : E.interface))) == null ? void 0 : q.map((E) => {
49218
+ }), O = (q = N.fields.filter((E) => !["obo", "oho", "m2m", "o2m"].includes(E == null ? void 0 : E.interface))) == null ? void 0 : q.map((E) => {
49070
49219
  var U;
49071
49220
  return { value: E.name, key: E.name, label: l(((U = E.uiSchema) == null ? void 0 : U.title) || E.name) };
49072
49221
  }).concat(j);
49073
49222
  w.push({
49074
49223
  value: M,
49075
- label: l(B.title || B.name),
49224
+ label: l(N.title || N.name),
49076
49225
  children: O
49077
49226
  });
49078
49227
  }), h(w);
49079
49228
  }, [g, t]), useEffect(() => {
49080
49229
  t && (u(!0), a.resource("dbViews").get({ filterByTk: n, schema: r }).then(({ data: w }) => {
49081
- var M, B;
49230
+ var M, N;
49082
49231
  if (w) {
49083
49232
  u(!1), p([]);
49084
- const k = (B = Object.values((M = w == null ? void 0 : w.data) == null ? void 0 : M.fields)) == null ? void 0 : B.map((j) => {
49233
+ const k = (N = Object.values((M = w == null ? void 0 : w.data) == null ? void 0 : M.fields)) == null ? void 0 : N.map((j) => {
49085
49234
  var O, q;
49086
49235
  if (j.source) {
49087
49236
  const E = (i == null ? void 0 : i.data.find((U) => U.name === j.name)) || j;
@@ -49103,14 +49252,14 @@ const getSchema$4 = (e, t, n) => {
49103
49252
  }).catch);
49104
49253
  }, [t]);
49105
49254
  const L = (w, M) => {
49106
- d.splice(M, 1, w), p(d), S.value = d.map((B) => {
49255
+ d.splice(M, 1, w), p(d), S.value = d.map((N) => {
49107
49256
  var j, O, q;
49108
- const k = typeof B.source == "string" ? B.source : (q = (O = (j = B.source) == null ? void 0 : j.filter) == null ? void 0 : O.call(j, Boolean)) == null ? void 0 : q.join(".");
49109
- return P(x({}, B), {
49257
+ const k = typeof N.source == "string" ? N.source : (q = (O = (j = N.source) == null ? void 0 : j.filter) == null ? void 0 : O.call(j, Boolean)) == null ? void 0 : q.join(".");
49258
+ return P(x({}, N), {
49110
49259
  source: k
49111
49260
  });
49112
49261
  });
49113
- }, $ = [
49262
+ }, B = [
49114
49263
  {
49115
49264
  title: l("Field name"),
49116
49265
  dataIndex: "name",
@@ -49122,7 +49271,7 @@ const getSchema$4 = (e, t, n) => {
49122
49271
  dataIndex: "source",
49123
49272
  key: "source",
49124
49273
  width: 200,
49125
- render: (w, M, B) => /* @__PURE__ */ jsx(
49274
+ render: (w, M, N) => /* @__PURE__ */ jsx(
49126
49275
  Cascader$1,
49127
49276
  {
49128
49277
  defaultValue: typeof w == "string" ? w == null ? void 0 : w.split(".") : w,
@@ -49132,7 +49281,7 @@ const getSchema$4 = (e, t, n) => {
49132
49281
  onChange: (k, j) => {
49133
49282
  var q;
49134
49283
  const O = (q = A(k == null ? void 0 : k[0])) == null ? void 0 : q.find((E) => E.name === last(k));
49135
- L(P(x({}, M), { source: k, uiSchema: O == null ? void 0 : O.uiSchema }), B);
49284
+ L(P(x({}, M), { source: k, uiSchema: O == null ? void 0 : O.uiSchema }), N);
49136
49285
  },
49137
49286
  placeholder: l("Select field source")
49138
49287
  }
@@ -49143,8 +49292,8 @@ const getSchema$4 = (e, t, n) => {
49143
49292
  dataIndex: "type",
49144
49293
  width: 140,
49145
49294
  key: "type",
49146
- render: (w, M, B) => {
49147
- const k = d[B];
49295
+ render: (w, M, N) => {
49296
+ const k = d[N];
49148
49297
  return k != null && k.source || !(k != null && k.possibleTypes) ? /* @__PURE__ */ jsx(Tag, { children: w }) : /* @__PURE__ */ jsx(
49149
49298
  Select$1,
49150
49299
  {
@@ -49152,7 +49301,7 @@ const getSchema$4 = (e, t, n) => {
49152
49301
  popupMatchSelectWidth: !1,
49153
49302
  style: { width: "100%" },
49154
49303
  options: (k == null ? void 0 : k.possibleTypes.map((j) => ({ label: j, value: j }))) || [],
49155
- onChange: (j) => L(P(x({}, k), { type: j }), B)
49304
+ onChange: (j) => L(P(x({}, k), { type: j }), N)
49156
49305
  }
49157
49306
  );
49158
49307
  }
@@ -49162,8 +49311,8 @@ const getSchema$4 = (e, t, n) => {
49162
49311
  dataIndex: "interface",
49163
49312
  key: "interface",
49164
49313
  width: 150,
49165
- render: (w, M, B) => {
49166
- const k = d[B], j = getInterfaceOptions(z, k.type);
49314
+ render: (w, M, N) => {
49315
+ const k = d[N], j = getInterfaceOptions(z, k.type);
49167
49316
  return k.source ? w : /* @__PURE__ */ jsx(
49168
49317
  Select$1,
49169
49318
  {
@@ -49173,7 +49322,7 @@ const getSchema$4 = (e, t, n) => {
49173
49322
  onChange: (O) => {
49174
49323
  var E;
49175
49324
  const q = F(O);
49176
- L(P(x({}, k), { interface: O, uiSchema: (E = q == null ? void 0 : q.default) == null ? void 0 : E.uiSchema }), B);
49325
+ L(P(x({}, k), { interface: O, uiSchema: (E = q == null ? void 0 : q.default) == null ? void 0 : E.uiSchema }), N);
49177
49326
  },
49178
49327
  children: j.map((O) => /* @__PURE__ */ jsx(Select$1.OptGroup, { label: D(O.label), children: O.children.map((q) => /* @__PURE__ */ jsx(Select$1.Option, { value: q.name, children: D(q.label) }, q.value)) }, O.key))
49179
49328
  }
@@ -49185,16 +49334,16 @@ const getSchema$4 = (e, t, n) => {
49185
49334
  dataIndex: "title",
49186
49335
  key: "title",
49187
49336
  width: 180,
49188
- render: (w, M, B) => {
49337
+ render: (w, M, N) => {
49189
49338
  var j;
49190
- const k = d[B];
49339
+ const k = d[N];
49191
49340
  return /* @__PURE__ */ jsx(
49192
49341
  Input$3,
49193
49342
  {
49194
49343
  defaultValue: ((j = k == null ? void 0 : k.uiSchema) == null ? void 0 : j.title) || w,
49195
49344
  onChange: (O) => L(
49196
49345
  P(x({}, k), { uiSchema: P(x({}, omit(k == null ? void 0 : k.uiSchema, "rawTitle")), { title: O.target.value }) }),
49197
- B
49346
+ N
49198
49347
  )
49199
49348
  }
49200
49349
  );
@@ -49212,7 +49361,7 @@ const getSchema$4 = (e, t, n) => {
49212
49361
  {
49213
49362
  bordered: !0,
49214
49363
  size: "middle",
49215
- columns: $,
49364
+ columns: B,
49216
49365
  dataSource: d,
49217
49366
  scroll: { y: 300 },
49218
49367
  pagination: !1,
@@ -49247,14 +49396,14 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
49247
49396
  }, S = (y) => {
49248
49397
  var v;
49249
49398
  return (v = y.filter((F) => F.source || F.interface)) == null ? void 0 : v.map((F) => {
49250
- var N, z, L, $, w, M;
49251
- const A = typeof (F == null ? void 0 : F.source) == "string" ? (N = F == null ? void 0 : F.source) == null ? void 0 : N.split(".") : F == null ? void 0 : F.source, R = (L = (z = h(A == null ? void 0 : A[0])) == null ? void 0 : z.find((B) => B.name === (A == null ? void 0 : A[1]))) == null ? void 0 : L.uiSchema, T = (($ = F == null ? void 0 : F.uiSchema) == null ? void 0 : $.title) || (R == null ? void 0 : R.title) || F.name, D = F.source ? R : (M = (w = m(F.interface)) == null ? void 0 : w.default) == null ? void 0 : M.uiSchema;
49399
+ var $, z, L, B, w, M;
49400
+ const A = typeof (F == null ? void 0 : F.source) == "string" ? ($ = F == null ? void 0 : F.source) == null ? void 0 : $.split(".") : F == null ? void 0 : F.source, R = (L = (z = h(A == null ? void 0 : A[0])) == null ? void 0 : z.find((N) => N.name === (A == null ? void 0 : A[1]))) == null ? void 0 : L.uiSchema, T = ((B = F == null ? void 0 : F.uiSchema) == null ? void 0 : B.title) || (R == null ? void 0 : R.title) || F.name, D = F.source ? R : (M = (w = m(F.interface)) == null ? void 0 : w.default) == null ? void 0 : M.uiSchema;
49252
49401
  return {
49253
49402
  title: u(T),
49254
49403
  dataIndex: F.name,
49255
49404
  key: F.name,
49256
49405
  width: 200,
49257
- render: (B, k, j) => {
49406
+ render: (N, k, j) => {
49258
49407
  const O = k[F.name], q = {
49259
49408
  type: "object",
49260
49409
  properties: {
@@ -49487,28 +49636,28 @@ const AsyncDataProvider = (e) => {
49487
49636
  () => h.filter((T) => !["relation"].includes(T.key)).map((T, D) => ({
49488
49637
  key: D,
49489
49638
  label: d(T.label),
49490
- options: T.children.map((N, z) => ({
49491
- value: N.name,
49639
+ options: T.children.map(($, z) => ({
49640
+ value: $.name,
49492
49641
  key: `${D}-${z}`,
49493
- label: d(N.label)
49642
+ label: d($.label)
49494
49643
  }))
49495
49644
  })),
49496
49645
  [d]
49497
49646
  ), f = useSourceFieldsOptions(), C = useRef(p);
49498
49647
  if (useEffect(() => {
49499
- var N;
49648
+ var $;
49500
49649
  const T = /* @__PURE__ */ new Map();
49501
49650
  i || (a && a.length ? Object.entries((a == null ? void 0 : a[0]) || {}).forEach(([z, L]) => {
49502
49651
  var k;
49503
- const $ = l[z], w = inferInterface(z, L), M = (k = C.current(w)) == null ? void 0 : k.default, B = ($ == null ? void 0 : $.uiSchema) || (M == null ? void 0 : M.uiSchema) || {};
49652
+ const B = l[z], w = inferInterface(z, L), M = (k = C.current(w)) == null ? void 0 : k.default, N = (B == null ? void 0 : B.uiSchema) || (M == null ? void 0 : M.uiSchema) || {};
49504
49653
  T.set(z, {
49505
49654
  name: z,
49506
- interface: ($ == null ? void 0 : $.interface) || w,
49507
- type: ($ == null ? void 0 : $.type) || (M == null ? void 0 : M.type),
49508
- source: $ == null ? void 0 : $.source,
49655
+ interface: (B == null ? void 0 : B.interface) || w,
49656
+ type: (B == null ? void 0 : B.type) || (M == null ? void 0 : M.type),
49657
+ source: B == null ? void 0 : B.source,
49509
49658
  uiSchema: x({
49510
49659
  title: z
49511
- }, B)
49660
+ }, N)
49512
49661
  });
49513
49662
  }) : Object.entries(l || {}).forEach(
49514
49663
  ([z, L]) => T.set(z, P(x({
@@ -49519,7 +49668,7 @@ const AsyncDataProvider = (e) => {
49519
49668
  title: z
49520
49669
  }, (L == null ? void 0 : L.uiSchema) || {})
49521
49670
  }))
49522
- )), (N = c.value) != null && N.length && c.value.forEach((z) => {
49671
+ )), ($ = c.value) != null && $.length && c.value.forEach((z) => {
49523
49672
  T.has(z.name) && T.set(z.name, z);
49524
49673
  });
49525
49674
  const D = Array.from(T.values());
@@ -49535,12 +49684,12 @@ const AsyncDataProvider = (e) => {
49535
49684
  return /* @__PURE__ */ jsx(Alert, { showIcon: !0, message: `${e("SQL error: ")}${T}`, type: "error" });
49536
49685
  }
49537
49686
  const S = (T, D) => {
49538
- const N = [...t];
49539
- N.splice(D, 1, T), n(N), c.setValue(
49540
- N.map((z) => {
49541
- var L, $, w;
49687
+ const $ = [...t];
49688
+ $.splice(D, 1, T), n($), c.setValue(
49689
+ $.map((z) => {
49690
+ var L, B, w;
49542
49691
  return P(x({}, z), {
49543
- source: typeof z.source == "string" ? z.source : ((w = ($ = (L = z.source) == null ? void 0 : L.filter) == null ? void 0 : $.call(L, Boolean)) == null ? void 0 : w.join(".")) || null
49692
+ source: typeof z.source == "string" ? z.source : ((w = (B = (L = z.source) == null ? void 0 : L.filter) == null ? void 0 : B.call(L, Boolean)) == null ? void 0 : w.join(".")) || null
49544
49693
  });
49545
49694
  })
49546
49695
  );
@@ -49556,8 +49705,8 @@ const AsyncDataProvider = (e) => {
49556
49705
  dataIndex: "source",
49557
49706
  key: "source",
49558
49707
  width: 200,
49559
- render: (T, D, N) => {
49560
- const z = t[N];
49708
+ render: (T, D, $) => {
49709
+ const z = t[$];
49561
49710
  return /* @__PURE__ */ jsx(
49562
49711
  Cascader$1,
49563
49712
  {
@@ -49566,15 +49715,15 @@ const AsyncDataProvider = (e) => {
49566
49715
  options: d(f),
49567
49716
  placeholder: e("Select field source"),
49568
49717
  onChange: (L) => {
49569
- let $ = l[L == null ? void 0 : L[1]];
49570
- $ != null && $.interface || ($ = m((L == null ? void 0 : L.join(".")) || "")), S(
49718
+ let B = l[L == null ? void 0 : L[1]];
49719
+ B != null && B.interface || (B = m((L == null ? void 0 : L.join(".")) || "")), S(
49571
49720
  P(x({}, z), {
49572
49721
  source: L,
49573
- interface: $ == null ? void 0 : $.interface,
49574
- type: $ == null ? void 0 : $.type,
49575
- uiSchema: $ == null ? void 0 : $.uiSchema
49722
+ interface: B == null ? void 0 : B.interface,
49723
+ type: B == null ? void 0 : B.type,
49724
+ uiSchema: B == null ? void 0 : B.uiSchema
49576
49725
  }),
49577
- N
49726
+ $
49578
49727
  );
49579
49728
  }
49580
49729
  }
@@ -49586,27 +49735,27 @@ const AsyncDataProvider = (e) => {
49586
49735
  dataIndex: "interface",
49587
49736
  key: "interface",
49588
49737
  width: 150,
49589
- render: (T, D, N) => {
49738
+ render: (T, D, $) => {
49590
49739
  var L;
49591
- const z = t[N];
49740
+ const z = t[$];
49592
49741
  return z.source ? /* @__PURE__ */ jsx(Tag, { children: d((L = p(T)) == null ? void 0 : L.title) || T }) : /* @__PURE__ */ jsx(
49593
49742
  Select$1,
49594
49743
  {
49595
49744
  defaultValue: z.interface || "input",
49596
49745
  style: { width: "100%" },
49597
49746
  popupMatchSelectWidth: !1,
49598
- onChange: ($) => {
49599
- var M, B, k, j, O;
49600
- const w = p($);
49747
+ onChange: (B) => {
49748
+ var M, N, k, j, O;
49749
+ const w = p(B);
49601
49750
  S(
49602
49751
  P(x({}, z), {
49603
- interface: $ || null,
49752
+ interface: B || null,
49604
49753
  uiSchema: P(x({}, (M = w == null ? void 0 : w.default) == null ? void 0 : M.uiSchema), {
49605
- title: ((k = (B = w == null ? void 0 : w.default) == null ? void 0 : B.uiSchema) == null ? void 0 : k.title) || ((j = z.uiSchema) == null ? void 0 : j.title)
49754
+ title: ((k = (N = w == null ? void 0 : w.default) == null ? void 0 : N.uiSchema) == null ? void 0 : k.title) || ((j = z.uiSchema) == null ? void 0 : j.title)
49606
49755
  }),
49607
49756
  type: (O = w == null ? void 0 : w.default) == null ? void 0 : O.type
49608
49757
  }),
49609
- N
49758
+ $
49610
49759
  );
49611
49760
  },
49612
49761
  allowClear: !0,
@@ -49620,15 +49769,15 @@ const AsyncDataProvider = (e) => {
49620
49769
  dataIndex: "title",
49621
49770
  key: "title",
49622
49771
  width: 180,
49623
- render: (T, D, N) => {
49624
- var L, $;
49625
- const z = t[N];
49772
+ render: (T, D, $) => {
49773
+ var L, B;
49774
+ const z = t[$];
49626
49775
  return /* @__PURE__ */ jsx(
49627
49776
  Input$3,
49628
49777
  {
49629
49778
  value: ((L = z.uiSchema) == null ? void 0 : L.title) || T,
49630
- defaultValue: (($ = z.uiSchema) == null ? void 0 : $.title) !== void 0 ? z.uiSchema.title : z == null ? void 0 : z.name,
49631
- onChange: (w) => S(P(x({}, z), { uiSchema: P(x({}, z == null ? void 0 : z.uiSchema), { title: w.target.value }) }), N)
49779
+ defaultValue: ((B = z.uiSchema) == null ? void 0 : B.title) !== void 0 ? z.uiSchema.title : z == null ? void 0 : z.name,
49780
+ onChange: (w) => S(P(x({}, z), { uiSchema: P(x({}, z == null ? void 0 : z.uiSchema), { title: w.target.value }) }), $)
49632
49781
  }
49633
49782
  );
49634
49783
  }
@@ -55699,7 +55848,7 @@ const RolesResourcesActions = connect((e) => {
55699
55848
  const T = p[A.name] || {
55700
55849
  name: A.name
55701
55850
  };
55702
- R ? T.fields = [] : T.fields = (D = l == null ? void 0 : l.map) == null ? void 0 : D.call(l, (N) => N.name), p[A.name] = T, t(Object.values(p));
55851
+ R ? T.fields = [] : T.fields = (D = l == null ? void 0 : l.map) == null ? void 0 : D.call(l, ($) => $.name), p[A.name] = T, t(Object.values(p));
55703
55852
  }
55704
55853
  }
55705
55854
  ),
@@ -55712,15 +55861,15 @@ const RolesResourcesActions = connect((e) => {
55712
55861
  checked: T,
55713
55862
  "aria-label": `${A.name}_checkbox`,
55714
55863
  onChange: () => {
55715
- const N = p[A.name] || {
55864
+ const $ = p[A.name] || {
55716
55865
  name: A.name
55717
- }, z = N.fields || [];
55866
+ }, z = $.fields || [];
55718
55867
  if (T) {
55719
55868
  const L = z.indexOf(D.name);
55720
55869
  z.splice(L, 1);
55721
55870
  } else
55722
55871
  z.push(D.name);
55723
- N.fields = z, p[A.name] = N, t(Object.values(p));
55872
+ $.fields = z, p[A.name] = $, t(Object.values(p));
55724
55873
  }
55725
55874
  }
55726
55875
  )
@@ -56475,9 +56624,9 @@ function PluginInfo(e) {
56475
56624
  y.silent().request({
56476
56625
  url: "__health_check",
56477
56626
  method: "get"
56478
- }).then((N) => {
56479
- (N == null ? void 0 : N.data) === "ok" && window.location.reload();
56480
- }).catch((N) => {
56627
+ }).then(($) => {
56628
+ ($ == null ? void 0 : $.data) === "ok" && window.location.reload();
56629
+ }).catch(($) => {
56481
56630
  });
56482
56631
  }
56483
56632
  setInterval(D, 1e3);
@@ -58492,14 +58641,14 @@ const ActionInitializerItem = (e) => {
58492
58641
  ), F = f || (i == null ? void 0 : i.targetKey) || "id", A = C || ((U = (E = a["x-component-props"]) == null ? void 0 : E.fieldNames) == null ? void 0 : U.label) || F, R = {
58493
58642
  title: A || F,
58494
58643
  key: F
58495
- }, [T, D] = useState([]), [N, z] = useState(a.default || []), [L, $] = useState(!0), w = useLabelUiSchema(i, (R == null ? void 0 : R.title) || "label");
58644
+ }, [T, D] = useState([]), [$, z] = useState(a.default || []), [L, B] = useState(!0), w = useLabelUiSchema(i, (R == null ? void 0 : R.title) || "label");
58496
58645
  if (useEffect(() => {
58497
58646
  a.default && (d(a.default), z(a.default));
58498
58647
  }, [a.default, d]), !i)
58499
58648
  return null;
58500
58649
  const M = (W) => {
58501
- D(W), $(!1);
58502
- }, B = (W) => {
58650
+ D(W), B(!1);
58651
+ }, N = (W) => {
58503
58652
  z(W), d(W), p == null || p(W);
58504
58653
  }, k = (W) => {
58505
58654
  var Y;
@@ -58559,10 +58708,10 @@ const ActionInitializerItem = (e) => {
58559
58708
  expandedKeys: T,
58560
58709
  autoExpandParent: L,
58561
58710
  treeData: u,
58562
- onSelect: B,
58711
+ onSelect: N,
58563
58712
  fieldNames: R,
58564
58713
  titleRender: (W) => /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: getLabelFormatValue(w, c(W[A])) }),
58565
- selectedKeys: N,
58714
+ selectedKeys: $,
58566
58715
  blockNode: !0
58567
58716
  }
58568
58717
  )
@@ -58964,10 +59113,10 @@ const DataBlockInitializer = (e) => {
58964
59113
  currentText: b,
58965
59114
  otherText: S
58966
59115
  } = e, { insert: y, setVisible: v } = useSchemaInitializer(), F = useCompile(), { getTemplateSchemaByMode: A } = useSchemaTemplateManager(), R = useCallback(
58967
- (B) => V(void 0, null, function* () {
58968
- const { item: k, fromOthersInPopup: j } = B;
59116
+ (N) => V(void 0, null, function* () {
59117
+ const { item: k, fromOthersInPopup: j } = N;
58969
59118
  if (f)
58970
- return f(B);
59119
+ return f(N);
58971
59120
  if (k.template) {
58972
59121
  const O = yield A(k);
58973
59122
  y(t ? t(O, { item: k, fromOthersInPopup: j }) : O);
@@ -58990,9 +59139,9 @@ const DataBlockInitializer = (e) => {
58990
59139
  onClick: R,
58991
59140
  currentText: b,
58992
59141
  otherText: S
58993
- }), D = useGetSchemaInitializerMenuItems(R), N = useMemo(() => D(T, i), [D, T, i]), [z, L] = useState([]), $ = useMenuSearch({ data: N, openKeys: z, hideSearch: u }), w = useMemo(() => {
58994
- let B = $.filter((k) => k.key !== "search" && k.key !== "empty");
58995
- return p && B.length === 1 ? B = B[0].children : B = $, [
59142
+ }), D = useGetSchemaInitializerMenuItems(R), $ = useMemo(() => D(T, i), [D, T, i]), [z, L] = useState([]), B = useMenuSearch({ data: $, openKeys: z, hideSearch: u }), w = useMemo(() => {
59143
+ let N = B.filter((k) => k.key !== "search" && k.key !== "empty");
59144
+ return p && N.length === 1 ? N = N[0].children : N = B, [
58996
59145
  {
58997
59146
  key: i,
58998
59147
  label: F(a),
@@ -59000,15 +59149,15 @@ const DataBlockInitializer = (e) => {
59000
59149
  onClick: (k) => {
59001
59150
  k.key === i && R(P(x({}, k), { item: e }));
59002
59151
  },
59003
- children: B
59152
+ children: N
59004
59153
  }
59005
59154
  ];
59006
- }, [$, p, i, F, a, r, R, e]);
59007
- return N.length > 1 || N.length === 1 && ((M = N[0].children) == null ? void 0 : M.length) > 0 ? /* @__PURE__ */ jsx(
59155
+ }, [B, p, i, F, a, r, R, e]);
59156
+ return $.length > 1 || $.length === 1 && ((M = $[0].children) == null ? void 0 : M.length) > 0 ? /* @__PURE__ */ jsx(
59008
59157
  SchemaInitializerMenu,
59009
59158
  {
59010
- onOpenChange: (B) => {
59011
- L(B);
59159
+ onOpenChange: (N) => {
59160
+ L(N);
59012
59161
  },
59013
59162
  items: w
59014
59163
  }