@nocobase/client 1.6.30 → 1.6.32

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
@@ -6047,7 +6047,7 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
6047
6047
  return { label: (F = i(v)) == null ? void 0 : F.title, value: v };
6048
6048
  });
6049
6049
  }
6050
- const p = (y, { exclude: v = [], depth: F = 0, maxDepth: I, prefix: w = "" }) => F > I ? [] : o(y).map((T) => {
6050
+ const p = (y, { exclude: v = [], depth: F = 0, maxDepth: I, prefix: R = "" }) => F > I ? [] : o(y).map((T) => {
6051
6051
  var j;
6052
6052
  if (v.includes(T.name) || !T.interface || ["sort", "password", "sequence"].includes(T.type) || n && n(T))
6053
6053
  return;
@@ -6057,7 +6057,7 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
6057
6057
  }, O = P(x({}, D), {
6058
6058
  role: "button",
6059
6059
  title: React.createElement(TreeNode, P(x({}, D), { displayType: t })),
6060
- key: w ? `${w}.${T.name}` : T.name,
6060
+ key: R ? `${R}.${T.name}` : T.name,
6061
6061
  isLeaf: !0,
6062
6062
  field: T
6063
6063
  });
@@ -6072,9 +6072,9 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
6072
6072
  prefix: O.key,
6073
6073
  exclude: ["id", ...systemKeys]
6074
6074
  })), O;
6075
- }).filter(Boolean), m = (y, { prefix: v, maxDepth: F, depth: I = 0, exclude: w = [] }) => I > F ? [] : o(y).map((T) => {
6075
+ }).filter(Boolean), m = (y, { prefix: v, maxDepth: F, depth: I = 0, exclude: R = [] }) => I > F ? [] : o(y).map((T) => {
6076
6076
  var j;
6077
- if (!T.target || !T.interface || w.includes(T.name))
6077
+ if (!T.target || !T.interface || R.includes(T.name))
6078
6078
  return;
6079
6079
  const D = {
6080
6080
  type: "preloading",
@@ -6090,7 +6090,7 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
6090
6090
  prefix: O,
6091
6091
  depth: I + 1,
6092
6092
  maxDepth: F,
6093
- exclude: w
6093
+ exclude: R
6094
6094
  })
6095
6095
  };
6096
6096
  }).filter(Boolean), h = (y) => y.map((v) => P(x({}, v), {
@@ -6099,11 +6099,11 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
6099
6099
  children: v.children ? h(v.children) : null
6100
6100
  })), g = useCallback((y, v, F) => {
6101
6101
  var T, D;
6102
- const I = v.index, w = (D = (T = u.initialValue) == null ? void 0 : T.items) == null ? void 0 : D[I];
6102
+ const I = v.index, R = (D = (T = u.initialValue) == null ? void 0 : T.items) == null ? void 0 : D[I];
6103
6103
  if (!y)
6104
6104
  return [];
6105
- if (w != null && w.treeData || F)
6106
- return h(F || w.treeData);
6105
+ if (R != null && R.treeData || F)
6106
+ return h(F || R.treeData);
6107
6107
  try {
6108
6108
  return p(y, { exclude: ["id", ...systemKeys], maxDepth: 1 });
6109
6109
  } catch (O) {
@@ -6131,7 +6131,7 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
6131
6131
  const O = a(T.interface);
6132
6132
  if (!(O != null && O.filterable))
6133
6133
  return;
6134
- const { nested: j, children: N, operators: B } = O.filterable, R = {
6134
+ const { nested: j, children: N, operators: B } = O.filterable, w = {
6135
6135
  name: T.name,
6136
6136
  title: ((M = T == null ? void 0 : T.uiSchema) == null ? void 0 : M.title) || T.name,
6137
6137
  schema: T == null ? void 0 : T.uiSchema,
@@ -6140,12 +6140,12 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
6140
6140
  };
6141
6141
  if (!(T.target && D > 2)) {
6142
6142
  if (D > 2)
6143
- return R;
6144
- if (N != null && N.length && (R.children = N), j) {
6143
+ return w;
6144
+ if (N != null && N.length && (w.children = N), j) {
6145
6145
  const k = o(T.target), z = I(k, D + 1).filter(Boolean);
6146
- R.children = R.children || [], R.children.push(...z);
6146
+ w.children = w.children || [], w.children.push(...z);
6147
6147
  }
6148
- return R;
6148
+ return w;
6149
6149
  }
6150
6150
  }, I = (T, D) => {
6151
6151
  const O = [];
@@ -6157,7 +6157,7 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
6157
6157
  return I(v, 1);
6158
6158
  },
6159
6159
  useTitleFieldDataSource: (y) => {
6160
- const v = y.path.entire.replace("titleField", "collection"), F = y.query(v).get("value"), w = o(F).filter((T) => {
6160
+ const v = y.path.entire.replace("titleField", "collection"), F = y.query(v).get("value"), R = o(F).filter((T) => {
6161
6161
  var D;
6162
6162
  return (D = a(T.interface)) == null ? void 0 : D.titleUsable;
6163
6163
  }).map((T) => {
@@ -6167,7 +6167,7 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
6167
6167
  label: c((D = T == null ? void 0 : T.uiSchema) == null ? void 0 : D.title) || (T == null ? void 0 : T.name)
6168
6168
  };
6169
6169
  });
6170
- y.dataSource = w;
6170
+ y.dataSource = R;
6171
6171
  }
6172
6172
  };
6173
6173
  };
@@ -6636,7 +6636,7 @@ function useRecordRequest(e) {
6636
6636
  '[nocobase]: The "filterByTk" parameter is missing in the "DataBlockRequestProvider" component'
6637
6637
  );
6638
6638
  const F = r.filterByTk === void 0 ? _.omit(r, "filterByTk") : r;
6639
- return (I = n[o]) == null ? void 0 : I.call(n, x(x({}, F), v)).then((w) => w.data);
6639
+ return (I = n[o]) == null ? void 0 : I.call(n, x(x({}, F), v)).then((R) => R.data);
6640
6640
  };
6641
6641
  return useRequest((...v) => V(this, null, function* () {
6642
6642
  const [F, I] = yield Promise.all([
@@ -6802,7 +6802,7 @@ const mergeFilter = (e, t = "$and") => {
6802
6802
  r.forEach((h) => {
6803
6803
  var y, v, F, I;
6804
6804
  let g = d;
6805
- const f = n.find((w) => w.uid === h.uid);
6805
+ const f = n.find((R) => R.uid === h.uid);
6806
6806
  if (!f)
6807
6807
  return;
6808
6808
  _.isFunction(u) && (u = u(f, h, getSourceKey$1(m, f.field))), _.isFunction(d) && (g = d(f, h)), _.isFunction(p) && (p = p(f));
@@ -6820,7 +6820,7 @@ const mergeFilter = (e, t = "$and") => {
6820
6820
  else if ((I = h.clearSelection) == null || I.call(h), delete b[o], h.dataLoadingMode === "manual")
6821
6821
  return h.clearData();
6822
6822
  const S = mergeFilter([
6823
- ...Object.values(b).map((w) => removeNullCondition(w)),
6823
+ ...Object.values(b).map((R) => removeNullCondition(R)),
6824
6824
  h.defaultFilter
6825
6825
  ]);
6826
6826
  h.doFilter(
@@ -7423,7 +7423,7 @@ const collectFieldStateOfLinkageRules = ({ operator: e, value: t, field: n, cond
7423
7423
  case ActionType.Value:
7424
7424
  {
7425
7425
  const I = () => V(void 0, null, function* () {
7426
- var w;
7426
+ var R;
7427
7427
  if ((t == null ? void 0 : t.mode) === "express") {
7428
7428
  if ((t.value || t.result) == null)
7429
7429
  return;
@@ -7437,7 +7437,7 @@ const collectFieldStateOfLinkageRules = ({ operator: e, value: t, field: n, cond
7437
7437
  console.error(O);
7438
7438
  }
7439
7439
  } else
7440
- return (t == null ? void 0 : t.mode) === "constant" ? (w = t == null ? void 0 : t.value) != null ? w : t : null;
7440
+ return (t == null ? void 0 : t.mode) === "constant" ? (R = t == null ? void 0 : t.value) != null ? R : t : null;
7441
7441
  });
7442
7442
  isConditionEmpty(o) ? p.push(getTempFieldState(!0, I())) : p.push(getTempFieldState(conditionAnalyses(h, l), I())), n.stateOfLinkageRules = P(x({}, n.stateOfLinkageRules), {
7443
7443
  value: p
@@ -8553,7 +8553,7 @@ function withInitializer(e) {
8553
8553
  S ? S(y(M, { isInSubTable: i })) : r(d, y(M, { isInSubTable: i }), { onSuccess: p });
8554
8554
  },
8555
8555
  [S, y, i, r, d, p]
8556
- ), { wrapSSR: F, hashId: I, componentCls: w } = useSchemaInitializerStyles(), [T, D] = useState(!1), { token: O } = theme.useToken(), j = useNiceDropdownMaxHeight([T]), N = useMemo(
8556
+ ), { wrapSSR: F, hashId: I, componentCls: R } = useSchemaInitializerStyles(), [T, D] = useState(!1), { token: O } = theme.useToken(), j = useNiceDropdownMaxHeight([T]), N = useMemo(
8557
8557
  () => x({
8558
8558
  options: n,
8559
8559
  style: C
@@ -8569,7 +8569,7 @@ function withInitializer(e) {
8569
8569
  padding: 0;
8570
8570
  }
8571
8571
  }
8572
- `, [O.paddingXXS]), R = useMemo(
8572
+ `, [O.paddingXXS]), w = useMemo(
8573
8573
  () => ({
8574
8574
  maxHeight: j,
8575
8575
  overflowY: "auto"
@@ -8604,7 +8604,7 @@ function withInitializer(e) {
8604
8604
  open: T,
8605
8605
  onOpenChange: D,
8606
8606
  content: F(
8607
- /* @__PURE__ */ jsx("div", { className: `${w} ${I}`, style: R, children: /* @__PURE__ */ jsx(
8607
+ /* @__PURE__ */ jsx("div", { className: `${R} ${I}`, style: w, children: /* @__PURE__ */ jsx(
8608
8608
  ConfigProvider,
8609
8609
  {
8610
8610
  theme: {
@@ -9218,7 +9218,7 @@ function addAppVersion(e, t) {
9218
9218
  addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
9219
9219
  }), e;
9220
9220
  }
9221
- const name = "@nocobase/client", version = "1.6.30", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
9221
+ const name = "@nocobase/client", version = "1.6.32", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
9222
9222
  "@ahooksjs/use-url-state": "3.5.1",
9223
9223
  "@ant-design/cssinjs": "^1.11.1",
9224
9224
  "@ant-design/icons": "^5.6.1",
@@ -9240,9 +9240,9 @@ const name = "@nocobase/client", version = "1.6.30", license = "AGPL-3.0", main
9240
9240
  "@formily/reactive-react": "^2.2.27",
9241
9241
  "@formily/shared": "^2.2.27",
9242
9242
  "@formily/validator": "^2.2.27",
9243
- "@nocobase/evaluators": "1.6.30",
9244
- "@nocobase/sdk": "1.6.30",
9245
- "@nocobase/utils": "1.6.30",
9243
+ "@nocobase/evaluators": "1.6.32",
9244
+ "@nocobase/sdk": "1.6.32",
9245
+ "@nocobase/utils": "1.6.32",
9246
9246
  ahooks: "^3.7.2",
9247
9247
  antd: "5.12.8",
9248
9248
  "antd-style": "3.7.1",
@@ -10055,8 +10055,8 @@ function useAssociationFieldContext() {
10055
10055
  return useContext(AssociationFieldContext);
10056
10056
  }
10057
10057
  function useServiceOptions$1(e) {
10058
- var g, f, C, b, S, y, v, F, I, w;
10059
- const { action: t = "list", service: n, useOriginalFilter: o } = e, r = useFieldSchema(), i = useField(), { getField: a } = useCollection_deprecated(), { getCollectionJoinField: l } = useCollectionManager_deprecated(), c = useRecord(), u = (isString((C = (f = (g = r == null ? void 0 : r["x-component-props"]) == null ? void 0 : g.service) == null ? void 0 : f.params) == null ? void 0 : C.filter) ? (y = (S = (b = i.componentProps) == null ? void 0 : b.service) == null ? void 0 : S.params) == null ? void 0 : y.filter : (I = (F = (v = r == null ? void 0 : r["x-component-props"]) == null ? void 0 : v.service) == null ? void 0 : F.params) == null ? void 0 : I.filter) || ((w = n == null ? void 0 : n.params) == null ? void 0 : w.filter), { filter: d } = useParsedFilter({ filterOption: u }), p = useMemo(() => a(r.name) || l(r == null ? void 0 : r["x-collection-field"]), [r]), m = c == null ? void 0 : c[p == null ? void 0 : p.sourceKey], h = useMemo(() => {
10058
+ var g, f, C, b, S, y, v, F, I, R;
10059
+ const { action: t = "list", service: n, useOriginalFilter: o } = e, r = useFieldSchema(), i = useField(), { getField: a } = useCollection_deprecated(), { getCollectionJoinField: l } = useCollectionManager_deprecated(), c = useRecord(), u = (isString((C = (f = (g = r == null ? void 0 : r["x-component-props"]) == null ? void 0 : g.service) == null ? void 0 : f.params) == null ? void 0 : C.filter) ? (y = (S = (b = i.componentProps) == null ? void 0 : b.service) == null ? void 0 : S.params) == null ? void 0 : y.filter : (I = (F = (v = r == null ? void 0 : r["x-component-props"]) == null ? void 0 : v.service) == null ? void 0 : F.params) == null ? void 0 : I.filter) || ((R = n == null ? void 0 : n.params) == null ? void 0 : R.filter), { filter: d } = useParsedFilter({ filterOption: u }), p = useMemo(() => a(r.name) || l(r == null ? void 0 : r["x-collection-field"]), [r]), m = c == null ? void 0 : c[p == null ? void 0 : p.sourceKey], h = useMemo(() => {
10060
10060
  const T = ["oho", "o2m"].includes(p == null ? void 0 : p.interface);
10061
10061
  return mergeFilter(
10062
10062
  [
@@ -10265,11 +10265,11 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
10265
10265
  }
10266
10266
  `, [n.paddingContentVerticalLG, n.marginSM, n.margin]), C = useCollection(), b = useMemo(() => withTooltipComponent(NocoBaseRecursionField), []), S = useMemo(
10267
10267
  () => u == null ? void 0 : u.map((v) => {
10268
- var j, N, B, R;
10268
+ var j, N, B, w;
10269
10269
  const F = v.reduceProperties((M, $) => {
10270
10270
  if (isCollectionFieldComponent($))
10271
10271
  return M.concat([$]);
10272
- }, []), I = (F == null ? void 0 : F.length) > 0 ? F[0].name : v.name, w = !!((j = v["x-component-props"]) != null && j.columnHidden), { uiSchema: T, defaultValue: D, interface: O } = (C == null ? void 0 : C.getField(I)) || {};
10272
+ }, []), 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)) || {};
10273
10273
  return T && (T.default = D), P(x({
10274
10274
  title: /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: h, children: /* @__PURE__ */ jsx(
10275
10275
  b,
@@ -10284,9 +10284,9 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
10284
10284
  dataIndex: I,
10285
10285
  key: v.name,
10286
10286
  sorter: (B = v["x-component-props"]) == null ? void 0 : B.sorter,
10287
- columnHidden: w
10287
+ columnHidden: R
10288
10288
  }, v["x-component-props"]), {
10289
- width: w && !a ? 0 : ((R = v["x-component-props"]) == null ? void 0 : R.width) || 100,
10289
+ width: R && !a ? 0 : ((w = v["x-component-props"]) == null ? void 0 : w.width) || 100,
10290
10290
  render: (M, $, k) => /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: h, children: /* @__PURE__ */ jsx(
10291
10291
  TableCellRender,
10292
10292
  {
@@ -10303,10 +10303,10 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
10303
10303
  record: M,
10304
10304
  schema: v,
10305
10305
  rowIndex: $,
10306
- columnHidden: w
10306
+ columnHidden: R
10307
10307
  }),
10308
10308
  onHeaderCell: () => ({
10309
- columnHidden: w
10309
+ columnHidden: R
10310
10310
  })
10311
10311
  });
10312
10312
  }),
@@ -10340,13 +10340,13 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
10340
10340
  width: 60,
10341
10341
  align: "center",
10342
10342
  fixed: "right",
10343
- render: (F, I, w) => {
10343
+ render: (F, I, R) => {
10344
10344
  if (e.showDel(I))
10345
10345
  return /* @__PURE__ */ jsx(
10346
10346
  "div",
10347
10347
  {
10348
10348
  onClick: () => action(() => {
10349
- const T = (d - 1) * p + w, D = o.value[T] ? 1 : 2;
10349
+ const T = (d - 1) * p + R, D = o.value[T] ? 1 : 2;
10350
10350
  return spliceArrayState(o, {
10351
10351
  startIndex: T,
10352
10352
  deleteCount: D
@@ -10396,7 +10396,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
10396
10396
  const o = e, { index: t } = o, n = Y(o, ["index"]);
10397
10397
  return /* @__PURE__ */ jsx("div", P(x({ className: cls("nb-table-index"), style: { padding: "0 8px 0 16px" } }, n), { children: t }));
10398
10398
  }, pageSizeOptions$3 = [5, 10, 20, 50, 100, 200], usePaginationProps$3 = (e, t, n) => {
10399
- var S, y, v, F, I, w;
10399
+ var S, y, v, F, I, R;
10400
10400
  const { t: o } = useTranslation();
10401
10401
  useField();
10402
10402
  const { token: r } = useToken$1(), { meta: i } = useDataBlockRequestData() || {}, { hasNext: a } = i || {}, l = useMemo(
@@ -10443,7 +10443,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
10443
10443
  ) : j
10444
10444
  });
10445
10445
  }, [l, o, f, (I = n.value) == null ? void 0 : I.length, C]);
10446
- return t === !1 || !t && e === !1 ? !1 : ((w = n.value) == null ? void 0 : w.length) > 0 || b.total ? b : !1;
10446
+ return t === !1 || !t && e === !1 ? !1 : ((R = n.value) == null ? void 0 : R.length) > 0 || b.total ? b : !1;
10447
10447
  }, headerClass$1 = css`
10448
10448
  max-width: 300px;
10449
10449
  white-space: nowrap;
@@ -10667,7 +10667,7 @@ const Table$2 = withDynamicSchemaProps(
10667
10667
  "onClickRow",
10668
10668
  "value"
10669
10669
  ]), 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 || (() => {
10670
- })), N = usePaginationProps$3(n, i, e), B = useTableColumns$2(S, N), [R, M] = useState(() => D ? O : []), [$, k] = useState(((be = y == null ? void 0 : y.data) == null ? void 0 : be.selectedRowKeys) || []), [z, E] = useState([]), q = (p == null ? void 0 : p.type) !== "none", L = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
10670
+ })), 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, E] = useState([]), q = (p == null ? void 0 : p.type) !== "none", L = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
10671
10671
  & > td {
10672
10672
  background-color: ${t.controlItemBgActive} !important;
10673
10673
  }
@@ -10693,7 +10693,7 @@ const Table$2 = withDynamicSchemaProps(
10693
10693
  }), [C, z]);
10694
10694
  useDeepCompareEffect(() => {
10695
10695
  const Q = D ? O : [];
10696
- _.isEqual(Q, R) || M(Q);
10696
+ _.isEqual(Q, w) || M(Q);
10697
10697
  }, [D, O]);
10698
10698
  const K = useCallback((Q) => {
10699
10699
  if (m)
@@ -10821,14 +10821,14 @@ const Table$2 = withDynamicSchemaProps(
10821
10821
  [z, H, JSON.stringify(m)]
10822
10822
  ), he = useCallback(
10823
10823
  (Q, te) => {
10824
- const oe = Q ? [...R, te[I.getPrimaryKey()]] : R.filter((ie) => te[I.getPrimaryKey()] !== ie);
10824
+ const oe = Q ? [...w, te[I.getPrimaryKey()]] : w.filter((ie) => te[I.getPrimaryKey()] !== ie);
10825
10825
  M(oe), g == null || g(Q, te);
10826
10826
  },
10827
- [R, g, I]
10827
+ [w, g, I]
10828
10828
  ), ge = useMemo(() => ({
10829
10829
  onExpand: he,
10830
- expandedRowKeys: R
10831
- }), [R, he]);
10830
+ expandedRowKeys: w
10831
+ }), [w, he]);
10832
10832
  return (
10833
10833
  // If spinning is set to undefined, it will cause the subtable to always display loading, so we need to convert it here.
10834
10834
  // We use Spin here instead of Table's loading prop because using Spin here reduces unnecessary re-renders.
@@ -10884,64 +10884,67 @@ const InternalTableBlockProvider = (e) => {
10884
10884
  childrenColumnName: i,
10885
10885
  expandFlag: a = !1,
10886
10886
  fieldNames: l,
10887
- collection: c
10888
- } = e, u = useField(), { resource: d, service: p } = useBlockRequestContext(), m = useFieldSchema(), [h, g] = useState(!!(l || a)), { heightProps: f } = useBlockHeightProps(), C = useRef(null);
10887
+ collection: c,
10888
+ association: u
10889
+ } = e, d = useField(), { resource: p, service: m } = useBlockRequestContext(), h = useFieldSchema(), [g, f] = useState(!!(l || a)), { heightProps: C } = useBlockHeightProps(), b = useRef(null);
10889
10890
  useEffect(() => {
10890
- g(l || a);
10891
+ f(l || a);
10891
10892
  }, [l || a]);
10892
- const b = useMemo(() => {
10893
- var w;
10894
- const { treeTable: F } = (m == null ? void 0 : m["x-decorator-props"]) || {}, I = (w = p == null ? void 0 : p.data) == null ? void 0 : w.data;
10895
- if (F)
10896
- return getIdsWithChildren(I);
10897
- }, [p == null ? void 0 : p.loading, m]), S = useCallback(
10898
- (F) => {
10899
- g(F || !h);
10893
+ const S = useMemo(() => {
10894
+ var T;
10895
+ const { treeTable: I } = (h == null ? void 0 : h["x-decorator-props"]) || {}, R = (T = m == null ? void 0 : m.data) == null ? void 0 : T.data;
10896
+ if (I)
10897
+ return getIdsWithChildren(R);
10898
+ }, [m == null ? void 0 : m.loading, h]), y = useCallback(
10899
+ (I) => {
10900
+ f(I || !g);
10900
10901
  },
10901
- [h]
10902
- ), y = useMemo(
10902
+ [g]
10903
+ ), v = useMemo(
10903
10904
  () => ({
10904
- field: u,
10905
+ field: d,
10905
10906
  rowKey: r,
10906
10907
  childrenColumnName: i,
10907
10908
  showIndex: n,
10908
10909
  dragSort: o,
10909
10910
  dragSortBy: e.dragSortBy
10910
10911
  }),
10911
- [u, r, i, n, o, e.dragSortBy]
10912
- ), v = useMemo(
10912
+ [d, r, i, n, o, e.dragSortBy]
10913
+ ), F = useMemo(
10913
10914
  () => ({
10914
10915
  collection: c,
10915
- field: u,
10916
- service: p,
10917
- resource: d,
10916
+ field: d,
10917
+ service: m,
10918
+ resource: p,
10918
10919
  params: t,
10919
10920
  showIndex: n,
10920
10921
  dragSort: o,
10921
10922
  rowKey: r,
10922
- expandFlag: h,
10923
+ expandFlag: g,
10923
10924
  childrenColumnName: i,
10924
- allIncludesChildren: b,
10925
- setExpandFlag: S,
10926
- heightProps: f
10925
+ allIncludesChildren: S,
10926
+ setExpandFlag: y,
10927
+ heightProps: C,
10928
+ association: u
10927
10929
  }),
10928
10930
  [
10929
- b,
10931
+ S,
10930
10932
  i,
10931
10933
  c,
10932
10934
  o,
10933
- h,
10934
- u,
10935
- f,
10936
- t,
10935
+ g,
10937
10936
  d,
10938
- r,
10937
+ C,
10938
+ t,
10939
10939
  p,
10940
- S,
10941
- n
10940
+ r,
10941
+ m,
10942
+ y,
10943
+ n,
10944
+ u
10942
10945
  ]
10943
10946
  );
10944
- return /* @__PURE__ */ jsx(TableElementRefContext.Provider, { value: C, children: /* @__PURE__ */ jsx(TableBlockContext.Provider, { value: v, children: /* @__PURE__ */ jsx(TableBlockContextBasicValue.Provider, { value: y, children: e.children }) }) });
10947
+ return /* @__PURE__ */ jsx(TableElementRefContext.Provider, { value: b, children: /* @__PURE__ */ jsx(TableBlockContext.Provider, { value: F, children: /* @__PURE__ */ jsx(TableBlockContextBasicValue.Provider, { value: v, children: e.children }) }) });
10945
10948
  }, useTableBlockParamsCompat = (e) => {
10946
10949
  const t = useFieldSchema();
10947
10950
  let n, o = !1;
@@ -11419,14 +11422,14 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
11419
11422
  ].filter(Boolean).map((c) => encodePathValue(c)).join("/")}`;
11420
11423
  }, usePopupUtils = (e = {}) => {
11421
11424
  const t = useNavigateNoUpdate(), n = useLocationNoUpdate(), o = useFieldSchema(), r = useDataSourceKey(), i = useCollectionRecord(), a = useCollectionParentRecord(), l = useCollection(), c = useCollectionManager(), u = useAssociationName(), { visible: d, setVisible: p } = useContext(PopupVisibleProviderContext) || { visible: !1, setVisible: _.noop }, { params: m, currentLevel: h = 0 } = useCurrentPopupContext(), { getDataBlockRequest: g } = useDataBlockRequestGetter(), { isPopupVisibleControlledByURL: f } = usePopupSettings(), { setVisible: C } = useContext(ActionContext), { updatePopupContext: b } = usePopupContextInActionOrAssociationField(), S = useCurrentPopupContext(), y = useCallback(
11422
- (R) => {
11425
+ (w) => {
11423
11426
  var M;
11424
- return (M = R || (a == null ? void 0 : a.data)) == null ? void 0 : M[c.getSourceKeyByAssociation(u)];
11427
+ return (M = w || (a == null ? void 0 : a.data)) == null ? void 0 : M[c.getSourceKeyByAssociation(u)];
11425
11428
  },
11426
11429
  [a, u]
11427
- ), v = useDataBlockRequestData(), F = useTableBlockContextBasicValue() || {}, I = e.setVisible || C, w = useCallback(
11430
+ ), v = useDataBlockRequestData(), F = useTableBlockContextBasicValue() || {}, I = e.setVisible || C, R = useCallback(
11428
11431
  ({
11429
- tabKey: R,
11432
+ tabKey: w,
11430
11433
  popupUid: M,
11431
11434
  recordData: $,
11432
11435
  sourceId: k,
@@ -11440,20 +11443,20 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
11440
11443
  collection: z,
11441
11444
  filterbytk: q,
11442
11445
  sourceid: k,
11443
- tab: R
11446
+ tab: w
11444
11447
  });
11445
11448
  },
11446
11449
  [u, c, l, r, a == null ? void 0 : a.data, u]
11447
11450
  ), T = useCallback(() => {
11448
- const R = {
11451
+ const w = {
11449
11452
  dataSource: r,
11450
11453
  collection: u || l == null ? void 0 : l.name,
11451
11454
  association: u
11452
11455
  };
11453
- return _.omitBy(R, _.isNil);
11456
+ return _.omitBy(w, _.isNil);
11454
11457
  }, [r, l, u]), D = useCallback(
11455
11458
  ({
11456
- recordData: R,
11459
+ recordData: w,
11457
11460
  parentRecordData: M,
11458
11461
  collectionNameUsedInURL: $,
11459
11462
  popupUidUsedInURL: k,
@@ -11462,10 +11465,10 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
11462
11465
  if (!f())
11463
11466
  return I == null ? void 0 : I(!0);
11464
11467
  const E = z || o, q = E == null ? void 0 : E["x-uid"], L = y(M);
11465
- R = R || (i == null ? void 0 : i.data);
11466
- const G = w({
11468
+ w = w || (i == null ? void 0 : i.data);
11469
+ const G = R({
11467
11470
  popupUid: q,
11468
- recordData: R,
11471
+ recordData: w,
11469
11472
  sourceId: L,
11470
11473
  collection: $,
11471
11474
  puid: k
@@ -11473,7 +11476,7 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
11473
11476
  let U = n.pathname;
11474
11477
  if (_.last(U) === "/" && (U = U.slice(0, -1)), storePopupContext(q, {
11475
11478
  schema: E,
11476
- record: new CollectionRecord({ isNew: !1, data: R }),
11479
+ record: new CollectionRecord({ isNew: !1, data: w }),
11477
11480
  parentRecord: M ? new CollectionRecord({ isNew: !1, data: M }) : a,
11478
11481
  service: g(),
11479
11482
  dataSource: r,
@@ -11498,7 +11501,7 @@ ${JSON.stringify(E, null, 2)}`
11498
11501
  l,
11499
11502
  r,
11500
11503
  o,
11501
- w,
11504
+ R,
11502
11505
  t,
11503
11506
  a,
11504
11507
  i,
@@ -11523,9 +11526,9 @@ ${JSON.stringify(E, null, 2)}`
11523
11526
  h,
11524
11527
  m == null ? void 0 : m.popupuid
11525
11528
  ]), j = useCallback(
11526
- (R) => {
11527
- const M = y(), $ = w({
11528
- tabKey: R,
11529
+ (w) => {
11530
+ const M = y(), $ = R({
11531
+ tabKey: w,
11529
11532
  popupUid: m == null ? void 0 : m.popupuid,
11530
11533
  recordData: i == null ? void 0 : i.data,
11531
11534
  sourceId: M
@@ -11535,10 +11538,10 @@ ${JSON.stringify(E, null, 2)}`
11535
11538
  replace: !0
11536
11539
  });
11537
11540
  },
11538
- [w, t, m == null ? void 0 : m.popupuid, i == null ? void 0 : i.data, n]
11539
- ), N = useCallback((R, M) => {
11540
- M.__popup = R;
11541
- }, []), B = useCallback((R) => R.__popup, []);
11541
+ [R, t, m == null ? void 0 : m.popupuid, i == null ? void 0 : i.data, n]
11542
+ ), N = useCallback((w, M) => {
11543
+ M.__popup = w;
11544
+ }, []), B = useCallback((w) => w.__popup, []);
11542
11545
  return {
11543
11546
  /**
11544
11547
  * used to open popup by changing the url
@@ -12001,7 +12004,7 @@ const DrawerErrorFallback = (e) => {
12001
12004
  ActionDrawerContent.displayName = "ActionDrawerContent";
12002
12005
  const InternalActionDrawer = observer$1(
12003
12006
  (e) => {
12004
- const F = e, { footerNodeName: t = "Action.Drawer.Footer", zIndex: n, onClose: o } = F, r = Y(F, ["footerNodeName", "zIndex", "onClose"]), { visible: i, setVisible: a, openSize: l = "middle", drawerProps: c } = useActionContext(), u = useFieldSchema(), d = useField(), { componentCls: p, hashId: m } = useStyles$h(), h = useTabsContext(), g = useZIndexContext(), f = u.reduceProperties((I, w) => w["x-component"] === t ? w : I), { hidden: C } = useCurrentPopupContext(), b = useMemo(() => P(x(x({}, c == null ? void 0 : c.style), r == null ? void 0 : r.style), {
12007
+ const F = e, { footerNodeName: t = "Action.Drawer.Footer", zIndex: n, onClose: o } = F, r = Y(F, ["footerNodeName", "zIndex", "onClose"]), { visible: i, setVisible: a, openSize: l = "middle", drawerProps: c } = useActionContext(), u = useFieldSchema(), d = useField(), { componentCls: p, hashId: m } = useStyles$h(), h = useTabsContext(), g = useZIndexContext(), f = u.reduceProperties((I, R) => R["x-component"] === t ? R : I), { hidden: C } = useCurrentPopupContext(), b = useMemo(() => P(x(x({}, c == null ? void 0 : c.style), r == null ? void 0 : r.style), {
12005
12008
  display: C ? "none" : "block"
12006
12009
  }), [C, c == null ? void 0 : c.style, r == null ? void 0 : r.style]), S = getZIndex("drawer", n || g, e.level || 0), y = useCallback(
12007
12010
  (I) => {
@@ -12111,7 +12114,7 @@ function useDelayedVisible(e, t = 200) {
12111
12114
  }
12112
12115
  const InternalActionModal = observer$1(
12113
12116
  (e) => {
12114
- const F = e, { footerNodeName: t = "Action.Modal.Footer", width: n, zIndex: o, delay: r = 200 } = F, i = Y(F, ["footerNodeName", "width", "zIndex", "delay"]), { visible: a, setVisible: l, openSize: c = "middle", modalProps: u } = useActionContext(), d = n != null ? n : openSizeWidthMap.get(c), p = useFieldSchema(), m = useField(), { token: h } = useToken(), g = useTabsContext(), f = useZIndexContext(), C = p.reduceProperties((I, w) => w["x-component"] === t ? w : I), { hidden: b } = useCurrentPopupContext(), S = !!C, y = getZIndex("modal", o || f, e.level || 0), v = useDelayedVisible(a, r);
12117
+ const F = e, { footerNodeName: t = "Action.Modal.Footer", width: n, zIndex: o, delay: r = 200 } = F, i = Y(F, ["footerNodeName", "width", "zIndex", "delay"]), { visible: a, setVisible: l, openSize: c = "middle", modalProps: u } = useActionContext(), d = n != null ? n : openSizeWidthMap.get(c), p = useFieldSchema(), m = useField(), { token: h } = useToken(), g = useTabsContext(), f = useZIndexContext(), C = p.reduceProperties((I, R) => R["x-component"] === t ? R : I), { hidden: b } = useCurrentPopupContext(), S = !!C, y = getZIndex("modal", o || f, e.level || 0), v = useDelayedVisible(a, r);
12115
12118
  return /* @__PURE__ */ jsx(ActionContextNoRerender, { children: /* @__PURE__ */ jsx(zIndexContext.Provider, { value: y, children: /* @__PURE__ */ jsx(TabsContextProvider, P(x({}, g), { tabBarExtraContent: null, children: /* @__PURE__ */ jsx(
12116
12119
  Modal,
12117
12120
  P(x(x({
@@ -13105,7 +13108,7 @@ https://requirejs.org/docs/errors.html#` + e);
13105
13108
  var z = k.id, E = getOwn(l, z);
13106
13109
  return E || (E = l[z] = new o.Module(k)), E;
13107
13110
  }
13108
- function w(k, z, E) {
13111
+ function R(k, z, E) {
13109
13112
  var q = k.id, L = getOwn(l, q);
13110
13113
  hasProp(p, q) && (!L || L.defineEmitComplete) ? z === "defined" && E(p[q]) : (L = I(k), L.error && z === "error" ? E(L.error) : L.on(z, E));
13111
13114
  }
@@ -13240,7 +13243,7 @@ https://requirejs.org/docs/errors.html#` + e);
13240
13243
  },
13241
13244
  callPlugin: function() {
13242
13245
  var k = this.map, z = k.id, E = F(k.prefix);
13243
- this.depMaps.push(E), w(E, "defined", bind(this, function(q) {
13246
+ this.depMaps.push(E), R(E, "defined", bind(this, function(q) {
13244
13247
  var L, G, U, H = getOwn(h, this.map.id), J = this.map.name, K = this.map.parentMap ? this.map.parentMap.name : null, W = o.makeRequire(k.parentMap, {
13245
13248
  enableBuildCallback: !0
13246
13249
  });
@@ -13251,7 +13254,7 @@ https://requirejs.org/docs/errors.html#` + e);
13251
13254
  k.prefix + "!" + J,
13252
13255
  this.map.parentMap,
13253
13256
  !0
13254
- ), w(
13257
+ ), R(
13255
13258
  G,
13256
13259
  "defined",
13257
13260
  bind(this, function(X) {
@@ -13311,9 +13314,9 @@ https://requirejs.org/docs/errors.html#` + e);
13311
13314
  this.depExports[z] = L(this);
13312
13315
  return;
13313
13316
  }
13314
- this.depCount += 1, w(k, "defined", bind(this, function(G) {
13317
+ this.depCount += 1, R(k, "defined", bind(this, function(G) {
13315
13318
  this.undefed || (this.defineDep(z, G), this.check());
13316
- })), this.errback ? w(k, "error", bind(this, this.errback)) : this.events.error && w(k, "error", bind(this, function(G) {
13319
+ })), this.errback ? R(k, "error", bind(this, this.errback)) : this.events.error && R(k, "error", bind(this, function(G) {
13317
13320
  this.emit("error", G);
13318
13321
  }));
13319
13322
  }
@@ -13336,12 +13339,12 @@ https://requirejs.org/docs/errors.html#` + e);
13336
13339
  function B(k) {
13337
13340
  hasProp(p, k[0]) || I(F(k[0], null, !0)).init(k[1], k[2]);
13338
13341
  }
13339
- function R(k, z, E, q) {
13342
+ function w(k, z, E, q) {
13340
13343
  k.detachEvent && !isOpera ? q && k.detachEvent(q, z) : k.removeEventListener(E, z, !1);
13341
13344
  }
13342
13345
  function M(k) {
13343
13346
  var z = k.currentTarget || k.srcElement;
13344
- return R(z, o.onScriptLoad, "load", "onreadystatechange"), R(z, o.onScriptError, "error"), {
13347
+ return w(z, o.onScriptLoad, "load", "onreadystatechange"), w(z, o.onScriptError, "error"), {
13345
13348
  node: z,
13346
13349
  id: z && z.getAttribute("data-requiremodule")
13347
13350
  };
@@ -15060,8 +15063,8 @@ const useDragEnd = (e) => {
15060
15063
  const { refresh: t } = useDesignable(), n = useAPIClient(), { t: o } = useTranslation();
15061
15064
  return useCallback(
15062
15065
  (r) => {
15063
- var f, C, b, S, y, v, F, I, w, T, D, O, j, N, B;
15064
- 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 = (w = a == null ? void 0 : a.data) == null ? void 0 : w.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;
15066
+ var f, C, b, S, y, v, F, I, R, T, D, O, j, N, B;
15067
+ 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;
15065
15068
  if (!l || !c) {
15066
15069
  e == null || e(r);
15067
15070
  return;
@@ -15077,7 +15080,7 @@ const useDragEnd = (e) => {
15077
15080
  const g = createDesignable({
15078
15081
  t: o,
15079
15082
  api: n,
15080
- refresh: ({ refreshParentSchema: R = !0 } = {}) => t({ refreshParentSchema: R }),
15083
+ refresh: ({ refreshParentSchema: w = !0 } = {}) => t({ refreshParentSchema: w }),
15081
15084
  current: c
15082
15085
  });
15083
15086
  if (g.loadAPIClientEvents(), l.parent === c.parent) {
@@ -15175,14 +15178,14 @@ GridColContext.displayName = "GridColContext";
15175
15178
  const GridContext = createContext({});
15176
15179
  GridContext.displayName = "GridContext";
15177
15180
  const breakRemoveOnGrid = (e) => e["x-component"] === "Grid", breakRemoveOnRow = (e) => e["x-component"] === "Grid.Row", ColDivider = (e) => {
15178
- var F, I, w;
15181
+ var F, I, R;
15179
15182
  const { token: t } = useToken$1(), n = useRef(null), { dn: o, designable: r } = useDesignable(), { isOver: i, setNodeRef: a } = useDroppable({
15180
15183
  id: e.id,
15181
15184
  data: e.data,
15182
15185
  disabled: !r
15183
15186
  }), l = useRef(), c = useMemo(() => i ? {
15184
15187
  backgroundColor: new TinyColor(t.colorSettings).setAlpha(0.1).toHex8String()
15185
- } : {}, [i]), d = (w = (I = (F = useDndContext().active) == null ? void 0 : F.data.current) == null ? void 0 : I.schema) == null ? void 0 : w.parent, p = useMemo(
15188
+ } : {}, [i]), d = (R = (I = (F = useDndContext().active) == null ? void 0 : F.data.current) == null ? void 0 : I.schema) == null ? void 0 : R.parent, p = useMemo(
15186
15189
  () => d ? Object.keys(d.properties).length : 0,
15187
15190
  [d]
15188
15191
  );
@@ -15229,8 +15232,8 @@ const breakRemoveOnGrid = (e) => e["x-component"] === "Grid", breakRemoveOnRow =
15229
15232
  return;
15230
15233
  const D = l.current, O = D.previousElementSibling, j = D.nextElementSibling;
15231
15234
  h["x-component-props"] = h["x-component-props"] || {}, g["x-component-props"] = g["x-component-props"] || {};
15232
- const N = D.clientWidth * (e.cols.length + 1) / e.cols.length, B = (100 * (O.getBoundingClientRect().width + N) / D.parentElement.clientWidth).toFixed(2), R = (100 * (j.getBoundingClientRect().width + N) / D.parentElement.clientWidth).toFixed(2);
15233
- _.set(h, "x-component-props.width", B), _.set(g, "x-component-props.width", R), o.emit("batchPatch", {
15235
+ const N = D.clientWidth * (e.cols.length + 1) / e.cols.length, B = (100 * (O.getBoundingClientRect().width + N) / D.parentElement.clientWidth).toFixed(2), w = (100 * (j.getBoundingClientRect().width + N) / D.parentElement.clientWidth).toFixed(2);
15236
+ _.set(h, "x-component-props.width", B), _.set(g, "x-component-props.width", w), o.emit("batchPatch", {
15234
15237
  schemas: [
15235
15238
  {
15236
15239
  "x-uid": h["x-uid"],
@@ -15544,32 +15547,32 @@ const useTableBlockProps = () => {
15544
15547
  ),
15545
15548
  onChange: useCallback(
15546
15549
  ({ current: S, pageSize: y }, v, F) => {
15547
- var O, j, N, B, R, M, $, k, z, E;
15548
- const I = (N = (j = (O = t.parent) == null ? void 0 : O["x-decorator-props"]) == null ? void 0 : j.params) == null ? void 0 : N.sort, w = F.order ? F.order === "ascend" ? [F.field] : [`-${F.field}`] : I || i.dragSortBy, T = y || ((M = (R = (B = t.parent) == null ? void 0 : B["x-decorator-props"]) == null ? void 0 : R.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 });
15549
- w && (D.sort = w), (E = a.current) == null || E.service.run(D);
15550
+ var O, j, N, B, w, M, $, k, z, E;
15551
+ 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 });
15552
+ R && (D.sort = R), (E = a.current) == null || E.service.run(D);
15550
15553
  },
15551
15554
  [t.parent]
15552
15555
  ),
15553
15556
  onClickRow: useCallback(
15554
15557
  (S, y, v) => {
15555
- const { targets: F, uid: I } = findFilterTargets(t), w = r();
15556
- if (!F || !F.some((D) => w.some((O) => O.uid === D.uid))) {
15558
+ const { targets: F, uid: I } = findFilterTargets(t), R = r();
15559
+ if (!F || !F.some((D) => R.some((O) => O.uid === D.uid))) {
15557
15560
  y((D) => D.length ? [] : D);
15558
15561
  return;
15559
15562
  }
15560
- const T = w.find((D) => D.uid === t.parent["x-uid"]);
15561
- w.forEach((D) => {
15563
+ const T = R.find((D) => D.uid === t.parent["x-uid"]);
15564
+ R.forEach((D) => {
15562
15565
  var $, k, z, E;
15563
15566
  const O = F.find((q) => q.uid === D.uid);
15564
15567
  if (!O)
15565
15568
  return;
15566
- const j = getSourceKey(T, O.field) || i.rowKey || "id", N = [S[j]], B = (($ = D.service.params) == null ? void 0 : $[0]) || {}, R = ((z = (k = D.service.params) == null ? void 0 : k[1]) == null ? void 0 : z.filters) || {};
15569
+ 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) || {};
15567
15570
  if (v.includes(S[i.rowKey])) {
15568
15571
  if ((E = D.clearSelection) == null || E.call(D), D.dataLoadingMode === "manual")
15569
15572
  return D.clearData();
15570
- delete R[I];
15573
+ delete w[I];
15571
15574
  } else
15572
- R[I] = {
15575
+ w[I] = {
15573
15576
  $and: [
15574
15577
  {
15575
15578
  [O.field || i.rowKey]: {
@@ -15579,7 +15582,7 @@ const useTableBlockProps = () => {
15579
15582
  ]
15580
15583
  };
15581
15584
  const M = mergeFilter([
15582
- ...Object.values(R).map((q) => removeNullCondition(q)),
15585
+ ...Object.values(w).map((q) => removeNullCondition(q)),
15583
15586
  D.defaultFilter
15584
15587
  ]);
15585
15588
  return D.doFilter(
@@ -15587,7 +15590,7 @@ const useTableBlockProps = () => {
15587
15590
  page: 1,
15588
15591
  filter: M
15589
15592
  }),
15590
- { filters: R }
15593
+ { filters: w }
15591
15594
  );
15592
15595
  }), y(
15593
15596
  (D) => D != null && D.includes(S[i.rowKey]) ? [] : [S[i.rowKey]]
@@ -15670,12 +15673,12 @@ const NOOP = () => {
15670
15673
  return;
15671
15674
  const v = t(i);
15672
15675
  if (setFieldProps(n, "content", v["x-content"]), setFieldProps(n, "title", v.title), setFieldProps(n, "description", v.description), m != null && m.form) {
15673
- const w = c() ? o.default || a : void 0;
15674
- w != null && setFieldProps(n, "initialValue", w);
15676
+ const R = c() ? o.default || a : void 0;
15677
+ R != null && setFieldProps(n, "initialValue", R);
15675
15678
  }
15676
15679
  if (!n.validator && (v["x-validator"] || o["x-validator"])) {
15677
- const w = concat([], v["x-validator"] || [], o["x-validator"] || []);
15678
- n.validator = w;
15680
+ const R = concat([], v["x-validator"] || [], o["x-validator"] || []);
15681
+ n.validator = R;
15679
15682
  }
15680
15683
  o["x-disabled"] === !0 && (n.disabled = !0), o["x-read-pretty"] === !0 && (n.readPretty = !0), setRequired(n, o, v), n.dataSource = v.enum;
15681
15684
  const F = t(x(x(x({}, ((I = d == null ? void 0 : d.schema) == null ? void 0 : I["x-component-props"]) || {}), v["x-component-props"] || {}), (o == null ? void 0 : o["x-component-props"]) || {})) || {};
@@ -15971,10 +15974,10 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
15971
15974
  var a, l, c, u, d, p, m, h, g, f, C, b, S, y, v, F;
15972
15975
  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"]);
15973
15976
  return useEffect(() => {
15974
- var w, T, D, O, j, N, B, R, M, $, k, z, E;
15975
- if (!((w = t == null ? void 0 : t.service) != null && w.loading)) {
15977
+ var R, T, D, O, j, N, B, w, M, $, k, z, E;
15978
+ if (!((R = t == null ? void 0 : t.service) != null && R.loading)) {
15976
15979
  const q = (D = (T = t == null ? void 0 : t.service) == null ? void 0 : T.data) == null ? void 0 : D.data.map((L) => L);
15977
- 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 = (R = t == null ? void 0 : t.service) == null ? void 0 : R.data) == null ? void 0 : M.meta) == null ? void 0 : $.count, e.componentProps.pagination.current = (E = (z = (k = t == null ? void 0 : t.service) == null ? void 0 : k.data) == null ? void 0 : z.meta) == null ? void 0 : E.page;
15980
+ 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 = (E = (z = (k = t == null ? void 0 : t.service) == null ? void 0 : k.data) == null ? void 0 : z.meta) == null ? void 0 : E.page;
15978
15981
  }
15979
15982
  }, [
15980
15983
  i == null ? void 0 : i.foreignKey,
@@ -15991,21 +15994,21 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
15991
15994
  dragSort: !1,
15992
15995
  rowKey: t.rowKey || "id",
15993
15996
  pagination: ((F = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : F.pagination) === !1 ? !1 : e.componentProps.pagination,
15994
- onRowSelectionChange(w, T) {
15997
+ onRowSelectionChange(R, T) {
15995
15998
  var D;
15996
- t.field.data = ((D = t == null ? void 0 : t.field) == null ? void 0 : D.data) || {}, t.field.data.selectedRowKeys = w, t.field.data.selectedRowData = T;
15999
+ t.field.data = ((D = t == null ? void 0 : t.field) == null ? void 0 : D.data) || {}, t.field.data.selectedRowKeys = R, t.field.data.selectedRowData = T;
15997
16000
  },
15998
16001
  onRowDragEnd(D) {
15999
- return V(this, arguments, function* ({ from: w, to: T }) {
16002
+ return V(this, arguments, function* ({ from: R, to: T }) {
16000
16003
  yield t.resource.move({
16001
- sourceId: w[t.rowKey || "id"],
16004
+ sourceId: R[t.rowKey || "id"],
16002
16005
  targetId: T[t.rowKey || "id"]
16003
16006
  }), t.service.refresh();
16004
16007
  });
16005
16008
  },
16006
- onChange({ current: w, pageSize: T }) {
16009
+ onChange({ current: R, pageSize: T }) {
16007
16010
  var D;
16008
- t.service.run(P(x({}, (D = t.service.params) == null ? void 0 : D[0]), { page: w, pageSize: T }));
16011
+ t.service.run(P(x({}, (D = t.service.params) == null ? void 0 : D[0]), { page: R, pageSize: T }));
16009
16012
  }
16010
16013
  };
16011
16014
  }, BlockSchemaComponentProvider = (e) => /* @__PURE__ */ jsx(
@@ -16757,7 +16760,7 @@ const useFormItemInitializerFields = (e) => {
16757
16760
  var d, p;
16758
16761
  const { name: t, currentFields: n } = useCollection_deprecated(), { getInterface: o, getCollection: r } = useCollectionManager_deprecated(), i = useForm(), { readPretty: a = i.readPretty, block: l = "Form" } = e || {}, { fieldSchema: c } = useActionContext(), u = c == null ? void 0 : c["x-action"];
16759
16762
  return (p = (d = n.filter((m) => !m.collectionName || m.collectionName === t)) == null ? void 0 : d.filter((m) => (m == null ? void 0 : m.interface) && !(m != null && m.treeChildren))) == null ? void 0 : p.map((m) => {
16760
- var v, F, I, w, T;
16763
+ var v, F, I, R, T;
16761
16764
  const h = o(m.interface), g = r(m.target), f = (m == null ? void 0 : m.target) && ((v = r(m == null ? void 0 : m.target)) == null ? void 0 : v.template) === "file", C = g, b = (I = (F = m == null ? void 0 : m.uiSchema) == null ? void 0 : F["x-component-props"]) == null ? void 0 : I.fieldNames, S = {
16762
16765
  type: "string",
16763
16766
  name: m.name,
@@ -16774,7 +16777,7 @@ const useFormItemInitializerFields = (e) => {
16774
16777
  } : C && b ? {
16775
16778
  fieldNames: P(x({}, b), { label: (g == null ? void 0 : g.titleField) || b.label })
16776
16779
  } : {},
16777
- "x-read-pretty": (w = m == null ? void 0 : m.uiSchema) == null ? void 0 : w["x-read-pretty"]
16780
+ "x-read-pretty": (R = m == null ? void 0 : m.uiSchema) == null ? void 0 : R["x-read-pretty"]
16778
16781
  }, y = {
16779
16782
  type: "item",
16780
16783
  name: m.name,
@@ -16943,9 +16946,9 @@ const useFormItemInitializerFields = (e) => {
16943
16946
  title: ((I = f == null ? void 0 : f.uiSchema) == null ? void 0 : I.title) || f.name,
16944
16947
  Component: "CollectionFieldInitializer",
16945
16948
  remove: removeGridFormItem,
16946
- schemaInitialize: (w) => {
16949
+ schemaInitialize: (R) => {
16947
16950
  var T;
16948
- (T = C == null ? void 0 : C.schemaInitialize) == null || T.call(C, w, {
16951
+ (T = C == null ? void 0 : C.schemaInitialize) == null || T.call(C, R, {
16949
16952
  field: f,
16950
16953
  block: p,
16951
16954
  readPretty: d,
@@ -16991,8 +16994,8 @@ const useFormItemInitializerFields = (e) => {
16991
16994
  Component: "CollectionFieldInitializer",
16992
16995
  remove: removeGridFormItem,
16993
16996
  schemaInitialize: (I) => {
16994
- var w;
16995
- (w = f == null ? void 0 : f.schemaInitialize) == null || w.call(f, I, {
16997
+ var R;
16998
+ (R = f == null ? void 0 : f.schemaInitialize) == null || R.call(f, I, {
16996
16999
  field: g,
16997
17000
  block: p,
16998
17001
  readPretty: d,
@@ -17141,9 +17144,9 @@ const useFormItemInitializerFields = (e) => {
17141
17144
  filterDataSource: i
17142
17145
  });
17143
17146
  o && (y = y.filter((I) => I.key === f));
17144
- const { getTemplatesByCollection: v } = useSchemaTemplateManager(), F = useMemo(() => y.map(({ key: I, displayName: w, collections: T }) => ({
17147
+ const { getTemplatesByCollection: v } = useSchemaTemplateManager(), F = useMemo(() => y.map(({ key: I, displayName: R, collections: T }) => ({
17145
17148
  name: I,
17146
- label: w,
17149
+ label: R,
17147
17150
  type: "subMenu",
17148
17151
  children: [
17149
17152
  ...getChildren$1({
@@ -17181,7 +17184,7 @@ const useFormItemInitializerFields = (e) => {
17181
17184
  hideChildrenIfSingleCollection: !0,
17182
17185
  items: F
17183
17186
  })
17184
- }, w = {
17187
+ }, R = {
17185
17188
  name: "associationRecords",
17186
17189
  Component: DataBlockInitializer,
17187
17190
  // 目的是使点击无效
@@ -17220,7 +17223,7 @@ const useFormItemInitializerFields = (e) => {
17220
17223
  hideChildrenIfSingleCollection: !1,
17221
17224
  fromOthersInPopup: !0,
17222
17225
  componentType: T[t] || t,
17223
- filter({ collection: B, associationField: R }) {
17226
+ filter({ collection: B, associationField: w }) {
17224
17227
  return u ? u(B) : !0;
17225
17228
  },
17226
17229
  onClick(B) {
@@ -17229,7 +17232,7 @@ const useFormItemInitializerFields = (e) => {
17229
17232
  })
17230
17233
  };
17231
17234
  let O;
17232
- const j = b.length ? w : null;
17235
+ const j = b.length ? R : null;
17233
17236
  if (F[0].children.length && b.length)
17234
17237
  l ? O = [I, j] : O = [I, j, D];
17235
17238
  else if (F[0].children.length)
@@ -17704,9 +17707,9 @@ function getGroupItemForForm({
17704
17707
  title: ((I = C == null ? void 0 : C.uiSchema) == null ? void 0 : I.title) || C.name,
17705
17708
  Component: "CollectionFieldInitializer",
17706
17709
  remove: removeGridFormItem,
17707
- schemaInitialize: (w) => {
17710
+ schemaInitialize: (R) => {
17708
17711
  var T;
17709
- (T = b == null ? void 0 : b.schemaInitialize) == null || T.call(b, w, {
17712
+ (T = b == null ? void 0 : b.schemaInitialize) == null || T.call(b, R, {
17710
17713
  field: C,
17711
17714
  block: i,
17712
17715
  readPretty: r,
@@ -17977,7 +17980,7 @@ const useGetAriaLabelOfDesigner = () => {
17977
17980
  }, { render: C, exists: b } = useSchemaSettingsRender(
17978
17981
  t["x-settings"] || i,
17979
17982
  t["x-settings-props"]
17980
- ), S = useGridRowContext(), y = useGridContext(), v = useDataSourceManager(), F = v == null ? void 0 : v.getDataSources(), I = useDataSource(), w = (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(() => {
17983
+ ), 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(() => {
17981
17984
  var N;
17982
17985
  return {
17983
17986
  insertPosition: "afterEnd",
@@ -17994,7 +17997,7 @@ const useGetAriaLabelOfDesigner = () => {
17994
17997
  }, [g, (O = S == null ? void 0 : S.cols) == null ? void 0 : O.length]);
17995
17998
  return d ? /* @__PURE__ */ jsx(SchemaToolbarProvider, P(x({}, a), { children: /* @__PURE__ */ jsxs("div", { className: cls("general-schema-designer", overrideAntdCSS), children: [
17996
17999
  o && /* @__PURE__ */ jsx("div", { className: cls("general-schema-designer-title", titleCss), children: /* @__PURE__ */ jsxs(Space$1, { size: 2, children: [
17997
- /* @__PURE__ */ jsx("span", { className: "title-tag", children: c && w ? `${h(w == null ? void 0 : w.displayName)} > ${h(o)}` : h(o) }),
18000
+ /* @__PURE__ */ jsx("span", { className: "title-tag", children: c && R ? `${h(R == null ? void 0 : R.displayName)} > ${h(o)}` : h(o) }),
17998
18001
  r && /* @__PURE__ */ jsxs("span", { className: "title-tag", children: [
17999
18002
  m("Reference template"),
18000
18003
  ": ",
@@ -18037,7 +18040,7 @@ const useGetAriaLabelOfDesigner = () => {
18037
18040
  toolbarClassName: m,
18038
18041
  toolbarStyle: h = {},
18039
18042
  container: g
18040
- } = 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(), w = useDataSource(), T = (I == null ? void 0 : I.length) > 1 && w, D = useRefreshFieldSchema(), O = useCallback(() => {
18043
+ } = 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(() => {
18041
18044
  D({ refreshParentSchema: !0 });
18042
18045
  }, [D]), j = useMemo(() => {
18043
18046
  if (n) {
@@ -18049,7 +18052,7 @@ const useGetAriaLabelOfDesigner = () => {
18049
18052
  }, [n]), { render: N, exists: B } = useSchemaSettingsRender(
18050
18053
  r || (t == null ? void 0 : t["x-settings"]),
18051
18054
  t == null ? void 0 : t["x-settings-props"]
18052
- ), { render: R, exists: M } = useSchemaInitializerRender(
18055
+ ), { render: w, exists: M } = useSchemaInitializerRender(
18053
18056
  o || (t == null ? void 0 : t["x-initializer"]),
18054
18057
  t == null ? void 0 : t["x-initializer-props"]
18055
18058
  ), $ = useGridRowContext(), k = useGridContext(), z = useMemo(() => {
@@ -18071,10 +18074,10 @@ const useGetAriaLabelOfDesigner = () => {
18071
18074
  if (o === !1)
18072
18075
  return null;
18073
18076
  if (M)
18074
- return R(z);
18077
+ return w(z);
18075
18078
  if (k != null && k.InitializerComponent || k != null && k.renderSchemaInitializer)
18076
18079
  return k != null && k.InitializerComponent ? /* @__PURE__ */ jsx(k.InitializerComponent, x({}, z)) : (K = k.renderSchemaInitializer) == null ? void 0 : K.call(k, z);
18077
- }, [k, o, z, M, R]), L = useMemo(() => r !== !1 && B ? N() : null, [B, N, r]), G = useRef(null), U = "hidden";
18080
+ }, [k, o, z, M, w]), L = useMemo(() => r !== !1 && B ? N() : null, [B, N, r]), G = useRef(null), U = "hidden";
18078
18081
  useEffect(() => {
18079
18082
  const K = G.current;
18080
18083
  let W = K == null ? void 0 : K.parentElement;
@@ -18151,23 +18154,23 @@ const SchemaToolbarErrorFallback = (e) => {
18151
18154
  }, useCollectionManager_deprecated = (e) => {
18152
18155
  const t = useDataSourceManager(), n = useDataSource(), o = useCollectionManager(), r = e || (n == null ? void 0 : n.key) || void 0, [i, a] = useState(uid()), { refresh: l } = useSchemaComponentContext(), c = useMemo(
18153
18156
  () => {
18154
- var R;
18155
- return (R = t == null ? void 0 : t.collectionFieldInterfaceManager) == null ? void 0 : R.getFieldInterfaces().reduce((M, $) => (M[$.name] = $, M), {});
18157
+ var w;
18158
+ return (w = t == null ? void 0 : t.collectionFieldInterfaceManager) == null ? void 0 : w.getFieldInterfaces().reduce((M, $) => (M[$.name] = $, M), {});
18156
18159
  },
18157
18160
  [t, i]
18158
18161
  ), u = useMemo(() => t == null ? void 0 : t.collectionTemplateManager.getCollectionTemplates(), [t, i]), d = useCallback(() => {
18159
- var R, M;
18160
- return (M = (R = t == null ? void 0 : t.getDataSource(r)) == null ? void 0 : R.collectionManager) == null ? void 0 : M.getCollections().map(($) => $.getOptions());
18162
+ var w, M;
18163
+ return (M = (w = t == null ? void 0 : t.getDataSource(r)) == null ? void 0 : w.collectionManager) == null ? void 0 : M.getCollections().map(($) => $.getOptions());
18161
18164
  }, [t, n]), p = useCallback(
18162
- (R) => {
18165
+ (w) => {
18163
18166
  var M;
18164
- return o && !R ? o : (M = t == null ? void 0 : t.getDataSource(R || r)) == null ? void 0 : M.collectionManager;
18167
+ return o && !w ? o : (M = t == null ? void 0 : t.getDataSource(w || r)) == null ? void 0 : M.collectionManager;
18165
18168
  },
18166
18169
  [o, t, r]
18167
18170
  ), m = useMemo(
18168
18171
  () => {
18169
- var R, M;
18170
- return (M = (R = t == null ? void 0 : t.getDataSource(DEFAULT_DATA_SOURCE_KEY)) == null ? void 0 : R.collectionManager) == null ? void 0 : M.getCollections();
18172
+ var w, M;
18173
+ return (M = (w = t == null ? void 0 : t.getDataSource(DEFAULT_DATA_SOURCE_KEY)) == null ? void 0 : w.collectionManager) == null ? void 0 : M.getCollections();
18171
18174
  },
18172
18175
  [t, i]
18173
18176
  ), h = useCallback(
@@ -18181,55 +18184,55 @@ const SchemaToolbarErrorFallback = (e) => {
18181
18184
  }),
18182
18185
  [t]
18183
18186
  ), f = useCompile(), C = useCallback(
18184
- (R, M) => {
18187
+ (w, M) => {
18185
18188
  var $, k;
18186
- return ((k = ($ = p(M)) == null ? void 0 : $.getCollection(R)) == null ? void 0 : k.getInheritedFields()) || [];
18189
+ return ((k = ($ = p(M)) == null ? void 0 : $.getCollection(w)) == null ? void 0 : k.getInheritedFields()) || [];
18187
18190
  },
18188
18191
  [t, p]
18189
18192
  ), b = useCallback(
18190
- (R, M) => {
18193
+ (w, M) => {
18191
18194
  var k, z;
18192
- if (!R)
18195
+ if (!w)
18193
18196
  return [];
18194
- const $ = (k = p(M)) == null ? void 0 : k.getCollection(R);
18197
+ const $ = (k = p(M)) == null ? void 0 : k.getCollection(w);
18195
18198
  return ((z = $ == null ? void 0 : $.getAllFields) == null ? void 0 : z.call($)) || ($ == null ? void 0 : $.getFields()) || [];
18196
18199
  },
18197
18200
  [t, p]
18198
18201
  ), S = useCallback(
18199
- (R, M) => {
18202
+ (w, M) => {
18200
18203
  var $;
18201
- if (!(!R || R.split(".").length < 2))
18202
- return ($ = p(M)) == null ? void 0 : $.getCollectionField(R);
18204
+ if (!(!w || w.split(".").length < 2))
18205
+ return ($ = p(M)) == null ? void 0 : $.getCollectionField(w);
18203
18206
  },
18204
18207
  [t, p]
18205
18208
  ), y = useCallback(
18206
- (R, M) => {
18209
+ (w, M) => {
18207
18210
  var $, k;
18208
- return R ? ((k = ($ = p(M)) == null ? void 0 : $.getCollection(R)) == null ? void 0 : k.getParentCollectionsName()) || [] : [];
18211
+ return w ? ((k = ($ = p(M)) == null ? void 0 : $.getCollection(w)) == null ? void 0 : k.getParentCollectionsName()) || [] : [];
18209
18212
  },
18210
18213
  [t, p]
18211
18214
  ), v = useCallback(
18212
- (R, M = !1, $) => {
18215
+ (w, M = !1, $) => {
18213
18216
  var E;
18214
- if (!R)
18217
+ if (!w)
18215
18218
  return [];
18216
- const k = (E = p($)) == null ? void 0 : E.getCollection(R);
18219
+ const k = (E = p($)) == null ? void 0 : E.getCollection(w);
18217
18220
  return (k == null ? void 0 : k.getChildrenCollections(M)) || [];
18218
18221
  },
18219
18222
  [t, p]
18220
18223
  ), F = useCallback(
18221
- (R, M) => {
18224
+ (w, M) => {
18222
18225
  var $, k;
18223
- return R ? ((k = ($ = p(M)) == null ? void 0 : $.getCollection(R)) == null ? void 0 : k.getCurrentFields()) || [] : [];
18226
+ return w ? ((k = ($ = p(M)) == null ? void 0 : $.getCollection(w)) == null ? void 0 : k.getCurrentFields()) || [] : [];
18224
18227
  },
18225
18228
  [t, p]
18226
18229
  ), I = useCallback(
18227
- (R, M, $, k) => {
18230
+ (w, M, $, k) => {
18228
18231
  var ee;
18229
18232
  const {
18230
18233
  association: z = !1,
18231
18234
  cached: E = {},
18232
- collectionNames: q = [R],
18235
+ collectionNames: q = [w],
18233
18236
  maxDepth: L = 1,
18234
18237
  allowAllTypes: G = !1,
18235
18238
  exceptInterfaces: U = [],
@@ -18239,11 +18242,11 @@ const SchemaToolbarErrorFallback = (e) => {
18239
18242
  } = k || {};
18240
18243
  if (q.length - 1 > L)
18241
18244
  return;
18242
- if (E[R])
18243
- return _.cloneDeep(E[R]);
18245
+ if (E[w])
18246
+ return _.cloneDeep(E[w]);
18244
18247
  M && typeof M == "string" && (M = [M]), $ && typeof $ == "string" && ($ = [$]);
18245
- const W = b(R, K), X = (ee = W == null ? void 0 : W.filter(
18246
- (Z) => Z.interface && !U.includes(Z.interface) && (G || M && M.includes(Z.type) || $ && $.includes(Z.interface) || (z && Z.target && Z.target !== R && Array.isArray(z) ? z.includes(Z.interface) : !1))
18248
+ const W = b(w, K), X = (ee = W == null ? void 0 : W.filter(
18249
+ (Z) => Z.interface && !U.includes(Z.interface) && (G || M && M.includes(Z.type) || $ && $.includes(Z.interface) || (z && Z.target && Z.target !== w && Array.isArray(z) ? z.includes(Z.interface) : !1))
18247
18250
  )) == null ? void 0 : ee.map((Z) => {
18248
18251
  var re, se;
18249
18252
  const ne = x({
@@ -18258,44 +18261,44 @@ const SchemaToolbarErrorFallback = (e) => {
18258
18261
  usePrefix: J
18259
18262
  })), !((se = ne.children) != null && se.length)) ? null : ne;
18260
18263
  }).filter(Boolean);
18261
- return E[R] = X, X;
18264
+ return E[w] = X, X;
18262
18265
  },
18263
18266
  [b]
18264
- ), w = useCallback(
18265
- (R, M) => {
18267
+ ), R = useCallback(
18268
+ (w, M) => {
18266
18269
  var $;
18267
- return ($ = p(M)) == null ? void 0 : $.getCollection(R);
18270
+ return ($ = p(M)) == null ? void 0 : $.getCollection(w);
18268
18271
  },
18269
18272
  [t, p]
18270
18273
  ), T = useCallback(
18271
- (R, M) => {
18274
+ (w, M) => {
18272
18275
  var $, k;
18273
- return (k = ($ = p(M)) == null ? void 0 : $.getCollection(R)) == null ? void 0 : k.getAllCollectionsInheritChain();
18276
+ return (k = ($ = p(M)) == null ? void 0 : $.getCollection(w)) == null ? void 0 : k.getAllCollectionsInheritChain();
18274
18277
  },
18275
18278
  [t, p]
18276
18279
  ), D = useCallback(
18277
- (R, M) => () => {
18280
+ (w, M) => () => {
18278
18281
  var $, k;
18279
- return (k = ($ = p(M)) == null ? void 0 : $.getCollection(R)) == null ? void 0 : k.getInheritCollectionsChain();
18282
+ return (k = ($ = p(M)) == null ? void 0 : $.getCollection(w)) == null ? void 0 : k.getInheritCollectionsChain();
18280
18283
  },
18281
18284
  [t, p]
18282
18285
  ), O = useCallback(
18283
- (R) => t == null ? void 0 : t.collectionFieldInterfaceManager.getFieldInterface(R),
18286
+ (w) => t == null ? void 0 : t.collectionFieldInterfaceManager.getFieldInterface(w),
18284
18287
  [t]
18285
18288
  ), j = useCallback(
18286
- (R) => {
18289
+ (w) => {
18287
18290
  var M;
18288
- return (M = O(R.interface)) == null ? void 0 : M.titleUsable;
18291
+ return (M = O(w.interface)) == null ? void 0 : M.titleUsable;
18289
18292
  },
18290
18293
  [O]
18291
18294
  ), N = useCallback(
18292
- (R, M, $) => {
18295
+ (w, M, $) => {
18293
18296
  var k, z;
18294
- return (z = (k = p($)) == null ? void 0 : k.getCollection(M)) == null ? void 0 : z.getParentCollectionFields(R);
18297
+ return (z = (k = p($)) == null ? void 0 : k.getCollection(M)) == null ? void 0 : z.getParentCollectionFields(w);
18295
18298
  },
18296
18299
  [t, p]
18297
18300
  ), B = useCallback(
18298
- (R = "general") => t == null ? void 0 : t.collectionTemplateManager.getCollectionTemplate(R),
18301
+ (w = "general") => t == null ? void 0 : t.collectionTemplateManager.getCollectionTemplate(w),
18299
18302
  [t]
18300
18303
  );
18301
18304
  return {
@@ -18310,13 +18313,13 @@ const SchemaToolbarErrorFallback = (e) => {
18310
18313
  getInheritCollections: y,
18311
18314
  getChildrenCollections: v,
18312
18315
  refreshCM: g,
18313
- get: w,
18316
+ get: R,
18314
18317
  getInheritedFields: C,
18315
18318
  getCollectionField: S,
18316
18319
  getCollectionFields: b,
18317
18320
  getCollectionFieldsOptions: I,
18318
18321
  getCurrentCollectionFields: F,
18319
- getCollection: w,
18322
+ getCollection: R,
18320
18323
  getCollectionJoinField: S,
18321
18324
  getAllCollectionsInheritChain: T,
18322
18325
  getInheritCollectionsChain: D,
@@ -19470,7 +19473,7 @@ const ParentCollectionProvider = (e) => {
19470
19473
  collectionField: e,
19471
19474
  noDisabled: r,
19472
19475
  targetFieldSchema: i
19473
- }), { settings: w, shouldDisplayParentPopupRecord: T } = useParentPopupVariable({
19476
+ }), { settings: R, shouldDisplayParentPopupRecord: T } = useParentPopupVariable({
19474
19477
  schema: n,
19475
19478
  collectionField: e,
19476
19479
  noDisabled: r,
@@ -19493,7 +19496,7 @@ const ParentCollectionProvider = (e) => {
19493
19496
  v && y,
19494
19497
  O && D,
19495
19498
  I && F,
19496
- T && w,
19499
+ T && R,
19497
19500
  N && j
19498
19501
  ].filter(Boolean).filter(l), [
19499
19502
  u,
@@ -19546,8 +19549,8 @@ const findOption$1 = (e = [], t) => {
19546
19549
  if (n.data.dataIndex = b, (b == null ? void 0 : b.length) > 1) {
19547
19550
  const I = b.concat();
19548
19551
  I.pop();
19549
- const w = t(`${e}.${I.join(".")}`);
19550
- i.collectionName = w == null ? void 0 : w.target;
19552
+ const R = t(`${e}.${I.join(".")}`);
19553
+ i.collectionName = R == null ? void 0 : R.target;
19551
19554
  } else
19552
19555
  i.collectionName = null;
19553
19556
  n.data.operators = y, n.data.operator = v, n.data.schema = merge(S == null ? void 0 : S.schema, v == null ? void 0 : v.schema), n.data.value = get$1(unflatten(n.value), `${g}.$${C}`);
@@ -19701,7 +19704,7 @@ const findOption$1 = (e = [], t) => {
19701
19704
  blockCollectionName: C
19702
19705
  });
19703
19706
  l && v.every((T) => T.value !== F.value) && v.push(F);
19704
- const w = useCallback(
19707
+ const R = useCallback(
19705
19708
  (T, D) => {
19706
19709
  if (!u)
19707
19710
  return n(T);
@@ -19716,7 +19719,7 @@ const findOption$1 = (e = [], t) => {
19716
19719
  {
19717
19720
  className: a,
19718
19721
  value: t,
19719
- onChange: w,
19722
+ onChange: R,
19720
19723
  scope: m(
19721
19724
  I(_.isEmpty(b) ? v : b, {
19722
19725
  value: t
@@ -20191,22 +20194,22 @@ const compatibleDataId = (e, t) => e == null ? void 0 : e.map((n) => {
20191
20194
  ),
20192
20195
  []
20193
20196
  ), f = (F) => {
20194
- var w;
20197
+ var R;
20195
20198
  const I = p(F);
20196
20199
  return m(
20197
- `${F}.${((w = g == null ? void 0 : g.config[F]) == null ? void 0 : w.titleField) || (I == null ? void 0 : I.titleField) || "id"}`
20200
+ `${F}.${((R = g == null ? void 0 : g.config[F]) == null ? void 0 : R.titleField) || (I == null ? void 0 : I.titleField) || "id"}`
20198
20201
  );
20199
20202
  }, C = (F) => {
20200
- var w, T;
20203
+ var R, T;
20201
20204
  const I = p(F);
20202
20205
  return {
20203
- label: getLabel(((T = (w = g.config) == null ? void 0 : w[F]) == null ? void 0 : T.titleField) || (I == null ? void 0 : I.titleField) || "id"),
20206
+ label: getLabel(((T = (R = g.config) == null ? void 0 : R[F]) == null ? void 0 : T.titleField) || (I == null ? void 0 : I.titleField) || "id"),
20204
20207
  value: "id"
20205
20208
  };
20206
20209
  }, b = (F, I) => {
20207
20210
  var T, D;
20208
- const w = (D = (T = g.config) == null ? void 0 : T[F]) == null ? void 0 : D.filter;
20209
- return _.isEmpty(w) ? {} : removeNullCondition(mergeFilter([w, getSelectedIdFilter(I)], "$or"));
20211
+ const R = (D = (T = g.config) == null ? void 0 : T[F]) == null ? void 0 : D.filter;
20212
+ return _.isEmpty(R) ? {} : removeNullCondition(mergeFilter([R, getSelectedIdFilter(I)], "$or"));
20210
20213
  }, S = useMemo(() => ({ ArrayCollapse: ArrayCollapse$1 }), []), y = useMemo(
20211
20214
  () => ({
20212
20215
  getEnableFieldTree: a,
@@ -20579,11 +20582,11 @@ const DynamicComponent$1 = (e) => {
20579
20582
  [a, o]
20580
20583
  ), f = useMemo(() => ({ minWidth: 150, maxWidth: 430, fontSize: 13 }), []), C = useCallback(
20581
20584
  (I) => {
20582
- const w = I.replaceAll(`${r}.`, "").replaceAll("$system.", "").trim();
20585
+ const R = I.replaceAll(`${r}.`, "").replaceAll("$system.", "").trim();
20583
20586
  o({
20584
20587
  mode: a,
20585
20588
  value: I,
20586
- result: w
20589
+ result: R
20587
20590
  });
20588
20591
  },
20589
20592
  [r, a, o]
@@ -21578,7 +21581,7 @@ const SchemaSettingsSwitchItem = (e) => {
21578
21581
  )
21579
21582
  ] });
21580
21583
  }, SchemaSettingsActionModalItem = React.memo((e) => {
21581
- const R = e, {
21584
+ const w = e, {
21582
21585
  title: t,
21583
21586
  onSubmit: n,
21584
21587
  width: o = "50%",
@@ -21589,7 +21592,7 @@ const SchemaSettingsSwitchItem = (e) => {
21589
21592
  modalTip: c,
21590
21593
  components: u,
21591
21594
  scope: d
21592
- } = R, p = Y(R, [
21595
+ } = w, p = Y(w, [
21593
21596
  "title",
21594
21597
  "onSubmit",
21595
21598
  "width",
@@ -21600,7 +21603,7 @@ const SchemaSettingsSwitchItem = (e) => {
21600
21603
  "modalTip",
21601
21604
  "components",
21602
21605
  "scope"
21603
- ]), [m, h] = useState(!1), [g, f] = useState(e.uid), { t: C } = useTranslation(), b = useFieldSchema(), S = useContext(SchemaSettingsContext), { dn: y } = useSchemaSettings(), v = useCompile(), F = useAPIClient(), I = useFormActiveFields(), w = useZIndexContext(), T = getZIndex("modal", w + 10, 0), D = useMemo(
21606
+ ]), [m, h] = useState(!1), [g, f] = useState(e.uid), { t: C } = useTranslation(), b = useFieldSchema(), S = useContext(SchemaSettingsContext), { dn: y } = useSchemaSettings(), v = useCompile(), F = useAPIClient(), I = useFormActiveFields(), R = useZIndexContext(), T = getZIndex("modal", R + 10, 0), D = useMemo(
21604
21607
  () => createForm({
21605
21608
  initialValues: cloneDeep$1(r),
21606
21609
  values: cloneDeep$1(r)
@@ -21687,7 +21690,7 @@ const SchemaSettingsModalItem = (e) => {
21687
21690
  "width",
21688
21691
  "noRecord",
21689
21692
  "ModalContextProvider"
21690
- ]), 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(), w = useCollectionRecord(), { association: T } = useDataBlockProps() || {}, D = useCurrentRecord(), O = useFormBlockContext(), j = useBlockContext(), { getOperators: N } = useOperators(), B = useLocationSearch(), R = useVariables$1(), { formValue: M, collection: $, parent: k } = useSubFormValue(), z = useCurrentPopupRecord(), E = useParentPopupRecord();
21693
+ ]), 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(), E = useParentPopupRecord();
21691
21694
  return t ? null : /* @__PURE__ */ jsx(
21692
21695
  SchemaSettingsItem,
21693
21696
  P(x({
@@ -21697,7 +21700,7 @@ const SchemaSettingsModalItem = (e) => {
21697
21700
  const L = l ? yield l() : c, G = _.isFunction(e.schema) ? e.schema() : e.schema;
21698
21701
  FormDialog(
21699
21702
  { title: G.title || n, width: u },
21700
- () => /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(CollectOperators, { defaultOperators: N(), children: /* @__PURE__ */ jsx(VariablesContext.Provider, { value: R, children: /* @__PURE__ */ jsx(BlockContext.Provider, { value: j, children: /* @__PURE__ */ jsx(
21703
+ () => /* @__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(
21701
21704
  VariablePopupRecordProvider,
21702
21705
  {
21703
21706
  recordData: z == null ? void 0 : z.value,
@@ -21706,7 +21709,7 @@ const SchemaSettingsModalItem = (e) => {
21706
21709
  recordData: E == null ? void 0 : E.value,
21707
21710
  collection: E == null ? void 0 : E.collection
21708
21711
  },
21709
- children: /* @__PURE__ */ jsx(CollectionRecordProvider, { record: d ? null : w, 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(
21712
+ 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(
21710
21713
  FormActiveFieldsProvider,
21711
21714
  {
21712
21715
  name: "form",
@@ -21862,10 +21865,10 @@ const SchemaSettingsModalItem = (e) => {
21862
21865
  const { collectionName: n, readPretty: o, Component: r, afterSubmit: i } = t, a = useFieldSchema(), { form: l } = useFormBlockContext(), { dn: c } = useDesignable(), { t: u } = useTranslation(), { getTemplateById: d } = useSchemaTemplateManager(), p = useVariables$1(), m = useLocalVariables$1(), h = useRecord(), { type: g } = useFormBlockType(), f = (j = t == null ? void 0 : t.category) != null ? j : LinkageRuleCategory.default, C = (t == null ? void 0 : t.type) || (a != null && a["x-action"] || ["Action", "Action.Link"].includes(a["x-component"]) ? "button" : "field"), b = findGridSchema(a) || a, S = useLinkageCollectionFilterOptions(n), y = useLinkageCollectionFieldOptions(n, o), v = {
21863
21866
  [LinkageRuleCategory.default]: u("Linkage rules"),
21864
21867
  [LinkageRuleCategory.style]: u("Style")
21865
- }, F = LinkageRuleDataKeyMap[f], I = useCallback(() => (b == null ? void 0 : b[F]) || (a == null ? void 0 : a[F]) || [], [b, a, F]), w = v[f], T = useMemo(
21868
+ }, F = LinkageRuleDataKeyMap[f], I = useCallback(() => (b == null ? void 0 : b[F]) || (a == null ? void 0 : a[F]) || [], [b, a, F]), R = v[f], T = useMemo(
21866
21869
  () => ({
21867
21870
  type: "object",
21868
- title: w,
21871
+ title: R,
21869
21872
  properties: {
21870
21873
  fieldReaction: {
21871
21874
  "x-component": r || FormLinkageRules,
@@ -21892,8 +21895,8 @@ const SchemaSettingsModalItem = (e) => {
21892
21895
  const B = [];
21893
21896
  for (const z of N.fieldReaction.rules)
21894
21897
  B.push(_.pickBy(z, _.identity));
21895
- const R = b["x-component"] === "BlockTemplate" && ((k = b["x-component-props"]) == null ? void 0 : k.templateId), $ = {
21896
- "x-uid": R && d(R).uid || b["x-uid"]
21898
+ const w = b["x-component"] === "BlockTemplate" && ((k = b["x-component-props"]) == null ? void 0 : k.templateId), $ = {
21899
+ "x-uid": w && d(w).uid || b["x-uid"]
21897
21900
  };
21898
21901
  b[F] = B, $[F] = B, c.emit("patch", {
21899
21902
  schema: $
@@ -21901,7 +21904,7 @@ const SchemaSettingsModalItem = (e) => {
21901
21904
  },
21902
21905
  [c, d, b, F, i]
21903
21906
  );
21904
- return /* @__PURE__ */ jsx(SchemaSettingsModalItem, { title: w, components: D, width: 770, schema: T, onSubmit: O });
21907
+ return /* @__PURE__ */ jsx(SchemaSettingsModalItem, { title: R, components: D, width: 770, schema: T, onSubmit: O });
21905
21908
  }, useDataTemplates = (e) => {
21906
21909
  const t = useFieldSchema();
21907
21910
  if (e)
@@ -22395,7 +22398,7 @@ const designerCss$4 = ({ margin: e = "-18px -16px", padding: t = "18px 16px" } =
22395
22398
  }
22396
22399
  }
22397
22400
  ], SchemaSettingsDateFormat = function e(t) {
22398
- var h, g, f, C, b, S, y, v, F, I, w, T;
22401
+ var h, g, f, C, b, S, y, v, F, I, R, T;
22399
22402
  const { fieldSchema: n } = t, o = useField(), { dn: r } = useDesignable(), { t: i } = useTranslation(), { getCollectionJoinField: a } = useCollectionManager_deprecated(), l = a(n == null ? void 0 : n["x-collection-field"]) || {}, c = (h = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : h.showTime, u = ((g = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : g.dateFormat) || ((C = (f = l == null ? void 0 : l.uiSchema) == null ? void 0 : f["x-component-props"]) == null ? void 0 : C.dateFormat) || "YYYY-MM-DD", d = ((b = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : b.timeFormat) || ((y = (S = l == null ? void 0 : l.uiSchema) == null ? void 0 : S["x-component-props"]) == null ? void 0 : y.timeFormat) || "HH:mm:ss", p = ((v = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : v.picker) || ((I = (F = l == null ? void 0 : l.uiSchema) == null ? void 0 : F["x-component-props"]) == null ? void 0 : I.picker) || "date", m = n["x-read-pretty"] || o.readOnly || o.readPretty;
22400
22403
  return /* @__PURE__ */ jsx(
22401
22404
  SchemaSettingsModalItem,
@@ -22489,7 +22492,7 @@ const designerCss$4 = ({ margin: e = "-18px -16px", padding: t = "18px 16px" } =
22489
22492
  }
22490
22493
  },
22491
22494
  showTime: {
22492
- default: c === void 0 ? (T = (w = l == null ? void 0 : l.uiSchema) == null ? void 0 : w["x-component-props"]) == null ? void 0 : T.showTime : c,
22495
+ default: c === void 0 ? (T = (R = l == null ? void 0 : l.uiSchema) == null ? void 0 : R["x-component-props"]) == null ? void 0 : T.showTime : c,
22493
22496
  type: "boolean",
22494
22497
  "x-decorator": "FormItem",
22495
22498
  "x-component": "Checkbox",
@@ -22591,20 +22594,20 @@ const getActionContext = (e) => {
22591
22594
  var k, z, E;
22592
22595
  const n = useFieldSchema(), o = (k = t == null ? void 0 : t.fieldSchema) != null ? k : n, r = useField(), { dn: i } = useDesignable(), { t: a } = useTranslation(), l = useActionContext(), c = getActionContext(l).collection;
22593
22596
  let u;
22594
- const { getField: d } = useCollection_deprecated(), { getCollectionJoinField: p, getCollectionFields: m, getAllCollectionsInheritChain: h } = useCollectionManager_deprecated(), g = useVariables$1(), f = useLocalVariables$1(), C = useCollection_deprecated(), b = useRecord(), { form: S } = useFormBlockContext(), { getFields: y } = useCollectionFilterOptionsV2(C), { isInSubForm: v, isInSubTable: F } = useFlag() || {}, { name: I } = C, w = useMemo(
22597
+ const { getField: d } = useCollection_deprecated(), { getCollectionJoinField: p, getCollectionFields: m, getAllCollectionsInheritChain: h } = useCollectionManager_deprecated(), g = useVariables$1(), f = useLocalVariables$1(), C = useCollection_deprecated(), b = useRecord(), { form: S } = useFormBlockContext(), { getFields: y } = useCollectionFilterOptionsV2(C), { isInSubForm: v, isInSubTable: F } = useFlag() || {}, { name: I } = C, R = useMemo(
22595
22598
  () => d(o.name) || p(o["x-collection-field"]),
22596
22599
  [o, p, d]
22597
22600
  ), T = _.omit(o, "required");
22598
- w != null && w.target && (u = p(
22599
- `${w.target}.${((E = (z = o["x-component-props"]) == null ? void 0 : z.fieldNames) == null ? void 0 : E.label) || "id"}`
22601
+ R != null && R.target && (u = p(
22602
+ `${R.target}.${((E = (z = o["x-component-props"]) == null ? void 0 : z.fieldNames) == null ? void 0 : E.label) || "id"}`
22600
22603
  ));
22601
- const D = (w == null ? void 0 : w.interface) === "m2o" && findParentFieldSchema(o), O = D && p(D == null ? void 0 : D["x-collection-field"]), j = useTableBlockContext(), N = (w == null ? void 0 : w.interface) === "m2m" || (w == null ? void 0 : w.interface) === "mbm" || (O == null ? void 0 : O.type) === "hasMany" && (w == null ? void 0 : w.interface) === "m2o", B = useCallback(
22604
+ 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(
22602
22605
  (q) => {
22603
22606
  const L = q.find((U) => U.value === "$nForm"), G = m(I);
22604
22607
  return !(G != null && G.length) && L && (L.children = formatVariableScop(y())), q;
22605
22608
  },
22606
22609
  [y, I]
22607
- ), R = useMemo(() => ({
22610
+ ), w = useMemo(() => ({
22608
22611
  ArrayCollapse: ArrayCollapse$2,
22609
22612
  FormLayout,
22610
22613
  VariableInput: (q) => /* @__PURE__ */ jsx(
@@ -22622,16 +22625,16 @@ const getActionContext = (e) => {
22622
22625
  "x-decorator": "FormItem",
22623
22626
  "x-component": "VariableInput",
22624
22627
  "x-component-props": P(x({}, (o == null ? void 0 : o["x-component-props"]) || {}), {
22625
- collectionField: w,
22628
+ collectionField: R,
22626
22629
  contextCollectionName: N ? c : "",
22627
- schema: w == null ? void 0 : w.uiSchema,
22630
+ schema: R == null ? void 0 : R.uiSchema,
22628
22631
  targetFieldSchema: o,
22629
22632
  className: defaultInputStyle,
22630
22633
  form: S,
22631
22634
  record: b,
22632
22635
  returnScope: B,
22633
22636
  shouldChange: getShouldChange({
22634
- collectionField: w,
22637
+ collectionField: R,
22635
22638
  variables: g,
22636
22639
  localVariables: f,
22637
22640
  getAllCollectionsInheritChain: h
@@ -22639,13 +22642,13 @@ const getActionContext = (e) => {
22639
22642
  renderSchemaComponent: function(L) {
22640
22643
  const G = useMemo(() => _.cloneDeep(T) || {}, []);
22641
22644
  G["x-read-pretty"] = !1, G["x-disabled"] = !1, _.set(G, "x-decorator-props.showTitle", !1);
22642
- const U = getFieldDefaultValue(G, w);
22643
- w.target && G["x-component-props"] && (G["x-component-props"].mode = "Select"), w != null && w.uiSchema.type && (G.type = w.uiSchema.type), (w == null ? void 0 : w.uiSchema["x-component"]) === "Checkbox" && (_.set(G, "x-component-props.defaultChecked", U), G.type = "void");
22645
+ const U = getFieldDefaultValue(G, R);
22646
+ R.target && G["x-component-props"] && (G["x-component-props"].mode = "Select"), R != null && R.uiSchema.type && (G.type = R.uiSchema.type), (R == null ? void 0 : R.uiSchema["x-component"]) === "Checkbox" && (_.set(G, "x-component-props.defaultChecked", U), G.type = "void");
22644
22647
  const H = useMemo(
22645
22648
  () => P(x({}, G || {}), {
22646
22649
  "x-decorator": "FormItem",
22647
22650
  "x-component-props": P(x({}, G["x-component-props"]), {
22648
- collectionName: w == null ? void 0 : w.collectionName,
22651
+ collectionName: R == null ? void 0 : R.collectionName,
22649
22652
  targetField: u,
22650
22653
  defaultValue: isVariable$1(U) ? "" : U,
22651
22654
  style: {
@@ -22662,11 +22665,11 @@ const getActionContext = (e) => {
22662
22665
  }
22663
22666
  }),
22664
22667
  title: a("Default value"),
22665
- default: getFieldDefaultValue(o, w)
22668
+ default: getFieldDefaultValue(o, R)
22666
22669
  }
22667
22670
  }
22668
22671
  }), [
22669
- w,
22672
+ R,
22670
22673
  o,
22671
22674
  T,
22672
22675
  S,
@@ -22696,7 +22699,7 @@ const getActionContext = (e) => {
22696
22699
  SchemaSettingsModalItem,
22697
22700
  {
22698
22701
  title: a("Set default value"),
22699
- components: R,
22702
+ components: w,
22700
22703
  width: 800,
22701
22704
  schema: M,
22702
22705
  onSubmit: $,
@@ -23474,13 +23477,13 @@ const useGetFilterOptions = () => {
23474
23477
  };
23475
23478
  });
23476
23479
  }, TableColumnDesigner$1 = (e) => {
23477
- var j, N, B, R, M, $, k, z, E, q, L, G;
23478
- 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((R = o == null ? void 0 : o.target) != null ? R : 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(
23480
+ var j, N, B, w, M, $, k, z, E, q, L, G;
23481
+ 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(
23479
23482
  o == null ? void 0 : o.interface
23480
- ), I = useFieldModeOptions({ fieldSchema: n }), w = ((M = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : M.mode) || "Select";
23483
+ ), I = useFieldModeOptions({ fieldSchema: n }), R = ((M = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : M.mode) || "Select";
23481
23484
  let T = "editable";
23482
23485
  n["x-disabled"] === !0 && (T = "readonly"), n["x-read-pretty"] === !0 && (T = "read-pretty");
23483
- const D = F && w === "Select", O = () => {
23486
+ const D = F && R === "Select", O = () => {
23484
23487
  const { name: U } = useCollection(), { linkageRulesProps: H } = useSchemaToolbar();
23485
23488
  return /* @__PURE__ */ jsx(SchemaSettingsLinkageRules, x({ category: "style" }, P(x({}, H), { collectionName: U })));
23486
23489
  };
@@ -23634,7 +23637,7 @@ const useGetFilterOptions = () => {
23634
23637
  C && { label: c("File manager"), value: "FileManager" },
23635
23638
  { label: c("Tag"), value: "Tag" }
23636
23639
  ].filter(Boolean) : I,
23637
- value: w,
23640
+ value: R,
23638
23641
  onChange: (U) => {
23639
23642
  const H = {
23640
23643
  "x-uid": n["x-uid"]
@@ -23646,7 +23649,7 @@ const useGetFilterOptions = () => {
23646
23649
  },
23647
23650
  "field-mode"
23648
23651
  ),
23649
- ["Tag"].includes(w) && /* @__PURE__ */ jsx(
23652
+ ["Tag"].includes(R) && /* @__PURE__ */ jsx(
23650
23653
  SchemaSettingsSelectItem,
23651
23654
  {
23652
23655
  title: c("Tag color field"),
@@ -25207,8 +25210,8 @@ const MarkdownEditor = (e) => {
25207
25210
  useCompile(), useEffect(() => {
25208
25211
  y(!0), V(void 0, null, function* () {
25209
25212
  setTimeout(() => V(void 0, null, function* () {
25210
- const w = yield getRenderContent(b, r, f, C, parseMarkdown);
25211
- g(w);
25213
+ const R = yield getRenderContent(b, r, f, C, parseMarkdown);
25214
+ g(R);
25212
25215
  })), y(!1);
25213
25216
  });
25214
25217
  }, [r, f, C, b]);
@@ -25232,8 +25235,8 @@ const MarkdownEditor = (e) => {
25232
25235
  a.editable = !1, d == null || d();
25233
25236
  },
25234
25237
  onSubmit: (I) => V(void 0, null, function* () {
25235
- var w;
25236
- a.editable = !1, (w = l["x-component-props"]) != null || (l["x-component-props"] = {}), l["x-component-props"].content = I, a.componentProps.content = I, u == null || u(l), c.emit("patch", {
25238
+ var R;
25239
+ a.editable = !1, (R = l["x-component-props"]) != null || (l["x-component-props"] = {}), l["x-component-props"].content = I, a.componentProps.content = I, u == null || u(l), c.emit("patch", {
25237
25240
  schema: {
25238
25241
  "x-uid": l["x-uid"],
25239
25242
  "x-component-props": {
@@ -25543,9 +25546,9 @@ function Input$1(e) {
25543
25546
  hideVariableButton: m
25544
25547
  } = e, h = typeof e.scope == "function" ? e.scope() : e.scope, { wrapSSR: g, hashId: f, componentCls: C, rootPrefixCls: b } = useStyles$a({ hideVariableButton: m });
25545
25548
  useAntdInputStyle(`${b}-input`);
25546
- const S = useCompile(), { t: y } = useTranslation(), v = useForm(), [F, I] = React.useState([]), [w, T] = React.useState([]), [D, O] = React.useState(
25549
+ const S = useCompile(), { t: y } = useTranslation(), v = useForm(), [F, I] = React.useState([]), [R, T] = React.useState([]), [D, O] = React.useState(
25547
25550
  m || !!(o && t != null)
25548
- ), j = useMemo(() => parseValue(t, p), [p, t]), N = typeof j == "string", B = N ? j : "", R = N ? null : j, M = Object.assign(
25551
+ ), j = useMemo(() => parseValue(t, p), [p, t]), N = typeof j == "string", B = N ? j : "", w = N ? null : j, M = Object.assign(
25549
25552
  {
25550
25553
  label: "label",
25551
25554
  value: "value",
@@ -25571,28 +25574,28 @@ function Input$1(e) {
25571
25574
  ] : [],
25572
25575
  ...$ ? [S(X)] : [],
25573
25576
  ...h ? [...h] : []
25574
- ].filter((ne) => !ne.deprecated || (R == null ? void 0 : R[0]) === ne[M.value]);
25577
+ ].filter((ne) => !ne.deprecated || (w == null ? void 0 : w[0]) === ne[M.value]);
25575
25578
  I(ee);
25576
- }, [h, R, $, a]);
25579
+ }, [h, w, $, a]);
25577
25580
  const q = (W) => V(this, null, function* () {
25578
25581
  var ee;
25579
25582
  const X = W[W.length - 1];
25580
25583
  if (!((ee = X.children) != null && ee.length) && !X.isLeaf && X.loadChildren) {
25581
25584
  let Z;
25582
- if (R && R.length >= 2) {
25583
- for (const ne of R)
25585
+ if (w && w.length >= 2) {
25586
+ for (const ne of w)
25584
25587
  if (ne === X[M.value]) {
25585
25588
  Z = ne;
25586
25589
  break;
25587
25590
  }
25588
25591
  }
25589
- yield X.loadChildren(X, Z, R), I((ne) => [...ne]);
25592
+ yield X.loadChildren(X, Z, w), I((ne) => [...ne]);
25590
25593
  }
25591
25594
  }), L = useCallback(
25592
25595
  (W, X) => {
25593
25596
  var ee, Z, ne;
25594
25597
  if (W[0] === "$") {
25595
- O(!0), R && n(null, X);
25598
+ O(!0), w && n(null, X);
25596
25599
  return;
25597
25600
  } else
25598
25601
  O(!1);
@@ -25601,12 +25604,12 @@ function Input$1(e) {
25601
25604
  return;
25602
25605
  }
25603
25606
  if (W[0] === " ") {
25604
- W[1] ? W[1] !== B && n((ne = (Z = (ee = ConstantTypes[W[1]]) == null ? void 0 : ee.default) == null ? void 0 : Z.call(ee)) != null ? ne : null, X) : R && n(null, X);
25607
+ W[1] ? W[1] !== B && n((ne = (Z = (ee = ConstantTypes[W[1]]) == null ? void 0 : ee.default) == null ? void 0 : Z.call(ee)) != null ? ne : null, X) : w && n(null, X);
25605
25608
  return;
25606
25609
  }
25607
25610
  n(`{{${W.join(".")}}}`, X);
25608
25611
  },
25609
- [B, R, n]
25612
+ [B, w, n]
25610
25613
  ), G = useCallback(() => {
25611
25614
  var W;
25612
25615
  if (O(!!o), (W = $ == null ? void 0 : $.children) != null && W.length) {
@@ -25618,14 +25621,14 @@ function Input$1(e) {
25618
25621
  useEffect(() => {
25619
25622
  V(this, null, function* () {
25620
25623
  var Z;
25621
- if (!R || F.length <= 1)
25624
+ if (!w || F.length <= 1)
25622
25625
  return;
25623
25626
  let X = null;
25624
25627
  const ee = [];
25625
- for (let ne = 0; ne < R.length; ne++) {
25626
- const re = R[ne];
25628
+ for (let ne = 0; ne < w.length; ne++) {
25629
+ const re = w[ne];
25627
25630
  try {
25628
- if (ne === 0 ? X = F.find((se) => se[M.value] === re) : (X.loadChildren && !((Z = X.children) != null && Z.length) && (yield X.loadChildren(X, re, R)), X = X.children.find((se) => se[M.value] === re)), !X)
25631
+ if (ne === 0 ? X = F.find((se) => se[M.value] === re) : (X.loadChildren && !((Z = X.children) != null && Z.length) && (yield X.loadChildren(X, re, w)), X = X.children.find((se) => se[M.value] === re)), !X)
25629
25632
  return;
25630
25633
  ee.push(X[M.label]);
25631
25634
  } catch (se) {
@@ -25634,11 +25637,11 @@ function Input$1(e) {
25634
25637
  }
25635
25638
  I([...F]), T([...ee]);
25636
25639
  });
25637
- }, [R, F.length]);
25640
+ }, [w, F.length]);
25638
25641
  const U = e.disabled || v.disabled;
25639
25642
  return g(
25640
25643
  /* @__PURE__ */ jsxs(Space$1.Compact, { style: l, className: cls(C, f, c), children: [
25641
- R ? /* @__PURE__ */ jsxs(
25644
+ w ? /* @__PURE__ */ jsxs(
25642
25645
  "div",
25643
25646
  {
25644
25647
  className: cx(
@@ -25676,7 +25679,7 @@ function Input$1(e) {
25676
25679
  "aria-label": "variable-tag",
25677
25680
  style: { overflow: "hidden" },
25678
25681
  className: cx("ant-input", { "ant-input-disabled": U }, f),
25679
- children: /* @__PURE__ */ jsx(Tag, { color: "blue", children: w.map((W, X) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
25682
+ children: /* @__PURE__ */ jsx(Tag, { color: "blue", children: R.map((W, X) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
25680
25683
  X ? " / " : "",
25681
25684
  W
25682
25685
  ] }, W)) })
@@ -25709,7 +25712,7 @@ function Input$1(e) {
25709
25712
  Cascader$1,
25710
25713
  {
25711
25714
  options: F,
25712
- value: R != null ? R : E,
25715
+ value: w != null ? w : E,
25713
25716
  onChange: L,
25714
25717
  loadData: q,
25715
25718
  changeOnSelect: u,
@@ -25721,7 +25724,7 @@ function Input$1(e) {
25721
25724
  className: css(`
25722
25725
  margin-left: -1px;
25723
25726
  `),
25724
- type: R ? "primary" : "default",
25727
+ type: w ? "primary" : "default",
25725
25728
  disabled: U
25726
25729
  }
25727
25730
  )
@@ -25901,7 +25904,7 @@ function TextArea(e) {
25901
25904
  const { wrapSSR: t, hashId: n, componentCls: o } = useStyles$a(), { scope: r, changeOnSelect: i, style: a, fieldNames: l, delimiters: c = ["{{", "}}"], addonBefore: u, trim: d = !0 } = e, p = typeof e.value == "string" ? e.value : e.value == null ? "" : e.value.toString(), m = useVariablesFromValue(p, c), h = useRef(null), [g, f] = useState([]), C = useForm(), b = useMemo(
25902
25905
  () => createOptionsValueLabelMap(g, l || defaultFieldNames$2),
25903
25906
  [l, g]
25904
- ), [S, y] = useState(!1), [v, F] = useState(!1), [I, w] = useState(() => renderHTML(p != null ? p : "", b, c)), [T, D] = useState([-1, 0, -1, 0]);
25907
+ ), [S, y] = useState(!1), [v, F] = useState(!1), [I, R] = useState(() => renderHTML(p != null ? p : "", b, c)), [T, D] = useState([-1, 0, -1, 0]);
25905
25908
  useAntdInputStyle("ant-input");
25906
25909
  const { token: O } = theme.useToken(), j = c.join(" "), N = useCallback(
25907
25910
  (L) => {
@@ -25916,7 +25919,7 @@ function TextArea(e) {
25916
25919
  f(L);
25917
25920
  }).catch(console.error);
25918
25921
  }, [r, JSON.stringify(m)]), useEffect(() => {
25919
- w(renderHTML(p != null ? p : "", b, c)), v || D([-1, 0, -1, 0]);
25922
+ R(renderHTML(p != null ? p : "", b, c)), v || D([-1, 0, -1, 0]);
25920
25923
  }, [p, b, j]), useEffect(() => {
25921
25924
  var U;
25922
25925
  const { current: L } = h;
@@ -25954,7 +25957,7 @@ function TextArea(e) {
25954
25957
  }), F(!0), D(getCurrentRange(U)), N(U);
25955
25958
  },
25956
25959
  [b, N, T]
25957
- ), R = useCallback(
25960
+ ), w = useCallback(
25958
25961
  function({ currentTarget: L }) {
25959
25962
  S || (F(!0), D(getCurrentRange(L)), N(L));
25960
25963
  },
@@ -26041,7 +26044,7 @@ function TextArea(e) {
26041
26044
  {
26042
26045
  role: "button",
26043
26046
  "aria-label": "textbox",
26044
- onInput: R,
26047
+ onInput: w,
26045
26048
  onBlur: M,
26046
26049
  onKeyDown: $,
26047
26050
  onPaste: E,
@@ -27456,8 +27459,9 @@ function getFilteredFormValues(e) {
27456
27459
  r && n.push(r);
27457
27460
  }), _.uniq(
27458
27461
  n.filter((r) => {
27459
- var i;
27460
- return (i = r == null ? void 0 : r.componentProps) == null ? void 0 : i.readOnlySubmit;
27462
+ var l, c;
27463
+ const i = ((l = r.path) == null ? void 0 : l.segments) || [], a = i.length <= 1 ? i.join(".") : i.slice(0, -1).join(".");
27464
+ return ((c = r == null ? void 0 : r.componentProps) == null ? void 0 : c.readOnlySubmit) && !get$1(t, a)[r == null ? void 0 : r.componentProps.filterTargetKey];
27461
27465
  }).map((r) => {
27462
27466
  var a;
27463
27467
  const i = ((a = r.path) == null ? void 0 : a.segments) || [];
@@ -27488,7 +27492,7 @@ function getFormValues({
27488
27492
  function useCollectValuesToSubmit() {
27489
27493
  const e = useForm(), t = useFilterByTk(), { field: n, resource: o } = useBlockRequestContext(), { fields: r, getField: i, getTreeParentField: a, name: l } = useCollection_deprecated(), c = r.map((f) => f.name), { fieldSchema: u } = useActionContext(), { getActiveFieldsName: d } = useFormActiveFields() || {}, p = useVariables$1(), m = useLocalVariables$1({ currentForm: e }), h = useFieldSchema(), g = useTreeParentRecord();
27490
27494
  return useCallback(() => V(this, null, function* () {
27491
- var F, I, w, T;
27495
+ var F, I, R, T;
27492
27496
  const { assignedValues: f = {}, overwriteValues: C } = (F = h == null ? void 0 : h["x-action-settings"]) != null ? F : {}, b = getFormValues({
27493
27497
  filterByTk: t,
27494
27498
  field: n,
@@ -27507,7 +27511,7 @@ function useCollectValuesToSubmit() {
27507
27511
  }));
27508
27512
  if (yield Promise.all(y), (I = u == null ? void 0 : u["x-component-props"]) == null ? void 0 : I.addChild) {
27509
27513
  const D = a();
27510
- b[(w = D == null ? void 0 : D.name) != null ? w : "parent"] = g, b[(T = D == null ? void 0 : D.foreignKey) != null ? T : "parentId"] = g == null ? void 0 : g.id;
27514
+ b[(R = D == null ? void 0 : D.name) != null ? R : "parent"] = g, b[(T = D == null ? void 0 : D.foreignKey) != null ? T : "parentId"] = g == null ? void 0 : g.id;
27511
27515
  }
27512
27516
  return x(x(x({}, b), C), S);
27513
27517
  }), [
@@ -27534,12 +27538,12 @@ const useCreateActionProps = () => {
27534
27538
  onClick() {
27535
27539
  return V(this, null, function* () {
27536
27540
  var B;
27537
- const { onSuccess: v, skipValidator: F, triggerWorkflows: I } = (B = u == null ? void 0 : u["x-action-settings"]) != null ? B : {}, { manualClose: w, redirecting: T, redirectTo: D, successMessage: O, actionAfterSuccess: j } = v || {};
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 || {};
27538
27542
  F || (yield n.submit());
27539
27543
  const N = yield f();
27540
27544
  d.data = o.data || {}, d.data.loading = !0;
27541
27545
  try {
27542
- const R = yield r[C]({
27546
+ const w = yield r[C]({
27543
27547
  values: N,
27544
27548
  filterKeys: b,
27545
27549
  filterByTk: e,
@@ -27547,17 +27551,17 @@ const useCreateActionProps = () => {
27547
27551
  triggerWorkflows: I != null && I.length ? I.map((M) => [M.workflowKey, M.context].filter(Boolean).join("!")).join(",") : void 0,
27548
27552
  updateAssociationValues: g
27549
27553
  });
27550
- 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 = R, !O) {
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) {
27551
27555
  message.success(h("Saved successfully")), yield resetFormCorrectly(n), (T && !j || j === "redirect") && D && (isURL(D) ? window.location.href = D : c(D));
27552
27556
  return;
27553
27557
  }
27554
- w ? m.success({
27558
+ R ? m.success({
27555
27559
  title: p(O),
27556
27560
  onOk: () => V(this, null, function* () {
27557
27561
  yield resetFormCorrectly(n), (T && !j || j === "redirect") && D && (isURL(D) ? window.location.href = D : c(D));
27558
27562
  })
27559
27563
  }) : (message.success(p(O)), yield resetFormCorrectly(n), (T && !j || j === "redirect") && D && (isURL(D) ? window.location.href = D : c(D)));
27560
- } catch (R) {
27564
+ } catch (w) {
27561
27565
  d.data.loading = !1;
27562
27566
  }
27563
27567
  });
@@ -27570,13 +27574,13 @@ const useCreateActionProps = () => {
27570
27574
  onClick() {
27571
27575
  return V(this, null, function* () {
27572
27576
  var z, E, q, L, G, U;
27573
- const w = u.map((H) => H.name), {
27577
+ const R = u.map((H) => H.name), {
27574
27578
  assignedValues: T = {},
27575
27579
  onSuccess: D,
27576
27580
  overwriteValues: O,
27577
27581
  skipValidator: j,
27578
27582
  triggerWorkflows: N
27579
- } = (z = l == null ? void 0 : l["x-action-settings"]) != null ? z : {}, B = (E = i == null ? void 0 : i["x-component-props"]) == null ? void 0 : E.addChild, { successMessage: R } = D || {}, M = {}, $ = Object.keys(T).map((H) => V(this, null, function* () {
27583
+ } = (z = l == null ? void 0 : l["x-action-settings"]) != null ? z : {}, B = (E = i == null ? void 0 : i["x-component-props"]) == null ? void 0 : E.addChild, { successMessage: w } = D || {}, M = {}, $ = Object.keys(T).map((H) => V(this, null, function* () {
27580
27584
  const J = T[H], K = d(H);
27581
27585
  if (isVariable$1(J)) {
27582
27586
  const { value: W } = (yield C == null ? void 0 : C.parseVariable(J, b)) || {};
@@ -27589,7 +27593,7 @@ const useCreateActionProps = () => {
27589
27593
  filterByTk: g,
27590
27594
  field: t,
27591
27595
  form: e,
27592
- fieldNames: w,
27596
+ fieldNames: R,
27593
27597
  getField: d,
27594
27598
  resource: n,
27595
27599
  actionFields: (S == null ? void 0 : S("form")) || []
@@ -27606,9 +27610,9 @@ const useCreateActionProps = () => {
27606
27610
  // TODO(refactor): should change to inject by plugin
27607
27611
  triggerWorkflows: N != null && N.length ? N.map((J) => [J.workflowKey, J.context].filter(Boolean).join("!")).join(",") : void 0
27608
27612
  });
27609
- 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), !R)
27613
+ 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)
27610
27614
  return;
27611
- message.success(h(R));
27615
+ message.success(h(w));
27612
27616
  } catch (H) {
27613
27617
  c.data.data = null, c.data.loading = !1;
27614
27618
  }
@@ -27715,13 +27719,13 @@ const useCreateActionProps = () => {
27715
27719
  return {
27716
27720
  onClick(f, C) {
27717
27721
  return V(this, null, function* () {
27718
- var N, B, R;
27722
+ var N, B, w;
27719
27723
  const {
27720
27724
  assignedValues: b = {},
27721
27725
  onSuccess: S,
27722
27726
  skipValidator: y,
27723
27727
  triggerWorkflows: v
27724
- } = (N = r == null ? void 0 : r["x-action-settings"]) != null ? N : {}, { manualClose: F, redirecting: I, redirectTo: w, successMessage: T, actionAfterSuccess: D } = S || {}, O = {}, j = Object.keys(b).map((M) => V(this, null, function* () {
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* () {
27725
27729
  const $ = b[M], k = m(M);
27726
27730
  if (isVariable$1($)) {
27727
27731
  const { value: z } = (yield u == null ? void 0 : u.parseVariable($, d)) || {};
@@ -27734,12 +27738,12 @@ const useCreateActionProps = () => {
27734
27738
  values: x({}, O),
27735
27739
  // TODO(refactor): should change to inject by plugin
27736
27740
  triggerWorkflows: v != null && v.length ? v.map((M) => [M.workflowKey, M.context].filter(Boolean).join("!")).join(",") : void 0
27737
- }), (D === "previous" || !D && I !== !0) && (h == null || h(!1)), C && (C == null || C()), e instanceof TableFieldResource || (R = (B = t == null ? void 0 : t.service) == null ? void 0 : B.refresh) == null || R.call(B), T && (F ? c.success({
27741
+ }), (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({
27738
27742
  title: a(T),
27739
27743
  onOk: () => V(this, null, function* () {
27740
- (I && !D || D === "redirect") && w && (isURL(w) ? window.location.href = w : i(w));
27744
+ (I && !D || D === "redirect") && R && (isURL(R) ? window.location.href = R : i(R));
27741
27745
  })
27742
- }) : (message.success(a(T)), (I && !D || D === "redirect") && w && (isURL(w) ? window.location.href = w : i(w))));
27746
+ }) : (message.success(a(T)), (I && !D || D === "redirect") && R && (isURL(R) ? window.location.href = R : i(R))));
27743
27747
  });
27744
27748
  }
27745
27749
  };
@@ -27756,7 +27760,7 @@ const useCreateActionProps = () => {
27756
27760
  assignedValues: T = {},
27757
27761
  onSuccess: D,
27758
27762
  updateMode: O
27759
- } = (z = i == null ? void 0 : i["x-action-settings"]) != null ? z : {}, { manualClose: j, redirecting: N, redirectTo: B, successMessage: R, actionAfterSuccess: M } = D || {};
27763
+ } = (z = i == null ? void 0 : i["x-action-settings"]) != null ? z : {}, { manualClose: j, redirecting: N, redirectTo: B, successMessage: w, actionAfterSuccess: M } = D || {};
27760
27764
  m.data = e.data || {}, m.data.loading = !0;
27761
27765
  const $ = {}, k = Object.keys(T).map((q) => V(this, null, function* () {
27762
27766
  const L = T[q], G = C(q);
@@ -27791,12 +27795,12 @@ const useCreateActionProps = () => {
27791
27795
  } finally {
27792
27796
  m.data.loading = !1;
27793
27797
  }
27794
- t instanceof TableFieldResource || (J = (H = n == null ? void 0 : n.service) == null ? void 0 : H.refresh) == null || J.call(H), R && (j ? h.success({
27795
- title: d(R),
27798
+ 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
+ title: d(w),
27796
27800
  onOk: () => V(this, null, function* () {
27797
27801
  (N && !M || M === "redirect") && B && (isURL(B) ? window.location.href = B : u(B));
27798
27802
  })
27799
- }) : (message.success(d(R)), (N && !M || M === "redirect") && B && (isURL(B) ? window.location.href = B : u(B))));
27803
+ }) : (message.success(d(w)), (N && !M || M === "redirect") && B && (isURL(B) ? window.location.href = B : u(B))));
27800
27804
  });
27801
27805
  },
27802
27806
  onCancel() {
@@ -27815,12 +27819,12 @@ const useCreateActionProps = () => {
27815
27819
  onClick() {
27816
27820
  return V(this, null, function* () {
27817
27821
  var q, L, G, U;
27818
- const { skipValidator: I, onSuccess: w, requestSettings: T } = (q = o == null ? void 0 : o["x-action-settings"]) != null ? q : {}, { manualClose: D, redirecting: O, redirectTo: j, successMessage: N, actionAfterSuccess: B } = w || {}, R = o == null ? void 0 : o["x-action"];
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"];
27819
27823
  if (!T.url)
27820
27824
  return;
27821
- I !== !0 && R === "customize:form:request" && (yield i.submit());
27825
+ I !== !0 && w === "customize:form:request" && (yield i.submit());
27822
27826
  const M = T.headers ? JSON.parse(T.headers) : {}, $ = T.params ? JSON.parse(T.params) : {}, k = T.data ? JSON.parse(T.data) : {};
27823
- if (R === "customize:form:request" && ["POST", "PUT", "PATCH"].includes(T.method)) {
27827
+ if (w === "customize:form:request" && ["POST", "PUT", "PATCH"].includes(T.method)) {
27824
27828
  const H = a.map((K) => K.name), J = getFormValues({
27825
27829
  filterByTk: n,
27826
27830
  field: c,
@@ -27841,7 +27845,7 @@ const useCreateActionProps = () => {
27841
27845
  };
27842
27846
  f.data = c.data || {}, f.data.loading = !0;
27843
27847
  try {
27844
- yield e.request(x({}, E)), f.data.loading = !1, u instanceof TableFieldResource || (G = (L = d == null ? void 0 : d.service) == null ? void 0 : L.refresh) == null || G.call(L), (U = p == null ? void 0 : p.refresh) == null || U.call(p), R === "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({
27848
+ yield e.request(x({}, E)), f.data.loading = !1, u instanceof TableFieldResource || (G = (L = d == null ? void 0 : d.service) == null ? void 0 : L.refresh) == null || G.call(L), (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({
27845
27849
  title: r(N),
27846
27850
  onOk: () => V(this, null, function* () {
27847
27851
  (O && !B || B === "redirect") && j && (isURL(j) ? window.location.href = j : t(j));
@@ -27860,13 +27864,13 @@ const useCreateActionProps = () => {
27860
27864
  return V(this, null, function* () {
27861
27865
  var L;
27862
27866
  const {
27863
- assignedValues: w = {},
27867
+ assignedValues: R = {},
27864
27868
  onSuccess: T,
27865
27869
  overwriteValues: D,
27866
27870
  skipValidator: O,
27867
27871
  triggerWorkflows: j
27868
- } = (L = l == null ? void 0 : l["x-action-settings"]) != null ? L : {}, { manualClose: N, redirecting: B, redirectTo: R, successMessage: M, actionAfterSuccess: $ } = T || {}, k = {}, z = Object.keys(w).map((G) => V(this, null, function* () {
27869
- const U = w[G], H = d(G);
27872
+ } = (L = l == null ? void 0 : l["x-action-settings"]) != null ? L : {}, { manualClose: N, redirecting: B, redirectTo: w, successMessage: M, actionAfterSuccess: $ } = T || {}, k = {}, z = Object.keys(R).map((G) => V(this, null, function* () {
27873
+ const U = R[G], H = d(G);
27870
27874
  if (isVariable$1(U)) {
27871
27875
  const { value: J } = (yield b == null ? void 0 : b.parseVariable(U, S)) || {};
27872
27876
  J && (k[G] = transformVariableValue(J, { targetCollectionField: H }));
@@ -27897,9 +27901,9 @@ const useCreateActionProps = () => {
27897
27901
  N ? f.success({
27898
27902
  title: m(M),
27899
27903
  onOk: () => V(this, null, function* () {
27900
- yield e.reset(), (B && !$ || $ === "redirect") && R && (isURL(R) ? window.location.href = R : c(R));
27904
+ yield e.reset(), (B && !$ || $ === "redirect") && w && (isURL(w) ? window.location.href = w : c(w));
27901
27905
  })
27902
- }) : (message.success(m(M)), (B && !$ || $ === "redirect" || $ === "redirect") && R && (isURL(R) ? window.location.href = R : c(R)));
27906
+ }) : (message.success(m(M)), (B && !$ || $ === "redirect" || $ === "redirect") && w && (isURL(w) ? window.location.href = w : c(w)));
27903
27907
  } catch (G) {
27904
27908
  h.data.loading = !1;
27905
27909
  }
@@ -27911,17 +27915,19 @@ const useCreateActionProps = () => {
27911
27915
  return {
27912
27916
  onClick(d, p) {
27913
27917
  return V(this, null, function* () {
27914
- var C, b, S, y, v;
27918
+ var C, b, S, y, v, F, I;
27915
27919
  const { triggerWorkflows: m } = (C = c == null ? void 0 : c["x-action-settings"]) != null ? C : {};
27916
27920
  yield t.destroy(x({
27917
27921
  filterByTk: e,
27918
27922
  // TODO(refactor): should change to inject by plugin
27919
- triggerWorkflows: m != null && m.length ? m.map((F) => [F.workflowKey, F.context].filter(Boolean).join("!")).join(",") : void 0
27923
+ triggerWorkflows: m != null && m.length ? m.map((R) => [R.workflowKey, R.context].filter(Boolean).join("!")).join(",") : void 0
27920
27924
  }, l));
27921
27925
  const { count: h = 0, page: g = 0, pageSize: f = 0 } = ((b = n == null ? void 0 : n.data) == null ? void 0 : b.meta) || {};
27922
- h % f === 1 && g !== 1 && n.run(P(x({}, (S = n == null ? void 0 : n.params) == null ? void 0 : S[0]), {
27923
- page: g - 1
27924
- })), p && (p == null || p()), a == null || a(!0), o && o !== "TableField" && ((v = (y = r == null ? void 0 : r.service) == null ? void 0 : y.refresh) == null || v.call(y), i == null || i(!1), a == null || a(!0));
27926
+ if (h % f === 1 && g !== 1) {
27927
+ const R = (S = n.params[0]) == null ? void 0 : S.page, T = (v = (y = n.data) == null ? void 0 : y.meta) == null ? void 0 : v.totalPage;
27928
+ R === T && n.params[0] && R !== 1 && (n.params[0].page = R - 1);
27929
+ }
27930
+ p && (p == null || p()), a == null || a(!0), o && o !== "TableField" && ((I = (F = r == null ? void 0 : r.service) == null ? void 0 : F.refresh) == null || I.call(F), i == null || i(!1), a == null || a(!0));
27925
27931
  });
27926
27932
  }
27927
27933
  };
@@ -27996,8 +28002,8 @@ const useCreateActionProps = () => {
27996
28002
  showSizeChanger: !1,
27997
28003
  onChange(v) {
27998
28004
  return V(this, null, function* () {
27999
- var I, w;
28000
- const F = (w = (I = e.service) == null ? void 0 : I.params) == null ? void 0 : w[0];
28005
+ var I, R;
28006
+ const F = (R = (I = e.service) == null ? void 0 : I.params) == null ? void 0 : R[0];
28001
28007
  e.service.run(P(x({}, F), { page: v }));
28002
28008
  });
28003
28009
  },
@@ -28056,8 +28062,8 @@ const useCreateActionProps = () => {
28056
28062
  /** 渲染 Collapse 的列表数据 */
28057
28063
  list: (d == null ? void 0 : d.data) || [],
28058
28064
  onSelected: (F) => {
28059
- var w, T, D, O;
28060
- const I = ((T = (w = t.params) == null ? void 0 : w[1]) == null ? void 0 : T.filters) || {};
28065
+ var R, T, D, O;
28066
+ const I = ((T = (R = t.params) == null ? void 0 : R[1]) == null ? void 0 : T.filters) || {};
28061
28067
  F.length ? I[`af.${c}`] = {
28062
28068
  [`${c}.${i}.$in`]: F
28063
28069
  } : delete I[`af.${c}`], t.run(
@@ -28086,10 +28092,10 @@ const useCreateActionProps = () => {
28086
28092
  var n;
28087
28093
  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);
28088
28094
  }, useAssociationFilterBlockProps = () => {
28089
- var v, F, I, w, T, D, O, j, N, B;
28095
+ var v, F, I, R, T, D, O, j, N, B;
28090
28096
  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 });
28091
28097
  let p, m, h, g, f, C, b, S;
28092
- C = e != null && e.target ? (I = c == null ? void 0 : c.getCollection(e.target)) == null ? void 0 : I.getPrimaryKey() : "id", b = ((T = (w = t["x-component-props"]) == null ? void 0 : w.fieldNames) == null ? void 0 : T.label) || C, { data: f, params: h, run: g } = useRequest(
28098
+ 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(
28093
28099
  {
28094
28100
  headers: l,
28095
28101
  resource: e == null ? void 0 : e.target,
@@ -28119,7 +28125,7 @@ const useCreateActionProps = () => {
28119
28125
  d
28120
28126
  ]);
28121
28127
  const y = useCallback(
28122
- (R) => {
28128
+ (w) => {
28123
28129
  const { targets: M, uid: $ } = findFilterTargets(t);
28124
28130
  o().forEach((k) => {
28125
28131
  var U, H, J, K;
@@ -28128,9 +28134,9 @@ const useCreateActionProps = () => {
28128
28134
  const E = `${$}${t.name}`, q = ((U = k.service.params) == null ? void 0 : U[0]) || {};
28129
28135
  (J = (H = k.service.params) == null ? void 0 : H[1]) != null && J.filters || _.set(k.service.params, "[1].filters", {});
28130
28136
  const L = k.service.params[1].filters;
28131
- if (R.length)
28137
+ if (w.length)
28132
28138
  L[E] = {
28133
- [S]: R
28139
+ [S]: w
28134
28140
  };
28135
28141
  else {
28136
28142
  if ((K = k.clearSelection) == null || K.call(k), k.dataLoadingMode === "manual")
@@ -28152,14 +28158,14 @@ const useCreateActionProps = () => {
28152
28158
  if (!e)
28153
28159
  return {};
28154
28160
  if (isOptionalField(e)) {
28155
- const R = n.find((k) => k.name === t.name), M = {
28161
+ const w = n.find((k) => k.name === t.name), M = {
28156
28162
  select: "$in",
28157
28163
  multipleSelect: "$anyOf",
28158
28164
  checkbox: "$in",
28159
28165
  checkboxGroup: "$anyOf"
28160
- }, $ = ((B = R == null ? void 0 : R.uiSchema) == null ? void 0 : B.enum) || [];
28166
+ }, $ = ((B = w == null ? void 0 : w.uiSchema) == null ? void 0 : B.enum) || [];
28161
28167
  C = "value", b = "label", p = $, h = {}, g = () => {
28162
- }, S = `${R.name}.${M[R.interface]}`, m = (k) => {
28168
+ }, S = `${w.name}.${M[w.interface]}`, m = (k) => {
28163
28169
  const z = k.target.value;
28164
28170
  if (!z) {
28165
28171
  p = $;
@@ -28168,10 +28174,10 @@ const useCreateActionProps = () => {
28168
28174
  p = $.filter((E) => E.label.includes(z));
28169
28175
  };
28170
28176
  } else
28171
- S = `${r}.${C}.$in`, p = (f == null ? void 0 : f.data) || [], m = (R) => {
28177
+ S = `${r}.${C}.$in`, p = (f == null ? void 0 : f.data) || [], m = (w) => {
28172
28178
  g(P(x({}, h == null ? void 0 : h[0]), {
28173
28179
  filter: {
28174
- [`${b}.$includes`]: R.target.value
28180
+ [`${b}.$includes`]: w.target.value
28175
28181
  }
28176
28182
  }));
28177
28183
  };
@@ -28240,8 +28246,8 @@ const getAppends = ({
28240
28246
  y[v].forEach((I) => {
28241
28247
  if ("$and" in I || "$or" in I)
28242
28248
  return b(I);
28243
- const w = getTargetField(I);
28244
- w.length > 1 && o.add(w.join("."));
28249
+ const R = getTargetField(I);
28250
+ R.length > 1 && o.add(R.join("."));
28245
28251
  });
28246
28252
  };
28247
28253
  c["x-linkage-rules"].forEach(({ condition: y }) => {
@@ -28444,18 +28450,18 @@ function fillParentFields(e) {
28444
28450
  }
28445
28451
  const useSyncFromForm = (e, t, n) => {
28446
28452
  const { getCollectionJoinField: o, getCollectionFields: r } = useCollectionManager_deprecated(), i = ArrayBase.useArray(), a = ArrayBase.useIndex(), l = ArrayBase.useRecord(), c = useCompile(), { t: u } = useTranslation(), d = useForm(), p = /* @__PURE__ */ ((f) => (C, { exclude: b = [], depth: S = 0, maxDepth: y, prefix: v = "", disabled: F = !1 }, I) => {
28447
- const w = `${C}-${b.join(",")}-${S}-${y}-${v}`, T = f.get(w);
28453
+ const R = `${C}-${b.join(",")}-${S}-${y}-${v}`, T = f.get(R);
28448
28454
  if (T)
28449
28455
  return T;
28450
28456
  if (S > y)
28451
28457
  return [];
28452
28458
  const D = r(C).map((O) => {
28453
- var R;
28459
+ var w;
28454
28460
  if (b.includes(O.name) || !O.interface || ["sort", "password", "sequence"].includes(O.type))
28455
28461
  return;
28456
28462
  const j = {
28457
28463
  type: "duplicate",
28458
- tag: c((R = O.uiSchema) == null ? void 0 : R.title) || O.name
28464
+ tag: c((w = O.uiSchema) == null ? void 0 : w.title) || O.name
28459
28465
  }, N = P(x({}, j), {
28460
28466
  title: React.createElement(TreeNode, j),
28461
28467
  key: v ? `${v}.${O.name}` : O.name,
@@ -28486,14 +28492,14 @@ const useSyncFromForm = (e, t, n) => {
28486
28492
  }
28487
28493
  return N;
28488
28494
  }).filter(Boolean);
28489
- return f.set(w, D), D;
28495
+ return f.set(R, D), D;
28490
28496
  })(new LRUCache({ max: 100 })), m = /* @__PURE__ */ ((f) => (C, { prefix: b, maxDepth: S, depth: y = 0, exclude: v = [] }) => {
28491
28497
  const F = `${C}-${v.join(",")}-${y}-${S}-${b}`, I = f.get(F);
28492
28498
  if (I)
28493
28499
  return I;
28494
28500
  if (y > S)
28495
28501
  return [];
28496
- const w = r(C).map((T) => {
28502
+ const R = r(C).map((T) => {
28497
28503
  var j, N;
28498
28504
  if (!T.target || !T.interface || v.includes(T.name))
28499
28505
  return;
@@ -28516,7 +28522,7 @@ const useSyncFromForm = (e, t, n) => {
28516
28522
  })
28517
28523
  };
28518
28524
  }).filter(Boolean);
28519
- return f.set(F, w), w;
28525
+ return f.set(F, R), R;
28520
28526
  })(new LRUCache({ max: 100 })), h = useCallback((f, C) => {
28521
28527
  if (!f)
28522
28528
  return [];
@@ -28532,11 +28538,11 @@ const useSyncFromForm = (e, t, n) => {
28532
28538
  var y;
28533
28539
  const f = /* @__PURE__ */ new Set([]), C = /* @__PURE__ */ new Set([]), b = (v, F) => {
28534
28540
  var I;
28535
- (I = v == null ? void 0 : v.reduceProperties) == null || I.call(v, (w, T) => {
28541
+ (I = v == null ? void 0 : v.reduceProperties) == null || I.call(v, (R, T) => {
28536
28542
  var M, $, k;
28537
- const D = w || 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, R = D === "" || !D ? B : D + "." + B;
28538
- if (O && !(["hasOne", "hasMany"].includes(O.type) || ["SubForm", "Nester"].includes((M = T["x-component-props"]) == null ? void 0 : M.mode)) && C.add(R), O && (N || j) && T["x-component"] !== "TableField") {
28539
- if (f.add({ name: R, fieldMode: (($ = T["x-component-props"]) == null ? void 0 : $.mode) || "Select" }), ["Nester", "SubTable"].includes((k = T["x-component-props"]) == null ? void 0 : k.mode)) {
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") {
28545
+ 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)) {
28540
28546
  const z = D && D !== "" ? D + "." + T.name : T.name;
28541
28547
  b(T, z);
28542
28548
  }
@@ -29401,32 +29407,34 @@ const DragHandler = (e) => {
29401
29407
  "title-field"
29402
29408
  ) : null;
29403
29409
  }, isDisplayField = (e) => e.includes("."), useLazyLoadDisplayAssociationFieldsOfForm = () => {
29404
- var C;
29405
- const { name: e } = useCollection_deprecated(), { getCollectionJoinField: t } = useCollectionManager_deprecated(), n = useForm(), o = useFieldSchema(), r = useVariables$1(), i = useField(), { formValue: a } = useSubFormValue(), { isInSubForm: l, isInSubTable: c } = useFlag() || {}, { getAssociationAppends: u } = useAssociationNames(), d = o.name.toString(), p = useRef(null), m = useRef(null);
29406
- p.current == null && isDisplayField(d) && (p.current = t(`${e}.${d}`)), m.current == null && isDisplayField(d) && (m.current = t(`${e}.${d.split(".")[0]}`));
29407
- const h = useMemo(() => !isDisplayField(d) || !r || e === "fields" || !p.current, [d, r, e, p.current]), g = h ? {} : untracked(() => _.cloneDeep(l || c ? a : n.values)), f = isDisplayField(d) && m.current ? _.get(g, `${d.split(".")[0]}.${((C = m.current) == null ? void 0 : C.targetKey) || "id"}`) : void 0;
29410
+ var b;
29411
+ const { name: e } = useCollection_deprecated(), { getCollectionJoinField: t, getCollection: n } = useCollectionManager_deprecated(), o = useForm(), r = useFieldSchema(), i = useVariables$1(), a = useField(), { formValue: l } = useSubFormValue(), { isInSubForm: c, isInSubTable: u } = useFlag() || {}, { getAssociationAppends: d } = useAssociationNames(), p = r.name.toString(), m = useRef(null), h = useRef(null);
29412
+ m.current == null && isDisplayField(p) && (m.current = t(`${e}.${p}`)), h.current == null && isDisplayField(p) && (h.current = t(`${e}.${p.split(".")[0]}`));
29413
+ const g = useMemo(() => !isDisplayField(p) || !i || e === "fields" || !m.current, [p, i, e, m.current]), f = g ? {} : untracked(() => _.cloneDeep(c || u ? l : o.values)), C = isDisplayField(p) && h.current ? _.get(f, `${p.split(".")[0]}.${((b = h.current) == null ? void 0 : b.targetKey) || "id"}`) : void 0;
29408
29414
  useEffect(() => {
29409
- if (h || _.isEmpty(g))
29415
+ var I;
29416
+ if (g || _.isEmpty(f))
29410
29417
  return;
29411
- const b = {
29418
+ const S = {
29412
29419
  name: "$nForm",
29413
- ctx: g,
29420
+ ctx: f,
29414
29421
  collectionName: e
29415
- }, S = `{{ $nForm.${d} }}`;
29416
- if (f == null)
29422
+ }, y = `{{ $nForm.${p} }}`;
29423
+ if (C == null)
29417
29424
  return;
29418
- const { appends: y } = u();
29419
- r.parseVariable(S, b, { appends: y }).then(({ value: v }) => {
29425
+ const { appends: v } = d(), F = n((I = m.current) == null ? void 0 : I.collectionName);
29426
+ i.parseVariable(y, S, { appends: v }).then(({ value: R }) => {
29420
29427
  nextTick(() => {
29421
- const F = transformVariableValue(v, { targetCollectionField: p.current });
29422
- _.isEmpty(F) && !_.isNumber(F) ? i.value = null : (i.value = F, i.componentProps = P(x({}, i.componentProps), {
29423
- readOnlySubmit: !0
29428
+ const T = transformVariableValue(R, { targetCollectionField: m.current });
29429
+ _.isEmpty(T) && !_.isNumber(T) ? a.value = null : (a.value = T, a.componentProps = P(x({}, a.componentProps), {
29430
+ readOnlySubmit: !0,
29431
+ filterTargetKey: (F == null ? void 0 : F.filterTargetKey) || "id"
29424
29432
  }));
29425
29433
  });
29426
- }).catch((v) => {
29427
- console.error(v);
29434
+ }).catch((R) => {
29435
+ console.error(R);
29428
29436
  });
29429
- }, [f, h]);
29437
+ }, [C, g]);
29430
29438
  };
29431
29439
  function forEachLinkageRule(e, t) {
29432
29440
  e.forEach((n) => {
@@ -29476,8 +29484,8 @@ const useContextVariable = () => {
29476
29484
  dataSource: b,
29477
29485
  defaultValue: S
29478
29486
  } = useParentPopupVariableContext(), { datetimeCtx: y } = useDatetimeVariableContext(), { currentFormCtx: v } = useCurrentFormContext({ form: e == null ? void 0 : e.currentForm }), { name: F } = useCollection_deprecated(), I = useContextVariable();
29479
- let { name: w } = useBlockCollection();
29480
- return e != null && e.collectionName && (w = e.collectionName), useMemo(() => [
29487
+ let { name: R } = useBlockCollection();
29488
+ return e != null && e.collectionName && (R = e.collectionName), useMemo(() => [
29481
29489
  /**
29482
29490
  * @deprecated
29483
29491
  * 兼容老版本
@@ -29492,9 +29500,9 @@ const useContextVariable = () => {
29492
29500
  * 兼容旧版本的以数据表名称命名的变量,新版本已更名为 `$nForm`
29493
29501
  */
29494
29502
  {
29495
- name: w,
29503
+ name: R,
29496
29504
  ctx: v || a,
29497
- collectionName: w
29505
+ collectionName: R
29498
29506
  },
29499
29507
  /**
29500
29508
  * @deprecated
@@ -29503,7 +29511,7 @@ const useContextVariable = () => {
29503
29511
  {
29504
29512
  name: "$form",
29505
29513
  ctx: v,
29506
- collectionName: w
29514
+ collectionName: R
29507
29515
  },
29508
29516
  {
29509
29517
  name: "$nRecord",
@@ -29534,7 +29542,7 @@ const useContextVariable = () => {
29534
29542
  {
29535
29543
  name: "$nForm",
29536
29544
  ctx: v,
29537
- collectionName: w
29545
+ collectionName: R
29538
29546
  },
29539
29547
  {
29540
29548
  name: "$nDate",
@@ -29562,7 +29570,7 @@ const useContextVariable = () => {
29562
29570
  ].filter(Boolean), [
29563
29571
  a,
29564
29572
  l,
29565
- w,
29573
+ R,
29566
29574
  v,
29567
29575
  c,
29568
29576
  u,
@@ -29650,8 +29658,8 @@ const useParseDefaultValue = () => {
29650
29658
  var F, I;
29651
29659
  if (g === "update" && t.default && e.form === f && ((I = e.setValue) == null || I.call(e, (F = r == null ? void 0 : r.data) == null ? void 0 : F[t.name])), t.default == null || a || l || isSubMode(t) || !(r != null && r.isNew) && !i)
29652
29660
  return;
29653
- const y = (...T) => V(void 0, [...T], function* ({ forceUpdate: w = !1 } = {}) {
29654
- if (n && e && (isVariable$1(t.default) && e.value == null || e.value === t.default || w)) {
29661
+ const y = (...T) => V(void 0, [...T], function* ({ forceUpdate: R = !1 } = {}) {
29662
+ if (n && e && (isVariable$1(t.default) && e.value == null || e.value === t.default || R)) {
29655
29663
  e.loading = !0;
29656
29664
  const D = !t.name.toString().includes(".") && (d == null ? void 0 : d.getField(t.name)), {
29657
29665
  value: O,
@@ -29677,17 +29685,17 @@ const useParseDefaultValue = () => {
29677
29685
  !/\{\{.+\}\}/g.test(t.default) && e.setInitialValue && e.setInitialValue(t.default);
29678
29686
  }), v = _.debounce(y, DEBOUNCE_WAIT);
29679
29687
  if (isVariable$1(t.default)) {
29680
- const w = getVariableName(t.default), T = S(w);
29688
+ const R = getVariableName(t.default), T = S(R);
29681
29689
  return T ? (y(), reaction(
29682
29690
  () => {
29683
- const O = { [w]: (T == null ? void 0 : T.ctx) || {} }, j = getPath(t.default), N = getValuesByPath(O, j);
29691
+ const O = { [R]: (T == null ? void 0 : T.ctx) || {} }, j = getPath(t.default), N = getValuesByPath(O, j);
29684
29692
  return N === void 0 ? Math.random() : N;
29685
29693
  },
29686
29694
  () => v({ forceUpdate: !0 }),
29687
29695
  {
29688
29696
  equals: _.isEqual
29689
29697
  }
29690
- )) : console.error(`useParseDefaultValue: can not find variable ${w}`);
29698
+ )) : console.error(`useParseDefaultValue: can not find variable ${R}`);
29691
29699
  } else
29692
29700
  e.value == null && (c || u) && e.setValue(t.default);
29693
29701
  }, [t.default, o, g, C, b, d]);
@@ -32985,7 +32993,7 @@ const expendableActionSettings = new SchemaSettings({
32985
32993
  }
32986
32994
  },
32987
32995
  onSubmit: ({ sort: F }) => {
32988
- const I = F.map((w) => w.direction === "desc" ? `-${w.field}` : w.field);
32996
+ const I = F.map((R) => R.direction === "desc" ? `-${R.field}` : R.field);
32989
32997
  _.set(r, "x-decorator-props.params.sort", I), a.decoratorProps.params = x({}, r["x-decorator-props"].params), l.emit("patch", {
32990
32998
  schema: {
32991
32999
  "x-uid": r["x-uid"],
@@ -35001,14 +35009,14 @@ const tableBlockSettings = new SchemaSettings({
35001
35009
  options: o,
35002
35010
  value: p == null ? void 0 : p.label,
35003
35011
  onChange(C) {
35004
- var v, F, I, w, T;
35012
+ var v, F, I, R, T;
35005
35013
  const b = {
35006
35014
  "x-uid": c["x-uid"]
35007
35015
  }, S = P(x(x({}, (F = (v = d == null ? void 0 : d.uiSchema) == null ? void 0 : v["x-component-props"]) == null ? void 0 : F.fieldNames), (I = c["x-component-props"]) == null ? void 0 : I.fieldNames), {
35008
35016
  label: C
35009
35017
  });
35010
35018
  c["x-component-props"] = c["x-component-props"] || {}, c["x-component-props"].fieldNames = S, b["x-component-props"] = c["x-component-props"], t.componentProps.fieldNames = c["x-component-props"].fieldNames;
35011
- const y = (T = t.path) == null ? void 0 : T.splice(((w = t.path) == null ? void 0 : w.length) - 1, 1);
35019
+ const y = (T = t.path) == null ? void 0 : T.splice(((R = t.path) == null ? void 0 : R.length) - 1, 1);
35012
35020
  t.form.query(`${y.concat("*." + c.name)}`).forEach((D) => {
35013
35021
  D.componentProps.fieldNames = p;
35014
35022
  }), n.emit("patch", {
@@ -35282,8 +35290,8 @@ const tableBlockSettings = new SchemaSettings({
35282
35290
  name: "fieldSettings:component:CascadeSelect",
35283
35291
  items: [fieldComponent$6, titleField$1, ellipsisSettingsItem, setTheDataScope]
35284
35292
  }), SchemaSettingsDateRange = function e(t) {
35285
- var w, T, D, O, j, N, B, R, M, $, k, z, E, q, L, G;
35286
- 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 = ((w = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : w.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 = (R = u == null ? void 0 : u.uiSchema) == null ? void 0 : R["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";
35293
+ var R, T, D, O, j, N, B, w, M, $, k, z, E, q, L, 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";
35287
35295
  n["x-read-pretty"] || o.readOnly || o.readPretty;
35288
35296
  const g = (E = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : E._minDate, f = (q = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : q._maxDate, C = ((L = u == null ? void 0 : u.uiSchema) == null ? void 0 : L["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(
35289
35297
  (U) => /* @__PURE__ */ jsx(
@@ -36731,12 +36739,12 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
36731
36739
  _.isFunction(C) ? n.current = C(n.current) : n.current = C;
36732
36740
  }, []), u = useCallback(
36733
36741
  (C, b, S) => V(void 0, null, function* () {
36734
- var R, M;
36742
+ var w, M;
36735
36743
  const y = C.split("."), v = y[0], F = mergeVariableToCollectionNameWithLocalVariables(variablesStore, b);
36736
36744
  let I = mergeCtxWithLocalVariables(n.current, b);
36737
- const { fieldPath: w, dataSource: T, variableOption: D } = getFieldPath$1(v, F);
36738
- let O = w;
36739
- const { fieldPath: j } = getFieldPath$1(C, F), N = y.length === 1 ? D == null ? void 0 : D.collectionName : (R = r(j, T)) == null ? void 0 : R.target;
36745
+ 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;
36740
36748
  if (!(v in I))
36741
36749
  throw new Error(`VariablesProvider: ${v} is not found`);
36742
36750
  for (let $ = 0; $ < y.length; $++) {
@@ -36834,7 +36842,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
36834
36842
  [u]
36835
36843
  ), g = useCallback(
36836
36844
  (C, b) => V(void 0, null, function* () {
36837
- var w;
36845
+ var R;
36838
36846
  if (!isVariable$1(C))
36839
36847
  throw new Error(`VariablesProvider: ${C} is not a variable string`);
36840
36848
  b && (b = _.isArray(b) ? b : [b]);
@@ -36844,7 +36852,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
36844
36852
  ), y = getPath(C), { fieldPath: v, dataSource: F } = getFieldPath$1(y, S);
36845
36853
  let I = r(v, F);
36846
36854
  return !I && !y.includes(".") && (I = {
36847
- target: (w = S[y]) == null ? void 0 : w.collectionName
36855
+ target: (R = S[y]) == null ? void 0 : R.collectionName
36848
36856
  }), I;
36849
36857
  }),
36850
36858
  [r]
@@ -37092,7 +37100,7 @@ const NocoBaseField = (e) => {
37092
37100
  h.current = new Schema(y.toJSON(), j), j != null && j.properties && Object.keys(j.properties).forEach((N) => {
37093
37101
  N === y.name && (j.properties[N] = h.current);
37094
37102
  }), b(), S == null || S();
37095
- }, [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), w = (j) => {
37103
+ }, [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) => {
37096
37104
  if (!r)
37097
37105
  return propertiesToReactElement({
37098
37106
  schema: y,
@@ -37104,7 +37112,7 @@ const NocoBaseField = (e) => {
37104
37112
  values: c,
37105
37113
  isUseFormilyField: u
37106
37114
  });
37107
- }, T = () => isValid(n) ? F.type === "object" ? o ? w() : /* @__PURE__ */ jsx(ObjectField, P(x({}, I), { name: n, basePath: m, children: w })) : F.type === "array" ? /* @__PURE__ */ jsx(ArrayField, P(x({}, I), { name: n, basePath: m })) : F.type === "void" ? o ? w() : /* @__PURE__ */ jsx(VoidField, P(x({}, I), { name: n, basePath: m, children: w })) : u ? /* @__PURE__ */ jsx(Field, P(x({}, I), { name: n, basePath: m })) : /* @__PURE__ */ jsx(NocoBaseField, { name: n, value: c, initialValue: c, basePath: m, schema: F }) : w();
37115
+ }, T = () => isValid(n) ? F.type === "object" ? o ? R() : /* @__PURE__ */ jsx(ObjectField, P(x({}, I), { name: n, basePath: m, children: R })) : F.type === "array" ? /* @__PURE__ */ jsx(ArrayField, P(x({}, I), { name: n, basePath: m })) : F.type === "void" ? o ? R() : /* @__PURE__ */ jsx(VoidField, P(x({}, I), { name: n, basePath: m, children: R })) : u ? /* @__PURE__ */ jsx(Field, P(x({}, I), { name: n, basePath: m })) : /* @__PURE__ */ jsx(NocoBaseField, { name: n, value: c, initialValue: c, basePath: m, schema: F }) : R();
37108
37116
  return y ? /* @__PURE__ */ jsx(SchemaContext.Provider, { value: y, children: /* @__PURE__ */ jsx(RefreshFieldSchemaProvider, { refresh: v, children: T() }) }) : /* @__PURE__ */ jsx(Fragment, {});
37109
37117
  });
37110
37118
  NocoBaseRecursionField.displayName = "NocoBaseRecursionField";
@@ -37237,7 +37245,7 @@ const ActionLink = withDynamicSchemaProps(
37237
37245
  "onMouseEnter",
37238
37246
  "refreshDataBlockRequest",
37239
37247
  "confirmTitle"
37240
- ]), v = useDesigner(), F = useField(), I = useFieldSchema(), w = useCompile(), T = useCollectionRecordData(), D = w((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(), R = useLocalVariables$1({ currentForm: { values: T, readPretty: !1 } }), { visibleWithURL: M, setVisibleWithURL: $ } = usePopupUtils(), { setSubmitted: k } = useActionContext(), { getAriaLabel: z } = useGetAriaLabelOfAction(l), E = useCollectionParentRecordData(), q = useApp();
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), E = useCollectionParentRecordData(), q = useApp();
37241
37249
  useEffect(() => {
37242
37250
  F.stateOfLinkageRules && setInitialActionState(F), F.stateOfLinkageRules = {}, O.filter((H) => !H.disabled).forEach((H) => {
37243
37251
  var J;
@@ -37248,13 +37256,13 @@ const ActionLink = withDynamicSchemaProps(
37248
37256
  field: F,
37249
37257
  condition: H.condition,
37250
37258
  variables: B,
37251
- localVariables: R
37259
+ localVariables: w
37252
37260
  },
37253
37261
  q.jsonLogic
37254
37262
  );
37255
37263
  });
37256
37264
  });
37257
- }, [F, O, R, B]);
37265
+ }, [F, O, w, B]);
37258
37266
  const L = useCallback(
37259
37267
  (H) => {
37260
37268
  C == null || C(H);
@@ -37319,7 +37327,7 @@ const ActionLink = withDynamicSchemaProps(
37319
37327
  style: v,
37320
37328
  propsDisabled: F,
37321
37329
  useAction: I,
37322
- actionCallback: w,
37330
+ actionCallback: R,
37323
37331
  visibleWithURL: T,
37324
37332
  setVisibleWithURL: D,
37325
37333
  setSubmitted: O,
@@ -37353,7 +37361,7 @@ const ActionLink = withDynamicSchemaProps(
37353
37361
  "setSubmitted",
37354
37362
  "getAriaLabel",
37355
37363
  "parentRecordData"
37356
- ]), [R, M] = useState(!1), { wrapSSR: $, componentCls: k, hashId: z } = useStyles$8(), [E, q] = useState(!1), L = o["x-toolbar-props"] || o["x-designer-props"], G = (me = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : me.openMode, U = (he = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : he.openSize, H = (ge = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : ge.refreshDataBlockRequest, { modal: J } = App.useApp(), K = useForm(), W = useACLActionParamsContext(), { run: X, element: ee, disabled: Z } = (I == null ? void 0 : I(w)) || {}, ne = K.disabled || i.disabled || ((de = i.data) == null ? void 0 : de.disabled) || F || Z, re = useMemo(() => {
37364
+ ]), [w, M] = useState(!1), { wrapSSR: $, componentCls: k, hashId: z } = useStyles$8(), [E, q] = useState(!1), L = o["x-toolbar-props"] || o["x-designer-props"], G = (me = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : me.openMode, U = (he = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : he.openSize, H = (ge = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : ge.refreshDataBlockRequest, { modal: J } = App.useApp(), K = useForm(), W = useACLActionParamsContext(), { run: X, element: ee, disabled: Z } = (I == null ? void 0 : I(R)) || {}, ne = K.disabled || i.disabled || ((de = i.data) == null ? void 0 : de.disabled) || F || Z, re = useMemo(() => {
37357
37365
  var ce;
37358
37366
  return P(x({}, v), {
37359
37367
  opacity: r && (((ce = i == null ? void 0 : i.data) == null ? void 0 : ce.hidden) || !W) && 0.1,
@@ -37397,7 +37405,7 @@ const ActionLink = withDynamicSchemaProps(
37397
37405
  ActionContextProvider,
37398
37406
  {
37399
37407
  button: RenderButton(se),
37400
- visible: R || T,
37408
+ visible: w || T,
37401
37409
  setVisible: le,
37402
37410
  formValueChanged: E,
37403
37411
  setFormValueChanged: q,
@@ -37479,13 +37487,13 @@ const RenderButton = ({
37479
37487
  setVisible: v,
37480
37488
  run: F,
37481
37489
  confirm: I,
37482
- modal: w,
37490
+ modal: R,
37483
37491
  setSubmitted: T,
37484
37492
  confirmTitle: D,
37485
37493
  title: O
37486
37494
  }) => {
37487
- const { getDataBlockRequest: j } = useDataBlockRequestGetter(), { t: N } = useTranslation(), { isPopupVisibleControlledByURL: B } = usePopupSettings(), { openPopup: R } = usePopupUtils(), M = useRef(null);
37488
- M.current = R;
37495
+ const { getDataBlockRequest: j } = useDataBlockRequestGetter(), { t: N } = useTranslation(), { isPopupVisibleControlledByURL: B } = usePopupSettings(), { openPopup: w } = usePopupUtils(), M = useRef(null);
37496
+ M.current = w;
37489
37497
  const $ = useCallback(
37490
37498
  (k, z = !0) => {
37491
37499
  if (!(z && isPortalInBody(k.target)) && (k.preventDefault(), k.stopPropagation(), !i && n)) {
@@ -37495,7 +37503,7 @@ const RenderButton = ({
37495
37503
  S !== !1 && (T == null || T(!0), (L = (q = j()) == null ? void 0 : q.refresh) == null || L.call(q));
37496
37504
  }) : isBulkEditAction(y) || !B() ? (v(!0), F == null || F()) : ["view", "update", "create", "customize:popup"].includes(y["x-action"]) && y["x-uid"] ? M.current() : (v(!0), F == null || F());
37497
37505
  };
37498
- (I == null ? void 0 : I.enable) !== !1 && (I != null && I.content) ? w.confirm({
37506
+ (I == null ? void 0 : I.enable) !== !1 && (I != null && I.content) ? R.confirm({
37499
37507
  title: N(I.title, { title: D || O || (t == null ? void 0 : t.title) }),
37500
37508
  content: N(I.content, { title: D || O || (t == null ? void 0 : t.title) }),
37501
37509
  onOk: E
@@ -37512,7 +37520,7 @@ const RenderButton = ({
37512
37520
  t,
37513
37521
  y,
37514
37522
  B,
37515
- w,
37523
+ R,
37516
37524
  b,
37517
37525
  S,
37518
37526
  F,
@@ -37593,8 +37601,8 @@ const RenderButtonInner = observer$1(
37593
37601
  "isLink"
37594
37602
  ]), F = useCallback(
37595
37603
  debounce$1(
37596
- (R, M = !0) => {
37597
- d(R, M);
37604
+ (w, M = !0) => {
37605
+ d(w, M);
37598
37606
  },
37599
37607
  300,
37600
37608
  { leading: !0, trailing: !1 }
@@ -37605,7 +37613,7 @@ const RenderButtonInner = observer$1(
37605
37613
  F.cancel();
37606
37614
  }, []), !t && ((j = n == null ? void 0 : n.data) != null && j.hidden || !o))
37607
37615
  return null;
37608
- const I = S || (n == null ? void 0 : n.title), N = l, { opacity: w } = N, T = Y(N, ["opacity"]), D = y && w ? { opacity: w } : void 0;
37616
+ 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;
37609
37617
  return /* @__PURE__ */ jsxs(
37610
37618
  SortableItem,
37611
37619
  P(x({
@@ -38071,14 +38079,14 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
38071
38079
  "dataSource",
38072
38080
  "toOptionsItem",
38073
38081
  "popupMatchSelectWidth"
38074
- ]), 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: w, getInterface: T } = useCollectionManager_deprecated(), D = y["x-collection-field"] || y.name, O = F(D) || w(D), j = u || (O == null ? void 0 : O.target) && (t == null ? void 0 : t.label) && w(`${O.target}.${t.label}`), N = useMemo(() => {
38082
+ ]), 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(() => {
38075
38083
  var K;
38076
38084
  if (j != null && j.interface) {
38077
38085
  const W = T(j.interface), X = ((K = W == null ? void 0 : W.filterable) == null ? void 0 : K.operators[0].value) || "$includes";
38078
38086
  return j.type === "string" ? "$includes" : X;
38079
38087
  }
38080
38088
  return "$includes";
38081
- }, [j]), B = useCompile(), R = useCallback(
38089
+ }, [j]), B = useCompile(), w = useCallback(
38082
38090
  (K) => {
38083
38091
  try {
38084
38092
  return K.filter((W) => ["number", "string"].includes(typeof W[t.value]) || !W[t.value]).map((W) => {
@@ -38177,7 +38185,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
38177
38185
  defaultValue: i
38178
38186
  }, f), {
38179
38187
  loading: M ? k : !0,
38180
- options: h(R(L)),
38188
+ options: h(w(L)),
38181
38189
  rawOptions: L,
38182
38190
  dropdownRender: (K) => {
38183
38191
  const W = L.some((X) => X[t.label] === I.current);
@@ -38253,9 +38261,9 @@ const useFormDataTemplates = () => {
38253
38261
  padding: n.padding
38254
38262
  }, e), [e, n.colorFillAlter]), S = useMemo(() => ({ fontSize: n.fontSize, fontWeight: "bold", whiteSpace: "nowrap", marginRight: n.marginXS }), [n.fontSize, n.marginXS]), y = useCallback((I) => V(void 0, null, function* () {
38255
38263
  d(I), m(null), t == null || t.reset();
38256
- }), []), v = useCallback((I, w, T) => V(void 0, null, function* () {
38257
- const D = P(x({}, w), { dataId: I });
38258
- m(w), fetchTemplateData(h, D, T).then((O) => (t && O && (t.reset(), t.__template = !0, forEach(O, (j, N) => {
38264
+ }), []), v = useCallback((I, R, T) => V(void 0, null, function* () {
38265
+ const D = P(x({}, R), { dataId: I });
38266
+ m(R), fetchTemplateData(h, D, T).then((O) => (t && O && (t.reset(), t.__template = !0, forEach(O, (j, N) => {
38259
38267
  var B;
38260
38268
  j && (t.values[N] = j, (B = t == null ? void 0 : t.setInitialValuesIn) == null || B.call(t, N, j));
38261
38269
  })), O)).catch((O) => {
@@ -38322,7 +38330,7 @@ function fetchTemplateData(e, t, n) {
38322
38330
  }
38323
38331
  const useFormBlockHeight = () => {
38324
38332
  var v, F, I;
38325
- const e = useDataBlockHeight(), t = useFieldSchema(), { token: n } = theme.useToken(), { designable: o } = useDesignable(), { heightProps: r } = useBlockHeightProps() || {}, { title: i, titleHeight: a } = r || {}, { display: l, enabled: c } = useFormDataTemplates(), u = t.reduceProperties((w, T) => T["x-component"] === "ActionBar" ? T : w), d = Object.keys((u == null ? void 0 : u.properties) || {}).length > 0, p = (I = (F = (v = t == null ? void 0 : t.parent) == null ? void 0 : v["x-decorator"]) == null ? void 0 : F.includes) == null ? void 0 : I.call(F, "FormBlockProvider"), m = d || o ? n.controlHeight + (p ? 1 * n.marginLG : 24 + n.paddingLG) : n.marginLG, h = i ? a : 0, g = useDataBlockRequestData(), { count: f, pageSize: C } = (g == null ? void 0 : g.meta) || {}, S = f > C ? n.controlHeightSM + 24 : 0, y = l && c ? n.controlHeight + 2 * n.padding + n.margin : 0;
38333
+ const e = useDataBlockHeight(), t = useFieldSchema(), { token: n } = theme.useToken(), { designable: o } = useDesignable(), { heightProps: r } = useBlockHeightProps() || {}, { title: i, titleHeight: a } = r || {}, { display: l, enabled: c } = useFormDataTemplates(), u = t.reduceProperties((R, T) => T["x-component"] === "ActionBar" ? T : R), d = Object.keys((u == null ? void 0 : u.properties) || {}).length > 0, p = (I = (F = (v = t == null ? void 0 : t.parent) == null ? void 0 : v["x-decorator"]) == null ? void 0 : F.includes) == null ? void 0 : I.call(F, "FormBlockProvider"), m = d || o ? n.controlHeight + (p ? 1 * n.marginLG : 24 + n.paddingLG) : n.marginLG, h = i ? a : 0, g = useDataBlockRequestData(), { count: f, pageSize: C } = (g == null ? void 0 : g.meta) || {}, S = f > C ? n.controlHeightSM + 24 : 0, y = l && c ? n.controlHeight + 2 * n.padding + n.margin : 0;
38326
38334
  return e - m - n.paddingLG - h - S - y;
38327
38335
  }, FormComponent = (e) => {
38328
38336
  const g = e, { form: t, children: n } = g, o = Y(g, ["form", "children"]), r = useField(), i = useFieldSchema(), a = getCardItemSchema == null ? void 0 : getCardItemSchema(i), l = useAttach(t.createVoidField(P(x({}, r.props), { basePath: "" }))), c = useFormBlockHeight(), { token: u } = theme.useToken(), {
@@ -39090,7 +39098,7 @@ const insertPositionToMethod = {
39090
39098
  }
39091
39099
  },
39092
39100
  onSubmit: (g) => V(void 0, [g], function* ({ title: m, icon: h }) {
39093
- var I, w;
39101
+ var I, R;
39094
39102
  const f = i.__route__, C = (I = i.parent) == null ? void 0 : I.__route__, b = uid(), S = uid(), y = uid(), v = uid(), { data: F } = yield u({
39095
39103
  type: NocoBaseDesktopRouteType.page,
39096
39104
  title: m,
@@ -39110,7 +39118,7 @@ const insertPositionToMethod = {
39110
39118
  ]
39111
39119
  });
39112
39120
  insertPositionToMethod[o] && (yield d({
39113
- sourceId: (w = F == null ? void 0 : F.data) == null ? void 0 : w.id,
39121
+ sourceId: (R = F == null ? void 0 : F.data) == null ? void 0 : R.id,
39114
39122
  targetId: f == null ? void 0 : f.id,
39115
39123
  sortField: "sort",
39116
39124
  method: insertPositionToMethod[o]
@@ -39180,8 +39188,8 @@ const insertPositionToMethod = {
39180
39188
  ), h = useMemo(() => toItems$1(c == null ? void 0 : c.properties, { t: l, compile: u }), [c == null ? void 0 : c.properties, l, u]), g = useCallback(
39181
39189
  (j) => {
39182
39190
  onFieldChange("target", (N) => {
39183
- var R, M;
39184
- const [, B] = ((M = (R = N == null ? void 0 : N.value) == null ? void 0 : R.split) == null ? void 0 : M.call(R, "||")) || [];
39191
+ var w, M;
39192
+ const [, B] = ((M = (w = N == null ? void 0 : N.value) == null ? void 0 : w.split) == null ? void 0 : M.call(w, "||")) || [];
39185
39193
  N.query("position").take(($) => {
39186
39194
  $.dataSource = B === "Menu.SubMenu" ? [
39187
39195
  { label: l("Before"), value: "beforeBegin" },
@@ -39230,7 +39238,7 @@ const insertPositionToMethod = {
39230
39238
  }), [n.componentProps.tooltip]);
39231
39239
  o["x-component"] === "Menu.URL" && (f.properties.href = d, f.properties.params = p, C.href = n.componentProps.href, C.params = n.componentProps.params);
39232
39240
  const y = useCallback(
39233
- ({ title: j, icon: N, href: B, params: R }) => {
39241
+ ({ title: j, icon: N, href: B, params: w }) => {
39234
39242
  var $;
39235
39243
  const M = {
39236
39244
  "x-uid": o["x-uid"],
@@ -39241,14 +39249,14 @@ const insertPositionToMethod = {
39241
39249
  }
39242
39250
  ]
39243
39251
  };
39244
- j && (o.title = j, n.title = j, M.title = j, a()), n.componentProps.icon = N, n.componentProps.href = B, n.componentProps.params = R, M["x-component-props"] = { icon: N, href: B, params: R }, 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 = R, m == null || m({ item: { props: { schema: o } } }), i.emit("patch", {
39252
+ 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", {
39245
39253
  schema: M
39246
39254
  }), ($ = o.__route__) != null && $.id && e(o.__route__.id, {
39247
39255
  title: j,
39248
39256
  icon: N,
39249
- options: B || R ? {
39257
+ options: B || w ? {
39250
39258
  href: B,
39251
- params: R
39259
+ params: w
39252
39260
  } : void 0
39253
39261
  });
39254
39262
  },
@@ -39285,13 +39293,13 @@ const insertPositionToMethod = {
39285
39293
  "x-decorator": "FormItem"
39286
39294
  }
39287
39295
  }
39288
- }), [h, l]), { moveRoute: I } = useNocoBaseRoutes(), w = useCallback(
39296
+ }), [h, l]), { moveRoute: I } = useNocoBaseRoutes(), R = useCallback(
39289
39297
  (B) => V(void 0, [B], function* ({ target: j, position: N }) {
39290
39298
  var E;
39291
- const [R] = ((E = j == null ? void 0 : j.split) == null ? void 0 : E.call(j, "||")) || [];
39292
- if (!R)
39299
+ const [w] = ((E = j == null ? void 0 : j.split) == null ? void 0 : E.call(j, "||")) || [];
39300
+ if (!w)
39293
39301
  return;
39294
- const M = findByUid(c, R), $ = createDesignable({
39302
+ const M = findByUid(c, w), $ = createDesignable({
39295
39303
  t: l,
39296
39304
  api: r,
39297
39305
  refresh: a,
@@ -39378,7 +39386,7 @@ const insertPositionToMethod = {
39378
39386
  components: components$4,
39379
39387
  effects: g,
39380
39388
  schema: F,
39381
- onSubmit: w
39389
+ onSubmit: R
39382
39390
  }
39383
39391
  ),
39384
39392
  /* @__PURE__ */ jsx(SchemaSettingsDivider, {}),
@@ -39622,8 +39630,8 @@ const useParentRoute = () => useContext(ParentRouteContext), useNocoBaseRoutes =
39622
39630
  const I = findMenuItem(v);
39623
39631
  if (!I)
39624
39632
  return n == null ? void 0 : n(y);
39625
- const w = findKeysByUid(e, I["x-uid"]);
39626
- o(w), n == null || n({
39633
+ const R = findKeysByUid(e, I["x-uid"]);
39634
+ o(R), n == null || n({
39627
39635
  key: I.name,
39628
39636
  item: {
39629
39637
  props: {
@@ -39762,18 +39770,18 @@ const useMenuDragEnd = () => {
39762
39770
  onChange: d,
39763
39771
  onFocus: p,
39764
39772
  theme: m
39765
- } = 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) : [])), [w, T] = useState(() => ["inline", "mix"].includes(n) ? a || F : a), D = useMemo(() => {
39773
+ } = 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(() => {
39766
39774
  var B;
39767
39775
  let N;
39768
39776
  if (o) {
39769
- const R = findKeysByUid(f, o);
39770
- N = (R == null ? void 0 : R[0]) || null;
39777
+ const w = findKeysByUid(f, o);
39778
+ N = (w == null ? void 0 : w[0]) || null;
39771
39779
  } else
39772
39780
  N = (F == null ? void 0 : F[0]) || null;
39773
39781
  if (n === "mix" && N) {
39774
- const R = (B = f.properties) == null ? void 0 : B[N];
39775
- if ((R == null ? void 0 : R["x-component"]) === "Menu.SubMenu")
39776
- return R;
39782
+ const w = (B = f.properties) == null ? void 0 : B[N];
39783
+ if ((w == null ? void 0 : w["x-component"]) === "Menu.SubMenu")
39784
+ return w;
39777
39785
  }
39778
39786
  return null;
39779
39787
  }, [F, n, f, o]);
@@ -39802,7 +39810,7 @@ const useMenuDragEnd = () => {
39802
39810
  onSelect: t,
39803
39811
  setDefaultSelectedKeys: I,
39804
39812
  defaultSelectedKeys: F,
39805
- defaultOpenKeys: w,
39813
+ defaultOpenKeys: R,
39806
39814
  selectedKeys: y,
39807
39815
  designable: O.designable,
39808
39816
  render: b,
@@ -39815,7 +39823,7 @@ const useMenuDragEnd = () => {
39815
39823
  mode: n,
39816
39824
  sideMenuSchema: D,
39817
39825
  sideMenuRef: S,
39818
- openKeys: w,
39826
+ openKeys: R,
39819
39827
  setOpenKeys: T,
39820
39828
  selectedKeys: y,
39821
39829
  onSelect: t,
@@ -40206,15 +40214,15 @@ const className1 = css`
40206
40214
  m
40207
40215
  ).open({
40208
40216
  initialValues: {}
40209
- }), { title: I, icon: w } = F, T = uid(), D = uid();
40217
+ }), { title: I, icon: R } = F, T = uid(), D = uid();
40210
40218
  yield g({
40211
40219
  type: NocoBaseDesktopRouteType.tabs,
40212
40220
  schemaUid: T,
40213
40221
  title: I || '{{t("Unnamed")}}',
40214
- icon: w,
40222
+ icon: R,
40215
40223
  parentId: h.id,
40216
40224
  tabSchemaName: D
40217
- }), u.insertBeforeEnd(getTabSchema({ title: I, icon: w, schemaUid: T, tabSchemaName: D }));
40225
+ }), u.insertBeforeEnd(getTabSchema({ title: I, icon: R, schemaUid: T, tabSchemaName: D }));
40218
40226
  }),
40219
40227
  children: o("Add tab")
40220
40228
  }
@@ -40231,14 +40239,14 @@ const className1 = css`
40231
40239
  return (F = h == null ? void 0 : h.children) == null ? void 0 : F.map((I) => {
40232
40240
  if (!I || I.hideInMenu)
40233
40241
  return null;
40234
- const w = { __route__: I };
40242
+ const R = { __route__: I };
40235
40243
  return {
40236
40244
  label: /* @__PURE__ */ jsx(NocoBaseRouteContext.Provider, { value: I, children: /* @__PURE__ */ jsxs(
40237
40245
  SortableItem,
40238
40246
  {
40239
40247
  id: String(I.id),
40240
40248
  className: cls("nb-action-link", "designerCss", e),
40241
- schema: w,
40249
+ schema: R,
40242
40250
  children: [
40243
40251
  I.icon && /* @__PURE__ */ jsx(Icon, { style: { marginRight: 8 }, type: I.icon }),
40244
40252
  /* @__PURE__ */ jsx("span", { children: I.title && r(f(I.title)) || o("Unnamed") }),
@@ -40621,15 +40629,15 @@ const AppendsTreeSelect = (e) => {
40621
40629
  "rootOption",
40622
40630
  "loadData"
40623
40631
  ]), 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 R = S.getCollection(N);
40625
- return R ? R.getAllFields(B) : [];
40632
+ const w = S.getCollection(N);
40633
+ return w ? w.getAllFields(B) : [];
40626
40634
  }, v = Object.values(m), F = useMemo(() => e.multiple ? (n || []).map((N) => m[N]).filter(Boolean) : n, [n, e.multiple, m]), I = useCallback(
40627
40635
  (N) => V(void 0, null, function* () {
40628
40636
  if (c != null)
40629
40637
  return c(N);
40630
40638
  if (!N.isLeaf && N.loadChildren) {
40631
40639
  const B = N.loadChildren(N);
40632
- h((R) => B.reduce((M, $) => Object.assign(M, { [$.value]: $ }), x({}, R)));
40640
+ h((w) => B.reduce((M, $) => Object.assign(M, { [$.value]: $ }), x({}, w)));
40633
40641
  }
40634
40642
  }),
40635
40643
  [c]
@@ -40641,15 +40649,15 @@ const AppendsTreeSelect = (e) => {
40641
40649
  title: l.label,
40642
40650
  fullTitle: l.label,
40643
40651
  isLeaf: !1
40644
- }) : null, R = (c === null ? [] : getCollectionFieldOptions.call({ compile: d, getCollectionFields: y, filter: a }, C, N)).reduce((M, $) => Object.assign(M, { [$.value]: $ }), {});
40645
- N && (R[N.value] = N), h(R);
40652
+ }) : null, w = (c === null ? [] : getCollectionFieldOptions.call({ compile: d, getCollectionFields: y, filter: a }, C, N)).reduce((M, $) => Object.assign(M, { [$.value]: $ }), {});
40653
+ N && (w[N.value] = N), h(w);
40646
40654
  }, [g, l, a, c]), useEffect(() => {
40647
40655
  const N = e.multiple ? n : n ? [n] : [];
40648
- if (!(N != null && N.length) || N.every((R) => !!m[R]))
40656
+ if (!(N != null && N.length) || N.every((w) => !!m[w]))
40649
40657
  return;
40650
40658
  const B = [];
40651
- N.forEach((R) => {
40652
- const M = R.split(".");
40659
+ N.forEach((w) => {
40660
+ const M = w.split(".");
40653
40661
  let $ = m[M[0]];
40654
40662
  for (let k = 1; k < M.length && $; k++) {
40655
40663
  const z = M.slice(0, k + 1).join(".");
@@ -40662,38 +40670,38 @@ const AppendsTreeSelect = (e) => {
40662
40670
  E != null && E.length && (B.push(...E), $ = E.find((q) => q.value === M.slice(0, k + 1).join(".")));
40663
40671
  }
40664
40672
  }
40665
- }), h((R) => B.reduce((M, $) => Object.assign(M, { [$.value]: $ }), x({}, R)));
40673
+ }), h((w) => B.reduce((M, $) => Object.assign(M, { [$.value]: $ }), x({}, w)));
40666
40674
  }, [n, v.length, e.multiple]);
40667
- const w = useCallback(
40675
+ const R = useCallback(
40668
40676
  (N) => {
40669
40677
  if (!e.multiple) {
40670
40678
  o(N);
40671
40679
  return;
40672
40680
  }
40673
- const B = N.map(($) => $.value).filter(Boolean), R = new Set(B), M = F.find(($) => !R.has($.value));
40681
+ const B = N.map(($) => $.value).filter(Boolean), w = new Set(B), M = F.find(($) => !w.has($.value));
40674
40682
  if (M) {
40675
40683
  const $ = `${M.value}.`;
40676
40684
  Object.keys(m).forEach((k) => {
40677
- k.startsWith($) && R.delete(k);
40685
+ k.startsWith($) && w.delete(k);
40678
40686
  });
40679
40687
  } else
40680
40688
  B.forEach(($) => {
40681
40689
  const k = $.split(".");
40682
40690
  if (k.length)
40683
40691
  for (let z = 1; z <= k.length; z++)
40684
- R.add(k.slice(0, z).join("."));
40692
+ w.add(k.slice(0, z).join("."));
40685
40693
  });
40686
- o(Array.from(R));
40694
+ o(Array.from(w));
40687
40695
  },
40688
40696
  [e.multiple, F, o, m]
40689
40697
  ), T = useCallback(
40690
40698
  (N) => {
40691
40699
  var z;
40692
- const { value: B, onClose: R, disabled: M, closable: $ } = N;
40700
+ const { value: B, onClose: w, disabled: M, closable: $ } = N;
40693
40701
  if (!B)
40694
40702
  return null;
40695
40703
  const { fullTitle: k } = (z = m[B]) != null ? z : {};
40696
- return /* @__PURE__ */ jsx(Tag, { closable: $ && !M, onClose: R, children: k == null ? void 0 : k.join(" / ") });
40704
+ return /* @__PURE__ */ jsx(Tag, { closable: $ && !M, onClose: w, children: k == null ? void 0 : k.join(" / ") });
40697
40705
  },
40698
40706
  [m]
40699
40707
  ), D = Array.isArray(F) ? F.filter((N) => N.value in m) : F, O = e.multiple ? n : n != null ? [n] : [];
@@ -40712,7 +40720,7 @@ const AppendsTreeSelect = (e) => {
40712
40720
  treeCheckStrictly: e.multiple,
40713
40721
  treeCheckable: e.multiple,
40714
40722
  tagRender: T,
40715
- onChange: w,
40723
+ onChange: R,
40716
40724
  treeDataSimpleMode: !0,
40717
40725
  treeData: v,
40718
40726
  loadData: I
@@ -40750,34 +40758,34 @@ const InternalAssociationSelect$1 = observer$1(
40750
40758
  return f.addEffects(j, () => {
40751
40759
  onFieldInputValueChange("*", (N) => {
40752
40760
  var $, k, z, E, q, L;
40753
- const B = filterAnalyses((z = (k = ($ = r.componentProps) == null ? void 0 : $.service) == null ? void 0 : k.params) == null ? void 0 : z.filter) || [], R = getFieldPath(N.address.entire), M = getFieldPath(r.address.entire);
40754
- B.includes((E = N == null ? void 0 : N.props) == null ? void 0 : E.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 && (!((L = r == null ? void 0 : r.indexes) != null && L.length) || isEqual(R, M)) && (r.setValue(null), p(null));
40761
+ 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);
40762
+ B.includes((E = N == null ? void 0 : N.props) == null ? void 0 : E.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 && (!((L = r == null ? void 0 : r.indexes) != null && L.length) || isEqual(w, M)) && (r.setValue(null), p(null));
40755
40763
  });
40756
40764
  }), () => {
40757
40765
  f.removeEffects(j);
40758
40766
  };
40759
40767
  }, []);
40760
- const w = (j) => V(void 0, null, function* () {
40768
+ const R = (j) => V(void 0, null, function* () {
40761
40769
  var M, $;
40762
40770
  const { search: N, callBack: B } = j, {
40763
- data: { data: R }
40771
+ data: { data: w }
40764
40772
  } = yield b.create({
40765
40773
  values: {
40766
40774
  [(($ = (M = r == null ? void 0 : r.componentProps) == null ? void 0 : M.fieldNames) == null ? void 0 : $.label) || "id"]: N
40767
40775
  }
40768
40776
  });
40769
- if (R) {
40777
+ if (w) {
40770
40778
  if (["m2m", "o2m"].includes(l == null ? void 0 : l.interface) && g !== !1) {
40771
40779
  const k = f.getValuesIn(r.path) || [];
40772
- k.push(R), f.setValuesIn(r.path, k), r.onInput(k);
40780
+ k.push(w), f.setValuesIn(r.path, k), r.onInput(k);
40773
40781
  } else
40774
- f.setValuesIn(r.path, R), r.onInput(R);
40782
+ f.setValuesIn(r.path, w), r.onInput(w);
40775
40783
  isFunction$1(B) && (B == null || B()), message.success(h("Saved successfully"));
40776
40784
  }
40777
40785
  }), T = (j) => /* @__PURE__ */ jsxs(
40778
40786
  "div",
40779
40787
  {
40780
- onClick: () => w(j),
40788
+ onClick: () => R(j),
40781
40789
  style: { cursor: "pointer", padding: "5px 12px", color: "#0d0c0c" },
40782
40790
  children: [
40783
40791
  /* @__PURE__ */ jsx(PlusOutlined, {}),
@@ -40797,7 +40805,7 @@ const InternalAssociationSelect$1 = observer$1(
40797
40805
  service: a,
40798
40806
  onChange: (j) => {
40799
40807
  var B;
40800
- const N = (j == null ? void 0 : j.length) !== 0 ? j : null;
40808
+ const N = Array.isArray(j) && j.length === 0 ? null : j;
40801
40809
  (B = e.onChange) == null || B.call(e, N);
40802
40810
  },
40803
40811
  CustomDropdownRender: m === "quickAdd" && T
@@ -41398,16 +41406,16 @@ function Uploader(n) {
41398
41406
  var N;
41399
41407
  const j = O.fileList.filter((B) => B.status !== "done").map(normalizeFile);
41400
41408
  if (m(j), i) {
41401
- const B = O.fileList.filter((R) => R.status === "done");
41409
+ const B = O.fileList.filter((w) => w.status === "done");
41402
41410
  if (B.length) {
41403
- const R = [...u, ...B.map((M) => {
41411
+ const w = [...u, ...B.map((M) => {
41404
41412
  var $;
41405
41413
  return c(($ = M.response) == null ? void 0 : $.data);
41406
41414
  })];
41407
- j.length ? d(R) : (l == null || l([...a || [], ...R]), d([]));
41415
+ j.length ? d(w) : (l == null || l([...a || [], ...w]), d([]));
41408
41416
  }
41409
41417
  } else {
41410
- const B = O.fileList.find((R) => R.uid === O.file.uid);
41418
+ const B = O.fileList.find((w) => w.uid === O.file.uid);
41411
41419
  B.status === "done" && (l == null || l(c((N = B.response) == null ? void 0 : N.data)), m([]));
41412
41420
  }
41413
41421
  },
@@ -41422,7 +41430,7 @@ function Uploader(n) {
41422
41430
  const N = j.indexOf(O);
41423
41431
  return j.splice(N, 1), [...j];
41424
41432
  });
41425
- }, []), F = useComponent("QRCodeUploader"), { mimetype: I, size: w } = e != null ? e : {}, T = useSizeHint(w), D = !r && (i || (!a || Array.isArray(a) && !a.length) && !p.length);
41433
+ }, []), 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
41434
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
41427
41435
  u.map((O, j) => /* @__PURE__ */ jsx(AttachmentListItem, { file: O, index: j, disabled: r, onDelete: v }, O.id)),
41428
41436
  p.map((O, j) => /* @__PURE__ */ jsx(AttachmentListItem, { file: O, index: j, disabled: r, onDelete: y }, O.uid)),
@@ -41737,7 +41745,7 @@ function FileSelector(e) {
41737
41745
  const InternalFileManager = (e) => {
41738
41746
  var D, O;
41739
41747
  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
- j.stopPropagation(), j.preventDefault(), m ? d(schema$1.Selector) : i.reduceProperties((B, R) => R["x-component"] === "AssociationField.Selector" ? R : B, null) || i.addProperty("selector", schema$1.Selector), l(!0), u([]);
41748
+ 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
41749
  };
41742
41750
  useEffect(() => {
41743
41751
  if (t && Object.keys(t).length > 0) {
@@ -41763,11 +41771,11 @@ const InternalFileManager = (e) => {
41763
41771
  selectedRows: c,
41764
41772
  setSelectedRows: u,
41765
41773
  collectionField: b
41766
- }, w = () => {
41767
- const { setVisible: j } = useActionContext(), { multiple: N, selectedRows: B, onChange: R, options: M, collectionField: $ } = useContext(RecordPickerContext);
41774
+ }, R = () => {
41775
+ const { setVisible: j } = useActionContext(), { multiple: N, selectedRows: B, onChange: w, options: M, collectionField: $ } = useContext(RecordPickerContext);
41768
41776
  return {
41769
41777
  onClick() {
41770
- R(N ? unionBy(B, M, ($ == null ? void 0 : $.targetKey) || "id") : (B == null ? void 0 : B[0]) || null), j(!1);
41778
+ w(N ? unionBy(B, M, ($ == null ? void 0 : $.targetKey) || "id") : (B == null ? void 0 : B[0]) || null), j(!1);
41771
41779
  }
41772
41780
  };
41773
41781
  };
@@ -41796,7 +41804,7 @@ const InternalFileManager = (e) => {
41796
41804
  },
41797
41805
  formValueChanged: !1
41798
41806
  },
41799
- children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, I), { children: /* @__PURE__ */ jsx(CollectionProvider_deprecated, { name: b == null ? void 0 : b.target, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: {}, children: /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: { usePickActionProps: w, useTableSelectorProps: useTableSelectorProps$3 }, children: /* @__PURE__ */ jsx(
41807
+ children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, I), { children: /* @__PURE__ */ jsx(CollectionProvider_deprecated, { name: b == null ? void 0 : b.target, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: {}, children: /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: { usePickActionProps: R, useTableSelectorProps: useTableSelectorProps$3 }, children: /* @__PURE__ */ jsx(
41800
41808
  NocoBaseRecursionField,
41801
41809
  {
41802
41810
  onlyRenderProperties: !0,
@@ -41823,13 +41831,13 @@ const InternalFileManager = (e) => {
41823
41831
  const { data: t, mapOptions: n, onChange: o, value: r } = e, [i, a] = useState([
41824
41832
  { key: void 0, children: [], value: null }
41825
41833
  ]), [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(() => {
41826
- var B, R;
41827
- return v != null && v.interface && ((R = (B = S(v.interface)) == null ? void 0 : B.filterable) == null ? void 0 : R.operators[0].value) || "$includes";
41834
+ var B, w;
41835
+ return v != null && v.interface && ((w = (B = S(v.interface)) == null ? void 0 : B.filterable) == null ? void 0 : w.operators[0].value) || "$includes";
41828
41836
  }, [v]), I = useField();
41829
41837
  useEffect(() => {
41830
41838
  var B;
41831
41839
  if (r) {
41832
- const R = Array.isArray(r) ? extractLastNonNullValueObjects(r == null ? void 0 : r.filter(($) => $.value), !0) : transformNestedData(r), M = (B = R == null ? void 0 : R.map) == null ? void 0 : B.call(R, ($) => ({
41840
+ const w = Array.isArray(r) ? extractLastNonNullValueObjects(r == null ? void 0 : r.filter(($) => $.value), !0) : transformNestedData(r), M = (B = w == null ? void 0 : w.map) == null ? void 0 : B.call(w, ($) => ({
41833
41841
  key: $.parentId,
41834
41842
  children: [],
41835
41843
  value: $
@@ -41837,12 +41845,12 @@ const InternalFileManager = (e) => {
41837
41845
  a(M);
41838
41846
  }
41839
41847
  }, []);
41840
- const w = useCallback(
41848
+ const R = useCallback(
41841
41849
  (B) => {
41842
41850
  try {
41843
- return B == null ? void 0 : B.filter((R) => ["number", "string"].includes(typeof R[y.value])).map((R) => {
41851
+ return B == null ? void 0 : B.filter((w) => ["number", "string"].includes(typeof w[y.value])).map((w) => {
41844
41852
  var $, k, z;
41845
- let M = p(R[y.label]);
41853
+ let M = p(w[y.label]);
41846
41854
  if (($ = v == null ? void 0 : v.uiSchema) != null && $.enum)
41847
41855
  if (Array.isArray(M))
41848
41856
  M = M.map((E, q) => {
@@ -41856,45 +41864,45 @@ const InternalFileManager = (e) => {
41856
41864
  }
41857
41865
  return (v == null ? void 0 : v.type) === "date" && (M = dayjs(M).format("YYYY-MM-DD")), n ? n({
41858
41866
  [y.label]: M || EMPTY,
41859
- [y.value]: R[y.value]
41860
- }) : P(x({}, R), {
41867
+ [y.value]: w[y.value]
41868
+ }) : P(x({}, w), {
41861
41869
  [y.label]: M || EMPTY,
41862
- [y.value]: R[y.value]
41870
+ [y.value]: w[y.value]
41863
41871
  });
41864
41872
  }).filter(Boolean);
41865
- } catch (R) {
41866
- return console.error(R), B;
41873
+ } catch (w) {
41874
+ return console.error(w), B;
41867
41875
  }
41868
41876
  },
41869
41877
  [v == null ? void 0 : v.uiSchema, y]
41870
41878
  ), T = (B) => V(void 0, null, function* () {
41871
41879
  var M, $;
41872
- const R = yield C.list({
41880
+ const w = yield C.list({
41873
41881
  pageSize: 200,
41874
41882
  params: h == null ? void 0 : h.params,
41875
41883
  filter: mergeFilter([B, (M = h == null ? void 0 : h.params) == null ? void 0 : M.filter]),
41876
41884
  tree: B.parentId ? void 0 : !0
41877
41885
  });
41878
- return ($ = R == null ? void 0 : R.data) == null ? void 0 : $.data;
41879
- }), D = (B, R, M) => V(void 0, null, function* () {
41880
- const $ = yield T({ parentId: R == null ? void 0 : R.id }), k = [...i];
41881
- if (k.splice(M + 1), k[M] = P(x({}, k[M]), { value: R }), R != null && R.id && (k[M + 1] = { key: R == null ? void 0 : R.id, children: ($ == null ? void 0 : $.length) > 0 ? $ : null }), a(k), ["o2m", "m2m"].includes(g.interface)) {
41886
+ return ($ = w == null ? void 0 : w.data) == null ? void 0 : $.data;
41887
+ }), D = (B, w, M) => V(void 0, null, function* () {
41888
+ const $ = yield T({ parentId: w == null ? void 0 : w.id }), k = [...i];
41889
+ if (k.splice(M + 1), k[M] = P(x({}, k[M]), { value: w }), w != null && w.id && (k[M + 1] = { key: w == null ? void 0 : w.id, children: ($ == null ? void 0 : $.length) > 0 ? $ : null }), a(k), ["o2m", "m2m"].includes(g.interface)) {
41882
41890
  const z = Array.isArray(f.fieldValue) ? f.fieldValue : [];
41883
- z[I.index] = R, f.fieldValue = z;
41891
+ z[I.index] = w, f.fieldValue = z;
41884
41892
  } else
41885
- f.value = R;
41893
+ f.value = w;
41886
41894
  k.length === 1 && !k[0].value ? o == null || o(null) : o == null || o(k);
41887
- }), O = (B, R, M) => V(void 0, null, function* () {
41895
+ }), O = (B, w, M) => V(void 0, null, function* () {
41888
41896
  var $, k, z;
41889
41897
  if (B) {
41890
41898
  d(!0);
41891
- const E = yield T({ parentId: R == null ? void 0 : R.key });
41892
- if (d(!1), c(E), M === (i == null ? void 0 : i.length) - 1 && (($ = R == null ? void 0 : R.value) != null && $.id)) {
41893
- const q = yield T({ parentId: (k = R == null ? void 0 : R.value) == null ? void 0 : k.id }), L = [...i];
41894
- L.splice(M + 1), L[M] = P(x({}, L[M]), { value: R == null ? void 0 : R.value }), L[M + 1] = { key: (z = R == null ? void 0 : R.value) == null ? void 0 : z.id, children: (q == null ? void 0 : q.length) > 0 ? q : null }, a(L), o == null || o(L);
41899
+ const E = yield T({ parentId: w == null ? void 0 : w.key });
41900
+ if (d(!1), c(E), M === (i == null ? void 0 : i.length) - 1 && (($ = w == null ? void 0 : w.value) != null && $.id)) {
41901
+ const q = yield T({ parentId: (k = w == null ? void 0 : w.value) == null ? void 0 : k.id }), L = [...i];
41902
+ L.splice(M + 1), L[M] = P(x({}, L[M]), { value: w == null ? void 0 : w.value }), L[M + 1] = { key: (z = w == null ? void 0 : w.value) == null ? void 0 : z.id, children: (q == null ? void 0 : q.length) > 0 ? q : null }, a(L), o == null || o(L);
41895
41903
  }
41896
41904
  }
41897
- }), j = (B, R) => V(void 0, null, function* () {
41905
+ }), j = (B, w) => V(void 0, null, function* () {
41898
41906
  const M = B ? {
41899
41907
  [y.label]: {
41900
41908
  [F]: B
@@ -41902,11 +41910,11 @@ const InternalFileManager = (e) => {
41902
41910
  } : {};
41903
41911
  d(!0);
41904
41912
  const $ = yield T(P(x({}, M), {
41905
- parentId: R == null ? void 0 : R.key
41913
+ parentId: w == null ? void 0 : w.key
41906
41914
  }));
41907
41915
  d(!1), c($);
41908
41916
  });
41909
- return /* @__PURE__ */ jsx(Space$1, { wrap: !0, children: i.map((B, R) => {
41917
+ return /* @__PURE__ */ jsx(Space$1, { wrap: !0, children: i.map((B, w) => {
41910
41918
  var M, $, k;
41911
41919
  return B.children && /* @__PURE__ */ jsx(
41912
41920
  Select$1,
@@ -41925,9 +41933,9 @@ const InternalFileManager = (e) => {
41925
41933
  onSearch: (z) => j(z, B),
41926
41934
  fieldNames: y,
41927
41935
  style: { minWidth: 150 },
41928
- onChange: (z, E) => D(z, E, R),
41929
- options: u ? [] : w(l),
41930
- onDropdownVisibleChange: (z) => O(z, B, R),
41936
+ onChange: (z, E) => D(z, E, w),
41937
+ options: u ? [] : R(l),
41938
+ onDropdownVisibleChange: (z) => O(z, B, w),
41931
41939
  notFoundContent: u ? /* @__PURE__ */ jsx(Spin, { size: "small" }) : null
41932
41940
  },
41933
41941
  `${(k = B.value) == null ? void 0 : k.id}+ ${B.key} + ${y.label}`
@@ -41935,8 +41943,10 @@ const InternalFileManager = (e) => {
41935
41943
  }) });
41936
41944
  }), AssociationCascadeSelect = connect((e) => /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(CascadeSelect, x({}, e)) })), InternalCascadeSelect = observer$1(
41937
41945
  (e) => {
41938
- var h;
41939
- const { options: t } = useAssociationFieldContext(), n = useMemo(() => createForm(), []), { t: o } = useTranslation(), r = useField(), i = useFieldSchema(), { loading: a, data: l } = useDataBlockRequest() || {}, c = (h = l == null ? void 0 : l.data) == null ? void 0 : h[i.name], u = debounce((g) => {
41946
+ const { options: t } = useAssociationFieldContext(), n = useMemo(() => createForm(), []), { t: o } = useTranslation(), r = useField(), i = useFieldSchema(), { loading: a, data: l } = useDataBlockRequest() || {}, c = useMemo(() => {
41947
+ var g;
41948
+ return (g = l == null ? void 0 : l.data) == null ? void 0 : g[i.name];
41949
+ }, [a]), u = !l || i.name in ((l == null ? void 0 : l.data) || {}), d = debounce((g) => {
41940
41950
  var f, C;
41941
41951
  if (t.interface === "m2o") {
41942
41952
  const b = extractLastNonNullValueObjects((f = g.values) == null ? void 0 : f[i.name]);
@@ -41956,13 +41966,13 @@ const InternalFileManager = (e) => {
41956
41966
  const g = uid();
41957
41967
  return n.addEffects(g, () => {
41958
41968
  onFormValuesChange((f) => {
41959
- u(f);
41969
+ d(f);
41960
41970
  });
41961
41971
  }), () => {
41962
- n.removeEffects(g), u.cancel();
41972
+ n.removeEffects(g), d.cancel();
41963
41973
  };
41964
41974
  }, []);
41965
- const m = {
41975
+ const h = {
41966
41976
  type: "object",
41967
41977
  properties: {
41968
41978
  select_array: {
@@ -42020,7 +42030,7 @@ const InternalFileManager = (e) => {
42020
42030
  }
42021
42031
  }
42022
42032
  };
42023
- return !a && /* @__PURE__ */ jsx(FormProvider$1, { form: n, children: t.interface === "m2o" ? /* @__PURE__ */ jsx(
42033
+ return !a && u && /* @__PURE__ */ jsx(FormProvider$1, { form: n, children: t.interface === "m2o" ? /* @__PURE__ */ jsx(
42024
42034
  SchemaComponent,
42025
42035
  {
42026
42036
  components: { FormItem: FormItem$1 },
@@ -42031,7 +42041,7 @@ const InternalFileManager = (e) => {
42031
42041
  "x-component-props": x({}, e)
42032
42042
  })
42033
42043
  }
42034
- ) : /* @__PURE__ */ jsx(SchemaField, { schema: m }) });
42044
+ ) : /* @__PURE__ */ jsx(SchemaField, { schema: h }) });
42035
42045
  },
42036
42046
  { displayName: "InternalCascadeSelect" }
42037
42047
  );
@@ -42166,7 +42176,7 @@ const InternalNesterCardCss = css`
42166
42176
  }, InternalPicker = observer$1(
42167
42177
  (e) => {
42168
42178
  var B;
42169
- 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(), w = useMemo(() => t && Object.keys(t).length > 0 ? (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((M) => {
42179
+ 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) => {
42170
42180
  const $ = M == null ? void 0 : M[d.label];
42171
42181
  return P(x({}, M), {
42172
42182
  [d.label]: getLabelFormatValue$1(b(S), b($))
@@ -42178,23 +42188,23 @@ const InternalNesterCardCss = css`
42178
42188
  association: {
42179
42189
  target: f == null ? void 0 : f.target
42180
42190
  },
42181
- options: w,
42191
+ options: R,
42182
42192
  onChange: e == null ? void 0 : e.onChange,
42183
42193
  selectedRows: v,
42184
42194
  setSelectedRows: F,
42185
42195
  collectionField: f,
42186
42196
  currentFormCollection: C
42187
42197
  }, D = () => {
42188
- var R;
42189
- return n == null ? null : Array.isArray(t) ? (R = t.filter(Boolean)) == null ? void 0 : R.map((M) => M == null ? void 0 : M[d.value]) : t == null ? void 0 : t[d.value];
42198
+ var w;
42199
+ 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];
42190
42200
  }, O = () => {
42191
- const R = (f == null ? void 0 : f.targetKey) || "id", M = w.map((k) => k[R]).filter(Boolean);
42192
- return M.length ? { $and: [{ [`${R}.$ne`]: M }] } : {};
42201
+ const w = (f == null ? void 0 : f.targetKey) || "id", M = R.map((k) => k[w]).filter(Boolean);
42202
+ return M.length ? { $and: [{ [`${w}.$ne`]: M }] } : {};
42193
42203
  }, j = () => {
42194
- const { setVisible: R } = useActionContext(), { multiple: M, selectedRows: $, onChange: k, options: z, collectionField: E } = useContext(RecordPickerContext);
42204
+ const { setVisible: w } = useActionContext(), { multiple: M, selectedRows: $, onChange: k, options: z, collectionField: E } = useContext(RecordPickerContext);
42195
42205
  return {
42196
42206
  onClick() {
42197
- k(M ? unionBy($, z, (E == null ? void 0 : E.targetKey) || "id") : ($ == null ? void 0 : $[0]) || null), R(!1);
42207
+ k(M ? unionBy($, z, (E == null ? void 0 : E.targetKey) || "id") : ($ == null ? void 0 : $[0]) || null), w(!1);
42198
42208
  },
42199
42209
  style: {
42200
42210
  display: M === !1 ? "none" : "block"
@@ -42213,18 +42223,18 @@ const InternalNesterCardCss = css`
42213
42223
  }, c), {
42214
42224
  mode: n ? "multiple" : e.mode,
42215
42225
  fieldNames: d,
42216
- onDropdownVisibleChange: (R) => {
42226
+ onDropdownVisibleChange: (w) => {
42217
42227
  g(schema$1.Selector), m(!0);
42218
42228
  },
42219
42229
  allowClear: !0,
42220
- onChange: (R) => {
42221
- if (R) {
42222
- if (Array.isArray(R)) {
42223
- if (!R.length) {
42230
+ onChange: (w) => {
42231
+ if (w) {
42232
+ if (Array.isArray(w)) {
42233
+ if (!w.length) {
42224
42234
  r([]), F([]);
42225
42235
  return;
42226
42236
  }
42227
- const M = w == null ? void 0 : w.filter(($) => R.includes($[d.value]));
42237
+ const M = R == null ? void 0 : R.filter(($) => w.includes($[d.value]));
42228
42238
  r(M), F(M);
42229
42239
  }
42230
42240
  } else {
@@ -42232,7 +42242,7 @@ const InternalNesterCardCss = css`
42232
42242
  r(M), F(M);
42233
42243
  }
42234
42244
  },
42235
- options: w,
42245
+ options: R,
42236
42246
  value: D(),
42237
42247
  open: !1
42238
42248
  })
@@ -42243,7 +42253,7 @@ const InternalNesterCardCss = css`
42243
42253
  onlyRenderProperties: !0,
42244
42254
  basePath: u.address,
42245
42255
  schema: h,
42246
- filterProperties: (R) => R["x-component"] === "Action"
42256
+ filterProperties: (w) => w["x-component"] === "Action"
42247
42257
  }
42248
42258
  ) }) })
42249
42259
  ] }),
@@ -42269,7 +42279,7 @@ const InternalNesterCardCss = css`
42269
42279
  onlyRenderProperties: !0,
42270
42280
  basePath: u.address,
42271
42281
  schema: h,
42272
- filterProperties: (R) => R["x-component"] === "AssociationField.Selector"
42282
+ filterProperties: (w) => w["x-component"] === "AssociationField.Selector"
42273
42283
  }
42274
42284
  )
42275
42285
  }
@@ -42306,11 +42316,11 @@ const RenderRecord = React.memo(
42306
42316
  F.current = u;
42307
42317
  const I = useCallback(() => F.current, []);
42308
42318
  return useEffect(() => {
42309
- const w = toArr$3(h).map((T, D, O) => {
42310
- 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"), R = o(
42319
+ const R = toArr$3(h).map((T, D, O) => {
42320
+ 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(
42311
42321
  (T == null ? void 0 : T.__collection) || (r == null ? void 0 : r.target),
42312
42322
  (e == null ? void 0 : e.label) || "label"
42313
- ), M = getLabelFormatValue$1(n(R), B, !0);
42323
+ ), M = getLabelFormatValue$1(n(w), B, !0);
42314
42324
  return /* @__PURE__ */ jsxs(Fragment, { children: [
42315
42325
  /* @__PURE__ */ jsx("span", { children: i ? M : a !== !1 ? /* @__PURE__ */ jsx(
42316
42326
  "a",
@@ -42337,7 +42347,7 @@ const RenderRecord = React.memo(
42337
42347
  D < O.length - 1 ? /* @__PURE__ */ jsx("span", { style: { marginRight: 4, color: "#aaa" }, children: "," }) : null
42338
42348
  ] }, `${T == null ? void 0 : T.id}_${D}`);
42339
42349
  });
42340
- y(w), b(!1);
42350
+ y(R), b(!1);
42341
42351
  }, [
42342
42352
  r == null ? void 0 : r.target,
42343
42353
  n,
@@ -42776,7 +42786,7 @@ const CreateAction = observer$1(
42776
42786
  key: D.name,
42777
42787
  label: S(D.title),
42778
42788
  onClick: () => t == null ? void 0 : t(D)
42779
- })), [g, t]), w = useMemo(() => ({
42789
+ })), [g, t]), R = useMemo(() => ({
42780
42790
  items: I
42781
42791
  }), [I]);
42782
42792
  return useEffect(() => {
@@ -42803,7 +42813,7 @@ const CreateAction = observer$1(
42803
42813
  allowAddToCurrent: u,
42804
42814
  props: e,
42805
42815
  componentType: p,
42806
- menu: w,
42816
+ menu: R,
42807
42817
  onClick: t,
42808
42818
  collection: n,
42809
42819
  icon: v,
@@ -42846,8 +42856,8 @@ function FinallyButton({
42846
42856
  danger: o.danger,
42847
42857
  icon: c,
42848
42858
  onClick: (v) => {
42849
- const F = getLinkageCollection(t, d, u), I = e.find((T) => T.name === F) ? F : l.name, w = m(I);
42850
- a == null || a(w);
42859
+ const F = getLinkageCollection(t, d, u), I = e.find((T) => T.name === F) ? F : l.name, R = m(I);
42860
+ a == null || a(R);
42851
42861
  },
42852
42862
  style: x({
42853
42863
  display: !p && ((C = u == null ? void 0 : u.data) == null ? void 0 : C.hidden) && "none",
@@ -42991,14 +43001,14 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
42991
43001
  }
42992
43002
  });
42993
43003
  Array.isArray(o.value) || (o.value = []);
42994
- const I = useCallback(({ form: j, fieldSchema: N, collectionField: B, getInterface: R }) => {
43004
+ const I = useCallback(({ form: j, fieldSchema: N, collectionField: B, getInterface: w }) => {
42995
43005
  var M;
42996
- 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, R);
42997
- }, []), w = () => {
43006
+ 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);
43007
+ }, []), R = () => {
42998
43008
  const { setVisible: j } = useActionContext(), { selectedRows: N, setSelectedRows: B } = useContext(RecordPickerContext);
42999
43009
  return {
43000
43010
  onClick() {
43001
- N.map((R) => o.value.push(markRecordAsNew(R))), o.onInput(o.value), o.initialValue = o.value, B([]), j(!1);
43011
+ N.map((w) => o.value.push(markRecordAsNew(w))), o.onInput(o.value), o.initialValue = o.value, B([]), j(!1);
43002
43012
  }
43003
43013
  };
43004
43014
  }, T = useMemo(() => o.value && Object.keys(o.value).length > 0 ? (Array.isArray(o.value) ? o.value : o.value ? [o.value] : []).filter(Boolean).map((N) => {
@@ -43019,7 +43029,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
43019
43029
  setSelectedRows: b,
43020
43030
  collectionField: n
43021
43031
  }, O = () => {
43022
- const j = (n == null ? void 0 : n.targetKey) || "id", N = (o.value || []).map((R) => R == null ? void 0 : R[j]).filter(Boolean);
43032
+ const j = (n == null ? void 0 : n.targetKey) || "id", N = (o.value || []).map((w) => w == null ? void 0 : w[j]).filter(Boolean);
43023
43033
  return N.length ? { $and: [{ [`${j}.$ne`]: N }] } : {};
43024
43034
  };
43025
43035
  return o.value.length > 0 ? /* @__PURE__ */ jsxs(
@@ -43108,7 +43118,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
43108
43118
  SchemaComponentOptions,
43109
43119
  {
43110
43120
  scope: {
43111
- usePickActionProps: w,
43121
+ usePickActionProps: R,
43112
43122
  useTableSelectorProps: useTableSelectorProps$2,
43113
43123
  useCreateActionProps
43114
43124
  },
@@ -43150,7 +43160,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
43150
43160
  const t = useFieldSchema(), { enableLink: n, tagColorField: o } = t["x-component-props"], r = useFieldNames$1({ fieldNames: e.fieldNames }), i = useInsertSchema$1("Viewer"), { options: a } = useAssociationFieldContext(), l = useCompile(), { designable: c } = useDesignable(), u = useLabelUiSchema$1(a, (r == null ? void 0 : r.label) || "label"), { snapshot: d } = useActionContext(), p = useRef(), { getCollection: m } = useCollectionManager_deprecated(), h = m(a == null ? void 0 : a.target), g = (h == null ? void 0 : h.template) === "tree", { openPopup: f } = usePopupUtils(), C = useCollectionRecordData(), b = useRef(!1), S = useRef(t);
43151
43161
  S.current = t;
43152
43162
  const y = useCallback(() => S.current, []);
43153
- return /* @__PURE__ */ jsx(Fragment$1, { children: toArr$3(e.value).map((F, I, w) => {
43163
+ return /* @__PURE__ */ jsx(Fragment$1, { children: toArr$3(e.value).map((F, I, R) => {
43154
43164
  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]);
43155
43165
  return /* @__PURE__ */ jsxs(Fragment, { children: [
43156
43166
  /* @__PURE__ */ jsx("span", { children: d ? j : n !== !1 ? /* @__PURE__ */ jsx(
@@ -43175,7 +43185,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
43175
43185
  children: j
43176
43186
  }
43177
43187
  ) : j }),
43178
- I < w.length - 1 ? /* @__PURE__ */ jsx("span", { style: { marginRight: 4, color: "#aaa" }, children: "," }) : null
43188
+ I < R.length - 1 ? /* @__PURE__ */ jsx("span", { style: { marginRight: 4, color: "#aaa" }, children: "," }) : null
43179
43189
  ] }, `${F == null ? void 0 : F[r.value]}_${I}`);
43180
43190
  }) });
43181
43191
  },
@@ -43237,13 +43247,13 @@ const useColumnsDeepMemoized = (e) => {
43237
43247
  }
43238
43248
  `, [n.paddingContentVerticalLG, n.marginSM]), f = useCollection(), C = useMemo(
43239
43249
  () => d == null ? void 0 : d.map((S) => {
43240
- var I, w, T, D;
43250
+ var I, R, T, D;
43241
43251
  const y = S.reduceProperties((O, j) => {
43242
43252
  if (isCollectionFieldComponent(j))
43243
43253
  return O.concat([j]);
43244
43254
  }, []), v = (y == null ? void 0 : y.length) > 0 ? y[0].name : S.name, F = !!((I = S["x-component-props"]) != null && I.columnHidden);
43245
43255
  return P(x({
43246
- title: /* @__PURE__ */ jsx(TableColumnTitle, { name: S.name, schema: S, onlyRenderSelf: !0, tooltip: (w = S["x-component-props"]) == null ? void 0 : w.tooltip }),
43256
+ title: /* @__PURE__ */ jsx(TableColumnTitle, { name: S.name, schema: S, onlyRenderSelf: !0, tooltip: (R = S["x-component-props"]) == null ? void 0 : R.tooltip }),
43247
43257
  dataIndex: v,
43248
43258
  key: S.name,
43249
43259
  sorter: (T = S["x-component-props"]) == null ? void 0 : T.sorter,
@@ -43251,8 +43261,8 @@ const useColumnsDeepMemoized = (e) => {
43251
43261
  }, S["x-component-props"]), {
43252
43262
  width: F && !a ? 0 : ((D = S["x-component-props"]) == null ? void 0 : D.width) || 100,
43253
43263
  render: (O, j) => {
43254
- var R;
43255
- const N = (R = o.value) == null ? void 0 : R.indexOf(j), B = o.address.concat(j.__index || N);
43264
+ var w;
43265
+ const N = (w = o.value) == null ? void 0 : w.indexOf(j), B = o.address.concat(j.__index || N);
43256
43266
  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) }) }) }) });
43257
43267
  },
43258
43268
  onCell: (O, j) => ({
@@ -43296,11 +43306,11 @@ const useColumnsDeepMemoized = (e) => {
43296
43306
  "div",
43297
43307
  {
43298
43308
  onClick: () => action(() => {
43299
- const I = (p - 1) * m + F, w = o.value[I] ? 1 : 2;
43309
+ const I = (p - 1) * m + F, R = o.value[I] ? 1 : 2;
43300
43310
  return spliceArrayState(o, {
43301
43311
  startIndex: I,
43302
- deleteCount: w
43303
- }), o.value.splice(I, w), o.setInitialValue(o.value), o.onInput(o.value);
43312
+ deleteCount: R
43313
+ }), o.value.splice(I, R), o.setInitialValue(o.value), o.onInput(o.value);
43304
43314
  }),
43305
43315
  children: /* @__PURE__ */ jsx(CloseOutlined, { style: { cursor: "pointer", color: "gray" } })
43306
43316
  }
@@ -43351,7 +43361,7 @@ const useColumnsDeepMemoized = (e) => {
43351
43361
  const o = e, { index: t } = o, n = Y(o, ["index"]);
43352
43362
  return /* @__PURE__ */ jsx("div", P(x({ className: cls("nb-table-index"), style: { padding: "0 8px 0 16px" } }, n), { children: t }));
43353
43363
  }, pageSizeOptions$1 = [5, 10, 20, 50, 100, 200], usePaginationProps$2 = (e, t) => {
43354
- var S, y, v, F, I, w;
43364
+ var S, y, v, F, I, R;
43355
43365
  const { t: n } = useTranslation(), o = useField(), { token: r } = useToken$1(), { data: i } = useDataBlockRequest() || {}, { meta: a } = i || {}, { hasNext: l } = a || {}, c = useMemo(
43356
43366
  () => x(x({}, e), t),
43357
43367
  [JSON.stringify(x(x({}, e), t))]
@@ -43396,7 +43406,7 @@ const useColumnsDeepMemoized = (e) => {
43396
43406
  ) : j
43397
43407
  });
43398
43408
  }, [c, n, C, (I = o.value) == null ? void 0 : I.length]);
43399
- return t === !1 || !t && e === !1 ? !1 : ((w = o.value) == null ? void 0 : w.length) > 0 || b.total ? b : !1;
43409
+ return t === !1 || !t && e === !1 ? !1 : ((R = o.value) == null ? void 0 : R.length) > 0 || b.total ? b : !1;
43400
43410
  }, headerClass = css`
43401
43411
  max-width: 300px;
43402
43412
  white-space: nowrap;
@@ -43586,8 +43596,8 @@ const Table$1 = withDynamicSchemaProps(
43586
43596
  "onExpand",
43587
43597
  "loading",
43588
43598
  "onClickRow"
43589
- ]), S = useArrayField(b), y = useFieldSchema(), { size: v = "small" } = (y == null ? void 0 : y["x-component-props"]) || {}, F = useCollection(), w = ((ce = y == null ? void 0 : y.parent) == null ? void 0 : ce["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: T, allIncludesChildren: D } = w, O = useMemoizedFn(b.onRowDragEnd || (() => {
43590
- })), j = usePaginationProps$2(n, i), N = useTableColumns$1(b, j), [B, R] = useState(() => T ? D : []), [M, $] = useState(((Ce = S == null ? void 0 : S.data) == null ? void 0 : Ce.selectedRowKeys) || []), [k, z] = useState([]), E = (p == null ? void 0 : p.type) !== "none", q = useRef(/* @__PURE__ */ new Map()), L = useMemo(() => css`
43599
+ ]), 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 || (() => {
43600
+ })), 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([]), E = (p == null ? void 0 : p.type) !== "none", q = useRef(/* @__PURE__ */ new Map()), L = useMemo(() => css`
43591
43601
  & > td {
43592
43602
  background-color: ${t.controlItemBgActive} !important;
43593
43603
  }
@@ -43602,7 +43612,7 @@ const Table$1 = withDynamicSchemaProps(
43602
43612
  }) : null, [C, k]);
43603
43613
  useDeepCompareEffect(() => {
43604
43614
  const Q = T ? D : [];
43605
- _.isEqual(Q, B) || R(Q);
43615
+ _.isEqual(Q, B) || w(Q);
43606
43616
  }, [T, D]);
43607
43617
  const H = useCallback((Q) => {
43608
43618
  if (m)
@@ -43727,7 +43737,7 @@ const Table$1 = withDynamicSchemaProps(
43727
43737
  ), me = useCallback(
43728
43738
  (Q, te) => {
43729
43739
  const oe = Q ? [...B, te[F.getPrimaryKey()]] : B.filter((ie) => te[F.getPrimaryKey()] !== ie);
43730
- R(oe), g == null || g(Q, te);
43740
+ w(oe), g == null || g(Q, te);
43731
43741
  },
43732
43742
  [B, g, F]
43733
43743
  ), he = useMemo(() => ({
@@ -43852,7 +43862,7 @@ const Table$1 = withDynamicSchemaProps(
43852
43862
  D(L);
43853
43863
  }
43854
43864
  };
43855
- }, w = () => {
43865
+ }, R = () => {
43856
43866
  const z = (o == null ? void 0 : o.targetKey) || "id", E = (n.value || []).map((L) => L == null ? void 0 : L[z]).filter(Boolean);
43857
43867
  return E.length ? { $and: [{ [`${z}.$ne`]: E }] } : {};
43858
43868
  }, [T, D] = useState(1), [O, j] = useState(((M = n.componentProps) == null ? void 0 : M.pageSize) || 10);
@@ -43884,7 +43894,7 @@ const Table$1 = withDynamicSchemaProps(
43884
43894
  return D(E), z.onInput(z.value);
43885
43895
  }
43886
43896
  };
43887
- }, R = () => ({
43897
+ }, w = () => ({
43888
43898
  run() {
43889
43899
  l(!0);
43890
43900
  }
@@ -43929,7 +43939,7 @@ const Table$1 = withDynamicSchemaProps(
43929
43939
  C && /* @__PURE__ */ jsx(
43930
43940
  Action.Link,
43931
43941
  {
43932
- useAction: R,
43942
+ useAction: w,
43933
43943
  title: /* @__PURE__ */ jsxs(Space$1, { style: { gap: 2 }, children: [
43934
43944
  /* @__PURE__ */ jsx(ZoomInOutlined, {}),
43935
43945
  " ",
@@ -43951,7 +43961,7 @@ const Table$1 = withDynamicSchemaProps(
43951
43961
  visible: a,
43952
43962
  setVisible: l
43953
43963
  },
43954
- children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, F), { children: /* @__PURE__ */ jsx(CollectionProvider_deprecated, { name: o == null ? void 0 : o.target, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: { filter: w() }, children: /* @__PURE__ */ jsx(
43964
+ children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, F), { children: /* @__PURE__ */ jsx(CollectionProvider_deprecated, { name: o == null ? void 0 : o.target, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: { filter: R() }, children: /* @__PURE__ */ jsx(
43955
43965
  SchemaComponentOptions,
43956
43966
  {
43957
43967
  scope: {
@@ -44065,8 +44075,8 @@ InternalAssociationSelect.displayName = "InternalAssociationSelect";
44065
44075
  const AssociationSelect = InternalAssociationSelect;
44066
44076
  AssociationSelect.Designer = function e() {
44067
44077
  var M, $, k, z, E, q, L, G, U, H, J;
44068
- 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), w = ($ = S == null ? void 0 : S.uiSchema) == null ? void 0 : $.title, T = S != null && S.target ? t(S == null ? void 0 : S.target) : [];
44069
- c.title === w || c.title;
44078
+ 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) : [];
44079
+ c.title === R || c.title;
44070
44080
  const D = useSortFields(S == null ? void 0 : S.target), O = ((E = (z = (k = c.componentProps) == null ? void 0 : k.service) == null ? void 0 : z.params) == null ? void 0 : E.sort) || [];
44071
44081
  useEffect(() => {
44072
44082
  c.readPretty !== u["x-read-pretty"] && (c.readPretty = !!u["x-read-pretty"]);
@@ -44088,7 +44098,7 @@ AssociationSelect.Designer = function e() {
44088
44098
  });
44089
44099
  let B = "editable";
44090
44100
  u["x-disabled"] === !0 && (B = "readonly"), u["x-read-pretty"] === !0 && (B = "read-pretty");
44091
- const R = _.omit(u, "required");
44101
+ const w = _.omit(u, "required");
44092
44102
  return /* @__PURE__ */ jsxs(GeneralSchemaDesigner, { children: [
44093
44103
  /* @__PURE__ */ jsx(GeneralSchemaItems, {}),
44094
44104
  l && !(l != null && l.readPretty) && I && /* @__PURE__ */ jsx(
@@ -44205,9 +44215,9 @@ AssociationSelect.Designer = function e() {
44205
44215
  type: "object",
44206
44216
  title: d("Set default value"),
44207
44217
  properties: {
44208
- default: P(x({}, R || {}), {
44218
+ default: P(x({}, w || {}), {
44209
44219
  "x-decorator": "FormItem",
44210
- "x-component-props": P(x({}, R["x-component-props"]), {
44220
+ "x-component-props": P(x({}, w["x-component-props"]), {
44211
44221
  component: S != null && S.target ? "AssociationSelect" : void 0,
44212
44222
  service: {
44213
44223
  resource: S == null ? void 0 : S.target
@@ -44463,10 +44473,10 @@ AssociationSelect.Designer = function e() {
44463
44473
  ] });
44464
44474
  };
44465
44475
  AssociationSelect.FilterDesigner = function e() {
44466
- var F, I, w, T, D, O, j, N, B, R, M;
44476
+ var F, I, R, T, D, O, j, N, B, w, M;
44467
44477
  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) : [];
44468
44478
  a.title === f || a.title;
44469
- const b = useSortFields(m == null ? void 0 : m.target), S = ((D = (T = (w = a.componentProps) == null ? void 0 : w.service) == null ? void 0 : T.params) == null ? void 0 : D.sort) || [], y = S == null ? void 0 : S.map(($) => $.startsWith("-") ? {
44479
+ 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("-") ? {
44470
44480
  field: $.substring(1),
44471
44481
  direction: "desc"
44472
44482
  } : {
@@ -44720,7 +44730,7 @@ AssociationSelect.FilterDesigner = function e() {
44720
44730
  {
44721
44731
  title: c("Title field"),
44722
44732
  options: v,
44723
- value: (M = (R = a == null ? void 0 : a.componentProps) == null ? void 0 : R.fieldNames) == null ? void 0 : M.label,
44733
+ value: (M = (w = a == null ? void 0 : a.componentProps) == null ? void 0 : w.fieldNames) == null ? void 0 : M.label,
44724
44734
  onChange: ($) => {
44725
44735
  var E, q;
44726
44736
  const k = {
@@ -44843,11 +44853,11 @@ const AutoComplete = withDynamicSchemaProps(
44843
44853
  }
44844
44854
  },
44845
44855
  e
44846
- ) : {}, C = () => toArr$3(n).map((v) => typeof v == "object" ? v[m.value] : v), b = (v, F) => /* @__PURE__ */ jsx(Space$1, { split: "/", children: v.map((I, w) => {
44847
- if (F[w])
44848
- return /* @__PURE__ */ jsx("span", { children: I }, w);
44856
+ ) : {}, C = () => toArr$3(n).map((v) => typeof v == "object" ? v[m.value] : v), b = (v, F) => /* @__PURE__ */ jsx(Space$1, { split: "/", children: v.map((I, R) => {
44857
+ if (F[R])
44858
+ return /* @__PURE__ */ jsx("span", { children: I }, R);
44849
44859
  const T = toArr$3(n).filter(Boolean).find((D) => D[m.value] === I);
44850
- return /* @__PURE__ */ jsx("span", { children: (T == null ? void 0 : T[m.label]) || I }, w);
44860
+ return /* @__PURE__ */ jsx("span", { children: (T == null ? void 0 : T[m.label]) || I }, R);
44851
44861
  }) }), S = (v) => {
44852
44862
  var F;
44853
44863
  v && !((F = t.dataSource) != null && F.length) && (f == null || f());
@@ -45728,17 +45738,17 @@ const InternalGridCardBlockProvider = (e) => {
45728
45738
  (e) => {
45729
45739
  var I;
45730
45740
  const { columnCount: t, pagination: n } = useProps(e), { service: o, columnCount: r = defaultColumnCount } = useGridCardBlockContext(), i = t || r, { run: a, params: l } = o, c = (I = o == null ? void 0 : o.data) == null ? void 0 : I.meta, u = useFieldSchema(), d = useField(), p = useDesigner(), m = useGridCardBodyHeight(), h = useCallback(
45731
- (w) => new Schema({
45741
+ (R) => new Schema({
45732
45742
  type: "object",
45733
45743
  properties: {
45734
- [w]: x({}, u.properties.item)
45744
+ [R]: x({}, u.properties.item)
45735
45745
  }
45736
45746
  }),
45737
45747
  [u.properties]
45738
45748
  ), { token: g } = useToken(), f = useCallback(
45739
- (w, T) => {
45749
+ (R, T) => {
45740
45750
  a(P(x({}, l == null ? void 0 : l[0]), {
45741
- page: w,
45751
+ page: R,
45742
45752
  pageSize: T
45743
45753
  }));
45744
45754
  },
@@ -45793,7 +45803,7 @@ const InternalGridCardBlockProvider = (e) => {
45793
45803
  xl: i.lg,
45794
45804
  gutter: [g.marginBlock / 2, g.marginBlock / 2]
45795
45805
  }),
45796
- renderItem: (w, T) => /* @__PURE__ */ jsx(Col, { style: { height: "100%" }, className: "nb-card-item-warper", children: /* @__PURE__ */ jsx(
45806
+ renderItem: (R, T) => /* @__PURE__ */ jsx(Col, { style: { height: "100%" }, className: "nb-card-item-warper", children: /* @__PURE__ */ jsx(
45797
45807
  NocoBaseRecursionField,
45798
45808
  {
45799
45809
  basePath: d.address,
@@ -45839,7 +45849,7 @@ function IconField(e) {
45839
45849
  var I;
45840
45850
  const F = (I = v == null ? void 0 : v.trim()) != null ? I : "";
45841
45851
  m(
45842
- F.length ? n.filter((w) => w.split(" ").some((T) => T.includes(F))) : n
45852
+ F.length ? n.filter((R) => R.split(" ").some((T) => T.includes(F))) : n
45843
45853
  );
45844
45854
  }, 250), y = () => /* @__PURE__ */ jsxs(Flex, { vertical: !0, gap: "middle", children: [
45845
45855
  /* @__PURE__ */ jsx(
@@ -46160,7 +46170,7 @@ const InternalListBlockProvider = (e) => {
46160
46170
  }
46161
46171
  },
46162
46172
  onSubmit: ({ sort: F }) => {
46163
- const I = F.map((w) => w.direction === "desc" ? `-${w.field}` : w.field);
46173
+ const I = F.map((R) => R.direction === "desc" ? `-${R.field}` : R.field);
46164
46174
  _.set(r, "x-decorator-props.params.sort", I), a.decoratorProps.params = P(x({}, r["x-decorator-props"].params), { page: 1 }), l.emit("patch", {
46165
46175
  schema: {
46166
46176
  "x-uid": r["x-uid"],
@@ -46292,7 +46302,7 @@ const InternalListBlockProvider = (e) => {
46292
46302
  return e - u - n.paddingLG - l;
46293
46303
  }, InternalList = withSkeletonComponent(
46294
46304
  (e) => {
46295
- var N, B, R;
46305
+ var N, B, w;
46296
46306
  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(
46297
46307
  (M) => (m.has(M) || m.set(
46298
46308
  M,
@@ -46314,7 +46324,7 @@ const InternalListBlockProvider = (e) => {
46314
46324
  [n, o]
46315
46325
  ), F = getCardItemSchema == null ? void 0 : getCardItemSchema(r), {
46316
46326
  layout: I = "vertical",
46317
- labelAlign: w = "left",
46327
+ labelAlign: R = "left",
46318
46328
  labelWidth: T = 120,
46319
46329
  labelWrap: D = !0
46320
46330
  } = (F == null ? void 0 : F["x-component-props"]) || {}, j = (() => {
@@ -46388,7 +46398,7 @@ const InternalListBlockProvider = (e) => {
46388
46398
  FormLayout,
46389
46399
  {
46390
46400
  layout: I,
46391
- labelAlign: w,
46401
+ labelAlign: R,
46392
46402
  labelWidth: I === "horizontal" ? T : null,
46393
46403
  labelWrap: D,
46394
46404
  children: /* @__PURE__ */ jsx(
@@ -46396,7 +46406,7 @@ const InternalListBlockProvider = (e) => {
46396
46406
  P(x({}, e), {
46397
46407
  pagination: !a || !((B = p.value) != null && B.length) ? !1 : j,
46398
46408
  loading: t == null ? void 0 : t.loading,
46399
- children: (R = p.value) != null && R.length ? p.value.map((M, $) => /* @__PURE__ */ jsx(
46409
+ children: (w = p.value) != null && w.length ? p.value.map((M, $) => /* @__PURE__ */ jsx(
46400
46410
  NocoBaseRecursionField,
46401
46411
  {
46402
46412
  basePath: p.address,
@@ -46722,9 +46732,9 @@ const useTableSelectorProps$1 = () => {
46722
46732
  useEffect(() => {
46723
46733
  if (t) {
46724
46734
  const F = (Array.isArray(t) ? t : t ? [t] : []).map((I) => {
46725
- const w = I[l.label];
46735
+ const R = I[l.label];
46726
46736
  return P(x({}, I), {
46727
- [l.label]: getLabelFormatValue(h, m(w))
46737
+ [l.label]: getLabelFormatValue(h, m(R))
46728
46738
  });
46729
46739
  });
46730
46740
  S(F);
@@ -46740,7 +46750,7 @@ const useTableSelectorProps$1 = () => {
46740
46750
  action: `${p == null ? void 0 : p.target}:create`,
46741
46751
  onChange: (F) => {
46742
46752
  let I = toArr$3(F);
46743
- I.every((w) => w.status !== "uploading") && (I = I.filter((w) => w.status === "done").map((w) => w.response.data), o(n ? [...b, ...I] : I[0]));
46753
+ I.every((R) => R.status !== "uploading") && (I = I.filter((R) => R.status === "done").map((R) => R.response.data), o(n ? [...b, ...I] : I[0]));
46744
46754
  }
46745
46755
  }
46746
46756
  ) : /* @__PURE__ */ jsx(
@@ -46760,7 +46770,7 @@ const useTableSelectorProps$1 = () => {
46760
46770
  o([]), C([]);
46761
46771
  return;
46762
46772
  }
46763
- const I = b == null ? void 0 : b.filter((w) => F.includes(w[l.value]));
46773
+ const I = b == null ? void 0 : b.filter((R) => F.includes(R[l.value]));
46764
46774
  o(I), C(I);
46765
46775
  }
46766
46776
  } else {
@@ -46834,7 +46844,7 @@ const toValue$1 = (e, t) => e == null ? t : e, ReadPrettyRecordPicker = observer
46834
46844
  const { ellipsis: t } = e, n = useFieldSchema(), o = useRecord(), r = useCollectionManager(), i = useFieldNames(e), [a, l] = useState(!1), c = useCollection(), u = (c == null ? void 0 : c.getField(n.name)) || (r == null ? void 0 : r.getCollectionField(n == null ? void 0 : n["x-collection-field"])), [d, p] = useState({}), m = useCompile(), h = useLabelUiSchema(u, (i == null ? void 0 : i.label) || "label"), { snapshot: g } = useActionContext(), f = ((v = n["x-component-props"]) == null ? void 0 : v.mode) === "tags", C = useRef();
46835
46845
  if (isShowFilePicker(h))
46836
46846
  return u ? /* @__PURE__ */ jsx(Preview, x({}, e)) : null;
46837
- const b = () => toArr$3(e.value).map((I, w, T) => {
46847
+ const b = () => toArr$3(e.value).map((I, R, T) => {
46838
46848
  const D = toValue$1(m(I == null ? void 0 : I[(i == null ? void 0 : i.label) || "label"]), "N/A"), O = getLabelFormatValue(h, D, !0);
46839
46849
  return /* @__PURE__ */ jsxs(Fragment, { children: [
46840
46850
  /* @__PURE__ */ jsx("span", { className: "test-record-picker-read-pretty-item", children: g || f ? O : /* @__PURE__ */ jsx(
@@ -46847,8 +46857,8 @@ const toValue$1 = (e, t) => e == null ? t : e, ReadPrettyRecordPicker = observer
46847
46857
  children: O
46848
46858
  }
46849
46859
  ) }),
46850
- w < T.length - 1 ? /* @__PURE__ */ jsx("span", { style: { marginRight: 4, color: "#aaa" }, children: "," }) : null
46851
- ] }, `${I[i.value]}_${w}`);
46860
+ R < T.length - 1 ? /* @__PURE__ */ jsx("span", { style: { marginRight: 4, color: "#aaa" }, children: "," }) : null
46861
+ ] }, `${I[i.value]}_${R}`);
46852
46862
  }), S = () => /* @__PURE__ */ jsx(WithoutTableFieldResource.Provider, { value: !0, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(
46853
46863
  NocoBaseRecursionField,
46854
46864
  {
@@ -46857,8 +46867,8 @@ const toValue$1 = (e, t) => e == null ? t : e, ReadPrettyRecordPicker = observer
46857
46867
  filterProperties: (I) => I["x-component"] === "RecordPicker.Viewer"
46858
46868
  }
46859
46869
  ) }) }), y = () => {
46860
- var w;
46861
- const I = (w = n == null ? void 0 : n["x-collection-field"]) == null ? void 0 : w.split(".");
46870
+ var R;
46871
+ const I = (R = n == null ? void 0 : n["x-collection-field"]) == null ? void 0 : R.split(".");
46862
46872
  return I && I.length > 2 ? /* @__PURE__ */ jsx(RecordProvider, { record: d, parent: o[I[1]], children: S() }) : /* @__PURE__ */ jsx(RecordProvider, { record: d, parent: o, children: S() });
46863
46873
  };
46864
46874
  return u ? /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(BlockAssociationContext.Provider, { value: `${u.collectionName}.${u.name}`, children: /* @__PURE__ */ jsxs(CollectionProvider_deprecated, { name: (F = u.target) != null ? F : u.targetCollection, children: [
@@ -47675,8 +47685,8 @@ const useStyles$2 = genStyleHook("nb-rich-text", (e) => {
47675
47685
  }),
47676
47686
  renderCell: (y, v, F, I) => {
47677
47687
  var D, O;
47678
- const w = (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;
47679
- return w && (F = F + (w - 1) * T), /* @__PURE__ */ jsxs(
47688
+ 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;
47689
+ return R && (F = F + (R - 1) * T), /* @__PURE__ */ jsxs(
47680
47690
  "div",
47681
47691
  {
47682
47692
  className: cls(
@@ -48069,9 +48079,9 @@ const useStyles$2 = genStyleHook("nb-rich-text", (e) => {
48069
48079
  }
48070
48080
  },
48071
48081
  onSubmit: ({ filter: F }) => {
48072
- var w;
48082
+ var R;
48073
48083
  const I = n.decoratorProps.request.params || {};
48074
- I.filter = F, n.decoratorProps.request.params = I, o["x-decorator-props"].request.params = I, a.run(P(x({}, (w = a.params) == null ? void 0 : w[0]), { filter: F })), c.emit("patch", {
48084
+ I.filter = F, n.decoratorProps.request.params = I, o["x-decorator-props"].request.params = I, a.run(P(x({}, (R = a.params) == null ? void 0 : R[0]), { filter: F })), c.emit("patch", {
48075
48085
  schema: {
48076
48086
  "x-uid": o["x-uid"],
48077
48087
  "x-decorator-props": o["x-decorator-props"]
@@ -48157,8 +48167,8 @@ const useStyles$2 = genStyleHook("nb-rich-text", (e) => {
48157
48167
  },
48158
48168
  onSubmit: ({ sort: F }) => {
48159
48169
  var T;
48160
- const I = F.map((D) => D.direction === "desc" ? `-${D.field}` : D.field), w = n.decoratorProps.request.params || {};
48161
- w.sort = I, n.decoratorProps.request.params = w, o["x-decorator-props"].request.params = w, c.emit("patch", {
48170
+ const I = F.map((D) => D.direction === "desc" ? `-${D.field}` : D.field), R = n.decoratorProps.request.params || {};
48171
+ R.sort = I, n.decoratorProps.request.params = R, o["x-decorator-props"].request.params = R, c.emit("patch", {
48162
48172
  schema: {
48163
48173
  "x-uid": o["x-uid"],
48164
48174
  "x-decorator-props": o["x-decorator-props"]
@@ -48181,9 +48191,9 @@ const useStyles$2 = genStyleHook("nb-rich-text", (e) => {
48181
48191
  { label: "200", value: 200 }
48182
48192
  ],
48183
48193
  onChange: (F) => {
48184
- var w;
48194
+ var R;
48185
48195
  const I = n.decoratorProps.request.params || {};
48186
- I.pageSize = F, n.decoratorProps.request.params = I, o["x-decorator-props"].request.params = I, a.run(P(x({}, (w = a.params) == null ? void 0 : w[0]), { pageSize: F })), c.emit("patch", {
48196
+ I.pageSize = F, n.decoratorProps.request.params = I, o["x-decorator-props"].request.params = I, a.run(P(x({}, (R = a.params) == null ? void 0 : R[0]), { pageSize: F })), c.emit("patch", {
48187
48197
  schema: {
48188
48198
  "x-uid": o["x-uid"],
48189
48199
  "x-decorator-props": o["x-decorator-props"]
@@ -48260,7 +48270,7 @@ const TableActionColumnDesigner = (e) => {
48260
48270
  "sort-field"
48261
48271
  );
48262
48272
  }, TableBlockDesigner = () => {
48263
- var T, D, O, j, N, B, R, M, $, k, z;
48273
+ var T, D, O, j, N, B, w, M, $, k, z;
48264
48274
  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((E) => E != null && E.startsWith("-") ? {
48265
48275
  field: E.substring(1),
48266
48276
  direction: "desc"
@@ -48279,7 +48289,7 @@ const TableActionColumnDesigner = (e) => {
48279
48289
  }), c.params[0].page = 1;
48280
48290
  },
48281
48291
  [d, r.decoratorProps, i, c]
48282
- ), w = useAPIClient();
48292
+ ), R = useAPIClient();
48283
48293
  return /* @__PURE__ */ jsxs(GeneralSchemaDesigner, { template: C, title: t || e, children: [
48284
48294
  /* @__PURE__ */ jsx(SchemaSettingsBlockTitleItem, {}),
48285
48295
  /* @__PURE__ */ jsx(SchemaSettingsBlockHeightItem, {}),
@@ -48307,7 +48317,7 @@ const TableActionColumnDesigner = (e) => {
48307
48317
  title: u("Enable drag and drop sorting"),
48308
48318
  checked: r.decoratorProps.dragSort,
48309
48319
  onChange: (E) => V(void 0, null, function* () {
48310
- E && v && (yield w.resource("collections.fields", v.collectionName).update({
48320
+ E && v && (yield R.resource("collections.fields", v.collectionName).update({
48311
48321
  filterByTk: v.name,
48312
48322
  values: {
48313
48323
  sortable: !0
@@ -48326,7 +48336,7 @@ const TableActionColumnDesigner = (e) => {
48326
48336
  SchemaSettingsDataScope,
48327
48337
  {
48328
48338
  collectionName: e,
48329
- defaultFilter: ((M = (R = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : R.params) == null ? void 0 : M.filter) || {},
48339
+ defaultFilter: ((M = (w = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : w.params) == null ? void 0 : M.filter) || {},
48330
48340
  form: a,
48331
48341
  onSubmit: I
48332
48342
  }
@@ -48506,8 +48516,8 @@ TableField.ActionBar = observer$1(
48506
48516
  { displayName: "TableField.ActionBar" }
48507
48517
  );
48508
48518
  const TableSelectorDesigner = () => {
48509
- var w, T, D, O, j, N;
48510
- 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 = (w = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : w.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("-") ? {
48519
+ var R, T, D, O, j, N;
48520
+ 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("-") ? {
48511
48521
  field: B.substring(1),
48512
48522
  direction: "desc"
48513
48523
  } : {
@@ -48523,8 +48533,8 @@ const TableSelectorDesigner = () => {
48523
48533
  onSubmit: ({ filter: B }) => {
48524
48534
  var $;
48525
48535
  B = removeNullCondition(B);
48526
- const R = r.decoratorProps.params || {};
48527
- R.filter = B, r.decoratorProps.params = R, i["x-decorator-props"].params = R;
48536
+ const w = r.decoratorProps.params || {};
48537
+ w.filter = B, r.decoratorProps.params = w, i["x-decorator-props"].params = w;
48528
48538
  let M = _.cloneDeep(B);
48529
48539
  u && (M ? M = {
48530
48540
  $and: [u, M]
@@ -48563,12 +48573,12 @@ const TableSelectorDesigner = () => {
48563
48573
  onChange: (B) => {
48564
48574
  var M;
48565
48575
  r.form.clearFormGraph(`${r.address}.*`), r.decoratorProps.treeTable = B, i["x-decorator-props"].treeTable = B;
48566
- const R = P(x({}, (M = c.params) == null ? void 0 : M[0]), {
48576
+ const w = P(x({}, (M = c.params) == null ? void 0 : M[0]), {
48567
48577
  tree: B ? !0 : null
48568
48578
  });
48569
48579
  p.emit("patch", {
48570
48580
  schema: i
48571
- }), p.refresh(), c.run(R);
48581
+ }), p.refresh(), c.run(w);
48572
48582
  }
48573
48583
  }
48574
48584
  ),
@@ -48650,13 +48660,13 @@ const TableSelectorDesigner = () => {
48650
48660
  },
48651
48661
  onSubmit: ({ sort: B }) => {
48652
48662
  var $;
48653
- const R = B.map((k) => k.direction === "desc" ? `-${k.field}` : k.field), M = r.decoratorProps.params || {};
48654
- M.sort = R, r.decoratorProps.params = M, i["x-decorator-props"].params = M, p.emit("patch", {
48663
+ const w = B.map((k) => k.direction === "desc" ? `-${k.field}` : k.field), M = r.decoratorProps.params || {};
48664
+ M.sort = w, r.decoratorProps.params = M, i["x-decorator-props"].params = M, p.emit("patch", {
48655
48665
  schema: {
48656
48666
  "x-uid": i["x-uid"],
48657
48667
  "x-decorator-props": i["x-decorator-props"]
48658
48668
  }
48659
- }), c.run(P(x({}, ($ = c.params) == null ? void 0 : $[0]), { sort: R }));
48669
+ }), c.run(P(x({}, ($ = c.params) == null ? void 0 : $[0]), { sort: w }));
48660
48670
  }
48661
48671
  }
48662
48672
  ),
@@ -48675,8 +48685,8 @@ const TableSelectorDesigner = () => {
48675
48685
  ],
48676
48686
  onChange: (B) => {
48677
48687
  var M;
48678
- const R = r.decoratorProps.params || {};
48679
- R.pageSize = B, r.decoratorProps.params = R, i["x-decorator-props"].params = R, c.run(P(x({}, (M = c.params) == null ? void 0 : M[0]), { pageSize: B, page: 1 })), p.emit("patch", {
48688
+ const w = r.decoratorProps.params || {};
48689
+ w.pageSize = B, r.decoratorProps.params = w, i["x-decorator-props"].params = w, c.run(P(x({}, (M = c.params) == null ? void 0 : M[0]), { pageSize: B, page: 1 })), p.emit("patch", {
48680
48690
  schema: {
48681
48691
  "x-uid": i["x-uid"],
48682
48692
  "x-decorator-props": i["x-decorator-props"]
@@ -50124,8 +50134,8 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
50124
50134
  (e) => {
50125
50135
  const { disabled: t } = e, [n, o] = useState([]), { getCollection: r } = useCollectionManager_deprecated(), i = useRecord(), a = useField(), { collectionName: l, target: c, type: u, through: d, name: p, template: m } = i, h = i[a.props.name], g = useCompile(), f = useForm(), [C, b] = useState(h || (m === "view" ? null : a.initialValue)), [S, y] = useState([]);
50126
50136
  return useEffect(() => {
50127
- var w;
50128
- const F = ["belongsTo"].includes(u) ? l : ["belongsToMany"].includes(u) ? d : c, I = (w = r(F)) == null ? void 0 : w.fields;
50137
+ var R;
50138
+ const F = ["belongsTo"].includes(u) ? l : ["belongsToMany"].includes(u) ? d : c, I = (R = r(F)) == null ? void 0 : R.fields;
50129
50139
  if (I) {
50130
50140
  const T = I == null ? void 0 : I.filter((D) => supportTypes.includes(D.type)).map((D) => {
50131
50141
  var O;
@@ -50148,7 +50158,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
50148
50158
  showSearch: !0,
50149
50159
  onDropdownVisibleChange: (F) => V(void 0, null, function* () {
50150
50160
  var O;
50151
- const { target: I, type: w, through: T } = f.values, D = ["belongsTo"].includes(w) ? l || p : ["belongsToMany"].includes(w) ? T : I;
50161
+ const { target: I, type: R, through: T } = f.values, D = ["belongsTo"].includes(R) ? l || p : ["belongsToMany"].includes(R) ? T : I;
50152
50162
  if (D && F) {
50153
50163
  const j = ((O = r(D)) == null ? void 0 : O.fields) || [];
50154
50164
  o(
@@ -50163,13 +50173,13 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
50163
50173
  }
50164
50174
  }),
50165
50175
  onChange: (F, I) => {
50166
- var w;
50167
- (w = e == null ? void 0 : e.onChange) == null || w.call(e, F), b(I.label || F);
50176
+ var R;
50177
+ (R = e == null ? void 0 : e.onChange) == null || R.call(e, F), b(I.label || F);
50168
50178
  },
50169
50179
  onSearch: (F) => {
50170
50180
  if (F) {
50171
- const I = F.toLocaleLowerCase(), w = n.filter((T) => T.label.toLocaleLowerCase().includes(I));
50172
- o(w);
50181
+ const I = F.toLocaleLowerCase(), R = n.filter((T) => T.label.toLocaleLowerCase().includes(I));
50182
+ o(R);
50173
50183
  } else
50174
50184
  o(S);
50175
50185
  }
@@ -50346,11 +50356,11 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
50346
50356
  return /* @__PURE__ */ jsx(AddFieldAction, x({ item: t }, e));
50347
50357
  }, AddFieldAction = (e) => {
50348
50358
  var N, B;
50349
- 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 || [], w = useMemo(() => d.map((R) => ({
50350
- label: S(R.title),
50351
- value: R.name
50359
+ 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) => ({
50360
+ label: S(w.title),
50361
+ value: w.name
50352
50362
  })), []), T = useCallback(() => {
50353
- const { availableFieldInterfaces: R } = u(o.template) || {}, { exclude: M, include: $ } = R || {}, k = [];
50363
+ const { availableFieldInterfaces: w } = u(o.template) || {}, { exclude: M, include: $ } = w || {}, k = [];
50354
50364
  return F.forEach((z) => {
50355
50365
  var E;
50356
50366
  if (z.key === "systemInfo")
@@ -50370,14 +50380,14 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
50370
50380
  }));
50371
50381
  }
50372
50382
  }), k;
50373
- }, [u, o]), D = useMemo(() => T().map((R) => {
50383
+ }, [u, o]), D = useMemo(() => T().map((w) => {
50374
50384
  var M;
50375
- return ((M = R == null ? void 0 : R.children) == null ? void 0 : M.length) === 0 ? null : o.template === "view" ? {
50385
+ return ((M = w == null ? void 0 : w.children) == null ? void 0 : M.length) === 0 ? null : o.template === "view" ? {
50376
50386
  type: "group",
50377
- label: S(R.label),
50378
- title: S(R.label),
50379
- key: R.label,
50380
- children: R.children.filter(($) => ["m2o"].includes($.name)).map(($) => ({
50387
+ label: S(w.label),
50388
+ title: S(w.label),
50389
+ key: w.label,
50390
+ children: w.children.filter(($) => ["m2o"].includes($.name)).map(($) => ({
50381
50391
  label: S($.title),
50382
50392
  title: S($.title),
50383
50393
  key: $.name,
@@ -50385,36 +50395,36 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
50385
50395
  }))
50386
50396
  } : {
50387
50397
  type: "group",
50388
- label: S(R.label),
50389
- title: S(R.label),
50390
- key: R.label,
50391
- children: R == null ? void 0 : R.children.filter(($) => !["o2o", "subTable", "linkTo"].includes($.name)).map(($) => ({
50398
+ label: S(w.label),
50399
+ title: S(w.label),
50400
+ key: w.label,
50401
+ children: w == null ? void 0 : w.children.filter(($) => !["o2o", "subTable", "linkTo"].includes($.name)).map(($) => ({
50392
50402
  label: S($.title),
50393
50403
  title: S($.title),
50394
50404
  key: $.name,
50395
50405
  dataTargetScope: $.targetScope
50396
50406
  }))
50397
50407
  };
50398
- }).filter((R) => {
50408
+ }).filter((w) => {
50399
50409
  var M;
50400
- return (M = R == null ? void 0 : R.children) == null ? void 0 : M.length;
50410
+ return (M = w == null ? void 0 : w.children) == null ? void 0 : M.length;
50401
50411
  }), [T]), O = useMemo(() => ({
50402
50412
  style: {
50403
50413
  maxHeight: "60vh",
50404
50414
  overflow: "auto"
50405
50415
  },
50406
- onClick: (R) => {
50407
- const M = R.item.props["data-targetScope"];
50416
+ onClick: (w) => {
50417
+ const M = w.item.props["data-targetScope"];
50408
50418
  M && f(M);
50409
- const $ = getSchema$8(c(R.key), o, S);
50419
+ const $ = getSchema$8(c(w.key), o, S);
50410
50420
  $ && (b($), h(!0));
50411
50421
  },
50412
50422
  items: D
50413
- }), [c, D, o]), j = useMemo(() => I.filter((R) => ["string", "bigInt", "integer"].includes(R.type)).map((R) => {
50423
+ }), [c, D, o]), j = useMemo(() => I.filter((w) => ["string", "bigInt", "integer"].includes(w.type)).map((w) => {
50414
50424
  var M;
50415
50425
  return {
50416
- value: R.name,
50417
- label: S((M = R.uiSchema) == null ? void 0 : M.title)
50426
+ value: w.name,
50427
+ label: S((M = w.uiSchema) == null ? void 0 : M.title)
50418
50428
  };
50419
50429
  }), [I == null ? void 0 : I.length]);
50420
50430
  return o.template !== "sql" && /* @__PURE__ */ jsx(RecordProvider, { record: o, children: /* @__PURE__ */ jsxs(ActionContextProvider, { value: { visible: m, setVisible: h }, children: [
@@ -50435,7 +50445,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
50435
50445
  record: o,
50436
50446
  showReverseFieldConfig: !0,
50437
50447
  targetScope: g,
50438
- collections: w,
50448
+ collections: R,
50439
50449
  isDialect: v,
50440
50450
  disabledJSONB: !1,
50441
50451
  scopeKeyOptions: j,
@@ -50527,17 +50537,17 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
50527
50537
  return /* @__PURE__ */ jsx(EditFieldAction, x({ item: t, parentItem: n }, e));
50528
50538
  }, EditFieldAction = (e) => {
50529
50539
  const I = e, { scope: t, getContainer: n, item: o, parentItem: r, children: i } = I, a = Y(I, ["scope", "getContainer", "item", "parentItem", "children"]), { getInterface: l, collections: c, getCollection: u } = useCollectionManager_deprecated(), [d, p] = useState(!1), [m, h] = useState({}), g = useAPIClient(), { t: f } = useTranslation(), C = useCompile(), [b, S] = useState({}), { isDialect: y } = useDialect(), v = useMemo(() => {
50530
- var w;
50531
- return (o == null ? void 0 : o.fields) || ((w = u(o.collectionName)) == null ? void 0 : w.options.fields.filter((T) => ["string", "bigInt", "integer"].includes(T.type)).map((T) => {
50540
+ var R;
50541
+ return (o == null ? void 0 : o.fields) || ((R = u(o.collectionName)) == null ? void 0 : R.options.fields.filter((T) => ["string", "bigInt", "integer"].includes(T.type)).map((T) => {
50532
50542
  var D;
50533
50543
  return {
50534
50544
  value: T.name,
50535
50545
  label: C((D = T.uiSchema) == null ? void 0 : D.title)
50536
50546
  };
50537
50547
  }));
50538
- }, [o.name]), F = useMemo(() => c.map((w) => ({
50539
- label: C(w.title),
50540
- value: w.name
50548
+ }, [o.name]), F = useMemo(() => c.map((R) => ({
50549
+ label: C(R.title),
50550
+ value: R.name
50541
50551
  })), []);
50542
50552
  return /* @__PURE__ */ jsx(RecordProvider, { record: o, parent: r, children: /* @__PURE__ */ jsxs(ActionContextProvider, { value: { visible: d, setVisible: p }, children: [
50543
50553
  /* @__PURE__ */ jsx(
@@ -50545,12 +50555,12 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
50545
50555
  P(x({}, a), {
50546
50556
  onClick: () => V(void 0, null, function* () {
50547
50557
  var j, N;
50548
- const { data: w } = yield g.resource("collections.fields", o.collectionName).get({
50558
+ const { data: R } = yield g.resource("collections.fields", o.collectionName).get({
50549
50559
  filterByTk: o.name,
50550
50560
  appends: ["reverseField"]
50551
50561
  });
50552
- S(w == null ? void 0 : w.data);
50553
- const T = l(o.interface), D = cloneDeep(w == null ? void 0 : w.data) || {};
50562
+ S(R == null ? void 0 : R.data);
50563
+ const T = l(o.interface), D = cloneDeep(R == null ? void 0 : R.data) || {};
50554
50564
  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));
50555
50565
  const O = getSchema$7(T, D, o, C);
50556
50566
  h(O), p(!0);
@@ -50648,11 +50658,11 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
50648
50658
  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) => {
50649
50659
  var M;
50650
50660
  return B && ((M = m(B)) == null ? void 0 : M.map(($) => $.name).concat([B]));
50651
- }, [I, w] = useState({}), T = p(a), D = getIsOverriding(a, T, o), O = useMemo(() => h.map((B) => ({
50661
+ }, [I, R] = useState({}), T = p(a), D = getIsOverriding(a, T, o), O = useMemo(() => h.map((B) => ({
50652
50662
  label: v(B.title),
50653
50663
  value: B.name
50654
50664
  })), []), j = () => {
50655
- const B = useForm(), { refresh: R } = useResourceActionContext(), { refreshCM: M } = useCollectionManager_deprecated(), $ = useActionContext(), { resource: k } = useResourceContext();
50665
+ const B = useForm(), { refresh: w } = useResourceActionContext(), { refreshCM: M } = useCollectionManager_deprecated(), $ = useActionContext(), { resource: k } = useResourceContext();
50656
50666
  return {
50657
50667
  run() {
50658
50668
  return V(this, null, function* () {
@@ -50671,17 +50681,17 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
50671
50681
  ]);
50672
50682
  yield k.create({
50673
50683
  values: q
50674
- }), yield B.reset(), yield M(), yield R(), $.setVisible(!1);
50684
+ }), yield B.reset(), yield M(), yield w(), $.setVisible(!1);
50675
50685
  });
50676
50686
  }
50677
50687
  };
50678
50688
  }, N = useMemo(() => {
50679
50689
  var B;
50680
- return (o == null ? void 0 : o.fields) || ((B = d(o.collectionName)) == null ? void 0 : B.options.fields.filter((R) => ["string", "bigInt", "integer"].includes(R.type)).map((R) => {
50690
+ 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) => {
50681
50691
  var M;
50682
50692
  return {
50683
- value: R.name,
50684
- label: v((M = R.uiSchema) == null ? void 0 : M.title)
50693
+ value: w.name,
50694
+ label: v((M = w.uiSchema) == null ? void 0 : M.title)
50685
50695
  };
50686
50696
  }));
50687
50697
  }, [o.name]);
@@ -50693,12 +50703,12 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
50693
50703
  onClick: () => V(void 0, null, function* () {
50694
50704
  var B;
50695
50705
  if (!D) {
50696
- const { data: R } = yield S.resource("collections.fields", o.collectionName).get({
50706
+ const { data: w } = yield S.resource("collections.fields", o.collectionName).get({
50697
50707
  filterByTk: o.name,
50698
50708
  appends: ["reverseField"]
50699
50709
  });
50700
- w(R == null ? void 0 : R.data);
50701
- const M = u(o.interface), $ = cloneDeep(R == null ? void 0 : R.data) || {};
50710
+ R(w == null ? void 0 : w.data);
50711
+ const M = u(o.interface), $ = cloneDeep(w == null ? void 0 : w.data) || {};
50702
50712
  $ != null && $.reverseField || ($.autoCreateReverseField = !1, $.reverseField = (B = M.default) == null ? void 0 : B.reverseField, set($.reverseField, "name", `f_${uid()}`), set($.reverseField, "uiSchema.title", o.__parent.title));
50703
50713
  const k = getSchema$6(
50704
50714
  P(x({}, M), {
@@ -51160,12 +51170,12 @@ const getSchema$4 = (e, t, n) => {
51160
51170
  });
51161
51171
  }), n.filter((o) => o.children.length > 0);
51162
51172
  }, PreviewCom = (e) => {
51163
- const { databaseView: t, viewName: n, sources: o, schema: r } = e, { data: i } = useContext(ResourceActionContext), a = useAPIClient(), { t: l } = useTranslation(), [c, u] = useState(!1), [d, p] = useState([]), [m, h] = useState([]), [g, f] = useState(o), [C, b] = useState([]), S = useField(), y = useForm(), { getCollection: v, getInterface: F, getCollectionFields: I, getInheritCollections: w, getParentCollectionFields: T } = useCollectionManager_deprecated(), D = useCompile(), j = useFieldInterfaceOptions().filter((R) => !["relation", "systemInfo"].includes(R.key));
51173
+ const { databaseView: t, viewName: n, sources: o, schema: r } = e, { data: i } = useContext(ResourceActionContext), a = useAPIClient(), { t: l } = useTranslation(), [c, u] = useState(!1), [d, p] = useState([]), [m, h] = useState([]), [g, f] = useState(o), [C, b] = useState([]), S = useField(), y = useForm(), { getCollection: v, getInterface: F, getCollectionFields: I, getInheritCollections: R, getParentCollectionFields: T } = useCollectionManager_deprecated(), D = useCompile(), j = useFieldInterfaceOptions().filter((w) => !["relation", "systemInfo"].includes(w.key));
51164
51174
  useEffect(() => {
51165
- const R = [];
51175
+ const w = [];
51166
51176
  g.forEach((M) => {
51167
51177
  var q;
51168
- const $ = v(M), z = w(M).map((L) => {
51178
+ const $ = v(M), z = R(M).map((L) => {
51169
51179
  const G = T(L, M);
51170
51180
  return {
51171
51181
  type: "group",
@@ -51183,18 +51193,18 @@ const getSchema$4 = (e, t, n) => {
51183
51193
  var G;
51184
51194
  return { value: L.name, key: L.name, label: l(((G = L.uiSchema) == null ? void 0 : G.title) || L.name) };
51185
51195
  }).concat(z);
51186
- R.push({
51196
+ w.push({
51187
51197
  value: M,
51188
51198
  label: l($.title || $.name),
51189
51199
  children: E
51190
51200
  });
51191
- }), h(R);
51201
+ }), h(w);
51192
51202
  }, [g, t]), useEffect(() => {
51193
- t && (u(!0), a.resource("dbViews").get({ filterByTk: n, schema: r }).then(({ data: R }) => {
51203
+ t && (u(!0), a.resource("dbViews").get({ filterByTk: n, schema: r }).then(({ data: w }) => {
51194
51204
  var M, $;
51195
- if (R) {
51205
+ if (w) {
51196
51206
  u(!1), p([]);
51197
- const k = ($ = Object.values((M = R == null ? void 0 : R.data) == null ? void 0 : M.fields)) == null ? void 0 : $.map((z) => {
51207
+ const k = ($ = Object.values((M = w == null ? void 0 : w.data) == null ? void 0 : M.fields)) == null ? void 0 : $.map((z) => {
51198
51208
  var E, q;
51199
51209
  if (z.source) {
51200
51210
  const L = (i == null ? void 0 : i.data.find((G) => G.name === z.name)) || z;
@@ -51210,13 +51220,13 @@ const getSchema$4 = (e, t, n) => {
51210
51220
  });
51211
51221
  S.value = k, setTimeout(() => {
51212
51222
  var z, E, q;
51213
- p(k), y.setValuesIn("sources", (z = R.data) == null ? void 0 : z.sources), f((E = R.data) == null ? void 0 : E.sources), b((q = R == null ? void 0 : R.data) == null ? void 0 : q.unsupportedFields);
51223
+ p(k), y.setValuesIn("sources", (z = w.data) == null ? void 0 : z.sources), f((E = w.data) == null ? void 0 : E.sources), b((q = w == null ? void 0 : w.data) == null ? void 0 : q.unsupportedFields);
51214
51224
  });
51215
51225
  }
51216
51226
  }).catch);
51217
51227
  }, [t]);
51218
- const N = (R, M) => {
51219
- d.splice(M, 1, R), p(d), S.value = d.map(($) => {
51228
+ const N = (w, M) => {
51229
+ d.splice(M, 1, w), p(d), S.value = d.map(($) => {
51220
51230
  var z, E, q;
51221
51231
  const k = typeof $.source == "string" ? $.source : (q = (E = (z = $.source) == null ? void 0 : z.filter) == null ? void 0 : E.call(z, Boolean)) == null ? void 0 : q.join(".");
51222
51232
  return P(x({}, $), {
@@ -51235,10 +51245,10 @@ const getSchema$4 = (e, t, n) => {
51235
51245
  dataIndex: "source",
51236
51246
  key: "source",
51237
51247
  width: 200,
51238
- render: (R, M, $) => /* @__PURE__ */ jsx(
51248
+ render: (w, M, $) => /* @__PURE__ */ jsx(
51239
51249
  Cascader$1,
51240
51250
  {
51241
- defaultValue: typeof R == "string" ? R == null ? void 0 : R.split(".") : R,
51251
+ defaultValue: typeof w == "string" ? w == null ? void 0 : w.split(".") : w,
51242
51252
  allowClear: !0,
51243
51253
  style: { width: "100%" },
51244
51254
  options: D(m),
@@ -51256,12 +51266,12 @@ const getSchema$4 = (e, t, n) => {
51256
51266
  dataIndex: "type",
51257
51267
  width: 140,
51258
51268
  key: "type",
51259
- render: (R, M, $) => {
51269
+ render: (w, M, $) => {
51260
51270
  const k = d[$];
51261
- return k != null && k.source || !(k != null && k.possibleTypes) ? /* @__PURE__ */ jsx(Tag, { children: R }) : /* @__PURE__ */ jsx(
51271
+ return k != null && k.source || !(k != null && k.possibleTypes) ? /* @__PURE__ */ jsx(Tag, { children: w }) : /* @__PURE__ */ jsx(
51262
51272
  Select$1,
51263
51273
  {
51264
- defaultValue: R,
51274
+ defaultValue: w,
51265
51275
  popupMatchSelectWidth: !1,
51266
51276
  style: { width: "100%" },
51267
51277
  options: (k == null ? void 0 : k.possibleTypes.map((z) => ({ label: z, value: z }))) || [],
@@ -51275,12 +51285,12 @@ const getSchema$4 = (e, t, n) => {
51275
51285
  dataIndex: "interface",
51276
51286
  key: "interface",
51277
51287
  width: 150,
51278
- render: (R, M, $) => {
51288
+ render: (w, M, $) => {
51279
51289
  const k = d[$], z = getInterfaceOptions(j, k.type);
51280
- return k.source ? R : /* @__PURE__ */ jsx(
51290
+ return k.source ? w : /* @__PURE__ */ jsx(
51281
51291
  Select$1,
51282
51292
  {
51283
- defaultValue: R,
51293
+ defaultValue: w,
51284
51294
  style: { width: "100%" },
51285
51295
  popupMatchSelectWidth: !1,
51286
51296
  onChange: (E) => {
@@ -51298,13 +51308,13 @@ const getSchema$4 = (e, t, n) => {
51298
51308
  dataIndex: "title",
51299
51309
  key: "title",
51300
51310
  width: 180,
51301
- render: (R, M, $) => {
51311
+ render: (w, M, $) => {
51302
51312
  var z;
51303
51313
  const k = d[$];
51304
51314
  return /* @__PURE__ */ jsx(
51305
51315
  Input$3,
51306
51316
  {
51307
- defaultValue: ((z = k == null ? void 0 : k.uiSchema) == null ? void 0 : z.title) || R,
51317
+ defaultValue: ((z = k == null ? void 0 : k.uiSchema) == null ? void 0 : z.title) || w,
51308
51318
  onChange: (E) => N(
51309
51319
  P(x({}, k), { uiSchema: P(x({}, omit(k == null ? void 0 : k.uiSchema, "rawTitle")), { title: E.target.value }) }),
51310
51320
  $
@@ -51360,8 +51370,8 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
51360
51370
  }, S = (y) => {
51361
51371
  var v;
51362
51372
  return (v = y.filter((F) => F.source || F.interface)) == null ? void 0 : v.map((F) => {
51363
- var O, j, N, B, R, M;
51364
- 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, w = (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) || (w == null ? void 0 : w.title) || F.name, D = F.source ? w : (M = (R = m(F.interface)) == null ? void 0 : R.default) == null ? void 0 : M.uiSchema;
51373
+ var O, j, N, B, w, M;
51374
+ 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;
51365
51375
  return {
51366
51376
  title: u(T),
51367
51377
  dataIndex: F.name,
@@ -51595,7 +51605,7 @@ const AsyncDataProvider = (e) => {
51595
51605
  }), a;
51596
51606
  }, FieldsConfigure = observer$1(
51597
51607
  () => {
51598
- var v, F, I, w;
51608
+ var v, F, I, R;
51599
51609
  const { t: e } = useTranslation(), [t, n] = useState([]), { data: o, error: r, loading: i } = useAsyncData(), { data: a, fields: l } = o || {}, c = useField(), { data: u } = useContext(ResourceActionContext), d = useCompile(), { getInterface: p, getCollectionField: m } = useCollectionManager_deprecated(), h = useFieldInterfaceOptions(), g = useMemo(
51600
51610
  () => h.filter((T) => !["relation"].includes(T.key)).map((T, D) => ({
51601
51611
  key: D,
@@ -51613,10 +51623,10 @@ const AsyncDataProvider = (e) => {
51613
51623
  const T = /* @__PURE__ */ new Map();
51614
51624
  i || (a && a.length ? Object.entries((a == null ? void 0 : a[0]) || {}).forEach(([j, N]) => {
51615
51625
  var k;
51616
- const B = l[j], R = inferInterface(j, N), M = (k = C.current(R)) == null ? void 0 : k.default, $ = (B == null ? void 0 : B.uiSchema) || (M == null ? void 0 : M.uiSchema) || {};
51626
+ 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) || {};
51617
51627
  T.set(j, {
51618
51628
  name: j,
51619
- interface: (B == null ? void 0 : B.interface) || R,
51629
+ interface: (B == null ? void 0 : B.interface) || w,
51620
51630
  type: (B == null ? void 0 : B.type) || (M == null ? void 0 : M.type),
51621
51631
  source: B == null ? void 0 : B.source,
51622
51632
  uiSchema: x({
@@ -51643,7 +51653,7 @@ const AsyncDataProvider = (e) => {
51643
51653
  return /* @__PURE__ */ jsx(Alert, { showIcon: !0, message: e("Please use a valid SELECT or WITH AS statement") });
51644
51654
  const b = r;
51645
51655
  if (b) {
51646
- const T = ((w = (I = (F = (v = b == null ? void 0 : b.response) == null ? void 0 : v.data) == null ? void 0 : F.errors) == null ? void 0 : I.map) == null ? void 0 : w.call(I, (D) => D.message).join(`
51656
+ const T = ((R = (I = (F = (v = b == null ? void 0 : b.response) == null ? void 0 : v.data) == null ? void 0 : F.errors) == null ? void 0 : I.map) == null ? void 0 : R.call(I, (D) => D.message).join(`
51647
51657
  `)) || b.message;
51648
51658
  return /* @__PURE__ */ jsx(Alert, { showIcon: !0, message: `${e("SQL error: ")}${T}`, type: "error" });
51649
51659
  }
@@ -51651,9 +51661,9 @@ const AsyncDataProvider = (e) => {
51651
51661
  const O = [...t];
51652
51662
  O.splice(D, 1, T), n(O), c.setValue(
51653
51663
  O.map((j) => {
51654
- var N, B, R;
51664
+ var N, B, w;
51655
51665
  return P(x({}, j), {
51656
- source: typeof j.source == "string" ? j.source : ((R = (B = (N = j.source) == null ? void 0 : N.filter) == null ? void 0 : B.call(N, Boolean)) == null ? void 0 : R.join(".")) || null
51666
+ 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
51657
51667
  });
51658
51668
  })
51659
51669
  );
@@ -51710,14 +51720,14 @@ const AsyncDataProvider = (e) => {
51710
51720
  popupMatchSelectWidth: !1,
51711
51721
  onChange: (B) => {
51712
51722
  var M, $, k, z, E;
51713
- const R = p(B);
51723
+ const w = p(B);
51714
51724
  S(
51715
51725
  P(x({}, j), {
51716
51726
  interface: B || null,
51717
- uiSchema: P(x({}, (M = R == null ? void 0 : R.default) == null ? void 0 : M.uiSchema), {
51718
- title: ((k = ($ = R == null ? void 0 : R.default) == null ? void 0 : $.uiSchema) == null ? void 0 : k.title) || ((z = j.uiSchema) == null ? void 0 : z.title)
51727
+ uiSchema: P(x({}, (M = w == null ? void 0 : w.default) == null ? void 0 : M.uiSchema), {
51728
+ title: ((k = ($ = w == null ? void 0 : w.default) == null ? void 0 : $.uiSchema) == null ? void 0 : k.title) || ((z = j.uiSchema) == null ? void 0 : z.title)
51719
51729
  }),
51720
- type: (E = R == null ? void 0 : R.default) == null ? void 0 : E.type
51730
+ type: (E = w == null ? void 0 : w.default) == null ? void 0 : E.type
51721
51731
  }),
51722
51732
  O
51723
51733
  );
@@ -51741,7 +51751,7 @@ const AsyncDataProvider = (e) => {
51741
51751
  {
51742
51752
  value: ((N = j.uiSchema) == null ? void 0 : N.title) || T,
51743
51753
  defaultValue: ((B = j.uiSchema) == null ? void 0 : B.title) !== void 0 ? j.uiSchema.title : j == null ? void 0 : j.name,
51744
- onChange: (R) => S(P(x({}, j), { uiSchema: P(x({}, j == null ? void 0 : j.uiSchema), { title: R.target.value }) }), O)
51754
+ onChange: (w) => S(P(x({}, j), { uiSchema: P(x({}, j == null ? void 0 : j.uiSchema), { title: w.target.value }) }), O)
51745
51755
  }
51746
51756
  );
51747
51757
  }
@@ -56505,6 +56515,7 @@ function useACLRoleContext() {
56505
56515
  [i, t]
56506
56516
  );
56507
56517
  return P(x({}, e), {
56518
+ snippets: (e == null ? void 0 : e.snippets) || [],
56508
56519
  parseAction: useCallback(
56509
56520
  (c, u = {}) => {
56510
56521
  var h;
@@ -57623,32 +57634,32 @@ RoleResourceCollectionContext.displayName = "RoleResourceCollectionContext";
57623
57634
  const RolesResourcesActions = connect((e) => {
57624
57635
  var S, y, v, F;
57625
57636
  const t = (I) => {
57626
- const w = I.map((T) => P(x({}, T), {
57637
+ const R = I.map((T) => P(x({}, T), {
57627
57638
  scope: isEmpty$1(T.scope) ? null : T.scope
57628
57639
  }));
57629
- e.onChange(w);
57640
+ e.onChange(R);
57630
57641
  };
57631
57642
  useForm();
57632
- const n = useRecord(), o = useAvailableActions(), { getCollection: r, getCollectionFields: i } = useCollectionManager_deprecated(), a = r(n.collectionName), l = i(n.collectionName), c = useCompile(), { t: u } = useTranslation(), d = useField(), p = toActionMap(d.value || []), m = (I, w) => {
57643
+ const n = useRecord(), o = useAvailableActions(), { getCollection: r, getCollectionFields: i } = useCollectionManager_deprecated(), a = r(n.collectionName), l = i(n.collectionName), c = useCompile(), { t: u } = useTranslation(), d = useField(), p = toActionMap(d.value || []), m = (I, R) => {
57633
57644
  var D;
57634
57645
  const T = p == null ? void 0 : p[I];
57635
- return T ? (D = T == null ? void 0 : T.fields) == null ? void 0 : D.includes(w) : !1;
57646
+ return T ? (D = T == null ? void 0 : T.fields) == null ? void 0 : D.includes(R) : !1;
57636
57647
  }, h = o.filter((I) => I.allowConfigureFields), g = (S = l == null ? void 0 : l.filter((I) => I.interface)) == null ? void 0 : S.map((I) => {
57637
- const w = x({}, I);
57648
+ const R = x({}, I);
57638
57649
  for (const T of h)
57639
- w[T.name] = m(T.name, I.name);
57640
- return w;
57650
+ R[T.name] = m(T.name, I.name);
57651
+ return R;
57641
57652
  }), f = (I) => {
57642
- var w, T;
57653
+ var R, T;
57643
57654
  p[I] ? delete p[I] : p[I] = {
57644
57655
  name: I,
57645
- fields: (T = (w = l == null ? void 0 : l.filter((D) => D.interface)) == null ? void 0 : w.map) == null ? void 0 : T.call(w, (D) => D.name)
57656
+ fields: (T = (R = l == null ? void 0 : l.filter((D) => D.interface)) == null ? void 0 : R.map) == null ? void 0 : T.call(R, (D) => D.name)
57646
57657
  }, t(Object.values(p));
57647
- }, C = (I, w) => {
57648
- p[I] ? (p[I].scope = w, t(Object.values(p))) : (f(I), p[I].scope = w);
57658
+ }, C = (I, R) => {
57659
+ p[I] ? (p[I].scope = R, t(Object.values(p))) : (f(I), p[I].scope = R);
57649
57660
  }, b = {};
57650
57661
  for (const I of h)
57651
- b[I.name] = ((y = l == null ? void 0 : l.filter((w) => w.interface)) == null ? void 0 : y.length) === ((F = (v = p == null ? void 0 : p[I.name]) == null ? void 0 : v.fields) == null ? void 0 : F.length);
57662
+ b[I.name] = ((y = l == null ? void 0 : l.filter((R) => R.interface)) == null ? void 0 : y.length) === ((F = (v = p == null ? void 0 : p[I.name]) == null ? void 0 : v.fields) == null ? void 0 : F.length);
57652
57663
  return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(RoleResourceCollectionContext.Provider, { value: a, children: /* @__PURE__ */ jsxs(FormLayout, { layout: "vertical", children: [
57653
57664
  /* @__PURE__ */ jsx(FormItem$1, { label: u("Action permission"), children: /* @__PURE__ */ jsx(
57654
57665
  Table$3,
@@ -57670,12 +57681,12 @@ const RolesResourcesActions = connect((e) => {
57670
57681
  {
57671
57682
  dataIndex: "enabled",
57672
57683
  title: u("Allow"),
57673
- render: (I, w) => /* @__PURE__ */ jsx(
57684
+ render: (I, R) => /* @__PURE__ */ jsx(
57674
57685
  Checkbox$1,
57675
57686
  {
57676
57687
  checked: I,
57677
57688
  onChange: () => {
57678
- f(w.name);
57689
+ f(R.name);
57679
57690
  }
57680
57691
  }
57681
57692
  )
@@ -57683,21 +57694,21 @@ const RolesResourcesActions = connect((e) => {
57683
57694
  {
57684
57695
  dataIndex: "scope",
57685
57696
  title: u("Data scope"),
57686
- render: (I, w) => !w.onNewRecord && /* @__PURE__ */ jsx(
57697
+ render: (I, R) => !R.onNewRecord && /* @__PURE__ */ jsx(
57687
57698
  ScopeSelect,
57688
57699
  {
57689
57700
  value: I,
57690
57701
  onChange: (T) => {
57691
- C(w.name, T);
57702
+ C(R.name, T);
57692
57703
  }
57693
57704
  }
57694
57705
  )
57695
57706
  }
57696
57707
  ],
57697
57708
  dataSource: o == null ? void 0 : o.map((I) => {
57698
- let w = !1, T = null;
57699
- return p[I.name] && (w = !0, I.onNewRecord || (T = p[I.name].scope)), P(x({}, I), {
57700
- enabled: w,
57709
+ let R = !1, T = null;
57710
+ return p[I.name] && (R = !0, I.onNewRecord || (T = p[I.name].scope)), P(x({}, I), {
57711
+ enabled: R,
57701
57712
  scope: T
57702
57713
  });
57703
57714
  })
@@ -57716,20 +57727,20 @@ const RolesResourcesActions = connect((e) => {
57716
57727
  render: (I) => c(I)
57717
57728
  },
57718
57729
  ...h.map((I) => {
57719
- const w = b == null ? void 0 : b[I.name];
57730
+ const R = b == null ? void 0 : b[I.name];
57720
57731
  return {
57721
57732
  dataIndex: I.name,
57722
57733
  title: /* @__PURE__ */ jsxs(Fragment$1, { children: [
57723
57734
  /* @__PURE__ */ jsx(
57724
57735
  Checkbox$1,
57725
57736
  {
57726
- checked: w,
57737
+ checked: R,
57727
57738
  onChange: () => {
57728
57739
  var D;
57729
57740
  const T = p[I.name] || {
57730
57741
  name: I.name
57731
57742
  };
57732
- w ? 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));
57743
+ 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));
57733
57744
  }
57734
57745
  }
57735
57746
  ),
@@ -57971,10 +57982,10 @@ const PluginDetail = ({ plugin: e, onCancel: t }) => {
57971
57982
  ready: !!e.name
57972
57983
  }
57973
57984
  ), a = useMemo(() => {
57974
- var F, I, w;
57985
+ var F, I, R;
57975
57986
  if (!((I = (F = r == null ? void 0 : r.data) == null ? void 0 : F.packageJson) != null && I.repository))
57976
57987
  return null;
57977
- const y = (w = r == null ? void 0 : r.data) == null ? void 0 : w.packageJson.repository;
57988
+ const y = (R = r == null ? void 0 : r.data) == null ? void 0 : R.packageJson.repository;
57978
57989
  return (typeof y == "string" ? y : y.url).replace(/\.git$/, "").replace(/^git\+/, "");
57979
57990
  }, [r]), l = useMemo(() => {
57980
57991
  var v;
@@ -58383,7 +58394,7 @@ function PluginInfo(e) {
58383
58394
  description: m,
58384
58395
  error: h,
58385
58396
  homepage: g
58386
- } = t, { styles: f, theme: C } = useStyles$1(), b = useNavigate(), { t: S } = useTranslation(), y = useAPIClient(), { modal: v } = App.useApp(), [F, I] = useState(!1), w = i || r || l;
58397
+ } = t, { styles: f, theme: C } = useStyles$1(), b = useNavigate(), { t: S } = useTranslation(), y = useAPIClient(), { modal: v } = App.useApp(), [F, I] = useState(!1), R = i || r || l;
58387
58398
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
58388
58399
  F && /* @__PURE__ */ jsx(
58389
58400
  PluginUpgradeModal,
@@ -58399,7 +58410,7 @@ function PluginInfo(e) {
58399
58410
  Card,
58400
58411
  {
58401
58412
  role: "button",
58402
- "aria-label": w,
58413
+ "aria-label": R,
58403
58414
  size: "small",
58404
58415
  bordered: !1,
58405
58416
  onClick: () => {
@@ -58407,7 +58418,7 @@ function PluginInfo(e) {
58407
58418
  },
58408
58419
  headStyle: { border: "none", minHeight: "inherit", paddingTop: 14 },
58409
58420
  bodyStyle: { paddingTop: 10 },
58410
- title: /* @__PURE__ */ jsx("div", { children: w }),
58421
+ title: /* @__PURE__ */ jsx("div", { children: R }),
58411
58422
  hoverable: !0,
58412
58423
  className: css`
58413
58424
  .ant-card-actions {
@@ -58756,15 +58767,15 @@ const LocalPlugins = () => {
58756
58767
  "Others"
58757
58768
  ], C = useMemo(() => f.map((v) => {
58758
58769
  if (v === "Others") {
58759
- const I = n == null ? void 0 : n.data.filter((w) => !hasIntersection(w.keywords, f));
58770
+ const I = n == null ? void 0 : n.data.filter((R) => !hasIntersection(R.keywords, f));
58760
58771
  return {
58761
58772
  key: v,
58762
58773
  list: I
58763
58774
  };
58764
58775
  }
58765
58776
  const F = n == null ? void 0 : n.data.filter((I) => {
58766
- var w;
58767
- return (w = I.keywords) == null ? void 0 : w.includes(v);
58777
+ var R;
58778
+ return (R = I.keywords) == null ? void 0 : R.includes(v);
58768
58779
  });
58769
58780
  return {
58770
58781
  key: v,
@@ -58773,12 +58784,12 @@ const LocalPlugins = () => {
58773
58784
  }), [f]), b = useMemo(() => {
58774
58785
  var F;
58775
58786
  let y = ((F = i[a]) == null ? void 0 : F.list) || [];
58776
- !a && m ? y = C.find((I) => I.key === m).list : a && m && (y = C.find((w) => w.key === m).list.filter((w) => y.find((T) => T.name === w.name)));
58787
+ !a && m ? y = C.find((I) => I.key === m).list : a && m && (y = C.find((R) => R.key === m).list.filter((R) => y.find((T) => T.name === R.name)));
58777
58788
  const v = g.toLocaleLowerCase().trim();
58778
58789
  return v && (y = _.filter(
58779
58790
  y,
58780
58791
  (I) => String(I.displayName || "").toLocaleLowerCase().includes(v) || String(I.description || "").toLocaleLowerCase().includes(v)
58781
- )), y.sort((I, w) => I.displayName.localeCompare(w.displayName));
58792
+ )), y.sort((I, R) => I.displayName.localeCompare(R.displayName));
58782
58793
  }, [a, i, g, m]), S = (y) => {
58783
58794
  p(y);
58784
58795
  };
@@ -60277,16 +60288,16 @@ const ActionInitializerItem = (e) => {
60277
60288
  } = useProps(e), [y, v] = useState(!1), F = useMemo(
60278
60289
  () => S && (i != null && i.name) ? [i.name] : [],
60279
60290
  [i == null ? void 0 : i.name, S]
60280
- ), I = C || (i == null ? void 0 : i.targetKey) || "id", w = b || ((U = (G = a["x-component-props"]) == null ? void 0 : G.fieldNames) == null ? void 0 : U.label) || I, T = {
60281
- title: w || I,
60291
+ ), 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 = {
60292
+ title: R || I,
60282
60293
  key: I
60283
- }, [D, O] = useState([]), [j, N] = useState(a.default || []), [B, R] = useState(!0), M = useLabelUiSchema(i, (T == null ? void 0 : T.title) || "label");
60294
+ }, [D, O] = useState([]), [j, N] = useState(a.default || []), [B, w] = useState(!0), M = useLabelUiSchema(i, (T == null ? void 0 : T.title) || "label");
60284
60295
  if (useEffect(() => {
60285
60296
  a.default && (d(a.default), N(a.default));
60286
60297
  }, [a.default, d]), !i)
60287
60298
  return null;
60288
60299
  const $ = (K) => {
60289
- O(K), R(!1);
60300
+ O(K), w(!1);
60290
60301
  }, k = (K) => {
60291
60302
  N(K), d(K), p == null || p(K);
60292
60303
  }, z = (K) => {
@@ -60349,7 +60360,7 @@ const ActionInitializerItem = (e) => {
60349
60360
  treeData: u,
60350
60361
  onSelect: k,
60351
60362
  fieldNames: T,
60352
- titleRender: (K) => /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: getLabelFormatValue(M, c(K[w])) }),
60363
+ titleRender: (K) => /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: getLabelFormatValue(M, c(K[R])) }),
60353
60364
  selectedKeys: j,
60354
60365
  blockNode: !0
60355
60366
  }
@@ -60370,10 +60381,10 @@ const ActionInitializerItem = (e) => {
60370
60381
  label: u((v = y == null ? void 0 : y.uiSchema) == null ? void 0 : v.title) || (y == null ? void 0 : y.name)
60371
60382
  };
60372
60383
  }), h = (y) => {
60373
- var I, w, T;
60384
+ var I, R, T;
60374
60385
  const v = {
60375
60386
  "x-uid": t["x-uid"]
60376
- }, F = P(x(x({}, (w = (I = l == null ? void 0 : l.uiSchema) == null ? void 0 : I["x-component-props"]) == null ? void 0 : w.fieldNames), (T = t["x-component-props"]) == null ? void 0 : T.fieldNames), {
60387
+ }, F = P(x(x({}, (R = (I = l == null ? void 0 : l.uiSchema) == null ? void 0 : I["x-component-props"]) == null ? void 0 : R.fieldNames), (T = t["x-component-props"]) == null ? void 0 : T.fieldNames), {
60377
60388
  label: y
60378
60389
  });
60379
60390
  t["x-component-props"] = t["x-component-props"] || {}, t["x-component-props"].fieldNames = F, v["x-component-props"] = t["x-component-props"], d.emit("patch", {
@@ -60752,19 +60763,19 @@ const DataBlockInitializer = (e) => {
60752
60763
  currentText: b,
60753
60764
  otherText: S,
60754
60765
  alwaysRenderMenu: y
60755
- } = e, { insert: v, setVisible: F } = useSchemaInitializer(), I = useCompile(), { getTemplateSchemaByMode: w } = useSchemaTemplateManager(), T = useCallback(
60766
+ } = e, { insert: v, setVisible: F } = useSchemaInitializer(), I = useCompile(), { getTemplateSchemaByMode: R } = useSchemaTemplateManager(), T = useCallback(
60756
60767
  (z) => V(void 0, null, function* () {
60757
60768
  const { item: E, fromOthersInPopup: q } = z;
60758
60769
  if (f)
60759
60770
  return f(z);
60760
60771
  if (E.template) {
60761
- const L = yield w(E);
60772
+ const L = yield R(E);
60762
60773
  v(t ? t(L, { item: E, fromOthersInPopup: q }) : L);
60763
60774
  } else
60764
60775
  n && n({ item: E, fromOthersInPopup: q });
60765
60776
  F(!1);
60766
60777
  }),
60767
- [w, v, F, n, f, t]
60778
+ [R, v, F, n, f, t]
60768
60779
  ), D = h || // eslint-disable-next-line react-hooks/rules-of-hooks
60769
60780
  useCollectionDataSourceItems({
60770
60781
  name: i,
@@ -60779,9 +60790,9 @@ const DataBlockInitializer = (e) => {
60779
60790
  onClick: T,
60780
60791
  currentText: b,
60781
60792
  otherText: S
60782
- }), O = useGetSchemaInitializerMenuItems(T), j = useMemo(() => O(D, i), [O, D, i]), [N, B] = useState([]), R = useMenuSearch({ data: j, openKeys: N, hideSearch: u }), M = useMemo(() => {
60783
- let z = R.filter((E) => E.key !== "search" && E.key !== "empty");
60784
- return p && z.length === 1 ? z = z[0].children : z = R, [
60793
+ }), O = useGetSchemaInitializerMenuItems(T), j = useMemo(() => O(D, i), [O, D, i]), [N, B] = useState([]), w = useMenuSearch({ data: j, openKeys: N, hideSearch: u }), M = useMemo(() => {
60794
+ let z = w.filter((E) => E.key !== "search" && E.key !== "empty");
60795
+ return p && z.length === 1 ? z = z[0].children : z = w, [
60785
60796
  {
60786
60797
  key: i,
60787
60798
  label: I(a),
@@ -60792,7 +60803,7 @@ const DataBlockInitializer = (e) => {
60792
60803
  children: z
60793
60804
  }
60794
60805
  ];
60795
- }, [R, p, i, I, a, r, T, e]);
60806
+ }, [w, p, i, I, a, r, T, e]);
60796
60807
  return j.length > 1 || j.length === 1 && ((k = ($ = j[0]) == null ? void 0 : $.children) == null ? void 0 : k.length) > 0 || y ? /* @__PURE__ */ jsx(
60797
60808
  SchemaInitializerMenu,
60798
60809
  {
@@ -63960,46 +63971,48 @@ const commonOptions$h = {
63960
63971
  }
63961
63972
  });
63962
63973
  }, AssociateActionProvider = (e) => {
63963
- const [t, n] = useState([]), o = useCollection(), { resource: r, block: i, __parent: a } = useBlockRequestContext(), l = useActionContext(), { isMobile: c } = useOpenModeContext() || {}, [u, d] = useState([]);
63974
+ 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 || {};
63964
63975
  useEffect(() => {
63965
- var g;
63966
- (g = r == null ? void 0 : r.list) == null || g.call(r).then((f) => {
63967
- var C;
63968
- d(((C = f.data) == null ? void 0 : C.data) || []);
63976
+ var C;
63977
+ (C = r == null ? void 0 : r.list) == null || C.call(r, {
63978
+ paginate: !1
63979
+ }).then((b) => {
63980
+ var S;
63981
+ p(((S = b.data) == null ? void 0 : S.data) || []);
63969
63982
  });
63970
- }, [r]);
63971
- const p = {
63983
+ }, [r, m == null ? void 0 : m.meta.count]);
63984
+ const h = {
63972
63985
  size: "small",
63973
63986
  onChange: e == null ? void 0 : e.onChange,
63974
63987
  selectedRows: t,
63975
63988
  setSelectedRows: n
63976
- }, m = () => {
63977
- const { selectedRows: g } = useContext(RecordPickerContext), { setVisible: f, setSubmitted: C, setFormValueChanged: b } = useActionContext();
63989
+ }, g = () => {
63990
+ const { selectedRows: C } = useContext(RecordPickerContext), { setVisible: b, setSubmitted: S, setFormValueChanged: y } = useActionContext();
63978
63991
  return {
63979
- onClick(y, v) {
63992
+ onClick(F, I) {
63980
63993
  return V(this, null, function* () {
63981
- var F, I;
63994
+ var R, T;
63982
63995
  yield r.add({
63983
- values: g
63984
- }), v && (v == null || v()), f == null || f(!1), C == null || C(!0), i && i !== "TableField" && ((I = (F = a == null ? void 0 : a.service) == null ? void 0 : F.refresh) == null || I.call(F), f == null || f(!1), b == null || b(!1));
63996
+ values: C
63997
+ }), 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));
63985
63998
  });
63986
63999
  }
63987
64000
  };
63988
- }, h = () => {
63989
- const g = (o == null ? void 0 : o.filterTargetKey) || "id";
63990
- if (u) {
63991
- const f = u.map((b) => b[g]).filter(Boolean);
63992
- return f.length ? { $and: [{ [`${g}.$ne`]: f }] } : {};
64001
+ }, f = () => {
64002
+ const C = (o == null ? void 0 : o.filterTargetKey) || "id";
64003
+ if (d) {
64004
+ const b = d.map((y) => y[C]).filter(Boolean);
64005
+ return b.length ? { $and: [{ [`${C}.$ne`]: b }] } : {};
63993
64006
  }
63994
64007
  return {};
63995
64008
  };
63996
64009
  return /* @__PURE__ */ jsx(
63997
64010
  ActionContextProvider,
63998
64011
  {
63999
- value: P(x({}, l), {
64000
- openMode: c ? "drawer" : l.openMode
64012
+ value: P(x({}, c), {
64013
+ openMode: u ? "drawer" : c.openMode
64001
64014
  }),
64002
- children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, p), { children: /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: { useTableSelectorProps, usePickActionProps: m }, children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: { filter: h() }, children: e.children }) }) }))
64015
+ 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 }) }) }))
64003
64016
  }
64004
64017
  );
64005
64018
  }, ParentCollectionFields = () => {