cnhis-design-vue 3.1.22-beta.1 → 3.1.22-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/es/components/big-table/index2.js +0 -2
  2. package/es/components/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +22 -30
  3. package/es/components/big-table/src/components/edit-form/edit-date.js +81 -10
  4. package/es/components/big-table/src/components/edit-form/edit-input.js +1 -0
  5. package/es/components/big-table/src/hooks/useEdit2.js +2 -2
  6. package/es/components/big-table/style/index.css +1 -1
  7. package/es/components/fabric-chart/index.d.ts +1 -0
  8. package/es/components/fabric-chart/src/FabricChart.js +3 -2
  9. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +1 -0
  10. package/es/components/fabric-chart/src/hooks/useCenter.d.ts +1 -0
  11. package/es/components/fabric-chart/src/hooks/useCenter2.js +15 -3
  12. package/es/components/fabric-chart/src/hooks/useLeft.d.ts +1 -1
  13. package/es/components/fabric-chart/src/hooks/useLeft2.js +7 -5
  14. package/es/components/fabric-chart/src/interface.d.ts +2 -0
  15. package/es/components/form-render/src/components/renderer/cascader.js +10 -7
  16. package/es/components/form-render/src/components/renderer/combination.d.ts +7 -0
  17. package/es/components/form-render/src/components/renderer/combination.js +4 -1
  18. package/es/components/form-render/src/components/renderer/date.js +11 -4
  19. package/es/components/form-render/src/components/renderer/input.js +2 -2
  20. package/es/components/form-render/src/components/renderer/inputNumber.js +2 -2
  21. package/es/components/form-render/src/components/renderer/search.js +3 -3
  22. package/es/components/form-render/src/components/renderer/select.js +3 -3
  23. package/es/components/form-render/src/components/renderer/textarea.js +2 -2
  24. package/es/components/form-render/src/hooks/useCommonInjection2.js +6 -2
  25. package/es/components/form-render/src/utils/schema.d.ts +4 -1
  26. package/es/components/form-render/src/utils/schema.js +1 -1
  27. package/es/components/form-render/src/utils/schema2.js +9 -2
  28. package/es/components/grid/index2.js +0 -2
  29. package/es/components/iho-table/index.d.ts +4266 -337
  30. package/es/components/iho-table/index.js +1 -1
  31. package/es/components/iho-table/index2.js +9 -4
  32. package/es/components/iho-table/src/IhoTable.js +39 -13
  33. package/es/components/iho-table/src/IhoTable.vue.d.ts +4254 -326
  34. package/es/components/iho-table/src/components/IhoTableColumn.d.ts +2 -2
  35. package/es/components/iho-table/src/components/IhoTableColumn.js +25 -5
  36. package/es/components/iho-table/src/constants/index.d.ts +8 -1
  37. package/es/components/iho-table/src/constants/index.js +1 -1
  38. package/es/components/iho-table/src/constants/index2.js +79 -1
  39. package/es/components/iho-table/src/hooks/index.js +1 -1
  40. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +5 -0
  41. package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
  42. package/es/components/iho-table/src/hooks/tapHooks/index2.js +71 -24
  43. package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +14 -0
  44. package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks2.js +39 -1
  45. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +61 -60
  46. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks2.js +62 -60
  47. package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.d.ts +4 -1
  48. package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks2.js +4 -1
  49. package/es/components/iho-table/src/hooks/useTablePlugin.d.ts +2 -2
  50. package/es/components/iho-table/src/hooks/useTablePlugin2.js +2 -3
  51. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index2.js +3 -2
  52. package/es/components/iho-table/src/plugins/index.d.ts +1 -0
  53. package/es/components/iho-table/src/plugins/index.js +8 -5
  54. package/es/components/iho-table/src/plugins/index2.js +8 -5
  55. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index2.js +10 -4
  56. package/es/components/iho-table/src/plugins/rendererPlugins/index.d.ts +2 -5
  57. package/es/components/iho-table/src/plugins/rendererPlugins/index.js +7 -5
  58. package/es/components/iho-table/src/plugins/rendererPlugins/inputs/index.d.ts +1 -0
  59. package/es/components/iho-table/src/plugins/rendererPlugins/inputs/index.js +1 -0
  60. package/es/components/iho-table/src/plugins/rendererPlugins/inputs/inputRendererPlugins.d.ts +1 -0
  61. package/es/components/iho-table/src/plugins/rendererPlugins/inputs/inputRendererPlugins.js +49 -0
  62. package/es/components/iho-table/src/plugins/rendererPlugins/{checkRendererPlugin.d.ts → widgets/checkRendererPlugin.d.ts} +1 -1
  63. package/es/components/iho-table/src/plugins/rendererPlugins/{checkRendererPlugin.js → widgets/checkRendererPlugin.js} +2 -2
  64. package/es/components/iho-table/src/plugins/rendererPlugins/{colorRendererPlugin.d.ts → widgets/colorRendererPlugin.d.ts} +1 -1
  65. package/es/components/iho-table/src/plugins/rendererPlugins/{colorRendererPlugin.js → widgets/colorRendererPlugin.js} +6 -8
  66. package/es/components/iho-table/src/plugins/rendererPlugins/{defaultRendererPlugin.d.ts → widgets/defaultRendererPlugin.d.ts} +1 -1
  67. package/es/components/iho-table/src/plugins/rendererPlugins/{defaultRendererPlugin.js → widgets/defaultRendererPlugin.js} +4 -4
  68. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/index.d.ts +6 -0
  69. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/index.js +6 -0
  70. package/es/components/iho-table/src/plugins/rendererPlugins/{labelRendererPlugin.d.ts → widgets/labelRendererPlugin.d.ts} +1 -1
  71. package/es/components/iho-table/src/plugins/rendererPlugins/{labelRendererPlugin.js → widgets/labelRendererPlugin.js} +3 -3
  72. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.d.ts +2 -0
  73. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +89 -0
  74. package/es/components/iho-table/src/plugins/rendererPlugins/{seqRendererPlugin.d.ts → widgets/seqRendererPlugin.d.ts} +1 -1
  75. package/es/components/iho-table/src/plugins/rendererPlugins/{seqRendererPlugin.js → widgets/seqRendererPlugin.js} +3 -3
  76. package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index.d.ts +1 -0
  77. package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index.js +1 -0
  78. package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index2.js +72 -0
  79. package/es/components/iho-table/src/types/index.d.ts +31 -8
  80. package/es/components/iho-table/src/types/pluginType.d.ts +91 -64
  81. package/es/components/iho-table/src/utils/index.d.ts +3 -0
  82. package/es/components/iho-table/src/utils/index.js +1 -1
  83. package/es/components/iho-table/src/utils/index2.js +16 -1
  84. package/es/components/index.css +1 -1
  85. package/es/components/index.js +1 -1
  86. package/es/components/index2.js +1 -1
  87. package/package.json +4 -4
  88. package/es/components/form-render/src/components/index.d.ts +0 -0
  89. package/es/components/form-render/src/components/index.js +0 -1
  90. package/es/shared/utils/loadVxe.d.ts +0 -2
  91. package/es/shared/utils/loadVxe.js +0 -1
  92. package/es/shared/utils/loadVxe2.js +0 -12
@@ -8,68 +8,70 @@ import '../../../../../shared/utils/tapable/AsyncSeriesHook.js';
8
8
  import '../../../../../shared/utils/tapable/AsyncSeriesBailHook.js';
9
9
  import '../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js';
10
10
  import '../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js';
11
+ import { AbstractEventHooks } from '../../types/pluginType2.js';
11
12
 
12
- class EventHooks {
13
+ class EventHooks extends AbstractEventHooks {
13
14
  constructor() {
14
- this.onKeydownStart = new AsyncParallelHook(["event", "config"]);
15
- this.onKeydown = new AsyncParallelHook(["event", "config"]);
16
- this.onKeydownEnd = new AsyncParallelHook(["event", "config"]);
17
- this.onPaste = new AsyncParallelHook(["event", "config"]);
18
- this.onCopy = new AsyncParallelHook(["event", "config"]);
19
- this.onCut = new AsyncParallelHook(["event", "config"]);
20
- this.onCurrentChange = new AsyncParallelHook(["event", "config"]);
21
- this.onRadioChange = new AsyncParallelHook(["event", "config"]);
22
- this.onCheckboxChange = new AsyncParallelHook(["event", "config"]);
23
- this.onCheckboxAll = new AsyncParallelHook(["event", "config"]);
24
- this.onCheckboxRangeStart = new AsyncParallelHook(["event", "config"]);
25
- this.onCheckboxRangeChange = new AsyncParallelHook(["event", "config"]);
26
- this.onCheckboxRangeEnd = new AsyncParallelHook(["event", "config"]);
27
- this.onCellClick = new AsyncParallelHook(["event", "config"]);
28
- this.onCellDblclick = new AsyncParallelHook(["event", "config"]);
29
- this.onCellMenu = new AsyncParallelHook(["event", "config"]);
30
- this.onCellMouseenter = new AsyncParallelHook(["event", "config"]);
31
- this.onCellMouseleave = new AsyncParallelHook(["event", "config"]);
32
- this.onHeaderCellClick = new AsyncParallelHook(["event", "config"]);
33
- this.onHeaderCellDblclick = new AsyncParallelHook(["event", "config"]);
34
- this.onHeaderCellMenu = new AsyncParallelHook(["event", "config"]);
35
- this.onFooterCellClick = new AsyncParallelHook(["event", "config"]);
36
- this.onFooterCellDblclick = new AsyncParallelHook(["event", "config"]);
37
- this.onFooterCellMenu = new AsyncParallelHook(["event", "config"]);
38
- this.onSortChange = new AsyncParallelHook(["event", "config"]);
39
- this.onFilterChange = new AsyncParallelHook(["event", "config"]);
40
- this.onFilterVisible = new AsyncParallelHook(["event", "config"]);
41
- this.onResizableChange = new AsyncParallelHook(["event", "config"]);
42
- this.onToggleRowExpand = new AsyncParallelHook(["event", "config"]);
43
- this.onToggleTreeExpand = new AsyncParallelHook(["event", "config"]);
44
- this.onMenuClick = new AsyncParallelHook(["event", "config"]);
45
- this.onEditClosed = new AsyncParallelHook(["event", "config"]);
46
- this.onEditActived = new AsyncParallelHook(["event", "config"]);
47
- this.onEditDisabled = new AsyncParallelHook(["event", "config"]);
48
- this.onValidError = new AsyncParallelHook(["event", "config"]);
49
- this.onScroll = new AsyncParallelHook(["event", "config"]);
50
- this.onCustom = new AsyncParallelHook(["event", "config"]);
51
- this.onOpenFnr = new AsyncParallelHook(["event", "config"]);
52
- this.onFnrChange = new AsyncParallelHook(["event", "config"]);
53
- this.onFnrFind = new AsyncParallelHook(["event", "config"]);
54
- this.onFnrFindAll = new AsyncParallelHook(["event", "config"]);
55
- this.onFnrReplace = new AsyncParallelHook(["event", "config"]);
56
- this.onFnrReplaceAll = new AsyncParallelHook(["event", "config"]);
57
- this.onCellAreaCopy = new AsyncParallelHook(["event", "config"]);
58
- this.onCellAreaCut = new AsyncParallelHook(["event", "config"]);
59
- this.onCellAreaPaste = new AsyncParallelHook(["event", "config"]);
60
- this.onCellAreaMerge = new AsyncParallelHook(["event", "config"]);
61
- this.onClearCellAreaMerge = new AsyncParallelHook(["event", "config"]);
62
- this.onHeaderCellAreaSelection = new AsyncParallelHook(["event", "config"]);
63
- this.onCellAreaSelectionStart = new AsyncParallelHook(["event", "config"]);
64
- this.onCellAreaSelectionDrag = new AsyncParallelHook(["event", "config"]);
65
- this.onCellAreaSelectionEnd = new AsyncParallelHook(["event", "config"]);
66
- this.onCellAreaExtensionStart = new AsyncParallelHook(["event", "config"]);
67
- this.onCellAreaExtensionDrag = new AsyncParallelHook(["event", "config"]);
68
- this.onCellAreaExtensionEnd = new AsyncParallelHook(["event", "config"]);
69
- this.onCellAreaArrowsStart = new AsyncParallelHook(["event", "config"]);
70
- this.onCellAreaArrowsEnd = new AsyncParallelHook(["event", "config"]);
71
- this.onActiveCellChangeStart = new AsyncParallelHook(["event", "config"]);
72
- this.onActiveCellChangeEnd = new AsyncParallelHook(["event", "config"]);
15
+ super(...arguments);
16
+ this.onKeydownStart = new AsyncParallelHook(["event", "config", "$table"]);
17
+ this.onKeydown = new AsyncParallelHook(["event", "config", "$table"]);
18
+ this.onKeydownEnd = new AsyncParallelHook(["event", "config", "$table"]);
19
+ this.onPaste = new AsyncParallelHook(["event", "config", "$table"]);
20
+ this.onCopy = new AsyncParallelHook(["event", "config", "$table"]);
21
+ this.onCut = new AsyncParallelHook(["event", "config", "$table"]);
22
+ this.onCurrentChange = new AsyncParallelHook(["event", "config", "$table"]);
23
+ this.onRadioChange = new AsyncParallelHook(["event", "config", "$table"]);
24
+ this.onCheckboxChange = new AsyncParallelHook(["event", "config", "$table"]);
25
+ this.onCheckboxAll = new AsyncParallelHook(["event", "config", "$table"]);
26
+ this.onCheckboxRangeStart = new AsyncParallelHook(["event", "config", "$table"]);
27
+ this.onCheckboxRangeChange = new AsyncParallelHook(["event", "config", "$table"]);
28
+ this.onCheckboxRangeEnd = new AsyncParallelHook(["event", "config", "$table"]);
29
+ this.onCellClick = new AsyncParallelHook(["event", "config", "$table"]);
30
+ this.onCellDblclick = new AsyncParallelHook(["event", "config", "$table"]);
31
+ this.onCellMenu = new AsyncParallelHook(["event", "config", "$table"]);
32
+ this.onCellMouseenter = new AsyncParallelHook(["event", "config", "$table"]);
33
+ this.onCellMouseleave = new AsyncParallelHook(["event", "config", "$table"]);
34
+ this.onHeaderCellClick = new AsyncParallelHook(["event", "config", "$table"]);
35
+ this.onHeaderCellDblclick = new AsyncParallelHook(["event", "config", "$table"]);
36
+ this.onHeaderCellMenu = new AsyncParallelHook(["event", "config", "$table"]);
37
+ this.onFooterCellClick = new AsyncParallelHook(["event", "config", "$table"]);
38
+ this.onFooterCellDblclick = new AsyncParallelHook(["event", "config", "$table"]);
39
+ this.onFooterCellMenu = new AsyncParallelHook(["event", "config", "$table"]);
40
+ this.onSortChange = new AsyncParallelHook(["event", "config", "$table"]);
41
+ this.onFilterChange = new AsyncParallelHook(["event", "config", "$table"]);
42
+ this.onFilterVisible = new AsyncParallelHook(["event", "config", "$table"]);
43
+ this.onResizableChange = new AsyncParallelHook(["event", "config", "$table"]);
44
+ this.onToggleRowExpand = new AsyncParallelHook(["event", "config", "$table"]);
45
+ this.onToggleTreeExpand = new AsyncParallelHook(["event", "config", "$table"]);
46
+ this.onMenuClick = new AsyncParallelHook(["event", "config", "$table"]);
47
+ this.onEditClosed = new AsyncParallelHook(["event", "config", "$table"]);
48
+ this.onEditActived = new AsyncParallelHook(["event", "config", "$table"]);
49
+ this.onEditDisabled = new AsyncParallelHook(["event", "config", "$table"]);
50
+ this.onValidError = new AsyncParallelHook(["event", "config", "$table"]);
51
+ this.onScroll = new AsyncParallelHook(["event", "config", "$table"]);
52
+ this.onCustom = new AsyncParallelHook(["event", "config", "$table"]);
53
+ this.onOpenFnr = new AsyncParallelHook(["event", "config", "$table"]);
54
+ this.onFnrChange = new AsyncParallelHook(["event", "config", "$table"]);
55
+ this.onFnrFind = new AsyncParallelHook(["event", "config", "$table"]);
56
+ this.onFnrFindAll = new AsyncParallelHook(["event", "config", "$table"]);
57
+ this.onFnrReplace = new AsyncParallelHook(["event", "config", "$table"]);
58
+ this.onFnrReplaceAll = new AsyncParallelHook(["event", "config", "$table"]);
59
+ this.onCellAreaCopy = new AsyncParallelHook(["event", "config", "$table"]);
60
+ this.onCellAreaCut = new AsyncParallelHook(["event", "config", "$table"]);
61
+ this.onCellAreaPaste = new AsyncParallelHook(["event", "config", "$table"]);
62
+ this.onCellAreaMerge = new AsyncParallelHook(["event", "config", "$table"]);
63
+ this.onClearCellAreaMerge = new AsyncParallelHook(["event", "config", "$table"]);
64
+ this.onHeaderCellAreaSelection = new AsyncParallelHook(["event", "config", "$table"]);
65
+ this.onCellAreaSelectionStart = new AsyncParallelHook(["event", "config", "$table"]);
66
+ this.onCellAreaSelectionDrag = new AsyncParallelHook(["event", "config", "$table"]);
67
+ this.onCellAreaSelectionEnd = new AsyncParallelHook(["event", "config", "$table"]);
68
+ this.onCellAreaExtensionStart = new AsyncParallelHook(["event", "config", "$table"]);
69
+ this.onCellAreaExtensionDrag = new AsyncParallelHook(["event", "config", "$table"]);
70
+ this.onCellAreaExtensionEnd = new AsyncParallelHook(["event", "config", "$table"]);
71
+ this.onCellAreaArrowsStart = new AsyncParallelHook(["event", "config", "$table"]);
72
+ this.onCellAreaArrowsEnd = new AsyncParallelHook(["event", "config", "$table"]);
73
+ this.onActiveCellChangeStart = new AsyncParallelHook(["event", "config", "$table"]);
74
+ this.onActiveCellChangeEnd = new AsyncParallelHook(["event", "config", "$table"]);
73
75
  }
74
76
  }
75
77
  function useEventHooks() {
@@ -1,8 +1,11 @@
1
- import { SyncWaterfallHook } from '../../../../../../es/shared/utils/tapable';
1
+ import { AsyncParallelHook, SyncWaterfallHook } from '../../../../../../es/shared/utils/tapable';
2
2
  import { FieldHookContext, IhoTableFieldItem } from '../../../../../../es/components/iho-table/src/types';
3
3
  import { AbstractFieldHooks } from '../../../../../../es/components/iho-table/src/types';
4
4
  declare class FieldHooks extends AbstractFieldHooks {
5
+ readonly fieldStart: AsyncParallelHook<[import("../../../../../../es/components/iho-table/src/types").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
5
6
  readonly field: SyncWaterfallHook<[IhoTableFieldItem, FieldHookContext, import("../../../../../../es/components/iho-table/src/types").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
7
+ readonly fieldList: SyncWaterfallHook<[IhoTableFieldItem[], import("../../../../../../es/components/iho-table/src/types").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
8
+ readonly fieldEnd: AsyncParallelHook<[import("../../../../../../es/components/iho-table/src/types").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
6
9
  }
7
10
  export declare function useFieldHooks(): {
8
11
  create: () => FieldHooks;
@@ -2,7 +2,7 @@ import '../../../../../shared/utils/tapable/SyncHook.js';
2
2
  import '../../../../../shared/utils/tapable/SyncBailHook.js';
3
3
  import SyncWaterfallHook from '../../../../../shared/utils/tapable/SyncWaterfallHook.js';
4
4
  import '../../../../../shared/utils/tapable/SyncLoopHook.js';
5
- import '../../../../../shared/utils/tapable/AsyncParallelHook.js';
5
+ import AsyncParallelHook from '../../../../../shared/utils/tapable/AsyncParallelHook.js';
6
6
  import '../../../../../shared/utils/tapable/AsyncParallelBailHook.js';
7
7
  import '../../../../../shared/utils/tapable/AsyncSeriesHook.js';
8
8
  import '../../../../../shared/utils/tapable/AsyncSeriesBailHook.js';
@@ -13,11 +13,14 @@ import { AbstractFieldHooks } from '../../types/pluginType2.js';
13
13
  class FieldHooks extends AbstractFieldHooks {
14
14
  constructor() {
15
15
  super(...arguments);
16
+ this.fieldStart = new AsyncParallelHook(["config"]);
16
17
  this.field = new SyncWaterfallHook([
17
18
  "fieldItem",
18
19
  "context",
19
20
  "config"
20
21
  ]);
22
+ this.fieldList = new SyncWaterfallHook(["fieldList", "config"]);
23
+ this.fieldEnd = new AsyncParallelHook(["config"]);
21
24
  }
22
25
  }
23
26
  function useFieldHooks() {
@@ -1,7 +1,7 @@
1
1
  import { ArrayAble } from '../../../../../es/shared/types';
2
- import { TablePlugin } from '../../../../../es/components/iho-table/src/types';
2
+ import { IhoTableInstance, TablePlugin } from '../../../../../es/components/iho-table/src/types';
3
3
  export declare function useTablePlugin(): {
4
- use: (plugin: ArrayAble<TablePlugin>) => {
4
+ use: (plugin: ArrayAble<TablePlugin>, instance: IhoTableInstance) => {
5
5
  use: any;
6
6
  };
7
7
  };
@@ -1,13 +1,12 @@
1
1
  import { arrayed } from '../../../../shared/utils/index2.js';
2
2
  import { isFunction } from 'lodash-es';
3
- import VXETable from 'vxe-table';
4
3
  import { createTableHooks } from './tapHooks/index2.js';
5
4
 
6
5
  function useTablePlugin() {
7
6
  const hooks = createTableHooks();
8
- function use(plugin) {
7
+ function use(plugin, instance) {
9
8
  arrayed(plugin).forEach(({ vxe, apply }) => {
10
- isFunction(vxe) && vxe(VXETable);
9
+ isFunction(vxe) && vxe(instance);
11
10
  isFunction(apply) && apply(hooks);
12
11
  });
13
12
  return { use };
@@ -1,4 +1,5 @@
1
1
  import { mergeWith } from 'lodash-es';
2
+ import { HIGHEST_PRIORITY } from '../../constants/index2.js';
2
3
  import { defineTablePlugin } from '../../hooks/useTablePlugin2.js';
3
4
 
4
5
  function defaultConfigPlugin() {
@@ -6,7 +7,7 @@ function defaultConfigPlugin() {
6
7
  return defineTablePlugin({
7
8
  name: pluginName,
8
9
  apply(hooks) {
9
- hooks.configHooks.config.tap({ name: pluginName, stage: 9999 }, (config) => {
10
+ hooks.configHooks.config.tap({ name: pluginName, stage: HIGHEST_PRIORITY }, (config) => {
10
11
  return mergeWith({
11
12
  height: "100%",
12
13
  border: true,
@@ -15,7 +16,7 @@ function defaultConfigPlugin() {
15
16
  columnConfig: { resizable: true },
16
17
  rowConfig: { height: 32, isHover: true, isCurrent: true, keyField: "theUniqueKey" },
17
18
  editConfig: {
18
- trigger: "manual",
19
+ trigger: "click",
19
20
  mode: "cell",
20
21
  autoClear: false,
21
22
  showIcon: false
@@ -1,3 +1,4 @@
1
1
  export * from './defaultConfigPlugin';
2
2
  export * from './lowCodeFieldAdaptorPlugin';
3
3
  export * from './rendererPlugins';
4
+ export * from './rowGroupSettingPlugin';
@@ -1,7 +1,10 @@
1
1
  export { defaultConfigPlugin } from './defaultConfigPlugin/index2.js';
2
2
  export { lowCodeFieldAdaptorPlugin } from './lowCodeFieldAdaptorPlugin/index2.js';
3
- export { labelRendererPlugin } from './rendererPlugins/labelRendererPlugin.js';
4
- export { defaultRendererPlugin } from './rendererPlugins/defaultRendererPlugin.js';
5
- export { colorRendererPlugin } from './rendererPlugins/colorRendererPlugin.js';
6
- export { seqRendererPlugin } from './rendererPlugins/seqRendererPlugin.js';
7
- export { checkRendererPlugin } from './rendererPlugins/checkRendererPlugin.js';
3
+ export { labelRendererPlugin } from './rendererPlugins/widgets/labelRendererPlugin.js';
4
+ export { defaultRendererPlugin } from './rendererPlugins/widgets/defaultRendererPlugin.js';
5
+ export { colorRendererPlugin } from './rendererPlugins/widgets/colorRendererPlugin.js';
6
+ export { seqRendererPlugin } from './rendererPlugins/widgets/seqRendererPlugin.js';
7
+ export { checkRendererPlugin } from './rendererPlugins/widgets/checkRendererPlugin.js';
8
+ export { pictureRendererPlugin } from './rendererPlugins/widgets/pictureRendererPlugin.js';
9
+ export { inputRendererPlugins } from './rendererPlugins/inputs/inputRendererPlugins.js';
10
+ export { rowGroupSettingPlugin } from './rowGroupSettingPlugin/index2.js';
@@ -1,7 +1,10 @@
1
1
  export { defaultConfigPlugin } from './defaultConfigPlugin/index2.js';
2
2
  export { lowCodeFieldAdaptorPlugin } from './lowCodeFieldAdaptorPlugin/index2.js';
3
- export { labelRendererPlugin } from './rendererPlugins/labelRendererPlugin.js';
4
- export { defaultRendererPlugin } from './rendererPlugins/defaultRendererPlugin.js';
5
- export { colorRendererPlugin } from './rendererPlugins/colorRendererPlugin.js';
6
- export { seqRendererPlugin } from './rendererPlugins/seqRendererPlugin.js';
7
- export { checkRendererPlugin } from './rendererPlugins/checkRendererPlugin.js';
3
+ export { labelRendererPlugin } from './rendererPlugins/widgets/labelRendererPlugin.js';
4
+ export { defaultRendererPlugin } from './rendererPlugins/widgets/defaultRendererPlugin.js';
5
+ export { colorRendererPlugin } from './rendererPlugins/widgets/colorRendererPlugin.js';
6
+ export { seqRendererPlugin } from './rendererPlugins/widgets/seqRendererPlugin.js';
7
+ export { checkRendererPlugin } from './rendererPlugins/widgets/checkRendererPlugin.js';
8
+ export { pictureRendererPlugin } from './rendererPlugins/widgets/pictureRendererPlugin.js';
9
+ export { inputRendererPlugins } from './rendererPlugins/inputs/inputRendererPlugins.js';
10
+ export { rowGroupSettingPlugin } from './rowGroupSettingPlugin/index2.js';
@@ -1,4 +1,5 @@
1
1
  import { pick } from 'lodash-es';
2
+ import { HIGHEST_PRIORITY, WIDGET_TYPE } from '../../constants/index2.js';
2
3
  import { defineTablePlugin } from '../../hooks/useTablePlugin2.js';
3
4
 
4
5
  function lowCodeFieldAdaptorPlugin() {
@@ -6,7 +7,7 @@ function lowCodeFieldAdaptorPlugin() {
6
7
  return defineTablePlugin({
7
8
  name: pluginName,
8
9
  apply(hooks) {
9
- hooks.fieldHooks.field.tap({ name: pluginName, stage: -9999 }, (field) => {
10
+ hooks.fieldHooks.field.tap({ name: pluginName, stage: HIGHEST_PRIORITY }, (field) => {
10
11
  const _field = field;
11
12
  const result = {
12
13
  field: _field.columnName,
@@ -14,13 +15,18 @@ function lowCodeFieldAdaptorPlugin() {
14
15
  showOverflow: "tooltip",
15
16
  ...pick(_field, ["title"])
16
17
  };
17
- if (_field.settingObj) {
18
- result.editRender = { name: _field.settingObj.attr || "DEFAULT" };
19
- }
18
+ settingObjAdaptor(_field.settingObj, result);
20
19
  return result;
21
20
  });
22
21
  }
23
22
  });
24
23
  }
24
+ function settingObjAdaptor(settingObj, fieldItem) {
25
+ if (!settingObj)
26
+ return;
27
+ fieldItem.editRender = { name: settingObj.attr || "DEFAULT" };
28
+ fieldItem.editRender.enabled = !Reflect.get(WIDGET_TYPE, fieldItem.editRender.name);
29
+ fieldItem.visible = settingObj.isHide !== "1";
30
+ }
25
31
 
26
32
  export { lowCodeFieldAdaptorPlugin };
@@ -1,5 +1,2 @@
1
- export * from './labelRendererPlugin';
2
- export * from './defaultRendererPlugin';
3
- export * from './colorRendererPlugin';
4
- export * from './seqRendererPlugin';
5
- export * from './checkRendererPlugin';
1
+ export * from './widgets';
2
+ export * from './inputs';
@@ -1,5 +1,7 @@
1
- export { labelRendererPlugin } from './labelRendererPlugin.js';
2
- export { defaultRendererPlugin } from './defaultRendererPlugin.js';
3
- export { colorRendererPlugin } from './colorRendererPlugin.js';
4
- export { seqRendererPlugin } from './seqRendererPlugin.js';
5
- export { checkRendererPlugin } from './checkRendererPlugin.js';
1
+ export { labelRendererPlugin } from './widgets/labelRendererPlugin.js';
2
+ export { defaultRendererPlugin } from './widgets/defaultRendererPlugin.js';
3
+ export { colorRendererPlugin } from './widgets/colorRendererPlugin.js';
4
+ export { seqRendererPlugin } from './widgets/seqRendererPlugin.js';
5
+ export { checkRendererPlugin } from './widgets/checkRendererPlugin.js';
6
+ export { pictureRendererPlugin } from './widgets/pictureRendererPlugin.js';
7
+ export { inputRendererPlugins } from './inputs/inputRendererPlugins.js';
@@ -0,0 +1 @@
1
+ export * from './inputRendererPlugins';
@@ -0,0 +1 @@
1
+ export { inputRendererPlugins } from './inputRendererPlugins.js';
@@ -0,0 +1 @@
1
+ export declare function inputRendererPlugins(): import("../../../../../../../es/components/iho-table").TablePlugin;
@@ -0,0 +1,49 @@
1
+ import { createVNode, inject } from 'vue';
2
+ import { NInput } from 'naive-ui';
3
+ import '../../../../index2.js';
4
+ import { INPUT_TYPE, InjectionIhoTableEmits } from '../../../constants/index2.js';
5
+ import { defineTablePlugin } from '../../../hooks/useTablePlugin2.js';
6
+
7
+ function inputRendererPlugins() {
8
+ const pluginName = "inputRendererPlugins";
9
+ return defineTablePlugin({
10
+ name: pluginName,
11
+ vxe(instance) {
12
+ instance.renderer.add(INPUT_TYPE.INPUT, {
13
+ renderCell(renderOpts, {
14
+ row,
15
+ column
16
+ }) {
17
+ return [createVNode("span", null, [row[column.field]])];
18
+ },
19
+ renderEdit(renderOpts, {
20
+ row,
21
+ column,
22
+ $rowIndex
23
+ }) {
24
+ const emit = inject(InjectionIhoTableEmits);
25
+ function onBlur() {
26
+ emit("formChange", {
27
+ value: row[column.field],
28
+ row,
29
+ column,
30
+ index: $rowIndex
31
+ });
32
+ }
33
+ return [createVNode(NInput, {
34
+ "value": row[column.field],
35
+ "onUpdate:value": ($event) => row[column.field] = $event,
36
+ "onBlur": onBlur
37
+ }, null)];
38
+ }
39
+ });
40
+ },
41
+ apply(hooks) {
42
+ hooks.eventHooks.onCellClick.tap("test", (payload, config, $table) => {
43
+ console.log($table.getData());
44
+ });
45
+ }
46
+ });
47
+ }
48
+
49
+ export { inputRendererPlugins };
@@ -1 +1 @@
1
- export declare function checkRendererPlugin(): import("../../../../../../es/components/iho-table").TablePlugin;
1
+ export declare function checkRendererPlugin(): import("../../../../../../../es/components/iho-table").TablePlugin;
@@ -1,5 +1,5 @@
1
- import '../../../index2.js';
2
- import { defineTablePlugin } from '../../hooks/useTablePlugin2.js';
1
+ import '../../../../index2.js';
2
+ import { defineTablePlugin } from '../../../hooks/useTablePlugin2.js';
3
3
 
4
4
  function checkRendererPlugin() {
5
5
  const pluginName = "checkRendererPlugin";
@@ -1 +1 @@
1
- export declare function colorRendererPlugin(): import("../../../../../../es/components/iho-table").TablePlugin;
1
+ export declare function colorRendererPlugin(): import("../../../../../../../es/components/iho-table").TablePlugin;
@@ -1,7 +1,8 @@
1
- import { inject, createVNode } from 'vue';
2
- import '../../../index2.js';
3
- import { WIDGET_TYPE, InjectionIhoTableConfig } from '../../constants/index2.js';
4
- import { defineTablePlugin } from '../../hooks/useTablePlugin2.js';
1
+ import { createVNode } from 'vue';
2
+ import '../../../../index2.js';
3
+ import { WIDGET_TYPE } from '../../../constants/index2.js';
4
+ import { getRowHeight } from '../../../utils/index2.js';
5
+ import { defineTablePlugin } from '../../../hooks/useTablePlugin2.js';
5
6
 
6
7
  function colorRendererPlugin() {
7
8
  const pluginName = "checkRendererPlugin";
@@ -28,15 +29,12 @@ function colorRendererPlugin() {
28
29
  row,
29
30
  column
30
31
  }) {
31
- var _a, _b, _c;
32
32
  const value = row[column.field];
33
33
  const [color, alias] = value.split("-");
34
- const config = inject(InjectionIhoTableConfig);
35
- const height = (_c = (_b = (_a = config == null ? void 0 : config.value) == null ? void 0 : _a.rowConfig) == null ? void 0 : _b.height) != null ? _c : 32;
36
34
  return [createVNode("div", {
37
35
  "style": {
38
36
  background: colorMap[alias] || color,
39
- height: height - 8 + "px"
37
+ height: getRowHeight() - 8 + "px"
40
38
  }
41
39
  }, null)];
42
40
  }
@@ -1 +1 @@
1
- export declare function defaultRendererPlugin(): import("../../../../../../es/components/iho-table").TablePlugin;
1
+ export declare function defaultRendererPlugin(): import("../../../../../../../es/components/iho-table").TablePlugin;
@@ -1,9 +1,9 @@
1
1
  import { createVNode } from 'vue';
2
2
  import { isString } from 'lodash-es';
3
- import '../../../index2.js';
4
- import { WIDGET_TYPE } from '../../constants/index2.js';
5
- import { IhoTableWarn } from '../../utils/index2.js';
6
- import { defineTablePlugin } from '../../hooks/useTablePlugin2.js';
3
+ import '../../../../index2.js';
4
+ import { WIDGET_TYPE } from '../../../constants/index2.js';
5
+ import { IhoTableWarn } from '../../../utils/index2.js';
6
+ import { defineTablePlugin } from '../../../hooks/useTablePlugin2.js';
7
7
 
8
8
  function defaultRendererPlugin() {
9
9
  const pluginName = "defaultRendererPlugin";
@@ -0,0 +1,6 @@
1
+ export * from './labelRendererPlugin';
2
+ export * from './defaultRendererPlugin';
3
+ export * from './colorRendererPlugin';
4
+ export * from './seqRendererPlugin';
5
+ export * from './checkRendererPlugin';
6
+ export * from './pictureRendererPlugin';
@@ -0,0 +1,6 @@
1
+ export { labelRendererPlugin } from './labelRendererPlugin.js';
2
+ export { defaultRendererPlugin } from './defaultRendererPlugin.js';
3
+ export { colorRendererPlugin } from './colorRendererPlugin.js';
4
+ export { seqRendererPlugin } from './seqRendererPlugin.js';
5
+ export { checkRendererPlugin } from './checkRendererPlugin.js';
6
+ export { pictureRendererPlugin } from './pictureRendererPlugin.js';
@@ -1 +1 @@
1
- export declare function labelRendererPlugin(): import("../../../../../../es/components/iho-table").TablePlugin;
1
+ export declare function labelRendererPlugin(): import("../../../../../../../es/components/iho-table").TablePlugin;
@@ -1,8 +1,8 @@
1
1
  import { createVNode } from 'vue';
2
2
  import { isArray, isString } from 'lodash-es';
3
- import '../../../index2.js';
4
- import { WIDGET_TYPE } from '../../constants/index2.js';
5
- import { defineTablePlugin } from '../../hooks/useTablePlugin2.js';
3
+ import '../../../../index2.js';
4
+ import { WIDGET_TYPE } from '../../../constants/index2.js';
5
+ import { defineTablePlugin } from '../../../hooks/useTablePlugin2.js';
6
6
 
7
7
  function labelRendererPlugin() {
8
8
  const pluginName = "labelRendererPlugin";
@@ -0,0 +1,2 @@
1
+ import 'viewerjs/dist/viewer.css';
2
+ export declare function pictureRendererPlugin(): import("../../../../../../../es/components/iho-table").TablePlugin;
@@ -0,0 +1,89 @@
1
+ import { defineComponent, watch, createVNode } from 'vue';
2
+ import { arrayed } from '../../../../../../shared/utils/index2.js';
3
+ import '../../../../index2.js';
4
+ import { WIDGET_TYPE } from '../../../constants/index2.js';
5
+ import { getRowHeight, IhoTableWarn } from '../../../utils/index2.js';
6
+ import Viewer from 'viewerjs';
7
+ import 'viewerjs/dist/viewer.css';
8
+ import { defineTablePlugin } from '../../../hooks/useTablePlugin2.js';
9
+
10
+ function pictureRendererPlugin() {
11
+ const pluginName = "pictureRendererPlugin";
12
+ return defineTablePlugin({
13
+ name: pluginName,
14
+ vxe(instance) {
15
+ function createRenderOptions(style) {
16
+ return {
17
+ renderCell(renderOpts, {
18
+ row,
19
+ column
20
+ }) {
21
+ try {
22
+ const value = JSON.parse(row[column.field]);
23
+ const height = getRowHeight();
24
+ return [createVNode("section", {
25
+ "style": "display:flex;justify-content:center"
26
+ }, [createVNode(ViewerImage, {
27
+ "style": {
28
+ width: height + "px",
29
+ height: height + "px",
30
+ ...style
31
+ },
32
+ "images": arrayed(value).map((v) => v.url)
33
+ }, null)])];
34
+ } catch (e) {
35
+ IhoTableWarn(`invalid ${renderOpts.name} value of field(${column.field}): ${row[column.field]}`);
36
+ return [];
37
+ }
38
+ }
39
+ };
40
+ }
41
+ instance.renderer.add(WIDGET_TYPE.PICTURE, createRenderOptions({}));
42
+ instance.renderer.add(WIDGET_TYPE.HEADPORTRAIT, createRenderOptions({
43
+ "border-radius": "50%"
44
+ }));
45
+ }
46
+ });
47
+ }
48
+ const ViewerImage = defineComponent({
49
+ name: "ViewerImage",
50
+ props: {
51
+ images: {
52
+ type: Array,
53
+ default: () => []
54
+ },
55
+ options: {
56
+ type: Object,
57
+ default: () => ({})
58
+ }
59
+ },
60
+ setup(props) {
61
+ let $viewer = null;
62
+ function show() {
63
+ if ($viewer)
64
+ return $viewer.show();
65
+ const wrapper = document.createElement("section");
66
+ props.images.map((image) => wrapper.appendChild(createImage(image)));
67
+ $viewer = new Viewer(wrapper, props.options).show();
68
+ }
69
+ function createImage(image) {
70
+ const imageEle = new Image();
71
+ imageEle.src = image;
72
+ return imageEle;
73
+ }
74
+ watch([() => props.images, () => props.options], () => {
75
+ $viewer == null ? void 0 : $viewer.destroy();
76
+ $viewer = null;
77
+ }, {
78
+ deep: true
79
+ });
80
+ return () => createVNode("img", {
81
+ "style": "cursor:pointer",
82
+ "alt": "",
83
+ "src": props.images[0],
84
+ "onClick": show
85
+ }, null);
86
+ }
87
+ });
88
+
89
+ export { pictureRendererPlugin };
@@ -1 +1 @@
1
- export declare function seqRendererPlugin(): import("../../../../../../es/components/iho-table").TablePlugin;
1
+ export declare function seqRendererPlugin(): import("../../../../../../../es/components/iho-table").TablePlugin;
@@ -1,9 +1,9 @@
1
1
  import { inject, createVNode } from 'vue';
2
2
  import { SettingsSharp } from '@vicons/ionicons5';
3
3
  import { NIcon } from 'naive-ui';
4
- import '../../../index2.js';
5
- import { WIDGET_TYPE, InjectionIhoTableEmits } from '../../constants/index2.js';
6
- import { defineTablePlugin } from '../../hooks/useTablePlugin2.js';
4
+ import '../../../../index2.js';
5
+ import { WIDGET_TYPE, InjectionIhoTableEmits } from '../../../constants/index2.js';
6
+ import { defineTablePlugin } from '../../../hooks/useTablePlugin2.js';
7
7
 
8
8
  function seqRendererPlugin() {
9
9
  const pluginName = "seqRendererPlugin";
@@ -0,0 +1 @@
1
+ export declare function rowGroupSettingPlugin(): import("../../../../../../es/components/iho-table").TablePlugin;
@@ -0,0 +1 @@
1
+ export { rowGroupSettingPlugin } from './index2.js';