@nocobase/client 1.9.54 → 1.9.55

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
@@ -57,7 +57,7 @@ import { Observer, SchemaOptionsContext, SchemaComponentsContext, ExpressionScop
57
57
  import * as ahooks from "ahooks";
58
58
  import { useSetState, useRequest as useRequest$1, useBoolean, useUpdate, useMemoizedFn, useDeepCompareEffect, useEventListener, useLocalStorageState, useCreation, useDebounce } from "ahooks";
59
59
  import * as antd from "antd";
60
- import { notification, ConfigProvider, theme, message, Result, Button, Space as Space$1, Radio as Radio$1, Input as Input$3, Tag, Spin, App, Popover, Menu as Menu$1, Modal, Typography, Tooltip, Skeleton, Table as Table$3, Select as Select$1, DatePicker as DatePicker$1, Cascader as Cascader$1, Slider, Switch, Card, Empty, Collapse, Badge, Tree as Tree$2, Dropdown, Alert, Image, InputNumber as InputNumber$1, Drawer as Drawer$1, Divider as Divider$1, QRCode, Tabs as Tabs$1, TreeSelect as TreeSelect$2, Upload as Upload$1, Progress, Checkbox as Checkbox$1, AutoComplete as AutoComplete$1, ColorPicker as ColorPicker$1, List as List$1, Col, Flex, Pagination as Pagination$1, TimePicker as TimePicker$1, Form as Form$2, Row, Popconfirm, Layout as Layout$1 } from "antd";
60
+ import { notification, ConfigProvider, theme, message, Result, Button, Space as Space$1, Radio as Radio$1, Input as Input$3, Tag, Spin, App, Popover, Menu as Menu$1, Modal, Typography, Tooltip, Skeleton, Table as Table$3, Select as Select$1, DatePicker as DatePicker$1, Cascader as Cascader$1, Slider, Switch, Card, Empty, Collapse, Badge, Tree as Tree$2, Dropdown, Alert, Image, InputNumber as InputNumber$1, Drawer as Drawer$1, Divider as Divider$1, QRCode, Checkbox as Checkbox$1, Tabs as Tabs$1, TreeSelect as TreeSelect$2, Upload as Upload$1, Progress, AutoComplete as AutoComplete$1, ColorPicker as ColorPicker$1, List as List$1, Col, Flex, Pagination as Pagination$1, TimePicker as TimePicker$1, Form as Form$2, Row, Popconfirm, Layout as Layout$1 } from "antd";
61
61
  import _, { filter, capitalize, cloneDeep as cloneDeep$1, set, every, some, findIndex, isArray, isFunction, get, isObject as isObject$1, isEmpty as isEmpty$1, isString, omit, last, first, isEqual, concat, clone, debounce, castArray, uniqBy, differenceBy, unionBy, cloneDeepWith, isBoolean, groupBy, toString, uniq as uniq$2, pick as pick$1 } from "lodash";
62
62
  import template from "lodash/template";
63
63
  import React, { createContext, useContext, useMemo, Fragment, useCallback, useEffect, memo, useState, useRef, Suspense, createElement, isValidElement, lazy as lazy$1, useDeferredValue, useLayoutEffect, startTransition, forwardRef, useImperativeHandle, createRef } from "react";
@@ -7208,12 +7208,12 @@ const collectFieldStateOfLinkageRules = ({
7208
7208
  if ((t == null ? void 0 : t.mode) === "express") {
7209
7209
  if ((t.value || t.result) == null)
7210
7210
  return;
7211
- const { exp: E, scope: z } = yield replaceVariables(t.value || t.result, {
7211
+ const { exp: E, scope: L } = yield replaceVariables(t.value || t.result, {
7212
7212
  variables: r,
7213
7213
  localVariables: a
7214
7214
  });
7215
7215
  try {
7216
- return f(E, x({ now: () => (/* @__PURE__ */ new Date()).toString() }, z));
7216
+ return f(E, x({ now: () => (/* @__PURE__ */ new Date()).toString() }, L));
7217
7217
  } catch (V) {
7218
7218
  console.error(V);
7219
7219
  }
@@ -8858,7 +8858,7 @@ function addAppVersion(e, t) {
8858
8858
  addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
8859
8859
  }), e;
8860
8860
  }
8861
- const name = "@nocobase/client", version = "1.9.54", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
8861
+ const name = "@nocobase/client", version = "1.9.55", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
8862
8862
  "@ahooksjs/use-url-state": "3.5.1",
8863
8863
  "@ant-design/cssinjs": "^1.11.1",
8864
8864
  "@ant-design/icons": "^5.6.1",
@@ -8879,9 +8879,9 @@ const name = "@nocobase/client", version = "1.9.54", license = "AGPL-3.0", main
8879
8879
  "@formily/reactive-react": "^2.2.27",
8880
8880
  "@formily/shared": "^2.2.27",
8881
8881
  "@formily/validator": "^2.2.27",
8882
- "@nocobase/evaluators": "1.9.54",
8883
- "@nocobase/sdk": "1.9.54",
8884
- "@nocobase/utils": "1.9.54",
8882
+ "@nocobase/evaluators": "1.9.55",
8883
+ "@nocobase/sdk": "1.9.55",
8884
+ "@nocobase/utils": "1.9.55",
8885
8885
  ahooks: "^3.7.2",
8886
8886
  antd: "5.24.2",
8887
8887
  "antd-mobile": "^5.41.1",
@@ -10139,11 +10139,11 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
10139
10139
  ${o.paddingSM}px;
10140
10140
  }
10141
10141
  `, [o.paddingContentVerticalLG, o.marginSM, o.margin]), b = useCollection(), S = useMemo(() => withTooltipComponent(NocoBaseRecursionField), []), y = useMemo(() => (d == null ? void 0 : d.map((D) => {
10142
- var z, V, L, G, H;
10142
+ var L, V, z, G, H;
10143
10143
  const B = D.reduceProperties((U, K) => {
10144
10144
  if (isCollectionFieldComponent(K))
10145
10145
  return U.concat([K]);
10146
- }, []), N = (B == null ? void 0 : B.length) > 0 ? B[0].name : D.name, M = D["x-uid"] || D.name, j = !!((z = D["x-component-props"]) != null && z.columnHidden), R = ((V = D["x-component-props"]) == null ? void 0 : V.width) || 100, O = (L = D["x-component-props"]) == null ? void 0 : L.fixed, { uiSchema: $, defaultValue: A, interface: E } = (b == null ? void 0 : b.getField(N)) || {};
10146
+ }, []), N = (B == null ? void 0 : B.length) > 0 ? B[0].name : D.name, M = D["x-uid"] || D.name, j = !!((L = D["x-component-props"]) != null && L.columnHidden), R = ((V = D["x-component-props"]) == null ? void 0 : V.width) || 100, O = (z = D["x-component-props"]) == null ? void 0 : z.fixed, { uiSchema: $, defaultValue: A, interface: E } = (b == null ? void 0 : b.getField(N)) || {};
10147
10147
  return D.title = n(D == null ? void 0 : D.title, { ns: NAMESPACE_UI_SCHEMA }), $ && ($.default = A), P(x({
10148
10148
  title: /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: g, children: /* @__PURE__ */ jsx(
10149
10149
  S,
@@ -10566,7 +10566,7 @@ const Table$2 = withDynamicSchemaProps(
10566
10566
  "onClickRow",
10567
10567
  "value"
10568
10568
  ]), y = useArrayField$1(S), v = useFieldSchema(), { size: I = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, F = useCollection(), T = ((ye = v == null ? void 0 : v.parent) == null ? void 0 : ye["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: B, enableIndexColumn: N } = T, M = useMemoizedFn(S.onRowDragEnd || (() => {
10569
- })), j = usePaginationProps$3(n, a, e), R = useTableColumns$3(S, j), [O, $] = useState(() => D ? B : []), [A, E] = useState(((ie = y == null ? void 0 : y.data) == null ? void 0 : ie.selectedRowKeys) || []), [z, V] = useState([]), L = (p == null ? void 0 : p.type) !== "none", G = useRef(/* @__PURE__ */ new Map()), H = useMemo(() => css`
10569
+ })), j = usePaginationProps$3(n, a, e), R = useTableColumns$3(S, j), [O, $] = useState(() => D ? B : []), [A, E] = useState(((ie = y == null ? void 0 : y.data) == null ? void 0 : ie.selectedRowKeys) || []), [L, V] = useState([]), z = (p == null ? void 0 : p.type) !== "none", G = useRef(/* @__PURE__ */ new Map()), H = useMemo(() => css`
10570
10570
  & > td {
10571
10571
  background-color: ${t.controlItemBgActive} !important;
10572
10572
  }
@@ -10582,14 +10582,14 @@ const Table$2 = withDynamicSchemaProps(
10582
10582
  }, [U == null ? void 0 : U.field]);
10583
10583
  const Y = useMemo(() => C ? H : "", [H, C]), X = useMemo(() => C ? (te, oe) => ({
10584
10584
  onClick: (le) => {
10585
- isPortalInBody(le.target) || C(te, V, z);
10585
+ isPortalInBody(le.target) || C(te, V, L);
10586
10586
  },
10587
10587
  rowIndex: oe,
10588
10588
  record: te
10589
10589
  }) : (te, oe) => ({
10590
10590
  rowIndex: oe,
10591
10591
  record: te
10592
- }), [C, z]);
10592
+ }), [C, L]);
10593
10593
  useDeepCompareEffect(() => {
10594
10594
  const te = D ? B : [];
10595
10595
  _.isEqual(te, O) || $(te);
@@ -10662,14 +10662,14 @@ const Table$2 = withDynamicSchemaProps(
10662
10662
  role: "button",
10663
10663
  "aria-label": `table-index-${le}`,
10664
10664
  className: cls(te ? "checked" : null, rowSelectCheckboxWrapperClass$1, {
10665
- [rowSelectCheckboxWrapperClassHover$1]: L
10665
+ [rowSelectCheckboxWrapperClassHover$1]: z
10666
10666
  }),
10667
10667
  children: [
10668
10668
  /* @__PURE__ */ jsxs("div", { className: cls(te ? "checked" : null, rowSelectCheckboxContentClass$1), children: [
10669
10669
  l && /* @__PURE__ */ jsx(SortHandle$2, { id: Z(oe) }),
10670
10670
  c && /* @__PURE__ */ jsx(TableIndex$3, { index: le })
10671
10671
  ] }),
10672
- L && /* @__PURE__ */ jsx(
10672
+ z && /* @__PURE__ */ jsx(
10673
10673
  "div",
10674
10674
  {
10675
10675
  className: cls(
@@ -10694,7 +10694,7 @@ const Table$2 = withDynamicSchemaProps(
10694
10694
  l,
10695
10695
  y,
10696
10696
  Z,
10697
- L,
10697
+ z,
10698
10698
  re,
10699
10699
  j,
10700
10700
  U,
@@ -10717,8 +10717,8 @@ const Table$2 = withDynamicSchemaProps(
10717
10717
  x: "max-content",
10718
10718
  y: ae
10719
10719
  }), [ae, Q]), ce = useCallback(
10720
- (te) => z.includes(te[m]) ? Y : "",
10721
- [z, Y, JSON.stringify(m)]
10720
+ (te) => L.includes(te[m]) ? Y : "",
10721
+ [L, Y, JSON.stringify(m)]
10722
10722
  ), ge = useCallback(
10723
10723
  (te, oe) => {
10724
10724
  const le = te ? [...O, oe[F.getPrimaryKey()]] : O.filter((me) => oe[F.getPrimaryKey()] !== me);
@@ -10967,10 +10967,10 @@ const InternalTableBlockProvider = (e) => {
10967
10967
  [t, p]
10968
10968
  ), v = useCallback(
10969
10969
  (R, O = !1, $) => {
10970
- var z;
10970
+ var L;
10971
10971
  if (!R)
10972
10972
  return [];
10973
- const A = (z = p($)) == null ? void 0 : z.getCollection(R);
10973
+ const A = (L = p($)) == null ? void 0 : L.getCollection(R);
10974
10974
  return (A == null ? void 0 : A.getChildrenCollections(O)) || [];
10975
10975
  },
10976
10976
  [t, p]
@@ -10985,19 +10985,19 @@ const InternalTableBlockProvider = (e) => {
10985
10985
  var Z;
10986
10986
  const {
10987
10987
  association: E = !1,
10988
- cached: z = {},
10988
+ cached: L = {},
10989
10989
  collectionNames: V = [R],
10990
- maxDepth: L = 1,
10990
+ maxDepth: z = 1,
10991
10991
  allowAllTypes: G = !1,
10992
10992
  exceptInterfaces: H = [],
10993
10993
  prefixFieldValue: U = "",
10994
10994
  usePrefix: K = !1,
10995
10995
  dataSource: Y
10996
10996
  } = A || {};
10997
- if (V.length - 1 > L)
10997
+ if (V.length - 1 > z)
10998
10998
  return;
10999
- if (z[R])
11000
- return _.cloneDeep(z[R]);
10999
+ if (L[R])
11000
+ return _.cloneDeep(L[R]);
11001
11001
  O && typeof O == "string" && (O = [O]), $ && typeof $ == "string" && ($ = [$]);
11002
11002
  const X = b(R, Y), J = (Z = X == null ? void 0 : X.filter(
11003
11003
  (Q) => Q.interface && !H.includes(Q.interface) && (G || O && O.includes(Q.type) || $ && $.includes(Q.interface) || (E && Q.target && Q.target !== R && Array.isArray(E) ? E.includes(Q.interface) : !1))
@@ -11008,14 +11008,14 @@ const InternalTableBlockProvider = (e) => {
11008
11008
  label: f((ee = Q == null ? void 0 : Q.uiSchema) == null ? void 0 : ee.title) || Q.name
11009
11009
  }, Q);
11010
11010
  return E && Q.target && (ne.children = V.includes(Q.target) ? [] : F(Q.target, O, $, P(x({}, A), {
11011
- cached: z,
11011
+ cached: L,
11012
11012
  dataSource: Y,
11013
11013
  collectionNames: [...V, Q.target],
11014
11014
  prefixFieldValue: K ? U ? `${U}.${Q.name}` : Q.name : "",
11015
11015
  usePrefix: K
11016
11016
  })), !((re = ne.children) != null && re.length)) ? null : ne;
11017
11017
  }).filter(Boolean);
11018
- return z[R] = J, J;
11018
+ return L[R] = J, J;
11019
11019
  },
11020
11020
  [b]
11021
11021
  ), w = useCallback(
@@ -11289,12 +11289,12 @@ const popupsContextStorage = {}, defaultPopupsContextStorage = {}, getStoredPopu
11289
11289
  recordData: $,
11290
11290
  sourceId: A,
11291
11291
  collection: E,
11292
- puid: z
11292
+ puid: L
11293
11293
  }) => {
11294
11294
  const V = c.getFilterByTK(u || l, $);
11295
11295
  return getPopupPathFromParams({
11296
11296
  popupuid: O,
11297
- puid: z,
11297
+ puid: L,
11298
11298
  collection: E,
11299
11299
  filterbytk: V,
11300
11300
  sourceid: A,
@@ -11319,27 +11319,27 @@ const popupsContextStorage = {}, defaultPopupsContextStorage = {}, getStoredPopu
11319
11319
  } = {}) => {
11320
11320
  if (!f())
11321
11321
  return F == null ? void 0 : F(!0);
11322
- const z = E || o, V = z == null ? void 0 : z["x-uid"], L = y(O);
11322
+ const L = E || o, V = L == null ? void 0 : L["x-uid"], z = y(O);
11323
11323
  R = R || (a == null ? void 0 : a.data);
11324
11324
  const G = w({
11325
11325
  popupUid: V,
11326
11326
  recordData: R,
11327
- sourceId: L,
11327
+ sourceId: z,
11328
11328
  collection: $,
11329
11329
  puid: A
11330
11330
  });
11331
11331
  let H = n.pathname;
11332
11332
  if (_.last(H) === "/" && (H = H.slice(0, -1)), storePopupContext(V, {
11333
- schema: z,
11333
+ schema: L,
11334
11334
  record: new CollectionRecord({ isNew: !1, data: R }),
11335
11335
  parentRecord: O ? new CollectionRecord({ isNew: !1, data: O }) : i,
11336
11336
  service: g(),
11337
11337
  dataSource: r,
11338
11338
  collection: l == null ? void 0 : l.name,
11339
11339
  association: u,
11340
- sourceId: L,
11340
+ sourceId: z,
11341
11341
  tableBlockContext: P(x({}, I), { collection: l == null ? void 0 : l.name, blockData: v })
11342
- }), b(T(), E), z.properties) {
11342
+ }), b(T(), E), L.properties) {
11343
11343
  const U = h + 1;
11344
11344
  if (getPopupLayerState(U))
11345
11345
  return;
@@ -11347,7 +11347,7 @@ const popupsContextStorage = {}, defaultPopupsContextStorage = {}, getStoredPopu
11347
11347
  } else
11348
11348
  console.error(
11349
11349
  `[NocoBase] The popup schema is invalid, please check the schema:
11350
- ${JSON.stringify(z, null, 2)}`
11350
+ ${JSON.stringify(L, null, 2)}`
11351
11351
  );
11352
11352
  },
11353
11353
  [
@@ -14080,14 +14080,14 @@ const ParentCollectionProvider = (e) => {
14080
14080
  targetFieldSchema: a,
14081
14081
  record: i
14082
14082
  }) => {
14083
- var E, z;
14083
+ var E, L;
14084
14084
  const l = useApp(), c = ((E = l == null ? void 0 : l.getVariables) == null ? void 0 : E.call(l).map((V) => {
14085
- const { visible: L = !0, option: G } = V.useOption();
14085
+ const { visible: z = !0, option: G } = V.useOption();
14086
14086
  return {
14087
- visible: L,
14087
+ visible: z,
14088
14088
  option: G
14089
14089
  };
14090
- }).filter(({ visible: V }) => V)) || [], { filterVariables: u = () => !0 } = useVariables$1() || {}, d = (z = i == null ? void 0 : i.__parent) == null ? void 0 : z.__collectionName, { currentUserSettings: p } = useCurrentUserVariable({
14090
+ }).filter(({ visible: V }) => V)) || [], { filterVariables: u = () => !0 } = useVariables$1() || {}, d = (L = i == null ? void 0 : i.__parent) == null ? void 0 : L.__collectionName, { currentUserSettings: p } = useCurrentUserVariable({
14091
14091
  maxDepth: 3,
14092
14092
  uiSchema: n,
14093
14093
  collectionField: e,
@@ -14558,33 +14558,33 @@ const getActionContext = (e) => {
14558
14558
  var n;
14559
14559
  return ((n = e.fieldSchema) == null ? void 0 : n["x-action-context"]) || {};
14560
14560
  }, SchemaSettingsDefaultValue = function(t) {
14561
- var E, z, V;
14562
- const n = useFieldSchema(), o = (E = t == null ? void 0 : t.fieldSchema) != null ? E : n, r = useField(), { dn: a } = useDesignable(), { t: i } = useTranslation(), l = useActionContext(), c = getActionContext(l).collection;
14561
+ var A, E, L;
14562
+ const n = useFieldSchema(), o = (A = t == null ? void 0 : t.fieldSchema) != null ? A : n, r = useField(), { dn: a } = useDesignable(), { t: i } = useTranslation(), l = useActionContext(), c = getActionContext(l).collection;
14563
14563
  let u;
14564
14564
  const { getField: d } = useCollection_deprecated(), { getCollectionJoinField: p, getCollectionFields: m, getAllCollectionsInheritChain: h } = useCollectionManager_deprecated(), g = useVariables$1(), f = useLocalVariables$1(), C = useCollection_deprecated(), b = useRecord(), { form: S, type: y } = useFormBlockContext(), { getFields: v } = useCollectionFilterOptionsV2(C), { isInSubForm: I, isInSubTable: F } = useFlag() || {}, { name: w } = C, T = useMemo(
14565
14565
  () => d(o.name) || p(o["x-collection-field"]),
14566
14566
  [o, p, d]
14567
14567
  ), D = _.omit(o, "required");
14568
14568
  T != null && T.target && (u = p(
14569
- `${T.target}.${((V = (z = o["x-component-props"]) == null ? void 0 : z.fieldNames) == null ? void 0 : V.label) || "id"}`
14569
+ `${T.target}.${((L = (E = o["x-component-props"]) == null ? void 0 : E.fieldNames) == null ? void 0 : L.label) || "id"}`
14570
14570
  ));
14571
- const B = (T == null ? void 0 : T.interface) === "m2o" && findParentFieldSchema(o), N = B && p(B == null ? void 0 : B["x-collection-field"]), M = useTableBlockContext(), j = (T == null ? void 0 : T.interface) === "m2m" || (T == null ? void 0 : T.interface) === "mbm" || (N == null ? void 0 : N.type) === "hasMany" && (T == null ? void 0 : T.interface) === "m2o", R = useCallback(
14572
- (L) => {
14573
- const G = L.find((U) => U.value === "$nForm"), H = m(w);
14574
- return !(H != null && H.length) && G && (G.children = formatVariableScop(v())), L;
14571
+ const B = (T == null ? void 0 : T.interface) === "m2o" && findParentFieldSchema(o), N = B && p(B == null ? void 0 : B["x-collection-field"]), M = (T == null ? void 0 : T.interface) === "m2m" || (T == null ? void 0 : T.interface) === "mbm" || (N == null ? void 0 : N.type) === "hasMany" && (T == null ? void 0 : T.interface) === "m2o", j = useCallback(
14572
+ (V) => {
14573
+ const z = V.find((H) => H.value === "$nForm"), G = m(w);
14574
+ return !(G != null && G.length) && z && (z.children = formatVariableScop(v())), V;
14575
14575
  },
14576
- [v, w]
14577
- ), O = useMemo(() => ({
14576
+ [m, v, w]
14577
+ ), R = useMemo(() => ({
14578
14578
  ArrayCollapse: ArrayCollapse$2,
14579
14579
  FormLayout,
14580
- VariableInput: (L) => /* @__PURE__ */ jsx(SchemaComponentContext.Provider, { value: { designable: !1 }, children: /* @__PURE__ */ jsx(
14580
+ VariableInput: (V) => /* @__PURE__ */ jsx(SchemaComponentContext.Provider, { value: { designable: !1 }, children: /* @__PURE__ */ jsx(
14581
14581
  VariableInput,
14582
- P(x({}, L), {
14583
- value: L.value || void 0,
14582
+ P(x({}, V), {
14583
+ value: V.value || void 0,
14584
14584
  hideVariableButton: t == null ? void 0 : t.hideVariableButton
14585
14585
  })
14586
14586
  ) })
14587
- }), []), $ = useMemo(() => ({
14587
+ }), [t == null ? void 0 : t.hideVariableButton]), O = useMemo(() => ({
14588
14588
  type: "object",
14589
14589
  title: i("Set default value"),
14590
14590
  properties: {
@@ -14593,45 +14593,49 @@ const getActionContext = (e) => {
14593
14593
  "x-component": "VariableInput",
14594
14594
  "x-component-props": P(x({}, (o == null ? void 0 : o["x-component-props"]) || {}), {
14595
14595
  collectionField: T,
14596
- contextCollectionName: j ? c : "",
14596
+ contextCollectionName: M ? c : "",
14597
14597
  schema: T == null ? void 0 : T.uiSchema,
14598
14598
  targetFieldSchema: o,
14599
14599
  className: defaultInputStyle,
14600
14600
  form: S,
14601
14601
  record: b,
14602
- returnScope: R,
14602
+ returnScope: j,
14603
14603
  shouldChange: getShouldChange({
14604
14604
  collectionField: T,
14605
14605
  variables: g,
14606
14606
  localVariables: f,
14607
14607
  getAllCollectionsInheritChain: h
14608
14608
  }),
14609
- renderSchemaComponent: function(G) {
14610
- const H = useMemo(
14609
+ renderSchemaComponent: function(z) {
14610
+ const G = useMemo(
14611
14611
  () => _.cloneDeep(D.toJSON()) || {},
14612
14612
  []
14613
14613
  );
14614
- H["x-read-pretty"] = !1, H["x-disabled"] = !1, _.set(H, "x-decorator-props.showTitle", !1);
14615
- const U = getFieldDefaultValue(H, T);
14616
- T.target && H["x-component-props"] && (H["x-component-props"].mode = "Select"), T != null && T.uiSchema.type && (H.type = T.uiSchema.type), (T == null ? void 0 : T.uiSchema["x-component"]) === "Checkbox" && (_.set(H, "x-component-props.defaultChecked", U), H.type = "void");
14617
- const K = useMemo(
14618
- () => P(x({}, H || {}), {
14614
+ G["x-read-pretty"] = !1, G["x-disabled"] = !1, _.set(G, "x-decorator-props.showTitle", !1);
14615
+ const H = getFieldDefaultValue(G, T);
14616
+ if (G["x-component"] === "CollectionField" && (T != null && T.uiSchema)) {
14617
+ const K = _.cloneDeep(T.uiSchema);
14618
+ G["x-component"] = K["x-component"] || "Input", G["x-use-component-props"] = G["x-use-component-props"] || K["x-use-component-props"], G["x-component-props"] = x(x({}, K["x-component-props"] || {}), G["x-component-props"] || {}), K.type && (G.type = K.type);
14619
+ }
14620
+ T.target && G["x-component-props"] && (G["x-component-props"].mode = "Select"), T != null && T.uiSchema.type && (G.type = T.uiSchema.type), (T == null ? void 0 : T.uiSchema["x-component"]) === "Checkbox" && (_.set(G, "x-component-props.defaultChecked", H), G.type = "void");
14621
+ const U = useMemo(
14622
+ () => P(x({}, G || {}), {
14619
14623
  "x-decorator": "FormItem",
14620
- "x-component-props": P(x({}, H["x-component-props"]), {
14624
+ "x-component-props": P(x({}, G["x-component-props"]), {
14621
14625
  collectionName: T == null ? void 0 : T.collectionName,
14622
14626
  targetField: u,
14623
- defaultValue: isVariable$1(U) ? "" : U,
14627
+ defaultValue: isVariable$1(H) ? "" : H,
14624
14628
  style: {
14625
14629
  width: "100%",
14626
14630
  verticalAlign: "top",
14627
14631
  minWidth: "200px"
14628
14632
  }
14629
14633
  }),
14630
- default: isVariable$1(U) ? "" : U
14634
+ default: isVariable$1(H) ? "" : H
14631
14635
  }),
14632
- [H, U]
14636
+ [G, H]
14633
14637
  );
14634
- return _.set(K, "x-component-props.onChange", G.onChange), /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(SchemaComponent, { schema: K }) });
14638
+ return _.set(U, "x-component-props.onChange", z.onChange), /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(SchemaComponent, { schema: U }) });
14635
14639
  }
14636
14640
  }),
14637
14641
  title: i("Default value"),
@@ -14639,27 +14643,27 @@ const getActionContext = (e) => {
14639
14643
  }
14640
14644
  }
14641
14645
  }), [
14646
+ c,
14642
14647
  T,
14643
14648
  o,
14644
14649
  D,
14645
14650
  S,
14646
14651
  h,
14647
- j,
14652
+ M,
14648
14653
  f,
14649
14654
  b,
14650
- R,
14655
+ j,
14651
14656
  i,
14652
- M.collection,
14653
14657
  u,
14654
14658
  g
14655
- ]), A = useCallback(
14656
- (L) => {
14657
- var H, U, K;
14658
- const G = {
14659
+ ]), $ = useCallback(
14660
+ (V) => {
14661
+ var G, H, U;
14662
+ const z = {
14659
14663
  "x-uid": o["x-uid"]
14660
14664
  };
14661
- o.default = (H = L.default) != null ? H : null, isVariable$1(L.default) || (b.__isNewRecord__ || y === "create") && ((U = r.setInitialValue) == null || U.call(r, L.default)), G.default = (K = L.default) != null ? K : null, a.emit("patch", {
14662
- schema: G,
14665
+ o.default = (G = V.default) != null ? G : null, isVariable$1(V.default) || (b.__isNewRecord__ || y === "create") && ((H = r.setInitialValue) == null || H.call(r, V.default)), z.default = (U = V.default) != null ? U : null, a.emit("patch", {
14666
+ schema: z,
14663
14667
  currentSchema: n
14664
14668
  });
14665
14669
  },
@@ -14669,18 +14673,18 @@ const getActionContext = (e) => {
14669
14673
  SchemaSettingsModalItem,
14670
14674
  {
14671
14675
  title: i("Set default value"),
14672
- components: O,
14676
+ components: R,
14673
14677
  width: 800,
14674
- schema: $,
14675
- onSubmit: A,
14676
- ModalContextProvider: (L) => /* @__PURE__ */ jsx(
14678
+ schema: O,
14679
+ onSubmit: $,
14680
+ ModalContextProvider: (V) => /* @__PURE__ */ jsx(
14677
14681
  FlagProvider,
14678
14682
  {
14679
14683
  isInSubForm: I,
14680
14684
  isInSubTable: F,
14681
14685
  isInSetDefaultValueDialog: !0,
14682
14686
  collectionField: T,
14683
- children: L.children
14687
+ children: V.children
14684
14688
  }
14685
14689
  )
14686
14690
  }
@@ -15547,7 +15551,7 @@ const useGetFilterOptions = () => {
15547
15551
  };
15548
15552
  });
15549
15553
  }, TableColumnDesigner$1 = (e) => {
15550
- var N, M, j, R, O, $, A, E, z, V, L, G;
15554
+ var N, M, j, R, O, $, A, E, L, V, z, G;
15551
15555
  const { uiSchema: t, fieldSchema: n, collectionField: o } = e, { form: r } = useFormBlockContext(), { getInterface: a, getCollection: i } = useCollectionManager_deprecated(), l = useField(), { t: c } = useTranslation(), u = useFieldSchema(), { dn: d } = useDesignable(), p = ((N = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : N.fieldNames) || ((M = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : M.fieldNames), m = useLabelFields$1((j = o == null ? void 0 : o.target) != null ? j : o == null ? void 0 : o.targetCollection), h = useColorFields((R = o == null ? void 0 : o.target) != null ? R : o == null ? void 0 : o.targetCollection), g = a(o == null ? void 0 : o.interface), f = i(o == null ? void 0 : o.target), C = isFileCollection$2(f), b = ["QuickEdit", "FormItem"].includes(n["x-decorator"]), { currentMode: S } = useAssociationFieldContext(), { isAllowToSetDefaultValue: y } = useIsAllowToSetDefaultValue({ collectionField: o, fieldSchema: n }), v = ["datetime", "createdAt", "updatedAt"].includes(o == null ? void 0 : o.interface), I = ["obo", "oho", "o2o", "o2m", "m2m", "m2o", "snapshot"].includes(
15552
15556
  o == null ? void 0 : o.interface
15553
15557
  ), F = useFieldModeOptions({ fieldSchema: n }), w = ((O = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : O.mode) || "Select";
@@ -15590,7 +15594,7 @@ const useGetFilterOptions = () => {
15590
15594
  SchemaSettingsDataScope,
15591
15595
  {
15592
15596
  collectionName: o == null ? void 0 : o.target,
15593
- defaultFilter: ((z = (E = (A = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : A.service) == null ? void 0 : E.params) == null ? void 0 : z.filter) || {},
15597
+ defaultFilter: ((L = (E = (A = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : A.service) == null ? void 0 : E.params) == null ? void 0 : L.filter) || {},
15594
15598
  form: r,
15595
15599
  onSubmit: ({ filter: H }) => {
15596
15600
  var K, Y;
@@ -15659,7 +15663,7 @@ const useGetFilterOptions = () => {
15659
15663
  SchemaSettingsSwitchItem,
15660
15664
  {
15661
15665
  title: c("Enable link"),
15662
- checked: ((L = n["x-component-props"]) == null ? void 0 : L.enableLink) !== !1,
15666
+ checked: ((z = n["x-component-props"]) == null ? void 0 : z.enableLink) !== !1,
15663
15667
  onChange: (H) => {
15664
15668
  n["x-component-props"] = P(x({}, n == null ? void 0 : n["x-component-props"]), {
15665
15669
  enableLink: H
@@ -18213,7 +18217,7 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
18213
18217
  ), { render: O, exists: $ } = useSchemaInitializerRender(
18214
18218
  o || (t == null ? void 0 : t["x-initializer"]),
18215
18219
  t == null ? void 0 : t["x-initializer-props"]
18216
- ), A = useGridRowContext(), E = useGridContext(), z = useMemo(() => {
18220
+ ), A = useGridRowContext(), E = useGridContext(), L = useMemo(() => {
18217
18221
  var X;
18218
18222
  return {
18219
18223
  insertPosition: "afterEnd",
@@ -18227,15 +18231,15 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
18227
18231
  })
18228
18232
  )
18229
18233
  };
18230
- }, [v, (Y = A == null ? void 0 : A.cols) == null ? void 0 : Y.length]), V = useMemo(() => u === !1 || C === !1 ? null : /* @__PURE__ */ jsx(DragHandler, { children: /* @__PURE__ */ jsx(DragOutlined, { role: "button", "aria-label": v("drag-handler") }) }), [u, v, C]), L = useMemo(() => {
18234
+ }, [v, (Y = A == null ? void 0 : A.cols) == null ? void 0 : Y.length]), V = useMemo(() => u === !1 || C === !1 ? null : /* @__PURE__ */ jsx(DragHandler, { children: /* @__PURE__ */ jsx(DragOutlined, { role: "button", "aria-label": v("drag-handler") }) }), [u, v, C]), z = useMemo(() => {
18231
18235
  var X;
18232
18236
  if (o === !1)
18233
18237
  return null;
18234
18238
  if ($)
18235
- return O(z);
18239
+ return O(L);
18236
18240
  if (E != null && E.InitializerComponent || E != null && E.renderSchemaInitializer)
18237
- return E != null && E.InitializerComponent ? /* @__PURE__ */ jsx(E.InitializerComponent, x({}, z)) : (X = E.renderSchemaInitializer) == null ? void 0 : X.call(E, z);
18238
- }, [E, o, z, $, O]), G = useMemo(() => r !== !1 && R ? j() : null, [R, j, r]), H = useRef(null), U = "hidden";
18241
+ return E != null && E.InitializerComponent ? /* @__PURE__ */ jsx(E.InitializerComponent, x({}, L)) : (X = E.renderSchemaInitializer) == null ? void 0 : X.call(E, L);
18242
+ }, [E, o, L, $, O]), G = useMemo(() => r !== !1 && R ? j() : null, [R, j, r]), H = useRef(null), U = "hidden";
18239
18243
  useEffect(() => {
18240
18244
  const X = H.current;
18241
18245
  let J = X == null ? void 0 : X.parentElement;
@@ -18276,7 +18280,7 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
18276
18280
  ] }) }),
18277
18281
  /* @__PURE__ */ jsx("div", { className: cls("toolbar-icons", i), style: l, children: /* @__PURE__ */ jsxs(Space$1, { size: 3, align: "center", className: d, style: p, children: [
18278
18282
  V,
18279
- /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: N, children: L }),
18283
+ /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: N, children: z }),
18280
18284
  G
18281
18285
  ] }) })
18282
18286
  ]
@@ -18992,9 +18996,9 @@ const useTableBlockProps = () => {
18992
18996
  ),
18993
18997
  onChange: useCallback(
18994
18998
  ({ current: S, pageSize: y }, v, I) => {
18995
- var B, N, M, j, R, O, $, A, E, z;
18999
+ var B, N, M, j, R, O, $, A, E, L;
18996
19000
  const F = (M = (N = (B = t.parent) == null ? void 0 : B["x-decorator-props"]) == null ? void 0 : N.params) == null ? void 0 : M.sort, w = I.order ? I.order === "ascend" ? [I.field] : [`-${I.field}`] : F || a.dragSortBy, T = y || ((O = (R = (j = t.parent) == null ? void 0 : j["x-decorator-props"]) == null ? void 0 : R.params) == null ? void 0 : O.pageSize), D = P(x({}, (E = (A = ($ = i.current) == null ? void 0 : $.service) == null ? void 0 : A.params) == null ? void 0 : E[0]), { page: S || 1, pageSize: T });
18997
- w && (D.sort = w), (z = i.current) == null || z.service.run(D);
19001
+ w && (D.sort = w), (L = i.current) == null || L.service.run(D);
18998
19002
  },
18999
19003
  [t.parent]
19000
19004
  ),
@@ -19007,13 +19011,13 @@ const useTableBlockProps = () => {
19007
19011
  }
19008
19012
  const T = w.find((D) => D.uid === t.parent["x-uid"]);
19009
19013
  w.forEach((D) => {
19010
- var $, A, E, z;
19014
+ var $, A, E, L;
19011
19015
  const B = I.find((V) => V.uid === D.uid);
19012
19016
  if (!B)
19013
19017
  return;
19014
19018
  const N = getSourceKey(T, B.field) || a.rowKey || "id", M = [S[N]], j = (($ = D.service.params) == null ? void 0 : $[0]) || {}, R = ((E = (A = D.service.params) == null ? void 0 : A[1]) == null ? void 0 : E.filters) || {};
19015
19019
  if (v.includes(S[a.rowKey])) {
19016
- if ((z = D.clearSelection) == null || z.call(D), D.dataLoadingMode === "manual")
19020
+ if ((L = D.clearSelection) == null || L.call(D), D.dataLoadingMode === "manual")
19017
19021
  return D.clearData();
19018
19022
  delete R[F];
19019
19023
  } else
@@ -19390,10 +19394,10 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
19390
19394
  var i, l, c, u, d, p, m, h, g, f, C, b, S, y, v, I;
19391
19395
  const e = useField(), t = useTableSelectorContext(), n = useFieldSchema(), { getCollectionJoinField: o } = useCollectionManager_deprecated(), r = recursiveParent(n, "CollectionField"), a = o(r == null ? void 0 : r["x-collection-field"]);
19392
19396
  return useEffect(() => {
19393
- var w, T, D, B, N, M, j, R, O, $, A, E, z;
19397
+ var w, T, D, B, N, M, j, R, O, $, A, E, L;
19394
19398
  if (!((w = t == null ? void 0 : t.service) != null && w.loading)) {
19395
- const V = (D = (T = t == null ? void 0 : t.service) == null ? void 0 : T.data) == null ? void 0 : D.data.map((L) => L);
19396
- e.value = V, (B = e == null ? void 0 : e.setInitialValue) == null || B.call(e, V), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (j = (M = (N = t == null ? void 0 : t.service) == null ? void 0 : N.data) == null ? void 0 : M.meta) == null ? void 0 : j.pageSize, e.componentProps.pagination.total = ($ = (O = (R = t == null ? void 0 : t.service) == null ? void 0 : R.data) == null ? void 0 : O.meta) == null ? void 0 : $.count, e.componentProps.pagination.current = (z = (E = (A = t == null ? void 0 : t.service) == null ? void 0 : A.data) == null ? void 0 : E.meta) == null ? void 0 : z.page;
19399
+ const V = (D = (T = t == null ? void 0 : t.service) == null ? void 0 : T.data) == null ? void 0 : D.data.map((z) => z);
19400
+ e.value = V, (B = e == null ? void 0 : e.setInitialValue) == null || B.call(e, V), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (j = (M = (N = t == null ? void 0 : t.service) == null ? void 0 : N.data) == null ? void 0 : M.meta) == null ? void 0 : j.pageSize, e.componentProps.pagination.total = ($ = (O = (R = t == null ? void 0 : t.service) == null ? void 0 : R.data) == null ? void 0 : O.meta) == null ? void 0 : $.count, e.componentProps.pagination.current = (L = (E = (A = t == null ? void 0 : t.service) == null ? void 0 : A.data) == null ? void 0 : E.meta) == null ? void 0 : L.page;
19397
19401
  }
19398
19402
  }, [
19399
19403
  a == null ? void 0 : a.foreignKey,
@@ -22177,7 +22181,7 @@ const SchemaSettingsModalItem = (e) => {
22177
22181
  "noRecord",
22178
22182
  "ModalContextProvider",
22179
22183
  "dialogRootClassName"
22180
- ]), g = useContext(SchemaOptionsContext), f = useCollection(), C = useAPIClient(), b = useApp(), { theme: S } = useGlobalTheme(), y = useBlockRequestContext(), v = useFormActiveFields(), { locale: I } = useContext(ConfigProvider.ConfigContext), F = useDataSourceManager(), w = useDataSourceKey(), T = useCollectionRecord(), { association: D } = useDataBlockProps() || {}, B = useCurrentRecord(), N = useFormBlockContext(), M = useBlockContext(), { getOperators: j } = useOperators(), R = useLocationSearch(), O = useVariables$1(), $ = useContext(AllDataBlocksContext), A = useContext(SchemaComponentContext), E = useContext(VariableScopeContext$1), { formValue: z, collection: V, parent: L } = useSubFormValue(), G = useCurrentPopupRecord(), H = useParentPopupRecord();
22184
+ ]), g = useContext(SchemaOptionsContext), f = useCollection(), C = useAPIClient(), b = useApp(), { theme: S } = useGlobalTheme(), y = useBlockRequestContext(), v = useFormActiveFields(), { locale: I } = useContext(ConfigProvider.ConfigContext), F = useDataSourceManager(), w = useDataSourceKey(), T = useCollectionRecord(), { association: D } = useDataBlockProps() || {}, B = useCurrentRecord(), N = useFormBlockContext(), M = useBlockContext(), { getOperators: j } = useOperators(), R = useLocationSearch(), O = useVariables$1(), $ = useContext(AllDataBlocksContext), A = useContext(SchemaComponentContext), E = useContext(VariableScopeContext$1), { formValue: L, collection: V, parent: z } = useSubFormValue(), G = useCurrentPopupRecord(), H = useParentPopupRecord();
22181
22185
  return t ? null : /* @__PURE__ */ jsx(
22182
22186
  SchemaSettingsItem,
22183
22187
  P(x({
@@ -22199,7 +22203,7 @@ const SchemaSettingsModalItem = (e) => {
22199
22203
  children: /* @__PURE__ */ jsx(CollectionRecordProvider, { record: d ? null : T, children: /* @__PURE__ */ jsx(CurrentRecordContextProvider, P(x({}, B), { children: /* @__PURE__ */ jsx(FormBlockContext$1.Provider, { value: N, children: /* @__PURE__ */ jsx(
22200
22204
  SubFormProvider,
22201
22205
  {
22202
- value: { value: z, collection: V, parent: L },
22206
+ value: { value: L, collection: V, parent: z },
22203
22207
  children: /* @__PURE__ */ jsx(
22204
22208
  FormActiveFieldsProvider,
22205
22209
  {
@@ -22401,13 +22405,13 @@ const SchemaSettingsModalItem = (e) => {
22401
22405
  (O) => {
22402
22406
  var V;
22403
22407
  const $ = [];
22404
- for (const L of O.fieldReaction.rules)
22405
- $.push(_.omit(_.pickBy(L, _.identity), ["conditionBasic", "conditionAdvanced"]));
22406
- const A = y["x-component"] === "BlockTemplate" && ((V = y["x-component-props"]) == null ? void 0 : V.templateId), z = {
22408
+ for (const z of O.fieldReaction.rules)
22409
+ $.push(_.omit(_.pickBy(z, _.identity), ["conditionBasic", "conditionAdvanced"]));
22410
+ const A = y["x-component"] === "BlockTemplate" && ((V = y["x-component-props"]) == null ? void 0 : V.templateId), L = {
22407
22411
  "x-uid": b !== LinkageRuleCategory.block ? A && m(A).uid || y["x-uid"] : c["x-uid"]
22408
22412
  };
22409
- y[w] = $, z[w] = $, c[w] = $, d.emit("patch", {
22410
- schema: z
22413
+ y[w] = $, L[w] = $, c[w] = $, d.emit("patch", {
22414
+ schema: L
22411
22415
  }), d.refresh(), a == null || a();
22412
22416
  },
22413
22417
  [d, m, y, w, a, b]
@@ -23553,7 +23557,7 @@ function Input$1(e) {
23553
23557
  useAntdInputStyle(`${y}-input`);
23554
23558
  const v = useCompile(), { t: I } = useTranslation(), F = useForm(), [w, T] = React.useState([]), [D, B] = React.useState([]), [N, M] = React.useState(
23555
23559
  m || !!(o && t != null)
23556
- ), [j, R] = React.useState(null), O = useMemo(() => parseValue(t, p), [p, t]), $ = typeof O == "string", A = $ ? O : "", E = $ ? null : O, z = Object.assign(
23560
+ ), [j, R] = React.useState(null), O = useMemo(() => parseValue(t, p), [p, t]), $ = typeof O == "string", A = $ ? O : "", E = $ ? null : O, L = Object.assign(
23557
23561
  {
23558
23562
  label: "label",
23559
23563
  value: "value",
@@ -23563,9 +23567,9 @@ function Input$1(e) {
23563
23567
  ), V = useMemo(() => h ? o ? {
23564
23568
  value: "$",
23565
23569
  label: I("Constant"),
23566
- [z.value]: "$",
23567
- [z.label]: I("Constant")
23568
- } : a ? getTypedConstantOption(A, a, z) : null : null, [A, a]), L = (ne = V == null ? void 0 : V.component) != null ? ne : NullComponent, G = Array.isArray(a) ? (re = (ee = a.find((se) => Array.isArray(se) && se[0] === A)) == null ? void 0 : ee[1]) != null ? re : {} : {};
23570
+ [L.value]: "$",
23571
+ [L.label]: I("Constant")
23572
+ } : a ? getTypedConstantOption(A, a, L) : null : null, [A, a]), z = (ne = V == null ? void 0 : V.component) != null ? ne : NullComponent, G = Array.isArray(a) ? (re = (ee = a.find((se) => Array.isArray(se) && se[0] === A)) == null ? void 0 : ee[1]) != null ? re : {} : {};
23569
23573
  let H;
23570
23574
  t == null ? i ? o && N ? H = ["$"] : H = [""] : o ? H = ["$"] : H = [" ", A] : H = o ? ["$"] : [" ", A], m && (H = ["$"]), useEffect(() => {
23571
23575
  const pe = V != null ? V : {}, { component: se } = pe, ae = W(pe, ["component"]), ue = [
@@ -23573,24 +23577,24 @@ function Input$1(e) {
23573
23577
  {
23574
23578
  value: "",
23575
23579
  label: I("Null"),
23576
- [z.value]: "",
23577
- [z.label]: I("Null")
23580
+ [L.value]: "",
23581
+ [L.label]: I("Null")
23578
23582
  }
23579
23583
  ] : [],
23580
23584
  ...V ? [v(ae)] : [],
23581
23585
  ...f ? [...f] : []
23582
- ].filter((ce) => !ce.deprecated || (E == null ? void 0 : E[0]) === ce[z.value]);
23586
+ ].filter((ce) => !ce.deprecated || (E == null ? void 0 : E[0]) === ce[L.value]);
23583
23587
  T(ue);
23584
23588
  }, [f, E, V, i]);
23585
23589
  const U = (se) => q(this, null, function* () {
23586
23590
  var ue;
23587
23591
  const ae = se[se.length - 1];
23588
23592
  if (!((ue = ae.children) != null && ue.length) && !ae.isLeaf && ae.loadChildren) {
23589
- se.length && R(se.map((ce) => ce == null ? void 0 : ce[z.value]));
23593
+ se.length && R(se.map((ce) => ce == null ? void 0 : ce[L.value]));
23590
23594
  let pe;
23591
23595
  if (E && E.length >= 2) {
23592
23596
  for (const ce of E)
23593
- if (ce === ae[z.value]) {
23597
+ if (ce === ae[L.value]) {
23594
23598
  pe = ce;
23595
23599
  break;
23596
23600
  }
@@ -23636,9 +23640,9 @@ function Input$1(e) {
23636
23640
  for (let ce = 0; ce < E.length; ce++) {
23637
23641
  const ge = E[ce];
23638
23642
  try {
23639
- if (ce === 0 ? ae = w.find((he) => he[z.value] === ge) : (ae.loadChildren && !((pe = ae.children) != null && pe.length) && (yield ae.loadChildren(ae, ge, E)), ae = ae.children.find((he) => he[z.value] === ge)), !ae)
23643
+ if (ce === 0 ? ae = w.find((he) => he[L.value] === ge) : (ae.loadChildren && !((pe = ae.children) != null && pe.length) && (yield ae.loadChildren(ae, ge, E)), ae = ae.children.find((he) => he[L.value] === ge)), !ae)
23640
23644
  return;
23641
- ue.push(ae[z.label]);
23645
+ ue.push(ae[L.label]);
23642
23646
  } catch (he) {
23643
23647
  error(he);
23644
23648
  }
@@ -23707,8 +23711,8 @@ function Input$1(e) {
23707
23711
  )
23708
23712
  ]
23709
23713
  }
23710
- ) : /* @__PURE__ */ jsx("div", { style: { flex: 1 }, children: o && (N || !i) ? o : L ? /* @__PURE__ */ jsx(
23711
- L,
23714
+ ) : /* @__PURE__ */ jsx("div", { style: { flex: 1 }, children: o && (N || !i) ? o : z ? /* @__PURE__ */ jsx(
23715
+ z,
23712
23716
  P(x({
23713
23717
  role: "button",
23714
23718
  "aria-label": "variable-constant"
@@ -24023,23 +24027,23 @@ function TextArea(e) {
24023
24027
  ), [S, y] = useState(!1), [v, I] = useState(!1), [F, w] = useState(() => renderHTML(p != null ? p : "", b, c)), [T, D] = useState([-1, 0, -1, 0]);
24024
24028
  useAntdInputStyle("ant-input");
24025
24029
  const { token: B } = theme.useToken(), N = c.join(" "), M = useCallback(
24026
- (L) => {
24030
+ (z) => {
24027
24031
  var H;
24028
- const G = getValue(L, c);
24032
+ const G = getValue(z, c);
24029
24033
  (H = e.onChange) == null || H.call(e, d ? G.trim() : G);
24030
24034
  },
24031
24035
  [N, e.onChange, d]
24032
24036
  );
24033
24037
  useEffect(() => {
24034
- preloadOptions(r, m).then((L) => {
24035
- f(L);
24038
+ preloadOptions(r, m).then((z) => {
24039
+ f(z);
24036
24040
  }).catch(console.error);
24037
24041
  }, [r, JSON.stringify(m)]), useEffect(() => {
24038
24042
  w(renderHTML(p != null ? p : "", b, c)), v || D([-1, 0, -1, 0]);
24039
24043
  }, [p, b, N]), useEffect(() => {
24040
24044
  var H;
24041
- const { current: L } = h;
24042
- if (!L)
24045
+ const { current: z } = h;
24046
+ if (!z)
24043
24047
  return;
24044
24048
  const G = new Range();
24045
24049
  if (v) {
@@ -24048,22 +24052,22 @@ function TextArea(e) {
24048
24052
  const U = (H = window.getSelection) == null ? void 0 : H.call(window);
24049
24053
  if (U)
24050
24054
  try {
24051
- const K = Array.from(L.childNodes);
24055
+ const K = Array.from(z.childNodes);
24052
24056
  K.length && (T[0] === -1 ? T[1] && G.setStartAfter(K[T[1] - 1]) : G.setStart(K[T[0]], T[1]), T[2] === -1 ? T[3] && G.setEndAfter(K[T[3] - 1]) : G.setEnd(K[T[2]], T[3])), G.collapse(!0), U.removeAllRanges(), U.addRange(G);
24053
24057
  } catch (K) {
24054
24058
  }
24055
24059
  } else {
24056
- const { lastChild: U } = L;
24060
+ const { lastChild: U } = z;
24057
24061
  if (U) {
24058
24062
  G.setStartAfter(U), G.setEndAfter(U);
24059
- const K = Array.from(L.childNodes), Y = G.startContainer === L ? -1 : K.indexOf(U), X = G.startContainer === L ? -1 : K.indexOf(U);
24063
+ const K = Array.from(z.childNodes), Y = G.startContainer === z ? -1 : K.indexOf(U), X = G.startContainer === z ? -1 : K.indexOf(U);
24060
24064
  D([Y, G.startOffset, X, G.endOffset]);
24061
24065
  }
24062
24066
  }
24063
24067
  }, [F]);
24064
24068
  const j = useCallback(
24065
- function(L) {
24066
- const G = L.filter((K) => !!K.trim()), { current: H } = h;
24069
+ function(z) {
24070
+ const G = z.filter((K) => !!K.trim()), { current: H } = h;
24067
24071
  if (!H || !G)
24068
24072
  return;
24069
24073
  H.focus();
@@ -24074,25 +24078,25 @@ function TextArea(e) {
24074
24078
  },
24075
24079
  [b, M, T]
24076
24080
  ), R = useCallback(
24077
- function({ currentTarget: L }) {
24078
- S || (I(!0), D(getCurrentRange(L)), M(L));
24081
+ function({ currentTarget: z }) {
24082
+ S || (I(!0), D(getCurrentRange(z)), M(z));
24079
24083
  },
24080
24084
  [S, M]
24081
- ), O = useCallback(function({ currentTarget: L }) {
24082
- D(getCurrentRange(L));
24083
- }, []), $ = useCallback(function(L) {
24084
- L.key === "Enter" && L.preventDefault();
24085
+ ), O = useCallback(function({ currentTarget: z }) {
24086
+ D(getCurrentRange(z));
24087
+ }, []), $ = useCallback(function(z) {
24088
+ z.key === "Enter" && z.preventDefault();
24085
24089
  }, []), A = useCallback(function() {
24086
24090
  y(!0);
24087
24091
  }, []), E = useCallback(
24088
- ({ currentTarget: L }) => {
24089
- y(!1), I(!0), D(getCurrentRange(L)), M(L);
24092
+ ({ currentTarget: z }) => {
24093
+ y(!1), I(!0), D(getCurrentRange(z)), M(z);
24090
24094
  },
24091
24095
  [M]
24092
- ), z = useCallback(
24093
- function(L) {
24094
- L.preventDefault();
24095
- const G = L.clipboardData.getData("text/html") || L.clipboardData.getData("text"), H = sanitizeHTML(G, {
24096
+ ), L = useCallback(
24097
+ function(z) {
24098
+ z.preventDefault();
24099
+ const G = z.clipboardData.getData("text/html") || z.clipboardData.getData("text"), H = sanitizeHTML(G, {
24096
24100
  allowedTags: ["span"],
24097
24101
  allowedAttributes: {
24098
24102
  span: ["data-variable", "contenteditable"]
@@ -24109,7 +24113,7 @@ function TextArea(e) {
24109
24113
  }
24110
24114
  }
24111
24115
  }).replace(/\n/g, " ");
24112
- I(!0), pasteHTML(L.currentTarget, H), D(getCurrentRange(L.currentTarget)), M(L.currentTarget);
24116
+ I(!0), pasteHTML(z.currentTarget, H), D(getCurrentRange(z.currentTarget)), M(z.currentTarget);
24113
24117
  },
24114
24118
  [M]
24115
24119
  ), V = e.disabled || C.disabled;
@@ -24164,7 +24168,7 @@ function TextArea(e) {
24164
24168
  onInput: R,
24165
24169
  onBlur: O,
24166
24170
  onKeyDown: $,
24167
- onPaste: z,
24171
+ onPaste: L,
24168
24172
  onCompositionStart: A,
24169
24173
  onCompositionEnd: E,
24170
24174
  placeholder: e.placeholder,
@@ -27162,26 +27166,26 @@ https://requirejs.org/docs/errors.html#` + e);
27162
27166
  config: {}
27163
27167
  }, l = {}, c = {}, u = {}, d = [], p = {}, m = {}, h = {}, g = 1, f = 1;
27164
27168
  function C(A) {
27165
- var E, z;
27169
+ var E, L;
27166
27170
  for (E = 0; E < A.length; E++)
27167
- if (z = A[E], z === ".")
27171
+ if (L = A[E], L === ".")
27168
27172
  A.splice(E, 1), E -= 1;
27169
- else if (z === "..") {
27173
+ else if (L === "..") {
27170
27174
  if (E === 0 || E === 1 && A[2] === ".." || A[E - 1] === "..")
27171
27175
  continue;
27172
27176
  E > 0 && (A.splice(E - 1, 2), E -= 2);
27173
27177
  }
27174
27178
  }
27175
- function b(A, E, z) {
27176
- var V, L, G, H, U, K, Y, X, J, Z, Q, ne, ee = E && E.split("/"), re = i.map, de = re && re["*"];
27177
- if (A && (A = A.split("/"), Y = A.length - 1, i.nodeIdCompat && jsSuffixRegExp.test(A[Y]) && (A[Y] = A[Y].replace(jsSuffixRegExp, "")), A[0].charAt(0) === "." && ee && (ne = ee.slice(0, ee.length - 1), A = ne.concat(A)), C(A), A = A.join("/")), z && re && (ee || de)) {
27179
+ function b(A, E, L) {
27180
+ var V, z, G, H, U, K, Y, X, J, Z, Q, ne, ee = E && E.split("/"), re = i.map, de = re && re["*"];
27181
+ if (A && (A = A.split("/"), Y = A.length - 1, i.nodeIdCompat && jsSuffixRegExp.test(A[Y]) && (A[Y] = A[Y].replace(jsSuffixRegExp, "")), A[0].charAt(0) === "." && ee && (ne = ee.slice(0, ee.length - 1), A = ne.concat(A)), C(A), A = A.join("/")), L && re && (ee || de)) {
27178
27182
  G = A.split("/");
27179
27183
  e:
27180
27184
  for (H = G.length; H > 0; H -= 1) {
27181
27185
  if (K = G.slice(0, H).join("/"), ee) {
27182
27186
  for (U = ee.length; U > 0; U -= 1)
27183
- if (L = getOwn(re, ee.slice(0, U).join("/")), L && (L = getOwn(L, K), L)) {
27184
- X = L, J = H;
27187
+ if (z = getOwn(re, ee.slice(0, U).join("/")), z && (z = getOwn(z, K), z)) {
27188
+ X = z, J = H;
27185
27189
  break e;
27186
27190
  }
27187
27191
  }
@@ -27205,36 +27209,36 @@ https://requirejs.org/docs/errors.html#` + e);
27205
27209
  })([A]), !0;
27206
27210
  }
27207
27211
  function v(A) {
27208
- var E, z = A ? A.indexOf("!") : -1;
27209
- return z > -1 && (E = A.substring(0, z), A = A.substring(z + 1, A.length)), [E, A];
27212
+ var E, L = A ? A.indexOf("!") : -1;
27213
+ return L > -1 && (E = A.substring(0, L), A = A.substring(L + 1, A.length)), [E, A];
27210
27214
  }
27211
- function I(A, E, z, V) {
27212
- var L, G, H, U, K = null, Y = E ? E.name : null, X = A, J = !0, Z = "";
27213
- return A || (J = !1, A = "_@r" + (g += 1)), U = v(A), K = U[0], A = U[1], K && (K = b(K, Y, V), G = getOwn(p, K)), A && (K ? z ? Z = A : G && G.normalize ? Z = G.normalize(A, function(Q) {
27215
+ function I(A, E, L, V) {
27216
+ var z, G, H, U, K = null, Y = E ? E.name : null, X = A, J = !0, Z = "";
27217
+ return A || (J = !1, A = "_@r" + (g += 1)), U = v(A), K = U[0], A = U[1], K && (K = b(K, Y, V), G = getOwn(p, K)), A && (K ? L ? Z = A : G && G.normalize ? Z = G.normalize(A, function(Q) {
27214
27218
  return b(Q, Y, V);
27215
- }) : Z = A.indexOf("!") === -1 ? b(A, Y, V) : A : (Z = b(A, Y, V), U = v(Z), K = U[0], Z = U[1], z = !0, L = o.nameToUrl(Z))), H = K && !G && !z ? "_unnormalized" + (f += 1) : "", {
27219
+ }) : Z = A.indexOf("!") === -1 ? b(A, Y, V) : A : (Z = b(A, Y, V), U = v(Z), K = U[0], Z = U[1], L = !0, z = o.nameToUrl(Z))), H = K && !G && !L ? "_unnormalized" + (f += 1) : "", {
27216
27220
  prefix: K,
27217
27221
  name: Z,
27218
27222
  parentMap: E,
27219
27223
  unnormalized: !!H,
27220
- url: L,
27224
+ url: z,
27221
27225
  originalName: X,
27222
27226
  isDefine: J,
27223
27227
  id: (K ? K + "!" + Z : Z) + H
27224
27228
  };
27225
27229
  }
27226
27230
  function F(A) {
27227
- var E = A.id, z = getOwn(l, E);
27228
- return z || (z = l[E] = new o.Module(A)), z;
27231
+ var E = A.id, L = getOwn(l, E);
27232
+ return L || (L = l[E] = new o.Module(A)), L;
27229
27233
  }
27230
- function w(A, E, z) {
27231
- var V = A.id, L = getOwn(l, V);
27232
- hasProp(p, V) && (!L || L.defineEmitComplete) ? E === "defined" && z(p[V]) : (L = F(A), L.error && E === "error" ? z(L.error) : L.on(E, z));
27234
+ function w(A, E, L) {
27235
+ var V = A.id, z = getOwn(l, V);
27236
+ hasProp(p, V) && (!z || z.defineEmitComplete) ? E === "defined" && L(p[V]) : (z = F(A), z.error && E === "error" ? L(z.error) : z.on(E, L));
27233
27237
  }
27234
27238
  function T(A, E) {
27235
- var z = A.requireModules, V = !1;
27236
- E ? E(A) : (each(z, function(L) {
27237
- var G = getOwn(l, L);
27239
+ var L = A.requireModules, V = !1;
27240
+ E ? E(A) : (each(L, function(z) {
27241
+ var G = getOwn(l, z);
27238
27242
  G && (G.error = A, G.events.error && (V = !0, G.emit("error", A)));
27239
27243
  }), V || req.onError(A));
27240
27244
  }
@@ -27266,26 +27270,26 @@ https://requirejs.org/docs/errors.html#` + e);
27266
27270
  function B(A) {
27267
27271
  delete l[A], delete c[A];
27268
27272
  }
27269
- function N(A, E, z) {
27273
+ function N(A, E, L) {
27270
27274
  var V = A.map.id;
27271
- A.error ? A.emit("error", A.error) : (E[V] = !0, each(A.depMaps, function(L, G) {
27272
- var H = L.id, U = getOwn(l, H);
27273
- U && !A.depMatched[G] && !z[H] && (getOwn(E, H) ? (A.defineDep(G, p[H]), A.check()) : N(U, E, z));
27274
- }), z[V] = !0);
27275
+ A.error ? A.emit("error", A.error) : (E[V] = !0, each(A.depMaps, function(z, G) {
27276
+ var H = z.id, U = getOwn(l, H);
27277
+ U && !A.depMatched[G] && !L[H] && (getOwn(E, H) ? (A.defineDep(G, p[H]), A.check()) : N(U, E, L));
27278
+ }), L[V] = !0);
27275
27279
  }
27276
27280
  function M() {
27277
- var A, E, z = i.waitSeconds * 1e3, V = z && o.startTime + z < (/* @__PURE__ */ new Date()).getTime(), L = [], G = [], H = !1, U = !0;
27281
+ var A, E, L = i.waitSeconds * 1e3, V = L && o.startTime + L < (/* @__PURE__ */ new Date()).getTime(), z = [], G = [], H = !1, U = !0;
27278
27282
  if (!t) {
27279
27283
  if (t = !0, eachProp(c, function(K) {
27280
27284
  var Y = K.map, X = Y.id;
27281
27285
  if (K.enabled && (Y.isDefine || G.push(K), !K.error)) {
27282
27286
  if (!K.inited && V)
27283
- y(X) ? (E = !0, H = !0) : (L.push(X), S(X));
27287
+ y(X) ? (E = !0, H = !0) : (z.push(X), S(X));
27284
27288
  else if (!K.inited && K.fetched && Y.isDefine && (H = !0, !Y.prefix))
27285
27289
  return U = !1;
27286
27290
  }
27287
- }), V && L.length)
27288
- return A = makeError("timeout", "Load timeout for modules: " + L, null, L), A.contextName = o.contextName, T(A);
27291
+ }), V && z.length)
27292
+ return A = makeError("timeout", "Load timeout for modules: " + z, null, z), A.contextName = o.contextName, T(A);
27289
27293
  U && each(G, function(K) {
27290
27294
  N(K, {}, {});
27291
27295
  }), (!V || E) && H && (isBrowser || isWebWorker) && !a && (a = setTimeout(function() {
@@ -27296,10 +27300,10 @@ https://requirejs.org/docs/errors.html#` + e);
27296
27300
  n = function(A) {
27297
27301
  this.events = getOwn(u, A.id) || {}, this.map = A, this.shim = getOwn(i.shim, A.id), this.depExports = [], this.depMaps = [], this.depMatched = [], this.pluginMaps = {}, this.depCount = 0;
27298
27302
  }, n.prototype = {
27299
- init: function(A, E, z, V) {
27300
- V = V || {}, !this.inited && (this.factory = E, z ? this.on("error", z) : this.events.error && (z = bind(this, function(L) {
27301
- this.emit("error", L);
27302
- })), this.depMaps = A && A.slice(0), this.errback = z, this.inited = !0, this.ignore = V.ignore, V.enabled || this.enabled ? this.enable() : this.check());
27303
+ init: function(A, E, L, V) {
27304
+ V = V || {}, !this.inited && (this.factory = E, L ? this.on("error", L) : this.events.error && (L = bind(this, function(z) {
27305
+ this.emit("error", z);
27306
+ })), this.depMaps = A && A.slice(0), this.errback = L, this.inited = !0, this.ignore = V.ignore, V.enabled || this.enabled ? this.enable() : this.check());
27303
27307
  },
27304
27308
  defineDep: function(A, E) {
27305
27309
  this.depMatched[A] || (this.depMatched[A] = !0, this.depCount -= 1, this.depExports[A] = E);
@@ -27328,9 +27332,9 @@ https://requirejs.org/docs/errors.html#` + e);
27328
27332
  */
27329
27333
  check: function() {
27330
27334
  if (!(!this.enabled || this.enabling)) {
27331
- var A, E, z = this.map.id, V = this.depExports, L = this.exports, G = this.factory;
27335
+ var A, E, L = this.map.id, V = this.depExports, z = this.exports, G = this.factory;
27332
27336
  if (!this.inited)
27333
- hasProp(o.defQueueMap, z) || this.fetch();
27337
+ hasProp(o.defQueueMap, L) || this.fetch();
27334
27338
  else if (this.error)
27335
27339
  this.emit("error", this.error);
27336
27340
  else if (!this.defining) {
@@ -27338,32 +27342,32 @@ https://requirejs.org/docs/errors.html#` + e);
27338
27342
  if (isFunction(G)) {
27339
27343
  if (this.events.error && this.map.isDefine || req.onError !== defaultOnError)
27340
27344
  try {
27341
- L = o.execCb(z, G, V, L);
27345
+ z = o.execCb(L, G, V, z);
27342
27346
  } catch (U) {
27343
27347
  A = U;
27344
27348
  }
27345
27349
  else
27346
- L = o.execCb(z, G, V, L);
27347
- if (this.map.isDefine && L === void 0 && (E = this.module, E ? L = E.exports : this.usingExports && (L = this.exports)), A)
27350
+ z = o.execCb(L, G, V, z);
27351
+ if (this.map.isDefine && z === void 0 && (E = this.module, E ? z = E.exports : this.usingExports && (z = this.exports)), A)
27348
27352
  return A.requireMap = this.map, A.requireModules = this.map.isDefine ? [this.map.id] : null, A.requireType = this.map.isDefine ? "define" : "require", T(this.error = A);
27349
27353
  } else
27350
- L = G;
27351
- if (this.exports = L, this.map.isDefine && !this.ignore && (p[z] = L, req.onResourceLoad)) {
27354
+ z = G;
27355
+ if (this.exports = z, this.map.isDefine && !this.ignore && (p[L] = z, req.onResourceLoad)) {
27352
27356
  var H = [];
27353
27357
  each(this.depMaps, function(U) {
27354
27358
  H.push(U.normalizedMap || U);
27355
27359
  }), req.onResourceLoad(o, this.map, H);
27356
27360
  }
27357
- B(z), this.defined = !0;
27361
+ B(L), this.defined = !0;
27358
27362
  }
27359
27363
  this.defining = !1, this.defined && !this.defineEmitted && (this.defineEmitted = !0, this.emit("defined", this.exports), this.defineEmitComplete = !0);
27360
27364
  }
27361
27365
  }
27362
27366
  },
27363
27367
  callPlugin: function() {
27364
- var A = this.map, E = A.id, z = I(A.prefix);
27365
- this.depMaps.push(z), w(z, "defined", bind(this, function(V) {
27366
- var L, G, H, U = getOwn(h, this.map.id), K = this.map.name, Y = this.map.parentMap ? this.map.parentMap.name : null, X = o.makeRequire(A.parentMap, {
27368
+ var A = this.map, E = A.id, L = I(A.prefix);
27369
+ this.depMaps.push(L), w(L, "defined", bind(this, function(V) {
27370
+ var z, G, H, U = getOwn(h, this.map.id), K = this.map.name, Y = this.map.parentMap ? this.map.parentMap.name : null, X = o.makeRequire(A.parentMap, {
27367
27371
  enableBuildCallback: !0
27368
27372
  });
27369
27373
  if (this.map.unnormalized) {
@@ -27393,17 +27397,17 @@ https://requirejs.org/docs/errors.html#` + e);
27393
27397
  this.map.url = o.nameToUrl(U), this.load();
27394
27398
  return;
27395
27399
  }
27396
- L = bind(this, function(J) {
27400
+ z = bind(this, function(J) {
27397
27401
  this.init([], function() {
27398
27402
  return J;
27399
27403
  }, null, {
27400
27404
  enabled: !0
27401
27405
  });
27402
- }), L.error = bind(this, function(J) {
27406
+ }), z.error = bind(this, function(J) {
27403
27407
  this.inited = !0, this.error = J, J.requireModules = [E], eachProp(l, function(Z) {
27404
27408
  Z.map.id.indexOf(E + "_unnormalized") === 0 && B(Z.map.id);
27405
27409
  }), T(J);
27406
- }), L.fromText = bind(this, function(J, Z) {
27410
+ }), z.fromText = bind(this, function(J, Z) {
27407
27411
  var Q = A.name, ne = I(Q), ee = useInteractive;
27408
27412
  Z && (J = Z), ee && (useInteractive = !1), F(ne), hasProp(i.config, E) && (i.config[Q] = i.config[E]);
27409
27413
  try {
@@ -27416,21 +27420,21 @@ https://requirejs.org/docs/errors.html#` + e);
27416
27420
  [E]
27417
27421
  ));
27418
27422
  }
27419
- ee && (useInteractive = !0), this.depMaps.push(ne), o.completeLoad(Q), X([Q], L);
27420
- }), V.load(A.name, X, L, i);
27421
- })), o.enable(z, this), this.pluginMaps[z.id] = z;
27423
+ ee && (useInteractive = !0), this.depMaps.push(ne), o.completeLoad(Q), X([Q], z);
27424
+ }), V.load(A.name, X, z, i);
27425
+ })), o.enable(L, this), this.pluginMaps[L.id] = L;
27422
27426
  },
27423
27427
  enable: function() {
27424
27428
  c[this.map.id] = this, this.enabled = !0, this.enabling = !0, each(this.depMaps, bind(this, function(A, E) {
27425
- var z, V, L;
27429
+ var L, V, z;
27426
27430
  if (typeof A == "string") {
27427
27431
  if (A = I(
27428
27432
  A,
27429
27433
  this.map.isDefine ? this.map : this.map.parentMap,
27430
27434
  !1,
27431
27435
  !this.skipMap
27432
- ), this.depMaps[E] = A, L = getOwn(r, A.id), L) {
27433
- this.depExports[E] = L(this);
27436
+ ), this.depMaps[E] = A, z = getOwn(r, A.id), z) {
27437
+ this.depExports[E] = z(this);
27434
27438
  return;
27435
27439
  }
27436
27440
  this.depCount += 1, w(A, "defined", bind(this, function(G) {
@@ -27439,27 +27443,27 @@ https://requirejs.org/docs/errors.html#` + e);
27439
27443
  this.emit("error", G);
27440
27444
  }));
27441
27445
  }
27442
- z = A.id, V = l[z], !hasProp(r, z) && V && !V.enabled && o.enable(A, this);
27446
+ L = A.id, V = l[L], !hasProp(r, L) && V && !V.enabled && o.enable(A, this);
27443
27447
  })), eachProp(this.pluginMaps, bind(this, function(A) {
27444
27448
  var E = getOwn(l, A.id);
27445
27449
  E && !E.enabled && o.enable(A, this);
27446
27450
  })), this.enabling = !1, this.check();
27447
27451
  },
27448
27452
  on: function(A, E) {
27449
- var z = this.events[A];
27450
- z || (z = this.events[A] = []), z.push(E);
27453
+ var L = this.events[A];
27454
+ L || (L = this.events[A] = []), L.push(E);
27451
27455
  },
27452
27456
  emit: function(A, E) {
27453
- each(this.events[A], function(z) {
27454
- z(E);
27457
+ each(this.events[A], function(L) {
27458
+ L(E);
27455
27459
  }), A === "error" && delete this.events[A];
27456
27460
  }
27457
27461
  };
27458
27462
  function j(A) {
27459
27463
  hasProp(p, A[0]) || F(I(A[0], null, !0)).init(A[1], A[2]);
27460
27464
  }
27461
- function R(A, E, z, V) {
27462
- A.detachEvent && !isOpera ? V && A.detachEvent(V, E) : A.removeEventListener(z, E, !1);
27465
+ function R(A, E, L, V) {
27466
+ A.detachEvent && !isOpera ? V && A.detachEvent(V, E) : A.removeEventListener(L, E, !1);
27463
27467
  }
27464
27468
  function O(A) {
27465
27469
  var E = A.currentTarget || A.srcElement;
@@ -27496,51 +27500,51 @@ https://requirejs.org/docs/errors.html#` + e);
27496
27500
  configure: function(A) {
27497
27501
  if (A.baseUrl && A.baseUrl.charAt(A.baseUrl.length - 1) !== "/" && (A.baseUrl += "/"), typeof A.urlArgs == "string") {
27498
27502
  var E = A.urlArgs;
27499
- A.urlArgs = function(L, G) {
27503
+ A.urlArgs = function(z, G) {
27500
27504
  return (G.indexOf("?") === -1 ? "?" : "&") + E;
27501
27505
  };
27502
27506
  }
27503
- var z = i.shim, V = {
27507
+ var L = i.shim, V = {
27504
27508
  paths: !0,
27505
27509
  bundles: !0,
27506
27510
  config: !0,
27507
27511
  map: !0
27508
27512
  };
27509
- eachProp(A, function(L, G) {
27510
- V[G] ? (i[G] || (i[G] = {}), mixin(i[G], L, !0, !0)) : i[G] = L;
27511
- }), A.bundles && eachProp(A.bundles, function(L, G) {
27512
- each(L, function(H) {
27513
+ eachProp(A, function(z, G) {
27514
+ V[G] ? (i[G] || (i[G] = {}), mixin(i[G], z, !0, !0)) : i[G] = z;
27515
+ }), A.bundles && eachProp(A.bundles, function(z, G) {
27516
+ each(z, function(H) {
27513
27517
  H !== G && (h[H] = G);
27514
27518
  });
27515
- }), A.shim && (eachProp(A.shim, function(L, G) {
27516
- isArray(L) && (L = {
27517
- deps: L
27518
- }), (L.exports || L.init) && !L.exportsFn && (L.exportsFn = o.makeShimExports(L)), z[G] = L;
27519
- }), i.shim = z), A.packages && each(A.packages, function(L) {
27519
+ }), A.shim && (eachProp(A.shim, function(z, G) {
27520
+ isArray(z) && (z = {
27521
+ deps: z
27522
+ }), (z.exports || z.init) && !z.exportsFn && (z.exportsFn = o.makeShimExports(z)), L[G] = z;
27523
+ }), i.shim = L), A.packages && each(A.packages, function(z) {
27520
27524
  var G, H;
27521
- L = typeof L == "string" ? { name: L } : L, H = L.name, G = L.location, G && (i.paths[H] = L.location), i.pkgs[H] = L.name + "/" + (L.main || "main").replace(currDirRegExp, "").replace(jsSuffixRegExp, "");
27522
- }), eachProp(l, function(L, G) {
27523
- !L.inited && !L.map.unnormalized && (L.map = I(G, null, !0));
27525
+ z = typeof z == "string" ? { name: z } : z, H = z.name, G = z.location, G && (i.paths[H] = z.location), i.pkgs[H] = z.name + "/" + (z.main || "main").replace(currDirRegExp, "").replace(jsSuffixRegExp, "");
27526
+ }), eachProp(l, function(z, G) {
27527
+ !z.inited && !z.map.unnormalized && (z.map = I(G, null, !0));
27524
27528
  }), (A.deps || A.callback) && o.require(A.deps || [], A.callback);
27525
27529
  },
27526
27530
  makeShimExports: function(A) {
27527
27531
  function E() {
27528
- var z;
27529
- return A.init && (z = A.init.apply(global, arguments)), z || A.exports && getGlobal(A.exports);
27532
+ var L;
27533
+ return A.init && (L = A.init.apply(global, arguments)), L || A.exports && getGlobal(A.exports);
27530
27534
  }
27531
27535
  return E;
27532
27536
  },
27533
27537
  makeRequire: function(A, E) {
27534
27538
  E = E || {};
27535
- function z(V, L, G) {
27539
+ function L(V, z, G) {
27536
27540
  var H, U, K;
27537
- return E.enableBuildCallback && L && isFunction(L) && (L.__requireJsBuild = !0), typeof V == "string" ? isFunction(L) ? T(makeError("requireargs", "Invalid require call"), G) : A && hasProp(r, V) ? r[V](l[A.id]) : req.get ? req.get(o, V, A, z) : (U = I(V, A, !1, !0), H = U.id, hasProp(p, H) ? p[H] : T(makeError("notloaded", 'Module name "' + H + '" has not been loaded yet for context: ' + e + (A ? "" : ". Use require([])")))) : ($(), o.nextTick(function() {
27538
- $(), K = F(I(null, A)), K.skipMap = E.skipMap, K.init(V, L, G, {
27541
+ return E.enableBuildCallback && z && isFunction(z) && (z.__requireJsBuild = !0), typeof V == "string" ? isFunction(z) ? T(makeError("requireargs", "Invalid require call"), G) : A && hasProp(r, V) ? r[V](l[A.id]) : req.get ? req.get(o, V, A, L) : (U = I(V, A, !1, !0), H = U.id, hasProp(p, H) ? p[H] : T(makeError("notloaded", 'Module name "' + H + '" has not been loaded yet for context: ' + e + (A ? "" : ". Use require([])")))) : ($(), o.nextTick(function() {
27542
+ $(), K = F(I(null, A)), K.skipMap = E.skipMap, K.init(V, z, G, {
27539
27543
  enabled: !0
27540
27544
  }), M();
27541
- }), z);
27545
+ }), L);
27542
27546
  }
27543
- return mixin(z, {
27547
+ return mixin(L, {
27544
27548
  isBrowser,
27545
27549
  /**
27546
27550
  * Converts a module name + .extension into an URL path.
@@ -27548,12 +27552,12 @@ https://requirejs.org/docs/errors.html#` + e);
27548
27552
  * plain URLs like nameToUrl.
27549
27553
  */
27550
27554
  toUrl: function(V) {
27551
- var L, G = V.lastIndexOf("."), H = V.split("/")[0], U = H === "." || H === "..";
27552
- return G !== -1 && (!U || G > 1) && (L = V.substring(G, V.length), V = V.substring(0, G)), o.nameToUrl(b(
27555
+ var z, G = V.lastIndexOf("."), H = V.split("/")[0], U = H === "." || H === "..";
27556
+ return G !== -1 && (!U || G > 1) && (z = V.substring(G, V.length), V = V.substring(0, G)), o.nameToUrl(b(
27553
27557
  V,
27554
27558
  A && A.id,
27555
27559
  !0
27556
- ), L, !0);
27560
+ ), z, !0);
27557
27561
  },
27558
27562
  defined: function(V) {
27559
27563
  return hasProp(p, I(V, A, !1, !0).id);
@@ -27561,13 +27565,13 @@ https://requirejs.org/docs/errors.html#` + e);
27561
27565
  specified: function(V) {
27562
27566
  return V = I(V, A, !1, !0).id, hasProp(p, V) || hasProp(l, V);
27563
27567
  }
27564
- }), A || (z.undef = function(V) {
27568
+ }), A || (L.undef = function(V) {
27565
27569
  D();
27566
- var L = I(V, A, !0), G = getOwn(l, V);
27567
- G.undefed = !0, S(V), delete p[V], delete m[L.url], delete u[V], eachReverse(d, function(H, U) {
27570
+ var z = I(V, A, !0), G = getOwn(l, V);
27571
+ G.undefed = !0, S(V), delete p[V], delete m[z.url], delete u[V], eachReverse(d, function(H, U) {
27568
27572
  H[0] === V && d.splice(U, 1);
27569
27573
  }), delete o.defQueueMap[V], G && (G.events.defined && (u[V] = G.events), B(V));
27570
- }), z;
27574
+ }), L;
27571
27575
  },
27572
27576
  /**
27573
27577
  * Called to enable a module if it is still in the registry
@@ -27586,15 +27590,15 @@ https://requirejs.org/docs/errors.html#` + e);
27586
27590
  * @param {String} moduleName the name of the module to potentially complete.
27587
27591
  */
27588
27592
  completeLoad: function(A) {
27589
- var E, z, V, L = getOwn(i.shim, A) || {}, G = L.exports;
27593
+ var E, L, V, z = getOwn(i.shim, A) || {}, G = z.exports;
27590
27594
  for (D(); d.length; ) {
27591
- if (z = d.shift(), z[0] === null) {
27592
- if (z[0] = A, E)
27595
+ if (L = d.shift(), L[0] === null) {
27596
+ if (L[0] = A, E)
27593
27597
  break;
27594
27598
  E = !0;
27595
27599
  } else
27596
- z[0] === A && (E = !0);
27597
- j(z);
27600
+ L[0] === A && (E = !0);
27601
+ j(L);
27598
27602
  }
27599
27603
  if (o.defQueueMap = {}, V = getOwn(l, A), !E && !hasProp(p, A) && V && !V.inited) {
27600
27604
  if (i.enforceDefine && (!G || !getGlobal(G)))
@@ -27604,7 +27608,7 @@ https://requirejs.org/docs/errors.html#` + e);
27604
27608
  null,
27605
27609
  [A]
27606
27610
  ));
27607
- j([A, L.deps || [], L.exportsFn]);
27611
+ j([A, z.deps || [], z.exportsFn]);
27608
27612
  }
27609
27613
  M();
27610
27614
  },
@@ -27615,19 +27619,19 @@ https://requirejs.org/docs/errors.html#` + e);
27615
27619
  * it is assumed to have already been normalized. This is an
27616
27620
  * internal API, not a public one. Use toUrl for the public API.
27617
27621
  */
27618
- nameToUrl: function(A, E, z) {
27619
- var V, L, G, H, U, K, Y, X = getOwn(i.pkgs, A);
27622
+ nameToUrl: function(A, E, L) {
27623
+ var V, z, G, H, U, K, Y, X = getOwn(i.pkgs, A);
27620
27624
  if (X && (A = X), Y = getOwn(h, A), Y)
27621
- return o.nameToUrl(Y, E, z);
27625
+ return o.nameToUrl(Y, E, L);
27622
27626
  if (req.jsExtRegExp.test(A))
27623
27627
  U = A + (E || "");
27624
27628
  else {
27625
- for (V = i.paths, L = A.split("/"), G = L.length; G > 0; G -= 1)
27626
- if (H = L.slice(0, G).join("/"), K = getOwn(V, H), K) {
27627
- isArray(K) && (K = K[0]), L.splice(0, G, K);
27629
+ for (V = i.paths, z = A.split("/"), G = z.length; G > 0; G -= 1)
27630
+ if (H = z.slice(0, G).join("/"), K = getOwn(V, H), K) {
27631
+ isArray(K) && (K = K[0]), z.splice(0, G, K);
27628
27632
  break;
27629
27633
  }
27630
- U = L.join("/"), U += E || (/^data\:|^blob\:|\?/.test(U) || z ? "" : ".js"), U = (U.charAt(0) === "/" || U.match(/^[\w\+\.\-]+:/) ? "" : i.baseUrl) + U;
27634
+ U = z.join("/"), U += E || (/^data\:|^blob\:|\?/.test(U) || L ? "" : ".js"), U = (U.charAt(0) === "/" || U.match(/^[\w\+\.\-]+:/) ? "" : i.baseUrl) + U;
27631
27635
  }
27632
27636
  return i.urlArgs && !/^blob\:/.test(U) ? U + i.urlArgs(A, U) : U;
27633
27637
  },
@@ -27643,8 +27647,8 @@ https://requirejs.org/docs/errors.html#` + e);
27643
27647
  *
27644
27648
  * @private
27645
27649
  */
27646
- execCb: function(A, E, z, V) {
27647
- return E.apply(V, z);
27650
+ execCb: function(A, E, L, V) {
27651
+ return E.apply(V, L);
27648
27652
  },
27649
27653
  /**
27650
27654
  * callback for script loads, used to check status of loading.
@@ -27665,13 +27669,13 @@ https://requirejs.org/docs/errors.html#` + e);
27665
27669
  onScriptError: function(A) {
27666
27670
  var E = O(A);
27667
27671
  if (!y(E.id)) {
27668
- var z = [];
27669
- return eachProp(l, function(V, L) {
27670
- L.indexOf("_@r") !== 0 && each(V.depMaps, function(G) {
27672
+ var L = [];
27673
+ return eachProp(l, function(V, z) {
27674
+ z.indexOf("_@r") !== 0 && each(V.depMaps, function(G) {
27671
27675
  if (G.id === E.id)
27672
- return z.push(L), !0;
27676
+ return L.push(z), !0;
27673
27677
  });
27674
- }), T(makeError("scripterror", 'Script error for "' + E.id + (z.length ? '", needed by: ' + z.join(", ") : '"'), A, [E.id]));
27678
+ }), T(makeError("scripterror", 'Script error for "' + E.id + (L.length ? '", needed by: ' + L.join(", ") : '"'), A, [E.id]));
27675
27679
  }
27676
27680
  }
27677
27681
  }, o.require = o.makeRequire(), o;
@@ -29543,7 +29547,7 @@ const useCreateActionProps = () => {
29543
29547
  filterKeys: b,
29544
29548
  filterByTk: e,
29545
29549
  // TODO(refactor): should change to inject by plugin
29546
- triggerWorkflows: T != null && T.length ? T.map((z) => [z.workflowKey, z.context].filter(Boolean).join("!")).join(",") : void 0,
29550
+ triggerWorkflows: T != null && T.length ? T.map((L) => [L.workflowKey, L.context].filter(Boolean).join("!")).join(",") : void 0,
29547
29551
  updateAssociationValues: g
29548
29552
  });
29549
29553
  let E = N;
@@ -29572,14 +29576,14 @@ const useCreateActionProps = () => {
29572
29576
  return {
29573
29577
  onClick() {
29574
29578
  return q(this, null, function* () {
29575
- var E, z, V, L, G, H;
29579
+ var E, L, V, z, G, H;
29576
29580
  const w = u.map((U) => U.name), {
29577
29581
  assignedValues: T = {},
29578
29582
  onSuccess: D,
29579
29583
  overwriteValues: B,
29580
29584
  skipValidator: N,
29581
29585
  triggerWorkflows: M
29582
- } = (E = l == null ? void 0 : l["x-action-settings"]) != null ? E : {}, j = (z = a == null ? void 0 : a["x-component-props"]) == null ? void 0 : z.addChild, { successMessage: R } = D || {}, O = {}, $ = Object.keys(T).map((U) => q(this, null, function* () {
29586
+ } = (E = l == null ? void 0 : l["x-action-settings"]) != null ? E : {}, j = (L = a == null ? void 0 : a["x-component-props"]) == null ? void 0 : L.addChild, { successMessage: R } = D || {}, O = {}, $ = Object.keys(T).map((U) => q(this, null, function* () {
29583
29587
  const K = T[U], Y = d(U);
29584
29588
  if (isVariable$1(K)) {
29585
29589
  const { value: X } = (yield C == null ? void 0 : C.parseVariable(K, b)) || {};
@@ -29599,7 +29603,7 @@ const useCreateActionProps = () => {
29599
29603
  });
29600
29604
  if (j) {
29601
29605
  const U = p();
29602
- A[(V = U == null ? void 0 : U.name) != null ? V : "parent"] = f, A[(L = U == null ? void 0 : U.foreignKey) != null ? L : "parentId"] = f.id;
29606
+ A[(V = U == null ? void 0 : U.name) != null ? V : "parent"] = f, A[(z = U == null ? void 0 : U.foreignKey) != null ? z : "parentId"] = f.id;
29603
29607
  }
29604
29608
  c.data = t.data || {}, c.data.loading = !0;
29605
29609
  try {
@@ -29729,12 +29733,12 @@ const useCreateActionProps = () => {
29729
29733
  successMessage: B,
29730
29734
  actionAfterSuccess: N
29731
29735
  } = v || {}, M = {}, j = Object.keys(y).map((E) => q(this, null, function* () {
29732
- const z = y[E], V = g(E);
29733
- if (isVariable$1(z)) {
29734
- const { value: L } = (yield p == null ? void 0 : p.parseVariable(z, m)) || {};
29735
- M[E] = transformVariableValue(L, { targetCollectionField: V });
29736
+ const L = y[E], V = g(E);
29737
+ if (isVariable$1(L)) {
29738
+ const { value: z } = (yield p == null ? void 0 : p.parseVariable(L, m)) || {};
29739
+ M[E] = transformVariableValue(z, { targetCollectionField: V });
29736
29740
  } else
29737
- z !== "" && (M[E] = z);
29741
+ L !== "" && (M[E] = L);
29738
29742
  }));
29739
29743
  if (yield Promise.all(j), I === !1 && (yield u.submit()), i.data = i.data || {}, !i.data.loading) {
29740
29744
  i.data.loading = !0;
@@ -29745,8 +29749,8 @@ const useCreateActionProps = () => {
29745
29749
  // TODO(refactor): should change to inject by plugin
29746
29750
  triggerWorkflows: F != null && F.length ? F.map((V) => [V.workflowKey, V.context].filter(Boolean).join("!")).join(",") : void 0
29747
29751
  });
29748
- let z = D;
29749
- if (D && (z = yield getVariableValue(D, {
29752
+ let L = D;
29753
+ if (D && (L = yield getVariableValue(D, {
29750
29754
  variables: p,
29751
29755
  localVariables: [...m, { name: "$record", ctx: new Proxy((O = E == null ? void 0 : E.data) == null ? void 0 : O.data, {}) }]
29752
29756
  })), (N === "previous" || !N && T !== !0) && (f == null || f(!1)), S && (S == null || S()), e instanceof TableFieldResource || (A = ($ = t == null ? void 0 : t.service) == null ? void 0 : $.refresh) == null || A.call($), !B)
@@ -29754,9 +29758,9 @@ const useCreateActionProps = () => {
29754
29758
  w ? d.success({
29755
29759
  title: c(B),
29756
29760
  onOk: () => q(this, null, function* () {
29757
- (T && !N || N === "redirect") && z && (isURL(z) ? window.location.href = z : l(z));
29761
+ (T && !N || N === "redirect") && L && (isURL(L) ? window.location.href = L : l(L));
29758
29762
  })
29759
- }) : (message.success(c(B)), (T && !N || N === "redirect") && z && (isURL(z) ? window.location.href = z : l(z)));
29763
+ }) : (message.success(c(B)), (T && !N || N === "redirect") && L && (isURL(L) ? window.location.href = L : l(L)));
29760
29764
  } catch (E) {
29761
29765
  console.error(E);
29762
29766
  } finally {
@@ -29782,12 +29786,12 @@ const useCreateActionProps = () => {
29782
29786
  } = (E = a == null ? void 0 : a["x-action-settings"]) != null ? E : {}, { manualClose: N, redirecting: M, redirectTo: j, successMessage: R, actionAfterSuccess: O } = D || {};
29783
29787
  m.data = e.data || {}, m.data.loading = !0;
29784
29788
  const $ = {}, A = Object.keys(T).map((V) => q(this, null, function* () {
29785
- const L = T[V], G = C(V);
29786
- if (isVariable$1(L)) {
29787
- const { value: H } = (yield g == null ? void 0 : g.parseVariable(L, b)) || {};
29789
+ const z = T[V], G = C(V);
29790
+ if (isVariable$1(z)) {
29791
+ const { value: H } = (yield g == null ? void 0 : g.parseVariable(z, b)) || {};
29788
29792
  $[V] = transformVariableValue(H, { targetCollectionField: G });
29789
29793
  } else
29790
- L !== "" && ($[V] = L);
29794
+ z !== "" && ($[V] = z);
29791
29795
  }));
29792
29796
  yield Promise.all(A), (O === "previous" || !O && M !== !0) && (S == null || S(!1)), h.confirm({
29793
29797
  title: p("Bulk update"),
@@ -29795,7 +29799,7 @@ const useCreateActionProps = () => {
29795
29799
  onOk() {
29796
29800
  return q(this, null, function* () {
29797
29801
  var G, H, U, K;
29798
- const { filter: V } = (H = (G = o.params) == null ? void 0 : G[0]) != null ? H : {}, L = {
29802
+ const { filter: V } = (H = (G = o.params) == null ? void 0 : G[0]) != null ? H : {}, z = {
29799
29803
  values: x({}, $),
29800
29804
  filter: V,
29801
29805
  forceUpdate: !1
@@ -29805,11 +29809,11 @@ const useCreateActionProps = () => {
29805
29809
  message.error(p("Please select the records to be updated")), m.data.loading = !1;
29806
29810
  return;
29807
29811
  }
29808
- L.filter = { $and: [{ [l || "id"]: { $in: c } }] };
29812
+ z.filter = { $and: [{ [l || "id"]: { $in: c } }] };
29809
29813
  }
29810
- L.filter || (L.forceUpdate = !0);
29814
+ z.filter || (z.forceUpdate = !0);
29811
29815
  try {
29812
- yield t.update(L);
29816
+ yield t.update(z);
29813
29817
  } catch (Y) {
29814
29818
  } finally {
29815
29819
  m.data.loading = !1;
@@ -29837,7 +29841,7 @@ const useCreateActionProps = () => {
29837
29841
  return {
29838
29842
  onClick() {
29839
29843
  return q(this, null, function* () {
29840
- var V, L, G, H;
29844
+ var V, z, G, H;
29841
29845
  const { skipValidator: F, onSuccess: w, requestSettings: T } = (V = o == null ? void 0 : o["x-action-settings"]) != null ? V : {}, { manualClose: D, redirecting: B, redirectTo: N, successMessage: M, actionAfterSuccess: j } = w || {}, R = o == null ? void 0 : o["x-action"];
29842
29846
  if (!T.url)
29843
29847
  return;
@@ -29855,7 +29859,7 @@ const useCreateActionProps = () => {
29855
29859
  });
29856
29860
  Object.assign(A, K);
29857
29861
  }
29858
- const z = {
29862
+ const L = {
29859
29863
  url: renderTemplate(T.url, { currentRecord: m, currentUser: g }),
29860
29864
  method: T.method,
29861
29865
  headers: parse(O)({ currentRecord: m, currentUser: g }),
@@ -29864,7 +29868,7 @@ const useCreateActionProps = () => {
29864
29868
  };
29865
29869
  f.data = c.data || {}, f.data.loading = !0;
29866
29870
  try {
29867
- yield e.request(x({}, z)), f.data.loading = !1, u instanceof TableFieldResource || (G = (L = d == null ? void 0 : d.service) == null ? void 0 : L.refresh) == null || G.call(L), (H = p == null ? void 0 : p.refresh) == null || H.call(p), R === "customize:form:request" && (j === "previous" || !j && B !== !0) && (b == null || b(!1)), M || (message.success(C("Saved successfully")), yield resetFormCorrectly(a), (B && !j || j === "redirect") && N && (isURL(N) ? window.location.href = N : t(N))), D ? S.success({
29871
+ yield e.request(x({}, L)), f.data.loading = !1, u instanceof TableFieldResource || (G = (z = d == null ? void 0 : d.service) == null ? void 0 : z.refresh) == null || G.call(z), (H = p == null ? void 0 : p.refresh) == null || H.call(p), R === "customize:form:request" && (j === "previous" || !j && B !== !0) && (b == null || b(!1)), M || (message.success(C("Saved successfully")), yield resetFormCorrectly(a), (B && !j || j === "redirect") && N && (isURL(N) ? window.location.href = N : t(N))), D ? S.success({
29868
29872
  title: r(M),
29869
29873
  onOk: () => q(this, null, function* () {
29870
29874
  (B && !j || j === "redirect") && N && (isURL(N) ? window.location.href = N : t(N));
@@ -29881,14 +29885,14 @@ const useCreateActionProps = () => {
29881
29885
  return {
29882
29886
  onClick(I, F) {
29883
29887
  return q(this, null, function* () {
29884
- var L, G;
29888
+ var z, G;
29885
29889
  const {
29886
29890
  assignedValues: w = {},
29887
29891
  onSuccess: T,
29888
29892
  overwriteValues: D,
29889
29893
  skipValidator: B,
29890
29894
  triggerWorkflows: N
29891
- } = (L = l == null ? void 0 : l["x-action-settings"]) != null ? L : {}, {
29895
+ } = (z = l == null ? void 0 : l["x-action-settings"]) != null ? z : {}, {
29892
29896
  manualClose: M,
29893
29897
  redirecting: j,
29894
29898
  redirectTo: R,
@@ -29903,11 +29907,11 @@ const useCreateActionProps = () => {
29903
29907
  U !== "" && (A[H] = U);
29904
29908
  }));
29905
29909
  yield Promise.all(E), B || (yield e.submit());
29906
- const z = u.map((H) => H.name), V = getFormValues({
29910
+ const L = u.map((H) => H.name), V = getFormValues({
29907
29911
  filterByTk: t,
29908
29912
  field: n,
29909
29913
  form: e,
29910
- fieldNames: z,
29914
+ fieldNames: L,
29911
29915
  getField: d,
29912
29916
  resource: o,
29913
29917
  actionFields: (y == null ? void 0 : y("form")) || []
@@ -30278,25 +30282,25 @@ const useCreateActionProps = () => {
30278
30282
  var H, U, K, Y;
30279
30283
  if (!O.find((X) => X.uid === A.uid))
30280
30284
  return;
30281
- const z = `${$}${t.name}`, V = ((H = A.service.params) == null ? void 0 : H[0]) || {};
30285
+ const L = `${$}${t.name}`, V = ((H = A.service.params) == null ? void 0 : H[0]) || {};
30282
30286
  (K = (U = A.service.params) == null ? void 0 : U[1]) != null && K.filters || _.set(A.service.params, "[1].filters", {});
30283
- const L = A.service.params[1].filters;
30287
+ const z = A.service.params[1].filters;
30284
30288
  if (R.length)
30285
- L[z] = {
30289
+ z[L] = {
30286
30290
  [S]: R
30287
30291
  };
30288
30292
  else {
30289
30293
  if ((Y = A.clearSelection) == null || Y.call(A), A.dataLoadingMode === "manual")
30290
30294
  return A.clearData();
30291
- delete L[z];
30295
+ delete z[L];
30292
30296
  }
30293
- const G = mergeFilter([...Object.values(L), A.defaultFilter]);
30297
+ const G = mergeFilter([...Object.values(z), A.defaultFilter]);
30294
30298
  return A.doFilter(
30295
30299
  P(x({}, V), {
30296
30300
  page: 1,
30297
30301
  filter: G
30298
30302
  }),
30299
- { filters: L }
30303
+ { filters: z }
30300
30304
  );
30301
30305
  });
30302
30306
  },
@@ -30318,7 +30322,7 @@ const useCreateActionProps = () => {
30318
30322
  p = $;
30319
30323
  return;
30320
30324
  }
30321
- p = $.filter((z) => z.label.includes(E));
30325
+ p = $.filter((L) => L.label.includes(E));
30322
30326
  };
30323
30327
  } else
30324
30328
  S = `${r}.${C}.$in`, p = (f == null ? void 0 : f.data) || [], m = (R) => {
@@ -31088,16 +31092,65 @@ const DragHandler = (e) => {
31088
31092
  ], SmartDatePicker = (e) => {
31089
31093
  const r = e, { isRange: t, defaultValue: n } = r, o = W(r, ["isRange", "defaultValue"]);
31090
31094
  return t ? /* @__PURE__ */ jsx(DatePicker.RangePicker, x({}, o)) : /* @__PURE__ */ jsx(DatePicker.FilterWithPicker, x({}, o));
31095
+ }, normalizeRelativeDateValue = (e) => {
31096
+ var n;
31097
+ if (!e || !e.type || e.type === "exact")
31098
+ return;
31099
+ if (!["past", "next"].includes(e.type))
31100
+ return {
31101
+ type: e.type
31102
+ };
31103
+ const t = {
31104
+ type: e.type,
31105
+ number: e.number === void 0 ? 1 : e.number,
31106
+ unit: (n = e.unit) != null ? n : "day"
31107
+ };
31108
+ return e.includeCurrent && (t.includeCurrent = !0), t;
31091
31109
  }, DateFilterDynamicComponent = (e) => {
31092
- const { value: t, onChange: n } = e, o = useCompile(), { t: r } = useTranslation(), { token: a } = theme.useToken(), [i, l] = useState(!1), c = (d) => {
31093
- if (l(!1), d === "exact")
31110
+ const { value: t, onChange: n } = e, o = useCompile(), { t: r } = useTranslation(), { token: a } = theme.useToken(), [i, l] = useState(!1), c = useMemo(() => ({
31111
+ day: r("Include today"),
31112
+ hour: r("Include this hour"),
31113
+ minute: r("Include this minute"),
31114
+ week: r("Include this week"),
31115
+ isoWeek: r("Include this week"),
31116
+ month: r("Include this month"),
31117
+ quarter: r("Include this quarter"),
31118
+ year: r("Include this year")
31119
+ })[(t == null ? void 0 : t.unit) || "day"], [r, t == null ? void 0 : t.unit]), u = useMemo(
31120
+ () => P(x({}, e.style), {
31121
+ width: "100%",
31122
+ display: "flex",
31123
+ alignItems: "center",
31124
+ gap: a.marginSM
31125
+ }),
31126
+ [e.style, a.marginSM]
31127
+ ), d = useMemo(
31128
+ () => ({
31129
+ flex: 1,
31130
+ minWidth: 0
31131
+ }),
31132
+ []
31133
+ ), p = useMemo(
31134
+ () => ({
31135
+ flexShrink: 0,
31136
+ display: "inline-flex",
31137
+ alignItems: "center",
31138
+ minHeight: a.controlHeight,
31139
+ marginInlineStart: a.marginXXS,
31140
+ color: a.colorTextSecondary,
31141
+ whiteSpace: "nowrap"
31142
+ }),
31143
+ [a]
31144
+ ), m = (g) => {
31145
+ var C, b;
31146
+ if (l(!1), g === "exact")
31094
31147
  return n(void 0);
31095
- const p = {
31096
- type: d
31097
- };
31098
- ["past", "next"].includes(d) && (p.number = 1, p.unit = "day"), n(p);
31099
- }, u = () => {
31100
- const d = options.slice(0, 3), p = options.slice(3), m = css`
31148
+ const f = normalizeRelativeDateValue({
31149
+ type: g
31150
+ });
31151
+ ["past", "next"].includes(g) && (f.number = (t == null ? void 0 : t.type) === g && (C = t == null ? void 0 : t.number) != null ? C : 1, f.unit = (t == null ? void 0 : t.type) === g && (b = t == null ? void 0 : t.unit) != null ? b : "day", ((t == null ? void 0 : t.type) === "past" || (t == null ? void 0 : t.type) === "next") && (f.includeCurrent = t == null ? void 0 : t.includeCurrent)), n(f);
31152
+ }, h = () => {
31153
+ const g = options.slice(0, 3), f = options.slice(3), C = css`
31101
31154
  padding: 3px 10px;
31102
31155
  cursor: pointer;
31103
31156
  white-space: nowrap;
@@ -31108,77 +31161,102 @@ const DragHandler = (e) => {
31108
31161
  }
31109
31162
  `;
31110
31163
  return /* @__PURE__ */ jsxs("div", { style: { maxHeight: 300, overflowY: "auto" }, children: [
31111
- d.map((h) => /* @__PURE__ */ jsx("div", { role: "option", onClick: () => c(h.value), className: m, children: o(h.label) }, h.value)),
31164
+ g.map((b) => /* @__PURE__ */ jsx("div", { role: "option", onClick: () => m(b.value), className: C, children: o(b.label) }, b.value)),
31112
31165
  /* @__PURE__ */ jsx(Divider$1, { style: { margin: "4px 0" } }),
31113
- p.map((h) => /* @__PURE__ */ jsx(
31166
+ f.map((b) => /* @__PURE__ */ jsx(
31114
31167
  "div",
31115
31168
  {
31116
31169
  role: "option",
31117
- className: m,
31118
- onClick: () => c(h.value),
31119
- title: o(h.label),
31120
- children: o(h.label)
31170
+ className: C,
31171
+ onClick: () => m(b.value),
31172
+ title: o(b.label),
31173
+ children: o(b.label)
31121
31174
  },
31122
- h.value
31175
+ b.value
31123
31176
  ))
31124
31177
  ] });
31125
31178
  };
31126
- return /* @__PURE__ */ jsxs(Space$1.Compact, { style: P(x({}, e.style), { width: "100%" }), children: [
31127
- /* @__PURE__ */ jsx(
31128
- Select$1,
31129
- P(x({
31130
- options: o(options),
31131
- open: i,
31132
- onDropdownVisibleChange: l
31133
- }, e), {
31134
- allowClear: !1,
31135
- style: {
31136
- width: "100%",
31137
- minWidth: 100,
31138
- maxWidth: ["past", "next", "exact", void 0].includes(t == null ? void 0 : t.type) ? 100 : null
31139
- },
31140
- value: (t == null ? void 0 : t.type) || "exact",
31141
- onChange: c,
31142
- dropdownRender: u
31143
- })
31144
- ),
31145
- ["past", "next"].includes(t == null ? void 0 : t.type) && [
31146
- /* @__PURE__ */ jsx(
31147
- InputNumber$1,
31148
- {
31149
- value: t == null ? void 0 : t.number,
31150
- onChange: (d) => {
31151
- const p = P(x({}, t), {
31152
- number: d
31153
- });
31154
- n(p);
31155
- }
31156
- },
31157
- "number"
31158
- ),
31179
+ return /* @__PURE__ */ jsxs("div", { style: u, children: [
31180
+ /* @__PURE__ */ jsxs(Space$1.Compact, { block: !0, style: d, children: [
31159
31181
  /* @__PURE__ */ jsx(
31160
31182
  Select$1,
31161
- {
31162
- value: t == null ? void 0 : t.unit,
31163
- style: { minWidth: 130, maxWidth: 140 },
31164
- onChange: (d) => {
31165
- const p = P(x({}, t), {
31166
- unit: d
31167
- });
31168
- n(p);
31183
+ P(x({
31184
+ "data-testid": "date-filter-type-select",
31185
+ options: o(options),
31186
+ open: i,
31187
+ onDropdownVisibleChange: l
31188
+ }, e), {
31189
+ allowClear: !1,
31190
+ style: {
31191
+ width: "100%",
31192
+ minWidth: 100,
31193
+ maxWidth: ["past", "next", "exact", void 0].includes(t == null ? void 0 : t.type) ? 100 : null
31169
31194
  },
31170
- options: [
31171
- { value: "day", label: r("Day") },
31172
- { value: "week", label: r("Calendar week") },
31173
- { value: "month", label: r("Calendar Month") },
31174
- { value: "year", label: r("Calendar Year") }
31175
- ],
31176
- popupMatchSelectWidth: !0
31195
+ value: (t == null ? void 0 : t.type) || "exact",
31196
+ onChange: m,
31197
+ dropdownRender: h
31198
+ })
31199
+ ),
31200
+ ["past", "next"].includes(t == null ? void 0 : t.type) && [
31201
+ /* @__PURE__ */ jsx(
31202
+ InputNumber$1,
31203
+ {
31204
+ min: 1,
31205
+ "data-testid": "date-filter-number-input",
31206
+ value: t == null ? void 0 : t.number,
31207
+ onChange: (g) => {
31208
+ const f = normalizeRelativeDateValue(P(x({}, t), {
31209
+ number: g
31210
+ }));
31211
+ n(f);
31212
+ }
31213
+ },
31214
+ "number"
31215
+ ),
31216
+ /* @__PURE__ */ jsx(
31217
+ Select$1,
31218
+ {
31219
+ "data-testid": "date-filter-unit-select",
31220
+ value: t == null ? void 0 : t.unit,
31221
+ style: { minWidth: 130, maxWidth: 140 },
31222
+ onChange: (g) => {
31223
+ const f = normalizeRelativeDateValue(P(x({}, t), {
31224
+ unit: g
31225
+ }));
31226
+ n(f);
31227
+ },
31228
+ options: [
31229
+ { value: "day", label: r("Day") },
31230
+ { value: "hour", label: r("Hour") },
31231
+ { value: "minute", label: r("Minute") },
31232
+ { value: "week", label: r("Calendar week") },
31233
+ { value: "month", label: r("Calendar Month") },
31234
+ { value: "quarter", label: r("Calendar Quarter") },
31235
+ { value: "year", label: r("Calendar Year") }
31236
+ ],
31237
+ popupMatchSelectWidth: !0
31238
+ },
31239
+ "unit"
31240
+ )
31241
+ ],
31242
+ ((t == null ? void 0 : t.type) === "exact" || !(t != null && t.type)) && /* @__PURE__ */ jsx(SmartDatePicker, x({}, e))
31243
+ ] }),
31244
+ ["past", "next"].includes(t == null ? void 0 : t.type) && c ? /* @__PURE__ */ jsx(
31245
+ Checkbox$1,
31246
+ {
31247
+ "data-testid": "include-current-checkbox",
31248
+ style: p,
31249
+ checked: !!(t != null && t.includeCurrent),
31250
+ onChange: (g) => {
31251
+ n(
31252
+ normalizeRelativeDateValue(P(x({}, t), {
31253
+ includeCurrent: g.target.checked || void 0
31254
+ }))
31255
+ );
31177
31256
  },
31178
- "unit"
31179
- )
31180
- ],
31181
- ((t == null ? void 0 : t.type) === "exact" || !(t != null && t.type)) && /* @__PURE__ */ jsx(SmartDatePicker, x({}, e))
31257
+ children: c
31258
+ }
31259
+ ) : null
31182
31260
  ] });
31183
31261
  }, common = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
31184
31262
  __proto__: null,
@@ -38103,10 +38181,10 @@ const enabledIndexColumn$1 = {
38103
38181
  name: "fieldSettings:component:CascadeSelect",
38104
38182
  items: [fieldComponent$6, titleField$1, ellipsisSettingsItem, setTheDataScope]
38105
38183
  }), SchemaSettingsDateRange = function e(t) {
38106
- var w, T, D, B, N, M, j, R, O, $, A, E, z, V, L, G;
38184
+ var w, T, D, B, N, M, j, R, O, $, A, E, L, V, z, G;
38107
38185
  const { fieldSchema: n } = t, o = useField(), { dn: r } = useDesignable(), { t: a } = useTranslation(), { getCollectionJoinField: i } = useCollectionManager_deprecated(), { isInSubForm: l, isInSubTable: c } = useFlag() || {}, u = i(n == null ? void 0 : n["x-collection-field"]) || {}, d = ((w = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : w.showTime) || ((D = (T = u == null ? void 0 : u.uiSchema) == null ? void 0 : T["x-component-props"]) == null ? void 0 : D.showTime) || !1, p = ((B = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : B.dateFormat) || ((M = (N = u == null ? void 0 : u.uiSchema) == null ? void 0 : N["x-component-props"]) == null ? void 0 : M.dateFormat) || "YYYY-MM-DD", m = ((j = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : j.timeFormat) || ((O = (R = u == null ? void 0 : u.uiSchema) == null ? void 0 : R["x-component-props"]) == null ? void 0 : O.timeFormat) || "HH:mm:ss", h = (($ = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : $.picker) || ((E = (A = u == null ? void 0 : u.uiSchema) == null ? void 0 : A["x-component-props"]) == null ? void 0 : E.picker) || "date";
38108
38186
  n["x-read-pretty"] || o.readOnly || o.readPretty;
38109
- const g = (z = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : z._minDate, f = (V = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : V._maxDate, C = ((L = u == null ? void 0 : u.uiSchema) == null ? void 0 : L["x-component-props"].gmt) || !1, b = ((G = u == null ? void 0 : u.uiSchema) == null ? void 0 : G["x-component-props"].utc) || !1, S = useRecord(), { form: y } = useFormBlockContext(), v = useCallback(
38187
+ const g = (L = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : L._minDate, f = (V = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : V._maxDate, C = ((z = u == null ? void 0 : u.uiSchema) == null ? void 0 : z["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(
38110
38188
  (H) => /* @__PURE__ */ jsx(
38111
38189
  SchemaComponent,
38112
38190
  {
@@ -39603,11 +39681,11 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
39603
39681
  };
39604
39682
  if (_.isFunction(F))
39605
39683
  break;
39606
- const A = y[$], E = y.slice(0, $ + 1).join("."), { fieldPath: z } = getFieldPath$1(E, I), V = r(z, T), L = (O = a(B, T)) == null ? void 0 : O.getPrimaryKey();
39684
+ const A = y[$], E = y.slice(0, $ + 1).join("."), { fieldPath: L } = getFieldPath$1(E, I), V = r(L, T), z = (O = a(B, T)) == null ? void 0 : O.getPrimaryKey();
39607
39685
  if (Array.isArray(F)) {
39608
39686
  const G = F.map((H) => {
39609
- if (!(S != null && S.doNotRequest) && shouldToRequest(H == null ? void 0 : H[A], H, E) && (H == null ? void 0 : H[L]) != null && V != null && V.target) {
39610
- const U = `/${B}/${H[V.sourceKey || L]}/${A}:${getAction(V.type)}`;
39687
+ if (!(S != null && S.doNotRequest) && shouldToRequest(H == null ? void 0 : H[A], H, E) && (H == null ? void 0 : H[z]) != null && V != null && V.target) {
39688
+ const U = `/${B}/${H[V.sourceKey || z]}/${A}:${getAction(V.type)}`;
39611
39689
  if (hasRequested(U))
39612
39690
  return getRequested(U);
39613
39691
  const K = o.request({
@@ -39622,8 +39700,8 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
39622
39700
  return H == null ? void 0 : H[A];
39623
39701
  });
39624
39702
  F = removeThroughCollectionFields(_.flatten(yield Promise.all(G)), V);
39625
- } else if (!(S != null && S.doNotRequest) && shouldToRequest(F[A], F, E) && F[L] != null && (V != null && V.target)) {
39626
- const G = `/${B}/${F[V.sourceKey || L]}/${A}:${getAction(V.type)}`;
39703
+ } else if (!(S != null && S.doNotRequest) && shouldToRequest(F[A], F, E) && F[z] != null && (V != null && V.target)) {
39704
+ const G = `/${B}/${F[V.sourceKey || z]}/${A}:${getAction(V.type)}`;
39627
39705
  let H = null;
39628
39706
  if (hasRequested(G))
39629
39707
  H = yield getRequested(G);
@@ -40236,7 +40314,7 @@ const ActionLink = withDynamicSchemaProps(
40236
40314
  return ((X = F == null ? void 0 : F["x-linkage-rules"]) == null ? void 0 : X.filter((J) => !J.disabled)) || [];
40237
40315
  },
40238
40316
  [F == null ? void 0 : F["x-linkage-rules"]]
40239
- ), { designable: N } = useDesignable(), M = useComponent(o) || o, j = useVariables$1(), R = useLocalVariables$1(), { visibleWithURL: O, setVisibleWithURL: $ } = usePopupUtils(), { setSubmitted: A } = useActionContext(), { getAriaLabel: E } = useGetAriaLabelOfAction(l), z = useCollectionParentRecordData(), V = useApp(), { getAllDataBlocks: L } = useAllDataBlocks(), G = useForm();
40317
+ ), { designable: N } = useDesignable(), M = useComponent(o) || o, j = useVariables$1(), R = useLocalVariables$1(), { visibleWithURL: O, setVisibleWithURL: $ } = usePopupUtils(), { setSubmitted: A } = useActionContext(), { getAriaLabel: E } = useGetAriaLabelOfAction(l), L = useCollectionParentRecordData(), V = useApp(), { getAllDataBlocks: z } = useAllDataBlocks(), G = useForm();
40240
40318
  useEffect(() => {
40241
40319
  I.stateOfLinkageRules && setInitialActionState(I);
40242
40320
  const X = uid(), J = [];
@@ -40280,7 +40358,7 @@ const ActionLink = withDynamicSchemaProps(
40280
40358
  var Q, ne;
40281
40359
  yield c == null ? void 0 : c(X, J);
40282
40360
  const Z = ((ne = (Q = F["x-action-settings"]) == null ? void 0 : Q.onSuccess) == null ? void 0 : ne.blocksToRefresh) || [];
40283
- Z.length > 0 && L().forEach((ee) => {
40361
+ Z.length > 0 && z().forEach((ee) => {
40284
40362
  var re;
40285
40363
  if (Z.includes(ee.uid))
40286
40364
  try {
@@ -40289,7 +40367,7 @@ const ActionLink = withDynamicSchemaProps(
40289
40367
  console.error("Failed to refresh block:", ee.uid, de);
40290
40368
  }
40291
40369
  });
40292
- })), [c, F, L]);
40370
+ })), [c, F, z]);
40293
40371
  return /* @__PURE__ */ jsx(VariableScope, { scopeId: F == null ? void 0 : F["x-uid"], type: "action", children: /* @__PURE__ */ jsx(
40294
40372
  InternalAction,
40295
40373
  x({
@@ -40318,7 +40396,7 @@ const ActionLink = withDynamicSchemaProps(
40318
40396
  setVisibleWithURL: $,
40319
40397
  setSubmitted: A,
40320
40398
  getAriaLabel: E,
40321
- parentRecordData: z,
40399
+ parentRecordData: L,
40322
40400
  actionCallback: h
40323
40401
  }, y)
40324
40402
  ) });
@@ -40382,7 +40460,7 @@ const ActionLink = withDynamicSchemaProps(
40382
40460
  "setSubmitted",
40383
40461
  "getAriaLabel",
40384
40462
  "parentRecordData"
40385
- ]), [R, O] = useState(!1), { wrapSSR: $, componentCls: A, hashId: E } = useStyles$8(), [z, V] = useState(!1), L = o["x-toolbar-props"] || o["x-designer-props"], G = (pe = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : pe.openMode, H = (ce = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : ce.openSize, U = (ge = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : ge.refreshDataBlockRequest, { modal: K } = App.useApp(), Y = useForm(), X = useACLActionParamsContext(), {
40463
+ ]), [R, O] = useState(!1), { wrapSSR: $, componentCls: A, hashId: E } = useStyles$8(), [L, V] = useState(!1), z = o["x-toolbar-props"] || o["x-designer-props"], G = (pe = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : pe.openMode, H = (ce = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : ce.openSize, U = (ge = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : ge.refreshDataBlockRequest, { modal: K } = App.useApp(), Y = useForm(), X = useACLActionParamsContext(), {
40386
40464
  run: J,
40387
40465
  element: Z,
40388
40466
  disabled: Q,
@@ -40403,7 +40481,7 @@ const ActionLink = withDynamicSchemaProps(
40403
40481
  buttonStyle: re,
40404
40482
  handleMouseEnter: c,
40405
40483
  tarComponent: u,
40406
- designerProps: L,
40484
+ designerProps: z,
40407
40485
  componentCls: A,
40408
40486
  hashId: E,
40409
40487
  className: d,
@@ -40433,7 +40511,7 @@ const ActionLink = withDynamicSchemaProps(
40433
40511
  button: RenderButton(de),
40434
40512
  visible: R || T,
40435
40513
  setVisible: se,
40436
- formValueChanged: z,
40514
+ formValueChanged: L,
40437
40515
  setFormValueChanged: V,
40438
40516
  openMode: G,
40439
40517
  openSize: H,
@@ -40522,12 +40600,12 @@ const RenderButton = ({
40522
40600
  confirmTitle: D,
40523
40601
  title: B
40524
40602
  }) => {
40525
- const { getDataBlockRequest: N } = useDataBlockRequestGetter(), { t: M } = useTranslation(), { isPopupVisibleControlledByURL: j } = usePopupSettings(), { openPopup: R } = usePopupUtils(), O = useVariables$1(), $ = useLocalVariables$1(), A = useRef(null), E = useCompile(), z = useForm();
40603
+ const { getDataBlockRequest: N } = useDataBlockRequestGetter(), { t: M } = useTranslation(), { isPopupVisibleControlledByURL: j } = usePopupSettings(), { openPopup: R } = usePopupUtils(), O = useVariables$1(), $ = useLocalVariables$1(), A = useRef(null), E = useCompile(), L = useForm();
40526
40604
  A.current = R;
40527
40605
  const V = {
40528
40606
  variables: O,
40529
40607
  localVariables: $
40530
- }, L = useCallback(
40608
+ }, z = useCallback(
40531
40609
  (G, H = !0) => q(void 0, null, function* () {
40532
40610
  var Y, X;
40533
40611
  if (H && isPortalInBody(G.target))
@@ -40541,7 +40619,7 @@ const RenderButton = ({
40541
40619
  S !== !1 && (T == null || T(!0), (Q = (Z = N()) == null ? void 0 : Z.refresh) == null || Q.call(Z));
40542
40620
  }) : isBulkEditAction(y) || !j() ? (v(!0), I == null || I()) : ["view", "update", "create", "customize:popup"].includes(y["x-action"]) && y["x-uid"] ? A.current() : (v(!0), I == null || I());
40543
40621
  };
40544
- (F == null ? void 0 : F.enable) !== !1 && (F != null && F.content) ? ((Y = y == null ? void 0 : y["x-action-settings"]) != null && Y.skipValidator || (yield (X = z == null ? void 0 : z.submit) == null ? void 0 : X.call(z)), w.confirm({
40622
+ (F == null ? void 0 : F.enable) !== !1 && (F != null && F.content) ? ((Y = y == null ? void 0 : y["x-action-settings"]) != null && Y.skipValidator || (yield (X = L == null ? void 0 : L.submit) == null ? void 0 : X.call(L)), w.confirm({
40545
40623
  title: M(U, { title: D || B || (t == null ? void 0 : t.title) }),
40546
40624
  content: M(K, { title: D || B || (t == null ? void 0 : t.title) }),
40547
40625
  onOk: J
@@ -40581,7 +40659,7 @@ const RenderButton = ({
40581
40659
  buttonStyle: i,
40582
40660
  handleMouseEnter: l,
40583
40661
  getAriaLabel: g,
40584
- handleButtonClick: L,
40662
+ handleButtonClick: z,
40585
40663
  tarComponent: c,
40586
40664
  componentCls: d,
40587
40665
  hashId: p,
@@ -40641,8 +40719,8 @@ const RenderButtonInner = observer$1(
40641
40719
  "onlyIcon"
40642
40720
  ]), { t: F } = useTranslation(), w = useCallback(
40643
40721
  debounce$1(
40644
- (z, V = !0) => {
40645
- d(z, V);
40722
+ (L, V = !0) => {
40723
+ d(L, V);
40646
40724
  },
40647
40725
  300,
40648
40726
  { leading: !0, trailing: !1 }
@@ -40655,8 +40733,8 @@ const RenderButtonInner = observer$1(
40655
40733
  const T = useMemo(
40656
40734
  () => React.forwardRef(
40657
40735
  (K, U) => {
40658
- var Y = K, { component: z = p || Button, icon: V, onlyIcon: L, children: G } = Y, H = W(Y, ["component", "icon", "onlyIcon", "children"]);
40659
- return /* @__PURE__ */ jsxs(z, P(x({ ref: U }, H), { children: [
40736
+ var Y = K, { component: L = p || Button, icon: V, onlyIcon: z, children: G } = Y, H = W(Y, ["component", "icon", "onlyIcon", "children"]);
40737
+ return /* @__PURE__ */ jsxs(L, P(x({ ref: U }, H), { children: [
40660
40738
  v ? /* @__PURE__ */ jsx(Tooltip, { title: H.title, children: /* @__PURE__ */ jsx("span", { style: { padding: 3 }, children: V && typeof V == "string" ? /* @__PURE__ */ jsx(Icon, { type: V }) : V }) }) : /* @__PURE__ */ jsx("span", { style: { paddingRight: 3 }, children: V && typeof V == "string" ? /* @__PURE__ */ jsx(Icon, { type: V }) : V }),
40661
40739
  v ? G[1] : G
40662
40740
  ] }));
@@ -41306,9 +41384,9 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
41306
41384
  onSuccess: f
41307
41385
  }, n.defaultParams ? { defaultParams: [n.defaultParams] } : {})
41308
41386
  ), {
41309
- data: z,
41387
+ data: L,
41310
41388
  run: V,
41311
- loading: L
41389
+ loading: z
41312
41390
  } = useRequest(
41313
41391
  P(x({
41314
41392
  action: "get"
@@ -41355,12 +41433,12 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
41355
41433
  }), w.current = ne;
41356
41434
  }), K = useMemo(() => {
41357
41435
  var de;
41358
- const ne = i ? r || a : z == null ? void 0 : z.data;
41436
+ const ne = i ? r || a : L == null ? void 0 : L.data;
41359
41437
  if (!((de = $ == null ? void 0 : $.data) != null && de.length))
41360
41438
  return ne != null ? Array.isArray(ne) ? ne : [ne] : [];
41361
41439
  const ee = ne != null && (Array.isArray(ne) ? ne.map((se) => P(x({}, se), { [t.value]: se[t.value] || se })) : [P(x({}, ne), { [t.value]: ne[t.value] || ne })]) || [], re = typeof p == "function" ? $.data.filter(p) : $.data;
41362
41440
  return uniqBy(re.concat(ee != null ? ee : []), t.value);
41363
- }, [i, r, a, z == null ? void 0 : z.data, $ == null ? void 0 : $.data, t.value, p]), Y = (ne) => {
41441
+ }, [i, r, a, L == null ? void 0 : L.data, $ == null ? void 0 : $.data, t.value, p]), Y = (ne) => {
41364
41442
  w.current = null, ne && A(), y.current = !0;
41365
41443
  }, X = useMemo(
41366
41444
  () => h(O(K)),
@@ -42498,8 +42576,8 @@ const insertPositionToMethod = {
42498
42576
  }
42499
42577
  }), [h, l]), { moveRoute: F } = useNocoBaseRoutes(), w = useCallback(
42500
42578
  (j) => q(void 0, [j], function* ({ target: N, position: M }) {
42501
- var z;
42502
- const [R] = ((z = N == null ? void 0 : N.split) == null ? void 0 : z.call(N, "||")) || [];
42579
+ var L;
42580
+ const [R] = ((L = N == null ? void 0 : N.split) == null ? void 0 : L.call(N, "||")) || [];
42503
42581
  if (!R)
42504
42582
  return;
42505
42583
  const O = findByUid(c, R), $ = createDesignable({
@@ -43887,14 +43965,14 @@ const FieldsTreeSelect = (e) => {
43887
43965
  const $ = O.split(".");
43888
43966
  let A = h[$[0]];
43889
43967
  for (let E = 1; E < $.length && A; E++) {
43890
- const z = $.slice(0, E + 1).join(".");
43891
- if (h[z]) {
43892
- A = h[z];
43968
+ const L = $.slice(0, E + 1).join(".");
43969
+ if (h[L]) {
43970
+ A = h[L];
43893
43971
  break;
43894
43972
  }
43895
43973
  if (!A.isLeaf && A.loadChildren) {
43896
43974
  const V = A.loadChildren(A);
43897
- V != null && V.length && (R.push(...V), A = V.find((L) => L.value === $.slice(0, E + 1).join(".")));
43975
+ V != null && V.length && (R.push(...V), A = V.find((z) => z.value === $.slice(0, E + 1).join(".")));
43898
43976
  }
43899
43977
  }
43900
43978
  }), g((O) => R.reduce(($, A) => Object.assign($, { [A.value]: A }), x({}, O)));
@@ -43915,19 +43993,19 @@ const FieldsTreeSelect = (e) => {
43915
43993
  u && R.forEach((A) => {
43916
43994
  const E = A.split(".");
43917
43995
  if (E.length)
43918
- for (let z = 1; z <= E.length; z++)
43919
- O.add(E.slice(0, z).join("."));
43996
+ for (let L = 1; L <= E.length; L++)
43997
+ O.add(E.slice(0, L).join("."));
43920
43998
  });
43921
43999
  o(Array.from(O));
43922
44000
  },
43923
44001
  [e.multiple, F, o, h]
43924
44002
  ), D = useCallback(
43925
44003
  (j) => {
43926
- var z;
44004
+ var L;
43927
44005
  const { value: R, onClose: O, disabled: $, closable: A } = j;
43928
44006
  if (!R)
43929
44007
  return null;
43930
- const { fullTitle: E } = (z = h[R]) != null ? z : {};
44008
+ const { fullTitle: E } = (L = h[R]) != null ? L : {};
43931
44009
  return /* @__PURE__ */ jsx(Tag, { closable: A && !$, onClose: O, children: E == null ? void 0 : E.join(" / ") });
43932
44010
  },
43933
44011
  [h]
@@ -43986,9 +44064,9 @@ const InternalAssociationSelect$1 = observer$1(
43986
44064
  const N = uid();
43987
44065
  return f.addEffects(N, () => {
43988
44066
  onFieldInputValueChange("*", (M) => {
43989
- var $, A, E, z, V, L;
44067
+ var $, A, E, L, V, z;
43990
44068
  const j = filterAnalyses((E = (A = ($ = r.componentProps) == null ? void 0 : $.service) == null ? void 0 : A.params) == null ? void 0 : E.filter) || [], R = getFieldPath(M.address.entire), O = getFieldPath(r.address.entire);
43991
- j.includes((z = M == null ? void 0 : M.props) == null ? void 0 : z.name) && r.value && isEqual(M == null ? void 0 : M.indexes, r == null ? void 0 : r.indexes) && ((V = M == null ? void 0 : M.props) == null ? void 0 : V.name) !== r.props.name && (!((L = r == null ? void 0 : r.indexes) != null && L.length) || isEqual(R, O)) && (r.setValue(null), p(null));
44069
+ j.includes((L = M == null ? void 0 : M.props) == null ? void 0 : L.name) && r.value && isEqual(M == null ? void 0 : M.indexes, r == null ? void 0 : r.indexes) && ((V = M == null ? void 0 : M.props) == null ? void 0 : V.name) !== r.props.name && (!((z = r == null ? void 0 : r.indexes) != null && z.length) || isEqual(R, O)) && (r.setValue(null), p(null));
43992
44070
  });
43993
44071
  }), () => {
43994
44072
  f.removeEffects(N);
@@ -45159,14 +45237,14 @@ const InternalFileManager = (e) => {
45159
45237
  let O = p(R[y.label]);
45160
45238
  if (($ = v == null ? void 0 : v.uiSchema) != null && $.enum)
45161
45239
  if (Array.isArray(O))
45162
- O = O.map((z, V) => {
45240
+ O = O.map((L, V) => {
45163
45241
  var G, H;
45164
- const L = (H = (G = v.uiSchema.enum).find) == null ? void 0 : H.call(G, (U) => U.value === z);
45165
- return L ? /* @__PURE__ */ jsx(Tag, { color: L.color, style: { marginRight: 3 }, children: (L == null ? void 0 : L.label) || z }, V) : /* @__PURE__ */ jsx(Tag, { children: z }, z);
45242
+ const z = (H = (G = v.uiSchema.enum).find) == null ? void 0 : H.call(G, (U) => U.value === L);
45243
+ return z ? /* @__PURE__ */ jsx(Tag, { color: z.color, style: { marginRight: 3 }, children: (z == null ? void 0 : z.label) || L }, V) : /* @__PURE__ */ jsx(Tag, { children: L }, L);
45166
45244
  }).reverse();
45167
45245
  else {
45168
- const z = (E = (A = v.uiSchema.enum).find) == null ? void 0 : E.call(A, (V) => V.value === O);
45169
- z && (O = /* @__PURE__ */ jsx(Tag, { color: z.color, children: z.label }));
45246
+ const L = (E = (A = v.uiSchema.enum).find) == null ? void 0 : E.call(A, (V) => V.value === O);
45247
+ L && (O = /* @__PURE__ */ jsx(Tag, { color: L.color, children: L.label }));
45170
45248
  }
45171
45249
  return (v == null ? void 0 : v.type) === "date" && (O = dayjs(O).format("YYYY-MM-DD")), n ? n({
45172
45250
  [y.label]: O || EMPTY,
@@ -45202,10 +45280,10 @@ const InternalFileManager = (e) => {
45202
45280
  var $, A, E;
45203
45281
  if (j) {
45204
45282
  d(!0);
45205
- const z = yield T({ parentId: R == null ? void 0 : R.key });
45206
- if (d(!1), c(z), O === (a == null ? void 0 : a.length) - 1 && (($ = R == null ? void 0 : R.value) != null && $.id)) {
45207
- const V = yield T({ parentId: (A = R == null ? void 0 : R.value) == null ? void 0 : A.id }), L = [...a];
45208
- L.splice(O + 1), L[O] = P(x({}, L[O]), { value: R == null ? void 0 : R.value }), L[O + 1] = { key: (E = R == null ? void 0 : R.value) == null ? void 0 : E.id, children: (V == null ? void 0 : V.length) > 0 ? V : null }, i(L), o == null || o(L);
45283
+ const L = yield T({ parentId: R == null ? void 0 : R.key });
45284
+ if (d(!1), c(L), O === (a == null ? void 0 : a.length) - 1 && (($ = R == null ? void 0 : R.value) != null && $.id)) {
45285
+ const V = yield T({ parentId: (A = R == null ? void 0 : R.value) == null ? void 0 : A.id }), z = [...a];
45286
+ z.splice(O + 1), z[O] = P(x({}, z[O]), { value: R == null ? void 0 : R.value }), z[O + 1] = { key: (E = R == null ? void 0 : R.value) == null ? void 0 : E.id, children: (V == null ? void 0 : V.length) > 0 ? V : null }, i(z), o == null || o(z);
45209
45287
  }
45210
45288
  }
45211
45289
  }), N = (j, R) => q(void 0, null, function* () {
@@ -45239,7 +45317,7 @@ const InternalFileManager = (e) => {
45239
45317
  onSearch: (E) => N(E, j),
45240
45318
  fieldNames: y,
45241
45319
  style: { minWidth: 150 },
45242
- onChange: (E, z) => D(E, z, R),
45320
+ onChange: (E, L) => D(E, L, R),
45243
45321
  options: u ? [] : w(l),
45244
45322
  onDropdownVisibleChange: (E) => B(E, j, R),
45245
45323
  notFoundContent: u ? /* @__PURE__ */ jsx(Spin, { size: "small" }) : null
@@ -45550,10 +45628,10 @@ const useTableSelectorProps$2 = () => {
45550
45628
  });
45551
45629
  }, InternalPicker = observer$1(
45552
45630
  (e) => {
45553
- var z;
45554
- const E = e, { value: t, multiple: n, openSize: o, onChange: r, quickUpload: a, selectFile: i, shouldMountElement: l } = E, c = W(E, ["value", "multiple", "openSize", "onChange", "quickUpload", "selectFile", "shouldMountElement"]), u = useField(), d = useFieldNames$1(e), [p, m] = useState(!1), h = useFieldSchema(), g = useInsertSchema$1("Selector"), { options: f } = useAssociationFieldContext(), { collectionName: C } = useFormBlockContext(), b = useCompile(), S = useLabelUiSchema$1(f, (d == null ? void 0 : d.label) || "label"), y = h["x-add-new"], [v, I] = useState([]), F = useCollectionRecordData(), w = useMemo(() => t && Object.keys(t).length > 0 ? (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((L) => {
45555
- const G = L == null ? void 0 : L[d.label];
45556
- return P(x({}, L), {
45631
+ var L;
45632
+ const E = e, { value: t, multiple: n, openSize: o, onChange: r, quickUpload: a, selectFile: i, shouldMountElement: l } = E, c = W(E, ["value", "multiple", "openSize", "onChange", "quickUpload", "selectFile", "shouldMountElement"]), u = useField(), d = useFieldNames$1(e), [p, m] = useState(!1), h = useFieldSchema(), g = useInsertSchema$1("Selector"), { options: f } = useAssociationFieldContext(), { collectionName: C } = useFormBlockContext(), b = useCompile(), S = useLabelUiSchema$1(f, (d == null ? void 0 : d.label) || "label"), y = h["x-add-new"], [v, I] = useState([]), F = useCollectionRecordData(), w = useMemo(() => t && Object.keys(t).length > 0 ? (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((z) => {
45633
+ const G = z == null ? void 0 : z[d.label];
45634
+ return P(x({}, z), {
45557
45635
  [d.label]: getLabelFormatValue$1(b(S), b(G))
45558
45636
  });
45559
45637
  }) : [], [t == null ? void 0 : t.length, d.label]), T = {
@@ -45571,28 +45649,28 @@ const useTableSelectorProps$2 = () => {
45571
45649
  currentFormCollection: C
45572
45650
  }, { isMobileLayout: D } = useMobileLayout(), B = () => {
45573
45651
  var V;
45574
- return n == null ? null : Array.isArray(t) ? (V = t.filter(Boolean)) == null ? void 0 : V.map((L) => L == null ? void 0 : L[d.value]) : t == null ? void 0 : t[d.value];
45652
+ return n == null ? null : Array.isArray(t) ? (V = t.filter(Boolean)) == null ? void 0 : V.map((z) => z == null ? void 0 : z[d.value]) : t == null ? void 0 : t[d.value];
45575
45653
  }, N = () => {
45576
45654
  var V;
45577
- return n == null ? null : Array.isArray(t) ? (V = t.filter(Boolean)) == null ? void 0 : V.map((L) => ({
45578
- [d.label]: b(L == null ? void 0 : L[d.label]),
45579
- [d.value]: L == null ? void 0 : L[d.value]
45655
+ return n == null ? null : Array.isArray(t) ? (V = t.filter(Boolean)) == null ? void 0 : V.map((z) => ({
45656
+ [d.label]: b(z == null ? void 0 : z[d.label]),
45657
+ [d.value]: z == null ? void 0 : z[d.value]
45580
45658
  })) : [{ [d.label]: b(t == null ? void 0 : t[d.label]), [d.value]: t == null ? void 0 : t[d.value] }];
45581
45659
  }, M = () => {
45582
- const V = (f == null ? void 0 : f.targetKey) || "id", L = w.map((H) => H[V]).filter(Boolean);
45583
- return L.length ? { $and: [{ [`${V}.$ne`]: L }] } : {};
45660
+ const V = (f == null ? void 0 : f.targetKey) || "id", z = w.map((H) => H[V]).filter(Boolean);
45661
+ return z.length ? { $and: [{ [`${V}.$ne`]: z }] } : {};
45584
45662
  };
45585
45663
  useEffect(() => {
45586
45664
  t || I([]);
45587
45665
  }, [t]);
45588
45666
  const j = () => {
45589
- const { setVisible: V } = useActionContext(), { multiple: L, selectedRows: G, onChange: H, options: U, collectionField: K } = useContext(RecordPickerContext);
45667
+ const { setVisible: V } = useActionContext(), { multiple: z, selectedRows: G, onChange: H, options: U, collectionField: K } = useContext(RecordPickerContext);
45590
45668
  return {
45591
45669
  onClick() {
45592
- H(L ? unionBy(G, U, (K == null ? void 0 : K.targetKey) || "id") : (G == null ? void 0 : G[0]) || null), V(!1);
45670
+ H(z ? unionBy(G, U, (K == null ? void 0 : K.targetKey) || "id") : (G == null ? void 0 : G[0]) || null), V(!1);
45593
45671
  },
45594
45672
  style: {
45595
- display: L === !1 ? "none" : "block"
45673
+ display: z === !1 ? "none" : "block"
45596
45674
  }
45597
45675
  };
45598
45676
  }, R = useMemo(
@@ -45632,12 +45710,12 @@ const useTableSelectorProps$2 = () => {
45632
45710
  r([]), I([]);
45633
45711
  return;
45634
45712
  }
45635
- const L = w == null ? void 0 : w.filter((G) => V.includes(G[d.value]));
45636
- r(L), I(L);
45713
+ const z = w == null ? void 0 : w.filter((G) => V.includes(G[d.value]));
45714
+ r(z), I(z);
45637
45715
  }
45638
45716
  } else {
45639
- const L = n ? [] : null;
45640
- r(L), I(L);
45717
+ const z = n ? [] : null;
45718
+ r(z), I(z);
45641
45719
  }
45642
45720
  },
45643
45721
  options: N(),
@@ -45659,7 +45737,7 @@ const useTableSelectorProps$2 = () => {
45659
45737
  ActionContextProvider,
45660
45738
  {
45661
45739
  value: {
45662
- openSize: ((z = h["x-component-props"]) == null ? void 0 : z.openSize) || o,
45740
+ openSize: ((L = h["x-component-props"]) == null ? void 0 : L.openSize) || o,
45663
45741
  openMode: "drawer",
45664
45742
  visible: p,
45665
45743
  setVisible: m
@@ -47086,7 +47164,7 @@ const Table$1 = withDynamicSchemaProps(
47086
47164
  "onClickRow",
47087
47165
  "enableIndexColumn"
47088
47166
  ]), y = useArrayField(S), v = useFieldSchema(), { size: I = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, F = useCollection(), T = ((fe = v == null ? void 0 : v.parent) == null ? void 0 : fe["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: B } = T, N = useMemoizedFn(S.onRowDragEnd || (() => {
47089
- })), M = usePaginationProps$2(n, a), j = useTableColumns$1(S, M), [R, O] = useState(() => D ? B : []), [$, A] = useState(((be = y == null ? void 0 : y.data) == null ? void 0 : be.selectedRowKeys) || []), [E, z] = useState([]), V = (p == null ? void 0 : p.type) !== "none", L = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
47167
+ })), M = usePaginationProps$2(n, a), j = useTableColumns$1(S, M), [R, O] = useState(() => D ? B : []), [$, A] = useState(((be = y == null ? void 0 : y.data) == null ? void 0 : be.selectedRowKeys) || []), [E, L] = useState([]), V = (p == null ? void 0 : p.type) !== "none", z = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
47090
47168
  & > td {
47091
47169
  background-color: ${t.controlItemBgActive} !important;
47092
47170
  }
@@ -47095,7 +47173,7 @@ const Table$1 = withDynamicSchemaProps(
47095
47173
  }
47096
47174
  `, [t.controlItemBgActive, t.controlItemBgActiveHover]), H = useMemo(() => C ? G : "", [G, C]), U = useMemo(() => C ? (ie, te) => ({
47097
47175
  onClick: (oe) => {
47098
- isPortalInBody(oe.target) || C(ie, z, E);
47176
+ isPortalInBody(oe.target) || C(ie, L, E);
47099
47177
  },
47100
47178
  rowIndex: te
47101
47179
  }) : null, [C, E]);
@@ -47108,10 +47186,10 @@ const Table$1 = withDynamicSchemaProps(
47108
47186
  return Y(ie);
47109
47187
  if (ie.key)
47110
47188
  return ie.key;
47111
- if (L.current.has(ie))
47112
- return L.current.get(ie);
47189
+ if (z.current.has(ie))
47190
+ return z.current.get(ie);
47113
47191
  const te = uid();
47114
- return L.current.set(ie, te), te;
47192
+ return z.current.set(ie, te), te;
47115
47193
  }, []), Y = useCallback(
47116
47194
  (ie) => {
47117
47195
  var te;
@@ -47312,23 +47390,23 @@ const Table$1 = withDynamicSchemaProps(
47312
47390
  }
47313
47391
  `, SubTable = observer$1(
47314
47392
  (e) => {
47315
- var A, E, z;
47393
+ var A, E, L;
47316
47394
  const { openSize: t } = e, { field: n, options: o, fieldSchema: r } = useAssociationFieldContext(), { t: a } = useTranslation(), [i, l] = useState(!1), [c, u] = useState([]), d = useFieldNames$1(e), p = useFieldSchema(), m = useCompile(), h = useLabelUiSchema$1(o, (d == null ? void 0 : d.label) || "label"), g = useCollectionRecord(), f = useCollection(), { allowSelectExistingRecord: C, allowAddnew: b, allowDisassociation: S, enableIndexColumn: y } = n.componentProps;
47317
47395
  useSubTableSpecialCase({ rootField: n, rootSchema: r });
47318
- const v = (V, L) => {
47319
- if (L !== void 0 && isArr(n.value) && V !== L)
47396
+ const v = (V, z) => {
47397
+ if (z !== void 0 && isArr(n.value) && V !== z)
47320
47398
  return action(() => {
47321
47399
  const G = n.value[V];
47322
- return n.value.splice(V, 1), n.value.splice(L, 0, G), exchangeArrayState(n, {
47400
+ return n.value.splice(V, 1), n.value.splice(z, 0, G), exchangeArrayState(n, {
47323
47401
  fromIndex: V,
47324
- toIndex: L
47402
+ toIndex: z
47325
47403
  }), n.onInput(n.value);
47326
47404
  });
47327
47405
  };
47328
47406
  n.move = v;
47329
- const I = useMemo(() => n.value && Object.keys(n.value).length > 0 ? (Array.isArray(n.value) ? n.value : n.value ? [n.value] : []).filter(Boolean).map((L) => {
47330
- const G = L == null ? void 0 : L[d.label];
47331
- return P(x({}, L), {
47407
+ const I = useMemo(() => n.value && Object.keys(n.value).length > 0 ? (Array.isArray(n.value) ? n.value : n.value ? [n.value] : []).filter(Boolean).map((z) => {
47408
+ const G = z == null ? void 0 : z[d.label];
47409
+ return P(x({}, z), {
47332
47410
  [d.label]: getLabelFormatValue$1(m(h), m(G))
47333
47411
  });
47334
47412
  }) : [], [n.value, d == null ? void 0 : d.label]), F = {
@@ -47344,26 +47422,26 @@ const Table$1 = withDynamicSchemaProps(
47344
47422
  setSelectedRows: u,
47345
47423
  collectionField: o
47346
47424
  }, w = () => {
47347
- const { setVisible: V } = useActionContext(), { selectedRows: L, setSelectedRows: G } = useContext(RecordPickerContext);
47425
+ const { setVisible: V } = useActionContext(), { selectedRows: z, setSelectedRows: G } = useContext(RecordPickerContext);
47348
47426
  return {
47349
47427
  onClick() {
47350
47428
  var U;
47351
- Array.isArray(n.value) || (n.value = []), L.forEach((K) => n.value.push(markRecordAsNew(K))), n.onInput(n.value), n.initialValue = n.value, G([]), V(!1);
47429
+ Array.isArray(n.value) || (n.value = []), z.forEach((K) => n.value.push(markRecordAsNew(K))), n.onInput(n.value), n.initialValue = n.value, G([]), V(!1);
47352
47430
  const H = Math.ceil(n.value.length / (((U = n.componentProps) == null ? void 0 : U.pageSize) || 10));
47353
47431
  B(H);
47354
47432
  }
47355
47433
  };
47356
47434
  }, T = () => {
47357
- const V = (o == null ? void 0 : o.targetKey) || "id", L = (n.value || []).map((H) => H == null ? void 0 : H[V]).filter(Boolean);
47358
- return L.length ? { $and: [{ [`${V}.$ne`]: L }] } : {};
47435
+ const V = (o == null ? void 0 : o.targetKey) || "id", z = (n.value || []).map((H) => H == null ? void 0 : H[V]).filter(Boolean);
47436
+ return z.length ? { $and: [{ [`${V}.$ne`]: z }] } : {};
47359
47437
  }, [D, B] = useState(1), [N, M] = useState(((A = n.componentProps) == null ? void 0 : A.pageSize) || 10), { setFormValueChanged: j } = useActionContext();
47360
47438
  useEffect(() => {
47361
47439
  var V;
47362
47440
  M((V = n.componentProps) == null ? void 0 : V.pageSize);
47363
47441
  }, [(E = n.componentProps) == null ? void 0 : E.pageSize]);
47364
47442
  const R = useMemo(() => {
47365
- var L;
47366
- const V = Math.ceil(((L = n.value) == null ? void 0 : L.length) / 10);
47443
+ var z;
47444
+ const V = Math.ceil(((z = n.value) == null ? void 0 : z.length) / 10);
47367
47445
  return {
47368
47446
  current: D > V ? V : D,
47369
47447
  pageSize: N || 10,
@@ -47375,14 +47453,14 @@ const Table$1 = withDynamicSchemaProps(
47375
47453
  pageSizeOptions: ["10", "20", "50", "100"],
47376
47454
  hideOnSinglePage: !1
47377
47455
  };
47378
- }, [(z = n.value) == null ? void 0 : z.length, N, D]), O = () => {
47456
+ }, [(L = n.value) == null ? void 0 : L.length, N, D]), O = () => {
47379
47457
  const { field: V } = useAssociationFieldContext();
47380
47458
  return {
47381
47459
  run() {
47382
47460
  var G;
47383
47461
  V.value = V.value || [], V.value.push(markRecordAsNew({}));
47384
- const L = Math.ceil(V.value.length / (((G = V.componentProps) == null ? void 0 : G.pageSize) || 10));
47385
- return B(L), V.onInput(V.value);
47462
+ const z = Math.ceil(V.value.length / (((G = V.componentProps) == null ? void 0 : G.pageSize) || 10));
47463
+ return B(z), V.onInput(V.value);
47386
47464
  }
47387
47465
  };
47388
47466
  }, $ = () => ({
@@ -47566,10 +47644,10 @@ const ReadPretty$6 = observer$1(
47566
47644
  InternalAssociationSelect.displayName = "InternalAssociationSelect";
47567
47645
  const AssociationSelect = InternalAssociationSelect;
47568
47646
  AssociationSelect.Designer = function e() {
47569
- var O, $, A, E, z, V, L, G, H, U, K;
47647
+ var O, $, A, E, L, V, z, G, H, U, K;
47570
47648
  const { getCollectionFields: t, getInterface: n, getCollectionJoinField: o, getCollection: r, isTitleField: a } = useCollectionManager_deprecated(), { getField: i } = useCollection_deprecated(), { form: l } = useFormBlockContext(), c = useField(), u = useFieldSchema(), { t: d } = useTranslation(), p = useFilterByTk(), { dn: m, refresh: h, insertAdjacent: g } = useDesignable(), f = useCompile(), C = useIsShowMultipleSwitch(), { isAllowToSetDefaultValue: b } = useIsAllowToSetDefaultValue(), S = i(u.name) || o(u["x-collection-field"]), y = useFieldComponentOptions(), v = c.address.segments.includes("__form_grid"), I = n(S == null ? void 0 : S.interface), F = (O = I == null ? void 0 : I.validateSchema) == null ? void 0 : O.call(I, u), w = ($ = S == null ? void 0 : S.uiSchema) == null ? void 0 : $.title, T = S != null && S.target ? t(S == null ? void 0 : S.target) : [];
47571
47649
  c.title === w || c.title;
47572
- const D = useSortFields(S == null ? void 0 : S.target), B = ((z = (E = (A = c.componentProps) == null ? void 0 : A.service) == null ? void 0 : E.params) == null ? void 0 : z.sort) || [];
47650
+ const D = useSortFields(S == null ? void 0 : S.target), B = ((L = (E = (A = c.componentProps) == null ? void 0 : A.service) == null ? void 0 : E.params) == null ? void 0 : L.sort) || [];
47573
47651
  useEffect(() => {
47574
47652
  c.readPretty !== u["x-read-pretty"] && (c.readPretty = !!u["x-read-pretty"]);
47575
47653
  }, [u["x-read-pretty"]]);
@@ -47796,7 +47874,7 @@ AssociationSelect.Designer = function e() {
47796
47874
  SchemaSettingsDataScope,
47797
47875
  {
47798
47876
  collectionName: S == null ? void 0 : S.target,
47799
- defaultFilter: ((H = (G = (L = c.componentProps) == null ? void 0 : L.service) == null ? void 0 : G.params) == null ? void 0 : H.filter) || {},
47877
+ defaultFilter: ((H = (G = (z = c.componentProps) == null ? void 0 : z.service) == null ? void 0 : G.params) == null ? void 0 : H.filter) || {},
47800
47878
  form: l,
47801
47879
  onSubmit: ({ filter: Y }) => {
47802
47880
  Y = removeNullCondition(Y), _.set(c.componentProps, "service.params.filter", Y), u["x-component-props"] = c.componentProps, m.emit("patch", {
@@ -48074,16 +48152,16 @@ AssociationSelect.FilterDesigner = function e() {
48074
48152
  onSubmit: ($) => {
48075
48153
  var V;
48076
48154
  const A = [];
48077
- for (const L of $.rules)
48078
- A.push(_.pickBy(L, _.identity));
48155
+ for (const z of $.rules)
48156
+ A.push(_.pickBy(z, _.identity));
48079
48157
  const E = {
48080
48158
  "x-uid": l["x-uid"]
48081
48159
  };
48082
48160
  if (["percent"].includes(m == null ? void 0 : m.interface))
48083
- for (const L of A)
48084
- (L.maxValue || L.minValue) && (L.percentMode = !0), L.percentFormat && (L.percentFormats = !0);
48085
- const z = _.concat([], ((V = m == null ? void 0 : m.uiSchema) == null ? void 0 : V["x-validator"]) || [], A);
48086
- i.validator = z, l["x-validator"] = A, E["x-validator"] = A, u.emit("patch", {
48161
+ for (const z of A)
48162
+ (z.maxValue || z.minValue) && (z.percentMode = !0), z.percentFormat && (z.percentFormats = !0);
48163
+ const L = _.concat([], ((V = m == null ? void 0 : m.uiSchema) == null ? void 0 : V["x-validator"]) || [], A);
48164
+ i.validator = L, l["x-validator"] = A, E["x-validator"] = A, u.emit("patch", {
48087
48165
  schema: E
48088
48166
  }), d();
48089
48167
  }
@@ -48224,10 +48302,10 @@ AssociationSelect.FilterDesigner = function e() {
48224
48302
  options: v,
48225
48303
  value: (O = (R = i == null ? void 0 : i.componentProps) == null ? void 0 : R.fieldNames) == null ? void 0 : O.label,
48226
48304
  onChange: ($) => {
48227
- var z, V;
48305
+ var L, V;
48228
48306
  const A = {
48229
48307
  "x-uid": l["x-uid"]
48230
- }, E = P(x(x({}, (V = (z = m == null ? void 0 : m.uiSchema) == null ? void 0 : z["x-component-props"]) == null ? void 0 : V.fieldNames), i.componentProps.fieldNames), {
48308
+ }, E = P(x(x({}, (V = (L = m == null ? void 0 : m.uiSchema) == null ? void 0 : L["x-component-props"]) == null ? void 0 : V.fieldNames), i.componentProps.fieldNames), {
48231
48309
  label: $
48232
48310
  });
48233
48311
  i.componentProps.fieldNames = E, l["x-component-props"] = l["x-component-props"] || {}, l["x-component-props"].fieldNames = E, A["x-component-props"] = l["x-component-props"], u.emit("patch", {
@@ -50334,7 +50412,7 @@ const InternalListBlockProvider = (e) => {
50334
50412
  display: none !important;
50335
50413
  }
50336
50414
  `,
50337
- itemRender: (A, E, z) => E === "prev" ? /* @__PURE__ */ jsxs(
50415
+ itemRender: (A, E, L) => E === "prev" ? /* @__PURE__ */ jsxs(
50338
50416
  "div",
50339
50417
  {
50340
50418
  style: { display: "flex" },
@@ -50344,12 +50422,12 @@ const InternalListBlockProvider = (e) => {
50344
50422
  }
50345
50423
  `,
50346
50424
  children: [
50347
- z,
50425
+ L,
50348
50426
  " ",
50349
50427
  /* @__PURE__ */ jsx("div", { style: { marginLeft: "7px" }, children: d })
50350
50428
  ]
50351
50429
  }
50352
- ) : z
50430
+ ) : L
50353
50431
  };
50354
50432
  })();
50355
50433
  return useMobileLayout(), h(
@@ -52287,9 +52365,9 @@ const TableActionColumnDesigner = (e) => {
52287
52365
  defaultChecked: !0,
52288
52366
  checked: S ? r.decoratorProps.treeTable : !1,
52289
52367
  onChange: (A) => {
52290
- var z;
52368
+ var L;
52291
52369
  r.decoratorProps.treeTable = A, a["x-decorator-props"].treeTable = A;
52292
- const E = P(x({}, (z = c.params) == null ? void 0 : z[0]), {
52370
+ const E = P(x({}, (L = c.params) == null ? void 0 : L[0]), {
52293
52371
  tree: A ? !0 : null
52294
52372
  });
52295
52373
  d.emit("patch", {
@@ -52420,8 +52498,8 @@ const TableActionColumnDesigner = (e) => {
52420
52498
  },
52421
52499
  onSubmit: ({ sort: A }) => {
52422
52500
  var V;
52423
- const E = A.map((L) => L.direction === "desc" ? `-${L.field}` : L.field), z = r.decoratorProps.params || {};
52424
- z.sort = E, r.decoratorProps.params = z, a["x-decorator-props"].params = z, d.emit("patch", {
52501
+ const E = A.map((z) => z.direction === "desc" ? `-${z.field}` : z.field), L = r.decoratorProps.params || {};
52502
+ L.sort = E, r.decoratorProps.params = L, a["x-decorator-props"].params = L, d.emit("patch", {
52425
52503
  schema: {
52426
52504
  "x-uid": a["x-uid"],
52427
52505
  "x-decorator-props": a["x-decorator-props"]
@@ -52445,9 +52523,9 @@ const TableActionColumnDesigner = (e) => {
52445
52523
  { label: "200", value: 200 }
52446
52524
  ],
52447
52525
  onChange: (A) => {
52448
- var z;
52526
+ var L;
52449
52527
  const E = r.decoratorProps.params || {};
52450
- E.pageSize = A, r.decoratorProps.params = E, a["x-decorator-props"].params = E, c.run(P(x({}, (z = c.params) == null ? void 0 : z[0]), { pageSize: A, page: 1 })), d.emit("patch", {
52528
+ E.pageSize = A, r.decoratorProps.params = E, a["x-decorator-props"].params = E, c.run(P(x({}, (L = c.params) == null ? void 0 : L[0]), { pageSize: A, page: 1 })), d.emit("patch", {
52451
52529
  schema: {
52452
52530
  "x-uid": a["x-uid"],
52453
52531
  "x-decorator-props": a["x-decorator-props"]
@@ -52467,7 +52545,7 @@ const TableActionColumnDesigner = (e) => {
52467
52545
  { label: u("Small"), value: "small" }
52468
52546
  ],
52469
52547
  onChange: (A) => {
52470
- const E = a.reduceProperties((z, V) => {
52548
+ const E = a.reduceProperties((L, V) => {
52471
52549
  if (V["x-component"] === "TableV2")
52472
52550
  return V;
52473
52551
  }, null);
@@ -54599,8 +54677,8 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
54599
54677
  const R = x({}, j), O = (E) => {
54600
54678
  if (Array.isArray(E))
54601
54679
  return E.filter(Boolean);
54602
- const z = String(E != null ? E : "").trim();
54603
- return z ? z.split(/[\s,]+/).map((V) => V.trim()).filter(Boolean) : [];
54680
+ const L = String(E != null ? E : "").trim();
54681
+ return L ? L.split(/[\s,]+/).map((V) => V.trim()).filter(Boolean) : [];
54604
54682
  }, $ = R.tlds;
54605
54683
  let A = "iana";
54606
54684
  if ($ === "iana" || $ === !0 || $ === "true" ? A = "iana" : $ === "disable" || $ === !1 || $ === "false" ? A = "disable" : $ === "allow" ? A = "allow" : $ === "deny" ? A = "deny" : $ && typeof $ == "object" && ($.allow === !0 ? A = "iana" : Array.isArray($.allow) ? A = "allow" : Array.isArray($.deny) ? A = "deny" : A = "iana"), A === "iana")
@@ -54662,16 +54740,16 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
54662
54740
  const j = [];
54663
54741
  try {
54664
54742
  g.forEach(($) => {
54665
- const A = S.find((z) => z.key === $.name);
54743
+ const A = S.find((L) => L.key === $.name);
54666
54744
  if (!A || !A.params)
54667
54745
  return;
54668
54746
  let E = !1;
54669
- A.params.forEach((z) => {
54670
- var L, G;
54671
- if (!z.required)
54747
+ A.params.forEach((L) => {
54748
+ var z, G;
54749
+ if (!L.required)
54672
54750
  return;
54673
- const V = (G = (L = $.args) == null ? void 0 : L[z.key]) != null ? G : z.defaultValue;
54674
- b(z.componentType, V) && (M = !0, E = !0);
54751
+ const V = (G = (z = $.args) == null ? void 0 : z[L.key]) != null ? G : L.defaultValue;
54752
+ b(L.componentType, V) && (M = !0, E = !0);
54675
54753
  }), E && j.push($.key);
54676
54754
  });
54677
54755
  } catch ($) {
@@ -54708,11 +54786,11 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
54708
54786
  const O = g.map((A) => {
54709
54787
  var E;
54710
54788
  if (A.key === M) {
54711
- let z = P(x({}, A.args), { [j]: R });
54712
- z = f(A.name, z);
54713
- const V = S.find((L) => L.key === A.name);
54789
+ let L = P(x({}, A.args), { [j]: R });
54790
+ L = f(A.name, L);
54791
+ const V = S.find((z) => z.key === A.name);
54714
54792
  return P(x({}, A), {
54715
- args: z,
54793
+ args: L,
54716
54794
  paramsType: (E = V == null ? void 0 : V.paramsType) != null ? E : A.paramsType
54717
54795
  });
54718
54796
  }
@@ -54728,7 +54806,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
54728
54806
  }, T = (M) => {
54729
54807
  const j = S.find((R) => R.key === M.name);
54730
54808
  return j ? !j.hasValue || j.params.length === 0 ? /* @__PURE__ */ jsx("div", { style: { color: c.colorTextSecondary }, children: l("This validation rule has no additional parameters") }) : /* @__PURE__ */ jsx(Form$2, { size: "small", children: j.params.map((R) => {
54731
- var A, E, z, V, L, G, H;
54809
+ var A, E, L, V, z, G, H;
54732
54810
  let O = (E = (A = M.args) == null ? void 0 : A[R.key]) != null ? E : R.defaultValue;
54733
54811
  R.componentType === "radio" && R.key === "tlds" && (j.key === "email" || j.key === "domain") && (O = C(M.args));
54734
54812
  const $ = !!R.required && b(R.componentType, O);
@@ -54771,7 +54849,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
54771
54849
  } else
54772
54850
  F(M.key, R.key, U.target.value);
54773
54851
  },
54774
- children: (z = R.options) == null ? void 0 : z.map((U) => /* @__PURE__ */ jsx(Radio$1, { value: U.value, children: l(U.label) }, U.value))
54852
+ children: (L = R.options) == null ? void 0 : L.map((U) => /* @__PURE__ */ jsx(Radio$1, { value: U.value, children: l(U.label) }, U.value))
54775
54853
  }
54776
54854
  ),
54777
54855
  (V = R.options) == null ? void 0 : V.map((U) => {
@@ -54843,7 +54921,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
54843
54921
  placeholder: l("Please select"),
54844
54922
  style: { width: "100%", height: "100%" },
54845
54923
  allowClear: !0,
54846
- children: (L = R.options) == null ? void 0 : L.map((U) => /* @__PURE__ */ jsx(Select$1.Option, { value: U.value, children: l(U.label) }, U.value))
54924
+ children: (z = R.options) == null ? void 0 : z.map((U) => /* @__PURE__ */ jsx(Select$1.Option, { value: U.value, children: l(U.label) }, U.value))
54847
54925
  }
54848
54926
  ),
54849
54927
  (G = R.options) == null ? void 0 : G.map((U) => U.value === O && U.componentType ? /* @__PURE__ */ jsx(Fragment$1, {}) : null)
@@ -55409,20 +55487,20 @@ const supportTypes = ["string", "bigInt", "integer", "uuid", "uid", "nanoid"], S
55409
55487
  })), []), T = useCallback(() => {
55410
55488
  const { availableFieldInterfaces: R } = u(o.template) || {}, { exclude: O, include: $ } = R || {}, A = [];
55411
55489
  return I.forEach((E) => {
55412
- var z;
55490
+ var L;
55413
55491
  if (E.key === "systemInfo")
55414
55492
  A.push(P(x({}, E), {
55415
55493
  children: E.children.filter((V) => V.hidden ? !1 : V.value === "tableoid" ? $ != null && $.length ? $.includes(V.value) : (l == null ? void 0 : l.dialect) === "postgres" : typeof o[V.value] == "boolean" ? o[V.value] : !0)
55416
55494
  }));
55417
55495
  else {
55418
55496
  let V = [];
55419
- $ != null && $.length ? $.forEach((L) => {
55497
+ $ != null && $.length ? $.forEach((z) => {
55420
55498
  var H;
55421
- const G = (H = E == null ? void 0 : E.children) == null ? void 0 : H.find((U) => [L, L.interface].includes(U.name));
55499
+ const G = (H = E == null ? void 0 : E.children) == null ? void 0 : H.find((U) => [z, z.interface].includes(U.name));
55422
55500
  G && V.push(P(x({}, G), {
55423
- targetScope: L == null ? void 0 : L.targetScope
55501
+ targetScope: z == null ? void 0 : z.targetScope
55424
55502
  }));
55425
- }) : O != null && O.length ? V = (z = E == null ? void 0 : E.children) == null ? void 0 : z.filter((L) => !O.includes(L.name)) : V = E == null ? void 0 : E.children, V != null && V.length && A.push(P(x({}, E), {
55503
+ }) : O != null && O.length ? V = (L = E == null ? void 0 : E.children) == null ? void 0 : L.filter((z) => !O.includes(z.name)) : V = E == null ? void 0 : E.children, V != null && V.length && A.push(P(x({}, E), {
55426
55504
  children: V
55427
55505
  }));
55428
55506
  }
@@ -55717,7 +55795,7 @@ const supportTypes = ["string", "bigInt", "integer", "uuid", "uid", "nanoid"], S
55717
55795
  run() {
55718
55796
  return q(this, null, function* () {
55719
55797
  yield j.submit();
55720
- const z = cloneDeep(j.values), V = omit(z, [
55798
+ const L = cloneDeep(j.values), V = omit(L, [
55721
55799
  "key",
55722
55800
  "uiSchemaUid",
55723
55801
  "collectionName",
@@ -56232,12 +56310,12 @@ const getSchema$4 = (e, t, n) => {
56232
56310
  const R = [];
56233
56311
  g.forEach((O) => {
56234
56312
  var V;
56235
- const $ = v(O), E = w(O).map((L) => {
56236
- const G = T(L, O);
56313
+ const $ = v(O), E = w(O).map((z) => {
56314
+ const G = T(z, O);
56237
56315
  return {
56238
56316
  type: "group",
56239
- key: L,
56240
- label: l("Parent collection fields") + l(`(${v(L).title})`),
56317
+ key: z,
56318
+ label: l("Parent collection fields") + l(`(${v(z).title})`),
56241
56319
  children: G.filter((H) => !["hasOne", "hasMany", "belongsToMany"].includes(H == null ? void 0 : H.type)).map((H) => {
56242
56320
  var U;
56243
56321
  return {
@@ -56246,14 +56324,14 @@ const getSchema$4 = (e, t, n) => {
56246
56324
  };
56247
56325
  })
56248
56326
  };
56249
- }), z = (V = $.fields.filter((L) => !["obo", "oho", "m2m", "o2m"].includes(L == null ? void 0 : L.interface))) == null ? void 0 : V.map((L) => {
56327
+ }), L = (V = $.fields.filter((z) => !["obo", "oho", "m2m", "o2m"].includes(z == null ? void 0 : z.interface))) == null ? void 0 : V.map((z) => {
56250
56328
  var G;
56251
- return { value: L.name, key: L.name, label: l(((G = L.uiSchema) == null ? void 0 : G.title) || L.name) };
56329
+ return { value: z.name, key: z.name, label: l(((G = z.uiSchema) == null ? void 0 : G.title) || z.name) };
56252
56330
  }).concat(E);
56253
56331
  R.push({
56254
56332
  value: O,
56255
56333
  label: l($.title || $.name),
56256
- children: z
56334
+ children: L
56257
56335
  });
56258
56336
  }), h(R);
56259
56337
  }, [g, t]), useEffect(() => {
@@ -56262,21 +56340,21 @@ const getSchema$4 = (e, t, n) => {
56262
56340
  if (R) {
56263
56341
  u(!1), p([]);
56264
56342
  const A = ($ = Object.values((O = R == null ? void 0 : R.data) == null ? void 0 : O.fields)) == null ? void 0 : $.map((E) => {
56265
- var V, L;
56266
- const z = (a == null ? void 0 : a.data.find((G) => G.name === E.name)) || E;
56267
- if (!(z != null && z.uiSchema)) {
56343
+ var V, z;
56344
+ const L = (a == null ? void 0 : a.data.find((G) => G.name === E.name)) || E;
56345
+ if (!(L != null && L.uiSchema)) {
56268
56346
  const G = I(E.interface);
56269
- z.uiSchema = (G == null ? void 0 : G.default.uiSchema) || {};
56347
+ L.uiSchema = (G == null ? void 0 : G.default.uiSchema) || {};
56270
56348
  }
56271
56349
  return E.source ? P(x({}, E), {
56272
- uiSchema: P(x({}, omit(z.uiSchema, "rawTitle")), { title: ((V = z.uiSchema) == null ? void 0 : V.title) || z.name })
56273
- }) : P(x({}, z), {
56274
- uiSchema: P(x({}, omit(z.uiSchema, "rawTitle")), { title: ((L = z.uiSchema) == null ? void 0 : L.title) || z.name })
56350
+ uiSchema: P(x({}, omit(L.uiSchema, "rawTitle")), { title: ((V = L.uiSchema) == null ? void 0 : V.title) || L.name })
56351
+ }) : P(x({}, L), {
56352
+ uiSchema: P(x({}, omit(L.uiSchema, "rawTitle")), { title: ((z = L.uiSchema) == null ? void 0 : z.title) || L.name })
56275
56353
  });
56276
56354
  });
56277
56355
  S.value = A, setTimeout(() => {
56278
- var E, z, V;
56279
- p(A), y.setValuesIn("sources", (E = R.data) == null ? void 0 : E.sources), f((z = R.data) == null ? void 0 : z.sources), b((V = R == null ? void 0 : R.data) == null ? void 0 : V.unsupportedFields);
56356
+ var E, L, V;
56357
+ p(A), y.setValuesIn("sources", (E = R.data) == null ? void 0 : E.sources), f((L = R.data) == null ? void 0 : L.sources), b((V = R == null ? void 0 : R.data) == null ? void 0 : V.unsupportedFields);
56280
56358
  });
56281
56359
  }
56282
56360
  }).catch);
@@ -56284,8 +56362,8 @@ const getSchema$4 = (e, t, n) => {
56284
56362
  const M = (R, O) => {
56285
56363
  const $ = _.cloneDeep(d);
56286
56364
  $[O] = R, p($), S.value = $.map((A) => {
56287
- var z, V, L;
56288
- const E = typeof A.source == "string" ? A.source : (L = (V = (z = A.source) == null ? void 0 : z.filter) == null ? void 0 : V.call(z, Boolean)) == null ? void 0 : L.join(".");
56365
+ var L, V, z;
56366
+ const E = typeof A.source == "string" ? A.source : (z = (V = (L = A.source) == null ? void 0 : L.filter) == null ? void 0 : V.call(L, Boolean)) == null ? void 0 : z.join(".");
56289
56367
  return P(x({}, A), {
56290
56368
  source: E
56291
56369
  });
@@ -56311,8 +56389,8 @@ const getSchema$4 = (e, t, n) => {
56311
56389
  options: D(m),
56312
56390
  onChange: (A, E) => {
56313
56391
  var V;
56314
- const z = (V = F(A == null ? void 0 : A[0])) == null ? void 0 : V.find((L) => L.name === last(A));
56315
- M(P(x({}, O), { source: A, uiSchema: z == null ? void 0 : z.uiSchema }), $);
56392
+ const L = (V = F(A == null ? void 0 : A[0])) == null ? void 0 : V.find((z) => z.name === last(A));
56393
+ M(P(x({}, O), { source: A, uiSchema: L == null ? void 0 : L.uiSchema }), $);
56316
56394
  },
56317
56395
  placeholder: l("Select field source")
56318
56396
  }
@@ -56350,10 +56428,10 @@ const getSchema$4 = (e, t, n) => {
56350
56428
  defaultValue: R,
56351
56429
  style: { width: "100%" },
56352
56430
  popupMatchSelectWidth: !1,
56353
- onChange: (z) => {
56354
- M(P(x({}, A), { interface: z }), $);
56431
+ onChange: (L) => {
56432
+ M(P(x({}, A), { interface: L }), $);
56355
56433
  },
56356
- children: E.map((z) => /* @__PURE__ */ jsx(Select$1.OptGroup, { label: D(z.label), children: z.children.map((V) => /* @__PURE__ */ jsx(Select$1.Option, { value: V.name, children: D(V.label) }, V.value)) }, z.key))
56434
+ children: E.map((L) => /* @__PURE__ */ jsx(Select$1.OptGroup, { label: D(L.label), children: L.children.map((V) => /* @__PURE__ */ jsx(Select$1.Option, { value: V.name, children: D(V.label) }, V.value)) }, L.key))
56357
56435
  }
56358
56436
  );
56359
56437
  }
@@ -56370,8 +56448,8 @@ const getSchema$4 = (e, t, n) => {
56370
56448
  Input$3,
56371
56449
  {
56372
56450
  defaultValue: ((E = A == null ? void 0 : A.uiSchema) == null ? void 0 : E.title) || R,
56373
- onChange: (z) => M(
56374
- P(x({}, A), { uiSchema: P(x({}, omit(A == null ? void 0 : A.uiSchema, "rawTitle")), { title: z.target.value }) }),
56451
+ onChange: (L) => M(
56452
+ P(x({}, A), { uiSchema: P(x({}, omit(A == null ? void 0 : A.uiSchema, "rawTitle")), { title: L.target.value }) }),
56375
56453
  $
56376
56454
  )
56377
56455
  }
@@ -56433,7 +56511,7 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
56433
56511
  key: I.name,
56434
56512
  width: 200,
56435
56513
  render: ($, A, E) => {
56436
- const z = A[I.name], V = {
56514
+ const L = A[I.name], V = {
56437
56515
  type: "object",
56438
56516
  properties: {
56439
56517
  [I.name]: {
@@ -56441,7 +56519,7 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
56441
56519
  "x-component": D && F ? "CollectionField" : "Input",
56442
56520
  "x-read-pretty": !0,
56443
56521
  "x-collection-field": F == null ? void 0 : F.join("."),
56444
- default: I.interface === "json" ? JSON.stringify(z) : z
56522
+ default: I.interface === "json" ? JSON.stringify(L) : L
56445
56523
  }
56446
56524
  }
56447
56525
  };
@@ -56774,7 +56852,7 @@ const AsyncDataProvider = (e) => {
56774
56852
  style: { width: "100%" },
56775
56853
  popupMatchSelectWidth: !1,
56776
56854
  onChange: (j) => {
56777
- var O, $, A, E, z;
56855
+ var O, $, A, E, L;
56778
56856
  const R = p(j);
56779
56857
  S(
56780
56858
  P(x({}, N), {
@@ -56782,7 +56860,7 @@ const AsyncDataProvider = (e) => {
56782
56860
  uiSchema: P(x({}, (O = R == null ? void 0 : R.default) == null ? void 0 : O.uiSchema), {
56783
56861
  title: ((A = ($ = R == null ? void 0 : R.default) == null ? void 0 : $.uiSchema) == null ? void 0 : A.title) || ((E = N.uiSchema) == null ? void 0 : E.title)
56784
56862
  }),
56785
- type: (z = R == null ? void 0 : R.default) == null ? void 0 : z.type
56863
+ type: (L = R == null ? void 0 : R.default) == null ? void 0 : L.type
56786
56864
  }),
56787
56865
  B
56788
56866
  );
@@ -65385,11 +65463,11 @@ const ActionInitializerItem = (e) => {
65385
65463
  (y || X) && g(P(x({}, h == null ? void 0 : h[0]), {
65386
65464
  filter: f
65387
65465
  })), v(!y), Y.stopPropagation();
65388
- }, z = (Y) => {
65466
+ }, L = (Y) => {
65389
65467
  Y.stopPropagation();
65390
65468
  }, V = (Y) => {
65391
65469
  m(Y);
65392
- }, L = (K = i.title) != null ? K : (U = a == null ? void 0 : a.uiSchema) == null ? void 0 : U.title;
65470
+ }, z = (K = i.title) != null ? K : (U = a == null ? void 0 : a.uiSchema) == null ? void 0 : U.title;
65393
65471
  return t(
65394
65472
  /* @__PURE__ */ jsxs(SortableItem, { className: cls(n, o, "nb-block-item", e.className, "SortableItem"), children: [
65395
65473
  /* @__PURE__ */ jsx(l, {}),
@@ -65406,17 +65484,17 @@ const ActionInitializerItem = (e) => {
65406
65484
  },
65407
65485
  gutter: 5,
65408
65486
  children: [
65409
- /* @__PURE__ */ jsx(Col, { title: c(L), className: "headerCol", children: y ? /* @__PURE__ */ jsx(
65487
+ /* @__PURE__ */ jsx(Col, { title: c(z), className: "headerCol", children: y ? /* @__PURE__ */ jsx(
65410
65488
  Input$3,
65411
65489
  {
65412
65490
  bordered: !1,
65413
65491
  autoFocus: !0,
65414
65492
  placeholder: "Search...",
65415
65493
  className: "search",
65416
- onClick: z,
65494
+ onClick: L,
65417
65495
  onChange: V
65418
65496
  }
65419
- ) : c(L) }),
65497
+ ) : c(z) }),
65420
65498
  /* @__PURE__ */ jsx(
65421
65499
  Col,
65422
65500
  {
@@ -65856,21 +65934,21 @@ const DataBlockInitializer = (e) => {
65856
65934
  otherText: S,
65857
65935
  alwaysRenderMenu: y
65858
65936
  } = e, { insert: v, setVisible: I } = useSchemaInitializer(), F = useCompile(), { getTemplateSchemaByMode: w } = useSchemaTemplateManager(), T = useTemplateBlockNotifier(), D = useCallback(
65859
- (z) => q(void 0, null, function* () {
65937
+ (L) => q(void 0, null, function* () {
65860
65938
  T({
65861
- collection: z.item.name,
65862
- dataSource: z.item.dataSource,
65939
+ collection: L.item.name,
65940
+ dataSource: L.item.dataSource,
65863
65941
  componentType: o,
65864
65942
  menuName: a
65865
65943
  });
65866
- const { item: V, fromOthersInPopup: L } = z;
65944
+ const { item: V, fromOthersInPopup: z } = L;
65867
65945
  if (f)
65868
- return f(z);
65946
+ return f(L);
65869
65947
  if (V.template) {
65870
65948
  const G = yield w(V);
65871
- v(t ? t(G, { item: V, fromOthersInPopup: L }) : G);
65949
+ v(t ? t(G, { item: V, fromOthersInPopup: z }) : G);
65872
65950
  } else
65873
- V.schemaInsertor ? yield V.schemaInsertor(v, { item: V, name: a, fromOthersInPopup: L }) : n && n({ item: V, fromOthersInPopup: L });
65951
+ V.schemaInsertor ? yield V.schemaInsertor(v, { item: V, name: a, fromOthersInPopup: z }) : n && n({ item: V, fromOthersInPopup: z });
65874
65952
  I(!1);
65875
65953
  }),
65876
65954
  [
@@ -65899,8 +65977,8 @@ const DataBlockInitializer = (e) => {
65899
65977
  currentText: b,
65900
65978
  otherText: S
65901
65979
  }), N = useGetSchemaInitializerMenuItems(D), M = useMemo(() => N(B, a), [N, B, a]), [j, R] = useState([]), O = useMenuSearch({ data: M, openKeys: j, hideSearch: u }), $ = useMemo(() => {
65902
- let z = O.filter((V) => V.key !== "search" && V.key !== "empty");
65903
- return p && z.length === 1 ? z = z[0].children : z = O, [
65980
+ let L = O.filter((V) => V.key !== "search" && V.key !== "empty");
65981
+ return p && L.length === 1 ? L = L[0].children : L = O, [
65904
65982
  {
65905
65983
  key: a,
65906
65984
  label: F(i),
@@ -65908,15 +65986,15 @@ const DataBlockInitializer = (e) => {
65908
65986
  onClick: (V) => {
65909
65987
  V.key === a && D(P(x({}, V), { item: e }));
65910
65988
  },
65911
- children: z
65989
+ children: L
65912
65990
  }
65913
65991
  ];
65914
65992
  }, [O, p, a, F, i, r, D, e]);
65915
65993
  return M.length > 1 || M.length === 1 && ((E = (A = M[0]) == null ? void 0 : A.children) == null ? void 0 : E.length) > 0 || y ? /* @__PURE__ */ jsx(
65916
65994
  SchemaInitializerMenu,
65917
65995
  {
65918
- onOpenChange: (z) => {
65919
- R(z);
65996
+ onOpenChange: (L) => {
65997
+ R(L);
65920
65998
  },
65921
65999
  items: $
65922
66000
  }