cnhis-design-vue 3.3.1-beta.2 → 3.3.1-beta.4

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/ai-chat/index.d.ts +17 -147
  3. package/es/components/ai-chat/src/Index.vue.d.ts +17 -147
  4. package/es/components/ai-chat/src/Index.vue2.js +1 -1
  5. package/es/components/ai-chat/src/components/ChatCard.js +1 -1
  6. package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +2 -55
  7. package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
  8. package/es/components/ai-chat/src/components/ChatMain.d.ts +7 -1
  9. package/es/components/ai-chat/src/components/ChatMain.js +1 -1
  10. package/es/components/ai-chat/src/utils/index.d.ts +0 -1
  11. package/es/components/ai-chat/src/utils/index.js +1 -1
  12. package/es/components/ai-chat/style/index.css +1 -1
  13. package/es/components/audio-sdk/src/audioSDK.d.ts +7 -6
  14. package/es/components/audio-sdk/src/audioSDK.js +1 -1
  15. package/es/components/audio-sdk/src/utils/recordingModal.d.ts +1 -2
  16. package/es/components/audio-sdk/src/utils/recordingModal.js +1 -1
  17. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  18. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  19. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  20. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  21. package/es/components/callback/src/components/render/popupMaps.d.ts +7 -1
  22. package/es/components/card-render/src/components/index.d.ts +23 -23
  23. package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
  24. package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
  25. package/es/components/editor/src/Editor.js +1 -1
  26. package/es/components/editor/style/index.css +0 -1
  27. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
  28. package/es/components/field-editor/index.d.ts +7 -1
  29. package/es/components/field-editor/src/FieldEditor.vue.d.ts +7 -1
  30. package/es/components/form-config/index.d.ts +34 -4
  31. package/es/components/form-config/src/FormConfig.vue.d.ts +37 -6
  32. package/es/components/form-config/src/FormConfig.vue2.js +1 -1
  33. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +7 -1
  34. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +13 -1
  35. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +7 -1
  36. package/es/components/form-render/index.d.ts +7 -1
  37. package/es/components/form-render/index.js +1 -1
  38. package/es/components/form-render/src/FormRender.vue.d.ts +7 -1
  39. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  40. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +7 -1
  41. package/es/components/form-render/src/components/renderer/date.d.ts +2 -0
  42. package/es/components/form-render/src/components/renderer/date.js +1 -1
  43. package/es/components/form-render/src/components/renderer/input.d.ts +5 -0
  44. package/es/components/form-render/src/components/renderer/input.js +1 -1
  45. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +2 -0
  46. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +2 -0
  47. package/es/components/form-render/src/components/renderer/select.d.ts +5 -0
  48. package/es/components/form-render/src/components/renderer/select.js +1 -1
  49. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  50. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +4 -0
  51. package/es/components/form-render/src/types/index.d.ts +2 -0
  52. package/es/components/form-render/src/utils/index.d.ts +1 -0
  53. package/es/components/form-render/src/utils/index.js +1 -1
  54. package/es/components/form-render/style/index.css +1 -1
  55. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  56. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.d.ts +7 -0
  57. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.js +1 -1
  58. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  59. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +1 -2
  60. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -1
  61. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
  62. package/es/components/iho-table/src/types/index.d.ts +1 -0
  63. package/es/components/index.css +1 -1
  64. package/es/components/index.js +1 -1
  65. package/es/components/info-header/index.d.ts +24 -2
  66. package/es/components/info-header/src/InfoHeader.vue.d.ts +24 -2
  67. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +2 -0
  68. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +2 -0
  69. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +9 -1
  70. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +7 -1
  71. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  72. package/es/components/shortcut-setter/index.d.ts +7 -1
  73. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +7 -1
  74. package/es/env.d.ts +25 -25
  75. package/es/shared/assets/img/ai__avatar.png.js +1 -1
  76. package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
  77. package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
  78. package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
  79. package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
  80. package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
  81. package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
  82. package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
  83. package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
  84. package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
  85. package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
  86. package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
  87. package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
  88. package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
  89. package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
  90. package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
  91. package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
  92. package/es/shared/assets/img/failure.png.js +1 -1
  93. package/es/shared/assets/img/logo.png.js +1 -1
  94. package/es/shared/assets/img/no-permission.png.js +1 -1
  95. package/es/shared/assets/img/nodata.png.js +1 -1
  96. package/es/shared/assets/img/notfound.png.js +1 -1
  97. package/es/shared/assets/img/qr.png.js +1 -1
  98. package/es/shared/assets/img/success.png.js +1 -1
  99. package/es/shared/assets/img/table_style_2.png.js +1 -1
  100. package/es/shared/assets/img/video.png.js +1 -1
  101. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  102. package/es/shared/assets/img/xb_big.png.js +1 -1
  103. package/es/shared/assets/img/xb_small.png.js +1 -1
  104. package/es/shared/components/ArrowIcon/ArrowIcon.vue.js +1 -0
  105. package/es/shared/components/ArrowIcon/index.d.ts +2 -0
  106. package/es/shared/components/ArrowIcon/index.js +1 -0
  107. package/es/shared/components/DateIcon/DateIcon.vue.js +1 -0
  108. package/es/shared/components/DateIcon/index.d.ts +2 -0
  109. package/es/shared/components/DateIcon/index.js +1 -0
  110. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  111. package/es/shared/package.json.js +1 -1
  112. package/es/shared/utils/fabricjs/index.d.ts +6823 -0
  113. package/es/shared/utils/tapable/index.d.ts +139 -0
  114. package/package.json +2 -2
  115. package/es/components/ai-chat/src/api/index.d.ts +0 -6
  116. package/es/components/ai-chat/src/api/index.js +0 -1
  117. package/es/components/ai-chat/src/components/ChatAudio.vue.d.ts +0 -44
  118. package/es/components/ai-chat/src/components/ChatAudio.vue.js +0 -1
  119. package/es/components/ai-chat/src/components/ChatAudio.vue2.js +0 -1
  120. package/es/components/ai-chat/src/components/ChatMainInner.d.ts +0 -2
  121. package/es/components/ai-chat/src/components/ChatMainInner.js +0 -1
  122. package/es/components/ai-chat/src/components/ChatRight.vue.d.ts +0 -56
  123. package/es/components/ai-chat/src/components/ChatRight.vue.js +0 -1
  124. package/es/components/ai-chat/src/components/ChatRight.vue2.js +0 -1
  125. package/es/components/ai-chat/src/components/card/JsonCard.d.ts +0 -25
  126. package/es/components/ai-chat/src/components/card/JsonCard.js +0 -1
  127. package/es/components/ai-chat/src/components/card/SelectIcon.d.ts +0 -14
  128. package/es/components/ai-chat/src/components/card/SelectIcon.js +0 -1
  129. package/es/components/ai-chat/src/hooks/useProgram.d.ts +0 -6
  130. package/es/components/ai-chat/src/hooks/useProgram.js +0 -1
  131. package/es/components/ai-chat/src/hooks/useWebsocket.d.ts +0 -2
  132. package/es/components/ai-chat/src/hooks/useWebsocket.js +0 -1
  133. package/es/shared/assets/img/file-emr.png.js +0 -1
  134. package/es/shared/assets/img/file.png.js +0 -1
  135. package/es/shared/assets/img/use.png.js +0 -1
@@ -1 +1 @@
1
- import{reactive as e,inject as l,createVNode as o,mergeProps as n,onBeforeUnmount as t}from"vue";import{arrayed as i}from"../../../../../../../shared/utils/index.js";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as r,InjectionIhoTableUUID as d}from"../../../../constants/index.js";import{useAutoFocus as u}from"../hooks/useAutoFocus.js";import{getTitle as s,IhoTableRenderHelper as a,IhoTableUtils as c}from"../../../../utils/index.js";import p from"./editSelect.js";import{getDefaultValue as f,isConnectField as m,getArray as v}from"./selectUtils.js";import{getSelectOptions as w,selectOptionsMap as C}from"../hooks/useSelectOption.js";import{cloneDeep as y,isFunction as b,isEqual as g}from"lodash-es";import{defineTablePlugin as h}from"../../../../hooks/useTablePlugin.js";function P(){const P="selectRendererPlugin",x=e(new Map);function E(e){return!0===e||"1"===e}return h({name:P,vxe(e){e.renderer.add(r.SELECT,{renderCell({props:e},{row:n,column:t,$table:r}){var u,a,c,p,m,v;const C=l(d),y=w(C,t.field,n,r);if(e&&e.labelToValue&&y.length){const l=E(null!=(a=null==(u=e.componentProps)?void 0:u.allowModify)?a:e.allowModify),o=E(null!=(p=null==(c=e.componentProps)?void 0:c.allowCreate)?p:e.allowCreate)||l,i=n[t.field];if(!l&&!o&&null!=i&&""!==i){const{aliasField:l="",labelField:o="label",valueField:r="value"}=e.componentProps||{};if(!y.find((e=>e[r]===i))){const e=y.find((e=>e[o]===i||e[l]===i));e?n[t.field]=e[r]:Reflect.deleteProperty(n,t.field)}}}const b=f(n,e,y),g=i(b).join(","),h=e&&(null==(m=e.componentProps)?void 0:m.multiple)&&(E(e.variableHeight)||(null==(v=e.componentProps)?void 0:v.indexedText));return[o("span",{title:s(t,g),class:"iho-table__colorAndIcon"},[h?i(b).reduce(((e,l)=>(null!=l&&e.push([l,";",o("br",null,null)]),e)),[]):g])]},renderEdit:a.createRenderEdit((({fieldItem:e,emitFormClick:t,row:i,column:r,$rowIndex:u,$table:s})=>{var a,c,f,m;const v=l(d),C=w(v,r.field,i,s),y=E(null!=(c=null==(a=e.componentProps)?void 0:a.allowModify)?c:e.allowModify),b=E(null!=(m=null==(f=e.componentProps)?void 0:f.allowCreate)?m:e.allowCreate)||y;return[o(p,n({queryOptions:e.queryOptions},e.componentProps,{options:C,column:r,row:i,"row-index":u,value:i[r.field],"onUpdate:value":e=>i[r.field]=e,allowModify:y,allowCreate:b,onClick:t}),null)]}))})},apply(e){async function l(e,l={}){var o,n,t;const i=null==(o=e.editRender)?void 0:o.props;if(!i)return[];let r=v(i.options)||v(null==(n=i.componentProps)?void 0:n.options)||[];if(i.queryOptions)try{const o={column:e,isFullData:!0,...l};r=await(null==(t=i.queryOptions)?void 0:t.call(i,o))}catch(e){console.log(`获取${i.field}_options错误`)}return r}function o(e){return e&&c.getCellType(e)===r.SELECT}u(e).bindAutoFocusConfig(P,r.SELECT,".n-base-selection-input,.n-base-selection-tags"),e.fieldHooks.fieldList.tap(P,((e,{uuid:n})=>{if(n){C.get(n)||C.set(n,{}),x.set(n,y(e));const t=C.get(n);e.forEach((async n=>{var i;const r=null==(i=n.editRender)?void 0:i.props;if(n.field&&r&&o(r)&&!m(e,n.field)){if(b(r.queryOptions)&&t[n.field])return;t[n.field]=[],t[n.field]=await l(n)}}))}return e})),e.dataHooks.data.tap(P,((e,{uuid:n},t)=>{if(!n)return;const i=x.get(n);if(!i||!i.length)return;const r=C.get(n);i.forEach((async n=>{var t;const d=null==(t=n.editRender)?void 0:t.props;if(n.field&&d&&o(d)&&(null==d?void 0:d.connectField)){const o=d.connectField.split(","),t=e[d.columnName];o.forEach((async o=>{const u=null==i?void 0:i.find((e=>e.field===o));if(!u)return;const s=t?`${o}__${d.columnName}-${t}`:o;r[s]||(r[s]=[],r[s]=await l(u,{row:e,connectColumn:n}))}))}}))})),e.setupHooks.setup.tap(P,(e=>{t((()=>{var l;const o=null==(l=e.value)?void 0:l.uuid;o&&(C.delete(o),x.delete(o))}))})),e.eventHooks.onCellDblclick.tap(P,((e,l,{emits:n})=>{var t,i,r;const{$table:d,row:u,column:s}=e,a=Reflect.get(e,"verticalState");let{column:c,row:p}=d.reactData.editStore.actived;if(!(c&&p||(a&&(c=null==(t=a.editCell)?void 0:t.column,p=null==(i=a.editCell)?void 0:i.row),c&&p)))return;a&&(c=s,p=u);const f=null==(r=c.editRender)?void 0:r.props,{cellDblclickSelectable:m=!1,multiple:v=!1,valueField:C="value"}=f.componentProps||{};if(!m||!o(f))return;const y=l.uuid&&w(l.uuid,c.field,p,d);if(1!==(null==y?void 0:y.length))return;const b=v?[y[0][C]]:y[0][C],h=p[c.field];d.clearEdit(),g(b,h)||(p[c.field]=b,n("formChange",{column:c,row:p,oldValue:h,value:b,index:d.getRowIndex(p),$table:d,option:y[0]}),a&&(a.editCell=null))}))}})}export{P as selectRendererPlugin};
1
+ import{reactive as e,inject as o,createVNode as l,mergeProps as n,onBeforeUnmount as t}from"vue";import{arrayed as i}from"../../../../../../../shared/utils/index.js";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as r,InjectionIhoTableUUID as d}from"../../../../constants/index.js";import{useAutoFocus as s}from"../hooks/useAutoFocus.js";import{getTitle as u,IhoTableRenderHelper as c,getLowCodeFieldFromField as a,IhoTableUtils as p}from"../../../../utils/index.js";import f from"./editSelect.js";import{getDefaultValue as m,getArray as v}from"./selectUtils.js";import{getSelectOptions as w,selectOptionsMap as h,selectColumnMap as g}from"../hooks/useSelectOption.js";import{isString as C,isFunction as y,isEqual as b}from"lodash-es";import{defineTablePlugin as F}from"../../../../hooks/useTablePlugin.js";function E(){const E="selectRendererPlugin",P=e(new Map);function x(e){return!0===e||"1"===e}return F({name:E,vxe(e){e.renderer.add(r.SELECT,{renderCell({props:e},{row:n,column:t,$table:r}){var s,c,a,p,f,v;const h=o(d),g=w(h,t.field,n,r);if(e&&e.labelToValue&&g.length){const o=x(null!=(c=null==(s=e.componentProps)?void 0:s.allowModify)?c:e.allowModify),l=x(null!=(p=null==(a=e.componentProps)?void 0:a.allowCreate)?p:e.allowCreate)||o,i=n[t.field];if(!o&&!l&&null!=i&&""!==i){const{aliasField:o="",labelField:l="label",valueField:r="value"}=e.componentProps||{};if(!g.find((e=>e[r]===i))){const e=g.find((e=>e[l]===i||e[o]===i));e?n[t.field]=e[r]:Reflect.deleteProperty(n,t.field)}}}const C=m(n,e,g),y=i(C).join(","),b=e&&(null==(f=e.componentProps)?void 0:f.multiple)&&(x(e.variableHeight)||(null==(v=e.componentProps)?void 0:v.indexedText));return[l("span",{title:u(t,y),class:"iho-table__colorAndIcon"},[b?i(C).reduce(((e,o)=>(null!=o&&e.push([o,";",l("br",null,null)]),e)),[]):y])]},renderEdit:c.createRenderEdit((({fieldItem:e,emitFormClick:t,row:i,column:r,$rowIndex:s,$table:u})=>{var c,a,p,m;const v=o(d),h=w(v,r.field,i,u),g=x(null!=(a=null==(c=e.componentProps)?void 0:c.allowModify)?a:e.allowModify),C=x(null!=(m=null==(p=e.componentProps)?void 0:p.allowCreate)?m:e.allowCreate)||g;return[l(f,n({queryOptions:e.queryOptions},e.componentProps,{options:h,column:r,row:i,"row-index":s,value:i[r.field],"onUpdate:value":e=>i[r.field]=e,allowModify:g,allowCreate:C,onClick:t}),null)]}))})},apply(e){async function o(e,o={}){var l,n,t;const i=null==(l=e.editRender)?void 0:l.props;if(!i)return[];let r=v(i.options)||v(null==(n=i.componentProps)?void 0:n.options)||[];if(i.queryOptions)try{const l={column:e,isFullData:!0,...o};r=await(null==(t=i.queryOptions)?void 0:t.call(i,l))}catch(e){console.log(`获取${i.field}_options错误`)}return r}function l(e){return e&&p.getCellType(e)===r.SELECT}s(e).bindAutoFocusConfig(E,r.SELECT,".n-base-selection-input,.n-base-selection-tags"),e.fieldHooks.fieldList.tap(E,((e,{uuid:n})=>{if(n){h.get(n)||h.set(n,{}),P.set(n,e);const t={};e.forEach((e=>{t[e.field]=e})),g.setItemFromUUID(n,{});const i=g.getItemFromUUID(n);e.forEach((e=>{const o=a(e);if(!o||!o.connectField||!C(o.connectField))return;o.connectField.split(",").forEach((o=>{i[o]=i[o]||[],i[o].push(e)}))}));const r=h.get(n);e.forEach((async e=>{var n,t;const d=null==(n=e.editRender)?void 0:n.props;if(e.field&&d&&l(d)&&!(null==(t=i[e.field])?void 0:t.length)){if(y(d.queryOptions)&&r[e.field])return;r[e.field]=[],r[e.field]=await o(e)}}))}return e})),e.dataHooks.data.tap(E,((e,{uuid:n},t)=>{if(!n)return;const i=P.get(n);if(!i||!i.length)return;const r=h.get(n);i.forEach((async n=>{var t;const d=null==(t=n.editRender)?void 0:t.props;if(n.field&&d&&l(d)&&(null==d?void 0:d.connectField)){const l=d.connectField.split(","),t=e[d.columnName];l.forEach((async l=>{const s=null==i?void 0:i.find((e=>e.field===l));if(!s)return;const u=t?`${l}__${d.columnName}-${t}`:l;r[u]||(r[u]=[],r[u]=await o(s,{row:e,connectColumn:n}))}))}}))})),e.setupHooks.setup.tap(E,(e=>{t((()=>{var o;const l=null==(o=e.value)?void 0:o.uuid;l&&(h.delete(l),g.removeItemFromUUID(l),P.delete(l))}))})),e.eventHooks.onCellDblclick.tap(E,((e,o,{emits:n})=>{var t,i,r;const{$table:d,row:s,column:u}=e,c=Reflect.get(e,"verticalState");let{column:a,row:p}=d.reactData.editStore.actived;if(!(a&&p||(c&&(a=null==(t=c.editCell)?void 0:t.column,p=null==(i=c.editCell)?void 0:i.row),a&&p)))return;c&&(a=u,p=s);const f=null==(r=a.editRender)?void 0:r.props,{cellDblclickSelectable:m=!1,multiple:v=!1,valueField:h="value"}=f.componentProps||{};if(!m||!l(f))return;const g=o.uuid&&w(o.uuid,a.field,p,d);if(1!==(null==g?void 0:g.length))return;const C=v?[g[0][h]]:g[0][h],y=p[a.field];d.clearEdit(),b(C,y)||(p[a.field]=C,n("formChange",{column:a,row:p,oldValue:y,value:C,index:d.getRowIndex(p),$table:d,option:g[0]}),c&&(c.editCell=null))}))}})}export{E as selectRendererPlugin};
@@ -1,5 +1,4 @@
1
1
  import { AnyObject } from '../../../../../../../shared/types';
2
- import { LowCodeTableFieldItem, IhoTableFieldItem } from '../../../../../../../components/iho-table/src/types';
2
+ import { LowCodeTableFieldItem } from '../../../../../../../components/iho-table/src/types';
3
3
  export declare function getDefaultValue(row: AnyObject, item: LowCodeTableFieldItem | any, options?: AnyObject[]): any;
4
4
  export declare function getArray(list: AnyObject[] | undefined): AnyObject[] | null | undefined;
5
- export declare function isConnectField(columns: IhoTableFieldItem[], field: string): boolean;
@@ -1 +1 @@
1
- function l(l,r,e=[]){const{aliasField:u="",labelField:i="label",valueField:o="value"}=(null==r?void 0:r.componentProps)||{},t=l[r.columnName];return Array.isArray(t)?t.map((l=>a(l))):a(t);function a(l){var r,t,a;const d=null==(r=n(e))?void 0:r.find((n=>n[o]==l));return null!=(a=null!=(t=null==d?void 0:d[u])?t:null==d?void 0:d[i])?a:l}}function n(l){return Array.isArray(l)&&!l.length?null:l}function r(l,n){return l.some((l=>{var r,e;return((null==(e=null==(r=l.editRender)?void 0:r.props)?void 0:e.connectField)||"").split(",").includes(n)}))}export{n as getArray,l as getDefaultValue,r as isConnectField};
1
+ function l(l,r,u=[]){const{aliasField:e="",labelField:i="label",valueField:o="value"}=(null==r?void 0:r.componentProps)||{},a=l[r.columnName];return Array.isArray(a)?a.map((l=>t(l))):t(a);function t(l){var r,a,t;const d=null==(r=n(u))?void 0:r.find((n=>n[o]==l));return null!=(t=null!=(a=null==d?void 0:d[e])?a:null==d?void 0:d[i])?t:l}}function n(l){return Array.isArray(l)&&!l.length?null:l}export{n as getArray,l as getDefaultValue};
@@ -1 +1 @@
1
- import{createVNode as e,defineComponent as o,inject as l,computed as n}from"vue";import{isNumber as t,constant as a,isString as i}from"lodash-es";import"../../../../index.js";import{NCheckbox as d}from"naive-ui";import{defineTablePlugin as c}from"../../../hooks/useTablePlugin.js";function r(){const o="checkRendererPlugin";return c({name:o,apply(l){l.fieldHooks.field.tap(o,((l,{index:n,insertBefore:i},d)=>{if(0===n&&d.selectType&&["checkbox","radio"].includes(d.selectType)){const{radioConfig:l,checkboxConfig:n={}}=d,c={width:45,align:"center",fixed:"left",..."radio"===d.selectType?l:n,field:o,type:d.selectType,annotation:!1};n.disableHeader&&(c.slots={header:()=>e("span",{class:"checkbox-cell--disable"},null),...c.slots}),n.useNCheckbox&&(c.slots={checkbox:e=>s(e,n),header:t(n.maxCheckSize)?a([]):e=>s(e,n),...c.slots}),i(c)}return l}))}})}function s(o,l){return[e(p,{payload:o,checkboxConfig:l},null)]}const p=o({name:"IhoTableNCheckbox",props:{payload:{type:Object,default:()=>({})},checkboxConfig:{type:Object,default:()=>({})}},setup(o){const t=l("$xetable");function a(e,l){var n;l.stopPropagation(),"header"===(null==(n=o.payload)?void 0:n.type)?null==t||t.triggerCheckAllEvent(l,e):null==t||t.triggerCheckRowEvent(l,o.payload,e)}const c=n((()=>{var e,l;return i(null==(e=o.checkboxConfig)?void 0:e.indeterminateField)?null==(l=o.payload.row)?void 0:l[o.checkboxConfig.indeterminateField]:o.payload.indeterminate}));return()=>!1===o.payload.visible?null:e(d,{checked:o.payload.checked,"onUpdate:checked":e=>o.payload.checked=e,indeterminate:c.value,disabled:o.payload.disabled,onUpdateChecked:a},null)}});export{r as checkRendererPlugin};
1
+ import{createVNode as e,defineComponent as l,inject as o,computed as t}from"vue";import{isNumber as n,constant as i,isString as c}from"lodash-es";import"../../../../index.js";import{NCheckbox as a}from"naive-ui";import{defineTablePlugin as d}from"../../../hooks/useTablePlugin.js";function r(){const l="checkRendererPlugin";return d({name:l,apply(o){o.fieldHooks.field.tap(l,((o,{index:t,insertBefore:c},a)=>{if(0===t&&a.selectType&&["checkbox","radio"].includes(a.selectType)){const{radioConfig:o,checkboxConfig:t={}}=a,d={width:45,align:"center",fixed:"left",..."radio"===a.selectType?o:t,field:l,type:a.selectType,annotation:!1};t.disableHeader&&(d.slots={header:()=>e("span",{class:"checkbox-cell--disable"},null),...d.slots}),t.useNCheckbox&&(d.slots={checkbox:e=>s(e,t),header:n(t.maxCheckSize)?i([]):e=>s(e,t),...d.slots}),c(d)}return o}))}})}function s(l,o){return[e(p,{payload:l,checkboxConfig:o},null)]}const p=l({name:"IhoTableNCheckbox",props:{payload:{type:Object,default:()=>({})},checkboxConfig:{type:Object,default:()=>({})}},setup(l){const n=o("$xetable");function i(e,o){var t,i,c,a;if(o.stopPropagation(),"header"===(null==(t=l.payload)?void 0:t.type))if(null==(i=l.checkboxConfig)?void 0:i.checkStrictly){const l=null==(a=null==(c=null==n?void 0:n.getComputeMaps())?void 0:c.computeCheckboxOpts)?void 0:a.value;if(!l)return;l.checkStrictly=!1,null==n||n.triggerCheckAllEvent(o,e),l.checkStrictly=!0}else null==n||n.triggerCheckAllEvent(o,e);else null==n||n.triggerCheckRowEvent(o,l.payload,e)}const d=t((()=>{var e,o;return c(null==(e=l.checkboxConfig)?void 0:e.indeterminateField)?null==(o=l.payload.row)?void 0:o[l.checkboxConfig.indeterminateField]:l.payload.indeterminate}));return()=>!1===l.payload.visible?null:e(a,{checked:l.payload.checked,"onUpdate:checked":e=>l.payload.checked=e,indeterminate:d.value,disabled:l.payload.disabled,onUpdateChecked:i},null)}});export{r as checkRendererPlugin};
@@ -216,6 +216,7 @@ export type LowCodeTableFieldItem = {
216
216
  colWidth: VxeTableDefines.ColumnInfo['width'];
217
217
  settingObj: IhoTableLowCodeField.SettingObj;
218
218
  treeNode: boolean;
219
+ connectField: string;
219
220
  isShow: MaybeString<0 | 1>;
220
221
  isSort: MaybeString<0 | 1>;
221
222
  isOrder: MaybeString<0> | VxeTablePropTypes.SortOrder;