@byteluck-fe/model-driven-driven 4.41.0-lx0 → 5.5.0-1-beta1

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.
@@ -1,55 +1,41 @@
1
- import { Schema, ControlsKeys, ColumnControlsKeys, DataBindModelType, ControlDesignerInstance, DesignerColumnControl, DesignerControl, DesignerFormControl, Messages } from '@byteluck-fe/model-driven-core';
2
- import { FieldTypes } from '@byteluck-fe/model-driven-shared';
3
- export declare function getMasterFormControls(controls: DesignerControl[]): DesignerFormControl[];
4
- /**
5
- * @description 给modelBindInfoList中填充fieldCode和dataCode
6
- * @description 我们生成fieldCode的规则是:DataBind的控件,取`field_${id}`,ObjectDataBind的控件,取`field_${id}_${key}`, key指的是ObjectDataBind.keys()
7
- * */
8
- export declare function fillModelBindInfoListFieldCode(modelBindInfoList: DataBindModelType[], dataCode?: string): DataBindModelType[];
9
- /**
10
- * @description 通过fieldType获取列表表头的type
11
- * */
12
- export declare function getColumnTypeFromFiledType(fieldType: string): ColumnControlsKeys | undefined;
13
- /**
14
- * @description 通过modelBindInfoList生成多个columns
15
- * */
16
- export declare function getColumnsFromModelBindInfoList(modelBindInfoList: DataBindModelType[]): DesignerColumnControl[];
17
- /**
18
- * @description 通过fieldType获取列实例
19
- * */
20
- export declare function getColumnsFromFiledType(fieldTypes: FieldTypes[]): ControlDesignerInstance<ColumnControlsKeys>[];
21
- export declare function getColumnsFromFiledType(fieldType: FieldTypes): ControlDesignerInstance<ColumnControlsKeys>;
22
- /**
23
- * @description 将控件实例转换为schema
24
- * */
25
- declare function toSchema<T extends ControlsKeys>(instance: DesignerControl): Schema<T>;
26
- declare function toSchema<T extends ControlsKeys>(instances: DesignerControl[]): Schema<T>[];
27
- declare function getModelBindInfoList(controls: DesignerControl[] | DesignerControl): DataBindModelType | DataBindModelType[] | undefined;
28
- declare function checkSchema(controls: DesignerControl[] | DesignerControl, messages?: Messages, ignore?: string[]): Promise<boolean>;
29
- interface PermissionItem {
30
- controlId: string;
31
- caption: string;
32
- type: string;
33
- controlType: string;
34
- /**
35
- * 是否可编辑
36
- * */
37
- canEdit: boolean;
38
- /**
39
- * 是否可查看
40
- * */
41
- canRead: boolean;
42
- /**
43
- * 是否可隐藏
44
- * */
45
- canHide: boolean;
46
- parentId: string | null;
47
- /**
48
- * 在表单、列表授权时将权限分组显示
49
- * element = 元素分组权限 = 除了绑定字段的控件都是这种类型
50
- * field = 字段分组权限 = 绑了字段的控件类型
51
- */
52
- group: 'element' | 'field';
53
- }
54
- declare function generatePermissions(controls: DesignerControl[] | DesignerControl, parent?: PermissionItem): PermissionItem[];
55
- export { toSchema, getModelBindInfoList, checkSchema, generatePermissions };
1
+ import { Schema, ControlsKeys, DataBindModelType, DesignerControl, DesignerFormControl, Messages } from '@byteluck-fe/model-driven-core';
2
+ export declare function getMasterFormControls(controls: DesignerControl[]): DesignerFormControl[];
3
+ /**
4
+ * @description 给modelBindInfoList中填充fieldCode和dataCode
5
+ * @description 我们生成fieldCode的规则是:DataBind的控件,取`field_${id}`,ObjectDataBind的控件,取`field_${id}_${key}`, key指的是ObjectDataBind.keys()
6
+ * */
7
+ export declare function fillModelBindInfoListFieldCode(modelBindInfoList: DataBindModelType[], dataCode?: string): DataBindModelType[];
8
+ /**
9
+ * @description 将控件实例转换为schema
10
+ * */
11
+ declare function toSchema<T extends ControlsKeys>(instance: DesignerControl): Schema<T>;
12
+ declare function toSchema<T extends ControlsKeys>(instances: DesignerControl[]): Schema<T>[];
13
+ declare function getModelBindInfoList(controls: DesignerControl[] | DesignerControl): DataBindModelType | DataBindModelType[] | undefined;
14
+ declare function checkSchema(controls: DesignerControl[] | DesignerControl, messages?: Messages, ignore?: string[]): Promise<boolean>;
15
+ interface PermissionItem {
16
+ controlId: string;
17
+ caption: string;
18
+ type: string;
19
+ controlType: string;
20
+ /**
21
+ * 是否可编辑
22
+ * */
23
+ canEdit: boolean;
24
+ /**
25
+ * 是否可查看
26
+ * */
27
+ canRead: boolean;
28
+ /**
29
+ * 是否可隐藏
30
+ * */
31
+ canHide: boolean;
32
+ parentId: string | null;
33
+ /**
34
+ * 在表单、列表授权时将权限分组显示
35
+ * element = 元素分组权限 = 除了绑定字段的控件都是这种类型
36
+ * field = 字段分组权限 = 绑了字段的控件类型
37
+ */
38
+ group: 'element' | 'field';
39
+ }
40
+ declare function generatePermissions(controls: DesignerControl[] | DesignerControl, parent?: PermissionItem): PermissionItem[];
41
+ export { toSchema, getModelBindInfoList, checkSchema, generatePermissions };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byteluck-fe/model-driven-driven",
3
- "version": "4.41.0-lx0",
3
+ "version": "5.5.0-1-beta1",
4
4
  "description": "> TODO: description",
5
5
  "author": "郝晨光 <2293885211@qq.com>",
6
6
  "homepage": "",
@@ -26,10 +26,10 @@
26
26
  "postpublish": "node ../../scripts/postpublish.js"
27
27
  },
28
28
  "dependencies": {
29
- "@byteluck-fe/model-driven-controls": "4.41.0-lx0",
30
- "@byteluck-fe/model-driven-core": "4.36.0-lx2",
31
- "@byteluck-fe/model-driven-settings": "4.36.0-lx2",
32
- "@byteluck-fe/model-driven-shared": "2.9.1-beta.1"
29
+ "@byteluck-fe/model-driven-controls": "5.5.0-1-beta1",
30
+ "@byteluck-fe/model-driven-core": "5.5.0-1-beta1",
31
+ "@byteluck-fe/model-driven-settings": "5.5.0-1-beta1",
32
+ "@byteluck-fe/model-driven-shared": "5.5.0-1-beta1"
33
33
  },
34
- "gitHead": "5e105c2f564e8562b25ebf8d35d8ba365df44512"
34
+ "gitHead": "ebe97707779913e68e2a238865803fb6420cb3c8"
35
35
  }