cnhis-design-vue 3.1.24-beta.1 → 3.1.24-beta.3

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 (42) hide show
  1. package/es/components/big-table/src/components/edit-form/edit-input.js +3 -1
  2. package/es/components/form-config/index.d.ts +1 -0
  3. package/es/components/form-config/src/FormConfig.vue.d.ts +1 -0
  4. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +1 -0
  5. package/es/components/form-render/index.js +1 -1
  6. package/es/components/form-render/src/FormRender.js +14 -1
  7. package/es/components/form-render/src/components/renderer/formItem.js +10 -2
  8. package/es/components/form-render/src/components/renderer/index.d.ts +3 -20
  9. package/es/components/form-render/src/components/renderer/index.js +49 -20
  10. package/es/components/form-render/src/components/renderer/levelSearchCascade.js +1 -1
  11. package/es/components/form-render/src/components/renderer/search.js +2 -19
  12. package/es/components/form-render/src/components/renderer/searchCascade.js +2 -19
  13. package/es/components/form-render/src/components/renderer/select.js +2 -19
  14. package/es/components/form-render/src/hooks/index.js +1 -1
  15. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +7 -3
  16. package/es/components/form-render/src/hooks/useFormContext.js +2 -2
  17. package/es/components/form-render/src/hooks/useFormValidator.d.ts +1 -0
  18. package/es/components/form-render/src/hooks/useFormValidator.js +17 -3
  19. package/es/components/form-render/src/types/fieldItem.d.ts +4 -0
  20. package/es/components/form-render/src/utils/index.d.ts +1 -0
  21. package/es/components/form-render/src/utils/index.js +10 -1
  22. package/es/components/iho-table/index.d.ts +100 -270
  23. package/es/components/iho-table/index.js +2 -2
  24. package/es/components/iho-table/src/IhoTable.vue.d.ts +100 -270
  25. package/es/components/iho-table/src/plugins/index.d.ts +3 -5
  26. package/es/components/iho-table/src/plugins/index.js +39 -15
  27. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.js +4 -9
  28. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +4 -1
  29. package/es/components/index.js +1 -1
  30. package/es/components/search-cascader/index.d.ts +2 -2
  31. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +2 -2
  32. package/es/components/shortcut-setter/index.d.ts +1 -0
  33. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -0
  34. package/es/shared/utils/index.d.ts +1 -0
  35. package/es/shared/utils/index.js +19 -2
  36. package/package.json +2 -2
  37. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/index.d.ts +0 -5
  38. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/index.js +0 -5
  39. package/es/components/iho-table/src/plugins/rendererPlugins/index.d.ts +0 -2
  40. package/es/components/iho-table/src/plugins/rendererPlugins/index.js +0 -11
  41. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/index.d.ts +0 -6
  42. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/index.js +0 -6
@@ -1,4 +1,4 @@
1
- import { defineComponent, inject, ref, watch, computed, onMounted, onDeactivated, openBlock, createBlock, unref, withCtx, createElementVNode, withModifiers, normalizeStyle, toDisplayString, renderSlot, createVNode } from 'vue';
1
+ import { defineComponent, inject, ref, watch, computed, onDeactivated, openBlock, createBlock, unref, withCtx, createElementVNode, withModifiers, normalizeStyle, toDisplayString, renderSlot, createVNode } from 'vue';
2
2
  import { cloneDeep, isObject, isArray } from 'lodash-es';
3
3
  import { NPopover, NInput } from 'naive-ui';
4
4
  import { InjectionIhoTableEmits, InjectionIhoTableHandler } from '../../../../constants/index.js';
@@ -8,7 +8,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
8
8
  __name: "editSeparate",
9
9
  props: {
10
10
  value: {},
11
- height: { type: Number },
11
+ height: { type: Number, default: 48 },
12
12
  column: { type: Object, required: true },
13
13
  row: { type: Object, required: true },
14
14
  displayContent: { type: String, default: "" },
@@ -55,16 +55,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
55
55
  }
56
56
  const style = computed(() => ({
57
57
  border: "1px solid #f5f5f5",
58
- height: props.height + "px",
58
+ height: props.height - 16 + "px",
59
59
  padding: "4px 0 4px 0",
60
60
  background: "white",
61
+ wordBreak: "keep-all",
61
62
  boxSizing: "border-box",
62
63
  "border-radius": "4px"
63
64
  }));
64
- const elementRef = ref();
65
- onMounted(() => {
66
- console.log(elementRef.value);
67
- });
68
65
  onDeactivated(onClose);
69
66
  return (_ctx, _cache) => {
70
67
  return openBlock(), createBlock(unref(NPopover), {
@@ -77,8 +74,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
77
74
  }, {
78
75
  trigger: withCtx(() => [
79
76
  createElementVNode("div", {
80
- ref_key: "elementRef",
81
- ref: elementRef,
82
77
  onClick: _cache[0] || (_cache[0] = withModifiers(($event) => show.value = !show.value, ["stop"])),
83
78
  style: normalizeStyle(unref(style))
84
79
  }, toDisplayString(__props.displayContent || " "), 5)
@@ -5,6 +5,7 @@ declare const _default: import("vue").DefineComponent<{
5
5
  value: {};
6
6
  height: {
7
7
  type: NumberConstructor;
8
+ default: number;
8
9
  };
9
10
  column: {
10
11
  type: PropType<IhoTableFieldItem>;
@@ -27,6 +28,7 @@ declare const _default: import("vue").DefineComponent<{
27
28
  value: {};
28
29
  height: {
29
30
  type: NumberConstructor;
31
+ default: number;
30
32
  };
31
33
  column: {
32
34
  type: PropType<IhoTableFieldItem>;
@@ -59,13 +61,13 @@ declare const _default: import("vue").DefineComponent<{
59
61
  onClose: () => Promise<void>;
60
62
  updateShow: (show: boolean) => void;
61
63
  style: import("vue").ComputedRef<CSSProperties>;
62
- elementRef: import("vue").Ref<any>;
63
64
  NPopover: any;
64
65
  NInput: any;
65
66
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
66
67
  value: {};
67
68
  height: {
68
69
  type: NumberConstructor;
70
+ default: number;
69
71
  };
70
72
  column: {
71
73
  type: PropType<IhoTableFieldItem>;
@@ -86,6 +88,7 @@ declare const _default: import("vue").DefineComponent<{
86
88
  }>> & {
87
89
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
88
90
  }, {
91
+ height: number;
89
92
  displayContent: string;
90
93
  }>;
91
94
  export default _default;
@@ -47,7 +47,7 @@ export { useFormField } from './form-render/src/hooks/useFormField.js';
47
47
  export { AsyncQueue, useAsyncQueue } from './form-render/src/hooks/useAsyncQueue.js';
48
48
  export { useFieldVisitor } from './form-render/src/hooks/useFieldVisitor.js';
49
49
  export { useFieldNormalize } from './form-render/src/hooks/useFieldNormalize.js';
50
- export { useFormValidator } from './form-render/src/hooks/useFormValidator.js';
50
+ export { useFormValidator, validateMessageLocale } from './form-render/src/hooks/useFormValidator.js';
51
51
  export { BusinessCollector, useBusinessBinding } from './form-render/src/hooks/useBusinessBinding.js';
52
52
  export { ContextCollector, useChangeContext } from './form-render/src/hooks/useChangeContext.js';
53
53
  export { FormItemDepsCollector, useFormItemDeps } from './form-render/src/hooks/useFormItemDeps.js';
@@ -89,7 +89,7 @@ declare const SearchCascader: SFCWithInstall<import("vue").DefineComponent<{
89
89
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
90
90
  "onUpdate:show"?: ((...args: any[]) => any) | undefined;
91
91
  }>>;
92
- emits: (event: "update:value" | "update:show" | "focus", ...args: any[]) => void;
92
+ emits: (event: "update:show" | "update:value" | "focus", ...args: any[]) => void;
93
93
  emitValue: (value: string | import("../../../es/shared/types").AnyObject[]) => void;
94
94
  onClear: () => void;
95
95
  onClick: (evt: Event) => void;
@@ -153,7 +153,7 @@ declare const SearchCascader: SFCWithInstall<import("vue").DefineComponent<{
153
153
  childKey: string;
154
154
  labelKey: string;
155
155
  }>;
156
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "update:show" | "focus")[], "focus" | "update:value" | "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
156
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:show" | "update:value" | "focus")[], "focus" | "update:show" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
157
157
  value: {
158
158
  type: import("vue").PropType<string | import("../../../es/shared/types").AnyObject[]>;
159
159
  };
@@ -91,7 +91,7 @@ declare const _default: import("vue").DefineComponent<{
91
91
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
92
92
  "onUpdate:show"?: ((...args: any[]) => any) | undefined;
93
93
  }>>;
94
- emits: (event: "update:value" | "update:show" | "focus", ...args: any[]) => void;
94
+ emits: (event: "update:show" | "update:value" | "focus", ...args: any[]) => void;
95
95
  emitValue: (value: ValueType) => void;
96
96
  onClear: () => void;
97
97
  onClick: (evt: Event) => void;
@@ -155,7 +155,7 @@ declare const _default: import("vue").DefineComponent<{
155
155
  childKey: string;
156
156
  labelKey: string;
157
157
  }>;
158
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "update:show" | "focus")[], "focus" | "update:value" | "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
158
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:show" | "update:value" | "focus")[], "focus" | "update:show" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
159
159
  value: {
160
160
  type: PropType<ValueType>;
161
161
  };
@@ -132,6 +132,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
132
132
  } | undefined;
133
133
  suffixConfig?: any | any[] | undefined;
134
134
  autograph?: string | undefined;
135
+ defined_error_msg?: string | undefined;
135
136
  fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
136
137
  content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
137
138
  lazyRequest?: boolean | undefined;
@@ -134,6 +134,7 @@ declare const _default: import("vue").DefineComponent<{
134
134
  } | undefined;
135
135
  suffixConfig?: any | any[] | undefined;
136
136
  autograph?: string | undefined;
137
+ defined_error_msg?: string | undefined;
137
138
  fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
138
139
  content?: string | import("../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../es/components/form-render").FormRenderer> | undefined;
139
140
  lazyRequest?: boolean | undefined;
@@ -7,3 +7,4 @@ export declare function arrayed<T>(maybeArray: T): T extends Array<any> ? T : [T
7
7
  export declare function uuidGenerator(): string;
8
8
  export declare const getStringWidth: import("@vueuse/core").UseMemoizedFn<number, [str: string]>;
9
9
  export declare const DMZ: AnyObject;
10
+ export declare function deepOmit<T extends AnyObject>(target: T, keys: Array<keyof T>): AnyObject;
@@ -1,5 +1,5 @@
1
1
  import { useMemoize } from '@vueuse/core';
2
- import { isArray, isString } from 'lodash-es';
2
+ import { isArray, isString, isObject } from 'lodash-es';
3
3
 
4
4
  function traverse(target, handler, keys = "children", parent) {
5
5
  function stop() {
@@ -94,5 +94,22 @@ const getStringWidth = /* @__PURE__ */ useMemoize(function(str) {
94
94
  }, 0);
95
95
  });
96
96
  const DMZ = Object.seal(/* @__PURE__ */ Object.create(null));
97
+ function deepOmit(target, keys) {
98
+ function search(obj, keys2) {
99
+ return Object.entries(obj).reduce((result, [k, v]) => {
100
+ if (keys2.includes(k))
101
+ return result;
102
+ if (isArray(v)) {
103
+ result[k] = v.map((child) => search(child, keys2));
104
+ } else if (isObject(v)) {
105
+ result[k] = search(v, keys2);
106
+ } else {
107
+ result[k] = v;
108
+ }
109
+ return result;
110
+ }, {});
111
+ }
112
+ return search(target, keys);
113
+ }
97
114
 
98
- export { DMZ, arrayed, generateTimeFormat, getStringWidth, safeComponentRegister, traverse, uuidGenerator };
115
+ export { DMZ, arrayed, deepOmit, generateTimeFormat, getStringWidth, safeComponentRegister, traverse, uuidGenerator };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.1.24-beta.1",
3
+ "version": "3.1.24-beta.3",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -66,5 +66,5 @@
66
66
  "iOS 7",
67
67
  "last 3 iOS versions"
68
68
  ],
69
- "gitHead": "47fe4420260af9cd370b493d16ceaa9bd5982388"
69
+ "gitHead": "d8bd01e1a164a01175e881e3109ab751c9b36e4b"
70
70
  }
@@ -1,5 +0,0 @@
1
- export * from './inputRendererPlugin';
2
- export * from './separateRendererPlugin';
3
- export * from './selectRendererPlugin';
4
- export * from './dateRendererPlugin';
5
- export * from './timeRendererPlugin';
@@ -1,5 +0,0 @@
1
- export { inputRendererPlugin } from './inputRendererPlugin.js';
2
- export { separateRendererPlugins } from './separateRendererPlugin/index.js';
3
- export { selectRendererPlugin } from './selectRendererPlugin/index.js';
4
- export { dateRendererPlugin } from './dateRendererPlugin/index.js';
5
- export { timeRendererPlugin } from './timeRendererPlugin/index.js';
@@ -1,2 +0,0 @@
1
- export * from './widgets';
2
- export * from './editableWidgets';
@@ -1,11 +0,0 @@
1
- export { labelRendererPlugin } from './widgets/labelRendererPlugin.js';
2
- export { defaultRendererPlugin } from './widgets/defaultRendererPlugin.js';
3
- export { colorRendererPlugin } from './widgets/colorRendererPlugin.js';
4
- export { seqRendererPlugin } from './widgets/seqRendererPlugin.js';
5
- export { checkRendererPlugin } from './widgets/checkRendererPlugin.js';
6
- export { pictureRendererPlugin } from './widgets/pictureRendererPlugin.js';
7
- export { inputRendererPlugin } from './editableWidgets/inputRendererPlugin.js';
8
- export { separateRendererPlugins } from './editableWidgets/separateRendererPlugin/index.js';
9
- export { selectRendererPlugin } from './editableWidgets/selectRendererPlugin/index.js';
10
- export { dateRendererPlugin } from './editableWidgets/dateRendererPlugin/index.js';
11
- export { timeRendererPlugin } from './editableWidgets/timeRendererPlugin/index.js';
@@ -1,6 +0,0 @@
1
- export * from './labelRendererPlugin';
2
- export * from './defaultRendererPlugin';
3
- export * from './colorRendererPlugin';
4
- export * from './seqRendererPlugin';
5
- export * from './checkRendererPlugin';
6
- export * from './pictureRendererPlugin';
@@ -1,6 +0,0 @@
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';