@nocobase/plugin-users 1.7.0-beta.12 → 1.7.0-beta.14

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.
@@ -13,18 +13,17 @@ module.exports = {
13
13
  "react-i18next": "11.18.6",
14
14
  "react-router-dom": "6.28.1",
15
15
  "react": "18.2.0",
16
- "@nocobase/client": "1.7.0-beta.12",
16
+ "@nocobase/client": "1.7.0-beta.14",
17
17
  "antd": "5.24.2",
18
18
  "@formily/core": "2.3.0",
19
- "@nocobase/plugin-acl": "1.7.0-beta.12",
19
+ "@nocobase/plugin-acl": "1.7.0-beta.14",
20
20
  "@emotion/css": "11.13.0",
21
- "@nocobase/utils": "1.7.0-beta.12",
22
- "@nocobase/database": "1.7.0-beta.12",
23
- "@nocobase/server": "1.7.0-beta.12",
24
- "@nocobase/plugin-user-data-sync": "1.7.0-beta.12",
25
- "@nocobase/plugin-ui-schema-storage": "1.7.0-beta.12",
21
+ "@nocobase/utils": "1.7.0-beta.14",
22
+ "@nocobase/database": "1.7.0-beta.14",
23
+ "@nocobase/server": "1.7.0-beta.14",
24
+ "@nocobase/plugin-user-data-sync": "1.7.0-beta.14",
25
+ "@nocobase/plugin-ui-schema-storage": "1.7.0-beta.14",
26
26
  "lodash": "4.17.21",
27
- "@nocobase/actions": "1.7.0-beta.12",
28
- "sequelize": "6.35.2",
29
- "@nocobase/plugin-system-settings": "1.7.0-beta.12"
27
+ "@nocobase/actions": "1.7.0-beta.14",
28
+ "sequelize": "6.35.2"
30
29
  };
@@ -47,14 +47,33 @@ var import_actions = require("@nocobase/actions");
47
47
  var import_lodash = __toESM(require("lodash"));
48
48
  var import__ = require("..");
49
49
  var import_sequelize = require("sequelize");
50
+ function findNonVoidTypeObjects(obj, path = "", results = []) {
51
+ for (const key in obj) {
52
+ const value = obj[key];
53
+ const currentPath = path ? `${path}.${key}` : key;
54
+ if (value && typeof value === "object") {
55
+ if (value.type && value.type !== "void") {
56
+ results.push({
57
+ name: key,
58
+ props: value
59
+ });
60
+ }
61
+ if (value.properties) {
62
+ findNonVoidTypeObjects(value.properties, `${currentPath}.properties`, results);
63
+ } else {
64
+ findNonVoidTypeObjects(value, currentPath, results);
65
+ }
66
+ }
67
+ }
68
+ return results;
69
+ }
50
70
  function parseProfileFormSchema(schema) {
51
71
  const properties = import_lodash.default.get(schema, "properties.form.properties.edit.properties.grid.properties") || {};
52
72
  const fields = [];
53
73
  const requiredFields = [];
54
- Object.values(properties).forEach((row) => {
55
- const col = Object.values(row.properties)[0];
56
- const [name, props] = Object.entries(col.properties)[0];
57
- if (props["x-read-pretty"] || props["x-disable"]) {
74
+ const configs = findNonVoidTypeObjects(properties);
75
+ Object.values(configs).forEach(({ name, props }) => {
76
+ if (props["x-read-pretty"] || props["x-disabled"]) {
58
77
  return;
59
78
  }
60
79
  if (props["required"]) {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "用户",
5
5
  "description": "Provides basic user model, as well as created by and updated by fields.",
6
6
  "description.zh-CN": "提供了基础的用户模型,以及创建人和最后更新人字段。",
7
- "version": "1.7.0-beta.12",
7
+ "version": "1.7.0-beta.14",
8
8
  "license": "AGPL-3.0",
9
9
  "main": "./dist/server/index.js",
10
10
  "homepage": "https://docs.nocobase.com/handbook/users",
@@ -27,7 +27,7 @@
27
27
  "@nocobase/test": "1.x",
28
28
  "@nocobase/utils": "1.x"
29
29
  },
30
- "gitHead": "db80012c1561bd9391cd83b5aef57fd79445da8e",
30
+ "gitHead": "9e557ad4739803ca87d54f279c90ff69511ccdee",
31
31
  "keywords": [
32
32
  "Users & permissions"
33
33
  ]