@nocobase/client 1.5.0-beta.1 → 1.5.0-beta.2

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