cnhis-design-vue 3.2.3-beta.0 → 3.2.3-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/es/components/big-table/index.d.ts +1 -1
- package/es/components/big-table/src/BigTable.vue.d.ts +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue2.js +1 -1
- package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
- package/es/components/form-render/src/components/renderer/formItem.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useEventConvert.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
|
@@ -610,7 +610,7 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
610
610
|
setGroupTreeExpand: () => void;
|
|
611
611
|
resetTableInlineEditStatus: () => false | undefined;
|
|
612
612
|
renderAnnotation: (columnConfig: import("../../shared/types").AnyObject) => JSX.Element | null;
|
|
613
|
-
toolTipTitle: (item: any, type?: any) => (JSX.Element | null)[]
|
|
613
|
+
toolTipTitle: (item: any, type?: any) => (() => any) | (JSX.Element | null)[];
|
|
614
614
|
triggerExpand: (e: any, isExpand: any) => void;
|
|
615
615
|
getOtherConfigInit: () => any;
|
|
616
616
|
refreshTable: () => void;
|
|
@@ -612,7 +612,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
612
612
|
setGroupTreeExpand: () => void;
|
|
613
613
|
resetTableInlineEditStatus: () => false | undefined;
|
|
614
614
|
renderAnnotation: (columnConfig: AnyObject) => JSX.Element | null;
|
|
615
|
-
toolTipTitle: (item: any, type?: any) => (JSX.Element | null)[]
|
|
615
|
+
toolTipTitle: (item: any, type?: any) => (() => any) | (JSX.Element | null)[];
|
|
616
616
|
triggerExpand: (e: any, isExpand: any) => void;
|
|
617
617
|
getOtherConfigInit: () => any;
|
|
618
618
|
refreshTable: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as i,openBlock as t,createBlock as l,unref as a,withCtx as o,createVNode as r,createTextVNode as n}from"vue";import{pick as s}from"lodash-es";import{NButtonGroup as m,NPopconfirm as u,NButton as d}from"naive-ui";import{EditAbleField as f}from"../constants/index.js";import{useConfigurationField as _}from"../hooks/useConfigurationField.js";import"../../../index.js";import L from"../../../form-render/index.js";var c=e({__name:"FormConfigCreator",emits:{submit:e=>e},setup(e,{emit:c}){const p=_().generateFieldListByKeys([f.NAME,f.LAYOUT_WIDTH_ENUM,f.NOTES,f.DEFAULT_EXPAND,f.FOLD]),h=i(),E=i(),w={defaultExpand:!0,fold:!0,layoutWidthEnum:"ALL_LINE"};async function y(e,i,t){if(!t)return;await t.validate();const l=t.getFormValues();c("submit",{layoutWidthEnum:"ALL_LINE",...l,type:e,key:l.name,...i,__new:!0})}return(e,i)=>(t(),l(a(m),{size:"small"},{default:o((()=>[r(a(u),{width:"200px","show-icon":!1,"show-arrow":!1,onPositiveClick:i[0]||(i[0]=e=>y("NEWLINE",{},E.value))},{trigger:o((()=>[r(a(d),null,{default:o((()=>[n("新建分行符")])),_:1})])),default:o((()=>[r(a(L),{column:12,ref_key:"lineBreakFormRef",ref:E,"initial-data":a(s)(w,["layoutWidthEnum"]),size:"small","label-width":"auto","label-placement":"left",fieldList:a(p).slice(0,
|
|
1
|
+
import{defineComponent as e,ref as i,openBlock as t,createBlock as l,unref as a,withCtx as o,createVNode as r,createTextVNode as n}from"vue";import{pick as s}from"lodash-es";import{NButtonGroup as m,NPopconfirm as u,NButton as d}from"naive-ui";import{EditAbleField as f}from"../constants/index.js";import{useConfigurationField as _}from"../hooks/useConfigurationField.js";import"../../../index.js";import L from"../../../form-render/index.js";var c=e({__name:"FormConfigCreator",emits:{submit:e=>e},setup(e,{emit:c}){const p=_().generateFieldListByKeys([f.NAME,f.LAYOUT_WIDTH_ENUM,f.NOTES,f.DEFAULT_EXPAND,f.FOLD]),h=i(),E=i(),w={defaultExpand:!0,fold:!0,layoutWidthEnum:"ALL_LINE"};async function y(e,i,t){if(!t)return;await t.validate();const l=t.getFormValues();c("submit",{layoutWidthEnum:"ALL_LINE",...l,type:e,key:l.name,...i,__new:!0})}return(e,i)=>(t(),l(a(m),{size:"small"},{default:o((()=>[r(a(u),{width:"200px","show-icon":!1,"show-arrow":!1,onPositiveClick:i[0]||(i[0]=e=>y("NEWLINE",{},E.value))},{trigger:o((()=>[r(a(d),null,{default:o((()=>[n("新建分行符")])),_:1})])),default:o((()=>[r(a(L),{column:12,ref_key:"lineBreakFormRef",ref:E,"initial-data":a(s)(w,["layoutWidthEnum"]),size:"small","label-width":"auto","label-placement":"left",fieldList:a(p).slice(0,1)},null,8,["initial-data","fieldList"])])),_:1}),r(a(u),{width:"300px","show-icon":!1,"show-arrow":!1,onPositiveClick:i[1]||(i[1]=e=>y("LINE_BAR",{children:[]},h.value))},{trigger:o((()=>[r(a(d),null,{default:o((()=>[n("新建分线栏")])),_:1})])),default:o((()=>[r(a(L),{column:12,ref_key:"linebarFormRef",ref:h,"initial-data":w,size:"small","label-width":"auto","label-placement":"left",fieldList:a(p)},null,8,["fieldList"])])),_:1})])),_:1}))}});export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{omit as e,pick as t}from"lodash-es";import{EditAbleField as l,widgetWidthOptionConfig as i,isShowOptionConfig as a,isNotFoldOptionConfig as _,isEditOptionConfig as o,isNullOptionConfig as m,isVisibleOptionConfig as s,rowsOptionConfig as n}from"../constants/index.js";import"../../../form-render/index.js";import{useFieldNormalize as r}from"../../../form-render/src/hooks/useFieldNormalize.js";const{FieldNormalizeWaterfallHook:d}=r();function E(){const r=new Map([[l.KEY,e=>({alias:"字段",elem_width:6,html_type:"TEXT",content:null==e?void 0:e.key,decoratorProps:{labelPlacement:"left"}})],[l.NAME,()=>({alias:"名称",elem_width:6,is_null:"0",html_type:"INPUT"})],[l.NOTES,()=>({alias:"问号提示",elem_width:6,html_type:"INPUT",is_empty:"0"})],[l.DEFAULT_VALUE,(l,i)=>{const a=d.call(Object.assign({},null==l?void 0:l.originalSetting,i),{});return{alias:"默认值",elem_width:6,html_type:"INPUT",is_empty:"0",componentProps:e(a.componentProps,["class","style","disabled"]),...t(a,["html_type","validate","option","multi_select","multi_select_value","wordbook","open","close","date_format","step_length","urlConfig","autograph","defined_error_msg","free_entry","validator","allowSlash","is_allow_check_mid","allow_check_mid_level"])}}],[l.LAYOUT_WIDTH_ENUM,()=>({alias:"宽度",fieldType:"number",html_type:"SELECT",elem_width:6,...i()})],[l.DESC,()=>({alias:"说明文本",elem_width:6,html_type:"INPUT",is_empty:"0",validate:{max_length:30}})],[l.DEFAULT_EXPAND,()=>({alias:"是否默认展开",html_type:"SWITCH",elem_width:6,...a()})],[l.FOLD,()=>({alias:"是否可折叠",html_type:"SWITCH",elem_width:6,..._()})],[l.EDITABLE,e=>({alias:"是否可编辑",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.editableDisabled)?"0":"1",...o()})],[l.REQUIRED,e=>({alias:"是否必填",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.requiredDisabled)?"0":"1",...m()})],[l.SHOW,e=>({alias:"是否显示",html_type:"SWITCH",elem_width:6,is_show:(null==e?void 0:e.__isCombinationChild)?"1":"0",...s()})],[l.ROWS,()=>({alias:"高度",elem_width:6,remark:"默认为3行高度,可调整为1-10行高度",default_val:3,is_empty:"0",html_type:"SELECT",...n()})]]);function E(e,t,l){return e.map((e=>{var i,a;return{...null!=(a=null==(i=r.get(e))?void 0:i(t,l))?a:{},val_key:e}}))}const p=new Map([["LINE_BAR",[l.KEY,l.NAME,l.LAYOUT_WIDTH_ENUM,l.NOTES,l.DEFAULT_EXPAND,l.FOLD]]
|
|
1
|
+
import{omit as e,pick as t}from"lodash-es";import{EditAbleField as l,widgetWidthOptionConfig as i,isShowOptionConfig as a,isNotFoldOptionConfig as _,isEditOptionConfig as o,isNullOptionConfig as m,isVisibleOptionConfig as s,rowsOptionConfig as n}from"../constants/index.js";import"../../../form-render/index.js";import{useFieldNormalize as r}from"../../../form-render/src/hooks/useFieldNormalize.js";const{FieldNormalizeWaterfallHook:d}=r();function E(){const r=new Map([[l.KEY,e=>({alias:"字段",elem_width:6,html_type:"TEXT",content:null==e?void 0:e.key,decoratorProps:{labelPlacement:"left"}})],[l.NAME,()=>({alias:"名称",elem_width:6,is_null:"0",html_type:"INPUT"})],[l.NOTES,()=>({alias:"问号提示",elem_width:6,html_type:"INPUT",is_empty:"0"})],[l.DEFAULT_VALUE,(l,i)=>{const a=d.call(Object.assign({},null==l?void 0:l.originalSetting,i),{});return{alias:"默认值",elem_width:6,html_type:"INPUT",is_empty:"0",componentProps:e(a.componentProps,["class","style","disabled"]),...t(a,["html_type","validate","option","multi_select","multi_select_value","wordbook","open","close","date_format","step_length","urlConfig","autograph","defined_error_msg","free_entry","validator","allowSlash","is_allow_check_mid","allow_check_mid_level"])}}],[l.LAYOUT_WIDTH_ENUM,()=>({alias:"宽度",fieldType:"number",html_type:"SELECT",elem_width:6,...i()})],[l.DESC,()=>({alias:"说明文本",elem_width:6,html_type:"INPUT",is_empty:"0",validate:{max_length:30}})],[l.DEFAULT_EXPAND,()=>({alias:"是否默认展开",html_type:"SWITCH",elem_width:6,...a()})],[l.FOLD,()=>({alias:"是否可折叠",html_type:"SWITCH",elem_width:6,..._()})],[l.EDITABLE,e=>({alias:"是否可编辑",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.editableDisabled)?"0":"1",...o()})],[l.REQUIRED,e=>({alias:"是否必填",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.requiredDisabled)?"0":"1",...m()})],[l.SHOW,e=>({alias:"是否显示",html_type:"SWITCH",elem_width:6,is_show:(null==e?void 0:e.__isCombinationChild)?"1":"0",...s()})],[l.ROWS,()=>({alias:"高度",elem_width:6,remark:"默认为3行高度,可调整为1-10行高度",default_val:3,is_empty:"0",html_type:"SELECT",...n()})]]);function E(e,t,l){return e.map((e=>{var i,a;return{...null!=(a=null==(i=r.get(e))?void 0:i(t,l))?a:{},val_key:e}}))}const p=new Map([["LINE_BAR",[l.KEY,l.NAME,l.LAYOUT_WIDTH_ENUM,l.NOTES,l.DEFAULT_EXPAND,l.FOLD]],["NEWLINE",[l.KEY,l.NAME]],...["COMPLEX","COMBINATION"].map((e=>[e,[l.KEY,l.NAME,l.LAYOUT_WIDTH_ENUM]]))]),h=[l.KEY,l.NAME,l.DEFAULT_VALUE,l.LAYOUT_WIDTH_ENUM,l.DESC,l.NOTES,l.EDITABLE,l.REQUIRED,l.SHOW];return{generateFieldListByKeys:E,generateFieldListByFormConfigItem:function(e,t){var i;const a=p.get(e.type)||h;return"TEXTAREA"===(t?t.html_type:null==(i=e.originalSetting)?void 0:i.html_type)&&a.splice(3,0,l.ROWS),E(a,e,t)}}}export{E as useConfigurationField};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,inject as l,computed as r,ref as t,onUnmounted as o,createVNode as n,mergeProps as a,unref as i}from"vue";import{arrayed as u,widthAppend as s}from"../../../../../shared/utils/index.js";import{isVoidField as d}from"@formily/core";import{observe as m,autorun as f}from"@formily/reactive";import{connect as v,mapProps as p}from"@formily/vue";import{useDebounceFn as c}from"@vueuse/core";import{isString as b,isArray as y,isNumber as _,isFunction as h,uniq as g}from"lodash-es";import{NFormItem as x}from"naive-ui";import I from"../../../../annotation-edit/index.js";import"../../../index.js";import F from"../tooltipMessage.vue.js";import{InjectionFormUUID as k,InjectionFormGraph as j,InjectionAnnotation as R,InjectionAnnotationShortcuts as M,InjectionFormGlobalProps as L,InjectionFormGlobalEmit as q}from"../../constants/index.js";import{useComplexOptionsSpan as E}from"../../hooks/useComplexOptions.js";import{validateMessageParser as K,editorUnescape as N}from"../../utils/index.js";import{dotEscape as S}from"../../utils/schema.js";import{useFormField as W}from"../../hooks/useFormField.js";const A=v(e({name:"FormRenderItem",props:{label:String,propertyKey:String,remark:String,span:{type:Number,default:6},suffixFields:{type:Array},labelRender:Function,annotation:{},fieldItem:{type:Object}},setup(e,{slots:u,attrs:v}){const{field:p,fieldKey:K,fieldAddress:A}=W(),O=l(k),T=r((()=>S(`${O}-${A.value}`))),C=t(!1);if(d(p.value)&&y(e.suffixFields)){const r=l(j);o(m(r,c((()=>{d(p.value)&&y(e.suffixFields)&&(C.value=e.suffixFields.some((e=>{const l=p.value.form.query(e).take();return l&&Reflect.get(l,"required")})))}),100)))}else o(f((()=>{C.value=Reflect.get(p.value,"required")})));const P=l(R),V=r({get(){var l,r;return null!=(r=null==(l=P.value)?void 0:l[e.propertyKey])?r:""},set(l){P.value={property:e.propertyKey,value:l}}}),$=l(M);const w=r((()=>P.value&&!1!==e.annotation)),B=r((()=>e.label&&" "!==e.label)),H=r((()=>{let l=0;return w.value&&(l+=18),e.remark&&(l+=18),l})),U=l(L,{}),z=r((()=>{var l;const r=null==(l=e.fieldItem)?void 0:l.bordered;return null==r?U.bordered:r})),D=l("n-form",{}),G=r((()=>{var e,l,r,t;if("left"!==(null!=(l=v.labelPlacement)?l:null==(e=D.props)?void 0:e.labelPlacement))return"";let o=null!=(t=v.labelWidth)?t:null==(r=D.props)?void 0:r.labelWidth;return o&&"auto"!==o?(o
|
|
1
|
+
import{defineComponent as e,inject as l,computed as r,ref as t,onUnmounted as o,createVNode as n,mergeProps as a,unref as i}from"vue";import{arrayed as u,widthAppend as s}from"../../../../../shared/utils/index.js";import{isVoidField as d}from"@formily/core";import{observe as m,autorun as f}from"@formily/reactive";import{connect as v,mapProps as p}from"@formily/vue";import{useDebounceFn as c}from"@vueuse/core";import{isString as b,isArray as y,isNumber as _,isFunction as h,uniq as g}from"lodash-es";import{NFormItem as x}from"naive-ui";import I from"../../../../annotation-edit/index.js";import"../../../index.js";import F from"../tooltipMessage.vue.js";import{InjectionFormUUID as k,InjectionFormGraph as j,InjectionAnnotation as R,InjectionAnnotationShortcuts as M,InjectionFormGlobalProps as L,InjectionFormGlobalEmit as q}from"../../constants/index.js";import{useComplexOptionsSpan as E}from"../../hooks/useComplexOptions.js";import{validateMessageParser as K,editorUnescape as N}from"../../utils/index.js";import{dotEscape as S}from"../../utils/schema.js";import{useFormField as W}from"../../hooks/useFormField.js";const A=v(e({name:"FormRenderItem",props:{label:String,propertyKey:String,remark:String,span:{type:Number,default:6},suffixFields:{type:Array},labelRender:Function,annotation:{},fieldItem:{type:Object}},setup(e,{slots:u,attrs:v}){const{field:p,fieldKey:K,fieldAddress:A}=W(),O=l(k),T=r((()=>S(`${O}-${A.value}`))),C=t(!1);if(d(p.value)&&y(e.suffixFields)){const r=l(j);o(m(r,c((()=>{d(p.value)&&y(e.suffixFields)&&(C.value=e.suffixFields.some((e=>{const l=p.value.form.query(e).take();return l&&Reflect.get(l,"required")})))}),100)))}else o(f((()=>{C.value=Reflect.get(p.value,"required")})));const P=l(R),V=r({get(){var l,r;return null!=(r=null==(l=P.value)?void 0:l[e.propertyKey])?r:""},set(l){P.value={property:e.propertyKey,value:l}}}),$=l(M);const w=r((()=>P.value&&!1!==e.annotation)),B=r((()=>e.label&&" "!==e.label)),H=r((()=>{let l=0;return w.value&&(l+=18),e.remark&&(l+=18),l})),U=l(L,{}),z=r((()=>{var l;const r=null==(l=e.fieldItem)?void 0:l.bordered;return null==r?U.bordered:r})),D=l("n-form",{}),G=r((()=>{var e,l,r,t;if("left"!==(null!=(l=v.labelPlacement)?l:null==(e=D.props)?void 0:e.labelPlacement))return"";let o=null!=(t=v.labelWidth)?t:null==(r=D.props)?void 0:r.labelWidth;return o&&"auto"!==o?(o=parseInt(o+""),isNaN(o)||!_(o)?"":s(o-12-H.value-(C.value?11:0))):""})),J=r((()=>h(e.labelRender)?"":b(e.label)?e.label:""));function Q(){return B.value?n("section",{class:"form-render__formItemLabel"},[n("span",{class:"form-render__formItemLabel--text",style:{marginRight:s(H.value),maxWidth:G.value},title:J.value},[h(e.labelRender)?e.labelRender(e.label):e.label]),H.value?n("section",{class:"form-render__formItemLabel--operation"},[e.remark?n("div",{class:"form-render__formItemLabel--tooltip"},[n(F,{message:e.remark},null)]):null,w.value?n(I,{class:"form-render__formItemLabel--annotation",modelValue:V.value,"onUpdate:modelValue":e=>V.value=e,shortcuts:i($)},null):null]):null]):null}const{getSpan:X}=E();function Y(){var l,r,t;const o=null==(l=e.fieldItem)?void 0:l.editor_title;return b(o)&&o?n("section",{style:"display:flex;flex-direction:column;gap:4px"},[null==(t=u.default)?void 0:t.call(u),n("div",{innerHTML:N(o)},null)]):null==(r=u.default)?void 0:r.call(u)}const Z=l(L),ee=l(q);function le(){const e=[p.value.path+""];return p.value.form.query("*").forEach((l=>{(l.address+"").includes(p.value.address+"")&&((l.path+"").includes(p.value.path+"")||e.push(l.path+""))})),e}const re=r({get:()=>!(!(null==Z?void 0:Z.selectMode)||!y(null==Z?void 0:Z.selectedFields))&&Z.selectedFields.includes(p.value.path+""),set(e){if(!y(null==Z?void 0:Z.selectedFields))return;let l=[...Z.selectedFields];e?(l.push(...le()),l=g(l)):le().forEach((e=>{const r=l.indexOf(e);r>-1&&l.splice(r,1)})),null==ee||ee("update:selectedFields",l)}}),te=r((()=>(null==Z?void 0:Z.selectMode)&&!(p.value.parent&&"LINEBAR"!==p.value.parent.componentType)));function oe(){(null==Z?void 0:Z.selectMode)&&(re.value=!re.value)}return()=>{return n(x,a({class:["form-render__formItem",{"form-render--no-border":!z.value,"form-render--underline":"underline"===z.value,"form-render__formItemMask":te.value,"form-render__formItemMask--selected":te.value&&re.value}],style:{"--form-item-column":"inner"===(null==(l=e.fieldItem)?void 0:l.childWidthMode)?e.span:X(O,p.value.address,!1)+e.span}},{id:T.value,uuid:O,onClick:oe,"widget-type":p.value.componentType,"field-key":S(K.value),"field-address":S(A.value),required:C.value}),{...u,default:Y,label:Q});var l}}}),p({title:"label"},((e,l)=>{const r=d(l)?void 0:u(l.selfErrors).length?function(e,l){if(!b(l.defined_error_msg)||!l.defined_error_msg)return e.map((e=>K(e,l))).join(",");return K(l.defined_error_msg,l)}(u(l.selfErrors),e.fieldItem):void 0;return{...e,fieldItem:void 0,feedback:r,"validation-status":r?"error":void 0}})));export{A as FORM_ITEM};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{arrayed as o}from"../../../../../shared/utils/index.js";import{cloneDeep as e,isArray as r}from"lodash-es";import{unref as t,defineComponent as s}from"vue";import{VxeEventListenerNameList as n}from"../../constants/index.js";import{eventListener2EventName as i}from"../../utils/index.js";import{useConfigHooks as a}from"./useConfigHooks.js";import{useDataHooks as
|
|
1
|
+
import{arrayed as o}from"../../../../../shared/utils/index.js";import{cloneDeep as e,isArray as r}from"lodash-es";import{unref as t,defineComponent as s}from"vue";import{VxeEventListenerNameList as n}from"../../constants/index.js";import{eventListener2EventName as i}from"../../utils/index.js";import{useConfigHooks as a}from"./useConfigHooks.js";import{useDataHooks as f}from"./useDataHooks.js";import{useDomInsertHooks as l}from"./useDomInsertHooks.js";import{useEventHooks as c}from"./useEventHooks.js";import{useExposeHooks as u}from"./useExposeHooks.js";import{useFieldHooks as d}from"./useFieldHooks.js";import{useSetupHooks as m}from"./useSetupHooks.js";const p=(()=>{let o=null;return()=>o||(o=Object.freeze({configHooks:a().create(),fieldHooks:d().create(),eventHooks:c().create(),dataHooks:f().create(),setupHooks:m().create(),domInsertHooks:l().create(),exposeHooks:u().create()}))})();function k(o,r,t){const s=o.configHooks.config.call(e(r),t);return["rowConfig","editConfig","columnConfig","resizableConfig","seqConfig","sortConfig","filterConfig","radioConfig","checkboxConfig","expandConfig","treeConfig","mouseConfig","menuConfig","keyboardConfig","scrollY","scrollX","editRules"].forEach((e=>{s[e]=o.configHooks[e].call(s[e],s,t)})),s}function H(t,s,n,i){t.fieldHooks.fieldStart.promise(n,i);let a=function e(s){return s.reduce(((s,a,f)=>{const l=[],c=[];let u=!1;return a=t.fieldHooks.field.call(a,{index:f,remove(){u=!0},insertAfter(e){c.push(...o(e))},insertBefore(e){l.push(...o(e))}},n,i),s.push(...l),u||(s.push(a),r(a.children)&&(a.children=e(a.children))),s.push(...c),s}),[])}(e(s));return a=t.fieldHooks.fieldList.call(a,n,i),t.fieldHooks.fieldEnd.promise(n,i),a}function g({hooks:o,config:e,$table:r,emits:s,context:a,globProps:f}){return n.reduce(((n,l)=>(n[l]=n=>function(n,l){var c;const u=i(n);if(!(l=o.eventHooks.beforeEvent.call(l,t(e),{$table:t(r),emits:s,globProps:f,...a},u)))return;Reflect.get(l,"eventName")?s(l.eventName,l):s(u,l);null==(c=o.eventHooks[n])||c.promise(l,t(e),{$table:t(r),globProps:f,emits:s,...a})}(l,n),n)),{})}function h(e,r,s){return async n=>{e.dataHooks.dataStart.promise(t(r));let i=await n.reduce((async(n,i,a)=>{const f=[],l=[];let c=!1;await e.dataHooks.data.promise(i,t(r),{index:a,$table:s,insertBefore(e){f.push(...o(e))},insertAfter(e){l.push(...o(e))},remove(){c=!0}});const u=await n;return u.push(...f),!c&&u.push(i),u.push(...l),u}),Promise.resolve([]));return i=e.dataHooks.dataList.call(i,t(r)),e.dataHooks.dataEnd.promise(t(r)),i}}function C(o){return{header:s({name:"IhoTableHeader",render:()=>o.domInsertHooks.header.call([])}),footer:s({name:"IhoTableFooter",render:()=>o.domInsertHooks.footer.call([])})}}export{k as applyTableConfigHooks,H as applyTableFieldHooks,h as createDataTransfer,C as createDomInsertComponent,g as createTableEventHandlers,p as createTableHooks};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createVNode as e,defineComponent as o,inject as n,computed as l}from"vue";import{isNumber as t,constant as a,isString as i}from"lodash-es";import"../../../../index.js";import{NCheckbox as d}from"naive-ui";import{defineTablePlugin as c}from"../../../hooks/useTablePlugin.js";function r(){const o="checkRendererPlugin";return c({name:o,apply(n){n.fieldHooks.field.tap(o,((n,{index:l,insertBefore:i},d)=>{if(0===l&&d.selectType&&["checkbox","radio"].includes(d.selectType)){const{radioConfig:n,checkboxConfig:l={}}=d,c={width:45,align:"center",fixed:"left",..."radio"===d.selectType?n:l,field:o,type:d.selectType,annotation:!1};l.disableHeader&&(c.slots={header:()=>e("span",{class:"checkbox-cell--disable"},null),...c.slots}),l.useNCheckbox&&(c.slots={checkbox:e=>s(e,l),header:t(l.maxCheckSize)?a([]):e=>s(e,l),...c.slots}),i(c)}return n}))}})}function s(o,n){return[e(p,{payload:o,checkboxConfig:n},null)]}const p=o({name:"IhoTableNCheckbox",props:{payload:{type:Object,default:()=>({})},checkboxConfig:{type:Object,default:()=>({})}},setup(o){const t=n("$xetable");function a(e,n){var l;n.stopPropagation(),"header"===(null==(l=o.payload)?void 0:l.type)?null==t||t.triggerCheckAllEvent(new MouseEvent("mouse-down"),e):null==t||t.triggerCheckRowEvent(new MouseEvent("mouse-down"),o.payload,e)}const c=l((()=>{var e,n;return i(null==(e=o.checkboxConfig)?void 0:e.indeterminateField)?null==(n=o.payload.row)?void 0:n[o.checkboxConfig.indeterminateField]:o.payload.indeterminate}));return()
|
|
1
|
+
import{createVNode as e,defineComponent as o,inject as n,computed as l}from"vue";import{isNumber as t,constant as a,isString as i}from"lodash-es";import"../../../../index.js";import{NCheckbox as d}from"naive-ui";import{defineTablePlugin as c}from"../../../hooks/useTablePlugin.js";function r(){const o="checkRendererPlugin";return c({name:o,apply(n){n.fieldHooks.field.tap(o,((n,{index:l,insertBefore:i},d)=>{if(0===l&&d.selectType&&["checkbox","radio"].includes(d.selectType)){const{radioConfig:n,checkboxConfig:l={}}=d,c={width:45,align:"center",fixed:"left",..."radio"===d.selectType?n:l,field:o,type:d.selectType,annotation:!1};l.disableHeader&&(c.slots={header:()=>e("span",{class:"checkbox-cell--disable"},null),...c.slots}),l.useNCheckbox&&(c.slots={checkbox:e=>s(e,l),header:t(l.maxCheckSize)?a([]):e=>s(e,l),...c.slots}),i(c)}return n}))}})}function s(o,n){return[e(p,{payload:o,checkboxConfig:n},null)]}const p=o({name:"IhoTableNCheckbox",props:{payload:{type:Object,default:()=>({})},checkboxConfig:{type:Object,default:()=>({})}},setup(o){const t=n("$xetable");function a(e,n){var l;n.stopPropagation(),"header"===(null==(l=o.payload)?void 0:l.type)?null==t||t.triggerCheckAllEvent(new MouseEvent("mouse-down"),e):null==t||t.triggerCheckRowEvent(new MouseEvent("mouse-down"),o.payload,e)}const c=l((()=>{var e,n;return i(null==(e=o.checkboxConfig)?void 0:e.indeterminateField)?null==(n=o.payload.row)?void 0:n[o.checkboxConfig.indeterminateField]:o.payload.indeterminate}));return()=>!1===o.payload.visible?null:e(d,{checked:o.payload.checked,"onUpdate:checked":e=>o.payload.checked=e,indeterminate:c.value,disabled:o.payload.disabled,onUpdateChecked:a},null)}});export{r as checkRendererPlugin};
|
package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useEventConvert.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isObject as e}from"lodash-es";import{unref as
|
|
1
|
+
import{isObject as e}from"lodash-es";import{unref as l}from"vue";import{isVerticalTable as o,isVerticalHeader as n,getHeaderDepthByField as r,getOriginFieldFromRowData as t,getOriginRowFromRowData as d}from"../utils.js";const c=(c,i,a)=>{i.eventHooks.beforeEvent.tap("Vertical--useEventConvert",((c,i,u,m)=>{var x,v;if(!e(c))return c;const I=null==(x=l(i))?void 0:x.uuid;if(!I||!o(i))return c;const f=c,{$table:s,$event:h,cell:p}=f;let{$columnIndex:w,$rowIndex:$,column:C,columnIndex:y,row:b,rowIndex:k,type:_,_rowIndex:g,_columnIndex:E}=f;if(C&&(_=n(C.field)?"header":"body","headerCellClick"===m&&"body"===_?m="cellClick":"cellClick"===m&&"header"===_&&(m="headerCellClick"),b)){const e=r(C.field);C=t(b),b="header"===_?void 0:d(b,e),E=y=w="header"===f.type?$||0:((null==(v=a(I).fixedLeftVerticalData)?void 0:v.length)||0)+($||0),g=k=$="header"===_?-1:e}return{_originalPayload:f,$table:s,$event:h,cell:p,type:_,row:b,column:C,rowIndex:k,columnIndex:y,$rowIndex:$,$columnIndex:w,_rowIndex:g,_columnIndex:E,eventName:m}}))};export{c as useEventConvert};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.2.3-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.2.3-beta.2",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.2.3-beta.2",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.2.3-beta.
|
|
3
|
+
"version": "3.2.3-beta.2",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"iOS 7",
|
|
72
72
|
"last 3 iOS versions"
|
|
73
73
|
],
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "624794d0fb28fa0b0e724a79d1f0c3831852a0bb"
|
|
75
75
|
}
|