@nocobase/client 1.8.10 → 1.8.12

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,23 +1,23 @@
1
- var $e = Object.defineProperty, Be = Object.defineProperties;
2
- var Ne = Object.getOwnPropertyDescriptors;
3
- var ke = Object.getOwnPropertySymbols;
4
- var je = Object.prototype.hasOwnProperty, Me = Object.prototype.propertyIsEnumerable;
5
- var De = (e, t) => (t = Symbol[e]) ? t : Symbol.for("Symbol." + e);
6
- var we = (e, t, n) => t in e ? $e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, x = (e, t) => {
1
+ var Oe = Object.defineProperty, Le = Object.defineProperties;
2
+ var Ve = Object.getOwnPropertyDescriptors;
3
+ var Te = Object.getOwnPropertySymbols;
4
+ var Be = Object.prototype.hasOwnProperty, Ne = Object.prototype.propertyIsEnumerable;
5
+ var $e = (e, t) => (t = Symbol[e]) ? t : Symbol.for("Symbol." + e);
6
+ var we = (e, t, n) => t in e ? Oe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, x = (e, t) => {
7
7
  for (var n in t || (t = {}))
8
- je.call(t, n) && we(e, n, t[n]);
9
- if (ke)
10
- for (var n of ke(t))
11
- Me.call(t, n) && we(e, n, t[n]);
8
+ Be.call(t, n) && we(e, n, t[n]);
9
+ if (Te)
10
+ for (var n of Te(t))
11
+ Ne.call(t, n) && we(e, n, t[n]);
12
12
  return e;
13
- }, P = (e, t) => Be(e, Ne(t));
13
+ }, P = (e, t) => Le(e, Ve(t));
14
14
  var W = (e, t) => {
15
15
  var n = {};
16
16
  for (var o in e)
17
- je.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
18
- if (e != null && ke)
19
- for (var o of ke(e))
20
- t.indexOf(o) < 0 && Me.call(e, o) && (n[o] = e[o]);
17
+ Be.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
18
+ if (e != null && Te)
19
+ for (var o of Te(e))
20
+ t.indexOf(o) < 0 && Ne.call(e, o) && (n[o] = e[o]);
21
21
  return n;
22
22
  };
23
23
  var A = (e, t, n) => (we(e, typeof t != "symbol" ? t + "" : t, n), n);
@@ -37,7 +37,7 @@ var q = (e, t, n) => new Promise((o, r) => {
37
37
  }, l = (c) => c.done ? o(c.value) : Promise.resolve(c.value).then(a, i);
38
38
  l((n = n.apply(e, t)).next());
39
39
  });
40
- var Te = (e, t, n) => (t = e[De("asyncIterator")]) ? t.call(e) : (e = e[De("iterator")](), t = {}, n = (o, r) => (r = e[o]) && (t[o] = (a) => new Promise((i, l, c) => (a = r.call(e, a), c = a.done, Promise.resolve(a.value).then((u) => i({ value: u, done: c }), l)))), n("next"), n("return"), t);
40
+ var Re = (e, t, n) => (t = e[$e("asyncIterator")]) ? t.call(e) : (e = e[$e("iterator")](), t = {}, n = (o, r) => (r = e[o]) && (t[o] = (a) => new Promise((i, l, c) => (a = r.call(e, a), c = a.done, Promise.resolve(a.value).then((u) => i({ value: u, done: c }), l)))), n("next"), n("return"), t);
41
41
  import "./index.css";
42
42
  import "dayjs/plugin/isBetween";
43
43
  import "dayjs/plugin/isSameOrAfter";
@@ -113,7 +113,7 @@ import { loadableResource } from "react-imported-component";
113
113
  import ProLayout, { RouteContext, PageHeader } from "@ant-design/pro-layout";
114
114
  import * as antdStyle from "antd-style";
115
115
  import { createStyles, createGlobalStyle, useAntdToken } from "antd-style";
116
- import { createStyles as An } from "antd-style";
116
+ import { createStyles as Rn } from "antd-style";
117
117
  import * as dndKitCore from "@dnd-kit/core";
118
118
  import { DndContext as DndContext$1, rectIntersection, DragOverlay, useDroppable, useDndContext, useDndMonitor, useDraggable } from "@dnd-kit/core";
119
119
  import * as dndKitSortable from "@dnd-kit/sortable";
@@ -7683,7 +7683,7 @@ function getPlugins(e) {
7683
7683
  const r = [], a = {};
7684
7684
  if (o) {
7685
7685
  try {
7686
- for (var l = Te(n), c, u, d; c = !(u = yield l.next()).done; c = !1) {
7686
+ for (var l = Re(n), c, u, d; c = !(u = yield l.next()).done; c = !1) {
7687
7687
  const p = u.value;
7688
7688
  const m = yield o(p.packageName);
7689
7689
  m && (r.push([p.name, m.default]), a[p.packageName] = m.default);
@@ -7728,7 +7728,7 @@ let PluginManager$1 = class {
7728
7728
  initStaticPlugins() {
7729
7729
  return q(this, arguments, function* (t = []) {
7730
7730
  try {
7731
- for (var n = Te(t), o, r, a; o = !(r = yield n.next()).done; o = !1) {
7731
+ for (var n = Re(t), o, r, a; o = !(r = yield n.next()).done; o = !1) {
7732
7732
  const i = r.value;
7733
7733
  const l = Array.isArray(i) ? i[0] : i, c = Array.isArray(i) ? i[1] : void 0;
7734
7734
  yield this.add(l, c);
@@ -7754,7 +7754,7 @@ let PluginManager$1 = class {
7754
7754
  devDynamicImport: this.app.devDynamicImport
7755
7755
  });
7756
7756
  try {
7757
- for (var a = Te(o), i, l, c; i = !(l = yield a.next()).done; i = !1) {
7757
+ for (var a = Re(o), i, l, c; i = !(l = yield a.next()).done; i = !1) {
7758
7758
  const [u, d] = l.value;
7759
7759
  const p = n.find((m) => m.name === u);
7760
7760
  yield this.add(d, p);
@@ -8769,7 +8769,7 @@ function addAppVersion(e, t) {
8769
8769
  addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
8770
8770
  }), e;
8771
8771
  }
8772
- const name = "@nocobase/client", version = "1.8.10", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
8772
+ const name = "@nocobase/client", version = "1.8.12", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
8773
8773
  "@ahooksjs/use-url-state": "3.5.1",
8774
8774
  "@ant-design/cssinjs": "^1.11.1",
8775
8775
  "@ant-design/icons": "^5.6.1",
@@ -8790,9 +8790,9 @@ const name = "@nocobase/client", version = "1.8.10", license = "AGPL-3.0", main
8790
8790
  "@formily/reactive-react": "^2.2.27",
8791
8791
  "@formily/shared": "^2.2.27",
8792
8792
  "@formily/validator": "^2.2.27",
8793
- "@nocobase/evaluators": "1.8.10",
8794
- "@nocobase/sdk": "1.8.10",
8795
- "@nocobase/utils": "1.8.10",
8793
+ "@nocobase/evaluators": "1.8.12",
8794
+ "@nocobase/sdk": "1.8.12",
8795
+ "@nocobase/utils": "1.8.12",
8796
8796
  ahooks: "^3.7.2",
8797
8797
  antd: "5.24.2",
8798
8798
  "antd-style": "3.7.1",
@@ -10055,32 +10055,32 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
10055
10055
  }), adjustColumnOrder$1(I);
10056
10056
  }, [S, c, r, u, e.showDel, l]);
10057
10057
  }, SortableRow$1 = (e) => {
10058
- var m, g, f, C, b, y;
10058
+ var m, g, f;
10059
10059
  const { token: t } = useToken$1(), n = (m = e["data-row-key"]) == null ? void 0 : m.toString(), { setNodeRef: o, active: r, over: a } = useSortable({
10060
10060
  id: n
10061
- }), i = (a == null ? void 0 : a.id) == n, h = e, { rowIndex: l } = h, c = W(h, ["rowIndex"]), u = useMemo(() => {
10062
- const S = new TinyColor(t.colorSettings).setAlpha(0.6).toHex8String();
10061
+ }), h = e, { rowIndex: i } = h, l = W(h, ["rowIndex"]), c = (a == null ? void 0 : a.id) == n, u = useMemo(() => {
10062
+ const C = new TinyColor(t.colorSettings).setAlpha(0.6).toHex8String();
10063
10063
  return {
10064
10064
  topActiveClass: css`
10065
10065
  & > td {
10066
- border-top: 2px solid ${S} !important;
10066
+ border-top: 2px solid ${C} !important;
10067
10067
  }
10068
10068
  `,
10069
10069
  bottomActiveClass: css`
10070
10070
  & > td {
10071
- border-bottom: 2px solid ${S} !important;
10071
+ border-bottom: 2px solid ${C} !important;
10072
10072
  }
10073
10073
  `
10074
10074
  };
10075
- }, [t.colorSettings]), d = ((f = (g = r == null ? void 0 : r.data.current) == null ? void 0 : g.sortable.index) != null ? f : -1) > ((y = (b = (C = a == null ? void 0 : a.data.current) == null ? void 0 : C.sortable) == null ? void 0 : b.index) != null ? y : -1) ? u.topActiveClass : u.bottomActiveClass;
10075
+ }, [t.colorSettings]), d = ((f = (g = r == null ? void 0 : r.data.current) == null ? void 0 : g.sortable.index) != null ? f : -1) > i ? u.topActiveClass : u.bottomActiveClass;
10076
10076
  return /* @__PURE__ */ jsx(
10077
10077
  "tr",
10078
10078
  P(x({
10079
- ref: (S) => {
10080
- (r == null ? void 0 : r.id) !== n && o(S);
10079
+ ref: (C) => {
10080
+ (r == null ? void 0 : r.id) !== n && o(C);
10081
10081
  }
10082
- }, c), {
10083
- className: cls(e.className, { [d]: r && i })
10082
+ }, l), {
10083
+ className: cls(e.className, { [d]: r && c })
10084
10084
  })
10085
10085
  );
10086
10086
  }, SortHandle$2 = (e) => {
@@ -10340,8 +10340,8 @@ InternalNocoBaseTable$1.displayName = "InternalNocoBaseTable";
10340
10340
  const Table$2 = withDynamicSchemaProps(
10341
10341
  withSkeletonComponent(
10342
10342
  observer$1((e) => {
10343
- var be, Se;
10344
- const { token: t } = useToken$1(), pe = omit(e, ["onBlur", "onFocus"]), { pagination: n, useProps: o } = pe, r = W(pe, ["pagination", "useProps"]), me = (o == null ? void 0 : o()) || {}, { pagination: a } = me, i = W(me, ["pagination"]), de = x(x({}, r), i), {
10343
+ var Se, se;
10344
+ const { token: t } = useToken$1(), he = omit(e, ["onBlur", "onFocus"]), { pagination: n, useProps: o } = he, r = W(he, ["pagination", "useProps"]), de = (o == null ? void 0 : o()) || {}, { pagination: a } = de, i = W(de, ["pagination"]), be = x(x({}, r), i), {
10345
10345
  dragSort: l = !1,
10346
10346
  showIndex: c = !0,
10347
10347
  onRowSelectionChange: u,
@@ -10353,7 +10353,7 @@ const Table$2 = withDynamicSchemaProps(
10353
10353
  loading: f,
10354
10354
  onClickRow: C,
10355
10355
  value: b
10356
- } = de, y = W(de, [
10356
+ } = be, y = W(be, [
10357
10357
  "dragSort",
10358
10358
  "showIndex",
10359
10359
  "onRowSelectionChange",
@@ -10365,188 +10365,188 @@ const Table$2 = withDynamicSchemaProps(
10365
10365
  "loading",
10366
10366
  "onClickRow",
10367
10367
  "value"
10368
- ]), S = useArrayField$1(y), v = useFieldSchema(), { size: I = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, F = useCollection(), T = ((be = v == null ? void 0 : v.parent) == null ? void 0 : be["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: B, enableIndexColumn: N } = T, O = useMemoizedFn(y.onRowDragEnd || (() => {
10369
- })), j = usePaginationProps$3(n, a, e), w = useTableColumns$2(y, j), [L, $] = useState(() => D ? B : []), [k, M] = useState(((Se = S == null ? void 0 : S.data) == null ? void 0 : Se.selectedRowKeys) || []), [V, E] = useState([]), z = (p == null ? void 0 : p.type) !== "none", H = useRef(/* @__PURE__ */ new Map()), U = useMemo(() => css`
10368
+ ]), S = useArrayField$1(y), v = useFieldSchema(), { size: I = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, F = useCollection(), T = ((Se = v == null ? void 0 : v.parent) == null ? void 0 : Se["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: B, enableIndexColumn: N } = T, O = useMemoizedFn(y.onRowDragEnd || (() => {
10369
+ })), j = usePaginationProps$3(n, a, e), w = useTableColumns$2(y, j), [L, $] = useState(() => D ? B : []), [k, M] = useState(((se = S == null ? void 0 : S.data) == null ? void 0 : se.selectedRowKeys) || []), [V, E] = useState([]), z = (p == null ? void 0 : p.type) !== "none", H = useRef(/* @__PURE__ */ new Map()), U = useMemo(() => css`
10370
10370
  & > td {
10371
10371
  background-color: ${t.controlItemBgActive} !important;
10372
10372
  }
10373
10373
  &:hover > td {
10374
10374
  background-color: ${t.controlItemBgActiveHover} !important;
10375
10375
  }
10376
- `, [t.controlItemBgActive, t.controlItemBgActiveHover]), G = useTableBlockContextBasicValue();
10377
- useEffect(() => {
10378
- var Z;
10379
- G != null && G.field && (G.field.data = ((Z = G.field) == null ? void 0 : Z.data) || {}, G.field.data.clearSelectedRowKeys = () => {
10376
+ `, [t.controlItemBgActive, t.controlItemBgActiveHover]), G = useTableBlockContextBasicValue(), Y = useRef(b);
10377
+ Y.current = b, useEffect(() => {
10378
+ var te;
10379
+ G != null && G.field && (G.field.data = ((te = G.field) == null ? void 0 : te.data) || {}, G.field.data.clearSelectedRowKeys = () => {
10380
10380
  G.field.data.selectedRowKeys = [], M([]);
10381
10381
  }, G.field.data.setSelectedRowKeys = M);
10382
10382
  }, [G == null ? void 0 : G.field]);
10383
- const Y = useMemo(() => C ? U : "", [U, C]), J = useMemo(() => C ? (Z, oe) => ({
10384
- onClick: (re) => {
10385
- isPortalInBody(re.target) || C(Z, E, V);
10383
+ const J = useMemo(() => C ? U : "", [U, C]), K = useMemo(() => C ? (te, oe) => ({
10384
+ onClick: (ae) => {
10385
+ isPortalInBody(ae.target) || C(te, E, V);
10386
10386
  },
10387
10387
  rowIndex: oe,
10388
- record: Z
10389
- }) : (Z, oe) => ({
10388
+ record: te
10389
+ }) : (te, oe) => ({
10390
10390
  rowIndex: oe,
10391
- record: Z
10391
+ record: te
10392
10392
  }), [C, V]);
10393
10393
  useDeepCompareEffect(() => {
10394
- const Z = D ? B : [];
10395
- _.isEqual(Z, L) || $(Z);
10394
+ const te = D ? B : [];
10395
+ _.isEqual(te, L) || $(te);
10396
10396
  }, [D, B]);
10397
- const K = useCallback((Z) => {
10397
+ const X = useCallback((te) => {
10398
10398
  if (m)
10399
- return X(Z);
10400
- if (Z.key)
10401
- return Z.key;
10402
- if (H.current.has(Z))
10403
- return H.current.get(Z);
10399
+ return Z(te);
10400
+ if (te.key)
10401
+ return te.key;
10402
+ if (H.current.has(te))
10403
+ return H.current.get(te);
10404
10404
  const oe = uid();
10405
- return H.current.set(Z, oe), oe;
10406
- }, []), X = useCallback(
10407
- (Z) => {
10405
+ return H.current.set(te, oe), oe;
10406
+ }, []), Z = useCallback(
10407
+ (te) => {
10408
10408
  var oe;
10409
- return Array.isArray(m) ? m.map((re) => {
10410
- var ie;
10411
- return ((ie = Z[re]) == null ? void 0 : ie.toString()) || "";
10412
- }).join("-") : typeof m == "string" ? Z[m] : (oe = (m != null ? m : K)(Z)) == null ? void 0 : oe.toString();
10409
+ return Array.isArray(m) ? m.map((ae) => {
10410
+ var le;
10411
+ return ((le = te[ae]) == null ? void 0 : le.toString()) || "";
10412
+ }).join("-") : typeof m == "string" ? te[m] : (oe = (m != null ? m : X)(te)) == null ? void 0 : oe.toString();
10413
10413
  },
10414
- [JSON.stringify(m), K]
10415
- ), ee = useMemo(() => (Array.isArray(b) ? b : []).filter(Boolean), [b, b == null ? void 0 : b.length]), Q = useMemo(() => (Z) => {
10416
- const oe = useCallback((re) => {
10417
- var ye, ve, Pe, Fe, Ie, Ae;
10418
- if (!re.active || !re.over) {
10414
+ [JSON.stringify(m), X]
10415
+ ), Q = useMemo(() => (Array.isArray(b) ? b : []).filter(Boolean), [b, b == null ? void 0 : b.length]), ee = useMemo(() => (te) => {
10416
+ const oe = useCallback((ae) => {
10417
+ var ve, Pe, Fe, Ie, Ae, De, je, Me;
10418
+ if (!ae.active || !ae.over) {
10419
10419
  console.warn("move cancel");
10420
10420
  return;
10421
10421
  }
10422
- const ie = (Pe = (ve = (ye = re.active) == null ? void 0 : ye.data.current) == null ? void 0 : ve.sortable) == null ? void 0 : Pe.index, ce = (Ae = (Ie = (Fe = re.over) == null ? void 0 : Fe.data.current) == null ? void 0 : Ie.sortable) == null ? void 0 : Ae.index, fe = (b == null ? void 0 : b[ie]) || re.active, Re = (b == null ? void 0 : b[ce]) || re.over;
10423
- S.move(ie, ce), O({ from: fe, to: Re });
10422
+ const le = (Fe = (Pe = (ve = ae.active) == null ? void 0 : ve.data.current) == null ? void 0 : Pe.sortable) == null ? void 0 : Fe.index, ue = (De = (Ae = (Ie = ae.over) == null ? void 0 : Ie.data.current) == null ? void 0 : Ae.sortable) == null ? void 0 : De.index, ye = ((je = Y.current) == null ? void 0 : je[le]) || ae.active, ke = ((Me = Y.current) == null ? void 0 : Me[ue]) || ae.over;
10423
+ S.move(le, ue), O({ from: ye, to: ke });
10424
10424
  }, []);
10425
- return /* @__PURE__ */ jsx(DndContext, { onDragEnd: oe, children: /* @__PURE__ */ jsx("tbody", x({}, Z)) });
10425
+ return /* @__PURE__ */ jsx(DndContext, { onDragEnd: oe, children: /* @__PURE__ */ jsx("tbody", x({}, te)) });
10426
10426
  }, [S, O]);
10427
- Q.displayName = "BodyWrapperComponent";
10428
- const te = useMemo(() => ({
10427
+ ee.displayName = "BodyWrapperComponent";
10428
+ const ne = useMemo(() => ({
10429
10429
  header: {
10430
10430
  wrapper: HeaderWrapperComponent$1,
10431
10431
  cell: HeaderCellComponent$1
10432
10432
  },
10433
10433
  body: {
10434
- wrapper: Q,
10434
+ wrapper: ee,
10435
10435
  row: BodyRowComponent$1,
10436
10436
  cell: BodyCellComponent$1
10437
10437
  }
10438
- }), [Q]), ne = useMemo(() => p, [JSON.stringify(p)]), se = useMemo(
10438
+ }), [ee]), re = useMemo(() => p, [JSON.stringify(p)]), ie = useMemo(
10439
10439
  () => ({
10440
- rowSelection: N !== !1 && ne ? x({
10440
+ rowSelection: N !== !1 && re ? x({
10441
10441
  type: "checkbox",
10442
10442
  selectedRowKeys: k,
10443
- onChange(Z, oe) {
10444
- S.data = S.data || {}, S.data.selectedRowKeys = Z, S.data.selectedRowData = oe, M(Z), u == null || u(Z, oe, M);
10443
+ onChange(te, oe) {
10444
+ S.data = S.data || {}, S.data.selectedRowKeys = te, S.data.selectedRowData = oe, M(te), u == null || u(te, oe, M);
10445
10445
  },
10446
- onSelect: (Z, oe, re, ie) => {
10447
- var ce;
10448
- G && (G.field.data = ((ce = G.field) == null ? void 0 : ce.data) || {}, G.field.data.selectedRecord = Z, G.field.data.selected = oe);
10446
+ onSelect: (te, oe, ae, le) => {
10447
+ var ue;
10448
+ G && (G.field.data = ((ue = G.field) == null ? void 0 : ue.data) || {}, G.field.data.selectedRecord = te, G.field.data.selected = oe);
10449
10449
  },
10450
- getCheckboxProps(Z) {
10450
+ getCheckboxProps(te) {
10451
10451
  return {
10452
10452
  "aria-label": "checkbox"
10453
10453
  };
10454
10454
  },
10455
- renderCell: (Z, oe, re, ie) => {
10455
+ renderCell: (te, oe, ae, le) => {
10456
10456
  if (!l && !c)
10457
- return ie;
10458
- const ce = j == null ? void 0 : j.current, fe = (j == null ? void 0 : j.pageSize) || 20;
10459
- return ce ? re = re + (ce - 1) * fe + 1 : re = re + 1, oe.__index && (re = extractIndex(oe.__index)), /* @__PURE__ */ jsxs(
10457
+ return le;
10458
+ const ue = j == null ? void 0 : j.current, ye = (j == null ? void 0 : j.pageSize) || 20;
10459
+ return ue ? ae = ae + (ue - 1) * ye + 1 : ae = ae + 1, oe.__index && (ae = extractIndex(oe.__index)), /* @__PURE__ */ jsxs(
10460
10460
  "div",
10461
10461
  {
10462
10462
  role: "button",
10463
- "aria-label": `table-index-${re}`,
10464
- className: cls(Z ? "checked" : null, rowSelectCheckboxWrapperClass$1, {
10463
+ "aria-label": `table-index-${ae}`,
10464
+ className: cls(te ? "checked" : null, rowSelectCheckboxWrapperClass$1, {
10465
10465
  [rowSelectCheckboxWrapperClassHover$1]: z
10466
10466
  }),
10467
10467
  children: [
10468
- /* @__PURE__ */ jsxs("div", { className: cls(Z ? "checked" : null, rowSelectCheckboxContentClass$1), children: [
10469
- l && /* @__PURE__ */ jsx(SortHandle$2, { id: X(oe) }),
10470
- c && /* @__PURE__ */ jsx(TableIndex$3, { index: re })
10468
+ /* @__PURE__ */ jsxs("div", { className: cls(te ? "checked" : null, rowSelectCheckboxContentClass$1), children: [
10469
+ l && /* @__PURE__ */ jsx(SortHandle$2, { id: Z(oe) }),
10470
+ c && /* @__PURE__ */ jsx(TableIndex$3, { index: ae })
10471
10471
  ] }),
10472
10472
  z && /* @__PURE__ */ jsx(
10473
10473
  "div",
10474
10474
  {
10475
10475
  className: cls(
10476
10476
  "nb-origin-node",
10477
- Z ? "checked" : null,
10477
+ te ? "checked" : null,
10478
10478
  rowSelectCheckboxCheckedClassHover$1
10479
10479
  ),
10480
- children: ie
10480
+ children: le
10481
10481
  }
10482
10482
  )
10483
10483
  ]
10484
10484
  }
10485
10485
  );
10486
10486
  }
10487
- }, ne) : void 0
10487
+ }, re) : void 0
10488
10488
  }),
10489
10489
  [
10490
- ne,
10490
+ re,
10491
10491
  k,
10492
10492
  u,
10493
10493
  c,
10494
10494
  l,
10495
10495
  S,
10496
- X,
10496
+ Z,
10497
10497
  z,
10498
- ne,
10498
+ re,
10499
10499
  j,
10500
10500
  G,
10501
10501
  N
10502
10502
  ]
10503
- ), ae = useCallback(
10504
- ({ children: Z }) => {
10505
- var oe;
10503
+ ), pe = useCallback(
10504
+ ({ children: te }) => {
10505
+ var oe, ae;
10506
10506
  return l ? React.createElement(
10507
10507
  SortableContext$1,
10508
10508
  {
10509
- items: ((oe = b == null ? void 0 : b.map) == null ? void 0 : oe.call(b, X)) || []
10509
+ items: ((ae = (oe = Y.current) == null ? void 0 : oe.map) == null ? void 0 : ae.call(oe, Z)) || []
10510
10510
  },
10511
- Z
10512
- ) : React.createElement(React.Fragment, {}, Z);
10511
+ te
10512
+ ) : React.createElement(React.Fragment, {}, te);
10513
10513
  },
10514
- [l, X]
10514
+ [l, Z]
10515
10515
  // Don't put 'value' in dependencies, otherwise it will cause the dropdown component to disappear immediately when adding association fields to the table
10516
- ), { height: ue, tableSizeRefCallback: le } = useTableSize(), Ce = useMemo(() => ({
10516
+ ), { height: ce, tableSizeRefCallback: fe } = useTableSize(), ge = useMemo(() => ({
10517
10517
  x: "max-content",
10518
- y: ue
10519
- }), [ue, ee]), he = useCallback(
10520
- (Z) => V.includes(Z[m]) ? Y : "",
10521
- [V, Y, JSON.stringify(m)]
10522
- ), ge = useCallback(
10523
- (Z, oe) => {
10524
- const re = Z ? [...L, oe[F.getPrimaryKey()]] : L.filter((ie) => oe[F.getPrimaryKey()] !== ie);
10525
- $(re), g == null || g(Z, oe);
10518
+ y: ce
10519
+ }), [ce, Q]), Ce = useCallback(
10520
+ (te) => V.includes(te[m]) ? J : "",
10521
+ [V, J, JSON.stringify(m)]
10522
+ ), me = useCallback(
10523
+ (te, oe) => {
10524
+ const ae = te ? [...L, oe[F.getPrimaryKey()]] : L.filter((le) => oe[F.getPrimaryKey()] !== le);
10525
+ $(ae), g == null || g(te, oe);
10526
10526
  },
10527
10527
  [L, g, F]
10528
10528
  ), xe = useMemo(() => ({
10529
- onExpand: ge,
10529
+ onExpand: me,
10530
10530
  expandedRowKeys: L
10531
- }), [L, ge]);
10531
+ }), [L, me]);
10532
10532
  return (
10533
10533
  // If spinning is set to undefined, it will cause the subtable to always display loading, so we need to convert it here.
10534
10534
  // We use Spin here instead of Table's loading prop because using Spin here reduces unnecessary re-renders.
10535
10535
  /* @__PURE__ */ jsx(HighPerformanceSpin, { spinning: !!f, children: /* @__PURE__ */ jsx(BlockRequestLoadingContext.Provider, { value: !1, children: /* @__PURE__ */ jsx(
10536
10536
  InternalNocoBaseTable$1,
10537
10537
  P(x(x({
10538
- tableHeight: ue,
10539
- SortableWrapper: ae,
10540
- tableSizeRefCallback: le,
10541
- defaultRowKey: K,
10542
- dataSource: ee
10543
- }, y), se), {
10538
+ tableHeight: ce,
10539
+ SortableWrapper: pe,
10540
+ tableSizeRefCallback: fe,
10541
+ defaultRowKey: X,
10542
+ dataSource: Q
10543
+ }, y), ie), {
10544
10544
  paginationProps: j,
10545
- components: te,
10545
+ components: ne,
10546
10546
  onTableChange: d,
10547
- onRow: J,
10548
- rowClassName: he,
10549
- scroll: Ce,
10547
+ onRow: K,
10548
+ rowClassName: Ce,
10549
+ scroll: ge,
10550
10550
  columns: w,
10551
10551
  expandable: xe,
10552
10552
  field: S,
@@ -10782,7 +10782,7 @@ const InternalTableBlockProvider = (e) => {
10782
10782
  [t, p]
10783
10783
  ), F = useCallback(
10784
10784
  (w, L, $, k) => {
10785
- var ee;
10785
+ var Z;
10786
10786
  const {
10787
10787
  association: M = !1,
10788
10788
  cached: V = {},
@@ -10799,21 +10799,21 @@ const InternalTableBlockProvider = (e) => {
10799
10799
  if (V[w])
10800
10800
  return _.cloneDeep(V[w]);
10801
10801
  L && typeof L == "string" && (L = [L]), $ && typeof $ == "string" && ($ = [$]);
10802
- const K = b(w, J), X = (ee = K == null ? void 0 : K.filter(
10802
+ const K = b(w, J), X = (Z = K == null ? void 0 : K.filter(
10803
10803
  (Q) => Q.interface && !U.includes(Q.interface) && (H || L && L.includes(Q.type) || $ && $.includes(Q.interface) || (M && Q.target && Q.target !== w && Array.isArray(M) ? M.includes(Q.interface) : !1))
10804
- )) == null ? void 0 : ee.map((Q) => {
10805
- var ne, se;
10806
- const te = x({
10804
+ )) == null ? void 0 : Z.map((Q) => {
10805
+ var ne, re;
10806
+ const ee = x({
10807
10807
  value: Y && G ? `${G}.${Q.name}` : Q.name,
10808
10808
  label: f((ne = Q == null ? void 0 : Q.uiSchema) == null ? void 0 : ne.title) || Q.name
10809
10809
  }, Q);
10810
- return M && Q.target && (te.children = E.includes(Q.target) ? [] : F(Q.target, L, $, P(x({}, k), {
10810
+ return M && Q.target && (ee.children = E.includes(Q.target) ? [] : F(Q.target, L, $, P(x({}, k), {
10811
10811
  cached: V,
10812
10812
  dataSource: J,
10813
10813
  collectionNames: [...E, Q.target],
10814
10814
  prefixFieldValue: Y ? G ? `${G}.${Q.name}` : Q.name : "",
10815
10815
  usePrefix: Y
10816
- })), !((se = te.children) != null && se.length)) ? null : te;
10816
+ })), !((re = ee.children) != null && re.length)) ? null : ee;
10817
10817
  }).filter(Boolean);
10818
10818
  return V[w] = X, X;
10819
10819
  },
@@ -15473,14 +15473,14 @@ const useGetFilterOptions = () => {
15473
15473
  options: m,
15474
15474
  value: p == null ? void 0 : p.label,
15475
15475
  onChange: (U) => {
15476
- var J, K, X, ee, Q;
15476
+ var J, K, X, Z, Q;
15477
15477
  const G = P(x(x({}, (K = (J = o == null ? void 0 : o.uiSchema) == null ? void 0 : J["x-component-props"]) == null ? void 0 : K.fieldNames), (X = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : X.fieldNames), {
15478
15478
  label: U
15479
15479
  });
15480
15480
  _.set(n, "x-component-props.fieldNames", G);
15481
- const Y = (Q = l.path) == null ? void 0 : Q.splice(((ee = l.path) == null ? void 0 : ee.length) - 1, 1);
15482
- l.form.query(`${Y.concat("*." + n.name)}`).forEach((te) => {
15483
- te.componentProps.fieldNames = G;
15481
+ const Y = (Q = l.path) == null ? void 0 : Q.splice(((Z = l.path) == null ? void 0 : Z.length) - 1, 1);
15482
+ l.form.query(`${Y.concat("*." + n.name)}`).forEach((ee) => {
15483
+ ee.componentProps.fieldNames = G;
15484
15484
  }), d.emit("patch", {
15485
15485
  schema: {
15486
15486
  "x-uid": n["x-uid"],
@@ -18032,19 +18032,19 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
18032
18032
  let X = K == null ? void 0 : K.parentElement;
18033
18033
  for (; X && X.clientHeight === 0; )
18034
18034
  X = X.parentElement;
18035
- const ee = g || X;
18036
- if (!ee)
18035
+ const Z = g || X;
18036
+ if (!Z)
18037
18037
  return;
18038
18038
  function Q() {
18039
18039
  var ne;
18040
18040
  K && (K.classList.remove(G), (ne = e.onVisibleChange) == null || ne.call(e, !0));
18041
18041
  }
18042
- function te() {
18042
+ function ee() {
18043
18043
  var ne;
18044
18044
  K && (K.classList.add(G), (ne = e.onVisibleChange) == null || ne.call(e, !1));
18045
18045
  }
18046
- return ee.addEventListener("mouseenter", Q), ee.addEventListener("mouseleave", te), () => {
18047
- ee.removeEventListener("mouseenter", Q), ee.removeEventListener("mouseleave", te);
18046
+ return Z.addEventListener("mouseenter", Q), Z.addEventListener("mouseleave", ee), () => {
18047
+ Z.removeEventListener("mouseenter", Q), Z.removeEventListener("mouseleave", ee);
18048
18048
  };
18049
18049
  }, [e.onVisibleChange, g]);
18050
18050
  const Y = useMemo(
@@ -23317,7 +23317,7 @@ function getTypedConstantOption(e, t, n) {
23317
23317
  };
23318
23318
  }
23319
23319
  function Input$1(e) {
23320
- var K, X, ee;
23320
+ var K, X, Z;
23321
23321
  const J = e, {
23322
23322
  value: t = "",
23323
23323
  onChange: n,
@@ -23362,10 +23362,10 @@ function Input$1(e) {
23362
23362
  label: I("Constant"),
23363
23363
  [k.value]: "$",
23364
23364
  [k.label]: I("Constant")
23365
- } : a ? getTypedConstantOption(L, a, k) : null : null, [L, a]), V = (K = M == null ? void 0 : M.component) != null ? K : NullComponent, E = Array.isArray(a) ? (ee = (X = a.find((Q) => Array.isArray(Q) && Q[0] === L)) == null ? void 0 : X[1]) != null ? ee : {} : {};
23365
+ } : a ? getTypedConstantOption(L, a, k) : null : null, [L, a]), V = (K = M == null ? void 0 : M.component) != null ? K : NullComponent, E = Array.isArray(a) ? (Z = (X = a.find((Q) => Array.isArray(Q) && Q[0] === L)) == null ? void 0 : X[1]) != null ? Z : {} : {};
23366
23366
  let z;
23367
23367
  t == null ? i ? o && N ? z = ["$"] : z = [""] : o ? z = ["$"] : z = [" ", L] : z = o ? ["$"] : [" ", L], m && (z = ["$"]), useEffect(() => {
23368
- const se = M != null ? M : {}, { component: Q } = se, te = W(se, ["component"]), ne = [
23368
+ const re = M != null ? M : {}, { component: Q } = re, ee = W(re, ["component"]), ne = [
23369
23369
  ...i ? [
23370
23370
  {
23371
23371
  value: "",
@@ -23374,30 +23374,30 @@ function Input$1(e) {
23374
23374
  [k.label]: I("Null")
23375
23375
  }
23376
23376
  ] : [],
23377
- ...M ? [v(te)] : [],
23377
+ ...M ? [v(ee)] : [],
23378
23378
  ...f ? [...f] : []
23379
- ].filter((ae) => !ae.deprecated || ($ == null ? void 0 : $[0]) === ae[k.value]);
23379
+ ].filter((ie) => !ie.deprecated || ($ == null ? void 0 : $[0]) === ie[k.value]);
23380
23380
  T(ne);
23381
23381
  }, [f, $, M, i]);
23382
23382
  const H = (Q) => q(this, null, function* () {
23383
23383
  var ne;
23384
- const te = Q[Q.length - 1];
23385
- if (!((ne = te.children) != null && ne.length) && !te.isLeaf && te.loadChildren) {
23386
- let se;
23384
+ const ee = Q[Q.length - 1];
23385
+ if (!((ne = ee.children) != null && ne.length) && !ee.isLeaf && ee.loadChildren) {
23386
+ let re;
23387
23387
  if ($ && $.length >= 2) {
23388
- for (const ae of $)
23389
- if (ae === te[k.value]) {
23390
- se = ae;
23388
+ for (const ie of $)
23389
+ if (ie === ee[k.value]) {
23390
+ re = ie;
23391
23391
  break;
23392
23392
  }
23393
23393
  }
23394
- yield te.loadChildren(te, se, $), T((ae) => [...ae]);
23394
+ yield ee.loadChildren(ee, re, $), T((ie) => [...ie]);
23395
23395
  }
23396
23396
  }), U = useCallback(
23397
- (Q, te) => {
23398
- var ne, se, ae;
23397
+ (Q, ee) => {
23398
+ var ne, re, ie;
23399
23399
  if (Q[0] === "$") {
23400
- O(!0), $ && n(null, te);
23400
+ O(!0), $ && n(null, ee);
23401
23401
  return;
23402
23402
  } else
23403
23403
  O(!1);
@@ -23406,35 +23406,35 @@ function Input$1(e) {
23406
23406
  return;
23407
23407
  }
23408
23408
  if (Q[0] === " ") {
23409
- Q[1] ? Q[1] !== L && n((ae = (se = (ne = ConstantTypes[Q[1]]) == null ? void 0 : ne.default) == null ? void 0 : se.call(ne)) != null ? ae : null, te) : $ && n(null, te);
23409
+ Q[1] ? Q[1] !== L && n((ie = (re = (ne = ConstantTypes[Q[1]]) == null ? void 0 : ne.default) == null ? void 0 : re.call(ne)) != null ? ie : null, ee) : $ && n(null, ee);
23410
23410
  return;
23411
23411
  }
23412
- n(`{{${Q.join(".")}}}`, te);
23412
+ n(`{{${Q.join(".")}}}`, ee);
23413
23413
  },
23414
23414
  [L, $, n]
23415
23415
  ), G = useCallback(() => {
23416
23416
  var Q;
23417
23417
  if (O(!!o), (Q = M == null ? void 0 : M.children) != null && Q.length) {
23418
- const te = M.children[0].default();
23419
- return n(te);
23418
+ const ee = M.children[0].default();
23419
+ return n(ee);
23420
23420
  }
23421
23421
  n(null);
23422
23422
  }, [M]);
23423
23423
  useEffect(() => {
23424
23424
  q(this, null, function* () {
23425
- var se;
23425
+ var re;
23426
23426
  if (!$ || R.length <= 1)
23427
23427
  return;
23428
- let te = null;
23428
+ let ee = null;
23429
23429
  const ne = [];
23430
- for (let ae = 0; ae < $.length; ae++) {
23431
- const ue = $[ae];
23430
+ for (let ie = 0; ie < $.length; ie++) {
23431
+ const pe = $[ie];
23432
23432
  try {
23433
- if (ae === 0 ? te = R.find((le) => le[k.value] === ue) : (te.loadChildren && !((se = te.children) != null && se.length) && (yield te.loadChildren(te, ue, $)), te = te.children.find((le) => le[k.value] === ue)), !te)
23433
+ if (ie === 0 ? ee = R.find((ce) => ce[k.value] === pe) : (ee.loadChildren && !((re = ee.children) != null && re.length) && (yield ee.loadChildren(ee, pe, $)), ee = ee.children.find((ce) => ce[k.value] === pe)), !ee)
23434
23434
  return;
23435
- ne.push(te[k.label]);
23436
- } catch (le) {
23437
- error(le);
23435
+ ne.push(ee[k.label]);
23436
+ } catch (ce) {
23437
+ error(ce);
23438
23438
  }
23439
23439
  }
23440
23440
  T([...R]), B([...ne]);
@@ -23482,8 +23482,8 @@ function Input$1(e) {
23482
23482
  "aria-label": "variable-tag",
23483
23483
  style: { overflow: "hidden" },
23484
23484
  className: cx("ant-input ant-input-outlined", { "ant-input-disabled": Y }, b),
23485
- children: /* @__PURE__ */ jsx(Tag, { color: "blue", children: D.map((Q, te) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
23486
- te ? " / " : "",
23485
+ children: /* @__PURE__ */ jsx(Tag, { color: "blue", children: D.map((Q, ee) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
23486
+ ee ? " / " : "",
23487
23487
  Q
23488
23488
  ] }, Q)) })
23489
23489
  }
@@ -25298,6 +25298,10 @@ const LayoutContent = () => {
25298
25298
  onCollapse: y,
25299
25299
  collapsed: l,
25300
25300
  onPageChange: S,
25301
+ menu: {
25302
+ // 1.x 暂默认禁用菜单手风琴效果,2.x 支持配置
25303
+ autoClose: !1
25304
+ },
25301
25305
  menuProps: v,
25302
25306
  children: /* @__PURE__ */ jsx(RouteContext.Consumer, { children: (I) => {
25303
25307
  const { isMobile: F } = I;
@@ -26941,21 +26945,21 @@ https://requirejs.org/docs/errors.html#` + e);
26941
26945
  }
26942
26946
  }
26943
26947
  function b(k, M, V) {
26944
- var E, z, H, U, G, Y, J, K, X, ee, Q, te, ne = M && M.split("/"), se = i.map, ae = se && se["*"];
26945
- 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) === "." && ne && (te = ne.slice(0, ne.length - 1), k = te.concat(k)), C(k), k = k.join("/")), V && se && (ne || ae)) {
26948
+ var E, z, H, U, G, Y, J, K, X, Z, Q, ee, ne = M && M.split("/"), re = i.map, ie = re && re["*"];
26949
+ 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) === "." && ne && (ee = ne.slice(0, ne.length - 1), k = ee.concat(k)), C(k), k = k.join("/")), V && re && (ne || ie)) {
26946
26950
  H = k.split("/");
26947
26951
  e:
26948
26952
  for (U = H.length; U > 0; U -= 1) {
26949
26953
  if (Y = H.slice(0, U).join("/"), ne) {
26950
26954
  for (G = ne.length; G > 0; G -= 1)
26951
- if (z = getOwn(se, ne.slice(0, G).join("/")), z && (z = getOwn(z, Y), z)) {
26955
+ if (z = getOwn(re, ne.slice(0, G).join("/")), z && (z = getOwn(z, Y), z)) {
26952
26956
  K = z, X = U;
26953
26957
  break e;
26954
26958
  }
26955
26959
  }
26956
- !ee && ae && getOwn(ae, Y) && (ee = getOwn(ae, Y), Q = U);
26960
+ !Z && ie && getOwn(ie, Y) && (Z = getOwn(ie, Y), Q = U);
26957
26961
  }
26958
- !K && ee && (K = ee, X = Q), K && (H.splice(0, X, K), k = H.join("/"));
26962
+ !K && Z && (K = Z, X = Q), K && (H.splice(0, X, K), k = H.join("/"));
26959
26963
  }
26960
26964
  return E = getOwn(i.pkgs, k), E || k;
26961
26965
  }
@@ -26977,18 +26981,18 @@ https://requirejs.org/docs/errors.html#` + e);
26977
26981
  return V > -1 && (M = k.substring(0, V), k = k.substring(V + 1, k.length)), [M, k];
26978
26982
  }
26979
26983
  function I(k, M, V, E) {
26980
- var z, H, U, G, Y = null, J = M ? M.name : null, K = k, X = !0, ee = "";
26981
- return k || (X = !1, k = "_@r" + (g += 1)), G = v(k), Y = G[0], k = G[1], Y && (Y = b(Y, J, E), H = getOwn(p, Y)), k && (Y ? V ? ee = k : H && H.normalize ? ee = H.normalize(k, function(Q) {
26984
+ var z, H, U, G, Y = null, J = M ? M.name : null, K = k, X = !0, Z = "";
26985
+ return k || (X = !1, k = "_@r" + (g += 1)), G = v(k), Y = G[0], k = G[1], Y && (Y = b(Y, J, E), H = getOwn(p, Y)), k && (Y ? V ? Z = k : H && H.normalize ? Z = H.normalize(k, function(Q) {
26982
26986
  return b(Q, J, E);
26983
- }) : ee = k.indexOf("!") === -1 ? b(k, J, E) : k : (ee = b(k, J, E), G = v(ee), Y = G[0], ee = G[1], V = !0, z = o.nameToUrl(ee))), U = Y && !H && !V ? "_unnormalized" + (f += 1) : "", {
26987
+ }) : Z = k.indexOf("!") === -1 ? b(k, J, E) : k : (Z = b(k, J, E), G = v(Z), Y = G[0], Z = G[1], V = !0, z = o.nameToUrl(Z))), U = Y && !H && !V ? "_unnormalized" + (f += 1) : "", {
26984
26988
  prefix: Y,
26985
- name: ee,
26989
+ name: Z,
26986
26990
  parentMap: M,
26987
26991
  unnormalized: !!U,
26988
26992
  url: z,
26989
26993
  originalName: K,
26990
26994
  isDefine: X,
26991
- id: (Y ? Y + "!" + ee : ee) + U
26995
+ id: (Y ? Y + "!" + Z : Z) + U
26992
26996
  };
26993
26997
  }
26994
26998
  function F(k) {
@@ -27168,23 +27172,23 @@ https://requirejs.org/docs/errors.html#` + e);
27168
27172
  enabled: !0
27169
27173
  });
27170
27174
  }), z.error = bind(this, function(X) {
27171
- this.inited = !0, this.error = X, X.requireModules = [M], eachProp(l, function(ee) {
27172
- ee.map.id.indexOf(M + "_unnormalized") === 0 && B(ee.map.id);
27175
+ this.inited = !0, this.error = X, X.requireModules = [M], eachProp(l, function(Z) {
27176
+ Z.map.id.indexOf(M + "_unnormalized") === 0 && B(Z.map.id);
27173
27177
  }), T(X);
27174
- }), z.fromText = bind(this, function(X, ee) {
27175
- var Q = k.name, te = I(Q), ne = useInteractive;
27176
- ee && (X = ee), ne && (useInteractive = !1), F(te), hasProp(i.config, M) && (i.config[Q] = i.config[M]);
27178
+ }), z.fromText = bind(this, function(X, Z) {
27179
+ var Q = k.name, ee = I(Q), ne = useInteractive;
27180
+ Z && (X = Z), ne && (useInteractive = !1), F(ee), hasProp(i.config, M) && (i.config[Q] = i.config[M]);
27177
27181
  try {
27178
27182
  req.exec(X);
27179
- } catch (se) {
27183
+ } catch (re) {
27180
27184
  return T(makeError(
27181
27185
  "fromtexteval",
27182
- "fromText eval for " + M + " failed: " + se,
27183
- se,
27186
+ "fromText eval for " + M + " failed: " + re,
27187
+ re,
27184
27188
  [M]
27185
27189
  ));
27186
27190
  }
27187
- ne && (useInteractive = !0), this.depMaps.push(te), o.completeLoad(Q), K([Q], z);
27191
+ ne && (useInteractive = !0), this.depMaps.push(ee), o.completeLoad(Q), K([Q], z);
27188
27192
  }), E.load(k.name, K, z, i);
27189
27193
  })), o.enable(V, this), this.pluginMaps[V.id] = V;
27190
27194
  },
@@ -31593,7 +31597,7 @@ const useParseDefaultValue = () => {
31593
31597
  const j = transformVariableValue(B, {
31594
31598
  targetCollectionField: D
31595
31599
  });
31596
- j == null || j === "" ? e.mounted && (e.setInitialValue(null), yield e.reset({ forceClear: !0 })) : p() ? h === 0 && m(j) : e.setInitialValue(j), e.loading = !1;
31600
+ j == null || j === "" ? e.mounted && e.setInitialValue(null) : p() ? h === 0 && m(j) : e.setInitialValue(j), e.loading = !1;
31597
31601
  } else
31598
31602
  !/\{\{.+\}\}/g.test(t.default) && e.setInitialValue && e.setInitialValue(t.default);
31599
31603
  }), v = _.debounce(S, DEBOUNCE_WAIT);
@@ -37308,6 +37312,31 @@ const enabledIndexColumn$1 = {
37308
37312
  const e = useField(), { fieldSchema: t } = useColumnSchema$1(), n = useFieldSchema(), o = t || n;
37309
37313
  return ((o == null ? void 0 : o["x-read-pretty"]) || e.readPretty) && ((r = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : r.enableLink);
37310
37314
  }
37315
+ }, autoFocusSettingsItem = {
37316
+ name: "autoFocus",
37317
+ type: "switch",
37318
+ useVisible() {
37319
+ const e = useField(), { fieldSchema: t } = useColumnSchema$1(), n = useFieldSchema(), o = t || n;
37320
+ return !(o != null && o["x-read-pretty"]) && !e.readPretty;
37321
+ },
37322
+ useComponentProps() {
37323
+ var i;
37324
+ const { t: e } = useTranslation(), t = useField(), { fieldSchema: n } = useColumnSchema$1(), o = useFieldSchema(), r = n || o, { dn: a } = useDesignable();
37325
+ return {
37326
+ title: e("Auto focus"),
37327
+ checked: (i = r == null ? void 0 : r["x-component-props"]) == null ? void 0 : i.autoFocus,
37328
+ onChange(l) {
37329
+ r["x-component-props"] = P(x({}, r == null ? void 0 : r["x-component-props"]), {
37330
+ autoFocus: l
37331
+ }), t.componentProps.autoFocus = l, a.emit("patch", {
37332
+ schema: {
37333
+ "x-uid": r["x-uid"],
37334
+ "x-component-props": x({}, r == null ? void 0 : r["x-component-props"])
37335
+ }
37336
+ });
37337
+ }
37338
+ };
37339
+ }
37311
37340
  }, inputComponentSettings = new SchemaSettings({
37312
37341
  name: "fieldSettings:component:Input",
37313
37342
  items: [
@@ -37315,7 +37344,8 @@ const enabledIndexColumn$1 = {
37315
37344
  enableLinkSettingsItem,
37316
37345
  openModeSettingsItem,
37317
37346
  enableScanSettingsItem,
37318
- disableManualInputSettingsItem
37347
+ disableManualInputSettingsItem,
37348
+ autoFocusSettingsItem
37319
37349
  ]
37320
37350
  }), enableLink$1 = {
37321
37351
  name: "enableLink",
@@ -38047,10 +38077,10 @@ const enabledIndexColumn$1 = {
38047
38077
  items: [size, objectFit]
38048
38078
  }), inputTextAreaSettings = new SchemaSettings({
38049
38079
  name: "fieldSettings:component:Input.TextArea",
38050
- items: [ellipsisSettingsItem]
38080
+ items: [ellipsisSettingsItem, autoFocusSettingsItem]
38051
38081
  }), inputURLSettings = new SchemaSettings({
38052
38082
  name: "fieldSettings:component:Input.URL",
38053
- items: [ellipsisSettingsItem]
38083
+ items: [ellipsisSettingsItem, autoFocusSettingsItem]
38054
38084
  }), markdownSettings = new SchemaSettings({
38055
38085
  name: "fieldSettings:component:Markdown",
38056
38086
  items: [ellipsisSettingsItem]
@@ -38217,7 +38247,8 @@ const dividerSettings = new SchemaSettings({
38217
38247
  }
38218
38248
  },
38219
38249
  enableLinkSettingsItem,
38220
- openModeSettingsItem
38250
+ openModeSettingsItem,
38251
+ autoFocusSettingsItem
38221
38252
  ]
38222
38253
  }), filterFormItemSettings = new SchemaSettings({
38223
38254
  name: "FilterFormItemSettings",
@@ -39770,14 +39801,14 @@ const ActionLink = withDynamicSchemaProps(
39770
39801
  const K = uid(), X = [];
39771
39802
  return setTimeout(() => {
39772
39803
  H.addEffects(K, () => {
39773
- forEachLinkageRule(B, (ee, Q) => {
39804
+ forEachLinkageRule(B, (Z, Q) => {
39774
39805
  X.push(
39775
39806
  reaction(
39776
- () => [getVariableValuesInCondition({ linkageRules: B, localVariables: w })].map((se) => JSON.stringify(se)).join(","),
39807
+ () => [getVariableValuesInCondition({ linkageRules: B, localVariables: w })].map((re) => JSON.stringify(re)).join(","),
39777
39808
  () => {
39778
39809
  I.stateOfLinkageRules = {}, linkageAction(
39779
39810
  {
39780
- operator: ee.operator,
39811
+ operator: Z.operator,
39781
39812
  field: I,
39782
39813
  condition: Q.condition,
39783
39814
  variables: j,
@@ -39794,8 +39825,8 @@ const ActionLink = withDynamicSchemaProps(
39794
39825
  });
39795
39826
  });
39796
39827
  }), () => {
39797
- H.removeEffects(K), X.forEach((ee) => {
39798
- ee();
39828
+ H.removeEffects(K), X.forEach((Z) => {
39829
+ Z();
39799
39830
  });
39800
39831
  };
39801
39832
  }, [B, T]);
@@ -39805,16 +39836,16 @@ const ActionLink = withDynamicSchemaProps(
39805
39836
  },
39806
39837
  [C]
39807
39838
  ), G = useMemo(() => c && ((K, X) => q(void 0, null, function* () {
39808
- var Q, te;
39839
+ var Q, ee;
39809
39840
  yield c == null ? void 0 : c(K, X);
39810
- const ee = ((te = (Q = F["x-action-settings"]) == null ? void 0 : Q.onSuccess) == null ? void 0 : te.blocksToRefresh) || [];
39811
- ee.length > 0 && z().forEach((ne) => {
39812
- var se;
39813
- if (ee.includes(ne.uid))
39841
+ const Z = ((ee = (Q = F["x-action-settings"]) == null ? void 0 : Q.onSuccess) == null ? void 0 : ee.blocksToRefresh) || [];
39842
+ Z.length > 0 && z().forEach((ne) => {
39843
+ var re;
39844
+ if (Z.includes(ne.uid))
39814
39845
  try {
39815
- (se = ne.service) == null || se.refresh();
39816
- } catch (ae) {
39817
- console.error("Failed to refresh block:", ne.uid, ae);
39846
+ (re = ne.service) == null || re.refresh();
39847
+ } catch (ie) {
39848
+ console.error("Failed to refresh block:", ne.uid, ie);
39818
39849
  }
39819
39850
  });
39820
39851
  })), [c, F, z]);
@@ -39853,8 +39884,8 @@ const ActionLink = withDynamicSchemaProps(
39853
39884
  }),
39854
39885
  { displayName: "Action" }
39855
39886
  ), InternalAction = observer$1(function e(t) {
39856
- var he, ge, xe, pe, me;
39857
- const Ce = t, {
39887
+ var ge, Ce, me, xe, he;
39888
+ const fe = t, {
39858
39889
  containerRefKey: n,
39859
39890
  fieldSchema: o,
39860
39891
  designable: r,
@@ -39882,7 +39913,7 @@ const ActionLink = withDynamicSchemaProps(
39882
39913
  setSubmitted: B,
39883
39914
  getAriaLabel: N,
39884
39915
  parentRecordData: O
39885
- } = Ce, j = W(Ce, [
39916
+ } = fe, j = W(fe, [
39886
39917
  "containerRefKey",
39887
39918
  "fieldSchema",
39888
39919
  "designable",
@@ -39910,25 +39941,25 @@ const ActionLink = withDynamicSchemaProps(
39910
39941
  "setSubmitted",
39911
39942
  "getAriaLabel",
39912
39943
  "parentRecordData"
39913
- ]), [w, L] = useState(!1), { wrapSSR: $, componentCls: k, hashId: M } = useStyles$8(), [V, E] = useState(!1), z = o["x-toolbar-props"] || o["x-designer-props"], H = (he = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : he.openMode, U = (ge = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : ge.openSize, G = (xe = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : xe.refreshDataBlockRequest, { modal: Y } = App.useApp(), J = useForm(), K = useACLActionParamsContext(), {
39944
+ ]), [w, L] = useState(!1), { wrapSSR: $, componentCls: k, hashId: M } = useStyles$8(), [V, E] = useState(!1), z = o["x-toolbar-props"] || o["x-designer-props"], H = (ge = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : ge.openMode, U = (Ce = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : Ce.openSize, G = (me = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : me.refreshDataBlockRequest, { modal: Y } = App.useApp(), J = useForm(), K = useACLActionParamsContext(), {
39914
39945
  run: X,
39915
- element: ee,
39946
+ element: Z,
39916
39947
  disabled: Q,
39917
- loading: te
39918
- } = (F == null ? void 0 : F(R)) || {}, ne = J.disabled || a.disabled || ((pe = a.data) == null ? void 0 : pe.disabled) || I || Q, se = useMemo(() => {
39948
+ loading: ee
39949
+ } = (F == null ? void 0 : F(R)) || {}, ne = J.disabled || a.disabled || ((xe = a.data) == null ? void 0 : xe.disabled) || I || Q, re = useMemo(() => {
39919
39950
  var de;
39920
39951
  return P(x({}, v), {
39921
39952
  opacity: r && (((de = a == null ? void 0 : a.data) == null ? void 0 : de.hidden) || !K) && 0.1,
39922
39953
  color: ne ? "rgba(0, 0, 0, 0.25)" : v == null ? void 0 : v.color
39923
39954
  });
39924
- }, [K, r, (me = a == null ? void 0 : a.data) == null ? void 0 : me.hidden, v, ne]), ae = {
39955
+ }, [K, r, (he = a == null ? void 0 : a.data) == null ? void 0 : he.hidden, v, ne]), ie = {
39925
39956
  designable: r,
39926
39957
  field: a,
39927
39958
  aclCtx: K,
39928
39959
  icon: i,
39929
- loading: typeof te == "boolean" ? te : l,
39960
+ loading: typeof ee == "boolean" ? ee : l,
39930
39961
  disabled: ne,
39931
- buttonStyle: se,
39962
+ buttonStyle: re,
39932
39963
  handleMouseEnter: c,
39933
39964
  tarComponent: u,
39934
39965
  designerProps: z,
@@ -39949,18 +39980,18 @@ const ActionLink = withDynamicSchemaProps(
39949
39980
  setSubmitted: B,
39950
39981
  confirmTitle: f,
39951
39982
  title: S
39952
- }, ue = useCallback(
39983
+ }, pe = useCallback(
39953
39984
  (de) => {
39954
39985
  L == null || L(de), D == null || D(de);
39955
39986
  },
39956
39987
  [D]
39957
39988
  );
39958
- let le = /* @__PURE__ */ jsx(PopupVisibleProvider, { visible: !1, children: /* @__PURE__ */ jsxs(
39989
+ let ce = /* @__PURE__ */ jsx(PopupVisibleProvider, { visible: !1, children: /* @__PURE__ */ jsxs(
39959
39990
  ActionContextProvider,
39960
39991
  {
39961
- button: RenderButton(ae),
39992
+ button: RenderButton(ie),
39962
39993
  visible: w || T,
39963
- setVisible: ue,
39994
+ setVisible: pe,
39964
39995
  formValueChanged: V,
39965
39996
  setFormValueChanged: E,
39966
39997
  openMode: H,
@@ -39970,13 +40001,13 @@ const ActionLink = withDynamicSchemaProps(
39970
40001
  setSubmitted: B,
39971
40002
  children: [
39972
40003
  C && /* @__PURE__ */ jsx(NocoBaseRecursionField, { basePath: a.address, onlyRenderProperties: !0, schema: o }),
39973
- !C && /* @__PURE__ */ jsx(RenderButton, x({}, ae)),
40004
+ !C && /* @__PURE__ */ jsx(RenderButton, x({}, ie)),
39974
40005
  /* @__PURE__ */ jsx(VariablePopupRecordProvider, { children: !C && t.children }),
39975
- ee
40006
+ Z
39976
40007
  ]
39977
40008
  }
39978
40009
  ) });
39979
- return isBulkEditAction(o) && (le = /* @__PURE__ */ jsx(TabsContextProvider, { children: le })), $(b ? /* @__PURE__ */ jsx(TreeRecordProvider, { parent: y, children: le }) : le);
40010
+ return isBulkEditAction(o) && (ce = /* @__PURE__ */ jsx(TabsContextProvider, { children: ce })), $(b ? /* @__PURE__ */ jsx(TreeRecordProvider, { parent: y, children: ce }) : ce);
39980
40011
  });
39981
40012
  InternalAction.displayName = "InternalAction";
39982
40013
  Action.Popover = function e(t) {
@@ -40065,8 +40096,8 @@ const RenderButton = ({
40065
40096
  if (!a && n) {
40066
40097
  const K = () => {
40067
40098
  b ? b(H, () => {
40068
- var X, ee;
40069
- y !== !1 && (T == null || T(!0), (ee = (X = N()) == null ? void 0 : X.refresh) == null || ee.call(X));
40099
+ var X, Z;
40100
+ y !== !1 && (T == null || T(!0), (Z = (X = N()) == null ? void 0 : X.refresh) == null || Z.call(X));
40070
40101
  }) : isBulkEditAction(S) || !j() ? (v(!0), I == null || I()) : ["view", "update", "create", "customize:popup"].includes(S["x-action"]) && S["x-uid"] ? k.current() : (v(!0), I == null || I());
40071
40102
  };
40072
40103
  (F == null ? void 0 : F.enable) !== !1 && (F != null && F.content) ? (yield (J = V == null ? void 0 : V.submit) == null ? void 0 : J.call(V), R.confirm({
@@ -40683,8 +40714,8 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
40683
40714
  ]), b = useDataSourceKey(), y = useDataSourceHeaders(m || b), S = useRef(!1), v = useFieldSchema(), I = ((Y = v["x-component-props"]) == null ? void 0 : Y.addMode) === "quickAdd", { getField: F } = useCollection_deprecated(), R = useRef(null), { getCollectionJoinField: T, getInterface: D } = useCollectionManager_deprecated(), B = v["x-collection-field"] || v.name, N = F(B) || T(B), O = u || (N == null ? void 0 : N.target) && (t == null ? void 0 : t.label) && T(`${N.target}.${t.label}`), j = useMemo(() => {
40684
40715
  var K;
40685
40716
  if (O != null && O.interface) {
40686
- const X = D(O.interface), ee = ((K = X == null ? void 0 : X.filterable) == null ? void 0 : K.operators[0].value) || "$includes";
40687
- return O.type === "string" || O.dataType === "string" ? "$includes" : ee;
40717
+ const X = D(O.interface), Z = ((K = X == null ? void 0 : X.filterable) == null ? void 0 : K.operators[0].value) || "$includes";
40718
+ return O.type === "string" || O.dataType === "string" ? "$includes" : Z;
40688
40719
  }
40689
40720
  return "$includes";
40690
40721
  }, [O]), w = useCompile(), L = useCallback(
@@ -40692,22 +40723,22 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
40692
40723
  try {
40693
40724
  return K.filter((X) => ["number", "string"].includes(typeof X[t.value]) || !X[t.value]).map((X) => {
40694
40725
  var Q;
40695
- let ee = w(X[t.label]);
40726
+ let Z = w(X[t.label]);
40696
40727
  if ((Q = O == null ? void 0 : O.uiSchema) != null && Q.enum)
40697
- if (Array.isArray(ee))
40698
- ee = ee.map((te, ne) => {
40699
- const se = O.uiSchema.enum.find((ae) => ae.value === te);
40700
- return se ? /* @__PURE__ */ jsx(Tag, { role: "button", color: se.color, style: { marginRight: 3 }, children: (se == null ? void 0 : se.label) || te }, ne) : /* @__PURE__ */ jsx(Tag, { role: "button", children: te }, te);
40728
+ if (Array.isArray(Z))
40729
+ Z = Z.map((ee, ne) => {
40730
+ const re = O.uiSchema.enum.find((ie) => ie.value === ee);
40731
+ return re ? /* @__PURE__ */ jsx(Tag, { role: "button", color: re.color, style: { marginRight: 3 }, children: (re == null ? void 0 : re.label) || ee }, ne) : /* @__PURE__ */ jsx(Tag, { role: "button", children: ee }, ee);
40701
40732
  }).reverse();
40702
40733
  else {
40703
- const te = O.uiSchema.enum.find((ne) => ne.value === ee);
40704
- te && (ee = /* @__PURE__ */ jsx(Tag, { role: "button", color: te.color, children: te.label }));
40734
+ const ee = O.uiSchema.enum.find((ne) => ne.value === Z);
40735
+ ee && (Z = /* @__PURE__ */ jsx(Tag, { role: "button", color: ee.color, children: ee.label }));
40705
40736
  }
40706
- return (O == null ? void 0 : O.type) === "date" && (ee = dayjs(ee).format("YYYY-MM-DD")), c ? c({
40707
- [t.label]: ee || EMPTY$1,
40737
+ return (O == null ? void 0 : O.type) === "date" && (Z = dayjs(Z).format("YYYY-MM-DD")), c ? c({
40738
+ [t.label]: Z || EMPTY$1,
40708
40739
  [t.value]: X[t.value]
40709
40740
  }) : P(x({}, omit(X, "style")), {
40710
- [t.label]: ee || EMPTY$1,
40741
+ [t.label]: Z || EMPTY$1,
40711
40742
  [t.value]: X[t.value]
40712
40743
  });
40713
40744
  }).filter(Boolean);
@@ -40767,8 +40798,8 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
40767
40798
  const K = r || a;
40768
40799
  if (!((Q = $ == null ? void 0 : $.data) != null && Q.length))
40769
40800
  return K != null ? Array.isArray(K) ? K : [K] : [];
40770
- const X = K != null && (Array.isArray(K) ? K.map((te) => P(x({}, te), { [t.value]: te[t.value] || te })) : [P(x({}, K), { [t.value]: K[t.value] || K })]) || [], ee = typeof p == "function" ? $.data.filter(p) : $.data;
40771
- return uniqBy(ee.concat(X != null ? X : []), t.value);
40801
+ const X = K != null && (Array.isArray(K) ? K.map((ee) => P(x({}, ee), { [t.value]: ee[t.value] || ee })) : [P(x({}, K), { [t.value]: K[t.value] || K })]) || [], Z = typeof p == "function" ? $.data.filter(p) : $.data;
40802
+ return uniqBy(Z.concat(X != null ? X : []), t.value);
40772
40803
  }, [r, a, $ == null ? void 0 : $.data, t.value, p]);
40773
40804
  return /* @__PURE__ */ jsx(
40774
40805
  Select,
@@ -40790,7 +40821,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
40790
40821
  options: h(L(H)),
40791
40822
  rawOptions: H,
40792
40823
  dropdownRender: (K) => {
40793
- const X = H.some((ee) => ee[t.label] === R.current);
40824
+ const X = H.some((Z) => Z[t.label] === R.current);
40794
40825
  return /* @__PURE__ */ jsx(Fragment$1, { children: I ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
40795
40826
  !(($ == null ? void 0 : $.data.length) === 0 && (R != null && R.current)) && K,
40796
40827
  ($ == null ? void 0 : $.data.length) > 0 && (R == null ? void 0 : R.current) && !X && /* @__PURE__ */ jsx(Divider$1, { style: { margin: 0 } }),
@@ -43611,15 +43642,19 @@ function toValueItem(e) {
43611
43642
  return e;
43612
43643
  }
43613
43644
  const toItem = (e) => {
43614
- var t;
43615
- return typeof e == "string" ? {
43616
- url: e
43617
- } : ((t = e == null ? void 0 : e.response) != null && t.data && (e = x({
43645
+ var n;
43646
+ if (typeof e == "string")
43647
+ return {
43648
+ url: e
43649
+ };
43650
+ (n = e == null ? void 0 : e.response) != null && n.data && (e = x({
43618
43651
  uid: e.uid
43619
- }, e.response.data)), P(x({}, e), {
43652
+ }, e.response.data));
43653
+ const t = P(x({}, e), {
43620
43654
  id: e.id || e.uid,
43621
43655
  title: e.title || e.name
43622
- }));
43656
+ });
43657
+ return e.url && (t.url = e.url.startsWith("https://") || e.url.startsWith("http://") ? e.url : `${location.origin}/${e.url.replace(/^\//, "")}`), t;
43623
43658
  }, toFileList = (e) => toArr$1(e).filter(Boolean).map(toItem), Rules = {
43624
43659
  size(e, t) {
43625
43660
  const n = t != null ? t : FILE_SIZE_LIMIT_DEFAULT;
@@ -44917,7 +44952,7 @@ const InternalNesterCardCss = css`
44917
44952
  visible: p,
44918
44953
  setVisible: m
44919
44954
  },
44920
- children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, T), { children: /* @__PURE__ */ jsx(CollectionProvider_deprecated, { name: f == null ? void 0 : f.target, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: { filter: O() }, children: /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: w, children: /* @__PURE__ */ jsx(
44955
+ children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, T), { children: /* @__PURE__ */ jsx(CollectionProvider_deprecated, { name: f == null ? void 0 : f.target, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: { filter: O() }, children: /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: w, components: { CollectionField: CollectionField$1 }, children: /* @__PURE__ */ jsx(
44921
44956
  NocoBaseRecursionField,
44922
44957
  {
44923
44958
  onlyRenderProperties: !0,
@@ -46306,7 +46341,7 @@ InternalNocoBaseTable.displayName = "InternalNocoBaseTable";
46306
46341
  const Table$1 = withDynamicSchemaProps(
46307
46342
  observer$1((e) => {
46308
46343
  var de, be, Se;
46309
- const { token: t } = useToken$1(), xe = omit(e, ["onBlur", "onFocus", "value"]), { pagination: n, useProps: o } = xe, r = W(xe, ["pagination", "useProps"]), pe = (o == null ? void 0 : o()) || {}, { pagination: a } = pe, i = W(pe, ["pagination"]), me = x(x({}, r), i), {
46344
+ const { token: t } = useToken$1(), me = omit(e, ["onBlur", "onFocus", "value"]), { pagination: n, useProps: o } = me, r = W(me, ["pagination", "useProps"]), xe = (o == null ? void 0 : o()) || {}, { pagination: a } = xe, i = W(xe, ["pagination"]), he = x(x({}, r), i), {
46310
46345
  dragSort: l = !1,
46311
46346
  showIndex: c = !0,
46312
46347
  onRowSelectionChange: u,
@@ -46318,7 +46353,7 @@ const Table$1 = withDynamicSchemaProps(
46318
46353
  loading: f,
46319
46354
  onClickRow: C,
46320
46355
  enableIndexColumn: b
46321
- } = me, y = W(me, [
46356
+ } = he, y = W(he, [
46322
46357
  "dragSort",
46323
46358
  "showIndex",
46324
46359
  "onRowSelectionChange",
@@ -46338,48 +46373,48 @@ const Table$1 = withDynamicSchemaProps(
46338
46373
  &:hover > td {
46339
46374
  background-color: ${t.controlItemBgActiveHover} !important;
46340
46375
  }
46341
- `, [t.controlItemBgActive, t.controlItemBgActiveHover]), U = useMemo(() => C ? H : "", [H, C]), G = useMemo(() => C ? (Z, oe) => ({
46342
- onClick: (re) => {
46343
- isPortalInBody(re.target) || C(Z, V, M);
46376
+ `, [t.controlItemBgActive, t.controlItemBgActiveHover]), U = useMemo(() => C ? H : "", [H, C]), G = useMemo(() => C ? (se, te) => ({
46377
+ onClick: (oe) => {
46378
+ isPortalInBody(oe.target) || C(se, V, M);
46344
46379
  },
46345
- rowIndex: oe
46380
+ rowIndex: te
46346
46381
  }) : null, [C, M]);
46347
46382
  useDeepCompareEffect(() => {
46348
- const Z = D ? B : [];
46349
- _.isEqual(Z, w) || L(Z);
46383
+ const se = D ? B : [];
46384
+ _.isEqual(se, w) || L(se);
46350
46385
  }, [D, B]);
46351
- const Y = useCallback((Z) => {
46386
+ const Y = useCallback((se) => {
46352
46387
  if (m)
46353
- return J(Z);
46354
- if (Z.key)
46355
- return Z.key;
46356
- if (z.current.has(Z))
46357
- return z.current.get(Z);
46358
- const oe = uid();
46359
- return z.current.set(Z, oe), oe;
46388
+ return J(se);
46389
+ if (se.key)
46390
+ return se.key;
46391
+ if (z.current.has(se))
46392
+ return z.current.get(se);
46393
+ const te = uid();
46394
+ return z.current.set(se, te), te;
46360
46395
  }, []), J = useCallback(
46361
- (Z) => {
46362
- var oe;
46363
- return Array.isArray(m) ? m.map((re) => {
46364
- var ie;
46365
- return ((ie = Z[re]) == null ? void 0 : ie.toString()) || "";
46366
- }).join("-") : typeof m == "string" ? Z[m] : (oe = (m != null ? m : Y)(Z)) == null ? void 0 : oe.toString();
46396
+ (se) => {
46397
+ var te;
46398
+ return Array.isArray(m) ? m.map((oe) => {
46399
+ var ae;
46400
+ return ((ae = se[oe]) == null ? void 0 : ae.toString()) || "";
46401
+ }).join("-") : typeof m == "string" ? se[m] : (te = (m != null ? m : Y)(se)) == null ? void 0 : te.toString();
46367
46402
  },
46368
46403
  [JSON.stringify(m), Y]
46369
- ), K = 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(() => (Z) => {
46370
- const oe = useCallback((re) => {
46371
- var ye, ve, Pe, Fe, Ie, Ae;
46372
- if (!re.active || !re.over) {
46404
+ ), K = 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) => {
46405
+ const te = useCallback((oe) => {
46406
+ var ke, ve, Pe, Fe, Ie, Ae;
46407
+ if (!oe.active || !oe.over) {
46373
46408
  console.warn("move cancel");
46374
46409
  return;
46375
46410
  }
46376
- const ie = (Pe = (ve = (ye = re.active) == null ? void 0 : ye.data.current) == null ? void 0 : ve.sortable) == null ? void 0 : Pe.index, ce = (Ae = (Ie = (Fe = re.over) == null ? void 0 : Fe.data.current) == null ? void 0 : Ie.sortable) == null ? void 0 : Ae.index, fe = S.value[ie] || re.active, Re = S.value[ce] || re.over;
46377
- S.move(ie, ce), N({ from: fe, to: Re });
46411
+ const ae = (Pe = (ve = (ke = oe.active) == null ? void 0 : ke.data.current) == null ? void 0 : ve.sortable) == null ? void 0 : Pe.index, le = (Ae = (Ie = (Fe = oe.over) == null ? void 0 : Fe.data.current) == null ? void 0 : Ie.sortable) == null ? void 0 : Ae.index, ue = S.value[ae] || oe.active, ye = S.value[le] || oe.over;
46412
+ S.move(ae, le), N({ from: ue, to: ye });
46378
46413
  }, []);
46379
- return /* @__PURE__ */ jsx(DndContext, { onDragEnd: oe, children: /* @__PURE__ */ jsx("tbody", x({}, Z)) });
46414
+ return /* @__PURE__ */ jsx(DndContext, { onDragEnd: te, children: /* @__PURE__ */ jsx("tbody", x({}, se)) });
46380
46415
  }, [S, N]);
46381
46416
  X.displayName = "BodyWrapperComponent";
46382
- const ee = useMemo(() => ({
46417
+ const Z = useMemo(() => ({
46383
46418
  header: {
46384
46419
  wrapper: HeaderWrapperComponent,
46385
46420
  cell: HeaderCellComponent
@@ -46389,45 +46424,45 @@ const Table$1 = withDynamicSchemaProps(
46389
46424
  row: BodyRowComponent,
46390
46425
  cell: BodyCellComponent
46391
46426
  }
46392
- }), [X]), Q = useMemo(() => p, [JSON.stringify(p)]), te = useMemo(
46427
+ }), [X]), Q = useMemo(() => p, [JSON.stringify(p)]), ee = useMemo(
46393
46428
  () => ({
46394
46429
  rowSelection: b && Q ? x({
46395
46430
  type: "checkbox",
46396
46431
  selectedRowKeys: $,
46397
- onChange(Z, oe) {
46398
- S.data = S.data || {}, S.data.selectedRowKeys = Z, S.data.selectedRowData = oe, k(Z), u == null || u(Z, oe);
46432
+ onChange(se, te) {
46433
+ S.data = S.data || {}, S.data.selectedRowKeys = se, S.data.selectedRowData = te, k(se), u == null || u(se, te);
46399
46434
  },
46400
- getCheckboxProps(Z) {
46435
+ getCheckboxProps(se) {
46401
46436
  return {
46402
46437
  "aria-label": "checkbox"
46403
46438
  };
46404
46439
  },
46405
- renderCell: (Z, oe, re, ie) => {
46440
+ renderCell: (se, te, oe, ae) => {
46406
46441
  if (!l && !c)
46407
- return ie;
46408
- const ce = O == null ? void 0 : O.current, fe = (O == null ? void 0 : O.pageSize) || 20;
46409
- return ce ? re = re + (ce - 1) * fe + 1 : re = re + 1, oe.__index && (re = extractIndex(oe.__index)), /* @__PURE__ */ jsxs(
46442
+ return ae;
46443
+ const le = O == null ? void 0 : O.current, ue = (O == null ? void 0 : O.pageSize) || 20;
46444
+ return le ? oe = oe + (le - 1) * ue + 1 : oe = oe + 1, te.__index && (oe = extractIndex(te.__index)), /* @__PURE__ */ jsxs(
46410
46445
  "div",
46411
46446
  {
46412
46447
  role: "button",
46413
- "aria-label": `table-index-${re}`,
46414
- className: cls(Z ? "checked" : null, rowSelectCheckboxWrapperClass, {
46448
+ "aria-label": `table-index-${oe}`,
46449
+ className: cls(se ? "checked" : null, rowSelectCheckboxWrapperClass, {
46415
46450
  [rowSelectCheckboxWrapperClassHover]: E
46416
46451
  }),
46417
46452
  children: [
46418
- /* @__PURE__ */ jsxs("div", { className: cls(Z ? "checked" : null, rowSelectCheckboxContentClass), children: [
46419
- l && /* @__PURE__ */ jsx(SortHandle$1, { id: J(oe) }),
46420
- c && /* @__PURE__ */ jsx(TableIndex$2, { index: re })
46453
+ /* @__PURE__ */ jsxs("div", { className: cls(se ? "checked" : null, rowSelectCheckboxContentClass), children: [
46454
+ l && /* @__PURE__ */ jsx(SortHandle$1, { id: J(te) }),
46455
+ c && /* @__PURE__ */ jsx(TableIndex$2, { index: oe })
46421
46456
  ] }),
46422
46457
  E && /* @__PURE__ */ jsx(
46423
46458
  "div",
46424
46459
  {
46425
46460
  className: cls(
46426
46461
  "nb-origin-node",
46427
- Z ? "checked" : null,
46462
+ se ? "checked" : null,
46428
46463
  rowSelectCheckboxCheckedClassHover
46429
46464
  ),
46430
- children: ie
46465
+ children: ae
46431
46466
  }
46432
46467
  )
46433
46468
  ]
@@ -46450,54 +46485,54 @@ const Table$1 = withDynamicSchemaProps(
46450
46485
  b
46451
46486
  ]
46452
46487
  ), ne = useCallback(
46453
- ({ children: Z }) => {
46454
- var oe, re;
46488
+ ({ children: se }) => {
46489
+ var te, oe;
46455
46490
  return l ? React.createElement(
46456
46491
  SortableContext$1,
46457
46492
  {
46458
- items: ((re = (oe = S.value) == null ? void 0 : oe.map) == null ? void 0 : re.call(oe, J)) || []
46493
+ items: ((oe = (te = S.value) == null ? void 0 : te.map) == null ? void 0 : oe.call(te, J)) || []
46459
46494
  },
46460
- Z
46461
- ) : React.createElement(React.Fragment, {}, Z);
46495
+ se
46496
+ ) : React.createElement(React.Fragment, {}, se);
46462
46497
  },
46463
46498
  [S, l, J]
46464
- ), { height: se, tableSizeRefCallback: ae } = useTableSize(), ue = useMemo(() => ({
46499
+ ), { height: re, tableSizeRefCallback: ie } = useTableSize(), pe = useMemo(() => ({
46465
46500
  x: "max-content"
46466
- }), []), le = useMemo(() => ({
46501
+ }), []), ce = useMemo(() => ({
46467
46502
  x: "max-content",
46468
- y: K.length > 0 ? se : void 0
46469
- }), [se, ue, K]), Ce = useCallback(
46470
- (Z) => M.includes(Z[m]) ? U : "",
46503
+ y: K.length > 0 ? re : void 0
46504
+ }), [re, pe, K]), fe = useCallback(
46505
+ (se) => M.includes(se[m]) ? U : "",
46471
46506
  [M, U, JSON.stringify(m)]
46472
- ), he = useCallback(
46473
- (Z, oe) => {
46474
- const re = Z ? [...w, oe[F.getPrimaryKey()]] : w.filter((ie) => oe[F.getPrimaryKey()] !== ie);
46475
- L(re), g == null || g(Z, oe);
46507
+ ), ge = useCallback(
46508
+ (se, te) => {
46509
+ const oe = se ? [...w, te[F.getPrimaryKey()]] : w.filter((ae) => te[F.getPrimaryKey()] !== ae);
46510
+ L(oe), g == null || g(se, te);
46476
46511
  },
46477
46512
  [w, g, F]
46478
- ), ge = useMemo(() => ({
46479
- onExpand: he,
46513
+ ), Ce = useMemo(() => ({
46514
+ onExpand: ge,
46480
46515
  expandedRowKeys: w
46481
- }), [w, he]);
46516
+ }), [w, ge]);
46482
46517
  return (
46483
46518
  // If spinning is set to undefined, it will cause the subtable to always display loading, so we need to convert it here
46484
46519
  /* @__PURE__ */ jsx(Spin, { spinning: !!f, children: /* @__PURE__ */ jsx(
46485
46520
  InternalNocoBaseTable,
46486
46521
  P(x(x({
46487
- tableHeight: se,
46522
+ tableHeight: re,
46488
46523
  SortableWrapper: ne,
46489
- tableSizeRefCallback: ae,
46524
+ tableSizeRefCallback: ie,
46490
46525
  defaultRowKey: Y,
46491
46526
  dataSource: K
46492
- }, y), te), {
46527
+ }, y), ee), {
46493
46528
  paginationProps: O,
46494
- components: ee,
46529
+ components: Z,
46495
46530
  onTableChange: d,
46496
46531
  onRow: G,
46497
- rowClassName: Ce,
46498
- scroll: le,
46532
+ rowClassName: fe,
46533
+ scroll: ce,
46499
46534
  columns: j,
46500
- expandable: ge,
46535
+ expandable: Ce,
46501
46536
  field: S,
46502
46537
  size: I
46503
46538
  })
@@ -46925,19 +46960,19 @@ AssociationSelect.Designer = function e() {
46925
46960
  }
46926
46961
  },
46927
46962
  onSubmit: (J) => {
46928
- var te;
46963
+ var ee;
46929
46964
  const K = [], X = (ne) => ne != null && !Number.isNaN(ne);
46930
46965
  for (const ne of J.rules)
46931
46966
  K.push(_.pickBy(ne, X));
46932
- const ee = {
46967
+ const Z = {
46933
46968
  "x-uid": u["x-uid"]
46934
46969
  };
46935
46970
  if (["percent"].includes(y == null ? void 0 : y.interface))
46936
46971
  for (const ne of K)
46937
46972
  (ne.maxValue || ne.minValue) && (ne.percentMode = !0), ne.percentFormat && (ne.percentFormats = !0);
46938
- const Q = _.concat([], ((te = y == null ? void 0 : y.uiSchema) == null ? void 0 : te["x-validator"]) || [], K);
46939
- c.validator = Q, u["x-validator"] = K, ee["x-validator"] = K, m.emit("patch", {
46940
- schema: ee
46973
+ const Q = _.concat([], ((ee = y == null ? void 0 : y.uiSchema) == null ? void 0 : ee["x-validator"]) || [], K);
46974
+ c.validator = Q, u["x-validator"] = K, Z["x-validator"] = K, m.emit("patch", {
46975
+ schema: Z
46941
46976
  }), h();
46942
46977
  }
46943
46978
  }
@@ -46985,7 +47020,7 @@ AssociationSelect.Designer = function e() {
46985
47020
  options: S,
46986
47021
  value: u["x-component"],
46987
47022
  onChange: (J) => {
46988
- var X, ee;
47023
+ var X, Z;
46989
47024
  const K = {
46990
47025
  name: y == null ? void 0 : y.name,
46991
47026
  type: "void",
@@ -47002,7 +47037,7 @@ AssociationSelect.Designer = function e() {
47002
47037
  "x-decorator-props": u["x-decorator-props"],
47003
47038
  "x-component-props": x(x({}, (X = y == null ? void 0 : y.uiSchema) == null ? void 0 : X["x-component-props"]), u["x-component-props"])
47004
47039
  };
47005
- (ee = I == null ? void 0 : I.schemaInitialize) == null || ee.call(I, K, {
47040
+ (Z = I == null ? void 0 : I.schemaInitialize) == null || Z.call(I, K, {
47006
47041
  field: y,
47007
47042
  block: "Form",
47008
47043
  readPretty: c.readPretty,
@@ -47180,10 +47215,10 @@ AssociationSelect.Designer = function e() {
47180
47215
  options: O,
47181
47216
  value: (Y = (G = c == null ? void 0 : c.componentProps) == null ? void 0 : G.fieldNames) == null ? void 0 : Y.label,
47182
47217
  onChange: (J) => {
47183
- var ee, Q;
47218
+ var Z, Q;
47184
47219
  const K = {
47185
47220
  "x-uid": u["x-uid"]
47186
- }, X = P(x(x({}, (Q = (ee = y == null ? void 0 : y.uiSchema) == null ? void 0 : ee["x-component-props"]) == null ? void 0 : Q.fieldNames), c.componentProps.fieldNames), {
47221
+ }, 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), {
47187
47222
  label: J
47188
47223
  });
47189
47224
  c.componentProps.fieldNames = X, u["x-component-props"] = u["x-component-props"] || {}, u["x-component-props"].fieldNames = X, K["x-component-props"] = u["x-component-props"], m.emit("patch", {
@@ -68507,7 +68542,7 @@ export {
68507
68542
  createReadPrettyFormBlockSchema,
68508
68543
  createRouterManager,
68509
68544
  createSelectSchemaSettingsItem,
68510
- An as createStyles,
68545
+ Rn as createStyles,
68511
68546
  createSwitchSettingsItem,
68512
68547
  createTableBlockSchema,
68513
68548
  createTableBlockUISchema,