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.
Files changed (58) hide show
  1. package/es/components/big-table/index.d.ts +8 -0
  2. package/es/components/big-table/src/BigTable.vue.d.ts +8 -0
  3. package/es/components/big-table/src/components/edit-form/edit-separate.js +4 -1
  4. package/es/components/big-table/src/hooks/useSeparateRow2.js +1 -41
  5. package/es/components/field-set/src/FieldSet.js +5 -1
  6. package/es/components/form-render/src/hooks/useFormContext2.js +2 -1
  7. package/es/components/form-render/src/utils/index.d.ts +0 -1
  8. package/es/components/form-render/src/utils/index.js +1 -10
  9. package/es/components/iho-table/index.d.ts +141 -277
  10. package/es/components/iho-table/index.js +1 -1
  11. package/es/components/iho-table/src/IhoTable.js +52 -31
  12. package/es/components/iho-table/src/IhoTable.vue.d.ts +142 -278
  13. package/es/components/iho-table/src/constants/index.d.ts +5 -2
  14. package/es/components/iho-table/src/constants/index.js +1 -1
  15. package/es/components/iho-table/src/constants/index2.js +8 -5
  16. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +10 -3
  17. package/es/components/iho-table/src/hooks/tapHooks/index2.js +32 -21
  18. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +5 -3
  19. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks2.js +3 -3
  20. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +177 -60
  21. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks2.js +223 -59
  22. package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.d.ts +10 -0
  23. package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.js +1 -0
  24. package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks2.js +27 -0
  25. package/es/components/iho-table/src/plugins/index.js +2 -1
  26. package/es/components/iho-table/src/plugins/index2.js +2 -1
  27. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index2.js +2 -1
  28. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/index.d.ts +2 -0
  29. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/index.js +2 -0
  30. package/es/components/iho-table/src/plugins/rendererPlugins/{inputs → editableWidgets}/inputRendererPlugins.d.ts +0 -0
  31. package/es/components/iho-table/src/plugins/rendererPlugins/{inputs → editableWidgets}/inputRendererPlugins.js +0 -5
  32. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/edit-separate.js +110 -0
  33. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/edit-separate.vue.d.ts +107 -0
  34. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.d.ts +1 -0
  35. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +158 -0
  36. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separate-utils.d.ts +14 -0
  37. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separate-utils.js +1 -0
  38. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separate-utils2.js +54 -0
  39. package/es/components/iho-table/src/plugins/rendererPlugins/index.d.ts +1 -1
  40. package/es/components/iho-table/src/plugins/rendererPlugins/index.js +2 -1
  41. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +2 -1
  42. package/es/components/iho-table/src/types/index.d.ts +8 -3
  43. package/es/components/iho-table/src/types/index.js +1 -1
  44. package/es/components/iho-table/src/types/pluginType.d.ts +97 -83
  45. package/es/components/iho-table/src/types/pluginType.js +1 -1
  46. package/es/components/iho-table/src/types/pluginType2.js +3 -1
  47. package/es/components/iho-table/src/utils/index2.js +1 -1
  48. package/es/components/index.js +1 -1
  49. package/es/components/info-header/index.d.ts +2 -0
  50. package/es/components/info-header/src/InfoHeader.js +3 -1
  51. package/es/components/info-header/src/InfoHeader.vue.d.ts +2 -0
  52. package/es/shared/utils/index.d.ts +4 -0
  53. package/es/shared/utils/index.js +1 -1
  54. package/es/shared/utils/index2.js +60 -2
  55. package/es/shared/utils/tapable/AsyncSeriesHook.js +17 -2
  56. package/package.json +2 -2
  57. package/es/components/iho-table/src/plugins/rendererPlugins/inputs/index.d.ts +0 -1
  58. package/es/components/iho-table/src/plugins/rendererPlugins/inputs/index.js +0 -1
@@ -329,6 +329,14 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
329
329
  showInsertStatus?: boolean | undefined;
330
330
  showAsterisk?: boolean | undefined;
331
331
  autoClear?: boolean | undefined;
332
+ beforeEditMethod?: ((params: {
333
+ row: any;
334
+ rowIndex: number;
335
+ column: import("vxe-table").VxeTableDefines.ColumnInfo;
336
+ columnIndex: number;
337
+ $table: import("vxe-table").VxeTableConstructor & import("vxe-table").VxeTablePrivateMethods;
338
+ $grid: import("vxe-table").VxeGridConstructor | null | undefined;
339
+ }) => boolean) | undefined;
332
340
  activeMethod?: ((params: {
333
341
  row: any;
334
342
  rowIndex: number;
@@ -327,6 +327,14 @@ declare const _default: import("vue").DefineComponent<{
327
327
  showInsertStatus?: boolean | undefined;
328
328
  showAsterisk?: boolean | undefined;
329
329
  autoClear?: boolean | undefined;
330
+ beforeEditMethod?: ((params: {
331
+ row: any;
332
+ rowIndex: number;
333
+ column: import("vxe-table").VxeTableDefines.ColumnInfo;
334
+ columnIndex: number;
335
+ $table: import("vxe-table").VxeTableConstructor & import("vxe-table").VxeTablePrivateMethods;
336
+ $grid: import("vxe-table").VxeGridConstructor | null | undefined;
337
+ }) => boolean) | undefined;
330
338
  activeMethod?: ((params: {
331
339
  row: any;
332
340
  rowIndex: number;
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, watch, openBlock, createBlock, unref, withCtx, createVNode, withModifiers } from 'vue';
1
+ import { defineComponent, ref, watch, onDeactivated, openBlock, createBlock, unref, withCtx, createVNode, withModifiers } from 'vue';
2
2
  import script from '../../../../../shared/components/SlotRender/SlotRender.js';
3
3
  import { cloneDeep, isObject, isArray } from 'lodash-es';
4
4
  import { NPopover, NInput } from 'naive-ui';
@@ -57,6 +57,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
57
57
  background: "white",
58
58
  "border-radius": "4px"
59
59
  };
60
+ onDeactivated(() => {
61
+ onClose(getRowData(props.row));
62
+ });
60
63
  return (_ctx, _cache) => {
61
64
  return openBlock(), createBlock(unref(NPopover), {
62
65
  ref_key: "popoverRef",
@@ -1,4 +1,4 @@
1
- import { useMemoize } from '@vueuse/core';
1
+ import { getStringWidth } from '../../../../shared/utils/index2.js';
2
2
  import { isNumber, isArray, cloneDeep, isString } from 'lodash-es';
3
3
  import { ref, computed, provide, watch, nextTick } from 'vue';
4
4
  import { InjectionSeparateHandle } from '../constants/index2.js';
@@ -20,46 +20,6 @@ class SeparateHandle {
20
20
  this.callbacks.forEach((cb) => cb());
21
21
  }
22
22
  }
23
- const getStringWidth = /* @__PURE__ */ useMemoize(function(str) {
24
- if (!str)
25
- return 0;
26
- return [...str].reduce((width, char) => {
27
- if (/[a-z]/.test(char)) {
28
- return width + 8;
29
- }
30
- if (/[A-Z]/.test(char)) {
31
- return width + 12;
32
- }
33
- if (/\d/.test(char)) {
34
- return width + 9;
35
- }
36
- if (/\./.test(char)) {
37
- return width + 4;
38
- }
39
- if (/[\u4e00-\u9fa5]/.test(char)) {
40
- return width + 15;
41
- }
42
- if (/-/.test(char)) {
43
- return width + 4;
44
- }
45
- if (/[()]/.test(char)) {
46
- return width + 14;
47
- }
48
- if (/[)(]/.test(char)) {
49
- return width + 5;
50
- }
51
- if (/-/.test(char)) {
52
- return width + 10;
53
- }
54
- if (/%/.test(char)) {
55
- return width + 14;
56
- }
57
- if (/‰/.test(char)) {
58
- return width + 16;
59
- }
60
- return width + 6;
61
- }, 0);
62
- });
63
23
  const separateDataMap = ref(/* @__PURE__ */ new WeakMap());
64
24
  function useSeparateMap() {
65
25
  function getRowData(row) {
@@ -118,7 +118,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
118
118
  Reflect.deleteProperty(item, key);
119
119
  }
120
120
  }
121
- item.columnWidth = +item.columnWidth;
121
+ if (!Reflect.has(item, "columnWidth")) {
122
+ item.columnWidth = null;
123
+ } else {
124
+ item.columnWidth = +item.columnWidth;
125
+ }
122
126
  if (!Reflect.has(item, "alias")) {
123
127
  item.alias = "";
124
128
  }
@@ -1,3 +1,4 @@
1
+ import { uuidGenerator } from '../../../../shared/utils/index2.js';
1
2
  import { isObject } from '@vue/shared';
2
3
  import { cloneDeep } from 'lodash-es';
3
4
  import { provide, computed, readonly } from 'vue';
@@ -6,7 +7,7 @@ import '../../index2.js';
6
7
  import * as index from '../components/renderer/index2.js';
7
8
  import { useFormRenderLifeCycle } from './useFormRenderLifeCycle2.js';
8
9
  import { usePresetScope } from './usePresetScope2.js';
9
- import { injectOrProvide, uuidGenerator, presetRequestHandler } from '../utils/index.js';
10
+ import { injectOrProvide, presetRequestHandler } from '../utils/index.js';
10
11
  import { InjectionBusinessCollector, InjectionChangeContextCollector, InjectionFormItemDepsCollector, InjectionFormUUID, InjectionAnnotation, InjectAsyncQueue, InjectionSchemaField } from '../constants/index2.js';
11
12
  import { useBusinessBinding } from './useBusinessBinding2.js';
12
13
  import { useChangeContext } from './useChangeContext2.js';
@@ -8,7 +8,6 @@ export declare function formRenderLog(message: string): void;
8
8
  export declare function mergeDeepProperties(target: AnyObject, fieldList: FieldItem[], traverseProperties?: string[], property?: string, targetProperty?: string): AnyObject;
9
9
  export declare function injectOrProvide<T>(key: InjectionKey<T>, creator: () => T): T;
10
10
  export declare function parseNumberFromMaybeString<T>(value: T): T extends number | string ? number : T;
11
- export declare function uuidGenerator(): string;
12
11
  export declare function createSlot(renderer: unknown, props: AnyObject): Record<string, () => ArrayAble<VNode>> | {
13
12
  default(): any;
14
13
  };
@@ -50,15 +50,6 @@ function parseNumberFromMaybeString(value) {
50
50
  return +value;
51
51
  return value;
52
52
  }
53
- function uuidGenerator() {
54
- if (window.isSecureContext && window.crypto)
55
- return `key${window.crypto.randomUUID()}`;
56
- const uuid = "xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
57
- const r = Math.random() * 16 | 0, v = c == "x" ? r : r & 3 | 8;
58
- return v.toString(16);
59
- });
60
- return `key${uuid}`;
61
- }
62
53
  function createSlot(renderer, props) {
63
54
  if (isObject(renderer) && !isFunction(renderer)) {
64
55
  const result = {};
@@ -134,4 +125,4 @@ function optionMatcher(options, input, key, matcherOption = {
134
125
  }
135
126
  }
136
127
 
137
- export { createInputSlot, createSlot, formRenderLog, injectOrProvide, mergeDeepProperties, optionMatcher, parseNumberFromMaybeString, presetRequestHandler, uuidGenerator };
128
+ export { createInputSlot, createSlot, formRenderLog, injectOrProvide, mergeDeepProperties, optionMatcher, parseNumberFromMaybeString, presetRequestHandler };