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
@@ -1,3 +1,3 @@
1
- export { default } from './index2.js';
1
+ export { default, useIhoTablePresetPlugins } from './index2.js';
2
2
  export { defineTablePlugin, useTablePlugin } from './src/hooks/useTablePlugin2.js';
3
3
  export { AbstractConfigHooks, AbstractEventHooks, AbstractFieldHooks } from './src/types/pluginType2.js';
@@ -1,6 +1,10 @@
1
1
  import { COMPONENT_NAMESPACE } from '../../shared/global/variable2.js';
2
2
  import { safeComponentRegister } from '../../shared/utils/index2.js';
3
+ import script from './src/IhoTable.js';
4
+ import * as index from './src/plugins/index2.js';
5
+ import 'vue';
3
6
  import 'lodash-es';
7
+ import './src/constants/index2.js';
4
8
  import '../../shared/utils/tapable/SyncHook.js';
5
9
  import '../../shared/utils/tapable/SyncBailHook.js';
6
10
  import '../../shared/utils/tapable/SyncWaterfallHook.js';
@@ -13,13 +17,14 @@ import '../../shared/utils/tapable/AsyncSeriesLoopHook.js';
13
17
  import '../../shared/utils/tapable/AsyncSeriesWaterfallHook.js';
14
18
  import { useTablePlugin } from './src/hooks/useTablePlugin2.js';
15
19
  export { defineTablePlugin, useTablePlugin } from './src/hooks/useTablePlugin2.js';
16
- import script from './src/IhoTable.js';
17
- import * as index from './src/plugins/index2.js';
18
20
 
19
- useTablePlugin().use(Object.values(index).map((plugin) => plugin()));
21
+ const { use } = useTablePlugin();
22
+ const useIhoTablePresetPlugins = (instance) => {
23
+ use(Object.values(index).map((plugin) => plugin()), instance);
24
+ };
20
25
  const IhoTable = script;
21
26
  IhoTable.install = function(app) {
22
27
  safeComponentRegister(app, IhoTable, COMPONENT_NAMESPACE + "IhoTable");
23
28
  };
24
29
 
25
- export { IhoTable as default };
30
+ export { IhoTable as default, useIhoTablePresetPlugins };
@@ -1,10 +1,10 @@
1
- import { defineComponent, provide, ref, openBlock, createElementBlock, createVNode, unref, mergeProps, withCtx, Fragment, renderList, createBlock } from 'vue';
1
+ import { defineComponent, provide, ref, computed, resolveComponent, openBlock, createElementBlock, createVNode, mergeProps, unref, withCtx, Fragment, renderList, createBlock } from 'vue';
2
2
  import { watchDebounced } from '@vueuse/shared';
3
- import { Table } from 'vxe-table';
4
- import { InjectionIhoTableEmits, InjectionIhoTableConfig } from './constants/index2.js';
5
- import { createTableHooks, applyTableConfigHooks, applyTableFieldHooks } from './hooks/tapHooks/index2.js';
6
- import 'lodash-es';
7
- import IhoTableColumn from './components/IhoTableColumn.js';
3
+ import { isArray } from 'lodash-es';
4
+ import { VxeEventListenerNameList, InjectionIhoTableEmits, InjectionIhoTableConfig } from './constants/index2.js';
5
+ import { createTableHooks, createTableEventHandlers, applyTableConfigHooks, applyTableFieldHooks } from './hooks/tapHooks/index2.js';
6
+ import { getEventName } from './utils/index2.js';
7
+ import ColumnComponent from './components/IhoTableColumn.js';
8
8
  import _export_sfc from '../../../_virtual/plugin-vue_export-helper.js';
9
9
 
10
10
  const _hoisted_1 = { class: "iho-table" };
@@ -15,26 +15,52 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
15
15
  fieldList: { type: Array, required: true },
16
16
  tableData: { type: Array, default: () => [] }
17
17
  },
18
- emits: ["settingClick"],
19
- setup(__props, { emit: emits }) {
18
+ emits: [
19
+ "formChange",
20
+ "settingClick",
21
+ ...VxeEventListenerNameList.map(getEventName)
22
+ ],
23
+ setup(__props, { expose, emit: emits }) {
20
24
  const props = __props;
21
25
  provide(InjectionIhoTableEmits, emits);
26
+ const vxeTableRef = ref();
22
27
  const hooks = createTableHooks();
23
- const configRef = ref();
28
+ const configRef = ref({});
24
29
  provide(InjectionIhoTableConfig, configRef);
30
+ function updateConfigRef(config) {
31
+ if (!config)
32
+ return;
33
+ configRef.value = applyTableConfigHooks(hooks, config);
34
+ }
25
35
  const fieldListRef = ref([]);
36
+ function updateFieldListRef(fieldList, config) {
37
+ if (!isArray(fieldList) || !config)
38
+ return;
39
+ fieldListRef.value = applyTableFieldHooks(hooks, fieldList, config);
40
+ }
41
+ const eventHookHandler = createTableEventHandlers(hooks, configRef, vxeTableRef, emits);
42
+ const bindProperties = computed(() => ({ ...configRef.value, ...eventHookHandler }));
26
43
  watchDebounced(() => props.tableConfig, (config) => {
27
- configRef.value = applyTableConfigHooks(hooks, config || {});
44
+ updateConfigRef(config);
45
+ updateFieldListRef(props.fieldList);
28
46
  }, { immediate: true, flush: "post", deep: true, debounce: 50 });
29
47
  watchDebounced(() => props.fieldList, (fieldList) => {
30
- fieldListRef.value = applyTableFieldHooks(hooks, fieldList, configRef.value || {});
48
+ updateFieldListRef(fieldList, configRef.value);
31
49
  }, { immediate: true, flush: "post", deep: true, debounce: 50 });
50
+ expose({ tableRef: vxeTableRef });
32
51
  return (_ctx, _cache) => {
52
+ const _component_vxe_table = resolveComponent("vxe-table");
33
53
  return openBlock(), createElementBlock("section", _hoisted_1, [
34
- createVNode(unref(Table), mergeProps(configRef.value, { data: __props.tableData }), {
54
+ createVNode(_component_vxe_table, mergeProps({
55
+ ref_key: "vxeTableRef",
56
+ ref: vxeTableRef
57
+ }, unref(bindProperties), {
58
+ eventHookHandler: "",
59
+ data: __props.tableData
60
+ }), {
35
61
  default: withCtx(() => [
36
62
  (openBlock(true), createElementBlock(Fragment, null, renderList(fieldListRef.value, (field) => {
37
- return openBlock(), createBlock(unref(IhoTableColumn), {
63
+ return openBlock(), createBlock(unref(ColumnComponent), {
38
64
  key: field.field,
39
65
  field
40
66
  }, null, 8, ["field"]);