cnhis-design-vue 3.1.53-beta.1 → 3.1.53-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.
- package/README.md +87 -87
- package/es/components/annotation-edit/src/AnnotationEdit.js +1 -1
- package/es/components/big-table/src/components/edit-form/edit-separate.vue.d.ts +4 -4
- package/es/components/big-table/src/hooks/useEdit.d.ts +4 -4
- package/es/components/big-table/src/hooks/useSeparateRow.d.ts +4 -4
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/button-print/src/utils/dialog.d.ts +2 -2
- package/es/components/button-print/src/utils/print.d.ts +14 -13
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +69 -6
- package/es/components/card-reader-sdk/src/cardReaderSDK.js +1 -1
- package/es/components/card-reader-sdk/src/types/index.d.ts +3 -3
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
- package/es/components/expand-field/src/components/form.vue2.js +1 -1
- package/es/components/form-config/index.d.ts +98 -26
- package/es/components/form-config/src/FormConfig.vue.d.ts +99 -27
- package/es/components/form-config/src/FormConfig.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +30 -6
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +48 -12
- package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -1
- package/es/components/form-render/index.d.ts +30 -6
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +31 -7
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +31 -7
- package/es/components/form-render/src/components/renderer/combination.js +1 -1
- package/es/components/form-render/src/components/renderer/inputNumber.d.ts +5 -5
- package/es/components/form-render/src/components/renderer/levelSearchCascader/index.d.ts +2 -4
- package/es/components/form-render/src/components/renderer/levelSearchCascader/index.js +1 -1
- package/es/components/form-render/src/components/renderer/searchCascade.d.ts +3 -3
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +4 -4
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/constants/index.d.ts +3 -2
- package/es/components/form-render/src/hooks/index.d.ts +0 -2
- package/es/components/form-render/src/hooks/index.js +1 -1
- package/es/components/form-render/src/hooks/useAnchor.d.ts +3 -3
- package/es/components/form-render/src/hooks/useCommonInjection.d.ts +2 -2
- package/es/components/form-render/src/hooks/useFieldListAdaptor.d.ts +2 -2
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +10 -2
- package/es/components/form-render/src/hooks/useFormContext.d.ts +3 -3
- package/es/components/form-render/src/hooks/useFormContext.js +1 -1
- package/es/components/form-render/src/hooks/useFormItemDeps.d.ts +3 -3
- package/es/components/form-render/src/hooks/useFormRenderLifeCycle.d.ts +9 -1
- package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +5 -5
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +3 -2
- package/es/components/form-render/src/types/index.d.ts +7 -14
- package/es/components/form-render/src/utils/index.d.ts +1 -2
- package/es/components/form-render/src/utils/index.js +1 -1
- package/es/components/form-render/src/utils/schema.d.ts +2 -2
- package/es/components/form-render/src/utils/schema.js +1 -1
- package/es/components/guide/src/renderer.js +1 -1
- package/es/components/iho-table/index.d.ts +39 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +40 -0
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
- package/es/components/iho-table/src/constants/index.d.ts +4 -1
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +2 -2
- package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +2 -2
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +2 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.d.ts +552 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue2.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +4 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +2 -2
- package/es/components/iho-table/src/types/index.d.ts +5 -2
- package/es/components/iho-table/src/types/pluginType.d.ts +3 -3
- package/es/components/index.d.ts +1 -0
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +97 -29
- package/es/components/info-header/src/InfoHeader.vue.d.ts +98 -30
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +9 -5
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +10 -6
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +41 -13
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +30 -6
- package/es/components/keyboard/src/Keyboard.vue2.js +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/search-cascader/index.d.ts +23 -3
- package/es/components/search-cascader/src/SearchCascader.vue.d.ts +24 -4
- package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
- package/es/components/search-cascader/src/components/ClearIcon.vue.js +1 -0
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
- package/es/components/shortcut-setter/index.d.ts +33 -9
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +34 -10
- package/es/components/steps-wheel/src/StepsWheel.vue2.js +1 -1
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +3 -0
- package/es/components/time-picker/src/TimePicker.vue2.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +4 -4
- package/es/shared/components/SlotRender/SlotRender.d.ts +5 -5
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/hooks/index.d.ts +3 -0
- package/es/shared/hooks/index.js +1 -1
- package/es/shared/hooks/selectHooks/index.d.ts +4 -0
- package/es/shared/hooks/selectHooks/index.js +1 -0
- package/es/shared/hooks/selectHooks/useOptionFiltered.d.ts +10 -0
- package/es/shared/hooks/selectHooks/useOptionFiltered.js +1 -0
- package/es/shared/hooks/selectHooks/useSearchContent.d.ts +6 -0
- package/es/shared/hooks/selectHooks/useSearchContent.js +1 -0
- package/es/shared/hooks/selectHooks/useSelectAllowModify.d.ts +23 -0
- package/es/shared/hooks/selectHooks/useSelectAllowModify.js +1 -0
- package/es/shared/hooks/selectHooks/useSelectRenders.d.ts +19 -0
- package/es/shared/hooks/selectHooks/useSelectRenders.js +1 -0
- package/es/shared/hooks/{useAsyncQueue.d.ts → useAsyncQueue/index.d.ts} +7 -15
- package/es/shared/hooks/useAsyncQueue/index.js +1 -0
- package/es/shared/hooks/useAsyncQueue/types.d.ts +20 -0
- package/es/shared/hooks/useAsyncQueue/types.js +1 -0
- package/es/shared/hooks/useDateTime.d.ts +2 -2
- package/es/shared/hooks/useFormRequest/index.d.ts +24 -0
- package/es/shared/hooks/useFormRequest/index.js +1 -0
- package/es/shared/hooks/useFormRequest/types.d.ts +39 -0
- package/es/shared/hooks/useFormRequest/types.js +1 -0
- package/es/shared/hooks/useLevelSearchCascader.d.ts +31 -0
- package/es/shared/hooks/useLevelSearchCascader.js +1 -0
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/index.d.ts +1 -1
- package/es/shared/utils/fabricjs/index.d.ts +6823 -0
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
- package/es/components/form-render/src/components/renderer/levelSearchCascader/utils.d.ts +0 -23
- package/es/components/form-render/src/components/renderer/levelSearchCascader/utils.js +0 -1
- package/es/components/form-render/src/hooks/useFormAsyncQueue.d.ts +0 -16
- package/es/components/form-render/src/hooks/useFormAsyncQueue.js +0 -1
- package/es/components/form-render/src/hooks/useFormRequest.d.ts +0 -26
- package/es/components/form-render/src/hooks/useFormRequest.js +0 -1
- package/es/shared/hooks/useAsyncQueue.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIYAAABzBAMAAACvCGcI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Ujd12f9vmwy9b0E3FEpX7UFh7f+33y1bLvW5xTsx1d3i/o0W1zL1+/8BWv7YPi8tZWoAAAAASUVORK5CYII=";export{A as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE0AAABNBAMAAAARJ/SDAAAABGdBTUEAALGPC/
|
|
1
|
+
var A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE0AAABNBAMAAAARJ/SDAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAkUExURdTU1M3NzaKgoNLS0svLy/7+/q2srPTy8r26uuXk5IWBgWBbXJSY7MEAAAAFdFJOU/4B+61hFV6AswAABF5JREFUSMd9lk1v20YQhjewY5M5ybB/QMAWQqOT3PSSm2T74lsvmzVvgYCyTHoRXLBb5kQYMM34REBWafoUGAiKUJciR/HPdWb2Q/xQPCaEJfn4nd3Z4c6wg7adnY4Z23l9Nm0/HrDW7dFrt2SMuWW588sT3ClRZG65M/0eN7EUkfl0OzfOWdvy423cpIsBOO1zh32MsUWPO3LNtFhOl7rZ7XJjDXXtuM0przld2zwb7g37jrnHTW6QN5wmGZm++7PJNeQya01BxdHs8g6W6WeLDWflnLQrpwWJO2pgYZjCD2CpDdSu4Qbag5OmQUoWBmn2zu6e4YzbNAgQCfEXfpKGY+SOdGwdIMAQDEA4DI3jO8UNdOiyNGhbYoKgOO3WCbtctnGM3CbAbTC0S3mGnJ6egzGbeTOyIJgNMTja8x1yenqIhcnVUJHeT5nm1ASBOzduw9CNBICeN/SSpbhP1aaAiDsF7o11u885/xWwmfcORvw+3OQCcHq1WfoJX/JL1Iu4Ak2snw0YLENPT730gXvF1dBO8G7ADk0+3cAbCeyVN7qGkURBdEy51eAA8cuC8wdvtOSiLHGyZiHATfRy33OtdznylmrEuc3CCTvXy7jm2v56fIzM+D7VCyYuRw40RIyTeqs4CVPgF3ohwJnwAVZICfQFcbFE0A8TFeix5jKIbBw7bgx6FXC+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0/kVLleRLHQXdldM28hDYcY5/FZl0MmzleB07SSIxPe+e0F8pzMpA3wwsFrqShPkmHV9J8/nUEJI/ja1EO9Xl4cLHKvFPLPHzlavZVo1dx+Orl/kEqKbFWb1+93PX9j1Ua/nvwH1oZqoXVsU68AAAAAElFTkSuQmCC";export{A as default};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { AnyObject,
|
|
1
|
+
import { AnyObject, AnyFn } from '../../../../es/shared/types';
|
|
2
2
|
import { PropType } from 'vue';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
value: {
|
|
5
5
|
type: (NumberConstructor | StringConstructor)[];
|
|
6
6
|
};
|
|
7
7
|
onChange: {
|
|
8
|
-
type: PropType<
|
|
8
|
+
type: PropType<AnyFn<any[], any>>;
|
|
9
9
|
default: () => {};
|
|
10
10
|
};
|
|
11
11
|
prefix: {
|
|
@@ -35,7 +35,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
35
35
|
type: (NumberConstructor | StringConstructor)[];
|
|
36
36
|
};
|
|
37
37
|
onChange: {
|
|
38
|
-
type: PropType<
|
|
38
|
+
type: PropType<AnyFn<any[], any>>;
|
|
39
39
|
default: () => {};
|
|
40
40
|
};
|
|
41
41
|
prefix: {
|
|
@@ -61,7 +61,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
61
61
|
default: string;
|
|
62
62
|
};
|
|
63
63
|
}>>, {
|
|
64
|
-
onChange:
|
|
64
|
+
onChange: AnyFn<any[], any>;
|
|
65
65
|
slashSymbol: string;
|
|
66
66
|
}>;
|
|
67
67
|
export default _default;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnyFn } from '../../../../es/shared/types';
|
|
2
2
|
import { Component, PropType } from 'vue';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
renderer: {
|
|
5
|
-
type: PropType<string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> |
|
|
5
|
+
type: PropType<string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | AnyFn<any[], any>>;
|
|
6
6
|
required: true;
|
|
7
7
|
};
|
|
8
8
|
rootSlots: {
|
|
9
|
-
type: PropType<Record<string,
|
|
9
|
+
type: PropType<Record<string, AnyFn<any[], any>>>;
|
|
10
10
|
};
|
|
11
11
|
}, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
12
12
|
renderer: {
|
|
13
|
-
type: PropType<string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> |
|
|
13
|
+
type: PropType<string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | AnyFn<any[], any>>;
|
|
14
14
|
required: true;
|
|
15
15
|
};
|
|
16
16
|
rootSlots: {
|
|
17
|
-
type: PropType<Record<string,
|
|
17
|
+
type: PropType<Record<string, AnyFn<any[], any>>>;
|
|
18
18
|
};
|
|
19
19
|
}>>, {}>;
|
|
20
20
|
export default _default;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
declare const draggableComponent: import('vue').DefineComponent<
|
|
2
|
+
{
|
|
3
|
+
list: {
|
|
4
|
+
type: ArrayConstructor;
|
|
5
|
+
required: boolean;
|
|
6
|
+
default: any;
|
|
7
|
+
};
|
|
8
|
+
modelValue: {
|
|
9
|
+
type: ArrayConstructor;
|
|
10
|
+
required: boolean;
|
|
11
|
+
default: any;
|
|
12
|
+
};
|
|
13
|
+
itemKey: {
|
|
14
|
+
type: (FunctionConstructor | StringConstructor)[];
|
|
15
|
+
required: boolean;
|
|
16
|
+
};
|
|
17
|
+
clone: {
|
|
18
|
+
type: FunctionConstructor;
|
|
19
|
+
default: (original: any) => any;
|
|
20
|
+
};
|
|
21
|
+
tag: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
move: {
|
|
26
|
+
type: FunctionConstructor;
|
|
27
|
+
default: any;
|
|
28
|
+
};
|
|
29
|
+
componentData: {
|
|
30
|
+
type: ObjectConstructor;
|
|
31
|
+
required: boolean;
|
|
32
|
+
default: any;
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
unknown,
|
|
36
|
+
{
|
|
37
|
+
error: boolean;
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
realList(): any;
|
|
41
|
+
getKey(): any;
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
getUnderlyingVm(domElement: any): any;
|
|
45
|
+
getUnderlyingPotencialDraggableComponent(htmElement: any): any;
|
|
46
|
+
emitChanges(evt: any): void;
|
|
47
|
+
alterList(onList: any): void;
|
|
48
|
+
spliceList(): void;
|
|
49
|
+
updatePosition(oldIndex: any, newIndex: any): void;
|
|
50
|
+
getRelatedContextFromMoveEvent({ to, related }: { to: any; related: any }): any;
|
|
51
|
+
getVmIndexFromDomIndex(domIndex: any): any;
|
|
52
|
+
onDragStart(evt: any): void;
|
|
53
|
+
onDragAdd(evt: any): void;
|
|
54
|
+
onDragRemove(evt: any): void;
|
|
55
|
+
onDragUpdate(evt: any): void;
|
|
56
|
+
computeFutureIndex(relatedContext: any, evt: any): any;
|
|
57
|
+
onDragMove(evt: any, originalEvent: any): any;
|
|
58
|
+
onDragEnd(): void;
|
|
59
|
+
},
|
|
60
|
+
import('vue').ComponentOptionsMixin,
|
|
61
|
+
import('vue').ComponentOptionsMixin,
|
|
62
|
+
any[],
|
|
63
|
+
any,
|
|
64
|
+
import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps,
|
|
65
|
+
Readonly<
|
|
66
|
+
{
|
|
67
|
+
move: Function;
|
|
68
|
+
tag: string;
|
|
69
|
+
clone: Function;
|
|
70
|
+
list: unknown[];
|
|
71
|
+
modelValue: unknown[];
|
|
72
|
+
componentData: Record<string, any>;
|
|
73
|
+
} & {
|
|
74
|
+
itemKey?: string | Function;
|
|
75
|
+
}
|
|
76
|
+
>,
|
|
77
|
+
{
|
|
78
|
+
move: Function;
|
|
79
|
+
tag: string;
|
|
80
|
+
clone: Function;
|
|
81
|
+
list: unknown[];
|
|
82
|
+
modelValue: unknown[];
|
|
83
|
+
componentData: Record<string, any>;
|
|
84
|
+
}
|
|
85
|
+
>;
|
|
86
|
+
export default draggableComponent;
|
package/es/shared/hooks/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{useTheme}from"./useTheme.js";export{useDateTime}from"./useDateTime.js";export{AsyncQueue}from"./useAsyncQueue.js";
|
|
1
|
+
export{useTheme}from"./useTheme.js";export{useDateTime}from"./useDateTime.js";export{AsyncQueue,ENTRY_STATE}from"./useAsyncQueue/index.js";export{presetRequestHandler,useFormAsyncQueue,useFormRequest}from"./useFormRequest/index.js";export{useLevelSearchCascader}from"./useLevelSearchCascader.js";export{useSelectAllowModify}from"./selectHooks/useSelectAllowModify.js";export{useOptionFiltered}from"./selectHooks/useOptionFiltered.js";export{searchContentMatcher,useSearchContent}from"./selectHooks/useSearchContent.js";export{useSelectRenders}from"./selectHooks/useSelectRenders.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{useSelectAllowModify}from"./useSelectAllowModify.js";export{useOptionFiltered}from"./useOptionFiltered.js";export{searchContentMatcher,useSearchContent}from"./useSearchContent.js";export{useSelectRenders}from"./useSelectRenders.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AnyObject } from '../../../../es/shared/types';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
export declare function useOptionFiltered(props: {
|
|
4
|
+
options?: AnyObject[] | undefined;
|
|
5
|
+
}, labelKey: Ref<string>, searchKey?: Ref<string[] | undefined>): {
|
|
6
|
+
searchContent: Ref<string | undefined>;
|
|
7
|
+
remoteOptions: Ref<AnyObject[] | null>;
|
|
8
|
+
filterOptions: import("vue").ComputedRef<AnyObject[]>;
|
|
9
|
+
fullOptions: import("vue").ComputedRef<AnyObject[]>;
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../../utils/index.js";import"lodash-es";import"naive-ui";import{ref as o,computed as e}from"vue";import"@vueuse/core";import"date-fns";import"@vue/shared";import"@vueuse/shared";import{useSearchContent as t}from"./useSearchContent.js";import"@vicons/ionicons5";function i(i,r,n){const{searchContent:s,optionSearchFilter:u}=t(),p=o(null),a=e((()=>p.value?u(p.value,r.value,null==n?void 0:n.value):Array.isArray(i.options)?u(i.options,r.value):[])),l=e((()=>p.value||i.options||[]));return{searchContent:s,remoteOptions:p,filterOptions:a,fullOptions:l}}export{i as useOptionFiltered};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AnyObject } from '../../../../es/shared/types';
|
|
2
|
+
export declare const searchContentMatcher: (searchContent: string, label: string) => RegExpMatchArray | null;
|
|
3
|
+
export declare function useSearchContent(): {
|
|
4
|
+
searchContent: import("vue").Ref<string | undefined>;
|
|
5
|
+
optionSearchFilter: (options: AnyObject[], labelKey: string, searchKeys?: string[]) => AnyObject[];
|
|
6
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{keywordMatcher as e}from"../../utils/index.js";import{useMemoize as t}from"@vueuse/core";import{identity as r,isArray as n,isString as o}from"lodash-es";import{ref as u}from"vue";const i=(()=>{const e=t((e=>new RegExp(`(.*)${e.split("").map((e=>`(${function(e){return e.match(/[()\[\]{}$^\/]/)?"\\"+e:e}(e)})`)).join("(.*)")}(.*)`)),{getKey:r});return(t,r)=>r.match(e(t))})();function c(){const t=u();return{searchContent:t,optionSearchFilter:function(r,u,c){if(!t.value)return r;const s=n(c)?c.filter((e=>e&&o(e))):[];return r.filter((r=>function(r,n,u){if(!t.value)return!0;const c=r?r[n]:"";return!!o(c)&&(!!i(t.value,c)||!!e(t.value,r.keyword)||!!u.length&&u.some((e=>o(r[e])&&r[e].includes(t.value))))}(r,u,s)))}}}export{i as searchContentMatcher,c as useSearchContent};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AnyObject, ArrayAble } from '../../../../es/shared/types';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
export declare function useSelectAllowModify(props: Partial<{
|
|
4
|
+
allowCreate: boolean;
|
|
5
|
+
allowModify: boolean;
|
|
6
|
+
multiple: boolean;
|
|
7
|
+
cursorPlacement: 'start' | 'end';
|
|
8
|
+
shouldSave: boolean;
|
|
9
|
+
}>, { searchContent, labelKey, valueKey, valueRef, fullOptions }: {
|
|
10
|
+
searchContent: Ref;
|
|
11
|
+
labelKey: Ref<string>;
|
|
12
|
+
valueKey: Ref<string>;
|
|
13
|
+
valueRef: Ref;
|
|
14
|
+
fullOptions: Ref<AnyObject[]>;
|
|
15
|
+
}): {
|
|
16
|
+
modifyAbleRef: import("vue").ComputedRef<boolean | undefined>;
|
|
17
|
+
modifyEvent: {
|
|
18
|
+
focus: (event: FocusEvent) => Promise<void>;
|
|
19
|
+
blur: (event: Event) => null | undefined;
|
|
20
|
+
updateValue: (value: any, option?: ArrayAble<AnyObject>) => Promise<void>;
|
|
21
|
+
};
|
|
22
|
+
getOptionsWithCreated: (options: AnyObject[]) => AnyObject[];
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{promiseTimeout as e}from"@vueuse/shared";import{isArray as l,isObject as a}from"lodash-es";import{computed as u,nextTick as t}from"vue";function v(v,{searchContent:o,labelKey:n,valueKey:i,valueRef:r,fullOptions:s}){let f=null;const c=u((()=>(v.multiple&&v.allowModify&&console.warn("多选模式下不支持allowModify"),!v.multiple&&v.allowModify)));return{modifyAbleRef:c,modifyEvent:{focus:async l=>{var a,u;c.value&&(f=l.target,f&&r.value&&(await t(),f.value=null!=(u=null==(a=s.value.find((e=>e[i.value]===r.value)))?void 0:a[n.value])?u:r.value,f.dispatchEvent(new CustomEvent("input")),"start"===v.cursorPlacement&&(await e(0),f.setSelectionRange(0,0))))},blur:function(e){if(c.value&&(f=e.target,f)){if(!f.value)return r.value=null;o.value=f.value,r.value=f.value}},updateValue:async function(e,u){!u||l(u)?r.value=e:u&&(r.value=u[v.allowModify?n.value:i.value]),f&&a(u)&&c.value&&(f.focus(),await t(),f.value=u[n.value]||"",f.dispatchEvent(new CustomEvent("input")),"start"===v.cursorPlacement&&f.setSelectionRange(0,0))}},getOptionsWithCreated:function(e){return v.allowCreate&&o.value&&!e.some((e=>e[n.value]===o.value))?[...e,{[n.value]:o.value,[i.value]:o.value,created:!0,shouldSave:v.shouldSave}]:e}}}export{v as useSelectAllowModify};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AnyObject } from '../../../../es/shared/types';
|
|
2
|
+
import { SelectOption } from 'naive-ui';
|
|
3
|
+
import { Ref } from 'vue';
|
|
4
|
+
export declare function useSelectRenders(props: {
|
|
5
|
+
multiple: boolean;
|
|
6
|
+
deletable: boolean;
|
|
7
|
+
}, { labelKey, showKey, searchContent }: {
|
|
8
|
+
searchContent: Ref;
|
|
9
|
+
labelKey: Ref<string>;
|
|
10
|
+
showKey: Ref<string | undefined>;
|
|
11
|
+
}): {
|
|
12
|
+
renderLabel: (option: AnyObject) => string | JSX.Element;
|
|
13
|
+
renderSelectAll: (onSelectAll: (checked: boolean) => void) => JSX.Element[];
|
|
14
|
+
renderTag: ({ option, handleClose }: {
|
|
15
|
+
option: SelectOption;
|
|
16
|
+
handleClose: Function;
|
|
17
|
+
}) => unknown;
|
|
18
|
+
titleRef: Ref<string>;
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ref as e,createVNode as t,createTextVNode as n}from"vue";import"../../utils/index.js";import{isString as l}from"lodash-es";import{NTooltip as o,NIcon as r,NButton as a,NTag as i}from"naive-ui";import"@vueuse/core";import"date-fns";import"@vue/shared";import"@vueuse/shared";import{searchContentMatcher as u}from"./useSearchContent.js";import{HelpCircleSharp as s}from"@vicons/ionicons5";function c(c,{labelKey:p,showKey:m,searchContent:d}){const f=e("");return{renderLabel:function(e){const n=e[p.value];if(!n||!l(n))return"";const a=d.value?u(d.value,n):null,i=a?t("section",null,[a.map(((e,n)=>0!==n&&e?t("span",{style:{color:n%2==0?"var(--n-option-text-color-active)":""}},[e]):null))]):n;return e.desc?t("section",{style:{display:"flex",alignItems:"center",gap:"4px"}},[i,e.desc?t(o,null,{trigger:()=>t(r,{component:s},null),default:()=>e.desc}):null]):i},renderSelectAll:function(e){return[t(a,{quaternary:!0,type:"primary",size:"tiny",onClick:()=>e(!0)},{default:()=>[n("全选")]}),t(a,{quaternary:!0,type:"primary",size:"tiny",onClick:()=>e(!1)},{default:()=>[n("清空")]})]},renderTag:function({option:e,handleClose:n}){var l;const o=null!=(l=m.value&&e[m.value])?l:e[p.value];return c.multiple?(f.value="",c.deletable?t(i,{closable:!0,onClose:e=>{e.stopPropagation(),n()}},{default:()=>t("span",{title:o},[o])}):`${o} ;`):(f.value=o,o)},titleRef:f}}export{c as useSelectRenders};
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
interface AsyncQueueOptions<T = any, K = any> {
|
|
8
|
-
name: string;
|
|
9
|
-
processor: Processor<T>;
|
|
10
|
-
parallelism: number;
|
|
11
|
-
getKey: (item: T) => K;
|
|
12
|
-
uniqueData?: boolean;
|
|
1
|
+
import { AsyncQueueDefine } from './types';
|
|
2
|
+
export * from './types';
|
|
3
|
+
export declare enum ENTRY_STATE {
|
|
4
|
+
PENDING = 0,
|
|
5
|
+
DONE = 1
|
|
13
6
|
}
|
|
14
7
|
/**
|
|
15
8
|
* @constructor 并发控制器
|
|
@@ -25,11 +18,10 @@ export declare class AsyncQueue<T = any, K = any, R = any> {
|
|
|
25
18
|
private _processingLock;
|
|
26
19
|
private _stopped;
|
|
27
20
|
uniqueData: boolean;
|
|
28
|
-
constructor({ name, processor, getKey, parallelism, uniqueData }:
|
|
29
|
-
add(item: T, callback: EntryCallback): void;
|
|
21
|
+
constructor({ name, processor, getKey, parallelism, uniqueData }: AsyncQueueDefine.CreatorOptions<T>);
|
|
22
|
+
add(item: T, callback: AsyncQueueDefine.EntryCallback): void;
|
|
30
23
|
addAsync(item: T): Promise<R>;
|
|
31
24
|
private _ensureProcessing;
|
|
32
25
|
private _startProcess;
|
|
33
26
|
private _handlerResult;
|
|
34
27
|
}
|
|
35
|
-
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cloneDeep as s}from"lodash-es";var e=(s=>(s[s.PENDING=0]="PENDING",s[s.DONE=1]="DONE",s))(e||{});class t{constructor(s,e,t){this.item=s,this.key=e,this.state=0,this.callback=t}}class i{constructor(s){this._list=s?Array.from(s):[]}enqueue(s){this._list.push(s)}dequeue(){return this._list.shift()}}class r{constructor({name:s,processor:e,getKey:t,parallelism:r,uniqueData:a}){this._queued=new i,this._entries=new Map,this._activeTasks=0,this._processingLock=!1,this._stopped=!1,this.uniqueData=!0,this.name=s,this.processor=e,this.getKey=t,this.parallelism=r||100,this.uniqueData=!!a}add(e,i){if(this._stopped)return i(new Error("Queue was stopped"));const r=this.getKey(e);if(this._entries.has(r)){const e=this._entries.get(r);return void(1===e.state?setTimeout((()=>{i&&i(this.uniqueData?s(e.error):e.error,this.uniqueData?s(e.result):e.result)})):e.callbacks?e.callbacks.push(i):e.callbacks=[i])}const a=new t(e,r,i);this._entries.set(r,a),this._queued.enqueue(a),this._processingLock||(this._processingLock=!0,Promise.resolve().then(this._ensureProcessing.bind(this)))}addAsync(s){return new Promise(((e,t)=>{this.add(s,((s,i)=>{s&&t(s),e(i)}))}))}_ensureProcessing(){for(;this._activeTasks<this.parallelism;){const s=this._queued.dequeue();if(!s)break;this._activeTasks++,s.state=0,this._startProcess(s)}this._processingLock=!1}_startProcess(s){this.processor(s.item,((e,t)=>{e?this._handlerResult(s,e):this._handlerResult(s,e,t)}),(()=>this._entries.delete(s.key)))}_handlerResult(e,t,i){const r=e.callback;e.state=1,e.callback=void 0,e.result=this.uniqueData?s(i):i,e.error=this.uniqueData?s(t):t,this._activeTasks--,r&&r(t,i),e.callbacks&&e.callbacks.forEach((s=>s(t,i))),this._processingLock||(this._processingLock=!0,Promise.resolve().then(this._ensureProcessing.bind(this)))}}export{r as AsyncQueue,e as ENTRY_STATE};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AnyObject, UndefinedAble } from '../../../../es/shared/types';
|
|
2
|
+
export declare namespace AsyncQueueDefine {
|
|
3
|
+
interface EntryCallback {
|
|
4
|
+
(err?: any, result?: any): void;
|
|
5
|
+
}
|
|
6
|
+
interface Processor<T, R = any> {
|
|
7
|
+
(item: T, cb: (err?: any, result?: R) => void, removeCache: () => void): void;
|
|
8
|
+
}
|
|
9
|
+
interface CreatorOptions<T = any, K = any> {
|
|
10
|
+
name: string;
|
|
11
|
+
processor: Processor<T>;
|
|
12
|
+
parallelism: number;
|
|
13
|
+
getKey: (item: T) => K;
|
|
14
|
+
uniqueData?: boolean;
|
|
15
|
+
}
|
|
16
|
+
type ProcessorOption = Partial<{
|
|
17
|
+
afterRequest(key: string, res?: unknown, payload?: AnyObject): AnyObject[];
|
|
18
|
+
beforeRequest(key: string, params?: unknown, payload?: AnyObject): UndefinedAble<AnyObject> | void;
|
|
19
|
+
}>;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Ref, ComputedRef } from 'vue';
|
|
2
|
-
import { AnyObject,
|
|
2
|
+
import { AnyObject, AnyFn } from '../../../es/shared/types';
|
|
3
3
|
export declare function useDateTime(datePickerRef: Ref<AnyObject | null>, { formatRef, attrs, emit, allowedInvalidValue, isPanel }: {
|
|
4
4
|
formatRef: ComputedRef<string | [string, string]>;
|
|
5
5
|
attrs: AnyObject;
|
|
6
6
|
allowedInvalidValue?: string;
|
|
7
|
-
emit?:
|
|
7
|
+
emit?: AnyFn;
|
|
8
8
|
isPanel?: boolean;
|
|
9
9
|
}): {
|
|
10
10
|
handleConfirm: (target: HTMLInputElement) => void;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FormRequestDefine } from './types';
|
|
2
|
+
import { ComputedRef } from 'vue';
|
|
3
|
+
import { AsyncQueue, AsyncQueueDefine } from '../../../../es/shared/hooks';
|
|
4
|
+
import { AnyObject, Nullable, UndefinedAble } from '../../../../es/shared/types';
|
|
5
|
+
export * from './types';
|
|
6
|
+
export declare function useFormRequest(): {
|
|
7
|
+
getHttpInstance: () => Nullable<FormRequestDefine.RequestInstance>;
|
|
8
|
+
registGlobHttpInstance: (instance: FormRequestDefine.RequestInstance) => void;
|
|
9
|
+
registGlobRecommendInfo: (info: Partial<FormRequestDefine.RecommendInfo>) => void;
|
|
10
|
+
registGlobSearchInfo: (info: FormRequestDefine.SearchInfo) => void;
|
|
11
|
+
getSearchRequestInfo: () => {
|
|
12
|
+
method: FormRequestDefine.RequestType;
|
|
13
|
+
url: string;
|
|
14
|
+
primaryKeyUrl?: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
getRecommendRequestInfo: () => FormRequestDefine.RecommendInfo;
|
|
17
|
+
};
|
|
18
|
+
export declare function useFormAsyncQueue(requestInstance: ComputedRef<UndefinedAble<FormRequestDefine.RequestInstance>>, uniqueData: ComputedRef<boolean>): {
|
|
19
|
+
create: (parallelism?: number, option?: AsyncQueueDefine.ProcessorOption) => AsyncQueue<FormRequestDefine.AsyncQueueItem, any, {
|
|
20
|
+
label: string;
|
|
21
|
+
value: unknown;
|
|
22
|
+
}[]>;
|
|
23
|
+
};
|
|
24
|
+
export declare function presetRequestHandler(res: unknown): AnyObject[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isObject as e}from"@vue/shared";import{uuidGenerator as t}from"../../utils/index.js";import{unref as r}from"vue";import{cloneDeep as n,isFunction as o}from"lodash-es";import"naive-ui";import"@vueuse/core";import"date-fns";import{AsyncQueue as s}from"../useAsyncQueue/index.js";import"@vueuse/shared";import"../selectHooks/useSearchContent.js";import"@vicons/ionicons5";let u=null;const c={method:"post",url:"",primaryKeyUrl:""},a={url:{get:"/fdp-api/fdp/aiRec/search",post:"/fdp-api/fdp/aiRec/sendBehaviorData",delete:"/fdp-api/fdp/aiRec/delete"},getRecommendIds:()=>({})};function i(){return{getHttpInstance:function(){return u},registGlobHttpInstance:function(e){u=e},registGlobRecommendInfo:function(e){Object.assign(a,e)},registGlobSearchInfo:function(e){Object.assign(c,e)},getSearchRequestInfo:function(){return{...c}},getRecommendRequestInfo:function(){return n(a)}}}function f(e,n){const{getHttpInstance:u}=i();return{create:function(c=3,a){return new s({name:"FormRenderAsyncQueue",uniqueData:n.value,parallelism:c,async processor({key:t,method:n="post",cache:s,params:c,url:i,payload:f},p,l){var m,d;const h=null!=(m=r(e))?m:u();if(!h)return console.log("before use http feature, you should regist http instance by useFormRequest.registGlobHttpInstance()"),p(),void l();try{a&&o(a.beforeRequest)&&(c=null!=(d=a.beforeRequest(t,c,f))?d:{});let e=await h[n](i,c);a&&o(a.afterRequest)&&(e=a.afterRequest(t,e,f)),p(void 0,Array.isArray(e)?e:[]),!s&&l()}catch(e){p(new Error(`Request error => ${e}`)),l()}},getKey:({url:e,method:r="post",cache:n,params:o})=>n?e+r+JSON.stringify(o||{}):t()})}}}function p(t){if(!e(t))throw t;return r=t,Reflect.has(r,"map")&&Reflect.has(r,"result")?function(e){const{result:t,map:r}=e;if("SUCCESS"!==t)throw e;return r.rows}(t):function(e){return Reflect.has(e,"result")&&Reflect.has(e,"obj")}(t)?function(t){const{obj:r,result:n}=t;if("SUCCESS"!==n||!e(r))throw t;return Object.entries(r).reduce(((e,[t,r])=>(r.forEach((r=>e.push({...r,type:t}))),e)),[])}(t):function(e){return Reflect.has(e,"data")&&Reflect.has(e,"success")}(t)?function(e){const{data:t,success:r}=e;if(!r)throw e;return t}(t):[];var r}export{p as presetRequestHandler,f as useFormAsyncQueue,i as useFormRequest};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AsyncQueue } from '../../../../es/shared/hooks';
|
|
2
|
+
import { AnyObject, AnyFn } from '../../../../es/shared/types';
|
|
3
|
+
export declare namespace FormRequestDefine {
|
|
4
|
+
type RequestType = 'post' | 'get' | 'patch' | 'delete' | 'put';
|
|
5
|
+
interface AsyncQueueItem {
|
|
6
|
+
key: any;
|
|
7
|
+
cache?: boolean;
|
|
8
|
+
url: string;
|
|
9
|
+
method?: RequestType;
|
|
10
|
+
params?: AnyObject;
|
|
11
|
+
payload?: AnyObject;
|
|
12
|
+
}
|
|
13
|
+
type FormAsyncQueue = AsyncQueue<AsyncQueueItem, any, AnyObject[]>;
|
|
14
|
+
type RequestInstance = Record<string, AnyFn>;
|
|
15
|
+
type SearchInfo = {
|
|
16
|
+
method: RequestType;
|
|
17
|
+
url: string;
|
|
18
|
+
primaryKeyUrl?: string;
|
|
19
|
+
};
|
|
20
|
+
type RecommendIds = Partial<Record<'businessId' | 'componentId' | 'deptId' | 'userId', string>>;
|
|
21
|
+
type RecommendInfo = {
|
|
22
|
+
getRecommendIds(): RecommendIds;
|
|
23
|
+
url: Record<'get' | 'post' | 'delete', string>;
|
|
24
|
+
};
|
|
25
|
+
type SearchResult = {
|
|
26
|
+
result: 'SUCCESS' | 'ERROR';
|
|
27
|
+
map: {
|
|
28
|
+
rows: AnyObject[];
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
type SelectResult = {
|
|
32
|
+
success: boolean;
|
|
33
|
+
data: AnyObject[];
|
|
34
|
+
};
|
|
35
|
+
type RecommendResult = {
|
|
36
|
+
result: 'SUCCESS' | 'ERROR';
|
|
37
|
+
obj: Partial<Record<'commonly' | 'recently', AnyObject[]>>;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { FormRequestDefine } from '../../../es/shared/hooks';
|
|
2
|
+
import { AnyObject, FormWordbook, AnyFn } from '../../../es/shared/types';
|
|
3
|
+
import { MaybeRef } from '@vueuse/core';
|
|
4
|
+
import { Ref } from 'vue';
|
|
5
|
+
export declare function useLevelSearchCascader(props: Partial<{
|
|
6
|
+
options: AnyObject[];
|
|
7
|
+
lazyRequest: boolean;
|
|
8
|
+
requestCache: boolean;
|
|
9
|
+
value: string | AnyObject[];
|
|
10
|
+
}> & {
|
|
11
|
+
autograph: string;
|
|
12
|
+
wordbook: FormWordbook;
|
|
13
|
+
labelField: string;
|
|
14
|
+
valueField: string;
|
|
15
|
+
}, emit: AnyFn, { asyncQueue, fieldKey, getRequestPayload }: {
|
|
16
|
+
asyncQueue: FormRequestDefine.FormAsyncQueue;
|
|
17
|
+
fieldKey: MaybeRef<string>;
|
|
18
|
+
getRequestPayload?: () => any;
|
|
19
|
+
}): {
|
|
20
|
+
valueRef: import("vue").WritableComputedRef<string | AnyObject[] | undefined>;
|
|
21
|
+
labelKey: import("vue").ComputedRef<string>;
|
|
22
|
+
valueKey: import("vue").ComputedRef<string>;
|
|
23
|
+
optionsRef: Ref<AnyObject[]>;
|
|
24
|
+
showRef: Ref<boolean>;
|
|
25
|
+
fetchData: (node?: AnyObject, keyword?: string, updateValueWhenNoChild?: boolean) => Promise<void | AnyObject>;
|
|
26
|
+
menuWidth: Ref<number>;
|
|
27
|
+
searchCascaderRef: Ref<{
|
|
28
|
+
getWidth: () => number;
|
|
29
|
+
setCursor: (option?: AnyObject) => void;
|
|
30
|
+
} | undefined>;
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../utils/index.js";import{isEqual as e,noop as r,isString as t,isNumber as n,isEmpty as o,isFunction as a,cloneDeep as i,omit as l,isArray as u}from"lodash-es";import"naive-ui";import{computed as s,ref as c,watch as d,unref as v}from"vue";import"@vueuse/core";import"date-fns";import{useFormRequest as p}from"./useFormRequest/index.js";import"@vueuse/shared";import"./selectHooks/useSearchContent.js";import"@vicons/ionicons5";function h(h,y,{asyncQueue:f,fieldKey:m,getRequestPayload:k=r}){const g=s({get:()=>h.value,set(r){e(r,h.value)||y("update:value",r)}}),w=c(!1),b=c([]),O=s((()=>{var e,r,t;return null!=(t=null==(r=null==(e=h.wordbook)?void 0:e.show_key)?void 0:r[0])?t:h.labelField})),_=s((()=>{var e,r;return null!=(r=null==(e=h.wordbook)?void 0:e.value_key)?r:h.valueField})),L=s((()=>{var e,r;return null==(r=null==(e=h.wordbook)?void 0:e.render_key)?void 0:r[0]})),j=s((()=>{var e;return(null==(e=h.wordbook)?void 0:e.level_num)||1/0})),C=function(e,r,t){return{transformListToChildren(e){if(!e.length)return[];const r=[(e=i(e))[0]];let t=e[0];for(let r=1;r<e.length;r++){const n=e[r];n&&(t.children=[n],n.parent=t,t=n)}return[e,r]},getNodeDepth(e){let r=1,t=e.parent;for(;t;)r++,t=t.parent;return r},enrichChildOption(e,r,t){return{...e,parent:r,isLeaf:this.getNodeDepth(r)+1>=t}},enrichKeywordOption:(e,n)=>(e.__keyword=!!n,e.isLeaf=!!n,n&&t.value&&e[t.value]&&(e[r.value]=e[t.value]),e),sortOptionWithIdList:(r,t)=>t.map((t=>r.find((r=>r[e.value]===t)))),generateOptionWithIdList(r,t,n){let o=r[0];return{options:t.reduce(((e,t,i)=>{const l=a(r,t);return 0===i?(o=l,[l]):(Object.assign(l,{parent:o,isLeaf:i+1>=n}),o.children=[l],o=l,e)}),[]),lastOption:o};function a(r,t){return r.find((r=>r[e.value]===t))}},parseLinkFromString2List:e=>e.split("_").filter((e=>e)),isClickNodeCheckbox:e=>e&&!e.__keyword&&e.isLeaf,createConfigObject:(r,t,n)=>t?r.conObj||[]:n?[{con:"EQ",is_compare_field:!1,field_key:r.level_key,value:n[e.value]}]:r.conObjFirstLevel||[],createOptionValue(e){const r=[];let t=e;for(;t;)r.unshift(l(t,["parent","isLeaf","__keyword","children"])),t=t.parent;return r},shouldInitOptionList:(r,t,n)=>u(r)&&!o(r)&&r.every((r=>r[e.value]))&&!t&&!n}}(_,O,L),{getSearchRequestInfo:K}=p(),I=c(150),R=c();async function x(e,r,i=!0){var l,u;if(I.value=r&&(null==(l=R.value)?void 0:l.getWidth())||150,C.shouldInitOptionList(g.value,e,r)){const[e,r]=C.transformListToChildren(g.value),t=e[Math.max(0,e.length-2)];if(g.value.length>1){b.value=r;const t=e[Math.max(0,e.length-2)];return await x(t,void 0,!1),t}if(null==(u=b.value)?void 0:u.length)return t}try{return C.isClickNodeCheckbox(e)?s(e):e?e.__keyword?async function(){var r;if(!t(e.id_link))return Promise.reject();const a=C.parseLinkFromString2List(e.id_link);n(j.value)&&j.value!==1/0&&a.splice(j.value);const i=await async function(e){if(!K().primaryKeyUrl)return[];try{return await f.addAsync(r(h.wordbook,h.autograph,e,v(m)))}catch(e){t(e)&&console.error(e)}function r(e,r,t,n){const o=K();return{key:n,params:{autograph:r,tableId:e.id,primaryKeyValue:t.join(","),page:1},...o,url:o.primaryKeyUrl,cache:h.requestCache,payload:{field:{},labelKey:O.value,valueKey:_.value}}}}(a);if(!i)return Promise.reject();const{lastOption:l,options:u}=C.generateOptionWithIdList(i,a,j.value);if(u.length<j.value&&(await x(l),o(l.children)))return g.value=C.sortOptionWithIdList(i,a),w.value=!1,Promise.reject();return b.value=u,null==(r=R.value)||r.setCursor(l),l}():async function(){const r=await f.addAsync(c(h.wordbook,h.autograph,e,v(m)));if(!r.length)return i?s(e):Promise.reject();e.children=r.map((r=>C.enrichChildOption(r,e,j.value)))}():async function(){var t;const n=await f.addAsync(c(h.wordbook,h.autograph,e,v(m)));b.value=n.map((e=>C.enrichKeywordOption(e,r))),r&&(null==(t=R.value)||t.setCursor(b.value[0]))}()}catch(e){t(e)&&console.error(e)}function s(e){return g.value=C.createOptionValue(e),w.value=!1,Promise.reject()}function c(e,n,o,i){const l={autograph:()=>n,wordbookId:"id",wordbookType:"type",fieldKeys:()=>e.search_key?JSON.stringify(e.search_key):void 0,conObj:()=>JSON.stringify(C.createConfigObject(e,r,o)),primaryKey:"primary_key",levelKey:"level_key",keyword:()=>r,page:()=>1},u=Object.entries(l).reduce(((r,[n,o])=>(r[n]=t(o)?e[o]:a(o)?o():void 0,r)),{});return{...K(),params:u,key:i,cache:h.requestCache,payload:{...k(),labelKey:O.value,valueKey:_.value}}}}return d((()=>h.wordbook),((r,t)=>{e(r,t)||(b.value=[],r&&(g.value||!h.lazyRequest)&&x())}),{immediate:!0}),{valueRef:g,labelKey:O,valueKey:_,optionsRef:b,showRef:w,fetchData:x,menuWidth:I,searchCascaderRef:R}}export{h as useLevelSearchCascader};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.1.53-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.1.53-beta.3",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.1.53-beta.3",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
|
|
@@ -4,7 +4,7 @@ export declare type SFCWithInstall<T> = T & {
|
|
|
4
4
|
install: (app: App, ...options: any[]) => any;
|
|
5
5
|
};
|
|
6
6
|
export declare type AnyObject = Record<string, any>;
|
|
7
|
-
export declare type
|
|
7
|
+
export declare type AnyFn<T extends Array<any> = any[], P = any> = (...args: T) => P;
|
|
8
8
|
export declare type Nullable<T> = T | null | undefined;
|
|
9
9
|
export declare type UndefinedAble<T> = T | undefined;
|
|
10
10
|
export declare type ArrayAble<T> = T | T[];
|