@mc20230601/keep-up 1.0.17 → 1.0.23
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/es/components/codeEditor/index.d.ts +163 -0
- package/es/components/codeEditor/index.mjs +74 -0
- package/es/components/codeEditor/index.mjs.map +1 -0
- package/es/components/commonDrawer/index.d.ts +24 -0
- package/es/components/commonDrawer/index.mjs +61 -0
- package/es/components/commonDrawer/index.mjs.map +1 -0
- package/es/components/commonDrawer/index.module.mjs +4 -0
- package/es/components/commonDrawer/interfaces.d.ts +7 -0
- package/es/components/commonDrawer/interfaces.mjs +2 -0
- package/es/components/commonDrawer/interfaces.mjs.map +1 -0
- package/es/components/commonLocations/constants.d.ts +28 -0
- package/es/components/commonLocations/constants.mjs +18 -0
- package/es/components/commonLocations/constants.mjs.map +1 -0
- package/es/components/commonLocations/index.d.ts +40 -0
- package/es/components/commonLocations/index.mjs +94 -0
- package/es/components/commonLocations/index.mjs.map +1 -0
- package/es/components/commonLocations/index.module.mjs +4 -0
- package/es/components/commonLocations/index.module.mjs.map +1 -0
- package/es/components/commonLocations/interfaces.d.ts +100 -0
- package/es/components/commonLocations/interfaces.mjs +2 -0
- package/es/components/commonLocations/interfaces.mjs.map +1 -0
- package/es/components/commonLocations/useLocations.d.ts +2 -0
- package/es/components/commonLocations/useLocations.mjs +151 -0
- package/es/components/commonLocations/useLocations.mjs.map +1 -0
- package/es/components/commonLocations/utils.d.ts +14 -0
- package/es/components/commonLocations/utils.mjs +73 -0
- package/es/components/commonLocations/utils.mjs.map +1 -0
- package/es/components/formilyCmps/formTab/index.d.ts +83 -0
- package/es/components/formilyCmps/formTab/index.mjs +146 -0
- package/es/components/formilyCmps/formTab/index.mjs.map +1 -0
- package/es/components/formilyCmps/formilyForm/constants.d.ts +39 -0
- package/es/components/formilyCmps/formilyForm/constants.mjs +41 -0
- package/es/components/formilyCmps/formilyForm/constants.mjs.map +1 -0
- package/es/components/formilyCmps/formilyForm/index.d.ts +131 -0
- package/es/components/formilyCmps/formilyForm/index.mjs +148 -0
- package/es/components/formilyCmps/formilyForm/index.mjs.map +1 -0
- package/es/components/formilyCmps/formilyForm/index.module.mjs +4 -0
- package/es/components/formilyCmps/formilyForm/index.module.mjs.map +1 -0
- package/es/components/formilyCmps/formilyForm/interfaces.d.ts +28 -0
- package/es/components/formilyCmps/formilyForm/interfaces.mjs +2 -0
- package/es/components/formilyCmps/formilyForm/interfaces.mjs.map +1 -0
- package/es/components/formilyCmps/formilyForm/utils.d.ts +3 -0
- package/es/components/formilyCmps/formilyForm/utils.mjs +14 -0
- package/es/components/formilyCmps/formilyForm/utils.mjs.map +1 -0
- package/es/components/formilyCmps/index.d.ts +3 -0
- package/es/components/formilyCmps/index.mjs +3 -0
- package/es/components/formilyCmps/index.mjs.map +1 -0
- package/es/components/formilyCmps/sectionTitle/index.d.ts +28 -0
- package/es/components/formilyCmps/sectionTitle/index.mjs +30 -0
- package/es/components/formilyCmps/sectionTitle/index.mjs.map +1 -0
- package/es/components/formilyCmps/sectionTitle/index.module.mjs +4 -0
- package/es/components/formilyCmps/sectionTitle/index.module.mjs.map +1 -0
- package/es/components/index.d.ts +5 -1
- package/es/components/index.mjs +5 -1
- package/es/components/index.mjs.map +1 -1
- package/es/components/radioGroup/constants.d.ts +371 -0
- package/es/components/radioGroup/constants.mjs +11 -0
- package/es/components/radioGroup/constants.mjs.map +1 -0
- package/es/components/radioGroup/index.d.ts +203 -0
- package/es/components/radioGroup/index.mjs +60 -0
- package/es/components/radioGroup/index.mjs.map +1 -0
- package/es/components/radioGroup/interfaces.d.ts +7 -0
- package/es/components/radioGroup/interfaces.mjs +2 -0
- package/es/components/radioGroup/interfaces.mjs.map +1 -0
- package/es/components/space/index.d.ts +60 -1
- package/es/components/space/index.mjs +51 -6
- package/es/components/space/index.mjs.map +1 -1
- package/es/constants/common.d.ts +4 -0
- package/es/constants/common.mjs +26 -0
- package/es/constants/common.mjs.map +1 -0
- package/es/index.d.ts +5 -1
- package/es/index.mjs +5 -1
- package/es/index.mjs.map +1 -1
- package/es/interfaces/common.d.ts +46 -0
- package/es/interfaces/common.mjs +2 -0
- package/es/interfaces/common.mjs.map +1 -0
- package/es/interfaces/commonPage.d.ts +88 -0
- package/es/interfaces/commonPage.mjs +2 -0
- package/es/interfaces/commonPage.mjs.map +1 -0
- package/es/interfaces/index.d.ts +2 -0
- package/es/styles/index.css +53 -4
- package/es/utils/common.d.ts +18 -0
- package/es/utils/common.mjs +14 -0
- package/es/utils/common.mjs.map +1 -0
- package/es/utils/emitter.d.ts +2 -0
- package/es/utils/emitter.mjs +6 -0
- package/es/utils/emitter.mjs.map +1 -0
- package/es/utils/index.d.ts +4 -0
- package/es/utils/index.mjs +5 -0
- package/es/utils/index.mjs.map +1 -0
- package/es/utils/shared.d.ts +2 -0
- package/es/utils/shared.mjs +6 -0
- package/es/utils/shared.mjs.map +1 -0
- package/es/utils/storage.d.ts +8 -0
- package/es/utils/storage.mjs +23 -0
- package/es/utils/storage.mjs.map +1 -0
- package/package.json +1 -5
- package/es/components/button/index.d.ts +0 -2
- package/es/components/button/index.mjs +0 -11
- package/es/components/button/index.mjs.map +0 -1
- package/es/components/space/index.module.mjs +0 -4
- package/es/directives/index.d.ts +0 -0
- package/es/keepUp/index.d.ts +0 -1
- /package/es/components/{space → commonDrawer}/index.module.mjs.map +0 -0
- /package/es/{directives → interfaces}/index.mjs +0 -0
- /package/es/{directives → interfaces}/index.mjs.map +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { onFormReact, onFieldInit, onFieldReact, onFieldChange } from '@formily/core';
|
|
2
|
+
/** formEffectsMap */
|
|
3
|
+
export declare const formEffectsMap: {
|
|
4
|
+
readonly onFormInit: (callback: (form: import("@formily/core").Form) => void) => void;
|
|
5
|
+
readonly onFormMount: (callback: (form: import("@formily/core").Form) => void) => void;
|
|
6
|
+
readonly onFormUnmount: (callback: (form: import("@formily/core").Form) => void) => void;
|
|
7
|
+
readonly onFormReact: typeof onFormReact;
|
|
8
|
+
readonly onFormValuesChange: (callback: (form: import("@formily/core").Form) => void) => void;
|
|
9
|
+
readonly onFormInitialValuesChange: (callback: (form: import("@formily/core").Form) => void) => void;
|
|
10
|
+
readonly onFormInputChange: (callback: (form: import("@formily/core").Form) => void) => void;
|
|
11
|
+
readonly onFormSubmit: (callback: (form: import("@formily/core").Form) => void) => void;
|
|
12
|
+
readonly onFormSubmitStart: (callback: (form: import("@formily/core").Form) => void) => void;
|
|
13
|
+
readonly onFormSubmitEnd: (callback: (form: import("@formily/core").Form) => void) => void;
|
|
14
|
+
readonly onFormSubmitFailed: (callback: (form: import("@formily/core").Form) => void) => void;
|
|
15
|
+
readonly onFormSubmitSuccess: (callback: (form: import("@formily/core").Form) => void) => void;
|
|
16
|
+
readonly onFormSubmitValidateStart: (callback: (form: import("@formily/core").Form) => void) => void;
|
|
17
|
+
readonly onFormSubmitValidateEnd: (callback: (form: import("@formily/core").Form) => void) => void;
|
|
18
|
+
readonly onFormSubmitValidateFailed: (callback: (form: import("@formily/core").Form) => void) => void;
|
|
19
|
+
readonly onFormSubmitValidateSuccess: (callback: (form: import("@formily/core").Form) => void) => void;
|
|
20
|
+
readonly onFormValidateStart: (callback: (form: import("@formily/core").Form) => void) => void;
|
|
21
|
+
readonly onFormValidateEnd: (callback: (form: import("@formily/core").Form) => void) => void;
|
|
22
|
+
readonly onFormValidateFailed: (callback: (form: import("@formily/core").Form) => void) => void;
|
|
23
|
+
readonly onFormValidateSuccess: (callback: (form: import("@formily/core").Form) => void) => void;
|
|
24
|
+
};
|
|
25
|
+
/** fieldEffectsMap */
|
|
26
|
+
export declare const fieldEffectsMap: {
|
|
27
|
+
readonly onFieldInit: typeof onFieldInit;
|
|
28
|
+
readonly onFieldMount: (pattern: import("@formily/core").FormPathPattern, callback: (field: import("@formily/core").GeneralField, form: import("@formily/core").Form) => void) => void;
|
|
29
|
+
readonly onFieldUnmount: (pattern: import("@formily/core").FormPathPattern, callback: (field: import("@formily/core").GeneralField, form: import("@formily/core").Form) => void) => void;
|
|
30
|
+
readonly onFieldReact: typeof onFieldReact;
|
|
31
|
+
readonly onFieldChange: typeof onFieldChange;
|
|
32
|
+
readonly onFieldValueChange: (pattern: import("@formily/core").FormPathPattern, callback: (field: import("@formily/core").DataField, form: import("@formily/core").Form) => void) => void;
|
|
33
|
+
readonly onFieldInitialValueChange: (pattern: import("@formily/core").FormPathPattern, callback: (field: import("@formily/core").DataField, form: import("@formily/core").Form) => void) => void;
|
|
34
|
+
readonly onFieldInputValueChange: (pattern: import("@formily/core").FormPathPattern, callback: (field: import("@formily/core").DataField, form: import("@formily/core").Form) => void) => void;
|
|
35
|
+
readonly onFieldValidateStart: (pattern: import("@formily/core").FormPathPattern, callback: (field: import("@formily/core").DataField, form: import("@formily/core").Form) => void) => void;
|
|
36
|
+
readonly onFieldValidateEnd: (pattern: import("@formily/core").FormPathPattern, callback: (field: import("@formily/core").DataField, form: import("@formily/core").Form) => void) => void;
|
|
37
|
+
readonly onFieldValidateFailed: (pattern: import("@formily/core").FormPathPattern, callback: (field: import("@formily/core").DataField, form: import("@formily/core").Form) => void) => void;
|
|
38
|
+
readonly onFieldValidateSuccess: (pattern: import("@formily/core").FormPathPattern, callback: (field: import("@formily/core").DataField, form: import("@formily/core").Form) => void) => void;
|
|
39
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { onFormInit, onFormMount, onFormUnmount, onFormReact, onFormValuesChange, onFormInitialValuesChange, onFormInputChange, onFormSubmit, onFormSubmitStart, onFormSubmitEnd, onFormSubmitFailed, onFormSubmitSuccess, onFormSubmitValidateStart, onFormSubmitValidateEnd, onFormSubmitValidateFailed, onFormSubmitValidateSuccess, onFormValidateStart, onFormValidateEnd, onFormValidateFailed, onFormValidateSuccess, onFieldInit, onFieldMount, onFieldUnmount, onFieldReact, onFieldChange, onFieldValueChange, onFieldInitialValueChange, onFieldInputValueChange, onFieldValidateStart, onFieldValidateEnd, onFieldValidateFailed, onFieldValidateSuccess } from '@formily/core';
|
|
2
|
+
|
|
3
|
+
const formEffectsMap = {
|
|
4
|
+
onFormInit,
|
|
5
|
+
onFormMount,
|
|
6
|
+
onFormUnmount,
|
|
7
|
+
onFormReact,
|
|
8
|
+
onFormValuesChange,
|
|
9
|
+
onFormInitialValuesChange,
|
|
10
|
+
onFormInputChange,
|
|
11
|
+
onFormSubmit,
|
|
12
|
+
onFormSubmitStart,
|
|
13
|
+
onFormSubmitEnd,
|
|
14
|
+
onFormSubmitFailed,
|
|
15
|
+
onFormSubmitSuccess,
|
|
16
|
+
onFormSubmitValidateStart,
|
|
17
|
+
onFormSubmitValidateEnd,
|
|
18
|
+
onFormSubmitValidateFailed,
|
|
19
|
+
onFormSubmitValidateSuccess,
|
|
20
|
+
onFormValidateStart,
|
|
21
|
+
onFormValidateEnd,
|
|
22
|
+
onFormValidateFailed,
|
|
23
|
+
onFormValidateSuccess
|
|
24
|
+
};
|
|
25
|
+
const fieldEffectsMap = {
|
|
26
|
+
onFieldInit,
|
|
27
|
+
onFieldMount,
|
|
28
|
+
onFieldUnmount,
|
|
29
|
+
onFieldReact,
|
|
30
|
+
onFieldChange,
|
|
31
|
+
onFieldValueChange,
|
|
32
|
+
onFieldInitialValueChange,
|
|
33
|
+
onFieldInputValueChange,
|
|
34
|
+
onFieldValidateStart,
|
|
35
|
+
onFieldValidateEnd,
|
|
36
|
+
onFieldValidateFailed,
|
|
37
|
+
onFieldValidateSuccess
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export { fieldEffectsMap, formEffectsMap };
|
|
41
|
+
//# sourceMappingURL=constants.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.mjs","sources":["../../../../../../packages/components/formilyCmps/formilyForm/constants.ts"],"sourcesContent":["import {\n onFormInit,\n onFormMount,\n onFormUnmount,\n onFormReact,\n onFormValuesChange,\n onFormInitialValuesChange,\n onFormInputChange,\n onFormSubmit,\n onFormSubmitStart,\n onFormSubmitEnd,\n onFormSubmitFailed,\n onFormSubmitSuccess,\n onFormSubmitValidateStart,\n onFormSubmitValidateEnd,\n onFormSubmitValidateFailed,\n onFormSubmitValidateSuccess,\n onFormValidateStart,\n onFormValidateEnd,\n onFormValidateFailed,\n onFormValidateSuccess,\n onFieldInit,\n onFieldMount,\n onFieldUnmount,\n onFieldReact,\n onFieldChange,\n onFieldValueChange,\n onFieldInitialValueChange,\n onFieldInputValueChange,\n onFieldValidateStart,\n onFieldValidateEnd,\n onFieldValidateFailed,\n onFieldValidateSuccess,\n} from '@formily/core'\n\n/** formEffectsMap */\nexport const formEffectsMap = {\n onFormInit,\n onFormMount,\n onFormUnmount,\n onFormReact,\n onFormValuesChange,\n onFormInitialValuesChange,\n onFormInputChange,\n onFormSubmit,\n onFormSubmitStart,\n onFormSubmitEnd,\n onFormSubmitFailed,\n onFormSubmitSuccess,\n onFormSubmitValidateStart,\n onFormSubmitValidateEnd,\n onFormSubmitValidateFailed,\n onFormSubmitValidateSuccess,\n onFormValidateStart,\n onFormValidateEnd,\n onFormValidateFailed,\n onFormValidateSuccess,\n} as const\n\n/** fieldEffectsMap */\nexport const fieldEffectsMap = {\n onFieldInit,\n onFieldMount,\n onFieldUnmount,\n onFieldReact,\n onFieldChange,\n onFieldValueChange,\n onFieldInitialValueChange,\n onFieldInputValueChange,\n onFieldValidateStart,\n onFieldValidateEnd,\n onFieldValidateFailed,\n onFieldValidateSuccess,\n} as const\n"],"names":[],"mappings":";;AAoCO,MAAM,cAAiB,GAAA;AAAA,EAC5B,UAAA;AAAA,EACA,WAAA;AAAA,EACA,aAAA;AAAA,EACA,WAAA;AAAA,EACA,kBAAA;AAAA,EACA,yBAAA;AAAA,EACA,iBAAA;AAAA,EACA,YAAA;AAAA,EACA,iBAAA;AAAA,EACA,eAAA;AAAA,EACA,kBAAA;AAAA,EACA,mBAAA;AAAA,EACA,yBAAA;AAAA,EACA,uBAAA;AAAA,EACA,0BAAA;AAAA,EACA,2BAAA;AAAA,EACA,mBAAA;AAAA,EACA,iBAAA;AAAA,EACA,oBAAA;AAAA,EACA,qBAAA;AACF,EAAA;AAGO,MAAM,eAAkB,GAAA;AAAA,EAC7B,WAAA;AAAA,EACA,YAAA;AAAA,EACA,cAAA;AAAA,EACA,YAAA;AAAA,EACA,aAAA;AAAA,EACA,kBAAA;AAAA,EACA,yBAAA;AAAA,EACA,uBAAA;AAAA,EACA,oBAAA;AAAA,EACA,kBAAA;AAAA,EACA,qBAAA;AAAA,EACA,sBAAA;AACF;;;;"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
import type { ISchema } from '@formily/vue';
|
|
3
|
+
import type { IEffectHooks } from './interfaces';
|
|
4
|
+
export type * from './interfaces';
|
|
5
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
|
+
/** schema配置 */
|
|
7
|
+
config: {
|
|
8
|
+
type: PropType<ISchema>;
|
|
9
|
+
default: () => {};
|
|
10
|
+
};
|
|
11
|
+
/** 初始值 */
|
|
12
|
+
initialValues: {
|
|
13
|
+
type: ObjectConstructor;
|
|
14
|
+
default: () => {};
|
|
15
|
+
};
|
|
16
|
+
/** effectHooks */
|
|
17
|
+
effectHooks: {
|
|
18
|
+
type: PropType<IEffectHooks>;
|
|
19
|
+
default: () => {};
|
|
20
|
+
};
|
|
21
|
+
/** effects 原生effects,满足高阶场景 */
|
|
22
|
+
effects: {
|
|
23
|
+
type: FunctionConstructor;
|
|
24
|
+
default: any;
|
|
25
|
+
};
|
|
26
|
+
/** 需要注册的组件 */
|
|
27
|
+
components: {
|
|
28
|
+
type: ObjectConstructor;
|
|
29
|
+
default: () => {};
|
|
30
|
+
};
|
|
31
|
+
/** 额外能力 */
|
|
32
|
+
scope: {
|
|
33
|
+
type: ObjectConstructor;
|
|
34
|
+
default: () => {};
|
|
35
|
+
};
|
|
36
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
37
|
+
/** schema配置 */
|
|
38
|
+
config: {
|
|
39
|
+
type: PropType<ISchema>;
|
|
40
|
+
default: () => {};
|
|
41
|
+
};
|
|
42
|
+
/** 初始值 */
|
|
43
|
+
initialValues: {
|
|
44
|
+
type: ObjectConstructor;
|
|
45
|
+
default: () => {};
|
|
46
|
+
};
|
|
47
|
+
/** effectHooks */
|
|
48
|
+
effectHooks: {
|
|
49
|
+
type: PropType<IEffectHooks>;
|
|
50
|
+
default: () => {};
|
|
51
|
+
};
|
|
52
|
+
/** effects 原生effects,满足高阶场景 */
|
|
53
|
+
effects: {
|
|
54
|
+
type: FunctionConstructor;
|
|
55
|
+
default: any;
|
|
56
|
+
};
|
|
57
|
+
/** 需要注册的组件 */
|
|
58
|
+
components: {
|
|
59
|
+
type: ObjectConstructor;
|
|
60
|
+
default: () => {};
|
|
61
|
+
};
|
|
62
|
+
/** 额外能力 */
|
|
63
|
+
scope: {
|
|
64
|
+
type: ObjectConstructor;
|
|
65
|
+
default: () => {};
|
|
66
|
+
};
|
|
67
|
+
}>> & Readonly<{}>, {
|
|
68
|
+
components: Record<string, any>;
|
|
69
|
+
config: import("@formily/json-schema").Stringify<{
|
|
70
|
+
[key: symbol]: any;
|
|
71
|
+
[key: `x-${string}`]: any;
|
|
72
|
+
[key: `x-${number}`]: any;
|
|
73
|
+
version?: string;
|
|
74
|
+
name?: import("@formily/json-schema").SchemaKey;
|
|
75
|
+
title?: any;
|
|
76
|
+
description?: any;
|
|
77
|
+
default?: any;
|
|
78
|
+
readOnly?: boolean;
|
|
79
|
+
writeOnly?: boolean;
|
|
80
|
+
type?: import("@formily/json-schema").SchemaTypes;
|
|
81
|
+
enum?: import("@formily/json-schema").SchemaEnum<any>;
|
|
82
|
+
const?: any;
|
|
83
|
+
multipleOf?: number;
|
|
84
|
+
maximum?: number;
|
|
85
|
+
exclusiveMaximum?: number;
|
|
86
|
+
minimum?: number;
|
|
87
|
+
exclusiveMinimum?: number;
|
|
88
|
+
maxLength?: number;
|
|
89
|
+
minLength?: number;
|
|
90
|
+
pattern?: string | RegExp;
|
|
91
|
+
maxItems?: number;
|
|
92
|
+
minItems?: number;
|
|
93
|
+
uniqueItems?: boolean;
|
|
94
|
+
maxProperties?: number;
|
|
95
|
+
minProperties?: number;
|
|
96
|
+
required?: string[] | boolean | string;
|
|
97
|
+
format?: string;
|
|
98
|
+
$ref?: string;
|
|
99
|
+
$namespace?: string;
|
|
100
|
+
definitions?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
101
|
+
properties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
102
|
+
items?: import("@formily/json-schema").SchemaItems<any, any, any, any, any, any, any, any>;
|
|
103
|
+
additionalItems?: import("@formily/json-schema").Stringify</*elided*/ any>;
|
|
104
|
+
patternProperties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
105
|
+
additionalProperties?: import("@formily/json-schema").Stringify</*elided*/ any>;
|
|
106
|
+
"x-value"?: any;
|
|
107
|
+
"x-index"?: number;
|
|
108
|
+
"x-pattern"?: any;
|
|
109
|
+
"x-display"?: any;
|
|
110
|
+
"x-validator"?: any;
|
|
111
|
+
"x-decorator"?: any;
|
|
112
|
+
"x-decorator-props"?: any;
|
|
113
|
+
"x-component"?: any;
|
|
114
|
+
"x-component-props"?: any;
|
|
115
|
+
"x-reactions"?: import("@formily/json-schema").SchemaReactions<any>;
|
|
116
|
+
"x-content"?: any;
|
|
117
|
+
"x-data"?: any;
|
|
118
|
+
"x-visible"?: boolean;
|
|
119
|
+
"x-hidden"?: boolean;
|
|
120
|
+
"x-disabled"?: boolean;
|
|
121
|
+
"x-editable"?: boolean;
|
|
122
|
+
"x-read-only"?: boolean;
|
|
123
|
+
"x-read-pretty"?: boolean;
|
|
124
|
+
"x-compile-omitted"?: string[];
|
|
125
|
+
}>;
|
|
126
|
+
initialValues: Record<string, any>;
|
|
127
|
+
effectHooks: IEffectHooks;
|
|
128
|
+
effects: Function;
|
|
129
|
+
scope: Record<string, any>;
|
|
130
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
131
|
+
export default _default;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { defineComponent, ref, onUnmounted, createVNode } from 'vue';
|
|
2
|
+
import { createForm } from '@formily/core';
|
|
3
|
+
import { createSchemaField, FormProvider } from '@formily/vue';
|
|
4
|
+
import { Form, FormItem, FormDrawer, FormStep, FormCollapse, FormGrid, FormLayout, Space, Input, InputNumber, Password, PreviewText, Radio, Select, Cascader, Checkbox, DatePicker, Switch, TimePicker, Transfer, Upload, ArrayCards, ArrayCollapse, ArrayItems, ArrayTable, ArrayTabs, FormButtonGroup, Submit } from '@formily/element-plus';
|
|
5
|
+
import { ElTree, ElButton } from 'element-plus';
|
|
6
|
+
import { formEffectsMap, fieldEffectsMap } from './constants.mjs';
|
|
7
|
+
import { fetchOptions } from './utils.mjs';
|
|
8
|
+
import stylus from './index.module.mjs';
|
|
9
|
+
|
|
10
|
+
const props = {
|
|
11
|
+
/** schema配置 */
|
|
12
|
+
config: {
|
|
13
|
+
type: Object,
|
|
14
|
+
default: () => ({})
|
|
15
|
+
},
|
|
16
|
+
/** 初始值 */
|
|
17
|
+
initialValues: {
|
|
18
|
+
type: Object,
|
|
19
|
+
default: () => ({})
|
|
20
|
+
},
|
|
21
|
+
/** effectHooks */
|
|
22
|
+
effectHooks: {
|
|
23
|
+
type: Object,
|
|
24
|
+
default: () => ({})
|
|
25
|
+
},
|
|
26
|
+
/** effects 原生effects,满足高阶场景 */
|
|
27
|
+
effects: {
|
|
28
|
+
type: Function,
|
|
29
|
+
default: void 0
|
|
30
|
+
},
|
|
31
|
+
/** 需要注册的组件 */
|
|
32
|
+
components: {
|
|
33
|
+
type: Object,
|
|
34
|
+
default: () => ({})
|
|
35
|
+
},
|
|
36
|
+
/** 额外能力 */
|
|
37
|
+
scope: {
|
|
38
|
+
type: Object,
|
|
39
|
+
default: () => ({})
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
var index = defineComponent({
|
|
43
|
+
name: "FormilyForm",
|
|
44
|
+
inheritAttrs: true,
|
|
45
|
+
props,
|
|
46
|
+
setup(props2, {
|
|
47
|
+
expose,
|
|
48
|
+
slots
|
|
49
|
+
}) {
|
|
50
|
+
const containerRef = ref();
|
|
51
|
+
const commonEffects = (effect) => {
|
|
52
|
+
return effect;
|
|
53
|
+
};
|
|
54
|
+
const wrapEffects = (form) => {
|
|
55
|
+
if (props2.effects && typeof props2.effects === "function") {
|
|
56
|
+
props2.effects(form);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const {
|
|
60
|
+
formEffects = {},
|
|
61
|
+
fieldEffects = {}
|
|
62
|
+
} = props2.effectHooks;
|
|
63
|
+
Object.entries(formEffects).forEach(([k, fn]) => {
|
|
64
|
+
var _a, _b;
|
|
65
|
+
(_b = (_a = formEffectsMap)[k]) == null ? void 0 : _b.call(_a, commonEffects(fn));
|
|
66
|
+
});
|
|
67
|
+
Object.entries(fieldEffects).forEach(([k, v]) => {
|
|
68
|
+
Object.entries(v).forEach(([effectKey, fn]) => {
|
|
69
|
+
var _a, _b;
|
|
70
|
+
(_b = (_a = fieldEffectsMap)[effectKey]) == null ? void 0 : _b.call(_a, k, commonEffects(fn));
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
const formRef = createForm({
|
|
75
|
+
initialValues: props2.initialValues,
|
|
76
|
+
effects: wrapEffects
|
|
77
|
+
});
|
|
78
|
+
const {
|
|
79
|
+
SchemaField
|
|
80
|
+
} = createSchemaField({
|
|
81
|
+
scope: props2.scope,
|
|
82
|
+
components: {
|
|
83
|
+
Form,
|
|
84
|
+
FormItem,
|
|
85
|
+
FormDrawer,
|
|
86
|
+
FormStep,
|
|
87
|
+
FormCollapse,
|
|
88
|
+
FormGrid,
|
|
89
|
+
FormLayout,
|
|
90
|
+
Space,
|
|
91
|
+
Input,
|
|
92
|
+
InputNumber,
|
|
93
|
+
Password,
|
|
94
|
+
PreviewText,
|
|
95
|
+
Radio,
|
|
96
|
+
Select,
|
|
97
|
+
ElTree,
|
|
98
|
+
Cascader,
|
|
99
|
+
Checkbox,
|
|
100
|
+
DatePicker,
|
|
101
|
+
Switch,
|
|
102
|
+
TimePicker,
|
|
103
|
+
Transfer,
|
|
104
|
+
Upload,
|
|
105
|
+
ArrayCards,
|
|
106
|
+
ArrayCollapse,
|
|
107
|
+
ArrayItems,
|
|
108
|
+
ArrayTable,
|
|
109
|
+
ArrayTabs,
|
|
110
|
+
FormButtonGroup,
|
|
111
|
+
Submit,
|
|
112
|
+
ElButton,
|
|
113
|
+
...props2.components
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
onUnmounted(() => {
|
|
117
|
+
formRef == null ? void 0 : formRef.onUnmount();
|
|
118
|
+
});
|
|
119
|
+
expose({
|
|
120
|
+
formRef,
|
|
121
|
+
getContainerRef: () => containerRef.value
|
|
122
|
+
});
|
|
123
|
+
return () => createVNode("div", {
|
|
124
|
+
"ref": containerRef,
|
|
125
|
+
"class": stylus.container
|
|
126
|
+
}, [createVNode(FormProvider, {
|
|
127
|
+
"form": formRef
|
|
128
|
+
}, {
|
|
129
|
+
default: () => [createVNode(PreviewText.Placeholder, {
|
|
130
|
+
"value": "-"
|
|
131
|
+
}, {
|
|
132
|
+
default: () => {
|
|
133
|
+
var _a;
|
|
134
|
+
return [createVNode(SchemaField, {
|
|
135
|
+
"schema": props2.config,
|
|
136
|
+
"scope": {
|
|
137
|
+
...props2.scope,
|
|
138
|
+
fetchOptions
|
|
139
|
+
}
|
|
140
|
+
}, null), (_a = slots == null ? void 0 : slots.btnGroup) == null ? void 0 : _a.call(slots)];
|
|
141
|
+
}
|
|
142
|
+
})]
|
|
143
|
+
})]);
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
export { index as default };
|
|
148
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/formilyCmps/formilyForm/index.tsx"],"sourcesContent":["import { defineComponent, ref, onUnmounted } from 'vue'\nimport { createForm } from '@formily/core'\nimport { createSchemaField, FormProvider } from '@formily/vue'\nimport {\n Form,\n FormItem,\n FormDrawer,\n FormStep,\n FormCollapse,\n FormGrid,\n FormLayout,\n Space,\n Input,\n InputNumber,\n Password,\n PreviewText,\n Radio,\n Select,\n Cascader,\n Checkbox,\n DatePicker,\n Switch,\n TimePicker,\n Transfer,\n Upload,\n ArrayCards,\n ArrayCollapse,\n ArrayItems,\n ArrayTable,\n ArrayTabs,\n FormButtonGroup,\n Submit,\n} from '@formily/element-plus'\nimport { ElButton, ElTree } from 'element-plus'\nimport { formEffectsMap, fieldEffectsMap } from './constants'\nimport { fetchOptions } from './utils'\nimport stylus from './index.module.scss'\n\nimport type { PropType } from 'vue'\nimport type { Form as IForm } from '@formily/core'\nimport type { ISchema } from '@formily/vue'\nimport type { IEffectHooks } from './interfaces'\n\nconst props = {\n /** schema配置 */\n config: {\n type: Object as PropType<ISchema>,\n default: () => ({}),\n },\n /** 初始值 */\n initialValues: {\n type: Object,\n default: () => ({}),\n },\n /** effectHooks */\n effectHooks: {\n type: Object as PropType<IEffectHooks>,\n default: () => ({}),\n },\n /** effects 原生effects,满足高阶场景 */\n effects: {\n type: Function,\n default: undefined,\n },\n /** 需要注册的组件 */\n components: {\n type: Object,\n default: () => ({}),\n },\n /** 额外能力 */\n scope: {\n type: Object,\n default: () => ({}),\n },\n}\n\nexport type * from './interfaces'\nexport default defineComponent({\n name: 'FormilyForm',\n inheritAttrs: true,\n props,\n setup(props, { expose, slots }) {\n const containerRef = ref()\n const commonEffects = (effect: Function | undefined) => {\n // 其他逻辑\n return effect\n }\n const wrapEffects = (form: IForm) => {\n if (props.effects && typeof props.effects === 'function') {\n props.effects(form)\n return\n }\n const { formEffects = {}, fieldEffects = {} } = props.effectHooks\n Object.entries(formEffects).forEach(([k, fn]) => {\n formEffectsMap[k]?.(commonEffects(fn))\n })\n Object.entries(fieldEffects).forEach(([k, v]) => {\n Object.entries(v).forEach(([effectKey, fn]) => {\n fieldEffectsMap[effectKey]?.(k, commonEffects(fn))\n })\n })\n }\n const formRef = createForm({\n initialValues: props.initialValues,\n effects: wrapEffects,\n })\n const { SchemaField } = createSchemaField({\n scope: props.scope,\n components: {\n Form,\n FormItem,\n FormDrawer,\n FormStep,\n FormCollapse,\n FormGrid,\n FormLayout,\n Space,\n Input,\n InputNumber,\n Password,\n PreviewText,\n Radio,\n Select,\n ElTree,\n Cascader,\n Checkbox,\n DatePicker,\n Switch,\n TimePicker,\n Transfer,\n Upload,\n ArrayCards,\n ArrayCollapse,\n ArrayItems,\n ArrayTable,\n ArrayTabs,\n FormButtonGroup,\n Submit,\n ElButton,\n ...props.components,\n },\n })\n onUnmounted(() => {\n formRef?.onUnmount()\n })\n expose({ formRef, getContainerRef: () => containerRef.value })\n return () => (\n <div ref={containerRef} class={stylus.container}>\n <FormProvider form={formRef}>\n <PreviewText.Placeholder value='-'>\n <SchemaField\n schema={props.config}\n scope={{\n ...props.scope,\n fetchOptions,\n }}\n />\n {slots?.btnGroup?.()}\n </PreviewText.Placeholder>\n </FormProvider>\n </div>\n )\n },\n})\n"],"names":["props","config","type","Object","default","initialValues","effectHooks","effects","Function","undefined","components","scope","defineComponent","name","inheritAttrs","setup","expose","slots","containerRef","ref","commonEffects","effect","wrapEffects","form","formEffects","fieldEffects","entries","forEach","k","fn","formEffectsMap","v","effectKey","fieldEffectsMap","formRef","createForm","SchemaField","createSchemaField","Form","FormItem","FormDrawer","FormStep","FormCollapse","FormGrid","FormLayout","Space","Input","InputNumber","Password","PreviewText","Radio","Select","ElTree","Cascader","Checkbox","DatePicker","Switch","TimePicker","Transfer","Upload","ArrayCards","ArrayCollapse","ArrayItems","ArrayTable","ArrayTabs","FormButtonGroup","Submit","ElButton","onUnmounted","onUnmount","getContainerRef","value","_createVNode","stylus","container","FormProvider","Placeholder","fetchOptions","btnGroup"],"mappings":";;;;;;;;;AA2CA,MAAMA,KAAQ,GAAA;AAAA;AAAA,EAEZC,MAAQ,EAAA;AAAA,IACNC,IAAMC,EAAAA,MAAAA;AAAAA,IACNC,OAAAA,EAASA,OAAO,EAAC,CAAA;AAAA,GACnB;AAAA;AAAA,EAEAC,aAAe,EAAA;AAAA,IACbH,IAAMC,EAAAA,MAAAA;AAAAA,IACNC,OAAAA,EAASA,OAAO,EAAC,CAAA;AAAA,GACnB;AAAA;AAAA,EAEAE,WAAa,EAAA;AAAA,IACXJ,IAAMC,EAAAA,MAAAA;AAAAA,IACNC,OAAAA,EAASA,OAAO,EAAC,CAAA;AAAA,GACnB;AAAA;AAAA,EAEAG,OAAS,EAAA;AAAA,IACPL,IAAMM,EAAAA,QAAAA;AAAAA,IACNJ,OAASK,EAAAA,KAAAA,CAAAA;AAAAA,GACX;AAAA;AAAA,EAEAC,UAAY,EAAA;AAAA,IACVR,IAAMC,EAAAA,MAAAA;AAAAA,IACNC,OAAAA,EAASA,OAAO,EAAC,CAAA;AAAA,GACnB;AAAA;AAAA,EAEAO,KAAO,EAAA;AAAA,IACLT,IAAMC,EAAAA,MAAAA;AAAAA,IACNC,OAAAA,EAASA,OAAO,EAAC,CAAA;AAAA,GACnB;AACF,CAAA,CAAA;AAGA,YAAeQ,eAAgB,CAAA;AAAA,EAC7BC,IAAM,EAAA,aAAA;AAAA,EACNC,YAAc,EAAA,IAAA;AAAA,EACdd,KAAAA;AAAAA,EACAe,MAAMf,MAAO,EAAA;AAAA,IAAEgB,MAAAA;AAAAA,IAAQC,KAAAA;AAAAA,GAAS,EAAA;AAC9B,IAAA,MAAMC,eAAeC,GAAI,EAAA,CAAA;AACzB,IAAA,MAAMC,gBAAiBC,CAAiC,MAAA,KAAA;AAEtD,MAAOA,OAA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ap, fieldEffectsMap } from './constants';
|
|
2
|
+
import type { Form } from '@formily/core';
|
|
3
|
+
/** formilyFormExpose */
|
|
4
|
+
export type IFormilyFormExpose = {
|
|
5
|
+
/** form实例 */
|
|
6
|
+
formRef: Form;
|
|
7
|
+
/** 获取container容器 */
|
|
8
|
+
getContainerRef: () => HTMLElement;
|
|
9
|
+
};
|
|
10
|
+
/** formEffectsMap【formily api】 */
|
|
11
|
+
export type IFormEffects = {
|
|
12
|
+
[K in keyof typeof formEffectsMap]?: typeof formEffectsMap[K];
|
|
13
|
+
};
|
|
14
|
+
/** fieldEffectsMap【formily api】 */
|
|
15
|
+
export type IFieldEffect = {
|
|
16
|
+
[K in keyof typeof fieldEffectsMap]?: typeof fieldEffectsMap[K];
|
|
17
|
+
};
|
|
18
|
+
/** IFieldEffectHooks【组件自定义】 */
|
|
19
|
+
export interface IFieldEffects {
|
|
20
|
+
[K: string]: IFieldEffect;
|
|
21
|
+
}
|
|
22
|
+
/** effectHooks【组件自定义】 */
|
|
23
|
+
export interface IEffectHooks {
|
|
24
|
+
/** IFormEffectHooks */
|
|
25
|
+
formEffects?: IFormEffects;
|
|
26
|
+
/** IFieldEffectHooks */
|
|
27
|
+
fieldEffects?: IFieldEffects;
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const fetchOptions = async (field) => {
|
|
2
|
+
var _a;
|
|
3
|
+
try {
|
|
4
|
+
const { api, params: curParams, formatter, remote } = ((_a = field.componentProps) == null ? void 0 : _a.fetchConfig) || {};
|
|
5
|
+
const params = typeof curParams === "function" ? await curParams() : curParams;
|
|
6
|
+
const res = await (api == null ? void 0 : api(params));
|
|
7
|
+
field.dataSource = typeof formatter === "function" ? formatter(res) : res;
|
|
8
|
+
} catch (error) {
|
|
9
|
+
console.error(`\u83B7\u53D6options\u5931\u8D25\uFF0C\u5931\u8D25\u539F\u56E0\uFF1A${error}`);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { fetchOptions };
|
|
14
|
+
//# sourceMappingURL=utils.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.mjs","sources":["../../../../../../packages/components/formilyCmps/formilyForm/utils.ts"],"sourcesContent":["import type { Field } from \"@formily/core\"\n\n/** 获取options */\nexport const fetchOptions = async (field: Field) => {\n try {\n const { api, params: curParams, formatter, remote } = field.componentProps?.fetchConfig || {} // TODO: 缺少实时获取数据功能\n const params = typeof curParams === 'function' ? await curParams() : curParams\n const res = await api?.(params)\n field.dataSource = typeof formatter === 'function' ? formatter(res) : res\n } catch (error: any) {\n console.error(`获取options失败,失败原因:${error}`)\n }\n}\n"],"names":[],"mappings":"AAGa,MAAA,YAAA,GAAe,OAAO,KAAiB,KAAA;AAHpD,EAAA,IAAA,EAAA,CAAA;AAIE,EAAI,IAAA;AACF,IAAM,MAAA,EAAE,GAAK,EAAA,MAAA,EAAQ,SAAW,EAAA,SAAA,EAAW,MAAO,EAAA,GAAA,CAAA,CAAI,EAAM,GAAA,KAAA,CAAA,cAAA,KAAN,IAAsB,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,WAAA,KAAe,EAAC,CAAA;AAC5F,IAAA,MAAM,SAAS,OAAO,SAAA,KAAc,UAAa,GAAA,MAAM,WAAc,GAAA,SAAA,CAAA;AACrE,IAAM,MAAA,GAAA,GAAM,OAAM,GAAM,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,GAAA,CAAA,MAAA,CAAA,CAAA,CAAA;AACxB,IAAA,KAAA,CAAM,aAAa,OAAO,SAAA,KAAc,UAAa,GAAA,SAAA,CAAU,GAAG,CAAI,GAAA,GAAA,CAAA;AAAA,WAC/D,KAAY,EAAA;AACnB,IAAQ,OAAA,CAAA,KAAA,CAAM,CAAoB,mEAAA,EAAA,KAAK,CAAE,CAAA,CAAA,CAAA;AAAA,GAC3C;AACF;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
/** 标题 */
|
|
4
|
+
title: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
/** 类型 */
|
|
9
|
+
type: {
|
|
10
|
+
type: PropType<"primary" | "danger">;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
14
|
+
/** 标题 */
|
|
15
|
+
title: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
/** 类型 */
|
|
20
|
+
type: {
|
|
21
|
+
type: PropType<"primary" | "danger">;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
}>> & Readonly<{}>, {
|
|
25
|
+
title: string;
|
|
26
|
+
type: "primary" | "danger";
|
|
27
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineComponent, createVNode } from 'vue';
|
|
2
|
+
import styles from './index.module.mjs';
|
|
3
|
+
|
|
4
|
+
const props = {
|
|
5
|
+
/** 标题 */
|
|
6
|
+
title: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: ""
|
|
9
|
+
},
|
|
10
|
+
/** 类型 */
|
|
11
|
+
type: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "primary"
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
var index = defineComponent({
|
|
17
|
+
name: "SectionTitle",
|
|
18
|
+
props,
|
|
19
|
+
setup(props2) {
|
|
20
|
+
return () => createVNode("div", {
|
|
21
|
+
"class": [styles.wrapper, {
|
|
22
|
+
[styles.primary]: props2.type === "primary",
|
|
23
|
+
[styles.danger]: props2.type === "danger"
|
|
24
|
+
}]
|
|
25
|
+
}, [props2.title]);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export { index as default };
|
|
30
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/formilyCmps/sectionTitle/index.tsx"],"sourcesContent":["import { defineComponent } from 'vue'\nimport styles from './index.module.scss'\n\nimport type { PropType } from 'vue'\n\nconst props = {\n /** 标题 */\n title: {\n type: String,\n default: '',\n },\n /** 类型 */\n type: {\n type: String as PropType<'primary' | 'danger'>,\n default: 'primary',\n },\n}\n\nexport default defineComponent({\n name: 'SectionTitle',\n props,\n setup(props) {\n return () => (\n <div\n class={[\n styles.wrapper,\n {\n [styles.primary]: props.type === 'primary',\n [styles.danger]: props.type === 'danger',\n },\n ]}\n >{props.title}</div>\n )\n },\n})\n"],"names":["props","title","type","String","default","defineComponent","name","setup","_createVNode","styles","wrapper","primary","danger"],"mappings":";;;AAKA,MAAMA,KAAQ,GAAA;AAAA;AAAA,EAEZC,KAAO,EAAA;AAAA,IACLC,IAAMC,EAAAA,MAAAA;AAAAA,IACNC,OAAS,EAAA,EAAA;AAAA,GACX;AAAA;AAAA,EAEAF,IAAM,EAAA;AAAA,IACJA,IAAMC,EAAAA,MAAAA;AAAAA,IACNC,OAAS,EAAA,SAAA;AAAA,GACX;AACF,CAAA,CAAA;AAEA,YAAeC,eAAgB,CAAA;AAAA,EAC7BC,IAAM,EAAA,cAAA;AAAA,EACNN,KAAAA;AAAAA,EACAO,MAAMP,MAAO,EAAA;AACX,IAAO,OAAA,MAAAQ,YAAA,KAAA,EAAA;AAAA,MAAA,OAAA,EAEI,CACLC,MAAAA,CAAOC,OACP,EAAA;AAAA,QACE,CAACD,MAAAA,CAAOE,OAAO,GAAGX,OAAME,IAAS,KAAA,SAAA;AAAA,QACjC,CAACO,MAAAA,CAAOG,MAAM,GAAGZ,OAAME,IAAS,KAAA,QAAA;AAAA,OACjC,CAAA;AAAA,KAEHF,EAAAA,CAAAA,MAAMC,CAAAA,KAAK,CACd,CAAA,CAAA;AAAA,GACH;AACF,CAAC,CAAA;;;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var styles = {"menuText":"#41464f","menuActiveText":"#007dff","subMenuActiveText":"#007dff","menuBg":"#f0f3f7","menuHover":"rgba(0, 125, 255, 0.1019607843)","subMenuBg":"#fff","subMenuHover":"#e6edfa","sideBarWidth":"220px","primaryColor":"#007dff","mainHorizontalPadding":"20px","wrapper":"index-module_wrapper__o-ooH","primary":"index-module_primary__-O491","danger":"index-module_danger__8-OdG"};
|
|
2
|
+
|
|
3
|
+
export { styles as default };
|
|
4
|
+
//# sourceMappingURL=index.module.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.module.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/es/components/index.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
export { default as
|
|
1
|
+
export { default as CommonDrawer } from './commonDrawer';
|
|
2
|
+
export * from './commonDrawer';
|
|
3
|
+
export * from './formilyCmps';
|
|
4
|
+
export { default as CodeEditor } from './codeEditor';
|
|
5
|
+
export { default as RadioGroup } from './radioGroup';
|
|
2
6
|
export { default as Space } from './space';
|
package/es/components/index.mjs
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
export { default as
|
|
1
|
+
export { default as CommonDrawer } from './commonDrawer/index.mjs';
|
|
2
|
+
export { default as FormilyForm } from './formilyCmps/formilyForm/index.mjs';
|
|
3
|
+
export { composeFormTab as FormTab, composeFormTab } from './formilyCmps/formTab/index.mjs';
|
|
4
|
+
export { default as CodeEditor } from './codeEditor/index.mjs';
|
|
5
|
+
export { default as RadioGroup } from './radioGroup/index.mjs';
|
|
2
6
|
export { default as Space } from './space/index.mjs';
|
|
3
7
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|