cnhis-design-vue 3.1.46-release.4 → 3.1.46

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 (92) hide show
  1. package/es/components/button-print/src/utils/print.js +1 -1
  2. package/es/components/form-config/index.d.ts +67 -16
  3. package/es/components/form-config/src/FormConfig.vue.d.ts +67 -16
  4. package/es/components/form-config/src/FormConfig.vue2.js +1 -1
  5. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +5 -4
  6. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +29 -7
  7. package/es/components/form-config/src/hooks/useDataNormalize.d.ts +1 -1
  8. package/es/components/form-config/src/hooks/useDataNormalize.js +1 -1
  9. package/es/components/form-config/src/types/index.d.ts +1 -1
  10. package/es/components/form-render/index.d.ts +5 -4
  11. package/es/components/form-render/src/FormRender.vue.d.ts +4 -3
  12. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  13. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +5 -4
  14. package/es/components/form-render/src/components/renderer/levelSearchCascader.d.ts +16 -2
  15. package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
  16. package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +32 -4
  17. package/es/components/form-render/src/components/renderer/remoteSearch.d.ts +3 -0
  18. package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
  19. package/es/components/form-render/src/components/renderer/select.d.ts +16 -2
  20. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  21. package/es/components/form-render/src/hooks/useFormEvent.d.ts +1 -1
  22. package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
  23. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  24. package/es/components/form-render/src/hooks/useOperationalForm.d.ts +1 -1
  25. package/es/components/form-render/src/hooks/useOperationalForm.js +1 -1
  26. package/es/components/form-render/src/hooks/useWordbookSetting.d.ts +5 -0
  27. package/es/components/form-render/src/hooks/useWordbookSetting.js +1 -0
  28. package/es/components/form-render/src/types/fieldItem.d.ts +8 -1
  29. package/es/components/form-render/src/types/index.d.ts +1 -7
  30. package/es/components/iho-table/index.d.ts +12 -0
  31. package/es/components/iho-table/src/IhoTable.vue.d.ts +12 -0
  32. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
  33. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +1 -1
  34. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
  35. package/es/components/iho-table/src/plugins/index.js +1 -1
  36. package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -1
  37. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
  38. package/es/components/iho-table/src/plugins/operationalFormPlugin/index.d.ts +1 -0
  39. package/es/components/iho-table/src/plugins/operationalFormPlugin/index.js +1 -0
  40. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  41. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
  42. package/es/components/iho-table/src/types/index.d.ts +5 -3
  43. package/es/components/iho-table/src/utils/index.d.ts +1 -1
  44. package/es/components/iho-table/src/utils/index.js +1 -1
  45. package/es/components/index.css +1 -1
  46. package/es/components/info-header/index.d.ts +14 -12
  47. package/es/components/info-header/src/InfoHeader.vue.d.ts +14 -12
  48. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +5 -4
  49. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +5 -4
  50. package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
  51. package/es/components/search-cascader/src/components/SearchMenu.js +1 -1
  52. package/es/components/select-person/index.d.ts +153 -14
  53. package/es/components/select-person/src/SearchMultiple.vue2.js +1 -1
  54. package/es/components/select-person/src/SearchOrgAndStaff.vue.d.ts +106 -0
  55. package/es/components/select-person/src/SearchOrgAndStaff.vue.js +1 -0
  56. package/es/components/select-person/src/SearchOrgAndStaff.vue2.js +1 -0
  57. package/es/components/select-person/src/SelectPerson.vue.d.ts +150 -12
  58. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  59. package/es/components/select-person/src/types/enums.d.ts +4 -0
  60. package/es/components/select-person/src/types/enums.js +1 -0
  61. package/es/components/select-person/src/utils/index.d.ts +1 -1
  62. package/es/components/select-person/src/utils/index.js +1 -1
  63. package/es/components/select-person/style/index.css +1 -1
  64. package/es/components/shortcut-setter/index.d.ts +13 -5
  65. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +13 -5
  66. package/es/components/steps-wheel/index.d.ts +16 -0
  67. package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +16 -0
  68. package/es/components/steps-wheel/src/StepsWheel.vue2.js +1 -1
  69. package/es/components/steps-wheel/style/index.css +1 -1
  70. package/es/components/table-export-field/src/components/ExportModal.vue2.js +1 -1
  71. package/es/shared/package.json.js +1 -1
  72. package/es/shared/types/business.d.ts +6 -0
  73. package/es/shared/utils/business.d.ts +6 -1
  74. package/es/shared/utils/business.js +1 -1
  75. package/es/shared/utils/index.js +1 -1
  76. package/es/shared/utils/tapableLess.d.ts +28 -0
  77. package/es/shared/utils/tapableLess.js +1 -0
  78. package/package.json +2 -2
  79. package/es/components/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +0 -77
  80. package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +0 -93
  81. package/es/components/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +0 -3
  82. package/es/components/iho-table/src/plugins/filterRenderPlugin/dist/index.d.ts +0 -3
  83. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/dist/index.d.ts +0 -3
  84. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +0 -3
  85. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +0 -3
  86. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/dist/index.d.ts +0 -3
  87. package/es/components/iho-table/src/utils/dist/index.d.ts +0 -44
  88. package/es/components/scale-view/src/components/formitem/dist/r-address.d.ts +0 -36
  89. package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +0 -36
  90. package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +0 -82
  91. package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +0 -57
  92. package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +0 -57
@@ -1 +1 @@
1
- import{checkInSetupEnv as e,jsonParse as n}from"../../../../shared/utils/index.js";import{useMemoize as t,useDebounceFn as l}from"@vueuse/core";import{identity as u,uniqBy as o,isString as r,isEqual as a,omit as i,isArray as c,isFunction as s}from"lodash-es";import{computed as v,inject as m,ref as d,toRaw as f,watch as y}from"vue";import"../../index.js";import{InjectionAsyncQueue as p,InjectionFormLifeCycleCaller as h,InjectionFormItemDepsCollector as g}from"../constants/index.js";import{createUrlConfigParams as w,formRenderLog as k,keywordMatcher as b}from"../utils/index.js";import{useFormField as R}from"./useFormField.js";import{useFormRequest as C}from"./useFormRequest.js";function K(e,n){const t=d();return v({get:()=>t.value?t.value:e[n],set(e){t.value=e}})}const F=(()=>{const e=t((e=>new RegExp(`(.*)${e.split("").map((e=>`(${function(e){return e.match(/[()\[\]{}$^\/]/)?"\\"+e:e}(e)})`)).join("(.*)")}(.*)`)),{getKey:u});return(n,t)=>t.match(e(n))})();function O(){const e=d();return{searchContent:e,optionSearchFilter:function(n,t,l){if(!e.value)return n;const u=c(l)?l.filter((e=>e&&r(e))):[];return n.filter((n=>function(n,t,l){if(!e.value)return!0;const u=n?n[t]:"";return!!r(u)&&(!!F(e.value,u)||!!b(e.value,n.keyword)||!!l.length&&l.some((t=>r(n[t])&&n[t].includes(e.value))))}(n,t,u)))}}}function j(e,t,l,u,r){const a=K(e,"commonList"),c=K(e,"recentList"),{searchContent:d,optionSearchFilter:f}=O();function y(e){return n(e.itemObj)}const h=v((()=>{var e,n;return null!=(n=null==(e=a.value)?void 0:e.map(y))?n:[]})),g=v((()=>{var e,n;return null!=(n=null==(e=c.value)?void 0:e.map(y))?n:[]})),w=v((()=>{if(!e.recommend||!h.value.length&&!g.value.length)return t.value;const n=o(h.value.concat(g.value),(e=>e[r.value])),l=t.value.filter((e=>n.every((function(n){return n[r.value]!==e[r.value]}))));return[...f(n,u.value),...l]})),{getRecommendRequestInfo:k,getHttpInstance:b}=C();function F(n){const{url:t,getRecommendIds:l}=k(),u=s(l)?l():{},o=s(e.getRecommendInfo)?e.getRecommendInfo():{};return{url:t[n],info:Object.assign({},u,o)}}const{fieldKey:j}=R(),I=m(p);return{postRecommend:async function(n){if(!e.recommend)return;const t=b();if(!t)return;const{url:u,info:o}=F("post"),a=w.value.find((e=>e[r.value]===n));a&&l("postRecommend",await t.post(u,{...o,keyword:"",itemId:r.value,itemObj:JSON.stringify(a)}))},getRecommend:async function(n){if(!e.recommend)return;if(d.value=n,a.value&&c.value&&e.recommendCache)return;const t=await I.addAsync(function(n,t){const{url:l,info:u}=F("get");return{url:l,method:"get",key:n,cache:t,params:{...u,recNum:Math.max(e.commonNum,e.recentNum),keyword:""}}}(j.value,e.recommendCache)),{commonly:l,recently:u}=t.reduce(((e,n)=>("commonly"===n.type?e.commonly.push(i(n,["type"])):"recently"===n.type&&e.recently.push(i(n,["type"])),e)),{commonly:[],recently:[]});a.value=l.slice(0,e.commonNum),c.value=u.slice(0,e.recentNum)},sortedOptions:w}}function I(n,t){e();const u=m(p),o=m(h),i=v((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.urlConfig)?void 0:e.nameKey)?t:n.labelField)?l:"text"})),c=v((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.urlConfig)?void 0:e.valueKey)?t:n.valueField)?l:"value"})),{searchContent:s,optionSearchFilter:b}=O(),C=d(null),{field:K,fieldKey:F}=R(),j=l((async function(e){if(s.value=e||"",!n.urlConfig)return C.value=null;try{const e=await u.addAsync(await w({config:n.urlConfig,cache:n.requestCache,field:K.value}));f(C.value)!==e&&(C.value=e,o("afterOptionInit",[F.value,C.value]))}catch(e){r(e)&&k(e)}}),300),I=v((()=>C.value?b(C.value,i.value):Array.isArray(n.options)?b(n.options,i.value):[])),x=v((()=>C.value||n.options||[])),q=m(g);return y((()=>n.urlConfig),((e,l)=>{a(e,l)||(C.value=null,e&&(q.setDeps(F.value,e.dependKey||[],(async()=>{C.value=null,t.value=null,!n.lazyRequest&&await j()})),(t.value||!n.lazyRequest)&&j()))}),{immediate:!0}),{labelKey:i,valueKey:c,filterOptions:I,fullOptions:x,fetchData:j}}function x(n,t){e();const u=m(p),o=m(h),i=v((()=>{var e,t,l,u;return null!=(u=null!=(l=null==(t=null==(e=n.wordbook)?void 0:e.render_key)?void 0:t[0])?l:n.labelField)?u:"text"})),c=v((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.wordbook)?void 0:e.value_key)?t:n.valueField)?l:"value"})),s=v((()=>{var e;return(null==(e=n.wordbook)?void 0:e.search_key)||[]})),{searchContent:g,optionSearchFilter:w}=O(),b=d(null),{fieldKey:K}=R(),{getSearchRequestInfo:F}=C(),j=l((async function(e){if(g.value=e||"",!n.autograph||!n.wordbook)return b.value=null;try{const e=await u.addAsync(function(e,t,l){const u={autograph:t,wordbookId:e.id,wordbookType:e.type,fieldKeys:e.search_key,keyword:"",page:1};return{...F(),params:u,key:l,cache:n.requestCache}}(n.wordbook,n.autograph,K.value));f(b.value)!==e&&(b.value=e,o("afterOptionInit",[K.value,b.value]))}catch(e){r(e)&&k(e)}}),300),I=v((()=>b.value?w(b.value,i.value,s.value):Array.isArray(n.options)?w(n.options,i.value):[])),x=v((()=>b.value||n.options||[]));return y((()=>n.wordbook),((e,l)=>{a(e,l)||(b.value=null,e&&(t.value||!n.lazyRequest)&&j())}),{immediate:!0}),{labelKey:i,valueKey:c,filterOptions:I,fullOptions:x,fetchData:j}}export{F as searchContentMatcher,x as useAutographOptions,j as useRecommendOptions,I as useUrlConfigOptions};
1
+ import{checkInSetupEnv as e,jsonParse as n}from"../../../../shared/utils/index.js";import{useForm as t}from"@formily/vue";import{useMemoize as l,useDebounceFn as u}from"@vueuse/core";import{identity as o,uniqBy as r,isString as a,isEqual as i,omit as c,isArray as s,isFunction as v}from"lodash-es";import{computed as m,inject as f,ref as d,toRaw as y,watch as p}from"vue";import"../../index.js";import{InjectionAsyncQueue as h,InjectionFormLifeCycleCaller as g,InjectionFormItemDepsCollector as w}from"../constants/index.js";import{createUrlConfigParams as k,formRenderLog as b,keywordMatcher as R}from"../utils/index.js";import{useFormField as C}from"./useFormField.js";import{useFormRequest as F}from"./useFormRequest.js";function K(e,n){const t=d();return m({get:()=>t.value?t.value:e[n],set(e){t.value=e}})}const q=(()=>{const e=l((e=>new RegExp(`(.*)${e.split("").map((e=>`(${function(e){return e.match(/[()\[\]{}$^\/]/)?"\\"+e:e}(e)})`)).join("(.*)")}(.*)`)),{getKey:o});return(n,t)=>t.match(e(n))})();function O(){const e=d();return{searchContent:e,optionSearchFilter:function(n,t,l){if(!e.value)return n;const u=s(l)?l.filter((e=>e&&a(e))):[];return n.filter((n=>function(n,t,l){if(!e.value)return!0;const u=n?n[t]:"";return!!a(u)&&(!!q(e.value,u)||!!R(e.value,n.keyword)||!!l.length&&l.some((t=>a(n[t])&&n[t].includes(e.value))))}(n,t,u)))}}}function j(e,t,l,u,o){const a=K(e,"commonList"),i=K(e,"recentList"),{searchContent:s,optionSearchFilter:d}=O();function y(e){return n(e.itemObj)}const p=m((()=>{var e,n;return null!=(n=null==(e=a.value)?void 0:e.map(y))?n:[]})),g=m((()=>{var e,n;return null!=(n=null==(e=i.value)?void 0:e.map(y))?n:[]})),w=m((()=>{if(!e.recommend||!p.value.length&&!g.value.length)return t.value;const n=r(p.value.concat(g.value),(e=>e[o.value])),l=t.value.filter((e=>n.every((function(n){return n[o.value]!==e[o.value]}))));return[...d(n,u.value),...l]})),{getRecommendRequestInfo:k,getHttpInstance:b}=F();function R(n){const{url:t,getRecommendIds:l}=k(),u=v(l)?l():{},o=v(e.getRecommendInfo)?e.getRecommendInfo():{};return{url:t[n],info:Object.assign({},u,o)}}const{fieldKey:q}=C(),j=f(h);return{postRecommend:async function(n){if(!e.recommend)return;const t=b();if(!t)return;const{url:u,info:r}=R("post"),a=w.value.find((e=>e[o.value]===n));a&&l("postRecommend",await t.post(u,{...r,keyword:"",itemId:o.value,itemObj:JSON.stringify(a)}))},getRecommend:async function(n){if(!e.recommend)return;if(s.value=n,a.value&&i.value&&e.recommendCache)return;const t=await j.addAsync(function(n,t){const{url:l,info:u}=R("get");return{url:l,method:"get",key:n,cache:t,params:{...u,recNum:Math.max(e.commonNum,e.recentNum),keyword:""}}}(q.value,e.recommendCache)),{commonly:l,recently:u}=t.reduce(((e,n)=>("commonly"===n.type?e.commonly.push(c(n,["type"])):"recently"===n.type&&e.recently.push(c(n,["type"])),e)),{commonly:[],recently:[]});a.value=l.slice(0,e.commonNum),i.value=u.slice(0,e.recentNum)},sortedOptions:w}}function I(n,t){e();const l=f(h),o=f(g),r=m((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.urlConfig)?void 0:e.nameKey)?t:n.labelField)?l:"text"})),c=m((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.urlConfig)?void 0:e.valueKey)?t:n.valueField)?l:"value"})),{searchContent:s,optionSearchFilter:v}=O(),R=d(null),{field:F,fieldKey:K}=C(),q=u((async function(e){if(s.value=e||"",!n.urlConfig)return R.value=null;try{const e=await l.addAsync(await k({config:n.urlConfig,cache:n.requestCache,field:F.value}));y(R.value)!==e&&(R.value=e,o("afterOptionInit",[K.value,R.value]))}catch(e){a(e)&&b(e)}}),300),j=m((()=>R.value?v(R.value,r.value):Array.isArray(n.options)?v(n.options,r.value):[])),I=m((()=>R.value||n.options||[])),x=f(w);return p((()=>n.urlConfig),((e,l)=>{if(!i(e,l)){if(R.value=null,!e)return R.value=null;x.setDeps(K.value,e.dependKey||[],(async()=>{R.value=null,t.value=null,!n.lazyRequest&&await q()})),(t.value||!n.lazyRequest)&&q()}}),{immediate:!0}),{labelKey:r,valueKey:c,filterOptions:j,fullOptions:I,fetchData:q}}function x(n,l){e();const o=f(h),r=f(g),c=t(),s=m((()=>{var e,t,l,u;return null!=(u=null!=(l=null==(t=null==(e=n.wordbook)?void 0:e.render_key)?void 0:t[0])?l:n.labelField)?u:"text"})),v=m((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.wordbook)?void 0:e.value_key)?t:n.valueField)?l:"value"})),k=m((()=>{var e;return(null==(e=n.wordbook)?void 0:e.search_key)||[]})),{searchContent:R,optionSearchFilter:K}=O(),q=d(null),{fieldKey:j}=C(),{getSearchRequestInfo:I}=F(),x=u((async function(e){if(R.value=e||"",!n.autograph||!n.wordbook)return q.value=null;try{const e=await o.addAsync(function(e,t,l){var u,o,r;const a={autograph:t,wordbookId:e.id,wordbookType:e.type,fieldKeys:e.search_key,keyword:"",page:1};if(null==(u=e.queryParams)?void 0:u.length){const n=null!=(r=null==(o=c.value)?void 0:o.getFormState().values)?r:{};e.queryParams.forEach((e=>{a[e]=n[e]}))}return console.log(a),{...I(),params:a,key:l,cache:n.requestCache}}(n.wordbook,n.autograph,j.value));y(q.value)!==e&&(q.value=e,r("afterOptionInit",[j.value,q.value]))}catch(e){a(e)&&b(e)}}),300),A=m((()=>q.value?K(q.value,s.value,k.value):Array.isArray(n.options)?K(n.options,s.value):[])),S=m((()=>q.value||n.options||[])),N=f(w);return p((()=>n.wordbook),((e,t)=>{if(!i(e,t)){if(q.value=null,!e)return q.value=null;N.setDeps(j.value,e.queryParams||[],(async()=>{q.value=null,x()})),(l.value||!n.lazyRequest)&&x()}}),{immediate:!0}),{labelKey:s,valueKey:v,filterOptions:A,fullOptions:S,fetchData:x}}export{q as searchContentMatcher,x as useAutographOptions,j as useRecommendOptions,I as useUrlConfigOptions};
@@ -1,6 +1,6 @@
1
+ import { FormOperationalConfig } from '../../../../../es/shared/types';
1
2
  import { Form } from '@formily/core';
2
3
  import { ComputedRef } from 'vue';
3
- import { FormOperationalConfig } from '../../../../../es/components/form-render';
4
4
  export declare function useOperationalForm(operationalForm: ComputedRef<FormOperationalConfig[] | undefined>, formModel: Form): {
5
5
  operationalFormHandler: (field: string) => void;
6
6
  triggerAllOperationalFormHandler: () => void;
@@ -1 +1 @@
1
- import{isArray as e,isString as t,isNumber as a}from"lodash-es";function n(n,r){function o(t){return e(t)&&!!t.length}function l(e,n=!0){e.forEach((e=>{const o=r.getFormState().values,l=e.operationFormParam.reduce(((e,t)=>(e[t=t.replace(/^table\./,"")]=+o[t],e)),{}),i=e.operationalRule.replace(/\${(.+?)}/g,"$1");let u=new Function("table",`return ${i}`)(l);t(u)&&(u=+u),u=a(u)?isNaN(u)?"":u.toFixed(+e.operationalPrecision):"",(n||null==r.getValuesIn(e.operationalResult))&&r.setValuesIn(e.operationalResult,u)}))}return{operationalFormHandler:function(e){if(!o(n.value))return;const t=n.value.filter((t=>t.operationFormParam.includes(`table.${e}`)));t.length&&l(t)},triggerAllOperationalFormHandler:function(){o(n.value)&&l(n.value,!1)}}}export{n as useOperationalForm};
1
+ import"../../../../shared/utils/index.js";import{getOperationalFormHandler as s}from"../../../../shared/utils/business.js";function e(e,t){return s(e,(s=>t.getValuesIn(s)),((s,e)=>t.setValuesIn(s,e)))}export{e as useOperationalForm};
@@ -0,0 +1,5 @@
1
+ import { Form } from '@formily/core';
2
+ import { ContextCollector } from '../../../../../es/components/form-render';
3
+ export declare function useWordbookSetting(formModel: Form, changeContextCollector: ContextCollector): {
4
+ wordbookSettingHandler: (fieldKey: string, value: unknown) => void;
5
+ };
@@ -0,0 +1 @@
1
+ import{isField as n}from"@formily/core";function t(t,o){return{wordbookSettingHandler:function(r,e){var i,l;const u=t.query(r).take();if(!n(u))return;const c=function(n){var t,o;return null==(o=null==(t=n.decoratorProps)?void 0:t.fieldItem)?void 0:o.wordbook}(u);(null==(l=null==(i=null==c?void 0:c.setting)?void 0:i.cascading)?void 0:l.length)&&c.setting.cascading.forEach((i=>{var l;const u=function(n,t){return Object.values(n.fields).find((n=>n.title===t))}(t,i["form.name"]);if(!u||!n(u))return;const c=null==(l=o.getContext(r,e))?void 0:l.currentOption;c&&u.setValue(c[i.value])}))}}}export{t as useWordbookSetting};
@@ -78,15 +78,22 @@ export declare type FormWordbook = Partial<{
78
78
  name: string;
79
79
  render_key: string[];
80
80
  search_key: string[];
81
+ value_key: string;
82
+ queryParams: string[];
81
83
  primary_key: string;
82
84
  type: string;
83
- value_key: string;
84
85
  level_key: string;
85
86
  link_key: string;
86
87
  link_key_split: string;
87
88
  show_key: string[];
88
89
  conObj: AnyObject[];
89
90
  conObjFirstLevel: AnyObject[];
91
+ setting: Partial<{
92
+ cascading: {
93
+ 'form.name': string;
94
+ value: string;
95
+ }[];
96
+ }>;
90
97
  }>;
91
98
  export declare type CombinationItemDeletableFn = (itemData: AnyObject, index: number) => boolean;
92
99
  export declare type FieldItem = {
@@ -1,5 +1,5 @@
1
1
  import { AsyncQueue } from '../../../../../es/shared/hooks';
2
- import { AnyObject, LOW_CODE_VALUE_RELATION, UndefinedAble } from '../../../../../es/shared/types';
2
+ import { AnyObject, FormOperationalConfig, LOW_CODE_VALUE_RELATION, UndefinedAble } from '../../../../../es/shared/types';
3
3
  import { DataField, Field, Form } from '@formily/core';
4
4
  import { ISchema } from '@formily/json-schema/esm/types';
5
5
  import { Component, FunctionalComponent } from 'vue';
@@ -91,12 +91,6 @@ export declare type FormBusinessFormatter = (payload: {
91
91
  value: unknown;
92
92
  type: FIELD_BUSINESS_TYPE;
93
93
  }) => unknown;
94
- export declare type FormOperationalConfig = {
95
- operationFormParam: string[];
96
- operationalRule: string;
97
- operationalPrecision: string;
98
- operationalResult: string;
99
- };
100
94
  export declare namespace FormLowCodeReactions {
101
95
  type ConObj = {
102
96
  con: LOW_CODE_VALUE_RELATION;
@@ -2171,6 +2171,12 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
2171
2171
  enable?: boolean | undefined;
2172
2172
  usePreset?: boolean | undefined;
2173
2173
  } | undefined;
2174
+ operationForm?: {
2175
+ operationFormParam: string[];
2176
+ operationalRule: string;
2177
+ operationalPrecision: string;
2178
+ operationalResult: string;
2179
+ }[] | undefined;
2174
2180
  }>;
2175
2181
  updateConfigRefDebounced: () => void;
2176
2182
  updateConfigRef: () => void;
@@ -4591,6 +4597,12 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
4591
4597
  enable?: boolean | undefined;
4592
4598
  usePreset?: boolean | undefined;
4593
4599
  } | undefined;
4600
+ operationForm?: {
4601
+ operationFormParam: string[];
4602
+ operationalRule: string;
4603
+ operationalPrecision: string;
4604
+ operationalResult: string;
4605
+ }[] | undefined;
4594
4606
  }>;
4595
4607
  configChanged: boolean;
4596
4608
  fieldChanged: boolean;
@@ -2170,6 +2170,12 @@ declare const _default: import("vue").DefineComponent<{
2170
2170
  enable?: boolean | undefined;
2171
2171
  usePreset?: boolean | undefined;
2172
2172
  } | undefined;
2173
+ operationForm?: {
2174
+ operationFormParam: string[];
2175
+ operationalRule: string;
2176
+ operationalPrecision: string;
2177
+ operationalResult: string;
2178
+ }[] | undefined;
2173
2179
  }>;
2174
2180
  updateConfigRefDebounced: () => void;
2175
2181
  updateConfigRef: () => void;
@@ -4590,6 +4596,12 @@ declare const _default: import("vue").DefineComponent<{
4590
4596
  enable?: boolean | undefined;
4591
4597
  usePreset?: boolean | undefined;
4592
4598
  } | undefined;
4599
+ operationForm?: {
4600
+ operationFormParam: string[];
4601
+ operationalRule: string;
4602
+ operationalPrecision: string;
4603
+ operationalResult: string;
4604
+ }[] | undefined;
4593
4605
  }>;
4594
4606
  configChanged: boolean;
4595
4607
  fieldChanged: boolean;
@@ -1 +1 @@
1
- import{mergeWith as e,isObject as o}from"lodash-es";import{HIGHEST_PRIORITY as i}from"../../constants/index.js";import{defineTablePlugin as t}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as s}from"../../utils/index.js";function n(){const n="defaultTablePlugin";return t({name:n,vxe(e){e.setup({zIndex:3e3})},apply(t){t.configHooks.config.tap({name:n,stage:i},(o=>{const i=e({border:!0,showSeq:!0,columnConfig:{resizable:!0},rowConfig:{height:36,useKey:!0,isHover:!0,isCurrent:!0,keyField:"theUniqueKey"},showOverflow:"tooltip",editConfig:{trigger:"click",mode:"cell"}},o,{height:o.height?"auto":void 0});return i.selectType=o.selectType||(s.isPositive(o.isBatchSelect)?"checkbox":s.isPositive(o.isSingleSelect)?"radio":void 0),i})),t.configHooks.mouseConfig.tap({name:n,stage:i},((e,i)=>o(i.keyboardConfig)?Object.assign({selected:!!i.keyboardConfig.isEdit},e):e))}})}export{n as defaultConfigPlugin};
1
+ import{mergeWith as e,isObject as o}from"lodash-es";import{HIGHEST_PRIORITY as i}from"../../constants/index.js";import{defineTablePlugin as t}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as s}from"../../utils/index.js";function n(){const n="defaultTablePlugin";return t({name:n,vxe(e){e.setup({zIndex:3e3})},apply(t){t.configHooks.config.tap({name:n,stage:i},(o=>{const i=e({border:!0,showSeq:!0,columnConfig:{resizable:!0},rowConfig:{height:36,useKey:!0,isHover:!0,isCurrent:!0,keyField:"theUniqueKey"},showOverflow:"title",showHeaderOverflow:"title",editConfig:{trigger:"click",mode:"cell"}},o,{height:o.height?"auto":void 0});return i.selectType=o.selectType||(s.isPositive(o.isBatchSelect)?"checkbox":s.isPositive(o.isSingleSelect)?"radio":void 0),i})),t.configHooks.mouseConfig.tap({name:n,stage:i},((e,i)=>o(i.keyboardConfig)?Object.assign({selected:!!i.keyboardConfig.isEdit},e):e))}})}export{n as defaultConfigPlugin};
@@ -12,9 +12,9 @@ declare const _default: import("vue").DefineComponent<{
12
12
  required: true;
13
13
  };
14
14
  }>> & {}>>;
15
+ $table: (VxeTableConstructor & VxeTablePrivateMethods & VxeTableMethods) | undefined;
15
16
  optionsRef: import("vue").ComputedRef<import("vxe-table").VxeTableDefines.FilterOption[] & VxeColumnPropTypes.Filter[]>;
16
17
  checkedRef: import("vue").WritableComputedRef<string[]>;
17
- $table: (VxeTableConstructor & VxeTablePrivateMethods & VxeTableMethods) | undefined;
18
18
  checkedCacheRef: import("vue").Ref<string[]>;
19
19
  searchFilterText: import("vue").Ref<string>;
20
20
  close: () => void;
@@ -1 +1 @@
1
- import{defineComponent as e,computed as l,inject as a,ref as t,onDeactivated as u,openBlock as n,createElementBlock as o,unref as r,createBlock as i,createCommentVNode as v,createElementVNode as s,createVNode as c,isRef as d,withCtx as p,normalizeStyle as f,Fragment as h,renderList as m,toDisplayString as y,createTextVNode as _}from"vue";import{widthAppend as b}from"../../../../../shared/utils/index.js";import{useVirtualList as g}from"@vueuse/core";import{isNumber as k}from"lodash-es";import{NInput as C,NCheckbox as $,NCheckboxGroup as S,NButtonGroup as x,NButton as L}from"naive-ui";const U={class:"iho-table__filterWrapper"},j={class:"iho-table__filterListItem"},w={class:"iho-table__filterFooter"};var E=e({__name:"filter",props:{payload:{type:Object,required:!0}},setup(e){const E=e,F=l((()=>{var e,l,a;return null!=(a=null==(l=null==(e=E.payload)?void 0:e.column)?void 0:l.filters)?a:[]})),I=l({get:()=>F.value.reduce(((e,l)=>(l.checked&&e.push(l.value),e)),[]),set(e){if(E.payload)return F.value.forEach((l=>{E.payload.$panel.changeOption(null,e.includes(l.value),l)})),E.payload.$panel.confirmFilter(new CustomEvent("click"))}}),O=a("$xetable"),P=t([...I.value]),W=t("");function q(){O&&(O.reactData.filterStore.visible=!1)}u(q);const z=l((()=>{var e,l;if(!E.payload||!E.payload.column)return 10;const{filterCapacity:a}=null!=(l=null==(e=E.payload.column.editRender)?void 0:e.props)?l:{};return k(a)&&a>0?a:10})),{list:D,containerProps:H,wrapperProps:R}=g(l((()=>W.value?F.value.filter((e=>`${e.label}`.includes(W.value))):F.value)),{itemHeight:32,overscan:3}),A=l((()=>!!P.value.length&&P.value.length!==F.value.length)),B=l({get:()=>P.value.length===F.value.length&&0!==F.value.length,set:e=>{P.value=e?F.value.map((e=>e.value)):[]}}),G=l((()=>({...H.style,height:b(32*z.value)})));function J(){I.value=P.value,q()}function K(){P.value=[]}return(e,l)=>(n(),o("section",U,[r(F).length>5?(n(),i(r(C),{key:0,value:W.value,"onUpdate:value":l[0]||(l[0]=e=>W.value=e)},null,8,["value"])):v("v-if",!0),s("div",j,[c(r($),{label:"全选",checked:r(B),"onUpdate:checked":l[1]||(l[1]=e=>d(B)?B.value=e:null),indeterminate:r(A)},null,8,["checked","indeterminate"])]),c(r(S),{value:P.value,"onUpdate:value":l[3]||(l[3]=e=>P.value=e)},{default:p((()=>[s("section",{ref:r(H).ref,style:f(r(G)),onScroll:l[2]||(l[2]=(...e)=>r(H).onScroll&&r(H).onScroll(...e)),class:"iho-table__filterListWrapper"},[s("section",{style:f(r(R).style)},[(n(!0),o(h,null,m(r(D),(e=>(n(),o("div",{class:"iho-table__filterListItem",key:e.data.value},[c(r($),{value:e.data.value,label:e.data.label},null,8,["value","label"])])))),128))],4)],36)])),_:1},8,["value"]),s("footer",w,[s("section",null,y(`已选择${P.value.length}项`),1),c(r(x),{size:"small"},{default:p((()=>[c(r(L),{onClick:K},{default:p((()=>[_("清空")])),_:1}),c(r(L),{onClick:q},{default:p((()=>[_("取消")])),_:1}),c(r(L),{type:"primary",onClick:J},{default:p((()=>[_("确定")])),_:1})])),_:1})])]))}});export{E as default};
1
+ import{defineComponent as e,inject as l,computed as a,ref as t,onDeactivated as u,openBlock as n,createElementBlock as o,unref as r,createBlock as i,createCommentVNode as c,createElementVNode as s,createVNode as v,isRef as d,withCtx as p,normalizeStyle as f,Fragment as h,renderList as m,toDisplayString as y,createTextVNode as _}from"vue";import{widthAppend as b}from"../../../../../shared/utils/index.js";import{useVirtualList as g}from"@vueuse/core";import{isNumber as k}from"lodash-es";import{NInput as L,NCheckbox as x,NCheckboxGroup as C,NButtonGroup as D,NButton as S}from"naive-ui";const $={class:"iho-table__filterWrapper"},I={class:"iho-table__filterListItem"},Y={class:"iho-table__filterFooter"};var U=e({__name:"filter",props:{payload:{type:Object,required:!0}},setup(e){const U=e,j=l("$xetable"),w=a((()=>{var e,l,a;return null!=(a=null==(l=null==(e=U.payload)?void 0:e.column)?void 0:l.filters)?a:[]})),E=a({get:()=>w.value.reduce(((e,l)=>(l.checked&&e.push(l.value),e)),[]),set(e){if(!U.payload)return;if(w.value.forEach((l=>{U.payload.$panel.changeOption(null,e.includes(l.value),l)})),!j)return t();const{startIndex:l,endIndex:a}=j.internalData.scrollYStore;function t(){U.payload.$panel.confirmFilter(new CustomEvent("click"))}0===l&&1===a||j.reactData.scrollYLoad?t():(j.reactData.scrollYLoad=!0,t(),j.reactData.scrollYLoad=!1)}}),F=t([...E.value]),O=t("");function P(){j&&(j.reactData.filterStore.visible=!1)}u(P);const W=a((()=>{var e,l;if(!U.payload||!U.payload.column)return 10;const{filterCapacity:a}=null!=(l=null==(e=U.payload.column.editRender)?void 0:e.props)?l:{};return k(a)&&a>0?a:10})),{list:q,containerProps:z,wrapperProps:H}=g(a((()=>O.value?w.value.filter((e=>`${e.label}`.includes(O.value))):w.value)),{itemHeight:32,overscan:3}),R=a((()=>!!F.value.length&&F.value.length!==w.value.length)),A=a({get:()=>F.value.length===w.value.length&&0!==w.value.length,set:e=>{F.value=e?w.value.map((e=>e.value)):[]}}),B=a((()=>({...z.style,height:b(32*W.value)})));function G(){E.value=F.value,P()}function J(){F.value=[]}return(e,l)=>(n(),o("section",$,[r(w).length>5?(n(),i(r(L),{key:0,value:O.value,"onUpdate:value":l[0]||(l[0]=e=>O.value=e)},null,8,["value"])):c("v-if",!0),s("div",I,[v(r(x),{label:"全选",checked:r(A),"onUpdate:checked":l[1]||(l[1]=e=>d(A)?A.value=e:null),indeterminate:r(R)},null,8,["checked","indeterminate"])]),v(r(C),{value:F.value,"onUpdate:value":l[3]||(l[3]=e=>F.value=e)},{default:p((()=>[s("section",{ref:r(z).ref,style:f(r(B)),onScroll:l[2]||(l[2]=(...e)=>r(z).onScroll&&r(z).onScroll(...e)),class:"iho-table__filterListWrapper"},[s("section",{style:f(r(H).style)},[(n(!0),o(h,null,m(r(q),(e=>(n(),o("div",{class:"iho-table__filterListItem",key:e.data.value},[v(r(x),{value:e.data.value,label:e.data.label},null,8,["value","label"])])))),128))],4)],36)])),_:1},8,["value"]),s("footer",Y,[s("section",null,y(`已选择${F.value.length}项`),1),v(r(D),{size:"small"},{default:p((()=>[v(r(S),{onClick:J},{default:p((()=>[_("清空")])),_:1}),v(r(S),{onClick:P},{default:p((()=>[_("取消")])),_:1}),v(r(S),{type:"primary",onClick:G},{default:p((()=>[_("确定")])),_:1})])),_:1})])]))}});export{U as default};
@@ -1 +1 @@
1
- import*as e from"./anchorPlugin/index.js";import*as r from"./defaultConfigPlugin/index.js";import*as i from"./fieldConnectionPlugin/index.js";import*as n from"./filterDaterangeRenderPlugin/index.js";import*as d from"./filterRenderPlugin/index.js";import*as s from"./highLightSetPlugin.js";import*as t from"./keyboardEventPlugin/index.js";import*as l from"./lowCodeFieldAdaptorPlugin/index.js";import*as g from"./maxCheckSizePlugin.js";import*as u from"./rendererPlugins/editableWidgets/dateRendererPlugin/index.js";import*as o from"./rendererPlugins/editableWidgets/inputRendererPlugin.js";import*as P from"./rendererPlugins/editableWidgets/numberRendererPlugin.js";import*as a from"./rendererPlugins/editableWidgets/selectRendererPlugin/index.js";import*as m from"./rendererPlugins/editableWidgets/separateRendererPlugin/index.js";import*as x from"./rendererPlugins/editableWidgets/timeRendererPlugin/index.js";import*as f from"./rendererPlugins/widgets/checkRendererPlugin.js";import*as p from"./rendererPlugins/widgets/colorRendererPlugin.js";import*as j from"./rendererPlugins/widgets/defaultRendererPlugin.js";import*as R from"./rendererPlugins/widgets/labelRendererPlugin.js";import*as b from"./rendererPlugins/widgets/pictureRendererPlugin.js";import*as w from"./rendererPlugins/widgets/seqRendererPlugin.js";import*as c from"./rowClickPlugin/index.js";import*as h from"./rowDragPlugin/index.js";import*as W from"./rowGroupSettingPlugin/index.js";import*as C from"./varialbleHeightPlugin/index.js";import*as k from"./virtualTreePlugin/index.js";import{separateMetaModule as v}from"../../../../shared/utils/index.js";var S=v(Object.assign({"./anchorPlugin/index.tsx":e,"./defaultConfigPlugin/index.ts":r,"./fieldConnectionPlugin/index.ts":i,"./filterDaterangeRenderPlugin/index.tsx":n,"./filterRenderPlugin/index.tsx":d,"./highLightSetPlugin.tsx":s,"./keyboardEventPlugin/index.ts":t,"./lowCodeFieldAdaptorPlugin/index.tsx":l,"./maxCheckSizePlugin.ts":g,"./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx":u,"./rendererPlugins/editableWidgets/inputRendererPlugin.tsx":o,"./rendererPlugins/editableWidgets/numberRendererPlugin.tsx":P,"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx":a,"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx":m,"./rendererPlugins/editableWidgets/timeRendererPlugin/index.tsx":x,"./rendererPlugins/widgets/checkRendererPlugin.tsx":f,"./rendererPlugins/widgets/colorRendererPlugin.tsx":p,"./rendererPlugins/widgets/defaultRendererPlugin.tsx":j,"./rendererPlugins/widgets/labelRendererPlugin.tsx":R,"./rendererPlugins/widgets/pictureRendererPlugin.tsx":b,"./rendererPlugins/widgets/seqRendererPlugin.tsx":w,"./rowClickPlugin/index.ts":c,"./rowDragPlugin/index.ts":h,"./rowGroupSettingPlugin/index.ts":W,"./varialbleHeightPlugin/index.tsx":C,"./virtualTreePlugin/index.ts":k}));export{S as default};
1
+ import*as e from"./anchorPlugin/index.js";import*as r from"./defaultConfigPlugin/index.js";import*as i from"./fieldConnectionPlugin/index.js";import*as n from"./filterDaterangeRenderPlugin/index.js";import*as d from"./filterRenderPlugin/index.js";import*as s from"./highLightSetPlugin.js";import*as t from"./keyboardEventPlugin/index.js";import*as l from"./lowCodeFieldAdaptorPlugin/index.js";import*as g from"./maxCheckSizePlugin.js";import*as u from"./operationalFormPlugin/index.js";import*as o from"./rendererPlugins/editableWidgets/dateRendererPlugin/index.js";import*as a from"./rendererPlugins/editableWidgets/inputRendererPlugin.js";import*as P from"./rendererPlugins/editableWidgets/numberRendererPlugin.js";import*as m from"./rendererPlugins/editableWidgets/selectRendererPlugin/index.js";import*as x from"./rendererPlugins/editableWidgets/separateRendererPlugin/index.js";import*as f from"./rendererPlugins/editableWidgets/timeRendererPlugin/index.js";import*as p from"./rendererPlugins/widgets/checkRendererPlugin.js";import*as j from"./rendererPlugins/widgets/colorRendererPlugin.js";import*as R from"./rendererPlugins/widgets/defaultRendererPlugin.js";import*as b from"./rendererPlugins/widgets/labelRendererPlugin.js";import*as w from"./rendererPlugins/widgets/pictureRendererPlugin.js";import*as c from"./rendererPlugins/widgets/seqRendererPlugin.js";import*as h from"./rowClickPlugin/index.js";import*as W from"./rowDragPlugin/index.js";import*as C from"./rowGroupSettingPlugin/index.js";import*as k from"./varialbleHeightPlugin/index.js";import*as v from"./virtualTreePlugin/index.js";import{separateMetaModule as S}from"../../../../shared/utils/index.js";var D=S(Object.assign({"./anchorPlugin/index.tsx":e,"./defaultConfigPlugin/index.ts":r,"./fieldConnectionPlugin/index.ts":i,"./filterDaterangeRenderPlugin/index.tsx":n,"./filterRenderPlugin/index.tsx":d,"./highLightSetPlugin.tsx":s,"./keyboardEventPlugin/index.ts":t,"./lowCodeFieldAdaptorPlugin/index.tsx":l,"./maxCheckSizePlugin.ts":g,"./operationalFormPlugin/index.ts":u,"./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx":o,"./rendererPlugins/editableWidgets/inputRendererPlugin.tsx":a,"./rendererPlugins/editableWidgets/numberRendererPlugin.tsx":P,"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx":m,"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx":x,"./rendererPlugins/editableWidgets/timeRendererPlugin/index.tsx":f,"./rendererPlugins/widgets/checkRendererPlugin.tsx":p,"./rendererPlugins/widgets/colorRendererPlugin.tsx":j,"./rendererPlugins/widgets/defaultRendererPlugin.tsx":R,"./rendererPlugins/widgets/labelRendererPlugin.tsx":b,"./rendererPlugins/widgets/pictureRendererPlugin.tsx":w,"./rendererPlugins/widgets/seqRendererPlugin.tsx":c,"./rowClickPlugin/index.ts":h,"./rowDragPlugin/index.ts":W,"./rowGroupSettingPlugin/index.ts":C,"./varialbleHeightPlugin/index.tsx":k,"./virtualTreePlugin/index.ts":v}));export{D as default};
@@ -1 +1 @@
1
- import{unref as e}from"vue";import{promiseTimeout as n}from"@vueuse/shared";import"../../../index.js";import{useSessionStorage as t}from"@vueuse/core";import{isString as o,trim as i,isEmpty as r,isEqual as l,isFunction as u}from"lodash-es";import{selectOptionsMap as d}from"../rendererPlugins/editableWidgets/hooks/useSelectOption.js";import{IhoTableUtils as a}from"../../utils/index.js";import{EDITABLE_WIDGET_TYPE as s}from"../../constants/index.js";import{parse as c,isValid as p,compareDesc as f}from"date-fns";import{defineTablePlugin as m}from"../../hooks/useTablePlugin.js";function v(){const v="keyboardEventPlugin",g=t("ihoTableClipData","");return m({name:v,apply(t){function m(n,t,m,v,w){var b,y;if(!(null==(b=null==m?void 0:m.keyboardConfig)?void 0:b.isClip))return;const{row:C,column:R}=t.getSelectedCell()||t.getEditRecord()||{};if(!C||!R||!E(R,s.SELECT)&&e(g)===C[R.field])return;const x=m.uuid&&E(R,s.SELECT)&&d.get(m.uuid)[R.field],T=C[R.field];if("copy"===n){const e=(null==(y=(x||[]).filter((e=>T.includes(e.value))))?void 0:y.map((e=>e.label)).join(","))||T;g.value=e}else{if(o(e(g))&&(g.value=i(e(g)||"")),!e(g)||!function(e){var n;const t=null==(n=e.editRender)?void 0:n.props;return t&&Object.keys(s).includes(a.getCellType(t))}(R)||C.$__SEPARATE||!function(e,n,t,o){var i,r;const{beforeEditMethod:l}=n.editConfig||{},d={rowIndex:null!=(i=e.getRowIndex(t))?i:0,columnIndex:null!=(r=e.getColumnIndex(o))?r:0};return!l||u(l)&&l({row:t,column:o,...d,$table:e,$grid:void 0})}(t,m,C,R))return;if(E(R,s.DATE)&&function(n,t){var i;const r=null==(i=n.editRender)?void 0:i.props,l=e(g)||"";return!p(new Date(l))||o(r.connectField)&&t[r.connectField]&&(r.isStartDate&&f(new Date(l),new Date(t[r.connectField]))<0||r.isEndDate&&f(new Date(l),new Date(t[r.connectField]))>0)}(R,C))return;if(E(R,s.NUMBER)&&!/^-?\d*\.?\d+$/.test((e(g)||"").toString()))return;if(E(R,s.TIME)&&function(n){var t,o;const i=e(g)||"",r=null==(t=n.editRender)?void 0:t.props,l=c(i,(null==(o=null==r?void 0:r.componentProps)?void 0:o.valueFormat)||"HH:mm",new Date);return!p(l)}(R))return;let n=e(g)||"";if(x&&!r(x)){const e=x.filter((e=>n.split(",").includes(e.label))).map((e=>e.value));if(r(e))return;if(function(e){var n,t;const o=null==(n=e.editRender)?void 0:n.props;return E(e,s.SELECT)&&(null==(t=o.componentProps)?void 0:t.multiple)}(R)){if(l(T,e))return;n=e}else{if(e.includes(T))return;n=e[0]}}C[R.field]=n,v("formChange",{column:R,row:C,oldValue:T,value:n,index:t.getRowIndex(C)}),E(R,s.SEPARATE)&&(null==w||w())}}function E(e,n){var t;const o=null==(t=e.editRender)?void 0:t.props;return o&&a.getCellType(o)===n}t.eventHooks.onCopy.tap(v,(({$table:e},n,{emits:t})=>m("copy",e,n,t))),t.eventHooks.onPaste.tap(v,(({$table:e},n,{emits:t,updateTableDataRef:o})=>m("paste",e,n,t,o))),t.eventHooks.onKeydown.tap(v,(async({$event:e,$table:t},o,{emits:i})=>{await n(0);const{row:r,column:l}=t.getSelectedCell()||t.getEditRecord()||{};if(!r||!l)return;i("keyboard",{key:e.key,index:t.getRowIndex(r),value:r[l.field],row:r,column:l})}))}})}export{v as keyboardEventPlugin};
1
+ import{unref as e}from"vue";import{promiseTimeout as n}from"@vueuse/shared";import"../../../index.js";import{useSessionStorage as t}from"@vueuse/core";import{isString as o,trim as i,isEmpty as l,isEqual as r,isFunction as u}from"lodash-es";import{selectOptionsMap as d}from"../rendererPlugins/editableWidgets/hooks/useSelectOption.js";import{IhoTableUtils as a}from"../../utils/index.js";import{EDITABLE_WIDGET_TYPE as s}from"../../constants/index.js";import{parse as c,isValid as p,compareDesc as f}from"date-fns";import{defineTablePlugin as m}from"../../hooks/useTablePlugin.js";function v(){const v="keyboardEventPlugin",g=t("ihoTableClipData","");return m({name:v,apply(t){function m(n,t,m,v,w){var b,y;if(!(null==(b=null==m?void 0:m.keyboardConfig)?void 0:b.isClip))return;const{row:C,column:R}=t.getSelectedCell()||t.getEditRecord()||{};if(!C||!R||!E(R,s.SELECT)&&e(g)===C[R.field])return;const x=m.uuid&&E(R,s.SELECT)&&d.get(m.uuid)[R.field],T=C[R.field];if("copy"===n){const e=(null==(y=(x||[]).filter((e=>T.includes(e.value))))?void 0:y.map((e=>e.label)).join(","))||T;g.value=e}else{if(o(e(g))&&(g.value=i(e(g)||"")),!e(g)||!function(e){var n;const t=null==(n=e.editRender)?void 0:n.props;return t&&Object.keys(s).includes(a.getCellType(t))}(R)||C.$__SEPARATE||!function(e,n,t,o){var i,l;const{beforeEditMethod:r}=n.editConfig||{},d={rowIndex:null!=(i=e.getRowIndex(t))?i:0,columnIndex:null!=(l=e.getColumnIndex(o))?l:0};return!r||u(r)&&r({row:t,column:o,...d,$table:e,$grid:void 0})}(t,m,C,R))return;if(E(R,s.DATE)&&function(n,t){var i;const l=null==(i=n.editRender)?void 0:i.props,r=e(g)||"";return!p(new Date(r))||o(l.connectField)&&t[l.connectField]&&(l.isStartDate&&f(new Date(r),new Date(t[l.connectField]))<0||l.isEndDate&&f(new Date(r),new Date(t[l.connectField]))>0)}(R,C))return;if(E(R,s.NUMBER)&&!/^-?\d*\.?\d+$/.test((e(g)||"").toString()))return;if(E(R,s.TIME)&&function(n){var t,o;const i=e(g)||"",l=null==(t=n.editRender)?void 0:t.props,r=c(i,(null==(o=null==l?void 0:l.componentProps)?void 0:o.valueFormat)||"HH:mm",new Date);return!p(r)}(R))return;let n=e(g)||"";if(x&&!l(x)){const e=x.filter((e=>n.split(",").includes(e.label))).map((e=>e.value));if(l(e))return;if(function(e){var n,t;const o=null==(n=e.editRender)?void 0:n.props;return E(e,s.SELECT)&&(null==(t=o.componentProps)?void 0:t.multiple)}(R)){if(r(T,e))return;n=e}else{if(e.includes(T))return;n=e[0]}}C[R.field]=n,v("formChange",{column:R,row:C,oldValue:T,value:n,index:t.getRowIndex(C)}),E(R,s.SEPARATE)&&(null==w||w())}}function E(e,n){var t;const o=null==(t=e.editRender)?void 0:t.props;return o&&a.getCellType(o)===n}t.eventHooks.onCopy.tap(v,(({$table:e},n,{emits:t})=>m("copy",e,n,t))),t.eventHooks.onPaste.tap(v,(({$table:e},n,{emits:t,updateTableDataRef:o})=>m("paste",e,n,t,o))),t.eventHooks.onKeydown.tap(v,(async({$event:e,$table:t},o,{emits:i})=>{await n(0);const{row:l,column:r}=t.getSelectedCell()||t.getEditRecord()||{};if(!l||!r)return;i("keyboard",{$table:t,key:e.key,index:t.getRowIndex(l),value:l[r.field],row:l,column:r})}))}})}export{v as keyboardEventPlugin};
@@ -1 +1 @@
1
- import{toRaw as e,h as t,inject as l,createVNode as i}from"vue";import{arrayed as o,widthAppend as s}from"../../../../../shared/utils/index.js";import{isObject as n,isFunction as d,cloneDeep as a,isString as r}from"lodash-es";import{NEllipsis as u}from"naive-ui";import f from"../../../../annotation-edit/index.js";import{HIGHEST_PRIORITY as m,IHO_TABLE_FIXED_STATUS as c,LOWEST_PRIORITY as p,WIDGET_TYPE as h,InjectionIhoTableAnnotation as v,InjectionIhoTableConfig as b}from"../../constants/index.js";import{defineTablePlugin as g}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as R,IhoTableUtils as j,IhoTableRenderHelper as x}from"../../utils/index.js";import{getDefaultValue as P}from"../rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js";function F(){const F="lowCodeFieldAdaptorPlugin";return g({name:F,apply(g){g.fieldHooks.field.tap({name:F,stage:m},((m,p,g)=>{const F=m,S={className:F.bold?"iho-table__boldCell":"",field:F.columnName,showOverflow:"tooltip",visible:R.notNegative(F.isShow),minWidth:F.colWidth,sortable:R.isPositive(F.isSort),fixed:c[F.isFixed],...F,title:F.alias||F.title};return function(e,a){const m={default:a.slotFn,header:a.headerSlotFn,edit:a.editSlotFn,footer:a.footerSlotFn,...a.slots};if(d(a.checkEditStatus)){const{default:e}=m;d(e)&&(m.default=l=>a.checkEditStatus(l)?e(l):[t("span",null,P(l.row,l.column.editRender.props))])}const c=m.header;m.header=e=>function(e,t,a){var m;const c=l(v),p=l(b),h=e.column||{},g=n(null==c?void 0:c.value)&&!1!==t.annotation,R=x.isEditableColumn(p.value,h),j=x.hasFilter(t)||x.hasDateFiler(t),P=null==(m=t.titlePrefix)?void 0:m.content,F=r(a)?a:d(a)?a(e):null;let S=!1;if(p.value){const e=p.value.editRules&&p.value.editRules[h.field];e&&(S=o(e).some((e=>e.required)))}return i("section",{class:"iho-table__headerWrapper"},[i("section",{style:{width:s(Math.max(0,h.renderWidth-20-(S?14:0)-(g?18:0)-(j?23:0)-(R?22:0)-(P?20:0)-(h.sortable?23:0)))}},[null!=F?F:i(u,{style:{maxWidth:"100%"}},{default:()=>h.title})]),g?i(f,{modelValue:c.value[h.field],"onUpdate:modelValue":e=>c.value[h.field]=e},null):null])}(e,a,c),e.slots=m}(S,F),function(t,l,i){var o,s;const r=a(e(l));r.componentProps={size:"mini"===i.size?"small":i.size,...r.componentProps},t.editRender={autofocus:"input",name:j.getCellType(l),props:r},t.editRender.enabled=!Reflect.get(h,t.editRender.name),d(null==(o=t.slots)?void 0:o.default)&&(t.editRender.enabled=t.editRender.enabled&&d(null==(s=t.slots)?void 0:s.edit));if(!n(l.settingObj))return;Reflect.has(l.settingObj,"isHide")&&(t.visible=t.visible&&R.notPositive(l.settingObj.isHide))}(S,F,g),S})),g.fieldHooks.field.tap({name:F+"After",stage:p},(e=>(n(e.slots)&&Object.entries(e.slots).forEach((([t,l])=>{null==l&&Reflect.deleteProperty(e.slots,t)})),e)))}})}export{F as lowCodeFieldAdaptorPlugin};
1
+ import{toRaw as e,h as t,inject as l,createVNode as i}from"vue";import{arrayed as o,widthAppend as s}from"../../../../../shared/utils/index.js";import{isObject as n,isFunction as a,cloneDeep as d,isString as r}from"lodash-es";import u from"../../../../annotation-edit/index.js";import{HIGHEST_PRIORITY as c,IHO_TABLE_FIXED_STATUS as f,LOWEST_PRIORITY as m,WIDGET_TYPE as p,InjectionIhoTableAnnotation as h,InjectionIhoTableConfig as v}from"../../constants/index.js";import{defineTablePlugin as b}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as g,IhoTableUtils as x,IhoTableRenderHelper as R}from"../../utils/index.js";import{getDefaultValue as j}from"../rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js";function w(){const w="lowCodeFieldAdaptorPlugin";return b({name:w,apply(b){b.fieldHooks.field.tap({name:w,stage:c},((c,m,b)=>{const w=c,P={className:w.bold?"iho-table__boldCell":"",field:w.columnName,showOverflow:"title",visible:g.notNegative(w.isShow),minWidth:w.colWidth,sortable:g.isPositive(w.isSort),fixed:f[w.isFixed],...w,title:w.alias||w.title};return function(e,d){const c={default:d.slotFn,header:d.headerSlotFn,edit:d.editSlotFn,footer:d.footerSlotFn,...d.slots};if(a(d.checkEditStatus)){const{default:e}=c;a(e)&&(c.default=l=>d.checkEditStatus(l)?e(l):[t("span",null,j(l.row,l.column.editRender.props))])}const f=c.header;c.header=e=>function(e,t,d){var c;const f=l(h),m=l(v),p=l("$xetable"),b=e.column||{},g=n(null==f?void 0:f.value)&&!1!==t.annotation,x=R.isEditableColumn(m.value,b),j=R.hasFilter(t)||R.hasDateFiler(t),w=null==(c=t.titlePrefix)?void 0:c.content,P=r(d)?d:a(d)?d(e):null;let F=!1;if(m.value){const e=m.value.editRules&&m.value.editRules[b.field];e&&(F=o(e).some((e=>e.required)))}const S=m.value.border?Math.max(2,Math.ceil(p.reactData.scrollbarWidth/p.reactData.tableColumn.length)):1;return i("section",{class:"iho-table__headerWrapper"},[i("section",{style:{width:s(Math.max(0,b.renderWidth-20-S-(F?14:0)-(g?18:0)-(j?23:0)-(x?22:0)-(w?20:0)-(b.sortable?23:0)))}},[null!=P?P:i("div",{style:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},[b.title])]),g?i(u,{modelValue:f.value[b.field],"onUpdate:modelValue":e=>f.value[b.field]=e},null):null])}(e,d,f),e.slots=c}(P,w),function(t,l,i){var o,s;const r=d(e(l));r.componentProps={size:"mini"===i.size?"small":i.size,...r.componentProps},t.editRender={autofocus:"input",name:x.getCellType(l),props:r},t.editRender.enabled=!Reflect.get(p,t.editRender.name),a(null==(o=t.slots)?void 0:o.default)&&(t.editRender.enabled=t.editRender.enabled&&a(null==(s=t.slots)?void 0:s.edit));if(!n(l.settingObj))return;Reflect.has(l.settingObj,"isHide")&&(t.visible=t.visible&&g.notPositive(l.settingObj.isHide))}(P,w,b),P})),b.fieldHooks.field.tap({name:w+"After",stage:m},(e=>(n(e.slots)&&Object.entries(e.slots).forEach((([t,l])=>{null==l&&Reflect.deleteProperty(e.slots,t)})),e)))}})}export{w as lowCodeFieldAdaptorPlugin};
@@ -0,0 +1 @@
1
+ export declare function operationalFormPlugin(): import("../../../../../../es/components/iho-table").TablePlugin;
@@ -0,0 +1 @@
1
+ import"../../../../../shared/utils/index.js";import"../../../index.js";import{isFunction as o}from"lodash-es";import{defineTablePlugin as n}from"../../hooks/useTablePlugin.js";import{getOperationalFormHandler as r}from"../../../../../shared/utils/business.js";function e(){const e="operationalFormPlugin";return n({name:e,apply(n){n.configHooks.config.tap(e,(n=>{const e=n.onFormChange;return n.onFormChange=function(t){const{column:i,row:s,$table:m}=t;!function(o,e){return r(n.operationForm,(n=>o[n]),((n,r)=>{e.getColumns().some((o=>o.field===n))&&(o[n]=r)})).operationalFormHandler}(s,m)(i.field),o(e)&&e(t)},n}))}})}export{e as operationalFormPlugin};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as o,reactive as t,watch as n,createVNode as r,mergeProps as l}from"vue";import{NSelect as a}from"naive-ui";import{useIhoTableFormEvent as u}from"../../../../utils/index.js";import{useDebounceFn as i}from"@vueuse/core";import{isFunction as s,isArray as c,trim as p}from"lodash-es";var d=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:"请选择"}},emits:["update:value"],setup(e,{emit:d}){const m=o(null);function f(e){m.value=e}const y=o(!1),{emitFormChangeWithParams:v}=u(e),h=t({options:e.options,loading:!1,remote:!1,onSearch:null}),w=i((async function(o=""){h.loading=!0;try{if(!s(e.queryOptions))return;h.options=await e.queryOptions({keyword:o,row:e.row,column:e.column,rowIndex:e.rowIndex})}catch(o){console.log(`获取${e.column.field}options错误`)}finally{h.loading=!1}}),400);function b(o){const t=e.value;d("update:value",o),v({oldValue:t})}function g(e){var o,t;"Tab"===e.key&&m.value&&(null==(t=(o=m.value).handleKeydown)||t.call(o,{...e,key:"Enter",preventDefault:e.preventDefault.bind(e)}))}function S(e,o){if(!e||!o)return!1;const t=p(e);if(!t)return!0;const{label:n="",keyword:r=""}=o;return n.includes(t)||r.split(",").some((e=>e.includes(t)))}n((()=>e.options),(e=>{if(c(e)&&e.length)return h.options=e,h.remote=!1,void(h.onSearch=null);h.remote=!0,h.onSearch=w,h.onSearch()}),{immediate:!0});const q=()=>({class:"iho-table__selectOption"}),O={class:"iho-table__selectMenu"};return()=>r(a,l({ref:f,show:y.value,"onUpdate:show":e=>y.value=e,placeholder:e.placeholder},h,{value:e.value,clearable:!0,filterable:!0,filter:S,nodeProps:q,menuProps:O,onUpdateValue:b,onKeydown:g}),null)}});export{d as default};
1
+ import{defineComponent as e,inject as o,ref as t,reactive as n,watch as r,createVNode as l,mergeProps as a}from"vue";import{NSelect as u}from"naive-ui";import{useIhoTableFormEvent as i}from"../../../../utils/index.js";import{useDebounceFn as s}from"@vueuse/core";import{isFunction as c,isArray as p,trim as d}from"lodash-es";var m=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:"请选择"}},emits:["update:value"],setup(e,{emit:m}){const f=o("$xetable"),y=t(null);function v(e){y.value=e}const h=t(!1),{emitFormChangeWithParams:b}=i({...e,$table:f}),w=n({options:e.options,loading:!1,remote:!1,onSearch:null}),g=s((async function(o=""){w.loading=!0;try{if(!c(e.queryOptions))return;w.options=await e.queryOptions({keyword:o,row:e.row,column:e.column,rowIndex:e.rowIndex})}catch(o){console.log(`获取${e.column.field}options错误`)}finally{w.loading=!1}}),400);function S(o){const t=e.value;m("update:value",o),b({oldValue:t})}function q(e){var o,t;"Tab"===e.key&&y.value&&(null==(t=(o=y.value).handleKeydown)||t.call(o,{...e,key:"Enter",preventDefault:e.preventDefault.bind(e)}))}function x(e,o){if(!e||!o)return!1;const t=d(e);if(!t)return!0;const{label:n="",keyword:r=""}=o;return n.includes(t)||r.split(",").some((e=>e.includes(t)))}r((()=>e.options),(e=>{if(p(e)&&e.length)return w.options=e,w.remote=!1,void(w.onSearch=null);w.remote=!0,w.onSearch=g,w.onSearch()}),{immediate:!0});const O=()=>({class:"iho-table__selectOption"}),k={class:"iho-table__selectMenu"};return()=>l(u,a({ref:v,show:h.value,"onUpdate:show":e=>h.value=e,placeholder:e.placeholder},w,{value:e.value,clearable:!0,filterable:!0,filter:x,nodeProps:O,menuProps:k,onUpdateValue:S,onKeydown:q}),null)}});export{m as default};
@@ -1 +1 @@
1
- import{unref as e,createVNode as t,onBeforeUnmount as o,shallowReactive as l,defineComponent as n,inject as r,ref as a,computed as s,provide as i,watch as u,onMounted as d,h as c}from"vue";import{traverse as p,widthAppend as f}from"../../../../../shared/utils/index.js";import{doAnimation as m}from"../../../../../shared/utils/anime.js";import{useThrottleFn as h}from"@vueuse/core";import{promiseTimeout as g}from"@vueuse/shared";import{last as v,isFunction as x,omit as I,isNumber as b}from"lodash-es";import"../../../index.js";import{WIDGET_TYPE as w,InjectionIhoTableUUID as y}from"../../constants/index.js";import{useUUIDMap as T}from"../../utils/index.js";import{defineTablePlugin as H}from"../../hooks/useTablePlugin.js";class R{constructor(){this.records={},this.maxRecords=l(new Map)}set(e,t,o){if(this.records[e]||(this.records[e]={}),this.records[e][t]===o)return;this.records[e][t]=o;const l=Math.max(...Object.values(this.records[e]),0);this.maxRecords.get(e)!==l&&this.maxRecords.set(e,l)}getMax(e){return this.maxRecords.get(e)||0}}const{getItemFromUUID:D,removeItemFromUUID:M}=T((()=>new R),!0),{getItemFromUUID:S,removeItemFromUUID:U,setItemFromUUID:C}=T((()=>null)),{getItemFromUUID:$,removeItemFromUUID:E,setItemFromUUID:k}=T((()=>{})),F=n({props:{payload:{type:Object,required:!0}},setup(e){const o=r(y),l=r("$xetable"),n=a(),p=D(o),m=s((()=>e.payload.row[e.payload.column.field]));function h(){const{row:t,column:o}=e.payload,r=l.getRowSeq(t);if(!p||null==r||!n.value)return;const a=n.value.clientHeight;p.set(r,o.field,a)}i("updateCellHeight",h),u([()=>e.payload.rowIndex,()=>e.payload.column.field,m,()=>e.payload.column.renderWidth],(async()=>{await g(0),h()})),d((()=>{l&&!S(o)&&C(o,l),h()}));const v=s((()=>{var t,o,l,n;const r=null!=(o=null==(t=e.payload.column.editRender)?void 0:t.props)?o:{},a=null!=(n=null==(l=r.slots)?void 0:l.default)?n:r.slotFn;return x(a)?a:()=>m.value})),I=s((()=>{if(e.payload.column.treeNode)return"";const t=e.payload.column.renderWidth;return b(t)&&t>0?f(t-20-2):""}));return()=>t("div",{ref:n,style:{padding:"7px 0",width:I.value,overflow:"hidden"}},[c(v.value,e.payload)])}});function j(t,o,{scrollTop:l=0}){var n,r;const{uuid:a,rowConfig:s={}}=o;if(!a)return;const i=D(a),{oSize:u=0,gt:d=100}=null!=(n=$(a))?n:{},{internalData:c,reactData:p}=t,{scrollYStore:f,elemStore:m,afterFullData:h,fullDataRowIdData:g}=c;if(d>h.length)return;const I=null!=(r=s.height)?r:36,b=m["main-body-wrapper"],w=b?e(b):null;let y=w?Math.max(8,Math.ceil(w.clientHeight/I)+2+u):8;const T=[0];let H=0;if(l&&h.find(((e,o)=>{const n=t.getRowSeq(e),r=(v(T)||0)+Math.max(I,i.getMax(n));if(T.push(r),r>l)return H=Math.max(0,o-u),y+=Math.min(H,u),!0})),H>0&&x(o.spanMethod)){const{spanMethod:e}=o,l={rowspan:1,colspan:1};for(;H>0;){if(!t.getColumns().some(((t,o)=>{const{rowspan:n,colspan:r}=e({column:t,columnIndex:o,$columnIndex:o,row:h[H],rowIndex:H,$rowIndex:H,_rowIndex:H,isHidden:!t.visible,fixed:t.fixed,type:t.type,visibleData:h})||l;if(0===n&&0===r)return H--,!0})))break}}const R=`${T[H]}px`,M=`${h.reduce(((e,o)=>{const l=t.getRowSeq(o);return e+Math.max(I,i.getMax(l))}),0)}px`;["main","left","right"].forEach((t=>{const o=m[`${t}-body-table`],n=o?e(o):null;n&&(n.style.marginTop=R,n.scrollTop=l),["header","body","footer"].forEach((o=>{const l=m[`${t}-${o}-ySpace`],n=l?e(l):null;n&&(n.style.height=M)}))}));const S=Math.min(h.length,H+y);if(f.startIndex===H&&f.endIndex===S)return;f.startIndex=H,f.endIndex=S;const U=h.slice(f.startIndex,f.endIndex);U.forEach(((e,o)=>{const l=t.getRowid(e),n=g[l];n&&(n.$index=o)})),p.tableData.length=0,p.tableData.push(...U)}const L=h(j,300);function Y(){const l="variableHeightRendererPlugin";return H({name:l,vxe(e){e.renderer.add(w.VARIABLE_HEIGHT,{renderCell:(e,o)=>t(F,{payload:o},null)})},apply(t){function n(t){const o=S(t.uuid);if(!o)return;t.scrollY={enabled:!1},o.reactData.scrollYLoad=!1;const l=function(t){const o=t.internalData.elemStore["main-body-wrapper"];return o?e(o):null}(o);l&&j(o,t,{scrollTop:l.scrollTop})}function r(e){if(!e.uuid)return;const t=$(e.uuid);t&&(e.scrollY=t),setTimeout((()=>n(e)),300)}t.dataHooks.dataStart.tap(l,r),t.eventHooks.onFilterChange.tap(l,((e,t)=>r(t))),t.eventHooks.onSortChange.tap(l,((e,t)=>r(t))),t.eventHooks.onToggleTreeExpand.tap(l,((e,t)=>r(t))),t.eventHooks.onResizableChange.tap(l,(async({column:e},t)=>{if(!e.editRender||!e.editRender.props)return;e.editRender.props.variableHeight&&r(t)})),t.eventHooks.onScroll.tap(l,h(((e,t)=>{if(e.isX)return;const{uuid:o}=t;if(!o)return;const l=S(o);l&&j(l,t,e)}),100,!0,!0)),t.fieldHooks.field.tap(l,(e=>{if(Reflect.get(e,"variableHeight")){const t=e.slots;e.slots=I(t,["default"]),e.editRender={...e.editRender,name:w.VARIABLE_HEIGHT};const o=e.className,l="variable-height";e.className=o?function(e){return x(o)?[o(e),l]:[o,l]}:l}return e})),t.fieldHooks.fieldList.tap(l,((t,o,{$table:l})=>(o.uuid&&p(t,((r,a)=>{var s,i,u;if((null==(s=r.editRender)?void 0:s.name)===w.VARIABLE_HEIGHT){const r=null!=(u=null==(i=o.rowConfig)?void 0:i.height)?u:36,s=D(o.uuid),d=o.cellStyle;if(o.cellStyle=function(e){const t={};if(l.value){const o=Math.max(r,s.getMax(l.value.getRowSeq(e.row)));t.height=`${o}px`}return Object.assign(t,d?x(d)?d(e):d:null)},o.sortableConfig&&o.sortableConfig.enable){const t=o.sortableConfig.onEnd;o.sortableConfig.onEnd=function(l){const n=S(o.uuid);if(n){const{internalData:{elemStore:t}}=n,l=t["main-table-body"];l&&e(l)&&j(n,o,{scrollTop:e(l).scrollTop})}x(t)&&t(l)}}o.showOverflow="tooltip",p(t,(e=>{e.showOverflow="tooltip"})),o.scrollY={...o.scrollY,mode:"default"},o.onWheel=function(t){let o=null,l=0,n=!0;return function(r){if(!t.uuid)return;const a=S(t.uuid);if(!a)return;const{internalData:s}=a,{isHover:i}=t.rowConfig||{},{deltaX:u,deltaY:d}=r,{refTableLeftBody:c,refTableRightBody:p,refTableBody:f}=a.getRefMaps(),h=d,g=u,v=h<0,x=e(f),I=x?x.$el:null;if(!I)return;if(v?I.scrollTop<=0:I.scrollTop>=I.scrollHeight-I.clientHeight)return;const b=I.scrollTop+h,w=I.scrollLeft+g;if(b===s.lastScrollTop)return;r.preventDefault(),s.lastScrollTop=b,s.lastScrollLeft=w,s.lastScrollTime=Date.now(),i&&a.clearHoverRow();const y=c.value,T=p.value,H=y?y.$el:null,R=T?T.$el:null,D=Math.min(100,Math.abs(Math.floor(h/2)));n&&(l=I.scrollTop,n=!1),l+=D*(v?-1:1),o&&o(),o=m(I.scrollTop,l,400,(e=>{I.scrollTop=e,H&&(H.scrollTop=e),R&&(R.scrollTop=e)}),"easeOutCubic",(()=>{l=I.scrollTop,n=!0})),L(a,t,I)}}(o),setTimeout((()=>{k(o.uuid,o.scrollY),n(o)}),300),a()}})),t))),t.setupHooks.setup.tap(l,(e=>{o((()=>{e.value.uuid&&(M(e.value.uuid),U(e.value.uuid),E(e.value.uuid))}))}))}})}export{Y as variableHeightRendererPlugin};
1
+ import{unref as e,createVNode as t,onBeforeUnmount as o,shallowReactive as l,defineComponent as n,inject as r,ref as a,computed as s,provide as i,watch as u,onMounted as d,h as c}from"vue";import{traverse as p,widthAppend as f}from"../../../../../shared/utils/index.js";import{doAnimation as m}from"../../../../../shared/utils/anime.js";import{useThrottleFn as h}from"@vueuse/core";import{promiseTimeout as g}from"@vueuse/shared";import{last as v,isFunction as x,omit as I,isNumber as b}from"lodash-es";import"../../../index.js";import{WIDGET_TYPE as y,InjectionIhoTableUUID as T}from"../../constants/index.js";import{useUUIDMap as w}from"../../utils/index.js";import{defineTablePlugin as H}from"../../hooks/useTablePlugin.js";class R{constructor(){this.records={},this.maxRecords=l(new Map)}set(e,t,o){if(this.records[e]||(this.records[e]={}),this.records[e][t]===o)return;this.records[e][t]=o;const l=Math.max(...Object.values(this.records[e]),0);this.maxRecords.get(e)!==l&&this.maxRecords.set(e,l)}getMax(e){return this.maxRecords.get(e)||0}}const{getItemFromUUID:D,removeItemFromUUID:M}=w((()=>new R),!0),{getItemFromUUID:S,removeItemFromUUID:U,setItemFromUUID:C}=w((()=>null)),{getItemFromUUID:$,removeItemFromUUID:E,setItemFromUUID:k}=w((()=>{})),F=n({props:{payload:{type:Object,required:!0}},setup(e){const o=r(T),l=r("$xetable"),n=a(),p=D(o),m=s((()=>e.payload.row[e.payload.column.field]));function h(){const{row:t,column:o}=e.payload,r=l.getRowSeq(t);if(!p||null==r||!n.value)return;const a=n.value.clientHeight;p.set(r,o.field,a)}i("updateCellHeight",h),u([()=>e.payload.rowIndex,()=>e.payload.column.field,m,()=>e.payload.column.renderWidth],(async()=>{await g(0),h()})),d((()=>{l&&!S(o)&&C(o,l),h()}));const v=s((()=>{var t,o,l,n;const r=null!=(o=null==(t=e.payload.column.editRender)?void 0:t.props)?o:{},a=null!=(n=null==(l=r.slots)?void 0:l.default)?n:r.slotFn;return x(a)?a:()=>m.value})),I=s((()=>{if(e.payload.column.treeNode)return"";const t=e.payload.column.renderWidth;return b(t)&&t>0?f(t-20-2):""}));return()=>t("div",{ref:n,style:{padding:"7px 0",width:I.value,overflow:"hidden"}},[c(v.value,e.payload)])}});function j(t,o,{scrollTop:l=0}){var n,r;const{uuid:a,rowConfig:s={}}=o;if(!a)return;const i=D(a),{oSize:u=0,gt:d=100}=null!=(n=$(a))?n:{},{internalData:c,reactData:p}=t,{scrollYStore:f,elemStore:m,afterFullData:h,fullDataRowIdData:g}=c;if(d>h.length)return;const I=null!=(r=s.height)?r:36,b=m["main-body-wrapper"],y=b?e(b):null;let T=y?Math.max(8,Math.ceil(y.clientHeight/I)+2+u):8;const w=[0];let H=0;if(l&&h.find(((e,o)=>{const n=t.getRowSeq(e),r=(v(w)||0)+Math.max(I,i.getMax(n));if(w.push(r),r>l)return H=Math.max(0,o-u),T+=Math.min(H,u),!0})),H>0&&x(o.spanMethod)){const{spanMethod:e}=o,l={rowspan:1,colspan:1};for(;H>0;){if(!t.getColumns().some(((t,o)=>{const{rowspan:n,colspan:r}=e({column:t,columnIndex:o,$columnIndex:o,row:h[H],rowIndex:H,$rowIndex:H,_rowIndex:H,isHidden:!t.visible,fixed:t.fixed,type:t.type,visibleData:h})||l;if(0===n&&0===r)return H--,!0})))break}}const R=`${w[H]}px`,M=`${h.reduce(((e,o)=>{const l=t.getRowSeq(o);return e+Math.max(I,i.getMax(l))}),0)}px`;["main","left","right"].forEach((t=>{const o=m[`${t}-body-table`],n=o?e(o):null;n&&(n.style.marginTop=R,n.scrollTop=l),["header","body","footer"].forEach((o=>{const l=m[`${t}-${o}-ySpace`],n=l?e(l):null;n&&(n.style.height=M)}))}));const S=Math.min(h.length,H+T);if(f.startIndex===H&&f.endIndex===S)return;f.startIndex=H,f.endIndex=S;const U=h.slice(f.startIndex,f.endIndex);U.forEach(((e,o)=>{const l=t.getRowid(e),n=g[l];n&&(n.$index=o)})),p.tableData.length=0,p.tableData.push(...U)}const L=h(j,300);function Y(){const l="variableHeightRendererPlugin";return H({name:l,vxe(e){e.renderer.add(y.VARIABLE_HEIGHT,{renderCell:(e,o)=>t(F,{payload:o},null)})},apply(t){function n(t){const o=S(t.uuid);if(!o)return;t.scrollY={enabled:!1},o.reactData.scrollYLoad=!1;const l=function(t){const o=t.internalData.elemStore["main-body-wrapper"];return o?e(o):null}(o);l&&j(o,t,{scrollTop:l.scrollTop})}function r(e){if(!e.uuid)return;const t=$(e.uuid);t&&(e.scrollY=t),setTimeout((()=>n(e)),300)}t.dataHooks.dataStart.tap(l,r),t.eventHooks.onFilterChange.tap(l,((e,t)=>r(t))),t.eventHooks.onSortChange.tap(l,((e,t)=>r(t))),t.eventHooks.onToggleTreeExpand.tap(l,((e,t)=>r(t))),t.eventHooks.onResizableChange.tap(l,(async({column:e},t)=>{if(!e.editRender||!e.editRender.props)return;e.editRender.props.variableHeight&&r(t)})),t.eventHooks.onScroll.tap(l,h(((e,t)=>{if(e.isX)return;const{uuid:o}=t;if(!o)return;const l=S(o);l&&j(l,t,e)}),100,!0,!0)),t.fieldHooks.field.tap(l,(e=>{if(Reflect.get(e,"variableHeight")){const t=e.slots;e.slots=I(t,["default"]),e.editRender={...e.editRender,name:y.VARIABLE_HEIGHT};const o=e.className,l="variable-height";e.className=o?function(e){return x(o)?[o(e),l]:[o,l]}:l}return e})),t.fieldHooks.fieldList.tap(l,((t,o,{$table:l})=>(o.uuid&&p(t,((t,r)=>{var a,s,i;if((null==(a=t.editRender)?void 0:a.name)===y.VARIABLE_HEIGHT){const t=null!=(i=null==(s=o.rowConfig)?void 0:s.height)?i:36,a=D(o.uuid),u=o.cellStyle;if(o.cellStyle=function(e){const o={};if(l.value){const n=Math.max(t,a.getMax(l.value.getRowSeq(e.row)));o.height=`${n}px`}return Object.assign(o,u?x(u)?u(e):u:null)},o.sortableConfig&&o.sortableConfig.enable){const t=o.sortableConfig.onEnd;o.sortableConfig.onEnd=function(l){const n=S(o.uuid);if(n){const{internalData:{elemStore:t}}=n,l=t["main-table-body"];l&&e(l)&&j(n,o,{scrollTop:e(l).scrollTop})}x(t)&&t(l)}}o.scrollY={...o.scrollY,mode:"default"},o.onWheel=function(t){let o=null,l=0,n=!0;return function(r){if(!t.uuid)return;const a=S(t.uuid);if(!a)return;const{internalData:s}=a,{isHover:i}=t.rowConfig||{},{deltaX:u,deltaY:d}=r,{refTableLeftBody:c,refTableRightBody:p,refTableBody:f}=a.getRefMaps(),h=d,g=u,v=h<0,x=e(f),I=x?x.$el:null;if(!I)return;if(v?I.scrollTop<=0:I.scrollTop>=I.scrollHeight-I.clientHeight)return;const b=I.scrollTop+h,y=I.scrollLeft+g;if(b===s.lastScrollTop)return;r.preventDefault(),s.lastScrollTop=b,s.lastScrollLeft=y,s.lastScrollTime=Date.now(),i&&a.clearHoverRow();const T=c.value,w=p.value,H=T?T.$el:null,R=w?w.$el:null,D=Math.min(100,Math.abs(Math.floor(h/2)));n&&(l=I.scrollTop,n=!1),l+=D*(v?-1:1),o&&o(),o=m(I.scrollTop,l,400,(e=>{I.scrollTop=e,H&&(H.scrollTop=e),R&&(R.scrollTop=e)}),"easeOutCubic",(()=>{l=I.scrollTop,n=!0})),L(a,t,I)}}(o),setTimeout((()=>{k(o.uuid,o.scrollY),n(o)}),300),r()}})),t))),t.setupHooks.setup.tap(l,(e=>{o((()=>{e.value.uuid&&(M(e.value.uuid),U(e.value.uuid),E(e.value.uuid))}))}))}})}export{Y as variableHeightRendererPlugin};
@@ -1,6 +1,6 @@
1
- import { AnyObject, ArrayAble, BindEventSettingItem, LOW_CODE_VALUE_RELATION, MaybeString, TupleToUnion } from '../../../../../es/shared/types';
2
- import { VxeTableProps, VxeTableDefines, VxeTableInstance, VxeColumnPropTypes, VxeTablePropTypes } from 'vxe-table';
3
- import { VxeTableListeners } from 'vxe-table/types/table';
1
+ import { AnyObject, ArrayAble, BindEventSettingItem, FormOperationalConfig, LOW_CODE_VALUE_RELATION, MaybeString, TupleToUnion } from '../../../../../es/shared/types';
2
+ import { VxeTableProps, VxeTableDefines, VxeTableInstance, VxeColumnPropTypes, VxeTablePropTypes, VxeTableConstructor } from 'vxe-table';
3
+ import { VxeTableListeners, VxeTablePrivateMethods } from 'vxe-table/types/table';
4
4
  import { IHO_TABLE_STRING_STATUS, IhoTableEventNameTuple, IhoTableRowGroupSequence } from '../../../../../es/components/iho-table/src/constants';
5
5
  import Sortable from 'sortablejs';
6
6
  export * from './pluginType';
@@ -41,6 +41,7 @@ export declare type IhoTableConfig = VxeTableProps & Partial<{
41
41
  usePreset: boolean;
42
42
  [K: string]: any;
43
43
  }>;
44
+ operationForm: FormOperationalConfig[];
44
45
  [K: string]: unknown;
45
46
  }>;
46
47
  export declare type IhoTableFieldItem = {
@@ -133,6 +134,7 @@ export declare type IhoTableFormChangePayload = {
133
134
  index: number;
134
135
  type?: string;
135
136
  oldValue?: unknown;
137
+ $table: VxeTableConstructor & VxeTablePrivateMethods;
136
138
  };
137
139
  export declare type IhoTableEmits = <T extends typeof IhoTableEventNameTuple[number]>(event: T, ...args: IhoTableEmitPayload<T>) => void;
138
140
  export declare type EventListenerToEventName<T extends string> = T extends `on${infer R}` ? R extends `${infer F}${infer L}` ? `${Lowercase<F>}${L}` : never : never;
@@ -18,7 +18,7 @@ export declare function useUUIDMap<T>(creator: () => T, isReactive?: boolean): {
18
18
  removeItemFromUUID: (uuid: string) => void;
19
19
  };
20
20
  export declare function getColumnRenderWidth(column: AnyObject, $table: MaybeRef<Nullable<VxeTableInstance>>): Promise<number>;
21
- export declare function useIhoTableFormEvent(payload: Pick<VxeGlobalRendererHandles.RenderEditParams, 'row' | 'rowIndex' | 'column'> & {
21
+ export declare function useIhoTableFormEvent(payload: Pick<VxeGlobalRendererHandles.RenderEditParams, 'row' | 'rowIndex' | 'column' | '$table'> & {
22
22
  $rowIndex?: number;
23
23
  }): {
24
24
  emitFormChange: () => void;
@@ -1 +1 @@
1
- import{reactive as e,inject as n,unref as t,toRaw as r,createVNode as i}from"vue";import{jsonParse as o,arrayed as u,findAncestor as l}from"../../../../shared/utils/index.js";import{promiseTimeout as c}from"@vueuse/shared";import{isNumber as a,isString as d,isObject as s,isArray as f,cloneDeep as m}from"lodash-es";import{InjectionIhoTableConfig as p,InjectionIhoTableEmits as v,IHO_TABLE_STRING_STATUS as g,IHO_TABLE_NUMBER_STATUS as E,IHO_TABLE_TREE_TYPE as I}from"../constants/index.js";function h(e){return console.warn(`[IhoTable]: ${e}`)}const T=Object.freeze({getCellType(e){var n;return((null==(n=e.settingObj)?void 0:n.attr)||e.formType||"DEFAULT").toUpperCase()}});function C(){var e,t,r;const i=n(p);return i||h("this function(getRowHeight) only can be used in setup environment"),null!=(r=null==(t=null==(e=null==i?void 0:i.value)?void 0:e.rowConfig)?void 0:t.height)?r:32}function R(e){const n=e.slice(2);return`${n[0].toLowerCase()}${n.slice(1)}`}function S(e){return`on${e[0].toUpperCase()}${e.slice(1)}`}function w(n,t=!0){const r=t?e(new Map):new Map;return{getItemFromUUID:function(e){return r.set(e,r.get(e)||n()).get(e)},setItemFromUUID:function(e,n){r.set(e,n)},removeItemFromUUID:function(e){r.delete(e)}}}async function O(e,n){return r()||await c(0),r()||function(){const n=+e.colWidth;return a(n)?n:64}();function r(){var r,i;return null==(i=null==(r=t(n))?void 0:r.getColumnByField(e.field))?void 0:i.renderWidth}}function F(e){const t=n(v);function i(){var n;return{value:e.row[e.column.field],row:e.row,column:{...e.column,...null==(n=e.column.editRender)?void 0:n.props},index:e.rowIndex>-1?e.rowIndex:e.$rowIndex}}function o(e={}){t("formChange",{...i(),...m(r(e))})}function u(e={}){t("formClick",{...i(),...m(r(e))})}return{emitFormChange:function(){o()},emitFormClick:function(){u()},emitFormChangeWithParams:o,emitFormClickWithParams:u}}const P=Object.freeze({createDefaultRenderCell:function(){return function(e,{row:n,column:t}){return[i("span",null,[n[t.field]])]}},createRenderEdit:function(e){return function({props:n},t){return e({...t,fieldItem:n||{},...F(t)})}},isEditableColumn(e,n){var t;return!1!==(null==(t=e.editConfig)?void 0:t.showIcon)&&n.editRender&&!1!==n.editRender.enabled},hasFilter(e){if(y(e))return!0;let n=e.fieldSetting;return d(n)&&(n=o(n||"")),s(n)&&((t=n).notParticipatingSearch!==g.POSITIVE&&"manual"===(null==(r=t.mapping)?void 0:r.type));var t,r},hasDateFiler(e){var n;return null==(n=null==e?void 0:e.filterSetting)?void 0:n.daterange}}),A=Object.freeze({isPositive:e=>e===E.POSITIVE||e===g.POSITIVE,isNegative:e=>e===E.NEGATIVE||e===g.NEGATIVE,notPositive:e=>e!==E.POSITIVE&&e!==g.POSITIVE,notNegative:e=>e!==E.NEGATIVE&&e!==g.NEGATIVE}),N=(e,n)=>({$event:t,column:r})=>{var i;if(!u(e).includes(null==(i=r.editRender)?void 0:i.name))return!0;const o=null==t?void 0:t.target;return!s(o)||!l(o,n)};function V(e){return[I.TRANSFORM_WITH_SPAN_METHOD,I.TRANSFORM_TREE_TYPE].includes(`${e.isTree}`)}function $(e){return d(e)&&!!e.match(/^###\{[^{}]+}$/)}function x(e){try{return JSON.parse(e.replace(/^###/,""))}catch(e){return{}}}function U(e,n){if(e.$__SEPARATE||!n.editRender||!n.editRender.props)return e[n.field];const{fieldSetting:t}=n.editRender.props;if(!d(t))return e[n.field];const{mergedFeildExpression:r}=o(t);return r&&d(r)?r.replace(/#{(.+?)}/g,(function(n,t){let r=t?e[t.trim()]:null;$(r)&&(r=x(r).change_text);return r||(null==r?"--":r)})):e[n.field]}const b=["SEARCH","SELECT","RADIO","CHECKBOX"];function y(e){return e.notParticipatingSearch===E.NEGATIVE&&b.includes(T.getCellType(e))&&f(e.options)&&e.options.length}export{P as IhoTableRenderHelper,A as IhoTableStatusHelper,T as IhoTableUtils,h as IhoTableWarn,N as createIhoTableClearActivedInterceptor,R as eventListener2EventName,S as eventName2EventListener,O as getColumnRenderWidth,C as getRowHeight,y as isCompatibleColumn,$ as isRichContent,V as isTransformTreeType,U as parseMergeField,x as parseRichContent,F as useIhoTableFormEvent,w as useUUIDMap};
1
+ import{reactive as e,inject as n,unref as t,toRaw as r,createVNode as i}from"vue";import{jsonParse as o,arrayed as u,findAncestor as l}from"../../../../shared/utils/index.js";import{promiseTimeout as c}from"@vueuse/shared";import{isNumber as a,isString as d,isObject as s,isArray as f,cloneDeep as m}from"lodash-es";import{InjectionIhoTableConfig as p,InjectionIhoTableEmits as v,IHO_TABLE_STRING_STATUS as g,IHO_TABLE_NUMBER_STATUS as E,IHO_TABLE_TREE_TYPE as I}from"../constants/index.js";function h(e){return console.warn(`[IhoTable]: ${e}`)}const T=Object.freeze({getCellType(e){var n;return((null==(n=e.settingObj)?void 0:n.attr)||e.formType||"DEFAULT").toUpperCase()}});function C(){var e,t,r;const i=n(p);return i||h("this function(getRowHeight) only can be used in setup environment"),null!=(r=null==(t=null==(e=null==i?void 0:i.value)?void 0:e.rowConfig)?void 0:t.height)?r:32}function R(e){const n=e.slice(2);return`${n[0].toLowerCase()}${n.slice(1)}`}function S(e){return`on${e[0].toUpperCase()}${e.slice(1)}`}function w(n,t=!0){const r=t?e(new Map):new Map;return{getItemFromUUID:function(e){return r.set(e,r.get(e)||n()).get(e)},setItemFromUUID:function(e,n){r.set(e,n)},removeItemFromUUID:function(e){r.delete(e)}}}async function O(e,n){return r()||await c(0),r()||function(){const n=+e.colWidth;return a(n)?n:64}();function r(){var r,i;return null==(i=null==(r=t(n))?void 0:r.getColumnByField(e.field))?void 0:i.renderWidth}}function F(e){const t=n(v);function i(){var n;return{$table:e.$table,value:e.row[e.column.field],row:e.row,column:{...e.column,...null==(n=e.column.editRender)?void 0:n.props},index:e.rowIndex>-1?e.rowIndex:e.$rowIndex}}function o(e={}){t("formChange",{...i(),...m(r(e))})}function u(e={}){t("formClick",{...i(),...m(r(e))})}return{emitFormChange:function(){o()},emitFormClick:function(){u()},emitFormChangeWithParams:o,emitFormClickWithParams:u}}const P=Object.freeze({createDefaultRenderCell:function(){return function(e,{row:n,column:t}){return[i("span",null,[n[t.field]])]}},createRenderEdit:function(e){return function({props:n},t){return e({...t,fieldItem:n||{},...F(t)})}},isEditableColumn(e,n){var t;return!1!==(null==(t=e.editConfig)?void 0:t.showIcon)&&n.editRender&&!1!==n.editRender.enabled},hasFilter(e){if(y(e))return!0;let n=e.fieldSetting;return d(n)&&(n=o(n||"")),s(n)&&((t=n).notParticipatingSearch!==g.POSITIVE&&"manual"===(null==(r=t.mapping)?void 0:r.type));var t,r},hasDateFiler(e){var n;return null==(n=null==e?void 0:e.filterSetting)?void 0:n.daterange}}),A=Object.freeze({isPositive:e=>e===E.POSITIVE||e===g.POSITIVE,isNegative:e=>e===E.NEGATIVE||e===g.NEGATIVE,notPositive:e=>e!==E.POSITIVE&&e!==g.POSITIVE,notNegative:e=>e!==E.NEGATIVE&&e!==g.NEGATIVE}),$=(e,n)=>({$event:t,column:r})=>{var i;if(!u(e).includes(null==(i=r.editRender)?void 0:i.name))return!0;const o=null==t?void 0:t.target;return!s(o)||!l(o,n)};function N(e){return[I.TRANSFORM_WITH_SPAN_METHOD,I.TRANSFORM_TREE_TYPE].includes(`${e.isTree}`)}function b(e){return d(e)&&!!e.match(/^###\{[^{}]+}$/)}function V(e){try{return JSON.parse(e.replace(/^###/,""))}catch(e){return{}}}function x(e,n){if(e.$__SEPARATE||!n.editRender||!n.editRender.props)return e[n.field];const{fieldSetting:t}=n.editRender.props;if(!d(t))return e[n.field];const{mergedFeildExpression:r}=o(t);return r&&d(r)?r.replace(/#{(.+?)}/g,(function(n,t){let r=t?e[t.trim()]:null;b(r)&&(r=V(r).change_text);return r||(null==r?"--":r)})):e[n.field]}const U=["SEARCH","SELECT","RADIO","CHECKBOX"];function y(e){return e.notParticipatingSearch===E.NEGATIVE&&U.includes(T.getCellType(e))&&f(e.options)&&e.options.length}export{P as IhoTableRenderHelper,A as IhoTableStatusHelper,T as IhoTableUtils,h as IhoTableWarn,$ as createIhoTableClearActivedInterceptor,R as eventListener2EventName,S as eventName2EventListener,O as getColumnRenderWidth,C as getRowHeight,y as isCompatibleColumn,b as isRichContent,N as isTransformTreeType,x as parseMergeField,V as parseRichContent,F as useIhoTableFormEvent,w as useUUIDMap};