cnhis-design-vue 3.1.53-release.0 → 3.1.53-release.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/annotation-edit/src/AnnotationEdit.js +1 -1
- package/es/components/big-table/src/components/edit-form/edit-separate.vue.d.ts +4 -4
- package/es/components/big-table/src/hooks/useEdit.d.ts +4 -4
- package/es/components/big-table/src/hooks/useSeparateRow.d.ts +4 -4
- package/es/components/body-select/index.d.ts +9 -4
- package/es/components/body-select/src/config/index.js +1 -1
- package/es/components/body-select/src/hooks/renderCanvas.d.ts +1 -1
- package/es/components/body-select/src/hooks/renderCanvas.js +1 -1
- package/es/components/body-select/src/index.vue.d.ts +9 -4
- package/es/components/body-select/src/index.vue2.js +1 -1
- package/es/components/button-print/index.d.ts +9 -0
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +9 -0
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/utils/dialog.d.ts +2 -2
- package/es/components/button-print/src/utils/print.d.ts +14 -13
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +69 -6
- package/es/components/card-reader-sdk/src/types/index.d.ts +3 -3
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
- package/es/components/form-config/index.d.ts +105 -26
- package/es/components/form-config/src/FormConfig.vue.d.ts +106 -27
- package/es/components/form-config/src/FormConfig.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +30 -6
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +51 -12
- package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -1
- package/es/components/form-render/index.d.ts +30 -6
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +31 -7
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +31 -7
- package/es/components/form-render/src/components/renderer/{combination.d.ts → combination/combination.d.ts} +1 -1
- package/es/components/form-render/src/components/renderer/combination/combination.js +1 -0
- package/es/components/form-render/src/components/renderer/combination/hooks/index.d.ts +2 -0
- package/es/components/form-render/src/components/renderer/combination/hooks/index.js +1 -0
- package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.d.ts +8 -0
- package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.js +1 -0
- package/es/components/form-render/src/components/renderer/combination/index.d.ts +3 -0
- package/es/components/form-render/src/components/renderer/combination/index.js +1 -0
- package/es/components/form-render/src/components/renderer/combination/jsonCombination.js +1 -0
- package/es/components/form-render/src/components/renderer/combination/tableCombination.d.ts +61 -0
- package/es/components/form-render/src/components/renderer/combination/tableCombination.js +1 -0
- package/es/components/form-render/src/components/renderer/index.js +1 -1
- package/es/components/form-render/src/components/renderer/inputNumber.d.ts +5 -5
- package/es/components/form-render/src/components/renderer/{levelSearchCascader.d.ts → levelSearchCascader/index.d.ts} +3 -5
- package/es/components/form-render/src/components/renderer/levelSearchCascader/index.js +1 -0
- package/es/components/form-render/src/components/renderer/searchCascade.d.ts +3 -3
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +5 -5
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/constants/index.d.ts +3 -2
- package/es/components/form-render/src/hooks/index.d.ts +0 -2
- package/es/components/form-render/src/hooks/index.js +1 -1
- package/es/components/form-render/src/hooks/useAnchor.d.ts +3 -3
- package/es/components/form-render/src/hooks/useCommonInjection.d.ts +2 -2
- package/es/components/form-render/src/hooks/useFieldListAdaptor.d.ts +2 -2
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +10 -2
- package/es/components/form-render/src/hooks/useFormContext.d.ts +3 -3
- package/es/components/form-render/src/hooks/useFormContext.js +1 -1
- package/es/components/form-render/src/hooks/useFormItemDeps.d.ts +3 -3
- package/es/components/form-render/src/hooks/useFormRenderLifeCycle.d.ts +9 -1
- package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +5 -5
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +5 -26
- package/es/components/form-render/src/types/index.d.ts +7 -14
- package/es/components/form-render/src/utils/index.d.ts +1 -2
- package/es/components/form-render/src/utils/index.js +1 -1
- package/es/components/form-render/src/utils/schema.d.ts +2 -2
- package/es/components/form-render/src/utils/schema.js +1 -1
- package/es/components/guide/src/renderer.js +1 -1
- package/es/components/iho-table/index.d.ts +39 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +40 -0
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
- package/es/components/iho-table/src/constants/index.d.ts +4 -1
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +2 -2
- package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +2 -2
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
- package/es/components/iho-table/src/plugins/defaultValuePlugin.js +1 -1
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +2 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.d.ts +552 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue2.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +5 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.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/editSeparate.vue.d.ts +2 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/wordbookSettingPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/wordbookSettingPlugin.js +1 -0
- package/es/components/iho-table/src/types/index.d.ts +7 -2
- package/es/components/iho-table/src/types/pluginType.d.ts +3 -3
- package/es/components/iho-table/src/utils/index.d.ts +1 -1
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +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 +97 -29
- package/es/components/info-header/src/InfoHeader.vue.d.ts +98 -30
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +9 -5
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +10 -6
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +41 -13
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +30 -6
- package/es/components/keyboard/src/Keyboard.vue2.js +1 -1
- package/es/components/search-cascader/index.d.ts +23 -3
- package/es/components/search-cascader/src/SearchCascader.vue.d.ts +24 -4
- package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
- package/es/components/search-cascader/src/components/ClearIcon.vue.js +1 -0
- package/es/components/shortcut-setter/index.d.ts +34 -9
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +35 -10
- package/es/components/steps-wheel/src/StepsWheel.vue2.js +1 -1
- package/es/components/time-picker/src/TimePicker.vue2.js +1 -1
- package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +4 -4
- package/es/shared/components/SlotRender/SlotRender.d.ts +5 -5
- package/es/shared/hooks/index.d.ts +3 -0
- package/es/shared/hooks/index.js +1 -1
- package/es/shared/hooks/selectHooks/index.d.ts +4 -0
- package/es/shared/hooks/selectHooks/index.js +1 -0
- package/es/shared/hooks/selectHooks/useOptionFiltered.d.ts +10 -0
- package/es/shared/hooks/selectHooks/useOptionFiltered.js +1 -0
- package/es/shared/hooks/selectHooks/useSearchContent.d.ts +6 -0
- package/es/shared/hooks/selectHooks/useSearchContent.js +1 -0
- package/es/shared/hooks/selectHooks/useSelectAllowModify.d.ts +23 -0
- package/es/shared/hooks/selectHooks/useSelectAllowModify.js +1 -0
- package/es/shared/hooks/selectHooks/useSelectRenders.d.ts +21 -0
- package/es/shared/hooks/selectHooks/useSelectRenders.js +1 -0
- package/es/shared/hooks/{useAsyncQueue.d.ts → useAsyncQueue/index.d.ts} +7 -15
- package/es/shared/hooks/useAsyncQueue/index.js +1 -0
- package/es/shared/hooks/useAsyncQueue/types.d.ts +20 -0
- package/es/shared/hooks/useAsyncQueue/types.js +1 -0
- package/es/shared/hooks/useDateTime.d.ts +2 -2
- package/es/shared/hooks/useFormRequest/index.d.ts +24 -0
- package/es/shared/hooks/useFormRequest/index.js +1 -0
- package/es/shared/hooks/useFormRequest/types.d.ts +39 -0
- package/es/shared/hooks/useFormRequest/types.js +1 -0
- package/es/shared/hooks/useLevelSearchCascader.d.ts +31 -0
- package/es/shared/hooks/useLevelSearchCascader.js +1 -0
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/business.d.ts +24 -0
- package/es/shared/types/index.d.ts +1 -1
- package/package.json +2 -2
- package/es/components/form-render/src/components/renderer/combination.js +0 -1
- package/es/components/form-render/src/components/renderer/jsonCombination/index.js +0 -1
- package/es/components/form-render/src/components/renderer/levelSearchCascader.js +0 -1
- package/es/components/form-render/src/hooks/useFormAsyncQueue.d.ts +0 -16
- package/es/components/form-render/src/hooks/useFormAsyncQueue.js +0 -1
- package/es/components/form-render/src/hooks/useFormRequest.d.ts +0 -26
- package/es/components/form-render/src/hooks/useFormRequest.js +0 -1
- package/es/shared/hooks/useAsyncQueue.js +0 -1
- /package/es/components/form-render/src/components/renderer/{jsonCombination → combination}/hooks/useDeepValidate.d.ts +0 -0
- /package/es/components/form-render/src/components/renderer/{jsonCombination → combination}/hooks/useDeepValidate.js +0 -0
- /package/es/components/form-render/src/components/renderer/{jsonCombination/index.d.ts → combination/jsonCombination.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as t,provide as a,ref as o,toRaw as l,watch as n,resolveComponent as
|
|
1
|
+
import{defineComponent as e,computed as t,provide as a,ref as o,toRaw as l,watch as n,resolveComponent as s,openBlock as r,createElementBlock as i,unref as u,normalizeStyle as c,createBlock as d,resolveDynamicComponent as f,createElementVNode as m,createVNode as v,mergeProps as p,createSlots as b,renderList as h,withCtx as g,createCommentVNode as x,renderSlot as k,normalizeProps as y,guardReactiveProps as D}from"vue";import{useTheme as C}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 T}from"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"naive-ui";import{widthAppend as _,uuidGenerator as A}from"../../../shared/utils/index.js";import{VxeTableEventNameList as L,InjectionIhoTableEmits as S,InjectionTableAsyncQueue as F,InjectionIhoTableAnnotation as O,InjectionIhoTableUUID as B,InjectionIhoTableInstance as E,InjectionIhoTableConfig as N,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 P,createDataTransfer as Q}from"./hooks/tapHooks/index.js";import{provideIhoTableEventListener as U}from"./hooks/tapHooks/useEventHooks.js";import{eventName2EventListener as V}from"./utils/index.js";const X=["id"];var Y=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",...L],setup(e,{expose:L,emit:Y}){var Z,ee;const te=e,ae=C({"--c-border-color":"#d0d0d0","--c-head-bg-color":"#f2f2f2","--c-hover-color":"#e6e6e6","--c-stripe-color":"#f6f6f6"}),oe=t((()=>{var e,t;const a=null!=(t=null==(e=te.tableConfig)?void 0:e.height)?t:"100%";return{height:"auto"===a?"100%":$(a)&&(a.includes("calc")||a.endsWith("%"))?a:_(a)}})),le=U(),ne=function(e,...t){Y(e,...t);const a=u(ce)[V(e)];w(a)&&a(...t),le.trigger(e,...t)};a(S,ne);const se=R(t((()=>te.requestInstance)),t((()=>!!te.uniqueCacheData))).create(te.parallelism,{beforeRequest:(e,t)=>t,afterRequest:(e,t)=>H(t)});a(F,se);const re=G();a(O,t((()=>te.annotation)));const ie=A();a(B,ie);const ue=o();a(E,ue);const ce=o({uuid:null!=(ee=null==(Z=te.tableConfig)?void 0:Z.uuid)?ee:ie});a(N,ce);const de=j(fe,10);function fe(){ce.value=J(re,te.tableConfig,{$table:ue,emits:ne}),ce.value.uuid=ie}const me=o([]);a(W,me);const ve=j(pe,10);function pe(){const e=K(re,te.fieldList,ce.value,{$table:ue,emits:ne});I(e,l(me.value),((e,t)=>{if(w(e)&&w(t))return e.toString()===t.toString()}))||(me.value=e)}const be=Q(re,ce,ue),he=o([]);async function ge(){var e,t;const a=await be(te.tableData),o=null==(e=ue.value)?void 0:e.getTableData().fullData;if(o){let e=0;if(!(o.some((t=>{var o;if(!(null==(o=ue.value)?void 0:o.isInsertByRow(t))){if(t!==a[e])return!0;e++}}))||e!==a.length))return}he.value=a,null==(t=ue.value)||t.recalculate(!0)}const xe={updateTableDataRef:j(ge,10),updateConfigRef:de,updateFieldListRef:ve};a(z,xe);const ke=M({hooks:re,config:ce,$table:ue,context:xe,emits:ne}),ye=t((()=>({...ce.value,...ke})));let De=!1,Ce=!1,je=!1;const $e=j((()=>{De&&fe(),Ce&&pe(),je&&ge(),De=!1,Ce=!1,je=!1}),10);n((()=>te.tableConfig),(()=>{De=!0,Ce=!0,je=!0,$e()}),{deep:!0}),n((()=>te.fieldList),(()=>{Ce=!0,je=!0,$e()}),{deep:!0}),n([()=>[...te.tableData],()=>{var e;return null==(e=te.tableData)?void 0:e.length}],(()=>{je=!0,$e()})),n([()=>te.tableData,()=>{var e;return null==(e=te.tableData)?void 0:e.length}],(async()=>{var e,t;(null==(e=ce.value.treeConfig)?void 0:e.expandAll)&&(await T(11),null==(t=ue.value)||t.setAllTreeExpand(!0))})),fe(),pe(),ge();const{header:Ie,footer:we}=P(re);function qe(e){return q(e,["row","rowIndex","$rowIndex","column","columnIndex","$columnIndex","_columnIndex","checked","disabled","indeterminate"])}return L({$table:ue,async loadData(e){var t;null==(t=ue.value)||t.loadData(await be(e))},setSort:(e,t)=>({field:e,value:t}),setFilter:(e,t)=>({field:e,value:t}),reload(){var e,t;null==(e=ue.value)||e.loadColumn([]),null==(t=ue.value)||t.loadData([]),fe(),pe(),ge()},...re.exposeHooks.expose.call({},ce,{$table:ue,emits:ne})}),re.setupHooks.setup.call(ce,me,{$table:ue,emits:ne}),(e,t)=>{const a=s("vxe-grid");return r(),i("section",{class:"iho-table",id:u(ie),style:c(u(ae))},[(r(),d(f(u(Ie)))),m("section",{style:c(u(oe))},[v(a,p({ref_key:"$table",ref:ue},u(ye),{columns:me.value,data:he.value}),b({_:2},[h(e.$slots,((t,a)=>({name:a,fn:g((t=>[x(" 实际上所有的vxe-grid插槽都支持 "),k(e.$slots,a,y(D(qe(t))))]))})))]),1040,["columns","data"])],4),(r(),d(f(u(we))))],12,X)}}});export{Y as default};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FormRequestDefine } from '../../../../../es/shared/hooks';
|
|
1
2
|
import { Nullable, UndefinedAble } from '../../../../../es/shared/types';
|
|
2
3
|
import { ComputedRef, InjectionKey, Ref } from 'vue';
|
|
3
4
|
import { VxeTableInstance } from 'vxe-table';
|
|
@@ -51,7 +52,8 @@ export declare enum EDITABLE_WIDGET_TYPE {
|
|
|
51
52
|
DATE = "DATE",
|
|
52
53
|
TIME = "TIME",
|
|
53
54
|
NUMBER = "NUMBER",
|
|
54
|
-
RADIO = "RADIO"
|
|
55
|
+
RADIO = "RADIO",
|
|
56
|
+
LEVEL_SEARCH_CASCADE = "LEVEL_SEARCH_CASCADE"
|
|
55
57
|
}
|
|
56
58
|
export declare enum IHO_TABLE_NUMBER_STATUS {
|
|
57
59
|
NEGATIVE = 0,
|
|
@@ -81,3 +83,4 @@ export declare const InjectionIhoTableUUID: InjectionKey<string>;
|
|
|
81
83
|
export declare const InjectionIhoTableInstance: InjectionKey<Ref<UndefinedAble<VxeTableInstance>>>;
|
|
82
84
|
export declare const InjectionIhoTableHandler: InjectionKey<IhoTableHandler>;
|
|
83
85
|
export declare const InjectionIhoTableEventListener: InjectionKey<IhoTableEventListener>;
|
|
86
|
+
export declare const InjectionTableAsyncQueue: InjectionKey<FormRequestDefine.FormAsyncQueue>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{eventListener2EventName as e}from"../utils/index.js";var o=(e=>(e.DEFAULT="DEFAULT",e.PICTURE="PICTURE",e.FILE="FILE",e.MONEY="MONEY",e.HEADPORTRAIT="HEADPORTRAIT",e.LABEL="LABEL",e.TELEPHONE="TELEPHONE",e.BIRTHDAY="BIRTHDAY",e.MULTISELECT="MULTISELECT",e.CASCADE="CASCADE",e.SEARCH_TREE="SEARCH_TREE",e.COLOR="COLOR",e.EVALUATE="EVALUATE",e.MAP="MAP",e.VIDEO="VIDEO",e.SYSTEMFIELDS="SYSTEMFIELDS",e.PERCENTAGE="PERCENTAGE",e.HTML="HTML",e.CANDIDATE_COMPONENTS="CANDIDATE_COMPONENTS",e.TASKDATE="TASKDATE",e.AGE="AGE",e.STATUS="STATUS",e.WEBSITE="WEBSITE",e.IDCARD="IDCARD",e.COUNTDOWN="COUNTDOWN",e.DURATION="DURATION",e.COMBINATION="COMBINATION",e.PASSWORD="PASSWORD",e.QR_CODE="QR_CODE",e.CUSTOMER_NAME="CUSTOMER_NAME",e.BANK_CARD="BANK_CARD",e.SEQUENCE="SEQUENCE",e))(o||{});const n=Object.freeze(["onKeydownStart","onKeydown","onKeydownEnd","onPaste","onCopy","onCut","onCurrentChange","onRadioChange","onCheckboxChange","onCheckboxAll","onCheckboxRangeStart","onCheckboxRangeChange","onCheckboxRangeEnd","onCellClick","onCellDblclick","onCellMenu","onCellMouseenter","onCellMouseleave","onHeaderCellClick","onHeaderCellDblclick","onHeaderCellMenu","onFooterCellClick","onFooterCellDblclick","onFooterCellMenu","onSortChange","onFilterChange","onFilterVisible","onResizableChange","onToggleRowExpand","onToggleTreeExpand","onMenuClick","onEditClosed","onEditActived","onEditDisabled","onValidError","onScroll","onCustom","onOpenFnr","onFnrChange","onFnrFind","onFnrFindAll","onFnrReplace","onFnrReplaceAll","onCellAreaCopy","onCellAreaCut","onCellAreaPaste","onCellAreaMerge","onClearCellAreaMerge","onHeaderCellAreaSelection","onCellAreaSelectionStart","onCellAreaSelectionDrag","onCellAreaSelectionEnd","onCellAreaExtensionStart","onCellAreaExtensionDrag","onCellAreaExtensionEnd","onCellAreaArrowsStart","onCellAreaArrowsEnd","onActiveCellChangeStart","onActiveCellChangeEnd","onPageChange"]),E=n.map(e),l=Object.freeze(["firstRowGroup","secondRowGroup","thirdRowGroup","fourthRowGroup","fifthRowGroup","sixthRowGroup","seventhRowGroup","eighthRowGroup","ninthRowGroup","tenthRowGroup"]),C=-1/0,A=1/0;var T=(e=>(e.INPUT="INPUT",e.SEPARATE="SEPARATE",e.SELECT="SELECT",e.SELECT_MORE="SELECT_MORE",e.DATE="DATE",e.TIME="TIME",e.NUMBER="NUMBER",e.RADIO="RADIO",e))(T||{}),r=(e=>(e[e.NEGATIVE=0]="NEGATIVE",e[e.POSITIVE=1]="POSITIVE",e))(r||{}),t=(e=>(e.NEGATIVE="0",e.POSITIVE="1",e))(t||{}),a=(e=>(e.NOT_TREE="0",e.UNKNOWN="1",e.TRANSFORM_TREE_TYPE="2",e.TRANSFORM_WITH_SPAN_METHOD="3",e))(a||{}),S=(e=>(e[e.left=1]="left",e[e.right=2]="right",e))(S||{});const
|
|
1
|
+
import{eventListener2EventName as e}from"../utils/index.js";var o=(e=>(e.DEFAULT="DEFAULT",e.PICTURE="PICTURE",e.FILE="FILE",e.MONEY="MONEY",e.HEADPORTRAIT="HEADPORTRAIT",e.LABEL="LABEL",e.TELEPHONE="TELEPHONE",e.BIRTHDAY="BIRTHDAY",e.MULTISELECT="MULTISELECT",e.CASCADE="CASCADE",e.SEARCH_TREE="SEARCH_TREE",e.COLOR="COLOR",e.EVALUATE="EVALUATE",e.MAP="MAP",e.VIDEO="VIDEO",e.SYSTEMFIELDS="SYSTEMFIELDS",e.PERCENTAGE="PERCENTAGE",e.HTML="HTML",e.CANDIDATE_COMPONENTS="CANDIDATE_COMPONENTS",e.TASKDATE="TASKDATE",e.AGE="AGE",e.STATUS="STATUS",e.WEBSITE="WEBSITE",e.IDCARD="IDCARD",e.COUNTDOWN="COUNTDOWN",e.DURATION="DURATION",e.COMBINATION="COMBINATION",e.PASSWORD="PASSWORD",e.QR_CODE="QR_CODE",e.CUSTOMER_NAME="CUSTOMER_NAME",e.BANK_CARD="BANK_CARD",e.SEQUENCE="SEQUENCE",e))(o||{});const n=Object.freeze(["onKeydownStart","onKeydown","onKeydownEnd","onPaste","onCopy","onCut","onCurrentChange","onRadioChange","onCheckboxChange","onCheckboxAll","onCheckboxRangeStart","onCheckboxRangeChange","onCheckboxRangeEnd","onCellClick","onCellDblclick","onCellMenu","onCellMouseenter","onCellMouseleave","onHeaderCellClick","onHeaderCellDblclick","onHeaderCellMenu","onFooterCellClick","onFooterCellDblclick","onFooterCellMenu","onSortChange","onFilterChange","onFilterVisible","onResizableChange","onToggleRowExpand","onToggleTreeExpand","onMenuClick","onEditClosed","onEditActived","onEditDisabled","onValidError","onScroll","onCustom","onOpenFnr","onFnrChange","onFnrFind","onFnrFindAll","onFnrReplace","onFnrReplaceAll","onCellAreaCopy","onCellAreaCut","onCellAreaPaste","onCellAreaMerge","onClearCellAreaMerge","onHeaderCellAreaSelection","onCellAreaSelectionStart","onCellAreaSelectionDrag","onCellAreaSelectionEnd","onCellAreaExtensionStart","onCellAreaExtensionDrag","onCellAreaExtensionEnd","onCellAreaArrowsStart","onCellAreaArrowsEnd","onActiveCellChangeStart","onActiveCellChangeEnd","onPageChange"]),E=n.map(e),l=Object.freeze(["firstRowGroup","secondRowGroup","thirdRowGroup","fourthRowGroup","fifthRowGroup","sixthRowGroup","seventhRowGroup","eighthRowGroup","ninthRowGroup","tenthRowGroup"]),C=-1/0,A=1/0;var T=(e=>(e.INPUT="INPUT",e.SEPARATE="SEPARATE",e.SELECT="SELECT",e.SELECT_MORE="SELECT_MORE",e.DATE="DATE",e.TIME="TIME",e.NUMBER="NUMBER",e.RADIO="RADIO",e.LEVEL_SEARCH_CASCADE="LEVEL_SEARCH_CASCADE",e))(T||{}),r=(e=>(e[e.NEGATIVE=0]="NEGATIVE",e[e.POSITIVE=1]="POSITIVE",e))(r||{}),t=(e=>(e.NEGATIVE="0",e.POSITIVE="1",e))(t||{}),a=(e=>(e.NOT_TREE="0",e.UNKNOWN="1",e.TRANSFORM_TREE_TYPE="2",e.TRANSFORM_WITH_SPAN_METHOD="3",e))(a||{}),S=(e=>(e[e.left=1]="left",e[e.right=2]="right",e))(S||{});const R=["formChange","settingClick","formClick","keyboard","rowDrag"],i=[...R,...E],I=Symbol("injectionIhoTableConfig"),D=Symbol("injectionIhoTableFieldList"),O=Symbol("InjectionIhoTableEmits"),c=Symbol("InjectionIhoTableAnnotation"),N=Symbol("InjectionIhoTableUUID"),h=Symbol("InjectionIhoTableInstance"),M=Symbol("InjectionIhoTableHandler"),b=Symbol("InjectionIhoTableEventListener"),L=Symbol("InjectionTableAsyncQueue");export{T as EDITABLE_WIDGET_TYPE,C as HIGHEST_PRIORITY,S as IHO_TABLE_FIXED_STATUS,r as IHO_TABLE_NUMBER_STATUS,t as IHO_TABLE_STRING_STATUS,a as IHO_TABLE_TREE_TYPE,R as IhoTableCustomEventNameTuple,i as IhoTableEventNameTuple,l as IhoTableRowGroupSequence,c as InjectionIhoTableAnnotation,I as InjectionIhoTableConfig,O as InjectionIhoTableEmits,b as InjectionIhoTableEventListener,D as InjectionIhoTableFieldList,M as InjectionIhoTableHandler,h as InjectionIhoTableInstance,N as InjectionIhoTableUUID,L as InjectionTableAsyncQueue,A as LOWEST_PRIORITY,n as VxeEventListenerNameList,E as VxeTableEventNameList,o as WIDGET_TYPE};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnyFn } from '../../../../../../es/shared/types';
|
|
2
2
|
import { AsyncParallelHook } from '../../../../../../es/shared/utils/tapable';
|
|
3
3
|
import { AbstractEventHooks, IhoTableEmitPayload, IhoTableEventNameUnion } from '../../../../../../es/components/iho-table/src/types';
|
|
4
4
|
declare class EventHooks extends AbstractEventHooks {
|
|
@@ -69,7 +69,7 @@ export declare function useEventHooks(): {
|
|
|
69
69
|
create: () => EventHooks;
|
|
70
70
|
};
|
|
71
71
|
export declare class IhoTableEventListener {
|
|
72
|
-
eventMap: Map<"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", Set<
|
|
72
|
+
eventMap: Map<"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", Set<AnyFn<any[], any>>>;
|
|
73
73
|
addEventListener<T extends IhoTableEventNameUnion>(key: T, handler: (...payload: IhoTableEmitPayload<T>) => void): void;
|
|
74
74
|
trigger<T extends IhoTableEventNameUnion>(key: T, ...payload: IhoTableEmitPayload<T>): void;
|
|
75
75
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnyFn } from '../../../../../../es/shared/types';
|
|
2
2
|
import { SyncWaterfallHook } from '../../../../../../es/shared/utils/tapable';
|
|
3
3
|
import { AbstractExposeHooks } from '../../../../../../es/components/iho-table/src/types';
|
|
4
4
|
declare class ExposeHooks extends AbstractExposeHooks {
|
|
5
|
-
readonly expose: SyncWaterfallHook<[Record<string,
|
|
5
|
+
readonly expose: SyncWaterfallHook<[Record<string, AnyFn<any[], any>>, import("vue").Ref<import("../../../../../../es/components/iho-table/src/types").IhoTableConfig>, import("../../../../../../es/components/iho-table/src/types").IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
6
6
|
}
|
|
7
7
|
export declare function useExposeHooks(): {
|
|
8
8
|
create: () => ExposeHooks;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cloneDeep as e,isString as t,isFunction as n,pick as o,isArray as a,isNumber as i}from"lodash-es";import{isObject as r}from"@vue/shared";const
|
|
1
|
+
import{cloneDeep as e,isString as t,isFunction as n,pick as o,isArray as a,isNumber as i}from"lodash-es";import{isObject as r}from"@vue/shared";const l=Symbol("remove property");function s(){return{formConfigLikeAdaptor:function(s){const p={};return r(s)?{fieldList:function(s){const m=new Map([["NONE",0],["LEFT",1],["RIGHT",2]]),u=new Map([["0",0],["1",1]]),c=new Map([...["RADIO","RADIO_BLOCK","CHECKBOX","CHECKBOX_BLOCK","SELECT","SEARCH","SEARCH_MORE","SWITCH_COMPONENT"].map((e=>[e,"select"])),...["DATE"].map((e=>[e,"date"])),...["INPUT"].map((e=>[e,"input"])),...["DIGITAL"].map((e=>[e,"number"]))]),d=(e,t)=>{if(!r(e))return;const n={label:e.describe,...e};t.options=a(t.options)?[...t.options,n]:[n]},f=(e,n)=>{0!==e&&"0"!==e&&e&&(t(e)||i(e))&&(n.componentProps={maxTagCount:+e,...n.componentProps})},_=new Map([["multi_select_value",f],["is_null",(e,t,n,o)=>{"1"!==e&&"0"===e&&(o[n.val_key]=[{required:!0,message:"必填"}])}],["validate",(e,t)=>{if(!r(e))return;t.componentProps={...Object.entries({maxlength:"max_length",minlength:"min_length",max:"max_value",min:"min_value",precision:"decimal_length"}).reduce(((t,[n,o])=>(t[n]=e[o],t)),{}),...t.componentProps}}],["dateValidate",(e,t)=>{r(e)&&(t.isDateDisabled=(t,n)=>{if(!r(n))return;const{startDate:o,endDate:a}=e;let i=!1;return o&&(i=new Date(n[o]).getTime()>t),a&&(i=i||new Date(n[a]).getTime()<t),i})}],["default_val","defaultValue"],["date_format","valueFormat"],...["open","close"].map((e=>[e,d])),["is_edit",{property:"isEdit",valueMap:u}],["free_entry",(e,t,n)=>{t.componentProps={...t.componentProps,allowCreate:"1"===e||1===e,shouldSave:"1"===n.save_free_entry||1===n.save_free_entry}}],["html_type",(e,n,o)=>{var a;if(!t(e))return;if("DATE"===e)return void(n.formType=t(o.date_format)&&o.date_format.startsWith("HH:mm")?"time":"date");n.formType=null!=(a=c.get(e))?a:e;const i="SEARCH"!==e&&("SEARCH_MORE"===e||("SELECT"===e?"0"===o.multi_select:null));i&&(n.componentProps={multiple:i,...n.componentProps})}],["option",{property:"options",fieldMap:new Map([["text","label"]])}],...["alias","name"].map((e=>[e,(e,t,n)=>{var o;t.title=`${null!=(o=n.alias)?o:n.name}${n.suffix?`(${n.suffix})`:""}`}]))]),v=new Map([["sum","isSum"],["show","isShow"],["val_key","columnName"],["elementId","columnName"],["columnWidth","colWidth"],["fixedWayEnum",{property:"isFixed",valueMap:m}],["multi_select_value",f],..._,["setting",{fieldMap:_,assign:!0}]]);return s.map((e=>E(e,p,v)));function E(i,s,p){if(!p)return e(i);const m={};return Object.entries(i).forEach((([e,o])=>{const a=p.get(e);return a?a!==l?t(a)?m[a]=o:n(a)?a(o,m,i,s):void(r(a)&&(a.assign?Object.assign(m,u(o,a)):m[a.property||e]=u(o,a))):void 0:m[e]=o})),m.componentProps=Object.assign({},m.componentProps,o(m,["options","isDateDisabled"])),m;function u(e,t){var o,i;return!r(t)||n(t)?e:a(e)?e.map((e=>u(e,t))):r(e)?E(e,s,t.fieldMap):null!=(i=null==(o=t.valueMap)?void 0:o.get(e))?i:e}}}(s.fieldList),editRules:p}:{fieldList:[],editRules:p}}}}export{s as useColumnConfigAdaptor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{format as e}from"date-fns";import"../../index.js";import{EDITABLE_WIDGET_TYPE as t}from"../constants/index.js";import{getLowCodeFieldFromField as
|
|
1
|
+
import{format as e}from"date-fns";import"../../index.js";import{EDITABLE_WIDGET_TYPE as t}from"../constants/index.js";import{getLowCodeFieldFromField as a}from"../utils/index.js";import{defineTablePlugin as n}from"../hooks/useTablePlugin.js";function l(){const l="defaultValuePlugin",o=new Map([[t.TIME,({defaultValue:t,valueFormat:a="HH:mm"})=>"current"===t?e(Date.now(),a):t],[t.DATE,({defaultValue:t,valueFormat:a="yyyy-MM-dd HH:mm:ss"})=>"current"===t?e(Date.now(),a):t]]);function u(e){var t;const n=a(e);if(!n||null==n.defaultValue)return null;const l=null==(t=e.editRender)?void 0:t.name,u=l&&o.get(l);return u?u(n):n.defaultValue}return n({name:l,apply(e){const t=Object.freeze([]);let a=t;e.fieldHooks.field.tap(l,(e=>(e.editRender={defaultValue:({column:e})=>u(e),...e.editRender},e))),e.fieldHooks.fieldList.tap(l,(e=>a=e)),e.dataHooks.data.tap(l,(e=>{a.length&&a.forEach((t=>{if(null!=e[t.field])return;const a=u(t);null!=a&&(e[t.field]=a)}))})),e.dataHooks.dataEnd.tap(l,(()=>a=t))}})}export{l as defaultValuePlugin};
|
|
@@ -1 +1 @@
|
|
|
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/
|
|
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/levelSearchCascadePlugin/index.js";import*as R from"./rendererPlugins/editableWidgets/numberRendererPlugin.js";import*as b from"./rendererPlugins/editableWidgets/radioRendererPlugin.js";import*as w from"./rendererPlugins/editableWidgets/selectRendererPlugin/index.js";import*as c from"./rendererPlugins/editableWidgets/separateRendererPlugin/index.js";import*as h from"./rendererPlugins/editableWidgets/timeRendererPlugin/index.js";import*as W from"./rendererPlugins/widgets/checkRendererPlugin.js";import*as v from"./rendererPlugins/widgets/colorRendererPlugin.js";import*as S from"./rendererPlugins/widgets/defaultRendererPlugin.js";import*as k from"./rendererPlugins/widgets/htmlRendererPlugin.js";import*as C from"./rendererPlugins/widgets/labelRendererPlugin.js";import*as y from"./rendererPlugins/widgets/pictureRendererPlugin.js";import*as E from"./rendererPlugins/widgets/seqRendererPlugin.js";import*as A from"./rowClickPlugin/index.js";import*as D from"./rowDragPlugin/index.js";import*as F from"./rowGroupSettingPlugin/index.js";import*as V from"./varialbleHeightPlugin/index.js";import*as q from"./virtualTreePlugin/index.js";import*as z from"./wordbookSettingPlugin.js";import{separateMetaModule as G}from"../../../../shared/utils/index.js";var H=G(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/levelSearchCascadePlugin/index.tsx":j,"./rendererPlugins/editableWidgets/numberRendererPlugin.tsx":R,"./rendererPlugins/editableWidgets/radioRendererPlugin.tsx":b,"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx":w,"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx":c,"./rendererPlugins/editableWidgets/timeRendererPlugin/index.tsx":h,"./rendererPlugins/widgets/checkRendererPlugin.tsx":W,"./rendererPlugins/widgets/colorRendererPlugin.tsx":v,"./rendererPlugins/widgets/defaultRendererPlugin.tsx":S,"./rendererPlugins/widgets/htmlRendererPlugin.tsx":k,"./rendererPlugins/widgets/labelRendererPlugin.tsx":C,"./rendererPlugins/widgets/pictureRendererPlugin.tsx":y,"./rendererPlugins/widgets/seqRendererPlugin.tsx":E,"./rowClickPlugin/index.ts":A,"./rowDragPlugin/index.ts":D,"./rowGroupSettingPlugin/index.ts":F,"./varialbleHeightPlugin/index.tsx":V,"./virtualTreePlugin/index.ts":q,"./wordbookSettingPlugin.ts":z}));export{H as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnyFn, AnyObject } from '../../../../../../../../es/shared/types';
|
|
2
2
|
import { type PropType } from 'vue';
|
|
3
3
|
import { VxeTableConstructor, VxeTableDefines, VxeTableMethods, VxeTablePrivateMethods } from 'vxe-table';
|
|
4
4
|
declare const _default: import("vue").DefineComponent<{
|
|
@@ -63,7 +63,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
63
63
|
isSecondDisabled: (second: number) => boolean;
|
|
64
64
|
};
|
|
65
65
|
dateConfig: AnyObject;
|
|
66
|
-
customDateDisabledDecorator: (customDateDisabled?:
|
|
66
|
+
customDateDisabledDecorator: (customDateDisabled?: AnyFn) => ((ts: number) => any) | null;
|
|
67
67
|
getDetailTime: (date: Date) => {
|
|
68
68
|
h: number;
|
|
69
69
|
m: number;
|
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e){return{bindAutoFocusConfig:function(t,n,o,{before:
|
|
1
|
+
function e(e){return{bindAutoFocusConfig:function(t,n,o,{before:c,after:r,focusType:u="function"}={}){e.fieldHooks.field.tap(t,(e=>{var t;return(null==(t=e.editRender)?void 0:t.name)===n?((e=c?c(e):e).editRender&&!Reflect.has(e.editRender,"autofocus")&&Reflect.set(e.editRender,"autofocus","class"===u?o:"function"===u?({cell:e}={})=>{const t=e&&e.querySelector(o);return t&&t.click(),t}:void 0),r?r(e):e):e}))}}}export{e as useAutoFocus};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function levelSearchCascadePlugin(): import("../../../../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{computed as e,createVNode as o,mergeProps as r}from"vue";import{isString as n,isArray as t}from"lodash-es";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as l}from"../../../../constants/index.js";import{useAutoFocus as i}from"../hooks/useAutoFocus.js";import{getLowCodeFieldFromField as d,IhoTableRenderHelper as a,createIhoTableClearActivedInterceptor as s}from"../../../../utils/index.js";import u from"./levelSearchCascade.vue.js";import{defineTablePlugin as c}from"../../../../hooks/useTablePlugin.js";function m(){const m="levelSearchCascadePlugin";return c({name:m,vxe(i){i.renderer.add(l.LEVEL_SEARCH_CASCADE,{renderCell:(e,{column:o,row:r})=>{const l=r[o.field];return n(l)?l:t(l)?function(e){var r,n,t;const l=d(o);if(!l)return"";const i=(null==(n=null==(r=l.wordbook)?void 0:r.show_key)?void 0:n[0])||(null==(t=l.componentProps)?void 0:t.labelField)||"text";return e.reduce(((e,o,r)=>0===r?o[i]:e+" / "+o[i]),"")}(l):""},renderEdit:a.createRenderEdit((({fieldItem:n,row:t,column:l,emitFormClick:i,emitFormChangeWithParams:d,rowIndex:a,columnIndex:s})=>{const c=e({get:()=>t[l.field],set(e){const o=t[l.field];t[l.field]=e,d({oldValue:o})}});return[o(u,r({value:c.value,"onUpdate:value":e=>c.value=e,options:n.options,wordbook:n.wordbook,autograph:n.autograph,onClick:i},n.componentProps,{fieldKey:l.field,payload:{row:t,column:l,rowIndex:a,columnIndex:s}}),null)]}))}),i.interceptor.add("event.clearActived",s(l.LEVEL_SEARCH_CASCADE,(e=>e.classList.contains("search-cascader__menuWrapper"))))},apply(e){i(e).bindAutoFocusConfig(m,l.LEVEL_SEARCH_CASCADE,"input")}})}export{m as levelSearchCascadePlugin};
|