cnhis-design-vue 3.1.53-beta.3 → 3.1.53-release.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 +13 -14
  7. package/es/components/button-print/src/utils/print.js +1 -1
  8. package/es/components/callback/src/components/render/popupMaps.d.ts +6 -69
  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 +26 -98
  13. package/es/components/form-config/src/FormConfig.vue.d.ts +27 -99
  14. package/es/components/form-config/src/FormConfig.vue2.js +1 -1
  15. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +6 -30
  16. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +12 -48
  17. package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -1
  18. package/es/components/form-render/index.d.ts +6 -30
  19. package/es/components/form-render/index.js +1 -1
  20. package/es/components/form-render/src/FormRender.vue.d.ts +7 -31
  21. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  22. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +7 -31
  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/index.d.ts → levelSearchCascader.d.ts} +5 -3
  27. package/es/components/form-render/src/components/renderer/levelSearchCascader.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 +2 -3
  33. package/es/components/form-render/src/hooks/index.d.ts +2 -0
  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 +2 -10
  40. package/es/components/form-render/src/hooks/useFormAsyncQueue.d.ts +16 -0
  41. package/es/components/form-render/src/hooks/useFormAsyncQueue.js +1 -0
  42. package/es/components/form-render/src/hooks/useFormContext.d.ts +3 -3
  43. package/es/components/form-render/src/hooks/useFormContext.js +1 -1
  44. package/es/components/form-render/src/hooks/useFormItemDeps.d.ts +3 -3
  45. package/es/components/form-render/src/hooks/useFormRenderLifeCycle.d.ts +1 -9
  46. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +5 -5
  47. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  48. package/es/components/form-render/src/hooks/useFormRequest.d.ts +26 -0
  49. package/es/components/form-render/src/hooks/useFormRequest.js +1 -0
  50. package/es/components/form-render/src/types/fieldItem.d.ts +26 -4
  51. package/es/components/form-render/src/types/index.d.ts +14 -7
  52. package/es/components/form-render/src/utils/index.d.ts +2 -1
  53. package/es/components/form-render/src/utils/index.js +1 -1
  54. package/es/components/form-render/src/utils/schema.d.ts +2 -2
  55. package/es/components/form-render/src/utils/schema.js +1 -1
  56. package/es/components/guide/src/renderer.js +1 -1
  57. package/es/components/iho-table/index.d.ts +0 -39
  58. package/es/components/iho-table/src/IhoTable.vue.d.ts +0 -40
  59. package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
  60. package/es/components/iho-table/src/constants/index.d.ts +1 -4
  61. package/es/components/iho-table/src/constants/index.js +1 -1
  62. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +2 -2
  63. package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +2 -2
  64. package/es/components/iho-table/src/plugins/defaultValuePlugin.js +1 -1
  65. package/es/components/iho-table/src/plugins/index.js +1 -1
  66. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +2 -2
  67. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +1 -1
  68. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +1 -4
  69. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  70. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  71. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +2 -2
  72. package/es/components/iho-table/src/types/index.d.ts +2 -7
  73. package/es/components/iho-table/src/types/pluginType.d.ts +3 -3
  74. package/es/components/iho-table/style/index.css +1 -1
  75. package/es/components/index.css +1 -1
  76. package/es/components/index.d.ts +0 -1
  77. package/es/components/index.js +1 -1
  78. package/es/components/info-header/index.d.ts +29 -97
  79. package/es/components/info-header/src/InfoHeader.vue.d.ts +30 -98
  80. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +5 -9
  81. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +6 -10
  82. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +13 -41
  83. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +6 -30
  84. package/es/components/keyboard/src/Keyboard.vue2.js +1 -1
  85. package/es/components/search-cascader/index.d.ts +3 -23
  86. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +4 -24
  87. package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
  88. package/es/components/shortcut-setter/index.d.ts +9 -33
  89. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +10 -34
  90. package/es/components/steps-wheel/src/StepsWheel.vue2.js +1 -1
  91. package/es/components/time-picker/src/TimePicker.vue2.js +1 -1
  92. package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +4 -4
  93. package/es/shared/components/SlotRender/SlotRender.d.ts +5 -5
  94. package/es/shared/hooks/index.d.ts +0 -3
  95. package/es/shared/hooks/index.js +1 -1
  96. package/es/shared/hooks/{useAsyncQueue/index.d.ts → useAsyncQueue.d.ts} +15 -7
  97. package/es/shared/hooks/useAsyncQueue.js +1 -0
  98. package/es/shared/hooks/useDateTime.d.ts +2 -2
  99. package/es/shared/package.json.js +1 -1
  100. package/es/shared/types/business.d.ts +0 -24
  101. package/es/shared/types/index.d.ts +1 -1
  102. package/package.json +2 -2
  103. package/es/components/form-render/src/components/renderer/levelSearchCascader/index.js +0 -1
  104. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.d.ts +0 -1
  105. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js +0 -1
  106. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.d.ts +0 -552
  107. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.js +0 -1
  108. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue2.js +0 -1
  109. package/es/components/iho-table/src/plugins/wordbookSettingPlugin.d.ts +0 -1
  110. package/es/components/iho-table/src/plugins/wordbookSettingPlugin.js +0 -1
  111. package/es/components/search-cascader/src/components/ClearIcon.vue.js +0 -1
  112. package/es/shared/hooks/selectHooks/index.d.ts +0 -4
  113. package/es/shared/hooks/selectHooks/index.js +0 -1
  114. package/es/shared/hooks/selectHooks/useOptionFiltered.d.ts +0 -10
  115. package/es/shared/hooks/selectHooks/useOptionFiltered.js +0 -1
  116. package/es/shared/hooks/selectHooks/useSearchContent.d.ts +0 -6
  117. package/es/shared/hooks/selectHooks/useSearchContent.js +0 -1
  118. package/es/shared/hooks/selectHooks/useSelectAllowModify.d.ts +0 -23
  119. package/es/shared/hooks/selectHooks/useSelectAllowModify.js +0 -1
  120. package/es/shared/hooks/selectHooks/useSelectRenders.d.ts +0 -19
  121. package/es/shared/hooks/selectHooks/useSelectRenders.js +0 -1
  122. package/es/shared/hooks/useAsyncQueue/index.js +0 -1
  123. package/es/shared/hooks/useAsyncQueue/types.d.ts +0 -20
  124. package/es/shared/hooks/useAsyncQueue/types.js +0 -1
  125. package/es/shared/hooks/useFormRequest/index.d.ts +0 -24
  126. package/es/shared/hooks/useFormRequest/index.js +0 -1
  127. package/es/shared/hooks/useFormRequest/types.d.ts +0 -39
  128. package/es/shared/hooks/useFormRequest/types.js +0 -1
  129. package/es/shared/hooks/useLevelSearchCascader.d.ts +0 -31
  130. package/es/shared/hooks/useLevelSearchCascader.js +0 -1
@@ -1,10 +1,10 @@
1
- import { AnyFn } from '../../../../../es/shared/types';
1
+ import { Func } from '../../../../../es/shared/types';
2
2
  import { DependKeyType } from '../../../../../es/components/form-render';
3
3
  export declare class FormItemDepsCollector {
4
4
  triggerDisabled: boolean;
5
5
  private readonly collector;
6
- setDeps(key: string, dependKeys: DependKeyType, callback: AnyFn): void;
7
- getDeps(dependKey: string): Map<string, AnyFn<any[], any>> | undefined;
6
+ setDeps(key: string, dependKeys: DependKeyType, callback: Func): void;
7
+ getDeps(dependKey: string): Map<string, Func<any[], any>> | undefined;
8
8
  trigger(dependKey: string, payload?: unknown): void;
9
9
  }
10
10
  export declare function useFormItemDeps(): {
@@ -1,21 +1,13 @@
1
1
  import { UndefinedAble } from '../../../../../es/shared/types';
2
2
  import { FormRenderLifeCycle, FormRenderProps } from '../../../../../es/components/form-render';
3
3
  export declare function useFormRenderLifeCycle(props: FormRenderProps): {
4
- callLifeCycle: <T extends "onSetup" | "beforeSetValue" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
4
+ callLifeCycle: <T extends "onSetup" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
5
5
  onSetup(): void;
6
- beforeSetValue(fieldKey: string, value: unknown, payload: {
7
- field: import("@formily/core").GeneralField;
8
- oldValue: unknown;
9
- }): any;
10
6
  beforeRequest(fieldKey: string, params?: import("../../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../../es/shared/types").AnyObject | undefined): void | UndefinedAble<import("../../../../../es/shared/types").AnyObject>;
11
7
  afterRequest(fieldKey: string, res?: any, payload?: import("../../../../../es/shared/types").AnyObject | undefined): import("../../../../../es/shared/types").AnyObject[];
12
8
  afterOptionInit(fieldKey: string, options: import("../../../../../es/shared/types").AnyObject[], payload?: import("../../../../../es/shared/types").AnyObject | undefined): void;
13
9
  }>>[T]> | undefined) => UndefinedAble<ReturnType<Required<Partial<{
14
10
  onSetup(): void;
15
- beforeSetValue(fieldKey: string, value: unknown, payload: {
16
- field: import("@formily/core").GeneralField;
17
- oldValue: unknown;
18
- }): any;
19
11
  beforeRequest(fieldKey: string, params?: import("../../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../../es/shared/types").AnyObject | undefined): void | UndefinedAble<import("../../../../../es/shared/types").AnyObject>;
20
12
  afterRequest(fieldKey: string, res?: any, payload?: import("../../../../../es/shared/types").AnyObject | undefined): import("../../../../../es/shared/types").AnyObject[];
21
13
  afterOptionInit(fieldKey: string, options: import("../../../../../es/shared/types").AnyObject[], payload?: import("../../../../../es/shared/types").AnyObject | undefined): void;
@@ -1,22 +1,22 @@
1
- import { FormRequestDefine } from '../../../../../es/shared/hooks';
2
- import { AnyObject, FormWordbook, AnyFn } from '../../../../../es/shared/types';
1
+ import { AnyObject, Func } from '../../../../../es/shared/types';
3
2
  import { Ref } from 'vue';
4
- import { UrlConfig } from '../../../../../es/components/form-render';
3
+ import { FormWordbook, RecommendIds, UrlConfig } from '../../../../../es/components/form-render';
5
4
  import { RecommendItem } from '../../../../../es/components/recommend-search/src/types';
6
5
  declare type UseOptionHooks = Partial<Record<'onRequestConfigChange' | 'onDepsChange', (payload: {
7
6
  fetchData: (content?: string | null, otherParams?: AnyObject) => any;
8
7
  labelKey: string;
9
8
  valueKey: string;
10
9
  }) => 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?: () => FormRequestDefine.RecommendIds;
15
+ getRecommendInfo?: () => RecommendIds;
16
16
  recommendCache: boolean;
17
17
  commonNum: number;
18
18
  recentNum: number;
19
- }, options: Ref<AnyObject[]>, emit: AnyFn, labelKey: Ref<string>, valueKey: Ref<string>): {
19
+ }, options: Ref<AnyObject[]>, emit: Func, 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}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
+ 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};
@@ -0,0 +1,26 @@
1
+ import { Func, Nullable } from '../../../../../es/shared/types';
2
+ import { FormRequestType } from '../../../../../es/components/form-render';
3
+ export declare type RequestInstance = Record<string, Func>;
4
+ declare type SearchRequestInfo = {
5
+ method: FormRequestType;
6
+ url: string;
7
+ primaryKeyUrl?: string;
8
+ };
9
+ export declare type RecommendIds = Partial<Record<'businessId' | 'componentId' | 'deptId' | 'userId', string>>;
10
+ declare type RecommendRequestInfo = {
11
+ getRecommendIds(): RecommendIds;
12
+ url: Record<'get' | 'post' | 'delete', string>;
13
+ };
14
+ export declare function useFormRequest(): {
15
+ getHttpInstance: () => Nullable<RequestInstance>;
16
+ registGlobHttpInstance: (instance: RequestInstance) => void;
17
+ registGlobRecommendInfo: (info: Partial<RecommendRequestInfo>) => void;
18
+ registGlobSearchInfo: (info: SearchRequestInfo) => void;
19
+ getSearchRequestInfo: () => {
20
+ method: FormRequestType;
21
+ url: string;
22
+ primaryKeyUrl?: string | undefined;
23
+ };
24
+ getRecommendRequestInfo: () => RecommendRequestInfo;
25
+ };
26
+ export {};
@@ -0,0 +1 @@
1
+ import{cloneDeep as e}from"lodash-es";let t=null;const n={method:"post",url:"",primaryKeyUrl:""},o={url:{get:"/fdp-api/fdp/aiRec/search",post:"/fdp-api/fdp/aiRec/sendBehaviorData",delete:"/fdp-api/fdp/aiRec/delete"},getRecommendIds:()=>({})};function r(){return{getHttpInstance:function(){return t},registGlobHttpInstance:function(e){t=e},registGlobRecommendInfo:function(e){Object.assign(o,e)},registGlobSearchInfo:function(e){Object.assign(n,e)},getSearchRequestInfo:function(){return{...n}},getRecommendRequestInfo:function(){return e(o)}}}export{r as useFormRequest};
@@ -1,8 +1,7 @@
1
- import { FormRequestDefine } from '../../../../../es/shared/hooks';
2
- import { AnyObject, ArrayAble, BindEventSettingItem, FormWordbook } from '../../../../../es/shared/types';
1
+ import { AnyObject, ArrayAble, BindEventSettingItem } from '../../../../../es/shared/types';
3
2
  import { SchemaEffectTypes, SchemaTypes } from '@formily/vue';
4
3
  import { CSSProperties, VNode } from 'vue';
5
- import { DependKeyType, FormCommonState } from '../../../../../es/components/form-render';
4
+ import { DependKeyType, FormCommonState, FormRequestType } from '../../../../../es/components/form-render';
6
5
  declare type FieldBusinessType = 'password' | 'id_card' | 'age' | 'age_unit' | 'mobile' | 'telephone' | 'email' | 'sex' | 'birthday' | 'bank_card' | 'website' | 'gestational_weeks' | 'gestational_stage' | 'customer_name';
7
6
  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);
8
7
  declare type ValidateType = 'mobile' | 'integer' | 'number' | 'id_card' | 'regular' | string;
@@ -48,7 +47,7 @@ export interface FormRenderer {
48
47
  export declare type UrlConfig = {
49
48
  url: string;
50
49
  } & Partial<{
51
- method: FormRequestDefine.RequestType;
50
+ method: FormRequestType;
52
51
  nameKey: string;
53
52
  valueKey: string;
54
53
  showKey: string;
@@ -75,6 +74,29 @@ interface ReactionType {
75
74
  };
76
75
  [key: string]: any;
77
76
  }
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
+ }>;
78
100
  export declare type CombinationItemDeletableFn = (itemData: AnyObject, index: number) => boolean;
79
101
  export declare type FieldItem = {
80
102
  val_key: string;
@@ -1,10 +1,11 @@
1
- import { FormRequestDefine } from '../../../../../es/shared/hooks';
1
+ import { AsyncQueue } from '../../../../../es/shared/hooks';
2
2
  import { AnyObject, FormLowCodeReactions, FormOperationalConfig, UndefinedAble } from '../../../../../es/shared/types';
3
- import { DataField, Field, Form, GeneralField } from '@formily/core';
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';
6
6
  import { FIELD_BUSINESS_TYPE } from '../../../../../es/components/form-render/src/constants';
7
7
  import { FieldItem } from '../types';
8
+ import { RequestInstance } from '../hooks';
8
9
  export * from './fieldItem';
9
10
  export declare type FormCommonState = '0' | '1';
10
11
  export interface FieldVisitorContext {
@@ -14,6 +15,16 @@ export interface FieldVisitorContext {
14
15
  insertAfter(f: FieldItem | FieldItem[]): void;
15
16
  }
16
17
  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[]>;
17
28
  export declare type AgeContext = Record<'age' | 'day' | 'month' | 'year' | 'hours', number>;
18
29
  export declare type IdCardParseInfo = Record<'sex' | 'birthday', string> & AgeContext;
19
30
  export declare type FormRenderExpose = {
@@ -110,10 +121,6 @@ export declare type DependKeyType = string | Record<string, string> | Array<{
110
121
  } | string>;
111
122
  export declare type FormRenderLifeCycle = Partial<{
112
123
  onSetup(): void;
113
- beforeSetValue(fieldKey: string, value: unknown, payload: {
114
- field: GeneralField;
115
- oldValue: unknown;
116
- }): any;
117
124
  beforeRequest(fieldKey: string, params?: AnyObject, payload?: AnyObject): UndefinedAble<AnyObject> | void;
118
125
  afterRequest(fieldKey: string, res?: any, payload?: AnyObject): AnyObject[];
119
126
  afterOptionInit(fieldKey: string, options: AnyObject[], payload?: AnyObject): void;
@@ -134,7 +141,7 @@ export declare type FormRenderProps = Partial<{
134
141
  uuid: string;
135
142
  lifeCycle: FormRenderLifeCycle;
136
143
  businessFormatter: FormBusinessFormatter;
137
- requestInstance: FormRequestDefine.RequestInstance;
144
+ requestInstance: RequestInstance;
138
145
  enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
139
146
  lowCodeReactions: FormLowCodeReactions.Config[];
140
147
  linebarAutoHidden: boolean;
@@ -13,6 +13,7 @@ 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[];
16
17
  export declare function validateMessageParser(message: string, fieldItem: Omit<FieldItem, 'reactions'>): string;
17
18
  export declare function combineExtendKey(fieldList: FieldItem[], values: AnyObject): AnyObject;
18
19
  export declare function splitExtendKey(fieldList: FieldItem[], values: AnyObject): AnyObject;
@@ -27,7 +28,7 @@ export declare function createUrlConfigParams({ config, field, cache }: {
27
28
  key: string;
28
29
  cache: boolean | undefined;
29
30
  url: string;
30
- method?: import("../../..").FormRequestDefine.RequestType | undefined;
31
+ method?: import("../../../../../es/components/form-render").FormRequestType | undefined;
31
32
  nameKey?: string | undefined;
32
33
  valueKey?: string | undefined;
33
34
  showKey?: string | undefined;
@@ -1 +1 @@
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
+ 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,4 +1,4 @@
1
- import { AnyObject, AnyFn } from '../../../../../es/shared/types';
1
+ import { AnyObject, Func } 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?: AnyFn): (...args: unknown[]) => any;
24
+ export declare function createVisitedSetter(field: Ref<GeneralField>, callback?: Func): (...args: unknown[]) => any;
@@ -1 +1 @@
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
+ 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 +1 @@
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};
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};
@@ -19,17 +19,6 @@ 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
- };
33
22
  }, {
34
23
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
35
24
  tableConfig: {
@@ -47,17 +36,6 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
47
36
  annotation: {
48
37
  type: import("vue").PropType<Record<string, import("../annotation-edit/src/type").AnnotationItem>>;
49
38
  };
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
- };
61
39
  }>> & {
62
40
  onFormChange?: ((...args: any[]) => any) | undefined;
63
41
  onCopy?: ((...args: any[]) => any) | undefined;
@@ -132,10 +110,6 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
132
110
  }>;
133
111
  eventListener: import("./src/hooks/tapHooks/useEventHooks").IhoTableEventListener;
134
112
  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
- }[]>;
139
113
  hooks: Readonly<{
140
114
  configHooks: import("../../../es/components/iho-table/src/types").AbstractConfigHooks;
141
115
  fieldHooks: import("../../../es/components/iho-table/src/types").AbstractFieldHooks;
@@ -4687,17 +4661,6 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
4687
4661
  annotation: {
4688
4662
  type: import("vue").PropType<Record<string, import("../annotation-edit/src/type").AnnotationItem>>;
4689
4663
  };
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
- };
4701
4664
  }>> & {
4702
4665
  onFormChange?: ((...args: any[]) => any) | undefined;
4703
4666
  onCopy?: ((...args: any[]) => any) | undefined;
@@ -4766,8 +4729,6 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
4766
4729
  onRowDrag?: ((...args: any[]) => any) | undefined;
4767
4730
  }, {
4768
4731
  fieldList: import("../../../es/components/iho-table/src/types").LowCodeTableFieldItem[];
4769
- parallelism: number;
4770
- uniqueCacheData: boolean;
4771
4732
  tableConfig: import("../../../es/components/iho-table/src/types").IhoTableConfig;
4772
4733
  tableData: import("../../../es/shared/types").AnyObject[];
4773
4734
  }>>;
@@ -1,4 +1,3 @@
1
- import { FormRequestDefine } from '../../../../es/shared/hooks';
2
1
  import { AnyObject } from '../../../../es/shared/types';
3
2
  import { PropType } from 'vue';
4
3
  import { VxeTableInstance } from 'vxe-table';
@@ -20,17 +19,6 @@ declare const _default: import("vue").DefineComponent<{
20
19
  annotation: {
21
20
  type: PropType<Record<string, AnnotationItem>>;
22
21
  };
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
- };
34
22
  }, {
35
23
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
36
24
  tableConfig: {
@@ -48,17 +36,6 @@ declare const _default: import("vue").DefineComponent<{
48
36
  annotation: {
49
37
  type: PropType<Record<string, AnnotationItem>>;
50
38
  };
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
- };
62
39
  }>> & {
63
40
  onFormChange?: ((...args: any[]) => any) | undefined;
64
41
  onCopy?: ((...args: any[]) => any) | undefined;
@@ -133,10 +110,6 @@ declare const _default: import("vue").DefineComponent<{
133
110
  }>;
134
111
  eventListener: import("../../../../es/components/iho-table/src/hooks/tapHooks/useEventHooks").IhoTableEventListener;
135
112
  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
- }[]>;
140
113
  hooks: Readonly<{
141
114
  configHooks: import("../../../../es/components/iho-table/src/types").AbstractConfigHooks;
142
115
  fieldHooks: import("../../../../es/components/iho-table/src/types").AbstractFieldHooks;
@@ -4688,17 +4661,6 @@ declare const _default: import("vue").DefineComponent<{
4688
4661
  annotation: {
4689
4662
  type: PropType<Record<string, AnnotationItem>>;
4690
4663
  };
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
- };
4702
4664
  }>> & {
4703
4665
  onFormChange?: ((...args: any[]) => any) | undefined;
4704
4666
  onCopy?: ((...args: any[]) => any) | undefined;
@@ -4767,8 +4729,6 @@ declare const _default: import("vue").DefineComponent<{
4767
4729
  onRowDrag?: ((...args: any[]) => any) | undefined;
4768
4730
  }, {
4769
4731
  fieldList: LowCodeTableFieldItem[];
4770
- parallelism: number;
4771
- uniqueCacheData: boolean;
4772
4732
  tableConfig: IhoTableConfig;
4773
4733
  tableData: AnyObject[];
4774
4734
  }>;
@@ -1 +1 @@
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
+ 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,4 +1,3 @@
1
- import { FormRequestDefine } from '../../../../../es/shared/hooks';
2
1
  import { Nullable, UndefinedAble } from '../../../../../es/shared/types';
3
2
  import { ComputedRef, InjectionKey, Ref } from 'vue';
4
3
  import { VxeTableInstance } from 'vxe-table';
@@ -52,8 +51,7 @@ export declare enum EDITABLE_WIDGET_TYPE {
52
51
  DATE = "DATE",
53
52
  TIME = "TIME",
54
53
  NUMBER = "NUMBER",
55
- RADIO = "RADIO",
56
- LEVEL_SEARCH_CASCADE = "LEVEL_SEARCH_CASCADE"
54
+ RADIO = "RADIO"
57
55
  }
58
56
  export declare enum IHO_TABLE_NUMBER_STATUS {
59
57
  NEGATIVE = 0,
@@ -83,4 +81,3 @@ export declare const InjectionIhoTableUUID: InjectionKey<string>;
83
81
  export declare const InjectionIhoTableInstance: InjectionKey<Ref<UndefinedAble<VxeTableInstance>>>;
84
82
  export declare const InjectionIhoTableHandler: InjectionKey<IhoTableHandler>;
85
83
  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.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
+ 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,4 +1,4 @@
1
- import { AnyFn } from '../../../../../../es/shared/types';
1
+ import { Func } 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<AnyFn<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<Func<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
  }