cnhis-design-vue 3.1.15-beta.8 → 3.1.15-beta.9
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/packages/form-config/index.d.ts +27 -31
- package/es/packages/form-config/src/FormConfig.js +5 -5
- package/es/packages/form-config/src/FormConfig.vue.d.ts +310 -313
- package/es/packages/form-config/src/components/FormConfigCreator.vue.d.ts +3 -3
- package/es/packages/form-config/src/components/FormConfigEdit.vue.d.ts +4 -6
- package/es/packages/form-config/src/hooks/useConfigurationField.js +5 -3
- package/es/packages/form-config/src/hooks/usePresetRenderer.d.ts +2 -2
- package/es/packages/form-config/src/hooks/usePresetRenderer.js +2 -2
- package/es/packages/form-config/src/types/index.d.ts +1 -1
- package/es/packages/form-render/index.d.ts +3 -3
- package/es/packages/form-render/src/FormRender.vue.d.ts +3 -3
- package/es/packages/form-render/src/components/renderer/select.js +15 -8
- package/es/packages/form-render/src/hooks/useAsyncQueue.d.ts +2 -2
- package/es/packages/form-render/src/hooks/useAsyncQueue.js +4 -8
- package/es/packages/form-render/src/hooks/useFormContext.js +10 -4
- package/es/packages/form-render/src/hooks/useFormRenderLifeCycle.d.ts +2 -2
- package/es/packages/form-render/src/types/index.d.ts +7 -3
- package/es/packages/form-render/src/utils/index.d.ts +1 -1
- package/es/packages/form-render/src/utils/index.js +17 -6
- package/es/packages/shortcut-setter/index.d.ts +3 -3
- package/es/packages/shortcut-setter/src/ShortcutSetter.vue.d.ts +3 -3
- package/package.json +1 -1
|
@@ -2,14 +2,17 @@
|
|
|
2
2
|
import { SFCWithInstall } from '../../../es/src/types';
|
|
3
3
|
export * from './src/types';
|
|
4
4
|
declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
5
|
-
|
|
6
|
-
type:
|
|
7
|
-
required: false;
|
|
5
|
+
textFormatter: {
|
|
6
|
+
type: import("vue").PropType<import("./src/types").FormConfigTextFormatter>;
|
|
8
7
|
};
|
|
9
8
|
}, {
|
|
10
|
-
props: {
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
textFormatter: {
|
|
11
|
+
type: import("vue").PropType<import("./src/types").FormConfigTextFormatter>;
|
|
12
|
+
};
|
|
13
|
+
}>> & {
|
|
14
|
+
[x: `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
15
|
+
}>>;
|
|
13
16
|
commonConfig: {
|
|
14
17
|
onMove: ({ to, from }: import("sortablejs").SortableEvent) => void;
|
|
15
18
|
onChoose: ({ target, item }: import("sortablejs").SortableEvent) => void;
|
|
@@ -88,13 +91,11 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
88
91
|
urlConfig?: {
|
|
89
92
|
url?: string | undefined;
|
|
90
93
|
method?: "delete" | "post" | "get" | "patch" | "put" | undefined;
|
|
91
|
-
dependKey?: Record<string, string> |
|
|
94
|
+
dependKey?: string | Record<string, string> | (string | {
|
|
92
95
|
paramName: string;
|
|
93
|
-
paramValue
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
paramValue: string;
|
|
97
|
-
}[] | undefined;
|
|
96
|
+
paramValue?: string | undefined;
|
|
97
|
+
required?: boolean | undefined;
|
|
98
|
+
})[] | undefined;
|
|
98
99
|
params?: import("../../../es/src/types").AnyObject | undefined;
|
|
99
100
|
nameKey?: string | undefined;
|
|
100
101
|
valueKey?: string | undefined;
|
|
@@ -1741,13 +1742,11 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1741
1742
|
urlConfig?: {
|
|
1742
1743
|
url?: string | undefined;
|
|
1743
1744
|
method?: "delete" | "post" | "get" | "patch" | "put" | undefined;
|
|
1744
|
-
dependKey?: Record<string, string> |
|
|
1745
|
+
dependKey?: string | Record<string, string> | (string | {
|
|
1745
1746
|
paramName: string;
|
|
1746
|
-
paramValue
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
paramValue: string;
|
|
1750
|
-
}[] | undefined;
|
|
1747
|
+
paramValue?: string | undefined;
|
|
1748
|
+
required?: boolean | undefined;
|
|
1749
|
+
})[] | undefined;
|
|
1751
1750
|
params?: import("../../../es/src/types").AnyObject | undefined;
|
|
1752
1751
|
nameKey?: string | undefined;
|
|
1753
1752
|
valueKey?: string | undefined;
|
|
@@ -3325,7 +3324,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3325
3324
|
}[] | undefined;
|
|
3326
3325
|
}[]>;
|
|
3327
3326
|
addItem: (fieldItem: import("..").FieldItem) => void;
|
|
3328
|
-
|
|
3327
|
+
textFormatter: import("./src/types").FormConfigTextFormatter;
|
|
3329
3328
|
getRenderer: (fieldItem: import("..").FieldItem) => import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>;
|
|
3330
3329
|
currentEditField: import("vue").Ref<import("..").FieldItem | undefined>;
|
|
3331
3330
|
formConfigEditRef: import("vue").Ref<{
|
|
@@ -3495,13 +3494,11 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3495
3494
|
urlConfig?: {
|
|
3496
3495
|
url?: string | undefined;
|
|
3497
3496
|
method?: "delete" | "post" | "get" | "patch" | "put" | undefined;
|
|
3498
|
-
dependKey?: Record<string, string> |
|
|
3499
|
-
paramName: string;
|
|
3500
|
-
paramValue: string;
|
|
3501
|
-
} | {
|
|
3497
|
+
dependKey?: string | Record<string, string> | (string | {
|
|
3502
3498
|
paramName: string;
|
|
3503
|
-
paramValue
|
|
3504
|
-
|
|
3499
|
+
paramValue?: string | undefined;
|
|
3500
|
+
required?: boolean | undefined;
|
|
3501
|
+
})[] | undefined;
|
|
3505
3502
|
params?: import("../../../es/src/types").AnyObject | undefined;
|
|
3506
3503
|
nameKey?: string | undefined;
|
|
3507
3504
|
valueKey?: string | undefined;
|
|
@@ -10463,7 +10460,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
10463
10460
|
type: import("vue").PropType<Partial<{
|
|
10464
10461
|
onSetup(): void;
|
|
10465
10462
|
beforeRequest(fieldKey: string, params?: import("../../../es/src/types").AnyObject | undefined): void | import("../../../es/src/types").WithUndefined<import("../../../es/src/types").AnyObject>;
|
|
10466
|
-
afterRequest(fieldKey: string, payload?:
|
|
10463
|
+
afterRequest(fieldKey: string, payload?: any): import("../../../es/src/types").AnyObject[];
|
|
10467
10464
|
}>>;
|
|
10468
10465
|
};
|
|
10469
10466
|
}, {
|
|
@@ -10578,7 +10575,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
10578
10575
|
type: import("vue").PropType<Partial<{
|
|
10579
10576
|
onSetup(): void;
|
|
10580
10577
|
beforeRequest(fieldKey: string, params?: import("../../../es/src/types").AnyObject | undefined): void | import("../../../es/src/types").WithUndefined<import("../../../es/src/types").AnyObject>;
|
|
10581
|
-
afterRequest(fieldKey: string, payload?:
|
|
10578
|
+
afterRequest(fieldKey: string, payload?: any): import("../../../es/src/types").AnyObject[];
|
|
10582
10579
|
}>>;
|
|
10583
10580
|
};
|
|
10584
10581
|
}>> & {
|
|
@@ -12080,7 +12077,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
12080
12077
|
type: import("vue").PropType<Partial<{
|
|
12081
12078
|
onSetup(): void;
|
|
12082
12079
|
beforeRequest(fieldKey: string, params?: import("../../../es/src/types").AnyObject | undefined): void | import("../../../es/src/types").WithUndefined<import("../../../es/src/types").AnyObject>;
|
|
12083
|
-
afterRequest(fieldKey: string, payload?:
|
|
12080
|
+
afterRequest(fieldKey: string, payload?: any): import("../../../es/src/types").AnyObject[];
|
|
12084
12081
|
}>>;
|
|
12085
12082
|
};
|
|
12086
12083
|
}>> & {
|
|
@@ -12101,9 +12098,8 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
12101
12098
|
onSubmit?: ((payload: import("..").FieldItem) => any) | undefined;
|
|
12102
12099
|
}, {}>;
|
|
12103
12100
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
12104
|
-
|
|
12105
|
-
type:
|
|
12106
|
-
required: false;
|
|
12101
|
+
textFormatter: {
|
|
12102
|
+
type: import("vue").PropType<import("./src/types").FormConfigTextFormatter>;
|
|
12107
12103
|
};
|
|
12108
12104
|
}>>, {}>>;
|
|
12109
12105
|
export default FormConfig;
|
|
@@ -19,7 +19,7 @@ const _hoisted_8 = /* @__PURE__ */ createElementVNode("header", { class: "form-c
|
|
|
19
19
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
20
20
|
__name: "FormConfig",
|
|
21
21
|
props: {
|
|
22
|
-
|
|
22
|
+
textFormatter: { type: Function }
|
|
23
23
|
},
|
|
24
24
|
setup(__props, { expose }) {
|
|
25
25
|
const props = __props;
|
|
@@ -31,12 +31,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
31
31
|
return;
|
|
32
32
|
fieldListRef.value.push(fieldItem);
|
|
33
33
|
}
|
|
34
|
-
const
|
|
35
|
-
if (!isFunction(props.
|
|
34
|
+
const textFormatter = (fieldItem, parsedText) => {
|
|
35
|
+
if (!isFunction(props.textFormatter))
|
|
36
36
|
return parsedText;
|
|
37
|
-
return props.
|
|
37
|
+
return props.textFormatter(fieldItem, parsedText);
|
|
38
38
|
};
|
|
39
|
-
const { getRenderer } = usePresetRenderer(
|
|
39
|
+
const { getRenderer } = usePresetRenderer(textFormatter);
|
|
40
40
|
const currentEditField = ref();
|
|
41
41
|
provide(InjectionActiveFieldItem, currentEditField);
|
|
42
42
|
const formConfigEditRef = ref();
|