cnhis-design-vue 3.1.23-beta.1 → 3.1.23-beta.12

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 (131) hide show
  1. package/README.md +123 -123
  2. package/es/components/big-table/index.d.ts +0 -3
  3. package/es/components/big-table/src/BigTable.vue.d.ts +0 -3
  4. package/es/components/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +9 -20
  5. package/es/components/big-table/src/components/edit-form/useCommon.d.ts +4 -0
  6. package/es/components/big-table/src/utils.d.ts +1 -1
  7. package/es/components/big-table/src/utils2.js +11 -37
  8. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  9. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  10. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  11. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  12. package/es/components/fabric-chart/src/components/PopupMenu.js +7 -2
  13. package/es/components/fabric-chart/src/hooks/useCenter2.js +9 -5
  14. package/es/components/fabric-chart/src/hooks/useEvent2.js +40 -8
  15. package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
  16. package/es/components/field-set/index.d.ts +1 -0
  17. package/es/components/field-set/src/FieldSet.js +16 -10
  18. package/es/components/field-set/src/FieldSet.vue.d.ts +1 -0
  19. package/es/components/form-config/index.d.ts +7 -0
  20. package/es/components/form-config/src/FormConfig.vue.d.ts +7 -0
  21. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +7 -0
  22. package/es/components/form-render/index2.js +2 -1
  23. package/es/components/form-render/src/components/renderer/index.d.ts +2 -1
  24. package/es/components/form-render/src/components/renderer/index.js +2 -1
  25. package/es/components/form-render/src/components/renderer/index2.js +2 -1
  26. package/es/components/form-render/src/components/renderer/levelSearchCascade.d.ts +88 -0
  27. package/es/components/form-render/src/components/renderer/levelSearchCascade.js +237 -0
  28. package/es/components/form-render/src/components/renderer/search.d.ts +15 -1
  29. package/es/components/form-render/src/components/renderer/search.js +3 -1
  30. package/es/components/form-render/src/components/renderer/{cascader.d.ts → searchCascade.d.ts} +0 -0
  31. package/es/components/form-render/src/components/renderer/{cascader.js → searchCascade.js} +2 -0
  32. package/es/components/form-render/src/components/renderer/select.js +3 -1
  33. package/es/components/form-render/src/hooks/useAsyncQueue2.js +4 -4
  34. package/es/components/form-render/src/hooks/useFieldListAdaptor2.js +11 -4
  35. package/es/components/form-render/src/hooks/useFormRequest.d.ts +2 -0
  36. package/es/components/form-render/src/hooks/useFormRequest2.js +1 -1
  37. package/es/components/form-render/src/types/fieldItem.d.ts +7 -0
  38. package/es/components/form-render/src/utils/schema2.js +1 -4
  39. package/es/components/iho-table/index.d.ts +100 -271
  40. package/es/components/iho-table/src/IhoTable.vue.d.ts +100 -271
  41. package/es/components/iho-table/src/components/IhoTableColumn.js +1 -1
  42. package/es/components/iho-table/src/constants/index.d.ts +5 -3
  43. package/es/components/iho-table/src/constants/index.js +1 -1
  44. package/es/components/iho-table/src/constants/index2.js +9 -7
  45. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +2 -2
  46. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index2.js +1 -1
  47. package/es/components/iho-table/src/plugins/index.d.ts +1 -0
  48. package/es/components/iho-table/src/plugins/index.js +5 -1
  49. package/es/components/iho-table/src/plugins/index2.js +5 -1
  50. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index2.js +11 -8
  51. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.d.ts +31 -0
  52. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.js +205 -0
  53. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.d.ts +1 -0
  54. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +39 -0
  55. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useCommon.d.ts +4 -0
  56. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useCommon.js +1 -0
  57. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useCommon2.js +17 -0
  58. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/index.d.ts +4 -1
  59. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/index.js +4 -1
  60. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.d.ts +1 -0
  61. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/{inputRendererPlugins.js → inputRendererPlugin.js} +4 -4
  62. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +31 -0
  63. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +60 -0
  64. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.d.ts +1 -0
  65. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +40 -0
  66. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +2 -0
  67. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -0
  68. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils2.js +20 -0
  69. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/{edit-separate.js → editSeparate.js} +20 -22
  70. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/{edit-separate.vue.d.ts → editSeparate.vue.d.ts} +1 -17
  71. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +13 -9
  72. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/{separate-utils.d.ts → separateUtils.d.ts} +0 -0
  73. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/{separate-utils.js → separateUtils.js} +1 -1
  74. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/{separate-utils2.js → separateUtils2.js} +4 -4
  75. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.d.ts +31 -0
  76. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.js +60 -0
  77. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.d.ts +1 -0
  78. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js +39 -0
  79. package/es/components/iho-table/src/plugins/rendererPlugins/index.js +4 -1
  80. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +2 -0
  81. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/labelRendererPlugin.js +2 -0
  82. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +3 -1
  83. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +16 -26
  84. package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index2.js +1 -46
  85. package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.d.ts +11 -0
  86. package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.js +1 -0
  87. package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils2.js +50 -0
  88. package/es/components/iho-table/src/plugins/virtualTreePlugin/index.d.ts +1 -0
  89. package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +1 -0
  90. package/es/components/iho-table/src/plugins/virtualTreePlugin/index2.js +84 -0
  91. package/es/components/iho-table/src/types/index.d.ts +1 -3
  92. package/es/components/index.css +1 -1
  93. package/es/components/scale-view/src/hooks/use-component.d.ts +1 -0
  94. package/es/components/search-cascader/index.d.ts +196 -0
  95. package/es/components/search-cascader/index.js +1 -0
  96. package/es/components/search-cascader/index2.js +10 -0
  97. package/es/components/search-cascader/src/SearchCascader.js +168 -0
  98. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +198 -0
  99. package/es/components/search-cascader/src/components/SearchMenu.d.ts +45 -0
  100. package/es/components/search-cascader/src/components/SearchMenu.js +134 -0
  101. package/es/components/search-cascader/src/components/index.d.ts +1 -0
  102. package/es/components/search-cascader/src/components/index.js +1 -0
  103. package/es/components/search-cascader/src/constants/index.d.ts +3 -0
  104. package/es/components/search-cascader/src/constants/index.js +1 -0
  105. package/es/components/search-cascader/src/constants/index2.js +3 -0
  106. package/es/components/search-cascader/src/hooks/index.d.ts +1 -0
  107. package/es/components/search-cascader/src/hooks/index.js +1 -0
  108. package/es/components/search-cascader/src/hooks/useCssVariable.d.ts +3 -0
  109. package/es/components/search-cascader/src/hooks/useCssVariable.js +1 -0
  110. package/es/components/search-cascader/src/hooks/useCssVariable2.js +7 -0
  111. package/es/components/search-cascader/src/utils/index.d.ts +2 -0
  112. package/es/components/search-cascader/src/utils/index.js +1 -0
  113. package/es/components/search-cascader/src/utils/index2.js +11 -0
  114. package/es/components/search-cascader/style/index.css +1 -0
  115. package/es/components/select-label/index.d.ts +1 -0
  116. package/es/components/select-label/src/SelectLabel.vue.d.ts +1 -0
  117. package/es/components/select-label/src/SelectLabel.vue_vue_type_script_setup_true_lang.js +16 -4
  118. package/es/components/shortcut-provider/src/ShortcutProvider.js +2 -1
  119. package/es/components/shortcut-setter/index.d.ts +7 -0
  120. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +7 -0
  121. package/es/shared/components/no-data/NoData.js +74 -0
  122. package/es/shared/components/no-data/NoData.vue.d.ts +51 -0
  123. package/es/shared/components/no-data/index.d.ts +2 -0
  124. package/es/shared/components/no-data/index.js +1 -0
  125. package/es/shared/components/no-data/index2.js +2 -0
  126. package/es/shared/utils/index.d.ts +2 -1
  127. package/es/shared/utils/index.js +1 -1
  128. package/es/shared/utils/index2.js +17 -7
  129. package/es/shared/utils/tapable/index.d.ts +139 -0
  130. package/package.json +2 -2
  131. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugins.d.ts +0 -1
@@ -1,5 +1,5 @@
1
- import { defineComponent, ref, reactive, computed, onMounted, watch, openBlock, createElementBlock, Fragment, createElementVNode, createVNode, unref, withCtx, renderList, createBlock, normalizeStyle, createTextVNode, toDisplayString, withDirectives, normalizeClass, vShow, createCommentVNode, mergeProps, nextTick } from 'vue';
2
- import { NSpace, NTag, NIcon, NModal } from 'naive-ui';
1
+ import { defineComponent, ref, reactive, computed, onMounted, watch, openBlock, createElementBlock, Fragment, createElementVNode, createVNode, unref, withCtx, renderList, createBlock, normalizeStyle, toDisplayString, withDirectives, normalizeClass, vShow, createCommentVNode, mergeProps, createTextVNode, nextTick } from 'vue';
2
+ import { NSpace, NTag, NTooltip, NIcon, NModal } from 'naive-ui';
3
3
  import { AddCircleOutline } from '@vicons/ionicons5';
4
4
  import script from '../../../shared/components/SvgIcon/SvgIcon.js';
5
5
  import scriptFormContent from './LabelFormContent.js';
@@ -357,7 +357,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
357
357
  onClose: ($event) => closeTag(v),
358
358
  size: "small"
359
359
  }, {
360
- default: withCtx(() => [createTextVNode(toDisplayString(v.labelName), 1)]),
360
+ default: withCtx(() => [createVNode(unref(NTooltip), {
361
+ placement: "top-start"
362
+ }, {
363
+ trigger: withCtx(() => [createElementVNode("span", null, toDisplayString(v.labelName), 1)]),
364
+ default: withCtx(() => [createElementVNode("span", null, toDisplayString(v.labelName), 1)]),
365
+ _: 2
366
+ }, 1024)]),
361
367
  _: 2
362
368
  }, 1032, ["style", "closable", "onClose"]);
363
369
  }), 128)), !__props.explicit ? withDirectives((openBlock(), createElementBlock("span", {
@@ -385,7 +391,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
385
391
  style: normalizeStyle(unref(handleLabelColor)(item)),
386
392
  size: "small"
387
393
  }, {
388
- default: withCtx(() => [createTextVNode(toDisplayString(item.labelName), 1)]),
394
+ default: withCtx(() => [createVNode(unref(NTooltip), {
395
+ placement: "top-start"
396
+ }, {
397
+ trigger: withCtx(() => [createElementVNode("span", null, toDisplayString(item.labelName), 1)]),
398
+ default: withCtx(() => [createElementVNode("span", null, toDisplayString(item.labelName), 1)]),
399
+ _: 2
400
+ }, 1024)]),
389
401
  _: 2
390
402
  }, 1032, ["checked", "onUpdate:checked", "style"]);
391
403
  }), 128))]),
@@ -1,4 +1,5 @@
1
1
  import { defineComponent, ref, provide, onBeforeUnmount, openBlock, createElementBlock, renderSlot } from 'vue';
2
+ import { uuidGenerator } from '../../../shared/utils/index2.js';
2
3
  import { InjectionShortcutManager } from './constants/index2.js';
3
4
  import '../index2.js';
4
5
  import _export_sfc from '../../../_virtual/plugin-vue_export-helper.js';
@@ -12,7 +13,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
12
13
  setup(__props) {
13
14
  const props = __props;
14
15
  const shortcutWrapperRef = ref();
15
- const manager = new ShortcutManager(shortcutWrapperRef, props.scope || String(Date.now())).start();
16
+ const manager = new ShortcutManager(shortcutWrapperRef, props.scope || uuidGenerator()).start();
16
17
  provide(InjectionShortcutManager, manager);
17
18
  onBeforeUnmount(() => {
18
19
  manager.destroy();
@@ -98,8 +98,15 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
98
98
  name?: string | undefined;
99
99
  render_key?: string[] | undefined;
100
100
  search_key?: string[] | undefined;
101
+ primary_key?: string | undefined;
101
102
  type?: string | undefined;
102
103
  value_key?: string | undefined;
104
+ level_key?: string | undefined;
105
+ link_key?: string | undefined;
106
+ link_key_split?: string | undefined;
107
+ show_key?: string[] | undefined;
108
+ conObj?: import("../../../es/shared/types").AnyObject[] | undefined;
109
+ conObjFirstLevel?: import("../../../es/shared/types").AnyObject[] | undefined;
103
110
  } | undefined;
104
111
  open?: {
105
112
  value?: any;
@@ -100,8 +100,15 @@ declare const _default: import("vue").DefineComponent<{
100
100
  name?: string | undefined;
101
101
  render_key?: string[] | undefined;
102
102
  search_key?: string[] | undefined;
103
+ primary_key?: string | undefined;
103
104
  type?: string | undefined;
104
105
  value_key?: string | undefined;
106
+ level_key?: string | undefined;
107
+ link_key?: string | undefined;
108
+ link_key_split?: string | undefined;
109
+ show_key?: string[] | undefined;
110
+ conObj?: import("../../../../es/shared/types").AnyObject[] | undefined;
111
+ conObjFirstLevel?: import("../../../../es/shared/types").AnyObject[] | undefined;
105
112
  } | undefined;
106
113
  open?: {
107
114
  value?: any;
@@ -0,0 +1,74 @@
1
+ import { defineComponent, computed, openBlock, createElementBlock, unref, createCommentVNode, createElementVNode, toDisplayString } from 'vue';
2
+ import img$1 from '../../assets/img/nodata.js';
3
+ import img$3 from '../../assets/img/no-permission.js';
4
+ import img$2 from '../../assets/img/failure.js';
5
+ import img from '../../assets/img/notfound.js';
6
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.js';
7
+
8
+ const _hoisted_1 = { class: "no-data-tip NoData-page" };
9
+ const _hoisted_2 = ["src"];
10
+ const _hoisted_3 = { key: 1 };
11
+ const _sfc_main = /* @__PURE__ */ defineComponent({
12
+ __name: "NoData",
13
+ props: {
14
+ noDataTip: {
15
+ type: String,
16
+ default: "\u6682\u65E0\u6570\u636E"
17
+ },
18
+ noDataImg: {
19
+ type: String,
20
+ default: "nodata"
21
+ },
22
+ showImg: {
23
+ type: Boolean,
24
+ default: true
25
+ }
26
+ },
27
+ setup(__props) {
28
+ const props = __props;
29
+ const imgStr = computed(() => {
30
+ let str = null;
31
+ switch (props.noDataImg) {
32
+ case "no-permission":
33
+ str = img$3;
34
+ break;
35
+ case "failure":
36
+ str = img$2;
37
+ break;
38
+ case "nodata":
39
+ str = img$1;
40
+ break;
41
+ default:
42
+ str = img;
43
+ break;
44
+ }
45
+ return str;
46
+ });
47
+ const handleDesc = computed(() => {
48
+ let res = "";
49
+ switch (props.noDataImg) {
50
+ case "no-permission":
51
+ res = "\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458";
52
+ break;
53
+ case "failure":
54
+ res = "\u8BF7\u7A0D\u540E\u518D\u8BD5";
55
+ break;
56
+ }
57
+ return res;
58
+ });
59
+ return (_ctx, _cache) => {
60
+ return openBlock(), createElementBlock("div", _hoisted_1, [
61
+ __props.showImg ? (openBlock(), createElementBlock("img", {
62
+ key: 0,
63
+ src: unref(imgStr),
64
+ alt: ""
65
+ }, null, 8, _hoisted_2)) : createCommentVNode("v-if", true),
66
+ createElementVNode("p", null, toDisplayString(__props.noDataTip), 1),
67
+ unref(handleDesc) ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(unref(handleDesc)), 1)) : createCommentVNode("v-if", true)
68
+ ]);
69
+ };
70
+ }
71
+ });
72
+ var script = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "NoData.vue"]]);
73
+
74
+ export { script as default };
@@ -0,0 +1,51 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ noDataTip: {
3
+ type: StringConstructor;
4
+ default: string;
5
+ };
6
+ noDataImg: {
7
+ type: StringConstructor;
8
+ default: string;
9
+ };
10
+ showImg: {
11
+ type: BooleanConstructor;
12
+ default: boolean;
13
+ };
14
+ }, {
15
+ imgStr: import("vue").ComputedRef<null>;
16
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
17
+ noDataTip: {
18
+ type: StringConstructor;
19
+ default: string;
20
+ };
21
+ noDataImg: {
22
+ type: StringConstructor;
23
+ default: string;
24
+ };
25
+ showImg: {
26
+ type: BooleanConstructor;
27
+ default: boolean;
28
+ };
29
+ }>> & {
30
+ [x: `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
31
+ }>>;
32
+ handleDesc: import("vue").ComputedRef<string>;
33
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
34
+ noDataTip: {
35
+ type: StringConstructor;
36
+ default: string;
37
+ };
38
+ noDataImg: {
39
+ type: StringConstructor;
40
+ default: string;
41
+ };
42
+ showImg: {
43
+ type: BooleanConstructor;
44
+ default: boolean;
45
+ };
46
+ }>>, {
47
+ noDataTip: string;
48
+ noDataImg: string;
49
+ showImg: boolean;
50
+ }>;
51
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import script from './NoData.vue';
2
+ export default script;
@@ -0,0 +1 @@
1
+ export { default } from './NoData.js';
@@ -0,0 +1,2 @@
1
+ import script from './NoData.js';
2
+ export { default } from './NoData.js';
@@ -1,8 +1,9 @@
1
1
  import { AnyObject, ArrayAble } from '../../../es/shared/types';
2
2
  import { App, Component } from 'vue';
3
- export declare function traverse<T extends ArrayAble<AnyObject>>(target: T, handler: (item: T extends Array<infer P> ? P : T) => void, keys?: ArrayAble<string>): void;
3
+ export declare function traverse<T extends ArrayAble<AnyObject>>(target: T, handler: (item: T extends Array<infer P> ? P : T, stop: () => void, parent?: typeof item) => void, keys?: ArrayAble<string>, parent?: T): void;
4
4
  export declare function safeComponentRegister(app: App, component: Component, cName?: string | undefined, scheduler?: () => void): void;
5
5
  export declare function generateTimeFormat(format: string): string | undefined;
6
6
  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
+ export declare const DMZ: AnyObject;
@@ -1 +1 @@
1
- export { arrayed, generateTimeFormat, getStringWidth, safeComponentRegister, traverse, uuidGenerator } from './index2.js';
1
+ export { DMZ, arrayed, generateTimeFormat, getStringWidth, safeComponentRegister, traverse, uuidGenerator } from './index2.js';
@@ -1,13 +1,22 @@
1
1
  import { useMemoize } from '@vueuse/core';
2
2
  import { isArray, isString } from 'lodash-es';
3
3
 
4
- function traverse(target, handler, keys = "children") {
5
- arrayed(target).forEach((item) => {
6
- handler(item);
7
- arrayed(keys).forEach((key) => {
8
- isArray(item[key]) && traverse(item[key], handler);
4
+ function traverse(target, handler, keys = "children", parent) {
5
+ function stop() {
6
+ throw "silence break traverse";
7
+ }
8
+ try {
9
+ arrayed(target).forEach((item) => {
10
+ handler(item, stop, parent);
11
+ arrayed(keys).forEach((key) => {
12
+ isArray(item[key]) && traverse(item[key], handler, keys, item);
13
+ });
9
14
  });
10
- });
15
+ } catch (err) {
16
+ if (err === "silence break traverse")
17
+ return;
18
+ throw err;
19
+ }
11
20
  }
12
21
  function safeComponentRegister(app, component, cName = component.name, scheduler) {
13
22
  if (!cName)
@@ -84,5 +93,6 @@ const getStringWidth = /* @__PURE__ */ useMemoize(function(str) {
84
93
  return width + 6;
85
94
  }, 0);
86
95
  });
96
+ const DMZ = Object.seal(/* @__PURE__ */ Object.create(null));
87
97
 
88
- export { arrayed, generateTimeFormat, getStringWidth, safeComponentRegister, traverse, uuidGenerator };
98
+ export { DMZ, arrayed, generateTimeFormat, getStringWidth, safeComponentRegister, traverse, uuidGenerator };
@@ -0,0 +1,139 @@
1
+ type FixedSizeArray<T extends number, U> = T extends 0
2
+ ? void[]
3
+ : ReadonlyArray<U> & {
4
+ 0: U;
5
+ length: T;
6
+ };
7
+ type Measure<T extends number> = T extends 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 ? T : never;
8
+ type Append<T extends any[], U> = {
9
+ 0: [U];
10
+ 1: [T[0], U];
11
+ 2: [T[0], T[1], U];
12
+ 3: [T[0], T[1], T[2], U];
13
+ 4: [T[0], T[1], T[2], T[3], U];
14
+ 5: [T[0], T[1], T[2], T[3], T[4], U];
15
+ 6: [T[0], T[1], T[2], T[3], T[4], T[5], U];
16
+ 7: [T[0], T[1], T[2], T[3], T[4], T[5], T[6], U];
17
+ 8: [T[0], T[1], T[2], T[3], T[4], T[5], T[6], T[7], U];
18
+ }[Measure<T['length']>];
19
+ type AsArray<T> = T extends any[] ? T : [T];
20
+
21
+ declare class UnsetAdditionalOptions {
22
+ _UnsetAdditionalOptions: true;
23
+ }
24
+ type IfSet<X> = X extends UnsetAdditionalOptions ? {} : X;
25
+
26
+ type Callback<E, T> = (error: E | null, result?: T) => void;
27
+ type InnerCallback<E, T> = (error?: E | null | false, result?: T) => void;
28
+
29
+ type FullTap = Tap & {
30
+ type: 'sync' | 'async' | 'promise';
31
+ fn: Function;
32
+ };
33
+
34
+ type Tap = TapOptions & {
35
+ name: string;
36
+ };
37
+
38
+ type TapOptions = {
39
+ before?: string;
40
+ stage?: number;
41
+ };
42
+
43
+ interface HookInterceptor<T, R, AdditionalOptions = UnsetAdditionalOptions> {
44
+ name?: string;
45
+ tap?: (tap: FullTap & IfSet<AdditionalOptions>) => void;
46
+ call?: (...args: any[]) => void;
47
+ loop?: (...args: any[]) => void;
48
+ error?: (err: Error) => void;
49
+ result?: (result: R) => void;
50
+ done?: () => void;
51
+ register?: (tap: FullTap & IfSet<AdditionalOptions>) => FullTap & IfSet<AdditionalOptions>;
52
+ }
53
+
54
+ type ArgumentNames<T extends any[]> = FixedSizeArray<T['length'], string>;
55
+
56
+ declare class Hook<T, R, AdditionalOptions = UnsetAdditionalOptions> {
57
+ constructor(args?: ArgumentNames<AsArray<T>>, name?: string);
58
+ name: string | undefined;
59
+ taps: FullTap[];
60
+ intercept(interceptor: HookInterceptor<T, R, AdditionalOptions>): void;
61
+ isUsed(): boolean;
62
+ callAsync(...args: Append<AsArray<T>, Callback<Error, R>>): void;
63
+ promise(...args: AsArray<T>): Promise<R>;
64
+ tap(options: string | (Tap & IfSet<AdditionalOptions>), fn: (...args: AsArray<T>) => R): void;
65
+ withOptions(options: TapOptions & IfSet<AdditionalOptions>): Omit<this, 'call' | 'callAsync' | 'promise'>;
66
+ }
67
+
68
+ export class SyncHook<T, R = void, AdditionalOptions = UnsetAdditionalOptions> extends Hook<T, R, AdditionalOptions> {
69
+ call(...args: AsArray<T>): R;
70
+ }
71
+
72
+ export class SyncBailHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends SyncHook<T, R, AdditionalOptions> {}
73
+ export class SyncLoopHook<T, AdditionalOptions = UnsetAdditionalOptions> extends SyncHook<T, void, AdditionalOptions> {}
74
+ export class SyncWaterfallHook<T, AdditionalOptions = UnsetAdditionalOptions> extends SyncHook<
75
+ T,
76
+ AsArray<T>[0],
77
+ AdditionalOptions
78
+ > {}
79
+
80
+ declare class AsyncHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends Hook<T, R, AdditionalOptions> {
81
+ tapAsync(
82
+ options: string | (Tap & IfSet<AdditionalOptions>),
83
+ fn: (...args: Append<AsArray<T>, InnerCallback<Error, R>>) => void
84
+ ): void;
85
+ tapPromise(options: string | (Tap & IfSet<AdditionalOptions>), fn: (...args: AsArray<T>) => Promise<R>): void;
86
+ }
87
+
88
+ export class AsyncParallelHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
89
+ T,
90
+ void,
91
+ AdditionalOptions
92
+ > {}
93
+ export class AsyncParallelBailHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
94
+ T,
95
+ R,
96
+ AdditionalOptions
97
+ > {}
98
+ export class AsyncSeriesHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
99
+ T,
100
+ void,
101
+ AdditionalOptions
102
+ > {}
103
+ export class AsyncSeriesBailHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
104
+ T,
105
+ R,
106
+ AdditionalOptions
107
+ > {}
108
+ export class AsyncSeriesLoopHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
109
+ T,
110
+ void,
111
+ AdditionalOptions
112
+ > {}
113
+ export class AsyncSeriesWaterfallHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
114
+ T,
115
+ AsArray<T>[0],
116
+ AdditionalOptions
117
+ > {}
118
+
119
+ type HookFactory<H> = (key: any, hook?: H) => H;
120
+
121
+ interface HookMapInterceptor<H> {
122
+ factory?: HookFactory<H>;
123
+ }
124
+
125
+ export class HookMap<H> {
126
+ constructor(factory: HookFactory<H>, name?: string);
127
+ name: string | undefined;
128
+ get(key: any): H | undefined;
129
+ for(key: any): H;
130
+ intercept(interceptor: HookMapInterceptor<H>): void;
131
+ }
132
+
133
+ export class MultiHook<H> {
134
+ constructor(hooks: H[], name?: string);
135
+ name: string | undefined;
136
+ tap(options: string | Tap, fn?: Function): void;
137
+ tapAsync(options: string | Tap, fn?: Function): void;
138
+ tapPromise(options: string | Tap, fn?: Function): void;
139
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.1.23-beta.1",
3
+ "version": "3.1.23-beta.12",
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": "fe4dfdbb4c163d58aea824cf82e24a7d3df115c2"
69
+ "gitHead": "f819538beb54e1a0cac4986b22568eadb3331662"
70
70
  }
@@ -1 +0,0 @@
1
- export declare function inputRendererPlugins(): import("../../../../../../../es/components/iho-table").TablePlugin;