cnhis-design-vue 3.1.45-beta.2 → 3.1.45-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.
Files changed (31) hide show
  1. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  2. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  3. package/es/components/fabric-chart/src/hooks/temperature/useRight.js +1 -1
  4. package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
  5. package/es/components/fabric-chart/src/hooks/useDraw.js +1 -1
  6. package/es/components/fabric-chart/src/interface.d.ts +9 -0
  7. package/es/components/form-config/index.d.ts +3472 -13
  8. package/es/components/form-config/src/FormConfig.vue.d.ts +3472 -13
  9. package/es/components/form-config/src/FormConfig.vue2.js +1 -1
  10. package/es/components/form-config/src/components/FormConfigDragDisplay.vue2.js +1 -1
  11. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +2 -0
  12. package/es/components/form-config/src/components/FormConfigMaterialItem.d.ts +11 -1
  13. package/es/components/form-config/src/components/FormConfigMaterialItem.js +1 -1
  14. package/es/components/form-config/src/components/renderer/DefaultNode.vue.d.ts +2 -0
  15. package/es/components/form-config/src/components/renderer/DefaultNode.vue2.js +1 -1
  16. package/es/components/form-config/src/constants/index.d.ts +1 -0
  17. package/es/components/form-config/src/constants/index.js +1 -1
  18. package/es/components/form-config/src/hooks/useSortalbeConfig.js +1 -1
  19. package/es/components/form-config/src/types/index.d.ts +2 -0
  20. package/es/components/form-config/style/index.css +1 -1
  21. package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
  22. package/es/components/index.css +1 -1
  23. package/es/components/search-cascader/index.d.ts +16 -3
  24. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +16 -3
  25. package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
  26. package/es/shared/package.json.js +1 -1
  27. package/package.json +2 -2
  28. package/es/components/search-cascader/src/hooks/index.d.ts +0 -1
  29. package/es/components/search-cascader/src/hooks/index.js +0 -1
  30. package/es/components/search-cascader/src/hooks/useCssVariable.d.ts +0 -3
  31. package/es/components/search-cascader/src/hooks/useCssVariable.js +0 -1
@@ -47,6 +47,10 @@ declare const _default: import("vue").DefineComponent<{
47
47
  beforeSetValue: {
48
48
  type: PropType<(value: ValueType) => void | ValueType | Promise<ValueType>>;
49
49
  };
50
+ menuWidth: {
51
+ type: (NumberConstructor | StringConstructor)[];
52
+ default: number;
53
+ };
50
54
  }, {
51
55
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
52
56
  value: {
@@ -94,6 +98,10 @@ declare const _default: import("vue").DefineComponent<{
94
98
  beforeSetValue: {
95
99
  type: PropType<(value: ValueType) => void | ValueType | Promise<ValueType>>;
96
100
  };
101
+ menuWidth: {
102
+ type: (NumberConstructor | StringConstructor)[];
103
+ default: number;
104
+ };
97
105
  }>> & {
98
106
  onFocus?: ((...args: any[]) => any) | undefined;
99
107
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
@@ -104,9 +112,9 @@ declare const _default: import("vue").DefineComponent<{
104
112
  onClear: () => void;
105
113
  onClick: (evt: Event) => void;
106
114
  onKeydown: (evt: KeyboardEvent) => void;
107
- cssVariable: {
108
- '--menu-width': number;
109
- };
115
+ cssVariable: import("vue").ComputedRef<{
116
+ '--menu-width': string | number;
117
+ }>;
110
118
  eventBus: AnyObject;
111
119
  uuid: string;
112
120
  show: import("vue").Ref<boolean> | import("vue").WritableComputedRef<boolean>;
@@ -228,6 +236,10 @@ declare const _default: import("vue").DefineComponent<{
228
236
  beforeSetValue: {
229
237
  type: PropType<(value: ValueType) => void | ValueType | Promise<ValueType>>;
230
238
  };
239
+ menuWidth: {
240
+ type: (NumberConstructor | StringConstructor)[];
241
+ default: number;
242
+ };
231
243
  }>> & {
232
244
  onFocus?: ((...args: any[]) => any) | undefined;
233
245
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
@@ -242,5 +254,6 @@ declare const _default: import("vue").DefineComponent<{
242
254
  editPlaceholder: string;
243
255
  labelKey: string;
244
256
  checkAbleLevel: number | "last";
257
+ menuWidth: string | number;
245
258
  }>;
246
259
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,provide as a,computed as l,ref as t,nextTick as o,watch as r,openBlock as u,createBlock as n,unref as s,isRef as c,normalizeStyle as i,withCtx as d,createVNode as v,createElementVNode as p,renderSlot as f}from"vue";import{uuidGenerator as y}from"../../../shared/utils/index.js";import{NOOP as h}from"@vue/shared";import{useDebounceFn as m,useEventBus as g,useVModel as b,onClickOutside as w}from"@vueuse/core";import{isString as k,isArray as S,isFunction as K,isObject as C}from"lodash-es";import{NPopover as _,NInput as N}from"naive-ui";import{InjectionSearchCascaderCheckAbleLevel as P,InjectionKeyboardEventBus as j,InjectionSearchCascaderLoadingNode as A,InjectionSearchCascaderValue as U}from"./constants/index.js";import{useCssVariable as V}from"./hooks/useCssVariable.js";import{SearchMenu as x}from"./components/SearchMenu.js";const F=["id"];var L=e({__name:"SearchCascader",props:{value:{type:[String,Array]},show:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},childKey:{type:String,default:"children"},placeholder:{type:String,default:"请选择"},editPlaceholder:{type:String,default:"请输入关键字进行搜索"},options:{type:Array,default:()=>[]},search:{type:Function},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},checkAbleLevel:{type:[Number,String],default:"last"},beforeSetValue:{type:Function}},emits:["update:value","focus","update:show"],setup(e,{emit:L}){const B=e;function E(){var e;e=[],Promise.resolve(K(B.beforeSetValue)?B.beforeSetValue(e):e).then((e=>L("update:value",e)),h)}function I(e){var a;"INPUT"===(null==(a=e.target)?void 0:a.tagName)&&H()}const R=m((e=>{var a;"INPUT"!==(null==(a=e.target)?void 0:a.tagName)||"Enter"!==e.code||q.value?M.emit(e.key):H()}),50),T=V(),M=g("cascaderKeydown"),$=y(),q=b(B,"show",L);a(P,l((()=>B.checkAbleLevel))),a(j,M);const z=t(""),D=l({get:()=>q.value?z.value:k(B.value)?B.value:S(B.value)?B.value.reduce(((e,a,l)=>0===l?a[B.labelKey]:e+" / "+a[B.labelKey]),""):"",set(e){z.value=e,Z(void 0,e)}});function G(e){L("focus",e)}function H(){q.value||(q.value=!0,z.value="",Z())}async function J(){var e;q.value=!1,null==(e=O.value)||e.blur()}const O=t();w(O,(e=>{var a;if(!q.value)return;const l=e;if(!l.target)return J();!function(e){let a=!1,l=e;for(;l;){if(l.id===$){a=!0;break}l=l.parentElement}return a}(l.target)?J():null==(a=O.value)||a.focus()}));const Q=t(),W=t(),X=t(),Y=t(null);a(A,Y),a(U,l((()=>B.value)));const Z=m((async(e,a)=>{var l;const{type:t,node:r}=e||{};try{if("update"===t)return void(K(B.search)&&B.search({...r,isLeaf:!0}));Y.value=r;const e=await(K(B.search)&&B.search(r,a));W.value=C(e)?e:r}finally{Y.value=null,await o(),null==(l=Q.value)||l.syncPosition()}}),400),ee=e=>{X.value=e};return r((()=>B.show),(e=>{e&&(X.value={})})),(a,l)=>(u(),n(s(_),{class:"search-cascader",trigger:"manual",show:s(q),"onUpdate:show":l[1]||(l[1]=e=>c(q)?q.value=e:null),"show-arrow":!1,placement:"bottom-start",style:i(s(T)),width:e.options.length?void 0:"trigger",ref_key:"popoverRef",ref:Q},{trigger:d((()=>[v(s(N),{class:"search-cascader__input",placeholder:s(q)?e.editPlaceholder:e.placeholder,clearable:e.clearable,onClear:E,value:s(D),"onUpdate:value":l[0]||(l[0]=e=>c(D)?D.value=e:null),ref_key:"inputRef",ref:O,onFocus:G,onClick:I,onKeydown:s(R)},null,8,["placeholder","clearable","value","onKeydown"])])),default:d((()=>[p("section",{id:s($)},[v(s(x),{"label-key":e.labelKey,"value-key":e.valueKey,options:e.options,onNodeClick:s(Z),onChangeCursor:ee,"current-node":W.value,"cursor-node":X.value},{empty:d((()=>[f(a.$slots,"empty")])),_:3},8,["label-key","value-key","options","onNodeClick","current-node","cursor-node"])],8,F)])),_:3},8,["show","style","width"]))}});export{L as default};
1
+ import{defineComponent as e,computed as a,provide as t,ref as l,nextTick as r,watch as o,openBlock as u,createBlock as n,unref as i,isRef as s,normalizeStyle as c,withCtx as d,createVNode as v,createElementVNode as p,renderSlot as f}from"vue";import{uuidGenerator as y}from"../../../shared/utils/index.js";import{NOOP as h}from"@vue/shared";import{useDebounceFn as m,useEventBus as g,useVModel as b,onClickOutside as w}from"@vueuse/core";import{isString as k,isArray as S,isFunction as K,isObject as N}from"lodash-es";import{NPopover as _,NInput as C}from"naive-ui";import{InjectionSearchCascaderCheckAbleLevel as P,InjectionKeyboardEventBus as x,InjectionSearchCascaderLoadingNode as A,InjectionSearchCascaderValue as U}from"./constants/index.js";import{SearchMenu as W}from"./components/SearchMenu.js";const j=["id"];var F=e({__name:"SearchCascader",props:{value:{type:[String,Array]},show:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},childKey:{type:String,default:"children"},placeholder:{type:String,default:"请选择"},editPlaceholder:{type:String,default:"请输入关键字进行搜索"},options:{type:Array,default:()=>[]},search:{type:Function},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},checkAbleLevel:{type:[Number,String],default:"last"},beforeSetValue:{type:Function},menuWidth:{type:[Number,String],default:150}},emits:["update:value","focus","update:show"],setup(e,{expose:F,emit:L}){const V=e;function B(){var e;e=[],Promise.resolve(K(V.beforeSetValue)?V.beforeSetValue(e):e).then((e=>L("update:value",e)),h)}function E(e){var a;"INPUT"===(null==(a=e.target)?void 0:a.tagName)&&G()}const I=m((e=>{var a;"INPUT"!==(null==(a=e.target)?void 0:a.tagName)||"Enter"!==e.code||M.value?T.emit(e.key):G()}),50),R=a((()=>({"--menu-width":V.menuWidth}))),T=g("cascaderKeydown"),$=y(),M=b(V,"show",L);t(P,a((()=>V.checkAbleLevel))),t(x,T);const q=l(""),z=a({get:()=>M.value?q.value:k(V.value)?V.value:S(V.value)?V.value.reduce(((e,a,t)=>0===t?a[V.labelKey]:e+" / "+a[V.labelKey]),""):"",set(e){q.value=e,Z(void 0,e)}});function D(e){L("focus",e)}function G(){M.value||(M.value=!0,q.value="",Z())}async function H(){var e;M.value=!1,null==(e=J.value)||e.blur()}const J=l();w(J,(e=>{var a;if(!M.value)return;const t=e;if(!t.target)return H();!function(e){let a=!1,t=e;for(;t;){if(t.id===$){a=!0;break}t=t.parentElement}return a}(t.target)?H():null==(a=J.value)||a.focus()}));const O=l(),Q=l(),X=l(),Y=l(null);t(A,Y),t(U,a((()=>V.value)));const Z=m((async(e,a)=>{var t;const{type:l,node:o}=e||{};try{if("update"===l)return void(K(V.search)&&V.search({...o,isLeaf:!0}));Y.value=o;const e=await(K(V.search)&&V.search(o,a));Q.value=N(e)?e:o}finally{Y.value=null,await r(),null==(t=O.value)||t.syncPosition()}}),400),ee=e=>{X.value=e};return o((()=>V.show),(e=>{e&&(X.value={})})),F({getWidth(){var e;if(!J.value)return 0;const a=null==(e=J.value)?void 0:e.$el;return a?a.clientWidth:void 0}}),(a,t)=>(u(),n(i(_),{class:"search-cascader",trigger:"manual",show:i(M),"onUpdate:show":t[1]||(t[1]=e=>s(M)?M.value=e:null),"show-arrow":!1,placement:"bottom-start",style:c(i(R)),width:e.options.length?void 0:"trigger",ref_key:"popoverRef",ref:O},{trigger:d((()=>[v(i(C),{class:"search-cascader__input",placeholder:i(M)?e.editPlaceholder:e.placeholder,clearable:e.clearable,onClear:B,value:i(z),"onUpdate:value":t[0]||(t[0]=e=>s(z)?z.value=e:null),ref_key:"inputRef",ref:J,onFocus:D,onClick:E,onKeydown:i(I)},null,8,["placeholder","clearable","value","onKeydown"])])),default:d((()=>[p("section",{id:i($)},[v(i(W),{"label-key":e.labelKey,"value-key":e.valueKey,options:e.options,onNodeClick:i(Z),onChangeCursor:ee,"current-node":Q.value,"cursor-node":X.value},{empty:d((()=>[f(a.$slots,"empty")])),_:3},8,["label-key","value-key","options","onNodeClick","current-node","cursor-node"])],8,j)])),_:3},8,["show","style","width"]))}});export{F as default};
@@ -1 +1 @@
1
- var e="@cnhis-design-vue/shared",i="3.1.45-beta.2",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.45-beta.2",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.45-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.1.45-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.1.45-beta.2",
3
+ "version": "3.1.45-beta.4",
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": "90aaa7fb29f97b237bd91e4a13e748e126aa0da4"
64
+ "gitHead": "a8f7d7cdca3113620c2a7b0dbaf062673dfc51cc"
65
65
  }
@@ -1 +0,0 @@
1
- export * from './useCssVariable';
@@ -1 +0,0 @@
1
- export{useCssVariable}from"./useCssVariable.js";
@@ -1,3 +0,0 @@
1
- export declare function useCssVariable(): {
2
- '--menu-width': number;
3
- };
@@ -1 +0,0 @@
1
- function n(){return{"--menu-width":150}}export{n as useCssVariable};