cnhis-design-vue 3.1.57-beta.0 → 3.1.57-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -87
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
- package/es/components/classification/src/index.vue.d.ts +3 -3
- package/es/components/expand-field/index.d.ts +84 -3
- package/es/components/expand-field/src/components/FormItemPerson.vue.d.ts +84 -3
- package/es/components/expand-field/src/components/PersonModal.vue.d.ts +84 -3
- package/es/components/expand-field/src/components/form.vue.d.ts +84 -3
- package/es/components/expand-field/src/components/form.vue2.js +1 -1
- package/es/components/expand-field/src/index.vue.d.ts +84 -3
- package/es/components/form-config/index.d.ts +24 -12
- package/es/components/form-config/src/FormConfig.vue.d.ts +24 -12
- package/es/components/form-config/src/FormConfig.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigDragDisplay.vue.d.ts +5 -2
- package/es/components/form-config/src/components/FormConfigDragDisplay.vue2.js +1 -1
- package/es/components/form-config/src/components/renderer/ComplexNode.vue.d.ts +5 -2
- 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 -1
- package/es/components/form-config/src/constants/index.js +1 -1
- package/es/components/form-config/src/hooks/useSortalbeConfig.d.ts +16 -12
- package/es/components/form-config/src/hooks/useSortalbeConfig.js +1 -1
- package/es/components/form-config/src/types/index.d.ts +12 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-person/index.d.ts +84 -3
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
- package/es/components/select-person/src/SelectPerson.vue.d.ts +73 -3
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
- package/es/components/select-person/src/types/enums.d.ts +9 -0
- package/es/components/select-person/src/types/enums.js +1 -1
- package/es/components/select-person/style/index.css +1 -1
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +3 -0
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/fabricjs/index.d.ts +6823 -0
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
|
@@ -115,6 +115,9 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
115
115
|
forceClearable: boolean;
|
|
116
116
|
}>>>;
|
|
117
117
|
};
|
|
118
|
+
beforeMove: {
|
|
119
|
+
type: import("vue").PropType<((payload: import("./src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
|
|
120
|
+
};
|
|
118
121
|
}, {
|
|
119
122
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
120
123
|
maxHeight: {
|
|
@@ -230,6 +233,9 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
230
233
|
forceClearable: boolean;
|
|
231
234
|
}>>>;
|
|
232
235
|
};
|
|
236
|
+
beforeMove: {
|
|
237
|
+
type: import("vue").PropType<((payload: import("./src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
|
|
238
|
+
};
|
|
233
239
|
}>> & {
|
|
234
240
|
onAddItem?: ((...args: any[]) => any) | undefined;
|
|
235
241
|
onRemoveItem?: ((...args: any[]) => any) | undefined;
|
|
@@ -238,16 +244,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
238
244
|
emit: (event: "addItem" | "removeItem" | "reactionsValidateFailure", ...args: any[]) => void;
|
|
239
245
|
uuid: string;
|
|
240
246
|
cssVars: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
241
|
-
getCommonConfig: (formConfig?: import("./src/types").FormConfigItem | undefined) => {
|
|
242
|
-
move: ({ to, from, dragged }: import("sortablejs").MoveEvent) => false | undefined;
|
|
243
|
-
onChoose: ({ target, item }: import("sortablejs").SortableEvent) => void;
|
|
244
|
-
onUnchoose: ({ from, to, target, item }: import("sortablejs").SortableEvent) => void;
|
|
245
|
-
tag: string;
|
|
246
|
-
forceFallback: boolean;
|
|
247
|
-
animation: string;
|
|
248
|
-
'item-key': string;
|
|
249
|
-
group: string;
|
|
250
|
-
};
|
|
251
247
|
fieldListRef: import("vue").Ref<{
|
|
252
248
|
key: string;
|
|
253
249
|
layoutWidthEnum: import("./src/types").FormConfigWidth;
|
|
@@ -3777,6 +3773,16 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3777
3773
|
__oppositeBindField?: any | undefined;
|
|
3778
3774
|
__oppositeTargetField?: any | undefined;
|
|
3779
3775
|
}[]>;
|
|
3776
|
+
getSortOption: () => {
|
|
3777
|
+
move: ({ to, from, dragged }: import("sortablejs").MoveEvent) => false | undefined;
|
|
3778
|
+
onChoose: ({ target, item }: import("sortablejs").SortableEvent) => void;
|
|
3779
|
+
onUnchoose: ({ from, to, target, item }: import("sortablejs").SortableEvent) => void;
|
|
3780
|
+
tag: string;
|
|
3781
|
+
forceFallback: boolean;
|
|
3782
|
+
animation: string;
|
|
3783
|
+
'item-key': string;
|
|
3784
|
+
group: string;
|
|
3785
|
+
};
|
|
3780
3786
|
addItem: (formConfigItem: import("./src/types").FormConfigItem) => void;
|
|
3781
3787
|
parsedTextFormatter: import("./src/types").FormConfigTextFormatter;
|
|
3782
3788
|
currentEditField: import("vue").Ref<import("./src/types").FormConfigItem | undefined>;
|
|
@@ -8242,11 +8248,13 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
8242
8248
|
required: true;
|
|
8243
8249
|
};
|
|
8244
8250
|
}, {
|
|
8251
|
+
globProps: import("../../shared/types").AnyObject | undefined;
|
|
8245
8252
|
getItemColumnStyle: (formConfigItem?: import("./src/types").FormConfigItem | undefined) => {
|
|
8246
8253
|
'--item-column': number;
|
|
8247
8254
|
};
|
|
8248
|
-
|
|
8249
|
-
|
|
8255
|
+
fieldList: import("vue").Ref<import("./src/types").FormConfigItem[]> | undefined;
|
|
8256
|
+
materialList: import("vue").Ref<import("./src/types").FormConfigItem[]> | undefined;
|
|
8257
|
+
getSortOption: (formConfigItem?: import("./src/types").FormConfigItem | undefined) => {
|
|
8250
8258
|
move: ({ to, from, dragged }: import("sortablejs").MoveEvent) => false | undefined;
|
|
8251
8259
|
onChoose: ({ target, item }: import("sortablejs").SortableEvent) => void;
|
|
8252
8260
|
onUnchoose: ({ from, to, target, item }: import("sortablejs").SortableEvent) => void;
|
|
@@ -8256,6 +8264,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
8256
8264
|
'item-key': string;
|
|
8257
8265
|
group: string;
|
|
8258
8266
|
};
|
|
8267
|
+
getRenderer: (formConfigItem: import("./src/types").FormConfigItem) => import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>;
|
|
8259
8268
|
Draggable: import("vue").DefineComponent<{
|
|
8260
8269
|
list: {
|
|
8261
8270
|
type: ArrayConstructor;
|
|
@@ -15024,6 +15033,9 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
15024
15033
|
forceClearable: boolean;
|
|
15025
15034
|
}>>>;
|
|
15026
15035
|
};
|
|
15036
|
+
beforeMove: {
|
|
15037
|
+
type: import("vue").PropType<((payload: import("./src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
|
|
15038
|
+
};
|
|
15027
15039
|
}>> & {
|
|
15028
15040
|
onAddItem?: ((...args: any[]) => any) | undefined;
|
|
15029
15041
|
onRemoveItem?: ((...args: any[]) => any) | undefined;
|
|
@@ -118,6 +118,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
118
118
|
forceClearable: boolean;
|
|
119
119
|
}>>>;
|
|
120
120
|
};
|
|
121
|
+
beforeMove: {
|
|
122
|
+
type: PropType<((payload: import("../../../components/form-config/src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
|
|
123
|
+
};
|
|
121
124
|
}, {
|
|
122
125
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
123
126
|
maxHeight: {
|
|
@@ -233,6 +236,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
233
236
|
forceClearable: boolean;
|
|
234
237
|
}>>>;
|
|
235
238
|
};
|
|
239
|
+
beforeMove: {
|
|
240
|
+
type: PropType<((payload: import("../../../components/form-config/src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
|
|
241
|
+
};
|
|
236
242
|
}>> & {
|
|
237
243
|
onAddItem?: ((...args: any[]) => any) | undefined;
|
|
238
244
|
onRemoveItem?: ((...args: any[]) => any) | undefined;
|
|
@@ -241,16 +247,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
241
247
|
emit: (event: "addItem" | "removeItem" | "reactionsValidateFailure", ...args: any[]) => void;
|
|
242
248
|
uuid: string;
|
|
243
249
|
cssVars: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
244
|
-
getCommonConfig: (formConfig?: FormConfigItem | undefined) => {
|
|
245
|
-
move: ({ to, from, dragged }: import("sortablejs").MoveEvent) => false | undefined;
|
|
246
|
-
onChoose: ({ target, item }: import("sortablejs").SortableEvent) => void;
|
|
247
|
-
onUnchoose: ({ from, to, target, item }: import("sortablejs").SortableEvent) => void;
|
|
248
|
-
tag: string;
|
|
249
|
-
forceFallback: boolean;
|
|
250
|
-
animation: string;
|
|
251
|
-
'item-key': string;
|
|
252
|
-
group: string;
|
|
253
|
-
};
|
|
254
250
|
fieldListRef: import("vue").Ref<{
|
|
255
251
|
key: string;
|
|
256
252
|
layoutWidthEnum: import("../../../components/form-config/src/types").FormConfigWidth;
|
|
@@ -3780,6 +3776,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3780
3776
|
__oppositeBindField?: any | undefined;
|
|
3781
3777
|
__oppositeTargetField?: any | undefined;
|
|
3782
3778
|
}[]>;
|
|
3779
|
+
getSortOption: () => {
|
|
3780
|
+
move: ({ to, from, dragged }: import("sortablejs").MoveEvent) => false | undefined;
|
|
3781
|
+
onChoose: ({ target, item }: import("sortablejs").SortableEvent) => void;
|
|
3782
|
+
onUnchoose: ({ from, to, target, item }: import("sortablejs").SortableEvent) => void;
|
|
3783
|
+
tag: string;
|
|
3784
|
+
forceFallback: boolean;
|
|
3785
|
+
animation: string;
|
|
3786
|
+
'item-key': string;
|
|
3787
|
+
group: string;
|
|
3788
|
+
};
|
|
3783
3789
|
addItem: (formConfigItem: FormConfigItem) => void;
|
|
3784
3790
|
parsedTextFormatter: FormConfigTextFormatter;
|
|
3785
3791
|
currentEditField: import("vue").Ref<FormConfigItem | undefined>;
|
|
@@ -8245,11 +8251,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8245
8251
|
required: true;
|
|
8246
8252
|
};
|
|
8247
8253
|
}, {
|
|
8254
|
+
globProps: import("../../../shared/types").AnyObject | undefined;
|
|
8248
8255
|
getItemColumnStyle: (formConfigItem?: FormConfigItem | undefined) => {
|
|
8249
8256
|
'--item-column': number;
|
|
8250
8257
|
};
|
|
8251
|
-
|
|
8252
|
-
|
|
8258
|
+
fieldList: import("vue").Ref<FormConfigItem[]> | undefined;
|
|
8259
|
+
materialList: import("vue").Ref<FormConfigItem[]> | undefined;
|
|
8260
|
+
getSortOption: (formConfigItem?: FormConfigItem | undefined) => {
|
|
8253
8261
|
move: ({ to, from, dragged }: import("sortablejs").MoveEvent) => false | undefined;
|
|
8254
8262
|
onChoose: ({ target, item }: import("sortablejs").SortableEvent) => void;
|
|
8255
8263
|
onUnchoose: ({ from, to, target, item }: import("sortablejs").SortableEvent) => void;
|
|
@@ -8259,6 +8267,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8259
8267
|
'item-key': string;
|
|
8260
8268
|
group: string;
|
|
8261
8269
|
};
|
|
8270
|
+
getRenderer: (formConfigItem: FormConfigItem) => import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>;
|
|
8262
8271
|
Draggable: import("vue").DefineComponent<{
|
|
8263
8272
|
list: {
|
|
8264
8273
|
type: ArrayConstructor;
|
|
@@ -15027,6 +15036,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
15027
15036
|
forceClearable: boolean;
|
|
15028
15037
|
}>>>;
|
|
15029
15038
|
};
|
|
15039
|
+
beforeMove: {
|
|
15040
|
+
type: PropType<((payload: import("../../../components/form-config/src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
|
|
15041
|
+
};
|
|
15030
15042
|
}>> & {
|
|
15031
15043
|
onAddItem?: ((...args: any[]) => any) | undefined;
|
|
15032
15044
|
onRemoveItem?: ((...args: any[]) => any) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,provide as o,ref as t,computed 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,createVNode as u,withCtx as f,createBlock as d,isRef as c,createCommentVNode as p,createTextVNode as v}from"vue";import{useTheme as h}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isArray as g,cloneDeep as _,isFunction as y}from"lodash-es";import"@vue/shared";import{uuidGenerator as x,traverse as C}from"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NSelect as j,NSpace as L}from"naive-ui";import{useVersion as k}from"../../../shared/hooks/useVersion.js";import F from"../../../shared/components/VueDraggable/src/vuedraggable.js";import b from"./components/FormConfigCreator.vue.js";import V from"./components/FormConfigDragDisplay.vue.js";import M from"./components/FormConfigEdit.vue.js";import w from"./components/FormConfigEventSetting.vue.js";import R from"./components/FormConfigMaterialItem.js";import{useDataNormalize as E}from"./hooks/useDataNormalize.js";import{InjectionFormConfigProps as I,InjectionFormConfigEmit as D,InjectionFieldList as H,InjectionMaterialList as O,InjectionLowCodeReactions as S,InjectionActiveFieldItem as N,FORM_CONFIG_GROUP as U}from"./constants/index.js";import"./utils/index.js";import{useSortableConfig as A}from"./hooks/useSortalbeConfig.js";import"./hooks/useConfigurationField.js";const B=["id"],T={class:"form-config__material"},P=m("header",{class:"form-config__materialHeader"},"物料区",-1),z={class:"form-config__displayWrapper"},W={class:"form-config__displayHeader"},q={class:"form-config__config"},G=m("header",{class:"form-config__configHeader"},"配置区",-1),J={class:"form-config__configContent"};var K=e({__name:"FormConfig",props:{maxHeight:{type:String},fieldVisitor:{type:Object},textFormatter:{type:Function},formRenderRef:{type:Object},extraMaterialList:{type:[Array,Function]},showLowCodeReactions:Boolean,formProps:{type:Object},beforeMove:{type:Function}},emits:["addItem","removeItem","reactionsValidateFailure"],setup(e,{expose:K,emit:Q}){const X=e;o(I,X),o(D,Q);const Y=x(),Z=h(),$=t([]);o(H,$);const ee=t([]);o(O,ee);const oe=t([]);function te(e){$.value.some((o=>o.key===e.key))||$.value.push(e)}o(S,oe);const re=(e,o)=>y(X.textFormatter)?X.textFormatter(e,o):o,ae=t();o(N,ae);const ie=t(),{transform:se,inverseTransform:le}=E(X),ne=r({get:()=>null,set(e){if(!e)return;const o=ue.value.find((o=>o.key===e));o&&(o.__extra=!0,ee.value.push(o),Q("addItem",o))}}),me=t([]),ue=r((()=>{if(!g(me.value))return[];const e=[];return C([...ee.value,...$.value],(o=>e.push(o.key))),me.value.filter((o=>!e.find((e=>e===o.key))))}));async function fe(){X.extraMaterialList&&!me.value.length&&(me.value=y(X.extraMaterialList)?await X.extraMaterialList():X.extraMaterialList)}return K({loadData({fieldList:e,lowCodeReactions:o=[]}){let t=[],r=[];e.forEach((e=>function(e){"LINE_BAR"===e.type&&(e.children=[]);!1===e.show?r.push(e):t.push(e),"COMBINATION"===e.type&&g(e.children)&&e.children.length&&e.children.forEach((e=>{e.__isCombinationChild=!0}))}(_(a(e))))),$.value=se(t),ee.value=r,oe.value=o,ae.value=void 0},validate(){var e;return null==(e=ie.value)?void 0:e.validate()},getData:(e=!1)=>({fieldList:le(_(a($.value)),e,{show:!0}),materialList:le(_(a(ee.value)),e,{show:!1}),lowCodeReactions:_(a(oe.value))}),clearExtraList(){me.value=[]}}),(o,t)=>(i(),s("section",l({class:"form-config",style:{"--max-height":e.maxHeight,...n(Z)},id:n(Y)},n(k)()),[m("section",T,[P,u(n(F),l(A({fieldList:$,materialList:ee,hooks:{beforeMove:X.beforeMove}}),{class:"form-config__materialContent",modelValue:ee.value,"onUpdate:modelValue":t[0]||(t[0]=e=>ee.value=e)}),{item:f((({element:e})=>[u(n(R),{"form-config-item":e,"text-formatter":re,"material-List":ee.value},null,8,["form-config-item","material-List"])])),_:1},16,["modelValue"]),e.extraMaterialList?(i(),d(n(j),{key:0,class:"form-config__materialExtraList",filterable:"",value:n(ne),"onUpdate:value":t[1]||(t[1]=e=>c(ne)?ne.value=e:null),placeholder:"请选择额外物料",options:n(ue),"label-field":"name","value-field":"key",onFocus:fe},null,8,["value","options"])):p("v-if",!0)]),m("section",z,[m("header",W,[v(" 布局区 "),u(n(L),null,{default:f((()=>[e.showLowCodeReactions?(i(),d(w,{key:0,modelValue:oe.value,"onUpdate:modelValue":t[2]||(t[2]=e=>oe.value=e),onValidateFailure:t[3]||(t[3]=e=>Q("reactionsValidateFailure",e))},null,8,["modelValue"])):p("v-if",!0),u(b,{onSubmit:te})])),_:1})]),u(V,{class:"form-config__displayContent",group:n(U),"text-formatter":re,modelValue:$.value,"onUpdate:modelValue":t[4]||(t[4]=e=>$.value=e)},null,8,["group","modelValue"])]),m("section",q,[G,m("section",J,[u(M,{ref_key:"formConfigEditRef",ref:ie,uuid:n(Y),"bind-form-render-ref":e.formRenderRef,"form-props":e.formProps},null,8,["uuid","bind-form-render-ref","form-props"])])])],16,B))}});export{K as default};
|
|
@@ -9,11 +9,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
9
9
|
required: true;
|
|
10
10
|
};
|
|
11
11
|
}, {
|
|
12
|
+
globProps: import("../../..").AnyObject | undefined;
|
|
12
13
|
getItemColumnStyle: (formConfigItem?: FormConfigItem) => {
|
|
13
14
|
'--item-column': number;
|
|
14
15
|
};
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
fieldList: import("vue").Ref<FormConfigItem[]> | undefined;
|
|
17
|
+
materialList: import("vue").Ref<FormConfigItem[]> | undefined;
|
|
18
|
+
getSortOption: (formConfigItem?: FormConfigItem) => {
|
|
17
19
|
move: ({ to, from, dragged }: import("sortablejs").MoveEvent) => false | undefined;
|
|
18
20
|
onChoose: ({ target, item }: import("sortablejs").SortableEvent) => void;
|
|
19
21
|
onUnchoose: ({ from, to, target, item }: import("sortablejs").SortableEvent) => void;
|
|
@@ -23,6 +25,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
23
25
|
'item-key': string;
|
|
24
26
|
group: string;
|
|
25
27
|
};
|
|
28
|
+
getRenderer: (formConfigItem: FormConfigItem) => import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>;
|
|
26
29
|
Draggable: import("vue").DefineComponent<{
|
|
27
30
|
list: {
|
|
28
31
|
type: ArrayConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,
|
|
1
|
+
import{defineComponent as e,inject as t,openBlock as o,createBlock as r,unref as m,mergeProps as i,withCtx as n,resolveDynamicComponent as s,normalizeStyle as f}from"vue";import a from"../../../../shared/components/VueDraggable/src/vuedraggable.js";import{InjectionFormConfigProps as l,InjectionFieldList as u,InjectionMaterialList as p}from"../constants/index.js";import{usePresetRenderer as g}from"../hooks/usePresetRenderer.js";import{useSortableConfig as c}from"../hooks/useSortalbeConfig.js";import"../hooks/useConfigurationField.js";import{layoutWidthEnum2Column as d}from"../utils/index.js";var y=e({__name:"FormConfigDragDisplay",props:{formConfigItem:{type:Object},textFormatter:{type:Function,required:!0}},setup(e){const y=t(l);function v(e){return{"--item-column":e?d(e.layoutWidthEnum):24}}const C=t(u),j=t(p);const{getRenderer:x}=g();return(t,l)=>{return o(),r(m(a),i((u=e.formConfigItem,c({group:"COMBINATION"===(null==u?void 0:u.type)?u.key:"",fieldList:C,materialList:j,hooks:{beforeMove:null==y?void 0:y.beforeMove}})),{style:v(e.formConfigItem)}),{item:n((({element:t})=>[(o(),r(s(m(x)(t)),{class:"form-config__displayContentItem",style:f(v(t)),"form-config-item":t,textFormatter:e.textFormatter},null,8,["style","form-config-item","textFormatter"]))])),_:1},16,["style"]);var u}}});export{y as default};
|
|
@@ -35,11 +35,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
35
35
|
required: true;
|
|
36
36
|
};
|
|
37
37
|
}, {
|
|
38
|
+
globProps: import("../../../..").AnyObject | undefined;
|
|
38
39
|
getItemColumnStyle: (formConfigItem?: FormConfigItem | undefined) => {
|
|
39
40
|
'--item-column': number;
|
|
40
41
|
};
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
fieldList: import("vue").Ref<FormConfigItem[]> | undefined;
|
|
43
|
+
materialList: import("vue").Ref<FormConfigItem[]> | undefined;
|
|
44
|
+
getSortOption: (formConfigItem?: FormConfigItem | undefined) => {
|
|
43
45
|
move: ({ to, from, dragged }: import("sortablejs").MoveEvent) => false | undefined;
|
|
44
46
|
onChoose: ({ target, item }: import("sortablejs").SortableEvent) => void;
|
|
45
47
|
onUnchoose: ({ from, to, target, item }: import("sortablejs").SortableEvent) => void;
|
|
@@ -49,6 +51,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
49
51
|
'item-key': string;
|
|
50
52
|
group: string;
|
|
51
53
|
};
|
|
54
|
+
getRenderer: (formConfigItem: FormConfigItem) => import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>;
|
|
52
55
|
Draggable: import("vue").DefineComponent<{
|
|
53
56
|
list: {
|
|
54
57
|
type: ArrayConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,inject as o,computed as r,openBlock as
|
|
1
|
+
import{defineComponent as e,inject as o,computed as r,openBlock as t,createElementBlock as m,createElementVNode as a,mergeProps as f,unref as i,withModifiers as n,createTextVNode as d,toDisplayString as l,createVNode as p}from"vue";import c from"../FormConfigDragDisplay.vue.js";import g from"./CloseButton.vue.js";import{InjectionActiveFieldItem as s}from"../../constants/index.js";import{bindHover as u}from"../../utils/index.js";const C=["data-type","data-key","data-required","data-extra"],I=["onClick"];var y=e({__name:"ComplexNode",props:{formConfigItem:{type:Object,required:!0},textFormatter:{type:Function,required:!0}},setup(e){const y=e,x=o(s);function _(){x.value=y.formConfigItem}const k=r((()=>[{"is-active":x.value===y.formConfigItem},"form-config__renderer--complexHeader"]));return(o,r)=>(t(),m("section",{class:"form-config__renderer--complex form-config__renderer","data-type":e.formConfigItem.type,"data-key":e.formConfigItem.key,"data-required":!!e.formConfigItem.required,"data-extra":!!e.formConfigItem.__extra},[a("header",f(i(u)(e.formConfigItem),{class:i(k),onClick:n(_,["stop"])}),[d(l(y.formConfigItem.name)+" ",1),p(g,{"form-config-item":e.formConfigItem},null,8,["form-config-item"])],16,I),p(c,f(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"])],8,C))}});export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,inject as
|
|
1
|
+
import{defineComponent as e,inject as t,computed as o,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 _,WidgetTextMap as v}from"../../constants/index.js";import{bindHover as y}from"../../utils/index.js";const x=["onClick","data-type","data-key","data-required","data-extra"];var k=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 k=e,q=t(_);function B(){k.allowClick&&(q.value=k.formConfigItem)}const b=o((()=>["form-config__renderer--default",{"is-required":k.formConfigItem.required}])),j=o((()=>{var e;return[{"is-active":q.value===k.formConfigItem,"is-disabled":w.value,"is-extra":null==(e=k.formConfigItem)?void 0:e.__extra},"form-config__renderer","form-config__renderer--defaultWrapper"]})),w=o((()=>!1===k.formConfigItem.editable)),$=o((()=>{const e=v.get(k.formConfigItem.type);return k.textFormatter(k.formConfigItem,`${k.formConfigItem.name}${e?`(${e})`:""}`)})),h=o((()=>k.showCloseButton&&(!k.formConfigItem.required&&!k.formConfigItem.__isCombinationChild||k.formConfigItem.__extra)));return(t,o)=>(r(),i("div",f(m(y)(e.formConfigItem),{onClick:n(B,["stop"]),class:m(j),"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(b))},{default:d((()=>[u(s(m($)),1)])),_:1},8,["class"]),C(t.$slots,"default"),m(h)?(r(),g(I,{key:0,"form-config-item":e.formConfigItem},null,8,["form-config-item"])):c("v-if",!0)],16,x))}});export{k as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LowCodeTypes, UndefinedAble } from '../../../../shared/types';
|
|
1
|
+
import { AnyObject, LowCodeTypes, UndefinedAble } from '../../../../shared/types';
|
|
2
2
|
import { InjectionKey, Ref } from 'vue';
|
|
3
3
|
import { FormConfigItem } from '../../../../components/form-config';
|
|
4
4
|
export declare const WidgetTextMap: Map<string, string>;
|
|
@@ -100,3 +100,4 @@ export declare const InjectionMaterialList: InjectionKey<Ref<FormConfigItem[]>>;
|
|
|
100
100
|
export declare const InjectionLowCodeReactions: InjectionKey<Ref<LowCodeTypes.reactionsConfig[]>>;
|
|
101
101
|
export declare const InjectionActiveFieldItem: InjectionKey<Ref<UndefinedAble<FormConfigItem>>>;
|
|
102
102
|
export declare const InjectionFormConfigEmit: InjectionKey<(event: 'addItem' | 'removeItem', ...args: unknown[]) => void>;
|
|
103
|
+
export declare const InjectionFormConfigProps: InjectionKey<AnyObject>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{range as e}from"lodash-es";const l=new Map([["LINE_BAR","分线栏"],["NEWLINE","分行符"]]);var a=(e=>(e.NAME="name",e.NOTES="notes",e.DEFAULT_VALUE="defaultValue",e.LAYOUT_WIDTH_ENUM="layoutWidthEnum",e.DESC="desc",e.DEFAULT_EXPAND="defaultExpand",e.FOLD="fold",e.REQUIRED="required",e.EDITABLE="editable",e.SHOW="show",e.ROWS="initialHigh",e))(a||{});function i(){return{option:[{text:"整行",value:"ALL_LINE"},{text:"半行",value:"HALF_LINE"},{text:"5/6",value:"FIVE_SIX"},{text:"2/3",value:"TWO_THREE"},{text:"1/3",value:"ONE_THREE"},{text:"3/4",value:"THREE_FOUR"},{text:"1/4",value:"ONE_FOUR"},{text:"1/6",value:"ONE_SIX"},{text:"1/8",value:"ONE_EIGHT"}]}}function t(){return{option:e(1,11).map((e=>({text:`${e}行`,value:e})))}}function u(){return{open:{describe:"默认展开",value:!0},close:{describe:"默认收起",value:!1}}}function d(){return{open:{describe:"可折叠",value:!0},close:{describe:"不可折叠",value:!1}}}function n(){return{open:{describe:"可编辑",value:!0},close:{describe:"不可编辑",value:!1}}}function o(){return{open:{describe:"必填",value:!0},close:{describe:"不必填",value:!1}}}function E(){return{open:{describe:"显示",value:!0},close:{describe:"隐藏",value:!1}}}const r={EQ:"NEQ",NEQ:"EQ",CL:"NC",NC:"CL",NULL:"NOT_NULL",NOT_NULL:"NULL",BIG:"LESSEQ",BIGEQ:"LESS",LESS:"BIGEQ",LESSEQ:"BIG"},b=[{value:"EQ",label:"等于"},{value:"NEQ",label:"不等于"},{value:"CL",label:"包含"},{value:"NC",label:"不包含"},{value:"NULL",label:"为空"},{value:"NOT_NULL",label:"不为空"},{value:"BIG",label:"大于"},{value:"BIGEQ",label:"大于等于"},{value:"LESS",label:"小于"},{value:"LESSEQ",label:"小于等于"}],v={showField:"hideField",hideField:"showField",requiredField:"notRequiredField",notRequiredField:"requiredField",enabledField:"disabledField",disabledField:"enabledField"},L=[{value:"showField",label:"显示字段"},{value:"hideField",label:"隐藏字段"},{value:"requiredField",label:"必填字段"},{value:"notRequiredField",label:"非必填字段"},{value:"enabledField",label:"启用字段"},{value:"disabledField",label:"禁用字段"}],c="__display",s=Symbol("InjectionFieldList"),F=Symbol("InjectionMaterialList"),N=Symbol("InjectionLowCodeReactions"),I=Symbol("InjectionActiveFieldItem"),S=Symbol("InjectionFormConfigEmit");export{a as EditAbleField,c as FORM_CONFIG_GROUP,I as InjectionActiveFieldItem,s as InjectionFieldList,S as InjectionFormConfigEmit,N as InjectionLowCodeReactions,F as InjectionMaterialList,l as WidgetTextMap,r as conditionOppositeMap,b as conditionTypeOptions,v as connectionTypeOppositeMap,L as connectionTypeOptions,n as isEditOptionConfig,d as isNotFoldOptionConfig,o as isNullOptionConfig,u as isShowOptionConfig,E as isVisibleOptionConfig,t as rowsOptionConfig,i as widgetWidthOptionConfig};
|
|
1
|
+
import{range as e}from"lodash-es";const l=new Map([["LINE_BAR","分线栏"],["NEWLINE","分行符"]]);var a=(e=>(e.NAME="name",e.NOTES="notes",e.DEFAULT_VALUE="defaultValue",e.LAYOUT_WIDTH_ENUM="layoutWidthEnum",e.DESC="desc",e.DEFAULT_EXPAND="defaultExpand",e.FOLD="fold",e.REQUIRED="required",e.EDITABLE="editable",e.SHOW="show",e.ROWS="initialHigh",e))(a||{});function i(){return{option:[{text:"整行",value:"ALL_LINE"},{text:"半行",value:"HALF_LINE"},{text:"5/6",value:"FIVE_SIX"},{text:"2/3",value:"TWO_THREE"},{text:"1/3",value:"ONE_THREE"},{text:"3/4",value:"THREE_FOUR"},{text:"1/4",value:"ONE_FOUR"},{text:"1/6",value:"ONE_SIX"},{text:"1/8",value:"ONE_EIGHT"}]}}function t(){return{option:e(1,11).map((e=>({text:`${e}行`,value:e})))}}function u(){return{open:{describe:"默认展开",value:!0},close:{describe:"默认收起",value:!1}}}function d(){return{open:{describe:"可折叠",value:!0},close:{describe:"不可折叠",value:!1}}}function n(){return{open:{describe:"可编辑",value:!0},close:{describe:"不可编辑",value:!1}}}function o(){return{open:{describe:"必填",value:!0},close:{describe:"不必填",value:!1}}}function E(){return{open:{describe:"显示",value:!0},close:{describe:"隐藏",value:!1}}}const r={EQ:"NEQ",NEQ:"EQ",CL:"NC",NC:"CL",NULL:"NOT_NULL",NOT_NULL:"NULL",BIG:"LESSEQ",BIGEQ:"LESS",LESS:"BIGEQ",LESSEQ:"BIG"},b=[{value:"EQ",label:"等于"},{value:"NEQ",label:"不等于"},{value:"CL",label:"包含"},{value:"NC",label:"不包含"},{value:"NULL",label:"为空"},{value:"NOT_NULL",label:"不为空"},{value:"BIG",label:"大于"},{value:"BIGEQ",label:"大于等于"},{value:"LESS",label:"小于"},{value:"LESSEQ",label:"小于等于"}],v={showField:"hideField",hideField:"showField",requiredField:"notRequiredField",notRequiredField:"requiredField",enabledField:"disabledField",disabledField:"enabledField"},L=[{value:"showField",label:"显示字段"},{value:"hideField",label:"隐藏字段"},{value:"requiredField",label:"必填字段"},{value:"notRequiredField",label:"非必填字段"},{value:"enabledField",label:"启用字段"},{value:"disabledField",label:"禁用字段"}],c="__display",s=Symbol("InjectionFieldList"),F=Symbol("InjectionMaterialList"),N=Symbol("InjectionLowCodeReactions"),I=Symbol("InjectionActiveFieldItem"),S=Symbol("InjectionFormConfigEmit"),_=Symbol("InjectionFormConfigProps");export{a as EditAbleField,c as FORM_CONFIG_GROUP,I as InjectionActiveFieldItem,s as InjectionFieldList,S as InjectionFormConfigEmit,_ as InjectionFormConfigProps,N as InjectionLowCodeReactions,F as InjectionMaterialList,l as WidgetTextMap,r as conditionOppositeMap,b as conditionTypeOptions,v as connectionTypeOppositeMap,L as connectionTypeOptions,n as isEditOptionConfig,d as isNotFoldOptionConfig,o as isNullOptionConfig,u as isShowOptionConfig,E as isVisibleOptionConfig,t as rowsOptionConfig,i as widgetWidthOptionConfig};
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
+
import { MaybeRef } from '@vueuse/core';
|
|
1
2
|
import Sortable from 'sortablejs';
|
|
2
|
-
import { FormConfigItem } from '../../../../components/form-config';
|
|
3
|
-
export declare function useSortableConfig(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
import { FormConfigHooks, FormConfigItem } from '../../../../components/form-config';
|
|
4
|
+
export declare function useSortableConfig({ group, hooks, fieldList, materialList }?: {
|
|
5
|
+
group?: string;
|
|
6
|
+
hooks?: FormConfigHooks;
|
|
7
|
+
fieldList?: MaybeRef<FormConfigItem[]>;
|
|
8
|
+
materialList?: MaybeRef<FormConfigItem[]>;
|
|
9
|
+
}): {
|
|
10
|
+
move: ({ to, from, dragged }: Sortable.MoveEvent) => false | undefined;
|
|
11
|
+
onChoose: ({ target, item }: Sortable.SortableEvent) => void;
|
|
12
|
+
onUnchoose: ({ from, to, target, item }: Sortable.SortableEvent) => void;
|
|
13
|
+
tag: string;
|
|
14
|
+
forceFallback: boolean;
|
|
15
|
+
animation: string;
|
|
16
|
+
'item-key': string;
|
|
17
|
+
group: string;
|
|
14
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{findAncestor as o}from"../../../../shared/utils/index.js";import{
|
|
1
|
+
import{findAncestor as e,traverse as o}from"../../../../shared/utils/index.js";import{isFunction as t}from"lodash-es";import{unref as s}from"vue";import{FORM_CONFIG_GROUP as i}from"../constants/index.js";function a({group:a,hooks:r={},fieldList:n,materialList:c}={}){let l,m=null;return{move:function({to:i,from:a,dragged:m}){const{type:f,required:d,extra:u,key:g}=m.dataset||{};if("LINE_BAR"===f&&e(i,(e=>"LINE_BAR"===e.dataset.type)))return!1;const y=e(i,(e=>e.classList.contains("form-config__materialContent"))),h=e(a,(e=>e.classList.contains("form-config__materialContent")));if("true"===d&&"true"!==u&&y)return!1;if(t(r.beforeMove)){const e=[...s(n||[]),...s(c||[])];let t,l,m;o(e,((e,o)=>{t||e.key!==g||(t=e),l||e.key!==a.dataset.key||(l=e),m||e.key!==i.dataset.key||(m=e),t&&l&&m&&o()}));if(!1===r.beforeMove({fromType:h?"material":"layout",toType:y?"material":"layout",dragField:t,fromField:l,toField:m,from:a,to:i}))return!1}null==l||l.classList.remove("is-choosing-area"),l=i,i!==a&&a.classList.remove("is-choosing-area"),i.classList.add("is-choosing-area")},onChoose:function({target:e,item:o}){m=setTimeout((()=>{e.classList.add("is-choosing-area"),o.classList.add("is-choosing")}),200)},onUnchoose:function({from:e,to:o,target:t,item:s}){clearTimeout(m),[e,o,t].forEach((e=>{e.classList.remove("is-choosing-area")})),s.classList.remove("is-choosing")},tag:"section",forceFallback:!1,animation:"150","item-key":"key",group:a||i}}export{a as useSortableConfig};
|
|
@@ -9,6 +9,18 @@ export declare type FormConfigRenderer = {
|
|
|
9
9
|
renderer: Component | FunctionalComponent;
|
|
10
10
|
};
|
|
11
11
|
export declare type FormConfigType = 'NEWLINE' | 'LINE_BAR' | 'OTHER' | string;
|
|
12
|
+
export declare type FormConfigBeforeMovePayload = {
|
|
13
|
+
fromType: 'material' | 'layout';
|
|
14
|
+
toType: 'material' | 'layout';
|
|
15
|
+
dragField?: FormConfigItem;
|
|
16
|
+
fromField?: FormConfigItem;
|
|
17
|
+
toField?: FormConfigItem;
|
|
18
|
+
from: HTMLElement;
|
|
19
|
+
to: HTMLElement;
|
|
20
|
+
};
|
|
21
|
+
export declare type FormConfigHooks = {
|
|
22
|
+
beforeMove?: (payload: FormConfigBeforeMovePayload) => void | boolean;
|
|
23
|
+
};
|
|
12
24
|
export declare type FormConfigWidth = 'ALL_LINE' | 'HALF_LINE' | 'FIVE_SIX' | 'TWO_THREE' | 'ONE_THREE' | 'THREE_FOUR' | 'ONE_FOUR' | 'ONE_SIX' | 'ONE_EIGHT';
|
|
13
25
|
export declare type FormConfigItem = {
|
|
14
26
|
key: string;
|
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e){return{bindAutoFocusConfig:function(t,n,o,{before:
|
|
1
|
+
function e(e){return{bindAutoFocusConfig:function(t,n,o,{before:r,after:c,focusType:u="function"}={}){e.fieldHooks.field.tap(t,(e=>{var t;return(null==(t=e.editRender)?void 0:t.name)===n?((e=r?r(e):e).editRender&&!Reflect.has(e.editRender,"autofocus")&&Reflect.set(e.editRender,"autofocus","class"===u?o:"function"===u?function(e){const t=({cell:t}={})=>{const n=t&&t.querySelector(e);return n&&n.click(),n};return t.toString=()=>e,t}(o):void 0),c?c(e):e):e}))}}}export{e as useAutoFocus};
|