cnhis-design-vue 3.1.54-release.4 → 3.1.55-beta.0

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 (135) hide show
  1. package/README.md +87 -87
  2. package/es/components/body-select/src/hooks/renderCanvas.js +1 -1
  3. package/es/components/body-select/src/index.vue2.js +1 -1
  4. package/es/components/button-print/index.d.ts +13 -0
  5. package/es/components/button-print/src/ButtonPrint.vue.d.ts +13 -0
  6. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  7. package/es/components/callback/src/components/render/popupMaps.d.ts +13 -6
  8. package/es/components/chat-sdk/index.d.ts +2 -0
  9. package/es/components/chat-sdk/index.js +1 -0
  10. package/es/components/chat-sdk/src/chatSDK.d.ts +24 -0
  11. package/es/components/chat-sdk/src/chatSDK.js +1 -0
  12. package/es/components/chat-sdk/src/components/recordingDialog.vue.d.ts +26 -0
  13. package/es/components/chat-sdk/src/components/recordingDialog.vue.js +1 -0
  14. package/es/components/chat-sdk/src/components/recordingDialog.vue2.js +1 -0
  15. package/es/components/chat-sdk/src/utils/recordingDialog.d.ts +8 -0
  16. package/es/components/chat-sdk/src/utils/recordingDialog.js +1 -0
  17. package/es/components/chat-sdk/style/index.css +1 -0
  18. package/es/components/classification/index.d.ts +486 -1
  19. package/es/components/classification/src/components/search-filter/index.vue.d.ts +473 -1
  20. package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
  21. package/es/components/classification/src/components/set-classification/index.vue.d.ts +473 -1
  22. package/es/components/classification/src/index.vue.d.ts +486 -1
  23. package/es/components/classification/src/index.vue2.js +1 -1
  24. package/es/components/classification/style/index.css +1 -1
  25. package/es/components/expand-field/src/components/form.vue2.js +1 -1
  26. package/es/components/fabric-chart/index.d.ts +1 -0
  27. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +1 -0
  28. package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
  29. package/es/components/fabric-chart/src/constants/index.d.ts +1 -0
  30. package/es/components/fabric-chart/src/constants/index.js +1 -1
  31. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  32. package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.js +1 -1
  33. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
  34. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.d.ts +5 -0
  35. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
  36. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  37. package/es/components/fabric-chart/src/hooks/temperature/useCenter.d.ts +1 -1
  38. package/es/components/fabric-chart/src/hooks/temperature/useLeft.d.ts +1 -1
  39. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  40. package/es/components/fabric-chart/src/hooks/useCumputedPoint.d.ts +3 -3
  41. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
  42. package/es/components/form-config/index.d.ts +71 -57
  43. package/es/components/form-config/src/FormConfig.vue.d.ts +71 -57
  44. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +13 -6
  45. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +28 -21
  46. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +5 -5
  47. package/es/components/form-render/index.d.ts +13 -6
  48. package/es/components/form-render/index.js +1 -1
  49. package/es/components/form-render/src/FormRender.vue.d.ts +13 -6
  50. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  51. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +13 -6
  52. package/es/components/form-render/src/components/renderer/formItem.js +1 -1
  53. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  54. package/es/components/form-render/src/components/renderer/select.js +1 -1
  55. package/es/components/form-render/src/hooks/index.d.ts +20 -9
  56. package/es/components/form-render/src/hooks/index.js +1 -1
  57. package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +1 -1
  58. package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
  59. package/es/components/form-render/src/hooks/useFieldVisitor.js +1 -1
  60. package/es/components/form-render/src/hooks/useFormEvent.d.ts +14 -3
  61. package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
  62. package/es/components/form-render/src/hooks/useFormItemDeps.d.ts +1 -1
  63. package/es/components/form-render/src/hooks/useFormItemDeps.js +1 -1
  64. package/es/components/form-render/src/hooks/useOperationalForm.d.ts +3 -2
  65. package/es/components/form-render/src/hooks/useOperationalForm.js +1 -1
  66. package/es/components/form-render/src/hooks/useWordbookSetting.d.ts +13 -4
  67. package/es/components/form-render/src/hooks/useWordbookSetting.js +1 -1
  68. package/es/components/form-render/src/types/index.d.ts +10 -5
  69. package/es/components/iho-table/src/plugins/bindEventSettingPlugin/index.js +1 -1
  70. package/es/components/iho-table/src/plugins/operationalFormPlugin/index.js +1 -1
  71. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  72. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +7 -3
  73. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
  74. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
  75. package/es/components/index.css +1 -1
  76. package/es/components/index.d.ts +1 -0
  77. package/es/components/index.js +1 -1
  78. package/es/components/info-header/index.d.ts +26 -12
  79. package/es/components/info-header/src/InfoHeader.vue.d.ts +26 -12
  80. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +13 -6
  81. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +13 -6
  82. package/es/components/quick-search/style/index.css +1 -1
  83. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  84. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  85. package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
  86. package/es/components/shortcut-setter/index.d.ts +18 -11
  87. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +18 -11
  88. package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +0 -3
  89. package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +320 -0
  90. package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.js +1 -0
  91. package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue2.js +1 -0
  92. package/es/components/table-filter/src/components/bi-filter/components/Date.vue.d.ts +127 -0
  93. package/es/components/table-filter/src/components/bi-filter/components/Date.vue.js +1 -0
  94. package/es/components/table-filter/src/components/bi-filter/components/Date.vue2.js +1 -0
  95. package/es/components/table-filter/src/components/bi-filter/components/InputFilter.vue.d.ts +41 -0
  96. package/es/components/table-filter/src/components/bi-filter/components/InputFilter.vue.js +1 -0
  97. package/es/components/table-filter/src/components/bi-filter/components/InputFilter.vue2.js +1 -0
  98. package/es/components/table-filter/src/components/bi-filter/components/InputNumber.vue.d.ts +28 -0
  99. package/es/components/table-filter/src/components/bi-filter/components/InputNumber.vue.js +1 -0
  100. package/es/components/table-filter/src/components/bi-filter/components/InputNumber.vue2.js +1 -0
  101. package/es/components/table-filter/src/components/bi-filter/components/SelectFilter.vue.d.ts +51 -0
  102. package/es/components/table-filter/src/components/bi-filter/components/SelectFilter.vue.js +1 -0
  103. package/es/components/table-filter/src/components/bi-filter/components/SelectFilter.vue2.js +1 -0
  104. package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +244 -0
  105. package/es/components/table-filter/src/components/bi-filter/components/index.js +1 -0
  106. package/es/components/table-filter/src/components/bi-filter/helpers/options.d.ts +14 -0
  107. package/es/components/table-filter/src/components/bi-filter/helpers/options.js +1 -0
  108. package/es/components/table-filter/src/components/bi-filter/hooks/useBiConditions.d.ts +13 -0
  109. package/es/components/table-filter/src/components/bi-filter/hooks/useBiConditions.js +1 -0
  110. package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +474 -0
  111. package/es/components/table-filter/src/components/bi-filter/index.vue.js +1 -0
  112. package/es/components/table-filter/src/components/bi-filter/index.vue2.js +1 -0
  113. package/es/components/table-filter/src/constants/index.d.ts +1 -0
  114. package/es/components/table-filter/src/constants/index.js +1 -1
  115. package/es/env.d.ts +25 -25
  116. package/es/shared/assets/img/failure.png.js +1 -1
  117. package/es/shared/assets/img/no-permission.png.js +1 -1
  118. package/es/shared/assets/img/nodata.png.js +1 -1
  119. package/es/shared/assets/img/notfound.png.js +1 -1
  120. package/es/shared/assets/img/qr.png.js +1 -1
  121. package/es/shared/assets/img/success.png.js +1 -1
  122. package/es/shared/assets/img/video.png.js +1 -1
  123. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  124. package/es/shared/assets/img/xb_big.png.js +1 -1
  125. package/es/shared/assets/img/xb_small.png.js +1 -1
  126. package/es/shared/package.json.js +1 -1
  127. package/es/shared/utils/business.js +1 -1
  128. package/package.json +3 -2
  129. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  130. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  131. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  132. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  133. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  134. package/es/shared/utils/fabricjs/index.d.ts +0 -6823
  135. package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -1 +1 @@
1
- import{defineComponent as e,inject as l,ref as o,computed as t,onBeforeUnmount as n,nextTick as a,createVNode as r,toRaw as u}from"vue";import{arrayed as i}from"../../../../../../../shared/utils/index.js";import{isFunction as s,isEmpty as d,isArray as c,isObject as p,omit as v,cloneDeep as f,xor as m}from"lodash-es";import{NSelect as y}from"naive-ui";import{useVModel as h,useDebounceFn as b}from"@vueuse/core";import"date-fns";import"@vue/shared";import{useSelectAllowModify as w}from"../../../../../../../shared/hooks/selectHooks/useSelectAllowModify.js";import{useOptionFiltered as S}from"../../../../../../../shared/hooks/selectHooks/useOptionFiltered.js";import"../../../../../../../shared/hooks/selectHooks/useSearchContent.js";import{useSelectRenders as g}from"../../../../../../../shared/hooks/selectHooks/useSelectRenders.js";import{InjectionIhoTableUUID as F}from"../../../../constants/index.js";import{useIhoTableFormEvent as O}from"../../../../utils/index.js";import{getSelectOptions as k,selectOptionsMap as B}from"../hooks/useSelectOption.js";var j=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"},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:j}){const x=l("$xetable"),$=h(e,"value",j),q=o(null),{emitFormChangeWithParams:C}=O({...e,$table:x}),K=t((()=>e.labelField)),R=t((()=>e.valueField)),A=t((()=>e.aliasField)),{fullOptions:M,filterOptions:P,searchContent:_,remoteOptions:E}=S(e,{labelKey:K,valueKey:R}),{modifyEvent:H,modifyAbleRef:T,getOptionsWithCreated:V}=w(e,{searchContent:_,labelKey:K,valueKey:R,valueRef:$,fullOptions:M}),W=t((()=>V(T.value?M.value:P.value))),D=o(!1),I=b((async function(l=""){_.value=l;try{if(D.value=!0,!s(e.queryOptions)||!d(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{D.value=!1}}),400),L=l(F);function N(){U(),I()}async function U(l=!1){var o,t,n;if(!e.multiple)return;await a();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==(n=s.querySelector(`.vxe-body--row[rowid="${d}"]`))?void 0:n.clientHeight;i.querySelector(`.vxe-body--row[rowid="${d}"]`).style.height=l?"unset":c+"px"}async function z(l,o){var t,n;const a=e.value;await H.updateValue(l,o);const r=k(L,e.column.field,e.row,x);L&&c(r)&&i(o).forEach((e=>{if(!p(e))return;const l=e;l.created&&l.shouldSave&&r.push(v(u(l),["created","shouldSave"]))}));const s=null==(t=e.column.editRender)?void 0:t.props;if(L&&(null==s?void 0:s.connectField)){const o=null==(n=s.connectField)?void 0:n.split(","),t=B.get(L);o.forEach((async o=>{var n;const{tableColumn:a}=x.reactData,r=a.find((e=>e.field===o)),u=null==(n=null==r?void 0:r.editRender)?void 0:n.props;if(null==u?void 0:u.queryOptions){const n=l?`${o}__${e.column.field}-${l}`:o;if(t[n])return;t[n]=await u.queryOptions({row:e.row,column:r,isFullData:!0,connectColumn:e.column})}}))}return C({oldValue:a,option:f(o)}),U()}function G(e){var l,o;"Tab"===e.key&&q.value&&(null==(o=(l=q.value).handleKeydown)||o.call(l,{...e,key:"Enter",preventDefault:e.preventDefault.bind(e)}))}n((()=>U(!0)));const{renderTag:J,renderLabel:Q,renderSelectAll:X}=g(e,{labelKey:K,valueKey:R,valueRef:$,showKey:A,searchContent:_});function Y(l){if(!e.multiple)return;const o=l?W.value.map((e=>e[R.value])):[];if(!m(o,$.value).length)return;const t=$.value;$.value=o,C({oldValue:t,option:l?W.value:[]})}const Z=()=>({class:"iho-table__selectOption"}),ee=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=()=>X(Y)),r(y,{ref:q.value,consistentMenuWidth:e.consistentMenuWidth,placeholder:e.placeholder,labelField:e.labelField,valueField:e.valueField,loading:D.value,options:W.value,multiple:e.multiple,value:e.value,remote:!0,onSearch:I,clearable:!0,filterable:!0,nodeProps:Z,menuProps:ee.value,renderTag:J,renderLabel:Q,onUpdateShow:N,onUpdateValue:z,onKeydown:G,onFocus:H.focus,onBlur:H.blur},l)}}});export{j as default};
1
+ import{defineComponent as e,inject as l,ref as o,computed as t,onBeforeUnmount as n,nextTick as a,createVNode as r,toRaw as u}from"vue";import{arrayed as i}from"../../../../../../../shared/utils/index.js";import{isFunction as s,isEmpty as d,isArray as c,isObject as p,omit as v,cloneDeep as f,xor as m}from"lodash-es";import{NSelect as y}from"naive-ui";import{useVModel as h,useDebounceFn as b}from"@vueuse/core";import"date-fns";import"@vue/shared";import{useSelectAllowModify as w}from"../../../../../../../shared/hooks/selectHooks/useSelectAllowModify.js";import{useOptionFiltered as S}from"../../../../../../../shared/hooks/selectHooks/useOptionFiltered.js";import"../../../../../../../shared/hooks/selectHooks/useSearchContent.js";import{useSelectRenders as g}from"../../../../../../../shared/hooks/selectHooks/useSelectRenders.js";import{InjectionIhoTableUUID as F}from"../../../../constants/index.js";import{useIhoTableFormEvent as O}from"../../../../utils/index.js";import{getSelectOptions as k,selectOptionsMap as B}from"../hooks/useSelectOption.js";var j=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"},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:j}){const x=l("$xetable"),$=h(e,"value",j),q=o(null),{emitFormChangeWithParams:C}=O({...e,$table:x}),K=t((()=>e.labelField)),A=t((()=>e.valueField)),R=t((()=>e.aliasField)),{fullOptions:M,filterOptions:P,searchContent:_,remoteOptions:D}=S(e,{labelKey:K,valueKey:A}),{modifyEvent:E,modifyAbleRef:H,getOptionsWithCreated:T}=w(e,{searchContent:_,labelKey:K,valueKey:A,valueRef:$,fullOptions:M}),V=t((()=>T(H.value?M.value:P.value))),W=o(!1),I=b((async function(l=""){_.value=l;try{if(W.value=!0,!s(e.queryOptions)||!d(e.options))return;D.value=await e.queryOptions({keyword:l,row:e.row,column:e.column,rowIndex:e.rowIndex})}catch(l){console.log(`获取${e.column.field}options错误`)}finally{W.value=!1}}),400),L=l(F);n((()=>z(!0)));const N=o(!1);function U(e){N.value=e,z(),I()}async function z(l=!1){var o,t,n;if(!e.multiple)return;await a();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==(n=s.querySelector(`.vxe-body--row[rowid="${d}"]`))?void 0:n.clientHeight;i.querySelector(`.vxe-body--row[rowid="${d}"]`).style.height=l?"unset":c+"px"}async function G(l,o){var t,n;const a=e.value;await E.updateValue(l,o);const r=k(L,e.column.field,e.row,x);L&&c(r)&&i(o).forEach((e=>{if(!p(e))return;const l=e;l.created&&l.shouldSave&&r.push(v(u(l),["created","shouldSave"]))}));const s=null==(t=e.column.editRender)?void 0:t.props;if(L&&(null==s?void 0:s.connectField)){const o=null==(n=s.connectField)?void 0:n.split(","),t=B.get(L);o.forEach((async o=>{var n;const{tableColumn:a}=x.reactData,r=a.find((e=>e.field===o)),u=null==(n=null==r?void 0:r.editRender)?void 0:n.props;if(null==u?void 0:u.queryOptions){const n=l?`${o}__${e.column.field}-${l}`:o;if(t[n])return;t[n]=await u.queryOptions({row:e.row,column:r,isFullData:!0,connectColumn:e.column})}}))}return C({oldValue:a,option:f(o)}),z()}function J(e){var l,o;"Tab"===e.key&&q.value&&(N.value?null==(o=(l=q.value).handleKeydown)||o.call(l,{...e,key:"Enter",preventDefault:e.preventDefault.bind(e)}):x.internalData.isActivated=!0)}const{renderTag:Q,renderLabel:X,renderSelectAll:Y}=g(e,{labelKey:K,valueKey:A,valueRef:$,showKey:R,searchContent:_});function Z(l){if(!e.multiple)return;const o=l?V.value.map((e=>e[A.value])):[];if(!m(o,$.value).length)return;const t=$.value;$.value=o,C({oldValue:t,option:l?V.value:[]})}const ee=()=>({class:"iho-table__selectOption"}),le=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=()=>Y(Z)),r(y,{ref:q,consistentMenuWidth:e.consistentMenuWidth,placeholder:e.placeholder,labelField:e.labelField,valueField:e.valueField,loading:W.value,options:V.value,multiple:e.multiple,value:e.value,remote:!0,onSearch:I,clearable:!0,filterable:!0,nodeProps:ee,menuProps:le.value,renderTag:Q,renderLabel:X,show:N.value,onUpdateShow:U,onUpdateValue:G,onKeydown:J,onFocus:E.focus,onBlur:E.blur},l)}}});export{j as default};
@@ -54,13 +54,17 @@ declare const _default: import("vue").DefineComponent<{
54
54
  isShow: import("vue").Ref<boolean>;
55
55
  timePickerRef: import("vue").Ref<any>;
56
56
  inputValue: import("vue").Ref<any>;
57
- __formattedValue: import("vue").Ref<any>;
58
- oldValue: any;
57
+ inputProps: import("vue").ComputedRef<{
58
+ style: string;
59
+ } | {
60
+ style?: undefined;
61
+ }>;
62
+ __formattedValue: import("vue").WritableComputedRef<any>;
59
63
  placeholder: any;
60
64
  valueFormat: any;
61
65
  timeConfig: AnyObject;
62
66
  clickShortcutOption: (item: string) => void;
63
- onUpdateFormattedValue: (value: string) => void;
67
+ onUpdateFormattedValue: (value: string | null) => void;
64
68
  isDisabled: (value: string) => boolean;
65
69
  onChange: () => void;
66
70
  onKeydown: (event: KeyboardEvent) => void;
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as l,inject as t,ref as a,watch as r,nextTick as o,openBlock as u,createBlock as i,unref as n,withCtx as d,createVNode as c,mergeProps as m,createElementBlock as v,Fragment as s,renderList as f,createTextVNode as p,toDisplayString as h,createCommentVNode as k}from"vue";import{NPopover as y,NInput as b,NSpace as _,NScrollbar as w,NButton as g}from"naive-ui";import{useIhoTableFormEvent as V}from"../../../../utils/index.js";import C from"../../../../../../time-picker/index.js";import{parse as F,getHours as q,getMinutes as x,getSeconds as D,isValid as O,format as j}from"date-fns";var S=e({__name:"editTime",props:{formattedValue:{type:String},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0},shortcutOptions:{type:Array,default:()=>[]}},emits:["update:formattedValue","click"],setup(e,{emit:S}){const $=e,A=l(),H=t("$xetable"),{emitFormChangeWithParams:I}=V({...$,$table:H}),P=a(null),R=a(!1),E=a(),M=a(),U=a();let z=$.formattedValue;const{placeholder:K="请选择",valueFormat:N="HH:mm"}=A,T={...A,placeholder:K,valueFormat:N,format:N};function W(e){if(e&&B(e))return;if(U.value=e,z===e)return;const l=e||null;S("update:formattedValue",l),I({oldValue:z}),z=l}function B(e){var l,t,a;const r=F(e,T.format,new Date),o=q(r),u=x(r),i=D(r),n=null==(l=T.isHourDisabled)?void 0:l.call(T,o),d=null==(t=T.isMinuteDisabled)?void 0:t.call(T,u,o),c=null==(a=T.isSecondDisabled)?void 0:a.call(T,i,u,o);return!!n||(!!d||!!c)}function G(){[T.valueFormat.replace(/:/,""),T.valueFormat].some((e=>{const l=F(M.value,e,new Date);if(!M.value||O(l)){return W(M.value?j(l,T.valueFormat):""),!0}return!1}))}function J(e){var l;const{key:t}=e;"Enter"===t&&(null==(l=P.value)||l.blur(),R.value=!1)}return r((()=>$.formattedValue),(e=>{M.value=e,U.value=e}),{immediate:!0}),r((()=>R.value),(async e=>{var l,t,a,r,u;e&&(await o(),null==(u=null==(r=null==(a=null==(t=null==(l=E.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()})))})),(l,t)=>(u(),i(n(y),{show:R.value,trigger:"click",showArrow:!1,placement:"bottom-start",style:{padding:"0"},onClickoutside:t[3]||(t[3]=()=>R.value=!1)},{trigger:d((()=>[c(n(b),{ref_key:"formRef",ref:P,clearable:"",placeholder:n(K),value:M.value,"onUpdate:value":t[0]||(t[0]=e=>M.value=e),valueModifiers:{trim:!0},onClick:t[1]||(t[1]=()=>R.value=!0),onChange:G,onKeydown:J},null,8,["placeholder","value"])])),default:d((()=>[c(n(_),null,{default:d((()=>[c(n(C),m({ref_key:"timePickerRef",ref:E,show:"","formatted-value":U.value},n(T),{class:"iho-table__time-picker",to:!1,"onUpdate:formattedValue":W,onConfirm:t[2]||(t[2]=()=>R.value=!1)}),null,16,["formatted-value"]),c(n(w),{class:"iho-table__scrollbar"},{default:d((()=>[e.shortcutOptions.length?(u(),i(n(_),{key:0,vertical:"",wrap:!1},{default:d((()=>[(u(!0),v(s,null,f(e.shortcutOptions,(e=>(u(),i(n(g),{size:"tiny",key:e,disabled:B(e),onClick:l=>function(e){W(e),R.value=!1}(e)},{default:d((()=>[p(h(e),1)])),_:2},1032,["disabled","onClick"])))),128))])),_:1})):k("v-if",!0)])),_:1})])),_:1})])),_:1},8,["show"]))}});export{S as default};
1
+ import{defineComponent as e,useAttrs as l,inject as t,ref as a,computed as r,reactive as u,watch as o,nextTick as i,openBlock as n,createBlock as d,unref as c,withCtx as v,createVNode as m,mergeProps as s,isRef as f,createElementBlock as p,Fragment as h,renderList as y,createTextVNode as k,toDisplayString as b,createCommentVNode as w}from"vue";import{NPopover as _,NInput as g,NSpace as V,NScrollbar as C,NButton as F}from"naive-ui";import{useIhoTableFormEvent as x}from"../../../../utils/index.js";import D from"../../../../../../time-picker/index.js";import{parse as q,isValid as O,getHours as j,getMinutes as S,getSeconds as $,format as A}from"date-fns";var H=e({__name:"editTime",props:{formattedValue:{type:String},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0},shortcutOptions:{type:Array,default:()=>[]}},emits:["update:formattedValue","click"],setup(e,{emit:H}){const I=e,P=l(),R=t("$xetable"),{emitFormChangeWithParams:E}=x({...I,$table:R}),M=a(null),U=a(!1),z=a(),K=a(),N=r((()=>K.value&&L(K.value)?{style:"text-decoration: line-through"}:{})),T=r({get(){if(!K.value)return null;const e=q(K.value,G.valueFormat,new Date);return O(e)?K.value:I.formattedValue?I.formattedValue:null},set(e){J(e)}}),{placeholder:W="请选择",valueFormat:B="HH:mm"}=P,G=u({...P,placeholder:W,valueFormat:B,format:B});function J(e){if(K.value=e||"",e&&L(e))return;const l=I.formattedValue;l!==e&&(H("update:formattedValue",e),E({oldValue:l}))}function L(e){var l,t,a;const r=q(e,G.format,new Date),u=j(r),o=S(r),i=$(r),n=null==(l=G.isHourDisabled)?void 0:l.call(G,u),d=null==(t=G.isMinuteDisabled)?void 0:t.call(G,o,u),c=null==(a=G.isSecondDisabled)?void 0:a.call(G,i,o,u);return!!n||(!!d||!!c)}function Q(){[G.valueFormat.replace(/[^\w]/g,""),G.valueFormat].some((e=>{const l=q(K.value,e,new Date);if(!K.value||O(l)){return J(K.value?A(l,G.valueFormat):null),!0}return!1}))}function X(e){var l;const{key:t}=e;"Enter"===t&&(null==(l=M.value)||l.blur(),U.value=!1)}return o((()=>I.formattedValue),(e=>{if(!e)return"";K.value=e}),{immediate:!0}),o((()=>U.value),(async e=>{var l,t,a,r,u;e&&(await i(),null==(u=null==(r=null==(a=null==(t=null==(l=z.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()})))})),(l,t)=>(n(),d(c(_),{show:U.value,trigger:"click",showArrow:!1,placement:"bottom-start",style:{padding:"0"},onClickoutside:t[4]||(t[4]=()=>U.value=!1)},{trigger:v((()=>[m(c(g),{ref_key:"formRef",ref:M,clearable:"",placeholder:c(W),value:K.value,"onUpdate:value":t[0]||(t[0]=e=>K.value=e),valueModifiers:{trim:!0},"input-props":c(N),onClick:t[1]||(t[1]=()=>U.value=!0),onChange:Q,onKeydown:X},null,8,["placeholder","value","input-props"])])),default:v((()=>[m(c(V),null,{default:v((()=>[m(c(D),s({ref_key:"timePickerRef",ref:z,show:""},c(G),{class:"iho-table__time-picker",to:!1,"formatted-value":c(T),"onUpdate:formatted-value":t[2]||(t[2]=e=>f(T)?T.value=e:null),onConfirm:t[3]||(t[3]=()=>U.value=!1)}),null,16,["formatted-value"]),m(c(C),{class:"iho-table__scrollbar"},{default:v((()=>[e.shortcutOptions.length?(n(),d(c(V),{key:0,vertical:"",wrap:!1},{default:v((()=>[(n(!0),p(h,null,y(e.shortcutOptions,(e=>(n(),d(c(F),{size:"tiny",key:e,disabled:L(e),onClick:l=>function(e){J(e),U.value=!1}(e)},{default:v((()=>[k(b(e),1)])),_:2},1032,["disabled","onClick"])))),128))])),_:1})):w("v-if",!0)])),_:1})])),_:1})])),_:1},8,["show"]))}});export{H as default};
@@ -1 +1 @@
1
- import{createVNode as n}from"vue";import"../../../../../../shared/utils/index.js";import{isObject as o,isArray as e}from"lodash-es";import"../../../../index.js";import{WIDGET_TYPE as t}from"../../../constants/index.js";import{parseMergeField as r,isRichContent as i,parseRichContent as l,getTitle as s}from"../../../utils/index.js";import{isMatchLowCodeCondition as c}from"../../../../../../shared/utils/business.js";import{defineTablePlugin as d}from"../../../hooks/useTablePlugin.js";function u(){return d({name:"defaultRendererPlugin",vxe(d){d.renderer.add(t.DEFAULT,{renderCell(t,{row:d,column:u}){const a=r(d,u),f=i(a)?function(o,e){const t=l(o);return[n("span",{title:s(e,t.change_text),style:{color:t.background||t.icon}},[r(t.icon),t.change_text])];function r(o){return o?o.match(/#[\da-f]{6}|[\da-f]{3}/i)?n("i",{class:"icon-dot",style:{"--table-icon-color":o,"--table-icon-shadow":o}},null):n("i",{class:t.icon},null):null}}(a,u):[a];return function(o,t,r,i){if(!e(o)||!o.length)return n("span",{title:s(r,i)},[i]);const l=o.find((n=>n.condition&&n.condition.find((n=>{const o=t[n.field_key||r.field];return c(o,n)}))));return n("span",l?{title:s(r,i),style:{color:l.color},class:l.icon}:{title:s(r,i)},[i])}(function(n){var e,t,r;const i=null==(e=n.editRender)?void 0:e.props;if(!o(i))return;return null!=(r=i.colorAndIcon)?r:null==(t=i.settingObj)?void 0:t.colorAndIcon}(u),d,u,f)}}),d.renderer.add(t.STATUS,d.renderer.get(t.DEFAULT))}})}export{u as defaultRendererPlugin};
1
+ import{createVNode as n}from"vue";import"../../../../../../shared/utils/index.js";import{isObject as o,isArray as e}from"lodash-es";import"../../../../index.js";import{WIDGET_TYPE as t}from"../../../constants/index.js";import{parseMergeField as r,isRichContent as i,parseRichContent as l,getTitle as s}from"../../../utils/index.js";import{isMatchLowCodeCondition as c}from"../../../../../../shared/utils/business.js";import{defineTablePlugin as d}from"../../../hooks/useTablePlugin.js";function u(){return d({name:"defaultRendererPlugin",vxe(d){d.renderer.add(t.DEFAULT,{renderCell(t,{row:d,column:u}){const a=r(d,u),f=i(a)?function(o,e){const t=l(o);return[n("span",{title:s(e,t.change_text),style:{color:t.background||t.icon}},[r(t.icon),t.change_text])];function r(o){return o?o.match(/#[\da-f]{6}|[\da-f]{3}/i)?n("i",{class:"icon-dot",style:{"--table-icon-color":o,"--table-icon-shadow":o}},null):n("i",{class:t.icon},null):null}}(a,u):[a];return function(o,t,r,i){if(!e(o)||!o.length)return n("span",{title:String(s(r,i))},[i]);const l=o.find((n=>n.condition&&n.condition.find((n=>{const o=t[n.field_key||r.field];return c(o,n)}))));return n("span",l?{title:s(r,i),style:{color:l.color},class:l.icon}:{title:s(r,i)},[i])}(function(n){var e,t,r;const i=null==(e=n.editRender)?void 0:e.props;if(!o(i))return;return null!=(r=i.colorAndIcon)?r:null==(t=i.settingObj)?void 0:t.colorAndIcon}(u),d,u,f)}}),d.renderer.add(t.STATUS,d.renderer.get(t.DEFAULT))}})}export{u as defaultRendererPlugin};