cnhis-design-vue 3.1.46-beta.2 → 3.1.46-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. package/es/components/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +77 -0
  2. package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +93 -0
  3. package/es/components/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +3 -0
  4. package/es/components/iho-table/src/plugins/filterRenderPlugin/dist/index.d.ts +3 -0
  5. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/dist/index.d.ts +3 -0
  6. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +3 -0
  7. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +3 -0
  8. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/dist/index.d.ts +3 -0
  9. package/es/components/iho-table/src/utils/dist/index.d.ts +44 -0
  10. package/es/components/scale-view/src/components/formitem/dist/r-address.d.ts +36 -0
  11. package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +36 -0
  12. package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +82 -0
  13. package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +57 -0
  14. package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +57 -0
  15. package/es/components/table-filter/src/components/render-widget/components/Select.vue2.js +1 -1
  16. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts +1 -1
  17. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js +1 -1
  18. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +1 -1
  19. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +1 -1
  20. package/es/shared/package.json.js +1 -1
  21. package/package.json +2 -2
@@ -0,0 +1,77 @@
1
+ export const __esModule: true;
2
+ export const LEVEL_SEARCH_CASCADER: vue_2.DefineComponent<{
3
+ options: {
4
+ type: ArrayConstructor;
5
+ default: () => never[];
6
+ };
7
+ labelField: {
8
+ type: StringConstructor;
9
+ default: string;
10
+ };
11
+ valueField: {
12
+ type: StringConstructor;
13
+ default: string;
14
+ };
15
+ autograph: {
16
+ type: StringConstructor;
17
+ required: true;
18
+ };
19
+ lazyRequest: {
20
+ type: BooleanConstructor;
21
+ default: boolean;
22
+ };
23
+ requestCache: {
24
+ type: BooleanConstructor;
25
+ default: boolean;
26
+ };
27
+ wordbook: {
28
+ type: ObjectConstructor;
29
+ required: true;
30
+ };
31
+ onChange: {};
32
+ value: {
33
+ type: (ArrayConstructor | StringConstructor)[];
34
+ };
35
+ }, () => any, any, {}, {}, vue_2.ComponentOptionsMixin, vue_2.ComponentOptionsMixin, "update:value"[], "update:value", vue_2.VNodeProps & vue_2.AllowedComponentProps & vue_2.ComponentCustomProps, Readonly<vue_2.ExtractPropTypes<{
36
+ options: {
37
+ type: ArrayConstructor;
38
+ default: () => never[];
39
+ };
40
+ labelField: {
41
+ type: StringConstructor;
42
+ default: string;
43
+ };
44
+ valueField: {
45
+ type: StringConstructor;
46
+ default: string;
47
+ };
48
+ autograph: {
49
+ type: StringConstructor;
50
+ required: true;
51
+ };
52
+ lazyRequest: {
53
+ type: BooleanConstructor;
54
+ default: boolean;
55
+ };
56
+ requestCache: {
57
+ type: BooleanConstructor;
58
+ default: boolean;
59
+ };
60
+ wordbook: {
61
+ type: ObjectConstructor;
62
+ required: true;
63
+ };
64
+ onChange: {};
65
+ value: {
66
+ type: (ArrayConstructor | StringConstructor)[];
67
+ };
68
+ }>> & {
69
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
70
+ }, {
71
+ options: unknown[];
72
+ labelField: string;
73
+ valueField: string;
74
+ lazyRequest: boolean;
75
+ requestCache: boolean;
76
+ }>;
77
+ import vue_2 = require("vue");
@@ -0,0 +1,93 @@
1
+ export const __esModule: true;
2
+ export const SEARCH_CASCADER: vue_2.DefineComponent<{
3
+ options: {
4
+ type: ArrayConstructor;
5
+ default: () => never[];
6
+ };
7
+ depth: {
8
+ type: (NumberConstructor | StringConstructor)[];
9
+ };
10
+ urlConfig: {
11
+ type: ObjectConstructor;
12
+ };
13
+ lazyRequest: {
14
+ type: BooleanConstructor;
15
+ default: boolean;
16
+ };
17
+ requestCache: {
18
+ type: BooleanConstructor;
19
+ default: boolean;
20
+ };
21
+ onFocus: {
22
+ type: FunctionConstructor;
23
+ };
24
+ filterable: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
28
+ checkStrategy: {
29
+ type: StringConstructor;
30
+ default: string;
31
+ };
32
+ labelField: {
33
+ type: StringConstructor;
34
+ default: string;
35
+ };
36
+ valueField: {
37
+ type: StringConstructor;
38
+ default: string;
39
+ };
40
+ onChange: {};
41
+ value: {};
42
+ }, () => any, any, {}, {}, vue_2.ComponentOptionsMixin, vue_2.ComponentOptionsMixin, "update:value"[], "update:value", vue_2.VNodeProps & vue_2.AllowedComponentProps & vue_2.ComponentCustomProps, Readonly<vue_2.ExtractPropTypes<{
43
+ options: {
44
+ type: ArrayConstructor;
45
+ default: () => never[];
46
+ };
47
+ depth: {
48
+ type: (NumberConstructor | StringConstructor)[];
49
+ };
50
+ urlConfig: {
51
+ type: ObjectConstructor;
52
+ };
53
+ lazyRequest: {
54
+ type: BooleanConstructor;
55
+ default: boolean;
56
+ };
57
+ requestCache: {
58
+ type: BooleanConstructor;
59
+ default: boolean;
60
+ };
61
+ onFocus: {
62
+ type: FunctionConstructor;
63
+ };
64
+ filterable: {
65
+ type: BooleanConstructor;
66
+ default: boolean;
67
+ };
68
+ checkStrategy: {
69
+ type: StringConstructor;
70
+ default: string;
71
+ };
72
+ labelField: {
73
+ type: StringConstructor;
74
+ default: string;
75
+ };
76
+ valueField: {
77
+ type: StringConstructor;
78
+ default: string;
79
+ };
80
+ onChange: {};
81
+ value: {};
82
+ }>> & {
83
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
84
+ }, {
85
+ options: unknown[];
86
+ checkStrategy: string;
87
+ labelField: string;
88
+ valueField: string;
89
+ lazyRequest: boolean;
90
+ requestCache: boolean;
91
+ filterable: boolean;
92
+ }>;
93
+ import vue_2 = require("vue");
@@ -0,0 +1,3 @@
1
+ export const __esModule: true;
2
+ export function highLightSetPlugin(): iho_table_1.TablePlugin;
3
+ import iho_table_1 = require("../../../../../../es/components/iho-table");
@@ -0,0 +1,3 @@
1
+ export const __esModule: true;
2
+ export function filterRenderPlugin(): iho_table_1.TablePlugin;
3
+ import iho_table_1 = require("../../../../../../../es/components/iho-table");
@@ -0,0 +1,3 @@
1
+ export const __esModule: true;
2
+ export function dateRendererPlugin(): iho_table_1.TablePlugin;
3
+ import iho_table_1 = require("../../../../../../../../../es/components/iho-table");
@@ -0,0 +1,3 @@
1
+ export const __esModule: true;
2
+ export function defaultRendererPlugin(): iho_table_1.TablePlugin;
3
+ import iho_table_1 = require("../../../../../../../../es/components/iho-table");
@@ -0,0 +1,3 @@
1
+ export const __esModule: true;
2
+ export function seqRendererPlugin(): iho_table_1.TablePlugin;
3
+ import iho_table_1 = require("../../../../../../../../es/components/iho-table");
@@ -0,0 +1,3 @@
1
+ export const __esModule: true;
2
+ export function variableHeightRendererPlugin(): iho_table_1.TablePlugin;
3
+ import iho_table_1 = require("../../../../../../../es/components/iho-table");
@@ -0,0 +1,44 @@
1
+ export const __esModule: true;
2
+ export const IhoTableUtils: Readonly<{
3
+ getCellType: (lowCodeField: any) => any;
4
+ }>;
5
+ export const IhoTableRenderHelper: Readonly<{
6
+ createDefaultRenderCell: typeof createDefaultRenderCell;
7
+ createRenderEdit: typeof createRenderEdit;
8
+ isEditableColumn: (config: any, column: any) => any;
9
+ hasFilter: (lowCodeField: any) => boolean;
10
+ hasDateFiler: (lowCodeField: any) => any;
11
+ }>;
12
+ export const IhoTableStatusHelper: Readonly<{
13
+ isPositive: (value: any) => boolean;
14
+ isNegative: (value: any) => boolean;
15
+ notPositive: (value: any) => boolean;
16
+ notNegative: (value: any) => boolean;
17
+ }>;
18
+ export function createIhoTableClearActivedInterceptor(type: any, solution: any): (_a: any) => boolean;
19
+ export function IhoTableLog(message: any): void;
20
+ export function IhoTableWarn(message: any): void;
21
+ export function getRowHeight(): number;
22
+ export function eventListener2EventName(eventListenerName: any): string;
23
+ export function eventName2EventListener(eventName: any): string;
24
+ export function useUUIDMap(creator: any, isReactive: any): {
25
+ getItemFromUUID: (uuid: any) => any;
26
+ setItemFromUUID: (uuid: any, value: any) => void;
27
+ removeItemFromUUID: (uuid: any) => void;
28
+ };
29
+ export function getColumnRenderWidth(column: any, $table: any): any;
30
+ export function useIhoTableFormEvent(payload: any): {
31
+ emitFormChange: () => void;
32
+ emitFormClick: () => void;
33
+ emitFormChangeWithParams: (params: any) => void;
34
+ emitFormClickWithParams: (params: any) => void;
35
+ };
36
+ export function getLowCodeFieldFromField(field: any): any;
37
+ declare function createDefaultRenderCell(): (_: any, _a: any) => any[];
38
+ declare function createRenderEdit(renderer: any): (_a: any, params: any) => any;
39
+ export function isTransformTreeType(config: any): boolean;
40
+ export function isRichContent(content: any): boolean;
41
+ export function parseRichContent(richContent: any): any;
42
+ export function parseMergeField(row: any, column: any): any;
43
+ export function isCompatibleColumn(field: any): any;
44
+ export {};
@@ -0,0 +1,36 @@
1
+ export const __esModule: true;
2
+ declare const _default: vue_1.DefineComponent<{
3
+ form: {
4
+ type: ObjectConstructor;
5
+ default: () => void;
6
+ };
7
+ item: {
8
+ type: ObjectConstructor;
9
+ default: () => void;
10
+ };
11
+ isLock: {
12
+ type: BooleanConstructor;
13
+ default: boolean;
14
+ };
15
+ }, () => any, any, {}, {}, vue_1.ComponentOptionsMixin, vue_1.ComponentOptionsMixin, "scaleChange"[], "scaleChange", vue_1.VNodeProps & vue_1.AllowedComponentProps & vue_1.ComponentCustomProps, Readonly<vue_1.ExtractPropTypes<{
16
+ form: {
17
+ type: ObjectConstructor;
18
+ default: () => void;
19
+ };
20
+ item: {
21
+ type: ObjectConstructor;
22
+ default: () => void;
23
+ };
24
+ isLock: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
28
+ }>> & {
29
+ onScaleChange?: ((...args: any[]) => any) | undefined;
30
+ }, {
31
+ item: Record<string, any>;
32
+ isLock: boolean;
33
+ form: Record<string, any>;
34
+ }>;
35
+ export default _default;
36
+ import vue_1 = require("vue");
@@ -0,0 +1,36 @@
1
+ export const __esModule: true;
2
+ declare const _default: vue_1.DefineComponent<{
3
+ form: {
4
+ type: ObjectConstructor;
5
+ default: () => {};
6
+ };
7
+ item: {
8
+ type: ObjectConstructor;
9
+ default: () => {};
10
+ };
11
+ isLock: {
12
+ type: BooleanConstructor;
13
+ default: boolean;
14
+ };
15
+ }, () => any, any, {}, {}, vue_1.ComponentOptionsMixin, vue_1.ComponentOptionsMixin, "scaleChange"[], "scaleChange", vue_1.VNodeProps & vue_1.AllowedComponentProps & vue_1.ComponentCustomProps, Readonly<vue_1.ExtractPropTypes<{
16
+ form: {
17
+ type: ObjectConstructor;
18
+ default: () => {};
19
+ };
20
+ item: {
21
+ type: ObjectConstructor;
22
+ default: () => {};
23
+ };
24
+ isLock: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
28
+ }>> & {
29
+ onScaleChange?: ((...args: any[]) => any) | undefined;
30
+ }, {
31
+ item: Record<string, any>;
32
+ isLock: boolean;
33
+ form: Record<string, any>;
34
+ }>;
35
+ export default _default;
36
+ import vue_1 = require("vue");
@@ -0,0 +1,82 @@
1
+ export const __esModule: true;
2
+ declare const _default: vue_1.DefineComponent<{
3
+ title: {
4
+ type: (StringConstructor | FunctionConstructor)[];
5
+ default: string;
6
+ };
7
+ changeSize: {
8
+ type: BooleanConstructor;
9
+ default: boolean;
10
+ };
11
+ closable: {
12
+ type: BooleanConstructor;
13
+ default: boolean;
14
+ };
15
+ modalWidth: {
16
+ type: StringConstructor;
17
+ default: string;
18
+ };
19
+ modalHeight: {
20
+ type: StringConstructor;
21
+ default: string;
22
+ };
23
+ handleOk: {
24
+ type: FunctionConstructor;
25
+ default: () => {};
26
+ };
27
+ cancel: {
28
+ type: FunctionConstructor;
29
+ default: () => {};
30
+ };
31
+ visible: {
32
+ type: BooleanConstructor;
33
+ default: boolean;
34
+ };
35
+ }, () => any, any, {}, {}, vue_1.ComponentOptionsMixin, vue_1.ComponentOptionsMixin, ("update:visible" | "onClose")[], "onClose" | "update:visible", vue_1.VNodeProps & vue_1.AllowedComponentProps & vue_1.ComponentCustomProps, Readonly<vue_1.ExtractPropTypes<{
36
+ title: {
37
+ type: (StringConstructor | FunctionConstructor)[];
38
+ default: string;
39
+ };
40
+ changeSize: {
41
+ type: BooleanConstructor;
42
+ default: boolean;
43
+ };
44
+ closable: {
45
+ type: BooleanConstructor;
46
+ default: boolean;
47
+ };
48
+ modalWidth: {
49
+ type: StringConstructor;
50
+ default: string;
51
+ };
52
+ modalHeight: {
53
+ type: StringConstructor;
54
+ default: string;
55
+ };
56
+ handleOk: {
57
+ type: FunctionConstructor;
58
+ default: () => {};
59
+ };
60
+ cancel: {
61
+ type: FunctionConstructor;
62
+ default: () => {};
63
+ };
64
+ visible: {
65
+ type: BooleanConstructor;
66
+ default: boolean;
67
+ };
68
+ }>> & {
69
+ "onUpdate:visible"?: ((...args: any[]) => any) | undefined;
70
+ onOnClose?: ((...args: any[]) => any) | undefined;
71
+ }, {
72
+ closable: boolean;
73
+ title: string | Function;
74
+ visible: boolean;
75
+ modalWidth: string;
76
+ modalHeight: string;
77
+ handleOk: Function;
78
+ cancel: Function;
79
+ changeSize: boolean;
80
+ }>;
81
+ export default _default;
82
+ import vue_1 = require("vue");
@@ -0,0 +1,57 @@
1
+ export const __esModule: true;
2
+ export const SearchMenu: vue_1.DefineComponent<{
3
+ childKey: {
4
+ type: StringConstructor;
5
+ default: string;
6
+ };
7
+ options: {
8
+ type: ArrayConstructor;
9
+ default: () => never[];
10
+ };
11
+ labelKey: {
12
+ type: StringConstructor;
13
+ default: string;
14
+ };
15
+ valueKey: {
16
+ type: StringConstructor;
17
+ default: string;
18
+ };
19
+ currentNode: {
20
+ type: ObjectConstructor;
21
+ };
22
+ cursorNode: {
23
+ type: ObjectConstructor;
24
+ };
25
+ }, () => any, any, {}, {}, vue_1.ComponentOptionsMixin, vue_1.ComponentOptionsMixin, ("nodeClick" | "changeCursor")[], "nodeClick" | "changeCursor", vue_1.VNodeProps & vue_1.AllowedComponentProps & vue_1.ComponentCustomProps, Readonly<vue_1.ExtractPropTypes<{
26
+ childKey: {
27
+ type: StringConstructor;
28
+ default: string;
29
+ };
30
+ options: {
31
+ type: ArrayConstructor;
32
+ default: () => never[];
33
+ };
34
+ labelKey: {
35
+ type: StringConstructor;
36
+ default: string;
37
+ };
38
+ valueKey: {
39
+ type: StringConstructor;
40
+ default: string;
41
+ };
42
+ currentNode: {
43
+ type: ObjectConstructor;
44
+ };
45
+ cursorNode: {
46
+ type: ObjectConstructor;
47
+ };
48
+ }>> & {
49
+ onNodeClick?: ((...args: any[]) => any) | undefined;
50
+ onChangeCursor?: ((...args: any[]) => any) | undefined;
51
+ }, {
52
+ options: unknown[];
53
+ valueKey: string;
54
+ childKey: string;
55
+ labelKey: string;
56
+ }>;
57
+ import vue_1 = require("vue");
@@ -0,0 +1,57 @@
1
+ export const __esModule: true;
2
+ export const SearchMenu: vue_1.DefineComponent<{
3
+ childKey: {
4
+ type: StringConstructor;
5
+ default: string;
6
+ };
7
+ options: {
8
+ type: ArrayConstructor;
9
+ default: () => never[];
10
+ };
11
+ labelKey: {
12
+ type: StringConstructor;
13
+ default: string;
14
+ };
15
+ valueKey: {
16
+ type: StringConstructor;
17
+ default: string;
18
+ };
19
+ currentNode: {
20
+ type: ObjectConstructor;
21
+ };
22
+ cursorNode: {
23
+ type: ObjectConstructor;
24
+ };
25
+ }, () => any, any, {}, {}, vue_1.ComponentOptionsMixin, vue_1.ComponentOptionsMixin, ("nodeClick" | "changeCursor")[], "nodeClick" | "changeCursor", vue_1.VNodeProps & vue_1.AllowedComponentProps & vue_1.ComponentCustomProps, Readonly<vue_1.ExtractPropTypes<{
26
+ childKey: {
27
+ type: StringConstructor;
28
+ default: string;
29
+ };
30
+ options: {
31
+ type: ArrayConstructor;
32
+ default: () => never[];
33
+ };
34
+ labelKey: {
35
+ type: StringConstructor;
36
+ default: string;
37
+ };
38
+ valueKey: {
39
+ type: StringConstructor;
40
+ default: string;
41
+ };
42
+ currentNode: {
43
+ type: ObjectConstructor;
44
+ };
45
+ cursorNode: {
46
+ type: ObjectConstructor;
47
+ };
48
+ }>> & {
49
+ onNodeClick?: ((...args: any[]) => any) | undefined;
50
+ onChangeCursor?: ((...args: any[]) => any) | undefined;
51
+ }, {
52
+ options: unknown[];
53
+ valueKey: string;
54
+ childKey: string;
55
+ labelKey: string;
56
+ }>;
57
+ import vue_1 = require("vue");
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as t,computed as u,openBlock as r,createBlock as o,unref as n,mergeProps as a}from"vue";import{NSelect as l}from"naive-ui";import{WholeSelectObj as i}from"../helpers/selectExtraMap.js";import{WidgetValEnums as p}from"../../../types/enums.js";var s=e({__name:"Select",props:{value:{type:[Array,String,Number]},componentCfg:{type:Object}},emits:["update:value"],setup(e,{emit:s}){const m=e,v=t(),c=u((()=>m.value)),f=u((()=>v.multiple)),d=u((()=>{const{widgetCfg:e}=m.componentCfg,{showWholeOption:t=!1}=e;return t})),g=u((()=>{const{widgetCfg:e}=m.componentCfg,{valueList:t=[]}=e;if(d.value){return[i,...t]}return t}));function y(e){if(d.value&&f.value&&Array.isArray(e)&&e.includes(p.WHOLE)){const t=e.slice(-1);if(t.includes(p.WHOLE))return void s("update:value",t);const u=e.filter((e=>e!==p.WHOLE));s("update:value",u)}else s("update:value",e)}return(e,t)=>(r(),o(n(l),a(n(v),{options:n(g),value:n(c),"onUpdate:value":y}),null,16,["options","value"]))}});export{s as default};
1
+ import{defineComponent as e,useAttrs as t,computed as r,openBlock as u,createBlock as o,unref as n,mergeProps as a}from"vue";import{NSelect as i}from"naive-ui";import{WholeSelectObj as l}from"../helpers/selectExtraMap.js";import{WidgetValEnums as p}from"../../../types/enums.js";var s=e({__name:"Select",props:{value:{type:[Array,String,Number]},componentCfg:{type:Object}},emits:["update:value"],setup(e,{emit:s}){const m=e,v=t(),f=r((()=>m.value)),c=r((()=>v.multiple)),d=r((()=>{const{widgetCfg:e}=m.componentCfg,{showWholeOption:t=!1}=e;return t})),g=r((()=>{const{widgetCfg:e}=m.componentCfg,{valueList:t=[]}=e;if(d.value){return[JSON.parse(JSON.stringify(l)),...t]}return t}));function y(e){if(d.value&&c.value&&Array.isArray(e)&&e.includes(p.WHOLE)){const t=e.slice(-1);if(t.includes(p.WHOLE))return void s("update:value",t);const r=e.filter((e=>e!==p.WHOLE));s("update:value",r)}else s("update:value",e)}return(e,t)=>(u(),o(n(i),a(n(v),{options:n(g),value:n(f),"onUpdate:value":y}),null,16,["options","value"]))}});export{s as default};
@@ -39,7 +39,7 @@ declare const _default: import("vue").DefineComponent<{
39
39
  isShowWhole: import("vue").ComputedRef<any>;
40
40
  isLastPage: import("vue").ComputedRef<boolean>;
41
41
  valueCp: import("vue").ComputedRef<string | number | any[] | null>;
42
- isInitRequest: import("vue").ComputedRef<boolean>;
42
+ isForbidRequest: import("vue").ComputedRef<boolean>;
43
43
  setOptionActive: (selectIds: string[]) => void;
44
44
  handleUpdateSelect: (value: string[] | null) => void;
45
45
  handleUpdatePage: (page: number) => Promise<void>;
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as a,ref as l,inject as t,computed as n,openBlock as u,createBlock as o,unref as i,mergeProps as r,isRef as s,withCtx as c,createVNode as v,h as p}from"vue";import{useMessage as f,NSelect as m,NTag as d}from"naive-ui";import{useDebounceFn as y}from"@vueuse/core";import g from"../../../hooks/useAsyncData.js";import{judgmentVariable as h}from"../helpers/setDefaultValue.js";import{WholeSelectObj as w}from"../helpers/selectExtraMap.js";import{WidgetValEnums as O}from"../../../types/enums.js";import{InjectionFilterApiConfig as S,InjectionFilterSearchConfig as b}from"../../../constants/index.js";import j from"./SelectDynamicOption/index.vue.js";import{isEqual as C,cloneDeep as A}from"lodash-es";var L=e({__name:"SelectDynamic",props:{value:{type:[Array,String,Number]},componentCfg:{type:Object}},emits:["update:value"],setup(e,{emit:L}){const P=e,k=f(),{getDynamicSelectData:x}=g(),D=a(),E=l(!1),I=t(S),K=t(b),N=l(1),T=l(),U=l([w]),W=l([]),M=l(),$=l(0),_={class:"select-dynamic-popover"},J=n((()=>D.multiple)),F=n((()=>{const{widgetCfg:e}=P.componentCfg,{dynamicOptionInfo:a={}}=e;return a})),H=n((()=>{const{widgetCfg:e}=P.componentCfg,{showWholeOption:a=!1}=e;return a&&1===N.value})),V=n((()=>$.value>0&&N.value>=$.value)),q=n((()=>{var e;if(Array.isArray(P.value)&&P.value.length>0){const e=P.value;if(B(e),!J.value&&1==e.length){const a=U.value.find((a=>a.value===e[0]));return JSON.stringify(a)}return U.value.filter((a=>e.includes(a.value)))}return B([]),null!=(e=P.value)?e:null})),z=n((()=>{if(Object.keys(F.value).length>0){const{defaultParams:e=[]}=F.value;return!h(e)}return!0}));function B(e){U.value.forEach((a=>{a.actived=!1,Array.isArray(e)&&e.includes(a.value)&&(a.actived=!0)}))}function G(e){const{widgetCfg:a}=P.componentCfg,{linkageFieldKeys:l=[]}=a;C(P.value,e)||(l.forEach((e=>{const a=K.value.find((a=>a.columnName===e));a&&a.value&&(a.value=null)})),L("update:value",e))}async function Q(e){N.value=e,await R(M.value,N.value)}async function R(e,a){try{if(Object.keys(F.value).length>0){const{autograph:l,dataSourceId:t,dataSourceType:n,filterKeys:u,defaultParams:o=[],showKeys:i,valueKey:r}=F.value;let s={wordbookId:t,autograph:l,wordbookType:n,fieldKeys:u,page:a};u.length>0&&(s[u[0]]=e),E.value=!0;if(h(o)){const e=o.map((e=>e.value)).filter((e=>e.includes("${")));e.map((e=>e.match(/\$\{(.+?)\}/)[1])).forEach((e=>{const a=K.value.find((a=>a.columnName===e));a&&a.value&&a.value!==O.WHOLE&&(s[e]=a.value)}))}let c=await x(s,I);if(c){const{fieldList:e=[],rows:a=[],total:l=0}=c.map,t=a.map((e=>({...e,label:e[i[0]],value:e[r]}))),n=A(t);H.value&&t.unshift(w),T.value=null!=e?e:[],U.value=null!=t?t:[],W.value=n,$.value=l}}}catch(e){k.error(`异步数据源下拉框数据请求失败:${e}`),console.log(e)}finally{E.value=!1}}const X=y((async e=>{await async function(e){M.value=e.trim(),N.value=1,await R(M.value,N.value)}(e)}),300);async function Y(){Object.keys(F.value).length>0&&I&&await R("",N.value)}async function Z(){L("update:value",null),await Y()}function ee(e){e&&Y()}function ae({option:e,handleClose:a}){if(J.value){const l=e.value;return p(d,{style:{padding:"0 8px"},closable:!0,onClose:e=>{if(e.stopPropagation(),a(),Array.isArray(P.value)&&P.value.length>0){const e=P.value,a=e.indexOf(l.value);if(a>-1){const l=e.splice(0,a);L("update:value",l.length>0?l:null)}}}},{default:()=>p("div",l.label)})}const l=e.value?JSON.parse(e.value):{label:""};return p("div",l.label)}return z.value&&Y(),(e,a)=>(u(),o(i(m),r(i(D),{value:i(q),"onUpdate:value":a[0]||(a[0]=e=>s(q)?q.value=e:null),remote:"",loading:E.value,"render-tag":ae,"menu-props":_,onSearch:i(X),onClear:Z,"onUpdate:show":ee}),{empty:c((()=>[v(j,r(i(D),{dynamicOptionInfo:i(F),fieldTitleList:T.value,optionList:U.value,isMultiple:i(J),curPage:N.value,isLastPage:i(V),isShowWhole:i(H),onUpdateSelect:G,onUpdatePage:Q}),null,16,["dynamicOptionInfo","fieldTitleList","optionList","isMultiple","curPage","isLastPage","isShowWhole"])])),_:1},16,["value","loading","onSearch"]))}});export{L as default};
1
+ import{defineComponent as e,useAttrs as a,ref as l,inject as t,computed as n,nextTick as u,openBlock as o,createBlock as i,unref as r,mergeProps as s,isRef as v,withCtx as c,createVNode as p,h as f}from"vue";import{useMessage as m,NSelect as d,NTag as y}from"naive-ui";import{useDebounceFn as g}from"@vueuse/core";import h from"../../../hooks/useAsyncData.js";import{judgmentVariable as w}from"../helpers/setDefaultValue.js";import{WholeSelectObj as O}from"../helpers/selectExtraMap.js";import{WidgetValEnums as S}from"../../../types/enums.js";import{InjectionFilterApiConfig as b,InjectionFilterSearchConfig as j}from"../../../constants/index.js";import C from"./SelectDynamicOption/index.vue.js";import{isEqual as N,cloneDeep as A}from"lodash-es";var L=e({__name:"SelectDynamic",props:{value:{type:[Array,String,Number]},componentCfg:{type:Object}},emits:["update:value"],setup(e,{emit:L}){const P=e,k=m(),{getDynamicSelectData:x}=h(),D=a(),J=l(!1),E=t(b),I=t(j),K=l(1),T=l(),U=l([JSON.parse(JSON.stringify(O))]),W=l([]),M=l(),$=l(0),_={class:"select-dynamic-popover"},F=n((()=>D.multiple)),H=n((()=>{const{widgetCfg:e}=P.componentCfg,{dynamicOptionInfo:a={}}=e;return a})),V=n((()=>{const{widgetCfg:e}=P.componentCfg,{showWholeOption:a=!1}=e;return a&&1===K.value})),q=n((()=>$.value>0&&K.value>=$.value)),z=n((()=>{var e;if(Array.isArray(P.value)&&P.value.length>0){const e=P.value;if(G(e),!F.value&&1==e.length){const a=U.value.find((a=>a.value===e[0]));return JSON.stringify(a)}return U.value.filter((a=>e.includes(a.value)))}return G([]),null!=(e=P.value)?e:null})),B=n((()=>{if(Object.keys(H.value).length>0){const{defaultParams:e=[]}=H.value;return w(e)&&!P.value}return!1}));function G(e){U.value.forEach((a=>{a.actived=!1,Array.isArray(e)&&e.includes(a.value)&&(a.actived=!0)}))}function Q(e){const{widgetCfg:a}=P.componentCfg,{linkageFieldKeys:l=[]}=a;N(P.value,e)||(l.forEach((e=>{const a=I.value.find((a=>a.columnName===e));a&&a.value&&(a.value=null)})),L("update:value",e))}async function R(e){K.value=e,await X(M.value,K.value)}async function X(e,a){try{if(Object.keys(H.value).length>0){const{autograph:l,dataSourceId:t,dataSourceType:n,filterKeys:u,defaultParams:o=[],showKeys:i,valueKey:r}=H.value;let s={wordbookId:t,autograph:l,wordbookType:n,fieldKeys:u,page:a};u.length>0&&(s[u[0]]=e),J.value=!0;if(w(o)){const e=o.map((e=>e.value)).filter((e=>e.includes("${")));e.map((e=>e.match(/\$\{(.+?)\}/)[1])).forEach((e=>{const a=I.value.find((a=>a.columnName===e));a&&a.value&&a.value!==S.WHOLE&&(s[e]=a.value)}))}let v=await x(s,E);if(v){const{fieldList:e=[],rows:a=[],total:l=0}=v.map,t=a.map((e=>({...e,label:e[i[0]],value:e[r]}))),n=A(t);V.value&&t.unshift(JSON.parse(JSON.stringify(O))),T.value=null!=e?e:[],U.value=null!=t?t:[],W.value=n,$.value=l}}}catch(e){k.error(`异步数据源下拉框数据请求失败:${e}`),console.log(e)}finally{J.value=!1}}const Y=g((async e=>{await async function(e){M.value=e.trim(),K.value=1,await X(M.value,K.value)}(e)}),300);async function Z(){Object.keys(H.value).length>0&&E&&await X("",K.value)}async function ee(){L("update:value",null),await Z()}function ae(e){e&&Z()}function le({option:e,handleClose:a}){if(F.value){const l=e.value;return f(y,{style:{padding:"0 8px"},closable:!0,onClose:e=>{if(e.stopPropagation(),a(),Array.isArray(P.value)&&P.value.length>0){const e=P.value,a=e.indexOf(l.value);if(a>-1){const l=e.splice(0,a);L("update:value",l.length>0?l:null)}}}},{default:()=>f("div",l.label)})}const l=e.value?JSON.parse(e.value):{label:""};return f("div",l.label)}return u((()=>{B.value||Z()})),(e,a)=>(o(),i(r(d),s(r(D),{value:r(z),"onUpdate:value":a[0]||(a[0]=e=>v(z)?z.value=e:null),remote:"",loading:J.value,"render-tag":le,"menu-props":_,onSearch:r(Y),onClear:ee,"onUpdate:show":ae}),{empty:c((()=>[p(C,s(r(D),{dynamicOptionInfo:r(H),fieldTitleList:T.value,optionList:U.value,isMultiple:r(F),curPage:K.value,isLastPage:r(q),isShowWhole:r(V),onUpdateSelect:Q,onUpdatePage:R}),null,16,["dynamicOptionInfo","fieldTitleList","optionList","isMultiple","curPage","isLastPage","isShowWhole"])])),_:1},16,["value","loading","onSearch"]))}});export{L as default};
@@ -1104,7 +1104,7 @@ declare const SelectDynamic: import("vue").DefineComponent<{
1104
1104
  isShowWhole: import("vue").ComputedRef<any>;
1105
1105
  isLastPage: import("vue").ComputedRef<boolean>;
1106
1106
  valueCp: import("vue").ComputedRef<string | number | any[] | null>;
1107
- isInitRequest: import("vue").ComputedRef<boolean>;
1107
+ isForbidRequest: import("vue").ComputedRef<boolean>;
1108
1108
  setOptionActive: (selectIds: string[]) => void;
1109
1109
  handleUpdateSelect: (value: string[] | null) => void;
1110
1110
  handleUpdatePage: (page: number) => Promise<void>;
@@ -112,7 +112,7 @@ export declare const WidgetCfgMaps: Map<string, {
112
112
  isShowWhole: import("vue").ComputedRef<any>;
113
113
  isLastPage: import("vue").ComputedRef<boolean>;
114
114
  valueCp: import("vue").ComputedRef<string | number | any[] | null>;
115
- isInitRequest: import("vue").ComputedRef<boolean>;
115
+ isForbidRequest: import("vue").ComputedRef<boolean>;
116
116
  setOptionActive: (selectIds: string[]) => void;
117
117
  handleUpdateSelect: (value: string[] | null) => void;
118
118
  handleUpdatePage: (page: number) => Promise<void>;
@@ -1 +1 @@
1
- var e="@cnhis-design-vue/shared",i="3.1.46-beta.2",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.46-beta.2",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};
1
+ var e="@cnhis-design-vue/shared",i="3.1.46-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.46-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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.1.46-beta.2",
3
+ "version": "3.1.46-beta.3",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -61,5 +61,5 @@
61
61
  "iOS 7",
62
62
  "last 3 iOS versions"
63
63
  ],
64
- "gitHead": "64ab5241346c64cf86b529eaf3641b5fd7e3db2d"
64
+ "gitHead": "b888361540caa7dbcf5aff2005488045fed7c121"
65
65
  }