cnhis-design-vue 3.1.22-beta.1 → 3.1.22-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.
- package/README.md +123 -123
- package/es/components/big-table/index.d.ts +0 -8
- package/es/components/big-table/index2.js +0 -2
- package/es/components/big-table/src/BigTable.vue.d.ts +0 -8
- package/es/components/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +22 -30
- package/es/components/big-table/src/components/edit-form/edit-date.js +81 -10
- package/es/components/big-table/src/components/edit-form/edit-input.js +1 -0
- package/es/components/big-table/src/components/edit-form/useCommon.d.ts +4 -0
- package/es/components/big-table/src/hooks/useEdit2.js +2 -2
- package/es/components/big-table/style/index.css +1 -1
- package/es/components/{form-render/src/components/index.d.ts → bpmn-workflow/src/BpmnWorkflow.d.ts} +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/fabric-chart/index.d.ts +1 -0
- package/es/components/fabric-chart/src/FabricChart.js +3 -2
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/useCenter.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/useCenter2.js +15 -3
- package/es/components/fabric-chart/src/hooks/useLeft.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/useLeft2.js +7 -5
- package/es/components/fabric-chart/src/interface.d.ts +2 -0
- package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
- package/es/components/form-render/src/components/renderer/cascader.js +10 -7
- package/es/components/form-render/src/components/renderer/combination.d.ts +7 -0
- package/es/components/form-render/src/components/renderer/combination.js +4 -1
- package/es/components/form-render/src/components/renderer/date.js +11 -4
- package/es/components/form-render/src/components/renderer/input.js +2 -2
- package/es/components/form-render/src/components/renderer/inputNumber.js +2 -2
- package/es/components/form-render/src/components/renderer/search.js +3 -3
- package/es/components/form-render/src/components/renderer/select.js +3 -3
- package/es/components/form-render/src/components/renderer/textarea.js +2 -2
- package/es/components/form-render/src/hooks/useCommonInjection2.js +6 -2
- package/es/components/form-render/src/utils/schema.d.ts +4 -1
- package/es/components/form-render/src/utils/schema.js +1 -1
- package/es/components/form-render/src/utils/schema2.js +9 -2
- package/es/components/grid/index2.js +0 -2
- package/es/components/iho-table/index.d.ts +4248 -337
- package/es/components/iho-table/index.js +2 -2
- package/es/components/iho-table/index2.js +9 -4
- package/es/components/iho-table/src/IhoTable.js +39 -13
- package/es/components/iho-table/src/IhoTable.vue.d.ts +4236 -326
- package/es/components/iho-table/src/components/IhoTableColumn.d.ts +2 -2
- package/es/components/iho-table/src/components/IhoTableColumn.js +25 -5
- package/es/components/iho-table/src/constants/index.d.ts +8 -1
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/constants/index2.js +79 -1
- package/es/components/iho-table/src/hooks/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +7 -0
- package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index2.js +92 -21
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +14 -0
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks2.js +39 -1
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +14 -0
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -0
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks2.js +26 -0
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +61 -60
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks2.js +62 -60
- package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.d.ts +4 -1
- package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks2.js +4 -1
- package/es/components/iho-table/src/hooks/useTablePlugin.d.ts +2 -2
- package/es/components/iho-table/src/hooks/useTablePlugin2.js +2 -3
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index2.js +3 -2
- package/es/components/iho-table/src/plugins/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/index.js +8 -5
- package/es/components/iho-table/src/plugins/index2.js +8 -5
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index2.js +10 -4
- package/es/components/iho-table/src/plugins/rendererPlugins/index.d.ts +2 -5
- package/es/components/iho-table/src/plugins/rendererPlugins/index.js +7 -5
- package/es/components/iho-table/src/plugins/rendererPlugins/inputs/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/inputs/index.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/inputs/inputRendererPlugins.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/inputs/inputRendererPlugins.js +49 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/{checkRendererPlugin.d.ts → widgets/checkRendererPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/{checkRendererPlugin.js → widgets/checkRendererPlugin.js} +2 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/{colorRendererPlugin.d.ts → widgets/colorRendererPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/{colorRendererPlugin.js → widgets/colorRendererPlugin.js} +6 -8
- package/es/components/iho-table/src/plugins/rendererPlugins/{defaultRendererPlugin.d.ts → widgets/defaultRendererPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/{defaultRendererPlugin.js → widgets/defaultRendererPlugin.js} +4 -4
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/index.d.ts +6 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/index.js +6 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/{labelRendererPlugin.d.ts → widgets/labelRendererPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/{labelRendererPlugin.js → widgets/labelRendererPlugin.js} +3 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.d.ts +2 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +89 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/{seqRendererPlugin.d.ts → widgets/seqRendererPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/{seqRendererPlugin.js → widgets/seqRendererPlugin.js} +3 -3
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index2.js +72 -0
- package/es/components/iho-table/src/types/index.d.ts +31 -8
- package/es/components/iho-table/src/types/index.js +1 -1
- package/es/components/iho-table/src/types/pluginType.d.ts +102 -65
- package/es/components/iho-table/src/types/pluginType.js +1 -1
- package/es/components/iho-table/src/types/pluginType2.js +3 -1
- package/es/components/iho-table/src/utils/index.d.ts +3 -0
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/iho-table/src/utils/index2.js +16 -1
- package/es/components/index.css +1 -1
- package/es/components/index.js +2 -2
- package/es/components/index2.js +1 -1
- package/es/components/info-header/style/iconfont.ttf +0 -0
- package/es/components/info-header/style/index.css +1 -1
- package/es/shared/utils/tapable/SyncHook.js +23 -2
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +4 -4
- package/es/components/form-render/src/components/index.js +0 -1
- package/es/shared/utils/loadVxe.d.ts +0 -2
- package/es/shared/utils/loadVxe.js +0 -1
- package/es/shared/utils/loadVxe2.js +0 -12
|
@@ -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("
|
|
1
|
+
export declare function checkRendererPlugin(): import("../../../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import { defineTablePlugin } from '
|
|
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("
|
|
1
|
+
export declare function colorRendererPlugin(): import("../../../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import '
|
|
3
|
-
import { WIDGET_TYPE
|
|
4
|
-
import {
|
|
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:
|
|
37
|
+
height: getRowHeight() - 8 + "px"
|
|
40
38
|
}
|
|
41
39
|
}, null)];
|
|
42
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function defaultRendererPlugin(): import("
|
|
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 '
|
|
4
|
-
import { WIDGET_TYPE } from '
|
|
5
|
-
import { IhoTableWarn } from '
|
|
6
|
-
import { defineTablePlugin } from '
|
|
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 { 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("
|
|
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 '
|
|
4
|
-
import { WIDGET_TYPE } from '
|
|
5
|
-
import { defineTablePlugin } from '
|
|
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,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("
|
|
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 '
|
|
5
|
-
import { WIDGET_TYPE, InjectionIhoTableEmits } from '
|
|
6
|
-
import { defineTablePlugin } from '
|
|
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';
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { isObject } from '@vue/shared';
|
|
2
|
+
import { isArray, isString } from 'lodash-es';
|
|
3
|
+
import '../../../index2.js';
|
|
4
|
+
import { IhoTableRowGroupSequence } from '../../constants/index2.js';
|
|
5
|
+
import { defineTablePlugin } from '../../hooks/useTablePlugin2.js';
|
|
6
|
+
|
|
7
|
+
function rowGroupSettingPlugin() {
|
|
8
|
+
const pluginName = "rowGroupSettingPlugin";
|
|
9
|
+
return defineTablePlugin({
|
|
10
|
+
name: pluginName,
|
|
11
|
+
apply(hooks) {
|
|
12
|
+
hooks.fieldHooks.fieldList.tap(pluginName, (fieldList, config) => {
|
|
13
|
+
if (!isObject(config.rowGroupSetting))
|
|
14
|
+
return fieldList;
|
|
15
|
+
return groupTraverser(createRowGroupList(config.rowGroupSetting, fieldList), (fieldName, isBlock) => {
|
|
16
|
+
if (isBlock)
|
|
17
|
+
return { field: fieldName, title: fieldName };
|
|
18
|
+
return fieldSearcher(fieldName, fieldList);
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function fieldSearcher(fieldName, fieldList) {
|
|
25
|
+
return fieldList.find((field) => field.field === fieldName);
|
|
26
|
+
}
|
|
27
|
+
function createRowGroupList(rowGroupSetting, fieldList) {
|
|
28
|
+
const result = fieldList.map((field) => field.field);
|
|
29
|
+
IhoTableRowGroupSequence.some((sequence) => {
|
|
30
|
+
const currentLevelGroup = rowGroupSetting[sequence];
|
|
31
|
+
if (!isArray(currentLevelGroup))
|
|
32
|
+
return true;
|
|
33
|
+
currentLevelGroup.forEach((groupSetting) => {
|
|
34
|
+
if (!isArray(groupSetting.list) || !groupSetting.list.length)
|
|
35
|
+
return;
|
|
36
|
+
const children = [];
|
|
37
|
+
groupSetting.list.forEach((fieldName, idx) => {
|
|
38
|
+
const groupIdx = groupIndexSearcher(fieldName, result);
|
|
39
|
+
if (!~groupIdx)
|
|
40
|
+
return;
|
|
41
|
+
children.push(result[groupIdx]);
|
|
42
|
+
if (idx === 0) {
|
|
43
|
+
result.splice(groupIdx, 1, { fieldName: groupSetting.title, children });
|
|
44
|
+
} else {
|
|
45
|
+
result.splice(groupIdx, 1);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
return result;
|
|
51
|
+
function groupIndexSearcher(fieldName, groupList) {
|
|
52
|
+
return groupList.findIndex((group) => (isObject(group) ? group.fieldName : group) === fieldName);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function groupTraverser(groupList, replacer) {
|
|
56
|
+
return groupList.reduce((result, group) => {
|
|
57
|
+
if (isString(group)) {
|
|
58
|
+
const item = replacer(group);
|
|
59
|
+
item && result.push(item);
|
|
60
|
+
}
|
|
61
|
+
if (isObject(group) && group.children) {
|
|
62
|
+
const item = replacer(group.fieldName, true);
|
|
63
|
+
if (item) {
|
|
64
|
+
item.children = groupTraverser(group.children, replacer);
|
|
65
|
+
result.push(item);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return result;
|
|
69
|
+
}, []);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export { rowGroupSettingPlugin };
|
|
@@ -1,17 +1,33 @@
|
|
|
1
|
+
import { AnyObject } from '../../../../../es/shared/types';
|
|
1
2
|
import { VxeTableProps, VxeTableDefines } from 'vxe-table';
|
|
3
|
+
import { IhoTableRowGroupSequence } from '../../../../../es/components/iho-table/src/constants';
|
|
2
4
|
export * from './pluginType';
|
|
3
|
-
export interface
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
export interface IhoTableRowGroupItem {
|
|
6
|
+
groupName: string;
|
|
7
|
+
title: string;
|
|
8
|
+
list: string[];
|
|
7
9
|
}
|
|
8
|
-
|
|
10
|
+
declare type TupleToUnion<T extends readonly any[]> = T extends readonly [infer L, ...infer R] ? L | TupleToUnion<R> : never;
|
|
11
|
+
declare type UnionToIntersectionFn<U> = (U extends unknown ? (k: () => U) => void : never) extends (k: infer I) => void ? I : never;
|
|
12
|
+
declare type GetUnionLast<U> = UnionToIntersectionFn<U> extends () => infer I ? I : never;
|
|
13
|
+
declare type Prepend<Tuple extends unknown[], First> = [First, ...Tuple];
|
|
14
|
+
export declare type UnionToTuple<Union, T extends unknown[] = [], Last = GetUnionLast<Union>> = [Union] extends [never] ? T : UnionToTuple<Exclude<Union, Last>, Prepend<T, Last>>;
|
|
15
|
+
export declare type IhoTableConfig = VxeTableProps & Partial<{
|
|
16
|
+
showSeq: boolean;
|
|
17
|
+
selectType: Exclude<VxeTableDefines.ColumnInfo['type'], 'seq' | 'expand' | 'html'>;
|
|
18
|
+
rowGroupSetting: Partial<Record<TupleToUnion<typeof IhoTableRowGroupSequence>, IhoTableRowGroupItem[]>>;
|
|
9
19
|
[K: string]: unknown;
|
|
10
|
-
}
|
|
11
|
-
|
|
20
|
+
}>;
|
|
21
|
+
export declare type IhoTableFieldItem = {
|
|
22
|
+
[K in keyof VxeTableDefines.ColumnInfo]?: K extends 'children' ? IhoTableFieldItem[] : K extends keyof VxeTableDefines.ColumnInfo ? VxeTableDefines.ColumnInfo[K] : never;
|
|
23
|
+
} & {
|
|
24
|
+
[K: string]: unknown;
|
|
25
|
+
};
|
|
26
|
+
declare type LowCodeTableSettingObj = Partial<{
|
|
12
27
|
attr: string;
|
|
28
|
+
isHide: '0' | '1';
|
|
13
29
|
[K: string]: unknown;
|
|
14
|
-
}
|
|
30
|
+
}>;
|
|
15
31
|
export declare type LowCodeTableFieldItem = {
|
|
16
32
|
columnName: string;
|
|
17
33
|
[K: string]: unknown;
|
|
@@ -21,3 +37,10 @@ export declare type LowCodeTableFieldItem = {
|
|
|
21
37
|
colWidth?: string | number;
|
|
22
38
|
settingObj: LowCodeTableSettingObj;
|
|
23
39
|
}>;
|
|
40
|
+
export declare type IhoFormChangePayload = {
|
|
41
|
+
column: VxeTableDefines.ColumnInfo;
|
|
42
|
+
row: AnyObject;
|
|
43
|
+
value: unknown;
|
|
44
|
+
index: number;
|
|
45
|
+
};
|
|
46
|
+
export declare type EventListenerToEventName<T extends string> = T extends `on${infer R}` ? R extends `${infer F}${infer L}` ? `${Lowercase<F>}${L}` : never : never;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { AbstractConfigHooks, AbstractEventHooks, AbstractFieldHooks } from './pluginType2.js';
|
|
1
|
+
export { AbstractConfigHooks, AbstractDataHooks, AbstractEventHooks, AbstractFieldHooks } from './pluginType2.js';
|
|
@@ -1,24 +1,48 @@
|
|
|
1
|
-
import { ArrayAble } from '../../../../../es/shared/types';
|
|
2
|
-
import { AsyncParallelHook, SyncWaterfallHook } from '../../../../../es/shared/utils/tapable';
|
|
3
|
-
import
|
|
1
|
+
import { AnyObject, ArrayAble, Nullable } from '../../../../../es/shared/types';
|
|
2
|
+
import { AsyncParallelHook, SyncHook, SyncWaterfallHook } from '../../../../../es/shared/utils/tapable';
|
|
3
|
+
import { VxeGlobalCommands, VxeGlobalFormats, VxeGlobalHooks, VxeGlobalMenus, VxeGlobalRenderer, VxeTableInstance } from 'vxe-table';
|
|
4
4
|
import { VxeTableEventProps, VxeTableEvents } from 'vxe-table/types/table';
|
|
5
|
+
import { VxeGlobalInterceptor } from 'vxe-table/types/v-x-e-table';
|
|
5
6
|
import { IhoTableConfig, IhoTableFieldItem } from '.';
|
|
7
|
+
export declare type IhoTableInstance = {
|
|
8
|
+
interceptor: VxeGlobalInterceptor;
|
|
9
|
+
renderer: VxeGlobalRenderer;
|
|
10
|
+
commands: VxeGlobalCommands;
|
|
11
|
+
formats: VxeGlobalFormats;
|
|
12
|
+
menus: VxeGlobalMenus;
|
|
13
|
+
hooks: VxeGlobalHooks;
|
|
14
|
+
};
|
|
6
15
|
export declare type TablePlugin = {
|
|
7
16
|
name: string;
|
|
8
|
-
vxe?(xeTable:
|
|
17
|
+
vxe?(xeTable: IhoTableInstance): void;
|
|
9
18
|
apply?(hooks: TableHooks): void;
|
|
10
19
|
};
|
|
11
20
|
export declare type TableHooks = Readonly<{
|
|
12
21
|
configHooks: AbstractConfigHooks;
|
|
13
22
|
fieldHooks: AbstractFieldHooks;
|
|
14
23
|
eventHooks: AbstractEventHooks;
|
|
24
|
+
dataHooks: AbstractDataHooks;
|
|
15
25
|
}>;
|
|
16
|
-
export declare type WithTableConfig<T> = T extends any[] ? [...T, IhoTableConfig] : [T, IhoTableConfig];
|
|
26
|
+
export declare type WithTableConfig<T = []> = T extends any[] ? [...T, IhoTableConfig] : [T, IhoTableConfig];
|
|
17
27
|
export declare abstract class AbstractConfigHooks {
|
|
18
28
|
abstract readonly config: SyncWaterfallHook<IhoTableConfig>;
|
|
19
29
|
abstract readonly rowConfig: SyncWaterfallHook<WithTableConfig<IhoTableConfig['rowConfig']>>;
|
|
20
30
|
abstract readonly editConfig: SyncWaterfallHook<WithTableConfig<IhoTableConfig['editConfig']>>;
|
|
21
31
|
abstract readonly columnConfig: SyncWaterfallHook<WithTableConfig<IhoTableConfig['columnConfig']>>;
|
|
32
|
+
abstract readonly resizableConfig: SyncWaterfallHook<WithTableConfig<IhoTableConfig['resizableConfig']>>;
|
|
33
|
+
abstract readonly seqConfig: SyncWaterfallHook<WithTableConfig<IhoTableConfig['seqConfig']>>;
|
|
34
|
+
abstract readonly sortConfig: SyncWaterfallHook<WithTableConfig<IhoTableConfig['sortConfig']>>;
|
|
35
|
+
abstract readonly filterConfig: SyncWaterfallHook<WithTableConfig<IhoTableConfig['filterConfig']>>;
|
|
36
|
+
abstract readonly radioConfig: SyncWaterfallHook<WithTableConfig<IhoTableConfig['radioConfig']>>;
|
|
37
|
+
abstract readonly checkboxConfig: SyncWaterfallHook<WithTableConfig<IhoTableConfig['checkboxConfig']>>;
|
|
38
|
+
abstract readonly expandConfig: SyncWaterfallHook<WithTableConfig<IhoTableConfig['expandConfig']>>;
|
|
39
|
+
abstract readonly treeConfig: SyncWaterfallHook<WithTableConfig<IhoTableConfig['treeConfig']>>;
|
|
40
|
+
abstract readonly mouseConfig: SyncWaterfallHook<WithTableConfig<IhoTableConfig['mouseConfig']>>;
|
|
41
|
+
abstract readonly menuConfig: SyncWaterfallHook<WithTableConfig<IhoTableConfig['menuConfig']>>;
|
|
42
|
+
abstract readonly keyboardConfig: SyncWaterfallHook<WithTableConfig<IhoTableConfig['keyboardConfig']>>;
|
|
43
|
+
abstract readonly scrollY: SyncWaterfallHook<WithTableConfig<IhoTableConfig['scrollY']>>;
|
|
44
|
+
abstract readonly scrollX: SyncWaterfallHook<WithTableConfig<IhoTableConfig['scrollX']>>;
|
|
45
|
+
abstract readonly editRules: SyncWaterfallHook<WithTableConfig<IhoTableConfig['editRules']>>;
|
|
22
46
|
}
|
|
23
47
|
export interface FieldHookContext {
|
|
24
48
|
index: number;
|
|
@@ -27,70 +51,83 @@ export interface FieldHookContext {
|
|
|
27
51
|
insertAfter(field: ArrayAble<IhoTableFieldItem>): void;
|
|
28
52
|
}
|
|
29
53
|
export declare abstract class AbstractFieldHooks {
|
|
54
|
+
abstract readonly fieldStart: AsyncParallelHook<WithTableConfig>;
|
|
30
55
|
abstract readonly field: SyncWaterfallHook<WithTableConfig<[IhoTableFieldItem, FieldHookContext]>>;
|
|
56
|
+
abstract readonly fieldList: SyncWaterfallHook<WithTableConfig<[IhoTableFieldItem[]]>>;
|
|
57
|
+
abstract readonly fieldEnd: AsyncParallelHook<WithTableConfig>;
|
|
31
58
|
}
|
|
59
|
+
export declare type WithIhoEventContext<T> = T extends any[] ? [...T, IhoTableConfig, Nullable<VxeTableInstance>] : [T, IhoTableConfig, Nullable<VxeTableInstance>];
|
|
32
60
|
declare type VxeEventTypes = Required<{
|
|
33
|
-
readonly [K in keyof VxeTableEventProps]: AsyncParallelHook<
|
|
61
|
+
readonly [K in keyof VxeTableEventProps]: AsyncParallelHook<WithIhoEventContext<VxeTableEventProps[K]>>;
|
|
34
62
|
}>;
|
|
35
63
|
export declare abstract class AbstractEventHooks implements VxeEventTypes {
|
|
36
|
-
abstract readonly onKeydownStart: AsyncParallelHook<
|
|
37
|
-
abstract readonly onKeydown: AsyncParallelHook<
|
|
38
|
-
abstract readonly onKeydownEnd: AsyncParallelHook<
|
|
39
|
-
abstract readonly onPaste: AsyncParallelHook<
|
|
40
|
-
abstract readonly onCopy: AsyncParallelHook<
|
|
41
|
-
abstract readonly onCut: AsyncParallelHook<
|
|
42
|
-
abstract readonly onCurrentChange: AsyncParallelHook<
|
|
43
|
-
abstract readonly onRadioChange: AsyncParallelHook<
|
|
44
|
-
abstract readonly onCheckboxChange: AsyncParallelHook<
|
|
45
|
-
abstract readonly onCheckboxAll: AsyncParallelHook<
|
|
46
|
-
abstract readonly onCheckboxRangeStart: AsyncParallelHook<
|
|
47
|
-
abstract readonly onCheckboxRangeChange: AsyncParallelHook<
|
|
48
|
-
abstract readonly onCheckboxRangeEnd: AsyncParallelHook<
|
|
49
|
-
abstract readonly onCellClick: AsyncParallelHook<
|
|
50
|
-
abstract readonly onCellDblclick: AsyncParallelHook<
|
|
51
|
-
abstract readonly onCellMenu: AsyncParallelHook<
|
|
52
|
-
abstract readonly onCellMouseenter: AsyncParallelHook<
|
|
53
|
-
abstract readonly onCellMouseleave: AsyncParallelHook<
|
|
54
|
-
abstract readonly onHeaderCellClick: AsyncParallelHook<
|
|
55
|
-
abstract readonly onHeaderCellDblclick: AsyncParallelHook<
|
|
56
|
-
abstract readonly onHeaderCellMenu: AsyncParallelHook<
|
|
57
|
-
abstract readonly onFooterCellClick: AsyncParallelHook<
|
|
58
|
-
abstract readonly onFooterCellDblclick: AsyncParallelHook<
|
|
59
|
-
abstract readonly onFooterCellMenu: AsyncParallelHook<
|
|
60
|
-
abstract readonly onSortChange: AsyncParallelHook<
|
|
61
|
-
abstract readonly onFilterChange: AsyncParallelHook<
|
|
62
|
-
abstract readonly onFilterVisible: AsyncParallelHook<
|
|
63
|
-
abstract readonly onResizableChange: AsyncParallelHook<
|
|
64
|
-
abstract readonly onToggleRowExpand: AsyncParallelHook<
|
|
65
|
-
abstract readonly onToggleTreeExpand: AsyncParallelHook<
|
|
66
|
-
abstract readonly onMenuClick: AsyncParallelHook<
|
|
67
|
-
abstract readonly onEditClosed: AsyncParallelHook<
|
|
68
|
-
abstract readonly onEditActived: AsyncParallelHook<
|
|
69
|
-
abstract readonly onEditDisabled: AsyncParallelHook<
|
|
70
|
-
abstract readonly onValidError: AsyncParallelHook<
|
|
71
|
-
abstract readonly onScroll: AsyncParallelHook<
|
|
72
|
-
abstract readonly onCustom: AsyncParallelHook<
|
|
73
|
-
abstract readonly onOpenFnr: AsyncParallelHook<
|
|
74
|
-
abstract readonly onFnrChange: AsyncParallelHook<
|
|
75
|
-
abstract readonly onFnrFind: AsyncParallelHook<
|
|
76
|
-
abstract readonly onFnrFindAll: AsyncParallelHook<
|
|
77
|
-
abstract readonly onFnrReplace: AsyncParallelHook<
|
|
78
|
-
abstract readonly onFnrReplaceAll: AsyncParallelHook<
|
|
79
|
-
abstract readonly onCellAreaCopy: AsyncParallelHook<
|
|
80
|
-
abstract readonly onCellAreaCut: AsyncParallelHook<
|
|
81
|
-
abstract readonly onCellAreaPaste: AsyncParallelHook<
|
|
82
|
-
abstract readonly onCellAreaMerge: AsyncParallelHook<
|
|
83
|
-
abstract readonly onClearCellAreaMerge: AsyncParallelHook<
|
|
84
|
-
abstract readonly onHeaderCellAreaSelection: AsyncParallelHook<
|
|
85
|
-
abstract readonly onCellAreaSelectionStart: AsyncParallelHook<
|
|
86
|
-
abstract readonly onCellAreaSelectionDrag: AsyncParallelHook<
|
|
87
|
-
abstract readonly onCellAreaSelectionEnd: AsyncParallelHook<
|
|
88
|
-
abstract readonly onCellAreaExtensionStart: AsyncParallelHook<
|
|
89
|
-
abstract readonly onCellAreaExtensionDrag: AsyncParallelHook<
|
|
90
|
-
abstract readonly onCellAreaExtensionEnd: AsyncParallelHook<
|
|
91
|
-
abstract readonly onCellAreaArrowsStart: AsyncParallelHook<
|
|
92
|
-
abstract readonly onCellAreaArrowsEnd: AsyncParallelHook<
|
|
93
|
-
abstract readonly onActiveCellChangeStart: AsyncParallelHook<
|
|
94
|
-
abstract readonly onActiveCellChangeEnd: AsyncParallelHook<
|
|
64
|
+
abstract readonly onKeydownStart: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.KeydownStart>>;
|
|
65
|
+
abstract readonly onKeydown: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.Keydown>>;
|
|
66
|
+
abstract readonly onKeydownEnd: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.KeydownEnd>>;
|
|
67
|
+
abstract readonly onPaste: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.Paste>>;
|
|
68
|
+
abstract readonly onCopy: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.Copy>>;
|
|
69
|
+
abstract readonly onCut: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.Cut>>;
|
|
70
|
+
abstract readonly onCurrentChange: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.CurrentChange>>;
|
|
71
|
+
abstract readonly onRadioChange: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.RadioChange>>;
|
|
72
|
+
abstract readonly onCheckboxChange: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.CheckboxChange>>;
|
|
73
|
+
abstract readonly onCheckboxAll: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.CheckboxAll>>;
|
|
74
|
+
abstract readonly onCheckboxRangeStart: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.CheckboxRangeStart>>;
|
|
75
|
+
abstract readonly onCheckboxRangeChange: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.CheckboxRangeChange>>;
|
|
76
|
+
abstract readonly onCheckboxRangeEnd: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.CheckboxRangeEnd>>;
|
|
77
|
+
abstract readonly onCellClick: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.CellClick>>;
|
|
78
|
+
abstract readonly onCellDblclick: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.CellDblclick>>;
|
|
79
|
+
abstract readonly onCellMenu: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.CellMenu>>;
|
|
80
|
+
abstract readonly onCellMouseenter: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.CellMouseenter>>;
|
|
81
|
+
abstract readonly onCellMouseleave: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.CellMouseleave>>;
|
|
82
|
+
abstract readonly onHeaderCellClick: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.HeaderCellClick>>;
|
|
83
|
+
abstract readonly onHeaderCellDblclick: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.HeaderCellDblclick>>;
|
|
84
|
+
abstract readonly onHeaderCellMenu: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.HeaderCellMenu>>;
|
|
85
|
+
abstract readonly onFooterCellClick: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.FooterCellClick>>;
|
|
86
|
+
abstract readonly onFooterCellDblclick: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.FooterCellDblclick>>;
|
|
87
|
+
abstract readonly onFooterCellMenu: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.FooterCellMenu>>;
|
|
88
|
+
abstract readonly onSortChange: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.SortChange>>;
|
|
89
|
+
abstract readonly onFilterChange: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.FilterChange>>;
|
|
90
|
+
abstract readonly onFilterVisible: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.FilterVisible>>;
|
|
91
|
+
abstract readonly onResizableChange: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.ResizableChange>>;
|
|
92
|
+
abstract readonly onToggleRowExpand: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.ToggleRowExpand>>;
|
|
93
|
+
abstract readonly onToggleTreeExpand: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.ToggleTreeExpand>>;
|
|
94
|
+
abstract readonly onMenuClick: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.MenuClick>>;
|
|
95
|
+
abstract readonly onEditClosed: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.EditClosed>>;
|
|
96
|
+
abstract readonly onEditActived: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.EditActived>>;
|
|
97
|
+
abstract readonly onEditDisabled: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.EditDisabled>>;
|
|
98
|
+
abstract readonly onValidError: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.ValidError>>;
|
|
99
|
+
abstract readonly onScroll: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.Scroll>>;
|
|
100
|
+
abstract readonly onCustom: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.Custom>>;
|
|
101
|
+
abstract readonly onOpenFnr: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.OpenFnr>>;
|
|
102
|
+
abstract readonly onFnrChange: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.FnrChange>>;
|
|
103
|
+
abstract readonly onFnrFind: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.FnrFind>>;
|
|
104
|
+
abstract readonly onFnrFindAll: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.FnrFindAll>>;
|
|
105
|
+
abstract readonly onFnrReplace: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.FnrReplace>>;
|
|
106
|
+
abstract readonly onFnrReplaceAll: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.FnrReplaceAll>>;
|
|
107
|
+
abstract readonly onCellAreaCopy: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.CellAreaCopy>>;
|
|
108
|
+
abstract readonly onCellAreaCut: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.CellAreaCut>>;
|
|
109
|
+
abstract readonly onCellAreaPaste: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.CellAreaPaste>>;
|
|
110
|
+
abstract readonly onCellAreaMerge: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.CellAreaMerge>>;
|
|
111
|
+
abstract readonly onClearCellAreaMerge: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.ClearCellAreaMerge>>;
|
|
112
|
+
abstract readonly onHeaderCellAreaSelection: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.HeaderCellAreaSelection>>;
|
|
113
|
+
abstract readonly onCellAreaSelectionStart: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.CellAreaSelectionStart>>;
|
|
114
|
+
abstract readonly onCellAreaSelectionDrag: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.CellAreaSelectionDrag>>;
|
|
115
|
+
abstract readonly onCellAreaSelectionEnd: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.CellAreaSelectionEnd>>;
|
|
116
|
+
abstract readonly onCellAreaExtensionStart: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.CellAreaExtensionStart>>;
|
|
117
|
+
abstract readonly onCellAreaExtensionDrag: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.CellAreaExtensionDrag>>;
|
|
118
|
+
abstract readonly onCellAreaExtensionEnd: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.CellAreaExtensionEnd>>;
|
|
119
|
+
abstract readonly onCellAreaArrowsStart: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.CellAreaArrowsStart>>;
|
|
120
|
+
abstract readonly onCellAreaArrowsEnd: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.CellAreaArrowsEnd>>;
|
|
121
|
+
abstract readonly onActiveCellChangeStart: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.ActiveCellChangeStart>>;
|
|
122
|
+
abstract readonly onActiveCellChangeEnd: AsyncParallelHook<WithIhoEventContext<VxeTableEvents.ActiveCellChangeEnd>>;
|
|
123
|
+
}
|
|
124
|
+
declare type DataHookContext = {
|
|
125
|
+
remove(): void;
|
|
126
|
+
insertBefore(data: ArrayAble<AnyObject>): void;
|
|
127
|
+
insertAfter(data: ArrayAble<AnyObject>): void;
|
|
128
|
+
};
|
|
129
|
+
export declare type WithTableDataContext<T> = T extends any[] ? [...T, DataHookContext, IhoTableConfig] : [T, DataHookContext, IhoTableConfig];
|
|
130
|
+
export declare abstract class AbstractDataHooks {
|
|
131
|
+
abstract readonly data: SyncHook<WithTableDataContext<[AnyObject]>>;
|
|
95
132
|
}
|
|
96
133
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { AbstractConfigHooks, AbstractEventHooks, AbstractFieldHooks } from './pluginType2.js';
|
|
1
|
+
export { AbstractConfigHooks, AbstractDataHooks, AbstractEventHooks, AbstractFieldHooks } from './pluginType2.js';
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
import { EventListenerToEventName } from '../../../../../es/components/iho-table';
|
|
1
2
|
export declare function IhoTableLog(message: string): void;
|
|
2
3
|
export declare function IhoTableWarn(message: string): void;
|
|
4
|
+
export declare function getRowHeight(): number;
|
|
5
|
+
export declare function getEventName<T extends string>(eventListenerName: T): EventListenerToEventName<T>;
|