cnhis-design-vue 3.2.14-beta.2 → 3.2.14-beta.24

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.
Files changed (233) hide show
  1. package/es/components/ai-chat/src/components/ChatCard.js +1 -1
  2. package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
  3. package/es/components/ai-chat/src/components/ChatMain.js +1 -1
  4. package/es/components/ai-chat/src/components/ChatPatient.vue2.js +1 -1
  5. package/es/components/ai-chat/src/components/ChatPrompt.vue2.js +1 -1
  6. package/es/components/audio-sdk/src/components/recording.vue2.js +1 -1
  7. package/es/components/big-table/src/BigTable.vue2.js +1 -1
  8. package/es/components/big-table/src/components/edit-form/edit-date.js +1 -1
  9. package/es/components/big-table/src/components/edit-form/edit-select.js +1 -1
  10. package/es/components/big-table/src/components/edit-form/edit-time.js +1 -1
  11. package/es/components/big-table/src/components/input-button.vue2.js +1 -1
  12. package/es/components/big-table/src/hooks/useTableParse.js +1 -1
  13. package/es/components/button-print/index.d.ts +4 -0
  14. package/es/components/button-print/src/ButtonPrint.vue.d.ts +4 -0
  15. package/es/components/button-print/src/components/IdentityVerification.vue2.js +1 -1
  16. package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +4 -0
  17. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
  18. package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
  19. package/es/components/classification/src/components/set-classification/index.vue2.js +1 -1
  20. package/es/components/classification/src/components/table-modal/index.vue2.js +1 -1
  21. package/es/components/classification/src/index.vue2.js +1 -1
  22. package/es/components/expand-field/src/components/FormBatchOptionsModal.vue2.js +1 -1
  23. package/es/components/expand-field/src/components/PersonModal.vue2.js +1 -1
  24. package/es/components/expand-field/src/components/form.vue2.js +1 -1
  25. package/es/components/expand-field/src/index.vue2.js +1 -1
  26. package/es/components/expand-field/src/utils/constant.js +1 -1
  27. package/es/components/fabric-chart/index.d.ts +19 -2
  28. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +19 -2
  29. package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
  30. package/es/components/fabric-chart/src/components/PopupMenu.js +1 -1
  31. package/es/components/fabric-chart/src/components/PopupTip.vue.d.ts +13 -0
  32. package/es/components/fabric-chart/src/components/PopupTip.vue2.js +1 -1
  33. package/es/components/fabric-chart/src/components/useStyle.js +1 -1
  34. package/es/components/fabric-chart/src/constants/index.js +1 -1
  35. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  36. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.d.ts +1 -0
  37. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
  38. package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.js +1 -1
  39. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
  40. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.d.ts +1 -0
  41. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
  42. package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.js +1 -1
  43. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcess.js +1 -1
  44. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcessChart.js +1 -1
  45. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  46. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
  47. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
  48. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.d.ts +1 -0
  49. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  50. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.d.ts +7 -1
  51. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
  52. package/es/components/fabric-chart/src/hooks/temperature/useBottom.js +1 -1
  53. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  54. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  55. package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
  56. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.d.ts +1 -0
  57. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  58. package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
  59. package/es/components/fabric-chart/src/hooks/useCommon.js +1 -1
  60. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
  61. package/es/components/fabric-chart/src/interface.d.ts +2 -0
  62. package/es/components/fabric-chart/src/utils/index.d.ts +1 -0
  63. package/es/components/fabric-chart/src/utils/index.js +1 -1
  64. package/es/components/field-set/src/FieldColor.vue.d.ts +3 -3
  65. package/es/components/field-set/src/FieldColor.vue2.js +1 -1
  66. package/es/components/field-set/src/FieldFilter.vue.d.ts +5 -4
  67. package/es/components/field-set/src/FieldFilter.vue2.js +1 -1
  68. package/es/components/field-set/src/FieldSet.vue.d.ts +2 -2
  69. package/es/components/field-set/src/FieldSet.vue2.js +1 -1
  70. package/es/components/field-set/src/Index.vue2.js +1 -1
  71. package/es/components/field-set/src/TableStyle.vue2.js +1 -1
  72. package/es/components/field-set/src/components/condition.vue2.js +1 -1
  73. package/es/components/field-set/src/components/edit-dialog.vue.d.ts +1 -1
  74. package/es/components/field-set/src/components/edit-dialog.vue2.js +1 -1
  75. package/es/components/field-set/src/components/edit-filter.vue2.js +1 -1
  76. package/es/components/field-set/src/components/table-row.vue.d.ts +2 -2
  77. package/es/components/field-set/src/components/table-row.vue2.js +1 -1
  78. package/es/components/field-set/src/constants/filter.d.ts +21 -12
  79. package/es/components/field-set/src/constants/filter.js +1 -1
  80. package/es/components/field-set/src/constants/index.js +1 -1
  81. package/es/components/field-set/src/types/index.d.ts +1 -1
  82. package/es/components/form-config/index.d.ts +7 -5
  83. package/es/components/form-config/index.js +1 -1
  84. package/es/components/form-config/src/FormConfig.vue.d.ts +7 -5
  85. package/es/components/form-config/src/FormConfig.vue2.js +1 -1
  86. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +2 -0
  87. package/es/components/form-config/src/components/FormConfigCreator.vue2.js +1 -1
  88. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +2 -2
  89. package/es/components/form-config/src/components/FormConfigEdit.vue2.js +1 -1
  90. package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -1
  91. package/es/components/form-config/src/components/renderer/DefaultNode.vue2.js +1 -1
  92. package/es/components/form-config/src/constants/index.d.ts +1 -11
  93. package/es/components/form-config/src/constants/index.js +1 -1
  94. package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
  95. package/es/components/form-config/src/hooks/useLocale.d.ts +52 -0
  96. package/es/components/form-config/src/hooks/useLocale.js +1 -0
  97. package/es/components/form-render/index.js +1 -1
  98. package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.js +1 -1
  99. package/es/components/form-render/src/components/renderer/combination/jsonCombination.js +1 -1
  100. package/es/components/form-render/src/components/renderer/combination/tableCombination.js +1 -1
  101. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
  102. package/es/components/form-render/src/components/renderer/switch.js +1 -1
  103. package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
  104. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  105. package/es/components/form-render/src/hooks/usePresetScope.d.ts +1 -1
  106. package/es/components/form-render/src/hooks/usePresetScope.js +1 -1
  107. package/es/components/form-render/src/utils/index.d.ts +1 -0
  108. package/es/components/form-render/src/utils/index.js +1 -1
  109. package/es/components/iho-chat/index.d.ts +612 -52
  110. package/es/components/iho-chat/src/Index.vue.d.ts +615 -59
  111. package/es/components/iho-chat/src/Index.vue2.js +1 -1
  112. package/es/components/iho-chat/src/api/index.d.ts +1 -0
  113. package/es/components/iho-chat/src/api/index.js +1 -1
  114. package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +32 -1
  115. package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
  116. package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +52 -3
  117. package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
  118. package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +52 -2
  119. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
  120. package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +221 -11
  121. package/es/components/iho-chat/src/components/ChatHeader.vue2.js +1 -1
  122. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +82 -6
  123. package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
  124. package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +19 -1
  125. package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
  126. package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +20 -2
  127. package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
  128. package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +71 -4
  129. package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
  130. package/es/components/iho-chat/src/components/ContextMenu.d.ts +11 -2
  131. package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
  132. package/es/components/iho-chat/src/components/MessageTemplate.vue.d.ts +1 -1
  133. package/es/components/iho-chat/src/components/MessageTemplate.vue2.js +1 -1
  134. package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +51 -2
  135. package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +1 -1
  136. package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +19 -1
  137. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  138. package/es/components/iho-chat/src/components/SiderList.vue.d.ts +66 -1
  139. package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
  140. package/es/components/iho-chat/src/components/Video.vue.d.ts +19 -1
  141. package/es/components/iho-chat/src/components/Video.vue2.js +1 -1
  142. package/es/components/iho-chat/src/constants/index.d.ts +13 -3
  143. package/es/components/iho-chat/src/constants/index.js +1 -1
  144. package/es/components/iho-chat/src/hooks/index.d.ts +2 -2
  145. package/es/components/iho-chat/src/hooks/index.js +1 -1
  146. package/es/components/iho-chat/src/hooks/useData.d.ts +94 -0
  147. package/es/components/iho-chat/src/hooks/useData.js +1 -0
  148. package/es/components/iho-chat/src/hooks/useSearchUserList.js +1 -1
  149. package/es/components/iho-chat/src/hooks/useVideo.d.ts +19 -1
  150. package/es/components/iho-chat/src/hooks/useVideo.js +1 -1
  151. package/es/components/iho-chat/src/hooks/useWebSocket.d.ts +3 -0
  152. package/es/components/iho-chat/src/hooks/useWebSocket.js +1 -0
  153. package/es/components/iho-chat/src/types/index.d.ts +0 -6
  154. package/es/components/iho-chat/src/types/index.js +1 -1
  155. package/es/components/iho-chat/src/utils/index.d.ts +1 -0
  156. package/es/components/iho-chat/src/utils/index.js +1 -1
  157. package/es/components/iho-chat/style/index.css +1 -1
  158. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
  159. package/es/components/iho-table/src/plugins/dynamicFilterRenderPlugin/dynamicFilter.vue2.js +1 -1
  160. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
  161. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
  162. package/es/components/iho-table/src/plugins/filterTextPlugin/filter.vue2.js +1 -1
  163. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  164. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
  165. package/es/components/iho-table/src/utils/index.js +1 -1
  166. package/es/components/index.css +1 -1
  167. package/es/components/index.js +1 -1
  168. package/es/components/info-header/src/components/patientInfo/index.vue2.js +1 -1
  169. package/es/components/keyboard/src/Keyboard.vue2.js +1 -1
  170. package/es/components/keyboard/src/components/NumberPanel.vue2.js +1 -1
  171. package/es/components/map/src/Map.vue2.js +1 -1
  172. package/es/components/picture-clipper/src/PictureClipper.vue2.js +1 -1
  173. package/es/components/quick-search/src/index.vue2.js +1 -1
  174. package/es/components/recommend-search/src/components/RecommendSelect.vue2.js +1 -1
  175. package/es/components/scale-view/index.d.ts +31 -0
  176. package/es/components/scale-view/src/ScaleView.vue.d.ts +13 -0
  177. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  178. package/es/components/scale-view/src/components/composables/choose-common.js +1 -1
  179. package/es/components/scale-view/src/components/formitem/r-cascader.js +1 -1
  180. package/es/components/scale-view/src/components/formitem/r-checkbox.d.ts +9 -0
  181. package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -1
  182. package/es/components/scale-view/src/components/formitem/r-input.d.ts +9 -0
  183. package/es/components/scale-view/src/components/formitem/r-input.js +1 -1
  184. package/es/components/scale-view/src/components/formitem/r-map.js +1 -1
  185. package/es/components/scale-view/src/components/formitem/r-radio.d.ts +9 -0
  186. package/es/components/scale-view/src/components/formitem/r-radio.js +1 -1
  187. package/es/components/scale-view/src/components/formitem/r-select.js +1 -1
  188. package/es/components/scale-view/src/components/formitem/r-sign.js +1 -1
  189. package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -1
  190. package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
  191. package/es/components/scale-view/src/hooks/scaleview-methods.js +1 -1
  192. package/es/components/scale-view/src/hooks/scaleview-props.d.ts +4 -0
  193. package/es/components/scale-view/src/hooks/scaleview-props.js +1 -1
  194. package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -1
  195. package/es/components/scale-view/src/hooks/scaleview-validate.js +1 -1
  196. package/es/components/scale-view/src/hooks/use-component.d.ts +72 -0
  197. package/es/components/scale-view/style/index.css +1 -1
  198. package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
  199. package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
  200. package/es/components/select-label/src/components/label-classify.vue2.js +1 -1
  201. package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue2.js +1 -1
  202. package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue2.js +1 -1
  203. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  204. package/es/components/select-person/src/SelectPersonType.vue2.js +1 -1
  205. package/es/components/select-person/src/index.vue2.js +1 -1
  206. package/es/components/table-export-field/src/components/ExportModal.vue2.js +1 -1
  207. package/es/components/table-export-field/src/components/SaveProjectModal.vue2.js +1 -1
  208. package/es/components/table-filter/src/components/bi-filter/helpers/options.js +1 -1
  209. package/es/components/table-filter/src/components/bi-filter/index.vue2.js +1 -1
  210. package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -1
  211. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -1
  212. package/es/components/table-filter/src/components/classify-filter/helpers/options.js +1 -1
  213. package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -1
  214. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts +4 -7
  215. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js +1 -1
  216. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +4 -7
  217. package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.js +1 -1
  218. package/es/components/table-filter/src/components/render-widget/helpers/selectExtraMap.js +1 -1
  219. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +4 -7
  220. package/es/components/table-filter/src/tool/baseOptions.js +1 -1
  221. package/es/components/tooth-bitmap/src/ToothBitmap.vue2.js +1 -1
  222. package/es/components/vod-chunk-upload/src/hooks/upload-computed.js +1 -1
  223. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +1 -1
  224. package/es/components/vod-chunk-upload/src/vod-upload-modal.js +1 -1
  225. package/es/shared/package.json.js +1 -1
  226. package/es/shared/types/index.d.ts +3 -0
  227. package/es/shared/utils/index.d.ts +1 -0
  228. package/es/shared/utils/index.js +1 -1
  229. package/package.json +2 -2
  230. package/es/components/iho-chat/src/hooks/useSession.d.ts +0 -12
  231. package/es/components/iho-chat/src/hooks/useSession.js +0 -1
  232. package/es/components/iho-chat/src/hooks/useState.d.ts +0 -18
  233. package/es/components/iho-chat/src/hooks/useState.js +0 -1
@@ -1 +1 @@
1
- import{defineComponent as e,inject as l,ref as o,computed as t,onBeforeUnmount as a,nextTick as n,createVNode as r,toRaw as u}from"vue";import{arrayed as i}from"../../../../../../../shared/utils/index.js";import{NSelect as s}from"naive-ui";import{useVModel as d,useDebounceFn as c}from"@vueuse/core";import"date-fns";import{isFunction as p,isEmpty as v,isArray as f,isObject as m,omit as y,cloneDeep as h,xor as w}from"lodash-es";import"@vue/shared";import{useSelectAllowModify as b}from"../../../../../../../shared/hooks/selectHooks/useSelectAllowModify.js";import{useOptionFiltered as g}from"../../../../../../../shared/hooks/selectHooks/useOptionFiltered.js";import"../../../../../../../shared/hooks/selectHooks/useSearchContent.js";import{useSelectRenders as F}from"../../../../../../../shared/hooks/selectHooks/useSelectRenders.js";import{useMenuWidthAuto as S}from"../../../../../../../shared/hooks/selectHooks/useMenuWidthAuto.js";import"../../../../../../../shared/hooks/useScrollLoading.js";import{InjectionIhoTableUUID as k,InjectionIhoTableConfig as O}from"../../../../constants/index.js";import{useIhoTableFormEvent as A}from"../../../../utils/index.js";import{getSelectOptions as j,selectOptionsMap as B}from"../hooks/useSelectOption.js";var x=e({name:"EditSelect",props:{value:{type:[Array,String,Number]},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0},options:{type:Array,default:()=>[]},queryOptions:{type:Function},placeholder:{type:String,default:"请选择"},allowModify:{type:Boolean},allowCreate:{type:Boolean},shouldSave:{type:Boolean},consistentMenuWidth:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},searchField:{type:Array},aliasField:{type:String},menuProps:{type:Object},multiple:{type:Boolean},deletable:{type:Boolean,default:!0},selectAll:{type:Boolean,default:!0},searchByValue:{type:Boolean}},emits:["update:value"],setup(e,{emit:x}){const C=l("$xetable"),K=d(e,"value",x),$=o(null),{emitFormChangeWithParams:q}=A({...e,$table:C}),R=t((()=>e.labelField)),M=t((()=>e.valueField)),D=t((()=>e.aliasField)),H=t((()=>e.searchField)),{fullOptions:P,filterOptions:_,searchContent:E,remoteOptions:L}=g(e,{labelKey:R,valueKey:M,searchKey:H}),{modifyEvent:T,modifyAbleRef:V,getOptionsWithCreated:W}=b(e,{searchContent:E,labelKey:R,valueKey:M,valueRef:K,fullOptions:P}),I=t((()=>W(V.value?P.value:_.value))),{setMenuWith:U}=S(e,{selectRef:$,options:I}),N=o(!1),z=c((async function(l=""){E.value=l;try{if(N.value=!0,!p(e.queryOptions)||!v(e.options))return;L.value=await e.queryOptions({keyword:l,row:e.row,column:e.column,rowIndex:e.rowIndex})}catch(l){console.log(`获取${e.column.field}options错误`)}finally{N.value=!1}}),400),G=l(k);a((()=>X(!0)));const J=o(!1);function Q(e){J.value=e,X(),z(),e&&U()}async function X(l=!1){var o,t,a;if(!e.multiple)return;await n();const{refTableLeftBody:r,refTableBody:u}=C.getRefMaps(),i=null==(o=null==r?void 0:r.value)?void 0:o.$el;if(!i)return;const s=null==(t=null==u?void 0:u.value)?void 0:t.$el,d=C.getRowid(e.row),c=null==(a=s.querySelector(`.vxe-body--row[rowid="${d}"]`))?void 0:a.clientHeight;i.querySelector(`.vxe-body--row[rowid="${d}"]`).style.height=l?"unset":c+"px"}async function Y(l,o){var t,a;const n=e.value;await T.updateValue(l,o);const r=j(G,e.column.field,e.row,C);G&&f(r)&&i(o).forEach((e=>{if(!m(e))return;const l=e;l.created&&l.shouldSave&&r.push(y(u(l),["created","shouldSave"]))}));const s=null==(t=e.column.editRender)?void 0:t.props;if(G&&(null==s?void 0:s.connectField)){const o=null==(a=s.connectField)?void 0:a.split(","),t=B.get(G);o.forEach((async o=>{var a;const{tableColumn:n}=C.reactData,r=n.find((e=>e.field===o)),u=null==(a=null==r?void 0:r.editRender)?void 0:a.props;if(null==u?void 0:u.queryOptions){const a=l?`${o}__${e.column.field}-${l}`:o;if(t[a])return;t[a]=await u.queryOptions({row:e.row,column:r,isFullData:!0,connectColumn:e.column})}}))}return q({oldValue:n,option:h(o)}),X()}const Z=l(O);function ee(){var e,l;return null==(l=null==(e=Z.value)?void 0:e.keyboardConfig)?void 0:l.forceArrowKey}const le=o(!0);function oe(e){var l,o,t;if($.value)if("Tab"===e.code||ee()&&(t=e.key,["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t)))J.value?null==(o=(l=$.value).handleKeydown)||o.call(l,{...e,key:"Enter",preventDefault:e.preventDefault.bind(e)}):C.internalData.isActivated=!0;else if("Backspace"===e.code&&ee()){""===$.value.pattern&&(K.value=null,le.value=!1)}else le.value=!0}const{renderTag:te,renderLabel:ae,renderSelectAll:ne}=F(e,{labelKey:R,valueKey:M,valueRef:K,showKey:D,searchContent:E});function re(l){if(!e.multiple)return;const o=l?I.value.map((e=>e[M.value])):[];if(!w(o,K.value).length)return;const t=K.value;K.value=o,q({oldValue:t,option:l?I.value:[]})}const ue=()=>({class:"iho-table__selectOption"}),ie=t((()=>{var l,o;return{...e.menuProps,class:`iho-table__selectMenu ${null!=(o=null==(l=e.menuProps)?void 0:l.class)?o:""}`}}));return()=>{const l={};return e.multiple&&e.selectAll&&(l.action=()=>ne(re)),r(s,{ref:$,placeholder:e.placeholder,labelField:e.labelField,valueField:e.valueField,loading:N.value,options:I.value,multiple:e.multiple,value:e.value,remote:!0,onSearch:z,clearable:!0,filterable:!0,keyboard:le.value,nodeProps:ue,menuProps:ie.value,renderTag:te,renderLabel:ae,show:J.value,onUpdateShow:Q,onUpdateValue:Y,onKeydownCapture:oe,onFocus:T.focus,onBlur:T.blur},l)}}});export{x as default};
1
+ import{defineComponent as e,inject as l,ref as o,computed as t,onBeforeUnmount as a,nextTick as n,createVNode as r,toRaw as u}from"vue";import{arrayed as i}from"../../../../../../../shared/utils/index.js";import{NSelect as s}from"naive-ui";import{useVModel as d,useDebounceFn as c}from"@vueuse/core";import"date-fns";import{isFunction as p,isEmpty as v,isArray as f,isObject as y,omit as m,cloneDeep as h,xor as w}from"lodash-es";import"@vue/shared";import{useSelectAllowModify as b}from"../../../../../../../shared/hooks/selectHooks/useSelectAllowModify.js";import{useOptionFiltered as g}from"../../../../../../../shared/hooks/selectHooks/useOptionFiltered.js";import"../../../../../../../shared/hooks/selectHooks/useSearchContent.js";import{useSelectRenders as F}from"../../../../../../../shared/hooks/selectHooks/useSelectRenders.js";import{useMenuWidthAuto as S}from"../../../../../../../shared/hooks/selectHooks/useMenuWidthAuto.js";import"../../../../../../../shared/hooks/useScrollLoading.js";import{InjectionIhoTableUUID as k,InjectionIhoTableConfig as O}from"../../../../constants/index.js";import{useIhoTableFormEvent as A}from"../../../../utils/index.js";import{getSelectOptions as B,selectOptionsMap as j}from"../hooks/useSelectOption.js";var C,x=e({name:"EditSelect",props:{value:{type:[Array,String,Number]},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0},options:{type:Array,default:()=>[]},queryOptions:{type:Function},placeholder:{type:String,default:(null==(C=window.getLanguageByCode)?void 0:C.call(window,"10010.1.147"))||"请选择"},allowModify:{type:Boolean},allowCreate:{type:Boolean},shouldSave:{type:Boolean},consistentMenuWidth:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},searchField:{type:Array},aliasField:{type:String},menuProps:{type:Object},multiple:{type:Boolean},deletable:{type:Boolean,default:!0},selectAll:{type:Boolean,default:!0},searchByValue:{type:Boolean}},emits:["update:value"],setup(e,{emit:C}){const x=l("$xetable"),K=d(e,"value",C),$=o(null),{emitFormChangeWithParams:q}=A({...e,$table:x}),R=t((()=>e.labelField)),M=t((()=>e.valueField)),D=t((()=>e.aliasField)),H=t((()=>e.searchField)),{fullOptions:L,filterOptions:P,searchContent:_,remoteOptions:E}=g(e,{labelKey:R,valueKey:M,searchKey:H}),{modifyEvent:T,modifyAbleRef:V,getOptionsWithCreated:W}=b(e,{searchContent:_,labelKey:R,valueKey:M,valueRef:K,fullOptions:L}),I=t((()=>W(V.value?L.value:P.value))),{setMenuWith:U}=S(e,{selectRef:$,options:I}),N=o(!1),z=c((async function(l=""){_.value=l;try{if(N.value=!0,!p(e.queryOptions)||!v(e.options))return;E.value=await e.queryOptions({keyword:l,row:e.row,column:e.column,rowIndex:e.rowIndex})}catch(l){console.log(`获取${e.column.field}options错误`)}finally{N.value=!1}}),400),G=l(k);a((()=>X(!0)));const J=o(!1);function Q(e){J.value=e,X(),z(),e&&U()}async function X(l=!1){var o,t,a;if(!e.multiple)return;await n();const{refTableLeftBody:r,refTableBody:u}=x.getRefMaps(),i=null==(o=null==r?void 0:r.value)?void 0:o.$el;if(!i)return;const s=null==(t=null==u?void 0:u.value)?void 0:t.$el,d=x.getRowid(e.row),c=null==(a=s.querySelector(`.vxe-body--row[rowid="${d}"]`))?void 0:a.clientHeight;i.querySelector(`.vxe-body--row[rowid="${d}"]`).style.height=l?"unset":c+"px"}async function Y(l,o){var t,a;const n=e.value;await T.updateValue(l,o);const r=B(G,e.column.field,e.row,x);G&&f(r)&&i(o).forEach((e=>{if(!y(e))return;const l=e;l.created&&l.shouldSave&&r.push(m(u(l),["created","shouldSave"]))}));const s=null==(t=e.column.editRender)?void 0:t.props;if(G&&(null==s?void 0:s.connectField)){const o=null==(a=s.connectField)?void 0:a.split(","),t=j.get(G);o.forEach((async o=>{var a;const{tableColumn:n}=x.reactData,r=n.find((e=>e.field===o)),u=null==(a=null==r?void 0:r.editRender)?void 0:a.props;if(null==u?void 0:u.queryOptions){const a=l?`${o}__${e.column.field}-${l}`:o;if(t[a])return;t[a]=await u.queryOptions({row:e.row,column:r,isFullData:!0,connectColumn:e.column})}}))}return q({oldValue:n,option:h(o)}),X()}const Z=l(O);function ee(){var e,l;return null==(l=null==(e=Z.value)?void 0:e.keyboardConfig)?void 0:l.forceArrowKey}const le=o(!0);function oe(e){var l,o,t;if($.value)if("Tab"===e.code||ee()&&(t=e.key,["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t)))J.value?null==(o=(l=$.value).handleKeydown)||o.call(l,{...e,key:"Enter",preventDefault:e.preventDefault.bind(e)}):x.internalData.isActivated=!0;else if("Backspace"===e.code&&ee()){""===$.value.pattern&&(K.value=null,le.value=!1)}else le.value=!0}const{renderTag:te,renderLabel:ae,renderSelectAll:ne}=F(e,{labelKey:R,valueKey:M,valueRef:K,showKey:D,searchContent:_});function re(l){if(!e.multiple)return;const o=l?I.value.map((e=>e[M.value])):[];if(!w(o,K.value).length)return;const t=K.value;K.value=o,q({oldValue:t,option:l?I.value:[]})}const ue=()=>({class:"iho-table__selectOption"}),ie=t((()=>{var l,o;return{...e.menuProps,class:`iho-table__selectMenu ${null!=(o=null==(l=e.menuProps)?void 0:l.class)?o:""}`}}));return()=>{const l={};return e.multiple&&e.selectAll&&(l.action=()=>ne(re)),r(s,{ref:$,placeholder:e.placeholder,labelField:e.labelField,valueField:e.valueField,loading:N.value,options:I.value,multiple:e.multiple,value:e.value,remote:!0,onSearch:z,clearable:!0,filterable:!0,keyboard:le.value,nodeProps:ue,menuProps:ie.value,renderTag:te,renderLabel:ae,show:J.value,onUpdateShow:Q,onUpdateValue:Y,onKeydownCapture:oe,onFocus:T.focus,onBlur:T.blur},l)}}});export{x as default};
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as t,inject as l,ref as a,computed as o,reactive as r,watch as u,nextTick as n,onBeforeUnmount as i,openBlock as m,createBlock as d,unref as v,withCtx as c,createVNode as s,mergeProps as f,isRef as p,createElementBlock as h,Fragment as b,renderList as y,createTextVNode as g,toDisplayString as w,createCommentVNode as k}from"vue";import{noop as _}from"lodash-es";import{NPopover as F,NInput as V,NSpace as S,NScrollbar as $,NButton as H}from"naive-ui";import{useIhoTableFormEvent as x}from"../../../../utils/index.js";import D from"../../../../../../time-picker/index.js";import{parse as C,isValid as O,format as j,getHours as E,getMinutes as A,getSeconds as I}from"date-fns";var P=e({__name:"editTime",props:{formattedValue:{type:String},column:{type:Object},row:{type:Object},rowIndex:{type:Number},shortcutOptions:{type:Array,default:()=>[]},ignoreGlobEmit:{type:Boolean,default:!1}},emits:["update:formattedValue","click"],setup(e,{emit:P}){const R=e,U=t(),{emitFormChangeWithParams:q=_}=R.ignoreGlobEmit?{}:x({...R,$table:l("$xetable")}),G=a(null),M=a(!1),N=a(),W=a();let z=R.formattedValue;const B=o((()=>W.value&&X(W.value)?{style:"text-decoration: line-through"}:{})),K=o({get(){if(!W.value)return null;const e=C(W.value,L.valueFormat,new Date);return O(e)?j(e,L.valueFormat):R.formattedValue?ee(R.formattedValue):null},set(e){Q(e)}}),{placeholder:T="请选择",valueFormat:J="HH:mm"}=U,L=r({...U,placeholder:T,valueFormat:J,format:J});function Q(e){W.value=e||"",e&&X(e)||(z=e)}function X(e){var t,l,a;const o=C(e,L.format,new Date),r=E(o),u=A(o),n=I(o),i=null==(t=L.isHourDisabled)?void 0:t.call(L,r),m=null==(l=L.isMinuteDisabled)?void 0:l.call(L,u,r),d=null==(a=L.isSecondDisabled)?void 0:a.call(L,n,u,r);return i||m||d}function Y(){[L.valueFormat.replace(/[^\w]/g,""),L.valueFormat].some((e=>{const t=C(W.value,e,new Date);if(!W.value||O(t)){return Q(W.value?j(t,L.valueFormat):null),!0}return!1}))}function Z(e){var t;const{key:l}=e;"Enter"===l&&(null==(t=G.value)||t.blur(),M.value=!1)}function ee(e){var t;const l=L.valueFormat.match(/\W/)[0]||":",a=e.split(l).map(Number),o=`${a[0].toString().padStart(2,"0")}${l}${a[1].toString().padStart(2,"0")}`;return"HH:mm"===L.valueFormat?o:"HH:mm:ss"===L.valueFormat?`${o}${l}${(null!=(t=a[2])?t:0).toString().padStart(2,"0")}`:e}function te(){z&&X(z)||R.formattedValue!==z&&(P("update:formattedValue",z),q({oldValue:R.formattedValue}))}return u((()=>R.formattedValue),(e=>{z=e,e&&(W.value=ee(e))}),{immediate:!0}),u((()=>M.value),(async e=>{var t,l,a,o,r;e?(z=K.value,await n(),null==(r=null==(o=null==(a=null==(l=null==(t=N.value)?void 0:t.$timePicker)?void 0:l.panelInstRef)?void 0:a.$el)?void 0:o.querySelectorAll(".n-time-picker-col"))||r.forEach((e=>{var t,l;return null==(l=null==(t=null==e?void 0:e.querySelector)?void 0:t.call(e,".n-time-picker-col__item--active"))?void 0:l.scrollIntoView()}))):te()})),i((()=>{te()})),(t,l)=>(m(),d(v(F),{show:M.value,"onUpdate:show":l[3]||(l[3]=e=>M.value=e),trigger:"click",showArrow:!1,placement:"bottom-start",style:{padding:"0"}},{trigger:c((()=>[s(v(V),{ref_key:"formRef",ref:G,clearable:"",placeholder:v(T),value:W.value,"onUpdate:value":l[0]||(l[0]=e=>W.value=e),valueModifiers:{trim:!0},"input-props":v(B),onChange:Y,onKeydown:Z},null,8,["placeholder","value","input-props"])])),default:c((()=>[s(v(S),null,{default:c((()=>[s(v(D),f({ref_key:"timePickerRef",ref:N,show:""},v(L),{class:"iho-table__time-picker",to:!1,"formatted-value":v(K),"onUpdate:formatted-value":l[1]||(l[1]=e=>p(K)?K.value=e:null),onConfirm:l[2]||(l[2]=()=>M.value=!1)}),null,16,["formatted-value"]),s(v($),{class:"iho-table__scrollbar"},{default:c((()=>[e.shortcutOptions.length?(m(),d(v(S),{key:0,vertical:"",wrap:!1},{default:c((()=>[(m(!0),h(b,null,y(e.shortcutOptions,(e=>(m(),d(v(H),{size:"tiny",key:e,disabled:X(e),onClick:t=>function(e){Q(ee(e)),M.value=!1}(e)},{default:c((()=>[g(w(e),1)])),_:2},1032,["disabled","onClick"])))),128))])),_:1})):k("v-if",!0)])),_:1})])),_:1})])),_:1},8,["show"]))}});export{P as default};
1
+ import{defineComponent as e,useAttrs as t,inject as l,ref as a,computed as o,reactive as r,watch as u,nextTick as n,onBeforeUnmount as i,openBlock as m,createBlock as d,unref as v,withCtx as c,createVNode as s,mergeProps as f,isRef as p,createElementBlock as h,Fragment as g,renderList as w,createTextVNode as y,toDisplayString as b,createCommentVNode as k}from"vue";import{noop as _}from"lodash-es";import{NPopover as F,NInput as V,NSpace as S,NScrollbar as $,NButton as H}from"naive-ui";import{useIhoTableFormEvent as x}from"../../../../utils/index.js";import C from"../../../../../../time-picker/index.js";import{parse as D,isValid as O,format as j,getHours as E,getMinutes as A,getSeconds as I}from"date-fns";var P=e({__name:"editTime",props:{formattedValue:{type:String},column:{type:Object},row:{type:Object},rowIndex:{type:Number},shortcutOptions:{type:Array,default:()=>[]},ignoreGlobEmit:{type:Boolean,default:!1}},emits:["update:formattedValue","click"],setup(e,{emit:P}){var R;const U=e,q=t(),{emitFormChangeWithParams:B=_}=U.ignoreGlobEmit?{}:x({...U,$table:l("$xetable")}),G=a(null),M=a(!1),N=a(),W=a();let z=U.formattedValue;const K=o((()=>W.value&&Y(W.value)?{style:"text-decoration: line-through"}:{})),L=o({get(){if(!W.value)return null;const e=D(W.value,Q.valueFormat,new Date);return O(e)?j(e,Q.valueFormat):U.formattedValue?te(U.formattedValue):null},set(e){X(e)}}),{placeholder:T=(null==(R=window.getLanguageByCode)?void 0:R.call(window,"10010.1.147"))||"请选择",valueFormat:J="HH:mm"}=q,Q=r({...q,placeholder:T,valueFormat:J,format:J});function X(e){W.value=e||"",e&&Y(e)||(z=e)}function Y(e){var t,l,a;const o=D(e,Q.format,new Date),r=E(o),u=A(o),n=I(o),i=null==(t=Q.isHourDisabled)?void 0:t.call(Q,r),m=null==(l=Q.isMinuteDisabled)?void 0:l.call(Q,u,r),d=null==(a=Q.isSecondDisabled)?void 0:a.call(Q,n,u,r);return i||m||d}function Z(){[Q.valueFormat.replace(/[^\w]/g,""),Q.valueFormat].some((e=>{const t=D(W.value,e,new Date);if(!W.value||O(t)){return X(W.value?j(t,Q.valueFormat):null),!0}return!1}))}function ee(e){var t;const{key:l}=e;"Enter"===l&&(null==(t=G.value)||t.blur(),M.value=!1)}function te(e){var t;const l=Q.valueFormat.match(/\W/)[0]||":",a=e.split(l).map(Number),o=`${a[0].toString().padStart(2,"0")}${l}${a[1].toString().padStart(2,"0")}`;return"HH:mm"===Q.valueFormat?o:"HH:mm:ss"===Q.valueFormat?`${o}${l}${(null!=(t=a[2])?t:0).toString().padStart(2,"0")}`:e}function le(){z&&Y(z)||U.formattedValue!==z&&(P("update:formattedValue",z),B({oldValue:U.formattedValue}))}return u((()=>U.formattedValue),(e=>{z=e,e&&(W.value=te(e))}),{immediate:!0}),u((()=>M.value),(async e=>{var t,l,a,o,r;e?(z=L.value,await n(),null==(r=null==(o=null==(a=null==(l=null==(t=N.value)?void 0:t.$timePicker)?void 0:l.panelInstRef)?void 0:a.$el)?void 0:o.querySelectorAll(".n-time-picker-col"))||r.forEach((e=>{var t,l;return null==(l=null==(t=null==e?void 0:e.querySelector)?void 0:t.call(e,".n-time-picker-col__item--active"))?void 0:l.scrollIntoView()}))):le()})),i((()=>{le()})),(t,l)=>(m(),d(v(F),{show:M.value,"onUpdate:show":l[3]||(l[3]=e=>M.value=e),trigger:"click",showArrow:!1,placement:"bottom-start",style:{padding:"0"}},{trigger:c((()=>[s(v(V),{ref_key:"formRef",ref:G,clearable:"",placeholder:v(T),value:W.value,"onUpdate:value":l[0]||(l[0]=e=>W.value=e),valueModifiers:{trim:!0},"input-props":v(K),onChange:Z,onKeydown:ee},null,8,["placeholder","value","input-props"])])),default:c((()=>[s(v(S),null,{default:c((()=>[s(v(C),f({ref_key:"timePickerRef",ref:N,show:""},v(Q),{class:"iho-table__time-picker",to:!1,"formatted-value":v(L),"onUpdate:formatted-value":l[1]||(l[1]=e=>p(L)?L.value=e:null),onConfirm:l[2]||(l[2]=()=>M.value=!1)}),null,16,["formatted-value"]),s(v($),{class:"iho-table__scrollbar"},{default:c((()=>[e.shortcutOptions.length?(m(),d(v(S),{key:0,vertical:"",wrap:!1},{default:c((()=>[(m(!0),h(g,null,w(e.shortcutOptions,(e=>(m(),d(v(H),{size:"tiny",key:e,disabled:Y(e),onClick:t=>function(e){X(te(e)),M.value=!1}(e)},{default:c((()=>[y(b(e),1)])),_:2},1032,["disabled","onClick"])))),128))])),_:1})):k("v-if",!0)])),_:1})])),_:1})])),_:1},8,["show"]))}});export{P as default};
@@ -1 +1 @@
1
- import{reactive as e,inject as t,unref as n,normalizeStyle as r,toRaw as i,createVNode as o}from"vue";import{jsonParse as l}from"../../../../shared/utils/index.js";import{promiseTimeout as u}from"@vueuse/shared";import{parse as a,isValid as c,compareDesc as s}from"date-fns";import{isNumber as d,isFunction as f,isString as p,isObject as m,isArray as v}from"lodash-es";import{InjectionIhoTableConfig as h,InjectionIhoTableEmits as I,IHO_TABLE_STRING_STATUS as g,IHO_TABLE_NUMBER_STATUS as E,IHO_TABLE_TREE_TYPE as T,EDITABLE_WIDGET_TYPE as w,InjectionIhoTableUUID as F}from"../constants/index.js";import{getSeparateInfo as R}from"./separateMap.js";export{deleteSeparateInfo,getSeparateInfo,setSeparateInfo}from"./separateMap.js";function S(e){return console.warn(`[IhoTable]: ${e}`)}const C=Object.freeze({getCellType(e){var t;return((null==(t=e.settingObj)?void 0:t.attr)||e.formType||"DEFAULT").toUpperCase()}});function D(){var e,n,r;const i=t(h);return i||S("this function(getRowHeight) only can be used in setup environment"),null!=(r=null==(n=null==(e=null==i?void 0:i.value)?void 0:e.rowConfig)?void 0:n.height)?r:32}function P(e){const t=e.slice(2);return`${t[0].toLowerCase()}${t.slice(1)}`}function b(e){return`on${e[0].toUpperCase()}${e.slice(1)}`}function O(t,n=!0){const r=n?e(new Map):new Map;return{uuidMap:r,getItemFromUUID:function(e){return r.get(e)||r.set(e,t()),r.get(e)},setItemFromUUID:function(e,t){r.set(e,t)},removeItemFromUUID:function(e){r.delete(e)}}}async function x(e,t,r,i,o=2){const l=function(){var o;const l=null==(o=n(i))?void 0:o.getColumnByField(e.field);if(!l)return;const u=y(l);return u?f(u.separateWidth)?u.separateWidth({column:l,row:t,rowIndex:r,$table:n(i)}):d(u.separateWidth)?u.separateWidth:l.renderWidth:l.renderWidth}();return d(l)&&l>0?l:o<=0?function(){const t=+e.colWidth;return d(t)?t:64}():(await u(0),x(e,t,r,i,o-1))}function A(e){const r=t(I);function o(){var t;const r=n(e);return{$table:r.$table,value:r.row[r.column.field],row:r.row,column:{...r.column,...null==(t=r.column.editRender)?void 0:t.props},index:r.rowIndex>-1?r.rowIndex:r.$rowIndex}}function l(e={}){r("formChange",{...o(),...i(e)})}function u(e={}){r("formClick",{...o(),...i(e)})}return{emitFormChange:function(){l()},emitFormClick:function(){u()},emitFormChangeWithParams:l,emitFormClickWithParams:u}}function y(e){var t;return null==(t=e.editRender)?void 0:t.props}const $=Object.freeze({createDefaultRenderCell:function(){return function({props:e},{row:n,column:r}){if("bottom"!==(null==e?void 0:e.separatePlacement))return c(n[r.field]);const i=t(F),l=R(i,n);if(!l)return c(n[r.field]);const{originalData:u=n,isLastRow:a}=l;return c(a?u[r.field]:null);function c(e){return[o("span",{title:j(r,e),class:"iho-table__colorAndIcon"},[e])]}}},createRenderEdit:function(e){return function({props:t},n){return e({...n,fieldItem:t||{},...A(n)})}},isEditableColumn(e,t){var n;return!1!==(null==(n=e.editConfig)?void 0:n.showIcon)&&t.editRender&&!1!==t.editRender.enabled},hasFilter(e){return this.hasDateFilter(e)||this.hasOptionFilter(e)||this.hasTextFilter(e)},hasDynamicFilter:e=>e.optionInfo&&(e.optionInfo.dynamicOptionInfo||e.optionInfo.list),hasOptionFilter(e){if(U(e))return!0;let t=e.fieldSetting;return p(t)&&(t=l(t||"")),m(t)&&((n=t).notParticipatingSearch!==g.POSITIVE&&"manual"===(null==(r=n.mapping)?void 0:r.type));var n,r},hasDateFilter(e){var t;return"daterange"===(null==(t=null==e?void 0:e.filterSetting)?void 0:t.type)},hasTextFilter(e){var t;return"text"===(null==(t=null==e?void 0:e.filterSetting)?void 0:t.type)},hasTitlePrefix(e){var t,n;return e&&((null==(t=e.titlePrefix)?void 0:t.content)||(null==(n=e.titlePrefix)?void 0:n.useHTML))}}),N=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});function _(e){return[T.TRANSFORM_WITH_SPAN_METHOD,T.TRANSFORM_TREE_TYPE].includes(`${e.isTree}`)}function H(e){return p(e)&&!!e.match(/^###\{[^{}]+}$/)}function V(e){try{return JSON.parse(e.replace(/^###/,""))}catch(e){return{}}}function W(e,t){if(e.$__SEPARATE||!t.editRender||!t.editRender.props)return e[t.field];const{fieldSetting:n}=t.editRender.props;if(!p(n))return e[t.field];const{mergedFeildExpression:r}=l(n);return r&&p(r)?r.replace(/#{(.+?)}/g,(function(t,n){let r=n?e[n.trim()]:null;H(r)&&(r=V(r).change_text);return r||(null==r?"--":r)})):e[t.field]}const M=["SEARCH","SELECT","RADIO","CHECKBOX"];function U(e){return e.notParticipatingSearch===E.NEGATIVE&&M.includes(C.getCellType(e))&&v(e.options)&&e.options.length}function j(e,t=""){return"tooltip"!==e.showOverflow&&p(t)?t:""}function G(e,t){var r,i,o;t=n(t)||"";const l=null!=(i=null==(r=e.editRender)?void 0:r.props)?i:{},u=a(t,(null==(o=null==l?void 0:l.componentProps)?void 0:o.valueFormat)||"HH:mm",new Date);return!c(u)}function L(e,t,r){var i,o;const l=null!=(o=null==(i=e.editRender)?void 0:i.props)?o:{};return r=n(r)||"",!c(new Date(r))||p(l.connectField)&&t[l.connectField]&&(l.isStartDate&&s(new Date(r),new Date(t[l.connectField]))<0||l.isEndDate&&s(new Date(r),new Date(t[l.connectField]))>0)}function k(e){var t,n;return(!0===e.variableHeight||"1"===e.variableHeight)&&(null!=(n=null==(t=e.editRender)?void 0:t.name)?n:C.getCellType(e))!==w.SEPARATE}function z(e){const t=e.internalData.tableFullColumn;return!!v(t)&&t.some((e=>{var t,n;return k(null!=(n=null==(t=e.editRender)?void 0:t.props)?n:{})}))}function B(e,t){return t?e?n=>[f(e)?e(n):e,f(t)?t(n):t]:t:e}function J(e,t){return t?e?n=>r([f(e)?e(n):e,f(t)?t(n):t]):t:e}function K(e){return function({option:t,column:n,row:r}){if(e&&v(r[e])&&r[e].length)return!1;const i=r[n.field];if(v(i))return i.some((e=>[t.label,t.value].includes(e)));if(p(i)){if(i===t.value||i===t.label)return!0;const{value:e,change_text:n}=V(i);return n===t.label||e===t.value}return null!=i&&t.value===i}}export{$ as IhoTableRenderHelper,N as IhoTableStatusHelper,C as IhoTableUtils,S as IhoTableWarn,K as createIhoTableFilterMethod,P as eventListener2EventName,b as eventName2EventListener,x as getColumnRenderWidth,y as getLowCodeFieldFromField,D as getRowHeight,j as getTitle,U as isCompatibleColumn,L as isInvalidDate,G as isInvalidTime,H as isRichContent,_ as isTransformTreeType,k as isVariableHeightColumn,z as isVariableHeightTable,B as mergeVxeClass,J as mergeVxeStyle,W as parseMergeField,V as parseRichContent,A as useIhoTableFormEvent,O as useUUIDMap};
1
+ import{reactive as e,inject as t,unref as n,toRaw as r,normalizeStyle as i,createVNode as o}from"vue";import{jsonParse as l}from"../../../../shared/utils/index.js";import{promiseTimeout as u}from"@vueuse/shared";import{parse as a,isValid as c,compareDesc as s}from"date-fns";import{isNumber as d,isFunction as f,isString as p,isObject as m,isArray as v}from"lodash-es";import{InjectionIhoTableEmits as h,InjectionIhoTableConfig as I,IHO_TABLE_STRING_STATUS as g,IHO_TABLE_NUMBER_STATUS as E,IHO_TABLE_TREE_TYPE as T,EDITABLE_WIDGET_TYPE as w,InjectionIhoTableUUID as F}from"../constants/index.js";import{getSeparateInfo as R}from"./separateMap.js";export{deleteSeparateInfo,getSeparateInfo,setSeparateInfo}from"./separateMap.js";function S(e){return console.warn(`[IhoTable]: ${e}`)}const C=Object.freeze({getCellType(e){var t;return((null==(t=e.settingObj)?void 0:t.attr)||e.formType||"DEFAULT").toUpperCase()}});function D(){var e,n,r;const i=t(I);return i||S("this function(getRowHeight) only can be used in setup environment"),null!=(r=null==(n=null==(e=null==i?void 0:i.value)?void 0:e.rowConfig)?void 0:n.height)?r:32}function P(e){const t=e.slice(2);return`${t[0].toLowerCase()}${t.slice(1)}`}function b(e){return`on${e[0].toUpperCase()}${e.slice(1)}`}function O(t,n=!0){const r=n?e(new Map):new Map;return{uuidMap:r,getItemFromUUID:function(e){return r.get(e)||r.set(e,t()),r.get(e)},setItemFromUUID:function(e,t){r.set(e,t)},removeItemFromUUID:function(e){r.delete(e)}}}async function x(e,t,r,i,o=2){const l=function(){var o;const l=null==(o=n(i))?void 0:o.getColumnByField(e.field);if(!l)return;const u=y(l);return u?f(u.separateWidth)?u.separateWidth({column:l,row:t,rowIndex:r,$table:n(i)}):d(u.separateWidth)?u.separateWidth:l.renderWidth:l.renderWidth}();return d(l)&&l>0?l:o<=0?function(){const t=+e.colWidth;return d(t)?t:64}():(await u(0),x(e,t,r,i,o-1))}function A(e){const i=t(h);function o(){var t;const r=n(e);return{$table:r.$table,value:r.row[r.column.field],row:r.row,column:{...r.column,...null==(t=r.column.editRender)?void 0:t.props},index:r.rowIndex>-1?r.rowIndex:r.$rowIndex}}function l(e={}){i("formChange",{...o(),...r(e)})}function u(e={}){i("formClick",{...o(),...r(e)})}return{emitFormChange:function(){l()},emitFormClick:function(){u()},emitFormChangeWithParams:l,emitFormClickWithParams:u}}function y(e){var t;return null==(t=e.editRender)?void 0:t.props}const $=Object.freeze({createDefaultRenderCell:function(){return function({props:e},{row:n,column:r}){if("bottom"!==(null==e?void 0:e.separatePlacement))return c(n[r.field]);const i=t(F),l=R(i,n);if(!l)return c(n[r.field]);const{originalData:u=n,isLastRow:a}=l;return c(a?u[r.field]:null);function c(e){return[o("span",{title:j(r,e),class:"iho-table__colorAndIcon"},[e])]}}},createRenderEdit:function(e){return function({props:t},n){return e({...n,fieldItem:t||{},...A(n)})}},isEditableColumn(e,t){var n;return!1!==(null==(n=e.editConfig)?void 0:n.showIcon)&&t.editRender&&!1!==t.editRender.enabled},hasFilter(e){return this.hasDateFilter(e)||this.hasOptionFilter(e)||this.hasTextFilter(e)},hasDynamicFilter:e=>e.optionInfo&&(e.optionInfo.dynamicOptionInfo||e.optionInfo.list),hasOptionFilter(e){if(U(e))return!0;let t=e.fieldSetting;return p(t)&&(t=l(t||"")),m(t)&&((n=t).notParticipatingSearch!==g.POSITIVE&&"manual"===(null==(r=n.mapping)?void 0:r.type));var n,r},hasDateFilter(e){var t;return"daterange"===(null==(t=null==e?void 0:e.filterSetting)?void 0:t.type)},hasTextFilter(e){var t;return"text"===(null==(t=null==e?void 0:e.filterSetting)?void 0:t.type)},hasTitlePrefix(e){var t,n;return e&&((null==(t=e.titlePrefix)?void 0:t.content)||(null==(n=e.titlePrefix)?void 0:n.useHTML))}}),N=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});function _(e){return[T.TRANSFORM_WITH_SPAN_METHOD,T.TRANSFORM_TREE_TYPE].includes(`${e.isTree}`)}function H(e){return p(e)&&!!e.match(/^###\{[^{}]+}$/)}function V(e){try{return JSON.parse(e.replace(/^###/,""))}catch(e){return{}}}function W(e,t){if(e.$__SEPARATE||!t.editRender||!t.editRender.props)return e[t.field];const{fieldSetting:n}=t.editRender.props;if(!p(n))return e[t.field];const{mergedFeildExpression:r}=l(n);return r&&p(r)?r.replace(/#{(.+?)}/g,(function(t,n){let r=n?e[n.trim()]:null;H(r)&&(r=V(r).change_text);return r||(null==r?"--":r)})):e[t.field]}const M=["SEARCH","SELECT","RADIO","CHECKBOX"];function U(e){return e.notParticipatingSearch===E.NEGATIVE&&M.includes(C.getCellType(e))&&v(e.options)&&e.options.length}function j(e,t=""){return"tooltip"!==e.showOverflow&&p(t)?t:""}function G(e,t){var r,i,o;t=n(t)||"";const l=null!=(i=null==(r=e.editRender)?void 0:r.props)?i:{},u=a(t,(null==(o=null==l?void 0:l.componentProps)?void 0:o.valueFormat)||"HH:mm",new Date);return!c(u)}function L(e,t,r){var i,o;const l=null!=(o=null==(i=e.editRender)?void 0:i.props)?o:{};return r=n(r)||"",!c(new Date(r))||p(l.connectField)&&t[l.connectField]&&(l.isStartDate&&s(new Date(r),new Date(t[l.connectField]))<0||l.isEndDate&&s(new Date(r),new Date(t[l.connectField]))>0)}function k(e){var t,n;return(!0===e.variableHeight||"1"===e.variableHeight)&&(null!=(n=null==(t=e.editRender)?void 0:t.name)?n:C.getCellType(e))!==w.SEPARATE}function z(e){const t=e.internalData.tableFullColumn;return!!v(t)&&t.some((e=>{var t,n;return k(null!=(n=null==(t=e.editRender)?void 0:t.props)?n:{})}))}function B(e,t){return t?e?n=>[f(e)?e(n):e,f(t)?t(n):t]:t:e}function J(e,t){return t?e?n=>i([f(e)?e(n):e,f(t)?t(n):t]):t:e}function K(e){return function({option:t,column:n,row:r}){if(e&&v(r[e])&&r[e].length)return!1;const i=r[n.field];if(v(i))return i.some((e=>[t.label,t.value].includes(e)));if(p(i)){if(i===t.value||i===t.label)return!0;const{value:e,change_text:n}=V(i);return n===t.label||e===t.value}return null!=i&&t.value===i}}export{$ as IhoTableRenderHelper,N as IhoTableStatusHelper,C as IhoTableUtils,S as IhoTableWarn,K as createIhoTableFilterMethod,P as eventListener2EventName,b as eventName2EventListener,x as getColumnRenderWidth,y as getLowCodeFieldFromField,D as getRowHeight,j as getTitle,U as isCompatibleColumn,L as isInvalidDate,G as isInvalidTime,H as isRichContent,_ as isTransformTreeType,k as isVariableHeightColumn,z as isVariableHeightTable,B as mergeVxeClass,J as mergeVxeStyle,W as parseMergeField,V as parseRichContent,A as useIhoTableFormEvent,O as useUUIDMap};