@nocobase/client 1.3.13-beta → 1.3.14-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
@@ -4086,7 +4086,7 @@ function addAppVersion(e, t) {
4086
4086
  addAppVersion((n = e.properties) == null ? void 0 : n[o], t);
4087
4087
  }), e;
4088
4088
  }
4089
- const name = "@nocobase/client", version$1 = "1.3.13-beta", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
4089
+ const name = "@nocobase/client", version$1 = "1.3.14-beta", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
4090
4090
  "@ahooksjs/use-url-state": "3.5.1",
4091
4091
  "@ant-design/cssinjs": "^1.11.1",
4092
4092
  "@ant-design/icons": "^5.1.4",
@@ -4107,9 +4107,9 @@ const name = "@nocobase/client", version$1 = "1.3.13-beta", license = "AGPL-3.0"
4107
4107
  "@formily/reactive-react": "^2.2.27",
4108
4108
  "@formily/shared": "^2.2.27",
4109
4109
  "@formily/validator": "^2.2.27",
4110
- "@nocobase/evaluators": "1.3.13-beta",
4111
- "@nocobase/sdk": "1.3.13-beta",
4112
- "@nocobase/utils": "1.3.13-beta",
4110
+ "@nocobase/evaluators": "1.3.14-beta",
4111
+ "@nocobase/sdk": "1.3.14-beta",
4112
+ "@nocobase/utils": "1.3.14-beta",
4113
4113
  ahooks: "^3.7.2",
4114
4114
  antd: "^5.12.8",
4115
4115
  "antd-style": "3.4.5",
@@ -11781,30 +11781,29 @@ const useFormItemInitializerFields = (e) => {
11781
11781
  children: f
11782
11782
  };
11783
11783
  });
11784
- }, getItem = (e, t, o, n, r) => {
11784
+ }, associationFieldToMenu = (e, t, o, n, r) => {
11785
11785
  var a, l, c;
11786
- if (e.interface === "m2o") {
11787
- if (r.includes(e.target))
11788
- return null;
11786
+ if (e.target && e.uiSchema) {
11787
+ if (r.includes(e.target) || r.length >= 1)
11788
+ return;
11789
11789
  const u = n(e.target);
11790
- return {
11790
+ return u != null && u.length ? {
11791
11791
  type: "subMenu",
11792
11792
  name: t,
11793
11793
  title: (a = e.uiSchema) == null ? void 0 : a.title,
11794
11794
  children: u.map(
11795
- (d) => getItem(d, `${t}.${d.name}`, o, n, [
11795
+ (d) => associationFieldToMenu(d, `${t}.${d.name}`, o, n, [
11796
11796
  ...r,
11797
11797
  e.target
11798
11798
  ])
11799
11799
  ).filter(Boolean)
11800
- };
11800
+ } : void 0;
11801
11801
  }
11802
- if (isAssocField(e))
11803
- return null;
11802
+ if (!e.uiSchema)
11803
+ return;
11804
11804
  const i = {
11805
11805
  type: "string",
11806
11806
  name: t,
11807
- // 'x-designer': 'FormItem.FilterFormDesigner',
11808
11807
  "x-toolbar": "FormItemSchemaToolbar",
11809
11808
  "x-settings": "fieldSettings:FilterFormItem",
11810
11809
  "x-designer-props": {
@@ -11825,9 +11824,8 @@ const useFormItemInitializerFields = (e) => {
11825
11824
  schema: i
11826
11825
  };
11827
11826
  }, useFilterAssociatedFormItemInitializerFields = () => {
11828
- var i;
11829
- const { name: e, fields: t } = useCollection_deprecated(), { getCollectionFields: o } = useCollectionManager_deprecated(), n = ["m2o"];
11830
- return (i = t == null ? void 0 : t.filter((a) => n.includes(a.interface))) == null ? void 0 : i.map((a) => getItem(a, a.name, e, o, []));
11827
+ const { name: e, fields: t } = useCollection_deprecated(), { getCollectionFields: o } = useCollectionManager_deprecated();
11828
+ return t == null ? void 0 : t.filter((n) => n.target && n.uiSchema).map((n) => associationFieldToMenu(n, n.name, e, o, [])).filter(Boolean);
11831
11829
  }, useInheritsFormItemInitializerFields = (e) => {
11832
11830
  const { name: t } = useCollection_deprecated(), { getInterface: o, getInheritCollections: n, getCollection: r, getParentCollectionFields: i } = useCollectionManager_deprecated(), a = n(t);
11833
11831
  useActionContext();