cnhis-design-vue 3.1.53-hotfix.0 → 3.1.53-release.1

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 (130) hide show
  1. package/es/components/annotation-edit/src/AnnotationEdit.js +1 -1
  2. package/es/components/big-table/src/components/edit-form/edit-separate.vue.d.ts +4 -4
  3. package/es/components/big-table/src/hooks/useEdit.d.ts +4 -4
  4. package/es/components/big-table/src/hooks/useSeparateRow.d.ts +4 -4
  5. package/es/components/button-print/src/utils/dialog.d.ts +2 -2
  6. package/es/components/button-print/src/utils/print.d.ts +14 -13
  7. package/es/components/button-print/src/utils/print.js +1 -1
  8. package/es/components/callback/src/components/render/popupMaps.d.ts +69 -6
  9. package/es/components/card-reader-sdk/src/types/index.d.ts +3 -3
  10. package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
  11. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  12. package/es/components/form-config/index.d.ts +98 -26
  13. package/es/components/form-config/src/FormConfig.vue.d.ts +99 -27
  14. package/es/components/form-config/src/FormConfig.vue2.js +1 -1
  15. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +30 -6
  16. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +48 -12
  17. package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -1
  18. package/es/components/form-render/index.d.ts +30 -6
  19. package/es/components/form-render/index.js +1 -1
  20. package/es/components/form-render/src/FormRender.vue.d.ts +31 -7
  21. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  22. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +31 -7
  23. package/es/components/form-render/src/components/renderer/combination.js +1 -1
  24. package/es/components/form-render/src/components/renderer/index.js +1 -1
  25. package/es/components/form-render/src/components/renderer/inputNumber.d.ts +5 -5
  26. package/es/components/form-render/src/components/renderer/{levelSearchCascader.d.ts → levelSearchCascader/index.d.ts} +3 -5
  27. package/es/components/form-render/src/components/renderer/levelSearchCascader/index.js +1 -0
  28. package/es/components/form-render/src/components/renderer/searchCascade.d.ts +3 -3
  29. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  30. package/es/components/form-render/src/components/renderer/select.d.ts +4 -4
  31. package/es/components/form-render/src/components/renderer/select.js +1 -1
  32. package/es/components/form-render/src/constants/index.d.ts +3 -2
  33. package/es/components/form-render/src/hooks/index.d.ts +0 -2
  34. package/es/components/form-render/src/hooks/index.js +1 -1
  35. package/es/components/form-render/src/hooks/useAnchor.d.ts +3 -3
  36. package/es/components/form-render/src/hooks/useCommonInjection.d.ts +2 -2
  37. package/es/components/form-render/src/hooks/useFieldListAdaptor.d.ts +2 -2
  38. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  39. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +10 -2
  40. package/es/components/form-render/src/hooks/useFormContext.d.ts +3 -3
  41. package/es/components/form-render/src/hooks/useFormContext.js +1 -1
  42. package/es/components/form-render/src/hooks/useFormItemDeps.d.ts +3 -3
  43. package/es/components/form-render/src/hooks/useFormRenderLifeCycle.d.ts +9 -1
  44. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +5 -5
  45. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  46. package/es/components/form-render/src/types/fieldItem.d.ts +4 -26
  47. package/es/components/form-render/src/types/index.d.ts +7 -14
  48. package/es/components/form-render/src/utils/index.d.ts +1 -2
  49. package/es/components/form-render/src/utils/index.js +1 -1
  50. package/es/components/form-render/src/utils/schema.d.ts +2 -2
  51. package/es/components/form-render/src/utils/schema.js +1 -1
  52. package/es/components/guide/src/renderer.js +1 -1
  53. package/es/components/iho-table/index.d.ts +39 -0
  54. package/es/components/iho-table/src/IhoTable.vue.d.ts +40 -0
  55. package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
  56. package/es/components/iho-table/src/constants/index.d.ts +4 -1
  57. package/es/components/iho-table/src/constants/index.js +1 -1
  58. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +2 -2
  59. package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +2 -2
  60. package/es/components/iho-table/src/plugins/defaultValuePlugin.js +1 -1
  61. package/es/components/iho-table/src/plugins/index.js +1 -1
  62. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +2 -2
  63. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +1 -1
  64. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.d.ts +1 -0
  65. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js +1 -0
  66. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.d.ts +552 -0
  67. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.js +1 -0
  68. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue2.js +1 -0
  69. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +4 -1
  70. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  71. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  72. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +2 -2
  73. package/es/components/iho-table/src/plugins/wordbookSettingPlugin.d.ts +1 -0
  74. package/es/components/iho-table/src/plugins/wordbookSettingPlugin.js +1 -0
  75. package/es/components/iho-table/src/types/index.d.ts +7 -2
  76. package/es/components/iho-table/src/types/pluginType.d.ts +3 -3
  77. package/es/components/iho-table/style/index.css +1 -1
  78. package/es/components/index.css +1 -1
  79. package/es/components/index.d.ts +1 -0
  80. package/es/components/index.js +1 -1
  81. package/es/components/info-header/index.d.ts +97 -29
  82. package/es/components/info-header/src/InfoHeader.vue.d.ts +98 -30
  83. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +9 -5
  84. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +10 -6
  85. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +41 -13
  86. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +30 -6
  87. package/es/components/keyboard/src/Keyboard.vue2.js +1 -1
  88. package/es/components/search-cascader/index.d.ts +23 -3
  89. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +24 -4
  90. package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
  91. package/es/components/search-cascader/src/components/ClearIcon.vue.js +1 -0
  92. package/es/components/shortcut-setter/index.d.ts +33 -9
  93. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +34 -10
  94. package/es/components/steps-wheel/src/StepsWheel.vue2.js +1 -1
  95. package/es/components/time-picker/src/TimePicker.vue2.js +1 -1
  96. package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +4 -4
  97. package/es/shared/components/SlotRender/SlotRender.d.ts +5 -5
  98. package/es/shared/hooks/index.d.ts +3 -0
  99. package/es/shared/hooks/index.js +1 -1
  100. package/es/shared/hooks/selectHooks/index.d.ts +4 -0
  101. package/es/shared/hooks/selectHooks/index.js +1 -0
  102. package/es/shared/hooks/selectHooks/useOptionFiltered.d.ts +10 -0
  103. package/es/shared/hooks/selectHooks/useOptionFiltered.js +1 -0
  104. package/es/shared/hooks/selectHooks/useSearchContent.d.ts +6 -0
  105. package/es/shared/hooks/selectHooks/useSearchContent.js +1 -0
  106. package/es/shared/hooks/selectHooks/useSelectAllowModify.d.ts +23 -0
  107. package/es/shared/hooks/selectHooks/useSelectAllowModify.js +1 -0
  108. package/es/shared/hooks/selectHooks/useSelectRenders.d.ts +19 -0
  109. package/es/shared/hooks/selectHooks/useSelectRenders.js +1 -0
  110. package/es/shared/hooks/{useAsyncQueue.d.ts → useAsyncQueue/index.d.ts} +7 -15
  111. package/es/shared/hooks/useAsyncQueue/index.js +1 -0
  112. package/es/shared/hooks/useAsyncQueue/types.d.ts +20 -0
  113. package/es/shared/hooks/useAsyncQueue/types.js +1 -0
  114. package/es/shared/hooks/useDateTime.d.ts +2 -2
  115. package/es/shared/hooks/useFormRequest/index.d.ts +24 -0
  116. package/es/shared/hooks/useFormRequest/index.js +1 -0
  117. package/es/shared/hooks/useFormRequest/types.d.ts +39 -0
  118. package/es/shared/hooks/useFormRequest/types.js +1 -0
  119. package/es/shared/hooks/useLevelSearchCascader.d.ts +31 -0
  120. package/es/shared/hooks/useLevelSearchCascader.js +1 -0
  121. package/es/shared/package.json.js +1 -1
  122. package/es/shared/types/business.d.ts +24 -0
  123. package/es/shared/types/index.d.ts +1 -1
  124. package/package.json +2 -2
  125. package/es/components/form-render/src/components/renderer/levelSearchCascader.js +0 -1
  126. package/es/components/form-render/src/hooks/useFormAsyncQueue.d.ts +0 -16
  127. package/es/components/form-render/src/hooks/useFormAsyncQueue.js +0 -1
  128. package/es/components/form-render/src/hooks/useFormRequest.d.ts +0 -26
  129. package/es/components/form-render/src/hooks/useFormRequest.js +0 -1
  130. package/es/shared/hooks/useAsyncQueue.js +0 -1
@@ -1,22 +1,22 @@
1
- import { AnyObject, Func } from '../../../../../es/shared/types';
1
+ import { FormRequestDefine } from '../../../../../es/shared/hooks';
2
+ import { AnyObject, FormWordbook, AnyFn } from '../../../../../es/shared/types';
2
3
  import { Ref } from 'vue';
3
- import { FormWordbook, RecommendIds, UrlConfig } from '../../../../../es/components/form-render';
4
+ import { UrlConfig } from '../../../../../es/components/form-render';
4
5
  import { RecommendItem } from '../../../../../es/components/recommend-search/src/types';
5
6
  declare type UseOptionHooks = Partial<Record<'onRequestConfigChange' | 'onDepsChange', (payload: {
6
7
  fetchData: (content?: string | null, otherParams?: AnyObject) => any;
7
8
  labelKey: string;
8
9
  valueKey: string;
9
10
  }) => any>>;
10
- export declare const searchContentMatcher: (searchContent: string, label: string) => RegExpMatchArray | null;
11
11
  export declare function useRecommendOptions(props: {
12
12
  recommend: boolean;
13
13
  commonList?: RecommendItem[];
14
14
  recentList?: RecommendItem[];
15
- getRecommendInfo?: () => RecommendIds;
15
+ getRecommendInfo?: () => FormRequestDefine.RecommendIds;
16
16
  recommendCache: boolean;
17
17
  commonNum: number;
18
18
  recentNum: number;
19
- }, options: Ref<AnyObject[]>, emit: Func, labelKey: Ref<string>, valueKey: Ref<string>): {
19
+ }, options: Ref<AnyObject[]>, emit: AnyFn, labelKey: Ref<string>, valueKey: Ref<string>): {
20
20
  postRecommend: (value: unknown) => Promise<void>;
21
21
  getRecommend: (content?: string) => Promise<void>;
22
22
  sortedOptions: import("vue").ComputedRef<AnyObject[]>;
@@ -1 +1 @@
1
- import{checkInSetupEnv as e,arrayed as l,jsonParse as n,keywordMatcher as u}from"../../../../shared/utils/index.js";import{useForm as t}from"@formily/vue";import{useMemoize as a}from"@vueuse/core";import{identity as o,uniqBy as r,isEqual as i,isString as v,omit as s,isArray as c,isFunction as m}from"lodash-es";import{computed as f,inject as d,ref as y,watch as p,toRaw as h}from"vue";import"../../index.js";import{InjectionAsyncQueue as g,InjectionFormLifeCycleCaller as w,InjectionFormItemDepsCollector as K}from"../constants/index.js";import{createUrlConfigParams as C,formRenderLog as b}from"../utils/index.js";import{useFormField as k}from"./useFormField.js";import{useFormRequest as R}from"./useFormRequest.js";function F(e,l){const n=y();return f({get:()=>n.value?n.value:e[l],set(e){n.value=e}})}const q=(()=>{const e=a((e=>new RegExp(`(.*)${e.split("").map((e=>`(${function(e){return e.match(/[()\[\]{}$^\/]/)?"\\"+e:e}(e)})`)).join("(.*)")}(.*)`)),{getKey:o});return(l,n)=>n.match(e(l))})();function O(){const e=y();return{searchContent:e,optionSearchFilter:function(l,n,t){if(!e.value)return l;const a=c(t)?t.filter((e=>e&&v(e))):[];return l.filter((l=>function(l,n,t){if(!e.value)return!0;const a=l?l[n]:"";return!!v(a)&&(!!q(e.value,a)||!!u(e.value,l.keyword)||!!t.length&&t.some((n=>v(l[n])&&l[n].includes(e.value))))}(l,n,a)))}}}function j(e,l,u,t,a){const o=F(e,"commonList"),i=F(e,"recentList"),{searchContent:v,optionSearchFilter:c}=O();function y(e){return n(e.itemObj)}const p=f((()=>{var e,l;return null!=(l=null==(e=o.value)?void 0:e.map(y))?l:[]})),h=f((()=>{var e,l;return null!=(l=null==(e=i.value)?void 0:e.map(y))?l:[]})),w=f((()=>{if(!e.recommend||!p.value.length&&!h.value.length)return l.value;const n=r(p.value.concat(h.value),(e=>e[a.value])),u=l.value.filter((e=>n.every((function(l){return l[a.value]!==e[a.value]}))));return[...c(n,t.value),...u]})),{getRecommendRequestInfo:K,getHttpInstance:C}=R();function b(l){const{url:n,getRecommendIds:u}=K(),t=m(u)?u():{},a=m(e.getRecommendInfo)?e.getRecommendInfo():{};return{url:n[l],info:Object.assign({},t,a)}}const{fieldKey:q,field:j}=k(),I=d(g);return{postRecommend:async function(l){if(!e.recommend)return;const n=C();if(!n)return;const{url:t,info:o}=b("post"),r=w.value.find((e=>e[a.value]===l));r&&u("postRecommend",await n.post(t,{...o,keyword:"",itemId:a.value,itemObj:JSON.stringify(r)}))},getRecommend:async function(l){if(!e.recommend)return;if(v.value=l,o.value&&i.value&&e.recommendCache)return;const n=await I.addAsync(function(l,n){const{url:u,info:o}=b("get");return{url:u,method:"get",key:l,cache:n,params:{...o,recNum:Math.max(e.commonNum,e.recentNum),keyword:""},payload:{field:j.value,labelKey:t.value,valueKey:a.value}}}(q.value,e.recommendCache)),{commonly:u,recently:r}=n.reduce(((e,l)=>("commonly"===l.type?e.commonly.push(s(l,["type"])):"recently"===l.type&&e.recently.push(s(l,["type"])),e)),{commonly:[],recently:[]});o.value=u.slice(0,e.commonNum),i.value=r.slice(0,e.recentNum)},sortedOptions:w}}function I(l,n,u){e();const t=d(g),a=d(w),o=f((()=>{var e,n,u;return null!=(u=null!=(n=null==(e=l.urlConfig)?void 0:e.nameKey)?n:l.labelField)?u:"text"})),r=f((()=>{var e,n,u;return null!=(u=null!=(n=null==(e=l.urlConfig)?void 0:e.valueKey)?n:l.valueField)?u:"value"})),s=f((()=>{var e,n;return null!=(n=null==(e=l.urlConfig)?void 0:e.showKey)?n:l.showField})),{searchContent:c,optionSearchFilter:m}=O(),R=y(null),{field:F,fieldKey:q}=k(),j=y(!1),I=async function(e,n){if(c.value=e||"",!l.urlConfig)return R.value=null;try{j.value=!0;const e={field:F.value,labelKey:o.value,valueKey:r.value},u=await t.addAsync(await C({config:{...l.urlConfig,payload:e,params:{...l.urlConfig.params,...n}},cache:l.requestCache,field:F.value}));h(R.value)!==u&&(R.value=u,a("afterOptionInit",[q.value,R.value,e]))}catch(e){v(e)&&b(e)}finally{j.value=!1}},x=f((()=>R.value?m(R.value,o.value):Array.isArray(l.options)?m(l.options,o.value):[])),D=f((()=>R.value||l.options||[])),A=d(K);return p((()=>l.urlConfig),((e,t)=>{if(i(e,t))return;if(R.value=null,!e)return R.value=null;const a={fetchData:I,labelKey:o.value,valueKey:r.value},{onRequestConfigChange:v,onDepsChange:s}=u||{};A.setDeps(q.value,e.dependKey||[],(async()=>{R.value=null,n.value=null,l.lazyRequest||(s?s(a):I())})),!n.value&&l.lazyRequest||(v?v(a):I())}),{immediate:!0}),{labelKey:o,loading:j,showKey:s,valueKey:r,remoteOptions:R,filterOptions:x,fullOptions:D,fetchData:I,searchContent:c}}function x(n,u,a){e();const o=d(g),r=d(w),s=t(),c=f((()=>{var e;const u=l(null==(e=n.wordbook)?void 0:e.show_key)[0];return v(u)?u:null})),m=f((()=>{var e,l,u,t;const a=null==(l=null==(e=n.wordbook)?void 0:e.render_key)?void 0:l[0];return v(a)?a:null!=(t=null!=(u=c.value)?u:n.labelField)?t:"text"})),C=f((()=>{var e,l,u;return null!=(u=null!=(l=null==(e=n.wordbook)?void 0:e.value_key)?l:n.valueField)?u:"value"})),F=f((()=>{var e;return(null==(e=n.wordbook)?void 0:e.search_key)||[]})),q=f((()=>{var e;return null!=(e=c.value)?e:n.showField})),{searchContent:j,optionSearchFilter:I}=O(),x=y(null),{fieldKey:D,field:A}=k(),{getSearchRequestInfo:S}=R(),N=y(!1),_=async function(e,l){if(j.value=e||"",!n.autograph||!n.wordbook)return x.value=null;try{N.value=!0;const e={field:A.value,labelKey:m.value,valueKey:C.value},u=await o.addAsync(function(e,l,u,t,a){var o,r,i;const v={autograph:l,wordbookId:e.id,wordbookType:e.type,fieldKeys:e.search_key,keyword:"",page:1,...a};if(null==(o=e.queryParams)?void 0:o.length){const l=null!=(i=null==(r=s.value)?void 0:r.getFormState().values)?i:{};e.queryParams.forEach((e=>{v[e]=l[e]}))}return{...S(),params:v,key:u,cache:n.requestCache,payload:t}}(n.wordbook,n.autograph,D.value,e,l));h(x.value)!==u&&(x.value=u,r("afterOptionInit",[D.value,x.value,e]))}catch(e){v(e)&&b(e)}finally{N.value=!1}},z=f((()=>x.value?I(x.value,m.value,F.value):Array.isArray(n.options)?I(n.options,m.value):[])),P=f((()=>x.value||n.options||[])),$=d(K);return p((()=>n.wordbook),((e,l)=>{if(i(e,l))return;if(x.value=null,!e)return x.value=null;const t={fetchData:_,labelKey:m.value,valueKey:C.value},{onRequestConfigChange:o,onDepsChange:r}=a||{};$.setDeps(D.value,e.queryParams||[],(async()=>{x.value=null,r?r(t):_()})),!u.value&&n.lazyRequest||(o?o(t):_())}),{immediate:!0}),{labelKey:m,showKey:q,loading:N,remoteOptions:x,valueKey:C,filterOptions:z,fullOptions:P,fetchData:_,searchContent:j}}export{q as searchContentMatcher,x as useAutographOptions,j as useRecommendOptions,I as useUrlConfigOptions};
1
+ import{checkInSetupEnv as e,arrayed as l,jsonParse as n}from"../../../../shared/utils/index.js";import{uniqBy as o,isEqual as t,isString as u,omit as a,isFunction as r}from"lodash-es";import"naive-ui";import{computed as i,inject as s,ref as v,watch as c,toRaw as m}from"vue";import"@vueuse/core";import"date-fns";import{useFormRequest as d}from"../../../../shared/hooks/useFormRequest/index.js";import"@vueuse/shared";import{useOptionFiltered as f}from"../../../../shared/hooks/selectHooks/useOptionFiltered.js";import{useSearchContent as y}from"../../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{useForm as p}from"@formily/vue";import"../../index.js";import{InjectionAsyncQueue as h,InjectionFormLifeCycleCaller as g,InjectionFormItemDepsCollector as k}from"../constants/index.js";import{createUrlConfigParams as K,formRenderLog as w}from"../utils/index.js";import{useFormField as C}from"./useFormField.js";function b(e,l){const n=v();return i({get:()=>n.value?n.value:e[l],set(e){n.value=e}})}function O(e,l,t,u,v){const c=b(e,"commonList"),m=b(e,"recentList"),{searchContent:f,optionSearchFilter:p}=y();function g(e){return n(e.itemObj)}const k=i((()=>{var e,l;return null!=(l=null==(e=c.value)?void 0:e.map(g))?l:[]})),K=i((()=>{var e,l;return null!=(l=null==(e=m.value)?void 0:e.map(g))?l:[]})),w=i((()=>{if(!e.recommend||!k.value.length&&!K.value.length)return l.value;const n=o(k.value.concat(K.value),(e=>e[v.value])),t=l.value.filter((e=>n.every((function(l){return l[v.value]!==e[v.value]}))));return[...p(n,u.value),...t]})),{getRecommendRequestInfo:O,getHttpInstance:R}=d();function q(l){const{url:n,getRecommendIds:o}=O(),t=r(o)?o():{},u=r(e.getRecommendInfo)?e.getRecommendInfo():{};return{url:n[l],info:Object.assign({},t,u)}}const{fieldKey:F,field:j}=C(),I=s(h);return{postRecommend:async function(l){if(!e.recommend)return;const n=R();if(!n)return;const{url:o,info:u}=q("post"),a=w.value.find((e=>e[v.value]===l));a&&t("postRecommend",await n.post(o,{...u,keyword:"",itemId:v.value,itemObj:JSON.stringify(a)}))},getRecommend:async function(l){if(!e.recommend)return;if(f.value=l,c.value&&m.value&&e.recommendCache)return;const n=await I.addAsync(function(l,n){const{url:o,info:t}=q("get");return{url:o,method:"get",key:l,cache:n,params:{...t,recNum:Math.max(e.commonNum,e.recentNum),keyword:""},payload:{field:j.value,labelKey:u.value,valueKey:v.value}}}(F.value,e.recommendCache)),{commonly:o,recently:t}=n.reduce(((e,l)=>("commonly"===l.type?e.commonly.push(a(l,["type"])):"recently"===l.type&&e.recently.push(a(l,["type"])),e)),{commonly:[],recently:[]});c.value=o.slice(0,e.commonNum),m.value=t.slice(0,e.recentNum)},sortedOptions:w}}function R(l,n,o){e();const a=s(h),r=s(g),d=i((()=>{var e,n,o;return null!=(o=null!=(n=null==(e=l.urlConfig)?void 0:e.nameKey)?n:l.labelField)?o:"text"})),y=i((()=>{var e,n,o;return null!=(o=null!=(n=null==(e=l.urlConfig)?void 0:e.valueKey)?n:l.valueField)?o:"value"})),p=i((()=>{var e,n;return null!=(n=null==(e=l.urlConfig)?void 0:e.showKey)?n:l.showField})),{remoteOptions:b,filterOptions:O,fullOptions:R,searchContent:q}=f(l,d),{field:F,fieldKey:j}=C(),I=v(!1),x=async function(e,n){if(q.value=e||"",!l.urlConfig)return b.value=null;try{I.value=!0;const e={field:F.value,labelKey:d.value,valueKey:y.value},o=await a.addAsync(await K({config:{...l.urlConfig,payload:e,params:{...l.urlConfig.params,...n}},cache:l.requestCache,field:F.value}));m(b.value)!==o&&(b.value=o,r("afterOptionInit",[j.value,b.value,e]))}catch(e){u(e)&&w(e)}finally{I.value=!1}},D=s(k);return c((()=>l.urlConfig),((e,u)=>{if(t(e,u))return;if(b.value=null,!e)return b.value=null;const a={fetchData:x,labelKey:d.value,valueKey:y.value},{onRequestConfigChange:r,onDepsChange:i}=o||{};D.setDeps(j.value,e.dependKey||[],(async()=>{b.value=null,n.value=null,l.lazyRequest||(i?i(a):x())})),!n.value&&l.lazyRequest||(r?r(a):x())}),{immediate:!0}),{labelKey:d,loading:I,showKey:p,valueKey:y,remoteOptions:b,filterOptions:O,fullOptions:R,fetchData:x,searchContent:q}}function q(n,o,a){e();const r=s(h),y=s(g),K=p(),b=i((()=>{var e;const o=l(null==(e=n.wordbook)?void 0:e.show_key)[0];return u(o)?o:null})),O=i((()=>{var e,l,o,t;const a=null==(l=null==(e=n.wordbook)?void 0:e.render_key)?void 0:l[0];return u(a)?a:null!=(t=null!=(o=b.value)?o:n.labelField)?t:"text"})),R=i((()=>{var e,l,o;return null!=(o=null!=(l=null==(e=n.wordbook)?void 0:e.value_key)?l:n.valueField)?o:"value"})),q=i((()=>{var e;return(null==(e=n.wordbook)?void 0:e.search_key)||[]})),F=i((()=>{var e;return null!=(e=b.value)?e:n.showField})),{fieldKey:j,field:I}=C(),{getSearchRequestInfo:x}=d(),{searchContent:D,remoteOptions:N,filterOptions:S,fullOptions:_}=f(n,O,q),z=v(!1),A=async function(e,l){if(D.value=e||"",!n.autograph||!n.wordbook)return N.value=null;try{z.value=!0;const e={field:I.value,labelKey:O.value,valueKey:R.value},o=await r.addAsync(function(e,l,o,t,u){var a,r,i;const s={autograph:l,wordbookId:e.id,wordbookType:e.type,fieldKeys:e.search_key,keyword:"",page:1,...u};if(null==(a=e.queryParams)?void 0:a.length){const l=null!=(i=null==(r=K.value)?void 0:r.getFormState().values)?i:{};e.queryParams.forEach((e=>{s[e]=l[e]}))}return{...x(),params:s,key:o,cache:n.requestCache,payload:t}}(n.wordbook,n.autograph,j.value,e,l));m(N.value)!==o&&(N.value=o,y("afterOptionInit",[j.value,N.value,e]))}catch(e){u(e)&&w(e)}finally{z.value=!1}},H=s(k);return c((()=>n.wordbook),((e,l)=>{if(t(e,l))return;if(N.value=null,!e)return N.value=null;const u={fetchData:A,labelKey:O.value,valueKey:R.value},{onRequestConfigChange:r,onDepsChange:i}=a||{};H.setDeps(j.value,e.queryParams||[],(async()=>{N.value=null,i?i(u):A()})),!o.value&&n.lazyRequest||(r?r(u):A())}),{immediate:!0}),{labelKey:O,showKey:F,loading:z,remoteOptions:N,valueKey:R,filterOptions:S,fullOptions:_,fetchData:A,searchContent:D}}export{q as useAutographOptions,O as useRecommendOptions,R as useUrlConfigOptions};
@@ -1,7 +1,8 @@
1
- import { AnyObject, ArrayAble, BindEventSettingItem } from '../../../../../es/shared/types';
1
+ import { FormRequestDefine } from '../../../../../es/shared/hooks';
2
+ import { AnyObject, ArrayAble, BindEventSettingItem, FormWordbook } from '../../../../../es/shared/types';
2
3
  import { SchemaEffectTypes, SchemaTypes } from '@formily/vue';
3
4
  import { CSSProperties, VNode } from 'vue';
4
- import { DependKeyType, FormCommonState, FormRequestType } from '../../../../../es/components/form-render';
5
+ import { DependKeyType, FormCommonState } from '../../../../../es/components/form-render';
5
6
  declare type FieldBusinessType = 'password' | 'id_card' | 'age' | 'age_unit' | 'mobile' | 'telephone' | 'email' | 'sex' | 'birthday' | 'bank_card' | 'website' | 'gestational_weeks' | 'gestational_stage' | 'customer_name';
6
7
  declare type HtmlType = 'INPUT' | 'TEXTAREA' | 'SELECT' | 'LINEBAR' | 'LINE_BREAKS' | 'INPUT_NUMBER' | 'REMOTE_SEARCH' | 'DATE' | 'LEVEL_SEARCH_CASCADER' | 'SEARCH_CASCADER' | 'COMBINATION' | 'RADIO' | 'CHECKBOX' | 'SWITCH' | 'SLIDER' | 'COMPLEX' | 'SEARCH' | 'PHONE_TYPE' | 'IDCARD_TYPE' | 'SEARCH_MORE' | 'DIGITAL' | 'CHECKBOX_BLOCK' | 'RADIO_BLOCK' | 'DATE-INPUT' | 'DATETIME-INPUT' | 'SWITCH_COMPONENT' | 'SLIDER_COMPONENT' | 'LEVEL_SEARCH_CASCADE' | 'SEARCH_CASCADE' | ({} & string);
7
8
  declare type ValidateType = 'mobile' | 'integer' | 'number' | 'id_card' | 'regular' | string;
@@ -47,7 +48,7 @@ export interface FormRenderer {
47
48
  export declare type UrlConfig = {
48
49
  url: string;
49
50
  } & Partial<{
50
- method: FormRequestType;
51
+ method: FormRequestDefine.RequestType;
51
52
  nameKey: string;
52
53
  valueKey: string;
53
54
  showKey: string;
@@ -74,29 +75,6 @@ interface ReactionType {
74
75
  };
75
76
  [key: string]: any;
76
77
  }
77
- export declare type FormWordbook = Partial<{
78
- level_num: number;
79
- id: string;
80
- name: string;
81
- render_key: string[];
82
- search_key: string[];
83
- value_key: string;
84
- queryParams: string[];
85
- primary_key: string;
86
- type: string;
87
- level_key: string;
88
- link_key: string;
89
- link_key_split: string;
90
- show_key: string[] | string;
91
- conObj: AnyObject[];
92
- conObjFirstLevel: AnyObject[];
93
- setting: Partial<{
94
- cascading: {
95
- 'form.name': string;
96
- value: string;
97
- }[];
98
- }>;
99
- }>;
100
78
  export declare type CombinationItemDeletableFn = (itemData: AnyObject, index: number) => boolean;
101
79
  export declare type FieldItem = {
102
80
  val_key: string;
@@ -1,11 +1,10 @@
1
- import { AsyncQueue } from '../../../../../es/shared/hooks';
1
+ import { FormRequestDefine } from '../../../../../es/shared/hooks';
2
2
  import { AnyObject, FormLowCodeReactions, FormOperationalConfig, UndefinedAble } from '../../../../../es/shared/types';
3
- import { DataField, Field, Form } from '@formily/core';
3
+ import { DataField, Field, Form, GeneralField } from '@formily/core';
4
4
  import { ISchema } from '@formily/json-schema/esm/types';
5
5
  import { Component, FunctionalComponent } from 'vue';
6
6
  import { FIELD_BUSINESS_TYPE } from '../../../../../es/components/form-render/src/constants';
7
7
  import { FieldItem } from '../types';
8
- import { RequestInstance } from '../hooks';
9
8
  export * from './fieldItem';
10
9
  export declare type FormCommonState = '0' | '1';
11
10
  export interface FieldVisitorContext {
@@ -15,16 +14,6 @@ export interface FieldVisitorContext {
15
14
  insertAfter(f: FieldItem | FieldItem[]): void;
16
15
  }
17
16
  export declare type FieldVisitor = Record<string, (context: FieldVisitorContext) => void>;
18
- export declare type FormRequestType = 'post' | 'get' | 'patch' | 'delete' | 'put';
19
- export interface FormAsyncQueueItem {
20
- key: any;
21
- cache?: boolean;
22
- url: string;
23
- method?: FormRequestType;
24
- params?: AnyObject;
25
- payload?: AnyObject;
26
- }
27
- export declare type FormAsyncQueue = AsyncQueue<FormAsyncQueueItem, any, AnyObject[]>;
28
17
  export declare type AgeContext = Record<'age' | 'day' | 'month' | 'year' | 'hours', number>;
29
18
  export declare type IdCardParseInfo = Record<'sex' | 'birthday', string> & AgeContext;
30
19
  export declare type FormRenderExpose = {
@@ -121,6 +110,10 @@ export declare type DependKeyType = string | Record<string, string> | Array<{
121
110
  } | string>;
122
111
  export declare type FormRenderLifeCycle = Partial<{
123
112
  onSetup(): void;
113
+ beforeSetValue(fieldKey: string, value: unknown, payload: {
114
+ field: GeneralField;
115
+ oldValue: unknown;
116
+ }): any;
124
117
  beforeRequest(fieldKey: string, params?: AnyObject, payload?: AnyObject): UndefinedAble<AnyObject> | void;
125
118
  afterRequest(fieldKey: string, res?: any, payload?: AnyObject): AnyObject[];
126
119
  afterOptionInit(fieldKey: string, options: AnyObject[], payload?: AnyObject): void;
@@ -141,7 +134,7 @@ export declare type FormRenderProps = Partial<{
141
134
  uuid: string;
142
135
  lifeCycle: FormRenderLifeCycle;
143
136
  businessFormatter: FormBusinessFormatter;
144
- requestInstance: RequestInstance;
137
+ requestInstance: FormRequestDefine.RequestInstance;
145
138
  enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
146
139
  lowCodeReactions: FormLowCodeReactions.Config[];
147
140
  linebarAutoHidden: boolean;
@@ -13,7 +13,6 @@ export declare function createSlot(renderer: unknown, props: AnyObject, defaultR
13
13
  default(): any;
14
14
  };
15
15
  export declare function createInputSlot(props: AnyObject, defaultRenderer?: (v: unknown) => unknown[]): import("vue").ComputedRef<Record<string, FunctionalComponent<{}, {}>>>;
16
- export declare function presetRequestHandler(res: unknown): AnyObject[];
17
16
  export declare function validateMessageParser(message: string, fieldItem: Omit<FieldItem, 'reactions'>): string;
18
17
  export declare function combineExtendKey(fieldList: FieldItem[], values: AnyObject): AnyObject;
19
18
  export declare function splitExtendKey(fieldList: FieldItem[], values: AnyObject): AnyObject;
@@ -28,7 +27,7 @@ export declare function createUrlConfigParams({ config, field, cache }: {
28
27
  key: string;
29
28
  cache: boolean | undefined;
30
29
  url: string;
31
- method?: import("../../../../../es/components/form-render").FormRequestType | undefined;
30
+ method?: import("../../..").FormRequestDefine.RequestType | undefined;
32
31
  nameKey?: string | undefined;
33
32
  valueKey?: string | undefined;
34
33
  showKey?: string | undefined;
@@ -1 +1 @@
1
- import{inject as e,provide as t,computed as n,createVNode as r,Fragment as o}from"vue";import{arrayed as c}from"../../../../shared/utils/index.js";import{isGeneralField as i,isField as s}from"@formily/core";import{Path as u}from"@formily/path";import{HelpCircleSharp as f}from"@vicons/ionicons5";import{isObject as a}from"@vue/shared";import{useMemoize as l}from"@vueuse/core";import{isString as p,isFunction as m,omit as d}from"lodash-es";import{NTooltip as h,NIcon as y}from"naive-ui";import"../../index.js";import{NESTED_FORM_ITEM_TYPE as x}from"../constants/index.js";import"date-fns";import{traverseDependKey as g}from"./schema.js";export{assignClearBindVisited,assignUpdateValue,assignValueBindKey,createLinebarId,createObjSchema,createVisitedSetter,dotEscape,fieldKeyEscape,getParentLinebar,traverseDependKey,traverseSchema}from"./schema.js";function v(e){console.warn(`[FormRender]: ${e}`)}function j(e,t,n=["children","properties","suffixConfig"],r="val_key",o="default_val"){return function e(t,r){r.forEach((r=>{a(r)&&(null!=s(r)&&null==t[i(r)]&&u.setIn(t,i(r),s(r)),n.forEach((n=>{r[n]&&(t[i(r)]||(t[i(r)]={}),e(t[i(r)],c(r[n])))})))}))}(e,t),e;function i(e){return e[r]}function s(e){return e[o]}}function S(n,r){let o=e(n,null);return o||(o=r(),t(n,o)),o}function E(e){return p(e)?+e:e}function b(e,t,n){if(a(e)&&!m(e)){const n={};return Object.entries(e).forEach((([e,r])=>{m(r)&&(n[e]=()=>r(t))})),n}return{default:()=>m(e)?e(t):n?n(e):[e]}}function K(e,t){return n((()=>{const n={};return e.prefix&&(n.prefix=()=>r(o,null,[b(e.prefix,e,t).default()])),e.suffix&&(n.suffix=()=>r(o,null,[b(e.suffix,e,t).default()])),n}))}function w(e){if(!a(e))throw e;return t=e,Reflect.has(t,"map")&&Reflect.has(t,"result")?function(e){const{result:t,map:n}=e;if("SUCCESS"!==t)throw e;return n.rows}(e):function(e){return Reflect.has(e,"result")&&Reflect.has(e,"obj")}(e)?function(e){const{obj:t,result:n}=e;if("SUCCESS"!==n||!a(t))throw e;return Object.entries(t).reduce(((e,[t,n])=>(n.forEach((n=>e.push({...n,type:t}))),e)),[])}(e):function(e){return Reflect.has(e,"data")&&Reflect.has(e,"success")}(e)?function(e){const{data:t,success:n}=e;if(!n)throw e;return t}(e):[];var t}function R(e,t){return p(e)&&e?e.replace(/\$\{([^}]*)}/g,(function(e,n){const r=n.split("||");for(const e of r){const n=t[e.trim()];if(n)return n}return""})):""}function O(e){return e.reduce(((e,t)=>(p(t.extendKey)&&t.extendKey&&e.push(t),V(t)&&e.push(...O(t.children||[])),e)),[])}function k(e,t){const n=O(e);if(!n.length)return t;const r={},o=new Map;return Object.entries(t).forEach((([e,c])=>{const i=n.find((t=>t.val_key===e));if(!i)return r[e]=c;const{val_key:s,extendKey:u}=i,f=o.get(u)||{};o.set(u,f),f[s]=t[s]})),[...o.entries()].forEach((([e,t])=>{r[e]=JSON.stringify(t)})),r}function C(e,t){const n=O(e);if(!n.length)return t;const r=l((e=>{try{return a(t[e])?t[e]:JSON.parse(t[e])||{}}catch(e){return{}}})),o=d(t,n.map((e=>e.extendKey)));return n.forEach((({val_key:e,extendKey:t})=>{Reflect.has(o,e)||(o[e]=r(t)[e])})),o}function _(e){return e&&x.includes(e)}function V(e){return _(i(e)?e.componentType:e.html_type)}async function I({config:e,field:t,cache:n}){const r={},o=t.props.name.toString();try{g(e.dependKey||[],((e,n,o)=>{const c=t.query(e).take();if(!s(c)||o&&null==c.value)throw`缺少必须的参数=>${e}`;r[n]=c.value}))}catch(e){return Promise.reject(e)}return{...e,params:Object.assign({},e.params,r),key:o,cache:n}}function U(e,t){return r("section",{style:{display:"flex",alignItems:"center",gap:"4px"}},[e,t.desc?r(h,null,{trigger:()=>r(y,{component:f},null),default:()=>t.desc}):null])}export{k as combineExtendKey,K as createInputSlot,b as createSlot,I as createUrlConfigParams,v as formRenderLog,S as injectOrProvide,V as isNestedFieldType,_ as isNestedType,j as mergeDeepProperties,E as parseNumberFromMaybeString,w as presetRequestHandler,U as renderDescOption,C as splitExtendKey,R as validateMessageParser};
1
+ import{inject as e,provide as n,computed as t,createVNode as r,Fragment as o}from"vue";import{arrayed as i}from"../../../../shared/utils/index.js";import{isGeneralField as c,isField as u}from"@formily/core";import{Path as s}from"@formily/path";import{HelpCircleSharp as f}from"@vicons/ionicons5";import{isObject as a}from"@vue/shared";import{useMemoize as l}from"@vueuse/core";import{isString as p,isFunction as m,omit as d}from"lodash-es";import{NTooltip as h,NIcon as y}from"naive-ui";import"../../index.js";import{NESTED_FORM_ITEM_TYPE as x}from"../constants/index.js";import"date-fns";import{traverseDependKey as g}from"./schema.js";export{assignClearBindVisited,assignUpdateValue,assignValueBindKey,createLinebarId,createObjSchema,createVisitedSetter,dotEscape,fieldKeyEscape,getParentLinebar,traverseDependKey,traverseSchema}from"./schema.js";function v(e){console.warn(`[FormRender]: ${e}`)}function j(e,n,t=["children","properties","suffixConfig"],r="val_key",o="default_val"){return function e(n,r){r.forEach((r=>{a(r)&&(null!=u(r)&&null==n[c(r)]&&s.setIn(n,c(r),u(r)),t.forEach((t=>{r[t]&&(n[c(r)]||(n[c(r)]={}),e(n[c(r)],i(r[t])))})))}))}(e,n),e;function c(e){return e[r]}function u(e){return e[o]}}function K(t,r){let o=e(t,null);return o||(o=r(),n(t,o)),o}function E(e){return p(e)?+e:e}function b(e,n,t){if(a(e)&&!m(e)){const t={};return Object.entries(e).forEach((([e,r])=>{m(r)&&(t[e]=()=>r(n))})),t}return{default:()=>m(e)?e(n):t?t(e):[e]}}function k(e,n){return t((()=>{const t={};return e.prefix&&(t.prefix=()=>r(o,null,[b(e.prefix,e,n).default()])),e.suffix&&(t.suffix=()=>r(o,null,[b(e.suffix,e,n).default()])),t}))}function O(e,n){return p(e)&&e?e.replace(/\$\{([^}]*)}/g,(function(e,t){const r=t.split("||");for(const e of r){const t=n[e.trim()];if(t)return t}return""})):""}function S(e){return e.reduce(((e,n)=>(p(n.extendKey)&&n.extendKey&&e.push(n),I(n)&&e.push(...S(n.children||[])),e)),[])}function _(e,n){const t=S(e);if(!t.length)return n;const r={},o=new Map;return Object.entries(n).forEach((([e,i])=>{const c=t.find((n=>n.val_key===e));if(!c)return r[e]=i;const{val_key:u,extendKey:s}=c,f=o.get(s)||{};o.set(s,f),f[u]=n[u]})),[...o.entries()].forEach((([e,n])=>{r[e]=JSON.stringify(n)})),r}function V(e,n){const t=S(e);if(!t.length)return n;const r=l((e=>{try{return a(n[e])?n[e]:JSON.parse(n[e])||{}}catch(e){return{}}})),o=d(n,t.map((e=>e.extendKey)));return t.forEach((({val_key:e,extendKey:n})=>{Reflect.has(o,e)||(o[e]=r(n)[e])})),o}function w(e){return e&&x.includes(e)}function I(e){return w(c(e)?e.componentType:e.html_type)}async function $({config:e,field:n,cache:t}){const r={},o=n.props.name.toString();try{g(e.dependKey||[],((e,t,o)=>{const i=n.query(e).take();if(!u(i)||o&&null==i.value)throw`缺少必须的参数=>${e}`;r[t]=i.value}))}catch(e){return Promise.reject(e)}return{...e,params:Object.assign({},e.params,r),key:o,cache:t}}function B(e,n){return r("section",{style:{display:"flex",alignItems:"center",gap:"4px"}},[e,n.desc?r(h,null,{trigger:()=>r(y,{component:f},null),default:()=>n.desc}):null])}export{_ as combineExtendKey,k as createInputSlot,b as createSlot,$ as createUrlConfigParams,v as formRenderLog,K as injectOrProvide,I as isNestedFieldType,w as isNestedType,j as mergeDeepProperties,E as parseNumberFromMaybeString,B as renderDescOption,V as splitExtendKey,O as validateMessageParser};
@@ -1,4 +1,4 @@
1
- import { AnyObject, Func } from '../../../../../es/shared/types';
1
+ import { AnyObject, AnyFn } from '../../../../../es/shared/types';
2
2
  import { GeneralField } from '@formily/core';
3
3
  import { ISchema } from '@formily/json-schema/esm/types';
4
4
  import { Ref } from 'vue';
@@ -21,4 +21,4 @@ export declare function assignClearBindVisited(props: AnyObject, field: GeneralF
21
21
  [x: string]: any;
22
22
  };
23
23
  export declare function createObjSchema(properties: Record<string, ISchema>): ISchema;
24
- export declare function createVisitedSetter(field: Ref<GeneralField>, callback?: Func): (...args: unknown[]) => any;
24
+ export declare function createVisitedSetter(field: Ref<GeneralField>, callback?: AnyFn): (...args: unknown[]) => any;
@@ -1 +1 @@
1
- import{isField as e}from"@formily/core";import{isObject as r}from"@vue/shared";import{isString as t,isArray as n,isFunction as o}from"lodash-es";function u(e,t){t(e),r(e.properties)&&Object.values(e.properties).forEach((e=>{u(e,t)}))}function i(e){return a(e.map((e=>e.val_key)).join("-"))}function a(e){return e.replace(/[.]/g,"-")}function c(e){return a(`id-${e}`)}function f(e,o){e&&function(){const o=new Map;n(e)?e.forEach((e=>{var t;r(e)?o.set(e.paramName,{key:null!=(t=e.paramValue)?t:e.paramName,required:e.required}):o.set(e,e)})):r(e)?Object.entries(e).forEach((([e,r])=>{o.set(e,r)})):t(e)&&o.set(e,e);return o}().forEach(((e,r)=>{if(t(e))return o(r,e);o(r,e.key,e.required)}))}function l(e,r){let t=null;for(const o of r){if(o.val_key===e){n(o)&&(t=null);break}n(o)&&(t=o.val_key)}return t;function n(e){return"LINEBAR"===e.html_type}}function s(r,t){const n={...r};return e(t)&&Object.assign(n,{"onUpdate:value"(e){t.setValue(e)}}),n}function p(r,t){const n={...r};return e(t)&&(n.key=void 0===n.value?0:1),n}function m(r,t){const n={...r};return e(t)&&(n.onClear=()=>t.visited=!0),n}function v(e){return{type:"object",properties:e}}function d(r,t){return(...n)=>(e(r.value)&&(r.value.visited=!0),o(t)?t(...n):void 0)}export{m as assignClearBindVisited,s as assignUpdateValue,p as assignValueBindKey,c as createLinebarId,v as createObjSchema,d as createVisitedSetter,a as dotEscape,i as fieldKeyEscape,l as getParentLinebar,f as traverseDependKey,u as traverseSchema};
1
+ import{isField as e}from"@formily/core";import{isObject as r,isPromise as t}from"@vue/shared";import{isString as n,isArray as o,isFunction as u,noop as a}from"lodash-es";function i(e,t){t(e),r(e.properties)&&Object.values(e.properties).forEach((e=>{i(e,t)}))}function c(e){return l(e.map((e=>e.val_key)).join("-"))}function l(e){return e.replace(/[.]/g,"-")}function f(e){return l(`id-${e}`)}function s(e,t){e&&function(){const t=new Map;o(e)?e.forEach((e=>{var n;r(e)?t.set(e.paramName,{key:null!=(n=e.paramValue)?n:e.paramName,required:e.required}):t.set(e,e)})):r(e)?Object.entries(e).forEach((([e,r])=>{t.set(e,r)})):n(e)&&t.set(e,e);return t}().forEach(((e,r)=>{if(n(e))return t(r,e);t(r,e.key,e.required)}))}function p(e,r){let t=null;for(const o of r){if(o.val_key===e){n(o)&&(t=null);break}n(o)&&(t=o.val_key)}return t;function n(e){return"LINEBAR"===e.html_type}}function v(r,n){const o={...r};return e(n)&&Object.assign(o,{"onUpdate:value"(e){var r;const o=null==(r=n.decoratorProps)?void 0:r.beforeSetValue;if(u(o)){const r=o(n.path.toString(),e,{field:n,oldValue:n.value});return t(r)?r.then((e=>n.setValue(e)),a):n.setValue(r)}n.setValue(e)}}),o}function d(r,t){const n={...r};return e(t)&&(n.key=void 0===n.value?0:1),n}function m(r,t){const n={...r};return e(t)&&(n.onClear=()=>t.visited=!0),n}function h(e){return{type:"object",properties:e}}function y(r,t){return(...n)=>(e(r.value)&&(r.value.visited=!0),u(t)?t(...n):void 0)}export{m as assignClearBindVisited,v as assignUpdateValue,d as assignValueBindKey,f as createLinebarId,h as createObjSchema,y as createVisitedSetter,l as dotEscape,c as fieldKeyEscape,p as getParentLinebar,s as traverseDependKey,i as traverseSchema};
@@ -1 +1 @@
1
- import{defineComponent as e,provide as t,createVNode as r}from"vue";import{useTheme as s}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isFunction as n,range as i}from"lodash-es";import{widthAppend as o}from"../../../shared/utils/index.js";import{NSpace as l,NButton as u}from"naive-ui";const d=e({props:{config:{type:Object,required:!0,default:()=>({})},index:{type:Number,required:!0},length:{type:Number,required:!0}},emits:["cancel","next","toNext"],setup(e,{emit:t,slots:d}){const p=s();function a(e,{skippable:s=!0,skipText:o="跳过",nextText:d="下一步",endText:p="结束引导"},a,c){var f;return r("footer",{class:"guide__stepFooter"},[null!=(f=n(e)?e():null)?f:r(l,{justify:"end",wrapItem:!1},{default:()=>[m(),s?r(u,{ghost:!0,bordered:!1,class:"guide__stepSkipBtn",textColor:"#c5c5c5",onClick:()=>t("cancel")},{default:()=>o}):null,r(u,{type:"primary",class:"guide__stepNextBtn",onClick:()=>t("next")},{default:()=>a===c-1?p:d})]})]);function m(){return r(l,{justify:"start",style:"flex:1"},{default:function(){return i(c).map((e=>r(u,{class:"guide__stepToBtn",bordered:!1,onClick:()=>t("toNext",e)},{default:()=>r("i",{class:["guide__stepToBtnContent",{guide__stepActiveBtn:e===a}]},null)})))}})}}return()=>{const{minWidth:t=240,maxWidth:s=300,pointer:i=!0}=e.config;return r("section",{class:"guide__stepContentWrapper",style:{minWidth:o(t),maxWidth:o(s),...p.value}},[i?r("div",{class:"guide__stepPointerWrapper"},[r("div",{class:"guide__stepPointer"},null),r("div",{class:"guide__stepPointerLine"},null)]):null,(u=d.header,r("header",{class:"guide__stepHeader"},[n(u)?u():null])),(l=d.body,r("section",{class:"guide__stepBody"},[n(l)?l():null])),a(d.footer,e.config,e.index,e.length)]);var l,u}}});function p(s){return s?e({setup(e,{attrs:n,slots:i}){const o=[];let l=(null==s?void 0:s.parent)&&Reflect.get(s.parent,"provides");for(;l;)Object.entries(l).forEach((([e,r])=>{o.includes(e)||(o.push(e),t(e,r))})),l=Object.getPrototypeOf(l);return()=>r(d,n,i)}}):d}export{p as createGuideStep};
1
+ import{defineComponent as e,provide as t,createVNode as s}from"vue";import{useTheme as r}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isFunction as o,range as n}from"lodash-es";import"@vue/shared";import{widthAppend as i}from"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NSpace as u,NButton as l}from"naive-ui";const d=e({props:{config:{type:Object,required:!0,default:()=>({})},index:{type:Number,required:!0},length:{type:Number,required:!0}},emits:["cancel","next","toNext"],setup(e,{emit:t,slots:d}){const p=r();function a(e,{skippable:r=!0,skipText:i="跳过",nextText:d="下一步",endText:p="结束引导"},a,c){var f;return s("footer",{class:"guide__stepFooter"},[null!=(f=o(e)?e():null)?f:s(u,{justify:"end",wrapItem:!1},{default:()=>[m(),r?s(l,{ghost:!0,bordered:!1,class:"guide__stepSkipBtn",textColor:"#c5c5c5",onClick:()=>t("cancel")},{default:()=>i}):null,s(l,{type:"primary",class:"guide__stepNextBtn",onClick:()=>t("next")},{default:()=>a===c-1?p:d})]})]);function m(){return s(u,{justify:"start",style:"flex:1"},{default:function(){return n(c).map((e=>s(l,{class:"guide__stepToBtn",bordered:!1,onClick:()=>t("toNext",e)},{default:()=>s("i",{class:["guide__stepToBtnContent",{guide__stepActiveBtn:e===a}]},null)})))}})}}return()=>{const{minWidth:t=240,maxWidth:r=300,pointer:n=!0}=e.config;return s("section",{class:"guide__stepContentWrapper",style:{minWidth:i(t),maxWidth:i(r),...p.value}},[n?s("div",{class:"guide__stepPointerWrapper"},[s("div",{class:"guide__stepPointer"},null),s("div",{class:"guide__stepPointerLine"},null)]):null,(l=d.header,s("header",{class:"guide__stepHeader"},[o(l)?l():null])),(u=d.body,s("section",{class:"guide__stepBody"},[o(u)?u():null])),a(d.footer,e.config,e.index,e.length)]);var u,l}}});function p(r){return r?e({setup(e,{attrs:o,slots:n}){const i=[];let u=(null==r?void 0:r.parent)&&Reflect.get(r.parent,"provides");for(;u;)Object.entries(u).forEach((([e,s])=>{i.includes(e)||(i.push(e),t(e,s))})),u=Object.getPrototypeOf(u);return()=>s(d,o,n)}}):d}export{p as createGuideStep};
@@ -19,6 +19,17 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
19
19
  annotation: {
20
20
  type: import("vue").PropType<Record<string, import("../annotation-edit/src/type").AnnotationItem>>;
21
21
  };
22
+ requestInstance: {
23
+ type: import("vue").PropType<import("..").FormRequestDefine.RequestInstance>;
24
+ };
25
+ uniqueCacheData: {
26
+ type: BooleanConstructor;
27
+ default: boolean;
28
+ };
29
+ parallelism: {
30
+ type: NumberConstructor;
31
+ default: number;
32
+ };
22
33
  }, {
23
34
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
24
35
  tableConfig: {
@@ -36,6 +47,17 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
36
47
  annotation: {
37
48
  type: import("vue").PropType<Record<string, import("../annotation-edit/src/type").AnnotationItem>>;
38
49
  };
50
+ requestInstance: {
51
+ type: import("vue").PropType<import("..").FormRequestDefine.RequestInstance>;
52
+ };
53
+ uniqueCacheData: {
54
+ type: BooleanConstructor;
55
+ default: boolean;
56
+ };
57
+ parallelism: {
58
+ type: NumberConstructor;
59
+ default: number;
60
+ };
39
61
  }>> & {
40
62
  onFormChange?: ((...args: any[]) => any) | undefined;
41
63
  onCopy?: ((...args: any[]) => any) | undefined;
@@ -110,6 +132,10 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
110
132
  }>;
111
133
  eventListener: import("./src/hooks/tapHooks/useEventHooks").IhoTableEventListener;
112
134
  emits: (event: "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "keyboard" | "rowDrag" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd" | "pageChange", ...args: any[]) => void;
135
+ asyncQueue: import("..").AsyncQueue<import("..").FormRequestDefine.AsyncQueueItem, any, {
136
+ label: string;
137
+ value: unknown;
138
+ }[]>;
113
139
  hooks: Readonly<{
114
140
  configHooks: import("../../../es/components/iho-table/src/types").AbstractConfigHooks;
115
141
  fieldHooks: import("../../../es/components/iho-table/src/types").AbstractFieldHooks;
@@ -4661,6 +4687,17 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
4661
4687
  annotation: {
4662
4688
  type: import("vue").PropType<Record<string, import("../annotation-edit/src/type").AnnotationItem>>;
4663
4689
  };
4690
+ requestInstance: {
4691
+ type: import("vue").PropType<import("..").FormRequestDefine.RequestInstance>;
4692
+ };
4693
+ uniqueCacheData: {
4694
+ type: BooleanConstructor;
4695
+ default: boolean;
4696
+ };
4697
+ parallelism: {
4698
+ type: NumberConstructor;
4699
+ default: number;
4700
+ };
4664
4701
  }>> & {
4665
4702
  onFormChange?: ((...args: any[]) => any) | undefined;
4666
4703
  onCopy?: ((...args: any[]) => any) | undefined;
@@ -4729,6 +4766,8 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
4729
4766
  onRowDrag?: ((...args: any[]) => any) | undefined;
4730
4767
  }, {
4731
4768
  fieldList: import("../../../es/components/iho-table/src/types").LowCodeTableFieldItem[];
4769
+ parallelism: number;
4770
+ uniqueCacheData: boolean;
4732
4771
  tableConfig: import("../../../es/components/iho-table/src/types").IhoTableConfig;
4733
4772
  tableData: import("../../../es/shared/types").AnyObject[];
4734
4773
  }>>;
@@ -1,3 +1,4 @@
1
+ import { FormRequestDefine } from '../../../../es/shared/hooks';
1
2
  import { AnyObject } from '../../../../es/shared/types';
2
3
  import { PropType } from 'vue';
3
4
  import { VxeTableInstance } from 'vxe-table';
@@ -19,6 +20,17 @@ declare const _default: import("vue").DefineComponent<{
19
20
  annotation: {
20
21
  type: PropType<Record<string, AnnotationItem>>;
21
22
  };
23
+ requestInstance: {
24
+ type: PropType<FormRequestDefine.RequestInstance>;
25
+ };
26
+ uniqueCacheData: {
27
+ type: BooleanConstructor;
28
+ default: boolean;
29
+ };
30
+ parallelism: {
31
+ type: NumberConstructor;
32
+ default: number;
33
+ };
22
34
  }, {
23
35
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
24
36
  tableConfig: {
@@ -36,6 +48,17 @@ declare const _default: import("vue").DefineComponent<{
36
48
  annotation: {
37
49
  type: PropType<Record<string, AnnotationItem>>;
38
50
  };
51
+ requestInstance: {
52
+ type: PropType<FormRequestDefine.RequestInstance>;
53
+ };
54
+ uniqueCacheData: {
55
+ type: BooleanConstructor;
56
+ default: boolean;
57
+ };
58
+ parallelism: {
59
+ type: NumberConstructor;
60
+ default: number;
61
+ };
39
62
  }>> & {
40
63
  onFormChange?: ((...args: any[]) => any) | undefined;
41
64
  onCopy?: ((...args: any[]) => any) | undefined;
@@ -110,6 +133,10 @@ declare const _default: import("vue").DefineComponent<{
110
133
  }>;
111
134
  eventListener: import("../../../../es/components/iho-table/src/hooks/tapHooks/useEventHooks").IhoTableEventListener;
112
135
  emits: (event: "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "keyboard" | "rowDrag" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd" | "pageChange", ...args: any[]) => void;
136
+ asyncQueue: import("../../../../es/shared/hooks").AsyncQueue<FormRequestDefine.AsyncQueueItem, any, {
137
+ label: string;
138
+ value: unknown;
139
+ }[]>;
113
140
  hooks: Readonly<{
114
141
  configHooks: import("../../../../es/components/iho-table/src/types").AbstractConfigHooks;
115
142
  fieldHooks: import("../../../../es/components/iho-table/src/types").AbstractFieldHooks;
@@ -4661,6 +4688,17 @@ declare const _default: import("vue").DefineComponent<{
4661
4688
  annotation: {
4662
4689
  type: PropType<Record<string, AnnotationItem>>;
4663
4690
  };
4691
+ requestInstance: {
4692
+ type: PropType<FormRequestDefine.RequestInstance>;
4693
+ };
4694
+ uniqueCacheData: {
4695
+ type: BooleanConstructor;
4696
+ default: boolean;
4697
+ };
4698
+ parallelism: {
4699
+ type: NumberConstructor;
4700
+ default: number;
4701
+ };
4664
4702
  }>> & {
4665
4703
  onFormChange?: ((...args: any[]) => any) | undefined;
4666
4704
  onCopy?: ((...args: any[]) => any) | undefined;
@@ -4729,6 +4767,8 @@ declare const _default: import("vue").DefineComponent<{
4729
4767
  onRowDrag?: ((...args: any[]) => any) | undefined;
4730
4768
  }, {
4731
4769
  fieldList: LowCodeTableFieldItem[];
4770
+ parallelism: number;
4771
+ uniqueCacheData: boolean;
4732
4772
  tableConfig: IhoTableConfig;
4733
4773
  tableData: AnyObject[];
4734
4774
  }>;
@@ -1 +1 @@
1
- import{defineComponent as e,computed as t,provide as a,ref as o,toRaw as l,watch as n,resolveComponent as r,openBlock as s,createElementBlock as i,unref as u,normalizeStyle as d,createBlock as c,resolveDynamicComponent as f,createElementVNode as v,createVNode as m,mergeProps as p,createSlots as b,renderList as g,withCtx as h,createCommentVNode as x,renderSlot as k,normalizeProps as y,guardReactiveProps as D}from"vue";import{useTheme as C}from"../../../shared/hooks/useTheme.js";import{useDebounceFn as $}from"@vueuse/core";import"date-fns";import{isString as j,isEqualWith as w,isFunction as I,pick as H}from"lodash-es";import{widthAppend as T,uuidGenerator as _}from"../../../shared/utils/index.js";import{promiseTimeout as A}from"@vueuse/shared";import{VxeTableEventNameList as L,InjectionIhoTableEmits as R,InjectionIhoTableAnnotation as S,InjectionIhoTableUUID as E,InjectionIhoTableInstance as F,InjectionIhoTableConfig as O,InjectionIhoTableFieldList as B,InjectionIhoTableHandler as W}from"./constants/index.js";import{createTableHooks as q,applyTableConfigHooks as z,applyTableFieldHooks as G,createTableEventHandlers as J,createDomInsertComponent as K,createDataTransfer as M}from"./hooks/tapHooks/index.js";import{provideIhoTableEventListener as N}from"./hooks/tapHooks/useEventHooks.js";import{eventName2EventListener as P}from"./utils/index.js";const Q=["id"];var U=e({__name:"IhoTable",props:{tableConfig:{type:Object,default:()=>({})},fieldList:{type:Array,default:()=>[]},tableData:{type:Array,default:()=>[]},annotation:{type:Object}},emits:["formChange","settingClick","formClick","keyboard","rowDrag",...L],setup(e,{expose:L,emit:U}){var V,X;const Y=e,Z=C({"--c-border-color":"#e2e2e2","--c-head-bg-color":"#f2f2f2","--c-hover-color":"#f7f7f7"}),ee=t((()=>{var e,t;const a=null!=(t=null==(e=Y.tableConfig)?void 0:e.height)?t:"100%";return{height:"auto"===a?"100%":j(a)&&(a.includes("calc")||a.endsWith("%"))?a:T(a)}})),te=N(),ae=function(e,...t){U(e,...t);const a=u(re)[P(e)];I(a)&&a(...t),te.trigger(e,...t)};a(R,ae);const oe=q();a(S,t((()=>Y.annotation)));const le=_();a(E,le);const ne=o();a(F,ne);const re=o({uuid:null!=(X=null==(V=Y.tableConfig)?void 0:V.uuid)?X:le});a(O,re);const se=$(ie,10);function ie(){re.value=z(oe,Y.tableConfig,{$table:ne,emits:ae}),re.value.uuid=le}const ue=o([]);a(B,ue);const de=$(ce,10);function ce(){const e=G(oe,Y.fieldList,re.value,{$table:ne,emits:ae});w(e,l(ue.value),((e,t)=>{if(I(e)&&I(t))return e.toString()===t.toString()}))||(ue.value=e)}const fe=M(oe,re,ne),ve=o([]);async function me(){var e,t;const a=await fe(Y.tableData),o=null==(e=ne.value)?void 0:e.getTableData().fullData;if(o){let e=0;if(!(o.some((t=>{var o;if(!(null==(o=ne.value)?void 0:o.isInsertByRow(t))){if(t!==a[e])return!0;e++}}))||e!==a.length))return}ve.value=a,null==(t=ne.value)||t.recalculate(!0)}const pe={updateTableDataRef:$(me,10),updateConfigRef:se,updateFieldListRef:de};a(W,pe);const be=J({hooks:oe,config:re,$table:ne,context:pe,emits:ae}),ge=t((()=>({...re.value,...be})));let he=!1,xe=!1,ke=!1;const ye=$((()=>{he&&ie(),xe&&ce(),ke&&me(),he=!1,xe=!1,ke=!1}),10);n((()=>Y.tableConfig),(()=>{he=!0,xe=!0,ke=!0,ye()}),{deep:!0}),n((()=>Y.fieldList),(()=>{xe=!0,ke=!0,ye()}),{deep:!0}),n([()=>[...Y.tableData],()=>{var e;return null==(e=Y.tableData)?void 0:e.length}],(()=>{ke=!0,ye()})),n([()=>Y.tableData,()=>{var e;return null==(e=Y.tableData)?void 0:e.length}],(async()=>{var e,t;(null==(e=re.value.treeConfig)?void 0:e.expandAll)&&(await A(11),null==(t=ne.value)||t.setAllTreeExpand(!0))})),ie(),ce(),me();const{header:De,footer:Ce}=K(oe);function $e(e){return H(e,["row","rowIndex","$rowIndex","column","columnIndex","$columnIndex","_columnIndex","checked","disabled","indeterminate"])}return L({$table:ne,async loadData(e){var t;null==(t=ne.value)||t.loadData(await fe(e))},setSort:(e,t)=>({field:e,value:t}),setFilter:(e,t)=>({field:e,value:t}),reload(){var e,t;null==(e=ne.value)||e.loadColumn([]),null==(t=ne.value)||t.loadData([]),ie(),ce(),me()},...oe.exposeHooks.expose.call({},re,{$table:ne,emits:ae})}),oe.setupHooks.setup.call(re,ue,{$table:ne,emits:ae}),(e,t)=>{const a=r("vxe-grid");return s(),i("section",{class:"iho-table",id:u(le),style:d(u(Z))},[(s(),c(f(u(De)))),v("section",{style:d(u(ee))},[m(a,p({ref_key:"$table",ref:ne},u(ge),{columns:ue.value,data:ve.value}),b({_:2},[g(e.$slots,((t,a)=>({name:a,fn:h((t=>[x(" 实际上所有的vxe-grid插槽都支持 "),k(e.$slots,a,y(D($e(t))))]))})))]),1040,["columns","data"])],4),(s(),c(f(u(Ce))))],12,Q)}}});export{U as default};
1
+ import{defineComponent as e,computed as t,provide as a,ref as o,toRaw as l,watch as n,resolveComponent as s,openBlock as r,createElementBlock as i,unref as u,normalizeStyle as c,createBlock as d,resolveDynamicComponent as f,createElementVNode as m,createVNode as v,mergeProps as p,createSlots as b,renderList as h,withCtx as g,createCommentVNode as x,renderSlot as k,normalizeProps as y,guardReactiveProps as D}from"vue";import{useTheme as C}from"../../../shared/hooks/useTheme.js";import{useDebounceFn as j}from"@vueuse/core";import"date-fns";import{isString as $,isEqualWith as I,isFunction as w,pick as q}from"lodash-es";import{useFormAsyncQueue as R,presetRequestHandler as H}from"../../../shared/hooks/useFormRequest/index.js";import{promiseTimeout as T}from"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"naive-ui";import{widthAppend as _,uuidGenerator as A}from"../../../shared/utils/index.js";import{VxeTableEventNameList as L,InjectionIhoTableEmits as S,InjectionTableAsyncQueue as F,InjectionIhoTableAnnotation as O,InjectionIhoTableUUID as B,InjectionIhoTableInstance as E,InjectionIhoTableConfig as N,InjectionIhoTableFieldList as W,InjectionIhoTableHandler as z}from"./constants/index.js";import{createTableHooks as G,applyTableConfigHooks as J,applyTableFieldHooks as K,createTableEventHandlers as M,createDomInsertComponent as P,createDataTransfer as Q}from"./hooks/tapHooks/index.js";import{provideIhoTableEventListener as U}from"./hooks/tapHooks/useEventHooks.js";import{eventName2EventListener as V}from"./utils/index.js";const X=["id"];var Y=e({__name:"IhoTable",props:{tableConfig:{type:Object,default:()=>({})},fieldList:{type:Array,default:()=>[]},tableData:{type:Array,default:()=>[]},annotation:{type:Object},requestInstance:{type:Object},uniqueCacheData:{type:Boolean,default:!1},parallelism:{type:Number,default:3}},emits:["formChange","settingClick","formClick","keyboard","rowDrag",...L],setup(e,{expose:L,emit:Y}){var Z,ee;const te=e,ae=C({"--c-border-color":"#d0d0d0","--c-head-bg-color":"#f2f2f2","--c-hover-color":"#e6e6e6","--c-stripe-color":"#f6f6f6"}),oe=t((()=>{var e,t;const a=null!=(t=null==(e=te.tableConfig)?void 0:e.height)?t:"100%";return{height:"auto"===a?"100%":$(a)&&(a.includes("calc")||a.endsWith("%"))?a:_(a)}})),le=U(),ne=function(e,...t){Y(e,...t);const a=u(ce)[V(e)];w(a)&&a(...t),le.trigger(e,...t)};a(S,ne);const se=R(t((()=>te.requestInstance)),t((()=>!!te.uniqueCacheData))).create(te.parallelism,{beforeRequest:(e,t)=>t,afterRequest:(e,t)=>H(t)});a(F,se);const re=G();a(O,t((()=>te.annotation)));const ie=A();a(B,ie);const ue=o();a(E,ue);const ce=o({uuid:null!=(ee=null==(Z=te.tableConfig)?void 0:Z.uuid)?ee:ie});a(N,ce);const de=j(fe,10);function fe(){ce.value=J(re,te.tableConfig,{$table:ue,emits:ne}),ce.value.uuid=ie}const me=o([]);a(W,me);const ve=j(pe,10);function pe(){const e=K(re,te.fieldList,ce.value,{$table:ue,emits:ne});I(e,l(me.value),((e,t)=>{if(w(e)&&w(t))return e.toString()===t.toString()}))||(me.value=e)}const be=Q(re,ce,ue),he=o([]);async function ge(){var e,t;const a=await be(te.tableData),o=null==(e=ue.value)?void 0:e.getTableData().fullData;if(o){let e=0;if(!(o.some((t=>{var o;if(!(null==(o=ue.value)?void 0:o.isInsertByRow(t))){if(t!==a[e])return!0;e++}}))||e!==a.length))return}he.value=a,null==(t=ue.value)||t.recalculate(!0)}const xe={updateTableDataRef:j(ge,10),updateConfigRef:de,updateFieldListRef:ve};a(z,xe);const ke=M({hooks:re,config:ce,$table:ue,context:xe,emits:ne}),ye=t((()=>({...ce.value,...ke})));let De=!1,Ce=!1,je=!1;const $e=j((()=>{De&&fe(),Ce&&pe(),je&&ge(),De=!1,Ce=!1,je=!1}),10);n((()=>te.tableConfig),(()=>{De=!0,Ce=!0,je=!0,$e()}),{deep:!0}),n((()=>te.fieldList),(()=>{Ce=!0,je=!0,$e()}),{deep:!0}),n([()=>[...te.tableData],()=>{var e;return null==(e=te.tableData)?void 0:e.length}],(()=>{je=!0,$e()})),n([()=>te.tableData,()=>{var e;return null==(e=te.tableData)?void 0:e.length}],(async()=>{var e,t;(null==(e=ce.value.treeConfig)?void 0:e.expandAll)&&(await T(11),null==(t=ue.value)||t.setAllTreeExpand(!0))})),fe(),pe(),ge();const{header:Ie,footer:we}=P(re);function qe(e){return q(e,["row","rowIndex","$rowIndex","column","columnIndex","$columnIndex","_columnIndex","checked","disabled","indeterminate"])}return L({$table:ue,async loadData(e){var t;null==(t=ue.value)||t.loadData(await be(e))},setSort:(e,t)=>({field:e,value:t}),setFilter:(e,t)=>({field:e,value:t}),reload(){var e,t;null==(e=ue.value)||e.loadColumn([]),null==(t=ue.value)||t.loadData([]),fe(),pe(),ge()},...re.exposeHooks.expose.call({},ce,{$table:ue,emits:ne})}),re.setupHooks.setup.call(ce,me,{$table:ue,emits:ne}),(e,t)=>{const a=s("vxe-grid");return r(),i("section",{class:"iho-table",id:u(ie),style:c(u(ae))},[(r(),d(f(u(Ie)))),m("section",{style:c(u(oe))},[v(a,p({ref_key:"$table",ref:ue},u(ye),{columns:me.value,data:he.value}),b({_:2},[h(e.$slots,((t,a)=>({name:a,fn:g((t=>[x(" 实际上所有的vxe-grid插槽都支持 "),k(e.$slots,a,y(D(qe(t))))]))})))]),1040,["columns","data"])],4),(r(),d(f(u(we))))],12,X)}}});export{Y as default};
@@ -1,3 +1,4 @@
1
+ import { FormRequestDefine } from '../../../../../es/shared/hooks';
1
2
  import { Nullable, UndefinedAble } from '../../../../../es/shared/types';
2
3
  import { ComputedRef, InjectionKey, Ref } from 'vue';
3
4
  import { VxeTableInstance } from 'vxe-table';
@@ -51,7 +52,8 @@ export declare enum EDITABLE_WIDGET_TYPE {
51
52
  DATE = "DATE",
52
53
  TIME = "TIME",
53
54
  NUMBER = "NUMBER",
54
- RADIO = "RADIO"
55
+ RADIO = "RADIO",
56
+ LEVEL_SEARCH_CASCADE = "LEVEL_SEARCH_CASCADE"
55
57
  }
56
58
  export declare enum IHO_TABLE_NUMBER_STATUS {
57
59
  NEGATIVE = 0,
@@ -81,3 +83,4 @@ export declare const InjectionIhoTableUUID: InjectionKey<string>;
81
83
  export declare const InjectionIhoTableInstance: InjectionKey<Ref<UndefinedAble<VxeTableInstance>>>;
82
84
  export declare const InjectionIhoTableHandler: InjectionKey<IhoTableHandler>;
83
85
  export declare const InjectionIhoTableEventListener: InjectionKey<IhoTableEventListener>;
86
+ export declare const InjectionTableAsyncQueue: InjectionKey<FormRequestDefine.FormAsyncQueue>;
@@ -1 +1 @@
1
- import{eventListener2EventName as e}from"../utils/index.js";var o=(e=>(e.DEFAULT="DEFAULT",e.PICTURE="PICTURE",e.FILE="FILE",e.MONEY="MONEY",e.HEADPORTRAIT="HEADPORTRAIT",e.LABEL="LABEL",e.TELEPHONE="TELEPHONE",e.BIRTHDAY="BIRTHDAY",e.MULTISELECT="MULTISELECT",e.CASCADE="CASCADE",e.SEARCH_TREE="SEARCH_TREE",e.COLOR="COLOR",e.EVALUATE="EVALUATE",e.MAP="MAP",e.VIDEO="VIDEO",e.SYSTEMFIELDS="SYSTEMFIELDS",e.PERCENTAGE="PERCENTAGE",e.HTML="HTML",e.CANDIDATE_COMPONENTS="CANDIDATE_COMPONENTS",e.TASKDATE="TASKDATE",e.AGE="AGE",e.STATUS="STATUS",e.WEBSITE="WEBSITE",e.IDCARD="IDCARD",e.COUNTDOWN="COUNTDOWN",e.DURATION="DURATION",e.COMBINATION="COMBINATION",e.PASSWORD="PASSWORD",e.QR_CODE="QR_CODE",e.CUSTOMER_NAME="CUSTOMER_NAME",e.BANK_CARD="BANK_CARD",e.SEQUENCE="SEQUENCE",e))(o||{});const n=Object.freeze(["onKeydownStart","onKeydown","onKeydownEnd","onPaste","onCopy","onCut","onCurrentChange","onRadioChange","onCheckboxChange","onCheckboxAll","onCheckboxRangeStart","onCheckboxRangeChange","onCheckboxRangeEnd","onCellClick","onCellDblclick","onCellMenu","onCellMouseenter","onCellMouseleave","onHeaderCellClick","onHeaderCellDblclick","onHeaderCellMenu","onFooterCellClick","onFooterCellDblclick","onFooterCellMenu","onSortChange","onFilterChange","onFilterVisible","onResizableChange","onToggleRowExpand","onToggleTreeExpand","onMenuClick","onEditClosed","onEditActived","onEditDisabled","onValidError","onScroll","onCustom","onOpenFnr","onFnrChange","onFnrFind","onFnrFindAll","onFnrReplace","onFnrReplaceAll","onCellAreaCopy","onCellAreaCut","onCellAreaPaste","onCellAreaMerge","onClearCellAreaMerge","onHeaderCellAreaSelection","onCellAreaSelectionStart","onCellAreaSelectionDrag","onCellAreaSelectionEnd","onCellAreaExtensionStart","onCellAreaExtensionDrag","onCellAreaExtensionEnd","onCellAreaArrowsStart","onCellAreaArrowsEnd","onActiveCellChangeStart","onActiveCellChangeEnd","onPageChange"]),E=n.map(e),l=Object.freeze(["firstRowGroup","secondRowGroup","thirdRowGroup","fourthRowGroup","fifthRowGroup","sixthRowGroup","seventhRowGroup","eighthRowGroup","ninthRowGroup","tenthRowGroup"]),C=-1/0,A=1/0;var T=(e=>(e.INPUT="INPUT",e.SEPARATE="SEPARATE",e.SELECT="SELECT",e.SELECT_MORE="SELECT_MORE",e.DATE="DATE",e.TIME="TIME",e.NUMBER="NUMBER",e.RADIO="RADIO",e))(T||{}),r=(e=>(e[e.NEGATIVE=0]="NEGATIVE",e[e.POSITIVE=1]="POSITIVE",e))(r||{}),t=(e=>(e.NEGATIVE="0",e.POSITIVE="1",e))(t||{}),a=(e=>(e.NOT_TREE="0",e.UNKNOWN="1",e.TRANSFORM_TREE_TYPE="2",e.TRANSFORM_WITH_SPAN_METHOD="3",e))(a||{}),S=(e=>(e[e.left=1]="left",e[e.right=2]="right",e))(S||{});const i=["formChange","settingClick","formClick","keyboard","rowDrag"],R=[...i,...E],I=Symbol("injectionIhoTableConfig"),O=Symbol("injectionIhoTableFieldList"),D=Symbol("InjectionIhoTableEmits"),N=Symbol("InjectionIhoTableAnnotation"),c=Symbol("InjectionIhoTableUUID"),h=Symbol("InjectionIhoTableInstance"),M=Symbol("InjectionIhoTableHandler"),d=Symbol("InjectionIhoTableEventListener");export{T as EDITABLE_WIDGET_TYPE,C as HIGHEST_PRIORITY,S as IHO_TABLE_FIXED_STATUS,r as IHO_TABLE_NUMBER_STATUS,t as IHO_TABLE_STRING_STATUS,a as IHO_TABLE_TREE_TYPE,i as IhoTableCustomEventNameTuple,R as IhoTableEventNameTuple,l as IhoTableRowGroupSequence,N as InjectionIhoTableAnnotation,I as InjectionIhoTableConfig,D as InjectionIhoTableEmits,d as InjectionIhoTableEventListener,O as InjectionIhoTableFieldList,M as InjectionIhoTableHandler,h as InjectionIhoTableInstance,c as InjectionIhoTableUUID,A as LOWEST_PRIORITY,n as VxeEventListenerNameList,E as VxeTableEventNameList,o as WIDGET_TYPE};
1
+ import{eventListener2EventName as e}from"../utils/index.js";var o=(e=>(e.DEFAULT="DEFAULT",e.PICTURE="PICTURE",e.FILE="FILE",e.MONEY="MONEY",e.HEADPORTRAIT="HEADPORTRAIT",e.LABEL="LABEL",e.TELEPHONE="TELEPHONE",e.BIRTHDAY="BIRTHDAY",e.MULTISELECT="MULTISELECT",e.CASCADE="CASCADE",e.SEARCH_TREE="SEARCH_TREE",e.COLOR="COLOR",e.EVALUATE="EVALUATE",e.MAP="MAP",e.VIDEO="VIDEO",e.SYSTEMFIELDS="SYSTEMFIELDS",e.PERCENTAGE="PERCENTAGE",e.HTML="HTML",e.CANDIDATE_COMPONENTS="CANDIDATE_COMPONENTS",e.TASKDATE="TASKDATE",e.AGE="AGE",e.STATUS="STATUS",e.WEBSITE="WEBSITE",e.IDCARD="IDCARD",e.COUNTDOWN="COUNTDOWN",e.DURATION="DURATION",e.COMBINATION="COMBINATION",e.PASSWORD="PASSWORD",e.QR_CODE="QR_CODE",e.CUSTOMER_NAME="CUSTOMER_NAME",e.BANK_CARD="BANK_CARD",e.SEQUENCE="SEQUENCE",e))(o||{});const n=Object.freeze(["onKeydownStart","onKeydown","onKeydownEnd","onPaste","onCopy","onCut","onCurrentChange","onRadioChange","onCheckboxChange","onCheckboxAll","onCheckboxRangeStart","onCheckboxRangeChange","onCheckboxRangeEnd","onCellClick","onCellDblclick","onCellMenu","onCellMouseenter","onCellMouseleave","onHeaderCellClick","onHeaderCellDblclick","onHeaderCellMenu","onFooterCellClick","onFooterCellDblclick","onFooterCellMenu","onSortChange","onFilterChange","onFilterVisible","onResizableChange","onToggleRowExpand","onToggleTreeExpand","onMenuClick","onEditClosed","onEditActived","onEditDisabled","onValidError","onScroll","onCustom","onOpenFnr","onFnrChange","onFnrFind","onFnrFindAll","onFnrReplace","onFnrReplaceAll","onCellAreaCopy","onCellAreaCut","onCellAreaPaste","onCellAreaMerge","onClearCellAreaMerge","onHeaderCellAreaSelection","onCellAreaSelectionStart","onCellAreaSelectionDrag","onCellAreaSelectionEnd","onCellAreaExtensionStart","onCellAreaExtensionDrag","onCellAreaExtensionEnd","onCellAreaArrowsStart","onCellAreaArrowsEnd","onActiveCellChangeStart","onActiveCellChangeEnd","onPageChange"]),E=n.map(e),l=Object.freeze(["firstRowGroup","secondRowGroup","thirdRowGroup","fourthRowGroup","fifthRowGroup","sixthRowGroup","seventhRowGroup","eighthRowGroup","ninthRowGroup","tenthRowGroup"]),C=-1/0,A=1/0;var T=(e=>(e.INPUT="INPUT",e.SEPARATE="SEPARATE",e.SELECT="SELECT",e.SELECT_MORE="SELECT_MORE",e.DATE="DATE",e.TIME="TIME",e.NUMBER="NUMBER",e.RADIO="RADIO",e.LEVEL_SEARCH_CASCADE="LEVEL_SEARCH_CASCADE",e))(T||{}),r=(e=>(e[e.NEGATIVE=0]="NEGATIVE",e[e.POSITIVE=1]="POSITIVE",e))(r||{}),t=(e=>(e.NEGATIVE="0",e.POSITIVE="1",e))(t||{}),a=(e=>(e.NOT_TREE="0",e.UNKNOWN="1",e.TRANSFORM_TREE_TYPE="2",e.TRANSFORM_WITH_SPAN_METHOD="3",e))(a||{}),S=(e=>(e[e.left=1]="left",e[e.right=2]="right",e))(S||{});const R=["formChange","settingClick","formClick","keyboard","rowDrag"],i=[...R,...E],I=Symbol("injectionIhoTableConfig"),D=Symbol("injectionIhoTableFieldList"),O=Symbol("InjectionIhoTableEmits"),c=Symbol("InjectionIhoTableAnnotation"),N=Symbol("InjectionIhoTableUUID"),h=Symbol("InjectionIhoTableInstance"),M=Symbol("InjectionIhoTableHandler"),b=Symbol("InjectionIhoTableEventListener"),L=Symbol("InjectionTableAsyncQueue");export{T as EDITABLE_WIDGET_TYPE,C as HIGHEST_PRIORITY,S as IHO_TABLE_FIXED_STATUS,r as IHO_TABLE_NUMBER_STATUS,t as IHO_TABLE_STRING_STATUS,a as IHO_TABLE_TREE_TYPE,R as IhoTableCustomEventNameTuple,i as IhoTableEventNameTuple,l as IhoTableRowGroupSequence,c as InjectionIhoTableAnnotation,I as InjectionIhoTableConfig,O as InjectionIhoTableEmits,b as InjectionIhoTableEventListener,D as InjectionIhoTableFieldList,M as InjectionIhoTableHandler,h as InjectionIhoTableInstance,N as InjectionIhoTableUUID,L as InjectionTableAsyncQueue,A as LOWEST_PRIORITY,n as VxeEventListenerNameList,E as VxeTableEventNameList,o as WIDGET_TYPE};
@@ -1,4 +1,4 @@
1
- import { Func } from '../../../../../../es/shared/types';
1
+ import { AnyFn } from '../../../../../../es/shared/types';
2
2
  import { AsyncParallelHook } from '../../../../../../es/shared/utils/tapable';
3
3
  import { AbstractEventHooks, IhoTableEmitPayload, IhoTableEventNameUnion } from '../../../../../../es/components/iho-table/src/types';
4
4
  declare class EventHooks extends AbstractEventHooks {
@@ -69,7 +69,7 @@ export declare function useEventHooks(): {
69
69
  create: () => EventHooks;
70
70
  };
71
71
  export declare class IhoTableEventListener {
72
- eventMap: Map<"toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "keyboard" | "rowDrag" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd" | "pageChange", Set<Func<any[], any>>>;
72
+ eventMap: Map<"toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "keyboard" | "rowDrag" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd" | "pageChange", Set<AnyFn<any[], any>>>;
73
73
  addEventListener<T extends IhoTableEventNameUnion>(key: T, handler: (...payload: IhoTableEmitPayload<T>) => void): void;
74
74
  trigger<T extends IhoTableEventNameUnion>(key: T, ...payload: IhoTableEmitPayload<T>): void;
75
75
  }
@@ -1,8 +1,8 @@
1
- import { Func } from '../../../../../../es/shared/types';
1
+ import { AnyFn } from '../../../../../../es/shared/types';
2
2
  import { SyncWaterfallHook } from '../../../../../../es/shared/utils/tapable';
3
3
  import { AbstractExposeHooks } from '../../../../../../es/components/iho-table/src/types';
4
4
  declare class ExposeHooks extends AbstractExposeHooks {
5
- readonly expose: SyncWaterfallHook<[Record<string, Func<any[], any>>, import("vue").Ref<import("../../../../../../es/components/iho-table/src/types").IhoTableConfig>, import("../../../../../../es/components/iho-table/src/types").IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
5
+ readonly expose: SyncWaterfallHook<[Record<string, AnyFn<any[], any>>, import("vue").Ref<import("../../../../../../es/components/iho-table/src/types").IhoTableConfig>, import("../../../../../../es/components/iho-table/src/types").IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
6
6
  }
7
7
  export declare function useExposeHooks(): {
8
8
  create: () => ExposeHooks;
@@ -1 +1 @@
1
- import{format as e}from"date-fns";import"../../index.js";import{EDITABLE_WIDGET_TYPE as t}from"../constants/index.js";import{getLowCodeFieldFromField as n}from"../utils/index.js";import{defineTablePlugin as a}from"../hooks/useTablePlugin.js";function l(){const l="defaultValuePlugin",o=new Map([[t.TIME,({defaultValue:t,valueFormat:n="HH:mm"})=>"current"===t?e(Date.now(),n):t],[t.DATE,({defaultValue:t,valueFormat:n="yyyy-MM-dd HH:mm:ss"})=>"current"===t?e(Date.now(),n):t]]);function u(e){var t;const a=n(e);if(!a||null==a.defaultValue)return null;const l=null==(t=e.editRender)?void 0:t.name,u=l&&o.get(l);return u?u(a):a.defaultValue}return a({name:l,apply(e){const t=Object.freeze([]);let n=t;e.fieldHooks.field.tap(l,(e=>{const t=u(e);return null!=t&&(e.editRender={defaultValue:t,...e.editRender}),e})),e.fieldHooks.fieldList.tap(l,(e=>n=e)),e.dataHooks.data.tap(l,(e=>{n.length&&n.forEach((t=>{if(null!=e[t.field])return;const n=u(t);null!=n&&(e[t.field]=n)}))})),e.dataHooks.dataEnd.tap(l,(()=>n=t))}})}export{l as defaultValuePlugin};
1
+ import{format as e}from"date-fns";import"../../index.js";import{EDITABLE_WIDGET_TYPE as t}from"../constants/index.js";import{getLowCodeFieldFromField as a}from"../utils/index.js";import{defineTablePlugin as n}from"../hooks/useTablePlugin.js";function l(){const l="defaultValuePlugin",o=new Map([[t.TIME,({defaultValue:t,valueFormat:a="HH:mm"})=>"current"===t?e(Date.now(),a):t],[t.DATE,({defaultValue:t,valueFormat:a="yyyy-MM-dd HH:mm:ss"})=>"current"===t?e(Date.now(),a):t]]);function u(e){var t;const n=a(e);if(!n||null==n.defaultValue)return null;const l=null==(t=e.editRender)?void 0:t.name,u=l&&o.get(l);return u?u(n):n.defaultValue}return n({name:l,apply(e){const t=Object.freeze([]);let a=t;e.fieldHooks.field.tap(l,(e=>(e.editRender={defaultValue:({column:e})=>u(e),...e.editRender},e))),e.fieldHooks.fieldList.tap(l,(e=>a=e)),e.dataHooks.data.tap(l,(e=>{a.length&&a.forEach((t=>{if(null!=e[t.field])return;const a=u(t);null!=a&&(e[t.field]=a)}))})),e.dataHooks.dataEnd.tap(l,(()=>a=t))}})}export{l as defaultValuePlugin};
@@ -1 +1 @@
1
- import*as e from"./anchorPlugin/index.js";import*as r from"./bindEventSettingPlugin/index.js";import*as i from"./copyPastePlugin.js";import*as n from"./defaultConfigPlugin/index.js";import*as s from"./defaultValuePlugin.js";import*as t from"./filterDaterangeRenderPlugin/index.js";import*as d from"./filterRenderPlugin/index.js";import*as l from"./filterVisibleEventPlugin.js";import*as g from"./forceArrowKeyPlugin.js";import*as u from"./headerPlugin.js";import*as o from"./highLightSetPlugin.js";import*as a from"./keyboardEventPlugin/index.js";import*as P from"./lowCodeFieldAdaptorPlugin/index.js";import*as m from"./maxCheckSizePlugin.js";import*as x from"./operationalFormPlugin/index.js";import*as f from"./rendererPlugins/editableWidgets/dateRendererPlugin/index.js";import*as p from"./rendererPlugins/editableWidgets/inputRendererPlugin.js";import*as j from"./rendererPlugins/editableWidgets/numberRendererPlugin.js";import*as R from"./rendererPlugins/editableWidgets/radioRendererPlugin.js";import*as b from"./rendererPlugins/editableWidgets/selectRendererPlugin/index.js";import*as w from"./rendererPlugins/editableWidgets/separateRendererPlugin/index.js";import*as c from"./rendererPlugins/editableWidgets/timeRendererPlugin/index.js";import*as h from"./rendererPlugins/widgets/checkRendererPlugin.js";import*as W from"./rendererPlugins/widgets/colorRendererPlugin.js";import*as v from"./rendererPlugins/widgets/defaultRendererPlugin.js";import*as k from"./rendererPlugins/widgets/htmlRendererPlugin.js";import*as C from"./rendererPlugins/widgets/labelRendererPlugin.js";import*as S from"./rendererPlugins/widgets/pictureRendererPlugin.js";import*as y from"./rendererPlugins/widgets/seqRendererPlugin.js";import*as E from"./rowClickPlugin/index.js";import*as A from"./rowDragPlugin/index.js";import*as D from"./rowGroupSettingPlugin/index.js";import*as F from"./varialbleHeightPlugin/index.js";import*as V from"./virtualTreePlugin/index.js";import{separateMetaModule as q}from"../../../../shared/utils/index.js";var z=q(Object.assign({"./anchorPlugin/index.tsx":e,"./bindEventSettingPlugin/index.ts":r,"./copyPastePlugin.ts":i,"./defaultConfigPlugin/index.ts":n,"./defaultValuePlugin.ts":s,"./filterDaterangeRenderPlugin/index.tsx":t,"./filterRenderPlugin/index.tsx":d,"./filterVisibleEventPlugin.ts":l,"./forceArrowKeyPlugin.ts":g,"./headerPlugin.tsx":u,"./highLightSetPlugin.tsx":o,"./keyboardEventPlugin/index.ts":a,"./lowCodeFieldAdaptorPlugin/index.tsx":P,"./maxCheckSizePlugin.ts":m,"./operationalFormPlugin/index.ts":x,"./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx":f,"./rendererPlugins/editableWidgets/inputRendererPlugin.tsx":p,"./rendererPlugins/editableWidgets/numberRendererPlugin.tsx":j,"./rendererPlugins/editableWidgets/radioRendererPlugin.tsx":R,"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx":b,"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx":w,"./rendererPlugins/editableWidgets/timeRendererPlugin/index.tsx":c,"./rendererPlugins/widgets/checkRendererPlugin.tsx":h,"./rendererPlugins/widgets/colorRendererPlugin.tsx":W,"./rendererPlugins/widgets/defaultRendererPlugin.tsx":v,"./rendererPlugins/widgets/htmlRendererPlugin.tsx":k,"./rendererPlugins/widgets/labelRendererPlugin.tsx":C,"./rendererPlugins/widgets/pictureRendererPlugin.tsx":S,"./rendererPlugins/widgets/seqRendererPlugin.tsx":y,"./rowClickPlugin/index.ts":E,"./rowDragPlugin/index.ts":A,"./rowGroupSettingPlugin/index.ts":D,"./varialbleHeightPlugin/index.tsx":F,"./virtualTreePlugin/index.ts":V}));export{z as default};
1
+ import*as e from"./anchorPlugin/index.js";import*as r from"./bindEventSettingPlugin/index.js";import*as i from"./copyPastePlugin.js";import*as n from"./defaultConfigPlugin/index.js";import*as s from"./defaultValuePlugin.js";import*as t from"./filterDaterangeRenderPlugin/index.js";import*as d from"./filterRenderPlugin/index.js";import*as l from"./filterVisibleEventPlugin.js";import*as g from"./forceArrowKeyPlugin.js";import*as u from"./headerPlugin.js";import*as o from"./highLightSetPlugin.js";import*as a from"./keyboardEventPlugin/index.js";import*as P from"./lowCodeFieldAdaptorPlugin/index.js";import*as m from"./maxCheckSizePlugin.js";import*as x from"./operationalFormPlugin/index.js";import*as f from"./rendererPlugins/editableWidgets/dateRendererPlugin/index.js";import*as p from"./rendererPlugins/editableWidgets/inputRendererPlugin.js";import*as j from"./rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js";import*as R from"./rendererPlugins/editableWidgets/numberRendererPlugin.js";import*as b from"./rendererPlugins/editableWidgets/radioRendererPlugin.js";import*as w from"./rendererPlugins/editableWidgets/selectRendererPlugin/index.js";import*as c from"./rendererPlugins/editableWidgets/separateRendererPlugin/index.js";import*as h from"./rendererPlugins/editableWidgets/timeRendererPlugin/index.js";import*as W from"./rendererPlugins/widgets/checkRendererPlugin.js";import*as v from"./rendererPlugins/widgets/colorRendererPlugin.js";import*as S from"./rendererPlugins/widgets/defaultRendererPlugin.js";import*as k from"./rendererPlugins/widgets/htmlRendererPlugin.js";import*as C from"./rendererPlugins/widgets/labelRendererPlugin.js";import*as y from"./rendererPlugins/widgets/pictureRendererPlugin.js";import*as E from"./rendererPlugins/widgets/seqRendererPlugin.js";import*as A from"./rowClickPlugin/index.js";import*as D from"./rowDragPlugin/index.js";import*as F from"./rowGroupSettingPlugin/index.js";import*as V from"./varialbleHeightPlugin/index.js";import*as q from"./virtualTreePlugin/index.js";import*as z from"./wordbookSettingPlugin.js";import{separateMetaModule as G}from"../../../../shared/utils/index.js";var H=G(Object.assign({"./anchorPlugin/index.tsx":e,"./bindEventSettingPlugin/index.ts":r,"./copyPastePlugin.ts":i,"./defaultConfigPlugin/index.ts":n,"./defaultValuePlugin.ts":s,"./filterDaterangeRenderPlugin/index.tsx":t,"./filterRenderPlugin/index.tsx":d,"./filterVisibleEventPlugin.ts":l,"./forceArrowKeyPlugin.ts":g,"./headerPlugin.tsx":u,"./highLightSetPlugin.tsx":o,"./keyboardEventPlugin/index.ts":a,"./lowCodeFieldAdaptorPlugin/index.tsx":P,"./maxCheckSizePlugin.ts":m,"./operationalFormPlugin/index.ts":x,"./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx":f,"./rendererPlugins/editableWidgets/inputRendererPlugin.tsx":p,"./rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.tsx":j,"./rendererPlugins/editableWidgets/numberRendererPlugin.tsx":R,"./rendererPlugins/editableWidgets/radioRendererPlugin.tsx":b,"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx":w,"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx":c,"./rendererPlugins/editableWidgets/timeRendererPlugin/index.tsx":h,"./rendererPlugins/widgets/checkRendererPlugin.tsx":W,"./rendererPlugins/widgets/colorRendererPlugin.tsx":v,"./rendererPlugins/widgets/defaultRendererPlugin.tsx":S,"./rendererPlugins/widgets/htmlRendererPlugin.tsx":k,"./rendererPlugins/widgets/labelRendererPlugin.tsx":C,"./rendererPlugins/widgets/pictureRendererPlugin.tsx":y,"./rendererPlugins/widgets/seqRendererPlugin.tsx":E,"./rowClickPlugin/index.ts":A,"./rowDragPlugin/index.ts":D,"./rowGroupSettingPlugin/index.ts":F,"./varialbleHeightPlugin/index.tsx":V,"./virtualTreePlugin/index.ts":q,"./wordbookSettingPlugin.ts":z}));export{H as default};
@@ -1,4 +1,4 @@
1
- import { Func, AnyObject } from '../../../../../../../../es/shared/types';
1
+ import { AnyFn, AnyObject } from '../../../../../../../../es/shared/types';
2
2
  import { type PropType } from 'vue';
3
3
  import { VxeTableConstructor, VxeTableDefines, VxeTableMethods, VxeTablePrivateMethods } from 'vxe-table';
4
4
  declare const _default: import("vue").DefineComponent<{
@@ -63,7 +63,7 @@ declare const _default: import("vue").DefineComponent<{
63
63
  isSecondDisabled: (second: number) => boolean;
64
64
  };
65
65
  dateConfig: AnyObject;
66
- customDateDisabledDecorator: (customDateDisabled?: Func) => ((ts: number) => any) | null;
66
+ customDateDisabledDecorator: (customDateDisabled?: AnyFn) => ((ts: number) => any) | null;
67
67
  getDetailTime: (date: Date) => {
68
68
  h: number;
69
69
  m: number;
@@ -1 +1 @@
1
- function e(e){return{bindAutoFocusConfig:function(t,n,o,{before:r,after:u,focusType:i="function"}={}){e.fieldHooks.field.tap(t,(e=>{var t;return(null==(t=e.editRender)?void 0:t.name)===n?((e=r?r(e):e).editRender&&!Reflect.has(e.editRender,"autofocus")&&Reflect.set(e.editRender,"autofocus","class"===i?o:"function"===i?({cell:e}={})=>{if(!e)return;let t;return o.split(" ").some((n=>(t=e.querySelector(n),t))),null==t||t.click(),t}:void 0),u?u(e):e):e}))}}}export{e as useAutoFocus};
1
+ function e(e){return{bindAutoFocusConfig:function(t,n,o,{before:c,after:r,focusType:u="function"}={}){e.fieldHooks.field.tap(t,(e=>{var t;return(null==(t=e.editRender)?void 0:t.name)===n?((e=c?c(e):e).editRender&&!Reflect.has(e.editRender,"autofocus")&&Reflect.set(e.editRender,"autofocus","class"===u?o:"function"===u?({cell:e}={})=>{const t=e&&e.querySelector(o);return t&&t.click(),t}:void 0),r?r(e):e):e}))}}}export{e as useAutoFocus};