@nocobase/client 1.2.8-alpha → 1.2.9-alpha

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
@@ -21,7 +21,7 @@ var H = (e, t) => {
21
21
  return o;
22
22
  };
23
23
  var P = (e, t, o) => (ke(e, typeof t != "symbol" ? t + "" : t, o), o);
24
- var O = (e, t, o) => new Promise((n, r) => {
24
+ var V = (e, t, o) => new Promise((n, r) => {
25
25
  var i = (c) => {
26
26
  try {
27
27
  l(o.next(c));
@@ -430,6 +430,15 @@ const bp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
430
430
  get FilterActionContext() {
431
431
  return FilterActionContext;
432
432
  },
433
+ get FilterContext() {
434
+ return FilterContext$1;
435
+ },
436
+ get FilterDynamicComponent() {
437
+ return FilterDynamicComponent;
438
+ },
439
+ get FilterLogicContext() {
440
+ return FilterLogicContext;
441
+ },
433
442
  get FixedBlock() {
434
443
  return FixedBlock;
435
444
  },
@@ -550,6 +559,9 @@ const bp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
550
559
  get RemoveButton() {
551
560
  return RemoveButton;
552
561
  },
562
+ get RemoveConditionContext() {
563
+ return RemoveConditionContext;
564
+ },
553
565
  get RequestSettings() {
554
566
  return RequestSettings;
555
567
  },
@@ -1284,9 +1296,6 @@ const bp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1284
1296
  get DatetimeFieldInterface() {
1285
1297
  return DatetimeFieldInterface;
1286
1298
  },
1287
- get DeclareVariable() {
1288
- return DeclareVariable;
1289
- },
1290
1299
  get DefaultValueProvider() {
1291
1300
  return DefaultValueProvider;
1292
1301
  },
@@ -1425,9 +1434,18 @@ const bp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1425
1434
  get FilterBlockType() {
1426
1435
  return FilterBlockType;
1427
1436
  },
1437
+ get FilterContext() {
1438
+ return FilterContext$1;
1439
+ },
1440
+ get FilterDynamicComponent() {
1441
+ return FilterDynamicComponent;
1442
+ },
1428
1443
  get FilterFormBlockProvider() {
1429
1444
  return FilterFormBlockProvider;
1430
1445
  },
1446
+ get FilterLogicContext() {
1447
+ return FilterLogicContext;
1448
+ },
1431
1449
  get FilterParentCollectionFields() {
1432
1450
  return FilterParentCollectionFields;
1433
1451
  },
@@ -1794,6 +1812,9 @@ const bp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1794
1812
  get RemoveButton() {
1795
1813
  return RemoveButton;
1796
1814
  },
1815
+ get RemoveConditionContext() {
1816
+ return RemoveConditionContext;
1817
+ },
1797
1818
  get RenderChildrenWithAssociationFilter() {
1798
1819
  return RenderChildrenWithAssociationFilter;
1799
1820
  },
@@ -2289,6 +2310,9 @@ const bp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2289
2310
  get VariableInput() {
2290
2311
  return VariableInput;
2291
2312
  },
2313
+ get VariablePopupRecordProvider() {
2314
+ return VariablePopupRecordProvider;
2315
+ },
2292
2316
  get VariableScopeProvider() {
2293
2317
  return VariableScopeProvider;
2294
2318
  },
@@ -3628,13 +3652,13 @@ function assign(e, t, o = {}) {
3628
3652
  function useRequest(e, t = {}) {
3629
3653
  const [o, n] = useSetState({}), r = useAPIClient();
3630
3654
  let i;
3631
- typeof e == "function" ? i = e : e ? i = (...u) => O(this, [...u], function* (c = {}) {
3655
+ typeof e == "function" ? i = e : e ? i = (...u) => V(this, [...u], function* (c = {}) {
3632
3656
  const { resource: d, url: p } = e;
3633
3657
  let m = cloneDeep(e);
3634
3658
  d || p ? (m.params = m.params || {}, assign(m.params, c)) : m = merge(m, c);
3635
3659
  const h = yield r.request(m);
3636
3660
  return h == null ? void 0 : h.data;
3637
- }) : i = () => O(this, null, function* () {
3661
+ }) : i = () => V(this, null, function* () {
3638
3662
  });
3639
3663
  const a = v(g({}, t), {
3640
3664
  onSuccess(...c) {
@@ -3853,15 +3877,15 @@ class Plugin {
3853
3877
  return this.app.dataSourceManager;
3854
3878
  }
3855
3879
  afterAdd() {
3856
- return O(this, null, function* () {
3880
+ return V(this, null, function* () {
3857
3881
  });
3858
3882
  }
3859
3883
  beforeLoad() {
3860
- return O(this, null, function* () {
3884
+ return V(this, null, function* () {
3861
3885
  });
3862
3886
  }
3863
3887
  load() {
3864
- return O(this, null, function* () {
3888
+ return V(this, null, function* () {
3865
3889
  });
3866
3890
  }
3867
3891
  t(t, o = {}) {
@@ -3902,7 +3926,7 @@ function addAppVersion(e, t) {
3902
3926
  addAppVersion((n = e.properties) == null ? void 0 : n[o], t);
3903
3927
  }), e;
3904
3928
  }
3905
- const name = "@nocobase/client", version$1 = "1.2.8-alpha", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
3929
+ const name = "@nocobase/client", version$1 = "1.2.9-alpha", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
3906
3930
  "@ahooksjs/use-url-state": "3.5.1",
3907
3931
  "@ant-design/cssinjs": "^1.11.1",
3908
3932
  "@ant-design/icons": "^5.1.4",
@@ -3923,9 +3947,9 @@ const name = "@nocobase/client", version$1 = "1.2.8-alpha", license = "AGPL-3.0"
3923
3947
  "@formily/reactive-react": "^2.2.27",
3924
3948
  "@formily/shared": "^2.2.27",
3925
3949
  "@formily/validator": "^2.2.27",
3926
- "@nocobase/evaluators": "1.2.8-alpha",
3927
- "@nocobase/sdk": "1.2.8-alpha",
3928
- "@nocobase/utils": "1.2.8-alpha",
3950
+ "@nocobase/evaluators": "1.2.9-alpha",
3951
+ "@nocobase/sdk": "1.2.9-alpha",
3952
+ "@nocobase/utils": "1.2.9-alpha",
3929
3953
  ahooks: "^3.7.2",
3930
3954
  antd: "^5.12.8",
3931
3955
  "antd-style": "3.4.5",
@@ -4048,7 +4072,7 @@ class Designable {
4048
4072
  });
4049
4073
  }), r["x-uid"] && a.length ? a : [];
4050
4074
  };
4051
- this.on("insertAdjacent", (p) => O(this, [p], function* ({ onSuccess: r, current: i, position: a, schema: l, wrap: c, wrapped: u, removed: d }) {
4075
+ this.on("insertAdjacent", (p) => V(this, [p], function* ({ onSuccess: r, current: i, position: a, schema: l, wrap: c, wrapped: u, removed: d }) {
4052
4076
  var x;
4053
4077
  let m = [];
4054
4078
  if ((u == null ? void 0 : u["x-component"]) === "Grid.Col" && (m = m.concat(n(u.parent))), (d == null ? void 0 : d["x-component"]) === "Grid.Col" && (m = m.concat(n(d.parent))), this.refresh(), !i["x-uid"])
@@ -4069,19 +4093,19 @@ class Designable {
4069
4093
  url: `/uiSchemas:remove/${d["x-uid"]}`,
4070
4094
  method: "post"
4071
4095
  })), r == null || r((x = h == null ? void 0 : h.data) == null ? void 0 : x.data), message.success(o("Saved successfully"), 0.2);
4072
- })), this.on("patch", (i) => O(this, [i], function* ({ schema: r }) {
4096
+ })), this.on("patch", (i) => V(this, [i], function* ({ schema: r }) {
4073
4097
  this.refresh(), r != null && r["x-uid"] && (yield t.request({
4074
4098
  url: "/uiSchemas:patch",
4075
4099
  method: "post",
4076
4100
  data: g({}, r)
4077
4101
  }), message.success(o("Saved successfully"), 0.2));
4078
- })), this.on("batchPatch", (i) => O(this, [i], function* ({ schemas: r }) {
4102
+ })), this.on("batchPatch", (i) => V(this, [i], function* ({ schemas: r }) {
4079
4103
  this.refresh(), yield t.request({
4080
4104
  url: "/uiSchemas:batchPatch",
4081
4105
  method: "post",
4082
4106
  data: r
4083
4107
  }), message.success(o("Saved successfully"), 0.2);
4084
- })), this.on("remove", (i) => O(this, [i], function* ({ removed: r }) {
4108
+ })), this.on("remove", (i) => V(this, [i], function* ({ removed: r }) {
4085
4109
  let a = [];
4086
4110
  (r == null ? void 0 : r["x-component"]) === "Grid.Col" && (a = n(r.parent)), this.refresh(), r != null && r["x-uid"] && (yield t.request({
4087
4111
  url: `/uiSchemas:remove/${r["x-uid"]}`,
@@ -4100,7 +4124,7 @@ class Designable {
4100
4124
  this.events[t] || (this.events[t] = []), this.events[t].push(o);
4101
4125
  }
4102
4126
  emit(t, ...o) {
4103
- return O(this, null, function* () {
4127
+ return V(this, null, function* () {
4104
4128
  if (!this.events[t])
4105
4129
  return;
4106
4130
  const [n, ...r] = o;
@@ -4595,7 +4619,7 @@ const TreeNode = (e) => {
4595
4619
  getOnCheck: x,
4596
4620
  getScopeDataSource: (S) => {
4597
4621
  const b = t(S), y = (k, A) => {
4598
- var V, R;
4622
+ var O, R;
4599
4623
  if (!k.interface)
4600
4624
  return;
4601
4625
  const w = r(k.interface);
@@ -4603,7 +4627,7 @@ const TreeNode = (e) => {
4603
4627
  return;
4604
4628
  const { nested: M, children: N, operators: E } = w.filterable, z = {
4605
4629
  name: k.name,
4606
- title: ((V = k == null ? void 0 : k.uiSchema) == null ? void 0 : V.title) || k.name,
4630
+ title: ((O = k == null ? void 0 : k.uiSchema) == null ? void 0 : O.title) || k.name,
4607
4631
  schema: k == null ? void 0 : k.uiSchema,
4608
4632
  operators: ((R = E == null ? void 0 : E.filter) == null ? void 0 : R.call(E, (j) => !(j != null && j.visible) || j.visible(k))) || [],
4609
4633
  interface: k.interface
@@ -5483,13 +5507,13 @@ function getAllKeys(e) {
5483
5507
  }
5484
5508
  return o(e), t;
5485
5509
  }
5486
- const conditionAnalyses = (n) => O(void 0, [n], function* ({
5510
+ const conditionAnalyses = (n) => V(void 0, [n], function* ({
5487
5511
  ruleGroup: e,
5488
5512
  variables: t,
5489
5513
  localVariables: o
5490
5514
  }) {
5491
5515
  const r = Object.keys(e)[0] || "$and";
5492
- let a = e[r].map((l) => O(void 0, null, function* () {
5516
+ let a = e[r].map((l) => V(void 0, null, function* () {
5493
5517
  if ("$and" in l || "$or" in l)
5494
5518
  return yield conditionAnalyses({ ruleGroup: l, variables: t, localVariables: o });
5495
5519
  const c = getInnermostKeyAndValue(l), u = c == null ? void 0 : c.key;
@@ -5514,7 +5538,7 @@ function targetFieldToVariableString(e) {
5514
5538
  return `{{ $nForm.${e.join(".")} }}`;
5515
5539
  }
5516
5540
  function getTempFieldState(e, t) {
5517
- return O(this, null, function* () {
5541
+ return V(this, null, function* () {
5518
5542
  return [e, t] = yield Promise.all([e, t]), {
5519
5543
  condition: e,
5520
5544
  value: t
@@ -5566,7 +5590,7 @@ const collectFieldStateOfLinkageRules = ({
5566
5590
  break;
5567
5591
  case ActionType.Value:
5568
5592
  {
5569
- const y = () => O(void 0, null, function* () {
5593
+ const y = () => V(void 0, null, function* () {
5570
5594
  var F;
5571
5595
  if ((t == null ? void 0 : t.mode) === "express") {
5572
5596
  if ((t.value || t.result) == null)
@@ -5595,7 +5619,7 @@ const collectFieldStateOfLinkageRules = ({
5595
5619
  }
5596
5620
  };
5597
5621
  function replaceVariables(n, r) {
5598
- return O(this, arguments, function* (e, {
5622
+ return V(this, arguments, function* (e, {
5599
5623
  variables: t,
5600
5624
  localVariables: o
5601
5625
  }) {
@@ -5603,7 +5627,7 @@ function replaceVariables(n, r) {
5603
5627
  const i = {}, a = {};
5604
5628
  if (e == null)
5605
5629
  return;
5606
- const l = (c = e.match(REGEX_OF_VARIABLE_IN_EXPRESSION)) == null ? void 0 : c.map((u) => O(this, null, function* () {
5630
+ const l = (c = e.match(REGEX_OF_VARIABLE_IN_EXPRESSION)) == null ? void 0 : c.map((u) => V(this, null, function* () {
5607
5631
  const d = yield t.parseVariable(u, o), p = `_${uid$1()}`;
5608
5632
  return a[p] = d, i[u] = p, d;
5609
5633
  }));
@@ -5621,7 +5645,7 @@ const useCloseAction$3 = () => {
5621
5645
  const { setVisible: e } = useActionContext(), t = useForm();
5622
5646
  return {
5623
5647
  run() {
5624
- return O(this, null, function* () {
5648
+ return V(this, null, function* () {
5625
5649
  e(!1), t.submit((n) => {
5626
5650
  console.log(n);
5627
5651
  });
@@ -5632,7 +5656,7 @@ const useCloseAction$3 = () => {
5632
5656
  const { setVisible: e } = useActionContext(), t = useForm(), o = useAPIClient();
5633
5657
  return {
5634
5658
  run() {
5635
- return O(this, null, function* () {
5659
+ return V(this, null, function* () {
5636
5660
  yield t.submit(), yield o.resource("auth").changePassword({
5637
5661
  values: t.values
5638
5662
  }), yield t.reset(), e(!1);
@@ -5776,7 +5800,7 @@ const useCurrentUserSettingsMenu = () => {
5776
5800
  const { setVisible: e } = useActionContext(), t = useForm();
5777
5801
  return {
5778
5802
  run() {
5779
- return O(this, null, function* () {
5803
+ return V(this, null, function* () {
5780
5804
  e(!1), t.submit((n) => {
5781
5805
  console.log(n);
5782
5806
  });
@@ -5790,7 +5814,7 @@ const useCurrentUserSettingsMenu = () => {
5790
5814
  const e = useCurrentUserContext(), { setVisible: t } = useActionContext(), o = useForm(), n = useAPIClient();
5791
5815
  return {
5792
5816
  run() {
5793
- return O(this, null, function* () {
5817
+ return V(this, null, function* () {
5794
5818
  var a;
5795
5819
  const i = yield o.submit();
5796
5820
  t(!1), yield n.resource("users").updateProfile({
@@ -6036,7 +6060,7 @@ const useCurrentUserSettingsMenu = () => {
6036
6060
  value: l
6037
6061
  })),
6038
6062
  defaultValue: t.language,
6039
- onChange: (l) => O(void 0, null, function* () {
6063
+ onChange: (l) => V(void 0, null, function* () {
6040
6064
  yield o.resource("users").updateProfile({
6041
6065
  values: {
6042
6066
  appLang: l
@@ -6353,7 +6377,7 @@ function getRemotePlugins(e, t = []) {
6353
6377
  });
6354
6378
  }
6355
6379
  function getPlugins(e) {
6356
- return O(this, null, function* () {
6380
+ return V(this, null, function* () {
6357
6381
  const { requirejs: t, pluginData: o, devDynamicImport: n } = e;
6358
6382
  if (o.length === 0)
6359
6383
  return [];
@@ -6395,12 +6419,12 @@ let PluginManager$1 = class {
6395
6419
  * @internal
6396
6420
  */
6397
6421
  init(t) {
6398
- return O(this, null, function* () {
6422
+ return V(this, null, function* () {
6399
6423
  yield this.initStaticPlugins(t), this.loadRemotePlugins && (yield this.initRemotePlugins());
6400
6424
  });
6401
6425
  }
6402
6426
  initStaticPlugins() {
6403
- return O(this, arguments, function* (t = []) {
6427
+ return V(this, arguments, function* (t = []) {
6404
6428
  try {
6405
6429
  for (var o = Fe(t), n, r, i; n = !(r = yield o.next()).done; n = !1) {
6406
6430
  const a = r.value;
@@ -6420,7 +6444,7 @@ let PluginManager$1 = class {
6420
6444
  });
6421
6445
  }
6422
6446
  initRemotePlugins() {
6423
- return O(this, null, function* () {
6447
+ return V(this, null, function* () {
6424
6448
  var r;
6425
6449
  const t = yield this.app.apiClient.request({ url: "pm:listEnabled" }), o = ((r = t == null ? void 0 : t.data) == null ? void 0 : r.data) || [], n = yield getPlugins({
6426
6450
  requirejs: this.app.requirejs,
@@ -6446,7 +6470,7 @@ let PluginManager$1 = class {
6446
6470
  });
6447
6471
  }
6448
6472
  add(n) {
6449
- return O(this, arguments, function* (t, o = {}) {
6473
+ return V(this, arguments, function* (t, o = {}) {
6450
6474
  const r = this.getInstance(t, o);
6451
6475
  this.pluginInstances.set(t, r), o.name && (this.pluginsAliases[o.name] = r), o.packageName && (this.pluginsAliases[o.packageName] = r), yield r.afterAdd();
6452
6476
  });
@@ -6461,7 +6485,7 @@ let PluginManager$1 = class {
6461
6485
  * @internal
6462
6486
  */
6463
6487
  load() {
6464
- return O(this, null, function* () {
6488
+ return V(this, null, function* () {
6465
6489
  yield this.initPlugins;
6466
6490
  for (const t of this.pluginInstances.values())
6467
6491
  yield t.beforeLoad();
@@ -6774,9 +6798,9 @@ class WebSocketClient {
6774
6798
  for (const { type: n, listener: r, options: i } of this.events)
6775
6799
  this._ws.addEventListener(n, r, i);
6776
6800
  o = setInterval(() => this.send("ping"), this.pingInterval), this.connected = !0;
6777
- }, t.onerror = () => O(this, null, function* () {
6801
+ }, t.onerror = () => V(this, null, function* () {
6778
6802
  console.log("onerror", this.readyState, this._reconnectTimes);
6779
- }), t.onclose = (n) => O(this, null, function* () {
6803
+ }), t.onclose = (n) => V(this, null, function* () {
6780
6804
  setTimeout(() => this.connect(), this.reconnectInterval), console.log("onclose", this.readyState, this._reconnectTimes, this.serverDown), this.connected = !1, clearInterval(o);
6781
6805
  });
6782
6806
  }
@@ -6830,7 +6854,7 @@ const useNiceDropdownMaxHeight = (e = []) => {
6830
6854
  var n;
6831
6855
  const { getPrefixCls: o } = useContext(ConfigProvider.ConfigContext) || {};
6832
6856
  return "ConfigContext" in ConfigProvider ? (o == null ? void 0 : o(e, t == null ? void 0 : t.prefixCls)) || "" : `${(n = t == null ? void 0 : t.prefixCls) != null ? n : "ant-"}${e != null ? e : ""}`;
6833
- }, useToken = () => theme.useToken(), loading = (e = "Loading...", t) => O(void 0, null, function* () {
6857
+ }, useToken = () => theme.useToken(), loading = (e = "Loading...", t) => V(void 0, null, function* () {
6834
6858
  let o = null;
6835
6859
  const n = setTimeout(() => {
6836
6860
  o = message.loading(e);
@@ -6870,7 +6894,7 @@ function legacyUnmount(e) {
6870
6894
  return unmountComponentAtNode(e);
6871
6895
  }
6872
6896
  function concurrentUnmount(e) {
6873
- return O(this, null, function* () {
6897
+ return V(this, null, function* () {
6874
6898
  return Promise.resolve().then(() => {
6875
6899
  var t;
6876
6900
  (t = e[MARK]) == null || t.unmount(), delete e[MARK];
@@ -7288,7 +7312,7 @@ const SchemaInitializerDivider = () => {
7288
7312
  const x = useForm(), f = useActionContext();
7289
7313
  return {
7290
7314
  run() {
7291
- return O(this, null, function* () {
7315
+ return V(this, null, function* () {
7292
7316
  yield l == null ? void 0 : l(), f.setVisible(!1), x.reset();
7293
7317
  });
7294
7318
  }
@@ -7297,7 +7321,7 @@ const SchemaInitializerDivider = () => {
7297
7321
  const x = useForm(), f = useActionContext();
7298
7322
  return {
7299
7323
  run() {
7300
- return O(this, null, function* () {
7324
+ return V(this, null, function* () {
7301
7325
  yield x.validate(), yield c == null ? void 0 : c(x.values), f.setVisible(!1), x.reset();
7302
7326
  });
7303
7327
  }
@@ -7829,21 +7853,21 @@ https://requirejs.org/docs/errors.html#` + e);
7829
7853
  }
7830
7854
  }
7831
7855
  function S(T, D, $) {
7832
- var q, L, G, U, K, Y, W, X, Q, J, oe, ne, re = D && D.split("/"), ie = a.map, le = ie && ie["*"];
7833
- if (T && (T = T.split("/"), W = T.length - 1, a.nodeIdCompat && jsSuffixRegExp.test(T[W]) && (T[W] = T[W].replace(jsSuffixRegExp, "")), T[0].charAt(0) === "." && re && (ne = re.slice(0, re.length - 1), T = ne.concat(T)), C(T), T = T.join("/")), $ && ie && (re || le)) {
7856
+ var q, L, G, U, K, Y, W, X, Q, J, te, oe, re = D && D.split("/"), se = a.map, ae = se && se["*"];
7857
+ if (T && (T = T.split("/"), W = T.length - 1, a.nodeIdCompat && jsSuffixRegExp.test(T[W]) && (T[W] = T[W].replace(jsSuffixRegExp, "")), T[0].charAt(0) === "." && re && (oe = re.slice(0, re.length - 1), T = oe.concat(T)), C(T), T = T.join("/")), $ && se && (re || ae)) {
7834
7858
  G = T.split("/");
7835
7859
  e:
7836
7860
  for (U = G.length; U > 0; U -= 1) {
7837
7861
  if (Y = G.slice(0, U).join("/"), re) {
7838
7862
  for (K = re.length; K > 0; K -= 1)
7839
- if (L = getOwn(ie, re.slice(0, K).join("/")), L && (L = getOwn(L, Y), L)) {
7863
+ if (L = getOwn(se, re.slice(0, K).join("/")), L && (L = getOwn(L, Y), L)) {
7840
7864
  X = L, Q = U;
7841
7865
  break e;
7842
7866
  }
7843
7867
  }
7844
- !J && le && getOwn(le, Y) && (J = getOwn(le, Y), oe = U);
7868
+ !J && ae && getOwn(ae, Y) && (J = getOwn(ae, Y), te = U);
7845
7869
  }
7846
- !X && J && (X = J, Q = oe), X && (G.splice(0, Q, X), T = G.join("/"));
7870
+ !X && J && (X = J, Q = te), X && (G.splice(0, Q, X), T = G.join("/"));
7847
7871
  }
7848
7872
  return q = getOwn(a.pkgs, T), q || T;
7849
7873
  }
@@ -7866,8 +7890,8 @@ https://requirejs.org/docs/errors.html#` + e);
7866
7890
  }
7867
7891
  function I(T, D, $, q) {
7868
7892
  var L, G, U, K, Y = null, W = D ? D.name : null, X = T, Q = !0, J = "";
7869
- return T || (Q = !1, T = "_@r" + (x += 1)), K = F(T), Y = K[0], T = K[1], Y && (Y = S(Y, W, q), G = getOwn(p, Y)), T && (Y ? $ ? J = T : G && G.normalize ? J = G.normalize(T, function(oe) {
7870
- return S(oe, W, q);
7893
+ return T || (Q = !1, T = "_@r" + (x += 1)), K = F(T), Y = K[0], T = K[1], Y && (Y = S(Y, W, q), G = getOwn(p, Y)), T && (Y ? $ ? J = T : G && G.normalize ? J = G.normalize(T, function(te) {
7894
+ return S(te, W, q);
7871
7895
  }) : J = T.indexOf("!") === -1 ? S(T, W, q) : T : (J = S(T, W, q), K = F(J), Y = K[0], J = K[1], $ = !0, L = n.nameToUrl(J))), U = Y && !G && !$ ? "_unnormalized" + (f += 1) : "", {
7872
7896
  prefix: Y,
7873
7897
  name: J,
@@ -8060,19 +8084,19 @@ https://requirejs.org/docs/errors.html#` + e);
8060
8084
  J.map.id.indexOf(D + "_unnormalized") === 0 && N(J.map.id);
8061
8085
  }), w(Q);
8062
8086
  }), L.fromText = bind(this, function(Q, J) {
8063
- var oe = T.name, ne = I(oe), re = useInteractive;
8064
- J && (Q = J), re && (useInteractive = !1), k(ne), hasProp(a.config, D) && (a.config[oe] = a.config[D]);
8087
+ var te = T.name, oe = I(te), re = useInteractive;
8088
+ J && (Q = J), re && (useInteractive = !1), k(oe), hasProp(a.config, D) && (a.config[te] = a.config[D]);
8065
8089
  try {
8066
8090
  req.exec(Q);
8067
- } catch (ie) {
8091
+ } catch (se) {
8068
8092
  return w(makeError(
8069
8093
  "fromtexteval",
8070
- "fromText eval for " + D + " failed: " + ie,
8071
- ie,
8094
+ "fromText eval for " + D + " failed: " + se,
8095
+ se,
8072
8096
  [D]
8073
8097
  ));
8074
8098
  }
8075
- re && (useInteractive = !0), this.depMaps.push(ne), n.completeLoad(oe), X([oe], L);
8099
+ re && (useInteractive = !0), this.depMaps.push(oe), n.completeLoad(te), X([te], L);
8076
8100
  }), q.load(T.name, X, L, a);
8077
8101
  })), n.enable($, this), this.pluginMaps[$.id] = $;
8078
8102
  },
@@ -8111,7 +8135,7 @@ https://requirejs.org/docs/errors.html#` + e);
8111
8135
  }), T === "error" && delete this.events[T];
8112
8136
  }
8113
8137
  };
8114
- function V(T) {
8138
+ function O(T) {
8115
8139
  hasProp(p, T[0]) || k(I(T[0], null, !0)).init(T[1], T[2]);
8116
8140
  }
8117
8141
  function R(T, D, $, q) {
@@ -8129,7 +8153,7 @@ https://requirejs.org/docs/errors.html#` + e);
8129
8153
  for (M(); d.length; ) {
8130
8154
  if (T = d.shift(), T[0] === null)
8131
8155
  return w(makeError("mismatch", "Mismatched anonymous define() module: " + T[T.length - 1]));
8132
- V(T);
8156
+ O(T);
8133
8157
  }
8134
8158
  n.defQueueMap = {};
8135
8159
  }
@@ -8250,7 +8274,7 @@ https://requirejs.org/docs/errors.html#` + e);
8250
8274
  D = !0;
8251
8275
  } else
8252
8276
  $[0] === T && (D = !0);
8253
- V($);
8277
+ O($);
8254
8278
  }
8255
8279
  if (n.defQueueMap = {}, q = getOwn(l, T), !D && !hasProp(p, T) && q && !q.inited) {
8256
8280
  if (a.enforceDefine && (!G || !getGlobal(G)))
@@ -8260,7 +8284,7 @@ https://requirejs.org/docs/errors.html#` + e);
8260
8284
  null,
8261
8285
  [T]
8262
8286
  ));
8263
- V([T, L.deps || [], L.exportsFn]);
8287
+ O([T, L.deps || [], L.exportsFn]);
8264
8288
  }
8265
8289
  z();
8266
8290
  },
@@ -8487,7 +8511,7 @@ class DataSource {
8487
8511
  this.reloadCallbacks = this.reloadCallbacks.filter((o) => o !== t);
8488
8512
  }
8489
8513
  reload() {
8490
- return O(this, null, function* () {
8514
+ return V(this, null, function* () {
8491
8515
  const t = yield this.getDataSource();
8492
8516
  return this.setOptions(t), this.collectionManager.setCollections(t.collections || []), this.reloadCallbacks.forEach((o) => o(t.collections)), this.options;
8493
8517
  });
@@ -8661,7 +8685,7 @@ class DataSourceManager {
8661
8685
  return this.dataSourceInstancesMap[n.key] = n, n;
8662
8686
  }
8663
8687
  addDataSources(t, o) {
8664
- return O(this, null, function* () {
8688
+ return V(this, null, function* () {
8665
8689
  this.multiDataSources.some(([n, r]) => n === t && r === o) || this.multiDataSources.push([t, o]);
8666
8690
  });
8667
8691
  }
@@ -8684,9 +8708,9 @@ class DataSourceManager {
8684
8708
  this.collectionFieldInterfaceManager.addFieldInterfaces(t);
8685
8709
  }
8686
8710
  reload() {
8687
- return O(this, null, function* () {
8711
+ return V(this, null, function* () {
8688
8712
  return yield Promise.all(
8689
- this.multiDataSources.map((n) => O(this, [n], function* ([t, o]) {
8713
+ this.multiDataSources.map((n) => V(this, [n], function* ([t, o]) {
8690
8714
  (yield t()).map((i) => this.addDataSource(o, i));
8691
8715
  }))
8692
8716
  ), Promise.all(this.getDataSources().map((t) => t.reload()));
@@ -8814,18 +8838,18 @@ const useCollections = (e) => {
8814
8838
  const W = S(R, Y), X = (Q = W == null ? void 0 : W.filter(
8815
8839
  (J) => J.interface && !G.includes(J.interface) && (L || j.includes(J.type) || (T && J.target && J.target !== R && Array.isArray(T) ? T.includes(J.interface) : !1))
8816
8840
  )) == null ? void 0 : Q.map((J) => {
8817
- var ne, re;
8818
- const oe = g({
8841
+ var oe, re;
8842
+ const te = g({
8819
8843
  value: K && U ? `${U}.${J.name}` : J.name,
8820
- label: f((ne = J == null ? void 0 : J.uiSchema) == null ? void 0 : ne.title) || J.name
8844
+ label: f((oe = J == null ? void 0 : J.uiSchema) == null ? void 0 : oe.title) || J.name
8821
8845
  }, J);
8822
- return T && J.target && (oe.children = $.includes(J.target) ? [] : k(J.target, j, v(g({}, B), {
8846
+ return T && J.target && (te.children = $.includes(J.target) ? [] : k(J.target, j, v(g({}, B), {
8823
8847
  cached: D,
8824
8848
  dataSource: Y,
8825
8849
  collectionNames: [...$, J.target],
8826
8850
  prefixFieldValue: K ? U ? `${U}.${J.name}` : J.name : "",
8827
8851
  usePrefix: K
8828
- })), !((re = oe.children) != null && re.length)) ? null : oe;
8852
+ })), !((re = te.children) != null && re.length)) ? null : te;
8829
8853
  }).filter(Boolean);
8830
8854
  return D[R] = X, X;
8831
8855
  },
@@ -8860,7 +8884,7 @@ const useCollections = (e) => {
8860
8884
  return (D = (T = p(B)) == null ? void 0 : T.getCollection(j)) == null ? void 0 : D.getParentCollectionFields(R);
8861
8885
  },
8862
8886
  [t, p]
8863
- ), V = useCallback(
8887
+ ), O = useCallback(
8864
8888
  (R = "general") => t == null ? void 0 : t.collectionTemplateManager.getCollectionTemplate(R),
8865
8889
  [t]
8866
8890
  );
@@ -8869,7 +8893,7 @@ const useCollections = (e) => {
8869
8893
  interfaces: c,
8870
8894
  collections: m,
8871
8895
  templates: u,
8872
- getTemplate: V,
8896
+ getTemplate: O,
8873
8897
  getInterface: N,
8874
8898
  getCollections: d,
8875
8899
  getParentCollectionFields: z,
@@ -9072,7 +9096,7 @@ function useCurrentRequest(e) {
9072
9096
  }));
9073
9097
  }
9074
9098
  function requestParentRecordData(a) {
9075
- return O(this, arguments, function* ({
9099
+ return V(this, arguments, function* ({
9076
9100
  sourceId: e,
9077
9101
  association: t,
9078
9102
  parentRecord: o,
@@ -9283,7 +9307,7 @@ const SchemaComponentProvider = (e) => {
9283
9307
  SchemaComponentProvider.displayName = "SchemaComponentProvider";
9284
9308
  class SchemaComponentPlugin extends Plugin {
9285
9309
  load() {
9286
- return O(this, null, function* () {
9310
+ return V(this, null, function* () {
9287
9311
  this.addComponents();
9288
9312
  });
9289
9313
  }
@@ -9416,7 +9440,7 @@ class Application {
9416
9440
  });
9417
9441
  }
9418
9442
  load() {
9419
- return O(this, null, function* () {
9443
+ return V(this, null, function* () {
9420
9444
  var o, n, r, i, a;
9421
9445
  let t = !1;
9422
9446
  this.ws.on("message", (l) => {
@@ -9904,7 +9928,7 @@ const useRoleVariable = ({
9904
9928
  key: t,
9905
9929
  isLeaf: !1,
9906
9930
  disabled: a,
9907
- loadChildren: (c, u) => O(void 0, null, function* () {
9931
+ loadChildren: (c, u) => V(void 0, null, function* () {
9908
9932
  const d = u ? {
9909
9933
  [u]: void 0
9910
9934
  } : {};
@@ -10007,7 +10031,7 @@ const variablesStore = {}, getFieldPath = (e, t) => {
10007
10031
  const t = useRef({}), o = useAPIClient(), { getCollectionJoinField: n, getCollection: r } = useCollectionManager_deprecated(), i = useCompile(), { builtinVariables: a } = useBuiltInVariables(), l = useCallback((f) => {
10008
10032
  _.isFunction(f) ? t.current = f(t.current) : t.current = f;
10009
10033
  }, []), c = useCallback(
10010
- (f, C, S) => O(void 0, null, function* () {
10034
+ (f, C, S) => V(void 0, null, function* () {
10011
10035
  var E;
10012
10036
  const b = f.split("."), y = b[0], F = mergeVariableToCollectionNameWithLocalVariables(variablesStore, C);
10013
10037
  let I = mergeCtxWithLocalVariables(t.current, C);
@@ -10018,11 +10042,11 @@ const variablesStore = {}, getFieldPath = (e, t) => {
10018
10042
  for (let z = 0; z < b.length; z++) {
10019
10043
  if (I == null)
10020
10044
  return I === void 0 ? w.defaultValue : I;
10021
- const V = b[z], { fieldPath: R } = getFieldPath(b.slice(0, z + 1).join("."), F), j = n(R, A), B = (E = r(M)) == null ? void 0 : E.getPrimaryKey();
10045
+ const O = b[z], { fieldPath: R } = getFieldPath(b.slice(0, z + 1).join("."), F), j = n(R, A), B = (E = r(M)) == null ? void 0 : E.getPrimaryKey();
10022
10046
  if (Array.isArray(I)) {
10023
10047
  const T = I.map((D) => {
10024
- if (shouldToRequest(D == null ? void 0 : D[V]) && (D == null ? void 0 : D[B]) != null && j != null && j.target) {
10025
- const $ = `/${M}/${D[j.sourceKey || B]}/${V}:${getAction(j.type)}`;
10048
+ if (shouldToRequest(D == null ? void 0 : D[O]) && (D == null ? void 0 : D[B]) != null && j != null && j.target) {
10049
+ const $ = `/${M}/${D[j.sourceKey || B]}/${O}:${getAction(j.type)}`;
10026
10050
  if (hasRequested($))
10027
10051
  return getRequested($);
10028
10052
  const q = o.request({
@@ -10031,14 +10055,14 @@ const variablesStore = {}, getFieldPath = (e, t) => {
10031
10055
  params: {
10032
10056
  appends: S == null ? void 0 : S.appends
10033
10057
  }
10034
- }).then((L) => (clearRequested($), D[V] = L.data.data, D[V]));
10058
+ }).then((L) => (clearRequested($), D[O] = L.data.data, D[O]));
10035
10059
  return stashRequested($, q), q;
10036
10060
  }
10037
- return D == null ? void 0 : D[V];
10061
+ return D == null ? void 0 : D[O];
10038
10062
  });
10039
10063
  I = removeThroughCollectionFields(_.flatten(yield Promise.all(T)), j);
10040
- } else if (shouldToRequest(I[V]) && I[B] != null && (j != null && j.target)) {
10041
- const T = `/${M}/${I[j.sourceKey || B]}/${V}:${getAction(j.type)}`;
10064
+ } else if (shouldToRequest(I[O]) && I[B] != null && (j != null && j.target)) {
10065
+ const T = `/${M}/${I[j.sourceKey || B]}/${O}:${getAction(j.type)}`;
10042
10066
  let D = null;
10043
10067
  if (hasRequested(T))
10044
10068
  D = yield getRequested(T);
@@ -10052,9 +10076,9 @@ const variablesStore = {}, getFieldPath = (e, t) => {
10052
10076
  });
10053
10077
  stashRequested(T, $), D = yield $, clearRequested(T);
10054
10078
  }
10055
- raw(I)[V] || (raw(I)[V] = D.data.data), I = removeThroughCollectionFields(getValuesByPath(I, V), j);
10079
+ raw(I)[O] || (raw(I)[O] = D.data.data), I = removeThroughCollectionFields(getValuesByPath(I, O), j);
10056
10080
  } else
10057
- I = removeThroughCollectionFields(getValuesByPath(I, V), j);
10081
+ I = removeThroughCollectionFields(getValuesByPath(I, O), j);
10058
10082
  j != null && j.target && (M = j.target);
10059
10083
  }
10060
10084
  const N = i(_.isFunction(I) ? I() : I);
@@ -10087,7 +10111,7 @@ const variablesStore = {}, getFieldPath = (e, t) => {
10087
10111
  * @param localVariables 局部变量,解析完成后会被清除
10088
10112
  * @returns
10089
10113
  */
10090
- (f, C, S) => O(void 0, null, function* () {
10114
+ (f, C, S) => V(void 0, null, function* () {
10091
10115
  if (!isVariable(f))
10092
10116
  return f;
10093
10117
  C && (C = _.isArray(C) ? C : [C]);
@@ -10096,7 +10120,7 @@ const variablesStore = {}, getFieldPath = (e, t) => {
10096
10120
  }),
10097
10121
  [c]
10098
10122
  ), h = useCallback(
10099
- (f, C) => O(void 0, null, function* () {
10123
+ (f, C) => V(void 0, null, function* () {
10100
10124
  var k;
10101
10125
  if (!isVariable(f))
10102
10126
  throw new Error(`VariablesProvider: ${f} is not a variable string`);
@@ -10596,8 +10620,8 @@ function useServiceOptions$1(e) {
10596
10620
  var C, S, b, y;
10597
10621
  const { action: t = "list", service: o, useOriginalFilter: n } = e, r = useFieldSchema(), i = useField(), { getField: a } = useCollection_deprecated(), { getCollectionJoinField: l } = useCollectionManager_deprecated(), c = useRecord(), { parseFilter: u, findVariable: d } = useParseDataScopeFilter(), [p, m] = useState(null);
10598
10622
  useEffect(() => {
10599
- var w, M, N, E, z, V, R, j, B;
10600
- const F = isString((N = (M = (w = r == null ? void 0 : r["x-component-props"]) == null ? void 0 : w.service) == null ? void 0 : M.params) == null ? void 0 : N.filter) ? (V = (z = (E = i.componentProps) == null ? void 0 : E.service) == null ? void 0 : z.params) == null ? void 0 : V.filter : (B = (j = (R = r == null ? void 0 : r["x-component-props"]) == null ? void 0 : R.service) == null ? void 0 : j.params) == null ? void 0 : B.filter, I = () => O(this, null, function* () {
10623
+ var w, M, N, E, z, O, R, j, B;
10624
+ const F = isString((N = (M = (w = r == null ? void 0 : r["x-component-props"]) == null ? void 0 : w.service) == null ? void 0 : M.params) == null ? void 0 : N.filter) ? (O = (z = (E = i.componentProps) == null ? void 0 : E.service) == null ? void 0 : z.params) == null ? void 0 : O.filter : (B = (j = (R = r == null ? void 0 : r["x-component-props"]) == null ? void 0 : R.service) == null ? void 0 : j.params) == null ? void 0 : B.filter, I = () => V(this, null, function* () {
10601
10625
  var D;
10602
10626
  const T = yield u(mergeFilter([F || ((D = o == null ? void 0 : o.params) == null ? void 0 : D.filter)]));
10603
10627
  m(T);
@@ -10705,6 +10729,54 @@ const SubFormProvider = SubFormContext.Provider, useSubFormValue = () => {
10705
10729
  /** 变量的配置项 */
10706
10730
  currentObjectSettings: d
10707
10731
  };
10732
+ }, CurrentPopupRecordContext = React.createContext(null), CurrentParentPopupRecordContext = React.createContext(null), VariablePopupRecordProvider = (e) => {
10733
+ var i, a;
10734
+ const { t } = useTranslation(), o = useCollectionRecordData(), n = useCollection(), r = useCurrentPopupRecord();
10735
+ return /* @__PURE__ */ jsx(
10736
+ CurrentParentPopupRecordContext.Provider,
10737
+ {
10738
+ value: {
10739
+ name: "$nParentPopupRecord",
10740
+ title: t("Parent popup record"),
10741
+ value: ((i = e.parent) == null ? void 0 : i.recordData) || (r == null ? void 0 : r.value),
10742
+ collection: ((a = e.parent) == null ? void 0 : a.collection) || (r == null ? void 0 : r.collection)
10743
+ },
10744
+ children: /* @__PURE__ */ jsx(
10745
+ CurrentPopupRecordContext.Provider,
10746
+ {
10747
+ value: {
10748
+ name: "$nPopupRecord",
10749
+ title: t("Current popup record"),
10750
+ value: e.recordData || o,
10751
+ collection: e.collection || n
10752
+ },
10753
+ children: e.children
10754
+ }
10755
+ )
10756
+ }
10757
+ );
10758
+ }, useCurrentPopupRecord = () => React.useContext(CurrentPopupRecordContext), useParentPopupRecord = () => React.useContext(CurrentParentPopupRecordContext), useParentPopupVariable = (e = {}) => {
10759
+ const { value: t, title: o, collection: n } = useParentPopupRecord() || {}, { isVariableParsedInOtherContext: r } = useFlag();
10760
+ return {
10761
+ /** 变量配置 */
10762
+ settings: useBaseVariable({
10763
+ collectionField: e.collectionField,
10764
+ uiSchema: e.schema,
10765
+ name: "$nParentPopupRecord",
10766
+ title: o,
10767
+ collectionName: n == null ? void 0 : n.name,
10768
+ noDisabled: e.noDisabled,
10769
+ targetFieldSchema: e.targetFieldSchema,
10770
+ dataSource: n == null ? void 0 : n.dataSource
10771
+ }),
10772
+ /** 变量值 */
10773
+ parentPopupRecordCtx: t,
10774
+ /** 用于判断是否需要显示配置项 */
10775
+ shouldDisplayParentPopupRecord: !!t && !r,
10776
+ /** 当前记录对应的 collection name */
10777
+ collectionName: n == null ? void 0 : n.name,
10778
+ dataSource: n == null ? void 0 : n.dataSource
10779
+ };
10708
10780
  }, ParentCollectionContext = createContext(null);
10709
10781
  ParentCollectionContext.displayName = "ParentCollectionContext";
10710
10782
  const ParentCollectionProvider = (e) => {
@@ -10738,14 +10810,8 @@ const ParentCollectionProvider = (e) => {
10738
10810
  collectionName: n || (i == null ? void 0 : i.name),
10739
10811
  dataSource: c
10740
10812
  };
10741
- }, DeclareVariableContext = createContext(null), DeclareVariable = (e) => {
10742
- const { name: t, value: o, title: n, collection: r } = e;
10743
- return /* @__PURE__ */ jsx(DeclareVariableContext.Provider, { value: { name: t, value: o, title: n, collection: r }, children: e.children });
10744
- }, useVariable = (e) => {
10745
- const { name: t, value: o, title: n, collection: r } = useContext(DeclareVariableContext) || {};
10746
- return t === e ? { value: o, title: n, collection: r } : {};
10747
10813
  }, usePopupVariable = (e = {}) => {
10748
- const { value: t, title: o, collection: n } = useVariable("$nPopupRecord"), { isVariableParsedInOtherContext: r } = useFlag();
10814
+ const { value: t, title: o, collection: n } = useCurrentPopupRecord() || {}, { isVariableParsedInOtherContext: r } = useFlag();
10749
10815
  return {
10750
10816
  /** 变量配置 */
10751
10817
  settings: useBaseVariable({
@@ -10797,9 +10863,13 @@ const ParentCollectionProvider = (e) => {
10797
10863
  popupRecordCtx: c,
10798
10864
  collectionName: u,
10799
10865
  dataSource: d
10800
- } = usePopupVariable(), { datetimeCtx: p } = useDatetimeVariable(), { currentFormCtx: m } = useCurrentFormVariable({ form: e == null ? void 0 : e.currentForm }), { name: h } = useCollection_deprecated();
10801
- let { name: x } = useBlockCollection();
10802
- return e != null && e.collectionName && (x = e.collectionName), useMemo(() => [
10866
+ } = usePopupVariable(), {
10867
+ parentPopupRecordCtx: p,
10868
+ collectionName: m,
10869
+ dataSource: h
10870
+ } = useParentPopupVariable(), { datetimeCtx: x } = useDatetimeVariable(), { currentFormCtx: f } = useCurrentFormVariable({ form: e == null ? void 0 : e.currentForm }), { name: C } = useCollection_deprecated();
10871
+ let { name: S } = useBlockCollection();
10872
+ return e != null && e.collectionName && (S = e.collectionName), useMemo(() => [
10803
10873
  /**
10804
10874
  * @deprecated
10805
10875
  * 兼容老版本
@@ -10814,9 +10884,9 @@ const ParentCollectionProvider = (e) => {
10814
10884
  * 兼容旧版本的以数据表名称命名的变量,新版本已更名为 `$nForm`
10815
10885
  */
10816
10886
  {
10817
- name: x,
10818
- ctx: m || n,
10819
- collectionName: x
10887
+ name: S,
10888
+ ctx: f || n,
10889
+ collectionName: S
10820
10890
  },
10821
10891
  /**
10822
10892
  * @deprecated
@@ -10824,8 +10894,8 @@ const ParentCollectionProvider = (e) => {
10824
10894
  */
10825
10895
  {
10826
10896
  name: "$form",
10827
- ctx: m,
10828
- collectionName: x
10897
+ ctx: f,
10898
+ collectionName: S
10829
10899
  },
10830
10900
  {
10831
10901
  name: "$nRecord",
@@ -10844,14 +10914,20 @@ const ParentCollectionProvider = (e) => {
10844
10914
  collectionName: u,
10845
10915
  dataSource: d
10846
10916
  },
10917
+ {
10918
+ name: "$nParentPopupRecord",
10919
+ ctx: p,
10920
+ collectionName: m,
10921
+ dataSource: h
10922
+ },
10847
10923
  {
10848
10924
  name: "$nForm",
10849
- ctx: m,
10850
- collectionName: x
10925
+ ctx: f,
10926
+ collectionName: S
10851
10927
  },
10852
10928
  {
10853
10929
  name: "$nDate",
10854
- ctx: p
10930
+ ctx: x
10855
10931
  },
10856
10932
  /**
10857
10933
  * @deprecated
@@ -10859,28 +10935,28 @@ const ParentCollectionProvider = (e) => {
10859
10935
  */
10860
10936
  {
10861
10937
  name: "$date",
10862
- ctx: p
10938
+ ctx: x
10863
10939
  },
10864
10940
  o && {
10865
10941
  name: "$iteration",
10866
10942
  ctx: t,
10867
- collectionName: h
10943
+ collectionName: C
10868
10944
  }
10869
10945
  ].filter(Boolean), [
10870
10946
  n,
10871
10947
  r,
10872
- x,
10873
- m,
10948
+ S,
10949
+ f,
10874
10950
  i,
10875
10951
  a,
10876
10952
  l,
10877
10953
  c,
10878
10954
  u,
10879
10955
  d,
10880
- p,
10956
+ x,
10881
10957
  o,
10882
10958
  t,
10883
- h
10959
+ C
10884
10960
  ]);
10885
10961
  }, useVariables = () => useContext(VariablesContext), DEBOUNCE_WAIT = 100;
10886
10962
  function useParsedFilter({ filterOption: e }) {
@@ -10888,7 +10964,7 @@ function useParsedFilter({ filterOption: e }) {
10888
10964
  return useEffect(() => {
10889
10965
  if (!e)
10890
10966
  return;
10891
- const l = () => O(this, null, function* () {
10967
+ const l = () => V(this, null, function* () {
10892
10968
  a(!0);
10893
10969
  const u = yield t(e);
10894
10970
  a(!1), r(u);
@@ -11172,8 +11248,8 @@ const ColDivider = (e) => {
11172
11248
  return;
11173
11249
  const M = l.current, N = M.previousElementSibling, E = M.nextElementSibling;
11174
11250
  h["x-component-props"] = h["x-component-props"] || {}, x["x-component-props"] = x["x-component-props"] || {};
11175
- const z = M.clientWidth * (e.cols.length + 1) / e.cols.length, V = (100 * (N.getBoundingClientRect().width + z) / M.parentElement.clientWidth).toFixed(2), R = (100 * (E.getBoundingClientRect().width + z) / M.parentElement.clientWidth).toFixed(2);
11176
- _.set(h, "x-component-props.width", V), _.set(x, "x-component-props.width", R), i.emit("batchPatch", {
11251
+ const z = M.clientWidth * (e.cols.length + 1) / e.cols.length, O = (100 * (N.getBoundingClientRect().width + z) / M.parentElement.clientWidth).toFixed(2), R = (100 * (E.getBoundingClientRect().width + z) / M.parentElement.clientWidth).toFixed(2);
11252
+ _.set(h, "x-component-props.width", O), _.set(x, "x-component-props.width", R), i.emit("batchPatch", {
11177
11253
  schemas: [
11178
11254
  {
11179
11255
  "x-uid": h["x-uid"],
@@ -11266,27 +11342,29 @@ const ColDivider = (e) => {
11266
11342
  return useMemo(() => e.reduceProperties((t, o) => (o["x-component"] === "Grid.Col" && !o["x-hidden"] && t.push(o), t), []), [Object.keys(e.properties || {}).join(",")]);
11267
11343
  }, DndWrapper = (e) => e.dndContext === !1 ? /* @__PURE__ */ jsx(Fragment, { children: e.children }) : /* @__PURE__ */ jsx(DndContext, v(g({}, e.dndContext), { children: e.children })), useGridContext = () => useContext(GridContext), useGridRowContext = () => useContext(GridRowContext), Grid = observer$1(
11268
11344
  (e) => {
11269
- const { distributed: t, showDivider: o = !0 } = e, n = useRef(null), r = useField(), i = useFieldSchema(), { render: a } = useSchemaInitializerRender(i["x-initializer"], i["x-initializer-props"]), l = useCallback((C) => a(C), []), c = r.address.toString(), u = useRowProperties(), { setPrintContent: d } = useFormBlockContext(), { styles: p } = useStyles$j(), { token: m } = theme.useToken(), { designable: h } = useDesignable(), x = t === void 0 ? (i == null ? void 0 : i.parent["x-component"]) === "Page" || (i == null ? void 0 : i.parent["x-component"]) === "Tabs.TabPane" : t;
11345
+ const { distributed: t, showDivider: o = !0 } = e, n = useRef(null), r = useField(), i = useFieldSchema(), { render: a } = useSchemaInitializerRender(i["x-initializer"], i["x-initializer-props"]), l = useCallback((f) => a(f), []), c = r.address.toString(), u = useRowProperties(), { setPrintContent: d } = useFormBlockContext(), { styles: p } = useStyles$j(), { token: m } = theme.useToken();
11346
+ useDesignable();
11347
+ const h = t === void 0 ? (i == null ? void 0 : i.parent["x-component"]) === "Page" || (i == null ? void 0 : i.parent["x-component"]) === "Tabs.TabPane" : t;
11270
11348
  useEffect(() => {
11271
11349
  n.current && (d == null || d(n.current));
11272
11350
  }, [n.current]);
11273
- const f = useMemo(() => ({
11351
+ const x = useMemo(() => ({
11274
11352
  ref: n,
11275
11353
  fieldSchema: i,
11276
11354
  renderSchemaInitializer: a,
11277
11355
  InitializerComponent: l,
11278
11356
  showDivider: o
11279
11357
  }), [i, a, l, o]);
11280
- return /* @__PURE__ */ jsx(FilterBlockProvider, { children: /* @__PURE__ */ jsx(GridContext.Provider, { value: f, children: /* @__PURE__ */ jsx(
11358
+ return /* @__PURE__ */ jsx(FilterBlockProvider, { children: /* @__PURE__ */ jsx(GridContext.Provider, { value: x, children: /* @__PURE__ */ jsx(
11281
11359
  "div",
11282
11360
  {
11283
11361
  className: cls(
11284
- "nb-grid-container",
11285
- css`
11286
- & {
11287
- margin-bottom: ${h ? 0 : -m.marginLG}px;
11288
- }
11289
- `
11362
+ "nb-grid-container"
11363
+ // css`
11364
+ // & {
11365
+ // margin-bottom: ${designable ? 0 : -token.marginLG}px;
11366
+ // }
11367
+ // `,
11290
11368
  ),
11291
11369
  children: /* @__PURE__ */ jsx("div", { className: cls(`nb-grid ${p.container}`), style: { position: "relative" }, ref: n, children: /* @__PURE__ */ jsxs("div", { className: "nb-grid-warp", children: [
11292
11370
  /* @__PURE__ */ jsxs(DndWrapper, { dndContext: e.dndContext, children: [
@@ -11304,25 +11382,29 @@ const ColDivider = (e) => {
11304
11382
  }
11305
11383
  }
11306
11384
  ) : null,
11307
- u.map((C, S) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
11308
- x ? /* @__PURE__ */ jsx(SchemaComponent, { name: C.name, schema: C, distributed: !0 }) : /* @__PURE__ */ jsx(MemorizedRecursionField, { name: C.name, schema: C }),
11385
+ u.map((f, C) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
11386
+ h ? /* @__PURE__ */ jsx(SchemaComponent, { name: f.name, schema: f, distributed: !0 }) : /* @__PURE__ */ jsx(MemorizedRecursionField, { name: f.name, schema: f }),
11309
11387
  o ? /* @__PURE__ */ jsx(
11310
11388
  RowDivider,
11311
11389
  {
11312
11390
  rows: u,
11313
- index: S,
11314
- id: `${c}_${S + 1}`,
11391
+ index: C,
11392
+ id: `${c}_${C + 1}`,
11315
11393
  data: {
11316
11394
  breakRemoveOn: breakRemoveOnGrid,
11317
11395
  wrapSchema: wrapRowSchema,
11318
11396
  insertAdjacent: "afterEnd",
11319
- schema: C
11397
+ schema: f
11320
11398
  }
11321
11399
  }
11322
11400
  ) : null
11323
- ] }, S))
11401
+ ] }, C))
11324
11402
  ] }),
11325
- a()
11403
+ a({
11404
+ style: {
11405
+ marginBottom: m.marginLG
11406
+ }
11407
+ })
11326
11408
  ] }) })
11327
11409
  }
11328
11410
  ) }) });
@@ -11931,7 +12013,7 @@ const DataBlockInitializer = (e) => {
11931
12013
  currentText: S,
11932
12014
  otherText: b
11933
12015
  } = e, { insert: y, setVisible: F } = useSchemaInitializer(), I = useCompile(), { getTemplateSchemaByMode: k } = useSchemaTemplateManager(), A = useCallback(
11934
- (B) => O(void 0, null, function* () {
12016
+ (B) => V(void 0, null, function* () {
11935
12017
  const { item: T, fromOthersInPopup: D } = B;
11936
12018
  if (f)
11937
12019
  return f(B);
@@ -11956,9 +12038,9 @@ const DataBlockInitializer = (e) => {
11956
12038
  onClick: A,
11957
12039
  currentText: S,
11958
12040
  otherText: b
11959
- }), M = useGetSchemaInitializerMenuItems(A), N = useMemo(() => M(w, i), [M, w, i]), [E, z] = useState([]), V = useMenuSearch({ data: N, openKeys: E, hideSearch: u }), R = useMemo(() => {
11960
- let B = V.filter((T) => T.key !== "search" && T.key !== "empty");
11961
- return p && B.length === 1 ? B = B[0].children : B = V, [
12041
+ }), M = useGetSchemaInitializerMenuItems(A), N = useMemo(() => M(w, i), [M, w, i]), [E, z] = useState([]), O = useMenuSearch({ data: N, openKeys: E, hideSearch: u }), R = useMemo(() => {
12042
+ let B = O.filter((T) => T.key !== "search" && T.key !== "empty");
12043
+ return p && B.length === 1 ? B = B[0].children : B = O, [
11962
12044
  {
11963
12045
  key: i,
11964
12046
  label: I(a),
@@ -11969,7 +12051,7 @@ const DataBlockInitializer = (e) => {
11969
12051
  children: B
11970
12052
  }
11971
12053
  ];
11972
- }, [V, p, i, I, a, r, A, e]);
12054
+ }, [O, p, i, I, a, r, A, e]);
11973
12055
  return N.length > 1 || N.length === 1 && ((j = N[0].children) == null ? void 0 : j.length) > 0 ? /* @__PURE__ */ jsx(
11974
12056
  SchemaInitializerMenu,
11975
12057
  {
@@ -12069,7 +12151,7 @@ const DataBlockInitializer = (e) => {
12069
12151
  v(g({}, a), {
12070
12152
  icon: /* @__PURE__ */ jsx(TableOutlined, {}),
12071
12153
  componentType: "Table",
12072
- onCreateBlockSchema: (c) => O(void 0, null, function* () {
12154
+ onCreateBlockSchema: (c) => V(void 0, null, function* () {
12073
12155
  if (n)
12074
12156
  return n(c);
12075
12157
  l(c);
@@ -12331,7 +12413,7 @@ function FormDialog(e, t, o, n) {
12331
12413
  var S;
12332
12414
  ((S = l == null ? void 0 : l.onCancel) == null ? void 0 : S.call(l, C)) !== !1 && (h == null || h());
12333
12415
  },
12334
- onOk: (C) => O(this, null, function* () {
12416
+ onOk: (C) => V(this, null, function* () {
12335
12417
  var S;
12336
12418
  ((S = l == null ? void 0 : l.onOk) == null ? void 0 : S.call(l, C)) !== !1 && (m == null || m());
12337
12419
  }),
@@ -12345,8 +12427,8 @@ function FormDialog(e, t, o, n) {
12345
12427
  forOpen: (p) => (isFn(p) && r.openMiddlewares.push(p), d),
12346
12428
  forConfirm: (p) => (isFn(p) && r.confirmMiddlewares.push(p), d),
12347
12429
  forCancel: (p) => (isFn(p) && r.cancelMiddlewares.push(p), d),
12348
- open: (p) => O(this, null, function* () {
12349
- return r.promise || (r.promise = new Promise((m, h) => O(this, null, function* () {
12430
+ open: (p) => V(this, null, function* () {
12431
+ return r.promise || (r.promise = new Promise((m, h) => V(this, null, function* () {
12350
12432
  try {
12351
12433
  p = yield loading(l.loadingText, () => applyMiddleware(p, r.openMiddlewares)), r.form = r.form || createForm(p);
12352
12434
  } catch (x) {
@@ -12357,7 +12439,7 @@ function FormDialog(e, t, o, n) {
12357
12439
  !0,
12358
12440
  () => {
12359
12441
  var x;
12360
- (x = r.form) == null || x.submit(() => O(this, null, function* () {
12442
+ (x = r.form) == null || x.submit(() => V(this, null, function* () {
12361
12443
  yield applyMiddleware(r.form, r.confirmMiddlewares), untracked(() => {
12362
12444
  var f;
12363
12445
  m(g({}, (f = r.form) == null ? void 0 : f.values));
@@ -12365,7 +12447,7 @@ function FormDialog(e, t, o, n) {
12365
12447
  })).catch(() => {
12366
12448
  });
12367
12449
  },
12368
- () => O(this, null, function* () {
12450
+ () => V(this, null, function* () {
12369
12451
  yield loading(l.loadingText, () => applyMiddleware(r.form, r.cancelMiddlewares)), d.close();
12370
12452
  })
12371
12453
  )
@@ -12436,7 +12518,7 @@ const useGetAriaLabelOfBlockItem = (e) => {
12436
12518
  const o = useLocation(), [n, r] = React.useState(!1), i = useAPIClient();
12437
12519
  return {
12438
12520
  loading: n,
12439
- download: () => O(void 0, null, function* () {
12521
+ download: () => V(void 0, null, function* () {
12440
12522
  r(!0);
12441
12523
  try {
12442
12524
  const a = yield i.request({
@@ -13004,7 +13086,7 @@ const useParseDefaultValue = () => {
13004
13086
  useEffect(() => {
13005
13087
  if (t.default == null || a || l || isSubMode(t) || !(r != null && r.isNew) && !i)
13006
13088
  return;
13007
- const f = (...b) => O(void 0, [...b], function* ({ forceUpdate: S = !1 } = {}) {
13089
+ const f = (...b) => V(void 0, [...b], function* ({ forceUpdate: S = !1 } = {}) {
13008
13090
  if (o && e && (isVariable(t.default) && e.value == null || e.value === t.default || S)) {
13009
13091
  isVariable(e.value) && (yield e.reset({ forceClear: !0 })), e.loading = !0;
13010
13092
  const y = !t.name.toString().includes(".") && d(t.name), F = transformVariableValue(yield o.parseVariable(t.default, n), {
@@ -13335,7 +13417,7 @@ const SchemaTemplateManagerProvider = (e) => {
13335
13417
  templates: o,
13336
13418
  refresh: t,
13337
13419
  getTemplateSchemaByMode(i) {
13338
- return O(this, null, function* () {
13420
+ return V(this, null, function* () {
13339
13421
  const { mode: a, template: l } = i;
13340
13422
  if (a === "copy") {
13341
13423
  const { data: c } = yield n.request({
@@ -13353,7 +13435,7 @@ const SchemaTemplateManagerProvider = (e) => {
13353
13435
  });
13354
13436
  },
13355
13437
  copyTemplateSchema(i) {
13356
- return O(this, null, function* () {
13438
+ return V(this, null, function* () {
13357
13439
  const { data: a } = yield n.request({
13358
13440
  url: `/uiSchemas:getJsonSchema/${i.uid}?includeAsyncNode=true`
13359
13441
  }), l = (a == null ? void 0 : a.data) || {};
@@ -13361,7 +13443,7 @@ const SchemaTemplateManagerProvider = (e) => {
13361
13443
  });
13362
13444
  },
13363
13445
  saveAsTemplate(i) {
13364
- return O(this, null, function* () {
13446
+ return V(this, null, function* () {
13365
13447
  const { uid: a } = i, l = uid();
13366
13448
  return yield n.resource("uiSchemas").saveAsTemplate({
13367
13449
  filterByTk: a,
@@ -13413,7 +13495,7 @@ const SchemaTemplateManagerProvider = (e) => {
13413
13495
  return r.loading ? o() : /* @__PURE__ */ jsx(
13414
13496
  SchemaTemplateManagerProvider,
13415
13497
  {
13416
- refresh: () => O(void 0, null, function* () {
13498
+ refresh: () => V(void 0, null, function* () {
13417
13499
  const { data: a } = yield t.request(n);
13418
13500
  r.mutate(a);
13419
13501
  }),
@@ -13424,7 +13506,7 @@ const SchemaTemplateManagerProvider = (e) => {
13424
13506
  };
13425
13507
  class RemoteSchemaTemplateManagerPlugin extends Plugin {
13426
13508
  load() {
13427
- return O(this, null, function* () {
13509
+ return V(this, null, function* () {
13428
13510
  this.addRoutes(), this.addComponents();
13429
13511
  });
13430
13512
  }
@@ -13458,11 +13540,11 @@ function SchemaSettingsTemplate(e) {
13458
13540
  SchemaSettingsItem,
13459
13541
  {
13460
13542
  title: "Convert reference to duplicate",
13461
- onClick: () => O(this, null, function* () {
13543
+ onClick: () => V(this, null, function* () {
13462
13544
  const b = yield C(d), y = x.removeWithoutEmit();
13463
13545
  x.insertAfterEnd(b, {
13464
13546
  onSuccess() {
13465
- return O(this, null, function* () {
13547
+ return V(this, null, function* () {
13466
13548
  yield h.request({
13467
13549
  url: `/uiSchemas:remove/${y["x-uid"]}`
13468
13550
  });
@@ -13476,7 +13558,7 @@ function SchemaSettingsTemplate(e) {
13476
13558
  SchemaSettingsItem,
13477
13559
  {
13478
13560
  title: "Save as template",
13479
- onClick: () => O(this, null, function* () {
13561
+ onClick: () => V(this, null, function* () {
13480
13562
  u(!1);
13481
13563
  const b = o && l(o), y = yield FormDialog(
13482
13564
  a("Save as template"),
@@ -13829,8 +13911,8 @@ const findOption$1 = (e = [], t) => {
13829
13911
  targetFieldSchema: i,
13830
13912
  record: a
13831
13913
  }) => {
13832
- var A;
13833
- const l = (A = a == null ? void 0 : a.__parent) == null ? void 0 : A.__collectionName, { currentUserSettings: c } = useCurrentUserVariable({
13914
+ var M;
13915
+ const l = (M = a == null ? void 0 : a.__parent) == null ? void 0 : M.__collectionName, { currentUserSettings: c } = useCurrentUserVariable({
13834
13916
  maxDepth: 3,
13835
13917
  uiSchema: o,
13836
13918
  collectionField: e,
@@ -13862,13 +13944,18 @@ const findOption$1 = (e = [], t) => {
13862
13944
  collectionField: e,
13863
13945
  noDisabled: r,
13864
13946
  targetFieldSchema: i
13865
- }), { currentParentRecordSettings: y, shouldDisplayCurrentParentRecord: F } = useCurrentParentRecordVariable({
13947
+ }), { settings: y, shouldDisplayParentPopupRecord: F } = useParentPopupVariable({
13948
+ schema: o,
13949
+ collectionField: e,
13950
+ noDisabled: r,
13951
+ targetFieldSchema: i
13952
+ }), { currentParentRecordSettings: I, shouldDisplayCurrentParentRecord: k } = useCurrentParentRecordVariable({
13866
13953
  schema: o,
13867
13954
  collectionName: l,
13868
13955
  collectionField: e,
13869
13956
  noDisabled: r,
13870
13957
  targetFieldSchema: i
13871
- }), { urlSearchParamsSettings: I, shouldDisplay: k } = useURLSearchParamsVariable();
13958
+ }), { urlSearchParamsSettings: A, shouldDisplay: w } = useURLSearchParamsVariable();
13872
13959
  return useMemo(() => [
13873
13960
  c,
13874
13961
  u,
@@ -13876,9 +13963,10 @@ const findOption$1 = (e = [], t) => {
13876
13963
  m && p,
13877
13964
  x && h,
13878
13965
  C && f,
13879
- F && y,
13966
+ k && I,
13880
13967
  b && S,
13881
- k && I
13968
+ F && y,
13969
+ w && A
13882
13970
  ].filter(Boolean), [
13883
13971
  c,
13884
13972
  u,
@@ -13889,12 +13977,12 @@ const findOption$1 = (e = [], t) => {
13889
13977
  h,
13890
13978
  C,
13891
13979
  f,
13892
- F,
13893
- y,
13980
+ k,
13981
+ I,
13894
13982
  b,
13895
13983
  S,
13896
- k,
13897
- I
13984
+ w,
13985
+ A
13898
13986
  ]);
13899
13987
  }, VariableInput = (e) => {
13900
13988
  const {
@@ -13931,7 +14019,7 @@ const findOption$1 = (e = [], t) => {
13931
14019
  (A, w) => {
13932
14020
  if (!u)
13933
14021
  return o(A);
13934
- setTimeout(() => O(void 0, null, function* () {
14022
+ setTimeout(() => V(void 0, null, function* () {
13935
14023
  (yield u(A, w)) && o(A);
13936
14024
  }));
13937
14025
  },
@@ -13960,7 +14048,7 @@ const findOption$1 = (e = [], t) => {
13960
14048
  getAllCollectionsInheritChain: n
13961
14049
  }) => {
13962
14050
  const r = e ? n(e.target) : [];
13963
- return (i, a) => O(void 0, null, function* () {
14051
+ return (i, a) => V(void 0, null, function* () {
13964
14052
  if (_.isString(i) && i.includes("$nRole") || !isVariable(i) || !t || !e || e.interface === "json")
13965
14053
  return !0;
13966
14054
  const l = a[a.length - 1];
@@ -14133,12 +14221,12 @@ const useHookDefault = (e) => e, createSelectSchemaSettingsItem = (e) => {
14133
14221
  return {
14134
14222
  name: t,
14135
14223
  type: "select",
14224
+ useVisible: a,
14136
14225
  useComponentProps() {
14137
14226
  const u = useFieldSchema(), { deepMerge: d } = useDesignable$1(), p = r(n), m = c(l), h = useCompile$1(), { t: x } = useTranslation();
14138
14227
  return {
14139
14228
  title: typeof o == "function" ? o(x) : h(o),
14140
14229
  options: p,
14141
- useVisible: a,
14142
14230
  value: _.get(u, i, m),
14143
14231
  onChange(f) {
14144
14232
  d(getNewSchema({ fieldSchema: u, schemaKey: i, value: f }));
@@ -14186,11 +14274,11 @@ function createModalSettingsItem(e) {
14186
14274
  return {
14187
14275
  name: t,
14188
14276
  type: "actionModal",
14277
+ useVisible: a,
14189
14278
  useComponentProps() {
14190
14279
  const u = useFieldSchema(), { deepMerge: d } = useDesignable$1(), p = c(l), m = _.get(u, o), h = useCompile$1(), { t: x } = useTranslation();
14191
14280
  return {
14192
14281
  title: typeof i == "function" ? i(x) : h(i),
14193
- useVisible: a,
14194
14282
  schema: r(g(g({}, p), m)),
14195
14283
  onSubmit(f) {
14196
14284
  d(getNewSchema({ fieldSchema: u, schemaKey: o, value: f, valueKeys: n }));
@@ -14254,7 +14342,7 @@ const tableBlockSettings = new SchemaSettings({
14254
14342
  return {
14255
14343
  title: r("Enable drag and drop sorting"),
14256
14344
  checked: t.decoratorProps.dragSort,
14257
- onChange: (u) => O(void 0, null, function* () {
14345
+ onChange: (u) => V(void 0, null, function* () {
14258
14346
  var d, p, m;
14259
14347
  if (u && l) {
14260
14348
  const { data: h } = yield c.resource("collections.fields", l.collectionName).update({
@@ -14482,7 +14570,7 @@ const SchemaSettingsDefaultValue = function e(t) {
14482
14570
  return !(G != null && G.length) && L && (L.children = formatVariableScop(b())), q;
14483
14571
  },
14484
14572
  [b, I]
14485
- ), V = useMemo(() => ({
14573
+ ), O = useMemo(() => ({
14486
14574
  ArrayCollapse: ArrayCollapse$2,
14487
14575
  FormLayout,
14488
14576
  VariableInput: (q) => /* @__PURE__ */ jsx(FlagProvider, { isInSubForm: y, isInSubTable: F, isInSetDefaultValueDialog: !0, children: /* @__PURE__ */ jsx(VariableInput, g({}, q)) })
@@ -14566,7 +14654,7 @@ const SchemaSettingsDefaultValue = function e(t) {
14566
14654
  SchemaSettingsModalItem,
14567
14655
  {
14568
14656
  title: a("Set default value"),
14569
- components: V,
14657
+ components: O,
14570
14658
  width: 800,
14571
14659
  schema: R,
14572
14660
  onSubmit: j
@@ -15036,7 +15124,7 @@ const InternalTableBlockProvider = (e) => {
15036
15124
  o.field.data = ((b = o == null ? void 0 : o.field) == null ? void 0 : b.data) || {}, o.field.data.selectedRowKeys = S, (F = (y = o == null ? void 0 : o.field) == null ? void 0 : y.onRowSelect) == null || F.call(y, S);
15037
15125
  }, []),
15038
15126
  onRowDragEnd: useCallback(
15039
- (y) => O(void 0, [y], function* ({ from: S, to: b }) {
15127
+ (y) => V(void 0, [y], function* ({ from: S, to: b }) {
15040
15128
  yield o.resource.move({
15041
15129
  sourceId: S[o.rowKey || "id"],
15042
15130
  targetId: b[o.rowKey || "id"],
@@ -15062,11 +15150,11 @@ const InternalTableBlockProvider = (e) => {
15062
15150
  }
15063
15151
  const A = [S[o.rowKey]];
15064
15152
  k.forEach((w) => {
15065
- var V, R, j;
15153
+ var O, R, j;
15066
15154
  const M = F.find((B) => B.uid === w.uid);
15067
15155
  if (!M)
15068
15156
  return;
15069
- const N = ((V = w.service.params) == null ? void 0 : V[0]) || {}, E = ((j = (R = w.service.params) == null ? void 0 : R[1]) == null ? void 0 : j.filters) || {};
15157
+ const N = ((O = w.service.params) == null ? void 0 : O[0]) || {}, E = ((j = (R = w.service.params) == null ? void 0 : R[1]) == null ? void 0 : j.filters) || {};
15070
15158
  if (y.includes(S[o.rowKey])) {
15071
15159
  if (w.dataLoadingMode === "manual")
15072
15160
  return w.clearData();
@@ -15199,7 +15287,7 @@ class TableFieldResource {
15199
15287
  this.field = t.field, this.api = t.api, this.sourceId = t.sourceId, this.resource = this.api.resource(t.resource, this.sourceId);
15200
15288
  }
15201
15289
  list(t) {
15202
- return O(this, null, function* () {
15290
+ return V(this, null, function* () {
15203
15291
  if (this.field.data = this.field.data || {}, this.field.data.changed)
15204
15292
  return console.log("list.dataSource", this.field.data.dataSource), {
15205
15293
  data: {
@@ -15221,7 +15309,7 @@ class TableFieldResource {
15221
15309
  });
15222
15310
  }
15223
15311
  get(t) {
15224
- return O(this, null, function* () {
15312
+ return V(this, null, function* () {
15225
15313
  console.log("get", t);
15226
15314
  const { filterByTk: o } = t;
15227
15315
  return {
@@ -15232,21 +15320,21 @@ class TableFieldResource {
15232
15320
  });
15233
15321
  }
15234
15322
  create(t) {
15235
- return O(this, null, function* () {
15323
+ return V(this, null, function* () {
15236
15324
  console.log("create", t);
15237
15325
  const { values: o } = t;
15238
15326
  this.field.data.dataSource.push(o), this.field.data.changed = !0;
15239
15327
  });
15240
15328
  }
15241
15329
  update(t) {
15242
- return O(this, null, function* () {
15330
+ return V(this, null, function* () {
15243
15331
  console.log("update", t);
15244
15332
  const { filterByTk: o, values: n } = t;
15245
15333
  this.field.data.dataSource[o] = n, this.field.data.changed = !0;
15246
15334
  });
15247
15335
  }
15248
15336
  destroy(t) {
15249
- return O(this, null, function* () {
15337
+ return V(this, null, function* () {
15250
15338
  console.log("destroy", t);
15251
15339
  let { filterByTk: o } = t;
15252
15340
  Array.isArray(o) || (o = [o]), this.field.data.dataSource = this.field.data.dataSource.filter((n, r) => !o.includes(r)), this.field.data.changed = !0;
@@ -15401,10 +15489,10 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
15401
15489
  var a, l, c, u, d, p, m, h, x, f, C, S, b, y, F, I;
15402
15490
  const e = useField(), t = useTableSelectorContext(), o = useFieldSchema(), { getCollectionJoinField: n } = useCollectionManager_deprecated(), r = recursiveParent$1(o, "CollectionField"), i = n(r == null ? void 0 : r["x-collection-field"]);
15403
15491
  return useEffect(() => {
15404
- var A, w, M, N, E, z, V, R, j, B, T, D, $, q, L;
15492
+ var A, w, M, N, E, z, O, R, j, B, T, D, $, q, L;
15405
15493
  if (!((A = t == null ? void 0 : t.service) != null && A.loading)) {
15406
15494
  const G = (M = (w = t == null ? void 0 : t.service) == null ? void 0 : w.data) == null ? void 0 : M.data.map((U) => _.omit(U, i == null ? void 0 : i.foreignKey));
15407
- e.value = G, (N = e == null ? void 0 : e.setInitialValue) == null || N.call(e, G), e.data = e.data || {}, e.data.selectedRowKeys = (z = (E = t == null ? void 0 : t.field) == null ? void 0 : E.data) == null ? void 0 : z.selectedRowKeys, e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (j = (R = (V = t == null ? void 0 : t.service) == null ? void 0 : V.data) == null ? void 0 : R.meta) == null ? void 0 : j.pageSize, e.componentProps.pagination.total = (D = (T = (B = t == null ? void 0 : t.service) == null ? void 0 : B.data) == null ? void 0 : T.meta) == null ? void 0 : D.count, e.componentProps.pagination.current = (L = (q = ($ = t == null ? void 0 : t.service) == null ? void 0 : $.data) == null ? void 0 : q.meta) == null ? void 0 : L.page;
15495
+ e.value = G, (N = e == null ? void 0 : e.setInitialValue) == null || N.call(e, G), e.data = e.data || {}, e.data.selectedRowKeys = (z = (E = t == null ? void 0 : t.field) == null ? void 0 : E.data) == null ? void 0 : z.selectedRowKeys, e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (j = (R = (O = t == null ? void 0 : t.service) == null ? void 0 : O.data) == null ? void 0 : R.meta) == null ? void 0 : j.pageSize, e.componentProps.pagination.total = (D = (T = (B = t == null ? void 0 : t.service) == null ? void 0 : B.data) == null ? void 0 : T.meta) == null ? void 0 : D.count, e.componentProps.pagination.current = (L = (q = ($ = t == null ? void 0 : t.service) == null ? void 0 : $.data) == null ? void 0 : q.meta) == null ? void 0 : L.page;
15408
15496
  }
15409
15497
  }, [
15410
15498
  i == null ? void 0 : i.foreignKey,
@@ -15426,7 +15514,7 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
15426
15514
  t.field.data = ((M = t == null ? void 0 : t.field) == null ? void 0 : M.data) || {}, t.field.data.selectedRowKeys = A;
15427
15515
  },
15428
15516
  onRowDragEnd(M) {
15429
- return O(this, arguments, function* ({ from: A, to: w }) {
15517
+ return V(this, arguments, function* ({ from: A, to: w }) {
15430
15518
  yield t.resource.move({
15431
15519
  sourceId: A[t.rowKey || "id"],
15432
15520
  targetId: w[t.rowKey || "id"]
@@ -15484,7 +15572,7 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
15484
15572
  );
15485
15573
  class BlockSchemaComponentPlugin extends Plugin {
15486
15574
  load() {
15487
- return O(this, null, function* () {
15575
+ return V(this, null, function* () {
15488
15576
  this.addComponents(), this.addScopes();
15489
15577
  });
15490
15578
  }
@@ -15540,7 +15628,7 @@ const useUpdateSchemaTemplateActionProps = () => {
15540
15628
  const e = useUpdateActionProps(), { __parent: t } = useBlockRequestContext();
15541
15629
  return {
15542
15630
  onClick() {
15543
- return O(this, null, function* () {
15631
+ return V(this, null, function* () {
15544
15632
  var n, r;
15545
15633
  yield e.onClick(), (r = (n = t == null ? void 0 : t.service) == null ? void 0 : n.refresh) == null || r.call(n);
15546
15634
  });
@@ -15550,7 +15638,7 @@ const useUpdateSchemaTemplateActionProps = () => {
15550
15638
  const e = useBulkDestroyActionProps(), t = useSchemaTemplateManager(), { service: o } = useBlockRequestContext();
15551
15639
  return {
15552
15640
  onClick() {
15553
- return O(this, null, function* () {
15641
+ return V(this, null, function* () {
15554
15642
  var r;
15555
15643
  yield e.onClick(), yield t.refresh(), (r = o == null ? void 0 : o.refresh) == null || r.call(o);
15556
15644
  });
@@ -15560,7 +15648,7 @@ const useUpdateSchemaTemplateActionProps = () => {
15560
15648
  const e = useDestroyActionProps(), { service: t } = useBlockRequestContext(), o = useSchemaTemplateManager();
15561
15649
  return {
15562
15650
  onClick() {
15563
- return O(this, null, function* () {
15651
+ return V(this, null, function* () {
15564
15652
  var r;
15565
15653
  yield e.onClick(), yield o.refresh(), (r = t == null ? void 0 : t.refresh) == null || r.call(t);
15566
15654
  });
@@ -17083,9 +17171,9 @@ const useStyles$h = createStyles(() => ({
17083
17171
  return {
17084
17172
  insertPosition: "afterEnd",
17085
17173
  wrap: ((z = b == null ? void 0 : b.cols) == null ? void 0 : z.length) > 1 ? void 0 : gridRowColWrap,
17086
- Component: (V) => /* @__PURE__ */ jsx(
17174
+ Component: (O) => /* @__PURE__ */ jsx(
17087
17175
  PlusOutlined,
17088
- v(g({}, V), {
17176
+ v(g({}, O), {
17089
17177
  role: "button",
17090
17178
  "aria-label": x("schema-initializer"),
17091
17179
  style: { cursor: "pointer", fontSize: 14 }
@@ -17123,7 +17211,7 @@ const useStyles$h = createStyles(() => ({
17123
17211
  ] }) })
17124
17212
  ] }) })) : null;
17125
17213
  }, InternalSchemaToolbar = (e) => {
17126
- var V;
17214
+ var O;
17127
17215
  const t = useFieldSchema(), {
17128
17216
  title: o,
17129
17217
  initializer: n,
@@ -17158,7 +17246,7 @@ const useStyles$h = createStyles(() => ({
17158
17246
  })
17159
17247
  )
17160
17248
  };
17161
- }, [m, (V = k == null ? void 0 : k.cols) == null ? void 0 : V.length]), M = useMemo(() => l === !1 ? null : /* @__PURE__ */ jsx(DragHandler, { children: /* @__PURE__ */ jsx(DragOutlined, { role: "button", "aria-label": m("drag-handler") }) }), [l, m]), N = useMemo(() => {
17249
+ }, [m, (O = k == null ? void 0 : k.cols) == null ? void 0 : O.length]), M = useMemo(() => l === !1 ? null : /* @__PURE__ */ jsx(DragHandler, { children: /* @__PURE__ */ jsx(DragOutlined, { role: "button", "aria-label": m("drag-handler") }) }), [l, m]), N = useMemo(() => {
17162
17250
  var R;
17163
17251
  if (n === !1)
17164
17252
  return null;
@@ -17253,7 +17341,7 @@ const useCollectMenuItem = () => useContext(GetMenuItemContext) || {}, useCollec
17253
17341
  return { Component: n, getMenuItems: r, getMenuItem: i, clean: a };
17254
17342
  }, useA = () => ({
17255
17343
  run() {
17256
- return O(this, null, function* () {
17344
+ return V(this, null, function* () {
17257
17345
  });
17258
17346
  }
17259
17347
  }), useActionContext = () => {
@@ -17270,7 +17358,7 @@ const useCollectMenuItem = () => useContext(GetMenuItemContext) || {}, useCollec
17270
17358
  title: t("Unsaved changes"),
17271
17359
  content: t("Are you sure you don't want to save?"),
17272
17360
  onOk() {
17273
- return O(this, null, function* () {
17361
+ return V(this, null, function* () {
17274
17362
  var c;
17275
17363
  e.setFormValueChanged(!1), (c = e.setVisible) == null || c.call(e, !1);
17276
17364
  });
@@ -17284,7 +17372,7 @@ const useCollectMenuItem = () => useContext(GetMenuItemContext) || {}, useCollec
17284
17372
  const { setVisible: e } = useContext(ActionContext), t = useForm();
17285
17373
  return {
17286
17374
  run() {
17287
- return O(this, null, function* () {
17375
+ return V(this, null, function* () {
17288
17376
  e(!1), t.submit((n) => {
17289
17377
  console.log(n);
17290
17378
  });
@@ -17841,7 +17929,7 @@ const EnableChildCollections = withDynamicSchemaProps(
17841
17929
  d.dataSource = m, d.loading = !1, d.initialValue && (d.disabled = !0);
17842
17930
  })
17843
17931
  );
17844
- }, c = (u) => O(void 0, null, function* () {
17932
+ }, c = (u) => V(void 0, null, function* () {
17845
17933
  var p, m;
17846
17934
  const { childrenCollections: d } = ((p = n.values) == null ? void 0 : p.enableChildren) || {};
17847
17935
  return (m = a.filter((h) => !d.find((x) => x.collection === h.name) || u.initialValue || h.name === u.value)) == null ? void 0 : m.map((h) => ({
@@ -18689,7 +18777,7 @@ const SchemaSettingsProvider = (e) => {
18689
18777
  SchemaSettingsItem,
18690
18778
  {
18691
18779
  title: "Convert reference to duplicate",
18692
- onClick: () => O(this, null, function* () {
18780
+ onClick: () => V(this, null, function* () {
18693
18781
  const S = yield f(p), b = findBlockTemplateSchema(m), y = createDesignable({
18694
18782
  t: a,
18695
18783
  api: h,
@@ -18698,7 +18786,7 @@ const SchemaSettingsProvider = (e) => {
18698
18786
  });
18699
18787
  y.loadAPIClientEvents(), y.removeWithoutEmit(b), y.insertAdjacent(o, S, {
18700
18788
  onSuccess() {
18701
- return O(this, null, function* () {
18789
+ return V(this, null, function* () {
18702
18790
  yield h.request({
18703
18791
  url: `/uiSchemas:remove/${b["x-uid"]}`
18704
18792
  });
@@ -18719,7 +18807,7 @@ const SchemaSettingsProvider = (e) => {
18719
18807
  SchemaSettingsItem,
18720
18808
  {
18721
18809
  title: "Save as block template",
18722
- onClick: () => O(this, null, function* () {
18810
+ onClick: () => V(this, null, function* () {
18723
18811
  d(!1);
18724
18812
  const S = r && c(r), b = findGridSchema(m), y = yield FormDialog(
18725
18813
  a("Save as template"),
@@ -18833,7 +18921,7 @@ const SchemaSettingsProvider = (e) => {
18833
18921
  content: a("Are you sure you want to delete it?")
18834
18922
  }, t), {
18835
18923
  onOk() {
18836
- return O(this, null, function* () {
18924
+ return V(this, null, function* () {
18837
18925
  var C;
18838
18926
  const f = {
18839
18927
  removeParentsIfNoChildren: o,
@@ -18920,9 +19008,9 @@ const SchemaSettingsProvider = (e) => {
18920
19008
  }, [JSON.stringify(n || {})]);
18921
19009
  const A = useCallback(() => {
18922
19010
  m(!1), k.reset();
18923
- }, [k]), w = useCallback(() => O(void 0, null, function* () {
19011
+ }, [k]), w = useCallback(() => V(void 0, null, function* () {
18924
19012
  yield k.submit(), o == null || o(cloneDeep$1(k.values)), m(!1);
18925
- }), [k, o]), M = useCallback(() => O(void 0, null, function* () {
19013
+ }), [k, o]), M = useCallback(() => V(void 0, null, function* () {
18926
19014
  !h && (i != null && i["x-uid"]) && (C["x-action-settings"].schemaUid = i["x-uid"], b.emit("patch", { schema: C }), yield F.resource("uiSchemas").insert({ values: i }), x(i["x-uid"])), typeof r == "function" && (r == null || r()), S.setVisible(!1), m(!0);
18927
19015
  }), [F, S, b, C, i, h]), N = useCallback((z) => z.stopPropagation(), []);
18928
19016
  return /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -18964,7 +19052,7 @@ const SchemaSettingsProvider = (e) => {
18964
19052
  });
18965
19053
  SchemaSettingsActionModalItem.displayName = "SchemaSettingsActionModalItem";
18966
19054
  const SchemaSettingsModalItem = (e) => {
18967
- const V = e, {
19055
+ const R = e, {
18968
19056
  hidden: t,
18969
19057
  title: o,
18970
19058
  components: n,
@@ -18975,7 +19063,7 @@ const SchemaSettingsModalItem = (e) => {
18975
19063
  initialValues: c,
18976
19064
  width: u = "fit-content",
18977
19065
  noRecord: d = !1
18978
- } = V, p = H(V, [
19066
+ } = R, p = H(R, [
18979
19067
  "hidden",
18980
19068
  "title",
18981
19069
  "components",
@@ -18986,23 +19074,25 @@ const SchemaSettingsModalItem = (e) => {
18986
19074
  "initialValues",
18987
19075
  "width",
18988
19076
  "noRecord"
18989
- ]), m = useContext(SchemaOptionsContext), h = useCollection_deprecated(), x = useAPIClient(), f = useApp(), { theme: C } = useGlobalTheme(), S = useBlockRequestContext(), b = useFormActiveFields(), { locale: y } = useContext(ConfigProvider.ConfigContext), F = useDataSourceManager(), I = useDataSourceKey(), k = useCollectionRecord(), { association: A } = useDataBlockProps() || {}, w = useFormBlockContext(), M = useBlockContext(), { formValue: N, collection: E } = useSubFormValue(), z = useVariable("$nPopupRecord");
19077
+ ]), m = useContext(SchemaOptionsContext), h = useCollection_deprecated(), x = useAPIClient(), f = useApp(), { theme: C } = useGlobalTheme(), S = useBlockRequestContext(), b = useFormActiveFields(), { locale: y } = useContext(ConfigProvider.ConfigContext), F = useDataSourceManager(), I = useDataSourceKey(), k = useCollectionRecord(), { association: A } = useDataBlockProps() || {}, w = useFormBlockContext(), M = useBlockContext(), { formValue: N, collection: E } = useSubFormValue(), z = useCurrentPopupRecord(), O = useParentPopupRecord();
18990
19078
  return t ? null : /* @__PURE__ */ jsx(
18991
19079
  SchemaSettingsItem,
18992
19080
  v(g({
18993
19081
  title: o
18994
19082
  }, p), {
18995
- onClick: () => O(void 0, null, function* () {
18996
- const R = l ? yield l() : c, j = _.isFunction(e.schema) ? e.schema() : e.schema;
19083
+ onClick: () => V(void 0, null, function* () {
19084
+ const j = l ? yield l() : c, B = _.isFunction(e.schema) ? e.schema() : e.schema;
18997
19085
  FormDialog(
18998
- { title: j.title || o, width: u },
19086
+ { title: B.title || o, width: u },
18999
19087
  () => /* @__PURE__ */ jsx(BlockContext.Provider, { value: M, children: /* @__PURE__ */ jsx(
19000
- DeclareVariable,
19088
+ VariablePopupRecordProvider,
19001
19089
  {
19002
- name: "$nPopupRecord",
19003
- title: z.title,
19004
- value: z.value,
19005
- collection: z.collection,
19090
+ recordData: z == null ? void 0 : z.value,
19091
+ collection: z == null ? void 0 : z.collection,
19092
+ parent: {
19093
+ recordData: O == null ? void 0 : O.value,
19094
+ collection: O == null ? void 0 : O.collection
19095
+ },
19006
19096
  children: /* @__PURE__ */ jsx(CollectionRecordProvider, { record: d ? null : k, children: /* @__PURE__ */ jsx(FormBlockContext$1.Provider, { value: w, children: /* @__PURE__ */ jsx(SubFormProvider, { value: { value: N, collection: E }, children: /* @__PURE__ */ jsx(
19007
19097
  FormActiveFieldsProvider,
19008
19098
  {
@@ -19029,7 +19119,7 @@ const SchemaSettingsModalItem = (e) => {
19029
19119
  min-width: 320px;
19030
19120
  }
19031
19121
  `,
19032
- children: /* @__PURE__ */ jsx(ApplicationContext.Provider, { value: f, children: /* @__PURE__ */ jsx(APIClientProvider, { apiClient: x, children: /* @__PURE__ */ jsx(ConfigProvider, { locale: y, children: /* @__PURE__ */ jsx(SchemaComponent, { components: n, scope: r, schema: j }) }) }) })
19122
+ children: /* @__PURE__ */ jsx(ApplicationContext.Provider, { value: f, children: /* @__PURE__ */ jsx(APIClientProvider, { apiClient: x, children: /* @__PURE__ */ jsx(ConfigProvider, { locale: y, children: /* @__PURE__ */ jsx(SchemaComponent, { components: n, scope: r, schema: B }) }) }) })
19033
19123
  }
19034
19124
  ) })
19035
19125
  }
@@ -19040,10 +19130,10 @@ const SchemaSettingsModalItem = (e) => {
19040
19130
  ) }),
19041
19131
  C
19042
19132
  ).open({
19043
- initialValues: R,
19133
+ initialValues: j,
19044
19134
  effects: i
19045
- }).then((B) => (a(B), B)).catch((B) => {
19046
- console.error(B);
19135
+ }).then((T) => (a(T), T)).catch((T) => {
19136
+ console.error(T);
19047
19137
  });
19048
19138
  }),
19049
19139
  children: e.children || e.title
@@ -19056,7 +19146,7 @@ const SchemaSettingsModalItem = (e) => {
19056
19146
  } : {
19057
19147
  field: h,
19058
19148
  direction: "asc"
19059
- }), p = useSortFields(t.name || c), m = (x) => O(this, [x], function* ({ sort: h }) {
19149
+ }), p = useSortFields(t.name || c), m = (x) => V(this, [x], function* ({ sort: h }) {
19060
19150
  var C;
19061
19151
  if (t != null && t.onSubmit)
19062
19152
  return t.onSubmit({ sort: h });
@@ -19928,7 +20018,11 @@ const useFilterableFields = (e) => {
19928
20018
  "&.reset": {
19929
20019
  "&.nb-action-popup": {
19930
20020
  ".ant-drawer-header": { display: "none" },
19931
- ".ant-drawer-body": { paddingTop: e.paddingContentVerticalLG, backgroundColor: e.colorBgLayout }
20021
+ ".ant-drawer-body": {
20022
+ paddingTop: e.paddingContentVerticalLG,
20023
+ backgroundColor: e.colorBgLayout,
20024
+ paddingBottom: 0
20025
+ }
19932
20026
  },
19933
20027
  "&.nb-record-picker-selector": {
19934
20028
  ".ant-drawer-wrapper-body": {
@@ -19960,11 +20054,11 @@ const useFilterableFields = (e) => {
19960
20054
  paddingRight: e.paddingLG - e.paddingPageHorizontal,
19961
20055
  marginLeft: e.paddingPageHorizontal - e.paddingLG,
19962
20056
  marginRight: e.paddingPageHorizontal - e.paddingLG
19963
- },
19964
- ".ant-tabs-content-holder": {
19965
- padding: `${e.paddingPopupVertical}px ${e.paddingPopupHorizontal}px`,
19966
- margin: `-${e.size}px -${e.paddingLG}px -${e.paddingLG}px`
19967
20057
  }
20058
+ // '.ant-tabs-content-holder': {
20059
+ // padding: `${token.paddingPopupVertical}px ${token.paddingPopupHorizontal}px 0`,
20060
+ // margin: `-${token.paddingPopupVertical}px -${token.paddingPopupHorizontal}px`,
20061
+ // },
19968
20062
  }
19969
20063
  };
19970
20064
  }), useGetAriaLabelOfDrawer = () => {
@@ -20064,6 +20158,7 @@ const useGetAriaLabelOfModal = () => {
20064
20158
  .ant-modal-content {
20065
20159
  background: var(--nb-box-bg);
20066
20160
  border: 1px solid rgba(255, 255, 255, 0.1);
20161
+ padding-bottom: 0;
20067
20162
  }
20068
20163
 
20069
20164
  // 这里的样式是为了保证页面 tabs 标签下面的分割线和页面内容对齐(页面内边距可以通过主题编辑器调节)
@@ -20074,11 +20169,6 @@ const useGetAriaLabelOfModal = () => {
20074
20169
  margin-right: ${p.paddingPageHorizontal - p.paddingLG}px;
20075
20170
  }
20076
20171
 
20077
- .ant-tabs-content-holder {
20078
- padding: ${p.paddingPopupVertical}px ${p.paddingPopupHorizontal}px;
20079
- margin: -${p.size}px -${p.paddingLG}px -${p.paddingLG}px;
20080
- }
20081
-
20082
20172
  .ant-modal-footer {
20083
20173
  display: ${h ? "block" : "none"};
20084
20174
  }
@@ -20616,7 +20706,7 @@ const createSubmitActionSettings = new SchemaSettings({
20616
20706
  "x-validator": validateJSON$1
20617
20707
  }
20618
20708
  }
20619
- }, linkageAction = (i) => O(void 0, [i], function* ({
20709
+ }, linkageAction = (i) => V(void 0, [i], function* ({
20620
20710
  operator: e,
20621
20711
  field: t,
20622
20712
  condition: o,
@@ -21375,8 +21465,8 @@ const ActionLink = withDynamicSchemaProps(
21375
21465
  };
21376
21466
  }, handleError = (e) => console.log(e), Action = withDynamicSchemaProps(
21377
21467
  observer$1((e) => {
21378
- var ge, xe, fe, Z, te;
21379
- const he = useProps(e), {
21468
+ var me, he, ge, xe, ee;
21469
+ const pe = useProps(e), {
21380
21470
  popover: t,
21381
21471
  confirm: o,
21382
21472
  openMode: n,
@@ -21395,7 +21485,7 @@ const ActionLink = withDynamicSchemaProps(
21395
21485
  addChild: C,
21396
21486
  onMouseEnter: S,
21397
21487
  refreshDataBlockRequest: b
21398
- } = he, y = H(he, [
21488
+ } = pe, y = H(pe, [
21399
21489
  "popover",
21400
21490
  "confirm",
21401
21491
  "openMode",
@@ -21415,75 +21505,75 @@ const ActionLink = withDynamicSchemaProps(
21415
21505
  "addChild",
21416
21506
  "onMouseEnter",
21417
21507
  "refreshDataBlockRequest"
21418
- ]), F = useACLActionParamsContext(), { wrapSSR: I, componentCls: k, hashId: A } = useStyles$d(), { t: w } = useTranslation(), [M, N] = useState(!1), [E, z] = useState(!1), V = useDesigner(), R = useField(), { run: j, element: B, disabled: T } = a(f), D = useFieldSchema(), $ = useCompile(), q = useForm(), L = useCollectionRecordData(), G = useCollectionParentRecordData(), U = useCollection(), K = D["x-toolbar-props"] || D["x-designer-props"], Y = (ge = D == null ? void 0 : D["x-component-props"]) == null ? void 0 : ge.openMode, W = (xe = D == null ? void 0 : D["x-component-props"]) == null ? void 0 : xe.openSize, X = (fe = D == null ? void 0 : D["x-component-props"]) == null ? void 0 : fe.refreshDataBlockRequest, Q = q.disabled || R.disabled || ((Z = R.data) == null ? void 0 : Z.disabled) || x || T, J = useMemo(() => (D == null ? void 0 : D["x-linkage-rules"]) || [], [D == null ? void 0 : D["x-linkage-rules"]]), { designable: oe } = useDesignable(), ne = useComponent(i) || i, { modal: re } = App.useApp(), ie = useVariables(), le = useLocalVariables({ currentForm: { values: L } }), { getAriaLabel: Pe } = useGetAriaLabelOfAction(u), ce = useDataBlockRequest(), de = useMemo(() => {
21419
- const ee = u || $(D.title);
21420
- return _.isString(ee) ? w(ee) : ee;
21508
+ ]), F = useACLActionParamsContext(), { wrapSSR: I, componentCls: k, hashId: A } = useStyles$d(), { t: w } = useTranslation(), [M, N] = useState(!1), [E, z] = useState(!1), O = useDesigner(), R = useField(), { run: j, element: B, disabled: T } = a(f), D = useFieldSchema(), $ = useCompile(), q = useForm(), L = useCollectionRecordData(), G = useCollectionParentRecordData(), U = D["x-toolbar-props"] || D["x-designer-props"], K = (me = D == null ? void 0 : D["x-component-props"]) == null ? void 0 : me.openMode, Y = (he = D == null ? void 0 : D["x-component-props"]) == null ? void 0 : he.openSize, W = (ge = D == null ? void 0 : D["x-component-props"]) == null ? void 0 : ge.refreshDataBlockRequest, X = q.disabled || R.disabled || ((xe = R.data) == null ? void 0 : xe.disabled) || x || T, Q = useMemo(() => (D == null ? void 0 : D["x-linkage-rules"]) || [], [D == null ? void 0 : D["x-linkage-rules"]]), { designable: J } = useDesignable(), te = useComponent(i) || i, { modal: oe } = App.useApp(), re = useVariables(), se = useLocalVariables({ currentForm: { values: L } }), { getAriaLabel: ae } = useGetAriaLabelOfAction(u), ce = useDataBlockRequest(), ue = useMemo(() => {
21509
+ const Z = u || $(D.title);
21510
+ return _.isString(Z) ? w(Z) : Z;
21421
21511
  }, [u, D.title, w]);
21422
21512
  useEffect(() => {
21423
- R.stateOfLinkageRules && setInitialActionState(R), R.stateOfLinkageRules = {}, J.filter((ee) => !ee.disabled).forEach((ee) => {
21424
- var se;
21425
- (se = ee.actions) == null || se.forEach((ae) => {
21513
+ R.stateOfLinkageRules && setInitialActionState(R), R.stateOfLinkageRules = {}, Q.filter((Z) => !Z.disabled).forEach((Z) => {
21514
+ var ne;
21515
+ (ne = Z.actions) == null || ne.forEach((ie) => {
21426
21516
  linkageAction({
21427
- operator: ae.operator,
21517
+ operator: ie.operator,
21428
21518
  field: R,
21429
- condition: ee.condition,
21430
- variables: ie,
21431
- localVariables: le
21519
+ condition: Z.condition,
21520
+ variables: re,
21521
+ localVariables: se
21432
21522
  });
21433
21523
  });
21434
21524
  });
21435
- }, [R, J, le, ie]);
21436
- const Ie = useCallback(
21437
- (ee, se = !0) => {
21438
- if (!(se && isPortalInBody(ee.target)) && (ee.preventDefault(), ee.stopPropagation(), !Q && F)) {
21439
- const ae = () => {
21440
- d ? d(ee, () => {
21441
- var ue;
21442
- X !== !1 && ((ue = ce == null ? void 0 : ce.refresh) == null || ue.call(ce));
21525
+ }, [R, Q, se, re]);
21526
+ const Pe = useCallback(
21527
+ (Z, ne = !0) => {
21528
+ if (!(ne && isPortalInBody(Z.target)) && (Z.preventDefault(), Z.stopPropagation(), !X && F)) {
21529
+ const ie = () => {
21530
+ d ? d(Z, () => {
21531
+ var le;
21532
+ W !== !1 && ((le = ce == null ? void 0 : ce.refresh) == null || le.call(ce));
21443
21533
  }) : (N(!0), j());
21444
21534
  };
21445
- o != null && o.content ? re.confirm({
21446
- title: w(o.title, { title: de }),
21447
- content: w(o.content, { title: de }),
21448
- onOk: ae
21449
- }) : ae();
21535
+ o != null && o.content ? oe.confirm({
21536
+ title: w(o.title, { title: ue }),
21537
+ content: w(o.content, { title: ue }),
21538
+ onOk: ie
21539
+ }) : ie();
21450
21540
  }
21451
21541
  },
21452
- [o, Q, re, d, j]
21453
- ), be = useMemo(() => {
21454
- var ee;
21542
+ [o, X, oe, d, j]
21543
+ ), Ie = useMemo(() => {
21544
+ var Z;
21455
21545
  return v(g({}, p), {
21456
- opacity: oe && (((ee = R == null ? void 0 : R.data) == null ? void 0 : ee.hidden) || !F) && 0.1
21546
+ opacity: J && (((Z = R == null ? void 0 : R.data) == null ? void 0 : Z.hidden) || !F) && 0.1
21457
21547
  });
21458
- }, [oe, (te = R == null ? void 0 : R.data) == null ? void 0 : te.hidden, p]), Ae = useCallback(
21459
- (ee) => {
21460
- S == null || S(ee);
21548
+ }, [J, (ee = R == null ? void 0 : R.data) == null ? void 0 : ee.hidden, p]), Se = useCallback(
21549
+ (Z) => {
21550
+ S == null || S(Z);
21461
21551
  },
21462
21552
  [S]
21463
- ), pe = () => {
21464
- var ee, se;
21465
- return !oe && ((ee = R == null ? void 0 : R.data) != null && ee.hidden || !F) ? null : /* @__PURE__ */ jsxs(
21553
+ ), be = () => {
21554
+ var Z, ne;
21555
+ return !J && ((Z = R == null ? void 0 : R.data) != null && Z.hidden || !F) ? null : /* @__PURE__ */ jsxs(
21466
21556
  SortableItem,
21467
21557
  v(g({
21468
21558
  role: "button",
21469
- "aria-label": Pe()
21559
+ "aria-label": ae()
21470
21560
  }, y), {
21471
- onMouseEnter: Ae,
21472
- loading: ((se = R == null ? void 0 : R.data) == null ? void 0 : se.loading) || m,
21561
+ onMouseEnter: Se,
21562
+ loading: ((ne = R == null ? void 0 : R.data) == null ? void 0 : ne.loading) || m,
21473
21563
  icon: typeof c == "string" ? /* @__PURE__ */ jsx(Icon, { type: c }) : c,
21474
- disabled: Q,
21475
- style: be,
21476
- onClick: Ie,
21477
- component: ne || Button,
21564
+ disabled: X,
21565
+ style: Ie,
21566
+ onClick: Pe,
21567
+ component: te || Button,
21478
21568
  className: cls(k, A, l, "nb-action"),
21479
21569
  type: e.type === "danger" ? void 0 : e.type,
21480
21570
  children: [
21481
- de,
21482
- /* @__PURE__ */ jsx(V, g({}, K))
21571
+ ue,
21572
+ /* @__PURE__ */ jsx(O, g({}, U))
21483
21573
  ]
21484
21574
  })
21485
21575
  );
21486
- }, ye = pe(), me = /* @__PURE__ */ jsxs(
21576
+ }, ye = be(), de = /* @__PURE__ */ jsxs(
21487
21577
  ActionContextProvider,
21488
21578
  {
21489
21579
  button: ye,
@@ -21491,23 +21581,14 @@ const ActionLink = withDynamicSchemaProps(
21491
21581
  setVisible: N,
21492
21582
  formValueChanged: E,
21493
21583
  setFormValueChanged: z,
21494
- openMode: Y,
21495
- openSize: W,
21584
+ openMode: K,
21585
+ openSize: Y,
21496
21586
  containerRefKey: r,
21497
21587
  fieldSchema: D,
21498
21588
  children: [
21499
21589
  t && /* @__PURE__ */ jsx(RecursionField, { basePath: R.address, onlyRenderProperties: !0, schema: D }),
21500
- !t && pe(),
21501
- /* @__PURE__ */ jsx(
21502
- DeclareVariable,
21503
- {
21504
- name: "$nPopupRecord",
21505
- title: w("Current popup record"),
21506
- value: L,
21507
- collection: U,
21508
- children: !t && e.children
21509
- }
21510
- ),
21590
+ !t && be(),
21591
+ /* @__PURE__ */ jsx(VariablePopupRecordProvider, { children: !t && e.children }),
21511
21592
  B
21512
21593
  ]
21513
21594
  }
@@ -21515,8 +21596,8 @@ const ActionLink = withDynamicSchemaProps(
21515
21596
  return I(
21516
21597
  C ? (
21517
21598
  // fix https://nocobase.height.app/T-3966
21518
- /* @__PURE__ */ jsx(RecordProvider, { record: null, parent: G, children: /* @__PURE__ */ jsx(TreeRecordProvider, { parent: L, children: me }) })
21519
- ) : me
21599
+ /* @__PURE__ */ jsx(RecordProvider, { record: null, parent: G, children: /* @__PURE__ */ jsx(TreeRecordProvider, { parent: L, children: de }) })
21600
+ ) : de
21520
21601
  );
21521
21602
  }),
21522
21603
  { displayName: "Action" }
@@ -21569,34 +21650,36 @@ const Action$1 = Action, ActionBarContext = React.createContext({
21569
21650
  return /* @__PURE__ */ jsx(Fragment, { children: o && n.includes(t.parent["x-component"]) ? createPortal(e.children, o) : e.children });
21570
21651
  }, ActionBar = withDynamicSchemaProps(
21571
21652
  observer$1((e) => {
21572
- var m;
21573
- const { forceProps: t = {} } = useActionBarContext(), { token: o } = theme.useToken(), p = g(g({}, useProps(e)), t), { layout: n = "two-columns", style: r, spaceProps: i } = p, a = H(p, ["layout", "style", "spaceProps"]), l = useFieldSchema(), { render: c } = useSchemaInitializerRender(l["x-initializer"], l["x-initializer-props"]), { designable: u } = useDesignable();
21574
- if (n === "one-column")
21653
+ var p;
21654
+ const { forceProps: t = {} } = useActionBarContext();
21655
+ theme.useToken();
21656
+ const d = g(g({}, useProps(e)), t), { layout: o = "two-columns", style: n, spaceProps: r } = d, i = H(d, ["layout", "style", "spaceProps"]), a = useFieldSchema(), { render: l } = useSchemaInitializerRender(a["x-initializer"], a["x-initializer-props"]), { designable: c } = useDesignable();
21657
+ if (o === "one-column")
21575
21658
  return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(DndContext, { children: /* @__PURE__ */ jsxs(
21576
21659
  "div",
21577
21660
  v(g({
21578
- style: v(g({ display: "flex", alignItems: "center", gap: 8 }, r), { marginTop: o.marginLG })
21579
- }, a), {
21580
- className: cx(a.className, "nb-action-bar"),
21661
+ style: v(g({ display: "flex", alignItems: "center", gap: 8 }, n), { marginTop: 0 })
21662
+ }, i), {
21663
+ className: cx(i.className, "nb-action-bar"),
21581
21664
  children: [
21582
- e.children && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Space$1, v(g({}, i), { style: { flexWrap: "wrap" }, children: l.mapProperties((h, x) => /* @__PURE__ */ jsx(RecursionField, { name: x, schema: h }, x)) })) }),
21583
- c({ style: { margin: "0 !important" } })
21665
+ e.children && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Space$1, v(g({}, r), { style: { flexWrap: "wrap" }, children: a.mapProperties((m, h) => /* @__PURE__ */ jsx(RecursionField, { name: h, schema: m }, h)) })) }),
21666
+ l({ style: { margin: "0 !important" } })
21584
21667
  ]
21585
21668
  })
21586
21669
  ) }) });
21587
- const d = Object.keys((m = l.properties) != null ? m : {}).length > 0;
21670
+ const u = Object.keys((p = a.properties) != null ? p : {}).length > 0;
21588
21671
  return /* @__PURE__ */ jsxs(
21589
21672
  "div",
21590
21673
  v(g({
21591
- style: !u && !d ? void 0 : g({
21674
+ style: !c && !u ? void 0 : g({
21592
21675
  display: "flex",
21593
21676
  justifyContent: "space-between",
21594
21677
  alignItems: "center",
21595
21678
  overflowX: "auto",
21596
21679
  flexShrink: 0
21597
- }, r)
21598
- }, a), {
21599
- className: cx(a.className, "nb-action-bar"),
21680
+ }, n)
21681
+ }, i), {
21682
+ className: cx(i.className, "nb-action-bar"),
21600
21683
  children: [
21601
21684
  /* @__PURE__ */ jsx(
21602
21685
  "div",
@@ -21610,12 +21693,12 @@ const Action$1 = Action, ActionBarContext = React.createContext({
21610
21693
  flexWrap: "wrap"
21611
21694
  },
21612
21695
  children: /* @__PURE__ */ jsxs(DndContext, { children: [
21613
- /* @__PURE__ */ jsx(Space$1, v(g({}, i), { children: l.mapProperties((h, x) => h["x-align"] !== "left" ? null : /* @__PURE__ */ jsx(RecursionField, { name: x, schema: h }, x)) })),
21614
- /* @__PURE__ */ jsx(Space$1, v(g({}, i), { style: { flexWrap: "wrap" }, children: l.mapProperties((h, x) => h["x-align"] === "left" ? null : /* @__PURE__ */ jsx(RecursionField, { name: x, schema: h }, x)) }))
21696
+ /* @__PURE__ */ jsx(Space$1, v(g({}, r), { children: a.mapProperties((m, h) => m["x-align"] !== "left" ? null : /* @__PURE__ */ jsx(RecursionField, { name: h, schema: m }, h)) })),
21697
+ /* @__PURE__ */ jsx(Space$1, v(g({}, r), { style: { flexWrap: "wrap" }, children: a.mapProperties((m, h) => m["x-align"] === "left" ? null : /* @__PURE__ */ jsx(RecursionField, { name: h, schema: m }, h)) }))
21615
21698
  ] })
21616
21699
  }
21617
21700
  ),
21618
- c()
21701
+ l()
21619
21702
  ]
21620
21703
  })
21621
21704
  );
@@ -21703,7 +21786,7 @@ const FilterAction = withDynamicSchemaProps(
21703
21786
  /* @__PURE__ */ jsx(
21704
21787
  Button,
21705
21788
  {
21706
- onClick: () => O(void 0, null, function* () {
21789
+ onClick: () => V(void 0, null, function* () {
21707
21790
  yield c.reset(), p == null || p(c.values), o.title = t("Filter"), r(!1);
21708
21791
  }),
21709
21792
  children: t("Reset")
@@ -21772,17 +21855,18 @@ const DynamicComponent = (e) => {
21772
21855
  });
21773
21856
  }
21774
21857
  }), [JSON.stringify(e.value), e.schema]), i = useCallback(() => {
21775
- var a;
21858
+ var l;
21859
+ const a = merge(((l = e == null ? void 0 : e.schema) == null ? void 0 : l["x-component-props"]) || {}, e.componentProps || {});
21776
21860
  return /* @__PURE__ */ jsx(FieldContext.Provider, { value: null, children: /* @__PURE__ */ jsx(
21777
21861
  SchemaComponent,
21778
21862
  {
21779
21863
  schema: v(g({
21780
21864
  "x-component": "Input"
21781
21865
  }, e.schema), {
21782
- "x-component-props": merge(((a = e == null ? void 0 : e.schema) == null ? void 0 : a["x-component-props"]) || {}, {
21783
- style: {
21866
+ "x-component-props": merge(a, {
21867
+ style: g({
21784
21868
  minWidth: 150
21785
- }
21869
+ }, e.style)
21786
21870
  }),
21787
21871
  name: "value",
21788
21872
  "x-read-pretty": !1,
@@ -21799,7 +21883,7 @@ const DynamicComponent = (e) => {
21799
21883
  onChange: e == null ? void 0 : e.onChange,
21800
21884
  renderSchemaComponent: i
21801
21885
  }) : i() });
21802
- }, FilterItem = observer$1(
21886
+ }, FilterDynamicComponent = DynamicComponent, FilterItem = observer$1(
21803
21887
  (e) => {
21804
21888
  const { t } = useTranslation(), o = useCompile(), n = useContext(RemoveConditionContext), {
21805
21889
  schema: r,
@@ -22167,8 +22251,8 @@ const useGetFilterOptions = () => {
22167
22251
  };
22168
22252
  });
22169
22253
  }, TableColumnDesigner$1 = (e) => {
22170
- var N, E, z, V, R, j, B, T, D, $, q, L;
22171
- const { uiSchema: t, fieldSchema: o, collectionField: n } = e, { form: r } = useFormBlockContext(), { getInterface: i, getCollection: a } = useCollectionManager_deprecated(), l = useField(), { t: c } = useTranslation(), u = useFieldSchema(), { dn: d } = useDesignable(), p = ((N = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : N.fieldNames) || ((E = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : E.fieldNames), m = useLabelFields$1((z = n == null ? void 0 : n.target) != null ? z : n == null ? void 0 : n.targetCollection), h = useColorFields((V = n == null ? void 0 : n.target) != null ? V : n == null ? void 0 : n.targetCollection), x = i(n == null ? void 0 : n.interface), f = a(n == null ? void 0 : n.target), C = isFileCollection$1(f), S = ["QuickEdit", "FormItem"].includes(o["x-decorator"]), { currentMode: b } = useAssociationFieldContext(), { isAllowToSetDefaultValue: y } = useIsAllowToSetDefaultValue({ collectionField: n, fieldSchema: o }), F = ["datetime", "createdAt", "updatedAt"].includes(n == null ? void 0 : n.interface), I = ["obo", "oho", "o2o", "o2m", "m2m", "m2o", "snapshot"].includes(
22254
+ var N, E, z, O, R, j, B, T, D, $, q, L;
22255
+ const { uiSchema: t, fieldSchema: o, collectionField: n } = e, { form: r } = useFormBlockContext(), { getInterface: i, getCollection: a } = useCollectionManager_deprecated(), l = useField(), { t: c } = useTranslation(), u = useFieldSchema(), { dn: d } = useDesignable(), p = ((N = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : N.fieldNames) || ((E = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : E.fieldNames), m = useLabelFields$1((z = n == null ? void 0 : n.target) != null ? z : n == null ? void 0 : n.targetCollection), h = useColorFields((O = n == null ? void 0 : n.target) != null ? O : n == null ? void 0 : n.targetCollection), x = i(n == null ? void 0 : n.interface), f = a(n == null ? void 0 : n.target), C = isFileCollection$1(f), S = ["QuickEdit", "FormItem"].includes(o["x-decorator"]), { currentMode: b } = useAssociationFieldContext(), { isAllowToSetDefaultValue: y } = useIsAllowToSetDefaultValue({ collectionField: n, fieldSchema: o }), F = ["datetime", "createdAt", "updatedAt"].includes(n == null ? void 0 : n.interface), I = ["obo", "oho", "o2o", "o2m", "m2m", "m2o", "snapshot"].includes(
22172
22256
  n == null ? void 0 : n.interface
22173
22257
  ), k = useFieldModeOptions({ fieldSchema: o }), A = ((R = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : R.mode) || "Select";
22174
22258
  let w = "editable";
@@ -22303,8 +22387,8 @@ const useGetFilterOptions = () => {
22303
22387
  });
22304
22388
  _.set(o, "x-component-props.fieldNames", U);
22305
22389
  const K = (J = l.path) == null ? void 0 : J.splice(((Q = l.path) == null ? void 0 : Q.length) - 1, 1);
22306
- l.form.query(`${K.concat("*." + o.name)}`).forEach((oe) => {
22307
- oe.componentProps.fieldNames = U;
22390
+ l.form.query(`${K.concat("*." + o.name)}`).forEach((te) => {
22391
+ te.componentProps.fieldNames = U;
22308
22392
  }), d.emit("patch", {
22309
22393
  schema: {
22310
22394
  "x-uid": o["x-uid"],
@@ -23191,7 +23275,7 @@ const useCurrentUserContext = () => useContext(CurrentUserContext), useCurrentRo
23191
23275
  },
23192
23276
  options: t,
23193
23277
  defaultValue: e.auth.role,
23194
- onChange: (r) => O(void 0, null, function* () {
23278
+ onChange: (r) => V(void 0, null, function* () {
23195
23279
  e.auth.setRole(r), yield e.resource("users").setDefaultRole({ values: { roleName: r } }), location.reload(), window.location.reload();
23196
23280
  })
23197
23281
  }
@@ -23210,7 +23294,7 @@ const useCurrentUserContext = () => useContext(CurrentUserContext), useCurrentRo
23210
23294
  };
23211
23295
  }, [(o = e == null ? void 0 : e.data) == null ? void 0 : o.email, (n = e == null ? void 0 : e.data) == null ? void 0 : n.nickname, (r = e == null ? void 0 : e.data) == null ? void 0 : r.username, e == null ? void 0 : e.data.version, t.colorTextDescription]);
23212
23296
  }, SettingsMenu$1 = (e) => {
23213
- const { addMenuItem: t, getMenuItems: o } = useCurrentUserSettingsMenu(), { redirectUrl: n = "" } = e, { allowAll: r, snippets: i } = useACLRoleContext(), a = r || (i == null ? void 0 : i.includes("app")), l = useNavigate(), c = useAPIClient(), { t: u } = useTranslation(), d = useAPIClient(), p = useCallback(() => O(void 0, null, function* () {
23297
+ const { addMenuItem: t, getMenuItems: o } = useCurrentUserSettingsMenu(), { redirectUrl: n = "" } = e, { allowAll: r, snippets: i } = useACLRoleContext(), a = r || (i == null ? void 0 : i.includes("app")), l = useNavigate(), c = useAPIClient(), { t: u } = useTranslation(), d = useAPIClient(), p = useCallback(() => V(void 0, null, function* () {
23214
23298
  return yield new Promise((y) => {
23215
23299
  const F = setInterval(() => {
23216
23300
  d.silent().resource("app").getInfo().then((I) => ((I == null ? void 0 : I.status) === 200 && (y("ok"), clearInterval(F)), I)).catch((I) => {
@@ -23222,14 +23306,14 @@ const useCurrentUserContext = () => useContext(CurrentUserContext), useCurrentRo
23222
23306
  {
23223
23307
  key: "cache",
23224
23308
  label: u("Clear cache"),
23225
- onClick: () => O(void 0, null, function* () {
23309
+ onClick: () => V(void 0, null, function* () {
23226
23310
  yield c.resource("app").clearCache(), window.location.reload();
23227
23311
  })
23228
23312
  },
23229
23313
  {
23230
23314
  key: "reboot",
23231
23315
  label: u("Restart application"),
23232
- onClick: () => O(void 0, null, function* () {
23316
+ onClick: () => V(void 0, null, function* () {
23233
23317
  S.confirm({
23234
23318
  title: u("Restart application"),
23235
23319
  // content: t('The will interrupt service, it may take a few seconds to restart. Are you sure to continue?'),
@@ -23237,7 +23321,7 @@ const useCurrentUserContext = () => useContext(CurrentUserContext), useCurrentRo
23237
23321
  okButtonProps: {
23238
23322
  danger: !0
23239
23323
  },
23240
- onOk: () => O(void 0, null, function* () {
23324
+ onOk: () => V(void 0, null, function* () {
23241
23325
  yield c.resource("app").restart();
23242
23326
  })
23243
23327
  });
@@ -23270,7 +23354,7 @@ const useCurrentUserContext = () => useContext(CurrentUserContext), useCurrentRo
23270
23354
  {
23271
23355
  key: "signout",
23272
23356
  label: u("Sign out"),
23273
- onClick: () => O(void 0, null, function* () {
23357
+ onClick: () => V(void 0, null, function* () {
23274
23358
  yield c.auth.signOut(), l(`/signin?redirect=${encodeURIComponent(n)}`);
23275
23359
  })
23276
23360
  }
@@ -23385,7 +23469,7 @@ function getFormValues({
23385
23469
  }
23386
23470
  function useCollectValuesToSubmit() {
23387
23471
  const e = useForm(), t = useFilterByTk(), { field: o, resource: n } = useBlockRequestContext(), { fields: r, getField: i, getTreeParentField: a, name: l } = useCollection_deprecated(), c = r.map((f) => f.name), { fieldSchema: u } = useActionContext(), { getActiveFieldsName: d } = useFormActiveFields() || {}, p = useVariables(), m = useLocalVariables({ currentForm: e }), h = useFieldSchema(), x = useTreeParentRecord();
23388
- return useCallback(() => O(this, null, function* () {
23472
+ return useCallback(() => V(this, null, function* () {
23389
23473
  var I, k, A, w;
23390
23474
  const { assignedValues: f = {}, overwriteValues: C } = (I = h == null ? void 0 : h["x-action-settings"]) != null ? I : {}, S = getFormValues({
23391
23475
  filterByTk: t,
@@ -23395,7 +23479,7 @@ function useCollectValuesToSubmit() {
23395
23479
  getField: i,
23396
23480
  resource: n,
23397
23481
  actionFields: (d == null ? void 0 : d("form")) || []
23398
- }), b = {}, y = Object.keys(f).map((M) => O(this, null, function* () {
23482
+ }), b = {}, y = Object.keys(f).map((M) => V(this, null, function* () {
23399
23483
  const N = f[M], E = i(M);
23400
23484
  if (isVariable(N)) {
23401
23485
  const z = yield p == null ? void 0 : p.parseVariable(N, m);
@@ -23430,7 +23514,7 @@ const useCreateActionProps = () => {
23430
23514
  const e = useFilterByTk(), t = useCollectionRecord(), o = useForm(), { field: n, resource: r } = useBlockRequestContext(), { setVisible: i, setSubmitted: a, setFormValueChanged: l } = useActionContext(), c = useNavigate(), u = useFieldSchema(), d = useField(), p = useCompile(), { modal: m } = App.useApp(), { t: h } = useTranslation(), { updateAssociationValues: x } = useFormBlockContext(), f = useCollectValuesToSubmit(), C = t.isNew ? d.componentProps.saveMode || "create" : "update", S = ((b = d.componentProps.filterKeys) == null ? void 0 : b.checked) || [];
23431
23515
  return {
23432
23516
  onClick() {
23433
- return O(this, null, function* () {
23517
+ return V(this, null, function* () {
23434
23518
  var w;
23435
23519
  const { onSuccess: F, skipValidator: I, triggerWorkflows: k } = (w = u == null ? void 0 : u["x-action-settings"]) != null ? w : {};
23436
23520
  I || (yield o.submit());
@@ -23451,7 +23535,7 @@ const useCreateActionProps = () => {
23451
23535
  }
23452
23536
  F != null && F.manualClose ? m.success({
23453
23537
  title: p(F == null ? void 0 : F.successMessage),
23454
- onOk: () => O(this, null, function* () {
23538
+ onOk: () => V(this, null, function* () {
23455
23539
  yield resetFormCorrectly(o), F != null && F.redirecting && (F != null && F.redirectTo) && (isURL(F.redirectTo) ? window.location.href = F.redirectTo : c(F.redirectTo));
23456
23540
  })
23457
23541
  }) : (message.success(p(F == null ? void 0 : F.successMessage)), yield resetFormCorrectly(o), F != null && F.redirecting && (F != null && F.redirectTo) && (isURL(F.redirectTo) ? window.location.href = F.redirectTo : c(F.redirectTo)));
@@ -23466,7 +23550,7 @@ const useCreateActionProps = () => {
23466
23550
  const e = useForm(), { field: t, resource: o, __parent: n } = useBlockRequestContext(), { setVisible: r, fieldSchema: i, setSubmitted: a } = useActionContext(), l = useFieldSchema(), c = useField(), { fields: u, getField: d, getTreeParentField: p, name: m } = useCollection_deprecated(), h = useCompile(), x = useFilterByTk(), f = useRecord(), C = useVariables(), S = useLocalVariables({ currentForm: e }), { getActiveFieldsName: b } = useFormActiveFields() || {}, y = c.componentProps.saveMode || "create", F = ((I = c.componentProps.filterKeys) == null ? void 0 : I.checked) || [];
23467
23551
  return {
23468
23552
  onClick() {
23469
- return O(this, null, function* () {
23553
+ return V(this, null, function* () {
23470
23554
  var T, D, $, q, L, G;
23471
23555
  const A = u.map((U) => U.name), {
23472
23556
  assignedValues: w = {},
@@ -23474,7 +23558,7 @@ const useCreateActionProps = () => {
23474
23558
  overwriteValues: N,
23475
23559
  skipValidator: E,
23476
23560
  triggerWorkflows: z
23477
- } = (T = l == null ? void 0 : l["x-action-settings"]) != null ? T : {}, V = (D = i == null ? void 0 : i["x-component-props"]) == null ? void 0 : D.addChild, R = {}, j = Object.keys(w).map((U) => O(this, null, function* () {
23561
+ } = (T = l == null ? void 0 : l["x-action-settings"]) != null ? T : {}, O = (D = i == null ? void 0 : i["x-component-props"]) == null ? void 0 : D.addChild, R = {}, j = Object.keys(w).map((U) => V(this, null, function* () {
23478
23562
  const K = w[U], Y = d(U);
23479
23563
  if (isVariable(K)) {
23480
23564
  const W = yield C == null ? void 0 : C.parseVariable(K, S);
@@ -23492,7 +23576,7 @@ const useCreateActionProps = () => {
23492
23576
  resource: o,
23493
23577
  actionFields: (b == null ? void 0 : b("form")) || []
23494
23578
  });
23495
- if (V) {
23579
+ if (O) {
23496
23580
  const U = p();
23497
23581
  B[($ = U == null ? void 0 : U.name) != null ? $ : "parent"] = f, B[(q = U == null ? void 0 : U.foreignKey) != null ? q : "parentId"] = f.id;
23498
23582
  }
@@ -23533,10 +23617,10 @@ const useCreateActionProps = () => {
23533
23617
  }
23534
23618
  }, useDoFilter = () => {
23535
23619
  const e = useForm(), { getDataBlocks: t } = useFilterBlock(), { getCollectionJoinField: o } = useCollectionManager_deprecated(), { getOperators: n } = useOperators(), r = useFieldSchema(), { name: i } = useCollection(), { targets: a = [], uid: l } = useMemo(() => findFilterTargets(r), [r]), c = useCallback(() => removeNullCondition(transformToFilter(e.values, n(), o, i)), [e.values, o, n, i]), u = useCallback(
23536
- (...p) => O(void 0, [...p], function* ({ doNothingWhenFilterIsEmpty: d = !1 } = {}) {
23620
+ (...p) => V(void 0, [...p], function* ({ doNothingWhenFilterIsEmpty: d = !1 } = {}) {
23537
23621
  try {
23538
23622
  yield Promise.all(
23539
- t().map((m) => O(void 0, null, function* () {
23623
+ t().map((m) => V(void 0, null, function* () {
23540
23624
  var S, b, y;
23541
23625
  if (!a.find((F) => F.uid === m.uid))
23542
23626
  return;
@@ -23578,7 +23662,7 @@ const useCreateActionProps = () => {
23578
23662
  const { doFilter: e } = useDoFilter(), t = useField();
23579
23663
  return t.data = t.data || {}, {
23580
23664
  onClick() {
23581
- return O(this, null, function* () {
23665
+ return V(this, null, function* () {
23582
23666
  t.data.loading = !0, yield e(), t.data.loading = !1;
23583
23667
  });
23584
23668
  }
@@ -23586,7 +23670,7 @@ const useCreateActionProps = () => {
23586
23670
  }, useDoReset = () => {
23587
23671
  const e = useForm(), t = useFieldSchema(), { getDataBlocks: o } = useFilterBlock(), { targets: n, uid: r } = findFilterTargets(t), { doFilter: i, getFilterFromCurrentForm: a } = useDoFilter();
23588
23672
  return {
23589
- doReset: () => O(void 0, null, function* () {
23673
+ doReset: () => V(void 0, null, function* () {
23590
23674
  if (yield e.reset(), _.isEmpty(a()))
23591
23675
  return doReset({ getDataBlocks: o, targets: n, uid: r });
23592
23676
  yield i();
@@ -23596,7 +23680,7 @@ const useCreateActionProps = () => {
23596
23680
  const e = useField(), { doReset: t } = useDoReset();
23597
23681
  return e.data = e.data || {}, {
23598
23682
  onClick() {
23599
- return O(this, null, function* () {
23683
+ return V(this, null, function* () {
23600
23684
  e.data.loading = !0, yield t(), e.data.loading = !1;
23601
23685
  });
23602
23686
  }
@@ -23605,14 +23689,14 @@ const useCreateActionProps = () => {
23605
23689
  const { resource: e, __parent: t, service: o } = useBlockRequestContext(), n = useFilterByTk(), r = useFieldSchema(), i = useNavigate(), a = useCompile(), l = useForm(), { modal: c } = App.useApp(), u = useVariables(), d = useLocalVariables({ currentForm: l }), { name: p, getField: m } = useCollection_deprecated();
23606
23690
  return {
23607
23691
  onClick(x, f) {
23608
- return O(this, null, function* () {
23692
+ return V(this, null, function* () {
23609
23693
  var k, A, w;
23610
23694
  const {
23611
23695
  assignedValues: C = {},
23612
23696
  onSuccess: S,
23613
23697
  skipValidator: b,
23614
23698
  triggerWorkflows: y
23615
- } = (k = r == null ? void 0 : r["x-action-settings"]) != null ? k : {}, F = {}, I = Object.keys(C).map((M) => O(this, null, function* () {
23699
+ } = (k = r == null ? void 0 : r["x-action-settings"]) != null ? k : {}, F = {}, I = Object.keys(C).map((M) => V(this, null, function* () {
23616
23700
  const N = C[M], E = m(M);
23617
23701
  if (isVariable(N)) {
23618
23702
  const z = yield u == null ? void 0 : u.parseVariable(N, d);
@@ -23627,7 +23711,7 @@ const useCreateActionProps = () => {
23627
23711
  triggerWorkflows: y != null && y.length ? y.map((M) => [M.workflowKey, M.context].filter(Boolean).join("!")).join(",") : void 0
23628
23712
  }), f && (f == null || f()), e instanceof TableFieldResource || (w = (A = t == null ? void 0 : t.service) == null ? void 0 : A.refresh) == null || w.call(A), S != null && S.successMessage && (S != null && S.manualClose ? c.success({
23629
23713
  title: a(S == null ? void 0 : S.successMessage),
23630
- onOk: () => O(this, null, function* () {
23714
+ onOk: () => V(this, null, function* () {
23631
23715
  S != null && S.redirecting && (S != null && S.redirectTo) && (isURL(S.redirectTo) ? window.location.href = S.redirectTo : i(S.redirectTo));
23632
23716
  })
23633
23717
  }) : (message.success(a(S == null ? void 0 : S.successMessage)), S != null && S.redirecting && (S != null && S.redirectTo) && (isURL(S.redirectTo) ? window.location.href = S.redirectTo : i(S.redirectTo))));
@@ -23641,7 +23725,7 @@ const useCreateActionProps = () => {
23641
23725
  const { name: f, getField: C } = useCollection_deprecated(), S = useLocalVariables();
23642
23726
  return {
23643
23727
  onClick() {
23644
- return O(this, null, function* () {
23728
+ return V(this, null, function* () {
23645
23729
  var z;
23646
23730
  const {
23647
23731
  assignedValues: A = {},
@@ -23649,7 +23733,7 @@ const useCreateActionProps = () => {
23649
23733
  updateMode: M
23650
23734
  } = (z = i == null ? void 0 : i["x-action-settings"]) != null ? z : {};
23651
23735
  m.data = e.data || {}, m.data.loading = !0;
23652
- const N = {}, E = Object.keys(A).map((R) => O(this, null, function* () {
23736
+ const N = {}, E = Object.keys(A).map((R) => V(this, null, function* () {
23653
23737
  const j = A[R], B = C(R);
23654
23738
  if (isVariable(j)) {
23655
23739
  const T = yield x == null ? void 0 : x.parseVariable(j, S);
@@ -23661,7 +23745,7 @@ const useCreateActionProps = () => {
23661
23745
  title: p("Bulk update"),
23662
23746
  content: p(M === "selected" ? "Update selected data?" : "Update all data?"),
23663
23747
  onOk() {
23664
- return O(this, null, function* () {
23748
+ return V(this, null, function* () {
23665
23749
  var B, T, D, $;
23666
23750
  const { filter: R } = (T = (B = n.params) == null ? void 0 : B[0]) != null ? T : {}, j = {
23667
23751
  values: g({}, N),
@@ -23684,14 +23768,14 @@ const useCreateActionProps = () => {
23684
23768
  }
23685
23769
  t instanceof TableFieldResource || ($ = (D = o == null ? void 0 : o.service) == null ? void 0 : D.refresh) == null || $.call(D), w != null && w.successMessage && (w != null && w.manualClose ? h.success({
23686
23770
  title: d(w == null ? void 0 : w.successMessage),
23687
- onOk: () => O(this, null, function* () {
23771
+ onOk: () => V(this, null, function* () {
23688
23772
  w != null && w.redirecting && (w != null && w.redirectTo) && (isURL(w.redirectTo) ? window.location.href = w.redirectTo : u(w.redirectTo));
23689
23773
  })
23690
23774
  }) : (message.success(d(w == null ? void 0 : w.successMessage)), w != null && w.redirecting && (w != null && w.redirectTo) && (isURL(w.redirectTo) ? window.location.href = w.redirectTo : u(w.redirectTo))));
23691
23775
  });
23692
23776
  },
23693
23777
  onCancel() {
23694
- return O(this, null, function* () {
23778
+ return V(this, null, function* () {
23695
23779
  m.data.loading = !1;
23696
23780
  });
23697
23781
  }
@@ -23704,7 +23788,7 @@ const useCreateActionProps = () => {
23704
23788
  const e = useAPIClient(), t = useNavigate(), o = useFilterByTk(), n = useFieldSchema(), r = useCompile(), i = useForm(), { fields: a, getField: l } = useCollection_deprecated(), { field: c, resource: u, __parent: d, service: p } = useBlockRequestContext(), m = useRecord(), h = useCurrentUserContext(), x = (y = h == null ? void 0 : h.data) == null ? void 0 : y.data, f = useField(), { setVisible: C } = useActionContext(), { modal: S } = App.useApp(), { getActiveFieldsName: b } = useFormActiveFields() || {};
23705
23789
  return {
23706
23790
  onClick() {
23707
- return O(this, null, function* () {
23791
+ return V(this, null, function* () {
23708
23792
  var R, j, B, T;
23709
23793
  const { skipValidator: I, onSuccess: k, requestSettings: A } = (R = n == null ? void 0 : n["x-action-settings"]) != null ? R : {}, w = n == null ? void 0 : n["x-action"];
23710
23794
  if (!A.url)
@@ -23723,7 +23807,7 @@ const useCreateActionProps = () => {
23723
23807
  });
23724
23808
  Object.assign(E, $);
23725
23809
  }
23726
- const V = {
23810
+ const O = {
23727
23811
  url: renderTemplate(A.url, { currentRecord: m, currentUser: x }),
23728
23812
  method: A.method,
23729
23813
  headers: parse(M)({ currentRecord: m, currentUser: x }),
@@ -23732,11 +23816,11 @@ const useCreateActionProps = () => {
23732
23816
  };
23733
23817
  f.data = c.data || {}, f.data.loading = !0;
23734
23818
  try {
23735
- if (yield e.request(g({}, V)), f.data.loading = !1, u instanceof TableFieldResource || (B = (j = d == null ? void 0 : d.service) == null ? void 0 : j.refresh) == null || B.call(j), (T = p == null ? void 0 : p.refresh) == null || T.call(p), w === "customize:form:request" && (C == null || C(!1)), !(k != null && k.successMessage))
23819
+ if (yield e.request(g({}, O)), f.data.loading = !1, u instanceof TableFieldResource || (B = (j = d == null ? void 0 : d.service) == null ? void 0 : j.refresh) == null || B.call(j), (T = p == null ? void 0 : p.refresh) == null || T.call(p), w === "customize:form:request" && (C == null || C(!1)), !(k != null && k.successMessage))
23736
23820
  return;
23737
23821
  k != null && k.manualClose ? S.success({
23738
23822
  title: r(k == null ? void 0 : k.successMessage),
23739
- onOk: () => O(this, null, function* () {
23823
+ onOk: () => V(this, null, function* () {
23740
23824
  k != null && k.redirecting && (k != null && k.redirectTo) && (isURL(k.redirectTo) ? window.location.href = k.redirectTo : t(k.redirectTo));
23741
23825
  })
23742
23826
  }) : message.success(r(k == null ? void 0 : k.successMessage));
@@ -23750,7 +23834,7 @@ const useCreateActionProps = () => {
23750
23834
  const e = useForm(), t = useFilterByTk(), { field: o, resource: n, __parent: r } = useBlockRequestContext(), { setVisible: i, setSubmitted: a, setFormValueChanged: l } = useActionContext(), c = useFieldSchema(), u = useNavigate(), { fields: d, getField: p, name: m } = useCollection_deprecated(), h = useCompile(), x = useField(), { updateAssociationValues: f } = useFormBlockContext(), { modal: C } = App.useApp(), S = useParamsFromRecord(), b = useVariables(), y = useLocalVariables({ currentForm: e }), { getActiveFieldsName: F } = useFormActiveFields() || {};
23751
23835
  return {
23752
23836
  onClick() {
23753
- return O(this, null, function* () {
23837
+ return V(this, null, function* () {
23754
23838
  var j;
23755
23839
  const {
23756
23840
  assignedValues: k = {},
@@ -23758,7 +23842,7 @@ const useCreateActionProps = () => {
23758
23842
  overwriteValues: w,
23759
23843
  skipValidator: M,
23760
23844
  triggerWorkflows: N
23761
- } = (j = c == null ? void 0 : c["x-action-settings"]) != null ? j : {}, E = {}, z = Object.keys(k).map((B) => O(this, null, function* () {
23845
+ } = (j = c == null ? void 0 : c["x-action-settings"]) != null ? j : {}, E = {}, z = Object.keys(k).map((B) => V(this, null, function* () {
23762
23846
  const T = k[B], D = p(B);
23763
23847
  if (isVariable(T)) {
23764
23848
  const $ = yield b == null ? void 0 : b.parseVariable(T, y);
@@ -23767,11 +23851,11 @@ const useCreateActionProps = () => {
23767
23851
  T != null && T !== "" && (E[B] = T);
23768
23852
  }));
23769
23853
  yield Promise.all(z), M || (yield e.submit());
23770
- const V = d.map((B) => B.name), R = getFormValues({
23854
+ const O = d.map((B) => B.name), R = getFormValues({
23771
23855
  filterByTk: t,
23772
23856
  field: o,
23773
23857
  form: e,
23774
- fieldNames: V,
23858
+ fieldNames: O,
23775
23859
  getField: p,
23776
23860
  resource: n,
23777
23861
  actionFields: (F == null ? void 0 : F("form")) || []
@@ -23789,7 +23873,7 @@ const useCreateActionProps = () => {
23789
23873
  return;
23790
23874
  A != null && A.manualClose ? C.success({
23791
23875
  title: h(A == null ? void 0 : A.successMessage),
23792
- onOk: () => O(this, null, function* () {
23876
+ onOk: () => V(this, null, function* () {
23793
23877
  yield e.reset(), A != null && A.redirecting && (A != null && A.redirectTo) && (isURL(A.redirectTo) ? window.location.href = A.redirectTo : u(A.redirectTo));
23794
23878
  })
23795
23879
  }) : (message.success(h(A == null ? void 0 : A.successMessage)), A != null && A.redirecting && (A != null && A.redirectTo) && (isURL(A.redirectTo) ? window.location.href = A.redirectTo : u(A.redirectTo)));
@@ -23803,7 +23887,7 @@ const useCreateActionProps = () => {
23803
23887
  const e = useFilterByTk(), { resource: t, service: o, block: n, __parent: r } = useBlockRequestContext(), { setVisible: i, setSubmitted: a } = useActionContext(), l = useParamsFromRecord(), c = useFieldSchema();
23804
23888
  return {
23805
23889
  onClick(d, p) {
23806
- return O(this, null, function* () {
23890
+ return V(this, null, function* () {
23807
23891
  var C, S, b, y, F;
23808
23892
  const { triggerWorkflows: m } = (C = c == null ? void 0 : c["x-action-settings"]) != null ? C : {};
23809
23893
  yield t.destroy(g({
@@ -23822,7 +23906,7 @@ const useCreateActionProps = () => {
23822
23906
  const t = useFilterByTk(), n = useAPIClient().resource(e, t);
23823
23907
  return {
23824
23908
  onClick(i) {
23825
- return O(this, null, function* () {
23909
+ return V(this, null, function* () {
23826
23910
  yield n.remove({
23827
23911
  values: [i.id]
23828
23912
  });
@@ -23833,7 +23917,7 @@ const useCreateActionProps = () => {
23833
23917
  const e = useFilterByTk(), { resource: t, service: o, block: n, __parent: r } = useBlockRequestContext(), { setVisible: i, setSubmitted: a, setFormValueChanged: l } = useActionContext();
23834
23918
  return {
23835
23919
  onClick(u, d) {
23836
- return O(this, null, function* () {
23920
+ return V(this, null, function* () {
23837
23921
  var x, f, C, S;
23838
23922
  yield t.remove({
23839
23923
  values: [e]
@@ -23859,7 +23943,7 @@ const useCreateActionProps = () => {
23859
23943
  });
23860
23944
  return {
23861
23945
  onClick() {
23862
- return O(this, null, function* () {
23946
+ return V(this, null, function* () {
23863
23947
  t();
23864
23948
  });
23865
23949
  }
@@ -23868,7 +23952,7 @@ const useCreateActionProps = () => {
23868
23952
  const { field: e } = useBlockRequestContext(), { resource: t, service: o } = useBlockRequestContext(), { setSubmitted: n } = useActionContext();
23869
23953
  return {
23870
23954
  onClick(i, a) {
23871
- return O(this, null, function* () {
23955
+ return V(this, null, function* () {
23872
23956
  var u, d, p, m, h, x;
23873
23957
  if (!((d = (u = e == null ? void 0 : e.data) == null ? void 0 : u.selectedRowKeys) != null && d.length))
23874
23958
  return;
@@ -23884,7 +23968,7 @@ const useCreateActionProps = () => {
23884
23968
  const { service: e } = useBlockRequestContext();
23885
23969
  return {
23886
23970
  onClick() {
23887
- return O(this, null, function* () {
23971
+ return V(this, null, function* () {
23888
23972
  var o;
23889
23973
  (o = e == null ? void 0 : e.refresh) == null || o.call(e);
23890
23974
  });
@@ -23901,7 +23985,7 @@ const useCreateActionProps = () => {
23901
23985
  pageSize: 1,
23902
23986
  showSizeChanger: !1,
23903
23987
  onChange(u) {
23904
- return O(this, null, function* () {
23988
+ return V(this, null, function* () {
23905
23989
  var p, m;
23906
23990
  const d = (m = (p = e.service) == null ? void 0 : p.params) == null ? void 0 : m[0];
23907
23991
  e.service.run(v(g({}, d), { page: u }));
@@ -24017,7 +24101,7 @@ const useCreateActionProps = () => {
24017
24101
  var B, T, D;
24018
24102
  if (!w.find(($) => $.uid === N.uid))
24019
24103
  return;
24020
- const z = `${M}${t.name}`, V = ((B = N.service.params) == null ? void 0 : B[0]) || {}, R = ((D = (T = N.service.params) == null ? void 0 : T[1]) == null ? void 0 : D.filters) || {};
24104
+ const z = `${M}${t.name}`, O = ((B = N.service.params) == null ? void 0 : B[0]) || {}, R = ((D = (T = N.service.params) == null ? void 0 : T[1]) == null ? void 0 : D.filters) || {};
24021
24105
  if (A.length)
24022
24106
  R[z] = {
24023
24107
  [C]: A
@@ -24029,7 +24113,7 @@ const useCreateActionProps = () => {
24029
24113
  }
24030
24114
  const j = mergeFilter([...Object.values(R), N.defaultFilter]);
24031
24115
  return N.doFilter(
24032
- v(g({}, V), {
24116
+ v(g({}, O), {
24033
24117
  page: 1,
24034
24118
  filter: j
24035
24119
  }),
@@ -24045,14 +24129,14 @@ const useCreateActionProps = () => {
24045
24129
  };
24046
24130
  };
24047
24131
  function doReset(n) {
24048
- return O(this, arguments, function* ({
24132
+ return V(this, arguments, function* ({
24049
24133
  getDataBlocks: e,
24050
24134
  targets: t,
24051
24135
  uid: o
24052
24136
  }) {
24053
24137
  try {
24054
24138
  yield Promise.all(
24055
- e().map((r) => O(this, null, function* () {
24139
+ e().map((r) => V(this, null, function* () {
24056
24140
  var u, d, p;
24057
24141
  if (!t.find((m) => m.uid === r.uid))
24058
24142
  return;
@@ -24148,7 +24232,7 @@ function getTargetField(e) {
24148
24232
  return o.slice(0, n);
24149
24233
  }
24150
24234
  function resetFormCorrectly(e) {
24151
- return O(this, null, function* () {
24235
+ return V(this, null, function* () {
24152
24236
  untracked(() => {
24153
24237
  Object.keys(e.fields).forEach((t) => {
24154
24238
  isSubMode(e.fields[t]) && (e.fields[t].initialValue = null);
@@ -24165,7 +24249,7 @@ function useLinkActionProps() {
24165
24249
  return {
24166
24250
  type: "default",
24167
24251
  onClick() {
24168
- return O(this, null, function* () {
24252
+ return V(this, null, function* () {
24169
24253
  if (!n) {
24170
24254
  message.warning(o("Please configure the URL"));
24171
24255
  return;
@@ -24182,7 +24266,7 @@ function useLinkActionProps() {
24182
24266
  };
24183
24267
  }
24184
24268
  function replaceVariableValue(e, t, o) {
24185
- return O(this, null, function* () {
24269
+ return V(this, null, function* () {
24186
24270
  if (!e)
24187
24271
  return;
24188
24272
  const { evaluate: n } = evaluators.get("string"), { exp: r, scope: i } = yield replaceVariables(e, {
@@ -24197,14 +24281,14 @@ function replaceVariableValue(e, t, o) {
24197
24281
  });
24198
24282
  }
24199
24283
  function parseVariablesAndChangeParamsToQueryString(r) {
24200
- return O(this, arguments, function* ({
24284
+ return V(this, arguments, function* ({
24201
24285
  searchParams: e,
24202
24286
  variables: t,
24203
24287
  localVariables: o,
24204
24288
  replaceVariableValue: n
24205
24289
  }) {
24206
24290
  const i = yield Promise.all(
24207
- e.map((u) => O(this, [u], function* ({ name: l, value: c }) {
24291
+ e.map((u) => V(this, [u], function* ({ name: l, value: c }) {
24208
24292
  if (typeof c == "string") {
24209
24293
  if (isVariable(c)) {
24210
24294
  const p = yield t.parseVariable(c, o);
@@ -24250,17 +24334,17 @@ const useSyncFromForm = (e, t, o) => {
24250
24334
  isLeaf: !0,
24251
24335
  field: N,
24252
24336
  disabled: I
24253
- }), V = k.find((j) => j.name === z.key);
24254
- if (["belongsTo", "belongsToMany"].includes(N.type) && (!V || ["Select", "Picker"].includes(V == null ? void 0 : V.fieldMode)))
24337
+ }), O = k.find((j) => j.name === z.key);
24338
+ if (["belongsTo", "belongsToMany"].includes(N.type) && (!O || ["Select", "Picker"].includes(O == null ? void 0 : O.fieldMode)))
24255
24339
  E.type = "reference", z.type = "reference", z.title = React.createElement(TreeNode, v(g({}, E), { type: "reference" })), z.isLeaf = !1, z.children = m(N.target, {
24256
24340
  depth: b + 1,
24257
24341
  maxDepth: y,
24258
24342
  prefix: z.key,
24259
24343
  exclude: systemKeys
24260
24344
  });
24261
- else if (["hasOne", "hasMany"].includes(N.type) || ["Nester", "SubTable"].includes(V == null ? void 0 : V.fieldMode)) {
24345
+ else if (["hasOne", "hasMany"].includes(N.type) || ["Nester", "SubTable"].includes(O == null ? void 0 : O.fieldMode)) {
24262
24346
  let j = !1;
24263
- ["hasOne", "hasMany"].includes(N.type) && ["Select", "Picker"].includes(V == null ? void 0 : V.fieldMode) && (j = !0), z.disabled = !0, z.isLeaf = !1, z.children = p(
24347
+ ["hasOne", "hasMany"].includes(N.type) && ["Select", "Picker"].includes(O == null ? void 0 : O.fieldMode) && (j = !0), z.disabled = !0, z.isLeaf = !1, z.children = p(
24264
24348
  N.target,
24265
24349
  {
24266
24350
  depth: b + 1,
@@ -24316,13 +24400,13 @@ const useSyncFromForm = (e, t, o) => {
24316
24400
  }, []);
24317
24401
  return {
24318
24402
  run() {
24319
- return O(this, null, function* () {
24403
+ return V(this, null, function* () {
24320
24404
  var y;
24321
24405
  const f = /* @__PURE__ */ new Set([]), C = /* @__PURE__ */ new Set([]), S = (F, I) => {
24322
24406
  var k;
24323
24407
  (k = F == null ? void 0 : F.reduceProperties) == null || k.call(F, (A, w) => {
24324
24408
  var j, B, T;
24325
- const M = A || I, N = w["x-collection-field"] && n(w["x-collection-field"]), E = w.name.includes("."), z = N && ["hasOne", "hasMany", "belongsTo", "belongsToMany"].includes(N.type), V = !z && E ? getAssociationPath(w.name) : w.name, R = M === "" || !M ? V : M + "." + V;
24409
+ const M = A || I, N = w["x-collection-field"] && n(w["x-collection-field"]), E = w.name.includes("."), z = N && ["hasOne", "hasMany", "belongsTo", "belongsToMany"].includes(N.type), O = !z && E ? getAssociationPath(w.name) : w.name, R = M === "" || !M ? O : M + "." + O;
24326
24410
  if (N && !(["hasOne", "hasMany"].includes(N.type) || ["SubForm", "Nester"].includes((j = w["x-component-props"]) == null ? void 0 : j.mode)) && C.add(R), N && (z || E) && w["x-component"] !== "TableField") {
24327
24411
  if (f.add({ name: R, fieldMode: ((B = w["x-component-props"]) == null ? void 0 : B.mode) || "Select" }), ["Nester", "SubTable"].includes((T = w["x-component-props"]) == null ? void 0 : T.mode)) {
24328
24412
  const D = M && M !== "" ? M + "." + w.name : w.name;
@@ -24488,7 +24572,7 @@ const useSyncFromForm = (e, t, o) => {
24488
24572
  [t, o]
24489
24573
  );
24490
24574
  return { parseFilter: useCallback(
24491
- (i) => O(void 0, null, function* () {
24575
+ (i) => V(void 0, null, function* () {
24492
24576
  const a = flatten(i, {
24493
24577
  breakOn({ key: c }) {
24494
24578
  return c.startsWith("$") && c !== "$and" && c !== "$or";
@@ -24498,7 +24582,7 @@ const useSyncFromForm = (e, t, o) => {
24498
24582
  }
24499
24583
  });
24500
24584
  return yield Promise.all(
24501
- Object.keys(a).map((c) => O(void 0, null, function* () {
24585
+ Object.keys(a).map((c) => V(void 0, null, function* () {
24502
24586
  return a[c] = yield a[c], a[c] === void 0 && delete a[c], a[c];
24503
24587
  }))
24504
24588
  ), unflatten$1(a);
@@ -27777,7 +27861,7 @@ const gridCardBlockSettings = new SchemaSettings({
27777
27861
  v(g({}, allowMultiple$3), {
27778
27862
  useVisible() {
27779
27863
  const e = useIsAssociationField(), t = useIsShowMultipleSwitch();
27780
- return console.log(e, t()), e && t();
27864
+ return e && t();
27781
27865
  }
27782
27866
  }),
27783
27867
  v(g({}, titleField$2), {
@@ -28688,7 +28772,7 @@ const gridCardBlockSettings = new SchemaSettings({
28688
28772
  });
28689
28773
  class SchemaSettingsPlugin extends Plugin {
28690
28774
  load() {
28691
- return O(this, null, function* () {
28775
+ return V(this, null, function* () {
28692
28776
  this.schemaSettingsManager.add(tableBlockSettings), this.schemaSettingsManager.add(createFormBlockSettings), this.schemaSettingsManager.add(editFormBlockSettings), this.schemaSettingsManager.add(filterFormBlockSettings), this.schemaSettingsManager.add(filterFormItemFieldSettings), this.schemaSettingsManager.add(multiDataDetailsBlockSettings), this.schemaSettingsManager.add(detailsWithPaginationSettings), this.schemaSettingsManager.add(singleDataDetailsBlockSettings), this.schemaSettingsManager.add(detailsBlockSettings), this.schemaSettingsManager.add(tableSelectorBlockSettings), this.schemaSettingsManager.add(listBlockSettings), this.schemaSettingsManager.add(gridCardBlockSettings), this.schemaSettingsManager.add(filterCollapseBlockSettings), this.schemaSettingsManager.add(markdownBlockSettings), this.schemaSettingsManager.add(addNewActionSettings), this.schemaSettingsManager.add(filterActionSettings), this.schemaSettingsManager.add(refreshActionSettings), this.schemaSettingsManager.add(viewActionSettings), this.schemaSettingsManager.add(editActionSettings), this.schemaSettingsManager.add(deleteActionSettings), this.schemaSettingsManager.add(disassociateActionSettings), this.schemaSettingsManager.add(bulkDeleteActionSettings), this.schemaSettingsManager.add(customizeAddRecordActionSettings), this.schemaSettingsManager.add(customizePopupActionSettings), this.schemaSettingsManager.add(customizeLinkActionSettings), this.schemaSettingsManager.add(customizeUpdateRecordActionSettings), this.schemaSettingsManager.add(createSubmitActionSettings), this.schemaSettingsManager.add(updateSubmitActionSettings), this.schemaSettingsManager.add(submitActionSettings), this.schemaSettingsManager.add(customizeSaveRecordActionSettings), this.schemaSettingsManager.add(addChildActionSettings), this.schemaSettingsManager.add(expendableActionSettings), this.schemaSettingsManager.add(fieldSettingsFormItem), this.schemaSettingsManager.add(tableColumnSettings), this.schemaSettingsManager.add(filterCollapseItemFieldSettings), this.schemaSettingsManager.add(selectComponentFieldSettings), this.schemaSettingsManager.add(recordPickerComponentFieldSettings), this.schemaSettingsManager.add(subformComponentFieldSettings), this.schemaSettingsManager.add(subformPopoverComponentFieldSettings), this.schemaSettingsManager.add(subTablePopoverComponentFieldSettings), this.schemaSettingsManager.add(datePickerComponentFieldSettings), this.schemaSettingsManager.add(unixTimestampComponentFieldSettings), this.schemaSettingsManager.add(inputNumberComponentFieldSettings), this.schemaSettingsManager.add(fileManagerComponentFieldSettings), this.schemaSettingsManager.add(tagComponentFieldSettings), this.schemaSettingsManager.add(cascadeSelectComponentFieldSettings), this.schemaSettingsManager.add(inputPreviewComponentFieldSettings), this.schemaSettingsManager.add(inputURLComponentFieldSettings), this.schemaSettingsManager.add(uploadAttachmentComponentFieldSettings), this.schemaSettingsManager.add(previewComponentFieldSettings);
28693
28777
  });
28694
28778
  }
@@ -28883,8 +28967,8 @@ const useFieldComponentOptions = () => {
28883
28967
  const { refresh: t } = useDesignable(), o = useAPIClient(), { t: n } = useTranslation();
28884
28968
  return useCallback(
28885
28969
  (r) => {
28886
- var f, C, S, b, y, F, I, k, A, w, M, N, E, z, V;
28887
- const { active: i, over: a } = r, l = (C = (f = i == null ? void 0 : i.data) == null ? void 0 : f.current) == null ? void 0 : C.schema, c = (b = (S = a == null ? void 0 : a.data) == null ? void 0 : S.current) == null ? void 0 : b.schema, u = (F = (y = a == null ? void 0 : a.data) == null ? void 0 : y.current) == null ? void 0 : F.insertAdjacent, d = (k = (I = a == null ? void 0 : a.data) == null ? void 0 : I.current) == null ? void 0 : k.breakRemoveOn, p = (w = (A = a == null ? void 0 : a.data) == null ? void 0 : A.current) == null ? void 0 : w.wrapSchema, m = (N = (M = a == null ? void 0 : a.data) == null ? void 0 : M.current) == null ? void 0 : N.onSuccess, h = (V = (z = (E = a == null ? void 0 : a.data) == null ? void 0 : E.current) == null ? void 0 : z.removeParentsIfNoChildren) != null ? V : !0;
28970
+ var f, C, S, b, y, F, I, k, A, w, M, N, E, z, O;
28971
+ const { active: i, over: a } = r, l = (C = (f = i == null ? void 0 : i.data) == null ? void 0 : f.current) == null ? void 0 : C.schema, c = (b = (S = a == null ? void 0 : a.data) == null ? void 0 : S.current) == null ? void 0 : b.schema, u = (F = (y = a == null ? void 0 : a.data) == null ? void 0 : y.current) == null ? void 0 : F.insertAdjacent, d = (k = (I = a == null ? void 0 : a.data) == null ? void 0 : I.current) == null ? void 0 : k.breakRemoveOn, p = (w = (A = a == null ? void 0 : a.data) == null ? void 0 : A.current) == null ? void 0 : w.wrapSchema, m = (N = (M = a == null ? void 0 : a.data) == null ? void 0 : M.current) == null ? void 0 : N.onSuccess, h = (O = (z = (E = a == null ? void 0 : a.data) == null ? void 0 : E.current) == null ? void 0 : z.removeParentsIfNoChildren) != null ? O : !0;
28888
28972
  if (!l || !c) {
28889
28973
  e == null || e(r);
28890
28974
  return;
@@ -29036,7 +29120,7 @@ const SortableProvider = (e) => {
29036
29120
  SortableItem,
29037
29121
  SortableProvider
29038
29122
  }, Symbol.toStringTag, { value: "Module" })), requestChartData = (e) => function() {
29039
- return O(this, null, function* () {
29123
+ return V(this, null, function* () {
29040
29124
  var t;
29041
29125
  try {
29042
29126
  const o = yield this.api.request(e);
@@ -29066,7 +29150,7 @@ const Form$1 = observer$1(
29066
29150
  {
29067
29151
  uid: a["x-uid"],
29068
29152
  onSuccess(h) {
29069
- return O(this, null, function* () {
29153
+ return V(this, null, function* () {
29070
29154
  yield c.reset(), c.setValues(h == null ? void 0 : h.data), c.setInitialValues(h == null ? void 0 : h.data);
29071
29155
  });
29072
29156
  }
@@ -29337,7 +29421,7 @@ Select.ReadPretty = ReadPretty$c;
29337
29421
  const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typeof o == "object" ? o[t.value] : o), ReadPretty$b = observer$1(
29338
29422
  (e) => {
29339
29423
  const t = g(g({}, defaultFieldNames$1), e.fieldNames), o = useField(), n = useFieldSchema(), r = useRecord(), { snapshot: i } = useActionContext(), { data: a } = useRequest(
29340
- i ? () => O(void 0, null, function* () {
29424
+ i ? () => V(void 0, null, function* () {
29341
29425
  return {
29342
29426
  data: r[n.name]
29343
29427
  };
@@ -29392,21 +29476,21 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
29392
29476
  ]), x = useDataSourceKey(), f = useDataSourceHeaders(m || x), [C, S] = useState(!1), b = useRef(!1), y = useFieldSchema(), F = ((K = y["x-component-props"]) == null ? void 0 : K.addMode) === "quickAdd", { getField: I } = useCollection_deprecated(), k = useRef(null), { getCollectionJoinField: A, getInterface: w } = useCollectionManager_deprecated(), M = y["x-collection-field"] || y.name, N = I(M) || A(M), E = u || (N == null ? void 0 : N.target) && (t == null ? void 0 : t.label) && A(`${N.target}.${t.label}`), z = useMemo(() => {
29393
29477
  var W, X;
29394
29478
  return E != null && E.interface && ((X = (W = w(E.interface)) == null ? void 0 : W.filterable) == null ? void 0 : X.operators[0].value) || "$includes";
29395
- }, [E]), V = useCompile(), R = useCallback(
29479
+ }, [E]), O = useCompile(), R = useCallback(
29396
29480
  (W) => {
29397
29481
  try {
29398
29482
  return W.filter((X) => ["number", "string"].includes(typeof X[t.value])).map((X) => {
29399
29483
  var J;
29400
- let Q = V(X[t.label]);
29484
+ let Q = O(X[t.label]);
29401
29485
  if ((J = E == null ? void 0 : E.uiSchema) != null && J.enum)
29402
29486
  if (Array.isArray(Q))
29403
- Q = Q.map((oe, ne) => {
29404
- const re = E.uiSchema.enum.find((ie) => ie.value === oe);
29405
- return re ? /* @__PURE__ */ jsx(Tag, { role: "button", color: re.color, style: { marginRight: 3 }, children: (re == null ? void 0 : re.label) || oe }, ne) : /* @__PURE__ */ jsx(Tag, { role: "button", children: oe }, oe);
29487
+ Q = Q.map((te, oe) => {
29488
+ const re = E.uiSchema.enum.find((se) => se.value === te);
29489
+ return re ? /* @__PURE__ */ jsx(Tag, { role: "button", color: re.color, style: { marginRight: 3 }, children: (re == null ? void 0 : re.label) || te }, oe) : /* @__PURE__ */ jsx(Tag, { role: "button", children: te }, te);
29406
29490
  }).reverse();
29407
29491
  else {
29408
- const oe = E.uiSchema.enum.find((ne) => ne.value === Q);
29409
- oe && (Q = /* @__PURE__ */ jsx(Tag, { role: "button", color: oe.color, children: oe.label }));
29492
+ const te = E.uiSchema.enum.find((oe) => oe.value === Q);
29493
+ te && (Q = /* @__PURE__ */ jsx(Tag, { role: "button", color: te.color, children: te.label }));
29410
29494
  }
29411
29495
  return (E == null ? void 0 : E.type) === "date" && (Q = dayjs(Q).format("YYYY-MM-DD")), c ? c({
29412
29496
  [t.label]: Q || EMPTY$1,
@@ -29454,7 +29538,7 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
29454
29538
  useEffect(() => {
29455
29539
  b.current && B();
29456
29540
  }, [D]);
29457
- const q = (W) => O(void 0, null, function* () {
29541
+ const q = (W) => V(void 0, null, function* () {
29458
29542
  var X;
29459
29543
  B({
29460
29544
  filter: mergeFilter([
@@ -29565,9 +29649,9 @@ const useFormDataTemplates = () => {
29565
29649
  alignItems: "center",
29566
29650
  backgroundColor: o.colorFillAlter,
29567
29651
  padding: o.padding
29568
- }, e), [e, o.colorFillAlter]), C = useMemo(() => ({ fontSize: o.fontSize, fontWeight: "bold", whiteSpace: "nowrap", marginRight: o.marginXS }), [o.fontSize, o.marginXS]), S = useCallback((F) => O(void 0, null, function* () {
29652
+ }, e), [e, o.colorFillAlter]), C = useMemo(() => ({ fontSize: o.fontSize, fontWeight: "bold", whiteSpace: "nowrap", marginRight: o.marginXS }), [o.fontSize, o.marginXS]), S = useCallback((F) => V(void 0, null, function* () {
29569
29653
  d(F), m(null), t == null || t.reset();
29570
- }), []), b = useCallback((F, I) => O(void 0, null, function* () {
29654
+ }), []), b = useCallback((F, I) => V(void 0, null, function* () {
29571
29655
  const k = v(g({}, I), { dataId: F });
29572
29656
  m(I), fetchTemplateData(h, k).then((A) => (t && A && (t.reset(), t.__template = !0, forEach(A, (w, M) => {
29573
29657
  var N;
@@ -29621,7 +29705,7 @@ function findDataTemplates(e) {
29621
29705
  return t ? _.cloneDeep(t["x-data-templates"]) || {} : {};
29622
29706
  }
29623
29707
  function fetchTemplateData(e, t, o) {
29624
- return O(this, null, function* () {
29708
+ return V(this, null, function* () {
29625
29709
  if (!(t.fields.length === 0 || !t.dataId))
29626
29710
  return e.resource(t.collection).get({
29627
29711
  filterByTk: t.dataId,
@@ -29634,20 +29718,22 @@ function fetchTemplateData(e, t, o) {
29634
29718
  });
29635
29719
  }
29636
29720
  const useFormBlockHeight = () => {
29637
- var I, k, A;
29638
- const e = useDataBlockHeight(), t = useFieldSchema(), { token: o } = theme.useToken(), { designable: n } = useDesignable(), { heightProps: r } = useBlockHeightProps() || {}, { title: i } = r || {}, { display: a, enabled: l } = useFormDataTemplates(), c = t.reduceProperties((w, M) => M["x-component"] === "ActionBar" ? M : w), u = Object.keys((c == null ? void 0 : c.properties) || {}).length > 0, d = (A = (k = (I = t == null ? void 0 : t.parent) == null ? void 0 : I["x-decorator"]) == null ? void 0 : k.includes) == null ? void 0 : A.call(k, "FormBlockProvider"), p = () => d ? n ? 2 : 1 : 2, m = u || n ? o.controlHeight + p() * o.marginLG : 1 * o.marginLG, h = i ? o.fontSizeLG * o.lineHeightLG + o.padding * 2 - 1 : 0, { data: x } = useDataBlockRequest() || {}, { count: f, pageSize: C } = (x == null ? void 0 : x.meta) || {}, S = f > C, b = S ? o.controlHeightSM + (n ? 1 : 0) * o.paddingLG : 0, y = a && l ? o.controlHeight + 2 * o.padding + o.margin : 0, F = () => !d && !S ? n ? 1 : 0 : 1;
29639
- return e - m - F() * o.paddingLG - h - b - y;
29721
+ var y, F, I;
29722
+ const e = useDataBlockHeight(), t = useFieldSchema(), { token: o } = theme.useToken(), { designable: n } = useDesignable(), { heightProps: r } = useBlockHeightProps() || {}, { title: i } = r || {}, { display: a, enabled: l } = useFormDataTemplates(), c = t.reduceProperties((k, A) => A["x-component"] === "ActionBar" ? A : k), u = Object.keys((c == null ? void 0 : c.properties) || {}).length > 0, d = (I = (F = (y = t == null ? void 0 : t.parent) == null ? void 0 : y["x-decorator"]) == null ? void 0 : F.includes) == null ? void 0 : I.call(F, "FormBlockProvider"), p = u || n ? o.controlHeight + (d ? 1 : 2) * o.marginLG : o.marginLG, m = i ? o.fontSizeLG * o.lineHeightLG + o.padding * 2 - 1 : 0, { data: h } = useDataBlockRequest() || {}, { count: x, pageSize: f } = (h == null ? void 0 : h.meta) || {}, S = x > f ? o.controlHeightSM + 1 * o.paddingLG : 0, b = a && l ? o.controlHeight + 2 * o.padding + o.margin : 0;
29723
+ return e - p - o.paddingLG - m - S - b;
29640
29724
  }, FormComponent = (e) => {
29641
- const d = e, { form: t, children: o } = d, n = H(d, ["form", "children"]), r = useField(), i = useFieldSchema(), a = useAttach(t.createVoidField(v(g({}, r.props), { basePath: "" }))), l = useFormBlockHeight(), { token: c } = theme.useToken(), { designable: u } = useDesignable();
29642
- return /* @__PURE__ */ jsx(FieldContext.Provider, { value: void 0, children: /* @__PURE__ */ jsx(FormContext.Provider, { value: t, children: /* @__PURE__ */ jsx(FormLayout, v(g({ layout: "vertical" }, n), { children: /* @__PURE__ */ jsx(
29725
+ const u = e, { form: t, children: o } = u, n = H(u, ["form", "children"]), r = useField(), i = useFieldSchema(), a = useAttach(t.createVoidField(v(g({}, r.props), { basePath: "" }))), l = useFormBlockHeight(), { token: c } = theme.useToken();
29726
+ return useDesignable(), /* @__PURE__ */ jsx(FieldContext.Provider, { value: void 0, children: /* @__PURE__ */ jsx(FormContext.Provider, { value: t, children: /* @__PURE__ */ jsx(FormLayout, v(g({ layout: "vertical" }, n), { children: /* @__PURE__ */ jsx(
29643
29727
  "div",
29644
29728
  {
29645
29729
  className: css`
29646
29730
  .nb-grid-container {
29647
29731
  height: ${l ? l + "px" : "100%"};
29648
29732
  overflow-y: auto;
29649
- margin: 0px -${c.marginLG}px ${u ? 0 : -c.marginLG}px;
29650
- padding: 0px ${c.paddingLG}px;
29733
+ margin-left: -${c.marginLG}px;
29734
+ margin-right: -${c.marginLG}px;
29735
+ padding-left: ${c.marginLG}px;
29736
+ padding-right: ${c.marginLG}px;
29651
29737
  }
29652
29738
  `,
29653
29739
  children: /* @__PURE__ */ jsx(RecursionField, { basePath: a.address, schema: i, onlyRenderProperties: !0 })
@@ -29752,7 +29838,7 @@ function getSubscriber(e, t, o, n, r) {
29752
29838
  condition: o.condition,
29753
29839
  variables: n,
29754
29840
  localVariables: r
29755
- }), setTimeout(() => O(this, null, function* () {
29841
+ }), setTimeout(() => V(this, null, function* () {
29756
29842
  var c;
29757
29843
  const i = getFieldNameByOperator(e.operator);
29758
29844
  if (!((c = t.stateOfLinkageRules) != null && c[i]))
@@ -30160,7 +30246,7 @@ const useSystemSettings = () => useContext(SystemSettingsContext), SystemSetting
30160
30246
  const { setVisible: e } = useActionContext();
30161
30247
  return {
30162
30248
  run() {
30163
- return O(this, null, function* () {
30249
+ return V(this, null, function* () {
30164
30250
  e(!1);
30165
30251
  });
30166
30252
  }
@@ -30174,7 +30260,7 @@ const useSystemSettings = () => useContext(SystemSettingsContext), SystemSetting
30174
30260
  const { setVisible: e } = useActionContext(), t = useForm(), { mutate: o, data: n } = useSystemSettings(), r = useAPIClient(), { t: i } = useTranslation();
30175
30261
  return {
30176
30262
  run() {
30177
- return O(this, null, function* () {
30263
+ return V(this, null, function* () {
30178
30264
  var u;
30179
30265
  yield t.submit();
30180
30266
  const l = cloneDeep(t.values);
@@ -30292,7 +30378,7 @@ const useSystemSettings = () => useContext(SystemSettingsContext), SystemSetting
30292
30378
  ) });
30293
30379
  class SystemSettingsPlugin extends Plugin {
30294
30380
  load() {
30295
- return O(this, null, function* () {
30381
+ return V(this, null, function* () {
30296
30382
  this.app.use(SystemSettingsProvider, this.options);
30297
30383
  });
30298
30384
  }
@@ -30330,7 +30416,7 @@ const DocumentTitleProvider = (e) => {
30330
30416
  };
30331
30417
  class RemoteDocumentTitlePlugin extends Plugin {
30332
30418
  load() {
30333
- return O(this, null, function* () {
30419
+ return V(this, null, function* () {
30334
30420
  this.app.use(RemoteDocumentTitleProvider, this.options);
30335
30421
  });
30336
30422
  }
@@ -30495,6 +30581,7 @@ const FixedBlockContext = React.createContext({
30495
30581
  },
30496
30582
  ".nb-page-wrapper": {
30497
30583
  padding: `${e.paddingPageVertical}px`,
30584
+ paddingBottom: 0,
30498
30585
  flex: 1
30499
30586
  }
30500
30587
  }
@@ -30512,13 +30599,13 @@ const FixedBlockContext = React.createContext({
30512
30599
  const h = (B = l["x-component-props"]) == null ? void 0 : B.disablePageHeader, x = (T = l["x-component-props"]) == null ? void 0 : T.enablePageTabs, f = (D = l["x-component-props"]) == null ? void 0 : D.hidePageTitle, C = useContext(SchemaOptionsContext), [S, b] = useSearchParams(), [y, F] = useState(!1), I = useMemo(
30513
30600
  () => S.get("tab") || Object.keys(l.properties || {}).shift(),
30514
30601
  [l.properties, S]
30515
- ), [k, A] = useState(0), { wrapSSR: w, hashId: M, componentCls: N } = useStyles$b(), E = useStyles$c(), { token: z } = useToken(), V = f ? void 0 : l.title || r(i);
30602
+ ), [k, A] = useState(0), { wrapSSR: w, hashId: M, componentCls: N } = useStyles$b(), E = useStyles$c(), { token: z } = useToken(), O = f ? void 0 : l.title || r(i);
30516
30603
  useRequest(
30517
30604
  {
30518
30605
  url: `/uiSchemas:getParentJsonSchema/${l["x-uid"]}`
30519
30606
  },
30520
30607
  {
30521
- ready: !f && !V,
30608
+ ready: !f && !O,
30522
30609
  onSuccess($) {
30523
30610
  a($.data.title);
30524
30611
  }
@@ -30539,9 +30626,9 @@ const FixedBlockContext = React.createContext({
30539
30626
  children: !h && /* @__PURE__ */ jsx(
30540
30627
  PageHeader,
30541
30628
  v(g({
30542
- className: cls("pageHeaderCss", V || x ? "" : "height0"),
30629
+ className: cls("pageHeaderCss", O || x ? "" : "height0"),
30543
30630
  ghost: !1,
30544
- title: V || " "
30631
+ title: O || " "
30545
30632
  }, o), {
30546
30633
  footer: x && /* @__PURE__ */ jsx(DndContext, { children: /* @__PURE__ */ jsx(
30547
30634
  Tabs$1,
@@ -30567,7 +30654,7 @@ const FixedBlockContext = React.createContext({
30567
30654
  icon: /* @__PURE__ */ jsx(PlusOutlined, {}),
30568
30655
  className: "addTabBtn",
30569
30656
  type: "dashed",
30570
- onClick: () => O(void 0, null, function* () {
30657
+ onClick: () => V(void 0, null, function* () {
30571
30658
  const $ = yield FormDialog(
30572
30659
  n("Add tab"),
30573
30660
  () => /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: C.scope, components: g({}, C.components), children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(
@@ -30841,7 +30928,7 @@ const pageSettings = new SchemaSettings({
30841
30928
  {
30842
30929
  title: t("Fix block"),
30843
30930
  checked: (l = o["x-decorator-props"]) == null ? void 0 : l.fixedBlock,
30844
- onChange: (c) => O(void 0, null, function* () {
30931
+ onChange: (c) => V(void 0, null, function* () {
30845
30932
  var d;
30846
30933
  const u = v(g({}, o["x-decorator-props"]), {
30847
30934
  fixedBlock: c
@@ -30868,7 +30955,7 @@ const pageSettings = new SchemaSettings({
30868
30955
  };
30869
30956
  class AntdSchemaComponentPlugin extends Plugin {
30870
30957
  load() {
30871
- return O(this, null, function* () {
30958
+ return V(this, null, function* () {
30872
30959
  this.addComponents(), this.addScopes(), this.addSchemaSettings();
30873
30960
  });
30874
30961
  }
@@ -30936,12 +31023,12 @@ const AppendsTreeSelect = (e) => {
30936
31023
  "rootOption",
30937
31024
  "loadData"
30938
31025
  ]), d = useCompile(), { t: p } = useTranslation(), [m, h] = useState({}), x = i({ collection: r }), [f, C] = parseCollectionName(x), S = useApp(), { collectionManager: b } = S.dataSourceManager.getDataSource(f), y = b.getCollectionFields.bind(b), F = Object.values(m), I = useMemo(() => e.multiple ? (o || []).map((z) => m[z]).filter(Boolean) : o, [o, e.multiple, m]), k = useCallback(
30939
- (z) => O(void 0, null, function* () {
31026
+ (z) => V(void 0, null, function* () {
30940
31027
  if (c != null)
30941
31028
  return c(z);
30942
31029
  if (!z.isLeaf && z.loadChildren) {
30943
- const V = z.loadChildren(z);
30944
- h((R) => V.reduce((j, B) => Object.assign(j, { [B.value]: B }), g({}, R)));
31030
+ const O = z.loadChildren(z);
31031
+ h((R) => O.reduce((j, B) => Object.assign(j, { [B.value]: B }), g({}, R)));
30945
31032
  }
30946
31033
  }),
30947
31034
  [c]
@@ -30959,7 +31046,7 @@ const AppendsTreeSelect = (e) => {
30959
31046
  const z = e.multiple ? o : o ? [o] : [];
30960
31047
  if (!(z != null && z.length) || z.every((R) => !!m[R]))
30961
31048
  return;
30962
- const V = [];
31049
+ const O = [];
30963
31050
  z.forEach((R) => {
30964
31051
  const j = R.split(".");
30965
31052
  let B = m[j[0]];
@@ -30971,10 +31058,10 @@ const AppendsTreeSelect = (e) => {
30971
31058
  }
30972
31059
  if (!B.isLeaf && B.loadChildren) {
30973
31060
  const $ = B.loadChildren(B);
30974
- $ != null && $.length && (V.push(...$), B = $.find((q) => q.value === j.slice(0, T + 1).join(".")));
31061
+ $ != null && $.length && (O.push(...$), B = $.find((q) => q.value === j.slice(0, T + 1).join(".")));
30975
31062
  }
30976
31063
  }
30977
- }), h((R) => V.reduce((j, B) => Object.assign(j, { [B.value]: B }), g({}, R)));
31064
+ }), h((R) => O.reduce((j, B) => Object.assign(j, { [B.value]: B }), g({}, R)));
30978
31065
  }, [o, F.length, e.multiple]);
30979
31066
  const A = useCallback(
30980
31067
  (z) => {
@@ -30982,14 +31069,14 @@ const AppendsTreeSelect = (e) => {
30982
31069
  n(z);
30983
31070
  return;
30984
31071
  }
30985
- const V = z.map((B) => B.value).filter(Boolean), R = new Set(V), j = I.find((B) => !R.has(B.value));
31072
+ const O = z.map((B) => B.value).filter(Boolean), R = new Set(O), j = I.find((B) => !R.has(B.value));
30986
31073
  if (j) {
30987
31074
  const B = `${j.value}.`;
30988
31075
  Object.keys(m).forEach((T) => {
30989
31076
  T.startsWith(B) && R.delete(T);
30990
31077
  });
30991
31078
  } else
30992
- V.forEach((B) => {
31079
+ O.forEach((B) => {
30993
31080
  const T = B.split(".");
30994
31081
  if (T.length)
30995
31082
  for (let D = 1; D <= T.length; D++)
@@ -31001,10 +31088,10 @@ const AppendsTreeSelect = (e) => {
31001
31088
  ), w = useCallback(
31002
31089
  (z) => {
31003
31090
  var D;
31004
- const { value: V, onClose: R, disabled: j, closable: B } = z;
31005
- if (!V)
31091
+ const { value: O, onClose: R, disabled: j, closable: B } = z;
31092
+ if (!O)
31006
31093
  return null;
31007
- const { fullTitle: T } = (D = m[V]) != null ? D : {};
31094
+ const { fullTitle: T } = (D = m[O]) != null ? D : {};
31008
31095
  return /* @__PURE__ */ jsx(Tag, { closable: B && !j, onClose: R, children: T == null ? void 0 : T.join(" / ") });
31009
31096
  },
31010
31097
  [m]
@@ -31100,14 +31187,14 @@ const AppendsTreeSelect = (e) => {
31100
31187
  const A = uid();
31101
31188
  return f.addEffects(A, () => {
31102
31189
  onFieldInputValueChange("*", (w) => {
31103
- var N, E, z, V;
31104
- (filterAnalyses((z = (E = (N = r.componentProps) == null ? void 0 : N.service) == null ? void 0 : E.params) == null ? void 0 : z.filter) || []).includes((V = w == null ? void 0 : w.props) == null ? void 0 : V.name) && r.value && (r.setValue(r.initialValue), p(r.initialValue));
31190
+ var N, E, z, O;
31191
+ (filterAnalyses((z = (E = (N = r.componentProps) == null ? void 0 : N.service) == null ? void 0 : E.params) == null ? void 0 : z.filter) || []).includes((O = w == null ? void 0 : w.props) == null ? void 0 : O.name) && r.value && (r.setValue(r.initialValue), p(r.initialValue));
31105
31192
  });
31106
31193
  }), () => {
31107
31194
  f.removeEffects(A);
31108
31195
  };
31109
31196
  }, []);
31110
- const y = (A) => O(void 0, null, function* () {
31197
+ const y = (A) => V(void 0, null, function* () {
31111
31198
  var E, z;
31112
31199
  const { search: w, callBack: M } = A, {
31113
31200
  data: { data: N }
@@ -31118,8 +31205,8 @@ const AppendsTreeSelect = (e) => {
31118
31205
  });
31119
31206
  if (N) {
31120
31207
  if (["m2m", "o2m"].includes(l == null ? void 0 : l.interface) && x !== !1) {
31121
- const V = f.getValuesIn(r.path) || [];
31122
- V.push(N), f.setValuesIn(r.path, V), r.onInput(V);
31208
+ const O = f.getValuesIn(r.path) || [];
31209
+ O.push(N), f.setValuesIn(r.path, O), r.onInput(O);
31123
31210
  } else
31124
31211
  f.setValuesIn(r.path, N), r.onInput(N);
31125
31212
  isFunction(M) && (M == null || M()), message.success(h("Saved successfully"));
@@ -32038,10 +32125,10 @@ const InternalFileManager = (e) => {
32038
32125
  setSelectedRows: u,
32039
32126
  collectionField: C
32040
32127
  }, k = () => {
32041
- const { setVisible: N } = useActionContext(), { multiple: E, selectedRows: z, onChange: V, options: R, collectionField: j } = useContext(RecordPickerContext);
32128
+ const { setVisible: N } = useActionContext(), { multiple: E, selectedRows: z, onChange: O, options: R, collectionField: j } = useContext(RecordPickerContext);
32042
32129
  return {
32043
32130
  onClick() {
32044
- V(E ? unionBy(z, R, (j == null ? void 0 : j.targetKey) || "id") : (z == null ? void 0 : z[0]) || null), N(!1);
32131
+ O(E ? unionBy(z, R, (j == null ? void 0 : j.targetKey) || "id") : (z == null ? void 0 : z[0]) || null), N(!1);
32045
32132
  }
32046
32133
  };
32047
32134
  };
@@ -32097,13 +32184,13 @@ const InternalFileManager = (e) => {
32097
32184
  const { data: t, mapOptions: o, onChange: n, value: r } = e, [i, a] = useState([
32098
32185
  { key: void 0, children: [], value: null }
32099
32186
  ]), [l, c] = useState(t), [u, d] = useState(!1), p = useCompile(), m = useAPIClient(), h = useServiceOptions$1(e), { options: x, field: f } = useAssociationFieldContext(), C = m.resource(x.target), { getCollectionJoinField: S, getInterface: b } = useCollectionManager_deprecated(), y = (z = f == null ? void 0 : f.componentProps) == null ? void 0 : z.fieldNames, F = (x == null ? void 0 : x.target) && (y == null ? void 0 : y.label) && S(`${x.target}.${y.label}`), I = useMemo(() => {
32100
- var V, R;
32101
- return F != null && F.interface && ((R = (V = b(F.interface)) == null ? void 0 : V.filterable) == null ? void 0 : R.operators[0].value) || "$includes";
32187
+ var O, R;
32188
+ return F != null && F.interface && ((R = (O = b(F.interface)) == null ? void 0 : O.filterable) == null ? void 0 : R.operators[0].value) || "$includes";
32102
32189
  }, [F]), k = useField();
32103
32190
  useEffect(() => {
32104
- var V;
32191
+ var O;
32105
32192
  if (r) {
32106
- const R = Array.isArray(r) ? extractLastNonNullValueObjects(r == null ? void 0 : r.filter((B) => B.value), !0) : transformNestedData(r), j = (V = R == null ? void 0 : R.map) == null ? void 0 : V.call(R, (B) => ({
32193
+ const R = Array.isArray(r) ? extractLastNonNullValueObjects(r == null ? void 0 : r.filter((B) => B.value), !0) : transformNestedData(r), j = (O = R == null ? void 0 : R.map) == null ? void 0 : O.call(R, (B) => ({
32107
32194
  key: B.parentId,
32108
32195
  children: [],
32109
32196
  value: B
@@ -32112,9 +32199,9 @@ const InternalFileManager = (e) => {
32112
32199
  }
32113
32200
  }, []);
32114
32201
  const A = useCallback(
32115
- (V) => {
32202
+ (O) => {
32116
32203
  try {
32117
- return V == null ? void 0 : V.filter((R) => ["number", "string"].includes(typeof R[y.value])).map((R) => {
32204
+ return O == null ? void 0 : O.filter((R) => ["number", "string"].includes(typeof R[y.value])).map((R) => {
32118
32205
  var B, T, D;
32119
32206
  let j = p(R[y.label]);
32120
32207
  if ((B = F == null ? void 0 : F.uiSchema) != null && B.enum)
@@ -32137,20 +32224,20 @@ const InternalFileManager = (e) => {
32137
32224
  });
32138
32225
  }).filter(Boolean);
32139
32226
  } catch (R) {
32140
- return console.error(R), V;
32227
+ return console.error(R), O;
32141
32228
  }
32142
32229
  },
32143
32230
  [F == null ? void 0 : F.uiSchema, y]
32144
- ), w = (V) => O(void 0, null, function* () {
32231
+ ), w = (O) => V(void 0, null, function* () {
32145
32232
  var j, B;
32146
32233
  const R = yield C.list({
32147
32234
  pageSize: 200,
32148
32235
  params: h == null ? void 0 : h.params,
32149
- filter: mergeFilter([(j = h == null ? void 0 : h.params) == null ? void 0 : j.filter, V]),
32150
- tree: V.parentId ? void 0 : !0
32236
+ filter: mergeFilter([(j = h == null ? void 0 : h.params) == null ? void 0 : j.filter, O]),
32237
+ tree: O.parentId ? void 0 : !0
32151
32238
  });
32152
32239
  return (B = R == null ? void 0 : R.data) == null ? void 0 : B.data;
32153
- }), M = (V, R, j) => O(void 0, null, function* () {
32240
+ }), M = (O, R, j) => V(void 0, null, function* () {
32154
32241
  const B = yield w({ parentId: R == null ? void 0 : R.id }), T = [...i];
32155
32242
  if (T.splice(j + 1), T[j] = v(g({}, T[j]), { value: R }), R != null && R.id && (T[j + 1] = { key: R == null ? void 0 : R.id, children: (B == null ? void 0 : B.length) > 0 ? B : null }), a(T), ["o2m", "m2m"].includes(x.interface)) {
32156
32243
  const D = Array.isArray(f.fieldValue) ? f.fieldValue : [];
@@ -32158,9 +32245,9 @@ const InternalFileManager = (e) => {
32158
32245
  } else
32159
32246
  f.value = R;
32160
32247
  n == null || n(T);
32161
- }), N = (V, R, j) => O(void 0, null, function* () {
32248
+ }), N = (O, R, j) => V(void 0, null, function* () {
32162
32249
  var B, T, D;
32163
- if (V) {
32250
+ if (O) {
32164
32251
  d(!0);
32165
32252
  const $ = yield w({ parentId: R == null ? void 0 : R.key });
32166
32253
  if (d(!1), c($), j === (i == null ? void 0 : i.length) - 1 && ((B = R == null ? void 0 : R.value) != null && B.id)) {
@@ -32168,10 +32255,10 @@ const InternalFileManager = (e) => {
32168
32255
  L.splice(j + 1), L[j] = v(g({}, L[j]), { value: R == null ? void 0 : R.value }), L[j + 1] = { key: (D = R == null ? void 0 : R.value) == null ? void 0 : D.id, children: (q == null ? void 0 : q.length) > 0 ? q : null }, a(L), n == null || n(L);
32169
32256
  }
32170
32257
  }
32171
- }), E = (V, R) => O(void 0, null, function* () {
32172
- const j = V ? {
32258
+ }), E = (O, R) => V(void 0, null, function* () {
32259
+ const j = O ? {
32173
32260
  [y.label]: {
32174
- [I]: V
32261
+ [I]: O
32175
32262
  }
32176
32263
  } : {};
32177
32264
  d(!0);
@@ -32180,9 +32267,9 @@ const InternalFileManager = (e) => {
32180
32267
  }));
32181
32268
  d(!1), c(B);
32182
32269
  });
32183
- return /* @__PURE__ */ jsx(Space$1, { wrap: !0, children: i.map((V, R) => {
32270
+ return /* @__PURE__ */ jsx(Space$1, { wrap: !0, children: i.map((O, R) => {
32184
32271
  var j, B, T;
32185
- return V.children && /* @__PURE__ */ jsx(
32272
+ return O.children && /* @__PURE__ */ jsx(
32186
32273
  Select$1,
32187
32274
  {
32188
32275
  disabled: f.disabled,
@@ -32192,55 +32279,56 @@ const InternalFileManager = (e) => {
32192
32279
  filterOption: !1,
32193
32280
  filterSort: null,
32194
32281
  defaultValue: {
32195
- label: (j = V == null ? void 0 : V.value) == null ? void 0 : j[y.label],
32196
- value: (B = V == null ? void 0 : V.value) == null ? void 0 : B[y.value]
32282
+ label: (j = O == null ? void 0 : O.value) == null ? void 0 : j[y.label],
32283
+ value: (B = O == null ? void 0 : O.value) == null ? void 0 : B[y.value]
32197
32284
  },
32198
32285
  labelInValue: !0,
32199
- onSearch: (D) => E(D, V),
32286
+ onSearch: (D) => E(D, O),
32200
32287
  fieldNames: y,
32201
32288
  style: { minWidth: 150 },
32202
32289
  onChange: (D, $) => M(D, $, R),
32203
32290
  options: u ? [] : A(l),
32204
- onDropdownVisibleChange: (D) => N(D, V, R),
32291
+ onDropdownVisibleChange: (D) => N(D, O, R),
32205
32292
  notFoundContent: u ? /* @__PURE__ */ jsx(Spin, { size: "small" }) : null
32206
32293
  },
32207
- `${(T = V.value) == null ? void 0 : T.id}+ ${V.key} + ${y.label}`
32294
+ `${(T = O.value) == null ? void 0 : T.id}+ ${O.key} + ${y.label}`
32208
32295
  );
32209
32296
  }) });
32210
32297
  }), AssociationCascadeSelect = connect((e) => /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(CascadeSelect, g({}, e)) })), InternalCascadeSelect = observer$1(
32211
32298
  (e) => {
32212
- const { options: t } = useAssociationFieldContext(), o = useMemo(() => createForm(), []), { t: n } = useTranslation(), r = useField(), i = useFieldSchema();
32299
+ var m;
32300
+ const { options: t } = useAssociationFieldContext(), o = useMemo(() => createForm(), []), { t: n } = useTranslation(), r = useField(), i = useFieldSchema(), { loading: a, data: l } = useDataBlockRequest() || {}, c = (m = l == null ? void 0 : l.data) == null ? void 0 : m[i.name];
32213
32301
  useEffect(() => {
32214
- const u = uid();
32215
- return o.addEffects(u, () => {
32216
- onFormValuesChange((d) => {
32217
- var p, m;
32302
+ const h = uid();
32303
+ return o.addEffects(h, () => {
32304
+ onFormValuesChange((x) => {
32305
+ var f, C;
32218
32306
  if (t.interface === "m2o") {
32219
- const h = extractLastNonNullValueObjects((p = d.values) == null ? void 0 : p[i.name]);
32307
+ const S = extractLastNonNullValueObjects((f = x.values) == null ? void 0 : f[i.name]);
32220
32308
  setTimeout(() => {
32221
- d.setValuesIn(i.name, h), e.onChange(h), r.value = h;
32309
+ x.setValuesIn(i.name, S), r.value = S;
32222
32310
  });
32223
32311
  } else {
32224
- const h = extractLastNonNullValueObjects((m = d.values) == null ? void 0 : m.select_array).filter(
32225
- (x) => x && Object.keys(x).length > 0
32312
+ const S = extractLastNonNullValueObjects((C = x.values) == null ? void 0 : C.select_array).filter(
32313
+ (b) => b && Object.keys(b).length > 0
32226
32314
  );
32227
32315
  setTimeout(() => {
32228
- r.value = h, e.onChange(h);
32316
+ r.value = S;
32229
32317
  });
32230
32318
  }
32231
32319
  });
32232
32320
  }), () => {
32233
- o.removeEffects(u);
32321
+ o.removeEffects(h);
32234
32322
  };
32235
32323
  }, []);
32236
- const c = {
32324
+ const p = {
32237
32325
  type: "object",
32238
32326
  properties: {
32239
32327
  select_array: {
32240
32328
  type: "array",
32241
32329
  "x-component": "ArrayItems",
32242
32330
  "x-decorator": "FormItem",
32243
- default: Array.isArray(r.value) && r.value.length > 0 ? r.value : [{}],
32331
+ default: Array.isArray(c) && c.length > 0 ? c : [{}],
32244
32332
  items: {
32245
32333
  type: "void",
32246
32334
  "x-component": "Space",
@@ -32273,18 +32361,18 @@ const InternalFileManager = (e) => {
32273
32361
  }
32274
32362
  }
32275
32363
  };
32276
- return /* @__PURE__ */ jsx(FormProvider$1, { form: o, children: t.interface === "m2o" ? /* @__PURE__ */ jsx(
32364
+ return !a && /* @__PURE__ */ jsx(FormProvider$1, { form: o, children: t.interface === "m2o" ? /* @__PURE__ */ jsx(
32277
32365
  SchemaComponent,
32278
32366
  {
32279
32367
  components: { FormItem: FormItem$1 },
32280
32368
  schema: v(g({}, i), {
32281
- default: r.value,
32369
+ default: c,
32282
32370
  title: "",
32283
32371
  "x-component": AssociationCascadeSelect,
32284
32372
  "x-component-props": g({}, e)
32285
32373
  })
32286
32374
  }
32287
- ) : /* @__PURE__ */ jsx(SchemaField, { schema: c }) });
32375
+ ) : /* @__PURE__ */ jsx(SchemaField, { schema: p }) });
32288
32376
  },
32289
32377
  { displayName: "InternalCascadeSelect" }
32290
32378
  );
@@ -32353,7 +32441,6 @@ const InternalNesterCss = css`
32353
32441
  css`
32354
32442
  .nb-grid-container {
32355
32443
  height: 100% !important;
32356
- margin-bottom: 0px;
32357
32444
  }
32358
32445
  `
32359
32446
  ),
@@ -32394,7 +32481,7 @@ const InternalNesterCss = css`
32394
32481
  });
32395
32482
  }, InternalPicker = observer$1(
32396
32483
  (e) => {
32397
- var V;
32484
+ var O;
32398
32485
  const z = e, { value: t, multiple: o, openSize: n, onChange: r, quickUpload: i, selectFile: a, shouldMountElement: l } = z, c = H(z, ["value", "multiple", "openSize", "onChange", "quickUpload", "selectFile", "shouldMountElement"]), u = useField(), d = useFieldNames$1(e), [p, m] = useState(!1), h = useFieldSchema(), x = useInsertSchema("Selector"), { options: f } = useAssociationFieldContext(), { collectionName: C } = useFormBlockContext(), S = useCompile(), b = useLabelUiSchema$1(f, (d == null ? void 0 : d.label) || "label"), y = h["x-add-new"], [F, I] = useState([]), k = useCollectionRecordData(), A = useMemo(() => t && Object.keys(t).length > 0 ? (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((j) => {
32399
32486
  const B = j == null ? void 0 : j[d.label];
32400
32487
  return v(g({}, j), {
@@ -32480,7 +32567,7 @@ const InternalNesterCss = css`
32480
32567
  ActionContextProvider,
32481
32568
  {
32482
32569
  value: {
32483
- openSize: ((V = h["x-component-props"]) == null ? void 0 : V.openSize) || n,
32570
+ openSize: ((O = h["x-component-props"]) == null ? void 0 : O.openSize) || n,
32484
32571
  openMode: "drawer",
32485
32572
  visible: p,
32486
32573
  setVisible: m
@@ -32514,55 +32601,48 @@ function isObject(e) {
32514
32601
  }
32515
32602
  const ReadPrettyInternalViewer = observer$1(
32516
32603
  (e) => {
32517
- var E;
32518
- const t = useFieldSchema(), o = useRecord(), { getCollection: n } = useCollectionManager_deprecated(), { enableLink: r } = t["x-component-props"] || {}, i = useField(), a = useFieldNames$1(e), [l, c] = useState(!1), u = useInsertSchema("Viewer"), { options: d } = useAssociationFieldContext(), [p, m] = useState({}), h = useCompile(), { designable: x } = useDesignable(), { snapshot: f } = useActionContext(), C = n(d == null ? void 0 : d.target), S = (C == null ? void 0 : C.template) === "tree", b = useRef(), y = useLabelUiSchemaV2(), [F, I] = useState(!1), { t: k } = useTranslation(), w = /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, ref: b, children: toArr$3(e.value).map((z, V, R) => {
32519
- const j = z == null ? void 0 : z[(a == null ? void 0 : a.label) || "label"], B = S ? transformNestedData(z).map((q) => q == null ? void 0 : q[(a == null ? void 0 : a.label) || "label"]).join(" / ") : isObject(j) ? JSON.stringify(j) : j, T = toValue$4(h(B), "N/A"), D = y(
32520
- (z == null ? void 0 : z.__collection) || (d == null ? void 0 : d.target),
32604
+ var N;
32605
+ const t = useFieldSchema(), o = useRecord(), { getCollection: n } = useCollectionManager_deprecated(), { enableLink: r } = t["x-component-props"] || {}, i = useField(), a = useFieldNames$1(e), [l, c] = useState(!1), u = useInsertSchema("Viewer"), { options: d } = useAssociationFieldContext(), [p, m] = useState({}), h = useCompile(), { designable: x } = useDesignable(), { snapshot: f } = useActionContext(), C = n(d == null ? void 0 : d.target), S = (C == null ? void 0 : C.template) === "tree", b = useRef(), y = useLabelUiSchemaV2(), [F, I] = useState(!1);
32606
+ useTranslation();
32607
+ const A = /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, ref: b, children: toArr$3(e.value).map((E, z, O) => {
32608
+ const R = E == null ? void 0 : E[(a == null ? void 0 : a.label) || "label"], j = S ? transformNestedData(E).map(($) => $ == null ? void 0 : $[(a == null ? void 0 : a.label) || "label"]).join(" / ") : isObject(R) ? JSON.stringify(R) : R, B = toValue$4(h(j), "N/A"), T = y(
32609
+ (E == null ? void 0 : E.__collection) || (d == null ? void 0 : d.target),
32521
32610
  (a == null ? void 0 : a.label) || "label"
32522
- ), $ = getLabelFormatValue$1(h(D), T, !0);
32611
+ ), D = getLabelFormatValue$1(h(T), B, !0);
32523
32612
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
32524
- /* @__PURE__ */ jsx("span", { children: f ? $ : r !== !1 ? /* @__PURE__ */ jsx(
32613
+ /* @__PURE__ */ jsx("span", { children: f ? D : r !== !1 ? /* @__PURE__ */ jsx(
32525
32614
  "a",
32526
32615
  {
32527
32616
  onMouseEnter: () => {
32528
32617
  I(!0);
32529
32618
  },
32530
- onClick: (q) => {
32531
- var L;
32532
- I(!0), q.stopPropagation(), q.preventDefault(), x && u(schema$1.Viewer), c(!0), m(z), (L = b == null ? void 0 : b.current) == null || L.setPopoverVisible(!1);
32619
+ onClick: ($) => {
32620
+ var q;
32621
+ I(!0), $.stopPropagation(), $.preventDefault(), x && u(schema$1.Viewer), c(!0), m(E), (q = b == null ? void 0 : b.current) == null || q.setPopoverVisible(!1);
32533
32622
  },
32534
- children: $
32623
+ children: D
32535
32624
  }
32536
- ) : $ }),
32537
- V < R.length - 1 ? /* @__PURE__ */ jsx("span", { style: { marginRight: 4, color: "#aaa" }, children: "," }) : null
32538
- ] }, `${z == null ? void 0 : z.id}_${V}`);
32625
+ ) : D }),
32626
+ z < O.length - 1 ? /* @__PURE__ */ jsx("span", { style: { marginRight: 4, color: "#aaa" }, children: "," }) : null
32627
+ ] }, `${E == null ? void 0 : E.id}_${z}`);
32539
32628
  }) });
32540
32629
  if (r === !1 || !F)
32541
- return w;
32542
- const M = () => /* @__PURE__ */ jsx(
32543
- DeclareVariable,
32630
+ return A;
32631
+ const w = () => /* @__PURE__ */ jsx(VariablePopupRecordProvider, { recordData: p, collection: C, children: /* @__PURE__ */ jsx(WithoutTableFieldResource.Provider, { value: !0, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(
32632
+ RecursionField,
32544
32633
  {
32545
- name: "$nPopupRecord",
32546
- title: k("Current popup record"),
32547
- value: p,
32548
- collection: C,
32549
- children: /* @__PURE__ */ jsx(WithoutTableFieldResource.Provider, { value: !0, children: /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(
32550
- RecursionField,
32551
- {
32552
- schema: t,
32553
- onlyRenderProperties: !0,
32554
- basePath: i.address,
32555
- filterProperties: (z) => z["x-component"] === "AssociationField.Viewer"
32556
- }
32557
- ) }) })
32634
+ schema: t,
32635
+ onlyRenderProperties: !0,
32636
+ basePath: i.address,
32637
+ filterProperties: (E) => E["x-component"] === "AssociationField.Viewer"
32558
32638
  }
32559
- ), N = () => {
32560
- var V;
32561
- const z = (V = t == null ? void 0 : t["x-collection-field"]) == null ? void 0 : V.split(".");
32562
- return z && z.length > 2 ? /* @__PURE__ */ jsx(RecordProvider, { record: p, parent: o[z[1]], children: M() }) : /* @__PURE__ */ jsx(RecordProvider, { record: p, parent: o, children: M() });
32639
+ ) }) }) }), M = () => {
32640
+ var z;
32641
+ const E = (z = t == null ? void 0 : t["x-collection-field"]) == null ? void 0 : z.split(".");
32642
+ return E && E.length > 2 ? /* @__PURE__ */ jsx(RecordProvider, { record: p, parent: o[E[1]], children: w() }) : /* @__PURE__ */ jsx(RecordProvider, { record: p, parent: o, children: w() });
32563
32643
  };
32564
- return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(BlockAssociationContext.Provider, { value: `${d == null ? void 0 : d.collectionName}.${d == null ? void 0 : d.name}`, children: /* @__PURE__ */ jsxs(CollectionProvider_deprecated, { name: (E = d == null ? void 0 : d.target) != null ? E : d == null ? void 0 : d.targetCollection, children: [
32565
- w,
32644
+ return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(BlockAssociationContext.Provider, { value: `${d == null ? void 0 : d.collectionName}.${d == null ? void 0 : d.name}`, children: /* @__PURE__ */ jsxs(CollectionProvider_deprecated, { name: (N = d == null ? void 0 : d.target) != null ? N : d == null ? void 0 : d.targetCollection, children: [
32645
+ A,
32566
32646
  /* @__PURE__ */ jsx(
32567
32647
  ActionContextProvider,
32568
32648
  {
@@ -32573,7 +32653,7 @@ const ReadPrettyInternalViewer = observer$1(
32573
32653
  snapshot: (d == null ? void 0 : d.interface) === "snapshot",
32574
32654
  fieldSchema: t
32575
32655
  },
32576
- children: N()
32656
+ children: M()
32577
32657
  }
32578
32658
  )
32579
32659
  ] }) }) });
@@ -32994,7 +33074,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
32994
33074
  const { onClick: l } = useAssociationCreateActionProps(), c = useField(), { getPrimaryKey: u } = useCollection_deprecated(), d = u();
32995
33075
  return {
32996
33076
  onClick() {
32997
- return O(this, null, function* () {
33077
+ return V(this, null, function* () {
32998
33078
  var h, x;
32999
33079
  yield l();
33000
33080
  const { data: m } = ((x = (h = c.data) == null ? void 0 : h.data) == null ? void 0 : x.data) || {};
@@ -33109,7 +33189,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
33109
33189
  ), toValue$3 = (e, t) => e == null ? t : e, ReadPrettyInternalTag = observer$1(
33110
33190
  (e) => {
33111
33191
  var E;
33112
- const t = useFieldSchema(), o = useRecord(), { enableLink: n, tagColorField: r } = t["x-component-props"], i = useField(), a = useFieldNames$1(e), [l, c] = useState(!1), u = useInsertSchema("Viewer"), { options: d } = useAssociationFieldContext(), [p, m] = useState({}), h = useCompile(), { designable: x } = useDesignable(), f = useLabelUiSchema$1(d, (a == null ? void 0 : a.label) || "label"), { snapshot: C } = useActionContext(), S = useRef(), { getCollection: b } = useCollectionManager_deprecated(), y = b(d == null ? void 0 : d.target), F = (y == null ? void 0 : y.template) === "tree", [I, k] = useState(!1), w = /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, ref: S, children: toArr$3(e.value).map((z, V, R) => {
33192
+ const t = useFieldSchema(), o = useRecord(), { enableLink: n, tagColorField: r } = t["x-component-props"], i = useField(), a = useFieldNames$1(e), [l, c] = useState(!1), u = useInsertSchema("Viewer"), { options: d } = useAssociationFieldContext(), [p, m] = useState({}), h = useCompile(), { designable: x } = useDesignable(), f = useLabelUiSchema$1(d, (a == null ? void 0 : a.label) || "label"), { snapshot: C } = useActionContext(), S = useRef(), { getCollection: b } = useCollectionManager_deprecated(), y = b(d == null ? void 0 : d.target), F = (y == null ? void 0 : y.template) === "tree", [I, k] = useState(!1), w = /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, ref: S, children: toArr$3(e.value).map((z, O, R) => {
33113
33193
  const j = z == null ? void 0 : z[(a == null ? void 0 : a.label) || "label"], B = F ? transformNestedData(z).map(($) => $ == null ? void 0 : $[(a == null ? void 0 : a.label) || "label"]).join(" / ") : isObject(j) ? JSON.stringify(j) : j, T = toValue$3(h(B), "N/A"), D = getTabFormatValue(h(f), T, z[r]);
33114
33194
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
33115
33195
  /* @__PURE__ */ jsx("span", { children: C ? D : n !== !1 ? /* @__PURE__ */ jsx(
@@ -33125,8 +33205,8 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
33125
33205
  children: D
33126
33206
  }
33127
33207
  ) : D }),
33128
- V < R.length - 1 ? /* @__PURE__ */ jsx("span", { style: { marginRight: 4, color: "#aaa" }, children: "," }) : null
33129
- ] }, `${z == null ? void 0 : z[a.value]}_${V}`);
33208
+ O < R.length - 1 ? /* @__PURE__ */ jsx("span", { style: { marginRight: 4, color: "#aaa" }, children: "," }) : null
33209
+ ] }, `${z == null ? void 0 : z[a.value]}_${O}`);
33130
33210
  }) });
33131
33211
  if (n === !1 || !I)
33132
33212
  return w;
@@ -33139,8 +33219,8 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
33139
33219
  filterProperties: (z) => z["x-component"] === "AssociationField.Viewer"
33140
33220
  }
33141
33221
  ) }) }), N = () => {
33142
- var V;
33143
- const z = (V = t == null ? void 0 : t["x-collection-field"]) == null ? void 0 : V.split(".");
33222
+ var O;
33223
+ const z = (O = t == null ? void 0 : t["x-collection-field"]) == null ? void 0 : O.split(".");
33144
33224
  return z && z.length > 2 ? /* @__PURE__ */ jsx(RecordProvider, { record: p, parent: o[z[1]], children: M() }) : /* @__PURE__ */ jsx(RecordProvider, { record: p, parent: o, children: M() });
33145
33225
  };
33146
33226
  return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(BlockAssociationContext.Provider, { value: `${d == null ? void 0 : d.collectionName}.${d == null ? void 0 : d.name}`, children: /* @__PURE__ */ jsxs(CollectionProvider_deprecated, { name: (E = d == null ? void 0 : d.target) != null ? E : d == null ? void 0 : d.targetCollection, children: [
@@ -33325,10 +33405,11 @@ const useTableColumns$1 = (e) => {
33325
33405
  top: 50%;
33326
33406
  transform: translateY(-50%);
33327
33407
  }
33408
+ `, floatLeftClass = css`
33409
+ float: left;
33328
33410
  `, rowSelectCheckboxWrapperClass = css`
33329
33411
  position: relative;
33330
33412
  display: flex;
33331
- float: left;
33332
33413
  align-items: center;
33333
33414
  justify-content: space-evenly;
33334
33415
  padding-right: 8px;
@@ -33363,8 +33444,8 @@ const useTableColumns$1 = (e) => {
33363
33444
  }
33364
33445
  `, HeaderWrapperComponent = (e) => /* @__PURE__ */ jsx(DndContext, { children: /* @__PURE__ */ jsx("thead", g({}, e)) }), HeaderCellComponent = (e) => /* @__PURE__ */ jsx("th", v(g({}, e), { className: cls(e.className, headerClass) })), BodyRowComponent = (e) => /* @__PURE__ */ jsx(SortableRow, g({}, e)), Table$1 = withDynamicSchemaProps(
33365
33446
  observer$1((e) => {
33366
- var he, ge, xe, fe;
33367
- const { token: t } = useToken(), pe = omit$1(e, ["onBlur", "onFocus", "value"]), { pagination: o, useProps: n } = pe, r = H(pe, ["pagination", "useProps"]), ye = (n == null ? void 0 : n()) || {}, { pagination: i } = ye, a = H(ye, ["pagination"]), me = g(g({}, r), a), {
33447
+ var me, he, ge, xe;
33448
+ const { token: t } = useToken(), ye = omit$1(e, ["onBlur", "onFocus", "value"]), { pagination: o, useProps: n } = ye, r = H(ye, ["pagination", "useProps"]), de = (n == null ? void 0 : n()) || {}, { pagination: i } = de, a = H(de, ["pagination"]), pe = g(g({}, r), a), {
33368
33449
  dragSort: l = !1,
33369
33450
  showIndex: c = !0,
33370
33451
  onRowSelectionChange: u,
@@ -33375,7 +33456,7 @@ const useTableColumns$1 = (e) => {
33375
33456
  onExpand: x,
33376
33457
  loading: f,
33377
33458
  onClickRow: C
33378
- } = me, S = H(me, [
33459
+ } = pe, S = H(pe, [
33379
33460
  "dragSort",
33380
33461
  "showIndex",
33381
33462
  "onRowSelectionChange",
@@ -33386,8 +33467,8 @@ const useTableColumns$1 = (e) => {
33386
33467
  "onExpand",
33387
33468
  "loading",
33388
33469
  "onClickRow"
33389
- ]), b = useArrayField(S), y = useTableColumns$1(S), F = useFieldSchema(), I = useCollection(), A = ((he = F == null ? void 0 : F.parent) == null ? void 0 : he["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: w, allIncludesChildren: M } = A, N = useMemoizedFn(S.onRowDragEnd || (() => {
33390
- })), E = usePaginationProps$1(o, i), [z, V] = useState(() => w ? M : []), [R, j] = useState(((ge = b == null ? void 0 : b.data) == null ? void 0 : ge.selectedRowKeys) || []), [B, T] = useState([]), D = (p == null ? void 0 : p.type) !== "none", $ = useRef(/* @__PURE__ */ new Map()), q = useMemo(() => css`
33470
+ ]), b = useArrayField(S), y = useTableColumns$1(S), F = useFieldSchema(), I = useCollection(), A = ((me = F == null ? void 0 : F.parent) == null ? void 0 : me["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: w, allIncludesChildren: M } = A, N = useMemoizedFn(S.onRowDragEnd || (() => {
33471
+ })), E = usePaginationProps$1(o, i), [z, O] = useState(() => w ? M : []), [R, j] = useState(((he = b == null ? void 0 : b.data) == null ? void 0 : he.selectedRowKeys) || []), [B, T] = useState([]), D = (p == null ? void 0 : p.type) !== "none", $ = useRef(/* @__PURE__ */ new Map()), q = useMemo(() => css`
33391
33472
  & > td {
33392
33473
  background-color: ${t.controlItemBgActiveHover} !important;
33393
33474
  }
@@ -33397,58 +33478,58 @@ const useTableColumns$1 = (e) => {
33397
33478
  `, [t.controlItemBgActiveHover]), L = useMemo(
33398
33479
  () => C ? q : "",
33399
33480
  [C, t.controlItemBgActiveHover]
33400
- ), G = useMemo(() => C ? (Z) => ({
33401
- onClick: (te) => {
33402
- isPortalInBody(te.target) || C(Z, T, B);
33481
+ ), G = useMemo(() => C ? (ee) => ({
33482
+ onClick: (Z) => {
33483
+ isPortalInBody(Z.target) || C(ee, T, B);
33403
33484
  }
33404
33485
  }) : null, [C, B]);
33405
33486
  useDeepCompareEffect(() => {
33406
- const Z = w ? M : [];
33407
- _.isEqual(Z, z) || V(Z);
33487
+ const ee = w ? M : [];
33488
+ _.isEqual(ee, z) || O(ee);
33408
33489
  }, [w, M]);
33409
- const U = useCallback((Z) => {
33410
- if (Z.key)
33411
- return Z.key;
33412
- if ($.current.has(Z))
33413
- return $.current.get(Z);
33414
- const te = uid();
33415
- return $.current.set(Z, te), te;
33490
+ const U = useCallback((ee) => {
33491
+ if (ee.key)
33492
+ return ee.key;
33493
+ if ($.current.has(ee))
33494
+ return $.current.get(ee);
33495
+ const Z = uid();
33496
+ return $.current.set(ee, Z), Z;
33416
33497
  }, []), K = useCallback(
33417
- (Z) => {
33418
- var te, ee;
33419
- return typeof m == "string" ? (te = Z[m]) == null ? void 0 : te.toString() : (ee = (m != null ? m : U)(Z)) == null ? void 0 : ee.toString();
33498
+ (ee) => {
33499
+ var Z, ne;
33500
+ return typeof m == "string" ? (Z = ee[m]) == null ? void 0 : Z.toString() : (ne = (m != null ? m : U)(ee)) == null ? void 0 : ne.toString();
33420
33501
  },
33421
33502
  [m, U]
33422
- ), Y = (xe = b == null ? void 0 : b.value) == null ? void 0 : xe.map(K), W = useMemo(() => Y, [JSON.stringify(Y)]), X = useMemo(
33503
+ ), Y = (ge = b == null ? void 0 : b.value) == null ? void 0 : ge.map(K), W = useMemo(() => Y, [JSON.stringify(Y)]), X = useMemo(
33423
33504
  () => [...(b == null ? void 0 : b.value) || []].filter(Boolean),
33424
- [b == null ? void 0 : b.value, (fe = b == null ? void 0 : b.value) == null ? void 0 : fe.length, W]
33425
- ), Q = useMemo(() => (Z) => /* @__PURE__ */ jsx(
33505
+ [b == null ? void 0 : b.value, (xe = b == null ? void 0 : b.value) == null ? void 0 : xe.length, W]
33506
+ ), Q = useMemo(() => (ee) => /* @__PURE__ */ jsx(
33426
33507
  DndContext,
33427
33508
  {
33428
- onDragEnd: (te) => {
33429
- var Ce, Se, Te, we, Re, De;
33430
- if (!te.active || !te.over) {
33509
+ onDragEnd: (Z) => {
33510
+ var fe, Ce, Te, we, Re, De;
33511
+ if (!Z.active || !Z.over) {
33431
33512
  console.warn("move cancel");
33432
33513
  return;
33433
33514
  }
33434
- const ee = (Te = (Se = (Ce = te.active) == null ? void 0 : Ce.data.current) == null ? void 0 : Se.sortable) == null ? void 0 : Te.index, se = (De = (Re = (we = te.over) == null ? void 0 : we.data.current) == null ? void 0 : Re.sortable) == null ? void 0 : De.index, ae = b.value[ee] || te.active, ue = b.value[se] || te.over;
33435
- b.move(ee, se), N({ from: ae, to: ue });
33515
+ const ne = (Te = (Ce = (fe = Z.active) == null ? void 0 : fe.data.current) == null ? void 0 : Ce.sortable) == null ? void 0 : Te.index, ie = (De = (Re = (we = Z.over) == null ? void 0 : we.data.current) == null ? void 0 : Re.sortable) == null ? void 0 : De.index, le = b.value[ne] || Z.active, Ae = b.value[ie] || Z.over;
33516
+ b.move(ne, ie), N({ from: le, to: Ae });
33436
33517
  },
33437
- children: /* @__PURE__ */ jsx("tbody", g({}, Z))
33518
+ children: /* @__PURE__ */ jsx("tbody", g({}, ee))
33438
33519
  }
33439
33520
  ), [N, b]), J = useCallback(
33440
- (Z) => {
33441
- var ae;
33442
- const te = (ae = Z.className) == null ? void 0 : ae.includes("selection-column"), { ref: ee, inView: se } = useInView({
33521
+ (ee) => {
33522
+ var le;
33523
+ const Z = (le = ee.className) == null ? void 0 : le.includes("selection-column"), { ref: ne, inView: ie } = useInView({
33443
33524
  threshold: 0,
33444
33525
  triggerOnce: !0,
33445
- initialInView: te || !1 || X.length <= 10,
33446
- skip: te || !1
33526
+ initialInView: Z || !1 || X.length <= 10,
33527
+ skip: Z || !1
33447
33528
  });
33448
- return /* @__PURE__ */ jsx("td", v(g({}, Z), { ref: ee, className: cls(Z.className, cellClass), children: se || te ? Z.children : /* @__PURE__ */ jsx(Skeleton.Button, { style: { height: "100%" } }) }));
33529
+ return /* @__PURE__ */ jsx("td", v(g({}, ee), { ref: ne, className: cls(ee.className, cellClass), children: ie || Z ? ee.children : /* @__PURE__ */ jsx(Skeleton.Button, { style: { height: "100%" } }) }));
33449
33530
  },
33450
33531
  [X.length]
33451
- ), oe = useMemo(() => ({
33532
+ ), te = useMemo(() => ({
33452
33533
  header: {
33453
33534
  wrapper: HeaderWrapperComponent,
33454
33535
  cell: HeaderCellComponent
@@ -33458,56 +33539,56 @@ const useTableColumns$1 = (e) => {
33458
33539
  row: BodyRowComponent,
33459
33540
  cell: J
33460
33541
  }
33461
- }), [J, Q]), ne = useMemo(() => p, [JSON.stringify(p)]), re = useMemo(
33542
+ }), [J, Q]), oe = useMemo(() => p, [JSON.stringify(p)]), re = useMemo(
33462
33543
  () => ({
33463
- rowSelection: ne ? g({
33544
+ rowSelection: oe ? g({
33464
33545
  type: "checkbox",
33465
33546
  selectedRowKeys: R,
33466
- onChange(Z, te) {
33467
- b.data = b.data || {}, b.data.selectedRowKeys = Z, j(Z), u == null || u(Z, te);
33547
+ onChange(ee, Z) {
33548
+ b.data = b.data || {}, b.data.selectedRowKeys = ee, j(ee), u == null || u(ee, Z);
33468
33549
  },
33469
- getCheckboxProps(Z) {
33550
+ getCheckboxProps(ee) {
33470
33551
  return {
33471
33552
  "aria-label": "checkbox"
33472
33553
  };
33473
33554
  },
33474
- renderCell: (Z, te, ee, se) => {
33475
- var Ce, Se;
33555
+ renderCell: (ee, Z, ne, ie) => {
33556
+ var fe, Ce;
33476
33557
  if (!l && !c)
33477
- return se;
33478
- const ae = (Ce = e == null ? void 0 : e.pagination) == null ? void 0 : Ce.current, ue = ((Se = e == null ? void 0 : e.pagination) == null ? void 0 : Se.pageSize) || 20;
33479
- return ae ? ee = ee + (ae - 1) * ue + 1 : ee = ee + 1, te.__index && (ee = extractIndex(te.__index)), /* @__PURE__ */ jsxs(
33558
+ return ie;
33559
+ const le = (fe = e == null ? void 0 : e.pagination) == null ? void 0 : fe.current, Ae = ((Ce = e == null ? void 0 : e.pagination) == null ? void 0 : Ce.pageSize) || 20;
33560
+ return le ? ne = ne + (le - 1) * Ae + 1 : ne = ne + 1, Z.__index && (ne = extractIndex(Z.__index)), /* @__PURE__ */ jsxs(
33480
33561
  "div",
33481
33562
  {
33482
33563
  role: "button",
33483
- "aria-label": `table-index-${ee}`,
33484
- className: cls(Z ? "checked" : null, rowSelectCheckboxWrapperClass, {
33564
+ "aria-label": `table-index-${ne}`,
33565
+ className: cls(ee ? "checked" : floatLeftClass, rowSelectCheckboxWrapperClass, {
33485
33566
  [rowSelectCheckboxWrapperClassHover]: D
33486
33567
  }),
33487
33568
  children: [
33488
- /* @__PURE__ */ jsxs("div", { className: cls(Z ? "checked" : null, rowSelectCheckboxContentClass), children: [
33489
- l && /* @__PURE__ */ jsx(SortHandle$1, { id: K(te) }),
33490
- c && /* @__PURE__ */ jsx(TableIndex$2, { index: ee })
33569
+ /* @__PURE__ */ jsxs("div", { className: cls(ee ? "checked" : null, rowSelectCheckboxContentClass), children: [
33570
+ l && /* @__PURE__ */ jsx(SortHandle$1, { id: K(Z) }),
33571
+ c && /* @__PURE__ */ jsx(TableIndex$2, { index: ne })
33491
33572
  ] }),
33492
33573
  D && /* @__PURE__ */ jsx(
33493
33574
  "div",
33494
33575
  {
33495
33576
  className: cls(
33496
33577
  "nb-origin-node",
33497
- Z ? "checked" : null,
33578
+ ee ? "checked" : null,
33498
33579
  rowSelectCheckboxCheckedClassHover
33499
33580
  ),
33500
- children: se
33581
+ children: ie
33501
33582
  }
33502
33583
  )
33503
33584
  ]
33504
33585
  }
33505
33586
  );
33506
33587
  }
33507
- }, ne) : void 0
33588
+ }, oe) : void 0
33508
33589
  }),
33509
33590
  [
33510
- ne,
33591
+ oe,
33511
33592
  R,
33512
33593
  u,
33513
33594
  c,
@@ -33515,38 +33596,38 @@ const useTableColumns$1 = (e) => {
33515
33596
  b,
33516
33597
  K,
33517
33598
  D,
33518
- ne
33599
+ oe
33519
33600
  ]
33520
- ), ie = useCallback(
33521
- ({ children: Z }) => {
33522
- var te, ee;
33601
+ ), se = useCallback(
33602
+ ({ children: ee }) => {
33603
+ var Z, ne;
33523
33604
  return l ? React.createElement(
33524
33605
  SortableContext$1,
33525
33606
  {
33526
- items: ((ee = (te = b.value) == null ? void 0 : te.map) == null ? void 0 : ee.call(te, K)) || []
33607
+ items: ((ne = (Z = b.value) == null ? void 0 : Z.map) == null ? void 0 : ne.call(Z, K)) || []
33527
33608
  },
33528
- Z
33529
- ) : React.createElement(React.Fragment, {}, Z);
33609
+ ee
33610
+ ) : React.createElement(React.Fragment, {}, ee);
33530
33611
  },
33531
33612
  [b, l, K]
33532
- ), { height: le, tableSizeRefCallback: Pe } = useTableSize(), ce = useMemo(() => ({
33613
+ ), { height: ae, tableSizeRefCallback: ce } = useTableSize(), ue = useMemo(() => ({
33533
33614
  x: "max-content"
33534
- }), []), de = useMemo(() => ({
33615
+ }), []), Pe = useMemo(() => ({
33535
33616
  x: "max-content",
33536
- y: le
33537
- }), [le, ce]), Ie = useCallback(
33538
- (Z) => B.includes(Z[m]) ? L : "",
33617
+ y: ae
33618
+ }), [ae, ue]), Ie = useCallback(
33619
+ (ee) => B.includes(ee[m]) ? L : "",
33539
33620
  [B, L, m]
33540
- ), be = useCallback(
33541
- (Z, te) => {
33542
- const ee = Z ? [...z, te[I.getPrimaryKey()]] : z.filter((se) => te[I.getPrimaryKey()] !== se);
33543
- V(ee), x == null || x(Z, te);
33621
+ ), Se = useCallback(
33622
+ (ee, Z) => {
33623
+ const ne = ee ? [...z, Z[I.getPrimaryKey()]] : z.filter((ie) => Z[I.getPrimaryKey()] !== ie);
33624
+ O(ne), x == null || x(ee, Z);
33544
33625
  },
33545
33626
  [z, x, I]
33546
- ), Ae = useMemo(() => ({
33547
- onExpand: be,
33627
+ ), be = useMemo(() => ({
33628
+ onExpand: Se,
33548
33629
  expandedRowKeys: z
33549
- }), [z, be]);
33630
+ }), [z, Se]);
33550
33631
  return /* @__PURE__ */ jsxs(
33551
33632
  "div",
33552
33633
  {
@@ -33562,7 +33643,7 @@ const useTableColumns$1 = (e) => {
33562
33643
  display: flex;
33563
33644
  flex-direction: column;
33564
33645
  .ant-table-body {
33565
- min-height: ${le}px;
33646
+ min-height: ${ae}px;
33566
33647
  }
33567
33648
  }
33568
33649
  }
@@ -33573,26 +33654,26 @@ const useTableColumns$1 = (e) => {
33573
33654
  }
33574
33655
  `,
33575
33656
  children: [
33576
- /* @__PURE__ */ jsx(ie, { children: /* @__PURE__ */ jsx(
33657
+ /* @__PURE__ */ jsx(se, { children: /* @__PURE__ */ jsx(
33577
33658
  MemoizedAntdTable,
33578
33659
  v(g(g({
33579
- ref: Pe,
33660
+ ref: ce,
33580
33661
  rowKey: m != null ? m : U,
33581
33662
  dataSource: X,
33582
33663
  tableLayout: "auto"
33583
33664
  }, S), re), {
33584
33665
  loading: f,
33585
33666
  pagination: E,
33586
- components: oe,
33667
+ components: te,
33587
33668
  onChange: d,
33588
33669
  onRow: G,
33589
33670
  rowClassName: Ie,
33590
- scroll: de,
33671
+ scroll: Pe,
33591
33672
  columns: y,
33592
- expandable: Ae
33673
+ expandable: be
33593
33674
  })
33594
33675
  ) }),
33595
- b.errors.length > 0 && /* @__PURE__ */ jsx("div", { className: "ant-formily-item-error-help ant-formily-item-help ant-formily-item-help-enter ant-formily-item-help-enter-active", children: b.errors.map((Z) => Z.messages.map((te) => /* @__PURE__ */ jsx("div", { children: te }, te))) })
33676
+ b.errors.length > 0 && /* @__PURE__ */ jsx("div", { className: "ant-formily-item-error-help ant-formily-item-help ant-formily-item-help-enter ant-formily-item-help-enter-active", children: b.errors.map((ee) => ee.messages.map((Z) => /* @__PURE__ */ jsx("div", { children: Z }, Z))) })
33596
33677
  ]
33597
33678
  }
33598
33679
  );
@@ -33874,8 +33955,8 @@ AssociationSelect.Designer = function e() {
33874
33955
  label: f((X = W == null ? void 0 : W.uiSchema) == null ? void 0 : X.title) || (W == null ? void 0 : W.name)
33875
33956
  };
33876
33957
  });
33877
- let V = "editable";
33878
- u["x-disabled"] === !0 && (V = "readonly"), u["x-read-pretty"] === !0 && (V = "read-pretty");
33958
+ let O = "editable";
33959
+ u["x-disabled"] === !0 && (O = "readonly"), u["x-read-pretty"] === !0 && (O = "read-pretty");
33879
33960
  const R = _.omit(u, "required");
33880
33961
  return /* @__PURE__ */ jsxs(GeneralSchemaDesigner, { children: [
33881
33962
  /* @__PURE__ */ jsx(GeneralSchemaItems, {}),
@@ -33966,17 +34047,17 @@ AssociationSelect.Designer = function e() {
33966
34047
  }
33967
34048
  },
33968
34049
  onSubmit: (W) => {
33969
- var oe;
34050
+ var te;
33970
34051
  const X = [];
33971
- for (const ne of W.rules)
33972
- X.push(_.pickBy(ne, _.identity));
34052
+ for (const oe of W.rules)
34053
+ X.push(_.pickBy(oe, _.identity));
33973
34054
  const Q = {
33974
34055
  "x-uid": u["x-uid"]
33975
34056
  };
33976
34057
  if (["percent"].includes(b == null ? void 0 : b.interface))
33977
- for (const ne of X)
33978
- (ne.maxValue || ne.minValue) && (ne.percentMode = !0), ne.percentFormat && (ne.percentFormats = !0);
33979
- const J = _.concat([], ((oe = b == null ? void 0 : b.uiSchema) == null ? void 0 : oe["x-validator"]) || [], X);
34058
+ for (const oe of X)
34059
+ (oe.maxValue || oe.minValue) && (oe.percentMode = !0), oe.percentFormat && (oe.percentFormats = !0);
34060
+ const J = _.concat([], ((te = b == null ? void 0 : b.uiSchema) == null ? void 0 : te["x-validator"]) || [], X);
33980
34061
  c.validator = J, u["x-validator"] = X, Q["x-validator"] = X, m.emit("patch", {
33981
34062
  schema: Q
33982
34063
  }), h();
@@ -34188,7 +34269,7 @@ AssociationSelect.Designer = function e() {
34188
34269
  { label: d("Readonly"), value: "readonly" },
34189
34270
  { label: d("Easy-reading"), value: "read-pretty" }
34190
34271
  ],
34191
- value: V,
34272
+ value: O,
34192
34273
  onChange: (W) => {
34193
34274
  const X = {
34194
34275
  "x-uid": u["x-uid"]
@@ -34221,10 +34302,10 @@ AssociationSelect.Designer = function e() {
34221
34302
  options: z,
34222
34303
  value: (Y = (K = c == null ? void 0 : c.componentProps) == null ? void 0 : K.fieldNames) == null ? void 0 : Y.label,
34223
34304
  onChange: (W) => {
34224
- var J, oe;
34305
+ var J, te;
34225
34306
  const X = {
34226
34307
  "x-uid": u["x-uid"]
34227
- }, Q = v(g(g({}, (oe = (J = b == null ? void 0 : b.uiSchema) == null ? void 0 : J["x-component-props"]) == null ? void 0 : oe.fieldNames), c.componentProps.fieldNames), {
34308
+ }, Q = v(g(g({}, (te = (J = b == null ? void 0 : b.uiSchema) == null ? void 0 : J["x-component-props"]) == null ? void 0 : te.fieldNames), c.componentProps.fieldNames), {
34228
34309
  label: W
34229
34310
  });
34230
34311
  c.componentProps.fieldNames = Q, u["x-component-props"] = u["x-component-props"] || {}, u["x-component-props"].fieldNames = Q, X["x-component-props"] = u["x-component-props"], m.emit("patch", {
@@ -34251,7 +34332,7 @@ AssociationSelect.Designer = function e() {
34251
34332
  ] });
34252
34333
  };
34253
34334
  AssociationSelect.FilterDesigner = function e() {
34254
- var I, k, A, w, M, N, E, z, V, R, j;
34335
+ var I, k, A, w, M, N, E, z, O, R, j;
34255
34336
  const { getCollectionFields: t, getInterface: o, getCollectionJoinField: n } = useCollectionManager_deprecated(), { getField: r } = useCollection_deprecated(), { form: i } = useFormBlockContext(), a = 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), x = (I = h == null ? void 0 : h.validateSchema) == null ? void 0 : I.call(h, l), f = (k = m == null ? void 0 : m.uiSchema) == null ? void 0 : k.title, C = m != null && m.target ? t(m == null ? void 0 : m.target) : [];
34256
34337
  a.title === f || a.title;
34257
34338
  const S = useSortFields(m == null ? void 0 : m.target), b = ((M = (w = (A = a.componentProps) == null ? void 0 : A.service) == null ? void 0 : w.params) == null ? void 0 : M.sort) || [], y = b == null ? void 0 : b.map((B) => B.startsWith("-") ? {
@@ -34406,7 +34487,7 @@ AssociationSelect.FilterDesigner = function e() {
34406
34487
  SchemaSettingsDataScope,
34407
34488
  {
34408
34489
  collectionName: m == null ? void 0 : m.target,
34409
- defaultFilter: ((V = (z = (E = a.componentProps) == null ? void 0 : E.service) == null ? void 0 : z.params) == null ? void 0 : V.filter) || {},
34490
+ defaultFilter: ((O = (z = (E = a.componentProps) == null ? void 0 : E.service) == null ? void 0 : z.params) == null ? void 0 : O.filter) || {},
34410
34491
  form: i,
34411
34492
  onSubmit: ({ filter: B }) => {
34412
34493
  B = removeNullCondition(B), _.set(a.componentProps, "service.params.filter", B), l["x-component-props"] = a.componentProps, u.emit("patch", {
@@ -35271,7 +35352,7 @@ const validateJSON = {
35271
35352
  }
35272
35353
  }
35273
35354
  },
35274
- onSubmit: (m) => O(void 0, [m], function* ({ plot: u, title: d, config: p }) {
35355
+ onSubmit: (m) => V(void 0, [m], function* ({ plot: u, title: d, config: p }) {
35275
35356
  n.title = r(d), n.componentProps.plot = u;
35276
35357
  const h = r(JSON.parse(p)), x = h == null ? void 0 : h.data;
35277
35358
  if (typeof x == "function") {
@@ -36242,7 +36323,7 @@ const MarkdownVoidDesigner = () => {
36242
36323
  };
36243
36324
  });
36244
36325
  function parseMarkdown(e) {
36245
- return O(this, null, function* () {
36326
+ return V(this, null, function* () {
36246
36327
  return e && (yield import("./md-1OKMvqVH.mjs")).default.render(e);
36247
36328
  });
36248
36329
  }
@@ -36308,7 +36389,7 @@ function VariableSelect({
36308
36389
  }) {
36309
36390
  const { t: a } = useTranslation(), [l, c] = useState([]), { wrapSSR: u, componentCls: d, hashId: p } = useStyles$5(), { token: m } = useToken();
36310
36391
  function h(x) {
36311
- return O(this, null, function* () {
36392
+ return V(this, null, function* () {
36312
36393
  var C;
36313
36394
  const f = x[x.length - 1];
36314
36395
  !((C = f.children) != null && C.length) && !f.isLeaf && f.loadChildren && (yield f.loadChildren(f), t((S) => [...S]));
@@ -36452,7 +36533,7 @@ const MarkdownEditor = (e) => {
36452
36533
  observer$1((e) => {
36453
36534
  const { isDarkTheme: t } = useGlobalTheme(), { componentCls: o, hashId: n } = useStyles$6({ isDarkTheme: t }), { content: r, className: i } = e, a = useField(), l = useFieldSchema(), { dn: c } = useDesignable(), { onSave: u, onCancel: d, form: p } = e, m = useCollectionRecord(), [h, x] = useState(""), f = useVariables(), C = useLocalVariables(), [S, b] = useState(!1);
36454
36535
  useEffect(() => {
36455
- b(!0), O(void 0, null, function* () {
36536
+ b(!0), V(void 0, null, function* () {
36456
36537
  const k = yield replaceVariableValue(r, f, C), A = yield parseMarkdown(k);
36457
36538
  x(A), b(!1);
36458
36539
  });
@@ -36476,7 +36557,7 @@ const MarkdownEditor = (e) => {
36476
36557
  onCancel: () => {
36477
36558
  a.editable = !1, d == null || d();
36478
36559
  },
36479
- onSubmit: (I) => O(void 0, null, function* () {
36560
+ onSubmit: (I) => V(void 0, null, function* () {
36480
36561
  var k;
36481
36562
  a.editable = !1, (k = l["x-component-props"]) != null || (l["x-component-props"] = {}), l["x-component-props"].content = I, a.componentProps.content = I, u == null || u(l), c.emit("patch", {
36482
36563
  schema: {
@@ -37154,7 +37235,7 @@ const Menu = observer$1(
37154
37235
  "defaultOpenKeys",
37155
37236
  "children"
37156
37237
  ]), { t: d } = useTranslation(), p = useDesigner(), m = useFieldSchema(), { refresh: h } = useDesignable(), x = useAPIClient(), { render: f } = useSchemaInitializerRender(m["x-initializer"], m["x-initializer-props"]), C = useSideMenuRef(), [S, b] = useState(), [y, F] = useState(() => a || (r ? findKeysByUid(m, r) : [])), [I, k] = useState(!1), [A, w] = useState(() => ["inline", "mix"].includes(o) ? l || y : l), M = useMemo(() => {
37157
- var V;
37238
+ var O;
37158
37239
  let z;
37159
37240
  if (n) {
37160
37241
  const R = findKeysByUid(m, n);
@@ -37162,7 +37243,7 @@ const Menu = observer$1(
37162
37243
  } else
37163
37244
  z = (y == null ? void 0 : y[0]) || null;
37164
37245
  if (o === "mix" && z) {
37165
- const R = (V = m.properties) == null ? void 0 : V[z];
37246
+ const R = (O = m.properties) == null ? void 0 : O[z];
37166
37247
  if ((R == null ? void 0 : R["x-component"]) === "Menu.SubMenu")
37167
37248
  return R;
37168
37249
  }
@@ -37710,8 +37791,8 @@ const toValue$1 = (e, t) => e == null ? t : e, ReadPrettyRecordPicker = observer
37710
37791
  "a",
37711
37792
  {
37712
37793
  onClick: (z) => {
37713
- var V;
37714
- z.stopPropagation(), z.preventDefault(), l(!0), p(A), (V = S == null ? void 0 : S.current) == null || V.setPopoverVisible(!1);
37794
+ var O;
37795
+ z.stopPropagation(), z.preventDefault(), l(!0), p(A), (O = S == null ? void 0 : S.current) == null || O.setPopoverVisible(!1);
37715
37796
  },
37716
37797
  children: E
37717
37798
  }
@@ -38493,7 +38574,7 @@ const useStyles$3 = genStyleHook("nb-rich-text", (e) => {
38493
38574
  return /* @__PURE__ */ jsx("div", v(g({ className: cls("nb-table-index"), style: { padding: "0 8px 0 16px" } }, o), { children: t + 1 }));
38494
38575
  }, useDefAction = () => ({
38495
38576
  move() {
38496
- return O(this, null, function* () {
38577
+ return V(this, null, function* () {
38497
38578
  });
38498
38579
  }
38499
38580
  }), TableArray = observer$1(
@@ -38620,7 +38701,7 @@ const useStyles$3 = genStyleHook("nb-rich-text", (e) => {
38620
38701
  ReactDragListView,
38621
38702
  {
38622
38703
  handleSelector: ".drag-handle",
38623
- onDragEnd: (y, F) => O(void 0, null, function* () {
38704
+ onDragEnd: (y, F) => V(void 0, null, function* () {
38624
38705
  const I = o.value[y], k = o.value[F];
38625
38706
  o.move(y, F), yield h(I, k);
38626
38707
  }),
@@ -38709,7 +38790,7 @@ const useStyles$3 = genStyleHook("nb-rich-text", (e) => {
38709
38790
  const m = useActionContext();
38710
38791
  return {
38711
38792
  run() {
38712
- return O(this, null, function* () {
38793
+ return V(this, null, function* () {
38713
38794
  m.setVisible(!1);
38714
38795
  });
38715
38796
  }
@@ -38727,7 +38808,7 @@ const useStyles$3 = genStyleHook("nb-rich-text", (e) => {
38727
38808
  const m = useForm(), h = useActionContext();
38728
38809
  return {
38729
38810
  run() {
38730
- return O(this, null, function* () {
38811
+ return V(this, null, function* () {
38731
38812
  const { title: f } = m.values;
38732
38813
  f && (r.title = f, i.title = f, a.emit("patch", {
38733
38814
  schema: {
@@ -39114,7 +39195,7 @@ const TableActionColumnDesigner = (e) => {
39114
39195
  "sort-field"
39115
39196
  );
39116
39197
  }, TableBlockDesigner = () => {
39117
- var A, w, M, N, E, z, V, R, j, B;
39198
+ var A, w, M, N, E, z, O, R, j, B;
39118
39199
  const { name: e, title: t } = useCollection_deprecated(), { getCollectionField: o, getCollection: n } = useCollectionManager_deprecated(), r = useField(), i = useFieldSchema(), { form: a } = useFormBlockContext(), l = useSortFields(e), { service: c } = useTableBlockContext(), { t: u } = useTranslation(), { dn: d } = useDesignable(), p = ((w = (A = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : A.params) == null ? void 0 : w.sort) || [], m = ((M = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : M.resource) || ((N = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : N.association), h = !((E = i == null ? void 0 : i["x-decorator-props"]) != null && E.disableTemplate), x = p == null ? void 0 : p.map((T) => T != null && T.startsWith("-") ? {
39119
39200
  field: T.substring(1),
39120
39201
  direction: "desc"
@@ -39160,7 +39241,7 @@ const TableActionColumnDesigner = (e) => {
39160
39241
  {
39161
39242
  title: u("Enable drag and drop sorting"),
39162
39243
  checked: r.decoratorProps.dragSort,
39163
- onChange: (T) => O(void 0, null, function* () {
39244
+ onChange: (T) => V(void 0, null, function* () {
39164
39245
  T && y && (yield k.resource("collections.fields", y.collectionName).update({
39165
39246
  filterByTk: y.name,
39166
39247
  values: {
@@ -39180,7 +39261,7 @@ const TableActionColumnDesigner = (e) => {
39180
39261
  SchemaSettingsDataScope,
39181
39262
  {
39182
39263
  collectionName: e,
39183
- defaultFilter: ((R = (V = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : V.params) == null ? void 0 : R.filter) || {},
39264
+ defaultFilter: ((R = (O = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : O.params) == null ? void 0 : R.filter) || {},
39184
39265
  form: a,
39185
39266
  onSubmit: I
39186
39267
  }
@@ -39329,11 +39410,11 @@ TableField.ActionBar = observer$1(
39329
39410
  );
39330
39411
  const TableSelectorDesigner = () => {
39331
39412
  var A, w, M, N, E, z;
39332
- const { name: e, title: t } = useCollection_deprecated(), { getCollectionJoinField: o, getAllCollectionsInheritChain: n } = useCollectionManager_deprecated(), r = useField(), i = useFieldSchema(), { form: a } = useFormBlockContext(), l = useSortFields(e), { service: c, extraFilter: u } = useTableSelectorContext(), { t: d } = useTranslation(), { dn: p } = useDesignable(), m = ((w = (A = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : A.params) == null ? void 0 : w.sort) || [], h = recursiveParent$1(i, "CollectionField"), x = o(h == null ? void 0 : h["x-collection-field"]), f = m == null ? void 0 : m.map((V) => V.startsWith("-") ? {
39333
- field: V.substring(1),
39413
+ const { name: e, title: t } = useCollection_deprecated(), { getCollectionJoinField: o, getAllCollectionsInheritChain: n } = useCollectionManager_deprecated(), r = useField(), i = useFieldSchema(), { form: a } = useFormBlockContext(), l = useSortFields(e), { service: c, extraFilter: u } = useTableSelectorContext(), { t: d } = useTranslation(), { dn: p } = useDesignable(), m = ((w = (A = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : A.params) == null ? void 0 : w.sort) || [], h = recursiveParent$1(i, "CollectionField"), x = o(h == null ? void 0 : h["x-collection-field"]), f = m == null ? void 0 : m.map((O) => O.startsWith("-") ? {
39414
+ field: O.substring(1),
39334
39415
  direction: "desc"
39335
39416
  } : {
39336
- field: V,
39417
+ field: O,
39337
39418
  direction: "asc"
39338
39419
  }), C = useSchemaTemplate(), S = useCollection_deprecated(), { dragSort: b } = r.decoratorProps, y = useRecord(), F = useVariables(), { currentFormCollection: I } = useContext(RecordPickerContext), k = useLocalVariables({ collectionName: I });
39339
39420
  return /* @__PURE__ */ jsxs(GeneralSchemaDesigner, { template: C, title: t || e, disableInitializer: !0, children: [
@@ -39342,12 +39423,12 @@ const TableSelectorDesigner = () => {
39342
39423
  {
39343
39424
  defaultFilter: ((N = (M = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : M.params) == null ? void 0 : N.filter) || {},
39344
39425
  form: a,
39345
- onSubmit: ({ filter: V }) => {
39426
+ onSubmit: ({ filter: O }) => {
39346
39427
  var B;
39347
- V = removeNullCondition(V);
39428
+ O = removeNullCondition(O);
39348
39429
  const R = r.decoratorProps.params || {};
39349
- R.filter = V, r.decoratorProps.params = R, i["x-decorator-props"].params = R;
39350
- let j = _.cloneDeep(V);
39430
+ R.filter = O, r.decoratorProps.params = R, i["x-decorator-props"].params = R;
39431
+ let j = _.cloneDeep(O);
39351
39432
  u && (j ? j = {
39352
39433
  $and: [u, j]
39353
39434
  } : j = u), c.run(v(g({}, (B = c.params) == null ? void 0 : B[0]), { filter: j, page: 1 })), p.emit("patch", {
@@ -39358,14 +39439,14 @@ const TableSelectorDesigner = () => {
39358
39439
  });
39359
39440
  },
39360
39441
  collectionName: e,
39361
- dynamicComponent: (V) => /* @__PURE__ */ jsx(
39442
+ dynamicComponent: (O) => /* @__PURE__ */ jsx(
39362
39443
  VariableInput,
39363
- v(g({}, V), {
39444
+ v(g({}, O), {
39364
39445
  form: a,
39365
- collectionField: V.collectionField,
39446
+ collectionField: O.collectionField,
39366
39447
  record: y,
39367
39448
  shouldChange: getShouldChange({
39368
- collectionField: V.collectionField,
39449
+ collectionField: O.collectionField,
39369
39450
  variables: F,
39370
39451
  localVariables: k,
39371
39452
  getAllCollectionsInheritChain: n
@@ -39382,11 +39463,11 @@ const TableSelectorDesigner = () => {
39382
39463
  title: d("Tree table"),
39383
39464
  defaultChecked: !0,
39384
39465
  checked: r.decoratorProps.treeTable,
39385
- onChange: (V) => {
39466
+ onChange: (O) => {
39386
39467
  var j;
39387
- r.form.clearFormGraph(`${r.address}.*`), r.decoratorProps.treeTable = V, i["x-decorator-props"].treeTable = V;
39468
+ r.form.clearFormGraph(`${r.address}.*`), r.decoratorProps.treeTable = O, i["x-decorator-props"].treeTable = O;
39388
39469
  const R = v(g({}, (j = c.params) == null ? void 0 : j[0]), {
39389
- tree: V ? !0 : null
39470
+ tree: O ? !0 : null
39390
39471
  });
39391
39472
  p.emit("patch", {
39392
39473
  schema: i
@@ -39470,9 +39551,9 @@ const TableSelectorDesigner = () => {
39470
39551
  }
39471
39552
  }
39472
39553
  },
39473
- onSubmit: ({ sort: V }) => {
39554
+ onSubmit: ({ sort: O }) => {
39474
39555
  var B;
39475
- const R = V.map((T) => T.direction === "desc" ? `-${T.field}` : T.field), j = r.decoratorProps.params || {};
39556
+ const R = O.map((T) => T.direction === "desc" ? `-${T.field}` : T.field), j = r.decoratorProps.params || {};
39476
39557
  j.sort = R, r.decoratorProps.params = j, i["x-decorator-props"].params = j, p.emit("patch", {
39477
39558
  schema: {
39478
39559
  "x-uid": i["x-uid"],
@@ -39494,10 +39575,10 @@ const TableSelectorDesigner = () => {
39494
39575
  { label: "100", value: 100 },
39495
39576
  { label: "200", value: 200 }
39496
39577
  ],
39497
- onChange: (V) => {
39578
+ onChange: (O) => {
39498
39579
  var j;
39499
39580
  const R = r.decoratorProps.params || {};
39500
- R.pageSize = V, r.decoratorProps.params = R, i["x-decorator-props"].params = R, c.run(v(g({}, (j = c.params) == null ? void 0 : j[0]), { pageSize: V, page: 1 })), p.emit("patch", {
39581
+ R.pageSize = O, r.decoratorProps.params = R, i["x-decorator-props"].params = R, c.run(v(g({}, (j = c.params) == null ? void 0 : j[0]), { pageSize: O, page: 1 })), p.emit("patch", {
39501
39582
  schema: {
39502
39583
  "x-uid": i["x-uid"],
39503
39584
  "x-decorator-props": i["x-decorator-props"]
@@ -39921,7 +40002,7 @@ function Input(e) {
39921
40002
  const D = [f(z), ...d ? [...d] : []].filter(($) => !$.deprecated || (M == null ? void 0 : M[0]) === $[N.value]);
39922
40003
  y(D);
39923
40004
  }, [d, M]);
39924
- const V = (D) => O(this, null, function* () {
40005
+ const O = (D) => V(this, null, function* () {
39925
40006
  var q;
39926
40007
  const $ = D[D.length - 1];
39927
40008
  if (!((q = $.children) != null && q.length) && !$.isLeaf && $.loadChildren) {
@@ -39947,7 +40028,7 @@ function Input(e) {
39947
40028
  [w, M, o]
39948
40029
  );
39949
40030
  useEffect(() => {
39950
- O(this, null, function* () {
40031
+ V(this, null, function* () {
39951
40032
  var L;
39952
40033
  if (!M || b.length <= 1)
39953
40034
  return;
@@ -40043,7 +40124,7 @@ function Input(e) {
40043
40124
  options: b,
40044
40125
  value: M != null ? M : ["", ...n || !((T = z.children) != null && T.length) ? [] : [w]],
40045
40126
  onChange: R,
40046
- loadData: V,
40127
+ loadData: O,
40047
40128
  changeOnSelect: c,
40048
40129
  fieldNames: u,
40049
40130
  disabled: j,
@@ -40278,7 +40359,7 @@ function TextArea(e) {
40278
40359
  C(!1), b(!0), k(getCurrentRange(j)), a(getValue(j));
40279
40360
  },
40280
40361
  [a]
40281
- ), V = useCallback(
40362
+ ), O = useCallback(
40282
40363
  function(j) {
40283
40364
  j.preventDefault();
40284
40365
  const B = j.clipboardData.getData("text/html") || j.clipboardData.getData("text"), T = sanitizeHTML(B, {
@@ -40337,7 +40418,7 @@ function TextArea(e) {
40337
40418
  onInput: w,
40338
40419
  onBlur: M,
40339
40420
  onKeyDown: N,
40340
- onPaste: V,
40421
+ onPaste: O,
40341
40422
  onCompositionStart: E,
40342
40423
  onCompositionEnd: z,
40343
40424
  placeholder: e.placeholder,
@@ -40376,7 +40457,7 @@ function TextArea(e) {
40376
40457
  );
40377
40458
  }
40378
40459
  function preloadOptions(e, t) {
40379
- return O(this, null, function* () {
40460
+ return V(this, null, function* () {
40380
40461
  var n;
40381
40462
  let o = [...e != null ? e : []];
40382
40463
  o = o.filter((r) => !r.deprecated || (t == null ? void 0 : t.includes(r.value))), VARIABLE_RE.lastIndex = 0;
@@ -40763,7 +40844,7 @@ const CollectionResourceActionProvider = (e) => {
40763
40844
  const e = useForm(), t = useActionContext();
40764
40845
  return {
40765
40846
  run() {
40766
- return O(this, null, function* () {
40847
+ return V(this, null, function* () {
40767
40848
  t.setVisible(!1), e.reset();
40768
40849
  });
40769
40850
  }
@@ -40782,7 +40863,7 @@ const CollectionResourceActionProvider = (e) => {
40782
40863
  const { run: e } = useResourceActionContext(), t = useForm(), o = useActionContext();
40783
40864
  return {
40784
40865
  run() {
40785
- return O(this, null, function* () {
40866
+ return V(this, null, function* () {
40786
40867
  t.reset(), e(), o.setVisible(!1);
40787
40868
  });
40788
40869
  }
@@ -40791,7 +40872,7 @@ const CollectionResourceActionProvider = (e) => {
40791
40872
  const { resource: e } = useCollection_deprecated();
40792
40873
  return {
40793
40874
  onCardDragEnd(c, u, d) {
40794
- return O(this, arguments, function* ({ columns: o, groupField: n }, { fromColumnId: r, fromPosition: i }, { toColumnId: a, toPosition: l }) {
40875
+ return V(this, arguments, function* ({ columns: o, groupField: n }, { fromColumnId: r, fromPosition: i }, { toColumnId: a, toPosition: l }) {
40795
40876
  var C, S;
40796
40877
  const p = o.find((b) => b.id === r), m = o.find((b) => b.id === a), h = (C = p == null ? void 0 : p.cards) == null ? void 0 : C[i], x = (S = m == null ? void 0 : m.cards) == null ? void 0 : S[l], f = {
40797
40878
  sourceId: h.id,
@@ -40982,7 +41063,7 @@ const CollectionResourceActionProvider = (e) => {
40982
41063
  const { run: e, params: t, defaultRequest: o } = useResourceActionContext(), n = useForm(), r = useActionContext(), [i, ...a] = t;
40983
41064
  return {
40984
41065
  run() {
40985
- return O(this, null, function* () {
41066
+ return V(this, null, function* () {
40986
41067
  var d;
40987
41068
  const c = (d = o == null ? void 0 : o.params) == null ? void 0 : d.filter, u = c ? { $and: [c, n.values.filter] } : n.values.filter;
40988
41069
  e(v(g({}, i), { filter: u }), ...a), r.setVisible(!1);
@@ -40993,7 +41074,7 @@ const CollectionResourceActionProvider = (e) => {
40993
41074
  const t = useForm(), o = useField(), n = useActionContext(), { refresh: r } = useResourceActionContext(), { resource: i } = useResourceContext();
40994
41075
  return {
40995
41076
  run() {
40996
- return O(this, null, function* () {
41077
+ return V(this, null, function* () {
40997
41078
  var l;
40998
41079
  try {
40999
41080
  yield t.submit(), o.data = o.data || {}, o.data.loading = !0;
@@ -41009,7 +41090,7 @@ const CollectionResourceActionProvider = (e) => {
41009
41090
  const t = useForm(), { resource: o } = useResourceContext();
41010
41091
  return {
41011
41092
  run() {
41012
- return O(this, null, function* () {
41093
+ return V(this, null, function* () {
41013
41094
  var i;
41014
41095
  yield t.submit();
41015
41096
  const r = yield o.create({ values: t.values });
@@ -41023,7 +41104,7 @@ const CollectionResourceActionProvider = (e) => {
41023
41104
  const { resource: o, targetKey: n } = useResourceContext(), { [n]: r } = useRecord();
41024
41105
  return {
41025
41106
  run() {
41026
- return O(this, null, function* () {
41107
+ return V(this, null, function* () {
41027
41108
  var l;
41028
41109
  yield t.submit();
41029
41110
  const a = yield o.update({ filterByTk: r, values: t.values });
@@ -41035,7 +41116,7 @@ const CollectionResourceActionProvider = (e) => {
41035
41116
  const { resource: e } = useResourceContext(), { refresh: t } = useResourceActionContext();
41036
41117
  return {
41037
41118
  move(n, r) {
41038
- return O(this, null, function* () {
41119
+ return V(this, null, function* () {
41039
41120
  yield e.move({
41040
41121
  sourceId: n.id,
41041
41122
  targetId: r.id
@@ -41047,7 +41128,7 @@ const CollectionResourceActionProvider = (e) => {
41047
41128
  const t = useField(), o = useForm(), n = useActionContext(), { refresh: r } = useResourceActionContext(), { resource: i, targetKey: a } = useResourceContext(), { [a]: l } = useRecord();
41048
41129
  return {
41049
41130
  run() {
41050
- return O(this, null, function* () {
41131
+ return V(this, null, function* () {
41051
41132
  var u;
41052
41133
  yield o.submit(), t.data = t.data || {}, t.data.loading = !0;
41053
41134
  try {
@@ -41065,7 +41146,7 @@ const CollectionResourceActionProvider = (e) => {
41065
41146
  const { refresh: t } = useResourceActionContext(), { resource: o, targetKey: n } = useResourceContext(), { [n]: r } = useRecord();
41066
41147
  return {
41067
41148
  run() {
41068
- return O(this, null, function* () {
41149
+ return V(this, null, function* () {
41069
41150
  yield o.destroy({ filterByTk: r }), e == null || e(r), t();
41070
41151
  });
41071
41152
  }
@@ -41074,7 +41155,7 @@ const CollectionResourceActionProvider = (e) => {
41074
41155
  const { state: t, setState: o, refresh: n } = useResourceActionContext(), { resource: r } = useResourceContext(), { t: i } = useTranslation();
41075
41156
  return {
41076
41157
  run() {
41077
- return O(this, null, function* () {
41158
+ return V(this, null, function* () {
41078
41159
  var l;
41079
41160
  if (!((l = t == null ? void 0 : t.selectedRowKeys) != null && l.length))
41080
41161
  return message.error(i("Please select the records you want to delete"));
@@ -41093,7 +41174,7 @@ const CollectionResourceActionProvider = (e) => {
41093
41174
  const { run: e } = useCreateAction$1(), { refreshCM: t } = useCollectionManager_deprecated();
41094
41175
  return {
41095
41176
  run() {
41096
- return O(this, null, function* () {
41177
+ return V(this, null, function* () {
41097
41178
  yield e(), yield t();
41098
41179
  });
41099
41180
  }
@@ -41102,7 +41183,7 @@ const CollectionResourceActionProvider = (e) => {
41102
41183
  const { run: e } = useUpdateAction$1(), { refreshCM: t } = useCollectionManager_deprecated();
41103
41184
  return {
41104
41185
  run() {
41105
- return O(this, null, function* () {
41186
+ return V(this, null, function* () {
41106
41187
  yield e(), yield t();
41107
41188
  });
41108
41189
  }
@@ -41111,7 +41192,7 @@ const CollectionResourceActionProvider = (e) => {
41111
41192
  const { run: e } = useDestroyAction$2(), { refreshCM: t } = useCollectionManager_deprecated();
41112
41193
  return {
41113
41194
  run() {
41114
- return O(this, null, function* () {
41195
+ return V(this, null, function* () {
41115
41196
  yield e(), yield t();
41116
41197
  });
41117
41198
  }
@@ -41126,7 +41207,7 @@ const CollectionResourceActionProvider = (e) => {
41126
41207
  const { run: e } = useBulkDestroyAction$2(), { refreshCM: t } = useCollectionManager_deprecated();
41127
41208
  return {
41128
41209
  run() {
41129
- return O(this, null, function* () {
41210
+ return V(this, null, function* () {
41130
41211
  yield e(), yield t();
41131
41212
  });
41132
41213
  }
@@ -41243,7 +41324,7 @@ const useSelectedRowKeys = () => {
41243
41324
  const e = useContext(DataSourceContext_deprecated), t = useForm(), { setVisible: o } = useActionContext();
41244
41325
  return {
41245
41326
  run() {
41246
- return O(this, null, function* () {
41327
+ return V(this, null, function* () {
41247
41328
  console.log("form.values", t.values);
41248
41329
  const r = e.dataSource || [];
41249
41330
  r.push(cloneDeep$1(t.values)), e.setDataSource([...r]), o(!1), yield t.reset();
@@ -41254,7 +41335,7 @@ const useSelectedRowKeys = () => {
41254
41335
  const e = useContext(DataSourceContext_deprecated), { selectedRowKeys: t, setSelectedRowKeys: o } = e;
41255
41336
  return {
41256
41337
  run() {
41257
- return O(this, null, function* () {
41338
+ return V(this, null, function* () {
41258
41339
  const r = e.dataSource || [];
41259
41340
  e.setDataSource(
41260
41341
  r.filter((i, a) => !t.includes(a))
@@ -41266,7 +41347,7 @@ const useSelectedRowKeys = () => {
41266
41347
  const e = useRecordIndex(), t = useForm(), { setVisible: o } = useActionContext(), n = useContext(DataSourceContext_deprecated);
41267
41348
  return {
41268
41349
  run() {
41269
- return O(this, null, function* () {
41350
+ return V(this, null, function* () {
41270
41351
  const a = ((n == null ? void 0 : n.dataSource) || []).map((l, c) => c === e ? g({}, t.values) : l);
41271
41352
  n.setDataSource([...a]), o(!1);
41272
41353
  });
@@ -41276,7 +41357,7 @@ const useSelectedRowKeys = () => {
41276
41357
  const e = useRecordIndex(), t = useContext(DataSourceContext_deprecated);
41277
41358
  return {
41278
41359
  run() {
41279
- return O(this, null, function* () {
41360
+ return V(this, null, function* () {
41280
41361
  const n = t.dataSource || [];
41281
41362
  t.setDataSource(
41282
41363
  n.filter((r, i) => e !== i)
@@ -41406,7 +41487,7 @@ const CollectionHistoryProvider = (e) => {
41406
41487
  }, r = useLocation().pathname.startsWith("/admin"), i = t.auth.getToken() || "", { render: a } = useAppSpin(), l = useRequest(o, {
41407
41488
  refreshDeps: [r, i],
41408
41489
  ready: !!(r && i)
41409
- }), c = () => O(void 0, null, function* () {
41490
+ }), c = () => V(void 0, null, function* () {
41410
41491
  const { data: d } = yield t.request(o);
41411
41492
  return l.mutate(d), (d == null ? void 0 : d.data) || [];
41412
41493
  });
@@ -41433,7 +41514,7 @@ const CollectionHistoryProvider = (e) => {
41433
41514
  }, i = useRequest(() => o.reload().then(n)), a = useRequest(r), { render: l } = useAppSpin();
41434
41515
  if (i.loading)
41435
41516
  return l();
41436
- const c = () => O(void 0, null, function* () {
41517
+ const c = () => V(void 0, null, function* () {
41437
41518
  const { data: u } = yield t.request(r);
41438
41519
  return a.mutate(u), (u == null ? void 0 : u.data) || [];
41439
41520
  });
@@ -41591,7 +41672,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
41591
41672
  {
41592
41673
  showSearch: !0,
41593
41674
  options: l,
41594
- onDropdownVisibleChange: (x) => O(void 0, null, function* () {
41675
+ onDropdownVisibleChange: (x) => V(void 0, null, function* () {
41595
41676
  var S;
41596
41677
  const { target: f, type: C } = p.values;
41597
41678
  f && x && c(
@@ -41640,7 +41721,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
41640
41721
  value: C,
41641
41722
  options: o,
41642
41723
  showSearch: !0,
41643
- onDropdownVisibleChange: (y) => O(void 0, null, function* () {
41724
+ onDropdownVisibleChange: (y) => V(void 0, null, function* () {
41644
41725
  var w;
41645
41726
  const { target: F, type: I, through: k } = f.values, A = ["belongsTo"].includes(I) ? l || p : ["belongsToMany"].includes(I) ? k : F;
41646
41727
  if (A && y) {
@@ -41853,7 +41934,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
41853
41934
  const e = useForm(), { refreshCM: t } = useCollectionManager_deprecated(), o = useActionContext(), { refresh: n } = useResourceActionContext(), { resource: r } = useResourceContext(), i = useField();
41854
41935
  return {
41855
41936
  run() {
41856
- return O(this, null, function* () {
41937
+ return V(this, null, function* () {
41857
41938
  yield e.submit(), i.data = i.data || {}, i.data.loading = !0;
41858
41939
  const l = cloneDeep$1(e.values);
41859
41940
  l.autoCreateReverseField || delete l.reverseField, delete l.autoCreateReverseField;
@@ -41869,8 +41950,8 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
41869
41950
  const t = useRecord();
41870
41951
  return /* @__PURE__ */ jsx(AddFieldAction, g({ item: t }, e));
41871
41952
  }, AddFieldAction = (e) => {
41872
- var z, V;
41873
- const { scope: t, getContainer: o, item: n, children: r, trigger: i, align: a, database: l } = e, { getInterface: c, getTemplate: u, collections: d, getCollection: p } = useCollectionManager_deprecated(), [m, h] = useState(!1), [x, f] = useState(), [C, S] = useState({}), b = useCompile(), { t: y } = useTranslation(), { isDialect: F } = useDialect(), I = useFieldInterfaceOptions(), k = ((V = (z = p(n.name)) == null ? void 0 : z.options) == null ? void 0 : V.fields) || n.fields || [], A = useMemo(() => d.map((R) => ({
41953
+ var z, O;
41954
+ const { scope: t, getContainer: o, item: n, children: r, trigger: i, align: a, database: l } = e, { getInterface: c, getTemplate: u, collections: d, getCollection: p } = useCollectionManager_deprecated(), [m, h] = useState(!1), [x, f] = useState(), [C, S] = useState({}), b = useCompile(), { t: y } = useTranslation(), { isDialect: F } = useDialect(), I = useFieldInterfaceOptions(), k = ((O = (z = p(n.name)) == null ? void 0 : z.options) == null ? void 0 : O.fields) || n.fields || [], A = useMemo(() => d.map((R) => ({
41874
41955
  label: b(R.title),
41875
41956
  value: R.name
41876
41957
  })), []), w = useCallback(() => {
@@ -42073,7 +42154,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
42073
42154
  const e = useForm(), { refreshCM: t } = useCollectionManager_deprecated(), o = useActionContext(), { refresh: n } = useResourceActionContext(), { resource: r, targetKey: i } = useResourceContext(), { [i]: a } = useRecord();
42074
42155
  return {
42075
42156
  run() {
42076
- return O(this, null, function* () {
42157
+ return V(this, null, function* () {
42077
42158
  yield e.submit();
42078
42159
  const c = cloneDeep(e.values);
42079
42160
  c.autoCreateReverseField || delete c.reverseField, delete c.autoCreateReverseField, yield r.update({ filterByTk: a, values: c }), o.setVisible(!1), yield e.reset(), n(), yield t();
@@ -42101,7 +42182,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
42101
42182
  /* @__PURE__ */ jsx(
42102
42183
  "a",
42103
42184
  v(g({}, a), {
42104
- onClick: () => O(void 0, null, function* () {
42185
+ onClick: () => V(void 0, null, function* () {
42105
42186
  var E, z;
42106
42187
  const { data: A } = yield x.resource("collections.fields", n.collectionName).get({
42107
42188
  filterByTk: n.name,
@@ -42209,19 +42290,19 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
42209
42290
  const t = useRecord(), o = useCollectionParentRecordData();
42210
42291
  return /* @__PURE__ */ jsx(OverridingFieldAction, g({ item: t, parentItem: o }, e));
42211
42292
  }, getIsOverriding = (e, t) => e.find((n) => n.name === t.name), OverridingFieldAction = (e) => {
42212
- const { scope: t, getContainer: o, item: n, parentItem: r, children: i, currentCollection: a } = e, { target: l, through: c } = n, { getInterface: u, getCurrentCollectionFields: d, getChildrenCollections: p, collections: m } = useCollectionManager_deprecated(), [h, x] = useState(!1), [f, C] = useState({}), S = useAPIClient(), { t: b } = useTranslation(), y = useCompile(), F = (E) => {
42213
- var V;
42214
- return E && ((V = p(E)) == null ? void 0 : V.map((R) => R.name).concat([E]));
42215
- }, [I, k] = useState({}), A = d(a), w = getIsOverriding(A, n), M = useMemo(() => m.map((E) => ({
42216
- label: y(E.title),
42217
- value: E.name
42218
- })), []), N = () => {
42219
- const E = useForm(), { refresh: z } = useResourceActionContext(), { refreshCM: V } = useCollectionManager_deprecated(), R = useActionContext(), { resource: j } = useResourceContext();
42293
+ const { scope: t, getContainer: o, item: n, parentItem: r, children: i, currentCollection: a } = e, { target: l, through: c } = n, { getInterface: u, getCollection: d, getCurrentCollectionFields: p, getChildrenCollections: m, collections: h } = useCollectionManager_deprecated(), [x, f] = useState(!1), [C, S] = useState({}), b = useAPIClient(), { t: y } = useTranslation(), F = useCompile(), I = (O) => {
42294
+ var j;
42295
+ return O && ((j = m(O)) == null ? void 0 : j.map((B) => B.name).concat([O]));
42296
+ }, [k, A] = useState({}), w = p(a), M = getIsOverriding(w, n), N = useMemo(() => h.map((O) => ({
42297
+ label: F(O.title),
42298
+ value: O.name
42299
+ })), []), E = () => {
42300
+ const O = useForm(), { refresh: R } = useResourceActionContext(), { refreshCM: j } = useCollectionManager_deprecated(), B = useActionContext(), { resource: T } = useResourceContext();
42220
42301
  return {
42221
42302
  run() {
42222
- return O(this, null, function* () {
42223
- yield E.submit();
42224
- const T = cloneDeep(E.values), D = omit$1(T, [
42303
+ return V(this, null, function* () {
42304
+ yield O.submit();
42305
+ const $ = cloneDeep(O.values), q = omit$1($, [
42225
42306
  "key",
42226
42307
  "uiSchemaUid",
42227
42308
  "collectionName",
@@ -42233,56 +42314,66 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
42233
42314
  // 'reverseField.key',
42234
42315
  // 'reverseField.uiSchemaUid',
42235
42316
  ]);
42236
- yield j.create({
42237
- values: D
42238
- }), yield E.reset(), yield V(), yield z(), R.setVisible(!1);
42317
+ yield T.create({
42318
+ values: q
42319
+ }), yield O.reset(), yield j(), yield R(), B.setVisible(!1);
42239
42320
  });
42240
42321
  }
42241
42322
  };
42242
- };
42243
- return /* @__PURE__ */ jsx(RecordProvider, { record: v(g({}, n), { collectionName: r.name }), parent: r, children: /* @__PURE__ */ jsxs(ActionContextProvider, { value: { visible: h, setVisible: x }, children: [
42323
+ }, z = useMemo(() => {
42324
+ var O;
42325
+ return (n == null ? void 0 : n.fields) || ((O = d(n.collectionName)) == null ? void 0 : O.options.fields.filter((R) => ["string", "bigInt", "integer"].includes(R.type)).map((R) => {
42326
+ var j;
42327
+ return {
42328
+ value: R.name,
42329
+ label: F((j = R.uiSchema) == null ? void 0 : j.title)
42330
+ };
42331
+ }));
42332
+ }, [n.name]);
42333
+ return /* @__PURE__ */ jsx(RecordProvider, { record: v(g({}, n), { collectionName: r.name }), parent: r, children: /* @__PURE__ */ jsxs(ActionContextProvider, { value: { visible: x, setVisible: f }, children: [
42244
42334
  /* @__PURE__ */ jsx(
42245
42335
  "a",
42246
42336
  {
42247
- disabled: w,
42248
- onClick: () => O(void 0, null, function* () {
42249
- var E;
42250
- if (!w) {
42251
- const { data: z } = yield S.resource("collections.fields", n.collectionName).get({
42337
+ disabled: M,
42338
+ onClick: () => V(void 0, null, function* () {
42339
+ var O;
42340
+ if (!M) {
42341
+ const { data: R } = yield b.resource("collections.fields", n.collectionName).get({
42252
42342
  filterByTk: n.name,
42253
42343
  appends: ["reverseField"]
42254
42344
  });
42255
- k(z == null ? void 0 : z.data);
42256
- const V = u(n.interface), R = cloneDeep(z == null ? void 0 : z.data) || {};
42257
- R != null && R.reverseField || (R.autoCreateReverseField = !1, R.reverseField = (E = V.default) == null ? void 0 : E.reverseField, set$1(R.reverseField, "name", `f_${uid()}`), set$1(R.reverseField, "uiSchema.title", n.__parent.title));
42258
- const j = getSchema$6(
42259
- v(g({}, V), {
42260
- default: R
42345
+ A(R == null ? void 0 : R.data);
42346
+ const j = u(n.interface), B = cloneDeep(R == null ? void 0 : R.data) || {};
42347
+ B != null && B.reverseField || (B.autoCreateReverseField = !1, B.reverseField = (O = j.default) == null ? void 0 : O.reverseField, set$1(B.reverseField, "name", `f_${uid()}`), set$1(B.reverseField, "uiSchema.title", n.__parent.title));
42348
+ const T = getSchema$6(
42349
+ v(g({}, j), {
42350
+ default: B
42261
42351
  }),
42262
42352
  n,
42263
- y
42353
+ F
42264
42354
  );
42265
- C(j), x(!0);
42355
+ S(T), f(!0);
42266
42356
  }
42267
42357
  }),
42268
- children: i || b("Override")
42358
+ children: i || y("Override")
42269
42359
  }
42270
42360
  ),
42271
42361
  /* @__PURE__ */ jsx(
42272
42362
  SchemaComponent,
42273
42363
  {
42274
- schema: f,
42364
+ schema: C,
42275
42365
  components: v(g({}, components$1), { ArrayTable }),
42276
42366
  scope: g({
42277
42367
  getContainer: o,
42278
- useOverridingCollectionField: N,
42368
+ useOverridingCollectionField: E,
42279
42369
  useCancelAction,
42280
- showReverseFieldConfig: !(I != null && I.reverseField),
42370
+ showReverseFieldConfig: !(k != null && k.reverseField),
42281
42371
  createOnly: !0,
42282
42372
  override: !0,
42283
42373
  isOverride: !0,
42284
- targetScope: { target: F(l), through: F(c) },
42285
- collections: M
42374
+ targetScope: { target: I(l), through: I(c) },
42375
+ collections: N,
42376
+ scopeKeyOptions: z
42286
42377
  }, t)
42287
42378
  }
42288
42379
  )
@@ -42344,7 +42435,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
42344
42435
  /* @__PURE__ */ jsx(
42345
42436
  "a",
42346
42437
  {
42347
- onClick: () => O(void 0, null, function* () {
42438
+ onClick: () => V(void 0, null, function* () {
42348
42439
  var k;
42349
42440
  const { data: b } = yield m.resource("collections.fields", n.collectionName).get({
42350
42441
  filterByTk: n.name,
@@ -42491,7 +42582,7 @@ const getSchema$4 = (e, t, o) => {
42491
42582
  const t = useForm(), { refreshCM: o } = useCollectionManager_deprecated(), n = useActionContext(), { refresh: r } = useResourceActionContext(), { resource: i } = useResourceContext(), a = useField();
42492
42583
  return {
42493
42584
  run() {
42494
- return O(this, null, function* () {
42585
+ return V(this, null, function* () {
42495
42586
  var c;
42496
42587
  a.data = a.data || {}, a.data.loading = !0;
42497
42588
  try {
@@ -42628,7 +42719,7 @@ const getSchema$4 = (e, t, o) => {
42628
42719
  const { refreshCM: t } = useCollectionManager_deprecated(), o = useForm(), n = useActionContext(), { refresh: r } = useResourceActionContext(), { resource: i, targetKey: a } = useResourceContext(), { [a]: l, template: c } = useRecord(), u = useAPIClient(), d = c === "sql" ? u.resource("sqlCollection") : i;
42629
42720
  return {
42630
42721
  run() {
42631
- return O(this, null, function* () {
42722
+ return V(this, null, function* () {
42632
42723
  yield o.submit(), yield d.update({
42633
42724
  filterByTk: l,
42634
42725
  values: c === "sql" ? o.values : omit(o.values, ["fields"])
@@ -42645,7 +42736,7 @@ const getSchema$4 = (e, t, o) => {
42645
42736
  /* @__PURE__ */ jsx(
42646
42737
  "a",
42647
42738
  v(g({}, i), {
42648
- onClick: () => O(void 0, null, function* () {
42739
+ onClick: () => V(void 0, null, function* () {
42649
42740
  const x = a(n.template), f = getSchema$3(
42650
42741
  g({}, x),
42651
42742
  n,
@@ -42766,7 +42857,7 @@ const getSchema$4 = (e, t, o) => {
42766
42857
  source: T
42767
42858
  });
42768
42859
  });
42769
- }, V = [
42860
+ }, O = [
42770
42861
  {
42771
42862
  title: l("Field name"),
42772
42863
  dataIndex: "name",
@@ -42868,7 +42959,7 @@ const getSchema$4 = (e, t, o) => {
42868
42959
  {
42869
42960
  bordered: !0,
42870
42961
  size: "middle",
42871
- columns: V,
42962
+ columns: O,
42872
42963
  dataSource: d,
42873
42964
  scroll: { y: 300 },
42874
42965
  pagination: !1,
@@ -42903,8 +42994,8 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
42903
42994
  }, b = (y) => {
42904
42995
  var F;
42905
42996
  return (F = y.filter((I) => I.source || I.interface)) == null ? void 0 : F.map((I) => {
42906
- var N, E, z, V, R, j;
42907
- const k = typeof (I == null ? void 0 : I.source) == "string" ? (N = I == null ? void 0 : I.source) == null ? void 0 : N.split(".") : I == null ? void 0 : I.source, A = (z = (E = h(k == null ? void 0 : k[0])) == null ? void 0 : E.find((B) => B.name === (k == null ? void 0 : k[1]))) == null ? void 0 : z.uiSchema, w = ((V = I == null ? void 0 : I.uiSchema) == null ? void 0 : V.title) || (A == null ? void 0 : A.title) || I.name, M = I.source ? A : (j = (R = m(I.interface)) == null ? void 0 : R.default) == null ? void 0 : j.uiSchema;
42997
+ var N, E, z, O, R, j;
42998
+ const k = typeof (I == null ? void 0 : I.source) == "string" ? (N = I == null ? void 0 : I.source) == null ? void 0 : N.split(".") : I == null ? void 0 : I.source, A = (z = (E = h(k == null ? void 0 : k[0])) == null ? void 0 : E.find((B) => B.name === (k == null ? void 0 : k[1]))) == null ? void 0 : z.uiSchema, w = ((O = I == null ? void 0 : I.uiSchema) == null ? void 0 : O.title) || (A == null ? void 0 : A.title) || I.name, M = I.source ? A : (j = (R = m(I.interface)) == null ? void 0 : R.default) == null ? void 0 : j.uiSchema;
42908
42999
  return {
42909
43000
  title: u(w),
42910
43001
  dataIndex: I.name,
@@ -43054,7 +43145,7 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
43054
43145
  const e = useForm(), { refreshCM: t } = useCollectionManager_deprecated(), o = useActionContext(), { refresh: n } = useResourceActionContext(), { targetKey: r } = useResourceContext(), { [r]: i } = useRecord(), a = useAPIClient(), l = useField();
43055
43146
  return {
43056
43147
  run() {
43057
- return O(this, null, function* () {
43148
+ return V(this, null, function* () {
43058
43149
  yield e.submit(), l.data = l.data || {}, l.data.loading = !0;
43059
43150
  try {
43060
43151
  yield a.resource("collections").setFields({
@@ -43156,12 +43247,12 @@ const AsyncDataProvider = (e) => {
43156
43247
  const w = /* @__PURE__ */ new Map();
43157
43248
  i || (a && a.length ? Object.entries((a == null ? void 0 : a[0]) || {}).forEach(([E, z]) => {
43158
43249
  var T;
43159
- const V = l[E], R = inferInterface(E, z), j = (T = C.current(R)) == null ? void 0 : T.default, B = (V == null ? void 0 : V.uiSchema) || (j == null ? void 0 : j.uiSchema) || {};
43250
+ const O = l[E], R = inferInterface(E, z), j = (T = C.current(R)) == null ? void 0 : T.default, B = (O == null ? void 0 : O.uiSchema) || (j == null ? void 0 : j.uiSchema) || {};
43160
43251
  w.set(E, {
43161
43252
  name: E,
43162
- interface: (V == null ? void 0 : V.interface) || R,
43163
- type: (V == null ? void 0 : V.type) || (j == null ? void 0 : j.type),
43164
- source: V == null ? void 0 : V.source,
43253
+ interface: (O == null ? void 0 : O.interface) || R,
43254
+ type: (O == null ? void 0 : O.type) || (j == null ? void 0 : j.type),
43255
+ source: O == null ? void 0 : O.source,
43165
43256
  uiSchema: g({
43166
43257
  title: E
43167
43258
  }, B)
@@ -43194,9 +43285,9 @@ const AsyncDataProvider = (e) => {
43194
43285
  const N = [...t];
43195
43286
  N.splice(M, 1, w), o(N), c.setValue(
43196
43287
  N.map((E) => {
43197
- var z, V, R;
43288
+ var z, O, R;
43198
43289
  return v(g({}, E), {
43199
- source: typeof E.source == "string" ? E.source : ((R = (V = (z = E.source) == null ? void 0 : z.filter) == null ? void 0 : V.call(z, Boolean)) == null ? void 0 : R.join(".")) || null
43290
+ source: typeof E.source == "string" ? E.source : ((R = (O = (z = E.source) == null ? void 0 : z.filter) == null ? void 0 : O.call(z, Boolean)) == null ? void 0 : R.join(".")) || null
43200
43291
  });
43201
43292
  })
43202
43293
  );
@@ -43222,13 +43313,13 @@ const AsyncDataProvider = (e) => {
43222
43313
  options: d(f),
43223
43314
  placeholder: e("Select field source"),
43224
43315
  onChange: (z) => {
43225
- let V = l[z == null ? void 0 : z[1]];
43226
- V != null && V.interface || (V = m((z == null ? void 0 : z.join(".")) || "")), b(
43316
+ let O = l[z == null ? void 0 : z[1]];
43317
+ O != null && O.interface || (O = m((z == null ? void 0 : z.join(".")) || "")), b(
43227
43318
  v(g({}, E), {
43228
43319
  source: z,
43229
- interface: V == null ? void 0 : V.interface,
43230
- type: V == null ? void 0 : V.type,
43231
- uiSchema: V == null ? void 0 : V.uiSchema
43320
+ interface: O == null ? void 0 : O.interface,
43321
+ type: O == null ? void 0 : O.type,
43322
+ uiSchema: O == null ? void 0 : O.uiSchema
43232
43323
  }),
43233
43324
  N
43234
43325
  );
@@ -43251,12 +43342,12 @@ const AsyncDataProvider = (e) => {
43251
43342
  defaultValue: E.interface || "input",
43252
43343
  style: { width: "100%" },
43253
43344
  popupMatchSelectWidth: !1,
43254
- onChange: (V) => {
43345
+ onChange: (O) => {
43255
43346
  var j, B, T, D, $;
43256
- const R = p(V);
43347
+ const R = p(O);
43257
43348
  b(
43258
43349
  v(g({}, E), {
43259
- interface: V || null,
43350
+ interface: O || null,
43260
43351
  uiSchema: v(g({}, (j = R == null ? void 0 : R.default) == null ? void 0 : j.uiSchema), {
43261
43352
  title: ((T = (B = R == null ? void 0 : R.default) == null ? void 0 : B.uiSchema) == null ? void 0 : T.title) || ((D = E.uiSchema) == null ? void 0 : D.title)
43262
43353
  }),
@@ -43277,13 +43368,13 @@ const AsyncDataProvider = (e) => {
43277
43368
  key: "title",
43278
43369
  width: 180,
43279
43370
  render: (w, M, N) => {
43280
- var z, V;
43371
+ var z, O;
43281
43372
  const E = t[N];
43282
43373
  return /* @__PURE__ */ jsx(
43283
43374
  Input$3,
43284
43375
  {
43285
43376
  value: ((z = E.uiSchema) == null ? void 0 : z.title) || w,
43286
- defaultValue: ((V = E.uiSchema) == null ? void 0 : V.title) !== void 0 ? E.uiSchema.title : E == null ? void 0 : E.name,
43377
+ defaultValue: ((O = E.uiSchema) == null ? void 0 : O.title) !== void 0 ? E.uiSchema.title : E == null ? void 0 : E.name,
43287
43378
  onChange: (R) => b(v(g({}, E), { uiSchema: v(g({}, E == null ? void 0 : E.uiSchema), { title: R.target.value }) }), N)
43288
43379
  }
43289
43380
  );
@@ -43482,7 +43573,7 @@ const AsyncDataProvider = (e) => {
43482
43573
  const t = useForm(), o = useActionContext(), { refreshCM: n } = useCollectionManager_deprecated(), { refresh: r } = useResourceActionContext(), { targetKey: i } = useResourceContext(), { [i]: a } = useRecord(), l = useAPIClient(), c = useField();
43483
43574
  return {
43484
43575
  run() {
43485
- return O(this, null, function* () {
43576
+ return V(this, null, function* () {
43486
43577
  yield t.submit(), c.data = c.data || {}, c.data.loading = !0;
43487
43578
  try {
43488
43579
  yield l.resource("sqlCollection").setFields({
@@ -43526,7 +43617,7 @@ const AsyncDataProvider = (e) => {
43526
43617
  const { run: e } = useDestroyAction(), { refreshCM: t } = useCollectionManager_deprecated();
43527
43618
  return {
43528
43619
  run() {
43529
- return O(this, null, function* () {
43620
+ return V(this, null, function* () {
43530
43621
  yield e(), yield t();
43531
43622
  });
43532
43623
  }
@@ -43535,7 +43626,7 @@ const AsyncDataProvider = (e) => {
43535
43626
  const { run: t } = useBulkDestroyAction(), { refreshCM: o } = useCollectionManager_deprecated();
43536
43627
  return {
43537
43628
  run() {
43538
- return O(this, null, function* () {
43629
+ return V(this, null, function* () {
43539
43630
  yield t(e), yield o();
43540
43631
  });
43541
43632
  }
@@ -43544,7 +43635,7 @@ const AsyncDataProvider = (e) => {
43544
43635
  const { refresh: e } = useResourceActionContext(), { resource: t, targetKey: o } = useResourceContext(), { [o]: n } = useRecord(), r = useForm(), { cascade: i } = (r == null ? void 0 : r.values) || {};
43545
43636
  return {
43546
43637
  run() {
43547
- return O(this, null, function* () {
43638
+ return V(this, null, function* () {
43548
43639
  yield t.destroy({ filterByTk: n, cascade: i }), e();
43549
43640
  });
43550
43641
  }
@@ -43553,7 +43644,7 @@ const AsyncDataProvider = (e) => {
43553
43644
  const { state: e, setState: t, refresh: o } = useResourceActionContext(), { resource: n } = useResourceContext(), r = useActionContext(), { t: i } = useTranslation(), a = useForm(), { cascade: l } = (a == null ? void 0 : a.values) || {};
43554
43645
  return {
43555
43646
  run(u) {
43556
- return O(this, null, function* () {
43647
+ return V(this, null, function* () {
43557
43648
  var d, p;
43558
43649
  if (!((d = e == null ? void 0 : e.selectedRowKeys) != null && d.length))
43559
43650
  return message.error(i("Please select the records you want to delete"));
@@ -43703,7 +43794,7 @@ const getSchema$1 = (e) => {
43703
43794
  };
43704
43795
  }, useCreateSubField = () => (useActionContext(), {
43705
43796
  run() {
43706
- return O(this, null, function* () {
43797
+ return V(this, null, function* () {
43707
43798
  });
43708
43799
  }
43709
43800
  }), AddSubFieldAction = () => {
@@ -43788,7 +43879,7 @@ const getSchema$1 = (e) => {
43788
43879
  const e = useForm(), { run: t } = useUpdateAction$1(), { refreshCM: o } = useCollectionManager_deprecated();
43789
43880
  return {
43790
43881
  run() {
43791
- return O(this, null, function* () {
43882
+ return V(this, null, function* () {
43792
43883
  var i, a, l;
43793
43884
  yield e.submit();
43794
43885
  const r = ((l = (a = (i = e == null ? void 0 : e.values) == null ? void 0 : i.uiSchema) == null ? void 0 : a.enum) == null ? void 0 : l.slice()) || [];
@@ -43809,7 +43900,7 @@ const getSchema$1 = (e) => {
43809
43900
  /* @__PURE__ */ jsx(
43810
43901
  "a",
43811
43902
  {
43812
- onClick: () => O(void 0, null, function* () {
43903
+ onClick: () => V(void 0, null, function* () {
43813
43904
  const c = getSchema(v(g({}, o(t.interface)), {
43814
43905
  default: t
43815
43906
  }));
@@ -48407,7 +48498,7 @@ class SqlCollectionTemplate extends CollectionTemplate {
48407
48498
  }
48408
48499
  class MainDataSource extends DataSource {
48409
48500
  getDataSource() {
48410
- return O(this, null, function* () {
48501
+ return V(this, null, function* () {
48411
48502
  var n;
48412
48503
  const t = yield this.app.apiClient.request({
48413
48504
  resource: "collections",
@@ -48429,7 +48520,7 @@ class MainDataSource extends DataSource {
48429
48520
  }
48430
48521
  class CollectionPlugin extends Plugin {
48431
48522
  load() {
48432
- return O(this, null, function* () {
48523
+ return V(this, null, function* () {
48433
48524
  this.dataSourceManager.addCollectionMixins([InheritanceCollectionMixin]), this.addFieldInterfaces(), this.addCollectionTemplates(), this.addFieldInterfaces(), this.addFieldInterfaceGroups(), this.addMainDataSource();
48434
48525
  });
48435
48526
  }
@@ -48890,7 +48981,7 @@ const toItems = (e = {}) => {
48890
48981
  l(((f = x == null ? void 0 : x.data) == null ? void 0 : f.map((C) => C["x-uid"])) || []);
48891
48982
  }
48892
48983
  }
48893
- ), d = o.resource("roles.menuUiSchemas", t.name), p = i.length === a.length, m = (x, f) => O(void 0, null, function* () {
48984
+ ), d = o.resource("roles.menuUiSchemas", t.name), p = i.length === a.length, m = (x, f) => V(void 0, null, function* () {
48894
48985
  const C = getParentUids(n, (b) => b.uid === f.uid), S = getChildrenUids(f == null ? void 0 : f.children, []);
48895
48986
  if (x) {
48896
48987
  const b = S.concat(f.uid), y = a.filter((F) => !b.includes(F));
@@ -48935,7 +49026,7 @@ const toItems = (e = {}) => {
48935
49026
  Checkbox$1,
48936
49027
  {
48937
49028
  checked: p,
48938
- onChange: (x) => O(void 0, null, function* () {
49029
+ onChange: (x) => V(void 0, null, function* () {
48939
49030
  p ? yield d.set({
48940
49031
  values: []
48941
49032
  }) : yield d.set({
@@ -48973,7 +49064,7 @@ const PermissionProvider = (e) => {
48973
49064
  {
48974
49065
  value: {
48975
49066
  currentRecord: i,
48976
- update: (l, c) => O(void 0, null, function* () {
49067
+ update: (l, c) => V(void 0, null, function* () {
48977
49068
  const { path: u, value: d } = l.getState();
48978
49069
  if (["ui.*", "pm", "pm.*"].includes(u)) {
48979
49070
  const p = t.resource("roles.snippets", o.name);
@@ -49044,7 +49135,7 @@ const PermissionProvider = (e) => {
49044
49135
  );
49045
49136
  },
49046
49137
  effects() {
49047
- onFieldChange("*", (n, r) => O(this, null, function* () {
49138
+ onFieldChange("*", (n, r) => V(this, null, function* () {
49048
49139
  r.modified && (yield e(n, r));
49049
49140
  }));
49050
49141
  }
@@ -49967,8 +50058,8 @@ const RolesResourcesActions = connect((e) => {
49967
50058
  name: A.name
49968
50059
  }, z = E.fields || [];
49969
50060
  if (M) {
49970
- const V = z.indexOf(N.name);
49971
- z.splice(V, 1);
50061
+ const O = z.indexOf(N.name);
50062
+ z.splice(O, 1);
49972
50063
  } else
49973
50064
  z.push(N.name);
49974
50065
  E.fields = z, m[A.name] = E, o(Object.values(m));
@@ -50336,7 +50427,7 @@ const PluginDetail = ({ plugin: e, onCancel: t }) => {
50336
50427
  const u = useForm();
50337
50428
  return {
50338
50429
  run() {
50339
- return O(this, null, function* () {
50430
+ return V(this, null, function* () {
50340
50431
  yield u.submit(), c.request({
50341
50432
  url: t ? "pm:update" : "pm:add",
50342
50433
  method: "post",
@@ -50444,7 +50535,7 @@ const PluginUploadForm = ({ onClose: e, pluginData: t, isUpgrade: o }) => {
50444
50535
  const c = useForm();
50445
50536
  return {
50446
50537
  run() {
50447
- return O(this, null, function* () {
50538
+ return V(this, null, function* () {
50448
50539
  var p, m;
50449
50540
  yield c.submit();
50450
50541
  const d = new FormData();
@@ -50523,7 +50614,7 @@ const PluginUploadForm = ({ onClose: e, pluginData: t, isUpgrade: o }) => {
50523
50614
  const c = useForm();
50524
50615
  return {
50525
50616
  run() {
50526
- return O(this, null, function* () {
50617
+ return V(this, null, function* () {
50527
50618
  const d = c.values.compressedFileUrl;
50528
50619
  if (!d)
50529
50620
  return;
@@ -50710,7 +50801,7 @@ function PluginInfo(e) {
50710
50801
  {
50711
50802
  disabled: u,
50712
50803
  title: S("Are you sure to delete this plugin?"),
50713
- onConfirm: (A) => O(this, null, function* () {
50804
+ onConfirm: (A) => V(this, null, function* () {
50714
50805
  A.stopPropagation(), b.request({
50715
50806
  url: "pm:remove",
50716
50807
  params: {
@@ -50745,7 +50836,7 @@ function PluginInfo(e) {
50745
50836
  "aria-label": "enable",
50746
50837
  size: "small",
50747
50838
  disabled: u || m,
50748
- onChange: (A, w) => O(this, null, function* () {
50839
+ onChange: (A, w) => V(this, null, function* () {
50749
50840
  if (w.stopPropagation(), !a && A) {
50750
50841
  message.error(S("Dependencies check failed, can't enable."));
50751
50842
  return;
@@ -50757,7 +50848,7 @@ function PluginInfo(e) {
50757
50848
  }
50758
50849
  }) : y.confirm({
50759
50850
  title: S("Are you sure to disable this plugin?"),
50760
- onOk: () => O(this, null, function* () {
50851
+ onOk: () => V(this, null, function* () {
50761
50852
  yield b.request({
50762
50853
  url: "pm:disable",
50763
50854
  params: {
@@ -50816,7 +50907,11 @@ const PluginCard = (e) => {
50816
50907
  r === "upload" && /* @__PURE__ */ jsx(PluginUploadForm, { onClose: e, isUpgrade: !1 }),
50817
50908
  r === "url" && /* @__PURE__ */ jsx(PluginUrlForm, { onClose: e })
50818
50909
  ] });
50819
- }, LocalPlugins = () => {
50910
+ };
50911
+ function hasIntersection(e, t) {
50912
+ return !Array.isArray(e) || !Array.isArray(t) ? !1 : e.some((o) => t.includes(o));
50913
+ }
50914
+ const LocalPlugins = () => {
50820
50915
  const { t: e } = useTranslation(), { theme: t } = useStyles$1(), { data: o, loading: n, refresh: r } = useRequest({
50821
50916
  url: "pm:list"
50822
50917
  }), i = useMemo(() => {
@@ -50858,7 +50953,7 @@ const PluginCard = (e) => {
50858
50953
  "Others"
50859
50954
  ], C = useMemo(() => f.map((F) => {
50860
50955
  if (F === "Others") {
50861
- const k = o == null ? void 0 : o.data.filter((A) => !A.keywords || !A.keywords.every((w) => f.includes(w)));
50956
+ const k = o == null ? void 0 : o.data.filter((A) => !hasIntersection(A.keywords, f));
50862
50957
  return {
50863
50958
  key: F,
50864
50959
  list: k
@@ -51135,7 +51230,7 @@ const AdminSettingsLayout = () => {
51135
51230
  };
51136
51231
  class PMPlugin extends Plugin {
51137
51232
  load() {
51138
- return O(this, null, function* () {
51233
+ return V(this, null, function* () {
51139
51234
  this.addComponents(), this.addRoutes(), this.addSettings();
51140
51235
  });
51141
51236
  }
@@ -51203,7 +51298,7 @@ const SettingCenterProvider = (e) => {
51203
51298
  c((f == null ? void 0 : f.data) || []);
51204
51299
  }
51205
51300
  }
51206
- ), h = n.resource("roles.snippets", o.name), x = (f, C) => O(void 0, null, function* () {
51301
+ ), h = n.resource("roles.snippets", o.name), x = (f, C) => V(void 0, null, function* () {
51207
51302
  const b = getChildrenKeys(C == null ? void 0 : C.children, []).concat(C.aclSnippet);
51208
51303
  f ? (yield h.add({
51209
51304
  values: b.map((y) => "!" + y)
@@ -51234,7 +51329,7 @@ const SettingCenterProvider = (e) => {
51234
51329
  Checkbox$1,
51235
51330
  {
51236
51331
  checked: u,
51237
- onChange: () => O(void 0, null, function* () {
51332
+ onChange: () => V(void 0, null, function* () {
51238
51333
  const f = a.map((C) => "!" + C);
51239
51334
  u ? yield h.add({
51240
51335
  values: f
@@ -51281,7 +51376,7 @@ const SettingCenterProvider = (e) => {
51281
51376
  }, ACLPane = () => /* @__PURE__ */ jsx(Card, { "data-testid": "acl-pane-card", bordered: !1, children: /* @__PURE__ */ jsx(SchemaComponent, { components, schema: schema2 }) });
51282
51377
  class ACLPlugin extends Plugin {
51283
51378
  load() {
51284
- return O(this, null, function* () {
51379
+ return V(this, null, function* () {
51285
51380
  this.app.addComponents({
51286
51381
  ACLCollectionFieldProvider,
51287
51382
  ACLActionProvider,
@@ -51489,7 +51584,7 @@ function AntdConfigProvider(e) {
51489
51584
  }
51490
51585
  class AntdConfigPlugin extends Plugin {
51491
51586
  load() {
51492
- return O(this, null, function* () {
51587
+ return V(this, null, function* () {
51493
51588
  var t;
51494
51589
  this.app.use(AntdConfigProvider, ((t = this.options) == null ? void 0 : t.config) || {});
51495
51590
  });
@@ -51573,7 +51668,7 @@ const PinnedPluginListProvider = (e) => {
51573
51668
  };
51574
51669
  class PinnedListPlugin extends Plugin {
51575
51670
  load() {
51576
- return O(this, null, function* () {
51671
+ return V(this, null, function* () {
51577
51672
  this.app.use(PinnedPluginListProvider, this.options.config);
51578
51673
  });
51579
51674
  }
@@ -51742,8 +51837,8 @@ const useMenuProps = () => {
51742
51837
  var M, N, E;
51743
51838
  const w = ((N = Object.values(((M = C == null ? void 0 : C.root) == null ? void 0 : M.properties) || {}).shift()) == null ? void 0 : N.properties) || ((E = I == null ? void 0 : I.data) == null ? void 0 : E.properties);
51744
51839
  if (x.current) {
51745
- const z = w && Object.values(w).find((R) => R["x-uid"] === c.name && R["x-component"] === "Menu.Item"), V = u == null ? void 0 : u.pathname.includes("/settings");
51746
- z || V ? x.current.style.display = "none" : x.current.style.display = "block";
51840
+ const z = w && Object.values(w).find((R) => R["x-uid"] === c.name && R["x-component"] === "Menu.Item"), O = u == null ? void 0 : u.pathname.includes("/settings");
51841
+ z || O ? x.current.style.display = "none" : x.current.style.display = "block";
51747
51842
  }
51748
51843
  }, [I == null ? void 0 : I.data, c.name, x]);
51749
51844
  const A = useMemo(() => {
@@ -52023,12 +52118,12 @@ const useMenuProps = () => {
52023
52118
  }, AdminProvider = (e) => /* @__PURE__ */ jsx(CurrentAppInfoProvider, { children: /* @__PURE__ */ jsx(NavigateIfNotSignIn, { children: /* @__PURE__ */ jsx(RemoteSchemaTemplateManagerProvider, { children: /* @__PURE__ */ jsx(RemoteCollectionManagerProvider, { children: /* @__PURE__ */ jsx(VariablesProvider, { children: /* @__PURE__ */ jsx(ACLRolesCheckProvider, { children: e.children }) }) }) }) }) }), AdminLayout = (e) => /* @__PURE__ */ jsx(AdminProvider, { children: /* @__PURE__ */ jsx(InternalAdminLayout, g({}, e)) });
52024
52119
  class AdminLayoutPlugin extends Plugin {
52025
52120
  afterAdd() {
52026
- return O(this, null, function* () {
52121
+ return V(this, null, function* () {
52027
52122
  yield this.app.pm.add(RemoteSchemaTemplateManagerPlugin);
52028
52123
  });
52029
52124
  }
52030
52125
  load() {
52031
- return O(this, null, function* () {
52126
+ return V(this, null, function* () {
52032
52127
  this.app.addComponents({ AdminLayout, AdminDynamicPage });
52033
52128
  });
52034
52129
  }
@@ -52581,7 +52676,7 @@ const ActionInitializerItem = (e) => {
52581
52676
  ), F = x || (i == null ? void 0 : i.targetKey) || "id", I = f || ((L = (q = a["x-component-props"]) == null ? void 0 : q.fieldNames) == null ? void 0 : L.label) || F, k = {
52582
52677
  title: I || F,
52583
52678
  key: F
52584
- }, [A, w] = useState([]), [M, N] = useState([]), [E, z] = useState(!0), V = useLabelUiSchema(i, (k == null ? void 0 : k.title) || "label");
52679
+ }, [A, w] = useState([]), [M, N] = useState([]), [E, z] = useState(!0), O = useLabelUiSchema(i, (k == null ? void 0 : k.title) || "label");
52585
52680
  if (!i)
52586
52681
  return null;
52587
52682
  const R = (K) => {
@@ -52648,7 +52743,7 @@ const ActionInitializerItem = (e) => {
52648
52743
  treeData: u,
52649
52744
  onSelect: j,
52650
52745
  fieldNames: k,
52651
- titleRender: (K) => /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: getLabelFormatValue(V, c(K[I])) }),
52746
+ titleRender: (K) => /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: getLabelFormatValue(O, c(K[I])) }),
52652
52747
  selectedKeys: M,
52653
52748
  blockNode: !0
52654
52749
  }
@@ -52965,7 +53060,7 @@ AssociationFilter.useAssociationField = () => {
52965
53060
  };
52966
53061
  class AssociationFilterPlugin extends Plugin {
52967
53062
  load() {
52968
- return O(this, null, function* () {
53063
+ return V(this, null, function* () {
52969
53064
  this.app.schemaInitializerManager.add(associationFilterFilterBlockInitializer), this.app.schemaInitializerManager.add(filterCollapseItemInitializer_deprecated), this.app.schemaInitializerManager.add(filterCollapseItemInitializer), this.app.schemaInitializerManager.add(associationFilterInitializer);
52970
53065
  });
52971
53066
  }
@@ -53063,7 +53158,7 @@ const AssociationFilterDesignerDelete = () => {
53063
53158
  v(g({
53064
53159
  icon: /* @__PURE__ */ jsx(TableOutlined, {})
53065
53160
  }, r), {
53066
- onClick: (h) => O(void 0, [h], function* ({ item: m }) {
53161
+ onClick: (h) => V(void 0, [h], function* ({ item: m }) {
53067
53162
  if (m.template) {
53068
53163
  const x = yield a(m);
53069
53164
  i(x);
@@ -53159,7 +53254,7 @@ const RecordAssociationDetailsBlockInitializer = () => {
53159
53254
  v(g({
53160
53255
  icon: /* @__PURE__ */ jsx(FormOutlined, {})
53161
53256
  }, r), {
53162
- onClick: (h) => O(void 0, [h], function* ({ item: m }) {
53257
+ onClick: (h) => V(void 0, [h], function* ({ item: m }) {
53163
53258
  if (m.template) {
53164
53259
  const x = yield a(m);
53165
53260
  i(x);
@@ -53230,10 +53325,7 @@ function createCreateFormBlockUISchema(e) {
53230
53325
  "x-initializer": "createForm:configureActions",
53231
53326
  "x-component": "ActionBar",
53232
53327
  "x-component-props": {
53233
- layout: "one-column",
53234
- style: {
53235
- marginTop: "var(--nb-spacing)"
53236
- }
53328
+ layout: "one-column"
53237
53329
  }
53238
53330
  }
53239
53331
  }
@@ -53248,7 +53340,7 @@ const RecordAssociationFormBlockInitializer = () => {
53248
53340
  v(g({
53249
53341
  icon: /* @__PURE__ */ jsx(FormOutlined, {})
53250
53342
  }, r), {
53251
- onClick: (h) => O(void 0, [h], function* ({ item: m }) {
53343
+ onClick: (h) => V(void 0, [h], function* ({ item: m }) {
53252
53344
  if (m.template) {
53253
53345
  const x = yield l(m);
53254
53346
  if (m.template.componentName === "FormItem") {
@@ -53380,7 +53472,7 @@ const createGridCardBlockUISchema = (e) => {
53380
53472
  v(g({
53381
53473
  icon: /* @__PURE__ */ jsx(TableOutlined, {})
53382
53474
  }, r), {
53383
- onClick: (h) => O(void 0, [h], function* ({ item: m }) {
53475
+ onClick: (h) => V(void 0, [h], function* ({ item: m }) {
53384
53476
  if (m.template) {
53385
53477
  const x = yield a(m);
53386
53478
  i(x);
@@ -53469,10 +53561,7 @@ const createListBlockUISchema = (e) => {
53469
53561
  "x-component": "ActionBar",
53470
53562
  "x-use-component-props": "useListActionBarProps",
53471
53563
  "x-component-props": {
53472
- layout: "one-column",
53473
- style: {
53474
- marginTop: "var(--nb-spacing)"
53475
- }
53564
+ layout: "one-column"
53476
53565
  }
53477
53566
  }
53478
53567
  }
@@ -53488,7 +53577,7 @@ const createListBlockUISchema = (e) => {
53488
53577
  v(g({
53489
53578
  icon: /* @__PURE__ */ jsx(TableOutlined, {})
53490
53579
  }, r), {
53491
- onClick: (h) => O(void 0, [h], function* ({ item: m }) {
53580
+ onClick: (h) => V(void 0, [h], function* ({ item: m }) {
53492
53581
  if (m.template) {
53493
53582
  const x = yield a(m);
53494
53583
  i(x);
@@ -53577,7 +53666,7 @@ const RecordReadPrettyAssociationFormBlockInitializer = () => {
53577
53666
  v(g({
53578
53667
  icon: /* @__PURE__ */ jsx(FormOutlined, {})
53579
53668
  }, r), {
53580
- onClick: (x) => O(void 0, [x], function* ({ item: h }) {
53669
+ onClick: (x) => V(void 0, [x], function* ({ item: h }) {
53581
53670
  if (h.template) {
53582
53671
  const f = yield l(h);
53583
53672
  if (h.template.componentName === "ReadPrettyFormItem") {
@@ -54030,7 +54119,7 @@ const SelectActionInitializer = (e) => {
54030
54119
  v(g({}, c), {
54031
54120
  icon: /* @__PURE__ */ jsx(TableOutlined, {}),
54032
54121
  componentType: n,
54033
- onCreateBlockSchema: (d) => O(void 0, null, function* () {
54122
+ onCreateBlockSchema: (d) => V(void 0, null, function* () {
54034
54123
  if (r)
54035
54124
  return r(d);
54036
54125
  u(d);
@@ -54247,7 +54336,7 @@ function useCreateSingleDetailsSchema() {
54247
54336
  [o]
54248
54337
  );
54249
54338
  return { createSingleDetailsSchema: useCallback(
54250
- (a) => O(this, [a], function* ({ item: i }) {
54339
+ (a) => V(this, [a], function* ({ item: i }) {
54251
54340
  if (i.template) {
54252
54341
  const l = yield t(i);
54253
54342
  e(n(l, { item: i }));
@@ -54398,10 +54487,7 @@ function createEditFormBlockUISchema(e) {
54398
54487
  "x-initializer": "editForm:configureActions",
54399
54488
  "x-component": "ActionBar",
54400
54489
  "x-component-props": {
54401
- layout: "one-column",
54402
- style: {
54403
- marginTop: "var(--nb-spacing)"
54404
- }
54490
+ layout: "one-column"
54405
54491
  }
54406
54492
  }
54407
54493
  }
@@ -54416,7 +54502,7 @@ const RecordFormBlockInitializer = () => {
54416
54502
  v(g({
54417
54503
  icon: /* @__PURE__ */ jsx(FormOutlined, {})
54418
54504
  }, o), {
54419
- onClick: (p) => O(void 0, [p], function* ({ item: d }) {
54505
+ onClick: (p) => V(void 0, [p], function* ({ item: d }) {
54420
54506
  if (d.template) {
54421
54507
  const m = yield r(d);
54422
54508
  n(c(m, { item: d }));
@@ -54721,7 +54807,7 @@ const commonOptions$e = {
54721
54807
  v(g({}, l), {
54722
54808
  icon: /* @__PURE__ */ jsx(OrderedListOutlined, {}),
54723
54809
  componentType: "GridCard",
54724
- onCreateBlockSchema: (u) => O(void 0, null, function* () {
54810
+ onCreateBlockSchema: (u) => V(void 0, null, function* () {
54725
54811
  if (n)
54726
54812
  return n(u);
54727
54813
  c(u);
@@ -54926,7 +55012,7 @@ const commonOptions$e = {
54926
55012
  v(g({}, l), {
54927
55013
  icon: /* @__PURE__ */ jsx(OrderedListOutlined, {}),
54928
55014
  componentType: "List",
54929
- onCreateBlockSchema: (u) => O(void 0, null, function* () {
55015
+ onCreateBlockSchema: (u) => V(void 0, null, function* () {
54930
55016
  if (n)
54931
55017
  return n(u);
54932
55018
  c(u);
@@ -55092,7 +55178,7 @@ const commonOptions$e = {
55092
55178
  v(g({
55093
55179
  icon: /* @__PURE__ */ jsx(FormOutlined, {})
55094
55180
  }, r), {
55095
- onClick: () => O(void 0, null, function* () {
55181
+ onClick: () => V(void 0, null, function* () {
55096
55182
  i(
55097
55183
  createTableSelectorUISchema({
55098
55184
  rowKey: a.filterTargetKey,
@@ -55143,7 +55229,7 @@ const commonOptions$e = {
55143
55229
  onlyCurrentDataSource: t,
55144
55230
  icon: /* @__PURE__ */ jsx(TableOutlined, {}),
55145
55231
  componentType: "FilterCollapse",
55146
- onCreateBlockSchema: (a) => O(void 0, [a], function* ({ item: i }) {
55232
+ onCreateBlockSchema: (a) => V(void 0, [a], function* ({ item: i }) {
55147
55233
  const l = createCollapseBlockSchema({
55148
55234
  dataSource: i.dataSource,
55149
55235
  collectionName: i.collectionName || i.name,
@@ -55219,8 +55305,7 @@ const commonOptions$e = {
55219
55305
  "x-component-props": {
55220
55306
  layout: "one-column",
55221
55307
  style: {
55222
- float: "right",
55223
- marginTop: "var(--nb-spacing)"
55308
+ float: "right"
55224
55309
  }
55225
55310
  }
55226
55311
  }
@@ -55431,7 +55516,7 @@ const commonOptions$e = {
55431
55516
  const e = {}, t = useSchemaInitializerItem();
55432
55517
  return /* @__PURE__ */ jsx(InitializerWithSwitch, v(g({}, t), { schema: e, item: t, type: "x-collection-field" }));
55433
55518
  }, LinkMenuItem = () => {
55434
- const { insert: e } = useSchemaInitializer(), { t } = useTranslation(), o = useContext(SchemaOptionsContext), { theme: n } = useGlobalTheme(), { styles: r } = useStyles$4(), i = useCallback(() => O(void 0, null, function* () {
55519
+ const { insert: e } = useSchemaInitializer(), { t } = useTranslation(), o = useContext(SchemaOptionsContext), { theme: n } = useGlobalTheme(), { styles: r } = useStyles$4(), i = useCallback(() => V(void 0, null, function* () {
55435
55520
  const a = yield FormDialog(
55436
55521
  t("Add link"),
55437
55522
  () => /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: o.scope, components: g({}, o.components), children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(
@@ -55486,7 +55571,7 @@ const commonOptions$e = {
55486
55571
  }), [e, o.components, o.scope, t, n]);
55487
55572
  return /* @__PURE__ */ jsx(SchemaInitializerItem, { title: t("Link"), onClick: i, className: r.menuItem });
55488
55573
  }, PageMenuItem = () => {
55489
- const { insert: e } = useSchemaInitializer(), { t } = useTranslation(), o = useContext(SchemaOptionsContext), { theme: n } = useGlobalTheme(), { styles: r } = useStyles$4(), i = useCallback(() => O(void 0, null, function* () {
55574
+ const { insert: e } = useSchemaInitializer(), { t } = useTranslation(), o = useContext(SchemaOptionsContext), { theme: n } = useGlobalTheme(), { styles: r } = useStyles$4(), i = useCallback(() => V(void 0, null, function* () {
55490
55575
  const a = yield FormDialog(
55491
55576
  t("Add page"),
55492
55577
  () => /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: o.scope, components: g({}, o.components), children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(
@@ -55550,7 +55635,7 @@ const commonOptions$e = {
55550
55635
  }), [e, o.components, o.scope, t, n]);
55551
55636
  return /* @__PURE__ */ jsx(SchemaInitializerItem, { title: t("Page"), onClick: i, className: r.menuItem });
55552
55637
  }, GroupItem = () => {
55553
- const { insert: e } = useSchemaInitializer(), { t } = useTranslation(), o = useContext(SchemaOptionsContext), { theme: n } = useGlobalTheme(), { styles: r } = useStyles$4(), i = useCallback(() => O(void 0, null, function* () {
55638
+ const { insert: e } = useSchemaInitializer(), { t } = useTranslation(), o = useContext(SchemaOptionsContext), { theme: n } = useGlobalTheme(), { styles: r } = useStyles$4(), i = useCallback(() => V(void 0, null, function* () {
55554
55639
  const a = yield FormDialog(
55555
55640
  t("Add group"),
55556
55641
  () => /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: o.scope, components: g({}, o.components), children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(
@@ -56020,7 +56105,7 @@ const commonOptions$2 = {
56020
56105
  let h = a;
56021
56106
  return h || (h = "popup:common:addBlock", n || !c ? h = "popup:addNew:addBlock" : r && (h = "popup:bulkEdit:addBlock")), {
56022
56107
  run() {
56023
- return O(this, null, function* () {
56108
+ return V(this, null, function* () {
56024
56109
  yield p.submit();
56025
56110
  const { title: f, icon: C } = p.values;
56026
56111
  o({
@@ -56092,7 +56177,7 @@ const commonOptions$2 = {
56092
56177
  const p = useActionContext();
56093
56178
  return {
56094
56179
  run() {
56095
- return O(this, null, function* () {
56180
+ return V(this, null, function* () {
56096
56181
  p.setVisible(!1);
56097
56182
  });
56098
56183
  }
@@ -56135,7 +56220,7 @@ const commonOptions$2 = {
56135
56220
  });
56136
56221
  class SchemaInitializerPlugin extends Plugin {
56137
56222
  load() {
56138
- return O(this, null, function* () {
56223
+ return V(this, null, function* () {
56139
56224
  this.app.addComponents(v(g(g({}, initializerComponents), items), {
56140
56225
  DestroyActionInitializer,
56141
56226
  FormBlockInitializer,
@@ -56176,7 +56261,7 @@ class LocalePlugin extends Plugin {
56176
56261
  P(this, "locales", {});
56177
56262
  }
56178
56263
  afterAdd() {
56179
- return O(this, null, function* () {
56264
+ return V(this, null, function* () {
56180
56265
  var r, i, a, l, c, u, d;
56181
56266
  const o = this.app.apiClient, n = o.auth.locale;
56182
56267
  try {
@@ -56378,7 +56463,7 @@ const AppSpin = () => /* @__PURE__ */ jsx(Spin, { style: { position: "fixed", to
56378
56463
  };
56379
56464
  class NocoBaseBuildInPlugin extends Plugin {
56380
56465
  afterAdd() {
56381
- return O(this, null, function* () {
56466
+ return V(this, null, function* () {
56382
56467
  this.app.addComponents({
56383
56468
  AppSpin,
56384
56469
  AppError,
@@ -56389,7 +56474,7 @@ class NocoBaseBuildInPlugin extends Plugin {
56389
56474
  });
56390
56475
  }
56391
56476
  load() {
56392
- return O(this, null, function* () {
56477
+ return V(this, null, function* () {
56393
56478
  this.addComponents(), this.addRoutes(), this.app.use(CurrentUserProvider), this.app.use(CurrentUserSettingsMenuProvider);
56394
56479
  });
56395
56480
  }
@@ -56417,7 +56502,7 @@ class NocoBaseBuildInPlugin extends Plugin {
56417
56502
  });
56418
56503
  }
56419
56504
  addPlugins() {
56420
- return O(this, null, function* () {
56505
+ return V(this, null, function* () {
56421
56506
  yield this.app.pm.add(AssociationFilterPlugin), yield this.app.pm.add(LocalePlugin, { name: "builtin-locale" }), yield this.app.pm.add(AdminLayoutPlugin, { name: "admin-layout" }), yield this.app.pm.add(SystemSettingsPlugin, { name: "system-setting" }), yield this.app.pm.add(PinnedListPlugin, {
56422
56507
  name: "pinned-list",
56423
56508
  config: {
@@ -56629,7 +56714,6 @@ export {
56629
56714
  DatePicker,
56630
56715
  DatePickerProvider,
56631
56716
  DatetimeFieldInterface,
56632
- DeclareVariable,
56633
56717
  DefaultValueProvider,
56634
56718
  DeleteCollection,
56635
56719
  DeleteCollectionAction,
@@ -56676,7 +56760,10 @@ export {
56676
56760
  FilterAssociatedFields,
56677
56761
  FilterBlockProvider,
56678
56762
  FilterBlockType,
56763
+ FilterContext$1 as FilterContext,
56764
+ FilterDynamicComponent,
56679
56765
  FilterFormBlockProvider,
56766
+ FilterLogicContext,
56680
56767
  FilterParentCollectionFields,
56681
56768
  FixedBlock,
56682
56769
  FixedBlockDesignerItem,
@@ -56799,6 +56886,7 @@ export {
56799
56886
  RemoteSchemaTemplateManagerProvider,
56800
56887
  RemoteSelect,
56801
56888
  RemoveButton,
56889
+ RemoveConditionContext,
56802
56890
  RenderChildrenWithAssociationFilter,
56803
56891
  RequestSettings,
56804
56892
  Resizable,
@@ -56964,6 +57052,7 @@ export {
56964
57052
  UrlFieldInterface,
56965
57053
  Variable,
56966
57054
  VariableInput,
57055
+ VariablePopupRecordProvider,
56967
57056
  VariableScopeProvider,
56968
57057
  VariablesContext,
56969
57058
  VariablesProvider,