@nocobase/client 1.6.36 → 1.6.38

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
@@ -6052,24 +6052,24 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
6052
6052
  const D = {
6053
6053
  type: "duplicate",
6054
6054
  tag: c((j = T.uiSchema) == null ? void 0 : j.title) || T.name
6055
- }, O = P(x({}, D), {
6055
+ }, N = P(x({}, D), {
6056
6056
  role: "button",
6057
6057
  title: React.createElement(TreeNode, P(x({}, D), { displayType: t })),
6058
6058
  key: R ? `${R}.${T.name}` : T.name,
6059
6059
  isLeaf: !0,
6060
6060
  field: T
6061
6061
  });
6062
- return ["belongsTo", "belongsToMany"].includes(T.type) ? (D.type = "reference", O.type = "reference", O.title = React.createElement(TreeNode, P(x({}, D), { type: "reference", displayType: t })), O.isLeaf = !1, O.children = m(T.target, {
6062
+ 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, {
6063
6063
  depth: F + 1,
6064
6064
  maxDepth: I,
6065
- prefix: O.key,
6065
+ prefix: N.key,
6066
6066
  exclude: systemKeys
6067
- })) : ["hasOne", "hasMany"].includes(T.type) && (O.isLeaf = !1, O.children = p(T.target, {
6067
+ })) : ["hasOne", "hasMany"].includes(T.type) && (N.isLeaf = !1, N.children = p(T.target, {
6068
6068
  depth: F + 1,
6069
6069
  maxDepth: I,
6070
- prefix: O.key,
6070
+ prefix: N.key,
6071
6071
  exclude: ["id", ...systemKeys]
6072
- })), O;
6072
+ })), N;
6073
6073
  }).filter(Boolean), m = (y, { prefix: v, maxDepth: F, depth: I = 0, exclude: R = [] }) => I > F ? [] : o(y).map((T) => {
6074
6074
  var j;
6075
6075
  if (!T.target || !T.interface || R.includes(T.name))
@@ -6077,15 +6077,15 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
6077
6077
  const D = {
6078
6078
  type: "preloading",
6079
6079
  tag: c((j = T.uiSchema) == null ? void 0 : j.title) || T.name
6080
- }, O = v ? `${v}.${T.name}` : T.name;
6080
+ }, N = v ? `${v}.${T.name}` : T.name;
6081
6081
  return {
6082
6082
  role: "button",
6083
6083
  title: React.createElement(TreeNode, P(x({}, D), { displayType: t })),
6084
- key: O,
6084
+ key: N,
6085
6085
  isLeaf: !1,
6086
6086
  field: T,
6087
6087
  children: m(T.target, {
6088
- prefix: O,
6088
+ prefix: N,
6089
6089
  depth: I + 1,
6090
6090
  maxDepth: F,
6091
6091
  exclude: R
@@ -6104,8 +6104,8 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
6104
6104
  return h(F || R.treeData);
6105
6105
  try {
6106
6106
  return p(y, { exclude: ["id", ...systemKeys], maxDepth: 1 });
6107
- } catch (O) {
6108
- return console.error(O), [];
6107
+ } catch (N) {
6108
+ return console.error(N), [];
6109
6109
  }
6110
6110
  }, []), f = useCallback((y) => (v) => new Promise((F) => {
6111
6111
  if (v.children.length)
@@ -6126,10 +6126,10 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
6126
6126
  var M, $;
6127
6127
  if (!T.interface)
6128
6128
  return;
6129
- const O = a(T.interface);
6130
- if (!(O != null && O.filterable))
6129
+ const N = a(T.interface);
6130
+ if (!(N != null && N.filterable))
6131
6131
  return;
6132
- const { nested: j, children: N, operators: B } = O.filterable, w = {
6132
+ const { nested: j, children: O, operators: B } = N.filterable, w = {
6133
6133
  name: T.name,
6134
6134
  title: ((M = T == null ? void 0 : T.uiSchema) == null ? void 0 : M.title) || T.name,
6135
6135
  schema: T == null ? void 0 : T.uiSchema,
@@ -6139,18 +6139,18 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
6139
6139
  if (!(T.target && D > 2)) {
6140
6140
  if (D > 2)
6141
6141
  return w;
6142
- if (N != null && N.length && (w.children = N), j) {
6142
+ if (O != null && O.length && (w.children = O), j) {
6143
6143
  const k = o(T.target), z = I(k, D + 1).filter(Boolean);
6144
6144
  w.children = w.children || [], w.children.push(...z);
6145
6145
  }
6146
6146
  return w;
6147
6147
  }
6148
6148
  }, I = (T, D) => {
6149
- const O = [];
6149
+ const N = [];
6150
6150
  return T.forEach((j) => {
6151
- const N = F(j, D);
6152
- N && O.push(N);
6153
- }), O;
6151
+ const O = F(j, D);
6152
+ O && N.push(O);
6153
+ }), N;
6154
6154
  };
6155
6155
  return I(v, 1);
6156
6156
  },
@@ -7425,8 +7425,8 @@ const collectFieldStateOfLinkageRules = ({ operator: e, value: t, field: n, cond
7425
7425
  });
7426
7426
  try {
7427
7427
  return m(T, x({ now: () => (/* @__PURE__ */ new Date()).toString() }, D));
7428
- } catch (O) {
7429
- console.error(O);
7428
+ } catch (N) {
7429
+ console.error(N);
7430
7430
  }
7431
7431
  } else
7432
7432
  return (t == null ? void 0 : t.mode) === "constant" ? (R = t == null ? void 0 : t.value) != null ? R : t : null;
@@ -7463,7 +7463,7 @@ function replaceVariables(o, r) {
7463
7463
  return;
7464
7464
  const l = (c = e.match(REGEX_OF_VARIABLE_IN_EXPRESSION)) == null ? void 0 : c.map((u) => V(this, null, function* () {
7465
7465
  const { value: d } = yield t.parseVariable(u, n, {
7466
- doNotRequest: u.includes("$nForm")
7466
+ doNotRequest: u.includes("$nForm") || u.includes("$iteration")
7467
7467
  }), p = `_${uid$1()}`;
7468
7468
  return a[p] = d, i[u] = p, d;
7469
7469
  }));
@@ -8545,7 +8545,7 @@ function withInitializer(e) {
8545
8545
  S ? S(y(M, { isInSubTable: i })) : r(d, y(M, { isInSubTable: i }), { onSuccess: p });
8546
8546
  },
8547
8547
  [S, y, i, r, d, p]
8548
- ), { wrapSSR: F, hashId: I, componentCls: R } = useSchemaInitializerStyles(), [T, D] = useState(!1), { token: O } = theme.useToken(), j = useNiceDropdownMaxHeight([T]), N = useMemo(
8548
+ ), { wrapSSR: F, hashId: I, componentCls: R } = useSchemaInitializerStyles(), [T, D] = useState(!1), { token: N } = theme.useToken(), j = useNiceDropdownMaxHeight([T]), O = useMemo(
8549
8549
  () => x({
8550
8550
  options: n,
8551
8551
  style: C
@@ -8553,7 +8553,7 @@ function withInitializer(e) {
8553
8553
  [b, n, C]
8554
8554
  ), B = useMemo(() => css`
8555
8555
  .ant-popover-inner {
8556
- padding: ${`${O.paddingXXS}px 0`};
8556
+ padding: ${`${N.paddingXXS}px 0`};
8557
8557
  .ant-menu-submenu-title {
8558
8558
  margin-block: 0;
8559
8559
  }
@@ -8561,7 +8561,7 @@ function withInitializer(e) {
8561
8561
  padding: 0;
8562
8562
  }
8563
8563
  }
8564
- `, [O.paddingXXS]), w = useMemo(
8564
+ `, [N.paddingXXS]), w = useMemo(
8565
8565
  () => ({
8566
8566
  maxHeight: j,
8567
8567
  overflowY: "auto"
@@ -8585,7 +8585,7 @@ function withInitializer(e) {
8585
8585
  options: n,
8586
8586
  insert: v
8587
8587
  },
8588
- children: f === !1 ? React.createElement(e, N) : /* @__PURE__ */ jsx(
8588
+ children: f === !1 ? React.createElement(e, O) : /* @__PURE__ */ jsx(
8589
8589
  Popover,
8590
8590
  P(x({
8591
8591
  zIndex: 9999,
@@ -8602,10 +8602,10 @@ function withInitializer(e) {
8602
8602
  theme: {
8603
8603
  components: {
8604
8604
  Menu: {
8605
- itemHeight: O.marginXL,
8606
- borderRadius: O.borderRadiusSM,
8607
- itemBorderRadius: O.borderRadiusSM,
8608
- subMenuItemBorderRadius: O.borderRadiusSM
8605
+ itemHeight: N.marginXL,
8606
+ borderRadius: N.borderRadiusSM,
8607
+ itemBorderRadius: N.borderRadiusSM,
8608
+ subMenuItemBorderRadius: N.borderRadiusSM
8609
8609
  }
8610
8610
  }
8611
8611
  },
@@ -8613,7 +8613,7 @@ function withInitializer(e) {
8613
8613
  }
8614
8614
  ) })
8615
8615
  ),
8616
- children: React.createElement(e, N)
8616
+ children: React.createElement(e, O)
8617
8617
  })
8618
8618
  )
8619
8619
  }
@@ -9210,7 +9210,7 @@ function addAppVersion(e, t) {
9210
9210
  addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
9211
9211
  }), e;
9212
9212
  }
9213
- const name = "@nocobase/client", version = "1.6.36", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
9213
+ const name = "@nocobase/client", version = "1.6.38", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
9214
9214
  "@ahooksjs/use-url-state": "3.5.1",
9215
9215
  "@ant-design/cssinjs": "^1.11.1",
9216
9216
  "@ant-design/icons": "^5.6.1",
@@ -9231,9 +9231,9 @@ const name = "@nocobase/client", version = "1.6.36", license = "AGPL-3.0", main
9231
9231
  "@formily/reactive-react": "^2.2.27",
9232
9232
  "@formily/shared": "^2.2.27",
9233
9233
  "@formily/validator": "^2.2.27",
9234
- "@nocobase/evaluators": "1.6.36",
9235
- "@nocobase/sdk": "1.6.36",
9236
- "@nocobase/utils": "1.6.36",
9234
+ "@nocobase/evaluators": "1.6.38",
9235
+ "@nocobase/sdk": "1.6.38",
9236
+ "@nocobase/utils": "1.6.38",
9237
9237
  ahooks: "^3.7.2",
9238
9238
  antd: "5.12.8",
9239
9239
  "antd-style": "3.7.1",
@@ -10256,11 +10256,11 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
10256
10256
  }
10257
10257
  `, [n.paddingContentVerticalLG, n.marginSM, n.margin]), C = useCollection(), b = useMemo(() => withTooltipComponent(NocoBaseRecursionField), []), S = useMemo(
10258
10258
  () => u == null ? void 0 : u.map((v) => {
10259
- var j, N, B, w;
10259
+ var j, O, B, w;
10260
10260
  const F = v.reduceProperties((M, $) => {
10261
10261
  if (isCollectionFieldComponent($))
10262
10262
  return M.concat([$]);
10263
- }, []), I = (F == null ? void 0 : F.length) > 0 ? F[0].name : v.name, R = !!((j = v["x-component-props"]) != null && j.columnHidden), { uiSchema: T, defaultValue: D, interface: O } = (C == null ? void 0 : C.getField(I)) || {};
10263
+ }, []), I = (F == null ? void 0 : F.length) > 0 ? F[0].name : v.name, R = !!((j = v["x-component-props"]) != null && j.columnHidden), { uiSchema: T, defaultValue: D, interface: N } = (C == null ? void 0 : C.getField(I)) || {};
10264
10264
  return T && (T.default = D), P(x({
10265
10265
  title: /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: h, children: /* @__PURE__ */ jsx(
10266
10266
  b,
@@ -10269,7 +10269,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
10269
10269
  schema: v,
10270
10270
  onlyRenderSelf: !0,
10271
10271
  isUseFormilyField: !1,
10272
- tooltip: (N = v == null ? void 0 : v["x-component-props"]) == null ? void 0 : N.tooltip
10272
+ tooltip: (O = v == null ? void 0 : v["x-component-props"]) == null ? void 0 : O.tooltip
10273
10273
  }
10274
10274
  ) }),
10275
10275
  dataIndex: I,
@@ -10416,7 +10416,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
10416
10416
  display: none !important;
10417
10417
  }
10418
10418
  `,
10419
- itemRender: (D, O, j) => O === "prev" ? /* @__PURE__ */ jsxs(
10419
+ itemRender: (D, N, j) => N === "prev" ? /* @__PURE__ */ jsxs(
10420
10420
  "div",
10421
10421
  {
10422
10422
  style: { display: "flex" },
@@ -10657,8 +10657,8 @@ const Table$2 = withDynamicSchemaProps(
10657
10657
  "loading",
10658
10658
  "onClickRow",
10659
10659
  "value"
10660
- ]), y = useArrayField$1(S), v = useFieldSchema(), { size: F = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, I = useCollection(), T = ((Ce = v == null ? void 0 : v.parent) == null ? void 0 : Ce["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: O } = T, j = useMemoizedFn(S.onRowDragEnd || (() => {
10661
- })), N = usePaginationProps$3(n, i, e), B = useTableColumns$2(S, N), [w, M] = useState(() => D ? O : []), [$, k] = useState(((be = y == null ? void 0 : y.data) == null ? void 0 : be.selectedRowKeys) || []), [z, L] = useState([]), q = (p == null ? void 0 : p.type) !== "none", E = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
10660
+ ]), y = useArrayField$1(S), v = useFieldSchema(), { size: F = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, I = useCollection(), T = ((Ce = v == null ? void 0 : v.parent) == null ? void 0 : Ce["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: N } = T, j = useMemoizedFn(S.onRowDragEnd || (() => {
10661
+ })), O = usePaginationProps$3(n, i, e), B = useTableColumns$2(S, O), [w, M] = useState(() => D ? N : []), [$, k] = useState(((be = y == null ? void 0 : y.data) == null ? void 0 : be.selectedRowKeys) || []), [z, L] = useState([]), q = (p == null ? void 0 : p.type) !== "none", E = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
10662
10662
  & > td {
10663
10663
  background-color: ${t.controlItemBgActive} !important;
10664
10664
  }
@@ -10683,9 +10683,9 @@ const Table$2 = withDynamicSchemaProps(
10683
10683
  record: Q
10684
10684
  }), [C, z]);
10685
10685
  useDeepCompareEffect(() => {
10686
- const Q = D ? O : [];
10686
+ const Q = D ? N : [];
10687
10687
  _.isEqual(Q, w) || M(Q);
10688
- }, [D, O]);
10688
+ }, [D, N]);
10689
10689
  const K = useCallback((Q) => {
10690
10690
  if (m)
10691
10691
  return W(Q);
@@ -10747,7 +10747,7 @@ const Table$2 = withDynamicSchemaProps(
10747
10747
  renderCell: (Q, te, oe, ie) => {
10748
10748
  if (!l && !c)
10749
10749
  return ie;
10750
- const ae = N == null ? void 0 : N.current, xe = (N == null ? void 0 : N.pageSize) || 20;
10750
+ const ae = O == null ? void 0 : O.current, xe = (O == null ? void 0 : O.pageSize) || 20;
10751
10751
  return ae ? oe = oe + (ae - 1) * xe + 1 : oe = oe + 1, te.__index && (oe = extractIndex(te.__index)), /* @__PURE__ */ jsxs(
10752
10752
  "div",
10753
10753
  {
@@ -10788,7 +10788,7 @@ const Table$2 = withDynamicSchemaProps(
10788
10788
  W,
10789
10789
  q,
10790
10790
  ne,
10791
- N,
10791
+ O,
10792
10792
  U
10793
10793
  ]
10794
10794
  ), se = useCallback(
@@ -10832,7 +10832,7 @@ const Table$2 = withDynamicSchemaProps(
10832
10832
  defaultRowKey: K,
10833
10833
  dataSource: X
10834
10834
  }, S), re), {
10835
- paginationProps: N,
10835
+ paginationProps: O,
10836
10836
  components: Z,
10837
10837
  onTableChange: d,
10838
10838
  onRow: J,
@@ -11505,7 +11505,7 @@ ${JSON.stringify(L, null, 2)}`
11505
11505
  F,
11506
11506
  h
11507
11507
  ]
11508
- ), O = useCallback(() => {
11508
+ ), N = useCallback(() => {
11509
11509
  if (!f())
11510
11510
  return I == null ? void 0 : I(!1);
11511
11511
  t(withSearchParams(removeLastPopupPath(n.pathname)), { replace: !0 }), removePopupLayerState(h), m != null && m.popupuid && deletePopupContext(m.popupuid);
@@ -11530,7 +11530,7 @@ ${JSON.stringify(L, null, 2)}`
11530
11530
  });
11531
11531
  },
11532
11532
  [R, t, m == null ? void 0 : m.popupuid, i == null ? void 0 : i.data, n]
11533
- ), N = useCallback((w, M) => {
11533
+ ), O = useCallback((w, M) => {
11534
11534
  M.__popup = w;
11535
11535
  }, []), B = useCallback((w) => w.__popup, []);
11536
11536
  return {
@@ -11541,8 +11541,8 @@ ${JSON.stringify(L, null, 2)}`
11541
11541
  /**
11542
11542
  * used to close popup by changing the url
11543
11543
  */
11544
- closePopup: O,
11545
- savePopupSchemaToSchema: N,
11544
+ closePopup: N,
11545
+ savePopupSchemaToSchema: O,
11546
11546
  getPopupSchemaFromSchema: B,
11547
11547
  context: S,
11548
11548
  /**
@@ -13135,7 +13135,7 @@ https://requirejs.org/docs/errors.html#` + e);
13135
13135
  };
13136
13136
  }
13137
13137
  };
13138
- function O(k) {
13138
+ function N(k) {
13139
13139
  delete l[k], delete c[k];
13140
13140
  }
13141
13141
  function j(k, z, L) {
@@ -13145,7 +13145,7 @@ https://requirejs.org/docs/errors.html#` + e);
13145
13145
  H && !k.depMatched[G] && !L[U] && (getOwn(z, U) ? (k.defineDep(G, p[U]), k.check()) : j(H, z, L));
13146
13146
  }), L[q] = !0);
13147
13147
  }
13148
- function N() {
13148
+ function O() {
13149
13149
  var k, z, L = a.waitSeconds * 1e3, q = L && o.startTime + L < (/* @__PURE__ */ new Date()).getTime(), E = [], G = [], U = !1, H = !0;
13150
13150
  if (!t) {
13151
13151
  if (t = !0, eachProp(c, function(J) {
@@ -13161,7 +13161,7 @@ https://requirejs.org/docs/errors.html#` + e);
13161
13161
  H && each(G, function(J) {
13162
13162
  j(J, {}, {});
13163
13163
  }), (!q || z) && U && (isBrowser || isWebWorker) && !i && (i = setTimeout(function() {
13164
- i = 0, N();
13164
+ i = 0, O();
13165
13165
  }, 50)), t = !1;
13166
13166
  }
13167
13167
  }
@@ -13226,7 +13226,7 @@ https://requirejs.org/docs/errors.html#` + e);
13226
13226
  U.push(H.normalizedMap || H);
13227
13227
  }), req.onResourceLoad(o, this.map, U);
13228
13228
  }
13229
- O(L), this.defined = !0;
13229
+ N(L), this.defined = !0;
13230
13230
  }
13231
13231
  this.defining = !1, this.defined && !this.defineEmitted && (this.defineEmitted = !0, this.emit("defined", this.exports), this.defineEmitComplete = !0);
13232
13232
  }
@@ -13273,7 +13273,7 @@ https://requirejs.org/docs/errors.html#` + e);
13273
13273
  });
13274
13274
  }), E.error = bind(this, function(X) {
13275
13275
  this.inited = !0, this.error = X, X.requireModules = [z], eachProp(l, function(ee) {
13276
- ee.map.id.indexOf(z + "_unnormalized") === 0 && O(ee.map.id);
13276
+ ee.map.id.indexOf(z + "_unnormalized") === 0 && N(ee.map.id);
13277
13277
  }), T(X);
13278
13278
  }), E.fromText = bind(this, function(X, ee) {
13279
13279
  var Z = k.name, ne = F(Z), re = useInteractive;
@@ -13409,7 +13409,7 @@ https://requirejs.org/docs/errors.html#` + e);
13409
13409
  return z.enableBuildCallback && E && isFunction(E) && (E.__requireJsBuild = !0), typeof q == "string" ? isFunction(E) ? T(makeError("requireargs", "Invalid require call"), G) : k && hasProp(r, q) ? r[q](l[k.id]) : req.get ? req.get(o, q, k, L) : (H = F(q, k, !1, !0), U = H.id, hasProp(p, U) ? p[U] : T(makeError("notloaded", 'Module name "' + U + '" has not been loaded yet for context: ' + e + (k ? "" : ". Use require([])")))) : ($(), o.nextTick(function() {
13410
13410
  $(), J = I(F(null, k)), J.skipMap = z.skipMap, J.init(q, E, G, {
13411
13411
  enabled: !0
13412
- }), N();
13412
+ }), O();
13413
13413
  }), L);
13414
13414
  }
13415
13415
  return mixin(L, {
@@ -13438,7 +13438,7 @@ https://requirejs.org/docs/errors.html#` + e);
13438
13438
  var E = F(q, k, !0), G = getOwn(l, q);
13439
13439
  G.undefed = !0, S(q), delete p[q], delete m[E.url], delete u[q], eachReverse(d, function(U, H) {
13440
13440
  U[0] === q && d.splice(H, 1);
13441
- }), delete o.defQueueMap[q], G && (G.events.defined && (u[q] = G.events), O(q));
13441
+ }), delete o.defQueueMap[q], G && (G.events.defined && (u[q] = G.events), N(q));
13442
13442
  }), L;
13443
13443
  },
13444
13444
  /**
@@ -13478,7 +13478,7 @@ https://requirejs.org/docs/errors.html#` + e);
13478
13478
  ));
13479
13479
  B([k, E.deps || [], E.exportsFn]);
13480
13480
  }
13481
- N();
13481
+ O();
13482
13482
  },
13483
13483
  /**
13484
13484
  * Converts a module name to a file path. Supports cases where
@@ -14830,7 +14830,7 @@ const BaseVariableContext = React.createContext(null), BaseVariableProvider = (e
14830
14830
  isDisabled: f || isDisabledDefault,
14831
14831
  getCollectionField: C.getCollectionField,
14832
14832
  deprecated: p
14833
- }) || []).sort((D, O) => D.isLeaf && !O.isLeaf ? -1 : !D.isLeaf && O.isLeaf ? 1 : 0).sort((D, O) => D.disabled && !O.disabled ? 1 : !D.disabled && O.disabled ? -1 : 0);
14833
+ }) || []).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);
14834
14834
  if (T.length === 0) {
14835
14835
  y.disabled = !0, y.isLeaf = !0, I();
14836
14836
  return;
@@ -15054,8 +15054,8 @@ const useDragEnd = (e) => {
15054
15054
  const { refresh: t } = useDesignable(), n = useAPIClient(), { t: o } = useTranslation();
15055
15055
  return useCallback(
15056
15056
  (r) => {
15057
- var f, C, b, S, y, v, F, I, R, T, D, O, j, N, B;
15058
- 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 = (I = (F = a == null ? void 0 : a.data) == null ? void 0 : F.current) == null ? void 0 : I.breakRemoveOn, p = (T = (R = a == null ? void 0 : a.data) == null ? void 0 : R.current) == null ? void 0 : T.wrapSchema, m = (O = (D = a == null ? void 0 : a.data) == null ? void 0 : D.current) == null ? void 0 : O.onSuccess, h = (B = (N = (j = a == null ? void 0 : a.data) == null ? void 0 : j.current) == null ? void 0 : N.removeParentsIfNoChildren) != null ? B : !0;
15057
+ var f, C, b, S, y, v, F, I, R, T, D, N, j, O, B;
15058
+ 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 = (I = (F = a == null ? void 0 : a.data) == null ? void 0 : F.current) == null ? void 0 : I.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 = (B = (O = (j = a == null ? void 0 : a.data) == null ? void 0 : j.current) == null ? void 0 : O.removeParentsIfNoChildren) != null ? B : !0;
15059
15059
  if (!l || !c) {
15060
15060
  e == null || e(r);
15061
15061
  return;
@@ -15185,8 +15185,8 @@ const breakRemoveOnGrid = (e) => e["x-component"] === "Grid", breakRemoveOnRow =
15185
15185
  if (e.first)
15186
15186
  m = d !== e.cols[0];
15187
15187
  else {
15188
- const D = e.cols[e.index], O = e.cols[e.index + 1];
15189
- m = d !== D && O !== d;
15188
+ const D = e.cols[e.index], N = e.cols[e.index + 1];
15189
+ m = d !== D && N !== d;
15190
15190
  }
15191
15191
  const h = e.cols[e.index], g = e.cols[e.index + 1], f = e.first || e.last || !r, {
15192
15192
  attributes: C,
@@ -15208,27 +15208,27 @@ const breakRemoveOnGrid = (e) => e["x-component"] === "Grid", breakRemoveOnRow =
15208
15208
  return useDndMonitor({
15209
15209
  onDragStart(D) {
15210
15210
  var w, M, $;
15211
- const O = ($ = (M = (w = D.active) == null ? void 0 : w.data) == null ? void 0 : M.current) == null ? void 0 : $.dividerRef;
15212
- if (!O || !r)
15211
+ const N = ($ = (M = (w = D.active) == null ? void 0 : w.data) == null ? void 0 : M.current) == null ? void 0 : $.dividerRef;
15212
+ if (!N || !r)
15213
15213
  return;
15214
15214
  n.current = D.active.id;
15215
- const j = O.current, N = j.previousElementSibling, B = j.nextElementSibling;
15216
- F([N.clientWidth, B.clientWidth]);
15215
+ const j = N.current, O = j.previousElementSibling, B = j.nextElementSibling;
15216
+ F([O.clientWidth, B.clientWidth]);
15217
15217
  },
15218
15218
  onDragMove(D) {
15219
15219
  if (!r || !y)
15220
15220
  return;
15221
15221
  n.current === D.active.id && (n.current = n.current + "_move");
15222
- const O = l.current, j = O.previousElementSibling, N = O.nextElementSibling;
15223
- j.style.width = `${v[0] + D.delta.x}px`, N.style.width = `${v[1] - D.delta.x}px`;
15222
+ const N = l.current, j = N.previousElementSibling, O = N.nextElementSibling;
15223
+ j.style.width = `${v[0] + D.delta.x}px`, O.style.width = `${v[1] - D.delta.x}px`;
15224
15224
  },
15225
15225
  onDragEnd(D) {
15226
15226
  var $;
15227
15227
  if (!r || !n.current || ($ = n.current) != null && $.startsWith(D.active.id) && !n.current.endsWith("_move") || v[0] <= 0 || v[1] <= 0 || (F([0, 0]), !h || !g))
15228
15228
  return;
15229
- const O = l.current, j = O.previousElementSibling, N = O.nextElementSibling;
15229
+ const N = l.current, j = N.previousElementSibling, O = N.nextElementSibling;
15230
15230
  h["x-component-props"] = h["x-component-props"] || {}, g["x-component-props"] = g["x-component-props"] || {};
15231
- const B = O.clientWidth * (e.cols.length + 1) / e.cols.length, w = (100 * (j.getBoundingClientRect().width + B) / O.parentElement.clientWidth).toFixed(2), M = (100 * (N.getBoundingClientRect().width + B) / O.parentElement.clientWidth).toFixed(2);
15231
+ const B = N.clientWidth * (e.cols.length + 1) / e.cols.length, w = (100 * (j.getBoundingClientRect().width + B) / N.parentElement.clientWidth).toFixed(2), M = (100 * (O.getBoundingClientRect().width + B) / N.parentElement.clientWidth).toFixed(2);
15232
15232
  _.set(h, "x-component-props.width", w), _.set(g, "x-component-props.width", M), o.emit("batchPatch", {
15233
15233
  schemas: [
15234
15234
  {
@@ -15543,8 +15543,8 @@ const useTableBlockProps = () => {
15543
15543
  ),
15544
15544
  onChange: useCallback(
15545
15545
  ({ current: S, pageSize: y }, v, F) => {
15546
- var O, j, N, B, w, M, $, k, z, L;
15547
- const I = (N = (j = (O = t.parent) == null ? void 0 : O["x-decorator-props"]) == null ? void 0 : j.params) == null ? void 0 : N.sort, R = F.order ? F.order === "ascend" ? [F.field] : [`-${F.field}`] : I || 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({}, (z = (k = ($ = a.current) == null ? void 0 : $.service) == null ? void 0 : k.params) == null ? void 0 : z[0]), { page: S || 1, pageSize: T });
15546
+ var N, j, O, B, w, M, $, k, z, L;
15547
+ const I = (O = (j = (N = t.parent) == null ? void 0 : N["x-decorator-props"]) == null ? void 0 : j.params) == null ? void 0 : O.sort, R = F.order ? F.order === "ascend" ? [F.field] : [`-${F.field}`] : I || 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({}, (z = (k = ($ = a.current) == null ? void 0 : $.service) == null ? void 0 : k.params) == null ? void 0 : z[0]), { page: S || 1, pageSize: T });
15548
15548
  R && (D.sort = R), (L = a.current) == null || L.service.run(D);
15549
15549
  },
15550
15550
  [t.parent]
@@ -15552,17 +15552,17 @@ const useTableBlockProps = () => {
15552
15552
  onClickRow: useCallback(
15553
15553
  (S, y, v) => {
15554
15554
  const { targets: F, uid: I } = findFilterTargets(t), R = r();
15555
- if (!F || !F.some((D) => R.some((O) => O.uid === D.uid))) {
15555
+ if (!F || !F.some((D) => R.some((N) => N.uid === D.uid))) {
15556
15556
  y((D) => D.length ? [] : D);
15557
15557
  return;
15558
15558
  }
15559
15559
  const T = R.find((D) => D.uid === t.parent["x-uid"]);
15560
15560
  R.forEach((D) => {
15561
15561
  var $, k, z, L;
15562
- const O = F.find((q) => q.uid === D.uid);
15563
- if (!O)
15562
+ const N = F.find((q) => q.uid === D.uid);
15563
+ if (!N)
15564
15564
  return;
15565
- const j = getSourceKey(T, O.field) || i.rowKey || "id", N = [S[j]], B = (($ = D.service.params) == null ? void 0 : $[0]) || {}, w = ((z = (k = D.service.params) == null ? void 0 : k[1]) == null ? void 0 : z.filters) || {};
15565
+ const j = getSourceKey(T, N.field) || i.rowKey || "id", O = [S[j]], B = (($ = D.service.params) == null ? void 0 : $[0]) || {}, w = ((z = (k = D.service.params) == null ? void 0 : k[1]) == null ? void 0 : z.filters) || {};
15566
15566
  if (v.includes(S[i.rowKey])) {
15567
15567
  if ((L = D.clearSelection) == null || L.call(D), D.dataLoadingMode === "manual")
15568
15568
  return D.clearData();
@@ -15571,8 +15571,8 @@ const useTableBlockProps = () => {
15571
15571
  w[I] = {
15572
15572
  $and: [
15573
15573
  {
15574
- [O.field || i.rowKey]: {
15575
- [O.field ? "$in" : "$eq"]: N
15574
+ [N.field || i.rowKey]: {
15575
+ [N.field ? "$in" : "$eq"]: O
15576
15576
  }
15577
15577
  }
15578
15578
  ]
@@ -15970,10 +15970,10 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
15970
15970
  var a, l, c, u, d, p, m, h, g, f, C, b, S, y, v, F;
15971
15971
  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"]);
15972
15972
  return useEffect(() => {
15973
- var R, T, D, O, j, N, B, w, M, $, k, z, L;
15973
+ var R, T, D, N, j, O, B, w, M, $, k, z, L;
15974
15974
  if (!((R = t == null ? void 0 : t.service) != null && R.loading)) {
15975
15975
  const q = (D = (T = t == null ? void 0 : t.service) == null ? void 0 : T.data) == null ? void 0 : D.data.map((E) => E);
15976
- e.value = q, (O = e == null ? void 0 : e.setInitialValue) == null || O.call(e, q), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (B = (N = (j = t == null ? void 0 : t.service) == null ? void 0 : j.data) == null ? void 0 : N.meta) == null ? void 0 : B.pageSize, e.componentProps.pagination.total = ($ = (M = (w = t == null ? void 0 : t.service) == null ? void 0 : w.data) == null ? void 0 : M.meta) == null ? void 0 : $.count, e.componentProps.pagination.current = (L = (z = (k = t == null ? void 0 : t.service) == null ? void 0 : k.data) == null ? void 0 : z.meta) == null ? void 0 : L.page;
15976
+ 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 = (B = (O = (j = t == null ? void 0 : t.service) == null ? void 0 : j.data) == null ? void 0 : O.meta) == null ? void 0 : B.pageSize, e.componentProps.pagination.total = ($ = (M = (w = t == null ? void 0 : t.service) == null ? void 0 : w.data) == null ? void 0 : M.meta) == null ? void 0 : $.count, e.componentProps.pagination.current = (L = (z = (k = t == null ? void 0 : t.service) == null ? void 0 : k.data) == null ? void 0 : z.meta) == null ? void 0 : L.page;
15977
15977
  }
15978
15978
  }, [
15979
15979
  i == null ? void 0 : i.foreignKey,
@@ -16781,8 +16781,8 @@ const useFormItemInitializerFields = (e) => {
16781
16781
  Component: "CollectionFieldInitializer",
16782
16782
  remove: removeGridFormItem,
16783
16783
  schemaInitialize: (D) => {
16784
- var O;
16785
- (O = h == null ? void 0 : h.schemaInitialize) == null || O.call(h, D, {
16784
+ var N;
16785
+ (N = h == null ? void 0 : h.schemaInitialize) == null || N.call(h, D, {
16786
16786
  field: m,
16787
16787
  block: l,
16788
16788
  readPretty: a,
@@ -16792,9 +16792,9 @@ const useFormItemInitializerFields = (e) => {
16792
16792
  },
16793
16793
  schema: S
16794
16794
  };
16795
- return l == "Kanban" && (y.find = (D, O, j) => {
16796
- const N = findSchema(D, "x-component", l);
16797
- return findSchema(N, O, j);
16795
+ return l == "Kanban" && (y.find = (D, N, j) => {
16796
+ const O = findSchema(D, "x-component", l);
16797
+ return findSchema(O, N, j);
16798
16798
  }), y;
16799
16799
  });
16800
16800
  }, useFilterFormItemInitializerFields = (e) => {
@@ -17155,14 +17155,14 @@ const useFormItemInitializerFields = (e) => {
17155
17155
  t: h,
17156
17156
  componentNamePrefix: m
17157
17157
  }).sort((D) => {
17158
- const O = _.toArray((C == null ? void 0 : C.inherits) || []);
17159
- if (D.name === (C == null ? void 0 : C.name) || O.some((j) => j === D.name))
17158
+ const N = _.toArray((C == null ? void 0 : C.inherits) || []);
17159
+ if (D.name === (C == null ? void 0 : C.name) || N.some((j) => j === D.name))
17160
17160
  return -1;
17161
17161
  })
17162
17162
  ]
17163
17163
  })), [y, C == null ? void 0 : C.inherits, C == null ? void 0 : C.name, t, v, h]);
17164
17164
  return r ? useMemo(() => {
17165
- var N;
17165
+ var O;
17166
17166
  const I = {
17167
17167
  name: "currentRecord",
17168
17168
  collectionName: C.name,
@@ -17226,25 +17226,25 @@ const useFormItemInitializerFields = (e) => {
17226
17226
  }
17227
17227
  })
17228
17228
  };
17229
- let O;
17229
+ let N;
17230
17230
  const j = b.length ? R : null;
17231
17231
  if (F[0].children.length && b.length)
17232
- l ? O = [I, j] : O = [I, j, D];
17232
+ l ? N = [I, j] : N = [I, j, D];
17233
17233
  else if (F[0].children.length)
17234
17234
  if (l) {
17235
17235
  if (F[0].children.length <= 1)
17236
- return F[0].children = ((N = F[0].children[0]) == null ? void 0 : N.children) || [], F;
17237
- O = [I];
17236
+ return F[0].children = ((O = F[0].children[0]) == null ? void 0 : O.children) || [], F;
17237
+ N = [I];
17238
17238
  } else
17239
- O = [I, D];
17239
+ N = [I, D];
17240
17240
  else
17241
- l ? O = [j] : O = [j, D];
17241
+ l ? N = [j] : N = [j, D];
17242
17242
  return [
17243
17243
  {
17244
17244
  name: "records",
17245
17245
  label: h("Records"),
17246
17246
  type: "subMenu",
17247
- children: O.filter(Boolean)
17247
+ children: N.filter(Boolean)
17248
17248
  }
17249
17249
  ];
17250
17250
  }, [
@@ -17959,7 +17959,7 @@ const useGetAriaLabelOfDesigner = () => {
17959
17959
  display: block !important;
17960
17960
  }
17961
17961
  `, GeneralSchemaDesigner = (e) => {
17962
- var O, j;
17962
+ var N, j;
17963
17963
  const t = useFieldSchema(), {
17964
17964
  disableInitializer: n,
17965
17965
  title: o,
@@ -17976,10 +17976,10 @@ const useGetAriaLabelOfDesigner = () => {
17976
17976
  t["x-settings"] || i,
17977
17977
  t["x-settings-props"]
17978
17978
  ), S = useGridRowContext(), y = useGridContext(), v = useDataSourceManager(), F = v == null ? void 0 : v.getDataSources(), I = useDataSource(), R = (F == null ? void 0 : F.length) > 1 && I, T = ["FormItem", "ReadPrettyFormItem"].includes(r == null ? void 0 : r.componentName) ? `${r == null ? void 0 : r.name} ${m("(Fields only)")}` : r == null ? void 0 : r.name, D = useMemo(() => {
17979
- var N;
17979
+ var O;
17980
17980
  return {
17981
17981
  insertPosition: "afterEnd",
17982
- wrap: ((N = S == null ? void 0 : S.cols) == null ? void 0 : N.length) > 1 ? void 0 : gridRowColWrap,
17982
+ wrap: ((O = S == null ? void 0 : S.cols) == null ? void 0 : O.length) > 1 ? void 0 : gridRowColWrap,
17983
17983
  Component: (B) => /* @__PURE__ */ jsx(
17984
17984
  PlusOutlined,
17985
17985
  P(x({}, B), {
@@ -17989,7 +17989,7 @@ const useGetAriaLabelOfDesigner = () => {
17989
17989
  })
17990
17990
  )
17991
17991
  };
17992
- }, [g, (O = S == null ? void 0 : S.cols) == null ? void 0 : O.length]);
17992
+ }, [g, (N = S == null ? void 0 : S.cols) == null ? void 0 : N.length]);
17993
17993
  return d ? /* @__PURE__ */ jsx(SchemaToolbarProvider, P(x({}, a), { children: /* @__PURE__ */ jsxs("div", { className: cls("general-schema-designer", overrideAntdCSS), children: [
17994
17994
  o && /* @__PURE__ */ jsx("div", { className: cls("general-schema-designer-title", titleCss), children: /* @__PURE__ */ jsxs(Space$1, { size: 2, children: [
17995
17995
  /* @__PURE__ */ jsx("span", { className: "title-tag", children: c && R ? `${h(R == null ? void 0 : R.displayName)} > ${h(o)}` : h(o) }),
@@ -18035,7 +18035,7 @@ const useGetAriaLabelOfDesigner = () => {
18035
18035
  toolbarClassName: m,
18036
18036
  toolbarStyle: h = {},
18037
18037
  container: g
18038
- } = x(x({}, e), (t == null ? void 0 : t["x-toolbar-props"]) || {}), f = useCompile(), { draggable: C } = useContext(SchemaComponentContext), { componentCls: b, hashId: S } = useStyles$f(), { t: y } = useTranslation(), { getAriaLabel: v } = useGetAriaLabelOfDesigner(), F = useDataSourceManager(), I = F == null ? void 0 : F.getDataSources(), R = useDataSource(), T = (I == null ? void 0 : I.length) > 1 && R, D = useRefreshFieldSchema(), O = useCallback(() => {
18038
+ } = x(x({}, e), (t == null ? void 0 : t["x-toolbar-props"]) || {}), f = useCompile(), { draggable: C } = useContext(SchemaComponentContext), { componentCls: b, hashId: S } = useStyles$f(), { t: y } = useTranslation(), { getAriaLabel: v } = useGetAriaLabelOfDesigner(), F = useDataSourceManager(), I = F == null ? void 0 : F.getDataSources(), R = useDataSource(), T = (I == null ? void 0 : I.length) > 1 && R, D = useRefreshFieldSchema(), N = useCallback(() => {
18039
18039
  D({ refreshParentSchema: !0 });
18040
18040
  }, [D]), j = useMemo(() => {
18041
18041
  if (n) {
@@ -18044,7 +18044,7 @@ const useGetAriaLabelOfDesigner = () => {
18044
18044
  if (Array.isArray(n))
18045
18045
  return f(n);
18046
18046
  }
18047
- }, [n]), { render: N, exists: B } = useSchemaSettingsRender(
18047
+ }, [n]), { render: O, exists: B } = useSchemaSettingsRender(
18048
18048
  r || (t == null ? void 0 : t["x-settings"]),
18049
18049
  t == null ? void 0 : t["x-settings-props"]
18050
18050
  ), { render: w, exists: M } = useSchemaInitializerRender(
@@ -18072,7 +18072,7 @@ const useGetAriaLabelOfDesigner = () => {
18072
18072
  return w(z);
18073
18073
  if (k != null && k.InitializerComponent || k != null && k.renderSchemaInitializer)
18074
18074
  return k != null && k.InitializerComponent ? /* @__PURE__ */ jsx(k.InitializerComponent, x({}, z)) : (K = k.renderSchemaInitializer) == null ? void 0 : K.call(k, z);
18075
- }, [k, o, z, M, w]), E = useMemo(() => r !== !1 && B ? N() : null, [B, N, r]), G = useRef(null), U = "hidden";
18075
+ }, [k, o, z, M, w]), E = useMemo(() => r !== !1 && B ? O() : null, [B, O, r]), G = useRef(null), U = "hidden";
18076
18076
  useEffect(() => {
18077
18077
  const K = G.current;
18078
18078
  let W = K == null ? void 0 : K.parentElement;
@@ -18113,7 +18113,7 @@ const useGetAriaLabelOfDesigner = () => {
18113
18113
  ] }) }),
18114
18114
  /* @__PURE__ */ jsx("div", { className: cls("toolbar-icons", a), style: l, children: /* @__PURE__ */ jsxs(Space$1, { size: 3, align: "center", className: d, style: p, children: [
18115
18115
  L,
18116
- /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: O, children: q }),
18116
+ /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: N, children: q }),
18117
18117
  E
18118
18118
  ] }) })
18119
18119
  ]
@@ -18277,16 +18277,16 @@ const SchemaToolbarErrorFallback = (e) => {
18277
18277
  return (k = ($ = p(M)) == null ? void 0 : $.getCollection(w)) == null ? void 0 : k.getInheritCollectionsChain();
18278
18278
  },
18279
18279
  [t, p]
18280
- ), O = useCallback(
18280
+ ), N = useCallback(
18281
18281
  (w) => t == null ? void 0 : t.collectionFieldInterfaceManager.getFieldInterface(w),
18282
18282
  [t]
18283
18283
  ), j = useCallback(
18284
18284
  (w) => {
18285
18285
  var M;
18286
- return (M = O(w.interface)) == null ? void 0 : M.titleUsable;
18286
+ return (M = N(w.interface)) == null ? void 0 : M.titleUsable;
18287
18287
  },
18288
- [O]
18289
- ), N = useCallback(
18288
+ [N]
18289
+ ), O = useCallback(
18290
18290
  (w, M, $) => {
18291
18291
  var k, z;
18292
18292
  return (z = (k = p($)) == null ? void 0 : k.getCollection(M)) == null ? void 0 : z.getParentCollectionFields(w);
@@ -18302,9 +18302,9 @@ const SchemaToolbarErrorFallback = (e) => {
18302
18302
  collections: m,
18303
18303
  templates: u,
18304
18304
  getTemplate: B,
18305
- getInterface: O,
18305
+ getInterface: N,
18306
18306
  getCollections: d,
18307
- getParentCollectionFields: N,
18307
+ getParentCollectionFields: O,
18308
18308
  getInheritCollections: y,
18309
18309
  getChildrenCollections: v,
18310
18310
  refreshCM: g,
@@ -18627,11 +18627,11 @@ const DatePickerContext = React.createContext({ utc: !0 }), useDatePickerContext
18627
18627
  const v = dayjs(y), F = v.isSame(g, "day"), I = v.isSame(f, "day");
18628
18628
  return {
18629
18629
  disabledHours: () => {
18630
- const O = [];
18631
- return F && O.push(...Array.from({ length: g.hour() }, (j, N) => N)), I && O.push(...Array.from({ length: 24 - f.hour() }, (j, N) => N + f.hour() + 1)), O;
18630
+ const N = [];
18631
+ return F && N.push(...Array.from({ length: g.hour() }, (j, O) => O)), I && N.push(...Array.from({ length: 24 - f.hour() }, (j, O) => O + f.hour() + 1)), N;
18632
18632
  },
18633
- disabledMinutes: (O) => F && O === g.hour() ? C.filter((j) => j < g.minute()) : I && O === f.hour() ? C.filter((j) => j > f.minute()) : [],
18634
- disabledSeconds: (O, j) => F && O === g.hour() && j === g.minute() ? C.filter((N) => N < g.second()) : I && O === f.hour() && j === f.minute() ? C.filter((N) => N > f.second()) : []
18633
+ disabledMinutes: (N) => F && N === g.hour() ? C.filter((j) => j < g.minute()) : I && N === f.hour() ? C.filter((j) => j > f.minute()) : [],
18634
+ disabledSeconds: (N, j) => F && N === g.hour() && j === g.minute() ? C.filter((O) => O < g.second()) : I && N === f.hour() && j === f.minute() ? C.filter((O) => O > f.second()) : []
18635
18635
  };
18636
18636
  };
18637
18637
  a(() => b), c(() => S);
@@ -19473,13 +19473,13 @@ const ParentCollectionProvider = (e) => {
19473
19473
  collectionField: e,
19474
19474
  noDisabled: r,
19475
19475
  targetFieldSchema: i
19476
- }), { currentParentRecordSettings: D, shouldDisplayCurrentParentRecord: O } = useCurrentParentRecordVariable({
19476
+ }), { currentParentRecordSettings: D, shouldDisplayCurrentParentRecord: N } = useCurrentParentRecordVariable({
19477
19477
  schema: n,
19478
19478
  collectionName: c,
19479
19479
  collectionField: e,
19480
19480
  noDisabled: r,
19481
19481
  targetFieldSchema: i
19482
- }), { urlSearchParamsSettings: j, shouldDisplay: N } = useURLSearchParamsVariable();
19482
+ }), { urlSearchParamsSettings: j, shouldDisplay: O } = useURLSearchParamsVariable();
19483
19483
  return useMemo(() => [
19484
19484
  u,
19485
19485
  d,
@@ -19489,10 +19489,10 @@ const ParentCollectionProvider = (e) => {
19489
19489
  C && f,
19490
19490
  S && b,
19491
19491
  v && y,
19492
- O && D,
19492
+ N && D,
19493
19493
  I && F,
19494
19494
  T && R,
19495
- N && j
19495
+ O && j
19496
19496
  ].filter(Boolean).filter(l), [
19497
19497
  u,
19498
19498
  d,
@@ -19506,11 +19506,11 @@ const ParentCollectionProvider = (e) => {
19506
19506
  b,
19507
19507
  v,
19508
19508
  y,
19509
- O,
19509
+ N,
19510
19510
  D,
19511
19511
  I,
19512
19512
  F,
19513
- N,
19513
+ O,
19514
19514
  j
19515
19515
  ]);
19516
19516
  }, RemoveConditionContext = createContext(null);
@@ -21608,7 +21608,7 @@ const SchemaSettingsSwitchItem = (e) => {
21608
21608
  useEffect(() => {
21609
21609
  D.setInitialValues(cloneDeep$1(r));
21610
21610
  }, [JSON.stringify(r || {})]);
21611
- const O = useCallback(() => {
21611
+ const N = useCallback(() => {
21612
21612
  h(!1), D.reset();
21613
21613
  }, [D]), j = useCallback(() => V(void 0, null, function* () {
21614
21614
  yield D.submit();
@@ -21618,7 +21618,7 @@ const SchemaSettingsSwitchItem = (e) => {
21618
21618
  } catch (M) {
21619
21619
  console.error(M);
21620
21620
  }
21621
- }), [D, n]), N = useCallback(() => V(void 0, null, function* () {
21621
+ }), [D, n]), O = useCallback(() => V(void 0, null, function* () {
21622
21622
  !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);
21623
21623
  }), [F, S, y, b, a, g]), B = useCallback((M) => M.stopPropagation(), []);
21624
21624
  return /* @__PURE__ */ jsxs(zIndexContext.Provider, { value: T, children: [
@@ -21627,7 +21627,7 @@ const SchemaSettingsSwitchItem = (e) => {
21627
21627
  P(x({
21628
21628
  title: v(t)
21629
21629
  }, p), {
21630
- onClick: N,
21630
+ onClick: O,
21631
21631
  onKeyDown: B,
21632
21632
  children: e.children || e.title
21633
21633
  })
@@ -21641,10 +21641,10 @@ const SchemaSettingsSwitchItem = (e) => {
21641
21641
  }, p), {
21642
21642
  destroyOnClose: !0,
21643
21643
  open: m,
21644
- onCancel: O,
21644
+ onCancel: N,
21645
21645
  zIndex: T,
21646
21646
  footer: /* @__PURE__ */ jsxs(Space$1, { children: [
21647
- /* @__PURE__ */ jsx(Button, { onClick: O, children: C("Cancel") }),
21647
+ /* @__PURE__ */ jsx(Button, { onClick: N, children: C("Cancel") }),
21648
21648
  /* @__PURE__ */ jsx(Button, { type: "primary", onClick: j, children: C("Submit") })
21649
21649
  ] }),
21650
21650
  children: /* @__PURE__ */ jsx(FormActiveFieldsProvider, { name: "form", getActiveFieldsName: I == null ? void 0 : I.getActiveFieldsName, children: /* @__PURE__ */ jsx(FormProvider, { form: D, children: /* @__PURE__ */ jsxs(FormLayout, { layout: "vertical", children: [
@@ -21685,7 +21685,7 @@ const SchemaSettingsModalItem = (e) => {
21685
21685
  "width",
21686
21686
  "noRecord",
21687
21687
  "ModalContextProvider"
21688
- ]), h = useContext(SchemaOptionsContext), g = useCollection(), f = useAPIClient(), C = useApp(), { theme: b } = useGlobalTheme(), S = useBlockRequestContext(), y = useFormActiveFields(), { locale: v } = useContext(ConfigProvider.ConfigContext), F = useDataSourceManager(), I = useDataSourceKey(), R = useCollectionRecord(), { association: T } = useDataBlockProps() || {}, D = useCurrentRecord(), O = useFormBlockContext(), j = useBlockContext(), { getOperators: N } = useOperators(), B = useLocationSearch(), w = useVariables$1(), { formValue: M, collection: $, parent: k } = useSubFormValue(), z = useCurrentPopupRecord(), L = useParentPopupRecord();
21688
+ ]), h = useContext(SchemaOptionsContext), g = useCollection(), f = useAPIClient(), C = useApp(), { theme: b } = useGlobalTheme(), S = useBlockRequestContext(), y = useFormActiveFields(), { locale: v } = useContext(ConfigProvider.ConfigContext), F = useDataSourceManager(), I = useDataSourceKey(), R = useCollectionRecord(), { association: T } = useDataBlockProps() || {}, D = useCurrentRecord(), N = useFormBlockContext(), j = useBlockContext(), { getOperators: O } = useOperators(), B = useLocationSearch(), w = useVariables$1(), { formValue: M, collection: $, parent: k } = useSubFormValue(), z = useCurrentPopupRecord(), L = useParentPopupRecord();
21689
21689
  return t ? null : /* @__PURE__ */ jsx(
21690
21690
  SchemaSettingsItem,
21691
21691
  P(x({
@@ -21695,7 +21695,7 @@ const SchemaSettingsModalItem = (e) => {
21695
21695
  const E = l ? yield l() : c, G = _.isFunction(e.schema) ? e.schema() : e.schema;
21696
21696
  FormDialog(
21697
21697
  { title: G.title || n, width: u },
21698
- () => /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(CollectOperators, { defaultOperators: N(), children: /* @__PURE__ */ jsx(VariablesContext.Provider, { value: w, children: /* @__PURE__ */ jsx(BlockContext.Provider, { value: j, children: /* @__PURE__ */ jsx(
21698
+ () => /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(CollectOperators, { defaultOperators: O(), children: /* @__PURE__ */ jsx(VariablesContext.Provider, { value: w, children: /* @__PURE__ */ jsx(BlockContext.Provider, { value: j, children: /* @__PURE__ */ jsx(
21699
21699
  VariablePopupRecordProvider,
21700
21700
  {
21701
21701
  recordData: z == null ? void 0 : z.value,
@@ -21704,7 +21704,7 @@ const SchemaSettingsModalItem = (e) => {
21704
21704
  recordData: L == null ? void 0 : L.value,
21705
21705
  collection: L == null ? void 0 : L.collection
21706
21706
  },
21707
- children: /* @__PURE__ */ jsx(CollectionRecordProvider, { record: d ? null : R, children: /* @__PURE__ */ jsx(CurrentRecordContextProvider, P(x({}, D), { children: /* @__PURE__ */ jsx(FormBlockContext$1.Provider, { value: O, children: /* @__PURE__ */ jsx(SubFormProvider, { value: { value: M, collection: $, parent: k }, children: /* @__PURE__ */ jsx(
21707
+ children: /* @__PURE__ */ jsx(CollectionRecordProvider, { record: d ? null : R, children: /* @__PURE__ */ jsx(CurrentRecordContextProvider, P(x({}, D), { children: /* @__PURE__ */ jsx(FormBlockContext$1.Provider, { value: N, children: /* @__PURE__ */ jsx(SubFormProvider, { value: { value: M, collection: $, parent: k }, children: /* @__PURE__ */ jsx(
21708
21708
  FormActiveFieldsProvider,
21709
21709
  {
21710
21710
  name: "form",
@@ -21884,11 +21884,11 @@ const SchemaSettingsModalItem = (e) => {
21884
21884
  }
21885
21885
  }),
21886
21886
  [n, a, l, b, m, h, u, p, I, r]
21887
- ), D = useMemo(() => ({ ArrayCollapse: ArrayCollapse$2, FormLayout }), []), O = useCallback(
21888
- (N) => {
21887
+ ), D = useMemo(() => ({ ArrayCollapse: ArrayCollapse$2, FormLayout }), []), N = useCallback(
21888
+ (O) => {
21889
21889
  var k;
21890
21890
  const B = [];
21891
- for (const z of N.fieldReaction.rules)
21891
+ for (const z of O.fieldReaction.rules)
21892
21892
  B.push(_.pickBy(z, _.identity));
21893
21893
  const w = b["x-component"] === "BlockTemplate" && ((k = b["x-component-props"]) == null ? void 0 : k.templateId), $ = {
21894
21894
  "x-uid": w && d(w).uid || b["x-uid"]
@@ -21899,7 +21899,7 @@ const SchemaSettingsModalItem = (e) => {
21899
21899
  },
21900
21900
  [c, d, b, F, i]
21901
21901
  );
21902
- return /* @__PURE__ */ jsx(SchemaSettingsModalItem, { title: R, components: D, width: 770, schema: T, onSubmit: O });
21902
+ return /* @__PURE__ */ jsx(SchemaSettingsModalItem, { title: R, components: D, width: 770, schema: T, onSubmit: N });
21903
21903
  }, useDataTemplates = (e) => {
21904
21904
  const t = useFieldSchema();
21905
21905
  if (e)
@@ -22557,17 +22557,17 @@ const designerCss$4 = ({ margin: e = "-18px -16px", padding: t = "18px 16px" } =
22557
22557
  }
22558
22558
  },
22559
22559
  onSubmit: (D) => {
22560
- const O = {
22560
+ const N = {
22561
22561
  "x-uid": n["x-uid"]
22562
22562
  };
22563
- (o.componentProps.picker || "date") !== D.picker && !m && o.value && (o.value = void 0, o.initialValue = void 0, n.default = void 0, O.default = void 0), O["x-component-props"] = o.componentProps || {}, n["x-component-props"] = x(x({}, o.componentProps || {}), D), O["x-component-props"] = n["x-component-props"], o.componentProps = n["x-component-props"];
22563
+ (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"];
22564
22564
  const j = o.path.entire.split(".");
22565
22565
  j.pop();
22566
- const N = j.join(".");
22567
- o.query(`${N}.*[0:].${n.name}`).forEach((B) => {
22566
+ const O = j.join(".");
22567
+ o.query(`${O}.*[0:].${n.name}`).forEach((B) => {
22568
22568
  B.props.name === n.name && ((o.componentProps.picker || "date") !== D.picker && !m && (B.value = void 0, B.initialValue = void 0), B.setComponentProps(x({}, D)));
22569
22569
  }), r.emit("patch", {
22570
- schema: O
22570
+ schema: N
22571
22571
  }), r.refresh();
22572
22572
  }
22573
22573
  }
@@ -22596,7 +22596,7 @@ const getActionContext = (e) => {
22596
22596
  R != null && R.target && (u = p(
22597
22597
  `${R.target}.${((L = (z = o["x-component-props"]) == null ? void 0 : z.fieldNames) == null ? void 0 : L.label) || "id"}`
22598
22598
  ));
22599
- const D = (R == null ? void 0 : R.interface) === "m2o" && findParentFieldSchema(o), O = D && p(D == null ? void 0 : D["x-collection-field"]), j = useTableBlockContext(), N = (R == null ? void 0 : R.interface) === "m2m" || (R == null ? void 0 : R.interface) === "mbm" || (O == null ? void 0 : O.type) === "hasMany" && (R == null ? void 0 : R.interface) === "m2o", B = useCallback(
22599
+ const D = (R == null ? void 0 : R.interface) === "m2o" && findParentFieldSchema(o), N = D && p(D == null ? void 0 : D["x-collection-field"]), j = useTableBlockContext(), O = (R == null ? void 0 : R.interface) === "m2m" || (R == null ? void 0 : R.interface) === "mbm" || (N == null ? void 0 : N.type) === "hasMany" && (R == null ? void 0 : R.interface) === "m2o", B = useCallback(
22600
22600
  (q) => {
22601
22601
  const E = q.find((U) => U.value === "$nForm"), G = m(I);
22602
22602
  return !(G != null && G.length) && E && (E.children = formatVariableScop(y())), q;
@@ -22621,7 +22621,7 @@ const getActionContext = (e) => {
22621
22621
  "x-component": "VariableInput",
22622
22622
  "x-component-props": P(x({}, (o == null ? void 0 : o["x-component-props"]) || {}), {
22623
22623
  collectionField: R,
22624
- contextCollectionName: N ? c : "",
22624
+ contextCollectionName: O ? c : "",
22625
22625
  schema: R == null ? void 0 : R.uiSchema,
22626
22626
  targetFieldSchema: o,
22627
22627
  className: defaultInputStyle,
@@ -22669,7 +22669,7 @@ const getActionContext = (e) => {
22669
22669
  T,
22670
22670
  S,
22671
22671
  h,
22672
- N,
22672
+ O,
22673
22673
  f,
22674
22674
  b,
22675
22675
  B,
@@ -23102,7 +23102,15 @@ const DynamicComponent = (e) => {
23102
23102
  value: p,
23103
23103
  setValue: m,
23104
23104
  collectionField: h
23105
- } = useValues$1(), g = sortTree(i, "children", "children", !1), f = useMemo(() => ({ marginBottom: 8 }), []), C = useMemo(
23105
+ } = useValues$1(), g = sortTree(
23106
+ i,
23107
+ (v) => {
23108
+ var F;
23109
+ return (F = v.children) != null && F.length ? 0 : 1;
23110
+ },
23111
+ "children",
23112
+ !1
23113
+ ), f = useMemo(() => ({ marginBottom: 8 }), []), C = useMemo(
23106
23114
  () => ({
23107
23115
  label: "title",
23108
23116
  value: "name",
@@ -23382,7 +23390,7 @@ const useGetFilterOptions = () => {
23382
23390
  if (t > 2)
23383
23391
  return u;
23384
23392
  if (l != null && l.length && (u.children = l), a) {
23385
- const m = r == null ? void 0 : r.getCollectionFields(e.target), h = getOptions$1(m, t + 1, n, o, r).filter(
23393
+ const m = o.getDataSource(e.dataSourceKey).collectionManager.getCollectionFields(e.target), h = getOptions$1(m, t + 1, n, o).filter(
23386
23394
  Boolean
23387
23395
  );
23388
23396
  u.children = u.children || [], u.children.push(...h);
@@ -23392,13 +23400,15 @@ const useGetFilterOptions = () => {
23392
23400
  }, getOptions$1 = (e, t, n, o, r) => {
23393
23401
  const i = [];
23394
23402
  return e.forEach((a) => {
23395
- const l = field2option(a, t, n, o, r);
23403
+ const l = field2option(a, t, n, o);
23396
23404
  l && i.push(l);
23397
23405
  }), i;
23398
23406
  }, useFilterFieldOptions = (e) => {
23399
- var i;
23400
- const t = useFieldSchema(), n = ((i = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : i.nonfilterable) || [], o = useCollectionManager(), r = useDataSourceManager();
23401
- return getOptions$1(e, 1, n, r, o);
23407
+ var r;
23408
+ const t = useFieldSchema(), n = ((r = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : r.nonfilterable) || [];
23409
+ useCollectionManager();
23410
+ const o = useDataSourceManager();
23411
+ return getOptions$1(e, 1, n, o);
23402
23412
  }, isEmpty = (e) => Array.isArray(e) && e.length === 0 || e && Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype, removeNullCondition = (e, t = flat) => {
23403
23413
  const n = t(e || {}), o = {};
23404
23414
  for (const r in n) {
@@ -23472,13 +23482,13 @@ const useGetFilterOptions = () => {
23472
23482
  };
23473
23483
  });
23474
23484
  }, TableColumnDesigner$1 = (e) => {
23475
- var j, N, B, w, M, $, k, z, L, q, E, G;
23476
- 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 = ((j = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : j.fieldNames) || ((N = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : N.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(
23485
+ var j, O, B, w, M, $, k, z, L, q, E, G;
23486
+ 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 = ((j = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : j.fieldNames) || ((O = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : O.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(
23477
23487
  o == null ? void 0 : o.interface
23478
23488
  ), I = useFieldModeOptions({ fieldSchema: n }), R = ((M = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : M.mode) || "Select";
23479
23489
  let T = "editable";
23480
23490
  n["x-disabled"] === !0 && (T = "readonly"), n["x-read-pretty"] === !0 && (T = "read-pretty");
23481
- const D = F && R === "Select", O = () => {
23491
+ const D = F && R === "Select", N = () => {
23482
23492
  const { name: U } = useCollection(), { linkageRulesProps: H } = useSchemaToolbar();
23483
23493
  return /* @__PURE__ */ jsx(SchemaSettingsLinkageRules, x({ category: "style" }, P(x({}, H), { collectionName: U })));
23484
23494
  };
@@ -23560,7 +23570,7 @@ const useGetFilterOptions = () => {
23560
23570
  }
23561
23571
  }
23562
23572
  ),
23563
- /* @__PURE__ */ jsx(O, {}),
23573
+ /* @__PURE__ */ jsx(N, {}),
23564
23574
  g && g.sortable === !0 && !S && /* @__PURE__ */ jsx(
23565
23575
  SchemaSettingsSwitchItem,
23566
23576
  {
@@ -24652,10 +24662,7 @@ function HTMLEncode(e) {
24652
24662
  }
24653
24663
  const ReadPretty$c = () => null;
24654
24664
  ReadPretty$c.Input = (e) => {
24655
- const t = usePrefixCls$1("description-input", e), n = useCompile(), o = useMemo(
24656
- () => e.value && typeof e.value == "object" ? JSON.stringify(e.value) : n(e.value),
24657
- [e.value]
24658
- );
24665
+ const t = usePrefixCls$1("description-input", e), n = useCompile(), o = useMemo(() => Array.isArray(e.value) ? e.value.join(",") : e.value && typeof e.value == "object" ? JSON.stringify(e.value) : n(e.value), [e.value]);
24659
24666
  return /* @__PURE__ */ jsxs(
24660
24667
  "div",
24661
24668
  {
@@ -25541,9 +25548,9 @@ function Input$1(e) {
25541
25548
  hideVariableButton: m
25542
25549
  } = e, h = typeof e.scope == "function" ? e.scope() : e.scope, { wrapSSR: g, hashId: f, componentCls: C, rootPrefixCls: b } = useStyles$a({ hideVariableButton: m });
25543
25550
  useAntdInputStyle(`${b}-input`);
25544
- const S = useCompile(), { t: y } = useTranslation(), v = useForm(), [F, I] = React.useState([]), [R, T] = React.useState([]), [D, O] = React.useState(
25551
+ const S = useCompile(), { t: y } = useTranslation(), v = useForm(), [F, I] = React.useState([]), [R, T] = React.useState([]), [D, N] = React.useState(
25545
25552
  m || !!(o && t != null)
25546
- ), j = useMemo(() => parseValue(t, p), [p, t]), N = typeof j == "string", B = N ? j : "", w = N ? null : j, M = Object.assign(
25553
+ ), j = useMemo(() => parseValue(t, p), [p, t]), O = typeof j == "string", B = O ? j : "", w = O ? null : j, M = Object.assign(
25547
25554
  {
25548
25555
  label: "label",
25549
25556
  value: "value",
@@ -25590,10 +25597,10 @@ function Input$1(e) {
25590
25597
  (W, X) => {
25591
25598
  var ee, Z, ne;
25592
25599
  if (W[0] === "$") {
25593
- O(!0), w && n(null, X);
25600
+ N(!0), w && n(null, X);
25594
25601
  return;
25595
25602
  } else
25596
- O(!1);
25603
+ N(!1);
25597
25604
  if (W[0] === "") {
25598
25605
  n(null);
25599
25606
  return;
@@ -25607,7 +25614,7 @@ function Input$1(e) {
25607
25614
  [B, w, n]
25608
25615
  ), G = useCallback(() => {
25609
25616
  var W;
25610
- if (O(!!o), (W = $ == null ? void 0 : $.children) != null && W.length) {
25617
+ if (N(!!o), (W = $ == null ? void 0 : $.children) != null && W.length) {
25611
25618
  const X = $.children[0].default();
25612
25619
  return n(X);
25613
25620
  }
@@ -25901,7 +25908,7 @@ function TextArea(e) {
25901
25908
  [l, g]
25902
25909
  ), [S, y] = useState(!1), [v, F] = useState(!1), [I, R] = useState(() => renderHTML(p != null ? p : "", b, c)), [T, D] = useState([-1, 0, -1, 0]);
25903
25910
  useAntdInputStyle("ant-input");
25904
- const { token: O } = theme.useToken(), j = c.join(" "), N = useCallback(
25911
+ const { token: N } = theme.useToken(), j = c.join(" "), O = useCallback(
25905
25912
  (E) => {
25906
25913
  var U;
25907
25914
  const G = getValue(E, c);
@@ -25949,14 +25956,14 @@ function TextArea(e) {
25949
25956
  const H = createVariableTagHTML(G.join("."), b);
25950
25957
  pasteHTML(U, H, {
25951
25958
  range: T
25952
- }), F(!0), D(getCurrentRange(U)), N(U);
25959
+ }), F(!0), D(getCurrentRange(U)), O(U);
25953
25960
  },
25954
- [b, N, T]
25961
+ [b, O, T]
25955
25962
  ), w = useCallback(
25956
25963
  function({ currentTarget: E }) {
25957
- S || (F(!0), D(getCurrentRange(E)), N(E));
25964
+ S || (F(!0), D(getCurrentRange(E)), O(E));
25958
25965
  },
25959
- [S, N]
25966
+ [S, O]
25960
25967
  ), M = useCallback(function({ currentTarget: E }) {
25961
25968
  D(getCurrentRange(E));
25962
25969
  }, []), $ = useCallback(function(E) {
@@ -25965,9 +25972,9 @@ function TextArea(e) {
25965
25972
  y(!0);
25966
25973
  }, []), z = useCallback(
25967
25974
  ({ currentTarget: E }) => {
25968
- y(!1), F(!0), D(getCurrentRange(E)), N(E);
25975
+ y(!1), F(!0), D(getCurrentRange(E)), O(E);
25969
25976
  },
25970
- [N]
25977
+ [O]
25971
25978
  ), L = useCallback(
25972
25979
  function(E) {
25973
25980
  E.preventDefault();
@@ -25988,9 +25995,9 @@ function TextArea(e) {
25988
25995
  }
25989
25996
  }
25990
25997
  }).replace(/\n/g, " ");
25991
- F(!0), pasteHTML(E.currentTarget, U), D(getCurrentRange(E.currentTarget)), N(E.currentTarget);
25998
+ F(!0), pasteHTML(E.currentTarget, U), D(getCurrentRange(E.currentTarget)), O(E.currentTarget);
25992
25999
  },
25993
- [N]
26000
+ [O]
25994
26001
  ), q = e.disabled || C.disabled;
25995
26002
  return t(
25996
26003
  /* @__PURE__ */ jsxs(
@@ -26053,7 +26060,7 @@ function TextArea(e) {
26053
26060
  { "ant-input-disabled": q },
26054
26061
  // NOTE: `pre-wrap` here for avoid the `&nbsp;` (\x160) issue when paste content, we need normal space (\x32).
26055
26062
  css`
26056
- min-height: ${O.controlHeight}px;
26063
+ min-height: ${N.controlHeight}px;
26057
26064
  overflow: auto;
26058
26065
  white-space: pre-wrap;
26059
26066
 
@@ -27502,12 +27509,12 @@ function useCollectValuesToSubmit() {
27502
27509
  resource: o,
27503
27510
  actionFields: (d == null ? void 0 : d("form")) || []
27504
27511
  }), S = {}, y = Object.keys(f).map((D) => V(this, null, function* () {
27505
- const O = f[D], j = i(D);
27506
- if (isVariable$1(O)) {
27507
- const { value: N } = (yield p == null ? void 0 : p.parseVariable(O, m)) || {};
27508
- N != null && (S[D] = transformVariableValue(N, { targetCollectionField: j }));
27512
+ const N = f[D], j = i(D);
27513
+ if (isVariable$1(N)) {
27514
+ const { value: O } = (yield p == null ? void 0 : p.parseVariable(N, m)) || {};
27515
+ O != null && (S[D] = transformVariableValue(O, { targetCollectionField: j }));
27509
27516
  } else
27510
- O !== "" && (S[D] = O);
27517
+ N !== "" && (S[D] = N);
27511
27518
  }));
27512
27519
  if (yield Promise.all(y), (I = u == null ? void 0 : u["x-component-props"]) == null ? void 0 : I.addChild) {
27513
27520
  const D = a();
@@ -27538,29 +27545,29 @@ const useCreateActionProps = () => {
27538
27545
  onClick() {
27539
27546
  return V(this, null, function* () {
27540
27547
  var B;
27541
- const { onSuccess: v, skipValidator: F, triggerWorkflows: I } = (B = u == null ? void 0 : u["x-action-settings"]) != null ? B : {}, { manualClose: R, redirecting: T, redirectTo: D, successMessage: O, actionAfterSuccess: j } = v || {};
27548
+ const { onSuccess: v, skipValidator: F, triggerWorkflows: I } = (B = u == null ? void 0 : u["x-action-settings"]) != null ? B : {}, { manualClose: R, redirecting: T, redirectTo: D, successMessage: N, actionAfterSuccess: j } = v || {};
27542
27549
  F || (yield n.submit());
27543
- const N = yield f();
27550
+ const O = yield f();
27544
27551
  d.data = o.data || {}, d.data.loading = !0;
27545
27552
  try {
27546
27553
  const w = yield r[C]({
27547
- values: N,
27554
+ values: O,
27548
27555
  filterKeys: b,
27549
27556
  filterByTk: e,
27550
27557
  // TODO(refactor): should change to inject by plugin
27551
27558
  triggerWorkflows: I != null && I.length ? I.map((M) => [M.workflowKey, M.context].filter(Boolean).join("!")).join(",") : void 0,
27552
27559
  updateAssociationValues: g
27553
27560
  });
27554
- if ((j === "previous" || !j && T !== !0) && (i == null || i(!1)), a == null || a(!0), l == null || l(!1), d.data.loading = !1, d.data.data = w, !O) {
27561
+ if ((j === "previous" || !j && T !== !0) && (i == null || i(!1)), a == null || a(!0), l == null || l(!1), d.data.loading = !1, d.data.data = w, !N) {
27555
27562
  message.success(h("Saved successfully")), yield resetFormCorrectly(n), (T && !j || j === "redirect") && D && (isURL(D) ? window.location.href = D : c(D));
27556
27563
  return;
27557
27564
  }
27558
27565
  R ? m.success({
27559
- title: p(O),
27566
+ title: p(N),
27560
27567
  onOk: () => V(this, null, function* () {
27561
27568
  yield resetFormCorrectly(n), (T && !j || j === "redirect") && D && (isURL(D) ? window.location.href = D : c(D));
27562
27569
  })
27563
- }) : (message.success(p(O)), yield resetFormCorrectly(n), (T && !j || j === "redirect") && D && (isURL(D) ? window.location.href = D : c(D)));
27570
+ }) : (message.success(p(N)), yield resetFormCorrectly(n), (T && !j || j === "redirect") && D && (isURL(D) ? window.location.href = D : c(D)));
27564
27571
  } catch (w) {
27565
27572
  d.data.loading = !1;
27566
27573
  }
@@ -27577,9 +27584,9 @@ const useCreateActionProps = () => {
27577
27584
  const R = u.map((H) => H.name), {
27578
27585
  assignedValues: T = {},
27579
27586
  onSuccess: D,
27580
- overwriteValues: O,
27587
+ overwriteValues: N,
27581
27588
  skipValidator: j,
27582
- triggerWorkflows: N
27589
+ triggerWorkflows: O
27583
27590
  } = (z = l == null ? void 0 : l["x-action-settings"]) != null ? z : {}, B = (L = i == null ? void 0 : i["x-component-props"]) == null ? void 0 : L.addChild, { successMessage: w } = D || {}, M = {}, $ = Object.keys(T).map((H) => V(this, null, function* () {
27584
27591
  const J = T[H], K = d(H);
27585
27592
  if (isVariable$1(J)) {
@@ -27605,10 +27612,10 @@ const useCreateActionProps = () => {
27605
27612
  c.data = t.data || {}, c.data.loading = !0;
27606
27613
  try {
27607
27614
  const H = yield n[y]({
27608
- values: x(x(x({}, k), O), M),
27615
+ values: x(x(x({}, k), N), M),
27609
27616
  filterKeys: v,
27610
27617
  // TODO(refactor): should change to inject by plugin
27611
- triggerWorkflows: N != null && N.length ? N.map((J) => [J.workflowKey, J.context].filter(Boolean).join("!")).join(",") : void 0
27618
+ triggerWorkflows: O != null && O.length ? O.map((J) => [J.workflowKey, J.context].filter(Boolean).join("!")).join(",") : void 0
27612
27619
  });
27613
27620
  if (c.data.loading = !1, c.data.data = H, (U = (G = o == null ? void 0 : o.service) == null ? void 0 : G.refresh) == null || U.call(G), r == null || r(!1), a == null || a(!0), !w)
27614
27621
  return;
@@ -27671,8 +27678,8 @@ const useCreateActionProps = () => {
27671
27678
  return useEffect(() => {
27672
27679
  setTimeout(() => {
27673
27680
  u({ doNothingWhenFilterIsEmpty: !0 });
27674
- }, 100);
27675
- }, [t().length]), {
27681
+ }, 500);
27682
+ }, [u]), {
27676
27683
  /**
27677
27684
  * 用于执行筛选表单的筛选操作
27678
27685
  */
@@ -27719,23 +27726,23 @@ const useCreateActionProps = () => {
27719
27726
  return {
27720
27727
  onClick(f, C) {
27721
27728
  return V(this, null, function* () {
27722
- var N, B, w;
27729
+ var O, B, w;
27723
27730
  const {
27724
27731
  assignedValues: b = {},
27725
27732
  onSuccess: S,
27726
27733
  skipValidator: y,
27727
27734
  triggerWorkflows: v
27728
- } = (N = r == null ? void 0 : r["x-action-settings"]) != null ? N : {}, { manualClose: F, redirecting: I, redirectTo: R, successMessage: T, actionAfterSuccess: D } = S || {}, O = {}, j = Object.keys(b).map((M) => V(this, null, function* () {
27735
+ } = (O = r == null ? void 0 : r["x-action-settings"]) != null ? O : {}, { manualClose: F, redirecting: I, redirectTo: R, successMessage: T, actionAfterSuccess: D } = S || {}, N = {}, j = Object.keys(b).map((M) => V(this, null, function* () {
27729
27736
  const $ = b[M], k = m(M);
27730
27737
  if (isVariable$1($)) {
27731
27738
  const { value: z } = (yield u == null ? void 0 : u.parseVariable($, d)) || {};
27732
- z && (O[M] = transformVariableValue(z, { targetCollectionField: k }));
27739
+ z && (N[M] = transformVariableValue(z, { targetCollectionField: k }));
27733
27740
  } else
27734
- $ !== "" && (O[M] = $);
27741
+ $ !== "" && (N[M] = $);
27735
27742
  }));
27736
27743
  yield Promise.all(j), y === !1 && (yield l.submit()), yield e.update({
27737
27744
  filterByTk: o,
27738
- values: x({}, O),
27745
+ values: x({}, N),
27739
27746
  // TODO(refactor): should change to inject by plugin
27740
27747
  triggerWorkflows: v != null && v.length ? v.map((M) => [M.workflowKey, M.context].filter(Boolean).join("!")).join(",") : void 0
27741
27748
  }), (D === "previous" || !D && I !== !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({
@@ -27759,8 +27766,8 @@ const useCreateActionProps = () => {
27759
27766
  const {
27760
27767
  assignedValues: T = {},
27761
27768
  onSuccess: D,
27762
- updateMode: O
27763
- } = (z = i == null ? void 0 : i["x-action-settings"]) != null ? z : {}, { manualClose: j, redirecting: N, redirectTo: B, successMessage: w, actionAfterSuccess: M } = D || {};
27769
+ updateMode: N
27770
+ } = (z = i == null ? void 0 : i["x-action-settings"]) != null ? z : {}, { manualClose: j, redirecting: O, redirectTo: B, successMessage: w, actionAfterSuccess: M } = D || {};
27764
27771
  m.data = e.data || {}, m.data.loading = !0;
27765
27772
  const $ = {}, k = Object.keys(T).map((q) => V(this, null, function* () {
27766
27773
  const E = T[q], G = C(q);
@@ -27770,9 +27777,9 @@ const useCreateActionProps = () => {
27770
27777
  } else
27771
27778
  E !== "" && ($[q] = E);
27772
27779
  }));
27773
- yield Promise.all(k), (M === "previous" || !M && N !== !0) && (S == null || S(!1)), h.confirm({
27780
+ yield Promise.all(k), (M === "previous" || !M && O !== !0) && (S == null || S(!1)), h.confirm({
27774
27781
  title: p("Bulk update"),
27775
- content: p(O === "selected" ? "Update selected data?" : "Update all data?"),
27782
+ content: p(N === "selected" ? "Update selected data?" : "Update all data?"),
27776
27783
  onOk() {
27777
27784
  return V(this, null, function* () {
27778
27785
  var G, U, H, J;
@@ -27781,7 +27788,7 @@ const useCreateActionProps = () => {
27781
27788
  filter: q,
27782
27789
  forceUpdate: !1
27783
27790
  };
27784
- if (O === "selected") {
27791
+ if (N === "selected") {
27785
27792
  if (!(c != null && c.length)) {
27786
27793
  message.error(p("Please select the records to be updated")), m.data.loading = !1;
27787
27794
  return;
@@ -27798,9 +27805,9 @@ const useCreateActionProps = () => {
27798
27805
  t instanceof TableFieldResource || (J = (H = n == null ? void 0 : n.service) == null ? void 0 : H.refresh) == null || J.call(H), w && (j ? h.success({
27799
27806
  title: d(w),
27800
27807
  onOk: () => V(this, null, function* () {
27801
- (N && !M || M === "redirect") && B && (isURL(B) ? window.location.href = B : u(B));
27808
+ (O && !M || M === "redirect") && B && (isURL(B) ? window.location.href = B : u(B));
27802
27809
  })
27803
- }) : (message.success(d(w)), (N && !M || M === "redirect") && B && (isURL(B) ? window.location.href = B : u(B))));
27810
+ }) : (message.success(d(w)), (O && !M || M === "redirect") && B && (isURL(B) ? window.location.href = B : u(B))));
27804
27811
  });
27805
27812
  },
27806
27813
  onCancel() {
@@ -27819,7 +27826,7 @@ const useCreateActionProps = () => {
27819
27826
  onClick() {
27820
27827
  return V(this, null, function* () {
27821
27828
  var q, E, G, U;
27822
- const { skipValidator: I, onSuccess: R, requestSettings: T } = (q = o == null ? void 0 : o["x-action-settings"]) != null ? q : {}, { manualClose: D, redirecting: O, redirectTo: j, successMessage: N, actionAfterSuccess: B } = R || {}, w = o == null ? void 0 : o["x-action"];
27829
+ const { skipValidator: I, onSuccess: R, requestSettings: T } = (q = o == null ? void 0 : o["x-action-settings"]) != null ? q : {}, { manualClose: D, redirecting: N, redirectTo: j, successMessage: O, actionAfterSuccess: B } = R || {}, w = o == null ? void 0 : o["x-action"];
27823
27830
  if (!T.url)
27824
27831
  return;
27825
27832
  I !== !0 && w === "customize:form:request" && (yield i.submit());
@@ -27845,12 +27852,12 @@ const useCreateActionProps = () => {
27845
27852
  };
27846
27853
  f.data = c.data || {}, f.data.loading = !0;
27847
27854
  try {
27848
- yield e.request(x({}, L)), f.data.loading = !1, u instanceof TableFieldResource || (G = (E = d == null ? void 0 : d.service) == null ? void 0 : E.refresh) == null || G.call(E), (U = p == null ? void 0 : p.refresh) == null || U.call(p), w === "customize:form:request" && (B === "previous" || !B && O !== !0) && (b == null || b(!1)), N || (message.success(C("Saved successfully")), yield resetFormCorrectly(i), (O && !B || B === "redirect") && j && (isURL(j) ? window.location.href = j : t(j))), D ? S.success({
27849
- title: r(N),
27855
+ yield e.request(x({}, L)), f.data.loading = !1, u instanceof TableFieldResource || (G = (E = d == null ? void 0 : d.service) == null ? void 0 : E.refresh) == null || G.call(E), (U = p == null ? void 0 : p.refresh) == null || U.call(p), w === "customize:form:request" && (B === "previous" || !B && N !== !0) && (b == null || b(!1)), O || (message.success(C("Saved successfully")), yield resetFormCorrectly(i), (N && !B || B === "redirect") && j && (isURL(j) ? window.location.href = j : t(j))), D ? S.success({
27856
+ title: r(O),
27850
27857
  onOk: () => V(this, null, function* () {
27851
- (O && !B || B === "redirect") && j && (isURL(j) ? window.location.href = j : t(j));
27858
+ (N && !B || B === "redirect") && j && (isURL(j) ? window.location.href = j : t(j));
27852
27859
  })
27853
- }) : message.success(r(N));
27860
+ }) : message.success(r(O));
27854
27861
  } finally {
27855
27862
  f.data.loading = !1;
27856
27863
  }
@@ -27867,9 +27874,9 @@ const useCreateActionProps = () => {
27867
27874
  assignedValues: R = {},
27868
27875
  onSuccess: T,
27869
27876
  overwriteValues: D,
27870
- skipValidator: O,
27877
+ skipValidator: N,
27871
27878
  triggerWorkflows: j
27872
- } = (E = l == null ? void 0 : l["x-action-settings"]) != null ? E : {}, { manualClose: N, redirecting: B, redirectTo: w, successMessage: M, actionAfterSuccess: $ } = T || {}, k = {}, z = Object.keys(R).map((G) => V(this, null, function* () {
27879
+ } = (E = l == null ? void 0 : l["x-action-settings"]) != null ? E : {}, { manualClose: O, redirecting: B, redirectTo: w, successMessage: M, actionAfterSuccess: $ } = T || {}, k = {}, z = Object.keys(R).map((G) => V(this, null, function* () {
27873
27880
  const U = R[G], H = d(G);
27874
27881
  if (isVariable$1(U)) {
27875
27882
  const { value: J } = (yield b == null ? void 0 : b.parseVariable(U, S)) || {};
@@ -27877,7 +27884,7 @@ const useCreateActionProps = () => {
27877
27884
  } else
27878
27885
  U !== "" && (k[G] = U);
27879
27886
  }));
27880
- yield Promise.all(z), O || (yield e.submit());
27887
+ yield Promise.all(z), N || (yield e.submit());
27881
27888
  const L = u.map((G) => G.name), q = getFormValues({
27882
27889
  filterByTk: t,
27883
27890
  field: n,
@@ -27898,7 +27905,7 @@ const useCreateActionProps = () => {
27898
27905
  triggerWorkflows: j != null && j.length ? j.map((G) => [G.workflowKey, G.context].filter(Boolean).join("!")).join(",") : void 0
27899
27906
  })), h.data.loading = !1, I && (I == null || I()), ($ === "previous" || !$ && B !== !0) && (i == null || i(!1)), a == null || a(!1), !M)
27900
27907
  return;
27901
- N ? f.success({
27908
+ O ? f.success({
27902
27909
  title: m(M),
27903
27910
  onOk: () => V(this, null, function* () {
27904
27911
  yield e.reset(), (B && !$ || $ === "redirect") && w && (isURL(w) ? window.location.href = w : c(w));
@@ -28062,7 +28069,7 @@ const useCreateActionProps = () => {
28062
28069
  /** 渲染 Collapse 的列表数据 */
28063
28070
  list: (d == null ? void 0 : d.data) || [],
28064
28071
  onSelected: (F) => {
28065
- var R, T, D, O;
28072
+ var R, T, D, N;
28066
28073
  const I = ((T = (R = t.params) == null ? void 0 : R[1]) == null ? void 0 : T.filters) || {};
28067
28074
  F.length ? I[`af.${c}`] = {
28068
28075
  [`${c}.${i}.$in`]: F
@@ -28070,7 +28077,7 @@ const useCreateActionProps = () => {
28070
28077
  P(x({}, (D = t.params) == null ? void 0 : D[0]), {
28071
28078
  pageSize: 200,
28072
28079
  page: 1,
28073
- filter: mergeFilter([...Object.values(I), (O = n == null ? void 0 : n.params) == null ? void 0 : O.filter])
28080
+ filter: mergeFilter([...Object.values(I), (N = n == null ? void 0 : n.params) == null ? void 0 : N.filter])
28074
28081
  }),
28075
28082
  { filters: I }
28076
28083
  );
@@ -28092,7 +28099,7 @@ const useCreateActionProps = () => {
28092
28099
  var n;
28093
28100
  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);
28094
28101
  }, useAssociationFilterBlockProps = () => {
28095
- var v, F, I, R, T, D, O, j, N, B;
28102
+ var v, F, I, R, T, D, N, j, O, B;
28096
28103
  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 });
28097
28104
  let p, m, h, g, f, C, b, S;
28098
28105
  C = e != null && e.target ? (I = c == null ? void 0 : c.getCollection(e.target)) == null ? void 0 : I.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(
@@ -28120,8 +28127,8 @@ const useCreateActionProps = () => {
28120
28127
  b,
28121
28128
  g,
28122
28129
  C,
28123
- (O = i.componentProps) == null ? void 0 : O.params,
28124
- (N = (j = i.componentProps) == null ? void 0 : j.params) == null ? void 0 : N.sort,
28130
+ (N = i.componentProps) == null ? void 0 : N.params,
28131
+ (O = (j = i.componentProps) == null ? void 0 : j.params) == null ? void 0 : O.sort,
28125
28132
  d
28126
28133
  ]);
28127
28134
  const y = useCallback(
@@ -28455,42 +28462,42 @@ const useSyncFromForm = (e, t, n) => {
28455
28462
  return T;
28456
28463
  if (S > y)
28457
28464
  return [];
28458
- const D = r(C).map((O) => {
28465
+ const D = r(C).map((N) => {
28459
28466
  var w;
28460
- if (b.includes(O.name) || !O.interface || ["sort", "password", "sequence"].includes(O.type))
28467
+ if (b.includes(N.name) || !N.interface || ["sort", "password", "sequence"].includes(N.type))
28461
28468
  return;
28462
28469
  const j = {
28463
28470
  type: "duplicate",
28464
- tag: c((w = O.uiSchema) == null ? void 0 : w.title) || O.name
28465
- }, N = P(x({}, j), {
28471
+ tag: c((w = N.uiSchema) == null ? void 0 : w.title) || N.name
28472
+ }, O = P(x({}, j), {
28466
28473
  title: React.createElement(TreeNode, j),
28467
- key: v ? `${v}.${O.name}` : O.name,
28474
+ key: v ? `${v}.${N.name}` : N.name,
28468
28475
  isLeaf: !0,
28469
- field: O,
28476
+ field: N,
28470
28477
  disabled: F
28471
- }), B = I.find((M) => M.name === N.key);
28472
- if (["belongsTo", "belongsToMany"].includes(O.type) && (!B || ["Select", "Picker"].includes(B == null ? void 0 : B.fieldMode)))
28473
- j.type = "reference", N.type = "reference", N.title = React.createElement(TreeNode, P(x({}, j), { type: "reference" })), N.isLeaf = !1, N.children = m(O.target, {
28478
+ }), B = I.find((M) => M.name === O.key);
28479
+ if (["belongsTo", "belongsToMany"].includes(N.type) && (!B || ["Select", "Picker"].includes(B == null ? void 0 : B.fieldMode)))
28480
+ j.type = "reference", O.type = "reference", O.title = React.createElement(TreeNode, P(x({}, j), { type: "reference" })), O.isLeaf = !1, O.children = m(N.target, {
28474
28481
  depth: S + 1,
28475
28482
  maxDepth: y,
28476
- prefix: N.key,
28483
+ prefix: O.key,
28477
28484
  exclude: systemKeys
28478
28485
  });
28479
- else if (["hasOne", "hasMany"].includes(O.type) || ["Nester", "SubTable"].includes(B == null ? void 0 : B.fieldMode)) {
28486
+ else if (["hasOne", "hasMany"].includes(N.type) || ["Nester", "SubTable"].includes(B == null ? void 0 : B.fieldMode)) {
28480
28487
  let M = !1;
28481
- ["hasOne", "hasMany"].includes(O.type) && ["Select", "Picker"].includes(B == null ? void 0 : B.fieldMode) && (M = !0), N.disabled = !0, N.isLeaf = !1, N.children = p(
28482
- O.target,
28488
+ ["hasOne", "hasMany"].includes(N.type) && ["Select", "Picker"].includes(B == null ? void 0 : B.fieldMode) && (M = !0), O.disabled = !0, O.isLeaf = !1, O.children = p(
28489
+ N.target,
28483
28490
  {
28484
28491
  depth: S + 1,
28485
28492
  maxDepth: y,
28486
- prefix: N.key,
28493
+ prefix: O.key,
28487
28494
  exclude: ["id", ...systemKeys],
28488
28495
  disabled: M
28489
28496
  },
28490
28497
  I
28491
28498
  );
28492
28499
  }
28493
- return N;
28500
+ return O;
28494
28501
  }).filter(Boolean);
28495
28502
  return f.set(R, D), D;
28496
28503
  })(new LRUCache({ max: 100 })), m = /* @__PURE__ */ ((f) => (C, { prefix: b, maxDepth: S, depth: y = 0, exclude: v = [] }) => {
@@ -28500,22 +28507,22 @@ const useSyncFromForm = (e, t, n) => {
28500
28507
  if (y > S)
28501
28508
  return [];
28502
28509
  const R = r(C).map((T) => {
28503
- var j, N;
28510
+ var j, O;
28504
28511
  if (!T.target || !T.interface || v.includes(T.name))
28505
28512
  return;
28506
28513
  const D = {
28507
28514
  type: "preloading",
28508
28515
  tag: c((j = T.uiSchema) == null ? void 0 : j.title) || T.name
28509
- }, O = b ? `${b}.${T.name}` : T.name;
28516
+ }, N = b ? `${b}.${T.name}` : T.name;
28510
28517
  return {
28511
28518
  type: "preloading",
28512
- tag: c((N = T.uiSchema) == null ? void 0 : N.title) || T.name,
28519
+ tag: c((O = T.uiSchema) == null ? void 0 : O.title) || T.name,
28513
28520
  title: React.createElement(TreeNode, D),
28514
- key: O,
28521
+ key: N,
28515
28522
  isLeaf: !1,
28516
28523
  field: T,
28517
28524
  children: m(T.target, {
28518
- prefix: O,
28525
+ prefix: N,
28519
28526
  depth: y + 1,
28520
28527
  maxDepth: S,
28521
28528
  exclude: v
@@ -28540,8 +28547,8 @@ const useSyncFromForm = (e, t, n) => {
28540
28547
  var I;
28541
28548
  (I = v == null ? void 0 : v.reduceProperties) == null || I.call(v, (R, T) => {
28542
28549
  var M, $, k;
28543
- const D = R || F, O = T["x-collection-field"] && o(T["x-collection-field"]), j = T.name.includes("."), N = O && ["hasOne", "hasMany", "belongsTo", "belongsToMany"].includes(O.type), B = !N && j ? getAssociationPath(T.name) : T.name, w = D === "" || !D ? B : D + "." + B;
28544
- if (O && !(["hasOne", "hasMany"].includes(O.type) || ["SubForm", "Nester"].includes((M = T["x-component-props"]) == null ? void 0 : M.mode)) && C.add(w), O && (N || j) && T["x-component"] !== "TableField") {
28550
+ const D = R || F, N = T["x-collection-field"] && o(T["x-collection-field"]), j = T.name.includes("."), O = N && ["hasOne", "hasMany", "belongsTo", "belongsToMany"].includes(N.type), B = !O && j ? getAssociationPath(T.name) : T.name, w = D === "" || !D ? B : D + "." + B;
28551
+ if (N && !(["hasOne", "hasMany"].includes(N.type) || ["SubForm", "Nester"].includes((M = T["x-component-props"]) == null ? void 0 : M.mode)) && C.add(w), N && (O || j) && T["x-component"] !== "TableField") {
28545
28552
  if (f.add({ name: w, fieldMode: (($ = T["x-component-props"]) == null ? void 0 : $.mode) || "Select" }), ["Nester", "SubTable"].includes((k = T["x-component-props"]) == null ? void 0 : k.mode)) {
28546
28553
  const z = D && D !== "" ? D + "." + T.name : T.name;
28547
28554
  b(T, z);
@@ -29662,9 +29669,9 @@ const useParseDefaultValue = () => {
29662
29669
  if (n && e && (isVariable$1(t.default) && e.value == null || e.value === t.default || R)) {
29663
29670
  e.loading = !0;
29664
29671
  const D = !t.name.toString().includes(".") && (d == null ? void 0 : d.getField(t.name)), {
29665
- value: O,
29672
+ value: N,
29666
29673
  collectionName: j,
29667
- dataSource: N = "main"
29674
+ dataSource: O = "main"
29668
29675
  } = yield n.parseVariable(t.default, o, {
29669
29676
  fieldOperator: C(t.name)
29670
29677
  });
@@ -29672,12 +29679,12 @@ const useParseDefaultValue = () => {
29672
29679
  collectionName: D.target,
29673
29680
  targetCollectionName: j,
29674
29681
  dm: b,
29675
- dataSource: N
29682
+ dataSource: O
29676
29683
  })) {
29677
29684
  e.loading = !1;
29678
29685
  return;
29679
29686
  }
29680
- const B = transformVariableValue(O, {
29687
+ const B = transformVariableValue(N, {
29681
29688
  targetCollectionField: D
29682
29689
  });
29683
29690
  B == null || B === "" ? e.mounted && (e.setInitialValue(null), yield e.reset({ forceClear: !0 })) : p() ? h === 0 && m(B) : e.setInitialValue(B), e.loading = !1;
@@ -29688,8 +29695,8 @@ const useParseDefaultValue = () => {
29688
29695
  const R = getVariableName(t.default), T = S(R);
29689
29696
  return T ? (y(), reaction(
29690
29697
  () => {
29691
- const O = { [R]: (T == null ? void 0 : T.ctx) || {} }, j = getPath(t.default), N = getValuesByPath(O, j);
29692
- return N === void 0 ? Math.random() : N;
29698
+ const N = { [R]: (T == null ? void 0 : T.ctx) || {} }, j = getPath(t.default), O = getValuesByPath(N, j);
29699
+ return O === void 0 ? Math.random() : O;
29693
29700
  },
29694
29701
  () => v({ forceUpdate: !0 }),
29695
29702
  {
@@ -35290,8 +35297,8 @@ const tableBlockSettings = new SchemaSettings({
35290
35297
  name: "fieldSettings:component:CascadeSelect",
35291
35298
  items: [fieldComponent$6, titleField$1, ellipsisSettingsItem, setTheDataScope]
35292
35299
  }), SchemaSettingsDateRange = function e(t) {
35293
- var R, T, D, O, j, N, B, w, M, $, k, z, L, q, E, G;
35294
- 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 = ((O = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : O.dateFormat) || ((N = (j = u == null ? void 0 : u.uiSchema) == null ? void 0 : j["x-component-props"]) == null ? void 0 : N.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 == null ? void 0 : n["x-component-props"]) == null ? void 0 : $.picker) || ((z = (k = u == null ? void 0 : u.uiSchema) == null ? void 0 : k["x-component-props"]) == null ? void 0 : z.picker) || "date";
35300
+ var R, T, D, N, j, O, B, w, M, $, k, z, L, q, E, G;
35301
+ 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 = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : N.dateFormat) || ((O = (j = u == null ? void 0 : u.uiSchema) == null ? void 0 : j["x-component-props"]) == null ? void 0 : O.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 == null ? void 0 : n["x-component-props"]) == null ? void 0 : $.picker) || ((z = (k = u == null ? void 0 : u.uiSchema) == null ? void 0 : k["x-component-props"]) == null ? void 0 : z.picker) || "date";
35295
35302
  n["x-read-pretty"] || o.readOnly || o.readPretty;
35296
35303
  const g = (L = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : L._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 = ((G = u == null ? void 0 : u.uiSchema) == null ? void 0 : G["x-component-props"].utc) || !1, S = useRecord(), { form: y } = useFormBlockContext(), v = useCallback(
35297
35304
  (U) => /* @__PURE__ */ jsx(
@@ -36743,8 +36750,8 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
36743
36750
  const y = C.split("."), v = y[0], F = mergeVariableToCollectionNameWithLocalVariables(variablesStore, b);
36744
36751
  let I = mergeCtxWithLocalVariables(n.current, b);
36745
36752
  const { fieldPath: R, dataSource: T, variableOption: D } = getFieldPath$1(v, F);
36746
- let O = R;
36747
- const { fieldPath: j } = getFieldPath$1(C, F), N = y.length === 1 ? D == null ? void 0 : D.collectionName : (w = r(j, T)) == null ? void 0 : w.target;
36753
+ let N = R;
36754
+ const { fieldPath: j } = getFieldPath$1(C, F), O = y.length === 1 ? D == null ? void 0 : D.collectionName : (w = r(j, T)) == null ? void 0 : w.target;
36748
36755
  if (!(v in I))
36749
36756
  throw new Error(`VariablesProvider: ${v} is not found`);
36750
36757
  for (let $ = 0; $ < y.length; $++) {
@@ -36752,13 +36759,13 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
36752
36759
  return {
36753
36760
  value: I === void 0 ? D == null ? void 0 : D.defaultValue : I,
36754
36761
  dataSource: T,
36755
- collectionName: N
36762
+ collectionName: O
36756
36763
  };
36757
- const k = y[$], z = y.slice(0, $ + 1).join("."), { fieldPath: L } = getFieldPath$1(z, F), q = r(L, T), E = (M = i(O, T)) == null ? void 0 : M.getPrimaryKey();
36764
+ const k = y[$], z = y.slice(0, $ + 1).join("."), { fieldPath: L } = getFieldPath$1(z, F), q = r(L, T), E = (M = i(N, T)) == null ? void 0 : M.getPrimaryKey();
36758
36765
  if (Array.isArray(I)) {
36759
36766
  const G = I.map((U) => {
36760
36767
  if (!(S != null && S.doNotRequest) && shouldToRequest(U == null ? void 0 : U[k]) && (U == null ? void 0 : U[E]) != null && q != null && q.target) {
36761
- const H = `/${O}/${U[q.sourceKey || E]}/${k}:${getAction(q.type)}`;
36768
+ const H = `/${N}/${U[q.sourceKey || E]}/${k}:${getAction(q.type)}`;
36762
36769
  if (hasRequested(H))
36763
36770
  return getRequested(H);
36764
36771
  const J = o.request({
@@ -36774,7 +36781,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
36774
36781
  });
36775
36782
  I = removeThroughCollectionFields(_.flatten(yield Promise.all(G)), q);
36776
36783
  } else if (!(S != null && S.doNotRequest) && shouldToRequest(I[k]) && I[E] != null && (q != null && q.target)) {
36777
- const G = `/${O}/${I[q.sourceKey || E]}/${k}:${getAction(q.type)}`;
36784
+ const G = `/${N}/${I[q.sourceKey || E]}/${k}:${getAction(q.type)}`;
36778
36785
  let U = null;
36779
36786
  if (hasRequested(G))
36780
36787
  U = yield getRequested(G);
@@ -36792,7 +36799,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
36792
36799
  I = removeThroughCollectionFields(H, q);
36793
36800
  } else
36794
36801
  I = removeThroughCollectionFields(getValuesByPath(I, k), q);
36795
- q != null && q.target && (O = q.target);
36802
+ q != null && q.target && (N = q.target);
36796
36803
  }
36797
36804
  const B = a(
36798
36805
  _.isFunction(I) ? I({ fieldOperator: S == null ? void 0 : S.fieldOperator, isParsingVariable: !0 }) : I
@@ -36800,7 +36807,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
36800
36807
  return {
36801
36808
  value: B === void 0 ? D.defaultValue : B,
36802
36809
  dataSource: T,
36803
- collectionName: N
36810
+ collectionName: O
36804
36811
  };
36805
36812
  }),
36806
36813
  [r]
@@ -37080,7 +37087,7 @@ const NocoBaseField = (e) => {
37080
37087
  return h["x-component"] === "CollectionField" ? /* @__PURE__ */ jsx(IsInNocoBaseRecursionFieldContext.Provider, { value: !0, children: /* @__PURE__ */ jsx(CollectionFieldUISchemaProvider, { fieldSchema: h, children: g }) }, `${p}-${d}`) : /* @__PURE__ */ jsx(IsInNocoBaseRecursionFieldContext.Provider, { value: !1, children: /* @__PURE__ */ jsx(CollectionFieldUISchemaContext.Provider, { value: EMPTY_OBJECT, children: g }) }, `${p}-${d}`);
37081
37088
  }) }) : null;
37082
37089
  }, IsInNocoBaseRecursionFieldContext = React.createContext(!1), useIsInNocoBaseRecursionFieldContext = () => React.useContext(IsInNocoBaseRecursionFieldContext), NocoBaseRecursionField = React.memo((e) => {
37083
- var D, O;
37090
+ var D, N;
37084
37091
  const {
37085
37092
  schema: t,
37086
37093
  name: n,
@@ -37094,11 +37101,11 @@ const NocoBaseField = (e) => {
37094
37101
  uiSchema: d,
37095
37102
  parentSchema: p
37096
37103
  } = e, m = useBasePath(e), h = useRef(null), g = useMemo(() => (h.current = null, new Schema(t)), [t]), { uiSchema: f, defaultValue: C } = useCollectionFieldUISchema(), b = useUpdate(), { onChange: S } = useContext(SchemaComponentOnChangeContext), y = h.current || g;
37097
- !y.parent && p && (y.parent = p, !((O = (D = y.parent) == null ? void 0 : D.properties) != null && O[y.name]) && y.name && _.set(y.parent, `properties.${y.name}`, y));
37104
+ !y.parent && p && (y.parent = p, !((N = (D = y.parent) == null ? void 0 : D.properties) != null && N[y.name]) && y.name && _.set(y.parent, `properties.${y.name}`, y));
37098
37105
  const v = useCallback(() => {
37099
37106
  const j = y.parent;
37100
- h.current = new Schema(y.toJSON(), j), j != null && j.properties && Object.keys(j.properties).forEach((N) => {
37101
- N === y.name && (j.properties[N] = h.current);
37107
+ h.current = new Schema(y.toJSON(), j), j != null && j.properties && Object.keys(j.properties).forEach((O) => {
37108
+ O === y.name && (j.properties[O] = h.current);
37102
37109
  }), b(), S == null || S();
37103
37110
  }, [y, S, b]), F = useMemo(() => d ? createMergedSchemaInstance(y, d, o) : f ? (f.default = C, createMergedSchemaInstance(y, f, o)) : y, [f, C, y, o, d]), I = useFieldProps(F), R = (j) => {
37104
37111
  if (!r)
@@ -37245,9 +37252,9 @@ const ActionLink = withDynamicSchemaProps(
37245
37252
  "onMouseEnter",
37246
37253
  "refreshDataBlockRequest",
37247
37254
  "confirmTitle"
37248
- ]), v = useDesigner(), F = useField(), I = useFieldSchema(), R = useCompile(), T = useCollectionRecordData(), D = R((U = I["x-component-props"]) == null ? void 0 : U.confirm) || g, O = useMemo(() => (I == null ? void 0 : I["x-linkage-rules"]) || [], [I == null ? void 0 : I["x-linkage-rules"]]), { designable: j } = useDesignable(), N = useComponent(o) || o, B = useVariables$1(), w = useLocalVariables$1({ currentForm: { values: T, readPretty: !1 } }), { visibleWithURL: M, setVisibleWithURL: $ } = usePopupUtils(), { setSubmitted: k } = useActionContext(), { getAriaLabel: z } = useGetAriaLabelOfAction(l), L = useCollectionParentRecordData(), q = useApp();
37255
+ ]), v = useDesigner(), F = useField(), I = useFieldSchema(), R = useCompile(), T = useCollectionRecordData(), D = R((U = I["x-component-props"]) == null ? void 0 : U.confirm) || g, N = useMemo(() => (I == null ? void 0 : I["x-linkage-rules"]) || [], [I == null ? void 0 : I["x-linkage-rules"]]), { designable: j } = useDesignable(), O = useComponent(o) || o, B = useVariables$1(), w = useLocalVariables$1({ currentForm: { values: T, readPretty: !1 } }), { visibleWithURL: M, setVisibleWithURL: $ } = usePopupUtils(), { setSubmitted: k } = useActionContext(), { getAriaLabel: z } = useGetAriaLabelOfAction(l), L = useCollectionParentRecordData(), q = useApp();
37249
37256
  useEffect(() => {
37250
- F.stateOfLinkageRules && setInitialActionState(F), F.stateOfLinkageRules = {}, O.filter((H) => !H.disabled).forEach((H) => {
37257
+ F.stateOfLinkageRules && setInitialActionState(F), F.stateOfLinkageRules = {}, N.filter((H) => !H.disabled).forEach((H) => {
37251
37258
  var J;
37252
37259
  (J = H.actions) == null || J.forEach((K) => {
37253
37260
  linkageAction(
@@ -37262,7 +37269,7 @@ const ActionLink = withDynamicSchemaProps(
37262
37269
  );
37263
37270
  });
37264
37271
  });
37265
- }, [F, O, w, B]);
37272
+ }, [F, N, w, B]);
37266
37273
  const E = useCallback(
37267
37274
  (H) => {
37268
37275
  C == null || C(H);
@@ -37279,7 +37286,7 @@ const ActionLink = withDynamicSchemaProps(
37279
37286
  icon: a,
37280
37287
  loading: d,
37281
37288
  handleMouseEnter: E,
37282
- tarComponent: N,
37289
+ tarComponent: O,
37283
37290
  className: i,
37284
37291
  type: e.type,
37285
37292
  Designer: v,
@@ -37330,9 +37337,9 @@ const ActionLink = withDynamicSchemaProps(
37330
37337
  actionCallback: R,
37331
37338
  visibleWithURL: T,
37332
37339
  setVisibleWithURL: D,
37333
- setSubmitted: O,
37340
+ setSubmitted: N,
37334
37341
  getAriaLabel: j,
37335
- parentRecordData: N
37342
+ parentRecordData: O
37336
37343
  } = fe, B = Y(fe, [
37337
37344
  "containerRefKey",
37338
37345
  "fieldSchema",
@@ -37392,7 +37399,7 @@ const ActionLink = withDynamicSchemaProps(
37392
37399
  run: X,
37393
37400
  confirm: g,
37394
37401
  modal: J,
37395
- setSubmitted: O,
37402
+ setSubmitted: N,
37396
37403
  confirmTitle: f,
37397
37404
  title: y
37398
37405
  }, le = useCallback(
@@ -37413,7 +37420,7 @@ const ActionLink = withDynamicSchemaProps(
37413
37420
  openSize: U,
37414
37421
  containerRefKey: n,
37415
37422
  fieldSchema: o,
37416
- setSubmitted: O,
37423
+ setSubmitted: N,
37417
37424
  children: [
37418
37425
  C && /* @__PURE__ */ jsx(NocoBaseRecursionField, { basePath: i.address, onlyRenderProperties: !0, schema: o }),
37419
37426
  !C && /* @__PURE__ */ jsx(RenderButton, x({}, se)),
@@ -37490,9 +37497,9 @@ const RenderButton = ({
37490
37497
  modal: R,
37491
37498
  setSubmitted: T,
37492
37499
  confirmTitle: D,
37493
- title: O
37500
+ title: N
37494
37501
  }) => {
37495
- const { getDataBlockRequest: j } = useDataBlockRequestGetter(), { t: N } = useTranslation(), { isPopupVisibleControlledByURL: B } = usePopupSettings(), { openPopup: w } = usePopupUtils(), M = useForm(), $ = useRef(null);
37502
+ const { getDataBlockRequest: j } = useDataBlockRequestGetter(), { t: O } = useTranslation(), { isPopupVisibleControlledByURL: B } = usePopupSettings(), { openPopup: w } = usePopupUtils(), M = useForm(), $ = useRef(null);
37496
37503
  $.current = w;
37497
37504
  const k = useCallback(
37498
37505
  (z, L = !0) => V(void 0, null, function* () {
@@ -37505,8 +37512,8 @@ const RenderButton = ({
37505
37512
  }) : isBulkEditAction(y) || !B() ? (v(!0), F == null || F()) : ["view", "update", "create", "customize:popup"].includes(y["x-action"]) && y["x-uid"] ? $.current() : (v(!0), F == null || F());
37506
37513
  };
37507
37514
  (I == null ? void 0 : I.enable) !== !1 && (I != null && I.content) ? (yield (q = M == null ? void 0 : M.submit) == null ? void 0 : q.call(M), R.confirm({
37508
- title: N(I.title, { title: D || O || (t == null ? void 0 : t.title) }),
37509
- content: N(I.content, { title: D || O || (t == null ? void 0 : t.title) }),
37515
+ title: O(I.title, { title: D || N || (t == null ? void 0 : t.title) }),
37516
+ content: O(I.content, { title: D || N || (t == null ? void 0 : t.title) }),
37510
37517
  onOk: E
37511
37518
  })) : E();
37512
37519
  }
@@ -37527,8 +37534,8 @@ const RenderButton = ({
37527
37534
  F,
37528
37535
  T,
37529
37536
  v,
37530
- N,
37531
37537
  O,
37538
+ N,
37532
37539
  j
37533
37540
  ]
37534
37541
  );
@@ -37552,7 +37559,7 @@ const RenderButton = ({
37552
37559
  type: f,
37553
37560
  Designer: C,
37554
37561
  designerProps: u,
37555
- title: O
37562
+ title: N
37556
37563
  }, h)
37557
37564
  );
37558
37565
  };
@@ -37560,7 +37567,7 @@ RenderButton.displayName = "RenderButton";
37560
37567
  const RenderButtonInner = observer$1(
37561
37568
  (e) => {
37562
37569
  var j, B;
37563
- const O = e, {
37570
+ const N = e, {
37564
37571
  designable: t,
37565
37572
  field: n,
37566
37573
  aclCtx: o,
@@ -37580,7 +37587,7 @@ const RenderButtonInner = observer$1(
37580
37587
  designerProps: b,
37581
37588
  title: S,
37582
37589
  isLink: y
37583
- } = O, v = Y(O, [
37590
+ } = N, v = Y(N, [
37584
37591
  "designable",
37585
37592
  "field",
37586
37593
  "aclCtx",
@@ -37614,7 +37621,7 @@ const RenderButtonInner = observer$1(
37614
37621
  F.cancel();
37615
37622
  }, []), !t && ((j = n == null ? void 0 : n.data) != null && j.hidden || !o))
37616
37623
  return null;
37617
- const I = S || (n == null ? void 0 : n.title), N = l, { opacity: R } = N, T = Y(N, ["opacity"]), D = y && R ? { opacity: R } : void 0;
37624
+ const I = S || (n == null ? void 0 : n.title), O = l, { opacity: R } = O, T = Y(O, ["opacity"]), D = y && R ? { opacity: R } : void 0;
37618
37625
  return /* @__PURE__ */ jsxs(
37619
37626
  SortableItem,
37620
37627
  P(x({
@@ -38080,7 +38087,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
38080
38087
  "dataSource",
38081
38088
  "toOptionsItem",
38082
38089
  "popupMatchSelectWidth"
38083
- ]), C = useDataSourceKey(), b = useDataSourceHeaders(m || C), S = useRef(!1), y = useFieldSchema(), v = ((H = y["x-component-props"]) == null ? void 0 : H.addMode) === "quickAdd", { getField: F } = useCollection_deprecated(), I = useRef(null), { getCollectionJoinField: R, getInterface: T } = useCollectionManager_deprecated(), D = y["x-collection-field"] || y.name, O = F(D) || R(D), j = u || (O == null ? void 0 : O.target) && (t == null ? void 0 : t.label) && R(`${O.target}.${t.label}`), N = useMemo(() => {
38090
+ ]), C = useDataSourceKey(), b = useDataSourceHeaders(m || C), S = useRef(!1), y = useFieldSchema(), v = ((H = y["x-component-props"]) == null ? void 0 : H.addMode) === "quickAdd", { getField: F } = useCollection_deprecated(), I = useRef(null), { getCollectionJoinField: R, getInterface: T } = useCollectionManager_deprecated(), D = y["x-collection-field"] || y.name, N = F(D) || R(D), j = u || (N == null ? void 0 : N.target) && (t == null ? void 0 : t.label) && R(`${N.target}.${t.label}`), O = useMemo(() => {
38084
38091
  var K;
38085
38092
  if (j != null && j.interface) {
38086
38093
  const W = T(j.interface), X = ((K = W == null ? void 0 : W.filterable) == null ? void 0 : K.operators[0].value) || "$includes";
@@ -38155,7 +38162,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
38155
38162
  filter: mergeFilter([
38156
38163
  K ? {
38157
38164
  [t.label]: {
38158
- [N]: K
38165
+ [O]: K
38159
38166
  }
38160
38167
  } : {},
38161
38168
  (W = n == null ? void 0 : n.params) == null ? void 0 : W.filter
@@ -38264,11 +38271,11 @@ const useFormDataTemplates = () => {
38264
38271
  d(I), m(null), t == null || t.reset();
38265
38272
  }), []), v = useCallback((I, R, T) => V(void 0, null, function* () {
38266
38273
  const D = P(x({}, R), { dataId: I });
38267
- m(R), fetchTemplateData(h, D, T).then((O) => (t && O && (t.reset(), t.__template = !0, forEach(O, (j, N) => {
38274
+ m(R), fetchTemplateData(h, D, T).then((N) => (t && N && (t.reset(), t.__template = !0, forEach(N, (j, O) => {
38268
38275
  var B;
38269
- j && (t.values[N] = j, (B = t == null ? void 0 : t.setInitialValuesIn) == null || B.call(t, N, j));
38270
- })), O)).catch((O) => {
38271
- console.error(O);
38276
+ j && (t.values[O] = j, (B = t == null ? void 0 : t.setInitialValuesIn) == null || B.call(t, O, j));
38277
+ })), N)).catch((N) => {
38278
+ console.error(N);
38272
38279
  });
38273
38280
  }), []);
38274
38281
  if (!i || !r)
@@ -39179,7 +39186,7 @@ const insertPositionToMethod = {
39179
39186
  )
39180
39187
  ] });
39181
39188
  }, components$4 = { TreeSelect: TreeSelect$1 }, MenuDesigner = () => {
39182
- var D, O;
39189
+ var D, N;
39183
39190
  const { updateRoute: e, deleteRoute: t } = useNocoBaseRoutes(), n = useField(), o = useFieldSchema(), r = useAPIClient(), { dn: i, refresh: a } = useDesignable(), { t: l } = useTranslation(), c = findMenuSchema(o), u = useCompile(), { urlSchema: d, paramsSchema: p } = useURLAndHTMLSchema(), m = useMemo(
39184
39191
  () => {
39185
39192
  var j;
@@ -39188,10 +39195,10 @@ const insertPositionToMethod = {
39188
39195
  [(D = c == null ? void 0 : c["x-component-props"]) == null ? void 0 : D.onSelect]
39189
39196
  ), h = useMemo(() => toItems$1(c == null ? void 0 : c.properties, { t: l, compile: u }), [c == null ? void 0 : c.properties, l, u]), g = useCallback(
39190
39197
  (j) => {
39191
- onFieldChange("target", (N) => {
39198
+ onFieldChange("target", (O) => {
39192
39199
  var w, M;
39193
- const [, B] = ((M = (w = N == null ? void 0 : N.value) == null ? void 0 : w.split) == null ? void 0 : M.call(w, "||")) || [];
39194
- N.query("position").take(($) => {
39200
+ const [, B] = ((M = (w = O == null ? void 0 : O.value) == null ? void 0 : w.split) == null ? void 0 : M.call(w, "||")) || [];
39201
+ O.query("position").take(($) => {
39195
39202
  $.dataSource = B === "Menu.SubMenu" ? [
39196
39203
  { label: l("Before"), value: "beforeBegin" },
39197
39204
  { label: l("After"), value: "afterEnd" },
@@ -39239,7 +39246,7 @@ const insertPositionToMethod = {
39239
39246
  }), [n.componentProps.tooltip]);
39240
39247
  o["x-component"] === "Menu.URL" && (f.properties.href = d, f.properties.params = p, C.href = n.componentProps.href, C.params = n.componentProps.params);
39241
39248
  const y = useCallback(
39242
- ({ title: j, icon: N, href: B, params: w }) => {
39249
+ ({ title: j, icon: O, href: B, params: w }) => {
39243
39250
  var $;
39244
39251
  const M = {
39245
39252
  "x-uid": o["x-uid"],
@@ -39250,11 +39257,11 @@ const insertPositionToMethod = {
39250
39257
  }
39251
39258
  ]
39252
39259
  };
39253
- j && (o.title = j, n.title = j, M.title = j, a()), n.componentProps.icon = N, n.componentProps.href = B, n.componentProps.params = w, M["x-component-props"] = { icon: N, href: B, params: w }, o["x-component-props"] = o["x-component-props"] || {}, o["x-component-props"].icon = N, o["x-component-props"].href = B, o["x-component-props"].params = w, m == null || m({ item: { props: { schema: o } } }), i.emit("patch", {
39260
+ j && (o.title = j, n.title = j, M.title = j, a()), n.componentProps.icon = O, n.componentProps.href = B, n.componentProps.params = w, M["x-component-props"] = { icon: O, href: B, params: w }, o["x-component-props"] = o["x-component-props"] || {}, o["x-component-props"].icon = O, o["x-component-props"].href = B, o["x-component-props"].params = w, m == null || m({ item: { props: { schema: o } } }), i.emit("patch", {
39254
39261
  schema: M
39255
39262
  }), ($ = o.__route__) != null && $.id && e(o.__route__.id, {
39256
39263
  title: j,
39257
- icon: N,
39264
+ icon: O,
39258
39265
  options: B || w ? {
39259
39266
  href: B,
39260
39267
  params: w
@@ -39264,8 +39271,8 @@ const insertPositionToMethod = {
39264
39271
  [o, n, i, a, m]
39265
39272
  ), v = useCallback(
39266
39273
  ({ tooltip: j }) => {
39267
- var N;
39268
- (N = o.__route__) != null && N.id && e(o.__route__.id, {
39274
+ var O;
39275
+ (O = o.__route__) != null && O.id && e(o.__route__.id, {
39269
39276
  tooltip: j
39270
39277
  });
39271
39278
  },
@@ -39295,7 +39302,7 @@ const insertPositionToMethod = {
39295
39302
  }
39296
39303
  }
39297
39304
  }), [h, l]), { moveRoute: I } = useNocoBaseRoutes(), R = useCallback(
39298
- (B) => V(void 0, [B], function* ({ target: j, position: N }) {
39305
+ (B) => V(void 0, [B], function* ({ target: j, position: O }) {
39299
39306
  var L;
39300
39307
  const [w] = ((L = j == null ? void 0 : j.split) == null ? void 0 : L.call(j, "||")) || [];
39301
39308
  if (!w)
@@ -39308,7 +39315,7 @@ const insertPositionToMethod = {
39308
39315
  }), k = {
39309
39316
  beforeBegin: "insertBefore",
39310
39317
  afterEnd: "insertAfter"
39311
- }, z = N === "beforeEnd" ? {
39318
+ }, z = O === "beforeEnd" ? {
39312
39319
  targetScope: {
39313
39320
  parentId: M.__route__.id
39314
39321
  }
@@ -39318,8 +39325,8 @@ const insertPositionToMethod = {
39318
39325
  yield I(x({
39319
39326
  sourceId: o.__route__.id,
39320
39327
  sortField: "sort",
39321
- method: k[N]
39322
- }, z)), $.loadAPIClientEvents(), $.insertAdjacent(N, o);
39328
+ method: k[O]
39329
+ }, z)), $.loadAPIClientEvents(), $.insertAdjacent(O, o);
39323
39330
  }),
39324
39331
  [c, l, r, a, I, o]
39325
39332
  ), T = useMemo(() => ({
@@ -39354,7 +39361,7 @@ const insertPositionToMethod = {
39354
39361
  SchemaSettingsSwitchItem,
39355
39362
  {
39356
39363
  title: l("Hidden"),
39357
- checked: (O = o["x-component-props"]) == null ? void 0 : O.hidden,
39364
+ checked: (N = o["x-component-props"]) == null ? void 0 : N.hidden,
39358
39365
  onChange: (j) => {
39359
39366
  Modal.confirm({
39360
39367
  title: l("Are you sure you want to hide this menu?"),
@@ -39773,14 +39780,14 @@ const useMenuDragEnd = () => {
39773
39780
  theme: m
39774
39781
  } = useProps(e), { t: h } = useTranslation(), g = useDesigner(), f = useFieldSchema(), C = useAPIClient(), { render: b } = useSchemaInitializerRender(f["x-initializer"], f["x-initializer-props"]), S = useSideMenuRef(), [y, v] = useState(), [F, I] = useState(() => i || (r ? findKeysByUid(f, r) : [])), [R, T] = useState(() => ["inline", "mix"].includes(n) ? a || F : a), D = useMemo(() => {
39775
39782
  var B;
39776
- let N;
39783
+ let O;
39777
39784
  if (o) {
39778
39785
  const w = findKeysByUid(f, o);
39779
- N = (w == null ? void 0 : w[0]) || null;
39786
+ O = (w == null ? void 0 : w[0]) || null;
39780
39787
  } else
39781
- N = (F == null ? void 0 : F[0]) || null;
39782
- if (n === "mix" && N) {
39783
- const w = (B = f.properties) == null ? void 0 : B[N];
39788
+ O = (F == null ? void 0 : F[0]) || null;
39789
+ if (n === "mix" && O) {
39790
+ const w = (B = f.properties) == null ? void 0 : B[O];
39784
39791
  if ((w == null ? void 0 : w["x-component"]) === "Menu.SubMenu")
39785
39792
  return w;
39786
39793
  }
@@ -39791,12 +39798,12 @@ const useMenuDragEnd = () => {
39791
39798
  v(void 0);
39792
39799
  return;
39793
39800
  }
39794
- const N = findKeysByUid(f, o);
39795
- v(N), ["inline", "mix"].includes(n) && T(a || N);
39801
+ const O = findKeysByUid(f, o);
39802
+ v(O), ["inline", "mix"].includes(n) && T(a || O);
39796
39803
  }, [o]), useEffect(() => {
39797
39804
  ["inline", "mix"].includes(n) && T(F);
39798
39805
  }, [F]);
39799
- const O = useContext(SchemaComponentContext), { onDragEnd: j } = useMenuDragEnd();
39806
+ const N = useContext(SchemaComponentContext), { onDragEnd: j } = useMenuDragEnd();
39800
39807
  return /* @__PURE__ */ jsx(DndContext, { onDragEnd: j, children: /* @__PURE__ */ jsx(MenuItemDesignerContext.Provider, { value: g, children: /* @__PURE__ */ jsxs(MenuModeContext.Provider, { value: n, children: [
39801
39808
  /* @__PURE__ */ jsx(
39802
39809
  HeaderMenu,
@@ -39813,7 +39820,7 @@ const useMenuDragEnd = () => {
39813
39820
  defaultSelectedKeys: F,
39814
39821
  defaultOpenKeys: R,
39815
39822
  selectedKeys: y,
39816
- designable: O.designable,
39823
+ designable: N.designable,
39817
39824
  render: b,
39818
39825
  children: l
39819
39826
  }
@@ -39831,7 +39838,7 @@ const useMenuDragEnd = () => {
39831
39838
  render: b,
39832
39839
  t: h,
39833
39840
  api: C,
39834
- designable: O.designable
39841
+ designable: N.designable
39835
39842
  }
39836
39843
  ) })
39837
39844
  ] }) }) });
@@ -40620,35 +40627,35 @@ const AppendsTreeSelect = (e) => {
40620
40627
  "filter",
40621
40628
  "rootOption",
40622
40629
  "loadData"
40623
- ]), 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 = (N, B) => {
40624
- const w = S.getCollection(N);
40630
+ ]), 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 = (O, B) => {
40631
+ const w = S.getCollection(O);
40625
40632
  return w ? w.getAllFields(B) : [];
40626
- }, v = Object.values(m), F = useMemo(() => e.multiple ? (n || []).map((N) => m[N]).filter(Boolean) : n, [n, e.multiple, m]), I = useCallback(
40627
- (N) => V(void 0, null, function* () {
40633
+ }, v = Object.values(m), F = useMemo(() => e.multiple ? (n || []).map((O) => m[O]).filter(Boolean) : n, [n, e.multiple, m]), I = useCallback(
40634
+ (O) => V(void 0, null, function* () {
40628
40635
  if (c != null)
40629
- return c(N);
40630
- if (!N.isLeaf && N.loadChildren) {
40631
- const B = N.loadChildren(N);
40636
+ return c(O);
40637
+ if (!O.isLeaf && O.loadChildren) {
40638
+ const B = O.loadChildren(O);
40632
40639
  h((w) => B.reduce((M, $) => Object.assign(M, { [$.value]: $ }), x({}, w)));
40633
40640
  }
40634
40641
  }),
40635
40642
  [c]
40636
40643
  );
40637
40644
  useEffect(() => {
40638
- const N = l ? P(x({}, l), {
40645
+ const O = l ? P(x({}, l), {
40639
40646
  id: l.value,
40640
40647
  key: l.value,
40641
40648
  title: l.label,
40642
40649
  fullTitle: l.label,
40643
40650
  isLeaf: !1
40644
- }) : null, w = (c === null ? [] : getCollectionFieldOptions.call({ compile: d, getCollectionFields: y, filter: a }, C, N)).reduce((M, $) => Object.assign(M, { [$.value]: $ }), {});
40645
- N && (w[N.value] = N), h(w);
40651
+ }) : null, w = (c === null ? [] : getCollectionFieldOptions.call({ compile: d, getCollectionFields: y, filter: a }, C, O)).reduce((M, $) => Object.assign(M, { [$.value]: $ }), {});
40652
+ O && (w[O.value] = O), h(w);
40646
40653
  }, [g, l, a, c]), useEffect(() => {
40647
- const N = e.multiple ? n : n ? [n] : [];
40648
- if (!(N != null && N.length) || N.every((w) => !!m[w]))
40654
+ const O = e.multiple ? n : n ? [n] : [];
40655
+ if (!(O != null && O.length) || O.every((w) => !!m[w]))
40649
40656
  return;
40650
40657
  const B = [];
40651
- N.forEach((w) => {
40658
+ O.forEach((w) => {
40652
40659
  const M = w.split(".");
40653
40660
  let $ = m[M[0]];
40654
40661
  for (let k = 1; k < M.length && $; k++) {
@@ -40665,12 +40672,12 @@ const AppendsTreeSelect = (e) => {
40665
40672
  }), h((w) => B.reduce((M, $) => Object.assign(M, { [$.value]: $ }), x({}, w)));
40666
40673
  }, [n, v.length, e.multiple]);
40667
40674
  const R = useCallback(
40668
- (N) => {
40675
+ (O) => {
40669
40676
  if (!e.multiple) {
40670
- o(N);
40677
+ o(O);
40671
40678
  return;
40672
40679
  }
40673
- const B = N.map(($) => $.value).filter(Boolean), w = new Set(B), M = F.find(($) => !w.has($.value));
40680
+ const B = O.map(($) => $.value).filter(Boolean), w = new Set(B), M = F.find(($) => !w.has($.value));
40674
40681
  if (M) {
40675
40682
  const $ = `${M.value}.`;
40676
40683
  Object.keys(m).forEach((k) => {
@@ -40687,16 +40694,16 @@ const AppendsTreeSelect = (e) => {
40687
40694
  },
40688
40695
  [e.multiple, F, o, m]
40689
40696
  ), T = useCallback(
40690
- (N) => {
40697
+ (O) => {
40691
40698
  var z;
40692
- const { value: B, onClose: w, disabled: M, closable: $ } = N;
40699
+ const { value: B, onClose: w, disabled: M, closable: $ } = O;
40693
40700
  if (!B)
40694
40701
  return null;
40695
40702
  const { fullTitle: k } = (z = m[B]) != null ? z : {};
40696
40703
  return /* @__PURE__ */ jsx(Tag, { closable: $ && !M, onClose: w, children: k == null ? void 0 : k.join(" / ") });
40697
40704
  },
40698
40705
  [m]
40699
- ), D = Array.isArray(F) ? F.filter((N) => N.value in m) : F, O = e.multiple ? n : n != null ? [n] : [];
40706
+ ), D = Array.isArray(F) ? F.filter((O) => O.value in m) : F, N = e.multiple ? n : n != null ? [n] : [];
40700
40707
  return /* @__PURE__ */ jsx(
40701
40708
  TreeSelect$2,
40702
40709
  x({
@@ -40705,7 +40712,7 @@ const AppendsTreeSelect = (e) => {
40705
40712
  value: D,
40706
40713
  placeholder: p("Select field"),
40707
40714
  showCheckedStrategy: TreeSelect$2.SHOW_ALL,
40708
- treeDefaultExpandedKeys: O,
40715
+ treeDefaultExpandedKeys: N,
40709
40716
  allowClear: {
40710
40717
  clearIcon: /* @__PURE__ */ jsx(CloseCircleFilled, { role: "button", "aria-label": "icon-close" })
40711
40718
  },
@@ -40740,18 +40747,18 @@ function getFieldPath(e) {
40740
40747
  }
40741
40748
  const InternalAssociationSelect$1 = observer$1(
40742
40749
  (e) => {
40743
- var O;
40744
- const D = e, { objectValue: t = !0, addMode: n } = D, o = Y(D, ["objectValue", "addMode"]), r = useField(), i = useFieldSchema(), a = useServiceOptions$1((i == null ? void 0 : i["x-component-props"]) || e), { options: l } = useAssociationFieldContext(), c = isVariable$1(e.value) ? void 0 : e.value, u = Array.isArray(c) ? c.filter(Boolean) : c, [d, p] = useState(u), m = (O = i["x-component-props"]) == null ? void 0 : O.addMode, { t: h } = useTranslation(), { multiple: g } = e, f = useForm(), b = useAPIClient().resource(l.target), S = useCollectionRecordData(), y = useContext(SchemaComponentContext), { getCollection: v } = useCollectionManager_deprecated(), F = v(l.target), { filterTargetKey: I } = F;
40750
+ var N;
40751
+ const D = e, { objectValue: t = !0, addMode: n } = D, o = Y(D, ["objectValue", "addMode"]), r = useField(), i = useFieldSchema(), a = useServiceOptions$1((i == null ? void 0 : i["x-component-props"]) || e), { options: l } = useAssociationFieldContext(), c = isVariable$1(e.value) ? void 0 : e.value, u = Array.isArray(c) ? c.filter(Boolean) : c, [d, p] = useState(u), m = (N = i["x-component-props"]) == null ? void 0 : N.addMode, { t: h } = useTranslation(), { multiple: g } = e, f = useForm(), b = useAPIClient().resource(l.target), S = useCollectionRecordData(), y = useContext(SchemaComponentContext), { getCollection: v } = useCollectionManager_deprecated(), F = v(l.target), { filterTargetKey: I } = F;
40745
40752
  useEffect(() => {
40746
- const j = isVariable$1(r.value) ? void 0 : r.value, N = Array.isArray(j) ? j.filter(Boolean) : j, B = removeIfKeyEmpty(N, I);
40753
+ const j = isVariable$1(r.value) ? void 0 : r.value, O = Array.isArray(j) ? j.filter(Boolean) : j, B = removeIfKeyEmpty(O, I);
40747
40754
  p(B), isEqual(r.value, B) || (r.value = B);
40748
40755
  }, [r.value, I]), useEffect(() => {
40749
40756
  const j = uid();
40750
40757
  return f.addEffects(j, () => {
40751
- onFieldInputValueChange("*", (N) => {
40758
+ onFieldInputValueChange("*", (O) => {
40752
40759
  var $, k, z, L, q, E;
40753
- const B = filterAnalyses((z = (k = ($ = r.componentProps) == null ? void 0 : $.service) == null ? void 0 : k.params) == null ? void 0 : z.filter) || [], w = getFieldPath(N.address.entire), M = getFieldPath(r.address.entire);
40754
- B.includes((L = N == null ? void 0 : N.props) == null ? void 0 : L.name) && r.value && isEqual(N == null ? void 0 : N.indexes, r == null ? void 0 : r.indexes) && ((q = N == null ? void 0 : N.props) == null ? void 0 : q.name) !== r.props.name && (!((E = r == null ? void 0 : r.indexes) != null && E.length) || isEqual(w, M)) && (r.setValue(null), p(null));
40760
+ const B = filterAnalyses((z = (k = ($ = r.componentProps) == null ? void 0 : $.service) == null ? void 0 : k.params) == null ? void 0 : z.filter) || [], w = getFieldPath(O.address.entire), M = getFieldPath(r.address.entire);
40761
+ B.includes((L = O == null ? void 0 : O.props) == null ? void 0 : L.name) && r.value && isEqual(O == null ? void 0 : O.indexes, r == null ? void 0 : r.indexes) && ((q = O == null ? void 0 : O.props) == null ? void 0 : q.name) !== r.props.name && (!((E = r == null ? void 0 : r.indexes) != null && E.length) || isEqual(w, M)) && (r.setValue(null), p(null));
40755
40762
  });
40756
40763
  }), () => {
40757
40764
  f.removeEffects(j);
@@ -40759,11 +40766,11 @@ const InternalAssociationSelect$1 = observer$1(
40759
40766
  }, []);
40760
40767
  const R = (j) => V(void 0, null, function* () {
40761
40768
  var M, $;
40762
- const { search: N, callBack: B } = j, {
40769
+ const { search: O, callBack: B } = j, {
40763
40770
  data: { data: w }
40764
40771
  } = yield b.create({
40765
40772
  values: {
40766
- [(($ = (M = r == null ? void 0 : r.componentProps) == null ? void 0 : M.fieldNames) == null ? void 0 : $.label) || "id"]: N
40773
+ [(($ = (M = r == null ? void 0 : r.componentProps) == null ? void 0 : M.fieldNames) == null ? void 0 : $.label) || "id"]: O
40767
40774
  }
40768
40775
  });
40769
40776
  if (w) {
@@ -40797,8 +40804,8 @@ const InternalAssociationSelect$1 = observer$1(
40797
40804
  service: a,
40798
40805
  onChange: (j) => {
40799
40806
  var B;
40800
- const N = Array.isArray(j) && j.length === 0 ? null : j;
40801
- (B = e.onChange) == null || B.call(e, N);
40807
+ const O = Array.isArray(j) && j.length === 0 ? null : j;
40808
+ (B = e.onChange) == null || B.call(e, O);
40802
40809
  },
40803
40810
  CustomDropdownRender: m === "quickAdd" && T
40804
40811
  })
@@ -41384,21 +41391,21 @@ function Uploader(n) {
41384
41391
  const { disabled: r, multiple: i, value: a, onChange: l, toValueItem: c = toValueItem } = t, [u, d] = useState([]), [p, m] = useState([]), { t: h } = useTranslation(), { componentCls: g } = useStyles$6(), f = useField(), C = useUploadProps(t), b = useBeforeUpload(e);
41385
41392
  useEffect(() => {
41386
41393
  if (p.length) {
41387
- const O = p.filter((j) => j.status === "error");
41394
+ const N = p.filter((j) => j.status === "error");
41388
41395
  f.setFeedback({
41389
41396
  type: "error",
41390
41397
  code: "ValidateError",
41391
- messages: [O.length ? h("Some files are not uploaded correctly, please check.") : " "]
41398
+ messages: [N.length ? h("Some files are not uploaded correctly, please check.") : " "]
41392
41399
  });
41393
41400
  } else
41394
41401
  f.setFeedback({});
41395
41402
  }, [f, p, h]);
41396
41403
  const S = useCallback(
41397
- (O) => {
41398
- var N;
41399
- const j = O.fileList.filter((B) => B.status !== "done").map(normalizeFile);
41404
+ (N) => {
41405
+ var O;
41406
+ const j = N.fileList.filter((B) => B.status !== "done").map(normalizeFile);
41400
41407
  if (m(j), i) {
41401
- const B = O.fileList.filter((w) => w.status === "done");
41408
+ const B = N.fileList.filter((w) => w.status === "done");
41402
41409
  if (B.length) {
41403
41410
  const w = [...u, ...B.map((M) => {
41404
41411
  var $;
@@ -41407,25 +41414,25 @@ function Uploader(n) {
41407
41414
  j.length ? d(w) : (l == null || l([...a || [], ...w]), d([]));
41408
41415
  }
41409
41416
  } else {
41410
- const B = O.fileList.find((w) => w.uid === O.file.uid);
41411
- B.status === "done" && (l == null || l(c((N = B.response) == null ? void 0 : N.data)), m([]));
41417
+ const B = N.fileList.find((w) => w.uid === N.file.uid);
41418
+ B.status === "done" && (l == null || l(c((O = B.response) == null ? void 0 : O.data)), m([]));
41412
41419
  }
41413
41420
  },
41414
41421
  [i, a, u, c, l]
41415
- ), y = useCallback((O) => {
41422
+ ), y = useCallback((N) => {
41416
41423
  m((j) => {
41417
- const N = j.indexOf(O);
41418
- return j.splice(N, 1), [...j];
41424
+ const O = j.indexOf(N);
41425
+ return j.splice(O, 1), [...j];
41419
41426
  });
41420
- }, []), v = useCallback((O) => {
41427
+ }, []), v = useCallback((N) => {
41421
41428
  d((j) => {
41422
- const N = j.indexOf(O);
41423
- return j.splice(N, 1), [...j];
41429
+ const O = j.indexOf(N);
41430
+ return j.splice(O, 1), [...j];
41424
41431
  });
41425
41432
  }, []), F = useComponent("QRCodeUploader"), { mimetype: I, size: R } = e != null ? e : {}, T = useSizeHint(R), D = !r && (i || (!a || Array.isArray(a) && !a.length) && !p.length);
41426
41433
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
41427
- u.map((O, j) => /* @__PURE__ */ jsx(AttachmentListItem, { file: O, index: j, disabled: r, onDelete: v }, O.id)),
41428
- p.map((O, j) => /* @__PURE__ */ jsx(AttachmentListItem, { file: O, index: j, disabled: r, onDelete: y }, O.uid)),
41434
+ u.map((N, j) => /* @__PURE__ */ jsx(AttachmentListItem, { file: N, index: j, disabled: r, onDelete: v }, N.id)),
41435
+ p.map((N, j) => /* @__PURE__ */ jsx(AttachmentListItem, { file: N, index: j, disabled: r, onDelete: y }, N.uid)),
41429
41436
  /* @__PURE__ */ jsx(
41430
41437
  "div",
41431
41438
  {
@@ -41735,15 +41742,15 @@ function FileSelector(e) {
41735
41742
  );
41736
41743
  }
41737
41744
  const InternalFileManager = (e) => {
41738
- var D, O;
41745
+ var D, N;
41739
41746
  const T = e, { value: t, multiple: n, onChange: o } = T, r = Y(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 = (j) => {
41740
41747
  j.stopPropagation(), j.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([]);
41741
41748
  };
41742
41749
  useEffect(() => {
41743
41750
  if (t && Object.keys(t).length > 0) {
41744
- const j = (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((N) => {
41745
- const B = N[p.label];
41746
- return P(x({}, N), {
41751
+ const j = (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((O) => {
41752
+ const B = O[p.label];
41753
+ return P(x({}, O), {
41747
41754
  [p.label]: getLabelFormatValue$1(y(S), y(B))
41748
41755
  });
41749
41756
  });
@@ -41764,10 +41771,10 @@ const InternalFileManager = (e) => {
41764
41771
  setSelectedRows: u,
41765
41772
  collectionField: b
41766
41773
  }, R = () => {
41767
- const { setVisible: j } = useActionContext(), { multiple: N, selectedRows: B, onChange: w, options: M, collectionField: $ } = useContext(RecordPickerContext);
41774
+ const { setVisible: j } = useActionContext(), { multiple: O, selectedRows: B, onChange: w, options: M, collectionField: $ } = useContext(RecordPickerContext);
41768
41775
  return {
41769
41776
  onClick() {
41770
- w(N ? unionBy(B, M, ($ == null ? void 0 : $.targetKey) || "id") : (B == null ? void 0 : B[0]) || null), j(!1);
41777
+ w(O ? unionBy(B, M, ($ == null ? void 0 : $.targetKey) || "id") : (B == null ? void 0 : B[0]) || null), j(!1);
41771
41778
  }
41772
41779
  };
41773
41780
  };
@@ -41778,7 +41785,7 @@ const InternalFileManager = (e) => {
41778
41785
  value: n ? g : g == null ? void 0 : g[0],
41779
41786
  multiple: n,
41780
41787
  quickUpload: ((D = i["x-component-props"]) == null ? void 0 : D.quickUpload) !== !1,
41781
- selectFile: ((O = i["x-component-props"]) == null ? void 0 : O.selectFile) !== !1,
41788
+ selectFile: ((N = i["x-component-props"]) == null ? void 0 : N.selectFile) !== !1,
41782
41789
  action: `${b == null ? void 0 : b.target}:create`,
41783
41790
  onSelect: F,
41784
41791
  onChange: o
@@ -41819,10 +41826,10 @@ const InternalFileManager = (e) => {
41819
41826
  FormItem: FormItem$1
41820
41827
  }
41821
41828
  }), CascadeSelect = connect((e) => {
41822
- var N;
41829
+ var O;
41823
41830
  const { data: t, mapOptions: n, onChange: o, value: r } = e, [i, a] = useState([
41824
41831
  { key: void 0, children: [], value: null }
41825
- ]), [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 = (N = f == null ? void 0 : f.componentProps) == null ? void 0 : N.fieldNames, v = (g == null ? void 0 : g.target) && (y == null ? void 0 : y.label) && b(`${g.target}.${y.label}`), F = useMemo(() => {
41832
+ ]), [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 = (O = f == null ? void 0 : f.componentProps) == null ? void 0 : O.fieldNames, v = (g == null ? void 0 : g.target) && (y == null ? void 0 : y.label) && b(`${g.target}.${y.label}`), F = useMemo(() => {
41826
41833
  var B, w;
41827
41834
  return v != null && v.interface && ((w = (B = S(v.interface)) == null ? void 0 : B.filterable) == null ? void 0 : w.operators[0].value) || "$includes";
41828
41835
  }, [v]), I = useField();
@@ -41884,7 +41891,7 @@ const InternalFileManager = (e) => {
41884
41891
  } else
41885
41892
  f.value = w;
41886
41893
  k.length === 1 && !k[0].value ? o == null || o(null) : o == null || o(k);
41887
- }), O = (B, w, M) => V(void 0, null, function* () {
41894
+ }), N = (B, w, M) => V(void 0, null, function* () {
41888
41895
  var $, k, z;
41889
41896
  if (B) {
41890
41897
  d(!0);
@@ -41927,7 +41934,7 @@ const InternalFileManager = (e) => {
41927
41934
  style: { minWidth: 150 },
41928
41935
  onChange: (z, L) => D(z, L, w),
41929
41936
  options: u ? [] : R(l),
41930
- onDropdownVisibleChange: (z) => O(z, B, w),
41937
+ onDropdownVisibleChange: (z) => N(z, B, w),
41931
41938
  notFoundContent: u ? /* @__PURE__ */ jsx(Spin, { size: "small" }) : null
41932
41939
  },
41933
41940
  `${(k = B.value) == null ? void 0 : k.id}+ ${B.key} + ${y.label}`
@@ -42168,7 +42175,7 @@ const InternalNesterCardCss = css`
42168
42175
  }, InternalPicker = observer$1(
42169
42176
  (e) => {
42170
42177
  var B;
42171
- const N = e, { value: t, multiple: n, openSize: o, onChange: r, quickUpload: i, selectFile: a, shouldMountElement: l } = N, c = Y(N, ["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([]), I = useCollectionRecordData(), R = useMemo(() => t && Object.keys(t).length > 0 ? (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((M) => {
42178
+ const O = e, { value: t, multiple: n, openSize: o, onChange: r, quickUpload: i, selectFile: a, shouldMountElement: l } = O, c = Y(O, ["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([]), I = useCollectionRecordData(), R = useMemo(() => t && Object.keys(t).length > 0 ? (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((M) => {
42172
42179
  const $ = M == null ? void 0 : M[d.label];
42173
42180
  return P(x({}, M), {
42174
42181
  [d.label]: getLabelFormatValue$1(b(S), b($))
@@ -42189,7 +42196,7 @@ const InternalNesterCardCss = css`
42189
42196
  }, D = () => {
42190
42197
  var w;
42191
42198
  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];
42192
- }, O = () => {
42199
+ }, N = () => {
42193
42200
  const w = (f == null ? void 0 : f.targetKey) || "id", M = R.map((k) => k[w]).filter(Boolean);
42194
42201
  return M.length ? { $and: [{ [`${w}.$ne`]: M }] } : {};
42195
42202
  }, j = () => {
@@ -42258,7 +42265,7 @@ const InternalNesterCardCss = css`
42258
42265
  visible: p,
42259
42266
  setVisible: m
42260
42267
  },
42261
- 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: O() }, children: /* @__PURE__ */ jsx(
42268
+ 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(
42262
42269
  SchemaComponentOptions,
42263
42270
  {
42264
42271
  scope: {
@@ -42302,44 +42309,45 @@ const RenderRecord = React.memo(
42302
42309
  ellipsisWithTooltipRef: m,
42303
42310
  value: h,
42304
42311
  setBtnHover: g,
42305
- onClick: f
42312
+ onClick: f,
42313
+ ellipsis: C
42306
42314
  }) => {
42307
- const [C, b] = useState(!0), [S, y] = useState([]), v = useRef(!1), F = useRef(u);
42308
- F.current = u;
42309
- const I = useCallback(() => F.current, []);
42315
+ const [b, S] = useState(!0), [y, v] = useState([]), F = useRef(!1), I = useRef(u);
42316
+ I.current = u;
42317
+ const R = useCallback(() => I.current, []);
42310
42318
  return useEffect(() => {
42311
- const R = toArr$3(h).map((T, D, O) => {
42312
- const j = T == null ? void 0 : T[(e == null ? void 0 : e.label) || "label"], N = t ? transformNestedData(T).map(($) => $ == null ? void 0 : $[(e == null ? void 0 : e.label) || "label"]).join(" / ") : isObject(j) ? JSON.stringify(j) : j, B = toValue$4(n(N), "N/A"), w = o(
42313
- (T == null ? void 0 : T.__collection) || (r == null ? void 0 : r.target),
42319
+ const T = toArr$3(h).map((D, N, j) => {
42320
+ const O = D == null ? void 0 : D[(e == null ? void 0 : e.label) || "label"], B = t ? transformNestedData(D).map((k) => k == null ? void 0 : k[(e == null ? void 0 : e.label) || "label"]).join(" / ") : isObject(O) ? JSON.stringify(O) : O, w = toValue$4(n(B), "N/A"), M = o(
42321
+ (D == null ? void 0 : D.__collection) || (r == null ? void 0 : r.target),
42314
42322
  (e == null ? void 0 : e.label) || "label"
42315
- ), M = getLabelFormatValue$1(n(w), B, !0);
42323
+ ), $ = getLabelFormatValue$1(n(M), w, !0);
42316
42324
  return /* @__PURE__ */ jsxs(Fragment, { children: [
42317
- /* @__PURE__ */ jsx("span", { children: i ? M : a !== !1 ? /* @__PURE__ */ jsx(
42325
+ /* @__PURE__ */ jsx("span", { children: i ? $ : a !== !1 ? /* @__PURE__ */ jsx(
42318
42326
  "a",
42319
42327
  {
42320
42328
  onMouseEnter: () => {
42321
42329
  g(!0);
42322
42330
  },
42323
- onClick: ($) => {
42324
- var k;
42325
- g(!0), $.stopPropagation(), $.preventDefault(), l && !u.properties && (c(schema$1.Viewer), v.current = !0), v.current ? (setTimeout(() => {
42326
- f == null || f({ recordData: T }), d({
42327
- recordData: T,
42331
+ onClick: (k) => {
42332
+ var z;
42333
+ g(!0), k.stopPropagation(), k.preventDefault(), l && !u.properties && (c(schema$1.Viewer), F.current = !0), F.current ? (setTimeout(() => {
42334
+ f == null || f({ recordData: D }), d({
42335
+ recordData: D,
42328
42336
  parentRecordData: p,
42329
- customActionSchema: I()
42337
+ customActionSchema: R()
42330
42338
  });
42331
- }), v.current = !1) : u.properties && (f == null || f({ recordData: T }), d({
42332
- recordData: T,
42339
+ }), F.current = !1) : u.properties && (f == null || f({ recordData: D }), d({
42340
+ recordData: D,
42333
42341
  parentRecordData: p
42334
- })), (k = m == null ? void 0 : m.current) == null || k.setPopoverVisible(!1);
42342
+ })), (z = m == null ? void 0 : m.current) == null || z.setPopoverVisible(!1);
42335
42343
  },
42336
- children: M
42344
+ children: $
42337
42345
  }
42338
- ) : M }),
42339
- D < O.length - 1 ? /* @__PURE__ */ jsx("span", { style: { marginRight: 4, color: "#aaa" }, children: "," }) : null
42340
- ] }, `${T == null ? void 0 : T.id}_${D}`);
42346
+ ) : $ }),
42347
+ N < j.length - 1 ? /* @__PURE__ */ jsx("span", { style: { marginRight: 4, color: "#aaa" }, children: "," }) : null
42348
+ ] }, `${D == null ? void 0 : D.id}_${N}`);
42341
42349
  });
42342
- y(R), b(!1);
42350
+ v(T), S(!1);
42343
42351
  }, [
42344
42352
  r == null ? void 0 : r.target,
42345
42353
  n,
@@ -42356,12 +42364,13 @@ const RenderRecord = React.memo(
42356
42364
  g,
42357
42365
  i,
42358
42366
  h,
42359
- I
42360
- ]), C ? null : /* @__PURE__ */ jsx(Fragment$1, { children: S });
42367
+ R
42368
+ ]), b ? null : /* @__PURE__ */ jsx("span", { style: C ? null : { whiteSpace: "normal" }, children: y });
42361
42369
  }
42362
42370
  );
42363
42371
  RenderRecord.displayName = "RenderRecord";
42364
42372
  const ButtonLinkList = observer$1((e) => {
42373
+ var C;
42365
42374
  const t = useFieldSchema(), n = useCollectionManager(), { enableLink: o } = t["x-component-props"] || {}, r = useFieldNames$1({ fieldNames: e.fieldNames }), i = useInsertSchema$1("Viewer"), { options: a } = useAssociationFieldContext(), l = useCompile(), { designable: c } = useDesignable(), { snapshot: u } = useActionContext(), d = n.getCollection(a == null ? void 0 : a.target), p = (d == null ? void 0 : d.template) === "tree", m = useRef(), h = useLabelUiSchemaV2(), { openPopup: g } = usePopupUtils(), f = useCollectionRecordData();
42366
42375
  return /* @__PURE__ */ jsx(
42367
42376
  RenderRecord,
@@ -42381,7 +42390,8 @@ const ButtonLinkList = observer$1((e) => {
42381
42390
  ellipsisWithTooltipRef: m,
42382
42391
  value: e.value,
42383
42392
  setBtnHover: e.setBtnHover,
42384
- onClick: e.onClick
42393
+ onClick: e.onClick,
42394
+ ellipsis: (C = e.ellipsis) != null ? C : !0
42385
42395
  }
42386
42396
  );
42387
42397
  });
@@ -42390,13 +42400,23 @@ const getSourceData = (e, t) => {
42390
42400
  const n = t.name.split(".").filter((o, r, i) => r < i.length - 1).join(".");
42391
42401
  return n ? _.get(e, n) : e;
42392
42402
  }, ReadPrettyInternalViewer = (e) => {
42393
- const { value: t, ButtonList: n = ButtonLinkList } = e, o = useFieldSchema(), { enableLink: r, openMode: i, openSize: a } = o["x-component-props"] || {}, l = useField(), [c, u] = useState(!1), { options: d } = useAssociationFieldContext(), { visibleWithURL: p, setVisibleWithURL: m } = usePopupUtils(), [h, g] = useState(!!p), { defaultOpenMode: f } = useOpenModeContext(), C = useCollectionRecordData(), [b, S] = useState(null), { isPopupVisibleControlledByURL: y } = usePopupSettings(), v = useCallback((T) => {
42394
- S(T.recordData);
42395
- }, []), F = /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: /* @__PURE__ */ jsx(CollectionRecordProvider, { isNew: !1, record: getSourceData(C, o), children: /* @__PURE__ */ jsx(n, { setBtnHover: g, value: t, fieldNames: e.fieldNames, onClick: v }) }) }), I = useMemo(
42403
+ var T, D;
42404
+ const { value: t, ButtonList: n = ButtonLinkList } = e, o = useFieldSchema(), { enableLink: r, openMode: i, openSize: a } = o["x-component-props"] || {}, l = useField(), [c, u] = useState(!1), { options: d } = useAssociationFieldContext(), { visibleWithURL: p, setVisibleWithURL: m } = usePopupUtils(), [h, g] = useState(!!p), { defaultOpenMode: f } = useOpenModeContext(), C = useCollectionRecordData(), [b, S] = useState(null), { isPopupVisibleControlledByURL: y } = usePopupSettings(), v = useCallback((N) => {
42405
+ S(N.recordData);
42406
+ }, []), F = /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: (T = e.ellipsis) != null ? T : !0, children: /* @__PURE__ */ jsx(CollectionRecordProvider, { isNew: !1, record: getSourceData(C, o), children: /* @__PURE__ */ jsx(
42407
+ n,
42408
+ {
42409
+ setBtnHover: g,
42410
+ value: t,
42411
+ fieldNames: e.fieldNames,
42412
+ onClick: v,
42413
+ ellipsis: (D = e.ellipsis) != null ? D : !0
42414
+ }
42415
+ ) }) }), I = useMemo(
42396
42416
  () => ({
42397
42417
  visible: c || p,
42398
- setVisible: (T) => {
42399
- u == null || u(T), m == null || m(T);
42418
+ setVisible: (N) => {
42419
+ u == null || u(N), m == null || m(N);
42400
42420
  },
42401
42421
  openMode: i || f,
42402
42422
  snapshot: (d == null ? void 0 : d.interface) === "snapshot",
@@ -42415,7 +42435,7 @@ const getSourceData = (e, t) => {
42415
42435
  schema: o,
42416
42436
  onlyRenderProperties: !0,
42417
42437
  basePath: l.address,
42418
- filterProperties: (T) => T["x-component"] !== "Action"
42438
+ filterProperties: (N) => N["x-component"] !== "Action"
42419
42439
  }
42420
42440
  ) }) })
42421
42441
  ) : /* @__PURE__ */ jsx(CollectionRecordProvider, { isNew: !1, record: b, parentRecord: C, children: /* @__PURE__ */ jsx(VariablePopupRecordProvider, { children: /* @__PURE__ */ jsx(WithoutTableFieldResource.Provider, { value: !0, children: /* @__PURE__ */ jsx(NocoBaseRecursionField, { schema: o, onlyRenderProperties: !0, basePath: l.address }) }) }) }))
@@ -42769,10 +42789,10 @@ const CreateAction = observer$1(
42769
42789
  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 = (T = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : T.linkageFromForm, p = r.componentProps.type === "danger" ? void 0 : r.componentProps.type || "primary", { getChildrenCollections: m } = useCollectionManager_deprecated(), h = m(n.name), g = useMemo(() => c.map((D) => {
42770
42790
  if (!D)
42771
42791
  return;
42772
- const O = h.find((j) => j.name === D.collection);
42773
- if (O)
42774
- return P(x({}, O.getOptions()), {
42775
- title: D.title || O.title
42792
+ const N = h.find((j) => j.name === D.collection);
42793
+ if (N)
42794
+ return P(x({}, N.getOptions()), {
42795
+ title: D.title || N.title
42776
42796
  });
42777
42797
  }).filter((D) => D && l(`${D.name}:create`)), [c, h]), f = (o == null ? void 0 : o["x-linkage-rules"]) || [], C = useRecord(), b = useLocalVariables$1({ currentForm: { values: C } }), S = useCompile(), { designable: y } = useDesignable(), v = e.icon || null, F = useApp(), I = useMemo(() => g.map((D) => ({
42778
42798
  key: D.name,
@@ -42783,8 +42803,8 @@ const CreateAction = observer$1(
42783
42803
  }), [I]);
42784
42804
  return useEffect(() => {
42785
42805
  r.stateOfLinkageRules = {}, f.filter((D) => !D.disabled).forEach((D) => {
42786
- var O;
42787
- (O = D.actions) == null || O.forEach((j) => {
42806
+ var N;
42807
+ (N = D.actions) == null || N.forEach((j) => {
42788
42808
  linkageAction(
42789
42809
  {
42790
42810
  operator: j.operator,
@@ -42993,19 +43013,19 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
42993
43013
  }
42994
43014
  });
42995
43015
  Array.isArray(o.value) || (o.value = []);
42996
- const I = useCallback(({ form: j, fieldSchema: N, collectionField: B, getInterface: w }) => {
43016
+ const I = useCallback(({ form: j, fieldSchema: O, collectionField: B, getInterface: w }) => {
42997
43017
  var M;
42998
- return !B || B.target && ((M = N["x-component-props"]) != null && M.mode) && !["Picker", "Select"].includes(N["x-component-props"].mode) ? !1 : !(j != null && j.readPretty) && !isPatternDisabled(N) && !interfacesOfUnsupportedDefaultValue.includes(B == null ? void 0 : B.interface) && !isSystemField(B, w);
43018
+ return !B || B.target && ((M = O["x-component-props"]) != null && M.mode) && !["Picker", "Select"].includes(O["x-component-props"].mode) ? !1 : !(j != null && j.readPretty) && !isPatternDisabled(O) && !interfacesOfUnsupportedDefaultValue.includes(B == null ? void 0 : B.interface) && !isSystemField(B, w);
42999
43019
  }, []), R = () => {
43000
- const { setVisible: j } = useActionContext(), { selectedRows: N, setSelectedRows: B } = useContext(RecordPickerContext);
43020
+ const { setVisible: j } = useActionContext(), { selectedRows: O, setSelectedRows: B } = useContext(RecordPickerContext);
43001
43021
  return {
43002
43022
  onClick() {
43003
- N.map((w) => o.value.push(markRecordAsNew(w))), o.onInput(o.value), o.initialValue = o.value, B([]), j(!1);
43023
+ O.map((w) => o.value.push(markRecordAsNew(w))), o.onInput(o.value), o.initialValue = o.value, B([]), j(!1);
43004
43024
  }
43005
43025
  };
43006
- }, T = useMemo(() => o.value && Object.keys(o.value).length > 0 ? (Array.isArray(o.value) ? o.value : o.value ? [o.value] : []).filter(Boolean).map((N) => {
43007
- const B = N == null ? void 0 : N[S.label];
43008
- return P(x({}, N), {
43026
+ }, T = useMemo(() => o.value && Object.keys(o.value).length > 0 ? (Array.isArray(o.value) ? o.value : o.value ? [o.value] : []).filter(Boolean).map((O) => {
43027
+ const B = O == null ? void 0 : O[S.label];
43028
+ return P(x({}, O), {
43009
43029
  [S.label]: getLabelFormatValue$1(y(v), y(B))
43010
43030
  });
43011
43031
  }) : [], [o.value, S == null ? void 0 : S.label]), D = {
@@ -43020,9 +43040,9 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
43020
43040
  selectedRows: C,
43021
43041
  setSelectedRows: b,
43022
43042
  collectionField: n
43023
- }, O = () => {
43024
- const j = (n == null ? void 0 : n.targetKey) || "id", N = (o.value || []).map((w) => w == null ? void 0 : w[j]).filter(Boolean);
43025
- return N.length ? { $and: [{ [`${j}.$ne`]: N }] } : {};
43043
+ }, N = () => {
43044
+ const j = (n == null ? void 0 : n.targetKey) || "id", O = (o.value || []).map((w) => w == null ? void 0 : w[j]).filter(Boolean);
43045
+ return O.length ? { $and: [{ [`${j}.$ne`]: O }] } : {};
43026
43046
  };
43027
43047
  return o.value.length > 0 ? /* @__PURE__ */ jsxs(
43028
43048
  Card,
@@ -43036,7 +43056,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
43036
43056
  `,
43037
43057
  children: [
43038
43058
  /* @__PURE__ */ jsxs(RefreshComponentProvider, { refresh: h, children: [
43039
- o.value.map((j, N) => {
43059
+ o.value.map((j, O) => {
43040
43060
  let B = i;
43041
43061
  return i || (B = !(j != null && j[n.targetKey])), /* @__PURE__ */ jsxs(React.Fragment, { children: [
43042
43062
  /* @__PURE__ */ jsx("div", { style: { textAlign: "right" }, children: !o.readPretty && B && /* @__PURE__ */ jsx(Tooltip, { title: c("Remove"), children: /* @__PURE__ */ jsx(
@@ -43045,22 +43065,22 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
43045
43065
  style: { zIndex: 1e3, color: "#a8a3a3" },
43046
43066
  onClick: () => {
43047
43067
  action(() => (spliceArrayState(o, {
43048
- startIndex: N,
43068
+ startIndex: O,
43049
43069
  deleteCount: 1
43050
- }), o.value.splice(N, 1), o.onInput(o.value)));
43070
+ }), o.value.splice(O, 1), o.onInput(o.value)));
43051
43071
  }
43052
43072
  }
43053
43073
  ) }, "remove") }),
43054
- /* @__PURE__ */ jsx(FormActiveFieldsProvider, { name: "nester", children: /* @__PURE__ */ jsx(SubFormProvider, { value: { value: j, collection: d, fieldSchema: t.parent }, children: /* @__PURE__ */ jsx(RecordProvider, { isNew: isNewRecord(j), record: j, parent: u, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: N, children: /* @__PURE__ */ jsx(DefaultValueProvider, { isAllowToSetDefaultValue: I, children: /* @__PURE__ */ jsx(
43074
+ /* @__PURE__ */ jsx(FormActiveFieldsProvider, { name: "nester", children: /* @__PURE__ */ jsx(SubFormProvider, { value: { value: j, collection: d, fieldSchema: t.parent }, children: /* @__PURE__ */ jsx(RecordProvider, { isNew: isNewRecord(j), record: j, parent: u, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: O, children: /* @__PURE__ */ jsx(DefaultValueProvider, { isAllowToSetDefaultValue: I, children: /* @__PURE__ */ jsx(
43055
43075
  NocoBaseRecursionField,
43056
43076
  {
43057
43077
  onlyRenderProperties: !0,
43058
- basePath: o.address.concat(N),
43078
+ basePath: o.address.concat(O),
43059
43079
  schema: t
43060
43080
  }
43061
43081
  ) }) }) }) }) }),
43062
43082
  /* @__PURE__ */ jsx(Divider$1, {})
43063
- ] }, N);
43083
+ ] }, O);
43064
43084
  }),
43065
43085
  /* @__PURE__ */ jsxs(Space$1, { children: [
43066
43086
  o.editable && r && /* @__PURE__ */ jsx(
@@ -43071,8 +43091,8 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
43071
43091
  action(() => {
43072
43092
  Array.isArray(o.value) || (o.value = []);
43073
43093
  const j = o.value.length;
43074
- return o.value.splice(j, 0, markRecordAsNew({})), each(o.form.fields, (N, B) => {
43075
- N || delete o.form.fields[B];
43094
+ return o.value.splice(j, 0, markRecordAsNew({})), each(o.form.fields, (O, B) => {
43095
+ O || delete o.form.fields[B];
43076
43096
  }), o.onInput(o.value);
43077
43097
  });
43078
43098
  }
@@ -43106,7 +43126,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
43106
43126
  visible: g,
43107
43127
  setVisible: f
43108
43128
  },
43109
- children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, D), { children: /* @__PURE__ */ jsx(CollectionProvider, { name: n == null ? void 0 : n.target, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: { filter: O() }, children: /* @__PURE__ */ jsx(
43129
+ children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, D), { children: /* @__PURE__ */ jsx(CollectionProvider, { name: n == null ? void 0 : n.target, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: { filter: N() }, children: /* @__PURE__ */ jsx(
43110
43130
  SchemaComponentOptions,
43111
43131
  {
43112
43132
  scope: {
@@ -43153,7 +43173,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
43153
43173
  S.current = t;
43154
43174
  const y = useCallback(() => S.current, []);
43155
43175
  return /* @__PURE__ */ jsx(Fragment$1, { children: toArr$3(e.value).map((F, I, R) => {
43156
- const T = F == null ? void 0 : F[(r == null ? void 0 : r.label) || "label"], D = g ? transformNestedData(F).map((N) => N == null ? void 0 : N[(r == null ? void 0 : r.label) || "label"]).join(" / ") : isObject(T) ? JSON.stringify(T) : T, O = toValue$3(l(D), "N/A"), j = getTabFormatValue(l(u), O, F[o]);
43176
+ const T = F == null ? void 0 : F[(r == null ? void 0 : r.label) || "label"], D = g ? transformNestedData(F).map((O) => O == null ? void 0 : O[(r == null ? void 0 : r.label) || "label"]).join(" / ") : isObject(T) ? JSON.stringify(T) : T, N = toValue$3(l(D), "N/A"), j = getTabFormatValue(l(u), N, F[o]);
43157
43177
  return /* @__PURE__ */ jsxs(Fragment, { children: [
43158
43178
  /* @__PURE__ */ jsx("span", { children: d ? j : n !== !1 ? /* @__PURE__ */ jsx(
43159
43179
  "a",
@@ -43161,9 +43181,9 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
43161
43181
  onMouseEnter: () => {
43162
43182
  e.setBtnHover(!0);
43163
43183
  },
43164
- onClick: (N) => {
43184
+ onClick: (O) => {
43165
43185
  var B;
43166
- e.setBtnHover(!0), N.stopPropagation(), N.preventDefault(), c && !t.properties && (i(schema$1.Viewer), b.current = !0), b.current ? setTimeout(() => {
43186
+ e.setBtnHover(!0), O.stopPropagation(), O.preventDefault(), c && !t.properties && (i(schema$1.Viewer), b.current = !0), b.current ? setTimeout(() => {
43167
43187
  f({
43168
43188
  recordData: F,
43169
43189
  parentRecordData: C,
@@ -43240,9 +43260,9 @@ const useColumnsDeepMemoized = (e) => {
43240
43260
  `, [n.paddingContentVerticalLG, n.marginSM]), f = useCollection(), C = useMemo(
43241
43261
  () => d == null ? void 0 : d.map((S) => {
43242
43262
  var I, R, T, D;
43243
- const y = S.reduceProperties((O, j) => {
43263
+ const y = S.reduceProperties((N, j) => {
43244
43264
  if (isCollectionFieldComponent(j))
43245
- return O.concat([j]);
43265
+ return N.concat([j]);
43246
43266
  }, []), v = (y == null ? void 0 : y.length) > 0 ? y[0].name : S.name, F = !!((I = S["x-component-props"]) != null && I.columnHidden);
43247
43267
  return P(x({
43248
43268
  title: /* @__PURE__ */ jsx(TableColumnTitle, { name: S.name, schema: S, onlyRenderSelf: !0, tooltip: (R = S["x-component-props"]) == null ? void 0 : R.tooltip }),
@@ -43252,13 +43272,13 @@ const useColumnsDeepMemoized = (e) => {
43252
43272
  columnHidden: F
43253
43273
  }, S["x-component-props"]), {
43254
43274
  width: F && !a ? 0 : ((D = S["x-component-props"]) == null ? void 0 : D.width) || 100,
43255
- render: (O, j) => {
43275
+ render: (N, j) => {
43256
43276
  var w;
43257
- const N = (w = o.value) == null ? void 0 : w.indexOf(j), B = o.address.concat(j.__index || N);
43258
- return /* @__PURE__ */ jsx(SubFormProvider, { value: { value: j, collection: f, fieldSchema: r.parent }, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: j.__index || N, children: /* @__PURE__ */ jsx(RecordProvider, { isNew: isNewRecord(j), record: j, parent: u, children: /* @__PURE__ */ jsx(ColumnFieldProvider, { schema: S, basePath: B, children: /* @__PURE__ */ jsx("span", { role: "button", className: g, children: /* @__PURE__ */ jsx(RecursionField, { basePath: B, schema: S, onlyRenderProperties: !0 }) }, N) }) }) }) });
43277
+ const O = (w = o.value) == null ? void 0 : w.indexOf(j), B = o.address.concat(j.__index || O);
43278
+ return /* @__PURE__ */ jsx(SubFormProvider, { value: { value: j, collection: f, fieldSchema: r.parent }, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: j.__index || O, children: /* @__PURE__ */ jsx(RecordProvider, { isNew: isNewRecord(j), record: j, parent: u, children: /* @__PURE__ */ jsx(ColumnFieldProvider, { schema: S, basePath: B, children: /* @__PURE__ */ jsx("span", { role: "button", className: g, children: /* @__PURE__ */ jsx(RecursionField, { basePath: B, schema: S, onlyRenderProperties: !0 }) }, O) }) }) }) });
43259
43279
  },
43260
- onCell: (O, j) => ({
43261
- record: O,
43280
+ onCell: (N, j) => ({
43281
+ record: N,
43262
43282
  schema: S,
43263
43283
  rowIndex: j,
43264
43284
  isSubTable: e.isSubTable,
@@ -43380,7 +43400,7 @@ const useColumnsDeepMemoized = (e) => {
43380
43400
  display: none !important;
43381
43401
  }
43382
43402
  `,
43383
- itemRender: (D, O, j) => O === "prev" ? /* @__PURE__ */ jsxs(
43403
+ itemRender: (D, N, j) => N === "prev" ? /* @__PURE__ */ jsxs(
43384
43404
  "div",
43385
43405
  {
43386
43406
  style: { display: "flex" },
@@ -43588,8 +43608,8 @@ const Table$1 = withDynamicSchemaProps(
43588
43608
  "onExpand",
43589
43609
  "loading",
43590
43610
  "onClickRow"
43591
- ]), 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, O = useMemoizedFn(b.onRowDragEnd || (() => {
43592
- })), j = usePaginationProps$2(n, i), N = useTableColumns$1(b, j), [B, w] = useState(() => T ? D : []), [M, $] = useState(((Ce = S == null ? void 0 : S.data) == null ? void 0 : Ce.selectedRowKeys) || []), [k, z] = useState([]), L = (p == null ? void 0 : p.type) !== "none", q = useRef(/* @__PURE__ */ new Map()), E = useMemo(() => css`
43611
+ ]), 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 || (() => {
43612
+ })), j = usePaginationProps$2(n, i), O = useTableColumns$1(b, j), [B, w] = useState(() => T ? D : []), [M, $] = useState(((Ce = S == null ? void 0 : S.data) == null ? void 0 : Ce.selectedRowKeys) || []), [k, z] = useState([]), L = (p == null ? void 0 : p.type) !== "none", q = useRef(/* @__PURE__ */ new Map()), E = useMemo(() => css`
43593
43613
  & > td {
43594
43614
  background-color: ${t.controlItemBgActive} !important;
43595
43615
  }
@@ -43632,10 +43652,10 @@ const Table$1 = withDynamicSchemaProps(
43632
43652
  return;
43633
43653
  }
43634
43654
  const ie = (ve = (ye = (Se = oe.active) == null ? void 0 : Se.data.current) == null ? void 0 : ye.sortable) == null ? void 0 : ve.index, ae = (Ie = (Fe = (Pe = oe.over) == null ? void 0 : Pe.data.current) == null ? void 0 : Fe.sortable) == null ? void 0 : Ie.index, xe = S.value[ie] || oe.active, Te = S.value[ae] || oe.over;
43635
- S.move(ie, ae), O({ from: xe, to: Te });
43655
+ S.move(ie, ae), N({ from: xe, to: Te });
43636
43656
  }, []);
43637
43657
  return /* @__PURE__ */ jsx(DndContext, { onDragEnd: te, children: /* @__PURE__ */ jsx("tbody", x({}, Q)) });
43638
- }, [S, O]);
43658
+ }, [S, N]);
43639
43659
  W.displayName = "BodyWrapperComponent";
43640
43660
  const X = useMemo(() => ({
43641
43661
  header: {
@@ -43753,7 +43773,7 @@ const Table$1 = withDynamicSchemaProps(
43753
43773
  onRow: U,
43754
43774
  rowClassName: fe,
43755
43775
  scroll: ue,
43756
- columns: N,
43776
+ columns: O,
43757
43777
  expandable: he,
43758
43778
  field: S,
43759
43779
  size: v
@@ -43857,17 +43877,17 @@ const Table$1 = withDynamicSchemaProps(
43857
43877
  }, R = () => {
43858
43878
  const z = (o == null ? void 0 : o.targetKey) || "id", L = (n.value || []).map((E) => E == null ? void 0 : E[z]).filter(Boolean);
43859
43879
  return L.length ? { $and: [{ [`${z}.$ne`]: L }] } : {};
43860
- }, [T, D] = useState(1), [O, j] = useState(((M = n.componentProps) == null ? void 0 : M.pageSize) || 10);
43880
+ }, [T, D] = useState(1), [N, j] = useState(((M = n.componentProps) == null ? void 0 : M.pageSize) || 10);
43861
43881
  useEffect(() => {
43862
43882
  var z;
43863
43883
  j((z = n.componentProps) == null ? void 0 : z.pageSize);
43864
43884
  }, [($ = n.componentProps) == null ? void 0 : $.pageSize]);
43865
- const N = useMemo(() => {
43885
+ const O = useMemo(() => {
43866
43886
  var L;
43867
43887
  const z = Math.ceil(((L = n.value) == null ? void 0 : L.length) / 10);
43868
43888
  return {
43869
43889
  current: T > z ? z : T,
43870
- pageSize: O || 10,
43890
+ pageSize: N || 10,
43871
43891
  total: n == null ? void 0 : n.value,
43872
43892
  onChange: (q, E) => {
43873
43893
  D(q), j(E), n.componentProps.pageSize = E, n.onInput(n.value);
@@ -43876,7 +43896,7 @@ const Table$1 = withDynamicSchemaProps(
43876
43896
  pageSizeOptions: ["10", "20", "50", "100"],
43877
43897
  hideOnSinglePage: !1
43878
43898
  };
43879
- }, [(k = n.value) == null ? void 0 : k.length, O, T]), B = () => {
43899
+ }, [(k = n.value) == null ? void 0 : k.length, N, T]), B = () => {
43880
43900
  const { field: z } = useAssociationFieldContext();
43881
43901
  return {
43882
43902
  run() {
@@ -43901,7 +43921,7 @@ const Table$1 = withDynamicSchemaProps(
43901
43921
  showIndex: !0,
43902
43922
  dragSort: !1,
43903
43923
  showDel: n.editable && (b !== !1 || C !== !1 || S !== !1) ? (z) => n.editable ? S !== !1 ? !0 : z == null ? void 0 : z.__isNewRecord__ : !1 : !1,
43904
- pagination: N,
43924
+ pagination: O,
43905
43925
  rowSelection: { type: "none", hideSelectAll: !0 },
43906
43926
  isSubTable: !0,
43907
43927
  locale: {
@@ -44069,11 +44089,11 @@ AssociationSelect.Designer = function e() {
44069
44089
  var M, $, k, z, L, q, E, G, U, H, J;
44070
44090
  const { getCollectionFields: t, getInterface: n, getCollectionJoinField: o, getCollection: r, isTitleField: i } = useCollectionManager_deprecated(), { getField: a } = useCollection_deprecated(), { form: l } = useFormBlockContext(), c = useField(), u = useFieldSchema(), { t: d } = useTranslation(), p = useFilterByTk(), { dn: m, refresh: h, insertAdjacent: g } = useDesignable(), f = useCompile(), C = useIsShowMultipleSwitch(), { isAllowToSetDefaultValue: b } = useIsAllowToSetDefaultValue(), S = a(u.name) || o(u["x-collection-field"]), y = useFieldComponentOptions(), v = c.address.segments.includes("__form_grid"), F = n(S == null ? void 0 : S.interface), I = (M = F == null ? void 0 : F.validateSchema) == null ? void 0 : M.call(F, u), R = ($ = S == null ? void 0 : S.uiSchema) == null ? void 0 : $.title, T = S != null && S.target ? t(S == null ? void 0 : S.target) : [];
44071
44091
  c.title === R || c.title;
44072
- const D = useSortFields(S == null ? void 0 : S.target), O = ((L = (z = (k = c.componentProps) == null ? void 0 : k.service) == null ? void 0 : z.params) == null ? void 0 : L.sort) || [];
44092
+ const D = useSortFields(S == null ? void 0 : S.target), N = ((L = (z = (k = c.componentProps) == null ? void 0 : k.service) == null ? void 0 : z.params) == null ? void 0 : L.sort) || [];
44073
44093
  useEffect(() => {
44074
44094
  c.readPretty !== u["x-read-pretty"] && (c.readPretty = !!u["x-read-pretty"]);
44075
44095
  }, [u["x-read-pretty"]]);
44076
- const j = O == null ? void 0 : O.map((K) => K.startsWith("-") ? {
44096
+ const j = N == null ? void 0 : N.map((K) => K.startsWith("-") ? {
44077
44097
  field: K.substring(1),
44078
44098
  direction: "desc"
44079
44099
  } : {
@@ -44081,7 +44101,7 @@ AssociationSelect.Designer = function e() {
44081
44101
  direction: "asc"
44082
44102
  });
44083
44103
  c.readPretty || c.required;
44084
- const N = T.filter((K) => i(K)).map((K) => {
44104
+ const O = T.filter((K) => i(K)).map((K) => {
44085
44105
  var W;
44086
44106
  return {
44087
44107
  value: K == null ? void 0 : K.name,
@@ -44432,7 +44452,7 @@ AssociationSelect.Designer = function e() {
44432
44452
  SchemaSettingsSelectItem,
44433
44453
  {
44434
44454
  title: d("Title field"),
44435
- options: N,
44455
+ options: O,
44436
44456
  value: (J = (H = c == null ? void 0 : c.componentProps) == null ? void 0 : H.fieldNames) == null ? void 0 : J.label,
44437
44457
  onChange: (K) => {
44438
44458
  var ee, Z;
@@ -44465,7 +44485,7 @@ AssociationSelect.Designer = function e() {
44465
44485
  ] });
44466
44486
  };
44467
44487
  AssociationSelect.FilterDesigner = function e() {
44468
- var F, I, R, T, D, O, j, N, B, w, M;
44488
+ var F, I, R, T, D, N, j, O, B, w, M;
44469
44489
  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 = (I = m == null ? void 0 : m.uiSchema) == null ? void 0 : I.title, C = m != null && m.target ? t(m == null ? void 0 : m.target) : [];
44470
44490
  a.title === f || a.title;
44471
44491
  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(($) => $.startsWith("-") ? {
@@ -44589,7 +44609,7 @@ AssociationSelect.FilterDesigner = function e() {
44589
44609
  }
44590
44610
  }
44591
44611
  ),
44592
- i && !(i != null && i.readPretty) && ((O = m == null ? void 0 : m.uiSchema) == null ? void 0 : O.type) && /* @__PURE__ */ jsx(
44612
+ i && !(i != null && i.readPretty) && ((N = m == null ? void 0 : m.uiSchema) == null ? void 0 : N.type) && /* @__PURE__ */ jsx(
44593
44613
  SchemaSettingsModalItem,
44594
44614
  {
44595
44615
  title: c("Set default value"),
@@ -44620,7 +44640,7 @@ AssociationSelect.FilterDesigner = function e() {
44620
44640
  SchemaSettingsDataScope,
44621
44641
  {
44622
44642
  collectionName: m == null ? void 0 : m.target,
44623
- defaultFilter: ((B = (N = (j = a.componentProps) == null ? void 0 : j.service) == null ? void 0 : N.params) == null ? void 0 : B.filter) || {},
44643
+ defaultFilter: ((B = (O = (j = a.componentProps) == null ? void 0 : j.service) == null ? void 0 : O.params) == null ? void 0 : B.filter) || {},
44624
44644
  form: i,
44625
44645
  onSubmit: ({ filter: $ }) => {
44626
44646
  $ = removeNullCondition($), _.set(a.componentProps, "service.params.filter", $), l["x-component-props"] = a.componentProps, u.emit("patch", {
@@ -46294,8 +46314,8 @@ const InternalListBlockProvider = (e) => {
46294
46314
  return e - u - n.paddingLG - l;
46295
46315
  }, InternalList = withSkeletonComponent(
46296
46316
  (e) => {
46297
- var N, B, w;
46298
- const { service: t } = useListBlockContext(), { run: n, params: o } = t, r = useFieldSchema(), i = useDesigner(), a = (N = t == null ? void 0 : t.data) == null ? void 0 : N.meta, { pageSize: l, count: c, hasNext: u, page: d } = a || {}, p = useField(), [m] = useState(/* @__PURE__ */ new Map()), { wrapSSR: h, componentCls: g, hashId: f } = useStyles$3(), C = useListBlockHeight(), { token: b } = theme.useToken(), S = useCallback(
46317
+ var O, B, w;
46318
+ const { service: t } = useListBlockContext(), { run: n, params: o } = t, r = useFieldSchema(), i = useDesigner(), a = (O = t == null ? void 0 : t.data) == null ? void 0 : O.meta, { pageSize: l, count: c, hasNext: u, page: d } = a || {}, p = useField(), [m] = useState(/* @__PURE__ */ new Map()), { wrapSSR: h, componentCls: g, hashId: f } = useStyles$3(), C = useListBlockHeight(), { token: b } = theme.useToken(), S = useCallback(
46299
46319
  (M) => (m.has(M) || m.set(
46300
46320
  M,
46301
46321
  new Schema({
@@ -46837,16 +46857,16 @@ const toValue$1 = (e, t) => e == null ? t : e, ReadPrettyRecordPicker = observer
46837
46857
  if (isShowFilePicker(h))
46838
46858
  return u ? /* @__PURE__ */ jsx(Preview, x({}, e)) : null;
46839
46859
  const b = () => toArr$3(e.value).map((I, R, T) => {
46840
- const D = toValue$1(m(I == null ? void 0 : I[(i == null ? void 0 : i.label) || "label"]), "N/A"), O = getLabelFormatValue(h, D, !0);
46860
+ const D = toValue$1(m(I == null ? void 0 : I[(i == null ? void 0 : i.label) || "label"]), "N/A"), N = getLabelFormatValue(h, D, !0);
46841
46861
  return /* @__PURE__ */ jsxs(Fragment, { children: [
46842
- /* @__PURE__ */ jsx("span", { className: "test-record-picker-read-pretty-item", children: g || f ? O : /* @__PURE__ */ jsx(
46862
+ /* @__PURE__ */ jsx("span", { className: "test-record-picker-read-pretty-item", children: g || f ? N : /* @__PURE__ */ jsx(
46843
46863
  "a",
46844
46864
  {
46845
46865
  onClick: (j) => {
46846
- var N;
46847
- j.stopPropagation(), j.preventDefault(), l(!0), p(I), (N = C == null ? void 0 : C.current) == null || N.setPopoverVisible(!1);
46866
+ var O;
46867
+ j.stopPropagation(), j.preventDefault(), l(!0), p(I), (O = C == null ? void 0 : C.current) == null || O.setPopoverVisible(!1);
46848
46868
  },
46849
- children: O
46869
+ children: N
46850
46870
  }
46851
46871
  ) }),
46852
46872
  R < T.length - 1 ? /* @__PURE__ */ jsx("span", { style: { marginRight: 4, color: "#aaa" }, children: "," }) : null
@@ -47676,8 +47696,8 @@ const useStyles$2 = genStyleHook("nb-rich-text", (e) => {
47676
47696
  "aria-label": `checkbox-${y.name}`
47677
47697
  }),
47678
47698
  renderCell: (y, v, F, I) => {
47679
- var D, O;
47680
- const R = (D = e == null ? void 0 : e.pagination) == null ? void 0 : D.current, T = ((O = e == null ? void 0 : e.pagination) == null ? void 0 : O.pageSize) || 20;
47699
+ var D, N;
47700
+ 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;
47681
47701
  return R && (F = F + (R - 1) * T), /* @__PURE__ */ jsxs(
47682
47702
  "div",
47683
47703
  {
@@ -48262,8 +48282,8 @@ const TableActionColumnDesigner = (e) => {
48262
48282
  "sort-field"
48263
48283
  );
48264
48284
  }, TableBlockDesigner = () => {
48265
- var T, D, O, j, N, B, w, M, $, k, z;
48266
- 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 = ((O = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : O.resource) || ((j = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : j.association), g = !((N = i == null ? void 0 : i["x-decorator-props"]) != null && N.disableTemplate), f = m == null ? void 0 : m.map((L) => L != null && L.startsWith("-") ? {
48285
+ var T, D, N, j, O, B, w, M, $, k, z;
48286
+ 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) || ((j = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : j.association), g = !((O = i == null ? void 0 : i["x-decorator-props"]) != null && O.disableTemplate), f = m == null ? void 0 : m.map((L) => L != null && L.startsWith("-") ? {
48267
48287
  field: L.substring(1),
48268
48288
  direction: "desc"
48269
48289
  } : {
@@ -48508,7 +48528,7 @@ TableField.ActionBar = observer$1(
48508
48528
  { displayName: "TableField.ActionBar" }
48509
48529
  );
48510
48530
  const TableSelectorDesigner = () => {
48511
- var R, T, D, O, j, N;
48531
+ var R, T, D, N, j, O;
48512
48532
  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("-") ? {
48513
48533
  field: B.substring(1),
48514
48534
  direction: "desc"
@@ -48520,7 +48540,7 @@ const TableSelectorDesigner = () => {
48520
48540
  /* @__PURE__ */ jsx(
48521
48541
  SchemaSettingsDataScope,
48522
48542
  {
48523
- defaultFilter: ((O = (D = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : D.params) == null ? void 0 : O.filter) || {},
48543
+ defaultFilter: ((N = (D = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : D.params) == null ? void 0 : N.filter) || {},
48524
48544
  form: a,
48525
48545
  onSubmit: ({ filter: B }) => {
48526
48546
  var $;
@@ -48666,7 +48686,7 @@ const TableSelectorDesigner = () => {
48666
48686
  SchemaSettingsSelectItem,
48667
48687
  {
48668
48688
  title: d("Records per page"),
48669
- value: ((N = (j = r.decoratorProps) == null ? void 0 : j.params) == null ? void 0 : N.pageSize) || 20,
48689
+ value: ((O = (j = r.decoratorProps) == null ? void 0 : j.params) == null ? void 0 : O.pageSize) || 20,
48670
48690
  options: [
48671
48691
  { label: "5", value: 5 },
48672
48692
  { label: "10", value: 10 },
@@ -50130,14 +50150,14 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
50130
50150
  const F = ["belongsTo"].includes(u) ? l : ["belongsToMany"].includes(u) ? d : c, I = (R = r(F)) == null ? void 0 : R.fields;
50131
50151
  if (I) {
50132
50152
  const T = I == null ? void 0 : I.filter((D) => supportTypes.includes(D.type)).map((D) => {
50133
- var O;
50153
+ var N;
50134
50154
  return {
50135
50155
  value: D.name,
50136
- label: g(((O = D.uiSchema) == null ? void 0 : O.title) || D.name)
50156
+ label: g(((N = D.uiSchema) == null ? void 0 : N.title) || D.name)
50137
50157
  };
50138
50158
  });
50139
50159
  if (o(T), y(T), h) {
50140
- const D = T.find((O) => O.value === h);
50160
+ const D = T.find((N) => N.value === h);
50141
50161
  b((D == null ? void 0 : D.label) || h);
50142
50162
  }
50143
50163
  }
@@ -50149,16 +50169,16 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
50149
50169
  options: n,
50150
50170
  showSearch: !0,
50151
50171
  onDropdownVisibleChange: (F) => V(void 0, null, function* () {
50152
- var O;
50172
+ var N;
50153
50173
  const { target: I, type: R, through: T } = f.values, D = ["belongsTo"].includes(R) ? l || p : ["belongsToMany"].includes(R) ? T : I;
50154
50174
  if (D && F) {
50155
- const j = ((O = r(D)) == null ? void 0 : O.fields) || [];
50175
+ const j = ((N = r(D)) == null ? void 0 : N.fields) || [];
50156
50176
  o(
50157
- j == null ? void 0 : j.filter((N) => supportTypes.includes(N.type)).map((N) => {
50177
+ j == null ? void 0 : j.filter((O) => supportTypes.includes(O.type)).map((O) => {
50158
50178
  var B;
50159
50179
  return {
50160
- value: N.name,
50161
- label: g(((B = N.uiSchema) == null ? void 0 : B.title) || N.name)
50180
+ value: O.name,
50181
+ label: g(((B = O.uiSchema) == null ? void 0 : B.title) || O.name)
50162
50182
  };
50163
50183
  })
50164
50184
  );
@@ -50347,8 +50367,8 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
50347
50367
  const t = useRecord();
50348
50368
  return /* @__PURE__ */ jsx(AddFieldAction, x({ item: t }, e));
50349
50369
  }, AddFieldAction = (e) => {
50350
- var N, B;
50351
- 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(), I = ((B = (N = p(o.name)) == null ? void 0 : N.options) == null ? void 0 : B.fields) || o.fields || [], R = useMemo(() => d.map((w) => ({
50370
+ var O, B;
50371
+ 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(), I = ((B = (O = p(o.name)) == null ? void 0 : O.options) == null ? void 0 : B.fields) || o.fields || [], R = useMemo(() => d.map((w) => ({
50352
50372
  label: S(w.title),
50353
50373
  value: w.name
50354
50374
  })), []), T = useCallback(() => {
@@ -50400,7 +50420,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
50400
50420
  }).filter((w) => {
50401
50421
  var M;
50402
50422
  return (M = w == null ? void 0 : w.children) == null ? void 0 : M.length;
50403
- }), [T]), O = useMemo(() => ({
50423
+ }), [T]), N = useMemo(() => ({
50404
50424
  style: {
50405
50425
  maxHeight: "60vh",
50406
50426
  overflow: "auto"
@@ -50420,7 +50440,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
50420
50440
  };
50421
50441
  }), [I == null ? void 0 : I.length]);
50422
50442
  return o.template !== "sql" && /* @__PURE__ */ jsx(RecordProvider, { record: o, children: /* @__PURE__ */ jsxs(ActionContextProvider, { value: { visible: m, setVisible: h }, children: [
50423
- /* @__PURE__ */ jsx(Dropdown, { getPopupContainer: n, trigger: i, align: a, menu: O, children: r || /* @__PURE__ */ jsx(Button, { icon: /* @__PURE__ */ jsx(PlusOutlined, {}), type: "primary", children: y("Add field") }) }),
50443
+ /* @__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") }) }),
50424
50444
  /* @__PURE__ */ jsx(
50425
50445
  SchemaComponent,
50426
50446
  {
@@ -50546,16 +50566,16 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
50546
50566
  "a",
50547
50567
  P(x({}, a), {
50548
50568
  onClick: () => V(void 0, null, function* () {
50549
- var j, N;
50569
+ var j, O;
50550
50570
  const { data: R } = yield g.resource("collections.fields", o.collectionName).get({
50551
50571
  filterByTk: o.name,
50552
50572
  appends: ["reverseField"]
50553
50573
  });
50554
50574
  S(R == null ? void 0 : R.data);
50555
50575
  const T = l(o.interface), D = cloneDeep(R == null ? void 0 : R.data) || {};
50556
- D != null && D.reverseField || (D.autoCreateReverseField = !1, D.reverseField = (j = T == null ? void 0 : T.default) == null ? void 0 : j.reverseField, set$1(D.reverseField, "name", `f_${uid()}`), set$1(D.reverseField, "uiSchema.title", (N = o.__parent) == null ? void 0 : N.title));
50557
- const O = getSchema$7(T, D, o, C);
50558
- h(O), p(!0);
50576
+ D != null && D.reverseField || (D.autoCreateReverseField = !1, D.reverseField = (j = T == null ? void 0 : T.default) == null ? void 0 : j.reverseField, set$1(D.reverseField, "name", `f_${uid()}`), set$1(D.reverseField, "uiSchema.title", (O = o.__parent) == null ? void 0 : O.title));
50577
+ const N = getSchema$7(T, D, o, C);
50578
+ h(N), p(!0);
50559
50579
  }),
50560
50580
  children: i || f("Edit")
50561
50581
  })
@@ -50650,7 +50670,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
50650
50670
  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) => {
50651
50671
  var M;
50652
50672
  return B && ((M = m(B)) == null ? void 0 : M.map(($) => $.name).concat([B]));
50653
- }, [I, R] = useState({}), T = p(a), D = getIsOverriding(a, T, o), O = useMemo(() => h.map((B) => ({
50673
+ }, [I, R] = useState({}), T = p(a), D = getIsOverriding(a, T, o), N = useMemo(() => h.map((B) => ({
50654
50674
  label: v(B.title),
50655
50675
  value: B.name
50656
50676
  })), []), j = () => {
@@ -50677,7 +50697,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
50677
50697
  });
50678
50698
  }
50679
50699
  };
50680
- }, N = useMemo(() => {
50700
+ }, O = useMemo(() => {
50681
50701
  var B;
50682
50702
  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) => {
50683
50703
  var M;
@@ -50729,8 +50749,8 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
50729
50749
  override: !0,
50730
50750
  isOverride: !0,
50731
50751
  targetScope: { target: F(l), through: F(c) },
50732
- collections: O,
50733
- scopeKeyOptions: N
50752
+ collections: N,
50753
+ scopeKeyOptions: O
50734
50754
  }, t)
50735
50755
  }
50736
50756
  )
@@ -51217,7 +51237,7 @@ const getSchema$4 = (e, t, n) => {
51217
51237
  }
51218
51238
  }).catch);
51219
51239
  }, [t]);
51220
- const N = (w, M) => {
51240
+ const O = (w, M) => {
51221
51241
  d.splice(M, 1, w), p(d), S.value = d.map(($) => {
51222
51242
  var z, L, q;
51223
51243
  const k = typeof $.source == "string" ? $.source : (q = (L = (z = $.source) == null ? void 0 : z.filter) == null ? void 0 : L.call(z, Boolean)) == null ? void 0 : q.join(".");
@@ -51247,7 +51267,7 @@ const getSchema$4 = (e, t, n) => {
51247
51267
  onChange: (k, z) => {
51248
51268
  var q;
51249
51269
  const L = (q = I(k == null ? void 0 : k[0])) == null ? void 0 : q.find((E) => E.name === last(k));
51250
- N(P(x({}, M), { source: k, uiSchema: L == null ? void 0 : L.uiSchema }), $);
51270
+ O(P(x({}, M), { source: k, uiSchema: L == null ? void 0 : L.uiSchema }), $);
51251
51271
  },
51252
51272
  placeholder: l("Select field source")
51253
51273
  }
@@ -51267,7 +51287,7 @@ const getSchema$4 = (e, t, n) => {
51267
51287
  popupMatchSelectWidth: !1,
51268
51288
  style: { width: "100%" },
51269
51289
  options: (k == null ? void 0 : k.possibleTypes.map((z) => ({ label: z, value: z }))) || [],
51270
- onChange: (z) => N(P(x({}, k), { type: z }), $)
51290
+ onChange: (z) => O(P(x({}, k), { type: z }), $)
51271
51291
  }
51272
51292
  );
51273
51293
  }
@@ -51288,7 +51308,7 @@ const getSchema$4 = (e, t, n) => {
51288
51308
  onChange: (L) => {
51289
51309
  var E;
51290
51310
  const q = F(L);
51291
- N(P(x({}, k), { interface: L, uiSchema: (E = q == null ? void 0 : q.default) == null ? void 0 : E.uiSchema }), $);
51311
+ O(P(x({}, k), { interface: L, uiSchema: (E = q == null ? void 0 : q.default) == null ? void 0 : E.uiSchema }), $);
51292
51312
  },
51293
51313
  children: z.map((L) => /* @__PURE__ */ jsx(Select$1.OptGroup, { label: D(L.label), children: L.children.map((q) => /* @__PURE__ */ jsx(Select$1.Option, { value: q.name, children: D(q.label) }, q.value)) }, L.key))
51294
51314
  }
@@ -51307,7 +51327,7 @@ const getSchema$4 = (e, t, n) => {
51307
51327
  Input$3,
51308
51328
  {
51309
51329
  defaultValue: ((z = k == null ? void 0 : k.uiSchema) == null ? void 0 : z.title) || w,
51310
- onChange: (L) => N(
51330
+ onChange: (L) => O(
51311
51331
  P(x({}, k), { uiSchema: P(x({}, omit(k == null ? void 0 : k.uiSchema, "rawTitle")), { title: L.target.value }) }),
51312
51332
  $
51313
51333
  )
@@ -51362,8 +51382,8 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
51362
51382
  }, S = (y) => {
51363
51383
  var v;
51364
51384
  return (v = y.filter((F) => F.source || F.interface)) == null ? void 0 : v.map((F) => {
51365
- var O, j, N, B, w, M;
51366
- const I = typeof (F == null ? void 0 : F.source) == "string" ? (O = F == null ? void 0 : F.source) == null ? void 0 : O.split(".") : F == null ? void 0 : F.source, R = (N = (j = h(I == null ? void 0 : I[0])) == null ? void 0 : j.find(($) => $.name === (I == null ? void 0 : I[1]))) == null ? void 0 : N.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;
51385
+ var N, j, O, B, w, M;
51386
+ const I = 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 = (O = (j = h(I == null ? void 0 : I[0])) == null ? void 0 : j.find(($) => $.name === (I == null ? void 0 : I[1]))) == null ? void 0 : O.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;
51367
51387
  return {
51368
51388
  title: u(T),
51369
51389
  dataIndex: F.name,
@@ -51602,20 +51622,20 @@ const AsyncDataProvider = (e) => {
51602
51622
  () => h.filter((T) => !["relation"].includes(T.key)).map((T, D) => ({
51603
51623
  key: D,
51604
51624
  label: d(T.label),
51605
- options: T.children.map((O, j) => ({
51606
- value: O.name,
51625
+ options: T.children.map((N, j) => ({
51626
+ value: N.name,
51607
51627
  key: `${D}-${j}`,
51608
- label: d(O.label)
51628
+ label: d(N.label)
51609
51629
  }))
51610
51630
  })),
51611
51631
  [d]
51612
51632
  ), f = useSourceFieldsOptions(), C = useRef(p);
51613
51633
  if (useEffect(() => {
51614
- var O;
51634
+ var N;
51615
51635
  const T = /* @__PURE__ */ new Map();
51616
- i || (a && a.length ? Object.entries((a == null ? void 0 : a[0]) || {}).forEach(([j, N]) => {
51636
+ i || (a && a.length ? Object.entries((a == null ? void 0 : a[0]) || {}).forEach(([j, O]) => {
51617
51637
  var k;
51618
- const B = l[j], w = inferInterface(j, N), M = (k = C.current(w)) == null ? void 0 : k.default, $ = (B == null ? void 0 : B.uiSchema) || (M == null ? void 0 : M.uiSchema) || {};
51638
+ const B = l[j], w = inferInterface(j, O), M = (k = C.current(w)) == null ? void 0 : k.default, $ = (B == null ? void 0 : B.uiSchema) || (M == null ? void 0 : M.uiSchema) || {};
51619
51639
  T.set(j, {
51620
51640
  name: j,
51621
51641
  interface: (B == null ? void 0 : B.interface) || w,
@@ -51626,15 +51646,15 @@ const AsyncDataProvider = (e) => {
51626
51646
  }, $)
51627
51647
  });
51628
51648
  }) : Object.entries(l || {}).forEach(
51629
- ([j, N]) => T.set(j, P(x({
51649
+ ([j, O]) => T.set(j, P(x({
51630
51650
  name: j,
51631
51651
  type: "string"
51632
- }, N), {
51652
+ }, O), {
51633
51653
  uiSchema: x({
51634
51654
  title: j
51635
- }, (N == null ? void 0 : N.uiSchema) || {})
51655
+ }, (O == null ? void 0 : O.uiSchema) || {})
51636
51656
  }))
51637
- )), (O = c.value) != null && O.length && c.value.forEach((j) => {
51657
+ )), (N = c.value) != null && N.length && c.value.forEach((j) => {
51638
51658
  T.has(j.name) && T.set(j.name, j);
51639
51659
  });
51640
51660
  const D = Array.from(T.values());
@@ -51650,12 +51670,12 @@ const AsyncDataProvider = (e) => {
51650
51670
  return /* @__PURE__ */ jsx(Alert, { showIcon: !0, message: `${e("SQL error: ")}${T}`, type: "error" });
51651
51671
  }
51652
51672
  const S = (T, D) => {
51653
- const O = [...t];
51654
- O.splice(D, 1, T), n(O), c.setValue(
51655
- O.map((j) => {
51656
- var N, B, w;
51673
+ const N = [...t];
51674
+ N.splice(D, 1, T), n(N), c.setValue(
51675
+ N.map((j) => {
51676
+ var O, B, w;
51657
51677
  return P(x({}, j), {
51658
- source: typeof j.source == "string" ? j.source : ((w = (B = (N = j.source) == null ? void 0 : N.filter) == null ? void 0 : B.call(N, Boolean)) == null ? void 0 : w.join(".")) || null
51678
+ source: typeof j.source == "string" ? j.source : ((w = (B = (O = j.source) == null ? void 0 : O.filter) == null ? void 0 : B.call(O, Boolean)) == null ? void 0 : w.join(".")) || null
51659
51679
  });
51660
51680
  })
51661
51681
  );
@@ -51671,8 +51691,8 @@ const AsyncDataProvider = (e) => {
51671
51691
  dataIndex: "source",
51672
51692
  key: "source",
51673
51693
  width: 200,
51674
- render: (T, D, O) => {
51675
- const j = t[O];
51694
+ render: (T, D, N) => {
51695
+ const j = t[N];
51676
51696
  return /* @__PURE__ */ jsx(
51677
51697
  Cascader$1,
51678
51698
  {
@@ -51680,16 +51700,16 @@ const AsyncDataProvider = (e) => {
51680
51700
  allowClear: !0,
51681
51701
  options: d(f),
51682
51702
  placeholder: e("Select field source"),
51683
- onChange: (N) => {
51684
- let B = l[N == null ? void 0 : N[1]];
51685
- B != null && B.interface || (B = m((N == null ? void 0 : N.join(".")) || "")), S(
51703
+ onChange: (O) => {
51704
+ let B = l[O == null ? void 0 : O[1]];
51705
+ B != null && B.interface || (B = m((O == null ? void 0 : O.join(".")) || "")), S(
51686
51706
  P(x({}, j), {
51687
- source: N,
51707
+ source: O,
51688
51708
  interface: B == null ? void 0 : B.interface,
51689
51709
  type: B == null ? void 0 : B.type,
51690
51710
  uiSchema: B == null ? void 0 : B.uiSchema
51691
51711
  }),
51692
- O
51712
+ N
51693
51713
  );
51694
51714
  }
51695
51715
  }
@@ -51701,10 +51721,10 @@ const AsyncDataProvider = (e) => {
51701
51721
  dataIndex: "interface",
51702
51722
  key: "interface",
51703
51723
  width: 150,
51704
- render: (T, D, O) => {
51705
- var N;
51706
- const j = t[O];
51707
- return j.source ? /* @__PURE__ */ jsx(Tag, { children: d((N = p(T)) == null ? void 0 : N.title) || T }) : /* @__PURE__ */ jsx(
51724
+ render: (T, D, N) => {
51725
+ var O;
51726
+ const j = t[N];
51727
+ return j.source ? /* @__PURE__ */ jsx(Tag, { children: d((O = p(T)) == null ? void 0 : O.title) || T }) : /* @__PURE__ */ jsx(
51708
51728
  Select$1,
51709
51729
  {
51710
51730
  defaultValue: j.interface || "input",
@@ -51721,7 +51741,7 @@ const AsyncDataProvider = (e) => {
51721
51741
  }),
51722
51742
  type: (L = w == null ? void 0 : w.default) == null ? void 0 : L.type
51723
51743
  }),
51724
- O
51744
+ N
51725
51745
  );
51726
51746
  },
51727
51747
  allowClear: !0,
@@ -51735,15 +51755,15 @@ const AsyncDataProvider = (e) => {
51735
51755
  dataIndex: "title",
51736
51756
  key: "title",
51737
51757
  width: 180,
51738
- render: (T, D, O) => {
51739
- var N, B;
51740
- const j = t[O];
51758
+ render: (T, D, N) => {
51759
+ var O, B;
51760
+ const j = t[N];
51741
51761
  return /* @__PURE__ */ jsx(
51742
51762
  Input$3,
51743
51763
  {
51744
- value: ((N = j.uiSchema) == null ? void 0 : N.title) || T,
51764
+ value: ((O = j.uiSchema) == null ? void 0 : O.title) || T,
51745
51765
  defaultValue: ((B = j.uiSchema) == null ? void 0 : B.title) !== void 0 ? j.uiSchema.title : j == null ? void 0 : j.name,
51746
- onChange: (w) => S(P(x({}, j), { uiSchema: P(x({}, j == null ? void 0 : j.uiSchema), { title: w.target.value }) }), O)
51766
+ onChange: (w) => S(P(x({}, j), { uiSchema: P(x({}, j == null ? void 0 : j.uiSchema), { title: w.target.value }) }), N)
51747
51767
  }
51748
51768
  );
51749
51769
  }
@@ -57732,7 +57752,7 @@ const RolesResourcesActions = connect((e) => {
57732
57752
  const T = p[I.name] || {
57733
57753
  name: I.name
57734
57754
  };
57735
- R ? T.fields = [] : T.fields = (D = l == null ? void 0 : l.map) == null ? void 0 : D.call(l, (O) => O.name), p[I.name] = T, t(Object.values(p));
57755
+ R ? T.fields = [] : T.fields = (D = l == null ? void 0 : l.map) == null ? void 0 : D.call(l, (N) => N.name), p[I.name] = T, t(Object.values(p));
57736
57756
  }
57737
57757
  }
57738
57758
  ),
@@ -57745,15 +57765,15 @@ const RolesResourcesActions = connect((e) => {
57745
57765
  checked: T,
57746
57766
  "aria-label": `${I.name}_checkbox`,
57747
57767
  onChange: () => {
57748
- const O = p[I.name] || {
57768
+ const N = p[I.name] || {
57749
57769
  name: I.name
57750
- }, j = O.fields || [];
57770
+ }, j = N.fields || [];
57751
57771
  if (T) {
57752
- const N = j.indexOf(D.name);
57753
- j.splice(N, 1);
57772
+ const O = j.indexOf(D.name);
57773
+ j.splice(O, 1);
57754
57774
  } else
57755
57775
  j.push(D.name);
57756
- O.fields = j, p[I.name] = O, t(Object.values(p));
57776
+ N.fields = j, p[I.name] = N, t(Object.values(p));
57757
57777
  }
57758
57778
  }
57759
57779
  )
@@ -58508,9 +58528,9 @@ function PluginInfo(e) {
58508
58528
  y.silent().request({
58509
58529
  url: "__health_check",
58510
58530
  method: "get"
58511
- }).then((O) => {
58512
- (O == null ? void 0 : O.data) === "ok" && window.location.reload();
58513
- }).catch((O) => {
58531
+ }).then((N) => {
58532
+ (N == null ? void 0 : N.data) === "ok" && window.location.reload();
58533
+ }).catch((N) => {
58514
58534
  });
58515
58535
  }
58516
58536
  setInterval(D, 1e3);
@@ -59955,48 +59975,6 @@ const ActionInitializerItem = (e) => {
59955
59975
  }
59956
59976
  };
59957
59977
  return /* @__PURE__ */ jsx(ActionInitializer, P(x({}, e), { schema: t }));
59958
- }, RefreshActionInitializer = (e) => {
59959
- const t = {
59960
- title: '{{ t("Refresh") }}',
59961
- "x-action": "refresh",
59962
- "x-component": "Action",
59963
- "x-use-component-props": "useRefreshActionProps",
59964
- "x-toolbar": "ActionSchemaToolbar",
59965
- "x-settings": "actionSettings:refresh",
59966
- "x-component-props": {
59967
- icon: "ReloadOutlined"
59968
- }
59969
- };
59970
- return /* @__PURE__ */ jsx(ActionInitializer, P(x({}, e), { schema: t }));
59971
- }, CreateSubmitActionInitializer = (e) => {
59972
- const t = {
59973
- title: '{{ t("Submit") }}',
59974
- "x-action": "submit",
59975
- "x-component": "Action",
59976
- "x-use-component-props": "useCreateActionProps",
59977
- "x-toolbar": "ActionSchemaToolbar",
59978
- "x-settings": "actionSettings:createSubmit",
59979
- "x-component-props": {
59980
- type: "primary",
59981
- htmlType: "submit"
59982
- }
59983
- };
59984
- return /* @__PURE__ */ jsx(ActionInitializerItem, P(x({}, e), { schema: t }));
59985
- }, UpdateSubmitActionInitializer = (e) => {
59986
- const t = {
59987
- title: '{{ t("Submit") }}',
59988
- "x-action": "submit",
59989
- "x-component": "Action",
59990
- "x-use-component-props": "useUpdateActionProps",
59991
- // 'x-designer': 'Action.Designer',
59992
- "x-toolbar": "ActionSchemaToolbar",
59993
- "x-settings": "actionSettings:updateSubmit",
59994
- "x-component-props": {
59995
- type: "primary",
59996
- htmlType: "submit"
59997
- }
59998
- };
59999
- return /* @__PURE__ */ jsx(ActionInitializerItem, P(x({}, e), { schema: t }));
60000
59978
  }, ActionBarAssociationFilterAction = (e) => {
60001
59979
  const t = useRefreshFieldSchema(), n = useFieldSchema(), o = useAPIClient(), { t: r } = useTranslation(), i = createDesignable({ t: r, api: o, refresh: t, current: n }), { service: a, props: l } = useBlockRequestContext();
60002
59980
  i.loadAPIClientEvents();
@@ -60283,15 +60261,15 @@ const ActionInitializerItem = (e) => {
60283
60261
  ), I = C || (i == null ? void 0 : i.targetKey) || "id", R = b || ((U = (G = a["x-component-props"]) == null ? void 0 : G.fieldNames) == null ? void 0 : U.label) || I, T = {
60284
60262
  title: R || I,
60285
60263
  key: I
60286
- }, [D, O] = useState([]), [j, N] = useState(a.default || []), [B, w] = useState(!0), M = useLabelUiSchema(i, (T == null ? void 0 : T.title) || "label");
60264
+ }, [D, N] = useState([]), [j, O] = useState(a.default || []), [B, w] = useState(!0), M = useLabelUiSchema(i, (T == null ? void 0 : T.title) || "label");
60287
60265
  if (useEffect(() => {
60288
- a.default && (d(a.default), N(a.default));
60266
+ a.default && (d(a.default), O(a.default));
60289
60267
  }, [a.default, d]), !i)
60290
60268
  return null;
60291
60269
  const $ = (K) => {
60292
- O(K), w(!1);
60270
+ N(K), w(!1);
60293
60271
  }, k = (K) => {
60294
- N(K), d(K), p == null || p(K);
60272
+ O(K), d(K), p == null || p(K);
60295
60273
  }, z = (K) => {
60296
60274
  var X;
60297
60275
  const W = (X = h == null ? void 0 : h[0]) == null ? void 0 : X.filter;
@@ -60782,7 +60760,7 @@ const DataBlockInitializer = (e) => {
60782
60760
  onClick: T,
60783
60761
  currentText: b,
60784
60762
  otherText: S
60785
- }), O = useGetSchemaInitializerMenuItems(T), j = useMemo(() => O(D, i), [O, D, i]), [N, B] = useState([]), w = useMenuSearch({ data: j, openKeys: N, hideSearch: u }), M = useMemo(() => {
60763
+ }), N = useGetSchemaInitializerMenuItems(T), j = useMemo(() => N(D, i), [N, D, i]), [O, B] = useState([]), w = useMenuSearch({ data: j, openKeys: O, hideSearch: u }), M = useMemo(() => {
60786
60764
  let z = w.filter((L) => L.key !== "search" && L.key !== "empty");
60787
60765
  return p && z.length === 1 ? z = z[0].children : z = w, [
60788
60766
  {
@@ -61652,7 +61630,61 @@ const items = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
61652
61630
  useCreateAssociationListBlock,
61653
61631
  useCreateAssociationTableBlock,
61654
61632
  useMenuSearch
61655
- }, Symbol.toStringTag, { value: "Module" })), UpdateRecordActionInitializer = (e) => {
61633
+ }, Symbol.toStringTag, { value: "Module" })), LinkActionInitializer = (e) => {
61634
+ const t = {
61635
+ type: "void",
61636
+ title: '{{ t("Link") }}',
61637
+ "x-action": "customize:link",
61638
+ "x-toolbar": "ActionSchemaToolbar",
61639
+ "x-settings": "actionSettings:link",
61640
+ "x-component": (e == null ? void 0 : e["x-component"]) || "Action.Link",
61641
+ "x-use-component-props": "useLinkActionProps",
61642
+ "x-decorator": "ACLActionProvider"
61643
+ }, n = useSchemaInitializerItem();
61644
+ return /* @__PURE__ */ jsx(BlockInitializer, P(x({}, n), { schema: t, item: n }));
61645
+ }, RefreshActionInitializer = (e) => {
61646
+ const t = {
61647
+ title: '{{ t("Refresh") }}',
61648
+ "x-action": "refresh",
61649
+ "x-component": "Action",
61650
+ "x-use-component-props": "useRefreshActionProps",
61651
+ "x-toolbar": "ActionSchemaToolbar",
61652
+ "x-settings": "actionSettings:refresh",
61653
+ "x-component-props": {
61654
+ icon: "ReloadOutlined"
61655
+ }
61656
+ };
61657
+ return /* @__PURE__ */ jsx(ActionInitializer, P(x({}, e), { schema: t }));
61658
+ }, CreateSubmitActionInitializer = (e) => {
61659
+ const t = {
61660
+ title: '{{ t("Submit") }}',
61661
+ "x-action": "submit",
61662
+ "x-component": "Action",
61663
+ "x-use-component-props": "useCreateActionProps",
61664
+ "x-toolbar": "ActionSchemaToolbar",
61665
+ "x-settings": "actionSettings:createSubmit",
61666
+ "x-component-props": {
61667
+ type: "primary",
61668
+ htmlType: "submit"
61669
+ }
61670
+ };
61671
+ return /* @__PURE__ */ jsx(ActionInitializerItem, P(x({}, e), { schema: t }));
61672
+ }, UpdateSubmitActionInitializer = (e) => {
61673
+ const t = {
61674
+ title: '{{ t("Submit") }}',
61675
+ "x-action": "submit",
61676
+ "x-component": "Action",
61677
+ "x-use-component-props": "useUpdateActionProps",
61678
+ // 'x-designer': 'Action.Designer',
61679
+ "x-toolbar": "ActionSchemaToolbar",
61680
+ "x-settings": "actionSettings:updateSubmit",
61681
+ "x-component-props": {
61682
+ type: "primary",
61683
+ htmlType: "submit"
61684
+ }
61685
+ };
61686
+ return /* @__PURE__ */ jsx(ActionInitializerItem, P(x({}, e), { schema: t }));
61687
+ }, UpdateRecordActionInitializer = (e) => {
61656
61688
  const t = {
61657
61689
  title: '{{ t("Update record") }}',
61658
61690
  "x-component": (e == null ? void 0 : e["x-component"]) || "Action.Link",
@@ -61674,7 +61706,7 @@ const items = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
61674
61706
  }
61675
61707
  }, n = useSchemaInitializerItem();
61676
61708
  return /* @__PURE__ */ jsx(BlockInitializer, P(x({}, n), { schema: t, item: n }));
61677
- }, PopupActionInitializer = (e) => {
61709
+ }, PopupActionDecorator = (e) => /* @__PURE__ */ jsx(ClearCollectionFieldContext, { children: /* @__PURE__ */ jsx(ACLActionProvider, { children: e.children }) }), PopupActionInitializer = (e) => {
61678
61710
  const { defaultOpenMode: t } = useOpenModeContext(), { getPopupContext: n } = usePopupUtils(), o = {
61679
61711
  type: "void",
61680
61712
  title: '{{ t("Popup") }}',
@@ -61686,7 +61718,7 @@ const items = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
61686
61718
  openMode: t,
61687
61719
  refreshDataBlockRequest: !0
61688
61720
  },
61689
- "x-decorator": "ACLActionProvider",
61721
+ "x-decorator": "PopupActionDecorator",
61690
61722
  properties: {
61691
61723
  drawer: {
61692
61724
  type: "void",
@@ -61725,18 +61757,121 @@ const items = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
61725
61757
  [CONTEXT_SCHEMA_KEY]: n()
61726
61758
  }, r = useSchemaInitializerItem();
61727
61759
  return /* @__PURE__ */ jsx(BlockInitializer, P(x({}, r), { schema: o, item: r }));
61728
- }, LinkActionInitializer = (e) => {
61729
- const t = {
61760
+ }, AssociateActionInitializer = (e) => {
61761
+ const { defaultOpenMode: t } = useOpenModeContext(), { getPopupContext: n } = usePopupUtils(), o = {
61730
61762
  type: "void",
61731
- title: '{{ t("Link") }}',
61732
- "x-action": "customize:link",
61763
+ title: '{{ t("Associate") }}',
61764
+ "x-action": "associate",
61733
61765
  "x-toolbar": "ActionSchemaToolbar",
61734
- "x-settings": "actionSettings:link",
61735
- "x-component": (e == null ? void 0 : e["x-component"]) || "Action.Link",
61736
- "x-use-component-props": "useLinkActionProps",
61737
- "x-decorator": "ACLActionProvider"
61738
- }, n = useSchemaInitializerItem();
61739
- return /* @__PURE__ */ jsx(BlockInitializer, P(x({}, n), { schema: t, item: n }));
61766
+ "x-settings": "actionSettings:popup",
61767
+ "x-component": "Action",
61768
+ "x-component-props": {
61769
+ openMode: t,
61770
+ refreshDataBlockRequest: !0
61771
+ },
61772
+ properties: {
61773
+ drawer: {
61774
+ type: "void",
61775
+ "x-component": "Action.Container",
61776
+ title: '{{ t("Select record") }}',
61777
+ "x-component-props": {
61778
+ className: "nb-record-picker-selector"
61779
+ },
61780
+ "x-decorator": "AssociateActionProvider",
61781
+ properties: {
61782
+ grid: {
61783
+ type: "void",
61784
+ "x-component": "Grid",
61785
+ "x-initializer": "popup:tableSelector:addBlock",
61786
+ properties: {}
61787
+ },
61788
+ footer: {
61789
+ "x-component": "Action.Container.Footer",
61790
+ "x-component-props": {},
61791
+ properties: {
61792
+ actions: {
61793
+ type: "void",
61794
+ "x-component": "ActionBar",
61795
+ "x-component-props": {},
61796
+ properties: {
61797
+ submit: {
61798
+ title: '{{ t("Submit") }}',
61799
+ "x-action": "submit",
61800
+ "x-component": "Action",
61801
+ "x-use-component-props": "usePickActionProps",
61802
+ "x-toolbar": "ActionSchemaToolbar",
61803
+ "x-settings": "actionSettings:submit",
61804
+ "x-component-props": {
61805
+ type: "primary",
61806
+ htmlType: "submit"
61807
+ }
61808
+ }
61809
+ }
61810
+ }
61811
+ }
61812
+ }
61813
+ }
61814
+ }
61815
+ },
61816
+ [CONTEXT_SCHEMA_KEY]: n()
61817
+ }, r = useSchemaInitializerItem();
61818
+ return /* @__PURE__ */ jsx(BlockInitializer, P(x({}, r), { schema: o, item: r }));
61819
+ }, useTableSelectorProps = () => {
61820
+ const { setSelectedRows: e } = useContext(RecordPickerContext), r = useTableSelectorProps$4(), { onRowSelectionChange: t, rowKey: n = "id" } = r, o = Y(r, ["onRowSelectionChange", "rowKey"]);
61821
+ return P(x({}, o), {
61822
+ rowKey: n,
61823
+ rowSelection: {
61824
+ type: "checkbox"
61825
+ },
61826
+ onRowSelectionChange(i, a) {
61827
+ e == null || e(i), t == null || t(i, a);
61828
+ }
61829
+ });
61830
+ }, AssociateActionProvider = (e) => {
61831
+ const [t, n] = useState([]), o = useCollection(), { resource: r, block: i, __parent: a, service: l } = useBlockRequestContext(), c = useActionContext(), { isMobile: u } = useOpenModeContext() || {}, [d, p] = useState([]), { data: m } = l || {};
61832
+ useEffect(() => {
61833
+ var C;
61834
+ (C = r == null ? void 0 : r.list) == null || C.call(r, {
61835
+ paginate: !1
61836
+ }).then((b) => {
61837
+ var S;
61838
+ p(((S = b.data) == null ? void 0 : S.data) || []);
61839
+ });
61840
+ }, [r, m == null ? void 0 : m.meta.count]);
61841
+ const h = {
61842
+ size: "small",
61843
+ onChange: e == null ? void 0 : e.onChange,
61844
+ selectedRows: t,
61845
+ setSelectedRows: n
61846
+ }, g = () => {
61847
+ const { selectedRows: C } = useContext(RecordPickerContext), { setVisible: b, setSubmitted: S, setFormValueChanged: y } = useActionContext();
61848
+ return {
61849
+ onClick(F, I) {
61850
+ return V(this, null, function* () {
61851
+ var R, T;
61852
+ yield r.add({
61853
+ values: C
61854
+ }), I && (I == null || I()), b == null || b(!1), S == null || S(!0), i && i !== "TableField" && ((T = (R = a == null ? void 0 : a.service) == null ? void 0 : R.refresh) == null || T.call(R), b == null || b(!1), y == null || y(!1));
61855
+ });
61856
+ }
61857
+ };
61858
+ }, f = () => {
61859
+ const C = (o == null ? void 0 : o.filterTargetKey) || "id";
61860
+ if (d) {
61861
+ const b = d.map((y) => y[C]).filter(Boolean);
61862
+ return b.length ? { $and: [{ [`${C}.$ne`]: b }] } : {};
61863
+ }
61864
+ return {};
61865
+ };
61866
+ return /* @__PURE__ */ jsx(
61867
+ ActionContextProvider,
61868
+ {
61869
+ value: P(x({}, c), {
61870
+ openMode: u ? "drawer" : c.openMode
61871
+ }),
61872
+ children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, h), { children: /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: { useTableSelectorProps, usePickActionProps: g }, children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: { filter: f() }, children: e.children }) }) }))
61873
+ }
61874
+ );
61740
61875
  }, recordFormBlockInitializers = new SchemaInitializer({
61741
61876
  name: "RecordFormBlockInitializers",
61742
61877
  title: '{{ t("Add block") }}',
@@ -63665,7 +63800,27 @@ const commonOptions$h = {
63665
63800
  name: "filterForm:configureFields"
63666
63801
  }, commonOptions$6),
63667
63802
  filterFormItemInitializers_deprecated
63668
- ), MarkdownBlockInitializer = () => {
63803
+ ), DividerFormItemInitializer = () => {
63804
+ const { insert: e } = useSchemaInitializer(), t = useSchemaInitializerItem();
63805
+ return /* @__PURE__ */ jsx(
63806
+ SchemaInitializerItem,
63807
+ P(x({}, t), {
63808
+ icon: /* @__PURE__ */ jsx(LineOutlined, {}),
63809
+ onClick: () => {
63810
+ e({
63811
+ type: "void",
63812
+ "x-decorator": "FormItem",
63813
+ "x-toolbar": "FormItemSchemaToolbar",
63814
+ "x-settings": "blockSettings:divider",
63815
+ "x-component": "Divider",
63816
+ "x-component-props": {
63817
+ children: '{{t("Group")}}'
63818
+ }
63819
+ });
63820
+ }
63821
+ })
63822
+ );
63823
+ }, MarkdownBlockInitializer = () => {
63669
63824
  const { insert: e } = useSchemaInitializer(), { t } = useTranslation(), n = useSchemaInitializerItem();
63670
63825
  return /* @__PURE__ */ jsx(
63671
63826
  SchemaInitializerItem,
@@ -63872,142 +64027,7 @@ const commonOptions$h = {
63872
64027
  name: "page:addBlock"
63873
64028
  }, commonOptions$4),
63874
64029
  blockInitializers_deprecated
63875
- ), DividerFormItemInitializer = () => {
63876
- const { insert: e } = useSchemaInitializer(), t = useSchemaInitializerItem();
63877
- return /* @__PURE__ */ jsx(
63878
- SchemaInitializerItem,
63879
- P(x({}, t), {
63880
- icon: /* @__PURE__ */ jsx(LineOutlined, {}),
63881
- onClick: () => {
63882
- e({
63883
- type: "void",
63884
- "x-decorator": "FormItem",
63885
- "x-toolbar": "FormItemSchemaToolbar",
63886
- "x-settings": "blockSettings:divider",
63887
- "x-component": "Divider",
63888
- "x-component-props": {
63889
- children: '{{t("Group")}}'
63890
- }
63891
- });
63892
- }
63893
- })
63894
- );
63895
- }, AssociateActionInitializer = (e) => {
63896
- const { defaultOpenMode: t } = useOpenModeContext(), { getPopupContext: n } = usePopupUtils(), o = {
63897
- type: "void",
63898
- title: '{{ t("Associate") }}',
63899
- "x-action": "associate",
63900
- "x-toolbar": "ActionSchemaToolbar",
63901
- "x-settings": "actionSettings:popup",
63902
- "x-component": "Action",
63903
- "x-component-props": {
63904
- openMode: t,
63905
- refreshDataBlockRequest: !0
63906
- },
63907
- properties: {
63908
- drawer: {
63909
- type: "void",
63910
- "x-component": "Action.Container",
63911
- title: '{{ t("Select record") }}',
63912
- "x-component-props": {
63913
- className: "nb-record-picker-selector"
63914
- },
63915
- "x-decorator": "AssociateActionProvider",
63916
- properties: {
63917
- grid: {
63918
- type: "void",
63919
- "x-component": "Grid",
63920
- "x-initializer": "popup:tableSelector:addBlock",
63921
- properties: {}
63922
- },
63923
- footer: {
63924
- "x-component": "Action.Container.Footer",
63925
- "x-component-props": {},
63926
- properties: {
63927
- actions: {
63928
- type: "void",
63929
- "x-component": "ActionBar",
63930
- "x-component-props": {},
63931
- properties: {
63932
- submit: {
63933
- title: '{{ t("Submit") }}',
63934
- "x-action": "submit",
63935
- "x-component": "Action",
63936
- "x-use-component-props": "usePickActionProps",
63937
- "x-toolbar": "ActionSchemaToolbar",
63938
- "x-settings": "actionSettings:submit",
63939
- "x-component-props": {
63940
- type: "primary",
63941
- htmlType: "submit"
63942
- }
63943
- }
63944
- }
63945
- }
63946
- }
63947
- }
63948
- }
63949
- }
63950
- },
63951
- [CONTEXT_SCHEMA_KEY]: n()
63952
- }, r = useSchemaInitializerItem();
63953
- return /* @__PURE__ */ jsx(BlockInitializer, P(x({}, r), { schema: o, item: r }));
63954
- }, useTableSelectorProps = () => {
63955
- const { setSelectedRows: e } = useContext(RecordPickerContext), r = useTableSelectorProps$4(), { onRowSelectionChange: t, rowKey: n = "id" } = r, o = Y(r, ["onRowSelectionChange", "rowKey"]);
63956
- return P(x({}, o), {
63957
- rowKey: n,
63958
- rowSelection: {
63959
- type: "checkbox"
63960
- },
63961
- onRowSelectionChange(i, a) {
63962
- e == null || e(i), t == null || t(i, a);
63963
- }
63964
- });
63965
- }, AssociateActionProvider = (e) => {
63966
- const [t, n] = useState([]), o = useCollection(), { resource: r, block: i, __parent: a, service: l } = useBlockRequestContext(), c = useActionContext(), { isMobile: u } = useOpenModeContext() || {}, [d, p] = useState([]), { data: m } = l || {};
63967
- useEffect(() => {
63968
- var C;
63969
- (C = r == null ? void 0 : r.list) == null || C.call(r, {
63970
- paginate: !1
63971
- }).then((b) => {
63972
- var S;
63973
- p(((S = b.data) == null ? void 0 : S.data) || []);
63974
- });
63975
- }, [r, m == null ? void 0 : m.meta.count]);
63976
- const h = {
63977
- size: "small",
63978
- onChange: e == null ? void 0 : e.onChange,
63979
- selectedRows: t,
63980
- setSelectedRows: n
63981
- }, g = () => {
63982
- const { selectedRows: C } = useContext(RecordPickerContext), { setVisible: b, setSubmitted: S, setFormValueChanged: y } = useActionContext();
63983
- return {
63984
- onClick(F, I) {
63985
- return V(this, null, function* () {
63986
- var R, T;
63987
- yield r.add({
63988
- values: C
63989
- }), I && (I == null || I()), b == null || b(!1), S == null || S(!0), i && i !== "TableField" && ((T = (R = a == null ? void 0 : a.service) == null ? void 0 : R.refresh) == null || T.call(R), b == null || b(!1), y == null || y(!1));
63990
- });
63991
- }
63992
- };
63993
- }, f = () => {
63994
- const C = (o == null ? void 0 : o.filterTargetKey) || "id";
63995
- if (d) {
63996
- const b = d.map((y) => y[C]).filter(Boolean);
63997
- return b.length ? { $and: [{ [`${C}.$ne`]: b }] } : {};
63998
- }
63999
- return {};
64000
- };
64001
- return /* @__PURE__ */ jsx(
64002
- ActionContextProvider,
64003
- {
64004
- value: P(x({}, c), {
64005
- openMode: u ? "drawer" : c.openMode
64006
- }),
64007
- children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, h), { children: /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: { useTableSelectorProps, usePickActionProps: g }, children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: { filter: f() }, children: e.children }) }) }))
64008
- }
64009
- );
64010
- }, ParentCollectionFields = () => {
64030
+ ), ParentCollectionFields = () => {
64011
64031
  const e = useInheritsFormItemInitializerFields({ component: "AssignedField" }), { t } = useTranslation(), n = useCompile();
64012
64032
  if (!(e != null && e.length))
64013
64033
  return null;
@@ -64452,7 +64472,8 @@ class SchemaInitializerPlugin extends Plugin {
64452
64472
  RefreshActionInitializer,
64453
64473
  DividerFormItemInitializer,
64454
64474
  AssociateActionInitializer,
64455
- AssociateActionProvider
64475
+ AssociateActionProvider,
64476
+ PopupActionDecorator
64456
64477
  })), this.app.schemaInitializerManager.add(blockInitializers_deprecated), this.app.schemaInitializerManager.add(blockInitializers), this.app.schemaInitializerManager.add(tableActionInitializers_deprecated), this.app.schemaInitializerManager.add(tableActionInitializers), this.app.schemaInitializerManager.add(tableColumnInitializers_deprecated), this.app.schemaInitializerManager.add(tableColumnInitializers), this.app.schemaInitializerManager.add(tableActionColumnInitializers_deprecated), this.app.schemaInitializerManager.add(tableActionColumnInitializers), this.app.schemaInitializerManager.add(formItemInitializers_deprecated), this.app.schemaInitializerManager.add(formItemInitializers), this.app.schemaInitializerManager.add(formActionInitializers), this.app.schemaInitializerManager.add(detailsActionInitializers_deprecated), this.app.schemaInitializerManager.add(detailsActionInitializers), this.app.schemaInitializerManager.add(readPrettyFormItemInitializers_deprecated), this.app.schemaInitializerManager.add(readPrettyFormItemInitializers), this.app.schemaInitializerManager.add(readPrettyFormActionInitializers_deprecated), this.app.schemaInitializerManager.add(readPrettyFormActionInitializers), this.app.schemaInitializerManager.add(createFormBlockInitializers_deprecated), this.app.schemaInitializerManager.add(createFormBlockInitializers), this.app.schemaInitializerManager.add(customizeCreateFormBlockInitializers_deprecated), this.app.schemaInitializerManager.add(customizeCreateFormBlockInitializers), this.app.schemaInitializerManager.add(customFormItemInitializers_deprecated), this.app.schemaInitializerManager.add(customFormItemInitializers), this.app.schemaInitializerManager.add(filterFormActionInitializers_deprecated), this.app.schemaInitializerManager.add(filterFormActionInitializers), this.app.schemaInitializerManager.add(createFormActionInitializers_deprecated), this.app.schemaInitializerManager.add(createFormActionInitializers), this.app.schemaInitializerManager.add(updateFormActionInitializers_deprecated), this.app.schemaInitializerManager.add(updateFormActionInitializers), this.app.schemaInitializerManager.add(filterFormItemInitializers_deprecated), this.app.schemaInitializerManager.add(filterFormItemInitializers), this.app.schemaInitializerManager.add(gridCardActionInitializers_deprecated), this.app.schemaInitializerManager.add(gridCardActionInitializers), this.app.schemaInitializerManager.add(gridCardItemActionInitializers_deprecated), this.app.schemaInitializerManager.add(gridCardItemActionInitializers), this.app.schemaInitializerManager.add(listActionInitializers_deprecated), this.app.schemaInitializerManager.add(listActionInitializers), this.app.schemaInitializerManager.add(listItemActionInitializers_deprecated), this.app.schemaInitializerManager.add(listItemActionInitializers), this.app.schemaInitializerManager.add(recordBlockInitializers_deprecated), this.app.schemaInitializerManager.add(recordBlockInitializers), this.app.schemaInitializerManager.add(recordFormBlockInitializers), this.app.schemaInitializerManager.add(subTableActionInitializers_deprecated), this.app.schemaInitializerManager.add(subTableActionInitializers), this.app.schemaInitializerManager.add(tableSelectorInitializers_deprecated), this.app.schemaInitializerManager.add(tableSelectorInitializers), this.app.schemaInitializerManager.add(tabPaneInitializers_deprecated), this.app.schemaInitializerManager.add(tabPaneInitializers), this.app.schemaInitializerManager.add(tabPaneInitializersForRecordBlock), this.app.schemaInitializerManager.add(tabPaneInitializersForBulkEditFormBlock), this.app.schemaInitializerManager.add(menuItemInitializer_deprecated), this.app.schemaInitializerManager.add(menuItemInitializer);
64457
64478
  });
64458
64479
  }