@nocobase/client 1.7.0-beta.21 → 1.7.0-beta.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/index.mjs CHANGED
@@ -205,6 +205,9 @@ const bp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
205
205
  get getPageSchema() {
206
206
  return getPageSchema;
207
207
  },
208
+ get interpolateVariables() {
209
+ return interpolateVariables;
210
+ },
208
211
  get navigateWithinSelf() {
209
212
  return navigateWithinSelf;
210
213
  },
@@ -3028,6 +3031,9 @@ const bp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3028
3031
  get interfacesProperties() {
3029
3032
  return index;
3030
3033
  },
3034
+ get interpolateVariables() {
3035
+ return interpolateVariables;
3036
+ },
3031
3037
  get isAssocField() {
3032
3038
  return isAssocField;
3033
3039
  },
@@ -3166,6 +3172,9 @@ const bp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3166
3172
  get replaceVariableValue() {
3167
3173
  return replaceVariableValue;
3168
3174
  },
3175
+ get replaceVariables() {
3176
+ return replaceVariables;
3177
+ },
3169
3178
  get requestParentRecordData() {
3170
3179
  return requestParentRecordData;
3171
3180
  },
@@ -6121,24 +6130,24 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
6121
6130
  const D = {
6122
6131
  type: "duplicate",
6123
6132
  tag: c(($ = R.uiSchema) == null ? void 0 : $.title) || R.name
6124
- }, L = P(x({}, D), {
6133
+ }, O = P(x({}, D), {
6125
6134
  role: "button",
6126
6135
  title: React.createElement(TreeNode, P(x({}, D), { displayType: t })),
6127
6136
  key: T ? `${T}.${R.name}` : R.name,
6128
6137
  isLeaf: !0,
6129
6138
  field: R
6130
6139
  });
6131
- return ["belongsTo", "belongsToMany"].includes(R.type) ? (D.type = "reference", L.type = "reference", L.title = React.createElement(TreeNode, P(x({}, D), { type: "reference", displayType: t })), L.isLeaf = !1, L.children = m(R.target, {
6140
+ return ["belongsTo", "belongsToMany"].includes(R.type) ? (D.type = "reference", O.type = "reference", O.title = React.createElement(TreeNode, P(x({}, D), { type: "reference", displayType: t })), O.isLeaf = !1, O.children = m(R.target, {
6132
6141
  depth: F + 1,
6133
6142
  maxDepth: I,
6134
- prefix: L.key,
6143
+ prefix: O.key,
6135
6144
  exclude: systemKeys
6136
- })) : ["hasOne", "hasMany"].includes(R.type) && (L.isLeaf = !1, L.children = p(R.target, {
6145
+ })) : ["hasOne", "hasMany"].includes(R.type) && (O.isLeaf = !1, O.children = p(R.target, {
6137
6146
  depth: F + 1,
6138
6147
  maxDepth: I,
6139
- prefix: L.key,
6148
+ prefix: O.key,
6140
6149
  exclude: ["id", ...systemKeys]
6141
- })), L;
6150
+ })), O;
6142
6151
  }).filter(Boolean), m = (y, { prefix: v, maxDepth: F, depth: I = 0, exclude: T = [] }) => I > F ? [] : n(y).map((R) => {
6143
6152
  var $;
6144
6153
  if (!R.target || !R.interface || T.includes(R.name))
@@ -6146,15 +6155,15 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
6146
6155
  const D = {
6147
6156
  type: "preloading",
6148
6157
  tag: c(($ = R.uiSchema) == null ? void 0 : $.title) || R.name
6149
- }, L = v ? `${v}.${R.name}` : R.name;
6158
+ }, O = v ? `${v}.${R.name}` : R.name;
6150
6159
  return {
6151
6160
  role: "button",
6152
6161
  title: React.createElement(TreeNode, P(x({}, D), { displayType: t })),
6153
- key: L,
6162
+ key: O,
6154
6163
  isLeaf: !1,
6155
6164
  field: R,
6156
6165
  children: m(R.target, {
6157
- prefix: L,
6166
+ prefix: O,
6158
6167
  depth: I + 1,
6159
6168
  maxDepth: F,
6160
6169
  exclude: T
@@ -6173,8 +6182,8 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
6173
6182
  return h(F || T.treeData);
6174
6183
  try {
6175
6184
  return p(y, { exclude: ["id", ...systemKeys], maxDepth: 1 });
6176
- } catch (L) {
6177
- return console.error(L), [];
6185
+ } catch (O) {
6186
+ return console.error(O), [];
6178
6187
  }
6179
6188
  }, []), f = useCallback((y) => (v) => new Promise((F) => {
6180
6189
  if (v.children.length)
@@ -6192,15 +6201,15 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
6192
6201
  getOnCheck: C,
6193
6202
  getScopeDataSource: (y) => {
6194
6203
  const v = n(y), F = (R, D) => {
6195
- var O, M;
6204
+ var L, M;
6196
6205
  if (!R.interface)
6197
6206
  return;
6198
- const L = i(R.interface);
6199
- if (!(L != null && L.filterable))
6207
+ const O = i(R.interface);
6208
+ if (!(O != null && O.filterable))
6200
6209
  return;
6201
- const { nested: $, children: B, operators: N } = L.filterable, w = {
6210
+ const { nested: $, children: B, operators: N } = O.filterable, w = {
6202
6211
  name: R.name,
6203
- title: ((O = R == null ? void 0 : R.uiSchema) == null ? void 0 : O.title) || R.name,
6212
+ title: ((L = R == null ? void 0 : R.uiSchema) == null ? void 0 : L.title) || R.name,
6204
6213
  schema: R == null ? void 0 : R.uiSchema,
6205
6214
  operators: ((M = N == null ? void 0 : N.filter) == null ? void 0 : M.call(N, (k) => !(k != null && k.visible) || k.visible(R))) || [],
6206
6215
  interface: R.interface
@@ -6215,11 +6224,11 @@ const HEADERS_DATA_SOURCE_KEY = "x-data-source", isTitleField = (e, t) => {
6215
6224
  return w;
6216
6225
  }
6217
6226
  }, I = (R, D) => {
6218
- const L = [];
6227
+ const O = [];
6219
6228
  return R.forEach(($) => {
6220
6229
  const B = F($, D);
6221
- B && L.push(B);
6222
- }), L;
6230
+ B && O.push(B);
6231
+ }), O;
6223
6232
  };
6224
6233
  return I(v, 1);
6225
6234
  },
@@ -7568,8 +7577,8 @@ const collectFieldStateOfLinkageRules = ({
7568
7577
  action: l,
7569
7578
  conditionType: c
7570
7579
  }, u) => {
7571
- var S, y, v, F, I, T, R, D, L, $, B, N, w, O;
7572
- 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 = ((L = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : L.dataSource) || [($ = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : $.dataSource], { evaluate: f } = evaluators.get("formula.js"), C = {
7580
+ var S, y, v, F, I, T, R, D, O, $, B, N, w, L;
7581
+ 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 = ((O = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : O.dataSource) || [($ = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : $.dataSource], { evaluate: f } = evaluators.get("formula.js"), C = {
7573
7582
  ruleGroup: n,
7574
7583
  variables: r,
7575
7584
  localVariables: a,
@@ -7627,7 +7636,7 @@ const collectFieldStateOfLinkageRules = ({
7627
7636
  break;
7628
7637
  case ActionType.Options:
7629
7638
  {
7630
- const M = (O = (w = o.data) == null ? void 0 : w.dataSource) == null ? void 0 : O.filter((k) => t.value.includes(k.value));
7639
+ const M = (L = (w = o.data) == null ? void 0 : w.dataSource) == null ? void 0 : L.filter((k) => t.value.includes(k.value));
7631
7640
  g.push(getTempFieldState(conditionAnalyses(C, u), M || [])), o.stateOfLinkageRules = P(x({}, o.stateOfLinkageRules), {
7632
7641
  dataSource: g
7633
7642
  });
@@ -8776,11 +8785,11 @@ function withInitializer(e) {
8776
8785
  style: C,
8777
8786
  componentProps: b
8778
8787
  } = o, S = l ? l() : i, y = c(u), v = useCallback(
8779
- (O) => {
8780
- S ? S(y(O, { isInSubTable: a })) : r(d, y(O, { isInSubTable: a }), { onSuccess: p });
8788
+ (L) => {
8789
+ S ? S(y(L, { isInSubTable: a })) : r(d, y(L, { isInSubTable: a }), { onSuccess: p });
8781
8790
  },
8782
8791
  [S, y, a, r, d, p]
8783
- ), { wrapSSR: F, hashId: I, componentCls: T } = useSchemaInitializerStyles(), [R, D] = useState(!1), { token: L } = theme.useToken(), $ = useNiceDropdownMaxHeight([R]), B = useMemo(
8792
+ ), { wrapSSR: F, hashId: I, componentCls: T } = useSchemaInitializerStyles(), [R, D] = useState(!1), { token: O } = theme.useToken(), $ = useNiceDropdownMaxHeight([R]), B = useMemo(
8784
8793
  () => x({
8785
8794
  options: o,
8786
8795
  style: C
@@ -8788,7 +8797,7 @@ function withInitializer(e) {
8788
8797
  [b, o, C]
8789
8798
  ), N = useMemo(() => css`
8790
8799
  .ant-popover-inner {
8791
- padding: ${`${L.paddingXXS}px 0`};
8800
+ padding: ${`${O.paddingXXS}px 0`};
8792
8801
  .ant-menu-submenu-title {
8793
8802
  margin-block: 0;
8794
8803
  }
@@ -8796,7 +8805,7 @@ function withInitializer(e) {
8796
8805
  padding: 0;
8797
8806
  }
8798
8807
  }
8799
- `, [L.paddingXXS]), w = useMemo(
8808
+ `, [O.paddingXXS]), w = useMemo(
8800
8809
  () => ({
8801
8810
  maxHeight: $,
8802
8811
  overflowY: "auto"
@@ -8828,10 +8837,10 @@ function withInitializer(e) {
8828
8837
  theme: {
8829
8838
  components: {
8830
8839
  Menu: {
8831
- itemHeight: L.marginXL,
8832
- borderRadius: L.borderRadiusSM,
8833
- itemBorderRadius: L.borderRadiusSM,
8834
- subMenuItemBorderRadius: L.borderRadiusSM
8840
+ itemHeight: O.marginXL,
8841
+ borderRadius: O.borderRadiusSM,
8842
+ itemBorderRadius: O.borderRadiusSM,
8843
+ subMenuItemBorderRadius: O.borderRadiusSM
8835
8844
  }
8836
8845
  }
8837
8846
  },
@@ -9197,7 +9206,7 @@ function addAppVersion(e, t) {
9197
9206
  addAppVersion((n = e.properties) == null ? void 0 : n[o], t);
9198
9207
  }), e;
9199
9208
  }
9200
- const name = "@nocobase/client", version = "1.7.0-beta.21", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
9209
+ const name = "@nocobase/client", version = "1.7.0-beta.23", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
9201
9210
  "@ahooksjs/use-url-state": "3.5.1",
9202
9211
  "@ant-design/cssinjs": "^1.11.1",
9203
9212
  "@ant-design/icons": "^5.6.1",
@@ -9219,9 +9228,9 @@ const name = "@nocobase/client", version = "1.7.0-beta.21", license = "AGPL-3.0"
9219
9228
  "@formily/reactive-react": "^2.2.27",
9220
9229
  "@formily/shared": "^2.2.27",
9221
9230
  "@formily/validator": "^2.2.27",
9222
- "@nocobase/evaluators": "1.7.0-beta.21",
9223
- "@nocobase/sdk": "1.7.0-beta.21",
9224
- "@nocobase/utils": "1.7.0-beta.21",
9231
+ "@nocobase/evaluators": "1.7.0-beta.23",
9232
+ "@nocobase/sdk": "1.7.0-beta.23",
9233
+ "@nocobase/utils": "1.7.0-beta.23",
9225
9234
  ahooks: "^3.7.2",
9226
9235
  antd: "5.24.2",
9227
9236
  "antd-style": "3.7.1",
@@ -10246,12 +10255,12 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: o, filterProper
10246
10255
  }
10247
10256
  `, [n.paddingContentVerticalLG, n.marginSM, n.margin]), b = useCollection(), S = useMemo(() => withTooltipComponent(NocoBaseRecursionField), []), y = useMemo(
10248
10257
  () => d == null ? void 0 : d.map((F) => {
10249
- var B, N, w, O;
10258
+ var B, N, w, L;
10250
10259
  const I = F.reduceProperties((M, k) => {
10251
10260
  if (isCollectionFieldComponent(k))
10252
10261
  return M.concat([k]);
10253
- }, []), T = (I == null ? void 0 : I.length) > 0 ? I[0].name : F.name, R = !!((B = F["x-component-props"]) != null && B.columnHidden), { uiSchema: D, defaultValue: L, interface: $ } = (b == null ? void 0 : b.getField(T)) || {};
10254
- return F.title = o(F == null ? void 0 : F.title, { ns: NAMESPACE_UI_SCHEMA }), D && (D.default = L), P(x({
10262
+ }, []), T = (I == null ? void 0 : I.length) > 0 ? I[0].name : F.name, R = !!((B = F["x-component-props"]) != null && B.columnHidden), { uiSchema: D, defaultValue: O, interface: $ } = (b == null ? void 0 : b.getField(T)) || {};
10263
+ return F.title = o(F == null ? void 0 : F.title, { ns: NAMESPACE_UI_SCHEMA }), D && (D.default = O), P(x({
10255
10264
  title: /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: g, children: /* @__PURE__ */ jsx(
10256
10265
  S,
10257
10266
  {
@@ -10267,7 +10276,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: o, filterProper
10267
10276
  sorter: (w = F["x-component-props"]) == null ? void 0 : w.sorter,
10268
10277
  columnHidden: R
10269
10278
  }, F["x-component-props"]), {
10270
- width: R && !l ? 0 : ((O = F["x-component-props"]) == null ? void 0 : O.width) || 100,
10279
+ width: R && !l ? 0 : ((L = F["x-component-props"]) == null ? void 0 : L.width) || 100,
10271
10280
  render: (M, k, j) => /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: g, children: /* @__PURE__ */ jsx(
10272
10281
  TableCellRender,
10273
10282
  {
@@ -10327,11 +10336,11 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: o, filterProper
10327
10336
  "div",
10328
10337
  {
10329
10338
  onClick: () => action(() => {
10330
- const D = (p - 1) * m + R, L = r.value[D] ? 1 : 2;
10339
+ const D = (p - 1) * m + R, O = r.value[D] ? 1 : 2;
10331
10340
  return spliceArrayState(r, {
10332
10341
  startIndex: D,
10333
- deleteCount: L
10334
- }), r.value.splice(D, L), r.setInitialValue([...r.value]), r.onInput(r.value);
10342
+ deleteCount: O
10343
+ }), r.value.splice(D, O), r.setInitialValue([...r.value]), r.onInput(r.value);
10335
10344
  }),
10336
10345
  children: /* @__PURE__ */ jsx(CloseOutlined, { style: { cursor: "pointer", color: "gray" } })
10337
10346
  }
@@ -10406,7 +10415,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: o, filterProper
10406
10415
  display: none !important;
10407
10416
  }
10408
10417
  `,
10409
- itemRender: (D, L, $) => L === "prev" ? /* @__PURE__ */ jsxs(
10418
+ itemRender: (D, O, $) => O === "prev" ? /* @__PURE__ */ jsxs(
10410
10419
  "div",
10411
10420
  {
10412
10421
  style: { display: "flex" },
@@ -10647,8 +10656,8 @@ const Table$2 = withDynamicSchemaProps(
10647
10656
  "loading",
10648
10657
  "onClickRow",
10649
10658
  "value"
10650
- ]), 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: L, enableIndexÏColumn: $ } = R, B = useMemoizedFn(S.onRowDragEnd || (() => {
10651
- })), N = usePaginationProps$3(o, a, e), w = useTableColumns$2(S, N), [O, M] = useState(() => D ? L : []), [k, j] = useState(((Se = y == null ? void 0 : y.data) == null ? void 0 : Se.selectedRowKeys) || []), [z, E] = useState([]), V = (p == null ? void 0 : p.type) !== "none", U = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
10659
+ ]), 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: O, enableIndexÏColumn: $ } = R, B = useMemoizedFn(S.onRowDragEnd || (() => {
10660
+ })), N = usePaginationProps$3(o, a, e), w = useTableColumns$2(S, N), [L, M] = useState(() => D ? O : []), [k, j] = useState(((Se = y == null ? void 0 : y.data) == null ? void 0 : Se.selectedRowKeys) || []), [z, E] = useState([]), V = (p == null ? void 0 : p.type) !== "none", U = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
10652
10661
  & > td {
10653
10662
  background-color: ${t.controlItemBgActive} !important;
10654
10663
  }
@@ -10673,9 +10682,9 @@ const Table$2 = withDynamicSchemaProps(
10673
10682
  record: Z
10674
10683
  }), [C, z]);
10675
10684
  useDeepCompareEffect(() => {
10676
- const Z = D ? L : [];
10677
- _.isEqual(Z, O) || M(Z);
10678
- }, [D, L]);
10685
+ const Z = D ? O : [];
10686
+ _.isEqual(Z, L) || M(Z);
10687
+ }, [D, O]);
10679
10688
  const W = useCallback((Z) => {
10680
10689
  if (m)
10681
10690
  return X(Z);
@@ -10803,14 +10812,14 @@ const Table$2 = withDynamicSchemaProps(
10803
10812
  [z, K, JSON.stringify(m)]
10804
10813
  ), me = useCallback(
10805
10814
  (Z, ne) => {
10806
- const re = Z ? [...O, ne[I.getPrimaryKey()]] : O.filter((ae) => ne[I.getPrimaryKey()] !== ae);
10815
+ const re = Z ? [...L, ne[I.getPrimaryKey()]] : L.filter((ae) => ne[I.getPrimaryKey()] !== ae);
10807
10816
  M(re), g == null || g(Z, ne);
10808
10817
  },
10809
- [O, g, I]
10818
+ [L, g, I]
10810
10819
  ), he = useMemo(() => ({
10811
10820
  onExpand: me,
10812
- expandedRowKeys: O
10813
- }), [O, me]);
10821
+ expandedRowKeys: L
10822
+ }), [L, me]);
10814
10823
  return (
10815
10824
  // If spinning is set to undefined, it will cause the subtable to always display loading, so we need to convert it here.
10816
10825
  // We use Spin here instead of Table's loading prop because using Spin here reduces unnecessary re-renders.
@@ -11405,14 +11414,14 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
11405
11414
  }, usePopupUtils = (e = {}) => {
11406
11415
  const t = useNavigateNoUpdate(), o = useLocationNoUpdate(), n = useFieldSchema(), r = useDataSourceKey(), a = useCollectionRecord(), i = useCollectionParentRecord(), l = useCollection(), c = useCollectionManager(), u = useAssociationName(), { visible: d, setVisible: p } = useContext(PopupVisibleProviderContext) || { visible: !1, setVisible: _.noop }, { params: m, currentLevel: h = 0 } = useCurrentPopupContext(), { getDataBlockRequest: g } = useDataBlockRequestGetter(), { isPopupVisibleControlledByURL: f } = usePopupSettings(), { setVisible: C } = useContext(ActionContext), { updatePopupContext: b } = usePopupContextInActionOrAssociationField(), S = useCurrentPopupContext(), y = useCallback(
11407
11416
  (w) => {
11408
- var O;
11409
- return (O = w || (i == null ? void 0 : i.data)) == null ? void 0 : O[c.getSourceKeyByAssociation(u)];
11417
+ var L;
11418
+ return (L = w || (i == null ? void 0 : i.data)) == null ? void 0 : L[c.getSourceKeyByAssociation(u)];
11410
11419
  },
11411
11420
  [i, u]
11412
11421
  ), v = useDataBlockRequestData(), F = useTableBlockContextBasicValue() || {}, I = e.setVisible || C, T = useCallback(
11413
11422
  ({
11414
11423
  tabKey: w,
11415
- popupUid: O,
11424
+ popupUid: L,
11416
11425
  recordData: M,
11417
11426
  sourceId: k,
11418
11427
  collection: j,
@@ -11420,7 +11429,7 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
11420
11429
  }) => {
11421
11430
  const E = c.getFilterByTK(u || l, M);
11422
11431
  return getPopupPathFromParams({
11423
- popupuid: O,
11432
+ popupuid: L,
11424
11433
  puid: z,
11425
11434
  collection: j,
11426
11435
  filterbytk: E,
@@ -11439,14 +11448,14 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
11439
11448
  }, [r, l, u]), D = useCallback(
11440
11449
  ({
11441
11450
  recordData: w,
11442
- parentRecordData: O,
11451
+ parentRecordData: L,
11443
11452
  collectionNameUsedInURL: M,
11444
11453
  popupUidUsedInURL: k,
11445
11454
  customActionSchema: j
11446
11455
  } = {}) => {
11447
11456
  if (!f())
11448
11457
  return I == null ? void 0 : I(!0);
11449
- const z = j || n, E = z == null ? void 0 : z["x-uid"], V = y(O);
11458
+ const z = j || n, E = z == null ? void 0 : z["x-uid"], V = y(L);
11450
11459
  w = w || (a == null ? void 0 : a.data);
11451
11460
  const U = T({
11452
11461
  popupUid: E,
@@ -11459,7 +11468,7 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
11459
11468
  if (_.last(G) === "/" && (G = G.slice(0, -1)), storePopupContext(E, {
11460
11469
  schema: z,
11461
11470
  record: new CollectionRecord({ isNew: !1, data: w }),
11462
- parentRecord: O ? new CollectionRecord({ isNew: !1, data: O }) : i,
11471
+ parentRecord: L ? new CollectionRecord({ isNew: !1, data: L }) : i,
11463
11472
  service: g(),
11464
11473
  dataSource: r,
11465
11474
  collection: l == null ? void 0 : l.name,
@@ -11496,7 +11505,7 @@ ${JSON.stringify(z, null, 2)}`
11496
11505
  F,
11497
11506
  h
11498
11507
  ]
11499
- ), L = useCallback(() => {
11508
+ ), O = useCallback(() => {
11500
11509
  if (!f())
11501
11510
  return I == null ? void 0 : I(!1);
11502
11511
  t(withSearchParams(removeLastPopupPath(o.pathname)), { replace: !0 }), removePopupLayerState(h), m != null && m.popupuid && deletePopupContext(m.popupuid);
@@ -11509,11 +11518,11 @@ ${JSON.stringify(z, null, 2)}`
11509
11518
  m == null ? void 0 : m.popupuid
11510
11519
  ]), $ = useCallback(
11511
11520
  (w) => {
11512
- const O = y(), M = T({
11521
+ const L = y(), M = T({
11513
11522
  tabKey: w,
11514
11523
  popupUid: m == null ? void 0 : m.popupuid,
11515
11524
  recordData: a == null ? void 0 : a.data,
11516
- sourceId: O
11525
+ sourceId: L
11517
11526
  });
11518
11527
  let k = removeLastPopupPath(o.pathname);
11519
11528
  _.last(k) === "/" && (k = k.slice(0, -1)), t(`${k}${M}`, {
@@ -11521,8 +11530,8 @@ ${JSON.stringify(z, null, 2)}`
11521
11530
  });
11522
11531
  },
11523
11532
  [T, t, m == null ? void 0 : m.popupuid, a == null ? void 0 : a.data, o]
11524
- ), B = useCallback((w, O) => {
11525
- O.__popup = w;
11533
+ ), B = useCallback((w, L) => {
11534
+ L.__popup = w;
11526
11535
  }, []), N = useCallback((w) => w.__popup, []);
11527
11536
  return {
11528
11537
  /**
@@ -11532,7 +11541,7 @@ ${JSON.stringify(z, null, 2)}`
11532
11541
  /**
11533
11542
  * used to close popup by changing the url
11534
11543
  */
11535
- closePopup: L,
11544
+ closePopup: O,
11536
11545
  savePopupSchemaToSchema: B,
11537
11546
  getPopupSchemaFromSchema: N,
11538
11547
  context: S,
@@ -12064,9 +12073,9 @@ function Input$1(e) {
12064
12073
  constantAbel: h = !0
12065
12074
  } = e, g = typeof e.scope == "function" ? e.scope() : e.scope, { wrapSSR: f, hashId: C, componentCls: b, rootPrefixCls: S } = useStyles$g({ hideVariableButton: m });
12066
12075
  useAntdInputStyle(`${S}-input`);
12067
- const y = useCompile(), { t: v } = useTranslation(), F = useForm(), [I, T] = React.useState([]), [R, D] = React.useState([]), [L, $] = React.useState(
12076
+ const y = useCompile(), { t: v } = useTranslation(), F = useForm(), [I, T] = React.useState([]), [R, D] = React.useState([]), [O, $] = React.useState(
12068
12077
  m || !!(n && t != null)
12069
- ), B = useMemo(() => parseValue(t, p), [p, t]), N = typeof B == "string", w = N ? B : "", O = N ? null : B, M = Object.assign(
12078
+ ), B = useMemo(() => parseValue(t, p), [p, t]), N = typeof B == "string", w = N ? B : "", L = N ? null : B, M = Object.assign(
12070
12079
  {
12071
12080
  label: "label",
12072
12081
  value: "value",
@@ -12080,7 +12089,7 @@ function Input$1(e) {
12080
12089
  [M.label]: v("Constant")
12081
12090
  } : a ? getTypedConstantOption(w, a, M) : null : null, [w, a]), j = (K = k == null ? void 0 : k.component) != null ? K : NullComponent, z = Array.isArray(a) ? (W = (J = a.find((X) => Array.isArray(X) && X[0] === w)) == null ? void 0 : J[1]) != null ? W : {} : {};
12082
12091
  let E;
12083
- t == null ? i ? n && L ? E = ["$"] : E = [""] : n ? E = ["$"] : E = [" ", w] : E = n ? ["$"] : [" ", w], m && (E = ["$"]), useEffect(() => {
12092
+ t == null ? i ? n && O ? E = ["$"] : E = [""] : n ? E = ["$"] : E = [" ", w] : E = n ? ["$"] : [" ", w], m && (E = ["$"]), useEffect(() => {
12084
12093
  const oe = k != null ? k : {}, { component: X } = oe, Q = Y(oe, ["component"]), ee = [
12085
12094
  ...i ? [
12086
12095
  {
@@ -12092,28 +12101,28 @@ function Input$1(e) {
12092
12101
  ] : [],
12093
12102
  ...k ? [y(Q)] : [],
12094
12103
  ...g ? [...g] : []
12095
- ].filter((te) => !te.deprecated || (O == null ? void 0 : O[0]) === te[M.value]);
12104
+ ].filter((te) => !te.deprecated || (L == null ? void 0 : L[0]) === te[M.value]);
12096
12105
  T(ee);
12097
- }, [g, O, k, i]);
12106
+ }, [g, L, k, i]);
12098
12107
  const V = (X) => q(this, null, function* () {
12099
12108
  var ee;
12100
12109
  const Q = X[X.length - 1];
12101
12110
  if (!((ee = Q.children) != null && ee.length) && !Q.isLeaf && Q.loadChildren) {
12102
12111
  let oe;
12103
- if (O && O.length >= 2) {
12104
- for (const te of O)
12112
+ if (L && L.length >= 2) {
12113
+ for (const te of L)
12105
12114
  if (te === Q[M.value]) {
12106
12115
  oe = te;
12107
12116
  break;
12108
12117
  }
12109
12118
  }
12110
- yield Q.loadChildren(Q, oe, O), T((te) => [...te]);
12119
+ yield Q.loadChildren(Q, oe, L), T((te) => [...te]);
12111
12120
  }
12112
12121
  }), U = useCallback(
12113
12122
  (X, Q) => {
12114
12123
  var ee, oe, te;
12115
12124
  if (X[0] === "$") {
12116
- $(!0), O && o(null, Q);
12125
+ $(!0), L && o(null, Q);
12117
12126
  return;
12118
12127
  } else
12119
12128
  $(!1);
@@ -12122,12 +12131,12 @@ function Input$1(e) {
12122
12131
  return;
12123
12132
  }
12124
12133
  if (X[0] === " ") {
12125
- X[1] ? X[1] !== w && o((te = (oe = (ee = ConstantTypes[X[1]]) == null ? void 0 : ee.default) == null ? void 0 : oe.call(ee)) != null ? te : null, Q) : O && o(null, Q);
12134
+ X[1] ? X[1] !== w && o((te = (oe = (ee = ConstantTypes[X[1]]) == null ? void 0 : ee.default) == null ? void 0 : oe.call(ee)) != null ? te : null, Q) : L && o(null, Q);
12126
12135
  return;
12127
12136
  }
12128
12137
  o(`{{${X.join(".")}}}`, Q);
12129
12138
  },
12130
- [w, O, o]
12139
+ [w, L, o]
12131
12140
  ), G = useCallback(() => {
12132
12141
  var X;
12133
12142
  if ($(!!n), (X = k == null ? void 0 : k.children) != null && X.length) {
@@ -12139,14 +12148,14 @@ function Input$1(e) {
12139
12148
  useEffect(() => {
12140
12149
  q(this, null, function* () {
12141
12150
  var oe;
12142
- if (!O || I.length <= 1)
12151
+ if (!L || I.length <= 1)
12143
12152
  return;
12144
12153
  let Q = null;
12145
12154
  const ee = [];
12146
- for (let te = 0; te < O.length; te++) {
12147
- const se = O[te];
12155
+ for (let te = 0; te < L.length; te++) {
12156
+ const se = L[te];
12148
12157
  try {
12149
- if (te === 0 ? Q = I.find((ie) => ie[M.value] === se) : (Q.loadChildren && !((oe = Q.children) != null && oe.length) && (yield Q.loadChildren(Q, se, O)), Q = Q.children.find((ie) => ie[M.value] === se)), !Q)
12158
+ if (te === 0 ? Q = I.find((ie) => ie[M.value] === se) : (Q.loadChildren && !((oe = Q.children) != null && oe.length) && (yield Q.loadChildren(Q, se, L)), Q = Q.children.find((ie) => ie[M.value] === se)), !Q)
12150
12159
  return;
12151
12160
  ee.push(Q[M.label]);
12152
12161
  } catch (ie) {
@@ -12155,12 +12164,12 @@ function Input$1(e) {
12155
12164
  }
12156
12165
  T([...I]), D([...ee]);
12157
12166
  });
12158
- }, [O, I.length]);
12167
+ }, [L, I.length]);
12159
12168
  const H = e.disabled || F.disabled;
12160
12169
  return f(
12161
12170
  /* @__PURE__ */ jsxs(Fragment$1, { children: [
12162
12171
  /* @__PURE__ */ jsxs(Space$1.Compact, { style: l, className: cls(b, C, c), children: [
12163
- O ? /* @__PURE__ */ jsxs(
12172
+ L ? /* @__PURE__ */ jsxs(
12164
12173
  "div",
12165
12174
  {
12166
12175
  className: cx(
@@ -12217,7 +12226,7 @@ function Input$1(e) {
12217
12226
  )
12218
12227
  ]
12219
12228
  }
12220
- ) : /* @__PURE__ */ jsx("div", { style: { flex: 1 }, children: n && (L || !i) ? n : j ? /* @__PURE__ */ jsx(
12229
+ ) : /* @__PURE__ */ jsx("div", { style: { flex: 1 }, children: n && (O || !i) ? n : j ? /* @__PURE__ */ jsx(
12221
12230
  j,
12222
12231
  P(x({
12223
12232
  role: "button",
@@ -12231,7 +12240,7 @@ function Input$1(e) {
12231
12240
  Cascader$1,
12232
12241
  {
12233
12242
  options: I,
12234
- value: O != null ? O : E,
12243
+ value: L != null ? L : E,
12235
12244
  onChange: U,
12236
12245
  loadData: V,
12237
12246
  changeOnSelect: u,
@@ -12243,7 +12252,7 @@ function Input$1(e) {
12243
12252
  className: css(`
12244
12253
  margin-left: -1px;
12245
12254
  `),
12246
- type: O ? "primary" : "default",
12255
+ type: L ? "primary" : "default",
12247
12256
  disabled: H
12248
12257
  }
12249
12258
  )
@@ -12514,7 +12523,7 @@ function TextArea(e) {
12514
12523
  [l, g]
12515
12524
  ), [S, y] = useState(!1), [v, F] = useState(!1), [I, T] = useState(() => renderHTML(p != null ? p : "", b, c)), [R, D] = useState([-1, 0, -1, 0]);
12516
12525
  useAntdInputStyle("ant-input");
12517
- const { token: L } = theme.useToken(), $ = c.join(" "), B = useCallback(
12526
+ const { token: O } = theme.useToken(), $ = c.join(" "), B = useCallback(
12518
12527
  (V) => {
12519
12528
  var G;
12520
12529
  const U = getValue(V, c);
@@ -12570,7 +12579,7 @@ function TextArea(e) {
12570
12579
  S || (F(!0), D(getCurrentRange(V)), B(V));
12571
12580
  },
12572
12581
  [S, B]
12573
- ), O = useCallback(function({ currentTarget: V }) {
12582
+ ), L = useCallback(function({ currentTarget: V }) {
12574
12583
  D(getCurrentRange(V));
12575
12584
  }, []), M = useCallback(function(V) {
12576
12585
  V.key === "Enter" && V.preventDefault();
@@ -12654,7 +12663,7 @@ function TextArea(e) {
12654
12663
  role: "button",
12655
12664
  "aria-label": "textbox",
12656
12665
  onInput: w,
12657
- onBlur: O,
12666
+ onBlur: L,
12658
12667
  onKeyDown: M,
12659
12668
  onPaste: z,
12660
12669
  onCompositionStart: k,
@@ -12667,7 +12676,7 @@ function TextArea(e) {
12667
12676
  { "ant-input-disabled": E },
12668
12677
  // NOTE: `pre-wrap` here for avoid the `&nbsp;` (\x160) issue when paste content, we need normal space (\x32).
12669
12678
  css`
12670
- min-height: ${L.controlHeight}px;
12679
+ min-height: ${O.controlHeight}px;
12671
12680
  overflow: auto;
12672
12681
  white-space: pre-wrap;
12673
12682
 
@@ -12947,7 +12956,7 @@ const BaseVariableContext = React.createContext(null), BaseVariableProvider = (e
12947
12956
  isDisabled: C || isDisabledDefault,
12948
12957
  getCollectionField: b.getCollectionField,
12949
12958
  deprecated: p
12950
- }) || []).sort((L, $) => L.isLeaf && !$.isLeaf ? -1 : !L.isLeaf && $.isLeaf ? 1 : 0).sort((L, $) => L.disabled && !$.disabled ? 1 : !L.disabled && $.disabled ? -1 : 0);
12959
+ }) || []).sort((O, $) => O.isLeaf && !$.isLeaf ? -1 : !O.isLeaf && $.isLeaf ? 1 : 0).sort((O, $) => O.disabled && !$.disabled ? 1 : !O.disabled && $.disabled ? -1 : 0);
12951
12960
  if (D.length === 0) {
12952
12961
  v.disabled = !0, v.isLeaf = !0, T();
12953
12962
  return;
@@ -13073,11 +13082,11 @@ const DatePickerContext = React.createContext({ utc: !0 }), useDatePickerContext
13073
13082
  const v = dayjs(y), F = v.isSame(g, "day"), I = v.isSame(f, "day");
13074
13083
  return {
13075
13084
  disabledHours: () => {
13076
- const L = [];
13077
- return F && L.push(...Array.from({ length: g.hour() }, ($, B) => B)), I && L.push(...Array.from({ length: 24 - f.hour() }, ($, B) => B + f.hour() + 1)), L;
13085
+ const O = [];
13086
+ return F && O.push(...Array.from({ length: g.hour() }, ($, B) => B)), I && O.push(...Array.from({ length: 24 - f.hour() }, ($, B) => B + f.hour() + 1)), O;
13078
13087
  },
13079
- disabledMinutes: (L) => F && L === g.hour() ? C.filter(($) => $ < g.minute()) : I && L === f.hour() ? C.filter(($) => $ > f.minute()) : [],
13080
- disabledSeconds: (L, $) => F && L === g.hour() && $ === g.minute() ? C.filter((B) => B < g.second()) : I && L === f.hour() && $ === f.minute() ? C.filter((B) => B > f.second()) : []
13088
+ disabledMinutes: (O) => F && O === g.hour() ? C.filter(($) => $ < g.minute()) : I && O === f.hour() ? C.filter(($) => $ > f.minute()) : [],
13089
+ disabledSeconds: (O, $) => F && O === g.hour() && $ === g.minute() ? C.filter((B) => B < g.second()) : I && O === f.hour() && $ === f.minute() ? C.filter((B) => B > f.second()) : []
13081
13090
  };
13082
13091
  };
13083
13092
  i(() => b), c(() => S);
@@ -14339,8 +14348,8 @@ const useFormItemInitializerFields = (e) => {
14339
14348
  Component: "CollectionFieldInitializer",
14340
14349
  remove: removeGridFormItem,
14341
14350
  schemaInitialize: (D) => {
14342
- var L;
14343
- (L = h == null ? void 0 : h.schemaInitialize) == null || L.call(h, D, {
14351
+ var O;
14352
+ (O = h == null ? void 0 : h.schemaInitialize) == null || O.call(h, D, {
14344
14353
  field: m,
14345
14354
  block: l,
14346
14355
  readPretty: i,
@@ -14350,9 +14359,9 @@ const useFormItemInitializerFields = (e) => {
14350
14359
  },
14351
14360
  schema: S
14352
14361
  };
14353
- return l == "Kanban" && (y.find = (D, L, $) => {
14362
+ return l == "Kanban" && (y.find = (D, O, $) => {
14354
14363
  const B = findSchema(D, "x-component", l);
14355
- return findSchema(B, L, $);
14364
+ return findSchema(B, O, $);
14356
14365
  }), y;
14357
14366
  });
14358
14367
  }, useFilterFormItemInitializerFields = (e) => {
@@ -14724,8 +14733,8 @@ const useFormItemInitializerFields = (e) => {
14724
14733
  t: h,
14725
14734
  componentNamePrefix: m
14726
14735
  }).sort((D) => {
14727
- const L = _.toArray((C == null ? void 0 : C.inherits) || []);
14728
- if (D.name === (C == null ? void 0 : C.name) || L.some(($) => $ === D.name))
14736
+ const O = _.toArray((C == null ? void 0 : C.inherits) || []);
14737
+ if (D.name === (C == null ? void 0 : C.name) || O.some(($) => $ === D.name))
14729
14738
  return -1;
14730
14739
  })
14731
14740
  ]
@@ -14795,25 +14804,25 @@ const useFormItemInitializerFields = (e) => {
14795
14804
  }
14796
14805
  })
14797
14806
  };
14798
- let L;
14807
+ let O;
14799
14808
  const $ = b.length ? T : null;
14800
14809
  if (F[0].children.length && b.length)
14801
- l ? L = [I, $] : L = [I, $, D];
14810
+ l ? O = [I, $] : O = [I, $, D];
14802
14811
  else if (F[0].children.length)
14803
14812
  if (l) {
14804
14813
  if (F[0].children.length <= 1)
14805
14814
  return F[0].children = ((B = F[0].children[0]) == null ? void 0 : B.children) || [], F;
14806
- L = [I];
14815
+ O = [I];
14807
14816
  } else
14808
- L = [I, D];
14817
+ O = [I, D];
14809
14818
  else
14810
- l ? L = [$] : L = [$, D];
14819
+ l ? O = [$] : O = [$, D];
14811
14820
  return [
14812
14821
  {
14813
14822
  name: "records",
14814
14823
  label: h("Records"),
14815
14824
  type: "subMenu",
14816
- children: L.filter(Boolean)
14825
+ children: O.filter(Boolean)
14817
14826
  }
14818
14827
  ];
14819
14828
  }, [
@@ -15560,7 +15569,7 @@ const useGetAriaLabelOfDesigner = () => {
15560
15569
  display: block !important;
15561
15570
  }
15562
15571
  `, GeneralSchemaDesigner = (e) => {
15563
- var L, $;
15572
+ var O, $;
15564
15573
  const t = useFieldSchema(), {
15565
15574
  disableInitializer: o,
15566
15575
  title: n,
@@ -15590,7 +15599,7 @@ const useGetAriaLabelOfDesigner = () => {
15590
15599
  })
15591
15600
  )
15592
15601
  };
15593
- }, [g, (L = S == null ? void 0 : S.cols) == null ? void 0 : L.length]);
15602
+ }, [g, (O = S == null ? void 0 : S.cols) == null ? void 0 : O.length]);
15594
15603
  return d ? /* @__PURE__ */ jsx(SchemaToolbarProvider, P(x({}, i), { children: /* @__PURE__ */ jsxs(
15595
15604
  "div",
15596
15605
  {
@@ -15646,19 +15655,19 @@ const useGetAriaLabelOfDesigner = () => {
15646
15655
  toolbarClassName: m,
15647
15656
  toolbarStyle: h = {},
15648
15657
  container: g
15649
- } = x(x({}, e), (t == null ? void 0 : t["x-toolbar-props"]) || {}), f = useCompile(), { draggable: C } = useContext(SchemaComponentContext), { componentCls: b, hashId: S } = useStyles$e(), { 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(), L = useRef(y("Reference template")), $ = useCallback(() => {
15658
+ } = x(x({}, e), (t == null ? void 0 : t["x-toolbar-props"]) || {}), f = useCompile(), { draggable: C } = useContext(SchemaComponentContext), { componentCls: b, hashId: S } = useStyles$e(), { 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(), O = useRef(y("Reference template")), $ = useCallback(() => {
15650
15659
  D({ refreshParentSchema: !0 });
15651
15660
  }, [D]), B = useMemo(() => {
15652
15661
  if (o) {
15653
15662
  if (typeof o == "string")
15654
15663
  return [f(o)];
15655
15664
  if (Array.isArray(o))
15656
- return o.length === 1 && t["x-template-title"] ? (L.current = y("Template"), f([o[0], t["x-template-title"]])) : f(o);
15665
+ return o.length === 1 && t["x-template-title"] ? (O.current = y("Template"), f([o[0], t["x-template-title"]])) : f(o);
15657
15666
  }
15658
15667
  }, [o, t]), { render: N, exists: w } = useSchemaSettingsRender(
15659
15668
  r || (t == null ? void 0 : t["x-settings"]),
15660
15669
  t == null ? void 0 : t["x-settings-props"]
15661
- ), { render: O, exists: M } = useSchemaInitializerRender(
15670
+ ), { render: L, exists: M } = useSchemaInitializerRender(
15662
15671
  n || (t == null ? void 0 : t["x-initializer"]),
15663
15672
  t == null ? void 0 : t["x-initializer-props"]
15664
15673
  ), k = useGridRowContext(), j = useGridContext(), z = useMemo(() => {
@@ -15680,10 +15689,10 @@ const useGetAriaLabelOfDesigner = () => {
15680
15689
  if (n === !1)
15681
15690
  return null;
15682
15691
  if (M)
15683
- return O(z);
15692
+ return L(z);
15684
15693
  if (j != null && j.InitializerComponent || j != null && j.renderSchemaInitializer)
15685
15694
  return j != null && j.InitializerComponent ? /* @__PURE__ */ jsx(j.InitializerComponent, x({}, z)) : (W = j.renderSchemaInitializer) == null ? void 0 : W.call(j, z);
15686
- }, [j, n, z, M, O]), U = useMemo(() => r !== !1 && w ? N() : null, [w, N, r]), G = useRef(null), H = "hidden";
15695
+ }, [j, n, z, M, L]), U = useMemo(() => r !== !1 && w ? N() : null, [w, N, r]), G = useRef(null), H = "hidden";
15687
15696
  useEffect(() => {
15688
15697
  const W = G.current;
15689
15698
  let X = W == null ? void 0 : W.parentElement;
@@ -15720,7 +15729,7 @@ const useGetAriaLabelOfDesigner = () => {
15720
15729
  children: [
15721
15730
  B && /* @__PURE__ */ jsx("div", { className: "toolbar-title", children: /* @__PURE__ */ jsxs(Space$1, { size: 2, children: [
15722
15731
  /* @__PURE__ */ jsx("span", { className: "toolbar-title-tag", children: R ? `${f(R == null ? void 0 : R.displayName)} > ${B[0]}` : B[0] }, B[0]),
15723
- B[1] && /* @__PURE__ */ jsx("span", { className: "toolbar-title-tag", children: `${L.current}: ${`${B[1]}` || y("Untitled")}` })
15732
+ B[1] && /* @__PURE__ */ jsx("span", { className: "toolbar-title-tag", children: `${O.current}: ${`${B[1]}` || y("Untitled")}` })
15724
15733
  ] }) }),
15725
15734
  /* @__PURE__ */ jsx("div", { className: cls("toolbar-icons", i), style: l, children: /* @__PURE__ */ jsxs(Space$1, { size: 3, align: "center", className: d, style: p, children: [
15726
15735
  E,
@@ -15979,8 +15988,8 @@ const useDragEnd = (e) => {
15979
15988
  const { refresh: t } = useDesignable(), o = useAPIClient(), { t: n } = useTranslation();
15980
15989
  return useCallback(
15981
15990
  (r) => {
15982
- var f, C, b, S, y, v, F, I, T, R, D, L, $, B, N;
15983
- 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 = (L = (D = i == null ? void 0 : i.data) == null ? void 0 : D.current) == null ? void 0 : L.onSuccess, h = (N = (B = ($ = i == null ? void 0 : i.data) == null ? void 0 : $.current) == null ? void 0 : B.removeParentsIfNoChildren) != null ? N : !0;
15991
+ var f, C, b, S, y, v, F, I, T, R, D, O, $, B, N;
15992
+ 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 = (O = (D = i == null ? void 0 : i.data) == null ? void 0 : D.current) == null ? void 0 : O.onSuccess, h = (N = (B = ($ = i == null ? void 0 : i.data) == null ? void 0 : $.current) == null ? void 0 : B.removeParentsIfNoChildren) != null ? N : !0;
15984
15993
  if (!l || !c) {
15985
15994
  e == null || e(r);
15986
15995
  return;
@@ -16132,23 +16141,23 @@ const breakRemoveOnGrid = (e) => e["x-component"] === "Grid", breakRemoveOnRow =
16132
16141
  if (!r || !S)
16133
16142
  return;
16134
16143
  o.current = R.active.id;
16135
- const D = l.current, L = D.previousElementSibling, $ = D.nextElementSibling;
16136
- v([L.clientWidth, $.clientWidth]);
16144
+ const D = l.current, O = D.previousElementSibling, $ = D.nextElementSibling;
16145
+ v([O.clientWidth, $.clientWidth]);
16137
16146
  },
16138
16147
  onDragMove(R) {
16139
16148
  if (!r || !S)
16140
16149
  return;
16141
16150
  o.current === R.active.id && (o.current = o.current + "_move");
16142
- const D = l.current, L = D.previousElementSibling, $ = D.nextElementSibling;
16143
- L.style.width = `${y[0] + R.delta.x}px`, $.style.width = `${y[1] - R.delta.x}px`;
16151
+ const D = l.current, O = D.previousElementSibling, $ = D.nextElementSibling;
16152
+ O.style.width = `${y[0] + R.delta.x}px`, $.style.width = `${y[1] - R.delta.x}px`;
16144
16153
  },
16145
16154
  onDragEnd(R) {
16146
- var O;
16147
- if (!r || !o.current || (O = o.current) != null && O.startsWith(R.active.id) && !o.current.endsWith("_move") || y[0] <= 0 || y[1] <= 0 || (v([0, 0]), !h || !g))
16155
+ var L;
16156
+ if (!r || !o.current || (L = o.current) != null && L.startsWith(R.active.id) && !o.current.endsWith("_move") || y[0] <= 0 || y[1] <= 0 || (v([0, 0]), !h || !g))
16148
16157
  return;
16149
- const D = l.current, L = D.previousElementSibling, $ = D.nextElementSibling;
16158
+ const D = l.current, O = D.previousElementSibling, $ = D.nextElementSibling;
16150
16159
  h["x-component-props"] = h["x-component-props"] || {}, g["x-component-props"] = g["x-component-props"] || {};
16151
- const B = D.clientWidth * (e.cols.length + 1) / e.cols.length, N = (100 * (L.getBoundingClientRect().width + B) / D.parentElement.clientWidth).toFixed(2), w = (100 * ($.getBoundingClientRect().width + B) / D.parentElement.clientWidth).toFixed(2);
16160
+ const B = D.clientWidth * (e.cols.length + 1) / e.cols.length, N = (100 * (O.getBoundingClientRect().width + B) / D.parentElement.clientWidth).toFixed(2), w = (100 * ($.getBoundingClientRect().width + B) / D.parentElement.clientWidth).toFixed(2);
16152
16161
  _.set(h, "x-component-props.width", N), _.set(g, "x-component-props.width", w), n.emit("batchPatch", {
16153
16162
  schemas: [
16154
16163
  {
@@ -16463,8 +16472,8 @@ const useTableBlockProps = () => {
16463
16472
  ),
16464
16473
  onChange: useCallback(
16465
16474
  ({ current: S, pageSize: y }, v, F) => {
16466
- var L, $, B, N, w, O, M, k, j, z;
16467
- const I = (B = ($ = (L = t.parent) == null ? void 0 : L["x-decorator-props"]) == null ? void 0 : $.params) == null ? void 0 : B.sort, T = F.order ? F.order === "ascend" ? [F.field] : [`-${F.field}`] : I || a.dragSortBy, R = y || ((O = (w = (N = t.parent) == null ? void 0 : N["x-decorator-props"]) == null ? void 0 : w.params) == null ? void 0 : O.pageSize), D = P(x({}, (j = (k = (M = i.current) == null ? void 0 : M.service) == null ? void 0 : k.params) == null ? void 0 : j[0]), { page: S || 1, pageSize: R });
16475
+ var O, $, B, N, w, L, M, k, j, z;
16476
+ const I = (B = ($ = (O = t.parent) == null ? void 0 : O["x-decorator-props"]) == null ? void 0 : $.params) == null ? void 0 : B.sort, T = F.order ? F.order === "ascend" ? [F.field] : [`-${F.field}`] : I || a.dragSortBy, R = y || ((L = (w = (N = t.parent) == null ? void 0 : N["x-decorator-props"]) == null ? void 0 : w.params) == null ? void 0 : L.pageSize), D = P(x({}, (j = (k = (M = i.current) == null ? void 0 : M.service) == null ? void 0 : k.params) == null ? void 0 : j[0]), { page: S || 1, pageSize: R });
16468
16477
  T && (D.sort = T), (z = i.current) == null || z.service.run(D);
16469
16478
  },
16470
16479
  [t.parent]
@@ -16472,17 +16481,17 @@ const useTableBlockProps = () => {
16472
16481
  onClickRow: useCallback(
16473
16482
  (S, y, v) => {
16474
16483
  const { targets: F, uid: I } = findFilterTargets(t), T = r();
16475
- if (!F || !F.some((D) => T.some((L) => L.uid === D.uid))) {
16484
+ if (!F || !F.some((D) => T.some((O) => O.uid === D.uid))) {
16476
16485
  y((D) => D.length ? [] : D);
16477
16486
  return;
16478
16487
  }
16479
16488
  const R = T.find((D) => D.uid === t.parent["x-uid"]);
16480
16489
  T.forEach((D) => {
16481
16490
  var M, k, j, z;
16482
- const L = F.find((E) => E.uid === D.uid);
16483
- if (!L)
16491
+ const O = F.find((E) => E.uid === D.uid);
16492
+ if (!O)
16484
16493
  return;
16485
- const $ = getSourceKey(R, L.field) || a.rowKey || "id", B = [S[$]], N = ((M = D.service.params) == null ? void 0 : M[0]) || {}, w = ((j = (k = D.service.params) == null ? void 0 : k[1]) == null ? void 0 : j.filters) || {};
16494
+ const $ = getSourceKey(R, O.field) || a.rowKey || "id", B = [S[$]], N = ((M = D.service.params) == null ? void 0 : M[0]) || {}, w = ((j = (k = D.service.params) == null ? void 0 : k[1]) == null ? void 0 : j.filters) || {};
16486
16495
  if (v.includes(S[a.rowKey])) {
16487
16496
  if ((z = D.clearSelection) == null || z.call(D), D.dataLoadingMode === "manual")
16488
16497
  return D.clearData();
@@ -16491,20 +16500,20 @@ const useTableBlockProps = () => {
16491
16500
  w[I] = {
16492
16501
  $and: [
16493
16502
  {
16494
- [L.field || a.rowKey]: {
16495
- [L.field ? "$in" : "$eq"]: B
16503
+ [O.field || a.rowKey]: {
16504
+ [O.field ? "$in" : "$eq"]: B
16496
16505
  }
16497
16506
  }
16498
16507
  ]
16499
16508
  };
16500
- const O = mergeFilter([
16509
+ const L = mergeFilter([
16501
16510
  ...Object.values(w).map((E) => removeNullCondition(E)),
16502
16511
  D.defaultFilter
16503
16512
  ]);
16504
16513
  return D.doFilter(
16505
16514
  P(x({}, N), {
16506
16515
  page: 1,
16507
- filter: O
16516
+ filter: L
16508
16517
  }),
16509
16518
  { filters: w }
16510
16519
  );
@@ -16932,10 +16941,10 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
16932
16941
  var i, l, c, u, d, p, m, h, g, f, C, b, S, y, v, F;
16933
16942
  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"]);
16934
16943
  return useEffect(() => {
16935
- var T, R, D, L, $, B, N, w, O, M, k, j, z;
16944
+ var T, R, D, O, $, B, N, w, L, M, k, j, z;
16936
16945
  if (!((T = t == null ? void 0 : t.service) != null && T.loading)) {
16937
16946
  const E = (D = (R = t == null ? void 0 : t.service) == null ? void 0 : R.data) == null ? void 0 : D.data.map((V) => V);
16938
- e.value = E, (L = e == null ? void 0 : e.setInitialValue) == null || L.call(e, E), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (N = (B = ($ = t == null ? void 0 : t.service) == null ? void 0 : $.data) == null ? void 0 : B.meta) == null ? void 0 : N.pageSize, e.componentProps.pagination.total = (M = (O = (w = t == null ? void 0 : t.service) == null ? void 0 : w.data) == null ? void 0 : O.meta) == null ? void 0 : M.count, e.componentProps.pagination.current = (z = (j = (k = t == null ? void 0 : t.service) == null ? void 0 : k.data) == null ? void 0 : j.meta) == null ? void 0 : z.page;
16947
+ e.value = E, (O = e == null ? void 0 : e.setInitialValue) == null || O.call(e, E), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (N = (B = ($ = t == null ? void 0 : t.service) == null ? void 0 : $.data) == null ? void 0 : B.meta) == null ? void 0 : N.pageSize, e.componentProps.pagination.total = (M = (L = (w = t == null ? void 0 : t.service) == null ? void 0 : w.data) == null ? void 0 : L.meta) == null ? void 0 : M.count, e.componentProps.pagination.current = (z = (j = (k = t == null ? void 0 : t.service) == null ? void 0 : k.data) == null ? void 0 : j.meta) == null ? void 0 : z.page;
16939
16948
  }
16940
16949
  }, [
16941
16950
  a == null ? void 0 : a.foreignKey,
@@ -17504,7 +17513,7 @@ const useCurrentUserContext = () => useContext(CurrentUserContext), useIsLoggedI
17504
17513
  collectionField: e,
17505
17514
  noDisabled: r,
17506
17515
  targetFieldSchema: a
17507
- }), { currentParentRecordSettings: D, shouldDisplayCurrentParentRecord: L } = useCurrentParentRecordVariable({
17516
+ }), { currentParentRecordSettings: D, shouldDisplayCurrentParentRecord: O } = useCurrentParentRecordVariable({
17508
17517
  schema: o,
17509
17518
  collectionName: c,
17510
17519
  collectionField: e,
@@ -17520,7 +17529,7 @@ const useCurrentUserContext = () => useContext(CurrentUserContext), useIsLoggedI
17520
17529
  C && f,
17521
17530
  S && b,
17522
17531
  v && y,
17523
- L && D,
17532
+ O && D,
17524
17533
  I && F,
17525
17534
  R && T,
17526
17535
  B && $
@@ -17537,7 +17546,7 @@ const useCurrentUserContext = () => useContext(CurrentUserContext), useIsLoggedI
17537
17546
  b,
17538
17547
  v,
17539
17548
  y,
17540
- L,
17549
+ O,
17541
17550
  D,
17542
17551
  I,
17543
17552
  F,
@@ -20822,7 +20831,7 @@ https://requirejs.org/docs/errors.html#` + e);
20822
20831
  };
20823
20832
  }
20824
20833
  };
20825
- function L(k) {
20834
+ function O(k) {
20826
20835
  delete l[k], delete c[k];
20827
20836
  }
20828
20837
  function $(k, j, z) {
@@ -20913,7 +20922,7 @@ https://requirejs.org/docs/errors.html#` + e);
20913
20922
  G.push(H.normalizedMap || H);
20914
20923
  }), req.onResourceLoad(n, this.map, G);
20915
20924
  }
20916
- L(z), this.defined = !0;
20925
+ O(z), this.defined = !0;
20917
20926
  }
20918
20927
  this.defining = !1, this.defined && !this.defineEmitted && (this.defineEmitted = !0, this.emit("defined", this.exports), this.defineEmitComplete = !0);
20919
20928
  }
@@ -20960,7 +20969,7 @@ https://requirejs.org/docs/errors.html#` + e);
20960
20969
  });
20961
20970
  }), V.error = bind(this, function(X) {
20962
20971
  this.inited = !0, this.error = X, X.requireModules = [j], eachProp(l, function(Q) {
20963
- Q.map.id.indexOf(j + "_unnormalized") === 0 && L(Q.map.id);
20972
+ Q.map.id.indexOf(j + "_unnormalized") === 0 && O(Q.map.id);
20964
20973
  }), R(X);
20965
20974
  }), V.fromText = bind(this, function(X, Q) {
20966
20975
  var ee = k.name, oe = F(ee), te = useInteractive;
@@ -21020,7 +21029,7 @@ https://requirejs.org/docs/errors.html#` + e);
21020
21029
  function w(k, j, z, E) {
21021
21030
  k.detachEvent && !isOpera ? E && k.detachEvent(E, j) : k.removeEventListener(z, j, !1);
21022
21031
  }
21023
- function O(k) {
21032
+ function L(k) {
21024
21033
  var j = k.currentTarget || k.srcElement;
21025
21034
  return w(j, n.onScriptLoad, "load", "onreadystatechange"), w(j, n.onScriptError, "error"), {
21026
21035
  node: j,
@@ -21125,7 +21134,7 @@ https://requirejs.org/docs/errors.html#` + e);
21125
21134
  var V = F(E, k, !0), U = getOwn(l, E);
21126
21135
  U.undefed = !0, S(E), delete p[E], delete m[V.url], delete u[E], eachReverse(d, function(G, H) {
21127
21136
  G[0] === E && d.splice(H, 1);
21128
- }), delete n.defQueueMap[E], U && (U.events.defined && (u[E] = U.events), L(E));
21137
+ }), delete n.defQueueMap[E], U && (U.events.defined && (u[E] = U.events), O(E));
21129
21138
  }), z;
21130
21139
  },
21131
21140
  /**
@@ -21214,7 +21223,7 @@ https://requirejs.org/docs/errors.html#` + e);
21214
21223
  onScriptLoad: function(k) {
21215
21224
  if (k.type === "load" || readyRegExp.test((k.currentTarget || k.srcElement).readyState)) {
21216
21225
  interactiveScript = null;
21217
- var j = O(k);
21226
+ var j = L(k);
21218
21227
  n.completeLoad(j.id);
21219
21228
  }
21220
21229
  },
@@ -21222,7 +21231,7 @@ https://requirejs.org/docs/errors.html#` + e);
21222
21231
  * Callback for script errors.
21223
21232
  */
21224
21233
  onScriptError: function(k) {
21225
- var j = O(k);
21234
+ var j = L(k);
21226
21235
  if (!y(j.id)) {
21227
21236
  var z = [];
21228
21237
  return eachProp(l, function(E, V) {
@@ -22165,22 +22174,22 @@ const SchemaToolbarErrorFallback = (e) => {
22165
22174
  const t = useDataSourceManager(), o = useDataSource(), n = useCollectionManager(), r = e || (o == null ? void 0 : o.key) || void 0, [a, i] = useState(uid()), { refresh: l } = useSchemaComponentContext(), c = useMemo(
22166
22175
  () => {
22167
22176
  var w;
22168
- return (w = t == null ? void 0 : t.collectionFieldInterfaceManager) == null ? void 0 : w.getFieldInterfaces().reduce((O, M) => (O[M.name] = M, O), {});
22177
+ return (w = t == null ? void 0 : t.collectionFieldInterfaceManager) == null ? void 0 : w.getFieldInterfaces().reduce((L, M) => (L[M.name] = M, L), {});
22169
22178
  },
22170
22179
  [t, a]
22171
22180
  ), u = useMemo(() => t == null ? void 0 : t.collectionTemplateManager.getCollectionTemplates(), [t, a]), d = useCallback(() => {
22172
- var w, O;
22173
- return (O = (w = t == null ? void 0 : t.getDataSource(r)) == null ? void 0 : w.collectionManager) == null ? void 0 : O.getCollections().map((M) => M.getOptions());
22181
+ var w, L;
22182
+ return (L = (w = t == null ? void 0 : t.getDataSource(r)) == null ? void 0 : w.collectionManager) == null ? void 0 : L.getCollections().map((M) => M.getOptions());
22174
22183
  }, [t, o]), p = useCallback(
22175
22184
  (w) => {
22176
- var O;
22177
- return n && !w ? n : (O = t == null ? void 0 : t.getDataSource(w || r)) == null ? void 0 : O.collectionManager;
22185
+ var L;
22186
+ return n && !w ? n : (L = t == null ? void 0 : t.getDataSource(w || r)) == null ? void 0 : L.collectionManager;
22178
22187
  },
22179
22188
  [n, t, r]
22180
22189
  ), m = useMemo(
22181
22190
  () => {
22182
- var w, O;
22183
- return (O = (w = t == null ? void 0 : t.getDataSource(DEFAULT_DATA_SOURCE_KEY)) == null ? void 0 : w.collectionManager) == null ? void 0 : O.getCollections();
22191
+ var w, L;
22192
+ return (L = (w = t == null ? void 0 : t.getDataSource(DEFAULT_DATA_SOURCE_KEY)) == null ? void 0 : w.collectionManager) == null ? void 0 : L.getCollections();
22184
22193
  },
22185
22194
  [t, a]
22186
22195
  ), h = useCallback(
@@ -22194,50 +22203,50 @@ const SchemaToolbarErrorFallback = (e) => {
22194
22203
  }),
22195
22204
  [t]
22196
22205
  ), f = useCompile(), C = useCallback(
22197
- (w, O) => {
22206
+ (w, L) => {
22198
22207
  var M, k;
22199
- return ((k = (M = p(O)) == null ? void 0 : M.getCollection(w)) == null ? void 0 : k.getInheritedFields()) || [];
22208
+ return ((k = (M = p(L)) == null ? void 0 : M.getCollection(w)) == null ? void 0 : k.getInheritedFields()) || [];
22200
22209
  },
22201
22210
  [t, p]
22202
22211
  ), b = useCallback(
22203
- (w, O) => {
22212
+ (w, L) => {
22204
22213
  var k, j;
22205
22214
  if (!w)
22206
22215
  return [];
22207
- const M = (k = p(O)) == null ? void 0 : k.getCollection(w);
22216
+ const M = (k = p(L)) == null ? void 0 : k.getCollection(w);
22208
22217
  return ((j = M == null ? void 0 : M.getAllFields) == null ? void 0 : j.call(M)) || (M == null ? void 0 : M.getFields()) || [];
22209
22218
  },
22210
22219
  [t, p]
22211
22220
  ), S = useCallback(
22212
- (w, O) => {
22221
+ (w, L) => {
22213
22222
  var M;
22214
22223
  if (!(!w || w.split(".").length < 2))
22215
- return (M = p(O)) == null ? void 0 : M.getCollectionField(w);
22224
+ return (M = p(L)) == null ? void 0 : M.getCollectionField(w);
22216
22225
  },
22217
22226
  [t, p]
22218
22227
  ), y = useCallback(
22219
- (w, O) => {
22228
+ (w, L) => {
22220
22229
  var M, k;
22221
- return w ? ((k = (M = p(O)) == null ? void 0 : M.getCollection(w)) == null ? void 0 : k.getParentCollectionsName()) || [] : [];
22230
+ return w ? ((k = (M = p(L)) == null ? void 0 : M.getCollection(w)) == null ? void 0 : k.getParentCollectionsName()) || [] : [];
22222
22231
  },
22223
22232
  [t, p]
22224
22233
  ), v = useCallback(
22225
- (w, O = !1, M) => {
22234
+ (w, L = !1, M) => {
22226
22235
  var z;
22227
22236
  if (!w)
22228
22237
  return [];
22229
22238
  const k = (z = p(M)) == null ? void 0 : z.getCollection(w);
22230
- return (k == null ? void 0 : k.getChildrenCollections(O)) || [];
22239
+ return (k == null ? void 0 : k.getChildrenCollections(L)) || [];
22231
22240
  },
22232
22241
  [t, p]
22233
22242
  ), F = useCallback(
22234
- (w, O) => {
22243
+ (w, L) => {
22235
22244
  var M, k;
22236
- return w ? ((k = (M = p(O)) == null ? void 0 : M.getCollection(w)) == null ? void 0 : k.getCurrentFields()) || [] : [];
22245
+ return w ? ((k = (M = p(L)) == null ? void 0 : M.getCollection(w)) == null ? void 0 : k.getCurrentFields()) || [] : [];
22237
22246
  },
22238
22247
  [t, p]
22239
22248
  ), I = useCallback(
22240
- (w, O, M, k) => {
22249
+ (w, L, M, k) => {
22241
22250
  var Q;
22242
22251
  const {
22243
22252
  association: j = !1,
@@ -22254,16 +22263,16 @@ const SchemaToolbarErrorFallback = (e) => {
22254
22263
  return;
22255
22264
  if (z[w])
22256
22265
  return _.cloneDeep(z[w]);
22257
- O && typeof O == "string" && (O = [O]), M && typeof M == "string" && (M = [M]);
22266
+ L && typeof L == "string" && (L = [L]), M && typeof M == "string" && (M = [M]);
22258
22267
  const W = b(w, J), X = (Q = W == null ? void 0 : W.filter(
22259
- (ee) => ee.interface && !G.includes(ee.interface) && (U || O && O.includes(ee.type) || M && M.includes(ee.interface) || (j && ee.target && ee.target !== w && Array.isArray(j) ? j.includes(ee.interface) : !1))
22268
+ (ee) => ee.interface && !G.includes(ee.interface) && (U || L && L.includes(ee.type) || M && M.includes(ee.interface) || (j && ee.target && ee.target !== w && Array.isArray(j) ? j.includes(ee.interface) : !1))
22260
22269
  )) == null ? void 0 : Q.map((ee) => {
22261
22270
  var te, se;
22262
22271
  const oe = x({
22263
22272
  value: K && H ? `${H}.${ee.name}` : ee.name,
22264
22273
  label: f((te = ee == null ? void 0 : ee.uiSchema) == null ? void 0 : te.title) || ee.name
22265
22274
  }, ee);
22266
- return j && ee.target && (oe.children = E.includes(ee.target) ? [] : I(ee.target, O, M, P(x({}, k), {
22275
+ return j && ee.target && (oe.children = E.includes(ee.target) ? [] : I(ee.target, L, M, P(x({}, k), {
22267
22276
  cached: z,
22268
22277
  dataSource: J,
22269
22278
  collectionNames: [...E, ee.target],
@@ -22275,36 +22284,36 @@ const SchemaToolbarErrorFallback = (e) => {
22275
22284
  },
22276
22285
  [b]
22277
22286
  ), T = useCallback(
22278
- (w, O) => {
22287
+ (w, L) => {
22279
22288
  var M;
22280
- return (M = p(O)) == null ? void 0 : M.getCollection(w);
22289
+ return (M = p(L)) == null ? void 0 : M.getCollection(w);
22281
22290
  },
22282
22291
  [t, p]
22283
22292
  ), R = useCallback(
22284
- (w, O) => {
22293
+ (w, L) => {
22285
22294
  var M, k;
22286
- return (k = (M = p(O)) == null ? void 0 : M.getCollection(w)) == null ? void 0 : k.getAllCollectionsInheritChain();
22295
+ return (k = (M = p(L)) == null ? void 0 : M.getCollection(w)) == null ? void 0 : k.getAllCollectionsInheritChain();
22287
22296
  },
22288
22297
  [t, p]
22289
22298
  ), D = useCallback(
22290
- (w, O) => () => {
22299
+ (w, L) => () => {
22291
22300
  var M, k;
22292
- return (k = (M = p(O)) == null ? void 0 : M.getCollection(w)) == null ? void 0 : k.getInheritCollectionsChain();
22301
+ return (k = (M = p(L)) == null ? void 0 : M.getCollection(w)) == null ? void 0 : k.getInheritCollectionsChain();
22293
22302
  },
22294
22303
  [t, p]
22295
- ), L = useCallback(
22304
+ ), O = useCallback(
22296
22305
  (w) => t == null ? void 0 : t.collectionFieldInterfaceManager.getFieldInterface(w),
22297
22306
  [t]
22298
22307
  ), $ = useCallback(
22299
22308
  (w) => {
22300
- var O;
22301
- return (O = L(w.interface)) == null ? void 0 : O.titleUsable;
22309
+ var L;
22310
+ return (L = O(w.interface)) == null ? void 0 : L.titleUsable;
22302
22311
  },
22303
- [L]
22312
+ [O]
22304
22313
  ), B = useCallback(
22305
- (w, O, M) => {
22314
+ (w, L, M) => {
22306
22315
  var k, j;
22307
- return (j = (k = p(M)) == null ? void 0 : k.getCollection(O)) == null ? void 0 : j.getParentCollectionFields(w);
22316
+ return (j = (k = p(M)) == null ? void 0 : k.getCollection(L)) == null ? void 0 : j.getParentCollectionFields(w);
22308
22317
  },
22309
22318
  [t, p]
22310
22319
  ), N = useCallback(
@@ -22317,7 +22326,7 @@ const SchemaToolbarErrorFallback = (e) => {
22317
22326
  collections: m,
22318
22327
  templates: u,
22319
22328
  getTemplate: N,
22320
- getInterface: L,
22329
+ getInterface: O,
22321
22330
  getCollections: d,
22322
22331
  getParentCollectionFields: B,
22323
22332
  getInheritCollections: y,
@@ -22648,7 +22657,7 @@ const findOption$2 = (e = [], t) => {
22648
22657
  uiSchema: T,
22649
22658
  targetFieldSchema: h,
22650
22659
  noDisabled: g
22651
- }), D = useContextAssociationFields({ schema: a, maxDepth: 2, contextCollectionName: l, collectionField: c }), { compatOldVariables: L } = useCompatOldVariables({
22660
+ }), D = useContextAssociationFields({ schema: a, maxDepth: 2, contextCollectionName: l, collectionField: c }), { compatOldVariables: O } = useCompatOldVariables({
22652
22661
  collectionField: c,
22653
22662
  uiSchema: T,
22654
22663
  targetFieldSchema: h,
@@ -22665,7 +22674,7 @@ const findOption$2 = (e = [], t) => {
22665
22674
  },
22666
22675
  [o, u]
22667
22676
  ), B = m(
22668
- L(_.isEmpty(F) ? R : F, {
22677
+ O(_.isEmpty(F) ? R : F, {
22669
22678
  value: t
22670
22679
  })
22671
22680
  );
@@ -23696,8 +23705,8 @@ const DynamicComponent$2 = (e) => {
23696
23705
  }
23697
23706
  });
23698
23707
  }, DateScopeComponent = (e) => {
23699
- var g, f, C, b, S, y, v, F, I, T, R, D, L, $;
23700
- 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) || (($ = (L = n == null ? void 0 : n.uiSchema) == null ? void 0 : L["x-component-props"]) == null ? void 0 : $.picker) || "date", m = useCallback(
23708
+ var g, f, C, b, S, y, v, F, I, T, R, D, O, $;
23709
+ 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) || (($ = (O = n == null ? void 0 : n.uiSchema) == null ? void 0 : O["x-component-props"]) == null ? void 0 : $.picker) || "date", m = useCallback(
23701
23710
  (B) => /* @__PURE__ */ jsx(
23702
23711
  SchemaComponent,
23703
23712
  {
@@ -24870,19 +24879,19 @@ const SchemaSettingsSwitchItem = (e) => {
24870
24879
  useEffect(() => {
24871
24880
  D.setInitialValues(cloneDeep$1(r));
24872
24881
  }, [JSON.stringify(r || {})]);
24873
- const L = useCallback(() => {
24882
+ const O = useCallback(() => {
24874
24883
  h(!1), D.reset();
24875
24884
  }, [D]), $ = useCallback(() => q(void 0, null, function* () {
24876
24885
  yield D.submit();
24877
24886
  try {
24878
- const O = D.values, M = Object.keys(O).reduce((k, j) => (D.query(j).take() && (k[j] = O[j]), k), {});
24887
+ const L = D.values, M = Object.keys(L).reduce((k, j) => (D.query(j).take() && (k[j] = L[j]), k), {});
24879
24888
  h(!1), yield o == null ? void 0 : o(cloneDeep$1(M));
24880
- } catch (O) {
24881
- console.error(O);
24889
+ } catch (L) {
24890
+ console.error(L);
24882
24891
  }
24883
24892
  }), [D, o]), B = useCallback(() => q(void 0, null, function* () {
24884
24893
  !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);
24885
- }), [F, S, y, b, i, g]), N = useCallback((O) => O.stopPropagation(), []);
24894
+ }), [F, S, y, b, i, g]), N = useCallback((L) => L.stopPropagation(), []);
24886
24895
  return /* @__PURE__ */ jsxs(zIndexContext.Provider, { value: R, children: [
24887
24896
  /* @__PURE__ */ jsx(
24888
24897
  SchemaSettingsItem,
@@ -24903,10 +24912,10 @@ const SchemaSettingsSwitchItem = (e) => {
24903
24912
  }, p), {
24904
24913
  destroyOnClose: !0,
24905
24914
  open: m,
24906
- onCancel: L,
24915
+ onCancel: O,
24907
24916
  zIndex: R,
24908
24917
  footer: /* @__PURE__ */ jsxs(Space$1, { children: [
24909
- /* @__PURE__ */ jsx(Button, { onClick: L, children: C("Cancel") }),
24918
+ /* @__PURE__ */ jsx(Button, { onClick: O, children: C("Cancel") }),
24910
24919
  /* @__PURE__ */ jsx(Button, { type: "primary", onClick: $, children: C("Submit") })
24911
24920
  ] }),
24912
24921
  children: /* @__PURE__ */ jsx(FormActiveFieldsProvider, { name: "form", getActiveFieldsName: I == null ? void 0 : I.getActiveFieldsName, children: /* @__PURE__ */ jsx(FormProvider, { form: D, children: /* @__PURE__ */ jsxs(FormLayout, { layout: "vertical", children: [
@@ -24949,7 +24958,7 @@ const SchemaSettingsModalItem = (e) => {
24949
24958
  "noRecord",
24950
24959
  "ModalContextProvider",
24951
24960
  "dialogRootClassName"
24952
- ]), 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() || {}, L = useCurrentRecord(), $ = useFormBlockContext(), B = useBlockContext(), { getOperators: N } = useOperators(), w = useLocationSearch(), O = useVariables$1(), M = useContext(AllDataBlocksContext), { formValue: k, collection: j, parent: z } = useSubFormValue(), E = useCurrentPopupRecord(), V = useParentPopupRecord();
24961
+ ]), 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() || {}, O = useCurrentRecord(), $ = useFormBlockContext(), B = useBlockContext(), { getOperators: N } = useOperators(), w = useLocationSearch(), L = useVariables$1(), M = useContext(AllDataBlocksContext), { formValue: k, collection: j, parent: z } = useSubFormValue(), E = useCurrentPopupRecord(), V = useParentPopupRecord();
24953
24962
  return t ? null : /* @__PURE__ */ jsx(
24954
24963
  SchemaSettingsItem,
24955
24964
  P(x({
@@ -24959,7 +24968,7 @@ const SchemaSettingsModalItem = (e) => {
24959
24968
  const G = l ? yield l() : c, H = _.isFunction(e.schema) ? e.schema() : e.schema;
24960
24969
  FormDialog(
24961
24970
  { title: H.title || o, width: u, rootClassName: m },
24962
- () => /* @__PURE__ */ jsx(AllDataBlocksContext.Provider, { value: M, children: /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(CollectOperators, { defaultOperators: N(), children: /* @__PURE__ */ jsx(VariablesContext.Provider, { value: O, children: /* @__PURE__ */ jsx(BlockContext.Provider, { value: B, children: /* @__PURE__ */ jsx(
24971
+ () => /* @__PURE__ */ jsx(AllDataBlocksContext.Provider, { value: M, children: /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(CollectOperators, { defaultOperators: N(), children: /* @__PURE__ */ jsx(VariablesContext.Provider, { value: L, children: /* @__PURE__ */ jsx(BlockContext.Provider, { value: B, children: /* @__PURE__ */ jsx(
24963
24972
  VariablePopupRecordProvider,
24964
24973
  {
24965
24974
  recordData: E == null ? void 0 : E.value,
@@ -24968,7 +24977,7 @@ const SchemaSettingsModalItem = (e) => {
24968
24977
  recordData: V == null ? void 0 : V.value,
24969
24978
  collection: V == null ? void 0 : V.collection
24970
24979
  },
24971
- children: /* @__PURE__ */ jsx(CollectionRecordProvider, { record: d ? null : R, children: /* @__PURE__ */ jsx(CurrentRecordContextProvider, P(x({}, L), { children: /* @__PURE__ */ jsx(FormBlockContext$1.Provider, { value: $, children: /* @__PURE__ */ jsx(SubFormProvider, { value: { value: k, collection: j, parent: z }, children: /* @__PURE__ */ jsx(
24980
+ children: /* @__PURE__ */ jsx(CollectionRecordProvider, { record: d ? null : R, children: /* @__PURE__ */ jsx(CurrentRecordContextProvider, P(x({}, O), { children: /* @__PURE__ */ jsx(FormBlockContext$1.Provider, { value: $, children: /* @__PURE__ */ jsx(SubFormProvider, { value: { value: k, collection: j, parent: z }, children: /* @__PURE__ */ jsx(
24972
24981
  FormActiveFieldsProvider,
24973
24982
  {
24974
24983
  name: "form",
@@ -25162,14 +25171,14 @@ const SchemaSettingsModalItem = (e) => {
25162
25171
  }
25163
25172
  }),
25164
25173
  [o, i, l, b, m, h, u, p, I, r]
25165
- ), L = useMemo(() => ({ ArrayCollapse: ArrayCollapse$2, FormLayout }), []), $ = useCallback(
25174
+ ), O = useMemo(() => ({ ArrayCollapse: ArrayCollapse$2, FormLayout }), []), $ = useCallback(
25166
25175
  (N) => {
25167
25176
  var j;
25168
25177
  const w = [];
25169
25178
  for (const z of N.fieldReaction.rules)
25170
25179
  w.push(_.omit(_.pickBy(z, _.identity), ["conditionBasic", "conditionAdvanced"]));
25171
- const O = b["x-component"] === "BlockTemplate" && ((j = b["x-component-props"]) == null ? void 0 : j.templateId), k = {
25172
- "x-uid": O && d(O).uid || b["x-uid"]
25180
+ const L = b["x-component"] === "BlockTemplate" && ((j = b["x-component-props"]) == null ? void 0 : j.templateId), k = {
25181
+ "x-uid": L && d(L).uid || b["x-uid"]
25173
25182
  };
25174
25183
  b[F] = w, k[F] = w, c.emit("patch", {
25175
25184
  schema: k
@@ -25181,7 +25190,7 @@ const SchemaSettingsModalItem = (e) => {
25181
25190
  SchemaSettingsModalItem,
25182
25191
  {
25183
25192
  title: T,
25184
- components: L,
25193
+ components: O,
25185
25194
  width: 770,
25186
25195
  schema: D,
25187
25196
  onSubmit: $,
@@ -25843,17 +25852,17 @@ const designerCss$4 = ({ margin: e = "-18px -16px", padding: t = "18px 16px" } =
25843
25852
  }
25844
25853
  },
25845
25854
  onSubmit: (D) => {
25846
- const L = {
25855
+ const O = {
25847
25856
  "x-uid": o["x-uid"]
25848
25857
  };
25849
- (n.componentProps.picker || "date") !== D.picker && !m && n.value && (n.value = void 0, n.initialValue = void 0, o.default = void 0, L.default = void 0), L["x-component-props"] = n.componentProps || {}, o["x-component-props"] = x(x({}, n.componentProps || {}), D), L["x-component-props"] = o["x-component-props"], n.componentProps = o["x-component-props"];
25858
+ (n.componentProps.picker || "date") !== D.picker && !m && n.value && (n.value = void 0, n.initialValue = void 0, o.default = void 0, O.default = void 0), O["x-component-props"] = n.componentProps || {}, o["x-component-props"] = x(x({}, n.componentProps || {}), D), O["x-component-props"] = o["x-component-props"], n.componentProps = o["x-component-props"];
25850
25859
  const $ = n.path.entire.split(".");
25851
25860
  $.pop();
25852
25861
  const B = $.join(".");
25853
25862
  n.query(`${B}.*[0:].${o.name}`).forEach((N) => {
25854
25863
  N.props.name === o.name && ((n.componentProps.picker || "date") !== D.picker && !m && (N.value = void 0, N.initialValue = void 0), N.setComponentProps(x({}, D)));
25855
25864
  }), r.emit("patch", {
25856
- schema: L
25865
+ schema: O
25857
25866
  }), r.refresh();
25858
25867
  }
25859
25868
  }
@@ -25882,7 +25891,7 @@ const getActionContext = (e) => {
25882
25891
  T != null && T.target && (u = p(
25883
25892
  `${T.target}.${((z = (j = n["x-component-props"]) == null ? void 0 : j.fieldNames) == null ? void 0 : z.label) || "id"}`
25884
25893
  ));
25885
- const D = (T == null ? void 0 : T.interface) === "m2o" && findParentFieldSchema(n), L = D && p(D == null ? void 0 : D["x-collection-field"]), $ = useTableBlockContext(), B = (T == null ? void 0 : T.interface) === "m2m" || (T == null ? void 0 : T.interface) === "mbm" || (L == null ? void 0 : L.type) === "hasMany" && (T == null ? void 0 : T.interface) === "m2o", N = useCallback(
25894
+ const D = (T == null ? void 0 : T.interface) === "m2o" && findParentFieldSchema(n), O = D && p(D == null ? void 0 : D["x-collection-field"]), $ = useTableBlockContext(), B = (T == null ? void 0 : T.interface) === "m2m" || (T == null ? void 0 : T.interface) === "mbm" || (O == null ? void 0 : O.type) === "hasMany" && (T == null ? void 0 : T.interface) === "m2o", N = useCallback(
25886
25895
  (E) => {
25887
25896
  const V = E.find((G) => G.value === "$nForm"), U = m(I);
25888
25897
  return !(U != null && U.length) && V && (V.children = formatVariableScop(y())), E;
@@ -25898,7 +25907,7 @@ const getActionContext = (e) => {
25898
25907
  hideVariableButton: t == null ? void 0 : t.hideVariableButton
25899
25908
  })
25900
25909
  )
25901
- }), []), O = useMemo(() => ({
25910
+ }), []), L = useMemo(() => ({
25902
25911
  type: "object",
25903
25912
  title: i("Set default value"),
25904
25913
  properties: {
@@ -25982,7 +25991,7 @@ const getActionContext = (e) => {
25982
25991
  title: i("Set default value"),
25983
25992
  components: w,
25984
25993
  width: 800,
25985
- schema: O,
25994
+ schema: L,
25986
25995
  onSubmit: M,
25987
25996
  ModalContextProvider: (E) => /* @__PURE__ */ jsx(FlagProvider, { isInSubForm: v, isInSubTable: F, isInSetDefaultValueDialog: !0, children: E.children })
25988
25997
  }
@@ -26761,13 +26770,13 @@ const useGetFilterOptions = () => {
26761
26770
  };
26762
26771
  });
26763
26772
  }, TableColumnDesigner$1 = (e) => {
26764
- var $, B, N, w, O, M, k, j, z, E, V, U;
26773
+ var $, B, N, w, L, M, k, j, z, E, V, U;
26765
26774
  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 = (($ = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : $.fieldNames) || ((B = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : B.fieldNames), m = useLabelFields$1((N = n == null ? void 0 : n.target) != null ? N : 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(
26766
26775
  n == null ? void 0 : n.interface
26767
- ), I = useFieldModeOptions({ fieldSchema: o }), T = ((O = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : O.mode) || "Select";
26776
+ ), I = useFieldModeOptions({ fieldSchema: o }), T = ((L = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : L.mode) || "Select";
26768
26777
  let R = "editable";
26769
26778
  o["x-disabled"] === !0 && (R = "readonly"), o["x-read-pretty"] === !0 && (R = "read-pretty");
26770
- const D = F && T === "Select", L = () => {
26779
+ const D = F && T === "Select", O = () => {
26771
26780
  const { name: G } = useCollection(), { linkageRulesProps: H } = useSchemaToolbar();
26772
26781
  return /* @__PURE__ */ jsx(SchemaSettingsLinkageRules, x({ category: "style" }, P(x({}, H), { collectionName: G })));
26773
26782
  };
@@ -26849,7 +26858,7 @@ const useGetFilterOptions = () => {
26849
26858
  }
26850
26859
  }
26851
26860
  ),
26852
- /* @__PURE__ */ jsx(L, {}),
26861
+ /* @__PURE__ */ jsx(O, {}),
26853
26862
  g && g.sortable === !0 && !S && /* @__PURE__ */ jsx(
26854
26863
  SchemaSettingsSwitchItem,
26855
26864
  {
@@ -28232,6 +28241,23 @@ function renderTemplate(e, t) {
28232
28241
  return get$1(t, r) || "";
28233
28242
  });
28234
28243
  }
28244
+ function getFilteredFormValues(e) {
28245
+ const t = _.cloneDeep(e.values), o = [];
28246
+ e.query("*").forEach((r) => {
28247
+ r && o.push(r);
28248
+ });
28249
+ const n = o.filter((r) => {
28250
+ var a;
28251
+ return (a = r == null ? void 0 : r.componentProps) == null ? void 0 : a.readOnlySubmit;
28252
+ }).map((r) => {
28253
+ var i;
28254
+ const a = ((i = r.path) == null ? void 0 : i.segments) || [];
28255
+ return a.length <= 1 ? a.join(".") : a.slice(0, -1).join(".");
28256
+ });
28257
+ for (const r of n)
28258
+ _.unset(t, r);
28259
+ return t;
28260
+ }
28235
28261
  function getFormValues({
28236
28262
  filterByTk: e,
28237
28263
  field: t,
@@ -28248,7 +28274,7 @@ function getFormValues({
28248
28274
  });
28249
28275
  return omit$1(x({}, o.values), l);
28250
28276
  }
28251
- return o.values;
28277
+ return getFilteredFormValues(o);
28252
28278
  }
28253
28279
  function useCollectValuesToSubmit() {
28254
28280
  const e = useForm(), t = useFilterByTk(), { field: o, resource: n } = useBlockRequestContext(), { fields: r, getField: a, getTreeParentField: i, name: l } = useCollection_deprecated(), c = r.map((f) => f.name), { fieldSchema: u } = useActionContext(), { getActiveFieldsName: d } = useFormActiveFields() || {}, p = useVariables$1(), m = useLocalVariables$1({ currentForm: e }), h = useFieldSchema(), g = useTreeParentRecord();
@@ -28263,12 +28289,12 @@ function useCollectValuesToSubmit() {
28263
28289
  resource: n,
28264
28290
  actionFields: (d == null ? void 0 : d("form")) || []
28265
28291
  }), S = {}, y = Object.keys(f).map((D) => q(this, null, function* () {
28266
- const L = f[D], $ = a(D);
28267
- if (isVariable$1(L)) {
28268
- const { value: B } = (yield p == null ? void 0 : p.parseVariable(L, m)) || {};
28292
+ const O = f[D], $ = a(D);
28293
+ if (isVariable$1(O)) {
28294
+ const { value: B } = (yield p == null ? void 0 : p.parseVariable(O, m)) || {};
28269
28295
  B != null && (S[D] = transformVariableValue(B, { targetCollectionField: $ }));
28270
28296
  } else
28271
- L !== "" && (S[D] = L);
28297
+ O !== "" && (S[D] = O);
28272
28298
  }));
28273
28299
  if (yield Promise.all(y), (I = u == null ? void 0 : u["x-component-props"]) == null ? void 0 : I.addChild) {
28274
28300
  const D = i();
@@ -28293,7 +28319,7 @@ function useCollectValuesToSubmit() {
28293
28319
  ]);
28294
28320
  }
28295
28321
  function interpolateVariables(e, t) {
28296
- return e.replace(/\{\{\s*([a-zA-Z0-9_$-.]+?)\s*\}\}/g, (o, n) => t[n] !== void 0 ? String(t[n]) : "");
28322
+ return e.replace(/\{\{\s*([a-zA-Z0-9_$.-]+?)\s*\}\}/g, (o, n) => t[n] !== void 0 ? String(t[n]) : "");
28297
28323
  }
28298
28324
  const useCreateActionProps = () => {
28299
28325
  var v;
@@ -28301,10 +28327,10 @@ const useCreateActionProps = () => {
28301
28327
  return {
28302
28328
  onClick() {
28303
28329
  return q(this, null, function* () {
28304
- var O, M;
28305
- const { onSuccess: I, skipValidator: T, triggerWorkflows: R } = (O = u == null ? void 0 : u["x-action-settings"]) != null ? O : {}, {
28330
+ var L, M;
28331
+ const { onSuccess: I, skipValidator: T, triggerWorkflows: R } = (L = u == null ? void 0 : u["x-action-settings"]) != null ? L : {}, {
28306
28332
  manualClose: D,
28307
- redirecting: L,
28333
+ redirecting: O,
28308
28334
  redirectTo: $,
28309
28335
  successMessage: B,
28310
28336
  actionAfterSuccess: N
@@ -28329,16 +28355,16 @@ const useCreateActionProps = () => {
28329
28355
  });
28330
28356
  j = interpolateVariables(z, E);
28331
28357
  }
28332
- if ((N === "previous" || !N && L !== !0) && (a == null || a(!1)), i == null || i(!0), l == null || l(!1), d.data.loading = !1, d.data.data = k, !B) {
28333
- message.success(h("Saved successfully")), yield resetFormCorrectly(o), (L && !N || N === "redirect") && j && (isURL(j) ? window.location.href = j : c(j));
28358
+ if ((N === "previous" || !N && O !== !0) && (a == null || a(!1)), i == null || i(!0), l == null || l(!1), d.data.loading = !1, d.data.data = k, !B) {
28359
+ message.success(h("Saved successfully")), yield resetFormCorrectly(o), (O && !N || N === "redirect") && j && (isURL(j) ? window.location.href = j : c(j));
28334
28360
  return;
28335
28361
  }
28336
28362
  D ? m.success({
28337
28363
  title: p(B),
28338
28364
  onOk: () => q(this, null, function* () {
28339
- yield resetFormCorrectly(o), (L && !N || N === "redirect") && j && (isURL(j) ? window.location.href = j : c(j));
28365
+ yield resetFormCorrectly(o), (O && !N || N === "redirect") && j && (isURL(j) ? window.location.href = j : c(j));
28340
28366
  })
28341
- }) : (message.success(p(B)), yield resetFormCorrectly(o), (L && !N || N === "redirect") && j && (isURL(j) ? window.location.href = j : c(j)));
28367
+ }) : (message.success(p(B)), yield resetFormCorrectly(o), (O && !N || N === "redirect") && j && (isURL(j) ? window.location.href = j : c(j)));
28342
28368
  } catch (k) {
28343
28369
  d.data.loading = !1;
28344
28370
  }
@@ -28355,16 +28381,16 @@ const useCreateActionProps = () => {
28355
28381
  const T = u.map((H) => H.name), {
28356
28382
  assignedValues: R = {},
28357
28383
  onSuccess: D,
28358
- overwriteValues: L,
28384
+ overwriteValues: O,
28359
28385
  skipValidator: $,
28360
28386
  triggerWorkflows: B
28361
- } = (j = l == null ? void 0 : l["x-action-settings"]) != null ? j : {}, N = (z = a == null ? void 0 : a["x-component-props"]) == null ? void 0 : z.addChild, { successMessage: w } = D || {}, O = {}, M = Object.keys(R).map((H) => q(this, null, function* () {
28387
+ } = (j = l == null ? void 0 : l["x-action-settings"]) != null ? j : {}, N = (z = a == null ? void 0 : a["x-component-props"]) == null ? void 0 : z.addChild, { successMessage: w } = D || {}, L = {}, M = Object.keys(R).map((H) => q(this, null, function* () {
28362
28388
  const K = R[H], J = d(H);
28363
28389
  if (isVariable$1(K)) {
28364
28390
  const { value: W } = (yield C == null ? void 0 : C.parseVariable(K, b)) || {};
28365
- W && (O[H] = transformVariableValue(W, { targetCollectionField: J }));
28391
+ W && (L[H] = transformVariableValue(W, { targetCollectionField: J }));
28366
28392
  } else
28367
- K !== "" && (O[H] = K);
28393
+ K !== "" && (L[H] = K);
28368
28394
  }));
28369
28395
  yield Promise.all(M), $ || (yield e.submit());
28370
28396
  const k = getFormValues({
@@ -28383,7 +28409,7 @@ const useCreateActionProps = () => {
28383
28409
  c.data = t.data || {}, c.data.loading = !0;
28384
28410
  try {
28385
28411
  const H = yield o[y]({
28386
- values: x(x(x({}, k), L), O),
28412
+ values: x(x(x({}, k), O), L),
28387
28413
  filterKeys: v,
28388
28414
  // TODO(refactor): should change to inject by plugin
28389
28415
  triggerWorkflows: B != null && B.length ? B.map((K) => [K.workflowKey, K.context].filter(Boolean).join("!")).join(",") : void 0
@@ -28497,7 +28523,7 @@ const useCreateActionProps = () => {
28497
28523
  return {
28498
28524
  onClick(f, C) {
28499
28525
  return q(this, null, function* () {
28500
- var w, O, M, k, j;
28526
+ var w, L, M, k, j;
28501
28527
  const {
28502
28528
  assignedValues: b = {},
28503
28529
  onSuccess: S,
@@ -28509,18 +28535,18 @@ const useCreateActionProps = () => {
28509
28535
  redirectTo: T,
28510
28536
  successMessage: R,
28511
28537
  actionAfterSuccess: D
28512
- } = S || {}, L = {}, $ = Object.keys(b).map((z) => q(this, null, function* () {
28538
+ } = S || {}, O = {}, $ = Object.keys(b).map((z) => q(this, null, function* () {
28513
28539
  const E = b[z], V = m(z);
28514
28540
  if (isVariable$1(E)) {
28515
28541
  const { value: U } = (yield u == null ? void 0 : u.parseVariable(E, d)) || {};
28516
- U && (L[z] = transformVariableValue(U, { targetCollectionField: V }));
28542
+ U && (O[z] = transformVariableValue(U, { targetCollectionField: V }));
28517
28543
  } else
28518
- E !== "" && (L[z] = E);
28544
+ E !== "" && (O[z] = E);
28519
28545
  }));
28520
28546
  yield Promise.all($), y === !1 && (yield l.submit());
28521
28547
  const B = yield e.update({
28522
28548
  filterByTk: n,
28523
- values: x({}, L),
28549
+ values: x({}, O),
28524
28550
  // TODO(refactor): should change to inject by plugin
28525
28551
  triggerWorkflows: v != null && v.length ? v.map((z) => [z.workflowKey, z.context].filter(Boolean).join("!")).join(",") : void 0
28526
28552
  });
@@ -28528,7 +28554,7 @@ const useCreateActionProps = () => {
28528
28554
  if (T) {
28529
28555
  const { exp: z, scope: E } = yield replaceVariables(T, {
28530
28556
  variables: u,
28531
- localVariables: [...d, { name: "$record", ctx: new Proxy((M = (O = B == null ? void 0 : B.data) == null ? void 0 : O.data) == null ? void 0 : M[0], {}) }]
28557
+ localVariables: [...d, { name: "$record", ctx: new Proxy((M = (L = B == null ? void 0 : B.data) == null ? void 0 : L.data) == null ? void 0 : M[0], {}) }]
28532
28558
  });
28533
28559
  N = interpolateVariables(z, E);
28534
28560
  }
@@ -28553,8 +28579,8 @@ const useCreateActionProps = () => {
28553
28579
  const {
28554
28580
  assignedValues: R = {},
28555
28581
  onSuccess: D,
28556
- updateMode: L
28557
- } = (j = a == null ? void 0 : a["x-action-settings"]) != null ? j : {}, { manualClose: $, redirecting: B, redirectTo: N, successMessage: w, actionAfterSuccess: O } = D || {};
28582
+ updateMode: O
28583
+ } = (j = a == null ? void 0 : a["x-action-settings"]) != null ? j : {}, { manualClose: $, redirecting: B, redirectTo: N, successMessage: w, actionAfterSuccess: L } = D || {};
28558
28584
  m.data = e.data || {}, m.data.loading = !0;
28559
28585
  const M = {}, k = Object.keys(R).map((E) => q(this, null, function* () {
28560
28586
  const V = R[E], U = C(E);
@@ -28564,9 +28590,9 @@ const useCreateActionProps = () => {
28564
28590
  } else
28565
28591
  V !== "" && (M[E] = V);
28566
28592
  }));
28567
- yield Promise.all(k), (O === "previous" || !O && B !== !0) && (S == null || S(!1)), h.confirm({
28593
+ yield Promise.all(k), (L === "previous" || !L && B !== !0) && (S == null || S(!1)), h.confirm({
28568
28594
  title: p("Bulk update"),
28569
- content: p(L === "selected" ? "Update selected data?" : "Update all data?"),
28595
+ content: p(O === "selected" ? "Update selected data?" : "Update all data?"),
28570
28596
  onOk() {
28571
28597
  return q(this, null, function* () {
28572
28598
  var U, G, H, K;
@@ -28575,7 +28601,7 @@ const useCreateActionProps = () => {
28575
28601
  filter: E,
28576
28602
  forceUpdate: !1
28577
28603
  };
28578
- if (L === "selected") {
28604
+ if (O === "selected") {
28579
28605
  if (!(c != null && c.length)) {
28580
28606
  message.error(p("Please select the records to be updated")), m.data.loading = !1;
28581
28607
  return;
@@ -28592,9 +28618,9 @@ const useCreateActionProps = () => {
28592
28618
  t instanceof TableFieldResource || (K = (H = o == null ? void 0 : o.service) == null ? void 0 : H.refresh) == null || K.call(H), w && ($ ? h.success({
28593
28619
  title: d(w),
28594
28620
  onOk: () => q(this, null, function* () {
28595
- (B && !O || O === "redirect") && N && (isURL(N) ? window.location.href = N : u(N));
28621
+ (B && !L || L === "redirect") && N && (isURL(N) ? window.location.href = N : u(N));
28596
28622
  })
28597
- }) : (message.success(d(w)), (B && !O || O === "redirect") && N && (isURL(N) ? window.location.href = N : u(N))));
28623
+ }) : (message.success(d(w)), (B && !L || L === "redirect") && N && (isURL(N) ? window.location.href = N : u(N))));
28598
28624
  });
28599
28625
  },
28600
28626
  onCancel() {
@@ -28613,11 +28639,11 @@ const useCreateActionProps = () => {
28613
28639
  onClick() {
28614
28640
  return q(this, null, function* () {
28615
28641
  var E, V, U, G;
28616
- const { skipValidator: I, onSuccess: T, requestSettings: R } = (E = n == null ? void 0 : n["x-action-settings"]) != null ? E : {}, { manualClose: D, redirecting: L, redirectTo: $, successMessage: B, actionAfterSuccess: N } = T || {}, w = n == null ? void 0 : n["x-action"];
28642
+ const { skipValidator: I, onSuccess: T, requestSettings: R } = (E = n == null ? void 0 : n["x-action-settings"]) != null ? E : {}, { manualClose: D, redirecting: O, redirectTo: $, successMessage: B, actionAfterSuccess: N } = T || {}, w = n == null ? void 0 : n["x-action"];
28617
28643
  if (!R.url)
28618
28644
  return;
28619
28645
  I !== !0 && w === "customize:form:request" && (yield a.submit());
28620
- const O = R.headers ? JSON.parse(R.headers) : {}, M = R.params ? JSON.parse(R.params) : {}, k = R.data ? JSON.parse(R.data) : {};
28646
+ const L = R.headers ? JSON.parse(R.headers) : {}, M = R.params ? JSON.parse(R.params) : {}, k = R.data ? JSON.parse(R.data) : {};
28621
28647
  if (w === "customize:form:request" && ["POST", "PUT", "PATCH"].includes(R.method)) {
28622
28648
  const H = i.map((J) => J.name), K = getFormValues({
28623
28649
  filterByTk: o,
@@ -28633,16 +28659,16 @@ const useCreateActionProps = () => {
28633
28659
  const z = {
28634
28660
  url: renderTemplate(R.url, { currentRecord: m, currentUser: g }),
28635
28661
  method: R.method,
28636
- headers: parse(O)({ currentRecord: m, currentUser: g }),
28662
+ headers: parse(L)({ currentRecord: m, currentUser: g }),
28637
28663
  params: parse(M)({ currentRecord: m, currentUser: g }),
28638
28664
  data: parse(k)({ currentRecord: m, currentUser: g })
28639
28665
  };
28640
28666
  f.data = c.data || {}, f.data.loading = !0;
28641
28667
  try {
28642
- yield e.request(x({}, z)), f.data.loading = !1, u instanceof TableFieldResource || (U = (V = d == null ? void 0 : d.service) == null ? void 0 : V.refresh) == null || U.call(V), (G = p == null ? void 0 : p.refresh) == null || G.call(p), w === "customize:form:request" && (N === "previous" || !N && L !== !0) && (b == null || b(!1)), B || (message.success(C("Saved successfully")), yield resetFormCorrectly(a), (L && !N || N === "redirect") && $ && (isURL($) ? window.location.href = $ : t($))), D ? S.success({
28668
+ yield e.request(x({}, z)), f.data.loading = !1, u instanceof TableFieldResource || (U = (V = d == null ? void 0 : d.service) == null ? void 0 : V.refresh) == null || U.call(V), (G = p == null ? void 0 : p.refresh) == null || G.call(p), w === "customize:form:request" && (N === "previous" || !N && O !== !0) && (b == null || b(!1)), B || (message.success(C("Saved successfully")), yield resetFormCorrectly(a), (O && !N || N === "redirect") && $ && (isURL($) ? window.location.href = $ : t($))), D ? S.success({
28643
28669
  title: r(B),
28644
28670
  onOk: () => q(this, null, function* () {
28645
- (L && !N || N === "redirect") && $ && (isURL($) ? window.location.href = $ : t($));
28671
+ (O && !N || N === "redirect") && $ && (isURL($) ? window.location.href = $ : t($));
28646
28672
  })
28647
28673
  }) : message.success(r(B));
28648
28674
  } finally {
@@ -28661,13 +28687,13 @@ const useCreateActionProps = () => {
28661
28687
  assignedValues: T = {},
28662
28688
  onSuccess: R,
28663
28689
  overwriteValues: D,
28664
- skipValidator: L,
28690
+ skipValidator: O,
28665
28691
  triggerWorkflows: $
28666
28692
  } = (V = l == null ? void 0 : l["x-action-settings"]) != null ? V : {}, {
28667
28693
  manualClose: B,
28668
28694
  redirecting: N,
28669
28695
  redirectTo: w,
28670
- successMessage: O,
28696
+ successMessage: L,
28671
28697
  actionAfterSuccess: M
28672
28698
  } = R || {}, k = {}, j = Object.keys(T).map((H) => q(this, null, function* () {
28673
28699
  const K = T[H], J = d(H);
@@ -28677,7 +28703,7 @@ const useCreateActionProps = () => {
28677
28703
  } else
28678
28704
  K !== "" && (k[H] = K);
28679
28705
  }));
28680
- yield Promise.all(j), L || (yield e.submit());
28706
+ yield Promise.all(j), O || (yield e.submit());
28681
28707
  const z = u.map((H) => H.name), E = getFormValues({
28682
28708
  filterByTk: t,
28683
28709
  field: o,
@@ -28706,14 +28732,14 @@ const useCreateActionProps = () => {
28706
28732
  });
28707
28733
  K = interpolateVariables(J, W);
28708
28734
  }
28709
- if ((M === "previous" || !M && N !== !0) && (a == null || a(!1)), i == null || i(!1), !O)
28735
+ if ((M === "previous" || !M && N !== !0) && (a == null || a(!1)), i == null || i(!1), !L)
28710
28736
  return;
28711
28737
  B ? f.success({
28712
- title: m(O),
28738
+ title: m(L),
28713
28739
  onOk: () => q(this, null, function* () {
28714
28740
  yield e.reset(), (N && !M || M === "redirect") && K && (isURL(K) ? window.location.href = K : c(K));
28715
28741
  })
28716
- }) : (message.success(m(O)), (N && !M || M === "redirect" || M === "redirect") && K && (isURL(K) ? window.location.href = K : c(K)));
28742
+ }) : (message.success(m(L)), (N && !M || M === "redirect" || M === "redirect") && K && (isURL(K) ? window.location.href = K : c(K)));
28717
28743
  } catch (H) {
28718
28744
  h.data.loading = !1;
28719
28745
  }
@@ -28872,7 +28898,7 @@ const useCreateActionProps = () => {
28872
28898
  /** 渲染 Collapse 的列表数据 */
28873
28899
  list: (d == null ? void 0 : d.data) || [],
28874
28900
  onSelected: (F) => {
28875
- var T, R, D, L;
28901
+ var T, R, D, O;
28876
28902
  const I = ((R = (T = t.params) == null ? void 0 : T[1]) == null ? void 0 : R.filters) || {};
28877
28903
  F.length ? I[`af.${c}`] = {
28878
28904
  [`${c}.${a}.$in`]: F
@@ -28880,7 +28906,7 @@ const useCreateActionProps = () => {
28880
28906
  P(x({}, (D = t.params) == null ? void 0 : D[0]), {
28881
28907
  pageSize: 200,
28882
28908
  page: 1,
28883
- filter: mergeFilter([...Object.values(I), (L = o == null ? void 0 : o.params) == null ? void 0 : L.filter])
28909
+ filter: mergeFilter([...Object.values(I), (O = o == null ? void 0 : o.params) == null ? void 0 : O.filter])
28884
28910
  }),
28885
28911
  { filters: I }
28886
28912
  );
@@ -28902,7 +28928,7 @@ const useCreateActionProps = () => {
28902
28928
  var o;
28903
28929
  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);
28904
28930
  }, useAssociationFilterBlockProps = () => {
28905
- var v, F, I, T, R, D, L, $, B, N;
28931
+ var v, F, I, T, R, D, O, $, B, N;
28906
28932
  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 });
28907
28933
  let p, m, h, g, f, C, b, S;
28908
28934
  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(
@@ -28930,16 +28956,16 @@ const useCreateActionProps = () => {
28930
28956
  b,
28931
28957
  g,
28932
28958
  C,
28933
- (L = a.componentProps) == null ? void 0 : L.params,
28959
+ (O = a.componentProps) == null ? void 0 : O.params,
28934
28960
  (B = ($ = a.componentProps) == null ? void 0 : $.params) == null ? void 0 : B.sort,
28935
28961
  d
28936
28962
  ]);
28937
28963
  const y = useCallback(
28938
28964
  (w) => {
28939
- const { targets: O, uid: M } = findFilterTargets(t);
28965
+ const { targets: L, uid: M } = findFilterTargets(t);
28940
28966
  n().forEach((k) => {
28941
28967
  var G, H, K, J;
28942
- if (!O.find((W) => W.uid === k.uid))
28968
+ if (!L.find((W) => W.uid === k.uid))
28943
28969
  return;
28944
28970
  const z = `${M}${t.name}`, E = ((G = k.service.params) == null ? void 0 : G[0]) || {};
28945
28971
  (K = (H = k.service.params) == null ? void 0 : H[1]) != null && K.filters || _.set(k.service.params, "[1].filters", {});
@@ -28968,14 +28994,14 @@ const useCreateActionProps = () => {
28968
28994
  if (!e)
28969
28995
  return {};
28970
28996
  if (isOptionalField(e)) {
28971
- const w = o.find((k) => k.name === t.name), O = {
28997
+ const w = o.find((k) => k.name === t.name), L = {
28972
28998
  select: "$in",
28973
28999
  multipleSelect: "$anyOf",
28974
29000
  checkbox: "$in",
28975
29001
  checkboxGroup: "$anyOf"
28976
29002
  }, M = ((N = w == null ? void 0 : w.uiSchema) == null ? void 0 : N.enum) || [];
28977
29003
  C = "value", b = "label", p = M, h = {}, g = () => {
28978
- }, S = `${w.name}.${O[w.interface]}`, m = (k) => {
29004
+ }, S = `${w.name}.${L[w.interface]}`, m = (k) => {
28979
29005
  const j = k.target.value;
28980
29006
  if (!j) {
28981
29007
  p = M;
@@ -29264,37 +29290,37 @@ const useSyncFromForm = (e, t, o) => {
29264
29290
  return R;
29265
29291
  if (S > y)
29266
29292
  return [];
29267
- const D = r(C).map((L) => {
29293
+ const D = r(C).map((O) => {
29268
29294
  var w;
29269
- if (b.includes(L.name) || !L.interface || ["sort", "password", "sequence"].includes(L.type))
29295
+ if (b.includes(O.name) || !O.interface || ["sort", "password", "sequence"].includes(O.type))
29270
29296
  return;
29271
29297
  const $ = {
29272
29298
  type: "duplicate",
29273
- tag: c((w = L.uiSchema) == null ? void 0 : w.title) || L.name
29299
+ tag: c((w = O.uiSchema) == null ? void 0 : w.title) || O.name
29274
29300
  }, B = P(x({}, $), {
29275
29301
  title: React.createElement(TreeNode, $),
29276
- key: v ? `${v}.${L.name}` : L.name,
29302
+ key: v ? `${v}.${O.name}` : O.name,
29277
29303
  isLeaf: !0,
29278
- field: L,
29304
+ field: O,
29279
29305
  disabled: F
29280
- }), N = I.find((O) => O.name === B.key);
29281
- if (["belongsTo", "belongsToMany"].includes(L.type) && (!N || ["Select", "Picker"].includes(N == null ? void 0 : N.fieldMode)))
29282
- $.type = "reference", B.type = "reference", B.title = React.createElement(TreeNode, P(x({}, $), { type: "reference" })), B.isLeaf = !1, B.children = m(L.target, {
29306
+ }), N = I.find((L) => L.name === B.key);
29307
+ if (["belongsTo", "belongsToMany"].includes(O.type) && (!N || ["Select", "Picker"].includes(N == null ? void 0 : N.fieldMode)))
29308
+ $.type = "reference", B.type = "reference", B.title = React.createElement(TreeNode, P(x({}, $), { type: "reference" })), B.isLeaf = !1, B.children = m(O.target, {
29283
29309
  depth: S + 1,
29284
29310
  maxDepth: y,
29285
29311
  prefix: B.key,
29286
29312
  exclude: systemKeys
29287
29313
  });
29288
- else if (["hasOne", "hasMany"].includes(L.type) || ["Nester", "SubTable"].includes(N == null ? void 0 : N.fieldMode)) {
29289
- let O = !1;
29290
- ["hasOne", "hasMany"].includes(L.type) && ["Select", "Picker"].includes(N == null ? void 0 : N.fieldMode) && (O = !0), B.disabled = !0, B.isLeaf = !1, B.children = p(
29291
- L.target,
29314
+ else if (["hasOne", "hasMany"].includes(O.type) || ["Nester", "SubTable"].includes(N == null ? void 0 : N.fieldMode)) {
29315
+ let L = !1;
29316
+ ["hasOne", "hasMany"].includes(O.type) && ["Select", "Picker"].includes(N == null ? void 0 : N.fieldMode) && (L = !0), B.disabled = !0, B.isLeaf = !1, B.children = p(
29317
+ O.target,
29292
29318
  {
29293
29319
  depth: S + 1,
29294
29320
  maxDepth: y,
29295
29321
  prefix: B.key,
29296
29322
  exclude: ["id", ...systemKeys],
29297
- disabled: O
29323
+ disabled: L
29298
29324
  },
29299
29325
  I
29300
29326
  );
@@ -29315,16 +29341,16 @@ const useSyncFromForm = (e, t, o) => {
29315
29341
  const D = {
29316
29342
  type: "preloading",
29317
29343
  tag: c(($ = R.uiSchema) == null ? void 0 : $.title) || R.name
29318
- }, L = b ? `${b}.${R.name}` : R.name;
29344
+ }, O = b ? `${b}.${R.name}` : R.name;
29319
29345
  return {
29320
29346
  type: "preloading",
29321
29347
  tag: c((B = R.uiSchema) == null ? void 0 : B.title) || R.name,
29322
29348
  title: React.createElement(TreeNode, D),
29323
- key: L,
29349
+ key: O,
29324
29350
  isLeaf: !1,
29325
29351
  field: R,
29326
29352
  children: m(R.target, {
29327
- prefix: L,
29353
+ prefix: O,
29328
29354
  depth: y + 1,
29329
29355
  maxDepth: S,
29330
29356
  exclude: v
@@ -29348,9 +29374,9 @@ const useSyncFromForm = (e, t, o) => {
29348
29374
  const f = /* @__PURE__ */ new Set([]), C = /* @__PURE__ */ new Set([]), b = (v, F) => {
29349
29375
  var I;
29350
29376
  (I = v == null ? void 0 : v.reduceProperties) == null || I.call(v, (T, R) => {
29351
- var O, M, k;
29352
- const D = T || F, L = R["x-collection-field"] && n(R["x-collection-field"]), $ = R.name.includes("."), B = L && ["hasOne", "hasMany", "belongsTo", "belongsToMany"].includes(L.type), N = !B && $ ? getAssociationPath(R.name) : R.name, w = D === "" || !D ? N : D + "." + N;
29353
- if (L && !(["hasOne", "hasMany"].includes(L.type) || ["SubForm", "Nester"].includes((O = R["x-component-props"]) == null ? void 0 : O.mode)) && C.add(w), L && (B || $) && R["x-component"] !== "TableField") {
29377
+ var L, M, k;
29378
+ const D = T || F, O = R["x-collection-field"] && n(R["x-collection-field"]), $ = R.name.includes("."), B = O && ["hasOne", "hasMany", "belongsTo", "belongsToMany"].includes(O.type), N = !B && $ ? getAssociationPath(R.name) : R.name, w = D === "" || !D ? N : D + "." + N;
29379
+ if (O && !(["hasOne", "hasMany"].includes(O.type) || ["SubForm", "Nester"].includes((L = R["x-component-props"]) == null ? void 0 : L.mode)) && C.add(w), O && (B || $) && R["x-component"] !== "TableField") {
29354
29380
  if (f.add({ name: w, fieldMode: ((M = R["x-component-props"]) == null ? void 0 : M.mode) || "Select" }), ["Nester", "SubTable"].includes((k = R["x-component-props"]) == null ? void 0 : k.mode)) {
29355
29381
  const j = D && D !== "" ? D + "." + R.name : R.name;
29356
29382
  b(R, j);
@@ -30225,7 +30251,9 @@ const DragHandler = (e) => {
30225
30251
  r.parseVariable(S, b, { appends: y }).then(({ value: v }) => {
30226
30252
  nextTick(() => {
30227
30253
  const F = transformVariableValue(v, { targetCollectionField: p.current });
30228
- _.isEmpty(F) && !_.isNumber(F) ? a.value = null : a.value = F;
30254
+ _.isEmpty(F) && !_.isNumber(F) ? a.value = null : (a.value = F, a.componentProps = P(x({}, a.componentProps), {
30255
+ readOnlySubmit: !0
30256
+ }));
30229
30257
  });
30230
30258
  }).catch((v) => {
30231
30259
  console.error(v);
@@ -30456,7 +30484,7 @@ const useParseDefaultValue = () => {
30456
30484
  if (o && e && (isVariable$1(t.default) && e.value == null || e.value === t.default || T)) {
30457
30485
  e.loading = !0;
30458
30486
  const D = !t.name.toString().includes(".") && (d == null ? void 0 : d.getField(t.name)), {
30459
- value: L,
30487
+ value: O,
30460
30488
  collectionName: $,
30461
30489
  dataSource: B = "main"
30462
30490
  } = yield o.parseVariable(t.default, n, {
@@ -30471,7 +30499,7 @@ const useParseDefaultValue = () => {
30471
30499
  e.loading = !1;
30472
30500
  return;
30473
30501
  }
30474
- const N = transformVariableValue(L, {
30502
+ const N = transformVariableValue(O, {
30475
30503
  targetCollectionField: D
30476
30504
  });
30477
30505
  N == null || N === "" ? e.mounted && (e.setInitialValue(null), yield e.reset({ forceClear: !0 })) : p() ? h === 0 && m(N) : e.setInitialValue(N), e.loading = !1;
@@ -30482,7 +30510,7 @@ const useParseDefaultValue = () => {
30482
30510
  const T = getVariableName(t.default), R = S(T);
30483
30511
  return R ? (y(), reaction(
30484
30512
  () => {
30485
- const L = { [T]: (R == null ? void 0 : R.ctx) || {} }, $ = getPath(t.default), B = getValuesByPath(L, $);
30513
+ const O = { [T]: (R == null ? void 0 : R.ctx) || {} }, $ = getPath(t.default), B = getValuesByPath(O, $);
30486
30514
  return B === void 0 ? Math.random() : B;
30487
30515
  },
30488
30516
  () => v({ forceUpdate: !0 }),
@@ -31411,9 +31439,9 @@ const createSubmitActionSettings = new SchemaSettings({
31411
31439
  },
31412
31440
  { displayName: "GeneralSchemaItems" }
31413
31441
  ), useAfterSuccessOptions = () => {
31414
- const e = useCollection_deprecated(), { t } = useTranslation(), o = useCollectionFilterOptions(e), n = useCollectionFilterOptions("users", "main"), r = useCompile(), a = useCollectionRecordData(), { form: i } = useFormBlockContext(), [l, c] = useMemo(() => [r(o), r(n)], [o, n]), { settings: u, shouldDisplayPopupRecord: d } = usePopupVariable(), { currentRoleSettings: p } = useCurrentRoleVariable(), m = useCollectionRecordData();
31442
+ const e = useCollection_deprecated(), { t } = useTranslation(), o = useCollectionFilterOptions(e), n = useCollectionFilterOptions("users", "main"), r = useCompile(), a = useCollectionRecordData(), { form: i } = useFormBlockContext(), [l, c] = useMemo(() => [r(o), r(n)], [o, n]), { settings: u, shouldDisplayPopupRecord: d } = usePopupVariable(), { currentRoleSettings: p } = useCurrentRoleVariable();
31415
31443
  return useMemo(() => [
31416
- (m || i) && {
31444
+ i && {
31417
31445
  value: "$record",
31418
31446
  label: t("Response record", { ns: "client" }),
31419
31447
  children: [...l]
@@ -36257,8 +36285,8 @@ const enabledIndexColumn$1 = {
36257
36285
  name: "fieldSettings:component:CascadeSelect",
36258
36286
  items: [fieldComponent$6, titleField$1, ellipsisSettingsItem, setTheDataScope]
36259
36287
  }), SchemaSettingsDateRange = function e(t) {
36260
- var T, R, D, L, $, B, N, w, O, M, k, j, z, E, V, U;
36261
- 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 = ((L = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : L.dateFormat) || ((B = ($ = u == null ? void 0 : u.uiSchema) == null ? void 0 : $["x-component-props"]) == null ? void 0 : B.dateFormat) || "YYYY-MM-DD", m = ((N = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : N.timeFormat) || ((O = (w = u == null ? void 0 : u.uiSchema) == null ? void 0 : w["x-component-props"]) == null ? void 0 : O.timeFormat) || "HH:mm:ss", h = ((M = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : M.picker) || ((j = (k = u == null ? void 0 : u.uiSchema) == null ? void 0 : k["x-component-props"]) == null ? void 0 : j.picker) || "date";
36288
+ var T, R, D, O, $, B, N, w, L, M, k, j, z, E, V, U;
36289
+ 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 = ((O = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : O.dateFormat) || ((B = ($ = u == null ? void 0 : u.uiSchema) == null ? void 0 : $["x-component-props"]) == null ? void 0 : B.dateFormat) || "YYYY-MM-DD", m = ((N = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : N.timeFormat) || ((L = (w = u == null ? void 0 : u.uiSchema) == null ? void 0 : w["x-component-props"]) == null ? void 0 : L.timeFormat) || "HH:mm:ss", h = ((M = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : M.picker) || ((j = (k = u == null ? void 0 : u.uiSchema) == null ? void 0 : k["x-component-props"]) == null ? void 0 : j.picker) || "date";
36262
36290
  o["x-read-pretty"] || n.readOnly || n.readPretty;
36263
36291
  const g = (z = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : z._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 = ((U = u == null ? void 0 : u.uiSchema) == null ? void 0 : U["x-component-props"].utc) || !1, S = useRecord(), { form: y } = useFormBlockContext(), v = useCallback(
36264
36292
  (G) => /* @__PURE__ */ jsx(
@@ -37718,11 +37746,11 @@ const useBuiltInVariables = () => {
37718
37746
  l
37719
37747
  ]) };
37720
37748
  }, filterEmptyValues = (e) => Array.isArray(e) ? e.filter((t) => t === 0 || t === !1 || t) : e, TYPE_TO_ACTION = {
37721
- hasMany: "list?pageSize=9999",
37749
+ hasMany: "list?paginate=false",
37722
37750
  belongsTo: "get",
37723
37751
  hasOne: "get",
37724
- belongsToMany: "list?pageSize=9999",
37725
- belongsToArray: "get"
37752
+ belongsToMany: "list?paginate=false",
37753
+ belongsToArray: "list?paginate=false"
37726
37754
  }, getAction = (e) => TYPE_TO_ACTION[e], requested = {}, hasRequested = (e) => !!requested[e], getRequested = (e) => requested[e], stashRequested = (e, t) => {
37727
37755
  requested[e] = t;
37728
37756
  }, clearRequested = (e) => {
@@ -37741,11 +37769,11 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
37741
37769
  _.isFunction(C) ? o.current = C(o.current) : o.current = C;
37742
37770
  }, []), u = useCallback(
37743
37771
  (C, b, S) => q(void 0, null, function* () {
37744
- var w, O;
37772
+ var w, L;
37745
37773
  const y = C.split("."), v = y[0], F = mergeVariableToCollectionNameWithLocalVariables(variablesStore, b);
37746
37774
  let I = mergeCtxWithLocalVariables(o.current, b);
37747
37775
  const { fieldPath: T, dataSource: R, variableOption: D } = getFieldPath$1(v, F);
37748
- let L = T;
37776
+ let O = T;
37749
37777
  const { fieldPath: $ } = getFieldPath$1(C, F), B = y.length === 1 ? D == null ? void 0 : D.collectionName : (w = r($, R)) == null ? void 0 : w.target;
37750
37778
  if (!(v in I))
37751
37779
  throw new Error(`VariablesProvider: ${v} is not found`);
@@ -37756,11 +37784,11 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
37756
37784
  dataSource: R,
37757
37785
  collectionName: B
37758
37786
  };
37759
- const k = y[M], j = y.slice(0, M + 1).join("."), { fieldPath: z } = getFieldPath$1(j, F), E = r(z, R), V = (O = a(L, R)) == null ? void 0 : O.getPrimaryKey();
37787
+ const k = y[M], j = y.slice(0, M + 1).join("."), { fieldPath: z } = getFieldPath$1(j, F), E = r(z, R), V = (L = a(O, R)) == null ? void 0 : L.getPrimaryKey();
37760
37788
  if (Array.isArray(I)) {
37761
37789
  const U = I.map((G) => {
37762
37790
  if (!(S != null && S.doNotRequest) && shouldToRequest(G == null ? void 0 : G[k]) && (G == null ? void 0 : G[V]) != null && E != null && E.target) {
37763
- const H = `/${L}/${G[E.sourceKey || V]}/${k}:${getAction(E.type)}`;
37791
+ const H = `/${O}/${G[E.sourceKey || V]}/${k}:${getAction(E.type)}`;
37764
37792
  if (hasRequested(H))
37765
37793
  return getRequested(H);
37766
37794
  const K = n.request({
@@ -37776,7 +37804,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
37776
37804
  });
37777
37805
  I = removeThroughCollectionFields(_.flatten(yield Promise.all(U)), E);
37778
37806
  } else if (!(S != null && S.doNotRequest) && shouldToRequest(I[k]) && I[V] != null && (E != null && E.target)) {
37779
- const U = `/${L}/${I[E.sourceKey || V]}/${k}:${getAction(E.type)}`;
37807
+ const U = `/${O}/${I[E.sourceKey || V]}/${k}:${getAction(E.type)}`;
37780
37808
  let G = null;
37781
37809
  if (hasRequested(U))
37782
37810
  G = yield getRequested(U);
@@ -37794,7 +37822,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
37794
37822
  I = removeThroughCollectionFields(H, E);
37795
37823
  } else
37796
37824
  I = removeThroughCollectionFields(getValuesByPath(I, k), E);
37797
- E != null && E.target && (L = E.target);
37825
+ E != null && E.target && (O = E.target);
37798
37826
  }
37799
37827
  const N = i(
37800
37828
  _.isFunction(I) ? I({ fieldOperator: S == null ? void 0 : S.fieldOperator, isParsingVariable: !0 }) : I
@@ -38082,7 +38110,7 @@ const NocoBaseField = (e) => {
38082
38110
  return h["x-component"] === "CollectionField" ? /* @__PURE__ */ jsx(IsInNocoBaseRecursionFieldContext.Provider, { value: !0, children: /* @__PURE__ */ jsx(CollectionFieldUISchemaProvider, { fieldSchema: h, children: g }) }, `${p}-${d}`) : /* @__PURE__ */ jsx(IsInNocoBaseRecursionFieldContext.Provider, { value: !1, children: /* @__PURE__ */ jsx(CollectionFieldUISchemaContext.Provider, { value: EMPTY_OBJECT, children: g }) }, `${p}-${d}`);
38083
38111
  }) }) : null;
38084
38112
  }, IsInNocoBaseRecursionFieldContext = React.createContext(!1), useIsInNocoBaseRecursionFieldContext = () => React.useContext(IsInNocoBaseRecursionFieldContext), NocoBaseRecursionField = React.memo((e) => {
38085
- var D, L;
38113
+ var D, O;
38086
38114
  const {
38087
38115
  schema: t,
38088
38116
  name: o,
@@ -38096,7 +38124,7 @@ const NocoBaseField = (e) => {
38096
38124
  uiSchema: d,
38097
38125
  parentSchema: p
38098
38126
  } = e, m = useBasePath(e), h = useRef(null), g = useMemo(() => (h.current = null, new Schema(t)), [t]), { uiSchema: f, defaultValue: C } = useCollectionFieldUISchema(), b = useUpdate(), { onChange: S } = useContext(SchemaComponentOnChangeContext), y = h.current || g;
38099
- !y.parent && p && (y.parent = p, !((L = (D = y.parent) == null ? void 0 : D.properties) != null && L[y.name]) && y.name && _.set(y.parent, `properties.${y.name}`, y));
38127
+ !y.parent && p && (y.parent = p, !((O = (D = y.parent) == null ? void 0 : D.properties) != null && O[y.name]) && y.name && _.set(y.parent, `properties.${y.name}`, y));
38100
38128
  const v = useCallback(() => {
38101
38129
  const $ = y.parent;
38102
38130
  h.current = new Schema(y.toJSON(), $), $ != null && $.properties && Object.keys($.properties).forEach((B) => {
@@ -38260,11 +38288,11 @@ const ActionLink = withDynamicSchemaProps(
38260
38288
  "onMouseEnter",
38261
38289
  "refreshDataBlockRequest",
38262
38290
  "confirmTitle"
38263
- ]), v = useDesigner(), F = useField(), I = useFieldSchema(), T = useCompile(), R = useCollectionRecordData(), D = T((K = I["x-component-props"]) == null ? void 0 : K.confirm) || g, L = useMemo(() => (I == null ? void 0 : I["x-linkage-rules"]) || [], [I == null ? void 0 : I["x-linkage-rules"]]), { designable: $ } = useDesignable(), B = useComponent(n) || n, N = useVariables$1(), w = useLocalVariables$1({
38291
+ ]), v = useDesigner(), F = useField(), I = useFieldSchema(), T = useCompile(), R = useCollectionRecordData(), D = T((K = I["x-component-props"]) == null ? void 0 : K.confirm) || g, O = useMemo(() => (I == null ? void 0 : I["x-linkage-rules"]) || [], [I == null ? void 0 : I["x-linkage-rules"]]), { designable: $ } = useDesignable(), B = useComponent(n) || n, N = useVariables$1(), w = useLocalVariables$1({
38264
38292
  currentForm: { values: R, readPretty: !1 }
38265
- }), { visibleWithURL: O, setVisibleWithURL: M } = usePopupUtils(), { setSubmitted: k } = useActionContext(), { getAriaLabel: j } = useGetAriaLabelOfAction(l), z = useCollectionParentRecordData(), E = useApp(), { getAllDataBlocks: V } = useAllDataBlocks();
38293
+ }), { visibleWithURL: L, setVisibleWithURL: M } = usePopupUtils(), { setSubmitted: k } = useActionContext(), { getAriaLabel: j } = useGetAriaLabelOfAction(l), z = useCollectionParentRecordData(), E = useApp(), { getAllDataBlocks: V } = useAllDataBlocks();
38266
38294
  useEffect(() => {
38267
- F.stateOfLinkageRules && setInitialActionState(F), F.stateOfLinkageRules = {}, L.filter((J) => !J.disabled).forEach((J) => {
38295
+ F.stateOfLinkageRules && setInitialActionState(F), F.stateOfLinkageRules = {}, O.filter((J) => !J.disabled).forEach((J) => {
38268
38296
  var W;
38269
38297
  (W = J.actions) == null || W.forEach((X) => {
38270
38298
  linkageAction(
@@ -38280,7 +38308,7 @@ const ActionLink = withDynamicSchemaProps(
38280
38308
  );
38281
38309
  });
38282
38310
  });
38283
- }, [F, L, w, N]);
38311
+ }, [F, O, w, N]);
38284
38312
  const U = useCallback(
38285
38313
  (J) => {
38286
38314
  C == null || C(J);
@@ -38324,7 +38352,7 @@ const ActionLink = withDynamicSchemaProps(
38324
38352
  style: u,
38325
38353
  propsDisabled: m,
38326
38354
  useAction: r,
38327
- visibleWithURL: O,
38355
+ visibleWithURL: L,
38328
38356
  setVisibleWithURL: M,
38329
38357
  setSubmitted: k,
38330
38358
  getAriaLabel: j,
@@ -38361,7 +38389,7 @@ const ActionLink = withDynamicSchemaProps(
38361
38389
  actionCallback: T,
38362
38390
  visibleWithURL: R,
38363
38391
  setVisibleWithURL: D,
38364
- setSubmitted: L,
38392
+ setSubmitted: O,
38365
38393
  getAriaLabel: $,
38366
38394
  parentRecordData: B
38367
38395
  } = xe, N = Y(xe, [
@@ -38392,7 +38420,7 @@ const ActionLink = withDynamicSchemaProps(
38392
38420
  "setSubmitted",
38393
38421
  "getAriaLabel",
38394
38422
  "parentRecordData"
38395
- ]), [w, O] = useState(!1), { wrapSSR: M, componentCls: k, hashId: j } = useStyles$8(), [z, E] = useState(!1), V = n["x-toolbar-props"] || n["x-designer-props"], U = (fe = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : fe.openMode, G = (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: K } = App.useApp(), J = useForm(), W = 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(() => {
38423
+ ]), [w, L] = useState(!1), { wrapSSR: M, componentCls: k, hashId: j } = useStyles$8(), [z, E] = useState(!1), V = n["x-toolbar-props"] || n["x-designer-props"], U = (fe = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : fe.openMode, G = (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: K } = App.useApp(), J = useForm(), W = 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(() => {
38396
38424
  var ce;
38397
38425
  return P(x({}, v), {
38398
38426
  opacity: r && (((ce = a == null ? void 0 : a.data) == null ? void 0 : ce.hidden) || !W) && 0.1,
@@ -38419,16 +38447,16 @@ const ActionLink = withDynamicSchemaProps(
38419
38447
  onClick: h,
38420
38448
  refreshDataBlockRequest: H,
38421
38449
  fieldSchema: n,
38422
- setVisible: O,
38450
+ setVisible: L,
38423
38451
  run: X,
38424
38452
  confirm: g,
38425
38453
  modal: K,
38426
- setSubmitted: L,
38454
+ setSubmitted: O,
38427
38455
  confirmTitle: f,
38428
38456
  title: y
38429
38457
  }, ie = useCallback(
38430
38458
  (ce) => {
38431
- O == null || O(ce), D == null || D(ce);
38459
+ L == null || L(ce), D == null || D(ce);
38432
38460
  },
38433
38461
  [D]
38434
38462
  );
@@ -38444,7 +38472,7 @@ const ActionLink = withDynamicSchemaProps(
38444
38472
  openSize: G,
38445
38473
  containerRefKey: o,
38446
38474
  fieldSchema: n,
38447
- setSubmitted: L,
38475
+ setSubmitted: O,
38448
38476
  children: [
38449
38477
  C && /* @__PURE__ */ jsx(NocoBaseRecursionField, { basePath: a.address, onlyRenderProperties: !0, schema: n }),
38450
38478
  !C && /* @__PURE__ */ jsx(RenderButton, x({}, se)),
@@ -38521,10 +38549,10 @@ const RenderButton = ({
38521
38549
  modal: T,
38522
38550
  setSubmitted: R,
38523
38551
  confirmTitle: D,
38524
- title: L
38552
+ title: O
38525
38553
  }) => {
38526
- const { getDataBlockRequest: $ } = useDataBlockRequestGetter(), { t: B } = useTranslation(), { isPopupVisibleControlledByURL: N } = usePopupSettings(), { openPopup: w } = usePopupUtils(), O = useRef(null);
38527
- O.current = w;
38554
+ const { getDataBlockRequest: $ } = useDataBlockRequestGetter(), { t: B } = useTranslation(), { isPopupVisibleControlledByURL: N } = usePopupSettings(), { openPopup: w } = usePopupUtils(), L = useRef(null);
38555
+ L.current = w;
38528
38556
  const M = useCallback(
38529
38557
  (k, j = !0) => {
38530
38558
  if (!(j && isPortalInBody(k.target)) && (k.preventDefault(), k.stopPropagation(), !a && o)) {
@@ -38532,11 +38560,11 @@ const RenderButton = ({
38532
38560
  b ? b(k, () => {
38533
38561
  var E, V;
38534
38562
  S !== !1 && (R == null || R(!0), (V = (E = $()) == null ? void 0 : E.refresh) == null || V.call(E));
38535
- }) : isBulkEditAction(y) || !N() ? (v(!0), F == null || F()) : ["view", "update", "create", "customize:popup"].includes(y["x-action"]) && y["x-uid"] ? O.current() : (v(!0), F == null || F());
38563
+ }) : isBulkEditAction(y) || !N() ? (v(!0), F == null || F()) : ["view", "update", "create", "customize:popup"].includes(y["x-action"]) && y["x-uid"] ? L.current() : (v(!0), F == null || F());
38536
38564
  };
38537
38565
  (I == null ? void 0 : I.enable) !== !1 && (I != null && I.content) ? T.confirm({
38538
- title: B(I.title, { title: D || L || (t == null ? void 0 : t.title) }),
38539
- content: B(I.content, { title: D || L || (t == null ? void 0 : t.title) }),
38566
+ title: B(I.title, { title: D || O || (t == null ? void 0 : t.title) }),
38567
+ content: B(I.content, { title: D || O || (t == null ? void 0 : t.title) }),
38540
38568
  onOk: z
38541
38569
  }) : z();
38542
38570
  }
@@ -38558,7 +38586,7 @@ const RenderButton = ({
38558
38586
  R,
38559
38587
  v,
38560
38588
  B,
38561
- L,
38589
+ O,
38562
38590
  $
38563
38591
  ]
38564
38592
  );
@@ -38582,7 +38610,7 @@ const RenderButton = ({
38582
38610
  type: f,
38583
38611
  Designer: C,
38584
38612
  designerProps: u,
38585
- title: L
38613
+ title: O
38586
38614
  }, h)
38587
38615
  );
38588
38616
  };
@@ -38646,7 +38674,7 @@ const RenderButtonInner = observer$1(
38646
38674
  T.cancel();
38647
38675
  }, []), !t && ((w = o == null ? void 0 : o.data) != null && w.hidden || !n))
38648
38676
  return null;
38649
- const R = S != null ? S : o == null ? void 0 : o.title, D = typeof R == "string" ? I(R, { ns: NAMESPACE_UI_SCHEMA }) : R, O = l, { opacity: L } = O, $ = Y(O, ["opacity"]), B = y && L ? { opacity: L } : void 0;
38677
+ const R = S != null ? S : o == null ? void 0 : o.title, D = typeof R == "string" ? I(R, { ns: NAMESPACE_UI_SCHEMA }) : R, L = l, { opacity: O } = L, $ = Y(L, ["opacity"]), B = y && O ? { opacity: O } : void 0;
38650
38678
  return /* @__PURE__ */ jsxs(
38651
38679
  SortableItem,
38652
38680
  P(x({
@@ -39120,14 +39148,14 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
39120
39148
  "toOptionsItem",
39121
39149
  "popupMatchSelectWidth",
39122
39150
  "onSuccess"
39123
- ]), b = useDataSourceKey(), S = useDataSourceHeaders(m || b), y = useRef(!1), v = useFieldSchema(), F = ((K = v["x-component-props"]) == null ? void 0 : K.addMode) === "quickAdd", { getField: I } = useCollection_deprecated(), T = useRef(null), { getCollectionJoinField: R, getInterface: D } = useCollectionManager_deprecated(), L = v["x-collection-field"] || v.name, $ = I(L) || R(L), B = u || ($ == null ? void 0 : $.target) && (t == null ? void 0 : t.label) && R(`${$.target}.${t.label}`), N = useMemo(() => {
39151
+ ]), b = useDataSourceKey(), S = useDataSourceHeaders(m || b), y = useRef(!1), v = useFieldSchema(), F = ((K = v["x-component-props"]) == null ? void 0 : K.addMode) === "quickAdd", { getField: I } = useCollection_deprecated(), T = useRef(null), { getCollectionJoinField: R, getInterface: D } = useCollectionManager_deprecated(), O = v["x-collection-field"] || v.name, $ = I(O) || R(O), B = u || ($ == null ? void 0 : $.target) && (t == null ? void 0 : t.label) && R(`${$.target}.${t.label}`), N = useMemo(() => {
39124
39152
  var W;
39125
39153
  if (B != null && B.interface) {
39126
39154
  const X = D(B.interface), Q = ((W = X == null ? void 0 : X.filterable) == null ? void 0 : W.operators[0].value) || "$includes";
39127
39155
  return B.type === "string" ? "$includes" : Q;
39128
39156
  }
39129
39157
  return "$includes";
39130
- }, [B]), w = useCompile(), O = useCallback(
39158
+ }, [B]), w = useCompile(), L = useCallback(
39131
39159
  (W) => {
39132
39160
  try {
39133
39161
  return W.filter((X) => ["number", "string"].includes(typeof X[t.value]) || !X[t.value]).map((X) => {
@@ -39227,7 +39255,7 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
39227
39255
  defaultValue: a
39228
39256
  }, C), {
39229
39257
  loading: M ? j : !0,
39230
- options: h(O(U)),
39258
+ options: h(L(U)),
39231
39259
  rawOptions: U,
39232
39260
  dropdownRender: (W) => {
39233
39261
  const X = U.some((Q) => Q[t.label] === T.current);
@@ -39305,11 +39333,11 @@ const useFormDataTemplates = () => {
39305
39333
  d(I), m(null), t == null || t.reset();
39306
39334
  }), []), v = useCallback((I, T, R) => q(void 0, null, function* () {
39307
39335
  const D = P(x({}, T), { dataId: I });
39308
- m(T), fetchTemplateData(h, D, R).then((L) => (t && L && (t.reset(), t.__template = !0, forEach(L, ($, B) => {
39336
+ m(T), fetchTemplateData(h, D, R).then((O) => (t && O && (t.reset(), t.__template = !0, forEach(O, ($, B) => {
39309
39337
  var N;
39310
39338
  $ && (t.values[B] = $, (N = t == null ? void 0 : t.setInitialValuesIn) == null || N.call(t, B, $));
39311
- })), L)).catch((L) => {
39312
- console.error(L);
39339
+ })), O)).catch((O) => {
39340
+ console.error(O);
39313
39341
  });
39314
39342
  }), []);
39315
39343
  if (!a || !r)
@@ -40880,9 +40908,9 @@ function PluginInfo(e) {
40880
40908
  y.silent().request({
40881
40909
  url: "__health_check",
40882
40910
  method: "get"
40883
- }).then((L) => {
40884
- (L == null ? void 0 : L.data) === "ok" && window.location.reload();
40885
- }).catch((L) => {
40911
+ }).then((O) => {
40912
+ (O == null ? void 0 : O.data) === "ok" && window.location.reload();
40913
+ }).catch((O) => {
40886
40914
  });
40887
40915
  }
40888
40916
  setInterval(D, 1e3);
@@ -42581,45 +42609,49 @@ function Uploader(o) {
42581
42609
  var n = o, { rules: e } = n, t = Y(n, ["rules"]);
42582
42610
  const { disabled: r, multiple: a, value: i, onChange: l, toValueItem: c = toValueItem } = t, [u, d] = useState([]), [p, m] = useState([]), { t: h } = useTranslation(), { componentCls: g } = useStyles$6(), f = useField(), C = useUploadProps(t), b = useBeforeUpload(e);
42583
42611
  useEffect(() => {
42584
- p.length ? f.setFeedback({
42585
- type: "error",
42586
- code: "ValidateError",
42587
- messages: [h("Incomplete uploading files need to be resolved")]
42588
- }) : f.setFeedback({});
42612
+ if (p.length) {
42613
+ const O = p.filter(($) => $.status === "error");
42614
+ f.setFeedback({
42615
+ type: "error",
42616
+ code: "ValidateError",
42617
+ messages: [O.length ? h("Some files are not uploaded correctly, please check.") : " "]
42618
+ });
42619
+ } else
42620
+ f.setFeedback({});
42589
42621
  }, [f, p, h]);
42590
42622
  const S = useCallback(
42591
- (L) => {
42623
+ (O) => {
42592
42624
  var B;
42593
- const $ = L.fileList.filter((N) => N.status !== "done").map(normalizeFile);
42625
+ const $ = O.fileList.filter((N) => N.status !== "done").map(normalizeFile);
42594
42626
  if (m($), a) {
42595
- const N = L.fileList.filter((w) => w.status === "done");
42627
+ const N = O.fileList.filter((w) => w.status === "done");
42596
42628
  if (N.length) {
42597
- const w = [...u, ...N.map((O) => {
42629
+ const w = [...u, ...N.map((L) => {
42598
42630
  var M;
42599
- return c((M = O.response) == null ? void 0 : M.data);
42631
+ return c((M = L.response) == null ? void 0 : M.data);
42600
42632
  })];
42601
42633
  $.length ? d(w) : (l == null || l([...i || [], ...w]), d([]));
42602
42634
  }
42603
42635
  } else {
42604
- const N = L.fileList.find((w) => w.uid === L.file.uid);
42636
+ const N = O.fileList.find((w) => w.uid === O.file.uid);
42605
42637
  N.status === "done" && (l == null || l(c((B = N.response) == null ? void 0 : B.data)), m([]));
42606
42638
  }
42607
42639
  },
42608
42640
  [a, i, u, c, l]
42609
- ), y = useCallback((L) => {
42641
+ ), y = useCallback((O) => {
42610
42642
  m(($) => {
42611
- const B = $.indexOf(L);
42643
+ const B = $.indexOf(O);
42612
42644
  return $.splice(B, 1), [...$];
42613
42645
  });
42614
- }, []), v = useCallback((L) => {
42646
+ }, []), v = useCallback((O) => {
42615
42647
  d(($) => {
42616
- const B = $.indexOf(L);
42648
+ const B = $.indexOf(O);
42617
42649
  return $.splice(B, 1), [...$];
42618
42650
  });
42619
42651
  }, []), F = useComponent("QRCodeUploader"), { mimetype: I, size: T } = e != null ? e : {}, R = useSizeHint(T), D = !r && (a || (!i || Array.isArray(i) && !i.length) && !p.length);
42620
42652
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
42621
- u.map((L, $) => /* @__PURE__ */ jsx(AttachmentListItem, { file: L, index: $, disabled: r, onDelete: v }, L.id)),
42622
- p.map((L, $) => /* @__PURE__ */ jsx(AttachmentListItem, { file: L, index: $, disabled: r, onDelete: y }, L.uid)),
42653
+ u.map((O, $) => /* @__PURE__ */ jsx(AttachmentListItem, { file: O, index: $, disabled: r, onDelete: v }, O.id)),
42654
+ p.map((O, $) => /* @__PURE__ */ jsx(AttachmentListItem, { file: O, index: $, disabled: r, onDelete: y }, O.uid)),
42623
42655
  /* @__PURE__ */ jsx(
42624
42656
  "div",
42625
42657
  {
@@ -42906,16 +42938,16 @@ const Preview = connect((e) => {
42906
42938
  if (isShowFilePicker(h))
42907
42939
  return u ? /* @__PURE__ */ jsx(Preview, x({}, e)) : null;
42908
42940
  const b = () => toArr$3(e.value).map((I, T, R) => {
42909
- const D = toValue$4(m(I == null ? void 0 : I[(a == null ? void 0 : a.label) || "label"]), "N/A"), L = getLabelFormatValue(h, D, !0);
42941
+ const D = toValue$4(m(I == null ? void 0 : I[(a == null ? void 0 : a.label) || "label"]), "N/A"), O = getLabelFormatValue(h, D, !0);
42910
42942
  return /* @__PURE__ */ jsxs(Fragment, { children: [
42911
- /* @__PURE__ */ jsx("span", { className: "test-record-picker-read-pretty-item", children: g || f ? L : /* @__PURE__ */ jsx(
42943
+ /* @__PURE__ */ jsx("span", { className: "test-record-picker-read-pretty-item", children: g || f ? O : /* @__PURE__ */ jsx(
42912
42944
  "a",
42913
42945
  {
42914
42946
  onClick: ($) => {
42915
42947
  var B;
42916
42948
  $.stopPropagation(), $.preventDefault(), l(!0), p(I), (B = C == null ? void 0 : C.current) == null || B.setPopoverVisible(!1);
42917
42949
  },
42918
- children: L
42950
+ children: O
42919
42951
  }
42920
42952
  ) }),
42921
42953
  T < R.length - 1 ? /* @__PURE__ */ jsx("span", { style: { marginRight: 4, color: "#aaa" }, children: "," }) : null
@@ -43058,12 +43090,12 @@ const useStyles$5 = genStyleHook("nb-association-filter-item", (e) => {
43058
43090
  ), F = f || (a == null ? void 0 : a.targetKey) || "id", I = C || ((U = (V = i["x-component-props"]) == null ? void 0 : V.fieldNames) == null ? void 0 : U.label) || F, T = {
43059
43091
  title: I || F,
43060
43092
  key: F
43061
- }, [R, D] = useState([]), [L, $] = useState(i.default || []), [B, N] = useState(!0), w = useLabelUiSchema(a, (T == null ? void 0 : T.title) || "label");
43093
+ }, [R, D] = useState([]), [O, $] = useState(i.default || []), [B, N] = useState(!0), w = useLabelUiSchema(a, (T == null ? void 0 : T.title) || "label");
43062
43094
  if (useEffect(() => {
43063
43095
  i.default && (d(i.default), $(i.default));
43064
43096
  }, [i.default, d]), !a)
43065
43097
  return null;
43066
- const O = (K) => {
43098
+ const L = (K) => {
43067
43099
  D(K), N(!1);
43068
43100
  }, M = (K) => {
43069
43101
  $(K), d(K), p == null || p(K);
@@ -43121,14 +43153,14 @@ const useStyles$5 = genStyleHook("nb-association-filter-item", (e) => {
43121
43153
  Tree$2,
43122
43154
  {
43123
43155
  className: "Tree",
43124
- onExpand: O,
43156
+ onExpand: L,
43125
43157
  expandedKeys: R,
43126
43158
  autoExpandParent: B,
43127
43159
  treeData: u,
43128
43160
  onSelect: M,
43129
43161
  fieldNames: T,
43130
43162
  titleRender: (K) => /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: getLabelFormatValue(w, c(K[I])) }),
43131
- selectedKeys: L,
43163
+ selectedKeys: O,
43132
43164
  blockNode: !0
43133
43165
  }
43134
43166
  )
@@ -43572,7 +43604,7 @@ const DataBlockInitializer = (e) => {
43572
43604
  a,
43573
43605
  n
43574
43606
  ]
43575
- ), L = h || // eslint-disable-next-line react-hooks/rules-of-hooks
43607
+ ), O = h || // eslint-disable-next-line react-hooks/rules-of-hooks
43576
43608
  useCollectionDataSourceItems({
43577
43609
  name: a,
43578
43610
  componentName: n,
@@ -43586,9 +43618,9 @@ const DataBlockInitializer = (e) => {
43586
43618
  onClick: D,
43587
43619
  currentText: b,
43588
43620
  otherText: S
43589
- }), $ = useGetSchemaInitializerMenuItems(D), B = useMemo(() => $(L, a), [$, L, a]), [N, w] = useState([]), O = useMenuSearch({ data: B, openKeys: N, hideSearch: u }), M = useMemo(() => {
43590
- let z = O.filter((E) => E.key !== "search" && E.key !== "empty");
43591
- return p && z.length === 1 ? z = z[0].children : z = O, [
43621
+ }), $ = useGetSchemaInitializerMenuItems(D), B = useMemo(() => $(O, a), [$, O, a]), [N, w] = useState([]), L = useMenuSearch({ data: B, openKeys: N, hideSearch: u }), M = useMemo(() => {
43622
+ let z = L.filter((E) => E.key !== "search" && E.key !== "empty");
43623
+ return p && z.length === 1 ? z = z[0].children : z = L, [
43592
43624
  {
43593
43625
  key: a,
43594
43626
  label: I(i),
@@ -43599,7 +43631,7 @@ const DataBlockInitializer = (e) => {
43599
43631
  children: z
43600
43632
  }
43601
43633
  ];
43602
- }, [O, p, a, I, i, r, D, e]);
43634
+ }, [L, p, a, I, i, r, D, e]);
43603
43635
  return B.length > 1 || B.length === 1 && ((j = (k = B[0]) == null ? void 0 : k.children) == null ? void 0 : j.length) > 0 || y ? /* @__PURE__ */ jsx(
43604
43636
  SchemaInitializerMenu,
43605
43637
  {
@@ -47337,10 +47369,10 @@ const CreateAction = observer$1(
47337
47369
  const { onClick: t } = e, o = useCollection_deprecated(), n = useFieldSchema(), r = useField(), a = useForm(), i = useVariables$1(), l = useAclCheckFn(), c = n["x-enable-children"] || [], u = n == null ? void 0 : n["x-allow-add-to-current"], d = (R = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : R.linkageFromForm, p = r.componentProps.type === "danger" ? void 0 : r.componentProps.type || "primary", { getChildrenCollections: m } = useCollectionManager_deprecated(), h = m(o.name), g = useMemo(() => c.map((D) => {
47338
47370
  if (!D)
47339
47371
  return;
47340
- const L = h.find(($) => $.name === D.collection);
47341
- if (L)
47342
- return P(x({}, L.getOptions()), {
47343
- title: D.title || L.title
47372
+ const O = h.find(($) => $.name === D.collection);
47373
+ if (O)
47374
+ return P(x({}, O.getOptions()), {
47375
+ title: D.title || O.title
47344
47376
  });
47345
47377
  }).filter((D) => D && l(`${D.name}:create`)), [c, h]), f = (n == null ? void 0 : n["x-linkage-rules"]) || [], C = useRecord(), b = useLocalVariables$1({ currentForm: { values: C } }), S = useCompile(), { designable: y } = useDesignable(), v = e.icon || null, F = useApp(), I = useMemo(() => g.map((D) => ({
47346
47378
  key: D.name,
@@ -47351,8 +47383,8 @@ const CreateAction = observer$1(
47351
47383
  }), [I]);
47352
47384
  return useEffect(() => {
47353
47385
  r.stateOfLinkageRules = {}, f.filter((D) => !D.disabled).forEach((D) => {
47354
- var L;
47355
- (L = D.actions) == null || L.forEach(($) => {
47386
+ var O;
47387
+ (O = D.actions) == null || O.forEach(($) => {
47356
47388
  linkageAction(
47357
47389
  {
47358
47390
  operator: $.operator,
@@ -48165,7 +48197,7 @@ const insertPositionToMethod = {
48165
48197
  )
48166
48198
  ] });
48167
48199
  }, components$4 = { TreeSelect: TreeSelect$1 }, MenuDesigner = () => {
48168
- var D, L;
48200
+ var D, O;
48169
48201
  const { updateRoute: e, deleteRoute: t } = useNocoBaseRoutes(), o = useField(), n = useFieldSchema(), r = useAPIClient(), { dn: a, refresh: i } = useDesignable(), { t: l } = useTranslation(), c = findMenuSchema(n), u = useCompile(), { urlSchema: d, paramsSchema: p } = useURLAndHTMLSchema(), m = useMemo(
48170
48202
  () => {
48171
48203
  var $;
@@ -48175,8 +48207,8 @@ const insertPositionToMethod = {
48175
48207
  ), h = useMemo(() => toItems$1(c == null ? void 0 : c.properties, { t: l, compile: u }), [c == null ? void 0 : c.properties, l, u]), g = useCallback(
48176
48208
  ($) => {
48177
48209
  onFieldChange("target", (B) => {
48178
- var w, O;
48179
- const [, N] = ((O = (w = B == null ? void 0 : B.value) == null ? void 0 : w.split) == null ? void 0 : O.call(w, "||")) || [];
48210
+ var w, L;
48211
+ const [, N] = ((L = (w = B == null ? void 0 : B.value) == null ? void 0 : w.split) == null ? void 0 : L.call(w, "||")) || [];
48180
48212
  B.query("position").take((M) => {
48181
48213
  M.dataSource = N === "Menu.SubMenu" ? [
48182
48214
  { label: l("Before"), value: "beforeBegin" },
@@ -48227,7 +48259,7 @@ const insertPositionToMethod = {
48227
48259
  const y = useCallback(
48228
48260
  ({ title: $, icon: B, href: N, params: w }) => {
48229
48261
  var M;
48230
- const O = {
48262
+ const L = {
48231
48263
  "x-uid": n["x-uid"],
48232
48264
  "x-server-hooks": [
48233
48265
  {
@@ -48236,8 +48268,8 @@ const insertPositionToMethod = {
48236
48268
  }
48237
48269
  ]
48238
48270
  };
48239
- $ && (n.title = $, o.title = $, O.title = $, i()), o.componentProps.icon = B, o.componentProps.href = N, o.componentProps.params = w, O["x-component-props"] = { icon: B, href: N, params: w }, n["x-component-props"] = n["x-component-props"] || {}, n["x-component-props"].icon = B, n["x-component-props"].href = N, n["x-component-props"].params = w, m == null || m({ item: { props: { schema: n } } }), a.emit("patch", {
48240
- schema: O
48271
+ $ && (n.title = $, o.title = $, L.title = $, i()), o.componentProps.icon = B, o.componentProps.href = N, o.componentProps.params = w, L["x-component-props"] = { icon: B, href: N, params: w }, n["x-component-props"] = n["x-component-props"] || {}, n["x-component-props"].icon = B, n["x-component-props"].href = N, n["x-component-props"].params = w, m == null || m({ item: { props: { schema: n } } }), a.emit("patch", {
48272
+ schema: L
48241
48273
  }), (M = n.__route__) != null && M.id && e(n.__route__.id, {
48242
48274
  title: $,
48243
48275
  icon: B,
@@ -48286,20 +48318,20 @@ const insertPositionToMethod = {
48286
48318
  const [w] = ((z = $ == null ? void 0 : $.split) == null ? void 0 : z.call($, "||")) || [];
48287
48319
  if (!w)
48288
48320
  return;
48289
- const O = findByUid(c, w), M = createDesignable({
48321
+ const L = findByUid(c, w), M = createDesignable({
48290
48322
  t: l,
48291
48323
  api: r,
48292
48324
  refresh: i,
48293
- current: O
48325
+ current: L
48294
48326
  }), k = {
48295
48327
  beforeBegin: "insertBefore",
48296
48328
  afterEnd: "insertAfter"
48297
48329
  }, j = B === "beforeEnd" ? {
48298
48330
  targetScope: {
48299
- parentId: O.__route__.id
48331
+ parentId: L.__route__.id
48300
48332
  }
48301
48333
  } : {
48302
- targetId: O.__route__.id
48334
+ targetId: L.__route__.id
48303
48335
  };
48304
48336
  yield I(x({
48305
48337
  sourceId: n.__route__.id,
@@ -48340,7 +48372,7 @@ const insertPositionToMethod = {
48340
48372
  SchemaSettingsSwitchItem,
48341
48373
  {
48342
48374
  title: l("Hidden"),
48343
- checked: (L = n["x-component-props"]) == null ? void 0 : L.hidden,
48375
+ checked: (O = n["x-component-props"]) == null ? void 0 : O.hidden,
48344
48376
  onChange: ($) => {
48345
48377
  Modal.confirm({
48346
48378
  title: l("Are you sure you want to hide this menu?"),
@@ -48782,7 +48814,7 @@ const useMenuDragEnd = () => {
48782
48814
  }, [n]), useEffect(() => {
48783
48815
  ["inline", "mix"].includes(o) && R(F);
48784
48816
  }, [F]);
48785
- const L = useContext(SchemaComponentContext), { onDragEnd: $ } = useMenuDragEnd();
48817
+ const O = useContext(SchemaComponentContext), { onDragEnd: $ } = useMenuDragEnd();
48786
48818
  return /* @__PURE__ */ jsx(DndContext, { onDragEnd: $, children: /* @__PURE__ */ jsx(MenuItemDesignerContext.Provider, { value: g, children: /* @__PURE__ */ jsxs(MenuModeContext.Provider, { value: o, children: [
48787
48819
  /* @__PURE__ */ jsx(
48788
48820
  HeaderMenu,
@@ -48799,7 +48831,7 @@ const useMenuDragEnd = () => {
48799
48831
  defaultSelectedKeys: F,
48800
48832
  defaultOpenKeys: T,
48801
48833
  selectedKeys: y,
48802
- designable: L.designable,
48834
+ designable: O.designable,
48803
48835
  render: b,
48804
48836
  children: l
48805
48837
  }
@@ -48817,7 +48849,7 @@ const useMenuDragEnd = () => {
48817
48849
  render: b,
48818
48850
  t: h,
48819
48851
  api: C,
48820
- designable: L.designable
48852
+ designable: O.designable
48821
48853
  }
48822
48854
  ) })
48823
48855
  ] }) }) });
@@ -49632,7 +49664,7 @@ const AppendsTreeSelect = (e) => {
49632
49664
  return c(B);
49633
49665
  if (!B.isLeaf && B.loadChildren) {
49634
49666
  const N = B.loadChildren(B);
49635
- h((w) => N.reduce((O, M) => Object.assign(O, { [M.value]: M }), x({}, w)));
49667
+ h((w) => N.reduce((L, M) => Object.assign(L, { [M.value]: M }), x({}, w)));
49636
49668
  }
49637
49669
  }),
49638
49670
  [c]
@@ -49644,7 +49676,7 @@ const AppendsTreeSelect = (e) => {
49644
49676
  title: l.label,
49645
49677
  fullTitle: l.label,
49646
49678
  isLeaf: !1
49647
- }) : null, w = (c === null ? [] : getCollectionFieldOptions.call({ compile: d, getCollectionFields: y, filter: i }, C, B)).reduce((O, M) => Object.assign(O, { [M.value]: M }), {});
49679
+ }) : null, w = (c === null ? [] : getCollectionFieldOptions.call({ compile: d, getCollectionFields: y, filter: i }, C, B)).reduce((L, M) => Object.assign(L, { [M.value]: M }), {});
49648
49680
  B && (w[B.value] = B), h(w);
49649
49681
  }, [g, l, i, c]), useEffect(() => {
49650
49682
  const B = e.multiple ? o : o ? [o] : [];
@@ -49652,20 +49684,20 @@ const AppendsTreeSelect = (e) => {
49652
49684
  return;
49653
49685
  const N = [];
49654
49686
  B.forEach((w) => {
49655
- const O = w.split(".");
49656
- let M = m[O[0]];
49657
- for (let k = 1; k < O.length && M; k++) {
49658
- const j = O.slice(0, k + 1).join(".");
49687
+ const L = w.split(".");
49688
+ let M = m[L[0]];
49689
+ for (let k = 1; k < L.length && M; k++) {
49690
+ const j = L.slice(0, k + 1).join(".");
49659
49691
  if (m[j]) {
49660
49692
  M = m[j];
49661
49693
  break;
49662
49694
  }
49663
49695
  if (!M.isLeaf && M.loadChildren) {
49664
49696
  const z = M.loadChildren(M);
49665
- z != null && z.length && (N.push(...z), M = z.find((E) => E.value === O.slice(0, k + 1).join(".")));
49697
+ z != null && z.length && (N.push(...z), M = z.find((E) => E.value === L.slice(0, k + 1).join(".")));
49666
49698
  }
49667
49699
  }
49668
- }), h((w) => N.reduce((O, M) => Object.assign(O, { [M.value]: M }), x({}, w)));
49700
+ }), h((w) => N.reduce((L, M) => Object.assign(L, { [M.value]: M }), x({}, w)));
49669
49701
  }, [o, v.length, e.multiple]);
49670
49702
  const T = useCallback(
49671
49703
  (B) => {
@@ -49673,9 +49705,9 @@ const AppendsTreeSelect = (e) => {
49673
49705
  n(B);
49674
49706
  return;
49675
49707
  }
49676
- const N = B.map((M) => M.value).filter(Boolean), w = new Set(N), O = F.find((M) => !w.has(M.value));
49677
- if (O) {
49678
- const M = `${O.value}.`;
49708
+ const N = B.map((M) => M.value).filter(Boolean), w = new Set(N), L = F.find((M) => !w.has(M.value));
49709
+ if (L) {
49710
+ const M = `${L.value}.`;
49679
49711
  Object.keys(m).forEach((k) => {
49680
49712
  k.startsWith(M) && w.delete(k);
49681
49713
  });
@@ -49692,14 +49724,14 @@ const AppendsTreeSelect = (e) => {
49692
49724
  ), R = useCallback(
49693
49725
  (B) => {
49694
49726
  var j;
49695
- const { value: N, onClose: w, disabled: O, closable: M } = B;
49727
+ const { value: N, onClose: w, disabled: L, closable: M } = B;
49696
49728
  if (!N)
49697
49729
  return null;
49698
49730
  const { fullTitle: k } = (j = m[N]) != null ? j : {};
49699
- return /* @__PURE__ */ jsx(Tag, { closable: M && !O, onClose: w, children: k == null ? void 0 : k.join(" / ") });
49731
+ return /* @__PURE__ */ jsx(Tag, { closable: M && !L, onClose: w, children: k == null ? void 0 : k.join(" / ") });
49700
49732
  },
49701
49733
  [m]
49702
- ), D = Array.isArray(F) ? F.filter((B) => B.value in m) : F, L = e.multiple ? o : o != null ? [o] : [];
49734
+ ), D = Array.isArray(F) ? F.filter((B) => B.value in m) : F, O = e.multiple ? o : o != null ? [o] : [];
49703
49735
  return /* @__PURE__ */ jsx(
49704
49736
  TreeSelect$2,
49705
49737
  P(x({
@@ -49708,7 +49740,7 @@ const AppendsTreeSelect = (e) => {
49708
49740
  value: D,
49709
49741
  placeholder: p("Select field"),
49710
49742
  showCheckedStrategy: TreeSelect$2.SHOW_ALL,
49711
- treeDefaultExpandedKeys: L,
49743
+ treeDefaultExpandedKeys: O,
49712
49744
  allowClear: {
49713
49745
  clearIcon: /* @__PURE__ */ jsx(CloseCircleFilled, { role: "button", "aria-label": "icon-close" })
49714
49746
  },
@@ -49723,7 +49755,7 @@ const AppendsTreeSelect = (e) => {
49723
49755
  suffixIcon: /* @__PURE__ */ jsx(DownOutlined, {})
49724
49756
  })
49725
49757
  );
49726
- }, removeIfKeyEmpty = (e, t) => !e || typeof e != "object" || !t || Array.isArray(e) || e[t] ? e : null, AssociationFieldAddNewer = (e) => {
49758
+ }, removeIfKeyEmpty = (e, t) => !e || typeof e != "object" || !t || Array.isArray(e) || e[t] ? e : void 0, AssociationFieldAddNewer = (e) => {
49727
49759
  const t = useContext(SchemaComponentContext);
49728
49760
  return /* @__PURE__ */ jsx(SchemaComponentContext.Provider, { value: P(x({}, t), { draggable: !0 }), children: /* @__PURE__ */ jsx(Action.Container, x({}, e)) });
49729
49761
  }, filterAnalyses = (e) => {
@@ -49745,30 +49777,30 @@ function getFieldPath(e) {
49745
49777
  }
49746
49778
  const InternalAssociationSelect$1 = observer$1(
49747
49779
  (e) => {
49748
- var L;
49749
- const D = e, { objectValue: t = !0, addMode: o } = D, n = Y(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 = (L = a["x-component-props"]) == null ? void 0 : L.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;
49780
+ var O;
49781
+ const D = e, { objectValue: t = !0, addMode: o } = D, n = Y(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 = (O = a["x-component-props"]) == null ? void 0 : O.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;
49750
49782
  useEffect(() => {
49751
- const $ = isVariable$1(r.value) ? void 0 : r.value, B = Array.isArray($) ? $.filter(Boolean) : $;
49752
- p(B);
49753
- }, [r.value]), useEffect(() => {
49783
+ const $ = isVariable$1(r.value) ? void 0 : r.value, B = Array.isArray($) ? $.filter(Boolean) : $, N = removeIfKeyEmpty(B, I);
49784
+ p(N), isEqual(r.value, N) || (r.value = N);
49785
+ }, [r.value, I]), useEffect(() => {
49754
49786
  const $ = uid();
49755
49787
  return f.addEffects($, () => {
49756
49788
  onFieldInputValueChange("*", (B) => {
49757
49789
  var M, k, j, z, E, V;
49758
- const N = filterAnalyses((j = (k = (M = r.componentProps) == null ? void 0 : M.service) == null ? void 0 : k.params) == null ? void 0 : j.filter) || [], w = getFieldPath(B.address.entire), O = getFieldPath(r.address.entire);
49759
- N.includes((z = B == null ? void 0 : B.props) == null ? void 0 : z.name) && r.value && isEqual(B == null ? void 0 : B.indexes, r == null ? void 0 : r.indexes) && ((E = B == null ? void 0 : B.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));
49790
+ const N = filterAnalyses((j = (k = (M = r.componentProps) == null ? void 0 : M.service) == null ? void 0 : k.params) == null ? void 0 : j.filter) || [], w = getFieldPath(B.address.entire), L = getFieldPath(r.address.entire);
49791
+ N.includes((z = B == null ? void 0 : B.props) == null ? void 0 : z.name) && r.value && isEqual(B == null ? void 0 : B.indexes, r == null ? void 0 : r.indexes) && ((E = B == null ? void 0 : B.props) == null ? void 0 : E.name) !== r.props.name && (!((V = r == null ? void 0 : r.indexes) != null && V.length) || isEqual(w, L)) && (r.setValue(null), p(null));
49760
49792
  });
49761
49793
  }), () => {
49762
49794
  f.removeEffects($);
49763
49795
  };
49764
49796
  }, []);
49765
49797
  const T = ($) => q(void 0, null, function* () {
49766
- var O, M;
49798
+ var L, M;
49767
49799
  const { search: B, callBack: N } = $, {
49768
49800
  data: { data: w }
49769
49801
  } = yield b.create({
49770
49802
  values: {
49771
- [((M = (O = r == null ? void 0 : r.componentProps) == null ? void 0 : O.fieldNames) == null ? void 0 : M.label) || "id"]: B
49803
+ [((M = (L = r == null ? void 0 : r.componentProps) == null ? void 0 : L.fieldNames) == null ? void 0 : M.label) || "id"]: B
49772
49804
  }
49773
49805
  });
49774
49806
  if (w) {
@@ -50049,7 +50081,7 @@ function FileSelector(e) {
50049
50081
  );
50050
50082
  }
50051
50083
  const InternalFileManager = (e) => {
50052
- var D, L;
50084
+ var D, O;
50053
50085
  const R = e, { value: t, multiple: o, onChange: n } = R, r = Y(R, ["value", "multiple", "onChange"]), a = useFieldSchema(), [i, l] = useState(!1), [c, u] = useState([]), d = useInsertSchema$1("Selector"), p = useFieldNames$1(e), { designable: m } = useDesignable(), h = useField(), [g, f] = useState([]), { getField: C } = useCollection_deprecated(), b = C(h.props.name), S = useLabelUiSchema$1(b == null ? void 0 : b.target, (p == null ? void 0 : p.label) || "label"), y = useCompile(), { modalProps: v } = useActionContext(), F = ($) => {
50054
50086
  $.stopPropagation(), $.preventDefault(), m ? d(schema$1.Selector) : a.reduceProperties((N, w) => w["x-component"] === "AssociationField.Selector" ? w : N, null) || a.addProperty("selector", schema$1.Selector), l(!0), u([]);
50055
50087
  };
@@ -50078,10 +50110,10 @@ const InternalFileManager = (e) => {
50078
50110
  setSelectedRows: u,
50079
50111
  collectionField: b
50080
50112
  }, T = () => {
50081
- const { setVisible: $ } = useActionContext(), { multiple: B, selectedRows: N, onChange: w, options: O, collectionField: M } = useContext(RecordPickerContext);
50113
+ const { setVisible: $ } = useActionContext(), { multiple: B, selectedRows: N, onChange: w, options: L, collectionField: M } = useContext(RecordPickerContext);
50082
50114
  return {
50083
50115
  onClick() {
50084
- w(B ? unionBy(N, O, (M == null ? void 0 : M.targetKey) || "id") : (N == null ? void 0 : N[0]) || null), $(!1);
50116
+ w(B ? unionBy(N, L, (M == null ? void 0 : M.targetKey) || "id") : (N == null ? void 0 : N[0]) || null), $(!1);
50085
50117
  }
50086
50118
  };
50087
50119
  };
@@ -50092,7 +50124,7 @@ const InternalFileManager = (e) => {
50092
50124
  value: o ? g : g == null ? void 0 : g[0],
50093
50125
  multiple: o,
50094
50126
  quickUpload: ((D = a["x-component-props"]) == null ? void 0 : D.quickUpload) !== !1,
50095
- selectFile: ((L = a["x-component-props"]) == null ? void 0 : L.selectFile) !== !1,
50127
+ selectFile: ((O = a["x-component-props"]) == null ? void 0 : O.selectFile) !== !1,
50096
50128
  action: `${b == null ? void 0 : b.target}:create`,
50097
50129
  onSelect: F,
50098
50130
  onChange: n
@@ -50143,12 +50175,12 @@ const InternalFileManager = (e) => {
50143
50175
  useEffect(() => {
50144
50176
  var N;
50145
50177
  if (r) {
50146
- const w = Array.isArray(r) ? extractLastNonNullValueObjects(r == null ? void 0 : r.filter((M) => M.value), !0) : transformNestedData(r), O = (N = w == null ? void 0 : w.map) == null ? void 0 : N.call(w, (M) => ({
50178
+ const w = Array.isArray(r) ? extractLastNonNullValueObjects(r == null ? void 0 : r.filter((M) => M.value), !0) : transformNestedData(r), L = (N = w == null ? void 0 : w.map) == null ? void 0 : N.call(w, (M) => ({
50147
50179
  key: M.parentId,
50148
50180
  children: [],
50149
50181
  value: M
50150
50182
  }));
50151
- i(O);
50183
+ i(L);
50152
50184
  }
50153
50185
  }, []);
50154
50186
  const T = useCallback(
@@ -50156,23 +50188,23 @@ const InternalFileManager = (e) => {
50156
50188
  try {
50157
50189
  return N == null ? void 0 : N.filter((w) => ["number", "string"].includes(typeof w[y.value])).map((w) => {
50158
50190
  var M, k, j;
50159
- let O = p(w[y.label]);
50191
+ let L = p(w[y.label]);
50160
50192
  if ((M = v == null ? void 0 : v.uiSchema) != null && M.enum)
50161
- if (Array.isArray(O))
50162
- O = O.map((z, E) => {
50193
+ if (Array.isArray(L))
50194
+ L = L.map((z, E) => {
50163
50195
  var U, G;
50164
50196
  const V = (G = (U = v.uiSchema.enum).find) == null ? void 0 : G.call(U, (H) => H.value === z);
50165
50197
  return V ? /* @__PURE__ */ jsx(Tag, { color: V.color, style: { marginRight: 3 }, children: (V == null ? void 0 : V.label) || z }, E) : /* @__PURE__ */ jsx(Tag, { children: z }, z);
50166
50198
  }).reverse();
50167
50199
  else {
50168
- const z = (j = (k = v.uiSchema.enum).find) == null ? void 0 : j.call(k, (E) => E.value === O);
50169
- z && (O = /* @__PURE__ */ jsx(Tag, { color: z.color, children: z.label }));
50200
+ const z = (j = (k = v.uiSchema.enum).find) == null ? void 0 : j.call(k, (E) => E.value === L);
50201
+ z && (L = /* @__PURE__ */ jsx(Tag, { color: z.color, children: z.label }));
50170
50202
  }
50171
- return (v == null ? void 0 : v.type) === "date" && (O = dayjs(O).format("YYYY-MM-DD")), o ? o({
50172
- [y.label]: O || EMPTY,
50203
+ return (v == null ? void 0 : v.type) === "date" && (L = dayjs(L).format("YYYY-MM-DD")), o ? o({
50204
+ [y.label]: L || EMPTY,
50173
50205
  [y.value]: w[y.value]
50174
50206
  }) : P(x({}, w), {
50175
- [y.label]: O || EMPTY,
50207
+ [y.label]: L || EMPTY,
50176
50208
  [y.value]: w[y.value]
50177
50209
  });
50178
50210
  }).filter(Boolean);
@@ -50182,46 +50214,46 @@ const InternalFileManager = (e) => {
50182
50214
  },
50183
50215
  [v == null ? void 0 : v.uiSchema, y]
50184
50216
  ), R = (N) => q(void 0, null, function* () {
50185
- var O, M;
50217
+ var L, M;
50186
50218
  const w = yield C.list({
50187
50219
  pageSize: 200,
50188
50220
  params: h == null ? void 0 : h.params,
50189
- filter: mergeFilter([N, (O = h == null ? void 0 : h.params) == null ? void 0 : O.filter]),
50221
+ filter: mergeFilter([N, (L = h == null ? void 0 : h.params) == null ? void 0 : L.filter]),
50190
50222
  tree: N.parentId ? void 0 : !0
50191
50223
  });
50192
50224
  return (M = w == null ? void 0 : w.data) == null ? void 0 : M.data;
50193
- }), D = (N, w, O) => q(void 0, null, function* () {
50225
+ }), D = (N, w, L) => q(void 0, null, function* () {
50194
50226
  const M = yield R({ parentId: w == null ? void 0 : w.id }), k = [...a];
50195
- if (k.splice(O + 1), k[O] = P(x({}, k[O]), { value: w }), w != null && w.id && (k[O + 1] = { key: w == null ? void 0 : w.id, children: (M == null ? void 0 : M.length) > 0 ? M : null }), i(k), ["o2m", "m2m"].includes(g.interface)) {
50227
+ if (k.splice(L + 1), k[L] = P(x({}, k[L]), { value: w }), w != null && w.id && (k[L + 1] = { key: w == null ? void 0 : w.id, children: (M == null ? void 0 : M.length) > 0 ? M : null }), i(k), ["o2m", "m2m"].includes(g.interface)) {
50196
50228
  const j = Array.isArray(f.fieldValue) ? f.fieldValue : [];
50197
50229
  j[I.index] = w, f.fieldValue = j;
50198
50230
  } else
50199
50231
  f.value = w;
50200
50232
  k.length === 1 && !k[0].value ? n == null || n(null) : n == null || n(k);
50201
- }), L = (N, w, O) => q(void 0, null, function* () {
50233
+ }), O = (N, w, L) => q(void 0, null, function* () {
50202
50234
  var M, k, j;
50203
50235
  if (N) {
50204
50236
  d(!0);
50205
50237
  const z = yield R({ parentId: w == null ? void 0 : w.key });
50206
- if (d(!1), c(z), O === (a == null ? void 0 : a.length) - 1 && ((M = w == null ? void 0 : w.value) != null && M.id)) {
50238
+ if (d(!1), c(z), L === (a == null ? void 0 : a.length) - 1 && ((M = w == null ? void 0 : w.value) != null && M.id)) {
50207
50239
  const E = yield R({ parentId: (k = w == null ? void 0 : w.value) == null ? void 0 : k.id }), V = [...a];
50208
- V.splice(O + 1), V[O] = P(x({}, V[O]), { value: w == null ? void 0 : w.value }), V[O + 1] = { key: (j = w == null ? void 0 : w.value) == null ? void 0 : j.id, children: (E == null ? void 0 : E.length) > 0 ? E : null }, i(V), n == null || n(V);
50240
+ V.splice(L + 1), V[L] = P(x({}, V[L]), { value: w == null ? void 0 : w.value }), V[L + 1] = { key: (j = w == null ? void 0 : w.value) == null ? void 0 : j.id, children: (E == null ? void 0 : E.length) > 0 ? E : null }, i(V), n == null || n(V);
50209
50241
  }
50210
50242
  }
50211
50243
  }), $ = (N, w) => q(void 0, null, function* () {
50212
- const O = N ? {
50244
+ const L = N ? {
50213
50245
  [y.label]: {
50214
50246
  [F]: N
50215
50247
  }
50216
50248
  } : {};
50217
50249
  d(!0);
50218
- const M = yield R(P(x({}, O), {
50250
+ const M = yield R(P(x({}, L), {
50219
50251
  parentId: w == null ? void 0 : w.key
50220
50252
  }));
50221
50253
  d(!1), c(M);
50222
50254
  });
50223
50255
  return /* @__PURE__ */ jsx(Space$1, { wrap: !0, children: a.map((N, w) => {
50224
- var O, M, k;
50256
+ var L, M, k;
50225
50257
  return N.children && /* @__PURE__ */ jsx(
50226
50258
  Select$1,
50227
50259
  {
@@ -50232,7 +50264,7 @@ const InternalFileManager = (e) => {
50232
50264
  filterOption: !1,
50233
50265
  filterSort: null,
50234
50266
  defaultValue: {
50235
- label: (O = N == null ? void 0 : N.value) == null ? void 0 : O[y.label],
50267
+ label: (L = N == null ? void 0 : N.value) == null ? void 0 : L[y.label],
50236
50268
  value: (M = N == null ? void 0 : N.value) == null ? void 0 : M[y.value]
50237
50269
  },
50238
50270
  labelInValue: !0,
@@ -50241,7 +50273,7 @@ const InternalFileManager = (e) => {
50241
50273
  style: { minWidth: 150 },
50242
50274
  onChange: (j, z) => D(j, z, w),
50243
50275
  options: u ? [] : T(l),
50244
- onDropdownVisibleChange: (j) => L(j, N, w),
50276
+ onDropdownVisibleChange: (j) => O(j, N, w),
50245
50277
  notFoundContent: u ? /* @__PURE__ */ jsx(Spin, { size: "small" }) : null
50246
50278
  },
50247
50279
  `${(k = N.value) == null ? void 0 : k.id}+ ${N.key} + ${y.label}`
@@ -50480,7 +50512,7 @@ const InternalNesterCardCss = css`
50480
50512
  }, InternalPicker = observer$1(
50481
50513
  (e) => {
50482
50514
  var M;
50483
- const O = e, { value: t, multiple: o, openSize: n, onChange: r, quickUpload: a, selectFile: i, shouldMountElement: l } = O, c = Y(O, ["value", "multiple", "openSize", "onChange", "quickUpload", "selectFile", "shouldMountElement"]), u = useField(), d = useFieldNames$1(e), [p, m] = useState(!1), h = useFieldSchema(), g = useInsertSchema$1("Selector"), { options: f } = useAssociationFieldContext(), { collectionName: C } = useFormBlockContext(), b = useCompile(), 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((j) => {
50515
+ const L = e, { value: t, multiple: o, openSize: n, onChange: r, quickUpload: a, selectFile: i, shouldMountElement: l } = L, c = Y(L, ["value", "multiple", "openSize", "onChange", "quickUpload", "selectFile", "shouldMountElement"]), u = useField(), d = useFieldNames$1(e), [p, m] = useState(!1), h = useFieldSchema(), g = useInsertSchema$1("Selector"), { options: f } = useAssociationFieldContext(), { collectionName: C } = useFormBlockContext(), b = useCompile(), 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((j) => {
50484
50516
  const z = j == null ? void 0 : j[d.label];
50485
50517
  return P(x({}, j), {
50486
50518
  [d.label]: getLabelFormatValue$1(b(S), b(z))
@@ -50498,7 +50530,7 @@ const InternalNesterCardCss = css`
50498
50530
  setSelectedRows: F,
50499
50531
  collectionField: f,
50500
50532
  currentFormCollection: C
50501
- }, { isMobileLayout: D } = useMobileLayout(), L = () => {
50533
+ }, { isMobileLayout: D } = useMobileLayout(), O = () => {
50502
50534
  var k;
50503
50535
  return o == null ? null : Array.isArray(t) ? (k = t.filter(Boolean)) == null ? void 0 : k.map((j) => j == null ? void 0 : j[d.value]) : t == null ? void 0 : t[d.value];
50504
50536
  }, $ = () => {
@@ -50556,7 +50588,7 @@ const InternalNesterCardCss = css`
50556
50588
  }
50557
50589
  },
50558
50590
  options: T,
50559
- value: L(),
50591
+ value: O(),
50560
50592
  open: !1
50561
50593
  })
50562
50594
  ) }),
@@ -50620,13 +50652,13 @@ const RenderRecord = React.memo(
50620
50652
  F.current = u;
50621
50653
  const I = useCallback(() => F.current, []);
50622
50654
  return useEffect(() => {
50623
- const T = toArr$3(h).map((R, D, L) => {
50655
+ const T = toArr$3(h).map((R, D, O) => {
50624
50656
  const $ = R == null ? void 0 : R[(e == null ? void 0 : e.label) || "label"], B = t ? transformNestedData(R).map((M) => M == null ? void 0 : M[(e == null ? void 0 : e.label) || "label"]).join(" / ") : isObject($) ? JSON.stringify($) : $, N = toValue$3(o(B), "N/A"), w = n(
50625
50657
  (R == null ? void 0 : R.__collection) || (r == null ? void 0 : r.target),
50626
50658
  (e == null ? void 0 : e.label) || "label"
50627
- ), O = getLabelFormatValue$1(o(w), N, !0);
50659
+ ), L = getLabelFormatValue$1(o(w), N, !0);
50628
50660
  return /* @__PURE__ */ jsxs(Fragment, { children: [
50629
- /* @__PURE__ */ jsx("span", { children: a ? O : i !== !1 ? /* @__PURE__ */ jsx(
50661
+ /* @__PURE__ */ jsx("span", { children: a ? L : i !== !1 ? /* @__PURE__ */ jsx(
50630
50662
  "a",
50631
50663
  {
50632
50664
  onMouseEnter: () => {
@@ -50645,10 +50677,10 @@ const RenderRecord = React.memo(
50645
50677
  parentRecordData: p
50646
50678
  })), (k = m == null ? void 0 : m.current) == null || k.setPopoverVisible(!1);
50647
50679
  },
50648
- children: O
50680
+ children: L
50649
50681
  }
50650
- ) : O }),
50651
- D < L.length - 1 ? /* @__PURE__ */ jsx("span", { style: { marginRight: 4, color: "#aaa" }, children: "," }) : null
50682
+ ) : L }),
50683
+ D < O.length - 1 ? /* @__PURE__ */ jsx("span", { style: { marginRight: 4, color: "#aaa" }, children: "," }) : null
50652
50684
  ] }, `${R == null ? void 0 : R.id}_${D}`);
50653
50685
  });
50654
50686
  y(T), b(!1);
@@ -50702,13 +50734,13 @@ const getSourceData = (e, t) => {
50702
50734
  const o = t.name.split(".").filter((n, r, a) => r < a.length - 1).join(".");
50703
50735
  return o ? _.get(e, o) : e;
50704
50736
  }, ReadPrettyInternalViewer = (e) => {
50705
- 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((L) => {
50706
- y(L.recordData);
50737
+ 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((O) => {
50738
+ y(O.recordData);
50707
50739
  }, []), T = /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: /* @__PURE__ */ jsx(CollectionRecordProvider, { isNew: !1, record: getSourceData(b, n), children: /* @__PURE__ */ jsx(o, { setBtnHover: f, value: t, fieldNames: e.fieldNames, onClick: I }) }) }), R = useMemo(
50708
50740
  () => ({
50709
50741
  visible: c || m,
50710
- setVisible: (L) => {
50711
- u == null || u(L), h == null || h(L);
50742
+ setVisible: (O) => {
50743
+ u == null || u(O), h == null || h(O);
50712
50744
  },
50713
50745
  openMode: a || C,
50714
50746
  snapshot: (d == null ? void 0 : d.interface) === "snapshot",
@@ -50727,7 +50759,7 @@ const getSourceData = (e, t) => {
50727
50759
  schema: n,
50728
50760
  onlyRenderProperties: !0,
50729
50761
  basePath: l.address,
50730
- filterProperties: (L) => L["x-component"] !== "Action"
50762
+ filterProperties: (O) => O["x-component"] !== "Action"
50731
50763
  }
50732
50764
  ) }) })
50733
50765
  ) : /* @__PURE__ */ jsx(
@@ -51057,19 +51089,19 @@ const defaultModeToComponent = {
51057
51089
  }
51058
51090
  });
51059
51091
  Array.isArray(n.value) || (n.value = []);
51060
- const D = useCallback(({ form: w, fieldSchema: O, collectionField: M, getInterface: k }) => {
51092
+ const D = useCallback(({ form: w, fieldSchema: L, collectionField: M, getInterface: k }) => {
51061
51093
  var j;
51062
- return !M || M.target && ((j = O["x-component-props"]) != null && j.mode) && !["Picker", "Select"].includes(O["x-component-props"].mode) ? !1 : !(w != null && w.readPretty) && !isPatternDisabled(O) && !interfacesOfUnsupportedDefaultValue.includes(M == null ? void 0 : M.interface) && !isSystemField(M, k);
51063
- }, []), L = () => {
51064
- const { setVisible: w } = useActionContext(), { selectedRows: O, setSelectedRows: M } = useContext(RecordPickerContext);
51094
+ return !M || M.target && ((j = L["x-component-props"]) != null && j.mode) && !["Picker", "Select"].includes(L["x-component-props"].mode) ? !1 : !(w != null && w.readPretty) && !isPatternDisabled(L) && !interfacesOfUnsupportedDefaultValue.includes(M == null ? void 0 : M.interface) && !isSystemField(M, k);
51095
+ }, []), O = () => {
51096
+ const { setVisible: w } = useActionContext(), { selectedRows: L, setSelectedRows: M } = useContext(RecordPickerContext);
51065
51097
  return {
51066
51098
  onClick() {
51067
- O.map((k) => n.value.push(markRecordAsNew(k))), n.onInput(n.value), n.initialValue = n.value, M([]), w(!1);
51099
+ L.map((k) => n.value.push(markRecordAsNew(k))), n.onInput(n.value), n.initialValue = n.value, M([]), w(!1);
51068
51100
  }
51069
51101
  };
51070
- }, $ = useMemo(() => n.value && Object.keys(n.value).length > 0 ? (Array.isArray(n.value) ? n.value : n.value ? [n.value] : []).filter(Boolean).map((O) => {
51071
- const M = O == null ? void 0 : O[F.label];
51072
- return P(x({}, O), {
51102
+ }, $ = useMemo(() => n.value && Object.keys(n.value).length > 0 ? (Array.isArray(n.value) ? n.value : n.value ? [n.value] : []).filter(Boolean).map((L) => {
51103
+ const M = L == null ? void 0 : L[F.label];
51104
+ return P(x({}, L), {
51073
51105
  [F.label]: getLabelFormatValue$1(I(T), I(M))
51074
51106
  });
51075
51107
  }) : [], [n.value, F == null ? void 0 : F.label]), B = {
@@ -51085,8 +51117,8 @@ const defaultModeToComponent = {
51085
51117
  setSelectedRows: v,
51086
51118
  collectionField: o
51087
51119
  }, N = () => {
51088
- const w = (o == null ? void 0 : o.targetKey) || "id", O = (n.value || []).map((k) => k == null ? void 0 : k[w]).filter(Boolean);
51089
- return O.length ? { $and: [{ [`${w}.$ne`]: O }] } : {};
51120
+ const w = (o == null ? void 0 : o.targetKey) || "id", L = (n.value || []).map((k) => k == null ? void 0 : k[w]).filter(Boolean);
51121
+ return L.length ? { $and: [{ [`${w}.$ne`]: L }] } : {};
51090
51122
  };
51091
51123
  return n.value.length > 0 ? /* @__PURE__ */ jsxs(
51092
51124
  Card,
@@ -51100,31 +51132,31 @@ const defaultModeToComponent = {
51100
51132
  `,
51101
51133
  children: [
51102
51134
  /* @__PURE__ */ jsxs(RefreshComponentProvider, { refresh: C, children: [
51103
- n.value.map((w, O) => {
51135
+ n.value.map((w, L) => {
51104
51136
  let M = a;
51105
51137
  return a || (M = !(w != null && w[o.targetKey])), /* @__PURE__ */ jsxs(React.Fragment, { children: [
51106
- /* @__PURE__ */ jsx("div", { style: { textAlign: "right" }, children: !n.readPretty && M && (!t["x-template-uid"] || O > 0) && /* @__PURE__ */ jsx(Tooltip, { title: c("Remove"), children: /* @__PURE__ */ jsx(
51138
+ /* @__PURE__ */ jsx("div", { style: { textAlign: "right" }, children: !n.readPretty && M && (!t["x-template-uid"] || L > 0) && /* @__PURE__ */ jsx(Tooltip, { title: c("Remove"), children: /* @__PURE__ */ jsx(
51107
51139
  CloseOutlined,
51108
51140
  {
51109
51141
  style: { zIndex: 1e3, color: "#a8a3a3" },
51110
51142
  onClick: () => {
51111
51143
  action(() => (spliceArrayState(n, {
51112
- startIndex: O,
51144
+ startIndex: L,
51113
51145
  deleteCount: 1
51114
- }), n.value.splice(O, 1), n.onInput(n.value)));
51146
+ }), n.value.splice(L, 1), n.onInput(n.value)));
51115
51147
  }
51116
51148
  }
51117
51149
  ) }, "remove") }),
51118
- /* @__PURE__ */ jsx(FormActiveFieldsProvider, { name: "nester", children: /* @__PURE__ */ jsx(SubFormProvider, { value: { value: w, collection: d, fieldSchema: t.parent }, children: /* @__PURE__ */ jsx(RecordProvider, { isNew: isNewRecord(w), record: w, parent: u, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: O, children: /* @__PURE__ */ jsx(DefaultValueProvider, { isAllowToSetDefaultValue: D, children: /* @__PURE__ */ jsx(
51150
+ /* @__PURE__ */ jsx(FormActiveFieldsProvider, { name: "nester", children: /* @__PURE__ */ jsx(SubFormProvider, { value: { value: w, collection: d, fieldSchema: t.parent }, children: /* @__PURE__ */ jsx(RecordProvider, { isNew: isNewRecord(w), record: w, parent: u, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: L, children: /* @__PURE__ */ jsx(DefaultValueProvider, { isAllowToSetDefaultValue: D, children: /* @__PURE__ */ jsx(
51119
51151
  NocoBaseRecursionField,
51120
51152
  {
51121
51153
  onlyRenderProperties: !0,
51122
- basePath: n.address.concat(O),
51154
+ basePath: n.address.concat(L),
51123
51155
  schema: h
51124
51156
  }
51125
51157
  ) }) }) }) }) }),
51126
51158
  /* @__PURE__ */ jsx(Divider$1, {})
51127
- ] }, O);
51159
+ ] }, L);
51128
51160
  }),
51129
51161
  /* @__PURE__ */ jsxs(Space$1, { children: [
51130
51162
  n.editable && r && /* @__PURE__ */ jsx(
@@ -51135,8 +51167,8 @@ const defaultModeToComponent = {
51135
51167
  action(() => {
51136
51168
  Array.isArray(n.value) || (n.value = []);
51137
51169
  const w = n.value.length;
51138
- return n.value.splice(w, 0, markRecordAsNew({})), each(n.form.fields, (O, M) => {
51139
- O || delete n.form.fields[M];
51170
+ return n.value.splice(w, 0, markRecordAsNew({})), each(n.form.fields, (L, M) => {
51171
+ L || delete n.form.fields[M];
51140
51172
  }), n.onInput(n.value);
51141
51173
  });
51142
51174
  }
@@ -51174,7 +51206,7 @@ const defaultModeToComponent = {
51174
51206
  SchemaComponentOptions,
51175
51207
  {
51176
51208
  scope: {
51177
- usePickActionProps: L,
51209
+ usePickActionProps: O,
51178
51210
  useTableSelectorProps,
51179
51211
  useCreateActionProps
51180
51212
  },
@@ -51217,7 +51249,7 @@ const defaultModeToComponent = {
51217
51249
  S.current = t;
51218
51250
  const y = useCallback(() => S.current, []);
51219
51251
  return /* @__PURE__ */ jsx(Fragment$1, { children: toArr$3(e.value).map((F, I, T) => {
51220
- const R = F == null ? void 0 : F[(r == null ? void 0 : r.label) || "label"], D = g ? transformNestedData(F).map((B) => B == null ? void 0 : B[(r == null ? void 0 : r.label) || "label"]).join(" / ") : isObject(R) ? JSON.stringify(R) : R, L = toValue$2(l(D), "N/A"), $ = getTabFormatValue(l(u), L, F[n]);
51252
+ const R = F == null ? void 0 : F[(r == null ? void 0 : r.label) || "label"], D = g ? transformNestedData(F).map((B) => B == null ? void 0 : B[(r == null ? void 0 : r.label) || "label"]).join(" / ") : isObject(R) ? JSON.stringify(R) : R, O = toValue$2(l(D), "N/A"), $ = getTabFormatValue(l(u), O, F[n]);
51221
51253
  return /* @__PURE__ */ jsxs(Fragment, { children: [
51222
51254
  /* @__PURE__ */ jsx("span", { children: d ? $ : o !== !1 ? /* @__PURE__ */ jsx(
51223
51255
  "a",
@@ -51304,9 +51336,9 @@ const useColumnsDeepMemoized = (e) => {
51304
51336
  `, [o.paddingContentVerticalLG, o.marginSM]), f = useCollection(), C = useMemo(
51305
51337
  () => d == null ? void 0 : d.map((S) => {
51306
51338
  var I, T, R, D;
51307
- const y = S.reduceProperties((L, $) => {
51339
+ const y = S.reduceProperties((O, $) => {
51308
51340
  if (isCollectionFieldComponent($))
51309
- return L.concat([$]);
51341
+ return O.concat([$]);
51310
51342
  }, []), v = (y == null ? void 0 : y.length) > 0 ? y[0].name : S.name, F = !!((I = S["x-component-props"]) != null && I.columnHidden);
51311
51343
  return P(x({
51312
51344
  title: /* @__PURE__ */ jsx(TableColumnTitle, { name: S.name, schema: S, onlyRenderSelf: !0, tooltip: (T = S["x-component-props"]) == null ? void 0 : T.tooltip }),
@@ -51316,13 +51348,13 @@ const useColumnsDeepMemoized = (e) => {
51316
51348
  columnHidden: F
51317
51349
  }, S["x-component-props"]), {
51318
51350
  width: F && !i ? 0 : ((D = S["x-component-props"]) == null ? void 0 : D.width) || 100,
51319
- render: (L, $) => {
51351
+ render: (O, $) => {
51320
51352
  var w;
51321
51353
  const B = (w = n.value) == null ? void 0 : w.indexOf($), N = n.address.concat($.__index || B);
51322
51354
  return /* @__PURE__ */ jsx(SubFormProvider, { value: { value: $, collection: f, fieldSchema: r.parent }, children: /* @__PURE__ */ jsx(RecordIndexProvider, { index: $.__index || B, children: /* @__PURE__ */ jsx(RecordProvider, { isNew: isNewRecord($), record: $, parent: u, children: /* @__PURE__ */ jsx(ColumnFieldProvider, { schema: S, basePath: N, children: /* @__PURE__ */ jsx("span", { role: "button", className: g, children: /* @__PURE__ */ jsx(RecursionField, { basePath: N, schema: S, onlyRenderProperties: !0 }) }, B) }) }) }) });
51323
51355
  },
51324
- onCell: (L, $) => ({
51325
- record: L,
51356
+ onCell: (O, $) => ({
51357
+ record: O,
51326
51358
  schema: S,
51327
51359
  rowIndex: $,
51328
51360
  isSubTable: e.isSubTable,
@@ -51444,7 +51476,7 @@ const useColumnsDeepMemoized = (e) => {
51444
51476
  display: none !important;
51445
51477
  }
51446
51478
  `,
51447
- itemRender: (D, L, $) => L === "prev" ? /* @__PURE__ */ jsxs(
51479
+ itemRender: (D, O, $) => O === "prev" ? /* @__PURE__ */ jsxs(
51448
51480
  "div",
51449
51481
  {
51450
51482
  style: { display: "flex" },
@@ -51654,8 +51686,8 @@ const Table$1 = withDynamicSchemaProps(
51654
51686
  "loading",
51655
51687
  "onClickRow",
51656
51688
  "enableIndexÏColumn"
51657
- ]), 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: L } = R, $ = useMemoizedFn(S.onRowDragEnd || (() => {
51658
- })), B = usePaginationProps$2(o, a), N = useTableColumns$1(S, B), [w, O] = useState(() => D ? L : []), [M, k] = useState(((be = y == null ? void 0 : y.data) == null ? void 0 : be.selectedRowKeys) || []), [j, z] = useState([]), E = (p == null ? void 0 : p.type) !== "none", V = useRef(/* @__PURE__ */ new Map()), U = useMemo(() => css`
51689
+ ]), 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: O } = R, $ = useMemoizedFn(S.onRowDragEnd || (() => {
51690
+ })), B = usePaginationProps$2(o, a), N = useTableColumns$1(S, B), [w, L] = useState(() => D ? O : []), [M, k] = useState(((be = y == null ? void 0 : y.data) == null ? void 0 : be.selectedRowKeys) || []), [j, z] = useState([]), E = (p == null ? void 0 : p.type) !== "none", V = useRef(/* @__PURE__ */ new Map()), U = useMemo(() => css`
51659
51691
  & > td {
51660
51692
  background-color: ${t.controlItemBgActive} !important;
51661
51693
  }
@@ -51669,9 +51701,9 @@ const Table$1 = withDynamicSchemaProps(
51669
51701
  rowIndex: ne
51670
51702
  }) : null, [C, j]);
51671
51703
  useDeepCompareEffect(() => {
51672
- const Z = D ? L : [];
51673
- _.isEqual(Z, w) || O(Z);
51674
- }, [D, L]);
51704
+ const Z = D ? O : [];
51705
+ _.isEqual(Z, w) || L(Z);
51706
+ }, [D, O]);
51675
51707
  const K = useCallback((Z) => {
51676
51708
  if (m)
51677
51709
  return J(Z);
@@ -51796,7 +51828,7 @@ const Table$1 = withDynamicSchemaProps(
51796
51828
  ), pe = useCallback(
51797
51829
  (Z, ne) => {
51798
51830
  const re = Z ? [...w, ne[I.getPrimaryKey()]] : w.filter((ae) => ne[I.getPrimaryKey()] !== ae);
51799
- O(re), g == null || g(Z, ne);
51831
+ L(re), g == null || g(Z, ne);
51800
51832
  },
51801
51833
  [w, g, I]
51802
51834
  ), me = useMemo(() => ({
@@ -51908,13 +51940,13 @@ const Table$1 = withDynamicSchemaProps(
51908
51940
  var G;
51909
51941
  Array.isArray(o.value) || (o.value = []), E.forEach((H) => o.value.push(markRecordAsNew(H))), o.onInput(o.value), o.initialValue = o.value, V([]), z(!1);
51910
51942
  const U = Math.ceil(o.value.length / (((G = o.componentProps) == null ? void 0 : G.pageSize) || 10));
51911
- L(U);
51943
+ O(U);
51912
51944
  }
51913
51945
  };
51914
51946
  }, R = () => {
51915
51947
  const z = (n == null ? void 0 : n.targetKey) || "id", E = (o.value || []).map((U) => U == null ? void 0 : U[z]).filter(Boolean);
51916
51948
  return E.length ? { $and: [{ [`${z}.$ne`]: E }] } : {};
51917
- }, [D, L] = useState(1), [$, B] = useState(((M = o.componentProps) == null ? void 0 : M.pageSize) || 10);
51949
+ }, [D, O] = useState(1), [$, B] = useState(((M = o.componentProps) == null ? void 0 : M.pageSize) || 10);
51918
51950
  useEffect(() => {
51919
51951
  var z;
51920
51952
  B((z = o.componentProps) == null ? void 0 : z.pageSize);
@@ -51927,7 +51959,7 @@ const Table$1 = withDynamicSchemaProps(
51927
51959
  pageSize: $ || 10,
51928
51960
  total: o == null ? void 0 : o.value,
51929
51961
  onChange: (V, U) => {
51930
- L(V), B(U), o.componentProps.pageSize = U, o.onInput(o.value);
51962
+ O(V), B(U), o.componentProps.pageSize = U, o.onInput(o.value);
51931
51963
  },
51932
51964
  showSizeChanger: !0,
51933
51965
  pageSizeOptions: ["10", "20", "50", "100"],
@@ -51940,10 +51972,10 @@ const Table$1 = withDynamicSchemaProps(
51940
51972
  var V;
51941
51973
  z.value = z.value || [], z.value.push(markRecordAsNew({}));
51942
51974
  const E = Math.ceil(z.value.length / (((V = z.componentProps) == null ? void 0 : V.pageSize) || 10));
51943
- return L(E), z.onInput(z.value);
51975
+ return O(E), z.onInput(z.value);
51944
51976
  }
51945
51977
  };
51946
- }, O = () => ({
51978
+ }, L = () => ({
51947
51979
  run() {
51948
51980
  l(!0);
51949
51981
  }
@@ -51994,7 +52026,7 @@ const Table$1 = withDynamicSchemaProps(
51994
52026
  C && /* @__PURE__ */ jsx(
51995
52027
  Action.Link,
51996
52028
  {
51997
- useAction: O,
52029
+ useAction: L,
51998
52030
  title: /* @__PURE__ */ jsxs(Space$1, { style: { gap: 2 }, children: [
51999
52031
  /* @__PURE__ */ jsx(ZoomInOutlined, {}),
52000
52032
  " ",
@@ -52128,14 +52160,14 @@ const ReadPretty$7 = observer$1(
52128
52160
  InternalAssociationSelect.displayName = "InternalAssociationSelect";
52129
52161
  const AssociationSelect = InternalAssociationSelect;
52130
52162
  AssociationSelect.Designer = function e() {
52131
- var O, M, k, j, z, E, V, U, G, H, K;
52132
- 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 = (M = S == null ? void 0 : S.uiSchema) == null ? void 0 : M.title, R = S != null && S.target ? t(S == null ? void 0 : S.target) : [];
52163
+ var L, M, k, j, z, E, V, U, G, H, K;
52164
+ 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 = (L = F == null ? void 0 : F.validateSchema) == null ? void 0 : L.call(F, u), T = (M = S == null ? void 0 : S.uiSchema) == null ? void 0 : M.title, R = S != null && S.target ? t(S == null ? void 0 : S.target) : [];
52133
52165
  c.title === T || c.title;
52134
- const D = useSortFields(S == null ? void 0 : S.target), L = ((z = (j = (k = c.componentProps) == null ? void 0 : k.service) == null ? void 0 : j.params) == null ? void 0 : z.sort) || [];
52166
+ const D = useSortFields(S == null ? void 0 : S.target), O = ((z = (j = (k = c.componentProps) == null ? void 0 : k.service) == null ? void 0 : j.params) == null ? void 0 : z.sort) || [];
52135
52167
  useEffect(() => {
52136
52168
  c.readPretty !== u["x-read-pretty"] && (c.readPretty = !!u["x-read-pretty"]);
52137
52169
  }, [u["x-read-pretty"]]);
52138
- const $ = L == null ? void 0 : L.map((J) => J.startsWith("-") ? {
52170
+ const $ = O == null ? void 0 : O.map((J) => J.startsWith("-") ? {
52139
52171
  field: J.substring(1),
52140
52172
  direction: "desc"
52141
52173
  } : {
@@ -52527,7 +52559,7 @@ AssociationSelect.Designer = function e() {
52527
52559
  ] });
52528
52560
  };
52529
52561
  AssociationSelect.FilterDesigner = function e() {
52530
- var F, I, T, R, D, L, $, B, N, w, O;
52562
+ var F, I, T, R, D, O, $, B, N, w, L;
52531
52563
  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) : [];
52532
52564
  i.title === f || i.title;
52533
52565
  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((M) => M.startsWith("-") ? {
@@ -52651,7 +52683,7 @@ AssociationSelect.FilterDesigner = function e() {
52651
52683
  }
52652
52684
  }
52653
52685
  ),
52654
- a && !(a != null && a.readPretty) && ((L = m == null ? void 0 : m.uiSchema) == null ? void 0 : L.type) && /* @__PURE__ */ jsx(
52686
+ a && !(a != null && a.readPretty) && ((O = m == null ? void 0 : m.uiSchema) == null ? void 0 : O.type) && /* @__PURE__ */ jsx(
52655
52687
  SchemaSettingsModalItem,
52656
52688
  {
52657
52689
  title: c("Set default value"),
@@ -52784,7 +52816,7 @@ AssociationSelect.FilterDesigner = function e() {
52784
52816
  {
52785
52817
  title: c("Title field"),
52786
52818
  options: v,
52787
- value: (O = (w = i == null ? void 0 : i.componentProps) == null ? void 0 : w.fieldNames) == null ? void 0 : O.label,
52819
+ value: (L = (w = i == null ? void 0 : i.componentProps) == null ? void 0 : w.fieldNames) == null ? void 0 : L.label,
52788
52820
  onChange: (M) => {
52789
52821
  var z, E;
52790
52822
  const k = {
@@ -54128,7 +54160,7 @@ const InternalListBlockProvider = (e) => {
54128
54160
  }), [o, t]);
54129
54161
  return _.isEmpty(o) && !_.isEmpty(t == null ? void 0 : t.filter) || n ? null : /* @__PURE__ */ jsx(BlockProvider, P(x({ name: "list" }, e), { params: r, children: /* @__PURE__ */ jsx(InternalListBlockProvider, x({}, e)) }));
54130
54162
  }), useListBlockContext = () => useContext(ListBlockContext), useListItemProps = () => ({}), ListDesigner = () => {
54131
- var b, S, y, v, F, I, T, R, D, L;
54163
+ var b, S, y, v, F, I, T, R, D, O;
54132
54164
  const e = useApp(), t = useCompile(), { name: o, title: n } = useCollection_deprecated(), r = useSchemaTemplate(), { t: a } = useTranslation(), i = useFieldSchema(), { form: l } = useFormBlockContext(), c = useField(), { dn: u } = useDesignable(), d = useSortFields(o), p = ((S = (b = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : b.params) == null ? void 0 : S.sort) || [], m = ((y = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : y.resource) || ((v = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : v.association), h = p == null ? void 0 : p.map(($) => $.startsWith("-") ? {
54133
54165
  field: $.substring(1),
54134
54166
  direction: "desc"
@@ -54245,7 +54277,7 @@ const InternalListBlockProvider = (e) => {
54245
54277
  SchemaSettingsSelectItem,
54246
54278
  {
54247
54279
  title: a("Records per page"),
54248
- value: ((L = (D = c.decoratorProps) == null ? void 0 : D.params) == null ? void 0 : L.pageSize) || 20,
54280
+ value: ((O = (D = c.decoratorProps) == null ? void 0 : D.params) == null ? void 0 : O.pageSize) || 20,
54249
54281
  options: [
54250
54282
  { label: "5", value: 5 },
54251
54283
  { label: "10", value: 10 },
@@ -54364,7 +54396,7 @@ const InternalListBlockProvider = (e) => {
54364
54396
  return e - u - o.paddingLG - l;
54365
54397
  }, InternalList = withSkeletonComponent(
54366
54398
  (e) => {
54367
- var N, w, O, M;
54399
+ var N, w, L, M;
54368
54400
  const { service: t } = useListBlockContext(), { run: o, params: n } = t, r = useFieldSchema(), a = useDesigner(), i = (N = t == null ? void 0 : t.data) == null ? void 0 : N.meta, { pageSize: l, count: c, hasNext: u, page: d } = i || {}, p = useField(), [m] = useState(/* @__PURE__ */ new Map()), { wrapSSR: h, componentCls: g, hashId: f } = useStyles$1(), C = useListBlockHeight(), { token: b } = theme.useToken(), S = useCallback(
54369
54401
  (k) => (m.has(k) || m.set(
54370
54402
  k,
@@ -54466,7 +54498,7 @@ const InternalListBlockProvider = (e) => {
54466
54498
  children: /* @__PURE__ */ jsx(
54467
54499
  List$1,
54468
54500
  P(x({}, e), {
54469
- pagination: !i || !((w = p.value) != null && w.length) || c <= ((O = p.value) == null ? void 0 : O.length) ? !1 : $,
54501
+ pagination: !i || !((w = p.value) != null && w.length) || c <= ((L = p.value) == null ? void 0 : L.length) ? !1 : $,
54470
54502
  loading: t == null ? void 0 : t.loading,
54471
54503
  children: (M = p.value) != null && M.length ? p.value.map((k, j) => /* @__PURE__ */ jsx(
54472
54504
  NocoBaseRecursionField,
@@ -55516,8 +55548,8 @@ const useStyles = genStyleHook("nb-rich-text", (e) => {
55516
55548
  "aria-label": `checkbox-${y.name}`
55517
55549
  }),
55518
55550
  renderCell: (y, v, F, I) => {
55519
- var D, L;
55520
- const T = (D = e == null ? void 0 : e.pagination) == null ? void 0 : D.current, R = ((L = e == null ? void 0 : e.pagination) == null ? void 0 : L.pageSize) || 20;
55551
+ var D, O;
55552
+ const T = (D = e == null ? void 0 : e.pagination) == null ? void 0 : D.current, R = ((O = e == null ? void 0 : e.pagination) == null ? void 0 : O.pageSize) || 20;
55521
55553
  return T && (F = F + (T - 1) * R), /* @__PURE__ */ jsxs(
55522
55554
  "div",
55523
55555
  {
@@ -56102,7 +56134,7 @@ const TableActionColumnDesigner = (e) => {
56102
56134
  "sort-field"
56103
56135
  );
56104
56136
  }, TableBlockDesigner = () => {
56105
- var F, I, T, R, D, L, $, B, N, w, O, M;
56137
+ var F, I, T, R, D, O, $, B, N, w, L, M;
56106
56138
  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();
56107
56139
  useBlockTemplateContext();
56108
56140
  const p = ((I = (F = a == null ? void 0 : a["x-decorator-props"]) == null ? void 0 : F.params) == null ? void 0 : I.sort) || [];
@@ -56113,7 +56145,7 @@ const TableActionColumnDesigner = (e) => {
56113
56145
  } : {
56114
56146
  field: k,
56115
56147
  direction: "asc"
56116
- }), h = useSchemaTemplate(), g = useCollection_deprecated(), { dragSort: f, resource: C } = r.decoratorProps, b = C && o(C), S = C != null && C.includes(".") ? (L = n(b == null ? void 0 : b.target)) == null ? void 0 : L.tree : !!(g != null && g.tree), y = useCallback(
56148
+ }), h = useSchemaTemplate(), g = useCollection_deprecated(), { dragSort: f, resource: C } = r.decoratorProps, b = C && o(C), S = C != null && C.includes(".") ? (O = n(b == null ? void 0 : b.target)) == null ? void 0 : O.tree : !!(g != null && g.tree), y = useCallback(
56117
56149
  ({ filter: k }) => {
56118
56150
  k = removeNullCondition(k);
56119
56151
  const j = r.decoratorProps.params || {};
@@ -56284,7 +56316,7 @@ const TableActionColumnDesigner = (e) => {
56284
56316
  SchemaSettingsSelectItem,
56285
56317
  {
56286
56318
  title: u("Records per page"),
56287
- value: ((O = (w = r.decoratorProps) == null ? void 0 : w.params) == null ? void 0 : O.pageSize) || 20,
56319
+ value: ((L = (w = r.decoratorProps) == null ? void 0 : w.params) == null ? void 0 : L.pageSize) || 20,
56288
56320
  options: [
56289
56321
  { label: "5", value: 5 },
56290
56322
  { label: "10", value: 10 },
@@ -56358,7 +56390,7 @@ TableField.ActionBar = observer$1(
56358
56390
  { displayName: "TableField.ActionBar" }
56359
56391
  );
56360
56392
  const TableSelectorDesigner = () => {
56361
- var T, R, D, L, $, B;
56393
+ var T, R, D, O, $, B;
56362
56394
  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((N) => N.startsWith("-") ? {
56363
56395
  field: N.substring(1),
56364
56396
  direction: "desc"
@@ -56370,17 +56402,17 @@ const TableSelectorDesigner = () => {
56370
56402
  /* @__PURE__ */ jsx(
56371
56403
  SchemaSettingsDataScope,
56372
56404
  {
56373
- defaultFilter: ((L = (D = a == null ? void 0 : a["x-decorator-props"]) == null ? void 0 : D.params) == null ? void 0 : L.filter) || {},
56405
+ defaultFilter: ((O = (D = a == null ? void 0 : a["x-decorator-props"]) == null ? void 0 : D.params) == null ? void 0 : O.filter) || {},
56374
56406
  form: i,
56375
56407
  onSubmit: ({ filter: N }) => {
56376
56408
  var M;
56377
56409
  N = removeNullCondition(N);
56378
56410
  const w = r.decoratorProps.params || {};
56379
56411
  w.filter = N, r.decoratorProps.params = w, a["x-decorator-props"].params = w;
56380
- let O = _.cloneDeep(N);
56381
- u && (O ? O = {
56382
- $and: [u, O]
56383
- } : O = u), c.run(P(x({}, (M = c.params) == null ? void 0 : M[0]), { filter: O, page: 1 })), p.emit("patch", {
56412
+ let L = _.cloneDeep(N);
56413
+ u && (L ? L = {
56414
+ $and: [u, L]
56415
+ } : L = u), c.run(P(x({}, (M = c.params) == null ? void 0 : M[0]), { filter: L, page: 1 })), p.emit("patch", {
56384
56416
  schema: {
56385
56417
  "x-uid": a["x-uid"],
56386
56418
  "x-decorator-props": a["x-decorator-props"]
@@ -56413,9 +56445,9 @@ const TableSelectorDesigner = () => {
56413
56445
  defaultChecked: !0,
56414
56446
  checked: r.decoratorProps.treeTable,
56415
56447
  onChange: (N) => {
56416
- var O;
56448
+ var L;
56417
56449
  r.form.clearFormGraph(`${r.address}.*`), r.decoratorProps.treeTable = N, a["x-decorator-props"].treeTable = N;
56418
- const w = P(x({}, (O = c.params) == null ? void 0 : O[0]), {
56450
+ const w = P(x({}, (L = c.params) == null ? void 0 : L[0]), {
56419
56451
  tree: N ? !0 : null
56420
56452
  });
56421
56453
  p.emit("patch", {
@@ -56502,8 +56534,8 @@ const TableSelectorDesigner = () => {
56502
56534
  },
56503
56535
  onSubmit: ({ sort: N }) => {
56504
56536
  var M;
56505
- const w = N.map((k) => k.direction === "desc" ? `-${k.field}` : k.field), O = r.decoratorProps.params || {};
56506
- O.sort = w, r.decoratorProps.params = O, a["x-decorator-props"].params = O, p.emit("patch", {
56537
+ const w = N.map((k) => k.direction === "desc" ? `-${k.field}` : k.field), L = r.decoratorProps.params || {};
56538
+ L.sort = w, r.decoratorProps.params = L, a["x-decorator-props"].params = L, p.emit("patch", {
56507
56539
  schema: {
56508
56540
  "x-uid": a["x-uid"],
56509
56541
  "x-decorator-props": a["x-decorator-props"]
@@ -56526,9 +56558,9 @@ const TableSelectorDesigner = () => {
56526
56558
  { label: "200", value: 200 }
56527
56559
  ],
56528
56560
  onChange: (N) => {
56529
- var O;
56561
+ var L;
56530
56562
  const w = r.decoratorProps.params || {};
56531
- w.pageSize = N, r.decoratorProps.params = w, a["x-decorator-props"].params = w, c.run(P(x({}, (O = c.params) == null ? void 0 : O[0]), { pageSize: N, page: 1 })), p.emit("patch", {
56563
+ w.pageSize = N, r.decoratorProps.params = w, a["x-decorator-props"].params = w, c.run(P(x({}, (L = c.params) == null ? void 0 : L[0]), { pageSize: N, page: 1 })), p.emit("patch", {
56532
56564
  schema: {
56533
56565
  "x-uid": a["x-uid"],
56534
56566
  "x-decorator-props": a["x-decorator-props"]
@@ -56929,10 +56961,10 @@ const DynamicComponent = (e) => {
56929
56961
  const [n, ...r] = o[1].split("."), a = [`$${n}`, ...r];
56930
56962
  let i = t, l = null;
56931
56963
  for (const c of a) {
56932
- if (l = i.find((u) => u.value === c), !l)
56964
+ if (l = i.find((u) => u.value === c || u.name === c), !l)
56933
56965
  return null;
56934
56966
  if (Array.isArray(l.children) || l.isLeaf === !1)
56935
- i = l.children;
56967
+ i = l.children || l.field.children;
56936
56968
  else
56937
56969
  return l;
56938
56970
  }
@@ -58293,14 +58325,14 @@ const useRecordIsOwn = () => {
58293
58325
  const F = ["belongsTo"].includes(u) ? l : ["belongsToMany"].includes(u) ? d : c, I = (T = r(F)) == null ? void 0 : T.fields;
58294
58326
  if (I) {
58295
58327
  const R = I == null ? void 0 : I.filter((D) => supportTypes.includes(D.type)).map((D) => {
58296
- var L;
58328
+ var O;
58297
58329
  return {
58298
58330
  value: D.name,
58299
- label: g(((L = D.uiSchema) == null ? void 0 : L.title) || D.name)
58331
+ label: g(((O = D.uiSchema) == null ? void 0 : O.title) || D.name)
58300
58332
  };
58301
58333
  });
58302
58334
  if (n(R), y(R), h) {
58303
- const D = R.find((L) => L.value === h);
58335
+ const D = R.find((O) => O.value === h);
58304
58336
  b((D == null ? void 0 : D.label) || h);
58305
58337
  }
58306
58338
  }
@@ -58312,10 +58344,10 @@ const useRecordIsOwn = () => {
58312
58344
  options: o,
58313
58345
  showSearch: !0,
58314
58346
  onDropdownVisibleChange: (F) => q(void 0, null, function* () {
58315
- var L;
58347
+ var O;
58316
58348
  const { target: I, type: T, through: R } = f.values, D = ["belongsTo"].includes(T) ? l || p : ["belongsToMany"].includes(T) ? R : I;
58317
58349
  if (D && F) {
58318
- const $ = ((L = r(D)) == null ? void 0 : L.fields) || [];
58350
+ const $ = ((O = r(D)) == null ? void 0 : O.fields) || [];
58319
58351
  n(
58320
58352
  $ == null ? void 0 : $.filter((B) => supportTypes.includes(B.type)).map((B) => {
58321
58353
  var N;
@@ -58515,7 +58547,7 @@ const useRecordIsOwn = () => {
58515
58547
  label: S(w.title),
58516
58548
  value: w.name
58517
58549
  })), []), R = useCallback(() => {
58518
- const { availableFieldInterfaces: w } = u(n.template) || {}, { exclude: O, include: M } = w || {}, k = [];
58550
+ const { availableFieldInterfaces: w } = u(n.template) || {}, { exclude: L, include: M } = w || {}, k = [];
58519
58551
  return F.forEach((j) => {
58520
58552
  var z;
58521
58553
  if (j.key === "systemInfo")
@@ -58530,14 +58562,14 @@ const useRecordIsOwn = () => {
58530
58562
  U && E.push(P(x({}, U), {
58531
58563
  targetScope: V == null ? void 0 : V.targetScope
58532
58564
  }));
58533
- }) : O != null && O.length ? E = (z = j == null ? void 0 : j.children) == null ? void 0 : z.filter((V) => !O.includes(V.name)) : E = j == null ? void 0 : j.children, E != null && E.length && k.push(P(x({}, j), {
58565
+ }) : L != null && L.length ? E = (z = j == null ? void 0 : j.children) == null ? void 0 : z.filter((V) => !L.includes(V.name)) : E = j == null ? void 0 : j.children, E != null && E.length && k.push(P(x({}, j), {
58534
58566
  children: E
58535
58567
  }));
58536
58568
  }
58537
58569
  }), k;
58538
58570
  }, [u, n]), D = useMemo(() => R().map((w) => {
58539
- var O;
58540
- return ((O = w == null ? void 0 : w.children) == null ? void 0 : O.length) === 0 ? null : n.template === "view" ? {
58571
+ var L;
58572
+ return ((L = w == null ? void 0 : w.children) == null ? void 0 : L.length) === 0 ? null : n.template === "view" ? {
58541
58573
  type: "group",
58542
58574
  label: S(w.label),
58543
58575
  title: S(w.label),
@@ -58561,29 +58593,29 @@ const useRecordIsOwn = () => {
58561
58593
  }))
58562
58594
  };
58563
58595
  }).filter((w) => {
58564
- var O;
58565
- return (O = w == null ? void 0 : w.children) == null ? void 0 : O.length;
58566
- }), [R]), L = useMemo(() => ({
58596
+ var L;
58597
+ return (L = w == null ? void 0 : w.children) == null ? void 0 : L.length;
58598
+ }), [R]), O = useMemo(() => ({
58567
58599
  style: {
58568
58600
  maxHeight: "60vh",
58569
58601
  overflow: "auto"
58570
58602
  },
58571
58603
  onClick: (w) => {
58572
- const O = w.item.props["data-targetScope"];
58573
- O && f(O);
58604
+ const L = w.item.props["data-targetScope"];
58605
+ L && f(L);
58574
58606
  const M = getSchema$8(c(w.key), n, S);
58575
58607
  M && (b(M), h(!0));
58576
58608
  },
58577
58609
  items: D
58578
58610
  }), [c, D, n]), $ = useMemo(() => I.filter((w) => ["string", "bigInt", "integer"].includes(w.type)).map((w) => {
58579
- var O;
58611
+ var L;
58580
58612
  return {
58581
58613
  value: w.name,
58582
- label: S((O = w.uiSchema) == null ? void 0 : O.title)
58614
+ label: S((L = w.uiSchema) == null ? void 0 : L.title)
58583
58615
  };
58584
58616
  }), [I == null ? void 0 : I.length]);
58585
58617
  return n.template !== "sql" && /* @__PURE__ */ jsx(RecordProvider, { record: n, children: /* @__PURE__ */ jsxs(ActionContextProvider, { value: { visible: m, setVisible: h }, children: [
58586
- /* @__PURE__ */ jsx(Dropdown, { getPopupContainer: o, trigger: a, align: i, menu: L, children: r || /* @__PURE__ */ jsx(Button, { icon: /* @__PURE__ */ jsx(PlusOutlined, {}), type: "primary", children: y("Add field") }) }),
58618
+ /* @__PURE__ */ jsx(Dropdown, { getPopupContainer: o, trigger: a, align: i, menu: O, children: r || /* @__PURE__ */ jsx(Button, { icon: /* @__PURE__ */ jsx(PlusOutlined, {}), type: "primary", children: y("Add field") }) }),
58587
58619
  /* @__PURE__ */ jsx(
58588
58620
  SchemaComponent,
58589
58621
  {
@@ -58717,8 +58749,8 @@ const useRecordIsOwn = () => {
58717
58749
  S(T == null ? void 0 : T.data);
58718
58750
  const R = l(n.interface), D = cloneDeep(T == null ? void 0 : T.data) || {};
58719
58751
  D != null && D.reverseField || (D.autoCreateReverseField = !1, D.reverseField = ($ = R == null ? void 0 : R.default) == null ? void 0 : $.reverseField, set$1(D.reverseField, "name", `f_${uid()}`), set$1(D.reverseField, "uiSchema.title", (B = n.__parent) == null ? void 0 : B.title));
58720
- const L = getSchema$7(R, D, n, C);
58721
- h(L), p(!0);
58752
+ const O = getSchema$7(R, D, n, C);
58753
+ h(O), p(!0);
58722
58754
  }),
58723
58755
  children: a || f("Edit")
58724
58756
  })
@@ -58811,13 +58843,13 @@ const useRecordIsOwn = () => {
58811
58843
  return /* @__PURE__ */ jsx(OverridingFieldAction, x({ item: t, parentItem: o }, e));
58812
58844
  }, getIsOverriding = (e, t, o) => t.find((r) => r.name === o.name).collectionName === e, OverridingFieldAction = (e) => {
58813
58845
  const { scope: t, getContainer: o, item: n, parentItem: r, children: a, currentCollection: i } = e, { target: l, through: c } = n, { getInterface: u, getCollection: d, getCurrentCollectionFields: p, getChildrenCollections: m, collections: h } = useCollectionManager_deprecated(), [g, f] = useState(!1), [C, b] = useState({}), S = useAPIClient(), { t: y } = useTranslation(), v = useCompile(), F = (N) => {
58814
- var O;
58815
- return N && ((O = m(N)) == null ? void 0 : O.map((M) => M.name).concat([N]));
58816
- }, [I, T] = useState({}), R = p(i), D = getIsOverriding(i, R, n), L = useMemo(() => h.map((N) => ({
58846
+ var L;
58847
+ return N && ((L = m(N)) == null ? void 0 : L.map((M) => M.name).concat([N]));
58848
+ }, [I, T] = useState({}), R = p(i), D = getIsOverriding(i, R, n), O = useMemo(() => h.map((N) => ({
58817
58849
  label: v(N.title),
58818
58850
  value: N.name
58819
58851
  })), []), $ = () => {
58820
- const N = useForm(), { refresh: w } = useResourceActionContext(), { refreshCM: O } = useCollectionManager_deprecated(), M = useActionContext(), { resource: k } = useResourceContext();
58852
+ const N = useForm(), { refresh: w } = useResourceActionContext(), { refreshCM: L } = useCollectionManager_deprecated(), M = useActionContext(), { resource: k } = useResourceContext();
58821
58853
  return {
58822
58854
  run() {
58823
58855
  return q(this, null, function* () {
@@ -58836,17 +58868,17 @@ const useRecordIsOwn = () => {
58836
58868
  ]);
58837
58869
  yield k.create({
58838
58870
  values: E
58839
- }), yield N.reset(), yield O(), yield w(), M.setVisible(!1);
58871
+ }), yield N.reset(), yield L(), yield w(), M.setVisible(!1);
58840
58872
  });
58841
58873
  }
58842
58874
  };
58843
58875
  }, B = useMemo(() => {
58844
58876
  var N;
58845
58877
  return (n == null ? void 0 : n.fields) || ((N = d(n.collectionName)) == null ? void 0 : N.options.fields.filter((w) => ["string", "bigInt", "integer"].includes(w.type)).map((w) => {
58846
- var O;
58878
+ var L;
58847
58879
  return {
58848
58880
  value: w.name,
58849
- label: v((O = w.uiSchema) == null ? void 0 : O.title)
58881
+ label: v((L = w.uiSchema) == null ? void 0 : L.title)
58850
58882
  };
58851
58883
  }));
58852
58884
  }, [n.name]);
@@ -58863,10 +58895,10 @@ const useRecordIsOwn = () => {
58863
58895
  appends: ["reverseField"]
58864
58896
  });
58865
58897
  T(w == null ? void 0 : w.data);
58866
- const O = u(n.interface), M = cloneDeep(w == null ? void 0 : w.data) || {};
58867
- M != null && M.reverseField || (M.autoCreateReverseField = !1, M.reverseField = (N = O.default) == null ? void 0 : N.reverseField, set(M.reverseField, "name", `f_${uid()}`), set(M.reverseField, "uiSchema.title", n.__parent.title));
58898
+ const L = u(n.interface), M = cloneDeep(w == null ? void 0 : w.data) || {};
58899
+ M != null && M.reverseField || (M.autoCreateReverseField = !1, M.reverseField = (N = L.default) == null ? void 0 : N.reverseField, set(M.reverseField, "name", `f_${uid()}`), set(M.reverseField, "uiSchema.title", n.__parent.title));
58868
58900
  const k = getSchema$6(
58869
- P(x({}, O), {
58901
+ P(x({}, L), {
58870
58902
  default: M
58871
58903
  }),
58872
58904
  n,
@@ -58892,7 +58924,7 @@ const useRecordIsOwn = () => {
58892
58924
  override: !0,
58893
58925
  isOverride: !0,
58894
58926
  targetScope: { target: F(l), through: F(c) },
58895
- collections: L,
58927
+ collections: O,
58896
58928
  scopeKeyOptions: B
58897
58929
  }, t)
58898
58930
  }
@@ -59328,10 +59360,10 @@ const getSchema$4 = (e, t, o) => {
59328
59360
  const { databaseView: t, viewName: o, sources: n, schema: r } = e, { data: a } = useContext(ResourceActionContext), i = useAPIClient(), { t: l } = useTranslation(), [c, u] = useState(!1), [d, p] = useState([]), [m, h] = useState([]), [g, f] = useState(n), [C, b] = useState([]), S = useField(), y = useForm(), { getCollection: v, getInterface: F, getCollectionFields: I, getInheritCollections: T, getParentCollectionFields: R } = useCollectionManager_deprecated(), D = useCompile(), $ = useFieldInterfaceOptions().filter((w) => !["relation", "systemInfo"].includes(w.key));
59329
59361
  useEffect(() => {
59330
59362
  const w = [];
59331
- g.forEach((O) => {
59363
+ g.forEach((L) => {
59332
59364
  var E;
59333
- const M = v(O), j = T(O).map((V) => {
59334
- const U = R(V, O);
59365
+ const M = v(L), j = T(L).map((V) => {
59366
+ const U = R(V, L);
59335
59367
  return {
59336
59368
  type: "group",
59337
59369
  key: V,
@@ -59349,17 +59381,17 @@ const getSchema$4 = (e, t, o) => {
59349
59381
  return { value: V.name, key: V.name, label: l(((U = V.uiSchema) == null ? void 0 : U.title) || V.name) };
59350
59382
  }).concat(j);
59351
59383
  w.push({
59352
- value: O,
59384
+ value: L,
59353
59385
  label: l(M.title || M.name),
59354
59386
  children: z
59355
59387
  });
59356
59388
  }), h(w);
59357
59389
  }, [g, t]), useEffect(() => {
59358
59390
  t && (u(!0), i.resource("dbViews").get({ filterByTk: o, schema: r }).then(({ data: w }) => {
59359
- var O, M;
59391
+ var L, M;
59360
59392
  if (w) {
59361
59393
  u(!1), p([]);
59362
- const k = (M = Object.values((O = w == null ? void 0 : w.data) == null ? void 0 : O.fields)) == null ? void 0 : M.map((j) => {
59394
+ const k = (M = Object.values((L = w == null ? void 0 : w.data) == null ? void 0 : L.fields)) == null ? void 0 : M.map((j) => {
59363
59395
  var z, E;
59364
59396
  if (j.source) {
59365
59397
  const V = (a == null ? void 0 : a.data.find((U) => U.name === j.name)) || j;
@@ -59380,8 +59412,8 @@ const getSchema$4 = (e, t, o) => {
59380
59412
  }
59381
59413
  }).catch);
59382
59414
  }, [t]);
59383
- const B = (w, O) => {
59384
- d.splice(O, 1, w), p(d), S.value = d.map((M) => {
59415
+ const B = (w, L) => {
59416
+ d.splice(L, 1, w), p(d), S.value = d.map((M) => {
59385
59417
  var j, z, E;
59386
59418
  const k = typeof M.source == "string" ? M.source : (E = (z = (j = M.source) == null ? void 0 : j.filter) == null ? void 0 : z.call(j, Boolean)) == null ? void 0 : E.join(".");
59387
59419
  return P(x({}, M), {
@@ -59400,7 +59432,7 @@ const getSchema$4 = (e, t, o) => {
59400
59432
  dataIndex: "source",
59401
59433
  key: "source",
59402
59434
  width: 200,
59403
- render: (w, O, M) => /* @__PURE__ */ jsx(
59435
+ render: (w, L, M) => /* @__PURE__ */ jsx(
59404
59436
  Cascader$1,
59405
59437
  {
59406
59438
  defaultValue: typeof w == "string" ? w == null ? void 0 : w.split(".") : w,
@@ -59410,7 +59442,7 @@ const getSchema$4 = (e, t, o) => {
59410
59442
  onChange: (k, j) => {
59411
59443
  var E;
59412
59444
  const z = (E = I(k == null ? void 0 : k[0])) == null ? void 0 : E.find((V) => V.name === last(k));
59413
- B(P(x({}, O), { source: k, uiSchema: z == null ? void 0 : z.uiSchema }), M);
59445
+ B(P(x({}, L), { source: k, uiSchema: z == null ? void 0 : z.uiSchema }), M);
59414
59446
  },
59415
59447
  placeholder: l("Select field source")
59416
59448
  }
@@ -59421,7 +59453,7 @@ const getSchema$4 = (e, t, o) => {
59421
59453
  dataIndex: "type",
59422
59454
  width: 140,
59423
59455
  key: "type",
59424
- render: (w, O, M) => {
59456
+ render: (w, L, M) => {
59425
59457
  const k = d[M];
59426
59458
  return k != null && k.source || !(k != null && k.possibleTypes) ? /* @__PURE__ */ jsx(Tag, { children: w }) : /* @__PURE__ */ jsx(
59427
59459
  Select$1,
@@ -59440,7 +59472,7 @@ const getSchema$4 = (e, t, o) => {
59440
59472
  dataIndex: "interface",
59441
59473
  key: "interface",
59442
59474
  width: 150,
59443
- render: (w, O, M) => {
59475
+ render: (w, L, M) => {
59444
59476
  const k = d[M], j = getInterfaceOptions($, k.type);
59445
59477
  return k.source ? w : /* @__PURE__ */ jsx(
59446
59478
  Select$1,
@@ -59463,7 +59495,7 @@ const getSchema$4 = (e, t, o) => {
59463
59495
  dataIndex: "title",
59464
59496
  key: "title",
59465
59497
  width: 180,
59466
- render: (w, O, M) => {
59498
+ render: (w, L, M) => {
59467
59499
  var j;
59468
59500
  const k = d[M];
59469
59501
  return /* @__PURE__ */ jsx(
@@ -59525,8 +59557,8 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
59525
59557
  }, S = (y) => {
59526
59558
  var v;
59527
59559
  return (v = y.filter((F) => F.source || F.interface)) == null ? void 0 : v.map((F) => {
59528
- var L, $, B, N, w, O;
59529
- const I = typeof (F == null ? void 0 : F.source) == "string" ? (L = F == null ? void 0 : F.source) == null ? void 0 : L.split(".") : F == null ? void 0 : F.source, T = (B = ($ = h(I == null ? void 0 : I[0])) == null ? void 0 : $.find((M) => M.name === (I == null ? void 0 : I[1]))) == null ? void 0 : B.uiSchema, R = ((N = F == null ? void 0 : F.uiSchema) == null ? void 0 : N.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;
59560
+ var O, $, B, N, w, L;
59561
+ const I = typeof (F == null ? void 0 : F.source) == "string" ? (O = F == null ? void 0 : F.source) == null ? void 0 : O.split(".") : F == null ? void 0 : F.source, T = (B = ($ = h(I == null ? void 0 : I[0])) == null ? void 0 : $.find((M) => M.name === (I == null ? void 0 : I[1]))) == null ? void 0 : B.uiSchema, R = ((N = F == null ? void 0 : F.uiSchema) == null ? void 0 : N.title) || (T == null ? void 0 : T.title) || F.name, D = F.source ? T : (L = (w = m(F.interface)) == null ? void 0 : w.default) == null ? void 0 : L.uiSchema;
59530
59562
  return {
59531
59563
  title: u(R),
59532
59564
  dataIndex: F.name,
@@ -59765,24 +59797,24 @@ const AsyncDataProvider = (e) => {
59765
59797
  () => h.filter((R) => !["relation"].includes(R.key)).map((R, D) => ({
59766
59798
  key: D,
59767
59799
  label: d(R.label),
59768
- options: R.children.map((L, $) => ({
59769
- value: L.name,
59800
+ options: R.children.map((O, $) => ({
59801
+ value: O.name,
59770
59802
  key: `${D}-${$}`,
59771
- label: d(L.label)
59803
+ label: d(O.label)
59772
59804
  }))
59773
59805
  })),
59774
59806
  [d]
59775
59807
  ), f = useSourceFieldsOptions(), C = useRef(p);
59776
59808
  if (useEffect(() => {
59777
- var L;
59809
+ var O;
59778
59810
  const R = /* @__PURE__ */ new Map();
59779
59811
  a || (i && i.length ? Object.entries((i == null ? void 0 : i[0]) || {}).forEach(([$, B]) => {
59780
59812
  var k;
59781
- const N = l[$], w = inferInterface($, B), O = (k = C.current(w)) == null ? void 0 : k.default, M = (N == null ? void 0 : N.uiSchema) || (O == null ? void 0 : O.uiSchema) || {};
59813
+ const N = l[$], w = inferInterface($, B), L = (k = C.current(w)) == null ? void 0 : k.default, M = (N == null ? void 0 : N.uiSchema) || (L == null ? void 0 : L.uiSchema) || {};
59782
59814
  R.set($, {
59783
59815
  name: $,
59784
59816
  interface: (N == null ? void 0 : N.interface) || w,
59785
- type: (N == null ? void 0 : N.type) || (O == null ? void 0 : O.type),
59817
+ type: (N == null ? void 0 : N.type) || (L == null ? void 0 : L.type),
59786
59818
  source: N == null ? void 0 : N.source,
59787
59819
  uiSchema: x({
59788
59820
  title: $
@@ -59797,7 +59829,7 @@ const AsyncDataProvider = (e) => {
59797
59829
  title: $
59798
59830
  }, (B == null ? void 0 : B.uiSchema) || {})
59799
59831
  }))
59800
- )), (L = c.value) != null && L.length && c.value.forEach(($) => {
59832
+ )), (O = c.value) != null && O.length && c.value.forEach(($) => {
59801
59833
  R.has($.name) && R.set($.name, $);
59802
59834
  });
59803
59835
  const D = Array.from(R.values());
@@ -59813,9 +59845,9 @@ const AsyncDataProvider = (e) => {
59813
59845
  return /* @__PURE__ */ jsx(Alert, { showIcon: !0, message: `${e("SQL error: ")}${R}`, type: "error" });
59814
59846
  }
59815
59847
  const S = (R, D) => {
59816
- const L = [...t];
59817
- L.splice(D, 1, R), o(L), c.setValue(
59818
- L.map(($) => {
59848
+ const O = [...t];
59849
+ O.splice(D, 1, R), o(O), c.setValue(
59850
+ O.map(($) => {
59819
59851
  var B, N, w;
59820
59852
  return P(x({}, $), {
59821
59853
  source: typeof $.source == "string" ? $.source : ((w = (N = (B = $.source) == null ? void 0 : B.filter) == null ? void 0 : N.call(B, Boolean)) == null ? void 0 : w.join(".")) || null
@@ -59834,8 +59866,8 @@ const AsyncDataProvider = (e) => {
59834
59866
  dataIndex: "source",
59835
59867
  key: "source",
59836
59868
  width: 200,
59837
- render: (R, D, L) => {
59838
- const $ = t[L];
59869
+ render: (R, D, O) => {
59870
+ const $ = t[O];
59839
59871
  return /* @__PURE__ */ jsx(
59840
59872
  Cascader$1,
59841
59873
  {
@@ -59852,7 +59884,7 @@ const AsyncDataProvider = (e) => {
59852
59884
  type: N == null ? void 0 : N.type,
59853
59885
  uiSchema: N == null ? void 0 : N.uiSchema
59854
59886
  }),
59855
- L
59887
+ O
59856
59888
  );
59857
59889
  }
59858
59890
  }
@@ -59864,9 +59896,9 @@ const AsyncDataProvider = (e) => {
59864
59896
  dataIndex: "interface",
59865
59897
  key: "interface",
59866
59898
  width: 150,
59867
- render: (R, D, L) => {
59899
+ render: (R, D, O) => {
59868
59900
  var B;
59869
- const $ = t[L];
59901
+ const $ = t[O];
59870
59902
  return $.source ? /* @__PURE__ */ jsx(Tag, { children: d((B = p(R)) == null ? void 0 : B.title) || R }) : /* @__PURE__ */ jsx(
59871
59903
  Select$1,
59872
59904
  {
@@ -59874,17 +59906,17 @@ const AsyncDataProvider = (e) => {
59874
59906
  style: { width: "100%" },
59875
59907
  popupMatchSelectWidth: !1,
59876
59908
  onChange: (N) => {
59877
- var O, M, k, j, z;
59909
+ var L, M, k, j, z;
59878
59910
  const w = p(N);
59879
59911
  S(
59880
59912
  P(x({}, $), {
59881
59913
  interface: N || null,
59882
- uiSchema: P(x({}, (O = w == null ? void 0 : w.default) == null ? void 0 : O.uiSchema), {
59914
+ uiSchema: P(x({}, (L = w == null ? void 0 : w.default) == null ? void 0 : L.uiSchema), {
59883
59915
  title: ((k = (M = w == null ? void 0 : w.default) == null ? void 0 : M.uiSchema) == null ? void 0 : k.title) || ((j = $.uiSchema) == null ? void 0 : j.title)
59884
59916
  }),
59885
59917
  type: (z = w == null ? void 0 : w.default) == null ? void 0 : z.type
59886
59918
  }),
59887
- L
59919
+ O
59888
59920
  );
59889
59921
  },
59890
59922
  allowClear: !0,
@@ -59898,15 +59930,15 @@ const AsyncDataProvider = (e) => {
59898
59930
  dataIndex: "title",
59899
59931
  key: "title",
59900
59932
  width: 180,
59901
- render: (R, D, L) => {
59933
+ render: (R, D, O) => {
59902
59934
  var B, N;
59903
- const $ = t[L];
59935
+ const $ = t[O];
59904
59936
  return /* @__PURE__ */ jsx(
59905
59937
  Input$3,
59906
59938
  {
59907
59939
  value: ((B = $.uiSchema) == null ? void 0 : B.title) || R,
59908
59940
  defaultValue: ((N = $.uiSchema) == null ? void 0 : N.title) !== void 0 ? $.uiSchema.title : $ == null ? void 0 : $.name,
59909
- onChange: (w) => S(P(x({}, $), { uiSchema: P(x({}, $ == null ? void 0 : $.uiSchema), { title: w.target.value }) }), L)
59941
+ onChange: (w) => S(P(x({}, $), { uiSchema: P(x({}, $ == null ? void 0 : $.uiSchema), { title: w.target.value }) }), O)
59910
59942
  }
59911
59943
  );
59912
59944
  }
@@ -64719,13 +64751,13 @@ const ACLCollectionProvider = (e) => {
64719
64751
  }, ACLActionProvider = (e) => {
64720
64752
  const t = useCollection(), o = useRecordPkValue(), n = useResourceName(), { parseAction: r, uiButtonSchemasBlacklist: a } = useACLRoleContext(), i = useFieldSchema(), l = i["x-uid"];
64721
64753
  let c = i["x-acl-action"];
64722
- const u = ["create", "update", "destroy", "importXlsx", "export"];
64754
+ const u = ["create", "update", "destroy", "importXlsx", "export"], d = ["create", "update", "destroy", "importXlsx", "bulkDestroy", "bulkUpdate"];
64723
64755
  !c && n && i["x-action"] && u.includes(i["x-action"]) && (c = `${n}:${i["x-action"]}`), c && !(c != null && c.includes(":")) && (c = `${n}:${c}`);
64724
- const d = useMemo(
64756
+ const p = useMemo(
64725
64757
  () => c && r(c, { schema: i, recordPkValue: o }),
64726
64758
  [r, c, i, o]
64727
64759
  );
64728
- return a != null && a.includes(l) ? /* @__PURE__ */ jsx(ACLActionParamsContext.Provider, { value: !1, children: e.children }) : c ? n ? d ? u.includes(c) || u.includes(c == null ? void 0 : c.split(":")[1]) ? t && t.template !== "view" || t != null && t.writableView ? /* @__PURE__ */ jsx(ACLActionParamsContext.Provider, { value: d, children: e.children }) : null : /* @__PURE__ */ jsx(ACLActionParamsContext.Provider, { value: d, children: e.children }) : /* @__PURE__ */ jsx(ACLActionParamsContext.Provider, { value: d, children: e.children }) : /* @__PURE__ */ jsx(Fragment$1, { children: e.children }) : /* @__PURE__ */ jsx(Fragment$1, { children: e.children });
64760
+ return a != null && a.includes(l) ? /* @__PURE__ */ jsx(ACLActionParamsContext.Provider, { value: !1, children: e.children }) : c ? n ? p ? d.includes(c) || d.includes(c == null ? void 0 : c.split(":")[1]) ? t && t.template !== "view" || t != null && t.writableView ? /* @__PURE__ */ jsx(ACLActionParamsContext.Provider, { value: p, children: e.children }) : /* @__PURE__ */ jsx(ACLActionParamsContext.Provider, { value: !1, children: e.children }) : /* @__PURE__ */ jsx(ACLActionParamsContext.Provider, { value: p, children: e.children }) : /* @__PURE__ */ jsx(ACLActionParamsContext.Provider, { value: p, children: e.children }) : /* @__PURE__ */ jsx(Fragment$1, { children: e.children }) : /* @__PURE__ */ jsx(Fragment$1, { children: e.children });
64729
64761
  }, useACLFieldWhitelist = () => {
64730
64762
  const e = useContext(ACLActionParamsContext), t = useMemo(() => [].concat((e == null ? void 0 : e.whitelist) || []).concat((e == null ? void 0 : e.fields) || []).concat((e == null ? void 0 : e.appends) || []), [e == null ? void 0 : e.whitelist, e == null ? void 0 : e.fields, e == null ? void 0 : e.appends]);
64731
64763
  return {
@@ -65625,8 +65657,7 @@ const AvailableActionsProver = (e) => {
65625
65657
  "x-decorator": "ACLActionProvider",
65626
65658
  "x-component": "Action.Link",
65627
65659
  "x-component-props": {
65628
- openMode: "drawer",
65629
- icon: "EditOutlined"
65660
+ openMode: "drawer"
65630
65661
  },
65631
65662
  properties: {
65632
65663
  drawer: {
@@ -65898,7 +65929,7 @@ const RolesResourcesActions = connect((e) => {
65898
65929
  const R = p[I.name] || {
65899
65930
  name: I.name
65900
65931
  };
65901
- T ? R.fields = [] : R.fields = (D = l == null ? void 0 : l.map) == null ? void 0 : D.call(l, (L) => L.name), p[I.name] = R, t(Object.values(p));
65932
+ T ? R.fields = [] : R.fields = (D = l == null ? void 0 : l.map) == null ? void 0 : D.call(l, (O) => O.name), p[I.name] = R, t(Object.values(p));
65902
65933
  }
65903
65934
  }
65904
65935
  ),
@@ -65911,15 +65942,15 @@ const RolesResourcesActions = connect((e) => {
65911
65942
  checked: R,
65912
65943
  "aria-label": `${I.name}_checkbox`,
65913
65944
  onChange: () => {
65914
- const L = p[I.name] || {
65945
+ const O = p[I.name] || {
65915
65946
  name: I.name
65916
- }, $ = L.fields || [];
65947
+ }, $ = O.fields || [];
65917
65948
  if (R) {
65918
65949
  const B = $.indexOf(D.name);
65919
65950
  $.splice(B, 1);
65920
65951
  } else
65921
65952
  $.push(D.name);
65922
- L.fields = $, p[I.name] = L, t(Object.values(p));
65953
+ O.fields = $, p[I.name] = O, t(Object.values(p));
65923
65954
  }
65924
65955
  }
65925
65956
  )
@@ -66899,6 +66930,7 @@ export {
66899
66930
  inferPickerType,
66900
66931
  interfacesOfUnsupportedDefaultValue,
66901
66932
  index as interfacesProperties,
66933
+ interpolateVariables,
66902
66934
  isAssocField,
66903
66935
  isBulkEditAction,
66904
66936
  isDeleteButtonDisabled,
@@ -66945,6 +66977,7 @@ export {
66945
66977
  relationshipType,
66946
66978
  removeNullCondition,
66947
66979
  replaceVariableValue,
66980
+ replaceVariables,
66948
66981
  requestParentRecordData,
66949
66982
  reverseFieldProperties,
66950
66983
  schemaSettingsLabelLayout,