cnhis-design-vue 3.2.9-beta.1 → 3.2.9-beta.14

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 (78) hide show
  1. package/es/components/ai-chat/src/components/ChatMain.js +1 -1
  2. package/es/components/ai-chat/src/types/index.d.ts +8 -7
  3. package/es/components/base-search/index.d.ts +6 -2
  4. package/es/components/base-search/src/index.vue.d.ts +6 -2
  5. package/es/components/button-print/index.d.ts +7 -45
  6. package/es/components/button-print/src/ButtonPrint.vue.d.ts +7 -45
  7. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  8. package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +6 -35
  9. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
  10. package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +1 -5
  11. package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
  12. package/es/components/button-print/src/utils/print.d.ts +4 -3
  13. package/es/components/button-print/src/utils/print.js +1 -1
  14. package/es/components/classification/index.d.ts +3 -1
  15. package/es/components/classification/src/components/search-filter/index.vue.d.ts +2 -0
  16. package/es/components/classification/src/components/set-classification/index.vue.d.ts +2 -0
  17. package/es/components/classification/src/index.vue.d.ts +3 -1
  18. package/es/components/expand-field/index.d.ts +1 -1
  19. package/es/components/expand-field/src/components/form.vue.d.ts +1 -1
  20. package/es/components/expand-field/src/index.vue.d.ts +1 -1
  21. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  22. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  23. package/es/components/field-set/src/FieldColor.vue.d.ts +26 -7
  24. package/es/components/field-set/src/FieldFilter.vue.d.ts +25 -6
  25. package/es/components/field-set/src/FieldSet.vue.d.ts +65 -29
  26. package/es/components/field-set/src/FieldSet.vue2.js +1 -1
  27. package/es/components/field-set/src/components/edit-dialog.vue.d.ts +1 -1
  28. package/es/components/field-set/src/components/table-row.vue.d.ts +24 -1
  29. package/es/components/field-set/src/components/table-row.vue2.js +1 -1
  30. package/es/components/field-set/src/types/index.d.ts +3 -3
  31. package/es/components/field-set/src/utils/index.js +1 -1
  32. package/es/components/iho-chat/index.d.ts +4 -0
  33. package/es/components/iho-chat/src/Index.vue.d.ts +4 -0
  34. package/es/components/iho-chat/src/Index.vue2.js +1 -1
  35. package/es/components/iho-chat/src/api/index.js +1 -1
  36. package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
  37. package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +1 -0
  38. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
  39. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +2 -0
  40. package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
  41. package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
  42. package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
  43. package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
  44. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  45. package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
  46. package/es/components/iho-chat/src/constants/index.d.ts +2 -1
  47. package/es/components/iho-chat/src/constants/index.js +1 -1
  48. package/es/components/iho-chat/src/hooks/useSearchUserList.js +1 -1
  49. package/es/components/iho-chat/src/hooks/useState.js +1 -1
  50. package/es/components/iho-chat/src/types/index.d.ts +1 -0
  51. package/es/components/iho-chat/style/index.css +1 -1
  52. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/index.js +1 -1
  53. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useRowHeight.d.ts +2 -0
  54. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useRowHeight.js +1 -0
  55. package/es/components/iho-table/src/types/index.d.ts +3 -0
  56. package/es/components/iho-table/style/index.css +1 -1
  57. package/es/components/index.css +1 -1
  58. package/es/components/quick-search/index.d.ts +6 -2
  59. package/es/components/quick-search/src/index.vue.d.ts +6 -2
  60. package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +1 -0
  61. package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +1 -0
  62. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +1 -0
  63. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +1 -0
  64. package/es/components/table-filter/src/components/render-widget/components/SelectTree.vue.d.ts +51 -0
  65. package/es/components/table-filter/src/components/render-widget/components/SelectTree.vue.js +1 -0
  66. package/es/components/table-filter/src/components/render-widget/components/SelectTree.vue2.js +1 -0
  67. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +49 -1
  68. package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
  69. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  70. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +65 -0
  71. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  72. package/es/components/table-filter/src/hooks/useAdvanced.d.ts +6 -2
  73. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
  74. package/es/components/table-filter/src/types/enums.d.ts +1 -0
  75. package/es/components/table-filter/src/types/enums.js +1 -1
  76. package/es/components/table-filter/src/types/index.d.ts +1 -0
  77. package/es/shared/package.json.js +1 -1
  78. package/package.json +2 -2
@@ -41,6 +41,9 @@ declare const CQuickSearch: SFCWithInstall<import("vue").DefineComponent<{
41
41
  widgetType: string | null;
42
42
  originType: string | null;
43
43
  valueList: {
44
+ name: string;
45
+ value: any;
46
+ }[] | {
44
47
  value: any;
45
48
  label: any;
46
49
  }[] | undefined;
@@ -55,6 +58,7 @@ declare const CQuickSearch: SFCWithInstall<import("vue").DefineComponent<{
55
58
  linkageFieldKeys: string[];
56
59
  };
57
60
  rangeFilter: boolean | undefined;
61
+ componentProps: any;
58
62
  unit: any;
59
63
  isAccurateSearchVal: boolean;
60
64
  _extendData: import("..").IExtendConfigurationType;
@@ -69,7 +73,7 @@ declare const CQuickSearch: SFCWithInstall<import("vue").DefineComponent<{
69
73
  accurateSearch: any;
70
74
  }[];
71
75
  getCacheDef: (item: import("..").ISearchType, cacheList: string[]) => string | string[];
72
- transformParams: (paramsList: any[]) => {};
76
+ transformParams: (paramsList: any[]) => any;
73
77
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
74
78
  searchFieldList: {
75
79
  type: import("vue").PropType<import("..").IApiServerType[]>;
@@ -187,7 +191,7 @@ declare const CQuickSearch: SFCWithInstall<import("vue").DefineComponent<{
187
191
  clearData: () => void;
188
192
  handlerReset: (arr: import("..").ISearchType[]) => void;
189
193
  setDefaultCon: (widgetArr: import("..").ISearchParamsType[]) => void;
190
- getFilterParams: () => {};
194
+ getFilterParams: () => any;
191
195
  setFilterParams: (params?: any) => void;
192
196
  getOriginalConfig: () => import("..").IApiServerType[];
193
197
  onFilterChange: (fn: any) => void;
@@ -43,6 +43,9 @@ declare const _default: import("vue").DefineComponent<{
43
43
  widgetType: string | null;
44
44
  originType: string | null;
45
45
  valueList: {
46
+ name: string;
47
+ value: any;
48
+ }[] | {
46
49
  value: any;
47
50
  label: any;
48
51
  }[] | undefined;
@@ -57,6 +60,7 @@ declare const _default: import("vue").DefineComponent<{
57
60
  linkageFieldKeys: string[];
58
61
  };
59
62
  rangeFilter: boolean | undefined;
63
+ componentProps: any;
60
64
  unit: any;
61
65
  isAccurateSearchVal: boolean;
62
66
  _extendData: import("../../../components/table-filter/src/types").IExtendConfigurationType;
@@ -71,7 +75,7 @@ declare const _default: import("vue").DefineComponent<{
71
75
  accurateSearch: any;
72
76
  }[];
73
77
  getCacheDef: (item: ISearchType, cacheList: string[]) => string | string[];
74
- transformParams: (paramsList: any[]) => {};
78
+ transformParams: (paramsList: any[]) => any;
75
79
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
76
80
  searchFieldList: {
77
81
  type: PropType<IApiServerType[]>;
@@ -189,7 +193,7 @@ declare const _default: import("vue").DefineComponent<{
189
193
  clearData: () => void;
190
194
  handlerReset: (arr: ISearchType[]) => void;
191
195
  setDefaultCon: (widgetArr: ISearchParamsType[]) => void;
192
- getFilterParams: () => {};
196
+ getFilterParams: () => any;
193
197
  setFilterParams: (params?: any) => void;
194
198
  getOriginalConfig: () => IApiServerType[];
195
199
  onFilterChange: (fn: any) => void;
@@ -310,6 +310,7 @@ declare const _default: import("vue").DefineComponent<{
310
310
  LABEL: string;
311
311
  SELECTLABEL: string;
312
312
  SELECTDYNAMIC: string;
313
+ SELECTTREE: string;
313
314
  };
314
315
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:modelValues")[], "update:modelValue" | "update:modelValues", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
315
316
  paramCfg: {
@@ -428,6 +428,7 @@ declare const _default: import("vue").DefineComponent<{
428
428
  LABEL: string;
429
429
  SELECTLABEL: string;
430
430
  SELECTDYNAMIC: string;
431
+ SELECTTREE: string;
431
432
  };
432
433
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:modelValues")[], "update:modelValue" | "update:modelValues", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
433
434
  paramCfg: {
@@ -962,6 +962,7 @@ declare const _default: import("vue").DefineComponent<{
962
962
  LABEL: string;
963
963
  SELECTLABEL: string;
964
964
  SELECTDYNAMIC: string;
965
+ SELECTTREE: string;
965
966
  };
966
967
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:isAccurate" | "update:presetVal")[], "update:modelValue" | "update:isAccurate" | "update:presetVal", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
967
968
  paramCfg: {
@@ -1086,6 +1086,7 @@ declare const _default: import("vue").DefineComponent<{
1086
1086
  LABEL: string;
1087
1087
  SELECTLABEL: string;
1088
1088
  SELECTDYNAMIC: string;
1089
+ SELECTTREE: string;
1089
1090
  };
1090
1091
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:isAccurate" | "update:presetVal")[], "update:modelValue" | "update:isAccurate" | "update:presetVal", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1091
1092
  paramCfg: {
@@ -0,0 +1,51 @@
1
+ import { PropType } from 'vue';
2
+ import { AnyObject } from '../../../../../../shared/types';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ componentCfg: {
5
+ type: PropType<AnyObject>;
6
+ };
7
+ value: {
8
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
9
+ };
10
+ isAccurateSearchVal: {
11
+ type: BooleanConstructor;
12
+ default: boolean;
13
+ };
14
+ }, {
15
+ $attrs: any;
16
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
17
+ componentCfg: {
18
+ type: PropType<AnyObject>;
19
+ };
20
+ value: {
21
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
22
+ };
23
+ isAccurateSearchVal: {
24
+ type: BooleanConstructor;
25
+ default: boolean;
26
+ };
27
+ }>> & {
28
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
29
+ }>>;
30
+ emit: (event: "update:value", ...args: any[]) => void;
31
+ isMultiple: import("vue").ComputedRef<any>;
32
+ valueCp: import("vue").WritableComputedRef<any>;
33
+ options: import("vue").ComputedRef<any>;
34
+ NTreeSelect: any;
35
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
36
+ componentCfg: {
37
+ type: PropType<AnyObject>;
38
+ };
39
+ value: {
40
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
41
+ };
42
+ isAccurateSearchVal: {
43
+ type: BooleanConstructor;
44
+ default: boolean;
45
+ };
46
+ }>> & {
47
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
48
+ }, {
49
+ isAccurateSearchVal: boolean;
50
+ }>;
51
+ export default _default;
@@ -0,0 +1 @@
1
+ import e from"./SelectTree.vue2.js";import r from"../../../../../../_virtual/_plugin-vue_export-helper.js";var t=r(e,[["__file","SelectTree.vue"]]);export{t as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,useAttrs as t,computed as a,openBlock as u,createBlock as l,unref as o,mergeProps as n,isRef as r}from"vue";import{NTreeSelect as p}from"naive-ui";var i=e({__name:"SelectTree",props:{componentCfg:{type:Object},value:{type:[Array,String,Number]},isAccurateSearchVal:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:i}){const s=e,v=t();a((()=>v.multiple));const m=a({set(e){i("update:value",e)},get:()=>s.value}),c=a((()=>{const{widgetCfg:e}=s.componentCfg,{valueList:t=[]}=e;return t}));return(e,t)=>(u(),l(o(p),n(o(v),{options:o(c),value:o(m),"onUpdate:value":t[0]||(t[0]=e=>r(m)?m.value=e:null)}),null,16,["options","value"]))}});export{i as default};
@@ -1523,4 +1523,52 @@ declare const InputCustom: import("vue").DefineComponent<{
1523
1523
  value: string;
1524
1524
  isAccurateSearchVal: boolean;
1525
1525
  }>;
1526
- export { CheckboxGroup, InputNumberGroup, DateInner, DateOut, DateRangeInner, DateRangeOut, LabelInner, LabelOut, Select, SelectDynamic, InputCustom };
1526
+ declare const SelectTree: import("vue").DefineComponent<{
1527
+ componentCfg: {
1528
+ type: import("vue").PropType<import("../../../../../../shared/types").AnyObject>;
1529
+ };
1530
+ value: {
1531
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
1532
+ };
1533
+ isAccurateSearchVal: {
1534
+ type: BooleanConstructor;
1535
+ default: boolean;
1536
+ };
1537
+ }, {
1538
+ $attrs: any;
1539
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
1540
+ componentCfg: {
1541
+ type: import("vue").PropType<import("../../../../../../shared/types").AnyObject>;
1542
+ };
1543
+ value: {
1544
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
1545
+ };
1546
+ isAccurateSearchVal: {
1547
+ type: BooleanConstructor;
1548
+ default: boolean;
1549
+ };
1550
+ }>> & {
1551
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
1552
+ }>>;
1553
+ emit: (event: "update:value", ...args: any[]) => void;
1554
+ isMultiple: import("vue").ComputedRef<any>;
1555
+ valueCp: import("vue").WritableComputedRef<any>;
1556
+ options: import("vue").ComputedRef<any>;
1557
+ NTreeSelect: any;
1558
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1559
+ componentCfg: {
1560
+ type: import("vue").PropType<import("../../../../../../shared/types").AnyObject>;
1561
+ };
1562
+ value: {
1563
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
1564
+ };
1565
+ isAccurateSearchVal: {
1566
+ type: BooleanConstructor;
1567
+ default: boolean;
1568
+ };
1569
+ }>> & {
1570
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
1571
+ }, {
1572
+ isAccurateSearchVal: boolean;
1573
+ }>;
1574
+ export { CheckboxGroup, InputNumberGroup, DateInner, DateOut, DateRangeInner, DateRangeOut, LabelInner, LabelOut, Select, SelectDynamic, InputCustom, SelectTree };
@@ -1 +1 @@
1
- import{defineAsyncComponent as e}from"vue";const t=e((()=>import("./CheckboxGroup.vue.js"))),u=e((()=>import("./InputNumberGroup.vue.js"))),r=e((()=>import("./DateInner.vue.js"))),o=e((()=>import("./DateOut.vue.js"))),p=e((()=>import("./DateRangeInner.vue.js"))),m=e((()=>import("./DateRangeOut.vue.js"))),i=e((()=>import("./LabelInner.vue.js"))),s=e((()=>import("./LabelOut.vue.js"))),n=e((()=>import("./Select.vue.js"))),v=e((()=>import("./SelectDynamic.vue.js"))),j=e((()=>import("./InputCustom.vue.js")));export{t as CheckboxGroup,r as DateInner,o as DateOut,p as DateRangeInner,m as DateRangeOut,j as InputCustom,u as InputNumberGroup,i as LabelInner,s as LabelOut,n as Select,v as SelectDynamic};
1
+ import{defineAsyncComponent as e}from"vue";const t=e((()=>import("./CheckboxGroup.vue.js"))),r=e((()=>import("./InputNumberGroup.vue.js"))),u=e((()=>import("./DateInner.vue.js"))),o=e((()=>import("./DateOut.vue.js"))),p=e((()=>import("./DateRangeInner.vue.js"))),m=e((()=>import("./DateRangeOut.vue.js"))),i=e((()=>import("./LabelInner.vue.js"))),s=e((()=>import("./LabelOut.vue.js"))),v=e((()=>import("./Select.vue.js"))),j=e((()=>import("./SelectDynamic.vue.js"))),n=e((()=>import("./InputCustom.vue.js"))),a=e((()=>import("./SelectTree.vue.js")));export{t as CheckboxGroup,u as DateInner,o as DateOut,p as DateRangeInner,m as DateRangeOut,n as InputCustom,r as InputNumberGroup,i as LabelInner,s as LabelOut,v as Select,j as SelectDynamic,a as SelectTree};
@@ -1 +1 @@
1
- import{defineComponent as e,h as t}from"vue";import{WidgetTypeEnums as i}from"../../types/enums.js";import{WidgetCfgMaps as a}from"./widgetCfgMaps.js";import r from"../../../../../_virtual/_plugin-vue_export-helper.js";const l=[i.DATE,i.DATE_TIME,i.CHECKBOX_GROUP];var s=r(e({props:{cfg:{type:Object,required:!0},modelValue:{type:[Array,String,Number]}},emits:["update:modelValue","update:unit","update:isAccurate","outFilterChange"],computed:{valueCp(){return this.cfg.widgetType==i.INPUT_NUMBER&&this.cfg.value?Number(this.cfg.value):this.cfg.value},unit(){return this.cfg.unit},isAccurateSearchVal(){return this.cfg.isAccurateSearchVal}},data:()=>({initialProps:{}}),methods:{search(){this.$emit("outFilterChange")},getEleWidth(e){const{widgetType:t,widgetCfg:a,filterExplicit:r}=e;if(l.includes(t))return;const s=i.SELECT!==t&&i.SELECTLABEL!==t&&i.SELECTDYNAMIC!==t||!a.multiple?"100%":"200px";return{width:0===r?"100%":e.advanceColWidth?`${e.advanceColWidth}px`:s}},initComponentProps(e){const{widgetType:t,alias:i,title:r,placeholder:l,widgetCfg:s,accurateSearch:n,filterExplicit:u}=e,{props:c,handlerProps:h}=a.get(t);let p={...c,accurateSearch:n,filterExplicit:u};h&&(p=h(p,{...s,title:i||r})),l&&(p.placeholder=l),this.initialProps=p,p.value&&(this.valueCp=p.value)},generateWidget(e){const{widgetType:i}=e;if(!a.has(i))return null;const{value:r}=e,{component:l,style:s,eventsBySearch:n=[]}=a.get(i),u={...this.initialProps,value:r,componentCfg:e},c=n.reduce(((e,t)=>{const{name:i,handler:a}=t;let r=this.search;return a&&(r=e=>{a(e,this.search,u)}),{...e,[`on${i}`]:r}}),{});return t(l,{...s,...u,style:this.getEleWidth(e),value:this.valueCp,unit:this.unit,isAccurateSearchVal:this.isAccurateSearchVal,"onUpdate:value":e=>this.handleUpdate(e),"onUpdate:unit":e=>this.handleUpdateUnit(e),"onUpdate:isAccurate":e=>this.handleUpdateAccurateSearch(e),...c})},handleUpdate(e){this.$emit("update:modelValue",e)},handleUpdateUnit(e){this.$emit("update:unit",e)},handleUpdateAccurateSearch(e){this.$emit("update:isAccurate",e)}},created(){this.initComponentProps(this.cfg)},render(){return this.generateWidget(this.cfg)}}),[["__file","index.vue"]]);export{s as default};
1
+ import{defineComponent as e,h as t}from"vue";import{WidgetTypeEnums as i}from"../../types/enums.js";import{WidgetCfgMaps as a}from"./widgetCfgMaps.js";import r from"../../../../../_virtual/_plugin-vue_export-helper.js";const n=[i.DATE,i.DATE_TIME,i.CHECKBOX_GROUP];var s=r(e({props:{cfg:{type:Object,required:!0},modelValue:{type:[Array,String,Number]}},emits:["update:modelValue","update:unit","update:isAccurate","outFilterChange"],computed:{valueCp(){return this.cfg.widgetType==i.INPUT_NUMBER&&this.cfg.value?Number(this.cfg.value):this.cfg.value},unit(){return this.cfg.unit},isAccurateSearchVal(){return this.cfg.isAccurateSearchVal}},data:()=>({initialProps:{}}),methods:{search(){this.$emit("outFilterChange")},getEleWidth(e){const{widgetType:t,widgetCfg:a,filterExplicit:r}=e;if(n.includes(t))return;const s=i.SELECT!==t&&i.SELECTLABEL!==t&&i.SELECTDYNAMIC!==t&&i.SELECTTREE!==t||!a.multiple?"100%":"200px";return{width:0===r?"100%":e.advanceColWidth?`${e.advanceColWidth}px`:s}},initComponentProps(e){const{widgetType:t,alias:i,title:r,placeholder:n,widgetCfg:s,accurateSearch:l,filterExplicit:c,componentProps:u={}}=e,{props:p,handlerProps:h}=a.get(t);let d={...p,accurateSearch:l,filterExplicit:c,...u};h&&(d=h(d,{...s,title:i||r})),n&&(d.placeholder=n),this.initialProps=d,d.value&&(this.valueCp=d.value)},generateWidget(e){const{widgetType:i}=e;if(!a.has(i))return null;const{value:r}=e,{component:n,style:s,eventsBySearch:l=[]}=a.get(i),c={...this.initialProps,value:r,componentCfg:e},u=l.reduce(((e,t)=>{const{name:i,handler:a}=t;let r=this.search;return a&&(r=e=>{a(e,this.search,c)}),{...e,[`on${i}`]:r}}),{});return t(n,{...s,...c,style:this.getEleWidth(e),value:this.valueCp,unit:this.unit,isAccurateSearchVal:this.isAccurateSearchVal,"onUpdate:value":e=>this.handleUpdate(e),"onUpdate:unit":e=>this.handleUpdateUnit(e),"onUpdate:isAccurate":e=>this.handleUpdateAccurateSearch(e),...u})},handleUpdate(e){this.$emit("update:modelValue",e)},handleUpdateUnit(e){this.$emit("update:unit",e)},handleUpdateAccurateSearch(e){this.$emit("update:isAccurate",e)}},created(){this.initComponentProps(this.cfg)},render(){return this.generateWidget(this.cfg)}}),[["__file","index.vue"]]);export{s as default};
@@ -1637,4 +1637,69 @@ export declare const WidgetCfgMaps: Map<string, {
1637
1637
  setDefaultValue(defaultValue: any): any;
1638
1638
  eventsBySearch?: undefined;
1639
1639
  style?: undefined;
1640
+ } | {
1641
+ component: import("vue").DefineComponent<{
1642
+ componentCfg: {
1643
+ type: import("vue").PropType<import("../../../../../shared/types").AnyObject>;
1644
+ };
1645
+ value: {
1646
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
1647
+ };
1648
+ isAccurateSearchVal: {
1649
+ type: BooleanConstructor;
1650
+ default: boolean;
1651
+ };
1652
+ }, {
1653
+ $attrs: any;
1654
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
1655
+ componentCfg: {
1656
+ type: import("vue").PropType<import("../../../../../shared/types").AnyObject>;
1657
+ };
1658
+ value: {
1659
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
1660
+ };
1661
+ isAccurateSearchVal: {
1662
+ type: BooleanConstructor;
1663
+ default: boolean;
1664
+ };
1665
+ }>> & {
1666
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
1667
+ }>>;
1668
+ emit: (event: "update:value", ...args: any[]) => void;
1669
+ isMultiple: import("vue").ComputedRef<any>;
1670
+ valueCp: import("vue").WritableComputedRef<any>;
1671
+ options: import("vue").ComputedRef<any>;
1672
+ NTreeSelect: any;
1673
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1674
+ componentCfg: {
1675
+ type: import("vue").PropType<import("../../../../../shared/types").AnyObject>;
1676
+ };
1677
+ value: {
1678
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
1679
+ };
1680
+ isAccurateSearchVal: {
1681
+ type: BooleanConstructor;
1682
+ default: boolean;
1683
+ };
1684
+ }>> & {
1685
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
1686
+ }, {
1687
+ isAccurateSearchVal: boolean;
1688
+ }>;
1689
+ props: {
1690
+ clearable: boolean;
1691
+ filterable: boolean;
1692
+ multiple: boolean;
1693
+ maxTagCount: string;
1694
+ allowInput?: undefined;
1695
+ type?: undefined;
1696
+ valueFormat?: undefined;
1697
+ };
1698
+ eventsBySearch: {
1699
+ name: string;
1700
+ handler(e: KeyboardEvent, search: funcVoid, props: any): void;
1701
+ }[];
1702
+ handlerProps(props: any, { multiple, title }?: any): any;
1703
+ setDefaultValue(defaultValue: any): any;
1704
+ style?: undefined;
1640
1705
  }>;
@@ -1 +1 @@
1
- import{WidgetTypeEnums as e,WidgetValEnums as l}from"../../types/enums.js";import{DatePresetValEnums as t,DateRangeOutDefEnums as r}from"./enums.js";import{NInputNumber as a}from"naive-ui";import{InputNumberGroup as o,InputCustom as n,Select as p,SelectDynamic as s,DateInner as i,DateOut as u,DateRangeInner as c,DateRangeOut as m,CheckboxGroup as d,LabelInner as y,LabelOut as h}from"./components/index.js";import{presetValToTimestamp as E,formatDateRangeInfo as f}from"./helpers/presetValToTimestamp.js";import{setSelectDynamicValue as M}from"./helpers/setDefaultValue.js";const D=e=>null==e?null:e,T=new Map([[e.INPUT_NUMBER,{component:a,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`输入${l}`}),setDefaultValue:D}],[e.INPUTNUMBER_RANGE,{component:o,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l,filterExplicit:t}={})=>({...e,startPlaceholder:1===t?`起始${l}`:"最小值",endPlaceholder:1===t?`截止${l}`:"最大值"}),setDefaultValue:D}],[e.INPUT,{component:n,props:{clearable:!0,allowInput:e=>!e.startsWith(" ")&&!e.endsWith(" ")},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`搜索${l}`}),setDefaultValue:D}],[e.SELECT,{component:p,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:r}=t;r&&l()}}],handlerProps(e,{multiple:l,title:t}={}){const r={...e,placeholder:`请选择${t}`};return l&&(r.multiple=!0),r},setDefaultValue:(e,t,r)=>t&&"boolean"==typeof(null==r?void 0:r.multiple)?r.multiple?[l.WHOLE]:l.WHOLE:e}],[e.SELECTDYNAMIC,{component:s,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:r}=t;r&&l()}}],handlerProps(e,l={}){const{multiple:t,title:r}=l,a={...e,placeholder:`请选择${r}`};return t&&(a.multiple=!0),a},setDefaultValue:async(e,l,t)=>l&&(null==t?void 0:t._cfg)?await M(null==t?void 0:t._cfg):e}],[e.DATE,{component:i,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:D}],[e.DATE_OUT,{component:u,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:(e,l)=>l&&l!==t.CUSTOM?E(l,"YYYY-MM-DD"):e}],[e.DATE_RANGE_INNER,{component:c,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:D}],[e.DATE_RANGE_OUT,{component:m,props:{type:"daterange",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:(e,l,t)=>l&&l!==r.CUSTOM&&(null==t?void 0:t.optSetting)?f(l,"YYYY-MM-DD",t.optSetting):e}],[e.DATE_TIME,{component:i,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:D}],[e.DATETIME_OUT,{component:u,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:(e,l)=>l&&l!==t.CUSTOM?E(l,"YYYY-MM-DD HH:mm:ss"):e}],[e.DATETIME_RANGE_INNER,{component:c,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:D}],[e.DATETIME_RANGE_OUT,{component:m,props:{type:"datetimerange",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:(e,l,r)=>l&&l!==t.CUSTOM&&(null==r?void 0:r.optSetting)?f(l,"YYYY-MM-DD HH:mm:ss",r.optSetting):e}],[e.CHECKBOX_GROUP,{component:d,props:{},style:{"line-height":"32px"},handlerProps(e,{valueList:l,multiple:t}={}){const r={...e,multiple:t};return Array.isArray(l)&&(r.options=l.map((({value:e,label:l})=>({value:e,label:l})))),r},setDefaultValue:D}],[e.LABEL,{component:y,props:{},handlerProps:e=>({...e}),setDefaultValue:e=>e&&Array.isArray(e)?e.join("|#|"):e}],[e.SELECTLABEL,{component:h,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},handlerProps(e,l={}){const{multiple:t,title:r}=l,a={...e,placeholder:`请选择${r}`};return t&&(a.multiple=!0),a},setDefaultValue:e=>e&&Array.isArray(e)?e.join("|#|"):e}]]);export{T as WidgetCfgMaps};
1
+ import{WidgetTypeEnums as e,WidgetValEnums as l}from"../../types/enums.js";import{DatePresetValEnums as t,DateRangeOutDefEnums as a}from"./enums.js";import{NInputNumber as r}from"naive-ui";import{InputNumberGroup as o,InputCustom as n,Select as p,SelectDynamic as s,DateInner as i,DateOut as u,DateRangeInner as c,DateRangeOut as m,CheckboxGroup as d,LabelInner as y,LabelOut as h,SelectTree as E}from"./components/index.js";import{presetValToTimestamp as f,formatDateRangeInfo as M}from"./helpers/presetValToTimestamp.js";import{setSelectDynamicValue as D}from"./helpers/setDefaultValue.js";const T=e=>null==e?null:e,P=new Map([[e.INPUT_NUMBER,{component:r,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`输入${l}`}),setDefaultValue:T}],[e.INPUTNUMBER_RANGE,{component:o,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l,filterExplicit:t}={})=>({...e,startPlaceholder:1===t?`起始${l}`:"最小值",endPlaceholder:1===t?`截止${l}`:"最大值"}),setDefaultValue:T}],[e.INPUT,{component:n,props:{clearable:!0,allowInput:e=>!e.startsWith(" ")&&!e.endsWith(" ")},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`搜索${l}`}),setDefaultValue:T}],[e.SELECT,{component:p,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:a}=t;a&&l()}}],handlerProps(e,{multiple:l,title:t}={}){const a={...e,placeholder:`请选择${t}`};return l&&(a.multiple=!0),a},setDefaultValue:(e,t,a)=>t&&"boolean"==typeof(null==a?void 0:a.multiple)?a.multiple?[l.WHOLE]:l.WHOLE:e}],[e.SELECTDYNAMIC,{component:s,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:a}=t;a&&l()}}],handlerProps(e,l={}){const{multiple:t,title:a}=l,r={...e,placeholder:`请选择${a}`};return t&&(r.multiple=!0),r},setDefaultValue:async(e,l,t)=>l&&(null==t?void 0:t._cfg)?await D(null==t?void 0:t._cfg):e}],[e.DATE,{component:i,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:T}],[e.DATE_OUT,{component:u,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:(e,l)=>l&&l!==t.CUSTOM?f(l,"YYYY-MM-DD"):e}],[e.DATE_RANGE_INNER,{component:c,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t,filterExplicit:a}=l;return{...e,filterExplicit:a,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:T}],[e.DATE_RANGE_OUT,{component:m,props:{type:"daterange",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t,filterExplicit:a}=l;return{...e,filterExplicit:a,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:(e,l,t)=>l&&l!==a.CUSTOM&&(null==t?void 0:t.optSetting)?M(l,"YYYY-MM-DD",t.optSetting):e}],[e.DATE_TIME,{component:i,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:T}],[e.DATETIME_OUT,{component:u,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:(e,l)=>l&&l!==t.CUSTOM?f(l,"YYYY-MM-DD HH:mm:ss"):e}],[e.DATETIME_RANGE_INNER,{component:c,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t,filterExplicit:a}=l;return{...e,filterExplicit:a,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:T}],[e.DATETIME_RANGE_OUT,{component:m,props:{type:"datetimerange",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t,filterExplicit:a}=l;return{...e,filterExplicit:a,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:(e,l,a)=>l&&l!==t.CUSTOM&&(null==a?void 0:a.optSetting)?M(l,"YYYY-MM-DD HH:mm:ss",a.optSetting):e}],[e.CHECKBOX_GROUP,{component:d,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:T}],[e.LABEL,{component:y,props:{},handlerProps:e=>({...e}),setDefaultValue:e=>e&&Array.isArray(e)?e.join("|#|"):e}],[e.SELECTLABEL,{component:h,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},handlerProps(e,l={}){const{multiple:t,title:a}=l,r={...e,placeholder:`请选择${a}`};return t&&(r.multiple=!0),r},setDefaultValue:e=>e&&Array.isArray(e)?e.join("|#|"):e}],[e.SELECTTREE,{component:E,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:a}=t;a&&l()}}],handlerProps(e,{multiple:l,title:t}={}){const a={...e,placeholder:`请选择${t}`};return l&&(a.multiple=!0),a},setDefaultValue:e=>e}]]);export{P as WidgetCfgMaps};
@@ -10,6 +10,9 @@ export default function useAdvanced(): {
10
10
  widgetType: string | null;
11
11
  originType: string | null;
12
12
  valueList: {
13
+ name: string;
14
+ value: any;
15
+ }[] | {
13
16
  value: any;
14
17
  label: any;
15
18
  }[] | undefined;
@@ -24,6 +27,7 @@ export default function useAdvanced(): {
24
27
  linkageFieldKeys: string[];
25
28
  };
26
29
  rangeFilter: boolean | undefined;
30
+ componentProps: any;
27
31
  unit: any;
28
32
  isAccurateSearchVal: boolean;
29
33
  _extendData: IExtendConfigurationType;
@@ -38,6 +42,6 @@ export default function useAdvanced(): {
38
42
  accurateSearch: any;
39
43
  }[];
40
44
  getCacheDef: (item: ISearchType, cacheList: string[]) => string | string[];
41
- transformClassifyChild: (conObjList: any, searchFieldList: any[]) => {};
42
- transformParams: (paramsList: any[]) => {};
45
+ transformClassifyChild: (conObjList: any, searchFieldList: any[]) => any;
46
+ transformParams: (paramsList: any[]) => any;
43
47
  };
@@ -1 +1 @@
1
- import{WidgetOptionEnums as e,WidgetTypeEnums as i,selectModeEnums as t,WidgetValEnums as n}from"../types/enums.js";import{isString as l}from"lodash-es";import{formatDateRangeInfo as a,presetValToTimestamp as o}from"../components/render-widget/helpers/presetValToTimestamp.js";import{DatePresetValEnums as r}from"../components/render-widget/enums.js";const u={[e.RADIO]:"0",[e.MULTIPLE]:"1",[e.ALL]:"0",[e.SELECT_TIME]:"1",[e.PAST_TIME]:"2",[e.FUTURE_TIME]:"3"};function E(){return{transformData:function(n,l){return n.map((n=>{var a,o,r;const{optionInfo:E={list:[],manualMapping:!0,dynamicOptionInfo:{},showWholeOption:!1,showMode:"DROPDOWN"},type:s,defaultValue:c,optionType:p,filterExplicit:T,rangeFilter:d}=n,m={},f={title:(v=n).title,alias:v.customTitle,isShowSearch:v.isShowSearch?1:0,filterExplicit:v.filterExplicit?1:0,explicitRequired:v.explicitRequired?1:0,advanceOptionSetting:v.optionType?u[v.optionType]:"",placeholder:v.remark,advanceColWidth:v.width,accurateSearch:v.accurateSearch?v.accurateSearch:{}};var v;let g,h,y=s;T?(g=s===i.SELECT&&p===e.MULTIPLE?null==c?void 0:c.valueList:null==(a=null==c?void 0:c.valueList)?void 0:a[0],h=null==c?void 0:c.unit,s===i.LABEL&&(y="SELECTLABEL",g=null==c?void 0:c.valueList),s===i.DATE&&(y="DATE_OUT"),s===i.DATE_TIME&&(y="DATETIME_OUT"),s===i.SELECT&&(null==E?void 0:E.manualMapping)&&(null==E?void 0:E.showMode)==t.TILE&&(y="CHECKBOX_GROUP")):s===i.SELECT&&(null==E?void 0:E.list)&&(null==E?void 0:E.list.length)<10&&(y="CHECKBOX_GROUP"),d&&(s===i.INPUT_NUMBER&&(y="INPUTNUMBER_RANGE"),s===i.DATE&&(y=T?"DATE_RANGE_OUT":"DATE_RANGE_INNER"),s===i.DATE_TIME&&(y=T?"DATETIME_RANGE_OUT":"DATETIME_RANGE_INNER")),s===i.SELECT&&!1===(null==E?void 0:E.manualMapping)&&(y=i.SELECTDYNAMIC);const A={isRender:!0,widgetType:y,originType:s,valueList:null==(o=null==E?void 0:E.list)?void 0:o.map((({name:e,value:i})=>({value:i,label:e}))),defaultValue:g,defValueUnit:h,optionSetting:p,multiple:p===e.MULTIPLE||y===i.SELECTLABEL,manualMapping:null==E?void 0:E.manualMapping,showWholeOption:null==E?void 0:E.showWholeOption,dynamicOptionInfo:null==E?void 0:E.dynamicOptionInfo,classifyStr:null==c?void 0:c.classifyStr,linkageFieldKeys:null!=(r=null==c?void 0:c.linkageFieldKeys)?r:[]};return{...f,fieldType:n.dataType,columnName:n.name,settingObj:m,setting:JSON.stringify(m),widgetCfg:A,rangeFilter:d,unit:null!=h?h:"",isAccurateSearchVal:!1,_extendData:null!=l?l:{}}}))},getCacheDef:function(e,t){const{widgetType:n,widgetCfg:l}=e;return[i.SELECT,i.CHECKBOX_GROUP,i.SELECTDYNAMIC].includes(n)&&l.multiple?t:t[0]},transformClassifyChild:function(e,t){const n={};return e&&e.length>0&&e.forEach((e=>{const l=e.field_key;n[l]="";const u=t.find((e=>e.name===l));if(u){if(e.value){const t=Array.isArray(e.value)&&u.type===i.SELECT?e.value:e.value.toString();n[l]=t}if(e.unit&&e.unit!==r.CUSTOM){let t="";u.type===i.DATE&&(t=u.rangeFilter?a(e.unit,"YYYY-MM-DD",u.optionType):o(e.unit,"YYYY-MM-DD")),u.type===i.DATE_TIME&&(t=u.rangeFilter?a(e.unit,"YYYY-MM-DD HH:mm:ss",u.optionType):o(e.unit,"YYYY-MM-DD HH:mm:ss")),n[l]=t}}})),n},transformParams:function(e){const t={},a=[i.SELECT,i.SELECTDYNAMIC,i.CHECKBOX_GROUP];return e&&e.length>0&&e.forEach((e=>{let i="";const o=e.field_key;e.value&&(i=a.includes(e.widgetType)||e.value&&e.value.length>1?e.value.map((e=>l(e)&&e.includes("&")?e.split("&")[1]:e)):e.value.toString()),Array.isArray(i)&&i.length>0&&i.includes(n.WHOLE)||(Object.keys(e).includes("isAccurateSearch")&&(t[e.accurateSearchKey]=e.isAccurateSearch?1:0),t[o]=i)})),t}}}export{E as default};
1
+ import{WidgetOptionEnums as e,WidgetTypeEnums as i,selectModeEnums as t,WidgetValEnums as n}from"../types/enums.js";import{isString as l}from"lodash-es";import{formatDateRangeInfo as a,presetValToTimestamp as o}from"../components/render-widget/helpers/presetValToTimestamp.js";import{DatePresetValEnums as r}from"../components/render-widget/enums.js";const u={[e.RADIO]:"0",[e.MULTIPLE]:"1",[e.ALL]:"0",[e.SELECT_TIME]:"1",[e.PAST_TIME]:"2",[e.FUTURE_TIME]:"3"};function E(){return{transformData:function(n,l){return n.map((n=>{var a,o,r;const{optionInfo:E={list:[],manualMapping:!0,dynamicOptionInfo:{},showWholeOption:!1,showMode:"DROPDOWN"},type:s,defaultValue:T,optionType:c,filterExplicit:p,rangeFilter:d,componentProps:m}=n,f={},v={title:(L=n).title,alias:L.customTitle,isShowSearch:L.isShowSearch?1:0,filterExplicit:L.filterExplicit?1:0,explicitRequired:L.explicitRequired?1:0,advanceOptionSetting:L.optionType?u[L.optionType]:"",placeholder:L.remark,advanceColWidth:L.width,accurateSearch:L.accurateSearch?L.accurateSearch:{}};var L;let S,g,C=s;p?(S=s!==i.SELECT&&s!==i.SELECTTREE||c!==e.MULTIPLE?null==(a=null==T?void 0:T.valueList)?void 0:a[0]:null==T?void 0:T.valueList,g=null==T?void 0:T.unit,s===i.LABEL&&(C="SELECTLABEL",S=null==T?void 0:T.valueList),s===i.DATE&&(C="DATE_OUT"),s===i.DATE_TIME&&(C="DATETIME_OUT"),s===i.SELECT&&(null==E?void 0:E.manualMapping)&&(null==E?void 0:E.showMode)==t.TILE&&(C="CHECKBOX_GROUP")):s===i.SELECT&&(null==E?void 0:E.list)&&(null==E?void 0:E.list.length)<10&&(C="CHECKBOX_GROUP"),d&&(s===i.INPUT_NUMBER&&(C="INPUTNUMBER_RANGE"),s===i.DATE&&(C=p?"DATE_RANGE_OUT":"DATE_RANGE_INNER"),s===i.DATE_TIME&&(C=p?"DATETIME_RANGE_OUT":"DATETIME_RANGE_INNER")),s===i.SELECT&&!1===(null==E?void 0:E.manualMapping)&&(C=i.SELECTDYNAMIC);const h={isRender:!0,widgetType:C,originType:s,valueList:s===i.SELECTTREE?null==E?void 0:E.list:null==(o=null==E?void 0:E.list)?void 0:o.map((({name:e,value:i})=>({value:i,label:e}))),defaultValue:S,defValueUnit:g,optionSetting:c,multiple:c===e.MULTIPLE||C===i.SELECTLABEL,manualMapping:null==E?void 0:E.manualMapping,showWholeOption:null==E?void 0:E.showWholeOption,dynamicOptionInfo:null==E?void 0:E.dynamicOptionInfo,classifyStr:null==T?void 0:T.classifyStr,linkageFieldKeys:null!=(r=null==T?void 0:T.linkageFieldKeys)?r:[]};return{...v,fieldType:n.dataType,columnName:n.name,settingObj:f,setting:JSON.stringify(f),widgetCfg:h,rangeFilter:d,componentProps:m,unit:null!=g?g:"",isAccurateSearchVal:!1,_extendData:null!=l?l:{}}}))},getCacheDef:function(e,t){const{widgetType:n,widgetCfg:l}=e;return[i.SELECT,i.CHECKBOX_GROUP,i.SELECTDYNAMIC].includes(n)&&l.multiple?t:t[0]},transformClassifyChild:function(e,t){const n={};return e&&e.length>0&&e.forEach((e=>{const l=e.field_key;n[l]="";const u=t.find((e=>e.name===l));if(u){if(e.value){const t=Array.isArray(e.value)&&u.type===i.SELECT?e.value:e.value.toString();n[l]=t}if(e.unit&&e.unit!==r.CUSTOM){let t="";u.type===i.DATE&&(t=u.rangeFilter?a(e.unit,"YYYY-MM-DD",u.optionType):o(e.unit,"YYYY-MM-DD")),u.type===i.DATE_TIME&&(t=u.rangeFilter?a(e.unit,"YYYY-MM-DD HH:mm:ss",u.optionType):o(e.unit,"YYYY-MM-DD HH:mm:ss")),n[l]=t}}})),n},transformParams:function(e){const t={},a=[i.SELECT,i.SELECTDYNAMIC,i.CHECKBOX_GROUP,i.SELECTTREE];return e&&e.length>0&&e.forEach((e=>{let i="";const o=e.field_key;e.value&&(i=a.includes(e.widgetType)||e.value&&e.value.length>1?e.value.map((e=>l(e)&&e.includes("&")?e.split("&")[1]:e)):e.value.toString()),Array.isArray(i)&&i.length>0&&i.includes(n.WHOLE)||(Object.keys(e).includes("isAccurateSearch")&&(t[e.accurateSearchKey]=e.isAccurateSearch?1:0),t[o]=i)})),t}}}export{E as default};
@@ -35,6 +35,7 @@ export declare const WidgetTypeEnums: {
35
35
  LABEL: string;
36
36
  SELECTLABEL: string;
37
37
  SELECTDYNAMIC: string;
38
+ SELECTTREE: string;
38
39
  };
39
40
  export declare const WidgetOptionEnums: {
40
41
  RADIO: string;
@@ -1 +1 @@
1
- const E={TEXT:"TEXT",NUMBER:"NUMBER",DATE:"DATE",DATE_TIME:"DATETIME",TIME:"TIME",BOOLEAN:"BOOLEAN"},T={SQL:"SQL",API:"API"},A={DROPDOWN:"DROPDOWN",TILE:"TILE"},_={MANUAL:"manual",DICT:"dict"},R={INPUT_NUMBER:"NUMBER",INPUT:"TEXT",SELECT:"SELECT",DATE:"DATE",DATE_OUT:"DATE_OUT",DATE_TIME:"DATETIME",DATETIME_OUT:"DATETIME_OUT",CHECKBOX_GROUP:"CHECKBOX_GROUP",INPUTNUMBER_RANGE:"INPUTNUMBER_RANGE",DATE_RANGE_OUT:"DATE_RANGE_OUT",DATE_RANGE_INNER:"DATE_RANGE_INNER",DATETIME_RANGE_OUT:"DATETIME_RANGE_OUT",DATETIME_RANGE_INNER:"DATETIME_RANGE_INNER",LABEL:"LABEL",SELECTLABEL:"SELECTLABEL",SELECTDYNAMIC:"SELECTDYNAMIC"},N={RADIO:"SELECT_SINGLE",MULTIPLE:"SELECT_MULTIPLE",ALL:"DATETIME_WHOLE",SELECT_TIME:"DATETIME_SELECT",PAST_TIME:"DATETIME_PAST",FUTURE_TIME:"DATETIME_FUTURE"},O={CUSTOM:"CUSTOM",FIRST_VAL:"FIRST",WHOLE:"WHOLE",NOW:"NOW",TODAY:"TODAY",TODAY_START:"TODAY_START",TODAY_END:"TODAY_END",TOMORROW:"TOMORROW",TOMORROW_START:"TOMORROW_START",TOMORROW_END:"TOMORROW_END",YESTERDAY:"YESTERDAY",YESTERDAY_START:"YESTERDAY_START",YESTERDAY_END:"YESTERDAY_END",THIS_WEEK:"THIS_WEEK",WEEK_START:"THIS_WEEK_START",WEEK_END:"THIS_WEEK_END",NEXT_WEEK:"NEXT_WEEK",LAST_WEEK:"LAST_WEEK",THIS_MONTH:"THIS_MONTH",MONTH_START:"THIS_MONTH_START",MONTH_END:"THIS_MONTH_END",NEXT_MONTH:"NEXT_MONTH",LAST_MONTH:"LAST_MONTH",THIS_QUARTER:"THIS_QUARTER",NEXT_QUARTER:"NEXT_QUARTER",LAST_QUARTER:"LAST_QUARTER",THIS_YEAR:"THIS_YEAR",NEXT_YEAR:"NEXT_YEAR",LAST_YEAR:"LAST_YEAR"},S={NULL:"NULL",EQUAL:"EQ"};export{S as ConditionEnums,T as DataTypeEnums,E as FieldTypeEnums,_ as MappingMethodEnums,N as WidgetOptionEnums,R as WidgetTypeEnums,O as WidgetValEnums,A as selectModeEnums};
1
+ const E={TEXT:"TEXT",NUMBER:"NUMBER",DATE:"DATE",DATE_TIME:"DATETIME",TIME:"TIME",BOOLEAN:"BOOLEAN"},T={SQL:"SQL",API:"API"},A={DROPDOWN:"DROPDOWN",TILE:"TILE"},_={MANUAL:"manual",DICT:"dict"},R={INPUT_NUMBER:"NUMBER",INPUT:"TEXT",SELECT:"SELECT",DATE:"DATE",DATE_OUT:"DATE_OUT",DATE_TIME:"DATETIME",DATETIME_OUT:"DATETIME_OUT",CHECKBOX_GROUP:"CHECKBOX_GROUP",INPUTNUMBER_RANGE:"INPUTNUMBER_RANGE",DATE_RANGE_OUT:"DATE_RANGE_OUT",DATE_RANGE_INNER:"DATE_RANGE_INNER",DATETIME_RANGE_OUT:"DATETIME_RANGE_OUT",DATETIME_RANGE_INNER:"DATETIME_RANGE_INNER",LABEL:"LABEL",SELECTLABEL:"SELECTLABEL",SELECTDYNAMIC:"SELECTDYNAMIC",SELECTTREE:"SELECTTREE"},N={RADIO:"SELECT_SINGLE",MULTIPLE:"SELECT_MULTIPLE",ALL:"DATETIME_WHOLE",SELECT_TIME:"DATETIME_SELECT",PAST_TIME:"DATETIME_PAST",FUTURE_TIME:"DATETIME_FUTURE"},O={CUSTOM:"CUSTOM",FIRST_VAL:"FIRST",WHOLE:"WHOLE",NOW:"NOW",TODAY:"TODAY",TODAY_START:"TODAY_START",TODAY_END:"TODAY_END",TOMORROW:"TOMORROW",TOMORROW_START:"TOMORROW_START",TOMORROW_END:"TOMORROW_END",YESTERDAY:"YESTERDAY",YESTERDAY_START:"YESTERDAY_START",YESTERDAY_END:"YESTERDAY_END",THIS_WEEK:"THIS_WEEK",WEEK_START:"THIS_WEEK_START",WEEK_END:"THIS_WEEK_END",NEXT_WEEK:"NEXT_WEEK",LAST_WEEK:"LAST_WEEK",THIS_MONTH:"THIS_MONTH",MONTH_START:"THIS_MONTH_START",MONTH_END:"THIS_MONTH_END",NEXT_MONTH:"NEXT_MONTH",LAST_MONTH:"LAST_MONTH",THIS_QUARTER:"THIS_QUARTER",NEXT_QUARTER:"NEXT_QUARTER",LAST_QUARTER:"LAST_QUARTER",THIS_YEAR:"THIS_YEAR",NEXT_YEAR:"NEXT_YEAR",LAST_YEAR:"LAST_YEAR"},S={NULL:"NULL",EQUAL:"EQ"};export{S as ConditionEnums,T as DataTypeEnums,E as FieldTypeEnums,_ as MappingMethodEnums,N as WidgetOptionEnums,R as WidgetTypeEnums,O as WidgetValEnums,A as selectModeEnums};
@@ -143,6 +143,7 @@ export type IApiServerType = {
143
143
  remark?: string;
144
144
  keyword?: boolean;
145
145
  accurateSearch?: any;
146
+ componentProps?: any;
146
147
  };
147
148
  export type dynamicOptionInfoType = {
148
149
  filterKeys: string[];
@@ -1 +1 @@
1
- var e="@cnhis-design-vue/shared",i="3.2.9-beta.1",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.2.9-beta.1",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.2.9-beta.14",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.2.9-beta.14",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.2.9-beta.1",
3
+ "version": "3.2.9-beta.14",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -72,5 +72,5 @@
72
72
  "iOS 7",
73
73
  "last 3 iOS versions"
74
74
  ],
75
- "gitHead": "ed51f5c30dccd4e01326f60fed71320a030d22f4"
75
+ "gitHead": "1bcc395dad3f1e0dff1cb2177952cff9b1e7fdee"
76
76
  }