@nocobase/client 1.3.24-beta → 1.3.25-beta

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
@@ -4101,7 +4101,7 @@ function addAppVersion(e, t) {
4101
4101
  addAppVersion((n = e.properties) == null ? void 0 : n[o], t);
4102
4102
  }), e;
4103
4103
  }
4104
- const name = "@nocobase/client", version$1 = "1.3.24-beta", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
4104
+ const name = "@nocobase/client", version$1 = "1.3.25-beta", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
4105
4105
  "@ahooksjs/use-url-state": "3.5.1",
4106
4106
  "@ant-design/cssinjs": "^1.11.1",
4107
4107
  "@ant-design/icons": "^5.1.4",
@@ -4122,9 +4122,9 @@ const name = "@nocobase/client", version$1 = "1.3.24-beta", license = "AGPL-3.0"
4122
4122
  "@formily/reactive-react": "^2.2.27",
4123
4123
  "@formily/shared": "^2.2.27",
4124
4124
  "@formily/validator": "^2.2.27",
4125
- "@nocobase/evaluators": "1.3.24-beta",
4126
- "@nocobase/sdk": "1.3.24-beta",
4127
- "@nocobase/utils": "1.3.24-beta",
4125
+ "@nocobase/evaluators": "1.3.25-beta",
4126
+ "@nocobase/sdk": "1.3.25-beta",
4127
+ "@nocobase/utils": "1.3.25-beta",
4128
4128
  ahooks: "^3.7.2",
4129
4129
  antd: "5.12.8",
4130
4130
  "antd-style": "3.4.5",
@@ -10727,7 +10727,7 @@ const BaseVariableContext = React.createContext(null), BaseVariableProvider = (e
10727
10727
  const v = y.field.target;
10728
10728
  return new Promise((A) => {
10729
10729
  setTimeout(() => {
10730
- const T = (getChildren$2(d(f(v, u), y), {
10730
+ const k = (getChildren$2(d(f(v, u, !0), y), {
10731
10731
  collectionField: e,
10732
10732
  uiSchema: t,
10733
10733
  targetFieldSchema: o,
@@ -10739,12 +10739,12 @@ const BaseVariableContext = React.createContext(null), BaseVariableProvider = (e
10739
10739
  isDisabled: x || isDisabledDefault,
10740
10740
  getCollectionField: C.getCollectionField,
10741
10741
  deprecated: p
10742
- }) || []).sort((k, D) => k.isLeaf && !D.isLeaf ? -1 : !k.isLeaf && D.isLeaf ? 1 : 0).sort((k, D) => k.disabled && !D.disabled ? 1 : !k.disabled && D.disabled ? -1 : 0);
10743
- if (T.length === 0) {
10742
+ }) || []).sort((D, $) => D.isLeaf && !$.isLeaf ? -1 : !D.isLeaf && $.isLeaf ? 1 : 0).sort((D, $) => D.disabled && !$.disabled ? 1 : !D.disabled && $.disabled ? -1 : 0);
10743
+ if (k.length === 0) {
10744
10744
  y.disabled = !0, y.isLeaf = !0, A();
10745
10745
  return;
10746
10746
  }
10747
- y.children = T, A();
10747
+ y.children = k, A();
10748
10748
  }, 5);
10749
10749
  });
10750
10750
  };
@@ -23772,48 +23772,48 @@ Filter.Action = FilterAction;
23772
23772
  Filter.Action.Designer = FilterActionDesigner;
23773
23773
  const useGetFilterOptions = () => {
23774
23774
  const { getCollectionFields: e } = useCollectionManager_deprecated(), t = useGetFilterFieldOptions();
23775
- return (o, n) => {
23776
- const r = e(o, n);
23777
- return t(r);
23775
+ return (o, n, r) => {
23776
+ const i = e(o, n);
23777
+ return t(i, r);
23778
23778
  };
23779
23779
  }, useFilterOptions = (e) => {
23780
23780
  const { getCollectionFields: t } = useCollectionManager_deprecated(), o = t(e);
23781
23781
  return useFilterFieldOptions(o);
23782
23782
  }, useGetFilterFieldOptions = () => {
23783
23783
  var a;
23784
- const e = useFieldSchema(), t = ((a = e == null ? void 0 : e["x-component-props"]) == null ? void 0 : a.nonfilterable) || [], { getCollectionFields: o, getInterface: n } = useCollectionManager_deprecated(), r = (l, c) => {
23785
- var f, x;
23784
+ const e = useFieldSchema(), t = ((a = e == null ? void 0 : e["x-component-props"]) == null ? void 0 : a.nonfilterable) || [], { getCollectionFields: o, getInterface: n } = useCollectionManager_deprecated(), r = (l, c, u) => {
23785
+ var x, C;
23786
23786
  if (t.length && c === 1 && t.includes(l.name) || !l.interface)
23787
23787
  return;
23788
- const u = n(l.interface);
23789
- if (!(u != null && u.filterable))
23788
+ const d = n(l.interface);
23789
+ if (!(d != null && d.filterable) && !u)
23790
23790
  return;
23791
- const { nested: d, children: p, operators: m } = u.filterable, h = {
23791
+ const { nested: p, children: m, operators: h } = (d == null ? void 0 : d.filterable) || {}, f = {
23792
23792
  name: l.name,
23793
23793
  type: l.type,
23794
23794
  target: l.target,
23795
- title: ((f = l == null ? void 0 : l.uiSchema) == null ? void 0 : f.title) || l.name,
23795
+ title: ((x = l == null ? void 0 : l.uiSchema) == null ? void 0 : x.title) || l.name,
23796
23796
  schema: l == null ? void 0 : l.uiSchema,
23797
23797
  interface: l.interface,
23798
- operators: ((x = m == null ? void 0 : m.filter) == null ? void 0 : x.call(m, (C) => !(C != null && C.visible) || C.visible(l))) || []
23798
+ operators: ((C = h == null ? void 0 : h.filter) == null ? void 0 : C.call(h, (S) => !(S != null && S.visible) || S.visible(l))) || []
23799
23799
  };
23800
23800
  if (!(l.target && c > 2)) {
23801
23801
  if (c > 2)
23802
- return h;
23803
- if (p != null && p.length && (h.children = p), d) {
23804
- const C = o(l.target), S = i(C, c + 1).filter(Boolean);
23805
- h.children = h.children || [], h.children.push(...S);
23802
+ return f;
23803
+ if (m != null && m.length && (f.children = m), p) {
23804
+ const S = o(l.target), b = i(S, c + 1).filter(Boolean);
23805
+ f.children = f.children || [], f.children.push(...b);
23806
23806
  }
23807
- return h;
23807
+ return f;
23808
23808
  }
23809
- }, i = (l, c) => {
23810
- const u = [];
23811
- return l.forEach((d) => {
23812
- const p = r(d, c);
23813
- p && u.push(p);
23814
- }), u;
23809
+ }, i = (l, c, u) => {
23810
+ const d = [];
23811
+ return l.forEach((p) => {
23812
+ const m = r(p, c, u);
23813
+ m && d.push(m);
23814
+ }), d;
23815
23815
  };
23816
- return (l) => i(l, 1);
23816
+ return (l, c) => i(l, 1, c);
23817
23817
  }, useFilterFieldOptions = (e) => {
23818
23818
  var l;
23819
23819
  const t = useFieldSchema(), o = ((l = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : l.nonfilterable) || [], { getCollectionFields: n, getInterface: r } = useCollectionManager_deprecated(), i = (c, u) => {
@@ -6,9 +6,9 @@
6
6
  * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
- export declare const useGetFilterOptions: () => (collectionName: any, dataSource?: string) => any[];
9
+ export declare const useGetFilterOptions: () => (collectionName: any, dataSource?: string, usedInVariable?: boolean) => any[];
10
10
  export declare const useFilterOptions: (collectionName: string) => any[];
11
- export declare const useGetFilterFieldOptions: () => (fields: any) => any[];
11
+ export declare const useGetFilterFieldOptions: () => (fields: any, usedInVariable: any) => any[];
12
12
  export declare const useFilterFieldOptions: (fields: any) => any[];
13
13
  export declare const removeNullCondition: (filter: any, customFlat?: any) => any;
14
14
  export declare const useFilterActionProps: () => {