cnhis-design-vue 3.1.52-release.2 → 3.1.52-release.4
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/button-print/src/utils/print.d.ts +3 -3
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +45 -41
- package/es/components/classification/index.d.ts +0 -2
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +0 -2
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +0 -2
- package/es/components/classification/src/index.vue.d.ts +0 -2
- package/es/components/expand-field/src/components/form.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/useGrid.js +1 -1
- package/es/components/fabric-chart/src/hooks/useScaleColumn.js +1 -1
- package/es/components/fabric-chart/src/interface.d.ts +2 -2
- package/es/components/form-config/src/FormConfig.vue.d.ts +74 -74
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +37 -37
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +37 -37
- package/es/components/form-render/index.d.ts +37 -37
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +37 -37
- package/es/components/form-render/src/components/renderer/date.d.ts +16 -0
- package/es/components/form-render/src/components/renderer/date.js +1 -1
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +7 -0
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +1 -1
- package/es/components/form-render/src/types/fieldItem.js +1 -1
- package/es/components/form-render/src/types/index.js +1 -1
- package/es/components/iho-table/index.d.ts +8 -4
- package/es/components/iho-table/index.js +1 -1
- package/es/components/iho-table/src/IhoTable.vue.d.ts +8 -4
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +3 -1
- package/es/components/iho-table/src/plugins/copyPastePlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/copyPastePlugin.js +1 -0
- package/es/components/iho-table/src/plugins/forceArrowKeyPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/forceArrowKeyPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +2 -7
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +16 -12
- package/es/components/iho-table/src/utils/index.d.ts +2 -0
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/src/InfoHeader.vue.d.ts +75 -75
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +38 -38
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +37 -37
- package/es/components/keyboard/src/Keyboard.vue2.js +1 -1
- package/es/components/quick-search/src/index.vue2.js +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/src/ShortcutSetter.vue.d.ts +37 -37
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +0 -3
- package/es/components/table-filter/index.d.ts +2 -0
- package/es/components/table-filter/index.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +0 -2
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +0 -1
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +0 -1
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +0 -2
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +0 -2
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +1 -1
- package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
- 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,computed as l,inject as t,useAttrs as
|
|
1
|
+
import{defineComponent as e,computed as l,inject as t,useAttrs as a,ref as o,createVNode as u,mergeProps as n,toRaw as r,nextTick as s,createTextVNode as i}from"vue";import{arrayed as p}from"../../../../../shared/utils/index.js";import{HelpCircleSharp as m}from"@vicons/ionicons5";import{promiseTimeout as c}from"@vueuse/shared";import{cloneDeep as d,isArray as v,isString as f,isObject as y,omit as h,xor as g}from"lodash-es";import{useCommonInjection as S,useSelectOptionProps as b}from"../../hooks/useCommonInjection.js";import{useComplexOptions as j,useComplexOptionsSpan as C}from"../../hooks/useComplexOptions.js";import{InjectionChangeContextCollector as w,InjectionFormUUID as k}from"../../constants/index.js";import"../../../index.js";import"@formily/core";import"@formily/path";import"@vue/shared";import"@vueuse/core";import{NSelect as B,NTooltip as F,NIcon as x,NTag as A,NButton as O}from"naive-ui";import"date-fns";import{assignUpdateValue as H,assignClearBindVisited as P,createVisitedSetter as R}from"../../utils/schema.js";import{useFormField as V}from"../../hooks/useFormField.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"../../hooks/useFormValidator.js";import{connect as K,mapProps as L}from"@formily/vue";import"./index.js";import{useUrlConfigOptions as E,useAutographOptions as _,useRecommendOptions as I,searchContentMatcher as N}from"../../hooks/useFormRenderOptions.js";const q=K(e({name:"FormSelect",props:{value:{type:[String,Array,Number]},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},onChange:{},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},showField:{type:String},allowCreate:Boolean,shouldSave:Boolean,allowModify:Boolean,showCustomValue:Boolean,cursorPlacement:{type:String,default:"end"},urlConfig:{type:Object},autograph:{type:String},wordbook:{type:Object},recommend:{type:Boolean,default:!1},commonList:{type:Array},recentList:{type:Array},getRecommendInfo:{type:Function},commonNum:{type:Number,default:10},recentNum:{type:Number,default:10},recommendCache:{type:Boolean,default:!1},useLoading:{type:Boolean,default:!0},multiple:{type:Boolean},deletable:{type:Boolean,default:!0},selectAll:{type:Boolean}},emits:["update:value","postRecommend"],setup(e,{slots:H,emit:P}){const K=l({get:()=>e.value,async set(e){P("update:value",e),Y(e)}}),L=l((()=>(e.multiple&&e.allowModify&&console.warn("多选模式下不支持allowModify"),!e.multiple&&e.allowModify))),{labelKey:q,valueKey:M,showKey:z,fetchData:W,searchContent:U,fullOptions:D,filterOptions:T,remoteOptions:$,loading:G}=e.urlConfig?E(e,K):_(e,K),{renderComplexOption:J,hasComplexOption:Q}=j(e,K),{getRecommend:X,postRecommend:Y,sortedOptions:Z}=I(e,T,P,q,M),{field:ee,fieldKey:le}=V();t(w).setContext(le.value,(e=>({currentOption:d(function(e){const l=pe(D.value);return v(e)?function(e){const t=l.reduce(((e,l)=>(e[l[M.value]]=l,e)),{});return e.map((e=>t[e]))}(e):(t=e,l.find((e=>e[M.value]===t)));var t}(e))})));const te=async(e="")=>(U.value=e,Promise.allSettled([W(e),X(e)])),{injectValueValidate:ae,injectValueWatchFromEmpty:oe,injectValueBindKey:ue}=S();oe(K,te),ae(K);const ne=ue(K),{menuProps:re,nodeProps:se}=b();function ie(e){const l=e[q.value];if(!l||!f(l))return"";const t=U.value?N(U.value,l):null,a=t?u("section",null,[t.map(((e,l)=>0!==l&&e?u("span",{style:{color:l%2==0?"var(--n-option-text-color-active)":""}},[e]):null))]):l;return e.desc?u("section",{style:{display:"flex",alignItems:"center",gap:"4px"}},[a,e.desc?u(F,null,{trigger:()=>u(x,{component:m},null),default:()=>e.desc}):null]):a}function pe(l){return e.allowCreate&&U.value&&!l.some((e=>e[q.value]===U.value))?[...l,{[q.value]:U.value,[M.value]:U.value,created:!0,shouldSave:e.shouldSave}]:l}const me=l((()=>pe(L.value?D.value:Z.value))),ce=a(),de=l((()=>{if(e.allowCreate||e.showCustomValue)return K.value;const l=e.multiple&&v(K.value);return D.value.find((e=>l?K.value.includes(e[M.value]):e[M.value]===K.value))?K.value:null})),ve=o(!1);async function fe(e){e&&await te(),ve.value=e}let ye=null;async function he(l,t){K.value=l,ye&&y(t)&&L.value&&(ye.focus(),await s(),ye.value=t[q.value]||"",ye.dispatchEvent(new CustomEvent("input")),"start"===e.cursorPlacement&&ye.setSelectionRange(0,0)),$.value&&t&&p(t).forEach((e=>{if(!y(e))return;const l=e;l.created&&l.shouldSave&&$.value.push(h(r(l),["created","shouldSave"]))}))}const ge=t(k),{getSpan:Se}=C(),be=R(ee,(async l=>{var t,a,o;L.value&&(ye=l.target,ye&&K.value&&(await s(),ye.value=null!=(o=null!=(a=null==(t=D.value.find((e=>e[M.value]===K.value)))?void 0:t[q.value])?a:K.value)?o:"",ye.dispatchEvent(new CustomEvent("input")),"start"===e.cursorPlacement&&(await c(0),ye.setSelectionRange(0,0))))}));function je(e){if(!L.value)return;if(ye=e.target,!ye)return;if(!ye.value)return K.value=null;const l=D.value.find((e=>e[q.value]===ye.value));l?K.value=l[M.value]:(U.value=ye.value,K.value=ye.value)}const Ce=o("");function we({option:l,handleClose:t}){var a;const o=null!=(a=z.value&&l[z.value])?a:l[q.value];return e.multiple?(Ce.value="",e.deletable?u(A,{closable:!0,onClose:e=>{e.stopPropagation(),t()}},{default:()=>u("span",{title:o},[o])}):`${o} ;`):(Ce.value=o,o)}function ke(l){if(!e.multiple)return;const t=l?me.value.map((e=>e[M.value])):[];g(t,e.value).length&&(K.value=t)}function Be(){return[u(O,{quaternary:!0,type:"primary",size:"tiny",onClick:()=>ke(!0)},{default:()=>[i("全选")]}),u(O,{quaternary:!0,type:"primary",size:"tiny",onClick:()=>ke(!1)},{default:()=>[i("清空")]})]}function Fe(l){let t=H;return e.multiple&&e.selectAll&&(t={action:Be,...H}),u(B,n({title:Ce.value,key:ne.value,multiple:e.multiple,remote:!0,filterable:!0,loading:G.value,value:de.value,onUpdateValue:he,"menu-props":re,"node-props":se,labelField:q.value,valueField:M.value,options:me.value,onSearch:te,show:ve.value,"onUpdate:show":fe,onFocus:be,onBlur:je,renderLabel:ie,renderTag:we},l,ce),t)}return()=>{var e,l;if(!Q.value)return Fe();const t=null!=(l=null==(e=ee.value.decoratorProps)?void 0:e.span)?l:6,a=Se(ge,ee.value.address);return u("section",{class:"form-render__selectChildField",style:{"--column":a+t}},[Fe({class:"form-render__selectChildFieldItem",style:{"--form-item-column":t}}),D.value.map((e=>J({option:e,value:K.value,valueKey:M.value,labelKey:q.value,childFieldStrategy:"checked",renderLabel:!1,attrs:{class:"form-render__selectChildFieldItem",style:{"--form-item-column":a}}})))])}}}),L({dataSource:"options"},H,P));export{q as SELECT};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as
|
|
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};
|
|
@@ -2,7 +2,6 @@ import { AnyObject, ArrayAble, BindEventSettingItem } from '../../../../../es/sh
|
|
|
2
2
|
import { SchemaEffectTypes, SchemaTypes } from '@formily/vue';
|
|
3
3
|
import { CSSProperties, VNode } from 'vue';
|
|
4
4
|
import { DependKeyType, FormCommonState, FormRequestType } from '../../../../../es/components/form-render';
|
|
5
|
-
export * from '@formily/core';
|
|
6
5
|
declare type FieldBusinessType = 'password' | 'id_card' | 'age' | 'age_unit' | 'mobile' | 'telephone' | 'email' | 'sex' | 'birthday' | 'bank_card' | 'website' | 'gestational_weeks' | 'gestational_stage' | 'customer_name';
|
|
7
6
|
declare type HtmlType = 'INPUT' | 'TEXTAREA' | 'SELECT' | 'LINEBAR' | 'LINE_BREAKS' | 'INPUT_NUMBER' | 'REMOTE_SEARCH' | 'DATE' | 'LEVEL_SEARCH_CASCADER' | 'SEARCH_CASCADER' | 'COMBINATION' | 'RADIO' | 'CHECKBOX' | 'SWITCH' | 'SLIDER' | 'COMPLEX' | 'SEARCH' | 'PHONE_TYPE' | 'IDCARD_TYPE' | 'SEARCH_MORE' | 'DIGITAL' | 'CHECKBOX_BLOCK' | 'RADIO_BLOCK' | 'DATE-INPUT' | 'DATETIME-INPUT' | 'SWITCH_COMPONENT' | 'SLIDER_COMPONENT' | 'LEVEL_SEARCH_CASCADE' | 'SEARCH_CASCADE' | ({} & string);
|
|
8
7
|
declare type ValidateType = 'mobile' | 'integer' | 'number' | 'id_card' | 'regular' | string;
|
|
@@ -181,3 +180,4 @@ export declare type FieldItem = {
|
|
|
181
180
|
reactions: ArrayAble<ReactionType>;
|
|
182
181
|
[key: string]: any;
|
|
183
182
|
}>;
|
|
183
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1880,6 +1880,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1880
1880
|
$table: import("vxe-table").VxeTableConstructor & import("vxe-table").VxeTablePrivateMethods;
|
|
1881
1881
|
$grid: import("vxe-table").VxeGridConstructor | null | undefined;
|
|
1882
1882
|
}) => boolean) | undefined;
|
|
1883
|
+
forceArrowKey?: boolean | undefined;
|
|
1883
1884
|
} | undefined;
|
|
1884
1885
|
clipConfig?: {
|
|
1885
1886
|
isCopy?: boolean | undefined;
|
|
@@ -2121,10 +2122,11 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2121
2122
|
isTree?: import("../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
2122
2123
|
isBatchSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2123
2124
|
isSingleSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2124
|
-
|
|
2125
|
+
selectType?: "checkbox" | "radio" | null | undefined;
|
|
2126
|
+
rowDraggable?: boolean | undefined;
|
|
2125
2127
|
showSeq?: boolean | undefined;
|
|
2126
2128
|
forceClearable?: boolean | undefined;
|
|
2127
|
-
|
|
2129
|
+
hideSettingBtn?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2128
2130
|
rowGroupSetting?: {
|
|
2129
2131
|
firstRowGroup?: {
|
|
2130
2132
|
groupName?: string | undefined;
|
|
@@ -4381,6 +4383,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4381
4383
|
$table: import("vxe-table").VxeTableConstructor & import("vxe-table").VxeTablePrivateMethods;
|
|
4382
4384
|
$grid: import("vxe-table").VxeGridConstructor | null | undefined;
|
|
4383
4385
|
}) => boolean) | undefined;
|
|
4386
|
+
forceArrowKey?: boolean | undefined;
|
|
4384
4387
|
} | undefined;
|
|
4385
4388
|
clipConfig?: {
|
|
4386
4389
|
isCopy?: boolean | undefined;
|
|
@@ -4562,10 +4565,11 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4562
4565
|
isTree?: import("../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
4563
4566
|
isBatchSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4564
4567
|
isSingleSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4565
|
-
|
|
4568
|
+
selectType?: "checkbox" | "radio" | null | undefined;
|
|
4569
|
+
rowDraggable?: boolean | undefined;
|
|
4566
4570
|
showSeq?: boolean | undefined;
|
|
4567
4571
|
forceClearable?: boolean | undefined;
|
|
4568
|
-
|
|
4572
|
+
hideSettingBtn?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4569
4573
|
rowGroupSetting?: {
|
|
4570
4574
|
firstRowGroup?: {
|
|
4571
4575
|
groupName?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{COMPONENT_NAMESPACE as s}from"../../shared/global/variable.js";import{safeComponentRegister as o}from"../../shared/utils/index.js";import{once as t}from"lodash-es";import a from"./src/IhoTable.vue.js";import e from"./src/plugins/index.js";import"vue";import"./src/constants/index.js";import"@vueuse/shared";import"./src/utils/separateMap.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";export{AbstractConfigHooks,AbstractDataHooks,AbstractDomInsertHooks,AbstractEventHooks,AbstractExposeHooks,AbstractFieldHooks,AbstractSetupHooks}from"./src/types/pluginType.js";import{useTablePlugin as r}from"./src/hooks/useTablePlugin.js";export{defineTablePlugin,useTablePlugin}from"./src/hooks/useTablePlugin.js";export{useColumnConfigAdaptor}from"./src/hooks/useColumnConfigAdaptor.js";const{use:l}=r(),i=t((s=>{l(Object.values(e).map((s=>s())),s)})),p=a;p.install=function(t){o(t,p,s+"IhoTable")};export{p as default,i as useIhoTablePresetPlugins};
|
|
1
|
+
import{COMPONENT_NAMESPACE as s}from"../../shared/global/variable.js";import{safeComponentRegister as o}from"../../shared/utils/index.js";import{once as t}from"lodash-es";import a from"./src/IhoTable.vue.js";import e from"./src/plugins/index.js";import"vue";import"./src/constants/index.js";import"@vueuse/shared";import"date-fns";import"./src/utils/separateMap.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";export{AbstractConfigHooks,AbstractDataHooks,AbstractDomInsertHooks,AbstractEventHooks,AbstractExposeHooks,AbstractFieldHooks,AbstractSetupHooks}from"./src/types/pluginType.js";import{useTablePlugin as r}from"./src/hooks/useTablePlugin.js";export{defineTablePlugin,useTablePlugin}from"./src/hooks/useTablePlugin.js";export{useColumnConfigAdaptor}from"./src/hooks/useColumnConfigAdaptor.js";const{use:l}=r(),i=t((s=>{l(Object.values(e).map((s=>s())),s)})),p=a;p.install=function(t){o(t,p,s+"IhoTable")};export{p as default,i as useIhoTablePresetPlugins};
|
|
@@ -1880,6 +1880,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1880
1880
|
$table: import("vxe-table").VxeTableConstructor & import("vxe-table").VxeTablePrivateMethods;
|
|
1881
1881
|
$grid: import("vxe-table").VxeGridConstructor | null | undefined;
|
|
1882
1882
|
}) => boolean) | undefined;
|
|
1883
|
+
forceArrowKey?: boolean | undefined;
|
|
1883
1884
|
} | undefined;
|
|
1884
1885
|
clipConfig?: {
|
|
1885
1886
|
isCopy?: boolean | undefined;
|
|
@@ -2121,10 +2122,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2121
2122
|
isTree?: import("../../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
2122
2123
|
isBatchSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2123
2124
|
isSingleSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2124
|
-
|
|
2125
|
+
selectType?: "checkbox" | "radio" | null | undefined;
|
|
2126
|
+
rowDraggable?: boolean | undefined;
|
|
2125
2127
|
showSeq?: boolean | undefined;
|
|
2126
2128
|
forceClearable?: boolean | undefined;
|
|
2127
|
-
|
|
2129
|
+
hideSettingBtn?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2128
2130
|
rowGroupSetting?: {
|
|
2129
2131
|
firstRowGroup?: {
|
|
2130
2132
|
groupName?: string | undefined;
|
|
@@ -4381,6 +4383,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4381
4383
|
$table: import("vxe-table").VxeTableConstructor & import("vxe-table").VxeTablePrivateMethods;
|
|
4382
4384
|
$grid: import("vxe-table").VxeGridConstructor | null | undefined;
|
|
4383
4385
|
}) => boolean) | undefined;
|
|
4386
|
+
forceArrowKey?: boolean | undefined;
|
|
4384
4387
|
} | undefined;
|
|
4385
4388
|
clipConfig?: {
|
|
4386
4389
|
isCopy?: boolean | undefined;
|
|
@@ -4562,10 +4565,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4562
4565
|
isTree?: import("../../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
4563
4566
|
isBatchSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4564
4567
|
isSingleSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4565
|
-
|
|
4568
|
+
selectType?: "checkbox" | "radio" | null | undefined;
|
|
4569
|
+
rowDraggable?: boolean | undefined;
|
|
4566
4570
|
showSeq?: boolean | undefined;
|
|
4567
4571
|
forceClearable?: boolean | undefined;
|
|
4568
|
-
|
|
4572
|
+
hideSettingBtn?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4569
4573
|
rowGroupSetting?: {
|
|
4570
4574
|
firstRowGroup?: {
|
|
4571
4575
|
groupName?: string | undefined;
|
|
@@ -27,7 +27,9 @@ declare class ConfigHooks extends AbstractConfigHooks {
|
|
|
27
27
|
readonly treeConfig: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.TreeConfig | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
28
28
|
readonly mouseConfig: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.MouseConfig | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
29
29
|
readonly menuConfig: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.MenuConfig | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
30
|
-
readonly keyboardConfig: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.KeyboardConfig
|
|
30
|
+
readonly keyboardConfig: SyncWaterfallHook<[(import("vxe-table").VxeTablePropTypes.KeyboardConfig & Partial<import("vxe-table").VxeTablePropTypes.KeyboardConfig & {
|
|
31
|
+
forceArrowKey: boolean;
|
|
32
|
+
}>) | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
31
33
|
readonly scrollY: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.ScrollY | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
32
34
|
readonly scrollX: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.ScrollX | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
33
35
|
readonly editRules: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.EditRules | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function copyPastePlugin(): import("../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{unref as e}from"vue";import"../../index.js";import{useSessionStorage as t}from"@vueuse/core";import{selectOptionsMap as n}from"./rendererPlugins/editableWidgets/hooks/useSelectOption.js";import{isInvalidDate as o,isInvalidTime as l,IhoTableUtils as i}from"../utils/index.js";import{EDITABLE_WIDGET_TYPE as r}from"../constants/index.js";import{isString as u,trim as d,isEmpty as s,isEqual as a,isFunction as f}from"lodash-es";import{defineTablePlugin as p}from"../hooks/useTablePlugin.js";function c(){const c="copyPastePlugin",m=t("ihoTableClipData","");return p({name:c,apply(t){function p(t,p,c,g,E){var C,b;if(!(null==(C=null==c?void 0:c.keyboardConfig)?void 0:C.isClip))return;if("paste"===t&&!p.getSelectedCell())return;const{row:T,column:x}=p.getSelectedCell()||p.getEditRecord()||{};if(!T||!x||!v(x,r.SELECT)&&e(m)===T[x.field])return;const R=c.uuid&&v(x,r.SELECT)&&n.get(c.uuid)[x.field],y=T[x.field];if("copy"===t){const e=(null==(b=(R||[]).filter((e=>y.includes(e.value))))?void 0:b.map((e=>e.label)).join(","))||y;m.value=e}else{if(u(e(m))&&(m.value=d(e(m)||"")),!e(m)||!function(e){var t;const n=null==(t=e.editRender)?void 0:t.props;return n&&Object.keys(r).includes(i.getCellType(n))}(x)||T.$__SEPARATE||!function(e,t,n,o){var l,i;const{beforeEditMethod:r}=t.editConfig||{},u={rowIndex:null!=(l=e.getRowIndex(n))?l:0,columnIndex:null!=(i=e.getColumnIndex(o))?i:0};return!r||f(r)&&r({row:n,column:o,...u,$table:e,$grid:void 0})}(p,c,T,x))return;if(v(x,r.DATE)&&o(x,T,m))return;if(v(x,r.NUMBER)&&!/^-?\d*\.?\d+$/.test((e(m)||"").toString()))return;if(v(x,r.TIME)&&l(x,m))return;let t=e(m)||"";if(R&&!s(R)){const e=R.filter((e=>t.split(",").includes(e.label))).map((e=>e.value));if(s(e))return;if(function(e){var t,n;const o=null==(t=e.editRender)?void 0:t.props;return v(e,r.SELECT)&&(null==(n=o.componentProps)?void 0:n.multiple)}(x)){if(a(y,e))return;t=e}else{if(e.includes(y))return;t=e[0]}}T[x.field]=t,g("formChange",{column:x,row:T,oldValue:y,value:t,index:p.getRowIndex(T)}),v(x,r.SEPARATE)&&(null==E||E())}}function v(e,t){var n;const o=null==(n=e.editRender)?void 0:n.props;return o&&i.getCellType(o)===t}t.eventHooks.onCopy.tap(c,(({$table:e},t,{emits:n})=>p("copy",e,t,n))),t.eventHooks.onPaste.tap(c,(({$table:e},t,{emits:n,updateTableDataRef:o})=>p("paste",e,t,n,o)))}})}export{c as copyPastePlugin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function forceArrowKeyPlugin(): import("../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../../index.js";import{EDITABLE_WIDGET_TYPE as e}from"../constants/index.js";import{promiseTimeout as r}from"@vueuse/shared";import{identity as o}from"lodash-es";import{defineTablePlugin as t}from"../hooks/useTablePlugin.js";function n(){const n="forceArrowKeyPlugin",i=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"];function s({keyboardConfig:e={}}){return e.isArrow&&e.forceArrowKey}return t({name:n,apply(t){t.eventHooks.onKeydown.tap(n,(async({$event:e,$table:o},t)=>{const n=e;if(!s(t)||!i.includes(n.key))return;const d=o.getEditRecord()||{};if(d.row&&d.column){e.preventDefault();const r="ArrowLeft"===n.key,t="ArrowUp"===n.key,i="ArrowRight"===n.key,s="ArrowDown"===n.key;o.moveSelected(d,r,t,i,s,n)}await r(0);const{row:p,column:l}=o.getSelectedCell()||{};p&&l&&await o.setEditCell(p,l)}));const d={[e.NUMBER]:e=>{var r;return e.editRender.props={...e.editRender.props,componentProps:{keyboard:{ArrowUp:!1,ArrowDown:!1},...null==(r=e.editRender.props)?void 0:r.componentProps}},e}};t.fieldHooks.field.tap(n,((e,r,t)=>{var n;if(!s(t))return e;return(d[null==(n=e.editRender)?void 0:n.name]||o)(e)}))}})}export{n as forceArrowKeyPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"./anchorPlugin/index.js";import*as r from"./bindEventSettingPlugin/index.js";import*as i from"./defaultConfigPlugin/index.js";import*as
|
|
1
|
+
import*as e from"./anchorPlugin/index.js";import*as r from"./bindEventSettingPlugin/index.js";import*as i from"./copyPastePlugin.js";import*as n from"./defaultConfigPlugin/index.js";import*as s from"./defaultValuePlugin.js";import*as t from"./filterDaterangeRenderPlugin/index.js";import*as d from"./filterRenderPlugin/index.js";import*as l from"./filterVisibleEventPlugin.js";import*as g from"./forceArrowKeyPlugin.js";import*as u from"./headerPlugin.js";import*as o from"./highLightSetPlugin.js";import*as a from"./keyboardEventPlugin/index.js";import*as P from"./lowCodeFieldAdaptorPlugin/index.js";import*as m from"./maxCheckSizePlugin.js";import*as x from"./operationalFormPlugin/index.js";import*as f from"./rendererPlugins/editableWidgets/dateRendererPlugin/index.js";import*as p from"./rendererPlugins/editableWidgets/inputRendererPlugin.js";import*as j from"./rendererPlugins/editableWidgets/numberRendererPlugin.js";import*as R from"./rendererPlugins/editableWidgets/radioRendererPlugin.js";import*as b from"./rendererPlugins/editableWidgets/selectRendererPlugin/index.js";import*as w from"./rendererPlugins/editableWidgets/separateRendererPlugin/index.js";import*as c from"./rendererPlugins/editableWidgets/timeRendererPlugin/index.js";import*as h from"./rendererPlugins/widgets/checkRendererPlugin.js";import*as W from"./rendererPlugins/widgets/colorRendererPlugin.js";import*as v from"./rendererPlugins/widgets/defaultRendererPlugin.js";import*as k from"./rendererPlugins/widgets/htmlRendererPlugin.js";import*as C from"./rendererPlugins/widgets/labelRendererPlugin.js";import*as S from"./rendererPlugins/widgets/pictureRendererPlugin.js";import*as y from"./rendererPlugins/widgets/seqRendererPlugin.js";import*as E from"./rowClickPlugin/index.js";import*as A from"./rowDragPlugin/index.js";import*as D from"./rowGroupSettingPlugin/index.js";import*as F from"./varialbleHeightPlugin/index.js";import*as V from"./virtualTreePlugin/index.js";import{separateMetaModule as q}from"../../../../shared/utils/index.js";var z=q(Object.assign({"./anchorPlugin/index.tsx":e,"./bindEventSettingPlugin/index.ts":r,"./copyPastePlugin.ts":i,"./defaultConfigPlugin/index.ts":n,"./defaultValuePlugin.ts":s,"./filterDaterangeRenderPlugin/index.tsx":t,"./filterRenderPlugin/index.tsx":d,"./filterVisibleEventPlugin.ts":l,"./forceArrowKeyPlugin.ts":g,"./headerPlugin.tsx":u,"./highLightSetPlugin.tsx":o,"./keyboardEventPlugin/index.ts":a,"./lowCodeFieldAdaptorPlugin/index.tsx":P,"./maxCheckSizePlugin.ts":m,"./operationalFormPlugin/index.ts":x,"./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx":f,"./rendererPlugins/editableWidgets/inputRendererPlugin.tsx":p,"./rendererPlugins/editableWidgets/numberRendererPlugin.tsx":j,"./rendererPlugins/editableWidgets/radioRendererPlugin.tsx":R,"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx":b,"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx":w,"./rendererPlugins/editableWidgets/timeRendererPlugin/index.tsx":c,"./rendererPlugins/widgets/checkRendererPlugin.tsx":h,"./rendererPlugins/widgets/colorRendererPlugin.tsx":W,"./rendererPlugins/widgets/defaultRendererPlugin.tsx":v,"./rendererPlugins/widgets/htmlRendererPlugin.tsx":k,"./rendererPlugins/widgets/labelRendererPlugin.tsx":C,"./rendererPlugins/widgets/pictureRendererPlugin.tsx":S,"./rendererPlugins/widgets/seqRendererPlugin.tsx":y,"./rowClickPlugin/index.ts":E,"./rowDragPlugin/index.ts":A,"./rowGroupSettingPlugin/index.ts":D,"./varialbleHeightPlugin/index.tsx":F,"./virtualTreePlugin/index.ts":V}));export{z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{promiseTimeout as e}from"@vueuse/shared";import"../../../index.js";import{defineTablePlugin as o}from"../../hooks/useTablePlugin.js";function t(){const t="keyboardEventPlugin";return o({name:t,apply(o){o.eventHooks.onKeydown.tap(t,(async({$event:o,$table:t},n,{emits:r})=>{await e(0);const{row:a,column:i}=t.getSelectedCell()||t.getEditRecord()||{};if(!a||!i)return;r("keyboard",{$table:t,key:o.key,index:t.getRowIndex(a),value:a[i.field],row:a,column:i})}))}})}export{t as keyboardEventPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createVNode as e,mergeProps as
|
|
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};
|
|
@@ -141,9 +141,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
141
141
|
valueField: string;
|
|
142
142
|
placeholder: string;
|
|
143
143
|
deletable: boolean;
|
|
144
|
+
selectAll: boolean;
|
|
144
145
|
shouldSave: boolean;
|
|
145
146
|
consistentMenuWidth: boolean;
|
|
146
147
|
allowCreate: boolean;
|
|
147
|
-
selectAll: boolean;
|
|
148
148
|
}>;
|
|
149
149
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,inject as l,ref as t,computed as o,onBeforeUnmount as n,watch as a,nextTick as u,createVNode as i,toRaw as r,Fragment as d,createTextVNode as s}from"vue";import{keywordMatcher as c,arrayed as p}from"../../../../../../../shared/utils/index.js";import{NSelect as v,NTooltip as f,NIcon as m,NTag as y,NButton as h}from"naive-ui";import{HelpCircleSharp as b}from"@vicons/ionicons5";import{InjectionIhoTableUUID as w}from"../../../../constants/index.js";import{getSelectOptions as F,selectOptionsMap as g}from"../hooks/useSelectOption.js";import{useIhoTableFormEvent as S}from"../../../../utils/index.js";import{useDebounceFn as q}from"@vueuse/core";import{isEmpty as O,isFunction as $,isArray as x,isObject as C,omit as B,cloneDeep as _}from"lodash-es";var
|
|
1
|
+
import{defineComponent as e,inject as l,ref as t,computed as o,onBeforeUnmount as n,watch as a,nextTick as u,createVNode as i,toRaw as r,Fragment as d,createTextVNode as s}from"vue";import{keywordMatcher as c,arrayed as p}from"../../../../../../../shared/utils/index.js";import{NSelect as v,NTooltip as f,NIcon as m,NTag as y,NButton as h}from"naive-ui";import{HelpCircleSharp as b}from"@vicons/ionicons5";import{InjectionIhoTableUUID as w}from"../../../../constants/index.js";import{getSelectOptions as F,selectOptionsMap as g}from"../hooks/useSelectOption.js";import{useIhoTableFormEvent as S}from"../../../../utils/index.js";import{useDebounceFn as q}from"@vueuse/core";import{isEmpty as O,isFunction as $,isArray as x,isObject as C,omit as B,cloneDeep as _,xor as j,uniq as k}from"lodash-es";var P=e({name:"EditSelect",props:{value:{type:[Array,String,Number]},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0},options:{type:Array,default:()=>[]},queryOptions:{type:Function},placeholder:{type:String,default:"请选择"},allowCreate:{type:Boolean,default:!1},shouldSave:{type:Boolean,default:!1},consistentMenuWidth:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},aliasField:{type:String},menuProps:{type:Object},multiple:{type:Boolean,default:!1},deletable:{type:Boolean,default:!0},selectAll:{type:Boolean,default:!0}},emits:["update:value"],setup(e,{emit:P}){const M=l("$xetable"),W=t(null);function A(e){W.value=e}const D=t(!1),{emitFormChangeWithParams:E}=S({...e,$table:M}),R=t("");function T(){return z()}const I=t([]),U=o((()=>{let l=O(I.value)?e.options:I.value;return R.value?(l=l.filter((l=>l[e.labelField]&&l[e.labelField].includes(R.value)||c(R.value,l.keyword))),!e.allowCreate||l.some((l=>l[e.labelField]===R.value))?l:[...l,{[e.labelField]:R.value,[e.valueField]:R.value,created:!0,shouldSave:e.shouldSave}]):l})),V=t(!1),z=q((async function(l=""){R.value=l;try{if(V.value=!0,!$(e.queryOptions)||!O(e.options))return;I.value=await e.queryOptions({keyword:l,row:e.row,column:e.column,rowIndex:e.rowIndex})}catch(l){console.log(`获取${e.column.field}options错误`)}finally{V.value=!1}}),400),K=l(w);function N(l=!1){e.multiple&&u((()=>{var t,o,n;const{refTableLeftBody:a,refTableBody:u}=M.getRefMaps(),i=null==(t=null==a?void 0:a.value)?void 0:t.$el;if(!i)return;const r=null==(o=null==u?void 0:u.value)?void 0:o.$el,d=M.getRowid(e.row),s=null==(n=r.querySelector(`.vxe-body--row[rowid="${d}"]`))?void 0:n.clientHeight,c=i.querySelector(`.vxe-body--row[rowid="${d}"]`),p=l?"unset":s+"px";c.style.height=p}))}function H(l,t){var o,n;const a=e.value;P("update:value",l);const u=F(K,e.column.field,e.row,M);K&&x(u)&&p(t).forEach((e=>{if(!C(e))return;const l=e;l.created&&l.shouldSave&&u.push(B(r(l),["created","shouldSave"]))}));const i=null==(o=e.column.editRender)?void 0:o.props;if(K&&(null==i?void 0:i.connectField)){const t=null==(n=i.connectField)?void 0:n.split(","),o=g.get(K);t.forEach((async t=>{var n;const{tableColumn:a}=M.reactData,u=a.find((e=>e.field===t)),i=null==(n=null==u?void 0:u.editRender)?void 0:n.props;if(null==i?void 0:i.queryOptions){const n=l?`${t}__${e.column.field}-${l}`:t;if(o[n])return;const a=await i.queryOptions({row:e.row,column:u,isFullData:!0,connectColumn:e.column});o[n]=a}}))}E({oldValue:a,option:_(t)}),N()}function L(e){var l,t;"Tab"===e.key&&W.value&&(null==(t=(l=W.value).handleKeydown)||t.call(l,{...e,key:"Enter",preventDefault:e.preventDefault.bind(e)}))}function G(l){const t=l?U.value.map((l=>l[e.valueField])):[],o=x(e.value)?e.value:[],n=j(t,o),a=l?k(o.concat(n)):[];if(o.length===a.length)return;P("update:value",a);const u=F(K,e.column.field,e.row,M);E({oldValue:o,option:l?u.filter((l=>a.includes(l[e.valueField]))):[]})}function J({node:e,option:l}){return l.desc?i("div",{class:"iho-table__selectOptionWrapper"},[[e,i(f,null,{trigger:()=>i(m,{component:b},null),default:()=>l.desc})]]):e}function Q({option:l,handleClose:t}){var o;const n=null!=(o=e.aliasField&&l[e.aliasField])?o:l[e.labelField];return x(e.value)?e.deletable?i(y,{closable:!0,onClose:e=>{e.stopPropagation(),t()}},{default:()=>n}):`${n} ;`:i(d,null,[n])}function X(){return i(d,null,[i(h,{quaternary:!0,type:"primary",size:"tiny",onClick:()=>G(!0)},{default:()=>[s("全选")]}),i(h,{quaternary:!0,type:"primary",size:"tiny",onClick:()=>G(!1)},{default:()=>[s("清空")]})])}n((()=>{N(!0)})),a((()=>D.value),(e=>{N()}),{immediate:!0});const Y=()=>({class:"iho-table__selectOption"}),Z=o((()=>{var l,t;return{...e.menuProps,class:`iho-table__selectMenu ${null!=(t=null==(l=e.menuProps)?void 0:l.class)?t:""}`}}));return()=>{const l={};return e.multiple&&e.selectAll&&(l.action=X),i(v,{ref:A,show:D.value,"onUpdate:show":e=>D.value=e,consistentMenuWidth:e.consistentMenuWidth,placeholder:e.placeholder,labelField:e.labelField,valueField:e.valueField,loading:V.value,options:U.value,multiple:e.multiple,value:e.value,remote:!0,onSearch:z,clearable:!0,filterable:!0,nodeProps:Y,menuProps:Z.value,renderTag:Q,renderOption:J,onUpdateShow:T,onUpdateValue:H,onKeydown:L},l)}}});export{P as default};
|
|
@@ -4,7 +4,6 @@ import { AnyObject } from '../../../../../../../../es/shared/types';
|
|
|
4
4
|
declare const _default: import("vue").DefineComponent<{
|
|
5
5
|
formattedValue: {
|
|
6
6
|
type: StringConstructor;
|
|
7
|
-
default: undefined;
|
|
8
7
|
};
|
|
9
8
|
column: {
|
|
10
9
|
type: PropType<VxeTableDefines.ColumnInfo>;
|
|
@@ -23,7 +22,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
23
22
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
24
23
|
formattedValue: {
|
|
25
24
|
type: StringConstructor;
|
|
26
|
-
default: undefined;
|
|
27
25
|
};
|
|
28
26
|
column: {
|
|
29
27
|
type: PropType<VxeTableDefines.ColumnInfo>;
|
|
@@ -49,7 +47,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
49
47
|
timePickerRef: import("vue").Ref<any>;
|
|
50
48
|
inputValue: import("vue").Ref<any>;
|
|
51
49
|
__formattedValue: import("vue").Ref<any>;
|
|
52
|
-
oldValue:
|
|
50
|
+
oldValue: any;
|
|
53
51
|
placeholder: any;
|
|
54
52
|
valueFormat: any;
|
|
55
53
|
shortcutOptions: any;
|
|
@@ -76,7 +74,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
76
74
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "update:formattedValue")[], "click" | "update:formattedValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
77
75
|
formattedValue: {
|
|
78
76
|
type: StringConstructor;
|
|
79
|
-
default: undefined;
|
|
80
77
|
};
|
|
81
78
|
column: {
|
|
82
79
|
type: PropType<VxeTableDefines.ColumnInfo>;
|
|
@@ -93,7 +90,5 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
93
90
|
}>> & {
|
|
94
91
|
onClick?: ((...args: any[]) => any) | undefined;
|
|
95
92
|
"onUpdate:formattedValue"?: ((...args: any[]) => any) | undefined;
|
|
96
|
-
}, {
|
|
97
|
-
formattedValue: string;
|
|
98
|
-
}>;
|
|
93
|
+
}, {}>;
|
|
99
94
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as l,inject as t,ref as a,watch as r,nextTick as o,openBlock as u,createBlock as i,unref as n,
|
|
1
|
+
import{defineComponent as e,useAttrs as l,inject as t,ref as a,watch as r,nextTick as o,openBlock as u,createBlock as i,unref as n,withCtx as m,createVNode as c,mergeProps as v,createElementBlock as d,Fragment as f,renderList as s,createTextVNode as p,toDisplayString as k,createCommentVNode as y}from"vue";import{NPopover as _,NInput as h,NSpace as w,NScrollbar as b,NButton as g}from"naive-ui";import{useIhoTableFormEvent as V}from"../../../../utils/index.js";import C from"../../../../../../time-picker/index.js";import{parse as F,isValid as q,format as x}from"date-fns";var j=e({__name:"editTime",props:{formattedValue:{type:String},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0}},emits:["update:formattedValue","click"],setup(e,{emit:j}){const $=e,I=l(),O=t("$xetable"),{emitFormChangeWithParams:P}=V({...$,$table:O}),R=a(null),S=a(!1),A=a(),E=a(),H=a();let U=$.formattedValue;const{placeholder:z="请选择",valueFormat:D="HH:mm",shortcutOptions:K=[]}=I,M={placeholder:z,valueFormat:D,format:D};function N(e){if(H.value=e,U===e)return;const l=e||null;j("update:formattedValue",l),P({oldValue:U}),U=l}function T(){[M.valueFormat.replace(/:/,""),M.valueFormat].some((e=>{const l=F(E.value,e,new Date);if(!E.value||q(l)){return N(E.value?x(l,M.valueFormat):""),!0}return!1}))}function W(e){var l;const{key:t}=e;"Enter"===t&&(null==(l=R.value)||l.blur(),S.value=!1)}return r((()=>$.formattedValue),(e=>{E.value=e,H.value=e}),{immediate:!0}),r((()=>S.value),(async e=>{var l,t,a,r,u;e&&(await o(),null==(u=null==(r=null==(a=null==(t=null==(l=A.value)?void 0:l.$timePicker)?void 0:t.panelInstRef)?void 0:a.$el)?void 0:r.querySelectorAll(".n-time-picker-col"))||u.forEach((e=>{var l,t;return null==(t=null==(l=null==e?void 0:e.querySelector)?void 0:l.call(e,".n-time-picker-col__item--active"))?void 0:t.scrollIntoView()})))})),(e,l)=>(u(),i(n(_),{show:S.value,trigger:"click",showArrow:!1,placement:"bottom-start",style:{padding:"0"},onClickoutside:l[3]||(l[3]=()=>S.value=!1)},{trigger:m((()=>[c(n(h),{ref_key:"formRef",ref:R,clearable:"",value:E.value,"onUpdate:value":l[0]||(l[0]=e=>E.value=e),valueModifiers:{trim:!0},onClick:l[1]||(l[1]=()=>S.value=!0),onChange:T,onKeydown:W},null,8,["value"])])),default:m((()=>[c(n(w),null,{default:m((()=>[c(n(C),v({ref_key:"timePickerRef",ref:A,show:"","formatted-value":H.value},n(M),{class:"iho-table__time-picker",to:!1,"onUpdate:formattedValue":N,onConfirm:l[2]||(l[2]=()=>S.value=!1)}),null,16,["formatted-value"]),c(n(b),{class:"iho-table__scrollbar"},{default:m((()=>[n(K).length?(u(),i(n(w),{key:0,vertical:"",wrap:!1},{default:m((()=>[(u(!0),d(f,null,s(n(K),(e=>(u(),i(n(g),{size:"tiny",key:e,onClick:l=>function(e){N(e),S.value=!1}(e)},{default:m((()=>[p(k(e),1)])),_:2},1032,["onClick"])))),128))])),_:1})):y("v-if",!0)])),_:1})])),_:1})])),_:1},8,["show"]))}});export{j as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createVNode as e,mergeProps as o}from"vue";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as
|
|
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,36 +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
|
-
|
|
21
|
+
selectType: Exclude<VxeTableDefines.ColumnInfo['type'], 'seq' | 'expand' | 'html'>;
|
|
22
|
+
rowDraggable: boolean;
|
|
22
23
|
showSeq: boolean;
|
|
23
24
|
forceClearable: boolean;
|
|
24
|
-
|
|
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
|
+
}>;
|
|
49
|
+
keyboardConfig: Partial<VxeTableProps['keyboardConfig'] & {
|
|
50
|
+
forceArrowKey: boolean;
|
|
51
|
+
}>;
|
|
42
52
|
radioConfig: Partial<VxeTableProps['radioConfig'] & {
|
|
43
53
|
slots: VxeColumnPropTypes.Slots;
|
|
44
54
|
}>;
|
|
45
|
-
sortableConfig: Partial<{
|
|
46
|
-
enable: boolean;
|
|
47
|
-
usePreset: boolean;
|
|
48
|
-
[K: string]: any;
|
|
49
|
-
}>;
|
|
50
|
-
operationForm: FormOperationalConfig[];
|
|
51
55
|
[K: string]: unknown;
|
|
52
56
|
}>;
|
|
53
57
|
export declare type IhoTableFieldItem = {
|
|
@@ -95,7 +99,7 @@ export declare namespace IhoTableLowCodeField {
|
|
|
95
99
|
}
|
|
96
100
|
export declare type LowCodeTableFieldItem = {
|
|
97
101
|
columnName: string;
|
|
98
|
-
[K: string]:
|
|
102
|
+
[K: string]: any;
|
|
99
103
|
} & Partial<{
|
|
100
104
|
id: number | string;
|
|
101
105
|
alias: string;
|
|
@@ -55,3 +55,5 @@ export declare function parseRichContent(richContent: string): any;
|
|
|
55
55
|
export declare function parseMergeField(row: AnyObject, column: VxeTableDefines.ColumnInfo): any;
|
|
56
56
|
export declare function isCompatibleColumn(field: LowCodeTableFieldItem): number | false;
|
|
57
57
|
export declare function getTitle(column: VxeTableDefines.ColumnInfo, value?: string): string;
|
|
58
|
+
export declare function isInvalidTime(column: VxeTableDefines.ColumnInfo, newValue: MaybeRef<any>): boolean;
|
|
59
|
+
export declare function isInvalidDate(column: VxeTableDefines.ColumnInfo, row: AnyObject, newValue: MaybeRef<any>): any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{reactive as e,inject as
|
|
1
|
+
import{reactive as e,inject as n,unref as t,toRaw as r,createVNode as o}from"vue";import{jsonParse as i,arrayed as l,findAncestor as u}from"../../../../shared/utils/index.js";import{promiseTimeout as a}from"@vueuse/shared";import{parse as c,isValid as d,compareDesc as s}from"date-fns";import{isNumber as f,isFunction as p,isString as m,isObject as v,isArray as I}from"lodash-es";import{InjectionIhoTableConfig as g,InjectionIhoTableEmits as h,IHO_TABLE_STRING_STATUS as E,IHO_TABLE_NUMBER_STATUS as w,IHO_TABLE_TREE_TYPE as T,InjectionIhoTableUUID as R}from"../constants/index.js";import{getSeparateInfo as S}from"./separateMap.js";export{deleteSeparateInfo,getSeparateInfo,setSeparateInfo}from"./separateMap.js";function C(e){return console.warn(`[IhoTable]: ${e}`)}const F=Object.freeze({getCellType(e){var n;return((null==(n=e.settingObj)?void 0:n.attr)||e.formType||"DEFAULT").toUpperCase()}});function D(){var e,t,r;const o=n(g);return o||C("this function(getRowHeight) only can be used in setup environment"),null!=(r=null==(t=null==(e=null==o?void 0:o.value)?void 0:e.rowConfig)?void 0:t.height)?r:32}function O(e){const n=e.slice(2);return`${n[0].toLowerCase()}${n.slice(1)}`}function P(e){return`on${e[0].toUpperCase()}${e.slice(1)}`}function A(n,t=!0){const r=t?e(new Map):new Map;return{getItemFromUUID:function(e){return r.set(e,r.get(e)||n()).get(e)},setItemFromUUID:function(e,n){r.set(e,n)},removeItemFromUUID:function(e){r.delete(e)}}}async function $(e,n,r,o){const i=l();return f(i)||await a(0),l()||function(){const n=+e.colWidth;return f(n)?n:64}();function l(){var i;const l=null==(i=t(o))?void 0:i.getColumnByField(e.field);if(!l)return;const u=x(l);return u?p(u.separateWidth)?u.separateWidth({column:l,row:n,rowIndex:r,$table:t(o)}):f(u.separateWidth)?u.separateWidth:l.renderWidth:l.renderWidth}}function b(e){const o=n(h);function i(){var n;const r=t(e);return{$table:r.$table,value:r.row[r.column.field],row:r.row,column:{...r.column,...null==(n=r.column.editRender)?void 0:n.props},index:r.rowIndex>-1?r.rowIndex:r.$rowIndex}}function l(e={}){o("formChange",{...i(),...r(e)})}function u(e={}){o("formClick",{...i(),...r(e)})}return{emitFormChange:function(){l()},emitFormClick:function(){u()},emitFormChangeWithParams:l,emitFormClickWithParams:u}}function x(e){var n;return null==(n=e.editRender)?void 0:n.props}const N=Object.freeze({createDefaultRenderCell:function(){return function({props:e},{row:t,column:r}){if("bottom"!==(null==e?void 0:e.separatePlacement))return c(t[r.field]);const i=n(R),l=S(i,t);if(!l)return c(t[r.field]);const{originalData:u=t,isLastRow:a}=l;return c(a?u[r.field]:null);function c(e){return[o("span",{title:G(r,e)},[e])]}}},createRenderEdit:function(e){return function({props:n},t){return e({...t,fieldItem:n||{},...b(t)})}},isEditableColumn(e,n){var t;return!1!==(null==(t=e.editConfig)?void 0:t.showIcon)&&n.editRender&&!1!==n.editRender.enabled},hasFilter(e){if(M(e))return!0;let n=e.fieldSetting;return m(n)&&(n=i(n||"")),v(n)&&((t=n).notParticipatingSearch!==E.POSITIVE&&"manual"===(null==(r=t.mapping)?void 0:r.type));var t,r},hasDateFiler(e){var n;return null==(n=null==e?void 0:e.filterSetting)?void 0:n.daterange}}),V=Object.freeze({isPositive:e=>e===w.POSITIVE||e===E.POSITIVE,isNegative:e=>e===w.NEGATIVE||e===E.NEGATIVE,notPositive:e=>e!==w.POSITIVE&&e!==E.POSITIVE,notNegative:e=>e!==w.NEGATIVE&&e!==E.NEGATIVE}),W=(e,n)=>({$event:t,column:r})=>{var o;if(!l(e).includes(null==(o=r.editRender)?void 0:o.name))return!0;const i=null==t?void 0:t.target;return!v(i)||!u(i,n)};function U(e){return[T.TRANSFORM_WITH_SPAN_METHOD,T.TRANSFORM_TREE_TYPE].includes(`${e.isTree}`)}function j(e){return m(e)&&!!e.match(/^###\{[^{}]+}$/)}function y(e){try{return JSON.parse(e.replace(/^###/,""))}catch(e){return{}}}function _(e,n){if(e.$__SEPARATE||!n.editRender||!n.editRender.props)return e[n.field];const{fieldSetting:t}=n.editRender.props;if(!m(t))return e[n.field];const{mergedFeildExpression:r}=i(t);return r&&m(r)?r.replace(/#{(.+?)}/g,(function(n,t){let r=t?e[t.trim()]:null;j(r)&&(r=y(r).change_text);return r||(null==r?"--":r)})):e[n.field]}const H=["SEARCH","SELECT","RADIO","CHECKBOX"];function M(e){return e.notParticipatingSearch===w.NEGATIVE&&H.includes(F.getCellType(e))&&I(e.options)&&e.options.length}function G(e,n=""){return"tooltip"===e.showOverflow?"":n}function L(e,n){var r,o,i;n=t(n)||"";const l=null!=(o=null==(r=e.editRender)?void 0:r.props)?o:{},u=c(n,(null==(i=null==l?void 0:l.componentProps)?void 0:i.valueFormat)||"HH:mm",new Date);return!d(u)}function k(e,n,r){var o,i;const l=null!=(i=null==(o=e.editRender)?void 0:o.props)?i:{};return r=t(r)||"",!d(new Date(r))||m(l.connectField)&&n[l.connectField]&&(l.isStartDate&&s(new Date(r),new Date(n[l.connectField]))<0||l.isEndDate&&s(new Date(r),new Date(n[l.connectField]))>0)}export{N as IhoTableRenderHelper,V as IhoTableStatusHelper,F as IhoTableUtils,C as IhoTableWarn,W as createIhoTableClearActivedInterceptor,O as eventListener2EventName,P as eventName2EventListener,$ as getColumnRenderWidth,x as getLowCodeFieldFromField,D as getRowHeight,G as getTitle,M as isCompatibleColumn,k as isInvalidDate,L as isInvalidTime,j as isRichContent,U as isTransformTreeType,_ as parseMergeField,y as parseRichContent,b as useIhoTableFormEvent,A as useUUIDMap};
|