cnhis-design-vue 3.1.30-beta.6 → 3.1.30
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/es/components/big-table/index.d.ts +0 -1
- package/es/components/big-table/index.js +0 -1
- package/es/components/button-print/index.d.ts +1268 -0
- package/es/components/button-print/index.js +1 -0
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +1269 -3
- package/es/components/button-print/src/ButtonPrint.vue_vue_type_script_setup_true_lang.js +86 -44
- package/es/components/button-print/src/components/IdentityVerification.js +42 -11
- package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +1253 -0
- package/es/components/button-print/src/components/edit.js +142 -0
- package/es/components/button-print/src/components/edit.vue.d.ts +1237 -0
- package/es/components/button-print/src/utils/browserPrint.d.ts +1 -0
- package/es/components/button-print/src/utils/browserPrint.js +40 -0
- package/es/components/button-print/src/utils/index.d.ts +1 -0
- package/es/components/button-print/src/utils/index.js +1 -0
- package/es/components/button-print/style/index.css +1 -1
- package/es/components/iho-table/index.d.ts +7 -3
- package/es/components/iho-table/index.js +2 -0
- package/es/components/iho-table/src/IhoTable.js +8 -4
- package/es/components/iho-table/src/IhoTable.vue.d.ts +6 -2
- package/es/components/iho-table/src/components/IhoTableColumn.js +12 -9
- package/es/components/iho-table/src/constants/index.d.ts +1 -1
- package/es/components/iho-table/src/constants/index.js +1 -0
- package/es/components/{big-table → iho-table}/src/hooks/export.d.ts +1 -0
- package/es/components/iho-table/src/hooks/export.js +2 -0
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +3 -1
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +1 -1
- package/es/components/{big-table → iho-table}/src/hooks/useColumnConfigAdaptor.d.ts +0 -0
- package/es/components/{big-table → iho-table}/src/hooks/useColumnConfigAdaptor.js +0 -0
- package/es/components/iho-table/src/hooks/useTableContext.d.ts +1 -1
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/filterPlugin/filter.d.ts +23 -0
- package/es/components/iho-table/src/plugins/filterPlugin/filter.js +99 -0
- package/es/components/iho-table/src/plugins/filterPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/filterPlugin/index.js +80 -0
- package/es/components/iho-table/src/plugins/filterPlugin/types.d.ts +14 -0
- package/es/components/iho-table/src/plugins/filterPlugin/types.js +8 -0
- package/es/components/iho-table/src/plugins/index.js +14 -12
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +4 -4
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +14 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +12 -7
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +5 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +14 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +24 -10
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js +12 -7
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +8 -2
- package/es/components/iho-table/src/types/index.d.ts +32 -10
- package/es/components/iho-table/src/utils/index.d.ts +4 -1
- package/es/components/iho-table/src/utils/index.js +7 -1
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +1 -2
- package/es/components/index.js +3 -2
- package/es/components/keyboard/src/Keyboard.js +1 -1
- package/es/shared/types/index.d.ts +2 -2
- package/package.json +2 -2
- package/es/components/big-table/src/hooks/export.js +0 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as index from './anchorPlugin/index.js';
|
|
2
2
|
import * as index$1 from './defaultConfigPlugin/index.js';
|
|
3
|
-
import * as index$2 from './
|
|
4
|
-
import * as index$3 from './
|
|
3
|
+
import * as index$2 from './filterPlugin/index.js';
|
|
4
|
+
import * as index$3 from './lowCodeFieldAdaptorPlugin/index.js';
|
|
5
|
+
import * as index$4 from './rendererPlugins/editableWidgets/dateRendererPlugin/index.js';
|
|
5
6
|
import * as inputRendererPlugin from './rendererPlugins/editableWidgets/inputRendererPlugin.js';
|
|
6
7
|
import * as numberRendererPlugin from './rendererPlugins/editableWidgets/numberRendererPlugin.js';
|
|
7
|
-
import * as index$
|
|
8
|
-
import * as index$
|
|
8
|
+
import * as index$5 from './rendererPlugins/editableWidgets/selectRendererPlugin/index.js';
|
|
9
|
+
import * as index$6 from './rendererPlugins/editableWidgets/separateRendererPlugin/index.js';
|
|
9
10
|
import * as timeRendererPlugin from './rendererPlugins/editableWidgets/timeRendererPlugin.js';
|
|
10
11
|
import * as checkRendererPlugin from './rendererPlugins/widgets/checkRendererPlugin.js';
|
|
11
12
|
import * as colorRendererPlugin from './rendererPlugins/widgets/colorRendererPlugin.js';
|
|
@@ -13,19 +14,20 @@ import * as defaultRendererPlugin from './rendererPlugins/widgets/defaultRendere
|
|
|
13
14
|
import * as labelRendererPlugin from './rendererPlugins/widgets/labelRendererPlugin.js';
|
|
14
15
|
import * as pictureRendererPlugin from './rendererPlugins/widgets/pictureRendererPlugin.js';
|
|
15
16
|
import * as seqRendererPlugin from './rendererPlugins/widgets/seqRendererPlugin.js';
|
|
16
|
-
import * as index$
|
|
17
|
-
import * as index$
|
|
17
|
+
import * as index$7 from './rowGroupSettingPlugin/index.js';
|
|
18
|
+
import * as index$8 from './virtualTreePlugin/index.js';
|
|
18
19
|
import { separateMetaModule } from '../../../../shared/utils/index.js';
|
|
19
20
|
|
|
20
21
|
const modules = Object.assign({
|
|
21
22
|
"./anchorPlugin/index.tsx": index,
|
|
22
23
|
"./defaultConfigPlugin/index.ts": index$1,
|
|
23
|
-
"./
|
|
24
|
-
"./
|
|
24
|
+
"./filterPlugin/index.ts": index$2,
|
|
25
|
+
"./lowCodeFieldAdaptorPlugin/index.ts": index$3,
|
|
26
|
+
"./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx": index$4,
|
|
25
27
|
"./rendererPlugins/editableWidgets/inputRendererPlugin.tsx": inputRendererPlugin,
|
|
26
28
|
"./rendererPlugins/editableWidgets/numberRendererPlugin.tsx": numberRendererPlugin,
|
|
27
|
-
"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx": index$
|
|
28
|
-
"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx": index$
|
|
29
|
+
"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx": index$5,
|
|
30
|
+
"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx": index$6,
|
|
29
31
|
"./rendererPlugins/editableWidgets/timeRendererPlugin.tsx": timeRendererPlugin,
|
|
30
32
|
"./rendererPlugins/widgets/checkRendererPlugin.tsx": checkRendererPlugin,
|
|
31
33
|
"./rendererPlugins/widgets/colorRendererPlugin.tsx": colorRendererPlugin,
|
|
@@ -33,8 +35,8 @@ const modules = Object.assign({
|
|
|
33
35
|
"./rendererPlugins/widgets/labelRendererPlugin.tsx": labelRendererPlugin,
|
|
34
36
|
"./rendererPlugins/widgets/pictureRendererPlugin.tsx": pictureRendererPlugin,
|
|
35
37
|
"./rendererPlugins/widgets/seqRendererPlugin.tsx": seqRendererPlugin,
|
|
36
|
-
"./rowGroupSettingPlugin/index.ts": index$
|
|
37
|
-
"./virtualTreePlugin/index.ts": index$
|
|
38
|
+
"./rowGroupSettingPlugin/index.ts": index$7,
|
|
39
|
+
"./virtualTreePlugin/index.ts": index$8
|
|
38
40
|
});
|
|
39
41
|
var PluginPresets = separateMetaModule(modules);
|
|
40
42
|
|
|
@@ -2,6 +2,7 @@ import { pick, cloneDeep } from 'lodash-es';
|
|
|
2
2
|
import { toRaw } from 'vue';
|
|
3
3
|
import { HIGHEST_PRIORITY, IHO_TABLE_NUMBER_STATUS, WIDGET_TYPE, IHO_TABLE_STRING_STATUS } from '../../constants/index.js';
|
|
4
4
|
import { defineTablePlugin } from '../../hooks/useTablePlugin.js';
|
|
5
|
+
import { IhoTableUtils } from '../../utils/index.js';
|
|
5
6
|
|
|
6
7
|
function lowCodeFieldAdaptorPlugin() {
|
|
7
8
|
const pluginName = "lowCodeFieldAdaptorPlugin";
|
|
@@ -25,15 +26,14 @@ function lowCodeFieldAdaptorPlugin() {
|
|
|
25
26
|
});
|
|
26
27
|
}
|
|
27
28
|
function settingObjAdaptor(fieldItem, lowCodeField) {
|
|
28
|
-
|
|
29
|
-
return;
|
|
29
|
+
var _a;
|
|
30
30
|
fieldItem.editRender = {
|
|
31
31
|
autofocus: "input",
|
|
32
|
-
name: lowCodeField
|
|
32
|
+
name: IhoTableUtils.getCellType(lowCodeField),
|
|
33
33
|
props: cloneDeep(toRaw(lowCodeField))
|
|
34
34
|
};
|
|
35
35
|
fieldItem.editRender.enabled = !Reflect.get(WIDGET_TYPE, fieldItem.editRender.name);
|
|
36
|
-
fieldItem.visible = lowCodeField.settingObj.isHide !== IHO_TABLE_STRING_STATUS.POSITIVE;
|
|
36
|
+
fieldItem.visible = ((_a = lowCodeField.settingObj) == null ? void 0 : _a.isHide) !== IHO_TABLE_STRING_STATUS.POSITIVE;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
export { lowCodeFieldAdaptorPlugin };
|
|
@@ -42,7 +42,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
42
42
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
43
43
|
}>>;
|
|
44
44
|
emit: (event: "update:value", ...args: any[]) => void;
|
|
45
|
-
globEmit: <T extends "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd">(event: T, ...args: import("../../../../../../../../es/components/iho-table").IhoTableEmitPayload<T>) => void;
|
|
45
|
+
globEmit: <T extends "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd">(event: T, ...args: import("../../../../../../../../es/components/iho-table").IhoTableEmitPayload<T>) => void;
|
|
46
46
|
formRef: import("vue").Ref<HTMLElement | null>;
|
|
47
47
|
isShow: import("vue").Ref<boolean>;
|
|
48
48
|
formattedValue: import("vue").Ref<string | undefined>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createVNode, mergeProps } from 'vue';
|
|
1
|
+
import { createVNode, inject, mergeProps } from 'vue';
|
|
2
2
|
import '../../../../../index.js';
|
|
3
|
-
import { EDITABLE_WIDGET_TYPE } from '../../../../constants/index.js';
|
|
3
|
+
import { EDITABLE_WIDGET_TYPE, InjectionIhoTableEmits } from '../../../../constants/index.js';
|
|
4
4
|
import EditDate from './editDate.js';
|
|
5
5
|
import { defineTablePlugin } from '../../../../hooks/useTablePlugin.js';
|
|
6
6
|
|
|
@@ -25,13 +25,24 @@ function dateRendererPlugin() {
|
|
|
25
25
|
column,
|
|
26
26
|
$rowIndex
|
|
27
27
|
}) {
|
|
28
|
+
const globEmit = inject(InjectionIhoTableEmits);
|
|
29
|
+
const common = {
|
|
30
|
+
value: row[column.field],
|
|
31
|
+
row,
|
|
32
|
+
column,
|
|
33
|
+
index: $rowIndex
|
|
34
|
+
};
|
|
35
|
+
function onClick() {
|
|
36
|
+
globEmit("formClick", common);
|
|
37
|
+
}
|
|
28
38
|
return [createVNode(EditDate, mergeProps({
|
|
29
39
|
"value": row[column.field],
|
|
30
40
|
"onUpdate:value": ($event) => row[column.field] = $event
|
|
31
41
|
}, (props == null ? void 0 : props.componentProps) || {}, {
|
|
32
42
|
"column": column,
|
|
33
43
|
"row": row,
|
|
34
|
-
"index": $rowIndex
|
|
44
|
+
"index": $rowIndex,
|
|
45
|
+
"onClick": onClick
|
|
35
46
|
}), null)];
|
|
36
47
|
}
|
|
37
48
|
});
|
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js
CHANGED
|
@@ -24,18 +24,23 @@ function inputRendererPlugin() {
|
|
|
24
24
|
$rowIndex
|
|
25
25
|
}) {
|
|
26
26
|
const emit = inject(InjectionIhoTableEmits);
|
|
27
|
+
const common = {
|
|
28
|
+
value: row[column.field],
|
|
29
|
+
row,
|
|
30
|
+
column,
|
|
31
|
+
index: $rowIndex
|
|
32
|
+
};
|
|
27
33
|
function onBlur() {
|
|
28
|
-
emit("formChange",
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
index: $rowIndex
|
|
33
|
-
});
|
|
34
|
+
emit("formChange", common);
|
|
35
|
+
}
|
|
36
|
+
function onClick() {
|
|
37
|
+
emit("formClick", common);
|
|
34
38
|
}
|
|
35
39
|
return [createVNode(NInput, mergeProps({
|
|
36
40
|
"value": row[column.field],
|
|
37
41
|
"onUpdate:value": ($event) => row[column.field] = $event,
|
|
38
|
-
"onBlur": onBlur
|
|
42
|
+
"onBlur": onBlur,
|
|
43
|
+
"onClick": onClick
|
|
39
44
|
}, props == null ? void 0 : props.componentProps), null)];
|
|
40
45
|
}
|
|
41
46
|
});
|
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js
CHANGED
|
@@ -32,7 +32,8 @@ function numberRendererPlugin() {
|
|
|
32
32
|
clearable: true,
|
|
33
33
|
placeholder,
|
|
34
34
|
onBlur,
|
|
35
|
-
onUpdateValue
|
|
35
|
+
onUpdateValue,
|
|
36
|
+
onClick
|
|
36
37
|
};
|
|
37
38
|
const common = {
|
|
38
39
|
value: row[column.field],
|
|
@@ -49,6 +50,9 @@ function numberRendererPlugin() {
|
|
|
49
50
|
function onUpdateValue() {
|
|
50
51
|
emit("formChange", common);
|
|
51
52
|
}
|
|
53
|
+
function onClick() {
|
|
54
|
+
emit("formClick", common);
|
|
55
|
+
}
|
|
52
56
|
return [createVNode(NInputNumber, mergeProps({
|
|
53
57
|
"value": row[column.field],
|
|
54
58
|
"onUpdate:value": ($event) => row[column.field] = $event
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createVNode, mergeProps } from 'vue';
|
|
1
|
+
import { createVNode, inject, mergeProps } from 'vue';
|
|
2
2
|
import '../../../../../index.js';
|
|
3
|
-
import { EDITABLE_WIDGET_TYPE } from '../../../../constants/index.js';
|
|
3
|
+
import { EDITABLE_WIDGET_TYPE, InjectionIhoTableEmits } from '../../../../constants/index.js';
|
|
4
4
|
import EditSelect from './editSelect.js';
|
|
5
5
|
import { getDefaultValue } from './selectUtils.js';
|
|
6
6
|
import { defineTablePlugin } from '../../../../hooks/useTablePlugin.js';
|
|
@@ -26,12 +26,23 @@ function selectRendererPlugin() {
|
|
|
26
26
|
column,
|
|
27
27
|
$rowIndex
|
|
28
28
|
}) {
|
|
29
|
+
const emit = inject(InjectionIhoTableEmits);
|
|
30
|
+
function onClick() {
|
|
31
|
+
const common = {
|
|
32
|
+
value: row[column.field],
|
|
33
|
+
row,
|
|
34
|
+
column,
|
|
35
|
+
index: $rowIndex
|
|
36
|
+
};
|
|
37
|
+
emit("formClick", common);
|
|
38
|
+
}
|
|
29
39
|
return [createVNode(EditSelect, mergeProps((props == null ? void 0 : props.componentProps) || {}, {
|
|
30
40
|
"column": column,
|
|
31
41
|
"row": row,
|
|
32
42
|
"index": $rowIndex,
|
|
33
43
|
"value": row[column.field],
|
|
34
|
-
"onUpdate:value": ($event) => row[column.field] = $event
|
|
44
|
+
"onUpdate:value": ($event) => row[column.field] = $event,
|
|
45
|
+
"onClick": onClick
|
|
35
46
|
}), null)];
|
|
36
47
|
}
|
|
37
48
|
});
|
|
@@ -49,7 +49,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
49
49
|
}>> & {
|
|
50
50
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
51
51
|
}>>;
|
|
52
|
-
globEmit: <T extends "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd">(event: T, ...args: import("../../../../../../../../es/components/iho-table").IhoTableEmitPayload<T>) => void;
|
|
52
|
+
globEmit: <T extends "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd">(event: T, ...args: import("../../../../../../../../es/components/iho-table").IhoTableEmitPayload<T>) => void;
|
|
53
53
|
tableHandler: import("../../../../../../../../es/components/iho-table").IhoTableHandler;
|
|
54
54
|
popoverRef: import("vue").Ref<any>;
|
|
55
55
|
editContent: import("vue").Ref<any>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { reactive, inject, createVNode, toRaw, onBeforeUnmount } from 'vue';
|
|
1
|
+
import { reactive, inject, createVNode, toRaw, h, onBeforeUnmount } from 'vue';
|
|
2
2
|
import { traverse } from '../../../../../../../shared/utils/index.js';
|
|
3
|
-
import { isFunction } from 'lodash-es';
|
|
3
|
+
import { isFunction, isObject } from 'lodash-es';
|
|
4
4
|
import '../../../../../index.js';
|
|
5
|
-
import { EDITABLE_WIDGET_TYPE, InjectionIhoTableUUID } from '../../../../constants/index.js';
|
|
5
|
+
import { EDITABLE_WIDGET_TYPE, InjectionIhoTableUUID, InjectionIhoTableEmits } from '../../../../constants/index.js';
|
|
6
6
|
import { getRowHeight } from '../../../../utils/index.js';
|
|
7
7
|
import { isSeparateColumn, getColumnRenderWidth, contentSeparate, getColumnInfoMaxLength, generateSeparateRowData } from './separateUtils.js';
|
|
8
8
|
import EditSeparate from './editSeparate.js';
|
|
@@ -29,22 +29,35 @@ function separateRendererPlugins() {
|
|
|
29
29
|
column,
|
|
30
30
|
row
|
|
31
31
|
}) {
|
|
32
|
-
var _a;
|
|
33
32
|
const uuid = inject(InjectionIhoTableUUID);
|
|
34
|
-
const separateRow = getSeparateRowData(uuid, row)
|
|
35
|
-
|
|
33
|
+
const separateRow = getSeparateRowData(uuid, row) || {
|
|
34
|
+
separateData: {}
|
|
35
|
+
};
|
|
36
|
+
return createVNode("section", null, [separateRow.separateData[column.field]]);
|
|
36
37
|
},
|
|
37
38
|
renderEdit(renderOpts, {
|
|
38
39
|
column,
|
|
39
|
-
row
|
|
40
|
+
row,
|
|
41
|
+
$rowIndex
|
|
40
42
|
}) {
|
|
41
43
|
var _a, _b;
|
|
42
44
|
const uuid = inject(InjectionIhoTableUUID);
|
|
45
|
+
const emit = inject(InjectionIhoTableEmits);
|
|
43
46
|
const separateRow = getSeparateRowData(uuid, row);
|
|
44
47
|
const height = getRowHeight();
|
|
45
48
|
const slots = {};
|
|
46
|
-
if (
|
|
47
|
-
|
|
49
|
+
if ((_a = renderOpts.props) == null ? void 0 : _a.separateSlot) {
|
|
50
|
+
const separate = toRaw(renderOpts.props.separateSlot);
|
|
51
|
+
slots.menu = isFunction(separate) ? separate : isObject(separate) ? (props) => h(separate, props) : void 0;
|
|
52
|
+
}
|
|
53
|
+
const common = {
|
|
54
|
+
value: row[column.field],
|
|
55
|
+
row,
|
|
56
|
+
column,
|
|
57
|
+
index: $rowIndex
|
|
58
|
+
};
|
|
59
|
+
function onClick() {
|
|
60
|
+
emit("formClick", common);
|
|
48
61
|
}
|
|
49
62
|
return [createVNode(EditSeparate, {
|
|
50
63
|
"value": row[column.field],
|
|
@@ -53,7 +66,8 @@ function separateRendererPlugins() {
|
|
|
53
66
|
"height": height,
|
|
54
67
|
"column": column,
|
|
55
68
|
"row": row,
|
|
56
|
-
"displayContent": (_b = separateRow == null ? void 0 : separateRow.separateData) == null ? void 0 : _b[column.field]
|
|
69
|
+
"displayContent": (_b = separateRow == null ? void 0 : separateRow.separateData) == null ? void 0 : _b[column.field],
|
|
70
|
+
"onClick": onClick
|
|
57
71
|
}, slots)];
|
|
58
72
|
}
|
|
59
73
|
});
|
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js
CHANGED
|
@@ -33,15 +33,20 @@ function timeRendererPlugin() {
|
|
|
33
33
|
placeholder,
|
|
34
34
|
valueFormat,
|
|
35
35
|
format: valueFormat || "yyyy-MM-dd HH:mm:ss",
|
|
36
|
-
onUpdateFormattedValue: onUpdateValue
|
|
36
|
+
onUpdateFormattedValue: onUpdateValue,
|
|
37
|
+
onClick
|
|
38
|
+
};
|
|
39
|
+
const common = {
|
|
40
|
+
value: row[column.field],
|
|
41
|
+
row,
|
|
42
|
+
column,
|
|
43
|
+
index: $rowIndex
|
|
37
44
|
};
|
|
38
45
|
function onUpdateValue() {
|
|
39
|
-
emit("formChange",
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
index: $rowIndex
|
|
44
|
-
});
|
|
46
|
+
emit("formChange", common);
|
|
47
|
+
}
|
|
48
|
+
function onClick() {
|
|
49
|
+
emit("formClick", common);
|
|
45
50
|
}
|
|
46
51
|
return [createVNode(NTimePicker, mergeProps({
|
|
47
52
|
"formattedValue": row[column.field],
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { inject, createVNode } from 'vue';
|
|
2
2
|
import { SettingsSharp } from '@vicons/ionicons5';
|
|
3
|
+
import { isFunction } from 'lodash-es';
|
|
3
4
|
import { NIcon } from 'naive-ui';
|
|
4
5
|
import '../../../../index.js';
|
|
5
6
|
import { InjectionIhoTableEmits } from '../../../constants/index.js';
|
|
@@ -14,8 +15,9 @@ function seqRendererPlugin() {
|
|
|
14
15
|
index,
|
|
15
16
|
insertBefore
|
|
16
17
|
}, config) => {
|
|
18
|
+
var _a;
|
|
17
19
|
if (index === 0 && config.showSeq) {
|
|
18
|
-
|
|
20
|
+
const columnConfig = {
|
|
19
21
|
align: "center",
|
|
20
22
|
fixed: "left",
|
|
21
23
|
width: 50,
|
|
@@ -39,7 +41,11 @@ function seqRendererPlugin() {
|
|
|
39
41
|
}, null)];
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
|
-
}
|
|
44
|
+
};
|
|
45
|
+
if (isFunction((_a = config.columnConfig) == null ? void 0 : _a.seqSlotFn)) {
|
|
46
|
+
columnConfig.slots.default = config.columnConfig.seqSlotFn;
|
|
47
|
+
}
|
|
48
|
+
insertBefore(columnConfig);
|
|
43
49
|
}
|
|
44
50
|
return field;
|
|
45
51
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AnyObject, TupleToUnion } from '../../../../../es/shared/types';
|
|
2
|
-
import { VxeTableProps, VxeTableDefines } from 'vxe-table';
|
|
2
|
+
import { VxeTableProps, VxeTableDefines, VxeTableInstance, VxeColumnPropTypes } from 'vxe-table';
|
|
3
3
|
import { VxeTableEventProps } from 'vxe-table/types/table';
|
|
4
|
-
import { IhoTableEventNameTuple, IhoTableRowGroupSequence, VxeEventListenerNameList } from '../../../../../es/components/iho-table/src/constants';
|
|
4
|
+
import { IHO_TABLE_STRING_STATUS, IhoTableEventNameTuple, IhoTableRowGroupSequence, VxeEventListenerNameList } from '../../../../../es/components/iho-table/src/constants';
|
|
5
5
|
export * from './pluginType';
|
|
6
6
|
export interface IhoTableRowGroupItem {
|
|
7
7
|
groupName: string;
|
|
@@ -16,6 +16,9 @@ export declare type IhoTableConfig = VxeTableProps & Partial<{
|
|
|
16
16
|
selectType: Exclude<VxeTableDefines.ColumnInfo['type'], 'seq' | 'expand' | 'html'>;
|
|
17
17
|
rowGroupSetting: Partial<Record<TupleToUnion<typeof IhoTableRowGroupSequence>, IhoTableRowGroupItem[]>>;
|
|
18
18
|
anchorList: string[];
|
|
19
|
+
columnConfig: {
|
|
20
|
+
seqSlotFn: VxeColumnPropTypes.Slots['default'];
|
|
21
|
+
};
|
|
19
22
|
[K: string]: unknown;
|
|
20
23
|
}>;
|
|
21
24
|
export declare type IhoTableFieldItem = {
|
|
@@ -25,11 +28,24 @@ export declare type IhoTableFieldItem = {
|
|
|
25
28
|
}> & {
|
|
26
29
|
[K: string]: unknown;
|
|
27
30
|
};
|
|
28
|
-
declare
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
export declare namespace IhoTableLowCodeField {
|
|
32
|
+
type FieldSetting = {
|
|
33
|
+
notParticipatingSearch: IHO_TABLE_STRING_STATUS;
|
|
34
|
+
mapping?: {
|
|
35
|
+
type: string;
|
|
36
|
+
mappingField: Array<{
|
|
37
|
+
value: Array<{
|
|
38
|
+
options: AnyObject[];
|
|
39
|
+
}>;
|
|
40
|
+
}>;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
type SettingObj = Partial<{
|
|
44
|
+
attr: string;
|
|
45
|
+
isHide: '0' | '1';
|
|
46
|
+
[K: string]: unknown;
|
|
47
|
+
}>;
|
|
48
|
+
}
|
|
33
49
|
export declare type LowCodeTableFieldItem = {
|
|
34
50
|
columnName: string;
|
|
35
51
|
[K: string]: unknown;
|
|
@@ -37,13 +53,16 @@ export declare type LowCodeTableFieldItem = {
|
|
|
37
53
|
id: number | string;
|
|
38
54
|
title: string;
|
|
39
55
|
colWidth: VxeTableDefines.ColumnInfo['width'];
|
|
40
|
-
settingObj:
|
|
56
|
+
settingObj: IhoTableLowCodeField.SettingObj;
|
|
41
57
|
treeNode: boolean;
|
|
42
58
|
isShow: 0 | 1;
|
|
59
|
+
formType: string;
|
|
60
|
+
fieldSetting: string;
|
|
43
61
|
componentProps: AnyObject;
|
|
44
62
|
showOverflow: VxeTableDefines.ColumnInfo['showOverflow'];
|
|
63
|
+
options: AnyObject[];
|
|
45
64
|
}> & Partial<Pick<VxeTableDefines.ColumnInfo, 'resizable'>>;
|
|
46
|
-
export declare type
|
|
65
|
+
export declare type IhoTableFormChangePayload = {
|
|
47
66
|
column: IhoTableFieldItem;
|
|
48
67
|
row: AnyObject;
|
|
49
68
|
value: unknown;
|
|
@@ -54,9 +73,12 @@ export declare type EventListenerToEventName<T extends string> = T extends `on${
|
|
|
54
73
|
export declare type EventNameToEventListener<T extends string> = T extends `${infer L}${infer R}` ? `on${Uppercase<L>}${R}` : never;
|
|
55
74
|
export declare type IhoTableHandler = Record<'updateConfigRef' | 'updateFieldListRef' | 'updateTableDataRef', () => void>;
|
|
56
75
|
export declare type IhoTableEventNameUnion = TupleToUnion<typeof IhoTableEventNameTuple>;
|
|
57
|
-
export declare type IhoTableEmitPayload<T extends typeof IhoTableEventNameTuple[number]> = T extends 'formChange' ? [
|
|
76
|
+
export declare type IhoTableEmitPayload<T extends typeof IhoTableEventNameTuple[number]> = T extends 'formChange' | 'formClick' ? [IhoTableFormChangePayload] : T extends 'settingClick' ? [] : Parameters<NonNullable<VxeTableEventProps[EventNameToEventListener<Exclude<T, 'formChange' | 'settingClick' | 'formClick'>>]>>;
|
|
58
77
|
export declare type IhoTableAnchorItem = {
|
|
59
78
|
field: string;
|
|
60
79
|
title: string;
|
|
61
80
|
left: number;
|
|
62
81
|
};
|
|
82
|
+
export declare type IhoTableExpose = {
|
|
83
|
+
$table: VxeTableInstance;
|
|
84
|
+
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { EventListenerToEventName } from '../../../../../es/components/iho-table';
|
|
1
|
+
import { EventListenerToEventName, LowCodeTableFieldItem } from '../../../../../es/components/iho-table';
|
|
2
2
|
export declare function IhoTableLog(message: string): void;
|
|
3
3
|
export declare function IhoTableWarn(message: string): void;
|
|
4
|
+
export declare const IhoTableUtils: Readonly<{
|
|
5
|
+
getCellType(lowCodeField: LowCodeTableFieldItem): string;
|
|
6
|
+
}>;
|
|
4
7
|
export declare function getRowHeight(): number;
|
|
5
8
|
export declare function getEventName<T extends string>(eventListenerName: T): EventListenerToEventName<T>;
|
|
@@ -7,6 +7,12 @@ function IhoTableLog(message) {
|
|
|
7
7
|
function IhoTableWarn(message) {
|
|
8
8
|
return console.warn(`[IhoTable]: ${message}`);
|
|
9
9
|
}
|
|
10
|
+
const IhoTableUtils = Object.freeze({
|
|
11
|
+
getCellType(lowCodeField) {
|
|
12
|
+
var _a;
|
|
13
|
+
return (((_a = lowCodeField.settingObj) == null ? void 0 : _a.attr) || lowCodeField.formType || "DEFAULT").toUpperCase();
|
|
14
|
+
}
|
|
15
|
+
});
|
|
10
16
|
function getRowHeight() {
|
|
11
17
|
var _a, _b, _c;
|
|
12
18
|
const config = inject(InjectionIhoTableConfig);
|
|
@@ -20,4 +26,4 @@ function getEventName(eventListenerName) {
|
|
|
20
26
|
return `${eventName[0].toLowerCase()}${eventName.slice(1)}`;
|
|
21
27
|
}
|
|
22
28
|
|
|
23
|
-
export { IhoTableLog, IhoTableWarn, getEventName, getRowHeight };
|
|
29
|
+
export { IhoTableLog, IhoTableUtils, IhoTableWarn, getEventName, getRowHeight };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.iho-table .vxe-table--render-default .vxe-table--fixed-left-wrapper.scrolling--middle{box-shadow:7px 0 8px -3px rgba(0,0,0,.15)}.iho-table .vxe-table--render-default .vxe-table--fixed-right-wrapper.scrolling--middle{box-shadow:-7px 0 8px -3px rgba(0,0,0,.15)}.iho-table__boldCell{font-weight:700}.iho-table .icon-dot{background:var(--table-icon-color);box-shadow:0 2px 4px 0 var(--table-icon-shadow)}.iho-table .icon-dot,.iho-table .icon-dot-red{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-red{background:red;box-shadow:0 2px 4px 0 rgba(255,0,0,.5)}.iho-table .icon-dot-blue{background:blue;box-shadow:0 2px 4px 0 rgba(0,0,255,.5)}.iho-table .icon-dot-blue,.iho-table .icon-dot-green{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-green{background:green;box-shadow:0 2px 4px 0 rgba(0,128,0,.5)}.iho-table .icon-dot-gray{background:gray;box-shadow:0 2px 4px 0 hsla(0,0%,50%,.5)}.iho-table .icon-dot-gray,.iho-table .icon-dot-yellow{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-yellow{background:#ff0;box-shadow:0 2px 4px 0 rgba(255,255,0,.5)}.iho-table .icon-dot-resolved{background:#36be8c;box-shadow:0 2px 4px 0 rgba(54,190,140,.5)}.iho-table .icon-dot-huifu,.iho-table .icon-dot-resolved{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-huifu{background:#42d0f6;box-shadow:0 2px 4px 0 rgba(66,208,246,.5)}.iho-table .icon-dot-close{background:#718391;box-shadow:0 2px 4px 0 rgba(113,131,145,.5)}.iho-table .icon-dot-audit,.iho-table .icon-dot-close{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-audit{background:#f4ba32;box-shadow:0 2px 4px 0 rgba(244,186,50,.5)}.iho-table .icon-dot-design{background:#927ce1;box-shadow:0 2px 4px 0 rgba(146,124,225,.5)}.iho-table .icon-dot-design,.iho-table .icon-dot-develop{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-develop{background:#4eb0ef;box-shadow:0 2px 4px 0 rgba(78,176,239,.5)}.iho-table .icon-dot-develop-complete{background:#6381f9;border-radius:50%;box-shadow:0 2px 4px 0 rgba(99,129,249,.5);display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .vxe-header--column [annotation-hover-show=true]{visibility:hidden}.iho-table .vxe-header--column:hover [annotation-hover-show=true]{visibility:visible}.iho-table__headerWrapper{display:inline-flex}
|
|
1
|
+
.iho-table .vxe-table--render-default .vxe-table--fixed-left-wrapper.scrolling--middle{box-shadow:7px 0 8px -3px rgba(0,0,0,.15)}.iho-table .vxe-table--render-default .vxe-table--fixed-right-wrapper.scrolling--middle{box-shadow:-7px 0 8px -3px rgba(0,0,0,.15)}.iho-table__boldCell{font-weight:700}.iho-table .icon-dot{background:var(--table-icon-color);box-shadow:0 2px 4px 0 var(--table-icon-shadow)}.iho-table .icon-dot,.iho-table .icon-dot-red{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-red{background:red;box-shadow:0 2px 4px 0 rgba(255,0,0,.5)}.iho-table .icon-dot-blue{background:blue;box-shadow:0 2px 4px 0 rgba(0,0,255,.5)}.iho-table .icon-dot-blue,.iho-table .icon-dot-green{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-green{background:green;box-shadow:0 2px 4px 0 rgba(0,128,0,.5)}.iho-table .icon-dot-gray{background:gray;box-shadow:0 2px 4px 0 hsla(0,0%,50%,.5)}.iho-table .icon-dot-gray,.iho-table .icon-dot-yellow{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-yellow{background:#ff0;box-shadow:0 2px 4px 0 rgba(255,255,0,.5)}.iho-table .icon-dot-resolved{background:#36be8c;box-shadow:0 2px 4px 0 rgba(54,190,140,.5)}.iho-table .icon-dot-huifu,.iho-table .icon-dot-resolved{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-huifu{background:#42d0f6;box-shadow:0 2px 4px 0 rgba(66,208,246,.5)}.iho-table .icon-dot-close{background:#718391;box-shadow:0 2px 4px 0 rgba(113,131,145,.5)}.iho-table .icon-dot-audit,.iho-table .icon-dot-close{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-audit{background:#f4ba32;box-shadow:0 2px 4px 0 rgba(244,186,50,.5)}.iho-table .icon-dot-design{background:#927ce1;box-shadow:0 2px 4px 0 rgba(146,124,225,.5)}.iho-table .icon-dot-design,.iho-table .icon-dot-develop{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-develop{background:#4eb0ef;box-shadow:0 2px 4px 0 rgba(78,176,239,.5)}.iho-table .icon-dot-develop-complete{background:#6381f9;border-radius:50%;box-shadow:0 2px 4px 0 rgba(99,129,249,.5);display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table__filterWrapper{display:flex;flex-direction:column;gap:8px;width:200px}.iho-table__filterButton{align-items:center;display:flex;height:30px}.iho-table__filterButton--active{color:blue}.iho-table .vxe-header--column [annotation-hover-show=true]{visibility:hidden}.iho-table .vxe-header--column:hover [annotation-hover-show=true]{visibility:visible}.iho-table__headerWrapper{display:inline-flex}
|