cnhis-design-vue 3.2.13-beta.4 → 3.2.14-beta.14
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/ai-chat/index.d.ts +97 -7
- package/es/components/ai-chat/src/Index.vue.d.ts +98 -8
- package/es/components/ai-chat/src/Index.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatBI.vue.d.ts +101 -0
- package/es/components/ai-chat/src/components/ChatBI.vue.js +1 -0
- package/es/components/ai-chat/src/components/ChatBI.vue2.js +1 -0
- package/es/components/ai-chat/src/components/ChatCard.d.ts +21 -2
- package/es/components/ai-chat/src/components/ChatCard.js +1 -1
- package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +61 -3
- package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatMain.d.ts +1 -1
- package/es/components/ai-chat/src/components/ChatMain.js +1 -1
- package/es/components/ai-chat/src/components/ChatPatient.vue.d.ts +59 -0
- package/es/components/ai-chat/src/components/ChatPatient.vue.js +1 -0
- package/es/components/ai-chat/src/components/ChatPatient.vue2.js +1 -0
- package/es/components/ai-chat/src/types/index.d.ts +4 -3
- package/es/components/ai-chat/src/utils/index.d.ts +1 -0
- package/es/components/ai-chat/src/utils/index.js +1 -0
- package/es/components/ai-chat/style/index.css +1 -1
- package/es/components/button-print/index.d.ts +4 -4
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +4 -4
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +4 -4
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +8 -6
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/useCommon.js +1 -1
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
- package/es/components/fabric-chart/src/utils/index.d.ts +1 -0
- package/es/components/fabric-chart/src/utils/index.js +1 -1
- package/es/components/form-config/index.d.ts +9 -110
- package/es/components/form-config/index.js +1 -1
- package/es/components/form-config/src/FormConfig.vue.d.ts +9 -110
- package/es/components/form-config/src/FormConfig.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +2 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +4 -2
- package/es/components/form-config/src/components/FormConfigEdit.vue2.js +1 -1
- package/es/components/form-config/src/components/renderer/ComplexNode.vue.d.ts +2 -1
- package/es/components/form-config/src/components/renderer/ComplexNode.vue2.js +1 -1
- package/es/components/form-config/src/components/renderer/DefaultNode.vue2.js +1 -1
- package/es/components/form-config/src/constants/index.d.ts +2 -11
- package/es/components/form-config/src/constants/index.js +1 -1
- package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
- package/es/components/form-config/src/hooks/useLocale.d.ts +52 -0
- package/es/components/form-config/src/hooks/useLocale.js +1 -0
- package/es/components/form-config/src/types/index.d.ts +1 -0
- package/es/components/form-config/src/utils/index.d.ts +1 -0
- package/es/components/form-config/src/utils/index.js +1 -1
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
- package/es/components/form-render/src/utils/index.d.ts +1 -0
- package/es/components/form-render/src/utils/index.js +1 -1
- package/es/components/iho-chat/index.d.ts +104 -1
- package/es/components/iho-chat/src/Index.vue.d.ts +104 -1
- package/es/components/iho-chat/src/Index.vue2.js +1 -1
- package/es/components/iho-chat/src/api/index.d.ts +1 -0
- package/es/components/iho-chat/src/api/index.js +1 -1
- package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +13 -0
- package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +13 -0
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +14 -0
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +48 -1
- package/es/components/iho-chat/src/components/ChatHeader.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +13 -0
- package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +14 -1
- package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +13 -0
- package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +1 -1
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/SiderList.vue.d.ts +2 -0
- package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
- package/es/components/iho-chat/src/components/Video.vue2.js +1 -1
- package/es/components/iho-chat/src/constants/index.d.ts +11 -2
- package/es/components/iho-chat/src/constants/index.js +1 -1
- package/es/components/iho-chat/src/hooks/useSearchUserList.js +1 -1
- package/es/components/iho-chat/src/hooks/useSession.d.ts +2 -0
- package/es/components/iho-chat/src/hooks/useSession.js +1 -1
- package/es/components/iho-chat/src/utils/index.d.ts +1 -0
- package/es/components/iho-chat/src/utils/index.js +1 -1
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/iho-table/index.d.ts +8 -6
- package/es/components/iho-table/src/IhoTable.vue.d.ts +8 -6
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/crossHeaderPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +20 -0
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/headerPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +7 -2
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.js +1 -1
- package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue2.js +1 -1
- package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts +4 -7
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +4 -7
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +4 -7
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/index.d.ts +3 -0
- package/es/shared/utils/index.d.ts +1 -0
- package/es/shared/utils/index.js +1 -1
- package/package.json +2 -2
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.js +0 -1
- package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +0 -1
@@ -1,5 +1,6 @@
|
|
1
1
|
import { SFCWithInstall } from '../../shared/types';
|
2
2
|
export * from './src/types';
|
3
|
+
export * from './src/hooks/useLocale';
|
3
4
|
declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
4
5
|
maxHeight: {
|
5
6
|
type: StringConstructor;
|
@@ -16,7 +17,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
16
17
|
extraMaterialList: {
|
17
18
|
type: import("vue").PropType<import("./src/types").FormConfigItem[] | (() => import("./src/types").FormConfigItem[] | Promise<import("./src/types").FormConfigItem[]>)>;
|
18
19
|
};
|
19
|
-
showLowCodeReactions: BooleanConstructor;
|
20
20
|
formProps: {
|
21
21
|
type: import("vue").PropType<Partial<Partial<{
|
22
22
|
fieldList: import("..").FieldItem[];
|
@@ -144,7 +144,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
144
144
|
extraMaterialList: {
|
145
145
|
type: import("vue").PropType<import("./src/types").FormConfigItem[] | (() => import("./src/types").FormConfigItem[] | Promise<import("./src/types").FormConfigItem[]>)>;
|
146
146
|
};
|
147
|
-
showLowCodeReactions: BooleanConstructor;
|
148
147
|
formProps: {
|
149
148
|
type: import("vue").PropType<Partial<Partial<{
|
150
149
|
fieldList: import("..").FieldItem[];
|
@@ -258,9 +257,8 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
258
257
|
}>> & {
|
259
258
|
onAddItem?: ((...args: any[]) => any) | undefined;
|
260
259
|
onRemoveItem?: ((...args: any[]) => any) | undefined;
|
261
|
-
onReactionsValidateFailure?: ((...args: any[]) => any) | undefined;
|
262
260
|
}>>;
|
263
|
-
emit: (event: "addItem" | "removeItem"
|
261
|
+
emit: (event: "addItem" | "removeItem", ...args: any[]) => void;
|
264
262
|
uuid: string;
|
265
263
|
cssVars: import("vue").ComputedRef<import("../../shared/types").AnyObject>;
|
266
264
|
fieldListRef: import("vue").Ref<import("./src/types").FormConfigItem[]>;
|
@@ -317,6 +315,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
317
315
|
extraOptions: import("vue").ComputedRef<import("./src/types").FormConfigItem[]>;
|
318
316
|
onFocus: () => Promise<void>;
|
319
317
|
useVersion: typeof import("../../shared/hooks").useVersion;
|
318
|
+
useFormConfigLocale: typeof import("./src/hooks/useLocale").useFormConfigLocale;
|
320
319
|
Draggable: import("vue").DefineComponent<{
|
321
320
|
list: {
|
322
321
|
type: ArrayConstructor;
|
@@ -404,6 +403,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
404
403
|
NButton: any;
|
405
404
|
NButtonGroup: any;
|
406
405
|
NPopconfirm: any;
|
406
|
+
useFormConfigLocale: typeof import("./src/hooks/useLocale").useFormConfigLocale;
|
407
407
|
CFormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
408
408
|
formRenderRef: import("vue").Ref<import("..").FormRenderExpose | undefined>;
|
409
409
|
key: import("vue").Ref<number>;
|
@@ -1967,6 +1967,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
1967
1967
|
layoutWidthEnum?: import("./src/types").FormConfigWidth | undefined;
|
1968
1968
|
type?: string | undefined;
|
1969
1969
|
name?: string | undefined;
|
1970
|
+
alias?: string | undefined;
|
1970
1971
|
show?: boolean | undefined;
|
1971
1972
|
defaultValue?: any;
|
1972
1973
|
defaultExpand?: boolean | undefined;
|
@@ -1983,6 +1984,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
1983
1984
|
layoutWidthEnum: import("./src/types").FormConfigWidth;
|
1984
1985
|
type: string;
|
1985
1986
|
name: string;
|
1987
|
+
alias?: string | undefined;
|
1986
1988
|
show?: boolean | undefined;
|
1987
1989
|
defaultValue?: any;
|
1988
1990
|
defaultExpand?: boolean | undefined;
|
@@ -2442,8 +2444,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
2442
2444
|
__extra?: boolean | undefined;
|
2443
2445
|
}>;
|
2444
2446
|
generateFieldListByFormConfigItem: (formConfigItem: import("./src/types").FormConfigItem, fieldItem?: import("..").FieldItem | undefined) => import("..").FieldItem[];
|
2445
|
-
showModal: import("vue").Ref<boolean>;
|
2446
|
-
onPositiveClick: () => Promise<void>;
|
2447
2447
|
prevOldField: null;
|
2448
2448
|
onFormChange: ({ fieldKey, value }: import("..").FormChangePayload) => void;
|
2449
2449
|
createLabelRender: (originOptions?: import("../../shared/types").AnyObject[] | undefined) => (label: string) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
@@ -2669,6 +2669,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
2669
2669
|
}[]>;
|
2670
2670
|
onOptionModalCancel: () => void;
|
2671
2671
|
onOptionModalConfirm: () => void;
|
2672
|
+
useFormConfigLocale: typeof import("./src/hooks/useLocale").useFormConfigLocale;
|
2672
2673
|
NModal: any;
|
2673
2674
|
NSpace: any;
|
2674
2675
|
NInput: any;
|
@@ -3783,104 +3784,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
3783
3784
|
}>>>;
|
3784
3785
|
};
|
3785
3786
|
}>>, {}>;
|
3786
|
-
FormConfigEventSetting: import("vue").DefineComponent<{
|
3787
|
-
modelValue: {
|
3788
|
-
type: ArrayConstructor;
|
3789
|
-
required: true;
|
3790
|
-
default: () => never[];
|
3791
|
-
};
|
3792
|
-
}, {
|
3793
|
-
props: {
|
3794
|
-
modelValue: import("../../shared/types").LowCodeTypes.reactionConfig[];
|
3795
|
-
};
|
3796
|
-
emit: (event: "update:modelValue" | "validateFailure", ...args: any[]) => void;
|
3797
|
-
cssVars: import("vue").ComputedRef<import("../../shared/types").AnyObject>;
|
3798
|
-
valueRef: import("vue").Ref<{
|
3799
|
-
conObj: {
|
3800
|
-
con: import("../../shared/types").LowCodeTypes.VALUE_RELATION;
|
3801
|
-
field_key: string;
|
3802
|
-
value: unknown;
|
3803
|
-
}[];
|
3804
|
-
compareMap?: {
|
3805
|
-
NULL?: ((v1: any, v2: any) => boolean) | undefined;
|
3806
|
-
EQ?: ((v1: any, v2: any) => boolean) | undefined;
|
3807
|
-
BIG?: ((v1: any, v2: any) => boolean) | undefined;
|
3808
|
-
LESS?: ((v1: any, v2: any) => boolean) | undefined;
|
3809
|
-
BIGEQ?: ((v1: any, v2: any) => boolean) | undefined;
|
3810
|
-
LESSEQ?: ((v1: any, v2: any) => boolean) | undefined;
|
3811
|
-
CL?: ((v1: any, v2: any) => boolean) | undefined;
|
3812
|
-
NC?: ((v1: any, v2: any) => boolean) | undefined;
|
3813
|
-
NEQ?: ((v1: any, v2: any) => boolean) | undefined;
|
3814
|
-
NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
|
3815
|
-
} | undefined;
|
3816
|
-
isRestoreDefault?: boolean | undefined;
|
3817
|
-
sqlExpression?: string | undefined;
|
3818
|
-
showField?: string[] | undefined;
|
3819
|
-
hideField?: string[] | undefined;
|
3820
|
-
requiredField?: string[] | undefined;
|
3821
|
-
notRequiredField?: string[] | undefined;
|
3822
|
-
enabledField?: string[] | undefined;
|
3823
|
-
disabledField?: string[] | undefined;
|
3824
|
-
__oppositeBindField?: any | undefined;
|
3825
|
-
__oppositeTargetField?: any | undefined;
|
3826
|
-
}[]>;
|
3827
|
-
expandedName: import("vue").Ref<string>;
|
3828
|
-
addConnection: () => void;
|
3829
|
-
removeConnection: (index: number) => void;
|
3830
|
-
getOppositeBtnText: (item: import("../../shared/types").LowCodeTypes.reactionConfig) => string | undefined;
|
3831
|
-
unBindOpposite: (item: import("../../shared/types").LowCodeTypes.reactionConfig) => void;
|
3832
|
-
addOppositeCondition: (item: import("../../shared/types").LowCodeTypes.reactionConfig) => void;
|
3833
|
-
getOppositeSqlExpression: (expression?: string | undefined) => string | undefined;
|
3834
|
-
createOppositeCondition: (config: import("../../shared/types").LowCodeTypes.reactionConfig) => import("../../shared/types").LowCodeTypes.reactionConfig;
|
3835
|
-
isOppositeConfig: (c1: import("../../shared/types").LowCodeTypes.reactionConfig, c2: import("../../shared/types").LowCodeTypes.reactionConfig) => boolean;
|
3836
|
-
onUpdateExpandedNames: (value: string[]) => void;
|
3837
|
-
getBinderFieldDesc: (index: number) => string;
|
3838
|
-
addCondition: (config: import("../../shared/types").LowCodeTypes.reactionConfig) => void;
|
3839
|
-
removeCondition: (config: import("../../shared/types").LowCodeTypes.reactionConfig, index: number) => void;
|
3840
|
-
onUpdateConditionType: (condition: import("../../shared/types").LowCodeTypes.reactionsConObj, type: import("../../shared/types").LowCodeTypes.VALUE_RELATION) => void;
|
3841
|
-
showRef: import("vue").Ref<boolean>;
|
3842
|
-
fieldListRef: import("vue").Ref<import("./src/types").FormConfigItem[]>;
|
3843
|
-
fieldOptions: import("vue").ComputedRef<import("./src/types").FormConfigItem[]>;
|
3844
|
-
currentTypeList: string[];
|
3845
|
-
dialog: import("naive-ui").DialogApi;
|
3846
|
-
onNegativeClick: () => Promise<void>;
|
3847
|
-
onPositiveClick: () => Promise<void>;
|
3848
|
-
configValidate: () => Promise<void>;
|
3849
|
-
HelpCircleSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
3850
|
-
NButton: any;
|
3851
|
-
NModal: any;
|
3852
|
-
NSpace: any;
|
3853
|
-
NScrollbar: any;
|
3854
|
-
NThing: any;
|
3855
|
-
NInputGroup: any;
|
3856
|
-
NSelect: any;
|
3857
|
-
NInput: any;
|
3858
|
-
NCollapse: any;
|
3859
|
-
NCollapseItem: any;
|
3860
|
-
NEllipsis: any;
|
3861
|
-
NEmpty: any;
|
3862
|
-
NTooltip: any;
|
3863
|
-
NIcon: any;
|
3864
|
-
conditionTypeOptions: {
|
3865
|
-
value: import("../../shared/types").LowCodeTypes.VALUE_RELATION;
|
3866
|
-
label: string;
|
3867
|
-
}[];
|
3868
|
-
connectionTypeOptions: {
|
3869
|
-
value: string;
|
3870
|
-
label: string;
|
3871
|
-
}[];
|
3872
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "validateFailure")[], "update:modelValue" | "validateFailure", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
3873
|
-
modelValue: {
|
3874
|
-
type: ArrayConstructor;
|
3875
|
-
required: true;
|
3876
|
-
default: () => never[];
|
3877
|
-
};
|
3878
|
-
}>> & {
|
3879
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
3880
|
-
onValidateFailure?: ((...args: any[]) => any) | undefined;
|
3881
|
-
}, {
|
3882
|
-
modelValue: unknown[];
|
3883
|
-
}>;
|
3884
3787
|
FormConfigMaterialItem: import("vue").DefineComponent<{
|
3885
3788
|
formConfigItem: {
|
3886
3789
|
type: import("vue").PropType<import("./src/types").FormConfigItem>;
|
@@ -3913,7 +3816,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
3913
3816
|
FORM_CONFIG_GROUP: string;
|
3914
3817
|
NSelect: any;
|
3915
3818
|
NSpace: any;
|
3916
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("addItem" | "removeItem"
|
3819
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("addItem" | "removeItem")[], "addItem" | "removeItem", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
3917
3820
|
maxHeight: {
|
3918
3821
|
type: StringConstructor;
|
3919
3822
|
};
|
@@ -3929,7 +3832,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
3929
3832
|
extraMaterialList: {
|
3930
3833
|
type: import("vue").PropType<import("./src/types").FormConfigItem[] | (() => import("./src/types").FormConfigItem[] | Promise<import("./src/types").FormConfigItem[]>)>;
|
3931
3834
|
};
|
3932
|
-
showLowCodeReactions: BooleanConstructor;
|
3933
3835
|
formProps: {
|
3934
3836
|
type: import("vue").PropType<Partial<Partial<{
|
3935
3837
|
fieldList: import("..").FieldItem[];
|
@@ -4043,8 +3945,5 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
4043
3945
|
}>> & {
|
4044
3946
|
onAddItem?: ((...args: any[]) => any) | undefined;
|
4045
3947
|
onRemoveItem?: ((...args: any[]) => any) | undefined;
|
4046
|
-
|
4047
|
-
}, {
|
4048
|
-
showLowCodeReactions: boolean;
|
4049
|
-
}>>;
|
3948
|
+
}, {}>>;
|
4050
3949
|
export default FormConfig;
|
@@ -1 +1 @@
|
|
1
|
-
import{COMPONENT_NAMESPACE as o}from"../../shared/global/variable.js";import{safeComponentRegister as r}from"../../shared/utils/index.js";import
|
1
|
+
import{COMPONENT_NAMESPACE as o}from"../../shared/global/variable.js";import{safeComponentRegister as r}from"../../shared/utils/index.js";import s from"./src/FormConfig.vue.js";export{registFormConfigLocale,useFormConfigLocale}from"./src/hooks/useLocale.js";const e=s;e.install=function(s){r(s,e,o+"FormConfig")};export{e as default};
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { useVersion } from '../../../shared/hooks';
|
2
2
|
import { AnyFn, LowCodeTypes } from '../../../shared/types';
|
3
|
+
import { useFormConfigLocale } from '@cnhis-design-vue/components/form-config/src/hooks/useLocale';
|
3
4
|
import { PropType, Ref } from 'vue';
|
4
5
|
import { FormConfigItem, FormConfigTextFormatter, FormConfigVisitor } from '../../../components/form-config/src/types';
|
5
6
|
import { FormRenderExpose } from '../../../components/form-render';
|
@@ -19,7 +20,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
19
20
|
extraMaterialList: {
|
20
21
|
type: PropType<FormConfigItem[] | (() => FormConfigItem[] | Promise<FormConfigItem[]>)>;
|
21
22
|
};
|
22
|
-
showLowCodeReactions: BooleanConstructor;
|
23
23
|
formProps: {
|
24
24
|
type: PropType<Partial<Partial<{
|
25
25
|
fieldList: import("../../../components/form-render").FieldItem[];
|
@@ -147,7 +147,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
147
147
|
extraMaterialList: {
|
148
148
|
type: PropType<FormConfigItem[] | (() => FormConfigItem[] | Promise<FormConfigItem[]>)>;
|
149
149
|
};
|
150
|
-
showLowCodeReactions: BooleanConstructor;
|
151
150
|
formProps: {
|
152
151
|
type: PropType<Partial<Partial<{
|
153
152
|
fieldList: import("../../../components/form-render").FieldItem[];
|
@@ -261,9 +260,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
261
260
|
}>> & {
|
262
261
|
onAddItem?: ((...args: any[]) => any) | undefined;
|
263
262
|
onRemoveItem?: ((...args: any[]) => any) | undefined;
|
264
|
-
onReactionsValidateFailure?: ((...args: any[]) => any) | undefined;
|
265
263
|
}>>;
|
266
|
-
emit: (event: "addItem" | "removeItem"
|
264
|
+
emit: (event: "addItem" | "removeItem", ...args: any[]) => void;
|
267
265
|
uuid: string;
|
268
266
|
cssVars: import("vue").ComputedRef<import("../../../shared/types").AnyObject>;
|
269
267
|
fieldListRef: Ref<FormConfigItem[]>;
|
@@ -320,6 +318,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
320
318
|
extraOptions: import("vue").ComputedRef<FormConfigItem[]>;
|
321
319
|
onFocus: () => Promise<void>;
|
322
320
|
useVersion: typeof useVersion;
|
321
|
+
useFormConfigLocale: typeof useFormConfigLocale;
|
323
322
|
Draggable: import("vue").DefineComponent<{
|
324
323
|
list: {
|
325
324
|
type: ArrayConstructor;
|
@@ -407,6 +406,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
407
406
|
NButton: any;
|
408
407
|
NButtonGroup: any;
|
409
408
|
NPopconfirm: any;
|
409
|
+
useFormConfigLocale: typeof useFormConfigLocale;
|
410
410
|
CFormRender: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{}, {
|
411
411
|
formRenderRef: Ref<FormRenderExpose | undefined>;
|
412
412
|
key: Ref<number>;
|
@@ -1970,6 +1970,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1970
1970
|
layoutWidthEnum?: import("../../../components/form-config/src/types").FormConfigWidth | undefined;
|
1971
1971
|
type?: string | undefined;
|
1972
1972
|
name?: string | undefined;
|
1973
|
+
alias?: string | undefined;
|
1973
1974
|
show?: boolean | undefined;
|
1974
1975
|
defaultValue?: any;
|
1975
1976
|
defaultExpand?: boolean | undefined;
|
@@ -1986,6 +1987,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1986
1987
|
layoutWidthEnum: import("../../../components/form-config/src/types").FormConfigWidth;
|
1987
1988
|
type: string;
|
1988
1989
|
name: string;
|
1990
|
+
alias?: string | undefined;
|
1989
1991
|
show?: boolean | undefined;
|
1990
1992
|
defaultValue?: any;
|
1991
1993
|
defaultExpand?: boolean | undefined;
|
@@ -2445,8 +2447,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
2445
2447
|
__extra?: boolean | undefined;
|
2446
2448
|
}>;
|
2447
2449
|
generateFieldListByFormConfigItem: (formConfigItem: FormConfigItem, fieldItem?: import("../../../components/form-render").FieldItem | undefined) => import("../../../components/form-render").FieldItem[];
|
2448
|
-
showModal: Ref<boolean>;
|
2449
|
-
onPositiveClick: () => Promise<void>;
|
2450
2450
|
prevOldField: null;
|
2451
2451
|
onFormChange: ({ fieldKey, value }: import("../../../components/form-render").FormChangePayload) => void;
|
2452
2452
|
createLabelRender: (originOptions?: import("../../../shared/types").AnyObject[] | undefined) => (label: string) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
@@ -2672,6 +2672,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
2672
2672
|
}[]>;
|
2673
2673
|
onOptionModalCancel: () => void;
|
2674
2674
|
onOptionModalConfirm: () => void;
|
2675
|
+
useFormConfigLocale: typeof useFormConfigLocale;
|
2675
2676
|
NModal: any;
|
2676
2677
|
NSpace: any;
|
2677
2678
|
NInput: any;
|
@@ -3786,104 +3787,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
3786
3787
|
}>>>;
|
3787
3788
|
};
|
3788
3789
|
}>>, {}>;
|
3789
|
-
FormConfigEventSetting: import("vue").DefineComponent<{
|
3790
|
-
modelValue: {
|
3791
|
-
type: ArrayConstructor;
|
3792
|
-
required: true;
|
3793
|
-
default: () => never[];
|
3794
|
-
};
|
3795
|
-
}, {
|
3796
|
-
props: {
|
3797
|
-
modelValue: LowCodeTypes.reactionConfig[];
|
3798
|
-
};
|
3799
|
-
emit: (event: "update:modelValue" | "validateFailure", ...args: any[]) => void;
|
3800
|
-
cssVars: import("vue").ComputedRef<import("../../../shared/types").AnyObject>;
|
3801
|
-
valueRef: Ref<{
|
3802
|
-
conObj: {
|
3803
|
-
con: LowCodeTypes.VALUE_RELATION;
|
3804
|
-
field_key: string;
|
3805
|
-
value: unknown;
|
3806
|
-
}[];
|
3807
|
-
compareMap?: {
|
3808
|
-
NULL?: ((v1: any, v2: any) => boolean) | undefined;
|
3809
|
-
EQ?: ((v1: any, v2: any) => boolean) | undefined;
|
3810
|
-
BIG?: ((v1: any, v2: any) => boolean) | undefined;
|
3811
|
-
LESS?: ((v1: any, v2: any) => boolean) | undefined;
|
3812
|
-
BIGEQ?: ((v1: any, v2: any) => boolean) | undefined;
|
3813
|
-
LESSEQ?: ((v1: any, v2: any) => boolean) | undefined;
|
3814
|
-
CL?: ((v1: any, v2: any) => boolean) | undefined;
|
3815
|
-
NC?: ((v1: any, v2: any) => boolean) | undefined;
|
3816
|
-
NEQ?: ((v1: any, v2: any) => boolean) | undefined;
|
3817
|
-
NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
|
3818
|
-
} | undefined;
|
3819
|
-
isRestoreDefault?: boolean | undefined;
|
3820
|
-
sqlExpression?: string | undefined;
|
3821
|
-
showField?: string[] | undefined;
|
3822
|
-
hideField?: string[] | undefined;
|
3823
|
-
requiredField?: string[] | undefined;
|
3824
|
-
notRequiredField?: string[] | undefined;
|
3825
|
-
enabledField?: string[] | undefined;
|
3826
|
-
disabledField?: string[] | undefined;
|
3827
|
-
__oppositeBindField?: any | undefined;
|
3828
|
-
__oppositeTargetField?: any | undefined;
|
3829
|
-
}[]>;
|
3830
|
-
expandedName: Ref<string>;
|
3831
|
-
addConnection: () => void;
|
3832
|
-
removeConnection: (index: number) => void;
|
3833
|
-
getOppositeBtnText: (item: LowCodeTypes.reactionConfig) => string | undefined;
|
3834
|
-
unBindOpposite: (item: LowCodeTypes.reactionConfig) => void;
|
3835
|
-
addOppositeCondition: (item: LowCodeTypes.reactionConfig) => void;
|
3836
|
-
getOppositeSqlExpression: (expression?: string | undefined) => string | undefined;
|
3837
|
-
createOppositeCondition: (config: LowCodeTypes.reactionConfig) => LowCodeTypes.reactionConfig;
|
3838
|
-
isOppositeConfig: (c1: LowCodeTypes.reactionConfig, c2: LowCodeTypes.reactionConfig) => boolean;
|
3839
|
-
onUpdateExpandedNames: (value: string[]) => void;
|
3840
|
-
getBinderFieldDesc: (index: number) => string;
|
3841
|
-
addCondition: (config: LowCodeTypes.reactionConfig) => void;
|
3842
|
-
removeCondition: (config: LowCodeTypes.reactionConfig, index: number) => void;
|
3843
|
-
onUpdateConditionType: (condition: LowCodeTypes.reactionsConObj, type: LowCodeTypes.VALUE_RELATION) => void;
|
3844
|
-
showRef: Ref<boolean>;
|
3845
|
-
fieldListRef: Ref<FormConfigItem[]>;
|
3846
|
-
fieldOptions: import("vue").ComputedRef<FormConfigItem[]>;
|
3847
|
-
currentTypeList: string[];
|
3848
|
-
dialog: import("naive-ui").DialogApi;
|
3849
|
-
onNegativeClick: () => Promise<void>;
|
3850
|
-
onPositiveClick: () => Promise<void>;
|
3851
|
-
configValidate: () => Promise<void>;
|
3852
|
-
HelpCircleSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
3853
|
-
NButton: any;
|
3854
|
-
NModal: any;
|
3855
|
-
NSpace: any;
|
3856
|
-
NScrollbar: any;
|
3857
|
-
NThing: any;
|
3858
|
-
NInputGroup: any;
|
3859
|
-
NSelect: any;
|
3860
|
-
NInput: any;
|
3861
|
-
NCollapse: any;
|
3862
|
-
NCollapseItem: any;
|
3863
|
-
NEllipsis: any;
|
3864
|
-
NEmpty: any;
|
3865
|
-
NTooltip: any;
|
3866
|
-
NIcon: any;
|
3867
|
-
conditionTypeOptions: {
|
3868
|
-
value: LowCodeTypes.VALUE_RELATION;
|
3869
|
-
label: string;
|
3870
|
-
}[];
|
3871
|
-
connectionTypeOptions: {
|
3872
|
-
value: string;
|
3873
|
-
label: string;
|
3874
|
-
}[];
|
3875
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "validateFailure")[], "update:modelValue" | "validateFailure", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
3876
|
-
modelValue: {
|
3877
|
-
type: ArrayConstructor;
|
3878
|
-
required: true;
|
3879
|
-
default: () => never[];
|
3880
|
-
};
|
3881
|
-
}>> & {
|
3882
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
3883
|
-
onValidateFailure?: ((...args: any[]) => any) | undefined;
|
3884
|
-
}, {
|
3885
|
-
modelValue: unknown[];
|
3886
|
-
}>;
|
3887
3790
|
FormConfigMaterialItem: import("vue").DefineComponent<{
|
3888
3791
|
formConfigItem: {
|
3889
3792
|
type: PropType<FormConfigItem>;
|
@@ -3916,7 +3819,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
3916
3819
|
FORM_CONFIG_GROUP: string;
|
3917
3820
|
NSelect: any;
|
3918
3821
|
NSpace: any;
|
3919
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("addItem" | "removeItem"
|
3822
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("addItem" | "removeItem")[], "addItem" | "removeItem", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
3920
3823
|
maxHeight: {
|
3921
3824
|
type: StringConstructor;
|
3922
3825
|
};
|
@@ -3932,7 +3835,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
3932
3835
|
extraMaterialList: {
|
3933
3836
|
type: PropType<FormConfigItem[] | (() => FormConfigItem[] | Promise<FormConfigItem[]>)>;
|
3934
3837
|
};
|
3935
|
-
showLowCodeReactions: BooleanConstructor;
|
3936
3838
|
formProps: {
|
3937
3839
|
type: PropType<Partial<Partial<{
|
3938
3840
|
fieldList: import("../../../components/form-render").FieldItem[];
|
@@ -4046,8 +3948,5 @@ declare const _default: import("vue").DefineComponent<{
|
|
4046
3948
|
}>> & {
|
4047
3949
|
onAddItem?: ((...args: any[]) => any) | undefined;
|
4048
3950
|
onRemoveItem?: ((...args: any[]) => any) | undefined;
|
4049
|
-
|
4050
|
-
}, {
|
4051
|
-
showLowCodeReactions: boolean;
|
4052
|
-
}>;
|
3951
|
+
}, {}>;
|
4053
3952
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,provide as o,ref as t,computed as r,toRaw as a,openBlock as i,createElementBlock as s,mergeProps as l,unref as n,createElementVNode as m,createVNode as u,isRef as
|
1
|
+
import{defineComponent as e,provide as o,ref as t,computed as r,toRaw as a,openBlock as i,createElementBlock as s,mergeProps as l,unref as n,createElementVNode as m,toDisplayString as f,createVNode as u,isRef as c,withCtx as d,createBlock as p,createCommentVNode as v,createTextVNode as g}from"vue";import{useTheme as h}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isArray as _,cloneDeep as y,isFunction as x}from"lodash-es";import"@vue/shared";import{uuidGenerator as j,traverse as k}from"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NSelect as L,NSpace as C}from"naive-ui";import{useVersion as b}from"../../../shared/hooks/useVersion.js";import"../../../shared/hooks/useScrollLoading.js";import{useFormConfigLocale as F}from"./hooks/useLocale.js";import M from"../../../shared/components/VueDraggable/src/vuedraggable.js";import R from"./components/FormConfigCreator.vue.js";import V from"./components/FormConfigDragDisplay.vue.js";import w from"./components/FormConfigEdit.vue.js";import D from"./components/FormConfigMaterialItem.js";import{useDataNormalize as H}from"./hooks/useDataNormalize.js";import{InjectionFormConfigProps as A,InjectionFormConfigEmit as E,InjectionFieldList as S,InjectionMaterialList as I,InjectionLowCodeReactions as O,InjectionActiveFieldItem as P,FORM_CONFIG_GROUP as U}from"./constants/index.js";import{fieldItemNormalize as T}from"./utils/index.js";import{useSortableConfig as z}from"./hooks/useSortalbeConfig.js";import"./hooks/useConfigurationField.js";const N=["id"],W={class:"form-config__material"},q={class:"form-config__materialHeader"},B={class:"form-config__displayWrapper"},G={class:"form-config__displayHeader"},J={class:"form-config__config"},K={class:"form-config__configHeader"},Q={class:"form-config__configContent"};var X=e({__name:"FormConfig",props:{maxHeight:{type:String},fieldVisitor:{type:Object},textFormatter:{type:Function},formRenderRef:{type:Object},extraMaterialList:{type:[Array,Function]},formProps:{type:Object},beforeMove:{type:Function}},emits:["addItem","removeItem"],setup(e,{expose:X,emit:Y}){const Z=e;o(A,Z),o(E,Y);const $=j(),ee=h(),oe=t([]);o(S,oe);const te=t([]);o(I,te);const re=t([]);function ae(e){oe.value.some((o=>o.key===e.key))||oe.value.push(e)}o(O,re);const ie=(e,o)=>x(Z.textFormatter)?Z.textFormatter(e,o):o,se=t();o(P,se);const le=t(),{transform:ne,inverseTransform:me}=H(Z),fe=r({get:()=>null,set(e){if(!e)return;const o=ce.value.find((o=>o.key===e));o&&(o.__extra=!0,T(o),te.value.push(o),Y("addItem",o))}}),ue=t([]),ce=r((()=>{if(!_(ue.value))return[];const e=[];return k([...te.value,...oe.value],(o=>e.push(o.key))),ue.value.filter((o=>!e.find((e=>e===o.key))))}));async function de(){Z.extraMaterialList&&!ue.value.length&&(ue.value=x(Z.extraMaterialList)?await Z.extraMaterialList():Z.extraMaterialList)}return X({loadData({fieldList:e,lowCodeReactions:o=[]}){let t=[],r=[];e.forEach((e=>{return!1===(o=y(a(e))).show?r.push(o):t.push(o),void T(o);var o})),oe.value=ne(t),te.value=r,re.value=o,se.value=void 0},validate(){var e;return null==(e=le.value)?void 0:e.validate()},getData:(e=!1)=>({fieldList:me(y(a(oe.value)),e,{show:!0}),materialList:me(y(a(te.value)),e,{show:!1}),lowCodeReactions:y(a(re.value))}),clearExtraList(){ue.value=[]}}),(o,t)=>(i(),s("section",l({class:"form-config",style:{"--max-height":e.maxHeight,...n(ee)},id:n($)},n(b)()),[m("section",W,[m("header",q,f(n(F)("materialArea")),1),u(n(M),l(z({fieldList:oe,materialList:te,hooks:{beforeMove:Z.beforeMove}}),{class:"form-config__materialContent",modelValue:n(te),"onUpdate:modelValue":t[0]||(t[0]=e=>c(te)?te.value=e:null)}),{item:d((({element:e})=>[u(n(D),{"form-config-item":e,"text-formatter":ie,"material-List":n(te)},null,8,["form-config-item","material-List"])])),_:1},16,["modelValue"]),e.extraMaterialList?(i(),p(n(L),{key:0,class:"form-config__materialExtraList",filterable:"",value:n(fe),"onUpdate:value":t[1]||(t[1]=e=>c(fe)?fe.value=e:null),placeholder:n(F)("materialArea.createMaterialPlaceholder"),options:n(ce),"label-field":"name","value-field":"key",onFocus:de},null,8,["value","placeholder","options"])):v("v-if",!0)]),m("section",B,[m("header",G,[g(f(n(F)("layoutArea"))+" ",1),u(n(C),null,{default:d((()=>[v("\t\t\t\t\t<form-config-event-setting"),v('\t\t\t\t\t\tv-if="showLowCodeReactions"'),v('\t\t\t\t\t\tv-model="lowCodeReactionsRef"'),v("\t\t\t\t\t\t@validate-failure=\"e => emit('reactionsValidateFailure', e)\""),v("\t\t\t\t\t/>"),u(R,{onSubmit:ae})])),_:1})]),u(V,{class:"form-config__displayContent",group:n(U),"text-formatter":ie,modelValue:n(oe),"onUpdate:modelValue":t[2]||(t[2]=e=>c(oe)?oe.value=e:null)},null,8,["group","modelValue"])]),m("section",J,[m("header",K,f(n(F)("configArea")),1),m("section",Q,[u(w,{ref_key:"formConfigEditRef",ref:le,uuid:n($),"bind-form-render-ref":e.formRenderRef,"form-props":e.formProps},null,8,["uuid","bind-form-render-ref","form-props"])])])],16,N))}});export{X as default};
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { useFormConfigLocale } from '../../../../components/form-config/src/hooks/useLocale';
|
1
2
|
import { FieldItem, FormRenderExpose } from '../../../../components/form-render';
|
2
3
|
import { AnyObject, FormConfigItem } from '../../..';
|
3
4
|
declare const _default: import("vue").DefineComponent<{}, {
|
@@ -14,6 +15,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
14
15
|
NButton: any;
|
15
16
|
NButtonGroup: any;
|
16
17
|
NPopconfirm: any;
|
18
|
+
useFormConfigLocale: typeof useFormConfigLocale;
|
17
19
|
CFormRender: import("../../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{}, {
|
18
20
|
formRenderRef: import("vue").Ref<FormRenderExpose | undefined>;
|
19
21
|
key: import("vue").Ref<number>;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as
|
1
|
+
import{defineComponent as e,ref as t,openBlock as i,createBlock as a,unref as o,withCtx as l,createVNode as n,createTextVNode as r,toDisplayString as s}from"vue";import{pick as u}from"lodash-es";import{NButtonGroup as m,NPopconfirm as f,NButton as d}from"naive-ui";import{EditAbleField as c}from"../constants/index.js";import{useConfigurationField as p}from"../hooks/useConfigurationField.js";import{useFormConfigLocale as v}from"../hooks/useLocale.js";import"../../../index.js";import g from"../../../form-render/index.js";var L=e({__name:"FormConfigCreator",emits:{submit:e=>e},setup(e,{emit:L}){const _=p().generateFieldListByKeys([c.NAME,c.LAYOUT_WIDTH_ENUM,c.NOTES,c.DEFAULT_EXPAND,c.FOLD]);Object.assign(_[0],{html_type:"INPUT",is_null:"0"});const h=t(),x=t(),y={defaultExpand:!0,fold:!0,layoutWidthEnum:"ALL_LINE"};async function E(e,t,i){if(!i)return;await i.validate();const a=i.getFormValues();L("submit",{layoutWidthEnum:"ALL_LINE",...a,type:e,key:a.name,...t,__new:!0})}return(e,t)=>(i(),a(o(m),{size:"small"},{default:l((()=>[n(o(f),{width:"300px","show-icon":!1,"show-arrow":!1,to:"body","positive-text":o(v)("configArea.positiveBtn"),"negative-text":o(v)("configArea.negativeBtn"),onPositiveClick:t[0]||(t[0]=e=>E("NEWLINE",{},x.value))},{trigger:l((()=>[n(o(d),null,{default:l((()=>[r(s(o(v)("layoutArea.createLinebreak")),1)])),_:1})])),default:l((()=>[n(o(g),{column:12,ref_key:"lineBreakFormRef",ref:x,"initial-data":o(u)(y,["layoutWidthEnum"]),size:"small","label-width":"auto","label-placement":"left",fieldList:o(_).slice(0,1)},null,8,["initial-data","fieldList"])])),_:1},8,["positive-text","negative-text"]),n(o(f),{width:"300px","show-icon":!1,"show-arrow":!1,to:"body","positive-text":o(v)("configArea.positiveBtn"),"negative-text":o(v)("configArea.negativeBtn"),onPositiveClick:t[1]||(t[1]=e=>E("LINE_BAR",{children:[]},h.value))},{trigger:l((()=>[n(o(d),null,{default:l((()=>[r(s(o(v)("layoutArea.createLinebar")),1)])),_:1})])),default:l((()=>[n(o(g),{column:12,ref_key:"linebarFormRef",ref:h,"initial-data":y,size:"small","label-width":"auto","label-placement":"left",fieldList:o(_)},null,8,["fieldList"])])),_:1},8,["positive-text","negative-text"])])),_:1}))}});export{L as default};
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { AnyObject } from '../../../../shared/types';
|
2
2
|
import { PropType } from 'vue';
|
3
|
+
import { useFormConfigLocale } from '../../../../components/form-config/src/hooks/useLocale';
|
3
4
|
import { FieldItem, FieldVisitor, FormChangePayload, FormRenderExpose } from '../../../../components/form-render';
|
4
5
|
import { FormConfigItem } from '../../../../components/index';
|
5
6
|
declare const _default: import("vue").DefineComponent<{
|
@@ -457,6 +458,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
457
458
|
layoutWidthEnum?: import("../../../../components/index").FormConfigWidth | undefined;
|
458
459
|
type?: string | undefined;
|
459
460
|
name?: string | undefined;
|
461
|
+
alias?: string | undefined;
|
460
462
|
show?: boolean | undefined;
|
461
463
|
defaultValue?: any;
|
462
464
|
defaultExpand?: boolean | undefined;
|
@@ -473,6 +475,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
473
475
|
layoutWidthEnum: import("../../../../components/index").FormConfigWidth;
|
474
476
|
type: string;
|
475
477
|
name: string;
|
478
|
+
alias?: string | undefined;
|
476
479
|
show?: boolean | undefined;
|
477
480
|
defaultValue?: any;
|
478
481
|
defaultExpand?: boolean | undefined;
|
@@ -932,8 +935,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
932
935
|
__extra?: boolean | undefined;
|
933
936
|
}>;
|
934
937
|
generateFieldListByFormConfigItem: (formConfigItem: FormConfigItem, fieldItem?: FieldItem | undefined) => FieldItem[];
|
935
|
-
showModal: import("vue").Ref<boolean>;
|
936
|
-
onPositiveClick: () => Promise<void>;
|
937
938
|
prevOldField: null;
|
938
939
|
onFormChange: ({ fieldKey, value }: FormChangePayload) => void;
|
939
940
|
createLabelRender: (originOptions?: AnyObject[]) => (label: string) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
@@ -1159,6 +1160,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1159
1160
|
}[]>;
|
1160
1161
|
onOptionModalCancel: () => void;
|
1161
1162
|
onOptionModalConfirm: () => void;
|
1163
|
+
useFormConfigLocale: typeof useFormConfigLocale;
|
1162
1164
|
NModal: any;
|
1163
1165
|
NSpace: any;
|
1164
1166
|
NInput: any;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,computed as
|
1
|
+
import{defineComponent as e,computed as t,ref as l,inject as i,watch as o,toRaw as a,openBlock as n,createElementBlock as r,Fragment as s,createVNode as u,unref as d,mergeProps as v,createCommentVNode as p,withCtx as f,createElementVNode as c,toDisplayString as m,renderList as g,h as x}from"vue";import{cloneDeep as y,isEmpty as h,isArray as b}from"lodash-es";import{InjectionActiveFieldItem as k,EditAbleField as A}from"../constants/index.js";import"../../../../shared/components/VueDraggable/src/vuedraggable.js";import{findFieldItemByKey as j}from"../utils/index.js";import"@vicons/ionicons5";import{NModal as w,NInput as F,NSpace as L,NButton as C}from"naive-ui";import"../../../../shared/utils/index.js";import{useConfigurationField as O}from"../hooks/useConfigurationField.js";import{useFormConfigLocale as _}from"../hooks/useLocale.js";import"../../../index.js";import R from"../../../form-render/index.js";const P={style:{"padding-top":"8px"}},T={style:{width:"100%","text-align":"left"}};var U=e({__name:"FormConfigEdit",props:{uuid:{type:String,required:!0},bindFormRenderRef:{type:Object},formProps:{type:Object}},setup(e,{expose:U}){const E=e;t((()=>`#${E.uuid} .form-config__config`));const B=l(),N=i(k),D=l([]),I=l({}),{generateFieldListByFormConfigItem:S}=O();function V({fieldKey:e,value:t}){N.value&&(N.value[e]=t)}o(N,(async(e,t)=>{var l,i;if(!e)return D.value=[];I.value={editable:!0,show:!0,...y(a(e))};const o=null==(l=E.bindFormRenderRef)?void 0:l.getFieldList();D.value=S(e,j(o,e.key)),null==(i=B.value)||i.reload()}),{immediate:!0});const q={"*"({field:e}){if(e.val_key!==A.DEFAULT_VALUE)return;const t=e.option;var l,i;e.option=(l=e.option,b(l)?l.map((e=>{var t;const l=null==(t=N.value.optionAliasList)?void 0:t.find((t=>t.value===e.value));return l?{...e,text:l.text}:e})):l),e.decoratorProps={labelRender:(i=t,e=>{const t=x("span",{},e);return h(i)?t:x("div",{style:{display:"flex",alignItems:"center",gap:"8px"}},[t,x(C,{text:!0,type:"primary",onClick(){var e;z.value=!0,K.value=y(i),h(null==(e=N.value)?void 0:e.optionAliasList)||K.value.forEach((e=>{const t=N.value.optionAliasList.find((t=>t.value===e.value));t&&(e.alias=t.text)}))}},{default:()=>_("configArea.modifyOptionTitle")})])})}}},z=l(!1),K=l([]);function M(){z.value=!1,K.value=[]}function $(){var e;z.value=!1,N.value.optionAliasList=K.value.reduce(((e,t)=>(t.alias&&e.push({value:t.value,text:t.alias}),e)),[]),K.value=[],I.value={editable:!0,show:!0,...y(a(N.value))},null==(e=B.value)||e.reload()}return U({validate(){var e;return null==(e=B.value)?void 0:e.validate()}}),(t,l)=>(n(),r(s,null,[u(d(R),v({size:"small"},e.formProps,{column:12,ref_key:"formRenderRef",ref:B,onFormChange:V,"field-visitor":q,"field-list":D.value,"initial-data":I.value}),null,16,["field-list","initial-data"]),p("\t<n-modal"),p('\t\tv-model:show="showModal"'),p('\t\tpreset="dialog"'),p('\t\tto="body"'),p('\t\t:to="wrapperSelector"'),p('\t\t:close-on-esc="false"'),p('\t\t:mask-closable="false"'),p('\t\t:closable="false"'),p('\t\ttitle="存在填写错误的字段"'),p('\t\tpositive-text="继续编辑"'),p('\t\t@positive-click="onPositiveClick"'),p("\t/>"),u(d(w),{show:z.value,"onUpdate:show":l[0]||(l[0]=e=>z.value=e),preset:"dialog",to:"body","close-on-esc":!1,"mask-closable":!1,title:d(_)("configArea.modifyOptionTitle"),"positive-text":d(_)("configArea.positiveBtn"),"negative-text":d(_)("configArea.negativeBtn"),onNegativeClick:M,onPositiveClick:$},{default:f((()=>[c("section",P,[c("table",T,[c("thead",null,[c("tr",null,[c("th",null,m(d(_)("configArea.modifyOptionName")),1),c("th",null,m(d(_)("configArea.modifyOptionOriginText")),1),c("th",null,m(d(_)("configArea.modifyOptionNewText")),1)])]),c("tbody",null,[(n(!0),r(s,null,g(K.value,(e=>(n(),r("tr",{key:e.value},[c("td",null,m(e.value),1),c("td",null,m(e.text),1),c("td",null,[u(d(F),{value:e.alias,"onUpdate:value":t=>e.alias=t},null,8,["value","onUpdate:value"])])])))),128))])]),u(d(L),{vertical:""})])])),_:1},8,["show","to","title","positive-text","negative-text"])],64))}});export{U as default};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { PropType } from 'vue';
|
2
2
|
import { FormConfigItem, FormConfigTextFormatter } from '../../../../../components/form-config';
|
3
|
-
import { bindHover } from '../../../../../components/form-config/src/utils';
|
3
|
+
import { bindHover, getFormConfigTitle } from '../../../../../components/form-config/src/utils';
|
4
4
|
declare const _default: import("vue").DefineComponent<{
|
5
5
|
formConfigItem: {
|
6
6
|
type: PropType<FormConfigItem>;
|
@@ -162,6 +162,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
162
162
|
};
|
163
163
|
}>>, {}>;
|
164
164
|
bindHover: typeof bindHover;
|
165
|
+
getFormConfigTitle: typeof getFormConfigTitle;
|
165
166
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
166
167
|
formConfigItem: {
|
167
168
|
type: PropType<FormConfigItem>;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,inject as o,computed as r,openBlock as t,createElementBlock as m,normalizeClass as a,unref as i,createElementVNode as f,mergeProps as n,withModifiers as d,createTextVNode as l,toDisplayString as s,createVNode as c}from"vue";import g from"../FormConfigDragDisplay.vue.js";import p from"./CloseButton.vue.js";import{InjectionActiveFieldItem as u}from"../../constants/index.js";import{bindHover as C}from"../../utils/index.js";const
|
1
|
+
import{defineComponent as e,inject as o,computed as r,openBlock as t,createElementBlock as m,normalizeClass as a,unref as i,createElementVNode as f,mergeProps as n,withModifiers as d,createTextVNode as l,toDisplayString as s,createVNode as c}from"vue";import g from"../FormConfigDragDisplay.vue.js";import p from"./CloseButton.vue.js";import{InjectionActiveFieldItem as u}from"../../constants/index.js";import{bindHover as C,getFormConfigTitle as I}from"../../utils/index.js";const x=["data-type","data-key","data-required","data-extra"],y=["onClick"];var _=e({__name:"ComplexNode",props:{formConfigItem:{type:Object,required:!0},textFormatter:{type:Function,required:!0}},setup(e){const _=e,v=o(u);function k(){v.value=_.formConfigItem}const q=r((()=>[{"is-active--text":v.value===_.formConfigItem},"form-config__renderer--complexHeader"])),j=r((()=>["form-config__renderer--complex form-config__renderer",{"is-active--shadow":v.value===_.formConfigItem}]));return(o,r)=>(t(),m("section",{class:a(i(j)),"data-type":e.formConfigItem.type,"data-key":e.formConfigItem.key,"data-required":!!e.formConfigItem.required,"data-extra":!!e.formConfigItem.__extra},[f("header",n(i(C)(e.formConfigItem),{class:i(q),onClick:d(k,["stop"])}),[l(s(i(I)(_.formConfigItem))+" ",1),c(p,{"form-config-item":e.formConfigItem},null,8,["form-config-item"])],16,y),c(g,n(o.$props,{modelValue:e.formConfigItem.children,"onUpdate:modelValue":r[0]||(r[0]=o=>e.formConfigItem.children=o),class:"form-config__renderer--complex--grid","data-type":e.formConfigItem.type,"data-key":e.formConfigItem.key,"data-required":!!e.formConfigItem.required,"data-extra":!!e.formConfigItem.__extra}),null,16,["modelValue","data-type","data-key","data-required","data-extra"])],10,x))}});export{_ as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,inject as
|
1
|
+
import{defineComponent as e,inject as o,computed as t,openBlock as r,createElementBlock as i,mergeProps as f,unref as m,withModifiers as n,createVNode as a,normalizeClass as l,withCtx as d,createTextVNode as u,toDisplayString as s,renderSlot as C,createBlock as g,createCommentVNode as c}from"vue";import{NEllipsis as p}from"naive-ui";import I from"./CloseButton.vue.js";import{InjectionActiveFieldItem as _,getWidgetText as v}from"../../constants/index.js";import{getFormConfigTitle as y,bindHover as x}from"../../utils/index.js";const k=["onClick","data-type","data-key","data-required","data-extra"];var q=e({__name:"DefaultNode",props:{formConfigItem:{type:Object,required:!0},textFormatter:{type:Function,required:!0},showCloseButton:{type:Boolean,default:!0},allowClick:{type:Boolean,default:!0}},setup(e){const q=e,B=o(_);function b(){q.allowClick&&(B.value=q.formConfigItem)}const j=t((()=>["form-config__renderer--default",{"is-required":q.formConfigItem.required}])),w=t((()=>{var e;return[{"is-active":B.value===q.formConfigItem,"is-disabled":$.value,"is-extra":null==(e=q.formConfigItem)?void 0:e.__extra},"form-config__renderer","form-config__renderer--defaultWrapper"]})),$=t((()=>!1===q.formConfigItem.editable)),h=t((()=>{const e=v(q.formConfigItem.type);return q.textFormatter(q.formConfigItem,`${y(q.formConfigItem)}${e?`(${e})`:""}`)})),F=t((()=>q.showCloseButton&&(!q.formConfigItem.required&&!q.formConfigItem.__isCombinationChild||q.formConfigItem.__extra)));return(o,t)=>(r(),i("div",f(m(x)(e.formConfigItem),{onClick:n(b,["stop"]),class:m(w),"data-type":e.formConfigItem.type,"data-key":e.formConfigItem.key,"data-required":!!e.formConfigItem.required,"data-extra":!!e.formConfigItem.__extra}),[a(m(p),{class:l(m(j))},{default:d((()=>[u(s(m(h)),1)])),_:1},8,["class"]),C(o.$slots,"default"),m(F)?(r(),g(I,{key:0,"form-config-item":e.formConfigItem},null,8,["form-config-item"])):c("v-if",!0)],16,k))}});export{q as default};
|