@nocobase/client 1.3.24-beta → 1.3.26-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/index.mjs CHANGED
@@ -54,7 +54,7 @@ export * from "@emotion/css";
54
54
  import jsxRuntime, { jsx, Fragment, jsxs } from "react/jsx-runtime";
55
55
  import * as formilyReact from "@formily/react";
56
56
  import { SchemaOptionsContext, SchemaExpressionScopeContext, Schema, useField, useFieldSchema, useExpressionScope, useForm, Observer, observer as observer$1, connect, SchemaComponentsContext, ExpressionScope, FormProvider as FormProvider$1, RecursionField, mapProps, mapReadPretty, FormContext, useFormEffects, FieldContext, ObjectField, ArrayField, createSchemaField, SchemaContext } from "@formily/react";
57
- import _, { filter, get, uniqBy, every, some, findIndex, set as set$1, concat, isObject as isObject$1, cloneDeep as cloneDeep$1, isEmpty as isEmpty$1, isString, isEqual, last, clone, debounce, castArray, differenceBy, unionBy, omit as omit$1, isBoolean, uniq as uniq$2, pick as pick$1 } from "lodash";
57
+ import _, { filter, get, uniqBy, every, some, findIndex, set as set$1, concat, last, isObject as isObject$1, cloneDeep as cloneDeep$1, isEmpty as isEmpty$1, isString, isEqual, clone, debounce, castArray, differenceBy, unionBy, omit as omit$1, isBoolean, uniq as uniq$2, pick as pick$1 } from "lodash";
58
58
  import React, { createContext, useContext, useCallback, useRef, useEffect, isValidElement, useMemo, useState, memo, createElement, Fragment as Fragment$1, useLayoutEffect, forwardRef, useImperativeHandle, useTransition, createRef } from "react";
59
59
  import * as ReactRouterDom from "react-router-dom";
60
60
  import { useNavigate, useLocation, Outlet, useHref, UNSAFE_RouteContext, UNSAFE_LocationContext, useRoutes, HashRouter, BrowserRouter, MemoryRouter, useParams, Link as Link$1, Navigate, NavLink, useSearchParams, useOutletContext, useMatch, Router } from "react-router-dom";
@@ -841,6 +841,9 @@ const bp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
841
841
  get useLinkageAction() {
842
842
  return useLinkageAction;
843
843
  },
844
+ get usePopupSettings() {
845
+ return usePopupSettings;
846
+ },
844
847
  get useStyles() {
845
848
  return useStyles$3;
846
849
  },
@@ -3456,6 +3459,9 @@ const bp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3456
3459
  get usePlugin() {
3457
3460
  return usePlugin;
3458
3461
  },
3462
+ get usePopupSettings() {
3463
+ return usePopupSettings;
3464
+ },
3459
3465
  get usePopupUtils() {
3460
3466
  return usePopupUtils;
3461
3467
  },
@@ -4101,7 +4107,7 @@ function addAppVersion(e, t) {
4101
4107
  addAppVersion((n = e.properties) == null ? void 0 : n[o], t);
4102
4108
  }), e;
4103
4109
  }
4104
- const name = "@nocobase/client", version$1 = "1.3.24-beta", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
4110
+ const name = "@nocobase/client", version$1 = "1.3.26-beta", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
4105
4111
  "@ahooksjs/use-url-state": "3.5.1",
4106
4112
  "@ant-design/cssinjs": "^1.11.1",
4107
4113
  "@ant-design/icons": "^5.1.4",
@@ -4122,9 +4128,9 @@ const name = "@nocobase/client", version$1 = "1.3.24-beta", license = "AGPL-3.0"
4122
4128
  "@formily/reactive-react": "^2.2.27",
4123
4129
  "@formily/shared": "^2.2.27",
4124
4130
  "@formily/validator": "^2.2.27",
4125
- "@nocobase/evaluators": "1.3.24-beta",
4126
- "@nocobase/sdk": "1.3.24-beta",
4127
- "@nocobase/utils": "1.3.24-beta",
4131
+ "@nocobase/evaluators": "1.3.26-beta",
4132
+ "@nocobase/sdk": "1.3.26-beta",
4133
+ "@nocobase/utils": "1.3.26-beta",
4128
4134
  ahooks: "^3.7.2",
4129
4135
  antd: "5.12.8",
4130
4136
  "antd-style": "3.4.5",
@@ -9877,11 +9883,18 @@ const TabsContext = React.createContext({}), TabsContextProvider = (o) => {
9877
9883
  };
9878
9884
  }, randomNestedSchemaKeyStorage = {}, getRandomNestedSchemaKey = (e) => randomNestedSchemaKeyStorage[e] || (randomNestedSchemaKeyStorage[e] = uid()), deleteRandomNestedSchemaKey = (e) => delete randomNestedSchemaKeyStorage[e], ActionContext = createContext({});
9879
9885
  ActionContext.displayName = "ActionContext";
9880
- const ActionContextProvider = (e) => {
9881
- const [t, o] = useState(!1), { visible: n } = g(g({}, e), e.value), { setSubmitted: r } = g(g({}, e), e.value), i = useBlockServiceInActionButton();
9882
- return useEffect(() => (n === !1 && t && i && (i.refresh(), r == null || r(!0)), () => {
9886
+ const useIsSubPageClosedByPageMenu = () => {
9887
+ const e = useParams(), t = useRef({}), o = useFieldSchema();
9888
+ return useMemo(() => {
9889
+ var i, a;
9890
+ const r = _.isEmpty(e["*"]) && ((i = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : i.openMode) === "page" && !!((a = t.current["*"]) != null && a.includes(o["x-uid"]));
9891
+ return t.current = e, r;
9892
+ }, [o, e]);
9893
+ }, ActionContextProvider = (e) => {
9894
+ const [t, o] = useState(!1), { visible: n } = g(g({}, e), e.value), { setSubmitted: r } = g(g({}, e), e.value), i = useBlockServiceInActionButton(), a = useIsSubPageClosedByPageMenu();
9895
+ return useEffect(() => (n === !1 && i && !i.loading && (t || a) && (i.refresh(), i.loading = !0, r == null || r(!0)), () => {
9883
9896
  o(!1);
9884
- }), [n, i == null ? void 0 : i.refresh, r]), /* @__PURE__ */ jsx(ActionContext.Provider, { value: F(g(g({}, e), e == null ? void 0 : e.value), { submitted: t, setSubmitted: o }), children: e.children });
9897
+ }), [n, i == null ? void 0 : i.refresh, r, a]), /* @__PURE__ */ jsx(ActionContext.Provider, { value: F(g(g({}, e), e == null ? void 0 : e.value), { submitted: t, setSubmitted: o }), children: e.children });
9885
9898
  }, useBlockServiceInActionButton = () => {
9886
9899
  var i, a;
9887
9900
  const { params: e } = useCurrentPopupContext(), t = useFieldSchema(), o = (i = useFieldSchema()) == null ? void 0 : i["x-uid"], n = useDataBlockRequest(), r = e == null ? void 0 : e.popupuid;
@@ -10429,7 +10442,103 @@ const useStyles$j = genStyleHook("nb-action-drawer", (e) => {
10429
10442
  (l) => (l = l ? `-${l}` : "", `drawer-${o}${r}${i}${l}`),
10430
10443
  [r, o, i]
10431
10444
  ) };
10432
- }, DrawerErrorFallback = (e) => {
10445
+ }, validateJSON$1 = {
10446
+ validator: `{{(value, rule)=> {
10447
+ if (!value) {
10448
+ return '';
10449
+ }
10450
+ try {
10451
+ const val = JSON.parse(value);
10452
+ if(!isNaN(val)) {
10453
+ return false;
10454
+ }
10455
+ return true;
10456
+ } catch(error) {
10457
+ console.error(error);
10458
+ return false;
10459
+ }
10460
+ }}}`,
10461
+ message: '{{t("Invalid JSON format")}}'
10462
+ }, requestSettingsSchema = {
10463
+ type: "object",
10464
+ properties: {
10465
+ url: {
10466
+ type: "string",
10467
+ title: '{{t("Request URL")}}',
10468
+ required: !0,
10469
+ "x-decorator": "FormItem",
10470
+ "x-component": "Input"
10471
+ },
10472
+ method: {
10473
+ type: "string",
10474
+ title: '{{t("Request method")}}',
10475
+ "x-decorator": "FormItem",
10476
+ "x-component": "Select",
10477
+ default: "POST",
10478
+ enum: [
10479
+ { label: "POST", value: "POST" },
10480
+ { label: "GET", value: "GET" },
10481
+ { label: "PUT", value: "PUT" },
10482
+ { label: "PATCH", value: "PATCH" },
10483
+ { label: "DELETE", value: "DELETE" }
10484
+ ]
10485
+ },
10486
+ headers: {
10487
+ type: "string",
10488
+ title: '{{t("Request headers")}}',
10489
+ "x-decorator": "FormItem",
10490
+ "x-component": "Input.TextArea",
10491
+ "x-validator": validateJSON$1
10492
+ },
10493
+ params: {
10494
+ type: "string",
10495
+ title: '{{t("Request query parameters")}}',
10496
+ "x-decorator": "FormItem",
10497
+ "x-component": "Input.TextArea",
10498
+ "x-validator": validateJSON$1
10499
+ },
10500
+ data: {
10501
+ type: "string",
10502
+ title: '{{t("Request body")}}',
10503
+ "x-decorator": "FormItem",
10504
+ "x-component": "Input.TextArea",
10505
+ "x-validator": validateJSON$1
10506
+ }
10507
+ }
10508
+ }, linkageAction = (i) => z(void 0, [i], function* ({
10509
+ operator: e,
10510
+ field: t,
10511
+ condition: o,
10512
+ variables: n,
10513
+ localVariables: r
10514
+ }) {
10515
+ var c, u;
10516
+ const a = ((c = t == null ? void 0 : t.stateOfLinkageRules) == null ? void 0 : c.disabled) || [!1], l = ((u = t == null ? void 0 : t.stateOfLinkageRules) == null ? void 0 : u.display) || ["visible"];
10517
+ switch (e) {
10518
+ case ActionType.Visible:
10519
+ (yield conditionAnalyses({ ruleGroup: o, variables: n, localVariables: r })) && (l.push(e), t.data = t.data || {}, t.data.hidden = !1), t.stateOfLinkageRules = F(g({}, t.stateOfLinkageRules), {
10520
+ display: l
10521
+ }), t.display = last(l);
10522
+ break;
10523
+ case ActionType.Hidden:
10524
+ (yield conditionAnalyses({ ruleGroup: o, variables: n, localVariables: r })) ? (t.data = t.data || {}, t.data.hidden = !0) : (t.data = t.data || {}, t.data.hidden = !1);
10525
+ break;
10526
+ case ActionType.Disabled:
10527
+ (yield conditionAnalyses({ ruleGroup: o, variables: n, localVariables: r })) && a.push(!0), t.stateOfLinkageRules = F(g({}, t.stateOfLinkageRules), {
10528
+ disabled: a
10529
+ }), t.disabled = last(a), t.componentProps.disabled = last(a);
10530
+ break;
10531
+ case ActionType.Active:
10532
+ (yield conditionAnalyses({ ruleGroup: o, variables: n, localVariables: r })) ? a.push(!1) : a.push(t.disabled), t.stateOfLinkageRules = F(g({}, t.stateOfLinkageRules), {
10533
+ disabled: a
10534
+ }), t.disabled = last(a), t.componentProps.disabled = last(a);
10535
+ break;
10536
+ default:
10537
+ return null;
10538
+ }
10539
+ }), setInitialActionState = (e) => {
10540
+ e.data = e.data || {}, e.display = "visible", e.disabled = !1, e.data.hidden = !1, e.componentProps.disabled = !1;
10541
+ }, antdDrawerZIndex = 100, DrawerErrorFallback = (e) => {
10433
10542
  const { visible: t, setVisible: o } = useActionContext();
10434
10543
  return /* @__PURE__ */ jsx(Drawer$1, { open: t, onClose: () => o(!1, !0), width: "50%", children: /* @__PURE__ */ jsx(ErrorFallback, g({}, e)) });
10435
10544
  }, openSizeWidthMap$1 = /* @__PURE__ */ new Map([
@@ -10438,27 +10547,28 @@ const useStyles$j = genStyleHook("nb-action-drawer", (e) => {
10438
10547
  ["large", "70%"]
10439
10548
  ]), InternalActionDrawer = observer$1(
10440
10549
  (e) => {
10441
- const x = e, { footerNodeName: t = "Action.Drawer.Footer" } = x, o = W(x, ["footerNodeName"]), { visible: n, setVisible: r, openSize: i = "middle", drawerProps: a, modalProps: l } = useActionContext(), c = useFieldSchema(), u = useField(), { componentCls: d, hashId: p } = useStyles$j(), m = c.reduceProperties((C, S) => S["x-component"] === t ? S : C), { hidden: h } = useCurrentPopupContext(), f = useMemo(() => F(g(g({}, a == null ? void 0 : a.style), o == null ? void 0 : o.style), {
10442
- display: h ? "none" : "block"
10443
- }), [h, a == null ? void 0 : a.style, o == null ? void 0 : o.style]);
10444
- return /* @__PURE__ */ jsx(
10550
+ const C = e, { footerNodeName: t = "Action.Drawer.Footer" } = C, o = W(C, ["footerNodeName"]), { visible: n, setVisible: r, openSize: i = "middle", drawerProps: a, modalProps: l } = useActionContext(), c = useFieldSchema(), u = useField(), { componentCls: d, hashId: p } = useStyles$j(), m = useTabsContext(), h = c.reduceProperties((S, b) => b["x-component"] === t ? b : S), { hidden: f } = useCurrentPopupContext(), x = useMemo(() => F(g(g({}, a == null ? void 0 : a.style), o == null ? void 0 : o.style), {
10551
+ display: f ? "none" : "block"
10552
+ }), [f, a == null ? void 0 : a.style, o == null ? void 0 : o.style]);
10553
+ return /* @__PURE__ */ jsx(TabsContextProvider, F(g({}, m), { tabBarExtraContent: null, children: /* @__PURE__ */ jsx(
10445
10554
  Drawer$1,
10446
10555
  F(g(g({
10556
+ zIndex: antdDrawerZIndex + e.level,
10447
10557
  width: openSizeWidthMap$1.get(i),
10448
10558
  title: u.title
10449
10559
  }, o), a), {
10450
- rootStyle: f,
10560
+ rootStyle: x,
10451
10561
  destroyOnClose: !0,
10452
10562
  open: n,
10453
10563
  onClose: () => r(!1, !0),
10454
10564
  rootClassName: cls(d, p, a == null ? void 0 : a.className, o.className, "reset"),
10455
- footer: m && /* @__PURE__ */ jsx("div", { className: "footer", children: /* @__PURE__ */ jsx(
10565
+ footer: h && /* @__PURE__ */ jsx("div", { className: "footer", children: /* @__PURE__ */ jsx(
10456
10566
  RecursionField,
10457
10567
  {
10458
10568
  basePath: u.address,
10459
10569
  schema: c,
10460
10570
  onlyRenderProperties: !0,
10461
- filterProperties: (C) => C["x-component"] === t
10571
+ filterProperties: (S) => S["x-component"] === t
10462
10572
  }
10463
10573
  ) }),
10464
10574
  children: /* @__PURE__ */ jsx(
@@ -10467,11 +10577,11 @@ const useStyles$j = genStyleHook("nb-action-drawer", (e) => {
10467
10577
  basePath: u.address,
10468
10578
  schema: c,
10469
10579
  onlyRenderProperties: !0,
10470
- filterProperties: (C) => C["x-component"] !== t
10580
+ filterProperties: (S) => S["x-component"] !== t
10471
10581
  }
10472
10582
  )
10473
10583
  })
10474
- );
10584
+ ) }));
10475
10585
  },
10476
10586
  { displayName: "ActionDrawer" }
10477
10587
  ), ActionDrawer = (e) => /* @__PURE__ */ jsx(ErrorBoundary, { FallbackComponent: DrawerErrorFallback, onError: (t) => console.log(t), children: /* @__PURE__ */ jsx(InternalActionDrawer, g({}, e)) });
@@ -10498,21 +10608,22 @@ const useGetAriaLabelOfModal = () => {
10498
10608
  ["large", "80%"]
10499
10609
  ]), InternalActionModal = observer$1(
10500
10610
  (e) => {
10501
- const S = e, { footerNodeName: t = "Action.Modal.Footer", width: o } = S, n = W(S, ["footerNodeName", "width"]), { visible: r, setVisible: i, openSize: a = "middle", modalProps: l } = useActionContext(), c = o != null ? o : openSizeWidthMap.get(a), u = useFieldSchema(), d = useForm(), p = useField(), { token: m } = useToken$1(), h = u.reduceProperties((b, y) => y["x-component"] === t ? y : b), { hidden: f } = useCurrentPopupContext(), x = useMemo(() => ({
10611
+ const b = e, { footerNodeName: t = "Action.Modal.Footer", width: o } = b, n = W(b, ["footerNodeName", "width"]), { visible: r, setVisible: i, openSize: a = "middle", modalProps: l } = useActionContext(), c = o != null ? o : openSizeWidthMap.get(a), u = useFieldSchema(), d = useForm(), p = useField(), { token: m } = useToken$1(), h = useTabsContext(), f = u.reduceProperties((y, v) => v["x-component"] === t ? v : y), { hidden: x } = useCurrentPopupContext(), C = useMemo(() => ({
10502
10612
  mask: {
10503
- display: f ? "none" : "block"
10613
+ display: x ? "none" : "block"
10504
10614
  },
10505
10615
  content: {
10506
- display: f ? "none" : "block"
10616
+ display: x ? "none" : "block"
10507
10617
  }
10508
- }), [f]), C = !!h;
10509
- return /* @__PURE__ */ jsx(
10618
+ }), [x]), S = !!f;
10619
+ return /* @__PURE__ */ jsx(TabsContextProvider, F(g({}, h), { tabBarExtraContent: null, children: /* @__PURE__ */ jsx(
10510
10620
  Modal,
10511
10621
  F(g(g({
10622
+ zIndex: antdDrawerZIndex + e.level,
10512
10623
  width: c,
10513
10624
  title: p.title
10514
10625
  }, n), l), {
10515
- styles: x,
10626
+ styles: C,
10516
10627
  style: g(g({}, l == null ? void 0 : l.style), n == null ? void 0 : n.style),
10517
10628
  destroyOnClose: !0,
10518
10629
  open: r,
@@ -10523,38 +10634,38 @@ const useGetAriaLabelOfModal = () => {
10523
10634
  n.className,
10524
10635
  l == null ? void 0 : l.className,
10525
10636
  css`
10526
- &.nb-action-popup {
10527
- .ant-modal-header {
10528
- display: none;
10529
- }
10637
+ &.nb-action-popup {
10638
+ .ant-modal-header {
10639
+ display: none;
10640
+ }
10530
10641
 
10531
- .ant-modal-content {
10532
- background: var(--nb-box-bg);
10533
- border: 1px solid rgba(255, 255, 255, 0.1);
10534
- padding-bottom: 0;
10535
- }
10642
+ .ant-modal-content {
10643
+ background: var(--nb-box-bg);
10644
+ border: 1px solid rgba(255, 255, 255, 0.1);
10645
+ padding-bottom: 0;
10646
+ }
10536
10647
 
10537
- // 这里的样式是为了保证页面 tabs 标签下面的分割线和页面内容对齐(页面内边距可以通过主题编辑器调节)
10538
- .ant-tabs-nav {
10539
- padding-left: ${m.paddingLG - m.paddingPageHorizontal}px;
10540
- padding-right: ${m.paddingLG - m.paddingPageHorizontal}px;
10541
- margin-left: ${m.paddingPageHorizontal - m.paddingLG}px;
10542
- margin-right: ${m.paddingPageHorizontal - m.paddingLG}px;
10543
- }
10648
+ // 这里的样式是为了保证页面 tabs 标签下面的分割线和页面内容对齐(页面内边距可以通过主题编辑器调节)
10649
+ .ant-tabs-nav {
10650
+ padding-left: ${m.paddingLG - m.paddingPageHorizontal}px;
10651
+ padding-right: ${m.paddingLG - m.paddingPageHorizontal}px;
10652
+ margin-left: ${m.paddingPageHorizontal - m.paddingLG}px;
10653
+ margin-right: ${m.paddingPageHorizontal - m.paddingLG}px;
10654
+ }
10544
10655
 
10545
- .ant-modal-footer {
10546
- display: ${C ? "block" : "none"};
10656
+ .ant-modal-footer {
10657
+ display: ${S ? "block" : "none"};
10658
+ }
10547
10659
  }
10548
- }
10549
- `
10660
+ `
10550
10661
  ),
10551
- footer: C ? /* @__PURE__ */ jsx(
10662
+ footer: S ? /* @__PURE__ */ jsx(
10552
10663
  RecursionField,
10553
10664
  {
10554
10665
  basePath: p.address,
10555
10666
  schema: u,
10556
10667
  onlyRenderProperties: !0,
10557
- filterProperties: (b) => b["x-component"] === t
10668
+ filterProperties: (y) => y["x-component"] === t
10558
10669
  }
10559
10670
  ) : !1,
10560
10671
  children: /* @__PURE__ */ jsx(
@@ -10563,11 +10674,11 @@ const useGetAriaLabelOfModal = () => {
10563
10674
  basePath: p.address,
10564
10675
  schema: u,
10565
10676
  onlyRenderProperties: !0,
10566
- filterProperties: (b) => b["x-component"] !== t
10677
+ filterProperties: (y) => y["x-component"] !== t
10567
10678
  }
10568
10679
  )
10569
10680
  })
10570
- );
10681
+ ) }));
10571
10682
  },
10572
10683
  { displayName: "ActionModal" }
10573
10684
  ), ActionModal = (e) => /* @__PURE__ */ jsx(ErrorBoundary, { FallbackComponent: ModalErrorFallback, onError: (t) => console.log(t), children: /* @__PURE__ */ jsx(InternalActionModal, g({}, e)) });
@@ -10727,7 +10838,7 @@ const BaseVariableContext = React.createContext(null), BaseVariableProvider = (e
10727
10838
  const v = y.field.target;
10728
10839
  return new Promise((A) => {
10729
10840
  setTimeout(() => {
10730
- const T = (getChildren$2(d(f(v, u), y), {
10841
+ const k = (getChildren$2(d(f(v, u, !0), y), {
10731
10842
  collectionField: e,
10732
10843
  uiSchema: t,
10733
10844
  targetFieldSchema: o,
@@ -10739,12 +10850,12 @@ const BaseVariableContext = React.createContext(null), BaseVariableProvider = (e
10739
10850
  isDisabled: x || isDisabledDefault,
10740
10851
  getCollectionField: C.getCollectionField,
10741
10852
  deprecated: p
10742
- }) || []).sort((k, D) => k.isLeaf && !D.isLeaf ? -1 : !k.isLeaf && D.isLeaf ? 1 : 0).sort((k, D) => k.disabled && !D.disabled ? 1 : !k.disabled && D.disabled ? -1 : 0);
10743
- if (T.length === 0) {
10853
+ }) || []).sort((D, $) => D.isLeaf && !$.isLeaf ? -1 : !D.isLeaf && $.isLeaf ? 1 : 0).sort((D, $) => D.disabled && !$.disabled ? 1 : !D.disabled && $.disabled ? -1 : 0);
10854
+ if (k.length === 0) {
10744
10855
  y.disabled = !0, y.isLeaf = !0, A();
10745
10856
  return;
10746
10857
  }
10747
- y.children = T, A();
10858
+ y.children = k, A();
10748
10859
  }, 5);
10749
10860
  });
10750
10861
  };
@@ -18637,10 +18748,10 @@ const useContextVariable = () => {
18637
18748
  typeof t != "function" && (n = useDef$3);
18638
18749
  const r = n();
18639
18750
  return g(g({}, o), r);
18640
- }, ActionContainer = observer$1(
18751
+ }, PopupLevelContext = React.createContext(0), ActionContainer = observer$1(
18641
18752
  (e) => {
18642
- const { getComponentByOpenMode: t, defaultOpenMode: o } = useOpenModeContext(), { openMode: n = o } = useActionContext(), { currentLevel: r } = useCurrentPopupContext(), i = t(n);
18643
- return /* @__PURE__ */ jsx(i, g({ footerNodeName: "Action.Container.Footer", level: r }, e));
18753
+ const { getComponentByOpenMode: t, defaultOpenMode: o } = useOpenModeContext(), { openMode: n = o } = useActionContext(), i = React.useContext(PopupLevelContext) + 1, a = t(n);
18754
+ return console.log("currentLevel", i), /* @__PURE__ */ jsx(PopupLevelContext.Provider, { value: i, children: /* @__PURE__ */ jsx(a, g({ footerNodeName: "Action.Container.Footer", level: i || 1 }, e)) });
18644
18755
  },
18645
18756
  { displayName: "ActionContainer" }
18646
18757
  );
@@ -18885,34 +18996,31 @@ const createSubmitActionSettings = new SchemaSettings({
18885
18996
  ] }) }) : null
18886
18997
  ] });
18887
18998
  }, SchemaSettingOpenModeSchemaItems = (e) => {
18888
- var p, m, h, f;
18889
- const { openMode: t = !0, openSize: o = !0, modeOptions: n } = e, r = useFieldSchema(), i = useField(), { t: a } = useTranslation(), { dn: l } = useDesignable(), { isPopupVisibleControlledByURL: c } = usePopupSettings(), u = ((p = r == null ? void 0 : r["x-component-props"]) == null ? void 0 : p.openMode) || "drawer", d = useMemo(() => n || (c() ? [
18999
+ var d, p, m, h;
19000
+ const { openMode: t = !0, openSize: o = !0, modeOptions: n } = e, r = useFieldSchema(), i = useField(), { t: a } = useTranslation(), { dn: l } = useDesignable(), c = ((d = r == null ? void 0 : r["x-component-props"]) == null ? void 0 : d.openMode) || "drawer", u = useMemo(() => n || [
18890
19001
  { label: a("Drawer"), value: "drawer" },
18891
19002
  { label: a("Dialog"), value: "modal" },
18892
19003
  { label: a("Page"), value: "page" }
18893
- ] : [
18894
- { label: a("Drawer"), value: "drawer" },
18895
- { label: a("Dialog"), value: "modal" }
18896
- ]), [n, a]);
19004
+ ], [n, a]);
18897
19005
  return /* @__PURE__ */ jsxs(Fragment, { children: [
18898
19006
  t ? /* @__PURE__ */ jsx(
18899
19007
  SchemaSettingsSelectItem,
18900
19008
  {
18901
19009
  title: a("Open mode"),
18902
- options: d,
18903
- value: u,
18904
- onChange: (x) => {
18905
- i.componentProps.openMode = x;
18906
- const C = {
19010
+ options: u,
19011
+ value: c,
19012
+ onChange: (f) => {
19013
+ i.componentProps.openMode = f;
19014
+ const x = {
18907
19015
  "x-uid": r["x-uid"]
18908
19016
  };
18909
- C["x-component-props"] = r["x-component-props"] || {}, C["x-component-props"].openMode = x, r["x-component-props"].openMode = x, Reflect.deleteProperty(r["x-component-props"], "openSize"), l.emit("patch", {
18910
- schema: C
19017
+ x["x-component-props"] = r["x-component-props"] || {}, x["x-component-props"].openMode = f, r["x-component-props"].openMode = f, Reflect.deleteProperty(r["x-component-props"], "openSize"), l.emit("patch", {
19018
+ schema: x
18911
19019
  }), l.refresh();
18912
19020
  }
18913
19021
  }
18914
19022
  ) : null,
18915
- o && ["modal", "drawer"].includes(u) ? /* @__PURE__ */ jsx(
19023
+ o && ["modal", "drawer"].includes(c) ? /* @__PURE__ */ jsx(
18916
19024
  SchemaSettingsSelectItem,
18917
19025
  {
18918
19026
  title: a("Popup size"),
@@ -18921,14 +19029,14 @@ const createSubmitActionSettings = new SchemaSettings({
18921
19029
  { label: a("Middle"), value: "middle" },
18922
19030
  { label: a("Large"), value: "large" }
18923
19031
  ],
18924
- value: (f = (m = r == null ? void 0 : r["x-component-props"]) == null ? void 0 : m.openSize) != null ? f : ((h = r == null ? void 0 : r["x-component-props"]) == null ? void 0 : h.openMode) == "modal" ? "large" : "middle",
18925
- onChange: (x) => {
18926
- i.componentProps.openSize = x;
18927
- const C = {
19032
+ value: (h = (p = r == null ? void 0 : r["x-component-props"]) == null ? void 0 : p.openSize) != null ? h : ((m = r == null ? void 0 : r["x-component-props"]) == null ? void 0 : m.openMode) == "modal" ? "large" : "middle",
19033
+ onChange: (f) => {
19034
+ i.componentProps.openSize = f;
19035
+ const x = {
18928
19036
  "x-uid": r["x-uid"]
18929
19037
  };
18930
- C["x-component-props"] = r["x-component-props"] || {}, C["x-component-props"].openSize = x, r["x-component-props"].openSize = x, l.emit("patch", {
18931
- schema: C
19038
+ x["x-component-props"] = r["x-component-props"] || {}, x["x-component-props"].openSize = f, r["x-component-props"].openSize = f, l.emit("patch", {
19039
+ schema: x
18932
19040
  }), l.refresh();
18933
19041
  }
18934
19042
  }
@@ -19059,103 +19167,7 @@ const createSubmitActionSettings = new SchemaSettings({
19059
19167
  ] });
19060
19168
  },
19061
19169
  { displayName: "GeneralSchemaItems" }
19062
- ), validateJSON$1 = {
19063
- validator: `{{(value, rule)=> {
19064
- if (!value) {
19065
- return '';
19066
- }
19067
- try {
19068
- const val = JSON.parse(value);
19069
- if(!isNaN(val)) {
19070
- return false;
19071
- }
19072
- return true;
19073
- } catch(error) {
19074
- console.error(error);
19075
- return false;
19076
- }
19077
- }}}`,
19078
- message: '{{t("Invalid JSON format")}}'
19079
- }, requestSettingsSchema = {
19080
- type: "object",
19081
- properties: {
19082
- url: {
19083
- type: "string",
19084
- title: '{{t("Request URL")}}',
19085
- required: !0,
19086
- "x-decorator": "FormItem",
19087
- "x-component": "Input"
19088
- },
19089
- method: {
19090
- type: "string",
19091
- title: '{{t("Request method")}}',
19092
- "x-decorator": "FormItem",
19093
- "x-component": "Select",
19094
- default: "POST",
19095
- enum: [
19096
- { label: "POST", value: "POST" },
19097
- { label: "GET", value: "GET" },
19098
- { label: "PUT", value: "PUT" },
19099
- { label: "PATCH", value: "PATCH" },
19100
- { label: "DELETE", value: "DELETE" }
19101
- ]
19102
- },
19103
- headers: {
19104
- type: "string",
19105
- title: '{{t("Request headers")}}',
19106
- "x-decorator": "FormItem",
19107
- "x-component": "Input.TextArea",
19108
- "x-validator": validateJSON$1
19109
- },
19110
- params: {
19111
- type: "string",
19112
- title: '{{t("Request query parameters")}}',
19113
- "x-decorator": "FormItem",
19114
- "x-component": "Input.TextArea",
19115
- "x-validator": validateJSON$1
19116
- },
19117
- data: {
19118
- type: "string",
19119
- title: '{{t("Request body")}}',
19120
- "x-decorator": "FormItem",
19121
- "x-component": "Input.TextArea",
19122
- "x-validator": validateJSON$1
19123
- }
19124
- }
19125
- }, linkageAction = (i) => z(void 0, [i], function* ({
19126
- operator: e,
19127
- field: t,
19128
- condition: o,
19129
- variables: n,
19130
- localVariables: r
19131
- }) {
19132
- var c, u;
19133
- const a = ((c = t == null ? void 0 : t.stateOfLinkageRules) == null ? void 0 : c.disabled) || [!1], l = ((u = t == null ? void 0 : t.stateOfLinkageRules) == null ? void 0 : u.display) || ["visible"];
19134
- switch (e) {
19135
- case ActionType.Visible:
19136
- (yield conditionAnalyses({ ruleGroup: o, variables: n, localVariables: r })) && (l.push(e), t.data = t.data || {}, t.data.hidden = !1), t.stateOfLinkageRules = F(g({}, t.stateOfLinkageRules), {
19137
- display: l
19138
- }), t.display = last(l);
19139
- break;
19140
- case ActionType.Hidden:
19141
- (yield conditionAnalyses({ ruleGroup: o, variables: n, localVariables: r })) ? (t.data = t.data || {}, t.data.hidden = !0) : (t.data = t.data || {}, t.data.hidden = !1);
19142
- break;
19143
- case ActionType.Disabled:
19144
- (yield conditionAnalyses({ ruleGroup: o, variables: n, localVariables: r })) && a.push(!0), t.stateOfLinkageRules = F(g({}, t.stateOfLinkageRules), {
19145
- disabled: a
19146
- }), t.disabled = last(a), t.componentProps.disabled = last(a);
19147
- break;
19148
- case ActionType.Active:
19149
- (yield conditionAnalyses({ ruleGroup: o, variables: n, localVariables: r })) ? a.push(!1) : a.push(t.disabled), t.stateOfLinkageRules = F(g({}, t.stateOfLinkageRules), {
19150
- disabled: a
19151
- }), t.disabled = last(a), t.componentProps.disabled = last(a);
19152
- break;
19153
- default:
19154
- return null;
19155
- }
19156
- }), setInitialActionState = (e) => {
19157
- e.data = e.data || {}, e.display = "visible", e.disabled = !1, e.data.hidden = !1, e.componentProps.disabled = !1;
19158
- }, MenuGroup = (e) => e.children;
19170
+ ), MenuGroup = (e) => e.children;
19159
19171
  function ButtonEditor$1(e) {
19160
19172
  var a, l, c, u;
19161
19173
  const t = useField(), o = useFieldSchema(), { dn: n } = useDesignable(), { t: r } = useTranslation(), i = (e == null ? void 0 : e.isLink) || o["x-component"] === "Action.Link";
@@ -20282,13 +20294,12 @@ const ActionBarContext = React.createContext({
20282
20294
  };
20283
20295
  function ActionPage({ level: e }) {
20284
20296
  const t = useFieldSchema(), o = useActionContext(), { getContainerDOM: n } = usePopupOrSubpagesContainerDOM(), { styles: r } = useActionPageStyle(), i = useTabsContext(), a = useMemo(() => ({
20285
- // 20 is the z-index value of the main page
20286
- zIndex: 20 + e
20297
+ zIndex: antdDrawerZIndex + e
20287
20298
  }), [e]);
20288
20299
  if (!o.visible)
20289
20300
  return null;
20290
20301
  const l = /* @__PURE__ */ jsx("div", { className: r.container, style: a, children: /* @__PURE__ */ jsx(TabsContextProvider, F(g({}, i), { tabBarExtraContent: /* @__PURE__ */ jsx(BackButtonUsedInSubPage, {}), children: /* @__PURE__ */ jsx(RecursionField, { schema: t, onlyRenderProperties: !0 }) })) }), c = n();
20291
- return c ? createPortal(l, c) : l;
20302
+ return createPortal(l, c || document.body);
20292
20303
  }
20293
20304
  ActionPage.Footer = observer$1(
20294
20305
  () => null,
@@ -23772,48 +23783,48 @@ Filter.Action = FilterAction;
23772
23783
  Filter.Action.Designer = FilterActionDesigner;
23773
23784
  const useGetFilterOptions = () => {
23774
23785
  const { getCollectionFields: e } = useCollectionManager_deprecated(), t = useGetFilterFieldOptions();
23775
- return (o, n) => {
23776
- const r = e(o, n);
23777
- return t(r);
23786
+ return (o, n, r) => {
23787
+ const i = e(o, n);
23788
+ return t(i, r);
23778
23789
  };
23779
23790
  }, useFilterOptions = (e) => {
23780
23791
  const { getCollectionFields: t } = useCollectionManager_deprecated(), o = t(e);
23781
23792
  return useFilterFieldOptions(o);
23782
23793
  }, useGetFilterFieldOptions = () => {
23783
23794
  var a;
23784
- const e = useFieldSchema(), t = ((a = e == null ? void 0 : e["x-component-props"]) == null ? void 0 : a.nonfilterable) || [], { getCollectionFields: o, getInterface: n } = useCollectionManager_deprecated(), r = (l, c) => {
23785
- var f, x;
23795
+ const e = useFieldSchema(), t = ((a = e == null ? void 0 : e["x-component-props"]) == null ? void 0 : a.nonfilterable) || [], { getCollectionFields: o, getInterface: n } = useCollectionManager_deprecated(), r = (l, c, u) => {
23796
+ var x, C;
23786
23797
  if (t.length && c === 1 && t.includes(l.name) || !l.interface)
23787
23798
  return;
23788
- const u = n(l.interface);
23789
- if (!(u != null && u.filterable))
23799
+ const d = n(l.interface);
23800
+ if (!(d != null && d.filterable) && !u)
23790
23801
  return;
23791
- const { nested: d, children: p, operators: m } = u.filterable, h = {
23802
+ const { nested: p, children: m, operators: h } = (d == null ? void 0 : d.filterable) || {}, f = {
23792
23803
  name: l.name,
23793
23804
  type: l.type,
23794
23805
  target: l.target,
23795
- title: ((f = l == null ? void 0 : l.uiSchema) == null ? void 0 : f.title) || l.name,
23806
+ title: ((x = l == null ? void 0 : l.uiSchema) == null ? void 0 : x.title) || l.name,
23796
23807
  schema: l == null ? void 0 : l.uiSchema,
23797
23808
  interface: l.interface,
23798
- operators: ((x = m == null ? void 0 : m.filter) == null ? void 0 : x.call(m, (C) => !(C != null && C.visible) || C.visible(l))) || []
23809
+ operators: ((C = h == null ? void 0 : h.filter) == null ? void 0 : C.call(h, (S) => !(S != null && S.visible) || S.visible(l))) || []
23799
23810
  };
23800
23811
  if (!(l.target && c > 2)) {
23801
23812
  if (c > 2)
23802
- return h;
23803
- if (p != null && p.length && (h.children = p), d) {
23804
- const C = o(l.target), S = i(C, c + 1).filter(Boolean);
23805
- h.children = h.children || [], h.children.push(...S);
23813
+ return f;
23814
+ if (m != null && m.length && (f.children = m), p) {
23815
+ const S = o(l.target), b = i(S, c + 1).filter(Boolean);
23816
+ f.children = f.children || [], f.children.push(...b);
23806
23817
  }
23807
- return h;
23818
+ return f;
23808
23819
  }
23809
- }, i = (l, c) => {
23810
- const u = [];
23811
- return l.forEach((d) => {
23812
- const p = r(d, c);
23813
- p && u.push(p);
23814
- }), u;
23820
+ }, i = (l, c, u) => {
23821
+ const d = [];
23822
+ return l.forEach((p) => {
23823
+ const m = r(p, c, u);
23824
+ m && d.push(m);
23825
+ }), d;
23815
23826
  };
23816
- return (l) => i(l, 1);
23827
+ return (l, c) => i(l, 1, c);
23817
23828
  }, useFilterFieldOptions = (e) => {
23818
23829
  var l;
23819
23830
  const t = useFieldSchema(), o = ((l = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : l.nonfilterable) || [], { getCollectionFields: n, getInterface: r } = useCollectionManager_deprecated(), i = (c, u) => {
@@ -55773,32 +55784,32 @@ const RecordAssociationFormBlockInitializer = () => {
55773
55784
  );
55774
55785
  };
55775
55786
  function useCreateAssociationFormBlock() {
55776
- const { insert: e } = useSchemaInitializer(), { getCollection: t } = useCollectionManager_deprecated(), o = useCallback(
55777
- ({ item: r }) => {
55778
- const i = r.associationField, a = t(i.target);
55787
+ const { insert: e } = useSchemaInitializer(), { getCollection: t } = useCollectionManager_deprecated(), { componentNamePrefix: o } = useBlockTemplateContext(), n = useCallback(
55788
+ ({ item: i }) => {
55789
+ const a = i.associationField, l = t(a.target);
55779
55790
  e(
55780
55791
  createCreateFormBlockUISchema({
55781
- dataSource: a.dataSource,
55782
- association: `${i.collectionName}.${i.name}`
55792
+ dataSource: l.dataSource,
55793
+ association: `${a.collectionName}.${a.name}`
55783
55794
  })
55784
55795
  );
55785
55796
  },
55786
55797
  [t, e]
55787
- ), n = useCallback(
55788
- (r, { item: i }) => {
55789
- if (i.template.componentName === "FormItem" && i.associationField) {
55790
- const a = i.associationField, l = t(a.target), c = createCreateFormBlockUISchema({
55791
- dataSource: l.dataSource,
55792
- association: `${a.collectionName}.${a.name}`,
55793
- templateSchema: r
55798
+ ), r = useCallback(
55799
+ (i, { item: a }) => {
55800
+ if (a.template.componentName === `${o}FormItem` && a.associationField) {
55801
+ const l = a.associationField, c = t(l.target), u = createCreateFormBlockUISchema({
55802
+ dataSource: c.dataSource,
55803
+ association: `${l.collectionName}.${l.name}`,
55804
+ templateSchema: i
55794
55805
  });
55795
- return i.mode === "reference" && (c["x-template-key"] = i.template.key), c;
55806
+ return a.mode === "reference" && (u["x-template-key"] = a.template.key), u;
55796
55807
  } else
55797
- return r;
55808
+ return i;
55798
55809
  },
55799
- [t]
55810
+ [t, o]
55800
55811
  );
55801
- return { createAssociationFormBlock: o, templateWrap: n };
55812
+ return { createAssociationFormBlock: n, templateWrap: r };
55802
55813
  }
55803
55814
  const createGridCardBlockUISchema = (e) => {
55804
55815
  const { collectionName: t, association: o, templateSchema: n, dataSource: r, rowKey: i } = e, a = o || t;
@@ -56094,33 +56105,33 @@ const RecordReadPrettyAssociationFormBlockInitializer = () => {
56094
56105
  );
56095
56106
  };
56096
56107
  function useCreateAssociationDetailsWithoutPagination() {
56097
- const { insert: e } = useSchemaInitializer(), { getCollection: t } = useCollectionManager_deprecated(), o = useCallback(
56098
- ({ item: r }) => {
56099
- const i = r.associationField, a = t(i.target);
56108
+ const { insert: e } = useSchemaInitializer(), { getCollection: t } = useCollectionManager_deprecated(), { componentNamePrefix: o } = useBlockTemplateContext(), n = useCallback(
56109
+ ({ item: i }) => {
56110
+ const a = i.associationField, l = t(a.target);
56100
56111
  e(
56101
56112
  createDetailsUISchema({
56102
- dataSource: a.dataSource,
56103
- association: `${i.collectionName}.${i.name}`
56113
+ dataSource: l.dataSource,
56114
+ association: `${a.collectionName}.${a.name}`
56104
56115
  })
56105
56116
  );
56106
56117
  },
56107
56118
  [t, e]
56108
- ), n = useCallback(
56109
- (r, { item: i }) => {
56110
- const a = i.associationField, l = t(a.target);
56111
- if (i.template.componentName === "ReadPrettyFormItem") {
56112
- const c = createDetailsUISchema({
56113
- dataSource: l.dataSource,
56114
- association: `${a.collectionName}.${a.name}`,
56115
- templateSchema: r
56119
+ ), r = useCallback(
56120
+ (i, { item: a }) => {
56121
+ const l = a.associationField, c = t(l.target);
56122
+ if (a.template.componentName === `${o}ReadPrettyFormItem`) {
56123
+ const u = createDetailsUISchema({
56124
+ dataSource: c.dataSource,
56125
+ association: `${l.collectionName}.${l.name}`,
56126
+ templateSchema: i
56116
56127
  });
56117
- return i.mode === "reference" && (c["x-template-key"] = i.template.key), c;
56128
+ return a.mode === "reference" && (u["x-template-key"] = a.template.key), u;
56118
56129
  } else
56119
- return r;
56130
+ return i;
56120
56131
  },
56121
- [t]
56132
+ [t, o]
56122
56133
  );
56123
- return { createAssociationDetailsWithoutPagination: o, templateWrap: n };
56134
+ return { createAssociationDetailsWithoutPagination: n, templateWrap: r };
56124
56135
  }
56125
56136
  const SelectActionInitializer = (e) => {
56126
56137
  const t = {
@@ -56719,55 +56730,55 @@ const SelectActionInitializer = (e) => {
56719
56730
  );
56720
56731
  };
56721
56732
  function useCreateSingleDetailsSchema() {
56722
- const { insert: e } = useSchemaInitializer(), { getTemplateSchemaByMode: t } = useSchemaTemplateManager(), o = useAssociationName(), n = useCollectionManager(), r = useCallback(
56723
- (a, l) => {
56724
- const { item: c } = l;
56725
- if (c.template.componentName === "ReadPrettyFormItem") {
56726
- const u = c.collectionName || c.name, d = n.getCollection(u), p = createDetailsUISchema(
56733
+ const { insert: e } = useSchemaInitializer(), { getTemplateSchemaByMode: t } = useSchemaTemplateManager(), o = useAssociationName(), n = useCollectionManager(), { componentNamePrefix: r } = useBlockTemplateContext(), i = useCallback(
56734
+ (l, c) => {
56735
+ const { item: u } = c;
56736
+ if (u.template.componentName === `${r}ReadPrettyFormItem`) {
56737
+ const d = u.collectionName || u.name, p = n.getCollection(d), m = createDetailsUISchema(
56727
56738
  o ? {
56728
56739
  association: o,
56729
56740
  // see: https://applink.feishu.cn/client/message/link/open?token=AmP9n9dkwcABZrr3nBdAwAI%3D
56730
- collectionName: d.isInherited() ? u : void 0,
56731
- dataSource: c.dataSource,
56732
- templateSchema: a,
56741
+ collectionName: p.isInherited() ? d : void 0,
56742
+ dataSource: u.dataSource,
56743
+ templateSchema: l,
56733
56744
  isCurrent: !0
56734
56745
  } : {
56735
- collectionName: u,
56736
- dataSource: c.dataSource,
56737
- templateSchema: a
56746
+ collectionName: d,
56747
+ dataSource: u.dataSource,
56748
+ templateSchema: l
56738
56749
  }
56739
56750
  );
56740
- return c.mode === "reference" && (p["x-template-key"] = c.template.key), p;
56751
+ return u.mode === "reference" && (m["x-template-key"] = u.template.key), m;
56741
56752
  } else
56742
- return a;
56753
+ return l;
56743
56754
  },
56744
- [o, n]
56755
+ [o, n, r]
56745
56756
  );
56746
56757
  return { createSingleDetailsSchema: useCallback(
56747
- (l) => z(this, [l], function* ({ item: a }) {
56748
- if (a.template) {
56749
- const c = yield t(a);
56750
- e(r(c, { item: a }));
56758
+ (c) => z(this, [c], function* ({ item: l }) {
56759
+ if (l.template) {
56760
+ const u = yield t(l);
56761
+ e(i(u, { item: l }));
56751
56762
  } else {
56752
- const c = a.collectionName || a.name, u = n.getCollection(c);
56763
+ const u = l.collectionName || l.name, d = n.getCollection(u);
56753
56764
  e(
56754
56765
  createDetailsUISchema(
56755
56766
  o ? {
56756
56767
  association: o,
56757
56768
  // see: https://applink.feishu.cn/client/message/link/open?token=AmP9n9dkwcABZrr3nBdAwAI%3D
56758
- collectionName: u.isInherited() ? c : void 0,
56759
- dataSource: a.dataSource,
56769
+ collectionName: d.isInherited() ? u : void 0,
56770
+ dataSource: l.dataSource,
56760
56771
  isCurrent: !0
56761
56772
  } : {
56762
- collectionName: c,
56763
- dataSource: a.dataSource
56773
+ collectionName: u,
56774
+ dataSource: l.dataSource
56764
56775
  }
56765
56776
  )
56766
56777
  );
56767
56778
  }
56768
56779
  }),
56769
- [o, n, t, e, r]
56770
- ), templateWrap: r };
56780
+ [o, n, t, e, i]
56781
+ ), templateWrap: i };
56771
56782
  }
56772
56783
  const FormBlockInitializer = ({
56773
56784
  filterCollections: e,
@@ -56926,47 +56937,47 @@ const RecordFormBlockInitializer = () => {
56926
56937
  );
56927
56938
  };
56928
56939
  function useCreateEditFormBlock() {
56929
- const { insert: e } = useSchemaInitializer(), t = useAssociationName(), o = useCollectionManager(), n = useCallback(
56930
- ({ item: i }) => {
56931
- const a = i.collectionName || i.name, l = o.getCollection(a);
56940
+ const { insert: e } = useSchemaInitializer(), t = useAssociationName(), o = useCollectionManager(), { componentNamePrefix: n } = useBlockTemplateContext(), r = useCallback(
56941
+ ({ item: a }) => {
56942
+ const l = a.collectionName || a.name, c = o.getCollection(l);
56932
56943
  e(
56933
56944
  createEditFormBlockUISchema(
56934
56945
  t ? {
56935
56946
  association: t,
56936
- collectionName: l.isInherited() ? a : void 0,
56937
- dataSource: i.dataSource,
56947
+ collectionName: c.isInherited() ? l : void 0,
56948
+ dataSource: a.dataSource,
56938
56949
  isCurrent: !0
56939
56950
  } : {
56940
- collectionName: a,
56941
- dataSource: i.dataSource
56951
+ collectionName: l,
56952
+ dataSource: a.dataSource
56942
56953
  }
56943
56954
  )
56944
56955
  );
56945
56956
  },
56946
56957
  [t, o, e]
56947
- ), r = useCallback(
56948
- (i, { item: a }) => {
56949
- if (a.template.componentName === "FormItem") {
56950
- const l = a.collectionName || a.name, c = o.getCollection(l), u = createEditFormBlockUISchema(
56958
+ ), i = useCallback(
56959
+ (a, { item: l }) => {
56960
+ if (l.template.componentName === `${n}FormItem`) {
56961
+ const c = l.collectionName || l.name, u = o.getCollection(c), d = createEditFormBlockUISchema(
56951
56962
  t ? {
56952
56963
  association: t,
56953
- collectionName: c.isInherited() ? l : void 0,
56954
- dataSource: a.dataSource,
56955
- templateSchema: i,
56964
+ collectionName: u.isInherited() ? c : void 0,
56965
+ dataSource: l.dataSource,
56966
+ templateSchema: a,
56956
56967
  isCurrent: !0
56957
56968
  } : {
56958
- collectionName: l,
56959
- dataSource: a.dataSource,
56960
- templateSchema: i
56969
+ collectionName: c,
56970
+ dataSource: l.dataSource,
56971
+ templateSchema: a
56961
56972
  }
56962
56973
  );
56963
- return a.mode === "reference" && (u["x-template-key"] = a.template.key), u;
56974
+ return l.mode === "reference" && (d["x-template-key"] = l.template.key), d;
56964
56975
  } else
56965
- return i;
56976
+ return a;
56966
56977
  },
56967
- [t, o]
56978
+ [t, o, n]
56968
56979
  );
56969
- return { createEditFormBlock: n, templateWrap: r };
56980
+ return { createEditFormBlock: r, templateWrap: i };
56970
56981
  }
56971
56982
  const commonOptions$e = {
56972
56983
  title: '{{t("Configure actions")}}',
@@ -59834,6 +59845,7 @@ export {
59834
59845
  useParsedFilter,
59835
59846
  usePickActionProps$1 as usePickActionProps,
59836
59847
  usePlugin,
59848
+ usePopupSettings,
59837
59849
  usePopupUtils,
59838
59850
  useProps,
59839
59851
  useRecord,