cnhis-design-vue 3.1.22 → 3.1.23-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/big-table/index.d.ts +8 -0
- package/es/components/big-table/src/BigTable.vue.d.ts +8 -0
- package/es/components/big-table/src/components/edit-form/edit-separate.js +4 -1
- package/es/components/big-table/src/hooks/useSeparateRow2.js +1 -41
- package/es/components/field-set/src/FieldSet.js +5 -1
- package/es/components/form-render/src/hooks/useFormContext2.js +2 -1
- package/es/components/form-render/src/utils/index.d.ts +0 -1
- package/es/components/form-render/src/utils/index.js +1 -10
- package/es/components/iho-table/index.d.ts +141 -277
- package/es/components/iho-table/index.js +1 -1
- package/es/components/iho-table/src/IhoTable.js +52 -31
- package/es/components/iho-table/src/IhoTable.vue.d.ts +142 -278
- package/es/components/iho-table/src/constants/index.d.ts +5 -2
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/constants/index2.js +8 -5
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +10 -3
- package/es/components/iho-table/src/hooks/tapHooks/index2.js +32 -21
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +5 -3
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks2.js +3 -3
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +177 -60
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks2.js +223 -59
- package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.d.ts +10 -0
- package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.js +1 -0
- package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks2.js +27 -0
- package/es/components/iho-table/src/plugins/index.js +2 -1
- package/es/components/iho-table/src/plugins/index2.js +2 -1
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index2.js +2 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/index.d.ts +2 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/index.js +2 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/{inputs → editableWidgets}/inputRendererPlugins.d.ts +0 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/{inputs → editableWidgets}/inputRendererPlugins.js +0 -5
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/edit-separate.js +110 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/edit-separate.vue.d.ts +107 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +158 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separate-utils.d.ts +14 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separate-utils.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separate-utils2.js +54 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/index.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/index.js +2 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +2 -1
- package/es/components/iho-table/src/types/index.d.ts +8 -3
- package/es/components/iho-table/src/types/index.js +1 -1
- package/es/components/iho-table/src/types/pluginType.d.ts +97 -83
- 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/index2.js +1 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +2 -0
- package/es/components/info-header/src/InfoHeader.js +3 -1
- package/es/components/info-header/src/InfoHeader.vue.d.ts +2 -0
- package/es/shared/utils/index.d.ts +4 -0
- package/es/shared/utils/index.js +1 -1
- package/es/shared/utils/index2.js +60 -2
- package/es/shared/utils/tapable/AsyncSeriesHook.js +17 -2
- package/package.json +2 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/inputs/index.d.ts +0 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/inputs/index.js +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { default, useIhoTablePresetPlugins } from './index2.js';
|
|
2
2
|
export { defineTablePlugin, useTablePlugin } from './src/hooks/useTablePlugin2.js';
|
|
3
|
-
export { AbstractConfigHooks, AbstractDataHooks, AbstractEventHooks, AbstractFieldHooks } from './src/types/pluginType2.js';
|
|
3
|
+
export { AbstractConfigHooks, AbstractDataHooks, AbstractEventHooks, AbstractFieldHooks, AbstractSetupHooks } from './src/types/pluginType2.js';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { defineComponent, provide, ref, computed, resolveComponent, openBlock, createElementBlock, createVNode, mergeProps, unref, withCtx, Fragment, renderList, createBlock } from 'vue';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { VxeEventListenerNameList, InjectionIhoTableEmits, InjectionIhoTableConfig } from './constants/index2.js';
|
|
5
|
-
import { createTableHooks,
|
|
1
|
+
import { defineComponent, provide, ref, computed, watch, resolveComponent, openBlock, createElementBlock, createVNode, mergeProps, unref, withCtx, Fragment, renderList, createBlock } from 'vue';
|
|
2
|
+
import { uuidGenerator } from '../../../shared/utils/index2.js';
|
|
3
|
+
import { useDebounceFn } from '@vueuse/core';
|
|
4
|
+
import { VxeEventListenerNameList, InjectionIhoTableEmits, InjectionIhoTableUUID, InjectionIhoTableConfig, InjectionIhoTableHandler } from './constants/index2.js';
|
|
5
|
+
import { createTableHooks, applyTableConfigHooks, applyTableFieldHooks, createTableEventHandlers, createDataTransfer } from './hooks/tapHooks/index2.js';
|
|
6
|
+
import 'lodash-es';
|
|
6
7
|
import { getEventName } from './utils/index2.js';
|
|
7
8
|
import ColumnComponent from './components/IhoTableColumn.js';
|
|
8
9
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.js';
|
|
@@ -11,8 +12,8 @@ const _hoisted_1 = { class: "iho-table" };
|
|
|
11
12
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
13
|
__name: "IhoTable",
|
|
13
14
|
props: {
|
|
14
|
-
tableConfig: { type: Object },
|
|
15
|
-
fieldList: { type: Array,
|
|
15
|
+
tableConfig: { type: Object, default: () => ({}) },
|
|
16
|
+
fieldList: { type: Array, default: () => [] },
|
|
16
17
|
tableData: { type: Array, default: () => [] }
|
|
17
18
|
},
|
|
18
19
|
emits: [
|
|
@@ -21,42 +22,62 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21
22
|
...VxeEventListenerNameList.map(getEventName)
|
|
22
23
|
],
|
|
23
24
|
setup(__props, { expose, emit: emits }) {
|
|
25
|
+
var _a, _b;
|
|
24
26
|
const props = __props;
|
|
25
27
|
provide(InjectionIhoTableEmits, emits);
|
|
26
|
-
const
|
|
28
|
+
const uuid = uuidGenerator();
|
|
29
|
+
const uuidRef = ref(uuid);
|
|
30
|
+
provide(InjectionIhoTableUUID, uuidRef);
|
|
31
|
+
const $table = ref();
|
|
27
32
|
const hooks = createTableHooks();
|
|
28
|
-
const configRef = ref({});
|
|
33
|
+
const configRef = ref({ uuid: (_b = (_a = props.tableConfig) == null ? void 0 : _a.uuid) != null ? _b : uuid });
|
|
29
34
|
provide(InjectionIhoTableConfig, configRef);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
+
const updateConfigRef = useDebounceFn(() => {
|
|
36
|
+
configRef.value = applyTableConfigHooks(hooks, props.tableConfig);
|
|
37
|
+
configRef.value.uuid = uuidRef.value;
|
|
38
|
+
}, 10);
|
|
35
39
|
const fieldListRef = ref([]);
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const
|
|
40
|
+
const updateFieldListRef = useDebounceFn(() => {
|
|
41
|
+
fieldListRef.value = applyTableFieldHooks(hooks, props.fieldList, configRef.value);
|
|
42
|
+
}, 10);
|
|
43
|
+
const dataTransfer = createDataTransfer(hooks, configRef, $table);
|
|
44
|
+
const tableDataRef = ref([]);
|
|
45
|
+
const updateTableDataRef = useDebounceFn(async () => {
|
|
46
|
+
var _a2;
|
|
47
|
+
tableDataRef.value = await dataTransfer(props.tableData);
|
|
48
|
+
(_a2 = $table.value) == null ? void 0 : _a2.recalculate(true);
|
|
49
|
+
}, 10);
|
|
50
|
+
const tableHandler = { updateTableDataRef, updateConfigRef, updateFieldListRef };
|
|
51
|
+
provide(InjectionIhoTableHandler, tableHandler);
|
|
52
|
+
const eventHookHandler = createTableEventHandlers({
|
|
53
|
+
hooks,
|
|
54
|
+
config: configRef,
|
|
55
|
+
$table,
|
|
56
|
+
context: tableHandler,
|
|
57
|
+
emits
|
|
58
|
+
});
|
|
42
59
|
const bindProperties = computed(() => ({ ...configRef.value, ...eventHookHandler }));
|
|
43
|
-
|
|
44
|
-
updateConfigRef(
|
|
45
|
-
updateFieldListRef(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
60
|
+
watch(() => props.tableConfig, () => {
|
|
61
|
+
updateConfigRef();
|
|
62
|
+
updateFieldListRef();
|
|
63
|
+
updateTableDataRef();
|
|
64
|
+
}, { immediate: true, deep: true });
|
|
65
|
+
watch(() => props.fieldList, () => {
|
|
66
|
+
updateFieldListRef();
|
|
67
|
+
updateTableDataRef();
|
|
68
|
+
}, { immediate: true, deep: true });
|
|
69
|
+
watch(() => props.tableData, updateTableDataRef, { immediate: true });
|
|
70
|
+
expose({ $table });
|
|
71
|
+
hooks.setupHooks.setup.call(configRef, fieldListRef);
|
|
51
72
|
return (_ctx, _cache) => {
|
|
52
73
|
const _component_vxe_table = resolveComponent("vxe-table");
|
|
53
74
|
return openBlock(), createElementBlock("section", _hoisted_1, [
|
|
54
75
|
createVNode(_component_vxe_table, mergeProps({
|
|
55
|
-
ref_key: "
|
|
56
|
-
ref:
|
|
76
|
+
ref_key: "$table",
|
|
77
|
+
ref: $table
|
|
57
78
|
}, unref(bindProperties), {
|
|
58
79
|
eventHookHandler: "",
|
|
59
|
-
data:
|
|
80
|
+
data: tableDataRef.value
|
|
60
81
|
}), {
|
|
61
82
|
default: withCtx(() => [
|
|
62
83
|
(openBlock(true), createElementBlock(Fragment, null, renderList(fieldListRef.value, (field) => {
|