@nocobase/plugin-ui-schema-storage 1.2.12-alpha → 1.3.0-alpha.20240710084543
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/package.json +2 -2
- package/dist/client/index.d.ts +0 -13
- package/dist/client/index.js +0 -10
- package/dist/externalVersion.js +0 -20
- package/dist/index.d.ts +0 -11
- package/dist/index.js +0 -39
- package/dist/server/actions/ui-schema-action.d.ts +0 -27
- package/dist/server/actions/ui-schema-action.js +0 -140
- package/dist/server/collections/uiSchemaServerHooks.d.ts +0 -11
- package/dist/server/collections/uiSchemaServerHooks.js +0 -58
- package/dist/server/collections/uiSchemaTemplates.d.ts +0 -10
- package/dist/server/collections/uiSchemaTemplates.js +0 -75
- package/dist/server/collections/uiSchemaTreePath.d.ts +0 -11
- package/dist/server/collections/uiSchemaTreePath.js +0 -73
- package/dist/server/collections/uiSchemas.d.ts +0 -11
- package/dist/server/collections/uiSchemas.js +0 -62
- package/dist/server/dao/ui_schema_node_dao.d.ts +0 -26
- package/dist/server/dao/ui_schema_node_dao.js +0 -24
- package/dist/server/helper.d.ts +0 -8
- package/dist/server/helper.js +0 -9
- package/dist/server/index.d.ts +0 -12
- package/dist/server/index.js +0 -41
- package/dist/server/migrations/20230330214649-filter-form-block.d.ts +0 -13
- package/dist/server/migrations/20230330214649-filter-form-block.js +0 -58
- package/dist/server/migrations/20230509221649-association-select.d.ts +0 -13
- package/dist/server/migrations/20230509221649-association-select.js +0 -71
- package/dist/server/migrations/20230509235247-record-picker.d.ts +0 -16
- package/dist/server/migrations/20230509235247-record-picker.js +0 -121
- package/dist/server/migrations/20230510235247-form-field.d.ts +0 -13
- package/dist/server/migrations/20230510235247-form-field.js +0 -100
- package/dist/server/migrations/20230522231231-association-field.d.ts +0 -13
- package/dist/server/migrations/20230522231231-association-field.js +0 -74
- package/dist/server/migrations/20231015125000-support-filter-blocks-in-select-record-drawer.d.ts +0 -13
- package/dist/server/migrations/20231015125000-support-filter-blocks-in-select-record-drawer.js +0 -55
- package/dist/server/model.d.ts +0 -14
- package/dist/server/model.js +0 -42
- package/dist/server/repository.d.ts +0 -101
- package/dist/server/repository.js +0 -980
- package/dist/server/server-hooks/hooks/bind-menu-to-role.d.ts +0 -13
- package/dist/server/server-hooks/hooks/bind-menu-to-role.js +0 -49
- package/dist/server/server-hooks/hooks/factory.d.ts +0 -14
- package/dist/server/server-hooks/hooks/factory.js +0 -42
- package/dist/server/server-hooks/hooks/index.d.ts +0 -14
- package/dist/server/server-hooks/hooks/index.js +0 -45
- package/dist/server/server-hooks/hooks/remove-parents-if-no-children.d.ts +0 -14
- package/dist/server/server-hooks/hooks/remove-parents-if-no-children.js +0 -44
- package/dist/server/server-hooks/hooks/remove-schema.d.ts +0 -14
- package/dist/server/server-hooks/hooks/remove-schema.js +0 -51
- package/dist/server/server-hooks/index.d.ts +0 -33
- package/dist/server/server-hooks/index.js +0 -174
- package/dist/server/server-hooks/model.d.ts +0 -11
- package/dist/server/server-hooks/model.js +0 -38
- package/dist/server/server.d.ts +0 -17
- package/dist/server/server.js +0 -117
- package/dist/swagger/index.d.ts +0 -334
- package/dist/swagger/index.js +0 -363
package/dist/server/model.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __export = (target, all) => {
|
|
15
|
-
for (var name in all)
|
|
16
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
-
for (let key of __getOwnPropNames(from))
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
-
}
|
|
24
|
-
return to;
|
|
25
|
-
};
|
|
26
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var model_exports = {};
|
|
28
|
-
__export(model_exports, {
|
|
29
|
-
UiSchemaModel: () => UiSchemaModel
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(model_exports);
|
|
32
|
-
var import_database = require("@nocobase/database");
|
|
33
|
-
class UiSchemaModel extends import_database.MagicAttributeModel {
|
|
34
|
-
getServerHooksByType(type) {
|
|
35
|
-
const hooks = this.get("x-server-hooks") || [];
|
|
36
|
-
return hooks.filter((hook) => hook.type === type);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
-
0 && (module.exports = {
|
|
41
|
-
UiSchemaModel
|
|
42
|
-
});
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import { Cache } from '@nocobase/cache';
|
|
10
|
-
import { Repository, Transaction, Transactionable } from '@nocobase/database';
|
|
11
|
-
import { ChildOptions, SchemaNode } from './dao/ui_schema_node_dao';
|
|
12
|
-
export interface GetJsonSchemaOptions {
|
|
13
|
-
includeAsyncNode?: boolean;
|
|
14
|
-
readFromCache?: boolean;
|
|
15
|
-
transaction?: Transaction;
|
|
16
|
-
}
|
|
17
|
-
export interface GetPropertiesOptions {
|
|
18
|
-
readFromCache?: boolean;
|
|
19
|
-
transaction?: Transaction;
|
|
20
|
-
}
|
|
21
|
-
type BreakRemoveOnType = {
|
|
22
|
-
[key: string]: any;
|
|
23
|
-
};
|
|
24
|
-
export interface removeParentOptions extends Transactionable {
|
|
25
|
-
removeParentsIfNoChildren?: boolean;
|
|
26
|
-
breakRemoveOn?: BreakRemoveOnType;
|
|
27
|
-
}
|
|
28
|
-
interface InsertAdjacentOptions extends removeParentOptions {
|
|
29
|
-
wrap?: any;
|
|
30
|
-
}
|
|
31
|
-
export declare class UiSchemaRepository extends Repository {
|
|
32
|
-
cache: Cache;
|
|
33
|
-
get uiSchemasTableName(): any;
|
|
34
|
-
get uiSchemaTreePathTableName(): any;
|
|
35
|
-
static schemaToSingleNodes(schema: any, carry?: SchemaNode[], childOptions?: ChildOptions): SchemaNode[];
|
|
36
|
-
setCache(cache: Cache): void;
|
|
37
|
-
/**
|
|
38
|
-
* clear cache with xUid which in uiSchemaTreePath's Path
|
|
39
|
-
* @param {string} xUid
|
|
40
|
-
* @param {Transaction} transaction
|
|
41
|
-
* @returns {Promise<void>}
|
|
42
|
-
*/
|
|
43
|
-
clearXUidPathCache(xUid: string, transaction: Transaction): Promise<void>;
|
|
44
|
-
tableNameAdapter(tableName: any): any;
|
|
45
|
-
sqlAdapter(sql: string): string;
|
|
46
|
-
getProperties(uid: string, options?: GetPropertiesOptions): Promise<Partial<{
|
|
47
|
-
"x-uid": any;
|
|
48
|
-
"x-async": boolean;
|
|
49
|
-
}>>;
|
|
50
|
-
getParentJsonSchema(uid: string, options?: GetJsonSchemaOptions): Promise<any>;
|
|
51
|
-
getParentProperty(uid: string, options?: GetPropertiesOptions): Promise<any>;
|
|
52
|
-
getJsonSchema(uid: string, options?: GetJsonSchemaOptions): Promise<any>;
|
|
53
|
-
nodesToSchema(nodes: any, rootUid: any): {
|
|
54
|
-
"x-uid": any;
|
|
55
|
-
"x-async": boolean;
|
|
56
|
-
};
|
|
57
|
-
clearAncestor(uid: string, options?: Transactionable): Promise<void>;
|
|
58
|
-
patch(newSchema: any, options?: any): Promise<void>;
|
|
59
|
-
batchPatch(schemas: any[], options?: any): Promise<void>;
|
|
60
|
-
removeEmptyParents(options: Transactionable & {
|
|
61
|
-
uid: string;
|
|
62
|
-
breakRemoveOn?: BreakRemoveOnType;
|
|
63
|
-
}): Promise<void>;
|
|
64
|
-
recursivelyRemoveIfNoChildren(options: Transactionable & {
|
|
65
|
-
uid: string;
|
|
66
|
-
breakRemoveOn?: BreakRemoveOnType;
|
|
67
|
-
}): Promise<void>;
|
|
68
|
-
remove(uid: string, options?: Transactionable & removeParentOptions): Promise<void>;
|
|
69
|
-
insertAdjacent(position: 'beforeBegin' | 'afterBegin' | 'beforeEnd' | 'afterEnd', target: string, schema: any, options?: InsertAdjacentOptions): Promise<any>;
|
|
70
|
-
duplicate(uid: string, options?: Transactionable): Promise<any>;
|
|
71
|
-
insert(schema: any, options?: Transactionable): Promise<any>;
|
|
72
|
-
insertNewSchema(schema: any, options?: Transactionable & {
|
|
73
|
-
returnNode?: boolean;
|
|
74
|
-
}): Promise<any>;
|
|
75
|
-
insertSingleNode(schema: SchemaNode, options: Transactionable & removeParentOptions): Promise<any>;
|
|
76
|
-
protected updateNode(uid: string, schema: any, transaction?: Transaction): Promise<void>;
|
|
77
|
-
protected childrenCount(uid: any, transaction: any): Promise<number>;
|
|
78
|
-
protected isLeafNode(uid: any, transaction: any): Promise<boolean>;
|
|
79
|
-
protected findParentUid(uid: any, transaction?: any): Promise<string>;
|
|
80
|
-
protected findNodeSchemaWithParent(uid: any, transaction: any): Promise<{
|
|
81
|
-
parentUid: string;
|
|
82
|
-
schema: any;
|
|
83
|
-
}>;
|
|
84
|
-
protected isSingleChild(uid: any, transaction: any): Promise<any>;
|
|
85
|
-
protected insertBeside(targetUid: string, schema: any, side: 'before' | 'after', options?: InsertAdjacentOptions): Promise<any>;
|
|
86
|
-
protected insertInner(targetUid: string, schema: any, position: 'first' | 'last', options?: InsertAdjacentOptions): Promise<any>;
|
|
87
|
-
protected insertAfterBegin(targetUid: string, schema: any, options?: InsertAdjacentOptions): Promise<any>;
|
|
88
|
-
protected insertBeforeEnd(targetUid: string, schema: any, options?: InsertAdjacentOptions): Promise<any>;
|
|
89
|
-
protected insertBeforeBegin(targetUid: string, schema: any, options?: InsertAdjacentOptions): Promise<any>;
|
|
90
|
-
protected insertAfterEnd(targetUid: string, schema: any, options?: InsertAdjacentOptions): Promise<any>;
|
|
91
|
-
protected insertNodes(nodes: SchemaNode[], options?: Transactionable): Promise<any[]>;
|
|
92
|
-
private doGetProperties;
|
|
93
|
-
private doGetJsonSchema;
|
|
94
|
-
private ignoreSchemaProperties;
|
|
95
|
-
private breakOnMatched;
|
|
96
|
-
private schemaExists;
|
|
97
|
-
private regenerateUid;
|
|
98
|
-
private insertSchemaRecord;
|
|
99
|
-
private prepareSingleNodeForInsert;
|
|
100
|
-
}
|
|
101
|
-
export default UiSchemaRepository;
|