cnhis-design-vue 3.1.43-beta.3 → 3.1.43-beta.6

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/es/components/base-search/index.d.ts +46 -114
  2. package/es/components/base-search/src/index.vue.d.ts +46 -114
  3. package/es/components/base-search/src/index.vue.js +1 -1
  4. package/es/components/base-search/style/index.css +1 -1
  5. package/es/components/classification/index.d.ts +7 -6
  6. package/es/components/classification/src/components/search-filter/index.vue.d.ts +1 -0
  7. package/es/components/classification/src/components/set-classification/index.vue.d.ts +6 -5
  8. package/es/components/classification/src/components/set-classification/index.vue.js +1 -1
  9. package/es/components/classification/src/components/table-modal/index.vue.d.ts +2 -2
  10. package/es/components/classification/src/index.vue.d.ts +7 -6
  11. package/es/components/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +77 -0
  12. package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +93 -0
  13. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +2 -2
  14. package/es/components/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +3 -0
  15. package/es/components/iho-table/src/plugins/filterRenderPlugin/dist/index.d.ts +3 -0
  16. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/dist/index.d.ts +3 -0
  17. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  18. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +1 -0
  19. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -1
  20. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +3 -0
  21. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +3 -0
  22. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
  23. package/es/components/iho-table/src/utils/dist/index.d.ts +44 -0
  24. package/es/components/index.css +1 -1
  25. package/es/components/quick-search/index.d.ts +54 -224
  26. package/es/components/quick-search/src/index.vue.d.ts +54 -224
  27. package/es/components/quick-search/src/index.vue.js +1 -1
  28. package/es/components/quick-search/style/index.css +1 -1
  29. package/es/components/scale-view/src/components/formitem/dist/r-address.d.ts +36 -0
  30. package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +36 -0
  31. package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +82 -0
  32. package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +57 -0
  33. package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +57 -0
  34. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +1 -0
  35. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +1 -0
  36. package/es/components/table-filter/src/components/render-widget/components/Date.vue.d.ts +109 -0
  37. package/es/components/table-filter/src/components/render-widget/components/Date.vue.js +1 -0
  38. package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue.d.ts +67 -0
  39. package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue.js +1 -0
  40. package/es/components/table-filter/src/components/render-widget/components/Select.vue.d.ts +27 -7
  41. package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +1 -1
  42. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +3 -2
  43. package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
  44. package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +13 -3
  45. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  46. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +134 -15
  47. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  48. package/es/components/table-filter/src/hooks/useAdvanced.d.ts +6 -2
  49. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
  50. package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
  51. package/es/components/table-filter/src/types/enums.d.ts +1 -0
  52. package/es/components/table-filter/src/types/enums.js +1 -1
  53. package/es/components/table-filter/src/types/index.d.ts +26 -87
  54. package/es/shared/package.json.js +1 -1
  55. package/package.json +2 -2
@@ -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");
@@ -50,6 +50,7 @@ declare const _default: import("vue").DefineComponent<{
50
50
  DATE: string;
51
51
  DATE_TIME: string;
52
52
  CHECKBOX_GROUP: string;
53
+ INPUTNUMBER_GROUP: string;
53
54
  };
54
55
  WidgetValEnums: {
55
56
  CUSTOM: string;
@@ -170,6 +170,7 @@ declare const _default: import("vue").DefineComponent<{
170
170
  DATE: string;
171
171
  DATE_TIME: string;
172
172
  CHECKBOX_GROUP: string;
173
+ INPUTNUMBER_GROUP: string;
173
174
  };
174
175
  WidgetValEnums: {
175
176
  CUSTOM: string;
@@ -0,0 +1,109 @@
1
+ import { PropType } from 'vue';
2
+ declare type ITypeDate = 'date' | 'datetime' | 'daterange' | 'datetimerange' | 'month' | 'monthrange' | 'year' | 'quarter';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ type: {
5
+ type: PropType<ITypeDate>;
6
+ default: string;
7
+ };
8
+ clearable: {
9
+ type: BooleanConstructor;
10
+ default: boolean;
11
+ };
12
+ valueFormat: {
13
+ type: StringConstructor;
14
+ default: string;
15
+ };
16
+ startPlaceholder: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ endPlaceholder: {
21
+ type: StringConstructor;
22
+ default: string;
23
+ };
24
+ placeholder: {
25
+ type: StringConstructor;
26
+ default: string;
27
+ };
28
+ value: {
29
+ type: StringConstructor;
30
+ default: string;
31
+ };
32
+ }, {
33
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
34
+ type: {
35
+ type: PropType<ITypeDate>;
36
+ default: string;
37
+ };
38
+ clearable: {
39
+ type: BooleanConstructor;
40
+ default: boolean;
41
+ };
42
+ valueFormat: {
43
+ type: StringConstructor;
44
+ default: string;
45
+ };
46
+ startPlaceholder: {
47
+ type: StringConstructor;
48
+ default: string;
49
+ };
50
+ endPlaceholder: {
51
+ type: StringConstructor;
52
+ default: string;
53
+ };
54
+ placeholder: {
55
+ type: StringConstructor;
56
+ default: string;
57
+ };
58
+ value: {
59
+ type: StringConstructor;
60
+ default: string;
61
+ };
62
+ }>> & {
63
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
64
+ }>>;
65
+ emit: (event: "update:value", ...args: any[]) => void;
66
+ valueCp: import("vue").Ref<any>;
67
+ handleChange: (val: any) => false | undefined;
68
+ NDatePicker: any;
69
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
70
+ type: {
71
+ type: PropType<ITypeDate>;
72
+ default: string;
73
+ };
74
+ clearable: {
75
+ type: BooleanConstructor;
76
+ default: boolean;
77
+ };
78
+ valueFormat: {
79
+ type: StringConstructor;
80
+ default: string;
81
+ };
82
+ startPlaceholder: {
83
+ type: StringConstructor;
84
+ default: string;
85
+ };
86
+ endPlaceholder: {
87
+ type: StringConstructor;
88
+ default: string;
89
+ };
90
+ placeholder: {
91
+ type: StringConstructor;
92
+ default: string;
93
+ };
94
+ value: {
95
+ type: StringConstructor;
96
+ default: string;
97
+ };
98
+ }>> & {
99
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
100
+ }, {
101
+ type: ITypeDate;
102
+ value: string;
103
+ placeholder: string;
104
+ clearable: boolean;
105
+ startPlaceholder: string;
106
+ endPlaceholder: string;
107
+ valueFormat: string;
108
+ }>;
109
+ export default _default;
@@ -0,0 +1 @@
1
+ import{defineComponent as e,ref as a,watch as l,openBlock as t,createBlock as r,unref as u}from"vue";import{NDatePicker as o}from"naive-ui";import d from"moment";import{isString as m,isArray as p}from"lodash-es";import i from"../../../../../../_virtual/plugin-vue_export-helper.js";var n=i(e({__name:"Date",props:{type:{type:String,default:"date"},clearable:{type:Boolean,default:!1},valueFormat:{type:String,default:"yyyy-MM-dd"},startPlaceholder:{type:String,default:"起始"},endPlaceholder:{type:String,default:"截止"},placeholder:{type:String,default:"请输入"},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:i}){const n=e,v=a();function f(e){if(v.value=e,!e)return!1;if(p(e)){const[a,l]=e;return i("update:value",`${d(a).format("YYYY-MM-DD HH:mm:ss")} ~ ${d(l).format("YYYY-MM-DD HH:mm:ss")}`),!1}i("update:value",`${d(e).format("YYYY-MM-DD HH:mm:ss")}`)}return l((()=>n.value),(e=>{if(e&&m(e)){if(e.includes("~")){const[a,l]=e.split("~"),t=d(a.trim()).valueOf(),r=d(l.trim()).valueOf();return void(v.value=[t,r])}v.value=d(e).valueOf()}else v.value=null}),{immediate:!0}),(a,l)=>(t(),r(u(o),{type:e.type,clearable:e.clearable,valueFormat:e.valueFormat,startPlaceholder:e.startPlaceholder,endPlaceholder:e.endPlaceholder,placeholder:e.placeholder,value:v.value,"onUpdate:value":f},null,8,["type","clearable","valueFormat","startPlaceholder","endPlaceholder","placeholder","value"]))}}),[["__file","Date.vue"]]);export{n as default};
@@ -0,0 +1,67 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ startPlaceholder: {
3
+ type: StringConstructor;
4
+ default: string;
5
+ };
6
+ endPlaceholder: {
7
+ type: StringConstructor;
8
+ default: string;
9
+ };
10
+ value: {
11
+ type: StringConstructor;
12
+ default: string;
13
+ };
14
+ }, {
15
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
16
+ startPlaceholder: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ endPlaceholder: {
21
+ type: StringConstructor;
22
+ default: string;
23
+ };
24
+ value: {
25
+ type: StringConstructor;
26
+ default: string;
27
+ };
28
+ }>> & {
29
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
30
+ }>>;
31
+ startNumber: import("vue").Ref<any>;
32
+ endNumber: import("vue").Ref<any>;
33
+ emit: (event: "update:value", ...args: any[]) => void;
34
+ handleChange: (val: number | null, key: string) => void;
35
+ NInputGroup: import("vue").DefineComponent<{
36
+ [x: string]: never;
37
+ [x: number]: never;
38
+ [x: symbol]: never;
39
+ }, {
40
+ mergedClsPrefix: import("vue").ComputedRef<string>;
41
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
42
+ [x: string]: never;
43
+ [x: number]: never;
44
+ [x: symbol]: never;
45
+ }>>, {}>;
46
+ NInputNumber: any;
47
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
48
+ startPlaceholder: {
49
+ type: StringConstructor;
50
+ default: string;
51
+ };
52
+ endPlaceholder: {
53
+ type: StringConstructor;
54
+ default: string;
55
+ };
56
+ value: {
57
+ type: StringConstructor;
58
+ default: string;
59
+ };
60
+ }>> & {
61
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
62
+ }, {
63
+ value: string;
64
+ startPlaceholder: string;
65
+ endPlaceholder: string;
66
+ }>;
67
+ export default _default;
@@ -0,0 +1 @@
1
+ import{defineComponent as e,ref as l,watch as u,openBlock as r,createBlock as a,unref as t,withCtx as n,createVNode as i,createElementVNode as o}from"vue";import{NInputGroup as p,NInputNumber as d}from"naive-ui";import{isString as v}from"lodash-es";import m from"../../../../../../_virtual/plugin-vue_export-helper.js";const s=o("span",{class:"divider"}," ~ ",-1);var c=m(e({__name:"InputNumberGroup",props:{startPlaceholder:{type:String,default:"请输入"},endPlaceholder:{type:String,default:"请输入"},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:o}){const m=e,c=l(),f=l();function h(e,l){var u,r;let a="";switch(l){case"startNumber":a=`${e} ~ ${null!=(u=f.value)?u:""}`;break;case"endNumber":a=`${null!=(r=c.value)?r:""} ~ ${e}`}o("update:value",a)}return u((()=>m.value),(e=>{if(e&&v(e)&&e.includes("~")){const[l,u]=e.split("~");return l.trim()&&(c.value=Number(l.trim())),void(u.trim()&&(f.value=Number(u.trim())))}c.value=f.value=null}),{immediate:!0}),(l,u)=>(r(),a(t(p),{class:"render-widget-input-number-group"},{default:n((()=>[i(t(d),{placeholder:e.startPlaceholder,value:c.value,"onUpdate:value":u[0]||(u[0]=e=>h(e,"startNumber"))},null,8,["placeholder","value"]),s,i(t(d),{placeholder:e.endPlaceholder,value:f.value,"onUpdate:value":u[1]||(u[1]=e=>h(e,"endNumber"))},null,8,["placeholder","value"])])),_:1}))}}),[["__file","InputNumberGroup.vue"]]);export{c as default};
@@ -1,8 +1,9 @@
1
+ import { SelectOption } from 'naive-ui';
1
2
  declare const _default: import("vue").DefineComponent<{
2
3
  value: {
3
4
  type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
4
5
  };
5
- componentCfg: {
6
+ filterApiConfig: {
6
7
  type: ObjectConstructor;
7
8
  };
8
9
  }, {
@@ -10,25 +11,44 @@ declare const _default: import("vue").DefineComponent<{
10
11
  value: {
11
12
  type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
12
13
  };
13
- componentCfg: {
14
+ filterApiConfig: {
14
15
  type: ObjectConstructor;
15
16
  };
16
17
  }>> & {
17
18
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
19
+ onChangeInitState?: ((...args: any[]) => any) | undefined;
18
20
  }>>;
19
- emit: (event: "update:value", ...args: any[]) => void;
21
+ handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
22
+ $attrs: {
23
+ [x: string]: unknown;
24
+ };
25
+ emit: (event: "update:value" | "changeInitState", ...args: any[]) => void;
26
+ selectOptions: import("vue").Ref<any[]>;
27
+ isRemote: import("vue").Ref<boolean>;
28
+ isLoading: import("vue").Ref<boolean>;
20
29
  valueCp: import("vue").WritableComputedRef<any>;
21
- maxTagCount: import("vue").ComputedRef<0 | 1 | undefined>;
22
- maxTagPlaceholder: () => string | undefined;
30
+ maxTagCount: import("vue").ComputedRef<"responsive" | undefined>;
31
+ searchOptions: (keyword: string) => Promise<any>;
32
+ _handleSearch: (query: string) => Promise<void>;
33
+ handleSearch: (query: string) => Promise<void>;
34
+ handleInitData: () => Promise<void>;
35
+ renderLabel: (option: SelectOption) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
36
+ [key: string]: any;
37
+ }>;
38
+ renderTag: ({ option, handleClose }: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
39
+ [key: string]: any;
40
+ }>;
41
+ init: () => Promise<void>;
23
42
  NSelect: any;
24
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
43
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "changeInitState")[], "update:value" | "changeInitState", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
25
44
  value: {
26
45
  type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
27
46
  };
28
- componentCfg: {
47
+ filterApiConfig: {
29
48
  type: ObjectConstructor;
30
49
  };
31
50
  }>> & {
32
51
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
52
+ onChangeInitState?: ((...args: any[]) => any) | undefined;
33
53
  }, {}>;
34
54
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,computed as t,openBlock as u,createBlock as a,unref as r,mergeProps as l,isRef as n}from"vue";import{NSelect as p}from"naive-ui";import v from"../../../../../../_virtual/plugin-vue_export-helper.js";var o=v(e({__name:"Select",props:{value:{type:[Array,String,Number]},componentCfg:{type:Object}},emits:["update:value"],setup(e,{emit:v}){const o=e,i=t({set(e){v("update:value",e)},get:()=>o.value}),m=t((()=>{if(!Array.isArray(o.value))return;return(o.value.length||0)>1?0:1}));return(e,t)=>(u(),a(r(p),l(e.$attrs,{value:r(i),"onUpdate:value":t[0]||(t[0]=e=>n(i)?i.value=e:null),"max-tag-count":r(m)}),null,16,["value","max-tag-count"]))}}),[["__file","Select.vue"]]);export{o as default};
1
+ import{defineComponent as e,useAttrs as a,ref as t,computed as n,openBlock as i,createBlock as l,unref as o,mergeProps as u,isRef as r,h as s}from"vue";import{NSelect as c,NTag as p}from"naive-ui";import{useDebounceFn as v}from"@vueuse/core";import d from"../../../hooks/useMixins.js";import f from"../../../../../../_virtual/plugin-vue_export-helper.js";var m=f(e({__name:"Select",props:{value:{type:[Array,String,Number]},filterApiConfig:{type:Object}},emits:["update:value","changeInitState"],setup(e,{emit:f}){const m=e,{handleGetConfigApi:y}=d(),g=a(),h=t([]),b=t(!1),w=t(!1),I=n({set(e){f("update:value",e)},get:()=>m.value}),S=n((()=>{if(!Array.isArray(m.value))return;return(m.value.length||0)>1?"responsive":void 0}));async function A(e){try{if(g.dynamicOptionInfo){const{autograph:a,dataSourceId:t,dataSourceType:n,filterKeys:i,showKeys:l,valueKey:o}=g.dynamicOptionInfo;let u={wordbookId:t,autograph:a,wordbookType:n,fieldKeys:i,keyword:e,page:1};w.value=!0;let r=await y(u,"requestDynamicSelect",{},m.filterApiConfig);if(r){const{fieldList:e,rows:a}=r,t=a.map((e=>({...e,label:e[l[0]],value:e[o]})));return h.value=t,t}}}catch(e){console.log(e)}finally{w.value=!1}}const C=v((async e=>{await async function(e){const{manualMapping:a}=g;if(a)return void(h.value=h.value.filter((a=>a.label.includes(e.trim()))));const t=e.trim();await A(t)}(e)}),300);async function O(){const{manualMapping:e,dynamicOptionInfo:a,valueList:t}=g;if(e&&Array.isArray(t))return b.value=!1,void(h.value=t.map((({value:e,label:a})=>({value:e,label:a}))));Object.keys(a).length>0&&m.filterApiConfig&&(b.value=!0,await A(""))}function _(e){const{manualMapping:a}=g;if(a)return s("div",e.label);const{showKeys:t=[]}=g.dynamicOptionInfo;return g.dynamicOptionInfo&&t.length>0?s("div",{class:"select-widget-dynamic-option"},t.map((a=>s("span",{class:"select-widget-dynamic-item"},e[a])))):s("div",e.label)}function k({option:e,handleClose:a}){const{multiple:t}=g;return t?s(p,{style:{padding:"0 8px"},closable:!0,onClose:e=>{e.stopPropagation(),a()}},{default:()=>s("div",e.label)}):s("div",e.label)}return async function(){const{manualMapping:e,defValue:a,defValueUnit:t,_frontId:n,isInit:i}=g;if(await O(),!i){if(e)return f("update:value",a),void f("changeInitState",n,!0);if(t)switch(t){case"FIRST":{const e=h.value[0];f("update:value",[e.value]),f("changeInitState",n,!0);break}}}}(),(e,a)=>(i(),l(o(c),u(o(g),{value:o(I),"onUpdate:value":a[0]||(a[0]=e=>r(I)?I.value=e:null),loading:w.value,"max-tag-count":o(S),options:h.value,remote:b.value,"render-label":_,"render-tag":k,onSearch:o(C),onClear:O}),null,16,["value","loading","max-tag-count","options","remote","onSearch"]))}}),[["__file","Select.vue"]]);export{m as default};
@@ -1,3 +1,4 @@
1
1
  import CheckboxGroup from './CheckboxGroup.vue';
2
- import Select from './Select.vue';
3
- export { CheckboxGroup, Select };
2
+ import InputNumberGroup from './InputNumberGroup.vue';
3
+ import Date from './Date.vue';
4
+ export { CheckboxGroup, InputNumberGroup, Date };
@@ -1 +1 @@
1
- export{default as CheckboxGroup}from"./CheckboxGroup.vue.js";export{default as Select}from"./Select.vue.js";
1
+ export{default as CheckboxGroup}from"./CheckboxGroup.vue.js";export{default as InputNumberGroup}from"./InputNumberGroup.vue.js";export{default as Date}from"./Date.vue.js";
@@ -6,19 +6,25 @@ declare const _default: import("vue").DefineComponent<{
6
6
  modelValue: {
7
7
  type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
8
8
  };
9
+ filterApiConfig: {
10
+ type: ObjectConstructor;
11
+ };
9
12
  }, any, {
10
13
  initialProps: {};
11
14
  }, {
12
15
  valueCp(): any;
13
16
  }, {
14
17
  search(): void;
15
- getEleWidth(cfg: any): string | undefined;
18
+ getEleWidth(cfg: any): {
19
+ width: string;
20
+ } | undefined;
16
21
  initComponentProps(cfg: any): void;
17
22
  generateWidget(cfg: any): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
18
23
  [key: string]: any;
19
24
  }> | null;
20
- handleUpdate(val: any, widgetType: any, defValueUnit: any): void;
21
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "outFilterChange")[], "update:modelValue" | "outFilterChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
25
+ handleUpdate(val: any): void;
26
+ handleChangeInitState(_frontId: any, bool: any): void;
27
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "outFilterChange" | "changeInit")[], "update:modelValue" | "outFilterChange" | "changeInit", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
22
28
  cfg: {
23
29
  type: ObjectConstructor;
24
30
  required: true;
@@ -26,8 +32,12 @@ declare const _default: import("vue").DefineComponent<{
26
32
  modelValue: {
27
33
  type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
28
34
  };
35
+ filterApiConfig: {
36
+ type: ObjectConstructor;
37
+ };
29
38
  }>> & {
30
39
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
31
40
  onOutFilterChange?: ((...args: any[]) => any) | undefined;
41
+ onChangeInit?: ((...args: any[]) => any) | undefined;
32
42
  }, {}>;
33
43
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,h as t}from"vue";import{WidgetTypeEnums as i}from"../../types/enums.js";import{WidgetCfgMaps as r,formatItemData as a}from"./widgetCfgMaps.js";import l from"moment";import s from"../../../../../_virtual/plugin-vue_export-helper.js";const n=[i.DATE,i.DATE_TIME,i.CHECKBOX_GROUP];var o=s(e({props:{cfg:{type:Object,required:!0},modelValue:{type:[Array,String,Number]}},emits:["update:modelValue","outFilterChange"],computed:{valueCp(){const{widgetType:e}=this.cfg;return[i.DATE,i.DATE_TIME].includes(e)?this.cfg.value?l(this.cfg.value).valueOf():null:this.cfg.value}},data:()=>({initialProps:{}}),methods:{search(){this.$emit("outFilterChange")},getEleWidth(e){const{widgetType:t}=e;if(!n.includes(t))return`${e.advanceColWidth||200}px`},initComponentProps(e){const{widgetType:t,alias:i,title:a,placeholder:l,widgetCfg:s}=e,{props:n,handlerProps:o}=r.get(t);let p={...n};o&&(p=o(p,{...s,title:i||a})),l&&(p.placeholder=l),this.initialProps=p,p.value&&(this.valueCp=p.value)},generateWidget(e){const{widgetType:i}=e,{defValueUnit:a}=e.widgetCfg||{};if(!r.has(i))return null;const{value:l}=e,{component:s,style:n,eventsBySearch:o=[]}=r.get(i),p={...this.initialProps,value:l},u=o.reduce(((e,t)=>{const{name:i,handler:r}=t;let a=this.search;return r&&(a=e=>{r(e,this.search,p)}),{...e,[`on${i}`]:a}}),{});return t(s,{...n,...p,style:{width:this.getEleWidth(e)},value:this.valueCp,"onUpdate:value":e=>this.handleUpdate(e,i,a),...u})},handleUpdate(e,t,i){const r=a(e,t);this.$emit("update:modelValue",r)}},created(){this.initComponentProps(this.cfg)},render(){return this.generateWidget(this.cfg)}}),[["__file","index.vue"]]);export{o as default};
1
+ import{defineComponent as e,h as t}from"vue";import{WidgetTypeEnums as i}from"../../types/enums.js";import{WidgetCfgMaps as r}from"./widgetCfgMaps.js";import n from"../../../../../_virtual/plugin-vue_export-helper.js";const a=[i.DATE,i.DATE_TIME,i.CHECKBOX_GROUP];var l=n(e({props:{cfg:{type:Object,required:!0},modelValue:{type:[Array,String,Number]},filterApiConfig:{type:Object}},emits:["update:modelValue","outFilterChange","changeInit"],computed:{valueCp(){return this.cfg.value}},data:()=>({initialProps:{}}),methods:{search(){this.$emit("outFilterChange")},getEleWidth(e){var t;const{widgetType:i,rangeFilter:r}=e;if(!a.includes(i))return r?void 0:{width:`${null!=(t=e.advanceColWidth)?t:200}px`}},initComponentProps(e){const{_frontId:t,widgetType:i,alias:n,title:a,placeholder:l,widgetCfg:s,rangeFilter:o}=e,{props:h,handlerProps:p}=r.get(i);let d={...h};p&&(d=p(d,{...s,title:n||a,rangeFilter:o,_frontId:t})),!o&&l&&(d.placeholder=l),this.initialProps=d,d.value&&(this.valueCp=d.value)},generateWidget(e){const{widgetType:i}=e;if(!r.has(i))return null;const{value:n}=e,{component:a,style:l,eventsBySearch:s=[]}=r.get(i),o={...this.initialProps,value:n,filterApiConfig:this.filterApiConfig},h=s.reduce(((e,t)=>{const{name:i,handler:r}=t;let n=this.search;return r&&(n=e=>{r(e,this.search,o)}),{...e,[`on${i}`]:n}}),{});return t(a,{...l,...o,style:this.getEleWidth(e),value:this.valueCp,"onUpdate:value":e=>this.handleUpdate(e),onChangeInitState:(...e)=>this.handleChangeInitState(...e),...h})},handleUpdate(e){this.$emit("update:modelValue",e)},handleChangeInitState(e,t){this.$emit("changeInit",e,t)}},created(){this.initComponentProps(this.cfg)},render(){return this.generateWidget(this.cfg)}}),[["__file","index.vue"]]);export{l as default};
@@ -3,7 +3,6 @@ export declare const WidgetCfgMaps: Map<string, {
3
3
  component: any;
4
4
  props: {
5
5
  clearable: boolean;
6
- options?: undefined;
7
6
  filterable?: undefined;
8
7
  multiple?: undefined;
9
8
  type?: undefined;
@@ -21,7 +20,7 @@ export declare const WidgetCfgMaps: Map<string, {
21
20
  value: {
22
21
  type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
23
22
  };
24
- componentCfg: {
23
+ filterApiConfig: {
25
24
  type: ObjectConstructor;
26
25
  };
27
26
  }, {
@@ -29,30 +28,48 @@ export declare const WidgetCfgMaps: Map<string, {
29
28
  value: {
30
29
  type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
31
30
  };
32
- componentCfg: {
31
+ filterApiConfig: {
33
32
  type: ObjectConstructor;
34
33
  };
35
34
  }>> & {
36
35
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
36
+ onChangeInitState?: ((...args: any[]) => any) | undefined;
37
37
  }>>;
38
- emit: (event: "update:value", ...args: any[]) => void;
38
+ handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
39
+ $attrs: {
40
+ [x: string]: unknown;
41
+ };
42
+ emit: (event: "update:value" | "changeInitState", ...args: any[]) => void;
43
+ selectOptions: import("vue").Ref<any[]>;
44
+ isRemote: import("vue").Ref<boolean>;
45
+ isLoading: import("vue").Ref<boolean>;
39
46
  valueCp: import("vue").WritableComputedRef<any>;
40
- maxTagCount: import("vue").ComputedRef<0 | 1 | undefined>;
41
- maxTagPlaceholder: () => string | undefined;
47
+ maxTagCount: import("vue").ComputedRef<"responsive" | undefined>;
48
+ searchOptions: (keyword: string) => Promise<any>;
49
+ _handleSearch: (query: string) => Promise<void>;
50
+ handleSearch: (query: string) => Promise<void>;
51
+ handleInitData: () => Promise<void>;
52
+ renderLabel: (option: import("naive-ui").SelectOption) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
53
+ [key: string]: any;
54
+ }>;
55
+ renderTag: ({ option, handleClose }: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
56
+ [key: string]: any;
57
+ }>;
58
+ init: () => Promise<void>;
42
59
  NSelect: any;
43
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
60
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "changeInitState")[], "update:value" | "changeInitState", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
44
61
  value: {
45
62
  type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
46
63
  };
47
- componentCfg: {
64
+ filterApiConfig: {
48
65
  type: ObjectConstructor;
49
66
  };
50
67
  }>> & {
51
68
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
69
+ onChangeInitState?: ((...args: any[]) => any) | undefined;
52
70
  }, {}>;
53
71
  props: {
54
72
  clearable: boolean;
55
- options: never[];
56
73
  filterable: boolean;
57
74
  multiple: boolean;
58
75
  type?: undefined;
@@ -62,20 +79,124 @@ export declare const WidgetCfgMaps: Map<string, {
62
79
  name: string;
63
80
  handler(e: KeyboardEvent, search: funcVoid, props: any): void;
64
81
  }[];
65
- handlerProps(props: any, { valueList, multiple, title }?: any): any;
82
+ handlerProps(props: any, data?: any): any;
66
83
  setDefaultValue: (defaultValue: any) => any;
67
84
  style?: undefined;
68
85
  } | {
69
- component: any;
86
+ component: import("vue").DefineComponent<{
87
+ type: {
88
+ type: import("vue").PropType<"year" | "month" | "quarter" | "date" | "datetime" | "datetimerange" | "daterange" | "monthrange">;
89
+ default: string;
90
+ };
91
+ clearable: {
92
+ type: BooleanConstructor;
93
+ default: boolean;
94
+ };
95
+ valueFormat: {
96
+ type: StringConstructor;
97
+ default: string;
98
+ };
99
+ startPlaceholder: {
100
+ type: StringConstructor;
101
+ default: string;
102
+ };
103
+ endPlaceholder: {
104
+ type: StringConstructor;
105
+ default: string;
106
+ };
107
+ placeholder: {
108
+ type: StringConstructor;
109
+ default: string;
110
+ };
111
+ value: {
112
+ type: StringConstructor;
113
+ default: string;
114
+ };
115
+ }, {
116
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
117
+ type: {
118
+ type: import("vue").PropType<"year" | "month" | "quarter" | "date" | "datetime" | "datetimerange" | "daterange" | "monthrange">;
119
+ default: string;
120
+ };
121
+ clearable: {
122
+ type: BooleanConstructor;
123
+ default: boolean;
124
+ };
125
+ valueFormat: {
126
+ type: StringConstructor;
127
+ default: string;
128
+ };
129
+ startPlaceholder: {
130
+ type: StringConstructor;
131
+ default: string;
132
+ };
133
+ endPlaceholder: {
134
+ type: StringConstructor;
135
+ default: string;
136
+ };
137
+ placeholder: {
138
+ type: StringConstructor;
139
+ default: string;
140
+ };
141
+ value: {
142
+ type: StringConstructor;
143
+ default: string;
144
+ };
145
+ }>> & {
146
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
147
+ }>>;
148
+ emit: (event: "update:value", ...args: any[]) => void;
149
+ valueCp: import("vue").Ref<any>;
150
+ handleChange: (val: any) => false | undefined;
151
+ NDatePicker: any;
152
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
153
+ type: {
154
+ type: import("vue").PropType<"year" | "month" | "quarter" | "date" | "datetime" | "datetimerange" | "daterange" | "monthrange">;
155
+ default: string;
156
+ };
157
+ clearable: {
158
+ type: BooleanConstructor;
159
+ default: boolean;
160
+ };
161
+ valueFormat: {
162
+ type: StringConstructor;
163
+ default: string;
164
+ };
165
+ startPlaceholder: {
166
+ type: StringConstructor;
167
+ default: string;
168
+ };
169
+ endPlaceholder: {
170
+ type: StringConstructor;
171
+ default: string;
172
+ };
173
+ placeholder: {
174
+ type: StringConstructor;
175
+ default: string;
176
+ };
177
+ value: {
178
+ type: StringConstructor;
179
+ default: string;
180
+ };
181
+ }>> & {
182
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
183
+ }, {
184
+ type: "year" | "month" | "quarter" | "date" | "datetime" | "datetimerange" | "daterange" | "monthrange";
185
+ value: string;
186
+ placeholder: string;
187
+ clearable: boolean;
188
+ startPlaceholder: string;
189
+ endPlaceholder: string;
190
+ valueFormat: string;
191
+ }>;
70
192
  props: {
71
193
  type: string;
72
194
  clearable: boolean;
73
195
  valueFormat: string;
74
- options?: undefined;
75
196
  filterable?: undefined;
76
197
  multiple?: undefined;
77
198
  };
78
- handlerProps(props: any, { title }?: any): any;
199
+ handlerProps(props: any, data?: any): any;
79
200
  setDefaultValue(defaultValue: any, defValueUnit: any): any;
80
201
  eventsBySearch?: undefined;
81
202
  style?: undefined;
@@ -183,7 +304,6 @@ export declare const WidgetCfgMaps: Map<string, {
183
304
  }>;
184
305
  props: {
185
306
  clearable?: undefined;
186
- options?: undefined;
187
307
  filterable?: undefined;
188
308
  multiple?: undefined;
189
309
  type?: undefined;
@@ -196,4 +316,3 @@ export declare const WidgetCfgMaps: Map<string, {
196
316
  setDefaultValue: (defaultValue: any) => any;
197
317
  eventsBySearch?: undefined;
198
318
  }>;
199
- export declare const formatItemData: (val: any, widgetType: string) => any;
@@ -1 +1 @@
1
- import{WidgetTypeEnums as e}from"../../types/enums.js";import{DatePresetValEnums as l}from"./enums.js";import{NInputNumber as t,NInput as a,NDatePicker as r}from"naive-ui";import o from"./components/CheckboxGroup.vue.js";import p from"./components/Select.vue.js";import s from"moment";import{presetValToTimestamp as n}from"./helpers/presetValToTimestamp.js";const m=e=>null==e?null:e,u=new Map([[e.INPUT_NUMBER,{component:t,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`输入${l}`}),setDefaultValue:m}],[e.INPUT,{component:a,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`搜索${l}`}),setDefaultValue:m}],[e.SELECT,{component:p,props:{clearable:!0,options:[],filterable:!0,multiple:!1},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:a}=t;a&&l()}}],handlerProps(e,{valueList:l,multiple:t,title:a}={}){const r={...e,placeholder:`请选择${a}`};return Array.isArray(l)&&(r.options=l.map((({value:e,label:l})=>({value:e,label:l})))),t&&(r.multiple=!0),r},setDefaultValue:m}],[e.DATE,{component:r,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps:(e,{title:l}={})=>({...e,placeholder:`请选择${l}`}),setDefaultValue:(e,t)=>t&&t!==l.CUSTOM?n(t,"YYYY-MM-DD HH:mm:ss"):e}],[e.DATE_TIME,{component:r,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps:(e,{title:l}={})=>({...e,placeholder:`请选择${l}`}),setDefaultValue:(e,t)=>t&&t!==l.CUSTOM?n(t,"YYYY-MM-DD HH:mm:ss"):e}],[e.CHECKBOX_GROUP,{component:o,props:{},style:{"line-height":"32px"},handlerProps(e,{valueList:l,multiple:t}={}){const a={...e,multiple:t};return Array.isArray(l)&&(a.options=l.map((({value:e,label:l})=>({value:e,label:l})))),a},setDefaultValue:m}]]),i=(l,t)=>!l||t!==e.DATE&&t!==e.DATE_TIME?l:s(l).format("YYYY-MM-DD HH:mm:ss");export{u as WidgetCfgMaps,i as formatItemData};
1
+ import{WidgetTypeEnums as e}from"../../types/enums.js";import{DatePresetValEnums as t}from"./enums.js";import{NInputNumber as l,NInput as a}from"naive-ui";import r from"./components/CheckboxGroup.vue.js";import n from"./components/InputNumberGroup.vue.js";import o from"./components/Date.vue.js";import p from"./components/Select.vue.js";import{presetValToTimestamp as s}from"./helpers/presetValToTimestamp.js";const m=e=>null==e?null:e,u=new Map([[e.INPUT_NUMBER,{component:l,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,t){"Enter"===e.key&&t()}}],handlerProps:(e,{title:t}={})=>({...e,placeholder:`输入${t}`}),setDefaultValue:m}],[e.INPUTNUMBER_GROUP,{component:n,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,t){"Enter"===e.key&&t()}}],handlerProps:(e,{title:t}={})=>({...e,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}),setDefaultValue:m}],[e.INPUT,{component:a,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,t){"Enter"===e.key&&t()}}],handlerProps:(e,{title:t}={})=>({...e,placeholder:`搜索${t}`}),setDefaultValue:m}],[e.SELECT,{component:p,props:{clearable:!0,filterable:!0,multiple:!1},eventsBySearch:[{name:"change",handler(e,t,l){const{multiple:a}=l;a&&t()}}],handlerProps(e,t={}){const{valueList:l,multiple:a,title:r,manualMapping:n,dynamicOptionInfo:o,defaultValue:p,defValueUnit:s,_frontId:m,isInit:u}=t,i={...e,placeholder:`请选择${r}`,manualMapping:n,dynamicOptionInfo:o,valueList:l,defValue:p,defValueUnit:s,_frontId:m,isInit:u};return a&&(i.multiple=!0),i},setDefaultValue:m}],[e.DATE,{component:o,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,t={}){const{title:l,rangeFilter:a}=t,r={...e,placeholder:`请选择${l}`};return a&&(r.type="daterange",r.startPlaceholder=`起始${l}`,r.endPlaceholder=`截止${l}`),r},setDefaultValue:(e,l)=>l&&l!==t.CUSTOM?s(l,"YYYY-MM-DD HH:mm:ss"):e}],[e.DATE_TIME,{component:o,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,t={}){const{title:l,rangeFilter:a}=t,r={...e,placeholder:`请选择${l}`};return a&&(r.type="datetimerange",r.startPlaceholder=`起始${l}`,r.endPlaceholder=`截止${l}`),r},setDefaultValue:(e,l)=>l&&l!==t.CUSTOM?s(l,"YYYY-MM-DD HH:mm:ss"):e}],[e.CHECKBOX_GROUP,{component:r,props:{},style:{"line-height":"32px"},handlerProps(e,{valueList:t,multiple:l}={}){const a={...e,multiple:l};return Array.isArray(t)&&(a.options=t.map((({value:e,label:t})=>({value:e,label:t})))),a},setDefaultValue:m}]]);export{u as WidgetCfgMaps};