@nocobase/client 1.7.4 → 1.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/es/index.mjs +1041 -1035
  2. package/lib/index.js +9 -9
  3. package/package.json +5 -5
package/es/index.mjs CHANGED
@@ -58,21 +58,21 @@ import * as ahooks from "ahooks";
58
58
  import { useSetState, useRequest as useRequest$1, useBoolean, useUpdate, useMemoizedFn, useDeepCompareEffect, useEventListener, useLocalStorageState, useCreation, useDebounce } from "ahooks";
59
59
  import * as antd from "antd";
60
60
  import { notification, ConfigProvider, theme, message, Result, Button, Space as Space$1, Radio as Radio$1, Input as Input$3, Tag, Spin, App, Popover, Menu as Menu$1, Modal, Typography, Tooltip, Skeleton, Table as Table$3, Select as Select$1, DatePicker as DatePicker$1, Cascader as Cascader$1, Slider, Switch, Card, Empty, Collapse, Badge, Tree as Tree$2, Dropdown, Alert, Image, InputNumber as InputNumber$1, Drawer as Drawer$1, Divider as Divider$1, QRCode, Tabs as Tabs$1, TreeSelect as TreeSelect$2, Upload as Upload$1, Progress, AutoComplete as AutoComplete$1, Checkbox as Checkbox$1, ColorPicker as ColorPicker$1, List as List$1, Col, Flex, Pagination as Pagination$1, TimePicker as TimePicker$1, Row, Popconfirm, Layout as Layout$1 } from "antd";
61
- import _, { filter, capitalize, cloneDeep as cloneDeep$1, set, isArray, every, some, findIndex, isFunction, get, isObject as isObject$1, isEmpty as isEmpty$1, isString, omit, last, first, isEqual, concat, clone, debounce, castArray, uniqBy, differenceBy, unionBy, isBoolean, groupBy, toString, uniq as uniq$2, pick as pick$1 } from "lodash";
61
+ import _, { filter, capitalize, cloneDeep as cloneDeep$1, set, every, some, findIndex, isArray, isFunction, get, isObject as isObject$1, isEmpty as isEmpty$1, isString, omit, last, first, isEqual, concat, clone, debounce, castArray, uniqBy, differenceBy, unionBy, isBoolean, groupBy, toString, uniq as uniq$2, pick as pick$1 } from "lodash";
62
62
  import template from "lodash/template";
63
- import React, { createContext, useContext, useMemo, Fragment, useCallback, useEffect, memo, useState, useRef, Suspense, createElement, isValidElement, lazy as lazy$1, useLayoutEffect, startTransition, forwardRef, useImperativeHandle, useDeferredValue, createRef } from "react";
63
+ import React, { createContext, useContext, useMemo, Fragment, useCallback, useEffect, memo, useState, useRef, Suspense, createElement, isValidElement, lazy as lazy$1, useDeferredValue, useLayoutEffect, startTransition, forwardRef, useImperativeHandle, createRef } from "react";
64
64
  import * as ReactRouterDom from "react-router-dom";
65
65
  import { useParams, useHref, useSearchParams, useLocation, useNavigate, UNSAFE_LocationContext, UNSAFE_RouteContext, UNSAFE_DataRouterContext, UNSAFE_DataRouterStateContext, Outlet, createHashRouter, createBrowserRouter, createMemoryRouter, useRouteError, RouterProvider, Router, Navigate, Link as Link$1, NavLink, useOutletContext } from "react-router-dom";
66
66
  import * as formilyShared from "@formily/shared";
67
67
  import { merge, uid, isFn, applyMiddleware, isNum as isNum$1, isStr, isBool, isArr, toArr as toArr$3, isReactElement, isValid, FormPath, each, isEmpty as isEmpty$2 } from "@formily/shared";
68
68
  import * as formilyJsonReactive from "@formily/reactive";
69
- import { observable, define, reaction, untracked, action, autorun, toJS, raw } from "@formily/reactive";
69
+ import { observable, reaction, define, untracked, action, autorun, toJS, raw } from "@formily/reactive";
70
70
  import * as ReactDOM from "react-dom";
71
71
  import ReactDOM__default, { createPortal } from "react-dom";
72
72
  import * as antdCssinjs from "@ant-design/cssinjs";
73
73
  import { useStyleRegister } from "@ant-design/cssinjs";
74
74
  import * as nocobaseClientUtils from "@nocobase/utils/client";
75
- import { isPlainObject, tval as tval$1, toGmt, toLocal, getDefaultFormat, str2moment, getPickerFormat, Handlebars, dayjs as dayjs$1, flatten, getValuesByPath, isPortalInBody, uid as uid$1, error, getDateTimeFormat, unflatten as unflatten$1, sortTree, forEach, transformMultiColumnToSingleColumn, getDayRangeByParams, isURL, parse, nextTick, toFixedByStep, parseHTML } from "@nocobase/utils/client";
75
+ import { isPlainObject, tval as tval$1, toGmt, toLocal, getDefaultFormat, str2moment, getPickerFormat, Handlebars, dayjs as dayjs$1, uid as uid$1, getValuesByPath, flatten, isPortalInBody, error, getDateTimeFormat, unflatten as unflatten$1, sortTree, forEach, transformMultiColumnToSingleColumn, getDayRangeByParams, isURL, parse, nextTick, toFixedByStep, parseHTML } from "@nocobase/utils/client";
76
76
  import cls from "classnames";
77
77
  import debounce$1 from "lodash/debounce";
78
78
  import { ErrorBoundary } from "react-error-boundary";
@@ -6284,7 +6284,7 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
6284
6284
  const B = i(R.interface);
6285
6285
  if (!(B != null && B.filterable))
6286
6286
  return;
6287
- const { nested: N, children: M, operators: L } = B.filterable, w = {
6287
+ const { nested: N, children: $, operators: L } = B.filterable, w = {
6288
6288
  name: R.name,
6289
6289
  title: ((O = R == null ? void 0 : R.uiSchema) == null ? void 0 : O.title) || R.name,
6290
6290
  schema: R == null ? void 0 : R.uiSchema,
@@ -6294,17 +6294,17 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
6294
6294
  if (!(R.target && D > 2)) {
6295
6295
  if (D > 2)
6296
6296
  return w;
6297
- if (M != null && M.length && (w.children = M), N) {
6298
- const k = n(R.target), $ = I(k, D + 1).filter(Boolean);
6299
- w.children = w.children || [], w.children.push(...$);
6297
+ if ($ != null && $.length && (w.children = $), N) {
6298
+ const k = n(R.target), M = I(k, D + 1).filter(Boolean);
6299
+ w.children = w.children || [], w.children.push(...M);
6300
6300
  }
6301
6301
  return w;
6302
6302
  }
6303
6303
  }, I = (R, D) => {
6304
6304
  const B = [];
6305
6305
  return R.forEach((N) => {
6306
- const M = F(N, D);
6307
- M && B.push(M);
6306
+ const $ = F(N, D);
6307
+ $ && B.push($);
6308
6308
  }), B;
6309
6309
  };
6310
6310
  return I(v, 1);
@@ -6568,159 +6568,7 @@ const InternalFormBlockProvider = (e) => {
6568
6568
  e = e.parent;
6569
6569
  }
6570
6570
  return null;
6571
- }, setDataLoadingModeSettingsItem = {
6572
- name: "setDataLoadingMode",
6573
- Component: SetDataLoadingMode
6574
- };
6575
- function useDataLoadingMode() {
6576
- const { dataLoadingMode: e } = useDataBlockProps() || {};
6577
- return e || "auto";
6578
- }
6579
- function SetDataLoadingMode() {
6580
- var c;
6581
- const { dn: e } = useDesignable(), { t } = useTranslation(), o = useField(), n = useFieldSchema(), r = useCollection(), { getEnableFieldTree: a, getOnLoadData: i } = useCollectionState(r == null ? void 0 : r.name), { getDataBlockRequest: l } = useDataBlockRequestGetter();
6582
- return /* @__PURE__ */ jsx(
6583
- SchemaSettingsModalItem,
6584
- {
6585
- title: t("Set data loading mode"),
6586
- scope: { getEnableFieldTree: a, name: r == null ? void 0 : r.name, getOnLoadData: i },
6587
- schema: {
6588
- type: "object",
6589
- title: t("Data loading mode"),
6590
- properties: {
6591
- dataLoadingMode: {
6592
- "x-decorator": "FormItem",
6593
- "x-component": "Radio.Group",
6594
- default: ((c = n["x-decorator-props"]) == null ? void 0 : c.dataLoadingMode) || "auto",
6595
- enum: [
6596
- { value: "auto", label: t("Load all data when filter is empty") },
6597
- { value: "manual", label: t("Do not load data when filter is empty") }
6598
- ]
6599
- }
6600
- }
6601
- },
6602
- onSubmit: ({ dataLoadingMode: u }) => {
6603
- const d = l();
6604
- _.set(n, "x-decorator-props.dataLoadingMode", u), o.decoratorProps.dataLoadingMode = u, e.emit("patch", {
6605
- schema: {
6606
- "x-uid": n["x-uid"],
6607
- "x-decorator-props": x({}, n["x-decorator-props"])
6608
- }
6609
- }), e.refresh(), u === "auto" ? d.run() : d.mutate(void 0);
6610
- }
6611
- }
6612
- );
6613
- }
6614
- const useSourceKey = (e) => useCollectionManager().getSourceKeyByAssociation(e), KeepAliveContext = createContext(!0), DesignableInterceptor = ({ children: e, active: t }) => {
6615
- const o = useContext(SchemaComponentContext), n = useContext(SchemaOptionsContext), r = useContext(SchemaComponentsContext), a = useContext(SchemaExpressionScopeContext), i = useContext(ACLContext), l = useRef(o), c = useRef(n), u = useRef(r), d = useRef(a), p = useRef(i);
6616
- return t && (l.current = o, c.current = n, u.current = r, d.current = a, p.current = i), /* @__PURE__ */ jsx(SchemaComponentContext.Provider, { value: l.current, children: /* @__PURE__ */ jsx(SchemaOptionsContext.Provider, { value: c.current, children: /* @__PURE__ */ jsx(SchemaComponentsContext.Provider, { value: u.current, children: /* @__PURE__ */ jsx(SchemaExpressionScopeContext.Provider, { value: d.current, children: /* @__PURE__ */ jsx(ACLContext.Provider, { value: p.current, children: e }) }) }) }) });
6617
- }, hidden = { display: "none" }, KeepAliveProvider = memo(
6618
- ({ children: e, active: t, parentActive: o }) => {
6619
- const n = useContext(UNSAFE_LocationContext), r = useContext(UNSAFE_RouteContext), a = useContext(UNSAFE_DataRouterContext), i = useContext(UNSAFE_DataRouterStateContext), l = useContext(IsSubPageClosedByPageMenuContext), c = useContext(Context), u = useContext(RouteContext), d = useRef(n), p = useRef(r), m = useRef(a), h = useRef(i), g = useRef(l), f = useRef(c), C = useRef(u);
6620
- t && (m.current = a, h.current = i, g.current = l, f.current = c, C.current = u), t && // Skip comparing location key to improve LocationContext rendering performance
6621
- !_.isEqual(_.omit(d.current.location, "key"), _.omit(n.location, "key")) && (d.current = n), t && !_.isEqual(p.current, r) && (p.current = r);
6622
- const b = /* @__PURE__ */ jsx(RouteContext.Provider, { value: C.current, children: /* @__PURE__ */ jsx(Context.Provider, { value: f.current, children: /* @__PURE__ */ jsx(UNSAFE_DataRouterContext.Provider, { value: m.current, children: /* @__PURE__ */ jsx(UNSAFE_DataRouterStateContext.Provider, { value: h.current, children: /* @__PURE__ */ jsx(UNSAFE_LocationContext.Provider, { value: d.current, children: /* @__PURE__ */ jsx(UNSAFE_RouteContext.Provider, { value: p.current, children: /* @__PURE__ */ jsx(KeepAliveContext.Provider, { value: o === !1 ? !1 : t, children: /* @__PURE__ */ jsx(DesignableInterceptor, { active: t, children: /* @__PURE__ */ jsx(IsSubPageClosedByPageMenuContext.Provider, { value: g.current, children: e }) }) }) }) }) }) }) }) });
6623
- return /* @__PURE__ */ jsx("div", { style: t ? null : hidden, children: b });
6624
- }
6625
- ), useKeepAlive = () => ({ active: useContext(KeepAliveContext) }), getMaxPageCount = () => {
6626
- let t = 5;
6627
- try {
6628
- const o = navigator.deviceMemory;
6629
- if (o)
6630
- return Math.min(Math.max(5, o * 3), 20);
6631
- const n = performance.memory;
6632
- if (n != null && n.jsHeapSizeLimit) {
6633
- const i = n.jsHeapSizeLimit / 1073741824;
6634
- return Math.min(Math.max(5, Math.floor(i * 3)), 20);
6635
- }
6636
- const r = performance.now();
6637
- for (let i = 0; i < 1e6; i++)
6638
- ;
6639
- const a = performance.now() - r;
6640
- return a < 3 ? t = 20 : a < 5 ? t = 10 : a < 10 && (t = 5), t;
6641
- } catch (o) {
6642
- return 5;
6643
- }
6644
- }, MAX_RENDERED_PAGE_COUNT = getMaxPageCount(), KeepAlive = React.memo(({ children: e, uid: t }) => {
6645
- const { active: o } = useKeepAlive(), n = useRef([]);
6646
- return n.current.includes(t) || (n.current.push(t), n.current.length > MAX_RENDERED_PAGE_COUNT && (n.current = n.current.slice(-MAX_RENDERED_PAGE_COUNT))), /* @__PURE__ */ jsx(Fragment$1, { children: n.current.map((r) => /* @__PURE__ */ jsx(KeepAliveProvider, { active: r === t, parentActive: o, children: e(r) }, r)) });
6647
- });
6648
- KeepAlive.displayName = "KeepAlive";
6649
- const DEBOUNCE_WAIT = 100, LOADING_DELAY = void 0, EMPTY_OBJECT = Object.freeze({});
6650
- class CollectionRecord {
6651
- constructor(t) {
6652
- A(this, "data");
6653
- A(this, "parentRecord");
6654
- A(this, "isNew");
6655
- const { data: o, parentRecord: n, isNew: r } = t;
6656
- this.isNew = r, this.data = o, this.parentRecord = n;
6657
- }
6658
- setData(t) {
6659
- this.data = t;
6660
- }
6661
- setParentRecord(t) {
6662
- this.parentRecord = t;
6663
- }
6664
- }
6665
- const CollectionRecordContext = createContext(null);
6666
- CollectionRecordContext.displayName = "CollectionRecordContext";
6667
- const CollectionRecordProvider = React.memo(
6668
- ({ isNew: e, record: t, parentRecord: o, children: n }) => {
6669
- const r = useMemo(() => {
6670
- if (o)
6671
- return o instanceof CollectionRecord ? o : new CollectionRecord({ data: o });
6672
- if (t instanceof CollectionRecord)
6673
- return t.parentRecord;
6674
- }, [o, t]), a = useMemo(() => {
6675
- let i;
6676
- return t ? t instanceof CollectionRecord ? (i = t, i.isNew = t.isNew || e) : i = new CollectionRecord({ data: t, isNew: e }) : i = new CollectionRecord({ isNew: e }), i.setParentRecord(r), i;
6677
- }, [t, r, e]);
6678
- return /* @__PURE__ */ jsx(CollectionRecordContext.Provider, { value: a, children: n });
6679
- }
6680
- );
6681
- CollectionRecordProvider.displayName = "CollectionRecordProvider";
6682
- function useCollectionRecord() {
6683
- return useContext(CollectionRecordContext);
6684
- }
6685
- function useCollectionRecordData() {
6686
- const e = useCollectionRecord();
6687
- return e == null ? void 0 : e.data;
6688
- }
6689
- function useCollectionParentRecord() {
6690
- const e = useCollectionRecord();
6691
- return e == null ? void 0 : e.parentRecord;
6692
- }
6693
- function useCollectionParentRecordData() {
6694
- var t;
6695
- const e = useCollectionRecord();
6696
- return (t = e == null ? void 0 : e.parentRecord) == null ? void 0 : t.data;
6697
- }
6698
- const DataBlockResourceContext$1 = createContext(null);
6699
- DataBlockResourceContext$1.displayName = "DataBlockResourceContext";
6700
- const DataBlockResourceProvider = ({ children: e }) => {
6701
- const t = useDataBlockProps(), o = useCollectionManager(), { association: n, collection: r, dataSource: a, sourceId: i, parentRecord: l } = t, c = useAPIClient(), u = useDataSourceHeaders(a), d = useMemo(() => typeof r == "string" ? r : r == null ? void 0 : r.name, [r]), p = useMemo(() => {
6702
- if (i)
6703
- return i;
6704
- if (n && l) {
6705
- const h = o.getSourceKeyByAssociation(n), g = l instanceof CollectionRecord ? l.data : l;
6706
- if (isArray(h)) {
6707
- const f = {};
6708
- for (const C of h)
6709
- f[C] = g == null ? void 0 : g[C];
6710
- return encodeURIComponent(JSON.stringify(f));
6711
- } else
6712
- return g[h];
6713
- }
6714
- }, [n, i, l]), m = useMemo(() => n ? c.resource(n, p, u, !p) : c.resource(d, void 0, u), [c, n, r, p, u]);
6715
- return /* @__PURE__ */ jsx(DataBlockResourceContext$1.Provider, { value: m, children: e });
6716
- };
6717
- function useDataBlockResource() {
6718
- const e = useContext(DataBlockResourceContext$1);
6719
- if (!e)
6720
- throw new Error("useDataBlockResource() must be used within a DataBlockResourceProvider");
6721
- return e;
6722
- }
6723
- const REGEX_OF_VARIABLE = /^\s*\{\{\s*([\p{L}0-9_$-.]+?)\s*\}\}\s*$/u, REGEX_OF_VARIABLE_IN_EXPRESSION = /\{\{\s*([a-zA-Z0-9_$-.]+?)\s*\}\}/g, isVariable$1 = (e) => !(typeof e != "string" || !e.match(REGEX_OF_VARIABLE)), getVariablesFromExpression = (e) => {
6571
+ }, REGEX_OF_VARIABLE = /^\s*\{\{\s*([\p{L}0-9_$-.]+?)\s*\}\}\s*$/u, REGEX_OF_VARIABLE_IN_EXPRESSION = /\{\{\s*([a-zA-Z0-9_$-.]+?)\s*\}\}/g, isVariable$1 = (e) => !(typeof e != "string" || !e.match(REGEX_OF_VARIABLE)), getVariablesFromExpression = (e) => {
6724
6572
  const t = e.match(REGEX_OF_VARIABLE_IN_EXPRESSION);
6725
6573
  return t || [];
6726
6574
  }, transformVariableValue = (e, t) => {
@@ -6990,6 +6838,465 @@ function getRenderContent(e, t, o, n, r) {
6990
6838
  }
6991
6839
  });
6992
6840
  }
6841
+ const getPath = (e) => e && e.match(REGEX_OF_VARIABLE)[0].replace(REGEX_OF_VARIABLE, "$1"), getVariableName = (e) => _.isString(e) ? getPath(e).split(".")[0] : e;
6842
+ var ActionType = /* @__PURE__ */ ((e) => (e.Visible = "visible", e.Editable = "editable", e.ReadOnly = "disabled", e.ReadPretty = "readPretty", e.None = "none", e.Hidden = "hidden", e.Required = "required", e.InRequired = "notRequired", e.Disabled = "disabled", e.Value = "value", e.Active = "enabled", e.Color = "color", e.BackgroundColor = "backgroundColor", e.TextAlign = "textAlign", e.Options = "options", e.DateScope = "dateScope", e.FontSize = "fontSize", e.FontWeight = "fontWeight", e.FontStyle = "fontStyle", e))(ActionType || {}), LinkageRuleCategory = /* @__PURE__ */ ((e) => (e.default = "default", e.style = "style", e.button = "button", e.block = "block", e))(LinkageRuleCategory || {});
6843
+ const LinkageRuleDataKeyMap = {
6844
+ style: "x-linkage-style-rules",
6845
+ default: "x-linkage-rules",
6846
+ button: "x-linkage-rules",
6847
+ block: "x-block-linkage-rules"
6848
+ };
6849
+ function bindLinkageRulesToFiled({
6850
+ field: e,
6851
+ linkageRules: t,
6852
+ formValues: o,
6853
+ localVariables: n,
6854
+ action: r,
6855
+ rule: a,
6856
+ variables: i,
6857
+ variableNameOfLeftCondition: l
6858
+ }, c) {
6859
+ var u, d, p, m, h, g;
6860
+ return e.initStateOfLinkageRules = {
6861
+ display: ((u = e.initStateOfLinkageRules) == null ? void 0 : u.display) || getTempFieldState(!0, e.display),
6862
+ required: ((d = e.initStateOfLinkageRules) == null ? void 0 : d.required) || getTempFieldState(!0, e.required || !1),
6863
+ pattern: ((p = e.initStateOfLinkageRules) == null ? void 0 : p.pattern) || getTempFieldState(!0, e.pattern),
6864
+ value: ((m = e.initStateOfLinkageRules) == null ? void 0 : m.value) || getTempFieldState(!0, e.value || e.initialValue),
6865
+ dataSource: ((h = e.initStateOfLinkageRules) == null ? void 0 : h.dataSource) || getTempFieldState(!0, e.dataSource || e.options),
6866
+ dateScope: ((g = e.initStateOfLinkageRules) == null ? void 0 : g.dateScope) || getTempFieldState(!0, null)
6867
+ }, reaction(
6868
+ // 这里共依赖 3 部分,当这 3 部分中的任意一部分发生变更后,需要触发联动规则:
6869
+ // 1. 条件中的字段值;
6870
+ // 2. 条件中的变量值;
6871
+ // 3. value 表达式中的变量值;
6872
+ () => (getFieldValuesInCondition({ linkageRules: t, formValues: o }), getVariableValuesInCondition({ linkageRules: t, localVariables: n }), getVariableValuesInExpression({ action: r, localVariables: n }), uid$1()),
6873
+ getSubscriber({ action: r, field: e, rule: a, variables: i, localVariables: n, variableNameOfLeftCondition: l }, c),
6874
+ { fireImmediately: !0, equals: _.isEqual }
6875
+ );
6876
+ }
6877
+ function getFieldValuesInCondition({ linkageRules: e, formValues: t }) {
6878
+ return e.map((o) => {
6879
+ const n = (r) => {
6880
+ const a = Object.keys(r)[0] || "$and";
6881
+ return r[a].map((l) => {
6882
+ if ("$and" in l || "$or" in l)
6883
+ return n(l);
6884
+ const c = getTargetField$1(l).join(".");
6885
+ return getValuesByPath(t, c);
6886
+ }).filter(Boolean);
6887
+ };
6888
+ return n(o.condition);
6889
+ });
6890
+ }
6891
+ function getVariableValuesInCondition({
6892
+ linkageRules: e,
6893
+ localVariables: t
6894
+ }) {
6895
+ return e.map((o) => {
6896
+ const n = Object.keys(o.condition)[0] || "$and", r = o.condition[n];
6897
+ return o.conditionType === "advanced" ? r.map((a) => {
6898
+ if (!a)
6899
+ return null;
6900
+ if (a.$and || a.$or)
6901
+ return getVariableValuesInCondition({
6902
+ linkageRules: [{ conditionType: "advanced", condition: a }],
6903
+ localVariables: t
6904
+ });
6905
+ const i = (l) => isVariable$1(l) ? getVariableValue$1(l, t) : l;
6906
+ return {
6907
+ leftVar: i(a.leftVar),
6908
+ rightVar: i(a.rightVar)
6909
+ };
6910
+ }).filter(Boolean) : r.map((a) => {
6911
+ const i = getInnermostKeyAndValue(a);
6912
+ return i ? isVariable$1(i.value) ? getVariableValue$1(i.value, t) : i.value : null;
6913
+ }).filter(Boolean);
6914
+ });
6915
+ }
6916
+ function getVariableValuesInExpression({ action: e, localVariables: t }) {
6917
+ var a;
6918
+ const o = e.value, n = o == null ? void 0 : o.mode, r = (o == null ? void 0 : o.value) || (o == null ? void 0 : o.result);
6919
+ if (n === "express" && r != null)
6920
+ return (a = getVariablesFromExpression(r)) == null ? void 0 : a.map((i) => getVariableValue$1(i, t)).filter(Boolean);
6921
+ }
6922
+ function getVariableValue$1(e, t) {
6923
+ var r;
6924
+ if (!isVariable$1(e))
6925
+ return;
6926
+ const o = getVariableName(e), n = {
6927
+ [o]: (r = t.find((a) => a.name === o)) == null ? void 0 : r.ctx
6928
+ };
6929
+ return getValuesByPath(n, getPath(e));
6930
+ }
6931
+ function getSubscriber({
6932
+ action: e,
6933
+ field: t,
6934
+ rule: o,
6935
+ variables: n,
6936
+ localVariables: r,
6937
+ variableNameOfLeftCondition: a
6938
+ }, i) {
6939
+ return () => {
6940
+ collectFieldStateOfLinkageRules(
6941
+ {
6942
+ operator: e.operator,
6943
+ value: e.value,
6944
+ field: t,
6945
+ condition: o.condition,
6946
+ variables: n,
6947
+ localVariables: r,
6948
+ variableNameOfLeftCondition: a,
6949
+ action: e,
6950
+ conditionType: o.conditionType
6951
+ },
6952
+ i
6953
+ ), setTimeout(() => z(this, null, function* () {
6954
+ var d, p, m, h, g, f, C, b;
6955
+ const l = getFieldNameByOperator(e.operator);
6956
+ if (!((d = t.stateOfLinkageRules) != null && d[l]))
6957
+ return;
6958
+ let c = t.stateOfLinkageRules[l];
6959
+ c = yield Promise.all(c), c = c.filter((S) => S.condition);
6960
+ const u = c[c.length - 1];
6961
+ if (l === "value")
6962
+ c.length > 1 && (t.value = u.value);
6963
+ else if (l === "dateScope")
6964
+ t.setComponentProps({
6965
+ _maxDate: ((m = (p = u.value) == null ? void 0 : p._maxDate) == null ? void 0 : m.value) || ((h = u.value) == null ? void 0 : h._maxDate),
6966
+ _minDate: ((f = (g = u.value) == null ? void 0 : g._minDate) == null ? void 0 : f.value) || ((C = u.value) == null ? void 0 : C._minDate)
6967
+ });
6968
+ else {
6969
+ if (l === "display" && (u == null ? void 0 : u.value) === "hidden")
6970
+ t.display = "visible", t.data = t.data || {}, t.data.hidden = !0, t.required && (t.required = !1, t.data.prevRequired = !0), requestAnimationFrame(() => {
6971
+ t.setState((S) => {
6972
+ S.display = "visible";
6973
+ });
6974
+ });
6975
+ else if (l === "dataSource") {
6976
+ const S = ((b = u == null ? void 0 : u.value) == null ? void 0 : b.map((y) => y.value)) || [];
6977
+ (!Array.isArray(t.value) && !S.includes(t.value) || Array.isArray(t.value) && _.difference(t.value, S).length > 0) && (t.value = t.initialValue), t[l] = u == null ? void 0 : u.value, t.data = t.data || {}, requestAnimationFrame(() => {
6978
+ t.setState((y) => {
6979
+ y[l] = u == null ? void 0 : u.value;
6980
+ });
6981
+ });
6982
+ } else
6983
+ l === "display" && (u == null ? void 0 : u.value) === "visible" ? (t[l] = u == null ? void 0 : u.value, l === "display" && (u == null ? void 0 : u.value) === "visible" && (t.data = t.data || {}, t.data.hidden = !1, t.data.prevRequired && (delete t.data.prevRequired, t.required = !0)), requestAnimationFrame(() => {
6984
+ t.setState((S) => {
6985
+ S[l] = u == null ? void 0 : u.value;
6986
+ });
6987
+ })) : (t[l] = u == null ? void 0 : u.value, requestAnimationFrame(() => {
6988
+ t.setState((S) => {
6989
+ S[l] = u == null ? void 0 : u.value;
6990
+ });
6991
+ }));
6992
+ l === "display" && (u == null ? void 0 : u.value) === "none" && (t.value = null);
6993
+ }
6994
+ t.stateOfLinkageRules[l] = null;
6995
+ }));
6996
+ };
6997
+ }
6998
+ function getFieldNameByOperator(e) {
6999
+ switch (e) {
7000
+ case ActionType.Required:
7001
+ case ActionType.InRequired:
7002
+ return "required";
7003
+ case ActionType.Visible:
7004
+ case ActionType.None:
7005
+ case ActionType.Hidden:
7006
+ return "display";
7007
+ case ActionType.Editable:
7008
+ case ActionType.ReadOnly:
7009
+ case ActionType.ReadPretty:
7010
+ return "pattern";
7011
+ case ActionType.Value:
7012
+ return "value";
7013
+ case ActionType.Options:
7014
+ return "dataSource";
7015
+ case ActionType.DateScope:
7016
+ return "dateScope";
7017
+ default:
7018
+ return null;
7019
+ }
7020
+ }
7021
+ const collectFieldStateOfLinkageRules = ({
7022
+ operator: e,
7023
+ value: t,
7024
+ field: o,
7025
+ condition: n,
7026
+ variables: r,
7027
+ localVariables: a,
7028
+ variableNameOfLeftCondition: i,
7029
+ action: l,
7030
+ conditionType: c
7031
+ }, u) => {
7032
+ var S, y, v, F, I, T, R, D, B, N, $, L, w, O;
7033
+ const d = ((S = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : S.required) || [(y = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : y.required], p = ((v = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : v.display) || [(F = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : F.display], m = ((I = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : I.pattern) || [(T = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : T.pattern], h = ((R = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : R.value) || [(D = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : D.value], g = ((B = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : B.dataSource) || [(N = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : N.dataSource], { evaluate: f } = evaluators.get("formula.js"), C = {
7034
+ ruleGroup: n,
7035
+ variables: r,
7036
+ localVariables: a,
7037
+ variableNameOfLeftCondition: i,
7038
+ conditionType: c
7039
+ }, b = (($ = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : $.dateScope) || [(L = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : L.dateScope];
7040
+ switch (e) {
7041
+ case ActionType.Required:
7042
+ d.push(getTempFieldState(conditionAnalyses(C, u), !0)), o.stateOfLinkageRules = P(x({}, o.stateOfLinkageRules), {
7043
+ required: d
7044
+ });
7045
+ break;
7046
+ case ActionType.InRequired:
7047
+ d.push(getTempFieldState(conditionAnalyses(C, u), !1)), o.stateOfLinkageRules = P(x({}, o.stateOfLinkageRules), {
7048
+ required: d
7049
+ });
7050
+ break;
7051
+ case ActionType.Visible:
7052
+ case ActionType.None:
7053
+ case ActionType.Hidden:
7054
+ p.push(getTempFieldState(conditionAnalyses(C, u), e)), o.stateOfLinkageRules = P(x({}, o.stateOfLinkageRules), {
7055
+ display: p
7056
+ });
7057
+ break;
7058
+ case ActionType.Editable:
7059
+ case ActionType.ReadOnly:
7060
+ case ActionType.ReadPretty:
7061
+ m.push(getTempFieldState(conditionAnalyses(C, u), e)), o.stateOfLinkageRules = P(x({}, o.stateOfLinkageRules), {
7062
+ pattern: m
7063
+ });
7064
+ break;
7065
+ case ActionType.Value:
7066
+ {
7067
+ const j = () => z(void 0, null, function* () {
7068
+ var k;
7069
+ if ((t == null ? void 0 : t.mode) === "express") {
7070
+ if ((t.value || t.result) == null)
7071
+ return;
7072
+ const { exp: M, scope: q } = yield replaceVariables(t.value || t.result, {
7073
+ variables: r,
7074
+ localVariables: a
7075
+ });
7076
+ try {
7077
+ return f(M, x({ now: () => (/* @__PURE__ */ new Date()).toString() }, q));
7078
+ } catch (E) {
7079
+ console.error(E);
7080
+ }
7081
+ } else
7082
+ return (t == null ? void 0 : t.mode) === "constant" ? (k = t == null ? void 0 : t.value) != null ? k : t : null;
7083
+ });
7084
+ isConditionEmpty(n) ? h.push(getTempFieldState(!0, j())) : h.push(getTempFieldState(conditionAnalyses(C, u), j())), o.stateOfLinkageRules = P(x({}, o.stateOfLinkageRules), {
7085
+ value: h
7086
+ });
7087
+ }
7088
+ break;
7089
+ case ActionType.Options:
7090
+ {
7091
+ const j = (O = (w = o.data) == null ? void 0 : w.dataSource) == null ? void 0 : O.filter((k) => t.value.includes(k.value));
7092
+ g.push(getTempFieldState(conditionAnalyses(C, u), j || [])), o.stateOfLinkageRules = P(x({}, o.stateOfLinkageRules), {
7093
+ dataSource: g
7094
+ });
7095
+ }
7096
+ break;
7097
+ case ActionType.DateScope: {
7098
+ b.push(
7099
+ getTempFieldState(conditionAnalyses(C, u), {
7100
+ _maxDate: l._maxDate,
7101
+ _minDate: l._minDate
7102
+ })
7103
+ ), o.stateOfLinkageRules = P(x({}, o.stateOfLinkageRules), {
7104
+ dateScope: b
7105
+ });
7106
+ break;
7107
+ }
7108
+ default:
7109
+ return null;
7110
+ }
7111
+ };
7112
+ function getTempFieldState(e, t) {
7113
+ return z(this, null, function* () {
7114
+ return [e, t] = yield Promise.all([e, t]), {
7115
+ condition: e,
7116
+ value: t
7117
+ };
7118
+ });
7119
+ }
7120
+ function isConditionEmpty(e) {
7121
+ const t = Object.keys(e)[0] || "$and", o = e[t];
7122
+ return _.isEmpty(o);
7123
+ }
7124
+ function replaceVariables(n, r) {
7125
+ return z(this, arguments, function* (e, {
7126
+ variables: t,
7127
+ localVariables: o
7128
+ }) {
7129
+ var c;
7130
+ const a = {}, i = {};
7131
+ if (e == null)
7132
+ return;
7133
+ const l = (c = e.match(REGEX_OF_VARIABLE_IN_EXPRESSION)) == null ? void 0 : c.map((u) => z(this, null, function* () {
7134
+ const { value: d } = yield t.parseVariable(u, o), p = `_${uid$1()}`;
7135
+ return i[p] = d, a[u] = p, d;
7136
+ }));
7137
+ return l && (yield Promise.all(l)), {
7138
+ exp: e.replace(REGEX_OF_VARIABLE_IN_EXPRESSION, (u) => `{{${a[u] || u}}}`),
7139
+ scope: i
7140
+ };
7141
+ });
7142
+ }
7143
+ const getVariableValue = (e, t) => z(void 0, null, function* () {
7144
+ if (!e)
7145
+ return e;
7146
+ const { evaluate: o } = evaluators.get("string"), { exp: n, scope: r } = yield replaceVariables(e, t);
7147
+ return o(n, x({ now: () => (/* @__PURE__ */ new Date()).toString() }, r));
7148
+ }), setDataLoadingModeSettingsItem = {
7149
+ name: "setDataLoadingMode",
7150
+ Component: SetDataLoadingMode
7151
+ };
7152
+ function useDataLoadingMode() {
7153
+ const { dataLoadingMode: e } = useDataBlockProps() || {};
7154
+ return e || "auto";
7155
+ }
7156
+ function SetDataLoadingMode() {
7157
+ var c;
7158
+ const { dn: e } = useDesignable(), { t } = useTranslation(), o = useField(), n = useFieldSchema(), r = useCollection(), { getEnableFieldTree: a, getOnLoadData: i } = useCollectionState(r == null ? void 0 : r.name), { getDataBlockRequest: l } = useDataBlockRequestGetter();
7159
+ return /* @__PURE__ */ jsx(
7160
+ SchemaSettingsModalItem,
7161
+ {
7162
+ title: t("Set data loading mode"),
7163
+ scope: { getEnableFieldTree: a, name: r == null ? void 0 : r.name, getOnLoadData: i },
7164
+ schema: {
7165
+ type: "object",
7166
+ title: t("Data loading mode"),
7167
+ properties: {
7168
+ dataLoadingMode: {
7169
+ "x-decorator": "FormItem",
7170
+ "x-component": "Radio.Group",
7171
+ default: ((c = n["x-decorator-props"]) == null ? void 0 : c.dataLoadingMode) || "auto",
7172
+ enum: [
7173
+ { value: "auto", label: t("Load all data when filter is empty") },
7174
+ { value: "manual", label: t("Do not load data when filter is empty") }
7175
+ ]
7176
+ }
7177
+ }
7178
+ },
7179
+ onSubmit: ({ dataLoadingMode: u }) => {
7180
+ const d = l();
7181
+ _.set(n, "x-decorator-props.dataLoadingMode", u), o.decoratorProps.dataLoadingMode = u, e.emit("patch", {
7182
+ schema: {
7183
+ "x-uid": n["x-uid"],
7184
+ "x-decorator-props": x({}, n["x-decorator-props"])
7185
+ }
7186
+ }), e.refresh(), u === "auto" ? d.run() : d.mutate(void 0);
7187
+ }
7188
+ }
7189
+ );
7190
+ }
7191
+ const useSourceKey = (e) => useCollectionManager().getSourceKeyByAssociation(e), KeepAliveContext = createContext(!0), DesignableInterceptor = ({ children: e, active: t }) => {
7192
+ const o = useContext(SchemaComponentContext), n = useContext(SchemaOptionsContext), r = useContext(SchemaComponentsContext), a = useContext(SchemaExpressionScopeContext), i = useContext(ACLContext), l = useRef(o), c = useRef(n), u = useRef(r), d = useRef(a), p = useRef(i);
7193
+ return t && (l.current = o, c.current = n, u.current = r, d.current = a, p.current = i), /* @__PURE__ */ jsx(SchemaComponentContext.Provider, { value: l.current, children: /* @__PURE__ */ jsx(SchemaOptionsContext.Provider, { value: c.current, children: /* @__PURE__ */ jsx(SchemaComponentsContext.Provider, { value: u.current, children: /* @__PURE__ */ jsx(SchemaExpressionScopeContext.Provider, { value: d.current, children: /* @__PURE__ */ jsx(ACLContext.Provider, { value: p.current, children: e }) }) }) }) });
7194
+ }, hidden = { display: "none" }, KeepAliveProvider = memo(
7195
+ ({ children: e, active: t, parentActive: o }) => {
7196
+ const n = useContext(UNSAFE_LocationContext), r = useContext(UNSAFE_RouteContext), a = useContext(UNSAFE_DataRouterContext), i = useContext(UNSAFE_DataRouterStateContext), l = useContext(IsSubPageClosedByPageMenuContext), c = useContext(Context), u = useContext(RouteContext), d = useRef(n), p = useRef(r), m = useRef(a), h = useRef(i), g = useRef(l), f = useRef(c), C = useRef(u);
7197
+ t && (m.current = a, h.current = i, g.current = l, f.current = c, C.current = u), t && // Skip comparing location key to improve LocationContext rendering performance
7198
+ !_.isEqual(_.omit(d.current.location, "key"), _.omit(n.location, "key")) && (d.current = n), t && !_.isEqual(p.current, r) && (p.current = r);
7199
+ const b = /* @__PURE__ */ jsx(RouteContext.Provider, { value: C.current, children: /* @__PURE__ */ jsx(Context.Provider, { value: f.current, children: /* @__PURE__ */ jsx(UNSAFE_DataRouterContext.Provider, { value: m.current, children: /* @__PURE__ */ jsx(UNSAFE_DataRouterStateContext.Provider, { value: h.current, children: /* @__PURE__ */ jsx(UNSAFE_LocationContext.Provider, { value: d.current, children: /* @__PURE__ */ jsx(UNSAFE_RouteContext.Provider, { value: p.current, children: /* @__PURE__ */ jsx(KeepAliveContext.Provider, { value: o === !1 ? !1 : t, children: /* @__PURE__ */ jsx(DesignableInterceptor, { active: t, children: /* @__PURE__ */ jsx(IsSubPageClosedByPageMenuContext.Provider, { value: g.current, children: e }) }) }) }) }) }) }) }) });
7200
+ return /* @__PURE__ */ jsx("div", { style: t ? null : hidden, children: b });
7201
+ }
7202
+ ), useKeepAlive = () => ({ active: useContext(KeepAliveContext) }), getMaxPageCount = () => {
7203
+ let t = 5;
7204
+ try {
7205
+ const o = navigator.deviceMemory;
7206
+ if (o)
7207
+ return Math.min(Math.max(5, o * 3), 20);
7208
+ const n = performance.memory;
7209
+ if (n != null && n.jsHeapSizeLimit) {
7210
+ const i = n.jsHeapSizeLimit / 1073741824;
7211
+ return Math.min(Math.max(5, Math.floor(i * 3)), 20);
7212
+ }
7213
+ const r = performance.now();
7214
+ for (let i = 0; i < 1e6; i++)
7215
+ ;
7216
+ const a = performance.now() - r;
7217
+ return a < 3 ? t = 20 : a < 5 ? t = 10 : a < 10 && (t = 5), t;
7218
+ } catch (o) {
7219
+ return 5;
7220
+ }
7221
+ }, MAX_RENDERED_PAGE_COUNT = getMaxPageCount(), KeepAlive = React.memo(({ children: e, uid: t }) => {
7222
+ const { active: o } = useKeepAlive(), n = useRef([]);
7223
+ return n.current.includes(t) || (n.current.push(t), n.current.length > MAX_RENDERED_PAGE_COUNT && (n.current = n.current.slice(-MAX_RENDERED_PAGE_COUNT))), /* @__PURE__ */ jsx(Fragment$1, { children: n.current.map((r) => /* @__PURE__ */ jsx(KeepAliveProvider, { active: r === t, parentActive: o, children: e(r) }, r)) });
7224
+ });
7225
+ KeepAlive.displayName = "KeepAlive";
7226
+ const DEBOUNCE_WAIT = 100, LOADING_DELAY = void 0, EMPTY_OBJECT = Object.freeze({});
7227
+ class CollectionRecord {
7228
+ constructor(t) {
7229
+ A(this, "data");
7230
+ A(this, "parentRecord");
7231
+ A(this, "isNew");
7232
+ const { data: o, parentRecord: n, isNew: r } = t;
7233
+ this.isNew = r, this.data = o, this.parentRecord = n;
7234
+ }
7235
+ setData(t) {
7236
+ this.data = t;
7237
+ }
7238
+ setParentRecord(t) {
7239
+ this.parentRecord = t;
7240
+ }
7241
+ }
7242
+ const CollectionRecordContext = createContext(null);
7243
+ CollectionRecordContext.displayName = "CollectionRecordContext";
7244
+ const CollectionRecordProvider = React.memo(
7245
+ ({ isNew: e, record: t, parentRecord: o, children: n }) => {
7246
+ const r = useMemo(() => {
7247
+ if (o)
7248
+ return o instanceof CollectionRecord ? o : new CollectionRecord({ data: o });
7249
+ if (t instanceof CollectionRecord)
7250
+ return t.parentRecord;
7251
+ }, [o, t]), a = useMemo(() => {
7252
+ let i;
7253
+ return t ? t instanceof CollectionRecord ? (i = t, i.isNew = t.isNew || e) : i = new CollectionRecord({ data: t, isNew: e }) : i = new CollectionRecord({ isNew: e }), i.setParentRecord(r), i;
7254
+ }, [t, r, e]);
7255
+ return /* @__PURE__ */ jsx(CollectionRecordContext.Provider, { value: a, children: n });
7256
+ }
7257
+ );
7258
+ CollectionRecordProvider.displayName = "CollectionRecordProvider";
7259
+ function useCollectionRecord() {
7260
+ return useContext(CollectionRecordContext);
7261
+ }
7262
+ function useCollectionRecordData() {
7263
+ const e = useCollectionRecord();
7264
+ return e == null ? void 0 : e.data;
7265
+ }
7266
+ function useCollectionParentRecord() {
7267
+ const e = useCollectionRecord();
7268
+ return e == null ? void 0 : e.parentRecord;
7269
+ }
7270
+ function useCollectionParentRecordData() {
7271
+ var t;
7272
+ const e = useCollectionRecord();
7273
+ return (t = e == null ? void 0 : e.parentRecord) == null ? void 0 : t.data;
7274
+ }
7275
+ const DataBlockResourceContext$1 = createContext(null);
7276
+ DataBlockResourceContext$1.displayName = "DataBlockResourceContext";
7277
+ const DataBlockResourceProvider = ({ children: e }) => {
7278
+ const t = useDataBlockProps(), o = useCollectionManager(), { association: n, collection: r, dataSource: a, sourceId: i, parentRecord: l } = t, c = useAPIClient(), u = useDataSourceHeaders(a), d = useMemo(() => typeof r == "string" ? r : r == null ? void 0 : r.name, [r]), p = useMemo(() => {
7279
+ if (i)
7280
+ return i;
7281
+ if (n && l) {
7282
+ const h = o.getSourceKeyByAssociation(n), g = l instanceof CollectionRecord ? l.data : l;
7283
+ if (isArray(h)) {
7284
+ const f = {};
7285
+ for (const C of h)
7286
+ f[C] = g == null ? void 0 : g[C];
7287
+ return encodeURIComponent(JSON.stringify(f));
7288
+ } else
7289
+ return g[h];
7290
+ }
7291
+ }, [n, i, l]), m = useMemo(() => n ? c.resource(n, p, u, !p) : c.resource(d, void 0, u), [c, n, r, p, u]);
7292
+ return /* @__PURE__ */ jsx(DataBlockResourceContext$1.Provider, { value: m, children: e });
7293
+ };
7294
+ function useDataBlockResource() {
7295
+ const e = useContext(DataBlockResourceContext$1);
7296
+ if (!e)
7297
+ throw new Error("useDataBlockResource() must be used within a DataBlockResourceProvider");
7298
+ return e;
7299
+ }
6993
7300
  const defaultTheme = {
6994
7301
  name: "",
6995
7302
  token: {
@@ -7945,7 +8252,7 @@ function withInitializer(e) {
7945
8252
  S ? S(y(O, { isInSubTable: a })) : r(d, y(O, { isInSubTable: a }), { onSuccess: p });
7946
8253
  },
7947
8254
  [S, y, a, r, d, p]
7948
- ), { wrapSSR: F, hashId: I, componentCls: T } = useSchemaInitializerStyles(), [R, D] = useState(!1), { token: B } = theme.useToken(), N = useNiceDropdownMaxHeight([R]), M = useMemo(
8255
+ ), { wrapSSR: F, hashId: I, componentCls: T } = useSchemaInitializerStyles(), [R, D] = useState(!1), { token: B } = theme.useToken(), N = useNiceDropdownMaxHeight([R]), $ = useMemo(
7949
8256
  () => x({
7950
8257
  options: o,
7951
8258
  style: C
@@ -7985,7 +8292,7 @@ function withInitializer(e) {
7985
8292
  options: o,
7986
8293
  insert: v
7987
8294
  },
7988
- children: f === !1 ? React.createElement(e, M) : /* @__PURE__ */ jsx(
8295
+ children: f === !1 ? React.createElement(e, $) : /* @__PURE__ */ jsx(
7989
8296
  Popover,
7990
8297
  P(x({
7991
8298
  zIndex: 9999,
@@ -8013,7 +8320,7 @@ function withInitializer(e) {
8013
8320
  }
8014
8321
  ) })
8015
8322
  ),
8016
- children: React.createElement(e, M)
8323
+ children: React.createElement(e, $)
8017
8324
  })
8018
8325
  )
8019
8326
  }
@@ -8385,7 +8692,7 @@ function addAppVersion(e, t) {
8385
8692
  addAppVersion((n = e.properties) == null ? void 0 : n[o], t);
8386
8693
  }), e;
8387
8694
  }
8388
- const name = "@nocobase/client", version = "1.7.4", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
8695
+ const name = "@nocobase/client", version = "1.7.6", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
8389
8696
  "@ahooksjs/use-url-state": "3.5.1",
8390
8697
  "@ant-design/cssinjs": "^1.11.1",
8391
8698
  "@ant-design/icons": "^5.6.1",
@@ -8406,9 +8713,9 @@ const name = "@nocobase/client", version = "1.7.4", license = "AGPL-3.0", main =
8406
8713
  "@formily/reactive-react": "^2.2.27",
8407
8714
  "@formily/shared": "^2.2.27",
8408
8715
  "@formily/validator": "^2.2.27",
8409
- "@nocobase/evaluators": "1.7.4",
8410
- "@nocobase/sdk": "1.7.4",
8411
- "@nocobase/utils": "1.7.4",
8716
+ "@nocobase/evaluators": "1.7.6",
8717
+ "@nocobase/sdk": "1.7.6",
8718
+ "@nocobase/utils": "1.7.6",
8412
8719
  ahooks: "^3.7.2",
8413
8720
  antd: "5.24.2",
8414
8721
  "antd-style": "3.7.1",
@@ -9050,7 +9357,7 @@ const useFieldComponentOptions = () => {
9050
9357
  typeof t != "function" && (n = useDef$4);
9051
9358
  const r = n();
9052
9359
  return x(x({}, o), r);
9053
- }, getPath = (e) => e && e.match(REGEX_OF_VARIABLE)[0].replace(REGEX_OF_VARIABLE, "$1"), getVariableName = (e) => _.isString(e) ? getPath(e).split(".")[0] : e;
9360
+ };
9054
9361
  function useParsedFilter({ filterOption: e }) {
9055
9362
  const { parseFilter: t, findVariable: o } = useParseDataScopeFilter(), [n, r] = useState({}), [a, i] = useState(!!e);
9056
9363
  return useEffect(() => {
@@ -9132,17 +9439,10 @@ const key = "__isNewRecord__", isNewRecord = (e) => untracked(() => !!(e != null
9132
9439
  return !!((e = useDataBlockRequest()) != null && e.loading);
9133
9440
  }, withSkeletonComponent = (e, t) => {
9134
9441
  const { useLoading: o = useDefaultLoading, displayName: n, SkeletonComponent: r = Skeleton } = t || {}, a = React.memo((i) => {
9135
- const l = o(), c = useRef(!1);
9136
- return !c.current && l ? /* @__PURE__ */ jsx(r, {}) : (c.current = !0, /* @__PURE__ */ jsx(e, x({}, i)));
9442
+ const l = o(), c = useRef(!1), u = useDeferredValue(l);
9443
+ return !c.current && u ? /* @__PURE__ */ jsx(r, {}) : (c.current = !0, /* @__PURE__ */ jsx(e, x({}, i)));
9137
9444
  });
9138
9445
  return a.displayName = n || `${e.displayName}(withSkeletonComponent)` || `${e.name}(withSkeletonComponent)`, a;
9139
- };
9140
- var ActionType = /* @__PURE__ */ ((e) => (e.Visible = "visible", e.Editable = "editable", e.ReadOnly = "disabled", e.ReadPretty = "readPretty", e.None = "none", e.Hidden = "hidden", e.Required = "required", e.InRequired = "notRequired", e.Disabled = "disabled", e.Value = "value", e.Active = "enabled", e.Color = "color", e.BackgroundColor = "backgroundColor", e.TextAlign = "textAlign", e.Options = "options", e.DateScope = "dateScope", e.FontSize = "fontSize", e.FontWeight = "fontWeight", e.FontStyle = "fontStyle", e))(ActionType || {}), LinkageRuleCategory = /* @__PURE__ */ ((e) => (e.default = "default", e.style = "style", e.button = "button", e.block = "block", e))(LinkageRuleCategory || {});
9141
- const LinkageRuleDataKeyMap = {
9142
- style: "x-linkage-style-rules",
9143
- default: "x-linkage-rules",
9144
- button: "x-linkage-rules",
9145
- block: "x-block-linkage-rules"
9146
9446
  }, getActionValue = (e, t) => {
9147
9447
  const o = (n) => (n == null ? void 0 : n.mode) === "constant" ? n.value : null;
9148
9448
  switch (!0) {
@@ -9570,11 +9870,11 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: o, filterProper
9570
9870
  }
9571
9871
  `, [n.paddingContentVerticalLG, n.marginSM, n.margin]), b = useCollection(), S = useMemo(() => withTooltipComponent(NocoBaseRecursionField), []), y = useMemo(
9572
9872
  () => d == null ? void 0 : d.map((F) => {
9573
- var M, L, w, O;
9873
+ var $, L, w, O;
9574
9874
  const I = F.reduceProperties((j, k) => {
9575
9875
  if (isCollectionFieldComponent(k))
9576
9876
  return j.concat([k]);
9577
- }, []), T = (I == null ? void 0 : I.length) > 0 ? I[0].name : F.name, R = !!((M = F["x-component-props"]) != null && M.columnHidden), { uiSchema: D, defaultValue: B, interface: N } = (b == null ? void 0 : b.getField(T)) || {};
9877
+ }, []), T = (I == null ? void 0 : I.length) > 0 ? I[0].name : F.name, R = !!(($ = F["x-component-props"]) != null && $.columnHidden), { uiSchema: D, defaultValue: B, interface: N } = (b == null ? void 0 : b.getField(T)) || {};
9578
9878
  return F.title = o(F == null ? void 0 : F.title, { ns: NAMESPACE_UI_SCHEMA }), D && (D.default = B), P(x({
9579
9879
  title: /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: g, children: /* @__PURE__ */ jsx(
9580
9880
  S,
@@ -9592,7 +9892,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: o, filterProper
9592
9892
  columnHidden: R
9593
9893
  }, F["x-component-props"]), {
9594
9894
  width: R && !l ? 0 : ((O = F["x-component-props"]) == null ? void 0 : O.width) || 100,
9595
- render: (j, k, $) => /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: g, children: /* @__PURE__ */ jsx(
9895
+ render: (j, k, M) => /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: g, children: /* @__PURE__ */ jsx(
9596
9896
  TableCellRender,
9597
9897
  {
9598
9898
  record: k,
@@ -9601,7 +9901,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: o, filterProper
9601
9901
  filterProperties: f,
9602
9902
  schemaToolbarBigger: C,
9603
9903
  field: r,
9604
- index: $
9904
+ index: M
9605
9905
  }
9606
9906
  ) }),
9607
9907
  onCell: (j, k) => ({
@@ -9971,8 +10271,8 @@ const Table$2 = withDynamicSchemaProps(
9971
10271
  "loading",
9972
10272
  "onClickRow",
9973
10273
  "value"
9974
- ]), y = useArrayField$1(S), v = useFieldSchema(), { size: F = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, I = useCollection(), R = ((be = v == null ? void 0 : v.parent) == null ? void 0 : be["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: B, enableIndexÏColumn: N } = R, M = useMemoizedFn(S.onRowDragEnd || (() => {
9975
- })), L = usePaginationProps$3(o, a, e), w = useTableColumns$2(S, L), [O, j] = useState(() => D ? B : []), [k, $] = useState(((Se = y == null ? void 0 : y.data) == null ? void 0 : Se.selectedRowKeys) || []), [q, E] = useState([]), V = (p == null ? void 0 : p.type) !== "none", G = useRef(/* @__PURE__ */ new Map()), U = useMemo(() => css`
10274
+ ]), y = useArrayField$1(S), v = useFieldSchema(), { size: F = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, I = useCollection(), R = ((be = v == null ? void 0 : v.parent) == null ? void 0 : be["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: B, enableIndexÏColumn: N } = R, $ = useMemoizedFn(S.onRowDragEnd || (() => {
10275
+ })), L = usePaginationProps$3(o, a, e), w = useTableColumns$2(S, L), [O, j] = useState(() => D ? B : []), [k, M] = useState(((Se = y == null ? void 0 : y.data) == null ? void 0 : Se.selectedRowKeys) || []), [q, E] = useState([]), V = (p == null ? void 0 : p.type) !== "none", G = useRef(/* @__PURE__ */ new Map()), U = useMemo(() => css`
9976
10276
  & > td {
9977
10277
  background-color: ${t.controlItemBgActive} !important;
9978
10278
  }
@@ -9983,8 +10283,8 @@ const Table$2 = withDynamicSchemaProps(
9983
10283
  useEffect(() => {
9984
10284
  var Z;
9985
10285
  H != null && H.field && (H.field.data = ((Z = H.field) == null ? void 0 : Z.data) || {}, H.field.data.clearSelectedRowKeys = () => {
9986
- H.field.data.selectedRowKeys = [], $([]);
9987
- }, H.field.data.setSelectedRowKeys = $);
10286
+ H.field.data.selectedRowKeys = [], M([]);
10287
+ }, H.field.data.setSelectedRowKeys = M);
9988
10288
  }, [H == null ? void 0 : H.field]);
9989
10289
  const Y = useMemo(() => C ? U : "", [U, C]), J = useMemo(() => C ? (Z, ne) => ({
9990
10290
  onClick: (re) => {
@@ -10026,10 +10326,10 @@ const Table$2 = withDynamicSchemaProps(
10026
10326
  return;
10027
10327
  }
10028
10328
  const ae = (Pe = (ve = (ye = re.active) == null ? void 0 : ye.data.current) == null ? void 0 : ve.sortable) == null ? void 0 : Pe.index, le = (Ae = (Ie = (Fe = re.over) == null ? void 0 : Fe.data.current) == null ? void 0 : Ie.sortable) == null ? void 0 : Ae.index, ge = (b == null ? void 0 : b[ae]) || re.active, Re = (b == null ? void 0 : b[le]) || re.over;
10029
- y.move(ae, le), M({ from: ge, to: Re });
10329
+ y.move(ae, le), $({ from: ge, to: Re });
10030
10330
  }, []);
10031
10331
  return /* @__PURE__ */ jsx(DndContext, { onDragEnd: ne, children: /* @__PURE__ */ jsx("tbody", x({}, Z)) });
10032
- }, [y, M]);
10332
+ }, [y, $]);
10033
10333
  ee.displayName = "BodyWrapperComponent";
10034
10334
  const oe = useMemo(() => ({
10035
10335
  header: {
@@ -10047,7 +10347,7 @@ const Table$2 = withDynamicSchemaProps(
10047
10347
  type: "checkbox",
10048
10348
  selectedRowKeys: k,
10049
10349
  onChange(Z, ne) {
10050
- y.data = y.data || {}, y.data.selectedRowKeys = Z, y.data.selectedRowData = ne, $(Z), u == null || u(Z, ne, $);
10350
+ y.data = y.data || {}, y.data.selectedRowKeys = Z, y.data.selectedRowData = ne, M(Z), u == null || u(Z, ne, M);
10051
10351
  },
10052
10352
  onSelect: (Z, ne, re, ae) => {
10053
10353
  var le;
@@ -10351,11 +10651,11 @@ const InternalTableBlockProvider = (e) => {
10351
10651
  [t, p]
10352
10652
  ), b = useCallback(
10353
10653
  (w, O) => {
10354
- var k, $;
10654
+ var k, M;
10355
10655
  if (!w)
10356
10656
  return [];
10357
10657
  const j = (k = p(O)) == null ? void 0 : k.getCollection(w);
10358
- return (($ = j == null ? void 0 : j.getAllFields) == null ? void 0 : $.call(j)) || (j == null ? void 0 : j.getFields()) || [];
10658
+ return ((M = j == null ? void 0 : j.getAllFields) == null ? void 0 : M.call(j)) || (j == null ? void 0 : j.getFields()) || [];
10359
10659
  },
10360
10660
  [t, p]
10361
10661
  ), S = useCallback(
@@ -10390,7 +10690,7 @@ const InternalTableBlockProvider = (e) => {
10390
10690
  (w, O, j, k) => {
10391
10691
  var Q;
10392
10692
  const {
10393
- association: $ = !1,
10693
+ association: M = !1,
10394
10694
  cached: q = {},
10395
10695
  collectionNames: E = [w],
10396
10696
  maxDepth: V = 1,
@@ -10406,14 +10706,14 @@ const InternalTableBlockProvider = (e) => {
10406
10706
  return _.cloneDeep(q[w]);
10407
10707
  O && typeof O == "string" && (O = [O]), j && typeof j == "string" && (j = [j]);
10408
10708
  const K = b(w, J), X = (Q = K == null ? void 0 : K.filter(
10409
- (ee) => ee.interface && !U.includes(ee.interface) && (G || O && O.includes(ee.type) || j && j.includes(ee.interface) || ($ && ee.target && ee.target !== w && Array.isArray($) ? $.includes(ee.interface) : !1))
10709
+ (ee) => ee.interface && !U.includes(ee.interface) && (G || O && O.includes(ee.type) || j && j.includes(ee.interface) || (M && ee.target && ee.target !== w && Array.isArray(M) ? M.includes(ee.interface) : !1))
10410
10710
  )) == null ? void 0 : Q.map((ee) => {
10411
10711
  var te, se;
10412
10712
  const oe = x({
10413
10713
  value: Y && H ? `${H}.${ee.name}` : ee.name,
10414
10714
  label: f((te = ee == null ? void 0 : ee.uiSchema) == null ? void 0 : te.title) || ee.name
10415
10715
  }, ee);
10416
- return $ && ee.target && (oe.children = E.includes(ee.target) ? [] : I(ee.target, O, j, P(x({}, k), {
10716
+ return M && ee.target && (oe.children = E.includes(ee.target) ? [] : I(ee.target, O, j, P(x({}, k), {
10417
10717
  cached: q,
10418
10718
  dataSource: J,
10419
10719
  collectionNames: [...E, ee.target],
@@ -10451,10 +10751,10 @@ const InternalTableBlockProvider = (e) => {
10451
10751
  return (O = B(w.interface)) == null ? void 0 : O.titleUsable;
10452
10752
  },
10453
10753
  [B]
10454
- ), M = useCallback(
10754
+ ), $ = useCallback(
10455
10755
  (w, O, j) => {
10456
- var k, $;
10457
- return ($ = (k = p(j)) == null ? void 0 : k.getCollection(O)) == null ? void 0 : $.getParentCollectionFields(w);
10756
+ var k, M;
10757
+ return (M = (k = p(j)) == null ? void 0 : k.getCollection(O)) == null ? void 0 : M.getParentCollectionFields(w);
10458
10758
  },
10459
10759
  [t, p]
10460
10760
  ), L = useCallback(
@@ -10469,7 +10769,7 @@ const InternalTableBlockProvider = (e) => {
10469
10769
  getTemplate: L,
10470
10770
  getInterface: B,
10471
10771
  getCollections: d,
10472
- getParentCollectionFields: M,
10772
+ getParentCollectionFields: $,
10473
10773
  getInheritCollections: y,
10474
10774
  getChildrenCollections: v,
10475
10775
  refreshCM: g,
@@ -10690,14 +10990,14 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
10690
10990
  popupUid: O,
10691
10991
  recordData: j,
10692
10992
  sourceId: k,
10693
- collection: $,
10993
+ collection: M,
10694
10994
  puid: q
10695
10995
  }) => {
10696
10996
  const E = c.getFilterByTK(u || l, j);
10697
10997
  return getPopupPathFromParams({
10698
10998
  popupuid: O,
10699
10999
  puid: q,
10700
- collection: $,
11000
+ collection: M,
10701
11001
  filterbytk: E,
10702
11002
  sourceid: k,
10703
11003
  tab: w
@@ -10717,11 +11017,11 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
10717
11017
  parentRecordData: O,
10718
11018
  collectionNameUsedInURL: j,
10719
11019
  popupUidUsedInURL: k,
10720
- customActionSchema: $
11020
+ customActionSchema: M
10721
11021
  } = {}) => {
10722
11022
  if (!f())
10723
11023
  return I == null ? void 0 : I(!0);
10724
- const q = $ || n, E = q == null ? void 0 : q["x-uid"], V = y(O);
11024
+ const q = M || n, E = q == null ? void 0 : q["x-uid"], V = y(O);
10725
11025
  w = w || (a == null ? void 0 : a.data);
10726
11026
  const G = T({
10727
11027
  popupUid: E,
@@ -10741,7 +11041,7 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
10741
11041
  association: u,
10742
11042
  sourceId: V,
10743
11043
  tableBlockContext: P(x({}, F), { collection: l == null ? void 0 : l.name, blockData: v })
10744
- }), b(R(), $), q.properties) {
11044
+ }), b(R(), M), q.properties) {
10745
11045
  const H = h + 1;
10746
11046
  if (getPopupLayerState(H))
10747
11047
  return;
@@ -10796,7 +11096,7 @@ ${JSON.stringify(q, null, 2)}`
10796
11096
  });
10797
11097
  },
10798
11098
  [T, t, m == null ? void 0 : m.popupuid, a == null ? void 0 : a.data, o]
10799
- ), M = useCallback((w, O) => {
11099
+ ), $ = useCallback((w, O) => {
10800
11100
  O.__popup = w;
10801
11101
  }, []), L = useCallback((w) => w.__popup, []);
10802
11102
  return {
@@ -10808,7 +11108,7 @@ ${JSON.stringify(q, null, 2)}`
10808
11108
  * used to close popup by changing the url
10809
11109
  */
10810
11110
  closePopup: B,
10811
- savePopupSchemaToSchema: M,
11111
+ savePopupSchemaToSchema: $,
10812
11112
  getPopupSchemaFromSchema: L,
10813
11113
  context: S,
10814
11114
  /**
@@ -11643,13 +11943,19 @@ const designerCss$4 = ({ margin: e = "-18px -16px", padding: t = "18px 16px" } =
11643
11943
  }, [e, t]);
11644
11944
  return t ? o : [];
11645
11945
  }, TableColumnDecorator$1 = (e) => {
11946
+ var m, h;
11646
11947
  const t = useDesigner(), o = useField(), { fieldSchema: n, uiSchema: r, collectionField: a } = useColumnSchema$1(), { designable: i } = useSchemaComponentContext(), l = useCompile(), { isInSubTable: c } = useFlag() || {}, { token: u } = useToken$1(), { name: d } = (useBlockContext == null ? void 0 : useBlockContext()) || {};
11948
+ let p = n == null ? void 0 : n.required;
11949
+ if (c) {
11950
+ const g = (h = o.path) == null ? void 0 : h.splice(((m = o.path) == null ? void 0 : m.length) - 1, 1), f = o.form.query(`${g.concat("*." + n.name)}`).take();
11951
+ p = typeof (f == null ? void 0 : f.required) == "boolean" ? f.required : n == null ? void 0 : n.required;
11952
+ }
11647
11953
  return useEffect(() => {
11648
11954
  o.title || n && r != null && r.title && (o.title = r == null ? void 0 : r.title);
11649
11955
  }, [r == null ? void 0 : r.title]), !i || t.isNullComponent ? /* @__PURE__ */ jsxs(CollectionFieldContext.Provider, { value: a, children: [
11650
11956
  /* @__PURE__ */ jsx(t, { fieldSchema: n, uiSchema: r, collectionField: a }),
11651
11957
  /* @__PURE__ */ jsxs("span", { role: "button", children: [
11652
- (n == null ? void 0 : n.required) && /* @__PURE__ */ jsx("span", { className: "ant-formily-item-asterisk", children: "*" }),
11958
+ p && /* @__PURE__ */ jsx("span", { className: "ant-formily-item-asterisk", children: "*" }),
11653
11959
  /* @__PURE__ */ jsx("span", { children: (o == null ? void 0 : o.title) || l(r == null ? void 0 : r.title) })
11654
11960
  ] })
11655
11961
  ] }) : /* @__PURE__ */ jsx(
@@ -11662,7 +11968,7 @@ const designerCss$4 = ({ margin: e = "-18px -16px", padding: t = "18px 16px" } =
11662
11968
  children: /* @__PURE__ */ jsx(CollectionFieldContext.Provider, { value: a, children: /* @__PURE__ */ jsxs(BlockContext.Provider, { value: { name: c ? d : "taleColumn" }, children: [
11663
11969
  /* @__PURE__ */ jsx(t, { fieldSchema: n, uiSchema: r, collectionField: a }),
11664
11970
  /* @__PURE__ */ jsxs("span", { role: "button", children: [
11665
- (n == null ? void 0 : n.required) && /* @__PURE__ */ jsx("span", { className: "ant-formily-item-asterisk", children: "*" }),
11971
+ p && /* @__PURE__ */ jsx("span", { className: "ant-formily-item-asterisk", children: "*" }),
11666
11972
  /* @__PURE__ */ jsx("span", { children: (o == null ? void 0 : o.title) || l(r == null ? void 0 : r.title) })
11667
11973
  ] })
11668
11974
  ] }) })
@@ -11862,307 +12168,7 @@ const SchemaToolbarErrorFallback = (e) => {
11862
12168
  });
11863
12169
  }
11864
12170
  }
11865
- ];
11866
- function bindLinkageRulesToFiled({
11867
- field: e,
11868
- linkageRules: t,
11869
- formValues: o,
11870
- localVariables: n,
11871
- action: r,
11872
- rule: a,
11873
- variables: i,
11874
- variableNameOfLeftCondition: l
11875
- }, c) {
11876
- var u, d, p, m, h, g;
11877
- return e.initStateOfLinkageRules = {
11878
- display: ((u = e.initStateOfLinkageRules) == null ? void 0 : u.display) || getTempFieldState(!0, e.display),
11879
- required: ((d = e.initStateOfLinkageRules) == null ? void 0 : d.required) || getTempFieldState(!0, e.required || !1),
11880
- pattern: ((p = e.initStateOfLinkageRules) == null ? void 0 : p.pattern) || getTempFieldState(!0, e.pattern),
11881
- value: ((m = e.initStateOfLinkageRules) == null ? void 0 : m.value) || getTempFieldState(!0, e.value || e.initialValue),
11882
- dataSource: ((h = e.initStateOfLinkageRules) == null ? void 0 : h.dataSource) || getTempFieldState(!0, e.dataSource || e.options),
11883
- dateScope: ((g = e.initStateOfLinkageRules) == null ? void 0 : g.dateScope) || getTempFieldState(!0, null)
11884
- }, reaction(
11885
- // 这里共依赖 3 部分,当这 3 部分中的任意一部分发生变更后,需要触发联动规则:
11886
- // 1. 条件中的字段值;
11887
- // 2. 条件中的变量值;
11888
- // 3. value 表达式中的变量值;
11889
- () => {
11890
- const f = getFieldValuesInCondition({ linkageRules: t, formValues: o }), C = getVariableValuesInCondition({ linkageRules: t, localVariables: n }), b = getVariableValuesInExpression({ action: r, localVariables: n });
11891
- return [f, C, b].map((y) => JSON.stringify(y)).join(",");
11892
- },
11893
- getSubscriber({ action: r, field: e, rule: a, variables: i, localVariables: n, variableNameOfLeftCondition: l }, c),
11894
- { fireImmediately: !0, equals: _.isEqual }
11895
- );
11896
- }
11897
- function getFieldValuesInCondition({ linkageRules: e, formValues: t }) {
11898
- return e.map((o) => {
11899
- const n = (r) => {
11900
- const a = Object.keys(r)[0] || "$and";
11901
- return r[a].map((l) => {
11902
- if ("$and" in l || "$or" in l)
11903
- return n(l);
11904
- const c = getTargetField$1(l).join(".");
11905
- return getValuesByPath(t, c);
11906
- }).filter(Boolean);
11907
- };
11908
- return n(o.condition);
11909
- });
11910
- }
11911
- function getVariableValuesInCondition({
11912
- linkageRules: e,
11913
- localVariables: t
11914
- }) {
11915
- return e.map((o) => {
11916
- const n = Object.keys(o.condition)[0] || "$and", r = o.condition[n];
11917
- return o.conditionType === "advanced" ? r.map((a) => {
11918
- if (!a)
11919
- return null;
11920
- if (a.$and || a.$or)
11921
- return getVariableValuesInCondition({
11922
- linkageRules: [{ conditionType: "advanced", condition: a }],
11923
- localVariables: t
11924
- });
11925
- const i = (l) => isVariable$1(l) ? getVariableValue$1(l, t) : l;
11926
- return {
11927
- leftVar: i(a.leftVar),
11928
- rightVar: i(a.rightVar)
11929
- };
11930
- }).filter(Boolean) : r.map((a) => {
11931
- const i = getInnermostKeyAndValue(a);
11932
- return i ? isVariable$1(i.value) ? getVariableValue$1(i.value, t) : i.value : null;
11933
- }).filter(Boolean);
11934
- });
11935
- }
11936
- function getVariableValuesInExpression({ action: e, localVariables: t }) {
11937
- var a;
11938
- const o = e.value, n = o == null ? void 0 : o.mode, r = (o == null ? void 0 : o.value) || (o == null ? void 0 : o.result);
11939
- if (n === "express" && r != null)
11940
- return (a = getVariablesFromExpression(r)) == null ? void 0 : a.map((i) => getVariableValue$1(i, t)).filter(Boolean);
11941
- }
11942
- function getVariableValue$1(e, t) {
11943
- var r;
11944
- if (!isVariable$1(e))
11945
- return;
11946
- const o = getVariableName(e), n = {
11947
- [o]: (r = t.find((a) => a.name === o)) == null ? void 0 : r.ctx
11948
- };
11949
- return getValuesByPath(n, getPath(e));
11950
- }
11951
- function getSubscriber({
11952
- action: e,
11953
- field: t,
11954
- rule: o,
11955
- variables: n,
11956
- localVariables: r,
11957
- variableNameOfLeftCondition: a
11958
- }, i) {
11959
- return () => {
11960
- collectFieldStateOfLinkageRules(
11961
- {
11962
- operator: e.operator,
11963
- value: e.value,
11964
- field: t,
11965
- condition: o.condition,
11966
- variables: n,
11967
- localVariables: r,
11968
- variableNameOfLeftCondition: a,
11969
- action: e,
11970
- conditionType: o.conditionType
11971
- },
11972
- i
11973
- ), setTimeout(() => z(this, null, function* () {
11974
- var d, p, m, h, g, f, C, b;
11975
- const l = getFieldNameByOperator(e.operator);
11976
- if (!((d = t.stateOfLinkageRules) != null && d[l]))
11977
- return;
11978
- let c = t.stateOfLinkageRules[l];
11979
- c = yield Promise.all(c), c = c.filter((S) => S.condition);
11980
- const u = c[c.length - 1];
11981
- if (l === "value")
11982
- c.length > 1 && (t.value = u.value);
11983
- else if (l === "dateScope")
11984
- t.setComponentProps({
11985
- _maxDate: ((m = (p = u.value) == null ? void 0 : p._maxDate) == null ? void 0 : m.value) || ((h = u.value) == null ? void 0 : h._maxDate),
11986
- _minDate: ((f = (g = u.value) == null ? void 0 : g._minDate) == null ? void 0 : f.value) || ((C = u.value) == null ? void 0 : C._minDate)
11987
- });
11988
- else {
11989
- if (l === "display" && (u == null ? void 0 : u.value) === "hidden")
11990
- t.display = "visible", t.data = t.data || {}, t.data.hidden = !0, t.required && (t.required = !1, t.data.prevRequired = !0), requestAnimationFrame(() => {
11991
- t.setState((S) => {
11992
- S.display = "visible";
11993
- });
11994
- });
11995
- else if (l === "dataSource") {
11996
- const S = ((b = u == null ? void 0 : u.value) == null ? void 0 : b.map((y) => y.value)) || [];
11997
- (!Array.isArray(t.value) && !S.includes(t.value) || Array.isArray(t.value) && _.difference(t.value, S).length > 0) && (t.value = t.initialValue), t[l] = u == null ? void 0 : u.value, t.data = t.data || {}, requestAnimationFrame(() => {
11998
- t.setState((y) => {
11999
- y[l] = u == null ? void 0 : u.value;
12000
- });
12001
- });
12002
- } else
12003
- l === "display" && (u == null ? void 0 : u.value) === "visible" ? (t[l] = u == null ? void 0 : u.value, l === "display" && (u == null ? void 0 : u.value) === "visible" && (t.data = t.data || {}, t.data.hidden = !1, t.data.prevRequired && (delete t.data.prevRequired, t.required = !0)), requestAnimationFrame(() => {
12004
- t.setState((S) => {
12005
- S[l] = u == null ? void 0 : u.value;
12006
- });
12007
- })) : (t[l] = u == null ? void 0 : u.value, requestAnimationFrame(() => {
12008
- t.setState((S) => {
12009
- S[l] = u == null ? void 0 : u.value;
12010
- });
12011
- }));
12012
- l === "display" && (u == null ? void 0 : u.value) === "none" && (t.value = null);
12013
- }
12014
- t.stateOfLinkageRules[l] = null;
12015
- }));
12016
- };
12017
- }
12018
- function getFieldNameByOperator(e) {
12019
- switch (e) {
12020
- case ActionType.Required:
12021
- case ActionType.InRequired:
12022
- return "required";
12023
- case ActionType.Visible:
12024
- case ActionType.None:
12025
- case ActionType.Hidden:
12026
- return "display";
12027
- case ActionType.Editable:
12028
- case ActionType.ReadOnly:
12029
- case ActionType.ReadPretty:
12030
- return "pattern";
12031
- case ActionType.Value:
12032
- return "value";
12033
- case ActionType.Options:
12034
- return "dataSource";
12035
- case ActionType.DateScope:
12036
- return "dateScope";
12037
- default:
12038
- return null;
12039
- }
12040
- }
12041
- const collectFieldStateOfLinkageRules = ({
12042
- operator: e,
12043
- value: t,
12044
- field: o,
12045
- condition: n,
12046
- variables: r,
12047
- localVariables: a,
12048
- variableNameOfLeftCondition: i,
12049
- action: l,
12050
- conditionType: c
12051
- }, u) => {
12052
- var S, y, v, F, I, T, R, D, B, N, M, L, w, O;
12053
- const d = ((S = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : S.required) || [(y = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : y.required], p = ((v = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : v.display) || [(F = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : F.display], m = ((I = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : I.pattern) || [(T = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : T.pattern], h = ((R = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : R.value) || [(D = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : D.value], g = ((B = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : B.dataSource) || [(N = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : N.dataSource], { evaluate: f } = evaluators.get("formula.js"), C = {
12054
- ruleGroup: n,
12055
- variables: r,
12056
- localVariables: a,
12057
- variableNameOfLeftCondition: i,
12058
- conditionType: c
12059
- }, b = ((M = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : M.dateScope) || [(L = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : L.dateScope];
12060
- switch (e) {
12061
- case ActionType.Required:
12062
- d.push(getTempFieldState(conditionAnalyses(C, u), !0)), o.stateOfLinkageRules = P(x({}, o.stateOfLinkageRules), {
12063
- required: d
12064
- });
12065
- break;
12066
- case ActionType.InRequired:
12067
- d.push(getTempFieldState(conditionAnalyses(C, u), !1)), o.stateOfLinkageRules = P(x({}, o.stateOfLinkageRules), {
12068
- required: d
12069
- });
12070
- break;
12071
- case ActionType.Visible:
12072
- case ActionType.None:
12073
- case ActionType.Hidden:
12074
- p.push(getTempFieldState(conditionAnalyses(C, u), e)), o.stateOfLinkageRules = P(x({}, o.stateOfLinkageRules), {
12075
- display: p
12076
- });
12077
- break;
12078
- case ActionType.Editable:
12079
- case ActionType.ReadOnly:
12080
- case ActionType.ReadPretty:
12081
- m.push(getTempFieldState(conditionAnalyses(C, u), e)), o.stateOfLinkageRules = P(x({}, o.stateOfLinkageRules), {
12082
- pattern: m
12083
- });
12084
- break;
12085
- case ActionType.Value:
12086
- {
12087
- const j = () => z(void 0, null, function* () {
12088
- var k;
12089
- if ((t == null ? void 0 : t.mode) === "express") {
12090
- if ((t.value || t.result) == null)
12091
- return;
12092
- const { exp: $, scope: q } = yield replaceVariables(t.value || t.result, {
12093
- variables: r,
12094
- localVariables: a
12095
- });
12096
- try {
12097
- return f($, x({ now: () => (/* @__PURE__ */ new Date()).toString() }, q));
12098
- } catch (E) {
12099
- console.error(E);
12100
- }
12101
- } else
12102
- return (t == null ? void 0 : t.mode) === "constant" ? (k = t == null ? void 0 : t.value) != null ? k : t : null;
12103
- });
12104
- isConditionEmpty(n) ? h.push(getTempFieldState(!0, j())) : h.push(getTempFieldState(conditionAnalyses(C, u), j())), o.stateOfLinkageRules = P(x({}, o.stateOfLinkageRules), {
12105
- value: h
12106
- });
12107
- }
12108
- break;
12109
- case ActionType.Options:
12110
- {
12111
- const j = (O = (w = o.data) == null ? void 0 : w.dataSource) == null ? void 0 : O.filter((k) => t.value.includes(k.value));
12112
- g.push(getTempFieldState(conditionAnalyses(C, u), j || [])), o.stateOfLinkageRules = P(x({}, o.stateOfLinkageRules), {
12113
- dataSource: g
12114
- });
12115
- }
12116
- break;
12117
- case ActionType.DateScope: {
12118
- b.push(
12119
- getTempFieldState(conditionAnalyses(C, u), {
12120
- _maxDate: l._maxDate,
12121
- _minDate: l._minDate
12122
- })
12123
- ), o.stateOfLinkageRules = P(x({}, o.stateOfLinkageRules), {
12124
- dateScope: b
12125
- });
12126
- break;
12127
- }
12128
- default:
12129
- return null;
12130
- }
12131
- };
12132
- function getTempFieldState(e, t) {
12133
- return z(this, null, function* () {
12134
- return [e, t] = yield Promise.all([e, t]), {
12135
- condition: e,
12136
- value: t
12137
- };
12138
- });
12139
- }
12140
- function isConditionEmpty(e) {
12141
- const t = Object.keys(e)[0] || "$and", o = e[t];
12142
- return _.isEmpty(o);
12143
- }
12144
- function replaceVariables(n, r) {
12145
- return z(this, arguments, function* (e, {
12146
- variables: t,
12147
- localVariables: o
12148
- }) {
12149
- var c;
12150
- const a = {}, i = {};
12151
- if (e == null)
12152
- return;
12153
- const l = (c = e.match(REGEX_OF_VARIABLE_IN_EXPRESSION)) == null ? void 0 : c.map((u) => z(this, null, function* () {
12154
- const { value: d } = yield t.parseVariable(u, o, {
12155
- doNotRequest: u.includes("$nForm") || u.includes("$iteration")
12156
- }), p = `_${uid$1()}`;
12157
- return i[p] = d, a[u] = p, d;
12158
- }));
12159
- return l && (yield Promise.all(l)), {
12160
- exp: e.replace(REGEX_OF_VARIABLE_IN_EXPRESSION, (u) => `{{${a[u] || u}}}`),
12161
- scope: i
12162
- };
12163
- });
12164
- }
12165
- const RemoveConditionContext$1 = createContext(null);
12171
+ ], RemoveConditionContext$1 = createContext(null);
12166
12172
  RemoveConditionContext$1.displayName = "RemoveConditionContext";
12167
12173
  const FilterContext$3 = createContext(null);
12168
12174
  FilterContext$3.displayName = "FilterContext";
@@ -12639,12 +12645,7 @@ const CurrentRecordContext = createContext(null), CurrentRecordContextProvider =
12639
12645
  /** 当前记录对应的 collection name */
12640
12646
  collectionName: r
12641
12647
  };
12642
- }, getVariableValue = (e, t) => z(void 0, null, function* () {
12643
- if (!e)
12644
- return e;
12645
- const { evaluate: o } = evaluators.get("string"), { exp: n, scope: r } = yield replaceVariables(e, t);
12646
- return o(n, x({ now: () => (/* @__PURE__ */ new Date()).toString() }, r));
12647
- }), SettingsMenuProvider = (e) => SelectWithTitle, DropdownVisibleContext = createContext(null);
12648
+ }, SettingsMenuProvider = (e) => SelectWithTitle, DropdownVisibleContext = createContext(null);
12648
12649
  DropdownVisibleContext.displayName = "DropdownVisibleContext";
12649
12650
  const CurrentUserContext = createContext(null);
12650
12651
  CurrentUserContext.displayName = "CurrentUserContext";
@@ -12918,10 +12919,10 @@ const DatePickerContext = React.createContext({ utc: !0 }), useDatePickerContext
12918
12919
  return {
12919
12920
  disabledHours: () => {
12920
12921
  const B = [];
12921
- return F && B.push(...Array.from({ length: g.hour() }, (N, M) => M)), I && B.push(...Array.from({ length: 24 - f.hour() }, (N, M) => M + f.hour() + 1)), B;
12922
+ return F && B.push(...Array.from({ length: g.hour() }, (N, $) => $)), I && B.push(...Array.from({ length: 24 - f.hour() }, (N, $) => $ + f.hour() + 1)), B;
12922
12923
  },
12923
12924
  disabledMinutes: (B) => F && B === g.hour() ? C.filter((N) => N < g.minute()) : I && B === f.hour() ? C.filter((N) => N > f.minute()) : [],
12924
- disabledSeconds: (B, N) => F && B === g.hour() && N === g.minute() ? C.filter((M) => M < g.second()) : I && B === f.hour() && N === f.minute() ? C.filter((M) => M > f.second()) : []
12925
+ disabledSeconds: (B, N) => F && B === g.hour() && N === g.minute() ? C.filter(($) => $ < g.second()) : I && B === f.hour() && N === f.minute() ? C.filter(($) => $ > f.second()) : []
12925
12926
  };
12926
12927
  };
12927
12928
  i(() => b), c(() => S);
@@ -13828,7 +13829,7 @@ const ParentCollectionProvider = (e) => {
13828
13829
  collectionField: e,
13829
13830
  noDisabled: r,
13830
13831
  targetFieldSchema: a
13831
- }), { currentParentRecordSettings: N, shouldDisplayCurrentParentRecord: M } = useCurrentParentRecordVariable({
13832
+ }), { currentParentRecordSettings: N, shouldDisplayCurrentParentRecord: $ } = useCurrentParentRecordVariable({
13832
13833
  schema: o,
13833
13834
  collectionName: c,
13834
13835
  collectionField: e,
@@ -13845,7 +13846,7 @@ const ParentCollectionProvider = (e) => {
13845
13846
  S && b,
13846
13847
  v && y,
13847
13848
  I && F,
13848
- M && N,
13849
+ $ && N,
13849
13850
  R && T,
13850
13851
  B && D,
13851
13852
  w && L
@@ -13862,7 +13863,7 @@ const ParentCollectionProvider = (e) => {
13862
13863
  y,
13863
13864
  I,
13864
13865
  F,
13865
- M,
13866
+ $,
13866
13867
  N,
13867
13868
  R,
13868
13869
  T,
@@ -13914,20 +13915,20 @@ const ParentCollectionProvider = (e) => {
13914
13915
  }));
13915
13916
  },
13916
13917
  [o, u]
13917
- ), M = m(
13918
+ ), $ = m(
13918
13919
  B(_.isEmpty(F) ? R : F, {
13919
13920
  value: t
13920
13921
  })
13921
13922
  );
13922
13923
  return useEffect(() => {
13923
- C == null || C(M);
13924
+ C == null || C($);
13924
13925
  }, [t, F]), /* @__PURE__ */ jsx(
13925
13926
  Variable.Input,
13926
13927
  {
13927
13928
  className: i,
13928
13929
  value: t,
13929
13930
  onChange: N,
13930
- scope: M,
13931
+ scope: $,
13931
13932
  style: r,
13932
13933
  changeOnSelect: y,
13933
13934
  hideVariableButton: f,
@@ -14229,8 +14230,8 @@ const SchemaSettingsDateFormat = function(t) {
14229
14230
  (n.componentProps.picker || "date") !== D.picker && !m && n.value && (n.value = void 0, n.initialValue = void 0, o.default = void 0, B.default = void 0), B["x-component-props"] = n.componentProps || {}, o["x-component-props"] = x(x({}, n.componentProps || {}), D), B["x-component-props"] = o["x-component-props"], n.componentProps = o["x-component-props"];
14230
14231
  const N = n.path.entire.split(".");
14231
14232
  N.pop();
14232
- const M = N.join(".");
14233
- n.query(`${M}.*[0:].${o.name}`).forEach((L) => {
14233
+ const $ = N.join(".");
14234
+ n.query(`${$}.*[0:].${o.name}`).forEach((L) => {
14234
14235
  L.props.name === o.name && ((n.componentProps.picker || "date") !== D.picker && !m && (L.value = void 0, L.initialValue = void 0), L.setComponentProps(x({}, D)));
14235
14236
  }), r.emit("patch", {
14236
14237
  schema: B
@@ -14252,7 +14253,7 @@ const getActionContext = (e) => {
14252
14253
  var o;
14253
14254
  return ((o = e.fieldSchema) == null ? void 0 : o["x-action-context"]) || {};
14254
14255
  }, SchemaSettingsDefaultValue = function(t) {
14255
- var k, $, q;
14256
+ var k, M, q;
14256
14257
  const o = useFieldSchema(), n = (k = t == null ? void 0 : t.fieldSchema) != null ? k : o, r = useField(), { dn: a } = useDesignable(), { t: i } = useTranslation(), l = useActionContext(), c = getActionContext(l).collection;
14257
14258
  let u;
14258
14259
  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 } = useFormBlockContext(), { getFields: y } = useCollectionFilterOptionsV2(C), { isInSubForm: v, isInSubTable: F } = useFlag() || {}, { name: I } = C, T = useMemo(
@@ -14260,9 +14261,9 @@ const getActionContext = (e) => {
14260
14261
  [n, p, d]
14261
14262
  ), R = _.omit(n, "required");
14262
14263
  T != null && T.target && (u = p(
14263
- `${T.target}.${((q = ($ = n["x-component-props"]) == null ? void 0 : $.fieldNames) == null ? void 0 : q.label) || "id"}`
14264
+ `${T.target}.${((q = (M = n["x-component-props"]) == null ? void 0 : M.fieldNames) == null ? void 0 : q.label) || "id"}`
14264
14265
  ));
14265
- const D = (T == null ? void 0 : T.interface) === "m2o" && findParentFieldSchema(n), B = D && p(D == null ? void 0 : D["x-collection-field"]), N = useTableBlockContext(), M = (T == null ? void 0 : T.interface) === "m2m" || (T == null ? void 0 : T.interface) === "mbm" || (B == null ? void 0 : B.type) === "hasMany" && (T == null ? void 0 : T.interface) === "m2o", L = useCallback(
14266
+ const D = (T == null ? void 0 : T.interface) === "m2o" && findParentFieldSchema(n), B = D && p(D == null ? void 0 : D["x-collection-field"]), N = useTableBlockContext(), $ = (T == null ? void 0 : T.interface) === "m2m" || (T == null ? void 0 : T.interface) === "mbm" || (B == null ? void 0 : B.type) === "hasMany" && (T == null ? void 0 : T.interface) === "m2o", L = useCallback(
14266
14267
  (E) => {
14267
14268
  const V = E.find((U) => U.value === "$nForm"), G = m(I);
14268
14269
  return !(G != null && G.length) && V && (V.children = formatVariableScop(y())), E;
@@ -14287,7 +14288,7 @@ const getActionContext = (e) => {
14287
14288
  "x-component": "VariableInput",
14288
14289
  "x-component-props": P(x({}, (n == null ? void 0 : n["x-component-props"]) || {}), {
14289
14290
  collectionField: T,
14290
- contextCollectionName: M ? c : "",
14291
+ contextCollectionName: $ ? c : "",
14291
14292
  schema: T == null ? void 0 : T.uiSchema,
14292
14293
  targetFieldSchema: n,
14293
14294
  className: defaultInputStyle,
@@ -14335,7 +14336,7 @@ const getActionContext = (e) => {
14335
14336
  R,
14336
14337
  S,
14337
14338
  h,
14338
- M,
14339
+ $,
14339
14340
  f,
14340
14341
  b,
14341
14342
  L,
@@ -15230,8 +15231,8 @@ const useGetFilterOptions = () => {
15230
15231
  };
15231
15232
  });
15232
15233
  }, TableColumnDesigner$1 = (e) => {
15233
- var N, M, L, w, O, j, k, $, q, E, V, G;
15234
- const { uiSchema: t, fieldSchema: o, collectionField: n } = e, { form: r } = useFormBlockContext(), { getInterface: a, getCollection: i } = useCollectionManager_deprecated(), l = useField(), { t: c } = useTranslation(), u = useFieldSchema(), { dn: d } = useDesignable(), p = ((N = o == null ? void 0 : o["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((L = n == null ? void 0 : n.target) != null ? L : n == null ? void 0 : n.targetCollection), h = useColorFields((w = n == null ? void 0 : n.target) != null ? w : n == null ? void 0 : n.targetCollection), g = a(n == null ? void 0 : n.interface), f = i(n == null ? void 0 : n.target), C = isFileCollection$2(f), b = ["QuickEdit", "FormItem"].includes(o["x-decorator"]), { currentMode: S } = useAssociationFieldContext(), { isAllowToSetDefaultValue: y } = useIsAllowToSetDefaultValue({ collectionField: n, fieldSchema: o }), v = ["datetime", "createdAt", "updatedAt"].includes(n == null ? void 0 : n.interface), F = ["obo", "oho", "o2o", "o2m", "m2m", "m2o", "snapshot"].includes(
15234
+ var N, $, L, w, O, j, k, M, q, E, V, G;
15235
+ const { uiSchema: t, fieldSchema: o, collectionField: n } = e, { form: r } = useFormBlockContext(), { getInterface: a, getCollection: i } = useCollectionManager_deprecated(), l = useField(), { t: c } = useTranslation(), u = useFieldSchema(), { dn: d } = useDesignable(), p = ((N = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : N.fieldNames) || (($ = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : $.fieldNames), m = useLabelFields$1((L = n == null ? void 0 : n.target) != null ? L : n == null ? void 0 : n.targetCollection), h = useColorFields((w = n == null ? void 0 : n.target) != null ? w : n == null ? void 0 : n.targetCollection), g = a(n == null ? void 0 : n.interface), f = i(n == null ? void 0 : n.target), C = isFileCollection$2(f), b = ["QuickEdit", "FormItem"].includes(o["x-decorator"]), { currentMode: S } = useAssociationFieldContext(), { isAllowToSetDefaultValue: y } = useIsAllowToSetDefaultValue({ collectionField: n, fieldSchema: o }), v = ["datetime", "createdAt", "updatedAt"].includes(n == null ? void 0 : n.interface), F = ["obo", "oho", "o2o", "o2m", "m2m", "m2o", "snapshot"].includes(
15235
15236
  n == null ? void 0 : n.interface
15236
15237
  ), I = useFieldModeOptions({ fieldSchema: o }), T = ((O = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : O.mode) || "Select";
15237
15238
  let R = "editable";
@@ -15273,7 +15274,7 @@ const useGetFilterOptions = () => {
15273
15274
  SchemaSettingsDataScope,
15274
15275
  {
15275
15276
  collectionName: n == null ? void 0 : n.target,
15276
- defaultFilter: ((q = ($ = (k = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : k.service) == null ? void 0 : $.params) == null ? void 0 : q.filter) || {},
15277
+ defaultFilter: ((q = (M = (k = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : k.service) == null ? void 0 : M.params) == null ? void 0 : q.filter) || {},
15277
15278
  form: r,
15278
15279
  onSubmit: ({ filter: U }) => {
15279
15280
  var Y, J;
@@ -16591,8 +16592,8 @@ const useFormItemInitializerFields = (e) => {
16591
16592
  schema: S
16592
16593
  };
16593
16594
  return l == "Kanban" && (y.find = (D, B, N) => {
16594
- const M = findSchema(D, "x-component", l);
16595
- return findSchema(M, B, N);
16595
+ const $ = findSchema(D, "x-component", l);
16596
+ return findSchema($, B, N);
16596
16597
  }), y;
16597
16598
  });
16598
16599
  }, useFilterFormItemInitializerFields = (e) => {
@@ -16971,7 +16972,7 @@ const useFormItemInitializerFields = (e) => {
16971
16972
  ]
16972
16973
  })), [y, C == null ? void 0 : C.inherits, C == null ? void 0 : C.name, t, v, h]);
16973
16974
  return r ? useMemo(() => {
16974
- var M;
16975
+ var $;
16975
16976
  const I = {
16976
16977
  name: "currentRecord",
16977
16978
  collectionName: C.name,
@@ -17042,7 +17043,7 @@ const useFormItemInitializerFields = (e) => {
17042
17043
  else if (F[0].children.length)
17043
17044
  if (l) {
17044
17045
  if (F[0].children.length <= 1)
17045
- return F[0].children = ((M = F[0].children[0]) == null ? void 0 : M.children) || [], F;
17046
+ return F[0].children = (($ = F[0].children[0]) == null ? void 0 : $.children) || [], F;
17046
17047
  B = [I];
17047
17048
  } else
17048
17049
  B = [I, D];
@@ -17810,10 +17811,10 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
17810
17811
  t["x-settings"] || a,
17811
17812
  t["x-settings-props"]
17812
17813
  ), S = useGridRowContext(), y = useGridContext(), v = useDataSourceManager(), F = v == null ? void 0 : v.getDataSources(), I = useDataSource(), T = (F == null ? void 0 : F.length) > 1 && I, R = ["FormItem", "ReadPrettyFormItem"].includes(r == null ? void 0 : r.componentName) ? `${r == null ? void 0 : r.name} ${m("(Fields only)")}` : r == null ? void 0 : r.name, D = useMemo(() => {
17813
- var M;
17814
+ var $;
17814
17815
  return {
17815
17816
  insertPosition: "afterEnd",
17816
- wrap: ((M = S == null ? void 0 : S.cols) == null ? void 0 : M.length) > 1 ? void 0 : gridRowColWrap,
17817
+ wrap: (($ = S == null ? void 0 : S.cols) == null ? void 0 : $.length) > 1 ? void 0 : gridRowColWrap,
17817
17818
  Component: (L) => /* @__PURE__ */ jsx(
17818
17819
  PlusOutlined,
17819
17820
  P(x({}, L), {
@@ -17881,7 +17882,7 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
17881
17882
  container: g
17882
17883
  } = x(x({}, e), (t == null ? void 0 : t["x-toolbar-props"]) || {}), f = useCompile(), { draggable: C } = useContext(SchemaComponentContext), { componentCls: b, hashId: S } = useStyles$g(), { t: y } = useTranslation(), { getAriaLabel: v } = useGetAriaLabelOfDesigner(), F = useDataSourceManager(), I = F == null ? void 0 : F.getDataSources(), T = useDataSource(), R = (I == null ? void 0 : I.length) > 1 && T, D = useRefreshFieldSchema(), B = useRef(y("Reference template")), N = useCallback(() => {
17883
17884
  D({ refreshParentSchema: !0 });
17884
- }, [D]), M = useMemo(() => {
17885
+ }, [D]), $ = useMemo(() => {
17885
17886
  if (o) {
17886
17887
  if (typeof o == "string")
17887
17888
  return [f(o)];
@@ -17894,7 +17895,7 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
17894
17895
  ), { render: O, exists: j } = useSchemaInitializerRender(
17895
17896
  n || (t == null ? void 0 : t["x-initializer"]),
17896
17897
  t == null ? void 0 : t["x-initializer-props"]
17897
- ), k = useGridRowContext(), $ = useGridContext(), q = useMemo(() => {
17898
+ ), k = useGridRowContext(), M = useGridContext(), q = useMemo(() => {
17898
17899
  var K;
17899
17900
  return {
17900
17901
  insertPosition: "afterEnd",
@@ -17914,9 +17915,9 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
17914
17915
  return null;
17915
17916
  if (j)
17916
17917
  return O(q);
17917
- if ($ != null && $.InitializerComponent || $ != null && $.renderSchemaInitializer)
17918
- return $ != null && $.InitializerComponent ? /* @__PURE__ */ jsx($.InitializerComponent, x({}, q)) : (K = $.renderSchemaInitializer) == null ? void 0 : K.call($, q);
17919
- }, [$, n, q, j, O]), G = useMemo(() => r !== !1 && w ? L() : null, [w, L, r]), U = useRef(null), H = "hidden";
17918
+ if (M != null && M.InitializerComponent || M != null && M.renderSchemaInitializer)
17919
+ return M != null && M.InitializerComponent ? /* @__PURE__ */ jsx(M.InitializerComponent, x({}, q)) : (K = M.renderSchemaInitializer) == null ? void 0 : K.call(M, q);
17920
+ }, [M, n, q, j, O]), G = useMemo(() => r !== !1 && w ? L() : null, [w, L, r]), U = useRef(null), H = "hidden";
17920
17921
  useEffect(() => {
17921
17922
  const K = U.current;
17922
17923
  let X = K == null ? void 0 : K.parentElement;
@@ -17951,9 +17952,9 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
17951
17952
  className: cls(b, S, m, "schema-toolbar", H),
17952
17953
  style: Y,
17953
17954
  children: [
17954
- M && /* @__PURE__ */ jsx("div", { className: "toolbar-title", children: /* @__PURE__ */ jsxs(Space$1, { size: 2, children: [
17955
- /* @__PURE__ */ jsx("span", { className: "toolbar-title-tag", children: R ? `${f(R == null ? void 0 : R.displayName)} > ${M[0]}` : M[0] }, M[0]),
17956
- M[1] && /* @__PURE__ */ jsx("span", { className: "toolbar-title-tag", children: `${B.current}: ${`${M[1]}` || y("Untitled")}` })
17955
+ $ && /* @__PURE__ */ jsx("div", { className: "toolbar-title", children: /* @__PURE__ */ jsxs(Space$1, { size: 2, children: [
17956
+ /* @__PURE__ */ jsx("span", { className: "toolbar-title-tag", children: R ? `${f(R == null ? void 0 : R.displayName)} > ${$[0]}` : $[0] }, $[0]),
17957
+ $[1] && /* @__PURE__ */ jsx("span", { className: "toolbar-title-tag", children: `${B.current}: ${`${$[1]}` || y("Untitled")}` })
17957
17958
  ] }) }),
17958
17959
  /* @__PURE__ */ jsx("div", { className: cls("toolbar-icons", i), style: l, children: /* @__PURE__ */ jsxs(Space$1, { size: 3, align: "center", className: d, style: p, children: [
17959
17960
  E,
@@ -18174,8 +18175,8 @@ const useDragEnd = (e) => {
18174
18175
  const { refresh: t } = useDesignable(), o = useAPIClient(), { t: n } = useTranslation();
18175
18176
  return useCallback(
18176
18177
  (r) => {
18177
- var f, C, b, S, y, v, F, I, T, R, D, B, N, M, L;
18178
- const { active: a, over: i } = r, l = (C = (f = a == null ? void 0 : a.data) == null ? void 0 : f.current) == null ? void 0 : C.schema, c = (S = (b = i == null ? void 0 : i.data) == null ? void 0 : b.current) == null ? void 0 : S.schema, u = (v = (y = i == null ? void 0 : i.data) == null ? void 0 : y.current) == null ? void 0 : v.insertAdjacent, d = (I = (F = i == null ? void 0 : i.data) == null ? void 0 : F.current) == null ? void 0 : I.breakRemoveOn, p = (R = (T = i == null ? void 0 : i.data) == null ? void 0 : T.current) == null ? void 0 : R.wrapSchema, m = (B = (D = i == null ? void 0 : i.data) == null ? void 0 : D.current) == null ? void 0 : B.onSuccess, h = (L = (M = (N = i == null ? void 0 : i.data) == null ? void 0 : N.current) == null ? void 0 : M.removeParentsIfNoChildren) != null ? L : !0;
18178
+ var f, C, b, S, y, v, F, I, T, R, D, B, N, $, L;
18179
+ const { active: a, over: i } = r, l = (C = (f = a == null ? void 0 : a.data) == null ? void 0 : f.current) == null ? void 0 : C.schema, c = (S = (b = i == null ? void 0 : i.data) == null ? void 0 : b.current) == null ? void 0 : S.schema, u = (v = (y = i == null ? void 0 : i.data) == null ? void 0 : y.current) == null ? void 0 : v.insertAdjacent, d = (I = (F = i == null ? void 0 : i.data) == null ? void 0 : F.current) == null ? void 0 : I.breakRemoveOn, p = (R = (T = i == null ? void 0 : i.data) == null ? void 0 : T.current) == null ? void 0 : R.wrapSchema, m = (B = (D = i == null ? void 0 : i.data) == null ? void 0 : D.current) == null ? void 0 : B.onSuccess, h = (L = ($ = (N = i == null ? void 0 : i.data) == null ? void 0 : N.current) == null ? void 0 : $.removeParentsIfNoChildren) != null ? L : !0;
18179
18180
  if (!l || !c) {
18180
18181
  e == null || e(r);
18181
18182
  return;
@@ -18332,23 +18333,23 @@ const breakRemoveOnGrid = (e) => e["x-component"] === "Grid", breakRemoveOnRow =
18332
18333
  if (!B || !r)
18333
18334
  return;
18334
18335
  o.current = D.active.id;
18335
- const N = B.current, M = N.previousElementSibling, L = N.nextElementSibling;
18336
- F([M.clientWidth, L.clientWidth]);
18336
+ const N = B.current, $ = N.previousElementSibling, L = N.nextElementSibling;
18337
+ F([$.clientWidth, L.clientWidth]);
18337
18338
  },
18338
18339
  onDragMove(D) {
18339
18340
  if (!r || !y)
18340
18341
  return;
18341
18342
  o.current === D.active.id && (o.current = o.current + "_move");
18342
- const B = l.current, N = B.previousElementSibling, M = B.nextElementSibling;
18343
- N.style.width = `${v[0] + D.delta.x}px`, M.style.width = `${v[1] - D.delta.x}px`;
18343
+ const B = l.current, N = B.previousElementSibling, $ = B.nextElementSibling;
18344
+ N.style.width = `${v[0] + D.delta.x}px`, $.style.width = `${v[1] - D.delta.x}px`;
18344
18345
  },
18345
18346
  onDragEnd(D) {
18346
18347
  var j;
18347
18348
  if (!r || !o.current || (j = o.current) != null && j.startsWith(D.active.id) && !o.current.endsWith("_move") || v[0] <= 0 || v[1] <= 0 || (F([0, 0]), !h || !g))
18348
18349
  return;
18349
- const B = l.current, N = B.previousElementSibling, M = B.nextElementSibling;
18350
+ const B = l.current, N = B.previousElementSibling, $ = B.nextElementSibling;
18350
18351
  h["x-component-props"] = h["x-component-props"] || {}, g["x-component-props"] = g["x-component-props"] || {};
18351
- const L = B.clientWidth * (e.cols.length + 1) / e.cols.length, w = (100 * (N.getBoundingClientRect().width + L) / B.parentElement.clientWidth).toFixed(2), O = (100 * (M.getBoundingClientRect().width + L) / B.parentElement.clientWidth).toFixed(2);
18352
+ const L = B.clientWidth * (e.cols.length + 1) / e.cols.length, w = (100 * (N.getBoundingClientRect().width + L) / B.parentElement.clientWidth).toFixed(2), O = (100 * ($.getBoundingClientRect().width + L) / B.parentElement.clientWidth).toFixed(2);
18352
18353
  _.set(h, "x-component-props.width", w), _.set(g, "x-component-props.width", O), n.emit("batchPatch", {
18353
18354
  schemas: [
18354
18355
  {
@@ -18663,8 +18664,8 @@ const useTableBlockProps = () => {
18663
18664
  ),
18664
18665
  onChange: useCallback(
18665
18666
  ({ current: S, pageSize: y }, v, F) => {
18666
- var B, N, M, L, w, O, j, k, $, q;
18667
- const I = (M = (N = (B = t.parent) == null ? void 0 : B["x-decorator-props"]) == null ? void 0 : N.params) == null ? void 0 : M.sort, T = F.order ? F.order === "ascend" ? [F.field] : [`-${F.field}`] : I || a.dragSortBy, R = y || ((O = (w = (L = t.parent) == null ? void 0 : L["x-decorator-props"]) == null ? void 0 : w.params) == null ? void 0 : O.pageSize), D = P(x({}, ($ = (k = (j = i.current) == null ? void 0 : j.service) == null ? void 0 : k.params) == null ? void 0 : $[0]), { page: S || 1, pageSize: R });
18667
+ var B, N, $, L, w, O, j, k, M, q;
18668
+ const I = ($ = (N = (B = t.parent) == null ? void 0 : B["x-decorator-props"]) == null ? void 0 : N.params) == null ? void 0 : $.sort, T = F.order ? F.order === "ascend" ? [F.field] : [`-${F.field}`] : I || a.dragSortBy, R = y || ((O = (w = (L = t.parent) == null ? void 0 : L["x-decorator-props"]) == null ? void 0 : w.params) == null ? void 0 : O.pageSize), D = P(x({}, (M = (k = (j = i.current) == null ? void 0 : j.service) == null ? void 0 : k.params) == null ? void 0 : M[0]), { page: S || 1, pageSize: R });
18668
18669
  T && (D.sort = T), (q = i.current) == null || q.service.run(D);
18669
18670
  },
18670
18671
  [t.parent]
@@ -18678,11 +18679,11 @@ const useTableBlockProps = () => {
18678
18679
  }
18679
18680
  const R = T.find((D) => D.uid === t.parent["x-uid"]);
18680
18681
  T.forEach((D) => {
18681
- var j, k, $, q;
18682
+ var j, k, M, q;
18682
18683
  const B = F.find((E) => E.uid === D.uid);
18683
18684
  if (!B)
18684
18685
  return;
18685
- const N = getSourceKey(R, B.field) || a.rowKey || "id", M = [S[N]], L = ((j = D.service.params) == null ? void 0 : j[0]) || {}, w = (($ = (k = D.service.params) == null ? void 0 : k[1]) == null ? void 0 : $.filters) || {};
18686
+ const N = getSourceKey(R, B.field) || a.rowKey || "id", $ = [S[N]], L = ((j = D.service.params) == null ? void 0 : j[0]) || {}, w = ((M = (k = D.service.params) == null ? void 0 : k[1]) == null ? void 0 : M.filters) || {};
18686
18687
  if (v.includes(S[a.rowKey])) {
18687
18688
  if ((q = D.clearSelection) == null || q.call(D), D.dataLoadingMode === "manual")
18688
18689
  return D.clearData();
@@ -18692,7 +18693,7 @@ const useTableBlockProps = () => {
18692
18693
  $and: [
18693
18694
  {
18694
18695
  [B.field || a.rowKey]: {
18695
- [B.field ? "$in" : "$eq"]: M
18696
+ [B.field ? "$in" : "$eq"]: $
18696
18697
  }
18697
18698
  }
18698
18699
  ]
@@ -19058,10 +19059,10 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
19058
19059
  var i, l, c, u, d, p, m, h, g, f, C, b, S, y, v, F;
19059
19060
  const e = useField(), t = useTableSelectorContext(), o = useFieldSchema(), { getCollectionJoinField: n } = useCollectionManager_deprecated(), r = recursiveParent(o, "CollectionField"), a = n(r == null ? void 0 : r["x-collection-field"]);
19060
19061
  return useEffect(() => {
19061
- var T, R, D, B, N, M, L, w, O, j, k, $, q;
19062
+ var T, R, D, B, N, $, L, w, O, j, k, M, q;
19062
19063
  if (!((T = t == null ? void 0 : t.service) != null && T.loading)) {
19063
19064
  const E = (D = (R = t == null ? void 0 : t.service) == null ? void 0 : R.data) == null ? void 0 : D.data.map((V) => V);
19064
- e.value = E, (B = e == null ? void 0 : e.setInitialValue) == null || B.call(e, E), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (L = (M = (N = t == null ? void 0 : t.service) == null ? void 0 : N.data) == null ? void 0 : M.meta) == null ? void 0 : L.pageSize, e.componentProps.pagination.total = (j = (O = (w = t == null ? void 0 : t.service) == null ? void 0 : w.data) == null ? void 0 : O.meta) == null ? void 0 : j.count, e.componentProps.pagination.current = (q = ($ = (k = t == null ? void 0 : t.service) == null ? void 0 : k.data) == null ? void 0 : $.meta) == null ? void 0 : q.page;
19065
+ e.value = E, (B = e == null ? void 0 : e.setInitialValue) == null || B.call(e, E), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (L = ($ = (N = t == null ? void 0 : t.service) == null ? void 0 : N.data) == null ? void 0 : $.meta) == null ? void 0 : L.pageSize, e.componentProps.pagination.total = (j = (O = (w = t == null ? void 0 : t.service) == null ? void 0 : w.data) == null ? void 0 : O.meta) == null ? void 0 : j.count, e.componentProps.pagination.current = (q = (M = (k = t == null ? void 0 : t.service) == null ? void 0 : k.data) == null ? void 0 : M.meta) == null ? void 0 : q.page;
19065
19066
  }
19066
19067
  }, [
19067
19068
  a == null ? void 0 : a.foreignKey,
@@ -20505,7 +20506,7 @@ const DynamicComponent$1 = (e) => {
20505
20506
  }, DateScopeComponent = (e) => {
20506
20507
  var g, f, C, b, S, y, v, F, I, T, R, D, B, N;
20507
20508
  const t = useFieldSchema(), { getCollectionJoinField: o } = useCollectionManager_deprecated(), n = o(t == null ? void 0 : t["x-collection-field"]) || {}, r = ((g = n == null ? void 0 : n.uiSchema) == null ? void 0 : g["x-component-props"].gmt) || !1, a = ((f = n == null ? void 0 : n.uiSchema) == null ? void 0 : f["x-component-props"].utc) || !1, { form: i } = useFormBlockContext(), l = useRecord(), c = ((C = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : C.showTime) || ((S = (b = n == null ? void 0 : n.uiSchema) == null ? void 0 : b["x-component-props"]) == null ? void 0 : S.showTime) || !1, u = ((y = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : y.dateFormat) || ((F = (v = n == null ? void 0 : n.uiSchema) == null ? void 0 : v["x-component-props"]) == null ? void 0 : F.dateFormat) || "YYYY-MM-DD", d = ((I = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : I.timeFormat) || ((R = (T = n == null ? void 0 : n.uiSchema) == null ? void 0 : T["x-component-props"]) == null ? void 0 : R.timeFormat) || "HH:mm:ss", p = ((D = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : D.picker) || ((N = (B = n == null ? void 0 : n.uiSchema) == null ? void 0 : B["x-component-props"]) == null ? void 0 : N.picker) || "date", m = useCallback(
20508
- (M) => /* @__PURE__ */ jsx(
20509
+ ($) => /* @__PURE__ */ jsx(
20509
20510
  SchemaComponent,
20510
20511
  {
20511
20512
  schema: {
@@ -20531,9 +20532,9 @@ const DynamicComponent$1 = (e) => {
20531
20532
  ),
20532
20533
  [u, r, p, c, d, a]
20533
20534
  ), h = useCallback(
20534
- (M) => /* @__PURE__ */ jsx(FlagProvider, { collectionField: n, children: /* @__PURE__ */ jsx(
20535
+ ($) => /* @__PURE__ */ jsx(FlagProvider, { collectionField: n, children: /* @__PURE__ */ jsx(
20535
20536
  VariableInput,
20536
- P(x({}, M), {
20537
+ P(x({}, $), {
20537
20538
  form: i,
20538
20539
  record: l,
20539
20540
  noDisabled: !0,
@@ -21738,12 +21739,12 @@ const SchemaSettingsSwitchItem = (e) => {
21738
21739
  }, [D]), N = useCallback(() => z(void 0, null, function* () {
21739
21740
  yield D.submit();
21740
21741
  try {
21741
- const O = D.values, j = Object.keys(O).reduce((k, $) => (D.query($).take() && (k[$] = O[$]), k), {});
21742
+ const O = D.values, j = Object.keys(O).reduce((k, M) => (D.query(M).take() && (k[M] = O[M]), k), {});
21742
21743
  h(!1), yield o == null ? void 0 : o(cloneDeep$1(j));
21743
21744
  } catch (O) {
21744
21745
  console.error(O);
21745
21746
  }
21746
- }), [D, o]), M = useCallback(() => z(void 0, null, function* () {
21747
+ }), [D, o]), $ = useCallback(() => z(void 0, null, function* () {
21747
21748
  !g && (i != null && i["x-uid"]) && (b["x-action-settings"].schemaUid = i["x-uid"], y.emit("patch", { schema: b }), yield F.resource("uiSchemas").insert({ values: i }), f(i["x-uid"])), typeof a == "function" && (a == null || a()), S.setVisible(!1), h(!0);
21748
21749
  }), [F, S, y, b, i, g]), L = useCallback((O) => O.stopPropagation(), []);
21749
21750
  return /* @__PURE__ */ jsxs(zIndexContext.Provider, { value: R, children: [
@@ -21752,7 +21753,7 @@ const SchemaSettingsSwitchItem = (e) => {
21752
21753
  P(x({
21753
21754
  title: v(t)
21754
21755
  }, p), {
21755
- onClick: M,
21756
+ onClick: $,
21756
21757
  onKeyDown: L,
21757
21758
  children: e.children || e.title
21758
21759
  })
@@ -21812,7 +21813,7 @@ const SchemaSettingsModalItem = (e) => {
21812
21813
  "noRecord",
21813
21814
  "ModalContextProvider",
21814
21815
  "dialogRootClassName"
21815
- ]), g = useContext(SchemaOptionsContext), f = useCollection(), C = useAPIClient(), b = useApp(), { theme: S } = useGlobalTheme(), y = useBlockRequestContext(), v = useFormActiveFields(), { locale: F } = useContext(ConfigProvider.ConfigContext), I = useDataSourceManager(), T = useDataSourceKey(), R = useCollectionRecord(), { association: D } = useDataBlockProps() || {}, B = useCurrentRecord(), N = useFormBlockContext(), M = useBlockContext(), { getOperators: L } = useOperators(), w = useLocationSearch(), O = useVariables$1(), j = useContext(AllDataBlocksContext), { formValue: k, collection: $, parent: q } = useSubFormValue(), E = useCurrentPopupRecord(), V = useParentPopupRecord();
21816
+ ]), g = useContext(SchemaOptionsContext), f = useCollection(), C = useAPIClient(), b = useApp(), { theme: S } = useGlobalTheme(), y = useBlockRequestContext(), v = useFormActiveFields(), { locale: F } = useContext(ConfigProvider.ConfigContext), I = useDataSourceManager(), T = useDataSourceKey(), R = useCollectionRecord(), { association: D } = useDataBlockProps() || {}, B = useCurrentRecord(), N = useFormBlockContext(), $ = useBlockContext(), { getOperators: L } = useOperators(), w = useLocationSearch(), O = useVariables$1(), j = useContext(AllDataBlocksContext), { formValue: k, collection: M, parent: q } = useSubFormValue(), E = useCurrentPopupRecord(), V = useParentPopupRecord();
21816
21817
  return t ? null : /* @__PURE__ */ jsx(
21817
21818
  SchemaSettingsItem,
21818
21819
  P(x({
@@ -21822,7 +21823,7 @@ const SchemaSettingsModalItem = (e) => {
21822
21823
  const U = l ? yield l() : c, H = _.isFunction(e.schema) ? e.schema() : e.schema;
21823
21824
  FormDialog(
21824
21825
  { title: H.title || o, width: u, rootClassName: m },
21825
- () => /* @__PURE__ */ jsx(AllDataBlocksContext.Provider, { value: j, children: /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(CollectOperators, { defaultOperators: L(), children: /* @__PURE__ */ jsx(VariablesContext.Provider, { value: O, children: /* @__PURE__ */ jsx(BlockContext.Provider, { value: M, children: /* @__PURE__ */ jsx(
21826
+ () => /* @__PURE__ */ jsx(AllDataBlocksContext.Provider, { value: j, children: /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(CollectOperators, { defaultOperators: L(), children: /* @__PURE__ */ jsx(VariablesContext.Provider, { value: O, children: /* @__PURE__ */ jsx(BlockContext.Provider, { value: $, children: /* @__PURE__ */ jsx(
21826
21827
  VariablePopupRecordProvider,
21827
21828
  {
21828
21829
  recordData: E == null ? void 0 : E.value,
@@ -21831,7 +21832,7 @@ const SchemaSettingsModalItem = (e) => {
21831
21832
  recordData: V == null ? void 0 : V.value,
21832
21833
  collection: V == null ? void 0 : V.collection
21833
21834
  },
21834
- children: /* @__PURE__ */ jsx(CollectionRecordProvider, { record: d ? null : R, children: /* @__PURE__ */ jsx(CurrentRecordContextProvider, P(x({}, B), { children: /* @__PURE__ */ jsx(FormBlockContext$1.Provider, { value: N, children: /* @__PURE__ */ jsx(SubFormProvider, { value: { value: k, collection: $, parent: q }, children: /* @__PURE__ */ jsx(
21835
+ children: /* @__PURE__ */ jsx(CollectionRecordProvider, { record: d ? null : R, children: /* @__PURE__ */ jsx(CurrentRecordContextProvider, P(x({}, B), { children: /* @__PURE__ */ jsx(FormBlockContext$1.Provider, { value: N, children: /* @__PURE__ */ jsx(SubFormProvider, { value: { value: k, collection: M, parent: q }, children: /* @__PURE__ */ jsx(
21835
21836
  FormActiveFieldsProvider,
21836
21837
  {
21837
21838
  name: "form",
@@ -22026,7 +22027,7 @@ const SchemaSettingsModalItem = (e) => {
22026
22027
  }
22027
22028
  }),
22028
22029
  [o, c, u, y, g, f, p, h, R, r]
22029
- ), M = useMemo(() => ({ ArrayCollapse: ArrayCollapse$2, FormLayout }), []), L = useCallback(
22030
+ ), $ = useMemo(() => ({ ArrayCollapse: ArrayCollapse$2, FormLayout }), []), L = useCallback(
22030
22031
  (O) => {
22031
22032
  var E;
22032
22033
  const j = [];
@@ -22045,7 +22046,7 @@ const SchemaSettingsModalItem = (e) => {
22045
22046
  SchemaSettingsModalItem,
22046
22047
  {
22047
22048
  title: D,
22048
- components: M,
22049
+ components: $,
22049
22050
  width: 960,
22050
22051
  schema: N,
22051
22052
  onSubmit: L,
@@ -22918,7 +22919,7 @@ function Input$1(e) {
22918
22919
  useAntdInputStyle(`${S}-input`);
22919
22920
  const y = useCompile(), { t: v } = useTranslation(), F = useForm(), [I, T] = React.useState([]), [R, D] = React.useState([]), [B, N] = React.useState(
22920
22921
  m || !!(n && t != null)
22921
- ), M = useMemo(() => parseValue(t, p), [p, t]), L = typeof M == "string", w = L ? M : "", O = L ? null : M, j = Object.assign(
22922
+ ), $ = useMemo(() => parseValue(t, p), [p, t]), L = typeof $ == "string", w = L ? $ : "", O = L ? null : $, j = Object.assign(
22922
22923
  {
22923
22924
  label: "label",
22924
22925
  value: "value",
@@ -22930,7 +22931,7 @@ function Input$1(e) {
22930
22931
  label: v("Constant"),
22931
22932
  [j.value]: "$",
22932
22933
  [j.label]: v("Constant")
22933
- } : a ? getTypedConstantOption(w, a, j) : null : null, [w, a]), $ = (Y = k == null ? void 0 : k.component) != null ? Y : NullComponent, q = Array.isArray(a) ? (K = (J = a.find((X) => Array.isArray(X) && X[0] === w)) == null ? void 0 : J[1]) != null ? K : {} : {};
22934
+ } : a ? getTypedConstantOption(w, a, j) : null : null, [w, a]), M = (Y = k == null ? void 0 : k.component) != null ? Y : NullComponent, q = Array.isArray(a) ? (K = (J = a.find((X) => Array.isArray(X) && X[0] === w)) == null ? void 0 : J[1]) != null ? K : {} : {};
22934
22935
  let E;
22935
22936
  t == null ? i ? n && B ? E = ["$"] : E = [""] : n ? E = ["$"] : E = [" ", w] : E = n ? ["$"] : [" ", w], m && (E = ["$"]), useEffect(() => {
22936
22937
  const oe = k != null ? k : {}, { component: X } = oe, Q = W(oe, ["component"]), ee = [
@@ -23069,8 +23070,8 @@ function Input$1(e) {
23069
23070
  )
23070
23071
  ]
23071
23072
  }
23072
- ) : /* @__PURE__ */ jsx("div", { style: { flex: 1 }, children: n && (B || !i) ? n : $ ? /* @__PURE__ */ jsx(
23073
- $,
23073
+ ) : /* @__PURE__ */ jsx("div", { style: { flex: 1 }, children: n && (B || !i) ? n : M ? /* @__PURE__ */ jsx(
23074
+ M,
23074
23075
  P(x({
23075
23076
  role: "button",
23076
23077
  "aria-label": "variable-constant"
@@ -23366,7 +23367,7 @@ function TextArea(e) {
23366
23367
  [l, g]
23367
23368
  ), [S, y] = useState(!1), [v, F] = useState(!1), [I, T] = useState(() => renderHTML(p != null ? p : "", b, c)), [R, D] = useState([-1, 0, -1, 0]);
23368
23369
  useAntdInputStyle("ant-input");
23369
- const { token: B } = theme.useToken(), N = c.join(" "), M = useCallback(
23370
+ const { token: B } = theme.useToken(), N = c.join(" "), $ = useCallback(
23370
23371
  (V) => {
23371
23372
  var U;
23372
23373
  const G = getValue(V, c);
@@ -23414,25 +23415,25 @@ function TextArea(e) {
23414
23415
  const H = createVariableTagHTML(G.join("."), b);
23415
23416
  pasteHTML(U, H, {
23416
23417
  range: R
23417
- }), F(!0), D(getCurrentRange(U)), M(U);
23418
+ }), F(!0), D(getCurrentRange(U)), $(U);
23418
23419
  },
23419
- [b, M, R]
23420
+ [b, $, R]
23420
23421
  ), w = useCallback(
23421
23422
  function({ currentTarget: V }) {
23422
- S || (F(!0), D(getCurrentRange(V)), M(V));
23423
+ S || (F(!0), D(getCurrentRange(V)), $(V));
23423
23424
  },
23424
- [S, M]
23425
+ [S, $]
23425
23426
  ), O = useCallback(function({ currentTarget: V }) {
23426
23427
  D(getCurrentRange(V));
23427
23428
  }, []), j = useCallback(function(V) {
23428
23429
  V.key === "Enter" && V.preventDefault();
23429
23430
  }, []), k = useCallback(function() {
23430
23431
  y(!0);
23431
- }, []), $ = useCallback(
23432
+ }, []), M = useCallback(
23432
23433
  ({ currentTarget: V }) => {
23433
- y(!1), F(!0), D(getCurrentRange(V)), M(V);
23434
+ y(!1), F(!0), D(getCurrentRange(V)), $(V);
23434
23435
  },
23435
- [M]
23436
+ [$]
23436
23437
  ), q = useCallback(
23437
23438
  function(V) {
23438
23439
  V.preventDefault();
@@ -23453,9 +23454,9 @@ function TextArea(e) {
23453
23454
  }
23454
23455
  }
23455
23456
  }).replace(/\n/g, " ");
23456
- F(!0), pasteHTML(V.currentTarget, U), D(getCurrentRange(V.currentTarget)), M(V.currentTarget);
23457
+ F(!0), pasteHTML(V.currentTarget, U), D(getCurrentRange(V.currentTarget)), $(V.currentTarget);
23457
23458
  },
23458
- [M]
23459
+ [$]
23459
23460
  ), E = e.disabled || C.disabled;
23460
23461
  return t(
23461
23462
  /* @__PURE__ */ jsxs(Fragment$1, { children: [
@@ -23510,7 +23511,7 @@ function TextArea(e) {
23510
23511
  onKeyDown: j,
23511
23512
  onPaste: q,
23512
23513
  onCompositionStart: k,
23513
- onCompositionEnd: $,
23514
+ onCompositionEnd: M,
23514
23515
  placeholder: e.placeholder,
23515
23516
  style: i,
23516
23517
  className: cx(
@@ -24245,16 +24246,16 @@ const GroupItem$1 = () => {
24245
24246
  }
24246
24247
  );
24247
24248
  }, MoveToMenuItem = () => {
24248
- const { t: e } = useTranslation(), t = useCallback(
24249
+ const { t: e } = useTranslation(), t = useCurrentRoute(), o = useCallback(
24249
24250
  (u) => {
24250
24251
  onFieldChange("target", (d) => {
24251
- var m, h;
24252
- const [, p] = ((h = (m = d == null ? void 0 : d.value) == null ? void 0 : m.split) == null ? void 0 : h.call(m, "||")) || [];
24253
- d.query("position").take((g) => {
24254
- g.dataSource = p === NocoBaseDesktopRouteType.group ? [
24252
+ var h, g;
24253
+ const [p, m] = ((g = (h = d == null ? void 0 : d.value) == null ? void 0 : h.split) == null ? void 0 : g.call(h, "||")) || [];
24254
+ d.query("position").take((f) => {
24255
+ f.dataSource = m === NocoBaseDesktopRouteType.group ? [
24255
24256
  { label: e("Before"), value: "beforeBegin" },
24256
24257
  { label: e("After"), value: "afterEnd" },
24257
- { label: e("Inner"), value: "beforeEnd" }
24258
+ { label: e("Inner"), value: "beforeEnd", disabled: (t == null ? void 0 : t.id) == p }
24258
24259
  ] : [
24259
24260
  { label: e("Before"), value: "beforeBegin" },
24260
24261
  { label: e("After"), value: "afterEnd" }
@@ -24263,13 +24264,13 @@ const GroupItem$1 = () => {
24263
24264
  });
24264
24265
  },
24265
24266
  [e]
24266
- ), o = useCompile(), { allAccessRoutes: n } = useAllAccessDesktopRoutes(), r = useMemo(() => [...toItems$2(n, { t: e, compile: o }), { label: "", value: "", disabled: !0 }, { label: "", value: "", disabled: !0 }], []), a = useMemo(() => ({
24267
+ ), n = useCompile(), { allAccessRoutes: r } = useAllAccessDesktopRoutes(), a = useMemo(() => [...toItems$2(r, { t: e, compile: n }), { label: "", value: "", disabled: !0 }, { label: "", value: "", disabled: !0 }], []), i = useMemo(() => ({
24267
24268
  type: "object",
24268
24269
  title: e("Move to"),
24269
24270
  properties: {
24270
24271
  target: {
24271
24272
  title: e("Target"),
24272
- enum: r,
24273
+ enum: a,
24273
24274
  required: !0,
24274
24275
  "x-decorator": "FormItem",
24275
24276
  "x-component": "TreeSelect",
@@ -24287,11 +24288,11 @@ const GroupItem$1 = () => {
24287
24288
  "x-decorator": "FormItem"
24288
24289
  }
24289
24290
  }
24290
- }), [r, e]), { moveRoute: i } = useNocoBaseRoutes(), l = useCurrentRoute(), c = useCallback(
24291
+ }), [a, e]), { moveRoute: l } = useNocoBaseRoutes(), c = useCallback(
24291
24292
  (p) => z(void 0, [p], function* ({ target: u, position: d }) {
24292
24293
  var f;
24293
24294
  const [m] = ((f = u == null ? void 0 : u.split) == null ? void 0 : f.call(u, "||")) || [];
24294
- if (!m || m === void 0 || !l)
24295
+ if (!m || m === void 0 || !t)
24295
24296
  return;
24296
24297
  const h = {
24297
24298
  beforeBegin: "insertBefore",
@@ -24303,13 +24304,13 @@ const GroupItem$1 = () => {
24303
24304
  } : {
24304
24305
  targetId: m
24305
24306
  };
24306
- yield i(x({
24307
- sourceId: l.id,
24307
+ yield l(x({
24308
+ sourceId: t.id,
24308
24309
  sortField: "sort",
24309
24310
  method: h[d]
24310
24311
  }, g));
24311
24312
  }),
24312
- [l, i]
24313
+ [t, l]
24313
24314
  );
24314
24315
  return /* @__PURE__ */ jsx(
24315
24316
  SchemaSettingsModalItem,
@@ -24317,8 +24318,8 @@ const GroupItem$1 = () => {
24317
24318
  title: e("Move to"),
24318
24319
  eventKey: "move-to",
24319
24320
  components: components$5,
24320
- effects: t,
24321
- schema: a,
24321
+ effects: o,
24322
+ schema: i,
24322
24323
  onSubmit: c
24323
24324
  }
24324
24325
  );
@@ -26422,18 +26423,18 @@ https://requirejs.org/docs/errors.html#` + e);
26422
26423
  config: {}
26423
26424
  }, l = {}, c = {}, u = {}, d = [], p = {}, m = {}, h = {}, g = 1, f = 1;
26424
26425
  function C(k) {
26425
- var $, q;
26426
- for ($ = 0; $ < k.length; $++)
26427
- if (q = k[$], q === ".")
26428
- k.splice($, 1), $ -= 1;
26426
+ var M, q;
26427
+ for (M = 0; M < k.length; M++)
26428
+ if (q = k[M], q === ".")
26429
+ k.splice(M, 1), M -= 1;
26429
26430
  else if (q === "..") {
26430
- if ($ === 0 || $ === 1 && k[2] === ".." || k[$ - 1] === "..")
26431
+ if (M === 0 || M === 1 && k[2] === ".." || k[M - 1] === "..")
26431
26432
  continue;
26432
- $ > 0 && (k.splice($ - 1, 2), $ -= 2);
26433
+ M > 0 && (k.splice(M - 1, 2), M -= 2);
26433
26434
  }
26434
26435
  }
26435
- function b(k, $, q) {
26436
- var E, V, G, U, H, Y, J, K, X, Q, ee, oe, te = $ && $.split("/"), se = i.map, ie = se && se["*"];
26436
+ function b(k, M, q) {
26437
+ var E, V, G, U, H, Y, J, K, X, Q, ee, oe, te = M && M.split("/"), se = i.map, ie = se && se["*"];
26437
26438
  if (k && (k = k.split("/"), J = k.length - 1, i.nodeIdCompat && jsSuffixRegExp.test(k[J]) && (k[J] = k[J].replace(jsSuffixRegExp, "")), k[0].charAt(0) === "." && te && (oe = te.slice(0, te.length - 1), k = oe.concat(k)), C(k), k = k.join("/")), q && se && (te || ie)) {
26438
26439
  G = k.split("/");
26439
26440
  e:
@@ -26452,30 +26453,30 @@ https://requirejs.org/docs/errors.html#` + e);
26452
26453
  return E = getOwn(i.pkgs, k), E || k;
26453
26454
  }
26454
26455
  function S(k) {
26455
- isBrowser && each(scripts(), function($) {
26456
- if ($.getAttribute("data-requiremodule") === k && $.getAttribute("data-requirecontext") === n.contextName)
26457
- return $.parentNode.removeChild($), !0;
26456
+ isBrowser && each(scripts(), function(M) {
26457
+ if (M.getAttribute("data-requiremodule") === k && M.getAttribute("data-requirecontext") === n.contextName)
26458
+ return M.parentNode.removeChild(M), !0;
26458
26459
  });
26459
26460
  }
26460
26461
  function y(k) {
26461
- var $ = getOwn(i.paths, k);
26462
- if ($ && isArray($) && $.length > 1)
26463
- return $.shift(), n.require.undef(k), n.makeRequire(null, {
26462
+ var M = getOwn(i.paths, k);
26463
+ if (M && isArray(M) && M.length > 1)
26464
+ return M.shift(), n.require.undef(k), n.makeRequire(null, {
26464
26465
  skipMap: !0
26465
26466
  })([k]), !0;
26466
26467
  }
26467
26468
  function v(k) {
26468
- var $, q = k ? k.indexOf("!") : -1;
26469
- return q > -1 && ($ = k.substring(0, q), k = k.substring(q + 1, k.length)), [$, k];
26469
+ var M, q = k ? k.indexOf("!") : -1;
26470
+ return q > -1 && (M = k.substring(0, q), k = k.substring(q + 1, k.length)), [M, k];
26470
26471
  }
26471
- function F(k, $, q, E) {
26472
- var V, G, U, H, Y = null, J = $ ? $.name : null, K = k, X = !0, Q = "";
26472
+ function F(k, M, q, E) {
26473
+ var V, G, U, H, Y = null, J = M ? M.name : null, K = k, X = !0, Q = "";
26473
26474
  return k || (X = !1, k = "_@r" + (g += 1)), H = v(k), Y = H[0], k = H[1], Y && (Y = b(Y, J, E), G = getOwn(p, Y)), k && (Y ? q ? Q = k : G && G.normalize ? Q = G.normalize(k, function(ee) {
26474
26475
  return b(ee, J, E);
26475
26476
  }) : Q = k.indexOf("!") === -1 ? b(k, J, E) : k : (Q = b(k, J, E), H = v(Q), Y = H[0], Q = H[1], q = !0, V = n.nameToUrl(Q))), U = Y && !G && !q ? "_unnormalized" + (f += 1) : "", {
26476
26477
  prefix: Y,
26477
26478
  name: Q,
26478
- parentMap: $,
26479
+ parentMap: M,
26479
26480
  unnormalized: !!U,
26480
26481
  url: V,
26481
26482
  originalName: K,
@@ -26484,24 +26485,24 @@ https://requirejs.org/docs/errors.html#` + e);
26484
26485
  };
26485
26486
  }
26486
26487
  function I(k) {
26487
- var $ = k.id, q = getOwn(l, $);
26488
- return q || (q = l[$] = new n.Module(k)), q;
26488
+ var M = k.id, q = getOwn(l, M);
26489
+ return q || (q = l[M] = new n.Module(k)), q;
26489
26490
  }
26490
- function T(k, $, q) {
26491
+ function T(k, M, q) {
26491
26492
  var E = k.id, V = getOwn(l, E);
26492
- hasProp(p, E) && (!V || V.defineEmitComplete) ? $ === "defined" && q(p[E]) : (V = I(k), V.error && $ === "error" ? q(V.error) : V.on($, q));
26493
+ hasProp(p, E) && (!V || V.defineEmitComplete) ? M === "defined" && q(p[E]) : (V = I(k), V.error && M === "error" ? q(V.error) : V.on(M, q));
26493
26494
  }
26494
- function R(k, $) {
26495
+ function R(k, M) {
26495
26496
  var q = k.requireModules, E = !1;
26496
- $ ? $(k) : (each(q, function(V) {
26497
+ M ? M(k) : (each(q, function(V) {
26497
26498
  var G = getOwn(l, V);
26498
26499
  G && (G.error = k, G.events.error && (E = !0, G.emit("error", k)));
26499
26500
  }), E || req.onError(k));
26500
26501
  }
26501
26502
  function D() {
26502
26503
  globalDefQueue.length && (each(globalDefQueue, function(k) {
26503
- var $ = k[0];
26504
- typeof $ == "string" && (n.defQueueMap[$] = !0), d.push(k);
26504
+ var M = k[0];
26505
+ typeof M == "string" && (n.defQueueMap[M] = !0), d.push(k);
26505
26506
  }), globalDefQueue = []);
26506
26507
  }
26507
26508
  r = {
@@ -26526,21 +26527,21 @@ https://requirejs.org/docs/errors.html#` + e);
26526
26527
  function B(k) {
26527
26528
  delete l[k], delete c[k];
26528
26529
  }
26529
- function N(k, $, q) {
26530
+ function N(k, M, q) {
26530
26531
  var E = k.map.id;
26531
- k.error ? k.emit("error", k.error) : ($[E] = !0, each(k.depMaps, function(V, G) {
26532
+ k.error ? k.emit("error", k.error) : (M[E] = !0, each(k.depMaps, function(V, G) {
26532
26533
  var U = V.id, H = getOwn(l, U);
26533
- H && !k.depMatched[G] && !q[U] && (getOwn($, U) ? (k.defineDep(G, p[U]), k.check()) : N(H, $, q));
26534
+ H && !k.depMatched[G] && !q[U] && (getOwn(M, U) ? (k.defineDep(G, p[U]), k.check()) : N(H, M, q));
26534
26535
  }), q[E] = !0);
26535
26536
  }
26536
- function M() {
26537
- var k, $, q = i.waitSeconds * 1e3, E = q && n.startTime + q < (/* @__PURE__ */ new Date()).getTime(), V = [], G = [], U = !1, H = !0;
26537
+ function $() {
26538
+ var k, M, q = i.waitSeconds * 1e3, E = q && n.startTime + q < (/* @__PURE__ */ new Date()).getTime(), V = [], G = [], U = !1, H = !0;
26538
26539
  if (!t) {
26539
26540
  if (t = !0, eachProp(c, function(Y) {
26540
26541
  var J = Y.map, K = J.id;
26541
26542
  if (Y.enabled && (J.isDefine || G.push(Y), !Y.error)) {
26542
26543
  if (!Y.inited && E)
26543
- y(K) ? ($ = !0, U = !0) : (V.push(K), S(K));
26544
+ y(K) ? (M = !0, U = !0) : (V.push(K), S(K));
26544
26545
  else if (!Y.inited && Y.fetched && J.isDefine && (U = !0, !J.prefix))
26545
26546
  return H = !1;
26546
26547
  }
@@ -26548,21 +26549,21 @@ https://requirejs.org/docs/errors.html#` + e);
26548
26549
  return k = makeError("timeout", "Load timeout for modules: " + V, null, V), k.contextName = n.contextName, R(k);
26549
26550
  H && each(G, function(Y) {
26550
26551
  N(Y, {}, {});
26551
- }), (!E || $) && U && (isBrowser || isWebWorker) && !a && (a = setTimeout(function() {
26552
- a = 0, M();
26552
+ }), (!E || M) && U && (isBrowser || isWebWorker) && !a && (a = setTimeout(function() {
26553
+ a = 0, $();
26553
26554
  }, 50)), t = !1;
26554
26555
  }
26555
26556
  }
26556
26557
  o = function(k) {
26557
26558
  this.events = getOwn(u, k.id) || {}, this.map = k, this.shim = getOwn(i.shim, k.id), this.depExports = [], this.depMaps = [], this.depMatched = [], this.pluginMaps = {}, this.depCount = 0;
26558
26559
  }, o.prototype = {
26559
- init: function(k, $, q, E) {
26560
- E = E || {}, !this.inited && (this.factory = $, q ? this.on("error", q) : this.events.error && (q = bind(this, function(V) {
26560
+ init: function(k, M, q, E) {
26561
+ E = E || {}, !this.inited && (this.factory = M, q ? this.on("error", q) : this.events.error && (q = bind(this, function(V) {
26561
26562
  this.emit("error", V);
26562
26563
  })), this.depMaps = k && k.slice(0), this.errback = q, this.inited = !0, this.ignore = E.ignore, E.enabled || this.enabled ? this.enable() : this.check());
26563
26564
  },
26564
- defineDep: function(k, $) {
26565
- this.depMatched[k] || (this.depMatched[k] = !0, this.depCount -= 1, this.depExports[k] = $);
26565
+ defineDep: function(k, M) {
26566
+ this.depMatched[k] || (this.depMatched[k] = !0, this.depCount -= 1, this.depExports[k] = M);
26566
26567
  },
26567
26568
  fetch: function() {
26568
26569
  if (!this.fetched) {
@@ -26588,7 +26589,7 @@ https://requirejs.org/docs/errors.html#` + e);
26588
26589
  */
26589
26590
  check: function() {
26590
26591
  if (!(!this.enabled || this.enabling)) {
26591
- var k, $, q = this.map.id, E = this.depExports, V = this.exports, G = this.factory;
26592
+ var k, M, q = this.map.id, E = this.depExports, V = this.exports, G = this.factory;
26592
26593
  if (!this.inited)
26593
26594
  hasProp(n.defQueueMap, q) || this.fetch();
26594
26595
  else if (this.error)
@@ -26604,7 +26605,7 @@ https://requirejs.org/docs/errors.html#` + e);
26604
26605
  }
26605
26606
  else
26606
26607
  V = n.execCb(q, G, E, V);
26607
- if (this.map.isDefine && V === void 0 && ($ = this.module, $ ? V = $.exports : this.usingExports && (V = this.exports)), k)
26608
+ if (this.map.isDefine && V === void 0 && (M = this.module, M ? V = M.exports : this.usingExports && (V = this.exports)), k)
26608
26609
  return k.requireMap = this.map, k.requireModules = this.map.isDefine ? [this.map.id] : null, k.requireType = this.map.isDefine ? "define" : "require", R(this.error = k);
26609
26610
  } else
26610
26611
  V = G;
@@ -26621,7 +26622,7 @@ https://requirejs.org/docs/errors.html#` + e);
26621
26622
  }
26622
26623
  },
26623
26624
  callPlugin: function() {
26624
- var k = this.map, $ = k.id, q = F(k.prefix);
26625
+ var k = this.map, M = k.id, q = F(k.prefix);
26625
26626
  this.depMaps.push(q), T(q, "defined", bind(this, function(E) {
26626
26627
  var V, G, U, H = getOwn(h, this.map.id), Y = this.map.name, J = this.map.parentMap ? this.map.parentMap.name : null, K = n.makeRequire(k.parentMap, {
26627
26628
  enableBuildCallback: !0
@@ -26660,20 +26661,20 @@ https://requirejs.org/docs/errors.html#` + e);
26660
26661
  enabled: !0
26661
26662
  });
26662
26663
  }), V.error = bind(this, function(X) {
26663
- this.inited = !0, this.error = X, X.requireModules = [$], eachProp(l, function(Q) {
26664
- Q.map.id.indexOf($ + "_unnormalized") === 0 && B(Q.map.id);
26664
+ this.inited = !0, this.error = X, X.requireModules = [M], eachProp(l, function(Q) {
26665
+ Q.map.id.indexOf(M + "_unnormalized") === 0 && B(Q.map.id);
26665
26666
  }), R(X);
26666
26667
  }), V.fromText = bind(this, function(X, Q) {
26667
26668
  var ee = k.name, oe = F(ee), te = useInteractive;
26668
- Q && (X = Q), te && (useInteractive = !1), I(oe), hasProp(i.config, $) && (i.config[ee] = i.config[$]);
26669
+ Q && (X = Q), te && (useInteractive = !1), I(oe), hasProp(i.config, M) && (i.config[ee] = i.config[M]);
26669
26670
  try {
26670
26671
  req.exec(X);
26671
26672
  } catch (se) {
26672
26673
  return R(makeError(
26673
26674
  "fromtexteval",
26674
- "fromText eval for " + $ + " failed: " + se,
26675
+ "fromText eval for " + M + " failed: " + se,
26675
26676
  se,
26676
- [$]
26677
+ [M]
26677
26678
  ));
26678
26679
  }
26679
26680
  te && (useInteractive = !0), this.depMaps.push(oe), n.completeLoad(ee), K([ee], V);
@@ -26681,7 +26682,7 @@ https://requirejs.org/docs/errors.html#` + e);
26681
26682
  })), n.enable(q, this), this.pluginMaps[q.id] = q;
26682
26683
  },
26683
26684
  enable: function() {
26684
- c[this.map.id] = this, this.enabled = !0, this.enabling = !0, each(this.depMaps, bind(this, function(k, $) {
26685
+ c[this.map.id] = this, this.enabled = !0, this.enabling = !0, each(this.depMaps, bind(this, function(k, M) {
26685
26686
  var q, E, V;
26686
26687
  if (typeof k == "string") {
26687
26688
  if (k = F(
@@ -26689,43 +26690,43 @@ https://requirejs.org/docs/errors.html#` + e);
26689
26690
  this.map.isDefine ? this.map : this.map.parentMap,
26690
26691
  !1,
26691
26692
  !this.skipMap
26692
- ), this.depMaps[$] = k, V = getOwn(r, k.id), V) {
26693
- this.depExports[$] = V(this);
26693
+ ), this.depMaps[M] = k, V = getOwn(r, k.id), V) {
26694
+ this.depExports[M] = V(this);
26694
26695
  return;
26695
26696
  }
26696
26697
  this.depCount += 1, T(k, "defined", bind(this, function(G) {
26697
- this.undefed || (this.defineDep($, G), this.check());
26698
+ this.undefed || (this.defineDep(M, G), this.check());
26698
26699
  })), this.errback ? T(k, "error", bind(this, this.errback)) : this.events.error && T(k, "error", bind(this, function(G) {
26699
26700
  this.emit("error", G);
26700
26701
  }));
26701
26702
  }
26702
26703
  q = k.id, E = l[q], !hasProp(r, q) && E && !E.enabled && n.enable(k, this);
26703
26704
  })), eachProp(this.pluginMaps, bind(this, function(k) {
26704
- var $ = getOwn(l, k.id);
26705
- $ && !$.enabled && n.enable(k, this);
26705
+ var M = getOwn(l, k.id);
26706
+ M && !M.enabled && n.enable(k, this);
26706
26707
  })), this.enabling = !1, this.check();
26707
26708
  },
26708
- on: function(k, $) {
26709
+ on: function(k, M) {
26709
26710
  var q = this.events[k];
26710
- q || (q = this.events[k] = []), q.push($);
26711
+ q || (q = this.events[k] = []), q.push(M);
26711
26712
  },
26712
- emit: function(k, $) {
26713
+ emit: function(k, M) {
26713
26714
  each(this.events[k], function(q) {
26714
- q($);
26715
+ q(M);
26715
26716
  }), k === "error" && delete this.events[k];
26716
26717
  }
26717
26718
  };
26718
26719
  function L(k) {
26719
26720
  hasProp(p, k[0]) || I(F(k[0], null, !0)).init(k[1], k[2]);
26720
26721
  }
26721
- function w(k, $, q, E) {
26722
- k.detachEvent && !isOpera ? E && k.detachEvent(E, $) : k.removeEventListener(q, $, !1);
26722
+ function w(k, M, q, E) {
26723
+ k.detachEvent && !isOpera ? E && k.detachEvent(E, M) : k.removeEventListener(q, M, !1);
26723
26724
  }
26724
26725
  function O(k) {
26725
- var $ = k.currentTarget || k.srcElement;
26726
- return w($, n.onScriptLoad, "load", "onreadystatechange"), w($, n.onScriptError, "error"), {
26727
- node: $,
26728
- id: $ && $.getAttribute("data-requiremodule")
26726
+ var M = k.currentTarget || k.srcElement;
26727
+ return w(M, n.onScriptLoad, "load", "onreadystatechange"), w(M, n.onScriptError, "error"), {
26728
+ node: M,
26729
+ id: M && M.getAttribute("data-requiremodule")
26729
26730
  };
26730
26731
  }
26731
26732
  function j() {
@@ -26755,9 +26756,9 @@ https://requirejs.org/docs/errors.html#` + e);
26755
26756
  */
26756
26757
  configure: function(k) {
26757
26758
  if (k.baseUrl && k.baseUrl.charAt(k.baseUrl.length - 1) !== "/" && (k.baseUrl += "/"), typeof k.urlArgs == "string") {
26758
- var $ = k.urlArgs;
26759
+ var M = k.urlArgs;
26759
26760
  k.urlArgs = function(V, G) {
26760
- return (G.indexOf("?") === -1 ? "?" : "&") + $;
26761
+ return (G.indexOf("?") === -1 ? "?" : "&") + M;
26761
26762
  };
26762
26763
  }
26763
26764
  var q = i.shim, E = {
@@ -26784,20 +26785,20 @@ https://requirejs.org/docs/errors.html#` + e);
26784
26785
  }), (k.deps || k.callback) && n.require(k.deps || [], k.callback);
26785
26786
  },
26786
26787
  makeShimExports: function(k) {
26787
- function $() {
26788
+ function M() {
26788
26789
  var q;
26789
26790
  return k.init && (q = k.init.apply(global, arguments)), q || k.exports && getGlobal(k.exports);
26790
26791
  }
26791
- return $;
26792
+ return M;
26792
26793
  },
26793
- makeRequire: function(k, $) {
26794
- $ = $ || {};
26794
+ makeRequire: function(k, M) {
26795
+ M = M || {};
26795
26796
  function q(E, V, G) {
26796
26797
  var U, H, Y;
26797
- return $.enableBuildCallback && V && isFunction(V) && (V.__requireJsBuild = !0), typeof E == "string" ? isFunction(V) ? R(makeError("requireargs", "Invalid require call"), G) : k && hasProp(r, E) ? r[E](l[k.id]) : req.get ? req.get(n, E, k, q) : (H = F(E, k, !1, !0), U = H.id, hasProp(p, U) ? p[U] : R(makeError("notloaded", 'Module name "' + U + '" has not been loaded yet for context: ' + e + (k ? "" : ". Use require([])")))) : (j(), n.nextTick(function() {
26798
- j(), Y = I(F(null, k)), Y.skipMap = $.skipMap, Y.init(E, V, G, {
26798
+ return M.enableBuildCallback && V && isFunction(V) && (V.__requireJsBuild = !0), typeof E == "string" ? isFunction(V) ? R(makeError("requireargs", "Invalid require call"), G) : k && hasProp(r, E) ? r[E](l[k.id]) : req.get ? req.get(n, E, k, q) : (H = F(E, k, !1, !0), U = H.id, hasProp(p, U) ? p[U] : R(makeError("notloaded", 'Module name "' + U + '" has not been loaded yet for context: ' + e + (k ? "" : ". Use require([])")))) : (j(), n.nextTick(function() {
26799
+ j(), Y = I(F(null, k)), Y.skipMap = M.skipMap, Y.init(E, V, G, {
26799
26800
  enabled: !0
26800
- }), M();
26801
+ }), $();
26801
26802
  }), q);
26802
26803
  }
26803
26804
  return mixin(q, {
@@ -26836,8 +26837,8 @@ https://requirejs.org/docs/errors.html#` + e);
26836
26837
  * the optimizer. Not shown here to keep code compact.
26837
26838
  */
26838
26839
  enable: function(k) {
26839
- var $ = getOwn(l, k.id);
26840
- $ && I(k).enable();
26840
+ var M = getOwn(l, k.id);
26841
+ M && I(k).enable();
26841
26842
  },
26842
26843
  /**
26843
26844
  * Internal method used by environment adapters to complete a load event.
@@ -26846,17 +26847,17 @@ https://requirejs.org/docs/errors.html#` + e);
26846
26847
  * @param {String} moduleName the name of the module to potentially complete.
26847
26848
  */
26848
26849
  completeLoad: function(k) {
26849
- var $, q, E, V = getOwn(i.shim, k) || {}, G = V.exports;
26850
+ var M, q, E, V = getOwn(i.shim, k) || {}, G = V.exports;
26850
26851
  for (D(); d.length; ) {
26851
26852
  if (q = d.shift(), q[0] === null) {
26852
- if (q[0] = k, $)
26853
+ if (q[0] = k, M)
26853
26854
  break;
26854
- $ = !0;
26855
+ M = !0;
26855
26856
  } else
26856
- q[0] === k && ($ = !0);
26857
+ q[0] === k && (M = !0);
26857
26858
  L(q);
26858
26859
  }
26859
- if (n.defQueueMap = {}, E = getOwn(l, k), !$ && !hasProp(p, k) && E && !E.inited) {
26860
+ if (n.defQueueMap = {}, E = getOwn(l, k), !M && !hasProp(p, k) && E && !E.inited) {
26860
26861
  if (i.enforceDefine && (!G || !getGlobal(G)))
26861
26862
  return y(k) ? void 0 : R(makeError(
26862
26863
  "nodefine",
@@ -26866,7 +26867,7 @@ https://requirejs.org/docs/errors.html#` + e);
26866
26867
  ));
26867
26868
  L([k, V.deps || [], V.exportsFn]);
26868
26869
  }
26869
- M();
26870
+ $();
26870
26871
  },
26871
26872
  /**
26872
26873
  * Converts a module name to a file path. Supports cases where
@@ -26875,26 +26876,26 @@ https://requirejs.org/docs/errors.html#` + e);
26875
26876
  * it is assumed to have already been normalized. This is an
26876
26877
  * internal API, not a public one. Use toUrl for the public API.
26877
26878
  */
26878
- nameToUrl: function(k, $, q) {
26879
+ nameToUrl: function(k, M, q) {
26879
26880
  var E, V, G, U, H, Y, J, K = getOwn(i.pkgs, k);
26880
26881
  if (K && (k = K), J = getOwn(h, k), J)
26881
- return n.nameToUrl(J, $, q);
26882
+ return n.nameToUrl(J, M, q);
26882
26883
  if (req.jsExtRegExp.test(k))
26883
- H = k + ($ || "");
26884
+ H = k + (M || "");
26884
26885
  else {
26885
26886
  for (E = i.paths, V = k.split("/"), G = V.length; G > 0; G -= 1)
26886
26887
  if (U = V.slice(0, G).join("/"), Y = getOwn(E, U), Y) {
26887
26888
  isArray(Y) && (Y = Y[0]), V.splice(0, G, Y);
26888
26889
  break;
26889
26890
  }
26890
- H = V.join("/"), H += $ || (/^data\:|^blob\:|\?/.test(H) || q ? "" : ".js"), H = (H.charAt(0) === "/" || H.match(/^[\w\+\.\-]+:/) ? "" : i.baseUrl) + H;
26891
+ H = V.join("/"), H += M || (/^data\:|^blob\:|\?/.test(H) || q ? "" : ".js"), H = (H.charAt(0) === "/" || H.match(/^[\w\+\.\-]+:/) ? "" : i.baseUrl) + H;
26891
26892
  }
26892
26893
  return i.urlArgs && !/^blob\:/.test(H) ? H + i.urlArgs(k, H) : H;
26893
26894
  },
26894
26895
  //Delegates to req.load. Broken out as a separate function to
26895
26896
  //allow overriding in the optimizer.
26896
- load: function(k, $) {
26897
- req.load(n, k, $);
26897
+ load: function(k, M) {
26898
+ req.load(n, k, M);
26898
26899
  },
26899
26900
  /**
26900
26901
  * Executes a module callback function. Broken out as a separate function
@@ -26903,8 +26904,8 @@ https://requirejs.org/docs/errors.html#` + e);
26903
26904
  *
26904
26905
  * @private
26905
26906
  */
26906
- execCb: function(k, $, q, E) {
26907
- return $.apply(E, q);
26907
+ execCb: function(k, M, q, E) {
26908
+ return M.apply(E, q);
26908
26909
  },
26909
26910
  /**
26910
26911
  * callback for script loads, used to check status of loading.
@@ -26915,23 +26916,23 @@ https://requirejs.org/docs/errors.html#` + e);
26915
26916
  onScriptLoad: function(k) {
26916
26917
  if (k.type === "load" || readyRegExp.test((k.currentTarget || k.srcElement).readyState)) {
26917
26918
  interactiveScript = null;
26918
- var $ = O(k);
26919
- n.completeLoad($.id);
26919
+ var M = O(k);
26920
+ n.completeLoad(M.id);
26920
26921
  }
26921
26922
  },
26922
26923
  /**
26923
26924
  * Callback for script errors.
26924
26925
  */
26925
26926
  onScriptError: function(k) {
26926
- var $ = O(k);
26927
- if (!y($.id)) {
26927
+ var M = O(k);
26928
+ if (!y(M.id)) {
26928
26929
  var q = [];
26929
26930
  return eachProp(l, function(E, V) {
26930
26931
  V.indexOf("_@r") !== 0 && each(E.depMaps, function(G) {
26931
- if (G.id === $.id)
26932
+ if (G.id === M.id)
26932
26933
  return q.push(V), !0;
26933
26934
  });
26934
- }), R(makeError("scripterror", 'Script error for "' + $.id + (q.length ? '", needed by: ' + q.join(", ") : '"'), k, [$.id]));
26935
+ }), R(makeError("scripterror", 'Script error for "' + M.id + (q.length ? '", needed by: ' + q.join(", ") : '"'), k, [M.id]));
26935
26936
  }
26936
26937
  }
26937
26938
  }, n.require = n.makeRequire(), n;
@@ -28540,7 +28541,10 @@ const MarkdownEditor = (e) => {
28540
28541
  );
28541
28542
  }),
28542
28543
  { displayName: "MarkdownVoid" }
28543
- ), MarkdownVoid = (e) => /* @__PURE__ */ jsx(FlagProvider, { collectionField: !0, children: /* @__PURE__ */ jsx(MarkdownVoidInner, x({}, e)) });
28544
+ ), MarkdownVoid = (e) => {
28545
+ const t = useFlag();
28546
+ return /* @__PURE__ */ jsx(FlagProvider, P(x({}, t), { collectionField: !0, children: /* @__PURE__ */ jsx(MarkdownVoidInner, x({}, e)) }));
28547
+ };
28544
28548
  MarkdownVoid.Designer = MarkdownVoidDesigner;
28545
28549
  const Markdown = connect(
28546
28550
  Input$3.TextArea,
@@ -28689,8 +28693,8 @@ function useCollectValuesToSubmit() {
28689
28693
  }), S = {}, y = Object.keys(f).map((D) => z(this, null, function* () {
28690
28694
  const B = f[D], N = a(D);
28691
28695
  if (isVariable$1(B)) {
28692
- const { value: M } = (yield p == null ? void 0 : p.parseVariable(B, m)) || {};
28693
- M != null && (S[D] = transformVariableValue(M, { targetCollectionField: N }));
28696
+ const { value: $ } = (yield p == null ? void 0 : p.parseVariable(B, m)) || {};
28697
+ $ != null && (S[D] = transformVariableValue($, { targetCollectionField: N }));
28694
28698
  } else
28695
28699
  B !== "" && (S[D] = B);
28696
28700
  }));
@@ -28727,7 +28731,7 @@ const useCreateActionProps = () => {
28727
28731
  manualClose: D,
28728
28732
  redirecting: B,
28729
28733
  redirectTo: N,
28730
- successMessage: M,
28734
+ successMessage: $,
28731
28735
  actionAfterSuccess: L
28732
28736
  } = I || {};
28733
28737
  T || (yield o.submit());
@@ -28742,20 +28746,20 @@ const useCreateActionProps = () => {
28742
28746
  triggerWorkflows: R != null && R.length ? R.map((q) => [q.workflowKey, q.context].filter(Boolean).join("!")).join(",") : void 0,
28743
28747
  updateAssociationValues: g
28744
28748
  });
28745
- let $ = N;
28746
- if (N && ($ = yield getVariableValue(N, {
28749
+ let M = N;
28750
+ if (N && (M = yield getVariableValue(N, {
28747
28751
  variables: y,
28748
28752
  localVariables: [...S, { name: "$record", ctx: new Proxy((j = k == null ? void 0 : k.data) == null ? void 0 : j.data, {}) }]
28749
- })), (L === "previous" || !L && B !== !0) && (a == null || a(!1)), i == null || i(!0), l == null || l(!1), d.data.loading = !1, d.data.data = k, !M) {
28750
- message.success(h("Saved successfully")), yield resetFormCorrectly(o), (B && !L || L === "redirect") && $ && (isURL($) ? window.location.href = $ : c($));
28753
+ })), (L === "previous" || !L && B !== !0) && (a == null || a(!1)), i == null || i(!0), l == null || l(!1), d.data.loading = !1, d.data.data = k, !$) {
28754
+ message.success(h("Saved successfully")), yield resetFormCorrectly(o), (B && !L || L === "redirect") && M && (isURL(M) ? window.location.href = M : c(M));
28751
28755
  return;
28752
28756
  }
28753
28757
  D ? m.success({
28754
- title: p(M),
28758
+ title: p($),
28755
28759
  onOk: () => z(this, null, function* () {
28756
- yield resetFormCorrectly(o), (B && !L || L === "redirect") && $ && (isURL($) ? window.location.href = $ : c($));
28760
+ yield resetFormCorrectly(o), (B && !L || L === "redirect") && M && (isURL(M) ? window.location.href = M : c(M));
28757
28761
  })
28758
- }) : (message.success(p(M)), yield resetFormCorrectly(o), (B && !L || L === "redirect") && $ && (isURL($) ? window.location.href = $ : c($)));
28762
+ }) : (message.success(p($)), yield resetFormCorrectly(o), (B && !L || L === "redirect") && M && (isURL(M) ? window.location.href = M : c(M)));
28759
28763
  } catch (k) {
28760
28764
  d.data.loading = !1;
28761
28765
  }
@@ -28768,14 +28772,14 @@ const useCreateActionProps = () => {
28768
28772
  return {
28769
28773
  onClick() {
28770
28774
  return z(this, null, function* () {
28771
- var $, q, E, V, G, U;
28775
+ var M, q, E, V, G, U;
28772
28776
  const T = u.map((H) => H.name), {
28773
28777
  assignedValues: R = {},
28774
28778
  onSuccess: D,
28775
28779
  overwriteValues: B,
28776
28780
  skipValidator: N,
28777
- triggerWorkflows: M
28778
- } = ($ = l == null ? void 0 : l["x-action-settings"]) != null ? $ : {}, L = (q = a == null ? void 0 : a["x-component-props"]) == null ? void 0 : q.addChild, { successMessage: w } = D || {}, O = {}, j = Object.keys(R).map((H) => z(this, null, function* () {
28781
+ triggerWorkflows: $
28782
+ } = (M = l == null ? void 0 : l["x-action-settings"]) != null ? M : {}, L = (q = a == null ? void 0 : a["x-component-props"]) == null ? void 0 : q.addChild, { successMessage: w } = D || {}, O = {}, j = Object.keys(R).map((H) => z(this, null, function* () {
28779
28783
  const Y = R[H], J = d(H);
28780
28784
  if (isVariable$1(Y)) {
28781
28785
  const { value: K } = (yield C == null ? void 0 : C.parseVariable(Y, b)) || {};
@@ -28803,7 +28807,7 @@ const useCreateActionProps = () => {
28803
28807
  values: x(x(x({}, k), B), O),
28804
28808
  filterKeys: v,
28805
28809
  // TODO(refactor): should change to inject by plugin
28806
- triggerWorkflows: M != null && M.length ? M.map((Y) => [Y.workflowKey, Y.context].filter(Boolean).join("!")).join(",") : void 0
28810
+ triggerWorkflows: $ != null && $.length ? $.map((Y) => [Y.workflowKey, Y.context].filter(Boolean).join("!")).join(",") : void 0
28807
28811
  });
28808
28812
  if (c.data.loading = !1, c.data.data = H, (U = (G = n == null ? void 0 : n.service) == null ? void 0 : G.refresh) == null || U.call(G), r == null || r(!1), i == null || i(!0), !w)
28809
28813
  return;
@@ -28848,13 +28852,13 @@ const useCreateActionProps = () => {
28848
28852
  m.defaultFilter
28849
28853
  ]);
28850
28854
  if (_.isEmpty(f[l]) && ((v = m.clearSelection) == null || v.call(m)), !(d && _.isEmpty(f[l])))
28851
- return m.dataLoadingMode === "manual" && _.isEmpty(f[l]) ? m.clearData() : m.doFilter(
28855
+ return m.dataLoadingMode === "manual" && _.isEmpty(f[l]) ? m.clearData() : (_.set(m.service.params, "1.filters", f), m.doFilter(
28852
28856
  P(x({}, g), {
28853
28857
  page: 1,
28854
28858
  filter: C
28855
28859
  }),
28856
28860
  { filters: f }
28857
- );
28861
+ ));
28858
28862
  }))
28859
28863
  );
28860
28864
  } catch (m) {
@@ -28926,25 +28930,25 @@ const useCreateActionProps = () => {
28926
28930
  redirectTo: T,
28927
28931
  successMessage: R,
28928
28932
  actionAfterSuccess: D
28929
- } = S || {}, B = {}, N = Object.keys(b).map(($) => z(this, null, function* () {
28930
- const q = b[$], E = m($);
28933
+ } = S || {}, B = {}, N = Object.keys(b).map((M) => z(this, null, function* () {
28934
+ const q = b[M], E = m(M);
28931
28935
  if (isVariable$1(q)) {
28932
28936
  const { value: V } = (yield u == null ? void 0 : u.parseVariable(q, d)) || {};
28933
- V && (B[$] = transformVariableValue(V, { targetCollectionField: E }));
28937
+ V && (B[M] = transformVariableValue(V, { targetCollectionField: E }));
28934
28938
  } else
28935
- q !== "" && (B[$] = q);
28939
+ q !== "" && (B[M] = q);
28936
28940
  }));
28937
28941
  yield Promise.all(N), y === !1 && (yield l.submit());
28938
- const M = yield e.update({
28942
+ const $ = yield e.update({
28939
28943
  filterByTk: n,
28940
28944
  values: x({}, B),
28941
28945
  // TODO(refactor): should change to inject by plugin
28942
- triggerWorkflows: v != null && v.length ? v.map(($) => [$.workflowKey, $.context].filter(Boolean).join("!")).join(",") : void 0
28946
+ triggerWorkflows: v != null && v.length ? v.map((M) => [M.workflowKey, M.context].filter(Boolean).join("!")).join(",") : void 0
28943
28947
  });
28944
28948
  let L = T;
28945
28949
  T && (L = yield getVariableValue(T, {
28946
28950
  variables: u,
28947
- localVariables: [...d, { name: "$record", ctx: new Proxy((O = M == null ? void 0 : M.data) == null ? void 0 : O.data, {}) }]
28951
+ localVariables: [...d, { name: "$record", ctx: new Proxy((O = $ == null ? void 0 : $.data) == null ? void 0 : O.data, {}) }]
28948
28952
  })), (D === "previous" || !D && I !== !0) && (h == null || h(!1)), C && (C == null || C()), e instanceof TableFieldResource || (k = (j = t == null ? void 0 : t.service) == null ? void 0 : j.refresh) == null || k.call(j), R && (F ? c.success({
28949
28953
  title: i(R),
28950
28954
  onOk: () => z(this, null, function* () {
@@ -28962,12 +28966,12 @@ const useCreateActionProps = () => {
28962
28966
  return {
28963
28967
  onClick() {
28964
28968
  return z(this, null, function* () {
28965
- var $;
28969
+ var M;
28966
28970
  const {
28967
28971
  assignedValues: R = {},
28968
28972
  onSuccess: D,
28969
28973
  updateMode: B
28970
- } = ($ = a == null ? void 0 : a["x-action-settings"]) != null ? $ : {}, { manualClose: N, redirecting: M, redirectTo: L, successMessage: w, actionAfterSuccess: O } = D || {};
28974
+ } = (M = a == null ? void 0 : a["x-action-settings"]) != null ? M : {}, { manualClose: N, redirecting: $, redirectTo: L, successMessage: w, actionAfterSuccess: O } = D || {};
28971
28975
  m.data = e.data || {}, m.data.loading = !0;
28972
28976
  const j = {}, k = Object.keys(R).map((E) => z(this, null, function* () {
28973
28977
  const V = R[E], G = C(E);
@@ -28977,7 +28981,7 @@ const useCreateActionProps = () => {
28977
28981
  } else
28978
28982
  V !== "" && (j[E] = V);
28979
28983
  }));
28980
- yield Promise.all(k), (O === "previous" || !O && M !== !0) && (S == null || S(!1)), h.confirm({
28984
+ yield Promise.all(k), (O === "previous" || !O && $ !== !0) && (S == null || S(!1)), h.confirm({
28981
28985
  title: p("Bulk update"),
28982
28986
  content: p(B === "selected" ? "Update selected data?" : "Update all data?"),
28983
28987
  onOk() {
@@ -29005,9 +29009,9 @@ const useCreateActionProps = () => {
29005
29009
  t instanceof TableFieldResource || (Y = (H = o == null ? void 0 : o.service) == null ? void 0 : H.refresh) == null || Y.call(H), w && (N ? h.success({
29006
29010
  title: d(w),
29007
29011
  onOk: () => z(this, null, function* () {
29008
- (M && !O || O === "redirect") && L && (isURL(L) ? window.location.href = L : u(L));
29012
+ ($ && !O || O === "redirect") && L && (isURL(L) ? window.location.href = L : u(L));
29009
29013
  })
29010
- }) : (message.success(d(w)), (M && !O || O === "redirect") && L && (isURL(L) ? window.location.href = L : u(L))));
29014
+ }) : (message.success(d(w)), ($ && !O || O === "redirect") && L && (isURL(L) ? window.location.href = L : u(L))));
29011
29015
  });
29012
29016
  },
29013
29017
  onCancel() {
@@ -29026,7 +29030,7 @@ const useCreateActionProps = () => {
29026
29030
  onClick() {
29027
29031
  return z(this, null, function* () {
29028
29032
  var E, V, G, U;
29029
- const { skipValidator: I, onSuccess: T, requestSettings: R } = (E = n == null ? void 0 : n["x-action-settings"]) != null ? E : {}, { manualClose: D, redirecting: B, redirectTo: N, successMessage: M, actionAfterSuccess: L } = T || {}, w = n == null ? void 0 : n["x-action"];
29033
+ const { skipValidator: I, onSuccess: T, requestSettings: R } = (E = n == null ? void 0 : n["x-action-settings"]) != null ? E : {}, { manualClose: D, redirecting: B, redirectTo: N, successMessage: $, actionAfterSuccess: L } = T || {}, w = n == null ? void 0 : n["x-action"];
29030
29034
  if (!R.url)
29031
29035
  return;
29032
29036
  I !== !0 && w === "customize:form:request" && (yield a.submit());
@@ -29052,12 +29056,12 @@ const useCreateActionProps = () => {
29052
29056
  };
29053
29057
  f.data = c.data || {}, f.data.loading = !0;
29054
29058
  try {
29055
- yield e.request(x({}, q)), f.data.loading = !1, u instanceof TableFieldResource || (G = (V = d == null ? void 0 : d.service) == null ? void 0 : V.refresh) == null || G.call(V), (U = p == null ? void 0 : p.refresh) == null || U.call(p), w === "customize:form:request" && (L === "previous" || !L && B !== !0) && (b == null || b(!1)), M || (message.success(C("Saved successfully")), yield resetFormCorrectly(a), (B && !L || L === "redirect") && N && (isURL(N) ? window.location.href = N : t(N))), D ? S.success({
29056
- title: r(M),
29059
+ yield e.request(x({}, q)), f.data.loading = !1, u instanceof TableFieldResource || (G = (V = d == null ? void 0 : d.service) == null ? void 0 : V.refresh) == null || G.call(V), (U = p == null ? void 0 : p.refresh) == null || U.call(p), w === "customize:form:request" && (L === "previous" || !L && B !== !0) && (b == null || b(!1)), $ || (message.success(C("Saved successfully")), yield resetFormCorrectly(a), (B && !L || L === "redirect") && N && (isURL(N) ? window.location.href = N : t(N))), D ? S.success({
29060
+ title: r($),
29057
29061
  onOk: () => z(this, null, function* () {
29058
29062
  (B && !L || L === "redirect") && N && (isURL(N) ? window.location.href = N : t(N));
29059
29063
  })
29060
- }) : message.success(r(M));
29064
+ }) : message.success(r($));
29061
29065
  } finally {
29062
29066
  f.data.loading = !1;
29063
29067
  }
@@ -29077,12 +29081,12 @@ const useCreateActionProps = () => {
29077
29081
  skipValidator: B,
29078
29082
  triggerWorkflows: N
29079
29083
  } = (V = l == null ? void 0 : l["x-action-settings"]) != null ? V : {}, {
29080
- manualClose: M,
29084
+ manualClose: $,
29081
29085
  redirecting: L,
29082
29086
  redirectTo: w,
29083
29087
  successMessage: O,
29084
29088
  actionAfterSuccess: j
29085
- } = R || {}, k = {}, $ = Object.keys(T).map((U) => z(this, null, function* () {
29089
+ } = R || {}, k = {}, M = Object.keys(T).map((U) => z(this, null, function* () {
29086
29090
  const H = T[U], Y = d(U);
29087
29091
  if (isVariable$1(H)) {
29088
29092
  const { value: J } = (yield b == null ? void 0 : b.parseVariable(H, S)) || {};
@@ -29090,7 +29094,7 @@ const useCreateActionProps = () => {
29090
29094
  } else
29091
29095
  H !== "" && (k[U] = H);
29092
29096
  }));
29093
- yield Promise.all($), B || (yield e.submit());
29097
+ yield Promise.all(M), B || (yield e.submit());
29094
29098
  const q = u.map((U) => U.name), E = getFormValues({
29095
29099
  filterByTk: t,
29096
29100
  field: o,
@@ -29117,7 +29121,7 @@ const useCreateActionProps = () => {
29117
29121
  localVariables: [...S, { name: "$record", ctx: new Proxy((G = U == null ? void 0 : U.data) == null ? void 0 : G.data, {}) }]
29118
29122
  })), (j === "previous" || !j && L !== !0) && (a == null || a(!1)), i == null || i(!1), !O)
29119
29123
  return;
29120
- M ? f.success({
29124
+ $ ? f.success({
29121
29125
  title: m(O),
29122
29126
  onOk: () => z(this, null, function* () {
29123
29127
  yield e.reset(), (L && !j || j === "redirect") && H && (isURL(H) ? window.location.href = H : c(H));
@@ -29313,7 +29317,7 @@ const useCreateActionProps = () => {
29313
29317
  var o;
29314
29318
  return ["select", "multipleSelect", "checkbox", "checkboxGroup", "chinaRegion"].includes(e == null ? void 0 : e.interface) && ((o = e == null ? void 0 : e.uiSchema) == null ? void 0 : o.enum);
29315
29319
  }, useAssociationFilterBlockProps = () => {
29316
- var v, F, I, T, R, D, B, N, M, L;
29320
+ var v, F, I, T, R, D, B, N, $, L;
29317
29321
  const e = AssociationFilter.useAssociationField(), t = useFieldSchema(), o = useOptionalFieldList(), { getDataBlocks: n } = useFilterBlock(), r = e == null ? void 0 : e.name, a = useField(), { props: i } = useBlockRequestContext(), l = useDataSourceHeaders(i == null ? void 0 : i.dataSource), c = useCollectionManager(), { filter: u, parseVariableLoading: d } = useParsedFilter({ filterOption: (F = (v = a.componentProps) == null ? void 0 : v.params) == null ? void 0 : F.filter });
29318
29322
  let p, m, h, g, f, C, b, S;
29319
29323
  C = e != null && e.target ? (I = c == null ? void 0 : c.getCollection(e.target)) == null ? void 0 : I.getPrimaryKey() : "id", b = ((R = (T = t["x-component-props"]) == null ? void 0 : T.fieldNames) == null ? void 0 : R.label) || C, { data: f, params: h, run: g } = useRequest(
@@ -29342,7 +29346,7 @@ const useCreateActionProps = () => {
29342
29346
  g,
29343
29347
  C,
29344
29348
  (B = a.componentProps) == null ? void 0 : B.params,
29345
- (M = (N = a.componentProps) == null ? void 0 : N.params) == null ? void 0 : M.sort,
29349
+ ($ = (N = a.componentProps) == null ? void 0 : N.params) == null ? void 0 : $.sort,
29346
29350
  d
29347
29351
  ]);
29348
29352
  const y = useCallback(
@@ -29387,12 +29391,12 @@ const useCreateActionProps = () => {
29387
29391
  }, j = ((L = w == null ? void 0 : w.uiSchema) == null ? void 0 : L.enum) || [];
29388
29392
  C = "value", b = "label", p = j, h = {}, g = () => {
29389
29393
  }, S = `${w.name}.${O[w.interface]}`, m = (k) => {
29390
- const $ = k.target.value;
29391
- if (!$) {
29394
+ const M = k.target.value;
29395
+ if (!M) {
29392
29396
  p = j;
29393
29397
  return;
29394
29398
  }
29395
- p = j.filter((q) => q.label.includes($));
29399
+ p = j.filter((q) => q.label.includes(M));
29396
29400
  };
29397
29401
  } else
29398
29402
  S = `${r}.${C}.$in`, p = (f == null ? void 0 : f.data) || [], m = (w) => {
@@ -29683,35 +29687,35 @@ const useSyncFromForm = (e, t, o) => {
29683
29687
  const N = {
29684
29688
  type: "duplicate",
29685
29689
  tag: c((w = B.uiSchema) == null ? void 0 : w.title) || B.name
29686
- }, M = P(x({}, N), {
29690
+ }, $ = P(x({}, N), {
29687
29691
  title: React.createElement(TreeNode, N),
29688
29692
  key: v ? `${v}.${B.name}` : B.name,
29689
29693
  isLeaf: !0,
29690
29694
  field: B,
29691
29695
  disabled: F
29692
- }), L = I.find((O) => O.name === M.key);
29696
+ }), L = I.find((O) => O.name === $.key);
29693
29697
  if (["belongsTo", "belongsToMany"].includes(B.type) && (!L || ["Select", "Picker"].includes(L == null ? void 0 : L.fieldMode)))
29694
- N.type = "reference", M.type = "reference", M.title = React.createElement(TreeNode, P(x({}, N), { type: "reference" })), M.isLeaf = !1, M.children = m(B.target, {
29698
+ N.type = "reference", $.type = "reference", $.title = React.createElement(TreeNode, P(x({}, N), { type: "reference" })), $.isLeaf = !1, $.children = m(B.target, {
29695
29699
  depth: S + 1,
29696
29700
  maxDepth: y,
29697
- prefix: M.key,
29701
+ prefix: $.key,
29698
29702
  exclude: systemKeys
29699
29703
  });
29700
29704
  else if (["hasOne", "hasMany"].includes(B.type) || ["Nester", "SubTable"].includes(L == null ? void 0 : L.fieldMode)) {
29701
29705
  let O = !1;
29702
- ["hasOne", "hasMany"].includes(B.type) && ["Select", "Picker"].includes(L == null ? void 0 : L.fieldMode) && (O = !0), M.disabled = !0, M.isLeaf = !1, M.children = p(
29706
+ ["hasOne", "hasMany"].includes(B.type) && ["Select", "Picker"].includes(L == null ? void 0 : L.fieldMode) && (O = !0), $.disabled = !0, $.isLeaf = !1, $.children = p(
29703
29707
  B.target,
29704
29708
  {
29705
29709
  depth: S + 1,
29706
29710
  maxDepth: y,
29707
- prefix: M.key,
29711
+ prefix: $.key,
29708
29712
  exclude: ["id", ...systemKeys],
29709
29713
  disabled: O
29710
29714
  },
29711
29715
  I
29712
29716
  );
29713
29717
  }
29714
- return M;
29718
+ return $;
29715
29719
  }).filter(Boolean);
29716
29720
  return f.set(T, D), D;
29717
29721
  })(new LRUCache({ max: 100 })), m = /* @__PURE__ */ ((f) => (C, { prefix: b, maxDepth: S, depth: y = 0, exclude: v = [] }) => {
@@ -29721,7 +29725,7 @@ const useSyncFromForm = (e, t, o) => {
29721
29725
  if (y > S)
29722
29726
  return [];
29723
29727
  const T = r(C).map((R) => {
29724
- var N, M;
29728
+ var N, $;
29725
29729
  if (!R.target || !R.interface || v.includes(R.name))
29726
29730
  return;
29727
29731
  const D = {
@@ -29730,7 +29734,7 @@ const useSyncFromForm = (e, t, o) => {
29730
29734
  }, B = b ? `${b}.${R.name}` : R.name;
29731
29735
  return {
29732
29736
  type: "preloading",
29733
- tag: c((M = R.uiSchema) == null ? void 0 : M.title) || R.name,
29737
+ tag: c(($ = R.uiSchema) == null ? void 0 : $.title) || R.name,
29734
29738
  title: React.createElement(TreeNode, D),
29735
29739
  key: B,
29736
29740
  isLeaf: !1,
@@ -29761,11 +29765,11 @@ const useSyncFromForm = (e, t, o) => {
29761
29765
  var I;
29762
29766
  (I = v == null ? void 0 : v.reduceProperties) == null || I.call(v, (T, R) => {
29763
29767
  var O, j, k;
29764
- const D = T || F, B = R["x-collection-field"] && n(R["x-collection-field"]), N = R.name.includes("."), M = B && ["hasOne", "hasMany", "belongsTo", "belongsToMany"].includes(B.type), L = !M && N ? getAssociationPath(R.name) : R.name, w = D === "" || !D ? L : D + "." + L;
29765
- if (B && !(["hasOne", "hasMany"].includes(B.type) || ["SubForm", "Nester"].includes((O = R["x-component-props"]) == null ? void 0 : O.mode)) && C.add(w), B && (M || N) && R["x-component"] !== "TableField") {
29768
+ const D = T || F, B = R["x-collection-field"] && n(R["x-collection-field"]), N = R.name.includes("."), $ = B && ["hasOne", "hasMany", "belongsTo", "belongsToMany"].includes(B.type), L = !$ && N ? getAssociationPath(R.name) : R.name, w = D === "" || !D ? L : D + "." + L;
29769
+ if (B && !(["hasOne", "hasMany"].includes(B.type) || ["SubForm", "Nester"].includes((O = R["x-component-props"]) == null ? void 0 : O.mode)) && C.add(w), B && ($ || N) && R["x-component"] !== "TableField") {
29766
29770
  if (f.add({ name: w, fieldMode: ((j = R["x-component-props"]) == null ? void 0 : j.mode) || "Select" }), ["Nester", "SubTable"].includes((k = R["x-component-props"]) == null ? void 0 : k.mode)) {
29767
- const $ = D && D !== "" ? D + "." + R.name : R.name;
29768
- b(R, $);
29771
+ const M = D && D !== "" ? D + "." + R.name : R.name;
29772
+ b(R, M);
29769
29773
  }
29770
29774
  } else
29771
29775
  [
@@ -30988,7 +30992,7 @@ const useParseDefaultValue = () => {
30988
30992
  const D = !t.name.toString().includes(".") && (d == null ? void 0 : d.getField(t.name)), {
30989
30993
  value: B,
30990
30994
  collectionName: N,
30991
- dataSource: M = "main"
30995
+ dataSource: $ = "main"
30992
30996
  } = yield o.parseVariable(t.default, n, {
30993
30997
  fieldOperator: C(t.name)
30994
30998
  });
@@ -30996,7 +31000,7 @@ const useParseDefaultValue = () => {
30996
31000
  collectionName: D.target,
30997
31001
  targetCollectionName: N,
30998
31002
  dm: b,
30999
- dataSource: M
31003
+ dataSource: $
31000
31004
  })) {
31001
31005
  e.loading = !1;
31002
31006
  return;
@@ -31012,8 +31016,8 @@ const useParseDefaultValue = () => {
31012
31016
  const T = getVariableName(t.default), R = S(T);
31013
31017
  return R ? (y(), reaction(
31014
31018
  () => {
31015
- const B = { [T]: (R == null ? void 0 : R.ctx) || {} }, N = getPath(t.default), M = getValuesByPath(B, N);
31016
- return M === void 0 ? Math.random() : M;
31019
+ const B = { [T]: (R == null ? void 0 : R.ctx) || {} }, N = getPath(t.default), $ = getValuesByPath(B, N);
31020
+ return $ === void 0 ? Math.random() : $;
31017
31021
  },
31018
31022
  () => v({ forceUpdate: !0 }),
31019
31023
  {
@@ -36962,8 +36966,8 @@ const enabledIndexColumn$1 = {
36962
36966
  name: "fieldSettings:component:CascadeSelect",
36963
36967
  items: [fieldComponent$6, titleField$1, ellipsisSettingsItem, setTheDataScope]
36964
36968
  }), SchemaSettingsDateRange = function e(t) {
36965
- var T, R, D, B, N, M, L, w, O, j, k, $, q, E, V, G;
36966
- const { fieldSchema: o } = t, n = useField(), { dn: r } = useDesignable(), { t: a } = useTranslation(), { getCollectionJoinField: i } = useCollectionManager_deprecated(), { isInSubForm: l, isInSubTable: c } = useFlag() || {}, u = i(o == null ? void 0 : o["x-collection-field"]) || {}, d = ((T = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : T.showTime) || ((D = (R = u == null ? void 0 : u.uiSchema) == null ? void 0 : R["x-component-props"]) == null ? void 0 : D.showTime) || !1, p = ((B = o == null ? void 0 : o["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 = ((L = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : L.timeFormat) || ((O = (w = u == null ? void 0 : u.uiSchema) == null ? void 0 : w["x-component-props"]) == null ? void 0 : O.timeFormat) || "HH:mm:ss", h = ((j = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : j.picker) || (($ = (k = u == null ? void 0 : u.uiSchema) == null ? void 0 : k["x-component-props"]) == null ? void 0 : $.picker) || "date";
36969
+ var T, R, D, B, N, $, L, w, O, j, k, M, q, E, V, G;
36970
+ const { fieldSchema: o } = t, n = useField(), { dn: r } = useDesignable(), { t: a } = useTranslation(), { getCollectionJoinField: i } = useCollectionManager_deprecated(), { isInSubForm: l, isInSubTable: c } = useFlag() || {}, u = i(o == null ? void 0 : o["x-collection-field"]) || {}, d = ((T = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : T.showTime) || ((D = (R = u == null ? void 0 : u.uiSchema) == null ? void 0 : R["x-component-props"]) == null ? void 0 : D.showTime) || !1, p = ((B = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : B.dateFormat) || (($ = (N = u == null ? void 0 : u.uiSchema) == null ? void 0 : N["x-component-props"]) == null ? void 0 : $.dateFormat) || "YYYY-MM-DD", m = ((L = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : L.timeFormat) || ((O = (w = u == null ? void 0 : u.uiSchema) == null ? void 0 : w["x-component-props"]) == null ? void 0 : O.timeFormat) || "HH:mm:ss", h = ((j = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : j.picker) || ((M = (k = u == null ? void 0 : u.uiSchema) == null ? void 0 : k["x-component-props"]) == null ? void 0 : M.picker) || "date";
36967
36971
  o["x-read-pretty"] || n.readOnly || n.readPretty;
36968
36972
  const g = (q = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : q._minDate, f = (E = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : E._maxDate, C = ((V = u == null ? void 0 : u.uiSchema) == null ? void 0 : V["x-component-props"].gmt) || !1, b = ((G = u == null ? void 0 : u.uiSchema) == null ? void 0 : G["x-component-props"].utc) || !1, S = useRecord(), { form: y } = useFormBlockContext(), v = useCallback(
36969
36973
  (U) => /* @__PURE__ */ jsx(
@@ -38449,7 +38453,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
38449
38453
  let I = mergeCtxWithLocalVariables(o.current, b);
38450
38454
  const { fieldPath: T, dataSource: R, variableOption: D } = getFieldPath$1(v, F);
38451
38455
  let B = T;
38452
- const { fieldPath: N } = getFieldPath$1(C, F), M = y.length === 1 ? D == null ? void 0 : D.collectionName : (w = r(N, R)) == null ? void 0 : w.target;
38456
+ const { fieldPath: N } = getFieldPath$1(C, F), $ = y.length === 1 ? D == null ? void 0 : D.collectionName : (w = r(N, R)) == null ? void 0 : w.target;
38453
38457
  if (!(v in I))
38454
38458
  throw new Error(`VariablesProvider: ${v} is not found`);
38455
38459
  for (let j = 0; j < y.length; j++) {
@@ -38457,12 +38461,12 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
38457
38461
  return {
38458
38462
  value: I === void 0 ? D == null ? void 0 : D.defaultValue : I,
38459
38463
  dataSource: R,
38460
- collectionName: M
38464
+ collectionName: $
38461
38465
  };
38462
- const k = y[j], $ = y.slice(0, j + 1).join("."), { fieldPath: q } = getFieldPath$1($, F), E = r(q, R), V = (O = a(B, R)) == null ? void 0 : O.getPrimaryKey();
38466
+ const k = y[j], M = y.slice(0, j + 1).join("."), { fieldPath: q } = getFieldPath$1(M, F), E = r(q, R), V = (O = a(B, R)) == null ? void 0 : O.getPrimaryKey();
38463
38467
  if (Array.isArray(I)) {
38464
38468
  const G = I.map((U) => {
38465
- if (!(S != null && S.doNotRequest) && shouldToRequest(U == null ? void 0 : U[k]) && (U == null ? void 0 : U[V]) != null && E != null && E.target) {
38469
+ if (!(S != null && S.doNotRequest) && shouldToRequest(U == null ? void 0 : U[k], U, M) && (U == null ? void 0 : U[V]) != null && E != null && E.target) {
38466
38470
  const H = `/${B}/${U[E.sourceKey || V]}/${k}:${getAction(E.type)}`;
38467
38471
  if (hasRequested(H))
38468
38472
  return getRequested(H);
@@ -38478,7 +38482,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
38478
38482
  return U == null ? void 0 : U[k];
38479
38483
  });
38480
38484
  I = removeThroughCollectionFields(_.flatten(yield Promise.all(G)), E);
38481
- } else if (!(S != null && S.doNotRequest) && shouldToRequest(I[k]) && I[V] != null && (E != null && E.target)) {
38485
+ } else if (!(S != null && S.doNotRequest) && shouldToRequest(I[k], I, M) && I[V] != null && (E != null && E.target)) {
38482
38486
  const G = `/${B}/${I[E.sourceKey || V]}/${k}:${getAction(E.type)}`;
38483
38487
  let U = null;
38484
38488
  if (hasRequested(G))
@@ -38505,7 +38509,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
38505
38509
  return {
38506
38510
  value: L === void 0 ? D.defaultValue : L,
38507
38511
  dataSource: R,
38508
- collectionName: M
38512
+ collectionName: $
38509
38513
  };
38510
38514
  }),
38511
38515
  [r]
@@ -38587,6 +38591,8 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
38587
38591
  VariablesProvider.displayName = "VariablesProvider";
38588
38592
  const VariablesProvider$1 = VariablesProvider;
38589
38593
  function shouldToRequest(e, t, o) {
38594
+ if (o.split(".").length === 2 && (o.startsWith("$nForm.") || o.startsWith("$iteration.")))
38595
+ return !1;
38590
38596
  let n = !1;
38591
38597
  return untracked(() => {
38592
38598
  if (JSON.stringify(e) === "[{}]" || JSON.stringify(e) === "{}") {
@@ -38802,8 +38808,8 @@ const NocoBaseField = (e) => {
38802
38808
  !y.parent && p && (y.parent = p, !((B = (D = y.parent) == null ? void 0 : D.properties) != null && B[y.name]) && y.name && _.set(y.parent, `properties.${y.name}`, y));
38803
38809
  const v = useCallback(() => {
38804
38810
  const N = y.parent;
38805
- h.current = new Schema(y.toJSON(), N), N != null && N.properties && Object.keys(N.properties).forEach((M) => {
38806
- M === y.name && (N.properties[M] = h.current);
38811
+ h.current = new Schema(y.toJSON(), N), N != null && N.properties && Object.keys(N.properties).forEach(($) => {
38812
+ $ === y.name && (N.properties[$] = h.current);
38807
38813
  }), b(), S == null || S();
38808
38814
  }, [y, S, b]), F = useMemo(() => d ? createMergedSchemaInstance(y, d, n) : f ? (f.default = C, createMergedSchemaInstance(y, f, n)) : y, [f, C, y, n, d]), I = useFieldProps(F), T = (N) => {
38809
38815
  if (!r)
@@ -38959,7 +38965,7 @@ const ActionLink = withDynamicSchemaProps(
38959
38965
  return ((K = I == null ? void 0 : I["x-linkage-rules"]) == null ? void 0 : K.filter((X) => !X.disabled)) || [];
38960
38966
  },
38961
38967
  [I == null ? void 0 : I["x-linkage-rules"]]
38962
- ), { designable: N } = useDesignable(), M = useComponent(n) || n, L = useVariables$1(), w = useLocalVariables$1(), { visibleWithURL: O, setVisibleWithURL: j } = usePopupUtils(), { setSubmitted: k } = useActionContext(), { getAriaLabel: $ } = useGetAriaLabelOfAction(l), q = useCollectionParentRecordData(), E = useApp(), { getAllDataBlocks: V } = useAllDataBlocks(), G = useForm();
38968
+ ), { designable: N } = useDesignable(), $ = useComponent(n) || n, L = useVariables$1(), w = useLocalVariables$1(), { visibleWithURL: O, setVisibleWithURL: j } = usePopupUtils(), { setSubmitted: k } = useActionContext(), { getAriaLabel: M } = useGetAriaLabelOfAction(l), q = useCollectionParentRecordData(), E = useApp(), { getAllDataBlocks: V } = useAllDataBlocks(), G = useForm();
38963
38969
  useEffect(() => {
38964
38970
  F.stateOfLinkageRules && setInitialActionState(F);
38965
38971
  const K = uid(), X = [];
@@ -39023,7 +39029,7 @@ const ActionLink = withDynamicSchemaProps(
39023
39029
  icon: i,
39024
39030
  loading: d,
39025
39031
  handleMouseEnter: U,
39026
- tarComponent: M,
39032
+ tarComponent: $,
39027
39033
  className: a,
39028
39034
  type: e.type,
39029
39035
  Designer: v,
@@ -39040,7 +39046,7 @@ const ActionLink = withDynamicSchemaProps(
39040
39046
  visibleWithURL: O,
39041
39047
  setVisibleWithURL: j,
39042
39048
  setSubmitted: k,
39043
- getAriaLabel: $,
39049
+ getAriaLabel: M,
39044
39050
  parentRecordData: q,
39045
39051
  actionCallback: h
39046
39052
  }, y)
@@ -39076,7 +39082,7 @@ const ActionLink = withDynamicSchemaProps(
39076
39082
  setVisibleWithURL: D,
39077
39083
  setSubmitted: B,
39078
39084
  getAriaLabel: N,
39079
- parentRecordData: M
39085
+ parentRecordData: $
39080
39086
  } = xe, L = W(xe, [
39081
39087
  "containerRefKey",
39082
39088
  "fieldSchema",
@@ -39105,7 +39111,7 @@ const ActionLink = withDynamicSchemaProps(
39105
39111
  "setSubmitted",
39106
39112
  "getAriaLabel",
39107
39113
  "parentRecordData"
39108
- ]), [w, O] = useState(!1), { wrapSSR: j, componentCls: k, hashId: $ } = useStyles$8(), [q, E] = useState(!1), V = n["x-toolbar-props"] || n["x-designer-props"], G = (fe = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : fe.openMode, U = (pe = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : pe.openSize, H = (me = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : me.refreshDataBlockRequest, { modal: Y } = App.useApp(), J = useForm(), K = useACLActionParamsContext(), { run: X, element: Q, disabled: ee } = (I == null ? void 0 : I(T)) || {}, oe = J.disabled || a.disabled || ((he = a.data) == null ? void 0 : he.disabled) || F || ee, te = useMemo(() => {
39114
+ ]), [w, O] = useState(!1), { wrapSSR: j, componentCls: k, hashId: M } = useStyles$8(), [q, E] = useState(!1), V = n["x-toolbar-props"] || n["x-designer-props"], G = (fe = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : fe.openMode, U = (pe = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : pe.openSize, H = (me = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : me.refreshDataBlockRequest, { modal: Y } = App.useApp(), J = useForm(), K = useACLActionParamsContext(), { run: X, element: Q, disabled: ee } = (I == null ? void 0 : I(T)) || {}, oe = J.disabled || a.disabled || ((he = a.data) == null ? void 0 : he.disabled) || F || ee, te = useMemo(() => {
39109
39115
  var ce;
39110
39116
  return P(x({}, v), {
39111
39117
  opacity: r && (((ce = a == null ? void 0 : a.data) == null ? void 0 : ce.hidden) || !K) && 0.1,
@@ -39123,7 +39129,7 @@ const ActionLink = withDynamicSchemaProps(
39123
39129
  tarComponent: u,
39124
39130
  designerProps: V,
39125
39131
  componentCls: k,
39126
- hashId: $,
39132
+ hashId: M,
39127
39133
  className: d,
39128
39134
  others: L,
39129
39135
  getAriaLabel: N,
@@ -39236,7 +39242,7 @@ const RenderButton = ({
39236
39242
  confirmTitle: D,
39237
39243
  title: B
39238
39244
  }) => {
39239
- const { getDataBlockRequest: N } = useDataBlockRequestGetter(), { t: M } = useTranslation(), { isPopupVisibleControlledByURL: L } = usePopupSettings(), { openPopup: w } = usePopupUtils(), O = useVariables$1(), j = useLocalVariables$1(), k = useRef(null), $ = useCompile(), q = useForm();
39245
+ const { getDataBlockRequest: N } = useDataBlockRequestGetter(), { t: $ } = useTranslation(), { isPopupVisibleControlledByURL: L } = usePopupSettings(), { openPopup: w } = usePopupUtils(), O = useVariables$1(), j = useLocalVariables$1(), k = useRef(null), M = useCompile(), q = useForm();
39240
39246
  k.current = w;
39241
39247
  const E = {
39242
39248
  variables: O,
@@ -39247,7 +39253,7 @@ const RenderButton = ({
39247
39253
  if (U && isPortalInBody(G.target))
39248
39254
  return;
39249
39255
  G.preventDefault(), G.stopPropagation();
39250
- const H = yield getVariableValue(M(I == null ? void 0 : I.title, { title: $(y.title) }), E), Y = yield getVariableValue(M(I == null ? void 0 : I.content, { title: $(y.title) }), E);
39256
+ const H = yield getVariableValue($(I == null ? void 0 : I.title, { title: M(y.title) }), E), Y = yield getVariableValue($(I == null ? void 0 : I.content, { title: M(y.title) }), E);
39251
39257
  if (!a && o) {
39252
39258
  const K = () => {
39253
39259
  b ? b(G, () => {
@@ -39256,8 +39262,8 @@ const RenderButton = ({
39256
39262
  }) : isBulkEditAction(y) || !L() ? (v(!0), F == null || F()) : ["view", "update", "create", "customize:popup"].includes(y["x-action"]) && y["x-uid"] ? k.current() : (v(!0), F == null || F());
39257
39263
  };
39258
39264
  (I == null ? void 0 : I.enable) !== !1 && (I != null && I.content) ? (yield (J = q == null ? void 0 : q.submit) == null ? void 0 : J.call(q), T.confirm({
39259
- title: M(H, { title: D || B || (t == null ? void 0 : t.title) }),
39260
- content: M(Y, { title: D || B || (t == null ? void 0 : t.title) }),
39265
+ title: $(H, { title: D || B || (t == null ? void 0 : t.title) }),
39266
+ content: $(Y, { title: D || B || (t == null ? void 0 : t.title) }),
39261
39267
  onOk: K
39262
39268
  })) : K();
39263
39269
  }
@@ -39278,7 +39284,7 @@ const RenderButton = ({
39278
39284
  F,
39279
39285
  R,
39280
39286
  v,
39281
- M,
39287
+ $,
39282
39288
  B,
39283
39289
  N
39284
39290
  ]
@@ -39355,8 +39361,8 @@ const RenderButtonInner = observer$1(
39355
39361
  "onlyIcon"
39356
39362
  ]), { t: I } = useTranslation(), T = useCallback(
39357
39363
  debounce$1(
39358
- ($, q = !0) => {
39359
- d($, q);
39364
+ (M, q = !0) => {
39365
+ d(M, q);
39360
39366
  },
39361
39367
  300,
39362
39368
  { leading: !0, trailing: !1 }
@@ -39367,11 +39373,11 @@ const RenderButtonInner = observer$1(
39367
39373
  T.cancel();
39368
39374
  }, []), !t && ((O = o == null ? void 0 : o.data) != null && O.hidden || !n))
39369
39375
  return null;
39370
- const R = S != null ? S : o == null ? void 0 : o.title, D = typeof R == "string" ? I(R, { ns: NAMESPACE_UI_SCHEMA }) : R, j = l, { opacity: B } = j, N = W(j, ["opacity"]), M = y && B ? { opacity: B } : void 0, L = React.forwardRef(
39376
+ const R = S != null ? S : o == null ? void 0 : o.title, D = typeof R == "string" ? I(R, { ns: NAMESPACE_UI_SCHEMA }) : R, j = l, { opacity: B } = j, N = W(j, ["opacity"]), $ = y && B ? { opacity: B } : void 0, L = React.forwardRef(
39371
39377
  (H, U) => {
39372
- var Y = H, { component: $ = p || Button, icon: q, onlyIcon: E, children: V } = Y, G = W(Y, ["component", "icon", "onlyIcon", "children"]);
39373
- return /* @__PURE__ */ jsxs($, P(x({ ref: U }, G), { children: [
39374
- E ? /* @__PURE__ */ jsx(Tooltip, { title: G.title, children: /* @__PURE__ */ jsx("span", { children: q && typeof q == "string" ? /* @__PURE__ */ jsx(Icon, { type: q }) : q }) }) : /* @__PURE__ */ jsx("span", { children: q && typeof q == "string" ? /* @__PURE__ */ jsx(Icon, { type: q }) : q }),
39378
+ var Y = H, { component: M = p || Button, icon: q, onlyIcon: E, children: V } = Y, G = W(Y, ["component", "icon", "onlyIcon", "children"]);
39379
+ return /* @__PURE__ */ jsxs(M, P(x({ ref: U }, G), { children: [
39380
+ E ? /* @__PURE__ */ jsx(Tooltip, { title: G.title, children: /* @__PURE__ */ jsx("span", { style: { padding: 3 }, children: q && typeof q == "string" ? /* @__PURE__ */ jsx(Icon, { type: q }) : q }) }) : /* @__PURE__ */ jsx("span", { style: { paddingRight: 3 }, children: q && typeof q == "string" ? /* @__PURE__ */ jsx(Icon, { type: q }) : q }),
39375
39381
  E ? V[1] : V
39376
39382
  ] }));
39377
39383
  }
@@ -39384,7 +39390,7 @@ const RenderButtonInner = observer$1(
39384
39390
  }, F), {
39385
39391
  onMouseEnter: c,
39386
39392
  loading: ((k = o == null ? void 0 : o.data) == null ? void 0 : k.loading) || a,
39387
- icon: typeof r == "string" ? /* @__PURE__ */ jsx(Icon, { type: r, style: M }) : r,
39393
+ icon: typeof r == "string" ? /* @__PURE__ */ jsx(Icon, { type: r, style: $ }) : r,
39388
39394
  disabled: i,
39389
39395
  style: y ? N : l,
39390
39396
  onClick: T,
@@ -39394,7 +39400,7 @@ const RenderButtonInner = observer$1(
39394
39400
  title: D,
39395
39401
  onlyIcon: v,
39396
39402
  children: [
39397
- !v && D && /* @__PURE__ */ jsx("span", { className: r ? "nb-action-title" : null, style: M, children: D }),
39403
+ !v && D && /* @__PURE__ */ jsx("span", { className: r ? "nb-action-title" : null, style: $, children: D }),
39398
39404
  /* @__PURE__ */ jsx(C, x({}, b))
39399
39405
  ]
39400
39406
  })
@@ -39850,30 +39856,30 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
39850
39856
  "toOptionsItem",
39851
39857
  "popupMatchSelectWidth",
39852
39858
  "onSuccess"
39853
- ]), b = useDataSourceKey(), S = useDataSourceHeaders(m || b), y = useRef(!1), v = useFieldSchema(), F = ((Y = v["x-component-props"]) == null ? void 0 : Y.addMode) === "quickAdd", { getField: I } = useCollection_deprecated(), T = useRef(null), { getCollectionJoinField: R, getInterface: D } = useCollectionManager_deprecated(), B = v["x-collection-field"] || v.name, N = I(B) || R(B), M = u || (N == null ? void 0 : N.target) && (t == null ? void 0 : t.label) && R(`${N.target}.${t.label}`), L = useMemo(() => {
39859
+ ]), b = useDataSourceKey(), S = useDataSourceHeaders(m || b), y = useRef(!1), v = useFieldSchema(), F = ((Y = v["x-component-props"]) == null ? void 0 : Y.addMode) === "quickAdd", { getField: I } = useCollection_deprecated(), T = useRef(null), { getCollectionJoinField: R, getInterface: D } = useCollectionManager_deprecated(), B = v["x-collection-field"] || v.name, N = I(B) || R(B), $ = u || (N == null ? void 0 : N.target) && (t == null ? void 0 : t.label) && R(`${N.target}.${t.label}`), L = useMemo(() => {
39854
39860
  var K;
39855
- if (M != null && M.interface) {
39856
- const X = D(M.interface), Q = ((K = X == null ? void 0 : X.filterable) == null ? void 0 : K.operators[0].value) || "$includes";
39857
- return M.type === "string" ? "$includes" : Q;
39861
+ if ($ != null && $.interface) {
39862
+ const X = D($.interface), Q = ((K = X == null ? void 0 : X.filterable) == null ? void 0 : K.operators[0].value) || "$includes";
39863
+ return $.type === "string" ? "$includes" : Q;
39858
39864
  }
39859
39865
  return "$includes";
39860
- }, [M]), w = useCompile(), O = useCallback(
39866
+ }, [$]), w = useCompile(), O = useCallback(
39861
39867
  (K) => {
39862
39868
  try {
39863
39869
  return K.filter((X) => ["number", "string"].includes(typeof X[t.value]) || !X[t.value]).map((X) => {
39864
39870
  var ee;
39865
39871
  let Q = w(X[t.label]);
39866
- if ((ee = M == null ? void 0 : M.uiSchema) != null && ee.enum)
39872
+ if ((ee = $ == null ? void 0 : $.uiSchema) != null && ee.enum)
39867
39873
  if (Array.isArray(Q))
39868
39874
  Q = Q.map((oe, te) => {
39869
- const se = M.uiSchema.enum.find((ie) => ie.value === oe);
39875
+ const se = $.uiSchema.enum.find((ie) => ie.value === oe);
39870
39876
  return se ? /* @__PURE__ */ jsx(Tag, { role: "button", color: se.color, style: { marginRight: 3 }, children: (se == null ? void 0 : se.label) || oe }, te) : /* @__PURE__ */ jsx(Tag, { role: "button", children: oe }, oe);
39871
39877
  }).reverse();
39872
39878
  else {
39873
- const oe = M.uiSchema.enum.find((te) => te.value === Q);
39879
+ const oe = $.uiSchema.enum.find((te) => te.value === Q);
39874
39880
  oe && (Q = /* @__PURE__ */ jsx(Tag, { role: "button", color: oe.color, children: oe.label }));
39875
39881
  }
39876
- return (M == null ? void 0 : M.type) === "date" && (Q = dayjs(Q).format("YYYY-MM-DD")), c ? c({
39882
+ return ($ == null ? void 0 : $.type) === "date" && (Q = dayjs(Q).format("YYYY-MM-DD")), c ? c({
39877
39883
  [t.label]: Q || EMPTY$1,
39878
39884
  [t.value]: X[t.value]
39879
39885
  }) : P(x({}, omit(X, "style")), {
@@ -39885,8 +39891,8 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
39885
39891
  return console.error(X), K;
39886
39892
  }
39887
39893
  },
39888
- [M == null ? void 0 : M.uiSchema, t]
39889
- ), { data: j, run: k, loading: $ } = useRequest(
39894
+ [$ == null ? void 0 : $.uiSchema, t]
39895
+ ), { data: j, run: k, loading: M } = useRequest(
39890
39896
  P(x({
39891
39897
  action: "list"
39892
39898
  }, o), {
@@ -39956,7 +39962,7 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
39956
39962
  value: r,
39957
39963
  defaultValue: a
39958
39964
  }, C), {
39959
- loading: j ? $ : !0,
39965
+ loading: j ? M : !0,
39960
39966
  options: h(O(G)),
39961
39967
  rawOptions: G,
39962
39968
  dropdownRender: (K) => {
@@ -40035,9 +40041,9 @@ const useFormDataTemplates = () => {
40035
40041
  d(I), m(null), t == null || t.reset();
40036
40042
  }), []), v = useCallback((I, T, R) => z(void 0, null, function* () {
40037
40043
  const D = P(x({}, T), { dataId: I });
40038
- m(T), fetchTemplateData(h, D, R).then((B) => (t && B && (t.reset(), t.__template = !0, forEach(B, (N, M) => {
40044
+ m(T), fetchTemplateData(h, D, R).then((B) => (t && B && (t.reset(), t.__template = !0, forEach(B, (N, $) => {
40039
40045
  var L;
40040
- N && (t.values[M] = N, (L = t == null ? void 0 : t.setInitialValuesIn) == null || L.call(t, M, N));
40046
+ N && (t.values[$] = N, (L = t == null ? void 0 : t.setInitialValuesIn) == null || L.call(t, $, N));
40041
40047
  })), B)).catch((B) => {
40042
40048
  console.error(B);
40043
40049
  });
@@ -40962,10 +40968,10 @@ const insertPositionToMethod = {
40962
40968
  [(D = c == null ? void 0 : c["x-component-props"]) == null ? void 0 : D.onSelect]
40963
40969
  ), h = useMemo(() => toItems$1(c == null ? void 0 : c.properties, { t: l, compile: u }), [c == null ? void 0 : c.properties, l, u]), g = useCallback(
40964
40970
  (N) => {
40965
- onFieldChange("target", (M) => {
40971
+ onFieldChange("target", ($) => {
40966
40972
  var w, O;
40967
- const [, L] = ((O = (w = M == null ? void 0 : M.value) == null ? void 0 : w.split) == null ? void 0 : O.call(w, "||")) || [];
40968
- M.query("position").take((j) => {
40973
+ const [, L] = ((O = (w = $ == null ? void 0 : $.value) == null ? void 0 : w.split) == null ? void 0 : O.call(w, "||")) || [];
40974
+ $.query("position").take((j) => {
40969
40975
  j.dataSource = L === "Menu.SubMenu" ? [
40970
40976
  { label: l("Before"), value: "beforeBegin" },
40971
40977
  { label: l("After"), value: "afterEnd" },
@@ -41013,7 +41019,7 @@ const insertPositionToMethod = {
41013
41019
  }), [o.componentProps.tooltip]);
41014
41020
  n["x-component"] === "Menu.URL" && (f.properties.href = d, f.properties.params = p, C.href = o.componentProps.href, C.params = o.componentProps.params);
41015
41021
  const y = useCallback(
41016
- ({ title: N, icon: M, href: L, params: w }) => {
41022
+ ({ title: N, icon: $, href: L, params: w }) => {
41017
41023
  var j;
41018
41024
  const O = {
41019
41025
  "x-uid": n["x-uid"],
@@ -41024,11 +41030,11 @@ const insertPositionToMethod = {
41024
41030
  }
41025
41031
  ]
41026
41032
  };
41027
- N && (n.title = N, o.title = N, O.title = N, i()), o.componentProps.icon = M, o.componentProps.href = L, o.componentProps.params = w, O["x-component-props"] = { icon: M, href: L, params: w }, n["x-component-props"] = n["x-component-props"] || {}, n["x-component-props"].icon = M, n["x-component-props"].href = L, n["x-component-props"].params = w, m == null || m({ item: { props: { schema: n } } }), a.emit("patch", {
41033
+ N && (n.title = N, o.title = N, O.title = N, i()), o.componentProps.icon = $, o.componentProps.href = L, o.componentProps.params = w, O["x-component-props"] = { icon: $, href: L, params: w }, n["x-component-props"] = n["x-component-props"] || {}, n["x-component-props"].icon = $, n["x-component-props"].href = L, n["x-component-props"].params = w, m == null || m({ item: { props: { schema: n } } }), a.emit("patch", {
41028
41034
  schema: O
41029
41035
  }), (j = n.__route__) != null && j.id && e(n.__route__.id, {
41030
41036
  title: N,
41031
- icon: M,
41037
+ icon: $,
41032
41038
  options: L || w ? {
41033
41039
  href: L,
41034
41040
  params: w
@@ -41038,8 +41044,8 @@ const insertPositionToMethod = {
41038
41044
  [n, o, a, i, m]
41039
41045
  ), v = useCallback(
41040
41046
  ({ tooltip: N }) => {
41041
- var M;
41042
- (M = n.__route__) != null && M.id && e(n.__route__.id, {
41047
+ var $;
41048
+ ($ = n.__route__) != null && $.id && e(n.__route__.id, {
41043
41049
  tooltip: N
41044
41050
  });
41045
41051
  },
@@ -41069,7 +41075,7 @@ const insertPositionToMethod = {
41069
41075
  }
41070
41076
  }
41071
41077
  }), [h, l]), { moveRoute: I } = useNocoBaseRoutes(), T = useCallback(
41072
- (L) => z(void 0, [L], function* ({ target: N, position: M }) {
41078
+ (L) => z(void 0, [L], function* ({ target: N, position: $ }) {
41073
41079
  var q;
41074
41080
  const [w] = ((q = N == null ? void 0 : N.split) == null ? void 0 : q.call(N, "||")) || [];
41075
41081
  if (!w)
@@ -41082,7 +41088,7 @@ const insertPositionToMethod = {
41082
41088
  }), k = {
41083
41089
  beforeBegin: "insertBefore",
41084
41090
  afterEnd: "insertAfter"
41085
- }, $ = M === "beforeEnd" ? {
41091
+ }, M = $ === "beforeEnd" ? {
41086
41092
  targetScope: {
41087
41093
  parentId: O.__route__.id
41088
41094
  }
@@ -41092,8 +41098,8 @@ const insertPositionToMethod = {
41092
41098
  yield I(x({
41093
41099
  sourceId: n.__route__.id,
41094
41100
  sortField: "sort",
41095
- method: k[M]
41096
- }, $)), j.loadAPIClientEvents(), j.insertAdjacent(M, n);
41101
+ method: k[$]
41102
+ }, M)), j.loadAPIClientEvents(), j.insertAdjacent($, n);
41097
41103
  }),
41098
41104
  [c, l, r, i, I, n]
41099
41105
  ), R = useMemo(() => ({
@@ -41547,14 +41553,14 @@ const useMenuDragEnd = () => {
41547
41553
  theme: m
41548
41554
  } = useProps(e), { t: h } = useTranslation(), g = useDesigner(), f = useFieldSchema(), C = useAPIClient(), { render: b } = useSchemaInitializerRender(f["x-initializer"], f["x-initializer-props"]), S = useSideMenuRef(), [y, v] = useState(), [F, I] = useState(() => a || (r ? findKeysByUid(f, r) : [])), [T, R] = useState(() => ["inline", "mix"].includes(o) ? i || F : i), D = useMemo(() => {
41549
41555
  var L;
41550
- let M;
41556
+ let $;
41551
41557
  if (n) {
41552
41558
  const w = findKeysByUid(f, n);
41553
- M = (w == null ? void 0 : w[0]) || null;
41559
+ $ = (w == null ? void 0 : w[0]) || null;
41554
41560
  } else
41555
- M = (F == null ? void 0 : F[0]) || null;
41556
- if (o === "mix" && M) {
41557
- const w = (L = f.properties) == null ? void 0 : L[M];
41561
+ $ = (F == null ? void 0 : F[0]) || null;
41562
+ if (o === "mix" && $) {
41563
+ const w = (L = f.properties) == null ? void 0 : L[$];
41558
41564
  if ((w == null ? void 0 : w["x-component"]) === "Menu.SubMenu")
41559
41565
  return w;
41560
41566
  }
@@ -41565,8 +41571,8 @@ const useMenuDragEnd = () => {
41565
41571
  v(void 0);
41566
41572
  return;
41567
41573
  }
41568
- const M = findKeysByUid(f, n);
41569
- v(M), ["inline", "mix"].includes(o) && R(i || M);
41574
+ const $ = findKeysByUid(f, n);
41575
+ v($), ["inline", "mix"].includes(o) && R(i || $);
41570
41576
  }, [n]), useEffect(() => {
41571
41577
  ["inline", "mix"].includes(o) && R(F);
41572
41578
  }, [F]);
@@ -42406,41 +42412,41 @@ const AppendsTreeSelect = (e) => {
42406
42412
  "filter",
42407
42413
  "rootOption",
42408
42414
  "loadData"
42409
- ]), d = useCompile(), { t: p } = useTranslation(), [m, h] = useState({}), g = a({ collection: r }), [f, C] = parseCollectionName(g), b = useApp(), { collectionManager: S } = b.dataSourceManager.getDataSource(f), y = (M, L) => {
42410
- const w = S.getCollection(M);
42415
+ ]), d = useCompile(), { t: p } = useTranslation(), [m, h] = useState({}), g = a({ collection: r }), [f, C] = parseCollectionName(g), b = useApp(), { collectionManager: S } = b.dataSourceManager.getDataSource(f), y = ($, L) => {
42416
+ const w = S.getCollection($);
42411
42417
  return w ? w.getAllFields(L) : [];
42412
- }, v = Object.values(m), F = useMemo(() => e.multiple ? (o || []).map((M) => m[M]).filter(Boolean) : o, [o, e.multiple, m]), I = useCallback(
42413
- (M) => z(void 0, null, function* () {
42418
+ }, v = Object.values(m), F = useMemo(() => e.multiple ? (o || []).map(($) => m[$]).filter(Boolean) : o, [o, e.multiple, m]), I = useCallback(
42419
+ ($) => z(void 0, null, function* () {
42414
42420
  if (c != null)
42415
- return c(M);
42416
- if (!M.isLeaf && M.loadChildren) {
42417
- const L = M.loadChildren(M);
42421
+ return c($);
42422
+ if (!$.isLeaf && $.loadChildren) {
42423
+ const L = $.loadChildren($);
42418
42424
  h((w) => L.reduce((O, j) => Object.assign(O, { [j.value]: j }), x({}, w)));
42419
42425
  }
42420
42426
  }),
42421
42427
  [c]
42422
42428
  );
42423
42429
  useEffect(() => {
42424
- const M = l ? P(x({}, l), {
42430
+ const $ = l ? P(x({}, l), {
42425
42431
  id: l.value,
42426
42432
  key: l.value,
42427
42433
  title: l.label,
42428
42434
  fullTitle: l.label,
42429
42435
  isLeaf: !1
42430
- }) : null, w = (c === null ? [] : getCollectionFieldOptions.call({ compile: d, getCollectionFields: y, filter: i }, C, M)).reduce((O, j) => Object.assign(O, { [j.value]: j }), {});
42431
- M && (w[M.value] = M), h(w);
42436
+ }) : null, w = (c === null ? [] : getCollectionFieldOptions.call({ compile: d, getCollectionFields: y, filter: i }, C, $)).reduce((O, j) => Object.assign(O, { [j.value]: j }), {});
42437
+ $ && (w[$.value] = $), h(w);
42432
42438
  }, [g, l, i, c]), useEffect(() => {
42433
- const M = e.multiple ? o : o ? [o] : [];
42434
- if (!(M != null && M.length) || M.every((w) => !!m[w]))
42439
+ const $ = e.multiple ? o : o ? [o] : [];
42440
+ if (!($ != null && $.length) || $.every((w) => !!m[w]))
42435
42441
  return;
42436
42442
  const L = [];
42437
- M.forEach((w) => {
42443
+ $.forEach((w) => {
42438
42444
  const O = w.split(".");
42439
42445
  let j = m[O[0]];
42440
42446
  for (let k = 1; k < O.length && j; k++) {
42441
- const $ = O.slice(0, k + 1).join(".");
42442
- if (m[$]) {
42443
- j = m[$];
42447
+ const M = O.slice(0, k + 1).join(".");
42448
+ if (m[M]) {
42449
+ j = m[M];
42444
42450
  break;
42445
42451
  }
42446
42452
  if (!j.isLeaf && j.loadChildren) {
@@ -42451,12 +42457,12 @@ const AppendsTreeSelect = (e) => {
42451
42457
  }), h((w) => L.reduce((O, j) => Object.assign(O, { [j.value]: j }), x({}, w)));
42452
42458
  }, [o, v.length, e.multiple]);
42453
42459
  const T = useCallback(
42454
- (M) => {
42460
+ ($) => {
42455
42461
  if (!e.multiple) {
42456
- n(M);
42462
+ n($);
42457
42463
  return;
42458
42464
  }
42459
- const L = M.map((j) => j.value).filter(Boolean), w = new Set(L), O = F.find((j) => !w.has(j.value));
42465
+ const L = $.map((j) => j.value).filter(Boolean), w = new Set(L), O = F.find((j) => !w.has(j.value));
42460
42466
  if (O) {
42461
42467
  const j = `${O.value}.`;
42462
42468
  Object.keys(m).forEach((k) => {
@@ -42466,23 +42472,23 @@ const AppendsTreeSelect = (e) => {
42466
42472
  L.forEach((j) => {
42467
42473
  const k = j.split(".");
42468
42474
  if (k.length)
42469
- for (let $ = 1; $ <= k.length; $++)
42470
- w.add(k.slice(0, $).join("."));
42475
+ for (let M = 1; M <= k.length; M++)
42476
+ w.add(k.slice(0, M).join("."));
42471
42477
  });
42472
42478
  n(Array.from(w));
42473
42479
  },
42474
42480
  [e.multiple, F, n, m]
42475
42481
  ), R = useCallback(
42476
- (M) => {
42477
- var $;
42478
- const { value: L, onClose: w, disabled: O, closable: j } = M;
42482
+ ($) => {
42483
+ var M;
42484
+ const { value: L, onClose: w, disabled: O, closable: j } = $;
42479
42485
  if (!L)
42480
42486
  return null;
42481
- const { fullTitle: k } = ($ = m[L]) != null ? $ : {};
42487
+ const { fullTitle: k } = (M = m[L]) != null ? M : {};
42482
42488
  return /* @__PURE__ */ jsx(Tag, { closable: j && !O, onClose: w, children: k == null ? void 0 : k.join(" / ") });
42483
42489
  },
42484
42490
  [m]
42485
- ), D = Array.isArray(F) ? F.filter((M) => M.value in m) : F, B = e.multiple ? o : o != null ? [o] : [];
42491
+ ), D = Array.isArray(F) ? F.filter(($) => $.value in m) : F, B = e.multiple ? o : o != null ? [o] : [];
42486
42492
  return /* @__PURE__ */ jsx(
42487
42493
  TreeSelect$2,
42488
42494
  P(x({
@@ -42531,15 +42537,15 @@ const InternalAssociationSelect$1 = observer$1(
42531
42537
  var B;
42532
42538
  const D = e, { objectValue: t = !0, addMode: o } = D, n = W(D, ["objectValue", "addMode"]), r = useField(), a = useFieldSchema(), i = useServiceOptions$1((a == null ? void 0 : a["x-component-props"]) || e), { options: l } = useAssociationFieldContext(), c = isVariable$1(e.value) ? void 0 : e.value, u = Array.isArray(c) ? c.filter(Boolean) : c, [d, p] = useState(u), m = (B = a["x-component-props"]) == null ? void 0 : B.addMode, { t: h } = useTranslation(), { multiple: g } = e, f = useForm(), b = useAPIClient().resource(l.target), S = useCollectionRecordData(), y = useContext(SchemaComponentContext), { getCollection: v } = useCollectionManager_deprecated(), F = v(l.target), { filterTargetKey: I } = F;
42533
42539
  useEffect(() => {
42534
- const N = isVariable$1(r.value) ? void 0 : r.value, M = Array.isArray(N) ? N.filter(Boolean) : N, L = removeIfKeyEmpty(M, I);
42540
+ const N = isVariable$1(r.value) ? void 0 : r.value, $ = Array.isArray(N) ? N.filter(Boolean) : N, L = removeIfKeyEmpty($, I);
42535
42541
  p(L), isEqual(r.value, L) || (r.value = L);
42536
42542
  }, [r.value, I]), useEffect(() => {
42537
42543
  const N = uid();
42538
42544
  return f.addEffects(N, () => {
42539
- onFieldInputValueChange("*", (M) => {
42540
- var j, k, $, q, E, V;
42541
- const L = filterAnalyses(($ = (k = (j = r.componentProps) == null ? void 0 : j.service) == null ? void 0 : k.params) == null ? void 0 : $.filter) || [], w = getFieldPath(M.address.entire), O = getFieldPath(r.address.entire);
42542
- L.includes((q = M == null ? void 0 : M.props) == null ? void 0 : q.name) && r.value && isEqual(M == null ? void 0 : M.indexes, r == null ? void 0 : r.indexes) && ((E = M == null ? void 0 : M.props) == null ? void 0 : E.name) !== r.props.name && (!((V = r == null ? void 0 : r.indexes) != null && V.length) || isEqual(w, O)) && (r.setValue(null), p(null));
42545
+ onFieldInputValueChange("*", ($) => {
42546
+ var j, k, M, q, E, V;
42547
+ const L = filterAnalyses((M = (k = (j = r.componentProps) == null ? void 0 : j.service) == null ? void 0 : k.params) == null ? void 0 : M.filter) || [], w = getFieldPath($.address.entire), O = getFieldPath(r.address.entire);
42548
+ L.includes((q = $ == null ? void 0 : $.props) == null ? void 0 : q.name) && r.value && isEqual($ == null ? void 0 : $.indexes, r == null ? void 0 : r.indexes) && ((E = $ == null ? void 0 : $.props) == null ? void 0 : E.name) !== r.props.name && (!((V = r == null ? void 0 : r.indexes) != null && V.length) || isEqual(w, O)) && (r.setValue(null), p(null));
42543
42549
  });
42544
42550
  }), () => {
42545
42551
  f.removeEffects(N);
@@ -42547,11 +42553,11 @@ const InternalAssociationSelect$1 = observer$1(
42547
42553
  }, []);
42548
42554
  const T = (N) => z(void 0, null, function* () {
42549
42555
  var O, j;
42550
- const { search: M, callBack: L } = N, {
42556
+ const { search: $, callBack: L } = N, {
42551
42557
  data: { data: w }
42552
42558
  } = yield b.create({
42553
42559
  values: {
42554
- [((j = (O = r == null ? void 0 : r.componentProps) == null ? void 0 : O.fieldNames) == null ? void 0 : j.label) || "id"]: M
42560
+ [((j = (O = r == null ? void 0 : r.componentProps) == null ? void 0 : O.fieldNames) == null ? void 0 : j.label) || "id"]: $
42555
42561
  }
42556
42562
  });
42557
42563
  if (w) {
@@ -42585,8 +42591,8 @@ const InternalAssociationSelect$1 = observer$1(
42585
42591
  service: i,
42586
42592
  onChange: (N) => {
42587
42593
  var L;
42588
- const M = Array.isArray(N) && N.length === 0 ? null : N;
42589
- (L = e.onChange) == null || L.call(e, M);
42594
+ const $ = Array.isArray(N) && N.length === 0 ? null : N;
42595
+ (L = e.onChange) == null || L.call(e, $);
42590
42596
  },
42591
42597
  CustomDropdownRender: m === "quickAdd" && R
42592
42598
  })
@@ -43183,7 +43189,7 @@ function Uploader(o) {
43183
43189
  }, [f, p, h]);
43184
43190
  const S = useCallback(
43185
43191
  (B) => {
43186
- var M;
43192
+ var $;
43187
43193
  const N = B.fileList.filter((L) => L.status !== "done").map(normalizeFile);
43188
43194
  if (m(N), a) {
43189
43195
  const L = B.fileList.filter((w) => w.status === "done");
@@ -43196,19 +43202,19 @@ function Uploader(o) {
43196
43202
  }
43197
43203
  } else {
43198
43204
  const L = B.fileList.find((w) => w.uid === B.file.uid);
43199
- L.status === "done" && (l == null || l(c((M = L.response) == null ? void 0 : M.data)), m([]));
43205
+ L.status === "done" && (l == null || l(c(($ = L.response) == null ? void 0 : $.data)), m([]));
43200
43206
  }
43201
43207
  },
43202
43208
  [a, i, u, c, l]
43203
43209
  ), y = useCallback((B) => {
43204
43210
  m((N) => {
43205
- const M = N.indexOf(B);
43206
- return N.splice(M, 1), [...N];
43211
+ const $ = N.indexOf(B);
43212
+ return N.splice($, 1), [...N];
43207
43213
  });
43208
43214
  }, []), v = useCallback((B) => {
43209
43215
  d((N) => {
43210
- const M = N.indexOf(B);
43211
- return N.splice(M, 1), [...N];
43216
+ const $ = N.indexOf(B);
43217
+ return N.splice($, 1), [...N];
43212
43218
  });
43213
43219
  }, []), F = useComponent("QRCodeUploader"), { mimetype: I, size: T } = e != null ? e : {}, R = useSizeHint(T), D = !r && (a || (!i || Array.isArray(i) && !i.length) && !p.length);
43214
43220
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
@@ -43529,9 +43535,9 @@ const InternalFileManager = (e) => {
43529
43535
  };
43530
43536
  useEffect(() => {
43531
43537
  if (t && Object.keys(t).length > 0) {
43532
- const N = (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((M) => {
43533
- const L = M[p.label];
43534
- return P(x({}, M), {
43538
+ const N = (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map(($) => {
43539
+ const L = $[p.label];
43540
+ return P(x({}, $), {
43535
43541
  [p.label]: getLabelFormatValue$1(y(S), y(L))
43536
43542
  });
43537
43543
  });
@@ -43552,10 +43558,10 @@ const InternalFileManager = (e) => {
43552
43558
  setSelectedRows: u,
43553
43559
  collectionField: b
43554
43560
  }, T = () => {
43555
- const { setVisible: N } = useActionContext(), { multiple: M, selectedRows: L, onChange: w, options: O, collectionField: j } = useContext(RecordPickerContext);
43561
+ const { setVisible: N } = useActionContext(), { multiple: $, selectedRows: L, onChange: w, options: O, collectionField: j } = useContext(RecordPickerContext);
43556
43562
  return {
43557
43563
  onClick() {
43558
- w(M ? unionBy(L, O, (j == null ? void 0 : j.targetKey) || "id") : (L == null ? void 0 : L[0]) || null), N(!1);
43564
+ w($ ? unionBy(L, O, (j == null ? void 0 : j.targetKey) || "id") : (L == null ? void 0 : L[0]) || null), N(!1);
43559
43565
  }
43560
43566
  };
43561
43567
  };
@@ -43607,10 +43613,10 @@ const InternalFileManager = (e) => {
43607
43613
  FormItem: FormItem$1
43608
43614
  }
43609
43615
  }), CascadeSelect = connect((e) => {
43610
- var M;
43616
+ var $;
43611
43617
  const { data: t, mapOptions: o, onChange: n, value: r } = e, [a, i] = useState([
43612
43618
  { key: void 0, children: [], value: null }
43613
- ]), [l, c] = useState(t), [u, d] = useState(!1), p = useCompile(), m = useAPIClient(), h = useServiceOptions$1(e), { options: g, field: f } = useAssociationFieldContext(), C = m.resource(g.target), { getCollectionJoinField: b, getInterface: S } = useCollectionManager_deprecated(), y = (M = f == null ? void 0 : f.componentProps) == null ? void 0 : M.fieldNames, v = (g == null ? void 0 : g.target) && (y == null ? void 0 : y.label) && b(`${g.target}.${y.label}`), F = useMemo(() => {
43619
+ ]), [l, c] = useState(t), [u, d] = useState(!1), p = useCompile(), m = useAPIClient(), h = useServiceOptions$1(e), { options: g, field: f } = useAssociationFieldContext(), C = m.resource(g.target), { getCollectionJoinField: b, getInterface: S } = useCollectionManager_deprecated(), y = ($ = f == null ? void 0 : f.componentProps) == null ? void 0 : $.fieldNames, v = (g == null ? void 0 : g.target) && (y == null ? void 0 : y.label) && b(`${g.target}.${y.label}`), F = useMemo(() => {
43614
43620
  var L, w;
43615
43621
  return v != null && v.interface && ((w = (L = S(v.interface)) == null ? void 0 : L.filterable) == null ? void 0 : w.operators[0].value) || "$includes";
43616
43622
  }, [v]), I = useField();
@@ -43629,7 +43635,7 @@ const InternalFileManager = (e) => {
43629
43635
  (L) => {
43630
43636
  try {
43631
43637
  return L == null ? void 0 : L.filter((w) => ["number", "string"].includes(typeof w[y.value])).map((w) => {
43632
- var j, k, $;
43638
+ var j, k, M;
43633
43639
  let O = p(w[y.label]);
43634
43640
  if ((j = v == null ? void 0 : v.uiSchema) != null && j.enum)
43635
43641
  if (Array.isArray(O))
@@ -43639,7 +43645,7 @@ const InternalFileManager = (e) => {
43639
43645
  return V ? /* @__PURE__ */ jsx(Tag, { color: V.color, style: { marginRight: 3 }, children: (V == null ? void 0 : V.label) || q }, E) : /* @__PURE__ */ jsx(Tag, { children: q }, q);
43640
43646
  }).reverse();
43641
43647
  else {
43642
- const q = ($ = (k = v.uiSchema.enum).find) == null ? void 0 : $.call(k, (E) => E.value === O);
43648
+ const q = (M = (k = v.uiSchema.enum).find) == null ? void 0 : M.call(k, (E) => E.value === O);
43643
43649
  q && (O = /* @__PURE__ */ jsx(Tag, { color: q.color, children: q.label }));
43644
43650
  }
43645
43651
  return (v == null ? void 0 : v.type) === "date" && (O = dayjs(O).format("YYYY-MM-DD")), o ? o({
@@ -43667,19 +43673,19 @@ const InternalFileManager = (e) => {
43667
43673
  }), D = (L, w, O) => z(void 0, null, function* () {
43668
43674
  const j = yield R({ parentId: w == null ? void 0 : w.id }), k = [...a];
43669
43675
  if (k.splice(O + 1), k[O] = P(x({}, k[O]), { value: w }), w != null && w.id && (k[O + 1] = { key: w == null ? void 0 : w.id, children: (j == null ? void 0 : j.length) > 0 ? j : null }), i(k), ["o2m", "m2m"].includes(g.interface)) {
43670
- const $ = Array.isArray(f.fieldValue) ? f.fieldValue : [];
43671
- $[I.index] = w, f.fieldValue = $;
43676
+ const M = Array.isArray(f.fieldValue) ? f.fieldValue : [];
43677
+ M[I.index] = w, f.fieldValue = M;
43672
43678
  } else
43673
43679
  f.value = w;
43674
43680
  k.length === 1 && !k[0].value ? n == null || n(null) : n == null || n(k);
43675
43681
  }), B = (L, w, O) => z(void 0, null, function* () {
43676
- var j, k, $;
43682
+ var j, k, M;
43677
43683
  if (L) {
43678
43684
  d(!0);
43679
43685
  const q = yield R({ parentId: w == null ? void 0 : w.key });
43680
43686
  if (d(!1), c(q), O === (a == null ? void 0 : a.length) - 1 && ((j = w == null ? void 0 : w.value) != null && j.id)) {
43681
43687
  const E = yield R({ parentId: (k = w == null ? void 0 : w.value) == null ? void 0 : k.id }), V = [...a];
43682
- V.splice(O + 1), V[O] = P(x({}, V[O]), { value: w == null ? void 0 : w.value }), V[O + 1] = { key: ($ = w == null ? void 0 : w.value) == null ? void 0 : $.id, children: (E == null ? void 0 : E.length) > 0 ? E : null }, i(V), n == null || n(V);
43688
+ V.splice(O + 1), V[O] = P(x({}, V[O]), { value: w == null ? void 0 : w.value }), V[O + 1] = { key: (M = w == null ? void 0 : w.value) == null ? void 0 : M.id, children: (E == null ? void 0 : E.length) > 0 ? E : null }, i(V), n == null || n(V);
43683
43689
  }
43684
43690
  }
43685
43691
  }), N = (L, w) => z(void 0, null, function* () {
@@ -43710,12 +43716,12 @@ const InternalFileManager = (e) => {
43710
43716
  value: (j = L == null ? void 0 : L.value) == null ? void 0 : j[y.value]
43711
43717
  },
43712
43718
  labelInValue: !0,
43713
- onSearch: ($) => N($, L),
43719
+ onSearch: (M) => N(M, L),
43714
43720
  fieldNames: y,
43715
43721
  style: { minWidth: 150 },
43716
- onChange: ($, q) => D($, q, w),
43722
+ onChange: (M, q) => D(M, q, w),
43717
43723
  options: u ? [] : T(l),
43718
- onDropdownVisibleChange: ($) => B($, L, w),
43724
+ onDropdownVisibleChange: (M) => B(M, L, w),
43719
43725
  notFoundContent: u ? /* @__PURE__ */ jsx(Spin, { size: "small" }) : null
43720
43726
  },
43721
43727
  `${(k = L.value) == null ? void 0 : k.id}+ ${L.key} + ${y.label}`
@@ -43956,9 +43962,9 @@ const InternalNesterCardCss = css`
43956
43962
  }, InternalPicker = observer$1(
43957
43963
  (e) => {
43958
43964
  var j;
43959
- const O = e, { value: t, multiple: o, openSize: n, onChange: r, quickUpload: a, selectFile: i, shouldMountElement: l } = O, c = W(O, ["value", "multiple", "openSize", "onChange", "quickUpload", "selectFile", "shouldMountElement"]), u = useField(), d = useFieldNames$1(e), [p, m] = useState(!1), h = useFieldSchema(), g = useInsertSchema$1("Selector"), { options: f } = useAssociationFieldContext(), { collectionName: C } = useFormBlockContext(), b = useCompile(), S = useLabelUiSchema$1(f, (d == null ? void 0 : d.label) || "label"), y = h["x-add-new"], [v, F] = useState([]), I = useCollectionRecordData(), T = useMemo(() => t && Object.keys(t).length > 0 ? (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map(($) => {
43960
- const q = $ == null ? void 0 : $[d.label];
43961
- return P(x({}, $), {
43965
+ const O = e, { value: t, multiple: o, openSize: n, onChange: r, quickUpload: a, selectFile: i, shouldMountElement: l } = O, c = W(O, ["value", "multiple", "openSize", "onChange", "quickUpload", "selectFile", "shouldMountElement"]), u = useField(), d = useFieldNames$1(e), [p, m] = useState(!1), h = useFieldSchema(), g = useInsertSchema$1("Selector"), { options: f } = useAssociationFieldContext(), { collectionName: C } = useFormBlockContext(), b = useCompile(), S = useLabelUiSchema$1(f, (d == null ? void 0 : d.label) || "label"), y = h["x-add-new"], [v, F] = useState([]), I = useCollectionRecordData(), T = useMemo(() => t && Object.keys(t).length > 0 ? (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((M) => {
43966
+ const q = M == null ? void 0 : M[d.label];
43967
+ return P(x({}, M), {
43962
43968
  [d.label]: getLabelFormatValue$1(b(S), b(q))
43963
43969
  });
43964
43970
  }) : [], [t, d == null ? void 0 : d.label]), R = {
@@ -43976,23 +43982,23 @@ const InternalNesterCardCss = css`
43976
43982
  currentFormCollection: C
43977
43983
  }, { isMobileLayout: D } = useMobileLayout(), B = () => {
43978
43984
  var k;
43979
- return o == null ? null : Array.isArray(t) ? (k = t.filter(Boolean)) == null ? void 0 : k.map(($) => $ == null ? void 0 : $[d.value]) : t == null ? void 0 : t[d.value];
43985
+ return o == null ? null : Array.isArray(t) ? (k = t.filter(Boolean)) == null ? void 0 : k.map((M) => M == null ? void 0 : M[d.value]) : t == null ? void 0 : t[d.value];
43980
43986
  }, N = () => {
43981
- const k = (f == null ? void 0 : f.targetKey) || "id", $ = T.map((E) => E[k]).filter(Boolean);
43982
- return $.length ? { $and: [{ [`${k}.$ne`]: $ }] } : {};
43983
- }, M = () => {
43984
- const { setVisible: k } = useActionContext(), { multiple: $, selectedRows: q, onChange: E, options: V, collectionField: G } = useContext(RecordPickerContext);
43987
+ const k = (f == null ? void 0 : f.targetKey) || "id", M = T.map((E) => E[k]).filter(Boolean);
43988
+ return M.length ? { $and: [{ [`${k}.$ne`]: M }] } : {};
43989
+ }, $ = () => {
43990
+ const { setVisible: k } = useActionContext(), { multiple: M, selectedRows: q, onChange: E, options: V, collectionField: G } = useContext(RecordPickerContext);
43985
43991
  return {
43986
43992
  onClick() {
43987
- E($ ? unionBy(q, V, (G == null ? void 0 : G.targetKey) || "id") : (q == null ? void 0 : q[0]) || null), k(!1);
43993
+ E(M ? unionBy(q, V, (G == null ? void 0 : G.targetKey) || "id") : (q == null ? void 0 : q[0]) || null), k(!1);
43988
43994
  },
43989
43995
  style: {
43990
- display: $ === !1 ? "none" : "block"
43996
+ display: M === !1 ? "none" : "block"
43991
43997
  }
43992
43998
  };
43993
43999
  }, L = useMemo(
43994
44000
  () => ({
43995
- usePickActionProps: M,
44001
+ usePickActionProps: $,
43996
44002
  useTableSelectorProps: useTableSelectorProps$2
43997
44003
  }),
43998
44004
  []
@@ -44023,12 +44029,12 @@ const InternalNesterCardCss = css`
44023
44029
  r([]), F([]);
44024
44030
  return;
44025
44031
  }
44026
- const $ = T == null ? void 0 : T.filter((q) => k.includes(q[d.value]));
44027
- r($), F($);
44032
+ const M = T == null ? void 0 : T.filter((q) => k.includes(q[d.value]));
44033
+ r(M), F(M);
44028
44034
  }
44029
44035
  } else {
44030
- const $ = o ? [] : null;
44031
- r($), F($);
44036
+ const M = o ? [] : null;
44037
+ r(M), F(M);
44032
44038
  }
44033
44039
  },
44034
44040
  options: T,
@@ -44098,7 +44104,7 @@ const RenderRecord = React.memo(
44098
44104
  const T = useCallback(() => I.current, []);
44099
44105
  return useEffect(() => {
44100
44106
  const R = toArr$3(h).map((D, B, N) => {
44101
- const M = D == null ? void 0 : D[(e == null ? void 0 : e.label) || "label"], L = t ? transformNestedData(D).map((k) => k == null ? void 0 : k[(e == null ? void 0 : e.label) || "label"]).join(" / ") : isObject(M) ? JSON.stringify(M) : M, w = toValue$4(o(L), "N/A"), O = n(
44107
+ const $ = D == null ? void 0 : D[(e == null ? void 0 : e.label) || "label"], L = t ? transformNestedData(D).map((k) => k == null ? void 0 : k[(e == null ? void 0 : e.label) || "label"]).join(" / ") : isObject($) ? JSON.stringify($) : $, w = toValue$4(o(L), "N/A"), O = n(
44102
44108
  (D == null ? void 0 : D.__collection) || (r == null ? void 0 : r.target),
44103
44109
  (e == null ? void 0 : e.label) || "label"
44104
44110
  ), j = getLabelFormatValue$1(o(O), w, !0);
@@ -44110,7 +44116,7 @@ const RenderRecord = React.memo(
44110
44116
  g(!0);
44111
44117
  },
44112
44118
  onClick: (k) => {
44113
- var $;
44119
+ var M;
44114
44120
  g(!0), k.stopPropagation(), k.preventDefault(), l && !hasAddedViewer(u.properties) && (c(schema$1.Viewer), F.current = !0), F.current ? (setTimeout(() => {
44115
44121
  f == null || f({ recordData: D }), d({
44116
44122
  recordData: D,
@@ -44120,7 +44126,7 @@ const RenderRecord = React.memo(
44120
44126
  }), F.current = !1) : u.properties && (f == null || f({ recordData: D }), d({
44121
44127
  recordData: D,
44122
44128
  parentRecordData: p
44123
- })), ($ = m == null ? void 0 : m.current) == null || $.setPopoverVisible(!1);
44129
+ })), (M = m == null ? void 0 : m.current) == null || M.setPopoverVisible(!1);
44124
44130
  },
44125
44131
  children: j
44126
44132
  }
@@ -44182,8 +44188,8 @@ const getSourceData = (e, t) => {
44182
44188
  return o ? _.get(e, o) : e;
44183
44189
  }, ReadPrettyInternalViewer = (e) => {
44184
44190
  var B, N;
44185
- const { value: t, ButtonList: o = ButtonLinkList } = e, n = useFieldSchema(), { enableLink: r, openMode: a, openSize: i } = n["x-component-props"] || {}, l = useField(), [c, u] = useState(!1), { options: d } = useAssociationFieldContext(), p = useAssociationName(), { visibleWithURL: m, setVisibleWithURL: h } = usePopupUtils(), [g, f] = useState(!!m), { defaultOpenMode: C } = useOpenModeContext(), b = useCollectionRecordData(), [S, y] = useState(null), { isPopupVisibleControlledByURL: v } = usePopupSettings(), F = useCollection(), I = useCallback((M) => {
44186
- y(M.recordData);
44191
+ const { value: t, ButtonList: o = ButtonLinkList } = e, n = useFieldSchema(), { enableLink: r, openMode: a, openSize: i } = n["x-component-props"] || {}, l = useField(), [c, u] = useState(!1), { options: d } = useAssociationFieldContext(), p = useAssociationName(), { visibleWithURL: m, setVisibleWithURL: h } = usePopupUtils(), [g, f] = useState(!!m), { defaultOpenMode: C } = useOpenModeContext(), b = useCollectionRecordData(), [S, y] = useState(null), { isPopupVisibleControlledByURL: v } = usePopupSettings(), F = useCollection(), I = useCallback(($) => {
44192
+ y($.recordData);
44187
44193
  }, []), T = /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: (B = e.ellipsis) != null ? B : !0, children: /* @__PURE__ */ jsx(CollectionRecordProvider, { isNew: !1, record: getSourceData(b, n), children: /* @__PURE__ */ jsx(
44188
44194
  o,
44189
44195
  {
@@ -44196,8 +44202,8 @@ const getSourceData = (e, t) => {
44196
44202
  ) }) }), R = useMemo(
44197
44203
  () => ({
44198
44204
  visible: c || m,
44199
- setVisible: (M) => {
44200
- u == null || u(M), h == null || h(M);
44205
+ setVisible: ($) => {
44206
+ u == null || u($), h == null || h($);
44201
44207
  },
44202
44208
  openMode: a || C,
44203
44209
  snapshot: (d == null ? void 0 : d.interface) === "snapshot",
@@ -44216,7 +44222,7 @@ const getSourceData = (e, t) => {
44216
44222
  schema: n,
44217
44223
  onlyRenderProperties: !0,
44218
44224
  basePath: l.address,
44219
- filterProperties: (M) => M["x-component"] === "AssociationField.Viewer"
44225
+ filterProperties: ($) => $["x-component"] === "AssociationField.Viewer"
44220
44226
  }
44221
44227
  ) }) })
44222
44228
  ) : /* @__PURE__ */ jsx(
@@ -44235,7 +44241,7 @@ const getSourceData = (e, t) => {
44235
44241
  schema: n,
44236
44242
  onlyRenderProperties: !0,
44237
44243
  basePath: l.address,
44238
- filterProperties: (M) => M["x-component"] === "AssociationField.Viewer"
44244
+ filterProperties: ($) => $["x-component"] === "AssociationField.Viewer"
44239
44245
  }
44240
44246
  ) }) }) })
44241
44247
  }
@@ -44503,7 +44509,7 @@ const AssignedFieldInner = (e) => {
44503
44509
  ), S = useCallback(
44504
44510
  (v) => {
44505
44511
  const F = v.find((T) => T.value === "$nForm"), I = n(h);
44506
- return !(I != null && I.length) && F && (F.children = formatVariableScop(m)), v;
44512
+ return !(I != null && I.length) && F && (F.children = formatVariableScop(m)), cloneDeep$1(v);
44507
44513
  },
44508
44514
  [m, h]
44509
44515
  ), y = useCallback(
@@ -44837,8 +44843,8 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
44837
44843
  });
44838
44844
  Array.isArray(n.value) || (n.value = []);
44839
44845
  const D = useCallback(({ form: w, fieldSchema: O, collectionField: j, getInterface: k }) => {
44840
- var $;
44841
- return !j || j.target && (($ = O["x-component-props"]) != null && $.mode) && !["Picker", "Select"].includes(O["x-component-props"].mode) ? !1 : !(w != null && w.readPretty) && !isPatternDisabled(O) && !interfacesOfUnsupportedDefaultValue.includes(j == null ? void 0 : j.interface) && !isSystemField(j, k);
44846
+ var M;
44847
+ return !j || j.target && ((M = O["x-component-props"]) != null && M.mode) && !["Picker", "Select"].includes(O["x-component-props"].mode) ? !1 : !(w != null && w.readPretty) && !isPatternDisabled(O) && !interfacesOfUnsupportedDefaultValue.includes(j == null ? void 0 : j.interface) && !isSystemField(j, k);
44842
44848
  }, []), B = () => {
44843
44849
  const { setVisible: w } = useActionContext(), { selectedRows: O, setSelectedRows: j } = useContext(RecordPickerContext);
44844
44850
  return {
@@ -44851,7 +44857,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
44851
44857
  return P(x({}, O), {
44852
44858
  [F.label]: getLabelFormatValue$1(I(T), I(j))
44853
44859
  });
44854
- }) : [], [n.value, F == null ? void 0 : F.label]), M = {
44860
+ }) : [], [n.value, F == null ? void 0 : F.label]), $ = {
44855
44861
  size: "small",
44856
44862
  fieldNames: n.componentProps.fieldNames,
44857
44863
  multiple: !0,
@@ -44949,7 +44955,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
44949
44955
  visible: b,
44950
44956
  setVisible: S
44951
44957
  },
44952
- children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, M), { children: /* @__PURE__ */ jsx(CollectionProvider, { name: o == null ? void 0 : o.target, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: { filter: L() }, children: /* @__PURE__ */ jsx(
44958
+ children: /* @__PURE__ */ jsx(RecordPickerProvider, P(x({}, $), { children: /* @__PURE__ */ jsx(CollectionProvider, { name: o == null ? void 0 : o.target, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(TableSelectorParamsProvider, { params: { filter: L() }, children: /* @__PURE__ */ jsx(
44953
44959
  SchemaComponentOptions,
44954
44960
  {
44955
44961
  scope: {
@@ -44996,7 +45002,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
44996
45002
  S.current = t;
44997
45003
  const y = useCallback(() => S.current, []);
44998
45004
  return /* @__PURE__ */ jsx(Fragment$1, { children: toArr$3(e.value).map((F, I, T) => {
44999
- const R = F == null ? void 0 : F[(r == null ? void 0 : r.label) || "label"], D = g ? transformNestedData(F).map((M) => M == null ? void 0 : M[(r == null ? void 0 : r.label) || "label"]).join(" / ") : isObject(R) ? JSON.stringify(R) : R, B = toValue$3(l(D), "N/A"), N = getTabFormatValue(l(u), B, F[n]);
45005
+ const R = F == null ? void 0 : F[(r == null ? void 0 : r.label) || "label"], D = g ? transformNestedData(F).map(($) => $ == null ? void 0 : $[(r == null ? void 0 : r.label) || "label"]).join(" / ") : isObject(R) ? JSON.stringify(R) : R, B = toValue$3(l(D), "N/A"), N = getTabFormatValue(l(u), B, F[n]);
45000
45006
  return /* @__PURE__ */ jsxs(Fragment, { children: [
45001
45007
  /* @__PURE__ */ jsx("span", { children: d ? N : o !== !1 ? /* @__PURE__ */ jsx(
45002
45008
  "a",
@@ -45004,9 +45010,9 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
45004
45010
  onMouseEnter: () => {
45005
45011
  e.setBtnHover(!0);
45006
45012
  },
45007
- onClick: (M) => {
45013
+ onClick: ($) => {
45008
45014
  var L;
45009
- e.setBtnHover(!0), M.stopPropagation(), M.preventDefault(), c && !t.properties && (a(schema$1.Viewer), b.current = !0), b.current ? setTimeout(() => {
45015
+ e.setBtnHover(!0), $.stopPropagation(), $.preventDefault(), c && !t.properties && (a(schema$1.Viewer), b.current = !0), b.current ? setTimeout(() => {
45010
45016
  f({
45011
45017
  recordData: F,
45012
45018
  parentRecordData: C,
@@ -45097,8 +45103,8 @@ const useColumnsDeepMemoized = (e) => {
45097
45103
  width: F && !i ? 0 : ((D = S["x-component-props"]) == null ? void 0 : D.width) || 100,
45098
45104
  render: (B, N) => {
45099
45105
  var w;
45100
- const M = (w = n.value) == null ? void 0 : w.indexOf(N), L = n.address.concat(N.__index || M);
45101
- return /* @__PURE__ */ jsx(SubFormProvider, { value: { value: N, collection: f, fieldSchema: r.parent }, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: N.__index || M, children: /* @__PURE__ */ jsx(RecordProvider, { isNew: isNewRecord(N), record: N, parent: u, children: /* @__PURE__ */ jsx(ColumnFieldProvider, { schema: S, basePath: L, children: /* @__PURE__ */ jsx("span", { role: "button", className: g, children: /* @__PURE__ */ jsx(RecursionField, { basePath: L, schema: S, onlyRenderProperties: !0 }) }, M) }) }) }) });
45106
+ const $ = (w = n.value) == null ? void 0 : w.indexOf(N), L = n.address.concat(N.__index || $);
45107
+ return /* @__PURE__ */ jsx(SubFormProvider, { value: { value: N, collection: f, fieldSchema: r.parent }, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: N.__index || $, children: /* @__PURE__ */ jsx(RecordProvider, { isNew: isNewRecord(N), record: N, parent: u, children: /* @__PURE__ */ jsx(ColumnFieldProvider, { schema: S, basePath: L, children: /* @__PURE__ */ jsx("span", { role: "button", className: g, children: /* @__PURE__ */ jsx(RecursionField, { basePath: L, schema: S, onlyRenderProperties: !0 }) }, $) }) }) }) });
45102
45108
  },
45103
45109
  onCell: (B, N) => ({
45104
45110
  record: B,
@@ -45434,7 +45440,7 @@ const Table$1 = withDynamicSchemaProps(
45434
45440
  "onClickRow",
45435
45441
  "enableIndexÏColumn"
45436
45442
  ]), y = useArrayField(S), v = useFieldSchema(), { size: F = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, I = useCollection(), R = ((Ce = v == null ? void 0 : v.parent) == null ? void 0 : Ce["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: B } = R, N = useMemoizedFn(S.onRowDragEnd || (() => {
45437
- })), M = usePaginationProps$2(o, a), L = useTableColumns$1(S, M), [w, O] = useState(() => D ? B : []), [j, k] = useState(((be = y == null ? void 0 : y.data) == null ? void 0 : be.selectedRowKeys) || []), [$, q] = useState([]), E = (p == null ? void 0 : p.type) !== "none", V = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
45443
+ })), $ = usePaginationProps$2(o, a), L = useTableColumns$1(S, $), [w, O] = useState(() => D ? B : []), [j, k] = useState(((be = y == null ? void 0 : y.data) == null ? void 0 : be.selectedRowKeys) || []), [M, q] = useState([]), E = (p == null ? void 0 : p.type) !== "none", V = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
45438
45444
  & > td {
45439
45445
  background-color: ${t.controlItemBgActive} !important;
45440
45446
  }
@@ -45443,10 +45449,10 @@ const Table$1 = withDynamicSchemaProps(
45443
45449
  }
45444
45450
  `, [t.controlItemBgActive, t.controlItemBgActiveHover]), U = useMemo(() => C ? G : "", [G, C]), H = useMemo(() => C ? (Z, ne) => ({
45445
45451
  onClick: (re) => {
45446
- isPortalInBody(re.target) || C(Z, q, $);
45452
+ isPortalInBody(re.target) || C(Z, q, M);
45447
45453
  },
45448
45454
  rowIndex: ne
45449
- }) : null, [C, $]);
45455
+ }) : null, [C, M]);
45450
45456
  useDeepCompareEffect(() => {
45451
45457
  const Z = D ? B : [];
45452
45458
  _.isEqual(Z, w) || O(Z);
@@ -45508,7 +45514,7 @@ const Table$1 = withDynamicSchemaProps(
45508
45514
  renderCell: (Z, ne, re, ae) => {
45509
45515
  if (!l && !c)
45510
45516
  return ae;
45511
- const le = M == null ? void 0 : M.current, ge = (M == null ? void 0 : M.pageSize) || 20;
45517
+ const le = $ == null ? void 0 : $.current, ge = ($ == null ? void 0 : $.pageSize) || 20;
45512
45518
  return le ? re = re + (le - 1) * ge + 1 : re = re + 1, ne.__index && (re = extractIndex(ne.__index)), /* @__PURE__ */ jsxs(
45513
45519
  "div",
45514
45520
  {
@@ -45549,7 +45555,7 @@ const Table$1 = withDynamicSchemaProps(
45549
45555
  J,
45550
45556
  E,
45551
45557
  ee,
45552
- M,
45558
+ $,
45553
45559
  b
45554
45560
  ]
45555
45561
  ), te = useCallback(
@@ -45570,8 +45576,8 @@ const Table$1 = withDynamicSchemaProps(
45570
45576
  x: "max-content",
45571
45577
  y: K.length > 0 ? se : void 0
45572
45578
  }), [se, ue, K]), fe = useCallback(
45573
- (Z) => $.includes(Z[m]) ? U : "",
45574
- [$, U, JSON.stringify(m)]
45579
+ (Z) => M.includes(Z[m]) ? U : "",
45580
+ [M, U, JSON.stringify(m)]
45575
45581
  ), pe = useCallback(
45576
45582
  (Z, ne) => {
45577
45583
  const re = Z ? [...w, ne[I.getPrimaryKey()]] : w.filter((ae) => ne[I.getPrimaryKey()] !== ae);
@@ -45593,7 +45599,7 @@ const Table$1 = withDynamicSchemaProps(
45593
45599
  defaultRowKey: Y,
45594
45600
  dataSource: K
45595
45601
  }, S), oe), {
45596
- paginationProps: M,
45602
+ paginationProps: $,
45597
45603
  components: Q,
45598
45604
  onTableChange: d,
45599
45605
  onRow: H,
@@ -45659,7 +45665,7 @@ const Table$1 = withDynamicSchemaProps(
45659
45665
  }
45660
45666
  `, SubTable = observer$1(
45661
45667
  (e) => {
45662
- var k, $, q;
45668
+ var k, M, q;
45663
45669
  const { openSize: t } = e, { field: o, options: n, fieldSchema: r } = useAssociationFieldContext(), { t: a } = useTranslation(), [i, l] = useState(!1), [c, u] = useState([]), d = useFieldNames$1(e), p = useFieldSchema(), m = useCompile(), h = useLabelUiSchema$1(n, (d == null ? void 0 : d.label) || "label"), g = useCollectionRecord(), f = useCollection(), { allowSelectExistingRecord: C, allowAddnew: b, allowDisassociation: S, enableIndexÏColumn: y } = o.componentProps;
45664
45670
  useSubTableSpecialCase({ rootField: o, rootSchema: r });
45665
45671
  const v = (E, V) => {
@@ -45703,11 +45709,11 @@ const Table$1 = withDynamicSchemaProps(
45703
45709
  }, R = () => {
45704
45710
  const E = (n == null ? void 0 : n.targetKey) || "id", V = (o.value || []).map((U) => U == null ? void 0 : U[E]).filter(Boolean);
45705
45711
  return V.length ? { $and: [{ [`${E}.$ne`]: V }] } : {};
45706
- }, [D, B] = useState(1), [N, M] = useState(((k = o.componentProps) == null ? void 0 : k.pageSize) || 10), { setFormValueChanged: L } = useActionContext();
45712
+ }, [D, B] = useState(1), [N, $] = useState(((k = o.componentProps) == null ? void 0 : k.pageSize) || 10), { setFormValueChanged: L } = useActionContext();
45707
45713
  useEffect(() => {
45708
45714
  var E;
45709
- M((E = o.componentProps) == null ? void 0 : E.pageSize);
45710
- }, [($ = o.componentProps) == null ? void 0 : $.pageSize]);
45715
+ $((E = o.componentProps) == null ? void 0 : E.pageSize);
45716
+ }, [(M = o.componentProps) == null ? void 0 : M.pageSize]);
45711
45717
  const w = useMemo(() => {
45712
45718
  var V;
45713
45719
  const E = Math.ceil(((V = o.value) == null ? void 0 : V.length) / 10);
@@ -45716,7 +45722,7 @@ const Table$1 = withDynamicSchemaProps(
45716
45722
  pageSize: N || 10,
45717
45723
  total: o == null ? void 0 : o.value,
45718
45724
  onChange: (G, U) => {
45719
- B(G), M(U), o.componentProps.pageSize = U, o.onInput(o.value), L(!1);
45725
+ B(G), $(U), o.componentProps.pageSize = U, o.onInput(o.value), L == null || L(!1);
45720
45726
  },
45721
45727
  showSizeChanger: !0,
45722
45728
  pageSizeOptions: ["10", "20", "50", "100"],
@@ -45913,10 +45919,10 @@ const ReadPretty$7 = observer$1(
45913
45919
  InternalAssociationSelect.displayName = "InternalAssociationSelect";
45914
45920
  const AssociationSelect = InternalAssociationSelect;
45915
45921
  AssociationSelect.Designer = function e() {
45916
- var O, j, k, $, q, E, V, G, U, H, Y;
45922
+ var O, j, k, M, q, E, V, G, U, H, Y;
45917
45923
  const { getCollectionFields: t, getInterface: o, getCollectionJoinField: n, getCollection: r, isTitleField: a } = useCollectionManager_deprecated(), { getField: i } = useCollection_deprecated(), { form: l } = useFormBlockContext(), c = useField(), u = useFieldSchema(), { t: d } = useTranslation(), p = useFilterByTk(), { dn: m, refresh: h, insertAdjacent: g } = useDesignable(), f = useCompile(), C = useIsShowMultipleSwitch(), { isAllowToSetDefaultValue: b } = useIsAllowToSetDefaultValue(), S = i(u.name) || n(u["x-collection-field"]), y = useFieldComponentOptions(), v = c.address.segments.includes("__form_grid"), F = o(S == null ? void 0 : S.interface), I = (O = F == null ? void 0 : F.validateSchema) == null ? void 0 : O.call(F, u), T = (j = S == null ? void 0 : S.uiSchema) == null ? void 0 : j.title, R = S != null && S.target ? t(S == null ? void 0 : S.target) : [];
45918
45924
  c.title === T || c.title;
45919
- const D = useSortFields(S == null ? void 0 : S.target), B = ((q = ($ = (k = c.componentProps) == null ? void 0 : k.service) == null ? void 0 : $.params) == null ? void 0 : q.sort) || [];
45925
+ const D = useSortFields(S == null ? void 0 : S.target), B = ((q = (M = (k = c.componentProps) == null ? void 0 : k.service) == null ? void 0 : M.params) == null ? void 0 : q.sort) || [];
45920
45926
  useEffect(() => {
45921
45927
  c.readPretty !== u["x-read-pretty"] && (c.readPretty = !!u["x-read-pretty"]);
45922
45928
  }, [u["x-read-pretty"]]);
@@ -45928,7 +45934,7 @@ AssociationSelect.Designer = function e() {
45928
45934
  direction: "asc"
45929
45935
  });
45930
45936
  c.readPretty || c.required;
45931
- const M = R.filter((J) => a(J)).map((J) => {
45937
+ const $ = R.filter((J) => a(J)).map((J) => {
45932
45938
  var K;
45933
45939
  return {
45934
45940
  value: J == null ? void 0 : J.name,
@@ -46279,7 +46285,7 @@ AssociationSelect.Designer = function e() {
46279
46285
  SchemaSettingsSelectItem,
46280
46286
  {
46281
46287
  title: d("Title field"),
46282
- options: M,
46288
+ options: $,
46283
46289
  value: (Y = (H = c == null ? void 0 : c.componentProps) == null ? void 0 : H.fieldNames) == null ? void 0 : Y.label,
46284
46290
  onChange: (J) => {
46285
46291
  var Q, ee;
@@ -46312,7 +46318,7 @@ AssociationSelect.Designer = function e() {
46312
46318
  ] });
46313
46319
  };
46314
46320
  AssociationSelect.FilterDesigner = function e() {
46315
- var F, I, T, R, D, B, N, M, L, w, O;
46321
+ var F, I, T, R, D, B, N, $, L, w, O;
46316
46322
  const { getCollectionFields: t, getInterface: o, getCollectionJoinField: n } = useCollectionManager_deprecated(), { getField: r } = useCollection_deprecated(), { form: a } = useFormBlockContext(), i = useField(), l = useFieldSchema(), { t: c } = useTranslation(), { dn: u, refresh: d } = useDesignable(), p = useCompile(), m = r(l.name) || n(l["x-collection-field"]), h = o(m == null ? void 0 : m.interface), g = (F = h == null ? void 0 : h.validateSchema) == null ? void 0 : F.call(h, l), f = (I = m == null ? void 0 : m.uiSchema) == null ? void 0 : I.title, C = m != null && m.target ? t(m == null ? void 0 : m.target) : [];
46317
46323
  i.title === f || i.title;
46318
46324
  const b = useSortFields(m == null ? void 0 : m.target), S = ((D = (R = (T = i.componentProps) == null ? void 0 : T.service) == null ? void 0 : R.params) == null ? void 0 : D.sort) || [], y = S == null ? void 0 : S.map((j) => j.startsWith("-") ? {
@@ -46423,15 +46429,15 @@ AssociationSelect.FilterDesigner = function e() {
46423
46429
  const k = [];
46424
46430
  for (const V of j.rules)
46425
46431
  k.push(_.pickBy(V, _.identity));
46426
- const $ = {
46432
+ const M = {
46427
46433
  "x-uid": l["x-uid"]
46428
46434
  };
46429
46435
  if (["percent"].includes(m == null ? void 0 : m.interface))
46430
46436
  for (const V of k)
46431
46437
  (V.maxValue || V.minValue) && (V.percentMode = !0), V.percentFormat && (V.percentFormats = !0);
46432
46438
  const q = _.concat([], ((E = m == null ? void 0 : m.uiSchema) == null ? void 0 : E["x-validator"]) || [], k);
46433
- i.validator = q, l["x-validator"] = k, $["x-validator"] = k, u.emit("patch", {
46434
- schema: $
46439
+ i.validator = q, l["x-validator"] = k, M["x-validator"] = k, u.emit("patch", {
46440
+ schema: M
46435
46441
  }), d();
46436
46442
  }
46437
46443
  }
@@ -46467,7 +46473,7 @@ AssociationSelect.FilterDesigner = function e() {
46467
46473
  SchemaSettingsDataScope,
46468
46474
  {
46469
46475
  collectionName: m == null ? void 0 : m.target,
46470
- defaultFilter: ((L = (M = (N = i.componentProps) == null ? void 0 : N.service) == null ? void 0 : M.params) == null ? void 0 : L.filter) || {},
46476
+ defaultFilter: ((L = ($ = (N = i.componentProps) == null ? void 0 : N.service) == null ? void 0 : $.params) == null ? void 0 : L.filter) || {},
46471
46477
  form: a,
46472
46478
  onSubmit: ({ filter: j }) => {
46473
46479
  j = removeNullCondition(j), _.set(i.componentProps, "service.params.filter", j), l["x-component-props"] = i.componentProps, u.emit("patch", {
@@ -46554,7 +46560,7 @@ AssociationSelect.FilterDesigner = function e() {
46554
46560
  }
46555
46561
  },
46556
46562
  onSubmit: ({ sort: j }) => {
46557
- const k = j.map(($) => $.direction === "desc" ? `-${$.field}` : $.field);
46563
+ const k = j.map((M) => M.direction === "desc" ? `-${M.field}` : M.field);
46558
46564
  _.set(i.componentProps, "service.params.sort", k), l["x-component-props"] = i.componentProps, u.emit("patch", {
46559
46565
  schema: {
46560
46566
  "x-uid": l["x-uid"],
@@ -46574,10 +46580,10 @@ AssociationSelect.FilterDesigner = function e() {
46574
46580
  var q, E;
46575
46581
  const k = {
46576
46582
  "x-uid": l["x-uid"]
46577
- }, $ = P(x(x({}, (E = (q = m == null ? void 0 : m.uiSchema) == null ? void 0 : q["x-component-props"]) == null ? void 0 : E.fieldNames), i.componentProps.fieldNames), {
46583
+ }, M = P(x(x({}, (E = (q = m == null ? void 0 : m.uiSchema) == null ? void 0 : q["x-component-props"]) == null ? void 0 : E.fieldNames), i.componentProps.fieldNames), {
46578
46584
  label: j
46579
46585
  });
46580
- i.componentProps.fieldNames = $, l["x-component-props"] = l["x-component-props"] || {}, l["x-component-props"].fieldNames = $, k["x-component-props"] = l["x-component-props"], u.emit("patch", {
46586
+ i.componentProps.fieldNames = M, l["x-component-props"] = l["x-component-props"] || {}, l["x-component-props"].fieldNames = M, k["x-component-props"] = l["x-component-props"], u.emit("patch", {
46581
46587
  schema: k
46582
46588
  }), u.refresh();
46583
46589
  }
@@ -48015,8 +48021,8 @@ const InternalListBlockProvider = (e) => {
48015
48021
  }
48016
48022
  },
48017
48023
  onSubmit: ({ sort: N }) => {
48018
- const M = N.map((L) => L.direction === "desc" ? `-${L.field}` : L.field);
48019
- _.set(i, "x-decorator-props.params.sort", M), c.decoratorProps.params = P(x({}, i["x-decorator-props"].params), { page: 1 }), u.emit("patch", {
48024
+ const $ = N.map((L) => L.direction === "desc" ? `-${L.field}` : L.field);
48025
+ _.set(i, "x-decorator-props.params.sort", $), c.decoratorProps.params = P(x({}, i["x-decorator-props"].params), { page: 1 }), u.emit("patch", {
48020
48026
  schema: {
48021
48027
  "x-uid": i["x-uid"],
48022
48028
  "x-decorator-props": i["x-decorator-props"]
@@ -48162,10 +48168,10 @@ const InternalListBlockProvider = (e) => {
48162
48168
  ), m.get(k)),
48163
48169
  [r.properties, m]
48164
48170
  ), y = [5, 10, 20, 50, 100, 200], v = useCallback(
48165
- (k, $) => {
48171
+ (k, M) => {
48166
48172
  o(P(x({}, n == null ? void 0 : n[0]), {
48167
48173
  page: k,
48168
- pageSize: $
48174
+ pageSize: M
48169
48175
  }));
48170
48176
  },
48171
48177
  [o, n]
@@ -48196,7 +48202,7 @@ const InternalListBlockProvider = (e) => {
48196
48202
  display: none !important;
48197
48203
  }
48198
48204
  `,
48199
- itemRender: ($, q, E) => q === "prev" ? /* @__PURE__ */ jsxs(
48205
+ itemRender: (M, q, E) => q === "prev" ? /* @__PURE__ */ jsxs(
48200
48206
  "div",
48201
48207
  {
48202
48208
  style: { display: "flex" },
@@ -48213,7 +48219,7 @@ const InternalListBlockProvider = (e) => {
48213
48219
  }
48214
48220
  ) : E
48215
48221
  };
48216
- })(), { isMobileLayout: M } = useMobileLayout();
48222
+ })(), { isMobileLayout: $ } = useMobileLayout();
48217
48223
  return h(
48218
48224
  /* @__PURE__ */ jsx(
48219
48225
  SchemaComponentOptions,
@@ -48253,15 +48259,15 @@ const InternalListBlockProvider = (e) => {
48253
48259
  P(x({}, e), {
48254
48260
  pagination: !i || !((w = p.value) != null && w.length) || c <= ((O = p.value) == null ? void 0 : O.length) ? !1 : N,
48255
48261
  loading: t == null ? void 0 : t.loading,
48256
- children: (j = p.value) != null && j.length ? p.value.map((k, $) => /* @__PURE__ */ jsx(
48262
+ children: (j = p.value) != null && j.length ? p.value.map((k, M) => /* @__PURE__ */ jsx(
48257
48263
  NocoBaseRecursionField,
48258
48264
  {
48259
48265
  basePath: p.address,
48260
- name: $,
48266
+ name: M,
48261
48267
  onlyRenderProperties: !0,
48262
- schema: M ? transformMultiColumnToSingleColumn(S($)) : S($)
48268
+ schema: $ ? transformMultiColumnToSingleColumn(S(M)) : S(M)
48263
48269
  },
48264
- $
48270
+ M
48265
48271
  )) : null
48266
48272
  })
48267
48273
  )
@@ -48698,8 +48704,8 @@ const toValue$1 = (e, t) => e == null ? t : e, ReadPrettyRecordPicker = observer
48698
48704
  "a",
48699
48705
  {
48700
48706
  onClick: (N) => {
48701
- var M;
48702
- N.stopPropagation(), N.preventDefault(), l(!0), p(I), (M = C == null ? void 0 : C.current) == null || M.setPopoverVisible(!1);
48707
+ var $;
48708
+ N.stopPropagation(), N.preventDefault(), l(!0), p(I), ($ = C == null ? void 0 : C.current) == null || $.setPopoverVisible(!1);
48703
48709
  },
48704
48710
  children: B
48705
48711
  }
@@ -50117,7 +50123,7 @@ const TableActionColumnDesigner = (e) => {
50117
50123
  "sort-field"
50118
50124
  );
50119
50125
  }, TableBlockDesigner = () => {
50120
- var F, I, T, R, D, B, N, M, L, w, O, j;
50126
+ var F, I, T, R, D, B, N, $, L, w, O, j;
50121
50127
  const { name: e, title: t } = useCollection_deprecated(), { getCollectionField: o, getCollection: n } = useCollectionManager_deprecated(), r = useField(), a = useFieldSchema(), { form: i } = useFormBlockContext(), l = useSortFields(e), { service: c } = useTableBlockContext(), { t: u } = useTranslation(), { dn: d } = useDesignable();
50122
50128
  useBlockTemplateContext();
50123
50129
  const p = ((I = (F = a == null ? void 0 : a["x-decorator-props"]) == null ? void 0 : F.params) == null ? void 0 : I.sort) || [];
@@ -50131,8 +50137,8 @@ const TableActionColumnDesigner = (e) => {
50131
50137
  }), h = useSchemaTemplate(), g = useCollection_deprecated(), { dragSort: f, resource: C } = r.decoratorProps, b = C && o(C), S = C != null && C.includes(".") ? (B = n(b == null ? void 0 : b.target)) == null ? void 0 : B.tree : !!(g != null && g.tree), y = useCallback(
50132
50138
  ({ filter: k }) => {
50133
50139
  k = removeNullCondition(k);
50134
- const $ = r.decoratorProps.params || {};
50135
- $.filter = k, r.decoratorProps.params = $, a["x-decorator-props"].params = $, d.emit("patch", {
50140
+ const M = r.decoratorProps.params || {};
50141
+ M.filter = k, r.decoratorProps.params = M, a["x-decorator-props"].params = M, d.emit("patch", {
50136
50142
  schema: {
50137
50143
  "x-uid": a["x-uid"],
50138
50144
  "x-decorator-props": a["x-decorator-props"]
@@ -50154,12 +50160,12 @@ const TableActionColumnDesigner = (e) => {
50154
50160
  onChange: (k) => {
50155
50161
  var q;
50156
50162
  r.decoratorProps.treeTable = k, a["x-decorator-props"].treeTable = k;
50157
- const $ = P(x({}, (q = c.params) == null ? void 0 : q[0]), {
50163
+ const M = P(x({}, (q = c.params) == null ? void 0 : q[0]), {
50158
50164
  tree: k ? !0 : null
50159
50165
  });
50160
50166
  d.emit("patch", {
50161
50167
  schema: a
50162
- }), d.refresh(), c.run($);
50168
+ }), d.refresh(), c.run(M);
50163
50169
  }
50164
50170
  }
50165
50171
  ),
@@ -50203,7 +50209,7 @@ const TableActionColumnDesigner = (e) => {
50203
50209
  SchemaSettingsDataScope,
50204
50210
  {
50205
50211
  collectionName: e,
50206
- defaultFilter: ((L = (M = a == null ? void 0 : a["x-decorator-props"]) == null ? void 0 : M.params) == null ? void 0 : L.filter) || {},
50212
+ defaultFilter: ((L = ($ = a == null ? void 0 : a["x-decorator-props"]) == null ? void 0 : $.params) == null ? void 0 : L.filter) || {},
50207
50213
  form: i,
50208
50214
  onSubmit: y
50209
50215
  }
@@ -50285,13 +50291,13 @@ const TableActionColumnDesigner = (e) => {
50285
50291
  },
50286
50292
  onSubmit: ({ sort: k }) => {
50287
50293
  var E;
50288
- const $ = k.map((V) => V.direction === "desc" ? `-${V.field}` : V.field), q = r.decoratorProps.params || {};
50289
- q.sort = $, r.decoratorProps.params = q, a["x-decorator-props"].params = q, d.emit("patch", {
50294
+ const M = k.map((V) => V.direction === "desc" ? `-${V.field}` : V.field), q = r.decoratorProps.params || {};
50295
+ q.sort = M, r.decoratorProps.params = q, a["x-decorator-props"].params = q, d.emit("patch", {
50290
50296
  schema: {
50291
50297
  "x-uid": a["x-uid"],
50292
50298
  "x-decorator-props": a["x-decorator-props"]
50293
50299
  }
50294
- }), c.run(P(x({}, (E = c.params) == null ? void 0 : E[0]), { sort: $ }));
50300
+ }), c.run(P(x({}, (E = c.params) == null ? void 0 : E[0]), { sort: M }));
50295
50301
  }
50296
50302
  }
50297
50303
  ),
@@ -50311,8 +50317,8 @@ const TableActionColumnDesigner = (e) => {
50311
50317
  ],
50312
50318
  onChange: (k) => {
50313
50319
  var q;
50314
- const $ = r.decoratorProps.params || {};
50315
- $.pageSize = k, r.decoratorProps.params = $, a["x-decorator-props"].params = $, c.run(P(x({}, (q = c.params) == null ? void 0 : q[0]), { pageSize: k, page: 1 })), d.emit("patch", {
50320
+ const M = r.decoratorProps.params || {};
50321
+ M.pageSize = k, r.decoratorProps.params = M, a["x-decorator-props"].params = M, c.run(P(x({}, (q = c.params) == null ? void 0 : q[0]), { pageSize: k, page: 1 })), d.emit("patch", {
50316
50322
  schema: {
50317
50323
  "x-uid": a["x-uid"],
50318
50324
  "x-decorator-props": a["x-decorator-props"]
@@ -50332,14 +50338,14 @@ const TableActionColumnDesigner = (e) => {
50332
50338
  { label: u("Small"), value: "small" }
50333
50339
  ],
50334
50340
  onChange: (k) => {
50335
- const $ = a.reduceProperties((q, E) => {
50341
+ const M = a.reduceProperties((q, E) => {
50336
50342
  if (E["x-component"] === "TableV2")
50337
50343
  return E;
50338
50344
  }, null);
50339
- $["x-component-props"] = $["x-component-props"] || {}, $["x-component-props"].size = k, d.emit("patch", {
50345
+ M["x-component-props"] = M["x-component-props"] || {}, M["x-component-props"].size = k, d.emit("patch", {
50340
50346
  schema: {
50341
- "x-uid": $["x-uid"],
50342
- "x-decorator-props": $["x-component-props"]
50347
+ "x-uid": M["x-uid"],
50348
+ "x-decorator-props": M["x-component-props"]
50343
50349
  }
50344
50350
  });
50345
50351
  }
@@ -50374,7 +50380,7 @@ TableField.ActionBar = observer$1(
50374
50380
  { displayName: "TableField.ActionBar" }
50375
50381
  );
50376
50382
  const TableSelectorDesigner = () => {
50377
- var T, R, D, B, N, M;
50383
+ var T, R, D, B, N, $;
50378
50384
  const { name: e, title: t } = useCollection_deprecated(), { getCollectionJoinField: o, getAllCollectionsInheritChain: n } = useCollectionManager_deprecated(), r = useField(), a = useFieldSchema(), { form: i } = useFormBlockContext(), l = useSortFields(e), { service: c, extraFilter: u } = useTableSelectorContext(), { t: d } = useTranslation(), { dn: p } = useDesignable(), m = ((R = (T = a == null ? void 0 : a["x-decorator-props"]) == null ? void 0 : T.params) == null ? void 0 : R.sort) || [], h = recursiveParent(a, "CollectionField"), g = o(h == null ? void 0 : h["x-collection-field"]), f = m == null ? void 0 : m.map((L) => L.startsWith("-") ? {
50379
50385
  field: L.substring(1),
50380
50386
  direction: "desc"
@@ -50532,7 +50538,7 @@ const TableSelectorDesigner = () => {
50532
50538
  SchemaSettingsSelectItem,
50533
50539
  {
50534
50540
  title: d("Records per page"),
50535
- value: ((M = (N = r.decoratorProps) == null ? void 0 : N.params) == null ? void 0 : M.pageSize) || 20,
50541
+ value: (($ = (N = r.decoratorProps) == null ? void 0 : N.params) == null ? void 0 : $.pageSize) || 20,
50536
50542
  options: [
50537
50543
  { label: "5", value: 5 },
50538
50544
  { label: "10", value: 10 },
@@ -52343,11 +52349,11 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
52343
52349
  if (D && F) {
52344
52350
  const N = ((B = r(D)) == null ? void 0 : B.fields) || [];
52345
52351
  n(
52346
- N == null ? void 0 : N.filter((M) => supportTypes.includes(M.type)).map((M) => {
52352
+ N == null ? void 0 : N.filter(($) => supportTypes.includes($.type)).map(($) => {
52347
52353
  var L;
52348
52354
  return {
52349
- value: M.name,
52350
- label: g(((L = M.uiSchema) == null ? void 0 : L.title) || M.name)
52355
+ value: $.name,
52356
+ label: g(((L = $.uiSchema) == null ? void 0 : L.title) || $.name)
52351
52357
  };
52352
52358
  })
52353
52359
  );
@@ -52536,27 +52542,27 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
52536
52542
  const t = useRecord();
52537
52543
  return /* @__PURE__ */ jsx(AddFieldAction, x({ item: t }, e));
52538
52544
  }, AddFieldAction = (e) => {
52539
- var M, L;
52540
- const { scope: t, getContainer: o, item: n, children: r, trigger: a, align: i, database: l } = e, { getInterface: c, getTemplate: u, collections: d, getCollection: p } = useCollectionManager_deprecated(), [m, h] = useState(!1), [g, f] = useState(), [C, b] = useState({}), S = useCompile(), { t: y } = useTranslation(), { isDialect: v } = useDialect(), F = useFieldInterfaceOptions(), I = ((L = (M = p(n.name)) == null ? void 0 : M.options) == null ? void 0 : L.fields) || n.fields || [], T = useMemo(() => d.map((w) => ({
52545
+ var $, L;
52546
+ const { scope: t, getContainer: o, item: n, children: r, trigger: a, align: i, database: l } = e, { getInterface: c, getTemplate: u, collections: d, getCollection: p } = useCollectionManager_deprecated(), [m, h] = useState(!1), [g, f] = useState(), [C, b] = useState({}), S = useCompile(), { t: y } = useTranslation(), { isDialect: v } = useDialect(), F = useFieldInterfaceOptions(), I = ((L = ($ = p(n.name)) == null ? void 0 : $.options) == null ? void 0 : L.fields) || n.fields || [], T = useMemo(() => d.map((w) => ({
52541
52547
  label: S(w.title),
52542
52548
  value: w.name
52543
52549
  })), []), R = useCallback(() => {
52544
52550
  const { availableFieldInterfaces: w } = u(n.template) || {}, { exclude: O, include: j } = w || {}, k = [];
52545
- return F.forEach(($) => {
52551
+ return F.forEach((M) => {
52546
52552
  var q;
52547
- if ($.key === "systemInfo")
52548
- k.push(P(x({}, $), {
52549
- children: $.children.filter((E) => E.hidden ? !1 : E.value === "tableoid" ? j != null && j.length ? j.includes(E.value) : (l == null ? void 0 : l.dialect) === "postgres" : typeof n[E.value] == "boolean" ? n[E.value] : !0)
52553
+ if (M.key === "systemInfo")
52554
+ k.push(P(x({}, M), {
52555
+ children: M.children.filter((E) => E.hidden ? !1 : E.value === "tableoid" ? j != null && j.length ? j.includes(E.value) : (l == null ? void 0 : l.dialect) === "postgres" : typeof n[E.value] == "boolean" ? n[E.value] : !0)
52550
52556
  }));
52551
52557
  else {
52552
52558
  let E = [];
52553
52559
  j != null && j.length ? j.forEach((V) => {
52554
52560
  var U;
52555
- const G = (U = $ == null ? void 0 : $.children) == null ? void 0 : U.find((H) => [V, V.interface].includes(H.name));
52561
+ const G = (U = M == null ? void 0 : M.children) == null ? void 0 : U.find((H) => [V, V.interface].includes(H.name));
52556
52562
  G && E.push(P(x({}, G), {
52557
52563
  targetScope: V == null ? void 0 : V.targetScope
52558
52564
  }));
52559
- }) : O != null && O.length ? E = (q = $ == null ? void 0 : $.children) == null ? void 0 : q.filter((V) => !O.includes(V.name)) : E = $ == null ? void 0 : $.children, E != null && E.length && k.push(P(x({}, $), {
52565
+ }) : O != null && O.length ? E = (q = M == null ? void 0 : M.children) == null ? void 0 : q.filter((V) => !O.includes(V.name)) : E = M == null ? void 0 : M.children, E != null && E.length && k.push(P(x({}, M), {
52560
52566
  children: E
52561
52567
  }));
52562
52568
  }
@@ -52735,14 +52741,14 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
52735
52741
  "a",
52736
52742
  P(x({}, i), {
52737
52743
  onClick: () => z(void 0, null, function* () {
52738
- var N, M;
52744
+ var N, $;
52739
52745
  const { data: T } = yield g.resource("collections.fields", n.collectionName).get({
52740
52746
  filterByTk: n.name,
52741
52747
  appends: ["reverseField"]
52742
52748
  });
52743
52749
  S(T == null ? void 0 : T.data);
52744
52750
  const R = l(n.interface), D = cloneDeep(T == null ? void 0 : T.data) || {};
52745
- D != null && D.reverseField || (D.autoCreateReverseField = !1, D.reverseField = (N = R == null ? void 0 : R.default) == null ? void 0 : N.reverseField, set$1(D.reverseField, "name", `f_${uid()}`), set$1(D.reverseField, "uiSchema.title", (M = n.__parent) == null ? void 0 : M.title));
52751
+ D != null && D.reverseField || (D.autoCreateReverseField = !1, D.reverseField = (N = R == null ? void 0 : R.default) == null ? void 0 : N.reverseField, set$1(D.reverseField, "name", `f_${uid()}`), set$1(D.reverseField, "uiSchema.title", ($ = n.__parent) == null ? void 0 : $.title));
52746
52752
  const B = getSchema$7(R, D, n, C);
52747
52753
  h(B), p(!0);
52748
52754
  }),
@@ -52866,7 +52872,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
52866
52872
  });
52867
52873
  }
52868
52874
  };
52869
- }, M = useMemo(() => {
52875
+ }, $ = useMemo(() => {
52870
52876
  var L;
52871
52877
  return (n == null ? void 0 : n.fields) || ((L = d(n.collectionName)) == null ? void 0 : L.options.fields.filter((w) => ["string", "bigInt", "integer"].includes(w.type)).map((w) => {
52872
52878
  var O;
@@ -52919,7 +52925,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
52919
52925
  isOverride: !0,
52920
52926
  targetScope: { target: F(l), through: F(c) },
52921
52927
  collections: B,
52922
- scopeKeyOptions: M
52928
+ scopeKeyOptions: $
52923
52929
  }, t)
52924
52930
  }
52925
52931
  )
@@ -53356,7 +53362,7 @@ const getSchema$4 = (e, t, o) => {
53356
53362
  const w = [];
53357
53363
  g.forEach((O) => {
53358
53364
  var E;
53359
- const j = v(O), $ = T(O).map((V) => {
53365
+ const j = v(O), M = T(O).map((V) => {
53360
53366
  const G = R(V, O);
53361
53367
  return {
53362
53368
  type: "group",
@@ -53373,7 +53379,7 @@ const getSchema$4 = (e, t, o) => {
53373
53379
  }), q = (E = j.fields.filter((V) => !["obo", "oho", "m2m", "o2m"].includes(V == null ? void 0 : V.interface))) == null ? void 0 : E.map((V) => {
53374
53380
  var G;
53375
53381
  return { value: V.name, key: V.name, label: l(((G = V.uiSchema) == null ? void 0 : G.title) || V.name) };
53376
- }).concat($);
53382
+ }).concat(M);
53377
53383
  w.push({
53378
53384
  value: O,
53379
53385
  label: l(j.title || j.name),
@@ -53385,31 +53391,31 @@ const getSchema$4 = (e, t, o) => {
53385
53391
  var O, j;
53386
53392
  if (w) {
53387
53393
  u(!1), p([]);
53388
- const k = (j = Object.values((O = w == null ? void 0 : w.data) == null ? void 0 : O.fields)) == null ? void 0 : j.map(($) => {
53394
+ const k = (j = Object.values((O = w == null ? void 0 : w.data) == null ? void 0 : O.fields)) == null ? void 0 : j.map((M) => {
53389
53395
  var q, E;
53390
- if ($.source) {
53391
- const V = (a == null ? void 0 : a.data.find((G) => G.name === $.name)) || $;
53392
- return P(x({}, $), {
53396
+ if (M.source) {
53397
+ const V = (a == null ? void 0 : a.data.find((G) => G.name === M.name)) || M;
53398
+ return P(x({}, M), {
53393
53399
  uiSchema: P(x({}, omit(V.uiSchema, "rawTitle")), { title: ((q = V.uiSchema) == null ? void 0 : q.title) || V.name })
53394
53400
  });
53395
53401
  } else {
53396
- const V = (a == null ? void 0 : a.data.find((G) => G.name === $.name)) || $;
53402
+ const V = (a == null ? void 0 : a.data.find((G) => G.name === M.name)) || M;
53397
53403
  return P(x({}, V), {
53398
53404
  uiSchema: P(x({}, omit(V.uiSchema, "rawTitle")), { title: ((E = V.uiSchema) == null ? void 0 : E.title) || V.name })
53399
53405
  });
53400
53406
  }
53401
53407
  });
53402
53408
  S.value = k, setTimeout(() => {
53403
- var $, q, E;
53404
- p(k), y.setValuesIn("sources", ($ = w.data) == null ? void 0 : $.sources), f((q = w.data) == null ? void 0 : q.sources), b((E = w == null ? void 0 : w.data) == null ? void 0 : E.unsupportedFields);
53409
+ var M, q, E;
53410
+ p(k), y.setValuesIn("sources", (M = w.data) == null ? void 0 : M.sources), f((q = w.data) == null ? void 0 : q.sources), b((E = w == null ? void 0 : w.data) == null ? void 0 : E.unsupportedFields);
53405
53411
  });
53406
53412
  }
53407
53413
  }).catch);
53408
53414
  }, [t]);
53409
- const M = (w, O) => {
53415
+ const $ = (w, O) => {
53410
53416
  d.splice(O, 1, w), p(d), S.value = d.map((j) => {
53411
- var $, q, E;
53412
- const k = typeof j.source == "string" ? j.source : (E = (q = ($ = j.source) == null ? void 0 : $.filter) == null ? void 0 : q.call($, Boolean)) == null ? void 0 : E.join(".");
53417
+ var M, q, E;
53418
+ const k = typeof j.source == "string" ? j.source : (E = (q = (M = j.source) == null ? void 0 : M.filter) == null ? void 0 : q.call(M, Boolean)) == null ? void 0 : E.join(".");
53413
53419
  return P(x({}, j), {
53414
53420
  source: k
53415
53421
  });
@@ -53433,10 +53439,10 @@ const getSchema$4 = (e, t, o) => {
53433
53439
  allowClear: !0,
53434
53440
  style: { width: "100%" },
53435
53441
  options: D(m),
53436
- onChange: (k, $) => {
53442
+ onChange: (k, M) => {
53437
53443
  var E;
53438
53444
  const q = (E = I(k == null ? void 0 : k[0])) == null ? void 0 : E.find((V) => V.name === last(k));
53439
- M(P(x({}, O), { source: k, uiSchema: q == null ? void 0 : q.uiSchema }), j);
53445
+ $(P(x({}, O), { source: k, uiSchema: q == null ? void 0 : q.uiSchema }), j);
53440
53446
  },
53441
53447
  placeholder: l("Select field source")
53442
53448
  }
@@ -53455,8 +53461,8 @@ const getSchema$4 = (e, t, o) => {
53455
53461
  defaultValue: w,
53456
53462
  popupMatchSelectWidth: !1,
53457
53463
  style: { width: "100%" },
53458
- options: (k == null ? void 0 : k.possibleTypes.map(($) => ({ label: $, value: $ }))) || [],
53459
- onChange: ($) => M(P(x({}, k), { type: $ }), j)
53464
+ options: (k == null ? void 0 : k.possibleTypes.map((M) => ({ label: M, value: M }))) || [],
53465
+ onChange: (M) => $(P(x({}, k), { type: M }), j)
53460
53466
  }
53461
53467
  );
53462
53468
  }
@@ -53467,7 +53473,7 @@ const getSchema$4 = (e, t, o) => {
53467
53473
  key: "interface",
53468
53474
  width: 150,
53469
53475
  render: (w, O, j) => {
53470
- const k = d[j], $ = getInterfaceOptions(N, k.type);
53476
+ const k = d[j], M = getInterfaceOptions(N, k.type);
53471
53477
  return k.source ? w : /* @__PURE__ */ jsx(
53472
53478
  Select$1,
53473
53479
  {
@@ -53477,9 +53483,9 @@ const getSchema$4 = (e, t, o) => {
53477
53483
  onChange: (q) => {
53478
53484
  var V;
53479
53485
  const E = F(q);
53480
- M(P(x({}, k), { interface: q, uiSchema: (V = E == null ? void 0 : E.default) == null ? void 0 : V.uiSchema }), j);
53486
+ $(P(x({}, k), { interface: q, uiSchema: (V = E == null ? void 0 : E.default) == null ? void 0 : V.uiSchema }), j);
53481
53487
  },
53482
- children: $.map((q) => /* @__PURE__ */ jsx(Select$1.OptGroup, { label: D(q.label), children: q.children.map((E) => /* @__PURE__ */ jsx(Select$1.Option, { value: E.name, children: D(E.label) }, E.value)) }, q.key))
53488
+ children: M.map((q) => /* @__PURE__ */ jsx(Select$1.OptGroup, { label: D(q.label), children: q.children.map((E) => /* @__PURE__ */ jsx(Select$1.Option, { value: E.name, children: D(E.label) }, E.value)) }, q.key))
53483
53489
  }
53484
53490
  );
53485
53491
  }
@@ -53490,13 +53496,13 @@ const getSchema$4 = (e, t, o) => {
53490
53496
  key: "title",
53491
53497
  width: 180,
53492
53498
  render: (w, O, j) => {
53493
- var $;
53499
+ var M;
53494
53500
  const k = d[j];
53495
53501
  return /* @__PURE__ */ jsx(
53496
53502
  Input$3,
53497
53503
  {
53498
- defaultValue: (($ = k == null ? void 0 : k.uiSchema) == null ? void 0 : $.title) || w,
53499
- onChange: (q) => M(
53504
+ defaultValue: ((M = k == null ? void 0 : k.uiSchema) == null ? void 0 : M.title) || w,
53505
+ onChange: (q) => $(
53500
53506
  P(x({}, k), { uiSchema: P(x({}, omit(k == null ? void 0 : k.uiSchema, "rawTitle")), { title: q.target.value }) }),
53501
53507
  j
53502
53508
  )
@@ -53551,14 +53557,14 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
53551
53557
  }, S = (y) => {
53552
53558
  var v;
53553
53559
  return (v = y.filter((F) => F.source || F.interface)) == null ? void 0 : v.map((F) => {
53554
- var B, N, M, L, w, O;
53555
- const I = typeof (F == null ? void 0 : F.source) == "string" ? (B = F == null ? void 0 : F.source) == null ? void 0 : B.split(".") : F == null ? void 0 : F.source, T = (M = (N = h(I == null ? void 0 : I[0])) == null ? void 0 : N.find((j) => j.name === (I == null ? void 0 : I[1]))) == null ? void 0 : M.uiSchema, R = ((L = F == null ? void 0 : F.uiSchema) == null ? void 0 : L.title) || (T == null ? void 0 : T.title) || F.name, D = F.source ? T : (O = (w = m(F.interface)) == null ? void 0 : w.default) == null ? void 0 : O.uiSchema;
53560
+ var B, N, $, L, w, O;
53561
+ const I = typeof (F == null ? void 0 : F.source) == "string" ? (B = F == null ? void 0 : F.source) == null ? void 0 : B.split(".") : F == null ? void 0 : F.source, T = ($ = (N = h(I == null ? void 0 : I[0])) == null ? void 0 : N.find((j) => j.name === (I == null ? void 0 : I[1]))) == null ? void 0 : $.uiSchema, R = ((L = F == null ? void 0 : F.uiSchema) == null ? void 0 : L.title) || (T == null ? void 0 : T.title) || F.name, D = F.source ? T : (O = (w = m(F.interface)) == null ? void 0 : w.default) == null ? void 0 : O.uiSchema;
53556
53562
  return {
53557
53563
  title: u(R),
53558
53564
  dataIndex: F.name,
53559
53565
  key: F.name,
53560
53566
  width: 200,
53561
- render: (j, k, $) => {
53567
+ render: (j, k, M) => {
53562
53568
  const q = k[F.name], E = {
53563
53569
  type: "object",
53564
53570
  properties: {
@@ -53571,7 +53577,7 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
53571
53577
  }
53572
53578
  }
53573
53579
  };
53574
- return /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: /* @__PURE__ */ jsx(RecursionField, { schema: E, name: $, onlyRenderProperties: !0 }) });
53580
+ return /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: /* @__PURE__ */ jsx(RecursionField, { schema: E, name: M, onlyRenderProperties: !0 }) });
53575
53581
  }
53576
53582
  };
53577
53583
  });
@@ -53802,9 +53808,9 @@ const AsyncDataProvider = (e) => {
53802
53808
  if (useEffect(() => {
53803
53809
  var B;
53804
53810
  const R = /* @__PURE__ */ new Map();
53805
- a || (i && i.length ? Object.entries((i == null ? void 0 : i[0]) || {}).forEach(([N, M]) => {
53811
+ a || (i && i.length ? Object.entries((i == null ? void 0 : i[0]) || {}).forEach(([N, $]) => {
53806
53812
  var k;
53807
- const L = l[N], w = inferInterface(N, M), O = (k = C.current(w)) == null ? void 0 : k.default, j = (L == null ? void 0 : L.uiSchema) || (O == null ? void 0 : O.uiSchema) || {};
53813
+ const L = l[N], w = inferInterface(N, $), O = (k = C.current(w)) == null ? void 0 : k.default, j = (L == null ? void 0 : L.uiSchema) || (O == null ? void 0 : O.uiSchema) || {};
53808
53814
  R.set(N, {
53809
53815
  name: N,
53810
53816
  interface: (L == null ? void 0 : L.interface) || w,
@@ -53815,13 +53821,13 @@ const AsyncDataProvider = (e) => {
53815
53821
  }, j)
53816
53822
  });
53817
53823
  }) : Object.entries(l || {}).forEach(
53818
- ([N, M]) => R.set(N, P(x({
53824
+ ([N, $]) => R.set(N, P(x({
53819
53825
  name: N,
53820
53826
  type: "string"
53821
- }, M), {
53827
+ }, $), {
53822
53828
  uiSchema: x({
53823
53829
  title: N
53824
- }, (M == null ? void 0 : M.uiSchema) || {})
53830
+ }, ($ == null ? void 0 : $.uiSchema) || {})
53825
53831
  }))
53826
53832
  )), (B = c.value) != null && B.length && c.value.forEach((N) => {
53827
53833
  R.has(N.name) && R.set(N.name, N);
@@ -53842,9 +53848,9 @@ const AsyncDataProvider = (e) => {
53842
53848
  const B = [...t];
53843
53849
  B.splice(D, 1, R), o(B), c.setValue(
53844
53850
  B.map((N) => {
53845
- var M, L, w;
53851
+ var $, L, w;
53846
53852
  return P(x({}, N), {
53847
- source: typeof N.source == "string" ? N.source : ((w = (L = (M = N.source) == null ? void 0 : M.filter) == null ? void 0 : L.call(M, Boolean)) == null ? void 0 : w.join(".")) || null
53853
+ source: typeof N.source == "string" ? N.source : ((w = (L = ($ = N.source) == null ? void 0 : $.filter) == null ? void 0 : L.call($, Boolean)) == null ? void 0 : w.join(".")) || null
53848
53854
  });
53849
53855
  })
53850
53856
  );
@@ -53869,11 +53875,11 @@ const AsyncDataProvider = (e) => {
53869
53875
  allowClear: !0,
53870
53876
  options: d(f),
53871
53877
  placeholder: e("Select field source"),
53872
- onChange: (M) => {
53873
- let L = l[M == null ? void 0 : M[1]];
53874
- L != null && L.interface || (L = m((M == null ? void 0 : M.join(".")) || "")), S(
53878
+ onChange: ($) => {
53879
+ let L = l[$ == null ? void 0 : $[1]];
53880
+ L != null && L.interface || (L = m(($ == null ? void 0 : $.join(".")) || "")), S(
53875
53881
  P(x({}, N), {
53876
- source: M,
53882
+ source: $,
53877
53883
  interface: L == null ? void 0 : L.interface,
53878
53884
  type: L == null ? void 0 : L.type,
53879
53885
  uiSchema: L == null ? void 0 : L.uiSchema
@@ -53891,22 +53897,22 @@ const AsyncDataProvider = (e) => {
53891
53897
  key: "interface",
53892
53898
  width: 150,
53893
53899
  render: (R, D, B) => {
53894
- var M;
53900
+ var $;
53895
53901
  const N = t[B];
53896
- return N.source ? /* @__PURE__ */ jsx(Tag, { children: d((M = p(R)) == null ? void 0 : M.title) || R }) : /* @__PURE__ */ jsx(
53902
+ return N.source ? /* @__PURE__ */ jsx(Tag, { children: d(($ = p(R)) == null ? void 0 : $.title) || R }) : /* @__PURE__ */ jsx(
53897
53903
  Select$1,
53898
53904
  {
53899
53905
  defaultValue: N.interface || "input",
53900
53906
  style: { width: "100%" },
53901
53907
  popupMatchSelectWidth: !1,
53902
53908
  onChange: (L) => {
53903
- var O, j, k, $, q;
53909
+ var O, j, k, M, q;
53904
53910
  const w = p(L);
53905
53911
  S(
53906
53912
  P(x({}, N), {
53907
53913
  interface: L || null,
53908
53914
  uiSchema: P(x({}, (O = w == null ? void 0 : w.default) == null ? void 0 : O.uiSchema), {
53909
- title: ((k = (j = w == null ? void 0 : w.default) == null ? void 0 : j.uiSchema) == null ? void 0 : k.title) || (($ = N.uiSchema) == null ? void 0 : $.title)
53915
+ title: ((k = (j = w == null ? void 0 : w.default) == null ? void 0 : j.uiSchema) == null ? void 0 : k.title) || ((M = N.uiSchema) == null ? void 0 : M.title)
53910
53916
  }),
53911
53917
  type: (q = w == null ? void 0 : w.default) == null ? void 0 : q.type
53912
53918
  }),
@@ -53925,12 +53931,12 @@ const AsyncDataProvider = (e) => {
53925
53931
  key: "title",
53926
53932
  width: 180,
53927
53933
  render: (R, D, B) => {
53928
- var M, L;
53934
+ var $, L;
53929
53935
  const N = t[B];
53930
53936
  return /* @__PURE__ */ jsx(
53931
53937
  Input$3,
53932
53938
  {
53933
- value: ((M = N.uiSchema) == null ? void 0 : M.title) || R,
53939
+ value: (($ = N.uiSchema) == null ? void 0 : $.title) || R,
53934
53940
  defaultValue: ((L = N.uiSchema) == null ? void 0 : L.title) !== void 0 ? N.uiSchema.title : N == null ? void 0 : N.name,
53935
53941
  onChange: (w) => S(P(x({}, N), { uiSchema: P(x({}, N == null ? void 0 : N.uiSchema), { title: w.target.value }) }), B)
53936
53942
  }
@@ -58195,7 +58201,7 @@ class ViewCollectionTemplate extends CollectionTemplate {
58195
58201
  when: "{{isPG}}",
58196
58202
  fulfill: {
58197
58203
  state: {
58198
- value: "{{$deps[0].split('@')?.[0]}}"
58204
+ value: "{{$deps[0] && $deps[0].split('@')?.[0]}}"
58199
58205
  }
58200
58206
  },
58201
58207
  otherwise: {
@@ -58213,12 +58219,12 @@ class ViewCollectionTemplate extends CollectionTemplate {
58213
58219
  when: "{{isPG}}",
58214
58220
  fulfill: {
58215
58221
  state: {
58216
- value: "{{$deps[0].split('@')?.[1]}}"
58222
+ value: "{{$deps[0] && $deps[0].split('@')?.[1]}}"
58217
58223
  }
58218
58224
  },
58219
58225
  otherwise: {
58220
58226
  state: {
58221
- value: "{{$deps[0]}}"
58227
+ value: "{{$deps[0] || null}}"
58222
58228
  }
58223
58229
  }
58224
58230
  }
@@ -59944,8 +59950,8 @@ const RolesResourcesActions = connect((e) => {
59944
59950
  name: I.name
59945
59951
  }, N = B.fields || [];
59946
59952
  if (R) {
59947
- const M = N.indexOf(D.name);
59948
- N.splice(M, 1);
59953
+ const $ = N.indexOf(D.name);
59954
+ N.splice($, 1);
59949
59955
  } else
59950
59956
  N.push(D.name);
59951
59957
  B.fields = N, p[I.name] = B, t(Object.values(p));
@@ -62437,16 +62443,16 @@ const ActionInitializerItem = (e) => {
62437
62443
  ), I = C || (a == null ? void 0 : a.targetKey) || "id", T = b || ((U = (G = i["x-component-props"]) == null ? void 0 : G.fieldNames) == null ? void 0 : U.label) || I, R = {
62438
62444
  title: T || I,
62439
62445
  key: I
62440
- }, [D, B] = useState([]), [N, M] = useState(i.default || []), [L, w] = useState(!0), O = useLabelUiSchema(a, (R == null ? void 0 : R.title) || "label");
62446
+ }, [D, B] = useState([]), [N, $] = useState(i.default || []), [L, w] = useState(!0), O = useLabelUiSchema(a, (R == null ? void 0 : R.title) || "label");
62441
62447
  if (useEffect(() => {
62442
- i.default && (d(i.default), M(i.default));
62448
+ i.default && (d(i.default), $(i.default));
62443
62449
  }, [i.default, d]), !a)
62444
62450
  return null;
62445
62451
  const j = (J) => {
62446
62452
  B(J), w(!1);
62447
62453
  }, k = (J) => {
62448
- M(J), d(J), p == null || p(J);
62449
- }, $ = (J) => {
62454
+ $(J), d(J), p == null || p(J);
62455
+ }, M = (J) => {
62450
62456
  var X;
62451
62457
  const K = (X = h == null ? void 0 : h[0]) == null ? void 0 : X.filter;
62452
62458
  (y || K) && g(P(x({}, h == null ? void 0 : h[0]), {
@@ -62490,7 +62496,7 @@ const ActionInitializerItem = (e) => {
62490
62496
  style: {
62491
62497
  flex: "0 0 auto"
62492
62498
  },
62493
- children: y ? /* @__PURE__ */ jsx(CloseOutlined, { className: "CloseOutlined", onClick: $ }) : /* @__PURE__ */ jsx(SearchOutlined, { className: "SearchOutlined", onClick: $ })
62499
+ children: y ? /* @__PURE__ */ jsx(CloseOutlined, { className: "CloseOutlined", onClick: M }) : /* @__PURE__ */ jsx(SearchOutlined, { className: "SearchOutlined", onClick: M })
62494
62500
  }
62495
62501
  )
62496
62502
  ]
@@ -62901,7 +62907,7 @@ function useMenuSearch({
62901
62907
  })) : g, [e, c, u, g]);
62902
62908
  }
62903
62909
  const DataBlockInitializer = (e) => {
62904
- var k, $;
62910
+ var k, M;
62905
62911
  const {
62906
62912
  templateWrap: t,
62907
62913
  onCreateBlockSchema: o,
@@ -62965,7 +62971,7 @@ const DataBlockInitializer = (e) => {
62965
62971
  onClick: D,
62966
62972
  currentText: b,
62967
62973
  otherText: S
62968
- }), N = useGetSchemaInitializerMenuItems(D), M = useMemo(() => N(B, a), [N, B, a]), [L, w] = useState([]), O = useMenuSearch({ data: M, openKeys: L, hideSearch: u }), j = useMemo(() => {
62974
+ }), N = useGetSchemaInitializerMenuItems(D), $ = useMemo(() => N(B, a), [N, B, a]), [L, w] = useState([]), O = useMenuSearch({ data: $, openKeys: L, hideSearch: u }), j = useMemo(() => {
62969
62975
  let q = O.filter((E) => E.key !== "search" && E.key !== "empty");
62970
62976
  return p && q.length === 1 ? q = q[0].children : q = O, [
62971
62977
  {
@@ -62979,7 +62985,7 @@ const DataBlockInitializer = (e) => {
62979
62985
  }
62980
62986
  ];
62981
62987
  }, [O, p, a, I, i, r, D, e]);
62982
- return M.length > 1 || M.length === 1 && (($ = (k = M[0]) == null ? void 0 : k.children) == null ? void 0 : $.length) > 0 || y ? /* @__PURE__ */ jsx(
62988
+ return $.length > 1 || $.length === 1 && ((M = (k = $[0]) == null ? void 0 : k.children) == null ? void 0 : M.length) > 0 || y ? /* @__PURE__ */ jsx(
62983
62989
  SchemaInitializerMenu,
62984
62990
  {
62985
62991
  onOpenChange: (q) => {