@nocobase/client 1.9.14 → 1.9.16

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
@@ -6658,14 +6658,15 @@ const InternalFormBlockProvider = (e) => {
6658
6658
  const e = useFormBlockContext(), { fieldSchema: t } = useActionContext();
6659
6659
  return e.type !== "create" && (t == null ? void 0 : t["x-acl-action"]) !== "create" && (t == null ? void 0 : t["x-action"]) !== "create";
6660
6660
  }, FormBlockProvider = withDynamicSchemaProps((e) => {
6661
- const t = useCollectionParentRecordData(), { parentRecord: n, action: o } = e, r = useCollectionRecordData(), { association: a } = e, i = useCollectionManager(), { __collection: l } = r || {}, { designable: c } = useDesignable(), u = e.collection || i.getCollection(a).name, d = useUpdate();
6662
- return !c && l && o && l !== u ? null : /* @__PURE__ */ jsx(TemplateBlockProvider, { onTemplateLoaded: d, children: /* @__PURE__ */ jsx(
6661
+ var h;
6662
+ const t = useCollectionParentRecordData(), { parentRecord: n, action: o } = e, r = useCollectionRecordData(), { association: a } = e, i = useCollectionManager(), { __collection: l } = r || {}, { designable: c } = useDesignable(), u = e.collection || i.getCollection(a).name, { fieldSchema: d } = useActionContext(), p = (h = d == null ? void 0 : d["x-component-props"]) == null ? void 0 : h.addChild, m = useUpdate();
6663
+ return !c && l && o && l !== u ? null : /* @__PURE__ */ jsx(TemplateBlockProvider, { onTemplateLoaded: m, children: /* @__PURE__ */ jsx(
6663
6664
  BlockProvider,
6664
6665
  P(x({
6665
6666
  name: e.name || "form"
6666
6667
  }, e), {
6667
6668
  block: "form",
6668
- parentRecord: n || t,
6669
+ parentRecord: p ? t : n || t,
6669
6670
  children: /* @__PURE__ */ jsx(FormActiveFieldsProvider, { name: "form", children: /* @__PURE__ */ jsx(InternalFormBlockProvider, x({}, e)) })
6670
6671
  })
6671
6672
  ) });
@@ -7212,8 +7213,8 @@ const collectFieldStateOfLinkageRules = ({
7212
7213
  });
7213
7214
  try {
7214
7215
  return f(E, x({ now: () => (/* @__PURE__ */ new Date()).toString() }, z));
7215
- } catch (L) {
7216
- console.error(L);
7216
+ } catch (V) {
7217
+ console.error(V);
7217
7218
  }
7218
7219
  } else
7219
7220
  return (t == null ? void 0 : t.mode) === "constant" ? (A = t == null ? void 0 : t.value) != null ? A : t : null;
@@ -8856,7 +8857,7 @@ function addAppVersion(e, t) {
8856
8857
  addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
8857
8858
  }), e;
8858
8859
  }
8859
- const name = "@nocobase/client", version = "1.9.14", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
8860
+ const name = "@nocobase/client", version = "1.9.16", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
8860
8861
  "@ahooksjs/use-url-state": "3.5.1",
8861
8862
  "@ant-design/cssinjs": "^1.11.1",
8862
8863
  "@ant-design/icons": "^5.6.1",
@@ -8877,9 +8878,9 @@ const name = "@nocobase/client", version = "1.9.14", license = "AGPL-3.0", main
8877
8878
  "@formily/reactive-react": "^2.2.27",
8878
8879
  "@formily/shared": "^2.2.27",
8879
8880
  "@formily/validator": "^2.2.27",
8880
- "@nocobase/evaluators": "1.9.14",
8881
- "@nocobase/sdk": "1.9.14",
8882
- "@nocobase/utils": "1.9.14",
8881
+ "@nocobase/evaluators": "1.9.16",
8882
+ "@nocobase/sdk": "1.9.16",
8883
+ "@nocobase/utils": "1.9.16",
8883
8884
  ahooks: "^3.7.2",
8884
8885
  antd: "5.24.2",
8885
8886
  "antd-mobile": "^5.41.1",
@@ -10137,11 +10138,11 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
10137
10138
  ${o.paddingSM}px;
10138
10139
  }
10139
10140
  `, [o.paddingContentVerticalLG, o.marginSM, o.margin]), b = useCollection(), S = useMemo(() => withTooltipComponent(NocoBaseRecursionField), []), y = useMemo(() => (d == null ? void 0 : d.map((D) => {
10140
- var z, L, V, G, H;
10141
+ var z, V, L, G, H;
10141
10142
  const B = D.reduceProperties((U, K) => {
10142
10143
  if (isCollectionFieldComponent(K))
10143
10144
  return U.concat([K]);
10144
- }, []), N = (B == null ? void 0 : B.length) > 0 ? B[0].name : D.name, M = D["x-uid"] || D.name, j = !!((z = D["x-component-props"]) != null && z.columnHidden), R = ((L = D["x-component-props"]) == null ? void 0 : L.width) || 100, O = (V = D["x-component-props"]) == null ? void 0 : V.fixed, { uiSchema: $, defaultValue: A, interface: E } = (b == null ? void 0 : b.getField(N)) || {};
10145
+ }, []), N = (B == null ? void 0 : B.length) > 0 ? B[0].name : D.name, M = D["x-uid"] || D.name, j = !!((z = D["x-component-props"]) != null && z.columnHidden), R = ((V = D["x-component-props"]) == null ? void 0 : V.width) || 100, O = (L = D["x-component-props"]) == null ? void 0 : L.fixed, { uiSchema: $, defaultValue: A, interface: E } = (b == null ? void 0 : b.getField(N)) || {};
10145
10146
  return D.title = n(D == null ? void 0 : D.title, { ns: NAMESPACE_UI_SCHEMA }), $ && ($.default = A), P(x({
10146
10147
  title: /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: g, children: /* @__PURE__ */ jsx(
10147
10148
  S,
@@ -10539,7 +10540,7 @@ const Table$2 = withDynamicSchemaProps(
10539
10540
  withSkeletonComponent(
10540
10541
  observer$1((e) => {
10541
10542
  var ye, ae;
10542
- const { token: t } = useToken$1(), ge = omit(e, ["onBlur", "onFocus"]), { pagination: n, useProps: o } = ge, r = W(ge, ["pagination", "useProps"]), pe = (o == null ? void 0 : o()) || {}, { pagination: a } = pe, i = W(pe, ["pagination"]), be = x(x({}, r), i), {
10543
+ const { token: t } = useToken$1(), Ce = omit(e, ["onBlur", "onFocus"]), { pagination: n, useProps: o } = Ce, r = W(Ce, ["pagination", "useProps"]), fe = (o == null ? void 0 : o()) || {}, { pagination: a } = fe, i = W(fe, ["pagination"]), be = x(x({}, r), i), {
10543
10544
  dragSort: l = !1,
10544
10545
  showIndex: c = !0,
10545
10546
  onRowSelectionChange: u,
@@ -10564,7 +10565,7 @@ const Table$2 = withDynamicSchemaProps(
10564
10565
  "onClickRow",
10565
10566
  "value"
10566
10567
  ]), y = useArrayField$1(S), v = useFieldSchema(), { size: I = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, F = useCollection(), T = ((ye = v == null ? void 0 : v.parent) == null ? void 0 : ye["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: B, enableIndexColumn: N } = T, M = useMemoizedFn(S.onRowDragEnd || (() => {
10567
- })), j = usePaginationProps$3(n, a, e), R = useTableColumns$3(S, j), [O, $] = useState(() => D ? B : []), [A, E] = useState(((ae = y == null ? void 0 : y.data) == null ? void 0 : ae.selectedRowKeys) || []), [z, L] = useState([]), V = (p == null ? void 0 : p.type) !== "none", G = useRef(/* @__PURE__ */ new Map()), H = useMemo(() => css`
10568
+ })), j = usePaginationProps$3(n, a, e), R = useTableColumns$3(S, j), [O, $] = useState(() => D ? B : []), [A, E] = useState(((ae = y == null ? void 0 : y.data) == null ? void 0 : ae.selectedRowKeys) || []), [z, V] = useState([]), L = (p == null ? void 0 : p.type) !== "none", G = useRef(/* @__PURE__ */ new Map()), H = useMemo(() => css`
10568
10569
  & > td {
10569
10570
  background-color: ${t.controlItemBgActive} !important;
10570
10571
  }
@@ -10573,180 +10574,180 @@ const Table$2 = withDynamicSchemaProps(
10573
10574
  }
10574
10575
  `, [t.controlItemBgActive, t.controlItemBgActiveHover]), U = useTableBlockContextBasicValue(), K = useRef(b);
10575
10576
  K.current = b, useEffect(() => {
10576
- var ne;
10577
- U != null && U.field && (U.field.data = ((ne = U.field) == null ? void 0 : ne.data) || {}, U.field.data.clearSelectedRowKeys = () => {
10577
+ var ee;
10578
+ U != null && U.field && (U.field.data = ((ee = U.field) == null ? void 0 : ee.data) || {}, U.field.data.clearSelectedRowKeys = () => {
10578
10579
  U.field.data.selectedRowKeys = [], E([]);
10579
10580
  }, U.field.data.setSelectedRowKeys = E);
10580
10581
  }, [U == null ? void 0 : U.field]);
10581
- const Y = useMemo(() => C ? H : "", [H, C]), X = useMemo(() => C ? (ne, oe) => ({
10582
- onClick: (ie) => {
10583
- isPortalInBody(ie.target) || C(ne, L, z);
10582
+ const Y = useMemo(() => C ? H : "", [H, C]), X = useMemo(() => C ? (ee, oe) => ({
10583
+ onClick: (le) => {
10584
+ isPortalInBody(le.target) || C(ee, V, z);
10584
10585
  },
10585
10586
  rowIndex: oe,
10586
- record: ne
10587
- }) : (ne, oe) => ({
10587
+ record: ee
10588
+ }) : (ee, oe) => ({
10588
10589
  rowIndex: oe,
10589
- record: ne
10590
+ record: ee
10590
10591
  }), [C, z]);
10591
10592
  useDeepCompareEffect(() => {
10592
- const ne = D ? B : [];
10593
- _.isEqual(ne, O) || $(ne);
10593
+ const ee = D ? B : [];
10594
+ _.isEqual(ee, O) || $(ee);
10594
10595
  }, [D, B]);
10595
- const Q = useCallback((ne) => {
10596
+ const J = useCallback((ee) => {
10596
10597
  if (m)
10597
- return ee(ne);
10598
- if (ne.key)
10599
- return ne.key;
10600
- if (G.current.has(ne))
10601
- return G.current.get(ne);
10598
+ return Z(ee);
10599
+ if (ee.key)
10600
+ return ee.key;
10601
+ if (G.current.has(ee))
10602
+ return G.current.get(ee);
10602
10603
  const oe = uid();
10603
- return G.current.set(ne, oe), oe;
10604
- }, []), ee = useCallback(
10605
- (ne) => {
10604
+ return G.current.set(ee, oe), oe;
10605
+ }, []), Z = useCallback(
10606
+ (ee) => {
10606
10607
  var oe;
10607
- return Array.isArray(m) ? m.map((ie) => {
10608
- var ce;
10609
- return ((ce = ne[ie]) == null ? void 0 : ce.toString()) || "";
10610
- }).join("-") : typeof m == "string" ? ne[m] : (oe = (m != null ? m : Q)(ne)) == null ? void 0 : oe.toString();
10608
+ return Array.isArray(m) ? m.map((le) => {
10609
+ var me;
10610
+ return ((me = ee[le]) == null ? void 0 : me.toString()) || "";
10611
+ }).join("-") : typeof m == "string" ? ee[m] : (oe = (m != null ? m : J)(ee)) == null ? void 0 : oe.toString();
10611
10612
  },
10612
- [JSON.stringify(m), Q]
10613
- ), J = useMemo(() => (Array.isArray(b) ? b : []).filter(Boolean), [b, b == null ? void 0 : b.length]), Z = useMemo(() => (ne) => {
10614
- const oe = useCallback((ie) => {
10613
+ [JSON.stringify(m), J]
10614
+ ), Q = useMemo(() => (Array.isArray(b) ? b : []).filter(Boolean), [b, b == null ? void 0 : b.length]), ne = useMemo(() => (ee) => {
10615
+ const oe = useCallback((le) => {
10615
10616
  var ve, Pe, Fe, Ie, ke, De, je, Me;
10616
- if (!ie.active || !ie.over) {
10617
+ if (!le.active || !le.over) {
10617
10618
  console.warn("move cancel");
10618
10619
  return;
10619
10620
  }
10620
- const ce = (Fe = (Pe = (ve = ie.active) == null ? void 0 : ve.data.current) == null ? void 0 : Pe.sortable) == null ? void 0 : Fe.index, de = (De = (ke = (Ie = ie.over) == null ? void 0 : Ie.data.current) == null ? void 0 : ke.sortable) == null ? void 0 : De.index, Se = ((je = K.current) == null ? void 0 : je[ce]) || ie.active, Ae = ((Me = K.current) == null ? void 0 : Me[de]) || ie.over;
10621
- y.move(ce, de), M({ from: Se, to: Ae });
10621
+ const me = (Fe = (Pe = (ve = le.active) == null ? void 0 : ve.data.current) == null ? void 0 : Pe.sortable) == null ? void 0 : Fe.index, xe = (De = (ke = (Ie = le.over) == null ? void 0 : Ie.data.current) == null ? void 0 : ke.sortable) == null ? void 0 : De.index, Se = ((je = K.current) == null ? void 0 : je[me]) || le.active, Ae = ((Me = K.current) == null ? void 0 : Me[xe]) || le.over;
10622
+ y.move(me, xe), M({ from: Se, to: Ae });
10622
10623
  }, []);
10623
- return /* @__PURE__ */ jsx(DndContext, { onDragEnd: oe, children: /* @__PURE__ */ jsx("tbody", x({}, ne)) });
10624
+ return /* @__PURE__ */ jsx(DndContext, { onDragEnd: oe, children: /* @__PURE__ */ jsx("tbody", x({}, ee)) });
10624
10625
  }, [y, M]);
10625
- Z.displayName = "BodyWrapperComponent";
10626
+ ne.displayName = "BodyWrapperComponent";
10626
10627
  const te = useMemo(() => ({
10627
10628
  header: {
10628
10629
  wrapper: HeaderWrapperComponent$1,
10629
10630
  cell: HeaderCellComponent$1
10630
10631
  },
10631
10632
  body: {
10632
- wrapper: Z,
10633
+ wrapper: ne,
10633
10634
  row: BodyRowComponent$1,
10634
10635
  cell: BodyCellComponent$1
10635
10636
  }
10636
- }), [Z]), re = useMemo(() => p, [JSON.stringify(p)]), se = useMemo(
10637
+ }), [ne]), se = useMemo(() => p, [JSON.stringify(p)]), ce = useMemo(
10637
10638
  () => ({
10638
- rowSelection: N !== !1 && re ? x({
10639
+ rowSelection: N !== !1 && se ? x({
10639
10640
  type: "checkbox",
10640
10641
  selectedRowKeys: A,
10641
- onChange(ne, oe) {
10642
- y.data = y.data || {}, y.data.selectedRowKeys = ne, y.data.selectedRowData = oe, E(ne), u == null || u(ne, oe, E);
10642
+ onChange(ee, oe) {
10643
+ y.data = y.data || {}, y.data.selectedRowKeys = ee, y.data.selectedRowData = oe, E(ee), u == null || u(ee, oe, E);
10643
10644
  },
10644
- onSelect: (ne, oe, ie, ce) => {
10645
- var de;
10646
- U && (U.field.data = ((de = U.field) == null ? void 0 : de.data) || {}, U.field.data.selectedRecord = ne, U.field.data.selected = oe);
10645
+ onSelect: (ee, oe, le, me) => {
10646
+ var xe;
10647
+ U && (U.field.data = ((xe = U.field) == null ? void 0 : xe.data) || {}, U.field.data.selectedRecord = ee, U.field.data.selected = oe);
10647
10648
  },
10648
- getCheckboxProps(ne) {
10649
+ getCheckboxProps(ee) {
10649
10650
  return {
10650
10651
  "aria-label": "checkbox"
10651
10652
  };
10652
10653
  },
10653
- renderCell: (ne, oe, ie, ce) => {
10654
+ renderCell: (ee, oe, le, me) => {
10654
10655
  if (!l && !c)
10655
- return ce;
10656
- const de = j == null ? void 0 : j.current, Se = (j == null ? void 0 : j.pageSize) || 20;
10657
- return de ? ie = ie + (de - 1) * Se + 1 : ie = ie + 1, oe.__index && (ie = extractIndex(oe.__index)), /* @__PURE__ */ jsxs(
10656
+ return me;
10657
+ const xe = j == null ? void 0 : j.current, Se = (j == null ? void 0 : j.pageSize) || 20;
10658
+ return xe ? le = le + (xe - 1) * Se + 1 : le = le + 1, oe.__index && (le = extractIndex(oe.__index)), /* @__PURE__ */ jsxs(
10658
10659
  "div",
10659
10660
  {
10660
10661
  role: "button",
10661
- "aria-label": `table-index-${ie}`,
10662
- className: cls(ne ? "checked" : null, rowSelectCheckboxWrapperClass$1, {
10663
- [rowSelectCheckboxWrapperClassHover$1]: V
10662
+ "aria-label": `table-index-${le}`,
10663
+ className: cls(ee ? "checked" : null, rowSelectCheckboxWrapperClass$1, {
10664
+ [rowSelectCheckboxWrapperClassHover$1]: L
10664
10665
  }),
10665
10666
  children: [
10666
- /* @__PURE__ */ jsxs("div", { className: cls(ne ? "checked" : null, rowSelectCheckboxContentClass$1), children: [
10667
- l && /* @__PURE__ */ jsx(SortHandle$2, { id: ee(oe) }),
10668
- c && /* @__PURE__ */ jsx(TableIndex$3, { index: ie })
10667
+ /* @__PURE__ */ jsxs("div", { className: cls(ee ? "checked" : null, rowSelectCheckboxContentClass$1), children: [
10668
+ l && /* @__PURE__ */ jsx(SortHandle$2, { id: Z(oe) }),
10669
+ c && /* @__PURE__ */ jsx(TableIndex$3, { index: le })
10669
10670
  ] }),
10670
- V && /* @__PURE__ */ jsx(
10671
+ L && /* @__PURE__ */ jsx(
10671
10672
  "div",
10672
10673
  {
10673
10674
  className: cls(
10674
10675
  "nb-origin-node",
10675
- ne ? "checked" : null,
10676
+ ee ? "checked" : null,
10676
10677
  rowSelectCheckboxCheckedClassHover$1
10677
10678
  ),
10678
- children: ce
10679
+ children: me
10679
10680
  }
10680
10681
  )
10681
10682
  ]
10682
10683
  }
10683
10684
  );
10684
10685
  }
10685
- }, re) : void 0
10686
+ }, se) : void 0
10686
10687
  }),
10687
10688
  [
10688
- re,
10689
+ se,
10689
10690
  A,
10690
10691
  u,
10691
10692
  c,
10692
10693
  l,
10693
10694
  y,
10694
- ee,
10695
- V,
10696
- re,
10695
+ Z,
10696
+ L,
10697
+ se,
10697
10698
  j,
10698
10699
  U,
10699
10700
  N
10700
10701
  ]
10701
- ), ue = useCallback(
10702
- ({ children: ne }) => {
10703
- var oe, ie;
10702
+ ), ie = useCallback(
10703
+ ({ children: ee }) => {
10704
+ var oe, le;
10704
10705
  return l ? React.createElement(
10705
10706
  SortableContext$1,
10706
10707
  {
10707
- items: ((ie = (oe = K.current) == null ? void 0 : oe.map) == null ? void 0 : ie.call(oe, ee)) || []
10708
+ items: ((le = (oe = K.current) == null ? void 0 : oe.map) == null ? void 0 : le.call(oe, Z)) || []
10708
10709
  },
10709
- ne
10710
- ) : React.createElement(React.Fragment, {}, ne);
10710
+ ee
10711
+ ) : React.createElement(React.Fragment, {}, ee);
10711
10712
  },
10712
- [l, ee]
10713
+ [l, Z]
10713
10714
  // Don't put 'value' in dependencies, otherwise it will cause the dropdown component to disappear immediately when adding association fields to the table
10714
- ), { height: le, tableSizeRefCallback: me } = useTableSize(), xe = useMemo(() => ({
10715
+ ), { height: re, tableSizeRefCallback: de } = useTableSize(), pe = useMemo(() => ({
10715
10716
  x: "max-content",
10716
- y: le
10717
- }), [le, J]), Ce = useCallback(
10718
- (ne) => z.includes(ne[m]) ? Y : "",
10717
+ y: re
10718
+ }), [re, Q]), ue = useCallback(
10719
+ (ee) => z.includes(ee[m]) ? Y : "",
10719
10720
  [z, Y, JSON.stringify(m)]
10720
- ), he = useCallback(
10721
- (ne, oe) => {
10722
- const ie = ne ? [...O, oe[F.getPrimaryKey()]] : O.filter((ce) => oe[F.getPrimaryKey()] !== ce);
10723
- $(ie), g == null || g(ne, oe);
10721
+ ), ge = useCallback(
10722
+ (ee, oe) => {
10723
+ const le = ee ? [...O, oe[F.getPrimaryKey()]] : O.filter((me) => oe[F.getPrimaryKey()] !== me);
10724
+ $(le), g == null || g(ee, oe);
10724
10725
  },
10725
10726
  [O, g, F]
10726
- ), fe = useMemo(() => ({
10727
- onExpand: he,
10727
+ ), he = useMemo(() => ({
10728
+ onExpand: ge,
10728
10729
  expandedRowKeys: O
10729
- }), [O, he]);
10730
+ }), [O, ge]);
10730
10731
  return (
10731
10732
  // If spinning is set to undefined, it will cause the subtable to always display loading, so we need to convert it here.
10732
10733
  // We use Spin here instead of Table's loading prop because using Spin here reduces unnecessary re-renders.
10733
10734
  /* @__PURE__ */ jsx(HighPerformanceSpin, { spinning: !!f, children: /* @__PURE__ */ jsx(BlockRequestLoadingContext.Provider, { value: !1, children: /* @__PURE__ */ jsx(
10734
10735
  InternalNocoBaseTable$1,
10735
10736
  P(x(x({
10736
- tableHeight: le,
10737
- SortableWrapper: ue,
10738
- tableSizeRefCallback: me,
10739
- defaultRowKey: Q,
10740
- dataSource: J
10741
- }, S), se), {
10737
+ tableHeight: re,
10738
+ SortableWrapper: ie,
10739
+ tableSizeRefCallback: de,
10740
+ defaultRowKey: J,
10741
+ dataSource: Q
10742
+ }, S), ce), {
10742
10743
  paginationProps: j,
10743
10744
  components: te,
10744
10745
  onTableChange: d,
10745
10746
  onRow: X,
10746
- rowClassName: Ce,
10747
- scroll: xe,
10747
+ rowClassName: ue,
10748
+ scroll: pe,
10748
10749
  columns: R,
10749
- expandable: fe,
10750
+ expandable: he,
10750
10751
  field: y,
10751
10752
  size: I
10752
10753
  })
@@ -10980,40 +10981,40 @@ const InternalTableBlockProvider = (e) => {
10980
10981
  [t, p]
10981
10982
  ), F = useCallback(
10982
10983
  (R, O, $, A) => {
10983
- var ee;
10984
+ var Z;
10984
10985
  const {
10985
10986
  association: E = !1,
10986
10987
  cached: z = {},
10987
- collectionNames: L = [R],
10988
- maxDepth: V = 1,
10988
+ collectionNames: V = [R],
10989
+ maxDepth: L = 1,
10989
10990
  allowAllTypes: G = !1,
10990
10991
  exceptInterfaces: H = [],
10991
10992
  prefixFieldValue: U = "",
10992
10993
  usePrefix: K = !1,
10993
10994
  dataSource: Y
10994
10995
  } = A || {};
10995
- if (L.length - 1 > V)
10996
+ if (V.length - 1 > L)
10996
10997
  return;
10997
10998
  if (z[R])
10998
10999
  return _.cloneDeep(z[R]);
10999
11000
  O && typeof O == "string" && (O = [O]), $ && typeof $ == "string" && ($ = [$]);
11000
- const X = b(R, Y), Q = (ee = X == null ? void 0 : X.filter(
11001
- (J) => J.interface && !H.includes(J.interface) && (G || O && O.includes(J.type) || $ && $.includes(J.interface) || (E && J.target && J.target !== R && Array.isArray(E) ? E.includes(J.interface) : !1))
11002
- )) == null ? void 0 : ee.map((J) => {
11003
- var te, re;
11004
- const Z = x({
11005
- value: K && U ? `${U}.${J.name}` : J.name,
11006
- label: f((te = J == null ? void 0 : J.uiSchema) == null ? void 0 : te.title) || J.name
11007
- }, J);
11008
- return E && J.target && (Z.children = L.includes(J.target) ? [] : F(J.target, O, $, P(x({}, A), {
11001
+ const X = b(R, Y), J = (Z = X == null ? void 0 : X.filter(
11002
+ (Q) => Q.interface && !H.includes(Q.interface) && (G || O && O.includes(Q.type) || $ && $.includes(Q.interface) || (E && Q.target && Q.target !== R && Array.isArray(E) ? E.includes(Q.interface) : !1))
11003
+ )) == null ? void 0 : Z.map((Q) => {
11004
+ var te, se;
11005
+ const ne = x({
11006
+ value: K && U ? `${U}.${Q.name}` : Q.name,
11007
+ label: f((te = Q == null ? void 0 : Q.uiSchema) == null ? void 0 : te.title) || Q.name
11008
+ }, Q);
11009
+ return E && Q.target && (ne.children = V.includes(Q.target) ? [] : F(Q.target, O, $, P(x({}, A), {
11009
11010
  cached: z,
11010
11011
  dataSource: Y,
11011
- collectionNames: [...L, J.target],
11012
- prefixFieldValue: K ? U ? `${U}.${J.name}` : J.name : "",
11012
+ collectionNames: [...V, Q.target],
11013
+ prefixFieldValue: K ? U ? `${U}.${Q.name}` : Q.name : "",
11013
11014
  usePrefix: K
11014
- })), !((re = Z.children) != null && re.length)) ? null : Z;
11015
+ })), !((se = ne.children) != null && se.length)) ? null : ne;
11015
11016
  }).filter(Boolean);
11016
- return z[R] = Q, Q;
11017
+ return z[R] = J, J;
11017
11018
  },
11018
11019
  [b]
11019
11020
  ), w = useCallback(
@@ -11289,12 +11290,12 @@ const popupsContextStorage = {}, defaultPopupsContextStorage = {}, getStoredPopu
11289
11290
  collection: E,
11290
11291
  puid: z
11291
11292
  }) => {
11292
- const L = c.getFilterByTK(u || l, $);
11293
+ const V = c.getFilterByTK(u || l, $);
11293
11294
  return getPopupPathFromParams({
11294
11295
  popupuid: O,
11295
11296
  puid: z,
11296
11297
  collection: E,
11297
- filterbytk: L,
11298
+ filterbytk: V,
11298
11299
  sourceid: A,
11299
11300
  tab: R
11300
11301
  });
@@ -11317,17 +11318,17 @@ const popupsContextStorage = {}, defaultPopupsContextStorage = {}, getStoredPopu
11317
11318
  } = {}) => {
11318
11319
  if (!f())
11319
11320
  return F == null ? void 0 : F(!0);
11320
- const z = E || o, L = z == null ? void 0 : z["x-uid"], V = y(O);
11321
+ const z = E || o, V = z == null ? void 0 : z["x-uid"], L = y(O);
11321
11322
  R = R || (a == null ? void 0 : a.data);
11322
11323
  const G = w({
11323
- popupUid: L,
11324
+ popupUid: V,
11324
11325
  recordData: R,
11325
- sourceId: V,
11326
+ sourceId: L,
11326
11327
  collection: $,
11327
11328
  puid: A
11328
11329
  });
11329
11330
  let H = n.pathname;
11330
- if (_.last(H) === "/" && (H = H.slice(0, -1)), storePopupContext(L, {
11331
+ if (_.last(H) === "/" && (H = H.slice(0, -1)), storePopupContext(V, {
11331
11332
  schema: z,
11332
11333
  record: new CollectionRecord({ isNew: !1, data: R }),
11333
11334
  parentRecord: O ? new CollectionRecord({ isNew: !1, data: O }) : i,
@@ -11335,7 +11336,7 @@ const popupsContextStorage = {}, defaultPopupsContextStorage = {}, getStoredPopu
11335
11336
  dataSource: r,
11336
11337
  collection: l == null ? void 0 : l.name,
11337
11338
  association: u,
11338
- sourceId: V,
11339
+ sourceId: L,
11339
11340
  tableBlockContext: P(x({}, I), { collection: l == null ? void 0 : l.name, blockData: v })
11340
11341
  }), b(T(), E), z.properties) {
11341
11342
  const U = h + 1;
@@ -14088,13 +14089,13 @@ const ParentCollectionProvider = (e) => {
14088
14089
  record: i
14089
14090
  }) => {
14090
14091
  var E, z;
14091
- const l = useApp(), c = ((E = l == null ? void 0 : l.getVariables) == null ? void 0 : E.call(l).map((L) => {
14092
- const { visible: V = !0, option: G } = L.useOption();
14092
+ const l = useApp(), c = ((E = l == null ? void 0 : l.getVariables) == null ? void 0 : E.call(l).map((V) => {
14093
+ const { visible: L = !0, option: G } = V.useOption();
14093
14094
  return {
14094
- visible: V,
14095
+ visible: L,
14095
14096
  option: G
14096
14097
  };
14097
- }).filter(({ visible: L }) => L)) || [], { filterVariables: u = () => !0 } = useVariables$1() || {}, d = (z = i == null ? void 0 : i.__parent) == null ? void 0 : z.__collectionName, { currentUserSettings: p } = useCurrentUserVariable({
14098
+ }).filter(({ visible: V }) => V)) || [], { filterVariables: u = () => !0 } = useVariables$1() || {}, d = (z = i == null ? void 0 : i.__parent) == null ? void 0 : z.__collectionName, { currentUserSettings: p } = useCurrentUserVariable({
14098
14099
  maxDepth: 3,
14099
14100
  uiSchema: n,
14100
14101
  collectionField: e,
@@ -14181,7 +14182,7 @@ const ParentCollectionProvider = (e) => {
14181
14182
  D,
14182
14183
  $,
14183
14184
  O
14184
- ]), ...c.map(({ option: L }) => L)];
14185
+ ]), ...c.map(({ option: V }) => V)];
14185
14186
  }, VariableInput = (e) => {
14186
14187
  const {
14187
14188
  value: t,
@@ -14565,7 +14566,7 @@ const getActionContext = (e) => {
14565
14566
  var n;
14566
14567
  return ((n = e.fieldSchema) == null ? void 0 : n["x-action-context"]) || {};
14567
14568
  }, SchemaSettingsDefaultValue = function(t) {
14568
- var E, z, L;
14569
+ var E, z, V;
14569
14570
  const n = useFieldSchema(), o = (E = t == null ? void 0 : t.fieldSchema) != null ? E : n, r = useField(), { dn: a } = useDesignable(), { t: i } = useTranslation(), l = useActionContext(), c = getActionContext(l).collection;
14570
14571
  let u;
14571
14572
  const { getField: d } = useCollection_deprecated(), { getCollectionJoinField: p, getCollectionFields: m, getAllCollectionsInheritChain: h } = useCollectionManager_deprecated(), g = useVariables$1(), f = useLocalVariables$1(), C = useCollection_deprecated(), b = useRecord(), { form: S, type: y } = useFormBlockContext(), { getFields: v } = useCollectionFilterOptionsV2(C), { isInSubForm: I, isInSubTable: F } = useFlag() || {}, { name: w } = C, T = useMemo(
@@ -14573,21 +14574,21 @@ const getActionContext = (e) => {
14573
14574
  [o, p, d]
14574
14575
  ), D = _.omit(o, "required");
14575
14576
  T != null && T.target && (u = p(
14576
- `${T.target}.${((L = (z = o["x-component-props"]) == null ? void 0 : z.fieldNames) == null ? void 0 : L.label) || "id"}`
14577
+ `${T.target}.${((V = (z = o["x-component-props"]) == null ? void 0 : z.fieldNames) == null ? void 0 : V.label) || "id"}`
14577
14578
  ));
14578
14579
  const B = (T == null ? void 0 : T.interface) === "m2o" && findParentFieldSchema(o), N = B && p(B == null ? void 0 : B["x-collection-field"]), M = useTableBlockContext(), j = (T == null ? void 0 : T.interface) === "m2m" || (T == null ? void 0 : T.interface) === "mbm" || (N == null ? void 0 : N.type) === "hasMany" && (T == null ? void 0 : T.interface) === "m2o", R = useCallback(
14579
- (V) => {
14580
- const G = V.find((U) => U.value === "$nForm"), H = m(w);
14581
- return !(H != null && H.length) && G && (G.children = formatVariableScop(v())), V;
14580
+ (L) => {
14581
+ const G = L.find((U) => U.value === "$nForm"), H = m(w);
14582
+ return !(H != null && H.length) && G && (G.children = formatVariableScop(v())), L;
14582
14583
  },
14583
14584
  [v, w]
14584
14585
  ), O = useMemo(() => ({
14585
14586
  ArrayCollapse: ArrayCollapse$2,
14586
14587
  FormLayout,
14587
- VariableInput: (V) => /* @__PURE__ */ jsx(SchemaComponentContext.Provider, { value: { designable: !1 }, children: /* @__PURE__ */ jsx(
14588
+ VariableInput: (L) => /* @__PURE__ */ jsx(SchemaComponentContext.Provider, { value: { designable: !1 }, children: /* @__PURE__ */ jsx(
14588
14589
  VariableInput,
14589
- P(x({}, V), {
14590
- value: V.value || void 0,
14590
+ P(x({}, L), {
14591
+ value: L.value || void 0,
14591
14592
  hideVariableButton: t == null ? void 0 : t.hideVariableButton
14592
14593
  })
14593
14594
  ) })
@@ -14614,7 +14615,10 @@ const getActionContext = (e) => {
14614
14615
  getAllCollectionsInheritChain: h
14615
14616
  }),
14616
14617
  renderSchemaComponent: function(G) {
14617
- const H = useMemo(() => _.cloneDeep(D) || {}, []);
14618
+ const H = useMemo(
14619
+ () => _.cloneDeep(D.toJSON()) || {},
14620
+ []
14621
+ );
14618
14622
  H["x-read-pretty"] = !1, H["x-disabled"] = !1, _.set(H, "x-decorator-props.showTitle", !1);
14619
14623
  const U = getFieldDefaultValue(H, T);
14620
14624
  T.target && H["x-component-props"] && (H["x-component-props"].mode = "Select"), T != null && T.uiSchema.type && (H.type = T.uiSchema.type), (T == null ? void 0 : T.uiSchema["x-component"]) === "Checkbox" && (_.set(H, "x-component-props.defaultChecked", U), H.type = "void");
@@ -14657,12 +14661,12 @@ const getActionContext = (e) => {
14657
14661
  u,
14658
14662
  g
14659
14663
  ]), A = useCallback(
14660
- (V) => {
14664
+ (L) => {
14661
14665
  var H, U, K;
14662
14666
  const G = {
14663
14667
  "x-uid": o["x-uid"]
14664
14668
  };
14665
- o.default = (H = V.default) != null ? H : null, isVariable$1(V.default) || (b.__isNewRecord__ || y === "create") && ((U = r.setInitialValue) == null || U.call(r, V.default)), G.default = (K = V.default) != null ? K : null, a.emit("patch", {
14669
+ o.default = (H = L.default) != null ? H : null, isVariable$1(L.default) || (b.__isNewRecord__ || y === "create") && ((U = r.setInitialValue) == null || U.call(r, L.default)), G.default = (K = L.default) != null ? K : null, a.emit("patch", {
14666
14670
  schema: G,
14667
14671
  currentSchema: n
14668
14672
  });
@@ -14677,14 +14681,14 @@ const getActionContext = (e) => {
14677
14681
  width: 800,
14678
14682
  schema: $,
14679
14683
  onSubmit: A,
14680
- ModalContextProvider: (V) => /* @__PURE__ */ jsx(
14684
+ ModalContextProvider: (L) => /* @__PURE__ */ jsx(
14681
14685
  FlagProvider,
14682
14686
  {
14683
14687
  isInSubForm: I,
14684
14688
  isInSubTable: F,
14685
14689
  isInSetDefaultValueDialog: !0,
14686
14690
  collectionField: T,
14687
- children: V.children
14691
+ children: L.children
14688
14692
  }
14689
14693
  )
14690
14694
  }
@@ -15546,7 +15550,7 @@ const useGetFilterOptions = () => {
15546
15550
  };
15547
15551
  });
15548
15552
  }, TableColumnDesigner$1 = (e) => {
15549
- var N, M, j, R, O, $, A, E, z, L, V, G;
15553
+ var N, M, j, R, O, $, A, E, z, V, L, G;
15550
15554
  const { uiSchema: t, fieldSchema: n, collectionField: o } = e, { form: r } = useFormBlockContext(), { getInterface: a, getCollection: i } = useCollectionManager_deprecated(), l = useField(), { t: c } = useTranslation(), u = useFieldSchema(), { dn: d } = useDesignable(), p = ((N = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : N.fieldNames) || ((M = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : M.fieldNames), m = useLabelFields$1((j = o == null ? void 0 : o.target) != null ? j : o == null ? void 0 : o.targetCollection), h = useColorFields((R = o == null ? void 0 : o.target) != null ? R : o == null ? void 0 : o.targetCollection), g = a(o == null ? void 0 : o.interface), f = i(o == null ? void 0 : o.target), C = isFileCollection$2(f), b = ["QuickEdit", "FormItem"].includes(n["x-decorator"]), { currentMode: S } = useAssociationFieldContext(), { isAllowToSetDefaultValue: y } = useIsAllowToSetDefaultValue({ collectionField: o, fieldSchema: n }), v = ["datetime", "createdAt", "updatedAt"].includes(o == null ? void 0 : o.interface), I = ["obo", "oho", "o2o", "o2m", "m2m", "m2o", "snapshot"].includes(
15551
15555
  o == null ? void 0 : o.interface
15552
15556
  ), F = useFieldModeOptions({ fieldSchema: n }), w = ((O = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : O.mode) || "Select";
@@ -15615,7 +15619,7 @@ const useGetFilterOptions = () => {
15615
15619
  title: c("Column width"),
15616
15620
  properties: {
15617
15621
  width: {
15618
- default: ((L = u == null ? void 0 : u["x-component-props"]) == null ? void 0 : L.width) || 100,
15622
+ default: ((V = u == null ? void 0 : u["x-component-props"]) == null ? void 0 : V.width) || 100,
15619
15623
  "x-decorator": "FormItem",
15620
15624
  "x-component": "InputNumber",
15621
15625
  "x-component-props": {}
@@ -15658,7 +15662,7 @@ const useGetFilterOptions = () => {
15658
15662
  SchemaSettingsSwitchItem,
15659
15663
  {
15660
15664
  title: c("Enable link"),
15661
- checked: ((V = n["x-component-props"]) == null ? void 0 : V.enableLink) !== !1,
15665
+ checked: ((L = n["x-component-props"]) == null ? void 0 : L.enableLink) !== !1,
15662
15666
  onChange: (H) => {
15663
15667
  n["x-component-props"] = P(x({}, n == null ? void 0 : n["x-component-props"]), {
15664
15668
  enableLink: H
@@ -15680,14 +15684,14 @@ const useGetFilterOptions = () => {
15680
15684
  options: m,
15681
15685
  value: p == null ? void 0 : p.label,
15682
15686
  onChange: (H) => {
15683
- var Y, X, Q, ee, J;
15684
- const U = P(x(x({}, (X = (Y = o == null ? void 0 : o.uiSchema) == null ? void 0 : Y["x-component-props"]) == null ? void 0 : X.fieldNames), (Q = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : Q.fieldNames), {
15687
+ var Y, X, J, Z, Q;
15688
+ const U = P(x(x({}, (X = (Y = o == null ? void 0 : o.uiSchema) == null ? void 0 : Y["x-component-props"]) == null ? void 0 : X.fieldNames), (J = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : J.fieldNames), {
15685
15689
  label: H
15686
15690
  });
15687
15691
  _.set(n, "x-component-props.fieldNames", U);
15688
- const K = (J = l.path) == null ? void 0 : J.splice(((ee = l.path) == null ? void 0 : ee.length) - 1, 1);
15689
- l.form.query(`${K.concat("*." + n.name)}`).forEach((Z) => {
15690
- Z.componentProps.fieldNames = U;
15692
+ const K = (Q = l.path) == null ? void 0 : Q.splice(((Z = l.path) == null ? void 0 : Z.length) - 1, 1);
15693
+ l.form.query(`${K.concat("*." + n.name)}`).forEach((ne) => {
15694
+ ne.componentProps.fieldNames = U;
15691
15695
  }), d.emit("patch", {
15692
15696
  schema: {
15693
15697
  "x-uid": n["x-uid"],
@@ -15747,8 +15751,8 @@ const useGetFilterOptions = () => {
15747
15751
  };
15748
15752
  n.required = H, U.required = H;
15749
15753
  const K = (X = l.path) == null ? void 0 : X.splice(((Y = l.path) == null ? void 0 : Y.length) - 1, 1);
15750
- l.form.query(`${K.concat("*." + n.name)}`).forEach((Q) => {
15751
- Q.required = H;
15754
+ l.form.query(`${K.concat("*." + n.name)}`).forEach((J) => {
15755
+ J.required = H;
15752
15756
  }), d.emit("patch", {
15753
15757
  schema: U
15754
15758
  }), d.refresh();
@@ -15773,20 +15777,20 @@ const useGetFilterOptions = () => {
15773
15777
  }, K = (X = l.path) == null ? void 0 : X.splice(((Y = l.path) == null ? void 0 : Y.length) - 1, 1);
15774
15778
  switch (H) {
15775
15779
  case "readonly": {
15776
- n["x-read-pretty"] = !1, n["x-disabled"] = !0, U["x-read-pretty"] = !1, U["x-disabled"] = !0, l.form.query(`${K.concat("*." + n.name)}`).forEach((Q) => {
15777
- Q.readonly = !0, Q.disabled = !0;
15780
+ n["x-read-pretty"] = !1, n["x-disabled"] = !0, U["x-read-pretty"] = !1, U["x-disabled"] = !0, l.form.query(`${K.concat("*." + n.name)}`).forEach((J) => {
15781
+ J.readonly = !0, J.disabled = !0;
15778
15782
  });
15779
15783
  break;
15780
15784
  }
15781
15785
  case "read-pretty": {
15782
- n["x-read-pretty"] = !0, n["x-disabled"] = !1, U["x-read-pretty"] = !0, U["x-disabled"] = !1, l.form.query(`${K.concat("*." + n.name)}`).forEach((Q) => {
15783
- Q.readPretty = !0;
15786
+ n["x-read-pretty"] = !0, n["x-disabled"] = !1, U["x-read-pretty"] = !0, U["x-disabled"] = !1, l.form.query(`${K.concat("*." + n.name)}`).forEach((J) => {
15787
+ J.readPretty = !0;
15784
15788
  });
15785
15789
  break;
15786
15790
  }
15787
15791
  default: {
15788
- n["x-read-pretty"] = !1, n["x-disabled"] = !1, U["x-read-pretty"] = !1, U["x-disabled"] = !1, l.form.query(`${K.concat("*." + n.name)}`).forEach((Q) => {
15789
- Q.readPretty = !1, Q.disabled + !1;
15792
+ n["x-read-pretty"] = !1, n["x-disabled"] = !1, U["x-read-pretty"] = !1, U["x-disabled"] = !1, l.form.query(`${K.concat("*." + n.name)}`).forEach((J) => {
15793
+ J.readPretty = !1, J.disabled + !1;
15790
15794
  });
15791
15795
  break;
15792
15796
  }
@@ -18216,16 +18220,16 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
18216
18220
  return {
18217
18221
  insertPosition: "afterEnd",
18218
18222
  wrap: ((X = A == null ? void 0 : A.cols) == null ? void 0 : X.length) === 1 ? gridRowColWrap : void 0,
18219
- Component: (Q) => /* @__PURE__ */ jsx(
18223
+ Component: (J) => /* @__PURE__ */ jsx(
18220
18224
  PlusOutlined,
18221
- P(x({}, Q), {
18225
+ P(x({}, J), {
18222
18226
  role: "button",
18223
18227
  "aria-label": v("schema-initializer"),
18224
18228
  style: { cursor: "pointer", fontSize: 14 }
18225
18229
  })
18226
18230
  )
18227
18231
  };
18228
- }, [v, (Y = A == null ? void 0 : A.cols) == null ? void 0 : Y.length]), L = 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(() => {
18232
+ }, [v, (Y = A == null ? void 0 : A.cols) == null ? void 0 : Y.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]), L = useMemo(() => {
18229
18233
  var X;
18230
18234
  if (o === !1)
18231
18235
  return null;
@@ -18236,22 +18240,22 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
18236
18240
  }, [E, o, z, $, O]), G = useMemo(() => r !== !1 && R ? j() : null, [R, j, r]), H = useRef(null), U = "hidden";
18237
18241
  useEffect(() => {
18238
18242
  const X = H.current;
18239
- let Q = X == null ? void 0 : X.parentElement;
18240
- for (; Q && Q.clientHeight === 0; )
18241
- Q = Q.parentElement;
18242
- const ee = g || Q;
18243
- if (!ee)
18243
+ let J = X == null ? void 0 : X.parentElement;
18244
+ for (; J && J.clientHeight === 0; )
18245
+ J = J.parentElement;
18246
+ const Z = g || J;
18247
+ if (!Z)
18244
18248
  return;
18245
- function J() {
18249
+ function Q() {
18246
18250
  var te;
18247
18251
  X && (X.classList.remove(U), (te = e.onVisibleChange) == null || te.call(e, !0));
18248
18252
  }
18249
- function Z() {
18253
+ function ne() {
18250
18254
  var te;
18251
18255
  X && (X.classList.add(U), (te = e.onVisibleChange) == null || te.call(e, !1));
18252
18256
  }
18253
- return ee.addEventListener("mouseenter", J), ee.addEventListener("mouseleave", Z), () => {
18254
- ee.removeEventListener("mouseenter", J), ee.removeEventListener("mouseleave", Z);
18257
+ return Z.addEventListener("mouseenter", Q), Z.addEventListener("mouseleave", ne), () => {
18258
+ Z.removeEventListener("mouseenter", Q), Z.removeEventListener("mouseleave", ne);
18255
18259
  };
18256
18260
  }, [e.onVisibleChange, g]);
18257
18261
  const K = useMemo(
@@ -18273,8 +18277,8 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
18273
18277
  M[1] && /* @__PURE__ */ jsx("span", { className: "toolbar-title-tag", children: `${B.current}: ${`${M[1]}` || y("Untitled")}` })
18274
18278
  ] }) }),
18275
18279
  /* @__PURE__ */ jsx("div", { className: cls("toolbar-icons", i), style: l, children: /* @__PURE__ */ jsxs(Space$1, { size: 3, align: "center", className: d, style: p, children: [
18276
- L,
18277
- /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: N, children: V }),
18280
+ V,
18281
+ /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: N, children: L }),
18278
18282
  G
18279
18283
  ] }) })
18280
18284
  ]
@@ -19006,7 +19010,7 @@ const useTableBlockProps = () => {
19006
19010
  const T = w.find((D) => D.uid === t.parent["x-uid"]);
19007
19011
  w.forEach((D) => {
19008
19012
  var $, A, E, z;
19009
- const B = I.find((L) => L.uid === D.uid);
19013
+ const B = I.find((V) => V.uid === D.uid);
19010
19014
  if (!B)
19011
19015
  return;
19012
19016
  const N = getSourceKey(T, B.field) || a.rowKey || "id", M = [S[N]], j = (($ = D.service.params) == null ? void 0 : $[0]) || {}, R = ((E = (A = D.service.params) == null ? void 0 : A[1]) == null ? void 0 : E.filters) || {};
@@ -19025,7 +19029,7 @@ const useTableBlockProps = () => {
19025
19029
  ]
19026
19030
  };
19027
19031
  const O = mergeFilter([
19028
- ...Object.values(R).map((L) => removeNullCondition(L)),
19032
+ ...Object.values(R).map((V) => removeNullCondition(V)),
19029
19033
  D.defaultFilter
19030
19034
  ]);
19031
19035
  return D.doFilter(
@@ -19390,8 +19394,8 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
19390
19394
  return useEffect(() => {
19391
19395
  var w, T, D, B, N, M, j, R, O, $, A, E, z;
19392
19396
  if (!((w = t == null ? void 0 : t.service) != null && w.loading)) {
19393
- const L = (D = (T = t == null ? void 0 : t.service) == null ? void 0 : T.data) == null ? void 0 : D.data.map((V) => V);
19394
- e.value = L, (B = e == null ? void 0 : e.setInitialValue) == null || B.call(e, L), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (j = (M = (N = t == null ? void 0 : t.service) == null ? void 0 : N.data) == null ? void 0 : M.meta) == null ? void 0 : j.pageSize, e.componentProps.pagination.total = ($ = (O = (R = t == null ? void 0 : t.service) == null ? void 0 : R.data) == null ? void 0 : O.meta) == null ? void 0 : $.count, e.componentProps.pagination.current = (z = (E = (A = t == null ? void 0 : t.service) == null ? void 0 : A.data) == null ? void 0 : E.meta) == null ? void 0 : z.page;
19397
+ const V = (D = (T = t == null ? void 0 : t.service) == null ? void 0 : T.data) == null ? void 0 : D.data.map((L) => L);
19398
+ e.value = V, (B = e == null ? void 0 : e.setInitialValue) == null || B.call(e, V), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (j = (M = (N = t == null ? void 0 : t.service) == null ? void 0 : N.data) == null ? void 0 : M.meta) == null ? void 0 : j.pageSize, e.componentProps.pagination.total = ($ = (O = (R = t == null ? void 0 : t.service) == null ? void 0 : R.data) == null ? void 0 : O.meta) == null ? void 0 : $.count, e.componentProps.pagination.current = (z = (E = (A = t == null ? void 0 : t.service) == null ? void 0 : A.data) == null ? void 0 : E.meta) == null ? void 0 : z.page;
19395
19399
  }
19396
19400
  }, [
19397
19401
  a == null ? void 0 : a.foreignKey,
@@ -22184,7 +22188,7 @@ const SchemaSettingsModalItem = (e) => {
22184
22188
  "noRecord",
22185
22189
  "ModalContextProvider",
22186
22190
  "dialogRootClassName"
22187
- ]), g = useContext(SchemaOptionsContext), f = useCollection(), C = useAPIClient(), b = useApp(), { theme: S } = useGlobalTheme(), y = useBlockRequestContext(), v = useFormActiveFields(), { locale: I } = useContext(ConfigProvider.ConfigContext), F = useDataSourceManager(), w = useDataSourceKey(), T = useCollectionRecord(), { association: D } = useDataBlockProps() || {}, B = useCurrentRecord(), N = useFormBlockContext(), M = useBlockContext(), { getOperators: j } = useOperators(), R = useLocationSearch(), O = useVariables$1(), $ = useContext(AllDataBlocksContext), A = useContext(SchemaComponentContext), E = useContext(VariableScopeContext$1), { formValue: z, collection: L, parent: V } = useSubFormValue(), G = useCurrentPopupRecord(), H = useParentPopupRecord();
22191
+ ]), g = useContext(SchemaOptionsContext), f = useCollection(), C = useAPIClient(), b = useApp(), { theme: S } = useGlobalTheme(), y = useBlockRequestContext(), v = useFormActiveFields(), { locale: I } = useContext(ConfigProvider.ConfigContext), F = useDataSourceManager(), w = useDataSourceKey(), T = useCollectionRecord(), { association: D } = useDataBlockProps() || {}, B = useCurrentRecord(), N = useFormBlockContext(), M = useBlockContext(), { getOperators: j } = useOperators(), R = useLocationSearch(), O = useVariables$1(), $ = useContext(AllDataBlocksContext), A = useContext(SchemaComponentContext), E = useContext(VariableScopeContext$1), { formValue: z, collection: V, parent: L } = useSubFormValue(), G = useCurrentPopupRecord(), H = useParentPopupRecord();
22188
22192
  return t ? null : /* @__PURE__ */ jsx(
22189
22193
  SchemaSettingsItem,
22190
22194
  P(x({
@@ -22206,7 +22210,7 @@ const SchemaSettingsModalItem = (e) => {
22206
22210
  children: /* @__PURE__ */ jsx(CollectionRecordProvider, { record: d ? null : T, children: /* @__PURE__ */ jsx(CurrentRecordContextProvider, P(x({}, B), { children: /* @__PURE__ */ jsx(FormBlockContext$1.Provider, { value: N, children: /* @__PURE__ */ jsx(
22207
22211
  SubFormProvider,
22208
22212
  {
22209
- value: { value: z, collection: L, parent: V },
22213
+ value: { value: z, collection: V, parent: L },
22210
22214
  children: /* @__PURE__ */ jsx(
22211
22215
  FormActiveFieldsProvider,
22212
22216
  {
@@ -22406,11 +22410,11 @@ const SchemaSettingsModalItem = (e) => {
22406
22410
  [n, c, u, y, g, f, p, h, T, r]
22407
22411
  ), M = useMemo(() => ({ ArrayCollapse: ArrayCollapse$2, FormLayout }), []), j = useCallback(
22408
22412
  (O) => {
22409
- var L;
22413
+ var V;
22410
22414
  const $ = [];
22411
- for (const V of O.fieldReaction.rules)
22412
- $.push(_.omit(_.pickBy(V, _.identity), ["conditionBasic", "conditionAdvanced"]));
22413
- const A = y["x-component"] === "BlockTemplate" && ((L = y["x-component-props"]) == null ? void 0 : L.templateId), z = {
22415
+ for (const L of O.fieldReaction.rules)
22416
+ $.push(_.omit(_.pickBy(L, _.identity), ["conditionBasic", "conditionAdvanced"]));
22417
+ const A = y["x-component"] === "BlockTemplate" && ((V = y["x-component-props"]) == null ? void 0 : V.templateId), z = {
22414
22418
  "x-uid": b !== LinkageRuleCategory.block ? A && m(A).uid || y["x-uid"] : c["x-uid"]
22415
22419
  };
22416
22420
  y[w] = $, z[w] = $, c[w] = $, d.emit("patch", {
@@ -22887,7 +22891,7 @@ const getContentWidth = (e) => {
22887
22891
  onOpenChange: (g) => {
22888
22892
  i(o && g);
22889
22893
  },
22890
- content: /* @__PURE__ */ jsx("div", { style: popoverStyle$1, children: e.popoverContent || e.children }),
22894
+ content: /* @__PURE__ */ jsx("div", { style: x(x({}, popoverStyle$1), (e == null ? void 0 : e.style) || {}), children: e.popoverContent || e.children }),
22891
22895
  children: d
22892
22896
  }
22893
22897
  );
@@ -23527,8 +23531,8 @@ function getTypedConstantOption(e, t, n) {
23527
23531
  };
23528
23532
  }
23529
23533
  function Input$1(e) {
23530
- var X, Q, ee;
23531
- const Y = e, {
23534
+ var ne, te, se, ce;
23535
+ const Q = e, {
23532
23536
  value: t = "",
23533
23537
  onChange: n,
23534
23538
  children: o,
@@ -23542,7 +23546,7 @@ function Input$1(e) {
23542
23546
  parseOptions: p,
23543
23547
  hideVariableButton: m,
23544
23548
  constantAbel: h = !0
23545
- } = Y, g = W(Y, [
23549
+ } = Q, g = W(Q, [
23546
23550
  "value",
23547
23551
  "onChange",
23548
23552
  "children",
@@ -23560,101 +23564,104 @@ function Input$1(e) {
23560
23564
  useAntdInputStyle(`${y}-input`);
23561
23565
  const v = useCompile(), { t: I } = useTranslation(), F = useForm(), [w, T] = React.useState([]), [D, B] = React.useState([]), [N, M] = React.useState(
23562
23566
  m || !!(o && t != null)
23563
- ), j = useMemo(() => parseValue(t, p), [p, t]), R = typeof j == "string", O = R ? j : "", $ = R ? null : j, A = Object.assign(
23567
+ ), [j, R] = React.useState(null), O = useMemo(() => parseValue(t, p), [p, t]), $ = typeof O == "string", A = $ ? O : "", E = $ ? null : O, z = Object.assign(
23564
23568
  {
23565
23569
  label: "label",
23566
23570
  value: "value",
23567
23571
  children: "children"
23568
23572
  },
23569
23573
  d != null ? d : {}
23570
- ), E = useMemo(() => h ? o ? {
23574
+ ), V = useMemo(() => h ? o ? {
23571
23575
  value: "$",
23572
23576
  label: I("Constant"),
23573
- [A.value]: "$",
23574
- [A.label]: I("Constant")
23575
- } : a ? getTypedConstantOption(O, a, A) : null : null, [O, a]), z = (X = E == null ? void 0 : E.component) != null ? X : NullComponent, L = Array.isArray(a) ? (ee = (Q = a.find((J) => Array.isArray(J) && J[0] === O)) == null ? void 0 : Q[1]) != null ? ee : {} : {};
23576
- let V;
23577
- t == null ? i ? o && N ? V = ["$"] : V = [""] : o ? V = ["$"] : V = [" ", O] : V = o ? ["$"] : [" ", O], m && (V = ["$"]), useEffect(() => {
23578
- const re = E != null ? E : {}, { component: J } = re, Z = W(re, ["component"]), te = [
23577
+ [z.value]: "$",
23578
+ [z.label]: I("Constant")
23579
+ } : a ? getTypedConstantOption(A, a, z) : null : null, [A, a]), L = (ne = V == null ? void 0 : V.component) != null ? ne : NullComponent, G = Array.isArray(a) ? (se = (te = a.find((ie) => Array.isArray(ie) && ie[0] === A)) == null ? void 0 : te[1]) != null ? se : {} : {};
23580
+ let H;
23581
+ t == null ? i ? o && N ? H = ["$"] : H = [""] : o ? H = ["$"] : H = [" ", A] : H = o ? ["$"] : [" ", A], m && (H = ["$"]), useEffect(() => {
23582
+ const pe = V != null ? V : {}, { component: ie } = pe, re = W(pe, ["component"]), de = [
23579
23583
  ...i ? [
23580
23584
  {
23581
23585
  value: "",
23582
23586
  label: I("Null"),
23583
- [A.value]: "",
23584
- [A.label]: I("Null")
23587
+ [z.value]: "",
23588
+ [z.label]: I("Null")
23585
23589
  }
23586
23590
  ] : [],
23587
- ...E ? [v(Z)] : [],
23591
+ ...V ? [v(re)] : [],
23588
23592
  ...f ? [...f] : []
23589
- ].filter((se) => !se.deprecated || ($ == null ? void 0 : $[0]) === se[A.value]);
23590
- T(te);
23591
- }, [f, $, E, i]);
23592
- const G = (J) => q(this, null, function* () {
23593
- var te;
23594
- const Z = J[J.length - 1];
23595
- if (!((te = Z.children) != null && te.length) && !Z.isLeaf && Z.loadChildren) {
23596
- let re;
23597
- if ($ && $.length >= 2) {
23598
- for (const se of $)
23599
- if (se === Z[A.value]) {
23600
- re = se;
23593
+ ].filter((ue) => !ue.deprecated || (E == null ? void 0 : E[0]) === ue[z.value]);
23594
+ T(de);
23595
+ }, [f, E, V, i]);
23596
+ const U = (ie) => q(this, null, function* () {
23597
+ var de;
23598
+ const re = ie[ie.length - 1];
23599
+ if (!((de = re.children) != null && de.length) && !re.isLeaf && re.loadChildren) {
23600
+ ie.length && R(ie.map((ue) => ue == null ? void 0 : ue[z.value]));
23601
+ let pe;
23602
+ if (E && E.length >= 2) {
23603
+ for (const ue of E)
23604
+ if (ue === re[z.value]) {
23605
+ pe = ue;
23601
23606
  break;
23602
23607
  }
23603
23608
  }
23604
- yield Z.loadChildren(Z, re, $), T((se) => [...se]);
23609
+ yield re.loadChildren(re, pe, E), T((ue) => [...ue]);
23605
23610
  }
23606
- }), H = useCallback(
23607
- (J, Z) => {
23608
- var te, re, se;
23609
- if (J[0] === "$") {
23610
- M(!0), $ && n(null, Z);
23611
+ }), K = useCallback(
23612
+ (ie, re) => {
23613
+ var de, pe, ue;
23614
+ if (R(null), ie[0] === "$") {
23615
+ M(!0), E && n(null, re);
23611
23616
  return;
23612
23617
  } else
23613
23618
  M(!1);
23614
- if (J[0] === "") {
23619
+ if (ie[0] === "") {
23615
23620
  n(null);
23616
23621
  return;
23617
23622
  }
23618
- if (J[0] === " ") {
23619
- J[1] ? J[1] !== O && n((se = (re = (te = ConstantTypes[J[1]]) == null ? void 0 : te.default) == null ? void 0 : re.call(te)) != null ? se : null, Z) : $ && n(null, Z);
23623
+ if (ie[0] === " ") {
23624
+ ie[1] ? ie[1] !== A && n((ue = (pe = (de = ConstantTypes[ie[1]]) == null ? void 0 : de.default) == null ? void 0 : pe.call(de)) != null ? ue : null, re) : E && n(null, re);
23620
23625
  return;
23621
23626
  }
23622
- n(`{{${J.join(".")}}}`, Z);
23627
+ n(`{{${ie.join(".")}}}`, re);
23623
23628
  },
23624
- [O, $, n]
23625
- ), U = useCallback(() => {
23626
- var J;
23627
- if (M(!!o), (J = E == null ? void 0 : E.children) != null && J.length) {
23628
- const Z = E.children[0].default();
23629
- return n(Z);
23629
+ [A, E, n]
23630
+ ), Y = useCallback(() => {
23631
+ var ie;
23632
+ if (M(!!o), (ie = V == null ? void 0 : V.children) != null && ie.length) {
23633
+ const re = V.children[0].default();
23634
+ return n(re);
23630
23635
  }
23631
- n(null);
23632
- }, [E]);
23636
+ n(null), R(null);
23637
+ }, [V]), X = useCallback((ie) => {
23638
+ ie || R(null);
23639
+ }, []);
23633
23640
  useEffect(() => {
23634
23641
  q(this, null, function* () {
23635
- var re;
23636
- if (!$ || w.length <= 1)
23642
+ var pe;
23643
+ if (!E || w.length <= 1)
23637
23644
  return;
23638
- let Z = null;
23639
- const te = [];
23640
- for (let se = 0; se < $.length; se++) {
23641
- const ue = $[se];
23645
+ let re = null;
23646
+ const de = [];
23647
+ for (let ue = 0; ue < E.length; ue++) {
23648
+ const ge = E[ue];
23642
23649
  try {
23643
- if (se === 0 ? Z = w.find((le) => le[A.value] === ue) : (Z.loadChildren && !((re = Z.children) != null && re.length) && (yield Z.loadChildren(Z, ue, $)), Z = Z.children.find((le) => le[A.value] === ue)), !Z)
23650
+ if (ue === 0 ? re = w.find((he) => he[z.value] === ge) : (re.loadChildren && !((pe = re.children) != null && pe.length) && (yield re.loadChildren(re, ge, E)), re = re.children.find((he) => he[z.value] === ge)), !re)
23644
23651
  return;
23645
- te.push(Z[A.label]);
23646
- } catch (le) {
23647
- error(le);
23652
+ de.push(re[z.label]);
23653
+ } catch (he) {
23654
+ error(he);
23648
23655
  }
23649
23656
  }
23650
- T([...w]), B([...te]);
23657
+ T([...w]), B([...de]);
23651
23658
  });
23652
- }, [$, w.length]);
23653
- const K = e.disabled || F.disabled;
23659
+ }, [E, w.length]);
23660
+ const J = e.disabled || F.disabled, Z = (ce = E != null ? E : j) != null ? ce : H;
23654
23661
  return C(
23655
23662
  /* @__PURE__ */ jsxs(Fragment$1, { children: [
23656
23663
  /* @__PURE__ */ jsxs(Space$1.Compact, { style: l, className: cls(S, b, c), children: [
23657
- $ ? /* @__PURE__ */ jsxs(
23664
+ E ? /* @__PURE__ */ jsxs(
23658
23665
  "div",
23659
23666
  {
23660
23667
  className: cx(
@@ -23672,7 +23679,7 @@ function Input$1(e) {
23672
23679
  .ant-input {
23673
23680
  overflow: auto;
23674
23681
  white-space: nowrap;
23675
- ${K ? "" : "padding-right: 28px;"}
23682
+ ${J ? "" : "padding-right: 28px;"}
23676
23683
 
23677
23684
  .ant-tag {
23678
23685
  display: inline;
@@ -23691,32 +23698,32 @@ function Input$1(e) {
23691
23698
  role: "button",
23692
23699
  "aria-label": "variable-tag",
23693
23700
  style: { overflow: "hidden" },
23694
- className: cx("ant-input ant-input-outlined", { "ant-input-disabled": K }, b),
23695
- children: /* @__PURE__ */ jsx(Tag, { color: "blue", children: D.map((J, Z) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
23696
- Z ? " / " : "",
23697
- J
23698
- ] }, J)) })
23701
+ className: cx("ant-input ant-input-outlined", { "ant-input-disabled": J }, b),
23702
+ children: /* @__PURE__ */ jsx(Tag, { color: "blue", children: D.map((ie, re) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
23703
+ re ? " / " : "",
23704
+ ie
23705
+ ] }, ie)) })
23699
23706
  }
23700
23707
  ),
23701
- K ? null : /* @__PURE__ */ jsx(
23708
+ J ? null : /* @__PURE__ */ jsx(
23702
23709
  "span",
23703
23710
  {
23704
23711
  role: "button",
23705
23712
  "aria-label": "icon-close",
23706
23713
  className: cx("clear-button"),
23707
23714
  unselectable: "on",
23708
- onClick: U,
23715
+ onClick: Y,
23709
23716
  children: /* @__PURE__ */ jsx(CloseCircleFilled, {})
23710
23717
  }
23711
23718
  )
23712
23719
  ]
23713
23720
  }
23714
- ) : /* @__PURE__ */ jsx("div", { style: { flex: 1 }, children: o && (N || !i) ? o : z ? /* @__PURE__ */ jsx(
23715
- z,
23721
+ ) : /* @__PURE__ */ jsx("div", { style: { flex: 1 }, children: o && (N || !i) ? o : L ? /* @__PURE__ */ jsx(
23722
+ L,
23716
23723
  P(x({
23717
23724
  role: "button",
23718
23725
  "aria-label": "variable-constant"
23719
- }, L), {
23726
+ }, G), {
23720
23727
  value: t,
23721
23728
  onChange: n
23722
23729
  })
@@ -23725,20 +23732,21 @@ function Input$1(e) {
23725
23732
  Cascader$1,
23726
23733
  {
23727
23734
  options: w,
23728
- value: $ != null ? $ : V,
23729
- onChange: H,
23730
- loadData: G,
23735
+ value: Z,
23736
+ onChange: K,
23737
+ loadData: U,
23731
23738
  changeOnSelect: u != null ? u : !0,
23732
23739
  fieldNames: d,
23733
- disabled: K,
23740
+ disabled: J,
23741
+ onDropdownVisibleChange: X,
23734
23742
  children: r != null ? r : /* @__PURE__ */ jsx(
23735
23743
  XButton,
23736
23744
  {
23737
23745
  className: css(`
23738
23746
  margin-left: -1px;
23739
23747
  `),
23740
- type: $ ? "primary" : "default",
23741
- disabled: K
23748
+ type: E ? "primary" : "default",
23749
+ disabled: J
23742
23750
  }
23743
23751
  )
23744
23752
  }
@@ -24023,23 +24031,23 @@ function TextArea(e) {
24023
24031
  ), [S, y] = useState(!1), [v, I] = useState(!1), [F, w] = useState(() => renderHTML(p != null ? p : "", b, c)), [T, D] = useState([-1, 0, -1, 0]);
24024
24032
  useAntdInputStyle("ant-input");
24025
24033
  const { token: B } = theme.useToken(), N = c.join(" "), M = useCallback(
24026
- (V) => {
24034
+ (L) => {
24027
24035
  var H;
24028
- const G = getValue(V, c);
24036
+ const G = getValue(L, c);
24029
24037
  (H = e.onChange) == null || H.call(e, d ? G.trim() : G);
24030
24038
  },
24031
24039
  [N, e.onChange, d]
24032
24040
  );
24033
24041
  useEffect(() => {
24034
- preloadOptions(r, m).then((V) => {
24035
- f(V);
24042
+ preloadOptions(r, m).then((L) => {
24043
+ f(L);
24036
24044
  }).catch(console.error);
24037
24045
  }, [r, JSON.stringify(m)]), useEffect(() => {
24038
24046
  w(renderHTML(p != null ? p : "", b, c)), v || D([-1, 0, -1, 0]);
24039
24047
  }, [p, b, N]), useEffect(() => {
24040
24048
  var H;
24041
- const { current: V } = h;
24042
- if (!V)
24049
+ const { current: L } = h;
24050
+ if (!L)
24043
24051
  return;
24044
24052
  const G = new Range();
24045
24053
  if (v) {
@@ -24048,22 +24056,22 @@ function TextArea(e) {
24048
24056
  const U = (H = window.getSelection) == null ? void 0 : H.call(window);
24049
24057
  if (U)
24050
24058
  try {
24051
- const K = Array.from(V.childNodes);
24059
+ const K = Array.from(L.childNodes);
24052
24060
  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), U.removeAllRanges(), U.addRange(G);
24053
24061
  } catch (K) {
24054
24062
  }
24055
24063
  } else {
24056
- const { lastChild: U } = V;
24064
+ const { lastChild: U } = L;
24057
24065
  if (U) {
24058
24066
  G.setStartAfter(U), G.setEndAfter(U);
24059
- const K = Array.from(V.childNodes), Y = G.startContainer === V ? -1 : K.indexOf(U), X = G.startContainer === V ? -1 : K.indexOf(U);
24067
+ const K = Array.from(L.childNodes), Y = G.startContainer === L ? -1 : K.indexOf(U), X = G.startContainer === L ? -1 : K.indexOf(U);
24060
24068
  D([Y, G.startOffset, X, G.endOffset]);
24061
24069
  }
24062
24070
  }
24063
24071
  }, [F]);
24064
24072
  const j = useCallback(
24065
- function(V) {
24066
- const G = V.filter((K) => !!K.trim()), { current: H } = h;
24073
+ function(L) {
24074
+ const G = L.filter((K) => !!K.trim()), { current: H } = h;
24067
24075
  if (!H || !G)
24068
24076
  return;
24069
24077
  H.focus();
@@ -24074,25 +24082,25 @@ function TextArea(e) {
24074
24082
  },
24075
24083
  [b, M, T]
24076
24084
  ), R = useCallback(
24077
- function({ currentTarget: V }) {
24078
- S || (I(!0), D(getCurrentRange(V)), M(V));
24085
+ function({ currentTarget: L }) {
24086
+ S || (I(!0), D(getCurrentRange(L)), M(L));
24079
24087
  },
24080
24088
  [S, M]
24081
- ), O = useCallback(function({ currentTarget: V }) {
24082
- D(getCurrentRange(V));
24083
- }, []), $ = useCallback(function(V) {
24084
- V.key === "Enter" && V.preventDefault();
24089
+ ), O = useCallback(function({ currentTarget: L }) {
24090
+ D(getCurrentRange(L));
24091
+ }, []), $ = useCallback(function(L) {
24092
+ L.key === "Enter" && L.preventDefault();
24085
24093
  }, []), A = useCallback(function() {
24086
24094
  y(!0);
24087
24095
  }, []), E = useCallback(
24088
- ({ currentTarget: V }) => {
24089
- y(!1), I(!0), D(getCurrentRange(V)), M(V);
24096
+ ({ currentTarget: L }) => {
24097
+ y(!1), I(!0), D(getCurrentRange(L)), M(L);
24090
24098
  },
24091
24099
  [M]
24092
24100
  ), z = useCallback(
24093
- function(V) {
24094
- V.preventDefault();
24095
- const G = V.clipboardData.getData("text/html") || V.clipboardData.getData("text"), H = sanitizeHTML(G, {
24101
+ function(L) {
24102
+ L.preventDefault();
24103
+ const G = L.clipboardData.getData("text/html") || L.clipboardData.getData("text"), H = sanitizeHTML(G, {
24096
24104
  allowedTags: ["span"],
24097
24105
  allowedAttributes: {
24098
24106
  span: ["data-variable", "contenteditable"]
@@ -24109,10 +24117,10 @@ function TextArea(e) {
24109
24117
  }
24110
24118
  }
24111
24119
  }).replace(/\n/g, " ");
24112
- I(!0), pasteHTML(V.currentTarget, H), D(getCurrentRange(V.currentTarget)), M(V.currentTarget);
24120
+ I(!0), pasteHTML(L.currentTarget, H), D(getCurrentRange(L.currentTarget)), M(L.currentTarget);
24113
24121
  },
24114
24122
  [M]
24115
- ), L = e.disabled || C.disabled;
24123
+ ), V = e.disabled || C.disabled;
24116
24124
  return t(
24117
24125
  /* @__PURE__ */ jsxs(Fragment$1, { children: [
24118
24126
  /* @__PURE__ */ jsxs(
@@ -24172,7 +24180,7 @@ function TextArea(e) {
24172
24180
  className: cx(
24173
24181
  n,
24174
24182
  "ant-input ant-input-outlined",
24175
- { "ant-input-disabled": L },
24183
+ { "ant-input-disabled": V },
24176
24184
  // NOTE: `pre-wrap` here for avoid the `&nbsp;` (\x160) issue when paste content, we need normal space (\x32).
24177
24185
  css`
24178
24186
  min-height: ${B.controlHeight}px;
@@ -24194,7 +24202,7 @@ function TextArea(e) {
24194
24202
  `
24195
24203
  ),
24196
24204
  ref: h,
24197
- contentEditable: !L,
24205
+ contentEditable: !V,
24198
24206
  dangerouslySetInnerHTML: { __html: F }
24199
24207
  }
24200
24208
  ),
@@ -24206,7 +24214,7 @@ function TextArea(e) {
24206
24214
  onInsert: j,
24207
24215
  changeOnSelect: a,
24208
24216
  fieldNames: l || defaultFieldNames$2,
24209
- disabled: L
24217
+ disabled: V
24210
24218
  }
24211
24219
  )
24212
24220
  ]
@@ -27173,23 +27181,23 @@ https://requirejs.org/docs/errors.html#` + e);
27173
27181
  }
27174
27182
  }
27175
27183
  function b(A, E, z) {
27176
- var L, V, G, H, U, K, Y, X, Q, ee, J, Z, te = E && E.split("/"), re = i.map, se = re && re["*"];
27177
- if (A && (A = A.split("/"), Y = A.length - 1, i.nodeIdCompat && jsSuffixRegExp.test(A[Y]) && (A[Y] = A[Y].replace(jsSuffixRegExp, "")), A[0].charAt(0) === "." && te && (Z = te.slice(0, te.length - 1), A = Z.concat(A)), C(A), A = A.join("/")), z && re && (te || se)) {
27184
+ var V, L, G, H, U, K, Y, X, J, Z, Q, ne, te = E && E.split("/"), se = i.map, ce = se && se["*"];
27185
+ if (A && (A = A.split("/"), Y = A.length - 1, i.nodeIdCompat && jsSuffixRegExp.test(A[Y]) && (A[Y] = A[Y].replace(jsSuffixRegExp, "")), A[0].charAt(0) === "." && te && (ne = te.slice(0, te.length - 1), A = ne.concat(A)), C(A), A = A.join("/")), z && se && (te || ce)) {
27178
27186
  G = A.split("/");
27179
27187
  e:
27180
27188
  for (H = G.length; H > 0; H -= 1) {
27181
27189
  if (K = G.slice(0, H).join("/"), te) {
27182
27190
  for (U = te.length; U > 0; U -= 1)
27183
- if (V = getOwn(re, te.slice(0, U).join("/")), V && (V = getOwn(V, K), V)) {
27184
- X = V, Q = H;
27191
+ if (L = getOwn(se, te.slice(0, U).join("/")), L && (L = getOwn(L, K), L)) {
27192
+ X = L, J = H;
27185
27193
  break e;
27186
27194
  }
27187
27195
  }
27188
- !ee && se && getOwn(se, K) && (ee = getOwn(se, K), J = H);
27196
+ !Z && ce && getOwn(ce, K) && (Z = getOwn(ce, K), Q = H);
27189
27197
  }
27190
- !X && ee && (X = ee, Q = J), X && (G.splice(0, Q, X), A = G.join("/"));
27198
+ !X && Z && (X = Z, J = Q), X && (G.splice(0, J, X), A = G.join("/"));
27191
27199
  }
27192
- return L = getOwn(i.pkgs, A), L || A;
27200
+ return V = getOwn(i.pkgs, A), V || A;
27193
27201
  }
27194
27202
  function S(A) {
27195
27203
  isBrowser && each(scripts(), function(E) {
@@ -27208,19 +27216,19 @@ https://requirejs.org/docs/errors.html#` + e);
27208
27216
  var E, z = A ? A.indexOf("!") : -1;
27209
27217
  return z > -1 && (E = A.substring(0, z), A = A.substring(z + 1, A.length)), [E, A];
27210
27218
  }
27211
- function I(A, E, z, L) {
27212
- var V, G, H, U, K = null, Y = E ? E.name : null, X = A, Q = !0, ee = "";
27213
- return A || (Q = !1, A = "_@r" + (g += 1)), U = v(A), K = U[0], A = U[1], K && (K = b(K, Y, L), G = getOwn(p, K)), A && (K ? z ? ee = A : G && G.normalize ? ee = G.normalize(A, function(J) {
27214
- return b(J, Y, L);
27215
- }) : ee = A.indexOf("!") === -1 ? b(A, Y, L) : A : (ee = b(A, Y, L), U = v(ee), K = U[0], ee = U[1], z = !0, V = o.nameToUrl(ee))), H = K && !G && !z ? "_unnormalized" + (f += 1) : "", {
27219
+ function I(A, E, z, V) {
27220
+ var L, G, H, U, K = null, Y = E ? E.name : null, X = A, J = !0, Z = "";
27221
+ return A || (J = !1, A = "_@r" + (g += 1)), U = v(A), K = U[0], A = U[1], K && (K = b(K, Y, V), G = getOwn(p, K)), A && (K ? z ? Z = A : G && G.normalize ? Z = G.normalize(A, function(Q) {
27222
+ return b(Q, Y, V);
27223
+ }) : Z = A.indexOf("!") === -1 ? b(A, Y, V) : A : (Z = b(A, Y, V), U = v(Z), K = U[0], Z = U[1], z = !0, L = o.nameToUrl(Z))), H = K && !G && !z ? "_unnormalized" + (f += 1) : "", {
27216
27224
  prefix: K,
27217
- name: ee,
27225
+ name: Z,
27218
27226
  parentMap: E,
27219
27227
  unnormalized: !!H,
27220
- url: V,
27228
+ url: L,
27221
27229
  originalName: X,
27222
- isDefine: Q,
27223
- id: (K ? K + "!" + ee : ee) + H
27230
+ isDefine: J,
27231
+ id: (K ? K + "!" + Z : Z) + H
27224
27232
  };
27225
27233
  }
27226
27234
  function F(A) {
@@ -27228,15 +27236,15 @@ https://requirejs.org/docs/errors.html#` + e);
27228
27236
  return z || (z = l[E] = new o.Module(A)), z;
27229
27237
  }
27230
27238
  function w(A, E, z) {
27231
- var L = A.id, V = getOwn(l, L);
27232
- hasProp(p, L) && (!V || V.defineEmitComplete) ? E === "defined" && z(p[L]) : (V = F(A), V.error && E === "error" ? z(V.error) : V.on(E, z));
27239
+ var V = A.id, L = getOwn(l, V);
27240
+ hasProp(p, V) && (!L || L.defineEmitComplete) ? E === "defined" && z(p[V]) : (L = F(A), L.error && E === "error" ? z(L.error) : L.on(E, z));
27233
27241
  }
27234
27242
  function T(A, E) {
27235
- var z = A.requireModules, L = !1;
27236
- E ? E(A) : (each(z, function(V) {
27237
- var G = getOwn(l, V);
27238
- G && (G.error = A, G.events.error && (L = !0, G.emit("error", A)));
27239
- }), L || req.onError(A));
27243
+ var z = A.requireModules, V = !1;
27244
+ E ? E(A) : (each(z, function(L) {
27245
+ var G = getOwn(l, L);
27246
+ G && (G.error = A, G.events.error && (V = !0, G.emit("error", A)));
27247
+ }), V || req.onError(A));
27240
27248
  }
27241
27249
  function D() {
27242
27250
  globalDefQueue.length && (each(globalDefQueue, function(A) {
@@ -27267,28 +27275,28 @@ https://requirejs.org/docs/errors.html#` + e);
27267
27275
  delete l[A], delete c[A];
27268
27276
  }
27269
27277
  function N(A, E, z) {
27270
- var L = A.map.id;
27271
- A.error ? A.emit("error", A.error) : (E[L] = !0, each(A.depMaps, function(V, G) {
27272
- var H = V.id, U = getOwn(l, H);
27278
+ var V = A.map.id;
27279
+ A.error ? A.emit("error", A.error) : (E[V] = !0, each(A.depMaps, function(L, G) {
27280
+ var H = L.id, U = getOwn(l, H);
27273
27281
  U && !A.depMatched[G] && !z[H] && (getOwn(E, H) ? (A.defineDep(G, p[H]), A.check()) : N(U, E, z));
27274
- }), z[L] = !0);
27282
+ }), z[V] = !0);
27275
27283
  }
27276
27284
  function M() {
27277
- var A, E, z = i.waitSeconds * 1e3, L = z && o.startTime + z < (/* @__PURE__ */ new Date()).getTime(), V = [], G = [], H = !1, U = !0;
27285
+ var A, E, z = i.waitSeconds * 1e3, V = z && o.startTime + z < (/* @__PURE__ */ new Date()).getTime(), L = [], G = [], H = !1, U = !0;
27278
27286
  if (!t) {
27279
27287
  if (t = !0, eachProp(c, function(K) {
27280
27288
  var Y = K.map, X = Y.id;
27281
27289
  if (K.enabled && (Y.isDefine || G.push(K), !K.error)) {
27282
- if (!K.inited && L)
27283
- y(X) ? (E = !0, H = !0) : (V.push(X), S(X));
27290
+ if (!K.inited && V)
27291
+ y(X) ? (E = !0, H = !0) : (L.push(X), S(X));
27284
27292
  else if (!K.inited && K.fetched && Y.isDefine && (H = !0, !Y.prefix))
27285
27293
  return U = !1;
27286
27294
  }
27287
- }), L && V.length)
27288
- return A = makeError("timeout", "Load timeout for modules: " + V, null, V), A.contextName = o.contextName, T(A);
27295
+ }), V && L.length)
27296
+ return A = makeError("timeout", "Load timeout for modules: " + L, null, L), A.contextName = o.contextName, T(A);
27289
27297
  U && each(G, function(K) {
27290
27298
  N(K, {}, {});
27291
- }), (!L || E) && H && (isBrowser || isWebWorker) && !a && (a = setTimeout(function() {
27299
+ }), (!V || E) && H && (isBrowser || isWebWorker) && !a && (a = setTimeout(function() {
27292
27300
  a = 0, M();
27293
27301
  }, 50)), t = !1;
27294
27302
  }
@@ -27296,10 +27304,10 @@ https://requirejs.org/docs/errors.html#` + e);
27296
27304
  n = function(A) {
27297
27305
  this.events = getOwn(u, A.id) || {}, this.map = A, this.shim = getOwn(i.shim, A.id), this.depExports = [], this.depMaps = [], this.depMatched = [], this.pluginMaps = {}, this.depCount = 0;
27298
27306
  }, n.prototype = {
27299
- init: function(A, E, z, L) {
27300
- L = L || {}, !this.inited && (this.factory = E, z ? this.on("error", z) : this.events.error && (z = bind(this, function(V) {
27301
- this.emit("error", V);
27302
- })), this.depMaps = A && A.slice(0), this.errback = z, this.inited = !0, this.ignore = L.ignore, L.enabled || this.enabled ? this.enable() : this.check());
27307
+ init: function(A, E, z, V) {
27308
+ V = V || {}, !this.inited && (this.factory = E, z ? this.on("error", z) : this.events.error && (z = bind(this, function(L) {
27309
+ this.emit("error", L);
27310
+ })), this.depMaps = A && A.slice(0), this.errback = z, this.inited = !0, this.ignore = V.ignore, V.enabled || this.enabled ? this.enable() : this.check());
27303
27311
  },
27304
27312
  defineDep: function(A, E) {
27305
27313
  this.depMatched[A] || (this.depMatched[A] = !0, this.depCount -= 1, this.depExports[A] = E);
@@ -27328,7 +27336,7 @@ https://requirejs.org/docs/errors.html#` + e);
27328
27336
  */
27329
27337
  check: function() {
27330
27338
  if (!(!this.enabled || this.enabling)) {
27331
- var A, E, z = this.map.id, L = this.depExports, V = this.exports, G = this.factory;
27339
+ var A, E, z = this.map.id, V = this.depExports, L = this.exports, G = this.factory;
27332
27340
  if (!this.inited)
27333
27341
  hasProp(o.defQueueMap, z) || this.fetch();
27334
27342
  else if (this.error)
@@ -27338,17 +27346,17 @@ https://requirejs.org/docs/errors.html#` + e);
27338
27346
  if (isFunction(G)) {
27339
27347
  if (this.events.error && this.map.isDefine || req.onError !== defaultOnError)
27340
27348
  try {
27341
- V = o.execCb(z, G, L, V);
27349
+ L = o.execCb(z, G, V, L);
27342
27350
  } catch (U) {
27343
27351
  A = U;
27344
27352
  }
27345
27353
  else
27346
- V = o.execCb(z, G, L, V);
27347
- if (this.map.isDefine && V === void 0 && (E = this.module, E ? V = E.exports : this.usingExports && (V = this.exports)), A)
27354
+ L = o.execCb(z, G, V, L);
27355
+ if (this.map.isDefine && L === void 0 && (E = this.module, E ? L = E.exports : this.usingExports && (L = this.exports)), A)
27348
27356
  return A.requireMap = this.map, A.requireModules = this.map.isDefine ? [this.map.id] : null, A.requireType = this.map.isDefine ? "define" : "require", T(this.error = A);
27349
27357
  } else
27350
- V = G;
27351
- if (this.exports = V, this.map.isDefine && !this.ignore && (p[z] = V, req.onResourceLoad)) {
27358
+ L = G;
27359
+ if (this.exports = L, this.map.isDefine && !this.ignore && (p[z] = L, req.onResourceLoad)) {
27352
27360
  var H = [];
27353
27361
  each(this.depMaps, function(U) {
27354
27362
  H.push(U.normalizedMap || U);
@@ -27362,13 +27370,13 @@ https://requirejs.org/docs/errors.html#` + e);
27362
27370
  },
27363
27371
  callPlugin: function() {
27364
27372
  var A = this.map, E = A.id, z = I(A.prefix);
27365
- this.depMaps.push(z), w(z, "defined", bind(this, function(L) {
27366
- var V, G, H, U = getOwn(h, this.map.id), K = this.map.name, Y = this.map.parentMap ? this.map.parentMap.name : null, X = o.makeRequire(A.parentMap, {
27373
+ this.depMaps.push(z), w(z, "defined", bind(this, function(V) {
27374
+ var L, G, H, U = getOwn(h, this.map.id), K = this.map.name, Y = this.map.parentMap ? this.map.parentMap.name : null, X = o.makeRequire(A.parentMap, {
27367
27375
  enableBuildCallback: !0
27368
27376
  });
27369
27377
  if (this.map.unnormalized) {
27370
- L.normalize && (K = L.normalize(K, function(Q) {
27371
- return b(Q, Y, !0);
27378
+ V.normalize && (K = V.normalize(K, function(J) {
27379
+ return b(J, Y, !0);
27372
27380
  }) || ""), G = I(
27373
27381
  A.prefix + "!" + K,
27374
27382
  this.map.parentMap,
@@ -27376,16 +27384,16 @@ https://requirejs.org/docs/errors.html#` + e);
27376
27384
  ), w(
27377
27385
  G,
27378
27386
  "defined",
27379
- bind(this, function(Q) {
27387
+ bind(this, function(J) {
27380
27388
  this.map.normalizedMap = G, this.init([], function() {
27381
- return Q;
27389
+ return J;
27382
27390
  }, null, {
27383
27391
  enabled: !0,
27384
27392
  ignore: !0
27385
27393
  });
27386
27394
  })
27387
- ), H = getOwn(l, G.id), H && (this.depMaps.push(G), this.events.error && H.on("error", bind(this, function(Q) {
27388
- this.emit("error", Q);
27395
+ ), H = getOwn(l, G.id), H && (this.depMaps.push(G), this.events.error && H.on("error", bind(this, function(J) {
27396
+ this.emit("error", J);
27389
27397
  })), H.enable());
27390
27398
  return;
27391
27399
  }
@@ -27393,44 +27401,44 @@ https://requirejs.org/docs/errors.html#` + e);
27393
27401
  this.map.url = o.nameToUrl(U), this.load();
27394
27402
  return;
27395
27403
  }
27396
- V = bind(this, function(Q) {
27404
+ L = bind(this, function(J) {
27397
27405
  this.init([], function() {
27398
- return Q;
27406
+ return J;
27399
27407
  }, null, {
27400
27408
  enabled: !0
27401
27409
  });
27402
- }), V.error = bind(this, function(Q) {
27403
- this.inited = !0, this.error = Q, Q.requireModules = [E], eachProp(l, function(ee) {
27404
- ee.map.id.indexOf(E + "_unnormalized") === 0 && B(ee.map.id);
27405
- }), T(Q);
27406
- }), V.fromText = bind(this, function(Q, ee) {
27407
- var J = A.name, Z = I(J), te = useInteractive;
27408
- ee && (Q = ee), te && (useInteractive = !1), F(Z), hasProp(i.config, E) && (i.config[J] = i.config[E]);
27410
+ }), L.error = bind(this, function(J) {
27411
+ this.inited = !0, this.error = J, J.requireModules = [E], eachProp(l, function(Z) {
27412
+ Z.map.id.indexOf(E + "_unnormalized") === 0 && B(Z.map.id);
27413
+ }), T(J);
27414
+ }), L.fromText = bind(this, function(J, Z) {
27415
+ var Q = A.name, ne = I(Q), te = useInteractive;
27416
+ Z && (J = Z), te && (useInteractive = !1), F(ne), hasProp(i.config, E) && (i.config[Q] = i.config[E]);
27409
27417
  try {
27410
- req.exec(Q);
27411
- } catch (re) {
27418
+ req.exec(J);
27419
+ } catch (se) {
27412
27420
  return T(makeError(
27413
27421
  "fromtexteval",
27414
- "fromText eval for " + E + " failed: " + re,
27415
- re,
27422
+ "fromText eval for " + E + " failed: " + se,
27423
+ se,
27416
27424
  [E]
27417
27425
  ));
27418
27426
  }
27419
- te && (useInteractive = !0), this.depMaps.push(Z), o.completeLoad(J), X([J], V);
27420
- }), L.load(A.name, X, V, i);
27427
+ te && (useInteractive = !0), this.depMaps.push(ne), o.completeLoad(Q), X([Q], L);
27428
+ }), V.load(A.name, X, L, i);
27421
27429
  })), o.enable(z, this), this.pluginMaps[z.id] = z;
27422
27430
  },
27423
27431
  enable: function() {
27424
27432
  c[this.map.id] = this, this.enabled = !0, this.enabling = !0, each(this.depMaps, bind(this, function(A, E) {
27425
- var z, L, V;
27433
+ var z, V, L;
27426
27434
  if (typeof A == "string") {
27427
27435
  if (A = I(
27428
27436
  A,
27429
27437
  this.map.isDefine ? this.map : this.map.parentMap,
27430
27438
  !1,
27431
27439
  !this.skipMap
27432
- ), this.depMaps[E] = A, V = getOwn(r, A.id), V) {
27433
- this.depExports[E] = V(this);
27440
+ ), this.depMaps[E] = A, L = getOwn(r, A.id), L) {
27441
+ this.depExports[E] = L(this);
27434
27442
  return;
27435
27443
  }
27436
27444
  this.depCount += 1, w(A, "defined", bind(this, function(G) {
@@ -27439,7 +27447,7 @@ https://requirejs.org/docs/errors.html#` + e);
27439
27447
  this.emit("error", G);
27440
27448
  }));
27441
27449
  }
27442
- z = A.id, L = l[z], !hasProp(r, z) && L && !L.enabled && o.enable(A, this);
27450
+ z = A.id, V = l[z], !hasProp(r, z) && V && !V.enabled && o.enable(A, this);
27443
27451
  })), eachProp(this.pluginMaps, bind(this, function(A) {
27444
27452
  var E = getOwn(l, A.id);
27445
27453
  E && !E.enabled && o.enable(A, this);
@@ -27458,8 +27466,8 @@ https://requirejs.org/docs/errors.html#` + e);
27458
27466
  function j(A) {
27459
27467
  hasProp(p, A[0]) || F(I(A[0], null, !0)).init(A[1], A[2]);
27460
27468
  }
27461
- function R(A, E, z, L) {
27462
- A.detachEvent && !isOpera ? L && A.detachEvent(L, E) : A.removeEventListener(z, E, !1);
27469
+ function R(A, E, z, V) {
27470
+ A.detachEvent && !isOpera ? V && A.detachEvent(V, E) : A.removeEventListener(z, E, !1);
27463
27471
  }
27464
27472
  function O(A) {
27465
27473
  var E = A.currentTarget || A.srcElement;
@@ -27496,31 +27504,31 @@ https://requirejs.org/docs/errors.html#` + e);
27496
27504
  configure: function(A) {
27497
27505
  if (A.baseUrl && A.baseUrl.charAt(A.baseUrl.length - 1) !== "/" && (A.baseUrl += "/"), typeof A.urlArgs == "string") {
27498
27506
  var E = A.urlArgs;
27499
- A.urlArgs = function(V, G) {
27507
+ A.urlArgs = function(L, G) {
27500
27508
  return (G.indexOf("?") === -1 ? "?" : "&") + E;
27501
27509
  };
27502
27510
  }
27503
- var z = i.shim, L = {
27511
+ var z = i.shim, V = {
27504
27512
  paths: !0,
27505
27513
  bundles: !0,
27506
27514
  config: !0,
27507
27515
  map: !0
27508
27516
  };
27509
- eachProp(A, function(V, G) {
27510
- L[G] ? (i[G] || (i[G] = {}), mixin(i[G], V, !0, !0)) : i[G] = V;
27511
- }), A.bundles && eachProp(A.bundles, function(V, G) {
27512
- each(V, function(H) {
27517
+ eachProp(A, function(L, G) {
27518
+ V[G] ? (i[G] || (i[G] = {}), mixin(i[G], L, !0, !0)) : i[G] = L;
27519
+ }), A.bundles && eachProp(A.bundles, function(L, G) {
27520
+ each(L, function(H) {
27513
27521
  H !== G && (h[H] = G);
27514
27522
  });
27515
- }), A.shim && (eachProp(A.shim, function(V, G) {
27516
- isArray(V) && (V = {
27517
- deps: V
27518
- }), (V.exports || V.init) && !V.exportsFn && (V.exportsFn = o.makeShimExports(V)), z[G] = V;
27519
- }), i.shim = z), A.packages && each(A.packages, function(V) {
27523
+ }), A.shim && (eachProp(A.shim, function(L, G) {
27524
+ isArray(L) && (L = {
27525
+ deps: L
27526
+ }), (L.exports || L.init) && !L.exportsFn && (L.exportsFn = o.makeShimExports(L)), z[G] = L;
27527
+ }), i.shim = z), A.packages && each(A.packages, function(L) {
27520
27528
  var G, H;
27521
- V = typeof V == "string" ? { name: V } : V, H = V.name, G = V.location, G && (i.paths[H] = V.location), i.pkgs[H] = V.name + "/" + (V.main || "main").replace(currDirRegExp, "").replace(jsSuffixRegExp, "");
27522
- }), eachProp(l, function(V, G) {
27523
- !V.inited && !V.map.unnormalized && (V.map = I(G, null, !0));
27529
+ L = typeof L == "string" ? { name: L } : L, H = L.name, G = L.location, G && (i.paths[H] = L.location), i.pkgs[H] = L.name + "/" + (L.main || "main").replace(currDirRegExp, "").replace(jsSuffixRegExp, "");
27530
+ }), eachProp(l, function(L, G) {
27531
+ !L.inited && !L.map.unnormalized && (L.map = I(G, null, !0));
27524
27532
  }), (A.deps || A.callback) && o.require(A.deps || [], A.callback);
27525
27533
  },
27526
27534
  makeShimExports: function(A) {
@@ -27532,10 +27540,10 @@ https://requirejs.org/docs/errors.html#` + e);
27532
27540
  },
27533
27541
  makeRequire: function(A, E) {
27534
27542
  E = E || {};
27535
- function z(L, V, G) {
27543
+ function z(V, L, G) {
27536
27544
  var H, U, K;
27537
- return E.enableBuildCallback && V && isFunction(V) && (V.__requireJsBuild = !0), typeof L == "string" ? isFunction(V) ? T(makeError("requireargs", "Invalid require call"), G) : A && hasProp(r, L) ? r[L](l[A.id]) : req.get ? req.get(o, L, A, z) : (U = I(L, A, !1, !0), H = U.id, hasProp(p, H) ? p[H] : T(makeError("notloaded", 'Module name "' + H + '" has not been loaded yet for context: ' + e + (A ? "" : ". Use require([])")))) : ($(), o.nextTick(function() {
27538
- $(), K = F(I(null, A)), K.skipMap = E.skipMap, K.init(L, V, G, {
27545
+ return E.enableBuildCallback && L && isFunction(L) && (L.__requireJsBuild = !0), typeof V == "string" ? isFunction(L) ? T(makeError("requireargs", "Invalid require call"), G) : A && hasProp(r, V) ? r[V](l[A.id]) : req.get ? req.get(o, V, A, z) : (U = I(V, A, !1, !0), H = U.id, hasProp(p, H) ? p[H] : T(makeError("notloaded", 'Module name "' + H + '" has not been loaded yet for context: ' + e + (A ? "" : ". Use require([])")))) : ($(), o.nextTick(function() {
27546
+ $(), K = F(I(null, A)), K.skipMap = E.skipMap, K.init(V, L, G, {
27539
27547
  enabled: !0
27540
27548
  }), M();
27541
27549
  }), z);
@@ -27547,26 +27555,26 @@ https://requirejs.org/docs/errors.html#` + e);
27547
27555
  * *Requires* the use of a module name. It does not support using
27548
27556
  * plain URLs like nameToUrl.
27549
27557
  */
27550
- toUrl: function(L) {
27551
- var V, G = L.lastIndexOf("."), H = L.split("/")[0], U = H === "." || H === "..";
27552
- return G !== -1 && (!U || G > 1) && (V = L.substring(G, L.length), L = L.substring(0, G)), o.nameToUrl(b(
27553
- L,
27558
+ toUrl: function(V) {
27559
+ var L, G = V.lastIndexOf("."), H = V.split("/")[0], U = H === "." || H === "..";
27560
+ return G !== -1 && (!U || G > 1) && (L = V.substring(G, V.length), V = V.substring(0, G)), o.nameToUrl(b(
27561
+ V,
27554
27562
  A && A.id,
27555
27563
  !0
27556
- ), V, !0);
27564
+ ), L, !0);
27557
27565
  },
27558
- defined: function(L) {
27559
- return hasProp(p, I(L, A, !1, !0).id);
27566
+ defined: function(V) {
27567
+ return hasProp(p, I(V, A, !1, !0).id);
27560
27568
  },
27561
- specified: function(L) {
27562
- return L = I(L, A, !1, !0).id, hasProp(p, L) || hasProp(l, L);
27569
+ specified: function(V) {
27570
+ return V = I(V, A, !1, !0).id, hasProp(p, V) || hasProp(l, V);
27563
27571
  }
27564
- }), A || (z.undef = function(L) {
27572
+ }), A || (z.undef = function(V) {
27565
27573
  D();
27566
- var V = I(L, A, !0), G = getOwn(l, L);
27567
- G.undefed = !0, S(L), delete p[L], delete m[V.url], delete u[L], eachReverse(d, function(H, U) {
27568
- H[0] === L && d.splice(U, 1);
27569
- }), delete o.defQueueMap[L], G && (G.events.defined && (u[L] = G.events), B(L));
27574
+ var L = I(V, A, !0), G = getOwn(l, V);
27575
+ G.undefed = !0, S(V), delete p[V], delete m[L.url], delete u[V], eachReverse(d, function(H, U) {
27576
+ H[0] === V && d.splice(U, 1);
27577
+ }), delete o.defQueueMap[V], G && (G.events.defined && (u[V] = G.events), B(V));
27570
27578
  }), z;
27571
27579
  },
27572
27580
  /**
@@ -27586,7 +27594,7 @@ https://requirejs.org/docs/errors.html#` + e);
27586
27594
  * @param {String} moduleName the name of the module to potentially complete.
27587
27595
  */
27588
27596
  completeLoad: function(A) {
27589
- var E, z, L, V = getOwn(i.shim, A) || {}, G = V.exports;
27597
+ var E, z, V, L = getOwn(i.shim, A) || {}, G = L.exports;
27590
27598
  for (D(); d.length; ) {
27591
27599
  if (z = d.shift(), z[0] === null) {
27592
27600
  if (z[0] = A, E)
@@ -27596,7 +27604,7 @@ https://requirejs.org/docs/errors.html#` + e);
27596
27604
  z[0] === A && (E = !0);
27597
27605
  j(z);
27598
27606
  }
27599
- if (o.defQueueMap = {}, L = getOwn(l, A), !E && !hasProp(p, A) && L && !L.inited) {
27607
+ if (o.defQueueMap = {}, V = getOwn(l, A), !E && !hasProp(p, A) && V && !V.inited) {
27600
27608
  if (i.enforceDefine && (!G || !getGlobal(G)))
27601
27609
  return y(A) ? void 0 : T(makeError(
27602
27610
  "nodefine",
@@ -27604,7 +27612,7 @@ https://requirejs.org/docs/errors.html#` + e);
27604
27612
  null,
27605
27613
  [A]
27606
27614
  ));
27607
- j([A, V.deps || [], V.exportsFn]);
27615
+ j([A, L.deps || [], L.exportsFn]);
27608
27616
  }
27609
27617
  M();
27610
27618
  },
@@ -27616,18 +27624,18 @@ https://requirejs.org/docs/errors.html#` + e);
27616
27624
  * internal API, not a public one. Use toUrl for the public API.
27617
27625
  */
27618
27626
  nameToUrl: function(A, E, z) {
27619
- var L, V, G, H, U, K, Y, X = getOwn(i.pkgs, A);
27627
+ var V, L, G, H, U, K, Y, X = getOwn(i.pkgs, A);
27620
27628
  if (X && (A = X), Y = getOwn(h, A), Y)
27621
27629
  return o.nameToUrl(Y, E, z);
27622
27630
  if (req.jsExtRegExp.test(A))
27623
27631
  U = A + (E || "");
27624
27632
  else {
27625
- for (L = i.paths, V = A.split("/"), G = V.length; G > 0; G -= 1)
27626
- if (H = V.slice(0, G).join("/"), K = getOwn(L, H), K) {
27627
- isArray(K) && (K = K[0]), V.splice(0, G, K);
27633
+ for (V = i.paths, L = A.split("/"), G = L.length; G > 0; G -= 1)
27634
+ if (H = L.slice(0, G).join("/"), K = getOwn(V, H), K) {
27635
+ isArray(K) && (K = K[0]), L.splice(0, G, K);
27628
27636
  break;
27629
27637
  }
27630
- U = V.join("/"), U += E || (/^data\:|^blob\:|\?/.test(U) || z ? "" : ".js"), U = (U.charAt(0) === "/" || U.match(/^[\w\+\.\-]+:/) ? "" : i.baseUrl) + U;
27638
+ U = L.join("/"), U += E || (/^data\:|^blob\:|\?/.test(U) || z ? "" : ".js"), U = (U.charAt(0) === "/" || U.match(/^[\w\+\.\-]+:/) ? "" : i.baseUrl) + U;
27631
27639
  }
27632
27640
  return i.urlArgs && !/^blob\:/.test(U) ? U + i.urlArgs(A, U) : U;
27633
27641
  },
@@ -27643,8 +27651,8 @@ https://requirejs.org/docs/errors.html#` + e);
27643
27651
  *
27644
27652
  * @private
27645
27653
  */
27646
- execCb: function(A, E, z, L) {
27647
- return E.apply(L, z);
27654
+ execCb: function(A, E, z, V) {
27655
+ return E.apply(V, z);
27648
27656
  },
27649
27657
  /**
27650
27658
  * callback for script loads, used to check status of loading.
@@ -27666,10 +27674,10 @@ https://requirejs.org/docs/errors.html#` + e);
27666
27674
  var E = O(A);
27667
27675
  if (!y(E.id)) {
27668
27676
  var z = [];
27669
- return eachProp(l, function(L, V) {
27670
- V.indexOf("_@r") !== 0 && each(L.depMaps, function(G) {
27677
+ return eachProp(l, function(V, L) {
27678
+ L.indexOf("_@r") !== 0 && each(V.depMaps, function(G) {
27671
27679
  if (G.id === E.id)
27672
- return z.push(V), !0;
27680
+ return z.push(L), !0;
27673
27681
  });
27674
27682
  }), T(makeError("scripterror", 'Script error for "' + E.id + (z.length ? '", needed by: ' + z.join(", ") : '"'), A, [E.id]));
27675
27683
  }
@@ -29572,7 +29580,7 @@ const useCreateActionProps = () => {
29572
29580
  return {
29573
29581
  onClick() {
29574
29582
  return q(this, null, function* () {
29575
- var E, z, L, V, G, H;
29583
+ var E, z, V, L, G, H;
29576
29584
  const w = u.map((U) => U.name), {
29577
29585
  assignedValues: T = {},
29578
29586
  onSuccess: D,
@@ -29599,7 +29607,7 @@ const useCreateActionProps = () => {
29599
29607
  });
29600
29608
  if (j) {
29601
29609
  const U = p();
29602
- A[(L = U == null ? void 0 : U.name) != null ? L : "parent"] = f, A[(V = U == null ? void 0 : U.foreignKey) != null ? V : "parentId"] = f.id;
29610
+ A[(V = U == null ? void 0 : U.name) != null ? V : "parent"] = f, A[(L = U == null ? void 0 : U.foreignKey) != null ? L : "parentId"] = f.id;
29603
29611
  }
29604
29612
  c.data = t.data || {}, c.data.loading = !0;
29605
29613
  try {
@@ -29729,10 +29737,10 @@ const useCreateActionProps = () => {
29729
29737
  successMessage: B,
29730
29738
  actionAfterSuccess: N
29731
29739
  } = v || {}, M = {}, j = Object.keys(y).map((E) => q(this, null, function* () {
29732
- const z = y[E], L = g(E);
29740
+ const z = y[E], V = g(E);
29733
29741
  if (isVariable$1(z)) {
29734
- const { value: V } = (yield p == null ? void 0 : p.parseVariable(z, m)) || {};
29735
- M[E] = transformVariableValue(V, { targetCollectionField: L });
29742
+ const { value: L } = (yield p == null ? void 0 : p.parseVariable(z, m)) || {};
29743
+ M[E] = transformVariableValue(L, { targetCollectionField: V });
29736
29744
  } else
29737
29745
  z !== "" && (M[E] = z);
29738
29746
  }));
@@ -29743,7 +29751,7 @@ const useCreateActionProps = () => {
29743
29751
  filterByTk: r,
29744
29752
  values: x({}, M),
29745
29753
  // TODO(refactor): should change to inject by plugin
29746
- triggerWorkflows: F != null && F.length ? F.map((L) => [L.workflowKey, L.context].filter(Boolean).join("!")).join(",") : void 0
29754
+ triggerWorkflows: F != null && F.length ? F.map((V) => [V.workflowKey, V.context].filter(Boolean).join("!")).join(",") : void 0
29747
29755
  });
29748
29756
  let z = D;
29749
29757
  if (D && (z = yield getVariableValue(D, {
@@ -29781,13 +29789,13 @@ const useCreateActionProps = () => {
29781
29789
  updateMode: B
29782
29790
  } = (E = a == null ? void 0 : a["x-action-settings"]) != null ? E : {}, { manualClose: N, redirecting: M, redirectTo: j, successMessage: R, actionAfterSuccess: O } = D || {};
29783
29791
  m.data = e.data || {}, m.data.loading = !0;
29784
- const $ = {}, A = Object.keys(T).map((L) => q(this, null, function* () {
29785
- const V = T[L], G = C(L);
29786
- if (isVariable$1(V)) {
29787
- const { value: H } = (yield g == null ? void 0 : g.parseVariable(V, b)) || {};
29788
- $[L] = transformVariableValue(H, { targetCollectionField: G });
29792
+ const $ = {}, A = Object.keys(T).map((V) => q(this, null, function* () {
29793
+ const L = T[V], G = C(V);
29794
+ if (isVariable$1(L)) {
29795
+ const { value: H } = (yield g == null ? void 0 : g.parseVariable(L, b)) || {};
29796
+ $[V] = transformVariableValue(H, { targetCollectionField: G });
29789
29797
  } else
29790
- V !== "" && ($[L] = V);
29798
+ L !== "" && ($[V] = L);
29791
29799
  }));
29792
29800
  yield Promise.all(A), (O === "previous" || !O && M !== !0) && (S == null || S(!1)), h.confirm({
29793
29801
  title: p("Bulk update"),
@@ -29795,9 +29803,9 @@ const useCreateActionProps = () => {
29795
29803
  onOk() {
29796
29804
  return q(this, null, function* () {
29797
29805
  var G, H, U, K;
29798
- const { filter: L } = (H = (G = o.params) == null ? void 0 : G[0]) != null ? H : {}, V = {
29806
+ const { filter: V } = (H = (G = o.params) == null ? void 0 : G[0]) != null ? H : {}, L = {
29799
29807
  values: x({}, $),
29800
- filter: L,
29808
+ filter: V,
29801
29809
  forceUpdate: !1
29802
29810
  };
29803
29811
  if (B === "selected") {
@@ -29805,11 +29813,11 @@ const useCreateActionProps = () => {
29805
29813
  message.error(p("Please select the records to be updated")), m.data.loading = !1;
29806
29814
  return;
29807
29815
  }
29808
- V.filter = { $and: [{ [l || "id"]: { $in: c } }] };
29816
+ L.filter = { $and: [{ [l || "id"]: { $in: c } }] };
29809
29817
  }
29810
- V.filter || (V.forceUpdate = !0);
29818
+ L.filter || (L.forceUpdate = !0);
29811
29819
  try {
29812
- yield t.update(V);
29820
+ yield t.update(L);
29813
29821
  } catch (Y) {
29814
29822
  } finally {
29815
29823
  m.data.loading = !1;
@@ -29837,8 +29845,8 @@ const useCreateActionProps = () => {
29837
29845
  return {
29838
29846
  onClick() {
29839
29847
  return q(this, null, function* () {
29840
- var L, V, G, H;
29841
- const { skipValidator: F, onSuccess: w, requestSettings: T } = (L = o == null ? void 0 : o["x-action-settings"]) != null ? L : {}, { manualClose: D, redirecting: B, redirectTo: N, successMessage: M, actionAfterSuccess: j } = w || {}, R = o == null ? void 0 : o["x-action"];
29848
+ var V, L, G, H;
29849
+ const { skipValidator: F, onSuccess: w, requestSettings: T } = (V = o == null ? void 0 : o["x-action-settings"]) != null ? V : {}, { manualClose: D, redirecting: B, redirectTo: N, successMessage: M, actionAfterSuccess: j } = w || {}, R = o == null ? void 0 : o["x-action"];
29842
29850
  if (!T.url)
29843
29851
  return;
29844
29852
  F !== !0 && R === "customize:form:request" && (yield a.submit());
@@ -29864,7 +29872,7 @@ const useCreateActionProps = () => {
29864
29872
  };
29865
29873
  f.data = c.data || {}, f.data.loading = !0;
29866
29874
  try {
29867
- yield e.request(x({}, z)), f.data.loading = !1, u instanceof TableFieldResource || (G = (V = d == null ? void 0 : d.service) == null ? void 0 : V.refresh) == null || G.call(V), (H = p == null ? void 0 : p.refresh) == null || H.call(p), R === "customize:form:request" && (j === "previous" || !j && B !== !0) && (b == null || b(!1)), M || (message.success(C("Saved successfully")), yield resetFormCorrectly(a), (B && !j || j === "redirect") && N && (isURL(N) ? window.location.href = N : t(N))), D ? S.success({
29875
+ yield e.request(x({}, z)), f.data.loading = !1, u instanceof TableFieldResource || (G = (L = d == null ? void 0 : d.service) == null ? void 0 : L.refresh) == null || G.call(L), (H = p == null ? void 0 : p.refresh) == null || H.call(p), R === "customize:form:request" && (j === "previous" || !j && B !== !0) && (b == null || b(!1)), M || (message.success(C("Saved successfully")), yield resetFormCorrectly(a), (B && !j || j === "redirect") && N && (isURL(N) ? window.location.href = N : t(N))), D ? S.success({
29868
29876
  title: r(M),
29869
29877
  onOk: () => q(this, null, function* () {
29870
29878
  (B && !j || j === "redirect") && N && (isURL(N) ? window.location.href = N : t(N));
@@ -29881,14 +29889,14 @@ const useCreateActionProps = () => {
29881
29889
  return {
29882
29890
  onClick(I, F) {
29883
29891
  return q(this, null, function* () {
29884
- var V, G;
29892
+ var L, G;
29885
29893
  const {
29886
29894
  assignedValues: w = {},
29887
29895
  onSuccess: T,
29888
29896
  overwriteValues: D,
29889
29897
  skipValidator: B,
29890
29898
  triggerWorkflows: N
29891
- } = (V = l == null ? void 0 : l["x-action-settings"]) != null ? V : {}, {
29899
+ } = (L = l == null ? void 0 : l["x-action-settings"]) != null ? L : {}, {
29892
29900
  manualClose: M,
29893
29901
  redirecting: j,
29894
29902
  redirectTo: R,
@@ -29903,7 +29911,7 @@ const useCreateActionProps = () => {
29903
29911
  U !== "" && (A[H] = U);
29904
29912
  }));
29905
29913
  yield Promise.all(E), B || (yield e.submit());
29906
- const z = u.map((H) => H.name), L = getFormValues({
29914
+ const z = u.map((H) => H.name), V = getFormValues({
29907
29915
  filterByTk: t,
29908
29916
  field: n,
29909
29917
  form: e,
@@ -29916,7 +29924,7 @@ const useCreateActionProps = () => {
29916
29924
  try {
29917
29925
  const H = yield o.update(P(x({
29918
29926
  filterByTk: t,
29919
- values: x(x(x({}, L), D), A)
29927
+ values: x(x(x({}, V), D), A)
29920
29928
  }, C), {
29921
29929
  updateAssociationValues: g,
29922
29930
  // TODO(refactor): should change to inject by plugin
@@ -30276,25 +30284,25 @@ const useCreateActionProps = () => {
30276
30284
  var H, U, K, Y;
30277
30285
  if (!O.find((X) => X.uid === A.uid))
30278
30286
  return;
30279
- const z = `${$}${t.name}`, L = ((H = A.service.params) == null ? void 0 : H[0]) || {};
30287
+ const z = `${$}${t.name}`, V = ((H = A.service.params) == null ? void 0 : H[0]) || {};
30280
30288
  (K = (U = A.service.params) == null ? void 0 : U[1]) != null && K.filters || _.set(A.service.params, "[1].filters", {});
30281
- const V = A.service.params[1].filters;
30289
+ const L = A.service.params[1].filters;
30282
30290
  if (R.length)
30283
- V[z] = {
30291
+ L[z] = {
30284
30292
  [S]: R
30285
30293
  };
30286
30294
  else {
30287
30295
  if ((Y = A.clearSelection) == null || Y.call(A), A.dataLoadingMode === "manual")
30288
30296
  return A.clearData();
30289
- delete V[z];
30297
+ delete L[z];
30290
30298
  }
30291
- const G = mergeFilter([...Object.values(V), A.defaultFilter]);
30299
+ const G = mergeFilter([...Object.values(L), A.defaultFilter]);
30292
30300
  return A.doFilter(
30293
- P(x({}, L), {
30301
+ P(x({}, V), {
30294
30302
  page: 1,
30295
30303
  filter: G
30296
30304
  }),
30297
- { filters: V }
30305
+ { filters: L }
30298
30306
  );
30299
30307
  });
30300
30308
  },
@@ -32007,13 +32015,15 @@ const formItemWrapCss = css`
32007
32015
  }
32008
32016
  `, FormItem = withDynamicSchemaProps(
32009
32017
  observer$1((e) => {
32010
- var u, d, p;
32018
+ var d, p, m, h;
32011
32019
  useEnsureOperatorsValid();
32012
32020
  const t = useField(), n = useFieldSchema(), { addActiveFieldName: o } = useFormActiveFields() || {}, { wrapperStyle: r } = useDataFormItemProps(), { t: a } = useTranslation();
32013
- useParseDefaultValue(), useLazyLoadDisplayAssociationFieldsOfForm(), useLinkageRulesForSubTableOrSubForm(), useEffect(() => {
32021
+ useParseDefaultValue(), useLazyLoadDisplayAssociationFieldsOfForm(), useLinkageRulesForSubTableOrSubForm();
32022
+ const { isInSubTable: i } = useFlag();
32023
+ useEffect(() => {
32014
32024
  o == null || o(n.name);
32015
32025
  }, [o, n.name]), t.title = t.title && a(t.title, { ns: NAMESPACE_UI_SCHEMA });
32016
- const i = (d = (u = n["x-decorator-props"]) == null ? void 0 : u.showTitle) != null ? d : !0, l = useMemo(() => {
32026
+ const l = (p = (d = n["x-decorator-props"]) == null ? void 0 : d.showTitle) != null ? p : !0, c = useMemo(() => {
32017
32027
  if (t.description && t.description !== "")
32018
32028
  return typeof t.description == "string" ? /* @__PURE__ */ jsx(
32019
32029
  "div",
@@ -32024,27 +32034,41 @@ const formItemWrapCss = css`
32024
32034
  }
32025
32035
  }
32026
32036
  ) : t.description;
32027
- }, [t.description]), c = useMemo(() => cx(formItemWrapCss, {
32028
- [formItemLabelCss]: i === !1
32029
- }), [i]);
32030
- return (p = t.data) != null && p.hidden ? null : /* @__PURE__ */ jsx(VariableScope, { scopeId: n == null ? void 0 : n["x-uid"], type: "formItem", children: /* @__PURE__ */ jsx(CollectionFieldProvider, { allowNull: !0, children: /* @__PURE__ */ jsx(
32037
+ }, [t.description]), u = useMemo(() => cx(formItemWrapCss, {
32038
+ [formItemLabelCss]: l === !1
32039
+ }), [l]);
32040
+ return (m = t.data) != null && m.hidden ? null : /* @__PURE__ */ jsx(VariableScope, { scopeId: n == null ? void 0 : n["x-uid"], type: "formItem", children: /* @__PURE__ */ jsx(CollectionFieldProvider, { allowNull: !0, children: /* @__PURE__ */ jsx(
32031
32041
  BlockItem,
32032
32042
  {
32033
32043
  className: cx(
32034
32044
  "nb-form-item",
32035
32045
  css`
32036
32046
  .ant-formily-item-layout-horizontal .ant-formily-item-control {
32037
- max-width: ${i === !1 || n["x-component"] !== "CollectionField" ? "100% !important" : null};
32047
+ max-width: ${l === !1 || n["x-component"] !== "CollectionField" ? "100% !important" : null};
32038
32048
  }
32039
32049
  `
32040
32050
  ),
32041
32051
  children: /* @__PURE__ */ jsx(ACLCollectionFieldProvider, { children: /* @__PURE__ */ jsx(
32042
32052
  FormItem$1,
32043
32053
  P(x({
32044
- className: c
32054
+ className: u
32045
32055
  }, e), {
32046
- extra: l,
32047
- wrapperStyle: x(x({}, r.backgroundColor ? { paddingLeft: "5px", paddingRight: "5px" } : {}), r)
32056
+ extra: c,
32057
+ wrapperStyle: x(x({}, r.backgroundColor ? { paddingLeft: "5px", paddingRight: "5px" } : {}), r),
32058
+ feedbackText: i && ((h = t.errors) != null && h.length) ? /* @__PURE__ */ jsx(
32059
+ EllipsisWithTooltip,
32060
+ {
32061
+ ellipsis: !0,
32062
+ style: {
32063
+ color: "red",
32064
+ maxWidth: 300,
32065
+ whiteSpace: "normal",
32066
+ wordBreak: "break-word",
32067
+ width: "100%"
32068
+ },
32069
+ children: /* @__PURE__ */ jsx("div", { style: { cursor: "pointer" }, children: t.errors.map((g) => g.messages).join(", ") })
32070
+ }
32071
+ ) : null
32048
32072
  })
32049
32073
  ) })
32050
32074
  }
@@ -38049,10 +38073,10 @@ const enabledIndexColumn$1 = {
38049
38073
  name: "fieldSettings:component:CascadeSelect",
38050
38074
  items: [fieldComponent$6, titleField$1, ellipsisSettingsItem, setTheDataScope]
38051
38075
  }), SchemaSettingsDateRange = function e(t) {
38052
- var w, T, D, B, N, M, j, R, O, $, A, E, z, L, V, G;
38076
+ var w, T, D, B, N, M, j, R, O, $, A, E, z, V, L, G;
38053
38077
  const { fieldSchema: n } = t, o = useField(), { dn: r } = useDesignable(), { t: a } = useTranslation(), { getCollectionJoinField: i } = useCollectionManager_deprecated(), { isInSubForm: l, isInSubTable: c } = useFlag() || {}, u = i(n == null ? void 0 : n["x-collection-field"]) || {}, d = ((w = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : w.showTime) || ((D = (T = u == null ? void 0 : u.uiSchema) == null ? void 0 : T["x-component-props"]) == null ? void 0 : D.showTime) || !1, p = ((B = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : B.dateFormat) || ((M = (N = u == null ? void 0 : u.uiSchema) == null ? void 0 : N["x-component-props"]) == null ? void 0 : M.dateFormat) || "YYYY-MM-DD", m = ((j = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : j.timeFormat) || ((O = (R = u == null ? void 0 : u.uiSchema) == null ? void 0 : R["x-component-props"]) == null ? void 0 : O.timeFormat) || "HH:mm:ss", h = (($ = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : $.picker) || ((E = (A = u == null ? void 0 : u.uiSchema) == null ? void 0 : A["x-component-props"]) == null ? void 0 : E.picker) || "date";
38054
38078
  n["x-read-pretty"] || o.readOnly || o.readPretty;
38055
- const g = (z = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : z._minDate, f = (L = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : L._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, S = useRecord(), { form: y } = useFormBlockContext(), v = useCallback(
38079
+ const g = (z = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : z._minDate, f = (V = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : V._maxDate, C = ((L = u == null ? void 0 : u.uiSchema) == null ? void 0 : L["x-component-props"].gmt) || !1, b = ((G = u == null ? void 0 : u.uiSchema) == null ? void 0 : G["x-component-props"].utc) || !1, S = useRecord(), { form: y } = useFormBlockContext(), v = useCallback(
38056
38080
  (H) => /* @__PURE__ */ jsx(
38057
38081
  SchemaComponent,
38058
38082
  {
@@ -39549,11 +39573,11 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
39549
39573
  };
39550
39574
  if (_.isFunction(F))
39551
39575
  break;
39552
- const A = y[$], E = y.slice(0, $ + 1).join("."), { fieldPath: z } = getFieldPath$1(E, I), L = r(z, T), V = (O = a(B, T)) == null ? void 0 : O.getPrimaryKey();
39576
+ const A = y[$], E = y.slice(0, $ + 1).join("."), { fieldPath: z } = getFieldPath$1(E, I), V = r(z, T), L = (O = a(B, T)) == null ? void 0 : O.getPrimaryKey();
39553
39577
  if (Array.isArray(F)) {
39554
39578
  const G = F.map((H) => {
39555
- if (!(S != null && S.doNotRequest) && shouldToRequest(H == null ? void 0 : H[A], H, E) && (H == null ? void 0 : H[V]) != null && L != null && L.target) {
39556
- const U = `/${B}/${H[L.sourceKey || V]}/${A}:${getAction(L.type)}`;
39579
+ if (!(S != null && S.doNotRequest) && shouldToRequest(H == null ? void 0 : H[A], H, E) && (H == null ? void 0 : H[L]) != null && V != null && V.target) {
39580
+ const U = `/${B}/${H[V.sourceKey || L]}/${A}:${getAction(V.type)}`;
39557
39581
  if (hasRequested(U))
39558
39582
  return getRequested(U);
39559
39583
  const K = o.request({
@@ -39567,9 +39591,9 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
39567
39591
  }
39568
39592
  return H == null ? void 0 : H[A];
39569
39593
  });
39570
- F = removeThroughCollectionFields(_.flatten(yield Promise.all(G)), L);
39571
- } else if (!(S != null && S.doNotRequest) && shouldToRequest(F[A], F, E) && F[V] != null && (L != null && L.target)) {
39572
- const G = `/${B}/${F[L.sourceKey || V]}/${A}:${getAction(L.type)}`;
39594
+ F = removeThroughCollectionFields(_.flatten(yield Promise.all(G)), V);
39595
+ } else if (!(S != null && S.doNotRequest) && shouldToRequest(F[A], F, E) && F[L] != null && (V != null && V.target)) {
39596
+ const G = `/${B}/${F[V.sourceKey || L]}/${A}:${getAction(V.type)}`;
39573
39597
  let H = null;
39574
39598
  if (hasRequested(G))
39575
39599
  H = yield getRequested(G);
@@ -39584,10 +39608,10 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
39584
39608
  stashRequested(G, K), H = yield K, clearRequested(G);
39585
39609
  }
39586
39610
  const U = H.data.data;
39587
- F = removeThroughCollectionFields(U, L);
39611
+ F = removeThroughCollectionFields(U, V);
39588
39612
  } else
39589
- F = removeThroughCollectionFields(getValuesByPath(F, A), L);
39590
- L != null && L.target && (B = L.target);
39613
+ F = removeThroughCollectionFields(getValuesByPath(F, A), V);
39614
+ V != null && V.target && (B = V.target);
39591
39615
  }
39592
39616
  const j = i(
39593
39617
  _.isFunction(F) ? yield F({
@@ -40179,31 +40203,31 @@ const ActionLink = withDynamicSchemaProps(
40179
40203
  ]), v = useDesigner(), I = useField(), F = useFieldSchema(), w = useCompile(), T = useCollectionRecordData(), D = w((Y = F["x-component-props"]) == null ? void 0 : Y.confirm) || g, B = useMemo(
40180
40204
  () => {
40181
40205
  var X;
40182
- return ((X = F == null ? void 0 : F["x-linkage-rules"]) == null ? void 0 : X.filter((Q) => !Q.disabled)) || [];
40206
+ return ((X = F == null ? void 0 : F["x-linkage-rules"]) == null ? void 0 : X.filter((J) => !J.disabled)) || [];
40183
40207
  },
40184
40208
  [F == null ? void 0 : F["x-linkage-rules"]]
40185
- ), { designable: N } = useDesignable(), M = useComponent(o) || o, j = useVariables$1(), R = useLocalVariables$1(), { visibleWithURL: O, setVisibleWithURL: $ } = usePopupUtils(), { setSubmitted: A } = useActionContext(), { getAriaLabel: E } = useGetAriaLabelOfAction(l), z = useCollectionParentRecordData(), L = useApp(), { getAllDataBlocks: V } = useAllDataBlocks(), G = useForm();
40209
+ ), { designable: N } = useDesignable(), M = useComponent(o) || o, j = useVariables$1(), R = useLocalVariables$1(), { visibleWithURL: O, setVisibleWithURL: $ } = usePopupUtils(), { setSubmitted: A } = useActionContext(), { getAriaLabel: E } = useGetAriaLabelOfAction(l), z = useCollectionParentRecordData(), V = useApp(), { getAllDataBlocks: L } = useAllDataBlocks(), G = useForm();
40186
40210
  useEffect(() => {
40187
40211
  I.stateOfLinkageRules && setInitialActionState(I);
40188
- const X = uid(), Q = [];
40212
+ const X = uid(), J = [];
40189
40213
  return setTimeout(() => {
40190
40214
  G.addEffects(X, () => {
40191
- forEachLinkageRule(B, (ee, J) => {
40192
- Q.push(
40215
+ forEachLinkageRule(B, (Z, Q) => {
40216
+ J.push(
40193
40217
  reaction(
40194
- () => [getVariableValuesInCondition({ linkageRules: B, localVariables: R })].map((re) => JSON.stringify(re)).join(","),
40218
+ () => [getVariableValuesInCondition({ linkageRules: B, localVariables: R })].map((se) => JSON.stringify(se)).join(","),
40195
40219
  () => {
40196
40220
  I.stateOfLinkageRules = {}, linkageAction(
40197
40221
  {
40198
- operator: ee.operator,
40222
+ operator: Z.operator,
40199
40223
  field: I,
40200
- condition: J.condition,
40224
+ condition: Q.condition,
40201
40225
  variables: j,
40202
40226
  localVariables: R,
40203
- conditionType: J.conditionType,
40227
+ conditionType: Q.conditionType,
40204
40228
  variableNameOfLeftCondition: "$nRecord"
40205
40229
  },
40206
- L.jsonLogic
40230
+ V.jsonLogic
40207
40231
  );
40208
40232
  },
40209
40233
  { fireImmediately: !0, equals: isEqual }
@@ -40212,8 +40236,8 @@ const ActionLink = withDynamicSchemaProps(
40212
40236
  });
40213
40237
  });
40214
40238
  }), () => {
40215
- G.removeEffects(X), Q.forEach((ee) => {
40216
- ee();
40239
+ G.removeEffects(X), J.forEach((Z) => {
40240
+ Z();
40217
40241
  });
40218
40242
  };
40219
40243
  }, [B, T]);
@@ -40222,20 +40246,20 @@ const ActionLink = withDynamicSchemaProps(
40222
40246
  C == null || C(X);
40223
40247
  },
40224
40248
  [C]
40225
- ), U = useMemo(() => c && ((X, Q) => q(void 0, null, function* () {
40226
- var J, Z;
40227
- yield c == null ? void 0 : c(X, Q);
40228
- const ee = ((Z = (J = F["x-action-settings"]) == null ? void 0 : J.onSuccess) == null ? void 0 : Z.blocksToRefresh) || [];
40229
- ee.length > 0 && V().forEach((te) => {
40230
- var re;
40231
- if (ee.includes(te.uid))
40249
+ ), U = useMemo(() => c && ((X, J) => q(void 0, null, function* () {
40250
+ var Q, ne;
40251
+ yield c == null ? void 0 : c(X, J);
40252
+ const Z = ((ne = (Q = F["x-action-settings"]) == null ? void 0 : Q.onSuccess) == null ? void 0 : ne.blocksToRefresh) || [];
40253
+ Z.length > 0 && L().forEach((te) => {
40254
+ var se;
40255
+ if (Z.includes(te.uid))
40232
40256
  try {
40233
- (re = te.service) == null || re.refresh();
40234
- } catch (se) {
40235
- console.error("Failed to refresh block:", te.uid, se);
40257
+ (se = te.service) == null || se.refresh();
40258
+ } catch (ce) {
40259
+ console.error("Failed to refresh block:", te.uid, ce);
40236
40260
  }
40237
40261
  });
40238
- })), [c, F, V]);
40262
+ })), [c, F, L]);
40239
40263
  return /* @__PURE__ */ jsx(VariableScope, { scopeId: F == null ? void 0 : F["x-uid"], type: "action", children: /* @__PURE__ */ jsx(
40240
40264
  InternalAction,
40241
40265
  x({
@@ -40271,8 +40295,8 @@ const ActionLink = withDynamicSchemaProps(
40271
40295
  }),
40272
40296
  { displayName: "Action" }
40273
40297
  ), InternalAction = observer$1(function e(t) {
40274
- var xe, Ce, he, fe, ge;
40275
- const me = t, {
40298
+ var pe, ue, ge, he, Ce;
40299
+ const de = t, {
40276
40300
  containerRefKey: n,
40277
40301
  fieldSchema: o,
40278
40302
  designable: r,
@@ -40300,7 +40324,7 @@ const ActionLink = withDynamicSchemaProps(
40300
40324
  setSubmitted: B,
40301
40325
  getAriaLabel: N,
40302
40326
  parentRecordData: M
40303
- } = me, j = W(me, [
40327
+ } = de, j = W(de, [
40304
40328
  "containerRefKey",
40305
40329
  "fieldSchema",
40306
40330
  "designable",
@@ -40328,28 +40352,28 @@ const ActionLink = withDynamicSchemaProps(
40328
40352
  "setSubmitted",
40329
40353
  "getAriaLabel",
40330
40354
  "parentRecordData"
40331
- ]), [R, O] = useState(!1), { wrapSSR: $, componentCls: A, hashId: E } = useStyles$8(), [z, L] = useState(!1), V = o["x-toolbar-props"] || o["x-designer-props"], G = (xe = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : xe.openMode, H = (Ce = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : Ce.openSize, U = (he = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : he.refreshDataBlockRequest, { modal: K } = App.useApp(), Y = useForm(), X = useACLActionParamsContext(), {
40332
- run: Q,
40333
- element: ee,
40334
- disabled: J,
40335
- loading: Z
40336
- } = (F == null ? void 0 : F(w)) || {}, te = Y.disabled || a.disabled || ((fe = a.data) == null ? void 0 : fe.disabled) || I || J, re = useMemo(() => {
40337
- var pe;
40355
+ ]), [R, O] = useState(!1), { wrapSSR: $, componentCls: A, hashId: E } = useStyles$8(), [z, V] = useState(!1), L = o["x-toolbar-props"] || o["x-designer-props"], G = (pe = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : pe.openMode, H = (ue = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : ue.openSize, U = (ge = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : ge.refreshDataBlockRequest, { modal: K } = App.useApp(), Y = useForm(), X = useACLActionParamsContext(), {
40356
+ run: J,
40357
+ element: Z,
40358
+ disabled: Q,
40359
+ loading: ne
40360
+ } = (F == null ? void 0 : F(w)) || {}, te = Y.disabled || a.disabled || ((he = a.data) == null ? void 0 : he.disabled) || I || Q, se = useMemo(() => {
40361
+ var fe;
40338
40362
  return P(x({}, v), {
40339
- opacity: r && (((pe = a == null ? void 0 : a.data) == null ? void 0 : pe.hidden) || !X) && 0.1,
40363
+ opacity: r && (((fe = a == null ? void 0 : a.data) == null ? void 0 : fe.hidden) || !X) && 0.1,
40340
40364
  color: te ? "rgba(0, 0, 0, 0.25)" : v == null ? void 0 : v.color
40341
40365
  });
40342
- }, [X, r, (ge = a == null ? void 0 : a.data) == null ? void 0 : ge.hidden, v, te]), se = {
40366
+ }, [X, r, (Ce = a == null ? void 0 : a.data) == null ? void 0 : Ce.hidden, v, te]), ce = {
40343
40367
  designable: r,
40344
40368
  field: a,
40345
40369
  aclCtx: X,
40346
40370
  icon: i,
40347
- loading: typeof Z == "boolean" ? Z : l,
40371
+ loading: typeof ne == "boolean" ? ne : l,
40348
40372
  disabled: te,
40349
- buttonStyle: re,
40373
+ buttonStyle: se,
40350
40374
  handleMouseEnter: c,
40351
40375
  tarComponent: u,
40352
- designerProps: V,
40376
+ designerProps: L,
40353
40377
  componentCls: A,
40354
40378
  hashId: E,
40355
40379
  className: d,
@@ -40361,26 +40385,26 @@ const ActionLink = withDynamicSchemaProps(
40361
40385
  refreshDataBlockRequest: U,
40362
40386
  fieldSchema: o,
40363
40387
  setVisible: O,
40364
- run: Q,
40388
+ run: J,
40365
40389
  confirm: g,
40366
40390
  modal: K,
40367
40391
  setSubmitted: B,
40368
40392
  confirmTitle: f,
40369
40393
  title: y
40370
- }, ue = useCallback(
40371
- (pe) => {
40372
- O == null || O(pe), D == null || D(pe);
40394
+ }, ie = useCallback(
40395
+ (fe) => {
40396
+ O == null || O(fe), D == null || D(fe);
40373
40397
  },
40374
40398
  [D]
40375
40399
  );
40376
- let le = /* @__PURE__ */ jsx(PopupVisibleProvider, { visible: !1, children: /* @__PURE__ */ jsxs(
40400
+ let re = /* @__PURE__ */ jsx(PopupVisibleProvider, { visible: !1, children: /* @__PURE__ */ jsxs(
40377
40401
  ActionContextProvider,
40378
40402
  {
40379
- button: RenderButton(se),
40403
+ button: RenderButton(ce),
40380
40404
  visible: R || T,
40381
- setVisible: ue,
40405
+ setVisible: ie,
40382
40406
  formValueChanged: z,
40383
- setFormValueChanged: L,
40407
+ setFormValueChanged: V,
40384
40408
  openMode: G,
40385
40409
  openSize: H,
40386
40410
  containerRefKey: n,
@@ -40388,13 +40412,13 @@ const ActionLink = withDynamicSchemaProps(
40388
40412
  setSubmitted: B,
40389
40413
  children: [
40390
40414
  C && /* @__PURE__ */ jsx(NocoBaseRecursionField, { basePath: a.address, onlyRenderProperties: !0, schema: o }),
40391
- !C && /* @__PURE__ */ jsx(RenderButton, x({}, se)),
40415
+ !C && /* @__PURE__ */ jsx(RenderButton, x({}, ce)),
40392
40416
  /* @__PURE__ */ jsx(VariablePopupRecordProvider, { children: !C && t.children }),
40393
- ee
40417
+ Z
40394
40418
  ]
40395
40419
  }
40396
40420
  ) });
40397
- return isBulkEditAction(o) && (le = /* @__PURE__ */ jsx(TabsContextProvider, { children: le })), $(b ? /* @__PURE__ */ jsx(TreeRecordProvider, { parent: S, children: le }) : le);
40421
+ return isBulkEditAction(o) && (re = /* @__PURE__ */ jsx(TabsContextProvider, { children: re })), $(b ? /* @__PURE__ */ jsx(TreeRecordProvider, { parent: S, children: re }) : re);
40398
40422
  });
40399
40423
  InternalAction.displayName = "InternalAction";
40400
40424
  Action.Popover = function e(t) {
@@ -40470,21 +40494,21 @@ const RenderButton = ({
40470
40494
  }) => {
40471
40495
  const { getDataBlockRequest: N } = useDataBlockRequestGetter(), { t: M } = useTranslation(), { isPopupVisibleControlledByURL: j } = usePopupSettings(), { openPopup: R } = usePopupUtils(), O = useVariables$1(), $ = useLocalVariables$1(), A = useRef(null), E = useCompile(), z = useForm();
40472
40496
  A.current = R;
40473
- const L = {
40497
+ const V = {
40474
40498
  variables: O,
40475
40499
  localVariables: $
40476
- }, V = useCallback(
40500
+ }, L = useCallback(
40477
40501
  (G, H = !0) => q(void 0, null, function* () {
40478
40502
  var Y;
40479
40503
  if (H && isPortalInBody(G.target))
40480
40504
  return;
40481
40505
  G.preventDefault(), G.stopPropagation();
40482
- const U = yield getVariableValue(M(F == null ? void 0 : F.title, { title: E(y.title) }), L), K = yield getVariableValue(M(F == null ? void 0 : F.content, { title: E(y.title) }), L);
40506
+ const U = yield getVariableValue(M(F == null ? void 0 : F.title, { title: E(y.title) }), V), K = yield getVariableValue(M(F == null ? void 0 : F.content, { title: E(y.title) }), V);
40483
40507
  if (!a && n) {
40484
40508
  const X = () => {
40485
40509
  b ? b(G, () => {
40486
- var Q, ee;
40487
- S !== !1 && (T == null || T(!0), (ee = (Q = N()) == null ? void 0 : Q.refresh) == null || ee.call(Q));
40510
+ var J, Z;
40511
+ S !== !1 && (T == null || T(!0), (Z = (J = N()) == null ? void 0 : J.refresh) == null || Z.call(J));
40488
40512
  }) : isBulkEditAction(y) || !j() ? (v(!0), I == null || I()) : ["view", "update", "create", "customize:popup"].includes(y["x-action"]) && y["x-uid"] ? A.current() : (v(!0), I == null || I());
40489
40513
  };
40490
40514
  (F == null ? void 0 : F.enable) !== !1 && (F != null && F.content) ? (yield (Y = z == null ? void 0 : z.submit) == null ? void 0 : Y.call(z), w.confirm({
@@ -40527,7 +40551,7 @@ const RenderButton = ({
40527
40551
  buttonStyle: i,
40528
40552
  handleMouseEnter: l,
40529
40553
  getAriaLabel: g,
40530
- handleButtonClick: V,
40554
+ handleButtonClick: L,
40531
40555
  tarComponent: c,
40532
40556
  componentCls: d,
40533
40557
  hashId: p,
@@ -40587,8 +40611,8 @@ const RenderButtonInner = observer$1(
40587
40611
  "onlyIcon"
40588
40612
  ]), { t: F } = useTranslation(), w = useCallback(
40589
40613
  debounce$1(
40590
- (z, L = !0) => {
40591
- d(z, L);
40614
+ (z, V = !0) => {
40615
+ d(z, V);
40592
40616
  },
40593
40617
  300,
40594
40618
  { leading: !0, trailing: !1 }
@@ -40601,9 +40625,9 @@ const RenderButtonInner = observer$1(
40601
40625
  const T = useMemo(
40602
40626
  () => React.forwardRef(
40603
40627
  (K, U) => {
40604
- var Y = K, { component: z = p || Button, icon: L, onlyIcon: V, children: G } = Y, H = W(Y, ["component", "icon", "onlyIcon", "children"]);
40628
+ var Y = K, { component: z = p || Button, icon: V, onlyIcon: L, children: G } = Y, H = W(Y, ["component", "icon", "onlyIcon", "children"]);
40605
40629
  return /* @__PURE__ */ jsxs(z, P(x({ ref: U }, H), { children: [
40606
- v ? /* @__PURE__ */ jsx(Tooltip, { title: H.title, children: /* @__PURE__ */ jsx("span", { style: { padding: 3 }, children: L && typeof L == "string" ? /* @__PURE__ */ jsx(Icon, { type: L }) : L }) }) : /* @__PURE__ */ jsx("span", { style: { paddingRight: 3 }, children: L && typeof L == "string" ? /* @__PURE__ */ jsx(Icon, { type: L }) : L }),
40630
+ v ? /* @__PURE__ */ jsx(Tooltip, { title: H.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 }),
40607
40631
  v ? G[1] : G
40608
40632
  ] }));
40609
40633
  }
@@ -40957,7 +40981,54 @@ const ReadPrettyInternal = observer$1(
40957
40981
  })
40958
40982
  )
40959
40983
  ),
40960
- maxTagCount: "responsive"
40984
+ maxTagCount: "responsive",
40985
+ maxTagPlaceholder: (g) => /* @__PURE__ */ jsxs(
40986
+ Tooltip,
40987
+ {
40988
+ title: /* @__PURE__ */ jsx(
40989
+ "div",
40990
+ {
40991
+ style: {
40992
+ display: "flex",
40993
+ flexWrap: "wrap",
40994
+ gap: 6,
40995
+ maxWidth: "100%"
40996
+ },
40997
+ children: g.map((f) => /* @__PURE__ */ jsx(
40998
+ Tag,
40999
+ {
41000
+ style: {
41001
+ margin: 0,
41002
+ background: "#fafafa",
41003
+ border: "1px solid #d9d9d9",
41004
+ whiteSpace: "normal",
41005
+ wordBreak: "break-word",
41006
+ maxWidth: "100%"
41007
+ },
41008
+ children: f.label
41009
+ },
41010
+ f.value
41011
+ ))
41012
+ }
41013
+ ),
41014
+ overlayInnerStyle: {
41015
+ background: "#fff",
41016
+ color: "#000",
41017
+ padding: 8,
41018
+ maxWidth: "100%"
41019
+ },
41020
+ color: "#fff",
41021
+ overlayStyle: {
41022
+ pointerEvents: "auto",
41023
+ maxWidth: 300
41024
+ },
41025
+ children: [
41026
+ "+",
41027
+ g.length,
41028
+ "..."
41029
+ ]
41030
+ }
41031
+ )
40961
41032
  }, u)
40962
41033
  );
40963
41034
  }, filterOption = (e, t) => {
@@ -41022,7 +41093,54 @@ const ReadPrettyInternal = observer$1(
41022
41093
  (g = e.onChange) == null || g.call(e, h === void 0 ? null : h);
41023
41094
  },
41024
41095
  mode: d,
41025
- maxTagCount: "responsive"
41096
+ maxTagCount: "responsive",
41097
+ maxTagPlaceholder: (h) => /* @__PURE__ */ jsxs(
41098
+ Tooltip,
41099
+ {
41100
+ title: /* @__PURE__ */ jsx(
41101
+ "div",
41102
+ {
41103
+ style: {
41104
+ display: "flex",
41105
+ flexWrap: "wrap",
41106
+ gap: 6,
41107
+ maxWidth: "100%"
41108
+ },
41109
+ children: h.map((g) => /* @__PURE__ */ jsx(
41110
+ Tag,
41111
+ {
41112
+ style: {
41113
+ margin: 0,
41114
+ background: "#fafafa",
41115
+ border: "1px solid #d9d9d9",
41116
+ whiteSpace: "normal",
41117
+ wordBreak: "break-word",
41118
+ maxWidth: "100%"
41119
+ },
41120
+ children: g.label
41121
+ },
41122
+ g.value
41123
+ ))
41124
+ }
41125
+ ),
41126
+ overlayInnerStyle: {
41127
+ background: "#fff",
41128
+ color: "#000",
41129
+ padding: 8,
41130
+ maxWidth: "100%"
41131
+ },
41132
+ color: "#fff",
41133
+ overlayStyle: {
41134
+ pointerEvents: "auto",
41135
+ maxWidth: 300
41136
+ },
41137
+ children: [
41138
+ "+",
41139
+ h.length,
41140
+ "..."
41141
+ ]
41142
+ }
41143
+ )
41026
41144
  })
41027
41145
  );
41028
41146
  },
@@ -41072,7 +41190,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
41072
41190
  ), EMPTY$1 = "N/A", InternalRemoteSelect = withDynamicSchemaProps(
41073
41191
  connect(
41074
41192
  (e) => {
41075
- var Q, ee;
41193
+ var J, Z;
41076
41194
  const X = e, {
41077
41195
  fieldNames: t = {},
41078
41196
  service: n = {},
@@ -41086,7 +41204,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
41086
41204
  CustomDropdownRender: d,
41087
41205
  optionFilter: p,
41088
41206
  dataSource: m,
41089
- toOptionsItem: h = (J) => J,
41207
+ toOptionsItem: h = (Q) => Q,
41090
41208
  popupMatchSelectWidth: g = !1,
41091
41209
  onSuccess: f
41092
41210
  } = X, C = W(X, [
@@ -41105,39 +41223,39 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
41105
41223
  "toOptionsItem",
41106
41224
  "popupMatchSelectWidth",
41107
41225
  "onSuccess"
41108
- ]), b = useDataSourceKey(), S = useDataSourceHeaders(m || b), y = useRef(!1), v = useFieldSchema(), I = ((Q = v["x-component-props"]) == null ? void 0 : Q.addMode) === "quickAdd", { getField: F } = useCollection_deprecated(), w = useRef(null), { getCollectionJoinField: T, getInterface: D } = useCollectionManager_deprecated(), B = v["x-collection-field"] || v.name, N = F(B) || T(B), M = u || (N == null ? void 0 : N.target) && (t == null ? void 0 : t.label) && T(`${N.target}.${t.label}`), j = useMemo(() => {
41109
- var J;
41226
+ ]), b = useDataSourceKey(), S = useDataSourceHeaders(m || b), y = useRef(!1), v = useFieldSchema(), I = ((J = v["x-component-props"]) == null ? void 0 : J.addMode) === "quickAdd", { getField: F } = useCollection_deprecated(), w = useRef(null), { getCollectionJoinField: T, getInterface: D } = useCollectionManager_deprecated(), B = v["x-collection-field"] || v.name, N = F(B) || T(B), M = u || (N == null ? void 0 : N.target) && (t == null ? void 0 : t.label) && T(`${N.target}.${t.label}`), j = useMemo(() => {
41227
+ var Q;
41110
41228
  if (M != null && M.interface) {
41111
- const Z = D(M.interface), te = ((J = Z == null ? void 0 : Z.filterable) == null ? void 0 : J.operators[0].value) || "$includes";
41229
+ const ne = D(M.interface), te = ((Q = ne == null ? void 0 : ne.filterable) == null ? void 0 : Q.operators[0].value) || "$includes";
41112
41230
  return M.type === "string" || M.dataType === "string" ? "$includes" : te;
41113
41231
  }
41114
41232
  return "$includes";
41115
41233
  }, [M]), R = useCompile(), O = useCallback(
41116
- (J) => {
41234
+ (Q) => {
41117
41235
  try {
41118
- return J.filter((Z) => ["number", "string"].includes(typeof Z[t.value]) || !Z[t.value]).map((Z) => {
41119
- var re;
41120
- let te = R(Z[t.label]);
41121
- if ((re = M == null ? void 0 : M.uiSchema) != null && re.enum)
41236
+ return Q.filter((ne) => ["number", "string"].includes(typeof ne[t.value]) || !ne[t.value]).map((ne) => {
41237
+ var se;
41238
+ let te = R(ne[t.label]);
41239
+ if ((se = M == null ? void 0 : M.uiSchema) != null && se.enum)
41122
41240
  if (Array.isArray(te))
41123
- te = te.map((se, ue) => {
41124
- const le = M.uiSchema.enum.find((me) => me.value === se);
41125
- return le ? /* @__PURE__ */ jsx(Tag, { role: "button", color: le.color, style: { marginRight: 3 }, children: (le == null ? void 0 : le.label) || se }, ue) : /* @__PURE__ */ jsx(Tag, { role: "button", children: se }, se);
41241
+ te = te.map((ce, ie) => {
41242
+ const re = M.uiSchema.enum.find((de) => de.value === ce);
41243
+ return re ? /* @__PURE__ */ jsx(Tag, { role: "button", color: re.color, style: { marginRight: 3 }, children: (re == null ? void 0 : re.label) || ce }, ie) : /* @__PURE__ */ jsx(Tag, { role: "button", children: ce }, ce);
41126
41244
  }).reverse();
41127
41245
  else {
41128
- const se = M.uiSchema.enum.find((ue) => ue.value === te);
41129
- se && (te = /* @__PURE__ */ jsx(Tag, { role: "button", color: se.color, children: se.label }));
41246
+ const ce = M.uiSchema.enum.find((ie) => ie.value === te);
41247
+ ce && (te = /* @__PURE__ */ jsx(Tag, { role: "button", color: ce.color, children: ce.label }));
41130
41248
  }
41131
41249
  return (M == null ? void 0 : M.type) === "date" && (te = dayjs(te).format("YYYY-MM-DD")), c ? c({
41132
41250
  [t.label]: te || EMPTY$1,
41133
- [t.value]: Z[t.value]
41134
- }) : P(x({}, omit(Z, "style")), {
41251
+ [t.value]: ne[t.value]
41252
+ }) : P(x({}, omit(ne, "style")), {
41135
41253
  [t.label]: te || EMPTY$1,
41136
- [t.value]: Z[t.value]
41254
+ [t.value]: ne[t.value]
41137
41255
  });
41138
41256
  }).filter(Boolean);
41139
- } catch (Z) {
41140
- return console.error(Z), J;
41257
+ } catch (ne) {
41258
+ return console.error(ne), Q;
41141
41259
  }
41142
41260
  },
41143
41261
  [M == null ? void 0 : M.uiSchema, t]
@@ -41149,7 +41267,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
41149
41267
  params: P(x({
41150
41268
  pageSize: 200
41151
41269
  }, n == null ? void 0 : n.params), {
41152
- filter: (ee = n == null ? void 0 : n.params) == null ? void 0 : ee.filter
41270
+ filter: (Z = n == null ? void 0 : n.params) == null ? void 0 : Z.filter
41153
41271
  })
41154
41272
  }),
41155
41273
  x({
@@ -41159,8 +41277,8 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
41159
41277
  }, n.defaultParams ? { defaultParams: [n.defaultParams] } : {})
41160
41278
  ), {
41161
41279
  data: z,
41162
- run: L,
41163
- loading: V
41280
+ run: V,
41281
+ loading: L
41164
41282
  } = useRequest(
41165
41283
  P(x({
41166
41284
  action: "get"
@@ -41189,29 +41307,29 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
41189
41307
  useEffect(() => {
41190
41308
  y.current && A();
41191
41309
  }, [G]), useEffect(() => {
41192
- !i && ($ != null && $.data) && ($ != null && $.data.some((J) => J[t.value] === r) || L({
41310
+ !i && ($ != null && $.data) && ($ != null && $.data.some((Q) => Q[t.value] === r) || V({
41193
41311
  filterByTk: r
41194
41312
  }));
41195
41313
  }, [r, $ == null ? void 0 : $.data]);
41196
- const U = (J) => q(void 0, null, function* () {
41197
- var Z;
41314
+ const U = (Q) => q(void 0, null, function* () {
41315
+ var ne;
41198
41316
  A({
41199
41317
  filter: mergeFilter([
41200
- J ? {
41318
+ Q ? {
41201
41319
  [t.label]: {
41202
- [j]: J
41320
+ [j]: Q
41203
41321
  }
41204
41322
  } : {},
41205
- (Z = n == null ? void 0 : n.params) == null ? void 0 : Z.filter
41323
+ (ne = n == null ? void 0 : n.params) == null ? void 0 : ne.filter
41206
41324
  ])
41207
- }), w.current = J;
41325
+ }), w.current = Q;
41208
41326
  }), K = useMemo(() => {
41209
- var re;
41210
- const J = i ? r || a : z == null ? void 0 : z.data;
41211
- if (!((re = $ == null ? void 0 : $.data) != null && re.length))
41212
- return J != null ? Array.isArray(J) ? J : [J] : [];
41213
- const Z = J != null && (Array.isArray(J) ? J.map((se) => P(x({}, se), { [t.value]: se[t.value] || se })) : [P(x({}, J), { [t.value]: J[t.value] || J })]) || [], te = typeof p == "function" ? $.data.filter(p) : $.data;
41214
- return uniqBy(te.concat(Z != null ? Z : []), t.value);
41327
+ var se;
41328
+ const Q = i ? r || a : z == null ? void 0 : z.data;
41329
+ if (!((se = $ == null ? void 0 : $.data) != null && se.length))
41330
+ return Q != null ? Array.isArray(Q) ? Q : [Q] : [];
41331
+ const ne = Q != null && (Array.isArray(Q) ? Q.map((ce) => P(x({}, ce), { [t.value]: ce[t.value] || ce })) : [P(x({}, Q), { [t.value]: Q[t.value] || Q })]) || [], te = typeof p == "function" ? $.data.filter(p) : $.data;
41332
+ return uniqBy(te.concat(ne != null ? ne : []), t.value);
41215
41333
  }, [r, a, $ == null ? void 0 : $.data, t.value, p, z == null ? void 0 : z.data]);
41216
41334
  return /* @__PURE__ */ jsx(
41217
41335
  Select,
@@ -41222,8 +41340,8 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
41222
41340
  filterSort: null,
41223
41341
  fieldNames: t,
41224
41342
  onSearch: U,
41225
- onDropdownVisibleChange: (J) => {
41226
- w.current = null, J && A(), y.current = !0;
41343
+ onDropdownVisibleChange: (Q) => {
41344
+ w.current = null, Q && A(), y.current = !0;
41227
41345
  },
41228
41346
  objectValue: i,
41229
41347
  value: r,
@@ -41232,13 +41350,13 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
41232
41350
  loading: $ ? E : !0,
41233
41351
  options: h(O(K)),
41234
41352
  rawOptions: K,
41235
- dropdownRender: (J) => {
41236
- const Z = K.some((te) => te[t.label] === w.current);
41353
+ dropdownRender: (Q) => {
41354
+ const ne = K.some((te) => te[t.label] === w.current);
41237
41355
  return /* @__PURE__ */ jsx(Fragment$1, { children: I ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
41238
- !(($ == null ? void 0 : $.data.length) === 0 && (w != null && w.current)) && J,
41239
- ($ == null ? void 0 : $.data.length) > 0 && (w == null ? void 0 : w.current) && !Z && /* @__PURE__ */ jsx(Divider$1, { style: { margin: 0 } }),
41240
- !Z && /* @__PURE__ */ jsx(H, {})
41241
- ] }) : J });
41356
+ !(($ == null ? void 0 : $.data.length) === 0 && (w != null && w.current)) && Q,
41357
+ ($ == null ? void 0 : $.data.length) > 0 && (w == null ? void 0 : w.current) && !ne && /* @__PURE__ */ jsx(Divider$1, { style: { margin: 0 } }),
41358
+ !ne && /* @__PURE__ */ jsx(H, {})
41359
+ ] }) : Q });
41242
41360
  }
41243
41361
  })
41244
41362
  );
@@ -43233,7 +43351,15 @@ const className1 = css`
43233
43351
  }, PageContent = memo((e) => /* @__PURE__ */ jsx(PopupRouteContextResetter, { children: /* @__PURE__ */ jsx(InternalPageContent, x({}, e)) })), TabBadge = (e) => {
43234
43352
  var n, o, r;
43235
43353
  const t = useEvaluatedExpression((o = (n = e.tabRoute.options) == null ? void 0 : n.badge) == null ? void 0 : o.count);
43236
- return t == null ? null : /* @__PURE__ */ jsx(Badge, P(x({}, (r = e.tabRoute.options) == null ? void 0 : r.badge), { count: t, style: x({ maxWidth: "10em" }, e.style), dot: !1, children: e.children }));
43354
+ return t == null ? null : /* @__PURE__ */ jsx(
43355
+ Badge,
43356
+ P(x({}, (r = e.tabRoute.options) == null ? void 0 : r.badge), {
43357
+ count: t,
43358
+ style: x({ maxWidth: "10em" }, e.style),
43359
+ dot: !1,
43360
+ children: e.children
43361
+ })
43362
+ );
43237
43363
  }, NocoBasePageHeaderTabs = ({ className: e, activeKey: t }) => {
43238
43364
  const n = useFieldSchema(), { t: o } = useTranslation(), { t: r } = useRouteTranslation(), { token: a } = useToken$1(), i = useRouterBasename(), l = useNavigateNoUpdate(), c = useCallback(
43239
43365
  (I) => {
@@ -43734,8 +43860,8 @@ const FieldsTreeSelect = (e) => {
43734
43860
  break;
43735
43861
  }
43736
43862
  if (!A.isLeaf && A.loadChildren) {
43737
- const L = A.loadChildren(A);
43738
- L != null && L.length && (R.push(...L), A = L.find((V) => V.value === $.slice(0, E + 1).join(".")));
43863
+ const V = A.loadChildren(A);
43864
+ V != null && V.length && (R.push(...V), A = V.find((L) => L.value === $.slice(0, E + 1).join(".")));
43739
43865
  }
43740
43866
  }
43741
43867
  }), g((O) => R.reduce(($, A) => Object.assign($, { [A.value]: A }), x({}, O)));
@@ -43827,9 +43953,9 @@ const InternalAssociationSelect$1 = observer$1(
43827
43953
  const N = uid();
43828
43954
  return f.addEffects(N, () => {
43829
43955
  onFieldInputValueChange("*", (M) => {
43830
- var $, A, E, z, L, V;
43956
+ var $, A, E, z, V, L;
43831
43957
  const j = filterAnalyses((E = (A = ($ = r.componentProps) == null ? void 0 : $.service) == null ? void 0 : A.params) == null ? void 0 : E.filter) || [], R = getFieldPath(M.address.entire), O = getFieldPath(r.address.entire);
43832
- j.includes((z = M == null ? void 0 : M.props) == null ? void 0 : z.name) && r.value && isEqual(M == null ? void 0 : M.indexes, r == null ? void 0 : r.indexes) && ((L = M == null ? void 0 : M.props) == null ? void 0 : L.name) !== r.props.name && (!((V = r == null ? void 0 : r.indexes) != null && V.length) || isEqual(R, O)) && (r.setValue(null), p(null));
43958
+ j.includes((z = M == null ? void 0 : M.props) == null ? void 0 : z.name) && r.value && isEqual(M == null ? void 0 : M.indexes, r == null ? void 0 : r.indexes) && ((V = M == null ? void 0 : M.props) == null ? void 0 : V.name) !== r.props.name && (!((L = r == null ? void 0 : r.indexes) != null && L.length) || isEqual(R, O)) && (r.setValue(null), p(null));
43833
43959
  });
43834
43960
  }), () => {
43835
43961
  f.removeEffects(N);
@@ -44994,13 +45120,13 @@ const InternalFileManager = (e) => {
44994
45120
  let O = p(R[y.label]);
44995
45121
  if (($ = v == null ? void 0 : v.uiSchema) != null && $.enum)
44996
45122
  if (Array.isArray(O))
44997
- O = O.map((z, L) => {
45123
+ O = O.map((z, V) => {
44998
45124
  var G, H;
44999
- const V = (H = (G = v.uiSchema.enum).find) == null ? void 0 : H.call(G, (U) => U.value === z);
45000
- return V ? /* @__PURE__ */ jsx(Tag, { color: V.color, style: { marginRight: 3 }, children: (V == null ? void 0 : V.label) || z }, L) : /* @__PURE__ */ jsx(Tag, { children: z }, z);
45125
+ const L = (H = (G = v.uiSchema.enum).find) == null ? void 0 : H.call(G, (U) => U.value === z);
45126
+ return L ? /* @__PURE__ */ jsx(Tag, { color: L.color, style: { marginRight: 3 }, children: (L == null ? void 0 : L.label) || z }, V) : /* @__PURE__ */ jsx(Tag, { children: z }, z);
45001
45127
  }).reverse();
45002
45128
  else {
45003
- const z = (E = (A = v.uiSchema.enum).find) == null ? void 0 : E.call(A, (L) => L.value === O);
45129
+ const z = (E = (A = v.uiSchema.enum).find) == null ? void 0 : E.call(A, (V) => V.value === O);
45004
45130
  z && (O = /* @__PURE__ */ jsx(Tag, { color: z.color, children: z.label }));
45005
45131
  }
45006
45132
  return (v == null ? void 0 : v.type) === "date" && (O = dayjs(O).format("YYYY-MM-DD")), n ? n({
@@ -45039,8 +45165,8 @@ const InternalFileManager = (e) => {
45039
45165
  d(!0);
45040
45166
  const z = yield T({ parentId: R == null ? void 0 : R.key });
45041
45167
  if (d(!1), c(z), O === (a == null ? void 0 : a.length) - 1 && (($ = R == null ? void 0 : R.value) != null && $.id)) {
45042
- const L = yield T({ parentId: (A = R == null ? void 0 : R.value) == null ? void 0 : A.id }), V = [...a];
45043
- V.splice(O + 1), V[O] = P(x({}, V[O]), { value: R == null ? void 0 : R.value }), V[O + 1] = { key: (E = R == null ? void 0 : R.value) == null ? void 0 : E.id, children: (L == null ? void 0 : L.length) > 0 ? L : null }, i(V), o == null || o(V);
45168
+ const V = yield T({ parentId: (A = R == null ? void 0 : R.value) == null ? void 0 : A.id }), L = [...a];
45169
+ L.splice(O + 1), L[O] = P(x({}, L[O]), { value: R == null ? void 0 : R.value }), L[O + 1] = { key: (E = R == null ? void 0 : R.value) == null ? void 0 : E.id, children: (V == null ? void 0 : V.length) > 0 ? V : null }, i(L), o == null || o(L);
45044
45170
  }
45045
45171
  }
45046
45172
  }), N = (j, R) => q(void 0, null, function* () {
@@ -45377,9 +45503,9 @@ const useTableSelectorProps$2 = () => {
45377
45503
  }, InternalPicker = observer$1(
45378
45504
  (e) => {
45379
45505
  var z;
45380
- const E = e, { value: t, multiple: n, openSize: o, onChange: r, quickUpload: a, selectFile: i, shouldMountElement: l } = E, c = W(E, ["value", "multiple", "openSize", "onChange", "quickUpload", "selectFile", "shouldMountElement"]), u = useField(), d = useFieldNames$1(e), [p, m] = useState(!1), h = useFieldSchema(), g = useInsertSchema$1("Selector"), { options: f } = useAssociationFieldContext(), { collectionName: C } = useFormBlockContext(), b = useCompile(), S = useLabelUiSchema$1(f, (d == null ? void 0 : d.label) || "label"), y = h["x-add-new"], [v, I] = useState([]), F = useCollectionRecordData(), w = useMemo(() => t && Object.keys(t).length > 0 ? (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((V) => {
45381
- const G = V == null ? void 0 : V[d.label];
45382
- return P(x({}, V), {
45506
+ const E = e, { value: t, multiple: n, openSize: o, onChange: r, quickUpload: a, selectFile: i, shouldMountElement: l } = E, c = W(E, ["value", "multiple", "openSize", "onChange", "quickUpload", "selectFile", "shouldMountElement"]), u = useField(), d = useFieldNames$1(e), [p, m] = useState(!1), h = useFieldSchema(), g = useInsertSchema$1("Selector"), { options: f } = useAssociationFieldContext(), { collectionName: C } = useFormBlockContext(), b = useCompile(), S = useLabelUiSchema$1(f, (d == null ? void 0 : d.label) || "label"), y = h["x-add-new"], [v, I] = useState([]), F = useCollectionRecordData(), w = useMemo(() => t && Object.keys(t).length > 0 ? (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((L) => {
45507
+ const G = L == null ? void 0 : L[d.label];
45508
+ return P(x({}, L), {
45383
45509
  [d.label]: getLabelFormatValue$1(b(S), b(G))
45384
45510
  });
45385
45511
  }) : [], [t == null ? void 0 : t.length, d.label]), T = {
@@ -45396,29 +45522,29 @@ const useTableSelectorProps$2 = () => {
45396
45522
  collectionField: f,
45397
45523
  currentFormCollection: C
45398
45524
  }, { isMobileLayout: D } = useMobileLayout(), B = () => {
45399
- var L;
45400
- return n == null ? null : Array.isArray(t) ? (L = t.filter(Boolean)) == null ? void 0 : L.map((V) => V == null ? void 0 : V[d.value]) : t == null ? void 0 : t[d.value];
45525
+ var V;
45526
+ return n == null ? null : Array.isArray(t) ? (V = t.filter(Boolean)) == null ? void 0 : V.map((L) => L == null ? void 0 : L[d.value]) : t == null ? void 0 : t[d.value];
45401
45527
  }, N = () => {
45402
- var L;
45403
- return n == null ? null : Array.isArray(t) ? (L = t.filter(Boolean)) == null ? void 0 : L.map((V) => ({
45404
- [d.label]: b(V == null ? void 0 : V[d.label]),
45405
- [d.value]: V == null ? void 0 : V[d.value]
45528
+ var V;
45529
+ return n == null ? null : Array.isArray(t) ? (V = t.filter(Boolean)) == null ? void 0 : V.map((L) => ({
45530
+ [d.label]: b(L == null ? void 0 : L[d.label]),
45531
+ [d.value]: L == null ? void 0 : L[d.value]
45406
45532
  })) : [{ [d.label]: b(t == null ? void 0 : t[d.label]), [d.value]: t == null ? void 0 : t[d.value] }];
45407
45533
  }, M = () => {
45408
- const L = (f == null ? void 0 : f.targetKey) || "id", V = w.map((H) => H[L]).filter(Boolean);
45409
- return V.length ? { $and: [{ [`${L}.$ne`]: V }] } : {};
45534
+ const V = (f == null ? void 0 : f.targetKey) || "id", L = w.map((H) => H[V]).filter(Boolean);
45535
+ return L.length ? { $and: [{ [`${V}.$ne`]: L }] } : {};
45410
45536
  };
45411
45537
  useEffect(() => {
45412
45538
  t || I([]);
45413
45539
  }, [t]);
45414
45540
  const j = () => {
45415
- const { setVisible: L } = useActionContext(), { multiple: V, selectedRows: G, onChange: H, options: U, collectionField: K } = useContext(RecordPickerContext);
45541
+ const { setVisible: V } = useActionContext(), { multiple: L, selectedRows: G, onChange: H, options: U, collectionField: K } = useContext(RecordPickerContext);
45416
45542
  return {
45417
45543
  onClick() {
45418
- H(V ? unionBy(G, U, (K == null ? void 0 : K.targetKey) || "id") : (G == null ? void 0 : G[0]) || null), L(!1);
45544
+ H(L ? unionBy(G, U, (K == null ? void 0 : K.targetKey) || "id") : (G == null ? void 0 : G[0]) || null), V(!1);
45419
45545
  },
45420
45546
  style: {
45421
- display: V === !1 ? "none" : "block"
45547
+ display: L === !1 ? "none" : "block"
45422
45548
  }
45423
45549
  };
45424
45550
  }, R = useMemo(
@@ -45447,23 +45573,23 @@ const useTableSelectorProps$2 = () => {
45447
45573
  }, c), {
45448
45574
  mode: n ? "multiple" : e.mode,
45449
45575
  fieldNames: d,
45450
- onDropdownVisibleChange: (L) => {
45576
+ onDropdownVisibleChange: (V) => {
45451
45577
  g(schema$1.Selector), m(!0);
45452
45578
  },
45453
45579
  allowClear: !0,
45454
- onChange: (L) => {
45455
- if (L) {
45456
- if (Array.isArray(L)) {
45457
- if (!L.length) {
45580
+ onChange: (V) => {
45581
+ if (V) {
45582
+ if (Array.isArray(V)) {
45583
+ if (!V.length) {
45458
45584
  r([]), I([]);
45459
45585
  return;
45460
45586
  }
45461
- const V = w == null ? void 0 : w.filter((G) => L.includes(G[d.value]));
45462
- r(V), I(V);
45587
+ const L = w == null ? void 0 : w.filter((G) => V.includes(G[d.value]));
45588
+ r(L), I(L);
45463
45589
  }
45464
45590
  } else {
45465
- const V = n ? [] : null;
45466
- r(V), I(V);
45591
+ const L = n ? [] : null;
45592
+ r(L), I(L);
45467
45593
  }
45468
45594
  },
45469
45595
  options: N(),
@@ -45477,7 +45603,7 @@ const useTableSelectorProps$2 = () => {
45477
45603
  onlyRenderProperties: !0,
45478
45604
  basePath: u.address,
45479
45605
  schema: h,
45480
- filterProperties: (L) => L["x-component"] === "Action"
45606
+ filterProperties: (V) => V["x-component"] === "Action"
45481
45607
  }
45482
45608
  ) }) })
45483
45609
  ] }),
@@ -45496,7 +45622,7 @@ const useTableSelectorProps$2 = () => {
45496
45622
  onlyRenderProperties: !0,
45497
45623
  basePath: u.address,
45498
45624
  schema: O,
45499
- filterProperties: (L) => L["x-component"] === "AssociationField.Selector"
45625
+ filterProperties: (V) => V["x-component"] === "AssociationField.Selector"
45500
45626
  }
45501
45627
  ) }) }) }) }) }))
45502
45628
  }
@@ -45787,10 +45913,21 @@ const getSourceData = (e, t) => {
45787
45913
  .ant-table-tbody .nb-column-initializer {
45788
45914
  min-width: 40px !important;
45789
45915
  }
45916
+ .ant-formily-item-feedback-layout-terse {
45917
+ margin-bottom: 0px;
45918
+ }
45919
+ .ant-formily-item-error-help {
45920
+ box-shadow: none !important;
45921
+ background: none !important;
45922
+ overflow-x: hidden;
45923
+ }
45924
+ .ant-formily-item-control:has(.ant-formily-item-error-help) .ant-formily-item-control-content-component {
45925
+ margin-bottom: 13px !important;
45926
+ }
45790
45927
  `,
45791
45928
  layout: "vertical",
45792
45929
  bordered: !1,
45793
- feedbackLayout: "popover",
45930
+ feedbackLayout: "terse",
45794
45931
  children: /* @__PURE__ */ jsx(
45795
45932
  SchemaOptionsContext.Provider,
45796
45933
  {
@@ -46873,8 +47010,8 @@ const useColumnsDeepMemoized = (e) => {
46873
47010
  InternalNocoBaseTable.displayName = "InternalNocoBaseTable";
46874
47011
  const Table$1 = withDynamicSchemaProps(
46875
47012
  observer$1((e) => {
46876
- var pe, be, ye;
46877
- const { token: t } = useToken$1(), he = omit(e, ["onBlur", "onFocus", "value"]), { pagination: n, useProps: o } = he, r = W(he, ["pagination", "useProps"]), fe = (o == null ? void 0 : o()) || {}, { pagination: a } = fe, i = W(fe, ["pagination"]), ge = x(x({}, r), i), {
47013
+ var fe, be, ye;
47014
+ const { token: t } = useToken$1(), ge = omit(e, ["onBlur", "onFocus", "value"]), { pagination: n, useProps: o } = ge, r = W(ge, ["pagination", "useProps"]), he = (o == null ? void 0 : o()) || {}, { pagination: a } = he, i = W(he, ["pagination"]), Ce = x(x({}, r), i), {
46878
47015
  dragSort: l = !1,
46879
47016
  showIndex: c = !0,
46880
47017
  onRowSelectionChange: u,
@@ -46886,7 +47023,7 @@ const Table$1 = withDynamicSchemaProps(
46886
47023
  loading: f,
46887
47024
  onClickRow: C,
46888
47025
  enableIndexColumn: b
46889
- } = ge, S = W(ge, [
47026
+ } = Ce, S = W(Ce, [
46890
47027
  "dragSort",
46891
47028
  "showIndex",
46892
47029
  "onRowSelectionChange",
@@ -46898,19 +47035,19 @@ const Table$1 = withDynamicSchemaProps(
46898
47035
  "loading",
46899
47036
  "onClickRow",
46900
47037
  "enableIndexColumn"
46901
- ]), y = useArrayField(S), v = useFieldSchema(), { size: I = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, F = useCollection(), T = ((pe = v == null ? void 0 : v.parent) == null ? void 0 : pe["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: B } = T, N = useMemoizedFn(S.onRowDragEnd || (() => {
46902
- })), M = usePaginationProps$2(n, a), j = useTableColumns$1(S, M), [R, O] = useState(() => D ? B : []), [$, A] = useState(((be = y == null ? void 0 : y.data) == null ? void 0 : be.selectedRowKeys) || []), [E, z] = useState([]), L = (p == null ? void 0 : p.type) !== "none", V = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
47038
+ ]), y = useArrayField(S), v = useFieldSchema(), { size: I = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, F = useCollection(), T = ((fe = v == null ? void 0 : v.parent) == null ? void 0 : fe["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: B } = T, N = useMemoizedFn(S.onRowDragEnd || (() => {
47039
+ })), M = usePaginationProps$2(n, a), j = useTableColumns$1(S, M), [R, O] = useState(() => D ? B : []), [$, A] = useState(((be = y == null ? void 0 : y.data) == null ? void 0 : be.selectedRowKeys) || []), [E, z] = useState([]), V = (p == null ? void 0 : p.type) !== "none", L = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
46903
47040
  & > td {
46904
47041
  background-color: ${t.controlItemBgActive} !important;
46905
47042
  }
46906
47043
  &:hover > td {
46907
47044
  background-color: ${t.controlItemBgActiveHover} !important;
46908
47045
  }
46909
- `, [t.controlItemBgActive, t.controlItemBgActiveHover]), H = useMemo(() => C ? G : "", [G, C]), U = useMemo(() => C ? (ae, ne) => ({
47046
+ `, [t.controlItemBgActive, t.controlItemBgActiveHover]), H = useMemo(() => C ? G : "", [G, C]), U = useMemo(() => C ? (ae, ee) => ({
46910
47047
  onClick: (oe) => {
46911
47048
  isPortalInBody(oe.target) || C(ae, z, E);
46912
47049
  },
46913
- rowIndex: ne
47050
+ rowIndex: ee
46914
47051
  }) : null, [C, E]);
46915
47052
  useDeepCompareEffect(() => {
46916
47053
  const ae = D ? B : [];
@@ -46921,73 +47058,73 @@ const Table$1 = withDynamicSchemaProps(
46921
47058
  return Y(ae);
46922
47059
  if (ae.key)
46923
47060
  return ae.key;
46924
- if (V.current.has(ae))
46925
- return V.current.get(ae);
46926
- const ne = uid();
46927
- return V.current.set(ae, ne), ne;
47061
+ if (L.current.has(ae))
47062
+ return L.current.get(ae);
47063
+ const ee = uid();
47064
+ return L.current.set(ae, ee), ee;
46928
47065
  }, []), Y = useCallback(
46929
47066
  (ae) => {
46930
- var ne;
47067
+ var ee;
46931
47068
  return Array.isArray(m) ? m.map((oe) => {
46932
- var ie;
46933
- return ((ie = ae[oe]) == null ? void 0 : ie.toString()) || "";
46934
- }).join("-") : typeof m == "string" ? ae[m] : (ne = (m != null ? m : K)(ae)) == null ? void 0 : ne.toString();
47069
+ var le;
47070
+ return ((le = ae[oe]) == null ? void 0 : le.toString()) || "";
47071
+ }).join("-") : typeof m == "string" ? ae[m] : (ee = (m != null ? m : K)(ae)) == null ? void 0 : ee.toString();
46935
47072
  },
46936
47073
  [JSON.stringify(m), K]
46937
- ), X = useMemo(() => (Array.isArray(y == null ? void 0 : y.value) ? y.value : []).filter(Boolean), [y == null ? void 0 : y.value, (ye = y == null ? void 0 : y.value) == null ? void 0 : ye.length]), Q = useMemo(() => (ae) => {
46938
- const ne = useCallback((oe) => {
47074
+ ), X = useMemo(() => (Array.isArray(y == null ? void 0 : y.value) ? y.value : []).filter(Boolean), [y == null ? void 0 : y.value, (ye = y == null ? void 0 : y.value) == null ? void 0 : ye.length]), J = useMemo(() => (ae) => {
47075
+ const ee = useCallback((oe) => {
46939
47076
  var Ae, ve, Pe, Fe, Ie, ke;
46940
47077
  if (!oe.active || !oe.over) {
46941
47078
  console.warn("move cancel");
46942
47079
  return;
46943
47080
  }
46944
- const ie = (Pe = (ve = (Ae = oe.active) == null ? void 0 : Ae.data.current) == null ? void 0 : ve.sortable) == null ? void 0 : Pe.index, ce = (ke = (Ie = (Fe = oe.over) == null ? void 0 : Fe.data.current) == null ? void 0 : Ie.sortable) == null ? void 0 : ke.index, de = y.value[ie] || oe.active, Se = y.value[ce] || oe.over;
46945
- y.move(ie, ce), N({ from: de, to: Se });
47081
+ const le = (Pe = (ve = (Ae = oe.active) == null ? void 0 : Ae.data.current) == null ? void 0 : ve.sortable) == null ? void 0 : Pe.index, me = (ke = (Ie = (Fe = oe.over) == null ? void 0 : Fe.data.current) == null ? void 0 : Ie.sortable) == null ? void 0 : ke.index, xe = y.value[le] || oe.active, Se = y.value[me] || oe.over;
47082
+ y.move(le, me), N({ from: xe, to: Se });
46946
47083
  }, []);
46947
- return /* @__PURE__ */ jsx(DndContext, { onDragEnd: ne, children: /* @__PURE__ */ jsx("tbody", x({}, ae)) });
47084
+ return /* @__PURE__ */ jsx(DndContext, { onDragEnd: ee, children: /* @__PURE__ */ jsx("tbody", x({}, ae)) });
46948
47085
  }, [y, N]);
46949
- Q.displayName = "BodyWrapperComponent";
46950
- const ee = useMemo(() => ({
47086
+ J.displayName = "BodyWrapperComponent";
47087
+ const Z = useMemo(() => ({
46951
47088
  header: {
46952
47089
  wrapper: HeaderWrapperComponent,
46953
47090
  cell: HeaderCellComponent
46954
47091
  },
46955
47092
  body: {
46956
- wrapper: Q,
47093
+ wrapper: J,
46957
47094
  row: BodyRowComponent,
46958
47095
  cell: BodyCellComponent
46959
47096
  }
46960
- }), [Q]), J = useMemo(() => p, [JSON.stringify(p)]), Z = useMemo(
47097
+ }), [J]), Q = useMemo(() => p, [JSON.stringify(p)]), ne = useMemo(
46961
47098
  () => ({
46962
- rowSelection: b && J ? x({
47099
+ rowSelection: b && Q ? x({
46963
47100
  type: "checkbox",
46964
47101
  selectedRowKeys: $,
46965
- onChange(ae, ne) {
46966
- y.data = y.data || {}, y.data.selectedRowKeys = ae, y.data.selectedRowData = ne, A(ae), u == null || u(ae, ne);
47102
+ onChange(ae, ee) {
47103
+ y.data = y.data || {}, y.data.selectedRowKeys = ae, y.data.selectedRowData = ee, A(ae), u == null || u(ae, ee);
46967
47104
  },
46968
47105
  getCheckboxProps(ae) {
46969
47106
  return {
46970
47107
  "aria-label": "checkbox"
46971
47108
  };
46972
47109
  },
46973
- renderCell: (ae, ne, oe, ie) => {
47110
+ renderCell: (ae, ee, oe, le) => {
46974
47111
  if (!l && !c)
46975
- return ie;
46976
- const ce = M == null ? void 0 : M.current, de = (M == null ? void 0 : M.pageSize) || 20;
46977
- return ce ? oe = oe + (ce - 1) * de + 1 : oe = oe + 1, ne.__index && (oe = extractIndex(ne.__index)), /* @__PURE__ */ jsxs(
47112
+ return le;
47113
+ const me = M == null ? void 0 : M.current, xe = (M == null ? void 0 : M.pageSize) || 20;
47114
+ return me ? oe = oe + (me - 1) * xe + 1 : oe = oe + 1, ee.__index && (oe = extractIndex(ee.__index)), /* @__PURE__ */ jsxs(
46978
47115
  "div",
46979
47116
  {
46980
47117
  role: "button",
46981
47118
  "aria-label": `table-index-${oe}`,
46982
47119
  className: cls(ae ? "checked" : null, rowSelectCheckboxWrapperClass, {
46983
- [rowSelectCheckboxWrapperClassHover]: L
47120
+ [rowSelectCheckboxWrapperClassHover]: V
46984
47121
  }),
46985
47122
  children: [
46986
47123
  /* @__PURE__ */ jsxs("div", { className: cls(ae ? "checked" : null, rowSelectCheckboxContentClass), children: [
46987
- l && /* @__PURE__ */ jsx(SortHandle$1, { id: Y(ne) }),
47124
+ l && /* @__PURE__ */ jsx(SortHandle$1, { id: Y(ee) }),
46988
47125
  c && /* @__PURE__ */ jsx(TableIndex$2, { index: oe })
46989
47126
  ] }),
46990
- L && /* @__PURE__ */ jsx(
47127
+ V && /* @__PURE__ */ jsx(
46991
47128
  "div",
46992
47129
  {
46993
47130
  className: cls(
@@ -46995,77 +47132,77 @@ const Table$1 = withDynamicSchemaProps(
46995
47132
  ae ? "checked" : null,
46996
47133
  rowSelectCheckboxCheckedClassHover
46997
47134
  ),
46998
- children: ie
47135
+ children: le
46999
47136
  }
47000
47137
  )
47001
47138
  ]
47002
47139
  }
47003
47140
  );
47004
47141
  }
47005
- }, J) : void 0
47142
+ }, Q) : void 0
47006
47143
  }),
47007
47144
  [
47008
- J,
47145
+ Q,
47009
47146
  $,
47010
47147
  u,
47011
47148
  c,
47012
47149
  l,
47013
47150
  y,
47014
47151
  Y,
47015
- L,
47016
- J,
47152
+ V,
47153
+ Q,
47017
47154
  M,
47018
47155
  b
47019
47156
  ]
47020
47157
  ), te = useCallback(
47021
47158
  ({ children: ae }) => {
47022
- var ne, oe;
47159
+ var ee, oe;
47023
47160
  return l ? React.createElement(
47024
47161
  SortableContext$1,
47025
47162
  {
47026
- items: ((oe = (ne = y.value) == null ? void 0 : ne.map) == null ? void 0 : oe.call(ne, Y)) || []
47163
+ items: ((oe = (ee = y.value) == null ? void 0 : ee.map) == null ? void 0 : oe.call(ee, Y)) || []
47027
47164
  },
47028
47165
  ae
47029
47166
  ) : React.createElement(React.Fragment, {}, ae);
47030
47167
  },
47031
47168
  [y, l, Y]
47032
- ), { height: re, tableSizeRefCallback: se } = useTableSize(), ue = useMemo(() => ({
47169
+ ), { height: se, tableSizeRefCallback: ce } = useTableSize(), ie = useMemo(() => ({
47033
47170
  x: "max-content"
47034
- }), []), le = useMemo(() => ({
47171
+ }), []), re = useMemo(() => ({
47035
47172
  x: "max-content",
47036
- y: X.length > 0 ? re : void 0
47037
- }), [re, ue, X]), me = useCallback(
47173
+ y: X.length > 0 ? se : void 0
47174
+ }), [se, ie, X]), de = useCallback(
47038
47175
  (ae) => E.includes(ae[m]) ? H : "",
47039
47176
  [E, H, JSON.stringify(m)]
47040
- ), xe = useCallback(
47041
- (ae, ne) => {
47042
- const oe = ae ? [...R, ne[F.getPrimaryKey()]] : R.filter((ie) => ne[F.getPrimaryKey()] !== ie);
47043
- O(oe), g == null || g(ae, ne);
47177
+ ), pe = useCallback(
47178
+ (ae, ee) => {
47179
+ const oe = ae ? [...R, ee[F.getPrimaryKey()]] : R.filter((le) => ee[F.getPrimaryKey()] !== le);
47180
+ O(oe), g == null || g(ae, ee);
47044
47181
  },
47045
47182
  [R, g, F]
47046
- ), Ce = useMemo(() => ({
47047
- onExpand: xe,
47183
+ ), ue = useMemo(() => ({
47184
+ onExpand: pe,
47048
47185
  expandedRowKeys: R
47049
- }), [R, xe]);
47186
+ }), [R, pe]);
47050
47187
  return (
47051
47188
  // If spinning is set to undefined, it will cause the subtable to always display loading, so we need to convert it here
47052
47189
  /* @__PURE__ */ jsx(Spin, { spinning: !!f, children: /* @__PURE__ */ jsx(
47053
47190
  InternalNocoBaseTable,
47054
47191
  P(x(x({
47055
- tableHeight: re,
47192
+ tableHeight: se,
47056
47193
  SortableWrapper: te,
47057
- tableSizeRefCallback: se,
47194
+ tableSizeRefCallback: ce,
47058
47195
  defaultRowKey: K,
47059
47196
  dataSource: X
47060
- }, S), Z), {
47197
+ }, S), ne), {
47061
47198
  paginationProps: M,
47062
- components: ee,
47199
+ components: Z,
47063
47200
  onTableChange: d,
47064
47201
  onRow: U,
47065
- rowClassName: me,
47066
- scroll: le,
47202
+ rowClassName: de,
47203
+ scroll: re,
47067
47204
  columns: j,
47068
- expandable: Ce,
47205
+ expandable: ue,
47069
47206
  field: y,
47070
47207
  size: I
47071
47208
  })
@@ -47128,20 +47265,20 @@ const Table$1 = withDynamicSchemaProps(
47128
47265
  var A, E, z;
47129
47266
  const { openSize: t } = e, { field: n, options: o, fieldSchema: r } = useAssociationFieldContext(), { t: a } = useTranslation(), [i, l] = useState(!1), [c, u] = useState([]), d = useFieldNames$1(e), p = useFieldSchema(), m = useCompile(), h = useLabelUiSchema$1(o, (d == null ? void 0 : d.label) || "label"), g = useCollectionRecord(), f = useCollection(), { allowSelectExistingRecord: C, allowAddnew: b, allowDisassociation: S, enableIndexColumn: y } = n.componentProps;
47130
47267
  useSubTableSpecialCase({ rootField: n, rootSchema: r });
47131
- const v = (L, V) => {
47132
- if (V !== void 0 && isArr(n.value) && L !== V)
47268
+ const v = (V, L) => {
47269
+ if (L !== void 0 && isArr(n.value) && V !== L)
47133
47270
  return action(() => {
47134
- const G = n.value[L];
47135
- return n.value.splice(L, 1), n.value.splice(V, 0, G), exchangeArrayState(n, {
47136
- fromIndex: L,
47137
- toIndex: V
47271
+ const G = n.value[V];
47272
+ return n.value.splice(V, 1), n.value.splice(L, 0, G), exchangeArrayState(n, {
47273
+ fromIndex: V,
47274
+ toIndex: L
47138
47275
  }), n.onInput(n.value);
47139
47276
  });
47140
47277
  };
47141
47278
  n.move = v;
47142
- const I = useMemo(() => n.value && Object.keys(n.value).length > 0 ? (Array.isArray(n.value) ? n.value : n.value ? [n.value] : []).filter(Boolean).map((V) => {
47143
- const G = V == null ? void 0 : V[d.label];
47144
- return P(x({}, V), {
47279
+ const I = useMemo(() => n.value && Object.keys(n.value).length > 0 ? (Array.isArray(n.value) ? n.value : n.value ? [n.value] : []).filter(Boolean).map((L) => {
47280
+ const G = L == null ? void 0 : L[d.label];
47281
+ return P(x({}, L), {
47145
47282
  [d.label]: getLabelFormatValue$1(m(h), m(G))
47146
47283
  });
47147
47284
  }) : [], [n.value, d == null ? void 0 : d.label]), F = {
@@ -47157,28 +47294,28 @@ const Table$1 = withDynamicSchemaProps(
47157
47294
  setSelectedRows: u,
47158
47295
  collectionField: o
47159
47296
  }, w = () => {
47160
- const { setVisible: L } = useActionContext(), { selectedRows: V, setSelectedRows: G } = useContext(RecordPickerContext);
47297
+ const { setVisible: V } = useActionContext(), { selectedRows: L, setSelectedRows: G } = useContext(RecordPickerContext);
47161
47298
  return {
47162
47299
  onClick() {
47163
47300
  var U;
47164
- Array.isArray(n.value) || (n.value = []), V.forEach((K) => n.value.push(markRecordAsNew(K))), n.onInput(n.value), n.initialValue = n.value, G([]), L(!1);
47301
+ Array.isArray(n.value) || (n.value = []), L.forEach((K) => n.value.push(markRecordAsNew(K))), n.onInput(n.value), n.initialValue = n.value, G([]), V(!1);
47165
47302
  const H = Math.ceil(n.value.length / (((U = n.componentProps) == null ? void 0 : U.pageSize) || 10));
47166
47303
  B(H);
47167
47304
  }
47168
47305
  };
47169
47306
  }, T = () => {
47170
- const L = (o == null ? void 0 : o.targetKey) || "id", V = (n.value || []).map((H) => H == null ? void 0 : H[L]).filter(Boolean);
47171
- return V.length ? { $and: [{ [`${L}.$ne`]: V }] } : {};
47307
+ const V = (o == null ? void 0 : o.targetKey) || "id", L = (n.value || []).map((H) => H == null ? void 0 : H[V]).filter(Boolean);
47308
+ return L.length ? { $and: [{ [`${V}.$ne`]: L }] } : {};
47172
47309
  }, [D, B] = useState(1), [N, M] = useState(((A = n.componentProps) == null ? void 0 : A.pageSize) || 10), { setFormValueChanged: j } = useActionContext();
47173
47310
  useEffect(() => {
47174
- var L;
47175
- M((L = n.componentProps) == null ? void 0 : L.pageSize);
47311
+ var V;
47312
+ M((V = n.componentProps) == null ? void 0 : V.pageSize);
47176
47313
  }, [(E = n.componentProps) == null ? void 0 : E.pageSize]);
47177
47314
  const R = useMemo(() => {
47178
- var V;
47179
- const L = Math.ceil(((V = n.value) == null ? void 0 : V.length) / 10);
47315
+ var L;
47316
+ const V = Math.ceil(((L = n.value) == null ? void 0 : L.length) / 10);
47180
47317
  return {
47181
- current: D > L ? L : D,
47318
+ current: D > V ? V : D,
47182
47319
  pageSize: N || 10,
47183
47320
  total: n == null ? void 0 : n.value,
47184
47321
  onChange: (G, H) => {
@@ -47189,13 +47326,13 @@ const Table$1 = withDynamicSchemaProps(
47189
47326
  hideOnSinglePage: !1
47190
47327
  };
47191
47328
  }, [(z = n.value) == null ? void 0 : z.length, N, D]), O = () => {
47192
- const { field: L } = useAssociationFieldContext();
47329
+ const { field: V } = useAssociationFieldContext();
47193
47330
  return {
47194
47331
  run() {
47195
47332
  var G;
47196
- L.value = L.value || [], L.value.push(markRecordAsNew({}));
47197
- const V = Math.ceil(L.value.length / (((G = L.componentProps) == null ? void 0 : G.pageSize) || 10));
47198
- return B(V), L.onInput(L.value);
47333
+ V.value = V.value || [], V.value.push(markRecordAsNew({}));
47334
+ const L = Math.ceil(V.value.length / (((G = V.componentProps) == null ? void 0 : G.pageSize) || 10));
47335
+ return B(L), V.onInput(V.value);
47199
47336
  }
47200
47337
  };
47201
47338
  }, $ = () => ({
@@ -47212,7 +47349,7 @@ const Table$1 = withDynamicSchemaProps(
47212
47349
  field: n,
47213
47350
  showIndex: !0,
47214
47351
  dragSort: !1,
47215
- showDel: n.editable && (b !== !1 || C !== !1 || S !== !1) ? (L) => n.editable ? S !== !1 ? !0 : L == null ? void 0 : L.__isNewRecord__ : !1 : !1,
47352
+ showDel: n.editable && (b !== !1 || C !== !1 || S !== !1) ? (V) => n.editable ? S !== !1 ? !0 : V == null ? void 0 : V.__isNewRecord__ : !1 : !1,
47216
47353
  pagination: R,
47217
47354
  rowSelection: { type: "none", hideSelectAll: !0 },
47218
47355
  isSubTable: !0,
@@ -47280,7 +47417,7 @@ const Table$1 = withDynamicSchemaProps(
47280
47417
  onlyRenderProperties: !0,
47281
47418
  basePath: n.address,
47282
47419
  schema: p.parent,
47283
- filterProperties: (L) => L["x-component"] === "AssociationField.Selector"
47420
+ filterProperties: (V) => V["x-component"] === "AssociationField.Selector"
47284
47421
  }
47285
47422
  )
47286
47423
  }
@@ -47379,7 +47516,7 @@ const ReadPretty$6 = observer$1(
47379
47516
  InternalAssociationSelect.displayName = "InternalAssociationSelect";
47380
47517
  const AssociationSelect = InternalAssociationSelect;
47381
47518
  AssociationSelect.Designer = function e() {
47382
- var O, $, A, E, z, L, V, G, H, U, K;
47519
+ var O, $, A, E, z, V, L, G, H, U, K;
47383
47520
  const { getCollectionFields: t, getInterface: n, getCollectionJoinField: o, 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(), S = i(u.name) || o(u["x-collection-field"]), y = useFieldComponentOptions(), v = c.address.segments.includes("__form_grid"), I = n(S == null ? void 0 : S.interface), F = (O = I == null ? void 0 : I.validateSchema) == null ? void 0 : O.call(I, u), w = ($ = S == null ? void 0 : S.uiSchema) == null ? void 0 : $.title, T = S != null && S.target ? t(S == null ? void 0 : S.target) : [];
47384
47521
  c.title === w || c.title;
47385
47522
  const D = useSortFields(S == null ? void 0 : S.target), B = ((z = (E = (A = c.componentProps) == null ? void 0 : A.service) == null ? void 0 : E.params) == null ? void 0 : z.sort) || [];
@@ -47493,19 +47630,19 @@ AssociationSelect.Designer = function e() {
47493
47630
  }
47494
47631
  },
47495
47632
  onSubmit: (Y) => {
47496
- var Z;
47497
- const X = [], Q = (te) => te != null && !Number.isNaN(te);
47633
+ var ne;
47634
+ const X = [], J = (te) => te != null && !Number.isNaN(te);
47498
47635
  for (const te of Y.rules)
47499
- X.push(_.pickBy(te, Q));
47500
- const ee = {
47636
+ X.push(_.pickBy(te, J));
47637
+ const Z = {
47501
47638
  "x-uid": u["x-uid"]
47502
47639
  };
47503
47640
  if (["percent"].includes(S == null ? void 0 : S.interface))
47504
47641
  for (const te of X)
47505
47642
  (te.maxValue || te.minValue) && (te.percentMode = !0), te.percentFormat && (te.percentFormats = !0);
47506
- const J = _.concat([], ((Z = S == null ? void 0 : S.uiSchema) == null ? void 0 : Z["x-validator"]) || [], X);
47507
- c.validator = J, u["x-validator"] = X, ee["x-validator"] = X, m.emit("patch", {
47508
- schema: ee
47643
+ const Q = _.concat([], ((ne = S == null ? void 0 : S.uiSchema) == null ? void 0 : ne["x-validator"]) || [], X);
47644
+ c.validator = Q, u["x-validator"] = X, Z["x-validator"] = X, m.emit("patch", {
47645
+ schema: Z
47509
47646
  }), h();
47510
47647
  }
47511
47648
  }
@@ -47553,7 +47690,7 @@ AssociationSelect.Designer = function e() {
47553
47690
  options: y,
47554
47691
  value: u["x-component"],
47555
47692
  onChange: (Y) => {
47556
- var Q, ee;
47693
+ var J, Z;
47557
47694
  const X = {
47558
47695
  name: S == null ? void 0 : S.name,
47559
47696
  type: "void",
@@ -47568,9 +47705,9 @@ AssociationSelect.Designer = function e() {
47568
47705
  "x-validator": u["x-validator"],
47569
47706
  "x-collection-field": u["x-collection-field"],
47570
47707
  "x-decorator-props": u["x-decorator-props"],
47571
- "x-component-props": x(x({}, (Q = S == null ? void 0 : S.uiSchema) == null ? void 0 : Q["x-component-props"]), u["x-component-props"])
47708
+ "x-component-props": x(x({}, (J = S == null ? void 0 : S.uiSchema) == null ? void 0 : J["x-component-props"]), u["x-component-props"])
47572
47709
  };
47573
- (ee = I == null ? void 0 : I.schemaInitialize) == null || ee.call(I, X, {
47710
+ (Z = I == null ? void 0 : I.schemaInitialize) == null || Z.call(I, X, {
47574
47711
  field: S,
47575
47712
  block: "Form",
47576
47713
  readPretty: c.readPretty,
@@ -47593,7 +47730,7 @@ AssociationSelect.Designer = function e() {
47593
47730
  SchemaSettingsSwitchItem,
47594
47731
  {
47595
47732
  title: d("Allow multiple"),
47596
- checked: ((L = u["x-component-props"]) == null ? void 0 : L.multiple) === void 0 ? !0 : u["x-component-props"].multiple,
47733
+ checked: ((V = u["x-component-props"]) == null ? void 0 : V.multiple) === void 0 ? !0 : u["x-component-props"].multiple,
47597
47734
  onChange: (Y) => {
47598
47735
  const X = {
47599
47736
  "x-uid": u["x-uid"]
@@ -47609,7 +47746,7 @@ AssociationSelect.Designer = function e() {
47609
47746
  SchemaSettingsDataScope,
47610
47747
  {
47611
47748
  collectionName: S == null ? void 0 : S.target,
47612
- defaultFilter: ((H = (G = (V = c.componentProps) == null ? void 0 : V.service) == null ? void 0 : G.params) == null ? void 0 : H.filter) || {},
47749
+ defaultFilter: ((H = (G = (L = c.componentProps) == null ? void 0 : L.service) == null ? void 0 : G.params) == null ? void 0 : H.filter) || {},
47613
47750
  form: l,
47614
47751
  onSubmit: ({ filter: Y }) => {
47615
47752
  Y = removeNullCondition(Y), _.set(c.componentProps, "service.params.filter", Y), u["x-component-props"] = c.componentProps, m.emit("patch", {
@@ -47696,7 +47833,7 @@ AssociationSelect.Designer = function e() {
47696
47833
  }
47697
47834
  },
47698
47835
  onSubmit: ({ sort: Y }) => {
47699
- const X = Y.map((Q) => Q.direction === "desc" ? `-${Q.field}` : Q.field);
47836
+ const X = Y.map((J) => J.direction === "desc" ? `-${J.field}` : J.field);
47700
47837
  _.set(c.componentProps, "service.params.sort", X), u["x-component-props"] = c.componentProps, m.emit("patch", {
47701
47838
  schema: {
47702
47839
  "x-uid": u["x-uid"],
@@ -47748,13 +47885,13 @@ AssociationSelect.Designer = function e() {
47748
47885
  options: M,
47749
47886
  value: (K = (U = c == null ? void 0 : c.componentProps) == null ? void 0 : U.fieldNames) == null ? void 0 : K.label,
47750
47887
  onChange: (Y) => {
47751
- var ee, J;
47888
+ var Z, Q;
47752
47889
  const X = {
47753
47890
  "x-uid": u["x-uid"]
47754
- }, Q = P(x(x({}, (J = (ee = S == null ? void 0 : S.uiSchema) == null ? void 0 : ee["x-component-props"]) == null ? void 0 : J.fieldNames), c.componentProps.fieldNames), {
47891
+ }, J = P(x(x({}, (Q = (Z = S == null ? void 0 : S.uiSchema) == null ? void 0 : Z["x-component-props"]) == null ? void 0 : Q.fieldNames), c.componentProps.fieldNames), {
47755
47892
  label: Y
47756
47893
  });
47757
- c.componentProps.fieldNames = Q, u["x-component-props"] = u["x-component-props"] || {}, u["x-component-props"].fieldNames = Q, X["x-component-props"] = u["x-component-props"], m.emit("patch", {
47894
+ c.componentProps.fieldNames = J, u["x-component-props"] = u["x-component-props"] || {}, u["x-component-props"].fieldNames = J, X["x-component-props"] = u["x-component-props"], m.emit("patch", {
47758
47895
  schema: X
47759
47896
  }), m.refresh();
47760
47897
  }
@@ -47885,17 +48022,17 @@ AssociationSelect.FilterDesigner = function e() {
47885
48022
  }
47886
48023
  },
47887
48024
  onSubmit: ($) => {
47888
- var L;
48025
+ var V;
47889
48026
  const A = [];
47890
- for (const V of $.rules)
47891
- A.push(_.pickBy(V, _.identity));
48027
+ for (const L of $.rules)
48028
+ A.push(_.pickBy(L, _.identity));
47892
48029
  const E = {
47893
48030
  "x-uid": l["x-uid"]
47894
48031
  };
47895
48032
  if (["percent"].includes(m == null ? void 0 : m.interface))
47896
- for (const V of A)
47897
- (V.maxValue || V.minValue) && (V.percentMode = !0), V.percentFormat && (V.percentFormats = !0);
47898
- const z = _.concat([], ((L = m == null ? void 0 : m.uiSchema) == null ? void 0 : L["x-validator"]) || [], A);
48033
+ for (const L of A)
48034
+ (L.maxValue || L.minValue) && (L.percentMode = !0), L.percentFormat && (L.percentFormats = !0);
48035
+ const z = _.concat([], ((V = m == null ? void 0 : m.uiSchema) == null ? void 0 : V["x-validator"]) || [], A);
47899
48036
  i.validator = z, l["x-validator"] = A, E["x-validator"] = A, u.emit("patch", {
47900
48037
  schema: E
47901
48038
  }), d();
@@ -48037,10 +48174,10 @@ AssociationSelect.FilterDesigner = function e() {
48037
48174
  options: v,
48038
48175
  value: (O = (R = i == null ? void 0 : i.componentProps) == null ? void 0 : R.fieldNames) == null ? void 0 : O.label,
48039
48176
  onChange: ($) => {
48040
- var z, L;
48177
+ var z, V;
48041
48178
  const A = {
48042
48179
  "x-uid": l["x-uid"]
48043
- }, E = P(x(x({}, (L = (z = m == null ? void 0 : m.uiSchema) == null ? void 0 : z["x-component-props"]) == null ? void 0 : L.fieldNames), i.componentProps.fieldNames), {
48180
+ }, E = P(x(x({}, (V = (z = m == null ? void 0 : m.uiSchema) == null ? void 0 : z["x-component-props"]) == null ? void 0 : V.fieldNames), i.componentProps.fieldNames), {
48044
48181
  label: $
48045
48182
  });
48046
48183
  i.componentProps.fieldNames = E, l["x-component-props"] = l["x-component-props"] || {}, l["x-component-props"].fieldNames = E, A["x-component-props"] = l["x-component-props"], u.emit("patch", {
@@ -52225,14 +52362,14 @@ const TableActionColumnDesigner = (e) => {
52225
52362
  }
52226
52363
  },
52227
52364
  onSubmit: ({ sort: A }) => {
52228
- var L;
52229
- const E = A.map((V) => V.direction === "desc" ? `-${V.field}` : V.field), z = r.decoratorProps.params || {};
52365
+ var V;
52366
+ const E = A.map((L) => L.direction === "desc" ? `-${L.field}` : L.field), z = r.decoratorProps.params || {};
52230
52367
  z.sort = E, r.decoratorProps.params = z, a["x-decorator-props"].params = z, d.emit("patch", {
52231
52368
  schema: {
52232
52369
  "x-uid": a["x-uid"],
52233
52370
  "x-decorator-props": a["x-decorator-props"]
52234
52371
  }
52235
- }), c.run(P(x({}, (L = c.params) == null ? void 0 : L[0]), { sort: E }));
52372
+ }), c.run(P(x({}, (V = c.params) == null ? void 0 : V[0]), { sort: E }));
52236
52373
  }
52237
52374
  }
52238
52375
  ),
@@ -52273,9 +52410,9 @@ const TableActionColumnDesigner = (e) => {
52273
52410
  { label: u("Small"), value: "small" }
52274
52411
  ],
52275
52412
  onChange: (A) => {
52276
- const E = a.reduceProperties((z, L) => {
52277
- if (L["x-component"] === "TableV2")
52278
- return L;
52413
+ const E = a.reduceProperties((z, V) => {
52414
+ if (V["x-component"] === "TableV2")
52415
+ return V;
52279
52416
  }, null);
52280
52417
  E["x-component-props"] = E["x-component-props"] || {}, E["x-component-props"].size = A, d.emit("patch", {
52281
52418
  schema: {
@@ -54406,7 +54543,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
54406
54543
  if (Array.isArray(E))
54407
54544
  return E.filter(Boolean);
54408
54545
  const z = String(E != null ? E : "").trim();
54409
- return z ? z.split(/[\s,]+/).map((L) => L.trim()).filter(Boolean) : [];
54546
+ return z ? z.split(/[\s,]+/).map((V) => V.trim()).filter(Boolean) : [];
54410
54547
  }, $ = R.tlds;
54411
54548
  let A = "iana";
54412
54549
  if ($ === "iana" || $ === !0 || $ === "true" ? A = "iana" : $ === "disable" || $ === !1 || $ === "false" ? A = "disable" : $ === "allow" ? A = "allow" : $ === "deny" ? A = "deny" : $ && typeof $ == "object" && ($.allow === !0 ? A = "iana" : Array.isArray($.allow) ? A = "allow" : Array.isArray($.deny) ? A = "deny" : A = "iana"), A === "iana")
@@ -54473,11 +54610,11 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
54473
54610
  return;
54474
54611
  let E = !1;
54475
54612
  A.params.forEach((z) => {
54476
- var V, G;
54613
+ var L, G;
54477
54614
  if (!z.required)
54478
54615
  return;
54479
- const L = (G = (V = $.args) == null ? void 0 : V[z.key]) != null ? G : z.defaultValue;
54480
- b(z.componentType, L) && (M = !0, E = !0);
54616
+ const V = (G = (L = $.args) == null ? void 0 : L[z.key]) != null ? G : z.defaultValue;
54617
+ b(z.componentType, V) && (M = !0, E = !0);
54481
54618
  }), E && j.push($.key);
54482
54619
  });
54483
54620
  } catch ($) {
@@ -54516,10 +54653,10 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
54516
54653
  if (A.key === M) {
54517
54654
  let z = P(x({}, A.args), { [j]: R });
54518
54655
  z = f(A.name, z);
54519
- const L = S.find((V) => V.key === A.name);
54656
+ const V = S.find((L) => L.key === A.name);
54520
54657
  return P(x({}, A), {
54521
54658
  args: z,
54522
- paramsType: (E = L == null ? void 0 : L.paramsType) != null ? E : A.paramsType
54659
+ paramsType: (E = V == null ? void 0 : V.paramsType) != null ? E : A.paramsType
54523
54660
  });
54524
54661
  }
54525
54662
  return A;
@@ -54534,7 +54671,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
54534
54671
  }, T = (M) => {
54535
54672
  const j = S.find((R) => R.key === M.name);
54536
54673
  return j ? !j.hasValue || j.params.length === 0 ? /* @__PURE__ */ jsx("div", { style: { color: c.colorTextSecondary }, children: l("This validation rule has no additional parameters") }) : /* @__PURE__ */ jsx(Form$2, { size: "small", children: j.params.map((R) => {
54537
- var A, E, z, L, V, G, H;
54674
+ var A, E, z, V, L, G, H;
54538
54675
  let O = (E = (A = M.args) == null ? void 0 : A[R.key]) != null ? E : R.defaultValue;
54539
54676
  R.componentType === "radio" && R.key === "tlds" && (j.key === "email" || j.key === "domain") && (O = C(M.args));
54540
54677
  const $ = !!R.required && b(R.componentType, O);
@@ -54568,11 +54705,11 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
54568
54705
  else if (X === "disable")
54569
54706
  F(M.key, "tlds", !1);
54570
54707
  else if (X === "allow") {
54571
- const Q = (K = M.args) == null ? void 0 : K.tlds, ee = Array.isArray(Q == null ? void 0 : Q.allow) ? Q.allow : [];
54572
- F(M.key, "tlds", { allow: ee });
54708
+ const J = (K = M.args) == null ? void 0 : K.tlds, Z = Array.isArray(J == null ? void 0 : J.allow) ? J.allow : [];
54709
+ F(M.key, "tlds", { allow: Z });
54573
54710
  } else if (X === "deny") {
54574
- const Q = (Y = M.args) == null ? void 0 : Y.tlds, ee = Array.isArray(Q == null ? void 0 : Q.deny) ? Q.deny : [];
54575
- F(M.key, "tlds", { deny: ee });
54711
+ const J = (Y = M.args) == null ? void 0 : Y.tlds, Z = Array.isArray(J == null ? void 0 : J.deny) ? J.deny : [];
54712
+ F(M.key, "tlds", { deny: Z });
54576
54713
  }
54577
54714
  } else
54578
54715
  F(M.key, R.key, U.target.value);
@@ -54580,24 +54717,24 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
54580
54717
  children: (z = R.options) == null ? void 0 : z.map((U) => /* @__PURE__ */ jsx(Radio$1, { value: U.value, children: l(U.label) }, U.value))
54581
54718
  }
54582
54719
  ),
54583
- (L = R.options) == null ? void 0 : L.map((U) => {
54720
+ (V = R.options) == null ? void 0 : V.map((U) => {
54584
54721
  var K, Y, X;
54585
54722
  return U.value === O && U.componentType ? /* @__PURE__ */ jsx("div", { style: { marginTop: c.marginXS }, children: U.componentType === "text" ? (() => {
54586
- var ee;
54723
+ var Z;
54587
54724
  if (R.key === "tlds" && (U.value === "allow" || U.value === "deny")) {
54588
- const J = (ee = M.args) == null ? void 0 : ee.tlds, Z = Array.isArray(
54589
- U.value === "allow" ? J == null ? void 0 : J.allow : J == null ? void 0 : J.deny
54590
- ) ? U.value === "allow" ? J.allow : J.deny : [];
54725
+ const Q = (Z = M.args) == null ? void 0 : Z.tlds, ne = Array.isArray(
54726
+ U.value === "allow" ? Q == null ? void 0 : Q.allow : Q == null ? void 0 : Q.deny
54727
+ ) ? U.value === "allow" ? Q.allow : Q.deny : [];
54591
54728
  return /* @__PURE__ */ jsx(
54592
54729
  Select$1,
54593
54730
  {
54594
54731
  mode: "tags",
54595
- value: Z,
54732
+ value: ne,
54596
54733
  onChange: (te) => {
54597
- const re = Array.from(
54598
- new Set(te.map((se) => String(se).trim()).filter(Boolean))
54734
+ const se = Array.from(
54735
+ new Set(te.map((ce) => String(ce).trim()).filter(Boolean))
54599
54736
  );
54600
- U.value === "allow" ? F(M.key, "tlds", { allow: re }) : F(M.key, "tlds", { deny: re });
54737
+ U.value === "allow" ? F(M.key, "tlds", { allow: se }) : F(M.key, "tlds", { deny: se });
54601
54738
  },
54602
54739
  tokenSeparators: [",", " ", `
54603
54740
  `, " "],
@@ -54610,7 +54747,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
54610
54747
  Input$3,
54611
54748
  {
54612
54749
  value: "",
54613
- onChange: (J) => F(M.key, `${R.key}_${U.value}`, J.target.value),
54750
+ onChange: (Q) => F(M.key, `${R.key}_${U.value}`, Q.target.value),
54614
54751
  style: { width: "100%" }
54615
54752
  }
54616
54753
  );
@@ -54620,21 +54757,21 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
54620
54757
  precision: y ? void 0 : 0,
54621
54758
  step: y ? 0.1 : 1,
54622
54759
  value: ((K = M.args) == null ? void 0 : K[`${R.key}_${U.value}`]) || "",
54623
- onChange: (Q) => F(M.key, `${R.key}_${U.value}`, Q),
54760
+ onChange: (J) => F(M.key, `${R.key}_${U.value}`, J),
54624
54761
  style: { width: "100%" }
54625
54762
  }
54626
54763
  ) : U.componentType === "checkbox" ? /* @__PURE__ */ jsx(
54627
54764
  Checkbox$1,
54628
54765
  {
54629
54766
  checked: ((Y = M.args) == null ? void 0 : Y[`${R.key}_${U.value}`]) || !1,
54630
- onChange: (Q) => F(M.key, `${R.key}_${U.value}`, Q.target.checked),
54767
+ onChange: (J) => F(M.key, `${R.key}_${U.value}`, J.target.checked),
54631
54768
  children: l(U.label)
54632
54769
  }
54633
54770
  ) : U.componentType === "datePicker" ? /* @__PURE__ */ jsx(
54634
54771
  DatePicker$1,
54635
54772
  {
54636
54773
  value: (X = M.args) != null && X[`${R.key}_${U.value}`] ? dayjs(M.args[`${R.key}_${U.value}`]) : null,
54637
- onChange: (Q) => F(M.key, `${R.key}_${U.value}`, Q == null ? void 0 : Q.toISOString()),
54774
+ onChange: (J) => F(M.key, `${R.key}_${U.value}`, J == null ? void 0 : J.toISOString()),
54638
54775
  placeholder: l("Select date"),
54639
54776
  style: { width: "100%" }
54640
54777
  }
@@ -54649,7 +54786,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
54649
54786
  placeholder: l("Please select"),
54650
54787
  style: { width: "100%", height: "100%" },
54651
54788
  allowClear: !0,
54652
- children: (V = R.options) == null ? void 0 : V.map((U) => /* @__PURE__ */ jsx(Select$1.Option, { value: U.value, children: l(U.label) }, U.value))
54789
+ children: (L = R.options) == null ? void 0 : L.map((U) => /* @__PURE__ */ jsx(Select$1.Option, { value: U.value, children: l(U.label) }, U.value))
54653
54790
  }
54654
54791
  ),
54655
54792
  (G = R.options) == null ? void 0 : G.map((U) => U.value === O && U.componentType ? /* @__PURE__ */ jsx(Fragment$1, {}) : null)
@@ -55218,18 +55355,18 @@ const supportTypes = ["string", "bigInt", "integer", "uuid", "uid", "nanoid"], S
55218
55355
  var z;
55219
55356
  if (E.key === "systemInfo")
55220
55357
  A.push(P(x({}, E), {
55221
- children: E.children.filter((L) => L.hidden ? !1 : L.value === "tableoid" ? $ != null && $.length ? $.includes(L.value) : (l == null ? void 0 : l.dialect) === "postgres" : typeof o[L.value] == "boolean" ? o[L.value] : !0)
55358
+ children: E.children.filter((V) => V.hidden ? !1 : V.value === "tableoid" ? $ != null && $.length ? $.includes(V.value) : (l == null ? void 0 : l.dialect) === "postgres" : typeof o[V.value] == "boolean" ? o[V.value] : !0)
55222
55359
  }));
55223
55360
  else {
55224
- let L = [];
55225
- $ != null && $.length ? $.forEach((V) => {
55361
+ let V = [];
55362
+ $ != null && $.length ? $.forEach((L) => {
55226
55363
  var H;
55227
- const G = (H = E == null ? void 0 : E.children) == null ? void 0 : H.find((U) => [V, V.interface].includes(U.name));
55228
- G && L.push(P(x({}, G), {
55229
- targetScope: V == null ? void 0 : V.targetScope
55364
+ const G = (H = E == null ? void 0 : E.children) == null ? void 0 : H.find((U) => [L, L.interface].includes(U.name));
55365
+ G && V.push(P(x({}, G), {
55366
+ targetScope: L == null ? void 0 : L.targetScope
55230
55367
  }));
55231
- }) : O != null && O.length ? L = (z = E == null ? void 0 : E.children) == null ? void 0 : z.filter((V) => !O.includes(V.name)) : L = E == null ? void 0 : E.children, L != null && L.length && A.push(P(x({}, E), {
55232
- children: L
55368
+ }) : O != null && O.length ? V = (z = E == null ? void 0 : E.children) == null ? void 0 : z.filter((L) => !O.includes(L.name)) : V = E == null ? void 0 : E.children, V != null && V.length && A.push(P(x({}, E), {
55369
+ children: V
55233
55370
  }));
55234
55371
  }
55235
55372
  }), A;
@@ -55520,7 +55657,7 @@ const supportTypes = ["string", "bigInt", "integer", "uuid", "uid", "nanoid"], S
55520
55657
  run() {
55521
55658
  return q(this, null, function* () {
55522
55659
  yield j.submit();
55523
- const z = cloneDeep(j.values), L = omit(z, [
55660
+ const z = cloneDeep(j.values), V = omit(z, [
55524
55661
  "key",
55525
55662
  "uiSchemaUid",
55526
55663
  "collectionName",
@@ -55533,7 +55670,7 @@ const supportTypes = ["string", "bigInt", "integer", "uuid", "uid", "nanoid"], S
55533
55670
  // 'reverseField.uiSchemaUid',
55534
55671
  ]);
55535
55672
  yield A.create({
55536
- values: L
55673
+ values: V
55537
55674
  }), yield j.reset(), yield O(), yield R(), $.setVisible(!1);
55538
55675
  });
55539
55676
  }
@@ -56027,13 +56164,13 @@ const getSchema$4 = (e, t, n) => {
56027
56164
  useEffect(() => {
56028
56165
  const R = [];
56029
56166
  g.forEach((O) => {
56030
- var L;
56031
- const $ = v(O), E = w(O).map((V) => {
56032
- const G = T(V, O);
56167
+ var V;
56168
+ const $ = v(O), E = w(O).map((L) => {
56169
+ const G = T(L, O);
56033
56170
  return {
56034
56171
  type: "group",
56035
- key: V,
56036
- label: l("Parent collection fields") + l(`(${v(V).title})`),
56172
+ key: L,
56173
+ label: l("Parent collection fields") + l(`(${v(L).title})`),
56037
56174
  children: G.filter((H) => !["hasOne", "hasMany", "belongsToMany"].includes(H == null ? void 0 : H.type)).map((H) => {
56038
56175
  var U;
56039
56176
  return {
@@ -56042,9 +56179,9 @@ const getSchema$4 = (e, t, n) => {
56042
56179
  };
56043
56180
  })
56044
56181
  };
56045
- }), z = (L = $.fields.filter((V) => !["obo", "oho", "m2m", "o2m"].includes(V == null ? void 0 : V.interface))) == null ? void 0 : L.map((V) => {
56182
+ }), z = (V = $.fields.filter((L) => !["obo", "oho", "m2m", "o2m"].includes(L == null ? void 0 : L.interface))) == null ? void 0 : V.map((L) => {
56046
56183
  var G;
56047
- return { value: V.name, key: V.name, label: l(((G = V.uiSchema) == null ? void 0 : G.title) || V.name) };
56184
+ return { value: L.name, key: L.name, label: l(((G = L.uiSchema) == null ? void 0 : G.title) || L.name) };
56048
56185
  }).concat(E);
56049
56186
  R.push({
56050
56187
  value: O,
@@ -56058,21 +56195,21 @@ const getSchema$4 = (e, t, n) => {
56058
56195
  if (R) {
56059
56196
  u(!1), p([]);
56060
56197
  const A = ($ = Object.values((O = R == null ? void 0 : R.data) == null ? void 0 : O.fields)) == null ? void 0 : $.map((E) => {
56061
- var L, V;
56198
+ var V, L;
56062
56199
  const z = (a == null ? void 0 : a.data.find((G) => G.name === E.name)) || E;
56063
56200
  if (!(z != null && z.uiSchema)) {
56064
56201
  const G = I(E.interface);
56065
56202
  z.uiSchema = (G == null ? void 0 : G.default.uiSchema) || {};
56066
56203
  }
56067
56204
  return E.source ? P(x({}, E), {
56068
- uiSchema: P(x({}, omit(z.uiSchema, "rawTitle")), { title: ((L = z.uiSchema) == null ? void 0 : L.title) || z.name })
56069
- }) : P(x({}, z), {
56070
56205
  uiSchema: P(x({}, omit(z.uiSchema, "rawTitle")), { title: ((V = z.uiSchema) == null ? void 0 : V.title) || z.name })
56206
+ }) : P(x({}, z), {
56207
+ uiSchema: P(x({}, omit(z.uiSchema, "rawTitle")), { title: ((L = z.uiSchema) == null ? void 0 : L.title) || z.name })
56071
56208
  });
56072
56209
  });
56073
56210
  S.value = A, setTimeout(() => {
56074
- var E, z, L;
56075
- p(A), y.setValuesIn("sources", (E = R.data) == null ? void 0 : E.sources), f((z = R.data) == null ? void 0 : z.sources), b((L = R == null ? void 0 : R.data) == null ? void 0 : L.unsupportedFields);
56211
+ var E, z, V;
56212
+ p(A), y.setValuesIn("sources", (E = R.data) == null ? void 0 : E.sources), f((z = R.data) == null ? void 0 : z.sources), b((V = R == null ? void 0 : R.data) == null ? void 0 : V.unsupportedFields);
56076
56213
  });
56077
56214
  }
56078
56215
  }).catch);
@@ -56080,8 +56217,8 @@ const getSchema$4 = (e, t, n) => {
56080
56217
  const M = (R, O) => {
56081
56218
  const $ = _.cloneDeep(d);
56082
56219
  $[O] = R, p($), S.value = $.map((A) => {
56083
- var z, L, V;
56084
- const E = typeof A.source == "string" ? A.source : (V = (L = (z = A.source) == null ? void 0 : z.filter) == null ? void 0 : L.call(z, Boolean)) == null ? void 0 : V.join(".");
56220
+ var z, V, L;
56221
+ const E = typeof A.source == "string" ? A.source : (L = (V = (z = A.source) == null ? void 0 : z.filter) == null ? void 0 : V.call(z, Boolean)) == null ? void 0 : L.join(".");
56085
56222
  return P(x({}, A), {
56086
56223
  source: E
56087
56224
  });
@@ -56106,8 +56243,8 @@ const getSchema$4 = (e, t, n) => {
56106
56243
  style: { width: "100%" },
56107
56244
  options: D(m),
56108
56245
  onChange: (A, E) => {
56109
- var L;
56110
- const z = (L = F(A == null ? void 0 : A[0])) == null ? void 0 : L.find((V) => V.name === last(A));
56246
+ var V;
56247
+ const z = (V = F(A == null ? void 0 : A[0])) == null ? void 0 : V.find((L) => L.name === last(A));
56111
56248
  M(P(x({}, O), { source: A, uiSchema: z == null ? void 0 : z.uiSchema }), $);
56112
56249
  },
56113
56250
  placeholder: l("Select field source")
@@ -56149,7 +56286,7 @@ const getSchema$4 = (e, t, n) => {
56149
56286
  onChange: (z) => {
56150
56287
  M(P(x({}, A), { interface: z }), $);
56151
56288
  },
56152
- children: E.map((z) => /* @__PURE__ */ jsx(Select$1.OptGroup, { label: D(z.label), children: z.children.map((L) => /* @__PURE__ */ jsx(Select$1.Option, { value: L.name, children: D(L.label) }, L.value)) }, z.key))
56289
+ children: E.map((z) => /* @__PURE__ */ jsx(Select$1.OptGroup, { label: D(z.label), children: z.children.map((V) => /* @__PURE__ */ jsx(Select$1.Option, { value: V.name, children: D(V.label) }, V.value)) }, z.key))
56153
56290
  }
56154
56291
  );
56155
56292
  }
@@ -56229,7 +56366,7 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
56229
56366
  key: I.name,
56230
56367
  width: 200,
56231
56368
  render: ($, A, E) => {
56232
- const z = A[I.name], L = {
56369
+ const z = A[I.name], V = {
56233
56370
  type: "object",
56234
56371
  properties: {
56235
56372
  [I.name]: {
@@ -56241,7 +56378,7 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
56241
56378
  }
56242
56379
  }
56243
56380
  };
56244
- return /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: /* @__PURE__ */ jsx(RecursionField, { schema: L, name: E, onlyRenderProperties: !0 }) });
56381
+ return /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: /* @__PURE__ */ jsx(RecursionField, { schema: V, name: E, onlyRenderProperties: !0 }) });
56245
56382
  }
56246
56383
  };
56247
56384
  });
@@ -65151,16 +65288,16 @@ const ActionInitializerItem = (e) => {
65151
65288
  }, A = (Y) => {
65152
65289
  M(Y), d(Y), p == null || p(Y);
65153
65290
  }, E = (Y) => {
65154
- var Q;
65155
- const X = (Q = h == null ? void 0 : h[0]) == null ? void 0 : Q.filter;
65291
+ var J;
65292
+ const X = (J = h == null ? void 0 : h[0]) == null ? void 0 : J.filter;
65156
65293
  (y || X) && g(P(x({}, h == null ? void 0 : h[0]), {
65157
65294
  filter: f
65158
65295
  })), v(!y), Y.stopPropagation();
65159
65296
  }, z = (Y) => {
65160
65297
  Y.stopPropagation();
65161
- }, L = (Y) => {
65298
+ }, V = (Y) => {
65162
65299
  m(Y);
65163
- }, V = (K = i.title) != null ? K : (U = a == null ? void 0 : a.uiSchema) == null ? void 0 : U.title;
65300
+ }, L = (K = i.title) != null ? K : (U = a == null ? void 0 : a.uiSchema) == null ? void 0 : U.title;
65164
65301
  return t(
65165
65302
  /* @__PURE__ */ jsxs(SortableItem, { className: cls(n, o, "nb-block-item", e.className, "SortableItem"), children: [
65166
65303
  /* @__PURE__ */ jsx(l, {}),
@@ -65177,7 +65314,7 @@ const ActionInitializerItem = (e) => {
65177
65314
  },
65178
65315
  gutter: 5,
65179
65316
  children: [
65180
- /* @__PURE__ */ jsx(Col, { title: c(V), className: "headerCol", children: y ? /* @__PURE__ */ jsx(
65317
+ /* @__PURE__ */ jsx(Col, { title: c(L), className: "headerCol", children: y ? /* @__PURE__ */ jsx(
65181
65318
  Input$3,
65182
65319
  {
65183
65320
  bordered: !1,
@@ -65185,9 +65322,9 @@ const ActionInitializerItem = (e) => {
65185
65322
  placeholder: "Search...",
65186
65323
  className: "search",
65187
65324
  onClick: z,
65188
- onChange: L
65325
+ onChange: V
65189
65326
  }
65190
- ) : c(V) }),
65327
+ ) : c(L) }),
65191
65328
  /* @__PURE__ */ jsx(
65192
65329
  Col,
65193
65330
  {
@@ -65634,14 +65771,14 @@ const DataBlockInitializer = (e) => {
65634
65771
  componentType: o,
65635
65772
  menuName: a
65636
65773
  });
65637
- const { item: L, fromOthersInPopup: V } = z;
65774
+ const { item: V, fromOthersInPopup: L } = z;
65638
65775
  if (f)
65639
65776
  return f(z);
65640
- if (L.template) {
65641
- const G = yield w(L);
65642
- v(t ? t(G, { item: L, fromOthersInPopup: V }) : G);
65777
+ if (V.template) {
65778
+ const G = yield w(V);
65779
+ v(t ? t(G, { item: V, fromOthersInPopup: L }) : G);
65643
65780
  } else
65644
- L.schemaInsertor ? yield L.schemaInsertor(v, { item: L, name: a, fromOthersInPopup: V }) : n && n({ item: L, fromOthersInPopup: V });
65781
+ V.schemaInsertor ? yield V.schemaInsertor(v, { item: V, name: a, fromOthersInPopup: L }) : n && n({ item: V, fromOthersInPopup: L });
65645
65782
  I(!1);
65646
65783
  }),
65647
65784
  [
@@ -65670,14 +65807,14 @@ const DataBlockInitializer = (e) => {
65670
65807
  currentText: b,
65671
65808
  otherText: S
65672
65809
  }), N = useGetSchemaInitializerMenuItems(D), M = useMemo(() => N(B, a), [N, B, a]), [j, R] = useState([]), O = useMenuSearch({ data: M, openKeys: j, hideSearch: u }), $ = useMemo(() => {
65673
- let z = O.filter((L) => L.key !== "search" && L.key !== "empty");
65810
+ let z = O.filter((V) => V.key !== "search" && V.key !== "empty");
65674
65811
  return p && z.length === 1 ? z = z[0].children : z = O, [
65675
65812
  {
65676
65813
  key: a,
65677
65814
  label: F(i),
65678
65815
  icon: typeof r == "string" ? /* @__PURE__ */ jsx(antIcons__default, { type: r }) : r,
65679
- onClick: (L) => {
65680
- L.key === a && D(P(x({}, L), { item: e }));
65816
+ onClick: (V) => {
65817
+ V.key === a && D(P(x({}, V), { item: e }));
65681
65818
  },
65682
65819
  children: z
65683
65820
  }