cnhis-design-vue 3.2.18-beta.10 → 3.2.18-beta.11
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 +143 -17
- package/es/components/ai-chat/src/Index.vue.d.ts +143 -17
- package/es/components/ai-chat/src/Index.vue2.js +1 -1
- package/es/components/ai-chat/src/api/index.d.ts +6 -0
- package/es/components/ai-chat/src/api/index.js +1 -0
- package/es/components/ai-chat/src/components/ChatAudio.vue.d.ts +40 -0
- package/es/components/ai-chat/src/components/ChatAudio.vue.js +1 -0
- package/es/components/ai-chat/src/components/ChatAudio.vue2.js +1 -0
- package/es/components/ai-chat/src/components/ChatCard.js +1 -1
- package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +51 -2
- package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatMain.d.ts +1 -7
- package/es/components/ai-chat/src/components/ChatMain.js +1 -1
- package/es/components/ai-chat/src/components/ChatMainInner.d.ts +2 -0
- package/es/components/ai-chat/src/components/ChatMainInner.js +1 -0
- package/es/components/ai-chat/src/components/ChatRight.vue.d.ts +56 -0
- package/es/components/ai-chat/src/components/ChatRight.vue.js +1 -0
- package/es/components/ai-chat/src/components/ChatRight.vue2.js +1 -0
- package/es/components/ai-chat/src/components/card/JsonCard.d.ts +25 -0
- package/es/components/ai-chat/src/components/card/JsonCard.js +1 -0
- package/es/components/ai-chat/src/components/card/SelectIcon.d.ts +14 -0
- package/es/components/ai-chat/src/components/card/SelectIcon.js +1 -0
- package/es/components/ai-chat/src/hooks/useProgram.d.ts +6 -0
- package/es/components/ai-chat/src/hooks/useProgram.js +1 -0
- package/es/components/ai-chat/src/hooks/useWebsocket.d.ts +2 -0
- package/es/components/ai-chat/src/hooks/useWebsocket.js +1 -0
- package/es/components/ai-chat/src/utils/index.d.ts +1 -0
- package/es/components/ai-chat/src/utils/index.js +1 -1
- package/es/components/ai-chat/style/index.css +1 -1
- package/es/components/audio-sdk/src/audioSDK.d.ts +6 -7
- package/es/components/audio-sdk/src/audioSDK.js +1 -1
- package/es/components/audio-sdk/src/utils/recordingModal.d.ts +2 -1
- package/es/components/audio-sdk/src/utils/recordingModal.js +1 -1
- package/es/components/editor/src/Editor.js +1 -1
- package/es/components/editor/style/index.css +1 -0
- package/es/components/field-editor/src/fields.js +1 -1
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +0 -5
- package/es/components/index.css +1 -1
- package/es/shared/assets/img/file-emr.png.js +1 -0
- package/es/shared/assets/img/file.png.js +1 -0
- package/es/shared/assets/img/use.png.js +1 -0
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,shallowRef as
|
1
|
+
import{defineComponent as e,shallowRef as t,reactive as o,onBeforeUnmount as r,createVNode as i,mergeProps as l}from"vue";import"@wangeditor/editor/dist/css/style.css";import{Editor as d,Toolbar as s}from"@wangeditor/editor-for-vue";var a=e({name:"Editor",inheritAttrs:!1,components:{Editor:d,Toolbar:s},props:{editorConfig:{type:Object},toolbarConfig:{type:Object},uploadImgUrl:{type:String},isDisabled:{type:Boolean,default:!1}},emits:[],setup(e,{attrs:a,slots:n,emit:u}){const p=t(),c=o({MENU_CONF:{uploadImage:{server:e.uploadImgUrl||""}},...e.editorConfig});r((()=>{const e=p.value;null!=e&&e.destroy()}));const f=t=>{p.value=t,e.isDisabled&&t.disable(),console.log("实例",t)};return{editorRef:p,renderVN:()=>i("div",{class:"c-editor"},[i(s,{style:"border-bottom: 1px solid #ccc",editor:p.value,defaultConfig:e.toolbarConfig,mode:"default"},null),i(d,l({class:"c-editor__main",style:"height: 500px"},a,{defaultConfig:c,mode:"default",onOnCreated:f}),null)])}},render(){return this.renderVN()}});export{a as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
.c-editor{border:1px solid #ccc}.c-editor__main{height:500px;overflow-y:hidden}
|
@@ -1 +1 @@
|
|
1
|
-
var l,e,a,d,o,n,t,i,w,u,g,v,y,C,L,_,T,B,E,c,m,I,x,s,O,p,A,h,D,H=(l=>(l.INPUT="INPUT",l.TEXTAREA="TEXTAREA",l.DIGITAL="DIGITAL",l.DATE="DATE",l.RADIO="RADIO",l.RADIO_BLOCK="RADIO_BLOCK",l.CHECKBOX="CHECKBOX",l.CHECKBOX_BLOCK="CHECKBOX_BLOCK",l.SELECT="SELECT",l.MULTI_SELECT="MULTI_SELECT",l))(H||{});const M={open:{describe:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.351"))||"是",value:1},close:{describe:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.352"))||"否",value:0}},k=[{text:(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.293"))||"文本框",value:"INPUT"},{text:(null==(d=window.getLanguageByCode)?void 0:d.call(window,"10010.1.564"))||"文本域",value:"TEXTAREA"},{text:(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.292"))||"数字框",value:"DIGITAL"},{text:(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.74"))||"日期",value:"DATE"},{text:(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.565"))||"横向单选",value:"RADIO"},{text:(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.566"))||"纵向单选",value:"RADIO_BLOCK"},{text:(null==(w=window.getLanguageByCode)?void 0:w.call(window,"10010.1.567"))||"横向多选",value:"CHECKBOX"},{text:(null==(u=window.getLanguageByCode)?void 0:u.call(window,"10010.1.568"))||"纵向多选",value:"CHECKBOX_BLOCK"},{text:(null==(g=window.getLanguageByCode)?void 0:g.call(window,"10010.1.294"))||"下拉框",value:"SELECT"},{text:(null==(v=window.getLanguageByCode)?void 0:v.call(window,"10010.1.569"))||"下拉多选框",value:"MULTI_SELECT"}],r=[{text:"1/3",value:
|
1
|
+
var l,e,a,d,o,n,t,i,w,u,g,v,y,C,L,_,T,B,E,c,m,I,x,s,O,p,A,h,D,H=(l=>(l.INPUT="INPUT",l.TEXTAREA="TEXTAREA",l.DIGITAL="DIGITAL",l.DATE="DATE",l.RADIO="RADIO",l.RADIO_BLOCK="RADIO_BLOCK",l.CHECKBOX="CHECKBOX",l.CHECKBOX_BLOCK="CHECKBOX_BLOCK",l.SELECT="SELECT",l.MULTI_SELECT="MULTI_SELECT",l))(H||{});const M={open:{describe:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.351"))||"是",value:"1"},close:{describe:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.352"))||"否",value:"0"}},k=[{text:(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.293"))||"文本框",value:"INPUT"},{text:(null==(d=window.getLanguageByCode)?void 0:d.call(window,"10010.1.564"))||"文本域",value:"TEXTAREA"},{text:(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.292"))||"数字框",value:"DIGITAL"},{text:(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.74"))||"日期",value:"DATE"},{text:(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.565"))||"横向单选",value:"RADIO"},{text:(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.566"))||"纵向单选",value:"RADIO_BLOCK"},{text:(null==(w=window.getLanguageByCode)?void 0:w.call(window,"10010.1.567"))||"横向多选",value:"CHECKBOX"},{text:(null==(u=window.getLanguageByCode)?void 0:u.call(window,"10010.1.568"))||"纵向多选",value:"CHECKBOX_BLOCK"},{text:(null==(g=window.getLanguageByCode)?void 0:g.call(window,"10010.1.294"))||"下拉框",value:"SELECT"},{text:(null==(v=window.getLanguageByCode)?void 0:v.call(window,"10010.1.569"))||"下拉多选框",value:"MULTI_SELECT"}],r=[{text:"1/3",value:4},{text:"2/3",value:8},{text:"1/4",value:3},{text:"3/4",value:9},{text:"1/6",value:2},{text:"5/6",value:10},{text:"1/8",value:1.5},{text:"7/8",value:10.5},{text:(null==(y=window.getLanguageByCode)?void 0:y.call(window,"10010.1.30"))||"半行",value:6},{text:(null==(C=window.getLanguageByCode)?void 0:C.call(window,"10010.1.29"))||"整行",value:12}],N=[{text:(null==(L=window.getLanguageByCode)?void 0:L.call(window,"10010.1.548"))||"年-月-日 时:分:秒",value:"yyyy-MM-dd HH:mm:ss"},{text:(null==(_=window.getLanguageByCode)?void 0:_.call(window,"10010.1.549"))||"年-月-日 时:分",value:"yyyy-MM-dd HH:mm"},{text:(null==(T=window.getLanguageByCode)?void 0:T.call(window,"10010.1.550"))||"年-月-日",value:"yyyy-MM-dd"},{text:(null==(B=window.getLanguageByCode)?void 0:B.call(window,"10010.1.551"))||"年-月",value:"yyyy-MM"},{text:"月-日 时-分",value:"MM-dd HH:mm"},{text:(null==(E=window.getLanguageByCode)?void 0:E.call(window,"10010.1.553"))||"月-日",value:"MM-dd"},{text:(null==(c=window.getLanguageByCode)?void 0:c.call(window,"10010.1.554"))||"时:分:秒",value:"HH:mm:ss"},{text:(null==(m=window.getLanguageByCode)?void 0:m.call(window,"10010.1.555"))||"时:分",value:"HH:mm"}],U={alias:(null==(I=window.getLanguageByCode)?void 0:I.call(window,"10010.1.541"))||"日期格式",val_key:"date_format",html_type:"SELECT",option:N},K={alias:"选项",val_key:"option",html_type:"COMBINATION",jsonCombination:!1,minGroupNum:0,children:[{elem_width:6,alias:"文本",val_key:"text",html_type:"INPUT",is_null:"0"},{elem_width:6,alias:(null==(x=window.getLanguageByCode)?void 0:x.call(window,"10010.1.22"))||"值",val_key:"value",html_type:"INPUT",is_null:"0"}]},P=[{alias:"id",val_key:"id",html_type:"TEXT",decoratorProps:{style:{display:"none"}}},{alias:(null==(s=window.getLanguageByCode)?void 0:s.call(window,"10010.1.530"))||"字段键名",val_key:"key",html_type:"INPUT",remark:"数据库字段键名,不填写时由系统生成,填写则以填写为准"},{alias:(null==(O=window.getLanguageByCode)?void 0:O.call(window,"10010.1.16"))||"是否必填",val_key:"is_null",html_type:"SWITCH",...M},{alias:(null==(p=window.getLanguageByCode)?void 0:p.call(window,"10010.1.529"))||"字段标题",val_key:"name",html_type:"INPUT"},{alias:(null==(A=window.getLanguageByCode)?void 0:A.call(window,"10010.1.532"))||"字段类型",val_key:"html_type",html_type:"SELECT",option:k,is_null:"0"},{alias:"字段默认值",val_key:"default_val",html_type:"INPUT"},{alias:(null==(h=window.getLanguageByCode)?void 0:h.call(window,"10010.1.534"))||"字段问号提示",val_key:"remark",html_type:"INPUT"},{alias:(null==(D=window.getLanguageByCode)?void 0:D.call(window,"10010.1.13"))||"宽度",val_key:"elem_width",html_type:"SELECT",option:r}],S=Object.freeze({DATE_FORMAT_FIELD:U,DECIMAL_LENGTH_FIELD:{alias:"小数位数",val_key:"decimal_length",html_type:"INPUT",remark:"小数位数,默认为0"},OPTION_FIELD:K,DEFAULT_FIELD_LIST:P});export{S as FIELD_EDITOR_FIELDS,H as HtmlType};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as o,provide as t,computed as r,nextTick as a,onBeforeUnmount as s,openBlock as i,createBlock as l,unref as n,mergeProps as m,withCtx as p,createElementBlock as d,createVNode as u,isRef as c,Fragment as f,renderList as h,createCommentVNode as y,createElementVNode as g,normalizeStyle as v,toDisplayString as b,renderSlot as j}from"vue";import{useTheme as k}from"../../../shared/hooks/useTheme.js";import{useElementSize as C}from"@vueuse/core";import"date-fns";import{isNumber as F,cloneDeep as S}from"lodash-es";import"@vue/shared";import"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NForm as x,NTabs as w,NTabPane as L,NConfigProvider as B}from"naive-ui";import{useVersion as A}from"../../../shared/hooks/useVersion.js";import"../../../shared/hooks/useScrollLoading.js";import{createForm as R,onFormMount as H,onFieldValueChange as O,onFieldMount as T,onFieldUnmount as I,onFieldReact as V}from"@formily/core";import{Path as N}from"@formily/path";import{FormProvider as _,FormConsumer as D}from"@formily/vue";import{InjectionFormColumnWidth as W,InjectionFormLifeCycleCaller as U,InjectionFormGraph as E}from"./constants/index.js";import"./components/renderer/text.js";import"./utils/business.js";import{createObjSchema as M}from"./utils/schema.js";import{useAnchor as q}from"./hooks/useAnchor.js";import"../index.js";import{useComplexOptionsSpan as P}from"./hooks/useComplexOptions.js";import{useFieldListAdaptor as G}from"./hooks/useFieldListAdaptor.js";import"../../../shared/utils/tapable/SyncHook.js";import"../../../shared/utils/tapable/SyncBailHook.js";import"../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../shared/utils/tapable/SyncLoopHook.js";import"../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import{useFieldVisitor as K}from"./hooks/useFieldVisitor.js";import{useFormContext as z}from"./hooks/useFormContext.js";import{useFormDomEvent as J,useFormExposeEvent as Q}from"./hooks/useFormEvent.js";import{useFormGraph as $}from"./hooks/useFormGraph.js";import{useFormRenderLifeCycle as X}from"./hooks/useFormRenderLifeCycle.js";import{validateMessageLocale as Y}from"./hooks/useFormValidator.js";import{useLowCodeEvent as Z}from"./hooks/useLowCodeEvent.js";import{useLowCodeReactions as ee}from"./hooks/useLowCodeReactions.js";import{useNuiThemeOverrides as oe}from"./hooks/useNuiThemeOverrides.js";import{useOperationalForm as te}from"./hooks/useOperationalForm.js";import{useWordbookSetting as re}from"./hooks/useWordbookSetting.js";import{useNewLowCodeReactions as ae}from"./hooks/useNewLowCodeReactions.js";import{GlobalState as se}from"@formily/core/esm/shared/constants";const ie={key:0,style:{height:"54px"}},le={style:{"white-space":"pre"}};var ne=e({__name:"FormRender",props:{fieldList:{type:Array},initialData:{type:Object,default:()=>({})},fieldVisitor:{type:Object},column:{type:Number,default:24},maxHeight:{type:[Number,String],default:""},anchor:{type:Boolean,default:!1},parallelism:{type:Number,default:5},businessFormatter:{type:Function},schema:{type:Object},components:{type:Object,default:()=>({})},scope:{type:Object,default:()=>({})},annotation:{type:Object},annotationShortcuts:{type:Array},consumer:{type:Boolean,default:!1},uuid:{type:String},lifeCycle:{type:Object},requestInstance:{type:Object},enterToNextWidget:{type:[Boolean,Function],default:!0},autoExpand:Boolean,lowCodeReactions:{type:Array},newLowCodeReactions:{type:Array},operationalForm:{type:Array},dateOperationalForm:{type:Object},operationalFormInit:{type:Boolean,default:!0},linebarAutoHidden:{type:Boolean},bordered:{type:[Boolean,String],default:!0},labelPlacementOverwrite:Boolean,outBordered:{type:Boolean,default:!1},uniqueCacheData:{type:Boolean,default:!1},forceClearable:Boolean,wordSplitFilter:{type:Boolean,default:!0},selectMode:Boolean,selectedFields:{type:Array},linebarDirection:{type:String,default:"vertical"},linebarTextDirection:{type:String,default:"horizontal"},linebarWidth:{type:[Number,String],default:120},autoWidth:{type:[Boolean,Number],default:!1},incrementalRender:{type:Boolean,default:!1},feedbackType:{type:String,default:"default"},fixMemoLeak:{type:Boolean}},emits:["formChange","annotationChange","scroll","update:selectedFields","linebarChange","ready"],setup(e,{expose:ne,emit:me}){const pe=e,de=k(),{nuiThemeOverrides:ue}=oe();Y();const ce=o(),{width:fe}=C(ce);t(W,r((()=>fe.value?(fe.value-16*(pe.column-1))/24:0)));const he=r((()=>F(pe.maxHeight)?pe.maxHeight+"px":pe.maxHeight)),{SchemaField:ye,businessCollector:ge,formItemDepsCollector:ve,changeContextCollector:be,asyncQueue:je,formUUID:ke}=z(pe,me),{anchorBarRef:Ce,currentAnchor:Fe,updateAnchorList:Se,anchorIdList:xe,onScroll:we,generateAnchorList:Le}=q(pe,me,ce,ve),{callLifeCycle:Be}=X(pe);t(U,Be),Be("onSetup");const{observeFormGraph:Ae,setGraph:Re,removeGraph:He}=$();t(E,Ae);const{lowCodeEventTrigger:Oe}=Z(),Te=o(!0),Ie=R({initialValues:pe.initialData,effects(e){const o={};H((()=>{Object.assign(o,S(e.values))})),O("*",(t=>{const r=N.getIn(o,t.path);N.setIn(o,t.path,t.value);const a=t.props.name.toString();ge.trigger(e,a),ve.trigger(t.path),Te.value&&me("formChange",{fieldInstance:t,fieldKey:a,oldValue:r,fieldName:t.title,value:t.value,context:be.getContext(a,t.value)}),Oe(t),Ve(a),Ne(a),_e.trigger(a),De.trigger(a,t.value)})),T("*",Re),T("*",(e=>{const o=e.props.name.toString();Ve(o),Ne(o),pe.operationalFormInit&&_e.trigger(o)})),I("*",He),pe.anchor&&V("*",Se)}}),{lowCodeReactionsHandler:Ve}=ee(r((()=>pe.lowCodeReactions)),Ie),{newLowCodeReactionsHandler:Ne}=ae(r((()=>pe.newLowCodeReactions)),Ie),_e=te(pe,Ie),De=re().create(Ie,be),{schemaAdaptor:We}=G(ge,pe.lifeCycle);let Ue=pe.fieldList||[],Ee=[];const Me=r((()=>{
|
1
|
+
import{defineComponent as e,ref as o,provide as t,computed as r,nextTick as a,onBeforeUnmount as s,openBlock as i,createBlock as l,unref as n,mergeProps as m,withCtx as p,createElementBlock as d,createVNode as u,isRef as c,Fragment as f,renderList as h,createCommentVNode as y,createElementVNode as g,normalizeStyle as v,toDisplayString as b,renderSlot as j}from"vue";import{useTheme as k}from"../../../shared/hooks/useTheme.js";import{useElementSize as C}from"@vueuse/core";import"date-fns";import{isNumber as F,cloneDeep as S}from"lodash-es";import"@vue/shared";import"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NForm as x,NTabs as w,NTabPane as L,NConfigProvider as B}from"naive-ui";import{useVersion as A}from"../../../shared/hooks/useVersion.js";import"../../../shared/hooks/useScrollLoading.js";import{createForm as R,onFormMount as H,onFieldValueChange as O,onFieldMount as T,onFieldUnmount as I,onFieldReact as V}from"@formily/core";import{Path as N}from"@formily/path";import{FormProvider as _,FormConsumer as D}from"@formily/vue";import{InjectionFormColumnWidth as W,InjectionFormLifeCycleCaller as U,InjectionFormGraph as E}from"./constants/index.js";import"./components/renderer/text.js";import"./utils/business.js";import{createObjSchema as M}from"./utils/schema.js";import{useAnchor as q}from"./hooks/useAnchor.js";import"../index.js";import{useComplexOptionsSpan as P}from"./hooks/useComplexOptions.js";import{useFieldListAdaptor as G}from"./hooks/useFieldListAdaptor.js";import"../../../shared/utils/tapable/SyncHook.js";import"../../../shared/utils/tapable/SyncBailHook.js";import"../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../shared/utils/tapable/SyncLoopHook.js";import"../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import{useFieldVisitor as K}from"./hooks/useFieldVisitor.js";import{useFormContext as z}from"./hooks/useFormContext.js";import{useFormDomEvent as J,useFormExposeEvent as Q}from"./hooks/useFormEvent.js";import{useFormGraph as $}from"./hooks/useFormGraph.js";import{useFormRenderLifeCycle as X}from"./hooks/useFormRenderLifeCycle.js";import{validateMessageLocale as Y}from"./hooks/useFormValidator.js";import{useLowCodeEvent as Z}from"./hooks/useLowCodeEvent.js";import{useLowCodeReactions as ee}from"./hooks/useLowCodeReactions.js";import{useNuiThemeOverrides as oe}from"./hooks/useNuiThemeOverrides.js";import{useOperationalForm as te}from"./hooks/useOperationalForm.js";import{useWordbookSetting as re}from"./hooks/useWordbookSetting.js";import{useNewLowCodeReactions as ae}from"./hooks/useNewLowCodeReactions.js";import{GlobalState as se}from"@formily/core/esm/shared/constants";const ie={key:0,style:{height:"54px"}},le={style:{"white-space":"pre"}};var ne=e({__name:"FormRender",props:{fieldList:{type:Array},initialData:{type:Object,default:()=>({})},fieldVisitor:{type:Object},column:{type:Number,default:24},maxHeight:{type:[Number,String],default:""},anchor:{type:Boolean,default:!1},parallelism:{type:Number,default:5},businessFormatter:{type:Function},schema:{type:Object},components:{type:Object,default:()=>({})},scope:{type:Object,default:()=>({})},annotation:{type:Object},annotationShortcuts:{type:Array},consumer:{type:Boolean,default:!1},uuid:{type:String},lifeCycle:{type:Object},requestInstance:{type:Object},enterToNextWidget:{type:[Boolean,Function],default:!0},autoExpand:Boolean,lowCodeReactions:{type:Array},newLowCodeReactions:{type:Array},operationalForm:{type:Array},dateOperationalForm:{type:Object},operationalFormInit:{type:Boolean,default:!0},linebarAutoHidden:{type:Boolean},bordered:{type:[Boolean,String],default:!0},labelPlacementOverwrite:Boolean,outBordered:{type:Boolean,default:!1},uniqueCacheData:{type:Boolean,default:!1},forceClearable:Boolean,wordSplitFilter:{type:Boolean,default:!0},selectMode:Boolean,selectedFields:{type:Array},linebarDirection:{type:String,default:"vertical"},linebarTextDirection:{type:String,default:"horizontal"},linebarWidth:{type:[Number,String],default:120},autoWidth:{type:[Boolean,Number],default:!1},incrementalRender:{type:Boolean,default:!1},feedbackType:{type:String,default:"default"},fixMemoLeak:{type:Boolean}},emits:["formChange","annotationChange","scroll","update:selectedFields","linebarChange","ready"],setup(e,{expose:ne,emit:me}){const pe=e,de=k(),{nuiThemeOverrides:ue}=oe();Y();const ce=o(),{width:fe}=C(ce);t(W,r((()=>fe.value?(fe.value-16*(pe.column-1))/24:0)));const he=r((()=>F(pe.maxHeight)?pe.maxHeight+"px":pe.maxHeight)),{SchemaField:ye,businessCollector:ge,formItemDepsCollector:ve,changeContextCollector:be,asyncQueue:je,formUUID:ke}=z(pe,me),{anchorBarRef:Ce,currentAnchor:Fe,updateAnchorList:Se,anchorIdList:xe,onScroll:we,generateAnchorList:Le}=q(pe,me,ce,ve),{callLifeCycle:Be}=X(pe);t(U,Be),Be("onSetup");const{observeFormGraph:Ae,setGraph:Re,removeGraph:He}=$();t(E,Ae);const{lowCodeEventTrigger:Oe}=Z(),Te=o(!0),Ie=R({initialValues:pe.initialData,effects(e){const o={};H((()=>{Object.assign(o,S(e.values))})),O("*",(t=>{const r=N.getIn(o,t.path);N.setIn(o,t.path,t.value);const a=t.props.name.toString();ge.trigger(e,a),ve.trigger(t.path),Te.value&&me("formChange",{fieldInstance:t,fieldKey:a,oldValue:r,fieldName:t.title,value:t.value,context:be.getContext(a,t.value)}),Oe(t),Ve(a),Ne(a),_e.trigger(a),De.trigger(a,t.value)})),T("*",Re),T("*",(e=>{const o=e.props.name.toString();Ve(o),Ne(o),pe.operationalFormInit&&_e.trigger(o)})),I("*",He),pe.anchor&&V("*",Se)}}),{lowCodeReactionsHandler:Ve}=ee(r((()=>pe.lowCodeReactions)),Ie),{newLowCodeReactionsHandler:Ne}=ae(r((()=>pe.newLowCodeReactions)),Ie),_e=te(pe,Ie),De=re().create(Ie,be),{schemaAdaptor:We}=G(ge,pe.lifeCycle);let Ue=pe.fieldList||[],Ee=[];const Me=r((()=>{let e=!1;const o=pe.schema?pe.schema:pe.fieldList?(Ue!==pe.fieldList&&0!==Ue.length||(e=!0),Ue=K().traverse(S(pe.fieldList),pe.fieldVisitor),M(We(Ue,pe))):M({});return pe.incrementalRender&&e&&(Ee=[],Object.values(o.properties).forEach((e=>{var o;"visible"===e["x-display"]&&"LINEBAR"===e["x-component"]&&!1!==(null==(o=e["x-component-props"])?void 0:o.show)&&(Ee.push(e),e["x-component-props"].show=!1)})),qe()),o}));function qe(){Ee.length?setTimeout((()=>{const e=Ee.shift();e&&(ve.trigger(N.parse(e.name),!0),Ie.setFieldState(e.name,(e=>{e.componentProps.show=!0})),Ee.length?qe():a().then((()=>{me("ready")})))}),300):me("ready")}const{onKeydown:Pe}=J({formModel:Ie,formRenderRef:ce,props:pe,formUUID:ke}),{clearSpan:Ge}=P();s((()=>{Ge(ke),pe.fixMemoLeak&&(se.lifecycles.length=0)}));const Ke=Q({formModel:Ie,formRenderRef:ce,formItemDepsCollector:ve,businessCollector:ge,wordbookSettingHandler:De,operationalFormHandler:_e,getFieldList:()=>Ue,formUUID:ke,changeContextCollector:be,emitFormChange:Te});return ne({formModel:Ie,validate:(e="*",o={})=>Ke.validate(e,o),getFormValues:(e=!0)=>Ke.getFormValues(e),setFormValues:async(e,o={})=>Ke.setFormValues(e,o),setFieldState(e,o){Ke.setFieldState(e,o)},resetFields(e="*"){Ke.resetFields(e)},queryWidget:async e=>Ke.queryWidget(e),getFieldList:()=>Ue,applySelectedSetting:e=>Ke.applySelectedSetting(e),async reload(){console.error("reload function is abstract,it should be overwrite!")},async optionInited(e={}){if(await a(),je.activeTasks)return new Promise((o=>{var t;const r=()=>{o(),je.onActiveTaskChange=null};je.onActiveTaskChange=()=>{je.activeTasks||r()},setTimeout(r,null!=(t=e.timeout)?t:5e3)}))},updateAnchor(){Le(Ie)},getTextFormValues:()=>Ke.getTextFormValues()}),(o,t)=>(i(),l(n(x),m({class:["form-render",{"form-render--out-border":e.outBordered}],"require-mark-placement":"left",style:n(de)},n(A)(),{uuid:n(ke)}),{default:p((()=>[e.anchor?(i(),d("section",ie,[u(n(w),{value:n(Fe),"onUpdate:value":t[0]||(t[0]=e=>c(Fe)?Fe.value=e:null),type:"line",ref_key:"anchorBarRef",ref:Ce},{default:p((()=>[(i(!0),d(f,null,h(n(xe),(e=>(i(),l(n(L),{name:e.name,tab:e.title,key:e.name},null,8,["name","tab"])))),128))])),_:1},8,["value"])])):y("v-if",!0),u(n(B),{"theme-overrides":n(ue)},{default:p((()=>[g("section",{class:"form-render__wrapper",style:v({"--column":e.column,"--form-height":n(he)}),ref_key:"formRenderRef",ref:ce,onScroll:t[1]||(t[1]=(...e)=>n(we)&&n(we)(...e)),onKeydownCapture:t[2]||(t[2]=(...e)=>n(Pe)&&n(Pe)(...e))},[u(n(_),{form:n(Ie)},{default:p((()=>[u(n(ye),{schema:n(Me)},null,8,["schema"]),e.consumer?(i(),l(n(D),{key:0},{default:p((({form:e})=>[g("div",le,b(JSON.stringify(e.values,null,2)),1)])),_:1})):y("v-if",!0),j(o.$slots,"default")])),_:3},8,["form"])],36)])),_:3},8,["theme-overrides"])])),_:3},16,["class","style","uuid"]))}});export{ne as default};
|
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import{inject as e,createVNode as t,mergeProps as
|
1
|
+
import{inject as e,createVNode as t,mergeProps as o}from"vue";import{NInput as n}from"naive-ui";import"../../../../index.js";import{EDITABLE_WIDGET_TYPE as r,InjectionIhoTableUUID as i}from"../../../constants/index.js";import{useAutoFocus as a}from"./hooks/useAutoFocus.js";import{IhoTableRenderHelper as l}from"../../../utils/index.js";import{defineTablePlugin as s}from"../../../hooks/useTablePlugin.js";import{getSeparateInfo as d}from"../../../utils/separateMap.js";function u(){const u="inputRendererPlugins";return s({name:u,vxe(a){let s="";a.renderer.add(r.INPUT,{renderCell:l.createDefaultRenderCell(),renderEdit:l.createRenderEdit((({fieldItem:r,row:a,rowIndex:l,column:u,emitFormChangeWithParams:m,emitFormClickWithParams:c,$table:f})=>{let p=l,g=a;if("bottom"===r.separatePlacement){const t=e(i),o=d(t,a);if(o&&o.isLastRow&&a!==o.originalData){const{originalData:e=a,index:t}=o;g=e,p=t}}return[t(n,o({value:g[u.field],"onUpdate:value":e=>g[u.field]=e},r.componentProps,{onChange:()=>{m({oldValue:s,index:p,row:g,value:g[u.field]})},onClick:()=>c({index:p,row:g,value:g[u.field]}),onFocus:()=>s=g[u.field],onKeydown:async e=>{if("Enter"!==e.key)return;const{fullData:t}=f.getTableData();if(t.length!==l+1)return;const{editStore:{actived:o}={}}=f.reactData;if(o&&o.row){const t=o.args;await f.clearEdit(),f.handleSelected(t,e)}}}),null)]}))})},apply(e){a(e).bindAutoFocusConfig(u,r.INPUT,".n-input__input-el,.n-input__textarea-el",{focusType:"class"})}})}export{u as inputRendererPlugin};
|
@@ -277,11 +277,6 @@ export type LowCodeTableFieldItem = {
|
|
277
277
|
verticalConfig: {
|
278
278
|
rowHeight: number;
|
279
279
|
};
|
280
|
-
widgetConfig: {
|
281
|
-
input: {
|
282
|
-
eventMode: 'input' | 'change';
|
283
|
-
};
|
284
|
-
};
|
285
280
|
optionInfo: {
|
286
281
|
dynamicOptionInfo?: Partial<{
|
287
282
|
filterKeys: string[];
|