cnhis-design-vue 3.1.52-beta.25 → 3.1.52-beta.26

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.
@@ -3018,10 +3018,11 @@ export declare const CallbackMaps: Map<string, {
3018
3018
  isTree?: import("../../../..").MaybeString<0 | 2 | 1 | 3> | undefined;
3019
3019
  isBatchSelect?: import("../../../..").MaybeString<0 | 1> | undefined;
3020
3020
  isSingleSelect?: import("../../../..").MaybeString<0 | 1> | undefined;
3021
- hideSettingBtn?: import("../../../..").MaybeString<0 | 1> | undefined;
3021
+ selectType?: "checkbox" | "radio" | null | undefined;
3022
+ rowDraggable?: boolean | undefined;
3022
3023
  showSeq?: boolean | undefined;
3023
3024
  forceClearable?: boolean | undefined;
3024
- selectType?: "checkbox" | "radio" | null | undefined;
3025
+ hideSettingBtn?: import("../../../..").MaybeString<0 | 1> | undefined;
3025
3026
  rowGroupSetting?: {
3026
3027
  firstRowGroup?: {
3027
3028
  groupName?: string | undefined;
@@ -5460,10 +5461,11 @@ export declare const CallbackMaps: Map<string, {
5460
5461
  isTree?: import("../../../..").MaybeString<0 | 2 | 1 | 3> | undefined;
5461
5462
  isBatchSelect?: import("../../../..").MaybeString<0 | 1> | undefined;
5462
5463
  isSingleSelect?: import("../../../..").MaybeString<0 | 1> | undefined;
5463
- hideSettingBtn?: import("../../../..").MaybeString<0 | 1> | undefined;
5464
+ selectType?: "checkbox" | "radio" | null | undefined;
5465
+ rowDraggable?: boolean | undefined;
5464
5466
  showSeq?: boolean | undefined;
5465
5467
  forceClearable?: boolean | undefined;
5466
- selectType?: "checkbox" | "radio" | null | undefined;
5468
+ hideSettingBtn?: import("../../../..").MaybeString<0 | 1> | undefined;
5467
5469
  rowGroupSetting?: {
5468
5470
  firstRowGroup?: {
5469
5471
  groupName?: string | undefined;
@@ -1 +1 @@
1
- import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as n}from"lodash-es";import"../../index.js";import{parseNumberFromMaybeString as i,formRenderLog as r}from"../utils/index.js";import{useFieldNormalize as s}from"./useFieldNormalize.js";import{fieldKeyEscape as l,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as a}from"./useFormValidator.js";import{transformDateFormat as c}from"../utils/business.js";function d(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function m(e,o){Object.assign(e["x-component-props"],{...n(o,["urlConfig","wordbook"])})}function u(u){const{createValidatorSchema:f}=a(),x=e=>{var o;const t={name:e.val_key,type:null!=(o=e.fieldType)?o:"string",title:e.alias||e.name,"x-component":e.html_type,default:e.default_val,"x-component-props":{placeholder:e.placeholder,clearable:"0"===e.is_empty,...e.componentProps||{}},"x-content":e.slots,"x-display":"0"===e.is_show?"hidden":"visible","x-pattern":"0"===e.is_edit?"disabled":"editable","x-compile-omitted":["title","x-component-props","x-decorator-props"]};e.reactions&&(t["x-reactions"]=e.reactions),e.noDecorator||Object.assign(t,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:e,span:2*(e.elem_width||3),showLabel:"1"!==e.hide_title,remark:e.remark,propertyKey:e.val_key,annotation:e.annotation,...e.decoratorProps||{}}});const n=f(e);return n&&(t["x-validator"]=n),"0"===e.is_null&&(t.required=!0),t},_=e=>{var o,t,r,s,l,p,a;const c=x(e);e.urlConfig?m(c,e):e.autograph&&d(c,e);const u=!!e.__multiple,f="1"===e.allowModify,_=null!=(t=null==(o=e.componentProps)?void 0:o.selectAll)?t:e.selectAll;return Object.assign(c["x-component-props"],{multiple:u,options:(null==(r=e.componentProps)?void 0:r.options)||e.option,allowModify:f,allowCreate:"1"===e.free_entry||!!c["x-component-props"].allowCreate||f,shouldSave:"1"===e.save_free_entry,showField:null!=(l=e.show_key)?l:null==(s=e.componentProps)?void 0:s.showField,maxTagCount:null!=(a=i(e.multi_select_value))?a:null==(p=c["x-component-props"])?void 0:p.maxTagCount,selectAll:"1"===_||!0===_,...n(e,["lazyRequest","requestCache"])}),u&&(c.type="array"),c},h=e=>{const o=x(e);return Object.assign(o["x-component-props"],{options:e.option,childFieldStrategy:e.childFieldStrategy,childWidthMode:e.childWidthMode,vertical:e.__vertical}),e.urlConfig?m(o,e):e.autograph&&d(o,e),o},g=e=>{const t=x(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},y=e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINEBAR","x-display":"visible","x-component-props":{disabled:"1"===e.is_not_fold,id:p(e.val_key),show:"0"!==e.is_show,remark:e.remark}}),b=new Map([["LINEBAR",y],["LINE_BREAKS",e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINE_BREAKS","x-component-props":{border:e.lineBreaksBorder},"x-display":"0"===e.is_show?"hidden":"visible"})],["INPUT",e=>{const o=x(e);return Object.assign(o["x-component-props"],{...n(e,["prefix","suffix"])}),o}],["TEXTAREA",e=>{const o=x(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=x(e),{decimal_length:t,validate:n,allowSlash:i}=e;return!0!==i&&"1"!==i||(o["x-component"]="INPUT_NUMBER_SLASH",o.type="string"),Object.assign(o["x-component-props"],{precision:null!=t?t:null==n?void 0:n.decimal_length,whiteList:e.whiteList,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",_],["REMOTE_SEARCH",_],["DATE",e=>{const o=x(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:c(e.date_format),validate:e.validate}),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=x(e);return Object.assign(o["x-component-props"],{...n(e,["wordbook","lazyRequest","autograph"])}),"1"===e.is_allow_check_mid&&e.allow_check_mid_level&&(o["x-component-props"].checkAbleLevel=+e.allow_check_mid_level),o}],["SEARCH_CASCADER",e=>{var o;const t=x(e);return Object.assign(t["x-component-props"],{urlConfig:e.urlConfig,depth:null==(o=e.wordbook)?void 0:o.level_num,options:e.option}),t}],["COMBINATION",e=>{const o=x(e);return o.type="array",!1!==e.jsonCombination&&(o["x-component"]="JSON_COMBINATION"),Object.assign(o["x-decorator-props"],{showLabel:!1,showFeedback:!1}),Object.assign(o["x-component-props"],{title:e.alias||e.name,maxGroupNum:e.maxGroupNum,properties:e.children||[],combinationItemDeletable:e.combinationItemDeletable}),o}],["RADIO",h],["CHECKBOX",h],["SWITCH",e=>{const o=x(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close}),o}],["SLIDER",e=>{const o=x(e);return Object.assign(o["x-component-props"],{step:i(e.step_length),max:i(e.max_length),min:i(e.min_length),option:e.option}),o}],["COMPLEX",e=>{const o=x(e);Array.isArray(e.properties)&&r("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?j(e.properties||e.children):{};return o.type=e.fieldType||"void",o.properties=t,Object.assign(o["x-decorator-props"],{showFeedback:!1}),Object.assign(o["x-component-props"],n(e,["wrapperStyle","display"])),o}]]),v=e=>{if(e.suffixConfig)return w(e);return(b.get(e.html_type)||g)(e)},w=o=>{if(!o.suffixConfig&&!o.prefixConfig)return v(o);const t=o.suffixConfig?e(o.suffixConfig):[],n=[...(o.prefixConfig?e(o.prefixConfig):[]).map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"1"}))),{...o,is_show:"1",hide_title:"1",suffixConfig:void 0,prefixConfig:void 0},...t.map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"1"})))],i=x(o),r=n.reduce(((e,o)=>e+2*(o.elem_width||3)),0);return Object.assign(i,{type:"void",name:l(n),title:o.alias||o.name,"x-component":"INPUT_GROUP","x-component-props":{span:r},"x-decorator-props":{...i["x-decorator-props"],showFeedback:!1,suffixFields:n.map((e=>e.val_key))},properties:j(n)}),i},{FieldNormalizeWaterfallHook:C,FieldListNormalizeWaterfallHook:O}=s();function j(o,n={column:9999}){let i=null;return O.call(t(o),n).reduce(((e,o,l)=>{var p;const a=null==(p=(o=C.call(o,n)).validate)?void 0:p.obj_type;return a&&u&&u.collect(a,t(o)),"LINEBAR"===o.html_type?(e[s(o)]=r(y(o),l),i=e[s(o)].properties={}):i?i[s(o)]=r(v(o),l):(i=null,e[s(o)]=r(v(o),l)),e}),{});function r(e,o){return e["x-index"]=o,e}function s(o){return o.suffixConfig?l([o,...e(o.suffixConfig)]):o.val_key}}return{schemaAdaptor:j}}export{u as useFieldListAdaptor};
1
+ import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as n}from"lodash-es";import"../../index.js";import{parseNumberFromMaybeString as i,formRenderLog as r}from"../utils/index.js";import{format as s}from"date-fns";import{useFieldNormalize as l}from"./useFieldNormalize.js";import{fieldKeyEscape as a,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as c}from"./useFormValidator.js";import{transformDateFormat as d}from"../utils/business.js";function m(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function u(e,o){Object.assign(e["x-component-props"],{...n(o,["urlConfig","wordbook"])})}function f(f){const{createValidatorSchema:x}=c(),_=e=>{var o;const t={name:e.val_key,type:null!=(o=e.fieldType)?o:"string",title:e.alias||e.name,"x-component":e.html_type,default:e.default_val,"x-component-props":{placeholder:e.placeholder,clearable:"0"===e.is_empty,...e.componentProps||{}},"x-content":e.slots,"x-display":"0"===e.is_show?"hidden":"visible","x-pattern":"0"===e.is_edit?"disabled":"editable","x-compile-omitted":["title","x-component-props","x-decorator-props"]};e.reactions&&(t["x-reactions"]=e.reactions),e.noDecorator||Object.assign(t,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:e,span:2*(e.elem_width||3),showLabel:"1"!==e.hide_title,remark:e.remark,propertyKey:e.val_key,annotation:e.annotation,...e.decoratorProps||{}}});const n=x(e);return n&&(t["x-validator"]=n),"0"===e.is_null&&(t.required=!0),t},h=e=>{var o,t,r,s,l,a,p;const c=_(e);e.urlConfig?u(c,e):e.autograph&&m(c,e);const d=!!e.__multiple,f="1"===e.allowModify,x=null!=(t=null==(o=e.componentProps)?void 0:o.selectAll)?t:e.selectAll;return Object.assign(c["x-component-props"],{multiple:d,options:(null==(r=e.componentProps)?void 0:r.options)||e.option,allowModify:f,allowCreate:"1"===e.free_entry||!!c["x-component-props"].allowCreate||f,shouldSave:"1"===e.save_free_entry,showField:null!=(l=e.show_key)?l:null==(s=e.componentProps)?void 0:s.showField,maxTagCount:null!=(p=i(e.multi_select_value))?p:null==(a=c["x-component-props"])?void 0:a.maxTagCount,selectAll:"1"===x||!0===x,...n(e,["lazyRequest","requestCache"])}),d&&(c.type="array"),c},g=e=>{const o=_(e);return Object.assign(o["x-component-props"],{options:e.option,childFieldStrategy:e.childFieldStrategy,childWidthMode:e.childWidthMode,vertical:e.__vertical}),e.urlConfig?u(o,e):e.autograph&&m(o,e),o},y=e=>{const t=_(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},b=e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINEBAR","x-display":"visible","x-component-props":{disabled:"1"===e.is_not_fold,id:p(e.val_key),show:"0"!==e.is_show,remark:e.remark}}),v=new Map([["LINEBAR",b],["LINE_BREAKS",e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINE_BREAKS","x-component-props":{border:e.lineBreaksBorder},"x-display":"0"===e.is_show?"hidden":"visible"})],["INPUT",e=>{const o=_(e);return Object.assign(o["x-component-props"],{...n(e,["prefix","suffix"])}),o}],["TEXTAREA",e=>{const o=_(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=_(e),{decimal_length:t,validate:n,allowSlash:i}=e;return!0!==i&&"1"!==i||(o["x-component"]="INPUT_NUMBER_SLASH",o.type="string"),Object.assign(o["x-component-props"],{precision:null!=t?t:null==n?void 0:n.decimal_length,whiteList:e.whiteList,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",h],["REMOTE_SEARCH",h],["DATE",e=>{const o=_(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:d(e.date_format),validate:e.validate}),"current"===o.default&&(o.default=s(new Date,e.date_format||"yyyy-MM-dd")),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=_(e);return Object.assign(o["x-component-props"],{...n(e,["wordbook","lazyRequest","autograph"])}),"1"===e.is_allow_check_mid&&e.allow_check_mid_level&&(o["x-component-props"].checkAbleLevel=+e.allow_check_mid_level),o}],["SEARCH_CASCADER",e=>{var o;const t=_(e);return Object.assign(t["x-component-props"],{urlConfig:e.urlConfig,depth:null==(o=e.wordbook)?void 0:o.level_num,options:e.option}),t}],["COMBINATION",e=>{const o=_(e);return o.type="array",!1!==e.jsonCombination&&(o["x-component"]="JSON_COMBINATION"),Object.assign(o["x-decorator-props"],{showLabel:!1,showFeedback:!1}),Object.assign(o["x-component-props"],{title:e.alias||e.name,maxGroupNum:e.maxGroupNum,properties:e.children||[],combinationItemDeletable:e.combinationItemDeletable}),o}],["RADIO",g],["CHECKBOX",g],["SWITCH",e=>{const o=_(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close}),o}],["SLIDER",e=>{const o=_(e);return Object.assign(o["x-component-props"],{step:i(e.step_length),max:i(e.max_length),min:i(e.min_length),option:e.option}),o}],["COMPLEX",e=>{const o=_(e);Array.isArray(e.properties)&&r("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?A(e.properties||e.children):{};return o.type=e.fieldType||"void",o.properties=t,Object.assign(o["x-decorator-props"],{showFeedback:!1}),Object.assign(o["x-component-props"],n(e,["wrapperStyle","display"])),o}]]),w=e=>{if(e.suffixConfig)return C(e);return(v.get(e.html_type)||y)(e)},C=o=>{if(!o.suffixConfig&&!o.prefixConfig)return w(o);const t=o.suffixConfig?e(o.suffixConfig):[],n=[...(o.prefixConfig?e(o.prefixConfig):[]).map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"1"}))),{...o,is_show:"1",hide_title:"1",suffixConfig:void 0,prefixConfig:void 0},...t.map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"1"})))],i=_(o),r=n.reduce(((e,o)=>e+2*(o.elem_width||3)),0);return Object.assign(i,{type:"void",name:a(n),title:o.alias||o.name,"x-component":"INPUT_GROUP","x-component-props":{span:r},"x-decorator-props":{...i["x-decorator-props"],showFeedback:!1,suffixFields:n.map((e=>e.val_key))},properties:A(n)}),i},{FieldNormalizeWaterfallHook:O,FieldListNormalizeWaterfallHook:j}=l();function A(o,n={column:9999}){let i=null;return j.call(t(o),n).reduce(((e,o,l)=>{var a;const p=null==(a=(o=O.call(o,n)).validate)?void 0:a.obj_type;return p&&f&&f.collect(p,t(o)),"LINEBAR"===o.html_type?(e[s(o)]=r(b(o),l),i=e[s(o)].properties={}):i?i[s(o)]=r(w(o),l):(i=null,e[s(o)]=r(w(o),l)),e}),{});function r(e,o){return e["x-index"]=o,e}function s(o){return o.suffixConfig?a([o,...e(o.suffixConfig)]):o.val_key}}return{schemaAdaptor:A}}export{f as useFieldListAdaptor};
@@ -2122,10 +2122,11 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
2122
2122
  isTree?: import("../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
2123
2123
  isBatchSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
2124
2124
  isSingleSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
2125
- hideSettingBtn?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
2125
+ selectType?: "checkbox" | "radio" | null | undefined;
2126
+ rowDraggable?: boolean | undefined;
2126
2127
  showSeq?: boolean | undefined;
2127
2128
  forceClearable?: boolean | undefined;
2128
- selectType?: "checkbox" | "radio" | null | undefined;
2129
+ hideSettingBtn?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
2129
2130
  rowGroupSetting?: {
2130
2131
  firstRowGroup?: {
2131
2132
  groupName?: string | undefined;
@@ -4564,10 +4565,11 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
4564
4565
  isTree?: import("../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
4565
4566
  isBatchSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
4566
4567
  isSingleSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
4567
- hideSettingBtn?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
4568
+ selectType?: "checkbox" | "radio" | null | undefined;
4569
+ rowDraggable?: boolean | undefined;
4568
4570
  showSeq?: boolean | undefined;
4569
4571
  forceClearable?: boolean | undefined;
4570
- selectType?: "checkbox" | "radio" | null | undefined;
4572
+ hideSettingBtn?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
4571
4573
  rowGroupSetting?: {
4572
4574
  firstRowGroup?: {
4573
4575
  groupName?: string | undefined;
@@ -2122,10 +2122,11 @@ declare const _default: import("vue").DefineComponent<{
2122
2122
  isTree?: import("../../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
2123
2123
  isBatchSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
2124
2124
  isSingleSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
2125
- hideSettingBtn?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
2125
+ selectType?: "checkbox" | "radio" | null | undefined;
2126
+ rowDraggable?: boolean | undefined;
2126
2127
  showSeq?: boolean | undefined;
2127
2128
  forceClearable?: boolean | undefined;
2128
- selectType?: "checkbox" | "radio" | null | undefined;
2129
+ hideSettingBtn?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
2129
2130
  rowGroupSetting?: {
2130
2131
  firstRowGroup?: {
2131
2132
  groupName?: string | undefined;
@@ -4564,10 +4565,11 @@ declare const _default: import("vue").DefineComponent<{
4564
4565
  isTree?: import("../../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
4565
4566
  isBatchSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
4566
4567
  isSingleSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
4567
- hideSettingBtn?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
4568
+ selectType?: "checkbox" | "radio" | null | undefined;
4569
+ rowDraggable?: boolean | undefined;
4568
4570
  showSeq?: boolean | undefined;
4569
4571
  forceClearable?: boolean | undefined;
4570
- selectType?: "checkbox" | "radio" | null | undefined;
4572
+ hideSettingBtn?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
4571
4573
  rowGroupSetting?: {
4572
4574
  firstRowGroup?: {
4573
4575
  groupName?: string | undefined;
@@ -1 +1 @@
1
- import{createVNode as e,mergeProps as o}from"vue";import{format as t}from"date-fns";import{isFunction as n}from"lodash-es";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as r}from"../../../../constants/index.js";import{createIhoTableClearActivedInterceptor as i,IhoTableRenderHelper as d,isInvalidDate as l,getLowCodeFieldFromField as a}from"../../../../utils/index.js";import m from"./editDate.vue.js";import{defineTablePlugin as s}from"../../../../hooks/useTablePlugin.js";function u(){const u="dateRendererPlugin";return s({name:u,vxe(t){t.interceptor.add("event.clearActived",i(r.DATE,(e=>e.classList.contains("n-date-panel")))),t.renderer.add(r.DATE,{renderCell:d.createDefaultRenderCell(),renderEdit:d.createRenderEdit((({fieldItem:t,emitFormClick:n,row:r,column:i,$rowIndex:d})=>[e(m,o({value:r[i.field],"onUpdate:value":e=>r[i.field]=e,isStartDate:t.isStartDate,isEndDate:t.isEndDate,connectField:t.connectField,valueFormat:t.valueFormat},t.componentProps,{column:i,row:r,"row-index":d,onClick:n}),null)]))})},apply(e){e.eventHooks.onCellDblclick.tap(u,(({row:e,column:o,columnIndex:i,rowIndex:d},m,{$table:s})=>{var u,c,f,p;if((null==(u=o.editRender)?void 0:u.name)!==r.DATE||e[o.field])return;if(n(null==(c=m.editConfig)?void 0:c.beforeEditMethod)){if(!(null==(f=m.editConfig)?void 0:f.beforeEditMethod({row:e,column:o,columnIndex:i,rowIndex:d,$table:s,$grid:s})))return}const v=new Date;l(o,e,v)||(e[o.field]=t(v,(null==(p=a(o))?void 0:p.valueFormat)||"yyyy-MM-dd HH:mm:ss"))}))}})}export{u as dateRendererPlugin};
1
+ import{createVNode as e,mergeProps as o}from"vue";import{format as n}from"date-fns";import{isFunction as t}from"lodash-es";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as r}from"../../../../constants/index.js";import{createIhoTableClearActivedInterceptor as i,IhoTableRenderHelper as d,isInvalidDate as l,getLowCodeFieldFromField as a}from"../../../../utils/index.js";import m from"./editDate.vue.js";import{defineTablePlugin as u}from"../../../../hooks/useTablePlugin.js";function s(){const s="dateRendererPlugin";return u({name:s,vxe(n){n.interceptor.add("event.clearActived",i(r.DATE,(e=>e.classList.contains("n-date-panel")))),n.renderer.add(r.DATE,{renderCell:d.createDefaultRenderCell(),renderEdit:d.createRenderEdit((({fieldItem:n,emitFormClick:t,row:r,column:i,$rowIndex:d})=>[e(m,o({value:r[i.field],"onUpdate:value":e=>r[i.field]=e,isStartDate:n.isStartDate,isEndDate:n.isEndDate,connectField:n.connectField,valueFormat:n.valueFormat},n.componentProps,{column:i,row:r,"row-index":d,onClick:t}),null)]))})},apply(e){e.eventHooks.onCellDblclick.tap(s,(({row:e,column:o,columnIndex:i,rowIndex:d,$rowIndex:m},u,{$table:s,emits:c})=>{var f,p,v,x;if((null==(f=o.editRender)?void 0:f.name)!==r.DATE||e[o.field])return;if(t(null==(p=u.editConfig)?void 0:p.beforeEditMethod)){if(!(null==(v=u.editConfig)?void 0:v.beforeEditMethod({row:e,column:o,columnIndex:i,rowIndex:d,$table:s,$grid:s})))return}const w=new Date;if(l(o,e,w))return;const D=e[o.field];e[o.field]=n(w,(null==(x=a(o))?void 0:x.valueFormat)||"yyyy-MM-dd HH:mm:ss"),c("formChange",{oldValue:D,index:d>-1?d:m,value:e[o.field],row:e,column:o,$table:s})}))}})}export{s as dateRendererPlugin};
@@ -1 +1 @@
1
- import{createVNode as e,mergeProps as o}from"vue";import{format as t}from"date-fns";import{isFunction as r}from"lodash-es";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as n}from"../../../../constants/index.js";import{useAutoFocus as i}from"../hooks/useAutoFocus.js";import{createIhoTableClearActivedInterceptor as l,IhoTableRenderHelper as d,getLowCodeFieldFromField as m,isInvalidTime as u}from"../../../../utils/index.js";import a from"./editTime.vue.js";import{defineTablePlugin as f}from"../../../../hooks/useTablePlugin.js";function s(){const s="timeRendererPlugin";return f({name:s,vxe(t){t.interceptor.add("event.clearActived",l(n.TIME,(e=>e.classList.contains("n-popover")))),t.renderer.add(n.TIME,{renderCell:d.createDefaultRenderCell(),renderEdit:d.createRenderEdit((({fieldItem:t,emitFormClick:r,row:n,column:i,$rowIndex:l})=>[e(a,o({formattedValue:n[i.field],"onUpdate:formattedValue":e=>n[i.field]=e,column:i,row:n,"row-index":l,valueFormat:t.valueFormat},t.componentProps,{onClick:r}),null)]))})},apply(e){i(e).bindAutoFocusConfig(s,n.TIME,".n-input__input-el",{after:e=>(Reflect.set(e.editRender,"autoselect",!0),e)}),e.eventHooks.onCellDblclick.tap(s,(({row:e,column:o,columnIndex:i,rowIndex:l},d,{$table:a})=>{var f,s,c,p;if((null==(f=o.editRender)?void 0:f.name)!==n.TIME||e[o.field])return;if(r(null==(s=d.editConfig)?void 0:s.beforeEditMethod)){if(!(null==(c=d.editConfig)?void 0:c.beforeEditMethod({row:e,column:o,columnIndex:i,rowIndex:l,$table:a,$grid:a})))return}const v=t(new Date,(null==(p=m(o))?void 0:p.valueFormat)||"HH:mm");u(o,v)||(e[o.field]=v)}))}})}export{s as timeRendererPlugin};
1
+ import{createVNode as e,mergeProps as o}from"vue";import{format as t}from"date-fns";import{isFunction as r}from"lodash-es";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as n}from"../../../../constants/index.js";import{useAutoFocus as i}from"../hooks/useAutoFocus.js";import{createIhoTableClearActivedInterceptor as l,IhoTableRenderHelper as d,getLowCodeFieldFromField as m,isInvalidTime as u}from"../../../../utils/index.js";import a from"./editTime.vue.js";import{defineTablePlugin as f}from"../../../../hooks/useTablePlugin.js";function s(){const s="timeRendererPlugin";return f({name:s,vxe(t){t.interceptor.add("event.clearActived",l(n.TIME,(e=>e.classList.contains("n-popover")))),t.renderer.add(n.TIME,{renderCell:d.createDefaultRenderCell(),renderEdit:d.createRenderEdit((({fieldItem:t,emitFormClick:r,row:n,column:i,$rowIndex:l})=>[e(a,o({formattedValue:n[i.field],"onUpdate:formattedValue":e=>n[i.field]=e,column:i,row:n,"row-index":l,valueFormat:t.valueFormat},t.componentProps,{onClick:r}),null)]))})},apply(e){i(e).bindAutoFocusConfig(s,n.TIME,".n-input__input-el",{after:e=>(Reflect.set(e.editRender,"autoselect",!0),e)}),e.eventHooks.onCellDblclick.tap(s,(({row:e,column:o,columnIndex:i,rowIndex:l,$rowIndex:d},a,{$table:f,emits:s})=>{var c,p,v,x;if((null==(c=o.editRender)?void 0:c.name)!==n.TIME||e[o.field])return;if(r(null==(p=a.editConfig)?void 0:p.beforeEditMethod)){if(!(null==(v=a.editConfig)?void 0:v.beforeEditMethod({row:e,column:o,columnIndex:i,rowIndex:l,$table:f,$grid:f})))return}const w=t(new Date,(null==(x=m(o))?void 0:x.valueFormat)||"HH:mm");if(u(o,w))return;const I=e[o.field];e[o.field]=w,s("formChange",{oldValue:I,index:l>-1?l:d,value:e[o.field],row:e,column:o,$table:f})}))}})}export{s as timeRendererPlugin};
@@ -18,39 +18,40 @@ export declare type IhoTableConfig = VxeTableProps & Partial<{
18
18
  isTree: MaybeString<0 | 1 | 2 | 3>;
19
19
  isBatchSelect: MaybeString<0 | 1>;
20
20
  isSingleSelect: MaybeString<0 | 1>;
21
- hideSettingBtn: MaybeString<0 | 1>;
21
+ selectType: Exclude<VxeTableDefines.ColumnInfo['type'], 'seq' | 'expand' | 'html'>;
22
+ rowDraggable: boolean;
22
23
  showSeq: boolean;
23
24
  forceClearable: boolean;
24
- selectType: Exclude<VxeTableDefines.ColumnInfo['type'], 'seq' | 'expand' | 'html'>;
25
+ hideSettingBtn: MaybeString<0 | 1>;
25
26
  rowGroupSetting: Partial<Record<TupleToUnion<typeof IhoTableRowGroupSequence>, IhoTableRowGroupItem[]>>;
26
27
  anchorList: Array<{
27
28
  name?: string;
28
29
  field: string;
29
30
  } | string>;
30
- rowConfig: Partial<VxeTableProps['rowConfig'] & {
31
- clickToCancel: boolean;
32
- }>;
33
31
  columnConfig: {
34
32
  seqSlotFn: VxeColumnPropTypes.Slots['default'];
35
33
  };
34
+ sortableConfig: Partial<{
35
+ enable: boolean;
36
+ usePreset: boolean;
37
+ [K: string]: any;
38
+ }>;
39
+ operationForm: FormOperationalConfig[];
36
40
  checkboxConfig: Partial<VxeTableProps['checkboxConfig'] & {
37
41
  slots: VxeColumnPropTypes.Slots;
38
42
  maxCheckSize: number;
39
43
  disableHeader: boolean;
40
44
  useNCheckbox: boolean;
41
45
  }>;
46
+ rowConfig: Partial<VxeTableProps['rowConfig'] & {
47
+ clickToCancel: boolean;
48
+ }>;
42
49
  keyboardConfig: Partial<VxeTableProps['keyboardConfig'] & {
43
50
  forceArrowKey: boolean;
44
51
  }>;
45
52
  radioConfig: Partial<VxeTableProps['radioConfig'] & {
46
53
  slots: VxeColumnPropTypes.Slots;
47
54
  }>;
48
- sortableConfig: Partial<{
49
- enable: boolean;
50
- usePreset: boolean;
51
- [K: string]: any;
52
- }>;
53
- operationForm: FormOperationalConfig[];
54
55
  [K: string]: unknown;
55
56
  }>;
56
57
  export declare type IhoTableFieldItem = {
@@ -1 +1 @@
1
- var e="@cnhis-design-vue/shared",i="3.1.52-beta.25",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.1.52-beta.25",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};
1
+ var e="@cnhis-design-vue/shared",i="3.1.52-beta.26",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.1.52-beta.26",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.1.52-beta.25",
3
+ "version": "3.1.52-beta.26",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -63,5 +63,5 @@
63
63
  "iOS 7",
64
64
  "last 3 iOS versions"
65
65
  ],
66
- "gitHead": "797cf8ce7aad638da66331e83aade708db8ef6ea"
66
+ "gitHead": "71ab0ea17710482a859891abf5cf9a757cb62eec"
67
67
  }