cnhis-design-vue 3.1.33-beta.9 → 3.1.34-beta.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 (150) hide show
  1. package/README.md +123 -123
  2. package/es/components/big-table/index.d.ts +1 -1
  3. package/es/components/big-table/src/BigTable.vue.d.ts +1 -1
  4. package/es/components/big-table/src/BigTable.vue2.js +7 -9
  5. package/es/components/big-table/src/components/edit-form/edit-input.js +1 -1
  6. package/es/components/big-table/src/components/edit-form/edit-select.js +1 -1
  7. package/es/components/big-table/src/components/edit-form/edit-time.js +5 -3
  8. package/es/components/big-table/src/components/edit-form/useCommon.d.ts +2 -1
  9. package/es/components/big-table/src/components/edit-form/useCommon.js +7 -3
  10. package/es/components/big-table/src/hooks/useFormat.js +1 -1
  11. package/es/components/button-print/index.d.ts +13 -0
  12. package/es/components/button-print/src/ButtonPrint.vue.d.ts +13 -0
  13. package/es/components/button-print/src/ButtonPrint.vue2.js +8 -1
  14. package/es/components/button-print/src/utils/print.d.ts +2 -2
  15. package/es/components/button-print/src/utils/print.js +7 -4
  16. package/es/components/fabric-chart/index.d.ts +133 -2
  17. package/es/components/fabric-chart/src/BirthProcessChart.vue.d.ts +132 -0
  18. package/es/components/fabric-chart/src/BirthProcessChart.vue.js +62 -8
  19. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +133 -2
  20. package/es/components/fabric-chart/src/FabricChart.vue.js +2 -2
  21. package/es/components/fabric-chart/src/TemperatureChart.vue.d.ts +1 -2
  22. package/es/components/fabric-chart/src/TemperatureChart.vue.js +17 -9
  23. package/es/components/fabric-chart/src/components/PopupMenu.js +2 -2
  24. package/es/components/fabric-chart/src/components/PopupTip.vue.d.ts +3 -2
  25. package/es/components/fabric-chart/src/hooks/index.d.ts +1 -0
  26. package/es/components/fabric-chart/src/hooks/index.js +1 -0
  27. package/es/components/fabric-chart/src/hooks/useBirthProcess.d.ts +23 -1
  28. package/es/components/fabric-chart/src/hooks/useBirthProcess.js +305 -9
  29. package/es/components/fabric-chart/src/hooks/useCenter.d.ts +0 -2
  30. package/es/components/fabric-chart/src/hooks/useCenter.js +27 -45
  31. package/es/components/fabric-chart/src/hooks/useCommon.d.ts +8 -0
  32. package/es/components/fabric-chart/src/hooks/useCommon.js +32 -0
  33. package/es/components/fabric-chart/src/hooks/useCumputedPoint.d.ts +5 -2
  34. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +27 -10
  35. package/es/components/fabric-chart/src/hooks/useLeft.d.ts +1 -1
  36. package/es/components/fabric-chart/src/hooks/useLeft.js +12 -7
  37. package/es/components/fabric-chart/src/interface.d.ts +1 -0
  38. package/es/components/fabric-chart/src/utils/utils.d.ts +11 -0
  39. package/es/components/fabric-chart/src/utils/utils.js +27 -0
  40. package/es/components/iho-table/index.d.ts +4 -3
  41. package/es/components/iho-table/src/IhoTable.vue.d.ts +4 -3
  42. package/es/components/iho-table/src/IhoTable.vue.js +6 -4
  43. package/es/components/iho-table/src/components/IhoTableColumn.js +1 -1
  44. package/es/components/iho-table/src/constants/index.d.ts +3 -3
  45. package/es/components/iho-table/src/constants/index.js +0 -1
  46. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +5 -1
  47. package/es/components/iho-table/src/hooks/tapHooks/index.js +10 -9
  48. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +2 -2
  49. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +119 -119
  50. package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +5 -3
  51. package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.js +1 -1
  52. package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.d.ts +16 -4
  53. package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.js +9 -4
  54. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +6 -1
  55. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
  56. package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.d.ts +51 -24
  57. package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.js +37 -51
  58. package/es/components/iho-table/src/plugins/filterPlugin/index.js +181 -20
  59. package/es/components/iho-table/src/plugins/filterPlugin/types.d.ts +2 -6
  60. package/es/components/iho-table/src/plugins/filterPlugin/types.js +0 -7
  61. package/es/components/iho-table/src/plugins/index.js +1 -1
  62. package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -1
  63. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +7 -4
  64. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +8 -8
  65. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +8 -12
  66. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +2 -2
  67. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/{useCommon.d.ts → useAutoFocus.d.ts} +2 -1
  68. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/{useCommon.js → useAutoFocus.js} +6 -2
  69. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +4 -2
  70. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +11 -5
  71. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +5 -5
  72. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +14 -15
  73. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +2 -2
  74. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +9 -9
  75. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.js +9 -10
  76. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +5 -5
  77. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js +7 -1
  78. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +3 -5
  79. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +5 -2
  80. package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.js +7 -4
  81. package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +1 -1
  82. package/es/components/iho-table/src/types/index.d.ts +10 -12
  83. package/es/components/iho-table/src/types/pluginType.d.ts +28 -12
  84. package/es/components/iho-table/src/utils/index.d.ts +5 -10
  85. package/es/components/iho-table/src/utils/index.js +19 -26
  86. package/es/components/iho-table/style/index.css +1 -1
  87. package/es/components/index.css +1 -1
  88. package/es/components/info-header/src/InfoHeader.vue.js +1 -1
  89. package/es/components/info-header/style/index.css +1 -1
  90. package/es/components/keyboard/index.d.ts +62 -1
  91. package/es/components/keyboard/src/Keyboard.vue.d.ts +62 -1
  92. package/es/components/keyboard/src/Keyboard.vue.js +4 -1
  93. package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +67 -5
  94. package/es/components/keyboard/src/components/NumberPanel.vue.js +48 -26
  95. package/es/components/keyboard/style/index.css +1 -1
  96. package/es/components/select-person/index.d.ts +1 -2
  97. package/es/components/select-person/src/SelectPerson.vue.d.ts +1 -2
  98. package/es/components/select-person/src/SelectPerson.vue2.js +20 -19
  99. package/es/components/select-person/src/utils/index.d.ts +1 -0
  100. package/es/components/select-person/src/utils/index.js +15 -1
  101. package/es/shared/assets/img/failure.js +1 -1
  102. package/es/shared/assets/img/failure.png.js +1 -1
  103. package/es/shared/assets/img/icon-asc.js +1 -1
  104. package/es/shared/assets/img/icon-desc.js +1 -1
  105. package/es/shared/assets/img/no-permission.js +1 -1
  106. package/es/shared/assets/img/no-permission.png.js +1 -1
  107. package/es/shared/assets/img/nodata.js +1 -1
  108. package/es/shared/assets/img/nodata.png.js +1 -1
  109. package/es/shared/assets/img/notfound.js +1 -1
  110. package/es/shared/assets/img/notfound.png.js +1 -1
  111. package/es/shared/assets/img/qr.js +1 -1
  112. package/es/shared/assets/img/qr.png.js +1 -1
  113. package/es/shared/assets/img/success.js +1 -1
  114. package/es/shared/assets/img/success.png.js +1 -1
  115. package/es/shared/assets/img/video.js +1 -1
  116. package/es/shared/assets/img/video.png.js +1 -1
  117. package/es/shared/assets/img/video_default_cover.js +1 -1
  118. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  119. package/es/shared/assets/img/video_hover.js +1 -1
  120. package/es/shared/assets/img/video_play_hover.js +1 -1
  121. package/es/shared/assets/img/xb_big.js +1 -1
  122. package/es/shared/assets/img/xb_big.png.js +1 -1
  123. package/es/shared/assets/img/xb_small.js +1 -1
  124. package/es/shared/assets/img/xb_small.png.js +1 -1
  125. package/package.json +2 -2
  126. package/es/components/big-table/src/components/edit-form/dist/edit-date.d.ts +0 -36
  127. package/es/components/big-table/src/components/edit-form/dist/edit-select.d.ts +0 -37
  128. package/es/components/big-table/src/components/edit-form/dist/edit-time.d.ts +0 -45
  129. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  130. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  131. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  132. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  133. package/es/components/fabric-chart/src/constants/index.d.ts +0 -4
  134. package/es/components/fabric-chart/src/constants/index.js +0 -4
  135. package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
  136. package/es/components/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +0 -65
  137. package/es/components/form-render/src/components/renderer/dist/radio.d.ts +0 -64
  138. package/es/components/form-render/src/components/renderer/dist/remoteSearch.d.ts +0 -46
  139. package/es/components/form-render/src/components/renderer/dist/search.d.ts +0 -56
  140. package/es/components/form-render/src/components/renderer/dist/select.d.ts +0 -55
  141. package/es/components/iho-table/src/components/dist/IhoTableColumn.d.ts +0 -20
  142. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/dist/index.d.ts +0 -3
  143. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dist/inputRendererPlugin.d.ts +0 -3
  144. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dist/numberRendererPlugin.d.ts +0 -3
  145. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dist/timeRendererPlugin.d.ts +0 -3
  146. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/dist/editSelect.d.ts +0 -42
  147. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/dist/index.d.ts +0 -3
  148. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/dist/index.d.ts +0 -3
  149. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  150. package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -1,6 +1,6 @@
1
1
  import { Func } from '../../../../../../../../es/shared/types';
2
2
  import { PropType } from 'vue';
3
- import { IhoTableFieldItem } from '../../../../../../../../es/components/iho-table';
3
+ import { VxeTableDefines } from 'vxe-table';
4
4
  import { AnyObject } from '../../../../../../../../es/shared/types';
5
5
  declare const _default: import("vue").DefineComponent<{
6
6
  value: {
@@ -8,14 +8,14 @@ declare const _default: import("vue").DefineComponent<{
8
8
  default: undefined;
9
9
  };
10
10
  column: {
11
- type: PropType<IhoTableFieldItem>;
11
+ type: PropType<VxeTableDefines.ColumnInfo>;
12
12
  required: true;
13
13
  };
14
14
  row: {
15
15
  type: PropType<AnyObject>;
16
16
  required: true;
17
17
  };
18
- index: {
18
+ rowIndex: {
19
19
  type: NumberConstructor;
20
20
  required: true;
21
21
  };
@@ -27,22 +27,22 @@ declare const _default: import("vue").DefineComponent<{
27
27
  default: undefined;
28
28
  };
29
29
  column: {
30
- type: PropType<IhoTableFieldItem>;
30
+ type: PropType<VxeTableDefines.ColumnInfo>;
31
31
  required: true;
32
32
  };
33
33
  row: {
34
34
  type: PropType<AnyObject>;
35
35
  required: true;
36
36
  };
37
- index: {
37
+ rowIndex: {
38
38
  type: NumberConstructor;
39
39
  required: true;
40
40
  };
41
41
  }>> & {
42
42
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
43
43
  }>>;
44
+ emitFormChange: (params?: AnyObject) => void;
44
45
  emit: (event: "update:value", ...args: any[]) => void;
45
- globEmit: import("../../../../../../../../es/components/iho-table").IhoTableEmits;
46
46
  formRef: import("vue").Ref<HTMLElement | null>;
47
47
  isShow: import("vue").Ref<boolean>;
48
48
  formattedValue: import("vue").Ref<string | undefined>;
@@ -77,14 +77,14 @@ declare const _default: import("vue").DefineComponent<{
77
77
  default: undefined;
78
78
  };
79
79
  column: {
80
- type: PropType<IhoTableFieldItem>;
80
+ type: PropType<VxeTableDefines.ColumnInfo>;
81
81
  required: true;
82
82
  };
83
83
  row: {
84
84
  type: PropType<AnyObject>;
85
85
  required: true;
86
86
  };
87
- index: {
87
+ rowIndex: {
88
88
  type: NumberConstructor;
89
89
  required: true;
90
90
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent, useAttrs, inject, ref, computed, watch, openBlock, createBlock, unref, mergeProps, withCtx, createVNode, isRef } from 'vue';
1
+ import { defineComponent, useAttrs, ref, computed, watch, openBlock, createBlock, unref, mergeProps, withCtx, createVNode, isRef } from 'vue';
2
2
  import { generateTimeFormat } from '../../../../../../../shared/utils/index.js';
3
3
  import { isFunction, isNaN } from 'lodash-es';
4
4
  import { NPopover, NInput, NDatePicker } from 'naive-ui';
5
- import { InjectionIhoTableEmits } from '../../../../constants/index.js';
6
- import { useCommon } from '../hooks/useCommon.js';
5
+ import { useIhoTableFormEvent } from '../../../../utils/index.js';
6
+ import { useAutoFocus } from '../hooks/useAutoFocus.js';
7
7
  import _export_sfc from '../../../../../../../_virtual/plugin-vue_export-helper.js';
8
8
 
9
9
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -12,23 +12,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
12
12
  value: { type: String, default: void 0 },
13
13
  column: { type: Object, required: true },
14
14
  row: { type: Object, required: true },
15
- index: { type: Number, required: true }
15
+ rowIndex: { type: Number, required: true }
16
16
  },
17
17
  emits: ["update:value"],
18
18
  setup(__props, { emit }) {
19
19
  const props = __props;
20
20
  const attr = useAttrs();
21
- const globEmit = inject(InjectionIhoTableEmits);
22
- const { formRef, isShow } = useCommon();
21
+ const { emitFormChange } = useIhoTableFormEvent(props);
22
+ const { formRef, isShow } = useAutoFocus();
23
23
  const formattedValue = ref();
24
24
  const onConfirm = (value) => {
25
+ const oldValue = props.value;
25
26
  emit("update:value", value);
26
- globEmit("formChange", {
27
- value,
28
- row: props.row,
29
- column: props.column,
30
- index: props.index
31
- });
27
+ emitFormChange({ oldValue });
32
28
  };
33
29
  const { isStartDate = false, isEndDate = false } = attr;
34
30
  const connectField = attr.connectField || "";
@@ -17,7 +17,7 @@ function dateRendererPlugin() {
17
17
  emitFormClick,
18
18
  row,
19
19
  column,
20
- $rowIndex
20
+ rowIndex
21
21
  }) => {
22
22
  return [createVNode(EditDate, mergeProps({
23
23
  "value": row[column.field],
@@ -25,7 +25,7 @@ function dateRendererPlugin() {
25
25
  }, fieldItem.componentProps, {
26
26
  "column": column,
27
27
  "row": row,
28
- "index": $rowIndex,
28
+ "row-index": rowIndex,
29
29
  "onClick": emitFormClick
30
30
  }), null)];
31
31
  })
@@ -1,4 +1,5 @@
1
- export declare const useCommon: () => {
1
+ export declare const useAutoFocus: () => {
2
2
  formRef: import("vue").Ref<HTMLElement | null>;
3
+ setRef: (ref: HTMLElement) => void;
3
4
  isShow: import("vue").Ref<boolean>;
4
5
  };
@@ -1,7 +1,10 @@
1
1
  import { ref, onMounted } from 'vue';
2
2
 
3
- const useCommon = () => {
3
+ const useAutoFocus = () => {
4
4
  const formRef = ref(null);
5
+ function setRef(ref2) {
6
+ formRef.value = ref2;
7
+ }
5
8
  const isShow = ref(false);
6
9
  onMounted(() => {
7
10
  var _a;
@@ -10,8 +13,9 @@ const useCommon = () => {
10
13
  });
11
14
  return {
12
15
  formRef,
16
+ setRef,
13
17
  isShow
14
18
  };
15
19
  };
16
20
 
17
- export { useCommon };
21
+ export { useAutoFocus };
@@ -22,8 +22,10 @@ function inputRendererPlugin() {
22
22
  return [createVNode(NInput, mergeProps({
23
23
  "value": row[column.field],
24
24
  "onUpdate:value": ($event) => row[column.field] = $event,
25
- "onBlur": emitFormChange,
26
- "onClick": emitFormClick
25
+ "onBlur": () => emitFormChange({
26
+ oldValue: row[column.field]
27
+ }),
28
+ "onClick": () => emitFormClick()
27
29
  }, fieldItem.componentProps), null)];
28
30
  })
29
31
  });
@@ -17,8 +17,7 @@ function numberRendererPlugin() {
17
17
  column,
18
18
  fieldItem,
19
19
  emitFormClick,
20
- emitFormChange,
21
- createCustomEvent
20
+ emitFormChange
22
21
  }) => {
23
22
  const {
24
23
  placeholder = "\u8BF7\u8F93\u5165"
@@ -27,10 +26,17 @@ function numberRendererPlugin() {
27
26
  ...fieldItem.componentProps || {},
28
27
  clearable: true,
29
28
  placeholder,
30
- onBlur: createCustomEvent("formChange", {
31
- type: "blur"
29
+ onBlur: () => emitFormChange({
30
+ type: "blur",
31
+ oldValue: row[column.field]
32
32
  }),
33
- onUpdateValue: emitFormChange,
33
+ onUpdateValue: (value) => {
34
+ const oldValue = row[column.field];
35
+ row[column.field] = value;
36
+ emitFormChange({
37
+ oldValue
38
+ });
39
+ },
34
40
  onClick: emitFormClick
35
41
  };
36
42
  return [createVNode(NInputNumber, mergeProps({
@@ -1,5 +1,5 @@
1
1
  import { PropType } from 'vue';
2
- import { IhoTableFieldItem } from '../../../../../../../../es/components/iho-table';
2
+ import { VxeTableDefines } from 'vxe-table';
3
3
  import { AnyObject } from '../../../../../../../../es/shared/types';
4
4
  declare const _default: import("vue").DefineComponent<{
5
5
  value: {
@@ -7,14 +7,14 @@ declare const _default: import("vue").DefineComponent<{
7
7
  default: undefined;
8
8
  };
9
9
  column: {
10
- type: PropType<IhoTableFieldItem>;
10
+ type: PropType<VxeTableDefines.ColumnInfo>;
11
11
  required: true;
12
12
  };
13
13
  row: {
14
14
  type: PropType<AnyObject>;
15
15
  required: true;
16
16
  };
17
- index: {
17
+ rowIndex: {
18
18
  type: NumberConstructor;
19
19
  required: true;
20
20
  };
@@ -24,14 +24,14 @@ declare const _default: import("vue").DefineComponent<{
24
24
  default: undefined;
25
25
  };
26
26
  column: {
27
- type: PropType<IhoTableFieldItem>;
27
+ type: PropType<VxeTableDefines.ColumnInfo>;
28
28
  required: true;
29
29
  };
30
30
  row: {
31
31
  type: PropType<AnyObject>;
32
32
  required: true;
33
33
  };
34
- index: {
34
+ rowIndex: {
35
35
  type: NumberConstructor;
36
36
  required: true;
37
37
  };
@@ -1,7 +1,7 @@
1
- import { defineComponent, inject, createVNode, mergeProps } from 'vue';
1
+ import { defineComponent, createVNode, mergeProps } from 'vue';
2
2
  import { NSelect } from 'naive-ui';
3
- import { InjectionIhoTableEmits } from '../../../../constants/index.js';
4
- import { useCommon } from '../hooks/useCommon.js';
3
+ import { useIhoTableFormEvent } from '../../../../utils/index.js';
4
+ import { useAutoFocus } from '../hooks/useAutoFocus.js';
5
5
 
6
6
  var EditSelect = defineComponent({
7
7
  name: "EditSelect",
@@ -22,7 +22,7 @@ var EditSelect = defineComponent({
22
22
  type: Object,
23
23
  required: true
24
24
  },
25
- index: {
25
+ rowIndex: {
26
26
  type: Number,
27
27
  required: true
28
28
  }
@@ -30,25 +30,24 @@ var EditSelect = defineComponent({
30
30
  emits: ["update:value"],
31
31
  setup(props, {
32
32
  attrs,
33
- slots,
34
33
  emit
35
34
  }) {
36
- const globEmit = inject(InjectionIhoTableEmits);
37
35
  const {
38
- formRef,
39
- isShow
40
- } = useCommon();
36
+ isShow,
37
+ setRef
38
+ } = useAutoFocus();
39
+ const {
40
+ emitFormChange
41
+ } = useIhoTableFormEvent(props);
41
42
  function onUpdateValue(value) {
43
+ const oldValue = props.value;
42
44
  emit("update:value", value);
43
- globEmit("formChange", {
44
- value,
45
- row: props.row,
46
- column: props.column,
47
- index: props.index
45
+ emitFormChange({
46
+ oldValue
48
47
  });
49
48
  }
50
49
  return () => createVNode(NSelect, mergeProps({
51
- "ref": "formRef",
50
+ "ref": setRef,
52
51
  "show": isShow.value,
53
52
  "onUpdate:show": ($event) => isShow.value = $event
54
53
  }, attrs, {
@@ -24,12 +24,12 @@ function selectRendererPlugin() {
24
24
  emitFormClick,
25
25
  row,
26
26
  column,
27
- $rowIndex
27
+ rowIndex
28
28
  }) => {
29
29
  return [createVNode(EditSelect, mergeProps(fieldItem.componentProps, {
30
30
  "column": column,
31
31
  "row": row,
32
- "index": $rowIndex,
32
+ "row-index": rowIndex,
33
33
  "value": row[column.field],
34
34
  "onUpdate:value": ($event) => row[column.field] = $event,
35
35
  "onClick": emitFormClick
@@ -1,6 +1,6 @@
1
1
  import { AnyObject } from '../../../../../../../../es/shared/types';
2
2
  import { CSSProperties, PropType } from 'vue';
3
- import { IhoTableFieldItem } from '../../../../../../../../es/components/iho-table';
3
+ import { VxeTableDefines } from 'vxe-table';
4
4
  declare const _default: import("vue").DefineComponent<{
5
5
  value: {};
6
6
  height: {
@@ -8,7 +8,7 @@ declare const _default: import("vue").DefineComponent<{
8
8
  default: number;
9
9
  };
10
10
  column: {
11
- type: PropType<IhoTableFieldItem>;
11
+ type: PropType<VxeTableDefines.ColumnInfo>;
12
12
  required: true;
13
13
  };
14
14
  row: {
@@ -19,7 +19,7 @@ declare const _default: import("vue").DefineComponent<{
19
19
  type: StringConstructor;
20
20
  default: string;
21
21
  };
22
- dataIndex: {
22
+ rowIndex: {
23
23
  type: NumberConstructor;
24
24
  required: true;
25
25
  };
@@ -31,7 +31,7 @@ declare const _default: import("vue").DefineComponent<{
31
31
  default: number;
32
32
  };
33
33
  column: {
34
- type: PropType<IhoTableFieldItem>;
34
+ type: PropType<VxeTableDefines.ColumnInfo>;
35
35
  required: true;
36
36
  };
37
37
  row: {
@@ -42,15 +42,14 @@ declare const _default: import("vue").DefineComponent<{
42
42
  type: StringConstructor;
43
43
  default: string;
44
44
  };
45
- dataIndex: {
45
+ rowIndex: {
46
46
  type: NumberConstructor;
47
47
  required: true;
48
48
  };
49
49
  }>> & {
50
50
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
51
51
  }>>;
52
- globEmit: import("../../../../../../../../es/components/iho-table").IhoTableEmits;
53
- tableHandler: import("../../../../../../../../es/components/iho-table").IhoTableHandler;
52
+ tableHandler: import("../../../../types").IhoTableHandler;
54
53
  popoverRef: import("vue").Ref<any>;
55
54
  editContent: import("vue").Ref<any>;
56
55
  setEditContent: (value: any) => void;
@@ -58,6 +57,7 @@ declare const _default: import("vue").DefineComponent<{
58
57
  setShow: (v: boolean) => void;
59
58
  emit: (event: "update:value", ...args: any[]) => void;
60
59
  onShow: () => Promise<void>;
60
+ emitFormChange: (params?: AnyObject) => void;
61
61
  onClose: () => Promise<void>;
62
62
  updateShow: (show: boolean) => void;
63
63
  style: import("vue").ComputedRef<CSSProperties>;
@@ -70,7 +70,7 @@ declare const _default: import("vue").DefineComponent<{
70
70
  default: number;
71
71
  };
72
72
  column: {
73
- type: PropType<IhoTableFieldItem>;
73
+ type: PropType<VxeTableDefines.ColumnInfo>;
74
74
  required: true;
75
75
  };
76
76
  row: {
@@ -81,7 +81,7 @@ declare const _default: import("vue").DefineComponent<{
81
81
  type: StringConstructor;
82
82
  default: string;
83
83
  };
84
- dataIndex: {
84
+ rowIndex: {
85
85
  type: NumberConstructor;
86
86
  required: true;
87
87
  };
@@ -1,7 +1,8 @@
1
1
  import { defineComponent, inject, ref, watch, computed, onMounted, onDeactivated, openBlock, createBlock, unref, withCtx, createElementVNode, withModifiers, normalizeStyle, toDisplayString, renderSlot, createVNode } from 'vue';
2
2
  import { cloneDeep, isObject, isArray } from 'lodash-es';
3
3
  import { NPopover, NInput } from 'naive-ui';
4
- import { InjectionIhoTableEmits, InjectionIhoTableHandler } from '../../../../constants/index.js';
4
+ import { InjectionIhoTableHandler } from '../../../../constants/index.js';
5
+ import { useIhoTableFormEvent } from '../../../../utils/index.js';
5
6
  import _export_sfc from '../../../../../../../_virtual/plugin-vue_export-helper.js';
6
7
 
7
8
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -12,12 +13,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
12
13
  column: { type: Object, required: true },
13
14
  row: { type: Object, required: true },
14
15
  displayContent: { type: String, default: "" },
15
- dataIndex: { type: Number, required: true }
16
+ rowIndex: { type: Number, required: true }
16
17
  },
17
18
  emits: ["update:value"],
18
19
  setup(__props, { emit }) {
19
20
  const props = __props;
20
- const globEmit = inject(InjectionIhoTableEmits);
21
21
  const tableHandler = inject(InjectionIhoTableHandler);
22
22
  const popoverRef = ref();
23
23
  const editContent = ref();
@@ -36,18 +36,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
36
36
  (_a = popoverRef.value) == null ? void 0 : _a.syncPosition();
37
37
  return;
38
38
  }
39
+ const { emitFormChange } = useIhoTableFormEvent(props);
39
40
  async function onClose() {
40
41
  if (!isObject(editContent.value) && !isArray(editContent.value)) {
41
42
  if (props.value === editContent.value)
42
43
  return;
43
44
  }
45
+ const oldValue = props.value;
44
46
  emit("update:value", editContent.value);
45
- globEmit("formChange", {
46
- value: editContent.value,
47
- row: props.row,
48
- column: props.column,
49
- index: props.dataIndex
50
- });
47
+ emitFormChange({ oldValue });
51
48
  tableHandler.updateTableDataRef();
52
49
  }
53
50
  function updateShow(show2) {
@@ -56,7 +53,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
56
53
  const style = computed(() => ({
57
54
  border: "1px solid #f5f5f5",
58
55
  height: props.height - 16 + "px",
59
- padding: "4px 0 4px 0",
56
+ display: "flex",
57
+ alignItems: "center",
58
+ padding: "0",
60
59
  background: "white",
61
60
  wordBreak: "keep-all",
62
61
  boxSizing: "border-box",
@@ -53,11 +53,11 @@ function separateRendererPlugins() {
53
53
  return [createVNode(EditSeparate, {
54
54
  "value": row[column.field],
55
55
  "onUpdate:value": ($event) => row[column.field] = $event,
56
- "dataIndex": separateRow == null ? void 0 : separateRow.index,
56
+ "row-index": separateRow == null ? void 0 : separateRow.index,
57
57
  "height": height,
58
58
  "column": column,
59
59
  "row": row,
60
- "displayContent": (_a = separateRow == null ? void 0 : separateRow.separateData) == null ? void 0 : _a[column.field],
60
+ "display-content": (_a = separateRow == null ? void 0 : separateRow.separateData) == null ? void 0 : _a[column.field],
61
61
  "onClick": emitFormClick
62
62
  }, slots)];
63
63
  })
@@ -78,11 +78,11 @@ function separateRendererPlugins() {
78
78
  }, []);
79
79
  }
80
80
  });
81
- hooks.dataHooks.data.tapPromise(pluginName, async (rowData, {
81
+ hooks.dataHooks.data.tapPromise(pluginName, async (rowData, config, {
82
82
  insertAfter,
83
83
  index: dataIndex,
84
84
  $table
85
- }, config) => {
85
+ }) => {
86
86
  if (!config.uuid)
87
87
  return;
88
88
  const separateColumns = separateColumnMap.get(config.uuid);
@@ -123,7 +123,7 @@ function separateRendererPlugins() {
123
123
  });
124
124
  hooks.eventHooks.onResizableChange.tap(pluginName, async ({
125
125
  column
126
- }, context) => {
126
+ }, _, context) => {
127
127
  if (!isSeparateColumn(column))
128
128
  return;
129
129
  context.updateTableDataRef();
@@ -28,7 +28,13 @@ function timeRendererPlugin() {
28
28
  placeholder,
29
29
  valueFormat,
30
30
  format: valueFormat || "yyyy-MM-dd HH:mm:ss",
31
- onUpdateFormattedValue: emitFormChange,
31
+ onUpdateFormattedValue: (value) => {
32
+ const oldValue = row[column.field];
33
+ row[column.field] = value;
34
+ emitFormChange({
35
+ oldValue
36
+ });
37
+ },
32
38
  onClick: emitFormClick
33
39
  };
34
40
  return [createVNode(NTimePicker, mergeProps({
@@ -6,19 +6,17 @@ function checkRendererPlugin() {
6
6
  return defineTablePlugin({
7
7
  name: pluginName,
8
8
  apply(hooks) {
9
- hooks.fieldHooks.field.tap({
10
- name: pluginName,
11
- before: "seqRendererPlugin"
12
- }, (field, {
9
+ hooks.fieldHooks.field.tap(pluginName, (field, {
13
10
  index,
14
11
  insertBefore
15
12
  }, config) => {
16
13
  if (index === 0 && config.selectType) {
17
14
  insertBefore({
18
15
  field: pluginName,
19
- width: 50,
16
+ width: 45,
20
17
  align: "center",
21
18
  annotation: false,
19
+ fixed: "left",
22
20
  type: config.selectType
23
21
  });
24
22
  }
@@ -11,7 +11,10 @@ function seqRendererPlugin() {
11
11
  return defineTablePlugin({
12
12
  name: pluginName,
13
13
  apply(hooks) {
14
- hooks.fieldHooks.field.tap(pluginName, (field, {
14
+ hooks.fieldHooks.field.tap({
15
+ name: pluginName,
16
+ before: "checkRendererPlugin"
17
+ }, (field, {
15
18
  index,
16
19
  insertBefore
17
20
  }, config) => {
@@ -22,7 +25,7 @@ function seqRendererPlugin() {
22
25
  fixed: "left",
23
26
  width: 50,
24
27
  type: "seq",
25
- field: "iho_table_sequence_unique_id",
28
+ field: pluginName,
26
29
  annotation: false,
27
30
  slots: {
28
31
  header() {
@@ -12,13 +12,14 @@ function createRowGroupList(rowGroupSetting, fieldList, getKey = (field) => fiel
12
12
  if (!isArray(groupSetting.list) || !groupSetting.list.length)
13
13
  return;
14
14
  const children = [];
15
+ let currentGroupItem = null;
15
16
  groupSetting.list.forEach((fieldName, idx) => {
16
- const groupIdx = groupIndexSearcher(fieldName, result);
17
+ const groupIdx = groupIndexSearcher(fieldName, result, currentGroupItem);
17
18
  if (!~groupIdx)
18
19
  return;
19
20
  children.push(result[groupIdx]);
20
21
  if (idx === 0) {
21
- result.splice(groupIdx, 1, { fieldName: groupSetting.title, children });
22
+ result.splice(groupIdx, 1, currentGroupItem = { fieldName: groupSetting.title, children });
22
23
  } else {
23
24
  result.splice(groupIdx, 1);
24
25
  }
@@ -26,8 +27,10 @@ function createRowGroupList(rowGroupSetting, fieldList, getKey = (field) => fiel
26
27
  });
27
28
  });
28
29
  return result;
29
- function groupIndexSearcher(fieldName, groupList) {
30
- return groupList.findIndex((group) => (isObject(group) ? group.fieldName : group) === fieldName);
30
+ function groupIndexSearcher(fieldName, groupList, currentGroupItem) {
31
+ return groupList.findIndex(
32
+ (group) => group !== currentGroupItem && (isObject(group) ? group.fieldName : group) === fieldName
33
+ );
31
34
  }
32
35
  }
33
36
  function groupTraverser(groupList, replacer) {
@@ -10,7 +10,7 @@ function virtualTreePlugin() {
10
10
  return defineTablePlugin({
11
11
  name: pluginName,
12
12
  apply(hooks) {
13
- hooks.dataHooks.data.tap(pluginName, (rowData, context, config) => {
13
+ hooks.dataHooks.data.tap(pluginName, (rowData, config, context) => {
14
14
  if (!config.treeConfig)
15
15
  return;
16
16
  const {
@@ -2,7 +2,7 @@ import { AnyObject, TupleToUnion } from '../../../../../es/shared/types';
2
2
  import { VxeTableProps, VxeTableDefines, VxeTableInstance, VxeColumnPropTypes } from 'vxe-table';
3
3
  import { VxeTableEventProps } from 'vxe-table/types/table';
4
4
  import { IHO_TABLE_STRING_STATUS, IhoTableCustomEventNameTuple, IhoTableEventNameTuple, IhoTableRowGroupSequence, VxeEventListenerNameList } from '../../../../../es/components/iho-table/src/constants';
5
- import { FilterState, IHO_TABLE_FILTER_STATUS } from '../../../../../es/components/iho-table/src/plugins/filterPlugin/types';
5
+ import { FilterState } from '../../../../../es/components/iho-table/src/plugins/filterPlugin/types';
6
6
  export * from './pluginType';
7
7
  export interface IhoTableRowGroupItem {
8
8
  groupName: string;
@@ -24,7 +24,9 @@ export declare type IhoTableConfig = VxeTableProps & Partial<{
24
24
  }>;
25
25
  export declare type IhoTableFieldItem = {
26
26
  [K in keyof VxeTableDefines.ColumnInfo]?: K extends 'children' ? IhoTableFieldItem[] : K extends keyof VxeTableDefines.ColumnInfo ? VxeTableDefines.ColumnInfo[K] : never;
27
- };
27
+ } & Partial<{
28
+ annotation: boolean;
29
+ }>;
28
30
  export declare namespace IhoTableLowCodeField {
29
31
  type FieldSetting = {
30
32
  notParticipatingSearch: IHO_TABLE_STRING_STATUS;
@@ -59,9 +61,12 @@ export declare type LowCodeTableFieldItem = {
59
61
  showOverflow: VxeTableDefines.ColumnInfo['showOverflow'];
60
62
  options: AnyObject[];
61
63
  annotation: boolean;
64
+ slots: IhoTableFieldItem['slots'];
65
+ slotFn: NonNullable<IhoTableFieldItem['slots']>['default'];
66
+ headerSlotFn: NonNullable<IhoTableFieldItem['slots']>['header'];
62
67
  filterDefaultValue: Partial<{
63
68
  checked: string[];
64
- sortStatus: 0 | 1 | 2;
69
+ sortStatus: null | 'asc' | 'desc';
65
70
  }>;
66
71
  }> & Partial<Pick<VxeTableDefines.ColumnInfo, 'resizable'>>;
67
72
  export declare type IhoTableFormChangePayload = {
@@ -76,16 +81,9 @@ export declare type EventListenerToEventName<T extends string> = T extends `on${
76
81
  export declare type EventNameToEventListener<T extends string> = T extends `${infer L}${infer R}` ? `on${Uppercase<L>}${R}` : never;
77
82
  export declare type IhoTableHandler = Record<'updateConfigRef' | 'updateFieldListRef' | 'updateTableDataRef', () => void>;
78
83
  export declare type IhoTableEventNameUnion = TupleToUnion<typeof IhoTableEventNameTuple>;
79
- export declare type IhoTableFilterPayload = {
80
- type: 'sort';
81
- value: IHO_TABLE_FILTER_STATUS;
82
- } | {
83
- type: 'filter';
84
- value: string[];
85
- };
86
84
  export declare type IhoTableEmitPayload<T extends typeof IhoTableEventNameTuple[number]> = T extends 'formChange' | 'formClick' ? [IhoTableFormChangePayload] : T extends 'keyboard' ? [IhoTableFormChangePayload & {
87
85
  key: string;
88
- }] : T extends 'settingClick' ? [] : T extends 'sortChange' ? [IhoTableFilterPayload] : Parameters<NonNullable<VxeTableEventProps[EventNameToEventListener<Exclude<T, typeof IhoTableCustomEventNameTuple[number]>>]>>;
86
+ }] : T extends 'settingClick' ? [] : Parameters<NonNullable<VxeTableEventProps[EventNameToEventListener<Exclude<T, typeof IhoTableCustomEventNameTuple[number]>>]>>;
89
87
  export declare type IhoTableAnchorItem = {
90
88
  field: string;
91
89
  title: string;
@@ -93,5 +91,5 @@ export declare type IhoTableAnchorItem = {
93
91
  };
94
92
  export declare type IhoTableExpose = {
95
93
  $table: VxeTableInstance;
96
- setFilter(fieldName: string, value: Partial<Omit<FilterState, 'options'>>): void;
94
+ setFilterState(fieldName: string, value: Partial<Omit<FilterState, 'options'>>): void;
97
95
  };