cnhis-design-vue 3.1.45-beta.3 → 3.1.45-beta.5
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/field-set/index.d.ts +157 -38
- package/es/components/field-set/src/FieldSet.vue.d.ts +160 -23
- package/es/components/field-set/src/FieldSet.vue2.js +1 -1
- package/es/components/field-set/src/components/Row.vue.d.ts +132 -0
- package/es/components/field-set/src/components/Row.vue.js +1 -0
- package/es/components/field-set/src/components/Row.vue2.js +1 -0
- package/es/components/field-set/src/types/index.d.ts +1 -0
- package/es/components/field-set/src/utils/index.d.ts +7 -0
- package/es/components/field-set/src/utils/index.js +1 -0
- package/es/components/field-set/style/index.css +1 -1
- package/es/components/form-config/index.d.ts +3478 -19
- package/es/components/form-config/src/FormConfig.vue.d.ts +3478 -19
- package/es/components/form-config/src/FormConfig.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +3 -3
- package/es/components/form-config/src/components/FormConfigDragDisplay.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +5 -3
- package/es/components/form-config/src/components/FormConfigMaterialItem.d.ts +11 -1
- package/es/components/form-config/src/components/FormConfigMaterialItem.js +1 -1
- package/es/components/form-config/src/components/renderer/DefaultNode.vue.d.ts +2 -0
- package/es/components/form-config/src/components/renderer/DefaultNode.vue2.js +1 -1
- package/es/components/form-config/src/constants/index.d.ts +1 -0
- package/es/components/form-config/src/constants/index.js +1 -1
- package/es/components/form-config/src/hooks/useSortalbeConfig.js +1 -1
- package/es/components/form-config/src/types/index.d.ts +2 -0
- package/es/components/form-config/style/index.css +1 -1
- package/es/components/form-render/index.d.ts +3 -3
- package/es/components/form-render/src/FormRender.vue.d.ts +3 -3
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +3 -3
- package/es/components/form-render/src/hooks/useNuiThemeOverrides.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/index.d.ts +8 -8
- package/es/components/info-header/src/InfoHeader.vue.d.ts +8 -8
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +3 -3
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +3 -3
- package/es/components/keyboard/index.d.ts +1 -1
- package/es/components/keyboard/src/Keyboard.vue.d.ts +1 -1
- package/es/components/recommend-search/index.d.ts +2 -2
- package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +2 -2
- package/es/components/recommend-search/src/components/BaseSearch.d.ts +1 -1
- package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +1 -1
- package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +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/src/SearchMultiple.vue.d.ts +6 -0
- package/es/components/shortcut-setter/index.d.ts +3 -3
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +3 -3
- 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/package.json.js +1 -1
- package/package.json +2 -2
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/fabricjs/index.d.ts +0 -6823
- package/es/shared/utils/tapable/index.d.ts +0 -139
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,
|
|
1
|
+
import{defineComponent as e,provide as o,ref as t,computed as a,toRaw as r,openBlock as i,createElementBlock as l,normalizeStyle as n,unref as s,createElementVNode as m,createVNode as f,mergeProps as u,withCtx as c,createBlock as d,isRef 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{uuidGenerator as C}from"../../../shared/utils/index.js";import j from"../../../shared/components/VueDraggable/src/vuedraggable.js";import k from"./components/FormConfigCreator.vue.js";import L from"./components/FormConfigDragDisplay.vue.js";import F from"./components/FormConfigEdit.vue.js";import b from"./components/FormConfigMaterialItem.js";import{useDataNormalize as M}from"./hooks/useDataNormalize.js";import{InjectionFormConfigEmit as V,InjectionFieldList as E,InjectionMaterialList as I,InjectionActiveFieldItem as D,FORM_CONFIG_GROUP as R}from"./constants/index.js";import"@vicons/ionicons5";import{NSelect as H}from"naive-ui";import"./utils/index.js";import{useSortableConfig as N}from"./hooks/useSortalbeConfig.js";import"./hooks/useConfigurationField.js";const O=["id"],A={class:"form-config__material"},S=m("header",{class:"form-config__materialHeader"},"物料区",-1),T={class:"form-config__displayWrapper"},U={class:"form-config__displayHeader"},w={class:"form-config__config"},B=m("header",{class:"form-config__configHeader"},"配置区",-1),z={class:"form-config__configContent"};var W=e({__name:"FormConfig",props:{maxHeight:{type:String},fieldVisitor:{type:Object},textFormatter:{type:Function},formRenderRef:{type:Object},extraMaterialList:{type:[Array,Function]}},emits:["addItem","removeItem"],setup(e,{expose:W,emit:q}){const G=e;o(V,q);const J=C(),K=h(),{getCommonConfig:P}=N(),Q=t([]);o(E,Q);const X=t([]);function Y(e){Q.value.some((o=>o.key===e.key))||Q.value.push(e)}o(I,X);const Z=(e,o)=>x(G.textFormatter)?G.textFormatter(e,o):o,$=t();o(D,$);const ee=t(),{transform:oe,inverseTransform:te}=M(G),ae=a({get:()=>null,set(e){if(!e)return;const o=ie.value.find((o=>o.key===e));o&&(o.__extra=!0,X.value.push(o),q("addItem",o))}}),re=t([]),ie=a((()=>_(re.value)?re.value.filter((e=>!X.value.find((o=>o.key===e.key))&&!Q.value.find((o=>o.key===e.key)))):[]));async function le(){G.extraMaterialList&&!re.value.length&&(re.value=x(G.extraMaterialList)?await G.extraMaterialList():G.extraMaterialList)}return W({loadData({fieldList:e}){let o=[],t=[];e.forEach((e=>function(e){"LINE_BAR"===e.type&&(e.children=[]);!1===e.show?t.push(e):o.push(e),"COMBINATION"===e.type&&_(e.children)&&e.children.length&&e.children.forEach((e=>{e.__isCombinationChild=!0}))}(y(r(e))))),Q.value=oe(o),X.value=t,$.value=void 0},validate(){var e;return null==(e=ee.value)?void 0:e.validate()},getData:()=>({fieldList:te(y(r(Q.value))),materialList:te(y(r(X.value)))}),clearExtraList(){re.value=[]}}),(o,t)=>(i(),l("section",{class:"form-config",style:n({"--max-height":e.maxHeight,...s(K)}),id:s(J)},[m("section",A,[S,f(s(j),u(s(P)(),{class:"form-config__materialContent",modelValue:X.value,"onUpdate:modelValue":t[0]||(t[0]=e=>X.value=e)}),{item:c((({element:e})=>[f(s(b),{"form-config-item":e,"text-formatter":Z,"material-List":X.value},null,8,["form-config-item","material-List"])])),_:1},16,["modelValue"]),e.extraMaterialList?(i(),d(s(H),{key:0,class:"form-config__materialExtraList",filterable:"",value:s(ae),"onUpdate:value":t[1]||(t[1]=e=>p(ae)?ae.value=e:null),placeholder:"请选择额外物料",options:s(ie),"label-field":"name","value-field":"key",onFocus:le},null,8,["value","options"])):v("v-if",!0)]),m("section",T,[m("header",U,[g(" 布局区 "),f(k,{onSubmit:Y})]),f(L,{class:"form-config__displayContent",group:s(R),"text-formatter":Z,modelValue:Q.value,"onUpdate:modelValue":t[2]||(t[2]=e=>Q.value=e)},null,8,["group","modelValue"])]),m("section",w,[B,m("section",z,[f(F,{ref_key:"formConfigEditRef",ref:ee,uuid:s(J),"form-render-ref":e.formRenderRef},null,8,["uuid","form-render-ref"])])])],12,O))}});export{W as default};
|
|
@@ -289,7 +289,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
289
289
|
onScroll?: ((...args: any[]) => any) | undefined;
|
|
290
290
|
onAnnotationChange?: ((...args: any[]) => any) | undefined;
|
|
291
291
|
}>>;
|
|
292
|
-
emit: (event: "
|
|
292
|
+
emit: (event: "formChange" | "scroll" | "annotationChange", ...args: any[]) => void;
|
|
293
293
|
cssVars: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
294
294
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
295
295
|
formRenderRef: import("vue").Ref<HTMLElement | undefined>;
|
|
@@ -452,9 +452,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
452
452
|
onFocus: (...args: any[]) => Promise<void>;
|
|
453
453
|
onBlur: (...args: any[]) => Promise<void>;
|
|
454
454
|
onInput: (...args: any[]) => Promise<void>;
|
|
455
|
+
editable: boolean;
|
|
455
456
|
reset: (options?: import("../../../../../es/components/form-render").IFieldResetOptions | undefined) => Promise<void>;
|
|
456
457
|
title: string;
|
|
457
|
-
editable: boolean;
|
|
458
458
|
visible: boolean;
|
|
459
459
|
submit: <T_2>(onSubmit?: ((values: any) => void | Promise<T_2>) | undefined) => Promise<T_2>;
|
|
460
460
|
validator: import("../../../../../es/components/form-render").FieldValidator;
|
|
@@ -600,7 +600,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
600
600
|
readonly displayDirective: "if" | "show" | "show:lazy";
|
|
601
601
|
}>;
|
|
602
602
|
NTabs: any;
|
|
603
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
603
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("formChange" | "scroll" | "annotationChange")[], "scroll" | "formChange" | "annotationChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
604
604
|
fieldList: {
|
|
605
605
|
type: import("vue").PropType<FieldItem[]>;
|
|
606
606
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,openBlock as t,createBlock as
|
|
1
|
+
import{defineComponent as e,openBlock as t,createBlock as r,unref as o,mergeProps as m,withCtx as a,createElementVNode as i,normalizeStyle as n,resolveDynamicComponent as s}from"vue";import f from"../../../../shared/components/VueDraggable/src/vuedraggable.js";import{usePresetRenderer as u}from"../hooks/usePresetRenderer.js";import{useSortableConfig as d}from"../hooks/useSortalbeConfig.js";import"../hooks/useConfigurationField.js";import{layoutWidthEnum2Column as p}from"../utils/index.js";const g=["data-type","data-required","data-extra"];var l=e({__name:"FormConfigDragDisplay",props:{formConfigItem:{type:Object},textFormatter:{type:Function,required:!0}},setup(e){function l(e){return{"--item-column":e?p(e.layoutWidthEnum):24}}const{getRenderer:c}=u(),{getCommonConfig:y}=d();return(u,d)=>(t(),r(o(f),m(o(y)(e.formConfigItem),{style:l(e.formConfigItem)}),{item:a((({element:m})=>[i("div",{class:"form-config__displayContentItem","data-type":m.type,"data-required":!!m.required,"data-extra":!!m.__extra,style:n(l(m))},[(t(),r(s(o(c)(m)),{"form-config-item":m,textFormatter:e.textFormatter},null,8,["form-config-item","textFormatter"]))],12,g)])),_:1},16,["style"]))}});export{l as default};
|
|
@@ -3441,6 +3441,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3441
3441
|
} | undefined;
|
|
3442
3442
|
__new?: boolean | undefined;
|
|
3443
3443
|
__isCombinationChild?: boolean | undefined;
|
|
3444
|
+
__extra?: boolean | undefined;
|
|
3444
3445
|
}[] | undefined;
|
|
3445
3446
|
originalSetting?: {
|
|
3446
3447
|
[x: string]: any;
|
|
@@ -5137,6 +5138,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5137
5138
|
} | undefined;
|
|
5138
5139
|
__new?: boolean | undefined;
|
|
5139
5140
|
__isCombinationChild?: boolean | undefined;
|
|
5141
|
+
__extra?: boolean | undefined;
|
|
5140
5142
|
}>;
|
|
5141
5143
|
generateFieldListByFormConfigItem: (formConfigItem: FormConfigItem, fieldItem?: FieldItem | undefined) => FieldItem[];
|
|
5142
5144
|
showModal: import("vue").Ref<boolean>;
|
|
@@ -5418,7 +5420,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5418
5420
|
onScroll?: ((...args: any[]) => any) | undefined;
|
|
5419
5421
|
onAnnotationChange?: ((...args: any[]) => any) | undefined;
|
|
5420
5422
|
}>>;
|
|
5421
|
-
emit: (event: "
|
|
5423
|
+
emit: (event: "formChange" | "scroll" | "annotationChange", ...args: any[]) => void;
|
|
5422
5424
|
cssVars: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
5423
5425
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
5424
5426
|
formRenderRef: import("vue").Ref<HTMLElement | undefined>;
|
|
@@ -5581,9 +5583,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5581
5583
|
onFocus: (...args: any[]) => Promise<void>;
|
|
5582
5584
|
onBlur: (...args: any[]) => Promise<void>;
|
|
5583
5585
|
onInput: (...args: any[]) => Promise<void>;
|
|
5586
|
+
editable: boolean;
|
|
5584
5587
|
reset: (options?: import("../../../../../es/components/form-render").IFieldResetOptions | undefined) => Promise<void>;
|
|
5585
5588
|
title: string;
|
|
5586
|
-
editable: boolean;
|
|
5587
5589
|
visible: boolean;
|
|
5588
5590
|
submit: <T>(onSubmit?: ((values: any) => void | Promise<T>) | undefined) => Promise<T>;
|
|
5589
5591
|
validator: import("../../../../../es/components/form-render").FieldValidator;
|
|
@@ -5729,7 +5731,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5729
5731
|
readonly displayDirective: "if" | "show" | "show:lazy";
|
|
5730
5732
|
}>;
|
|
5731
5733
|
NTabs: any;
|
|
5732
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
5734
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("formChange" | "scroll" | "annotationChange")[], "scroll" | "formChange" | "annotationChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
5733
5735
|
fieldList: {
|
|
5734
5736
|
type: PropType<FieldItem[]>;
|
|
5735
5737
|
};
|
|
@@ -9,6 +9,10 @@ declare const FormConfigMaterialItem: import("vue").DefineComponent<{
|
|
|
9
9
|
type: PropType<FormConfigTextFormatter>;
|
|
10
10
|
required: true;
|
|
11
11
|
};
|
|
12
|
+
materialList: {
|
|
13
|
+
type: PropType<FormConfigItem[]>;
|
|
14
|
+
default: () => never[];
|
|
15
|
+
};
|
|
12
16
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
17
|
formConfigItem: {
|
|
14
18
|
type: PropType<FormConfigItem>;
|
|
@@ -18,5 +22,11 @@ declare const FormConfigMaterialItem: import("vue").DefineComponent<{
|
|
|
18
22
|
type: PropType<FormConfigTextFormatter>;
|
|
19
23
|
required: true;
|
|
20
24
|
};
|
|
21
|
-
|
|
25
|
+
materialList: {
|
|
26
|
+
type: PropType<FormConfigItem[]>;
|
|
27
|
+
default: () => never[];
|
|
28
|
+
};
|
|
29
|
+
}>>, {
|
|
30
|
+
materialList: FormConfigItem[];
|
|
31
|
+
}>;
|
|
22
32
|
export default FormConfigMaterialItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as o,createVNode as
|
|
1
|
+
import{defineComponent as e,inject as o,createVNode as t,mergeProps as r}from"vue";import{CloseCircle as i}from"@vicons/ionicons5";import{NButton as n,NIcon as s}from"naive-ui";import"lodash-es";import{InjectionFormConfigEmit as m,InjectionActiveFieldItem as a}from"../constants/index.js";import"../../../../shared/components/VueDraggable/src/vuedraggable.js";import l from"./renderer/DefaultNode.vue.js";import"../../../../shared/utils/index.js";import"../hooks/useConfigurationField.js";import{layoutWidthEnum2Column as u}from"../utils/index.js";const f=e({props:{formConfigItem:{type:Object,required:!0},textFormatter:{type:Function,required:!0},materialList:{type:Array,default:()=>[]}},setup(e){const f=o(m),c=o(a);function d(){const o=e.materialList.findIndex((o=>o.key===e.formConfigItem.key));if(!~o)return;const[t]=e.materialList.splice(o,1);f("removeItem",t),c.value===t&&(c.value=void 0)}return()=>t(l,r({style:{"--item-column":u(e.formConfigItem.layoutWidthEnum)},class:"form-config__displayContentItem",showCloseButton:!1,allowClick:!1},e),{default:()=>e.formConfigItem.__extra?t(n,{text:!0,class:"form-config__renderer--closeButton","text-color":"#a5a5a5",onClick:d},{icon:()=>t(s,{component:i},null)}):null})}});export{f as default};
|
|
@@ -45,9 +45,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
45
45
|
classList: import("vue").ComputedRef<(string | {
|
|
46
46
|
'is-active': boolean;
|
|
47
47
|
'is-disabled': boolean;
|
|
48
|
+
'is-extra': boolean | undefined;
|
|
48
49
|
})[]>;
|
|
49
50
|
disabled: import("vue").ComputedRef<boolean>;
|
|
50
51
|
displayText: import("vue").ComputedRef<string>;
|
|
52
|
+
showCloseBtn: import("vue").ComputedRef<boolean | undefined>;
|
|
51
53
|
NEllipsis: any;
|
|
52
54
|
CloseButton: import("vue").DefineComponent<{
|
|
53
55
|
formConfigItem: {
|
|
@@ -1 +1 @@
|
|
|
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 s,createTextVNode as u,toDisplayString as d,
|
|
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 s,createTextVNode as u,toDisplayString as d,renderSlot as C,createBlock as c,createCommentVNode as g}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"];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=o(_);function B(){k.allowClick&&(q.value=k.formConfigItem)}const b=t((()=>["form-config__renderer--default",{"is-required":k.formConfigItem.required}])),j=t((()=>{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=t((()=>!1===k.formConfigItem.editable)),$=t((()=>{const e=v.get(k.formConfigItem.type);return k.textFormatter(k.formConfigItem,`${k.formConfigItem.name}${e?`(${e})`:""}`)})),h=t((()=>k.showCloseButton&&(!k.formConfigItem.required&&!k.formConfigItem.__isCombinationChild||k.formConfigItem.__extra)));return(o,t)=>(r(),i("div",f(m(y)(e.formConfigItem),{onClick:n(B,["stop"]),class:m(j),"data-type":e.formConfigItem.type}),[a(m(p),{class:l(m(b))},{default:s((()=>[u(d(m($)),1)])),_:1},8,["class"]),C(o.$slots,"default"),m(h)?(r(),c(I,{key:0,"form-config-item":e.formConfigItem},null,8,["form-config-item"])):g("v-if",!0)],16,x))}});export{k as default};
|
|
@@ -81,3 +81,4 @@ export declare const FORM_CONFIG_GROUP = "__display";
|
|
|
81
81
|
export declare const InjectionFieldList: InjectionKey<Ref<FormConfigItem[]>>;
|
|
82
82
|
export declare const InjectionMaterialList: InjectionKey<Ref<FormConfigItem[]>>;
|
|
83
83
|
export declare const InjectionActiveFieldItem: InjectionKey<Ref<UndefinedAble<FormConfigItem>>>;
|
|
84
|
+
export declare const InjectionFormConfigEmit: InjectionKey<(event: 'addItem' | 'removeItem', ...args: unknown[]) => void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{range as e}from"lodash-es";const t=new Map([["LINE_BAR","分线栏"],["NEWLINE","分行符"]]);var n=(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))(n||{});function l(){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
|
|
1
|
+
import{range as e}from"lodash-es";const t=new Map([["LINE_BAR","分线栏"],["NEWLINE","分行符"]]);var n=(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))(n||{});function l(){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 o(){return{option:e(1,11).map((e=>({text:`${e}行`,value:e})))}}function i(){return{open:{describe:"默认展开",value:!0},close:{describe:"默认收起",value:!1}}}function u(){return{open:{describe:"可折叠",value:!0},close:{describe:"不可折叠",value:!1}}}function a(){return{open:{describe:"可编辑",value:!0},close:{describe:"不可编辑",value:!1}}}function r(){return{open:{describe:"必填",value:!0},close:{describe:"不必填",value:!1}}}function E(){return{open:{describe:"显示",value:!0},close:{describe:"隐藏",value:!1}}}const c="__display",s=Symbol("InjectionFieldList"),d=Symbol("InjectionMaterialList"),v=Symbol("InjectionActiveFieldItem"),I=Symbol("InjectionFormConfigEmit");export{n as EditAbleField,c as FORM_CONFIG_GROUP,v as InjectionActiveFieldItem,s as InjectionFieldList,I as InjectionFormConfigEmit,d as InjectionMaterialList,t as WidgetTextMap,a as isEditOptionConfig,u as isNotFoldOptionConfig,r as isNullOptionConfig,i as isShowOptionConfig,E as isVisibleOptionConfig,o as rowsOptionConfig,l as widgetWidthOptionConfig};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{findAncestor as o}from"../../../../shared/utils/index.js";import{FORM_CONFIG_GROUP as
|
|
1
|
+
import{findAncestor as o}from"../../../../shared/utils/index.js";import{FORM_CONFIG_GROUP as t}from"../constants/index.js";function e(){let e,s=null;function i({target:o,item:t}){s=setTimeout((()=>{o.classList.add("is-choosing-area"),t.classList.add("is-choosing")}),200)}function a({from:o,to:t,target:e,item:i}){clearTimeout(s),[o,t,e].forEach((o=>{o.classList.remove("is-choosing-area")})),i.classList.remove("is-choosing")}function n({to:t,from:s,dragged:i}){return("LINE_BAR"!==i.dataset.type||!o(t,(o=>"LINE_BAR"===o.dataset.type)))&&(("true"!==i.dataset.required||"true"===i.dataset.extra||!o(t,(o=>o.classList.contains("form-config__materialContent"))))&&(null==e||e.classList.remove("is-choosing-area"),e=t,t!==s&&s.classList.remove("is-choosing-area"),void t.classList.add("is-choosing-area")))}return{getCommonConfig:o=>({move:n,onChoose:i,onUnchoose:a,tag:"section",forceFallback:!1,animation:"150","item-key":"key",group:"COMBINATION"===(null==o?void 0:o.type)?o.key:t})}}export{e as useSortableConfig};
|
|
@@ -30,6 +30,7 @@ export declare type FormConfigItem = {
|
|
|
30
30
|
originalSetting: FieldItem;
|
|
31
31
|
__new: boolean;
|
|
32
32
|
__isCombinationChild: boolean;
|
|
33
|
+
__extra: boolean;
|
|
33
34
|
}>;
|
|
34
35
|
export interface FormConfigTextFormatter {
|
|
35
36
|
(formConfigItem: FormConfigItem, parsedText: string): string;
|
|
@@ -38,6 +39,7 @@ export interface FormConfigExpose {
|
|
|
38
39
|
loadData(payload: Record<'fieldList', FormConfigItem[]>): void;
|
|
39
40
|
validate(): Promise<unknown>;
|
|
40
41
|
getData(): Record<'fieldList' | 'materialList', FormConfigItem[]>;
|
|
42
|
+
clearExtraList(): void;
|
|
41
43
|
}
|
|
42
44
|
interface FieldVisitorContext {
|
|
43
45
|
field: FieldItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.form-config{display:flex;justify-content:space-between}.form-config__material{border-radius:8px;box-sizing:border-box;flex-shrink:0;padding:16px;width:200px}.form-config__materialHeader{align-items:center;display:flex;height:40px;justify-content:space-between}.form-config__materialContent{border:1px dashed hsla(0,0%,50%,.35);border-radius:8px;box-sizing:border-box;display:flex;flex-direction:column;flex-shrink:0;gap:8px;max-height:var(--max-height);min-height:200px;overflow-y:auto;padding:16px}.form-config__displayWrapper{border-radius:8px;box-sizing:border-box;flex-shrink:0;flex:1;min-width:400px;padding:16px 0}.form-config__displayHeader{align-items:center;display:flex;height:40px;justify-content:space-between}.form-config__displayContent{border:1px dashed hsla(0,0%,50%,.35);border-radius:8px;box-sizing:border-box;display:grid!important;flex-shrink:0;gap:8px;grid-template-columns:repeat(24,minmax(0,1fr));height:fit-content;max-height:var(--max-height);overflow-y:auto;padding:16px}.form-config__displayContentItem{grid-column:span var(--item-column) /span var(--item-column);position:relative}.form-config__config{border-radius:8px;box-sizing:border-box;flex-shrink:0;padding:16px;width:240px}.form-config__configHeader{align-items:center;display:flex;height:40px;justify-content:space-between}.form-config__configContent{border:none;border-radius:8px;box-sizing:border-box;flex-shrink:0;max-height:var(--max-height);overflow-y:auto;padding:16px}.form-config__renderer{box-sizing:border-box;cursor:move;justify-content:flex-start;width:100%}.form-config__renderer--default{align-items:center;box-sizing:border-box;display:flex;padding:8px 0;position:relative;user-select:none;width:100%}.form-config__renderer--defaultWrapper{align-items:center;border-radius:2px;box-sizing:border-box;display:inline-flex;height:34px;padding:0 14px;transition:all .3s linear}.form-config__renderer--defaultWrapper.is-disabled{background-color:transparent;border:1px dashed var(--c-primary-color)}.form-config__renderer--defaultWrapper:not(.is-disabled){background-color:rgba(46,51,56,.05);border:1px dashed transparent}.form-config__renderer--defaultWrapper:not(.is-disabled):hover{background-color:rgba(46,51,56,.09)}.form-config__renderer--defaultWrapper:not(.is-disabled):active{background-color:rgba(46,51,56,.15)}.form-config__renderer--complex{border:1px dashed var(--c-primary-color);border-radius:8px;padding:8px}.form-config__renderer--complexHeader{display:flex;justify-content:center;margin-top:-8px;padding:8px;position:relative}.form-config__renderer--complex--grid{display:grid!important;gap:8px;grid-column:span var(--item-column) /span var(--item-column);grid-template-columns:repeat(24,minmax(0,1fr));min-height:24px}.form-config__renderer--complex--flex{display:flex;min-height:24px}.form-config .is-required{padding-left:16px!important}.form-config .is-required:before{color:red;content:"*";left:8px;position:absolute}.form-config .is-active{color:var(--c-primary-color)!important}.form-config .is-choosing{box-shadow:inset var(--c-primary-color) 0 0 0 2px;opacity:.7}.form-config .is-choosing-area{background:hsla(0,0%,50%,.1)}.form-config [is-hovering=true] .form-config__renderer--closeButton{visibility:visible}.form-config .form-config__renderer--closeButton{position:absolute;right:4px;top:50%;transform:translateY(-50%);visibility:hidden}
|
|
1
|
+
.form-config,.form-config__material{display:flex;justify-content:space-between}.form-config__material{border-radius:8px;box-sizing:border-box;flex-direction:column;flex-shrink:0;padding:16px;width:200px}.form-config__materialHeader{align-items:center;display:flex;height:40px;justify-content:space-between}.form-config__materialContent{border:1px dashed hsla(0,0%,50%,.35);border-radius:8px;box-sizing:border-box;display:flex;flex-direction:column;flex-shrink:0;flex:1;gap:8px;max-height:var(--max-height);min-height:200px;overflow-y:auto;padding:16px}.form-config__materialExtraList{margin-top:12px}.form-config__displayWrapper{border-radius:8px;box-sizing:border-box;flex-shrink:0;flex:1;min-width:400px;padding:16px 0}.form-config__displayHeader{align-items:center;display:flex;height:40px;justify-content:space-between}.form-config__displayContent{border:1px dashed hsla(0,0%,50%,.35);border-radius:8px;box-sizing:border-box;display:grid!important;flex-shrink:0;gap:8px;grid-template-columns:repeat(24,minmax(0,1fr));height:fit-content;max-height:var(--max-height);overflow-y:auto;padding:16px}.form-config__displayContentItem{grid-column:span var(--item-column) /span var(--item-column);position:relative}.form-config__config{border-radius:8px;box-sizing:border-box;flex-shrink:0;padding:16px;width:240px}.form-config__configHeader{align-items:center;display:flex;height:40px;justify-content:space-between}.form-config__configContent{border:none;border-radius:8px;box-sizing:border-box;flex-shrink:0;max-height:var(--max-height);min-height:38px;overflow-y:auto;padding:16px}.form-config__renderer{box-sizing:border-box;cursor:move;justify-content:flex-start;width:100%}.form-config__renderer--default{align-items:center;box-sizing:border-box;display:flex;padding:8px 0;position:relative;user-select:none;width:100%}.form-config__renderer--defaultWrapper{align-items:center;border-radius:2px;box-sizing:border-box;display:inline-flex;height:34px;padding:0 14px;transition:all .3s linear}.form-config__renderer--defaultWrapper.is-disabled{background-color:transparent;border:1px dashed var(--c-primary-color)}.form-config__renderer--defaultWrapper:not(.is-disabled){background-color:rgba(46,51,56,.05);border:1px dashed transparent}.form-config__renderer--defaultWrapper:not(.is-disabled):hover{background-color:rgba(46,51,56,.09)}.form-config__renderer--defaultWrapper:not(.is-disabled):active{background-color:rgba(46,51,56,.15)}.form-config__renderer--complex{border:1px dashed var(--c-primary-color);border-radius:8px;padding:8px}.form-config__renderer--complexHeader{display:flex;justify-content:center;margin-top:-8px;padding:8px;position:relative}.form-config__renderer--complex--grid{display:grid!important;gap:8px;grid-column:span var(--item-column) /span var(--item-column);grid-template-columns:repeat(24,minmax(0,1fr));min-height:24px}.form-config__renderer--complex--flex{display:flex;min-height:24px}.form-config .is-required{padding-left:16px!important}.form-config .is-required:before{color:red;content:"*";left:8px;position:absolute}.form-config .is-extra:before{border-bottom:6px solid transparent;border-left:6px solid var(--c-primary-color);border-right:6px solid transparent;border-top:6px solid var(--c-primary-color);content:"";height:0;left:0;position:absolute;top:0;width:0}.form-config .is-active{color:var(--c-primary-color)!important}.form-config .is-choosing{box-shadow:inset var(--c-primary-color) 0 0 0 2px;opacity:.7}.form-config .is-choosing-area{background:hsla(0,0%,50%,.1)}.form-config [is-hovering=true] .form-config__renderer--closeButton{visibility:visible}.form-config .form-config__renderer--closeButton{position:absolute;right:4px;top:50%;transform:translateY(-50%);visibility:hidden}
|
|
@@ -276,7 +276,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
276
276
|
onScroll?: ((...args: any[]) => any) | undefined;
|
|
277
277
|
onAnnotationChange?: ((...args: any[]) => any) | undefined;
|
|
278
278
|
}>>;
|
|
279
|
-
emit: (event: "
|
|
279
|
+
emit: (event: "formChange" | "scroll" | "annotationChange", ...args: any[]) => void;
|
|
280
280
|
cssVars: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
281
281
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
282
282
|
formRenderRef: import("vue").Ref<HTMLElement | undefined>;
|
|
@@ -439,9 +439,9 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
439
439
|
onFocus: (...args: any[]) => Promise<void>;
|
|
440
440
|
onBlur: (...args: any[]) => Promise<void>;
|
|
441
441
|
onInput: (...args: any[]) => Promise<void>;
|
|
442
|
+
editable: boolean;
|
|
442
443
|
reset: (options?: import("@formily/core/esm/types").IFieldResetOptions | undefined) => Promise<void>;
|
|
443
444
|
title: string;
|
|
444
|
-
editable: boolean;
|
|
445
445
|
visible: boolean;
|
|
446
446
|
submit: <T>(onSubmit?: ((values: any) => void | Promise<T>) | undefined) => Promise<T>;
|
|
447
447
|
validator: import("@formily/core/esm/types").FieldValidator;
|
|
@@ -587,7 +587,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
587
587
|
readonly displayDirective: "if" | "show" | "show:lazy";
|
|
588
588
|
}>;
|
|
589
589
|
NTabs: any;
|
|
590
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
590
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("formChange" | "scroll" | "annotationChange")[], "scroll" | "formChange" | "annotationChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
591
591
|
fieldList: {
|
|
592
592
|
type: import("vue").PropType<import("./src/types").FieldItem[]>;
|
|
593
593
|
};
|
|
@@ -270,7 +270,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
270
270
|
onScroll?: ((...args: any[]) => any) | undefined;
|
|
271
271
|
onAnnotationChange?: ((...args: any[]) => any) | undefined;
|
|
272
272
|
}>>;
|
|
273
|
-
emit: (event: "
|
|
273
|
+
emit: (event: "formChange" | "scroll" | "annotationChange", ...args: any[]) => void;
|
|
274
274
|
cssVars: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
275
275
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
276
276
|
formRenderRef: import("vue").Ref<HTMLElement | undefined>;
|
|
@@ -433,9 +433,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
433
433
|
onFocus: (...args: any[]) => Promise<void>;
|
|
434
434
|
onBlur: (...args: any[]) => Promise<void>;
|
|
435
435
|
onInput: (...args: any[]) => Promise<void>;
|
|
436
|
+
editable: boolean;
|
|
436
437
|
reset: (options?: import("@formily/core").IFieldResetOptions | undefined) => Promise<void>;
|
|
437
438
|
title: string;
|
|
438
|
-
editable: boolean;
|
|
439
439
|
visible: boolean;
|
|
440
440
|
submit: <T>(onSubmit?: ((values: any) => void | Promise<T>) | undefined) => Promise<T>;
|
|
441
441
|
validator: import("@formily/core").FieldValidator;
|
|
@@ -581,7 +581,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
581
581
|
readonly displayDirective: "if" | "show" | "show:lazy";
|
|
582
582
|
}>;
|
|
583
583
|
NTabs: any;
|
|
584
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
584
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("formChange" | "scroll" | "annotationChange")[], "scroll" | "formChange" | "annotationChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
585
585
|
fieldList: {
|
|
586
586
|
type: PropType<FieldItem[]>;
|
|
587
587
|
};
|
|
@@ -274,7 +274,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
274
274
|
onScroll?: ((...args: any[]) => any) | undefined;
|
|
275
275
|
onAnnotationChange?: ((...args: any[]) => any) | undefined;
|
|
276
276
|
}>>;
|
|
277
|
-
emit: (event: "
|
|
277
|
+
emit: (event: "formChange" | "scroll" | "annotationChange", ...args: any[]) => void;
|
|
278
278
|
cssVars: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
279
279
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
280
280
|
formRenderRef: import("vue").Ref<HTMLElement | undefined>;
|
|
@@ -437,9 +437,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
437
437
|
onFocus: (...args: any[]) => Promise<void>;
|
|
438
438
|
onBlur: (...args: any[]) => Promise<void>;
|
|
439
439
|
onInput: (...args: any[]) => Promise<void>;
|
|
440
|
+
editable: boolean;
|
|
440
441
|
reset: (options?: import("../../../../es/components/form-render").IFieldResetOptions | undefined) => Promise<void>;
|
|
441
442
|
title: string;
|
|
442
|
-
editable: boolean;
|
|
443
443
|
visible: boolean;
|
|
444
444
|
submit: <T>(onSubmit?: ((values: any) => void | Promise<T>) | undefined) => Promise<T>;
|
|
445
445
|
validator: import("../../../../es/components/form-render").FieldValidator;
|
|
@@ -585,7 +585,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
585
585
|
readonly displayDirective: "if" | "show" | "show:lazy";
|
|
586
586
|
}>;
|
|
587
587
|
NTabs: any;
|
|
588
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
588
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("formChange" | "scroll" | "annotationChange")[], "scroll" | "formChange" | "annotationChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
589
589
|
fieldList: {
|
|
590
590
|
type: import("vue").PropType<import("../../../../es/components/form-render").FieldItem[]>;
|
|
591
591
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(){return{nuiThemeOverrides:{common:{inputColorDisabled:"#F5F5F5",textColorDisabled:"#000000",placeholderColorDisabled:"#000000",borderColor:"#D5D5D5",errorColor:"#DE1919",placeholderColor:"rgba(0,0,0,0.4)"},Input:{paddingMedium:"8px",paddingSmall:"8px",paddingLarge:"8px",paddingTiny:"8px"},InternalSelection:{paddingSingle:"8px",paddingMultiple:"2px"},Form:{feedbackHeightMedium:"16px",feedbackHeightLarge:"16px",feedbackHeightSmall:"16px",feedbackFontSizeLarge:"12px",feedbackFontSizeMedium:"12px",feedbackFontSizeSmall:"12px",feedbackPadding:"0px"}}}}export{e as useNuiThemeOverrides};
|
|
1
|
+
function e(){return{nuiThemeOverrides:{common:{inputColorDisabled:"#F5F5F5",textColorDisabled:"#000000",placeholderColorDisabled:"#000000",borderColor:"#D5D5D5",errorColor:"#DE1919",placeholderColor:"rgba(0,0,0,0.4)"},Input:{paddingMedium:"8px",paddingSmall:"8px",paddingLarge:"8px",paddingTiny:"8px"},DatePicker:{itemTextColorDisabled:"rgba(194, 194, 194, 1)"},InternalSelection:{paddingSingle:"8px",paddingMultiple:"2px"},Form:{feedbackHeightMedium:"16px",feedbackHeightLarge:"16px",feedbackHeightSmall:"16px",feedbackFontSizeLarge:"12px",feedbackFontSizeMedium:"12px",feedbackFontSizeSmall:"12px",feedbackPadding:"0px"}}}}export{e as useNuiThemeOverrides};
|