cnhis-design-vue 3.1.41-beta.35 → 3.1.41-beta.37

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 (74) hide show
  1. package/README.md +87 -87
  2. package/es/components/base-search/index.d.ts +286 -0
  3. package/es/components/base-search/index.js +1 -0
  4. package/es/components/{table-filter/src/base-search-com/BaseSearch.vue.d.ts → base-search/src/index.vue.d.ts} +1 -4
  5. package/es/components/base-search/src/index.vue.js +1 -0
  6. package/es/components/base-search/style/index.css +1 -0
  7. package/es/components/classification/index.d.ts +1013 -0
  8. package/es/components/classification/index.js +1 -0
  9. package/es/components/{table-filter → classification}/src/components/search-filter/index.vue.d.ts +9 -9
  10. package/es/components/classification/src/components/search-filter/index.vue.js +1 -0
  11. package/es/components/classification/src/components/set-classification/index.vue.js +1 -0
  12. package/es/components/{table-filter → classification}/src/components/table-modal/index.vue.d.ts +1 -3
  13. package/es/components/classification/src/const/index.d.ts +2 -0
  14. package/es/components/classification/src/const/index.js +1 -0
  15. package/es/components/{table-filter/src/classification/Classification-com.vue.d.ts → classification/src/index.vue.d.ts} +6 -6
  16. package/es/components/classification/src/index.vue.js +1 -0
  17. package/es/components/classification/style/iconfont.ttf +0 -0
  18. package/es/components/classification/style/index.css +1 -0
  19. package/es/components/fabric-chart/src/hooks/useBirthProcess.js +1 -1
  20. package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +1 -1
  21. package/es/components/index.css +1 -1
  22. package/es/components/index.d.ts +3 -1
  23. package/es/components/index.js +1 -1
  24. package/es/components/quick-search/index.d.ts +712 -0
  25. package/es/components/quick-search/index.js +1 -0
  26. package/es/components/{table-filter/src/quick-search/QuickSearch.vue.d.ts → quick-search/src/index.vue.d.ts} +21 -8
  27. package/es/components/quick-search/src/index.vue.js +1 -0
  28. package/es/components/quick-search/style/index.css +1 -0
  29. package/es/components/scale-view/src/ScaleView.vue.js +1 -1
  30. package/es/components/table-filter/index.d.ts +0 -1997
  31. package/es/components/table-filter/index.js +1 -1
  32. package/es/components/table-filter/src/hooks/useAdvanced.d.ts +2 -1
  33. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
  34. package/es/components/table-filter/src/hooks/useMixins.d.ts +1 -54
  35. package/es/components/table-filter/src/hooks/useMixins.js +1 -1
  36. package/es/components/table-filter/src/tool/generateDefOptions.js +1 -1
  37. package/es/components/table-filter/src/tool/transformData.d.ts +1 -0
  38. package/es/components/table-filter/src/tool/transformData.js +1 -1
  39. package/es/env.d.ts +24 -24
  40. package/package.json +2 -2
  41. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  42. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  43. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  44. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  45. package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
  46. package/es/components/table-filter/src/base-search-com/BaseSearch.vue.js +0 -1
  47. package/es/components/table-filter/src/classification/Classification-com.vue.js +0 -1
  48. package/es/components/table-filter/src/components/search-filter/index.vue.js +0 -1
  49. package/es/components/table-filter/src/components/set-classification/index.vue.js +0 -1
  50. package/es/components/table-filter/src/const/index.d.ts +0 -5
  51. package/es/components/table-filter/src/const/index.js +0 -1
  52. package/es/components/table-filter/src/hooks/useTableSearchCon.d.ts +0 -8
  53. package/es/components/table-filter/src/hooks/useTableSearchCon.js +0 -1
  54. package/es/components/table-filter/src/hooks/useWordBookutils.d.ts +0 -12
  55. package/es/components/table-filter/src/hooks/useWordBookutils.js +0 -1
  56. package/es/components/table-filter/src/quick-search/QuickSearch.vue.js +0 -1
  57. package/es/components/table-filter/src/tool/time-domain.d.ts +0 -39
  58. package/es/components/table-filter/src/tool/time-domain.js +0 -1
  59. package/es/components/table-filter/src/tool/utils.d.ts +0 -4
  60. package/es/components/table-filter/src/tool/utils.js +0 -1
  61. package/es/components/table-filter/style/index.css +0 -1
  62. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  63. package/es/shared/utils/tapable/index.d.ts +0 -139
  64. /package/es/components/{table-filter → base-search}/src/directive/resize.d.ts +0 -0
  65. /package/es/components/{table-filter → base-search}/src/directive/resize.js +0 -0
  66. /package/es/components/{table-filter → base-search}/src/tool/resizeSensor.d.ts +0 -0
  67. /package/es/components/{table-filter → base-search}/src/tool/resizeSensor.js +0 -0
  68. /package/es/components/{table-filter → base-search}/style/iconfont.ttf +0 -0
  69. /package/es/components/{table-filter → classification}/src/components/set-classification/index.vue.d.ts +0 -0
  70. /package/es/components/{table-filter → classification}/src/components/table-modal/index.vue.js +0 -0
  71. /package/es/components/{table-filter → classification}/src/directive/flexibleResize.d.ts +0 -0
  72. /package/es/components/{table-filter → classification}/src/directive/flexibleResize.js +0 -0
  73. /package/es/components/table-filter/src/tool/{options.d.ts → baseOptions.d.ts} +0 -0
  74. /package/es/components/table-filter/src/tool/{options.js → baseOptions.js} +0 -0
@@ -1 +1 @@
1
- import{COMPONENT_NAMESPACE as s}from"../../shared/global/variable.js";import{safeComponentRegister as i}from"../../shared/utils/index.js";import"./src/hooks/useAdvanced.js";import c from"./src/base-search-com/BaseSearch.vue.js";import o from"./src/quick-search/QuickSearch.vue.js";import r from"./src/classification/Classification-com.vue.js";const a=c;a.install=function(c){i(c,a,s+"BaseSearch")};const t=o;t.install=function(c){i(c,t,s+"QuickSearch")};const e=r;e.install=function(c){i(c,e,s+"Classification")};export{a as CBaseSearch,e as CClassification,t as CQuickSearch};
1
+ import"./src/hooks/useAdvanced.js";
@@ -1,4 +1,4 @@
1
- import { IApiServerType } from '../../../../../es/components/table-filter/src/types';
1
+ import { IApiServerType, ISearchType } from '../../../../../es/components/table-filter/src/types';
2
2
  export default function useAdvanced(): {
3
3
  transformData: (advancedFilterData: IApiServerType[]) => {
4
4
  fieldType: string;
@@ -25,4 +25,5 @@ export default function useAdvanced(): {
25
25
  placeholder: string | undefined;
26
26
  advanceColWidth: string;
27
27
  }[];
28
+ getCacheDef: (item: ISearchType, cacheList: string[]) => string | string[];
28
29
  };
@@ -1 +1 @@
1
- import{WidgetOptionEnums as t,WidgetTypeEnums as e}from"../types/enums.js";const i={[t.RADIO]:"0",[t.MULTIPLE]:"1",[t.ALL]:"0",[t.SELECT_TIME]:"1",[t.PAST_TIME]:"2",[t.FUTURE_TIME]:"3"};function l(){return{transformData:function(l){return l.map((l=>{var n,a;const{optionInfo:o={list:[]},type:u,defaultValue:r,optionType:d,filterExplicit:p}=l,s={},T={title:(c=l).title,alias:c.customTitle,isShowSearch:c.isShowSearch?1:0,filterExplicit:c.filterExplicit?1:0,explicitRequired:c.explicitRequired?1:0,advanceOptionSetting:c.optionType?i[c.optionType]:"",placeholder:c.remark,advanceColWidth:String(c.width)};var c;let v,E,f=u;p?(v=u===e.SELECT&&d===t.MULTIPLE?null==r?void 0:r.valueList:null==(n=null==r?void 0:r.valueList)?void 0:n[0],E=null==r?void 0:r.unit):u===e.SELECT&&(null==o?void 0:o.list)&&(null==o?void 0:o.list.length)<10&&(f="CHECKBOX_GROUP");const L={isRender:!0,widgetType:f,valueList:null==(a=null==o?void 0:o.list)?void 0:a.map((({name:t,value:e})=>({value:e,label:t}))),defaultValue:v,defValueUnit:E,multiple:d===t.MULTIPLE};return{...T,fieldType:l.dataType,columnName:l.name,settingObj:s,setting:JSON.stringify(s),widgetCfg:L}}))}}}export{l as default};
1
+ import{WidgetOptionEnums as t,WidgetTypeEnums as e}from"../types/enums.js";const i={[t.RADIO]:"0",[t.MULTIPLE]:"1",[t.ALL]:"0",[t.SELECT_TIME]:"1",[t.PAST_TIME]:"2",[t.FUTURE_TIME]:"3"};function l(){return{transformData:function(l){return l.map((l=>{var n,a;const{optionInfo:o={list:[]},type:u,defaultValue:r,optionType:d,filterExplicit:p}=l,s={},c={title:(T=l).title,alias:T.customTitle,isShowSearch:T.isShowSearch?1:0,filterExplicit:T.filterExplicit?1:0,explicitRequired:T.explicitRequired?1:0,advanceOptionSetting:T.optionType?i[T.optionType]:"",placeholder:T.remark,advanceColWidth:String(T.width)};var T;let E,f,v=u;p?(E=u===e.SELECT&&d===t.MULTIPLE?null==r?void 0:r.valueList:null==(n=null==r?void 0:r.valueList)?void 0:n[0],f=null==r?void 0:r.unit):u===e.SELECT&&(null==o?void 0:o.list)&&(null==o?void 0:o.list.length)<10&&(v="CHECKBOX_GROUP");const L={isRender:!0,widgetType:v,valueList:null==(a=null==o?void 0:o.list)?void 0:a.map((({name:t,value:e})=>({value:e,label:t}))),defaultValue:E,defValueUnit:f,multiple:d===t.MULTIPLE};return{...c,fieldType:l.dataType,columnName:l.name,settingObj:s,setting:JSON.stringify(s),widgetCfg:L}}))},getCacheDef:function(t,i){const{widgetType:l,widgetCfg:n}=t;return l===e.SELECT&&n.multiple?i:i[0]}}}export{l as default};
@@ -1,61 +1,8 @@
1
- import { AnyObject } from '../../../../../es/shared/types';
2
- import { ISearchType, IbtnType } from '../../../../../es/components/table-filter/src/types';
1
+ import { ISearchType } from '../../../../../es/components/table-filter/src/types';
3
2
  export default function (): {
4
3
  filterApiConfig: import("vue").Ref<{}>;
5
4
  handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
6
- $utils: {
7
- /**
8
- * 获取按钮自定义颜色
9
- * @param {string} v
10
- */
11
- getBtnStyle(v: IbtnType): {
12
- 'border-color': string;
13
- color: string;
14
- 'background-color'?: undefined;
15
- } | {
16
- color: string;
17
- 'border-color'?: undefined;
18
- 'background-color'?: undefined;
19
- } | {
20
- 'background-color': string;
21
- 'border-color': string;
22
- color?: undefined;
23
- };
24
- /**
25
- * @param: 获取按钮的操作对象
26
- * @param {Object} row 行对象
27
- * @param {Object} btn 按钮
28
- */
29
- getRowOperatorIdSetting(row: any, btn: AnyObject): any;
30
- getAlphafloat(a: any, alpha?: any): number;
31
- hexToRGBA(hex: string, alpha?: any): "" | {
32
- r: any;
33
- g: any;
34
- b: any;
35
- a: number;
36
- };
37
- handleLabelColor(item: any, isSelect: boolean): {
38
- color: string;
39
- background: string;
40
- borderColor: string;
41
- };
42
- /**
43
- *
44
- * 时间转换
45
- * @param {type} type 时间戳类型
46
- * @param {time} time 时间戳
47
- */
48
- formatTime(type: string, time: any): string;
49
- isJSON(str: any): boolean;
50
- isArray(val: any): boolean;
51
- isEmpty(val: any): boolean;
52
- isString(val: any): boolean;
53
- isPlainObject(val: any): boolean;
54
- };
55
5
  outQuickSearchFn: {
56
- handleRequestedLabel(v: any): Promise<import("axios").AxiosResponse<any, any>>;
57
6
  handlerInitSearchItem(arr: ISearchType[]): void;
58
- handleSetLabelOptions(labelType: any, el: ISearchType): void;
59
- getConObj(arr: any): any;
60
7
  };
61
8
  };
@@ -1 +1 @@
1
- import{ref as e}from"vue";import r from"moment";import t from"./useRenderWidget.js";import a from"axios";import o from"xe-utils";const{initRenderWidgetCfg:n,getRenderSearchConObj:l}=t();function i(){const t=e({});return{filterApiConfig:t,handleGetConfigApi:async function(e,r,a={},o){try{o&&(t.value=o);const n=t.value[r]||null;if("function"==typeof n){const r=await n(e,a);return Promise.resolve(r)}return Promise.reject(new Error(`${r} Is not a function`))}catch(e){return Promise.reject(e)}},$utils:{getBtnStyle:e=>"white_bg"==e.showStyle?{"border-color":e.color,color:e.color}:"none_bg"==e.showStyle?{color:e.color}:(e.showStyle,{"background-color":e.color,"border-color":e.color}),getRowOperatorIdSetting(e={},r){if(e.operatorColumn){const t=e.operatorColumn.find((e=>e.includes(r.sid)));if(r.setting&&"string"==typeof t&&t.includes("###")){const[e,a]=t.split("###");if(e&&a){const e=JSON.parse(r.setting);if(Array.isArray(e)){const t=e.find((e=>e.obj_id==a));if(t){const e=JSON.parse(JSON.stringify(r));return e.settingObj={...t},e.setting=JSON.stringify(t),e}}}}}const t=JSON.parse(JSON.stringify(r));if(this.isJSON(t.setting)){const e=JSON.parse(t.setting);if(Array.isArray(e)){const r=e[0]||{};return t.settingObj={...r},t.setting=JSON.stringify(r),t}return t}return r},getAlphafloat(e,r){if(void 0!==e)return parseFloat((e/256).toFixed(2));if(void 0!==r){if(1<r&&r<=100)return parseFloat((r/100).toFixed(2));if(0<=r&&r<=1)return parseFloat(r.toFixed(2))}return 1},hexToRGBA(e,r){if(!/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(e))return console.log("Invalid HEX"),"";const t=Math.floor((e.length-1)/3),a=(o=e.slice(1),n=t,o.match(new RegExp(`.{${n}}`,"g")));var o,n;const[l,i,s,u]=a.map((e=>parseInt(e.repeat(2/e.length),16)));return{r:l,g:i,b:s,a:this.getAlphafloat(u,r)}},handleLabelColor(e,r){var t;let a="#5585f5";const o={blue:"#0000ff",sky:"#87ceeb",azure:"#f0ffff",palegreen:"#98fb98",yellow:"#ffff00",darkorange:"#ff8c00",magenta:"#ff00ff",purple:"#800080",maroon:"#800000",orange:"#ffa500",green:"#008000",red:"#ff0000",grey:"#808080"};if(null==(t=null==e?void 0:e.color)?void 0:t.includes("-")){a=o[e.color.split("-")[1]]||"#5585f5"}else a=e.color||"#5585f5";const n=this.hexToRGBA(a)||{r:85,g:133,b:245,a:1};if(r)return{color:"#fff",background:`rgba(${n.r}, ${n.g}, ${n.b})`,borderColor:`rgba(${n.r}, ${n.g}, ${n.b})`};if(e.isSelect)return{color:"#fff",background:`rgba(${n.r}, ${n.g}, ${n.b})`,borderColor:`rgba(${n.r}, ${n.g}, ${n.b})`};return{color:!(e.isPublic&&1==e.isPublic)?"rgba(28, 28, 28, 1)":"rgba(33, 33, 33, 0.6)",background:"rgba(250, 250, 250, 1)",borderColor:"rgba(213, 213, 213, 0.8)"}},formatTime(e,t){let a="";if(!t)return"";switch(e){case"DATE":a="yyyy-MM-dd";break;case"DATETIME":a="yyyy-MM-dd HH:mm:ss";break;case"TIME":a="HH:mm:ss";break;case"MOUTH":a="MM-dd";break;case"DATETIMESTR":a="yyyy年M月dd日 HH:mm";break;case"MOUTHTIME":a="M月d日 HH:mm";break;case"HM":a=" HH:mm"}return r(t).format(a)},isJSON(e){if("string"==typeof e)try{const r=JSON.parse(e);return!("object"!=typeof r||!r)}catch(e){return!1}return!1},isArray:e=>Array.isArray(e),isEmpty(e){for(const r in e)return!1;return!0},isString:e=>"string"==typeof e,isPlainObject:e=>"object"==typeof e},outQuickSearchFn:{handleRequestedLabel(e){const r={type:e,pageSize:1e4};return a.get("/label/list",{params:r})},handlerInitSearchItem(e){Array.isArray(e)&&e.forEach((e=>{n(e)}))},handleSetLabelOptions(e,r){this.handleRequestedLabel(e||"").then((({data:e})=>{if("SUCCESS"===e.result){const t=e.map.rows||[];r.labelList=t}})).catch((e=>console.log(e)))},getConObj(e){if(!Array.isArray(e))return[];const r=[];e.forEach((e=>{var t,a,n;const i=l(e);if(i)return void r.push(i);const s={field_key:e.columnName,con:e.con,value:"",limit_date:"",start_val:e.start_val||"",end_val:e.end_val||"",unit:e.unit||"",id:e.id};"Text"===e.com&&e.value&&(s.value=e.value,r.push(s));const u=e.advanceOptionSetting;if("SelectMui"===e.com&&o.anyNotEmpty(e.value)){"0"===String(u)&&(Array.isArray(e.value)||(e.value=[e.value]));const t=Array.isArray(e.value)&&e.value.length>0;if("SelectMuiWordBook"==e.comType&&t)s.value=e.value.join("|#|");else if("treeSelect"==e.comType){let r=e.value;"string"==typeof r?[r]=r.split("<&=&>"):Array.isArray(r)&&(r=r.map((e=>{const[r]="string"==typeof e?e.split("<&=&>"):[];return r})),r=r.join("|#|")),s.value=r}else if(t)if("CONVERT"==e.con){let r=[];r=e.value.map((r=>e.labelList[r].filter)),s.value=r}else{let r=[];r=e.value.map((r=>e.labelList[r].labelName)),s.value=r.join("|#|")}r.push(s)}if("DatePicker"===e.com&&e.value.length){const t=e.value[0].format(e.showFormat),a=e.value[1].format(e.showFormat);"BIRTHDAY"===e.settingObj.attr?s.limit_date=`${t}~${a}`:(s.start_val=t,s.end_val=a),r.push(s)}if("DayPicker"===e.com&&e.value){const t=e.value.startOf("day").format("YYYY-MM-DD HH:mm:ss"),a=e.value.endOf("day").format("YYYY-MM-DD HH:mm:ss");"BIRTHDAY"===e.settingObj.attr?s.limit_date=`${t}~${a}`:(s.start_val=t,s.end_val=a),r.push(s)}if(e.AGEAttr){s.value="",s.con="IN";const t=365*Number(e.lessValue),a=365*Number(e.bigValue);(t||0===t)&&a&&(s.start_val=t,s.end_val=a,r.push(JSON.parse(JSON.stringify(s))))}else if("Number"===e.com){let o=null!=(t=e.lessValue)?t:"",l=null!=(a=e.bigValue)?a:"";(o||l)&&("PERCENTAGE"===(null==(n=e.settingObj)?void 0:n.attr)&&(o=(o||0===o)&&Number(o)/100||"",l=(l||0===l)&&Number(l)/100),s.value=`${o}~${l}`),s.con="EQ",r.push(JSON.parse(JSON.stringify(s)))}"SelectQuote"===e.com&&e.value.length&&(s.value=e.value.join("|#|"),r.push(s))}));return r.filter((e=>e.value||e.limit_date||e.start_val||e.end_val))}}}}export{i as default};
1
+ import{ref as e}from"vue";import r from"./useRenderWidget.js";const{initRenderWidgetCfg:t,getRenderSearchConObj:n}=r();function o(){const r=e({});return{filterApiConfig:r,handleGetConfigApi:async function(e,t,n={},o){try{o&&(r.value=o);const i=r.value[t]||null;if("function"==typeof i){const r=await i(e,n);return Promise.resolve(r)}return Promise.reject(new Error(`${t} Is not a function`))}catch(e){return Promise.reject(e)}},outQuickSearchFn:{handlerInitSearchItem(e){Array.isArray(e)&&e.forEach((e=>{t(e)}))}}}}export{o as default};
@@ -1 +1 @@
1
- import{WidgetTypeEnums as T,MappingMethodEnums as n,WidgetValEnums as E,DataTypeEnums as i,WidgetOptionEnums as l}from"../types/enums.js";import{widgetValOptions as t}from"./options.js";import{isNil as r}from"./utils.js";const e=(e,p={mappingMethod:null,mapping:[]},u=null)=>{var o,_;if(r(e))return[];if(e===T.SELECT){const{mapping:T,mappingMethod:i}=p;if(T&&i)return i===n.DICT?[{label:"默认选中第一项",value:E.FIRST_VAL}]:T}let A=null!=(_=null==(o=t[i.SQL])?void 0:o[e])?_:[];if(u===l.FUTURE_TIME){const T=[E.TODAY,E.TOMORROW,E.THIS_WEEK,E.NEXT_WEEK,E.THIS_MONTH,E.NEXT_MONTH,E.THIS_QUARTER,E.NEXT_QUARTER,E.THIS_YEAR,E.NEXT_YEAR];A=A.filter((({value:n})=>T.includes(n)))}if(u===l.PAST_TIME){const T=[E.TODAY,E.YESTERDAY,E.THIS_WEEK,E.LAST_WEEK,E.THIS_MONTH,E.LAST_MONTH,E.THIS_QUARTER,E.LAST_QUARTER,E.THIS_YEAR,E.LAST_YEAR];A=A.filter((({value:n})=>T.includes(n)))}return A},p=(n,E={mappingMethod:null,mapping:[]})=>{var l,e;if(r(n))return[];if(n===T.SELECT){const{mapping:T}=E;return T}return null!=(e=null==(l=t[i.API])?void 0:l[n])?e:[]};export{p as generateDefOptionsInApi,e as generateDefOptionsInSql};
1
+ import{WidgetTypeEnums as T,MappingMethodEnums as n,WidgetValEnums as E,DataTypeEnums as r,WidgetOptionEnums as t}from"../types/enums.js";import{widgetValOptions as i}from"./baseOptions.js";import{isNil as l}from"./transformData.js";const e=(e,p={mappingMethod:null,mapping:[]},o=null)=>{var u,_;if(l(e))return[];if(e===T.SELECT){const{mapping:T,mappingMethod:r}=p;if(T&&r)return r===n.DICT?[{label:"默认选中第一项",value:E.FIRST_VAL}]:T}let A=null!=(_=null==(u=i[r.SQL])?void 0:u[e])?_:[];if(o===t.FUTURE_TIME){const T=[E.TODAY,E.TOMORROW,E.THIS_WEEK,E.NEXT_WEEK,E.THIS_MONTH,E.NEXT_MONTH,E.THIS_QUARTER,E.NEXT_QUARTER,E.THIS_YEAR,E.NEXT_YEAR];A=A.filter((({value:n})=>T.includes(n)))}if(o===t.PAST_TIME){const T=[E.TODAY,E.YESTERDAY,E.THIS_WEEK,E.LAST_WEEK,E.THIS_MONTH,E.LAST_MONTH,E.THIS_QUARTER,E.LAST_QUARTER,E.THIS_YEAR,E.LAST_YEAR];A=A.filter((({value:n})=>T.includes(n)))}return A},p=(n,E={mappingMethod:null,mapping:[]})=>{var t,e;if(l(n))return[];if(n===T.SELECT){const{mapping:T}=E;return T}return null!=(e=null==(t=i[r.API])?void 0:t[n])?e:[]};export{p as generateDefOptionsInApi,e as generateDefOptionsInSql};
@@ -1,4 +1,5 @@
1
1
  import { IFilterConditionType } from '../../../../../es/components/table-filter/src/types';
2
+ export declare const isNil: (val: any) => boolean;
2
3
  /**
3
4
  * 高级筛选数据转换
4
5
  */
@@ -1 +1 @@
1
- import{DataTypeEnums as l,WidgetTypeEnums as e,WidgetOptionEnums as t,MappingMethodEnums as i}from"../types/enums.js";import{getWidgetTypeInSql as a}from"./getWidgetType.js";import{isNil as n}from"./utils.js";const u=(u,p=[])=>u===l.API?p.map((l=>{var i,a,n,p,o,r,d,y,f,m,v;const s=null!=(a=null==(i=l.optionInfo)?void 0:i.list)?a:[];return{dataType:u,p_name:l.name,p_type:l.dataType,title:l.title,customTitle:l.customTitle,type:l.type,optionSetting:l.optionType,openAdvancedFilter:l.isShowSearch,filterOutDisplay:l.filterExplicit,filterOutRequired:l.explicitRequired,width:l.width,defValCfg:{value:l.type===e.SELECT&&l.optionType===t.MULTIPLE?null!=(p=null==(n=l.defaultValue)?void 0:n.valueList)?p:[]:null!=(d=null==(r=null==(o=l.defaultValue)?void 0:o.valueList)?void 0:r[0])?d:null,presetVal:l.type===e.SELECT&&l.optionType===t.MULTIPLE?(null==(y=l.defaultValue)?void 0:y.unit)?[null==(f=l.defaultValue)?void 0:f.unit]:[]:null!=(v=null==(m=l.defaultValue)?void 0:m.unit)?v:null},mappingConfig:{mappingMethod:null,mapping:s.map((({name:l,value:e})=>({label:l,value:e})))},remark:l.remark,_rawData:l}})):u===l.SQL?p.map((l=>{var p,o,r,d,y,f,m,v,s,T,c,g,L;let V=null;n(null==(p=l.optionInfo)?void 0:p.manualMapping)||(V=(null==(o=null==l?void 0:l.optionInfo)?void 0:o.manualMapping)?i.MANUAL:i.DICT);const A={mappingMethod:V,mapping:(null!=(d=null==(r=l.optionInfo)?void 0:r.list)?d:[]).map((({name:l,value:e})=>({label:l,value:e})))},E=a(l.dataType,A);return{dataType:u,fieldType:l.dataType,title:l.title,customTitle:l.customTitle,optionSetting:l.optionType,openAdvancedFilter:l.isShowSearch,filterOutDisplay:l.filterExplicit,filterOutRequired:l.explicitRequired,width:l.width,defValCfg:{value:E===e.SELECT&&l.optionType===t.MULTIPLE?null!=(f=null==(y=l.defaultValue)?void 0:y.valueList)?f:[]:null!=(s=null==(v=null==(m=l.defaultValue)?void 0:m.valueList)?void 0:v[0])?s:null,presetVal:E===e.SELECT&&l.optionType===t.MULTIPLE?(null==(T=l.defaultValue)?void 0:T.unit)?[null==(c=l.defaultValue)?void 0:c.unit]:[]:null!=(L=null==(g=l.defaultValue)?void 0:g.unit)?L:null},mappingConfig:A,remark:l.remark,_rawData:l}})):[],p=e=>e.map((e=>{var t;const{title:i,customTitle:a,openAdvancedFilter:n,filterOutDisplay:u,filterOutRequired:p,width:o,optionSetting:r,defValCfg:d,mappingConfig:y,remark:f,_rawData:m}=e,{value:v,presetVal:s}=d,{mapping:T}=y;if(e.dataType===l.API){const{p_name:l,p_type:d,type:y}=e;return{...m,name:l,title:i,customTitle:a,type:y,dataType:d,isShowSearch:n,filterExplicit:u,explicitRequired:p,width:o,optionType:r,defaultValue:{valueList:Array.isArray(v)?v:v?[v]:[],unit:Array.isArray(s)?s[0]:s},optionInfo:{manualMapping:null==(t=null==m?void 0:m.optionInfo)?void 0:t.manualMapping,list:T.map((({label:l,value:e})=>({name:l,value:e})))},remark:f}}if(e.dataType===l.SQL){const{title:l,fieldType:t}=e;return{...m,name:m&&m.name,title:l,customTitle:a,type:m&&m.type,dataType:t,isShowSearch:n,filterExplicit:u,explicitRequired:p,width:o,optionType:r,defaultValue:{valueList:Array.isArray(v)?v:v?[v]:[],unit:Array.isArray(s)?s[0]:s},optionInfo:m&&m.optionInfo,remark:f}}return null})).filter((l=>!!l)),o=(l,i)=>l.map((l=>{var a,n;const u=((l,e)=>e.find((e=>e.p_name===l)))(l.field_key,i);let p=l.value;p&&!Array.isArray(p)&&(p=[p]);const o=(null==u?void 0:u.type)===e.SELECT&&(null==u?void 0:u.optionSetting)===t.MULTIPLE?null!=p?p:[]:null!=(a=null==p?void 0:p[0])?a:null;return{key:l.field_key,condition:l.con,value:o,presetVal:null!=(n=l.unit)?n:null}})),r=l=>l.map((l=>({field_key:l.key,con:l.condition,value:Array.isArray(l.value)?l.value:l.value?[l.value]:[],unit:l.presetVal})));export{o as transformConditions,p as transformDataToEnd,u as transformDataToFront,r as transformRawConditions};
1
+ import{DataTypeEnums as l,WidgetTypeEnums as e,WidgetOptionEnums as t,MappingMethodEnums as i}from"../types/enums.js";import{getWidgetTypeInSql as a}from"./getWidgetType.js";const n=l=>null==l||null==l,u=(u,p=[])=>u===l.API?p.map((l=>{var i,a,n,p,o,r,d,y,v,f,m;const s=null!=(a=null==(i=l.optionInfo)?void 0:i.list)?a:[];return{dataType:u,p_name:l.name,p_type:l.dataType,title:l.title,customTitle:l.customTitle,type:l.type,optionSetting:l.optionType,openAdvancedFilter:l.isShowSearch,filterOutDisplay:l.filterExplicit,filterOutRequired:l.explicitRequired,width:l.width,defValCfg:{value:l.type===e.SELECT&&l.optionType===t.MULTIPLE?null!=(p=null==(n=l.defaultValue)?void 0:n.valueList)?p:[]:null!=(d=null==(r=null==(o=l.defaultValue)?void 0:o.valueList)?void 0:r[0])?d:null,presetVal:l.type===e.SELECT&&l.optionType===t.MULTIPLE?(null==(y=l.defaultValue)?void 0:y.unit)?[null==(v=l.defaultValue)?void 0:v.unit]:[]:null!=(m=null==(f=l.defaultValue)?void 0:f.unit)?m:null},mappingConfig:{mappingMethod:null,mapping:s.map((({name:l,value:e})=>({label:l,value:e})))},remark:l.remark,_rawData:l}})):u===l.SQL?p.map((l=>{var p,o,r,d,y,v,f,m,s,T,c,g,L;let V=null;n(null==(p=l.optionInfo)?void 0:p.manualMapping)||(V=(null==(o=null==l?void 0:l.optionInfo)?void 0:o.manualMapping)?i.MANUAL:i.DICT);const A={mappingMethod:V,mapping:(null!=(d=null==(r=l.optionInfo)?void 0:r.list)?d:[]).map((({name:l,value:e})=>({label:l,value:e})))},E=a(l.dataType,A);return{dataType:u,fieldType:l.dataType,title:l.title,customTitle:l.customTitle,optionSetting:l.optionType,openAdvancedFilter:l.isShowSearch,filterOutDisplay:l.filterExplicit,filterOutRequired:l.explicitRequired,width:l.width,defValCfg:{value:E===e.SELECT&&l.optionType===t.MULTIPLE?null!=(v=null==(y=l.defaultValue)?void 0:y.valueList)?v:[]:null!=(s=null==(m=null==(f=l.defaultValue)?void 0:f.valueList)?void 0:m[0])?s:null,presetVal:E===e.SELECT&&l.optionType===t.MULTIPLE?(null==(T=l.defaultValue)?void 0:T.unit)?[null==(c=l.defaultValue)?void 0:c.unit]:[]:null!=(L=null==(g=l.defaultValue)?void 0:g.unit)?L:null},mappingConfig:A,remark:l.remark,_rawData:l}})):[],p=e=>e.map((e=>{var t;const{title:i,customTitle:a,openAdvancedFilter:n,filterOutDisplay:u,filterOutRequired:p,width:o,optionSetting:r,defValCfg:d,mappingConfig:y,remark:v,_rawData:f}=e,{value:m,presetVal:s}=d,{mapping:T}=y;if(e.dataType===l.API){const{p_name:l,p_type:d,type:y}=e;return{...f,name:l,title:i,customTitle:a,type:y,dataType:d,isShowSearch:n,filterExplicit:u,explicitRequired:p,width:o,optionType:r,defaultValue:{valueList:Array.isArray(m)?m:m?[m]:[],unit:Array.isArray(s)?s[0]:s},optionInfo:{manualMapping:null==(t=null==f?void 0:f.optionInfo)?void 0:t.manualMapping,list:T.map((({label:l,value:e})=>({name:l,value:e})))},remark:v}}if(e.dataType===l.SQL){const{title:l,fieldType:t}=e;return{...f,name:f&&f.name,title:l,customTitle:a,type:f&&f.type,dataType:t,isShowSearch:n,filterExplicit:u,explicitRequired:p,width:o,optionType:r,defaultValue:{valueList:Array.isArray(m)?m:m?[m]:[],unit:Array.isArray(s)?s[0]:s},optionInfo:f&&f.optionInfo,remark:v}}return null})).filter((l=>!!l)),o=(l,i)=>l.map((l=>{var a,n;const u=((l,e)=>e.find((e=>e.p_name===l)))(l.field_key,i);let p=l.value;p&&!Array.isArray(p)&&(p=[p]);const o=(null==u?void 0:u.type)===e.SELECT&&(null==u?void 0:u.optionSetting)===t.MULTIPLE?null!=p?p:[]:null!=(a=null==p?void 0:p[0])?a:null;return{key:l.field_key,condition:l.con,value:o,presetVal:null!=(n=l.unit)?n:null}})),r=l=>l.map((l=>({field_key:l.key,con:l.condition,value:Array.isArray(l.value)?l.value:l.value?[l.value]:[],unit:l.presetVal})));export{n as isNil,o as transformConditions,p as transformDataToEnd,u as transformDataToFront,r as transformRawConditions};
package/es/env.d.ts CHANGED
@@ -1,24 +1,24 @@
1
- /// <reference types="vite/client" />
2
-
3
- interface ImportMetaEnv {
4
- readonly VITE_APP_TYPE: string;
5
- // 更多环境变量...
6
- }
7
-
8
- interface ImportMeta {
9
- readonly env: ImportMetaEnv;
10
- }
11
-
12
- declare module '*.vue' {
13
- // @ts-ignore
14
- import type { App, defineComponent } from 'vue';
15
- // // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
16
- // // const component: DefineComponent<{}, {}, any>
17
- const component: ReturnType<typeof defineComponent> & {
18
- install(app: App): void;
19
- };
20
- // @ts-ignore
21
- export default component;
22
- }
23
-
24
- declare module '*.js';
1
+ /// <reference types="vite/client" />
2
+
3
+ interface ImportMetaEnv {
4
+ readonly VITE_APP_TYPE: string;
5
+ // 更多环境变量...
6
+ }
7
+
8
+ interface ImportMeta {
9
+ readonly env: ImportMetaEnv;
10
+ }
11
+
12
+ declare module '*.vue' {
13
+ // @ts-ignore
14
+ import type { App, defineComponent } from 'vue';
15
+ // // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
16
+ // // const component: DefineComponent<{}, {}, any>
17
+ const component: ReturnType<typeof defineComponent> & {
18
+ install(app: App): void;
19
+ };
20
+ // @ts-ignore
21
+ export default component;
22
+ }
23
+
24
+ declare module '*.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.1.41-beta.35",
3
+ "version": "3.1.41-beta.37",
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": "a2ef17539589b6d7b2cbd94a1951179520127dc8"
64
+ "gitHead": "d92a1eaa7d87f53d7513cf80da4b0d0a2c2d11a8"
65
65
  }
File without changes
@@ -1 +0,0 @@
1
- declare module 'bpmn-js/lib/Viewer';
@@ -1 +0,0 @@
1
- declare module 'bpmn-js/lib/features/modeling';
@@ -1 +0,0 @@
1
- declare module 'diagram-js/lib/navigation/movecanvas';