cnhis-design-vue 3.2.7-beta.6 → 3.2.7-beta.8
Sign up to get free protection for your applications and to get access to all the features.
- package/es/components/form-config/index.d.ts +3 -3
- package/es/components/form-config/src/FormConfig.vue.d.ts +3 -3
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +3 -3
- package/es/components/form-render/src/hooks/useFormValidator.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +2 -1
- package/es/components/iho-chat/index.d.ts +9 -19
- package/es/components/iho-chat/src/Index.vue.d.ts +9 -19
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +9 -19
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ContextMenu.d.ts +5 -5
- package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/shortcut-setter/index.d.ts +1 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/business.js +1 -1
- package/package.json +2 -2
@@ -219,7 +219,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
219
219
|
wrapperStyle?: Record<string, string> | undefined;
|
220
220
|
childFieldStrategy?: "checked" | "all" | undefined;
|
221
221
|
childWidthMode?: "inner" | "outer" | undefined;
|
222
|
-
validator?: ((value: unknown, fieldItem: import("..").FieldItem) => string | void) | undefined;
|
222
|
+
validator?: ((value: unknown, fieldItem: import("..").FieldItem, field: import("@formily/core").Field<any, any, any, any>) => string | void) | undefined;
|
223
223
|
reactions?: {
|
224
224
|
[x: string]: any;
|
225
225
|
dependencies?: string[] | undefined;
|
@@ -222,7 +222,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
222
222
|
wrapperStyle?: Record<string, string> | undefined;
|
223
223
|
childFieldStrategy?: "checked" | "all" | undefined;
|
224
224
|
childWidthMode?: "inner" | "outer" | undefined;
|
225
|
-
validator?: ((value: unknown, fieldItem: FieldItem) => string | void) | undefined;
|
225
|
+
validator?: ((value: unknown, fieldItem: FieldItem, field: import("@formily/core").Field<any, any, any, any>) => string | void) | undefined;
|
226
226
|
reactions?: {
|
227
227
|
[x: string]: any;
|
228
228
|
dependencies?: string[] | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.2.7-beta.
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.2.7-beta.8",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.7-beta.8",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 +1 @@
|
|
1
|
-
import{Path as e}from"@formily/path";import{isArray as n,isString as t,includes as r,negate as a,isNumber as i,gt as o,gte as l,lt as u,lte as c,identity as f,noop as s,isObject as p}from"lodash-es";import{unref as d}from"vue";import{add as m,differenceInMilliseconds as F}from"date-fns";function D(e){return null==e||""==e}function N(e){return(n,r)=>(t(n)&&(n=+n),t(r)&&(r=+r),!(!i(n)||Number.isNaN(n)||!i(r)||Number.isNaN(r))&&e(n,r))}const g={EQ:(e,n)=>`${e}`===n,NEQ:(e,n)=>`${e}`!==n,CL:(e,a)=>!(!n(e)&&!t(e))&&r(e,a),NC:(e,a)=>!n(e)&&!t(e)||!r(e,a),NULL:D,NOT_NULL:a(D),BIG:N(o),BIGEQ:N(l),LESS:N(u),LESSEQ:N(c)};function E(e,n,t={}){return(t[n.con]||g[n.con]||(()=>!1))(e,`${n.value}`)}function h(e,n){if(!n||!t(n))return e.every(f);try{return new Function("return "+n.replace(/OR/gi,"||").replace(/AND/gi,"&&").replace(/[a-z]/gi,"").replace(/\d+/g,(n=>e[+n-1]?"true":"false")))()}catch(e){return console.error("表达式错误=>",n),!1}}function v(t,r){if(!n(r.conObj))return!1;return h(r.conObj.map((n=>E(e.getIn(t,n.field_key),n,r.compareMap))),r.sqlExpression)}function b(t,r){if(!n(r.conditions))return!1;return h(r.conditions.map((n=>{const a=e.getIn(t,n.field);return"field"===n.valueType?E(a,{con:n.type,value:e.getIn(t,n.value)},r.compareMap):E(a,{con:n.type,value:n.value},r.compareMap)})),r.sqlExpression)}const A=Object.freeze({SET_VALUE:function(e,{getter:n,setter:r}){if(!p(e))return;const{results:a=[],params:i=[],compareMap:o={}}=e;if(!a.length)return;function l(e){var r;if(!t(e))return e;const a=e.trim().match(/^\$\{([a-zA-Z\d\s]+)}$/);return a?n(null==(r=a[1])?void 0:r.trim()):e}i.every((e=>e&&e.p_name&&E(n(e.p_name),{con:e.p_select,value:l(e.p_value)},o)))&&a.forEach((e=>r(e.p_name,l(e.p_value))))},REPEAT_VALIDATE:s,IS_SHOW_FIELD:s,SQLSAVE:s,API:s});function I(e){return A[e]||s}function L(e,r,a){function o(e){return n(e)&&!!e.length}function l(e,n=!0){e.forEach((e=>{if(!e.operationalResult||!n&&null!=r(e.operationalResult))return;const o=e.operationFormParam.reduce(((e,n)=>(e[n=n.replace(/^table\./,"")]=+r(n),e)),{}),l=e.operationalRule.replace(/\${(.+?)}/g,"$1");let u=new Function("table",`return ${l}`)(o);t(u)&&(u=+u),u=i(u)?isNaN(u)?"":u.toFixed(+e.operationalPrecision):"",a(e.operationalResult,u)}))}return{operationalFormHandler:function(n){if(!o(d(e)))return;const t=d(e).filter((e=>e.operationFormParam.includes(`table.${n}`)));t.length&&l(t)},triggerAllOperationalFormHandler:function(){o(d(e))&&l(d(e),!1)}}}function V(e,t,r){function a(e){return n(e)&&!!e.length}function o(e,n=!0){e.forEach((e=>{e.diffValField&&e.diffValUnit&&e.scene&&(n||null==t(e.diffValField))&&("DIFF"===e.scene?function({startDateField:e,endDateField:n,diffValField:a,diffValUnit:i,precision:o="0"}){const l=t(e),u=t(n);if(l&&u){const e=F(new Date(u),new Date(l))/1e3/60,n=e/60,t=n/24;let c="";switch(i){case"DAY":c=t.toFixed(+o);break;case"HOUR":c=n.toFixed(+o);break;case"MIN":c=e.toFixed(+o);break;case"DHM":c=`${Math.floor(t)}天${Math.floor(n%24)}小时${Math.floor(e%60)}分钟`;break}r(a,c)}else r(a,null)}(e):"CALC"===e.scene&&function(e){const n=+e.diffValField;if(!i(n)||Number.isNaN(n))return;const a=t(e.endDateField);if(a){const t=m(new Date(a),{days:"DAY"===e.diffValUnit?n:0,hours:"HOUR"===e.diffValUnit?n:0,minutes:"MIN"===e.diffValUnit?n:0});r(e.startDateField,t)}else r(e.startDateField,null)}(e))}))}return{dateOperationalFormHandler:function(n){if(!a(d(e)))return;const t=d(e).filter((e=>"DIFF"===e.scene&&e.startDateField===n||e.endDateField===n));t.length&&o(t)},triggerAllDateOperationalFormHandler:function(){a(d(e))&&o(d(e),!1)}}}export{I as getBindEventSettingTrigger,V as getDateOperationalFormHandler,L as getOperationalFormHandler,h as isConditionsMatchSqlExpression,E as isMatchLowCodeCondition,v as isMatchLowCodeConditionsWithSqlExpression,b as isMatchNewLowCodeConditionsWithSqlExpression};
|
1
|
+
import{Path as e}from"@formily/path";import{isArray as n,isString as t,includes as r,negate as a,isNumber as i,gt as o,gte as l,lt as u,lte as c,identity as f,noop as s,isObject as p}from"lodash-es";import{unref as d}from"vue";import{add as m,differenceInMilliseconds as F}from"date-fns";function D(e){return null==e||""==e}function N(e){return(n,r)=>(t(n)&&n.trim()&&(n=+n),t(r)&&r.trim()&&(r=+r),!(!i(n)||Number.isNaN(n)||!i(r)||Number.isNaN(r))&&e(n,r))}const g={EQ:(e,n)=>`${e}`===n,NEQ:(e,n)=>`${e}`!==n,CL:(e,a)=>!(!n(e)&&!t(e))&&r(e,a),NC:(e,a)=>!n(e)&&!t(e)||!r(e,a),NULL:D,NOT_NULL:a(D),BIG:N(o),BIGEQ:N(l),LESS:N(u),LESSEQ:N(c)};function E(e,n,t={}){return(t[n.con]||g[n.con]||(()=>!1))(e,`${n.value}`)}function h(e,n){if(!n||!t(n))return e.every(f);try{return new Function("return "+n.replace(/OR/gi,"||").replace(/AND/gi,"&&").replace(/[a-z]/gi,"").replace(/\d+/g,(n=>e[+n-1]?"true":"false")))()}catch(e){return console.error("表达式错误=>",n),!1}}function v(t,r){if(!n(r.conObj))return!1;return h(r.conObj.map((n=>E(e.getIn(t,n.field_key),n,r.compareMap))),r.sqlExpression)}function b(t,r){if(!n(r.conditions))return!1;return h(r.conditions.map((n=>{const a=e.getIn(t,n.field);return"field"===n.valueType?E(a,{con:n.type,value:e.getIn(t,n.value)},r.compareMap):E(a,{con:n.type,value:n.value},r.compareMap)})),r.sqlExpression)}const A=Object.freeze({SET_VALUE:function(e,{getter:n,setter:r}){if(!p(e))return;const{results:a=[],params:i=[],compareMap:o={}}=e;if(!a.length)return;function l(e){var r;if(!t(e))return e;const a=e.trim().match(/^\$\{([a-zA-Z\d\s]+)}$/);return a?n(null==(r=a[1])?void 0:r.trim()):e}i.every((e=>e&&e.p_name&&E(n(e.p_name),{con:e.p_select,value:l(e.p_value)},o)))&&a.forEach((e=>r(e.p_name,l(e.p_value))))},REPEAT_VALIDATE:s,IS_SHOW_FIELD:s,SQLSAVE:s,API:s});function I(e){return A[e]||s}function L(e,r,a){function o(e){return n(e)&&!!e.length}function l(e,n=!0){e.forEach((e=>{if(!e.operationalResult||!n&&null!=r(e.operationalResult))return;const o=e.operationFormParam.reduce(((e,n)=>(e[n=n.replace(/^table\./,"")]=+r(n),e)),{}),l=e.operationalRule.replace(/\${(.+?)}/g,"$1");let u=new Function("table",`return ${l}`)(o);t(u)&&(u=+u),u=i(u)?isNaN(u)?"":u.toFixed(+e.operationalPrecision):"",a(e.operationalResult,u)}))}return{operationalFormHandler:function(n){if(!o(d(e)))return;const t=d(e).filter((e=>e.operationFormParam.includes(`table.${n}`)));t.length&&l(t)},triggerAllOperationalFormHandler:function(){o(d(e))&&l(d(e),!1)}}}function V(e,t,r){function a(e){return n(e)&&!!e.length}function o(e,n=!0){e.forEach((e=>{e.diffValField&&e.diffValUnit&&e.scene&&(n||null==t(e.diffValField))&&("DIFF"===e.scene?function({startDateField:e,endDateField:n,diffValField:a,diffValUnit:i,precision:o="0"}){const l=t(e),u=t(n);if(l&&u){const e=F(new Date(u),new Date(l))/1e3/60,n=e/60,t=n/24;let c="";switch(i){case"DAY":c=t.toFixed(+o);break;case"HOUR":c=n.toFixed(+o);break;case"MIN":c=e.toFixed(+o);break;case"DHM":c=`${Math.floor(t)}天${Math.floor(n%24)}小时${Math.floor(e%60)}分钟`;break}r(a,c)}else r(a,null)}(e):"CALC"===e.scene&&function(e){const n=+e.diffValField;if(!i(n)||Number.isNaN(n))return;const a=t(e.endDateField);if(a){const t=m(new Date(a),{days:"DAY"===e.diffValUnit?n:0,hours:"HOUR"===e.diffValUnit?n:0,minutes:"MIN"===e.diffValUnit?n:0});r(e.startDateField,t)}else r(e.startDateField,null)}(e))}))}return{dateOperationalFormHandler:function(n){if(!a(d(e)))return;const t=d(e).filter((e=>"DIFF"===e.scene&&e.startDateField===n||e.endDateField===n));t.length&&o(t)},triggerAllDateOperationalFormHandler:function(){a(d(e))&&o(d(e),!1)}}}export{I as getBindEventSettingTrigger,V as getDateOperationalFormHandler,L as getOperationalFormHandler,h as isConditionsMatchSqlExpression,E as isMatchLowCodeCondition,v as isMatchLowCodeConditionsWithSqlExpression,b as isMatchNewLowCodeConditionsWithSqlExpression};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "cnhis-design-vue",
|
3
|
-
"version": "3.2.7-beta.
|
3
|
+
"version": "3.2.7-beta.8",
|
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": "
|
75
|
+
"gitHead": "dfaf56997589bb7e0431daffe6ba800b8185f8b4"
|
76
76
|
}
|