cnhis-design-vue 3.1.43-beta.11 → 3.1.43-beta.12

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 (47) hide show
  1. package/es/components/base-search/index.d.ts +4 -0
  2. package/es/components/base-search/src/index.vue.d.ts +4 -0
  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 +3 -1
  6. package/es/components/classification/src/components/search-filter/index.vue.d.ts +3 -1
  7. package/es/components/classification/src/components/set-classification/index.vue.d.ts +3 -1
  8. package/es/components/classification/src/index.vue.d.ts +3 -1
  9. package/es/components/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +77 -0
  10. package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +93 -0
  11. package/es/components/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +3 -0
  12. package/es/components/iho-table/src/plugins/filterRenderPlugin/dist/index.d.ts +3 -0
  13. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/dist/index.d.ts +3 -0
  14. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +3 -0
  15. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +3 -0
  16. package/es/components/iho-table/src/utils/dist/index.d.ts +44 -0
  17. package/es/components/index.css +1 -1
  18. package/es/components/quick-search/style/index.css +1 -1
  19. package/es/components/scale-view/src/components/formitem/dist/r-address.d.ts +36 -0
  20. package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +36 -0
  21. package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +82 -0
  22. package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +57 -0
  23. package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +57 -0
  24. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +3 -1
  25. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +3 -1
  26. package/es/components/table-filter/src/components/render-widget/basicData.d.ts +4 -0
  27. package/es/components/table-filter/src/components/render-widget/basicData.js +1 -0
  28. package/es/components/table-filter/src/components/render-widget/components/Date.vue.d.ts +3 -28
  29. package/es/components/table-filter/src/components/render-widget/components/Date.vue.js +1 -1
  30. package/es/components/table-filter/src/components/render-widget/components/DateRange.vue.d.ts +117 -0
  31. package/es/components/table-filter/src/components/render-widget/components/DateRange.vue.js +1 -0
  32. package/es/components/table-filter/src/components/render-widget/components/Select.vue.d.ts +0 -1
  33. package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +1 -1
  34. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +2 -1
  35. package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
  36. package/es/components/table-filter/src/components/render-widget/enums.d.ts +17 -0
  37. package/es/components/table-filter/src/components/render-widget/enums.js +1 -1
  38. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.d.ts +5 -0
  39. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +1 -1
  40. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  41. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +124 -19
  42. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  43. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
  44. package/es/components/table-filter/src/types/enums.d.ts +3 -1
  45. package/es/components/table-filter/src/types/enums.js +1 -1
  46. package/es/shared/package.json.js +1 -1
  47. package/package.json +2 -2
@@ -5,6 +5,7 @@ export declare const WidgetCfgMaps: Map<string, {
5
5
  clearable: boolean;
6
6
  filterable?: undefined;
7
7
  multiple?: undefined;
8
+ maxTagCount?: undefined;
8
9
  type?: undefined;
9
10
  valueFormat?: undefined;
10
11
  };
@@ -44,7 +45,6 @@ export declare const WidgetCfgMaps: Map<string, {
44
45
  isRemote: import("vue").Ref<boolean>;
45
46
  isLoading: import("vue").Ref<boolean>;
46
47
  valueCp: import("vue").WritableComputedRef<any>;
47
- maxTagCount: import("vue").ComputedRef<"responsive" | undefined>;
48
48
  searchOptions: (keyword: string) => Promise<any>;
49
49
  _handleSearch: (query: string) => Promise<void>;
50
50
  handleSearch: (query: string) => Promise<void>;
@@ -72,6 +72,7 @@ export declare const WidgetCfgMaps: Map<string, {
72
72
  clearable: boolean;
73
73
  filterable: boolean;
74
74
  multiple: boolean;
75
+ maxTagCount: string;
75
76
  type?: undefined;
76
77
  valueFormat?: undefined;
77
78
  };
@@ -85,7 +86,7 @@ export declare const WidgetCfgMaps: Map<string, {
85
86
  } | {
86
87
  component: import("vue").DefineComponent<{
87
88
  type: {
88
- type: import("vue").PropType<"year" | "month" | "quarter" | "date" | "datetime" | "datetimerange" | "daterange" | "monthrange">;
89
+ type: import("vue").PropType<"date" | "datetime">;
89
90
  default: string;
90
91
  };
91
92
  clearable: {
@@ -96,11 +97,54 @@ export declare const WidgetCfgMaps: Map<string, {
96
97
  type: StringConstructor;
97
98
  default: string;
98
99
  };
99
- startPlaceholder: {
100
+ placeholder: {
100
101
  type: StringConstructor;
101
102
  default: string;
102
103
  };
103
- endPlaceholder: {
104
+ value: {
105
+ type: StringConstructor;
106
+ default: string;
107
+ };
108
+ }, {
109
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
110
+ type: {
111
+ type: import("vue").PropType<"date" | "datetime">;
112
+ default: string;
113
+ };
114
+ clearable: {
115
+ type: BooleanConstructor;
116
+ default: boolean;
117
+ };
118
+ valueFormat: {
119
+ type: StringConstructor;
120
+ default: string;
121
+ };
122
+ placeholder: {
123
+ type: StringConstructor;
124
+ default: string;
125
+ };
126
+ value: {
127
+ type: StringConstructor;
128
+ default: string;
129
+ };
130
+ }>> & {
131
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
132
+ }>>;
133
+ emit: (event: "update:value", ...args: any[]) => void;
134
+ valueCp: import("vue").Ref<any>;
135
+ dateFormat: import("vue").ComputedRef<string>;
136
+ handleChange: (val: any) => void;
137
+ NDatePicker: any;
138
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
139
+ type: {
140
+ type: import("vue").PropType<"date" | "datetime">;
141
+ default: string;
142
+ };
143
+ clearable: {
144
+ type: BooleanConstructor;
145
+ default: boolean;
146
+ };
147
+ valueFormat: {
104
148
  type: StringConstructor;
105
149
  default: string;
106
150
  };
@@ -112,12 +156,67 @@ export declare const WidgetCfgMaps: Map<string, {
112
156
  type: StringConstructor;
113
157
  default: string;
114
158
  };
159
+ }>> & {
160
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
161
+ }, {
162
+ type: "date" | "datetime";
163
+ value: string;
164
+ placeholder: string;
165
+ clearable: boolean;
166
+ valueFormat: string;
167
+ }>;
168
+ props: {
169
+ type: string;
170
+ clearable: boolean;
171
+ valueFormat: string;
172
+ filterable?: undefined;
173
+ multiple?: undefined;
174
+ maxTagCount?: undefined;
175
+ };
176
+ handlerProps(props: any, data?: any): any;
177
+ setDefaultValue(defaultValue: any, defValueUnit: any): any;
178
+ eventsBySearch?: undefined;
179
+ style?: undefined;
180
+ } | {
181
+ component: import("vue").DefineComponent<{
182
+ type: {
183
+ type: import("vue").PropType<"date" | "datetime">;
184
+ default: string;
185
+ };
186
+ filterExplicit: {
187
+ type: NumberConstructor;
188
+ default: number;
189
+ };
190
+ clearable: {
191
+ type: BooleanConstructor;
192
+ default: boolean;
193
+ };
194
+ valueFormat: {
195
+ type: StringConstructor;
196
+ default: string;
197
+ };
198
+ startPlaceholder: {
199
+ type: StringConstructor;
200
+ default: string;
201
+ };
202
+ endPlaceholder: {
203
+ type: StringConstructor;
204
+ default: string;
205
+ };
206
+ value: {
207
+ type: StringConstructor;
208
+ default: string;
209
+ };
115
210
  }, {
116
211
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
117
212
  type: {
118
- type: import("vue").PropType<"year" | "month" | "quarter" | "date" | "datetime" | "datetimerange" | "daterange" | "monthrange">;
213
+ type: import("vue").PropType<"date" | "datetime">;
119
214
  default: string;
120
215
  };
216
+ filterExplicit: {
217
+ type: NumberConstructor;
218
+ default: number;
219
+ };
121
220
  clearable: {
122
221
  type: BooleanConstructor;
123
222
  default: boolean;
@@ -134,10 +233,6 @@ export declare const WidgetCfgMaps: Map<string, {
134
233
  type: StringConstructor;
135
234
  default: string;
136
235
  };
137
- placeholder: {
138
- type: StringConstructor;
139
- default: string;
140
- };
141
236
  value: {
142
237
  type: StringConstructor;
143
238
  default: string;
@@ -146,14 +241,26 @@ export declare const WidgetCfgMaps: Map<string, {
146
241
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
147
242
  }>>;
148
243
  emit: (event: "update:value", ...args: any[]) => void;
149
- valueCp: import("vue").Ref<any>;
150
- handleChange: (val: any) => false | undefined;
244
+ dateList: import("vue").Ref<any[]>;
245
+ isShow: import("vue").Ref<boolean>;
246
+ radioValue: import("vue").Ref<string>;
247
+ startDate: import("vue").Ref<any>;
248
+ endDate: import("vue").Ref<any>;
249
+ dateFormat: import("vue").ComputedRef<string>;
250
+ initData: () => void;
251
+ handleRadioClick: (value: string) => void;
252
+ handleChange: (val: any, type: "end" | "start") => void;
151
253
  NDatePicker: any;
254
+ NButton: any;
152
255
  }, 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
256
  type: {
154
- type: import("vue").PropType<"year" | "month" | "quarter" | "date" | "datetime" | "datetimerange" | "daterange" | "monthrange">;
257
+ type: import("vue").PropType<"date" | "datetime">;
155
258
  default: string;
156
259
  };
260
+ filterExplicit: {
261
+ type: NumberConstructor;
262
+ default: number;
263
+ };
157
264
  clearable: {
158
265
  type: BooleanConstructor;
159
266
  default: boolean;
@@ -170,10 +277,6 @@ export declare const WidgetCfgMaps: Map<string, {
170
277
  type: StringConstructor;
171
278
  default: string;
172
279
  };
173
- placeholder: {
174
- type: StringConstructor;
175
- default: string;
176
- };
177
280
  value: {
178
281
  type: StringConstructor;
179
282
  default: string;
@@ -181,9 +284,9 @@ export declare const WidgetCfgMaps: Map<string, {
181
284
  }>> & {
182
285
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
183
286
  }, {
184
- type: "year" | "month" | "quarter" | "date" | "datetime" | "datetimerange" | "daterange" | "monthrange";
287
+ type: "date" | "datetime";
185
288
  value: string;
186
- placeholder: string;
289
+ filterExplicit: number;
187
290
  clearable: boolean;
188
291
  startPlaceholder: string;
189
292
  endPlaceholder: string;
@@ -195,9 +298,10 @@ export declare const WidgetCfgMaps: Map<string, {
195
298
  valueFormat: string;
196
299
  filterable?: undefined;
197
300
  multiple?: undefined;
301
+ maxTagCount?: undefined;
198
302
  };
199
303
  handlerProps(props: any, data?: any): any;
200
- setDefaultValue(defaultValue: any, defValueUnit: any): any;
304
+ setDefaultValue: (defaultValue: any) => any;
201
305
  eventsBySearch?: undefined;
202
306
  style?: undefined;
203
307
  } | {
@@ -306,6 +410,7 @@ export declare const WidgetCfgMaps: Map<string, {
306
410
  clearable?: undefined;
307
411
  filterable?: undefined;
308
412
  multiple?: undefined;
413
+ maxTagCount?: undefined;
309
414
  type?: undefined;
310
415
  valueFormat?: undefined;
311
416
  };
@@ -1 +1 @@
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};
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 o from"./components/InputNumberGroup.vue.js";import n from"./components/Date.vue.js";import p from"./components/DateRange.vue.js";import s from"./components/Select.vue.js";import{presetValToTimestamp as m}from"./helpers/presetValToTimestamp.js";const i=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:i}],[e.INPUTNUMBER_RANGE,{component:o,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,t){"Enter"===e.key&&t()}}],handlerProps:(e,{title:t}={})=>({...e,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}),setDefaultValue:i}],[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:i}],[e.SELECT,{component:s,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},eventsBySearch:[{name:"change",handler(e,t,l){const{multiple:a}=l;a&&t()}}],handlerProps(e,t={}){const{valueList:l,multiple:a,title:r,manualMapping:o,dynamicOptionInfo:n,defaultValue:p,defValueUnit:s,_frontId:m,isInit:i}=t,u={...e,placeholder:`请选择${r}`,manualMapping:o,dynamicOptionInfo:n,valueList:l,defValue:p,defValueUnit:s,_frontId:m,isInit:i};return a&&(u.multiple=!0),u},setDefaultValue:i}],[e.DATE,{component:n,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?m(l,"YYYY-MM-DD HH:mm:ss"):e}],[e.DATE_RANGE,{component:p,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,t={}){const{title:l,filterExplicit:a}=t;return{...e,filterExplicit:a,startPlaceholder:`起始${l}`,endPlaceholder:`截止${l}`}},setDefaultValue:i}],[e.DATE_TIME,{component:n,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?m(l,"YYYY-MM-DD HH:mm:ss"):e}],[e.DATETIME_RANGE,{component:p,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,t={}){const{title:l,filterExplicit:a}=t;return{...e,filterExplicit:a,startPlaceholder:`起始${l}`,endPlaceholder:`截止${l}`}},setDefaultValue:i}],[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:i}]]);export{u as WidgetCfgMaps};
@@ -1 +1 @@
1
- import{WidgetOptionEnums as e,WidgetTypeEnums as t}from"../types/enums.js";import{presetValToTimestamp as i}from"../components/render-widget/helpers/presetValToTimestamp.js";import{DatePresetValEnums as n}from"../components/render-widget/enums.js";const l={[e.RADIO]:"0",[e.MULTIPLE]:"1",[e.ALL]:"0",[e.SELECT_TIME]:"1",[e.PAST_TIME]:"2",[e.FUTURE_TIME]:"3"};function a(){return{transformData:function(i){return i.map((i=>{var n,a;const{optionInfo:o={list:[],manualMapping:!0,dynamicOptionInfo:{}},type:u,defaultValue:r,optionType:s,filterExplicit:p,rangeFilter:d}=i,c={},m={title:(f=i).title,alias:f.customTitle,isShowSearch:f.isShowSearch?1:0,filterExplicit:f.filterExplicit?1:0,explicitRequired:f.explicitRequired?1:0,advanceOptionSetting:f.optionType?l[f.optionType]:"",placeholder:f.remark,advanceColWidth:f.width};var f;let v,g,T=u;p?(v=u===t.SELECT&&s===e.MULTIPLE?null==r?void 0:r.valueList:null==(n=null==r?void 0:r.valueList)?void 0:n[0],g=null==r?void 0:r.unit):u===t.SELECT&&(null==o?void 0:o.list)&&(null==o?void 0:o.list.length)<10&&(T="CHECKBOX_GROUP"),u===t.INPUT_NUMBER&&d&&(T="INPUTNUMBER_GROUP");const E={isRender:!0,isInit:!1,widgetType:T,valueList:null==(a=null==o?void 0:o.list)?void 0:a.map((({name:e,value:t})=>({value:t,label:e}))),defaultValue:v,defValueUnit:g,multiple:s===e.MULTIPLE,manualMapping:null==o?void 0:o.manualMapping,dynamicOptionInfo:null==o?void 0:o.dynamicOptionInfo};return{...m,fieldType:i.dataType,columnName:i.name,settingObj:c,setting:JSON.stringify(c),widgetCfg:E,rangeFilter:d}}))},getCacheDef:function(e,i){const{widgetType:n,widgetCfg:l}=e;return n===t.SELECT&&l.multiple?i:i[0]},transformClassifyChild:function(e){const t={};return e&&e.length>0&&e.forEach((e=>{const l=e.field_key,a=e.value&&e.value.length>1?e.value:e.value.toString();if(t[l]=a,e.unit&&e.unit!==n.CUSTOM){const n=i(e.unit,"YYYY-MM-DD HH:mm:ss");t[l]=n}})),t},transformParams:function(e){const t={};return e&&e.length>0&&e.forEach((e=>{const i=e.field_key,n=e.value&&e.value.length>1?e.value:e.value.toString();t[i]=n})),t}}}export{a as default};
1
+ import{WidgetOptionEnums as e,WidgetTypeEnums as t}from"../types/enums.js";import{presetValToTimestamp as i}from"../components/render-widget/helpers/presetValToTimestamp.js";import{DatePresetValEnums as n}from"../components/render-widget/enums.js";const l={[e.RADIO]:"0",[e.MULTIPLE]:"1",[e.ALL]:"0",[e.SELECT_TIME]:"1",[e.PAST_TIME]:"2",[e.FUTURE_TIME]:"3"};function a(){return{transformData:function(i){return i.map((i=>{var n,a;const{optionInfo:o={list:[],manualMapping:!0,dynamicOptionInfo:{}},type:u,defaultValue:r,optionType:s,filterExplicit:p,rangeFilter:d}=i,c={},m={title:(f=i).title,alias:f.customTitle,isShowSearch:f.isShowSearch?1:0,filterExplicit:f.filterExplicit?1:0,explicitRequired:f.explicitRequired?1:0,advanceOptionSetting:f.optionType?l[f.optionType]:"",placeholder:f.remark,advanceColWidth:f.width};var f;let E,T,v=u;p?(E=u===t.SELECT&&s===e.MULTIPLE?null==r?void 0:r.valueList:null==(n=null==r?void 0:r.valueList)?void 0:n[0],T=null==r?void 0:r.unit):u===t.SELECT&&(null==o?void 0:o.list)&&(null==o?void 0:o.list.length)<10&&(v="CHECKBOX_GROUP"),d&&(u===t.INPUT_NUMBER&&(v="INPUTNUMBER_RANGE"),u===t.DATE&&(v="DATE_RANGE"),u===t.DATE_TIME&&(v="DATETIME_RANGE"));const g={isRender:!0,isInit:!1,widgetType:v,valueList:null==(a=null==o?void 0:o.list)?void 0:a.map((({name:e,value:t})=>({value:t,label:e}))),defaultValue:E,defValueUnit:T,multiple:s===e.MULTIPLE,manualMapping:null==o?void 0:o.manualMapping,dynamicOptionInfo:null==o?void 0:o.dynamicOptionInfo};return{...m,fieldType:i.dataType,columnName:i.name,settingObj:c,setting:JSON.stringify(c),widgetCfg:g,rangeFilter:d}}))},getCacheDef:function(e,i){const{widgetType:n,widgetCfg:l}=e;return n!==t.SELECT&&n!==t.CHECKBOX_GROUP||!l.multiple?i[0]:i},transformClassifyChild:function(e){const t={};return e&&e.length>0&&e.forEach((e=>{const l=e.field_key,a=e.value&&e.value.length>1?e.value:e.value.toString();if(t[l]=a,e.unit&&e.unit!==n.CUSTOM){const n=i(e.unit,"YYYY-MM-DD HH:mm:ss");t[l]=n}})),t},transformParams:function(e){const t={};return e&&e.length>0&&e.forEach((e=>{const i=e.field_key,n=e.value&&e.value.length>1?e.value:e.value.toString();t[i]=n})),t}}}export{a as default};
@@ -21,7 +21,9 @@ export declare const WidgetTypeEnums: {
21
21
  DATE: string;
22
22
  DATE_TIME: string;
23
23
  CHECKBOX_GROUP: string;
24
- INPUTNUMBER_GROUP: string;
24
+ INPUTNUMBER_RANGE: string;
25
+ DATE_RANGE: string;
26
+ DATETIME_RANGE: string;
25
27
  };
26
28
  export declare const WidgetOptionEnums: {
27
29
  RADIO: string;
@@ -1 +1 @@
1
- const T={TEXT:"TEXT",NUMBER:"NUMBER",DATE:"DATE",DATE_TIME:"DATETIME",TIME:"TIME",BOOLEAN:"BOOLEAN"},E={SQL:"SQL",API:"API"},A={MANUAL:"manual",DICT:"dict"},_={INPUT_NUMBER:"NUMBER",INPUT:"TEXT",SELECT:"SELECT",DATE:"DATE",DATE_TIME:"DATETIME",CHECKBOX_GROUP:"CHECKBOX_GROUP",INPUTNUMBER_GROUP:"INPUTNUMBER_GROUP"},R={RADIO:"SELECT_SINGLE",MULTIPLE:"SELECT_MULTIPLE",ALL:"DATETIME_WHOLE",SELECT_TIME:"DATETIME_SELECT",PAST_TIME:"DATETIME_PAST",FUTURE_TIME:"DATETIME_FUTURE"},S={CUSTOM:"CUSTOM",FIRST_VAL:"FIRST",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"},O={NULL:"NULL",EQUAL:"EQ"};export{O as ConditionEnums,E as DataTypeEnums,T as FieldTypeEnums,A as MappingMethodEnums,R as WidgetOptionEnums,_ as WidgetTypeEnums,S as WidgetValEnums};
1
+ const T={TEXT:"TEXT",NUMBER:"NUMBER",DATE:"DATE",DATE_TIME:"DATETIME",TIME:"TIME",BOOLEAN:"BOOLEAN"},E={SQL:"SQL",API:"API"},A={MANUAL:"manual",DICT:"dict"},_={INPUT_NUMBER:"NUMBER",INPUT:"TEXT",SELECT:"SELECT",DATE:"DATE",DATE_TIME:"DATETIME",CHECKBOX_GROUP:"CHECKBOX_GROUP",INPUTNUMBER_RANGE:"INPUTNUMBER_RANGE",DATE_RANGE:"DATE_RANGE",DATETIME_RANGE:"DATETIME_RANGE"},R={RADIO:"SELECT_SINGLE",MULTIPLE:"SELECT_MULTIPLE",ALL:"DATETIME_WHOLE",SELECT_TIME:"DATETIME_SELECT",PAST_TIME:"DATETIME_PAST",FUTURE_TIME:"DATETIME_FUTURE"},N={CUSTOM:"CUSTOM",FIRST_VAL:"FIRST",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,E as DataTypeEnums,T as FieldTypeEnums,A as MappingMethodEnums,R as WidgetOptionEnums,_ as WidgetTypeEnums,N as WidgetValEnums};
@@ -1 +1 @@
1
- var e="@cnhis-design-vue/shared",i="3.1.43-beta.11",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.43-beta.11",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.43-beta.12",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.43-beta.12",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.43-beta.11",
3
+ "version": "3.1.43-beta.12",
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": "36ac612f505c49b133b978160019251a5366f4d5"
64
+ "gitHead": "cbbde1588a10edfec8507d5cc72a7b01ddc74ba2"
65
65
  }