cnhis-design-vue 3.1.54-beta.1 → 3.1.54-beta.11

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 (99) hide show
  1. package/README.md +87 -87
  2. package/es/components/body-select/src/hooks/renderCanvas.js +1 -1
  3. package/es/components/body-select/src/index.vue2.js +1 -1
  4. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  5. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  6. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  7. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  8. package/es/components/button-print/src/ButtonPrint.vue.d.ts +1 -3
  9. package/es/components/callback/src/components/render/popupMaps.d.ts +47 -10
  10. package/es/components/expand-field/src/components/form.vue2.js +1 -1
  11. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  12. package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.d.ts +21 -4
  13. package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.js +1 -1
  14. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
  15. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
  16. package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.js +1 -1
  17. package/es/components/fabric-chart/src/hooks/index.js +1 -1
  18. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  19. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
  20. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
  21. package/es/components/fabric-chart/src/hooks/temperature/useCenter.d.ts +1 -1
  22. package/es/components/fabric-chart/src/hooks/temperature/useLeft.d.ts +1 -1
  23. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  24. package/es/components/fabric-chart/src/hooks/temperature/useOther.d.ts +1 -1
  25. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  26. package/es/components/fabric-chart/src/hooks/useCumputedPoint.d.ts +8 -2
  27. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
  28. package/es/components/form-config/index.d.ts +76 -58
  29. package/es/components/form-config/src/FormConfig.vue.d.ts +77 -59
  30. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +19 -10
  31. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +31 -22
  32. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +12 -12
  33. package/es/components/form-config/src/constants/index.d.ts +4 -4
  34. package/es/components/form-config/src/types/index.d.ts +3 -3
  35. package/es/components/form-render/index.d.ts +19 -10
  36. package/es/components/form-render/src/FormRender.vue.d.ts +20 -11
  37. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  38. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +19 -10
  39. package/es/components/form-render/src/components/renderer/date.js +1 -1
  40. package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +1 -1
  41. package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
  42. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +4 -4
  43. package/es/components/form-render/src/hooks/useFormItemDeps.d.ts +1 -1
  44. package/es/components/form-render/src/hooks/useFormItemDeps.js +1 -1
  45. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +2 -2
  46. package/es/components/form-render/src/hooks/useLowCodeReactions.d.ts +2 -2
  47. package/es/components/form-render/src/hooks/useOperationalForm.d.ts +7 -5
  48. package/es/components/form-render/src/hooks/useOperationalForm.js +1 -1
  49. package/es/components/form-render/src/hooks/useWordbookSetting.d.ts +1 -1
  50. package/es/components/form-render/src/hooks/useWordbookSetting.js +1 -1
  51. package/es/components/form-render/src/types/fieldItem.d.ts +3 -3
  52. package/es/components/form-render/src/types/index.d.ts +6 -6
  53. package/es/components/iho-table/index.d.ts +28 -0
  54. package/es/components/iho-table/src/IhoTable.vue.d.ts +28 -0
  55. package/es/components/iho-table/src/plugins/operationalFormPlugin/index.js +1 -1
  56. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +1 -1
  57. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +1 -1
  58. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -1
  59. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +1 -0
  60. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
  61. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
  62. package/es/components/iho-table/src/types/index.d.ts +7 -5
  63. package/es/components/info-header/index.d.ts +48 -30
  64. package/es/components/info-header/src/InfoHeader.vue.d.ts +48 -30
  65. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +2 -2
  66. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +2 -2
  67. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +21 -12
  68. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +19 -10
  69. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  70. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  71. package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
  72. package/es/components/shortcut-setter/index.d.ts +21 -12
  73. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +21 -12
  74. package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +3 -0
  75. package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +1 -1
  76. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
  77. package/es/env.d.ts +25 -25
  78. package/es/shared/assets/img/failure.png.js +1 -1
  79. package/es/shared/assets/img/no-permission.png.js +1 -1
  80. package/es/shared/assets/img/nodata.png.js +1 -1
  81. package/es/shared/assets/img/notfound.png.js +1 -1
  82. package/es/shared/assets/img/qr.png.js +1 -1
  83. package/es/shared/assets/img/success.png.js +1 -1
  84. package/es/shared/assets/img/video.png.js +1 -1
  85. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  86. package/es/shared/assets/img/xb_big.png.js +1 -1
  87. package/es/shared/assets/img/xb_small.png.js +1 -1
  88. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  89. package/es/shared/hooks/useLevelSearchCascader.d.ts +2 -2
  90. package/es/shared/package.json.js +1 -1
  91. package/es/shared/types/business.d.ts +61 -53
  92. package/es/shared/utils/business.d.ts +11 -7
  93. package/es/shared/utils/business.js +1 -1
  94. package/es/shared/utils/fabricjs/index.d.ts +6823 -0
  95. package/es/shared/utils/index.js +1 -1
  96. package/es/shared/utils/tapable/index.d.ts +139 -0
  97. package/package.json +2 -2
  98. package/es/components/fabric-chart/src/hooks/electrocardiogram/constants/index.d.ts +0 -2
  99. package/es/components/fabric-chart/src/hooks/electrocardiogram/constants/index.js +0 -1
@@ -84,11 +84,11 @@ export declare function useFieldNormalize(): {
84
84
  businessFormatter: import("../types").FormBusinessFormatter;
85
85
  requestInstance: import("../../..").FormRequestDefine.RequestInstance;
86
86
  enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
87
- lowCodeReactions: import("../../../../../es/shared/types").FormLowCodeReactions.Config[];
87
+ lowCodeReactions: import("../../../../../es/shared/types").LowCodeTypes.reactionsConfig[];
88
88
  linebarAutoHidden: boolean;
89
89
  bordered: string | boolean;
90
90
  uniqueCacheData: boolean;
91
- operationalForm: import("../../../../../es/shared/types").FormOperationalConfig[];
91
+ operationalForm: import("../../../../../es/shared/types").LowCodeTypes.operationalConfig[];
92
92
  outBordered: boolean;
93
93
  forceClearable: boolean;
94
94
  }>], import("../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
@@ -175,11 +175,11 @@ export declare function useFieldNormalize(): {
175
175
  businessFormatter: import("../types").FormBusinessFormatter;
176
176
  requestInstance: import("../../..").FormRequestDefine.RequestInstance;
177
177
  enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
178
- lowCodeReactions: import("../../../../../es/shared/types").FormLowCodeReactions.Config[];
178
+ lowCodeReactions: import("../../../../../es/shared/types").LowCodeTypes.reactionsConfig[];
179
179
  linebarAutoHidden: boolean;
180
180
  bordered: string | boolean;
181
181
  uniqueCacheData: boolean;
182
- operationalForm: import("../../../../../es/shared/types").FormOperationalConfig[];
182
+ operationalForm: import("../../../../../es/shared/types").LowCodeTypes.operationalConfig[];
183
183
  outBordered: boolean;
184
184
  forceClearable: boolean;
185
185
  }>], import("../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
@@ -1,7 +1,7 @@
1
1
  import { AnyFn } from '../../../../../es/shared/types';
2
2
  import { DependKeyType } from '../../../../../es/components/form-render';
3
3
  export declare class FormItemDepsCollector {
4
- triggerDisabled: boolean;
4
+ triggerDisabled: string | boolean;
5
5
  private readonly collector;
6
6
  setDeps(key: string, dependKeys: DependKeyType, callback: AnyFn): void;
7
7
  getDeps(dependKey: string): Map<string, AnyFn<any[], any>> | undefined;
@@ -1 +1 @@
1
- import{isFunction as t}from"lodash-es";import"vue";import"../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"naive-ui";import"../../index.js";import"date-fns";import{traverseDependKey as e}from"../utils/schema.js";class r{constructor(){this.triggerDisabled=!1,this.collector=new Map}setDeps(t,r,i){e(r,(e=>{const r=this.collector.get(e)||new Map;r.set(t,i),this.collector.set(e,r)}))}getDeps(t){return this.collector.get(t)}trigger(e,r){var i;this.triggerDisabled||null==(i=this.getDeps(e))||i.forEach((e=>t(e)&&e(r)))}}function i(){return{create:function(){return new r}}}export{r as FormItemDepsCollector,i as useFormItemDeps};
1
+ import{Path as t}from"@formily/path";import{isFunction as e,isString as r}from"lodash-es";import"vue";import"../../../../shared/utils/index.js";import"@formily/core";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"naive-ui";import"../../index.js";import"date-fns";import{traverseDependKey as i}from"../utils/schema.js";class s{constructor(){this.triggerDisabled=!1,this.collector=new Map}setDeps(t,e,r){i(e,(e=>{const i=this.collector.get(e)||new Map;i.set(t,r),this.collector.set(e,i)}))}getDeps(t){return this.collector.get(t)}trigger(i,s){if(!0===this.triggerDisabled)return;const o=this.getDeps(i);o&&[...o.entries()].forEach((([i,o])=>{!e(o)||this.triggerDisabled&&r(this.triggerDisabled)&&t.parse(this.triggerDisabled).match(i)||o(s)}))}}function o(){return{create:function(){return new s}}}export{s as FormItemDepsCollector,o as useFormItemDeps};
@@ -1,5 +1,5 @@
1
1
  import { FormRequestDefine } from '../../../../../es/shared/hooks';
2
- import { AnyObject, FormWordbook, AnyFn } from '../../../../../es/shared/types';
2
+ import { AnyObject, AnyFn, LowCodeTypes } from '../../../../../es/shared/types';
3
3
  import { Ref } from 'vue';
4
4
  import { UrlConfig } from '../../../../../es/components/form-render';
5
5
  import { RecommendItem } from '../../../../../es/components/recommend-search/src/types';
@@ -46,7 +46,7 @@ export declare function useAutographOptions(props: Partial<{
46
46
  valueField: string;
47
47
  showField: string;
48
48
  requestCache: boolean;
49
- wordbook: FormWordbook;
49
+ wordbook: LowCodeTypes.wordbook;
50
50
  autograph: string;
51
51
  lazyRequest: boolean;
52
52
  options: AnyObject[];
@@ -1,7 +1,7 @@
1
- import { FormLowCodeReactions } from '../../../../../es/shared/types';
1
+ import { LowCodeTypes } from '../../../../../es/shared/types';
2
2
  import { Form } from '@formily/core';
3
3
  import { MaybeRef } from '@vueuse/core';
4
- export declare function useLowCodeReactions(configListRef: MaybeRef<FormLowCodeReactions.Config[] | undefined>, formModel: Form): {
4
+ export declare function useLowCodeReactions(configListRef: MaybeRef<LowCodeTypes.reactionsConfig[] | undefined>, formModel: Form): {
5
5
  lowCodeReactionsHandler: (field: string) => void;
6
6
  triggerAllReactionsHandler: () => void;
7
7
  };
@@ -1,7 +1,9 @@
1
- import { FormOperationalConfig } from '../../../../../es/shared/types';
1
+ import { LowCodeTypes } from '../../../../../es/shared/types';
2
2
  import { Form } from '@formily/core';
3
- import { ComputedRef } from 'vue';
4
- export declare function useOperationalForm(operationalForm: ComputedRef<FormOperationalConfig[] | undefined>, formModel: Form): {
5
- operationalFormHandler: (field: string) => void;
6
- triggerAllOperationalFormHandler: () => void;
3
+ export declare function useOperationalForm(props: {
4
+ operationalForm?: LowCodeTypes.operationalConfig[];
5
+ dateOperationalForm?: LowCodeTypes.dateOperationalConfig[];
6
+ }, formModel: Form): {
7
+ operationalFormHandler(fieldKey: string): void;
8
+ triggerAllOperationalFormHandler(): void;
7
9
  };
@@ -1 +1 @@
1
- import"../../../../shared/utils/index.js";import{getOperationalFormHandler as s}from"../../../../shared/utils/business.js";function e(e,t){return s(e,(s=>t.getValuesIn(s)),((s,e)=>t.setValuesIn(s,e)))}export{e as useOperationalForm};
1
+ import"../../../../shared/utils/index.js";import{isField as r}from"@formily/core";import{format as e}from"date-fns";import{isNumber as o,isDate as t}from"lodash-es";import{computed as a}from"vue";import{getOperationalFormHandler as l,getDateOperationalFormHandler as n}from"../../../../shared/utils/business.js";function i(i,m){const s=r=>m.getValuesIn(r),{triggerAllOperationalFormHandler:d,operationalFormHandler:p}=l(a((()=>i.operationalForm)),s,((r,e)=>m.setValuesIn(r,e))),{triggerAllDateOperationalFormHandler:u,dateOperationalFormHandler:f}=n(a((()=>i.dateOperationalForm)),s,((a,l)=>{var n,i,s;const d=m.query(a).take();if(!r(d))return;const[p]=d.component||[];if(["DATE","TIME"].includes(p)){const r=null!=(s=null==(i=null==(n=d.decoratorProps)?void 0:n.fieldItem)?void 0:i.date_format)?s:"yyyy-MM-dd";l=o(l)||t(l)?e(new Date(l),r):l}d.setValue(l)}));return{operationalFormHandler(r){p(r),f(r)},triggerAllOperationalFormHandler(){d(),u()}}}export{i as useOperationalForm};
@@ -2,5 +2,5 @@ import { Form } from '@formily/core';
2
2
  import { ContextCollector } from '../../../../../es/components/form-render';
3
3
  export declare function useWordbookSetting(formModel: Form, changeContextCollector: ContextCollector): {
4
4
  trigger: (fieldKey: string, value: unknown) => void;
5
- setDisabled: (value: boolean) => void;
5
+ setDisabled: (value: boolean | string) => void;
6
6
  };
@@ -1 +1 @@
1
- import{isField as t}from"@formily/core";function n(n,e){let r=!1;return{trigger:function(o,i){var l,u;if(r)return;const c=n.query(o).take();if(!t(c))return;const a=function(t){var n,e;return null==(e=null==(n=t.decoratorProps)?void 0:n.fieldItem)?void 0:e.wordbook}(c);(null==(u=null==(l=null==a?void 0:a.setting)?void 0:l.cascading)?void 0:u.length)&&a.setting.cascading.forEach((r=>{var l;const u=function(t,n){return Object.values(t.fields).find((t=>t.title===n))}(n,r["form.name"]);if(!u||!t(u))return;const c=null==(l=e.getContext(o,i))?void 0:l.currentOption;c&&u.setValue(c[r.value])}))},setDisabled:function(t){r=t}}}export{n as useWordbookSetting};
1
+ import{isField as t}from"@formily/core";import{Path as r}from"@formily/path";import{isString as n}from"lodash-es";function o(o,e){let i=!1;return{trigger:function(l,u){var a,c;if(!0===i)return;const f=o.query(l).take();if(!t(f))return;const s=function(t){var r,n;return null==(n=null==(r=t.decoratorProps)?void 0:r.fieldItem)?void 0:n.wordbook}(f);(null==(c=null==(a=null==s?void 0:s.setting)?void 0:a.cascading)?void 0:c.length)&&s.setting.cascading.forEach((a=>{var c;const f=function(t,r){return Object.values(t.fields).find((t=>t.title===r))}(o,a["form.name"]);if(!f||!t(f))return;if(i&&n(i)&&r.parse(i).match(f.path))return;const s=null==(c=e.getContext(l,u))?void 0:c.currentOption;s&&f.setValue(s[a.value])}))},setDisabled:function(t){i=t}}}export{o as useWordbookSetting};
@@ -1,5 +1,5 @@
1
1
  import { FormRequestDefine } from '../../../../../es/shared/hooks';
2
- import { AnyObject, ArrayAble, BindEventSettingItem, FormWordbook } from '../../../../../es/shared/types';
2
+ import { AnyObject, ArrayAble, LowCodeTypes } from '../../../../../es/shared/types';
3
3
  import { SchemaEffectTypes, SchemaTypes } from '@formily/vue';
4
4
  import { CSSProperties, VNode } from 'vue';
5
5
  import { DependKeyType, FormCommonState } from '../../../../../es/components/form-render';
@@ -104,7 +104,7 @@ export declare type FieldItem = {
104
104
  * 1.用于CASCADER控件提供层级参数
105
105
  * 2.用于SEARCH控件提供字段信息
106
106
  */
107
- wordbook: FormWordbook;
107
+ wordbook: LowCodeTypes.wordbook;
108
108
  open: SwitchProperty;
109
109
  close: SwitchProperty;
110
110
  date_format: string;
@@ -120,7 +120,7 @@ export declare type FieldItem = {
120
120
  free_entry: FormCommonState;
121
121
  save_free_entry: FormCommonState;
122
122
  initialize_high: number;
123
- bindEventSetting: BindEventSettingItem[];
123
+ bindEventSetting: LowCodeTypes.BindEventSettingItem[];
124
124
  show_mode: ShowModeType;
125
125
  is_allow_check_mid: FormCommonState;
126
126
  allow_check_mid_level: '1' | '2' | '3' | '4';
@@ -1,5 +1,5 @@
1
1
  import { FormRequestDefine } from '../../../../../es/shared/hooks';
2
- import { AnyObject, FormLowCodeReactions, FormOperationalConfig, UndefinedAble } from '../../../../../es/shared/types';
2
+ import { AnyObject, LowCodeTypes, UndefinedAble } from '../../../../../es/shared/types';
3
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';
@@ -56,9 +56,9 @@ export declare type FormRenderExpose = {
56
56
  */
57
57
  setFormValues(values: AnyObject, options?: Partial<{
58
58
  needSplitExtendKey: boolean;
59
- avoidBusinessConnection: boolean;
60
- avoidDependKeyConnection: boolean;
61
- avoidWordbookSettingConnection: boolean;
59
+ avoidBusinessConnection: boolean | string;
60
+ avoidDependKeyConnection: boolean | string;
61
+ avoidWordbookSettingConnection: boolean | string;
62
62
  overwrite: boolean;
63
63
  }> | boolean, avoidBusinessConnection?: boolean, overwrite?: boolean): any;
64
64
  /**
@@ -136,11 +136,11 @@ export declare type FormRenderProps = Partial<{
136
136
  businessFormatter: FormBusinessFormatter;
137
137
  requestInstance: FormRequestDefine.RequestInstance;
138
138
  enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
139
- lowCodeReactions: FormLowCodeReactions.Config[];
139
+ lowCodeReactions: LowCodeTypes.reactionsConfig[];
140
140
  linebarAutoHidden: boolean;
141
141
  bordered: boolean | string;
142
142
  uniqueCacheData: boolean;
143
- operationalForm: FormOperationalConfig[];
143
+ operationalForm: LowCodeTypes.operationalConfig[];
144
144
  outBordered: boolean;
145
145
  forceClearable: boolean;
146
146
  }>;
@@ -2214,12 +2214,26 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
2214
2214
  enable?: boolean | undefined;
2215
2215
  usePreset?: boolean | undefined;
2216
2216
  } | undefined;
2217
+ operationalForm?: {
2218
+ operationFormParam: string[];
2219
+ operationalRule: string;
2220
+ operationalPrecision: string;
2221
+ operationalResult: string;
2222
+ }[] | undefined;
2217
2223
  operationForm?: {
2218
2224
  operationFormParam: string[];
2219
2225
  operationalRule: string;
2220
2226
  operationalPrecision: string;
2221
2227
  operationalResult: string;
2222
2228
  }[] | undefined;
2229
+ dateOperationalForm?: {
2230
+ scene: "DIFF" | "CALC";
2231
+ precision: string;
2232
+ diffValUnit: "DAY" | "MIN" | "HOUR" | "DHM";
2233
+ diffValField: string;
2234
+ startDateField: string;
2235
+ endDateField: string;
2236
+ }[] | undefined;
2223
2237
  }>;
2224
2238
  updateConfigRefDebounced: () => void;
2225
2239
  updateConfigRef: () => void;
@@ -4657,12 +4671,26 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
4657
4671
  enable?: boolean | undefined;
4658
4672
  usePreset?: boolean | undefined;
4659
4673
  } | undefined;
4674
+ operationalForm?: {
4675
+ operationFormParam: string[];
4676
+ operationalRule: string;
4677
+ operationalPrecision: string;
4678
+ operationalResult: string;
4679
+ }[] | undefined;
4660
4680
  operationForm?: {
4661
4681
  operationFormParam: string[];
4662
4682
  operationalRule: string;
4663
4683
  operationalPrecision: string;
4664
4684
  operationalResult: string;
4665
4685
  }[] | undefined;
4686
+ dateOperationalForm?: {
4687
+ scene: "DIFF" | "CALC";
4688
+ precision: string;
4689
+ diffValUnit: "DAY" | "MIN" | "HOUR" | "DHM";
4690
+ diffValField: string;
4691
+ startDateField: string;
4692
+ endDateField: string;
4693
+ }[] | undefined;
4666
4694
  }>;
4667
4695
  configChanged: boolean;
4668
4696
  fieldChanged: boolean;
@@ -2215,12 +2215,26 @@ declare const _default: import("vue").DefineComponent<{
2215
2215
  enable?: boolean | undefined;
2216
2216
  usePreset?: boolean | undefined;
2217
2217
  } | undefined;
2218
+ operationalForm?: {
2219
+ operationFormParam: string[];
2220
+ operationalRule: string;
2221
+ operationalPrecision: string;
2222
+ operationalResult: string;
2223
+ }[] | undefined;
2218
2224
  operationForm?: {
2219
2225
  operationFormParam: string[];
2220
2226
  operationalRule: string;
2221
2227
  operationalPrecision: string;
2222
2228
  operationalResult: string;
2223
2229
  }[] | undefined;
2230
+ dateOperationalForm?: {
2231
+ scene: "DIFF" | "CALC";
2232
+ precision: string;
2233
+ diffValUnit: "DAY" | "MIN" | "HOUR" | "DHM";
2234
+ diffValField: string;
2235
+ startDateField: string;
2236
+ endDateField: string;
2237
+ }[] | undefined;
2224
2238
  }>;
2225
2239
  updateConfigRefDebounced: () => void;
2226
2240
  updateConfigRef: () => void;
@@ -4658,12 +4672,26 @@ declare const _default: import("vue").DefineComponent<{
4658
4672
  enable?: boolean | undefined;
4659
4673
  usePreset?: boolean | undefined;
4660
4674
  } | undefined;
4675
+ operationalForm?: {
4676
+ operationFormParam: string[];
4677
+ operationalRule: string;
4678
+ operationalPrecision: string;
4679
+ operationalResult: string;
4680
+ }[] | undefined;
4661
4681
  operationForm?: {
4662
4682
  operationFormParam: string[];
4663
4683
  operationalRule: string;
4664
4684
  operationalPrecision: string;
4665
4685
  operationalResult: string;
4666
4686
  }[] | undefined;
4687
+ dateOperationalForm?: {
4688
+ scene: "DIFF" | "CALC";
4689
+ precision: string;
4690
+ diffValUnit: "DAY" | "MIN" | "HOUR" | "DHM";
4691
+ diffValField: string;
4692
+ startDateField: string;
4693
+ endDateField: string;
4694
+ }[] | undefined;
4667
4695
  }>;
4668
4696
  configChanged: boolean;
4669
4697
  fieldChanged: boolean;
@@ -1 +1 @@
1
- import"../../../../../shared/utils/index.js";import"../../../index.js";import{isFunction as o}from"lodash-es";import{defineTablePlugin as n}from"../../hooks/useTablePlugin.js";import{getOperationalFormHandler as r}from"../../../../../shared/utils/business.js";function e(){const e="operationalFormPlugin";return n({name:e,apply(n){n.configHooks.config.tap(e,(n=>{const e=n.onFormChange;return n.onFormChange=function(t){const{column:i,row:s,$table:m}=t;!function(o,e){return r(n.operationForm,(n=>o[n]),((n,r)=>{e.getColumns().some((o=>o.field===n))&&(o[n]=r)})).operationalFormHandler}(s,m)(i.field),o(e)&&e(t)},n}))}})}export{e as operationalFormPlugin};
1
+ import"../../../../../shared/utils/index.js";import{format as o}from"date-fns";import"../../../index.js";import{isFunction as n,isNumber as t,isDate as e}from"lodash-es";import{EDITABLE_WIDGET_TYPE as r}from"../../constants/index.js";import{getLowCodeFieldFromField as i,IhoTableUtils as s}from"../../utils/index.js";import{defineTablePlugin as a}from"../../hooks/useTablePlugin.js";import{getOperationalFormHandler as m,getDateOperationalFormHandler as l}from"../../../../../shared/utils/business.js";function u(){const u="operationalFormPlugin";return a({name:u,apply(a){a.configHooks.config.tap(u,(a=>{const u=a.onFormChange;return a.onFormChange=function(d){const{column:p,row:f,$table:c}=d;!function(n,u){const{operationalFormHandler:d}=m(a.operationalForm||a.operationForm,(o=>n[o]),((o,t)=>{u.getColumns().some((n=>n.field===o))&&(n[o]=t)})),{dateOperationalFormHandler:p}=l(a.dateOperationalForm,(o=>n[o]),((a,m)=>{const l=u.getColumns().find((o=>o.field===a));if(!l)return;const d=i(l);d&&[r.DATE,r.TIME].includes(s.getCellType(d))&&(m=t(m)||e(m)?o(new Date(m),d.valueFormat||"yyyy-MM-dd HH:mm:ss"):null),n[a]=m}));return function(o){d(o),p(o)}}(f,c)(p.field),n(u)&&u(d)},a}))}})}export{u as operationalFormPlugin};
@@ -44,7 +44,7 @@ declare const _default: import("vue").DefineComponent<{
44
44
  emitFormChangeWithParams: (params?: AnyObject) => void;
45
45
  emit: (event: "update:value", ...args: any[]) => void;
46
46
  formRef: import("vue").Ref<any>;
47
- formattedValue: import("vue").WritableComputedRef<string | undefined>;
47
+ formattedValue: import("vue").WritableComputedRef<string | null | undefined>;
48
48
  formatConfig: import("vue").ComputedRef<{
49
49
  valueFormat: string;
50
50
  format: string;
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as t,inject as r,ref as i,computed as a,onMounted as l,openBlock as o,createBlock as n,unref as u,mergeProps as s,isRef as d}from"vue";import{generateTimeFormat as m}from"../../../../../../../shared/utils/index.js";import{isFunction as p}from"lodash-es";import{useIhoTableFormEvent as c}from"../../../../utils/index.js";import v from"../../../../../../date-picker/index.js";var f=e({__name:"editDate",props:{value:{type:String,default:void 0},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0}},emits:["update:value"],setup(e,{emit:f}){const w=e,D=t(),b=r("$xetable"),{emitFormChangeWithParams:y}=c({...w,$table:b}),g=i(),$=a({get:()=>w.value,set(e){const t=w.value;t!==e&&(f("update:value",e),y({oldValue:t}))}}),T=a((()=>{const e=D.valueFormat||"yyyy-MM-dd HH:mm:ss";return{valueFormat:e,format:e,timePickerProps:{format:m(e)}}})),{isStartDate:h=!1,isEndDate:x=!1}=D,j=D.connectField||"",S=(e,t)=>h&&j?e>t:!(!x||!j)&&e<t,k=e=>{const t=new Date(w.row[j]),r=new Date(e),{h:i,m:a,s:l}=H(t),o=(e,t,r,i)=>!(x&&r>i)&&(!(h&&r<i)&&S(e,t));return{isHourDisabled:t=>{if(!w.row[j])return!1;const a=new Date(`${w.row[j].split(" ")[0]} 00:00:00`).getTime(),{m:l,s:n}=H(r);return o(t,i,e-60*t*60*1e3-60*l*1e3-1e3*n,a)},isMinuteDisabled:t=>{if(!w.row[j])return!1;const l=new Date(`${w.row[j].split(" ")[0]} ${i}:00:00`).getTime(),{s:n}=H(r);return o(t,a,e-60*t*1e3-1e3*n,l)},isSecondDisabled:t=>{if(!w.row[j])return!1;const r=new Date(`${w.row[j].split(" ")[0]} ${i}:${a}:00`).getTime();return o(t,l,e-1e3*t,r)}}},q={type:D.type||"datetime",clearable:!0,allowedInvalidValue:"-",...D,...T.value,isDateDisabled:F(D.isDateDisabled)||(e=>!!w.row[j]&&S(e,x?new Date(`${w.row[j].split(" ")[0]} 00:00:00`).getTime():new Date(w.row[j]).getTime()))};function F(e){return p(e)?t=>e(t,w.row):null}function H(e){return{h:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}return q.type.includes("time")&&(q.isTimeDisabled=F(D.isTimeDisabled)||k),l((()=>{var e,t,r,i,a,l,o;return null==(o=null==(a=null==(r=null==(t=null==(e=g.value)?void 0:e.$datePicker)?void 0:t.inputInstRef)?void 0:(i=r.$el).querySelector)?void 0:(l=a.call(i,"input")).select)?void 0:o.call(l)})),(e,t)=>(o(),n(u(v),s({ref_key:"formRef",ref:g},u(q),{"formatted-value":u($),"onUpdate:formatted-value":t[0]||(t[0]=e=>d($)?$.value=e:null)}),null,16,["formatted-value"]))}});export{f as default};
1
+ import{defineComponent as e,useAttrs as t,inject as r,ref as a,computed as i,openBlock as o,createBlock as s,unref as n,mergeProps as l,isRef as u}from"vue";import{generateTimeFormat as m}from"../../../../../../../shared/utils/index.js";import{isFunction as d}from"lodash-es";import{useIhoTableFormEvent as p}from"../../../../utils/index.js";import f from"../../../../../../date-picker/index.js";var w=e({__name:"editDate",props:{value:{type:String,default:void 0},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0}},emits:["update:value"],setup(e,{emit:w}){const c=e,D=t(),v=r("$xetable"),{emitFormChangeWithParams:b}=p({...c,$table:v}),y=a(),g=i({get:()=>c.value?c.value:null,set(e){const t=c.value;t!==e&&(w("update:value",e),b({oldValue:t}))}}),$=i((()=>{const e=D.valueFormat||"yyyy-MM-dd HH:mm:ss";return{valueFormat:e,format:e,timePickerProps:{format:m(e)}}})),{isStartDate:T=!1,isEndDate:h=!1}=D,x=D.connectField||"",j=(e,t)=>T&&x?e>t:!(!h||!x)&&e<t,F=e=>{const t=new Date(c.row[x]),r=new Date(e),{h:a,m:i,s:o}=S(t),s=(e,t,r,a)=>!(h&&r>a)&&(!(T&&r<a)&&j(e,t));return{isHourDisabled:t=>{if(!c.row[x])return!1;const i=new Date(`${c.row[x].split(" ")[0]} 00:00:00`).getTime(),{m:o,s:n}=S(r);return s(t,a,e-60*t*60*1e3-60*o*1e3-1e3*n,i)},isMinuteDisabled:t=>{if(!c.row[x])return!1;const o=new Date(`${c.row[x].split(" ")[0]} ${a}:00:00`).getTime(),{s:n}=S(r);return s(t,i,e-60*t*1e3-1e3*n,o)},isSecondDisabled:t=>{if(!c.row[x])return!1;const r=new Date(`${c.row[x].split(" ")[0]} ${a}:${i}:00`).getTime();return s(t,o,e-1e3*t,r)}}},H={type:D.type||"datetime",clearable:!0,allowedInvalidValue:"-",...D,...$.value,isDateDisabled:M(D.isDateDisabled)||(e=>!!c.row[x]&&j(e,h?new Date(`${c.row[x].split(" ")[0]} 00:00:00`).getTime():new Date(c.row[x]).getTime()))};function M(e){return d(e)?t=>e(t,c.row):null}function S(e){return{h:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}return H.type.includes("time")&&(H.isTimeDisabled=M(D.isTimeDisabled)||F),(e,t)=>(o(),s(n(f),l({ref_key:"formRef",ref:y},n(H),{"formatted-value":n(g),"onUpdate:formatted-value":t[0]||(t[0]=e=>u(g)?g.value=e:null)}),null,16,["formatted-value"]))}});export{w as default};
@@ -1 +1 @@
1
- import{createVNode as e,mergeProps as o}from"vue";import{format as n}from"date-fns";import{isFunction as t}from"lodash-es";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as r}from"../../../../constants/index.js";import{createIhoTableClearActivedInterceptor as i,IhoTableRenderHelper as d,isInvalidDate as l,getLowCodeFieldFromField as a}from"../../../../utils/index.js";import m from"./editDate.vue.js";import{defineTablePlugin as u}from"../../../../hooks/useTablePlugin.js";function s(){const s="dateRendererPlugin";return u({name:s,vxe(n){n.interceptor.add("event.clearActived",i(r.DATE,(e=>e.classList.contains("n-date-panel")))),n.renderer.add(r.DATE,{renderCell:d.createDefaultRenderCell(),renderEdit:d.createRenderEdit((({fieldItem:n,emitFormClick:t,row:r,column:i,$rowIndex:d})=>[e(m,o({value:r[i.field],"onUpdate:value":e=>r[i.field]=e,isStartDate:n.isStartDate,isEndDate:n.isEndDate,connectField:n.connectField,valueFormat:n.valueFormat},n.componentProps,{column:i,row:r,"row-index":d,onClick:t}),null)]))})},apply(e){e.eventHooks.onCellDblclick.tap(s,(({row:e,column:o,columnIndex:i,rowIndex:d,$rowIndex:m},u,{$table:s,emits:c})=>{var f,p,v,x;if((null==(f=o.editRender)?void 0:f.name)!==r.DATE||e[o.field])return;if(t(null==(p=u.editConfig)?void 0:p.beforeEditMethod)){if(!(null==(v=u.editConfig)?void 0:v.beforeEditMethod({row:e,column:o,columnIndex:i,rowIndex:d,$table:s,$grid:s})))return}const w=new Date;if(l(o,e,w))return;const D=e[o.field];e[o.field]=n(w,(null==(x=a(o))?void 0:x.valueFormat)||"yyyy-MM-dd HH:mm:ss"),c("formChange",{oldValue:D,index:d>-1?d:m,value:e[o.field],row:e,column:o,$table:s})}))}})}export{s as dateRendererPlugin};
1
+ import{createVNode as e,mergeProps as o}from"vue";import{format as t}from"date-fns";import{isFunction as n}from"lodash-es";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as r}from"../../../../constants/index.js";import{useAutoFocus as i}from"../hooks/useAutoFocus.js";import{createIhoTableClearActivedInterceptor as d,IhoTableRenderHelper as l,isInvalidDate as a,getLowCodeFieldFromField as u}from"../../../../utils/index.js";import m from"./editDate.vue.js";import{defineTablePlugin as s}from"../../../../hooks/useTablePlugin.js";function c(){const c="dateRendererPlugin";return s({name:c,vxe(t){t.interceptor.add("event.clearActived",d(r.DATE,(e=>e.classList.contains("n-date-panel")))),t.renderer.add(r.DATE,{renderCell:l.createDefaultRenderCell(),renderEdit:l.createRenderEdit((({fieldItem:t,emitFormClick:n,row:r,column:i,$rowIndex:d})=>[e(m,o({value:r[i.field],"onUpdate:value":e=>r[i.field]=e,isStartDate:t.isStartDate,isEndDate:t.isEndDate,connectField:t.connectField,valueFormat:t.valueFormat},t.componentProps,{column:i,row:r,"row-index":d,onClick:n}),null)]))})},apply(e){i(e).bindAutoFocusConfig(c,r.DATE,".n-input__input-el",{after:e=>(Reflect.set(e.editRender,"autoselect",!0),e)}),e.eventHooks.onCellDblclick.tap(c,(({row:e,column:o,columnIndex:i,rowIndex:d,$rowIndex:l},m,{$table:s,emits:c})=>{var f,p,v,x;if((null==(f=o.editRender)?void 0:f.name)!==r.DATE||e[o.field])return;if(n(null==(p=m.editConfig)?void 0:p.beforeEditMethod)){if(!(null==(v=m.editConfig)?void 0:v.beforeEditMethod({row:e,column:o,columnIndex:i,rowIndex:d,$table:s,$grid:s})))return}const D=new Date;if(a(o,e,D))return;const w=e[o.field];e[o.field]=t(D,(null==(x=u(o))?void 0:x.valueFormat)||"yyyy-MM-dd HH:mm:ss"),c("formChange",{oldValue:w,index:d>-1?d:l,value:e[o.field],row:e,column:o,$table:s})}))}})}export{c as dateRendererPlugin};
@@ -61,6 +61,7 @@ declare const _default: import("vue").DefineComponent<{
61
61
  timeConfig: AnyObject;
62
62
  clickShortcutOption: (item: string) => void;
63
63
  onUpdateFormattedValue: (value: string) => void;
64
+ isDisabled: (value: string) => boolean;
64
65
  onChange: () => void;
65
66
  onKeydown: (event: KeyboardEvent) => void;
66
67
  NInput: any;
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as l,inject as t,ref as a,watch as r,nextTick as o,openBlock as u,createBlock as i,unref as n,withCtx as m,createVNode as c,mergeProps as d,createElementBlock as v,Fragment as f,renderList as s,createTextVNode as p,toDisplayString as h,createCommentVNode as k}from"vue";import{NPopover as y,NInput as _,NSpace as w,NScrollbar as b,NButton as g}from"naive-ui";import{useIhoTableFormEvent as V}from"../../../../utils/index.js";import C from"../../../../../../time-picker/index.js";import{parse as F,isValid as q,format as x}from"date-fns";var O=e({__name:"editTime",props:{formattedValue:{type:String},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0},shortcutOptions:{type:Array,default:()=>[]}},emits:["update:formattedValue","click"],setup(e,{emit:O}){const j=e,$=l(),A=t("$xetable"),{emitFormChangeWithParams:I}=V({...j,$table:A}),P=a(null),R=a(!1),S=a(),E=a(),H=a();let U=j.formattedValue;const{placeholder:z="请选择",valueFormat:D="HH:mm"}=$,K={...$,placeholder:z,valueFormat:D,format:D};function M(e){if(H.value=e,U===e)return;const l=e||null;O("update:formattedValue",l),I({oldValue:U}),U=l}function N(){[K.valueFormat.replace(/:/,""),K.valueFormat].some((e=>{const l=F(E.value,e,new Date);if(!E.value||q(l)){return M(E.value?x(l,K.valueFormat):""),!0}return!1}))}function T(e){var l;const{key:t}=e;"Enter"===t&&(null==(l=P.value)||l.blur(),R.value=!1)}return r((()=>j.formattedValue),(e=>{E.value=e,H.value=e}),{immediate:!0}),r((()=>R.value),(async e=>{var l,t,a,r,u;e&&(await o(),null==(u=null==(r=null==(a=null==(t=null==(l=S.value)?void 0:l.$timePicker)?void 0:t.panelInstRef)?void 0:a.$el)?void 0:r.querySelectorAll(".n-time-picker-col"))||u.forEach((e=>{var l,t;return null==(t=null==(l=null==e?void 0:e.querySelector)?void 0:l.call(e,".n-time-picker-col__item--active"))?void 0:t.scrollIntoView()})))})),(l,t)=>(u(),i(n(y),{show:R.value,trigger:"click",showArrow:!1,placement:"bottom-start",style:{padding:"0"},onClickoutside:t[3]||(t[3]=()=>R.value=!1)},{trigger:m((()=>[c(n(_),{ref_key:"formRef",ref:P,clearable:"",placeholder:n(z),value:E.value,"onUpdate:value":t[0]||(t[0]=e=>E.value=e),valueModifiers:{trim:!0},onClick:t[1]||(t[1]=()=>R.value=!0),onChange:N,onKeydown:T},null,8,["placeholder","value"])])),default:m((()=>[c(n(w),null,{default:m((()=>[c(n(C),d({ref_key:"timePickerRef",ref:S,show:"","formatted-value":H.value},n(K),{class:"iho-table__time-picker",to:!1,"onUpdate:formattedValue":M,onConfirm:t[2]||(t[2]=()=>R.value=!1)}),null,16,["formatted-value"]),c(n(b),{class:"iho-table__scrollbar"},{default:m((()=>[e.shortcutOptions.length?(u(),i(n(w),{key:0,vertical:"",wrap:!1},{default:m((()=>[(u(!0),v(f,null,s(e.shortcutOptions,(e=>(u(),i(n(g),{size:"tiny",key:e,onClick:l=>function(e){M(e),R.value=!1}(e)},{default:m((()=>[p(h(e),1)])),_:2},1032,["onClick"])))),128))])),_:1})):k("v-if",!0)])),_:1})])),_:1})])),_:1},8,["show"]))}});export{O as default};
1
+ import{defineComponent as e,useAttrs as l,inject as t,ref as a,watch as r,nextTick as o,openBlock as u,createBlock as i,unref as n,withCtx as d,createVNode as c,mergeProps as m,createElementBlock as v,Fragment as s,renderList as f,createTextVNode as p,toDisplayString as h,createCommentVNode as k}from"vue";import{NPopover as y,NInput as b,NSpace as _,NScrollbar as w,NButton as g}from"naive-ui";import{useIhoTableFormEvent as V}from"../../../../utils/index.js";import C from"../../../../../../time-picker/index.js";import{parse as F,getHours as q,getMinutes as x,getSeconds as D,isValid as O,format as j}from"date-fns";var S=e({__name:"editTime",props:{formattedValue:{type:String},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0},shortcutOptions:{type:Array,default:()=>[]}},emits:["update:formattedValue","click"],setup(e,{emit:S}){const $=e,A=l(),H=t("$xetable"),{emitFormChangeWithParams:I}=V({...$,$table:H}),P=a(null),R=a(!1),E=a(),M=a(),U=a();let z=$.formattedValue;const{placeholder:K="请选择",valueFormat:N="HH:mm"}=A,T={...A,placeholder:K,valueFormat:N,format:N};function W(e){if(e&&B(e))return;if(U.value=e,z===e)return;const l=e||null;S("update:formattedValue",l),I({oldValue:z}),z=l}function B(e){var l,t,a;const r=F(e,T.format,new Date),o=q(r),u=x(r),i=D(r),n=null==(l=T.isHourDisabled)?void 0:l.call(T,o),d=null==(t=T.isMinuteDisabled)?void 0:t.call(T,u,o),c=null==(a=T.isSecondDisabled)?void 0:a.call(T,i,u,o);return!!n||(!!d||!!c)}function G(){[T.valueFormat.replace(/:/,""),T.valueFormat].some((e=>{const l=F(M.value,e,new Date);if(!M.value||O(l)){return W(M.value?j(l,T.valueFormat):""),!0}return!1}))}function J(e){var l;const{key:t}=e;"Enter"===t&&(null==(l=P.value)||l.blur(),R.value=!1)}return r((()=>$.formattedValue),(e=>{M.value=e,U.value=e}),{immediate:!0}),r((()=>R.value),(async e=>{var l,t,a,r,u;e&&(await o(),null==(u=null==(r=null==(a=null==(t=null==(l=E.value)?void 0:l.$timePicker)?void 0:t.panelInstRef)?void 0:a.$el)?void 0:r.querySelectorAll(".n-time-picker-col"))||u.forEach((e=>{var l,t;return null==(t=null==(l=null==e?void 0:e.querySelector)?void 0:l.call(e,".n-time-picker-col__item--active"))?void 0:t.scrollIntoView()})))})),(l,t)=>(u(),i(n(y),{show:R.value,trigger:"click",showArrow:!1,placement:"bottom-start",style:{padding:"0"},onClickoutside:t[3]||(t[3]=()=>R.value=!1)},{trigger:d((()=>[c(n(b),{ref_key:"formRef",ref:P,clearable:"",placeholder:n(K),value:M.value,"onUpdate:value":t[0]||(t[0]=e=>M.value=e),valueModifiers:{trim:!0},onClick:t[1]||(t[1]=()=>R.value=!0),onChange:G,onKeydown:J},null,8,["placeholder","value"])])),default:d((()=>[c(n(_),null,{default:d((()=>[c(n(C),m({ref_key:"timePickerRef",ref:E,show:"","formatted-value":U.value},n(T),{class:"iho-table__time-picker",to:!1,"onUpdate:formattedValue":W,onConfirm:t[2]||(t[2]=()=>R.value=!1)}),null,16,["formatted-value"]),c(n(w),{class:"iho-table__scrollbar"},{default:d((()=>[e.shortcutOptions.length?(u(),i(n(_),{key:0,vertical:"",wrap:!1},{default:d((()=>[(u(!0),v(s,null,f(e.shortcutOptions,(e=>(u(),i(n(g),{size:"tiny",key:e,disabled:B(e),onClick:l=>function(e){W(e),R.value=!1}(e)},{default:d((()=>[p(h(e),1)])),_:2},1032,["disabled","onClick"])))),128))])),_:1})):k("v-if",!0)])),_:1})])),_:1})])),_:1},8,["show"]))}});export{S as default};
@@ -1 +1 @@
1
- import{createVNode as n}from"vue";import"../../../../../../shared/utils/index.js";import{isObject as o,isArray as e}from"lodash-es";import"../../../../index.js";import{WIDGET_TYPE as t}from"../../../constants/index.js";import{parseMergeField as r,isRichContent as i,parseRichContent as l,getTitle as s}from"../../../utils/index.js";import{isMatchLowCodeCondition as c}from"../../../../../../shared/utils/business.js";import{defineTablePlugin as d}from"../../../hooks/useTablePlugin.js";function u(){return d({name:"defaultRendererPlugin",vxe(d){d.renderer.add(t.DEFAULT,{renderCell(t,{row:d,column:u}){const a=r(d,u),f=i(a)?function(o,e){const t=l(o);return[n("span",{title:s(e,t.change_text),style:{color:t.background||t.icon}},[r(t.icon),t.change_text])];function r(o){return o?o.match(/#[\da-f]{6}|[\da-f]{3}/i)?n("i",{class:"icon-dot",style:{"--table-icon-color":o,"--table-icon-shadow":o}},null):n("i",{class:t.icon},null):null}}(a,u):[a];return function(o,t,r,i){if(!e(o)||!o.length)return n("span",{title:s(r,i)},[i]);const l=o.find((n=>n.condition&&n.condition.find((n=>{const o=t[n.field_key||r.field];return c(o,n)}))));return n("span",l?{title:s(r,i),style:{color:l.color},class:l.icon}:{title:s(r,i)},[i])}(function(n){var e,t,r;const i=null==(e=n.editRender)?void 0:e.props;if(!o(i))return;return null!=(r=i.colorAndIcon)?r:null==(t=i.settingObj)?void 0:t.colorAndIcon}(u),d,u,f)}}),d.renderer.add(t.STATUS,d.renderer.get(t.DEFAULT))}})}export{u as defaultRendererPlugin};
1
+ import{createVNode as n}from"vue";import"../../../../../../shared/utils/index.js";import{isObject as o,isArray as t}from"lodash-es";import"../../../../index.js";import{WIDGET_TYPE as e}from"../../../constants/index.js";import{parseMergeField as r,isRichContent as i,parseRichContent as l,getTitle as s}from"../../../utils/index.js";import{isMatchLowCodeCondition as c}from"../../../../../../shared/utils/business.js";import{defineTablePlugin as d}from"../../../hooks/useTablePlugin.js";function u(){return d({name:"defaultRendererPlugin",vxe(d){d.renderer.add(e.DEFAULT,{renderCell(e,{row:d,column:u}){const a=r(d,u),f=i(a)?function(o,t){const e=l(o);return[n("span",{title:s(t,e.change_text),style:{color:e.background||e.icon}},[r(e.icon),e.change_text])];function r(o){return o?o.match(/#[\da-f]{6}|[\da-f]{3}/i)?n("i",{class:"icon-dot",style:{"--table-icon-color":o,"--table-icon-shadow":o}},null):n("i",{class:e.icon},null):null}}(a,u):[a];return function(e,r,i,l){if(l=o(l)?String(l):null==l?"":l+"",!t(e)||!e.length)return n("span",{title:String(s(i,l))},[l]);const d=e.find((n=>n.condition&&n.condition.find((n=>{const o=r[n.field_key||i.field];return c(o,n)}))));return n("span",d?{title:s(i,l),style:{color:d.color},class:d.icon}:{title:s(i,l)},[l])}(function(n){var t,e,r;const i=null==(t=n.editRender)?void 0:t.props;if(!o(i))return;return null!=(r=i.colorAndIcon)?r:null==(e=i.settingObj)?void 0:e.colorAndIcon}(u),d,u,f)}}),d.renderer.add(e.STATUS,d.renderer.get(e.DEFAULT))}})}export{u as defaultRendererPlugin};
@@ -1,4 +1,4 @@
1
- import { AnyObject, ArrayAble, BindEventSettingItem, FormOperationalConfig, FormWordbook, AnyFn, LOW_CODE_VALUE_RELATION, MaybeString, TupleToUnion } from '../../../../../es/shared/types';
1
+ import { AnyObject, ArrayAble, AnyFn, MaybeString, LowCodeTypes, TupleToUnion } from '../../../../../es/shared/types';
2
2
  import { VxeTableProps, VxeTableDefines, VxeTableInstance, VxeColumnPropTypes, VxeTablePropTypes, VxeTableConstructor } from 'vxe-table';
3
3
  import { VxePagerEventProps } from 'vxe-table/types/pager';
4
4
  import { VxeTableEventProps, VxeTableListeners, VxeTablePrivateMethods } from 'vxe-table/types/table';
@@ -36,7 +36,9 @@ export declare type IhoTableConfig = VxeTableProps & Partial<{
36
36
  usePreset: boolean;
37
37
  [K: string]: any;
38
38
  }>;
39
- operationForm: FormOperationalConfig[];
39
+ operationalForm: LowCodeTypes.operationalConfig[];
40
+ operationForm: LowCodeTypes.operationalConfig[];
41
+ dateOperationalForm: LowCodeTypes.dateOperationalConfig[];
40
42
  checkboxConfig: Partial<VxeTableProps['checkboxConfig'] & {
41
43
  slots: VxeColumnPropTypes.Slots;
42
44
  maxCheckSize: number;
@@ -75,7 +77,7 @@ export declare namespace IhoTableLowCodeField {
75
77
  }>;
76
78
  type ColorAndIconItem = Partial<{
77
79
  condition: {
78
- con: LOW_CODE_VALUE_RELATION;
80
+ con: LowCodeTypes.VALUE_RELATION;
79
81
  value: unknown;
80
82
  field_key?: string;
81
83
  }[];
@@ -149,12 +151,12 @@ export declare type LowCodeTableFieldItem = {
149
151
  colorAndIcon: IhoTableLowCodeField.ColorAndIconItem[];
150
152
  variableHeight: boolean | '0' | '1';
151
153
  filterSetting: IhoTableLowCodeField.FilterSetting;
152
- bindEventSetting: BindEventSettingItem[];
154
+ bindEventSetting: LowCodeTypes.BindEventSettingItem[];
153
155
  allowSlash: boolean | string;
154
156
  whiteList: string[];
155
157
  defaultValue: any;
156
158
  autograph: string;
157
- wordbook: FormWordbook;
159
+ wordbook: LowCodeTypes.wordbook;
158
160
  requestCache: boolean;
159
161
  lazyRequest: boolean;
160
162
  }> & Partial<VxeTableDefines.ColumnInfo>;