cnhis-design-vue 3.1.52-beta.32 → 3.1.52-beta.33

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 (35) hide show
  1. package/README.md +87 -87
  2. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  3. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  4. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  5. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  6. package/es/components/expand-field/src/components/form.vue2.js +1 -1
  7. package/es/components/form-config/index.d.ts +108 -0
  8. package/es/components/form-config/src/FormConfig.vue.d.ts +108 -0
  9. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +36 -0
  10. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +12 -0
  11. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  12. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  13. package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
  14. package/es/components/shortcut-setter/index.d.ts +12 -0
  15. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +12 -0
  16. package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +3 -0
  17. package/es/env.d.ts +25 -25
  18. package/es/shared/assets/img/failure.png.js +1 -1
  19. package/es/shared/assets/img/no-permission.png.js +1 -1
  20. package/es/shared/assets/img/nodata.png.js +1 -1
  21. package/es/shared/assets/img/notfound.png.js +1 -1
  22. package/es/shared/assets/img/qr.png.js +1 -1
  23. package/es/shared/assets/img/success.png.js +1 -1
  24. package/es/shared/assets/img/video.png.js +1 -1
  25. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  26. package/es/shared/assets/img/xb_big.png.js +1 -1
  27. package/es/shared/assets/img/xb_small.png.js +1 -1
  28. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  29. package/es/shared/package.json.js +1 -1
  30. package/es/shared/types/business.d.ts +2 -0
  31. package/es/shared/utils/business.d.ts +1 -1
  32. package/es/shared/utils/business.js +1 -1
  33. package/es/shared/utils/fabricjs/index.d.ts +6823 -0
  34. package/es/shared/utils/tapable/index.d.ts +139 -0
  35. package/package.json +2 -2
@@ -12,6 +12,7 @@ export declare type BindEventSettingItem = {
12
12
  p_value: string;
13
13
  p_name: string;
14
14
  }[];
15
+ compareMap?: Partial<Record<LOW_CODE_VALUE_RELATION, (v1: any, v2: any) => boolean>>;
15
16
  [K: string]: unknown;
16
17
  };
17
18
  export declare type FormOperationalConfig = {
@@ -36,6 +37,7 @@ export declare namespace FormLowCodeReactions {
36
37
  type Config = {
37
38
  conObj: ConObj[];
38
39
  } & Partial<{
40
+ compareMap: BindEventSettingItem['compareMap'];
39
41
  sqlExpression: string;
40
42
  showField: string[];
41
43
  hideField: string[];
@@ -3,7 +3,7 @@ import { MaybeRef } from '@vueuse/core';
3
3
  export declare function isMatchLowCodeCondition(value: unknown, condition: {
4
4
  con: LOW_CODE_VALUE_RELATION;
5
5
  value: unknown;
6
- }): boolean;
6
+ }, overwriteCompareMap?: BindEventSettingItem['compareMap']): boolean;
7
7
  export declare function isMatchLowCodeConditionsWithSqlExpression(formData: AnyObject, config: FormLowCodeReactions.Config): any;
8
8
  declare function handleFieldTriggerSetValue(bindEventSetting: BindEventSettingItem, { getter, setter }: {
9
9
  setter: (key: string, value: unknown) => void;
@@ -1 +1 @@
1
- import{Path as e}from"@formily/path";import{isArray as r,isString as n,includes as t,negate as o,gt as l,gte as a,isNumber as i,lt as u,lte as c,noop as s,isObject as p}from"lodash-es";import{unref as f}from"vue";function E(e){return null==e||""==e}const m={EQ:(e,r)=>`${e}`===r,NEQ:(e,r)=>`${e}`!==r,CL:(e,o)=>!(!r(e)&&!n(e))&&t(e,o),NC:(e,o)=>!r(e)&&!n(e)||!t(e,o),NULL:E,NOT_NULL:o(E),BIG:l,BIGEQ:a,LESS:(e,r)=>!!(i(e)||n(e)&&e)&&u(e,r),LESSEQ:(e,r)=>!!(i(e)||n(e)&&e)&&c(e,r)};function g(e,r){return(m[r.con]||(()=>!1))(e,`${r.value}`)}function _(t,o){if(!r(o.conObj))return!1;if(!o.sqlExpression||!n(o.sqlExpression))return o.conObj.every((r=>g(e.getIn(t,r.field_key),r)));const l=o.conObj.map((r=>g(e.getIn(t,r.field_key),r)));try{return new Function("return "+o.sqlExpression.replace(/OR/g,"||").replace(/AND/g,"&&").replace(/[a-zA-Z]/g,"").replace(/\d+/g,(e=>l[+e-1]?"true":"false")))()}catch(e){return console.error("表达式错误=>",o.sqlExpression),!1}}const L=Object.freeze({SET_VALUE:function(e,{getter:r,setter:n}){if(!p(e))return;const{results:t=[],params:o=[]}=e;if(!t.length)return;o.every((e=>e&&e.p_name&&g(r(e.p_name),{con:e.p_select,value:e.p_value})))&&t.forEach((e=>n(e.p_name,e.p_value)))},REPEAT_VALIDATE:s,IS_SHOW_FIELD:s,SQLSAVE:s,API:s});function d(e){return L[e]||s}function A(e,t,o){function l(e){return r(e)&&!!e.length}function a(e,r=!0){e.forEach((e=>{const l=e.operationFormParam.reduce(((e,r)=>(e[r=r.replace(/^table\./,"")]=+t(r),e)),{}),a=e.operationalRule.replace(/\${(.+?)}/g,"$1");let u=new Function("table",`return ${a}`)(l);n(u)&&(u=+u),u=i(u)?isNaN(u)?"":u.toFixed(+e.operationalPrecision):"",(r||null==t(e.operationalResult))&&o(e.operationalResult,u)}))}return{operationalFormHandler:function(r){if(!l(f(e)))return;const n=f(e).filter((e=>e.operationFormParam.includes(`table.${r}`)));n.length&&a(n)},triggerAllOperationalFormHandler:function(){l(f(e))&&a(f(e),!1)}}}export{d as getBindEventSettingTrigger,A as getOperationalFormHandler,g as isMatchLowCodeCondition,_ as isMatchLowCodeConditionsWithSqlExpression};
1
+ import{Path as e}from"@formily/path";import{isArray as r,isString as n,includes as t,negate as o,gt as a,gte as l,isNumber as c,lt as i,lte as u,noop as p,isObject as s}from"lodash-es";import{unref as f}from"vue";function m(e){return null==e||""==e}const E={EQ:(e,r)=>`${e}`===r,NEQ:(e,r)=>`${e}`!==r,CL:(e,o)=>!(!r(e)&&!n(e))&&t(e,o),NC:(e,o)=>!r(e)&&!n(e)||!t(e,o),NULL:m,NOT_NULL:o(m),BIG:a,BIGEQ:l,LESS:(e,r)=>!!(c(e)||n(e)&&e)&&i(e,r),LESSEQ:(e,r)=>!!(c(e)||n(e)&&e)&&u(e,r)};function g(e,r,n={}){return(n[r.con]||E[r.con]||(()=>!1))(e,`${r.value}`)}function _(t,o){if(!r(o.conObj))return!1;if(!o.sqlExpression||!n(o.sqlExpression))return o.conObj.every((r=>g(e.getIn(t,r.field_key),r,o.compareMap)));const a=o.conObj.map((r=>g(e.getIn(t,r.field_key),r,o.compareMap)));try{return new Function("return "+o.sqlExpression.replace(/OR/g,"||").replace(/AND/g,"&&").replace(/[a-zA-Z]/g,"").replace(/\d+/g,(e=>a[+e-1]?"true":"false")))()}catch(e){return console.error("表达式错误=>",o.sqlExpression),!1}}const L=Object.freeze({SET_VALUE:function(e,{getter:r,setter:n}){if(!s(e))return;const{results:t=[],params:o=[],compareMap:a={}}=e;if(!t.length)return;o.every((e=>e&&e.p_name&&g(r(e.p_name),{con:e.p_select,value:e.p_value},a)))&&t.forEach((e=>n(e.p_name,e.p_value)))},REPEAT_VALIDATE:p,IS_SHOW_FIELD:p,SQLSAVE:p,API:p});function d(e){return L[e]||p}function A(e,t,o){function a(e){return r(e)&&!!e.length}function l(e,r=!0){e.forEach((e=>{const a=e.operationFormParam.reduce(((e,r)=>(e[r=r.replace(/^table\./,"")]=+t(r),e)),{}),l=e.operationalRule.replace(/\${(.+?)}/g,"$1");let i=new Function("table",`return ${l}`)(a);n(i)&&(i=+i),i=c(i)?isNaN(i)?"":i.toFixed(+e.operationalPrecision):"",(r||null==t(e.operationalResult))&&o(e.operationalResult,i)}))}return{operationalFormHandler:function(r){if(!a(f(e)))return;const n=f(e).filter((e=>e.operationFormParam.includes(`table.${r}`)));n.length&&l(n)},triggerAllOperationalFormHandler:function(){a(f(e))&&l(f(e),!1)}}}export{d as getBindEventSettingTrigger,A as getOperationalFormHandler,g as isMatchLowCodeCondition,_ as isMatchLowCodeConditionsWithSqlExpression};