@nocobase/client 1.8.25 → 1.8.27

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
@@ -1,16 +1,16 @@
1
- var Le = Object.defineProperty, Oe = Object.defineProperties;
2
- var Ve = Object.getOwnPropertyDescriptors;
1
+ var Oe = Object.defineProperty, Le = Object.defineProperties;
2
+ var Ee = Object.getOwnPropertyDescriptors;
3
3
  var Te = Object.getOwnPropertySymbols;
4
4
  var Be = Object.prototype.hasOwnProperty, Ne = Object.prototype.propertyIsEnumerable;
5
5
  var $e = (e, t) => (t = Symbol[e]) ? t : Symbol.for("Symbol." + e);
6
- var we = (e, t, o) => t in e ? Le(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, x = (e, t) => {
6
+ var we = (e, t, o) => t in e ? Oe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, x = (e, t) => {
7
7
  for (var o in t || (t = {}))
8
8
  Be.call(t, o) && we(e, o, t[o]);
9
9
  if (Te)
10
10
  for (var o of Te(t))
11
11
  Ne.call(t, o) && we(e, o, t[o]);
12
12
  return e;
13
- }, P = (e, t) => Oe(e, Ve(t));
13
+ }, P = (e, t) => Le(e, Ee(t));
14
14
  var Y = (e, t) => {
15
15
  var o = {};
16
16
  for (var n in e)
@@ -91,7 +91,7 @@ import { TinyColor } from "@ctrl/tinycolor";
91
91
  import * as i18next from "i18next";
92
92
  import i18next__default from "i18next";
93
93
  import * as antIcons from "@ant-design/icons";
94
- import antIcons__default, { LoadingOutlined, createFromIconfontCN, RightOutlined, QuestionCircleOutlined, MenuOutlined, CloseOutlined, CloseCircleOutlined, PlusOutlined, DragOutlined, CopyOutlined, LeftOutlined, FileImageOutlined, ScanOutlined, CloseCircleFilled, ExclamationCircleFilled, UserOutlined, HighlightOutlined, EllipsisOutlined, ArrowLeftOutlined, DownOutlined, DownloadOutlined, InboxOutlined, DeleteOutlined, CheckOutlined, EditOutlined, ZoomInOutlined, RightSquareOutlined, SyncOutlined, ApiOutlined, SettingOutlined, ReadOutlined, ReloadOutlined, SearchOutlined, TableOutlined, FormOutlined, ProfileOutlined, AppstoreOutlined, OrderedListOutlined, LineOutlined, DisconnectOutlined, TranslationOutlined } from "@ant-design/icons";
94
+ import antIcons__default, { LoadingOutlined, createFromIconfontCN, RightOutlined, QuestionCircleOutlined, MenuOutlined, CloseOutlined, CloseCircleOutlined, PlusOutlined, DragOutlined, CopyOutlined, LeftOutlined, FileImageOutlined, ScanOutlined, CloseCircleFilled, ExclamationCircleFilled, UserOutlined, HighlightOutlined, EllipsisOutlined, ArrowLeftOutlined, DownOutlined, DownloadOutlined, UndoOutlined, RedoOutlined, InboxOutlined, DeleteOutlined, CheckOutlined, EditOutlined, ZoomInOutlined, RightSquareOutlined, SyncOutlined, ApiOutlined, SettingOutlined, ReadOutlined, ReloadOutlined, SearchOutlined, TableOutlined, FormOutlined, ProfileOutlined, AppstoreOutlined, OrderedListOutlined, LineOutlined, DisconnectOutlined, TranslationOutlined } from "@ant-design/icons";
95
95
  import * as ReactRouter from "react-router";
96
96
  import { matchRoutes } from "react-router";
97
97
  import omit$1 from "lodash/omit";
@@ -537,6 +537,9 @@ const bp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
537
537
  get HTMLEncode() {
538
538
  return HTMLEncode;
539
539
  },
540
+ get ICON_POPUP_Z_INDEX() {
541
+ return ICON_POPUP_Z_INDEX;
542
+ },
540
543
  get IconPicker() {
541
544
  return IconPicker;
542
545
  },
@@ -1879,6 +1882,9 @@ const bp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1879
1882
  get HeightMode() {
1880
1883
  return HeightMode;
1881
1884
  },
1885
+ get ICON_POPUP_Z_INDEX() {
1886
+ return ICON_POPUP_Z_INDEX;
1887
+ },
1882
1888
  get Icon() {
1883
1889
  return Icon;
1884
1890
  },
@@ -6313,7 +6319,7 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
6313
6319
  getOnCheck: C,
6314
6320
  getScopeDataSource: (S) => {
6315
6321
  const v = n(S), F = (T, D) => {
6316
- var O, M;
6322
+ var L, M;
6317
6323
  if (!T.interface)
6318
6324
  return;
6319
6325
  const $ = i(T.interface);
@@ -6321,7 +6327,7 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
6321
6327
  return;
6322
6328
  const { nested: B, children: N, operators: j } = $.filterable, w = {
6323
6329
  name: T.name,
6324
- title: ((O = T == null ? void 0 : T.uiSchema) == null ? void 0 : O.title) || T.name,
6330
+ title: ((L = T == null ? void 0 : T.uiSchema) == null ? void 0 : L.title) || T.name,
6325
6331
  schema: T == null ? void 0 : T.uiSchema,
6326
6332
  operators: ((M = j == null ? void 0 : j.filter) == null ? void 0 : M.call(j, (k) => !(k != null && k.visible) || k.visible(T))) || [],
6327
6333
  interface: T.interface
@@ -6330,8 +6336,8 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
6330
6336
  if (D > 2)
6331
6337
  return w;
6332
6338
  if (N != null && N.length && (w.children = N), B) {
6333
- const k = n(T.target), L = I(k, D + 1).filter(Boolean);
6334
- w.children = w.children || [], w.children.push(...L);
6339
+ const k = n(T.target), O = I(k, D + 1).filter(Boolean);
6340
+ w.children = w.children || [], w.children.push(...O);
6335
6341
  }
6336
6342
  return w;
6337
6343
  }
@@ -7089,7 +7095,7 @@ const collectFieldStateOfLinkageRules = ({
7089
7095
  action: l,
7090
7096
  conditionType: c
7091
7097
  }, u) => {
7092
- var y, S, v, F, I, R, T, D, $, B, N, j, w, O;
7098
+ var y, S, v, F, I, R, T, D, $, B, N, j, w, L;
7093
7099
  const d = ((y = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : y.required) || [(S = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : S.required], p = ((v = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : v.display) || [(F = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : F.display], m = ((I = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : I.pattern) || [(R = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : R.pattern], h = ((T = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : T.value) || [(D = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : D.value], g = (($ = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : $.dataSource) || [(B = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : B.dataSource], { evaluate: f } = evaluators.get("formula.js"), C = {
7094
7100
  ruleGroup: n,
7095
7101
  variables: r,
@@ -7129,14 +7135,14 @@ const collectFieldStateOfLinkageRules = ({
7129
7135
  if ((t == null ? void 0 : t.mode) === "express") {
7130
7136
  if ((t.value || t.result) == null)
7131
7137
  return;
7132
- const { exp: L, scope: q } = yield replaceVariables(t.value || t.result, {
7138
+ const { exp: O, scope: q } = yield replaceVariables(t.value || t.result, {
7133
7139
  variables: r,
7134
7140
  localVariables: a
7135
7141
  });
7136
7142
  try {
7137
- return f(L, x({ now: () => (/* @__PURE__ */ new Date()).toString() }, q));
7138
- } catch (E) {
7139
- console.error(E);
7143
+ return f(O, x({ now: () => (/* @__PURE__ */ new Date()).toString() }, q));
7144
+ } catch (V) {
7145
+ console.error(V);
7140
7146
  }
7141
7147
  } else
7142
7148
  return (t == null ? void 0 : t.mode) === "constant" ? (k = t == null ? void 0 : t.value) != null ? k : t : null;
@@ -7148,7 +7154,7 @@ const collectFieldStateOfLinkageRules = ({
7148
7154
  break;
7149
7155
  case ActionType.Options:
7150
7156
  {
7151
- const M = (O = (w = o.data) == null ? void 0 : w.dataSource) == null ? void 0 : O.filter((k) => t.value.includes(k.value));
7157
+ const M = (L = (w = o.data) == null ? void 0 : w.dataSource) == null ? void 0 : L.filter((k) => t.value.includes(k.value));
7152
7158
  g.push(getTempFieldState(conditionAnalyses(C, u), M || [])), o.stateOfLinkageRules = P(x({}, o.stateOfLinkageRules), {
7153
7159
  dataSource: g
7154
7160
  });
@@ -8315,8 +8321,8 @@ function withInitializer(e) {
8315
8321
  style: C,
8316
8322
  componentProps: b
8317
8323
  } = o, y = l ? l() : i, S = c(u), v = useCallback(
8318
- (O) => {
8319
- y ? y(S(O, { isInSubTable: a })) : r(d, S(O, { isInSubTable: a }), { onSuccess: p });
8324
+ (L) => {
8325
+ y ? y(S(L, { isInSubTable: a })) : r(d, S(L, { isInSubTable: a }), { onSuccess: p });
8320
8326
  },
8321
8327
  [y, S, a, r, d, p]
8322
8328
  ), { wrapSSR: F, hashId: I, componentCls: R } = useSchemaInitializerStyles(), [T, D] = useState(!1), { token: $ } = theme.useToken(), B = useNiceDropdownMaxHeight([T]), N = useMemo(
@@ -8779,7 +8785,7 @@ function addAppVersion(e, t) {
8779
8785
  addAppVersion((n = e.properties) == null ? void 0 : n[o], t);
8780
8786
  }), e;
8781
8787
  }
8782
- const name = "@nocobase/client", version = "1.8.25", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
8788
+ const name = "@nocobase/client", version = "1.8.27", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
8783
8789
  "@ahooksjs/use-url-state": "3.5.1",
8784
8790
  "@ant-design/cssinjs": "^1.11.1",
8785
8791
  "@ant-design/icons": "^5.6.1",
@@ -8800,9 +8806,9 @@ const name = "@nocobase/client", version = "1.8.25", license = "AGPL-3.0", main
8800
8806
  "@formily/reactive-react": "^2.2.27",
8801
8807
  "@formily/shared": "^2.2.27",
8802
8808
  "@formily/validator": "^2.2.27",
8803
- "@nocobase/evaluators": "1.8.25",
8804
- "@nocobase/sdk": "1.8.25",
8805
- "@nocobase/utils": "1.8.25",
8809
+ "@nocobase/evaluators": "1.8.27",
8810
+ "@nocobase/sdk": "1.8.27",
8811
+ "@nocobase/utils": "1.8.27",
8806
8812
  ahooks: "^3.7.2",
8807
8813
  antd: "5.24.2",
8808
8814
  "antd-style": "3.7.1",
@@ -9971,7 +9977,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: o, filterProper
9971
9977
  }
9972
9978
  `, [n.paddingContentVerticalLG, n.marginSM, n.margin]), b = useCollection(), y = useMemo(() => withTooltipComponent(NocoBaseRecursionField), []), S = useMemo(
9973
9979
  () => d == null ? void 0 : d.map((F) => {
9974
- var N, j, w, O;
9980
+ var N, j, w, L;
9975
9981
  const I = F.reduceProperties((M, k) => {
9976
9982
  if (isCollectionFieldComponent(k))
9977
9983
  return M.concat([k]);
@@ -9984,7 +9990,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: o, filterProper
9984
9990
  schema: F,
9985
9991
  onlyRenderSelf: !0,
9986
9992
  isUseFormilyField: !1,
9987
- tooltip: (j = F == null ? void 0 : F["x-component-props"]) == null ? void 0 : j.tooltip
9993
+ tooltip: o((j = F == null ? void 0 : F["x-component-props"]) == null ? void 0 : j.tooltip, { ns: NAMESPACE_UI_SCHEMA })
9988
9994
  }
9989
9995
  ) }),
9990
9996
  dataIndex: R,
@@ -9992,8 +9998,8 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: o, filterProper
9992
9998
  sorter: (w = F["x-component-props"]) == null ? void 0 : w.sorter,
9993
9999
  columnHidden: T
9994
10000
  }, F["x-component-props"]), {
9995
- width: T && !l ? 0 : ((O = F["x-component-props"]) == null ? void 0 : O.width) || 100,
9996
- render: (M, k, L) => /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: g, children: /* @__PURE__ */ jsx(
10001
+ width: T && !l ? 0 : ((L = F["x-component-props"]) == null ? void 0 : L.width) || 100,
10002
+ render: (M, k, O) => /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: g, children: /* @__PURE__ */ jsx(
9997
10003
  TableCellRender,
9998
10004
  {
9999
10005
  record: k,
@@ -10002,7 +10008,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: o, filterProper
10002
10008
  filterProperties: f,
10003
10009
  schemaToolbarBigger: C,
10004
10010
  field: r,
10005
- index: L
10011
+ index: O
10006
10012
  }
10007
10013
  ) }),
10008
10014
  onCell: (M, k) => ({
@@ -10376,7 +10382,7 @@ const Table$2 = withDynamicSchemaProps(
10376
10382
  "onClickRow",
10377
10383
  "value"
10378
10384
  ]), S = useArrayField$1(y), v = useFieldSchema(), { size: F = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, I = useCollection(), T = ((Se = v == null ? void 0 : v.parent) == null ? void 0 : Se["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: $, enableIndexColumn: B } = T, N = useMemoizedFn(y.onRowDragEnd || (() => {
10379
- })), j = usePaginationProps$3(o, a, e), w = useTableColumns$2(y, j), [O, M] = useState(() => D ? $ : []), [k, L] = useState(((se = S == null ? void 0 : S.data) == null ? void 0 : se.selectedRowKeys) || []), [q, E] = useState([]), V = (p == null ? void 0 : p.type) !== "none", G = useRef(/* @__PURE__ */ new Map()), U = useMemo(() => css`
10385
+ })), j = usePaginationProps$3(o, a, e), w = useTableColumns$2(y, j), [L, M] = useState(() => D ? $ : []), [k, O] = useState(((se = S == null ? void 0 : S.data) == null ? void 0 : se.selectedRowKeys) || []), [q, V] = useState([]), E = (p == null ? void 0 : p.type) !== "none", G = useRef(/* @__PURE__ */ new Map()), U = useMemo(() => css`
10380
10386
  & > td {
10381
10387
  background-color: ${t.controlItemBgActive} !important;
10382
10388
  }
@@ -10387,12 +10393,12 @@ const Table$2 = withDynamicSchemaProps(
10387
10393
  K.current = b, useEffect(() => {
10388
10394
  var te;
10389
10395
  H != null && H.field && (H.field.data = ((te = H.field) == null ? void 0 : te.data) || {}, H.field.data.clearSelectedRowKeys = () => {
10390
- H.field.data.selectedRowKeys = [], L([]);
10391
- }, H.field.data.setSelectedRowKeys = L);
10396
+ H.field.data.selectedRowKeys = [], O([]);
10397
+ }, H.field.data.setSelectedRowKeys = O);
10392
10398
  }, [H == null ? void 0 : H.field]);
10393
- const J = useMemo(() => C ? U : "", [U, C]), W = useMemo(() => C ? (te, ne) => ({
10399
+ const X = useMemo(() => C ? U : "", [U, C]), W = useMemo(() => C ? (te, ne) => ({
10394
10400
  onClick: (ae) => {
10395
- isPortalInBody(ae.target) || C(te, E, q);
10401
+ isPortalInBody(ae.target) || C(te, V, q);
10396
10402
  },
10397
10403
  rowIndex: ne,
10398
10404
  record: te
@@ -10402,9 +10408,9 @@ const Table$2 = withDynamicSchemaProps(
10402
10408
  }), [C, q]);
10403
10409
  useDeepCompareEffect(() => {
10404
10410
  const te = D ? $ : [];
10405
- _.isEqual(te, O) || M(te);
10411
+ _.isEqual(te, L) || M(te);
10406
10412
  }, [D, $]);
10407
- const X = useCallback((te) => {
10413
+ const J = useCallback((te) => {
10408
10414
  if (m)
10409
10415
  return Z(te);
10410
10416
  if (te.key)
@@ -10419,9 +10425,9 @@ const Table$2 = withDynamicSchemaProps(
10419
10425
  return Array.isArray(m) ? m.map((ae) => {
10420
10426
  var le;
10421
10427
  return ((le = te[ae]) == null ? void 0 : le.toString()) || "";
10422
- }).join("-") : typeof m == "string" ? te[m] : (ne = (m != null ? m : X)(te)) == null ? void 0 : ne.toString();
10428
+ }).join("-") : typeof m == "string" ? te[m] : (ne = (m != null ? m : J)(te)) == null ? void 0 : ne.toString();
10423
10429
  },
10424
- [JSON.stringify(m), X]
10430
+ [JSON.stringify(m), J]
10425
10431
  ), Q = useMemo(() => (Array.isArray(b) ? b : []).filter(Boolean), [b, b == null ? void 0 : b.length]), ee = useMemo(() => (te) => {
10426
10432
  const ne = useCallback((ae) => {
10427
10433
  var ve, Pe, Fe, Ie, Ae, De, je, Me;
@@ -10451,7 +10457,7 @@ const Table$2 = withDynamicSchemaProps(
10451
10457
  type: "checkbox",
10452
10458
  selectedRowKeys: k,
10453
10459
  onChange(te, ne) {
10454
- S.data = S.data || {}, S.data.selectedRowKeys = te, S.data.selectedRowData = ne, L(te), u == null || u(te, ne, L);
10460
+ S.data = S.data || {}, S.data.selectedRowKeys = te, S.data.selectedRowData = ne, O(te), u == null || u(te, ne, O);
10455
10461
  },
10456
10462
  onSelect: (te, ne, ae, le) => {
10457
10463
  var ue;
@@ -10472,14 +10478,14 @@ const Table$2 = withDynamicSchemaProps(
10472
10478
  role: "button",
10473
10479
  "aria-label": `table-index-${ae}`,
10474
10480
  className: cls(te ? "checked" : null, rowSelectCheckboxWrapperClass$1, {
10475
- [rowSelectCheckboxWrapperClassHover$1]: V
10481
+ [rowSelectCheckboxWrapperClassHover$1]: E
10476
10482
  }),
10477
10483
  children: [
10478
10484
  /* @__PURE__ */ jsxs("div", { className: cls(te ? "checked" : null, rowSelectCheckboxContentClass$1), children: [
10479
10485
  l && /* @__PURE__ */ jsx(SortHandle$2, { id: Z(ne) }),
10480
10486
  c && /* @__PURE__ */ jsx(TableIndex$3, { index: ae })
10481
10487
  ] }),
10482
- V && /* @__PURE__ */ jsx(
10488
+ E && /* @__PURE__ */ jsx(
10483
10489
  "div",
10484
10490
  {
10485
10491
  className: cls(
@@ -10504,7 +10510,7 @@ const Table$2 = withDynamicSchemaProps(
10504
10510
  l,
10505
10511
  S,
10506
10512
  Z,
10507
- V,
10513
+ E,
10508
10514
  re,
10509
10515
  j,
10510
10516
  H,
@@ -10527,18 +10533,18 @@ const Table$2 = withDynamicSchemaProps(
10527
10533
  x: "max-content",
10528
10534
  y: ce
10529
10535
  }), [ce, Q]), Ce = useCallback(
10530
- (te) => q.includes(te[m]) ? J : "",
10531
- [q, J, JSON.stringify(m)]
10536
+ (te) => q.includes(te[m]) ? X : "",
10537
+ [q, X, JSON.stringify(m)]
10532
10538
  ), me = useCallback(
10533
10539
  (te, ne) => {
10534
- const ae = te ? [...O, ne[I.getPrimaryKey()]] : O.filter((le) => ne[I.getPrimaryKey()] !== le);
10540
+ const ae = te ? [...L, ne[I.getPrimaryKey()]] : L.filter((le) => ne[I.getPrimaryKey()] !== le);
10535
10541
  M(ae), g == null || g(te, ne);
10536
10542
  },
10537
- [O, g, I]
10543
+ [L, g, I]
10538
10544
  ), xe = useMemo(() => ({
10539
10545
  onExpand: me,
10540
- expandedRowKeys: O
10541
- }), [O, me]);
10546
+ expandedRowKeys: L
10547
+ }), [L, me]);
10542
10548
  return (
10543
10549
  // If spinning is set to undefined, it will cause the subtable to always display loading, so we need to convert it here.
10544
10550
  // We use Spin here instead of Table's loading prop because using Spin here reduces unnecessary re-renders.
@@ -10548,7 +10554,7 @@ const Table$2 = withDynamicSchemaProps(
10548
10554
  tableHeight: ce,
10549
10555
  SortableWrapper: pe,
10550
10556
  tableSizeRefCallback: fe,
10551
- defaultRowKey: X,
10557
+ defaultRowKey: J,
10552
10558
  dataSource: Q
10553
10559
  }, y), ie), {
10554
10560
  paginationProps: j,
@@ -10719,22 +10725,22 @@ const InternalTableBlockProvider = (e) => {
10719
10725
  const t = useDataSourceManager(), o = useDataSource(), n = useCollectionManager(), r = e || (o == null ? void 0 : o.key) || void 0, [a, i] = useState(uid()), { refresh: l } = useSchemaComponentContext(), c = useMemo(
10720
10726
  () => {
10721
10727
  var w;
10722
- return (w = t == null ? void 0 : t.collectionFieldInterfaceManager) == null ? void 0 : w.getFieldInterfaces().reduce((O, M) => (O[M.name] = M, O), {});
10728
+ return (w = t == null ? void 0 : t.collectionFieldInterfaceManager) == null ? void 0 : w.getFieldInterfaces().reduce((L, M) => (L[M.name] = M, L), {});
10723
10729
  },
10724
10730
  [t, a]
10725
10731
  ), u = useMemo(() => t == null ? void 0 : t.collectionTemplateManager.getCollectionTemplates(), [t, a]), d = useCallback(() => {
10726
- var w, O;
10727
- return (O = (w = t == null ? void 0 : t.getDataSource(r)) == null ? void 0 : w.collectionManager) == null ? void 0 : O.getCollections().map((M) => M.getOptions());
10732
+ var w, L;
10733
+ return (L = (w = t == null ? void 0 : t.getDataSource(r)) == null ? void 0 : w.collectionManager) == null ? void 0 : L.getCollections().map((M) => M.getOptions());
10728
10734
  }, [t, o]), p = useCallback(
10729
10735
  (w) => {
10730
- var O;
10731
- return n && !w ? n : (O = t == null ? void 0 : t.getDataSource(w || r)) == null ? void 0 : O.collectionManager;
10736
+ var L;
10737
+ return n && !w ? n : (L = t == null ? void 0 : t.getDataSource(w || r)) == null ? void 0 : L.collectionManager;
10732
10738
  },
10733
10739
  [n, t, r]
10734
10740
  ), m = useMemo(
10735
10741
  () => {
10736
- var w, O;
10737
- return (O = (w = t == null ? void 0 : t.getDataSource(DEFAULT_DATA_SOURCE_KEY)) == null ? void 0 : w.collectionManager) == null ? void 0 : O.getCollections();
10742
+ var w, L;
10743
+ return (L = (w = t == null ? void 0 : t.getDataSource(DEFAULT_DATA_SOURCE_KEY)) == null ? void 0 : w.collectionManager) == null ? void 0 : L.getCollections();
10738
10744
  },
10739
10745
  [t, a]
10740
10746
  ), h = useCallback(
@@ -10748,102 +10754,102 @@ const InternalTableBlockProvider = (e) => {
10748
10754
  }),
10749
10755
  [t]
10750
10756
  ), f = useCompile(), C = useCallback(
10751
- (w, O) => {
10757
+ (w, L) => {
10752
10758
  var M, k;
10753
- return ((k = (M = p(O)) == null ? void 0 : M.getCollection(w)) == null ? void 0 : k.getInheritedFields()) || [];
10759
+ return ((k = (M = p(L)) == null ? void 0 : M.getCollection(w)) == null ? void 0 : k.getInheritedFields()) || [];
10754
10760
  },
10755
10761
  [t, p]
10756
10762
  ), b = useCallback(
10757
- (w, O) => {
10758
- var k, L;
10763
+ (w, L) => {
10764
+ var k, O;
10759
10765
  if (!w)
10760
10766
  return [];
10761
- const M = (k = p(O)) == null ? void 0 : k.getCollection(w);
10762
- return ((L = M == null ? void 0 : M.getAllFields) == null ? void 0 : L.call(M)) || (M == null ? void 0 : M.getFields()) || [];
10767
+ const M = (k = p(L)) == null ? void 0 : k.getCollection(w);
10768
+ return ((O = M == null ? void 0 : M.getAllFields) == null ? void 0 : O.call(M)) || (M == null ? void 0 : M.getFields()) || [];
10763
10769
  },
10764
10770
  [t, p]
10765
10771
  ), y = useCallback(
10766
- (w, O) => {
10772
+ (w, L) => {
10767
10773
  var M;
10768
10774
  if (!(!w || w.split(".").length < 2))
10769
- return (M = p(O)) == null ? void 0 : M.getCollectionField(w);
10775
+ return (M = p(L)) == null ? void 0 : M.getCollectionField(w);
10770
10776
  },
10771
10777
  [t, p]
10772
10778
  ), S = useCallback(
10773
- (w, O) => {
10779
+ (w, L) => {
10774
10780
  var M, k;
10775
- return w ? ((k = (M = p(O)) == null ? void 0 : M.getCollection(w)) == null ? void 0 : k.getParentCollectionsName()) || [] : [];
10781
+ return w ? ((k = (M = p(L)) == null ? void 0 : M.getCollection(w)) == null ? void 0 : k.getParentCollectionsName()) || [] : [];
10776
10782
  },
10777
10783
  [t, p]
10778
10784
  ), v = useCallback(
10779
- (w, O = !1, M) => {
10785
+ (w, L = !1, M) => {
10780
10786
  var q;
10781
10787
  if (!w)
10782
10788
  return [];
10783
10789
  const k = (q = p(M)) == null ? void 0 : q.getCollection(w);
10784
- return (k == null ? void 0 : k.getChildrenCollections(O)) || [];
10790
+ return (k == null ? void 0 : k.getChildrenCollections(L)) || [];
10785
10791
  },
10786
10792
  [t, p]
10787
10793
  ), F = useCallback(
10788
- (w, O) => {
10794
+ (w, L) => {
10789
10795
  var M, k;
10790
- return w ? ((k = (M = p(O)) == null ? void 0 : M.getCollection(w)) == null ? void 0 : k.getCurrentFields()) || [] : [];
10796
+ return w ? ((k = (M = p(L)) == null ? void 0 : M.getCollection(w)) == null ? void 0 : k.getCurrentFields()) || [] : [];
10791
10797
  },
10792
10798
  [t, p]
10793
10799
  ), I = useCallback(
10794
- (w, O, M, k) => {
10800
+ (w, L, M, k) => {
10795
10801
  var Z;
10796
10802
  const {
10797
- association: L = !1,
10803
+ association: O = !1,
10798
10804
  cached: q = {},
10799
- collectionNames: E = [w],
10800
- maxDepth: V = 1,
10805
+ collectionNames: V = [w],
10806
+ maxDepth: E = 1,
10801
10807
  allowAllTypes: G = !1,
10802
10808
  exceptInterfaces: U = [],
10803
10809
  prefixFieldValue: H = "",
10804
10810
  usePrefix: K = !1,
10805
- dataSource: J
10811
+ dataSource: X
10806
10812
  } = k || {};
10807
- if (E.length - 1 > V)
10813
+ if (V.length - 1 > E)
10808
10814
  return;
10809
10815
  if (q[w])
10810
10816
  return _.cloneDeep(q[w]);
10811
- O && typeof O == "string" && (O = [O]), M && typeof M == "string" && (M = [M]);
10812
- const W = b(w, J), X = (Z = W == null ? void 0 : W.filter(
10813
- (Q) => Q.interface && !U.includes(Q.interface) && (G || O && O.includes(Q.type) || M && M.includes(Q.interface) || (L && Q.target && Q.target !== w && Array.isArray(L) ? L.includes(Q.interface) : !1))
10817
+ L && typeof L == "string" && (L = [L]), M && typeof M == "string" && (M = [M]);
10818
+ const W = b(w, X), J = (Z = W == null ? void 0 : W.filter(
10819
+ (Q) => Q.interface && !U.includes(Q.interface) && (G || L && L.includes(Q.type) || M && M.includes(Q.interface) || (O && Q.target && Q.target !== w && Array.isArray(O) ? O.includes(Q.interface) : !1))
10814
10820
  )) == null ? void 0 : Z.map((Q) => {
10815
10821
  var oe, re;
10816
10822
  const ee = x({
10817
10823
  value: K && H ? `${H}.${Q.name}` : Q.name,
10818
10824
  label: f((oe = Q == null ? void 0 : Q.uiSchema) == null ? void 0 : oe.title) || Q.name
10819
10825
  }, Q);
10820
- return L && Q.target && (ee.children = E.includes(Q.target) ? [] : I(Q.target, O, M, P(x({}, k), {
10826
+ return O && Q.target && (ee.children = V.includes(Q.target) ? [] : I(Q.target, L, M, P(x({}, k), {
10821
10827
  cached: q,
10822
- dataSource: J,
10823
- collectionNames: [...E, Q.target],
10828
+ dataSource: X,
10829
+ collectionNames: [...V, Q.target],
10824
10830
  prefixFieldValue: K ? H ? `${H}.${Q.name}` : Q.name : "",
10825
10831
  usePrefix: K
10826
10832
  })), !((re = ee.children) != null && re.length)) ? null : ee;
10827
10833
  }).filter(Boolean);
10828
- return q[w] = X, X;
10834
+ return q[w] = J, J;
10829
10835
  },
10830
10836
  [b]
10831
10837
  ), R = useCallback(
10832
- (w, O) => {
10838
+ (w, L) => {
10833
10839
  var M;
10834
- return (M = p(O)) == null ? void 0 : M.getCollection(w);
10840
+ return (M = p(L)) == null ? void 0 : M.getCollection(w);
10835
10841
  },
10836
10842
  [t, p]
10837
10843
  ), T = useCallback(
10838
- (w, O) => {
10844
+ (w, L) => {
10839
10845
  var M, k;
10840
- return (k = (M = p(O)) == null ? void 0 : M.getCollection(w)) == null ? void 0 : k.getAllCollectionsInheritChain();
10846
+ return (k = (M = p(L)) == null ? void 0 : M.getCollection(w)) == null ? void 0 : k.getAllCollectionsInheritChain();
10841
10847
  },
10842
10848
  [t, p]
10843
10849
  ), D = useCallback(
10844
- (w, O) => () => {
10850
+ (w, L) => () => {
10845
10851
  var M, k;
10846
- return (k = (M = p(O)) == null ? void 0 : M.getCollection(w)) == null ? void 0 : k.getInheritCollectionsChain();
10852
+ return (k = (M = p(L)) == null ? void 0 : M.getCollection(w)) == null ? void 0 : k.getInheritCollectionsChain();
10847
10853
  },
10848
10854
  [t, p]
10849
10855
  ), $ = useCallback(
@@ -10851,14 +10857,14 @@ const InternalTableBlockProvider = (e) => {
10851
10857
  [t]
10852
10858
  ), B = useCallback(
10853
10859
  (w) => {
10854
- var O;
10855
- return (O = $(w.interface)) == null ? void 0 : O.titleUsable;
10860
+ var L;
10861
+ return (L = $(w.interface)) == null ? void 0 : L.titleUsable;
10856
10862
  },
10857
10863
  [$]
10858
10864
  ), N = useCallback(
10859
- (w, O, M) => {
10860
- var k, L;
10861
- return (L = (k = p(M)) == null ? void 0 : k.getCollection(O)) == null ? void 0 : L.getParentCollectionFields(w);
10865
+ (w, L, M) => {
10866
+ var k, O;
10867
+ return (O = (k = p(M)) == null ? void 0 : k.getCollection(L)) == null ? void 0 : O.getParentCollectionFields(w);
10862
10868
  },
10863
10869
  [t, p]
10864
10870
  ), j = useCallback(
@@ -11088,25 +11094,25 @@ const popupsContextStorage = {}, defaultPopupsContextStorage = {}, getStoredPopu
11088
11094
  }, usePopupUtils = (e = {}) => {
11089
11095
  const t = useNavigateNoUpdate(), o = useLocationNoUpdate(), n = useFieldSchema(), r = useDataSourceKey(), a = useCollectionRecord(), i = useCollectionParentRecord(), l = useCollection(), c = useCollectionManager(), u = useAssociationName(), { visible: d, setVisible: p } = useContext(PopupVisibleProviderContext) || { visible: !1, setVisible: _.noop }, { params: m, currentLevel: h = 0 } = useCurrentPopupContext(), { getDataBlockRequest: g } = useDataBlockRequestGetter(), { isPopupVisibleControlledByURL: f } = usePopupSettings(), { setVisible: C } = useContext(ActionContext), { updatePopupContext: b } = usePopupContextInActionOrAssociationField(), y = useCurrentPopupContext(), S = useCallback(
11090
11096
  (w) => {
11091
- var O;
11092
- return (O = w || (i == null ? void 0 : i.data)) == null ? void 0 : O[c.getSourceKeyByAssociation(u)];
11097
+ var L;
11098
+ return (L = w || (i == null ? void 0 : i.data)) == null ? void 0 : L[c.getSourceKeyByAssociation(u)];
11093
11099
  },
11094
11100
  [i, u]
11095
11101
  ), v = useDataBlockRequestData(), F = useTableBlockContextBasicValue() || {}, I = e.setVisible || C, R = useCallback(
11096
11102
  ({
11097
11103
  tabKey: w,
11098
- popupUid: O,
11104
+ popupUid: L,
11099
11105
  recordData: M,
11100
11106
  sourceId: k,
11101
- collection: L,
11107
+ collection: O,
11102
11108
  puid: q
11103
11109
  }) => {
11104
- const E = c.getFilterByTK(u || l, M);
11110
+ const V = c.getFilterByTK(u || l, M);
11105
11111
  return getPopupPathFromParams({
11106
- popupuid: O,
11112
+ popupuid: L,
11107
11113
  puid: q,
11108
- collection: L,
11109
- filterbytk: E,
11114
+ collection: O,
11115
+ filterbytk: V,
11110
11116
  sourceid: k,
11111
11117
  tab: w
11112
11118
  });
@@ -11122,34 +11128,34 @@ const popupsContextStorage = {}, defaultPopupsContextStorage = {}, getStoredPopu
11122
11128
  }, [r, l, u]), D = useCallback(
11123
11129
  ({
11124
11130
  recordData: w,
11125
- parentRecordData: O,
11131
+ parentRecordData: L,
11126
11132
  collectionNameUsedInURL: M,
11127
11133
  popupUidUsedInURL: k,
11128
- customActionSchema: L
11134
+ customActionSchema: O
11129
11135
  } = {}) => {
11130
11136
  if (!f())
11131
11137
  return I == null ? void 0 : I(!0);
11132
- const q = L || n, E = q == null ? void 0 : q["x-uid"], V = S(O);
11138
+ const q = O || n, V = q == null ? void 0 : q["x-uid"], E = S(L);
11133
11139
  w = w || (a == null ? void 0 : a.data);
11134
11140
  const G = R({
11135
- popupUid: E,
11141
+ popupUid: V,
11136
11142
  recordData: w,
11137
- sourceId: V,
11143
+ sourceId: E,
11138
11144
  collection: M,
11139
11145
  puid: k
11140
11146
  });
11141
11147
  let U = o.pathname;
11142
- if (_.last(U) === "/" && (U = U.slice(0, -1)), storePopupContext(E, {
11148
+ if (_.last(U) === "/" && (U = U.slice(0, -1)), storePopupContext(V, {
11143
11149
  schema: q,
11144
11150
  record: new CollectionRecord({ isNew: !1, data: w }),
11145
- parentRecord: O ? new CollectionRecord({ isNew: !1, data: O }) : i,
11151
+ parentRecord: L ? new CollectionRecord({ isNew: !1, data: L }) : i,
11146
11152
  service: g(),
11147
11153
  dataSource: r,
11148
11154
  collection: l == null ? void 0 : l.name,
11149
11155
  association: u,
11150
- sourceId: V,
11156
+ sourceId: E,
11151
11157
  tableBlockContext: P(x({}, F), { collection: l == null ? void 0 : l.name, blockData: v })
11152
- }), b(T(), L), q.properties) {
11158
+ }), b(T(), O), q.properties) {
11153
11159
  const H = h + 1;
11154
11160
  if (getPopupLayerState(H))
11155
11161
  return;
@@ -11192,11 +11198,11 @@ ${JSON.stringify(q, null, 2)}`
11192
11198
  m == null ? void 0 : m.popupuid
11193
11199
  ]), B = useCallback(
11194
11200
  (w) => {
11195
- const O = S(), M = R({
11201
+ const L = S(), M = R({
11196
11202
  tabKey: w,
11197
11203
  popupUid: m == null ? void 0 : m.popupuid,
11198
11204
  recordData: a == null ? void 0 : a.data,
11199
- sourceId: O
11205
+ sourceId: L
11200
11206
  });
11201
11207
  let k = removeLastPopupPath(o.pathname);
11202
11208
  _.last(k) === "/" && (k = k.slice(0, -1)), t(`${k}${M}`, {
@@ -11204,8 +11210,8 @@ ${JSON.stringify(q, null, 2)}`
11204
11210
  });
11205
11211
  },
11206
11212
  [R, t, m == null ? void 0 : m.popupuid, a == null ? void 0 : a.data, o]
11207
- ), N = useCallback((w, O) => {
11208
- O.__popup = w;
11213
+ ), N = useCallback((w, L) => {
11214
+ L.__popup = w;
11209
11215
  }, []), j = useCallback((w) => w.__popup, []);
11210
11216
  return {
11211
11217
  /**
@@ -13915,14 +13921,14 @@ const ParentCollectionProvider = (e) => {
13915
13921
  targetFieldSchema: a,
13916
13922
  record: i
13917
13923
  }) => {
13918
- var L, q;
13919
- const l = useApp(), c = ((L = l == null ? void 0 : l.getVariables) == null ? void 0 : L.call(l).map((E) => {
13920
- const { visible: V = !0, option: G } = E.useOption();
13924
+ var O, q;
13925
+ const l = useApp(), c = ((O = l == null ? void 0 : l.getVariables) == null ? void 0 : O.call(l).map((V) => {
13926
+ const { visible: E = !0, option: G } = V.useOption();
13921
13927
  return {
13922
- visible: V,
13928
+ visible: E,
13923
13929
  option: G
13924
13930
  };
13925
- }).filter(({ visible: E }) => E)) || [], { filterVariables: u = () => !0 } = useVariables$1() || {}, d = (q = i == null ? void 0 : i.__parent) == null ? void 0 : q.__collectionName, { currentUserSettings: p } = useCurrentUserVariable({
13931
+ }).filter(({ visible: V }) => V)) || [], { filterVariables: u = () => !0 } = useVariables$1() || {}, d = (q = i == null ? void 0 : i.__parent) == null ? void 0 : q.__collectionName, { currentUserSettings: p } = useCurrentUserVariable({
13926
13932
  maxDepth: 3,
13927
13933
  uiSchema: o,
13928
13934
  collectionField: e,
@@ -13975,7 +13981,7 @@ const ParentCollectionProvider = (e) => {
13975
13981
  collectionField: e,
13976
13982
  noDisabled: r,
13977
13983
  targetFieldSchema: a
13978
- }), { urlSearchParamsSettings: O, shouldDisplay: M } = useURLSearchParamsVariable();
13984
+ }), { urlSearchParamsSettings: L, shouldDisplay: M } = useURLSearchParamsVariable();
13979
13985
  return [...useMemo(() => [
13980
13986
  p,
13981
13987
  m,
@@ -13989,7 +13995,7 @@ const ParentCollectionProvider = (e) => {
13989
13995
  w && j,
13990
13996
  $ && D,
13991
13997
  N && B,
13992
- M && O
13998
+ M && L
13993
13999
  ].filter(Boolean).filter(u), [
13994
14000
  p,
13995
14001
  m,
@@ -14008,8 +14014,8 @@ const ParentCollectionProvider = (e) => {
14008
14014
  $,
14009
14015
  D,
14010
14016
  M,
14011
- O
14012
- ]), ...c.map(({ option: E }) => E)];
14017
+ L
14018
+ ]), ...c.map(({ option: V }) => V)];
14013
14019
  }, VariableInput = (e) => {
14014
14020
  const {
14015
14021
  value: t,
@@ -14393,29 +14399,29 @@ const getActionContext = (e) => {
14393
14399
  var o;
14394
14400
  return ((o = e.fieldSchema) == null ? void 0 : o["x-action-context"]) || {};
14395
14401
  }, SchemaSettingsDefaultValue = function(t) {
14396
- var L, q, E;
14397
- const o = useFieldSchema(), n = (L = t == null ? void 0 : t.fieldSchema) != null ? L : o, r = useField(), { dn: a } = useDesignable(), { t: i } = useTranslation(), l = useActionContext(), c = getActionContext(l).collection;
14402
+ var O, q, V;
14403
+ const o = useFieldSchema(), n = (O = t == null ? void 0 : t.fieldSchema) != null ? O : o, r = useField(), { dn: a } = useDesignable(), { t: i } = useTranslation(), l = useActionContext(), c = getActionContext(l).collection;
14398
14404
  let u;
14399
14405
  const { getField: d } = useCollection_deprecated(), { getCollectionJoinField: p, getCollectionFields: m, getAllCollectionsInheritChain: h } = useCollectionManager_deprecated(), g = useVariables$1(), f = useLocalVariables$1(), C = useCollection_deprecated(), b = useRecord(), { form: y, type: S } = useFormBlockContext(), { getFields: v } = useCollectionFilterOptionsV2(C), { isInSubForm: F, isInSubTable: I } = useFlag() || {}, { name: R } = C, T = useMemo(
14400
14406
  () => d(n.name) || p(n["x-collection-field"]),
14401
14407
  [n, p, d]
14402
14408
  ), D = _.omit(n, "required");
14403
14409
  T != null && T.target && (u = p(
14404
- `${T.target}.${((E = (q = n["x-component-props"]) == null ? void 0 : q.fieldNames) == null ? void 0 : E.label) || "id"}`
14410
+ `${T.target}.${((V = (q = n["x-component-props"]) == null ? void 0 : q.fieldNames) == null ? void 0 : V.label) || "id"}`
14405
14411
  ));
14406
14412
  const $ = (T == null ? void 0 : T.interface) === "m2o" && findParentFieldSchema(n), B = $ && p($ == null ? void 0 : $["x-collection-field"]), N = useTableBlockContext(), j = (T == null ? void 0 : T.interface) === "m2m" || (T == null ? void 0 : T.interface) === "mbm" || (B == null ? void 0 : B.type) === "hasMany" && (T == null ? void 0 : T.interface) === "m2o", w = useCallback(
14407
- (V) => {
14408
- const G = V.find((H) => H.value === "$nForm"), U = m(R);
14409
- return !(U != null && U.length) && G && (G.children = formatVariableScop(v())), V;
14413
+ (E) => {
14414
+ const G = E.find((H) => H.value === "$nForm"), U = m(R);
14415
+ return !(U != null && U.length) && G && (G.children = formatVariableScop(v())), E;
14410
14416
  },
14411
14417
  [v, R]
14412
- ), O = useMemo(() => ({
14418
+ ), L = useMemo(() => ({
14413
14419
  ArrayCollapse: ArrayCollapse$2,
14414
14420
  FormLayout,
14415
- VariableInput: (V) => /* @__PURE__ */ jsx(SchemaComponentContext.Provider, { value: { designable: !1 }, children: /* @__PURE__ */ jsx(
14421
+ VariableInput: (E) => /* @__PURE__ */ jsx(SchemaComponentContext.Provider, { value: { designable: !1 }, children: /* @__PURE__ */ jsx(
14416
14422
  VariableInput,
14417
- P(x({}, V), {
14418
- value: V.value || void 0,
14423
+ P(x({}, E), {
14424
+ value: E.value || void 0,
14419
14425
  hideVariableButton: t == null ? void 0 : t.hideVariableButton
14420
14426
  })
14421
14427
  ) })
@@ -14485,12 +14491,12 @@ const getActionContext = (e) => {
14485
14491
  u,
14486
14492
  g
14487
14493
  ]), k = useCallback(
14488
- (V) => {
14494
+ (E) => {
14489
14495
  var U, H, K;
14490
14496
  const G = {
14491
14497
  "x-uid": n["x-uid"]
14492
14498
  };
14493
- n.default = (U = V.default) != null ? U : null, isVariable$1(V.default) || (b.__isNewRecord__ || S === "create") && ((H = r.setInitialValue) == null || H.call(r, V.default)), G.default = (K = V.default) != null ? K : null, a.emit("patch", {
14499
+ n.default = (U = E.default) != null ? U : null, isVariable$1(E.default) || (b.__isNewRecord__ || S === "create") && ((H = r.setInitialValue) == null || H.call(r, E.default)), G.default = (K = E.default) != null ? K : null, a.emit("patch", {
14494
14500
  schema: G,
14495
14501
  currentSchema: o
14496
14502
  });
@@ -14501,18 +14507,18 @@ const getActionContext = (e) => {
14501
14507
  SchemaSettingsModalItem,
14502
14508
  {
14503
14509
  title: i("Set default value"),
14504
- components: O,
14510
+ components: L,
14505
14511
  width: 800,
14506
14512
  schema: M,
14507
14513
  onSubmit: k,
14508
- ModalContextProvider: (V) => /* @__PURE__ */ jsx(
14514
+ ModalContextProvider: (E) => /* @__PURE__ */ jsx(
14509
14515
  FlagProvider,
14510
14516
  {
14511
14517
  isInSubForm: F,
14512
14518
  isInSubTable: I,
14513
14519
  isInSetDefaultValueDialog: !0,
14514
14520
  collectionField: T,
14515
- children: V.children
14521
+ children: E.children
14516
14522
  }
14517
14523
  )
14518
14524
  }
@@ -14778,7 +14784,7 @@ const useFilterableFields = (e) => {
14778
14784
  }, zIndexContext = React.createContext(100), useZIndexContext = () => React.useContext(zIndexContext), getZIndex = (e, t, o) => {
14779
14785
  let n = t;
14780
14786
  return e === "page" && !window.location.pathname.includes("/embed/") ? (n = t + o, n > 200 ? n - 200 : n) : (n = t + o, n < 200 ? n + 200 : n);
14781
- }, StablePopover = (e) => {
14787
+ }, ICON_POPUP_Z_INDEX = 2e3, StablePopover = (e) => {
14782
14788
  const t = useZIndexContext(), o = getZIndex("drawer", t, 1), n = useRef(null), r = useCallback((i) => {
14783
14789
  n.current = i.target;
14784
14790
  }, []), a = useCallback(
@@ -15374,10 +15380,10 @@ const useGetFilterOptions = () => {
15374
15380
  };
15375
15381
  });
15376
15382
  }, TableColumnDesigner$1 = (e) => {
15377
- var B, N, j, w, O, M, k, L, q, E, V, G;
15383
+ var B, N, j, w, L, M, k, O, q, V, E, G;
15378
15384
  const { uiSchema: t, fieldSchema: o, collectionField: n } = e, { form: r } = useFormBlockContext(), { getInterface: a, getCollection: i } = useCollectionManager_deprecated(), l = useField(), { t: c } = useTranslation(), u = useFieldSchema(), { dn: d } = useDesignable(), p = ((B = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : B.fieldNames) || ((N = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : N.fieldNames), m = useLabelFields$1((j = n == null ? void 0 : n.target) != null ? j : n == null ? void 0 : n.targetCollection), h = useColorFields((w = n == null ? void 0 : n.target) != null ? w : n == null ? void 0 : n.targetCollection), g = a(n == null ? void 0 : n.interface), f = i(n == null ? void 0 : n.target), C = isFileCollection$2(f), b = ["QuickEdit", "FormItem"].includes(o["x-decorator"]), { currentMode: y } = useAssociationFieldContext(), { isAllowToSetDefaultValue: S } = useIsAllowToSetDefaultValue({ collectionField: n, fieldSchema: o }), v = ["datetime", "createdAt", "updatedAt"].includes(n == null ? void 0 : n.interface), F = ["obo", "oho", "o2o", "o2m", "m2m", "m2o", "snapshot"].includes(
15379
15385
  n == null ? void 0 : n.interface
15380
- ), I = useFieldModeOptions({ fieldSchema: o }), R = ((O = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : O.mode) || "Select";
15386
+ ), I = useFieldModeOptions({ fieldSchema: o }), R = ((L = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : L.mode) || "Select";
15381
15387
  let T = "editable";
15382
15388
  o["x-disabled"] === !0 && (T = "readonly"), o["x-read-pretty"] === !0 && (T = "read-pretty");
15383
15389
  const D = F && R === "Select", $ = () => {
@@ -15417,12 +15423,12 @@ const useGetFilterOptions = () => {
15417
15423
  SchemaSettingsDataScope,
15418
15424
  {
15419
15425
  collectionName: n == null ? void 0 : n.target,
15420
- defaultFilter: ((q = (L = (k = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : k.service) == null ? void 0 : L.params) == null ? void 0 : q.filter) || {},
15426
+ defaultFilter: ((q = (O = (k = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : k.service) == null ? void 0 : O.params) == null ? void 0 : q.filter) || {},
15421
15427
  form: r,
15422
15428
  onSubmit: ({ filter: U }) => {
15423
- var K, J;
15429
+ var K, X;
15424
15430
  U = removeNullCondition(U), set(l.componentProps, "service.params.filter", U), o["x-component-props"] = l.componentProps;
15425
- const H = (J = l.path) == null ? void 0 : J.splice(((K = l.path) == null ? void 0 : K.length) - 1, 1);
15431
+ const H = (X = l.path) == null ? void 0 : X.splice(((K = l.path) == null ? void 0 : K.length) - 1, 1);
15426
15432
  l.form.query(`${H.concat("*." + o.name)}`).forEach((W) => {
15427
15433
  W.componentProps.service = W.componentProps.service || { params: {} }, W.componentProps.service.params.filter = U;
15428
15434
  }), d.emit("patch", {
@@ -15443,7 +15449,7 @@ const useGetFilterOptions = () => {
15443
15449
  title: c("Column width"),
15444
15450
  properties: {
15445
15451
  width: {
15446
- default: ((E = u == null ? void 0 : u["x-component-props"]) == null ? void 0 : E.width) || 100,
15452
+ default: ((V = u == null ? void 0 : u["x-component-props"]) == null ? void 0 : V.width) || 100,
15447
15453
  "x-decorator": "FormItem",
15448
15454
  "x-component": "InputNumber",
15449
15455
  "x-component-props": {}
@@ -15486,7 +15492,7 @@ const useGetFilterOptions = () => {
15486
15492
  SchemaSettingsSwitchItem,
15487
15493
  {
15488
15494
  title: c("Enable link"),
15489
- checked: ((V = o["x-component-props"]) == null ? void 0 : V.enableLink) !== !1,
15495
+ checked: ((E = o["x-component-props"]) == null ? void 0 : E.enableLink) !== !1,
15490
15496
  onChange: (U) => {
15491
15497
  o["x-component-props"] = P(x({}, o == null ? void 0 : o["x-component-props"]), {
15492
15498
  enableLink: U
@@ -15508,8 +15514,8 @@ const useGetFilterOptions = () => {
15508
15514
  options: m,
15509
15515
  value: p == null ? void 0 : p.label,
15510
15516
  onChange: (U) => {
15511
- var J, W, X, Z, Q;
15512
- const H = P(x(x({}, (W = (J = n == null ? void 0 : n.uiSchema) == null ? void 0 : J["x-component-props"]) == null ? void 0 : W.fieldNames), (X = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : X.fieldNames), {
15517
+ var X, W, J, Z, Q;
15518
+ const H = P(x(x({}, (W = (X = n == null ? void 0 : n.uiSchema) == null ? void 0 : X["x-component-props"]) == null ? void 0 : W.fieldNames), (J = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : J.fieldNames), {
15513
15519
  label: U
15514
15520
  });
15515
15521
  _.set(o, "x-component-props.fieldNames", H);
@@ -15569,14 +15575,14 @@ const useGetFilterOptions = () => {
15569
15575
  title: c("Required"),
15570
15576
  checked: o.required,
15571
15577
  onChange: (U) => {
15572
- var J, W;
15578
+ var X, W;
15573
15579
  const H = {
15574
15580
  "x-uid": o["x-uid"]
15575
15581
  };
15576
15582
  o.required = U, H.required = U;
15577
- const K = (W = l.path) == null ? void 0 : W.splice(((J = l.path) == null ? void 0 : J.length) - 1, 1);
15578
- l.form.query(`${K.concat("*." + o.name)}`).forEach((X) => {
15579
- X.required = U;
15583
+ const K = (W = l.path) == null ? void 0 : W.splice(((X = l.path) == null ? void 0 : X.length) - 1, 1);
15584
+ l.form.query(`${K.concat("*." + o.name)}`).forEach((J) => {
15585
+ J.required = U;
15580
15586
  }), d.emit("patch", {
15581
15587
  schema: H
15582
15588
  }), d.refresh();
@@ -15595,26 +15601,26 @@ const useGetFilterOptions = () => {
15595
15601
  ],
15596
15602
  value: T,
15597
15603
  onChange: (U) => {
15598
- var J, W;
15604
+ var X, W;
15599
15605
  const H = {
15600
15606
  "x-uid": o["x-uid"]
15601
- }, K = (W = l.path) == null ? void 0 : W.splice(((J = l.path) == null ? void 0 : J.length) - 1, 1);
15607
+ }, K = (W = l.path) == null ? void 0 : W.splice(((X = l.path) == null ? void 0 : X.length) - 1, 1);
15602
15608
  switch (U) {
15603
15609
  case "readonly": {
15604
- o["x-read-pretty"] = !1, o["x-disabled"] = !0, H["x-read-pretty"] = !1, H["x-disabled"] = !0, l.form.query(`${K.concat("*." + o.name)}`).forEach((X) => {
15605
- X.readonly = !0, X.disabled = !0;
15610
+ o["x-read-pretty"] = !1, o["x-disabled"] = !0, H["x-read-pretty"] = !1, H["x-disabled"] = !0, l.form.query(`${K.concat("*." + o.name)}`).forEach((J) => {
15611
+ J.readonly = !0, J.disabled = !0;
15606
15612
  });
15607
15613
  break;
15608
15614
  }
15609
15615
  case "read-pretty": {
15610
- o["x-read-pretty"] = !0, o["x-disabled"] = !1, H["x-read-pretty"] = !0, H["x-disabled"] = !1, l.form.query(`${K.concat("*." + o.name)}`).forEach((X) => {
15611
- X.readPretty = !0;
15616
+ o["x-read-pretty"] = !0, o["x-disabled"] = !1, H["x-read-pretty"] = !0, H["x-disabled"] = !1, l.form.query(`${K.concat("*." + o.name)}`).forEach((J) => {
15617
+ J.readPretty = !0;
15612
15618
  });
15613
15619
  break;
15614
15620
  }
15615
15621
  default: {
15616
- o["x-read-pretty"] = !1, o["x-disabled"] = !1, H["x-read-pretty"] = !1, H["x-disabled"] = !1, l.form.query(`${K.concat("*." + o.name)}`).forEach((X) => {
15617
- X.readPretty = !1, X.disabled + !1;
15622
+ o["x-read-pretty"] = !1, o["x-disabled"] = !1, H["x-read-pretty"] = !1, H["x-disabled"] = !1, l.form.query(`${K.concat("*." + o.name)}`).forEach((J) => {
15623
+ J.readPretty = !1, J.disabled + !1;
15618
15624
  });
15619
15625
  break;
15620
15626
  }
@@ -15632,8 +15638,8 @@ const useGetFilterOptions = () => {
15632
15638
  {
15633
15639
  fieldSchema: o,
15634
15640
  onSubmitCallBack: (U) => {
15635
- var K, J;
15636
- const H = (J = l.path) == null ? void 0 : J.splice(((K = l.path) == null ? void 0 : K.length) - 1, 1);
15641
+ var K, X;
15642
+ const H = (X = l.path) == null ? void 0 : X.splice(((K = l.path) == null ? void 0 : K.length) - 1, 1);
15637
15643
  l.form.query(`${H.concat("*." + o.name)}`).forEach((W) => {
15638
15644
  W.componentProps.service = W.componentProps.service || { params: {} }, W.componentProps.service.params.sort = U;
15639
15645
  });
@@ -18009,7 +18015,7 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
18009
18015
  }
18010
18016
  ) })) : null;
18011
18017
  }, InternalSchemaToolbar = React.memo((e) => {
18012
- var J;
18018
+ var X;
18013
18019
  const t = useFieldSchema(), {
18014
18020
  title: o,
18015
18021
  initializer: n,
@@ -18036,38 +18042,38 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
18036
18042
  }, [o, t]), { render: j, exists: w } = useSchemaSettingsRender(
18037
18043
  r || (t == null ? void 0 : t["x-settings"]),
18038
18044
  t == null ? void 0 : t["x-settings-props"]
18039
- ), { render: O, exists: M } = useSchemaInitializerRender(
18045
+ ), { render: L, exists: M } = useSchemaInitializerRender(
18040
18046
  n || (t == null ? void 0 : t["x-initializer"]),
18041
18047
  t == null ? void 0 : t["x-initializer-props"]
18042
- ), k = useGridRowContext(), L = useGridContext(), q = useMemo(() => {
18048
+ ), k = useGridRowContext(), O = useGridContext(), q = useMemo(() => {
18043
18049
  var W;
18044
18050
  return {
18045
18051
  insertPosition: "afterEnd",
18046
18052
  wrap: ((W = k == null ? void 0 : k.cols) == null ? void 0 : W.length) === 1 ? gridRowColWrap : void 0,
18047
- Component: (X) => /* @__PURE__ */ jsx(
18053
+ Component: (J) => /* @__PURE__ */ jsx(
18048
18054
  PlusOutlined,
18049
- P(x({}, X), {
18055
+ P(x({}, J), {
18050
18056
  role: "button",
18051
18057
  "aria-label": v("schema-initializer"),
18052
18058
  style: { cursor: "pointer", fontSize: 14 }
18053
18059
  })
18054
18060
  )
18055
18061
  };
18056
- }, [v, (J = k == null ? void 0 : k.cols) == null ? void 0 : J.length]), E = useMemo(() => u === !1 || C === !1 ? null : /* @__PURE__ */ jsx(DragHandler, { children: /* @__PURE__ */ jsx(DragOutlined, { role: "button", "aria-label": v("drag-handler") }) }), [u, v, C]), V = useMemo(() => {
18062
+ }, [v, (X = k == null ? void 0 : k.cols) == null ? void 0 : X.length]), V = useMemo(() => u === !1 || C === !1 ? null : /* @__PURE__ */ jsx(DragHandler, { children: /* @__PURE__ */ jsx(DragOutlined, { role: "button", "aria-label": v("drag-handler") }) }), [u, v, C]), E = useMemo(() => {
18057
18063
  var W;
18058
18064
  if (n === !1)
18059
18065
  return null;
18060
18066
  if (M)
18061
- return O(q);
18062
- if (L != null && L.InitializerComponent || L != null && L.renderSchemaInitializer)
18063
- return L != null && L.InitializerComponent ? /* @__PURE__ */ jsx(L.InitializerComponent, x({}, q)) : (W = L.renderSchemaInitializer) == null ? void 0 : W.call(L, q);
18064
- }, [L, n, q, M, O]), G = useMemo(() => r !== !1 && w ? j() : null, [w, j, r]), U = useRef(null), H = "hidden";
18067
+ return L(q);
18068
+ if (O != null && O.InitializerComponent || O != null && O.renderSchemaInitializer)
18069
+ return O != null && O.InitializerComponent ? /* @__PURE__ */ jsx(O.InitializerComponent, x({}, q)) : (W = O.renderSchemaInitializer) == null ? void 0 : W.call(O, q);
18070
+ }, [O, n, q, M, L]), G = useMemo(() => r !== !1 && w ? j() : null, [w, j, r]), U = useRef(null), H = "hidden";
18065
18071
  useEffect(() => {
18066
18072
  const W = U.current;
18067
- let X = W == null ? void 0 : W.parentElement;
18068
- for (; X && X.clientHeight === 0; )
18069
- X = X.parentElement;
18070
- const Z = g || X;
18073
+ let J = W == null ? void 0 : W.parentElement;
18074
+ for (; J && J.clientHeight === 0; )
18075
+ J = J.parentElement;
18076
+ const Z = g || J;
18071
18077
  if (!Z)
18072
18078
  return;
18073
18079
  function Q() {
@@ -18101,8 +18107,8 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
18101
18107
  N[1] && /* @__PURE__ */ jsx("span", { className: "toolbar-title-tag", children: `${$.current}: ${`${N[1]}` || S("Untitled")}` })
18102
18108
  ] }) }),
18103
18109
  /* @__PURE__ */ jsx("div", { className: cls("toolbar-icons", i), style: l, children: /* @__PURE__ */ jsxs(Space$1, { size: 3, align: "center", className: d, style: p, children: [
18104
- E,
18105
- /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: B, children: V }),
18110
+ V,
18111
+ /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: B, children: E }),
18106
18112
  G
18107
18113
  ] }) })
18108
18114
  ]
@@ -18482,8 +18488,8 @@ const breakRemoveOnGrid = (e) => e["x-component"] === "Grid", breakRemoveOnRow =
18482
18488
  }), [v, F] = useState([0, 0]);
18483
18489
  return useDndMonitor({
18484
18490
  onDragStart(D) {
18485
- var w, O, M;
18486
- const $ = (M = (O = (w = D.active) == null ? void 0 : w.data) == null ? void 0 : O.current) == null ? void 0 : M.dividerRef;
18491
+ var w, L, M;
18492
+ const $ = (M = (L = (w = D.active) == null ? void 0 : w.data) == null ? void 0 : L.current) == null ? void 0 : M.dividerRef;
18487
18493
  if (!$ || !r)
18488
18494
  return;
18489
18495
  o.current = D.active.id;
@@ -18503,8 +18509,8 @@ const breakRemoveOnGrid = (e) => e["x-component"] === "Grid", breakRemoveOnRow =
18503
18509
  return;
18504
18510
  const $ = l.current, B = $.previousElementSibling, N = $.nextElementSibling;
18505
18511
  h["x-component-props"] = h["x-component-props"] || {}, g["x-component-props"] = g["x-component-props"] || {};
18506
- const j = $.clientWidth * (e.cols.length + 1) / e.cols.length, w = (100 * (B.getBoundingClientRect().width + j) / $.parentElement.clientWidth).toFixed(2), O = (100 * (N.getBoundingClientRect().width + j) / $.parentElement.clientWidth).toFixed(2);
18507
- _.set(h, "x-component-props.width", w), _.set(g, "x-component-props.width", O), n.emit("batchPatch", {
18512
+ const j = $.clientWidth * (e.cols.length + 1) / e.cols.length, w = (100 * (B.getBoundingClientRect().width + j) / $.parentElement.clientWidth).toFixed(2), L = (100 * (N.getBoundingClientRect().width + j) / $.parentElement.clientWidth).toFixed(2);
18513
+ _.set(h, "x-component-props.width", w), _.set(g, "x-component-props.width", L), n.emit("batchPatch", {
18508
18514
  schemas: [
18509
18515
  {
18510
18516
  "x-uid": h["x-uid"],
@@ -18818,8 +18824,8 @@ const useTableBlockProps = () => {
18818
18824
  ),
18819
18825
  onChange: useCallback(
18820
18826
  ({ current: y, pageSize: S }, v, F) => {
18821
- var $, B, N, j, w, O, M, k, L, q;
18822
- const I = (N = (B = ($ = t.parent) == null ? void 0 : $["x-decorator-props"]) == null ? void 0 : B.params) == null ? void 0 : N.sort, R = F.order ? F.order === "ascend" ? [F.field] : [`-${F.field}`] : I || a.dragSortBy, T = S || ((O = (w = (j = t.parent) == null ? void 0 : j["x-decorator-props"]) == null ? void 0 : w.params) == null ? void 0 : O.pageSize), D = P(x({}, (L = (k = (M = i.current) == null ? void 0 : M.service) == null ? void 0 : k.params) == null ? void 0 : L[0]), { page: y || 1, pageSize: T });
18827
+ var $, B, N, j, w, L, M, k, O, q;
18828
+ const I = (N = (B = ($ = t.parent) == null ? void 0 : $["x-decorator-props"]) == null ? void 0 : B.params) == null ? void 0 : N.sort, R = F.order ? F.order === "ascend" ? [F.field] : [`-${F.field}`] : I || a.dragSortBy, T = S || ((L = (w = (j = t.parent) == null ? void 0 : j["x-decorator-props"]) == null ? void 0 : w.params) == null ? void 0 : L.pageSize), D = P(x({}, (O = (k = (M = i.current) == null ? void 0 : M.service) == null ? void 0 : k.params) == null ? void 0 : O[0]), { page: y || 1, pageSize: T });
18823
18829
  R && (D.sort = R), (q = i.current) == null || q.service.run(D);
18824
18830
  },
18825
18831
  [t.parent]
@@ -18833,11 +18839,11 @@ const useTableBlockProps = () => {
18833
18839
  }
18834
18840
  const T = R.find((D) => D.uid === t.parent["x-uid"]);
18835
18841
  R.forEach((D) => {
18836
- var M, k, L, q;
18837
- const $ = F.find((E) => E.uid === D.uid);
18842
+ var M, k, O, q;
18843
+ const $ = F.find((V) => V.uid === D.uid);
18838
18844
  if (!$)
18839
18845
  return;
18840
- const B = getSourceKey(T, $.field) || a.rowKey || "id", N = [y[B]], j = ((M = D.service.params) == null ? void 0 : M[0]) || {}, w = ((L = (k = D.service.params) == null ? void 0 : k[1]) == null ? void 0 : L.filters) || {};
18846
+ const B = getSourceKey(T, $.field) || a.rowKey || "id", N = [y[B]], j = ((M = D.service.params) == null ? void 0 : M[0]) || {}, w = ((O = (k = D.service.params) == null ? void 0 : k[1]) == null ? void 0 : O.filters) || {};
18841
18847
  if (v.includes(y[a.rowKey])) {
18842
18848
  if ((q = D.clearSelection) == null || q.call(D), D.dataLoadingMode === "manual")
18843
18849
  return D.clearData();
@@ -18852,14 +18858,14 @@ const useTableBlockProps = () => {
18852
18858
  }
18853
18859
  ]
18854
18860
  };
18855
- const O = mergeFilter([
18856
- ...Object.values(w).map((E) => removeNullCondition(E)),
18861
+ const L = mergeFilter([
18862
+ ...Object.values(w).map((V) => removeNullCondition(V)),
18857
18863
  D.defaultFilter
18858
18864
  ]);
18859
18865
  return D.doFilter(
18860
18866
  P(x({}, j), {
18861
18867
  page: 1,
18862
- filter: O
18868
+ filter: L
18863
18869
  }),
18864
18870
  { filters: w }
18865
18871
  );
@@ -19216,10 +19222,10 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
19216
19222
  var i, l, c, u, d, p, m, h, g, f, C, b, y, S, v, F;
19217
19223
  const e = useField(), t = useTableSelectorContext(), o = useFieldSchema(), { getCollectionJoinField: n } = useCollectionManager_deprecated(), r = recursiveParent(o, "CollectionField"), a = n(r == null ? void 0 : r["x-collection-field"]);
19218
19224
  return useEffect(() => {
19219
- var R, T, D, $, B, N, j, w, O, M, k, L, q;
19225
+ var R, T, D, $, B, N, j, w, L, M, k, O, q;
19220
19226
  if (!((R = t == null ? void 0 : t.service) != null && R.loading)) {
19221
- const E = (D = (T = t == null ? void 0 : t.service) == null ? void 0 : T.data) == null ? void 0 : D.data.map((V) => V);
19222
- e.value = E, ($ = e == null ? void 0 : e.setInitialValue) == null || $.call(e, E), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (j = (N = (B = t == null ? void 0 : t.service) == null ? void 0 : B.data) == null ? void 0 : N.meta) == null ? void 0 : j.pageSize, e.componentProps.pagination.total = (M = (O = (w = t == null ? void 0 : t.service) == null ? void 0 : w.data) == null ? void 0 : O.meta) == null ? void 0 : M.count, e.componentProps.pagination.current = (q = (L = (k = t == null ? void 0 : t.service) == null ? void 0 : k.data) == null ? void 0 : L.meta) == null ? void 0 : q.page;
19227
+ const V = (D = (T = t == null ? void 0 : t.service) == null ? void 0 : T.data) == null ? void 0 : D.data.map((E) => E);
19228
+ e.value = V, ($ = e == null ? void 0 : e.setInitialValue) == null || $.call(e, V), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (j = (N = (B = t == null ? void 0 : t.service) == null ? void 0 : B.data) == null ? void 0 : N.meta) == null ? void 0 : j.pageSize, e.componentProps.pagination.total = (M = (L = (w = t == null ? void 0 : t.service) == null ? void 0 : w.data) == null ? void 0 : L.meta) == null ? void 0 : M.count, e.componentProps.pagination.current = (q = (O = (k = t == null ? void 0 : t.service) == null ? void 0 : k.data) == null ? void 0 : O.meta) == null ? void 0 : q.page;
19223
19229
  }
19224
19230
  }, [
19225
19231
  a == null ? void 0 : a.foreignKey,
@@ -21938,14 +21944,14 @@ const SchemaSettingsSwitchItem = (e) => {
21938
21944
  }, [D]), B = useCallback(() => z(void 0, null, function* () {
21939
21945
  yield D.submit();
21940
21946
  try {
21941
- const O = D.values, M = Object.keys(O).reduce((k, L) => (D.query(L).take() && (k[L] = O[L]), k), {});
21947
+ const L = D.values, M = Object.keys(L).reduce((k, O) => (D.query(O).take() && (k[O] = L[O]), k), {});
21942
21948
  h(!1), yield o == null ? void 0 : o(cloneDeep$1(M));
21943
- } catch (O) {
21944
- console.error(O);
21949
+ } catch (L) {
21950
+ console.error(L);
21945
21951
  }
21946
21952
  }), [D, o]), N = useCallback(() => z(void 0, null, function* () {
21947
21953
  !g && (i != null && i["x-uid"]) && (b["x-action-settings"].schemaUid = i["x-uid"], S.emit("patch", { schema: b }), yield F.resource("uiSchemas").insert({ values: i }), f(i["x-uid"])), typeof a == "function" && (a == null || a()), y.setVisible(!1), h(!0);
21948
- }), [F, y, S, b, i, g]), j = useCallback((O) => O.stopPropagation(), []);
21954
+ }), [F, y, S, b, i, g]), j = useCallback((L) => L.stopPropagation(), []);
21949
21955
  return /* @__PURE__ */ jsxs(zIndexContext.Provider, { value: T, children: [
21950
21956
  /* @__PURE__ */ jsx(
21951
21957
  SchemaSettingsItem,
@@ -22012,17 +22018,17 @@ const SchemaSettingsModalItem = (e) => {
22012
22018
  "noRecord",
22013
22019
  "ModalContextProvider",
22014
22020
  "dialogRootClassName"
22015
- ]), g = useContext(SchemaOptionsContext), f = useCollection(), C = useAPIClient(), b = useApp(), { theme: y } = useGlobalTheme(), S = useBlockRequestContext(), v = useFormActiveFields(), { locale: F } = useContext(ConfigProvider.ConfigContext), I = useDataSourceManager(), R = useDataSourceKey(), T = useCollectionRecord(), { association: D } = useDataBlockProps() || {}, $ = useCurrentRecord(), B = useFormBlockContext(), N = useBlockContext(), { getOperators: j } = useOperators(), w = useLocationSearch(), O = useVariables$1(), M = useContext(AllDataBlocksContext), k = useContext(SchemaComponentContext), L = useContext(VariableScopeContext$1), { formValue: q, collection: E, parent: V } = useSubFormValue(), G = useCurrentPopupRecord(), U = useParentPopupRecord();
22021
+ ]), g = useContext(SchemaOptionsContext), f = useCollection(), C = useAPIClient(), b = useApp(), { theme: y } = useGlobalTheme(), S = useBlockRequestContext(), v = useFormActiveFields(), { locale: F } = useContext(ConfigProvider.ConfigContext), I = useDataSourceManager(), R = useDataSourceKey(), T = useCollectionRecord(), { association: D } = useDataBlockProps() || {}, $ = useCurrentRecord(), B = useFormBlockContext(), N = useBlockContext(), { getOperators: j } = useOperators(), w = useLocationSearch(), L = useVariables$1(), M = useContext(AllDataBlocksContext), k = useContext(SchemaComponentContext), O = useContext(VariableScopeContext$1), { formValue: q, collection: V, parent: E } = useSubFormValue(), G = useCurrentPopupRecord(), U = useParentPopupRecord();
22016
22022
  return t ? null : /* @__PURE__ */ jsx(
22017
22023
  SchemaSettingsItem,
22018
22024
  P(x({
22019
22025
  title: o
22020
22026
  }, h), {
22021
22027
  onClick: () => z(void 0, null, function* () {
22022
- const K = l ? yield l() : c, J = _.isFunction(e.schema) ? e.schema() : e.schema;
22028
+ const K = l ? yield l() : c, X = _.isFunction(e.schema) ? e.schema() : e.schema;
22023
22029
  FormDialog(
22024
- { title: J.title || o, width: u, rootClassName: m },
22025
- () => /* @__PURE__ */ jsx(VariableScopeContext$1.Provider, { value: L, children: /* @__PURE__ */ jsx(SchemaComponentContext.Provider, { value: k, children: /* @__PURE__ */ jsx(AllDataBlocksContext.Provider, { value: M, children: /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(CollectOperators, { defaultOperators: j(), children: /* @__PURE__ */ jsx(VariablesContext.Provider, { value: O, children: /* @__PURE__ */ jsx(BlockContext.Provider, { value: N, children: /* @__PURE__ */ jsx(
22030
+ { title: X.title || o, width: u, rootClassName: m },
22031
+ () => /* @__PURE__ */ jsx(VariableScopeContext$1.Provider, { value: O, children: /* @__PURE__ */ jsx(SchemaComponentContext.Provider, { value: k, children: /* @__PURE__ */ jsx(AllDataBlocksContext.Provider, { value: M, children: /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(CollectOperators, { defaultOperators: j(), children: /* @__PURE__ */ jsx(VariablesContext.Provider, { value: L, children: /* @__PURE__ */ jsx(BlockContext.Provider, { value: N, children: /* @__PURE__ */ jsx(
22026
22032
  VariablePopupRecordProvider,
22027
22033
  {
22028
22034
  recordData: G == null ? void 0 : G.value,
@@ -22034,7 +22040,7 @@ const SchemaSettingsModalItem = (e) => {
22034
22040
  children: /* @__PURE__ */ jsx(CollectionRecordProvider, { record: d ? null : T, children: /* @__PURE__ */ jsx(CurrentRecordContextProvider, P(x({}, $), { children: /* @__PURE__ */ jsx(FormBlockContext$1.Provider, { value: B, children: /* @__PURE__ */ jsx(
22035
22041
  SubFormProvider,
22036
22042
  {
22037
- value: { value: q, collection: E, parent: V },
22043
+ value: { value: q, collection: V, parent: E },
22038
22044
  children: /* @__PURE__ */ jsx(
22039
22045
  FormActiveFieldsProvider,
22040
22046
  {
@@ -22071,12 +22077,12 @@ const SchemaSettingsModalItem = (e) => {
22071
22077
  min-width: 320px;
22072
22078
  }
22073
22079
  `,
22074
- children: /* @__PURE__ */ jsx(ApplicationContext.Provider, { value: b, children: /* @__PURE__ */ jsx(APIClientProvider, { apiClient: C, children: /* @__PURE__ */ jsx(ConfigProvider, { locale: F, children: /* @__PURE__ */ jsx(zIndexContext.Provider, { value: 2e3, children: /* @__PURE__ */ jsx(
22080
+ children: /* @__PURE__ */ jsx(ApplicationContext.Provider, { value: b, children: /* @__PURE__ */ jsx(APIClientProvider, { apiClient: C, children: /* @__PURE__ */ jsx(ConfigProvider, { locale: F, children: /* @__PURE__ */ jsx(zIndexContext.Provider, { value: ICON_POPUP_Z_INDEX, children: /* @__PURE__ */ jsx(
22075
22081
  SchemaComponent,
22076
22082
  {
22077
22083
  components: n,
22078
22084
  scope: r,
22079
- schema: J
22085
+ schema: X
22080
22086
  }
22081
22087
  ) }) }) }) })
22082
22088
  }
@@ -22233,12 +22239,12 @@ const SchemaSettingsModalItem = (e) => {
22233
22239
  }),
22234
22240
  [o, c, u, S, g, f, p, h, T, r]
22235
22241
  ), N = useMemo(() => ({ ArrayCollapse: ArrayCollapse$2, FormLayout }), []), j = useCallback(
22236
- (O) => {
22237
- var E;
22242
+ (L) => {
22243
+ var V;
22238
22244
  const M = [];
22239
- for (const V of O.fieldReaction.rules)
22240
- M.push(_.omit(_.pickBy(V, _.identity), ["conditionBasic", "conditionAdvanced"]));
22241
- const k = S["x-component"] === "BlockTemplate" && ((E = S["x-component-props"]) == null ? void 0 : E.templateId), q = {
22245
+ for (const E of L.fieldReaction.rules)
22246
+ M.push(_.omit(_.pickBy(E, _.identity), ["conditionBasic", "conditionAdvanced"]));
22247
+ const k = S["x-component"] === "BlockTemplate" && ((V = S["x-component-props"]) == null ? void 0 : V.templateId), q = {
22242
22248
  "x-uid": b !== LinkageRuleCategory.block ? k && m(k).uid || S["x-uid"] : c["x-uid"]
22243
22249
  };
22244
22250
  S[R] = M, q[R] = M, c[R] = M, d.emit("patch", {
@@ -22255,7 +22261,7 @@ const SchemaSettingsModalItem = (e) => {
22255
22261
  width: 960,
22256
22262
  schema: B,
22257
22263
  onSubmit: j,
22258
- ModalContextProvider: (O) => /* @__PURE__ */ jsx(FlagProvider, P(x({}, $), { children: O.children }))
22264
+ ModalContextProvider: (L) => /* @__PURE__ */ jsx(FlagProvider, P(x({}, $), { children: L.children }))
22259
22265
  }
22260
22266
  );
22261
22267
  }, useDataTemplates = (e) => {
@@ -23355,8 +23361,8 @@ function getTypedConstantOption(e, t, o) {
23355
23361
  };
23356
23362
  }
23357
23363
  function Input$1(e) {
23358
- var W, X, Z;
23359
- const J = e, {
23364
+ var W, J, Z;
23365
+ const X = e, {
23360
23366
  value: t = "",
23361
23367
  onChange: o,
23362
23368
  children: n,
@@ -23370,7 +23376,7 @@ function Input$1(e) {
23370
23376
  parseOptions: p,
23371
23377
  hideVariableButton: m,
23372
23378
  constantAbel: h = !0
23373
- } = J, g = Y(J, [
23379
+ } = X, g = Y(X, [
23374
23380
  "value",
23375
23381
  "onChange",
23376
23382
  "children",
@@ -23388,22 +23394,22 @@ function Input$1(e) {
23388
23394
  useAntdInputStyle(`${S}-input`);
23389
23395
  const v = useCompile(), { t: F } = useTranslation(), I = useForm(), [R, T] = React.useState([]), [D, $] = React.useState([]), [B, N] = React.useState(
23390
23396
  m || !!(n && t != null)
23391
- ), j = useMemo(() => parseValue(t, p), [p, t]), w = typeof j == "string", O = w ? j : "", M = w ? null : j, k = Object.assign(
23397
+ ), j = useMemo(() => parseValue(t, p), [p, t]), w = typeof j == "string", L = w ? j : "", M = w ? null : j, k = Object.assign(
23392
23398
  {
23393
23399
  label: "label",
23394
23400
  value: "value",
23395
23401
  children: "children"
23396
23402
  },
23397
23403
  d != null ? d : {}
23398
- ), L = useMemo(() => h ? n ? {
23404
+ ), O = useMemo(() => h ? n ? {
23399
23405
  value: "$",
23400
23406
  label: F("Constant"),
23401
23407
  [k.value]: "$",
23402
23408
  [k.label]: F("Constant")
23403
- } : a ? getTypedConstantOption(O, a, k) : null : null, [O, a]), q = (W = L == null ? void 0 : L.component) != null ? W : NullComponent, E = Array.isArray(a) ? (Z = (X = a.find((Q) => Array.isArray(Q) && Q[0] === O)) == null ? void 0 : X[1]) != null ? Z : {} : {};
23404
- let V;
23405
- t == null ? i ? n && B ? V = ["$"] : V = [""] : n ? V = ["$"] : V = [" ", O] : V = n ? ["$"] : [" ", O], m && (V = ["$"]), useEffect(() => {
23406
- const re = L != null ? L : {}, { component: Q } = re, ee = Y(re, ["component"]), oe = [
23409
+ } : a ? getTypedConstantOption(L, a, k) : null : null, [L, a]), q = (W = O == null ? void 0 : O.component) != null ? W : NullComponent, V = Array.isArray(a) ? (Z = (J = a.find((Q) => Array.isArray(Q) && Q[0] === L)) == null ? void 0 : J[1]) != null ? Z : {} : {};
23410
+ let E;
23411
+ t == null ? i ? n && B ? E = ["$"] : E = [""] : n ? E = ["$"] : E = [" ", L] : E = n ? ["$"] : [" ", L], m && (E = ["$"]), useEffect(() => {
23412
+ const re = O != null ? O : {}, { component: Q } = re, ee = Y(re, ["component"]), oe = [
23407
23413
  ...i ? [
23408
23414
  {
23409
23415
  value: "",
@@ -23412,11 +23418,11 @@ function Input$1(e) {
23412
23418
  [k.label]: F("Null")
23413
23419
  }
23414
23420
  ] : [],
23415
- ...L ? [v(ee)] : [],
23421
+ ...O ? [v(ee)] : [],
23416
23422
  ...f ? [...f] : []
23417
23423
  ].filter((ie) => !ie.deprecated || (M == null ? void 0 : M[0]) === ie[k.value]);
23418
23424
  T(oe);
23419
- }, [f, M, L, i]);
23425
+ }, [f, M, O, i]);
23420
23426
  const G = (Q) => z(this, null, function* () {
23421
23427
  var oe;
23422
23428
  const ee = Q[Q.length - 1];
@@ -23444,20 +23450,20 @@ function Input$1(e) {
23444
23450
  return;
23445
23451
  }
23446
23452
  if (Q[0] === " ") {
23447
- Q[1] ? Q[1] !== O && o((ie = (re = (oe = ConstantTypes[Q[1]]) == null ? void 0 : oe.default) == null ? void 0 : re.call(oe)) != null ? ie : null, ee) : M && o(null, ee);
23453
+ Q[1] ? Q[1] !== L && o((ie = (re = (oe = ConstantTypes[Q[1]]) == null ? void 0 : oe.default) == null ? void 0 : re.call(oe)) != null ? ie : null, ee) : M && o(null, ee);
23448
23454
  return;
23449
23455
  }
23450
23456
  o(`{{${Q.join(".")}}}`, ee);
23451
23457
  },
23452
- [O, M, o]
23458
+ [L, M, o]
23453
23459
  ), H = useCallback(() => {
23454
23460
  var Q;
23455
- if (N(!!n), (Q = L == null ? void 0 : L.children) != null && Q.length) {
23456
- const ee = L.children[0].default();
23461
+ if (N(!!n), (Q = O == null ? void 0 : O.children) != null && Q.length) {
23462
+ const ee = O.children[0].default();
23457
23463
  return o(ee);
23458
23464
  }
23459
23465
  o(null);
23460
- }, [L]);
23466
+ }, [O]);
23461
23467
  useEffect(() => {
23462
23468
  z(this, null, function* () {
23463
23469
  var re;
@@ -23544,7 +23550,7 @@ function Input$1(e) {
23544
23550
  P(x({
23545
23551
  role: "button",
23546
23552
  "aria-label": "variable-constant"
23547
- }, E), {
23553
+ }, V), {
23548
23554
  value: t,
23549
23555
  onChange: o
23550
23556
  })
@@ -23553,7 +23559,7 @@ function Input$1(e) {
23553
23559
  Cascader$1,
23554
23560
  {
23555
23561
  options: R,
23556
- value: M != null ? M : V,
23562
+ value: M != null ? M : E,
23557
23563
  onChange: U,
23558
23564
  loadData: G,
23559
23565
  changeOnSelect: u != null ? u : !0,
@@ -23837,23 +23843,23 @@ function TextArea(e) {
23837
23843
  ), [y, S] = useState(!1), [v, F] = useState(!1), [I, R] = useState(() => renderHTML(p != null ? p : "", b, c)), [T, D] = useState([-1, 0, -1, 0]);
23838
23844
  useAntdInputStyle("ant-input");
23839
23845
  const { token: $ } = theme.useToken(), B = c.join(" "), N = useCallback(
23840
- (V) => {
23846
+ (E) => {
23841
23847
  var U;
23842
- const G = getValue(V, c);
23848
+ const G = getValue(E, c);
23843
23849
  (U = e.onChange) == null || U.call(e, d ? G.trim() : G);
23844
23850
  },
23845
23851
  [B, e.onChange, d]
23846
23852
  );
23847
23853
  useEffect(() => {
23848
- preloadOptions(r, m).then((V) => {
23849
- f(V);
23854
+ preloadOptions(r, m).then((E) => {
23855
+ f(E);
23850
23856
  }).catch(console.error);
23851
23857
  }, [r, JSON.stringify(m)]), useEffect(() => {
23852
23858
  R(renderHTML(p != null ? p : "", b, c)), v || D([-1, 0, -1, 0]);
23853
23859
  }, [p, b, B]), useEffect(() => {
23854
23860
  var U;
23855
- const { current: V } = h;
23856
- if (!V)
23861
+ const { current: E } = h;
23862
+ if (!E)
23857
23863
  return;
23858
23864
  const G = new Range();
23859
23865
  if (v) {
@@ -23862,22 +23868,22 @@ function TextArea(e) {
23862
23868
  const H = (U = window.getSelection) == null ? void 0 : U.call(window);
23863
23869
  if (H)
23864
23870
  try {
23865
- const K = Array.from(V.childNodes);
23871
+ const K = Array.from(E.childNodes);
23866
23872
  K.length && (T[0] === -1 ? T[1] && G.setStartAfter(K[T[1] - 1]) : G.setStart(K[T[0]], T[1]), T[2] === -1 ? T[3] && G.setEndAfter(K[T[3] - 1]) : G.setEnd(K[T[2]], T[3])), G.collapse(!0), H.removeAllRanges(), H.addRange(G);
23867
23873
  } catch (K) {
23868
23874
  }
23869
23875
  } else {
23870
- const { lastChild: H } = V;
23876
+ const { lastChild: H } = E;
23871
23877
  if (H) {
23872
23878
  G.setStartAfter(H), G.setEndAfter(H);
23873
- const K = Array.from(V.childNodes), J = G.startContainer === V ? -1 : K.indexOf(H), W = G.startContainer === V ? -1 : K.indexOf(H);
23874
- D([J, G.startOffset, W, G.endOffset]);
23879
+ const K = Array.from(E.childNodes), X = G.startContainer === E ? -1 : K.indexOf(H), W = G.startContainer === E ? -1 : K.indexOf(H);
23880
+ D([X, G.startOffset, W, G.endOffset]);
23875
23881
  }
23876
23882
  }
23877
23883
  }, [I]);
23878
23884
  const j = useCallback(
23879
- function(V) {
23880
- const G = V.filter((K) => !!K.trim()), { current: U } = h;
23885
+ function(E) {
23886
+ const G = E.filter((K) => !!K.trim()), { current: U } = h;
23881
23887
  if (!U || !G)
23882
23888
  return;
23883
23889
  U.focus();
@@ -23888,25 +23894,25 @@ function TextArea(e) {
23888
23894
  },
23889
23895
  [b, N, T]
23890
23896
  ), w = useCallback(
23891
- function({ currentTarget: V }) {
23892
- y || (F(!0), D(getCurrentRange(V)), N(V));
23897
+ function({ currentTarget: E }) {
23898
+ y || (F(!0), D(getCurrentRange(E)), N(E));
23893
23899
  },
23894
23900
  [y, N]
23895
- ), O = useCallback(function({ currentTarget: V }) {
23896
- D(getCurrentRange(V));
23897
- }, []), M = useCallback(function(V) {
23898
- V.key === "Enter" && V.preventDefault();
23901
+ ), L = useCallback(function({ currentTarget: E }) {
23902
+ D(getCurrentRange(E));
23903
+ }, []), M = useCallback(function(E) {
23904
+ E.key === "Enter" && E.preventDefault();
23899
23905
  }, []), k = useCallback(function() {
23900
23906
  S(!0);
23901
- }, []), L = useCallback(
23902
- ({ currentTarget: V }) => {
23903
- S(!1), F(!0), D(getCurrentRange(V)), N(V);
23907
+ }, []), O = useCallback(
23908
+ ({ currentTarget: E }) => {
23909
+ S(!1), F(!0), D(getCurrentRange(E)), N(E);
23904
23910
  },
23905
23911
  [N]
23906
23912
  ), q = useCallback(
23907
- function(V) {
23908
- V.preventDefault();
23909
- const G = V.clipboardData.getData("text/html") || V.clipboardData.getData("text"), U = sanitizeHTML(G, {
23913
+ function(E) {
23914
+ E.preventDefault();
23915
+ const G = E.clipboardData.getData("text/html") || E.clipboardData.getData("text"), U = sanitizeHTML(G, {
23910
23916
  allowedTags: ["span"],
23911
23917
  allowedAttributes: {
23912
23918
  span: ["data-variable", "contenteditable"]
@@ -23923,10 +23929,10 @@ function TextArea(e) {
23923
23929
  }
23924
23930
  }
23925
23931
  }).replace(/\n/g, " ");
23926
- F(!0), pasteHTML(V.currentTarget, U), D(getCurrentRange(V.currentTarget)), N(V.currentTarget);
23932
+ F(!0), pasteHTML(E.currentTarget, U), D(getCurrentRange(E.currentTarget)), N(E.currentTarget);
23927
23933
  },
23928
23934
  [N]
23929
- ), E = e.disabled || C.disabled;
23935
+ ), V = e.disabled || C.disabled;
23930
23936
  return t(
23931
23937
  /* @__PURE__ */ jsxs(Fragment$1, { children: [
23932
23938
  /* @__PURE__ */ jsxs(
@@ -23976,17 +23982,17 @@ function TextArea(e) {
23976
23982
  role: "button",
23977
23983
  "aria-label": "textbox",
23978
23984
  onInput: w,
23979
- onBlur: O,
23985
+ onBlur: L,
23980
23986
  onKeyDown: M,
23981
23987
  onPaste: q,
23982
23988
  onCompositionStart: k,
23983
- onCompositionEnd: L,
23989
+ onCompositionEnd: O,
23984
23990
  placeholder: e.placeholder,
23985
23991
  style: i,
23986
23992
  className: cx(
23987
23993
  o,
23988
23994
  "ant-input ant-input-outlined",
23989
- { "ant-input-disabled": E },
23995
+ { "ant-input-disabled": V },
23990
23996
  // NOTE: `pre-wrap` here for avoid the `&nbsp;` (\x160) issue when paste content, we need normal space (\x32).
23991
23997
  css`
23992
23998
  min-height: ${$.controlHeight}px;
@@ -24008,7 +24014,7 @@ function TextArea(e) {
24008
24014
  `
24009
24015
  ),
24010
24016
  ref: h,
24011
- contentEditable: !E,
24017
+ contentEditable: !V,
24012
24018
  dangerouslySetInnerHTML: { __html: I }
24013
24019
  }
24014
24020
  ),
@@ -24020,7 +24026,7 @@ function TextArea(e) {
24020
24026
  onInsert: j,
24021
24027
  changeOnSelect: a,
24022
24028
  fieldNames: l || defaultFieldNames$2,
24023
- disabled: E
24029
+ disabled: V
24024
24030
  }
24025
24031
  )
24026
24032
  ]
@@ -24240,7 +24246,7 @@ const getVariableComponentWithScope = (e, t = []) => (o) => {
24240
24246
  () => {
24241
24247
  var v;
24242
24248
  const S = createMemoryHistory();
24243
- return /* @__PURE__ */ jsx(DataSourceManagerProvider, { dataSourceManager: d, children: /* @__PURE__ */ jsx(CollectionManagerProvider, { instance: p, dataSource: (v = p == null ? void 0 : p.dataSource) == null ? void 0 : v.key, children: /* @__PURE__ */ jsx(Router, { location: S.location, navigator: S, children: /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: t.scope, components: x({}, t.components), children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(
24249
+ return /* @__PURE__ */ jsx(DataSourceManagerProvider, { dataSourceManager: d, children: /* @__PURE__ */ jsx(CollectionManagerProvider, { instance: p, dataSource: (v = p == null ? void 0 : p.dataSource) == null ? void 0 : v.key, children: /* @__PURE__ */ jsx(Router, { location: S.location, navigator: S, children: /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: t.scope, components: x({}, t.components), children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(zIndexContext.Provider, { value: ICON_POPUP_Z_INDEX, children: /* @__PURE__ */ jsx(
24244
24250
  SchemaComponent,
24245
24251
  {
24246
24252
  schema: {
@@ -24262,7 +24268,7 @@ const getVariableComponentWithScope = (e, t = []) => (o) => {
24262
24268
  }
24263
24269
  }
24264
24270
  }
24265
- ) }) }) }) }) });
24271
+ ) }) }) }) }) }) });
24266
24272
  },
24267
24273
  o
24268
24274
  ).open({
@@ -24297,7 +24303,7 @@ const getVariableComponentWithScope = (e, t = []) => (o) => {
24297
24303
  const { t: e } = useTranslation(), t = useContext(SchemaOptionsContext), { theme: o } = useGlobalTheme(), { componentCls: n, hashId: r } = useStyles$h(), a = useParentRoute(), { createRoute: i } = useNocoBaseRoutes(), l = useInsertPageSchema(), c = useCallback(() => z(void 0, null, function* () {
24298
24304
  const u = yield FormDialog(
24299
24305
  e("Add page"),
24300
- () => /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: t.scope, components: x({}, t.components), children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(
24306
+ () => /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: t.scope, components: x({}, t.components), children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(zIndexContext.Provider, { value: ICON_POPUP_Z_INDEX, children: /* @__PURE__ */ jsx(
24301
24307
  SchemaComponent,
24302
24308
  {
24303
24309
  schema: {
@@ -24316,7 +24322,7 @@ const getVariableComponentWithScope = (e, t = []) => (o) => {
24316
24322
  }
24317
24323
  }
24318
24324
  }
24319
- ) }) }),
24325
+ ) }) }) }),
24320
24326
  o
24321
24327
  ).open({
24322
24328
  initialValues: {}
@@ -24362,7 +24368,7 @@ const GroupItem$1 = () => {
24362
24368
  const { t: e } = useTranslation(), t = useContext(SchemaOptionsContext), { theme: o } = useGlobalTheme(), { componentCls: n, hashId: r } = useStyles$h(), a = useParentRoute(), { createRoute: i } = useNocoBaseRoutes(), l = useCallback(() => z(void 0, null, function* () {
24363
24369
  const c = yield FormDialog(
24364
24370
  e("Add group"),
24365
- () => /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: t.scope, components: x({}, t.components), children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(
24371
+ () => /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: t.scope, components: x({}, t.components), children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(zIndexContext.Provider, { value: ICON_POPUP_Z_INDEX, children: /* @__PURE__ */ jsx(
24366
24372
  SchemaComponent,
24367
24373
  {
24368
24374
  schema: {
@@ -24381,7 +24387,7 @@ const GroupItem$1 = () => {
24381
24387
  }
24382
24388
  }
24383
24389
  }
24384
- ) }) }),
24390
+ ) }) }) }),
24385
24391
  o
24386
24392
  ).open({
24387
24393
  initialValues: {}
@@ -26976,86 +26982,86 @@ https://requirejs.org/docs/errors.html#` + e);
26976
26982
  config: {}
26977
26983
  }, l = {}, c = {}, u = {}, d = [], p = {}, m = {}, h = {}, g = 1, f = 1;
26978
26984
  function C(k) {
26979
- var L, q;
26980
- for (L = 0; L < k.length; L++)
26981
- if (q = k[L], q === ".")
26982
- k.splice(L, 1), L -= 1;
26985
+ var O, q;
26986
+ for (O = 0; O < k.length; O++)
26987
+ if (q = k[O], q === ".")
26988
+ k.splice(O, 1), O -= 1;
26983
26989
  else if (q === "..") {
26984
- if (L === 0 || L === 1 && k[2] === ".." || k[L - 1] === "..")
26990
+ if (O === 0 || O === 1 && k[2] === ".." || k[O - 1] === "..")
26985
26991
  continue;
26986
- L > 0 && (k.splice(L - 1, 2), L -= 2);
26992
+ O > 0 && (k.splice(O - 1, 2), O -= 2);
26987
26993
  }
26988
26994
  }
26989
- function b(k, L, q) {
26990
- var E, V, G, U, H, K, J, W, X, Z, Q, ee, oe = L && L.split("/"), re = i.map, ie = re && re["*"];
26991
- if (k && (k = k.split("/"), J = k.length - 1, i.nodeIdCompat && jsSuffixRegExp.test(k[J]) && (k[J] = k[J].replace(jsSuffixRegExp, "")), k[0].charAt(0) === "." && oe && (ee = oe.slice(0, oe.length - 1), k = ee.concat(k)), C(k), k = k.join("/")), q && re && (oe || ie)) {
26995
+ function b(k, O, q) {
26996
+ var V, E, G, U, H, K, X, W, J, Z, Q, ee, oe = O && O.split("/"), re = i.map, ie = re && re["*"];
26997
+ if (k && (k = k.split("/"), X = k.length - 1, i.nodeIdCompat && jsSuffixRegExp.test(k[X]) && (k[X] = k[X].replace(jsSuffixRegExp, "")), k[0].charAt(0) === "." && oe && (ee = oe.slice(0, oe.length - 1), k = ee.concat(k)), C(k), k = k.join("/")), q && re && (oe || ie)) {
26992
26998
  G = k.split("/");
26993
26999
  e:
26994
27000
  for (U = G.length; U > 0; U -= 1) {
26995
27001
  if (K = G.slice(0, U).join("/"), oe) {
26996
27002
  for (H = oe.length; H > 0; H -= 1)
26997
- if (V = getOwn(re, oe.slice(0, H).join("/")), V && (V = getOwn(V, K), V)) {
26998
- W = V, X = U;
27003
+ if (E = getOwn(re, oe.slice(0, H).join("/")), E && (E = getOwn(E, K), E)) {
27004
+ W = E, J = U;
26999
27005
  break e;
27000
27006
  }
27001
27007
  }
27002
27008
  !Z && ie && getOwn(ie, K) && (Z = getOwn(ie, K), Q = U);
27003
27009
  }
27004
- !W && Z && (W = Z, X = Q), W && (G.splice(0, X, W), k = G.join("/"));
27010
+ !W && Z && (W = Z, J = Q), W && (G.splice(0, J, W), k = G.join("/"));
27005
27011
  }
27006
- return E = getOwn(i.pkgs, k), E || k;
27012
+ return V = getOwn(i.pkgs, k), V || k;
27007
27013
  }
27008
27014
  function y(k) {
27009
- isBrowser && each(scripts(), function(L) {
27010
- if (L.getAttribute("data-requiremodule") === k && L.getAttribute("data-requirecontext") === n.contextName)
27011
- return L.parentNode.removeChild(L), !0;
27015
+ isBrowser && each(scripts(), function(O) {
27016
+ if (O.getAttribute("data-requiremodule") === k && O.getAttribute("data-requirecontext") === n.contextName)
27017
+ return O.parentNode.removeChild(O), !0;
27012
27018
  });
27013
27019
  }
27014
27020
  function S(k) {
27015
- var L = getOwn(i.paths, k);
27016
- if (L && isArray(L) && L.length > 1)
27017
- return L.shift(), n.require.undef(k), n.makeRequire(null, {
27021
+ var O = getOwn(i.paths, k);
27022
+ if (O && isArray(O) && O.length > 1)
27023
+ return O.shift(), n.require.undef(k), n.makeRequire(null, {
27018
27024
  skipMap: !0
27019
27025
  })([k]), !0;
27020
27026
  }
27021
27027
  function v(k) {
27022
- var L, q = k ? k.indexOf("!") : -1;
27023
- return q > -1 && (L = k.substring(0, q), k = k.substring(q + 1, k.length)), [L, k];
27024
- }
27025
- function F(k, L, q, E) {
27026
- var V, G, U, H, K = null, J = L ? L.name : null, W = k, X = !0, Z = "";
27027
- return k || (X = !1, k = "_@r" + (g += 1)), H = v(k), K = H[0], k = H[1], K && (K = b(K, J, E), G = getOwn(p, K)), k && (K ? q ? Z = k : G && G.normalize ? Z = G.normalize(k, function(Q) {
27028
- return b(Q, J, E);
27029
- }) : Z = k.indexOf("!") === -1 ? b(k, J, E) : k : (Z = b(k, J, E), H = v(Z), K = H[0], Z = H[1], q = !0, V = n.nameToUrl(Z))), U = K && !G && !q ? "_unnormalized" + (f += 1) : "", {
27028
+ var O, q = k ? k.indexOf("!") : -1;
27029
+ return q > -1 && (O = k.substring(0, q), k = k.substring(q + 1, k.length)), [O, k];
27030
+ }
27031
+ function F(k, O, q, V) {
27032
+ var E, G, U, H, K = null, X = O ? O.name : null, W = k, J = !0, Z = "";
27033
+ return k || (J = !1, k = "_@r" + (g += 1)), H = v(k), K = H[0], k = H[1], K && (K = b(K, X, V), G = getOwn(p, K)), k && (K ? q ? Z = k : G && G.normalize ? Z = G.normalize(k, function(Q) {
27034
+ return b(Q, X, V);
27035
+ }) : Z = k.indexOf("!") === -1 ? b(k, X, V) : k : (Z = b(k, X, V), H = v(Z), K = H[0], Z = H[1], q = !0, E = n.nameToUrl(Z))), U = K && !G && !q ? "_unnormalized" + (f += 1) : "", {
27030
27036
  prefix: K,
27031
27037
  name: Z,
27032
- parentMap: L,
27038
+ parentMap: O,
27033
27039
  unnormalized: !!U,
27034
- url: V,
27040
+ url: E,
27035
27041
  originalName: W,
27036
- isDefine: X,
27042
+ isDefine: J,
27037
27043
  id: (K ? K + "!" + Z : Z) + U
27038
27044
  };
27039
27045
  }
27040
27046
  function I(k) {
27041
- var L = k.id, q = getOwn(l, L);
27042
- return q || (q = l[L] = new n.Module(k)), q;
27047
+ var O = k.id, q = getOwn(l, O);
27048
+ return q || (q = l[O] = new n.Module(k)), q;
27043
27049
  }
27044
- function R(k, L, q) {
27045
- var E = k.id, V = getOwn(l, E);
27046
- hasProp(p, E) && (!V || V.defineEmitComplete) ? L === "defined" && q(p[E]) : (V = I(k), V.error && L === "error" ? q(V.error) : V.on(L, q));
27050
+ function R(k, O, q) {
27051
+ var V = k.id, E = getOwn(l, V);
27052
+ hasProp(p, V) && (!E || E.defineEmitComplete) ? O === "defined" && q(p[V]) : (E = I(k), E.error && O === "error" ? q(E.error) : E.on(O, q));
27047
27053
  }
27048
- function T(k, L) {
27049
- var q = k.requireModules, E = !1;
27050
- L ? L(k) : (each(q, function(V) {
27051
- var G = getOwn(l, V);
27052
- G && (G.error = k, G.events.error && (E = !0, G.emit("error", k)));
27053
- }), E || req.onError(k));
27054
+ function T(k, O) {
27055
+ var q = k.requireModules, V = !1;
27056
+ O ? O(k) : (each(q, function(E) {
27057
+ var G = getOwn(l, E);
27058
+ G && (G.error = k, G.events.error && (V = !0, G.emit("error", k)));
27059
+ }), V || req.onError(k));
27054
27060
  }
27055
27061
  function D() {
27056
27062
  globalDefQueue.length && (each(globalDefQueue, function(k) {
27057
- var L = k[0];
27058
- typeof L == "string" && (n.defQueueMap[L] = !0), d.push(k);
27063
+ var O = k[0];
27064
+ typeof O == "string" && (n.defQueueMap[O] = !0), d.push(k);
27059
27065
  }), globalDefQueue = []);
27060
27066
  }
27061
27067
  r = {
@@ -27080,29 +27086,29 @@ https://requirejs.org/docs/errors.html#` + e);
27080
27086
  function $(k) {
27081
27087
  delete l[k], delete c[k];
27082
27088
  }
27083
- function B(k, L, q) {
27084
- var E = k.map.id;
27085
- k.error ? k.emit("error", k.error) : (L[E] = !0, each(k.depMaps, function(V, G) {
27086
- var U = V.id, H = getOwn(l, U);
27087
- H && !k.depMatched[G] && !q[U] && (getOwn(L, U) ? (k.defineDep(G, p[U]), k.check()) : B(H, L, q));
27088
- }), q[E] = !0);
27089
+ function B(k, O, q) {
27090
+ var V = k.map.id;
27091
+ k.error ? k.emit("error", k.error) : (O[V] = !0, each(k.depMaps, function(E, G) {
27092
+ var U = E.id, H = getOwn(l, U);
27093
+ H && !k.depMatched[G] && !q[U] && (getOwn(O, U) ? (k.defineDep(G, p[U]), k.check()) : B(H, O, q));
27094
+ }), q[V] = !0);
27089
27095
  }
27090
27096
  function N() {
27091
- var k, L, q = i.waitSeconds * 1e3, E = q && n.startTime + q < (/* @__PURE__ */ new Date()).getTime(), V = [], G = [], U = !1, H = !0;
27097
+ var k, O, q = i.waitSeconds * 1e3, V = q && n.startTime + q < (/* @__PURE__ */ new Date()).getTime(), E = [], G = [], U = !1, H = !0;
27092
27098
  if (!t) {
27093
27099
  if (t = !0, eachProp(c, function(K) {
27094
- var J = K.map, W = J.id;
27095
- if (K.enabled && (J.isDefine || G.push(K), !K.error)) {
27096
- if (!K.inited && E)
27097
- S(W) ? (L = !0, U = !0) : (V.push(W), y(W));
27098
- else if (!K.inited && K.fetched && J.isDefine && (U = !0, !J.prefix))
27100
+ var X = K.map, W = X.id;
27101
+ if (K.enabled && (X.isDefine || G.push(K), !K.error)) {
27102
+ if (!K.inited && V)
27103
+ S(W) ? (O = !0, U = !0) : (E.push(W), y(W));
27104
+ else if (!K.inited && K.fetched && X.isDefine && (U = !0, !X.prefix))
27099
27105
  return H = !1;
27100
27106
  }
27101
- }), E && V.length)
27102
- return k = makeError("timeout", "Load timeout for modules: " + V, null, V), k.contextName = n.contextName, T(k);
27107
+ }), V && E.length)
27108
+ return k = makeError("timeout", "Load timeout for modules: " + E, null, E), k.contextName = n.contextName, T(k);
27103
27109
  H && each(G, function(K) {
27104
27110
  B(K, {}, {});
27105
- }), (!E || L) && U && (isBrowser || isWebWorker) && !a && (a = setTimeout(function() {
27111
+ }), (!V || O) && U && (isBrowser || isWebWorker) && !a && (a = setTimeout(function() {
27106
27112
  a = 0, N();
27107
27113
  }, 50)), t = !1;
27108
27114
  }
@@ -27110,13 +27116,13 @@ https://requirejs.org/docs/errors.html#` + e);
27110
27116
  o = function(k) {
27111
27117
  this.events = getOwn(u, k.id) || {}, this.map = k, this.shim = getOwn(i.shim, k.id), this.depExports = [], this.depMaps = [], this.depMatched = [], this.pluginMaps = {}, this.depCount = 0;
27112
27118
  }, o.prototype = {
27113
- init: function(k, L, q, E) {
27114
- E = E || {}, !this.inited && (this.factory = L, q ? this.on("error", q) : this.events.error && (q = bind(this, function(V) {
27115
- this.emit("error", V);
27116
- })), this.depMaps = k && k.slice(0), this.errback = q, this.inited = !0, this.ignore = E.ignore, E.enabled || this.enabled ? this.enable() : this.check());
27119
+ init: function(k, O, q, V) {
27120
+ V = V || {}, !this.inited && (this.factory = O, q ? this.on("error", q) : this.events.error && (q = bind(this, function(E) {
27121
+ this.emit("error", E);
27122
+ })), this.depMaps = k && k.slice(0), this.errback = q, this.inited = !0, this.ignore = V.ignore, V.enabled || this.enabled ? this.enable() : this.check());
27117
27123
  },
27118
- defineDep: function(k, L) {
27119
- this.depMatched[k] || (this.depMatched[k] = !0, this.depCount -= 1, this.depExports[k] = L);
27124
+ defineDep: function(k, O) {
27125
+ this.depMatched[k] || (this.depMatched[k] = !0, this.depCount -= 1, this.depExports[k] = O);
27120
27126
  },
27121
27127
  fetch: function() {
27122
27128
  if (!this.fetched) {
@@ -27142,7 +27148,7 @@ https://requirejs.org/docs/errors.html#` + e);
27142
27148
  */
27143
27149
  check: function() {
27144
27150
  if (!(!this.enabled || this.enabling)) {
27145
- var k, L, q = this.map.id, E = this.depExports, V = this.exports, G = this.factory;
27151
+ var k, O, q = this.map.id, V = this.depExports, E = this.exports, G = this.factory;
27146
27152
  if (!this.inited)
27147
27153
  hasProp(n.defQueueMap, q) || this.fetch();
27148
27154
  else if (this.error)
@@ -27152,17 +27158,17 @@ https://requirejs.org/docs/errors.html#` + e);
27152
27158
  if (isFunction(G)) {
27153
27159
  if (this.events.error && this.map.isDefine || req.onError !== defaultOnError)
27154
27160
  try {
27155
- V = n.execCb(q, G, E, V);
27161
+ E = n.execCb(q, G, V, E);
27156
27162
  } catch (H) {
27157
27163
  k = H;
27158
27164
  }
27159
27165
  else
27160
- V = n.execCb(q, G, E, V);
27161
- if (this.map.isDefine && V === void 0 && (L = this.module, L ? V = L.exports : this.usingExports && (V = this.exports)), k)
27166
+ E = n.execCb(q, G, V, E);
27167
+ if (this.map.isDefine && E === void 0 && (O = this.module, O ? E = O.exports : this.usingExports && (E = this.exports)), k)
27162
27168
  return k.requireMap = this.map, k.requireModules = this.map.isDefine ? [this.map.id] : null, k.requireType = this.map.isDefine ? "define" : "require", T(this.error = k);
27163
27169
  } else
27164
- V = G;
27165
- if (this.exports = V, this.map.isDefine && !this.ignore && (p[q] = V, req.onResourceLoad)) {
27170
+ E = G;
27171
+ if (this.exports = E, this.map.isDefine && !this.ignore && (p[q] = E, req.onResourceLoad)) {
27166
27172
  var U = [];
27167
27173
  each(this.depMaps, function(H) {
27168
27174
  U.push(H.normalizedMap || H);
@@ -27175,14 +27181,14 @@ https://requirejs.org/docs/errors.html#` + e);
27175
27181
  }
27176
27182
  },
27177
27183
  callPlugin: function() {
27178
- var k = this.map, L = k.id, q = F(k.prefix);
27179
- this.depMaps.push(q), R(q, "defined", bind(this, function(E) {
27180
- var V, G, U, H = getOwn(h, this.map.id), K = this.map.name, J = this.map.parentMap ? this.map.parentMap.name : null, W = n.makeRequire(k.parentMap, {
27184
+ var k = this.map, O = k.id, q = F(k.prefix);
27185
+ this.depMaps.push(q), R(q, "defined", bind(this, function(V) {
27186
+ var E, G, U, H = getOwn(h, this.map.id), K = this.map.name, X = this.map.parentMap ? this.map.parentMap.name : null, W = n.makeRequire(k.parentMap, {
27181
27187
  enableBuildCallback: !0
27182
27188
  });
27183
27189
  if (this.map.unnormalized) {
27184
- E.normalize && (K = E.normalize(K, function(X) {
27185
- return b(X, J, !0);
27190
+ V.normalize && (K = V.normalize(K, function(J) {
27191
+ return b(J, X, !0);
27186
27192
  }) || ""), G = F(
27187
27193
  k.prefix + "!" + K,
27188
27194
  this.map.parentMap,
@@ -27190,16 +27196,16 @@ https://requirejs.org/docs/errors.html#` + e);
27190
27196
  ), R(
27191
27197
  G,
27192
27198
  "defined",
27193
- bind(this, function(X) {
27199
+ bind(this, function(J) {
27194
27200
  this.map.normalizedMap = G, this.init([], function() {
27195
- return X;
27201
+ return J;
27196
27202
  }, null, {
27197
27203
  enabled: !0,
27198
27204
  ignore: !0
27199
27205
  });
27200
27206
  })
27201
- ), U = getOwn(l, G.id), U && (this.depMaps.push(G), this.events.error && U.on("error", bind(this, function(X) {
27202
- this.emit("error", X);
27207
+ ), U = getOwn(l, G.id), U && (this.depMaps.push(G), this.events.error && U.on("error", bind(this, function(J) {
27208
+ this.emit("error", J);
27203
27209
  })), U.enable());
27204
27210
  return;
27205
27211
  }
@@ -27207,79 +27213,79 @@ https://requirejs.org/docs/errors.html#` + e);
27207
27213
  this.map.url = n.nameToUrl(H), this.load();
27208
27214
  return;
27209
27215
  }
27210
- V = bind(this, function(X) {
27216
+ E = bind(this, function(J) {
27211
27217
  this.init([], function() {
27212
- return X;
27218
+ return J;
27213
27219
  }, null, {
27214
27220
  enabled: !0
27215
27221
  });
27216
- }), V.error = bind(this, function(X) {
27217
- this.inited = !0, this.error = X, X.requireModules = [L], eachProp(l, function(Z) {
27218
- Z.map.id.indexOf(L + "_unnormalized") === 0 && $(Z.map.id);
27219
- }), T(X);
27220
- }), V.fromText = bind(this, function(X, Z) {
27222
+ }), E.error = bind(this, function(J) {
27223
+ this.inited = !0, this.error = J, J.requireModules = [O], eachProp(l, function(Z) {
27224
+ Z.map.id.indexOf(O + "_unnormalized") === 0 && $(Z.map.id);
27225
+ }), T(J);
27226
+ }), E.fromText = bind(this, function(J, Z) {
27221
27227
  var Q = k.name, ee = F(Q), oe = useInteractive;
27222
- Z && (X = Z), oe && (useInteractive = !1), I(ee), hasProp(i.config, L) && (i.config[Q] = i.config[L]);
27228
+ Z && (J = Z), oe && (useInteractive = !1), I(ee), hasProp(i.config, O) && (i.config[Q] = i.config[O]);
27223
27229
  try {
27224
- req.exec(X);
27230
+ req.exec(J);
27225
27231
  } catch (re) {
27226
27232
  return T(makeError(
27227
27233
  "fromtexteval",
27228
- "fromText eval for " + L + " failed: " + re,
27234
+ "fromText eval for " + O + " failed: " + re,
27229
27235
  re,
27230
- [L]
27236
+ [O]
27231
27237
  ));
27232
27238
  }
27233
- oe && (useInteractive = !0), this.depMaps.push(ee), n.completeLoad(Q), W([Q], V);
27234
- }), E.load(k.name, W, V, i);
27239
+ oe && (useInteractive = !0), this.depMaps.push(ee), n.completeLoad(Q), W([Q], E);
27240
+ }), V.load(k.name, W, E, i);
27235
27241
  })), n.enable(q, this), this.pluginMaps[q.id] = q;
27236
27242
  },
27237
27243
  enable: function() {
27238
- c[this.map.id] = this, this.enabled = !0, this.enabling = !0, each(this.depMaps, bind(this, function(k, L) {
27239
- var q, E, V;
27244
+ c[this.map.id] = this, this.enabled = !0, this.enabling = !0, each(this.depMaps, bind(this, function(k, O) {
27245
+ var q, V, E;
27240
27246
  if (typeof k == "string") {
27241
27247
  if (k = F(
27242
27248
  k,
27243
27249
  this.map.isDefine ? this.map : this.map.parentMap,
27244
27250
  !1,
27245
27251
  !this.skipMap
27246
- ), this.depMaps[L] = k, V = getOwn(r, k.id), V) {
27247
- this.depExports[L] = V(this);
27252
+ ), this.depMaps[O] = k, E = getOwn(r, k.id), E) {
27253
+ this.depExports[O] = E(this);
27248
27254
  return;
27249
27255
  }
27250
27256
  this.depCount += 1, R(k, "defined", bind(this, function(G) {
27251
- this.undefed || (this.defineDep(L, G), this.check());
27257
+ this.undefed || (this.defineDep(O, G), this.check());
27252
27258
  })), this.errback ? R(k, "error", bind(this, this.errback)) : this.events.error && R(k, "error", bind(this, function(G) {
27253
27259
  this.emit("error", G);
27254
27260
  }));
27255
27261
  }
27256
- q = k.id, E = l[q], !hasProp(r, q) && E && !E.enabled && n.enable(k, this);
27262
+ q = k.id, V = l[q], !hasProp(r, q) && V && !V.enabled && n.enable(k, this);
27257
27263
  })), eachProp(this.pluginMaps, bind(this, function(k) {
27258
- var L = getOwn(l, k.id);
27259
- L && !L.enabled && n.enable(k, this);
27264
+ var O = getOwn(l, k.id);
27265
+ O && !O.enabled && n.enable(k, this);
27260
27266
  })), this.enabling = !1, this.check();
27261
27267
  },
27262
- on: function(k, L) {
27268
+ on: function(k, O) {
27263
27269
  var q = this.events[k];
27264
- q || (q = this.events[k] = []), q.push(L);
27270
+ q || (q = this.events[k] = []), q.push(O);
27265
27271
  },
27266
- emit: function(k, L) {
27272
+ emit: function(k, O) {
27267
27273
  each(this.events[k], function(q) {
27268
- q(L);
27274
+ q(O);
27269
27275
  }), k === "error" && delete this.events[k];
27270
27276
  }
27271
27277
  };
27272
27278
  function j(k) {
27273
27279
  hasProp(p, k[0]) || I(F(k[0], null, !0)).init(k[1], k[2]);
27274
27280
  }
27275
- function w(k, L, q, E) {
27276
- k.detachEvent && !isOpera ? E && k.detachEvent(E, L) : k.removeEventListener(q, L, !1);
27281
+ function w(k, O, q, V) {
27282
+ k.detachEvent && !isOpera ? V && k.detachEvent(V, O) : k.removeEventListener(q, O, !1);
27277
27283
  }
27278
- function O(k) {
27279
- var L = k.currentTarget || k.srcElement;
27280
- return w(L, n.onScriptLoad, "load", "onreadystatechange"), w(L, n.onScriptError, "error"), {
27281
- node: L,
27282
- id: L && L.getAttribute("data-requiremodule")
27284
+ function L(k) {
27285
+ var O = k.currentTarget || k.srcElement;
27286
+ return w(O, n.onScriptLoad, "load", "onreadystatechange"), w(O, n.onScriptError, "error"), {
27287
+ node: O,
27288
+ id: O && O.getAttribute("data-requiremodule")
27283
27289
  };
27284
27290
  }
27285
27291
  function M() {
@@ -27309,47 +27315,47 @@ https://requirejs.org/docs/errors.html#` + e);
27309
27315
  */
27310
27316
  configure: function(k) {
27311
27317
  if (k.baseUrl && k.baseUrl.charAt(k.baseUrl.length - 1) !== "/" && (k.baseUrl += "/"), typeof k.urlArgs == "string") {
27312
- var L = k.urlArgs;
27313
- k.urlArgs = function(V, G) {
27314
- return (G.indexOf("?") === -1 ? "?" : "&") + L;
27318
+ var O = k.urlArgs;
27319
+ k.urlArgs = function(E, G) {
27320
+ return (G.indexOf("?") === -1 ? "?" : "&") + O;
27315
27321
  };
27316
27322
  }
27317
- var q = i.shim, E = {
27323
+ var q = i.shim, V = {
27318
27324
  paths: !0,
27319
27325
  bundles: !0,
27320
27326
  config: !0,
27321
27327
  map: !0
27322
27328
  };
27323
- eachProp(k, function(V, G) {
27324
- E[G] ? (i[G] || (i[G] = {}), mixin(i[G], V, !0, !0)) : i[G] = V;
27325
- }), k.bundles && eachProp(k.bundles, function(V, G) {
27326
- each(V, function(U) {
27329
+ eachProp(k, function(E, G) {
27330
+ V[G] ? (i[G] || (i[G] = {}), mixin(i[G], E, !0, !0)) : i[G] = E;
27331
+ }), k.bundles && eachProp(k.bundles, function(E, G) {
27332
+ each(E, function(U) {
27327
27333
  U !== G && (h[U] = G);
27328
27334
  });
27329
- }), k.shim && (eachProp(k.shim, function(V, G) {
27330
- isArray(V) && (V = {
27331
- deps: V
27332
- }), (V.exports || V.init) && !V.exportsFn && (V.exportsFn = n.makeShimExports(V)), q[G] = V;
27333
- }), i.shim = q), k.packages && each(k.packages, function(V) {
27335
+ }), k.shim && (eachProp(k.shim, function(E, G) {
27336
+ isArray(E) && (E = {
27337
+ deps: E
27338
+ }), (E.exports || E.init) && !E.exportsFn && (E.exportsFn = n.makeShimExports(E)), q[G] = E;
27339
+ }), i.shim = q), k.packages && each(k.packages, function(E) {
27334
27340
  var G, U;
27335
- V = typeof V == "string" ? { name: V } : V, U = V.name, G = V.location, G && (i.paths[U] = V.location), i.pkgs[U] = V.name + "/" + (V.main || "main").replace(currDirRegExp, "").replace(jsSuffixRegExp, "");
27336
- }), eachProp(l, function(V, G) {
27337
- !V.inited && !V.map.unnormalized && (V.map = F(G, null, !0));
27341
+ E = typeof E == "string" ? { name: E } : E, U = E.name, G = E.location, G && (i.paths[U] = E.location), i.pkgs[U] = E.name + "/" + (E.main || "main").replace(currDirRegExp, "").replace(jsSuffixRegExp, "");
27342
+ }), eachProp(l, function(E, G) {
27343
+ !E.inited && !E.map.unnormalized && (E.map = F(G, null, !0));
27338
27344
  }), (k.deps || k.callback) && n.require(k.deps || [], k.callback);
27339
27345
  },
27340
27346
  makeShimExports: function(k) {
27341
- function L() {
27347
+ function O() {
27342
27348
  var q;
27343
27349
  return k.init && (q = k.init.apply(global, arguments)), q || k.exports && getGlobal(k.exports);
27344
27350
  }
27345
- return L;
27351
+ return O;
27346
27352
  },
27347
- makeRequire: function(k, L) {
27348
- L = L || {};
27349
- function q(E, V, G) {
27353
+ makeRequire: function(k, O) {
27354
+ O = O || {};
27355
+ function q(V, E, G) {
27350
27356
  var U, H, K;
27351
- return L.enableBuildCallback && V && isFunction(V) && (V.__requireJsBuild = !0), typeof E == "string" ? isFunction(V) ? T(makeError("requireargs", "Invalid require call"), G) : k && hasProp(r, E) ? r[E](l[k.id]) : req.get ? req.get(n, E, k, q) : (H = F(E, k, !1, !0), U = H.id, hasProp(p, U) ? p[U] : T(makeError("notloaded", 'Module name "' + U + '" has not been loaded yet for context: ' + e + (k ? "" : ". Use require([])")))) : (M(), n.nextTick(function() {
27352
- M(), K = I(F(null, k)), K.skipMap = L.skipMap, K.init(E, V, G, {
27357
+ return O.enableBuildCallback && E && isFunction(E) && (E.__requireJsBuild = !0), typeof V == "string" ? isFunction(E) ? T(makeError("requireargs", "Invalid require call"), G) : k && hasProp(r, V) ? r[V](l[k.id]) : req.get ? req.get(n, V, k, q) : (H = F(V, k, !1, !0), U = H.id, hasProp(p, U) ? p[U] : T(makeError("notloaded", 'Module name "' + U + '" has not been loaded yet for context: ' + e + (k ? "" : ". Use require([])")))) : (M(), n.nextTick(function() {
27358
+ M(), K = I(F(null, k)), K.skipMap = O.skipMap, K.init(V, E, G, {
27353
27359
  enabled: !0
27354
27360
  }), N();
27355
27361
  }), q);
@@ -27361,26 +27367,26 @@ https://requirejs.org/docs/errors.html#` + e);
27361
27367
  * *Requires* the use of a module name. It does not support using
27362
27368
  * plain URLs like nameToUrl.
27363
27369
  */
27364
- toUrl: function(E) {
27365
- var V, G = E.lastIndexOf("."), U = E.split("/")[0], H = U === "." || U === "..";
27366
- return G !== -1 && (!H || G > 1) && (V = E.substring(G, E.length), E = E.substring(0, G)), n.nameToUrl(b(
27367
- E,
27370
+ toUrl: function(V) {
27371
+ var E, G = V.lastIndexOf("."), U = V.split("/")[0], H = U === "." || U === "..";
27372
+ return G !== -1 && (!H || G > 1) && (E = V.substring(G, V.length), V = V.substring(0, G)), n.nameToUrl(b(
27373
+ V,
27368
27374
  k && k.id,
27369
27375
  !0
27370
- ), V, !0);
27376
+ ), E, !0);
27371
27377
  },
27372
- defined: function(E) {
27373
- return hasProp(p, F(E, k, !1, !0).id);
27378
+ defined: function(V) {
27379
+ return hasProp(p, F(V, k, !1, !0).id);
27374
27380
  },
27375
- specified: function(E) {
27376
- return E = F(E, k, !1, !0).id, hasProp(p, E) || hasProp(l, E);
27381
+ specified: function(V) {
27382
+ return V = F(V, k, !1, !0).id, hasProp(p, V) || hasProp(l, V);
27377
27383
  }
27378
- }), k || (q.undef = function(E) {
27384
+ }), k || (q.undef = function(V) {
27379
27385
  D();
27380
- var V = F(E, k, !0), G = getOwn(l, E);
27381
- G.undefed = !0, y(E), delete p[E], delete m[V.url], delete u[E], eachReverse(d, function(U, H) {
27382
- U[0] === E && d.splice(H, 1);
27383
- }), delete n.defQueueMap[E], G && (G.events.defined && (u[E] = G.events), $(E));
27386
+ var E = F(V, k, !0), G = getOwn(l, V);
27387
+ G.undefed = !0, y(V), delete p[V], delete m[E.url], delete u[V], eachReverse(d, function(U, H) {
27388
+ U[0] === V && d.splice(H, 1);
27389
+ }), delete n.defQueueMap[V], G && (G.events.defined && (u[V] = G.events), $(V));
27384
27390
  }), q;
27385
27391
  },
27386
27392
  /**
@@ -27390,8 +27396,8 @@ https://requirejs.org/docs/errors.html#` + e);
27390
27396
  * the optimizer. Not shown here to keep code compact.
27391
27397
  */
27392
27398
  enable: function(k) {
27393
- var L = getOwn(l, k.id);
27394
- L && I(k).enable();
27399
+ var O = getOwn(l, k.id);
27400
+ O && I(k).enable();
27395
27401
  },
27396
27402
  /**
27397
27403
  * Internal method used by environment adapters to complete a load event.
@@ -27400,17 +27406,17 @@ https://requirejs.org/docs/errors.html#` + e);
27400
27406
  * @param {String} moduleName the name of the module to potentially complete.
27401
27407
  */
27402
27408
  completeLoad: function(k) {
27403
- var L, q, E, V = getOwn(i.shim, k) || {}, G = V.exports;
27409
+ var O, q, V, E = getOwn(i.shim, k) || {}, G = E.exports;
27404
27410
  for (D(); d.length; ) {
27405
27411
  if (q = d.shift(), q[0] === null) {
27406
- if (q[0] = k, L)
27412
+ if (q[0] = k, O)
27407
27413
  break;
27408
- L = !0;
27414
+ O = !0;
27409
27415
  } else
27410
- q[0] === k && (L = !0);
27416
+ q[0] === k && (O = !0);
27411
27417
  j(q);
27412
27418
  }
27413
- if (n.defQueueMap = {}, E = getOwn(l, k), !L && !hasProp(p, k) && E && !E.inited) {
27419
+ if (n.defQueueMap = {}, V = getOwn(l, k), !O && !hasProp(p, k) && V && !V.inited) {
27414
27420
  if (i.enforceDefine && (!G || !getGlobal(G)))
27415
27421
  return S(k) ? void 0 : T(makeError(
27416
27422
  "nodefine",
@@ -27418,7 +27424,7 @@ https://requirejs.org/docs/errors.html#` + e);
27418
27424
  null,
27419
27425
  [k]
27420
27426
  ));
27421
- j([k, V.deps || [], V.exportsFn]);
27427
+ j([k, E.deps || [], E.exportsFn]);
27422
27428
  }
27423
27429
  N();
27424
27430
  },
@@ -27429,26 +27435,26 @@ https://requirejs.org/docs/errors.html#` + e);
27429
27435
  * it is assumed to have already been normalized. This is an
27430
27436
  * internal API, not a public one. Use toUrl for the public API.
27431
27437
  */
27432
- nameToUrl: function(k, L, q) {
27433
- var E, V, G, U, H, K, J, W = getOwn(i.pkgs, k);
27434
- if (W && (k = W), J = getOwn(h, k), J)
27435
- return n.nameToUrl(J, L, q);
27438
+ nameToUrl: function(k, O, q) {
27439
+ var V, E, G, U, H, K, X, W = getOwn(i.pkgs, k);
27440
+ if (W && (k = W), X = getOwn(h, k), X)
27441
+ return n.nameToUrl(X, O, q);
27436
27442
  if (req.jsExtRegExp.test(k))
27437
- H = k + (L || "");
27443
+ H = k + (O || "");
27438
27444
  else {
27439
- for (E = i.paths, V = k.split("/"), G = V.length; G > 0; G -= 1)
27440
- if (U = V.slice(0, G).join("/"), K = getOwn(E, U), K) {
27441
- isArray(K) && (K = K[0]), V.splice(0, G, K);
27445
+ for (V = i.paths, E = k.split("/"), G = E.length; G > 0; G -= 1)
27446
+ if (U = E.slice(0, G).join("/"), K = getOwn(V, U), K) {
27447
+ isArray(K) && (K = K[0]), E.splice(0, G, K);
27442
27448
  break;
27443
27449
  }
27444
- H = V.join("/"), H += L || (/^data\:|^blob\:|\?/.test(H) || q ? "" : ".js"), H = (H.charAt(0) === "/" || H.match(/^[\w\+\.\-]+:/) ? "" : i.baseUrl) + H;
27450
+ H = E.join("/"), H += O || (/^data\:|^blob\:|\?/.test(H) || q ? "" : ".js"), H = (H.charAt(0) === "/" || H.match(/^[\w\+\.\-]+:/) ? "" : i.baseUrl) + H;
27445
27451
  }
27446
27452
  return i.urlArgs && !/^blob\:/.test(H) ? H + i.urlArgs(k, H) : H;
27447
27453
  },
27448
27454
  //Delegates to req.load. Broken out as a separate function to
27449
27455
  //allow overriding in the optimizer.
27450
- load: function(k, L) {
27451
- req.load(n, k, L);
27456
+ load: function(k, O) {
27457
+ req.load(n, k, O);
27452
27458
  },
27453
27459
  /**
27454
27460
  * Executes a module callback function. Broken out as a separate function
@@ -27457,8 +27463,8 @@ https://requirejs.org/docs/errors.html#` + e);
27457
27463
  *
27458
27464
  * @private
27459
27465
  */
27460
- execCb: function(k, L, q, E) {
27461
- return L.apply(E, q);
27466
+ execCb: function(k, O, q, V) {
27467
+ return O.apply(V, q);
27462
27468
  },
27463
27469
  /**
27464
27470
  * callback for script loads, used to check status of loading.
@@ -27469,23 +27475,23 @@ https://requirejs.org/docs/errors.html#` + e);
27469
27475
  onScriptLoad: function(k) {
27470
27476
  if (k.type === "load" || readyRegExp.test((k.currentTarget || k.srcElement).readyState)) {
27471
27477
  interactiveScript = null;
27472
- var L = O(k);
27473
- n.completeLoad(L.id);
27478
+ var O = L(k);
27479
+ n.completeLoad(O.id);
27474
27480
  }
27475
27481
  },
27476
27482
  /**
27477
27483
  * Callback for script errors.
27478
27484
  */
27479
27485
  onScriptError: function(k) {
27480
- var L = O(k);
27481
- if (!S(L.id)) {
27486
+ var O = L(k);
27487
+ if (!S(O.id)) {
27482
27488
  var q = [];
27483
- return eachProp(l, function(E, V) {
27484
- V.indexOf("_@r") !== 0 && each(E.depMaps, function(G) {
27485
- if (G.id === L.id)
27486
- return q.push(V), !0;
27489
+ return eachProp(l, function(V, E) {
27490
+ E.indexOf("_@r") !== 0 && each(V.depMaps, function(G) {
27491
+ if (G.id === O.id)
27492
+ return q.push(E), !0;
27487
27493
  });
27488
- }), T(makeError("scripterror", 'Script error for "' + L.id + (q.length ? '", needed by: ' + q.join(", ") : '"'), k, [L.id]));
27494
+ }), T(makeError("scripterror", 'Script error for "' + O.id + (q.length ? '", needed by: ' + q.join(", ") : '"'), k, [O.id]));
27489
27495
  }
27490
27496
  }
27491
27497
  }, n.require = n.makeRequire(), n;
@@ -29340,8 +29346,8 @@ const useCreateActionProps = () => {
29340
29346
  return {
29341
29347
  onClick() {
29342
29348
  return z(this, null, function* () {
29343
- var O, M;
29344
- const { onSuccess: I, skipValidator: R, triggerWorkflows: T } = (O = u == null ? void 0 : u["x-action-settings"]) != null ? O : {}, {
29349
+ var L, M;
29350
+ const { onSuccess: I, skipValidator: R, triggerWorkflows: T } = (L = u == null ? void 0 : u["x-action-settings"]) != null ? L : {}, {
29345
29351
  manualClose: D,
29346
29352
  redirecting: $,
29347
29353
  redirectTo: B,
@@ -29360,20 +29366,20 @@ const useCreateActionProps = () => {
29360
29366
  triggerWorkflows: T != null && T.length ? T.map((q) => [q.workflowKey, q.context].filter(Boolean).join("!")).join(",") : void 0,
29361
29367
  updateAssociationValues: g
29362
29368
  });
29363
- let L = B;
29364
- if (B && (L = yield getVariableValue(B, {
29369
+ let O = B;
29370
+ if (B && (O = yield getVariableValue(B, {
29365
29371
  variables: S,
29366
29372
  localVariables: [...y, { name: "$record", ctx: new Proxy((M = k == null ? void 0 : k.data) == null ? void 0 : M.data, {}) }]
29367
29373
  })), (j === "previous" || !j && $ !== !0) && (a == null || a(!1)), i == null || i(!0), l == null || l(!1), d.data.loading = !1, d.data.data = k, !N) {
29368
- message.success(h("Saved successfully")), yield resetFormCorrectly(o), ($ && !j || j === "redirect") && L && (isURL(L) ? window.location.href = L : c(L));
29374
+ message.success(h("Saved successfully")), yield resetFormCorrectly(o), ($ && !j || j === "redirect") && O && (isURL(O) ? window.location.href = O : c(O));
29369
29375
  return;
29370
29376
  }
29371
29377
  D ? m.success({
29372
29378
  title: p(N),
29373
29379
  onOk: () => z(this, null, function* () {
29374
- yield resetFormCorrectly(o), ($ && !j || j === "redirect") && L && (isURL(L) ? window.location.href = L : c(L));
29380
+ yield resetFormCorrectly(o), ($ && !j || j === "redirect") && O && (isURL(O) ? window.location.href = O : c(O));
29375
29381
  })
29376
- }) : (message.success(p(N)), yield resetFormCorrectly(o), ($ && !j || j === "redirect") && L && (isURL(L) ? window.location.href = L : c(L)));
29382
+ }) : (message.success(p(N)), yield resetFormCorrectly(o), ($ && !j || j === "redirect") && O && (isURL(O) ? window.location.href = O : c(O)));
29377
29383
  } catch (k) {
29378
29384
  d.data.loading = !1;
29379
29385
  }
@@ -29386,20 +29392,20 @@ const useCreateActionProps = () => {
29386
29392
  return {
29387
29393
  onClick() {
29388
29394
  return z(this, null, function* () {
29389
- var L, q, E, V, G, U;
29395
+ var O, q, V, E, G, U;
29390
29396
  const R = u.map((H) => H.name), {
29391
29397
  assignedValues: T = {},
29392
29398
  onSuccess: D,
29393
29399
  overwriteValues: $,
29394
29400
  skipValidator: B,
29395
29401
  triggerWorkflows: N
29396
- } = (L = l == null ? void 0 : l["x-action-settings"]) != null ? L : {}, j = (q = a == null ? void 0 : a["x-component-props"]) == null ? void 0 : q.addChild, { successMessage: w } = D || {}, O = {}, M = Object.keys(T).map((H) => z(this, null, function* () {
29397
- const K = T[H], J = d(H);
29402
+ } = (O = l == null ? void 0 : l["x-action-settings"]) != null ? O : {}, j = (q = a == null ? void 0 : a["x-component-props"]) == null ? void 0 : q.addChild, { successMessage: w } = D || {}, L = {}, M = Object.keys(T).map((H) => z(this, null, function* () {
29403
+ const K = T[H], X = d(H);
29398
29404
  if (isVariable$1(K)) {
29399
29405
  const { value: W } = (yield C == null ? void 0 : C.parseVariable(K, b)) || {};
29400
- O[H] = transformVariableValue(W, { targetCollectionField: J });
29406
+ L[H] = transformVariableValue(W, { targetCollectionField: X });
29401
29407
  } else
29402
- K !== "" && (O[H] = K);
29408
+ K !== "" && (L[H] = K);
29403
29409
  }));
29404
29410
  yield Promise.all(M), B || (yield e.submit());
29405
29411
  const k = getFormValues({
@@ -29413,12 +29419,12 @@ const useCreateActionProps = () => {
29413
29419
  });
29414
29420
  if (j) {
29415
29421
  const H = p();
29416
- k[(E = H == null ? void 0 : H.name) != null ? E : "parent"] = f, k[(V = H == null ? void 0 : H.foreignKey) != null ? V : "parentId"] = f.id;
29422
+ k[(V = H == null ? void 0 : H.name) != null ? V : "parent"] = f, k[(E = H == null ? void 0 : H.foreignKey) != null ? E : "parentId"] = f.id;
29417
29423
  }
29418
29424
  c.data = t.data || {}, c.data.loading = !0;
29419
29425
  try {
29420
29426
  const H = yield o[S]({
29421
- values: x(x(x({}, k), $), O),
29427
+ values: x(x(x({}, k), $), L),
29422
29428
  filterKeys: v,
29423
29429
  // TODO(refactor): should change to inject by plugin
29424
29430
  triggerWorkflows: N != null && N.length ? N.map((K) => [K.workflowKey, K.context].filter(Boolean).join("!")).join(",") : void 0
@@ -29530,7 +29536,7 @@ const useCreateActionProps = () => {
29530
29536
  return {
29531
29537
  onClick(f, C) {
29532
29538
  return z(this, null, function* () {
29533
- var w, O, M, k;
29539
+ var w, L, M, k;
29534
29540
  const {
29535
29541
  assignedValues: b = {},
29536
29542
  onSuccess: y,
@@ -29542,25 +29548,25 @@ const useCreateActionProps = () => {
29542
29548
  redirectTo: R,
29543
29549
  successMessage: T,
29544
29550
  actionAfterSuccess: D
29545
- } = y || {}, $ = {}, B = Object.keys(b).map((L) => z(this, null, function* () {
29546
- const q = b[L], E = m(L);
29551
+ } = y || {}, $ = {}, B = Object.keys(b).map((O) => z(this, null, function* () {
29552
+ const q = b[O], V = m(O);
29547
29553
  if (isVariable$1(q)) {
29548
- const { value: V } = (yield u == null ? void 0 : u.parseVariable(q, d)) || {};
29549
- $[L] = transformVariableValue(V, { targetCollectionField: E });
29554
+ const { value: E } = (yield u == null ? void 0 : u.parseVariable(q, d)) || {};
29555
+ $[O] = transformVariableValue(E, { targetCollectionField: V });
29550
29556
  } else
29551
- q !== "" && ($[L] = q);
29557
+ q !== "" && ($[O] = q);
29552
29558
  }));
29553
29559
  yield Promise.all(B), S === !1 && (yield l.submit());
29554
29560
  const N = yield e.update({
29555
29561
  filterByTk: n,
29556
29562
  values: x({}, $),
29557
29563
  // TODO(refactor): should change to inject by plugin
29558
- triggerWorkflows: v != null && v.length ? v.map((L) => [L.workflowKey, L.context].filter(Boolean).join("!")).join(",") : void 0
29564
+ triggerWorkflows: v != null && v.length ? v.map((O) => [O.workflowKey, O.context].filter(Boolean).join("!")).join(",") : void 0
29559
29565
  });
29560
29566
  let j = R;
29561
29567
  R && (j = yield getVariableValue(R, {
29562
29568
  variables: u,
29563
- localVariables: [...d, { name: "$record", ctx: new Proxy((O = N == null ? void 0 : N.data) == null ? void 0 : O.data, {}) }]
29569
+ localVariables: [...d, { name: "$record", ctx: new Proxy((L = N == null ? void 0 : N.data) == null ? void 0 : L.data, {}) }]
29564
29570
  })), (D === "previous" || !D && I !== !0) && (h == null || h(!1)), C && (C == null || C()), e instanceof TableFieldResource || (k = (M = t == null ? void 0 : t.service) == null ? void 0 : M.refresh) == null || k.call(M), T && (F ? c.success({
29565
29571
  title: i(T),
29566
29572
  onOk: () => z(this, null, function* () {
@@ -29578,30 +29584,30 @@ const useCreateActionProps = () => {
29578
29584
  return {
29579
29585
  onClick() {
29580
29586
  return z(this, null, function* () {
29581
- var L;
29587
+ var O;
29582
29588
  const {
29583
29589
  assignedValues: T = {},
29584
29590
  onSuccess: D,
29585
29591
  updateMode: $
29586
- } = (L = a == null ? void 0 : a["x-action-settings"]) != null ? L : {}, { manualClose: B, redirecting: N, redirectTo: j, successMessage: w, actionAfterSuccess: O } = D || {};
29592
+ } = (O = a == null ? void 0 : a["x-action-settings"]) != null ? O : {}, { manualClose: B, redirecting: N, redirectTo: j, successMessage: w, actionAfterSuccess: L } = D || {};
29587
29593
  m.data = e.data || {}, m.data.loading = !0;
29588
- const M = {}, k = Object.keys(T).map((E) => z(this, null, function* () {
29589
- const V = T[E], G = C(E);
29590
- if (isVariable$1(V)) {
29591
- const { value: U } = (yield g == null ? void 0 : g.parseVariable(V, b)) || {};
29592
- M[E] = transformVariableValue(U, { targetCollectionField: G });
29594
+ const M = {}, k = Object.keys(T).map((V) => z(this, null, function* () {
29595
+ const E = T[V], G = C(V);
29596
+ if (isVariable$1(E)) {
29597
+ const { value: U } = (yield g == null ? void 0 : g.parseVariable(E, b)) || {};
29598
+ M[V] = transformVariableValue(U, { targetCollectionField: G });
29593
29599
  } else
29594
- V !== "" && (M[E] = V);
29600
+ E !== "" && (M[V] = E);
29595
29601
  }));
29596
- yield Promise.all(k), (O === "previous" || !O && N !== !0) && (y == null || y(!1)), h.confirm({
29602
+ yield Promise.all(k), (L === "previous" || !L && N !== !0) && (y == null || y(!1)), h.confirm({
29597
29603
  title: p("Bulk update"),
29598
29604
  content: p($ === "selected" ? "Update selected data?" : "Update all data?"),
29599
29605
  onOk() {
29600
29606
  return z(this, null, function* () {
29601
29607
  var G, U, H, K;
29602
- const { filter: E } = (U = (G = n.params) == null ? void 0 : G[0]) != null ? U : {}, V = {
29608
+ const { filter: V } = (U = (G = n.params) == null ? void 0 : G[0]) != null ? U : {}, E = {
29603
29609
  values: x({}, M),
29604
- filter: E,
29610
+ filter: V,
29605
29611
  forceUpdate: !1
29606
29612
  };
29607
29613
  if ($ === "selected") {
@@ -29609,21 +29615,21 @@ const useCreateActionProps = () => {
29609
29615
  message.error(p("Please select the records to be updated")), m.data.loading = !1;
29610
29616
  return;
29611
29617
  }
29612
- V.filter = { $and: [{ [l || "id"]: { $in: c } }] };
29618
+ E.filter = { $and: [{ [l || "id"]: { $in: c } }] };
29613
29619
  }
29614
- V.filter || (V.forceUpdate = !0);
29620
+ E.filter || (E.forceUpdate = !0);
29615
29621
  try {
29616
- yield t.update(V);
29617
- } catch (J) {
29622
+ yield t.update(E);
29623
+ } catch (X) {
29618
29624
  } finally {
29619
29625
  m.data.loading = !1;
29620
29626
  }
29621
29627
  t instanceof TableFieldResource || (K = (H = o == null ? void 0 : o.service) == null ? void 0 : H.refresh) == null || K.call(H), w && (B ? h.success({
29622
29628
  title: d(w),
29623
29629
  onOk: () => z(this, null, function* () {
29624
- (N && !O || O === "redirect") && j && (isURL(j) ? window.location.href = j : u(j));
29630
+ (N && !L || L === "redirect") && j && (isURL(j) ? window.location.href = j : u(j));
29625
29631
  })
29626
- }) : (message.success(d(w)), (N && !O || O === "redirect") && j && (isURL(j) ? window.location.href = j : u(j))));
29632
+ }) : (message.success(d(w)), (N && !L || L === "redirect") && j && (isURL(j) ? window.location.href = j : u(j))));
29627
29633
  });
29628
29634
  },
29629
29635
  onCancel() {
@@ -29641,14 +29647,14 @@ const useCreateActionProps = () => {
29641
29647
  return {
29642
29648
  onClick() {
29643
29649
  return z(this, null, function* () {
29644
- var E, V, G, U;
29645
- const { skipValidator: I, onSuccess: R, requestSettings: T } = (E = n == null ? void 0 : n["x-action-settings"]) != null ? E : {}, { manualClose: D, redirecting: $, redirectTo: B, successMessage: N, actionAfterSuccess: j } = R || {}, w = n == null ? void 0 : n["x-action"];
29650
+ var V, E, G, U;
29651
+ const { skipValidator: I, onSuccess: R, requestSettings: T } = (V = n == null ? void 0 : n["x-action-settings"]) != null ? V : {}, { manualClose: D, redirecting: $, redirectTo: B, successMessage: N, actionAfterSuccess: j } = R || {}, w = n == null ? void 0 : n["x-action"];
29646
29652
  if (!T.url)
29647
29653
  return;
29648
29654
  I !== !0 && w === "customize:form:request" && (yield a.submit());
29649
- const O = T.headers ? JSON.parse(T.headers) : {}, M = T.params ? JSON.parse(T.params) : {}, k = T.data ? JSON.parse(T.data) : {};
29655
+ const L = T.headers ? JSON.parse(T.headers) : {}, M = T.params ? JSON.parse(T.params) : {}, k = T.data ? JSON.parse(T.data) : {};
29650
29656
  if (w === "customize:form:request" && ["POST", "PUT", "PATCH"].includes(T.method)) {
29651
- const H = i.map((J) => J.name), K = getFormValues({
29657
+ const H = i.map((X) => X.name), K = getFormValues({
29652
29658
  filterByTk: o,
29653
29659
  field: c,
29654
29660
  form: a,
@@ -29662,13 +29668,13 @@ const useCreateActionProps = () => {
29662
29668
  const q = {
29663
29669
  url: renderTemplate(T.url, { currentRecord: m, currentUser: g }),
29664
29670
  method: T.method,
29665
- headers: parse(O)({ currentRecord: m, currentUser: g }),
29671
+ headers: parse(L)({ currentRecord: m, currentUser: g }),
29666
29672
  params: parse(M)({ currentRecord: m, currentUser: g }),
29667
29673
  data: parse(k)({ currentRecord: m, currentUser: g })
29668
29674
  };
29669
29675
  f.data = c.data || {}, f.data.loading = !0;
29670
29676
  try {
29671
- yield e.request(x({}, q)), f.data.loading = !1, u instanceof TableFieldResource || (G = (V = d == null ? void 0 : d.service) == null ? void 0 : V.refresh) == null || G.call(V), (U = p == null ? void 0 : p.refresh) == null || U.call(p), w === "customize:form:request" && (j === "previous" || !j && $ !== !0) && (b == null || b(!1)), N || (message.success(C("Saved successfully")), yield resetFormCorrectly(a), ($ && !j || j === "redirect") && B && (isURL(B) ? window.location.href = B : t(B))), D ? y.success({
29677
+ yield e.request(x({}, q)), f.data.loading = !1, u instanceof TableFieldResource || (G = (E = d == null ? void 0 : d.service) == null ? void 0 : E.refresh) == null || G.call(E), (U = p == null ? void 0 : p.refresh) == null || U.call(p), w === "customize:form:request" && (j === "previous" || !j && $ !== !0) && (b == null || b(!1)), N || (message.success(C("Saved successfully")), yield resetFormCorrectly(a), ($ && !j || j === "redirect") && B && (isURL(B) ? window.location.href = B : t(B))), D ? y.success({
29672
29678
  title: r(N),
29673
29679
  onOk: () => z(this, null, function* () {
29674
29680
  ($ && !j || j === "redirect") && B && (isURL(B) ? window.location.href = B : t(B));
@@ -29685,29 +29691,29 @@ const useCreateActionProps = () => {
29685
29691
  return {
29686
29692
  onClick(F, I) {
29687
29693
  return z(this, null, function* () {
29688
- var V, G;
29694
+ var E, G;
29689
29695
  const {
29690
29696
  assignedValues: R = {},
29691
29697
  onSuccess: T,
29692
29698
  overwriteValues: D,
29693
29699
  skipValidator: $,
29694
29700
  triggerWorkflows: B
29695
- } = (V = l == null ? void 0 : l["x-action-settings"]) != null ? V : {}, {
29701
+ } = (E = l == null ? void 0 : l["x-action-settings"]) != null ? E : {}, {
29696
29702
  manualClose: N,
29697
29703
  redirecting: j,
29698
29704
  redirectTo: w,
29699
- successMessage: O,
29705
+ successMessage: L,
29700
29706
  actionAfterSuccess: M
29701
- } = T || {}, k = {}, L = Object.keys(R).map((U) => z(this, null, function* () {
29707
+ } = T || {}, k = {}, O = Object.keys(R).map((U) => z(this, null, function* () {
29702
29708
  const H = R[U], K = d(U);
29703
29709
  if (isVariable$1(H)) {
29704
- const { value: J } = (yield b == null ? void 0 : b.parseVariable(H, y)) || {};
29705
- k[U] = transformVariableValue(J, { targetCollectionField: K });
29710
+ const { value: X } = (yield b == null ? void 0 : b.parseVariable(H, y)) || {};
29711
+ k[U] = transformVariableValue(X, { targetCollectionField: K });
29706
29712
  } else
29707
29713
  H !== "" && (k[U] = H);
29708
29714
  }));
29709
- yield Promise.all(L), $ || (yield e.submit());
29710
- const q = u.map((U) => U.name), E = getFormValues({
29715
+ yield Promise.all(O), $ || (yield e.submit());
29716
+ const q = u.map((U) => U.name), V = getFormValues({
29711
29717
  filterByTk: t,
29712
29718
  field: o,
29713
29719
  form: e,
@@ -29720,7 +29726,7 @@ const useCreateActionProps = () => {
29720
29726
  try {
29721
29727
  const U = yield n.update(P(x({
29722
29728
  filterByTk: t,
29723
- values: x(x(x({}, E), D), k)
29729
+ values: x(x(x({}, V), D), k)
29724
29730
  }, C), {
29725
29731
  updateAssociationValues: g,
29726
29732
  // TODO(refactor): should change to inject by plugin
@@ -29731,14 +29737,14 @@ const useCreateActionProps = () => {
29731
29737
  if (w && (H = yield getVariableValue(w, {
29732
29738
  variables: b,
29733
29739
  localVariables: [...y, { name: "$record", ctx: new Proxy((G = U == null ? void 0 : U.data) == null ? void 0 : G.data, {}) }]
29734
- })), (M === "previous" || !M && j !== !0) && (a == null || a(!1)), i == null || i(!1), !O)
29740
+ })), (M === "previous" || !M && j !== !0) && (a == null || a(!1)), i == null || i(!1), !L)
29735
29741
  return;
29736
29742
  N ? f.success({
29737
- title: m(O),
29743
+ title: m(L),
29738
29744
  onOk: () => z(this, null, function* () {
29739
29745
  yield e.reset(), (j && !M || M === "redirect") && H && (isURL(H) ? window.location.href = H : c(H));
29740
29746
  })
29741
- }) : (message.success(m(O)), (j && !M || M === "redirect" || M === "redirect") && H && (isURL(H) ? window.location.href = H : c(H)));
29747
+ }) : (message.success(m(L)), (j && !M || M === "redirect" || M === "redirect") && H && (isURL(H) ? window.location.href = H : c(H)));
29742
29748
  } catch (U) {
29743
29749
  h.data.loading = !1;
29744
29750
  }
@@ -29963,30 +29969,30 @@ const useCreateActionProps = () => {
29963
29969
  ]);
29964
29970
  const S = useCallback(
29965
29971
  (w) => {
29966
- const { targets: O, uid: M } = findFilterTargets(t);
29972
+ const { targets: L, uid: M } = findFilterTargets(t);
29967
29973
  n().forEach((k) => {
29968
- var U, H, K, J;
29969
- if (!O.find((W) => W.uid === k.uid))
29974
+ var U, H, K, X;
29975
+ if (!L.find((W) => W.uid === k.uid))
29970
29976
  return;
29971
- const q = `${M}${t.name}`, E = ((U = k.service.params) == null ? void 0 : U[0]) || {};
29977
+ const q = `${M}${t.name}`, V = ((U = k.service.params) == null ? void 0 : U[0]) || {};
29972
29978
  (K = (H = k.service.params) == null ? void 0 : H[1]) != null && K.filters || _.set(k.service.params, "[1].filters", {});
29973
- const V = k.service.params[1].filters;
29979
+ const E = k.service.params[1].filters;
29974
29980
  if (w.length)
29975
- V[q] = {
29981
+ E[q] = {
29976
29982
  [y]: w
29977
29983
  };
29978
29984
  else {
29979
- if ((J = k.clearSelection) == null || J.call(k), k.dataLoadingMode === "manual")
29985
+ if ((X = k.clearSelection) == null || X.call(k), k.dataLoadingMode === "manual")
29980
29986
  return k.clearData();
29981
- delete V[q];
29987
+ delete E[q];
29982
29988
  }
29983
- const G = mergeFilter([...Object.values(V), k.defaultFilter]);
29989
+ const G = mergeFilter([...Object.values(E), k.defaultFilter]);
29984
29990
  return k.doFilter(
29985
- P(x({}, E), {
29991
+ P(x({}, V), {
29986
29992
  page: 1,
29987
29993
  filter: G
29988
29994
  }),
29989
- { filters: V }
29995
+ { filters: E }
29990
29996
  );
29991
29997
  });
29992
29998
  },
@@ -29995,20 +30001,20 @@ const useCreateActionProps = () => {
29995
30001
  if (!e)
29996
30002
  return {};
29997
30003
  if (isOptionalField(e)) {
29998
- const w = o.find((k) => k.name === t.name), O = {
30004
+ const w = o.find((k) => k.name === t.name), L = {
29999
30005
  select: "$in",
30000
30006
  multipleSelect: "$anyOf",
30001
30007
  checkbox: "$in",
30002
30008
  checkboxGroup: "$anyOf"
30003
30009
  }, M = ((j = w == null ? void 0 : w.uiSchema) == null ? void 0 : j.enum) || [];
30004
30010
  C = "value", b = "label", p = M, h = {}, g = () => {
30005
- }, y = `${w.name}.${O[w.interface]}`, m = (k) => {
30006
- const L = k.target.value;
30007
- if (!L) {
30011
+ }, y = `${w.name}.${L[w.interface]}`, m = (k) => {
30012
+ const O = k.target.value;
30013
+ if (!O) {
30008
30014
  p = M;
30009
30015
  return;
30010
30016
  }
30011
- p = M.filter((q) => q.label.includes(L));
30017
+ p = M.filter((q) => q.label.includes(O));
30012
30018
  };
30013
30019
  } else
30014
30020
  y = `${r}.${C}.$in`, p = (f == null ? void 0 : f.data) || [], m = (w) => {
@@ -30305,7 +30311,7 @@ const useSyncFromForm = (e, t, o) => {
30305
30311
  isLeaf: !0,
30306
30312
  field: $,
30307
30313
  disabled: F
30308
- }), j = I.find((O) => O.name === N.key);
30314
+ }), j = I.find((L) => L.name === N.key);
30309
30315
  if (["belongsTo", "belongsToMany"].includes($.type) && (!j || ["Select", "Picker"].includes(j == null ? void 0 : j.fieldMode)))
30310
30316
  B.type = "reference", N.type = "reference", N.title = React.createElement(TreeNode, P(x({}, B), { type: "reference" })), N.isLeaf = !1, N.children = m($.target, {
30311
30317
  depth: y + 1,
@@ -30314,15 +30320,15 @@ const useSyncFromForm = (e, t, o) => {
30314
30320
  exclude: systemKeys
30315
30321
  });
30316
30322
  else if (["hasOne", "hasMany"].includes($.type) || ["Nester", "SubTable"].includes(j == null ? void 0 : j.fieldMode)) {
30317
- let O = !1;
30318
- ["hasOne", "hasMany"].includes($.type) && ["Select", "Picker"].includes(j == null ? void 0 : j.fieldMode) && (O = !0), N.disabled = !0, N.isLeaf = !1, N.children = p(
30323
+ let L = !1;
30324
+ ["hasOne", "hasMany"].includes($.type) && ["Select", "Picker"].includes(j == null ? void 0 : j.fieldMode) && (L = !0), N.disabled = !0, N.isLeaf = !1, N.children = p(
30319
30325
  $.target,
30320
30326
  {
30321
30327
  depth: y + 1,
30322
30328
  maxDepth: S,
30323
30329
  prefix: N.key,
30324
30330
  exclude: ["id", ...systemKeys],
30325
- disabled: O
30331
+ disabled: L
30326
30332
  },
30327
30333
  I
30328
30334
  );
@@ -30376,12 +30382,12 @@ const useSyncFromForm = (e, t, o) => {
30376
30382
  const f = /* @__PURE__ */ new Set([]), C = /* @__PURE__ */ new Set([]), b = (v, F) => {
30377
30383
  var I;
30378
30384
  (I = v == null ? void 0 : v.reduceProperties) == null || I.call(v, (R, T) => {
30379
- var O, M, k;
30385
+ var L, M, k;
30380
30386
  const D = R || F, $ = T["x-collection-field"] && n(T["x-collection-field"]), B = T.name.includes("."), N = $ && ["hasOne", "hasMany", "belongsTo", "belongsToMany"].includes($.type), j = !N && B ? getAssociationPath(T.name) : T.name, w = D === "" || !D ? j : D + "." + j;
30381
- if ($ && !(["hasOne", "hasMany"].includes($.type) || ["SubForm", "Nester"].includes((O = T["x-component-props"]) == null ? void 0 : O.mode)) && C.add(w), $ && (N || B) && T["x-component"] !== "TableField") {
30387
+ if ($ && !(["hasOne", "hasMany"].includes($.type) || ["SubForm", "Nester"].includes((L = T["x-component-props"]) == null ? void 0 : L.mode)) && C.add(w), $ && (N || B) && T["x-component"] !== "TableField") {
30382
30388
  if (f.add({ name: w, fieldMode: ((M = T["x-component-props"]) == null ? void 0 : M.mode) || "Select" }), ["Nester", "SubTable"].includes((k = T["x-component-props"]) == null ? void 0 : k.mode)) {
30383
- const L = D && D !== "" ? D + "." + T.name : T.name;
30384
- b(T, L);
30389
+ const O = D && D !== "" ? D + "." + T.name : T.name;
30390
+ b(T, O);
30385
30391
  }
30386
30392
  } else
30387
30393
  [
@@ -37704,10 +37710,10 @@ const enabledIndexColumn$1 = {
37704
37710
  name: "fieldSettings:component:CascadeSelect",
37705
37711
  items: [fieldComponent$6, titleField$1, ellipsisSettingsItem, setTheDataScope]
37706
37712
  }), SchemaSettingsDateRange = function e(t) {
37707
- var R, T, D, $, B, N, j, w, O, M, k, L, q, E, V, G;
37708
- const { fieldSchema: o } = t, n = useField(), { dn: r } = useDesignable(), { t: a } = useTranslation(), { getCollectionJoinField: i } = useCollectionManager_deprecated(), { isInSubForm: l, isInSubTable: c } = useFlag() || {}, u = i(o == null ? void 0 : o["x-collection-field"]) || {}, d = ((R = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : R.showTime) || ((D = (T = u == null ? void 0 : u.uiSchema) == null ? void 0 : T["x-component-props"]) == null ? void 0 : D.showTime) || !1, p = (($ = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : $.dateFormat) || ((N = (B = u == null ? void 0 : u.uiSchema) == null ? void 0 : B["x-component-props"]) == null ? void 0 : N.dateFormat) || "YYYY-MM-DD", m = ((j = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : j.timeFormat) || ((O = (w = u == null ? void 0 : u.uiSchema) == null ? void 0 : w["x-component-props"]) == null ? void 0 : O.timeFormat) || "HH:mm:ss", h = ((M = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : M.picker) || ((L = (k = u == null ? void 0 : u.uiSchema) == null ? void 0 : k["x-component-props"]) == null ? void 0 : L.picker) || "date";
37713
+ var R, T, D, $, B, N, j, w, L, M, k, O, q, V, E, G;
37714
+ const { fieldSchema: o } = t, n = useField(), { dn: r } = useDesignable(), { t: a } = useTranslation(), { getCollectionJoinField: i } = useCollectionManager_deprecated(), { isInSubForm: l, isInSubTable: c } = useFlag() || {}, u = i(o == null ? void 0 : o["x-collection-field"]) || {}, d = ((R = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : R.showTime) || ((D = (T = u == null ? void 0 : u.uiSchema) == null ? void 0 : T["x-component-props"]) == null ? void 0 : D.showTime) || !1, p = (($ = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : $.dateFormat) || ((N = (B = u == null ? void 0 : u.uiSchema) == null ? void 0 : B["x-component-props"]) == null ? void 0 : N.dateFormat) || "YYYY-MM-DD", m = ((j = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : j.timeFormat) || ((L = (w = u == null ? void 0 : u.uiSchema) == null ? void 0 : w["x-component-props"]) == null ? void 0 : L.timeFormat) || "HH:mm:ss", h = ((M = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : M.picker) || ((O = (k = u == null ? void 0 : u.uiSchema) == null ? void 0 : k["x-component-props"]) == null ? void 0 : O.picker) || "date";
37709
37715
  o["x-read-pretty"] || n.readOnly || n.readPretty;
37710
- const g = (q = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : q._minDate, f = (E = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : E._maxDate, C = ((V = u == null ? void 0 : u.uiSchema) == null ? void 0 : V["x-component-props"].gmt) || !1, b = ((G = u == null ? void 0 : u.uiSchema) == null ? void 0 : G["x-component-props"].utc) || !1, y = useRecord(), { form: S } = useFormBlockContext(), v = useCallback(
37716
+ const g = (q = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : q._minDate, f = (V = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : V._maxDate, C = ((E = u == null ? void 0 : u.uiSchema) == null ? void 0 : E["x-component-props"].gmt) || !1, b = ((G = u == null ? void 0 : u.uiSchema) == null ? void 0 : G["x-component-props"].utc) || !1, y = useRecord(), { form: S } = useFormBlockContext(), v = useCallback(
37711
37717
  (U) => /* @__PURE__ */ jsx(
37712
37718
  SchemaComponent,
37713
37719
  {
@@ -37794,8 +37800,8 @@ const enabledIndexColumn$1 = {
37794
37800
  }), H["x-component-props"] = o["x-component-props"], n.componentProps = o["x-component-props"];
37795
37801
  const K = n.path.entire.split(".");
37796
37802
  K.pop();
37797
- const J = K.join(".");
37798
- n.query(`${J}.*[0:].${o.name}`).forEach((W) => {
37803
+ const X = K.join(".");
37804
+ n.query(`${X}.*[0:].${o.name}`).forEach((W) => {
37799
37805
  W.props.name === o.name && W.setComponentProps({
37800
37806
  _maxDate: I(U == null ? void 0 : U._maxDate),
37801
37807
  _minDate: I(U == null ? void 0 : U._minDate)
@@ -39187,7 +39193,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
39187
39193
  _.isFunction(C) ? o.current = C(o.current) : o.current = C;
39188
39194
  }, []), u = useCallback(
39189
39195
  (C, b, y) => z(void 0, null, function* () {
39190
- var w, O;
39196
+ var w, L;
39191
39197
  const S = C.split("."), v = S[0], F = mergeVariableToCollectionNameWithLocalVariables(variablesStore, b);
39192
39198
  let I = mergeCtxWithLocalVariables(o.current, b);
39193
39199
  const { fieldPath: R, dataSource: T, variableOption: D } = getFieldPath$1(v, F);
@@ -39204,11 +39210,11 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
39204
39210
  };
39205
39211
  if (_.isFunction(I))
39206
39212
  break;
39207
- const k = S[M], L = S.slice(0, M + 1).join("."), { fieldPath: q } = getFieldPath$1(L, F), E = r(q, T), V = (O = a($, T)) == null ? void 0 : O.getPrimaryKey();
39213
+ const k = S[M], O = S.slice(0, M + 1).join("."), { fieldPath: q } = getFieldPath$1(O, F), V = r(q, T), E = (L = a($, T)) == null ? void 0 : L.getPrimaryKey();
39208
39214
  if (Array.isArray(I)) {
39209
39215
  const G = I.map((U) => {
39210
- if (!(y != null && y.doNotRequest) && shouldToRequest(U == null ? void 0 : U[k], U, L) && (U == null ? void 0 : U[V]) != null && E != null && E.target) {
39211
- const H = `/${$}/${U[E.sourceKey || V]}/${k}:${getAction(E.type)}`;
39216
+ if (!(y != null && y.doNotRequest) && shouldToRequest(U == null ? void 0 : U[k], U, O) && (U == null ? void 0 : U[E]) != null && V != null && V.target) {
39217
+ const H = `/${$}/${U[V.sourceKey || E]}/${k}:${getAction(V.type)}`;
39212
39218
  if (hasRequested(H))
39213
39219
  return getRequested(H);
39214
39220
  const K = n.request({
@@ -39217,14 +39223,14 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
39217
39223
  params: {
39218
39224
  appends: y == null ? void 0 : y.appends
39219
39225
  }
39220
- }).then((J) => (clearRequested(H), J.data.data));
39226
+ }).then((X) => (clearRequested(H), X.data.data));
39221
39227
  return stashRequested(H, K), K;
39222
39228
  }
39223
39229
  return U == null ? void 0 : U[k];
39224
39230
  });
39225
- I = removeThroughCollectionFields(_.flatten(yield Promise.all(G)), E);
39226
- } else if (!(y != null && y.doNotRequest) && shouldToRequest(I[k], I, L) && I[V] != null && (E != null && E.target)) {
39227
- const G = `/${$}/${I[E.sourceKey || V]}/${k}:${getAction(E.type)}`;
39231
+ I = removeThroughCollectionFields(_.flatten(yield Promise.all(G)), V);
39232
+ } else if (!(y != null && y.doNotRequest) && shouldToRequest(I[k], I, O) && I[E] != null && (V != null && V.target)) {
39233
+ const G = `/${$}/${I[V.sourceKey || E]}/${k}:${getAction(V.type)}`;
39228
39234
  let U = null;
39229
39235
  if (hasRequested(G))
39230
39236
  U = yield getRequested(G);
@@ -39239,10 +39245,10 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
39239
39245
  stashRequested(G, K), U = yield K, clearRequested(G);
39240
39246
  }
39241
39247
  const H = U.data.data;
39242
- I = removeThroughCollectionFields(H, E);
39248
+ I = removeThroughCollectionFields(H, V);
39243
39249
  } else
39244
- I = removeThroughCollectionFields(getValuesByPath(I, k), E);
39245
- E != null && E.target && ($ = E.target);
39250
+ I = removeThroughCollectionFields(getValuesByPath(I, k), V);
39251
+ V != null && V.target && ($ = V.target);
39246
39252
  }
39247
39253
  const j = i(
39248
39254
  _.isFunction(I) ? yield I({
@@ -39791,7 +39797,7 @@ const ActionLink = withDynamicSchemaProps(
39791
39797
  }
39792
39798
  }), handleError = console.log, Action = withDynamicSchemaProps(
39793
39799
  React.memo((e) => {
39794
- var J;
39800
+ var X;
39795
39801
  const K = useProps(e), {
39796
39802
  popover: t,
39797
39803
  containerRefKey: o,
@@ -39831,20 +39837,20 @@ const ActionLink = withDynamicSchemaProps(
39831
39837
  "onMouseEnter",
39832
39838
  "refreshDataBlockRequest",
39833
39839
  "confirmTitle"
39834
- ]), v = useDesigner(), F = useField(), I = useFieldSchema(), R = useCompile(), T = useCollectionRecordData(), D = R((J = I["x-component-props"]) == null ? void 0 : J.confirm) || g, $ = useMemo(
39840
+ ]), v = useDesigner(), F = useField(), I = useFieldSchema(), R = useCompile(), T = useCollectionRecordData(), D = R((X = I["x-component-props"]) == null ? void 0 : X.confirm) || g, $ = useMemo(
39835
39841
  () => {
39836
39842
  var W;
39837
- return ((W = I == null ? void 0 : I["x-linkage-rules"]) == null ? void 0 : W.filter((X) => !X.disabled)) || [];
39843
+ return ((W = I == null ? void 0 : I["x-linkage-rules"]) == null ? void 0 : W.filter((J) => !J.disabled)) || [];
39838
39844
  },
39839
39845
  [I == null ? void 0 : I["x-linkage-rules"]]
39840
- ), { designable: B } = useDesignable(), N = useComponent(n) || n, j = useVariables$1(), w = useLocalVariables$1(), { visibleWithURL: O, setVisibleWithURL: M } = usePopupUtils(), { setSubmitted: k } = useActionContext(), { getAriaLabel: L } = useGetAriaLabelOfAction(l), q = useCollectionParentRecordData(), E = useApp(), { getAllDataBlocks: V } = useAllDataBlocks(), G = useForm();
39846
+ ), { designable: B } = useDesignable(), N = useComponent(n) || n, j = useVariables$1(), w = useLocalVariables$1(), { visibleWithURL: L, setVisibleWithURL: M } = usePopupUtils(), { setSubmitted: k } = useActionContext(), { getAriaLabel: O } = useGetAriaLabelOfAction(l), q = useCollectionParentRecordData(), V = useApp(), { getAllDataBlocks: E } = useAllDataBlocks(), G = useForm();
39841
39847
  useEffect(() => {
39842
39848
  F.stateOfLinkageRules && setInitialActionState(F);
39843
- const W = uid(), X = [];
39849
+ const W = uid(), J = [];
39844
39850
  return setTimeout(() => {
39845
39851
  G.addEffects(W, () => {
39846
39852
  forEachLinkageRule($, (Z, Q) => {
39847
- X.push(
39853
+ J.push(
39848
39854
  reaction(
39849
39855
  () => [getVariableValuesInCondition({ linkageRules: $, localVariables: w })].map((re) => JSON.stringify(re)).join(","),
39850
39856
  () => {
@@ -39858,7 +39864,7 @@ const ActionLink = withDynamicSchemaProps(
39858
39864
  conditionType: Q.conditionType,
39859
39865
  variableNameOfLeftCondition: "$nRecord"
39860
39866
  },
39861
- E.jsonLogic
39867
+ V.jsonLogic
39862
39868
  );
39863
39869
  },
39864
39870
  { fireImmediately: !0, equals: isEqual }
@@ -39867,7 +39873,7 @@ const ActionLink = withDynamicSchemaProps(
39867
39873
  });
39868
39874
  });
39869
39875
  }), () => {
39870
- G.removeEffects(W), X.forEach((Z) => {
39876
+ G.removeEffects(W), J.forEach((Z) => {
39871
39877
  Z();
39872
39878
  });
39873
39879
  };
@@ -39877,11 +39883,11 @@ const ActionLink = withDynamicSchemaProps(
39877
39883
  C == null || C(W);
39878
39884
  },
39879
39885
  [C]
39880
- ), H = useMemo(() => c && ((W, X) => z(void 0, null, function* () {
39886
+ ), H = useMemo(() => c && ((W, J) => z(void 0, null, function* () {
39881
39887
  var Q, ee;
39882
- yield c == null ? void 0 : c(W, X);
39888
+ yield c == null ? void 0 : c(W, J);
39883
39889
  const Z = ((ee = (Q = I["x-action-settings"]) == null ? void 0 : Q.onSuccess) == null ? void 0 : ee.blocksToRefresh) || [];
39884
- Z.length > 0 && V().forEach((oe) => {
39890
+ Z.length > 0 && E().forEach((oe) => {
39885
39891
  var re;
39886
39892
  if (Z.includes(oe.uid))
39887
39893
  try {
@@ -39890,7 +39896,7 @@ const ActionLink = withDynamicSchemaProps(
39890
39896
  console.error("Failed to refresh block:", oe.uid, ie);
39891
39897
  }
39892
39898
  });
39893
- })), [c, I, V]);
39899
+ })), [c, I, E]);
39894
39900
  return /* @__PURE__ */ jsx(VariableScope, { scopeId: I == null ? void 0 : I["x-uid"], type: "action", children: /* @__PURE__ */ jsx(
39895
39901
  InternalAction,
39896
39902
  x({
@@ -39915,10 +39921,10 @@ const ActionLink = withDynamicSchemaProps(
39915
39921
  style: u,
39916
39922
  propsDisabled: m,
39917
39923
  useAction: r,
39918
- visibleWithURL: O,
39924
+ visibleWithURL: L,
39919
39925
  setVisibleWithURL: M,
39920
39926
  setSubmitted: k,
39921
- getAriaLabel: L,
39927
+ getAriaLabel: O,
39922
39928
  parentRecordData: q,
39923
39929
  actionCallback: h
39924
39930
  }, S)
@@ -39983,12 +39989,12 @@ const ActionLink = withDynamicSchemaProps(
39983
39989
  "setSubmitted",
39984
39990
  "getAriaLabel",
39985
39991
  "parentRecordData"
39986
- ]), [w, O] = useState(!1), { wrapSSR: M, componentCls: k, hashId: L } = useStyles$8(), [q, E] = useState(!1), V = n["x-toolbar-props"] || n["x-designer-props"], G = (ge = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : ge.openMode, U = (Ce = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : Ce.openSize, H = (me = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : me.refreshDataBlockRequest, { modal: K } = App.useApp(), J = useForm(), W = useACLActionParamsContext(), {
39987
- run: X,
39992
+ ]), [w, L] = useState(!1), { wrapSSR: M, componentCls: k, hashId: O } = useStyles$8(), [q, V] = useState(!1), E = n["x-toolbar-props"] || n["x-designer-props"], G = (ge = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : ge.openMode, U = (Ce = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : Ce.openSize, H = (me = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : me.refreshDataBlockRequest, { modal: K } = App.useApp(), X = useForm(), W = useACLActionParamsContext(), {
39993
+ run: J,
39988
39994
  element: Z,
39989
39995
  disabled: Q,
39990
39996
  loading: ee
39991
- } = (I == null ? void 0 : I(R)) || {}, oe = J.disabled || a.disabled || ((xe = a.data) == null ? void 0 : xe.disabled) || F || Q, re = useMemo(() => {
39997
+ } = (I == null ? void 0 : I(R)) || {}, oe = X.disabled || a.disabled || ((xe = a.data) == null ? void 0 : xe.disabled) || F || Q, re = useMemo(() => {
39992
39998
  var de;
39993
39999
  return P(x({}, v), {
39994
40000
  opacity: r && (((de = a == null ? void 0 : a.data) == null ? void 0 : de.hidden) || !W) && 0.1,
@@ -40004,9 +40010,9 @@ const ActionLink = withDynamicSchemaProps(
40004
40010
  buttonStyle: re,
40005
40011
  handleMouseEnter: c,
40006
40012
  tarComponent: u,
40007
- designerProps: V,
40013
+ designerProps: E,
40008
40014
  componentCls: k,
40009
- hashId: L,
40015
+ hashId: O,
40010
40016
  className: d,
40011
40017
  others: j,
40012
40018
  getAriaLabel: B,
@@ -40015,8 +40021,8 @@ const ActionLink = withDynamicSchemaProps(
40015
40021
  onClick: h,
40016
40022
  refreshDataBlockRequest: H,
40017
40023
  fieldSchema: n,
40018
- setVisible: O,
40019
- run: X,
40024
+ setVisible: L,
40025
+ run: J,
40020
40026
  confirm: g,
40021
40027
  modal: K,
40022
40028
  setSubmitted: $,
@@ -40024,7 +40030,7 @@ const ActionLink = withDynamicSchemaProps(
40024
40030
  title: S
40025
40031
  }, pe = useCallback(
40026
40032
  (de) => {
40027
- O == null || O(de), D == null || D(de);
40033
+ L == null || L(de), D == null || D(de);
40028
40034
  },
40029
40035
  [D]
40030
40036
  );
@@ -40035,7 +40041,7 @@ const ActionLink = withDynamicSchemaProps(
40035
40041
  visible: w || T,
40036
40042
  setVisible: pe,
40037
40043
  formValueChanged: q,
40038
- setFormValueChanged: E,
40044
+ setFormValueChanged: V,
40039
40045
  openMode: G,
40040
40046
  openSize: U,
40041
40047
  containerRefKey: o,
@@ -40123,26 +40129,26 @@ const RenderButton = ({
40123
40129
  confirmTitle: D,
40124
40130
  title: $
40125
40131
  }) => {
40126
- const { getDataBlockRequest: B } = useDataBlockRequestGetter(), { t: N } = useTranslation(), { isPopupVisibleControlledByURL: j } = usePopupSettings(), { openPopup: w } = usePopupUtils(), O = useVariables$1(), M = useLocalVariables$1(), k = useRef(null), L = useCompile(), q = useForm();
40132
+ const { getDataBlockRequest: B } = useDataBlockRequestGetter(), { t: N } = useTranslation(), { isPopupVisibleControlledByURL: j } = usePopupSettings(), { openPopup: w } = usePopupUtils(), L = useVariables$1(), M = useLocalVariables$1(), k = useRef(null), O = useCompile(), q = useForm();
40127
40133
  k.current = w;
40128
- const E = {
40129
- variables: O,
40134
+ const V = {
40135
+ variables: L,
40130
40136
  localVariables: M
40131
- }, V = useCallback(
40137
+ }, E = useCallback(
40132
40138
  (G, U = !0) => z(void 0, null, function* () {
40133
- var J;
40139
+ var X;
40134
40140
  if (U && isPortalInBody(G.target))
40135
40141
  return;
40136
40142
  G.preventDefault(), G.stopPropagation();
40137
- const H = yield getVariableValue(N(I == null ? void 0 : I.title, { title: L(S.title) }), E), K = yield getVariableValue(N(I == null ? void 0 : I.content, { title: L(S.title) }), E);
40143
+ const H = yield getVariableValue(N(I == null ? void 0 : I.title, { title: O(S.title) }), V), K = yield getVariableValue(N(I == null ? void 0 : I.content, { title: O(S.title) }), V);
40138
40144
  if (!a && o) {
40139
40145
  const W = () => {
40140
40146
  b ? b(G, () => {
40141
- var X, Z;
40142
- y !== !1 && (T == null || T(!0), (Z = (X = B()) == null ? void 0 : X.refresh) == null || Z.call(X));
40147
+ var J, Z;
40148
+ y !== !1 && (T == null || T(!0), (Z = (J = B()) == null ? void 0 : J.refresh) == null || Z.call(J));
40143
40149
  }) : isBulkEditAction(S) || !j() ? (v(!0), F == null || F()) : ["view", "update", "create", "customize:popup"].includes(S["x-action"]) && S["x-uid"] ? k.current() : (v(!0), F == null || F());
40144
40150
  };
40145
- (I == null ? void 0 : I.enable) !== !1 && (I != null && I.content) ? (yield (J = q == null ? void 0 : q.submit) == null ? void 0 : J.call(q), R.confirm({
40151
+ (I == null ? void 0 : I.enable) !== !1 && (I != null && I.content) ? (yield (X = q == null ? void 0 : q.submit) == null ? void 0 : X.call(q), R.confirm({
40146
40152
  title: N(H, { title: D || $ || (t == null ? void 0 : t.title) }),
40147
40153
  content: N(K, { title: D || $ || (t == null ? void 0 : t.title) }),
40148
40154
  onOk: W
@@ -40182,7 +40188,7 @@ const RenderButton = ({
40182
40188
  buttonStyle: i,
40183
40189
  handleMouseEnter: l,
40184
40190
  getAriaLabel: g,
40185
- handleButtonClick: V,
40191
+ handleButtonClick: E,
40186
40192
  tarComponent: c,
40187
40193
  componentCls: d,
40188
40194
  hashId: p,
@@ -40197,8 +40203,8 @@ const RenderButton = ({
40197
40203
  RenderButton.displayName = "RenderButton";
40198
40204
  const RenderButtonInner = observer$1(
40199
40205
  (e) => {
40200
- var M, L;
40201
- const O = e, {
40206
+ var M, O;
40207
+ const L = e, {
40202
40208
  designable: t,
40203
40209
  field: o,
40204
40210
  aclCtx: n,
@@ -40219,7 +40225,7 @@ const RenderButtonInner = observer$1(
40219
40225
  title: y,
40220
40226
  isLink: S,
40221
40227
  onlyIcon: v
40222
- } = O, F = Y(O, [
40228
+ } = L, F = Y(L, [
40223
40229
  "designable",
40224
40230
  "field",
40225
40231
  "aclCtx",
@@ -40242,8 +40248,8 @@ const RenderButtonInner = observer$1(
40242
40248
  "onlyIcon"
40243
40249
  ]), { t: I } = useTranslation(), R = useCallback(
40244
40250
  debounce$1(
40245
- (q, E = !0) => {
40246
- d(q, E);
40251
+ (q, V = !0) => {
40252
+ d(q, V);
40247
40253
  },
40248
40254
  300,
40249
40255
  { leading: !0, trailing: !1 }
@@ -40256,9 +40262,9 @@ const RenderButtonInner = observer$1(
40256
40262
  const T = useMemo(
40257
40263
  () => React.forwardRef(
40258
40264
  (K, H) => {
40259
- var J = K, { component: q = p || Button, icon: E, onlyIcon: V, children: G } = J, U = Y(J, ["component", "icon", "onlyIcon", "children"]);
40265
+ var X = K, { component: q = p || Button, icon: V, onlyIcon: E, children: G } = X, U = Y(X, ["component", "icon", "onlyIcon", "children"]);
40260
40266
  return /* @__PURE__ */ jsxs(q, P(x({ ref: H }, U), { children: [
40261
- v ? /* @__PURE__ */ jsx(Tooltip, { title: U.title, children: /* @__PURE__ */ jsx("span", { style: { padding: 3 }, children: E && typeof E == "string" ? /* @__PURE__ */ jsx(Icon, { type: E }) : E }) }) : /* @__PURE__ */ jsx("span", { style: { paddingRight: 3 }, children: E && typeof E == "string" ? /* @__PURE__ */ jsx(Icon, { type: E }) : E }),
40267
+ v ? /* @__PURE__ */ jsx(Tooltip, { title: U.title, children: /* @__PURE__ */ jsx("span", { style: { padding: 3 }, children: V && typeof V == "string" ? /* @__PURE__ */ jsx(Icon, { type: V }) : V }) }) : /* @__PURE__ */ jsx("span", { style: { paddingRight: 3 }, children: V && typeof V == "string" ? /* @__PURE__ */ jsx(Icon, { type: V }) : V }),
40262
40268
  v ? G[1] : G
40263
40269
  ] }));
40264
40270
  }
@@ -40275,7 +40281,7 @@ const RenderButtonInner = observer$1(
40275
40281
  "aria-label": u()
40276
40282
  }, F), {
40277
40283
  onMouseEnter: c,
40278
- loading: ((L = o == null ? void 0 : o.data) == null ? void 0 : L.loading) || a,
40284
+ loading: ((O = o == null ? void 0 : o.data) == null ? void 0 : O.loading) || a,
40279
40285
  icon: typeof r == "string" ? /* @__PURE__ */ jsx(Icon, { type: r, style: j }) : r,
40280
40286
  disabled: i,
40281
40287
  style: S ? N : l,
@@ -40727,7 +40733,7 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
40727
40733
  ), EMPTY$1 = "N/A", InternalRemoteSelect = withDynamicSchemaProps(
40728
40734
  connect(
40729
40735
  (e) => {
40730
- var K, J;
40736
+ var K, X;
40731
40737
  const H = e, {
40732
40738
  fieldNames: t = {},
40733
40739
  service: o = {},
@@ -40763,16 +40769,16 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
40763
40769
  ]), b = useDataSourceKey(), y = useDataSourceHeaders(m || b), S = useRef(!1), v = useFieldSchema(), F = ((K = v["x-component-props"]) == null ? void 0 : K.addMode) === "quickAdd", { getField: I } = useCollection_deprecated(), R = useRef(null), { getCollectionJoinField: T, getInterface: D } = useCollectionManager_deprecated(), $ = v["x-collection-field"] || v.name, B = I($) || T($), N = u || (B == null ? void 0 : B.target) && (t == null ? void 0 : t.label) && T(`${B.target}.${t.label}`), j = useMemo(() => {
40764
40770
  var W;
40765
40771
  if (N != null && N.interface) {
40766
- const X = D(N.interface), Z = ((W = X == null ? void 0 : X.filterable) == null ? void 0 : W.operators[0].value) || "$includes";
40772
+ const J = D(N.interface), Z = ((W = J == null ? void 0 : J.filterable) == null ? void 0 : W.operators[0].value) || "$includes";
40767
40773
  return N.type === "string" || N.dataType === "string" ? "$includes" : Z;
40768
40774
  }
40769
40775
  return "$includes";
40770
- }, [N]), w = useCompile(), O = useCallback(
40776
+ }, [N]), w = useCompile(), L = useCallback(
40771
40777
  (W) => {
40772
40778
  try {
40773
- return W.filter((X) => ["number", "string"].includes(typeof X[t.value]) || !X[t.value]).map((X) => {
40779
+ return W.filter((J) => ["number", "string"].includes(typeof J[t.value]) || !J[t.value]).map((J) => {
40774
40780
  var Q;
40775
- let Z = w(X[t.label]);
40781
+ let Z = w(J[t.label]);
40776
40782
  if ((Q = N == null ? void 0 : N.uiSchema) != null && Q.enum)
40777
40783
  if (Array.isArray(Z))
40778
40784
  Z = Z.map((ee, oe) => {
@@ -40785,18 +40791,18 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
40785
40791
  }
40786
40792
  return (N == null ? void 0 : N.type) === "date" && (Z = dayjs(Z).format("YYYY-MM-DD")), c ? c({
40787
40793
  [t.label]: Z || EMPTY$1,
40788
- [t.value]: X[t.value]
40789
- }) : P(x({}, omit(X, "style")), {
40794
+ [t.value]: J[t.value]
40795
+ }) : P(x({}, omit(J, "style")), {
40790
40796
  [t.label]: Z || EMPTY$1,
40791
- [t.value]: X[t.value]
40797
+ [t.value]: J[t.value]
40792
40798
  });
40793
40799
  }).filter(Boolean);
40794
- } catch (X) {
40795
- return console.error(X), W;
40800
+ } catch (J) {
40801
+ return console.error(J), W;
40796
40802
  }
40797
40803
  },
40798
40804
  [N == null ? void 0 : N.uiSchema, t]
40799
- ), { data: M, run: k, loading: L } = useRequest(
40805
+ ), { data: M, run: k, loading: O } = useRequest(
40800
40806
  P(x({
40801
40807
  action: "list"
40802
40808
  }, o), {
@@ -40804,7 +40810,7 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
40804
40810
  params: P(x({
40805
40811
  pageSize: 200
40806
40812
  }, o == null ? void 0 : o.params), {
40807
- filter: (J = o == null ? void 0 : o.params) == null ? void 0 : J.filter
40813
+ filter: (X = o == null ? void 0 : o.params) == null ? void 0 : X.filter
40808
40814
  })
40809
40815
  }),
40810
40816
  x({
@@ -40818,7 +40824,7 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
40818
40824
  fieldNames: t
40819
40825
  }),
40820
40826
  [o, t]
40821
- ), E = useCallback(() => R.current && d ? /* @__PURE__ */ jsx(
40827
+ ), V = useCallback(() => R.current && d ? /* @__PURE__ */ jsx(
40822
40828
  d,
40823
40829
  {
40824
40830
  search: R.current,
@@ -40830,8 +40836,8 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
40830
40836
  useEffect(() => {
40831
40837
  S.current && k();
40832
40838
  }, [q]);
40833
- const V = (W) => z(void 0, null, function* () {
40834
- var X;
40839
+ const E = (W) => z(void 0, null, function* () {
40840
+ var J;
40835
40841
  k({
40836
40842
  filter: mergeFilter([
40837
40843
  W ? {
@@ -40839,7 +40845,7 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
40839
40845
  [j]: W
40840
40846
  }
40841
40847
  } : {},
40842
- (X = o == null ? void 0 : o.params) == null ? void 0 : X.filter
40848
+ (J = o == null ? void 0 : o.params) == null ? void 0 : J.filter
40843
40849
  ])
40844
40850
  }), R.current = W;
40845
40851
  }), G = useMemo(() => {
@@ -40847,8 +40853,8 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
40847
40853
  const W = r || a;
40848
40854
  if (!((Q = M == null ? void 0 : M.data) != null && Q.length))
40849
40855
  return W != null ? Array.isArray(W) ? W : [W] : [];
40850
- const X = W != null && (Array.isArray(W) ? W.map((ee) => P(x({}, ee), { [t.value]: ee[t.value] || ee })) : [P(x({}, W), { [t.value]: W[t.value] || W })]) || [], Z = typeof p == "function" ? M.data.filter(p) : M.data;
40851
- return uniqBy(Z.concat(X != null ? X : []), t.value);
40856
+ const J = W != null && (Array.isArray(W) ? W.map((ee) => P(x({}, ee), { [t.value]: ee[t.value] || ee })) : [P(x({}, W), { [t.value]: W[t.value] || W })]) || [], Z = typeof p == "function" ? M.data.filter(p) : M.data;
40857
+ return uniqBy(Z.concat(J != null ? J : []), t.value);
40852
40858
  }, [r, a, M == null ? void 0 : M.data, t.value, p]);
40853
40859
  return /* @__PURE__ */ jsx(
40854
40860
  Select,
@@ -40858,7 +40864,7 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
40858
40864
  filterOption: !1,
40859
40865
  filterSort: null,
40860
40866
  fieldNames: t,
40861
- onSearch: V,
40867
+ onSearch: E,
40862
40868
  onDropdownVisibleChange: (W) => {
40863
40869
  R.current = null, W && k(), S.current = !0;
40864
40870
  },
@@ -40866,15 +40872,15 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
40866
40872
  value: r,
40867
40873
  defaultValue: a
40868
40874
  }, C), {
40869
- loading: M ? L : !0,
40870
- options: h(O(G)),
40875
+ loading: M ? O : !0,
40876
+ options: h(L(G)),
40871
40877
  rawOptions: G,
40872
40878
  dropdownRender: (W) => {
40873
- const X = G.some((Z) => Z[t.label] === R.current);
40879
+ const J = G.some((Z) => Z[t.label] === R.current);
40874
40880
  return /* @__PURE__ */ jsx(Fragment$1, { children: F ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
40875
40881
  !((M == null ? void 0 : M.data.length) === 0 && (R != null && R.current)) && W,
40876
- (M == null ? void 0 : M.data.length) > 0 && (R == null ? void 0 : R.current) && !X && /* @__PURE__ */ jsx(Divider$1, { style: { margin: 0 } }),
40877
- !X && /* @__PURE__ */ jsx(E, {})
40882
+ (M == null ? void 0 : M.data.length) > 0 && (R == null ? void 0 : R.current) && !J && /* @__PURE__ */ jsx(Divider$1, { style: { margin: 0 } }),
40883
+ !J && /* @__PURE__ */ jsx(V, {})
40878
40884
  ] }) : W });
40879
40885
  }
40880
40886
  })
@@ -41885,8 +41891,8 @@ const insertPositionToMethod = {
41885
41891
  ), h = useMemo(() => toItems$1(c == null ? void 0 : c.properties, { t: l, compile: u }), [c == null ? void 0 : c.properties, l, u]), g = useCallback(
41886
41892
  (B) => {
41887
41893
  onFieldChange("target", (N) => {
41888
- var w, O;
41889
- const [, j] = ((O = (w = N == null ? void 0 : N.value) == null ? void 0 : w.split) == null ? void 0 : O.call(w, "||")) || [];
41894
+ var w, L;
41895
+ const [, j] = ((L = (w = N == null ? void 0 : N.value) == null ? void 0 : w.split) == null ? void 0 : L.call(w, "||")) || [];
41890
41896
  N.query("position").take((M) => {
41891
41897
  M.dataSource = j === "Menu.SubMenu" ? [
41892
41898
  { label: l("Before"), value: "beforeBegin" },
@@ -41937,7 +41943,7 @@ const insertPositionToMethod = {
41937
41943
  const S = useCallback(
41938
41944
  ({ title: B, icon: N, href: j, params: w }) => {
41939
41945
  var M;
41940
- const O = {
41946
+ const L = {
41941
41947
  "x-uid": n["x-uid"],
41942
41948
  "x-server-hooks": [
41943
41949
  {
@@ -41946,8 +41952,8 @@ const insertPositionToMethod = {
41946
41952
  }
41947
41953
  ]
41948
41954
  };
41949
- B && (n.title = B, o.title = B, O.title = B, i()), o.componentProps.icon = N, o.componentProps.href = j, o.componentProps.params = w, O["x-component-props"] = { icon: N, href: j, params: w }, n["x-component-props"] = n["x-component-props"] || {}, n["x-component-props"].icon = N, n["x-component-props"].href = j, n["x-component-props"].params = w, m == null || m({ item: { props: { schema: n } } }), a.emit("patch", {
41950
- schema: O
41955
+ B && (n.title = B, o.title = B, L.title = B, i()), o.componentProps.icon = N, o.componentProps.href = j, o.componentProps.params = w, L["x-component-props"] = { icon: N, href: j, params: w }, n["x-component-props"] = n["x-component-props"] || {}, n["x-component-props"].icon = N, n["x-component-props"].href = j, n["x-component-props"].params = w, m == null || m({ item: { props: { schema: n } } }), a.emit("patch", {
41956
+ schema: L
41951
41957
  }), (M = n.__route__) != null && M.id && e(n.__route__.id, {
41952
41958
  title: B,
41953
41959
  icon: N,
@@ -41996,26 +42002,26 @@ const insertPositionToMethod = {
41996
42002
  const [w] = ((q = B == null ? void 0 : B.split) == null ? void 0 : q.call(B, "||")) || [];
41997
42003
  if (!w)
41998
42004
  return;
41999
- const O = findByUid(c, w), M = createDesignable({
42005
+ const L = findByUid(c, w), M = createDesignable({
42000
42006
  t: l,
42001
42007
  api: r,
42002
42008
  refresh: i,
42003
- current: O
42009
+ current: L
42004
42010
  }), k = {
42005
42011
  beforeBegin: "insertBefore",
42006
42012
  afterEnd: "insertAfter"
42007
- }, L = N === "beforeEnd" ? {
42013
+ }, O = N === "beforeEnd" ? {
42008
42014
  targetScope: {
42009
- parentId: O.__route__.id
42015
+ parentId: L.__route__.id
42010
42016
  }
42011
42017
  } : {
42012
- targetId: O.__route__.id
42018
+ targetId: L.__route__.id
42013
42019
  };
42014
42020
  yield I(x({
42015
42021
  sourceId: n.__route__.id,
42016
42022
  sortField: "sort",
42017
42023
  method: k[N]
42018
- }, L)), M.loadAPIClientEvents(), M.insertAdjacent(N, n);
42024
+ }, O)), M.loadAPIClientEvents(), M.insertAdjacent(N, n);
42019
42025
  }),
42020
42026
  [c, l, r, i, I, n]
42021
42027
  ), T = useMemo(() => ({
@@ -43342,15 +43348,15 @@ const FieldsTreeSelect = (e) => {
43342
43348
  "loadData",
43343
43349
  "includeFieldPaths"
43344
43350
  ]), p = useCompile(), { t: m } = useTranslation(), [h, g] = useState({}), f = a({ collection: r }), [C, b] = parseCollectionName(f), y = useApp(), { collectionManager: S } = y.dataSourceManager.getDataSource(C), v = (j, w) => {
43345
- const O = S.getCollection(j);
43346
- return O ? O.getAllFields(w) : [];
43351
+ const L = S.getCollection(j);
43352
+ return L ? L.getAllFields(w) : [];
43347
43353
  }, F = Object.values(h), I = useMemo(() => e.multiple ? (o || []).map((j) => h[j]).filter(Boolean) : o, [o, e.multiple, h]), R = useCallback(
43348
43354
  (j) => z(void 0, null, function* () {
43349
43355
  if (c != null)
43350
43356
  return c(j);
43351
43357
  if (!j.isLeaf && j.loadChildren) {
43352
43358
  const w = j.loadChildren(j);
43353
- g((O) => w.reduce((M, k) => Object.assign(M, { [k.value]: k }), x({}, O)));
43359
+ g((L) => w.reduce((M, k) => Object.assign(M, { [k.value]: k }), x({}, L)));
43354
43360
  }
43355
43361
  }),
43356
43362
  [c]
@@ -43362,28 +43368,28 @@ const FieldsTreeSelect = (e) => {
43362
43368
  title: l.label,
43363
43369
  fullTitle: l.label,
43364
43370
  isLeaf: !1
43365
- }) : null, O = (c === null ? [] : getCollectionFieldOptions.call({ compile: p, getCollectionFields: v, filter: i }, b, j)).reduce((M, k) => Object.assign(M, { [k.value]: k }), {});
43366
- j && (O[j.value] = j), g(O);
43371
+ }) : null, L = (c === null ? [] : getCollectionFieldOptions.call({ compile: p, getCollectionFields: v, filter: i }, b, j)).reduce((M, k) => Object.assign(M, { [k.value]: k }), {});
43372
+ j && (L[j.value] = j), g(L);
43367
43373
  }, [f, l, i, c]), useEffect(() => {
43368
43374
  const j = e.multiple ? o : o ? [o] : [];
43369
- if (!(j != null && j.length) || j.every((O) => !!h[O]))
43375
+ if (!(j != null && j.length) || j.every((L) => !!h[L]))
43370
43376
  return;
43371
43377
  const w = [];
43372
- j.forEach((O) => {
43373
- const M = O.split(".");
43378
+ j.forEach((L) => {
43379
+ const M = L.split(".");
43374
43380
  let k = h[M[0]];
43375
- for (let L = 1; L < M.length && k; L++) {
43376
- const q = M.slice(0, L + 1).join(".");
43381
+ for (let O = 1; O < M.length && k; O++) {
43382
+ const q = M.slice(0, O + 1).join(".");
43377
43383
  if (h[q]) {
43378
43384
  k = h[q];
43379
43385
  break;
43380
43386
  }
43381
43387
  if (!k.isLeaf && k.loadChildren) {
43382
- const E = k.loadChildren(k);
43383
- E != null && E.length && (w.push(...E), k = E.find((V) => V.value === M.slice(0, L + 1).join(".")));
43388
+ const V = k.loadChildren(k);
43389
+ V != null && V.length && (w.push(...V), k = V.find((E) => E.value === M.slice(0, O + 1).join(".")));
43384
43390
  }
43385
43391
  }
43386
- }), g((O) => w.reduce((M, k) => Object.assign(M, { [k.value]: k }), x({}, O)));
43392
+ }), g((L) => w.reduce((M, k) => Object.assign(M, { [k.value]: k }), x({}, L)));
43387
43393
  }, [o, F.length, e.multiple]);
43388
43394
  const T = useCallback(
43389
43395
  (j) => {
@@ -43391,30 +43397,30 @@ const FieldsTreeSelect = (e) => {
43391
43397
  n(j);
43392
43398
  return;
43393
43399
  }
43394
- const w = j.map((k) => k.value).filter(Boolean), O = new Set(w), M = I.find((k) => !O.has(k.value));
43400
+ const w = j.map((k) => k.value).filter(Boolean), L = new Set(w), M = I.find((k) => !L.has(k.value));
43395
43401
  if (M) {
43396
43402
  const k = `${M.value}.`;
43397
- Object.keys(h).forEach((L) => {
43398
- L.startsWith(k) && O.delete(L);
43403
+ Object.keys(h).forEach((O) => {
43404
+ O.startsWith(k) && L.delete(O);
43399
43405
  });
43400
43406
  } else
43401
43407
  u && w.forEach((k) => {
43402
- const L = k.split(".");
43403
- if (L.length)
43404
- for (let q = 1; q <= L.length; q++)
43405
- O.add(L.slice(0, q).join("."));
43408
+ const O = k.split(".");
43409
+ if (O.length)
43410
+ for (let q = 1; q <= O.length; q++)
43411
+ L.add(O.slice(0, q).join("."));
43406
43412
  });
43407
- n(Array.from(O));
43413
+ n(Array.from(L));
43408
43414
  },
43409
43415
  [e.multiple, I, n, h]
43410
43416
  ), D = useCallback(
43411
43417
  (j) => {
43412
43418
  var q;
43413
- const { value: w, onClose: O, disabled: M, closable: k } = j;
43419
+ const { value: w, onClose: L, disabled: M, closable: k } = j;
43414
43420
  if (!w)
43415
43421
  return null;
43416
- const { fullTitle: L } = (q = h[w]) != null ? q : {};
43417
- return /* @__PURE__ */ jsx(Tag, { closable: k && !M, onClose: O, children: L == null ? void 0 : L.join(" / ") });
43422
+ const { fullTitle: O } = (q = h[w]) != null ? q : {};
43423
+ return /* @__PURE__ */ jsx(Tag, { closable: k && !M, onClose: L, children: O == null ? void 0 : O.join(" / ") });
43418
43424
  },
43419
43425
  [h]
43420
43426
  ), $ = Array.isArray(I) ? I.filter((j) => j.value in h) : I, B = e.multiple ? o : o != null ? [o] : [];
@@ -43472,21 +43478,21 @@ const InternalAssociationSelect$1 = observer$1(
43472
43478
  const B = uid();
43473
43479
  return f.addEffects(B, () => {
43474
43480
  onFieldInputValueChange("*", (N) => {
43475
- var M, k, L, q, E, V;
43476
- const j = filterAnalyses((L = (k = (M = r.componentProps) == null ? void 0 : M.service) == null ? void 0 : k.params) == null ? void 0 : L.filter) || [], w = getFieldPath(N.address.entire), O = getFieldPath(r.address.entire);
43477
- j.includes((q = N == null ? void 0 : N.props) == null ? void 0 : q.name) && r.value && isEqual(N == null ? void 0 : N.indexes, r == null ? void 0 : r.indexes) && ((E = N == null ? void 0 : N.props) == null ? void 0 : E.name) !== r.props.name && (!((V = r == null ? void 0 : r.indexes) != null && V.length) || isEqual(w, O)) && (r.setValue(null), p(null));
43481
+ var M, k, O, q, V, E;
43482
+ const j = filterAnalyses((O = (k = (M = r.componentProps) == null ? void 0 : M.service) == null ? void 0 : k.params) == null ? void 0 : O.filter) || [], w = getFieldPath(N.address.entire), L = getFieldPath(r.address.entire);
43483
+ j.includes((q = N == null ? void 0 : N.props) == null ? void 0 : q.name) && r.value && isEqual(N == null ? void 0 : N.indexes, r == null ? void 0 : r.indexes) && ((V = N == null ? void 0 : N.props) == null ? void 0 : V.name) !== r.props.name && (!((E = r == null ? void 0 : r.indexes) != null && E.length) || isEqual(w, L)) && (r.setValue(null), p(null));
43478
43484
  });
43479
43485
  }), () => {
43480
43486
  f.removeEffects(B);
43481
43487
  };
43482
43488
  }, []);
43483
43489
  const R = (B) => z(void 0, null, function* () {
43484
- var O, M;
43490
+ var L, M;
43485
43491
  const { search: N, callBack: j } = B, {
43486
43492
  data: { data: w }
43487
43493
  } = yield b.create({
43488
43494
  values: {
43489
- [((M = (O = r == null ? void 0 : r.componentProps) == null ? void 0 : O.fieldNames) == null ? void 0 : M.label) || "id"]: N
43495
+ [((M = (L = r == null ? void 0 : r.componentProps) == null ? void 0 : L.fieldNames) == null ? void 0 : M.label) || "id"]: N
43490
43496
  }
43491
43497
  });
43492
43498
  if (w) {
@@ -43857,40 +43863,73 @@ attachmentFileTypes.add({
43857
43863
  return e.preview ? e.preview : e.url ? e.url : e.originFileObj ? URL.createObjectURL(e.originFileObj) : null;
43858
43864
  },
43859
43865
  Previewer({ index: e, list: t, onSwitchIndex: o }) {
43860
- var r, a, i, l;
43861
- const n = useCallback(
43862
- (c) => {
43863
- c.preventDefault();
43864
- const u = t[e];
43865
- saveAs(u.url, `${u.title}${u.extname}`);
43866
+ var c, u, d, p;
43867
+ const [n, r] = useState(0), a = useCallback(
43868
+ (m) => {
43869
+ m.preventDefault();
43870
+ const h = t[e];
43871
+ saveAs(h.url, `${h.title}${h.extname}`);
43866
43872
  },
43867
43873
  [e, t]
43868
- );
43869
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [
43874
+ ), i = useCallback(() => {
43875
+ r((m) => (m - 90) % 360);
43876
+ }, []), l = useCallback(() => {
43877
+ r((m) => (m + 90) % 360);
43878
+ }, []);
43879
+ return useEffect(() => {
43880
+ const m = document.querySelector(".ril-image-current");
43881
+ if (!m)
43882
+ return;
43883
+ let { transform: h } = m.style || {};
43884
+ const g = `rotate(${n}deg)`;
43885
+ (h == null ? void 0 : h.match(/rotate\(-?(\d+)deg\)/)) ? h = h.replace(/rotate\(-?(\d+)deg\)/, g) : h = `${h} ${g}`, m.style.transform = h;
43886
+ }, [n]), /* @__PURE__ */ jsxs(Fragment$1, { children: [
43870
43887
  /* @__PURE__ */ jsx(LightBoxGlobalStyle, {}),
43871
43888
  /* @__PURE__ */ jsx(
43872
43889
  LightBox,
43873
43890
  {
43874
- mainSrc: (r = t[e]) == null ? void 0 : r.url,
43875
- nextSrc: (a = t[(e + 1) % t.length]) == null ? void 0 : a.url,
43876
- prevSrc: (i = t[(e + t.length - 1) % t.length]) == null ? void 0 : i.url,
43891
+ mainSrc: (c = t[e]) == null ? void 0 : c.url,
43892
+ nextSrc: (u = t[(e + 1) % t.length]) == null ? void 0 : u.url,
43893
+ prevSrc: (d = t[(e + t.length - 1) % t.length]) == null ? void 0 : d.url,
43877
43894
  onCloseRequest: () => o(null),
43878
43895
  onMovePrevRequest: () => o((e + t.length - 1) % t.length),
43879
43896
  onMoveNextRequest: () => o((e + 1) % t.length),
43880
- imageTitle: (l = t[e]) == null ? void 0 : l.title,
43897
+ imageTitle: (p = t[e]) == null ? void 0 : p.title,
43881
43898
  toolbarButtons: [
43882
43899
  /* @__PURE__ */ jsx(
43883
43900
  "button",
43884
43901
  {
43885
- style: { fontSize: 22, background: "none", lineHeight: 1 },
43886
43902
  type: "button",
43887
43903
  "aria-label": "Download",
43888
43904
  title: "Download",
43889
43905
  className: "ril-zoom-in ril__toolbarItemChild ril__builtinButton",
43890
- onClick: n,
43906
+ style: { fontSize: 22, background: "none", lineHeight: 1 },
43907
+ onClick: a,
43891
43908
  children: /* @__PURE__ */ jsx(DownloadOutlined, {})
43892
43909
  },
43893
43910
  "preview-img"
43911
+ ),
43912
+ /* @__PURE__ */ jsx(
43913
+ "button",
43914
+ {
43915
+ type: "button",
43916
+ className: "ril-zoom-in ril__toolbarItemChild ril__builtinButton",
43917
+ style: { fontSize: 22, background: "none", lineHeight: 1 },
43918
+ onClick: i,
43919
+ children: /* @__PURE__ */ jsx(UndoOutlined, {})
43920
+ },
43921
+ "rotate-left"
43922
+ ),
43923
+ /* @__PURE__ */ jsx(
43924
+ "button",
43925
+ {
43926
+ type: "button",
43927
+ className: "ril-zoom-in ril__toolbarItemChild ril__builtinButton",
43928
+ style: { fontSize: 22, background: "none", lineHeight: 1 },
43929
+ onClick: l,
43930
+ children: /* @__PURE__ */ jsx(RedoOutlined, {})
43931
+ },
43932
+ "rotate-right"
43894
43933
  )
43895
43934
  ]
43896
43935
  }
@@ -44134,9 +44173,9 @@ function Uploader(o) {
44134
44173
  if (m(B), a) {
44135
44174
  const j = $.fileList.filter((w) => w.status === "done");
44136
44175
  if (j.length) {
44137
- const w = [...u, ...j.map((O) => {
44176
+ const w = [...u, ...j.map((L) => {
44138
44177
  var M;
44139
- return c((M = O.response) == null ? void 0 : M.data);
44178
+ return c((M = L.response) == null ? void 0 : M.data);
44140
44179
  })];
44141
44180
  B.length ? d(w) : (l == null || l([...i || [], ...w]), d([]));
44142
44181
  }
@@ -44498,10 +44537,10 @@ const InternalFileManager = (e) => {
44498
44537
  setSelectedRows: u,
44499
44538
  collectionField: b
44500
44539
  }, R = () => {
44501
- const { setVisible: B } = useActionContext(), { multiple: N, selectedRows: j, onChange: w, options: O, collectionField: M } = useContext(RecordPickerContext);
44540
+ const { setVisible: B } = useActionContext(), { multiple: N, selectedRows: j, onChange: w, options: L, collectionField: M } = useContext(RecordPickerContext);
44502
44541
  return {
44503
44542
  onClick() {
44504
- w(N ? unionBy(j, O, (M == null ? void 0 : M.targetKey) || "id") : (j == null ? void 0 : j[0]) || null), B(!1);
44543
+ w(N ? unionBy(j, L, (M == null ? void 0 : M.targetKey) || "id") : (j == null ? void 0 : j[0]) || null), B(!1);
44505
44544
  }
44506
44545
  };
44507
44546
  };
@@ -44563,36 +44602,36 @@ const InternalFileManager = (e) => {
44563
44602
  useEffect(() => {
44564
44603
  var j;
44565
44604
  if (r) {
44566
- const w = Array.isArray(r) ? extractLastNonNullValueObjects(r == null ? void 0 : r.filter((M) => M.value), !0) : transformNestedData(r), O = (j = w == null ? void 0 : w.map) == null ? void 0 : j.call(w, (M) => ({
44605
+ const w = Array.isArray(r) ? extractLastNonNullValueObjects(r == null ? void 0 : r.filter((M) => M.value), !0) : transformNestedData(r), L = (j = w == null ? void 0 : w.map) == null ? void 0 : j.call(w, (M) => ({
44567
44606
  key: M.parentId,
44568
44607
  children: [],
44569
44608
  value: M
44570
44609
  }));
44571
- i(O);
44610
+ i(L);
44572
44611
  }
44573
44612
  }, []);
44574
44613
  const R = useCallback(
44575
44614
  (j) => {
44576
44615
  try {
44577
44616
  return j == null ? void 0 : j.filter((w) => ["number", "string"].includes(typeof w[S.value])).map((w) => {
44578
- var M, k, L;
44579
- let O = p(w[S.label]);
44617
+ var M, k, O;
44618
+ let L = p(w[S.label]);
44580
44619
  if ((M = v == null ? void 0 : v.uiSchema) != null && M.enum)
44581
- if (Array.isArray(O))
44582
- O = O.map((q, E) => {
44620
+ if (Array.isArray(L))
44621
+ L = L.map((q, V) => {
44583
44622
  var G, U;
44584
- const V = (U = (G = v.uiSchema.enum).find) == null ? void 0 : U.call(G, (H) => H.value === q);
44585
- return V ? /* @__PURE__ */ jsx(Tag, { color: V.color, style: { marginRight: 3 }, children: (V == null ? void 0 : V.label) || q }, E) : /* @__PURE__ */ jsx(Tag, { children: q }, q);
44623
+ const E = (U = (G = v.uiSchema.enum).find) == null ? void 0 : U.call(G, (H) => H.value === q);
44624
+ return E ? /* @__PURE__ */ jsx(Tag, { color: E.color, style: { marginRight: 3 }, children: (E == null ? void 0 : E.label) || q }, V) : /* @__PURE__ */ jsx(Tag, { children: q }, q);
44586
44625
  }).reverse();
44587
44626
  else {
44588
- const q = (L = (k = v.uiSchema.enum).find) == null ? void 0 : L.call(k, (E) => E.value === O);
44589
- q && (O = /* @__PURE__ */ jsx(Tag, { color: q.color, children: q.label }));
44627
+ const q = (O = (k = v.uiSchema.enum).find) == null ? void 0 : O.call(k, (V) => V.value === L);
44628
+ q && (L = /* @__PURE__ */ jsx(Tag, { color: q.color, children: q.label }));
44590
44629
  }
44591
- return (v == null ? void 0 : v.type) === "date" && (O = dayjs(O).format("YYYY-MM-DD")), o ? o({
44592
- [S.label]: O || EMPTY,
44630
+ return (v == null ? void 0 : v.type) === "date" && (L = dayjs(L).format("YYYY-MM-DD")), o ? o({
44631
+ [S.label]: L || EMPTY,
44593
44632
  [S.value]: w[S.value]
44594
44633
  }) : P(x({}, w), {
44595
- [S.label]: O || EMPTY,
44634
+ [S.label]: L || EMPTY,
44596
44635
  [S.value]: w[S.value]
44597
44636
  });
44598
44637
  }).filter(Boolean);
@@ -44602,46 +44641,46 @@ const InternalFileManager = (e) => {
44602
44641
  },
44603
44642
  [v == null ? void 0 : v.uiSchema, S]
44604
44643
  ), T = (j) => z(void 0, null, function* () {
44605
- var O, M;
44644
+ var L, M;
44606
44645
  const w = yield C.list({
44607
44646
  pageSize: 200,
44608
44647
  params: h == null ? void 0 : h.params,
44609
- filter: mergeFilter([j, (O = h == null ? void 0 : h.params) == null ? void 0 : O.filter]),
44648
+ filter: mergeFilter([j, (L = h == null ? void 0 : h.params) == null ? void 0 : L.filter]),
44610
44649
  tree: j.parentId ? void 0 : !0
44611
44650
  });
44612
44651
  return (M = w == null ? void 0 : w.data) == null ? void 0 : M.data;
44613
- }), D = (j, w, O) => z(void 0, null, function* () {
44652
+ }), D = (j, w, L) => z(void 0, null, function* () {
44614
44653
  const M = yield T({ parentId: w == null ? void 0 : w.id }), k = [...a];
44615
- if (k.splice(O + 1), k[O] = P(x({}, k[O]), { value: w }), w != null && w.id && (k[O + 1] = { key: w == null ? void 0 : w.id, children: (M == null ? void 0 : M.length) > 0 ? M : null }), i(k), ["o2m", "m2m"].includes(g.interface)) {
44616
- const L = Array.isArray(f.fieldValue) ? f.fieldValue : [];
44617
- L[I.index] = w, f.fieldValue = L;
44654
+ if (k.splice(L + 1), k[L] = P(x({}, k[L]), { value: w }), w != null && w.id && (k[L + 1] = { key: w == null ? void 0 : w.id, children: (M == null ? void 0 : M.length) > 0 ? M : null }), i(k), ["o2m", "m2m"].includes(g.interface)) {
44655
+ const O = Array.isArray(f.fieldValue) ? f.fieldValue : [];
44656
+ O[I.index] = w, f.fieldValue = O;
44618
44657
  } else
44619
44658
  f.value = w;
44620
44659
  k.length === 1 && !k[0].value ? n == null || n(null) : n == null || n(k);
44621
- }), $ = (j, w, O) => z(void 0, null, function* () {
44622
- var M, k, L;
44660
+ }), $ = (j, w, L) => z(void 0, null, function* () {
44661
+ var M, k, O;
44623
44662
  if (j) {
44624
44663
  d(!0);
44625
44664
  const q = yield T({ parentId: w == null ? void 0 : w.key });
44626
- if (d(!1), c(q), O === (a == null ? void 0 : a.length) - 1 && ((M = w == null ? void 0 : w.value) != null && M.id)) {
44627
- const E = yield T({ parentId: (k = w == null ? void 0 : w.value) == null ? void 0 : k.id }), V = [...a];
44628
- V.splice(O + 1), V[O] = P(x({}, V[O]), { value: w == null ? void 0 : w.value }), V[O + 1] = { key: (L = w == null ? void 0 : w.value) == null ? void 0 : L.id, children: (E == null ? void 0 : E.length) > 0 ? E : null }, i(V), n == null || n(V);
44665
+ if (d(!1), c(q), L === (a == null ? void 0 : a.length) - 1 && ((M = w == null ? void 0 : w.value) != null && M.id)) {
44666
+ const V = yield T({ parentId: (k = w == null ? void 0 : w.value) == null ? void 0 : k.id }), E = [...a];
44667
+ E.splice(L + 1), E[L] = P(x({}, E[L]), { value: w == null ? void 0 : w.value }), E[L + 1] = { key: (O = w == null ? void 0 : w.value) == null ? void 0 : O.id, children: (V == null ? void 0 : V.length) > 0 ? V : null }, i(E), n == null || n(E);
44629
44668
  }
44630
44669
  }
44631
44670
  }), B = (j, w) => z(void 0, null, function* () {
44632
- const O = j ? {
44671
+ const L = j ? {
44633
44672
  [S.label]: {
44634
44673
  [F]: j
44635
44674
  }
44636
44675
  } : {};
44637
44676
  d(!0);
44638
- const M = yield T(P(x({}, O), {
44677
+ const M = yield T(P(x({}, L), {
44639
44678
  parentId: w == null ? void 0 : w.key
44640
44679
  }));
44641
44680
  d(!1), c(M);
44642
44681
  });
44643
44682
  return /* @__PURE__ */ jsx(Space$1, { wrap: !0, children: a.map((j, w) => {
44644
- var O, M, k;
44683
+ var L, M, k;
44645
44684
  return j.children && /* @__PURE__ */ jsx(
44646
44685
  Select$1,
44647
44686
  {
@@ -44652,16 +44691,16 @@ const InternalFileManager = (e) => {
44652
44691
  filterOption: !1,
44653
44692
  filterSort: null,
44654
44693
  defaultValue: {
44655
- label: (O = j == null ? void 0 : j.value) == null ? void 0 : O[S.label],
44694
+ label: (L = j == null ? void 0 : j.value) == null ? void 0 : L[S.label],
44656
44695
  value: (M = j == null ? void 0 : j.value) == null ? void 0 : M[S.value]
44657
44696
  },
44658
44697
  labelInValue: !0,
44659
- onSearch: (L) => B(L, j),
44698
+ onSearch: (O) => B(O, j),
44660
44699
  fieldNames: S,
44661
44700
  style: { minWidth: 150 },
44662
- onChange: (L, q) => D(L, q, w),
44701
+ onChange: (O, q) => D(O, q, w),
44663
44702
  options: u ? [] : R(l),
44664
- onDropdownVisibleChange: (L) => $(L, j, w),
44703
+ onDropdownVisibleChange: (O) => $(O, j, w),
44665
44704
  notFoundContent: u ? /* @__PURE__ */ jsx(Spin, { size: "small" }) : null
44666
44705
  },
44667
44706
  `${(k = j.value) == null ? void 0 : k.id}+ ${j.key} + ${S.label}`
@@ -44962,9 +45001,9 @@ const useTableSelectorProps$2 = () => {
44962
45001
  }, InternalPicker = observer$1(
44963
45002
  (e) => {
44964
45003
  var q;
44965
- const L = e, { value: t, multiple: o, openSize: n, onChange: r, quickUpload: a, selectFile: i, shouldMountElement: l } = L, c = Y(L, ["value", "multiple", "openSize", "onChange", "quickUpload", "selectFile", "shouldMountElement"]), u = useField(), d = useFieldNames$1(e), [p, m] = useState(!1), h = useFieldSchema(), g = useInsertSchema$1("Selector"), { options: f } = useAssociationFieldContext(), { collectionName: C } = useFormBlockContext(), b = useCompile(), y = useLabelUiSchema$1(f, (d == null ? void 0 : d.label) || "label"), S = h["x-add-new"], [v, F] = useState([]), I = useCollectionRecordData(), R = useMemo(() => t && Object.keys(t).length > 0 ? (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((V) => {
44966
- const G = V == null ? void 0 : V[d.label];
44967
- return P(x({}, V), {
45004
+ const O = e, { value: t, multiple: o, openSize: n, onChange: r, quickUpload: a, selectFile: i, shouldMountElement: l } = O, c = Y(O, ["value", "multiple", "openSize", "onChange", "quickUpload", "selectFile", "shouldMountElement"]), u = useField(), d = useFieldNames$1(e), [p, m] = useState(!1), h = useFieldSchema(), g = useInsertSchema$1("Selector"), { options: f } = useAssociationFieldContext(), { collectionName: C } = useFormBlockContext(), b = useCompile(), y = useLabelUiSchema$1(f, (d == null ? void 0 : d.label) || "label"), S = h["x-add-new"], [v, F] = useState([]), I = useCollectionRecordData(), R = useMemo(() => t && Object.keys(t).length > 0 ? (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((E) => {
45005
+ const G = E == null ? void 0 : E[d.label];
45006
+ return P(x({}, E), {
44968
45007
  [d.label]: getLabelFormatValue$1(b(y), b(G))
44969
45008
  });
44970
45009
  }) : [], [t == null ? void 0 : t.length, d.label]), T = {
@@ -44981,29 +45020,29 @@ const useTableSelectorProps$2 = () => {
44981
45020
  collectionField: f,
44982
45021
  currentFormCollection: C
44983
45022
  }, { isMobileLayout: D } = useMobileLayout(), $ = () => {
44984
- var E;
44985
- return o == null ? null : Array.isArray(t) ? (E = t.filter(Boolean)) == null ? void 0 : E.map((V) => V == null ? void 0 : V[d.value]) : t == null ? void 0 : t[d.value];
45023
+ var V;
45024
+ return o == null ? null : Array.isArray(t) ? (V = t.filter(Boolean)) == null ? void 0 : V.map((E) => E == null ? void 0 : E[d.value]) : t == null ? void 0 : t[d.value];
44986
45025
  }, B = () => {
44987
- var E;
44988
- return o == null ? null : Array.isArray(t) ? (E = t.filter(Boolean)) == null ? void 0 : E.map((V) => ({
44989
- [d.label]: b(V == null ? void 0 : V[d.label]),
44990
- [d.value]: V == null ? void 0 : V[d.value]
45026
+ var V;
45027
+ return o == null ? null : Array.isArray(t) ? (V = t.filter(Boolean)) == null ? void 0 : V.map((E) => ({
45028
+ [d.label]: b(E == null ? void 0 : E[d.label]),
45029
+ [d.value]: E == null ? void 0 : E[d.value]
44991
45030
  })) : [{ [d.label]: b(t == null ? void 0 : t[d.label]), [d.value]: t == null ? void 0 : t[d.value] }];
44992
45031
  }, N = () => {
44993
- const E = (f == null ? void 0 : f.targetKey) || "id", V = R.map((U) => U[E]).filter(Boolean);
44994
- return V.length ? { $and: [{ [`${E}.$ne`]: V }] } : {};
45032
+ const V = (f == null ? void 0 : f.targetKey) || "id", E = R.map((U) => U[V]).filter(Boolean);
45033
+ return E.length ? { $and: [{ [`${V}.$ne`]: E }] } : {};
44995
45034
  };
44996
45035
  useEffect(() => {
44997
45036
  t || F([]);
44998
45037
  }, [t]);
44999
45038
  const j = () => {
45000
- const { setVisible: E } = useActionContext(), { multiple: V, selectedRows: G, onChange: U, options: H, collectionField: K } = useContext(RecordPickerContext);
45039
+ const { setVisible: V } = useActionContext(), { multiple: E, selectedRows: G, onChange: U, options: H, collectionField: K } = useContext(RecordPickerContext);
45001
45040
  return {
45002
45041
  onClick() {
45003
- U(V ? unionBy(G, H, (K == null ? void 0 : K.targetKey) || "id") : (G == null ? void 0 : G[0]) || null), E(!1);
45042
+ U(E ? unionBy(G, H, (K == null ? void 0 : K.targetKey) || "id") : (G == null ? void 0 : G[0]) || null), V(!1);
45004
45043
  },
45005
45044
  style: {
45006
- display: V === !1 ? "none" : "block"
45045
+ display: E === !1 ? "none" : "block"
45007
45046
  }
45008
45047
  };
45009
45048
  }, w = useMemo(
@@ -45012,7 +45051,7 @@ const useTableSelectorProps$2 = () => {
45012
45051
  useTableSelectorProps: useTableSelectorProps$2
45013
45052
  }),
45014
45053
  []
45015
- ), O = useMemo(
45054
+ ), L = useMemo(
45016
45055
  () => D ? transformMultiColumnToSingleColumn(h) : h,
45017
45056
  [D, h]
45018
45057
  ), M = useSchemaOptionsContext(), k = P(x({}, M.components), {
@@ -45032,23 +45071,23 @@ const useTableSelectorProps$2 = () => {
45032
45071
  }, c), {
45033
45072
  mode: o ? "multiple" : e.mode,
45034
45073
  fieldNames: d,
45035
- onDropdownVisibleChange: (E) => {
45074
+ onDropdownVisibleChange: (V) => {
45036
45075
  g(schema$1.Selector), m(!0);
45037
45076
  },
45038
45077
  allowClear: !0,
45039
- onChange: (E) => {
45040
- if (E) {
45041
- if (Array.isArray(E)) {
45042
- if (!E.length) {
45078
+ onChange: (V) => {
45079
+ if (V) {
45080
+ if (Array.isArray(V)) {
45081
+ if (!V.length) {
45043
45082
  r([]), F([]);
45044
45083
  return;
45045
45084
  }
45046
- const V = R == null ? void 0 : R.filter((G) => E.includes(G[d.value]));
45047
- r(V), F(V);
45085
+ const E = R == null ? void 0 : R.filter((G) => V.includes(G[d.value]));
45086
+ r(E), F(E);
45048
45087
  }
45049
45088
  } else {
45050
- const V = o ? [] : null;
45051
- r(V), F(V);
45089
+ const E = o ? [] : null;
45090
+ r(E), F(E);
45052
45091
  }
45053
45092
  },
45054
45093
  options: B(),
@@ -45062,7 +45101,7 @@ const useTableSelectorProps$2 = () => {
45062
45101
  onlyRenderProperties: !0,
45063
45102
  basePath: u.address,
45064
45103
  schema: h,
45065
- filterProperties: (E) => E["x-component"] === "Action"
45104
+ filterProperties: (V) => V["x-component"] === "Action"
45066
45105
  }
45067
45106
  ) }) })
45068
45107
  ] }),
@@ -45080,8 +45119,8 @@ const useTableSelectorProps$2 = () => {
45080
45119
  {
45081
45120
  onlyRenderProperties: !0,
45082
45121
  basePath: u.address,
45083
- schema: O,
45084
- filterProperties: (E) => E["x-component"] === "AssociationField.Selector"
45122
+ schema: L,
45123
+ filterProperties: (V) => V["x-component"] === "AssociationField.Selector"
45085
45124
  }
45086
45125
  ) }) }) }) }) }))
45087
45126
  }
@@ -45118,10 +45157,10 @@ const RenderRecord = React.memo(
45118
45157
  const R = useCallback(() => I.current, []);
45119
45158
  return useEffect(() => {
45120
45159
  const T = toArr$3(h).map((D, $, B) => {
45121
- const N = D == null ? void 0 : D[(e == null ? void 0 : e.label) || "label"], j = t ? transformNestedData(D).map((k) => k == null ? void 0 : k[(e == null ? void 0 : e.label) || "label"]).join(" / ") : isObject(N) ? JSON.stringify(N) : N, w = toValue$4(o(j), "N/A"), O = n(
45160
+ const N = D == null ? void 0 : D[(e == null ? void 0 : e.label) || "label"], j = t ? transformNestedData(D).map((k) => k == null ? void 0 : k[(e == null ? void 0 : e.label) || "label"]).join(" / ") : isObject(N) ? JSON.stringify(N) : N, w = toValue$4(o(j), "N/A"), L = n(
45122
45161
  (D == null ? void 0 : D.__collection) || (r == null ? void 0 : r.target),
45123
45162
  (e == null ? void 0 : e.label) || "label"
45124
- ), M = getLabelFormatValue$1(o(O), w, !0);
45163
+ ), M = getLabelFormatValue$1(o(L), w, !0);
45125
45164
  return /* @__PURE__ */ jsxs(Fragment, { children: [
45126
45165
  /* @__PURE__ */ jsx("span", { children: a ? M : i !== !1 ? /* @__PURE__ */ jsx(
45127
45166
  "a",
@@ -45130,7 +45169,7 @@ const RenderRecord = React.memo(
45130
45169
  g(!0);
45131
45170
  },
45132
45171
  onClick: (k) => {
45133
- var L;
45172
+ var O;
45134
45173
  g(!0), k.stopPropagation(), k.preventDefault(), l && !hasAddedViewer(u.properties) && (c(schema$1.Viewer), F.current = !0), F.current ? (setTimeout(() => {
45135
45174
  f == null || f({ recordData: D }), d({
45136
45175
  recordData: D,
@@ -45140,7 +45179,7 @@ const RenderRecord = React.memo(
45140
45179
  }), F.current = !1) : u.properties && (f == null || f({ recordData: D }), d({
45141
45180
  recordData: D,
45142
45181
  parentRecordData: p
45143
- })), (L = m == null ? void 0 : m.current) == null || L.setPopoverVisible(!1);
45182
+ })), (O = m == null ? void 0 : m.current) == null || O.setPopoverVisible(!1);
45144
45183
  },
45145
45184
  children: M
45146
45185
  }
@@ -45912,19 +45951,19 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
45912
45951
  }
45913
45952
  });
45914
45953
  Array.isArray(n.value) || (n.value = []);
45915
- const D = useCallback(({ form: w, fieldSchema: O, collectionField: M, getInterface: k }) => {
45916
- var L;
45917
- return !M || M.target && ((L = O["x-component-props"]) != null && L.mode) && !["Picker", "Select"].includes(O["x-component-props"].mode) ? !1 : !(w != null && w.readPretty) && !isPatternDisabled(O) && !interfacesOfUnsupportedDefaultValue.includes(M == null ? void 0 : M.interface) && !isSystemField(M, k);
45954
+ const D = useCallback(({ form: w, fieldSchema: L, collectionField: M, getInterface: k }) => {
45955
+ var O;
45956
+ return !M || M.target && ((O = L["x-component-props"]) != null && O.mode) && !["Picker", "Select"].includes(L["x-component-props"].mode) ? !1 : !(w != null && w.readPretty) && !isPatternDisabled(L) && !interfacesOfUnsupportedDefaultValue.includes(M == null ? void 0 : M.interface) && !isSystemField(M, k);
45918
45957
  }, []), $ = () => {
45919
- const { setVisible: w } = useActionContext(), { selectedRows: O, setSelectedRows: M } = useContext(RecordPickerContext);
45958
+ const { setVisible: w } = useActionContext(), { selectedRows: L, setSelectedRows: M } = useContext(RecordPickerContext);
45920
45959
  return {
45921
45960
  onClick() {
45922
- O.map((k) => n.value.push(markRecordAsNew(k))), n.onInput(n.value), n.initialValue = n.value, M([]), w(!1);
45961
+ L.map((k) => n.value.push(markRecordAsNew(k))), n.onInput(n.value), n.initialValue = n.value, M([]), w(!1);
45923
45962
  }
45924
45963
  };
45925
- }, B = useMemo(() => n.value && Object.keys(n.value).length > 0 ? (Array.isArray(n.value) ? n.value : n.value ? [n.value] : []).filter(Boolean).map((O) => {
45926
- const M = O == null ? void 0 : O[F.label];
45927
- return P(x({}, O), {
45964
+ }, B = useMemo(() => n.value && Object.keys(n.value).length > 0 ? (Array.isArray(n.value) ? n.value : n.value ? [n.value] : []).filter(Boolean).map((L) => {
45965
+ const M = L == null ? void 0 : L[F.label];
45966
+ return P(x({}, L), {
45928
45967
  [F.label]: getLabelFormatValue$1(I(R), I(M))
45929
45968
  });
45930
45969
  }) : [], [n.value, F == null ? void 0 : F.label]), N = {
@@ -45940,8 +45979,8 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
45940
45979
  setSelectedRows: v,
45941
45980
  collectionField: o
45942
45981
  }, j = () => {
45943
- const w = (o == null ? void 0 : o.targetKey) || "id", O = (n.value || []).map((k) => k == null ? void 0 : k[w]).filter(Boolean);
45944
- return O.length ? { $and: [{ [`${w}.$ne`]: O }] } : {};
45982
+ const w = (o == null ? void 0 : o.targetKey) || "id", L = (n.value || []).map((k) => k == null ? void 0 : k[w]).filter(Boolean);
45983
+ return L.length ? { $and: [{ [`${w}.$ne`]: L }] } : {};
45945
45984
  };
45946
45985
  return n.value.length > 0 ? /* @__PURE__ */ jsxs(
45947
45986
  Card,
@@ -45955,31 +45994,31 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
45955
45994
  `,
45956
45995
  children: [
45957
45996
  /* @__PURE__ */ jsxs(RefreshComponentProvider, { refresh: C, children: [
45958
- n.value.map((w, O) => {
45997
+ n.value.map((w, L) => {
45959
45998
  let M = a;
45960
45999
  return a || (M = !(w != null && w[o.targetKey])), /* @__PURE__ */ jsxs(React.Fragment, { children: [
45961
- /* @__PURE__ */ jsx("div", { style: { textAlign: "right" }, children: !n.readPretty && M && (!t["x-template-uid"] || O > 0) && /* @__PURE__ */ jsx(Tooltip, { title: c("Remove"), children: /* @__PURE__ */ jsx(
46000
+ /* @__PURE__ */ jsx("div", { style: { textAlign: "right" }, children: !n.readPretty && M && (!t["x-template-uid"] || L > 0) && /* @__PURE__ */ jsx(Tooltip, { title: c("Remove"), children: /* @__PURE__ */ jsx(
45962
46001
  CloseOutlined,
45963
46002
  {
45964
46003
  style: { zIndex: 1e3, color: "#a8a3a3" },
45965
46004
  onClick: () => {
45966
46005
  action(() => (spliceArrayState(n, {
45967
- startIndex: O,
46006
+ startIndex: L,
45968
46007
  deleteCount: 1
45969
- }), n.value.splice(O, 1), Array.isArray(n.initialValue) && n.initialValue.splice(O, 1), n.onInput(n.value)));
46008
+ }), n.value.splice(L, 1), Array.isArray(n.initialValue) && n.initialValue.splice(L, 1), n.onInput(n.value)));
45970
46009
  }
45971
46010
  }
45972
46011
  ) }, "remove") }),
45973
- /* @__PURE__ */ jsx(FormActiveFieldsProvider, { name: "nester", children: /* @__PURE__ */ jsx(SubFormProvider, { value: { value: w, collection: d, fieldSchema: t.parent }, children: /* @__PURE__ */ jsx(RecordProvider, { isNew: isNewRecord(w), record: w, parent: u, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: O, children: /* @__PURE__ */ jsx(DefaultValueProvider, { isAllowToSetDefaultValue: D, children: /* @__PURE__ */ jsx(
46012
+ /* @__PURE__ */ jsx(FormActiveFieldsProvider, { name: "nester", children: /* @__PURE__ */ jsx(SubFormProvider, { value: { value: w, collection: d, fieldSchema: t.parent }, children: /* @__PURE__ */ jsx(RecordProvider, { isNew: isNewRecord(w), record: w, parent: u, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: L, children: /* @__PURE__ */ jsx(DefaultValueProvider, { isAllowToSetDefaultValue: D, children: /* @__PURE__ */ jsx(
45974
46013
  NocoBaseRecursionField,
45975
46014
  {
45976
46015
  onlyRenderProperties: !0,
45977
- basePath: n.address.concat(O),
46016
+ basePath: n.address.concat(L),
45978
46017
  schema: h
45979
46018
  }
45980
46019
  ) }) }) }) }) }),
45981
46020
  /* @__PURE__ */ jsx(Divider$1, {})
45982
- ] }, O);
46021
+ ] }, L);
45983
46022
  }),
45984
46023
  /* @__PURE__ */ jsxs(Space$1, { children: [
45985
46024
  n.editable && r && /* @__PURE__ */ jsx(
@@ -45990,8 +46029,8 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
45990
46029
  action(() => {
45991
46030
  Array.isArray(n.value) || (n.value = []);
45992
46031
  const w = n.value.length;
45993
- return n.value.splice(w, 0, markRecordAsNew({})), each(n.form.fields, (O, M) => {
45994
- O || delete n.form.fields[M];
46032
+ return n.value.splice(w, 0, markRecordAsNew({})), each(n.form.fields, (L, M) => {
46033
+ L || delete n.form.fields[M];
45995
46034
  }), n.onInput(n.value);
45996
46035
  });
45997
46036
  }
@@ -46144,8 +46183,8 @@ const useColumnsDeepMemoized = (e) => {
46144
46183
  width: I && !l ? 0 : ((B = S["x-component-props"]) == null ? void 0 : B.width) || 100,
46145
46184
  render: (N, j) => {
46146
46185
  var M;
46147
- const w = (M = r.value) == null ? void 0 : M.indexOf(j), O = r.address.concat(j.__index || w);
46148
- return /* @__PURE__ */ jsx(SubFormProvider, { value: { value: j, collection: C, fieldSchema: a.parent }, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: j.__index || w, children: /* @__PURE__ */ jsx(RecordProvider, { isNew: isNewRecord(j), record: j, parent: d, children: /* @__PURE__ */ jsx(ColumnFieldProvider, { schema: S, basePath: O, children: /* @__PURE__ */ jsx("span", { role: "button", className: f, children: /* @__PURE__ */ jsx(RecursionField, { basePath: O, schema: S, onlyRenderProperties: !0 }) }, w) }) }) }) });
46186
+ const w = (M = r.value) == null ? void 0 : M.indexOf(j), L = r.address.concat(j.__index || w);
46187
+ return /* @__PURE__ */ jsx(SubFormProvider, { value: { value: j, collection: C, fieldSchema: a.parent }, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: j.__index || w, children: /* @__PURE__ */ jsx(RecordProvider, { isNew: isNewRecord(j), record: j, parent: d, children: /* @__PURE__ */ jsx(ColumnFieldProvider, { schema: S, basePath: L, children: /* @__PURE__ */ jsx("span", { role: "button", className: f, children: /* @__PURE__ */ jsx(RecursionField, { basePath: L, schema: S, onlyRenderProperties: !0 }) }, w) }) }) }) });
46149
46188
  },
46150
46189
  onCell: (N, j) => ({
46151
46190
  record: N,
@@ -46484,7 +46523,7 @@ const Table$1 = withDynamicSchemaProps(
46484
46523
  "onClickRow",
46485
46524
  "enableIndexColumn"
46486
46525
  ]), S = useArrayField(y), v = useFieldSchema(), { size: F = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, I = useCollection(), T = ((de = v == null ? void 0 : v.parent) == null ? void 0 : de["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: $ } = T, B = useMemoizedFn(y.onRowDragEnd || (() => {
46487
- })), N = usePaginationProps$2(o, a), j = useTableColumns$1(y, N), [w, O] = useState(() => D ? $ : []), [M, k] = useState(((be = S == null ? void 0 : S.data) == null ? void 0 : be.selectedRowKeys) || []), [L, q] = useState([]), E = (p == null ? void 0 : p.type) !== "none", V = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
46526
+ })), N = usePaginationProps$2(o, a), j = useTableColumns$1(y, N), [w, L] = useState(() => D ? $ : []), [M, k] = useState(((be = S == null ? void 0 : S.data) == null ? void 0 : be.selectedRowKeys) || []), [O, q] = useState([]), V = (p == null ? void 0 : p.type) !== "none", E = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
46488
46527
  & > td {
46489
46528
  background-color: ${t.controlItemBgActive} !important;
46490
46529
  }
@@ -46493,24 +46532,24 @@ const Table$1 = withDynamicSchemaProps(
46493
46532
  }
46494
46533
  `, [t.controlItemBgActive, t.controlItemBgActiveHover]), U = useMemo(() => C ? G : "", [G, C]), H = useMemo(() => C ? (se, te) => ({
46495
46534
  onClick: (ne) => {
46496
- isPortalInBody(ne.target) || C(se, q, L);
46535
+ isPortalInBody(ne.target) || C(se, q, O);
46497
46536
  },
46498
46537
  rowIndex: te
46499
- }) : null, [C, L]);
46538
+ }) : null, [C, O]);
46500
46539
  useDeepCompareEffect(() => {
46501
46540
  const se = D ? $ : [];
46502
- _.isEqual(se, w) || O(se);
46541
+ _.isEqual(se, w) || L(se);
46503
46542
  }, [D, $]);
46504
46543
  const K = useCallback((se) => {
46505
46544
  if (m)
46506
- return J(se);
46545
+ return X(se);
46507
46546
  if (se.key)
46508
46547
  return se.key;
46509
- if (V.current.has(se))
46510
- return V.current.get(se);
46548
+ if (E.current.has(se))
46549
+ return E.current.get(se);
46511
46550
  const te = uid();
46512
- return V.current.set(se, te), te;
46513
- }, []), J = useCallback(
46551
+ return E.current.set(se, te), te;
46552
+ }, []), X = useCallback(
46514
46553
  (se) => {
46515
46554
  var te;
46516
46555
  return Array.isArray(m) ? m.map((ne) => {
@@ -46519,7 +46558,7 @@ const Table$1 = withDynamicSchemaProps(
46519
46558
  }).join("-") : typeof m == "string" ? se[m] : (te = (m != null ? m : K)(se)) == null ? void 0 : te.toString();
46520
46559
  },
46521
46560
  [JSON.stringify(m), K]
46522
- ), W = useMemo(() => (Array.isArray(S == null ? void 0 : S.value) ? S.value : []).filter(Boolean), [S == null ? void 0 : S.value, (Se = S == null ? void 0 : S.value) == null ? void 0 : Se.length]), X = useMemo(() => (se) => {
46561
+ ), W = useMemo(() => (Array.isArray(S == null ? void 0 : S.value) ? S.value : []).filter(Boolean), [S == null ? void 0 : S.value, (Se = S == null ? void 0 : S.value) == null ? void 0 : Se.length]), J = useMemo(() => (se) => {
46523
46562
  const te = useCallback((ne) => {
46524
46563
  var ke, ve, Pe, Fe, Ie, Ae;
46525
46564
  if (!ne.active || !ne.over) {
@@ -46531,18 +46570,18 @@ const Table$1 = withDynamicSchemaProps(
46531
46570
  }, []);
46532
46571
  return /* @__PURE__ */ jsx(DndContext, { onDragEnd: te, children: /* @__PURE__ */ jsx("tbody", x({}, se)) });
46533
46572
  }, [S, B]);
46534
- X.displayName = "BodyWrapperComponent";
46573
+ J.displayName = "BodyWrapperComponent";
46535
46574
  const Z = useMemo(() => ({
46536
46575
  header: {
46537
46576
  wrapper: HeaderWrapperComponent,
46538
46577
  cell: HeaderCellComponent
46539
46578
  },
46540
46579
  body: {
46541
- wrapper: X,
46580
+ wrapper: J,
46542
46581
  row: BodyRowComponent,
46543
46582
  cell: BodyCellComponent
46544
46583
  }
46545
- }), [X]), Q = useMemo(() => p, [JSON.stringify(p)]), ee = useMemo(
46584
+ }), [J]), Q = useMemo(() => p, [JSON.stringify(p)]), ee = useMemo(
46546
46585
  () => ({
46547
46586
  rowSelection: b && Q ? x({
46548
46587
  type: "checkbox",
@@ -46565,14 +46604,14 @@ const Table$1 = withDynamicSchemaProps(
46565
46604
  role: "button",
46566
46605
  "aria-label": `table-index-${ne}`,
46567
46606
  className: cls(se ? "checked" : null, rowSelectCheckboxWrapperClass, {
46568
- [rowSelectCheckboxWrapperClassHover]: E
46607
+ [rowSelectCheckboxWrapperClassHover]: V
46569
46608
  }),
46570
46609
  children: [
46571
46610
  /* @__PURE__ */ jsxs("div", { className: cls(se ? "checked" : null, rowSelectCheckboxContentClass), children: [
46572
- l && /* @__PURE__ */ jsx(SortHandle$1, { id: J(te) }),
46611
+ l && /* @__PURE__ */ jsx(SortHandle$1, { id: X(te) }),
46573
46612
  c && /* @__PURE__ */ jsx(TableIndex$2, { index: ne })
46574
46613
  ] }),
46575
- E && /* @__PURE__ */ jsx(
46614
+ V && /* @__PURE__ */ jsx(
46576
46615
  "div",
46577
46616
  {
46578
46617
  className: cls(
@@ -46596,8 +46635,8 @@ const Table$1 = withDynamicSchemaProps(
46596
46635
  c,
46597
46636
  l,
46598
46637
  S,
46599
- J,
46600
- E,
46638
+ X,
46639
+ V,
46601
46640
  Q,
46602
46641
  N,
46603
46642
  b
@@ -46608,24 +46647,24 @@ const Table$1 = withDynamicSchemaProps(
46608
46647
  return l ? React.createElement(
46609
46648
  SortableContext$1,
46610
46649
  {
46611
- items: ((ne = (te = S.value) == null ? void 0 : te.map) == null ? void 0 : ne.call(te, J)) || []
46650
+ items: ((ne = (te = S.value) == null ? void 0 : te.map) == null ? void 0 : ne.call(te, X)) || []
46612
46651
  },
46613
46652
  se
46614
46653
  ) : React.createElement(React.Fragment, {}, se);
46615
46654
  },
46616
- [S, l, J]
46655
+ [S, l, X]
46617
46656
  ), { height: re, tableSizeRefCallback: ie } = useTableSize(), pe = useMemo(() => ({
46618
46657
  x: "max-content"
46619
46658
  }), []), ce = useMemo(() => ({
46620
46659
  x: "max-content",
46621
46660
  y: W.length > 0 ? re : void 0
46622
46661
  }), [re, pe, W]), fe = useCallback(
46623
- (se) => L.includes(se[m]) ? U : "",
46624
- [L, U, JSON.stringify(m)]
46662
+ (se) => O.includes(se[m]) ? U : "",
46663
+ [O, U, JSON.stringify(m)]
46625
46664
  ), ge = useCallback(
46626
46665
  (se, te) => {
46627
46666
  const ne = se ? [...w, te[I.getPrimaryKey()]] : w.filter((ae) => te[I.getPrimaryKey()] !== ae);
46628
- O(ne), g == null || g(se, te);
46667
+ L(ne), g == null || g(se, te);
46629
46668
  },
46630
46669
  [w, g, I]
46631
46670
  ), Ce = useMemo(() => ({
@@ -46710,23 +46749,23 @@ const Table$1 = withDynamicSchemaProps(
46710
46749
  }
46711
46750
  `, SubTable = observer$1(
46712
46751
  (e) => {
46713
- var k, L, q;
46752
+ var k, O, q;
46714
46753
  const { openSize: t } = e, { field: o, options: n, fieldSchema: r } = useAssociationFieldContext(), { t: a } = useTranslation(), [i, l] = useState(!1), [c, u] = useState([]), d = useFieldNames$1(e), p = useFieldSchema(), m = useCompile(), h = useLabelUiSchema$1(n, (d == null ? void 0 : d.label) || "label"), g = useCollectionRecord(), f = useCollection(), { allowSelectExistingRecord: C, allowAddnew: b, allowDisassociation: y, enableIndexColumn: S } = o.componentProps;
46715
46754
  useSubTableSpecialCase({ rootField: o, rootSchema: r });
46716
- const v = (E, V) => {
46717
- if (V !== void 0 && isArr(o.value) && E !== V)
46755
+ const v = (V, E) => {
46756
+ if (E !== void 0 && isArr(o.value) && V !== E)
46718
46757
  return action(() => {
46719
- const G = o.value[E];
46720
- return o.value.splice(E, 1), o.value.splice(V, 0, G), exchangeArrayState(o, {
46721
- fromIndex: E,
46722
- toIndex: V
46758
+ const G = o.value[V];
46759
+ return o.value.splice(V, 1), o.value.splice(E, 0, G), exchangeArrayState(o, {
46760
+ fromIndex: V,
46761
+ toIndex: E
46723
46762
  }), o.onInput(o.value);
46724
46763
  });
46725
46764
  };
46726
46765
  o.move = v;
46727
- const F = useMemo(() => o.value && Object.keys(o.value).length > 0 ? (Array.isArray(o.value) ? o.value : o.value ? [o.value] : []).filter(Boolean).map((V) => {
46728
- const G = V == null ? void 0 : V[d.label];
46729
- return P(x({}, V), {
46766
+ const F = useMemo(() => o.value && Object.keys(o.value).length > 0 ? (Array.isArray(o.value) ? o.value : o.value ? [o.value] : []).filter(Boolean).map((E) => {
46767
+ const G = E == null ? void 0 : E[d.label];
46768
+ return P(x({}, E), {
46730
46769
  [d.label]: getLabelFormatValue$1(m(h), m(G))
46731
46770
  });
46732
46771
  }) : [], [o.value, d == null ? void 0 : d.label]), I = {
@@ -46742,28 +46781,28 @@ const Table$1 = withDynamicSchemaProps(
46742
46781
  setSelectedRows: u,
46743
46782
  collectionField: n
46744
46783
  }, R = () => {
46745
- const { setVisible: E } = useActionContext(), { selectedRows: V, setSelectedRows: G } = useContext(RecordPickerContext);
46784
+ const { setVisible: V } = useActionContext(), { selectedRows: E, setSelectedRows: G } = useContext(RecordPickerContext);
46746
46785
  return {
46747
46786
  onClick() {
46748
46787
  var H;
46749
- Array.isArray(o.value) || (o.value = []), V.forEach((K) => o.value.push(markRecordAsNew(K))), o.onInput(o.value), o.initialValue = o.value, G([]), E(!1);
46788
+ Array.isArray(o.value) || (o.value = []), E.forEach((K) => o.value.push(markRecordAsNew(K))), o.onInput(o.value), o.initialValue = o.value, G([]), V(!1);
46750
46789
  const U = Math.ceil(o.value.length / (((H = o.componentProps) == null ? void 0 : H.pageSize) || 10));
46751
46790
  $(U);
46752
46791
  }
46753
46792
  };
46754
46793
  }, T = () => {
46755
- const E = (n == null ? void 0 : n.targetKey) || "id", V = (o.value || []).map((U) => U == null ? void 0 : U[E]).filter(Boolean);
46756
- return V.length ? { $and: [{ [`${E}.$ne`]: V }] } : {};
46794
+ const V = (n == null ? void 0 : n.targetKey) || "id", E = (o.value || []).map((U) => U == null ? void 0 : U[V]).filter(Boolean);
46795
+ return E.length ? { $and: [{ [`${V}.$ne`]: E }] } : {};
46757
46796
  }, [D, $] = useState(1), [B, N] = useState(((k = o.componentProps) == null ? void 0 : k.pageSize) || 10), { setFormValueChanged: j } = useActionContext();
46758
46797
  useEffect(() => {
46759
- var E;
46760
- N((E = o.componentProps) == null ? void 0 : E.pageSize);
46761
- }, [(L = o.componentProps) == null ? void 0 : L.pageSize]);
46762
- const w = useMemo(() => {
46763
46798
  var V;
46764
- const E = Math.ceil(((V = o.value) == null ? void 0 : V.length) / 10);
46799
+ N((V = o.componentProps) == null ? void 0 : V.pageSize);
46800
+ }, [(O = o.componentProps) == null ? void 0 : O.pageSize]);
46801
+ const w = useMemo(() => {
46802
+ var E;
46803
+ const V = Math.ceil(((E = o.value) == null ? void 0 : E.length) / 10);
46765
46804
  return {
46766
- current: D > E ? E : D,
46805
+ current: D > V ? V : D,
46767
46806
  pageSize: B || 10,
46768
46807
  total: o == null ? void 0 : o.value,
46769
46808
  onChange: (G, U) => {
@@ -46773,14 +46812,14 @@ const Table$1 = withDynamicSchemaProps(
46773
46812
  pageSizeOptions: ["10", "20", "50", "100"],
46774
46813
  hideOnSinglePage: !1
46775
46814
  };
46776
- }, [(q = o.value) == null ? void 0 : q.length, B, D]), O = () => {
46777
- const { field: E } = useAssociationFieldContext();
46815
+ }, [(q = o.value) == null ? void 0 : q.length, B, D]), L = () => {
46816
+ const { field: V } = useAssociationFieldContext();
46778
46817
  return {
46779
46818
  run() {
46780
46819
  var G;
46781
- E.value = E.value || [], E.value.push(markRecordAsNew({}));
46782
- const V = Math.ceil(E.value.length / (((G = E.componentProps) == null ? void 0 : G.pageSize) || 10));
46783
- return $(V), E.onInput(E.value);
46820
+ V.value = V.value || [], V.value.push(markRecordAsNew({}));
46821
+ const E = Math.ceil(V.value.length / (((G = V.componentProps) == null ? void 0 : G.pageSize) || 10));
46822
+ return $(E), V.onInput(V.value);
46784
46823
  }
46785
46824
  };
46786
46825
  }, M = () => ({
@@ -46797,7 +46836,7 @@ const Table$1 = withDynamicSchemaProps(
46797
46836
  field: o,
46798
46837
  showIndex: !0,
46799
46838
  dragSort: !1,
46800
- showDel: o.editable && (b !== !1 || C !== !1 || y !== !1) ? (E) => o.editable ? y !== !1 ? !0 : E == null ? void 0 : E.__isNewRecord__ : !1 : !1,
46839
+ showDel: o.editable && (b !== !1 || C !== !1 || y !== !1) ? (V) => o.editable ? y !== !1 ? !0 : V == null ? void 0 : V.__isNewRecord__ : !1 : !1,
46801
46840
  pagination: w,
46802
46841
  rowSelection: { type: "none", hideSelectAll: !0 },
46803
46842
  isSubTable: !0,
@@ -46818,7 +46857,7 @@ const Table$1 = withDynamicSchemaProps(
46818
46857
  b !== !1 && /* @__PURE__ */ jsx(
46819
46858
  Action.Link,
46820
46859
  {
46821
- useAction: O,
46860
+ useAction: L,
46822
46861
  title: /* @__PURE__ */ jsxs(Space$1, { style: { gap: 2 }, className: "nb-sub-table-addNew", children: [
46823
46862
  /* @__PURE__ */ jsx(PlusOutlined, {}),
46824
46863
  " ",
@@ -46865,7 +46904,7 @@ const Table$1 = withDynamicSchemaProps(
46865
46904
  onlyRenderProperties: !0,
46866
46905
  basePath: o.address,
46867
46906
  schema: p.parent,
46868
- filterProperties: (E) => E["x-component"] === "AssociationField.Selector"
46907
+ filterProperties: (V) => V["x-component"] === "AssociationField.Selector"
46869
46908
  }
46870
46909
  )
46871
46910
  }
@@ -46964,26 +47003,26 @@ const ReadPretty$6 = observer$1(
46964
47003
  InternalAssociationSelect.displayName = "InternalAssociationSelect";
46965
47004
  const AssociationSelect = InternalAssociationSelect;
46966
47005
  AssociationSelect.Designer = function e() {
46967
- var O, M, k, L, q, E, V, G, U, H, K;
46968
- const { getCollectionFields: t, getInterface: o, getCollectionJoinField: n, getCollection: r, isTitleField: a } = useCollectionManager_deprecated(), { getField: i } = useCollection_deprecated(), { form: l } = useFormBlockContext(), c = useField(), u = useFieldSchema(), { t: d } = useTranslation(), p = useFilterByTk(), { dn: m, refresh: h, insertAdjacent: g } = useDesignable(), f = useCompile(), C = useIsShowMultipleSwitch(), { isAllowToSetDefaultValue: b } = useIsAllowToSetDefaultValue(), y = i(u.name) || n(u["x-collection-field"]), S = useFieldComponentOptions(), v = c.address.segments.includes("__form_grid"), F = o(y == null ? void 0 : y.interface), I = (O = F == null ? void 0 : F.validateSchema) == null ? void 0 : O.call(F, u), R = (M = y == null ? void 0 : y.uiSchema) == null ? void 0 : M.title, T = y != null && y.target ? t(y == null ? void 0 : y.target) : [];
47006
+ var L, M, k, O, q, V, E, G, U, H, K;
47007
+ const { getCollectionFields: t, getInterface: o, getCollectionJoinField: n, getCollection: r, isTitleField: a } = useCollectionManager_deprecated(), { getField: i } = useCollection_deprecated(), { form: l } = useFormBlockContext(), c = useField(), u = useFieldSchema(), { t: d } = useTranslation(), p = useFilterByTk(), { dn: m, refresh: h, insertAdjacent: g } = useDesignable(), f = useCompile(), C = useIsShowMultipleSwitch(), { isAllowToSetDefaultValue: b } = useIsAllowToSetDefaultValue(), y = i(u.name) || n(u["x-collection-field"]), S = useFieldComponentOptions(), v = c.address.segments.includes("__form_grid"), F = o(y == null ? void 0 : y.interface), I = (L = F == null ? void 0 : F.validateSchema) == null ? void 0 : L.call(F, u), R = (M = y == null ? void 0 : y.uiSchema) == null ? void 0 : M.title, T = y != null && y.target ? t(y == null ? void 0 : y.target) : [];
46969
47008
  c.title === R || c.title;
46970
- const D = useSortFields(y == null ? void 0 : y.target), $ = ((q = (L = (k = c.componentProps) == null ? void 0 : k.service) == null ? void 0 : L.params) == null ? void 0 : q.sort) || [];
47009
+ const D = useSortFields(y == null ? void 0 : y.target), $ = ((q = (O = (k = c.componentProps) == null ? void 0 : k.service) == null ? void 0 : O.params) == null ? void 0 : q.sort) || [];
46971
47010
  useEffect(() => {
46972
47011
  c.readPretty !== u["x-read-pretty"] && (c.readPretty = !!u["x-read-pretty"]);
46973
47012
  }, [u["x-read-pretty"]]);
46974
- const B = $ == null ? void 0 : $.map((J) => J.startsWith("-") ? {
46975
- field: J.substring(1),
47013
+ const B = $ == null ? void 0 : $.map((X) => X.startsWith("-") ? {
47014
+ field: X.substring(1),
46976
47015
  direction: "desc"
46977
47016
  } : {
46978
- field: J,
47017
+ field: X,
46979
47018
  direction: "asc"
46980
47019
  });
46981
47020
  c.readPretty || c.required;
46982
- const N = T.filter((J) => a(J)).map((J) => {
47021
+ const N = T.filter((X) => a(X)).map((X) => {
46983
47022
  var W;
46984
47023
  return {
46985
- value: J == null ? void 0 : J.name,
46986
- label: f((W = J == null ? void 0 : J.uiSchema) == null ? void 0 : W.title) || (J == null ? void 0 : J.name)
47024
+ value: X == null ? void 0 : X.name,
47025
+ label: f((W = X == null ? void 0 : X.uiSchema) == null ? void 0 : W.title) || (X == null ? void 0 : X.name)
46987
47026
  };
46988
47027
  });
46989
47028
  let j = "editable";
@@ -47077,11 +47116,11 @@ AssociationSelect.Designer = function e() {
47077
47116
  }
47078
47117
  }
47079
47118
  },
47080
- onSubmit: (J) => {
47119
+ onSubmit: (X) => {
47081
47120
  var ee;
47082
- const W = [], X = (oe) => oe != null && !Number.isNaN(oe);
47083
- for (const oe of J.rules)
47084
- W.push(_.pickBy(oe, X));
47121
+ const W = [], J = (oe) => oe != null && !Number.isNaN(oe);
47122
+ for (const oe of X.rules)
47123
+ W.push(_.pickBy(oe, J));
47085
47124
  const Z = {
47086
47125
  "x-uid": u["x-uid"]
47087
47126
  };
@@ -47121,11 +47160,11 @@ AssociationSelect.Designer = function e() {
47121
47160
  })
47122
47161
  }
47123
47162
  },
47124
- onSubmit: (J) => {
47163
+ onSubmit: (X) => {
47125
47164
  const W = {
47126
47165
  "x-uid": u["x-uid"]
47127
47166
  };
47128
- c.value !== J.default && (c.value = J.default), u.default = J.default, W.default = J.default, m.emit("patch", {
47167
+ c.value !== X.default && (c.value = X.default), u.default = X.default, W.default = X.default, m.emit("patch", {
47129
47168
  schema: W
47130
47169
  }), h();
47131
47170
  }
@@ -47137,8 +47176,8 @@ AssociationSelect.Designer = function e() {
47137
47176
  title: d("Field component"),
47138
47177
  options: S,
47139
47178
  value: u["x-component"],
47140
- onChange: (J) => {
47141
- var X, Z;
47179
+ onChange: (X) => {
47180
+ var J, Z;
47142
47181
  const W = {
47143
47182
  name: y == null ? void 0 : y.name,
47144
47183
  type: "void",
@@ -47149,11 +47188,11 @@ AssociationSelect.Designer = function e() {
47149
47188
  // 'x-designer': 'FormItem.Designer',
47150
47189
  "x-toolbar": "FormItemSchemaToolbar",
47151
47190
  "x-settings": "fieldSettings:FormItem",
47152
- "x-component": J,
47191
+ "x-component": X,
47153
47192
  "x-validator": u["x-validator"],
47154
47193
  "x-collection-field": u["x-collection-field"],
47155
47194
  "x-decorator-props": u["x-decorator-props"],
47156
- "x-component-props": x(x({}, (X = y == null ? void 0 : y.uiSchema) == null ? void 0 : X["x-component-props"]), u["x-component-props"])
47195
+ "x-component-props": x(x({}, (J = y == null ? void 0 : y.uiSchema) == null ? void 0 : J["x-component-props"]), u["x-component-props"])
47157
47196
  };
47158
47197
  (Z = F == null ? void 0 : F.schemaInitialize) == null || Z.call(F, W, {
47159
47198
  field: y,
@@ -47161,7 +47200,7 @@ AssociationSelect.Designer = function e() {
47161
47200
  readPretty: c.readPretty,
47162
47201
  action: p ? "get" : null,
47163
47202
  targetCollection: r(y == null ? void 0 : y.target)
47164
- }), J === "CollectionField" && (W.type = "string"), g("beforeBegin", divWrap(W), {
47203
+ }), X === "CollectionField" && (W.type = "string"), g("beforeBegin", divWrap(W), {
47165
47204
  onSuccess: () => {
47166
47205
  m.remove(null, {
47167
47206
  removeParentsIfNoChildren: !0,
@@ -47178,12 +47217,12 @@ AssociationSelect.Designer = function e() {
47178
47217
  SchemaSettingsSwitchItem,
47179
47218
  {
47180
47219
  title: d("Allow multiple"),
47181
- checked: ((E = u["x-component-props"]) == null ? void 0 : E.multiple) === void 0 ? !0 : u["x-component-props"].multiple,
47182
- onChange: (J) => {
47220
+ checked: ((V = u["x-component-props"]) == null ? void 0 : V.multiple) === void 0 ? !0 : u["x-component-props"].multiple,
47221
+ onChange: (X) => {
47183
47222
  const W = {
47184
47223
  "x-uid": u["x-uid"]
47185
47224
  };
47186
- u["x-component-props"] = u["x-component-props"] || {}, c.componentProps = c.componentProps || {}, u["x-component-props"].multiple = J, c.componentProps.multiple = J, W["x-component-props"] = u["x-component-props"], m.emit("patch", {
47225
+ u["x-component-props"] = u["x-component-props"] || {}, c.componentProps = c.componentProps || {}, u["x-component-props"].multiple = X, c.componentProps.multiple = X, W["x-component-props"] = u["x-component-props"], m.emit("patch", {
47187
47226
  schema: W
47188
47227
  }), h();
47189
47228
  }
@@ -47194,10 +47233,10 @@ AssociationSelect.Designer = function e() {
47194
47233
  SchemaSettingsDataScope,
47195
47234
  {
47196
47235
  collectionName: y == null ? void 0 : y.target,
47197
- defaultFilter: ((U = (G = (V = c.componentProps) == null ? void 0 : V.service) == null ? void 0 : G.params) == null ? void 0 : U.filter) || {},
47236
+ defaultFilter: ((U = (G = (E = c.componentProps) == null ? void 0 : E.service) == null ? void 0 : G.params) == null ? void 0 : U.filter) || {},
47198
47237
  form: l,
47199
- onSubmit: ({ filter: J }) => {
47200
- J = removeNullCondition(J), _.set(c.componentProps, "service.params.filter", J), u["x-component-props"] = c.componentProps, m.emit("patch", {
47238
+ onSubmit: ({ filter: X }) => {
47239
+ X = removeNullCondition(X), _.set(c.componentProps, "service.params.filter", X), u["x-component-props"] = c.componentProps, m.emit("patch", {
47201
47240
  schema: {
47202
47241
  "x-uid": u["x-uid"],
47203
47242
  "x-component-props": c.componentProps
@@ -47280,8 +47319,8 @@ AssociationSelect.Designer = function e() {
47280
47319
  }
47281
47320
  }
47282
47321
  },
47283
- onSubmit: ({ sort: J }) => {
47284
- const W = J.map((X) => X.direction === "desc" ? `-${X.field}` : X.field);
47322
+ onSubmit: ({ sort: X }) => {
47323
+ const W = X.map((J) => J.direction === "desc" ? `-${J.field}` : J.field);
47285
47324
  _.set(c.componentProps, "service.params.sort", W), u["x-component-props"] = c.componentProps, m.emit("patch", {
47286
47325
  schema: {
47287
47326
  "x-uid": u["x-uid"],
@@ -47301,11 +47340,11 @@ AssociationSelect.Designer = function e() {
47301
47340
  { label: d("Easy-reading"), value: "read-pretty" }
47302
47341
  ],
47303
47342
  value: j,
47304
- onChange: (J) => {
47343
+ onChange: (X) => {
47305
47344
  const W = {
47306
47345
  "x-uid": u["x-uid"]
47307
47346
  };
47308
- switch (J) {
47347
+ switch (X) {
47309
47348
  case "readonly": {
47310
47349
  u["x-read-pretty"] = !1, u["x-disabled"] = !0, W["x-read-pretty"] = !1, W["x-disabled"] = !0, c.readPretty = !1, c.disabled = !0;
47311
47350
  break;
@@ -47332,14 +47371,14 @@ AssociationSelect.Designer = function e() {
47332
47371
  title: d("Title field"),
47333
47372
  options: N,
47334
47373
  value: (K = (H = c == null ? void 0 : c.componentProps) == null ? void 0 : H.fieldNames) == null ? void 0 : K.label,
47335
- onChange: (J) => {
47374
+ onChange: (X) => {
47336
47375
  var Z, Q;
47337
47376
  const W = {
47338
47377
  "x-uid": u["x-uid"]
47339
- }, X = P(x(x({}, (Q = (Z = y == null ? void 0 : y.uiSchema) == null ? void 0 : Z["x-component-props"]) == null ? void 0 : Q.fieldNames), c.componentProps.fieldNames), {
47340
- label: J
47378
+ }, J = P(x(x({}, (Q = (Z = y == null ? void 0 : y.uiSchema) == null ? void 0 : Z["x-component-props"]) == null ? void 0 : Q.fieldNames), c.componentProps.fieldNames), {
47379
+ label: X
47341
47380
  });
47342
- c.componentProps.fieldNames = X, u["x-component-props"] = u["x-component-props"] || {}, u["x-component-props"].fieldNames = X, W["x-component-props"] = u["x-component-props"], m.emit("patch", {
47381
+ c.componentProps.fieldNames = J, u["x-component-props"] = u["x-component-props"] || {}, u["x-component-props"].fieldNames = J, W["x-component-props"] = u["x-component-props"], m.emit("patch", {
47343
47382
  schema: W
47344
47383
  }), m.refresh();
47345
47384
  }
@@ -47363,7 +47402,7 @@ AssociationSelect.Designer = function e() {
47363
47402
  ] });
47364
47403
  };
47365
47404
  AssociationSelect.FilterDesigner = function e() {
47366
- var F, I, R, T, D, $, B, N, j, w, O;
47405
+ var F, I, R, T, D, $, B, N, j, w, L;
47367
47406
  const { getCollectionFields: t, getInterface: o, getCollectionJoinField: n } = useCollectionManager_deprecated(), { getField: r } = useCollection_deprecated(), { form: a } = useFormBlockContext(), i = 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 = (F = h == null ? void 0 : h.validateSchema) == null ? void 0 : F.call(h, l), f = (I = m == null ? void 0 : m.uiSchema) == null ? void 0 : I.title, C = m != null && m.target ? t(m == null ? void 0 : m.target) : [];
47368
47407
  i.title === f || i.title;
47369
47408
  const b = useSortFields(m == null ? void 0 : m.target), y = ((D = (T = (R = i.componentProps) == null ? void 0 : R.service) == null ? void 0 : T.params) == null ? void 0 : D.sort) || [], S = y == null ? void 0 : y.map((M) => M.startsWith("-") ? {
@@ -47470,19 +47509,19 @@ AssociationSelect.FilterDesigner = function e() {
47470
47509
  }
47471
47510
  },
47472
47511
  onSubmit: (M) => {
47473
- var E;
47512
+ var V;
47474
47513
  const k = [];
47475
- for (const V of M.rules)
47476
- k.push(_.pickBy(V, _.identity));
47477
- const L = {
47514
+ for (const E of M.rules)
47515
+ k.push(_.pickBy(E, _.identity));
47516
+ const O = {
47478
47517
  "x-uid": l["x-uid"]
47479
47518
  };
47480
47519
  if (["percent"].includes(m == null ? void 0 : m.interface))
47481
- for (const V of k)
47482
- (V.maxValue || V.minValue) && (V.percentMode = !0), V.percentFormat && (V.percentFormats = !0);
47483
- const q = _.concat([], ((E = m == null ? void 0 : m.uiSchema) == null ? void 0 : E["x-validator"]) || [], k);
47484
- i.validator = q, l["x-validator"] = k, L["x-validator"] = k, u.emit("patch", {
47485
- schema: L
47520
+ for (const E of k)
47521
+ (E.maxValue || E.minValue) && (E.percentMode = !0), E.percentFormat && (E.percentFormats = !0);
47522
+ const q = _.concat([], ((V = m == null ? void 0 : m.uiSchema) == null ? void 0 : V["x-validator"]) || [], k);
47523
+ i.validator = q, l["x-validator"] = k, O["x-validator"] = k, u.emit("patch", {
47524
+ schema: O
47486
47525
  }), d();
47487
47526
  }
47488
47527
  }
@@ -47605,7 +47644,7 @@ AssociationSelect.FilterDesigner = function e() {
47605
47644
  }
47606
47645
  },
47607
47646
  onSubmit: ({ sort: M }) => {
47608
- const k = M.map((L) => L.direction === "desc" ? `-${L.field}` : L.field);
47647
+ const k = M.map((O) => O.direction === "desc" ? `-${O.field}` : O.field);
47609
47648
  _.set(i.componentProps, "service.params.sort", k), l["x-component-props"] = i.componentProps, u.emit("patch", {
47610
47649
  schema: {
47611
47650
  "x-uid": l["x-uid"],
@@ -47620,15 +47659,15 @@ AssociationSelect.FilterDesigner = function e() {
47620
47659
  {
47621
47660
  title: c("Title field"),
47622
47661
  options: v,
47623
- value: (O = (w = i == null ? void 0 : i.componentProps) == null ? void 0 : w.fieldNames) == null ? void 0 : O.label,
47662
+ value: (L = (w = i == null ? void 0 : i.componentProps) == null ? void 0 : w.fieldNames) == null ? void 0 : L.label,
47624
47663
  onChange: (M) => {
47625
- var q, E;
47664
+ var q, V;
47626
47665
  const k = {
47627
47666
  "x-uid": l["x-uid"]
47628
- }, L = P(x(x({}, (E = (q = m == null ? void 0 : m.uiSchema) == null ? void 0 : q["x-component-props"]) == null ? void 0 : E.fieldNames), i.componentProps.fieldNames), {
47667
+ }, O = P(x(x({}, (V = (q = m == null ? void 0 : m.uiSchema) == null ? void 0 : q["x-component-props"]) == null ? void 0 : V.fieldNames), i.componentProps.fieldNames), {
47629
47668
  label: M
47630
47669
  });
47631
- i.componentProps.fieldNames = L, l["x-component-props"] = l["x-component-props"] || {}, l["x-component-props"].fieldNames = L, k["x-component-props"] = l["x-component-props"], u.emit("patch", {
47670
+ i.componentProps.fieldNames = O, l["x-component-props"] = l["x-component-props"] || {}, l["x-component-props"].fieldNames = O, k["x-component-props"] = l["x-component-props"], u.emit("patch", {
47632
47671
  schema: k
47633
47672
  }), u.refresh();
47634
47673
  }
@@ -48109,8 +48148,8 @@ const CronSetInternal = (e) => {
48109
48148
  { displayName: "NocoBaseDetails" }
48110
48149
  ), Divider = connect(
48111
48150
  (e) => {
48112
- const { color: t, borderColor: o } = e;
48113
- return /* @__PURE__ */ jsx(Divider$1, P(x({}, e), { type: "horizontal", style: { color: t, borderColor: o }, orientationMargin: "0" }));
48151
+ const { color: t, borderColor: o } = e, { t: n } = useTranslation(), r = useFieldSchema(), a = useCompile(), i = (r == null ? void 0 : r["x-component-props"].children) || e.children, l = typeof i == "string" ? n(a(i), { ns: NAMESPACE_UI_SCHEMA }) : i;
48152
+ return /* @__PURE__ */ jsx(Divider$1, P(x({}, e), { type: "horizontal", style: { color: t, borderColor: o }, orientationMargin: "0", children: l }));
48114
48153
  },
48115
48154
  mapProps((e) => x({
48116
48155
  orientation: "left"
@@ -49173,7 +49212,7 @@ const InternalListBlockProvider = (e) => {
49173
49212
  return e - u - o.paddingLG - l;
49174
49213
  }, InternalList = withSkeletonComponent(
49175
49214
  (e) => {
49176
- var N, j, w, O;
49215
+ var N, j, w, L;
49177
49216
  const { service: t } = useListBlockContext(), { run: o, params: n } = t, r = useFieldSchema(), a = useDesigner(), i = (N = t == null ? void 0 : t.data) == null ? void 0 : N.meta, { pageSize: l, count: c, hasNext: u, page: d } = i || {}, p = useField(), [m] = useState(/* @__PURE__ */ new Map()), { wrapSSR: h, componentCls: g, hashId: f } = useStyles$3(), C = useListBlockHeight(), { token: b } = theme.useToken(), y = useCallback(
49178
49217
  (M) => (m.has(M) || m.set(
49179
49218
  M,
@@ -49220,7 +49259,7 @@ const InternalListBlockProvider = (e) => {
49220
49259
  display: none !important;
49221
49260
  }
49222
49261
  `,
49223
- itemRender: (k, L, q) => L === "prev" ? /* @__PURE__ */ jsxs(
49262
+ itemRender: (k, O, q) => O === "prev" ? /* @__PURE__ */ jsxs(
49224
49263
  "div",
49225
49264
  {
49226
49265
  style: { display: "flex" },
@@ -49277,7 +49316,7 @@ const InternalListBlockProvider = (e) => {
49277
49316
  P(x({}, e), {
49278
49317
  pagination: !i || !((j = p.value) != null && j.length) || c <= ((w = p.value) == null ? void 0 : w.length) ? !1 : B,
49279
49318
  loading: t == null ? void 0 : t.loading,
49280
- children: (O = p.value) != null && O.length ? p.value.map((M, k) => /* @__PURE__ */ jsx(ListItemField, { field: p, index: k, schema: y(k) }, k)) : null
49319
+ children: (L = p.value) != null && L.length ? p.value.map((M, k) => /* @__PURE__ */ jsx(ListItemField, { field: p, index: k, schema: y(k) }, k)) : null
49281
49320
  })
49282
49321
  )
49283
49322
  }
@@ -51131,7 +51170,7 @@ const TableActionColumnDesigner = (e) => {
51131
51170
  "sort-field"
51132
51171
  );
51133
51172
  }, TableBlockDesigner = () => {
51134
- var F, I, R, T, D, $, B, N, j, w, O, M;
51173
+ var F, I, R, T, D, $, B, N, j, w, L, M;
51135
51174
  const { name: e, title: t } = useCollection_deprecated(), { getCollectionField: o, getCollection: n } = useCollectionManager_deprecated(), r = useField(), a = useFieldSchema(), { form: i } = useFormBlockContext(), l = useSortFields(e), { service: c } = useTableBlockContext(), { t: u } = useTranslation(), { dn: d } = useDesignable();
51136
51175
  useBlockTemplateContext();
51137
51176
  const p = ((I = (F = a == null ? void 0 : a["x-decorator-props"]) == null ? void 0 : F.params) == null ? void 0 : I.sort) || [];
@@ -51145,8 +51184,8 @@ const TableActionColumnDesigner = (e) => {
51145
51184
  }), h = useSchemaTemplate(), g = useCollection_deprecated(), { dragSort: f, resource: C } = r.decoratorProps, b = C && o(C), y = C != null && C.includes(".") ? ($ = n(b == null ? void 0 : b.target)) == null ? void 0 : $.tree : !!(g != null && g.tree), S = useCallback(
51146
51185
  ({ filter: k }) => {
51147
51186
  k = removeNullCondition(k);
51148
- const L = r.decoratorProps.params || {};
51149
- L.filter = k, r.decoratorProps.params = L, a["x-decorator-props"].params = L, d.emit("patch", {
51187
+ const O = r.decoratorProps.params || {};
51188
+ O.filter = k, r.decoratorProps.params = O, a["x-decorator-props"].params = O, d.emit("patch", {
51150
51189
  schema: {
51151
51190
  "x-uid": a["x-uid"],
51152
51191
  "x-decorator-props": a["x-decorator-props"]
@@ -51168,12 +51207,12 @@ const TableActionColumnDesigner = (e) => {
51168
51207
  onChange: (k) => {
51169
51208
  var q;
51170
51209
  r.decoratorProps.treeTable = k, a["x-decorator-props"].treeTable = k;
51171
- const L = P(x({}, (q = c.params) == null ? void 0 : q[0]), {
51210
+ const O = P(x({}, (q = c.params) == null ? void 0 : q[0]), {
51172
51211
  tree: k ? !0 : null
51173
51212
  });
51174
51213
  d.emit("patch", {
51175
51214
  schema: a
51176
- }), d.refresh(), c.run(L);
51215
+ }), d.refresh(), c.run(O);
51177
51216
  }
51178
51217
  }
51179
51218
  ),
@@ -51298,14 +51337,14 @@ const TableActionColumnDesigner = (e) => {
51298
51337
  }
51299
51338
  },
51300
51339
  onSubmit: ({ sort: k }) => {
51301
- var E;
51302
- const L = k.map((V) => V.direction === "desc" ? `-${V.field}` : V.field), q = r.decoratorProps.params || {};
51303
- q.sort = L, r.decoratorProps.params = q, a["x-decorator-props"].params = q, d.emit("patch", {
51340
+ var V;
51341
+ const O = k.map((E) => E.direction === "desc" ? `-${E.field}` : E.field), q = r.decoratorProps.params || {};
51342
+ q.sort = O, r.decoratorProps.params = q, a["x-decorator-props"].params = q, d.emit("patch", {
51304
51343
  schema: {
51305
51344
  "x-uid": a["x-uid"],
51306
51345
  "x-decorator-props": a["x-decorator-props"]
51307
51346
  }
51308
- }), c.run(P(x({}, (E = c.params) == null ? void 0 : E[0]), { sort: L }));
51347
+ }), c.run(P(x({}, (V = c.params) == null ? void 0 : V[0]), { sort: O }));
51309
51348
  }
51310
51349
  }
51311
51350
  ),
@@ -51314,7 +51353,7 @@ const TableActionColumnDesigner = (e) => {
51314
51353
  SchemaSettingsSelectItem,
51315
51354
  {
51316
51355
  title: u("Records per page"),
51317
- value: ((O = (w = r.decoratorProps) == null ? void 0 : w.params) == null ? void 0 : O.pageSize) || 20,
51356
+ value: ((L = (w = r.decoratorProps) == null ? void 0 : w.params) == null ? void 0 : L.pageSize) || 20,
51318
51357
  options: [
51319
51358
  { label: "5", value: 5 },
51320
51359
  { label: "10", value: 10 },
@@ -51325,8 +51364,8 @@ const TableActionColumnDesigner = (e) => {
51325
51364
  ],
51326
51365
  onChange: (k) => {
51327
51366
  var q;
51328
- const L = r.decoratorProps.params || {};
51329
- L.pageSize = k, r.decoratorProps.params = L, a["x-decorator-props"].params = L, c.run(P(x({}, (q = c.params) == null ? void 0 : q[0]), { pageSize: k, page: 1 })), d.emit("patch", {
51367
+ const O = r.decoratorProps.params || {};
51368
+ O.pageSize = k, r.decoratorProps.params = O, a["x-decorator-props"].params = O, c.run(P(x({}, (q = c.params) == null ? void 0 : q[0]), { pageSize: k, page: 1 })), d.emit("patch", {
51330
51369
  schema: {
51331
51370
  "x-uid": a["x-uid"],
51332
51371
  "x-decorator-props": a["x-decorator-props"]
@@ -51346,14 +51385,14 @@ const TableActionColumnDesigner = (e) => {
51346
51385
  { label: u("Small"), value: "small" }
51347
51386
  ],
51348
51387
  onChange: (k) => {
51349
- const L = a.reduceProperties((q, E) => {
51350
- if (E["x-component"] === "TableV2")
51351
- return E;
51388
+ const O = a.reduceProperties((q, V) => {
51389
+ if (V["x-component"] === "TableV2")
51390
+ return V;
51352
51391
  }, null);
51353
- L["x-component-props"] = L["x-component-props"] || {}, L["x-component-props"].size = k, d.emit("patch", {
51392
+ O["x-component-props"] = O["x-component-props"] || {}, O["x-component-props"].size = k, d.emit("patch", {
51354
51393
  schema: {
51355
- "x-uid": L["x-uid"],
51356
- "x-decorator-props": L["x-component-props"]
51394
+ "x-uid": O["x-uid"],
51395
+ "x-decorator-props": O["x-component-props"]
51357
51396
  }
51358
51397
  });
51359
51398
  }
@@ -51407,10 +51446,10 @@ const TableSelectorDesigner = () => {
51407
51446
  j = removeNullCondition(j);
51408
51447
  const w = r.decoratorProps.params || {};
51409
51448
  w.filter = j, r.decoratorProps.params = w, a["x-decorator-props"].params = w;
51410
- let O = _.cloneDeep(j);
51411
- u && (O ? O = {
51412
- $and: [u, O]
51413
- } : O = u), c.run(P(x({}, (M = c.params) == null ? void 0 : M[0]), { filter: O, page: 1 })), p.emit("patch", {
51449
+ let L = _.cloneDeep(j);
51450
+ u && (L ? L = {
51451
+ $and: [u, L]
51452
+ } : L = u), c.run(P(x({}, (M = c.params) == null ? void 0 : M[0]), { filter: L, page: 1 })), p.emit("patch", {
51414
51453
  schema: {
51415
51454
  "x-uid": a["x-uid"],
51416
51455
  "x-decorator-props": a["x-decorator-props"]
@@ -51443,9 +51482,9 @@ const TableSelectorDesigner = () => {
51443
51482
  defaultChecked: !0,
51444
51483
  checked: r.decoratorProps.treeTable,
51445
51484
  onChange: (j) => {
51446
- var O;
51485
+ var L;
51447
51486
  r.form.clearFormGraph(`${r.address}.*`), r.decoratorProps.treeTable = j, a["x-decorator-props"].treeTable = j;
51448
- const w = P(x({}, (O = c.params) == null ? void 0 : O[0]), {
51487
+ const w = P(x({}, (L = c.params) == null ? void 0 : L[0]), {
51449
51488
  tree: j ? !0 : null
51450
51489
  });
51451
51490
  p.emit("patch", {
@@ -51532,8 +51571,8 @@ const TableSelectorDesigner = () => {
51532
51571
  },
51533
51572
  onSubmit: ({ sort: j }) => {
51534
51573
  var M;
51535
- const w = j.map((k) => k.direction === "desc" ? `-${k.field}` : k.field), O = r.decoratorProps.params || {};
51536
- O.sort = w, r.decoratorProps.params = O, a["x-decorator-props"].params = O, p.emit("patch", {
51574
+ const w = j.map((k) => k.direction === "desc" ? `-${k.field}` : k.field), L = r.decoratorProps.params || {};
51575
+ L.sort = w, r.decoratorProps.params = L, a["x-decorator-props"].params = L, p.emit("patch", {
51537
51576
  schema: {
51538
51577
  "x-uid": a["x-uid"],
51539
51578
  "x-decorator-props": a["x-decorator-props"]
@@ -51556,9 +51595,9 @@ const TableSelectorDesigner = () => {
51556
51595
  { label: "200", value: 200 }
51557
51596
  ],
51558
51597
  onChange: (j) => {
51559
- var O;
51598
+ var L;
51560
51599
  const w = r.decoratorProps.params || {};
51561
- w.pageSize = j, r.decoratorProps.params = w, a["x-decorator-props"].params = w, c.run(P(x({}, (O = c.params) == null ? void 0 : O[0]), { pageSize: j, page: 1 })), p.emit("patch", {
51600
+ w.pageSize = j, r.decoratorProps.params = w, a["x-decorator-props"].params = w, c.run(P(x({}, (L = c.params) == null ? void 0 : L[0]), { pageSize: j, page: 1 })), p.emit("patch", {
51562
51601
  schema: {
51563
51602
  "x-uid": a["x-uid"],
51564
51603
  "x-decorator-props": a["x-decorator-props"]
@@ -53557,29 +53596,29 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
53557
53596
  label: y(w.title),
53558
53597
  value: w.name
53559
53598
  })), []), T = useCallback(() => {
53560
- const { availableFieldInterfaces: w } = u(n.template) || {}, { exclude: O, include: M } = w || {}, k = [];
53561
- return F.forEach((L) => {
53599
+ const { availableFieldInterfaces: w } = u(n.template) || {}, { exclude: L, include: M } = w || {}, k = [];
53600
+ return F.forEach((O) => {
53562
53601
  var q;
53563
- if (L.key === "systemInfo")
53564
- k.push(P(x({}, L), {
53565
- children: L.children.filter((E) => E.hidden ? !1 : E.value === "tableoid" ? M != null && M.length ? M.includes(E.value) : (l == null ? void 0 : l.dialect) === "postgres" : typeof n[E.value] == "boolean" ? n[E.value] : !0)
53602
+ if (O.key === "systemInfo")
53603
+ k.push(P(x({}, O), {
53604
+ children: O.children.filter((V) => V.hidden ? !1 : V.value === "tableoid" ? M != null && M.length ? M.includes(V.value) : (l == null ? void 0 : l.dialect) === "postgres" : typeof n[V.value] == "boolean" ? n[V.value] : !0)
53566
53605
  }));
53567
53606
  else {
53568
- let E = [];
53569
- M != null && M.length ? M.forEach((V) => {
53607
+ let V = [];
53608
+ M != null && M.length ? M.forEach((E) => {
53570
53609
  var U;
53571
- const G = (U = L == null ? void 0 : L.children) == null ? void 0 : U.find((H) => [V, V.interface].includes(H.name));
53572
- G && E.push(P(x({}, G), {
53573
- targetScope: V == null ? void 0 : V.targetScope
53610
+ const G = (U = O == null ? void 0 : O.children) == null ? void 0 : U.find((H) => [E, E.interface].includes(H.name));
53611
+ G && V.push(P(x({}, G), {
53612
+ targetScope: E == null ? void 0 : E.targetScope
53574
53613
  }));
53575
- }) : O != null && O.length ? E = (q = L == null ? void 0 : L.children) == null ? void 0 : q.filter((V) => !O.includes(V.name)) : E = L == null ? void 0 : L.children, E != null && E.length && k.push(P(x({}, L), {
53576
- children: E
53614
+ }) : L != null && L.length ? V = (q = O == null ? void 0 : O.children) == null ? void 0 : q.filter((E) => !L.includes(E.name)) : V = O == null ? void 0 : O.children, V != null && V.length && k.push(P(x({}, O), {
53615
+ children: V
53577
53616
  }));
53578
53617
  }
53579
53618
  }), k;
53580
53619
  }, [u, n]), D = useMemo(() => T().map((w) => {
53581
- var O;
53582
- return ((O = w == null ? void 0 : w.children) == null ? void 0 : O.length) === 0 ? null : n.template === "view" ? {
53620
+ var L;
53621
+ return ((L = w == null ? void 0 : w.children) == null ? void 0 : L.length) === 0 ? null : n.template === "view" ? {
53583
53622
  type: "group",
53584
53623
  label: y(w.label),
53585
53624
  title: y(w.label),
@@ -53603,25 +53642,25 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
53603
53642
  }))
53604
53643
  };
53605
53644
  }).filter((w) => {
53606
- var O;
53607
- return (O = w == null ? void 0 : w.children) == null ? void 0 : O.length;
53645
+ var L;
53646
+ return (L = w == null ? void 0 : w.children) == null ? void 0 : L.length;
53608
53647
  }), [T]), $ = useMemo(() => ({
53609
53648
  style: {
53610
53649
  maxHeight: "60vh",
53611
53650
  overflow: "auto"
53612
53651
  },
53613
53652
  onClick: (w) => {
53614
- const O = w.item.props["data-targetScope"];
53615
- O && f(O);
53653
+ const L = w.item.props["data-targetScope"];
53654
+ L && f(L);
53616
53655
  const M = getSchema$8(c(w.key), n, y);
53617
53656
  M && (b(M), h(!0));
53618
53657
  },
53619
53658
  items: D
53620
53659
  }), [c, D, n]), B = useMemo(() => I.filter((w) => ["string", "bigInt", "integer"].includes(w.type)).map((w) => {
53621
- var O;
53660
+ var L;
53622
53661
  return {
53623
53662
  value: w.name,
53624
- label: y((O = w.uiSchema) == null ? void 0 : O.title)
53663
+ label: y((L = w.uiSchema) == null ? void 0 : L.title)
53625
53664
  };
53626
53665
  }), [I == null ? void 0 : I.length]);
53627
53666
  return n.template !== "sql" && /* @__PURE__ */ jsx(RecordProvider, { record: n, children: /* @__PURE__ */ jsxs(ActionContextProvider, { value: { visible: m, setVisible: h }, children: [
@@ -53853,18 +53892,18 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
53853
53892
  return /* @__PURE__ */ jsx(OverridingFieldAction, x({ item: t, parentItem: o }, e));
53854
53893
  }, getIsOverriding = (e, t, o) => t.find((r) => r.name === o.name).collectionName === e, OverridingFieldAction = (e) => {
53855
53894
  const { scope: t, getContainer: o, item: n, parentItem: r, children: a, currentCollection: i } = e, { target: l, through: c } = n, { getInterface: u, getCollection: d, getCurrentCollectionFields: p, getChildrenCollections: m, collections: h } = useCollectionManager_deprecated(), [g, f] = useState(!1), [C, b] = useState({}), y = useAPIClient(), { t: S } = useTranslation(), v = useCompile(), F = (j) => {
53856
- var O;
53857
- return j && ((O = m(j)) == null ? void 0 : O.map((M) => M.name).concat([j]));
53895
+ var L;
53896
+ return j && ((L = m(j)) == null ? void 0 : L.map((M) => M.name).concat([j]));
53858
53897
  }, [I, R] = useState({}), T = p(i), D = getIsOverriding(i, T, n), $ = useMemo(() => h.map((j) => ({
53859
53898
  label: v(j.title),
53860
53899
  value: j.name
53861
53900
  })), []), B = () => {
53862
- const j = useForm(), { refresh: w } = useResourceActionContext(), { refreshCM: O } = useCollectionManager_deprecated(), M = useActionContext(), { resource: k } = useResourceContext();
53901
+ const j = useForm(), { refresh: w } = useResourceActionContext(), { refreshCM: L } = useCollectionManager_deprecated(), M = useActionContext(), { resource: k } = useResourceContext();
53863
53902
  return {
53864
53903
  run() {
53865
53904
  return z(this, null, function* () {
53866
53905
  yield j.submit();
53867
- const q = cloneDeep(j.values), E = omit(q, [
53906
+ const q = cloneDeep(j.values), V = omit(q, [
53868
53907
  "key",
53869
53908
  "uiSchemaUid",
53870
53909
  "collectionName",
@@ -53877,18 +53916,18 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
53877
53916
  // 'reverseField.uiSchemaUid',
53878
53917
  ]);
53879
53918
  yield k.create({
53880
- values: E
53881
- }), yield j.reset(), yield O(), yield w(), M.setVisible(!1);
53919
+ values: V
53920
+ }), yield j.reset(), yield L(), yield w(), M.setVisible(!1);
53882
53921
  });
53883
53922
  }
53884
53923
  };
53885
53924
  }, N = useMemo(() => {
53886
53925
  var j;
53887
53926
  return (n == null ? void 0 : n.fields) || ((j = d(n.collectionName)) == null ? void 0 : j.options.fields.filter((w) => ["string", "bigInt", "integer"].includes(w.type)).map((w) => {
53888
- var O;
53927
+ var L;
53889
53928
  return {
53890
53929
  value: w.name,
53891
- label: v((O = w.uiSchema) == null ? void 0 : O.title)
53930
+ label: v((L = w.uiSchema) == null ? void 0 : L.title)
53892
53931
  };
53893
53932
  }));
53894
53933
  }, [n.name]);
@@ -53905,10 +53944,10 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
53905
53944
  appends: ["reverseField"]
53906
53945
  });
53907
53946
  R(w == null ? void 0 : w.data);
53908
- const O = u(n.interface), M = cloneDeep(w == null ? void 0 : w.data) || {};
53909
- M != null && M.reverseField || (M.autoCreateReverseField = !1, M.reverseField = (j = O.default) == null ? void 0 : j.reverseField, set(M.reverseField, "name", `f_${uid()}`), set(M.reverseField, "uiSchema.title", n.__parent.title));
53947
+ const L = u(n.interface), M = cloneDeep(w == null ? void 0 : w.data) || {};
53948
+ M != null && M.reverseField || (M.autoCreateReverseField = !1, M.reverseField = (j = L.default) == null ? void 0 : j.reverseField, set(M.reverseField, "name", `f_${uid()}`), set(M.reverseField, "uiSchema.title", n.__parent.title));
53910
53949
  const k = getSchema$6(
53911
- P(x({}, O), {
53950
+ P(x({}, L), {
53912
53951
  default: M
53913
53952
  }),
53914
53953
  n,
@@ -54370,14 +54409,14 @@ const getSchema$4 = (e, t, o) => {
54370
54409
  const { databaseView: t, viewName: o, sources: n, schema: r } = e, { data: a } = useContext(ResourceActionContext), i = useAPIClient(), { t: l } = useTranslation(), [c, u] = useState(!1), [d, p] = useState([]), [m, h] = useState([]), [g, f] = useState(n), [C, b] = useState([]), y = useField(), S = useForm(), { getCollection: v, getInterface: F, getCollectionFields: I, getInheritCollections: R, getParentCollectionFields: T } = useCollectionManager_deprecated(), D = useCompile(), B = useFieldInterfaceOptions().filter((w) => !["relation", "systemInfo"].includes(w.key));
54371
54410
  useEffect(() => {
54372
54411
  const w = [];
54373
- g.forEach((O) => {
54374
- var E;
54375
- const M = v(O), L = R(O).map((V) => {
54376
- const G = T(V, O);
54412
+ g.forEach((L) => {
54413
+ var V;
54414
+ const M = v(L), O = R(L).map((E) => {
54415
+ const G = T(E, L);
54377
54416
  return {
54378
54417
  type: "group",
54379
- key: V,
54380
- label: l("Parent collection fields") + l(`(${v(V).title})`),
54418
+ key: E,
54419
+ label: l("Parent collection fields") + l(`(${v(E).title})`),
54381
54420
  children: G.filter((U) => !["hasOne", "hasMany", "belongsToMany"].includes(U == null ? void 0 : U.type)).map((U) => {
54382
54421
  var H;
54383
54422
  return {
@@ -54386,48 +54425,48 @@ const getSchema$4 = (e, t, o) => {
54386
54425
  };
54387
54426
  })
54388
54427
  };
54389
- }), q = (E = M.fields.filter((V) => !["obo", "oho", "m2m", "o2m"].includes(V == null ? void 0 : V.interface))) == null ? void 0 : E.map((V) => {
54428
+ }), q = (V = M.fields.filter((E) => !["obo", "oho", "m2m", "o2m"].includes(E == null ? void 0 : E.interface))) == null ? void 0 : V.map((E) => {
54390
54429
  var G;
54391
- return { value: V.name, key: V.name, label: l(((G = V.uiSchema) == null ? void 0 : G.title) || V.name) };
54392
- }).concat(L);
54430
+ return { value: E.name, key: E.name, label: l(((G = E.uiSchema) == null ? void 0 : G.title) || E.name) };
54431
+ }).concat(O);
54393
54432
  w.push({
54394
- value: O,
54433
+ value: L,
54395
54434
  label: l(M.title || M.name),
54396
54435
  children: q
54397
54436
  });
54398
54437
  }), h(w);
54399
54438
  }, [g, t]), useEffect(() => {
54400
54439
  t && (u(!0), i.resource("dbViews").get({ filterByTk: o, schema: r }).then(({ data: w }) => {
54401
- var O, M;
54440
+ var L, M;
54402
54441
  if (w) {
54403
54442
  u(!1), p([]);
54404
- const k = (M = Object.values((O = w == null ? void 0 : w.data) == null ? void 0 : O.fields)) == null ? void 0 : M.map((L) => {
54405
- var E, V;
54406
- const q = (a == null ? void 0 : a.data.find((G) => G.name === L.name)) || L;
54443
+ const k = (M = Object.values((L = w == null ? void 0 : w.data) == null ? void 0 : L.fields)) == null ? void 0 : M.map((O) => {
54444
+ var V, E;
54445
+ const q = (a == null ? void 0 : a.data.find((G) => G.name === O.name)) || O;
54407
54446
  if (!(q != null && q.uiSchema)) {
54408
- const G = F(L.interface);
54447
+ const G = F(O.interface);
54409
54448
  q.uiSchema = (G == null ? void 0 : G.default.uiSchema) || {};
54410
54449
  }
54411
- return L.source ? P(x({}, L), {
54412
- uiSchema: P(x({}, omit(q.uiSchema, "rawTitle")), { title: ((E = q.uiSchema) == null ? void 0 : E.title) || q.name })
54413
- }) : P(x({}, q), {
54450
+ return O.source ? P(x({}, O), {
54414
54451
  uiSchema: P(x({}, omit(q.uiSchema, "rawTitle")), { title: ((V = q.uiSchema) == null ? void 0 : V.title) || q.name })
54452
+ }) : P(x({}, q), {
54453
+ uiSchema: P(x({}, omit(q.uiSchema, "rawTitle")), { title: ((E = q.uiSchema) == null ? void 0 : E.title) || q.name })
54415
54454
  });
54416
54455
  });
54417
54456
  y.value = k, setTimeout(() => {
54418
- var L, q, E;
54419
- p(k), S.setValuesIn("sources", (L = w.data) == null ? void 0 : L.sources), f((q = w.data) == null ? void 0 : q.sources), b((E = w == null ? void 0 : w.data) == null ? void 0 : E.unsupportedFields);
54457
+ var O, q, V;
54458
+ p(k), S.setValuesIn("sources", (O = w.data) == null ? void 0 : O.sources), f((q = w.data) == null ? void 0 : q.sources), b((V = w == null ? void 0 : w.data) == null ? void 0 : V.unsupportedFields);
54420
54459
  });
54421
54460
  }
54422
54461
  }).catch);
54423
54462
  }, [t]);
54424
- const N = (w, O) => {
54463
+ const N = (w, L) => {
54425
54464
  const M = _.cloneDeep(d);
54426
- M[O] = w, p(M), y.value = M.map((k) => {
54427
- var q, E, V;
54428
- const L = typeof k.source == "string" ? k.source : (V = (E = (q = k.source) == null ? void 0 : q.filter) == null ? void 0 : E.call(q, Boolean)) == null ? void 0 : V.join(".");
54465
+ M[L] = w, p(M), y.value = M.map((k) => {
54466
+ var q, V, E;
54467
+ const O = typeof k.source == "string" ? k.source : (E = (V = (q = k.source) == null ? void 0 : q.filter) == null ? void 0 : V.call(q, Boolean)) == null ? void 0 : E.join(".");
54429
54468
  return P(x({}, k), {
54430
- source: L
54469
+ source: O
54431
54470
  });
54432
54471
  });
54433
54472
  }, j = [
@@ -54442,17 +54481,17 @@ const getSchema$4 = (e, t, o) => {
54442
54481
  dataIndex: "source",
54443
54482
  key: "source",
54444
54483
  width: 200,
54445
- render: (w, O, M) => /* @__PURE__ */ jsx(
54484
+ render: (w, L, M) => /* @__PURE__ */ jsx(
54446
54485
  Cascader$1,
54447
54486
  {
54448
54487
  defaultValue: typeof w == "string" ? w == null ? void 0 : w.split(".") : w,
54449
54488
  allowClear: !0,
54450
54489
  style: { width: "100%" },
54451
54490
  options: D(m),
54452
- onChange: (k, L) => {
54453
- var E;
54454
- const q = (E = I(k == null ? void 0 : k[0])) == null ? void 0 : E.find((V) => V.name === last(k));
54455
- N(P(x({}, O), { source: k, uiSchema: q == null ? void 0 : q.uiSchema }), M);
54491
+ onChange: (k, O) => {
54492
+ var V;
54493
+ const q = (V = I(k == null ? void 0 : k[0])) == null ? void 0 : V.find((E) => E.name === last(k));
54494
+ N(P(x({}, L), { source: k, uiSchema: q == null ? void 0 : q.uiSchema }), M);
54456
54495
  },
54457
54496
  placeholder: l("Select field source")
54458
54497
  }
@@ -54463,7 +54502,7 @@ const getSchema$4 = (e, t, o) => {
54463
54502
  dataIndex: "type",
54464
54503
  width: 140,
54465
54504
  key: "type",
54466
- render: (w, O, M) => {
54505
+ render: (w, L, M) => {
54467
54506
  const k = d[M];
54468
54507
  return k != null && k.source || !(k != null && k.possibleTypes) ? /* @__PURE__ */ jsx(Tag, { children: w }) : /* @__PURE__ */ jsx(
54469
54508
  Select$1,
@@ -54471,8 +54510,8 @@ const getSchema$4 = (e, t, o) => {
54471
54510
  defaultValue: w,
54472
54511
  popupMatchSelectWidth: !1,
54473
54512
  style: { width: "100%" },
54474
- options: (k == null ? void 0 : k.possibleTypes.map((L) => ({ label: L, value: L }))) || [],
54475
- onChange: (L) => N(P(x({}, k), { type: L }), M)
54513
+ options: (k == null ? void 0 : k.possibleTypes.map((O) => ({ label: O, value: O }))) || [],
54514
+ onChange: (O) => N(P(x({}, k), { type: O }), M)
54476
54515
  }
54477
54516
  );
54478
54517
  }
@@ -54482,8 +54521,8 @@ const getSchema$4 = (e, t, o) => {
54482
54521
  dataIndex: "interface",
54483
54522
  key: "interface",
54484
54523
  width: 150,
54485
- render: (w, O, M) => {
54486
- const k = d[M], L = getInterfaceOptions(B, k.type);
54524
+ render: (w, L, M) => {
54525
+ const k = d[M], O = getInterfaceOptions(B, k.type);
54487
54526
  return k.source ? w : /* @__PURE__ */ jsx(
54488
54527
  Select$1,
54489
54528
  {
@@ -54493,7 +54532,7 @@ const getSchema$4 = (e, t, o) => {
54493
54532
  onChange: (q) => {
54494
54533
  N(P(x({}, k), { interface: q }), M);
54495
54534
  },
54496
- children: L.map((q) => /* @__PURE__ */ jsx(Select$1.OptGroup, { label: D(q.label), children: q.children.map((E) => /* @__PURE__ */ jsx(Select$1.Option, { value: E.name, children: D(E.label) }, E.value)) }, q.key))
54535
+ children: O.map((q) => /* @__PURE__ */ jsx(Select$1.OptGroup, { label: D(q.label), children: q.children.map((V) => /* @__PURE__ */ jsx(Select$1.Option, { value: V.name, children: D(V.label) }, V.value)) }, q.key))
54497
54536
  }
54498
54537
  );
54499
54538
  }
@@ -54503,13 +54542,13 @@ const getSchema$4 = (e, t, o) => {
54503
54542
  dataIndex: "title",
54504
54543
  key: "title",
54505
54544
  width: 180,
54506
- render: (w, O, M) => {
54507
- var L;
54545
+ render: (w, L, M) => {
54546
+ var O;
54508
54547
  const k = d[M];
54509
54548
  return /* @__PURE__ */ jsx(
54510
54549
  Input$3,
54511
54550
  {
54512
- defaultValue: ((L = k == null ? void 0 : k.uiSchema) == null ? void 0 : L.title) || w,
54551
+ defaultValue: ((O = k == null ? void 0 : k.uiSchema) == null ? void 0 : O.title) || w,
54513
54552
  onChange: (q) => N(
54514
54553
  P(x({}, k), { uiSchema: P(x({}, omit(k == null ? void 0 : k.uiSchema, "rawTitle")), { title: q.target.value }) }),
54515
54554
  M
@@ -54565,15 +54604,15 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
54565
54604
  }, y = (S) => {
54566
54605
  var v;
54567
54606
  return (v = S.filter((F) => F.source || F.interface)) == null ? void 0 : v.map((F) => {
54568
- var $, B, N, j, w, O;
54569
- const I = typeof (F == null ? void 0 : F.source) == "string" ? ($ = F == null ? void 0 : F.source) == null ? void 0 : $.split(".") : F == null ? void 0 : F.source, R = (N = (B = h(I == null ? void 0 : I[0])) == null ? void 0 : B.find((M) => M.name === (I == null ? void 0 : I[1]))) == null ? void 0 : N.uiSchema, T = ((j = F == null ? void 0 : F.uiSchema) == null ? void 0 : j.title) || (R == null ? void 0 : R.title) || F.name, D = F.source ? R : (O = (w = m(F.interface)) == null ? void 0 : w.default) == null ? void 0 : O.uiSchema;
54607
+ var $, B, N, j, w, L;
54608
+ const I = typeof (F == null ? void 0 : F.source) == "string" ? ($ = F == null ? void 0 : F.source) == null ? void 0 : $.split(".") : F == null ? void 0 : F.source, R = (N = (B = h(I == null ? void 0 : I[0])) == null ? void 0 : B.find((M) => M.name === (I == null ? void 0 : I[1]))) == null ? void 0 : N.uiSchema, T = ((j = F == null ? void 0 : F.uiSchema) == null ? void 0 : j.title) || (R == null ? void 0 : R.title) || F.name, D = F.source ? R : (L = (w = m(F.interface)) == null ? void 0 : w.default) == null ? void 0 : L.uiSchema;
54570
54609
  return {
54571
54610
  title: u(T),
54572
54611
  dataIndex: F.name,
54573
54612
  key: F.name,
54574
54613
  width: 200,
54575
- render: (M, k, L) => {
54576
- const q = k[F.name], E = {
54614
+ render: (M, k, O) => {
54615
+ const q = k[F.name], V = {
54577
54616
  type: "object",
54578
54617
  properties: {
54579
54618
  [F.name]: {
@@ -54585,7 +54624,7 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
54585
54624
  }
54586
54625
  }
54587
54626
  };
54588
- return /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: /* @__PURE__ */ jsx(RecursionField, { schema: E, name: L, onlyRenderProperties: !0 }) });
54627
+ return /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: /* @__PURE__ */ jsx(RecursionField, { schema: V, name: O, onlyRenderProperties: !0 }) });
54589
54628
  }
54590
54629
  };
54591
54630
  });
@@ -54818,11 +54857,11 @@ const AsyncDataProvider = (e) => {
54818
54857
  const T = /* @__PURE__ */ new Map();
54819
54858
  a || (i && i.length ? Object.entries((i == null ? void 0 : i[0]) || {}).forEach(([B, N]) => {
54820
54859
  var k;
54821
- const j = l[B], w = inferInterface(B, N), O = (k = C.current(w)) == null ? void 0 : k.default, M = (j == null ? void 0 : j.uiSchema) || (O == null ? void 0 : O.uiSchema) || {};
54860
+ const j = l[B], w = inferInterface(B, N), L = (k = C.current(w)) == null ? void 0 : k.default, M = (j == null ? void 0 : j.uiSchema) || (L == null ? void 0 : L.uiSchema) || {};
54822
54861
  T.set(B, {
54823
54862
  name: B,
54824
54863
  interface: (j == null ? void 0 : j.interface) || w,
54825
- type: (j == null ? void 0 : j.type) || (O == null ? void 0 : O.type),
54864
+ type: (j == null ? void 0 : j.type) || (L == null ? void 0 : L.type),
54826
54865
  source: j == null ? void 0 : j.source,
54827
54866
  uiSchema: x({
54828
54867
  title: B
@@ -54914,13 +54953,13 @@ const AsyncDataProvider = (e) => {
54914
54953
  style: { width: "100%" },
54915
54954
  popupMatchSelectWidth: !1,
54916
54955
  onChange: (j) => {
54917
- var O, M, k, L, q;
54956
+ var L, M, k, O, q;
54918
54957
  const w = p(j);
54919
54958
  y(
54920
54959
  P(x({}, B), {
54921
54960
  interface: j || null,
54922
- uiSchema: P(x({}, (O = w == null ? void 0 : w.default) == null ? void 0 : O.uiSchema), {
54923
- title: ((k = (M = w == null ? void 0 : w.default) == null ? void 0 : M.uiSchema) == null ? void 0 : k.title) || ((L = B.uiSchema) == null ? void 0 : L.title)
54961
+ uiSchema: P(x({}, (L = w == null ? void 0 : w.default) == null ? void 0 : L.uiSchema), {
54962
+ title: ((k = (M = w == null ? void 0 : w.default) == null ? void 0 : M.uiSchema) == null ? void 0 : k.title) || ((O = B.uiSchema) == null ? void 0 : O.title)
54924
54963
  }),
54925
54964
  type: (q = w == null ? void 0 : w.default) == null ? void 0 : q.type
54926
54965
  }),
@@ -63452,28 +63491,28 @@ const ActionInitializerItem = (e) => {
63452
63491
  ), I = C || (a == null ? void 0 : a.targetKey) || "id", R = b || ((U = (G = i["x-component-props"]) == null ? void 0 : G.fieldNames) == null ? void 0 : U.label) || I, T = {
63453
63492
  title: R || I,
63454
63493
  key: I
63455
- }, [D, $] = useState([]), [B, N] = useState(i.default || []), [j, w] = useState(!0), O = useLabelUiSchema(a, (T == null ? void 0 : T.title) || "label");
63494
+ }, [D, $] = useState([]), [B, N] = useState(i.default || []), [j, w] = useState(!0), L = useLabelUiSchema(a, (T == null ? void 0 : T.title) || "label");
63456
63495
  if (useEffect(() => {
63457
63496
  i.default && setTimeout(() => {
63458
63497
  d(i.default), N(i.default);
63459
63498
  }, 100);
63460
63499
  }, [i.default, d]), !a)
63461
63500
  return null;
63462
- const M = (J) => {
63463
- $(J), w(!1);
63464
- }, k = (J) => {
63465
- N(J), d(J), p == null || p(J);
63466
- }, L = (J) => {
63467
- var X;
63468
- const W = (X = h == null ? void 0 : h[0]) == null ? void 0 : X.filter;
63501
+ const M = (X) => {
63502
+ $(X), w(!1);
63503
+ }, k = (X) => {
63504
+ N(X), d(X), p == null || p(X);
63505
+ }, O = (X) => {
63506
+ var J;
63507
+ const W = (J = h == null ? void 0 : h[0]) == null ? void 0 : J.filter;
63469
63508
  (S || W) && g(P(x({}, h == null ? void 0 : h[0]), {
63470
63509
  filter: f
63471
- })), v(!S), J.stopPropagation();
63472
- }, q = (J) => {
63473
- J.stopPropagation();
63474
- }, E = (J) => {
63475
- m(J);
63476
- }, V = (K = i.title) != null ? K : (H = a == null ? void 0 : a.uiSchema) == null ? void 0 : H.title;
63510
+ })), v(!S), X.stopPropagation();
63511
+ }, q = (X) => {
63512
+ X.stopPropagation();
63513
+ }, V = (X) => {
63514
+ m(X);
63515
+ }, E = (K = i.title) != null ? K : (H = a == null ? void 0 : a.uiSchema) == null ? void 0 : H.title;
63477
63516
  return t(
63478
63517
  /* @__PURE__ */ jsxs(SortableItem, { className: cls(o, n, "nb-block-item", e.className, "SortableItem"), children: [
63479
63518
  /* @__PURE__ */ jsx(l, {}),
@@ -63490,7 +63529,7 @@ const ActionInitializerItem = (e) => {
63490
63529
  },
63491
63530
  gutter: 5,
63492
63531
  children: [
63493
- /* @__PURE__ */ jsx(Col, { title: c(V), className: "headerCol", children: S ? /* @__PURE__ */ jsx(
63532
+ /* @__PURE__ */ jsx(Col, { title: c(E), className: "headerCol", children: S ? /* @__PURE__ */ jsx(
63494
63533
  Input$3,
63495
63534
  {
63496
63535
  bordered: !1,
@@ -63498,16 +63537,16 @@ const ActionInitializerItem = (e) => {
63498
63537
  placeholder: "Search...",
63499
63538
  className: "search",
63500
63539
  onClick: q,
63501
- onChange: E
63540
+ onChange: V
63502
63541
  }
63503
- ) : c(V) }),
63542
+ ) : c(E) }),
63504
63543
  /* @__PURE__ */ jsx(
63505
63544
  Col,
63506
63545
  {
63507
63546
  style: {
63508
63547
  flex: "0 0 auto"
63509
63548
  },
63510
- children: S ? /* @__PURE__ */ jsx(CloseOutlined, { className: "CloseOutlined", onClick: L }) : /* @__PURE__ */ jsx(SearchOutlined, { className: "SearchOutlined", onClick: L })
63549
+ children: S ? /* @__PURE__ */ jsx(CloseOutlined, { className: "CloseOutlined", onClick: O }) : /* @__PURE__ */ jsx(SearchOutlined, { className: "SearchOutlined", onClick: O })
63511
63550
  }
63512
63551
  )
63513
63552
  ]
@@ -63523,7 +63562,7 @@ const ActionInitializerItem = (e) => {
63523
63562
  treeData: u,
63524
63563
  onSelect: k,
63525
63564
  fieldNames: T,
63526
- titleRender: (J) => /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: getLabelFormatValue(O, c(J[R])) }),
63565
+ titleRender: (X) => /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: getLabelFormatValue(L, c(X[R])) }),
63527
63566
  selectedKeys: B,
63528
63567
  blockNode: !0
63529
63568
  }
@@ -63918,7 +63957,7 @@ function useMenuSearch({
63918
63957
  })) : g, [e, c, u, g]);
63919
63958
  }
63920
63959
  const DataBlockInitializer = (e) => {
63921
- var k, L;
63960
+ var k, O;
63922
63961
  const {
63923
63962
  templateWrap: t,
63924
63963
  onCreateBlockSchema: o,
@@ -63947,14 +63986,14 @@ const DataBlockInitializer = (e) => {
63947
63986
  componentType: n,
63948
63987
  menuName: a
63949
63988
  });
63950
- const { item: E, fromOthersInPopup: V } = q;
63989
+ const { item: V, fromOthersInPopup: E } = q;
63951
63990
  if (f)
63952
63991
  return f(q);
63953
- if (E.template) {
63954
- const G = yield R(E);
63955
- v(t ? t(G, { item: E, fromOthersInPopup: V }) : G);
63992
+ if (V.template) {
63993
+ const G = yield R(V);
63994
+ v(t ? t(G, { item: V, fromOthersInPopup: E }) : G);
63956
63995
  } else
63957
- E.schemaInsertor ? yield E.schemaInsertor(v, { item: E, name: a, fromOthersInPopup: V }) : o && o({ item: E, fromOthersInPopup: V });
63996
+ V.schemaInsertor ? yield V.schemaInsertor(v, { item: V, name: a, fromOthersInPopup: E }) : o && o({ item: V, fromOthersInPopup: E });
63958
63997
  F(!1);
63959
63998
  }),
63960
63999
  [
@@ -63982,21 +64021,21 @@ const DataBlockInitializer = (e) => {
63982
64021
  onClick: D,
63983
64022
  currentText: b,
63984
64023
  otherText: y
63985
- }), B = useGetSchemaInitializerMenuItems(D), N = useMemo(() => B($, a), [B, $, a]), [j, w] = useState([]), O = useMenuSearch({ data: N, openKeys: j, hideSearch: u }), M = useMemo(() => {
63986
- let q = O.filter((E) => E.key !== "search" && E.key !== "empty");
63987
- return p && q.length === 1 ? q = q[0].children : q = O, [
64024
+ }), B = useGetSchemaInitializerMenuItems(D), N = useMemo(() => B($, a), [B, $, a]), [j, w] = useState([]), L = useMenuSearch({ data: N, openKeys: j, hideSearch: u }), M = useMemo(() => {
64025
+ let q = L.filter((V) => V.key !== "search" && V.key !== "empty");
64026
+ return p && q.length === 1 ? q = q[0].children : q = L, [
63988
64027
  {
63989
64028
  key: a,
63990
64029
  label: I(i),
63991
64030
  icon: typeof r == "string" ? /* @__PURE__ */ jsx(antIcons__default, { type: r }) : r,
63992
- onClick: (E) => {
63993
- E.key === a && D(P(x({}, E), { item: e }));
64031
+ onClick: (V) => {
64032
+ V.key === a && D(P(x({}, V), { item: e }));
63994
64033
  },
63995
64034
  children: q
63996
64035
  }
63997
64036
  ];
63998
- }, [O, p, a, I, i, r, D, e]);
63999
- return N.length > 1 || N.length === 1 && ((L = (k = N[0]) == null ? void 0 : k.children) == null ? void 0 : L.length) > 0 || S ? /* @__PURE__ */ jsx(
64037
+ }, [L, p, a, I, i, r, D, e]);
64038
+ return N.length > 1 || N.length === 1 && ((O = (k = N[0]) == null ? void 0 : k.children) == null ? void 0 : O.length) > 0 || S ? /* @__PURE__ */ jsx(
64000
64039
  SchemaInitializerMenu,
64001
64040
  {
64002
64041
  onOpenChange: (q) => {
@@ -68296,6 +68335,7 @@ export {
68296
68335
  GridRowContext,
68297
68336
  HTMLEncode,
68298
68337
  HeightMode,
68338
+ ICON_POPUP_Z_INDEX,
68299
68339
  Icon,
68300
68340
  IconFieldInterface,
68301
68341
  IconPicker,