cnhis-design-vue 3.1.44-release.3 → 3.1.44-release.5
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/base-search/index.d.ts +1 -0
- package/es/components/base-search/src/index.vue.d.ts +1 -0
- package/es/components/base-search/src/index.vue.js +1 -1
- package/es/components/base-search/src/index.vue2.js +1 -0
- package/es/components/base-search/style/index.css +1 -1
- package/es/components/big-table/src/BigTable.vue.js +1 -1
- package/es/components/big-table/src/components/NoData.vue.js +1 -1
- package/es/components/big-table/src/components/NoData.vue2.js +1 -0
- package/es/components/big-table/src/components/edit-form/edit-separate.vue.js +1 -1
- package/es/components/big-table/src/components/edit-form/edit-separate.vue2.js +1 -0
- package/es/components/big-table/src/components/input-button.vue.js +1 -1
- package/es/components/big-table/src/components/input-button.vue2.js +1 -0
- package/es/components/big-table/src/components/separate.vue.js +1 -1
- package/es/components/big-table/src/components/separate.vue2.js +1 -0
- package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.js +1 -1
- package/es/components/bpmn-workflow/src/BpmnWorkflow.vue2.js +1 -0
- package/es/components/button-print/src/ButtonPrint.vue.js +1 -1
- package/es/components/button-print/src/components/EditFormat.vue.js +1 -1
- package/es/components/button-print/src/components/EditFormat.vue2.js +1 -0
- package/es/components/button-print/src/components/IdentityVerification.vue.js +1 -1
- package/es/components/button-print/src/components/IdentityVerification.vue2.js +1 -0
- package/es/components/button-print/src/components/Preview.vue.js +1 -1
- package/es/components/classification/index.d.ts +2 -0
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +2 -0
- package/es/components/classification/src/components/search-filter/index.vue.js +1 -1
- package/es/components/classification/src/components/search-filter/index.vue2.js +1 -0
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +2 -0
- package/es/components/classification/src/components/set-classification/index.vue.js +1 -1
- package/es/components/classification/src/components/set-classification/index.vue2.js +1 -0
- package/es/components/classification/src/components/table-modal/index.vue.js +1 -1
- package/es/components/classification/src/components/table-modal/index.vue2.js +1 -0
- package/es/components/classification/src/index.vue.d.ts +2 -0
- package/es/components/classification/src/index.vue.js +1 -1
- package/es/components/classification/src/index.vue2.js +1 -0
- package/es/components/date-picker/src/DatePicker.vue.js +1 -1
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -0
- package/es/components/fabric-chart/src/FabricChart.vue.js +1 -1
- package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -0
- package/es/components/fabric-chart/src/components/PopupTip.vue.js +1 -1
- package/es/components/fabric-chart/src/components/PopupTip.vue2.js +1 -0
- package/es/components/fabric-chart/src/utils/utils.js +1 -1
- package/es/components/field-set/src/FieldSet.vue.js +1 -1
- package/es/components/field-set/src/FieldSet.vue2.js +1 -0
- package/es/components/form-config/src/FormConfig.vue.js +1 -1
- package/es/components/form-config/src/FormConfig.vue2.js +1 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue.js +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue2.js +1 -0
- package/es/components/form-config/src/components/FormConfigDragDisplay.vue.js +1 -1
- package/es/components/form-config/src/components/FormConfigDragDisplay.vue2.js +1 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.js +1 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue2.js +1 -0
- package/es/components/form-config/src/components/renderer/CloseButton.vue.js +1 -1
- package/es/components/form-config/src/components/renderer/CloseButton.vue2.js +1 -0
- package/es/components/form-config/src/components/renderer/ComplexNode.vue.js +1 -1
- package/es/components/form-config/src/components/renderer/ComplexNode.vue2.js +1 -0
- package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -1
- package/es/components/form-config/src/components/renderer/DefaultNode.vue2.js +1 -0
- package/es/components/form-render/src/FormRender.vue.js +1 -1
- package/es/components/form-render/src/FormRender.vue2.js +1 -0
- package/es/components/form-render/src/FormRenderWrapper.vue.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue2.js +1 -0
- package/es/components/form-render/src/components/renderer/combination.js +1 -1
- package/es/components/form-render/src/components/renderer/formItem.js +1 -1
- package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.js +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue2.js +1 -0
- package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/components/tooltipMessage.vue.js +1 -1
- package/es/components/form-render/src/components/tooltipMessage.vue2.js +1 -0
- package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
- package/es/components/guide/src/renderer.js +1 -1
- package/es/components/iho-select-label/index.d.ts +5 -0
- package/es/components/iho-select-label/src/LabelFormContent.vue.js +1 -1
- package/es/components/iho-select-label/src/LabelFormContent.vue2.js +1 -0
- package/es/components/iho-select-label/src/SelectLabel.vue.d.ts +5 -0
- package/es/components/iho-select-label/src/SelectLabel.vue.js +1 -1
- package/es/components/iho-select-label/src/SelectLabel.vue2.js +1 -0
- package/es/components/iho-select-label/src/components/label-classify.vue.js +1 -1
- package/es/components/iho-select-label/src/components/label-classify.vue2.js +1 -0
- package/es/components/iho-select-label/style/index.css +1 -1
- package/es/components/iho-table/index.d.ts +2 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +2 -0
- package/es/components/iho-table/src/IhoTable.vue.js +1 -1
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -0
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.js +1 -1
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue2.js +1 -0
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue2.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +2 -0
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/src/InfoHeader.vue.js +1 -1
- package/es/components/info-header/src/InfoHeader.vue2.js +1 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.js +1 -1
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue2.js +1 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.js +1 -1
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue2.js +1 -0
- package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.js +1 -1
- package/es/components/info-header/src/components/infoDescription/HiddenContent.vue2.js +1 -0
- package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.js +1 -1
- package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue2.js +1 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.js +1 -1
- package/es/components/info-header/src/components/infoDescription/index.vue2.js +1 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.js +1 -1
- package/es/components/info-header/src/components/patientInfo/index.vue2.js +1 -0
- package/es/components/keyboard/src/Keyboard.vue.js +1 -1
- package/es/components/keyboard/src/Keyboard.vue2.js +1 -0
- package/es/components/keyboard/src/components/InputNumber.vue.js +1 -1
- package/es/components/keyboard/src/components/InputNumber.vue2.js +1 -0
- package/es/components/keyboard/src/components/NumberPanel.vue.js +1 -1
- package/es/components/keyboard/src/components/NumberPanel.vue2.js +1 -0
- package/es/components/map/src/Map.vue.js +1 -1
- package/es/components/map/src/Map.vue2.js +1 -0
- package/es/components/quick-search/index.d.ts +1 -0
- package/es/components/quick-search/src/index.vue.d.ts +1 -0
- package/es/components/quick-search/src/index.vue.js +1 -1
- package/es/components/quick-search/src/index.vue2.js +1 -0
- package/es/components/quick-search/style/index.css +1 -1
- package/es/components/recommend-search/src/RecommendSearch.vue.js +1 -1
- package/es/components/recommend-search/src/RecommendSearch.vue2.js +1 -0
- package/es/components/recommend-search/src/components/RecommendInput.vue.js +1 -1
- package/es/components/recommend-search/src/components/RecommendInput.vue2.js +1 -0
- package/es/components/recommend-search/src/components/RecommendMenu.vue.js +1 -1
- package/es/components/recommend-search/src/components/RecommendMenu.vue2.js +1 -0
- package/es/components/recommend-search/src/components/RecommendSelect.vue.js +1 -1
- package/es/components/recommend-search/src/components/RecommendSelect.vue2.js +1 -0
- package/es/components/scale-view/src/ScaleView.vue.js +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -0
- package/es/components/scale-view/src/components/AnswerParse.vue.js +1 -1
- package/es/components/scale-view/src/components/AnswerParse.vue2.js +1 -0
- package/es/components/scale-view/src/components/EvaluateCountdown.vue.js +1 -1
- package/es/components/scale-view/src/components/EvaluateCountdown.vue2.js +1 -0
- package/es/components/scale-view/src/components/EvaluatePage.vue.js +1 -1
- package/es/components/scale-view/src/components/EvaluatePage.vue2.js +1 -0
- package/es/components/scale-view/src/components/LoadingCom.vue.js +1 -1
- package/es/components/scale-view/src/components/NoData.vue.js +1 -1
- package/es/components/scale-view/src/components/NoData.vue2.js +1 -0
- package/es/components/search-cascader/src/SearchCascader.vue.js +1 -1
- package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -0
- package/es/components/search-cascader/src/components/SearchMenu.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -0
- package/es/components/select-label/src/SelectLabel.vue.js +1 -1
- package/es/components/select-label/src/components/label-classify.vue.js +1 -1
- package/es/components/select-label/src/components/label-classify.vue2.js +1 -0
- package/es/components/select-person/src/SearchMultiple.vue.js +1 -1
- package/es/components/select-person/src/SelectPerson.vue.js +1 -1
- package/es/components/shortcut-provider/src/ShortcutProvider.vue.js +1 -1
- package/es/components/shortcut-provider/src/ShortcutProvider.vue2.js +1 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.js +1 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue2.js +1 -0
- package/es/components/shortcut-setter/src/ShortcutSetterItem.vue.js +1 -1
- package/es/components/shortcut-setter/src/ShortcutSetterItem.vue2.js +1 -0
- package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -1
- package/es/components/steps-wheel/src/StepsWheel.vue2.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +2 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +2 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/Date.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/Date.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/Label.vue.d.ts +70 -0
- package/es/components/table-filter/src/components/render-widget/components/Label.vue.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/Label.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/Select.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/SelectLabel.vue.d.ts +56 -0
- package/es/components/table-filter/src/components/render-widget/components/SelectLabel.vue.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/SelectLabel.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +3 -1
- package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +145 -0
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
- package/es/components/table-filter/src/directive/resize.d.ts +4 -0
- package/es/components/table-filter/src/directive/resize.js +1 -0
- package/es/components/table-filter/src/hooks/useAdvanced.d.ts +1 -0
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
- package/es/components/table-filter/src/tool/resizeSensor.d.ts +16 -0
- package/es/components/table-filter/src/tool/resizeSensor.js +1 -0
- package/es/components/table-filter/src/types/enums.d.ts +2 -0
- package/es/components/table-filter/src/types/enums.js +1 -1
- package/es/components/table-filter/src/types/index.d.ts +14 -0
- package/es/components/time-line/src/TimeLine.vue.js +1 -1
- package/es/components/time-line/src/TimeLine.vue2.js +1 -0
- package/es/components/time-picker/src/TimePicker.vue.js +1 -1
- package/es/components/time-picker/src/TimePicker.vue2.js +1 -0
- package/es/components/vod-chunk-upload/src/chunk-upload-new.vue.js +1 -1
- package/es/components/vod-chunk-upload/src/chunk-upload-new.vue2.js +1 -0
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -1
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +1 -0
- package/es/shared/components/SelectPage/SelectPage.vue.js +1 -1
- package/es/shared/components/SelectPage/SelectPage.vue2.js +1 -0
- package/es/shared/components/SvgIcon/SvgIcon.vue.js +1 -1
- package/es/shared/components/SvgIcon/SvgIcon.vue2.js +1 -0
- package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.js +1 -1
- package/es/shared/components/TextOverTooltip/TextOverTooltip.vue2.js +1 -0
- package/es/shared/components/no-data/NoData.vue.js +1 -1
- package/es/shared/components/no-data/NoData.vue2.js +1 -0
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
- /package/es/_virtual/{plugin-vue_export-helper.js → _plugin-vue_export-helper.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"./filter.vue2.js";import r from"../../../../../_virtual/_plugin-vue_export-helper.js";var t=r(e,[["__file","filter.vue"]]);export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,computed as l,inject as a,ref as t,onDeactivated as u,openBlock as n,createElementBlock as o,unref as r,createBlock as i,createCommentVNode as v,createElementVNode as s,createVNode as c,isRef as d,withCtx as p,normalizeStyle as f,Fragment as h,renderList as m,toDisplayString as y,createTextVNode as _}from"vue";import{widthAppend as b}from"../../../../../shared/utils/index.js";import{useVirtualList as g}from"@vueuse/core";import{isNumber as k}from"lodash-es";import{NInput as C,NCheckbox as $,NCheckboxGroup as S,NButtonGroup as x,NButton as L}from"naive-ui";const U={class:"iho-table__filterWrapper"},j={class:"iho-table__filterListItem"},w={class:"iho-table__filterFooter"};var E=e({__name:"filter",props:{payload:{type:Object,required:!0}},setup(e){const E=e,F=l((()=>{var e,l,a;return null!=(a=null==(l=null==(e=E.payload)?void 0:e.column)?void 0:l.filters)?a:[]})),I=l({get:()=>F.value.reduce(((e,l)=>(l.checked&&e.push(l.value),e)),[]),set(e){if(E.payload)return F.value.forEach((l=>{E.payload.$panel.changeOption(null,e.includes(l.value),l)})),E.payload.$panel.confirmFilter(new CustomEvent("click"))}}),O=a("$xetable"),P=t([...I.value]),W=t("");function q(){O&&(O.reactData.filterStore.visible=!1)}u(q);const z=l((()=>{var e,l;if(!E.payload||!E.payload.column)return 10;const{filterCapacity:a}=null!=(l=null==(e=E.payload.column.editRender)?void 0:e.props)?l:{};return k(a)&&a>0?a:10})),{list:D,containerProps:H,wrapperProps:R}=g(l((()=>W.value?F.value.filter((e=>`${e.label}`.includes(W.value))):F.value)),{itemHeight:32,overscan:3}),A=l((()=>!!P.value.length&&P.value.length!==F.value.length)),B=l({get:()=>P.value.length===F.value.length&&0!==F.value.length,set:e=>{P.value=e?F.value.map((e=>e.value)):[]}}),G=l((()=>({...H.style,height:b(32*z.value)})));function J(){I.value=P.value,q()}function K(){P.value=[]}return(e,l)=>(n(),o("section",U,[r(F).length>5?(n(),i(r(C),{key:0,value:W.value,"onUpdate:value":l[0]||(l[0]=e=>W.value=e)},null,8,["value"])):v("v-if",!0),s("div",j,[c(r($),{label:"全选",checked:r(B),"onUpdate:checked":l[1]||(l[1]=e=>d(B)?B.value=e:null),indeterminate:r(A)},null,8,["checked","indeterminate"])]),c(r(S),{value:P.value,"onUpdate:value":l[3]||(l[3]=e=>P.value=e)},{default:p((()=>[s("section",{ref:r(H).ref,style:f(r(G)),onScroll:l[2]||(l[2]=(...e)=>r(H).onScroll&&r(H).onScroll(...e)),class:"iho-table__filterListWrapper"},[s("section",{style:f(r(R).style)},[(n(!0),o(h,null,m(r(D),(e=>(n(),o("div",{class:"iho-table__filterListItem",key:e.data.value},[c(r($),{value:e.data.value,label:e.data.label},null,8,["value","label"])])))),128))],4)],36)])),_:1},8,["value"]),s("footer",w,[s("section",null,y(`已选择${P.value.length}项`),1),c(r(x),{size:"small"},{default:p((()=>[c(r(L),{onClick:K},{default:p((()=>[_("清空")])),_:1}),c(r(L),{onClick:q},{default:p((()=>[_("取消")])),_:1}),c(r(L),{type:"primary",onClick:J},{default:p((()=>[_("确定")])),_:1})])),_:1})])]))}});export{E as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"./editDate.vue2.js";import t from"../../../../../../../_virtual/_plugin-vue_export-helper.js";var r=t(e,[["__file","editDate.vue"]]);export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,useAttrs as t,ref as r,computed as i,onMounted as a,openBlock as l,createBlock as o,unref as n,mergeProps as u,isRef as s}from"vue";import{generateTimeFormat as d}from"../../../../../../../shared/utils/index.js";import{isFunction as m}from"lodash-es";import{useIhoTableFormEvent as p}from"../../../../utils/index.js";import c from"../../../../../../date-picker/index.js";var f=e({__name:"editDate",props:{value:{type:String,default:void 0},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0}},emits:["update:value"],setup(e,{emit:f}){const v=e,w=t(),{emitFormChangeWithParams:D}=p(v),y=r(),b=i({get:()=>v.value,set(e){const t=v.value;t!==e&&(f("update:value",e),D({oldValue:t}))}}),g=i((()=>{const e=w.valueFormat||"yyyy-MM-dd HH:mm:ss";return{valueFormat:e,format:e,timePickerProps:{format:d(e)}}})),{isStartDate:$=!1,isEndDate:h=!1}=w,T=w.connectField||"",j=(e,t)=>$&&T?e>t:!(!h||!T)&&e<t,x=e=>{const t=new Date(v.row[T]),r=new Date(e),{h:i,m:a,s:l}=q(t),o=(e,t,r,i)=>!(h&&r>i)&&(!($&&r<i)&&j(e,t));return{isHourDisabled:t=>{if(!v.row[T])return!1;const a=new Date(`${v.row[T].split(" ")[0]} 00:00:00`).getTime(),{m:l,s:n}=q(r);return o(t,i,e-60*t*60*1e3-60*l*1e3-1e3*n,a)},isMinuteDisabled:t=>{if(!v.row[T])return!1;const l=new Date(`${v.row[T].split(" ")[0]} ${i}:00:00`).getTime(),{s:n}=q(r);return o(t,a,e-60*t*1e3-1e3*n,l)},isSecondDisabled:t=>{if(!v.row[T])return!1;const r=new Date(`${v.row[T].split(" ")[0]} ${i}:${a}:00`).getTime();return o(t,l,e-1e3*t,r)}}},S={type:w.type||"datetime",clearable:!0,placeholder:w.placeholder||"请选择",...w,...g.value,isDateDisabled:k(w.isDateDisabled)||(e=>!!v.row[T]&&j(e,h?new Date(`${v.row[T].split(" ")[0]} 00:00:00`).getTime():new Date(v.row[T]).getTime()))};function k(e){return m(e)?t=>e(t,v.row):null}function q(e){return{h:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}return S.type.includes("time")&&(S.isTimeDisabled=k(w.isTimeDisabled)||x),a((()=>{var e,t,r,i,a,l,o;return null==(o=null==(a=null==(r=null==(t=null==(e=y.value)?void 0:e.$datePicker)?void 0:t.inputInstRef)?void 0:(i=r.$el).querySelector)?void 0:(l=a.call(i,"input")).select)?void 0:o.call(l)})),(e,t)=>(l(),o(n(c),u({ref_key:"formRef",ref:y},n(S),{"formatted-value":n(b),"onUpdate:formatted-value":t[0]||(t[0]=e=>s(b)?b.value=e:null)}),null,16,["formatted-value"]))}});export{f as default};
|
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{createVNode as e,mergeProps as l,defineComponent as r,computed as o}from"vue";import{isNumber as t}from"lodash-es";import{NInputNumber as n}from"naive-ui";import"../../../../index.js";import{EDITABLE_WIDGET_TYPE as u}from"../../../constants/index.js";import{IhoTableRenderHelper as a}from"../../../utils/index.js";import{defineTablePlugin as i}from"../../../hooks/useTablePlugin.js";const d=r({name:"IhoTableInputNumber",props:{value:[String,Number]},emits:["update:value"],setup(l,{emit:r}){const u=o({get:()=>t(l.value)?l.value:l.value&&t(+l.value)?+l.value:null,set(e){r("update:value",e)}});return()=>e(n,{value:u.value,"onUpdate:value":e=>u.value=e},null)}});function m(){return i({name:"numberRendererPlugin",vxe(r){r.renderer.add(u.NUMBER,{renderCell:a.createDefaultRenderCell(),renderEdit:a.createRenderEdit((({row:r,column:o,fieldItem:t,emitFormClick:n,emitFormChangeWithParams:u})=>{const{placeholder:a="请输入"}=t.componentProps||{},i={clearable:!0,placeholder:a,onBlur:()=>u({type:"blur",oldValue:r[o.field]}),onUpdateValue:e=>{const l=r[o.field];r[o.field]=e,u({oldValue:l})},onClick:n};return[e(d,l({value:r[o.field],"onUpdate:value":e=>r[o.field]=e},i,t.componentProps),null)]}))})}})}export{m as numberRendererPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"./editSeparate.vue2.js";import r from"../../../../../../../_virtual/_plugin-vue_export-helper.js";var t=r(e,[["__file","editSeparate.vue"]]);export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,inject as t,ref as a,watch as o,computed as u,onMounted as l,onDeactivated as r,openBlock as n,createBlock as i,unref as s,withCtx as p,createElementVNode as d,withModifiers as v,normalizeStyle as c,toDisplayString as m,renderSlot as f,createVNode as h}from"vue";import{cloneDeep as w,isObject as y,isArray as g}from"lodash-es";import{NPopover as b,NInput as x}from"naive-ui";import{InjectionIhoTableHandler as k}from"../../../../constants/index.js";import{useIhoTableFormEvent as C}from"../../../../utils/index.js";const j=["onClick"];var U=e({__name:"editSeparate",props:{value:{},height:{type:Number,default:48},column:{type:Object,required:!0},row:{type:Object,required:!0},displayContent:{type:String,default:""},rowIndex:{type:Number,required:!0}},emits:["update:value","click"],setup(e,{emit:U}){const _=e,q=t(k),P=a(),S=a();function I(e){S.value=e}const N=a(!1);function O(e){N.value=e}function R(e){N.value=!N.value,U("click",e)}o(N,(function(e){e?async function(){var e;S.value=w(_.value),await new Promise((e=>setTimeout(e))),null==(e=P.value)||e.syncPosition()}():z()}));const{emitFormChangeWithParams:T}=C(_);async function z(){if(!y(S.value)&&!g(S.value)&&_.value===S.value)return;const e=_.value;U("update:value",S.value),T({oldValue:e}),q.updateTableDataRef()}const B=u((()=>({border:"1px solid #f5f5f5",height:_.height-16+"px",display:"flex",alignItems:"center",padding:"0",background:"white",wordBreak:"keep-all",boxSizing:"border-box","border-radius":"4px"})));return l((()=>O(!0))),r(z),(t,a)=>(n(),i(s(b),{ref_key:"popoverRef",ref:P,trigger:"manual",show:N.value,"onUpdate:show":a[1]||(a[1]=e=>N.value=e),"show-arrow":!1},{trigger:p((()=>[d("div",{onClick:v(R,["stop"]),style:c(s(B))},m(e.displayContent||" "),13,j)])),default:p((()=>[f(t.$slots,"menu",{value:S.value,"onUpdate:value":I,"onUpdate:show":O,col:e.column,row:e.row},(()=>[h(s(x),{value:S.value,"onUpdate:value":a[0]||(a[0]=e=>S.value=e),type:"textarea"},null,8,["value"])]))])),_:3},8,["show"]))}});export{U as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"./editTime.vue2.js";import i from"../../../../../../../_virtual/_plugin-vue_export-helper.js";var r=i(e,[["__file","editTime.vue"]]);export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,useAttrs as l,ref as t,watch as a,nextTick as o,openBlock as r,createBlock as u,unref as i,mergeProps as n,withCtx as m,createVNode as c,createElementBlock as d,Fragment as v,renderList as f,createTextVNode as s,toDisplayString as p,createCommentVNode as k}from"vue";import{NPopover as h,NInput as y,NSpace as _,NScrollbar as w,NButton as b}from"naive-ui";import{useIhoTableFormEvent as g}from"../../../../utils/index.js";import{useAutoFocus as V}from"../hooks/useAutoFocus.js";import C from"../../../../../../time-picker/index.js";import{parse as F,isValid as j,format as q}from"date-fns";var x=e({__name:"editTime",props:{formattedValue:{type:String,default:void 0},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0}},emits:["update:formattedValue","click"],setup(e,{emit:x}){const R=e,S=l(),{emitFormChangeWithParams:A}=g(R),{formRef:I,isShow:O}=V(),P=t(),$=t(),E=t();let H=R.formattedValue;const{placeholder:U="请选择",valueFormat:z="HH:mm",shortcutOptions:D=[]}=S,K={placeholder:U,valueFormat:z,format:z};function N(e){E.value=e,H!==e&&(x("update:formattedValue",e),A({oldValue:H}),H=e)}function T(){[K.valueFormat.replace(/:/,""),K.valueFormat].some((e=>{const l=F(($.value||"").trim(),e,new Date);if(j(l)){return N(q(l,K.valueFormat)),!0}}))}function W(e){var l;const{key:t}=e;"Enter"===t&&(null==(l=I.value)||l.blur(),O.value=!1)}return a((()=>R.formattedValue),(e=>{$.value=e,E.value=e}),{immediate:!0}),a((()=>O.value),(async e=>{var l,t,a,r,u;e&&(await o(),null==(u=null==(r=null==(a=null==(t=null==(l=P.value)?void 0:l.$timePicker)?void 0:t.panelInstRef)?void 0:a.$el)?void 0:r.querySelectorAll(".n-time-picker-col"))||u.forEach((e=>{var l,t;return null==(t=null==(l=null==e?void 0:e.querySelector)?void 0:l.call(e,".n-time-picker-col__item--active"))?void 0:t.scrollIntoView()})))})),(e,l)=>(r(),u(i(h),n({show:i(O),trigger:"click",showArrow:!1,placement:"bottom-start",style:{padding:"0"}},e.$attrs,{onClickoutside:l[3]||(l[3]=()=>O.value=!1)}),{trigger:m((()=>[c(i(y),{ref_key:"formRef",ref:I,clearable:"",value:$.value,"onUpdate:value":l[0]||(l[0]=e=>$.value=e),onClick:l[1]||(l[1]=()=>O.value=!0),onChange:T,onKeydown:W},null,8,["value"])])),default:m((()=>[c(i(_),null,{default:m((()=>[c(i(C),n({ref_key:"timePickerRef",ref:P,show:"","formatted-value":E.value},i(K),{class:"iho-table__time-picker",to:!1,"onUpdate:formattedValue":N,onConfirm:l[2]||(l[2]=()=>O.value=!1)}),null,16,["formatted-value"]),c(i(w),{class:"iho-table__scrollbar"},{default:m((()=>[i(D).length?(r(),u(i(_),{key:0,vertical:"",wrap:!1},{default:m((()=>[(r(!0),d(v,null,f(i(D),(e=>(r(),u(i(b),{size:"tiny",key:e,onClick:l=>function(e){N(e),O.value=!1}(e)},{default:m((()=>[s(p(e),1)])),_:2},1032,["onClick"])))),128))])),_:1})):k("v-if",!0)])),_:1})])),_:1})])),_:1},16,["show"]))}});export{x as default};
|
package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{createVNode as e,defineComponent as r,watch as t,onBeforeUnmount as n}from"vue";import{jsonParse as i,arrayed as o}from"../../../../../../shared/utils/index.js";import"../../../../index.js";import{WIDGET_TYPE as s}from"../../../constants/index.js";import{getRowHeight as l,IhoTableWarn as u}from"../../../utils/index.js";import d from"viewerjs";import"viewerjs/dist/viewer.css";import{defineTablePlugin as m}from"../../../hooks/useTablePlugin.js";function a(){return m({name:"pictureRendererPlugin",vxe(r){function t(r){return{renderCell(t,{row:n,column:s}){try{if(!n[s.field])return[];const t=i(n[s.field]),u=l()-16;return[e("section",{style:"display:flex;justify-content:center"},[e(p,{style:{width:u+"px",height:u+"px",...r},images:o(t).map((e=>e.url))},null)])]}catch(e){return u(`invalid ${t.name} value of field(${s.field}): ${n[s.field]}`),[]}}}}r.renderer.add(s.PICTURE,t({})),r.renderer.add(s.HEADPORTRAIT,t({"border-radius":"50%"}))}})}const p=r({name:"ViewerImage",props:{images:{type:Array,default:()=>[]},options:{type:Object,default:()=>({})}},setup(r){let i=null;function o(){if(i)return i.show();const e=document.createElement("section");r.images.map((r=>e.appendChild(function(e){const r=new Image;return r.src=e,r}(r)))),i=new d(e,r.options).show()}return t([()=>r.images,()=>r.options],(()=>{null==i||i.destroy(),i=null}),{deep:!0}),n((()=>null==i?void 0:i.destroy())),()=>e("img",{style:"cursor:pointer",alt:"",src:r.images[0],onClick:o},null)}});export{a as pictureRendererPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{unref as e,createVNode as t,onBeforeUnmount as o,shallowReactive as l,defineComponent as n,inject as r,ref as a,computed as s,provide as i,watch as u,onMounted as d,h as c}from"vue";import{traverse as p,widthAppend as f}from"../../../../../shared/utils/index.js";import{doAnimation as m}from"../../../../../shared/utils/anime.js";import{useThrottleFn as h}from"@vueuse/core";import{promiseTimeout as g}from"@vueuse/shared";import{last as v,isFunction as x,omit as I,isNumber as b}from"lodash-es";import"../../../index.js";import{WIDGET_TYPE as w,InjectionIhoTableUUID as y}from"../../constants/index.js";import{useUUIDMap as T}from"../../utils/index.js";import{defineTablePlugin as H}from"../../hooks/useTablePlugin.js";class R{constructor(){this.records={},this.maxRecords=l(new Map)}set(e,t,o){if(this.records[e]||(this.records[e]={}),this.records[e][t]===o)return;this.records[e][t]=o;const l=Math.max(...Object.values(this.records[e]),0);this.maxRecords.get(e)!==l&&this.maxRecords.set(e,l)}getMax(e){return this.maxRecords.get(e)||0}}const{getItemFromUUID:D,removeItemFromUUID:M}=T((()=>new R),!0),{getItemFromUUID:S,removeItemFromUUID:U,setItemFromUUID:C}=T((()=>null)),{getItemFromUUID:$,removeItemFromUUID:E,setItemFromUUID:k}=T((()=>{})),F=n({props:{payload:{type:Object,required:!0}},setup(e){const o=r(y),l=r("$xetable"),n=a(),p=D(o),m=s((()=>e.payload.row[e.payload.column.field]));function h(){const{row:t,column:o}=e.payload,r=l.getRowSeq(t);if(!p||null==r||!n.value)return;const a=n.value.clientHeight;p.set(r,o.field,a)}i("updateCellHeight",h),u([()=>e.payload.rowIndex,()=>e.payload.column.field,m,()=>e.payload.column.renderWidth],(async()=>{await g(0),h()})),d((()=>{l&&!S(o)&&C(o,l),h()}));const v=s((()=>{var t,o,l,n;const r=null!=(o=null==(t=e.payload.column.editRender)?void 0:t.props)?o:{},a=null!=(n=null==(l=r.slots)?void 0:l.default)?n:r.slotFn;return x(a)?a:()=>m.value})),I=s((()=>{if(e.payload.column.treeNode)return"";const t=e.payload.column.renderWidth;return b(t)&&t>0?f(t-20-2):""}));return()=>t("div",{ref:n,style:{padding:"7px 0",width:I.value,overflow:"hidden"}},[c(v.value,e.payload)])}});function j(t,o,{scrollTop:l=0}){var n,r;const{uuid:a,rowConfig:s={}}=o;if(!a)return;const i=D(a),{oSize:u=0,gt:d=100}=null!=(n=$(a))?n:{},{internalData:c,reactData:p}=t,{scrollYStore:f,elemStore:m,afterFullData:h,fullDataRowIdData:g}=c;if(d>h.length)return;const I=null!=(r=s.height)?r:36,b=m["main-body-wrapper"],w=b?e(b):null;let y=w?Math.max(8,Math.ceil(w.clientHeight/I)+2+u):8;const T=[0];let H=0;if(l&&h.find(((e,o)=>{const n=t.getRowSeq(e),r=(v(T)||0)+Math.max(I,i.getMax(n));if(T.push(r),r>l)return H=Math.max(0,o-u),y+=Math.min(H,u),!0})),H>0&&x(o.spanMethod)){const{spanMethod:e}=o,l={rowspan:1,colspan:1};for(;H>0;){if(!t.getColumns().some(((t,o)=>{const{rowspan:n,colspan:r}=e({column:t,columnIndex:o,$columnIndex:o,row:h[H],rowIndex:H,$rowIndex:H,_rowIndex:H,isHidden:!t.visible,fixed:t.fixed,type:t.type,visibleData:h})||l;if(0===n&&0===r)return H--,!0})))break}}const R=`${T[H]}px`,M=`${h.reduce(((e,o)=>{const l=t.getRowSeq(o);return e+Math.max(I,i.getMax(l))}),0)}px`;["main","left","right"].forEach((t=>{const o=m[`${t}-body-table`],n=o?e(o):null;n&&(n.style.marginTop=R,n.scrollTop=l),["header","body","footer"].forEach((o=>{const l=m[`${t}-${o}-ySpace`],n=l?e(l):null;n&&(n.style.height=M)}))}));const S=Math.min(h.length,H+y);if(f.startIndex===H&&f.endIndex===S)return;f.startIndex=H,f.endIndex=S;const U=h.slice(f.startIndex,f.endIndex);U.forEach(((e,o)=>{const l=t.getRowid(e),n=g[l];n&&(n.$index=o)})),p.tableData.length=0,p.tableData.push(...U)}const L=h(j,300);function Y(){const l="variableHeightRendererPlugin";return H({name:l,vxe(e){e.renderer.add(w.VARIABLE_HEIGHT,{renderCell:(e,o)=>t(F,{payload:o},null)})},apply(t){function n(t){const o=S(t.uuid);if(!o)return;t.scrollY={enabled:!1},o.reactData.scrollYLoad=!1;const l=function(t){const o=t.internalData.elemStore["main-body-wrapper"];return o?e(o):null}(o);l&&j(o,t,{scrollTop:l.scrollTop})}function r(e){if(!e.uuid)return;const t=$(e.uuid);t&&(e.scrollY=t),setTimeout((()=>n(e)),300)}t.dataHooks.dataStart.tap(l,r),t.eventHooks.onFilterChange.tap(l,((e,t)=>r(t))),t.eventHooks.onSortChange.tap(l,((e,t)=>r(t))),t.eventHooks.onToggleTreeExpand.tap(l,((e,t)=>r(t))),t.eventHooks.onResizableChange.tap(l,(async({column:e},t)=>{if(!e.editRender||!e.editRender.props)return;e.editRender.props.variableHeight&&r(t)})),t.eventHooks.onScroll.tap(l,h(((e,t)=>{if(e.isX)return;const{uuid:o}=t;if(!o)return;const l=S(o);l&&j(l,t,e)}),100,!0,!0)),t.fieldHooks.field.tap(l,(e=>{if(Reflect.get(e,"variableHeight")){const t=e.slots;e.slots=I(t,["default"]),e.editRender={...e.editRender,name:w.VARIABLE_HEIGHT};const o=e.className,l="variable-height";e.className=o?function(e){return x(o)?[o(e),l]:[o,l]}:l}return e})),t.fieldHooks.fieldList.tap(l,((t,o,{$table:l})=>(o.uuid&&p(t,((r,a)=>{var s,i,u;if((null==(s=r.editRender)?void 0:s.name)===w.VARIABLE_HEIGHT){const r=null!=(u=null==(i=o.rowConfig)?void 0:i.height)?u:36,s=D(o.uuid),d=o.cellStyle;if(o.cellStyle=function(e){const t={};if(l.value){const o=Math.max(r,s.getMax(l.value.getRowSeq(e.row)));t.height=`${o}px`}return Object.assign(t,d?x(d)?d(e):d:null)},o.sortableConfig&&o.sortableConfig.enable){const t=o.sortableConfig.onEnd;o.sortableConfig.onEnd=function(l){const n=S(o.uuid);if(n){const{internalData:{elemStore:t}}=n,l=t["main-table-body"];l&&e(l)&&j(n,o,{scrollTop:e(l).scrollTop})}x(t)&&t(l)}}o.showOverflow="tooltip",p(t,(e=>{e.showOverflow="tooltip"})),o.scrollY={...o.scrollY,mode:"default"},o.onWheel=function(t){let o=null,l=0,n=!0;return function(r){if(!t.uuid)return;const a=S(t.uuid);if(!a)return;const{internalData:s}=a,{isHover:i}=t.rowConfig||{},{deltaX:u,deltaY:d}=r,{refTableLeftBody:c,refTableRightBody:p,refTableBody:f}=a.getRefMaps(),h=d,g=u,v=h<0,x=e(f),I=x?x.$el:null;if(!I)return;if(v?I.scrollTop<=0:I.scrollTop>=I.scrollHeight-I.clientHeight)return;const b=I.scrollTop+h,w=I.scrollLeft+g;if(b===s.lastScrollTop)return;r.preventDefault(),s.lastScrollTop=b,s.lastScrollLeft=w,s.lastScrollTime=Date.now(),i&&a.clearHoverRow();const y=c.value,T=p.value,H=y?y.$el:null,R=T?T.$el:null,D=Math.min(100,Math.abs(Math.floor(h/2)));n&&(l=I.scrollTop,n=!1),l+=D*(v?-1:1),o&&o(),o=m(I.scrollTop,l,400,(e=>{I.scrollTop=e,H&&(H.scrollTop=e),R&&(R.scrollTop=e)}),"easeOutCubic",(()=>{l=I.scrollTop,n=!0})),L(a,t,I)}}(o),setTimeout((()=>{k(o.uuid,o.scrollY),n(o)}),300),a()}})),t))),t.setupHooks.setup.tap(l,(e=>{o((()=>{e.value.uuid&&(M(e.value.uuid),U(e.value.uuid),E(e.value.uuid))}))}))}})}export{Y as variableHeightRendererPlugin};
|
|
@@ -15,6 +15,7 @@ export declare type IhoTableConfig = VxeTableProps & Partial<{
|
|
|
15
15
|
uuid: string;
|
|
16
16
|
isTree: MaybeString<0 | 1 | 2 | 3>;
|
|
17
17
|
isBatchSelect: MaybeString<0 | 1>;
|
|
18
|
+
isSingleSelect: MaybeString<0 | 1>;
|
|
18
19
|
hideSettingBtn: MaybeString<0 | 1>;
|
|
19
20
|
showSeq: boolean;
|
|
20
21
|
selectType: Exclude<VxeTableDefines.ColumnInfo['type'], 'seq' | 'expand' | 'html'>;
|
|
@@ -150,4 +151,5 @@ export declare type IhoTableExpose = {
|
|
|
150
151
|
loadData(data: AnyObject[]): void;
|
|
151
152
|
setSort(field: string, value: 'asc' | 'desc' | null): void;
|
|
152
153
|
setFilter(field: string, value: ArrayAble<string>): void;
|
|
154
|
+
reload(): Promise<void>;
|
|
153
155
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{reactive as e,inject as n,unref as t,toRaw as r,createVNode as i}from"vue";import{jsonParse as o,arrayed as u,findAncestor as l}from"../../../../shared/utils/index.js";import{promiseTimeout as c}from"@vueuse/shared";import{isNumber as a,
|
|
1
|
+
import{reactive as e,inject as n,unref as t,toRaw as r,createVNode as i}from"vue";import{jsonParse as o,arrayed as u,findAncestor as l}from"../../../../shared/utils/index.js";import{promiseTimeout as c}from"@vueuse/shared";import{isNumber as a,isString as d,isObject as s,isArray as f,cloneDeep as m}from"lodash-es";import{InjectionIhoTableConfig as p,InjectionIhoTableEmits as v,IHO_TABLE_STRING_STATUS as g,IHO_TABLE_NUMBER_STATUS as E,IHO_TABLE_TREE_TYPE as I}from"../constants/index.js";function h(e){return console.warn(`[IhoTable]: ${e}`)}const T=Object.freeze({getCellType(e){var n;return((null==(n=e.settingObj)?void 0:n.attr)||e.formType||"DEFAULT").toUpperCase()}});function C(){var e,t,r;const i=n(p);return i||h("this function(getRowHeight) only can be used in setup environment"),null!=(r=null==(t=null==(e=null==i?void 0:i.value)?void 0:e.rowConfig)?void 0:t.height)?r:32}function R(e){const n=e.slice(2);return`${n[0].toLowerCase()}${n.slice(1)}`}function S(e){return`on${e[0].toUpperCase()}${e.slice(1)}`}function w(n,t=!0){const r=t?e(new Map):new Map;return{getItemFromUUID:function(e){return r.set(e,r.get(e)||n()).get(e)},setItemFromUUID:function(e,n){r.set(e,n)},removeItemFromUUID:function(e){r.delete(e)}}}async function O(e,n){return r()||await c(0),r()||function(){const n=+e.colWidth;return a(n)?n:64}();function r(){var r,i;return null==(i=null==(r=t(n))?void 0:r.getColumnByField(e.field))?void 0:i.renderWidth}}function F(e){const t=n(v);function i(){var n;return{value:e.row[e.column.field],row:e.row,column:{...e.column,...null==(n=e.column.editRender)?void 0:n.props},index:e.rowIndex>-1?e.rowIndex:e.$rowIndex}}function o(e={}){t("formChange",{...i(),...m(r(e))})}function u(e={}){t("formClick",{...i(),...m(r(e))})}return{emitFormChange:function(){o()},emitFormClick:function(){u()},emitFormChangeWithParams:o,emitFormClickWithParams:u}}const P=Object.freeze({createDefaultRenderCell:function(){return function(e,{row:n,column:t}){return[i("span",null,[n[t.field]])]}},createRenderEdit:function(e){return function({props:n},t){return e({...t,fieldItem:n||{},...F(t)})}},isEditableColumn(e,n){var t;return!1!==(null==(t=e.editConfig)?void 0:t.showIcon)&&n.editRender&&!1!==n.editRender.enabled},hasFilter(e){if(y(e))return!0;let n=e.fieldSetting;return d(n)&&(n=o(n||"")),s(n)&&((t=n).notParticipatingSearch!==g.POSITIVE&&"manual"===(null==(r=t.mapping)?void 0:r.type));var t,r},hasDateFiler(e){var n;return null==(n=null==e?void 0:e.filterSetting)?void 0:n.daterange}}),A=Object.freeze({isPositive:e=>e===E.POSITIVE||e===g.POSITIVE,isNegative:e=>e===E.NEGATIVE||e===g.NEGATIVE,notPositive:e=>e!==E.POSITIVE&&e!==g.POSITIVE,notNegative:e=>e!==E.NEGATIVE&&e!==g.NEGATIVE}),N=(e,n)=>({$event:t,column:r})=>{var i;if(!u(e).includes(null==(i=r.editRender)?void 0:i.name))return!0;const o=null==t?void 0:t.target;return!s(o)||!l(o,n)};function V(e){return[I.TRANSFORM_WITH_SPAN_METHOD,I.TRANSFORM_TREE_TYPE].includes(`${e.isTree}`)}function $(e){return d(e)&&!!e.match(/^###\{[^{}]+}$/)}function x(e){try{return JSON.parse(e.replace(/^###/,""))}catch(e){return{}}}function U(e,n){if(e.$__SEPARATE||!n.editRender||!n.editRender.props)return e[n.field];const{fieldSetting:t}=n.editRender.props;if(!d(t))return e[n.field];const{mergedFeildExpression:r}=o(t);return r&&d(r)?r.replace(/#{(.+?)}/g,(function(n,t){let r=t?e[t.trim()]:null;$(r)&&(r=x(r).change_text);return r||(null==r?"--":r)})):e[n.field]}const b=["SEARCH","SELECT","RADIO","CHECKBOX"];function y(e){return e.notParticipatingSearch===E.NEGATIVE&&b.includes(T.getCellType(e))&&f(e.options)&&e.options.length}export{P as IhoTableRenderHelper,A as IhoTableStatusHelper,T as IhoTableUtils,h as IhoTableWarn,N as createIhoTableClearActivedInterceptor,R as eventListener2EventName,S as eventName2EventListener,O as getColumnRenderWidth,C as getRowHeight,y as isCompatibleColumn,$ as isRichContent,V as isTransformTreeType,U as parseMergeField,x as parseRichContent,F as useIhoTableFormEvent,w as useUUIDMap};
|