cnhis-design-vue 3.1.23-beta.2 → 3.1.23-beta.4

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 (55) hide show
  1. package/README.md +123 -123
  2. package/es/components/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +8 -2
  3. package/es/components/big-table/src/components/edit-form/useCommon.d.ts +4 -0
  4. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  5. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  6. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  7. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  8. package/es/components/fabric-chart/src/hooks/useEvent2.js +8 -4
  9. package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
  10. package/es/components/form-config/index.d.ts +6 -0
  11. package/es/components/form-config/src/FormConfig.vue.d.ts +6 -0
  12. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +6 -0
  13. package/es/components/form-render/src/components/renderer/search.d.ts +13 -1
  14. package/es/components/form-render/src/components/renderer/searchCascader.d.ts +63 -0
  15. package/es/components/form-render/src/types/fieldItem.d.ts +6 -0
  16. package/es/components/form-render/src/utils/schema2.js +1 -4
  17. package/es/components/iho-table/index.d.ts +100 -270
  18. package/es/components/iho-table/src/IhoTable.vue.d.ts +100 -270
  19. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +2 -2
  20. package/es/components/iho-table/src/plugins/index.js +1 -1
  21. package/es/components/iho-table/src/plugins/index2.js +1 -1
  22. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/index.d.ts +1 -1
  23. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/index.js +1 -1
  24. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.d.ts +1 -0
  25. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/{inputRendererPlugins.js → inputRendererPlugin.js} +2 -2
  26. package/es/components/iho-table/src/plugins/rendererPlugins/index.js +1 -1
  27. package/es/components/index.css +1 -1
  28. package/es/components/search-cascader/index.d.ts +133 -0
  29. package/es/components/search-cascader/index.js +1 -0
  30. package/es/components/search-cascader/index2.js +10 -0
  31. package/es/components/search-cascader/src/SearchCascader.js +189 -0
  32. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +135 -0
  33. package/es/components/search-cascader/src/components/SearchMenu.d.ts +36 -0
  34. package/es/components/search-cascader/src/components/SearchMenu.js +125 -0
  35. package/es/components/search-cascader/src/components/index.d.ts +1 -0
  36. package/es/components/search-cascader/src/components/index.js +1 -0
  37. package/es/components/search-cascader/src/constants/index.d.ts +3 -0
  38. package/es/components/search-cascader/src/constants/index.js +1 -0
  39. package/es/components/search-cascader/src/constants/index2.js +3 -0
  40. package/es/components/search-cascader/src/hooks/index.d.ts +1 -0
  41. package/es/components/search-cascader/src/hooks/index.js +1 -0
  42. package/es/components/search-cascader/src/hooks/useCssVariable.d.ts +3 -0
  43. package/es/components/search-cascader/src/hooks/useCssVariable.js +1 -0
  44. package/es/components/search-cascader/src/hooks/useCssVariable2.js +7 -0
  45. package/es/components/search-cascader/src/utils/index.d.ts +2 -0
  46. package/es/components/search-cascader/src/utils/index.js +1 -0
  47. package/es/components/search-cascader/src/utils/index2.js +11 -0
  48. package/es/components/search-cascader/style/index.css +1 -0
  49. package/es/components/shortcut-setter/index.d.ts +6 -0
  50. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +6 -0
  51. package/es/shared/utils/index.d.ts +1 -1
  52. package/es/shared/utils/index2.js +14 -5
  53. package/es/shared/utils/tapable/index.d.ts +139 -0
  54. package/package.json +2 -2
  55. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugins.d.ts +0 -1
@@ -0,0 +1,189 @@
1
+ import { defineComponent, ref, computed, provide, nextTick, openBlock, createBlock, unref, normalizeStyle, withCtx, createVNode, isRef, createElementVNode, renderSlot } from 'vue';
2
+ import { uuidGenerator } from '../../../shared/utils/index2.js';
3
+ import { onClickOutside, useDebounceFn } from '@vueuse/core';
4
+ import { isString, isArray, isFunction } from 'lodash-es';
5
+ import { NPopover, NInput } from 'naive-ui';
6
+ import { InjectionSearchCascaderLoadingNode } from './constants/index2.js';
7
+ import { useCssVariable } from './hooks/useCssVariable2.js';
8
+ import { getParentNodeList } from './utils/index2.js';
9
+ import { SearchMenu } from './components/SearchMenu.js';
10
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.js';
11
+
12
+ const _hoisted_1 = ["id"];
13
+ const _sfc_main = /* @__PURE__ */ defineComponent({
14
+ __name: "SearchCascader",
15
+ props: {
16
+ value: { type: [String, Array] },
17
+ clearable: { type: Boolean, default: false },
18
+ childKey: { type: String, default: "children" },
19
+ placeholder: { type: String, default: "\u8BF7\u9009\u62E9" },
20
+ fetchOptions: { type: Function },
21
+ beforeSetValue: { type: Function }
22
+ },
23
+ emits: ["update:value"],
24
+ setup(__props, { expose, emit: emits }) {
25
+ const props = __props;
26
+ function emitValue(value) {
27
+ Promise.resolve(isFunction(props.beforeSetValue) ? props.beforeSetValue(value) : value).then((result) => {
28
+ emits("update:value", result);
29
+ }, () => {
30
+ });
31
+ }
32
+ function onClear() {
33
+ emitValue([]);
34
+ }
35
+ const cssVariable = useCssVariable();
36
+ const optionsRef = ref([{}]);
37
+ const uuid = uuidGenerator();
38
+ const show = ref(false);
39
+ const patternContent = ref("");
40
+ const displayValue = computed({
41
+ get() {
42
+ if (show.value)
43
+ return patternContent.value;
44
+ if (isString(props.value))
45
+ return props.value;
46
+ if (isArray(props.value))
47
+ return arrayOptionsToString(props.value);
48
+ return "";
49
+ function arrayOptionsToString(optionList) {
50
+ return optionList.reduce((res, item, idx) => {
51
+ if (idx === 0)
52
+ return item.label;
53
+ return res + " / " + item.label;
54
+ }, "");
55
+ }
56
+ },
57
+ set(value) {
58
+ patternContent.value = value;
59
+ search(void 0, value);
60
+ }
61
+ });
62
+ function openMenu() {
63
+ if (show.value)
64
+ return;
65
+ optionsRef.value = [];
66
+ show.value = true;
67
+ patternContent.value = "";
68
+ search();
69
+ }
70
+ async function closeMenu() {
71
+ var _a;
72
+ show.value = false;
73
+ (_a = inputRef.value) == null ? void 0 : _a.blur();
74
+ }
75
+ const inputRef = ref();
76
+ onClickOutside(inputRef, (evt) => {
77
+ var _a;
78
+ if (!show.value)
79
+ return;
80
+ if (!evt.target)
81
+ return closeMenu();
82
+ if (isInPopper(evt.target)) {
83
+ (_a = inputRef.value) == null ? void 0 : _a.focus();
84
+ return;
85
+ }
86
+ closeMenu();
87
+ function isInPopper(targetEle) {
88
+ let result = false;
89
+ let current = targetEle;
90
+ while (current) {
91
+ if (current.id === uuid) {
92
+ result = true;
93
+ break;
94
+ }
95
+ current = current.parentElement;
96
+ }
97
+ return result;
98
+ }
99
+ });
100
+ const popoverRef = ref();
101
+ const currentNode = ref();
102
+ const loadingNode = ref(null);
103
+ provide(InjectionSearchCascaderLoadingNode, loadingNode);
104
+ const search = useDebounceFn(async (node, keyword) => {
105
+ var _a;
106
+ if (!isFunction(props.fetchOptions)) {
107
+ emitValue(node ? [node] : []);
108
+ return closeMenu();
109
+ }
110
+ loadingNode.value = node;
111
+ try {
112
+ const options = await props.fetchOptions(node, keyword);
113
+ if (!isValidOption(options)) {
114
+ if (!node)
115
+ return;
116
+ node.isLeaf = true;
117
+ emitValue(getParentNodeList(node));
118
+ return closeMenu();
119
+ }
120
+ if (node) {
121
+ node[props.childKey] = options.map((option) => enrichOption(option, node));
122
+ } else {
123
+ optionsRef.value = options;
124
+ }
125
+ currentNode.value = node;
126
+ } finally {
127
+ loadingNode.value = null;
128
+ await nextTick();
129
+ (_a = popoverRef.value) == null ? void 0 : _a.syncPosition();
130
+ }
131
+ function enrichOption(option, parent) {
132
+ return { ...option, parent };
133
+ }
134
+ function isValidOption(options) {
135
+ return isArray(options) && !!options.length;
136
+ }
137
+ }, 400);
138
+ expose({
139
+ setOptions(options) {
140
+ optionsRef.value = options;
141
+ }
142
+ });
143
+ return (_ctx, _cache) => {
144
+ return openBlock(), createBlock(unref(NPopover), {
145
+ class: "search-cascader",
146
+ trigger: "manual",
147
+ show: show.value,
148
+ "onUpdate:show": _cache[1] || (_cache[1] = ($event) => show.value = $event),
149
+ "show-arrow": false,
150
+ placement: "bottom-start",
151
+ style: normalizeStyle(unref(cssVariable)),
152
+ width: optionsRef.value.length ? void 0 : "trigger",
153
+ ref_key: "popoverRef",
154
+ ref: popoverRef
155
+ }, {
156
+ trigger: withCtx(() => [
157
+ createVNode(unref(NInput), {
158
+ placeholder: __props.placeholder,
159
+ clearable: __props.clearable,
160
+ onClear,
161
+ value: unref(displayValue),
162
+ "onUpdate:value": _cache[0] || (_cache[0] = ($event) => isRef(displayValue) ? displayValue.value = $event : null),
163
+ ref_key: "inputRef",
164
+ ref: inputRef,
165
+ onFocus: openMenu
166
+ }, null, 8, ["placeholder", "clearable", "value"])
167
+ ]),
168
+ default: withCtx(() => [
169
+ createElementVNode("section", { id: unref(uuid) }, [
170
+ createVNode(unref(SearchMenu), {
171
+ options: optionsRef.value,
172
+ onNodeClick: unref(search),
173
+ "current-node": currentNode.value
174
+ }, {
175
+ empty: withCtx(() => [
176
+ renderSlot(_ctx.$slots, "empty")
177
+ ]),
178
+ _: 3
179
+ }, 8, ["options", "onNodeClick", "current-node"])
180
+ ], 8, _hoisted_1)
181
+ ]),
182
+ _: 3
183
+ }, 8, ["show", "style", "width"]);
184
+ };
185
+ }
186
+ });
187
+ var script = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "SearchCascader.vue"]]);
188
+
189
+ export { script as default };
@@ -0,0 +1,135 @@
1
+ import { AnyObject, Func, Nullable } from '../../../../es/shared/types';
2
+ import { PropType } from 'vue';
3
+ declare type ValueType = string | AnyObject[];
4
+ declare const _default: import("vue").DefineComponent<{
5
+ value: {
6
+ type: PropType<ValueType>;
7
+ };
8
+ clearable: {
9
+ type: BooleanConstructor;
10
+ default: boolean;
11
+ };
12
+ childKey: {
13
+ type: StringConstructor;
14
+ default: string;
15
+ };
16
+ placeholder: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ fetchOptions: {
21
+ type: PropType<Func<any[], any>>;
22
+ };
23
+ beforeSetValue: {
24
+ type: PropType<(value: ValueType) => void | ValueType | Promise<ValueType>>;
25
+ };
26
+ }, {
27
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
28
+ value: {
29
+ type: PropType<ValueType>;
30
+ };
31
+ clearable: {
32
+ type: BooleanConstructor;
33
+ default: boolean;
34
+ };
35
+ childKey: {
36
+ type: StringConstructor;
37
+ default: string;
38
+ };
39
+ placeholder: {
40
+ type: StringConstructor;
41
+ default: string;
42
+ };
43
+ fetchOptions: {
44
+ type: PropType<Func<any[], any>>;
45
+ };
46
+ beforeSetValue: {
47
+ type: PropType<(value: ValueType) => void | ValueType | Promise<ValueType>>;
48
+ };
49
+ }>> & {
50
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
51
+ }>>;
52
+ emits: (event: "update:value", ...args: any[]) => void;
53
+ emitValue: (value: ValueType) => void;
54
+ onClear: () => void;
55
+ cssVariable: {
56
+ '--menu-width': number;
57
+ };
58
+ optionsRef: import("vue").Ref<AnyObject[]>;
59
+ uuid: string;
60
+ show: import("vue").Ref<boolean>;
61
+ patternContent: import("vue").Ref<string>;
62
+ displayValue: import("vue").WritableComputedRef<string>;
63
+ openMenu: () => void;
64
+ closeMenu: () => Promise<void>;
65
+ inputRef: import("vue").Ref<any>;
66
+ popoverRef: import("vue").Ref<any>;
67
+ currentNode: import("vue").Ref<AnyObject | undefined>;
68
+ loadingNode: import("vue").Ref<Nullable<AnyObject>>;
69
+ search: (node?: AnyObject, keyword?: string) => Promise<void>;
70
+ NInput: any;
71
+ NPopover: any;
72
+ SearchMenu: import("vue").DefineComponent<{
73
+ childKey: {
74
+ type: StringConstructor;
75
+ default: string;
76
+ };
77
+ options: {
78
+ type: PropType<AnyObject[]>;
79
+ default: () => never[];
80
+ };
81
+ onNodeClick: {
82
+ type: PropType<Func<any[], any>>;
83
+ };
84
+ currentNode: {
85
+ type: PropType<AnyObject>;
86
+ };
87
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
88
+ childKey: {
89
+ type: StringConstructor;
90
+ default: string;
91
+ };
92
+ options: {
93
+ type: PropType<AnyObject[]>;
94
+ default: () => never[];
95
+ };
96
+ onNodeClick: {
97
+ type: PropType<Func<any[], any>>;
98
+ };
99
+ currentNode: {
100
+ type: PropType<AnyObject>;
101
+ };
102
+ }>>, {
103
+ options: AnyObject[];
104
+ childKey: string;
105
+ }>;
106
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
107
+ value: {
108
+ type: PropType<ValueType>;
109
+ };
110
+ clearable: {
111
+ type: BooleanConstructor;
112
+ default: boolean;
113
+ };
114
+ childKey: {
115
+ type: StringConstructor;
116
+ default: string;
117
+ };
118
+ placeholder: {
119
+ type: StringConstructor;
120
+ default: string;
121
+ };
122
+ fetchOptions: {
123
+ type: PropType<Func<any[], any>>;
124
+ };
125
+ beforeSetValue: {
126
+ type: PropType<(value: ValueType) => void | ValueType | Promise<ValueType>>;
127
+ };
128
+ }>> & {
129
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
130
+ }, {
131
+ placeholder: string;
132
+ clearable: boolean;
133
+ childKey: string;
134
+ }>;
135
+ export default _default;
@@ -0,0 +1,36 @@
1
+ import { AnyObject, Func } from '../../../../../es/shared/types';
2
+ import { PropType } from 'vue';
3
+ export declare const SearchMenu: import("vue").DefineComponent<{
4
+ childKey: {
5
+ type: StringConstructor;
6
+ default: string;
7
+ };
8
+ options: {
9
+ type: PropType<AnyObject[]>;
10
+ default: () => never[];
11
+ };
12
+ onNodeClick: {
13
+ type: PropType<Func<any[], any>>;
14
+ };
15
+ currentNode: {
16
+ type: PropType<AnyObject>;
17
+ };
18
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
19
+ childKey: {
20
+ type: StringConstructor;
21
+ default: string;
22
+ };
23
+ options: {
24
+ type: PropType<AnyObject[]>;
25
+ default: () => never[];
26
+ };
27
+ onNodeClick: {
28
+ type: PropType<Func<any[], any>>;
29
+ };
30
+ currentNode: {
31
+ type: PropType<AnyObject>;
32
+ };
33
+ }>>, {
34
+ options: AnyObject[];
35
+ childKey: string;
36
+ }>;
@@ -0,0 +1,125 @@
1
+ import { defineComponent, computed, inject, createVNode, ref, createTextVNode } from 'vue';
2
+ import { traverse } from '../../../../shared/utils/index2.js';
3
+ import { Reload, ChevronForward } from '@vicons/ionicons5';
4
+ import { useVirtualList } from '@vueuse/core';
5
+ import { isArray, isFunction } from 'lodash-es';
6
+ import { InjectionSearchCascaderLoadingNode } from '../constants/index2.js';
7
+
8
+ const SearchMenuList = defineComponent({
9
+ props: {
10
+ options: {
11
+ type: Array,
12
+ default: () => []
13
+ },
14
+ activeNodes: {
15
+ type: Array,
16
+ default: () => []
17
+ }
18
+ },
19
+ emits: ["nodeClick"],
20
+ setup(props, {
21
+ emit
22
+ }) {
23
+ const optionsRef = computed(() => props.options);
24
+ const {
25
+ list,
26
+ containerProps,
27
+ wrapperProps
28
+ } = useVirtualList(optionsRef, {
29
+ itemHeight: 32,
30
+ overscan: 5
31
+ });
32
+ const loadingNode = inject(InjectionSearchCascaderLoadingNode);
33
+ return () => {
34
+ return createVNode("div", {
35
+ "class": "search-cascader__optionWrapper",
36
+ "ref": containerProps.ref,
37
+ "style": containerProps.style,
38
+ "onScroll": containerProps.onScroll
39
+ }, [createVNode("div", {
40
+ "style": wrapperProps.value.style
41
+ }, [list.value.map((item) => {
42
+ var _a;
43
+ return createVNode("div", {
44
+ "class": ["search-cascader__option", {
45
+ "search-cascader__option--active": (_a = props.activeNodes) == null ? void 0 : _a.includes(item.data)
46
+ }],
47
+ "onClick": () => emit("nodeClick", item.data),
48
+ "title": item.data.label
49
+ }, [createVNode("div", {
50
+ "class": "search-cascader__optionText"
51
+ }, [item.data.label]), loadingNode.value === item.data ? createVNode(Reload, {
52
+ "class": "rotate"
53
+ }, null) : item.data.isLeaf ? null : createVNode(ChevronForward, null, null)]);
54
+ })])]);
55
+ };
56
+ }
57
+ });
58
+ const SearchMenu = defineComponent({
59
+ props: {
60
+ childKey: {
61
+ type: String,
62
+ default: "children"
63
+ },
64
+ options: {
65
+ type: Array,
66
+ default: () => []
67
+ },
68
+ onNodeClick: {
69
+ type: Function
70
+ },
71
+ currentNode: {
72
+ type: Object
73
+ }
74
+ },
75
+ setup(props, {
76
+ slots
77
+ }) {
78
+ const activeNodes = ref([]);
79
+ function renderList(options) {
80
+ return createVNode(SearchMenuList, {
81
+ "activeNodes": activeNodes.value,
82
+ "onNodeClick": props.onNodeClick,
83
+ "options": options
84
+ }, null);
85
+ }
86
+ function renderEmpty() {
87
+ return createVNode("section", {
88
+ "class": "search-cascader__emptyWrapper"
89
+ }, [isFunction(slots.empty) ? slots.empty() : createVNode("section", null, [createTextVNode("empty")])]);
90
+ }
91
+ function isNodeExpand(node) {
92
+ let result = false;
93
+ traverse(node, (n, stop) => {
94
+ if (n !== props.currentNode)
95
+ return;
96
+ result = true;
97
+ stop();
98
+ }, ["children"]);
99
+ return result;
100
+ }
101
+ function getRenderNodeList() {
102
+ if (!isArray(props.options) || !props.currentNode)
103
+ return [];
104
+ const result = [props.options];
105
+ let _options = props.options;
106
+ activeNodes.value.length = 0;
107
+ while (isArray(_options)) {
108
+ const expandNode = _options.find(isNodeExpand);
109
+ if (!expandNode)
110
+ break;
111
+ activeNodes.value.push(expandNode);
112
+ _options = expandNode[props.childKey];
113
+ result.push(_options);
114
+ }
115
+ return result;
116
+ }
117
+ return () => {
118
+ return createVNode("section", {
119
+ "class": "search-cascader__menuWrapper"
120
+ }, [!isArray(props.options) || !props.options.length ? renderEmpty() : !props.currentNode ? renderList(props.options) : getRenderNodeList().map(renderList)]);
121
+ };
122
+ }
123
+ });
124
+
125
+ export { SearchMenu };
@@ -0,0 +1 @@
1
+ export * from './SearchMenu';
@@ -0,0 +1 @@
1
+ export { SearchMenu } from './SearchMenu.js';
@@ -0,0 +1,3 @@
1
+ import { AnyObject, Nullable } from '../../../../../es/shared/types';
2
+ import { InjectionKey, Ref } from 'vue';
3
+ export declare const InjectionSearchCascaderLoadingNode: InjectionKey<Ref<Nullable<AnyObject>>>;
@@ -0,0 +1 @@
1
+ export { InjectionSearchCascaderLoadingNode } from './index2.js';
@@ -0,0 +1,3 @@
1
+ const InjectionSearchCascaderLoadingNode = Symbol("InjectionSearchCascaderLoadingNode ");
2
+
3
+ export { InjectionSearchCascaderLoadingNode };
@@ -0,0 +1 @@
1
+ export * from './useCssVariable';
@@ -0,0 +1 @@
1
+ export { useCssVariable } from './useCssVariable2.js';
@@ -0,0 +1,3 @@
1
+ export declare function useCssVariable(): {
2
+ '--menu-width': number;
3
+ };
@@ -0,0 +1 @@
1
+ export { useCssVariable } from './useCssVariable2.js';
@@ -0,0 +1,7 @@
1
+ function useCssVariable() {
2
+ return {
3
+ "--menu-width": 150
4
+ };
5
+ }
6
+
7
+ export { useCssVariable };
@@ -0,0 +1,2 @@
1
+ import { AnyObject } from '../../../../../es/shared/types';
2
+ export declare function getParentNodeList(node: AnyObject): never[];
@@ -0,0 +1 @@
1
+ export { getParentNodeList } from './index2.js';
@@ -0,0 +1,11 @@
1
+ function getParentNodeList(node) {
2
+ const result = [];
3
+ let currentNode = node;
4
+ while (currentNode) {
5
+ result.unshift(currentNode);
6
+ currentNode = currentNode.parent;
7
+ }
8
+ return result;
9
+ }
10
+
11
+ export { getParentNodeList };
@@ -0,0 +1 @@
1
+ .search-cascader__menuWrapper{display:flex;flex-wrap:nowrap;margin:-8px -14px}.search-cascader__option{align-items:center;border-radius:4px;box-sizing:border-box;display:flex;height:32px;justify-content:space-between;padding:0 8px 0 16px;width:100%}.search-cascader__option--active{background:#f8f8f8}.search-cascader__option:hover{background:#f5f5f5;cursor:pointer}.search-cascader__optionWrapper{background:#fff;height:256px;overflow-x:auto;width:calc(var(--menu-width)*1px)}.search-cascader__optionWrapper:not(:last-of-type){border:solid #e5e5e5;border-width:0 1px 0 0}.search-cascader__optionText{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:calc(100% - 20px)}.search-cascader__option svg{color:#bfbfbf;flex-shrink:0;font-size:12px;width:20px}.search-cascader__option svg.rotate{animation:rotate 1s linear infinite}.search-cascader__emptyWrapper{align-items:center;background:#fff;box-sizing:border-box;display:flex;height:200px;justify-content:center;padding:16px;width:100%}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(1turn)}}
@@ -100,6 +100,12 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
100
100
  search_key?: string[] | undefined;
101
101
  type?: string | undefined;
102
102
  value_key?: string | undefined;
103
+ level_key?: string | undefined;
104
+ link_key?: string | undefined;
105
+ link_key_split?: string | undefined;
106
+ show_key?: string | undefined;
107
+ conObj?: import("../../../es/shared/types").AnyObject[] | undefined;
108
+ conObjFirstLevel?: import("../../../es/shared/types").AnyObject[] | undefined;
103
109
  } | undefined;
104
110
  open?: {
105
111
  value?: any;
@@ -102,6 +102,12 @@ declare const _default: import("vue").DefineComponent<{
102
102
  search_key?: string[] | undefined;
103
103
  type?: string | undefined;
104
104
  value_key?: string | undefined;
105
+ level_key?: string | undefined;
106
+ link_key?: string | undefined;
107
+ link_key_split?: string | undefined;
108
+ show_key?: string | undefined;
109
+ conObj?: import("../../../../es/shared/types").AnyObject[] | undefined;
110
+ conObjFirstLevel?: import("../../../../es/shared/types").AnyObject[] | undefined;
105
111
  } | undefined;
106
112
  open?: {
107
113
  value?: any;
@@ -1,6 +1,6 @@
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) => void, keys?: ArrayAble<string>): 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];
@@ -2,12 +2,21 @@ import { useMemoize } from '@vueuse/core';
2
2
  import { isArray, isString } from 'lodash-es';
3
3
 
4
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);
5
+ function stop() {
6
+ throw "silence break traverse";
7
+ }
8
+ try {
9
+ arrayed(target).forEach((item) => {
10
+ handler(item, stop);
11
+ arrayed(keys).forEach((key) => {
12
+ isArray(item[key]) && traverse(item[key], handler);
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)