@nocobase/plugin-ui-schema-storage 0.21.0-alpha.9 → 1.0.0-alpha.2
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/dist/externalVersion.js +7 -7
- package/dist/server/actions/ui-schema-action.d.ts +1 -1
- package/dist/server/actions/ui-schema-action.js +10 -14
- package/dist/server/dao/ui_schema_node_dao.d.ts +0 -4
- package/dist/server/dao/ui_schema_node_dao.js +0 -17
- package/dist/server/migrations/20230330214649-filter-form-block.js +1 -0
- package/dist/server/migrations/20230509221649-association-select.js +1 -0
- package/dist/server/migrations/20230509235247-record-picker.js +1 -0
- package/dist/server/migrations/20230510235247-form-field.js +1 -0
- package/dist/server/migrations/20230522231231-association-field.js +1 -0
- package/dist/server/migrations/20231015125000-support-filter-blocks-in-select-record-drawer.js +1 -0
- package/dist/server/server.js +1 -1
- package/package.json +12 -12
- package/dist/server/dao/ui_schema_dao.d.ts +0 -4
- package/dist/server/dao/ui_schema_dao.js +0 -31
package/dist/externalVersion.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
"@nocobase/client": "0.
|
|
3
|
-
"@nocobase/database": "0.
|
|
4
|
-
"@nocobase/cache": "0.
|
|
5
|
-
"@nocobase/utils": "0.
|
|
2
|
+
"@nocobase/client": "1.0.0-alpha.2",
|
|
3
|
+
"@nocobase/database": "1.0.0-alpha.2",
|
|
4
|
+
"@nocobase/cache": "1.0.0-alpha.2",
|
|
5
|
+
"@nocobase/utils": "1.0.0-alpha.2",
|
|
6
6
|
"lodash": "4.17.21",
|
|
7
|
-
"@nocobase/server": "0.
|
|
8
|
-
"@nocobase/actions": "0.
|
|
9
|
-
"@nocobase/resourcer": "0.
|
|
7
|
+
"@nocobase/server": "1.0.0-alpha.2",
|
|
8
|
+
"@nocobase/actions": "1.0.0-alpha.2",
|
|
9
|
+
"@nocobase/resourcer": "1.0.0-alpha.2",
|
|
10
10
|
"@formily/json-schema": "2.3.0"
|
|
11
11
|
};
|
|
@@ -10,7 +10,7 @@ export declare const uiSchemaActions: {
|
|
|
10
10
|
patch: (ctx: any, next: any) => Promise<void>;
|
|
11
11
|
batchPatch: (ctx: any, next: any) => Promise<void>;
|
|
12
12
|
clearAncestor: (ctx: any, next: any) => Promise<void>;
|
|
13
|
-
insertAdjacent(ctx: Context, next: any)
|
|
13
|
+
insertAdjacent: (ctx: Context, next: any) => Promise<void>;
|
|
14
14
|
insertBeforeBegin: (ctx: Context, next: any) => Promise<void>;
|
|
15
15
|
insertAfterBegin: (ctx: Context, next: any) => Promise<void>;
|
|
16
16
|
insertBeforeEnd: (ctx: Context, next: any) => Promise<void>;
|
|
@@ -77,17 +77,7 @@ const uiSchemaActions = {
|
|
|
77
77
|
patch: callRepositoryMethod("patch", "values"),
|
|
78
78
|
batchPatch: callRepositoryMethod("batchPatch", "values"),
|
|
79
79
|
clearAncestor: callRepositoryMethod("clearAncestor", "resourceIndex"),
|
|
80
|
-
|
|
81
|
-
const { resourceIndex, position, values, removeParentsIfNoChildren, breakRemoveOn } = ctx.action.params;
|
|
82
|
-
const repository = getRepositoryFromCtx(ctx);
|
|
83
|
-
const { schema, wrap } = parseInsertAdjacentValues(values);
|
|
84
|
-
ctx.body = await repository.insertAdjacent(position, resourceIndex, schema, {
|
|
85
|
-
removeParentsIfNoChildren,
|
|
86
|
-
breakRemoveOn,
|
|
87
|
-
wrap
|
|
88
|
-
});
|
|
89
|
-
await next();
|
|
90
|
-
},
|
|
80
|
+
insertAdjacent: insertPositionActionBuilder(),
|
|
91
81
|
insertBeforeBegin: insertPositionActionBuilder("beforeBegin"),
|
|
92
82
|
insertAfterBegin: insertPositionActionBuilder("afterBegin"),
|
|
93
83
|
insertBeforeEnd: insertPositionActionBuilder("beforeEnd"),
|
|
@@ -116,12 +106,18 @@ const uiSchemaActions = {
|
|
|
116
106
|
await next();
|
|
117
107
|
}
|
|
118
108
|
};
|
|
119
|
-
function insertPositionActionBuilder(position) {
|
|
109
|
+
function insertPositionActionBuilder(position = void 0) {
|
|
120
110
|
return async function(ctx, next) {
|
|
121
|
-
const {
|
|
111
|
+
const {
|
|
112
|
+
resourceIndex,
|
|
113
|
+
values,
|
|
114
|
+
removeParentsIfNoChildren,
|
|
115
|
+
breakRemoveOn,
|
|
116
|
+
position: positionFromUser
|
|
117
|
+
} = ctx.action.params;
|
|
122
118
|
const repository = getRepositoryFromCtx(ctx);
|
|
123
119
|
const { schema, wrap } = parseInsertAdjacentValues(values);
|
|
124
|
-
ctx.body = await repository.insertAdjacent(position, resourceIndex, schema, {
|
|
120
|
+
ctx.body = await repository.insertAdjacent(position || positionFromUser, resourceIndex, schema, {
|
|
125
121
|
removeParentsIfNoChildren,
|
|
126
122
|
breakRemoveOn,
|
|
127
123
|
wrap
|
|
@@ -2,10 +2,6 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
5
|
var __copyProps = (to, from, except, desc) => {
|
|
10
6
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
7
|
for (let key of __getOwnPropNames(from))
|
|
@@ -16,17 +12,4 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
12
|
};
|
|
17
13
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
14
|
var ui_schema_node_dao_exports = {};
|
|
19
|
-
__export(ui_schema_node_dao_exports, {
|
|
20
|
-
UiSchemaNodeDAO: () => UiSchemaNodeDAO
|
|
21
|
-
});
|
|
22
15
|
module.exports = __toCommonJS(ui_schema_node_dao_exports);
|
|
23
|
-
class UiSchemaNodeDAO {
|
|
24
|
-
schemaNode;
|
|
25
|
-
constructor(schemaNode) {
|
|
26
|
-
this.schemaNode = schemaNode;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
-
0 && (module.exports = {
|
|
31
|
-
UiSchemaNodeDAO
|
|
32
|
-
});
|
|
@@ -21,6 +21,7 @@ __export(filter_form_block_exports, {
|
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(filter_form_block_exports);
|
|
23
23
|
var import_server = require("@nocobase/server");
|
|
24
|
+
/* istanbul ignore file -- @preserve */
|
|
24
25
|
class filter_form_block_default extends import_server.Migration {
|
|
25
26
|
appVersion = "<0.9.1-alpha.3";
|
|
26
27
|
async up() {
|
|
@@ -21,6 +21,7 @@ __export(association_select_exports, {
|
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(association_select_exports);
|
|
23
23
|
var import_server = require("@nocobase/server");
|
|
24
|
+
/* istanbul ignore file -- @preserve */
|
|
24
25
|
class association_select_default extends import_server.Migration {
|
|
25
26
|
appVersion = "<0.9.3-alpha.1";
|
|
26
27
|
async up() {
|
|
@@ -21,6 +21,7 @@ __export(record_picker_exports, {
|
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(record_picker_exports);
|
|
23
23
|
var import_server = require("@nocobase/server");
|
|
24
|
+
/* istanbul ignore file -- @preserve */
|
|
24
25
|
class record_picker_default extends import_server.Migration {
|
|
25
26
|
appVersion = "<0.9.3-alpha.1";
|
|
26
27
|
async up() {
|
|
@@ -34,6 +34,7 @@ var import_json_schema = require("@formily/json-schema");
|
|
|
34
34
|
var import_server = require("@nocobase/server");
|
|
35
35
|
var import_utils = require("@nocobase/utils");
|
|
36
36
|
var import_lodash = __toESM(require("lodash"));
|
|
37
|
+
/* istanbul ignore file -- @preserve */
|
|
37
38
|
class form_field_default extends import_server.Migration {
|
|
38
39
|
appVersion = "<0.9.3-alpha.1";
|
|
39
40
|
async up() {
|
|
@@ -21,6 +21,7 @@ __export(association_field_exports, {
|
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(association_field_exports);
|
|
23
23
|
var import_server = require("@nocobase/server");
|
|
24
|
+
/* istanbul ignore file -- @preserve */
|
|
24
25
|
class association_field_default extends import_server.Migration {
|
|
25
26
|
appVersion = "<0.9.4-alpha.1";
|
|
26
27
|
async up() {
|
package/dist/server/migrations/20231015125000-support-filter-blocks-in-select-record-drawer.js
CHANGED
|
@@ -21,6 +21,7 @@ __export(support_filter_blocks_in_select_record_drawer_exports, {
|
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(support_filter_blocks_in_select_record_drawer_exports);
|
|
23
23
|
var import_server = require("@nocobase/server");
|
|
24
|
+
/* istanbul ignore file -- @preserve */
|
|
24
25
|
class support_filter_blocks_in_select_record_drawer_default extends import_server.Migration {
|
|
25
26
|
appVersion = "<0.14.0-alpha.8";
|
|
26
27
|
async up() {
|
package/dist/server/server.js
CHANGED
|
@@ -87,7 +87,7 @@ class PluginUISchemaStorageServer extends import_server.Plugin {
|
|
|
87
87
|
name: "uiSchemas",
|
|
88
88
|
actions: import_ui_schema_action.uiSchemaActions
|
|
89
89
|
});
|
|
90
|
-
this.app.acl.allow("uiSchemas", ["getProperties", "getJsonSchema"], "loggedIn");
|
|
90
|
+
this.app.acl.allow("uiSchemas", ["getProperties", "getJsonSchema", "getParentJsonSchema"], "loggedIn");
|
|
91
91
|
this.app.acl.allow("uiSchemaTemplates", ["get", "list"], "loggedIn");
|
|
92
92
|
}
|
|
93
93
|
async load() {
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"displayName.zh-CN": "UI schema 存储服务",
|
|
5
5
|
"description": "Provides centralized UI schema storage service.",
|
|
6
6
|
"description.zh-CN": "提供中心化的 UI schema 存储服务。",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "1.0.0-alpha.2",
|
|
8
8
|
"license": "AGPL-3.0",
|
|
9
9
|
"main": "./dist/server/index.js",
|
|
10
10
|
"homepage": "https://docs.nocobase.com/handbook/ui-schema-storage",
|
|
@@ -13,18 +13,18 @@
|
|
|
13
13
|
"@formily/json-schema": "2.x"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"@nocobase/actions": "
|
|
17
|
-
"@nocobase/cache": "
|
|
18
|
-
"@nocobase/client": "
|
|
19
|
-
"@nocobase/database": "
|
|
20
|
-
"@nocobase/plugin-error-handler": "
|
|
21
|
-
"@nocobase/plugin-users": "
|
|
22
|
-
"@nocobase/resourcer": "
|
|
23
|
-
"@nocobase/server": "
|
|
24
|
-
"@nocobase/test": "
|
|
25
|
-
"@nocobase/utils": "
|
|
16
|
+
"@nocobase/actions": "1.x",
|
|
17
|
+
"@nocobase/cache": "1.x",
|
|
18
|
+
"@nocobase/client": "1.x",
|
|
19
|
+
"@nocobase/database": "1.x",
|
|
20
|
+
"@nocobase/plugin-error-handler": "1.x",
|
|
21
|
+
"@nocobase/plugin-users": "1.x",
|
|
22
|
+
"@nocobase/resourcer": "1.x",
|
|
23
|
+
"@nocobase/server": "1.x",
|
|
24
|
+
"@nocobase/test": "1.x",
|
|
25
|
+
"@nocobase/utils": "1.x"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "f89dbc9e67d58404a2e484a5e124f739f340dcf8",
|
|
28
28
|
"keywords": [
|
|
29
29
|
"System & security"
|
|
30
30
|
]
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var ui_schema_dao_exports = {};
|
|
19
|
-
__export(ui_schema_dao_exports, {
|
|
20
|
-
UiSchemaDAO: () => UiSchemaDAO
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(ui_schema_dao_exports);
|
|
23
|
-
class UiSchemaDAO {
|
|
24
|
-
nodeKeys = ["properties", "patternProperties", "additionalProperties"];
|
|
25
|
-
constructor(schema) {
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
29
|
-
0 && (module.exports = {
|
|
30
|
-
UiSchemaDAO
|
|
31
|
-
});
|