@nocobase/client 1.6.17 → 1.6.19

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 Y = (e, t) => {
21
21
  return n;
22
22
  };
23
23
  var A = (e, t, n) => (Re(e, typeof t != "symbol" ? t + "" : t, n), n);
24
- var q = (e, t, n) => new Promise((o, r) => {
24
+ var V = (e, t, n) => new Promise((o, r) => {
25
25
  var i = (c) => {
26
26
  try {
27
27
  l(n.next(c));
@@ -106,7 +106,7 @@ import * as formilyReactiveReact from "@formily/reactive-react";
106
106
  import { observer } from "@formily/reactive-react";
107
107
  import cronstrue from "cronstrue";
108
108
  import * as antdStyle from "antd-style";
109
- import { createStyles, useAntdToken } from "antd-style";
109
+ import { createStyles, createGlobalStyle, useAntdToken } from "antd-style";
110
110
  import { createStyles as yn } from "antd-style";
111
111
  import JSON5 from "json5";
112
112
  import { usePrefixCls as usePrefixCls$1, dayjsable, formatDayjsValue } from "@formily/antd-v5/esm/__builtins__";
@@ -4193,7 +4193,7 @@ class APIClient extends APIClient$1 {
4193
4193
  return (a = (i = n == null ? void 0 : n.response) == null ? void 0 : i.data) != null && a.error ? [(c = (l = n == null ? void 0 : n.response) == null ? void 0 : l.data) == null ? void 0 : c.error] : ((d = (u = n == null ? void 0 : n.response) == null ? void 0 : u.data) == null ? void 0 : d.errors) || ((m = (p = n == null ? void 0 : n.response) == null ? void 0 : p.data) == null ? void 0 : m.messages) || ((h = n == null ? void 0 : n.response) == null ? void 0 : h.error) || [{ message: n.message || "Server error" }];
4194
4194
  }
4195
4195
  handleNotificationError(n) {
4196
- return q(this, null, function* () {
4196
+ return V(this, null, function* () {
4197
4197
  var i, a, l, c, u, d, p, m, h, g;
4198
4198
  if (this.silence)
4199
4199
  throw n;
@@ -4282,13 +4282,13 @@ function assign(e, t, n = {}) {
4282
4282
  function useRequest(e, t = {}) {
4283
4283
  const [n, o] = useSetState({}), r = useAPIClient();
4284
4284
  let i;
4285
- typeof e == "function" ? i = e : e ? i = (...u) => q(this, [...u], function* (c = {}) {
4285
+ typeof e == "function" ? i = e : e ? i = (...u) => V(this, [...u], function* (c = {}) {
4286
4286
  const { resource: d, url: p } = e;
4287
4287
  let m = cloneDeep(e);
4288
4288
  d || p ? (m.params = m.params || {}, assign(m.params, c)) : m = merge(m, c);
4289
4289
  const h = yield r.request(m);
4290
4290
  return h == null ? void 0 : h.data;
4291
- }) : i = () => q(this, null, function* () {
4291
+ }) : i = () => V(this, null, function* () {
4292
4292
  });
4293
4293
  const a = P(x({}, t), {
4294
4294
  onSuccess(...c) {
@@ -4490,7 +4490,7 @@ class Collection {
4490
4490
  const { ConfigContext } = ConfigProvider, useConfig = () => useContext(ConfigContext), usePrefixCls = (e, t) => {
4491
4491
  const { getPrefixCls: n } = useContext(ConfigProvider.ConfigContext) || {};
4492
4492
  return "ConfigContext" in ConfigProvider ? (n == null ? void 0 : n(e, t == null ? void 0 : t.prefixCls)) || "" : `ant-${e != null ? e : ""}`;
4493
- }, useToken$1 = () => theme.useToken(), loading = (e = "Loading...", t) => q(void 0, null, function* () {
4493
+ }, useToken$1 = () => theme.useToken(), loading = (e = "Loading...", t) => V(void 0, null, function* () {
4494
4494
  let n = null;
4495
4495
  const o = setTimeout(() => {
4496
4496
  n = message.loading(e);
@@ -4530,7 +4530,7 @@ function legacyUnmount(e) {
4530
4530
  return unmountComponentAtNode(e);
4531
4531
  }
4532
4532
  function concurrentUnmount(e) {
4533
- return q(this, null, function* () {
4533
+ return V(this, null, function* () {
4534
4534
  return Promise.resolve().then(() => {
4535
4535
  var t;
4536
4536
  (t = e[MARK]) == null || t.unmount(), delete e[MARK];
@@ -4789,7 +4789,7 @@ class DataSource {
4789
4789
  this.reloadCallbacks = this.reloadCallbacks.filter((n) => n !== t);
4790
4790
  }
4791
4791
  reload() {
4792
- return q(this, null, function* () {
4792
+ return V(this, null, function* () {
4793
4793
  const t = yield this.getDataSource();
4794
4794
  return this.setOptions(t), this.collectionManager.setCollections(t.collections || []), this.reloadCallbacks.forEach((n) => n(t.collections)), this.options;
4795
4795
  });
@@ -5972,7 +5972,7 @@ class DataSourceManager {
5972
5972
  return this.dataSourceInstancesMap[o.key] = o, o;
5973
5973
  }
5974
5974
  addDataSources(t, n) {
5975
- return q(this, null, function* () {
5975
+ return V(this, null, function* () {
5976
5976
  this.multiDataSources.some(([o, r]) => o === t && r === n) || this.multiDataSources.push([t, n]);
5977
5977
  });
5978
5978
  }
@@ -5995,9 +5995,9 @@ class DataSourceManager {
5995
5995
  this.collectionFieldInterfaceManager.addFieldInterfaces(t);
5996
5996
  }
5997
5997
  reload() {
5998
- return q(this, null, function* () {
5998
+ return V(this, null, function* () {
5999
5999
  return yield Promise.all(
6000
- this.multiDataSources.map((o) => q(this, [o], function* ([t, n]) {
6000
+ this.multiDataSources.map((o) => V(this, [o], function* ([t, n]) {
6001
6001
  (yield t()).map((i) => this.addDataSource(n, i));
6002
6002
  }))
6003
6003
  ), Promise.all(this.getDataSources().map((t) => t.reload()));
@@ -6634,7 +6634,7 @@ function useRecordRequest(e) {
6634
6634
  const F = r.filterByTk === void 0 ? _.omit(r, "filterByTk") : r;
6635
6635
  return (I = n[o]) == null ? void 0 : I.call(n, x(x({}, F), v)).then((w) => w.data);
6636
6636
  };
6637
- return useRequest((...v) => q(this, null, function* () {
6637
+ return useRequest((...v) => V(this, null, function* () {
6638
6638
  const [F, I] = yield Promise.all([
6639
6639
  (a || b)(...v),
6640
6640
  requestParentRecordData({ sourceId: c, association: u, parentRecord: d, api: p, headers: h, sourceKey: g })
@@ -6647,7 +6647,7 @@ function useRecordRequest(e) {
6647
6647
  }));
6648
6648
  }
6649
6649
  function requestParentRecordData(a) {
6650
- return q(this, arguments, function* ({
6650
+ return V(this, arguments, function* ({
6651
6651
  sourceId: e,
6652
6652
  association: t,
6653
6653
  parentRecord: n,
@@ -7181,14 +7181,14 @@ function getAllKeys(e) {
7181
7181
  }
7182
7182
  return n(e), t;
7183
7183
  }
7184
- const conditionAnalyses = (i, a) => q(void 0, [i, a], function* ({
7184
+ const conditionAnalyses = (i, a) => V(void 0, [i, a], function* ({
7185
7185
  ruleGroup: e,
7186
7186
  variables: t,
7187
7187
  localVariables: n,
7188
7188
  variableNameOfLeftCondition: o
7189
7189
  }, r) {
7190
7190
  const l = Object.keys(e)[0] || "$and";
7191
- let u = e[l].map((d) => q(void 0, null, function* () {
7191
+ let u = e[l].map((d) => V(void 0, null, function* () {
7192
7192
  if ("$and" in d || "$or" in d)
7193
7193
  return yield conditionAnalyses({ ruleGroup: d, variables: t, localVariables: n }, r);
7194
7194
  const p = getInnermostKeyAndValue(d), m = p == null ? void 0 : p.key;
@@ -7224,7 +7224,7 @@ const getVariablesData = (e) => {
7224
7224
  }), t;
7225
7225
  };
7226
7226
  function getRenderContent(e, t, n, o, r) {
7227
- return q(this, null, function* () {
7227
+ return V(this, null, function* () {
7228
7228
  var i, a;
7229
7229
  if (t && e === "handlebars")
7230
7230
  try {
@@ -7342,7 +7342,7 @@ function getSubscriber({
7342
7342
  variableNameOfLeftCondition: i
7343
7343
  },
7344
7344
  a
7345
- ), setTimeout(() => q(this, null, function* () {
7345
+ ), setTimeout(() => V(this, null, function* () {
7346
7346
  var d;
7347
7347
  const l = getFieldNameByOperator(e.operator);
7348
7348
  if (!((d = t.stateOfLinkageRules) != null && d[l]))
@@ -7411,7 +7411,7 @@ const collectFieldStateOfLinkageRules = ({ operator: e, value: t, field: n, cond
7411
7411
  break;
7412
7412
  case ActionType.Value:
7413
7413
  {
7414
- const I = () => q(void 0, null, function* () {
7414
+ const I = () => V(void 0, null, function* () {
7415
7415
  var w;
7416
7416
  if ((t == null ? void 0 : t.mode) === "express") {
7417
7417
  if ((t.value || t.result) == null)
@@ -7438,7 +7438,7 @@ const collectFieldStateOfLinkageRules = ({ operator: e, value: t, field: n, cond
7438
7438
  }
7439
7439
  };
7440
7440
  function getTempFieldState(e, t) {
7441
- return q(this, null, function* () {
7441
+ return V(this, null, function* () {
7442
7442
  return [e, t] = yield Promise.all([e, t]), {
7443
7443
  condition: e,
7444
7444
  value: t
@@ -7450,7 +7450,7 @@ function isConditionEmpty(e) {
7450
7450
  return _.isEmpty(n);
7451
7451
  }
7452
7452
  function replaceVariables(o, r) {
7453
- return q(this, arguments, function* (e, {
7453
+ return V(this, arguments, function* (e, {
7454
7454
  variables: t,
7455
7455
  localVariables: n
7456
7456
  }) {
@@ -7458,7 +7458,7 @@ function replaceVariables(o, r) {
7458
7458
  const i = {}, a = {};
7459
7459
  if (e == null)
7460
7460
  return;
7461
- const l = (c = e.match(REGEX_OF_VARIABLE_IN_EXPRESSION)) == null ? void 0 : c.map((u) => q(this, null, function* () {
7461
+ const l = (c = e.match(REGEX_OF_VARIABLE_IN_EXPRESSION)) == null ? void 0 : c.map((u) => V(this, null, function* () {
7462
7462
  const { value: d } = yield t.parseVariable(u, n, {
7463
7463
  doNotRequest: u.includes("$nForm")
7464
7464
  }), p = `_${uid$1()}`;
@@ -7931,7 +7931,7 @@ function getRemotePlugins(e, t = []) {
7931
7931
  });
7932
7932
  }
7933
7933
  function getPlugins(e) {
7934
- return q(this, null, function* () {
7934
+ return V(this, null, function* () {
7935
7935
  const { requirejs: t, pluginData: n, devDynamicImport: o } = e;
7936
7936
  if (n.length === 0)
7937
7937
  return [];
@@ -7976,12 +7976,12 @@ let PluginManager$1 = class {
7976
7976
  * @internal
7977
7977
  */
7978
7978
  init(t) {
7979
- return q(this, null, function* () {
7979
+ return V(this, null, function* () {
7980
7980
  yield this.initStaticPlugins(t), this.loadRemotePlugins && (yield this.initRemotePlugins());
7981
7981
  });
7982
7982
  }
7983
7983
  initStaticPlugins() {
7984
- return q(this, arguments, function* (t = []) {
7984
+ return V(this, arguments, function* (t = []) {
7985
7985
  try {
7986
7986
  for (var n = ke(t), o, r, i; o = !(r = yield n.next()).done; o = !1) {
7987
7987
  const a = r.value;
@@ -8001,7 +8001,7 @@ let PluginManager$1 = class {
8001
8001
  });
8002
8002
  }
8003
8003
  initRemotePlugins() {
8004
- return q(this, null, function* () {
8004
+ return V(this, null, function* () {
8005
8005
  var r;
8006
8006
  const t = yield this.app.apiClient.request({ url: "pm:listEnabled" }), n = ((r = t == null ? void 0 : t.data) == null ? void 0 : r.data) || [], o = yield getPlugins({
8007
8007
  requirejs: this.app.requirejs,
@@ -8027,7 +8027,7 @@ let PluginManager$1 = class {
8027
8027
  });
8028
8028
  }
8029
8029
  add(o) {
8030
- return q(this, arguments, function* (t, n = {}) {
8030
+ return V(this, arguments, function* (t, n = {}) {
8031
8031
  const r = this.getInstance(t, n);
8032
8032
  this.pluginInstances.set(t, r), n.name && (this.pluginsAliases[n.name] = r), n.packageName && (this.pluginsAliases[n.packageName] = r), yield r.afterAdd();
8033
8033
  });
@@ -8042,7 +8042,7 @@ let PluginManager$1 = class {
8042
8042
  * @internal
8043
8043
  */
8044
8044
  load() {
8045
- return q(this, null, function* () {
8045
+ return V(this, null, function* () {
8046
8046
  yield this.initPlugins;
8047
8047
  for (const t of this.pluginInstances.values())
8048
8048
  yield t.beforeLoad();
@@ -8407,9 +8407,9 @@ class WebSocketClient {
8407
8407
  for (const { type: o, listener: r, options: i } of this.events)
8408
8408
  this._ws.addEventListener(o, r, i);
8409
8409
  n = setInterval(() => this.send("ping"), this.pingInterval), this.connected = !0, this.emit("open", {});
8410
- }, t.onerror = () => q(this, null, function* () {
8410
+ }, t.onerror = () => V(this, null, function* () {
8411
8411
  console.log("onerror", this.readyState, this._reconnectTimes);
8412
- }), t.onclose = (o) => q(this, null, function* () {
8412
+ }), t.onclose = (o) => V(this, null, function* () {
8413
8413
  setTimeout(() => this.connect(), this.reconnectInterval), console.log("onclose", this.readyState, this._reconnectTimes, this.serverDown), this.connected = !1, clearInterval(n);
8414
8414
  });
8415
8415
  }
@@ -8703,7 +8703,7 @@ const SchemaInitializerSubMenuContext = React.createContext({}), SchemaInitializ
8703
8703
  const n = useLocationNoUpdate(), [o, r] = React.useState(!1), i = useAPIClient();
8704
8704
  return {
8705
8705
  loading: o,
8706
- download: () => q(void 0, null, function* () {
8706
+ download: () => V(void 0, null, function* () {
8707
8707
  r(!0);
8708
8708
  try {
8709
8709
  const a = yield i.request({
@@ -8792,7 +8792,7 @@ const options$1 = {
8792
8792
  const t = useAPIClient(), n = useIsAdminPage(), o = t.auth.getToken() || "", r = useRequest(options$1, {
8793
8793
  refreshDeps: [n, o],
8794
8794
  ready: !!(n && o)
8795
- }), i = useCallback(() => q(void 0, null, function* () {
8795
+ }), i = useCallback(() => V(void 0, null, function* () {
8796
8796
  const { data: c } = yield t.request(options$1);
8797
8797
  return r.mutate(c), (c == null ? void 0 : c.data) || [];
8798
8798
  }), [r]), a = useMemo(() => {
@@ -8944,7 +8944,7 @@ const useSelectedRowKeys = () => {
8944
8944
  const e = useContext(DataSourceContext_deprecated), t = useForm(), { setVisible: n } = useActionContext();
8945
8945
  return {
8946
8946
  run() {
8947
- return q(this, null, function* () {
8947
+ return V(this, null, function* () {
8948
8948
  console.log("form.values", t.values);
8949
8949
  const r = e.dataSource || [];
8950
8950
  r.push(cloneDeep$1(t.values)), e.setDataSource([...r]), n(!1), yield t.reset();
@@ -8955,7 +8955,7 @@ const useSelectedRowKeys = () => {
8955
8955
  const e = useContext(DataSourceContext_deprecated), { selectedRowKeys: t, setSelectedRowKeys: n } = e;
8956
8956
  return {
8957
8957
  run() {
8958
- return q(this, null, function* () {
8958
+ return V(this, null, function* () {
8959
8959
  const r = e.dataSource || [];
8960
8960
  e.setDataSource(
8961
8961
  r.filter((i, a) => !t.includes(a))
@@ -8967,7 +8967,7 @@ const useSelectedRowKeys = () => {
8967
8967
  const e = useRecordIndex(), t = useForm(), { setVisible: n } = useActionContext(), o = useContext(DataSourceContext_deprecated);
8968
8968
  return {
8969
8969
  run() {
8970
- return q(this, null, function* () {
8970
+ return V(this, null, function* () {
8971
8971
  const a = ((o == null ? void 0 : o.dataSource) || []).map((l, c) => c === e ? x({}, t.values) : l);
8972
8972
  o.setDataSource([...a]), n(!1);
8973
8973
  });
@@ -8977,7 +8977,7 @@ const useSelectedRowKeys = () => {
8977
8977
  const e = useRecordIndex(), t = useContext(DataSourceContext_deprecated);
8978
8978
  return {
8979
8979
  run() {
8980
- return q(this, null, function* () {
8980
+ return V(this, null, function* () {
8981
8981
  const o = t.dataSource || [];
8982
8982
  t.setDataSource(
8983
8983
  o.filter((r, i) => e !== i)
@@ -9184,7 +9184,7 @@ function addAppVersion(e, t) {
9184
9184
  addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
9185
9185
  }), e;
9186
9186
  }
9187
- const name = "@nocobase/client", version = "1.6.17", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
9187
+ const name = "@nocobase/client", version = "1.6.19", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
9188
9188
  "@ahooksjs/use-url-state": "3.5.1",
9189
9189
  "@ant-design/cssinjs": "^1.11.1",
9190
9190
  "@ant-design/icons": "^5.6.1",
@@ -9206,9 +9206,9 @@ const name = "@nocobase/client", version = "1.6.17", license = "AGPL-3.0", main
9206
9206
  "@formily/reactive-react": "^2.2.27",
9207
9207
  "@formily/shared": "^2.2.27",
9208
9208
  "@formily/validator": "^2.2.27",
9209
- "@nocobase/evaluators": "1.6.17",
9210
- "@nocobase/sdk": "1.6.17",
9211
- "@nocobase/utils": "1.6.17",
9209
+ "@nocobase/evaluators": "1.6.19",
9210
+ "@nocobase/sdk": "1.6.19",
9211
+ "@nocobase/utils": "1.6.19",
9212
9212
  ahooks: "^3.7.2",
9213
9213
  antd: "5.12.8",
9214
9214
  "antd-style": "3.7.1",
@@ -9332,7 +9332,7 @@ class Designable {
9332
9332
  });
9333
9333
  }), r["x-uid"] && a.length ? a : [];
9334
9334
  };
9335
- this.on("insertAdjacent", (p) => q(this, [p], function* ({ onSuccess: r, current: i, position: a, schema: l, wrap: c, wrapped: u, removed: d }) {
9335
+ this.on("insertAdjacent", (p) => V(this, [p], function* ({ onSuccess: r, current: i, position: a, schema: l, wrap: c, wrapped: u, removed: d }) {
9336
9336
  var g;
9337
9337
  let m = [];
9338
9338
  if ((u == null ? void 0 : u["x-component"]) === "Grid.Col" && (m = m.concat(o(u.parent))), (d == null ? void 0 : d["x-component"]) === "Grid.Col" && (m = m.concat(o(d.parent))), this.refresh(), !i["x-uid"])
@@ -9353,25 +9353,25 @@ class Designable {
9353
9353
  url: `/uiSchemas:remove/${d["x-uid"]}`,
9354
9354
  method: "post"
9355
9355
  })), r == null || r((g = h == null ? void 0 : h.data) == null ? void 0 : g.data), message.success(n("Saved successfully"), 0.2);
9356
- })), this.on("patch", (i) => q(this, [i], function* ({ schema: r }) {
9356
+ })), this.on("patch", (i) => V(this, [i], function* ({ schema: r }) {
9357
9357
  this.refresh(), r != null && r["x-uid"] && (yield t.request({
9358
9358
  url: "/uiSchemas:patch",
9359
9359
  method: "post",
9360
9360
  data: x({}, r)
9361
9361
  }), message.success(n("Saved successfully"), 0.2));
9362
- })), this.on("initializeActionContext", (i) => q(this, [i], function* ({ schema: r }) {
9362
+ })), this.on("initializeActionContext", (i) => V(this, [i], function* ({ schema: r }) {
9363
9363
  r != null && r["x-uid"] && (yield t.request({
9364
9364
  url: "/uiSchemas:initializeActionContext",
9365
9365
  method: "post",
9366
9366
  data: x({}, r)
9367
9367
  }));
9368
- })), this.on("batchPatch", (i) => q(this, [i], function* ({ schemas: r }) {
9368
+ })), this.on("batchPatch", (i) => V(this, [i], function* ({ schemas: r }) {
9369
9369
  this.refresh(), yield t.request({
9370
9370
  url: "/uiSchemas:batchPatch",
9371
9371
  method: "post",
9372
9372
  data: r
9373
9373
  }), message.success(n("Saved successfully"), 0.2);
9374
- })), this.on("remove", (i) => q(this, [i], function* ({ removed: r }) {
9374
+ })), this.on("remove", (i) => V(this, [i], function* ({ removed: r }) {
9375
9375
  let a = [];
9376
9376
  (r == null ? void 0 : r["x-component"]) === "Grid.Col" && (a = o(r.parent)), this.refresh(), r != null && r["x-uid"] && (yield t.request({
9377
9377
  url: `/uiSchemas:remove/${r["x-uid"]}`,
@@ -9390,7 +9390,7 @@ class Designable {
9390
9390
  this.events[t] || (this.events[t] = []), this.events[t].push(n);
9391
9391
  }
9392
9392
  emit(t, ...n) {
9393
- return q(this, null, function* () {
9393
+ return V(this, null, function* () {
9394
9394
  if (!this.events[t])
9395
9395
  return;
9396
9396
  const [o, ...r] = n;
@@ -9854,7 +9854,7 @@ function useParsedFilter({ filterOption: e }) {
9854
9854
  return useEffect(() => {
9855
9855
  if (!e)
9856
9856
  return;
9857
- const l = () => q(this, null, function* () {
9857
+ const l = () => V(this, null, function* () {
9858
9858
  a(!0);
9859
9859
  const u = yield t(e);
9860
9860
  a(!1), r(u);
@@ -9940,17 +9940,17 @@ const key = "__isNewRecord__", isNewRecord = (e) => untracked(() => !!(e != null
9940
9940
  default:
9941
9941
  return null;
9942
9942
  }
9943
- }, getSatisfiedActions = (r, i) => q(void 0, [r, i], function* ({ rules: e, variables: t, localVariables: n }, o) {
9943
+ }, getSatisfiedActions = (r, i) => V(void 0, [r, i], function* ({ rules: e, variables: t, localVariables: n }, o) {
9944
9944
  return (yield Promise.all(
9945
- e.filter((l) => !l.disabled).map((l) => q(void 0, null, function* () {
9945
+ e.filter((l) => !l.disabled).map((l) => V(void 0, null, function* () {
9946
9946
  return (yield conditionAnalyses({ ruleGroup: l.condition, variables: t, localVariables: n }, o)) ? l : null;
9947
9947
  }))
9948
9948
  )).filter(Boolean).map((l) => l.actions).flat();
9949
- }), getSatisfiedValues = (r, i) => q(void 0, [r, i], function* ({ rules: e, variables: t, localVariables: n }, o) {
9949
+ }), getSatisfiedValues = (r, i) => V(void 0, [r, i], function* ({ rules: e, variables: t, localVariables: n }, o) {
9950
9950
  return (yield getSatisfiedActions({ rules: e, variables: t, localVariables: n }, o)).map((a) => P(x({}, a), {
9951
9951
  value: getActionValue(a.operator, a.value)
9952
9952
  }));
9953
- }), getSatisfiedValueMap = (r, i) => q(void 0, [r, i], function* ({ rules: e, variables: t, localVariables: n }, o) {
9953
+ }), getSatisfiedValueMap = (r, i) => V(void 0, [r, i], function* ({ rules: e, variables: t, localVariables: n }, o) {
9954
9954
  return (yield getSatisfiedValues({ rules: e, variables: t, localVariables: n }, o)).reduce((c, u) => P(x({}, c), { [u.operator]: u.value }), {});
9955
9955
  });
9956
9956
  function useSatisfiedActionValues({
@@ -10631,7 +10631,7 @@ const Table$2 = withDynamicSchemaProps(
10631
10631
  "onClickRow",
10632
10632
  "value"
10633
10633
  ]), y = useArrayField$1(S), v = useFieldSchema(), { size: F = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, I = useCollection(), T = ((Ce = v == null ? void 0 : v.parent) == null ? void 0 : Ce["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: O } = T, j = useMemoizedFn(S.onRowDragEnd || (() => {
10634
- })), N = usePaginationProps$3(n, i, e), B = useTableColumns$2(S, N), [R, M] = useState(() => D ? O : []), [$, k] = useState(((be = y == null ? void 0 : y.data) == null ? void 0 : be.selectedRowKeys) || []), [z, E] = useState([]), V = (p == null ? void 0 : p.type) !== "none", L = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
10634
+ })), N = usePaginationProps$3(n, i, e), B = useTableColumns$2(S, N), [R, M] = useState(() => D ? O : []), [$, k] = useState(((be = y == null ? void 0 : y.data) == null ? void 0 : be.selectedRowKeys) || []), [z, E] = useState([]), q = (p == null ? void 0 : p.type) !== "none", L = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
10635
10635
  & > td {
10636
10636
  background-color: ${t.controlItemBgActive} !important;
10637
10637
  }
@@ -10727,14 +10727,14 @@ const Table$2 = withDynamicSchemaProps(
10727
10727
  role: "button",
10728
10728
  "aria-label": `table-index-${oe}`,
10729
10729
  className: cls(Q ? "checked" : null, rowSelectCheckboxWrapperClass$1, {
10730
- [rowSelectCheckboxWrapperClassHover$1]: V
10730
+ [rowSelectCheckboxWrapperClassHover$1]: q
10731
10731
  }),
10732
10732
  children: [
10733
10733
  /* @__PURE__ */ jsxs("div", { className: cls(Q ? "checked" : null, rowSelectCheckboxContentClass$1), children: [
10734
10734
  l && /* @__PURE__ */ jsx(SortHandle$2, { id: K(te) }),
10735
10735
  c && /* @__PURE__ */ jsx(TableIndex$3, { index: oe })
10736
10736
  ] }),
10737
- V && /* @__PURE__ */ jsx(
10737
+ q && /* @__PURE__ */ jsx(
10738
10738
  "div",
10739
10739
  {
10740
10740
  className: cls(
@@ -10759,7 +10759,7 @@ const Table$2 = withDynamicSchemaProps(
10759
10759
  l,
10760
10760
  y,
10761
10761
  K,
10762
- V,
10762
+ q,
10763
10763
  ne,
10764
10764
  N,
10765
10765
  U
@@ -11253,15 +11253,15 @@ class Plugin {
11253
11253
  return this.app.dataSourceManager;
11254
11254
  }
11255
11255
  afterAdd() {
11256
- return q(this, null, function* () {
11256
+ return V(this, null, function* () {
11257
11257
  });
11258
11258
  }
11259
11259
  beforeLoad() {
11260
- return q(this, null, function* () {
11260
+ return V(this, null, function* () {
11261
11261
  });
11262
11262
  }
11263
11263
  load() {
11264
- return q(this, null, function* () {
11264
+ return V(this, null, function* () {
11265
11265
  });
11266
11266
  }
11267
11267
  t(t, n = {}) {
@@ -11271,7 +11271,7 @@ class Plugin {
11271
11271
  }
11272
11272
  class SchemaComponentPlugin extends Plugin {
11273
11273
  load() {
11274
- return q(this, null, function* () {
11274
+ return V(this, null, function* () {
11275
11275
  this.addComponents();
11276
11276
  });
11277
11277
  }
@@ -11304,7 +11304,7 @@ const ActionContextProvider = React.memo(
11304
11304
  (e) => {
11305
11305
  const [t, n] = useState(!1), { visible: o } = x(x({}, e), e.value), { setSubmitted: r } = x(x({}, e), e.value), i = useBlockServiceInActionButton(), { isSubPageClosedByPageMenu: a, reset: l } = useIsSubPageClosedByPageMenu(useFieldSchema());
11306
11306
  useEffect(() => {
11307
- q(void 0, null, function* () {
11307
+ V(void 0, null, function* () {
11308
11308
  o === !1 && i && !i.loading && (t || a()) && (l(), i.loading = !0, yield i.refreshAsync(), i.loading = !1, n(!1), r == null || r(!0));
11309
11309
  });
11310
11310
  }, [o, i, r, a, t, l]);
@@ -11399,12 +11399,12 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
11399
11399
  collection: z,
11400
11400
  puid: E
11401
11401
  }) => {
11402
- const V = c.getFilterByTK(u || l, $);
11402
+ const q = c.getFilterByTK(u || l, $);
11403
11403
  return getPopupPathFromParams({
11404
11404
  popupuid: M,
11405
11405
  puid: E,
11406
11406
  collection: z,
11407
- filterbytk: V,
11407
+ filterbytk: q,
11408
11408
  sourceid: k,
11409
11409
  tab: R
11410
11410
  });
@@ -11427,17 +11427,17 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
11427
11427
  } = {}) => {
11428
11428
  if (!f())
11429
11429
  return I == null ? void 0 : I(!0);
11430
- const E = z || o, V = E == null ? void 0 : E["x-uid"], L = y(M);
11430
+ const E = z || o, q = E == null ? void 0 : E["x-uid"], L = y(M);
11431
11431
  R = R || (i == null ? void 0 : i.data);
11432
11432
  const G = w({
11433
- popupUid: V,
11433
+ popupUid: q,
11434
11434
  recordData: R,
11435
11435
  sourceId: L,
11436
11436
  collection: $,
11437
11437
  puid: k
11438
11438
  });
11439
11439
  let U = n.pathname;
11440
- if (_.last(U) === "/" && (U = U.slice(0, -1)), storePopupContext(V, {
11440
+ if (_.last(U) === "/" && (U = U.slice(0, -1)), storePopupContext(q, {
11441
11441
  schema: E,
11442
11442
  record: new CollectionRecord({ isNew: !1, data: R }),
11443
11443
  parentRecord: M ? new CollectionRecord({ isNew: !1, data: M }) : a,
@@ -11644,12 +11644,12 @@ const VisibleProvider = React.memo(({ children: e, popupuid: t }) => {
11644
11644
  }, InternalPagePopups = (e) => {
11645
11645
  const t = useFieldSchema(), n = useLocation(), o = e.paramsList || getPopupParamsFromPath(getPopupPath(n)), { requestSchema: r } = useRequestSchema(), [i, a] = useState(null), l = useRef([]), { savePopupSchemaToSchema: c, getPopupSchemaFromSchema: u } = usePopupUtils();
11646
11646
  useEffect(() => {
11647
- q(void 0, null, function* () {
11647
+ V(void 0, null, function* () {
11648
11648
  const m = o.map((C) => {
11649
11649
  var b;
11650
11650
  return ((b = getStoredPopupContext(C.popupuid)) == null ? void 0 : b.schema) || findSchemaByUid(C.popupuid, t == null ? void 0 : t.root) || r(C.popupuid);
11651
11651
  }), h = yield Promise.all(m), g = yield Promise.all(
11652
- h.map((C, b) => q(void 0, null, function* () {
11652
+ h.map((C, b) => V(void 0, null, function* () {
11653
11653
  if (_.isEmpty(C))
11654
11654
  return get404Schema();
11655
11655
  const S = o[b];
@@ -11714,7 +11714,7 @@ const VisibleProvider = React.memo(({ children: e, popupuid: t }) => {
11714
11714
  return t ? /* @__PURE__ */ jsx(InternalPagePopups, x({}, e)) : null;
11715
11715
  }, useRequestSchema = () => {
11716
11716
  const e = useAPIClient();
11717
- return { requestSchema: useCallback((n) => q(void 0, null, function* () {
11717
+ return { requestSchema: useCallback((n) => V(void 0, null, function* () {
11718
11718
  var o;
11719
11719
  try {
11720
11720
  return (o = (yield e.request({
@@ -11898,7 +11898,7 @@ const useStyles$h = genStyleHook("nb-action-drawer", (e) => {
11898
11898
  title: t("Unsaved changes"),
11899
11899
  content: t("Are you sure you don't want to save?"),
11900
11900
  onOk() {
11901
- return q(this, null, function* () {
11901
+ return V(this, null, function* () {
11902
11902
  var c;
11903
11903
  e.setFormValueChanged(!1), (c = e.setVisible) == null || c.call(e, !1);
11904
11904
  });
@@ -11915,7 +11915,7 @@ const useStyles$h = genStyleHook("nb-action-drawer", (e) => {
11915
11915
  const { setVisible: e } = useContext(ActionContext), t = useForm();
11916
11916
  return {
11917
11917
  run() {
11918
- return q(this, null, function* () {
11918
+ return V(this, null, function* () {
11919
11919
  e(!1), t.submit((o) => {
11920
11920
  console.log(o);
11921
11921
  });
@@ -12064,9 +12064,20 @@ const useGetAriaLabelOfModal = () => {
12064
12064
  }
12065
12065
  ) : null;
12066
12066
  }
12067
- ), InternalActionModal = observer$1(
12067
+ );
12068
+ function useDelayedVisible(e, t = 200) {
12069
+ const [n, o] = useState(!1);
12070
+ return useEffect(() => {
12071
+ if (e) {
12072
+ const r = setTimeout(() => o(!0), t);
12073
+ return () => clearTimeout(r);
12074
+ } else
12075
+ o(!1);
12076
+ }, [e]), n;
12077
+ }
12078
+ const InternalActionModal = observer$1(
12068
12079
  (e) => {
12069
- const y = e, { footerNodeName: t = "Action.Modal.Footer", width: n, zIndex: o } = y, r = Y(y, ["footerNodeName", "width", "zIndex"]), { visible: i, setVisible: a, openSize: l = "middle", modalProps: c } = useActionContext(), u = n != null ? n : openSizeWidthMap.get(l), d = useFieldSchema(), p = useField(), { token: m } = useToken(), h = useTabsContext(), g = useZIndexContext(), f = d.reduceProperties((v, F) => F["x-component"] === t ? F : v), { hidden: C } = useCurrentPopupContext(), b = !!f, S = getZIndex("modal", o || g, e.level || 0);
12080
+ const v = e, { footerNodeName: t = "Action.Modal.Footer", width: n, zIndex: o } = v, r = Y(v, ["footerNodeName", "width", "zIndex"]), { visible: i, setVisible: a, openSize: l = "middle", modalProps: c } = useActionContext(), u = n != null ? n : openSizeWidthMap.get(l), d = useFieldSchema(), p = useField(), { token: m } = useToken(), h = useTabsContext(), g = useZIndexContext(), f = d.reduceProperties((F, I) => I["x-component"] === t ? I : F), { hidden: C } = useCurrentPopupContext(), b = !!f, S = getZIndex("modal", o || g, e.level || 0), y = useDelayedVisible(i, 200);
12070
12081
  return /* @__PURE__ */ jsx(ActionContextNoRerender, { children: /* @__PURE__ */ jsx(zIndexContext.Provider, { value: S, children: /* @__PURE__ */ jsx(TabsContextProvider, P(x({}, h), { tabBarExtraContent: null, children: /* @__PURE__ */ jsx(
12071
12082
  Modal,
12072
12083
  P(x(x({
@@ -12115,10 +12126,10 @@ const useGetAriaLabelOfModal = () => {
12115
12126
  basePath: p.address,
12116
12127
  schema: d,
12117
12128
  onlyRenderProperties: !0,
12118
- filterProperties: (v) => v["x-component"] === t
12129
+ filterProperties: (F) => F["x-component"] === t
12119
12130
  }
12120
12131
  ) : !1,
12121
- children: /* @__PURE__ */ jsx(ActionModalContent, { footerNodeName: t, field: p, schema: d })
12132
+ children: y ? /* @__PURE__ */ jsx(ActionModalContent, { footerNodeName: t, field: p, schema: d }) : /* @__PURE__ */ jsx(Skeleton, { active: !0, paragraph: { rows: 6 } })
12122
12133
  })
12123
12134
  ) })) }) });
12124
12135
  },
@@ -12452,7 +12463,7 @@ const useMenuSearch$1 = (e) => {
12452
12463
  const b = useForm(), S = useActionContext();
12453
12464
  return {
12454
12465
  run() {
12455
- return q(this, null, function* () {
12466
+ return V(this, null, function* () {
12456
12467
  yield u == null ? void 0 : u(), S.setVisible(!1), b.reset();
12457
12468
  });
12458
12469
  }
@@ -12461,7 +12472,7 @@ const useMenuSearch$1 = (e) => {
12461
12472
  const b = useForm(), S = useActionContext();
12462
12473
  return {
12463
12474
  run() {
12464
- return q(this, null, function* () {
12475
+ return V(this, null, function* () {
12465
12476
  yield b.validate();
12466
12477
  try {
12467
12478
  yield d == null ? void 0 : d(b.values), S.setVisible(!1), b.reset();
@@ -13006,7 +13017,7 @@ https://requirejs.org/docs/errors.html#` + e);
13006
13017
  }
13007
13018
  }
13008
13019
  function b(k, z, E) {
13009
- var V, L, G, U, H, J, W, K, X, ee, Z, ne, re = z && z.split("/"), se = a.map, le = se && se["*"];
13020
+ var q, L, G, U, H, J, W, K, X, ee, Z, ne, re = z && z.split("/"), se = a.map, le = se && se["*"];
13010
13021
  if (k && (k = k.split("/"), W = k.length - 1, a.nodeIdCompat && jsSuffixRegExp.test(k[W]) && (k[W] = k[W].replace(jsSuffixRegExp, "")), k[0].charAt(0) === "." && re && (ne = re.slice(0, re.length - 1), k = ne.concat(k)), C(k), k = k.join("/")), E && se && (re || le)) {
13011
13022
  G = k.split("/");
13012
13023
  e:
@@ -13022,7 +13033,7 @@ https://requirejs.org/docs/errors.html#` + e);
13022
13033
  }
13023
13034
  !K && ee && (K = ee, X = Z), K && (G.splice(0, X, K), k = G.join("/"));
13024
13035
  }
13025
- return V = getOwn(a.pkgs, k), V || k;
13036
+ return q = getOwn(a.pkgs, k), q || k;
13026
13037
  }
13027
13038
  function S(k) {
13028
13039
  isBrowser && each(scripts(), function(z) {
@@ -13041,11 +13052,11 @@ https://requirejs.org/docs/errors.html#` + e);
13041
13052
  var z, E = k ? k.indexOf("!") : -1;
13042
13053
  return E > -1 && (z = k.substring(0, E), k = k.substring(E + 1, k.length)), [z, k];
13043
13054
  }
13044
- function F(k, z, E, V) {
13055
+ function F(k, z, E, q) {
13045
13056
  var L, G, U, H, J = null, W = z ? z.name : null, K = k, X = !0, ee = "";
13046
- return k || (X = !1, k = "_@r" + (g += 1)), H = v(k), J = H[0], k = H[1], J && (J = b(J, W, V), G = getOwn(p, J)), k && (J ? E ? ee = k : G && G.normalize ? ee = G.normalize(k, function(Z) {
13047
- return b(Z, W, V);
13048
- }) : ee = k.indexOf("!") === -1 ? b(k, W, V) : k : (ee = b(k, W, V), H = v(ee), J = H[0], ee = H[1], E = !0, L = o.nameToUrl(ee))), U = J && !G && !E ? "_unnormalized" + (f += 1) : "", {
13057
+ return k || (X = !1, k = "_@r" + (g += 1)), H = v(k), J = H[0], k = H[1], J && (J = b(J, W, q), G = getOwn(p, J)), k && (J ? E ? ee = k : G && G.normalize ? ee = G.normalize(k, function(Z) {
13058
+ return b(Z, W, q);
13059
+ }) : ee = k.indexOf("!") === -1 ? b(k, W, q) : k : (ee = b(k, W, q), H = v(ee), J = H[0], ee = H[1], E = !0, L = o.nameToUrl(ee))), U = J && !G && !E ? "_unnormalized" + (f += 1) : "", {
13049
13060
  prefix: J,
13050
13061
  name: ee,
13051
13062
  parentMap: z,
@@ -13061,15 +13072,15 @@ https://requirejs.org/docs/errors.html#` + e);
13061
13072
  return E || (E = l[z] = new o.Module(k)), E;
13062
13073
  }
13063
13074
  function w(k, z, E) {
13064
- var V = k.id, L = getOwn(l, V);
13065
- hasProp(p, V) && (!L || L.defineEmitComplete) ? z === "defined" && E(p[V]) : (L = I(k), L.error && z === "error" ? E(L.error) : L.on(z, E));
13075
+ var q = k.id, L = getOwn(l, q);
13076
+ hasProp(p, q) && (!L || L.defineEmitComplete) ? z === "defined" && E(p[q]) : (L = I(k), L.error && z === "error" ? E(L.error) : L.on(z, E));
13066
13077
  }
13067
13078
  function T(k, z) {
13068
- var E = k.requireModules, V = !1;
13079
+ var E = k.requireModules, q = !1;
13069
13080
  z ? z(k) : (each(E, function(L) {
13070
13081
  var G = getOwn(l, L);
13071
- G && (G.error = k, G.events.error && (V = !0, G.emit("error", k)));
13072
- }), V || req.onError(k));
13082
+ G && (G.error = k, G.events.error && (q = !0, G.emit("error", k)));
13083
+ }), q || req.onError(k));
13073
13084
  }
13074
13085
  function D() {
13075
13086
  globalDefQueue.length && (each(globalDefQueue, function(k) {
@@ -13100,28 +13111,28 @@ https://requirejs.org/docs/errors.html#` + e);
13100
13111
  delete l[k], delete c[k];
13101
13112
  }
13102
13113
  function j(k, z, E) {
13103
- var V = k.map.id;
13104
- k.error ? k.emit("error", k.error) : (z[V] = !0, each(k.depMaps, function(L, G) {
13114
+ var q = k.map.id;
13115
+ k.error ? k.emit("error", k.error) : (z[q] = !0, each(k.depMaps, function(L, G) {
13105
13116
  var U = L.id, H = getOwn(l, U);
13106
13117
  H && !k.depMatched[G] && !E[U] && (getOwn(z, U) ? (k.defineDep(G, p[U]), k.check()) : j(H, z, E));
13107
- }), E[V] = !0);
13118
+ }), E[q] = !0);
13108
13119
  }
13109
13120
  function N() {
13110
- var k, z, E = a.waitSeconds * 1e3, V = E && o.startTime + E < (/* @__PURE__ */ new Date()).getTime(), L = [], G = [], U = !1, H = !0;
13121
+ var k, z, E = a.waitSeconds * 1e3, q = E && o.startTime + E < (/* @__PURE__ */ new Date()).getTime(), L = [], G = [], U = !1, H = !0;
13111
13122
  if (!t) {
13112
13123
  if (t = !0, eachProp(c, function(J) {
13113
13124
  var W = J.map, K = W.id;
13114
13125
  if (J.enabled && (W.isDefine || G.push(J), !J.error)) {
13115
- if (!J.inited && V)
13126
+ if (!J.inited && q)
13116
13127
  y(K) ? (z = !0, U = !0) : (L.push(K), S(K));
13117
13128
  else if (!J.inited && J.fetched && W.isDefine && (U = !0, !W.prefix))
13118
13129
  return H = !1;
13119
13130
  }
13120
- }), V && L.length)
13131
+ }), q && L.length)
13121
13132
  return k = makeError("timeout", "Load timeout for modules: " + L, null, L), k.contextName = o.contextName, T(k);
13122
13133
  H && each(G, function(J) {
13123
13134
  j(J, {}, {});
13124
- }), (!V || z) && U && (isBrowser || isWebWorker) && !i && (i = setTimeout(function() {
13135
+ }), (!q || z) && U && (isBrowser || isWebWorker) && !i && (i = setTimeout(function() {
13125
13136
  i = 0, N();
13126
13137
  }, 50)), t = !1;
13127
13138
  }
@@ -13129,10 +13140,10 @@ https://requirejs.org/docs/errors.html#` + e);
13129
13140
  n = function(k) {
13130
13141
  this.events = getOwn(u, k.id) || {}, this.map = k, this.shim = getOwn(a.shim, k.id), this.depExports = [], this.depMaps = [], this.depMatched = [], this.pluginMaps = {}, this.depCount = 0;
13131
13142
  }, n.prototype = {
13132
- init: function(k, z, E, V) {
13133
- V = V || {}, !this.inited && (this.factory = z, E ? this.on("error", E) : this.events.error && (E = bind(this, function(L) {
13143
+ init: function(k, z, E, q) {
13144
+ q = q || {}, !this.inited && (this.factory = z, E ? this.on("error", E) : this.events.error && (E = bind(this, function(L) {
13134
13145
  this.emit("error", L);
13135
- })), this.depMaps = k && k.slice(0), this.errback = E, this.inited = !0, this.ignore = V.ignore, V.enabled || this.enabled ? this.enable() : this.check());
13146
+ })), this.depMaps = k && k.slice(0), this.errback = E, this.inited = !0, this.ignore = q.ignore, q.enabled || this.enabled ? this.enable() : this.check());
13136
13147
  },
13137
13148
  defineDep: function(k, z) {
13138
13149
  this.depMatched[k] || (this.depMatched[k] = !0, this.depCount -= 1, this.depExports[k] = z);
@@ -13161,7 +13172,7 @@ https://requirejs.org/docs/errors.html#` + e);
13161
13172
  */
13162
13173
  check: function() {
13163
13174
  if (!(!this.enabled || this.enabling)) {
13164
- var k, z, E = this.map.id, V = this.depExports, L = this.exports, G = this.factory;
13175
+ var k, z, E = this.map.id, q = this.depExports, L = this.exports, G = this.factory;
13165
13176
  if (!this.inited)
13166
13177
  hasProp(o.defQueueMap, E) || this.fetch();
13167
13178
  else if (this.error)
@@ -13171,12 +13182,12 @@ https://requirejs.org/docs/errors.html#` + e);
13171
13182
  if (isFunction(G)) {
13172
13183
  if (this.events.error && this.map.isDefine || req.onError !== defaultOnError)
13173
13184
  try {
13174
- L = o.execCb(E, G, V, L);
13185
+ L = o.execCb(E, G, q, L);
13175
13186
  } catch (H) {
13176
13187
  k = H;
13177
13188
  }
13178
13189
  else
13179
- L = o.execCb(E, G, V, L);
13190
+ L = o.execCb(E, G, q, L);
13180
13191
  if (this.map.isDefine && L === void 0 && (z = this.module, z ? L = z.exports : this.usingExports && (L = this.exports)), k)
13181
13192
  return k.requireMap = this.map, k.requireModules = this.map.isDefine ? [this.map.id] : null, k.requireType = this.map.isDefine ? "define" : "require", T(this.error = k);
13182
13193
  } else
@@ -13195,12 +13206,12 @@ https://requirejs.org/docs/errors.html#` + e);
13195
13206
  },
13196
13207
  callPlugin: function() {
13197
13208
  var k = this.map, z = k.id, E = F(k.prefix);
13198
- this.depMaps.push(E), w(E, "defined", bind(this, function(V) {
13209
+ this.depMaps.push(E), w(E, "defined", bind(this, function(q) {
13199
13210
  var L, G, U, H = getOwn(h, this.map.id), J = this.map.name, W = this.map.parentMap ? this.map.parentMap.name : null, K = o.makeRequire(k.parentMap, {
13200
13211
  enableBuildCallback: !0
13201
13212
  });
13202
13213
  if (this.map.unnormalized) {
13203
- V.normalize && (J = V.normalize(J, function(X) {
13214
+ q.normalize && (J = q.normalize(J, function(X) {
13204
13215
  return b(X, W, !0);
13205
13216
  }) || ""), G = F(
13206
13217
  k.prefix + "!" + J,
@@ -13250,12 +13261,12 @@ https://requirejs.org/docs/errors.html#` + e);
13250
13261
  ));
13251
13262
  }
13252
13263
  re && (useInteractive = !0), this.depMaps.push(ne), o.completeLoad(Z), K([Z], L);
13253
- }), V.load(k.name, K, L, a);
13264
+ }), q.load(k.name, K, L, a);
13254
13265
  })), o.enable(E, this), this.pluginMaps[E.id] = E;
13255
13266
  },
13256
13267
  enable: function() {
13257
13268
  c[this.map.id] = this, this.enabled = !0, this.enabling = !0, each(this.depMaps, bind(this, function(k, z) {
13258
- var E, V, L;
13269
+ var E, q, L;
13259
13270
  if (typeof k == "string") {
13260
13271
  if (k = F(
13261
13272
  k,
@@ -13272,7 +13283,7 @@ https://requirejs.org/docs/errors.html#` + e);
13272
13283
  this.emit("error", G);
13273
13284
  }));
13274
13285
  }
13275
- E = k.id, V = l[E], !hasProp(r, E) && V && !V.enabled && o.enable(k, this);
13286
+ E = k.id, q = l[E], !hasProp(r, E) && q && !q.enabled && o.enable(k, this);
13276
13287
  })), eachProp(this.pluginMaps, bind(this, function(k) {
13277
13288
  var z = getOwn(l, k.id);
13278
13289
  z && !z.enabled && o.enable(k, this);
@@ -13291,8 +13302,8 @@ https://requirejs.org/docs/errors.html#` + e);
13291
13302
  function B(k) {
13292
13303
  hasProp(p, k[0]) || I(F(k[0], null, !0)).init(k[1], k[2]);
13293
13304
  }
13294
- function R(k, z, E, V) {
13295
- k.detachEvent && !isOpera ? V && k.detachEvent(V, z) : k.removeEventListener(E, z, !1);
13305
+ function R(k, z, E, q) {
13306
+ k.detachEvent && !isOpera ? q && k.detachEvent(q, z) : k.removeEventListener(E, z, !1);
13296
13307
  }
13297
13308
  function M(k) {
13298
13309
  var z = k.currentTarget || k.srcElement;
@@ -13333,14 +13344,14 @@ https://requirejs.org/docs/errors.html#` + e);
13333
13344
  return (G.indexOf("?") === -1 ? "?" : "&") + z;
13334
13345
  };
13335
13346
  }
13336
- var E = a.shim, V = {
13347
+ var E = a.shim, q = {
13337
13348
  paths: !0,
13338
13349
  bundles: !0,
13339
13350
  config: !0,
13340
13351
  map: !0
13341
13352
  };
13342
13353
  eachProp(k, function(L, G) {
13343
- V[G] ? (a[G] || (a[G] = {}), mixin(a[G], L, !0, !0)) : a[G] = L;
13354
+ q[G] ? (a[G] || (a[G] = {}), mixin(a[G], L, !0, !0)) : a[G] = L;
13344
13355
  }), k.bundles && eachProp(k.bundles, function(L, G) {
13345
13356
  each(L, function(U) {
13346
13357
  U !== G && (h[U] = G);
@@ -13365,10 +13376,10 @@ https://requirejs.org/docs/errors.html#` + e);
13365
13376
  },
13366
13377
  makeRequire: function(k, z) {
13367
13378
  z = z || {};
13368
- function E(V, L, G) {
13379
+ function E(q, L, G) {
13369
13380
  var U, H, J;
13370
- return z.enableBuildCallback && L && isFunction(L) && (L.__requireJsBuild = !0), typeof V == "string" ? isFunction(L) ? T(makeError("requireargs", "Invalid require call"), G) : k && hasProp(r, V) ? r[V](l[k.id]) : req.get ? req.get(o, V, k, E) : (H = F(V, k, !1, !0), U = H.id, hasProp(p, U) ? p[U] : T(makeError("notloaded", 'Module name "' + U + '" has not been loaded yet for context: ' + e + (k ? "" : ". Use require([])")))) : ($(), o.nextTick(function() {
13371
- $(), J = I(F(null, k)), J.skipMap = z.skipMap, J.init(V, L, G, {
13381
+ return z.enableBuildCallback && L && isFunction(L) && (L.__requireJsBuild = !0), typeof q == "string" ? isFunction(L) ? T(makeError("requireargs", "Invalid require call"), G) : k && hasProp(r, q) ? r[q](l[k.id]) : req.get ? req.get(o, q, k, E) : (H = F(q, k, !1, !0), U = H.id, hasProp(p, U) ? p[U] : T(makeError("notloaded", 'Module name "' + U + '" has not been loaded yet for context: ' + e + (k ? "" : ". Use require([])")))) : ($(), o.nextTick(function() {
13382
+ $(), J = I(F(null, k)), J.skipMap = z.skipMap, J.init(q, L, G, {
13372
13383
  enabled: !0
13373
13384
  }), N();
13374
13385
  }), E);
@@ -13380,26 +13391,26 @@ https://requirejs.org/docs/errors.html#` + e);
13380
13391
  * *Requires* the use of a module name. It does not support using
13381
13392
  * plain URLs like nameToUrl.
13382
13393
  */
13383
- toUrl: function(V) {
13384
- var L, G = V.lastIndexOf("."), U = V.split("/")[0], H = U === "." || U === "..";
13385
- return G !== -1 && (!H || G > 1) && (L = V.substring(G, V.length), V = V.substring(0, G)), o.nameToUrl(b(
13386
- V,
13394
+ toUrl: function(q) {
13395
+ var L, G = q.lastIndexOf("."), U = q.split("/")[0], H = U === "." || U === "..";
13396
+ return G !== -1 && (!H || G > 1) && (L = q.substring(G, q.length), q = q.substring(0, G)), o.nameToUrl(b(
13397
+ q,
13387
13398
  k && k.id,
13388
13399
  !0
13389
13400
  ), L, !0);
13390
13401
  },
13391
- defined: function(V) {
13392
- return hasProp(p, F(V, k, !1, !0).id);
13402
+ defined: function(q) {
13403
+ return hasProp(p, F(q, k, !1, !0).id);
13393
13404
  },
13394
- specified: function(V) {
13395
- return V = F(V, k, !1, !0).id, hasProp(p, V) || hasProp(l, V);
13405
+ specified: function(q) {
13406
+ return q = F(q, k, !1, !0).id, hasProp(p, q) || hasProp(l, q);
13396
13407
  }
13397
- }), k || (E.undef = function(V) {
13408
+ }), k || (E.undef = function(q) {
13398
13409
  D();
13399
- var L = F(V, k, !0), G = getOwn(l, V);
13400
- G.undefed = !0, S(V), delete p[V], delete m[L.url], delete u[V], eachReverse(d, function(U, H) {
13401
- U[0] === V && d.splice(H, 1);
13402
- }), delete o.defQueueMap[V], G && (G.events.defined && (u[V] = G.events), O(V));
13410
+ var L = F(q, k, !0), G = getOwn(l, q);
13411
+ G.undefed = !0, S(q), delete p[q], delete m[L.url], delete u[q], eachReverse(d, function(U, H) {
13412
+ U[0] === q && d.splice(H, 1);
13413
+ }), delete o.defQueueMap[q], G && (G.events.defined && (u[q] = G.events), O(q));
13403
13414
  }), E;
13404
13415
  },
13405
13416
  /**
@@ -13419,7 +13430,7 @@ https://requirejs.org/docs/errors.html#` + e);
13419
13430
  * @param {String} moduleName the name of the module to potentially complete.
13420
13431
  */
13421
13432
  completeLoad: function(k) {
13422
- var z, E, V, L = getOwn(a.shim, k) || {}, G = L.exports;
13433
+ var z, E, q, L = getOwn(a.shim, k) || {}, G = L.exports;
13423
13434
  for (D(); d.length; ) {
13424
13435
  if (E = d.shift(), E[0] === null) {
13425
13436
  if (E[0] = k, z)
@@ -13429,7 +13440,7 @@ https://requirejs.org/docs/errors.html#` + e);
13429
13440
  E[0] === k && (z = !0);
13430
13441
  B(E);
13431
13442
  }
13432
- if (o.defQueueMap = {}, V = getOwn(l, k), !z && !hasProp(p, k) && V && !V.inited) {
13443
+ if (o.defQueueMap = {}, q = getOwn(l, k), !z && !hasProp(p, k) && q && !q.inited) {
13433
13444
  if (a.enforceDefine && (!G || !getGlobal(G)))
13434
13445
  return y(k) ? void 0 : T(makeError(
13435
13446
  "nodefine",
@@ -13449,14 +13460,14 @@ https://requirejs.org/docs/errors.html#` + e);
13449
13460
  * internal API, not a public one. Use toUrl for the public API.
13450
13461
  */
13451
13462
  nameToUrl: function(k, z, E) {
13452
- var V, L, G, U, H, J, W, K = getOwn(a.pkgs, k);
13463
+ var q, L, G, U, H, J, W, K = getOwn(a.pkgs, k);
13453
13464
  if (K && (k = K), W = getOwn(h, k), W)
13454
13465
  return o.nameToUrl(W, z, E);
13455
13466
  if (req.jsExtRegExp.test(k))
13456
13467
  H = k + (z || "");
13457
13468
  else {
13458
- for (V = a.paths, L = k.split("/"), G = L.length; G > 0; G -= 1)
13459
- if (U = L.slice(0, G).join("/"), J = getOwn(V, U), J) {
13469
+ for (q = a.paths, L = k.split("/"), G = L.length; G > 0; G -= 1)
13470
+ if (U = L.slice(0, G).join("/"), J = getOwn(q, U), J) {
13460
13471
  isArray(J) && (J = J[0]), L.splice(0, G, J);
13461
13472
  break;
13462
13473
  }
@@ -13476,8 +13487,8 @@ https://requirejs.org/docs/errors.html#` + e);
13476
13487
  *
13477
13488
  * @private
13478
13489
  */
13479
- execCb: function(k, z, E, V) {
13480
- return z.apply(V, E);
13490
+ execCb: function(k, z, E, q) {
13491
+ return z.apply(q, E);
13481
13492
  },
13482
13493
  /**
13483
13494
  * callback for script loads, used to check status of loading.
@@ -13499,8 +13510,8 @@ https://requirejs.org/docs/errors.html#` + e);
13499
13510
  var z = M(k);
13500
13511
  if (!y(z.id)) {
13501
13512
  var E = [];
13502
- return eachProp(l, function(V, L) {
13503
- L.indexOf("_@r") !== 0 && each(V.depMaps, function(G) {
13513
+ return eachProp(l, function(q, L) {
13514
+ L.indexOf("_@r") !== 0 && each(q.depMaps, function(G) {
13504
13515
  if (G.id === z.id)
13505
13516
  return E.push(L), !0;
13506
13517
  });
@@ -13672,13 +13683,16 @@ const setFieldProps$1 = (e, t, n) => {
13672
13683
  n.componentProps = merge(m, n.componentProps || {}, u || {});
13673
13684
  }, [r]), r ? /* @__PURE__ */ jsx(l, x(x({}, e), u)) : null;
13674
13685
  }, CollectionFieldInternalField = (e) => {
13675
- var a;
13686
+ var l;
13676
13687
  const t = useField(), n = useFieldSchema(), { uiSchema: o } = useCollectionFieldUISchema(), r = useComponent(
13677
- ((a = n["x-component-props"]) == null ? void 0 : a.component) || (o == null ? void 0 : o["x-component"]) || "Input"
13688
+ ((l = n["x-component-props"]) == null ? void 0 : l.component) || (o == null ? void 0 : o["x-component"]) || "Input"
13678
13689
  ), i = useDynamicComponentProps(o == null ? void 0 : o["x-use-component-props"], e);
13679
- return useEffect(() => {
13690
+ if (useEffect(() => {
13680
13691
  n["x-read-pretty"] === !0 && !t.readPretty && (t.readPretty = !0), n["x-disabled"] === !0 && (t.disabled = !0);
13681
- }, [t, n]), o ? /* @__PURE__ */ jsx(r, x(x({}, e), i)) : null;
13692
+ }, [t, n]), !o)
13693
+ return null;
13694
+ const a = x(x({}, e), i);
13695
+ return isVariable$1(a.value) && a.value === n.default && (a.value = void 0), /* @__PURE__ */ jsx(r, x({}, a));
13682
13696
  }, CollectionField$1 = connect((e) => {
13683
13697
  const t = useFieldSchema(), n = useIsInNocoBaseRecursionFieldContext();
13684
13698
  return /* @__PURE__ */ jsx(CollectionFieldProvider, { name: t.name, children: n ? /* @__PURE__ */ jsx(CollectionFieldInternalField, x({}, e)) : /* @__PURE__ */ jsx(CollectionFieldInternalField_deprecated, x({}, e)) });
@@ -14221,7 +14235,7 @@ class Application {
14221
14235
  });
14222
14236
  }
14223
14237
  load() {
14224
- return q(this, null, function* () {
14238
+ return V(this, null, function* () {
14225
14239
  var t, n, o, r, i;
14226
14240
  try {
14227
14241
  this.loading = !0, yield this.loadWebSocket(), yield this.pm.load();
@@ -14236,7 +14250,7 @@ class Application {
14236
14250
  });
14237
14251
  }
14238
14252
  loadWebSocket() {
14239
- return q(this, null, function* () {
14253
+ return V(this, null, function* () {
14240
14254
  this.eventBus.addEventListener("ws:message:authorized", () => {
14241
14255
  this.setWsAuthorized(!0);
14242
14256
  }), this.ws.on("message", (t) => {
@@ -15481,7 +15495,7 @@ const useTableBlockProps = () => {
15481
15495
  i && (i.field.data = ((v = i.field) == null ? void 0 : v.data) || {}, i.field.data.selectedRowKeys = S, i.field.data.selectedRowData = y, (I = (F = i.field) == null ? void 0 : F.onRowSelect) == null || I.call(F, S));
15482
15496
  }, []),
15483
15497
  onRowDragEnd: useCallback(
15484
- (v) => q(void 0, [v], function* ({ from: S, to: y }) {
15498
+ (v) => V(void 0, [v], function* ({ from: S, to: y }) {
15485
15499
  yield a.current.resource.move({
15486
15500
  sourceId: S[i.rowKey || "id"],
15487
15501
  targetId: y[i.rowKey || "id"],
@@ -15512,7 +15526,7 @@ const useTableBlockProps = () => {
15512
15526
  const T = w.find((D) => D.uid === t.parent["x-uid"]);
15513
15527
  w.forEach((D) => {
15514
15528
  var $, k, z, E;
15515
- const O = F.find((V) => V.uid === D.uid);
15529
+ const O = F.find((q) => q.uid === D.uid);
15516
15530
  if (!O)
15517
15531
  return;
15518
15532
  const j = getSourceKey(T, O.field) || i.rowKey || "id", N = [S[j]], B = (($ = D.service.params) == null ? void 0 : $[0]) || {}, R = ((z = (k = D.service.params) == null ? void 0 : k[1]) == null ? void 0 : z.filters) || {};
@@ -15531,7 +15545,7 @@ const useTableBlockProps = () => {
15531
15545
  ]
15532
15546
  };
15533
15547
  const M = mergeFilter([
15534
- ...Object.values(R).map((V) => removeNullCondition(V)),
15548
+ ...Object.values(R).map((q) => removeNullCondition(q)),
15535
15549
  D.defaultFilter
15536
15550
  ]);
15537
15551
  return D.doFilter(
@@ -15733,7 +15747,7 @@ class TableFieldResource {
15733
15747
  this.field = t.field, this.api = t.api, this.sourceId = t.sourceId, this.resource = this.api.resource(t.resource, this.sourceId);
15734
15748
  }
15735
15749
  list(t) {
15736
- return q(this, null, function* () {
15750
+ return V(this, null, function* () {
15737
15751
  if (this.field.data = this.field.data || {}, this.field.data.changed)
15738
15752
  return console.log("list.dataSource", this.field.data.dataSource), {
15739
15753
  data: {
@@ -15755,7 +15769,7 @@ class TableFieldResource {
15755
15769
  });
15756
15770
  }
15757
15771
  get(t) {
15758
- return q(this, null, function* () {
15772
+ return V(this, null, function* () {
15759
15773
  console.log("get", t);
15760
15774
  const { filterByTk: n } = t;
15761
15775
  return {
@@ -15766,21 +15780,21 @@ class TableFieldResource {
15766
15780
  });
15767
15781
  }
15768
15782
  create(t) {
15769
- return q(this, null, function* () {
15783
+ return V(this, null, function* () {
15770
15784
  console.log("create", t);
15771
15785
  const { values: n } = t;
15772
15786
  this.field.data.dataSource.push(n), this.field.data.changed = !0;
15773
15787
  });
15774
15788
  }
15775
15789
  update(t) {
15776
- return q(this, null, function* () {
15790
+ return V(this, null, function* () {
15777
15791
  console.log("update", t);
15778
15792
  const { filterByTk: n, values: o } = t;
15779
15793
  this.field.data.dataSource[n] = o, this.field.data.changed = !0;
15780
15794
  });
15781
15795
  }
15782
15796
  destroy(t) {
15783
- return q(this, null, function* () {
15797
+ return V(this, null, function* () {
15784
15798
  console.log("destroy", t);
15785
15799
  let { filterByTk: n } = t;
15786
15800
  Array.isArray(n) || (n = [n]), this.field.data.dataSource = this.field.data.dataSource.filter((o, r) => !n.includes(r)), this.field.data.changed = !0;
@@ -15937,8 +15951,8 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
15937
15951
  return useEffect(() => {
15938
15952
  var w, T, D, O, j, N, B, R, M, $, k, z, E;
15939
15953
  if (!((w = t == null ? void 0 : t.service) != null && w.loading)) {
15940
- const V = (D = (T = t == null ? void 0 : t.service) == null ? void 0 : T.data) == null ? void 0 : D.data.map((L) => L);
15941
- e.value = V, (O = e == null ? void 0 : e.setInitialValue) == null || O.call(e, V), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (B = (N = (j = t == null ? void 0 : t.service) == null ? void 0 : j.data) == null ? void 0 : N.meta) == null ? void 0 : B.pageSize, e.componentProps.pagination.total = ($ = (M = (R = t == null ? void 0 : t.service) == null ? void 0 : R.data) == null ? void 0 : M.meta) == null ? void 0 : $.count, e.componentProps.pagination.current = (E = (z = (k = t == null ? void 0 : t.service) == null ? void 0 : k.data) == null ? void 0 : z.meta) == null ? void 0 : E.page;
15954
+ const q = (D = (T = t == null ? void 0 : t.service) == null ? void 0 : T.data) == null ? void 0 : D.data.map((L) => L);
15955
+ e.value = q, (O = e == null ? void 0 : e.setInitialValue) == null || O.call(e, q), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (B = (N = (j = t == null ? void 0 : t.service) == null ? void 0 : j.data) == null ? void 0 : N.meta) == null ? void 0 : B.pageSize, e.componentProps.pagination.total = ($ = (M = (R = t == null ? void 0 : t.service) == null ? void 0 : R.data) == null ? void 0 : M.meta) == null ? void 0 : $.count, e.componentProps.pagination.current = (E = (z = (k = t == null ? void 0 : t.service) == null ? void 0 : k.data) == null ? void 0 : z.meta) == null ? void 0 : E.page;
15942
15956
  }
15943
15957
  }, [
15944
15958
  i == null ? void 0 : i.foreignKey,
@@ -15960,7 +15974,7 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
15960
15974
  t.field.data = ((D = t == null ? void 0 : t.field) == null ? void 0 : D.data) || {}, t.field.data.selectedRowKeys = w, t.field.data.selectedRowData = T;
15961
15975
  },
15962
15976
  onRowDragEnd(D) {
15963
- return q(this, arguments, function* ({ from: w, to: T }) {
15977
+ return V(this, arguments, function* ({ from: w, to: T }) {
15964
15978
  yield t.resource.move({
15965
15979
  sourceId: w[t.rowKey || "id"],
15966
15980
  targetId: T[t.rowKey || "id"]
@@ -16019,7 +16033,7 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
16019
16033
  );
16020
16034
  class BlockSchemaComponentPlugin extends Plugin {
16021
16035
  load() {
16022
- return q(this, null, function* () {
16036
+ return V(this, null, function* () {
16023
16037
  this.addComponents(), this.addScopes();
16024
16038
  });
16025
16039
  }
@@ -16113,7 +16127,7 @@ const regenerateUid = (e) => {
16113
16127
  templates: n,
16114
16128
  refresh: t,
16115
16129
  getTemplateSchemaByMode: useCallback(
16116
- (r) => q(void 0, null, function* () {
16130
+ (r) => V(void 0, null, function* () {
16117
16131
  const { mode: i, template: a } = r;
16118
16132
  if (i === "copy") {
16119
16133
  const { data: l } = yield o.request({
@@ -16132,7 +16146,7 @@ const regenerateUid = (e) => {
16132
16146
  [o]
16133
16147
  ),
16134
16148
  copyTemplateSchema: useCallback(
16135
- (r) => q(void 0, null, function* () {
16149
+ (r) => V(void 0, null, function* () {
16136
16150
  const { data: i } = yield o.request({
16137
16151
  url: `/uiSchemas:getJsonSchema/${r.uid}?includeAsyncNode=true`
16138
16152
  }), a = (i == null ? void 0 : i.data) || {};
@@ -16141,7 +16155,7 @@ const regenerateUid = (e) => {
16141
16155
  [o]
16142
16156
  ),
16143
16157
  saveAsTemplate: useCallback(
16144
- (r) => q(void 0, null, function* () {
16158
+ (r) => V(void 0, null, function* () {
16145
16159
  const { uid: i } = r, a = uid();
16146
16160
  return yield o.resource("uiSchemas").saveAsTemplate({
16147
16161
  filterByTk: i,
@@ -16202,7 +16216,7 @@ const regenerateUid = (e) => {
16202
16216
  refreshDeps: []
16203
16217
  }, RemoteSchemaTemplateManagerProvider = (e) => {
16204
16218
  var i;
16205
- const t = useAPIClient(), n = useRequest(options), o = useCallback(() => q(void 0, null, function* () {
16219
+ const t = useAPIClient(), n = useRequest(options), o = useCallback(() => V(void 0, null, function* () {
16206
16220
  const { data: a } = yield t.request(options);
16207
16221
  n.mutate(a);
16208
16222
  }), [t, n]), r = useMemo(() => {
@@ -16213,7 +16227,7 @@ const regenerateUid = (e) => {
16213
16227
  };
16214
16228
  class RemoteSchemaTemplateManagerPlugin extends Plugin {
16215
16229
  load() {
16216
- return q(this, null, function* () {
16230
+ return V(this, null, function* () {
16217
16231
  this.addRoutes(), this.addComponents();
16218
16232
  });
16219
16233
  }
@@ -16249,7 +16263,7 @@ const CollectionTitle = (e) => {
16249
16263
  const e = useUpdateActionProps(), { __parent: t } = useBlockRequestContext();
16250
16264
  return {
16251
16265
  onClick() {
16252
- return q(this, null, function* () {
16266
+ return V(this, null, function* () {
16253
16267
  var o, r;
16254
16268
  yield e.onClick(), (r = (o = t == null ? void 0 : t.service) == null ? void 0 : o.refresh) == null || r.call(o);
16255
16269
  });
@@ -16259,7 +16273,7 @@ const CollectionTitle = (e) => {
16259
16273
  const e = useBulkDestroyActionProps(), t = useSchemaTemplateManager(), { service: n } = useBlockRequestContext();
16260
16274
  return {
16261
16275
  onClick() {
16262
- return q(this, null, function* () {
16276
+ return V(this, null, function* () {
16263
16277
  var r;
16264
16278
  yield e.onClick(), yield t.refresh(), (r = n == null ? void 0 : n.refresh) == null || r.call(n);
16265
16279
  });
@@ -16269,7 +16283,7 @@ const CollectionTitle = (e) => {
16269
16283
  const e = useDestroyActionProps(), { service: t } = useBlockRequestContext(), n = useSchemaTemplateManager();
16270
16284
  return {
16271
16285
  onClick() {
16272
- return q(this, null, function* () {
16286
+ return V(this, null, function* () {
16273
16287
  var r;
16274
16288
  yield e.onClick(), yield n.refresh(), (r = t == null ? void 0 : t.refresh) == null || r.call(t);
16275
16289
  });
@@ -18030,7 +18044,7 @@ const useGetAriaLabelOfDesigner = () => {
18030
18044
  })
18031
18045
  )
18032
18046
  };
18033
- }, [v, (J = $ == null ? void 0 : $.cols) == null ? void 0 : J.length]), E = useMemo(() => u === !1 || C === !1 ? null : /* @__PURE__ */ jsx(DragHandler, { children: /* @__PURE__ */ jsx(DragOutlined, { role: "button", "aria-label": v("drag-handler") }) }), [u, v, C]), V = useMemo(() => {
18047
+ }, [v, (J = $ == null ? void 0 : $.cols) == null ? void 0 : J.length]), E = useMemo(() => u === !1 || C === !1 ? null : /* @__PURE__ */ jsx(DragHandler, { children: /* @__PURE__ */ jsx(DragOutlined, { role: "button", "aria-label": v("drag-handler") }) }), [u, v, C]), q = useMemo(() => {
18034
18048
  var W;
18035
18049
  if (o === !1)
18036
18050
  return null;
@@ -18079,7 +18093,7 @@ const useGetAriaLabelOfDesigner = () => {
18079
18093
  ] }) }),
18080
18094
  /* @__PURE__ */ jsx("div", { className: cls("toolbar-icons", a), style: l, children: /* @__PURE__ */ jsxs(Space$1, { size: 3, align: "center", className: d, style: p, children: [
18081
18095
  E,
18082
- /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: O, children: V }),
18096
+ /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: O, children: q }),
18083
18097
  L
18084
18098
  ] }) })
18085
18099
  ]
@@ -18193,7 +18207,7 @@ const SchemaToolbarErrorFallback = (e) => {
18193
18207
  const {
18194
18208
  association: z = !1,
18195
18209
  cached: E = {},
18196
- collectionNames: V = [R],
18210
+ collectionNames: q = [R],
18197
18211
  maxDepth: L = 1,
18198
18212
  allowAllTypes: G = !1,
18199
18213
  exceptInterfaces: U = [],
@@ -18201,7 +18215,7 @@ const SchemaToolbarErrorFallback = (e) => {
18201
18215
  usePrefix: J = !1,
18202
18216
  dataSource: W
18203
18217
  } = k || {};
18204
- if (V.length - 1 > L)
18218
+ if (q.length - 1 > L)
18205
18219
  return;
18206
18220
  if (E[R])
18207
18221
  return _.cloneDeep(E[R]);
@@ -18214,10 +18228,10 @@ const SchemaToolbarErrorFallback = (e) => {
18214
18228
  value: J && H ? `${H}.${Z.name}` : Z.name,
18215
18229
  label: f((re = Z == null ? void 0 : Z.uiSchema) == null ? void 0 : re.title) || Z.name
18216
18230
  }, Z);
18217
- return z && Z.target && (ne.children = V.includes(Z.target) ? [] : I(Z.target, M, $, P(x({}, k), {
18231
+ return z && Z.target && (ne.children = q.includes(Z.target) ? [] : I(Z.target, M, $, P(x({}, k), {
18218
18232
  cached: E,
18219
18233
  dataSource: W,
18220
- collectionNames: [...V, Z.target],
18234
+ collectionNames: [...q, Z.target],
18221
18235
  prefixFieldValue: J ? H ? `${H}.${Z.name}` : Z.name : "",
18222
18236
  usePrefix: J
18223
18237
  })), !((se = ne.children) != null && se.length)) ? null : ne;
@@ -18379,7 +18393,7 @@ function FormDialog(e, t, n, o) {
18379
18393
  var b;
18380
18394
  ((b = l == null ? void 0 : l.onCancel) == null ? void 0 : b.call(l, C)) !== !1 && (h == null || h());
18381
18395
  },
18382
- onOk: (C) => q(this, null, function* () {
18396
+ onOk: (C) => V(this, null, function* () {
18383
18397
  var b;
18384
18398
  ((b = l == null ? void 0 : l.onOk) == null ? void 0 : b.call(l, C)) !== !1 && (m == null || m());
18385
18399
  }),
@@ -18393,8 +18407,8 @@ function FormDialog(e, t, n, o) {
18393
18407
  forOpen: (p) => (isFn(p) && r.openMiddlewares.push(p), d),
18394
18408
  forConfirm: (p) => (isFn(p) && r.confirmMiddlewares.push(p), d),
18395
18409
  forCancel: (p) => (isFn(p) && r.cancelMiddlewares.push(p), d),
18396
- open: (p) => q(this, null, function* () {
18397
- return r.promise || (r.promise = new Promise((m, h) => q(this, null, function* () {
18410
+ open: (p) => V(this, null, function* () {
18411
+ return r.promise || (r.promise = new Promise((m, h) => V(this, null, function* () {
18398
18412
  try {
18399
18413
  p = yield loading(l.loadingText, () => applyMiddleware(p, r.openMiddlewares)), r.form = r.form || createForm(p);
18400
18414
  } catch (g) {
@@ -18405,7 +18419,7 @@ function FormDialog(e, t, n, o) {
18405
18419
  !0,
18406
18420
  () => {
18407
18421
  var g;
18408
- (g = r.form) == null || g.submit(() => q(this, null, function* () {
18422
+ (g = r.form) == null || g.submit(() => V(this, null, function* () {
18409
18423
  yield applyMiddleware(r.form, r.confirmMiddlewares), untracked(() => {
18410
18424
  var f;
18411
18425
  m(x({}, (f = r.form) == null ? void 0 : f.values));
@@ -18413,7 +18427,7 @@ function FormDialog(e, t, n, o) {
18413
18427
  })).catch(() => {
18414
18428
  });
18415
18429
  },
18416
- () => q(this, null, function* () {
18430
+ () => V(this, null, function* () {
18417
18431
  yield loading(l.loadingText, () => applyMiddleware(r.form, r.cancelMiddlewares)), d.close();
18418
18432
  })
18419
18433
  )
@@ -18579,7 +18593,7 @@ const DatePickerContext = React.createContext({ utc: !0 }), useDatePickerContext
18579
18593
  }), () => {
18580
18594
  u.current();
18581
18595
  }), [e._maxDate, e._minDate, r, o]);
18582
- const d = () => q(void 0, null, function* () {
18596
+ const d = () => V(void 0, null, function* () {
18583
18597
  let m = e._minDate ? Promise.resolve(dayjs(e._minDate)) : Promise.resolve(null), h = e._maxDate ? Promise.resolve(dayjs(e._maxDate)) : Promise.resolve(null);
18584
18598
  isVariable$1(e._maxDate) && (h = o(e._maxDate, r).then((y) => dayjs(y.value))), isVariable$1(e._minDate) && (m = o(e._minDate, r).then((y) => dayjs(y.value)));
18585
18599
  const [g, f] = yield Promise.all([m, h]), C = Array.from({ length: 60 }, (y, v) => v), b = (y) => {
@@ -19109,7 +19123,7 @@ const useDateVariable = ({ operator: e, schema: t, noDisabled: n }) => {
19109
19123
  key: t,
19110
19124
  isLeaf: !1,
19111
19125
  disabled: a,
19112
- loadChildren: (c, u) => q(void 0, null, function* () {
19126
+ loadChildren: (c, u) => V(void 0, null, function* () {
19113
19127
  const d = u ? {
19114
19128
  [u]: void 0
19115
19129
  } : {};
@@ -19672,7 +19686,7 @@ const findOption$1 = (e = [], t) => {
19672
19686
  (T, D) => {
19673
19687
  if (!u)
19674
19688
  return n(T);
19675
- setTimeout(() => q(void 0, null, function* () {
19689
+ setTimeout(() => V(void 0, null, function* () {
19676
19690
  (yield u(T, D)) && n(T);
19677
19691
  }));
19678
19692
  },
@@ -19702,7 +19716,7 @@ const findOption$1 = (e = [], t) => {
19702
19716
  getAllCollectionsInheritChain: o
19703
19717
  }) => {
19704
19718
  const r = e ? o(e.target) : [];
19705
- return (i, a) => q(void 0, null, function* () {
19719
+ return (i, a) => V(void 0, null, function* () {
19706
19720
  if (_.isString(i) && i.includes("$nRole") || !isVariable$1(i) || !t || !e || e.interface === "json")
19707
19721
  return !0;
19708
19722
  const l = a[a.length - 1];
@@ -20369,7 +20383,7 @@ const EnableChildCollections = withDynamicSchemaProps(
20369
20383
  d.dataSource = m, d.loading = !1, d.initialValue && (d.disabled = !0);
20370
20384
  })
20371
20385
  );
20372
- }, c = (u) => q(void 0, null, function* () {
20386
+ }, c = (u) => V(void 0, null, function* () {
20373
20387
  var p, m;
20374
20388
  const { childrenCollections: d } = ((p = o.values) == null ? void 0 : p.enableChildren) || {};
20375
20389
  return (m = a.filter((h) => !d.find((g) => g.collection === h.name) || u.initialValue || h.name === u.value)) == null ? void 0 : m.map((h) => ({
@@ -21314,7 +21328,7 @@ const findGridSchema = (e) => e.reduceProperties((t, n) => {
21314
21328
  SchemaSettingsItem,
21315
21329
  {
21316
21330
  title: "Convert reference to duplicate",
21317
- onClick: () => q(this, null, function* () {
21331
+ onClick: () => V(this, null, function* () {
21318
21332
  const b = yield f(p), S = findBlockTemplateSchema(m), y = createDesignable({
21319
21333
  t: a,
21320
21334
  api: h,
@@ -21322,7 +21336,7 @@ const findGridSchema = (e) => e.reduceProperties((t, n) => {
21322
21336
  });
21323
21337
  y.loadAPIClientEvents(), y.removeWithoutEmit(S), y.insertAdjacent(n, b, {
21324
21338
  onSuccess() {
21325
- return q(this, null, function* () {
21339
+ return V(this, null, function* () {
21326
21340
  yield h.request({
21327
21341
  url: `/uiSchemas:remove/${S["x-uid"]}`
21328
21342
  });
@@ -21343,7 +21357,7 @@ const findGridSchema = (e) => e.reduceProperties((t, n) => {
21343
21357
  SchemaSettingsItem,
21344
21358
  {
21345
21359
  title: "Save as block template",
21346
- onClick: () => q(this, null, function* () {
21360
+ onClick: () => V(this, null, function* () {
21347
21361
  d(!1);
21348
21362
  const b = r && (c == null ? void 0 : c.getCollection(r)), S = findGridSchema(m), y = yield FormDialog(
21349
21363
  a("Save as template"),
@@ -21457,7 +21471,7 @@ const findGridSchema = (e) => e.reduceProperties((t, n) => {
21457
21471
  content: c("Are you sure you want to delete it?")
21458
21472
  }, n), {
21459
21473
  onOk() {
21460
- return q(this, null, function* () {
21474
+ return V(this, null, function* () {
21461
21475
  var y;
21462
21476
  const S = {
21463
21477
  removeParentsIfNoChildren: r,
@@ -21568,7 +21582,7 @@ const SchemaSettingsSwitchItem = (e) => {
21568
21582
  }, [JSON.stringify(r || {})]);
21569
21583
  const O = useCallback(() => {
21570
21584
  h(!1), D.reset();
21571
- }, [D]), j = useCallback(() => q(void 0, null, function* () {
21585
+ }, [D]), j = useCallback(() => V(void 0, null, function* () {
21572
21586
  yield D.submit();
21573
21587
  try {
21574
21588
  const M = D.values, $ = Object.keys(M).reduce((k, z) => (D.query(z).take() && (k[z] = M[z]), k), {});
@@ -21576,7 +21590,7 @@ const SchemaSettingsSwitchItem = (e) => {
21576
21590
  } catch (M) {
21577
21591
  console.error(M);
21578
21592
  }
21579
- }), [D, n]), N = useCallback(() => q(void 0, null, function* () {
21593
+ }), [D, n]), N = useCallback(() => V(void 0, null, function* () {
21580
21594
  !g && (a != null && a["x-uid"]) && (b["x-action-settings"].schemaUid = a["x-uid"], y.emit("patch", { schema: b }), yield F.resource("uiSchemas").insert({ values: a }), f(a["x-uid"])), typeof i == "function" && (i == null || i()), S.setVisible(!1), h(!0);
21581
21595
  }), [F, S, y, b, a, g]), B = useCallback((M) => M.stopPropagation(), []);
21582
21596
  return /* @__PURE__ */ jsxs(zIndexContext.Provider, { value: T, children: [
@@ -21619,7 +21633,7 @@ const SchemaSettingsSwitchItem = (e) => {
21619
21633
  });
21620
21634
  SchemaSettingsActionModalItem.displayName = "SchemaSettingsActionModalItem";
21621
21635
  const SchemaSettingsModalItem = (e) => {
21622
- const V = e, {
21636
+ const q = e, {
21623
21637
  hidden: t,
21624
21638
  title: n,
21625
21639
  components: o,
@@ -21631,7 +21645,7 @@ const SchemaSettingsModalItem = (e) => {
21631
21645
  width: u = "fit-content",
21632
21646
  noRecord: d = !1,
21633
21647
  ModalContextProvider: p = (L) => /* @__PURE__ */ jsx(Fragment$1, { children: L.children })
21634
- } = V, m = Y(V, [
21648
+ } = q, m = Y(q, [
21635
21649
  "hidden",
21636
21650
  "title",
21637
21651
  "components",
@@ -21649,7 +21663,7 @@ const SchemaSettingsModalItem = (e) => {
21649
21663
  P(x({
21650
21664
  title: n
21651
21665
  }, m), {
21652
- onClick: () => q(void 0, null, function* () {
21666
+ onClick: () => V(void 0, null, function* () {
21653
21667
  const L = l ? yield l() : c, G = _.isFunction(e.schema) ? e.schema() : e.schema;
21654
21668
  FormDialog(
21655
21669
  { title: G.title || n, width: u },
@@ -21722,7 +21736,7 @@ const SchemaSettingsModalItem = (e) => {
21722
21736
  } : {
21723
21737
  field: h,
21724
21738
  direction: "asc"
21725
- }), p = useSortFields(t.name || (c == null ? void 0 : c.name)), m = (g) => q(this, [g], function* ({ sort: h }) {
21739
+ }), p = useSortFields(t.name || (c == null ? void 0 : c.name)), m = (g) => V(this, [g], function* ({ sort: h }) {
21726
21740
  var C;
21727
21741
  if (t != null && t.onSubmit)
21728
21742
  return t.onSubmit({ sort: h });
@@ -22555,18 +22569,18 @@ const getActionContext = (e) => {
22555
22569
  `${w.target}.${((E = (z = o["x-component-props"]) == null ? void 0 : z.fieldNames) == null ? void 0 : E.label) || "id"}`
22556
22570
  ));
22557
22571
  const D = (w == null ? void 0 : w.interface) === "m2o" && findParentFieldSchema(o), O = D && p(D == null ? void 0 : D["x-collection-field"]), j = useTableBlockContext(), N = (w == null ? void 0 : w.interface) === "m2m" || (w == null ? void 0 : w.interface) === "mbm" || (O == null ? void 0 : O.type) === "hasMany" && (w == null ? void 0 : w.interface) === "m2o", B = useCallback(
22558
- (V) => {
22559
- const L = V.find((U) => U.value === "$nForm"), G = m(I);
22560
- return !(G != null && G.length) && L && (L.children = formatVariableScop(y())), V;
22572
+ (q) => {
22573
+ const L = q.find((U) => U.value === "$nForm"), G = m(I);
22574
+ return !(G != null && G.length) && L && (L.children = formatVariableScop(y())), q;
22561
22575
  },
22562
22576
  [y, I]
22563
22577
  ), R = useMemo(() => ({
22564
22578
  ArrayCollapse: ArrayCollapse$2,
22565
22579
  FormLayout,
22566
- VariableInput: (V) => /* @__PURE__ */ jsx(
22580
+ VariableInput: (q) => /* @__PURE__ */ jsx(
22567
22581
  VariableInput,
22568
- P(x({}, V), {
22569
- value: V.value || void 0,
22582
+ P(x({}, q), {
22583
+ value: q.value || void 0,
22570
22584
  hideVariableButton: t == null ? void 0 : t.hideVariableButton
22571
22585
  })
22572
22586
  )
@@ -22636,12 +22650,12 @@ const getActionContext = (e) => {
22636
22650
  u,
22637
22651
  g
22638
22652
  ]), $ = useCallback(
22639
- (V) => {
22653
+ (q) => {
22640
22654
  var G, U, H;
22641
22655
  const L = {
22642
22656
  "x-uid": o["x-uid"]
22643
22657
  };
22644
- o.default = (G = V.default) != null ? G : null, isVariable$1(V.default) || (U = r.setInitialValue) == null || U.call(r, V.default), L.default = (H = V.default) != null ? H : null, i.emit("patch", {
22658
+ o.default = (G = q.default) != null ? G : null, isVariable$1(q.default) || (U = r.setInitialValue) == null || U.call(r, q.default), L.default = (H = q.default) != null ? H : null, i.emit("patch", {
22645
22659
  schema: L,
22646
22660
  currentSchema: n
22647
22661
  });
@@ -22656,7 +22670,7 @@ const getActionContext = (e) => {
22656
22670
  width: 800,
22657
22671
  schema: M,
22658
22672
  onSubmit: $,
22659
- ModalContextProvider: (V) => /* @__PURE__ */ jsx(FlagProvider, { isInSubForm: v, isInSubTable: F, isInSetDefaultValueDialog: !0, children: V.children })
22673
+ ModalContextProvider: (q) => /* @__PURE__ */ jsx(FlagProvider, { isInSubForm: v, isInSubTable: F, isInSetDefaultValueDialog: !0, children: q.children })
22660
22674
  }
22661
22675
  );
22662
22676
  }, SchemaSettingsSortingRule = function e(t) {
@@ -22977,7 +22991,7 @@ const SaveConditions = () => {
22977
22991
  /* @__PURE__ */ jsx(
22978
22992
  Button,
22979
22993
  {
22980
- onClick: () => q(void 0, null, function* () {
22994
+ onClick: () => V(void 0, null, function* () {
22981
22995
  yield e.reset(), r == null || r(e.values), n.title = l(o.title) || c("Filter"), i(!1);
22982
22996
  }),
22983
22997
  children: c("Reset")
@@ -23424,7 +23438,7 @@ const useGetFilterOptions = () => {
23424
23438
  };
23425
23439
  });
23426
23440
  }, TableColumnDesigner$1 = (e) => {
23427
- var j, N, B, R, M, $, k, z, E, V, L, G;
23441
+ var j, N, B, R, M, $, k, z, E, q, L, G;
23428
23442
  const { uiSchema: t, fieldSchema: n, collectionField: o } = e, { form: r } = useFormBlockContext(), { getInterface: i, getCollection: a } = useCollectionManager_deprecated(), l = useField(), { t: c } = useTranslation(), u = useFieldSchema(), { dn: d } = useDesignable(), p = ((j = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : j.fieldNames) || ((N = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : N.fieldNames), m = useLabelFields$1((B = o == null ? void 0 : o.target) != null ? B : o == null ? void 0 : o.targetCollection), h = useColorFields((R = o == null ? void 0 : o.target) != null ? R : o == null ? void 0 : o.targetCollection), g = i(o == null ? void 0 : o.interface), f = a(o == null ? void 0 : o.target), C = isFileCollection$2(f), b = ["QuickEdit", "FormItem"].includes(n["x-decorator"]), { currentMode: S } = useAssociationFieldContext(), { isAllowToSetDefaultValue: y } = useIsAllowToSetDefaultValue({ collectionField: o, fieldSchema: n }), v = ["datetime", "createdAt", "updatedAt"].includes(o == null ? void 0 : o.interface), F = ["obo", "oho", "o2o", "o2m", "m2m", "m2o", "snapshot"].includes(
23429
23443
  o == null ? void 0 : o.interface
23430
23444
  ), I = useFieldModeOptions({ fieldSchema: n }), w = ((M = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : M.mode) || "Select";
@@ -23493,7 +23507,7 @@ const useGetFilterOptions = () => {
23493
23507
  title: c("Column width"),
23494
23508
  properties: {
23495
23509
  width: {
23496
- default: ((V = u == null ? void 0 : u["x-component-props"]) == null ? void 0 : V.width) || 100,
23510
+ default: ((q = u == null ? void 0 : u["x-component-props"]) == null ? void 0 : q.width) || 100,
23497
23511
  "x-decorator": "FormItem",
23498
23512
  "x-component": "InputNumber",
23499
23513
  "x-component-props": {}
@@ -24816,7 +24830,7 @@ function VariableSelect({
24816
24830
  }) {
24817
24831
  const { t: l } = useTranslation(), [c, u] = useState([]), { wrapSSR: d, componentCls: p, hashId: m } = useStyles$d(), { token: h } = useToken$1();
24818
24832
  function g(f) {
24819
- return q(this, null, function* () {
24833
+ return V(this, null, function* () {
24820
24834
  var b;
24821
24835
  const C = f[f.length - 1];
24822
24836
  !((b = C.children) != null && b.length) && !C.isLeaf && C.loadChildren && (yield C.loadChildren(C), t((S) => [...S]));
@@ -25053,7 +25067,7 @@ const useStyles$c = genStyleHook("nb-markdown", (e, { isDarkTheme: t }) => {
25053
25067
  ".field-interface-datetime": { minWidth: "100px" }
25054
25068
  }, t ? i : r)
25055
25069
  };
25056
- }), parseMarkdown = _.memoize((e) => q(void 0, null, function* () {
25070
+ }), parseMarkdown = _.memoize((e) => V(void 0, null, function* () {
25057
25071
  return e && (yield import("./md-oH2RssNY.mjs")).default.render(e);
25058
25072
  }));
25059
25073
  function useParseMarkdown(e) {
@@ -25154,8 +25168,8 @@ const MarkdownEditor = (e) => {
25154
25168
  observer$1((e) => {
25155
25169
  const { isDarkTheme: t } = useGlobalTheme(), { componentCls: n, hashId: o } = useStyles$c({ isDarkTheme: t }), { content: r, className: i } = e, a = useField(), l = useFieldSchema(), { dn: c } = useDesignable(), { onSave: u, onCancel: d, form: p } = e, m = useCollectionRecord(), [h, g] = useState(""), f = useVariables$1(), C = useLocalVariables$1(), { engine: b } = (l == null ? void 0 : l["x-decorator-props"]) || {}, [S, y] = useState(!1);
25156
25170
  useCompile(), useEffect(() => {
25157
- y(!0), q(void 0, null, function* () {
25158
- setTimeout(() => q(void 0, null, function* () {
25171
+ y(!0), V(void 0, null, function* () {
25172
+ setTimeout(() => V(void 0, null, function* () {
25159
25173
  const w = yield getRenderContent(b, r, f, C, parseMarkdown);
25160
25174
  g(w);
25161
25175
  })), y(!1);
@@ -25180,7 +25194,7 @@ const MarkdownEditor = (e) => {
25180
25194
  onCancel: () => {
25181
25195
  a.editable = !1, d == null || d();
25182
25196
  },
25183
- onSubmit: (I) => q(void 0, null, function* () {
25197
+ onSubmit: (I) => V(void 0, null, function* () {
25184
25198
  var w;
25185
25199
  a.editable = !1, (w = 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", {
25186
25200
  schema: {
@@ -25350,13 +25364,14 @@ const useStyles$b = genStyleHook("nb-menu-item", (e) => {
25350
25364
  };
25351
25365
  }), JT_VALUE_RE = /^\s*{{\s*([^{}]+)\s*}}\s*$/;
25352
25366
  function parseValue(e, t = {}) {
25367
+ var o;
25353
25368
  if (e == null)
25354
- return "null";
25369
+ return (o = t.defaultTypeOnNull) != null ? o : "null";
25355
25370
  const n = typeof e;
25356
25371
  if (n === "string") {
25357
- const o = e.match(JT_VALUE_RE);
25358
- if (o)
25359
- return o[1].split(".");
25372
+ const r = e.match(JT_VALUE_RE);
25373
+ if (r)
25374
+ return r[1].split(".");
25360
25375
  if (t.stringToDate && !Number.isNaN(Date.parse(e)))
25361
25376
  return "date";
25362
25377
  }
@@ -25522,7 +25537,7 @@ function Input$1(e) {
25522
25537
  ].filter((ne) => !ne.deprecated || (R == null ? void 0 : R[0]) === ne[M.value]);
25523
25538
  I(ee);
25524
25539
  }, [h, R, $, a]);
25525
- const V = (K) => q(this, null, function* () {
25540
+ const q = (K) => V(this, null, function* () {
25526
25541
  var ee;
25527
25542
  const X = K[K.length - 1];
25528
25543
  if (!((ee = X.children) != null && ee.length) && !X.isLeaf && X.loadChildren) {
@@ -25564,7 +25579,7 @@ function Input$1(e) {
25564
25579
  n(null);
25565
25580
  }, [$]);
25566
25581
  useEffect(() => {
25567
- q(this, null, function* () {
25582
+ V(this, null, function* () {
25568
25583
  var Z;
25569
25584
  if (!R || F.length <= 1)
25570
25585
  return;
@@ -25659,7 +25674,7 @@ function Input$1(e) {
25659
25674
  options: F,
25660
25675
  value: R != null ? R : E,
25661
25676
  onChange: L,
25662
- loadData: V,
25677
+ loadData: q,
25663
25678
  changeOnSelect: u,
25664
25679
  fieldNames: d,
25665
25680
  disabled: U,
@@ -25940,7 +25955,7 @@ function TextArea(e) {
25940
25955
  F(!0), pasteHTML(L.currentTarget, U), D(getCurrentRange(L.currentTarget)), N(L.currentTarget);
25941
25956
  },
25942
25957
  [N]
25943
- ), V = e.disabled || C.disabled;
25958
+ ), q = e.disabled || C.disabled;
25944
25959
  return t(
25945
25960
  /* @__PURE__ */ jsxs(
25946
25961
  Space$1.Compact,
@@ -25999,7 +26014,7 @@ function TextArea(e) {
25999
26014
  className: cx(
26000
26015
  n,
26001
26016
  "ant-input",
26002
- { "ant-input-disabled": V },
26017
+ { "ant-input-disabled": q },
26003
26018
  // NOTE: `pre-wrap` here for avoid the `&nbsp;` (\x160) issue when paste content, we need normal space (\x32).
26004
26019
  css`
26005
26020
  min-height: ${O.controlHeight}px;
@@ -26021,7 +26036,7 @@ function TextArea(e) {
26021
26036
  `
26022
26037
  ),
26023
26038
  ref: h,
26024
- contentEditable: !V,
26039
+ contentEditable: !q,
26025
26040
  dangerouslySetInnerHTML: { __html: I }
26026
26041
  }
26027
26042
  ),
@@ -26033,7 +26048,7 @@ function TextArea(e) {
26033
26048
  onInsert: B,
26034
26049
  changeOnSelect: i,
26035
26050
  fieldNames: l || defaultFieldNames$2,
26036
- disabled: V
26051
+ disabled: q
26037
26052
  }
26038
26053
  )
26039
26054
  ]
@@ -26042,7 +26057,7 @@ function TextArea(e) {
26042
26057
  );
26043
26058
  }
26044
26059
  function preloadOptions(e, t) {
26045
- return q(this, null, function* () {
26060
+ return V(this, null, function* () {
26046
26061
  var r;
26047
26062
  let n = [...e != null ? e : []];
26048
26063
  const o = t.map((i) => i.split("."));
@@ -26236,7 +26251,7 @@ const getVariableComponentWithScope = (e) => (t) => {
26236
26251
  }), [e]);
26237
26252
  return { urlSchema: n, paramsSchema: i, openInNewWindowSchema: a, modeSchema: o, htmlSchema: r };
26238
26253
  }, LinkMenuItem = () => {
26239
- const { t: e } = useTranslation(), t = useContext(SchemaOptionsContext), { theme: n } = useGlobalTheme(), { componentCls: o, hashId: r } = useStyles$b(), { urlSchema: i, paramsSchema: a } = useURLAndHTMLSchema(), l = useParentRoute(), { createRoute: c } = useNocoBaseRoutes(), u = useDataSourceManager(), d = useCollectionManager(), p = useCallback(() => q(void 0, null, function* () {
26254
+ const { t: e } = useTranslation(), t = useContext(SchemaOptionsContext), { theme: n } = useGlobalTheme(), { componentCls: o, hashId: r } = useStyles$b(), { urlSchema: i, paramsSchema: a } = useURLAndHTMLSchema(), l = useParentRoute(), { createRoute: c } = useNocoBaseRoutes(), u = useDataSourceManager(), d = useCollectionManager(), p = useCallback(() => V(void 0, null, function* () {
26240
26255
  const m = yield FormDialog(
26241
26256
  e("Add link"),
26242
26257
  () => {
@@ -26284,7 +26299,7 @@ const getVariableComponentWithScope = (e) => (t) => {
26284
26299
  }, useInsertPageSchema = () => {
26285
26300
  const e = useAPIClient();
26286
26301
  return useCallback(
26287
- (t) => q(void 0, null, function* () {
26302
+ (t) => V(void 0, null, function* () {
26288
26303
  yield e.request({
26289
26304
  method: "POST",
26290
26305
  url: "/uiSchemas:insert",
@@ -26294,7 +26309,7 @@ const getVariableComponentWithScope = (e) => (t) => {
26294
26309
  [e]
26295
26310
  );
26296
26311
  }, PageMenuItem = () => {
26297
- const { t: e } = useTranslation(), t = useContext(SchemaOptionsContext), { theme: n } = useGlobalTheme(), { componentCls: o, hashId: r } = useStyles$b(), i = useParentRoute(), { createRoute: a } = useNocoBaseRoutes(), l = useInsertPageSchema(), c = useCallback(() => q(void 0, null, function* () {
26312
+ const { t: e } = useTranslation(), t = useContext(SchemaOptionsContext), { theme: n } = useGlobalTheme(), { componentCls: o, hashId: r } = useStyles$b(), i = useParentRoute(), { createRoute: a } = useNocoBaseRoutes(), l = useInsertPageSchema(), c = useCallback(() => V(void 0, null, function* () {
26298
26313
  const u = yield FormDialog(
26299
26314
  e("Add page"),
26300
26315
  () => /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: t.scope, components: x({}, t.components), children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(
@@ -26359,7 +26374,7 @@ function getPageMenuSchema({ pageSchemaUid: e, tabSchemaUid: t, tabSchemaName: n
26359
26374
  };
26360
26375
  }
26361
26376
  const GroupItem$1 = () => {
26362
- const { t: e } = useTranslation(), t = useContext(SchemaOptionsContext), { theme: n } = useGlobalTheme(), { componentCls: o, hashId: r } = useStyles$b(), i = useParentRoute(), { createRoute: a } = useNocoBaseRoutes(), l = useCallback(() => q(void 0, null, function* () {
26377
+ const { t: e } = useTranslation(), t = useContext(SchemaOptionsContext), { theme: n } = useGlobalTheme(), { componentCls: o, hashId: r } = useStyles$b(), i = useParentRoute(), { createRoute: a } = useNocoBaseRoutes(), l = useCallback(() => V(void 0, null, function* () {
26363
26378
  const c = yield FormDialog(
26364
26379
  e("Add group"),
26365
26380
  () => /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: t.scope, components: x({}, t.components), children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(
@@ -26485,7 +26500,7 @@ const GroupItem$1 = () => {
26485
26500
  t.confirm({
26486
26501
  title: e("Delete menu item"),
26487
26502
  content: e("Are you sure you want to delete it?"),
26488
- onOk: () => q(void 0, null, function* () {
26503
+ onOk: () => V(void 0, null, function* () {
26489
26504
  if ((o == null ? void 0 : o.id) != null && (yield n(o.id)), a !== (o == null ? void 0 : o.schemaUid) && !findRouteBySchemaUid(a, o == null ? void 0 : o.children))
26490
26505
  return;
26491
26506
  const l = findPrevSibling(r, o), c = findNextSibling(r, o);
@@ -26522,7 +26537,7 @@ const GroupItem$1 = () => {
26522
26537
  }
26523
26538
  }
26524
26539
  },
26525
- onSubmit: (g) => q(void 0, [g], function* ({ title: m, icon: h }) {
26540
+ onSubmit: (g) => V(void 0, [g], function* ({ title: m, icon: h }) {
26526
26541
  var S;
26527
26542
  const f = uid(), C = o === "beforeEnd" ? l == null ? void 0 : l.id : l == null ? void 0 : l.parentId, { data: b } = yield u({
26528
26543
  type: NocoBaseDesktopRouteType.group,
@@ -26564,7 +26579,7 @@ const GroupItem$1 = () => {
26564
26579
  }
26565
26580
  }
26566
26581
  },
26567
- onSubmit: (g) => q(void 0, [g], function* ({ title: m, icon: h }) {
26582
+ onSubmit: (g) => V(void 0, [g], function* ({ title: m, icon: h }) {
26568
26583
  var F;
26569
26584
  const f = uid(), C = uid(), b = uid(), S = uid(), y = o === "beforeEnd" ? l == null ? void 0 : l.id : l == null ? void 0 : l.parentId, { data: v } = yield u({
26570
26585
  type: NocoBaseDesktopRouteType.page,
@@ -26617,7 +26632,7 @@ const GroupItem$1 = () => {
26617
26632
  params: a
26618
26633
  }
26619
26634
  },
26620
- onSubmit: (C) => q(void 0, [C], function* ({ title: m, icon: h, href: g, params: f }) {
26635
+ onSubmit: (C) => V(void 0, [C], function* ({ title: m, icon: h, href: g, params: f }) {
26621
26636
  var v;
26622
26637
  const b = uid(), S = o === "beforeEnd" ? l == null ? void 0 : l.id : l == null ? void 0 : l.parentId, { data: y } = yield u({
26623
26638
  type: NocoBaseDesktopRouteType.link,
@@ -26699,7 +26714,7 @@ const GroupItem$1 = () => {
26699
26714
  "After hiding, this menu will no longer appear in the menu bar. To show it again, you need to go to the route management page to configure it."
26700
26715
  ),
26701
26716
  onOk() {
26702
- return q(this, null, function* () {
26717
+ return V(this, null, function* () {
26703
26718
  t.id !== void 0 && (yield n(t.id, {
26704
26719
  hideInMenu: !!r
26705
26720
  }));
@@ -26753,7 +26768,7 @@ const GroupItem$1 = () => {
26753
26768
  }
26754
26769
  }
26755
26770
  }), [r, e]), { moveRoute: a } = useNocoBaseRoutes(), l = useCurrentRoute(), c = useCallback(
26756
- (p) => q(void 0, [p], function* ({ target: u, position: d }) {
26771
+ (p) => V(void 0, [p], function* ({ target: u, position: d }) {
26757
26772
  var f;
26758
26773
  const [m] = ((f = u == null ? void 0 : u.split) == null ? void 0 : f.call(u, "||")) || [];
26759
26774
  if (!m || m === void 0 || !l)
@@ -26940,7 +26955,7 @@ const LanguageSettings = () => {
26940
26955
  value: a
26941
26956
  })),
26942
26957
  value: t.language,
26943
- onChange: (a) => q(void 0, null, function* () {
26958
+ onChange: (a) => V(void 0, null, function* () {
26944
26959
  yield n.resource("users").updateLang({
26945
26960
  values: {
26946
26961
  appLang: a
@@ -27022,7 +27037,20 @@ const useAllAccessDesktopRoutes = () => useContext(AllAccessDesktopRoutesContext
27022
27037
  `, pageContentStyle = {
27023
27038
  flex: 1,
27024
27039
  overflowY: "auto"
27025
- }, LayoutContent = () => /* @__PURE__ */ jsx("div", { className: `${layoutContentClass} nb-subpages-slot-without-header-and-side`, children: /* @__PURE__ */ jsx("div", { style: pageContentStyle, children: /* @__PURE__ */ jsx(Outlet, {}) }) }), NocoBaseLogo = () => {
27040
+ }, ShowTipWhenNoPages = () => {
27041
+ const { allAccessRoutes: e } = useAllAccessDesktopRoutes(), { designable: t } = useDesignable(), { token: n } = useToken(), { t: o } = useTranslation(), r = useLocation();
27042
+ return e.length === 0 && !t && ["/admin", "/admin/"].includes(r.pathname) ? /* @__PURE__ */ jsx(
27043
+ Result,
27044
+ {
27045
+ icon: /* @__PURE__ */ jsx(HighlightOutlined, { style: { fontSize: "8em", color: n.colorText } }),
27046
+ title: o("No pages yet, please configure first"),
27047
+ subTitle: o('Click the "UI Editor" icon in the upper right corner to enter the UI Editor mode')
27048
+ }
27049
+ ) : null;
27050
+ }, LayoutContent = () => /* @__PURE__ */ jsx("div", { className: `${layoutContentClass} nb-subpages-slot-without-header-and-side`, children: /* @__PURE__ */ jsxs("div", { style: pageContentStyle, children: [
27051
+ /* @__PURE__ */ jsx(Outlet, {}),
27052
+ /* @__PURE__ */ jsx(ShowTipWhenNoPages, {})
27053
+ ] }) }), NocoBaseLogo = () => {
27026
27054
  var r, i, a, l, c, u, d, p;
27027
27055
  const e = useSystemSettings(), { token: t } = useToken(), n = useMemo(() => ({ fontSize: t.fontSizeHeading3 }), [t.fontSizeHeading3]), o = (a = (i = (r = e == null ? void 0 : e.data) == null ? void 0 : r.data) == null ? void 0 : i.logo) != null && a.url ? /* @__PURE__ */ jsx("img", { className: className2, src: (u = (c = (l = e == null ? void 0 : e.data) == null ? void 0 : l.data) == null ? void 0 : c.logo) == null ? void 0 : u.url }) : /* @__PURE__ */ jsx("span", { style: n, className: className3, children: (p = (d = e == null ? void 0 : e.data) == null ? void 0 : d.data) == null ? void 0 : p.title });
27028
27056
  return /* @__PURE__ */ jsx("div", { className: className1$1, children: e != null && e.loading ? null : o });
@@ -27050,7 +27078,7 @@ const useAllAccessDesktopRoutes = () => useContext(AllAccessDesktopRoutesContext
27050
27078
  o.current && (o.current.parentElement.parentElement.style.order = 999, o.current.parentElement.parentElement.style.paddingLeft = 0, o.current.parentElement.parentElement.style.padding = 0);
27051
27079
  }, []);
27052
27080
  const i = useCallback(
27053
- (u) => q(void 0, null, function* () {
27081
+ (u) => V(void 0, null, function* () {
27054
27082
  var m, h;
27055
27083
  const d = (m = t._route.options) == null ? void 0 : m.href, p = (h = t._route.options) == null ? void 0 : h.params;
27056
27084
  u.preventDefault(), u.stopPropagation();
@@ -27244,12 +27272,12 @@ const NavigateToDefaultPage = (e) => {
27244
27272
  }, AdminProvider = (e) => /* @__PURE__ */ jsx(CurrentPageUidProvider, { children: /* @__PURE__ */ jsx(CurrentTabUidProvider, { children: /* @__PURE__ */ jsx(IsSubPageClosedByPageMenuProvider, { children: /* @__PURE__ */ jsx(ACLRolesCheckProvider, { children: /* @__PURE__ */ jsx(RoutesRequestProvider, { children: /* @__PURE__ */ jsx(NavigateToDefaultPage, { children: /* @__PURE__ */ jsx(LegacyRouteCompat, { children: /* @__PURE__ */ jsx(RemoteCollectionManagerProvider, { children: /* @__PURE__ */ jsx(CurrentAppInfoProvider, { children: /* @__PURE__ */ jsx(RemoteSchemaTemplateManagerProvider, { children: e.children }) }) }) }) }) }) }) }) }) }), AdminLayout = (e) => /* @__PURE__ */ jsx(AdminProvider, { children: /* @__PURE__ */ jsx(InternalAdminLayout, x({}, e)) });
27245
27273
  class AdminLayoutPlugin extends Plugin {
27246
27274
  afterAdd() {
27247
- return q(this, null, function* () {
27275
+ return V(this, null, function* () {
27248
27276
  yield this.app.pm.add(RemoteSchemaTemplateManagerPlugin);
27249
27277
  });
27250
27278
  }
27251
27279
  load() {
27252
- return q(this, null, function* () {
27280
+ return V(this, null, function* () {
27253
27281
  this.app.schemaSettingsManager.add(userCenterSettings), this.app.addComponents({ AdminLayout, AdminDynamicPage });
27254
27282
  });
27255
27283
  }
@@ -27411,7 +27439,7 @@ function getFormValues({
27411
27439
  }
27412
27440
  function useCollectValuesToSubmit() {
27413
27441
  const e = useForm(), t = useFilterByTk(), { field: n, resource: o } = 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$1(), m = useLocalVariables$1({ currentForm: e }), h = useFieldSchema(), g = useTreeParentRecord();
27414
- return useCallback(() => q(this, null, function* () {
27442
+ return useCallback(() => V(this, null, function* () {
27415
27443
  var F, I, w, T;
27416
27444
  const { assignedValues: f = {}, overwriteValues: C } = (F = h == null ? void 0 : h["x-action-settings"]) != null ? F : {}, b = getFormValues({
27417
27445
  filterByTk: t,
@@ -27421,7 +27449,7 @@ function useCollectValuesToSubmit() {
27421
27449
  getField: i,
27422
27450
  resource: o,
27423
27451
  actionFields: (d == null ? void 0 : d("form")) || []
27424
- }), S = {}, y = Object.keys(f).map((D) => q(this, null, function* () {
27452
+ }), S = {}, y = Object.keys(f).map((D) => V(this, null, function* () {
27425
27453
  const O = f[D], j = i(D);
27426
27454
  if (isVariable$1(O)) {
27427
27455
  const { value: N } = (yield p == null ? void 0 : p.parseVariable(O, m)) || {};
@@ -27456,7 +27484,7 @@ const useCreateActionProps = () => {
27456
27484
  const e = useFilterByTk(), t = useCollectionRecord(), n = useForm(), { field: o, resource: r } = useBlockRequestContext(), { setVisible: i, setSubmitted: a, setFormValueChanged: l } = useActionContext(), c = useNavigateNoUpdate(), u = useFieldSchema(), d = useField(), p = useCompile(), { modal: m } = App.useApp(), { t: h } = useTranslation(), { updateAssociationValues: g } = useFormBlockContext(), f = useCollectValuesToSubmit(), C = t.isNew ? d.componentProps.saveMode || "create" : "update", b = ((S = d.componentProps.filterKeys) == null ? void 0 : S.checked) || [];
27457
27485
  return {
27458
27486
  onClick() {
27459
- return q(this, null, function* () {
27487
+ return V(this, null, function* () {
27460
27488
  var B;
27461
27489
  const { onSuccess: v, skipValidator: F, triggerWorkflows: I } = (B = u == null ? void 0 : u["x-action-settings"]) != null ? B : {}, { manualClose: w, redirecting: T, redirectTo: D, successMessage: O, actionAfterSuccess: j } = v || {};
27462
27490
  F || (yield n.submit());
@@ -27477,7 +27505,7 @@ const useCreateActionProps = () => {
27477
27505
  }
27478
27506
  w ? m.success({
27479
27507
  title: p(O),
27480
- onOk: () => q(this, null, function* () {
27508
+ onOk: () => V(this, null, function* () {
27481
27509
  yield resetFormCorrectly(n), (T && !j || j === "redirect") && D && (isURL(D) ? window.location.href = D : c(D));
27482
27510
  })
27483
27511
  }) : (message.success(p(O)), yield resetFormCorrectly(n), (T && !j || j === "redirect") && D && (isURL(D) ? window.location.href = D : c(D)));
@@ -27492,15 +27520,15 @@ const useCreateActionProps = () => {
27492
27520
  const e = useForm(), { field: t, resource: n, __parent: o } = useBlockRequestContext(), { setVisible: r, fieldSchema: i, setSubmitted: a } = useActionContext(), l = useFieldSchema(), c = useField(), { fields: u, getField: d, getTreeParentField: p, name: m } = useCollection_deprecated(), h = useCompile(), g = useFilterByTk(), f = useRecord(), C = useVariables$1(), b = useLocalVariables$1({ currentForm: e }), { getActiveFieldsName: S } = useFormActiveFields() || {}, y = c.componentProps.saveMode || "create", v = ((F = c.componentProps.filterKeys) == null ? void 0 : F.checked) || [];
27493
27521
  return {
27494
27522
  onClick() {
27495
- return q(this, null, function* () {
27496
- var z, E, V, L, G, U;
27523
+ return V(this, null, function* () {
27524
+ var z, E, q, L, G, U;
27497
27525
  const w = u.map((H) => H.name), {
27498
27526
  assignedValues: T = {},
27499
27527
  onSuccess: D,
27500
27528
  overwriteValues: O,
27501
27529
  skipValidator: j,
27502
27530
  triggerWorkflows: N
27503
- } = (z = l == null ? void 0 : l["x-action-settings"]) != null ? z : {}, B = (E = i == null ? void 0 : i["x-component-props"]) == null ? void 0 : E.addChild, { successMessage: R } = D || {}, M = {}, $ = Object.keys(T).map((H) => q(this, null, function* () {
27531
+ } = (z = l == null ? void 0 : l["x-action-settings"]) != null ? z : {}, B = (E = i == null ? void 0 : i["x-component-props"]) == null ? void 0 : E.addChild, { successMessage: R } = D || {}, M = {}, $ = Object.keys(T).map((H) => V(this, null, function* () {
27504
27532
  const J = T[H], W = d(H);
27505
27533
  if (isVariable$1(J)) {
27506
27534
  const { value: K } = (yield C == null ? void 0 : C.parseVariable(J, b)) || {};
@@ -27520,7 +27548,7 @@ const useCreateActionProps = () => {
27520
27548
  });
27521
27549
  if (B) {
27522
27550
  const H = p();
27523
- k[(V = H == null ? void 0 : H.name) != null ? V : "parent"] = f, k[(L = H == null ? void 0 : H.foreignKey) != null ? L : "parentId"] = f.id;
27551
+ k[(q = H == null ? void 0 : H.name) != null ? q : "parent"] = f, k[(L = H == null ? void 0 : H.foreignKey) != null ? L : "parentId"] = f.id;
27524
27552
  }
27525
27553
  c.data = t.data || {}, c.data.loading = !0;
27526
27554
  try {
@@ -27559,10 +27587,10 @@ const useCreateActionProps = () => {
27559
27587
  }
27560
27588
  }, useDoFilter = () => {
27561
27589
  const e = useForm(), { getDataBlocks: t } = useFilterBlock(), n = useCollectionManager(), { getOperators: o } = useOperators(), r = useFieldSchema(), { name: i } = useCollection(), { targets: a = [], uid: l } = useMemo(() => findFilterTargets(r), [r]), c = useCallback(() => removeNullCondition(transformToFilter(e.values, o(), n.getCollectionField.bind(n), i)), [e.values, n, o, i]), u = useCallback(
27562
- (...p) => q(void 0, [...p], function* ({ doNothingWhenFilterIsEmpty: d = !1 } = {}) {
27590
+ (...p) => V(void 0, [...p], function* ({ doNothingWhenFilterIsEmpty: d = !1 } = {}) {
27563
27591
  try {
27564
27592
  yield Promise.all(
27565
- t().map((m) => q(void 0, null, function* () {
27593
+ t().map((m) => V(void 0, null, function* () {
27566
27594
  var b, S, y, v;
27567
27595
  if (!a.find((F) => F.uid === m.uid))
27568
27596
  return;
@@ -27606,7 +27634,7 @@ const useCreateActionProps = () => {
27606
27634
  const { doFilter: e } = useDoFilter(), t = useField();
27607
27635
  return t.data = t.data || {}, {
27608
27636
  onClick() {
27609
- return q(this, null, function* () {
27637
+ return V(this, null, function* () {
27610
27638
  t.data.loading = !0, yield e(), t.data.loading = !1;
27611
27639
  });
27612
27640
  }
@@ -27614,7 +27642,7 @@ const useCreateActionProps = () => {
27614
27642
  }, useDoReset = () => {
27615
27643
  const e = useForm(), t = useFieldSchema(), { getDataBlocks: n } = useFilterBlock(), { targets: o, uid: r } = findFilterTargets(t), { doFilter: i, getFilterFromCurrentForm: a } = useDoFilter();
27616
27644
  return {
27617
- doReset: () => q(void 0, null, function* () {
27645
+ doReset: () => V(void 0, null, function* () {
27618
27646
  var l;
27619
27647
  if (yield e.reset(void 0, {
27620
27648
  forceClear: !!((l = t == null ? void 0 : t["x-component-props"]) != null && l.clearDefaultValue)
@@ -27627,7 +27655,7 @@ const useCreateActionProps = () => {
27627
27655
  const e = useField(), { doReset: t } = useDoReset();
27628
27656
  return e.data = e.data || {}, {
27629
27657
  onClick() {
27630
- return q(this, null, function* () {
27658
+ return V(this, null, function* () {
27631
27659
  e.data.loading = !0, yield t(), e.data.loading = !1;
27632
27660
  });
27633
27661
  }
@@ -27636,14 +27664,14 @@ const useCreateActionProps = () => {
27636
27664
  const { resource: e, __parent: t, service: n } = useBlockRequestContext(), o = useFilterByTk(), r = useFieldSchema(), i = useNavigateNoUpdate(), a = useCompile(), l = useForm(), { modal: c } = App.useApp(), u = useVariables$1(), d = useLocalVariables$1({ currentForm: l }), { name: p, getField: m } = useCollection_deprecated(), { setVisible: h } = useActionContext();
27637
27665
  return {
27638
27666
  onClick(f, C) {
27639
- return q(this, null, function* () {
27667
+ return V(this, null, function* () {
27640
27668
  var N, B, R;
27641
27669
  const {
27642
27670
  assignedValues: b = {},
27643
27671
  onSuccess: S,
27644
27672
  skipValidator: y,
27645
27673
  triggerWorkflows: v
27646
- } = (N = r == null ? void 0 : r["x-action-settings"]) != null ? N : {}, { manualClose: F, redirecting: I, redirectTo: w, successMessage: T, actionAfterSuccess: D } = S || {}, O = {}, j = Object.keys(b).map((M) => q(this, null, function* () {
27674
+ } = (N = r == null ? void 0 : r["x-action-settings"]) != null ? N : {}, { manualClose: F, redirecting: I, redirectTo: w, successMessage: T, actionAfterSuccess: D } = S || {}, O = {}, j = Object.keys(b).map((M) => V(this, null, function* () {
27647
27675
  const $ = b[M], k = m(M);
27648
27676
  if (isVariable$1($)) {
27649
27677
  const { value: z } = (yield u == null ? void 0 : u.parseVariable($, d)) || {};
@@ -27658,7 +27686,7 @@ const useCreateActionProps = () => {
27658
27686
  triggerWorkflows: v != null && v.length ? v.map((M) => [M.workflowKey, M.context].filter(Boolean).join("!")).join(",") : void 0
27659
27687
  }), (D === "previous" || !D && I !== !0) && (h == null || h(!1)), C && (C == null || C()), e instanceof TableFieldResource || (R = (B = t == null ? void 0 : t.service) == null ? void 0 : B.refresh) == null || R.call(B), T && (F ? c.success({
27660
27688
  title: a(T),
27661
- onOk: () => q(this, null, function* () {
27689
+ onOk: () => V(this, null, function* () {
27662
27690
  (I && !D || D === "redirect") && w && (isURL(w) ? window.location.href = w : i(w));
27663
27691
  })
27664
27692
  }) : (message.success(a(T)), (I && !D || D === "redirect") && w && (isURL(w) ? window.location.href = w : i(w))));
@@ -27672,7 +27700,7 @@ const useCreateActionProps = () => {
27672
27700
  const { name: f, getField: C } = useCollection_deprecated(), b = useLocalVariables$1(), { setVisible: S } = useActionContext();
27673
27701
  return {
27674
27702
  onClick() {
27675
- return q(this, null, function* () {
27703
+ return V(this, null, function* () {
27676
27704
  var z;
27677
27705
  const {
27678
27706
  assignedValues: T = {},
@@ -27680,23 +27708,23 @@ const useCreateActionProps = () => {
27680
27708
  updateMode: O
27681
27709
  } = (z = i == null ? void 0 : i["x-action-settings"]) != null ? z : {}, { manualClose: j, redirecting: N, redirectTo: B, successMessage: R, actionAfterSuccess: M } = D || {};
27682
27710
  m.data = e.data || {}, m.data.loading = !0;
27683
- const $ = {}, k = Object.keys(T).map((V) => q(this, null, function* () {
27684
- const L = T[V], G = C(V);
27711
+ const $ = {}, k = Object.keys(T).map((q) => V(this, null, function* () {
27712
+ const L = T[q], G = C(q);
27685
27713
  if (isVariable$1(L)) {
27686
27714
  const { value: U } = (yield g == null ? void 0 : g.parseVariable(L, b)) || {};
27687
- U && ($[V] = transformVariableValue(U, { targetCollectionField: G }));
27715
+ U && ($[q] = transformVariableValue(U, { targetCollectionField: G }));
27688
27716
  } else
27689
- L !== "" && ($[V] = L);
27717
+ L !== "" && ($[q] = L);
27690
27718
  }));
27691
27719
  yield Promise.all(k), (M === "previous" || !M && N !== !0) && (S == null || S(!1)), h.confirm({
27692
27720
  title: p("Bulk update"),
27693
27721
  content: p(O === "selected" ? "Update selected data?" : "Update all data?"),
27694
27722
  onOk() {
27695
- return q(this, null, function* () {
27723
+ return V(this, null, function* () {
27696
27724
  var G, U, H, J;
27697
- const { filter: V } = (U = (G = o.params) == null ? void 0 : G[0]) != null ? U : {}, L = {
27725
+ const { filter: q } = (U = (G = o.params) == null ? void 0 : G[0]) != null ? U : {}, L = {
27698
27726
  values: x({}, $),
27699
- filter: V,
27727
+ filter: q,
27700
27728
  forceUpdate: !1
27701
27729
  };
27702
27730
  if (O === "selected") {
@@ -27715,14 +27743,14 @@ const useCreateActionProps = () => {
27715
27743
  }
27716
27744
  t instanceof TableFieldResource || (J = (H = n == null ? void 0 : n.service) == null ? void 0 : H.refresh) == null || J.call(H), R && (j ? h.success({
27717
27745
  title: d(R),
27718
- onOk: () => q(this, null, function* () {
27746
+ onOk: () => V(this, null, function* () {
27719
27747
  (N && !M || M === "redirect") && B && (isURL(B) ? window.location.href = B : u(B));
27720
27748
  })
27721
27749
  }) : (message.success(d(R)), (N && !M || M === "redirect") && B && (isURL(B) ? window.location.href = B : u(B))));
27722
27750
  });
27723
27751
  },
27724
27752
  onCancel() {
27725
- return q(this, null, function* () {
27753
+ return V(this, null, function* () {
27726
27754
  m.data.loading = !1;
27727
27755
  });
27728
27756
  }
@@ -27735,9 +27763,9 @@ const useCreateActionProps = () => {
27735
27763
  const e = useAPIClient(), t = useNavigateNoUpdate(), n = useFilterByTk(), o = useFieldSchema(), r = useCompile(), i = useForm(), { fields: a, getField: l } = useCollection_deprecated(), { field: c, resource: u, __parent: d, service: p } = useBlockRequestContext(), m = useRecord(), h = useCurrentUserContext(), g = (v = h == null ? void 0 : h.data) == null ? void 0 : v.data, f = useField(), { t: C } = useTranslation(), { setVisible: b } = useActionContext(), { modal: S } = App.useApp(), { getActiveFieldsName: y } = useFormActiveFields() || {};
27736
27764
  return {
27737
27765
  onClick() {
27738
- return q(this, null, function* () {
27739
- var V, L, G, U;
27740
- const { skipValidator: I, onSuccess: w, requestSettings: T } = (V = o == null ? void 0 : o["x-action-settings"]) != null ? V : {}, { manualClose: D, redirecting: O, redirectTo: j, successMessage: N, actionAfterSuccess: B } = w || {}, R = o == null ? void 0 : o["x-action"];
27766
+ return V(this, null, function* () {
27767
+ var q, L, G, U;
27768
+ const { skipValidator: I, onSuccess: w, requestSettings: T } = (q = o == null ? void 0 : o["x-action-settings"]) != null ? q : {}, { manualClose: D, redirecting: O, redirectTo: j, successMessage: N, actionAfterSuccess: B } = w || {}, R = o == null ? void 0 : o["x-action"];
27741
27769
  if (!T.url)
27742
27770
  return;
27743
27771
  I !== !0 && R === "customize:form:request" && (yield i.submit());
@@ -27765,7 +27793,7 @@ const useCreateActionProps = () => {
27765
27793
  try {
27766
27794
  yield e.request(x({}, E)), f.data.loading = !1, u instanceof TableFieldResource || (G = (L = d == null ? void 0 : d.service) == null ? void 0 : L.refresh) == null || G.call(L), (U = p == null ? void 0 : p.refresh) == null || U.call(p), R === "customize:form:request" && (B === "previous" || !B && O !== !0) && (b == null || b(!1)), N || (message.success(C("Saved successfully")), yield resetFormCorrectly(i), (O && !B || B === "redirect") && j && (isURL(j) ? window.location.href = j : t(j))), D ? S.success({
27767
27795
  title: r(N),
27768
- onOk: () => q(this, null, function* () {
27796
+ onOk: () => V(this, null, function* () {
27769
27797
  (O && !B || B === "redirect") && j && (isURL(j) ? window.location.href = j : t(j));
27770
27798
  })
27771
27799
  }) : message.success(r(N));
@@ -27779,7 +27807,7 @@ const useCreateActionProps = () => {
27779
27807
  const e = useForm(), t = useFilterByTk(), { field: n, resource: o, __parent: r } = useBlockRequestContext(), { setVisible: i, setFormValueChanged: a } = useActionContext(), l = useFieldSchema(), c = useNavigateNoUpdate(), { fields: u, getField: d, name: p } = useCollection_deprecated(), m = useCompile(), h = useField(), { updateAssociationValues: g } = useFormBlockContext(), { modal: f } = App.useApp(), C = useParamsFromRecord(), b = useVariables$1(), S = useLocalVariables$1({ currentForm: e }), { getActiveFieldsName: y } = useFormActiveFields() || {};
27780
27808
  return {
27781
27809
  onClick(F, I) {
27782
- return q(this, null, function* () {
27810
+ return V(this, null, function* () {
27783
27811
  var L;
27784
27812
  const {
27785
27813
  assignedValues: w = {},
@@ -27787,7 +27815,7 @@ const useCreateActionProps = () => {
27787
27815
  overwriteValues: D,
27788
27816
  skipValidator: O,
27789
27817
  triggerWorkflows: j
27790
- } = (L = l == null ? void 0 : l["x-action-settings"]) != null ? L : {}, { manualClose: N, redirecting: B, redirectTo: R, successMessage: M, actionAfterSuccess: $ } = T || {}, k = {}, z = Object.keys(w).map((G) => q(this, null, function* () {
27818
+ } = (L = l == null ? void 0 : l["x-action-settings"]) != null ? L : {}, { manualClose: N, redirecting: B, redirectTo: R, successMessage: M, actionAfterSuccess: $ } = T || {}, k = {}, z = Object.keys(w).map((G) => V(this, null, function* () {
27791
27819
  const U = w[G], H = d(G);
27792
27820
  if (isVariable$1(U)) {
27793
27821
  const { value: J } = (yield b == null ? void 0 : b.parseVariable(U, S)) || {};
@@ -27796,7 +27824,7 @@ const useCreateActionProps = () => {
27796
27824
  U !== "" && (k[G] = U);
27797
27825
  }));
27798
27826
  yield Promise.all(z), O || (yield e.submit());
27799
- const E = u.map((G) => G.name), V = getFormValues({
27827
+ const E = u.map((G) => G.name), q = getFormValues({
27800
27828
  filterByTk: t,
27801
27829
  field: n,
27802
27830
  form: e,
@@ -27809,7 +27837,7 @@ const useCreateActionProps = () => {
27809
27837
  try {
27810
27838
  if (yield o.update(P(x({
27811
27839
  filterByTk: t,
27812
- values: x(x(x({}, V), D), k)
27840
+ values: x(x(x({}, q), D), k)
27813
27841
  }, C), {
27814
27842
  updateAssociationValues: g,
27815
27843
  // TODO(refactor): should change to inject by plugin
@@ -27818,7 +27846,7 @@ const useCreateActionProps = () => {
27818
27846
  return;
27819
27847
  N ? f.success({
27820
27848
  title: m(M),
27821
- onOk: () => q(this, null, function* () {
27849
+ onOk: () => V(this, null, function* () {
27822
27850
  yield e.reset(), (B && !$ || $ === "redirect") && R && (isURL(R) ? window.location.href = R : c(R));
27823
27851
  })
27824
27852
  }) : (message.success(m(M)), (B && !$ || $ === "redirect" || $ === "redirect") && R && (isURL(R) ? window.location.href = R : c(R)));
@@ -27832,7 +27860,7 @@ const useCreateActionProps = () => {
27832
27860
  const e = useFilterByTk(), { resource: t, service: n, block: o, __parent: r } = useBlockRequestContext(), { setVisible: i, setSubmitted: a } = useActionContext(), l = useParamsFromRecord(), c = useFieldSchema();
27833
27861
  return {
27834
27862
  onClick(d, p) {
27835
- return q(this, null, function* () {
27863
+ return V(this, null, function* () {
27836
27864
  var C, b, S, y, v;
27837
27865
  const { triggerWorkflows: m } = (C = c == null ? void 0 : c["x-action-settings"]) != null ? C : {};
27838
27866
  yield t.destroy(x({
@@ -27851,7 +27879,7 @@ const useCreateActionProps = () => {
27851
27879
  const t = useFilterByTk(), o = useAPIClient().resource(e, t);
27852
27880
  return {
27853
27881
  onClick(i) {
27854
- return q(this, null, function* () {
27882
+ return V(this, null, function* () {
27855
27883
  yield o.remove({
27856
27884
  values: [i.id]
27857
27885
  });
@@ -27862,7 +27890,7 @@ const useCreateActionProps = () => {
27862
27890
  const e = useFilterByTk(), { resource: t, service: n, block: o, __parent: r } = useBlockRequestContext(), { setVisible: i, setSubmitted: a, setFormValueChanged: l } = useActionContext();
27863
27891
  return {
27864
27892
  onClick(u, d) {
27865
- return q(this, null, function* () {
27893
+ return V(this, null, function* () {
27866
27894
  var g, f, C, b;
27867
27895
  yield t.remove({
27868
27896
  values: [e]
@@ -27878,7 +27906,7 @@ const useCreateActionProps = () => {
27878
27906
  const { field: e } = useBlockRequestContext(), { resource: t, service: n } = useBlockRequestContext(), { setSubmitted: o } = useActionContext(), r = useCollection_deprecated(), { filterTargetKey: i } = r;
27879
27907
  return {
27880
27908
  onClick(l, c) {
27881
- return q(this, null, function* () {
27909
+ return V(this, null, function* () {
27882
27910
  var m, h, g, f, C, b, S;
27883
27911
  let u = (m = e.data) == null ? void 0 : m.selectedRowKeys;
27884
27912
  if (Array.isArray(i) && (u = e.data.selectedRowData.map((y) => {
@@ -27900,7 +27928,7 @@ const useCreateActionProps = () => {
27900
27928
  const { service: e } = useBlockRequestContext();
27901
27929
  return {
27902
27930
  onClick() {
27903
- return q(this, null, function* () {
27931
+ return V(this, null, function* () {
27904
27932
  var n;
27905
27933
  (n = e == null ? void 0 : e.refresh) == null || n.call(e);
27906
27934
  });
@@ -27917,7 +27945,7 @@ const useCreateActionProps = () => {
27917
27945
  pageSize: 1,
27918
27946
  showSizeChanger: !1,
27919
27947
  onChange(v) {
27920
- return q(this, null, function* () {
27948
+ return V(this, null, function* () {
27921
27949
  var I, w;
27922
27950
  const F = (w = (I = e.service) == null ? void 0 : I.params) == null ? void 0 : w[0];
27923
27951
  e.service.run(P(x({}, F), { page: v }));
@@ -27945,7 +27973,7 @@ const useCreateActionProps = () => {
27945
27973
  pageSize: 1,
27946
27974
  showSizeChanger: !1,
27947
27975
  onChange(y) {
27948
- return q(this, null, function* () {
27976
+ return V(this, null, function* () {
27949
27977
  var F, I;
27950
27978
  const v = (I = (F = e.service) == null ? void 0 : F.params) == null ? void 0 : I[0];
27951
27979
  e.service.run(P(x({}, v), { page: y }));
@@ -28047,7 +28075,7 @@ const useCreateActionProps = () => {
28047
28075
  var U, H, J, W;
28048
28076
  if (!M.find((K) => K.uid === k.uid))
28049
28077
  return;
28050
- const E = `${$}${t.name}`, V = ((U = k.service.params) == null ? void 0 : U[0]) || {};
28078
+ const E = `${$}${t.name}`, q = ((U = k.service.params) == null ? void 0 : U[0]) || {};
28051
28079
  (J = (H = k.service.params) == null ? void 0 : H[1]) != null && J.filters || _.set(k.service.params, "[1].filters", {});
28052
28080
  const L = k.service.params[1].filters;
28053
28081
  if (R.length)
@@ -28061,7 +28089,7 @@ const useCreateActionProps = () => {
28061
28089
  }
28062
28090
  const G = mergeFilter([...Object.values(L), k.defaultFilter]);
28063
28091
  return k.doFilter(
28064
- P(x({}, V), {
28092
+ P(x({}, q), {
28065
28093
  page: 1,
28066
28094
  filter: G
28067
28095
  }),
@@ -28109,14 +28137,14 @@ const useCreateActionProps = () => {
28109
28137
  };
28110
28138
  };
28111
28139
  function doReset(o) {
28112
- return q(this, arguments, function* ({
28140
+ return V(this, arguments, function* ({
28113
28141
  getDataBlocks: e,
28114
28142
  targets: t,
28115
28143
  uid: n
28116
28144
  }) {
28117
28145
  try {
28118
28146
  yield Promise.all(
28119
- e().map((r) => q(this, null, function* () {
28147
+ e().map((r) => V(this, null, function* () {
28120
28148
  var u, d, p, m;
28121
28149
  if (!t.find((h) => h.uid === r.uid))
28122
28150
  return;
@@ -28255,7 +28283,7 @@ function getTargetField(e) {
28255
28283
  return n.slice(0, o);
28256
28284
  }
28257
28285
  function resetFormCorrectly(e) {
28258
- return q(this, null, function* () {
28286
+ return V(this, null, function* () {
28259
28287
  untracked(() => {
28260
28288
  Object.keys(e.fields).forEach((t) => {
28261
28289
  isSubMode(e.fields[t]) && (e.fields[t].initialValue = null);
@@ -28269,7 +28297,7 @@ function appendQueryStringToUrl(e, t) {
28269
28297
  const useParseURLAndParams = () => {
28270
28298
  const e = useVariables$1(), t = useLocalVariables$1();
28271
28299
  return { parseURLAndParams: useCallback(
28272
- (o, r) => q(void 0, null, function* () {
28300
+ (o, r) => V(void 0, null, function* () {
28273
28301
  const i = yield parseVariablesAndChangeParamsToQueryString({
28274
28302
  searchParams: r,
28275
28303
  variables: e,
@@ -28287,7 +28315,7 @@ function useLinkActionProps(e) {
28287
28315
  return {
28288
28316
  type: l,
28289
28317
  onClick() {
28290
- return q(this, null, function* () {
28318
+ return V(this, null, function* () {
28291
28319
  if (!i) {
28292
28320
  message.warning(r("Please configure the URL"));
28293
28321
  return;
@@ -28299,7 +28327,7 @@ function useLinkActionProps(e) {
28299
28327
  };
28300
28328
  }
28301
28329
  function replaceVariableValue(e, t, n) {
28302
- return q(this, null, function* () {
28330
+ return V(this, null, function* () {
28303
28331
  if (!e)
28304
28332
  return;
28305
28333
  const { evaluate: o } = evaluators.get("string"), { exp: r, scope: i } = yield replaceVariables(e, {
@@ -28314,14 +28342,14 @@ function replaceVariableValue(e, t, n) {
28314
28342
  });
28315
28343
  }
28316
28344
  function parseVariablesAndChangeParamsToQueryString(r) {
28317
- return q(this, arguments, function* ({
28345
+ return V(this, arguments, function* ({
28318
28346
  searchParams: e,
28319
28347
  variables: t,
28320
28348
  localVariables: n,
28321
28349
  replaceVariableValue: o
28322
28350
  }) {
28323
28351
  const i = yield Promise.all(
28324
- e.map((u) => q(this, [u], function* ({ name: l, value: c }) {
28352
+ e.map((u) => V(this, [u], function* ({ name: l, value: c }) {
28325
28353
  if (typeof c == "string") {
28326
28354
  if (isVariable$1(c)) {
28327
28355
  const { value: p } = (yield t.parseVariable(c, n)) || {};
@@ -28449,7 +28477,7 @@ const useSyncFromForm = (e, t, n) => {
28449
28477
  }, []);
28450
28478
  return {
28451
28479
  run() {
28452
- return q(this, null, function* () {
28480
+ return V(this, null, function* () {
28453
28481
  var y;
28454
28482
  const f = /* @__PURE__ */ new Set([]), C = /* @__PURE__ */ new Set([]), b = (v, F) => {
28455
28483
  var I;
@@ -29563,9 +29591,9 @@ const useParseDefaultValue = () => {
29563
29591
  var F, I;
29564
29592
  if (g === "update" && t.default && e.form === f && ((I = e.setValue) == null || I.call(e, (F = r == null ? void 0 : r.data) == null ? void 0 : F[t.name])), t.default == null || a || l || isSubMode(t) || !(r != null && r.isNew) && !i)
29565
29593
  return;
29566
- const y = (...T) => q(void 0, [...T], function* ({ forceUpdate: w = !1 } = {}) {
29594
+ const y = (...T) => V(void 0, [...T], function* ({ forceUpdate: w = !1 } = {}) {
29567
29595
  if (n && e && (isVariable$1(t.default) && e.value == null || e.value === t.default || w)) {
29568
- isVariable$1(e.value) && (yield e.reset({ forceClear: !0 })), e.loading = !0;
29596
+ e.loading = !0;
29569
29597
  const D = !t.name.toString().includes(".") && (d == null ? void 0 : d.getField(t.name)), {
29570
29598
  value: O,
29571
29599
  collectionName: j,
@@ -29622,13 +29650,15 @@ const formItemWrapCss = css`
29622
29650
  .ant-description-textarea img {
29623
29651
  max-width: 100%;
29624
29652
  }
29625
- &.ant-formily-item-layout-vertical .ant-formily-item-label {
29626
- display: inline;
29627
- .ant-formily-item-label-tooltip-icon {
29628
- display: inline;
29629
- }
29630
- .ant-formily-item-label-content {
29653
+ &.ant-formily-item-layout-horizontal.ant-formily-item-label-wrap {
29654
+ .ant-formily-item-label {
29631
29655
  display: inline;
29656
+ padding-right: 5px;
29657
+
29658
+ .ant-formily-item-label-tooltip-icon,
29659
+ .ant-formily-item-label-content {
29660
+ display: inline;
29661
+ }
29632
29662
  }
29633
29663
  }
29634
29664
  `, formItemLabelCss = css`
@@ -29699,11 +29729,11 @@ function SchemaSettingsTemplate(e) {
29699
29729
  SchemaSettingsItem,
29700
29730
  {
29701
29731
  title: "Convert reference to duplicate",
29702
- onClick: () => q(this, null, function* () {
29732
+ onClick: () => V(this, null, function* () {
29703
29733
  const S = yield C(d), y = g.removeWithoutEmit();
29704
29734
  g.insertAfterEnd(S, {
29705
29735
  onSuccess() {
29706
- return q(this, null, function* () {
29736
+ return V(this, null, function* () {
29707
29737
  yield h.request({
29708
29738
  url: `/uiSchemas:remove/${y["x-uid"]}`
29709
29739
  });
@@ -29717,7 +29747,7 @@ function SchemaSettingsTemplate(e) {
29717
29747
  SchemaSettingsItem,
29718
29748
  {
29719
29749
  title: "Save as template",
29720
- onClick: () => q(this, null, function* () {
29750
+ onClick: () => V(this, null, function* () {
29721
29751
  u(!1);
29722
29752
  const S = n && l(n), y = yield FormDialog(
29723
29753
  a("Save as template"),
@@ -30078,7 +30108,7 @@ function AccessControl() {
30078
30108
  roles: l == null ? void 0 : l.data
30079
30109
  },
30080
30110
  beforeOpen: () => !l && a(),
30081
- onSubmit: (p) => q(this, [p], function* ({ roles: d }) {
30111
+ onSubmit: (p) => V(this, [p], function* ({ roles: d }) {
30082
30112
  return yield o.set({ values: d.map((m) => m.name) }), yield c(), r.success(e("Saved successfully"));
30083
30113
  })
30084
30114
  }
@@ -30096,7 +30126,7 @@ const SchemaSettingAccessControl = {
30096
30126
  [t, n]
30097
30127
  );
30098
30128
  return { parseFilter: useCallback(
30099
- (i) => q(void 0, null, function* () {
30129
+ (i) => V(void 0, null, function* () {
30100
30130
  const a = flatten(i, {
30101
30131
  breakOn({ key: c }) {
30102
30132
  return c.startsWith("$") && c !== "$and" && c !== "$or";
@@ -30106,7 +30136,7 @@ const SchemaSettingAccessControl = {
30106
30136
  }
30107
30137
  });
30108
30138
  return yield Promise.all(
30109
- Object.keys(a).map((c) => q(void 0, null, function* () {
30139
+ Object.keys(a).map((c) => V(void 0, null, function* () {
30110
30140
  return a[c] = yield a[c], a[c] === void 0 && delete a[c], a[c];
30111
30141
  }))
30112
30142
  ), unflatten$1(a);
@@ -30555,7 +30585,7 @@ const createSubmitActionSettings = new SchemaSettings({
30555
30585
  "x-validator": validateJSON$1
30556
30586
  }
30557
30587
  }
30558
- }, linkageAction = (a, l) => q(void 0, [a, l], function* ({
30588
+ }, linkageAction = (a, l) => V(void 0, [a, l], function* ({
30559
30589
  operator: e,
30560
30590
  field: t,
30561
30591
  condition: n,
@@ -33674,7 +33704,7 @@ const tableBlockSettings = new SchemaSettings({
33674
33704
  return {
33675
33705
  title: r("Enable drag and drop sorting"),
33676
33706
  checked: t.decoratorProps.dragSort,
33677
- onChange: (u) => q(void 0, null, function* () {
33707
+ onChange: (u) => V(void 0, null, function* () {
33678
33708
  var d, p, m;
33679
33709
  if (u && l) {
33680
33710
  const { data: h } = yield c.resource("collections.fields", l.collectionName).update({
@@ -34819,7 +34849,7 @@ const tableBlockSettings = new SchemaSettings({
34819
34849
  title: i("Ellipsis overflow content"),
34820
34850
  checked: !!((c = a["x-component-props"]) != null && c.ellipsis),
34821
34851
  hidden: l,
34822
- onChange: (u) => q(this, null, function* () {
34852
+ onChange: (u) => V(this, null, function* () {
34823
34853
  e && t ? t.forEach((d) => {
34824
34854
  d.componentProps.ellipsis = u;
34825
34855
  }) : o.componentProps.ellipsis = u, _.set(a, "x-component-props.ellipsis", u), yield r.emit("patch", {
@@ -35193,10 +35223,10 @@ const tableBlockSettings = new SchemaSettings({
35193
35223
  name: "fieldSettings:component:CascadeSelect",
35194
35224
  items: [fieldComponent$6, titleField$1, ellipsisSettingsItem, setTheDataScope]
35195
35225
  }), SchemaSettingsDateRange = function e(t) {
35196
- var w, T, D, O, j, N, B, R, M, $, k, z, E, V, L, G;
35226
+ var w, T, D, O, j, N, B, R, M, $, k, z, E, q, L, G;
35197
35227
  const { fieldSchema: n } = t, o = useField(), { dn: r } = useDesignable(), { t: i } = useTranslation(), { getCollectionJoinField: a } = useCollectionManager_deprecated(), { isInSubForm: l, isInSubTable: c } = useFlag() || {}, u = a(n == null ? void 0 : n["x-collection-field"]) || {}, d = ((w = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : w.showTime) || ((D = (T = u == null ? void 0 : u.uiSchema) == null ? void 0 : T["x-component-props"]) == null ? void 0 : D.showTime) || !1, p = ((O = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : O.dateFormat) || ((N = (j = u == null ? void 0 : u.uiSchema) == null ? void 0 : j["x-component-props"]) == null ? void 0 : N.dateFormat) || "YYYY-MM-DD", m = ((B = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : B.timeFormat) || ((M = (R = u == null ? void 0 : u.uiSchema) == null ? void 0 : R["x-component-props"]) == null ? void 0 : M.timeFormat) || "HH:mm:ss", h = (($ = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : $.picker) || ((z = (k = u == null ? void 0 : u.uiSchema) == null ? void 0 : k["x-component-props"]) == null ? void 0 : z.picker) || "date";
35198
35228
  n["x-read-pretty"] || o.readOnly || o.readPretty;
35199
- const g = (E = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : E._minDate, f = (V = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : V._maxDate, C = ((L = u == null ? void 0 : u.uiSchema) == null ? void 0 : L["x-component-props"].gmt) || !1, b = ((G = u == null ? void 0 : u.uiSchema) == null ? void 0 : G["x-component-props"].utc) || !1, S = useRecord(), { form: y } = useFormBlockContext(), v = useCallback(
35229
+ const g = (E = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : E._minDate, f = (q = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : q._maxDate, C = ((L = u == null ? void 0 : u.uiSchema) == null ? void 0 : L["x-component-props"].gmt) || !1, b = ((G = u == null ? void 0 : u.uiSchema) == null ? void 0 : G["x-component-props"].utc) || !1, S = useRecord(), { form: y } = useFormBlockContext(), v = useCallback(
35200
35230
  (U) => /* @__PURE__ */ jsx(
35201
35231
  SchemaComponent,
35202
35232
  {
@@ -36556,7 +36586,7 @@ const dividerSettings = new SchemaSettings({
36556
36586
  });
36557
36587
  class SchemaSettingsPlugin extends Plugin {
36558
36588
  load() {
36559
- return q(this, null, function* () {
36589
+ return V(this, null, function* () {
36560
36590
  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(associateActionSettings), 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(filterSelectComponentFieldSettings), this.schemaSettingsManager.add(recordPickerComponentFieldSettings), this.schemaSettingsManager.add(subformComponentFieldSettings), this.schemaSettingsManager.add(subformPopoverComponentFieldSettings), this.schemaSettingsManager.add(subTablePopoverComponentFieldSettings), this.schemaSettingsManager.add(datePickerComponentFieldSettings), this.schemaSettingsManager.add(rangePickerPickerComponentFieldSettings), this.schemaSettingsManager.add(unixTimestampComponentFieldSettings), this.schemaSettingsManager.add(inputNumberComponentFieldSettings), this.schemaSettingsManager.add(inputComponentSettings), this.schemaSettingsManager.add(inputURLSettings), this.schemaSettingsManager.add(inputTextAreaSettings), this.schemaSettingsManager.add(inputJSONSettings), this.schemaSettingsManager.add(markdownSettings), this.schemaSettingsManager.add(markdownVditorSettings), this.schemaSettingsManager.add(richTextSettings), this.schemaSettingsManager.add(fileManagerComponentFieldSettings), this.schemaSettingsManager.add(tagComponentFieldSettings), this.schemaSettingsManager.add(cascadeSelectComponentFieldSettings), this.schemaSettingsManager.add(inputPreviewComponentFieldSettings), this.schemaSettingsManager.add(uploadAttachmentComponentFieldSettings), this.schemaSettingsManager.add(previewComponentFieldSettings), this.schemaSettingsManager.add(dividerSettings), this.schemaSettingsManager.add(timePickerComponentFieldSettings);
36561
36591
  });
36562
36592
  }
@@ -36648,7 +36678,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
36648
36678
  const n = useRef({}), o = useAPIClient(), { getCollectionJoinField: r, getCollection: i } = useCollectionManager_deprecated(), a = useCompile(), { builtinVariables: l } = useBuiltInVariables(), c = useCallback((C) => {
36649
36679
  _.isFunction(C) ? n.current = C(n.current) : n.current = C;
36650
36680
  }, []), u = useCallback(
36651
- (C, b, S) => q(void 0, null, function* () {
36681
+ (C, b, S) => V(void 0, null, function* () {
36652
36682
  var R, M;
36653
36683
  const y = C.split("."), v = y[0], F = mergeVariableToCollectionNameWithLocalVariables(variablesStore, b);
36654
36684
  let I = mergeCtxWithLocalVariables(n.current, b);
@@ -36664,11 +36694,11 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
36664
36694
  dataSource: T,
36665
36695
  collectionName: N
36666
36696
  };
36667
- const k = y[$], z = y.slice(0, $ + 1).join("."), { fieldPath: E } = getFieldPath$1(z, F), V = r(E, T), L = (M = i(O, T)) == null ? void 0 : M.getPrimaryKey();
36697
+ const k = y[$], z = y.slice(0, $ + 1).join("."), { fieldPath: E } = getFieldPath$1(z, F), q = r(E, T), L = (M = i(O, T)) == null ? void 0 : M.getPrimaryKey();
36668
36698
  if (Array.isArray(I)) {
36669
36699
  const G = I.map((U) => {
36670
- if (!(S != null && S.doNotRequest) && shouldToRequest(U == null ? void 0 : U[k]) && (U == null ? void 0 : U[L]) != null && V != null && V.target) {
36671
- const H = `/${O}/${U[V.sourceKey || L]}/${k}:${getAction(V.type)}`;
36700
+ if (!(S != null && S.doNotRequest) && shouldToRequest(U == null ? void 0 : U[k]) && (U == null ? void 0 : U[L]) != null && q != null && q.target) {
36701
+ const H = `/${O}/${U[q.sourceKey || L]}/${k}:${getAction(q.type)}`;
36672
36702
  if (hasRequested(H))
36673
36703
  return getRequested(H);
36674
36704
  const J = o.request({
@@ -36682,9 +36712,9 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
36682
36712
  }
36683
36713
  return U == null ? void 0 : U[k];
36684
36714
  });
36685
- I = removeThroughCollectionFields(_.flatten(yield Promise.all(G)), V);
36686
- } else if (!(S != null && S.doNotRequest) && shouldToRequest(I[k]) && I[L] != null && (V != null && V.target)) {
36687
- const G = `/${O}/${I[V.sourceKey || L]}/${k}:${getAction(V.type)}`;
36715
+ I = removeThroughCollectionFields(_.flatten(yield Promise.all(G)), q);
36716
+ } else if (!(S != null && S.doNotRequest) && shouldToRequest(I[k]) && I[L] != null && (q != null && q.target)) {
36717
+ const G = `/${O}/${I[q.sourceKey || L]}/${k}:${getAction(q.type)}`;
36688
36718
  let U = null;
36689
36719
  if (hasRequested(G))
36690
36720
  U = yield getRequested(G);
@@ -36699,10 +36729,10 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
36699
36729
  stashRequested(G, J), U = yield J, clearRequested(G);
36700
36730
  }
36701
36731
  const H = U.data.data;
36702
- I = removeThroughCollectionFields(H, V);
36732
+ I = removeThroughCollectionFields(H, q);
36703
36733
  } else
36704
- I = removeThroughCollectionFields(getValuesByPath(I, k), V);
36705
- V != null && V.target && (O = V.target);
36734
+ I = removeThroughCollectionFields(getValuesByPath(I, k), q);
36735
+ q != null && q.target && (O = q.target);
36706
36736
  }
36707
36737
  const B = a(
36708
36738
  _.isFunction(I) ? I({ fieldOperator: S == null ? void 0 : S.fieldOperator, isParsingVariable: !0 }) : I
@@ -36740,7 +36770,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
36740
36770
  * @param localVariables Local variables, will be cleared after parsing
36741
36771
  * @returns
36742
36772
  */
36743
- (C, b, S) => q(void 0, null, function* () {
36773
+ (C, b, S) => V(void 0, null, function* () {
36744
36774
  if (!isVariable$1(C))
36745
36775
  return C;
36746
36776
  b && (b = _.isArray(b) ? b : [b]);
@@ -36751,7 +36781,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
36751
36781
  }),
36752
36782
  [u]
36753
36783
  ), g = useCallback(
36754
- (C, b) => q(void 0, null, function* () {
36784
+ (C, b) => V(void 0, null, function* () {
36755
36785
  var w;
36756
36786
  if (!isVariable$1(C))
36757
36787
  throw new Error(`VariablesProvider: ${C} is not a variable string`);
@@ -37110,7 +37140,7 @@ const ActionLink = withDynamicSchemaProps(
37110
37140
  };
37111
37141
  }, useA = () => ({
37112
37142
  run() {
37113
- return q(this, null, function* () {
37143
+ return V(this, null, function* () {
37114
37144
  });
37115
37145
  }
37116
37146
  }), handleError = console.log, Action = withDynamicSchemaProps(
@@ -37155,7 +37185,7 @@ const ActionLink = withDynamicSchemaProps(
37155
37185
  "onMouseEnter",
37156
37186
  "refreshDataBlockRequest",
37157
37187
  "confirmTitle"
37158
- ]), v = useDesigner(), F = useField(), I = useFieldSchema(), w = useCompile(), T = useCollectionRecordData(), D = w((U = I["x-component-props"]) == null ? void 0 : U.confirm) || g, O = useMemo(() => (I == null ? void 0 : I["x-linkage-rules"]) || [], [I == null ? void 0 : I["x-linkage-rules"]]), { designable: j } = useDesignable(), N = useComponent(o) || o, B = useVariables$1(), R = useLocalVariables$1({ currentForm: { values: T, readPretty: !1 } }), { visibleWithURL: M, setVisibleWithURL: $ } = usePopupUtils(), { setSubmitted: k } = useActionContext(), { getAriaLabel: z } = useGetAriaLabelOfAction(l), E = useCollectionParentRecordData(), V = useApp();
37188
+ ]), v = useDesigner(), F = useField(), I = useFieldSchema(), w = useCompile(), T = useCollectionRecordData(), D = w((U = I["x-component-props"]) == null ? void 0 : U.confirm) || g, O = useMemo(() => (I == null ? void 0 : I["x-linkage-rules"]) || [], [I == null ? void 0 : I["x-linkage-rules"]]), { designable: j } = useDesignable(), N = useComponent(o) || o, B = useVariables$1(), R = useLocalVariables$1({ currentForm: { values: T, readPretty: !1 } }), { visibleWithURL: M, setVisibleWithURL: $ } = usePopupUtils(), { setSubmitted: k } = useActionContext(), { getAriaLabel: z } = useGetAriaLabelOfAction(l), E = useCollectionParentRecordData(), q = useApp();
37159
37189
  useEffect(() => {
37160
37190
  F.stateOfLinkageRules && setInitialActionState(F), F.stateOfLinkageRules = {}, O.filter((H) => !H.disabled).forEach((H) => {
37161
37191
  var J;
@@ -37168,7 +37198,7 @@ const ActionLink = withDynamicSchemaProps(
37168
37198
  variables: B,
37169
37199
  localVariables: R
37170
37200
  },
37171
- V.jsonLogic
37201
+ q.jsonLogic
37172
37202
  );
37173
37203
  });
37174
37204
  });
@@ -37271,7 +37301,7 @@ const ActionLink = withDynamicSchemaProps(
37271
37301
  "setSubmitted",
37272
37302
  "getAriaLabel",
37273
37303
  "parentRecordData"
37274
- ]), [R, M] = useState(!1), { wrapSSR: $, componentCls: k, hashId: z } = useStyles$8(), [E, V] = useState(!1), L = o["x-toolbar-props"] || o["x-designer-props"], G = (me = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : me.openMode, U = (he = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : he.openSize, H = (ge = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : ge.refreshDataBlockRequest, { modal: J } = App.useApp(), W = useForm(), K = useACLActionParamsContext(), { run: X, element: ee, disabled: Z } = (I == null ? void 0 : I(w)) || {}, ne = W.disabled || i.disabled || ((de = i.data) == null ? void 0 : de.disabled) || F || Z, re = useMemo(() => {
37304
+ ]), [R, M] = useState(!1), { wrapSSR: $, componentCls: k, hashId: z } = useStyles$8(), [E, q] = useState(!1), L = o["x-toolbar-props"] || o["x-designer-props"], G = (me = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : me.openMode, U = (he = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : he.openSize, H = (ge = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : ge.refreshDataBlockRequest, { modal: J } = App.useApp(), W = useForm(), K = useACLActionParamsContext(), { run: X, element: ee, disabled: Z } = (I == null ? void 0 : I(w)) || {}, ne = W.disabled || i.disabled || ((de = i.data) == null ? void 0 : de.disabled) || F || Z, re = useMemo(() => {
37275
37305
  var ce;
37276
37306
  return P(x({}, v), {
37277
37307
  opacity: r && (((ce = i == null ? void 0 : i.data) == null ? void 0 : ce.hidden) || !K) && 0.1,
@@ -37318,7 +37348,7 @@ const ActionLink = withDynamicSchemaProps(
37318
37348
  visible: R || T,
37319
37349
  setVisible: le,
37320
37350
  formValueChanged: E,
37321
- setFormValueChanged: V,
37351
+ setFormValueChanged: q,
37322
37352
  openMode: G,
37323
37353
  openSize: U,
37324
37354
  containerRefKey: n,
@@ -37411,8 +37441,8 @@ const RenderButton = ({
37411
37441
  if (!(z && isPortalInBody(k.target)) && (k.preventDefault(), k.stopPropagation(), !i && n)) {
37412
37442
  const E = () => {
37413
37443
  b ? b(k, () => {
37414
- var V, L;
37415
- S !== !1 && (T == null || T(!0), (L = (V = j()) == null ? void 0 : V.refresh) == null || L.call(V));
37444
+ var q, L;
37445
+ S !== !1 && (T == null || T(!0), (L = (q = j()) == null ? void 0 : q.refresh) == null || L.call(q));
37416
37446
  }) : isBulkEditAction(y) || !B() ? (v(!0), F == null || F()) : ["view", "update", "create", "customize:popup"].includes(y["x-action"]) && y["x-uid"] ? M.current() : (v(!0), F == null || F());
37417
37447
  };
37418
37448
  (I == null ? void 0 : I.enable) !== !1 && (I != null && I.content) ? w.confirm({
@@ -37622,7 +37652,7 @@ const ActionBarContext = React.createContext({
37622
37652
  [r, n, i]
37623
37653
  ) };
37624
37654
  }, requestChartData = (e) => function() {
37625
- return q(this, null, function* () {
37655
+ return V(this, null, function* () {
37626
37656
  var t;
37627
37657
  try {
37628
37658
  const n = yield this.api.request(e);
@@ -37652,7 +37682,7 @@ const Form$1 = observer$1(
37652
37682
  {
37653
37683
  uid: a["x-uid"],
37654
37684
  onSuccess(h) {
37655
- return q(this, null, function* () {
37685
+ return V(this, null, function* () {
37656
37686
  yield c.reset(), c.setValues(h == null ? void 0 : h.data), c.setInitialValues(h == null ? void 0 : h.data);
37657
37687
  });
37658
37688
  }
@@ -37934,7 +37964,7 @@ Select.ReadPretty = ReadPretty$b;
37934
37964
  const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typeof n == "object" ? n[t.value] : n), ReadPretty$a = observer$1(
37935
37965
  (e) => {
37936
37966
  const t = x(x({}, defaultFieldNames$1), e.fieldNames), n = useField(), o = useFieldSchema(), r = useRecord(), { snapshot: i } = useActionContext(), { data: a } = useRequest(
37937
- i ? () => q(void 0, null, function* () {
37967
+ i ? () => V(void 0, null, function* () {
37938
37968
  return {
37939
37969
  data: r[o.name]
37940
37970
  };
@@ -38060,7 +38090,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
38060
38090
  useEffect(() => {
38061
38091
  S.current && $();
38062
38092
  }, [z]);
38063
- const V = (W) => q(void 0, null, function* () {
38093
+ const q = (W) => V(void 0, null, function* () {
38064
38094
  var K;
38065
38095
  $({
38066
38096
  filter: mergeFilter([
@@ -38088,7 +38118,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
38088
38118
  filterOption: !1,
38089
38119
  filterSort: null,
38090
38120
  fieldNames: t,
38091
- onSearch: V,
38121
+ onSearch: q,
38092
38122
  onDropdownVisibleChange: (W) => {
38093
38123
  I.current = null, W && $(), S.current = !0;
38094
38124
  },
@@ -38171,9 +38201,9 @@ const useFormDataTemplates = () => {
38171
38201
  alignItems: "center",
38172
38202
  backgroundColor: n.colorFillAlter,
38173
38203
  padding: n.padding
38174
- }, e), [e, n.colorFillAlter]), S = useMemo(() => ({ fontSize: n.fontSize, fontWeight: "bold", whiteSpace: "nowrap", marginRight: n.marginXS }), [n.fontSize, n.marginXS]), y = useCallback((I) => q(void 0, null, function* () {
38204
+ }, e), [e, n.colorFillAlter]), S = useMemo(() => ({ fontSize: n.fontSize, fontWeight: "bold", whiteSpace: "nowrap", marginRight: n.marginXS }), [n.fontSize, n.marginXS]), y = useCallback((I) => V(void 0, null, function* () {
38175
38205
  d(I), m(null), t == null || t.reset();
38176
- }), []), v = useCallback((I, w, T) => q(void 0, null, function* () {
38206
+ }), []), v = useCallback((I, w, T) => V(void 0, null, function* () {
38177
38207
  const D = P(x({}, w), { dataId: I });
38178
38208
  m(w), fetchTemplateData(h, D, T).then((O) => (t && O && (t.reset(), t.__template = !0, forEach(O, (j, N) => {
38179
38209
  var B;
@@ -38228,7 +38258,7 @@ function findDataTemplates(e) {
38228
38258
  return t ? _.cloneDeep(t["x-data-templates"]) || {} : {};
38229
38259
  }
38230
38260
  function fetchTemplateData(e, t, n) {
38231
- return q(this, null, function* () {
38261
+ return V(this, null, function* () {
38232
38262
  if (!(t.fields.length === 0 || !t.dataId))
38233
38263
  return e.resource(t.collection, void 0, n).get({
38234
38264
  filterByTk: t.dataId,
@@ -38709,7 +38739,7 @@ const useSystemSettings = () => useContext(SystemSettingsContext), SystemSetting
38709
38739
  const { setVisible: e } = useActionContext();
38710
38740
  return {
38711
38741
  run() {
38712
- return q(this, null, function* () {
38742
+ return V(this, null, function* () {
38713
38743
  e(!1);
38714
38744
  });
38715
38745
  }
@@ -38723,7 +38753,7 @@ const useSystemSettings = () => useContext(SystemSettingsContext), SystemSetting
38723
38753
  const { setVisible: e } = useActionContext(), t = useForm(), { mutate: n, data: o } = useSystemSettings() || {}, r = useAPIClient(), { t: i } = useTranslation();
38724
38754
  return {
38725
38755
  run() {
38726
- return q(this, null, function* () {
38756
+ return V(this, null, function* () {
38727
38757
  var u;
38728
38758
  yield t.submit();
38729
38759
  const l = cloneDeep(t.values);
@@ -38844,7 +38874,7 @@ const useSystemSettings = () => useContext(SystemSettingsContext), SystemSetting
38844
38874
  ) });
38845
38875
  class SystemSettingsPlugin extends Plugin {
38846
38876
  load() {
38847
- return q(this, null, function* () {
38877
+ return V(this, null, function* () {
38848
38878
  this.app.use(SystemSettingsProvider, this.options);
38849
38879
  });
38850
38880
  }
@@ -38880,7 +38910,7 @@ const RemoteDocumentTitleProvider = (e) => {
38880
38910
  };
38881
38911
  class RemoteDocumentTitlePlugin extends Plugin {
38882
38912
  load() {
38883
- return q(this, null, function* () {
38913
+ return V(this, null, function* () {
38884
38914
  this.app.use(RemoteDocumentTitleProvider, this.options);
38885
38915
  });
38886
38916
  }
@@ -39078,7 +39108,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
39078
39108
  PinnedPluginList.displayName = "PinnedPluginList";
39079
39109
  class PinnedListPlugin extends Plugin {
39080
39110
  load() {
39081
- return q(this, null, function* () {
39111
+ return V(this, null, function* () {
39082
39112
  this.app.use(PinnedPluginListProvider, this.options.config);
39083
39113
  });
39084
39114
  }
@@ -39318,7 +39348,7 @@ const PluginDetail = ({ plugin: e, onCancel: t }) => {
39318
39348
  const u = useForm();
39319
39349
  return {
39320
39350
  run() {
39321
- return q(this, null, function* () {
39351
+ return V(this, null, function* () {
39322
39352
  yield u.submit(), c.request({
39323
39353
  url: t ? "pm:update" : "pm:add",
39324
39354
  method: "post",
@@ -39424,7 +39454,7 @@ const PluginUploadForm = ({ onClose: e, pluginData: t, isUpgrade: n }) => {
39424
39454
  const l = useAPIClient(), { t: c } = useTranslation(), u = useForm();
39425
39455
  return {
39426
39456
  run() {
39427
- return q(this, null, function* () {
39457
+ return V(this, null, function* () {
39428
39458
  var h, g;
39429
39459
  yield u.submit();
39430
39460
  const p = new FormData();
@@ -39525,7 +39555,7 @@ const PluginUploadForm = ({ onClose: e, pluginData: t, isUpgrade: n }) => {
39525
39555
  const c = useForm();
39526
39556
  return {
39527
39557
  run() {
39528
- return q(this, null, function* () {
39558
+ return V(this, null, function* () {
39529
39559
  const d = c.values.compressedFileUrl;
39530
39560
  if (!d)
39531
39561
  return;
@@ -39725,7 +39755,7 @@ function PluginInfo(e) {
39725
39755
  {
39726
39756
  disabled: u,
39727
39757
  title: S("Are you sure to delete this plugin?"),
39728
- onConfirm: (T) => q(this, null, function* () {
39758
+ onConfirm: (T) => V(this, null, function* () {
39729
39759
  T.stopPropagation(), yield y.request({
39730
39760
  url: "pm:remove",
39731
39761
  params: {
@@ -39782,14 +39812,14 @@ function PluginInfo(e) {
39782
39812
  "aria-label": "enable",
39783
39813
  size: "small",
39784
39814
  disabled: u || h,
39785
- onChange: (T, D) => q(this, null, function* () {
39815
+ onChange: (T, D) => V(this, null, function* () {
39786
39816
  if (D.stopPropagation(), !a && T) {
39787
39817
  v.confirm({
39788
39818
  title: S("Plugin dependency version mismatch"),
39789
39819
  content: S(
39790
39820
  "The current dependency version of the plugin does not match the version of the application and may not work properly. Are you sure you want to continue enabling the plugin?"
39791
39821
  ),
39792
- onOk: () => q(this, null, function* () {
39822
+ onOk: () => V(this, null, function* () {
39793
39823
  yield y.request({
39794
39824
  url: "pm:enable",
39795
39825
  params: {
@@ -39807,7 +39837,7 @@ function PluginInfo(e) {
39807
39837
  }
39808
39838
  }) : v.confirm({
39809
39839
  title: S("Are you sure to disable this plugin?"),
39810
- onOk: () => q(this, null, function* () {
39840
+ onOk: () => V(this, null, function* () {
39811
39841
  yield y.request({
39812
39842
  url: "pm:disable",
39813
39843
  params: {
@@ -39880,7 +39910,7 @@ function BulkEnableButton({ plugins: e = [] }) {
39880
39910
  width: 1e3,
39881
39911
  title: t("Bulk enable"),
39882
39912
  open: i,
39883
- onOk: () => q(this, null, function* () {
39913
+ onOk: () => V(this, null, function* () {
39884
39914
  yield n.request({
39885
39915
  url: "pm:enable",
39886
39916
  params: {
@@ -40295,7 +40325,7 @@ const AdminSettingsLayout = () => {
40295
40325
  };
40296
40326
  class PMPlugin extends Plugin {
40297
40327
  load() {
40298
- return q(this, null, function* () {
40328
+ return V(this, null, function* () {
40299
40329
  this.addComponents(), this.addRoutes(), this.addSettings();
40300
40330
  });
40301
40331
  }
@@ -41186,7 +41216,11 @@ const useStyles$6 = genStyleHook("upload", (e) => {
41186
41216
  }
41187
41217
  }
41188
41218
  };
41189
- }), useUploadStyles = useStyles$6;
41219
+ }), useUploadStyles = useStyles$6, LightBoxGlobalStyle = createGlobalStyle`
41220
+ .ReactModal__Overlay.ReactModal__Overlay--after-open {
41221
+ z-index: 3000 !important; // 避免预览图片时被遮挡
41222
+ }
41223
+ `;
41190
41224
  attachmentFileTypes.add({
41191
41225
  match(e) {
41192
41226
  return matchMimetype(e, "image/*");
@@ -41204,33 +41238,36 @@ attachmentFileTypes.add({
41204
41238
  },
41205
41239
  [e, t]
41206
41240
  );
41207
- return /* @__PURE__ */ jsx(
41208
- LightBox,
41209
- {
41210
- mainSrc: (r = t[e]) == null ? void 0 : r.url,
41211
- nextSrc: (i = t[(e + 1) % t.length]) == null ? void 0 : i.url,
41212
- prevSrc: (a = t[(e + t.length - 1) % t.length]) == null ? void 0 : a.url,
41213
- onCloseRequest: () => n(null),
41214
- onMovePrevRequest: () => n((e + t.length - 1) % t.length),
41215
- onMoveNextRequest: () => n((e + 1) % t.length),
41216
- imageTitle: (l = t[e]) == null ? void 0 : l.title,
41217
- toolbarButtons: [
41218
- /* @__PURE__ */ jsx(
41219
- "button",
41220
- {
41221
- style: { fontSize: 22, background: "none", lineHeight: 1 },
41222
- type: "button",
41223
- "aria-label": "Download",
41224
- title: "Download",
41225
- className: "ril-zoom-in ril__toolbarItemChild ril__builtinButton",
41226
- onClick: o,
41227
- children: /* @__PURE__ */ jsx(DownloadOutlined, {})
41228
- },
41229
- "preview-img"
41230
- )
41231
- ]
41232
- }
41233
- );
41241
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
41242
+ /* @__PURE__ */ jsx(LightBoxGlobalStyle, {}),
41243
+ /* @__PURE__ */ jsx(
41244
+ LightBox,
41245
+ {
41246
+ mainSrc: (r = t[e]) == null ? void 0 : r.url,
41247
+ nextSrc: (i = t[(e + 1) % t.length]) == null ? void 0 : i.url,
41248
+ prevSrc: (a = t[(e + t.length - 1) % t.length]) == null ? void 0 : a.url,
41249
+ onCloseRequest: () => n(null),
41250
+ onMovePrevRequest: () => n((e + t.length - 1) % t.length),
41251
+ onMoveNextRequest: () => n((e + 1) % t.length),
41252
+ imageTitle: (l = t[e]) == null ? void 0 : l.title,
41253
+ toolbarButtons: [
41254
+ /* @__PURE__ */ jsx(
41255
+ "button",
41256
+ {
41257
+ style: { fontSize: 22, background: "none", lineHeight: 1 },
41258
+ type: "button",
41259
+ "aria-label": "Download",
41260
+ title: "Download",
41261
+ className: "ril-zoom-in ril__toolbarItemChild ril__builtinButton",
41262
+ onClick: o,
41263
+ children: /* @__PURE__ */ jsx(DownloadOutlined, {})
41264
+ },
41265
+ "preview-img"
41266
+ )
41267
+ ]
41268
+ }
41269
+ )
41270
+ ] });
41234
41271
  }
41235
41272
  });
41236
41273
  const iframePreviewSupportedTypes = ["application/pdf", "audio/*", "image/*", "video/*", "text/plain"];
@@ -41939,7 +41976,7 @@ const useStyles$5 = genStyleHook("nb-association-filter-item", (e) => {
41939
41976
  J.stopPropagation();
41940
41977
  }, E = (J) => {
41941
41978
  m(J);
41942
- }, V = (H = a.title) != null ? H : (U = i == null ? void 0 : i.uiSchema) == null ? void 0 : U.title;
41979
+ }, q = (H = a.title) != null ? H : (U = i == null ? void 0 : i.uiSchema) == null ? void 0 : U.title;
41943
41980
  return t(
41944
41981
  /* @__PURE__ */ jsxs(SortableItem, { className: cls(n, o, "nb-block-item", e.className, "SortableItem"), children: [
41945
41982
  /* @__PURE__ */ jsx(l, {}),
@@ -41956,7 +41993,7 @@ const useStyles$5 = genStyleHook("nb-association-filter-item", (e) => {
41956
41993
  },
41957
41994
  gutter: 5,
41958
41995
  children: [
41959
- /* @__PURE__ */ jsx(Col, { title: c(V), className: "headerCol", children: S ? /* @__PURE__ */ jsx(
41996
+ /* @__PURE__ */ jsx(Col, { title: c(q), className: "headerCol", children: S ? /* @__PURE__ */ jsx(
41960
41997
  Input$3,
41961
41998
  {
41962
41999
  bordered: !1,
@@ -41966,7 +42003,7 @@ const useStyles$5 = genStyleHook("nb-association-filter-item", (e) => {
41966
42003
  onClick: z,
41967
42004
  onChange: E
41968
42005
  }
41969
- ) : c(V) }),
42006
+ ) : c(q) }),
41970
42007
  /* @__PURE__ */ jsx(
41971
42008
  Col,
41972
42009
  {
@@ -42179,7 +42216,7 @@ AssociationFilter.useAssociationField = () => {
42179
42216
  };
42180
42217
  class AssociationFilterPlugin extends Plugin {
42181
42218
  load() {
42182
- return q(this, null, function* () {
42219
+ return V(this, null, function* () {
42183
42220
  this.app.schemaInitializerManager.add(associationFilterFilterBlockInitializer), this.app.schemaInitializerManager.add(filterCollapseItemInitializer_deprecated), this.app.schemaInitializerManager.add(filterCollapseItemInitializer), this.app.schemaInitializerManager.add(associationFilterInitializer);
42184
42221
  });
42185
42222
  }
@@ -42393,15 +42430,15 @@ const DataBlockInitializer = (e) => {
42393
42430
  otherText: S,
42394
42431
  alwaysRenderMenu: y
42395
42432
  } = e, { insert: v, setVisible: F } = useSchemaInitializer(), I = useCompile(), { getTemplateSchemaByMode: w } = useSchemaTemplateManager(), T = useCallback(
42396
- (z) => q(void 0, null, function* () {
42397
- const { item: E, fromOthersInPopup: V } = z;
42433
+ (z) => V(void 0, null, function* () {
42434
+ const { item: E, fromOthersInPopup: q } = z;
42398
42435
  if (f)
42399
42436
  return f(z);
42400
42437
  if (E.template) {
42401
42438
  const L = yield w(E);
42402
- v(t ? t(L, { item: E, fromOthersInPopup: V }) : L);
42439
+ v(t ? t(L, { item: E, fromOthersInPopup: q }) : L);
42403
42440
  } else
42404
- n && n({ item: E, fromOthersInPopup: V });
42441
+ n && n({ item: E, fromOthersInPopup: q });
42405
42442
  F(!1);
42406
42443
  }),
42407
42444
  [w, v, F, n, f, t]
@@ -42535,7 +42572,7 @@ const DataBlockInitializer = (e) => {
42535
42572
  P(x({
42536
42573
  icon: /* @__PURE__ */ jsx(TableOutlined, {})
42537
42574
  }, r), {
42538
- onClick: (h) => q(void 0, [h], function* ({ item: m }) {
42575
+ onClick: (h) => V(void 0, [h], function* ({ item: m }) {
42539
42576
  if (m.template) {
42540
42577
  const g = yield a(m);
42541
42578
  i(g);
@@ -42631,7 +42668,7 @@ const RecordAssociationDetailsBlockInitializer = () => {
42631
42668
  P(x({
42632
42669
  icon: /* @__PURE__ */ jsx(FormOutlined, {})
42633
42670
  }, r), {
42634
- onClick: (h) => q(void 0, [h], function* ({ item: m }) {
42671
+ onClick: (h) => V(void 0, [h], function* ({ item: m }) {
42635
42672
  if (m.template) {
42636
42673
  const g = yield a(m);
42637
42674
  i(g);
@@ -42717,7 +42754,7 @@ const RecordAssociationFormBlockInitializer = () => {
42717
42754
  P(x({
42718
42755
  icon: /* @__PURE__ */ jsx(FormOutlined, {})
42719
42756
  }, r), {
42720
- onClick: (h) => q(void 0, [h], function* ({ item: m }) {
42757
+ onClick: (h) => V(void 0, [h], function* ({ item: m }) {
42721
42758
  if (m.template) {
42722
42759
  const g = yield l(m);
42723
42760
  if (m.template.componentName === "FormItem") {
@@ -42849,7 +42886,7 @@ const createGridCardBlockUISchema = (e) => {
42849
42886
  P(x({
42850
42887
  icon: /* @__PURE__ */ jsx(TableOutlined, {})
42851
42888
  }, r), {
42852
- onClick: (h) => q(void 0, [h], function* ({ item: m }) {
42889
+ onClick: (h) => V(void 0, [h], function* ({ item: m }) {
42853
42890
  if (m.template) {
42854
42891
  const g = yield a(m);
42855
42892
  i(g);
@@ -42954,7 +42991,7 @@ const createListBlockUISchema = (e) => {
42954
42991
  P(x({
42955
42992
  icon: /* @__PURE__ */ jsx(TableOutlined, {})
42956
42993
  }, r), {
42957
- onClick: (h) => q(void 0, [h], function* ({ item: m }) {
42994
+ onClick: (h) => V(void 0, [h], function* ({ item: m }) {
42958
42995
  if (m.template) {
42959
42996
  const g = yield a(m);
42960
42997
  i(g);
@@ -43043,7 +43080,7 @@ const RecordReadPrettyAssociationFormBlockInitializer = () => {
43043
43080
  P(x({
43044
43081
  icon: /* @__PURE__ */ jsx(FormOutlined, {})
43045
43082
  }, r), {
43046
- onClick: (g) => q(void 0, [g], function* ({ item: h }) {
43083
+ onClick: (g) => V(void 0, [g], function* ({ item: h }) {
43047
43084
  if (h.template) {
43048
43085
  const f = yield l(h);
43049
43086
  if (h.template.componentName === "ReadPrettyFormItem") {
@@ -43232,7 +43269,7 @@ function ModalActionSchemaInitializerItem(e) {
43232
43269
  const m = useForm();
43233
43270
  return {
43234
43271
  onClick() {
43235
- return q(this, null, function* () {
43272
+ return V(this, null, function* () {
43236
43273
  var g;
43237
43274
  yield m.submit(), l(!1), (g = e == null ? void 0 : e.onSubmit) == null || g.call(e, m.values);
43238
43275
  });
@@ -43573,7 +43610,7 @@ const items = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
43573
43610
  P(x({}, c), {
43574
43611
  icon: /* @__PURE__ */ jsx(ProfileOutlined, {}),
43575
43612
  componentType: o,
43576
- onCreateBlockSchema: (d) => q(void 0, null, function* () {
43613
+ onCreateBlockSchema: (d) => V(void 0, null, function* () {
43577
43614
  if (r)
43578
43615
  return r(d);
43579
43616
  u(d);
@@ -43823,7 +43860,7 @@ function useCreateSingleDetailsSchema() {
43823
43860
  [n, o, r]
43824
43861
  );
43825
43862
  return { createSingleDetailsSchema: useCallback(
43826
- (c) => q(this, [c], function* ({ item: l }) {
43863
+ (c) => V(this, [c], function* ({ item: l }) {
43827
43864
  if (l.template) {
43828
43865
  const u = yield t(l);
43829
43866
  e(i(u, { item: l }));
@@ -43993,7 +44030,7 @@ const RecordFormBlockInitializer = () => {
43993
44030
  P(x({
43994
44031
  icon: /* @__PURE__ */ jsx(FormOutlined, {})
43995
44032
  }, n), {
43996
- onClick: (p) => q(void 0, [p], function* ({ item: d }) {
44033
+ onClick: (p) => V(void 0, [p], function* ({ item: d }) {
43997
44034
  if (d.template) {
43998
44035
  const m = yield r(d);
43999
44036
  o(c(m, { item: d }));
@@ -44313,7 +44350,7 @@ const commonOptions$h = {
44313
44350
  P(x({}, l), {
44314
44351
  icon: /* @__PURE__ */ jsx(AppstoreOutlined, {}),
44315
44352
  componentType: "GridCard",
44316
- onCreateBlockSchema: (u) => q(void 0, null, function* () {
44353
+ onCreateBlockSchema: (u) => V(void 0, null, function* () {
44317
44354
  if (o)
44318
44355
  return o(u);
44319
44356
  c(u);
@@ -44510,7 +44547,7 @@ const commonOptions$h = {
44510
44547
  P(x({}, l), {
44511
44548
  icon: /* @__PURE__ */ jsx(OrderedListOutlined, {}),
44512
44549
  componentType: "List",
44513
- onCreateBlockSchema: (u) => q(void 0, null, function* () {
44550
+ onCreateBlockSchema: (u) => V(void 0, null, function* () {
44514
44551
  if (o)
44515
44552
  return o(u);
44516
44553
  c(u);
@@ -44665,7 +44702,7 @@ const commonOptions$h = {
44665
44702
  P(x({
44666
44703
  icon: /* @__PURE__ */ jsx(FormOutlined, {})
44667
44704
  }, r), {
44668
- onClick: () => q(void 0, null, function* () {
44705
+ onClick: () => V(void 0, null, function* () {
44669
44706
  i(
44670
44707
  createTableSelectorUISchema({
44671
44708
  rowKey: a.filterTargetKey,
@@ -45014,7 +45051,7 @@ const commonOptions$h = {
45014
45051
  P(x({}, a), {
45015
45052
  icon: /* @__PURE__ */ jsx(TableOutlined, {}),
45016
45053
  componentType: "Table",
45017
- onCreateBlockSchema: (c) => q(void 0, null, function* () {
45054
+ onCreateBlockSchema: (c) => V(void 0, null, function* () {
45018
45055
  if (o)
45019
45056
  return o(c);
45020
45057
  l(c);
@@ -45155,7 +45192,7 @@ const commonOptions$h = {
45155
45192
  onlyCurrentDataSource: t,
45156
45193
  icon: /* @__PURE__ */ jsx(RightSquareOutlined, {}),
45157
45194
  componentType: "FilterCollapse",
45158
- onCreateBlockSchema: (a) => q(void 0, [a], function* ({ item: i }) {
45195
+ onCreateBlockSchema: (a) => V(void 0, [a], function* ({ item: i }) {
45159
45196
  const l = createCollapseBlockSchema({
45160
45197
  dataSource: i.dataSource,
45161
45198
  collectionName: i.collectionName || i.name,
@@ -45612,7 +45649,7 @@ const commonOptions$h = {
45612
45649
  const { selectedRows: h } = useContext(RecordPickerContext), { setVisible: g, setSubmitted: f, setFormValueChanged: C } = useActionContext();
45613
45650
  return {
45614
45651
  onClick(S, y) {
45615
- return q(this, null, function* () {
45652
+ return V(this, null, function* () {
45616
45653
  var v, F;
45617
45654
  yield r.add({
45618
45655
  values: h
@@ -45934,7 +45971,7 @@ const commonOptions$2 = {
45934
45971
  let f = a;
45935
45972
  return d || (f = "page:addBlock", c && (f = "mobile:addBlock")), f || (f = "popup:common:addBlock", o || !u ? f = "popup:addNew:addBlock" : r && (f = "popup:bulkEdit:addBlock")), {
45936
45973
  run() {
45937
- return q(this, null, function* () {
45974
+ return V(this, null, function* () {
45938
45975
  yield h.submit();
45939
45976
  const { title: b, icon: S } = h.values;
45940
45977
  n({
@@ -46007,7 +46044,7 @@ const commonOptions$2 = {
46007
46044
  const h = useActionContext();
46008
46045
  return {
46009
46046
  run() {
46010
- return q(this, null, function* () {
46047
+ return V(this, null, function* () {
46011
46048
  h.setVisible(!1);
46012
46049
  });
46013
46050
  }
@@ -46316,7 +46353,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
46316
46353
  }, Symbol.toStringTag, { value: "Module" }));
46317
46354
  class SchemaInitializerPlugin extends Plugin {
46318
46355
  load() {
46319
- return q(this, null, function* () {
46356
+ return V(this, null, function* () {
46320
46357
  this.app.addComponents(P(x(x({}, initializerComponents), items), {
46321
46358
  DestroyActionInitializer,
46322
46359
  FormBlockInitializer,
@@ -46531,7 +46568,7 @@ class LocalePlugin extends Plugin {
46531
46568
  A(this, "locales", {});
46532
46569
  }
46533
46570
  afterAdd() {
46534
- return q(this, null, function* () {
46571
+ return V(this, null, function* () {
46535
46572
  var r, i, a, l, c, u, d;
46536
46573
  const n = this.app.apiClient, o = n.auth.locale;
46537
46574
  try {
@@ -46715,7 +46752,7 @@ const AppSpin = () => /* @__PURE__ */ jsx(Spin, { style: { position: "fixed", to
46715
46752
  };
46716
46753
  class NocoBaseBuildInPlugin extends Plugin {
46717
46754
  afterAdd() {
46718
- return q(this, null, function* () {
46755
+ return V(this, null, function* () {
46719
46756
  this.app.addComponents({
46720
46757
  AppSpin,
46721
46758
  AppError,
@@ -46726,7 +46763,7 @@ class NocoBaseBuildInPlugin extends Plugin {
46726
46763
  });
46727
46764
  }
46728
46765
  load() {
46729
- return q(this, null, function* () {
46766
+ return V(this, null, function* () {
46730
46767
  this.addComponents(), this.addRoutes(), this.app.use(CurrentUserProvider), this.app.use(CurrentUserSettingsMenuProvider), this.app.pluginSettingsManager.add("security", {
46731
46768
  title: tval$1("Security"),
46732
46769
  icon: "SafetyOutlined"
@@ -46766,7 +46803,7 @@ class NocoBaseBuildInPlugin extends Plugin {
46766
46803
  });
46767
46804
  }
46768
46805
  addPlugins() {
46769
- return q(this, null, function* () {
46806
+ return V(this, null, function* () {
46770
46807
  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, {
46771
46808
  name: "pinned-list",
46772
46809
  config: {
@@ -46862,7 +46899,7 @@ const insertPositionToMethod = {
46862
46899
  }
46863
46900
  }
46864
46901
  },
46865
- onSubmit: (g) => q(void 0, [g], function* ({ title: m, icon: h }) {
46902
+ onSubmit: (g) => V(void 0, [g], function* ({ title: m, icon: h }) {
46866
46903
  var y, v;
46867
46904
  const f = i.__route__, C = (y = i.parent) == null ? void 0 : y.__route__, b = uid(), { data: S } = yield u({
46868
46905
  type: NocoBaseDesktopRouteType.group,
@@ -46904,7 +46941,7 @@ const insertPositionToMethod = {
46904
46941
  }
46905
46942
  }
46906
46943
  },
46907
- onSubmit: (g) => q(void 0, [g], function* ({ title: m, icon: h }) {
46944
+ onSubmit: (g) => V(void 0, [g], function* ({ title: m, icon: h }) {
46908
46945
  var I, w;
46909
46946
  const f = i.__route__, C = (I = i.parent) == null ? void 0 : I.__route__, b = uid(), S = uid(), y = uid(), v = uid(), { data: F } = yield u({
46910
46947
  type: NocoBaseDesktopRouteType.page,
@@ -46957,7 +46994,7 @@ const insertPositionToMethod = {
46957
46994
  params: l
46958
46995
  }
46959
46996
  },
46960
- onSubmit: (C) => q(void 0, [C], function* ({ title: m, icon: h, href: g, params: f }) {
46997
+ onSubmit: (C) => V(void 0, [C], function* ({ title: m, icon: h, href: g, params: f }) {
46961
46998
  var F, I;
46962
46999
  const b = i.__route__, S = (F = i.parent) == null ? void 0 : F.__route__, y = uid(), { data: v } = yield u(
46963
47000
  {
@@ -47101,7 +47138,7 @@ const insertPositionToMethod = {
47101
47138
  }
47102
47139
  }
47103
47140
  }), [h, l]), { moveRoute: I } = useNocoBaseRoutes(), w = useCallback(
47104
- (B) => q(void 0, [B], function* ({ target: j, position: N }) {
47141
+ (B) => V(void 0, [B], function* ({ target: j, position: N }) {
47105
47142
  var E;
47106
47143
  const [R] = ((E = j == null ? void 0 : j.split) == null ? void 0 : E.call(j, "||")) || [];
47107
47144
  if (!R)
@@ -47169,7 +47206,7 @@ const insertPositionToMethod = {
47169
47206
  "After hiding, this menu will no longer appear in the menu bar. To show it again, you need to go to the route management page to configure it."
47170
47207
  ),
47171
47208
  onOk() {
47172
- return q(this, null, function* () {
47209
+ return V(this, null, function* () {
47173
47210
  var B;
47174
47211
  o["x-component-props"].hidden = !!j, n.componentProps.hidden = !!j, (B = o.__route__) != null && B.id && (yield e(o.__route__.id, {
47175
47212
  hideInMenu: !!j
@@ -47355,7 +47392,7 @@ const insertPositionToMethod = {
47355
47392
  ParentRouteContext.displayName = "ParentRouteContext";
47356
47393
  const useParentRoute = () => useContext(ParentRouteContext), useNocoBaseRoutes = (e = "desktopRoutes") => {
47357
47394
  const t = useAPIClient(), n = useMemo(() => t.resource(e), [t, e]), { refresh: o } = useAllAccessDesktopRoutes(), r = useCallback(
47358
- (c, u = !0) => q(void 0, null, function* () {
47395
+ (c, u = !0) => V(void 0, null, function* () {
47359
47396
  const d = yield n.create({
47360
47397
  values: c
47361
47398
  });
@@ -47363,7 +47400,7 @@ const useParentRoute = () => useContext(ParentRouteContext), useNocoBaseRoutes =
47363
47400
  }),
47364
47401
  [n, o]
47365
47402
  ), i = useCallback(
47366
- (c, u, d = !0) => q(void 0, null, function* () {
47403
+ (c, u, d = !0) => V(void 0, null, function* () {
47367
47404
  const p = yield n.update({
47368
47405
  filterByTk: c,
47369
47406
  values: u
@@ -47372,7 +47409,7 @@ const useParentRoute = () => useContext(ParentRouteContext), useNocoBaseRoutes =
47372
47409
  }),
47373
47410
  [n, o]
47374
47411
  ), a = useCallback(
47375
- (c, u = !0) => q(void 0, null, function* () {
47412
+ (c, u = !0) => V(void 0, null, function* () {
47376
47413
  const d = yield n.destroy({
47377
47414
  filterByTk: c
47378
47415
  });
@@ -47380,7 +47417,7 @@ const useParentRoute = () => useContext(ParentRouteContext), useNocoBaseRoutes =
47380
47417
  }),
47381
47418
  [o, n]
47382
47419
  ), l = useCallback(
47383
- (f) => q(void 0, [f], function* ({
47420
+ (f) => V(void 0, [f], function* ({
47384
47421
  sourceId: c,
47385
47422
  targetId: u,
47386
47423
  targetScope: d,
@@ -47692,7 +47729,7 @@ const MenuURLButton = ({ href: e, params: t, icon: n }) => {
47692
47729
  var u;
47693
47730
  const o = useField(), r = useFieldSchema(), { t: i } = useMenuTranslation(), a = useContext(MenuItemDesignerContext), { parseURLAndParams: l } = useParseURLAndParams(), c = useRef(e);
47694
47731
  return useEffect(() => {
47695
- q(void 0, null, function* () {
47732
+ V(void 0, null, function* () {
47696
47733
  try {
47697
47734
  c.current = yield l(e, t || []);
47698
47735
  } catch (p) {
@@ -47995,7 +48032,7 @@ const className1 = css`
47995
48032
  icon: /* @__PURE__ */ jsx(PlusOutlined, {}),
47996
48033
  className: "addTabBtn",
47997
48034
  type: "dashed",
47998
- onClick: () => q(void 0, null, function* () {
48035
+ onClick: () => V(void 0, null, function* () {
47999
48036
  const F = yield FormDialog(
48000
48037
  o("Add tab"),
48001
48038
  () => /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: p.scope, components: x({}, p.components), children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(
@@ -48237,7 +48274,7 @@ const pageSettings = new SchemaSettings({
48237
48274
  title: t("Enable page tabs"),
48238
48275
  checked: o.enableTabs,
48239
48276
  onChange(a) {
48240
- return q(this, null, function* () {
48277
+ return V(this, null, function* () {
48241
48278
  yield r(o.id, {
48242
48279
  enableTabs: a
48243
48280
  }), n["x-component-props"] = n["x-component-props"] || {}, n["x-component-props"].enablePageTabs = a, e.emit("patch", {
@@ -48307,7 +48344,7 @@ const pageSettings = new SchemaSettings({
48307
48344
  "After hiding, this tab will no longer appear in the tab bar. To show it again, you need to go to the route management page to set it."
48308
48345
  ),
48309
48346
  onOk() {
48310
- return q(this, null, function* () {
48347
+ return V(this, null, function* () {
48311
48348
  yield t(n.id, {
48312
48349
  hideInMenu: !!o
48313
48350
  });
@@ -48336,7 +48373,7 @@ const pageSettings = new SchemaSettings({
48336
48373
  content: n("Are you sure you want to delete it?")
48337
48374
  }, confirm), {
48338
48375
  onOk() {
48339
- return q(this, null, function* () {
48376
+ return V(this, null, function* () {
48340
48377
  yield o(r.id), t.emit("remove", {
48341
48378
  removed: {
48342
48379
  "x-uid": r.schemaUid
@@ -48364,7 +48401,7 @@ const pageSettings = new SchemaSettings({
48364
48401
  };
48365
48402
  class AntdSchemaComponentPlugin extends Plugin {
48366
48403
  load() {
48367
- return q(this, null, function* () {
48404
+ return V(this, null, function* () {
48368
48405
  this.addComponents(), this.addScopes(), this.addSchemaSettings();
48369
48406
  });
48370
48407
  }
@@ -48435,7 +48472,7 @@ const AppendsTreeSelect = (e) => {
48435
48472
  const R = S.getCollection(N);
48436
48473
  return R ? R.getAllFields(B) : [];
48437
48474
  }, v = Object.values(m), F = useMemo(() => e.multiple ? (n || []).map((N) => m[N]).filter(Boolean) : n, [n, e.multiple, m]), I = useCallback(
48438
- (N) => q(void 0, null, function* () {
48475
+ (N) => V(void 0, null, function* () {
48439
48476
  if (c != null)
48440
48477
  return c(N);
48441
48478
  if (!N.isLeaf && N.loadChildren) {
@@ -48470,7 +48507,7 @@ const AppendsTreeSelect = (e) => {
48470
48507
  }
48471
48508
  if (!$.isLeaf && $.loadChildren) {
48472
48509
  const E = $.loadChildren($);
48473
- E != null && E.length && (B.push(...E), $ = E.find((V) => V.value === M.slice(0, k + 1).join(".")));
48510
+ E != null && E.length && (B.push(...E), $ = E.find((q) => q.value === M.slice(0, k + 1).join(".")));
48474
48511
  }
48475
48512
  }
48476
48513
  }), h((R) => B.reduce((M, $) => Object.assign(M, { [$.value]: $ }), x({}, R)));
@@ -48560,15 +48597,15 @@ const InternalAssociationSelect$1 = observer$1(
48560
48597
  const j = uid();
48561
48598
  return f.addEffects(j, () => {
48562
48599
  onFieldInputValueChange("*", (N) => {
48563
- var $, k, z, E, V, L;
48600
+ var $, k, z, E, q, L;
48564
48601
  const B = filterAnalyses((z = (k = ($ = r.componentProps) == null ? void 0 : $.service) == null ? void 0 : k.params) == null ? void 0 : z.filter) || [], R = getFieldPath(N.address.entire), M = getFieldPath(r.address.entire);
48565
- B.includes((E = N == null ? void 0 : N.props) == null ? void 0 : E.name) && r.value && isEqual(N == null ? void 0 : N.indexes, r == null ? void 0 : r.indexes) && ((V = N == null ? void 0 : N.props) == null ? void 0 : V.name) !== r.props.name && (!((L = r == null ? void 0 : r.indexes) != null && L.length) || isEqual(R, M)) && (r.setValue(null), p(null));
48602
+ B.includes((E = N == null ? void 0 : N.props) == null ? void 0 : E.name) && r.value && isEqual(N == null ? void 0 : N.indexes, r == null ? void 0 : r.indexes) && ((q = N == null ? void 0 : N.props) == null ? void 0 : q.name) !== r.props.name && (!((L = r == null ? void 0 : r.indexes) != null && L.length) || isEqual(R, M)) && (r.setValue(null), p(null));
48566
48603
  });
48567
48604
  }), () => {
48568
48605
  f.removeEffects(j);
48569
48606
  };
48570
48607
  }, []);
48571
- const w = (j) => q(void 0, null, function* () {
48608
+ const w = (j) => V(void 0, null, function* () {
48572
48609
  var M, $;
48573
48610
  const { search: N, callBack: B } = j, {
48574
48611
  data: { data: R }
@@ -48965,13 +49002,13 @@ const InternalFileManager = (e) => {
48965
49002
  let M = p(R[y.label]);
48966
49003
  if (($ = v == null ? void 0 : v.uiSchema) != null && $.enum)
48967
49004
  if (Array.isArray(M))
48968
- M = M.map((E, V) => {
49005
+ M = M.map((E, q) => {
48969
49006
  var G, U;
48970
49007
  const L = (U = (G = v.uiSchema.enum).find) == null ? void 0 : U.call(G, (H) => H.value === E);
48971
- return L ? /* @__PURE__ */ jsx(Tag, { color: L.color, style: { marginRight: 3 }, children: (L == null ? void 0 : L.label) || E }, V) : /* @__PURE__ */ jsx(Tag, { children: E }, E);
49008
+ return L ? /* @__PURE__ */ jsx(Tag, { color: L.color, style: { marginRight: 3 }, children: (L == null ? void 0 : L.label) || E }, q) : /* @__PURE__ */ jsx(Tag, { children: E }, E);
48972
49009
  }).reverse();
48973
49010
  else {
48974
- const E = (z = (k = v.uiSchema.enum).find) == null ? void 0 : z.call(k, (V) => V.value === M);
49011
+ const E = (z = (k = v.uiSchema.enum).find) == null ? void 0 : z.call(k, (q) => q.value === M);
48975
49012
  E && (M = /* @__PURE__ */ jsx(Tag, { color: E.color, children: E.label }));
48976
49013
  }
48977
49014
  return (v == null ? void 0 : v.type) === "date" && (M = dayjs(M).format("YYYY-MM-DD")), n ? n({
@@ -48987,7 +49024,7 @@ const InternalFileManager = (e) => {
48987
49024
  }
48988
49025
  },
48989
49026
  [v == null ? void 0 : v.uiSchema, y]
48990
- ), T = (B) => q(void 0, null, function* () {
49027
+ ), T = (B) => V(void 0, null, function* () {
48991
49028
  var M, $;
48992
49029
  const R = yield C.list({
48993
49030
  pageSize: 200,
@@ -48996,7 +49033,7 @@ const InternalFileManager = (e) => {
48996
49033
  tree: B.parentId ? void 0 : !0
48997
49034
  });
48998
49035
  return ($ = R == null ? void 0 : R.data) == null ? void 0 : $.data;
48999
- }), D = (B, R, M) => q(void 0, null, function* () {
49036
+ }), D = (B, R, M) => V(void 0, null, function* () {
49000
49037
  const $ = yield T({ parentId: R == null ? void 0 : R.id }), k = [...i];
49001
49038
  if (k.splice(M + 1), k[M] = P(x({}, k[M]), { value: R }), R != null && R.id && (k[M + 1] = { key: R == null ? void 0 : R.id, children: ($ == null ? void 0 : $.length) > 0 ? $ : null }), a(k), ["o2m", "m2m"].includes(g.interface)) {
49002
49039
  const z = Array.isArray(f.fieldValue) ? f.fieldValue : [];
@@ -49004,17 +49041,17 @@ const InternalFileManager = (e) => {
49004
49041
  } else
49005
49042
  f.value = R;
49006
49043
  k.length === 1 && !k[0].value ? o == null || o(null) : o == null || o(k);
49007
- }), O = (B, R, M) => q(void 0, null, function* () {
49044
+ }), O = (B, R, M) => V(void 0, null, function* () {
49008
49045
  var $, k, z;
49009
49046
  if (B) {
49010
49047
  d(!0);
49011
49048
  const E = yield T({ parentId: R == null ? void 0 : R.key });
49012
49049
  if (d(!1), c(E), M === (i == null ? void 0 : i.length) - 1 && (($ = R == null ? void 0 : R.value) != null && $.id)) {
49013
- const V = yield T({ parentId: (k = R == null ? void 0 : R.value) == null ? void 0 : k.id }), L = [...i];
49014
- L.splice(M + 1), L[M] = P(x({}, L[M]), { value: R == null ? void 0 : R.value }), L[M + 1] = { key: (z = R == null ? void 0 : R.value) == null ? void 0 : z.id, children: (V == null ? void 0 : V.length) > 0 ? V : null }, a(L), o == null || o(L);
49050
+ const q = yield T({ parentId: (k = R == null ? void 0 : R.value) == null ? void 0 : k.id }), L = [...i];
49051
+ L.splice(M + 1), L[M] = P(x({}, L[M]), { value: R == null ? void 0 : R.value }), L[M + 1] = { key: (z = R == null ? void 0 : R.value) == null ? void 0 : z.id, children: (q == null ? void 0 : q.length) > 0 ? q : null }, a(L), o == null || o(L);
49015
49052
  }
49016
49053
  }
49017
- }), j = (B, R) => q(void 0, null, function* () {
49054
+ }), j = (B, R) => V(void 0, null, function* () {
49018
49055
  const M = B ? {
49019
49056
  [y.label]: {
49020
49057
  [F]: B
@@ -49799,7 +49836,7 @@ const defaultModeToComponent = {
49799
49836
  const { onClick: u } = useAssociationCreateActionProps(), d = useField(), { getPrimaryKey: p } = useCollection_deprecated(), m = p();
49800
49837
  return {
49801
49838
  onClick() {
49802
- return q(this, null, function* () {
49839
+ return V(this, null, function* () {
49803
49840
  var f, C;
49804
49841
  yield u();
49805
49842
  const { data: g } = ((C = (f = d.data) == null ? void 0 : f.data) == null ? void 0 : C.data) || {};
@@ -50441,7 +50478,7 @@ const Table$1 = withDynamicSchemaProps(
50441
50478
  "loading",
50442
50479
  "onClickRow"
50443
50480
  ]), S = useArrayField(b), y = useFieldSchema(), { size: v = "small" } = (y == null ? void 0 : y["x-component-props"]) || {}, F = useCollection(), w = ((ce = y == null ? void 0 : y.parent) == null ? void 0 : ce["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: T, allIncludesChildren: D } = w, O = useMemoizedFn(b.onRowDragEnd || (() => {
50444
- })), j = usePaginationProps$2(n, i), N = useTableColumns$1(b, j), [B, R] = useState(() => T ? D : []), [M, $] = useState(((Ce = S == null ? void 0 : S.data) == null ? void 0 : Ce.selectedRowKeys) || []), [k, z] = useState([]), E = (p == null ? void 0 : p.type) !== "none", V = useRef(/* @__PURE__ */ new Map()), L = useMemo(() => css`
50481
+ })), j = usePaginationProps$2(n, i), N = useTableColumns$1(b, j), [B, R] = useState(() => T ? D : []), [M, $] = useState(((Ce = S == null ? void 0 : S.data) == null ? void 0 : Ce.selectedRowKeys) || []), [k, z] = useState([]), E = (p == null ? void 0 : p.type) !== "none", q = useRef(/* @__PURE__ */ new Map()), L = useMemo(() => css`
50445
50482
  & > td {
50446
50483
  background-color: ${t.controlItemBgActive} !important;
50447
50484
  }
@@ -50463,10 +50500,10 @@ const Table$1 = withDynamicSchemaProps(
50463
50500
  return J(Q);
50464
50501
  if (Q.key)
50465
50502
  return Q.key;
50466
- if (V.current.has(Q))
50467
- return V.current.get(Q);
50503
+ if (q.current.has(Q))
50504
+ return q.current.get(Q);
50468
50505
  const te = uid();
50469
- return V.current.set(Q, te), te;
50506
+ return q.current.set(Q, te), te;
50470
50507
  }, []), J = useCallback(
50471
50508
  (Q) => {
50472
50509
  var te;
@@ -50655,24 +50692,24 @@ const Table$1 = withDynamicSchemaProps(
50655
50692
  }
50656
50693
  `, SubTable = observer$1(
50657
50694
  (e) => {
50658
- var M, $, k, z;
50695
+ var M, $, k;
50659
50696
  const { openSize: t } = e, { field: n, options: o, fieldSchema: r } = useAssociationFieldContext(), { t: i } = useTranslation(), [a, l] = useState(!1), [c, u] = useState([]), d = useFieldNames$1(e), p = useFieldSchema(), m = useCompile(), h = useLabelUiSchema$1(o, (d == null ? void 0 : d.label) || "label"), g = useCollectionRecord(), f = useCollection(), { allowSelectExistingRecord: C, allowAddnew: b, allowDisassociation: S } = n.componentProps;
50660
50697
  useSubTableSpecialCase({ rootField: n, rootSchema: r });
50661
- const y = (E, V) => {
50662
- if (V !== void 0 && isArr(n.value) && E !== V)
50698
+ const y = (z, E) => {
50699
+ if (E !== void 0 && isArr(n.value) && z !== E)
50663
50700
  return action(() => {
50664
- const L = n.value[E];
50665
- return n.value.splice(E, 1), n.value.splice(V, 0, L), exchangeArrayState(n, {
50666
- fromIndex: E,
50667
- toIndex: V
50701
+ const q = n.value[z];
50702
+ return n.value.splice(z, 1), n.value.splice(E, 0, q), exchangeArrayState(n, {
50703
+ fromIndex: z,
50704
+ toIndex: E
50668
50705
  }), n.onInput(n.value);
50669
50706
  });
50670
50707
  };
50671
50708
  n.move = y;
50672
- const v = useMemo(() => n.value && Object.keys(n.value).length > 0 ? (Array.isArray(n.value) ? n.value : n.value ? [n.value] : []).filter(Boolean).map((V) => {
50673
- const L = V == null ? void 0 : V[d.label];
50674
- return P(x({}, V), {
50675
- [d.label]: getLabelFormatValue$1(m(h), m(L))
50709
+ const v = useMemo(() => n.value && Object.keys(n.value).length > 0 ? (Array.isArray(n.value) ? n.value : n.value ? [n.value] : []).filter(Boolean).map((E) => {
50710
+ const q = E == null ? void 0 : E[d.label];
50711
+ return P(x({}, E), {
50712
+ [d.label]: getLabelFormatValue$1(m(h), m(q))
50676
50713
  });
50677
50714
  }) : [], [n.value, d == null ? void 0 : d.label]), F = {
50678
50715
  size: "small",
@@ -50687,45 +50724,45 @@ const Table$1 = withDynamicSchemaProps(
50687
50724
  setSelectedRows: u,
50688
50725
  collectionField: o
50689
50726
  }, I = () => {
50690
- const { setVisible: E } = useActionContext(), { selectedRows: V, setSelectedRows: L } = useContext(RecordPickerContext);
50727
+ const { setVisible: z } = useActionContext(), { selectedRows: E, setSelectedRows: q } = useContext(RecordPickerContext);
50691
50728
  return {
50692
50729
  onClick() {
50693
- var U;
50694
- Array.isArray(n.value) || (n.value = []), V.forEach((H) => n.value.push(markRecordAsNew(H))), n.onInput(n.value), n.initialValue = n.value, L([]), E(!1);
50695
- const G = Math.ceil(n.value.length / (((U = n.componentProps) == null ? void 0 : U.pageSize) || 10));
50696
- D(G);
50730
+ var G;
50731
+ Array.isArray(n.value) || (n.value = []), E.forEach((U) => n.value.push(markRecordAsNew(U))), n.onInput(n.value), n.initialValue = n.value, q([]), z(!1);
50732
+ const L = Math.ceil(n.value.length / (((G = n.componentProps) == null ? void 0 : G.pageSize) || 10));
50733
+ D(L);
50697
50734
  }
50698
50735
  };
50699
50736
  }, w = () => {
50700
- const E = (o == null ? void 0 : o.targetKey) || "id", V = (n.value || []).map((G) => G == null ? void 0 : G[E]).filter(Boolean);
50701
- return V.length ? { $and: [{ [`${E}.$ne`]: V }] } : {};
50737
+ const z = (o == null ? void 0 : o.targetKey) || "id", E = (n.value || []).map((L) => L == null ? void 0 : L[z]).filter(Boolean);
50738
+ return E.length ? { $and: [{ [`${z}.$ne`]: E }] } : {};
50702
50739
  }, [T, D] = useState(1), [O, j] = useState(((M = n.componentProps) == null ? void 0 : M.pageSize) || 10);
50703
50740
  useEffect(() => {
50704
- var E;
50705
- j((E = n.componentProps) == null ? void 0 : E.pageSize);
50741
+ var z;
50742
+ j((z = n.componentProps) == null ? void 0 : z.pageSize);
50706
50743
  }, [($ = n.componentProps) == null ? void 0 : $.pageSize]);
50707
50744
  const N = useMemo(() => {
50708
- var V;
50709
- const E = Math.ceil(((V = n.value) == null ? void 0 : V.length) / 10);
50745
+ var E;
50746
+ const z = Math.ceil(((E = n.value) == null ? void 0 : E.length) / 10);
50710
50747
  return {
50711
- current: T > E ? E : T,
50748
+ current: T > z ? z : T,
50712
50749
  pageSize: O || 10,
50713
50750
  total: n == null ? void 0 : n.value,
50714
- onChange: (L, G) => {
50715
- D(L), j(G), n.componentProps.pageSize = G, n.onInput(n.value);
50751
+ onChange: (q, L) => {
50752
+ D(q), j(L), n.componentProps.pageSize = L, n.onInput(n.value);
50716
50753
  },
50717
50754
  showSizeChanger: !0,
50718
50755
  pageSizeOptions: ["10", "20", "50", "100"],
50719
50756
  hideOnSinglePage: !1
50720
50757
  };
50721
50758
  }, [(k = n.value) == null ? void 0 : k.length, O, T]), B = () => {
50722
- const { field: E } = useAssociationFieldContext();
50759
+ const { field: z } = useAssociationFieldContext();
50723
50760
  return {
50724
50761
  run() {
50725
- var L;
50726
- E.value = E.value || [], E.value.push(markRecordAsNew({}));
50727
- const V = Math.ceil(E.value.length / (((L = E.componentProps) == null ? void 0 : L.pageSize) || 10));
50728
- return D(V), E.onInput(E.value);
50762
+ var q;
50763
+ z.value = z.value || [], z.value.push(markRecordAsNew({}));
50764
+ const E = Math.ceil(z.value.length / (((q = z.componentProps) == null ? void 0 : q.pageSize) || 10));
50765
+ return D(E), z.onInput(z.value);
50729
50766
  }
50730
50767
  };
50731
50768
  }, R = () => ({
@@ -50743,7 +50780,7 @@ const Table$1 = withDynamicSchemaProps(
50743
50780
  field: n,
50744
50781
  showIndex: !0,
50745
50782
  dragSort: !1,
50746
- showDel: n.editable && (b !== !1 || C !== !1 || S !== !1) ? (E) => n.editable ? S !== !1 ? !0 : E == null ? void 0 : E.__isNewRecord__ : !1 : !1,
50783
+ showDel: n.editable && (b !== !1 || C !== !1 || S !== !1) ? (z) => n.editable ? S !== !1 ? !0 : z == null ? void 0 : z.__isNewRecord__ : !1 : !1,
50747
50784
  pagination: N,
50748
50785
  rowSelection: { type: "none", hideSelectAll: !0 },
50749
50786
  isSubTable: !0,
@@ -50759,8 +50796,7 @@ const Table$1 = withDynamicSchemaProps(
50759
50796
  Space$1,
50760
50797
  {
50761
50798
  style: {
50762
- marginTop: "10px",
50763
- position: (z = n.value) != null && z.length ? "absolute" : "relative",
50799
+ position: "relative",
50764
50800
  bottom: "0",
50765
50801
  gap: 15
50766
50802
  },
@@ -50814,7 +50850,7 @@ const Table$1 = withDynamicSchemaProps(
50814
50850
  onlyRenderProperties: !0,
50815
50851
  basePath: n.address,
50816
50852
  schema: p.parent,
50817
- filterProperties: (E) => E["x-component"] === "AssociationField.Selector"
50853
+ filterProperties: (z) => z["x-component"] === "AssociationField.Selector"
50818
50854
  }
50819
50855
  )
50820
50856
  }
@@ -50913,7 +50949,7 @@ const ReadPretty$7 = observer$1(
50913
50949
  InternalAssociationSelect.displayName = "InternalAssociationSelect";
50914
50950
  const AssociationSelect = InternalAssociationSelect;
50915
50951
  AssociationSelect.Designer = function e() {
50916
- var M, $, k, z, E, V, L, G, U, H, J;
50952
+ var M, $, k, z, E, q, L, G, U, H, J;
50917
50953
  const { getCollectionFields: t, getInterface: n, getCollectionJoinField: o, getCollection: r, isTitleField: i } = useCollectionManager_deprecated(), { getField: a } = useCollection_deprecated(), { form: l } = useFormBlockContext(), c = useField(), u = useFieldSchema(), { t: d } = useTranslation(), p = useFilterByTk(), { dn: m, refresh: h, insertAdjacent: g } = useDesignable(), f = useCompile(), C = useIsShowMultipleSwitch(), { isAllowToSetDefaultValue: b } = useIsAllowToSetDefaultValue(), S = a(u.name) || o(u["x-collection-field"]), y = useFieldComponentOptions(), v = c.address.segments.includes("__form_grid"), F = n(S == null ? void 0 : S.interface), I = (M = F == null ? void 0 : F.validateSchema) == null ? void 0 : M.call(F, u), w = ($ = S == null ? void 0 : S.uiSchema) == null ? void 0 : $.title, T = S != null && S.target ? t(S == null ? void 0 : S.target) : [];
50918
50954
  c.title === w || c.title;
50919
50955
  const D = useSortFields(S == null ? void 0 : S.target), O = ((E = (z = (k = c.componentProps) == null ? void 0 : k.service) == null ? void 0 : z.params) == null ? void 0 : E.sort) || [];
@@ -51127,7 +51163,7 @@ AssociationSelect.Designer = function e() {
51127
51163
  SchemaSettingsSwitchItem,
51128
51164
  {
51129
51165
  title: d("Allow multiple"),
51130
- checked: ((V = u["x-component-props"]) == null ? void 0 : V.multiple) === void 0 ? !0 : u["x-component-props"].multiple,
51166
+ checked: ((q = u["x-component-props"]) == null ? void 0 : q.multiple) === void 0 ? !0 : u["x-component-props"].multiple,
51131
51167
  onChange: (W) => {
51132
51168
  const K = {
51133
51169
  "x-uid": u["x-uid"]
@@ -51419,7 +51455,7 @@ AssociationSelect.FilterDesigner = function e() {
51419
51455
  }
51420
51456
  },
51421
51457
  onSubmit: ($) => {
51422
- var V;
51458
+ var q;
51423
51459
  const k = [];
51424
51460
  for (const L of $.rules)
51425
51461
  k.push(_.pickBy(L, _.identity));
@@ -51429,7 +51465,7 @@ AssociationSelect.FilterDesigner = function e() {
51429
51465
  if (["percent"].includes(m == null ? void 0 : m.interface))
51430
51466
  for (const L of k)
51431
51467
  (L.maxValue || L.minValue) && (L.percentMode = !0), L.percentFormat && (L.percentFormats = !0);
51432
- const E = _.concat([], ((V = m == null ? void 0 : m.uiSchema) == null ? void 0 : V["x-validator"]) || [], k);
51468
+ const E = _.concat([], ((q = m == null ? void 0 : m.uiSchema) == null ? void 0 : q["x-validator"]) || [], k);
51433
51469
  a.validator = E, l["x-validator"] = k, z["x-validator"] = k, u.emit("patch", {
51434
51470
  schema: z
51435
51471
  }), d();
@@ -51571,10 +51607,10 @@ AssociationSelect.FilterDesigner = function e() {
51571
51607
  options: v,
51572
51608
  value: (M = (R = a == null ? void 0 : a.componentProps) == null ? void 0 : R.fieldNames) == null ? void 0 : M.label,
51573
51609
  onChange: ($) => {
51574
- var E, V;
51610
+ var E, q;
51575
51611
  const k = {
51576
51612
  "x-uid": l["x-uid"]
51577
- }, z = P(x(x({}, (V = (E = m == null ? void 0 : m.uiSchema) == null ? void 0 : E["x-component-props"]) == null ? void 0 : V.fieldNames), a.componentProps.fieldNames), {
51613
+ }, z = P(x(x({}, (q = (E = m == null ? void 0 : m.uiSchema) == null ? void 0 : E["x-component-props"]) == null ? void 0 : q.fieldNames), a.componentProps.fieldNames), {
51578
51614
  label: $
51579
51615
  });
51580
51616
  a.componentProps.fieldNames = z, l["x-component-props"] = l["x-component-props"] || {}, l["x-component-props"].fieldNames = z, k["x-component-props"] = l["x-component-props"], u.emit("patch", {
@@ -52300,7 +52336,7 @@ const validateJSON = {
52300
52336
  }
52301
52337
  }
52302
52338
  },
52303
- onSubmit: (m) => q(void 0, [m], function* ({ plot: u, title: d, config: p }) {
52339
+ onSubmit: (m) => V(void 0, [m], function* ({ plot: u, title: d, config: p }) {
52304
52340
  o.title = r(d), o.componentProps.plot = u;
52305
52341
  const h = r(JSON.parse(p)), g = h == null ? void 0 : h.data;
52306
52342
  if (typeof g == "function") {
@@ -54256,7 +54292,7 @@ const useStyles = genStyleHook("nb-rich-text", (e) => {
54256
54292
  return /* @__PURE__ */ jsx("div", P(x({ className: cls("nb-table-index"), style: { padding: "0 8px 0 16px" } }, n), { children: t + 1 }));
54257
54293
  }, useDefAction = () => ({
54258
54294
  move() {
54259
- return q(this, null, function* () {
54295
+ return V(this, null, function* () {
54260
54296
  });
54261
54297
  }
54262
54298
  }), TableArray = observer$1(
@@ -54383,7 +54419,7 @@ const useStyles = genStyleHook("nb-rich-text", (e) => {
54383
54419
  ReactDragListView,
54384
54420
  {
54385
54421
  handleSelector: ".drag-handle",
54386
- onDragEnd: (y, v) => q(void 0, null, function* () {
54422
+ onDragEnd: (y, v) => V(void 0, null, function* () {
54387
54423
  const F = n.value[y], I = n.value[v];
54388
54424
  n.move(y, v), yield h(F, I);
54389
54425
  }),
@@ -54472,7 +54508,7 @@ const useStyles = genStyleHook("nb-rich-text", (e) => {
54472
54508
  const m = useActionContext();
54473
54509
  return {
54474
54510
  run() {
54475
- return q(this, null, function* () {
54511
+ return V(this, null, function* () {
54476
54512
  m.setVisible(!1);
54477
54513
  });
54478
54514
  }
@@ -54490,7 +54526,7 @@ const useStyles = genStyleHook("nb-rich-text", (e) => {
54490
54526
  const m = useForm(), h = useActionContext();
54491
54527
  return {
54492
54528
  run() {
54493
- return q(this, null, function* () {
54529
+ return V(this, null, function* () {
54494
54530
  const { title: f } = m.values;
54495
54531
  f && (r.title = f, i.title = f, a.emit("patch", {
54496
54532
  schema: {
@@ -54889,8 +54925,8 @@ const TableActionColumnDesigner = (e) => {
54889
54925
  }), C = useSchemaTemplate(), b = useCollection_deprecated(), { dragSort: S, resource: y } = r.decoratorProps, v = y && n(y), F = y != null && y.includes(".") ? (B = o(v == null ? void 0 : v.target)) == null ? void 0 : B.tree : !!(b != null && b.tree), I = useCallback(
54890
54926
  ({ filter: E }) => {
54891
54927
  E = removeNullCondition(E);
54892
- const V = r.decoratorProps.params || {};
54893
- V.filter = E, r.decoratorProps.params = V, i["x-decorator-props"].params = V, d.emit("patch", {
54928
+ const q = r.decoratorProps.params || {};
54929
+ q.filter = E, r.decoratorProps.params = q, i["x-decorator-props"].params = q, d.emit("patch", {
54894
54930
  schema: {
54895
54931
  "x-uid": i["x-uid"],
54896
54932
  "x-decorator-props": i["x-decorator-props"]
@@ -54911,12 +54947,12 @@ const TableActionColumnDesigner = (e) => {
54911
54947
  onChange: (E) => {
54912
54948
  var L;
54913
54949
  r.decoratorProps.treeTable = E, i["x-decorator-props"].treeTable = E;
54914
- const V = P(x({}, (L = c.params) == null ? void 0 : L[0]), {
54950
+ const q = P(x({}, (L = c.params) == null ? void 0 : L[0]), {
54915
54951
  tree: E ? !0 : null
54916
54952
  });
54917
54953
  d.emit("patch", {
54918
54954
  schema: i
54919
- }), d.refresh(), c.run(V);
54955
+ }), d.refresh(), c.run(q);
54920
54956
  }
54921
54957
  }
54922
54958
  ),
@@ -54925,7 +54961,7 @@ const TableActionColumnDesigner = (e) => {
54925
54961
  {
54926
54962
  title: u("Enable drag and drop sorting"),
54927
54963
  checked: r.decoratorProps.dragSort,
54928
- onChange: (E) => q(void 0, null, function* () {
54964
+ onChange: (E) => V(void 0, null, function* () {
54929
54965
  E && v && (yield w.resource("collections.fields", v.collectionName).update({
54930
54966
  filterByTk: v.name,
54931
54967
  values: {
@@ -55027,13 +55063,13 @@ const TableActionColumnDesigner = (e) => {
55027
55063
  },
55028
55064
  onSubmit: ({ sort: E }) => {
55029
55065
  var G;
55030
- const V = E.map((U) => U.direction === "desc" ? `-${U.field}` : U.field), L = r.decoratorProps.params || {};
55031
- L.sort = V, r.decoratorProps.params = L, i["x-decorator-props"].params = L, d.emit("patch", {
55066
+ const q = E.map((U) => U.direction === "desc" ? `-${U.field}` : U.field), L = r.decoratorProps.params || {};
55067
+ L.sort = q, r.decoratorProps.params = L, i["x-decorator-props"].params = L, d.emit("patch", {
55032
55068
  schema: {
55033
55069
  "x-uid": i["x-uid"],
55034
55070
  "x-decorator-props": i["x-decorator-props"]
55035
55071
  }
55036
- }), c.run(P(x({}, (G = c.params) == null ? void 0 : G[0]), { sort: V }));
55072
+ }), c.run(P(x({}, (G = c.params) == null ? void 0 : G[0]), { sort: q }));
55037
55073
  }
55038
55074
  }
55039
55075
  ),
@@ -55053,8 +55089,8 @@ const TableActionColumnDesigner = (e) => {
55053
55089
  ],
55054
55090
  onChange: (E) => {
55055
55091
  var L;
55056
- const V = r.decoratorProps.params || {};
55057
- V.pageSize = E, r.decoratorProps.params = V, i["x-decorator-props"].params = V, c.run(P(x({}, (L = c.params) == null ? void 0 : L[0]), { pageSize: E, page: 1 })), d.emit("patch", {
55092
+ const q = r.decoratorProps.params || {};
55093
+ q.pageSize = E, r.decoratorProps.params = q, i["x-decorator-props"].params = q, c.run(P(x({}, (L = c.params) == null ? void 0 : L[0]), { pageSize: E, page: 1 })), d.emit("patch", {
55058
55094
  schema: {
55059
55095
  "x-uid": i["x-uid"],
55060
55096
  "x-decorator-props": i["x-decorator-props"]
@@ -55074,14 +55110,14 @@ const TableActionColumnDesigner = (e) => {
55074
55110
  { label: u("Small"), value: "small" }
55075
55111
  ],
55076
55112
  onChange: (E) => {
55077
- const V = i.reduceProperties((L, G) => {
55113
+ const q = i.reduceProperties((L, G) => {
55078
55114
  if (G["x-component"] === "TableV2")
55079
55115
  return G;
55080
55116
  }, null);
55081
- V["x-component-props"] = V["x-component-props"] || {}, V["x-component-props"].size = E, d.emit("patch", {
55117
+ q["x-component-props"] = q["x-component-props"] || {}, q["x-component-props"].size = E, d.emit("patch", {
55082
55118
  schema: {
55083
- "x-uid": V["x-uid"],
55084
- "x-decorator-props": V["x-component-props"]
55119
+ "x-uid": q["x-uid"],
55120
+ "x-decorator-props": q["x-component-props"]
55085
55121
  }
55086
55122
  });
55087
55123
  }
@@ -55569,7 +55605,7 @@ function FormDrawer(e, t, n, o) {
55569
55605
  document.body.appendChild(r.host);
55570
55606
  const d = {
55571
55607
  forOpen: (p) => (isFn(p) && r.openMiddlewares.push(p), d),
55572
- open: (p) => (r.promise || (r.promise = new Promise((m, h) => q(this, null, function* () {
55608
+ open: (p) => (r.promise || (r.promise = new Promise((m, h) => V(this, null, function* () {
55573
55609
  try {
55574
55610
  p = yield loading(l.loadingText, () => applyMiddleware(p, r.openMiddlewares)), r.form = r.form || createForm(P(x({}, p), {
55575
55611
  effects(g) {
@@ -56193,7 +56229,7 @@ const useRecordIsOwn = () => {
56193
56229
  const e = useForm(), t = useActionContext();
56194
56230
  return {
56195
56231
  run() {
56196
- return q(this, null, function* () {
56232
+ return V(this, null, function* () {
56197
56233
  t.setVisible(!1), e.reset();
56198
56234
  });
56199
56235
  }
@@ -56212,7 +56248,7 @@ const useRecordIsOwn = () => {
56212
56248
  const { run: e } = useResourceActionContext(), t = useForm(), n = useActionContext();
56213
56249
  return {
56214
56250
  run() {
56215
- return q(this, null, function* () {
56251
+ return V(this, null, function* () {
56216
56252
  t.reset(), e(), n.setVisible(!1);
56217
56253
  });
56218
56254
  }
@@ -56221,7 +56257,7 @@ const useRecordIsOwn = () => {
56221
56257
  const { resource: e } = useCollection_deprecated();
56222
56258
  return {
56223
56259
  onCardDragEnd(c, u, d) {
56224
- return q(this, arguments, function* ({ columns: n, groupField: o }, { fromColumnId: r, fromPosition: i }, { toColumnId: a, toPosition: l }) {
56260
+ return V(this, arguments, function* ({ columns: n, groupField: o }, { fromColumnId: r, fromPosition: i }, { toColumnId: a, toPosition: l }) {
56225
56261
  var C, b;
56226
56262
  const p = n.find((S) => S.id === r), m = n.find((S) => S.id === a), h = (C = p == null ? void 0 : p.cards) == null ? void 0 : C[i], g = (b = m == null ? void 0 : m.cards) == null ? void 0 : b[l], f = {
56227
56263
  sourceId: h.id,
@@ -56412,7 +56448,7 @@ const useRecordIsOwn = () => {
56412
56448
  const { run: e, params: t, defaultRequest: n } = useResourceActionContext(), o = useForm(), r = useActionContext(), [i, ...a] = t;
56413
56449
  return {
56414
56450
  run() {
56415
- return q(this, null, function* () {
56451
+ return V(this, null, function* () {
56416
56452
  var d;
56417
56453
  const c = (d = n == null ? void 0 : n.params) == null ? void 0 : d.filter, u = c ? { $and: [c, o.values.filter] } : o.values.filter;
56418
56454
  e(P(x({}, i), { filter: u }), ...a), r.setVisible(!1);
@@ -56423,7 +56459,7 @@ const useRecordIsOwn = () => {
56423
56459
  const t = useForm(), n = useField(), o = useActionContext(), { refresh: r } = useResourceActionContext(), { resource: i } = useResourceContext();
56424
56460
  return {
56425
56461
  run() {
56426
- return q(this, null, function* () {
56462
+ return V(this, null, function* () {
56427
56463
  var l;
56428
56464
  try {
56429
56465
  yield t.submit(), n.data = n.data || {}, n.data.loading = !0;
@@ -56439,7 +56475,7 @@ const useRecordIsOwn = () => {
56439
56475
  const t = useForm(), { resource: n } = useResourceContext();
56440
56476
  return {
56441
56477
  run() {
56442
- return q(this, null, function* () {
56478
+ return V(this, null, function* () {
56443
56479
  var i;
56444
56480
  yield t.submit();
56445
56481
  const r = yield n.create({ values: t.values });
@@ -56453,7 +56489,7 @@ const useRecordIsOwn = () => {
56453
56489
  const { resource: n, targetKey: o } = useResourceContext(), { [o]: r } = useRecord();
56454
56490
  return {
56455
56491
  run() {
56456
- return q(this, null, function* () {
56492
+ return V(this, null, function* () {
56457
56493
  var l;
56458
56494
  yield t.submit();
56459
56495
  const a = yield n.update({ filterByTk: r, values: t.values });
@@ -56465,7 +56501,7 @@ const useRecordIsOwn = () => {
56465
56501
  const { resource: e } = useResourceContext(), { refresh: t } = useResourceActionContext();
56466
56502
  return {
56467
56503
  move(o, r) {
56468
- return q(this, null, function* () {
56504
+ return V(this, null, function* () {
56469
56505
  yield e.move({
56470
56506
  sourceId: o.id,
56471
56507
  targetId: r.id
@@ -56477,7 +56513,7 @@ const useRecordIsOwn = () => {
56477
56513
  const t = useField(), n = useForm(), o = useActionContext(), { refresh: r } = useResourceActionContext(), { resource: i, targetKey: a } = useResourceContext(), { [a]: l } = useRecord();
56478
56514
  return {
56479
56515
  run() {
56480
- return q(this, null, function* () {
56516
+ return V(this, null, function* () {
56481
56517
  var u;
56482
56518
  yield n.submit(), t.data = t.data || {}, t.data.loading = !0;
56483
56519
  try {
@@ -56495,7 +56531,7 @@ const useRecordIsOwn = () => {
56495
56531
  const { refresh: t } = useResourceActionContext(), { resource: n, targetKey: o } = useResourceContext(), { [o]: r } = useRecord();
56496
56532
  return {
56497
56533
  run() {
56498
- return q(this, null, function* () {
56534
+ return V(this, null, function* () {
56499
56535
  yield n.destroy({ filterByTk: r }), e == null || e(r), t();
56500
56536
  });
56501
56537
  }
@@ -56504,7 +56540,7 @@ const useRecordIsOwn = () => {
56504
56540
  const { state: t, setState: n, refresh: o } = useResourceActionContext(), { resource: r } = useResourceContext(), { t: i } = useTranslation();
56505
56541
  return {
56506
56542
  run() {
56507
- return q(this, null, function* () {
56543
+ return V(this, null, function* () {
56508
56544
  var l;
56509
56545
  if (!((l = t == null ? void 0 : t.selectedRowKeys) != null && l.length))
56510
56546
  return message.error(i("Please select the records you want to delete"));
@@ -56523,7 +56559,7 @@ const useRecordIsOwn = () => {
56523
56559
  const { run: e } = useCreateAction(), { refreshCM: t } = useCollectionManager_deprecated();
56524
56560
  return {
56525
56561
  run() {
56526
- return q(this, null, function* () {
56562
+ return V(this, null, function* () {
56527
56563
  yield e(), yield t();
56528
56564
  });
56529
56565
  }
@@ -56532,7 +56568,7 @@ const useRecordIsOwn = () => {
56532
56568
  const { run: e } = useUpdateAction(), { refreshCM: t } = useCollectionManager_deprecated();
56533
56569
  return {
56534
56570
  run() {
56535
- return q(this, null, function* () {
56571
+ return V(this, null, function* () {
56536
56572
  yield e(), yield t();
56537
56573
  });
56538
56574
  }
@@ -56541,7 +56577,7 @@ const useRecordIsOwn = () => {
56541
56577
  const { run: e } = useDestroyAction$1(), { refreshCM: t } = useCollectionManager_deprecated();
56542
56578
  return {
56543
56579
  run() {
56544
- return q(this, null, function* () {
56580
+ return V(this, null, function* () {
56545
56581
  yield e(), yield t();
56546
56582
  });
56547
56583
  }
@@ -56556,7 +56592,7 @@ const useRecordIsOwn = () => {
56556
56592
  const { run: e } = useBulkDestroyAction$1(), { refreshCM: t } = useCollectionManager_deprecated();
56557
56593
  return {
56558
56594
  run() {
56559
- return q(this, null, function* () {
56595
+ return V(this, null, function* () {
56560
56596
  yield e(), yield t();
56561
56597
  });
56562
56598
  }
@@ -56708,7 +56744,7 @@ const useRecordIsOwn = () => {
56708
56744
  {
56709
56745
  showSearch: !0,
56710
56746
  options: l,
56711
- onDropdownVisibleChange: (g) => q(void 0, null, function* () {
56747
+ onDropdownVisibleChange: (g) => V(void 0, null, function* () {
56712
56748
  var b;
56713
56749
  const { target: f, type: C } = p.values;
56714
56750
  f && g && c(
@@ -56758,7 +56794,7 @@ const useRecordIsOwn = () => {
56758
56794
  value: C,
56759
56795
  options: n,
56760
56796
  showSearch: !0,
56761
- onDropdownVisibleChange: (F) => q(void 0, null, function* () {
56797
+ onDropdownVisibleChange: (F) => V(void 0, null, function* () {
56762
56798
  var O;
56763
56799
  const { target: I, type: w, through: T } = f.values, D = ["belongsTo"].includes(w) ? l || p : ["belongsToMany"].includes(w) ? T : I;
56764
56800
  if (D && F) {
@@ -56941,7 +56977,7 @@ const useRecordIsOwn = () => {
56941
56977
  const e = useForm(), { refreshCM: t } = useCollectionManager_deprecated(), n = useActionContext(), { refresh: o } = useResourceActionContext(), { resource: r } = useResourceContext(), i = useField();
56942
56978
  return {
56943
56979
  run() {
56944
- return q(this, null, function* () {
56980
+ return V(this, null, function* () {
56945
56981
  yield e.submit(), i.data = i.data || {}, i.data.loading = !0;
56946
56982
  const l = cloneDeep$1(e.values);
56947
56983
  l.autoCreateReverseField || delete l.reverseField, delete l.autoCreateReverseField;
@@ -56967,18 +57003,18 @@ const useRecordIsOwn = () => {
56967
57003
  var E;
56968
57004
  if (z.key === "systemInfo")
56969
57005
  k.push(P(x({}, z), {
56970
- children: z.children.filter((V) => V.hidden ? !1 : V.value === "tableoid" ? $ != null && $.length ? $.includes(V.value) : (l == null ? void 0 : l.dialect) === "postgres" : typeof o[V.value] == "boolean" ? o[V.value] : !0)
57006
+ children: z.children.filter((q) => q.hidden ? !1 : q.value === "tableoid" ? $ != null && $.length ? $.includes(q.value) : (l == null ? void 0 : l.dialect) === "postgres" : typeof o[q.value] == "boolean" ? o[q.value] : !0)
56971
57007
  }));
56972
57008
  else {
56973
- let V = [];
57009
+ let q = [];
56974
57010
  $ != null && $.length ? $.forEach((L) => {
56975
57011
  var U;
56976
57012
  const G = (U = z == null ? void 0 : z.children) == null ? void 0 : U.find((H) => [L, L.interface].includes(H.name));
56977
- G && V.push(P(x({}, G), {
57013
+ G && q.push(P(x({}, G), {
56978
57014
  targetScope: L == null ? void 0 : L.targetScope
56979
57015
  }));
56980
- }) : M != null && M.length ? V = (E = z == null ? void 0 : z.children) == null ? void 0 : E.filter((L) => !M.includes(L.name)) : V = z == null ? void 0 : z.children, V != null && V.length && k.push(P(x({}, z), {
56981
- children: V
57016
+ }) : M != null && M.length ? q = (E = z == null ? void 0 : z.children) == null ? void 0 : E.filter((L) => !M.includes(L.name)) : q = z == null ? void 0 : z.children, q != null && q.length && k.push(P(x({}, z), {
57017
+ children: q
56982
57018
  }));
56983
57019
  }
56984
57020
  }), k;
@@ -57127,7 +57163,7 @@ const useRecordIsOwn = () => {
57127
57163
  const e = useForm(), { refreshCM: t } = useCollectionManager_deprecated(), n = useActionContext(), { refresh: o } = useResourceActionContext(), { resource: r, targetKey: i } = useResourceContext(), { [i]: a } = useRecord();
57128
57164
  return {
57129
57165
  run() {
57130
- return q(this, null, function* () {
57166
+ return V(this, null, function* () {
57131
57167
  yield e.submit();
57132
57168
  const c = cloneDeep(e.values);
57133
57169
  c.autoCreateReverseField || delete c.reverseField, delete c.autoCreateReverseField, yield r.update({ filterByTk: a, values: c }), n.setVisible(!1), yield e.reset(), o(), yield t();
@@ -57155,7 +57191,7 @@ const useRecordIsOwn = () => {
57155
57191
  /* @__PURE__ */ jsx(
57156
57192
  "a",
57157
57193
  P(x({}, a), {
57158
- onClick: () => q(void 0, null, function* () {
57194
+ onClick: () => V(void 0, null, function* () {
57159
57195
  var j, N;
57160
57196
  const { data: w } = yield g.resource("collections.fields", o.collectionName).get({
57161
57197
  filterByTk: o.name,
@@ -57267,9 +57303,9 @@ const useRecordIsOwn = () => {
57267
57303
  const B = useForm(), { refresh: R } = useResourceActionContext(), { refreshCM: M } = useCollectionManager_deprecated(), $ = useActionContext(), { resource: k } = useResourceContext();
57268
57304
  return {
57269
57305
  run() {
57270
- return q(this, null, function* () {
57306
+ return V(this, null, function* () {
57271
57307
  yield B.submit();
57272
- const E = cloneDeep(B.values), V = omit(E, [
57308
+ const E = cloneDeep(B.values), q = omit(E, [
57273
57309
  "key",
57274
57310
  "uiSchemaUid",
57275
57311
  "collectionName",
@@ -57282,7 +57318,7 @@ const useRecordIsOwn = () => {
57282
57318
  // 'reverseField.uiSchemaUid',
57283
57319
  ]);
57284
57320
  yield k.create({
57285
- values: V
57321
+ values: q
57286
57322
  }), yield B.reset(), yield M(), yield R(), $.setVisible(!1);
57287
57323
  });
57288
57324
  }
@@ -57302,7 +57338,7 @@ const useRecordIsOwn = () => {
57302
57338
  "a",
57303
57339
  {
57304
57340
  disabled: D,
57305
- onClick: () => q(void 0, null, function* () {
57341
+ onClick: () => V(void 0, null, function* () {
57306
57342
  var B;
57307
57343
  if (!D) {
57308
57344
  const { data: R } = yield S.resource("collections.fields", o.collectionName).get({
@@ -57402,7 +57438,7 @@ const useRecordIsOwn = () => {
57402
57438
  /* @__PURE__ */ jsx(
57403
57439
  "a",
57404
57440
  {
57405
- onClick: () => q(void 0, null, function* () {
57441
+ onClick: () => V(void 0, null, function* () {
57406
57442
  var I;
57407
57443
  const { data: S } = yield m.resource("collections.fields", o.collectionName).get({
57408
57444
  filterByTk: o.name,
@@ -57549,7 +57585,7 @@ const getSchema$4 = (e, t, n) => {
57549
57585
  const t = useForm(), { refreshCM: n } = useCollectionManager_deprecated(), o = useActionContext(), { refresh: r } = useResourceActionContext(), { resource: i } = useResourceContext(), a = useField();
57550
57586
  return {
57551
57587
  run() {
57552
- return q(this, null, function* () {
57588
+ return V(this, null, function* () {
57553
57589
  var c;
57554
57590
  a.data = a.data || {}, a.data.loading = !0;
57555
57591
  try {
@@ -57697,7 +57733,7 @@ const getSchema$4 = (e, t, n) => {
57697
57733
  const { refreshCM: t } = useCollectionManager_deprecated(), n = useForm(), o = useActionContext(), { refresh: r } = useResourceActionContext(), { resource: i, targetKey: a } = useResourceContext(), { [a]: l, template: c } = useRecord(), u = useAPIClient(), d = c === "sql" ? u.resource("sqlCollection") : i;
57698
57734
  return {
57699
57735
  run() {
57700
- return q(this, null, function* () {
57736
+ return V(this, null, function* () {
57701
57737
  yield n.submit(), yield d.update({
57702
57738
  filterByTk: l,
57703
57739
  values: c === "sql" ? n.values : omit$1(n.values, ["fields"])
@@ -57714,7 +57750,7 @@ const getSchema$4 = (e, t, n) => {
57714
57750
  /* @__PURE__ */ jsx(
57715
57751
  "a",
57716
57752
  P(x({}, i), {
57717
- onClick: () => q(void 0, null, function* () {
57753
+ onClick: () => V(void 0, null, function* () {
57718
57754
  const g = a(o.template), f = getSchema$3(
57719
57755
  x({}, g),
57720
57756
  o,
@@ -57776,7 +57812,7 @@ const getSchema$4 = (e, t, n) => {
57776
57812
  useEffect(() => {
57777
57813
  const R = [];
57778
57814
  g.forEach((M) => {
57779
- var V;
57815
+ var q;
57780
57816
  const $ = v(M), z = w(M).map((L) => {
57781
57817
  const G = T(L, M);
57782
57818
  return {
@@ -57791,7 +57827,7 @@ const getSchema$4 = (e, t, n) => {
57791
57827
  };
57792
57828
  })
57793
57829
  };
57794
- }), E = (V = $.fields.filter((L) => !["obo", "oho", "m2m", "o2m"].includes(L == null ? void 0 : L.interface))) == null ? void 0 : V.map((L) => {
57830
+ }), E = (q = $.fields.filter((L) => !["obo", "oho", "m2m", "o2m"].includes(L == null ? void 0 : L.interface))) == null ? void 0 : q.map((L) => {
57795
57831
  var G;
57796
57832
  return { value: L.name, key: L.name, label: l(((G = L.uiSchema) == null ? void 0 : G.title) || L.name) };
57797
57833
  }).concat(z);
@@ -57807,7 +57843,7 @@ const getSchema$4 = (e, t, n) => {
57807
57843
  if (R) {
57808
57844
  u(!1), p([]);
57809
57845
  const k = ($ = Object.values((M = R == null ? void 0 : R.data) == null ? void 0 : M.fields)) == null ? void 0 : $.map((z) => {
57810
- var E, V;
57846
+ var E, q;
57811
57847
  if (z.source) {
57812
57848
  const L = (i == null ? void 0 : i.data.find((G) => G.name === z.name)) || z;
57813
57849
  return P(x({}, z), {
@@ -57816,21 +57852,21 @@ const getSchema$4 = (e, t, n) => {
57816
57852
  } else {
57817
57853
  const L = (i == null ? void 0 : i.data.find((G) => G.name === z.name)) || z;
57818
57854
  return P(x({}, L), {
57819
- uiSchema: P(x({}, omit(L.uiSchema, "rawTitle")), { title: ((V = L.uiSchema) == null ? void 0 : V.title) || L.name })
57855
+ uiSchema: P(x({}, omit(L.uiSchema, "rawTitle")), { title: ((q = L.uiSchema) == null ? void 0 : q.title) || L.name })
57820
57856
  });
57821
57857
  }
57822
57858
  });
57823
57859
  S.value = k, setTimeout(() => {
57824
- var z, E, V;
57825
- p(k), y.setValuesIn("sources", (z = R.data) == null ? void 0 : z.sources), f((E = R.data) == null ? void 0 : E.sources), b((V = R == null ? void 0 : R.data) == null ? void 0 : V.unsupportedFields);
57860
+ var z, E, q;
57861
+ p(k), y.setValuesIn("sources", (z = R.data) == null ? void 0 : z.sources), f((E = R.data) == null ? void 0 : E.sources), b((q = R == null ? void 0 : R.data) == null ? void 0 : q.unsupportedFields);
57826
57862
  });
57827
57863
  }
57828
57864
  }).catch);
57829
57865
  }, [t]);
57830
57866
  const N = (R, M) => {
57831
57867
  d.splice(M, 1, R), p(d), S.value = d.map(($) => {
57832
- var z, E, V;
57833
- const k = typeof $.source == "string" ? $.source : (V = (E = (z = $.source) == null ? void 0 : z.filter) == null ? void 0 : E.call(z, Boolean)) == null ? void 0 : V.join(".");
57868
+ var z, E, q;
57869
+ const k = typeof $.source == "string" ? $.source : (q = (E = (z = $.source) == null ? void 0 : z.filter) == null ? void 0 : E.call(z, Boolean)) == null ? void 0 : q.join(".");
57834
57870
  return P(x({}, $), {
57835
57871
  source: k
57836
57872
  });
@@ -57855,8 +57891,8 @@ const getSchema$4 = (e, t, n) => {
57855
57891
  style: { width: "100%" },
57856
57892
  options: D(m),
57857
57893
  onChange: (k, z) => {
57858
- var V;
57859
- const E = (V = I(k == null ? void 0 : k[0])) == null ? void 0 : V.find((L) => L.name === last(k));
57894
+ var q;
57895
+ const E = (q = I(k == null ? void 0 : k[0])) == null ? void 0 : q.find((L) => L.name === last(k));
57860
57896
  N(P(x({}, M), { source: k, uiSchema: E == null ? void 0 : E.uiSchema }), $);
57861
57897
  },
57862
57898
  placeholder: l("Select field source")
@@ -57897,10 +57933,10 @@ const getSchema$4 = (e, t, n) => {
57897
57933
  popupMatchSelectWidth: !1,
57898
57934
  onChange: (E) => {
57899
57935
  var L;
57900
- const V = F(E);
57901
- N(P(x({}, k), { interface: E, uiSchema: (L = V == null ? void 0 : V.default) == null ? void 0 : L.uiSchema }), $);
57936
+ const q = F(E);
57937
+ N(P(x({}, k), { interface: E, uiSchema: (L = q == null ? void 0 : q.default) == null ? void 0 : L.uiSchema }), $);
57902
57938
  },
57903
- children: z.map((E) => /* @__PURE__ */ jsx(Select$1.OptGroup, { label: D(E.label), children: E.children.map((V) => /* @__PURE__ */ jsx(Select$1.Option, { value: V.name, children: D(V.label) }, V.value)) }, E.key))
57939
+ children: z.map((E) => /* @__PURE__ */ jsx(Select$1.OptGroup, { label: D(E.label), children: E.children.map((q) => /* @__PURE__ */ jsx(Select$1.Option, { value: q.name, children: D(q.label) }, q.value)) }, E.key))
57904
57940
  }
57905
57941
  );
57906
57942
  }
@@ -57980,7 +58016,7 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
57980
58016
  key: F.name,
57981
58017
  width: 200,
57982
58018
  render: ($, k, z) => {
57983
- const E = k[F.name], V = {
58019
+ const E = k[F.name], q = {
57984
58020
  type: "object",
57985
58021
  properties: {
57986
58022
  [F.name]: {
@@ -57992,7 +58028,7 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
57992
58028
  }
57993
58029
  }
57994
58030
  };
57995
- return /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: /* @__PURE__ */ jsx(RecursionField, { schema: V, name: z, onlyRenderProperties: !0 }) });
58031
+ return /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: /* @__PURE__ */ jsx(RecursionField, { schema: q, name: z, onlyRenderProperties: !0 }) });
57996
58032
  }
57997
58033
  };
57998
58034
  });
@@ -58123,7 +58159,7 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
58123
58159
  const e = useForm(), { refreshCM: t } = useCollectionManager_deprecated(), n = useActionContext(), { refresh: o } = useResourceActionContext(), { targetKey: r } = useResourceContext(), { [r]: i } = useRecord(), a = useAPIClient(), l = useField();
58124
58160
  return {
58125
58161
  run() {
58126
- return q(this, null, function* () {
58162
+ return V(this, null, function* () {
58127
58163
  yield e.submit(), l.data = l.data || {}, l.data.loading = !0;
58128
58164
  try {
58129
58165
  yield a.resource("collections").setFields({
@@ -58551,7 +58587,7 @@ const AsyncDataProvider = (e) => {
58551
58587
  const t = useForm(), n = useActionContext(), { refreshCM: o } = useCollectionManager_deprecated(), { refresh: r } = useResourceActionContext(), { targetKey: i } = useResourceContext(), { [i]: a } = useRecord(), l = useAPIClient(), c = useField();
58552
58588
  return {
58553
58589
  run() {
58554
- return q(this, null, function* () {
58590
+ return V(this, null, function* () {
58555
58591
  yield t.submit(), c.data = c.data || {}, c.data.loading = !0;
58556
58592
  try {
58557
58593
  yield l.resource("sqlCollection").setFields({
@@ -58595,7 +58631,7 @@ const AsyncDataProvider = (e) => {
58595
58631
  const { run: e } = useDestroyAction(), { refreshCM: t } = useCollectionManager_deprecated();
58596
58632
  return {
58597
58633
  run() {
58598
- return q(this, null, function* () {
58634
+ return V(this, null, function* () {
58599
58635
  yield e(), yield t();
58600
58636
  });
58601
58637
  }
@@ -58604,7 +58640,7 @@ const AsyncDataProvider = (e) => {
58604
58640
  const { run: t } = useBulkDestroyAction(), { refreshCM: n } = useCollectionManager_deprecated();
58605
58641
  return {
58606
58642
  run() {
58607
- return q(this, null, function* () {
58643
+ return V(this, null, function* () {
58608
58644
  yield t(e), yield n();
58609
58645
  });
58610
58646
  }
@@ -58613,7 +58649,7 @@ const AsyncDataProvider = (e) => {
58613
58649
  const { refresh: e } = useResourceActionContext(), { resource: t, targetKey: n } = useResourceContext(), { [n]: o } = useRecord(), r = useForm(), { cascade: i } = (r == null ? void 0 : r.values) || {};
58614
58650
  return {
58615
58651
  run() {
58616
- return q(this, null, function* () {
58652
+ return V(this, null, function* () {
58617
58653
  yield t.destroy({ filterByTk: o, cascade: i }), e();
58618
58654
  });
58619
58655
  }
@@ -58622,7 +58658,7 @@ const AsyncDataProvider = (e) => {
58622
58658
  const { state: e, setState: t, refresh: n } = useResourceActionContext(), { resource: o } = useResourceContext(), r = useActionContext(), { t: i } = useTranslation(), a = useForm(), { cascade: l } = (a == null ? void 0 : a.values) || {}, c = Object.values(e).flat();
58623
58659
  return {
58624
58660
  run(d) {
58625
- return q(this, null, function* () {
58661
+ return V(this, null, function* () {
58626
58662
  var p;
58627
58663
  if (!(c != null && c.length))
58628
58664
  return message.error(i("Please select the records you want to delete"));
@@ -58772,7 +58808,7 @@ const getSchema$1 = (e) => {
58772
58808
  };
58773
58809
  }, useCreateSubField = () => (useActionContext(), {
58774
58810
  run() {
58775
- return q(this, null, function* () {
58811
+ return V(this, null, function* () {
58776
58812
  });
58777
58813
  }
58778
58814
  }), AddSubFieldAction = () => {
@@ -58857,7 +58893,7 @@ const getSchema$1 = (e) => {
58857
58893
  const e = useForm(), { run: t } = useUpdateAction(), { refreshCM: n } = useCollectionManager_deprecated();
58858
58894
  return {
58859
58895
  run() {
58860
- return q(this, null, function* () {
58896
+ return V(this, null, function* () {
58861
58897
  var i, a, l;
58862
58898
  yield e.submit();
58863
58899
  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()) || [];
@@ -58878,7 +58914,7 @@ const getSchema$1 = (e) => {
58878
58914
  /* @__PURE__ */ jsx(
58879
58915
  "a",
58880
58916
  {
58881
- onClick: () => q(void 0, null, function* () {
58917
+ onClick: () => V(void 0, null, function* () {
58882
58918
  const c = getSchema(P(x({}, n(t.interface)), {
58883
58919
  default: t
58884
58920
  }));
@@ -62765,7 +62801,7 @@ class SqlCollectionTemplate extends CollectionTemplate {
62765
62801
  }
62766
62802
  class MainDataSource extends DataSource {
62767
62803
  getDataSource() {
62768
- return q(this, null, function* () {
62804
+ return V(this, null, function* () {
62769
62805
  var o;
62770
62806
  const t = yield this.app.apiClient.request({
62771
62807
  resource: "collections",
@@ -62779,7 +62815,7 @@ class MainDataSource extends DataSource {
62779
62815
  }
62780
62816
  class CollectionPlugin extends Plugin {
62781
62817
  load() {
62782
- return q(this, null, function* () {
62818
+ return V(this, null, function* () {
62783
62819
  this.dataSourceManager.addCollectionMixins([InheritanceCollectionMixin]), this.addFieldInterfaces(), this.addCollectionTemplates(), this.addFieldInterfaces(), this.addFieldInterfaceGroups(), this.addMainDataSource();
62784
62820
  });
62785
62821
  }
@@ -63260,7 +63296,7 @@ const toItems = (e = {}) => {
63260
63296
  a(((g = h == null ? void 0 : h.data) == null ? void 0 : g.map((f) => f["x-uid"])) || []);
63261
63297
  }
63262
63298
  }
63263
- ), u = t.resource("roles.menuUiSchemas", e.name), d = r.length === i.length, p = (h, g) => q(void 0, null, function* () {
63299
+ ), u = t.resource("roles.menuUiSchemas", e.name), d = r.length === i.length, p = (h, g) => V(void 0, null, function* () {
63264
63300
  const f = getParentUids(n, (b) => b.uid === g.uid), C = getChildrenUids(g == null ? void 0 : g.children, []);
63265
63301
  if (h) {
63266
63302
  const b = C.concat(g.uid), S = i.filter((y) => !b.includes(y));
@@ -63305,7 +63341,7 @@ const toItems = (e = {}) => {
63305
63341
  Checkbox$1,
63306
63342
  {
63307
63343
  checked: d,
63308
- onChange: (h) => q(void 0, null, function* () {
63344
+ onChange: (h) => V(void 0, null, function* () {
63309
63345
  d ? yield u.set({
63310
63346
  values: []
63311
63347
  }) : yield u.set({
@@ -63343,7 +63379,7 @@ const PermissionProvider = (e) => {
63343
63379
  {
63344
63380
  value: {
63345
63381
  currentRecord: i,
63346
- update: (l, c) => q(void 0, null, function* () {
63382
+ update: (l, c) => V(void 0, null, function* () {
63347
63383
  const { path: u, value: d } = l.getState();
63348
63384
  if (["ui.*", "pm", "pm.*"].includes(u)) {
63349
63385
  const p = t.resource("roles.snippets", n.name);
@@ -63414,7 +63450,7 @@ const PermissionProvider = (e) => {
63414
63450
  );
63415
63451
  },
63416
63452
  effects() {
63417
- onFieldChange("*", (o, r) => q(this, null, function* () {
63453
+ onFieldChange("*", (o, r) => V(this, null, function* () {
63418
63454
  r.modified && (yield e(o, r));
63419
63455
  }));
63420
63456
  }
@@ -64458,7 +64494,7 @@ const SettingCenterProvider = (e) => {
64458
64494
  l((g == null ? void 0 : g.data) || []);
64459
64495
  }
64460
64496
  }
64461
- ), m = n.resource("roles.snippets", t.name), h = (g, f) => q(void 0, null, function* () {
64497
+ ), m = n.resource("roles.snippets", t.name), h = (g, f) => V(void 0, null, function* () {
64462
64498
  const b = getChildrenKeys(f == null ? void 0 : f.children, []).concat(f.aclSnippet);
64463
64499
  g ? (yield m.add({
64464
64500
  values: b.map((S) => "!" + S)
@@ -64489,7 +64525,7 @@ const SettingCenterProvider = (e) => {
64489
64525
  Checkbox$1,
64490
64526
  {
64491
64527
  checked: c,
64492
- onChange: () => q(void 0, null, function* () {
64528
+ onChange: () => V(void 0, null, function* () {
64493
64529
  const g = i.map((f) => "!" + f);
64494
64530
  c ? yield m.add({
64495
64531
  values: g
@@ -64536,7 +64572,7 @@ const SettingCenterProvider = (e) => {
64536
64572
  }, ACLPane = () => /* @__PURE__ */ jsx(Card, { "data-testid": "acl-pane-card", bordered: !1, children: /* @__PURE__ */ jsx(SchemaComponent, { components, schema: schema2 }) });
64537
64573
  class ACLPlugin extends Plugin {
64538
64574
  load() {
64539
- return q(this, null, function* () {
64575
+ return V(this, null, function* () {
64540
64576
  this.app.addComponents({
64541
64577
  ACLCollectionFieldProvider,
64542
64578
  ACLActionProvider,
@@ -64574,7 +64610,7 @@ function AntdConfigProvider(e) {
64574
64610
  }
64575
64611
  class AntdConfigPlugin extends Plugin {
64576
64612
  load() {
64577
- return q(this, null, function* () {
64613
+ return V(this, null, function* () {
64578
64614
  var t;
64579
64615
  this.app.use(AntdConfigProvider, ((t = this.options) == null ? void 0 : t.config) || {});
64580
64616
  });