cnhis-design-vue 3.1.57-release.3 → 3.2.1-beta.1
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/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/calendar/index.d.ts +13 -12
- package/es/components/calendar/src/Calendar.vue.d.ts +13 -12
- package/es/components/calendar/src/Calendar.vue2.js +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +26 -0
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
- package/es/components/classification/src/index.vue.d.ts +3 -3
- package/es/components/drag-scroll/index.d.ts +2 -0
- package/es/components/drag-scroll/index.js +1 -0
- package/es/components/drag-scroll/src/index.d.ts +4 -0
- package/es/components/drag-scroll/src/index.js +1 -0
- package/es/components/drag-scroll/src/types.d.ts +19 -0
- package/es/components/drag-scroll/src/types.js +1 -0
- package/es/components/expand-field/src/components/form.vue2.js +1 -1
- package/es/components/fabric-chart/src/constants/index.d.ts +2 -1
- package/es/components/fabric-chart/src/constants/index.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/interface.d.ts +1 -1
- package/es/components/form-config/index.d.ts +34 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +34 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +14 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +17 -0
- package/es/components/form-render/index.d.ts +14 -0
- package/es/components/form-render/src/FormRender.vue.d.ts +14 -0
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +14 -0
- package/es/components/form-render/src/components/renderer/index.js +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +2 -0
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/components/renderer/simpleComponent.js +1 -1
- package/es/components/form-render/src/components/renderer/time.d.ts +7 -0
- package/es/components/form-render/src/components/renderer/time.js +1 -0
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +6 -4
- package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/types/index.d.ts +1 -0
- package/es/components/form-render/src/utils/business.d.ts +1 -1
- package/es/components/form-render/src/utils/business.js +1 -1
- package/es/components/iho-table/index.d.ts +12 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +12 -0
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -5
- package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +2 -1
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -1
- package/es/components/iho-table/src/plugins/{bindEventSettingPlugin/index.d.ts → bindEventSettingPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/bindEventSettingPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/{defaultConfigPlugin/index.d.ts → defaultConfigPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/defaultConfigPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/dragScrollPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/dragScrollPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/headerPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/{keyboardEventPlugin/index.d.ts → keyboardEventPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/keyboardEventPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/{lowCodeFieldAdaptorPlugin/index.d.ts → lowCodeFieldAdaptorPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/{operationalFormPlugin/index.d.ts → operationalFormPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/operationalFormPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +31 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.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/levelSearchCascadePlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +15 -12
- 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/plugins/rowClickPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rowClickPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/rowDragPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rowDragPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/{varialbleHeightPlugin/index.d.ts → varialbleHeightPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/constants.d.ts +1 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/constants.js +1 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/renderer.d.ts +3 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/renderer.js +1 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/types.d.ts +8 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/types.js +1 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/utils.d.ts +15 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/utils.js +1 -0
- package/es/components/iho-table/src/plugins/{virtualTreePlugin/index.d.ts → virtualTreePlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/virtualTreePlugin.js +1 -0
- package/es/components/iho-table/src/types/index.d.ts +9 -1
- package/es/components/iho-table/src/types/pluginType.d.ts +3 -1
- package/es/components/iho-table/src/utils/index.d.ts +4 -7
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/index.d.ts +1 -0
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +33 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +33 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +1 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +15 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +14 -0
- 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 +0 -6
- package/es/components/shortcut-setter/index.d.ts +14 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +14 -0
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +3 -0
- 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/components/InputNumberSlash/InputNumberSlash.js +1 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/hooks/selectHooks/useOptionFiltered.d.ts +3 -1
- package/es/shared/hooks/selectHooks/useOptionFiltered.js +1 -1
- package/es/shared/hooks/selectHooks/useSearchContent.d.ts +1 -1
- package/es/shared/hooks/selectHooks/useSearchContent.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/fabricjs/index.d.ts +6823 -0
- package/es/shared/utils/index.d.ts +2 -1
- package/es/shared/utils/index.js +1 -1
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
- package/es/components/iho-table/src/plugins/bindEventSettingPlugin/index.js +0 -1
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +0 -1
- package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +0 -1
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +0 -1
- package/es/components/iho-table/src/plugins/operationalFormPlugin/index.js +0 -1
- package/es/components/iho-table/src/plugins/rowClickPlugin/index.d.ts +0 -1
- package/es/components/iho-table/src/plugins/rowClickPlugin/index.js +0 -1
- package/es/components/iho-table/src/plugins/rowDragPlugin/index.d.ts +0 -1
- package/es/components/iho-table/src/plugins/rowDragPlugin/index.js +0 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +0 -1
- package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{arrayed as e,uuidGenerator as t,traverse as r}from"../../../../shared/utils/index.js";import"../../../../shared/utils/tapable/SyncHook.js";import"../../../../shared/utils/tapable/SyncBailHook.js";import l from"../../../../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{last as o,isString as s}from"lodash-es";import{FIELD_BUSINESS_TYPE as i}from"../constants/index.js";function
|
|
1
|
+
import{arrayed as e,uuidGenerator as t,traverse as r}from"../../../../shared/utils/index.js";import"../../../../shared/utils/tapable/SyncHook.js";import"../../../../shared/utils/tapable/SyncBailHook.js";import l from"../../../../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{last as o,isString as s}from"lodash-es";import"../../index.js";import{FIELD_BUSINESS_TYPE as i}from"../constants/index.js";import{transformDateFormat as a}from"../utils/business.js";function p(){const p=new l(["fieldList","props"]),_=new l(["fieldItem","props"]);_.tap("__forceClearable",((e,t)=>(t.forceClearable&&(e.componentProps={...e.componentProps,clearable:!0}),e))),_.tap("__time",(e=>("DATE"===e.html_type&&"time"===a(e.date_format)&&(e.html_type="TIME"),e))),_.tap("__block",(e=>(["CHECKBOX_BLOCK","RADIO_BLOCK"].includes(e.html_type)&&(e.__vertical=!0),e))),_.tap("__age",(t=>("AGE"===t.html_type&&(t.html_type="INPUT_NUMBER",t.reactions=t.reactions?e(t.reactions):[],t.reactions.push({target:t.val_key_unit,fulfill:{state:{disabled:"{{$self.disabled}}"}}}),t.suffixConfig=[{validate:{obj_type:i.AGE_UNIT},val_key:t.val_key_unit,html_type:"SELECT",option:t.option,urlConfig:t.urlConfig}]),t))),_.tap("__multiple_select",(e=>{const{html_type:t,multi_select:r,__multiple:l}=e;return e.__multiple="SEARCH"!==t&&("SEARCH_MORE"===t||("SELECT"===t?"0"===r:l)),e}));const n=[[["SEARCH","PHONE_TYPE","IDCARD_TYPE","SEARCH_MORE"],"SELECT"],["DIGITAL","INPUT_NUMBER"],["CHECKBOX_BLOCK","CHECKBOX"],["RADIO_BLOCK","RADIO"],[["DATE-INPUT","DATETIME-INPUT"],"DATE"],["SWITCH_COMPONENT","SWITCH"],["SLIDER_COMPONENT","SLIDER"],["LEVEL_SEARCH_CASCADE","LEVEL_SEARCH_CASCADER"],["SEARCH_CASCADE","SEARCH_CASCADER"]];_.tap("__normalize",(e=>(n.some((([t,r])=>(Array.isArray(t)?t.includes(e.html_type):t===e.html_type)&&(e.html_type=r))),e)));const m=new Map([[["SELECT","SEARCH","SEARCH_MORE"],new Map([["H_TILE",e=>e.html_type=e.__multiple?"CHECKBOX":"RADIO"],["V_TILE",e=>{e.html_type=e.__multiple?"CHECKBOX":"RADIO",e.__vertical=!0}]])],["RADIO",new Map([["DROPDOWN",e=>e.html_type="SELECT"]])],["CHECKBOX",new Map([["DROPDOWN",e=>{e.__multiple=!0,e.html_type="SELECT"}]])]]);return _.tap({stage:9999,name:"__show_mode"},(t=>t.show_mode?([...m].some((([r,l])=>{if(!e(r).includes(t.html_type))return;const o=l.get(t.show_mode);return o&&o(t),!0})),t):t)),p.tap("__out_bordered",((e,{column:r,outBordered:l})=>{if(!l)return e;let s=0;return e.reduce(((l,i,a)=>{const p=2*(i.elem_width||3);return s+=p,s===r&&a<e.length-1?(s=0,l.push(i),l.push({val_key:`${t()}`,html_type:"LINE_BREAKS",lineBreaksBorder:!0})):s>r?(s=p,l.push({val_key:`${t()}`,html_type:"LINE_BREAKS",lineBreaksBorder:!0}),l.push(i)):(o(l)&&(o(l).fieldItemBorder=!0),l.push(i)),l}),[])})),p.tap("__prefix/suffix",(e=>{const t=[];return r(e,(l=>{["prefix","suffix"].forEach((o=>{const i=l[o];if(!s(i))return;const a=i.match("#{(.+)}");if(!a)return;const p=s(a[1])&&function(t){let l=null;return r(e,((e,r)=>{e.val_key===t&&(l=e,r())}),["children","properties"]),l}(a[1].trim());p&&(Reflect.deleteProperty(l,o),l[`${o}Config`]=l[`${o}Config`]||[],l[`${o}Config`].push(p),t.push(p))}))}),["children","properties"]),t.length?function e(r){return r.reduce(((r,l)=>(t.includes(l)||(r.push(l),l.properties&&(l.properties=e(l.properties)),l.children&&(l.children=e(l.children))),r)),[])}(e):e})),{FieldNormalizeWaterfallHook:_,FieldListNormalizeWaterfallHook:p}}export{p as useFieldNormalize};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{arrayed as e,checkInSetupEnv as l,jsonParse as n}from"../../../../shared/utils/index.js";import{uniqBy as o,isString as r,isEqual as t,omit as u,isFunction as a}from"lodash-es";import"naive-ui";import{computed as
|
|
1
|
+
import{arrayed as e,checkInSetupEnv as l,jsonParse as n}from"../../../../shared/utils/index.js";import{uniqBy as o,isString as r,isEqual as t,omit as u,isFunction as a}from"lodash-es";import"naive-ui";import{computed as i,inject as s,ref as c,watch as v,toRaw as d}from"vue";import"@vueuse/core";import"date-fns";import{useFormRequest as m}from"../../../../shared/hooks/useFormRequest/index.js";import"@vueuse/shared";import{useOptionFiltered as f}from"../../../../shared/hooks/selectHooks/useOptionFiltered.js";import{useSearchContent as y}from"../../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"../../index.js";import{InjectionAsyncQueue as p,InjectionFormLifeCycleCaller as h,InjectionFormGlobalProps as g,InjectionFormItemDepsCollector as K}from"../constants/index.js";import{useFormField as k}from"./useFormField.js";import{traverseDependKey as w}from"../utils/schema.js";import{getAbsoluteKey as C,formRenderLog as b}from"../utils/index.js";function R(e,l){const n=c();return i({get:()=>n.value?n.value:e[l],set(e){n.value=e}})}function F(e,l,r,t,c){const v=R(e,"commonList"),d=R(e,"recentList"),{searchContent:f,optionSearchFilter:h}=y();function g(e){return n(e.itemObj)}const K=i((()=>{var e,l;return null!=(l=null==(e=v.value)?void 0:e.map(g))?l:[]})),w=i((()=>{var e,l;return null!=(l=null==(e=d.value)?void 0:e.map(g))?l:[]})),C=i((()=>{if(!e.recommend||!K.value.length&&!w.value.length)return l.value;const n=o(K.value.concat(w.value),(e=>e[c.value])),r=l.value.filter((e=>n.every((function(l){return l[c.value]!==e[c.value]}))));return[...h(n,t.value),...r]})),{getRecommendRequestInfo:b,getHttpInstance:F}=m();function O(l){const{url:n,getRecommendIds:o}=b(),r=a(o)?o():{},t=a(e.getRecommendInfo)?e.getRecommendInfo():{};return{url:n[l],info:Object.assign({},r,t)}}const{fieldKey:j,field:q}=k(),I=s(p);return{postRecommend:async function(l){if(!e.recommend)return;const n=F();if(!n)return;const{url:o,info:t}=O("post"),u=C.value.find((e=>e[c.value]===l));u&&r("postRecommend",await n.post(o,{...t,keyword:"",itemId:c.value,itemObj:JSON.stringify(u)}))},getRecommend:async function(l){if(!e.recommend)return;if(f.value=l,v.value&&d.value&&e.recommendCache)return;const n=await I.addAsync(function(l,n){const{url:o,info:r}=O("get");return{url:o,method:"get",key:l,cache:n,params:{...r,recNum:Math.max(e.commonNum,e.recentNum),keyword:""},payload:{field:q.value,labelKey:t.value,valueKey:c.value}}}(j.value,e.recommendCache)),{commonly:o,recently:r}=n.reduce(((e,l)=>("commonly"===l.type?e.commonly.push(u(l,["type"])):"recently"===l.type&&e.recently.push(u(l,["type"])),e)),{commonly:[],recently:[]});v.value=o.slice(0,e.commonNum),d.value=r.slice(0,e.recentNum)},sortedOptions:C}}function O(e,l,n){const o=i((()=>{var l,n,o;return null!=(o=null!=(n=null==(l=e.urlConfig)?void 0:l.nameKey)?n:e.labelField)?o:"text"})),r=i((()=>{var l,n,o;return null!=(o=null!=(n=null==(l=e.urlConfig)?void 0:l.valueKey)?n:e.valueField)?o:"value"})),t=i((()=>{var l,n;return null!=(n=null==(l=e.urlConfig)?void 0:l.showKey)?n:e.showField})),u=i((()=>{var l,n;return null!=(n=null==(l=e.urlConfig)?void 0:l.searchKey)?n:e.searchField})),{field:a}=k();return I({props:e,labelKey:o,valueKey:r,searchKey:u,showKey:t,hooks:n,valueRef:l,getConfig:()=>e.urlConfig,getParams:()=>{var l,n;const o=q(a.value,null==(l=e.urlConfig)?void 0:l.params,null==(n=e.urlConfig)?void 0:n.dependKey);return{...e.urlConfig,params:o}},getDependKeys:()=>{var l;return null==(l=e.urlConfig)?void 0:l.dependKey}})}function j(l,n,o){const t=i((()=>{var n;const o=e(null==(n=l.wordbook)?void 0:n.show_key)[0];return r(o)?o:null})),u=i((()=>{var e,n,o,u;const a=null==(n=null==(e=l.wordbook)?void 0:e.render_key)?void 0:n[0];return r(a)?a:null!=(u=null!=(o=t.value)?o:l.labelField)?u:"text"})),a=i((()=>{var e,n,o;return null!=(o=null!=(n=null==(e=l.wordbook)?void 0:e.value_key)?n:l.valueField)?o:"value"})),s=i((()=>{var e;return(null==(e=l.wordbook)?void 0:e.search_key)||[]})),c=i((()=>{var e;return null!=(e=t.value)?e:l.showField})),{field:v}=k(),{getSearchRequestInfo:d}=m();return I({props:l,labelKey:u,valueKey:a,searchKey:s,showKey:c,hooks:o,valueRef:n,getConfig:()=>l.wordbook,getParams:()=>{const{wordbook:e,autograph:n}=l,o=q(v.value,{autograph:n,wordbookId:e.id,wordbookType:e.type,fieldKeys:e.search_key,keyword:"",page:1},e.queryParams);return{...d(),params:o}},getDependKeys:()=>{var e;return null==(e=l.wordbook)?void 0:e.queryParams}})}function q(e,l,n){const o={...l};return n&&w(n,((l,n,r)=>{const t=C(l,e.path),u=e.form.getValuesIn(t);if((null==r?void 0:r.required)&&null==u)throw`缺少必须的参数=>${t}`;o[n]=u})),o}function I({labelKey:e,valueKey:n,searchKey:o,showKey:u,props:a,getConfig:m,getParams:y,getDependKeys:w,hooks:C,valueRef:R}){l();const F=s(p),O=s(h),j=s(g),{remoteOptions:q,filterOptions:I,fullOptions:x,searchContent:S}=f(a,{labelKey:e,valueKey:n,searchKey:o,wordSplitFilter:i((()=>{var e;return null!=(e=a.wordSplitFilter)?e:j.wordSplitFilter}))}),{field:D,fieldKey:N}=k(),P=c(!1),_=async function(l,o,t={avoidSearchContent:!0}){if(S.value=l,!m())return q.value=null;if(!t.avoidSearchContent||null==S.value)try{P.value=!0;const l={field:D.value,labelKey:e.value,valueKey:n.value},r={params:{...y().params,...o},key:N.value,cache:a.requestCache,payload:l},t=await F.addAsync(Object.assign({},y(),r));d(q.value)!==t&&(q.value=t,O("afterOptionInit",[N.value,q.value,l]))}catch(e){r(e)&&b(e)}finally{P.value=!1}},H=s(K);return v(m,((l,o)=>{if(t(l,o))return;if(q.value=null,!l)return q.value=null;const r={fetchData:_,labelKey:e.value,valueKey:n.value},{onRequestConfigChange:u,onDepsChange:i}=C||{};H.setDeps(D.value.path,w()||[],(async e=>{q.value=null,(null==e?void 0:e.keepValue)||(R.value=null),a.lazyRequest||(i?i(r):_())})),!R.value&&a.lazyRequest||(u?u(r):_())}),{immediate:!0}),{labelKey:e,loading:P,showKey:u,valueKey:n,remoteOptions:q,filterOptions:I,fullOptions:x,fetchData:_,searchContent:S}}export{j as useAutographOptions,F as useRecommendOptions,O as useUrlConfigOptions};
|
|
@@ -150,6 +150,7 @@ export declare type FormRenderProps = Partial<{
|
|
|
150
150
|
operationalForm: LowCodeTypes.operationalConfig[];
|
|
151
151
|
outBordered: boolean;
|
|
152
152
|
forceClearable: boolean;
|
|
153
|
+
wordSplitFilter: boolean;
|
|
153
154
|
}>;
|
|
154
155
|
export declare type FormBusinessFormatter = (payload: {
|
|
155
156
|
fieldKey: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AgeContext, IdCardParseInfo } from '../../../../components/form-render';
|
|
2
2
|
import { FIELD_AGE_UNIT } from '../../../../components/form-render/src/constants';
|
|
3
3
|
export declare function parseIdCard(idCardNo: string): IdCardParseInfo;
|
|
4
|
-
export declare function transformDateFormat(format?: string): "month" | "date" | "datetime";
|
|
4
|
+
export declare function transformDateFormat(format?: string): "year" | "month" | "date" | "datetime" | "time";
|
|
5
5
|
export declare function isIdCard(idCardNo: string): boolean;
|
|
6
6
|
export declare function isMobile(mobile: string): boolean;
|
|
7
7
|
export declare function parseBirthday(birthday: string): AgeContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{differenceInDays as t,differenceInMonths as e,differenceInYears as n,differenceInHours as a,format as r}from"date-fns";import{isString as s}from"lodash-es";import{FIELD_AGE_UNIT as o,FIELD_SEX_VALUE as u}from"../constants/index.js";function d(t){return((t,e,n)=>{const a={},r=1-t.substr(e,1)%2;a.sex=1===r?u.FEMALE:u.MALE;const s=(2==n?"19":"")+t.substr(6,n),o=t.substr(6+n,2),d=t.substr(8+n,2);a.birthday=s+"-"+o+"-"+d+" 00:00";const c=new Date,i=c.getMonth()+1<parseInt(o,10)||c.getMonth()+1==parseInt(o,10)&&c.getDate()<parseInt(d,10)?1:0;return Object.assign(a,
|
|
1
|
+
import{differenceInDays as t,differenceInMonths as e,differenceInYears as n,differenceInHours as a,format as r}from"date-fns";import{isString as s}from"lodash-es";import{FIELD_AGE_UNIT as o,FIELD_SEX_VALUE as u}from"../constants/index.js";function d(t){return((t,e,n)=>{const a={},r=1-t.substr(e,1)%2;a.sex=1===r?u.FEMALE:u.MALE;const s=(2==n?"19":"")+t.substr(6,n),o=t.substr(6+n,2),d=t.substr(8+n,2);a.birthday=s+"-"+o+"-"+d+" 00:00";const c=new Date,i=c.getMonth()+1<parseInt(o,10)||c.getMonth()+1==parseInt(o,10)&&c.getDate()<parseInt(d,10)?1:0;return Object.assign(a,g(a.birthday)),a.age=a.year=c.getFullYear()-parseInt(s,10)-i,a})(t,15==t.length?14:16,15==t.length?2:4)}function c(t=""){if(!s(t)||!t)return"date";const e=t.includes("y"),n=t.includes("M"),a=t.includes("d"),r=t.includes("H"),o=t.includes("m"),u=t.includes("s");return e||n||a||!(r||o||u)?r||o||u?"datetime":!e||n||a?!e&&n&&a?"month":"date":"year":"time"}const i=/^\d{6}(((19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2]\d|3[0-1])\d{3}(\d|x|X))|(\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2]\d|3[0-1])\d{3}))$/,h=/^[1-9]\d{5}\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2]\d|3[0-1])\d{3}$/;function f(t){return i.test(t)&&function(t){if(!t||18!==t.length)return!1;const e=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2];let n=0;for(let a=0;a<17;a++)n+=+t[a]*e[a];return t.charAt(17).toUpperCase()===["1","0","X","9","8","7","6","5","4","3","2"][n%11]}(t)||h.test(t)}function l(t){return/^1(3\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\d|9[0-35-9])\d{8}$/.test(t)}function g(r){const s={},o=new Date,u=new Date(r);return s.day=t(o,u),s.month=e(o,u),s.age=s.year=n(o,u),s.hours=a(o,u),s}function m(t,e,n="yyyy-MM-dd HH:mm"){var a;const s=new Date,u={[o.MINUTE]:()=>d(s,"Minutes",t),[o.HOUR]:()=>d(s,"Hours",t),[o.DAY]:()=>d(s,"Date",t),[o.WEEK]:()=>d(s,"Date",7*t),[o.MONTH]:()=>d(s,"Month",t),[o.YEAR]:()=>d(s,"FullYear",t)};return null==(a=u[e])||a.call(u),r(function(t,e){const n=[{[o.DAY]:"Date",[o.WEEK]:"Date",[o.MONTH]:"Date",[o.YEAR]:"Date"},{[o.HOUR]:"Hours"},{[o.MINUTE]:"Minutes"}],a=n.findIndex((t=>Reflect.has(t,e)));~a&&n.slice(a+1).forEach((e=>{Object.values(e).forEach((e=>{t[`set${e}`]("Date"===e?1:0)}))}));return t.setSeconds(0),t}(s,e),n);function d(t,e,n){t[`set${e}`](t[`get${e}`]()-n)}}function M(t){const e=t.hours<24?{ageUnit:o.HOUR,age:Math.max(t.hours,1)}:t.day<30?{ageUnit:o.DAY,age:Math.max(t.day,1)}:t.day<365?{ageUnit:o.MONTH,age:Math.max(t.month,1)}:{ageUnit:o.YEAR,age:Math.max(t.year,1)};return e.age=Math.max(e.age,1),e}const D=/^(\d{4})-?(\d{2})-?(\d{2})?\s?(\d{2})?:?(\d{2})?:?(\d{2})?$/;function y(t){if(!s(t))return;const e=t.match(D);if(!e)return;const[,n,a,r,o,u,d]=e;return new Date(`${n}-${a}-${r||"01"} ${o||"00"}:${u||"00"}:${d||"00"}`)}export{y as businessDateParser,f as isIdCard,l as isMobile,m as parseAge2Birthday,M as parseAgeFromContext,g as parseBirthday,d as parseIdCard,c as transformDateFormat};
|
|
@@ -2148,6 +2148,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2148
2148
|
isTree?: import("../../shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
2149
2149
|
isBatchSelect?: import("../../shared/types").MaybeString<0 | 1> | undefined;
|
|
2150
2150
|
isSingleSelect?: import("../../shared/types").MaybeString<0 | 1> | undefined;
|
|
2151
|
+
dragScroll?: boolean | undefined;
|
|
2151
2152
|
selectType?: "checkbox" | "radio" | null | undefined;
|
|
2152
2153
|
rowDraggable?: boolean | undefined;
|
|
2153
2154
|
showSeq?: boolean | undefined;
|
|
@@ -2234,10 +2235,14 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2234
2235
|
startDateField: string;
|
|
2235
2236
|
endDateField: string;
|
|
2236
2237
|
}[] | undefined;
|
|
2238
|
+
verticalConfig?: {
|
|
2239
|
+
enable?: boolean | undefined;
|
|
2240
|
+
} | undefined;
|
|
2237
2241
|
}>;
|
|
2238
2242
|
updateConfigRefDebounced: () => void;
|
|
2239
2243
|
updateConfigRef: () => void;
|
|
2240
2244
|
fieldListRef: import("vue").Ref<{
|
|
2245
|
+
[x: string]: any;
|
|
2241
2246
|
property?: string | undefined;
|
|
2242
2247
|
type?: import("vxe-table").VxeColumnPropTypes.Type | undefined;
|
|
2243
2248
|
field?: string | undefined;
|
|
@@ -2535,6 +2540,8 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2535
2540
|
getTitle?: (() => string) | undefined;
|
|
2536
2541
|
getKey?: (() => string) | undefined;
|
|
2537
2542
|
annotation?: boolean | undefined;
|
|
2543
|
+
depth?: number | undefined;
|
|
2544
|
+
parent?: any | undefined;
|
|
2538
2545
|
}[]>;
|
|
2539
2546
|
updateFieldListRefDebounced: () => void;
|
|
2540
2547
|
updateFieldListRef: () => void;
|
|
@@ -4605,6 +4612,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4605
4612
|
isTree?: import("../../shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
4606
4613
|
isBatchSelect?: import("../../shared/types").MaybeString<0 | 1> | undefined;
|
|
4607
4614
|
isSingleSelect?: import("../../shared/types").MaybeString<0 | 1> | undefined;
|
|
4615
|
+
dragScroll?: boolean | undefined;
|
|
4608
4616
|
selectType?: "checkbox" | "radio" | null | undefined;
|
|
4609
4617
|
rowDraggable?: boolean | undefined;
|
|
4610
4618
|
showSeq?: boolean | undefined;
|
|
@@ -4691,6 +4699,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4691
4699
|
startDateField: string;
|
|
4692
4700
|
endDateField: string;
|
|
4693
4701
|
}[] | undefined;
|
|
4702
|
+
verticalConfig?: {
|
|
4703
|
+
enable?: boolean | undefined;
|
|
4704
|
+
} | undefined;
|
|
4694
4705
|
}>;
|
|
4695
4706
|
configChanged: boolean;
|
|
4696
4707
|
fieldChanged: boolean;
|
|
@@ -4700,6 +4711,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4700
4711
|
footer: any;
|
|
4701
4712
|
slotPropertiesPicker: (args: import("../../shared/types").AnyObject) => Pick<import("../../shared/types").AnyObject, "row" | "column" | "rowIndex" | "checked" | "$rowIndex" | "disabled" | "columnIndex" | "$columnIndex" | "_columnIndex" | "indeterminate">;
|
|
4702
4713
|
useVersion: typeof import("..").useVersion;
|
|
4714
|
+
NConfigProvider: any;
|
|
4703
4715
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "keyboard" | "rowDrag" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd" | "pageChange")[], "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "keyboard" | "rowDrag" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd" | "pageChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
4704
4716
|
tableConfig: {
|
|
4705
4717
|
type: import("vue").PropType<import("../../components/iho-table/src/types").IhoTableConfig>;
|
|
@@ -2149,6 +2149,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2149
2149
|
isTree?: import("../../../shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
2150
2150
|
isBatchSelect?: import("../../../shared/types").MaybeString<0 | 1> | undefined;
|
|
2151
2151
|
isSingleSelect?: import("../../../shared/types").MaybeString<0 | 1> | undefined;
|
|
2152
|
+
dragScroll?: boolean | undefined;
|
|
2152
2153
|
selectType?: "checkbox" | "radio" | null | undefined;
|
|
2153
2154
|
rowDraggable?: boolean | undefined;
|
|
2154
2155
|
showSeq?: boolean | undefined;
|
|
@@ -2235,10 +2236,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2235
2236
|
startDateField: string;
|
|
2236
2237
|
endDateField: string;
|
|
2237
2238
|
}[] | undefined;
|
|
2239
|
+
verticalConfig?: {
|
|
2240
|
+
enable?: boolean | undefined;
|
|
2241
|
+
} | undefined;
|
|
2238
2242
|
}>;
|
|
2239
2243
|
updateConfigRefDebounced: () => void;
|
|
2240
2244
|
updateConfigRef: () => void;
|
|
2241
2245
|
fieldListRef: import("vue").Ref<{
|
|
2246
|
+
[x: string]: any;
|
|
2242
2247
|
property?: string | undefined;
|
|
2243
2248
|
type?: import("vxe-table").VxeColumnPropTypes.Type | undefined;
|
|
2244
2249
|
field?: string | undefined;
|
|
@@ -2536,6 +2541,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2536
2541
|
getTitle?: (() => string) | undefined;
|
|
2537
2542
|
getKey?: (() => string) | undefined;
|
|
2538
2543
|
annotation?: boolean | undefined;
|
|
2544
|
+
depth?: number | undefined;
|
|
2545
|
+
parent?: any | undefined;
|
|
2539
2546
|
}[]>;
|
|
2540
2547
|
updateFieldListRefDebounced: () => void;
|
|
2541
2548
|
updateFieldListRef: () => void;
|
|
@@ -4606,6 +4613,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4606
4613
|
isTree?: import("../../../shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
4607
4614
|
isBatchSelect?: import("../../../shared/types").MaybeString<0 | 1> | undefined;
|
|
4608
4615
|
isSingleSelect?: import("../../../shared/types").MaybeString<0 | 1> | undefined;
|
|
4616
|
+
dragScroll?: boolean | undefined;
|
|
4609
4617
|
selectType?: "checkbox" | "radio" | null | undefined;
|
|
4610
4618
|
rowDraggable?: boolean | undefined;
|
|
4611
4619
|
showSeq?: boolean | undefined;
|
|
@@ -4692,6 +4700,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4692
4700
|
startDateField: string;
|
|
4693
4701
|
endDateField: string;
|
|
4694
4702
|
}[] | undefined;
|
|
4703
|
+
verticalConfig?: {
|
|
4704
|
+
enable?: boolean | undefined;
|
|
4705
|
+
} | undefined;
|
|
4695
4706
|
}>;
|
|
4696
4707
|
configChanged: boolean;
|
|
4697
4708
|
fieldChanged: boolean;
|
|
@@ -4701,6 +4712,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4701
4712
|
footer: any;
|
|
4702
4713
|
slotPropertiesPicker: (args: AnyObject) => Pick<AnyObject, "row" | "column" | "rowIndex" | "checked" | "$rowIndex" | "disabled" | "columnIndex" | "$columnIndex" | "_columnIndex" | "indeterminate">;
|
|
4703
4714
|
useVersion: typeof useVersion;
|
|
4715
|
+
NConfigProvider: any;
|
|
4704
4716
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "keyboard" | "rowDrag" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd" | "pageChange")[], "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "keyboard" | "rowDrag" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd" | "pageChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
4705
4717
|
tableConfig: {
|
|
4706
4718
|
type: PropType<IhoTableConfig>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as t,provide as o,ref as a,toRaw as l,watch as n,resolveComponent as s,openBlock as r,createElementBlock as i,mergeProps as u,unref as c,createBlock as d,resolveDynamicComponent as f,createElementVNode as m,normalizeStyle as
|
|
1
|
+
import{defineComponent as e,computed as t,provide as o,ref as a,toRaw as l,watch as n,resolveComponent as s,openBlock as r,createElementBlock as i,mergeProps as u,unref as c,createBlock as d,resolveDynamicComponent as f,createElementVNode as m,normalizeStyle as p,createVNode as v,withCtx as b,createSlots as h,renderList as g,createCommentVNode as x,renderSlot as k,normalizeProps as y,guardReactiveProps as C}from"vue";import{useTheme as D}from"../../../shared/hooks/useTheme.js";import{useDebounceFn as j}from"@vueuse/core";import"date-fns";import{isString as $,isEqualWith as I,isFunction as w,pick as q}from"lodash-es";import{useFormAsyncQueue as R,presetRequestHandler as H}from"../../../shared/hooks/useFormRequest/index.js";import{promiseTimeout as _}from"@vueuse/shared";import{widthAppend as T,uuidGenerator as A}from"../../../shared/utils/index.js";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NConfigProvider as L}from"naive-ui";import{useVersion as P}from"../../../shared/hooks/useVersion.js";import{VxeTableEventNameList as S,InjectionIhoTableEmits as F,InjectionTableAsyncQueue as O,InjectionIhoTableAnnotation as B,InjectionIhoTableUUID as E,InjectionIhoTableInstance as N,InjectionIhoTableConfig as V,InjectionIhoTableFieldList as W,InjectionIhoTableHandler as z}from"./constants/index.js";import{createTableHooks as G,applyTableConfigHooks as J,applyTableFieldHooks as K,createTableEventHandlers as M,createDomInsertComponent as Q,createDataTransfer as U}from"./hooks/tapHooks/index.js";import{provideIhoTableEventListener as X}from"./hooks/tapHooks/useEventHooks.js";import{eventName2EventListener as Y}from"./utils/index.js";const Z=["id"];var ee=e({__name:"IhoTable",props:{tableConfig:{type:Object,default:()=>({})},fieldList:{type:Array,default:()=>[]},tableData:{type:Array,default:()=>[]},annotation:{type:Object},requestInstance:{type:Object},uniqueCacheData:{type:Boolean,default:!1},parallelism:{type:Number,default:3}},emits:["formChange","settingClick","formClick","keyboard","rowDrag",...S],setup(e,{expose:S,emit:ee}){var te,oe;const ae=e,le=D({"--c-border-color":"#d0d0d0","--c-head-bg-color":"#f2f2f2","--c-hover-color":"#e6e6e6","--c-stripe-color":"#f6f6f6"}),ne=t((()=>{var e,t;const o=null!=(t=null==(e=ae.tableConfig)?void 0:e.height)?t:"100%";return{height:"auto"===o?"100%":$(o)&&(o.includes("calc")||o.endsWith("%"))?o:T(o)}})),se=X(),re=function(e,...t){ee(e,...t);const o=c(fe)[Y(e)];w(o)&&o(...t),se.trigger(e,...t)};o(F,re);const ie=R(t((()=>ae.requestInstance)),t((()=>!!ae.uniqueCacheData))).create(ae.parallelism,{beforeRequest:(e,t)=>t,afterRequest:(e,t)=>H(t)});o(O,ie);const ue=G();o(B,t((()=>ae.annotation)));const ce=A();o(E,ce);const de=a();o(N,de);const fe=a({uuid:null!=(oe=null==(te=ae.tableConfig)?void 0:te.uuid)?oe:ce});o(V,fe);const me=j(pe,10);function pe(){var e,t;fe.value=J(ue,{...ae.tableConfig,uuid:null!=(t=null==(e=ae.tableConfig)?void 0:e.uuid)?t:ce},{$table:de,emits:re,globProps:ae})}const ve=a([]);o(W,ve);const be=j(he,10);function he(){const e=K(ue,ae.fieldList,fe.value,{$table:de,emits:re,globProps:ae});I(e,l(ve.value),((e,t)=>{if(w(e)&&w(t))return e.toString()===t.toString()}))||(ve.value=e)}const ge=U(ue,fe,de),xe=a([]);async function ke(){var e,t;const o=await ge(ae.tableData),a=null==(e=de.value)?void 0:e.getTableData().fullData;if(a){let e=0;if(!(a.some((t=>{var a;if(!(null==(a=de.value)?void 0:a.isInsertByRow(t))){if(t!==o[e])return!0;e++}}))||e!==o.length))return}xe.value=o,null==(t=de.value)||t.recalculate(!0)}const ye={updateTableDataRef:j(ke,10),updateConfigRef:me,updateFieldListRef:be};o(z,ye);const Ce=M({hooks:ue,config:fe,$table:de,context:ye,emits:re}),De=t((()=>({...fe.value,...Ce})));let je=!1,$e=!1,Ie=!1;const we=j((()=>{je&&pe(),$e&&he(),Ie&&ke(),je=!1,$e=!1,Ie=!1}),10);n((()=>ae.tableConfig),(()=>{je=!0,$e=!0,Ie=!0,we()}),{deep:!0}),n((()=>ae.fieldList),(()=>{$e=!0,Ie=!0,we()}),{deep:!0}),n([()=>[...ae.tableData],()=>{var e;return null==(e=ae.tableData)?void 0:e.length}],(()=>{Ie=!0,we()})),n([()=>ae.tableData,()=>{var e;return null==(e=ae.tableData)?void 0:e.length}],(async()=>{var e,t;(null==(e=fe.value.treeConfig)?void 0:e.expandAll)&&(await _(11),null==(t=de.value)||t.setAllTreeExpand(!0))})),pe(),he(),ke();const{header:qe,footer:Re}=Q(ue);function He(e){return q(e,["row","rowIndex","$rowIndex","column","columnIndex","$columnIndex","_columnIndex","checked","disabled","indeterminate"])}return S({$table:de,async loadData(e){var t;null==(t=de.value)||t.loadData(await ge(e))},setSort:(e,t)=>({field:e,value:t}),setFilter:(e,t)=>({field:e,value:t}),reload(){var e,t;null==(e=de.value)||e.loadColumn([]),null==(t=de.value)||t.loadData([]),pe(),he(),ke()},...ue.exposeHooks.expose.call({},fe,{$table:de,emits:re,globProps:ae})}),ue.setupHooks.setup.call(fe,ve,{$table:de,emits:re,globProps:ae}),(e,t)=>{const o=s("vxe-grid");return r(),i("section",u({class:"iho-table",id:c(ce),style:c(le)},c(P)()),[(r(),d(f(c(qe)))),m("section",{style:p(c(ne))},[v(c(L),{abstract:"",namespace:"vxe-table--ignore-clear"},{default:b((()=>[v(o,u({ref_key:"$table",ref:de},c(De),{columns:ve.value,data:xe.value}),h({_:2},[g(e.$slots,((t,o)=>({name:o,fn:b((t=>[x(" 实际上所有的vxe-grid插槽都支持 "),k(e.$slots,o,y(C(He(t))))]))})))]),1040,["columns","data"])])),_:3})],4),(r(),d(f(c(Re))))],16,Z)}}});export{ee as default};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AnyObject, Nullable } from '../../../../../shared/types';
|
|
2
2
|
import { MaybeRef } from '@vueuse/core';
|
|
3
|
-
import { Ref } from 'vue';
|
|
4
3
|
import { VxeTableInstance } from 'vxe-table';
|
|
5
4
|
import { IhoTableHandlerContext, IhoTableConfig, IhoTableEmits, IhoTableFieldItem, IhoTableHandler, TableHooks } from '../../../../../components/iho-table/src/types';
|
|
6
5
|
export declare const createTableHooks: () => Readonly<{
|
|
@@ -13,10 +12,7 @@ export declare const createTableHooks: () => Readonly<{
|
|
|
13
12
|
exposeHooks: import("../../../../../components/iho-table/src/types").AbstractExposeHooks;
|
|
14
13
|
}>;
|
|
15
14
|
export declare function applyTableConfigHooks(hooks: TableHooks, config: IhoTableConfig, context: IhoTableHandlerContext): IhoTableConfig;
|
|
16
|
-
export declare function applyTableFieldHooks(hooks: TableHooks, fieldList: IhoTableFieldItem[], config: IhoTableConfig, context:
|
|
17
|
-
$table: Ref<Nullable<VxeTableInstance>>;
|
|
18
|
-
emits: IhoTableEmits;
|
|
19
|
-
}): IhoTableFieldItem[];
|
|
15
|
+
export declare function applyTableFieldHooks(hooks: TableHooks, fieldList: IhoTableFieldItem[], config: IhoTableConfig, context: IhoTableHandlerContext): IhoTableFieldItem[];
|
|
20
16
|
export declare function createTableEventHandlers({ hooks, config, $table, emits, context }: {
|
|
21
17
|
hooks: TableHooks;
|
|
22
18
|
config: MaybeRef<IhoTableConfig>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{arrayed as o}from"../../../../../shared/utils/index.js";import{cloneDeep as e,isArray as r}from"lodash-es";import{unref as
|
|
1
|
+
import{arrayed as o}from"../../../../../shared/utils/index.js";import{cloneDeep as e,isArray as r}from"lodash-es";import{unref as t,defineComponent as s}from"vue";import{VxeEventListenerNameList as n}from"../../constants/index.js";import{eventListener2EventName as i}from"../../utils/index.js";import{useConfigHooks as a}from"./useConfigHooks.js";import{useDataHooks as f}from"./useDataHooks.js";import{useDomInsertHooks as l}from"./useDomInsertHooks.js";import{useEventHooks as c}from"./useEventHooks.js";import{useExposeHooks as u}from"./useExposeHooks.js";import{useFieldHooks as d}from"./useFieldHooks.js";import{useSetupHooks as m}from"./useSetupHooks.js";const p=(()=>{let o=null;return()=>o||(o=Object.freeze({configHooks:a().create(),fieldHooks:d().create(),eventHooks:c().create(),dataHooks:f().create(),setupHooks:m().create(),domInsertHooks:l().create(),exposeHooks:u().create()}))})();function k(o,r,t){const s=o.configHooks.config.call(e(r),t);return["rowConfig","editConfig","columnConfig","resizableConfig","seqConfig","sortConfig","filterConfig","radioConfig","checkboxConfig","expandConfig","treeConfig","mouseConfig","menuConfig","keyboardConfig","scrollY","scrollX","editRules"].forEach((e=>{s[e]=o.configHooks[e].call(s[e],s,t)})),s}function H(t,s,n,i){t.fieldHooks.fieldStart.promise(n,i);let a=function e(s){return s.reduce(((s,a,f)=>{const l=[],c=[];let u=!1;return a=t.fieldHooks.field.call(a,{index:f,remove(){u=!0},insertAfter(e){c.push(...o(e))},insertBefore(e){l.push(...o(e))}},n,i),s.push(...l),u||(s.push(a),r(a.children)&&(a.children=e(a.children))),s.push(...c),s}),[])}(e(s));return a=t.fieldHooks.fieldList.call(a,n,i),t.fieldHooks.fieldEnd.promise(n,i),a}function h({hooks:o,config:e,$table:r,emits:s,context:a}){return n.reduce(((n,f)=>(n[f]=n=>function(n,f){var l;const c=i(n);s(c,f),null==(l=o.eventHooks[n])||l.promise(f,t(e),{$table:t(r),emits:s,...a})}(f,n),n)),{})}function g(e,r,s){return async n=>{e.dataHooks.dataStart.promise(t(r));let i=await n.reduce((async(n,i,a)=>{const f=[],l=[];let c=!1;await e.dataHooks.data.promise(i,t(r),{index:a,$table:s,insertBefore(e){f.push(...o(e))},insertAfter(e){l.push(...o(e))},remove(){c=!0}});const u=await n;return u.push(...f),!c&&u.push(i),u.push(...l),u}),Promise.resolve([]));return i=e.dataHooks.dataList.call(i,t(r)),e.dataHooks.dataEnd.promise(t(r)),i}}function C(o){return{header:s({name:"IhoTableHeader",render:()=>o.domInsertHooks.header.call([])}),footer:s({name:"IhoTableFooter",render:()=>o.domInsertHooks.footer.call([])})}}export{k as applyTableConfigHooks,H as applyTableFieldHooks,g as createDataTransfer,C as createDomInsertComponent,h as createTableEventHandlers,p as createTableHooks};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnyObject } from '../../../../../shared/types';
|
|
2
|
-
import { AsyncParallelHook, AsyncSeriesHook } from '../../../../../shared/utils/tapable';
|
|
2
|
+
import { AsyncParallelHook, AsyncSeriesHook, SyncWaterfallHook } from '../../../../../shared/utils/tapable';
|
|
3
3
|
import { AbstractDataHooks } from '../../../../../components/iho-table/src/types';
|
|
4
4
|
declare class TableDataHooks extends AbstractDataHooks {
|
|
5
5
|
readonly dataStart: AsyncParallelHook<[import("../../../../../components/iho-table/src/types").IhoTableConfig], import("../../../../../shared/utils/tapable").UnsetAdditionalOptions>;
|
|
@@ -11,6 +11,7 @@ declare class TableDataHooks extends AbstractDataHooks {
|
|
|
11
11
|
insertAfter(data: import("../../../../../shared/types").ArrayAble<AnyObject>): void;
|
|
12
12
|
}], import("../../../../../shared/utils/tapable").UnsetAdditionalOptions>;
|
|
13
13
|
readonly dataEnd: AsyncParallelHook<[import("../../../../../components/iho-table/src/types").IhoTableConfig], import("../../../../../shared/utils/tapable").UnsetAdditionalOptions>;
|
|
14
|
+
readonly dataList: SyncWaterfallHook<[AnyObject[], import("../../../../../components/iho-table/src/types").IhoTableConfig], import("../../../../../shared/utils/tapable").UnsetAdditionalOptions>;
|
|
14
15
|
}
|
|
15
16
|
export declare function useDataHooks(): {
|
|
16
17
|
create: () => TableDataHooks;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
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
|
|
1
|
+
import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import t from"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import a from"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import s from"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import{AbstractDataHooks as o}from"../../types/pluginType.js";class e extends o{constructor(){super(...arguments),this.dataStart=new a(["config"]),this.data=new s(["rowData","context","config"]),this.dataEnd=new a(["config"]),this.dataList=new t(["dataList","config"])}}function r(){return{create:function(){return new e}}}export{r as useDataHooks};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function bindEventSettingPlugin(): import("
|
|
1
|
+
export declare function bindEventSettingPlugin(): import("../../../../components/iho-table").TablePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../../../../shared/utils/index.js";import"../../index.js";import{isFunction as n}from"lodash-es";import{getBindEventSettingTrigger as t}from"../../../../shared/utils/business.js";import{defineTablePlugin as o}from"../hooks/useTablePlugin.js";function e(){const e="bindEventSettingPlugin";return o({name:e,apply(o){o.configHooks.config.tap(e,(o=>{const e=o.onFormChange;return o.onFormChange=function(o){var i;const{column:r,row:s}=o,u=null==(i=r.editRender)?void 0:i.props;if(u&&(null==u?void 0:u.bindEventSetting)){u.bindEventSetting.forEach((n=>{t(n.event_type)(n,{getter:n=>s[n],setter:(n,t)=>s[n]=t})}))}n(e)&&e(o)},o}))}})}export{e as bindEventSettingPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function defaultConfigPlugin(): import("
|
|
1
|
+
export declare function defaultConfigPlugin(): import("../../../../components/iho-table").TablePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{mergeWith as e,isObject as o}from"lodash-es";import{HIGHEST_PRIORITY as i}from"../constants/index.js";import{defineTablePlugin as t}from"../hooks/useTablePlugin.js";import{IhoTableStatusHelper as s}from"../utils/index.js";function n(){const n="defaultTablePlugin";return t({name:n,vxe(e){e.setup({zIndex:3e3})},apply(t){t.configHooks.config.tap({name:n,stage:i},(o=>{const i=e({border:!0,showSeq:!0,columnConfig:{resizable:!0},rowConfig:{height:36,useKey:!0,isHover:!0,isCurrent:!0,keyField:"theUniqueKey"},showOverflow:"title",showHeaderOverflow:"title",editConfig:{trigger:"click",mode:"cell"}},o,{height:o.height?"auto":void 0});return i.selectType=o.selectType||(s.isPositive(o.isBatchSelect)?"checkbox":s.isPositive(o.isSingleSelect)?"radio":void 0),i})),t.configHooks.mouseConfig.tap({name:n,stage:i},((e,i)=>o(i.keyboardConfig)?Object.assign({selected:!!i.keyboardConfig.isEdit},e):e))}})}export{n as defaultConfigPlugin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function dragScrollPlugin(): import("../../../../components/iho-table").TablePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{findAncestor as e}from"../../../../shared/utils/index.js";import{noop as t}from"lodash-es";import{computed as l,unref as r,onBeforeUnmount as o}from"vue";import{useDragScroll as a}from"../../../drag-scroll/src/index.js";import"../../index.js";import{useUUIDMap as s}from"../utils/index.js";import{defineTablePlugin as u}from"../hooks/useTablePlugin.js";function n(){const e="dragScrollPlugin";return u({name:e,apply(u){const{getItemFromUUID:n,setItemFromUUID:m,removeItemFromUUID:c}=s((()=>t),!1);u.configHooks.config.tap(e,((e,{$table:t})=>!1!==e.dragScroll&&e.uuid?(m(e.uuid,a(e.uuid,{dragEle:l((()=>{var e;return r(null==(e=t.value)?void 0:e.getRefMaps().refElem)})),isDraggableEle(e){const{bodyEle:l,inEmptyArea:o}=function(e,t){const l=e.target,o="TD"===l.tagName||l.classList.contains("vxe-cell"),a=r(t);return a?{target:l,bodyEle:i(l,a),inEmptyArea:o}:{target:l,inEmptyArea:o,bodyEle:null}}(e,t);return!!l&&o},getScrollState:()=>t.value.getScroll(),setScrollState:(e,l)=>t.value.scrollTo(l.scrollLeft,l.scrollTop)})),e):e)),u.setupHooks.setup.tap(e,(e=>{o((()=>{var t;e.value.uuid&&(null==(t=n(e.value.uuid))||t(),c(e.value.uuid))}))}))}})}function i(t,l){const o=r(l.getRefMaps().refElem);let a=!1,s=!1,u=null;return e(t,(e=>(a||(a=e===o),s||(s=e.classList.contains("vxe-table--body-wrapper"),u=e),a&&s)))?u:null}export{n as dragScrollPlugin};
|
|
@@ -18,7 +18,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
18
18
|
checkedRef: import("vue").WritableComputedRef<string[]>;
|
|
19
19
|
checkedCacheRef: import("vue").Ref<string[]>;
|
|
20
20
|
searchFilterText: import("vue").Ref<string>;
|
|
21
|
-
close: () => void
|
|
21
|
+
close: () => Promise<void>;
|
|
22
22
|
OPTION_ITEM_HEIGHT: number;
|
|
23
23
|
viewCapacity: import("vue").ComputedRef<number>;
|
|
24
24
|
filteredList: import("vue").ComputedRef<import("vxe-table").VxeTableDefines.FilterOption[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,inject as l,computed as a,ref as t,onDeactivated as u,onMounted as i,toRaw as o,openBlock as r,createElementBlock as n,unref as v,createBlock as c,createCommentVNode as s,createElementVNode as d,createVNode as p,isRef as f,withCtx as h,mergeProps as m,normalizeProps as _,guardReactiveProps as y,Fragment as b,renderList as k,toDisplayString as g,createTextVNode as C,normalizeStyle as L}from"vue";import
|
|
1
|
+
import{defineComponent as e,inject as l,computed as a,ref as t,onDeactivated as u,onMounted as i,toRaw as o,openBlock as r,createElementBlock as n,unref as v,createBlock as c,createCommentVNode as s,createElementVNode as d,createVNode as p,isRef as f,withCtx as h,mergeProps as m,normalizeProps as _,guardReactiveProps as y,Fragment as b,renderList as k,toDisplayString as g,createTextVNode as C,normalizeStyle as L}from"vue";import w from"../../../../../shared/components/CancelRadio/CancelRadio.js";import{keywordMatcher as I,widthAppend as D}from"../../../../../shared/utils/index.js";import{useVirtualList as S}from"@vueuse/core";import{isNumber as U,isString as j,isFunction as x,isEqual as F}from"lodash-es";import{NInput as R,NCheckbox as W,NSpin as E,NCheckboxGroup as $,NRadioGroup as O,NButtonGroup as P,NButton as V}from"naive-ui";import{isVariableHeightTable as Y}from"../../utils/index.js";const q={class:"iho-table__filterWrapper"},z={key:1,class:"iho-table__filterCheckAllWrapper"},A={class:"iho-table__filterListItem"},H={class:"iho-table__filterListItem"},M=["title"],B=["title"],G={class:"iho-table__filterListItemContent"},J={class:"iho-table__filterFooter"};var K=e({__name:"filter",props:{payload:{type:Object,required:!0}},setup(e){const K=e,N=l("$xetable"),Q=a((()=>{var e;return!!(null==(e=K.payload)?void 0:e.column.filterMultiple)})),T=a((()=>{var e,l,a;return null!=(a=null==(l=null==(e=K.payload)?void 0:e.column)?void 0:l.filters)?a:[]})),X=a({get:()=>T.value.reduce(((e,l)=>(l.checked&&e.push(l.value),e)),[]),async set(e){if(!K.payload||!N)return;const l=N.reactData.filterStore.options||[];if(Q.value?(l.forEach((l=>l._checked=e.includes(l.value))),N.checkFilterOptions()):l.forEach((l=>l._checked=l.value===e[0])),!Y(N))return a();function a(){K.payload.$panel.confirmFilter(new CustomEvent("click"))}N.reactData.scrollYLoad=!0,a(),N.reactData.scrollYLoad=!1}}),Z=t([...X.value]),ee=t("");async function le(){N&&(N.reactData.filterStore.visible=!1)}u(le);const ae=a((()=>{var e,l;if(!K.payload||!K.payload.column)return 10;const{filterCapacity:a}=null!=(l=null==(e=K.payload.column.editRender)?void 0:e.props)?l:{};return U(a)&&a>0?a:10})),te=a((()=>ee.value?T.value.filter((e=>!!`${e.label}`.includes(ee.value)||(j(e.data)?I(ee.value,e.data):void 0))):T.value)),{list:ue,containerProps:ie,wrapperProps:oe}=S(te,{itemHeight:32,overscan:3}),re=a({get:()=>te.value.every((e=>Z.value.includes(e.value))),set(e){Z.value=e?[...new Set([...Z.value,...te.value.map((e=>e.value))])]:Z.value.filter((e=>te.value.every((l=>l.value!==e))))}}),ne=a((()=>te.value.some((e=>Z.value.includes(e.value)))&&!re.value)),ve=a({get:()=>Z.value.length===T.value.length&&0!==T.value.length,set:e=>{Z.value=e?T.value.map((e=>e.value)):[]}}),ce=a((()=>!!Z.value.length&&!ve.value)),se=a((()=>({height:D(32*ae.value)})));function de(){X.value=Q.value?Z.value:F(Z.value[0],null)?[]:[Z.value[0]],le()}function pe(){Z.value=Q.value?[]:[null]}const fe=t(!1);return i((async()=>{var e;if(!N)return;const l=null==(e=K.payload.column.editRender.props)?void 0:e.onFilterShow;if(x(l))try{fe.value=!0,await l(K.payload);const{filterStore:e}=N.reactData;o(e.options)!==o(T.value)&&(e.options=T.value)}finally{fe.value=!1}})),(e,l)=>(r(),n("section",q,[v(T).length>5?(r(),c(v(R),{key:0,value:ee.value,"onUpdate:value":l[0]||(l[0]=e=>ee.value=e)},null,8,["value"])):s("v-if",!0),v(Q)?(r(),n("div",z,[d("div",A,[p(v(W),{label:"全选当前",checked:v(re),"onUpdate:checked":l[1]||(l[1]=e=>f(re)?re.value=e:null),indeterminate:v(ne)},null,8,["checked","indeterminate"])]),d("div",H,[p(v(W),{label:"全选所有",checked:v(ve),"onUpdate:checked":l[2]||(l[2]=e=>f(ve)?ve.value=e:null),indeterminate:v(ce)},null,8,["checked","indeterminate"])])])):s("v-if",!0),p(v(E),{show:fe.value},{default:h((()=>[v(Q)?(r(),c(v($),{key:0,value:Z.value,"onUpdate:value":l[3]||(l[3]=e=>Z.value=e)},{default:h((()=>[d("section",m(v(ie),{style:v(se),class:"iho-table__filterListWrapper"}),[d("section",_(y(v(oe))),[(r(!0),n(b,null,k(v(ue),(e=>(r(),n("div",{class:"iho-table__filterListItem",key:e.data.value},[p(v(W),{value:e.data.value},{default:h((()=>[d("div",{class:"iho-table__filterListItemContent",title:e.data.label},g(e.data.label),9,M)])),_:2},1032,["value"])])))),128))],16)],16)])),_:1},8,["value"])):(r(),c(v(O),{key:1,value:Z.value[0],"onUpdate:value":l[5]||(l[5]=e=>Z.value[0]=e)},{default:h((()=>[d("section",m(v(ie),{style:v(se),class:"iho-table__filterListWrapper"}),[d("section",_(y(v(oe))),[(r(!0),n(b,null,k(v(ue),(e=>(r(),n("div",{class:"iho-table__filterListItem",key:e.data.value,title:e.data.label},[p(v(w),{value:e.data.value,currentValue:Z.value[0],cancelable:"",onCancel:l[4]||(l[4]=e=>Z.value=[null])},{default:h((()=>[d("div",G,g(e.data.label),1)])),_:2},1032,["value","currentValue"])],8,B)))),128))],16)],16)])),_:1},8,["value"]))])),_:1},8,["show"]),d("footer",J,[d("section",null,[v(Q)?(r(),n(b,{key:0},[C(" 已选择 "),d("span",{style:L({color:"var(--c-primary-color)"})},g(Z.value.length),5),C(" 项 ")],64)):s("v-if",!0)]),p(v(P),{size:"small"},{default:h((()=>[p(v(V),{onClick:pe},{default:h((()=>[C("清空")])),_:1}),p(v(V),{onClick:le},{default:h((()=>[C("取消")])),_:1}),p(v(V),{type:"primary",onClick:de},{default:h((()=>[C("确定")])),_:1})])),_:1})])]))}});export{K as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useAttrs as
|
|
1
|
+
import{useAttrs as e,onBeforeUnmount as t,inject as l,createVNode as o}from"vue";import{arrayed as n,widthAppend as a}from"../../../../shared/utils/index.js";import{isObject as r,isString as i,isFunction as s}from"lodash-es";import u from"../../../annotation-edit/index.js";import"../../index.js";import{InjectionIhoTableAnnotation as d,InjectionIhoTableConfig as m}from"../constants/index.js";import{getLowCodeFieldFromField as c,IhoTableRenderHelper as h}from"../utils/index.js";import{defineTablePlugin as p}from"../hooks/useTablePlugin.js";function f(){const f="headerPlugin";return p({name:f,apply(p){let v=null;p.setupHooks.setup.tap(f,(()=>{v=e(),t((()=>{v=null}))})),p.fieldHooks.field.tap(f,(e=>{var t;const p=null==(t=e.slots)?void 0:t.header;return e.slots={...e.slots,header:t=>function(e,t,c){var p;const f=l(d),x=l(m),b=l("$xetable"),j=e.column||{},g=r(null==f?void 0:f.value)&&!1!==t.annotation,w=h.isEditableColumn(x.value,j),W=h.hasFilter(t)||h.hasDateFiler(t),k=null==(p=t.titlePrefix)?void 0:p.content,y=i(c)?c:s(c)?c(e):null;let D=!1;if(x.value){const e=x.value.editRules&&x.value.editRules[j.field];e&&(D=n(e).some((e=>e.required)))}const M=x.value.border?Math.max(2,Math.ceil(b.reactData.scrollbarWidth/b.reactData.tableColumn.length)):1,P=a(Math.max(0,j.renderWidth-20-M-(D?14:0)-(g?18:0)-(W?23:0)-(w?22:0)-(k?20:0)-(j.sortable?23:0)));return o("section",{class:"iho-table__headerWrapper"},[o("section",{style:{width:P}},[null!=y?y:o("div",{style:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},[function(){const e=j.title,t=/\\n|\n|\r/g;if(!t.test(e))return e;const l=e.replace(t,"<br>").split("<br>");return l.map(((e,t)=>[e,t===l.length-1?null:o("br",null,null)]))}()])]),g?o(u,{modelValue:f.value[j.field],"onUpdate:modelValue":e=>f.value[j.field]=e,shortcuts:v&&(v["annotation-shortcuts"]||v.annotationShortcuts)||[]},null):null])}(t,c(e),p)},e}))}})}export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"./anchorPlugin/index.js";import*as r from"./bindEventSettingPlugin
|
|
1
|
+
import*as e from"./anchorPlugin/index.js";import*as r from"./bindEventSettingPlugin.js";import*as i from"./colorAndIconPlugin.js";import*as n from"./copyPastePlugin.js";import*as s from"./defaultConfigPlugin.js";import*as t from"./defaultValuePlugin.js";import*as l from"./dragScrollPlugin.js";import*as d from"./filterDaterangeRenderPlugin/index.js";import*as g from"./filterRenderPlugin/index.js";import*as o from"./filterVisibleEventPlugin.js";import*as u from"./forceArrowKeyPlugin.js";import*as a from"./headerPlugin.js";import*as P from"./highLightSetPlugin.js";import*as m from"./keyboardEventPlugin.js";import*as f from"./lowCodeFieldAdaptorPlugin.js";import*as p from"./maxCheckSizePlugin.js";import*as x from"./operationalFormPlugin.js";import*as j from"./rendererPlugins/editableWidgets/dateRendererPlugin/index.js";import*as b from"./rendererPlugins/editableWidgets/inputRendererPlugin.js";import*as c from"./rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js";import*as R from"./rendererPlugins/editableWidgets/numberRendererPlugin.js";import*as w from"./rendererPlugins/editableWidgets/radioRendererPlugin.js";import*as h from"./rendererPlugins/editableWidgets/selectRendererPlugin/index.js";import*as W from"./rendererPlugins/editableWidgets/separateRendererPlugin/index.js";import*as v from"./rendererPlugins/editableWidgets/switchRendererPlugin.js";import*as S from"./rendererPlugins/editableWidgets/timeRendererPlugin/index.js";import*as k from"./rendererPlugins/widgets/checkRendererPlugin.js";import*as C from"./rendererPlugins/widgets/colorRendererPlugin.js";import*as y from"./rendererPlugins/widgets/defaultRendererPlugin.js";import*as A from"./rendererPlugins/widgets/htmlRendererPlugin.js";import*as E from"./rendererPlugins/widgets/labelRendererPlugin.js";import*as D from"./rendererPlugins/widgets/pictureRendererPlugin.js";import*as F from"./rendererPlugins/widgets/seqRendererPlugin.js";import*as T from"./rowClickPlugin.js";import*as V from"./rowDragPlugin.js";import*as q from"./rowGroupSettingPlugin/index.js";import*as z from"./varialbleHeightPlugin.js";import*as G from"./verticalTablePlugin/index.js";import*as H from"./virtualTreePlugin.js";import*as I from"./wordbookSettingPlugin.js";import{separateMetaModule as K}from"../../../../shared/utils/index.js";var L=K(Object.assign({"./anchorPlugin/index.tsx":e,"./bindEventSettingPlugin.ts":r,"./colorAndIconPlugin.ts":i,"./copyPastePlugin.ts":n,"./defaultConfigPlugin.ts":s,"./defaultValuePlugin.ts":t,"./dragScrollPlugin.ts":l,"./filterDaterangeRenderPlugin/index.tsx":d,"./filterRenderPlugin/index.tsx":g,"./filterVisibleEventPlugin.ts":o,"./forceArrowKeyPlugin.ts":u,"./headerPlugin.tsx":a,"./highLightSetPlugin.tsx":P,"./keyboardEventPlugin.ts":m,"./lowCodeFieldAdaptorPlugin.tsx":f,"./maxCheckSizePlugin.ts":p,"./operationalFormPlugin.ts":x,"./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx":j,"./rendererPlugins/editableWidgets/inputRendererPlugin.tsx":b,"./rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.tsx":c,"./rendererPlugins/editableWidgets/numberRendererPlugin.tsx":R,"./rendererPlugins/editableWidgets/radioRendererPlugin.tsx":w,"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx":h,"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx":W,"./rendererPlugins/editableWidgets/switchRendererPlugin.tsx":v,"./rendererPlugins/editableWidgets/timeRendererPlugin/index.tsx":S,"./rendererPlugins/widgets/checkRendererPlugin.tsx":k,"./rendererPlugins/widgets/colorRendererPlugin.tsx":C,"./rendererPlugins/widgets/defaultRendererPlugin.tsx":y,"./rendererPlugins/widgets/htmlRendererPlugin.tsx":A,"./rendererPlugins/widgets/labelRendererPlugin.tsx":E,"./rendererPlugins/widgets/pictureRendererPlugin.tsx":D,"./rendererPlugins/widgets/seqRendererPlugin.tsx":F,"./rowClickPlugin.ts":T,"./rowDragPlugin.ts":V,"./rowGroupSettingPlugin/index.ts":q,"./varialbleHeightPlugin.tsx":z,"./verticalTablePlugin/index.ts":G,"./virtualTreePlugin.ts":H,"./wordbookSettingPlugin.ts":I}));export{L as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function keyboardEventPlugin(): import("
|
|
1
|
+
export declare function keyboardEventPlugin(): import("../../../../components/iho-table").TablePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
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
|
-
export declare function lowCodeFieldAdaptorPlugin(): import("
|
|
1
|
+
export declare function lowCodeFieldAdaptorPlugin(): import("../../../../components/iho-table").TablePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isObject as e,isFunction as t,cloneDeep as i}from"lodash-es";import{toRaw as o,h as l}from"vue";import{HIGHEST_PRIORITY as s,IHO_TABLE_FIXED_STATUS as n,WIDGET_TYPE as d}from"../constants/index.js";import{defineTablePlugin as r}from"../hooks/useTablePlugin.js";import{getDefaultValue as a}from"./rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js";import{IhoTableStatusHelper as f,IhoTableUtils as c}from"../utils/index.js";function m(){const m="lowCodeFieldAdaptorPlugin";return r({name:m,apply(r){r.fieldHooks.field.tap({name:m,stage:s},((s,r,m)=>{const p=s,u={className:p.bold?"iho-table__boldCell":"",field:p.columnName,showOverflow:"ellipsis",visible:f.notNegative(p.isShow),minWidth:p.colWidth,sortable:f.isPositive(p.isSort),fixed:n[p.isFixed],...p,title:p.alias||p.title};return function(e,i){const o={default:i.slotFn,header:i.headerSlotFn,edit:i.editSlotFn,footer:i.footerSlotFn,...i.slots};if(t(i.checkEditStatus)){const{default:e}=o;t(e)&&(o.default=t=>i.checkEditStatus(t)?e(t):[l("span",null,a(t.row,t.column.editRender.props))])}e.slots=o}(u,p),function(l,s,n){var r,a;const m=i(o(s));m.componentProps={size:"mini"===n.size?"small":n.size,...m.componentProps},n.forceClearable&&(m.componentProps.clearable=!0);l.editRender={name:c.getCellType(s),...l.editRender,props:m},l.editRender.enabled=!Reflect.get(d,l.editRender.name),!l.editRender.enabled&&t(null==(r=l.slots)?void 0:r.default)&&(l.editRender.enabled=t(null==(a=l.slots)?void 0:a.edit));if(!e(s.settingObj))return;Reflect.has(s.settingObj,"isHide")&&(l.visible=l.visible&&f.notPositive(s.settingObj.isHide))}(u,p,m),u})),r.fieldHooks.field.tap({name:m+"After",stage:1e3},(t=>(e(t.slots)&&Object.entries(t.slots).forEach((([e,i])=>{null==i&&Reflect.deleteProperty(t.slots,e)})),t)))}})}export{m as lowCodeFieldAdaptorPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function operationalFormPlugin(): import("
|
|
1
|
+
export declare function operationalFormPlugin(): import("../../../../components/iho-table").TablePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../../../../shared/utils/index.js";import{format as o}from"date-fns";import"../../index.js";import{isFunction as n,isNumber as t,isDate as e}from"lodash-es";import{EDITABLE_WIDGET_TYPE as r}from"../constants/index.js";import{getLowCodeFieldFromField as i,IhoTableUtils as s}from"../utils/index.js";import{getOperationalFormHandler as a,getDateOperationalFormHandler as m}from"../../../../shared/utils/business.js";import{defineTablePlugin as l}from"../hooks/useTablePlugin.js";function u(){const u="operationalFormPlugin";return l({name:u,apply(l){l.configHooks.config.tap(u,(l=>{const u=l.onFormChange;return l.onFormChange=function(d){const{column:p,row:f,$table:c}=d;!function(n,u){const{operationalFormHandler:d}=a(l.operationalForm||l.operationForm,(o=>n[o]),((o,t)=>{u.getColumns().some((n=>n.field===o))&&(n[o]=t)})),{dateOperationalFormHandler:p}=m(l.dateOperationalForm,(o=>n[o]),((a,m)=>{const l=u.getColumns().find((o=>o.field===a));if(!l)return;const d=i(l);d&&[r.DATE,r.TIME].includes(s.getCellType(d))&&(m=t(m)||e(m)?o(new Date(m),d.valueFormat||"yyyy-MM-dd HH:mm:ss"):null),n[a]=m}));return function(o){d(o),p(o)}}(f,c)(p.field),n(u)&&u(d)},l}))}})}export{u as operationalFormPlugin};
|
|
@@ -30,6 +30,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
30
30
|
type: StringConstructor;
|
|
31
31
|
default: string;
|
|
32
32
|
};
|
|
33
|
+
isDateDisabled: {
|
|
34
|
+
type: PropType<(current: number, row: AnyObject) => boolean>;
|
|
35
|
+
};
|
|
36
|
+
isTimeDisabled: {
|
|
37
|
+
type: PropType<(current: number, row: AnyObject) => {
|
|
38
|
+
isHourDisabled: boolean;
|
|
39
|
+
isMinuteDisabled: boolean;
|
|
40
|
+
isSecondDisabled: boolean;
|
|
41
|
+
}>;
|
|
42
|
+
};
|
|
33
43
|
}, {
|
|
34
44
|
attr: AnyObject;
|
|
35
45
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -61,6 +71,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
61
71
|
type: StringConstructor;
|
|
62
72
|
default: string;
|
|
63
73
|
};
|
|
74
|
+
isDateDisabled: {
|
|
75
|
+
type: PropType<(current: number, row: AnyObject) => boolean>;
|
|
76
|
+
};
|
|
77
|
+
isTimeDisabled: {
|
|
78
|
+
type: PropType<(current: number, row: AnyObject) => {
|
|
79
|
+
isHourDisabled: boolean;
|
|
80
|
+
isMinuteDisabled: boolean;
|
|
81
|
+
isSecondDisabled: boolean;
|
|
82
|
+
}>;
|
|
83
|
+
};
|
|
64
84
|
}>> & {
|
|
65
85
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
66
86
|
}>>;
|
|
@@ -73,7 +93,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
73
93
|
timePickerProps: {
|
|
74
94
|
format: string | undefined;
|
|
75
95
|
};
|
|
76
|
-
isDateDisabled: (ts: number) =>
|
|
96
|
+
isDateDisabled: (ts: number) => boolean;
|
|
77
97
|
isTimeDisabled: ((ts: number) => any) | undefined;
|
|
78
98
|
type: any;
|
|
79
99
|
clearable: boolean;
|
|
@@ -196,6 +216,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
196
216
|
type: StringConstructor;
|
|
197
217
|
default: string;
|
|
198
218
|
};
|
|
219
|
+
isDateDisabled: {
|
|
220
|
+
type: PropType<(current: number, row: AnyObject) => boolean>;
|
|
221
|
+
};
|
|
222
|
+
isTimeDisabled: {
|
|
223
|
+
type: PropType<(current: number, row: AnyObject) => {
|
|
224
|
+
isHourDisabled: boolean;
|
|
225
|
+
isMinuteDisabled: boolean;
|
|
226
|
+
isSecondDisabled: boolean;
|
|
227
|
+
}>;
|
|
228
|
+
};
|
|
199
229
|
}>> & {
|
|
200
230
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
201
231
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as t,inject as i,ref as n,computed as r,openBlock as l,createBlock as
|
|
1
|
+
import{defineComponent as e,useAttrs as t,inject as i,ref as n,computed as r,openBlock as l,createBlock as a,unref as o,mergeProps as s,isRef as u}from"vue";import{generateTimeFormat as d}from"../../../../../../../shared/utils/index.js";import{isFunction as c}from"lodash-es";import{useIhoTableFormEvent as m}from"../../../../utils/index.js";import D from"../../../../../../date-picker/index.js";var f=e({__name:"editDate",props:{value:{type:String,default:null},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0},isStartDate:{type:Boolean,default:!1},isEndDate:{type:Boolean,default:!1},connectField:{type:String,default:"-_-"},isDateDisabled:{type:Function},isTimeDisabled:{type:Function}},emits:["update:value"],setup(e,{emit:f}){const p=e,v=t(),w=i("$xetable"),{emitFormChangeWithParams:b}=m({...p,$table:w}),F=n(),g=r({get:()=>p.value?p.value:null,set(e){const t=p.value;if(t===e)return;const{isDateDisabled:i,isTimeDisabled:n}=y.value;if(e){const t=Date.parse(e);if(i(t))return;const{isHourDisabled:r,isMinuteDisabled:l,isSecondDisabled:a}=(null==n?void 0:n(t))||{},{h:o,m:s,s:u}=h(new Date(e)),d=null==r?void 0:r(o),c=null==l?void 0:l(s,o),m=null==a?void 0:a(u,s,o);if(d||c||m)return}f("update:value",e),b({oldValue:t})}}),y=r((()=>{const{valueFormat:e,format:t,type:i="datetime"}=v;return{type:i,clearable:!0,allowedInvalidValue:"-",...v,timePickerProps:{format:d(e||t)},isDateDisabled:e=>{var t;return(null==(t=p.isDateDisabled)?void 0:t.call(p,e,p.row))||function(e){return!!p.row[p.connectField]&&T(e,p.isEndDate?new Date(`${p.row[p.connectField].split(" ")[0]} 00:00:00`).getTime():new Date(p.row[p.connectField]).getTime())}(e)},isTimeDisabled:(null==i?void 0:i.includes("time"))?S(p.isTimeDisabled)||$:void 0}}));function T(e,t){return p.isStartDate&&p.connectField?e>t:!(!p.isEndDate||!p.connectField)&&e<t}function $(e){const t=new Date(p.row[p.connectField]),i=new Date(e),{h:n,m:r,s:l}=h(t),a=(e,t,i,n)=>!(p.isEndDate&&i>n)&&(!(p.isStartDate&&i<n)&&T(e,t));return{isHourDisabled:t=>{if(!p.row[p.connectField])return!1;const r=new Date(`${p.row[p.connectField].split(" ")[0]} 00:00:00`).getTime(),{m:l,s:o}=h(i);return a(t,n,e-60*t*60*1e3-60*l*1e3-1e3*o,r)},isMinuteDisabled:t=>{if(!p.row[p.connectField])return!1;const l=new Date(`${p.row[p.connectField].split(" ")[0]} ${n}:00:00`).getTime(),{s:o}=h(i);return a(t,r,e-60*t*1e3-1e3*o,l)},isSecondDisabled:t=>{if(!p.row[p.connectField])return!1;const i=new Date(`${p.row[p.connectField].split(" ")[0]} ${n}:${r}:00`).getTime();return a(t,l,e-1e3*t,i)}}}function S(e){return c(e)?t=>e(t,p.row):null}function h(e){return{h:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}return(e,t)=>(l(),a(o(D),s({ref_key:"formRef",ref:F},o(y),{"formatted-value":o(g),"onUpdate:formatted-value":t[0]||(t[0]=e=>u(g)?g.value=e:null)}),null,16,["formatted-value"]))}});export{f as default};
|