cnhis-design-vue 3.2.13-beta.2 → 3.2.13-beta.4
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.
- package/es/components/ai-chat/src/components/ChatCard.js +1 -1
- package/es/components/template-render/src/components/Button.vue.d.ts +1 -0
- package/es/components/template-render/src/components/Button.vue2.js +1 -1
- package/es/components/template-render/src/components/Field.vue.d.ts +1 -1
- package/es/components/template-render/src/components/Field.vue2.js +1 -1
- package/es/components/template-render/src/components/index.d.ts +3 -2
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as
|
1
|
+
import{defineComponent as t,inject as e,ref as n,computed as i,createVNode as o}from"vue";import{NButton as l}from"naive-ui";import{InjectionAIChat as a}from"../types/index.js";import"../../../index.js";import{isArray as r}from"lodash-es";import s from"../../../form-render/index.js";import u from"../../../template-render/index.js";var d=t({name:"ChatCard",inheritAttrs:!1,props:{msgItem:{type:Object,default:()=>({})},instructionId:{type:String}},emits:["button-click"],setup(t,{attrs:d,slots:c,emit:m}){const{patientInfo:p,state:f}=e(a),v=n([]),g=n(),b=i((()=>{var e,n;return!!(null==(n=null==(e=t.msgItem)?void 0:e.content)?void 0:n.body)}));function y(t){try{return JSON.parse(t),!0}catch(t){return!1}}const h=t.msgItem.content;function I(t){const{eventName:e,data:n}=t;e&&m("button-click",{fieldItem:n,isBI:!0})}function x(t){h.data[t.button.id+"Disabled"]=!0,m("button-click",{button:t.button})}return b.value&&(v.value=(h.body.items||[]).map((e=>{var n,i;const o={html_type:e.type,val_key:e.code,name:e.name,elem_width:12,default_val:e.value,lazyRequest:!0,requestCache:!0,urlConfig:{nameKey:null!=(n=e.labelField)?n:"label"},option:[],is_null:e.required?"0":"1"};return"SELECT"===o.html_type&&(o.option=e.options,"fixed"===e.dataSourceType&&(null==(i=e.options)?void 0:i.length)||(o.html_type="REMOTE_SEARCH",Object.assign(o.urlConfig,{url:"/flow/api/instruction/parameter/getOptionsValues",method:"post",params:{instructionId:t.instructionId,code:e.code,configs:p},dependKey:[]}),r(e.dependencies)&&e.dependencies.length&&(o.urlConfig.dependKey=e.dependencies))),o}))),()=>{var e;return o("div",{class:"card"},[b.value?[o("p",null,[h.title||h.header.title]),o(s,{disabled:t.msgItem.disabled,column:12,ref:g,"field-list":v.value},null),h.footer.buttons.map((e=>function(e){const n={width:"100%","--n-height":"36px",fontSize:"15px",marginTop:"10px"},i=b.value?{...n,marginTop:"0"}:n;return o(l,{style:i,secondary:!0,class:"gradient",disabled:t.msgItem.disabled,onClick:async function(){if(b.value){if(!g.value)return;const t=g.value.getFormValues();try{await g.value.validate(),h.body.items.forEach((e=>{t[e.code]&&(e.value=t[e.code])})),f.loading=!0,m("button-click",{values:t,buttonInfo:e,isForm:!0})}catch(t){}}else m("button-click")}},{default:()=>[b.value?null==e?void 0:e.text:h.buttonName]})}(e)))]:o(u,{config:y(null==(e=h.settings)?void 0:e.setting)?JSON.parse(h.settings.setting):null,data:h.data,"onModule-click":I,"onButton-click":x},null)])}}});export{d as default};
|
@@ -31,6 +31,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
31
31
|
};
|
32
32
|
getDisabledText: (button: AnyObject) => any;
|
33
33
|
getButtonStyle: (button: AnyObject) => AnyObject;
|
34
|
+
getButtonProps: (button: AnyObject) => any;
|
34
35
|
handleButtonClick: (button: AnyObject) => void;
|
35
36
|
NButton: any;
|
36
37
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as t,inject as n,computed as e,openBlock as o,createElementBlock as i,normalizeStyle as l,unref as r,normalizeClass as s,Fragment as u,renderList as a,createBlock as d,mergeProps as c,withModifiers as f,withCtx as p,createTextVNode as
|
1
|
+
import{defineComponent as t,inject as n,computed as e,openBlock as o,createElementBlock as i,normalizeStyle as l,unref as r,normalizeClass as s,Fragment as u,renderList as a,createBlock as d,mergeProps as c,withModifiers as f,withCtx as p,createTextVNode as m,toDisplayString as v}from"vue";import{cloneDeep as b,isObject as g}from"lodash-es";import{InjectionTemplateRenderEmit as y}from"../constants/index.js";import{getRealWidth as k,transNumberToPx as x,isFactor as _,getCurText as z}from"../utils/index.js";import{NButton as C}from"naive-ui";var h=t({__name:"Button",props:{config:{default:()=>({}),type:Object},data:{default:()=>({}),type:Object}},setup(t){const h=t,j=n(y),O=e((()=>{var t;return b((null==(t=h.config)?void 0:t.setting)||{})})),S=e((()=>O.value.buttonList||[])),w=e((()=>{const{containerStyle:t={},unitConfig:n={}}=O.value,e=k(t,n);return{"font-size":"14px",...x(t),width:e,"box-sizing":"border-box"}}));function B(t,n){var e;return t.props.block||n===(null==(e=S.value)?void 0:e.length)-1}function L(t){var n,e;const o=(null==(n=null==t?void 0:t.advancedConfig)?void 0:n.disabled)||{};if((null==(e=o.conditions)?void 0:e.length)>0){if(o.conditions.some((t=>_(t,z(h.data[t.field_key])))))return{disabled:!0,title:null==o?void 0:o.title}}return!1}function T(t){const n=L(t),e=t.customTitle||t.name;return g(n)&&n.title?n.title:e}function q(t){return x(null==t?void 0:t.buttonStyle)||{}}return(t,n)=>(o(),i("div",{style:l(r(w)),class:s(r(O).containerClass)},[(o(!0),i(u,null,a(r(S),((t,n)=>(o(),d(r(C),c({class:B(t,n)?"":"c-template-render__mgr8",key:n},function(t){return{...t.props,size:"normal"===t.props.size?"medium":t.props.size}}(t),{style:q(t),disabled:!!L(t),onClick:f((()=>function(t){j("button-click",{...b(h),button:t})}(t)),["stop"])}),{default:p((()=>[m(v(T(t)),1)])),_:2},1040,["class","style","disabled","onClick"])))),128))],6))}});export{h as default};
|
@@ -24,6 +24,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
24
24
|
handleModuleClick: (data: AnyObject) => void;
|
25
25
|
prefixText: import("vue").ComputedRef<any>;
|
26
26
|
suffixText: import("vue").ComputedRef<any>;
|
27
|
+
getFieldText: import("vue").ComputedRef<any>;
|
27
28
|
finalContent: import("vue").ComputedRef<any>;
|
28
29
|
showRowNum: import("vue").ComputedRef<any>;
|
29
30
|
isShowTitle: import("vue").ComputedRef<any>;
|
@@ -35,7 +36,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
35
36
|
onlyShowMore: import("vue").ComputedRef<boolean>;
|
36
37
|
isDisplayMatch: import("vue").ComputedRef<any>;
|
37
38
|
conditionalObj: import("vue").ComputedRef<AnyObject>;
|
38
|
-
getFieldText: import("vue").ComputedRef<any>;
|
39
39
|
emptyPlaceholder: import("vue").ComputedRef<any>;
|
40
40
|
getFieldColor: import("vue").ComputedRef<any>;
|
41
41
|
conditionMatch: (list: AnyObject[]) => {};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,computed as t,unref as l,openBlock as n,createElementBlock as a,normalizeClass as i,normalizeStyle as o,withModifiers as s,createElementVNode as r,toDisplayString as c,createCommentVNode as u,createBlock as d,withCtx as v,createTextVNode as p}from"vue";import{
|
1
|
+
import{defineComponent as e,computed as t,unref as l,openBlock as n,createElementBlock as a,normalizeClass as i,normalizeStyle as o,withModifiers as s,createElementVNode as r,toDisplayString as c,createCommentVNode as u,createBlock as d,withCtx as v,createTextVNode as p}from"vue";import{getCurText as f,transNumberToPx as y,getRealWidth as k,isFactor as m}from"../utils/index.js";import{NEllipsis as g}from"naive-ui";import{useCommon as b}from"../hooks/useCommon.js";const h={key:0},x={key:2},C={key:2};var w=e({__name:"Field",props:{config:{default:()=>({}),type:Object},data:{default:()=>({}),type:Object}},setup(e){const w=e,{setting:_,handleModuleClick:j}=b(w),O=t((()=>_.value.prefix||"")),S=t((()=>_.value.suffix||"")),z=t((()=>{const{conditionalShowList:e=[],mappingFiled:t=[]}=_.value.advancedConfig||{},l=H(e);if(Object.keys(l).length>0){const e=f(w.data[null==l?void 0:l.fieldName]||"");if(e)return e}const n=H(t);if(Object.keys(n).length>0){const e=null==n?void 0:n.key;if(e)return e}return f(w.data[_.value.fieldName])||""})),F=t((()=>z.value?O.value+z.value+S.value:E.value)),L=t((()=>_.value.rowNum||1)),N=t((()=>_.value.showTitle&&_.value.title)),M=t((()=>({...y(_.value.titleStyle),"box-sizing":"border-box"}))),B=t((()=>({...y(_.value.contentStyle),"word-break":"break-all","white-space":"normal","box-sizing":"border-box"}))),P=t((()=>{let e=_.value.containerClass||"";return _.value.prefixBar&&(e=`c-template-render__bar ${e}`),e})),T=t((()=>{const{containerStyle:e={},unitConfig:t={}}=_.value,l=k(e,t);return{"font-size":"14px",...y(e),width:l,"box-sizing":"border-box"}})),$=t((()=>"ellipsis"==_.value.textOverflow)),q=t((()=>"showMore"==_.value.textOverflow)),A=t((()=>{const{displayCondition:e=[]}=_.value.advancedConfig||{};return!e.length||e.some((e=>m(e,f(w.data[e.field_key]))))})),D=t((()=>{const{conditionalShowList:e=[]}=_.value.advancedConfig||{};return e.length>0?H(e):{}})),E=t((()=>_.value.emptyPlaceholder||"--")),G=t((()=>{const{conditionalShowList:e=[],mappingFiled:t=[]}=_.value.advancedConfig||{},l=H(e);if(Object.keys(l).length>0)return"";const n=H(t);return Object.keys(n).length>0?null==n?void 0:n.color:""}));function H(e){let t={};for(let l=0;l<e.length;l++){const n=e[l];if(n.conditions.some((e=>m(e,f(w.data[e.field_key]))))){t=n;break}}return t}return(t,f)=>l(A)?(n(),a("div",{key:0,class:i(l(P)),style:o(l(T))},[l(N)?(n(),a("span",{key:0,class:i(["c-template-render__color60",l(_).titleClass]),style:o(l(M)),onClick:f[0]||(f[0]=s((()=>l(j)(e.data)),["stop"]))},[r("span",null,c(l(D).title||l(_).title),1)],6)):u("v-if",!0),u(" 如果有枚举判断的颜色,则不考虑查看更多的筛选 "),l(G)?(n(),a("span",{key:1,style:o(l(B)),class:i(l(_).contentClass),onClick:f[1]||(f[1]=(...e)=>l(j)&&l(j)(...e))},[l(O)&&l(z)?(n(),a("span",h,c(l(O)),1)):u("v-if",!0),l(G)?(n(),a("span",{key:1,style:o({color:l(G)})},c(l(z)||l(E)),5)):u("v-if",!0),l(S)&&l(z)?(n(),a("span",x,c(l(S)),1)):u("v-if",!0)],6)):(n(),a("span",{key:2,style:o(l(B)),class:i(l(_).contentClass),onClick:f[2]||(f[2]=(...e)=>l(j)&&l(j)(...e))},[l($)?(n(),a("span",{key:0,class:"c-template-render__text-ellipsis",style:o({"-webkit-line-clamp":l(L)})},c(l(F)),5)):l(q)?(n(),d(l(g),{key:1,"expand-trigger":"click","line-clamp":l(L)},{default:v((()=>[p(c(l(F)),1)])),_:1},8,["line-clamp"])):(n(),a("span",C,c(l(F)),1))],6))],6)):u("v-if",!0)}});export{w as default};
|
@@ -23,6 +23,7 @@ declare const Field: import("vue").DefineComponent<{
|
|
23
23
|
handleModuleClick: (data: import("../../../../shared/types").AnyObject) => void;
|
24
24
|
prefixText: import("vue").ComputedRef<any>;
|
25
25
|
suffixText: import("vue").ComputedRef<any>;
|
26
|
+
getFieldText: import("vue").ComputedRef<any>;
|
26
27
|
finalContent: import("vue").ComputedRef<any>;
|
27
28
|
showRowNum: import("vue").ComputedRef<any>;
|
28
29
|
isShowTitle: import("vue").ComputedRef<any>;
|
@@ -34,7 +35,6 @@ declare const Field: import("vue").DefineComponent<{
|
|
34
35
|
onlyShowMore: import("vue").ComputedRef<boolean>;
|
35
36
|
isDisplayMatch: import("vue").ComputedRef<any>;
|
36
37
|
conditionalObj: import("vue").ComputedRef<import("../../../../shared/types").AnyObject>;
|
37
|
-
getFieldText: import("vue").ComputedRef<any>;
|
38
38
|
emptyPlaceholder: import("vue").ComputedRef<any>;
|
39
39
|
getFieldColor: import("vue").ComputedRef<any>;
|
40
40
|
conditionMatch: (list: import("../../../../shared/types").AnyObject[]) => {};
|
@@ -158,6 +158,7 @@ declare function getComponent(type: COMPONENT_TYPE): import("vue").DefineCompone
|
|
158
158
|
handleModuleClick: (data: import("../../../../shared/types").AnyObject) => void;
|
159
159
|
prefixText: import("vue").ComputedRef<any>;
|
160
160
|
suffixText: import("vue").ComputedRef<any>;
|
161
|
+
getFieldText: import("vue").ComputedRef<any>;
|
161
162
|
finalContent: import("vue").ComputedRef<any>;
|
162
163
|
showRowNum: import("vue").ComputedRef<any>;
|
163
164
|
isShowTitle: import("vue").ComputedRef<any>;
|
@@ -169,7 +170,6 @@ declare function getComponent(type: COMPONENT_TYPE): import("vue").DefineCompone
|
|
169
170
|
onlyShowMore: import("vue").ComputedRef<boolean>;
|
170
171
|
isDisplayMatch: import("vue").ComputedRef<any>;
|
171
172
|
conditionalObj: import("vue").ComputedRef<import("../../../../shared/types").AnyObject>;
|
172
|
-
getFieldText: import("vue").ComputedRef<any>;
|
173
173
|
emptyPlaceholder: import("vue").ComputedRef<any>;
|
174
174
|
getFieldColor: import("vue").ComputedRef<any>;
|
175
175
|
conditionMatch: (list: import("../../../../shared/types").AnyObject[]) => {};
|
@@ -343,6 +343,7 @@ declare function getComponent(type: COMPONENT_TYPE): import("vue").DefineCompone
|
|
343
343
|
};
|
344
344
|
getDisabledText: (button: import("../../../../shared/types").AnyObject) => any;
|
345
345
|
getButtonStyle: (button: import("../../../../shared/types").AnyObject) => import("../../../../shared/types").AnyObject;
|
346
|
+
getButtonProps: (button: import("../../../../shared/types").AnyObject) => any;
|
346
347
|
handleButtonClick: (button: import("../../../../shared/types").AnyObject) => void;
|
347
348
|
NButton: any;
|
348
349
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
@@ -1 +1 @@
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.2.13-beta.
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.2.13-beta.4",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.13-beta.4",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.13-beta.
|
3
|
+
"version": "3.2.13-beta.4",
|
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": "00724b4db7127eeb08a6ca9241f89d4cb29f18ec"
|
76
76
|
}
|