cnhis-design-vue 3.1.45-beta.4 → 3.1.45-beta.6

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 (63) hide show
  1. package/es/components/annotation-edit/src/AnnotationEdit.js +1 -1
  2. package/es/components/fabric-chart/index.d.ts +40 -5
  3. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +40 -5
  4. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  5. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/index.d.ts +2 -0
  6. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/index.js +1 -0
  7. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.d.ts +4 -0
  8. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -0
  9. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.d.ts +20 -0
  10. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  11. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.d.ts +4 -0
  12. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -0
  13. package/es/components/fabric-chart/src/hooks/useGrid.d.ts +1 -1
  14. package/es/components/fabric-chart/src/hooks/useGrid.js +1 -1
  15. package/es/components/fabric-chart/src/interface.d.ts +4 -0
  16. package/es/components/fabric-chart/src/utils/index.d.ts +2 -1
  17. package/es/components/fabric-chart/src/utils/index.js +1 -1
  18. package/es/components/field-set/index.d.ts +157 -38
  19. package/es/components/field-set/src/FieldSet.vue.d.ts +160 -23
  20. package/es/components/field-set/src/FieldSet.vue2.js +1 -1
  21. package/es/components/field-set/src/components/Row.vue.d.ts +132 -0
  22. package/es/components/field-set/src/components/Row.vue.js +1 -0
  23. package/es/components/field-set/src/components/Row.vue2.js +1 -0
  24. package/es/components/field-set/src/types/index.d.ts +1 -0
  25. package/es/components/field-set/src/utils/index.d.ts +7 -0
  26. package/es/components/field-set/src/utils/index.js +1 -0
  27. package/es/components/field-set/style/index.css +1 -1
  28. package/es/components/form-config/index.d.ts +62 -8
  29. package/es/components/form-config/src/FormConfig.vue.d.ts +62 -8
  30. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +31 -4
  31. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +31 -4
  32. package/es/components/form-render/index.d.ts +31 -4
  33. package/es/components/form-render/src/FormRender.vue.d.ts +31 -4
  34. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  35. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +31 -4
  36. package/es/components/form-render/src/constants/index.d.ts +2 -0
  37. package/es/components/form-render/src/constants/index.js +1 -1
  38. package/es/components/form-render/src/hooks/useFormAsyncQueue.d.ts +1 -1
  39. package/es/components/form-render/src/hooks/useFormAsyncQueue.js +1 -1
  40. package/es/components/form-render/src/hooks/useFormContext.js +1 -1
  41. package/es/components/form-render/src/hooks/useFormRenderLifeCycle.d.ts +3 -1
  42. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +1 -1
  43. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  44. package/es/components/form-render/src/hooks/useNuiThemeOverrides.js +1 -1
  45. package/es/components/form-render/src/types/index.d.ts +2 -0
  46. package/es/components/index.css +1 -1
  47. package/es/components/info-header/index.d.ts +72 -10
  48. package/es/components/info-header/src/InfoHeader.vue.d.ts +72 -10
  49. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +31 -4
  50. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +31 -4
  51. package/es/components/keyboard/index.d.ts +1 -1
  52. package/es/components/keyboard/src/Keyboard.vue.d.ts +1 -1
  53. package/es/components/recommend-search/index.d.ts +2 -2
  54. package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +2 -2
  55. package/es/components/recommend-search/src/components/BaseSearch.d.ts +1 -1
  56. package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +1 -1
  57. package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +1 -1
  58. package/es/components/shortcut-setter/index.d.ts +31 -4
  59. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +31 -4
  60. package/es/shared/hooks/useAsyncQueue.d.ts +3 -1
  61. package/es/shared/hooks/useAsyncQueue.js +1 -1
  62. package/es/shared/package.json.js +1 -1
  63. package/package.json +2 -2
@@ -1 +1 @@
1
- import{checkInSetupEnv as e,jsonParse as n}from"../../../../shared/utils/index.js";import{useMemoize as t,useDebounceFn as l}from"@vueuse/core";import{identity as u,uniqBy as o,isString as r,isEqual as a,omit as i,isArray as c,isFunction as s}from"lodash-es";import{computed as v,inject as m,ref as d,watch as f}from"vue";import"../../index.js";import{InjectionAsyncQueue as y,InjectionFormItemDepsCollector as p}from"../constants/index.js";import{createUrlConfigParams as h,formRenderLog as g,keywordMatcher as w}from"../utils/index.js";import{useFormField as k}from"./useFormField.js";import{useFormRequest as b}from"./useFormRequest.js";function R(e,n){const t=d();return v({get:()=>t.value?t.value:e[n],set(e){t.value=e}})}const C=(()=>{const e=new Map,n=t((e=>new RegExp(`(.*)${e.split("").map((e=>`(${function(e){return e.match(/[()\[\]{}$^\/]/)?"\\"+e:e}(e)})`)).join("(.*)")}(.*)`)),{getKey:u});return(t,l)=>{const u=e.get(t)||{};return e.set(t,u),Reflect.has(u,l)?u[l]:u[l]=l.match(n(t))}})();function K(){const e=d();return{searchContent:e,optionSearchFilter:function(n,t,l){if(!e.value)return n;const u=c(l)?l.filter((e=>e&&r(e))):[];return n.filter((n=>function(n,t,l){if(!e.value)return!0;const u=n?n[t]:"";return!!r(u)&&(!!C(e.value,u)||!!w(e.value,n.keyword)||!!l.length&&l.some((t=>r(n[t])&&n[t].includes(e.value))))}(n,t,u)))}}}function F(e,t,l,u,r){const a=R(e,"commonList"),c=R(e,"recentList"),{searchContent:d,optionSearchFilter:f}=K();function p(e){return n(e.itemObj)}const h=v((()=>{var e,n;return null!=(n=null==(e=a.value)?void 0:e.map(p))?n:[]})),g=v((()=>{var e,n;return null!=(n=null==(e=c.value)?void 0:e.map(p))?n:[]})),w=v((()=>{if(!e.recommend||!h.value.length&&!g.value.length)return t.value;const n=o(h.value.concat(g.value),(e=>e[r.value])),l=t.value.filter((e=>n.every((function(n){return n[r.value]!==e[r.value]}))));return[...f(n,u.value),...l]})),{getRecommendRequestInfo:C,getHttpInstance:F}=b();function j(n){const{url:t,getRecommendIds:l}=C(),u=s(l)?l():{},o=s(e.getRecommendInfo)?e.getRecommendInfo():{};return{url:t[n],info:Object.assign({},u,o)}}const{fieldKey:x}=k(),O=m(y);return{postRecommend:async function(n){if(!e.recommend)return;const t=F();if(!t)return;const{url:u,info:o}=j("post"),a=w.value.find((e=>e[r.value]===n));a&&l("postRecommend",await t.post(u,{...o,keyword:"",itemId:r.value,itemObj:JSON.stringify(a)}))},getRecommend:async function(n){if(!e.recommend)return;if(d.value=n,a.value&&c.value&&e.recommendCache)return;const t=await O.addAsync(function(n,t){const{url:l,info:u}=j("get");return{url:l,method:"get",key:n,cache:t,params:{...u,recNum:Math.max(e.commonNum,e.recentNum),keyword:""}}}(x.value,e.recommendCache)),{commonly:l,recently:u}=t.reduce(((e,n)=>("commonly"===n.type?e.commonly.push(i(n,["type"])):"recently"===n.type&&e.recently.push(i(n,["type"])),e)),{commonly:[],recently:[]});a.value=l.slice(0,e.commonNum),c.value=u.slice(0,e.recentNum)},sortedOptions:w}}function j(n,t){e();const u=m(y),o=v((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.urlConfig)?void 0:e.nameKey)?t:n.labelField)?l:"text"})),i=v((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.urlConfig)?void 0:e.valueKey)?t:n.valueField)?l:"value"})),{searchContent:c,optionSearchFilter:s}=K(),w=d(null),{field:b,fieldKey:R}=k(),C=l((async function(e){if(c.value=e||"",!n.urlConfig)return w.value=null;try{w.value=await u.addAsync(await h({config:n.urlConfig,cache:n.requestCache,field:b.value}))}catch(e){r(e)&&g(e)}}),300),F=v((()=>w.value?s(w.value,o.value):Array.isArray(n.options)?s(n.options,o.value):[])),j=v((()=>w.value||n.options||[])),x=m(p);return f((()=>n.urlConfig),((e,l)=>{a(e,l)||(w.value=null,e&&(x.setDeps(R.value,e.dependKey||[],(async()=>{w.value=null,t.value=null,!n.lazyRequest&&await C()})),(t.value||!n.lazyRequest)&&C()))}),{immediate:!0}),{labelKey:o,valueKey:i,filterOptions:F,fullOptions:j,fetchData:C}}function x(n,t){e();const u=m(y),o=v((()=>{var e,t,l,u;return null!=(u=null!=(l=null==(t=null==(e=n.wordbook)?void 0:e.render_key)?void 0:t[0])?l:n.labelField)?u:"text"})),i=v((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.wordbook)?void 0:e.value_key)?t:n.valueField)?l:"value"})),c=v((()=>{var e;return(null==(e=n.wordbook)?void 0:e.search_key)||[]})),{searchContent:s,optionSearchFilter:p}=K(),h=d(null),{fieldKey:w}=k(),{getSearchRequestInfo:R}=b(),C=l((async function(e){if(s.value=e||"",!n.autograph||!n.wordbook)return h.value=null;try{h.value=await u.addAsync(function(e,t,l){const u={autograph:t,wordbookId:e.id,wordbookType:e.type,fieldKeys:e.search_key,keyword:"",page:1};return{...R(),params:u,key:l,cache:n.requestCache}}(n.wordbook,n.autograph,w.value))}catch(e){r(e)&&g(e)}}),300),F=v((()=>h.value?p(h.value,o.value,c.value):Array.isArray(n.options)?p(n.options,o.value):[])),j=v((()=>h.value||n.options||[]));return f((()=>n.wordbook),((e,l)=>{a(e,l)||(h.value=null,e&&(t.value||!n.lazyRequest)&&C())}),{immediate:!0}),{labelKey:o,valueKey:i,filterOptions:F,fullOptions:j,fetchData:C}}export{C as searchContentMatcher,x as useAutographOptions,F as useRecommendOptions,j as useUrlConfigOptions};
1
+ import{checkInSetupEnv as e,jsonParse as n}from"../../../../shared/utils/index.js";import{useMemoize as t,useDebounceFn as l}from"@vueuse/core";import{identity as u,uniqBy as o,isString as r,isEqual as a,omit as i,isArray as c,isFunction as s}from"lodash-es";import{computed as v,inject as m,ref as d,toRaw as f,watch as y}from"vue";import"../../index.js";import{InjectionAsyncQueue as p,InjectionFormLifeCycleCaller as h,InjectionFormItemDepsCollector as g}from"../constants/index.js";import{createUrlConfigParams as w,formRenderLog as k,keywordMatcher as b}from"../utils/index.js";import{useFormField as R}from"./useFormField.js";import{useFormRequest as C}from"./useFormRequest.js";function K(e,n){const t=d();return v({get:()=>t.value?t.value:e[n],set(e){t.value=e}})}const F=(()=>{const e=t((e=>new RegExp(`(.*)${e.split("").map((e=>`(${function(e){return e.match(/[()\[\]{}$^\/]/)?"\\"+e:e}(e)})`)).join("(.*)")}(.*)`)),{getKey:u});return(n,t)=>t.match(e(n))})();function O(){const e=d();return{searchContent:e,optionSearchFilter:function(n,t,l){if(!e.value)return n;const u=c(l)?l.filter((e=>e&&r(e))):[];return n.filter((n=>function(n,t,l){if(!e.value)return!0;const u=n?n[t]:"";return!!r(u)&&(!!F(e.value,u)||!!b(e.value,n.keyword)||!!l.length&&l.some((t=>r(n[t])&&n[t].includes(e.value))))}(n,t,u)))}}}function j(e,t,l,u,r){const a=K(e,"commonList"),c=K(e,"recentList"),{searchContent:d,optionSearchFilter:f}=O();function y(e){return n(e.itemObj)}const h=v((()=>{var e,n;return null!=(n=null==(e=a.value)?void 0:e.map(y))?n:[]})),g=v((()=>{var e,n;return null!=(n=null==(e=c.value)?void 0:e.map(y))?n:[]})),w=v((()=>{if(!e.recommend||!h.value.length&&!g.value.length)return t.value;const n=o(h.value.concat(g.value),(e=>e[r.value])),l=t.value.filter((e=>n.every((function(n){return n[r.value]!==e[r.value]}))));return[...f(n,u.value),...l]})),{getRecommendRequestInfo:k,getHttpInstance:b}=C();function F(n){const{url:t,getRecommendIds:l}=k(),u=s(l)?l():{},o=s(e.getRecommendInfo)?e.getRecommendInfo():{};return{url:t[n],info:Object.assign({},u,o)}}const{fieldKey:j}=R(),I=m(p);return{postRecommend:async function(n){if(!e.recommend)return;const t=b();if(!t)return;const{url:u,info:o}=F("post"),a=w.value.find((e=>e[r.value]===n));a&&l("postRecommend",await t.post(u,{...o,keyword:"",itemId:r.value,itemObj:JSON.stringify(a)}))},getRecommend:async function(n){if(!e.recommend)return;if(d.value=n,a.value&&c.value&&e.recommendCache)return;const t=await I.addAsync(function(n,t){const{url:l,info:u}=F("get");return{url:l,method:"get",key:n,cache:t,params:{...u,recNum:Math.max(e.commonNum,e.recentNum),keyword:""}}}(j.value,e.recommendCache)),{commonly:l,recently:u}=t.reduce(((e,n)=>("commonly"===n.type?e.commonly.push(i(n,["type"])):"recently"===n.type&&e.recently.push(i(n,["type"])),e)),{commonly:[],recently:[]});a.value=l.slice(0,e.commonNum),c.value=u.slice(0,e.recentNum)},sortedOptions:w}}function I(n,t){e();const u=m(p),o=m(h),i=v((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.urlConfig)?void 0:e.nameKey)?t:n.labelField)?l:"text"})),c=v((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.urlConfig)?void 0:e.valueKey)?t:n.valueField)?l:"value"})),{searchContent:s,optionSearchFilter:b}=O(),C=d(null),{field:K,fieldKey:F}=R(),j=l((async function(e){if(s.value=e||"",!n.urlConfig)return C.value=null;try{const e=await u.addAsync(await w({config:n.urlConfig,cache:n.requestCache,field:K.value}));f(C.value)!==e&&(C.value=e,o("afterOptionInit",[F.value,C.value]))}catch(e){r(e)&&k(e)}}),300),I=v((()=>C.value?b(C.value,i.value):Array.isArray(n.options)?b(n.options,i.value):[])),x=v((()=>C.value||n.options||[])),q=m(g);return y((()=>n.urlConfig),((e,l)=>{a(e,l)||(C.value=null,e&&(q.setDeps(F.value,e.dependKey||[],(async()=>{C.value=null,t.value=null,!n.lazyRequest&&await j()})),(t.value||!n.lazyRequest)&&j()))}),{immediate:!0}),{labelKey:i,valueKey:c,filterOptions:I,fullOptions:x,fetchData:j}}function x(n,t){e();const u=m(p),o=m(h),i=v((()=>{var e,t,l,u;return null!=(u=null!=(l=null==(t=null==(e=n.wordbook)?void 0:e.render_key)?void 0:t[0])?l:n.labelField)?u:"text"})),c=v((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.wordbook)?void 0:e.value_key)?t:n.valueField)?l:"value"})),s=v((()=>{var e;return(null==(e=n.wordbook)?void 0:e.search_key)||[]})),{searchContent:g,optionSearchFilter:w}=O(),b=d(null),{fieldKey:K}=R(),{getSearchRequestInfo:F}=C(),j=l((async function(e){if(g.value=e||"",!n.autograph||!n.wordbook)return b.value=null;try{const e=await u.addAsync(function(e,t,l){const u={autograph:t,wordbookId:e.id,wordbookType:e.type,fieldKeys:e.search_key,keyword:"",page:1};return{...F(),params:u,key:l,cache:n.requestCache}}(n.wordbook,n.autograph,K.value));f(b.value)!==e&&(b.value=e,o("afterOptionInit",[K.value,b.value]))}catch(e){r(e)&&k(e)}}),300),I=v((()=>b.value?w(b.value,i.value,s.value):Array.isArray(n.options)?w(n.options,i.value):[])),x=v((()=>b.value||n.options||[]));return y((()=>n.wordbook),((e,l)=>{a(e,l)||(b.value=null,e&&(t.value||!n.lazyRequest)&&j())}),{immediate:!0}),{labelKey:i,valueKey:c,filterOptions:I,fullOptions:x,fetchData:j}}export{F as searchContentMatcher,x as useAutographOptions,j as useRecommendOptions,I as useUrlConfigOptions};
@@ -1 +1 @@
1
- function e(){return{nuiThemeOverrides:{common:{inputColorDisabled:"#F5F5F5",textColorDisabled:"#000000",placeholderColorDisabled:"#000000",borderColor:"#D5D5D5",errorColor:"#DE1919",placeholderColor:"rgba(0,0,0,0.4)"},Input:{paddingMedium:"8px",paddingSmall:"8px",paddingLarge:"8px",paddingTiny:"8px"},InternalSelection:{paddingSingle:"8px",paddingMultiple:"2px"},Form:{feedbackHeightMedium:"16px",feedbackHeightLarge:"16px",feedbackHeightSmall:"16px",feedbackFontSizeLarge:"12px",feedbackFontSizeMedium:"12px",feedbackFontSizeSmall:"12px",feedbackPadding:"0px"}}}}export{e as useNuiThemeOverrides};
1
+ function e(){return{nuiThemeOverrides:{common:{inputColorDisabled:"#F5F5F5",textColorDisabled:"#000000",placeholderColorDisabled:"#000000",borderColor:"#D5D5D5",errorColor:"#DE1919",placeholderColor:"rgba(0,0,0,0.4)"},Input:{paddingMedium:"8px",paddingSmall:"8px",paddingLarge:"8px",paddingTiny:"8px"},DatePicker:{itemTextColorDisabled:"rgba(194, 194, 194, 1)"},InternalSelection:{paddingSingle:"8px",paddingMultiple:"2px"},Form:{feedbackHeightMedium:"16px",feedbackHeightLarge:"16px",feedbackHeightSmall:"16px",feedbackFontSizeLarge:"12px",feedbackFontSizeMedium:"12px",feedbackFontSizeSmall:"12px",feedbackPadding:"0px"}}}}export{e as useNuiThemeOverrides};
@@ -60,6 +60,7 @@ export declare type FormRenderLifeCycle = Partial<{
60
60
  onSetup(): void;
61
61
  beforeRequest(fieldKey: string, params?: AnyObject): UndefinedAble<AnyObject> | void;
62
62
  afterRequest(fieldKey: string, payload?: any): AnyObject[];
63
+ afterOptionInit(fieldKey: string, options: AnyObject[]): void;
63
64
  }>;
64
65
  export declare type FormRenderProps = Partial<{
65
66
  fieldList: FieldItem[];
@@ -82,6 +83,7 @@ export declare type FormRenderProps = Partial<{
82
83
  lowCodeReactions: FormLowCodeReactions.Config[];
83
84
  linebarAutoHidden: boolean;
84
85
  bordered: boolean | string;
86
+ uniqueCacheData: boolean;
85
87
  }>;
86
88
  export declare type FormBusinessFormatter = (payload: {
87
89
  fieldKey: string;