@blueking/bkui-form 0.0.41 → 1.0.0-beta.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.
Files changed (51) hide show
  1. package/dist/index.umd.js +18018 -0
  2. package/dist/svg/iconcool.1f570f8b.svg +50 -0
  3. package/package.json +13 -44
  4. package/readme.md +43 -18
  5. package/dist/adapter/vue2/common/FieldGroupWrap.d.ts +0 -34
  6. package/dist/adapter/vue2/field/ArrayField.d.ts +0 -19
  7. package/dist/adapter/vue2/field/BooleanField.d.ts +0 -18
  8. package/dist/adapter/vue2/field/CompositionField.d.ts +0 -22
  9. package/dist/adapter/vue2/field/FieldProps.d.ts +0 -65
  10. package/dist/adapter/vue2/field/NumberField.d.ts +0 -18
  11. package/dist/adapter/vue2/field/ObjectField.d.ts +0 -3
  12. package/dist/adapter/vue2/field/SchemaField.d.ts +0 -3
  13. package/dist/adapter/vue2/field/StringField.d.ts +0 -18
  14. package/dist/adapter/vue2/widget/ArrayWidget.d.ts +0 -9
  15. package/dist/adapter/vue2/widget/ButtonWidget.d.ts +0 -9
  16. package/dist/adapter/vue2/widget/CheckboxWidget.d.ts +0 -12
  17. package/dist/adapter/vue2/widget/CollapseGroupWidget.d.ts +0 -16
  18. package/dist/adapter/vue2/widget/ColorPickerWidget.d.ts +0 -9
  19. package/dist/adapter/vue2/widget/InputWidget.d.ts +0 -15
  20. package/dist/adapter/vue2/widget/KeyValueArrayWidget.d.ts +0 -26
  21. package/dist/adapter/vue2/widget/RadioWidget.d.ts +0 -12
  22. package/dist/adapter/vue2/widget/SelectWidget.d.ts +0 -12
  23. package/dist/adapter/vue2/widget/SwitchWidget.d.ts +0 -9
  24. package/dist/adapter/vue2/widget/TabGroupWidget.d.ts +0 -17
  25. package/dist/adapter/vue2/widget/TableWidget.d.ts +0 -25
  26. package/dist/adapter/vue2/widget/Widget.d.ts +0 -23
  27. package/dist/bkui-form-es-min.js +0 -9
  28. package/dist/bkui-form-es.js +0 -11838
  29. package/dist/bkui-form-es.js.map +0 -1
  30. package/dist/bkui-form-umd-min.js +0 -9
  31. package/dist/bkui-form-umd.js +0 -11852
  32. package/dist/bkui-form-umd.js.map +0 -1
  33. package/dist/bkui-form.css +0 -177
  34. package/dist/controller/form-vue2.d.ts +0 -26
  35. package/dist/controller/props.d.ts +0 -51
  36. package/dist/core/events.d.ts +0 -10
  37. package/dist/core/expression.d.ts +0 -13
  38. package/dist/core/form.d.ts +0 -4
  39. package/dist/core/lang.d.ts +0 -1
  40. package/dist/core/layout.d.ts +0 -19
  41. package/dist/core/path.d.ts +0 -9
  42. package/dist/core/proxy.d.ts +0 -2
  43. package/dist/core/reaction.d.ts +0 -4
  44. package/dist/core/register.d.ts +0 -19
  45. package/dist/core/schema.d.ts +0 -24
  46. package/dist/core/validator.d.ts +0 -34
  47. package/dist/core/widgetTree.d.ts +0 -40
  48. package/dist/index.d.ts +0 -5
  49. package/dist/types/bkui-form.d.ts +0 -94
  50. package/dist/util/fetch.d.ts +0 -9
  51. package/dist/util/index.d.ts +0 -17
@@ -1,177 +0,0 @@
1
- .bk-schema-form .mr24 {
2
- margin-right: 24px;
3
- }
4
-
5
- .bk-schema-form .bk-form-item {
6
- margin-top: unset !important;
7
- }
8
-
9
- .bk-schema-form .bk-form-item .bk-form-content .group-text {
10
- background-color: #f2f4f8;
11
- height: 100%;
12
- }
13
-
14
- .bk-schema-form .bk-form-item .bk-select {
15
- background-color: #fff;
16
- }
17
-
18
- .bk-schema-form .bk-form-item .bk-select.is-disabled {
19
- background-color: #fafbfd;
20
- }
21
-
22
- .bk-schema-form .bk-schema-form-group.normal {
23
- padding: 24px;
24
- position: relative;
25
- }
26
-
27
- .bk-schema-form .bk-schema-form-group.card{
28
- background: #fff;
29
- padding: 0 24px 24px 24px;
30
- border-radius: 2px;
31
- }
32
-
33
- .bk-schema-form .bk-schema-form-group.hide-empty-row .bk-schema-form-group-content {
34
- row-gap: 0 !important;
35
- }
36
-
37
- .bk-schema-form .bk-schema-form-group.hide-empty-row .bk-schema-form-group-content .bk-form-item {
38
- margin-bottom: 20px;
39
- }
40
-
41
- .bk-schema-form-group--error{
42
- border-color: #f5222d !important;
43
- }
44
-
45
- .bk-schema-form-group__error-tips{
46
- position: relative;
47
- display: block;
48
- width: 10px;
49
- height: 10px;
50
- }
51
-
52
- .bk-schema-form-group__error-tips-popover {
53
- position: absolute;
54
- top: -5px;
55
- left: 0;
56
- z-index: 1;
57
- background: #fff;
58
- border: 1px solid #f5222d;
59
- color: #f5222d;
60
- font-size: 12px;
61
- margin-left: 10px;
62
- font-weight: normal;
63
- padding: 5px 10px;
64
- border-radius: 2px;
65
- max-height: 50px;
66
- overflow:hidden;
67
- }
68
-
69
- .bk-schema-form-group__error-tips-popover:hover {
70
- max-height: unset;
71
- }
72
-
73
- .bk-schema-form-group__error-tips-popover > p {
74
- padding: 0;
75
- margin: 0;
76
- white-space: nowrap;
77
- }
78
-
79
- .bk-schema-form .bk-schema-form-group .bk-schema-form-group-title {
80
- font-size: 14px;
81
- font-weight: 600;
82
- color: #63656E;
83
- }
84
-
85
- .bk-schema-form .bk-schema-form-group .bk-schema-form-group-title.default {
86
- display: inline-block;
87
- margin-bottom: 10px;
88
- }
89
-
90
- .bk-schema-form .bk-schema-form-group .bk-schema-form-group-title.normal {
91
- position: absolute;
92
- top: -1em;
93
- left: 10px;
94
- line-height: 2em;
95
- padding: 0 0.5em;
96
- background: #fff;
97
- }
98
-
99
- .bk-schema-form .bk-schema-form-group .bk-schema-form-group-title.card{
100
- display: flex;
101
- height: 50px;
102
- align-items: center;
103
- padding: 0 24px;
104
- margin: 0 -24px 8px -24px;
105
- }
106
-
107
- .bk-schema-form .bk-collapse-item .bk-collapse-item-header {
108
- height: 54px;
109
- padding: 0;
110
- }
111
-
112
- .bk-schema-form .bk-collapse-item .bk-collapse-item-content {
113
- background: #f5f7fa;
114
- padding: 0 34px 16px 34px;
115
- }
116
-
117
- .bk-schema-form .bk-schema-form-group-add {
118
- font-size: 14px;
119
- color: #3a84ff;
120
- cursor: pointer;
121
- display: flex;
122
- align-items: center;
123
- }
124
-
125
- .bk-schema-form .bk-schema-form-group-delete {
126
- position: absolute;
127
- cursor: pointer;
128
- color: #979bA5;
129
- }
130
-
131
- .bk-schema-form .bk-schema-form-group-delete:hover {
132
- color: #3a84ff;
133
- }
134
-
135
- .bk-schema-form-item__error-tips {
136
- color: #f5222d;
137
- font-size: 12px;
138
- margin-top: 5px;
139
- margin: 0;
140
- line-height: 1.5em;
141
- }
142
-
143
- .bk-schema-form-item--error input,
144
- .bk-schema-form-item--error .bk-textarea-wrapper,
145
- .bk-schema-form-item--error .bk-select {
146
- border: 1px solid #f5222d;
147
- }
148
-
149
- .bk-schema-form .bk-schema-form-group .bk-form-unit-input .bk-textarea-wrapper {
150
- min-height: 32px;
151
- }
152
-
153
- .bk-schema-form .bk-schema-form-group .bk-form-unit-input textarea {
154
- min-height: 30px;
155
- }
156
-
157
- .bk-schema-form .bk-schema-form-item-auto-height .bk-form-content {
158
- min-height: auto;
159
- line-height: 1;
160
- }
161
-
162
- .bk-schema-form .table-widget-actions .action-btn {
163
- margin-right: 8px;
164
- font-size: 14px;
165
- cursor: pointer;
166
- }
167
- .bk-schema-form .table-widget-actions .action-btn:hover {
168
- color: #3a84ff;
169
- }
170
- .bk-schema-form .is-disabled .action-btn {
171
- color: #dcdee5 !important;
172
- cursor: not-allowed;
173
- }
174
- .bk-schema-form .bk-table-fixed-right {
175
- height: 100% !important;
176
- border-bottom: 1px solid #dfe0e5;
177
- }
@@ -1,26 +0,0 @@
1
- import { IFormOption } from '@/@types';
2
- import Vue from 'vue';
3
- import './form-vue2.css';
4
- export default function createForm<T>(opts?: Partial<IFormOption<T>>): import("vue/types/vue").ExtendedVue<Vue, {
5
- rootData: {};
6
- formKey: string;
7
- }, {
8
- initFormData(): void;
9
- emitFormValueChange(newValue: any, oldValue: any): void;
10
- validateForm: () => boolean;
11
- validateFormItem: (path: string) => import("@/@types").IValidateResult;
12
- validate: () => Promise<import("@/@types").IValidateResult[]>;
13
- validateSchema: (schema: import("ajv").AnySchema) => Promise<unknown>;
14
- }, unknown, {
15
- value: any;
16
- rules: any;
17
- schema: any;
18
- width: string | number;
19
- layout: any;
20
- formType: string;
21
- context: any;
22
- httpAdapter: any;
23
- readonly: boolean;
24
- readonlyMode: any;
25
- labelWidth: number;
26
- }>;
@@ -1,51 +0,0 @@
1
- declare const _default: {
2
- value: {
3
- type: ObjectConstructor;
4
- default: () => {};
5
- };
6
- rules: {
7
- type: ObjectConstructor;
8
- default: () => {};
9
- };
10
- schema: {
11
- type: ObjectConstructor;
12
- default: () => {};
13
- };
14
- width: {
15
- type: (StringConstructor | NumberConstructor)[];
16
- default: string;
17
- };
18
- layout: {
19
- type: (ObjectConstructor | ArrayConstructor)[];
20
- default: () => never[];
21
- };
22
- formType: {
23
- type: StringConstructor;
24
- default: string;
25
- };
26
- context: {
27
- type: ObjectConstructor;
28
- default: () => {};
29
- };
30
- httpAdapter: {
31
- type: ObjectConstructor;
32
- default: () => {
33
- request: (url: string, config?: Partial<import("@/util/fetch").IFetchConfig>) => Promise<any>;
34
- responseParse: (res: any) => any;
35
- };
36
- };
37
- readonly: {
38
- type: BooleanConstructor;
39
- default: boolean;
40
- };
41
- readonlyMode: {
42
- type: StringConstructor;
43
- default: string;
44
- validator: (value: any) => boolean;
45
- };
46
- labelWidth: {
47
- type: NumberConstructor;
48
- default: number;
49
- };
50
- };
51
- export default _default;
@@ -1,10 +0,0 @@
1
- export declare class FormEvent {
2
- callbacks: Record<string, Record<string, Array<Function>>>;
3
- constructor();
4
- on(path: string, type: string, cb: Function): this;
5
- off(path: string, type: string, cb: Function): this;
6
- once(path: string, type: string, cb: Function): this;
7
- emit(path: string, type: string, ...arg: any[]): void;
8
- }
9
- declare const _default: FormEvent;
10
- export default _default;
@@ -1,13 +0,0 @@
1
- export declare const getContext: (instance: any) => {
2
- $self: any;
3
- $context: any;
4
- $schema: any;
5
- $rules: any;
6
- $loadDataSource: any;
7
- $validate: any;
8
- $rootData: any;
9
- $widgetNode: any;
10
- };
11
- export declare const executeExpression: (expression: string | object, instance: Vue, $dep?: Array<Vue>) => any;
12
- export declare const parseStrTemplate: (expression: string) => any;
13
- export declare const isExpression: (expression: any) => boolean;
@@ -1,4 +0,0 @@
1
- import { IFormState } from '@/@types';
2
- export default class Form {
3
- state: IFormState;
4
- }
@@ -1 +0,0 @@
1
- export default function locale(item: string): any;
@@ -1,19 +0,0 @@
1
- import { ILayout, ILayoutConfig, IDimension } from '../@types/index';
2
- export default class Layout {
3
- static findLayoutByProp(prop: string, layout: ILayoutConfig[][]): any;
4
- layout: ILayoutConfig;
5
- constructor(layout?: ILayout[][] | ILayoutConfig);
6
- transformValueToPixel(value: number | string): string;
7
- parseLayout(config: ILayoutConfig): ILayoutConfig;
8
- getLayoutDimension(layout?: ILayout[][]): {
9
- columns: number;
10
- rows: number;
11
- };
12
- parseGridTemplate(dim: IDimension): {
13
- gridTemplateColumns: string;
14
- gridTemplateRows: string;
15
- };
16
- parseGridTemplateAreas(gridTemplate: any, group: ILayoutConfig[][]): string;
17
- autoFillColumns(rows: ILayoutConfig[], maxColumns: number): (string | number)[];
18
- repeatTemplate(len: number, auto?: boolean): string;
19
- }
@@ -1,9 +0,0 @@
1
- export default class Path {
2
- static separator: string;
3
- static getCurPath(parent: any, current: any): any;
4
- static getPathVal(obj: any, path: any, leftDeviation?: number): any;
5
- static setPathValue(obj: {} | undefined, path: any, value: any): any;
6
- static getSubPath(parent: string, current: string): string;
7
- static getPathLastProp(path: string): string | undefined;
8
- static getParentPath(path: string): string;
9
- }
@@ -1,2 +0,0 @@
1
- import { JSONSchema7 } from 'json-schema';
2
- export default function createProxy(schema: JSONSchema7, context: any): JSONSchema7;
@@ -1,4 +0,0 @@
1
- import { IReaction } from '../@types';
2
- export declare const reactionRegister: (path: string, reactions?: Array<IReaction>) => void;
3
- export declare const reactionUnRegister: (path: string) => void;
4
- export declare const reactionDispatch: (path: string, typeName: string) => void;
@@ -1,19 +0,0 @@
1
- /**
2
- * Registry注册Form组件全局相关内容
3
- */
4
- export declare class Registry<Component = any> {
5
- static namespace: string;
6
- static context: Record<string, any>;
7
- widgets: Map<String, Component>;
8
- components: Map<String, Component>;
9
- fields: Map<String, Component>;
10
- addComponentsMap(coms?: object): void;
11
- getComponent(key: any): Component | undefined;
12
- addFieldsMap(map?: object): void;
13
- getField(key: any): Component | undefined;
14
- addBaseWidgets(widgets?: object): void;
15
- getBaseWidget(name: string): string | Component | undefined;
16
- addMap(props: any, map: any): void;
17
- }
18
- declare const _default: Registry<any>;
19
- export default _default;
@@ -1,24 +0,0 @@
1
- import { JSONSchema7 } from 'json-schema';
2
- import { IUIComponent } from '@/@types';
3
- export default class Schema {
4
- static rootSchema: JSONSchema7;
5
- static resolveRef(): void;
6
- static resolveDependencies(): void;
7
- static resolveAdditionalProperties(): void;
8
- static resolveSchema(schema: JSONSchema7): JSONSchema7;
9
- static getSchemaDefaultValue(_schema: JSONSchema7): any;
10
- static getSchemaType(schema: JSONSchema7): string;
11
- static getUiProps(props: string, schema: JSONSchema7): Partial<IUIComponent>;
12
- static getSchemaField(schema: JSONSchema7): Partial<IUIComponent>;
13
- static isMultiSelect(schema: JSONSchema7): boolean;
14
- static isTupleArray(schema: JSONSchema7): boolean;
15
- static isCustomArrayWidget(schema: JSONSchema7): any;
16
- static getGroupWrap(schema: JSONSchema7): Partial<IUIComponent>;
17
- static getUiComponent(schema: JSONSchema7): Partial<IUIComponent>;
18
- static getDefaultWidget(schema: JSONSchema7): string | object | null;
19
- static isRequired(schema: JSONSchema7, name: string): boolean;
20
- static getUiOptions(schema: JSONSchema7): any;
21
- static getDependencies(schema: JSONSchema7, name: string): [string, string[] | import("json-schema").JSONSchema7Definition] | undefined;
22
- static resolveDefaultDatasource(schema: JSONSchema7): any;
23
- constructor(rootSchema: any);
24
- }
@@ -1,34 +0,0 @@
1
- import Ajv, { AnySchema } from 'ajv';
2
- import { IRules, IValidateResult } from '@/@types';
3
- export declare const ajv: Ajv;
4
- export declare const DEFAULT_RULES: {
5
- required: {
6
- message: string;
7
- validator: string;
8
- };
9
- };
10
- /**
11
- * 注册全局校验规则
12
- * @param rules
13
- */
14
- export declare const registryGlobalRules: (rules: IRules) => void;
15
- export declare const setWidgetErrorTips: (path: string, isError: Boolean, errorMsg: any) => void;
16
- /**
17
- * 校验单个表单项
18
- * @param path 字段路径
19
- */
20
- export declare const validateFormItem: (path: string) => IValidateResult;
21
- /**
22
- * 校验整个表单
23
- */
24
- export declare const validateForm: () => boolean;
25
- /**
26
- * 校验表单(抛出具体错误信息)
27
- */
28
- export declare const validateFormWithResult: () => Promise<IValidateResult[]>;
29
- export declare const validateSchema: (schema: AnySchema) => Promise<unknown>;
30
- /**
31
- * 触发校验
32
- * @param path 字段路径
33
- */
34
- export declare const dispatchValidate: (path: string) => IValidateResult;
@@ -1,40 +0,0 @@
1
- interface INodeConfig {
2
- id: string;
3
- type: 'node' | 'group';
4
- index?: number;
5
- instance: any;
6
- parent: WidgetNode | null;
7
- children: WidgetNode[];
8
- }
9
- export declare class WidgetNode {
10
- id: string;
11
- instance: any;
12
- parent: WidgetNode | null;
13
- type: 'node' | 'group';
14
- index?: number;
15
- children: WidgetNode[];
16
- constructor(config: INodeConfig);
17
- get value(): any;
18
- get isChildrenVisible(): any;
19
- /**
20
- * 获取 parents
21
- */
22
- get parents(): any[];
23
- get firstChild(): WidgetNode;
24
- get lastChild(): WidgetNode;
25
- getSibling(lastProp: string): WidgetNode | undefined;
26
- getSiblings(): WidgetNode[];
27
- /**
28
- * 是否是叶子节点
29
- */
30
- get isLeaf(): boolean;
31
- appendChild(node: WidgetNode): WidgetNode[] | (WidgetNode & any[]);
32
- removeChild(node: WidgetNode): WidgetNode[] | (WidgetNode & any[]);
33
- }
34
- export declare class WidgetTree {
35
- widgetMap: Record<string, WidgetNode>;
36
- addWidgetNode(path: string, instance: any, type: 'node' | 'group', index?: number): void;
37
- removeWidgetNode(path: string, instance: any): void;
38
- }
39
- declare const _default: WidgetTree;
40
- export default _default;
package/dist/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- import createForm from './controller/form-vue2';
2
- import events from '@/core/events';
3
- import Schema from '@/core/schema';
4
- export default createForm;
5
- export { events, Schema, };
@@ -1,94 +0,0 @@
1
- import * as vue_types_vue from 'vue/types/vue';
2
- import * as ajv from 'ajv';
3
- import * as json_schema from 'json-schema';
4
- import { JSONSchema6TypeName, JSONSchema7 } from 'json-schema';
5
- import Vue, { VNodeData } from 'vue';
6
- import styleInject from '../node_modules/style-inject/dist/style-inject.es.js';
7
-
8
- type GlobalComponents = any;
9
- interface IFormOption<T> {
10
- // 组件命名空间,默认bk
11
- namespace: string;
12
- // Schema表单依赖的基础组件
13
- baseWidgets?: {};
14
- // 内置的自定义表单组件(包装特定逻辑后的别名)
15
- components: {
16
- [k in GlobalComponents]: T
17
- };
18
- // schema type对应的field类型
19
- fields: {
20
- [k in JSONSchema6TypeName | 'composition']: T;
21
- }
22
- }
23
-
24
- interface IUIComponent extends VNodeData {
25
- name: any;
26
- }
27
-
28
- interface IValidateResult {
29
- result: boolean
30
- message: string | undefined
31
- path: string
32
- }
33
-
34
- var css_248z = ".bk-schema-form .mr24 {\n margin-right: 24px;\n}\n\n.bk-schema-form .bk-form-item {\n margin-top: unset !important;\n}\n\n.bk-schema-form .bk-form-item .bk-form-content .group-text {\n background-color: #f2f4f8;\n height: 100%;\n}\n\n.bk-schema-form .bk-form-item .bk-select {\n background-color: #fff;\n}\n\n.bk-schema-form .bk-form-item .bk-select.is-disabled {\n background-color: #fafbfd;\n}\n\n.bk-schema-form .bk-schema-form-group.normal {\n padding: 24px;\n position: relative;\n}\n\n.bk-schema-form .bk-schema-form-group.card{\n background: #fff;\n padding: 0 24px 24px 24px;\n border-radius: 2px;\n}\n\n.bk-schema-form .bk-schema-form-group.hide-empty-row .bk-schema-form-group-content {\n row-gap: 0 !important;\n}\n\n.bk-schema-form .bk-schema-form-group.hide-empty-row .bk-schema-form-group-content .bk-form-item {\n margin-bottom: 20px;\n}\n\n.bk-schema-form-group--error{\n border-color: #f5222d !important;\n}\n\n.bk-schema-form-group__error-tips{\n position: relative;\n display: block;\n width: 10px;\n height: 10px;\n}\n\n.bk-schema-form-group__error-tips-popover {\n position: absolute;\n top: -5px;\n left: 0;\n z-index: 1;\n background: #fff;\n border: 1px solid #f5222d;\n color: #f5222d;\n font-size: 12px;\n margin-left: 10px;\n font-weight: normal;\n padding: 5px 10px;\n border-radius: 2px;\n max-height: 50px;\n overflow:hidden;\n}\n\n.bk-schema-form-group__error-tips-popover:hover {\n max-height: unset;\n}\n\n.bk-schema-form-group__error-tips-popover > p {\n padding: 0;\n margin: 0;\n white-space: nowrap;\n}\n\n.bk-schema-form .bk-schema-form-group .bk-schema-form-group-title {\n font-size: 14px;\n font-weight: 600;\n color: #63656E;\n}\n\n.bk-schema-form .bk-schema-form-group .bk-schema-form-group-title.default {\n display: inline-block;\n margin-bottom: 10px;\n}\n\n.bk-schema-form .bk-schema-form-group .bk-schema-form-group-title.normal {\n position: absolute;\n top: -1em;\n left: 10px;\n line-height: 2em;\n padding: 0 0.5em;\n background: #fff;\n}\n\n.bk-schema-form .bk-schema-form-group .bk-schema-form-group-title.card{\n display: flex;\n height: 50px;\n align-items: center;\n padding: 0 24px;\n margin: 0 -24px 8px -24px;\n}\n\n.bk-schema-form .bk-collapse-item .bk-collapse-item-header {\n height: 54px;\n padding: 0;\n}\n\n.bk-schema-form .bk-collapse-item .bk-collapse-item-content {\n background: #f5f7fa;\n padding: 0 34px 16px 34px;\n}\n\n.bk-schema-form .bk-schema-form-group-add {\n font-size: 14px;\n color: #3a84ff;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n\n.bk-schema-form .bk-schema-form-group-delete {\n position: absolute;\n cursor: pointer;\n color: #979bA5;\n}\n\n.bk-schema-form .bk-schema-form-group-delete:hover {\n color: #3a84ff;\n}\n\n.bk-schema-form-item__error-tips {\n color: #f5222d;\n font-size: 12px;\n margin-top: 5px;\n margin: 0;\n line-height: 1.5em;\n}\n\n.bk-schema-form-item--error input,\n.bk-schema-form-item--error .bk-textarea-wrapper,\n.bk-schema-form-item--error .bk-select {\n border: 1px solid #f5222d;\n}\n\n.bk-schema-form .bk-schema-form-group .bk-form-unit-input .bk-textarea-wrapper {\n min-height: 32px;\n}\n\n.bk-schema-form .bk-schema-form-group .bk-form-unit-input textarea {\n min-height: 30px;\n}\n\n.bk-schema-form .bk-schema-form-item-auto-height .bk-form-content {\n min-height: auto;\n line-height: 1;\n}\n\n.bk-schema-form .table-widget-actions .action-btn {\n margin-right: 8px;\n font-size: 14px;\n cursor: pointer;\n}\n.bk-schema-form .table-widget-actions .action-btn:hover {\n color: #3a84ff;\n}\n.bk-schema-form .is-disabled .action-btn {\n color: #dcdee5 !important;\n cursor: not-allowed;\n}\n.bk-schema-form .bk-table-fixed-right {\n height: 100% !important;\n border-bottom: 1px solid #dfe0e5;\n}";
35
- styleInject(css_248z);
36
-
37
- declare function createForm<T>(opts?: Partial<IFormOption<T>>): vue_types_vue.ExtendedVue<Vue, {
38
- rootData: {};
39
- formKey: string;
40
- }, {
41
- initFormData(): void;
42
- emitFormValueChange(newValue: any, oldValue: any): void;
43
- validateForm: () => boolean;
44
- validateFormItem: (path: string) => IValidateResult;
45
- validate: () => Promise<IValidateResult[]>;
46
- validateSchema: (schema: ajv.AnySchema) => Promise<unknown>;
47
- }, unknown, {
48
- value: any;
49
- rules: any;
50
- schema: any;
51
- width: string | number;
52
- layout: any;
53
- formType: string;
54
- context: any;
55
- httpAdapter: any;
56
- readonly: boolean;
57
- readonlyMode: any;
58
- labelWidth: number;
59
- }>;
60
-
61
- declare class FormEvent {
62
- callbacks: Record<string, Record<string, Array<Function>>>;
63
- constructor();
64
- on(path: string, type: string, cb: Function): this;
65
- off(path: string, type: string, cb: Function): this;
66
- once(path: string, type: string, cb: Function): this;
67
- emit(path: string, type: string, ...arg: any[]): void;
68
- }
69
- declare const _default: FormEvent;
70
-
71
- declare class Schema {
72
- static rootSchema: JSONSchema7;
73
- static resolveRef(): void;
74
- static resolveDependencies(): void;
75
- static resolveAdditionalProperties(): void;
76
- static resolveSchema(schema: JSONSchema7): JSONSchema7;
77
- static getSchemaDefaultValue(_schema: JSONSchema7): any;
78
- static getSchemaType(schema: JSONSchema7): string;
79
- static getUiProps(props: string, schema: JSONSchema7): Partial<IUIComponent>;
80
- static getSchemaField(schema: JSONSchema7): Partial<IUIComponent>;
81
- static isMultiSelect(schema: JSONSchema7): boolean;
82
- static isTupleArray(schema: JSONSchema7): boolean;
83
- static isCustomArrayWidget(schema: JSONSchema7): any;
84
- static getGroupWrap(schema: JSONSchema7): Partial<IUIComponent>;
85
- static getUiComponent(schema: JSONSchema7): Partial<IUIComponent>;
86
- static getDefaultWidget(schema: JSONSchema7): string | object | null;
87
- static isRequired(schema: JSONSchema7, name: string): boolean;
88
- static getUiOptions(schema: JSONSchema7): any;
89
- static getDependencies(schema: JSONSchema7, name: string): [string, string[] | json_schema.JSONSchema7Definition] | undefined;
90
- static resolveDefaultDatasource(schema: JSONSchema7): any;
91
- constructor(rootSchema: any);
92
- }
93
-
94
- export { Schema, createForm as default, _default as events };
@@ -1,9 +0,0 @@
1
- import { IResParse } from '@/@types';
2
- export type MethodType = 'get' | 'head' | 'post' | 'put' | 'delete' | 'connect' | 'options' | 'trace' | 'patch';
3
- export interface IFetchConfig extends RequestInit {
4
- params: Record<string, any> | BodyInit | null;
5
- responseParse?: IResParse;
6
- responseType?: 'text' | 'json' | 'blob' | 'formData' | 'arrayBuffer';
7
- }
8
- declare const _default: (url: string, config?: Partial<IFetchConfig>) => Promise<any>;
9
- export default _default;
@@ -1,17 +0,0 @@
1
- import { JSONSchema6TypeName } from 'json-schema';
2
- export declare const isRegExp: (regExpStr: any) => boolean;
3
- export declare const isObj: (val: unknown) => val is object;
4
- export declare const globalThisPolyfill: any;
5
- export declare const getBrowserlanguage: () => any;
6
- export declare const hasOwnProperty: (obj: any, key: any) => boolean;
7
- export declare const valueType: (value: any) => "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | "array" | "null";
8
- export declare const merge: (target: any, source: any) => any;
9
- export declare function intersection(arr1: any, arr2: any): any;
10
- export declare function gcd(a: any, b: any): any;
11
- export declare function scm(a: any, b: any): number;
12
- export declare function initializationValue(type: JSONSchema6TypeName, defaultInitValue?: Partial<Record<JSONSchema6TypeName, any>>): any;
13
- export declare function mergeDeep<T>(target: any, ...sources: any[]): T;
14
- export declare function deepEquals(a: any, b: any, ca?: any[], cb?: any[]): any;
15
- export declare function orderProperties(properties: any, order: any): string[];
16
- export declare function upperFirstLetter(str: string): string;
17
- export declare const getCookie: (name: any) => string | null;