cnhis-design-vue 3.2.5-beta.2 → 3.2.5-beta.5
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/button-print/index.d.ts +18 -1
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +18 -1
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +9 -0
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
- package/es/components/default-page/src/index.vue2.js +1 -1
- package/es/components/default-page/style/index.css +1 -1
- package/es/components/form-render/src/components/renderer/levelSearchCascader/index.js +1 -1
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/useFormContext.js +1 -1
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/iho-table/index.d.ts +9 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +10 -1
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
- package/es/components/iho-table/src/constants/index.d.ts +2 -1
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +3 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
- package/es/components/iho-table/src/plugins/headerPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/highLightSetPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/pagerScrollPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.js +1 -1
- package/es/components/iho-table/src/plugins/stickyFixedPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/stickyFixedPlugin.js +1 -0
- package/es/components/iho-table/src/types/index.d.ts +9 -6
- package/es/components/iho-table/src/types/pluginType.d.ts +1 -0
- package/es/components/iho-table/src/utils/index.d.ts +5 -3
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/src/InfoHeader.vue2.js +1 -1
- package/es/components/shortcut-provider/src/ShortcutProvider.vue2.js +1 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue2.js +1 -1
- package/es/components/step-notice/src/StepNotice.vue2.js +1 -1
- package/es/components/time-picker/src/TimePicker.vue2.js +1 -1
- package/es/shared/hooks/selectHooks/useOptionFiltered.js +1 -1
- package/es/shared/hooks/selectHooks/useSelectRenders.js +1 -1
- package/es/shared/hooks/useFormRequest/index.js +1 -1
- package/es/shared/hooks/useLevelSearchCascader.js +1 -1
- package/es/shared/hooks/useTheme.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/index.js +1 -1
- package/package.json +2 -2
- package/es/components/iho-table/src/plugins/pagerScrollPlugin/pagerScroll.vue.js +0 -1
- package/es/components/iho-table/src/plugins/pagerScrollPlugin/pagerScroll.vue2.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,provide as t,ref as o,computed as n,openBlock as i,createElementBlock as a,mergeProps as s,unref as r,createCommentVNode as p,renderSlot as c,createElementVNode as d,normalizeClass as l,normalizeStyle as f,createVNode as m,withCtx as u,Fragment as h,renderList as v,createBlock as y,resolveDynamicComponent as g,h as b,nextTick as _}from"vue";import"../../../shared/utils/index.js";import
|
|
1
|
+
import{defineComponent as e,provide as t,ref as o,computed as n,openBlock as i,createElementBlock as a,mergeProps as s,unref as r,createCommentVNode as p,renderSlot as c,createElementVNode as d,normalizeClass as l,normalizeStyle as f,createVNode as m,withCtx as u,Fragment as h,renderList as v,createBlock as y,resolveDynamicComponent as g,h as b,nextTick as _}from"vue";import"../../../shared/utils/index.js";import"naive-ui";import"@vueuse/core";import"date-fns";import{isString as I}from"lodash-es";import"@vue/shared";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{useVersion as $}from"../../../shared/hooks/useVersion.js";import j from"./components/infoDescription/index.vue.js";import x from"./components/patientInfo/index.vue.js";import{InjectionInfoHeaderEmit as S,InjectionInfoHeaderFormRef as k}from"./constants/index.js";const z={class:"c-info-header__operation"},w={key:0,class:"c-info-header__divider"},C={class:"c-info-header__setting"},B=["onClick"];var H=e({__name:"InfoHeader",props:{anime:{type:Boolean,default:!0},compact:{type:Boolean,required:!0},patientInfo:{type:Object,default:()=>({})},patientEditable:{type:Boolean},separator:{type:String,default:":"},infoList:{type:Array,default:()=>[]},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},minColumnWidth:{type:[String,Number],default:180},rowHeight:{type:[String,Number],default:24},settingIcons:{type:Array,default:()=>["patientInfo","fieldSet","compact"]},formProps:{type:Object},encrypted:{type:Boolean,default:!0}},emits:["openPatientInfo","fieldSet","update:compact","formChange"],setup(e,{expose:H,emit:P}){const A=e;t(S,P);const D=o();function E(){var e;return null==(e=D.value)?void 0:e.updateColumn()}const F=n((()=>({"--row-height":A.rowHeight,"--row-num":A.compact?1:2,"--padding-tb":A.compact?6:4}))),N={patientInfo:{event:function(){P("openPatientInfo")},render:()=>[b("i",{class:"info-header--iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaobianji"})]},fieldSet:{event:function(){P("fieldSet")},render:()=>[b("i",{class:"info-header--iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaoshezhi"})]},compact:{event:async function(){P("update:compact",!A.compact),await _(),await E()},render:()=>[b("i",{class:"info-header--iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaojiantouxia"})]}},O=n((()=>A.settingIcons.map((e=>(I(e)?N[e]:e)||{})))),R=o();return t(k,R),H({update:E,$formRender:R}),(t,o)=>(i(),a("header",s({class:["c-info-header",{"anime--disabled":!e.anime}]},r($)()),[p(" 顶部插槽 "),c(t.$slots,"header"),d("div",{class:l(["c-info-header__content",{"is-compact":e.compact}]),style:f(r(F))},[d("section",z,[p(" 操作区插槽 "),c(t.$slots,"operation")]),t.$slots.operation?(i(),a("div",w)):p("v-if",!0),p(" 患者信息区插槽,需要自己实现整个患者信息区时使用 "),c(t.$slots,"patientModule",{},(()=>[m(r(x),{"patient-info":e.patientInfo,"patient-editable":e.patientEditable},{avatarInfo:u((()=>[p(" 头像区补充内容插槽 (会插入头像下方) "),c(t.$slots,"avatarInfo")])),avatar:u((()=>[p(" 头像插槽 "),c(t.$slots,"avatar")])),tags:u((()=>[p(" 标签插槽 "),c(t.$slots,"tags")])),_:3},8,["patient-info","patient-editable"])])),m(r(j),s({ref_key:"infoDescriptionRef",ref:D,"root-slot":t.$slots},t.$props),{info:u((()=>[p(" 信息描述区插槽 "),c(t.$slots,"info")])),_:3},16,["root-slot"]),d("section",C,[p(" 设置区插槽 "),c(t.$slots,"setting",{},(()=>[(i(!0),a(h,null,v(r(O),(e=>(i(),a("div",{key:e,class:"c-info-header__settingIcon",onClick:e.event},[(i(),y(g(e.render)))],8,B)))),128))]))])],6),p(" 底部插槽 "),c(t.$slots,"footer")],16))}});export{H as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as o,ref as e,provide as r,onBeforeUnmount as s,onMounted as t,openBlock as i,createElementBlock as u,mergeProps as p,unref as a,createCommentVNode as n,renderSlot as m}from"vue";import{uuidGenerator as c}from"../../../shared/utils/index.js";import"
|
|
1
|
+
import{defineComponent as o,ref as e,provide as r,onBeforeUnmount as s,onMounted as t,openBlock as i,createElementBlock as u,mergeProps as p,unref as a,createCommentVNode as n,renderSlot as m}from"vue";import{uuidGenerator as c}from"../../../shared/utils/index.js";import"naive-ui";import"@vueuse/core";import"date-fns";import"lodash-es";import"@vue/shared";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{useVersion as d}from"../../../shared/hooks/useVersion.js";import{InjectionShortcutManager as h}from"./constants/index.js";import"../index.js";import{ShortcutManager as f}from"./hooks/useShortcuts.js";var l=o({__name:"ShortcutProvider",props:{scope:{type:[String,Symbol]},autoFocus:{type:Boolean,default:!0}},setup(o){const l=o,v=e(),j=new f(v,l.scope||c()).start();return r(h,j),s((()=>{j.destroy()})),t((()=>{var o;return null==(o=v.value)?void 0:o.focus()})),(o,e)=>(i(),u("section",p({ref_key:"shortcutWrapperRef",ref:v,"is-shortcut-capture":"",class:"shortcut-provider",tabindex:-9999},a(d)()),[n(" 需要绑定该作用域快捷键的内容 "),m(o.$slots,"default")],16))}});export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as t,computed as r,watch as o,openBlock as s,createBlock as i,unref as a,mergeProps as l}from"vue";import"../../../shared/utils/index.js";import
|
|
1
|
+
import{defineComponent as e,ref as t,computed as r,watch as o,openBlock as s,createBlock as i,unref as a,mergeProps as l}from"vue";import"../../../shared/utils/index.js";import"naive-ui";import"@vueuse/core";import"date-fns";import{isEqual as u,cloneDeep as n}from"lodash-es";import"@vue/shared";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{useVersion as p}from"../../../shared/hooks/useVersion.js";import"../../shortcut-provider/index.js";import{normalizeSignatureInfo as c,isInvalidSignature as m,getDisplaySignature as d}from"../../shortcut-provider/src/utils/index.js";import h from"./ShortcutSetterItem.vue.js";import v from"../../form-render/index.js";import{GlobalShortcutProvider as f,useShortcuts as S}from"../../shortcut-provider/src/hooks/useShortcuts.js";var y=e({__name:"ShortcutSetter",props:{glob:{type:Boolean,default:!1},scope:{type:[String,Symbol]}},emits:["error","update"],setup(e,{expose:y,emit:g}){const j=e,k={SHORTCUT:h},b=t(0),x=r((()=>j.glob?f:j.scope)),_=S(x),C=t([]);let O={};function T(){O={},C.value=_.traverse().map((e=>(O[e.key]=c(e.shortcutSignature),{val_key:e.key,alias:e.label,html_type:"SHORTCUT",componentProps:{scope:x.value,onShortcutChange:H,shortcutKey:e.key,shortcutSignature:e.shortcutSignature,editPlaceholder:e.editPlaceholder,placeholder:e.placeholder,clearable:e.clearable,operation:e.operation},elem_width:6}))),b.value++}function H({key:e,info:t,resolve:r,reject:o}){const s=c(t);return m(s)?(g("error",`非法的快捷键组合=> ${d(s)}`),o()):Object.values(O).some((e=>u(e,s)))?(g("error",`重复的快捷键=> ${d(s)}`),o()):(g("update",{key:e,info:s}),O[e]=s,void r())}return o([x,()=>_.traverse()],T,{immediate:!0,deep:!0}),y({loadSignature(){T()},getSignature:()=>n(O),setSignature(){Object.entries(O).forEach((([e,t])=>{_.update(e,t)}))}}),(e,t)=>(s(),i(a(v),l({column:12,key:b.value,"label-placement":"left","field-list":C.value,components:k},a(p)()),null,16,["field-list"]))}});export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as t,ref as o,watch as s,openBlock as i,createElementBlock as r,mergeProps as a,unref as c,Fragment as p,renderList as n,createBlock as l,createCommentVNode as m}from"vue";import"../../../shared/utils/index.js";import{
|
|
1
|
+
import{defineComponent as e,computed as t,ref as o,watch as s,openBlock as i,createElementBlock as r,mergeProps as a,unref as c,Fragment as p,renderList as n,createBlock as l,createCommentVNode as m}from"vue";import"../../../shared/utils/index.js";import"naive-ui";import{useDebounceFn as u,useElementSize as h}from"@vueuse/core";import"date-fns";import{cloneDeep as f,isNumber as y}from"lodash-es";import"@vue/shared";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{useVersion as d}from"../../../shared/hooks/useVersion.js";import k from"./components/NoticeItem.vue.js";import{useStepNoticeTheme as v}from"./hooks/useTheme.js";var C=e({__name:"StepNotice",props:{items:{type:Array,default:()=>[]},rowCapacity:{type:Number,default:4},colSpace:{type:[Number,String],default:125}},emits:["itemClick"],setup(e,{expose:C,emit:w}){const g=e,S=t((()=>{const e=[],t=f(g.items);for(let o=0;o<t.length;o+=g.rowCapacity)e.push(t.slice(o,o+g.rowCapacity).map(((e,s,i)=>{const r=t[o+s+1];return Object.assign(e,{isGroupLast:s===i.length-1,nextItem:r}),e})));return e}));const _=v(),j=t((()=>({..._.value,"--step-notice-col-space":y(+g.colSpace)&&`${g.colSpace}`||"125"}))),x=o(0),N=u((()=>{x.value++}),200);s([()=>g.items,()=>g.rowCapacity,()=>g.colSpace],N,{deep:!0});const b=o(),{width:I}=h(b);return s(I,((e,t)=>{t&&N()})),C({reload:N}),(t,o)=>(i(),r("section",a({class:"step-notice",style:c(j),ref_key:"wrapperRef",ref:b},c(d)()),[(i(),r("section",{key:x.value},[(i(!0),r(p,null,n(c(S),((t,o)=>(i(),r("section",{key:o,class:"step-notice__group"},[(i(!0),r(p,null,n(t,((e,t)=>(i(),l(k,{item:e,key:t,onClick:t=>function(e){w("itemClick",e)}(e)},null,8,["item","onClick"])))),128)),t.length<e.rowCapacity?(i(!0),r(p,{key:0},n(e.rowCapacity-t.length,(e=>(i(),r("span",{key:e,class:"step-notice__placeholder"})))),128)):m("v-if",!0)])))),128))]))],16))}});export{C as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as o,ref as r,computed as s,openBlock as t,createBlock as i,unref as m,createSlots as a,renderList as u,withCtx as f,renderSlot as n}from"vue";import{NTimePicker as p}from"naive-ui";import"../../../shared/utils/index.js";import
|
|
1
|
+
import{defineComponent as e,useAttrs as o,ref as r,computed as s,openBlock as t,createBlock as i,unref as m,createSlots as a,renderList as u,withCtx as f,renderSlot as n}from"vue";import{NTimePicker as p}from"naive-ui";import"../../../shared/utils/index.js";import{useDateTime as c}from"../../../shared/hooks/useDateTime.js";import"lodash-es";import"@vue/shared";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";var l=e({__name:"TimePicker",setup(e,{expose:l}){const h=o(),d=r(null),k=s((()=>Reflect.get(h,"format")?h.format:"HH:mm:ss")),{focus:v,blur:_}=c(d,{formatRef:k,attrs:h});return l({$timePicker:d,focus:v,blur:_}),(e,o)=>(t(),i(m(p),{ref_key:"timePickerRef",ref:d},a({_:2},[u(e.$slots,((o,r)=>({name:r,fn:f((()=>[n(e.$slots,r)]))})))]),1536))}});export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{arrayed as e}from"../../utils/index.js";import"
|
|
1
|
+
import{arrayed as e}from"../../utils/index.js";import"naive-ui";import{ref as o,computed as r,unref as t}from"vue";import"@vueuse/core";import"date-fns";import"lodash-es";import"@vue/shared";import"@vueuse/shared";import{useSearchContent as i}from"./useSearchContent.js";import"@vicons/ionicons5";function n(n,{labelKey:s,valueKey:u,searchKey:a,wordSplitFilter:l}){const{searchContent:p,optionSearchFilter:v}=i(),m=o(null),c=r((()=>{const o=e((null==a?void 0:a.value)||[]);return n.searchByValue&&o.push(u.value),m.value?v(m.value,s.value,o,!!t(l)):Array.isArray(n.options)?v(n.options,s.value,o,!!t(l)):[]})),h=r((()=>m.value||n.options||[]));return{searchContent:p,remoteOptions:m,filterOptions:c,fullOptions:h}}export{n as useOptionFiltered};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ref as e,createVNode as t,createTextVNode as l}from"vue";import"../../utils/index.js";import{
|
|
1
|
+
import{ref as e,createVNode as t,createTextVNode as l}from"vue";import"../../utils/index.js";import{NTooltip as n,NIcon as r,NButton as o,NTag as a}from"naive-ui";import"@vueuse/core";import"date-fns";import{isString as i,isArray as u}from"lodash-es";import"@vue/shared";import"@vueuse/shared";import{searchContentMatcher as s}from"./useSearchContent.js";import{HelpCircleSharp as c}from"@vicons/ionicons5";function p(p,{labelKey:v,valueKey:m,showKey:d,searchContent:f,valueRef:y}){const h=e("");return{renderLabel:function(e){var l;const o=e[v.value];if(!o||!i(o))return"";const a=null!=(l=e.title)?l:o,u=f.value?s(f.value,o):null,p=u?t("section",{title:a},[u.map(((e,l)=>0!==l&&e?t("span",{style:{color:l%2==0?"var(--n-option-text-color-active)":""}},[e]):null))]):t("span",{title:a},[o]);return e.desc?t("section",{style:{display:"flex",alignItems:"center",gap:"4px"}},[p,e.desc?t(n,null,{trigger:()=>t(r,{component:c},null),default:()=>e.desc}):null]):p},renderSelectAll:function(e){return[t(o,{quaternary:!0,type:"primary",size:"tiny",onClick:()=>e(!0)},{default:()=>[l("全选")]}),t(o,{quaternary:!0,type:"primary",size:"tiny",onClick:()=>e(!1)},{default:()=>[l("清空")]})]},renderTag:function({option:e,handleClose:l}){var n;const r=null!=(n=d.value&&e[d.value])?n:e[v.value];if(!p.multiple)return h.value=r,r;h.value="";const o=u(y.value)?y.value.findIndex((t=>t===e[m.value])):-1;return p.deletable?t(a,{closable:!0,onClose:e=>{e.stopPropagation(),l()}},{default:()=>t("span",{title:r},[r])}):`${r} ${o>=0&&o===y.value.length-1?"":";"}`},titleRef:h}}export{p as useSelectRenders};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isObject as e,isPromise as t}from"@vue/shared";import{uuidGenerator as r}from"../../utils/index.js";import{unref as n}from"vue";import
|
|
1
|
+
import{isObject as e,isPromise as t}from"@vue/shared";import{uuidGenerator as r}from"../../utils/index.js";import{unref as n}from"vue";import"naive-ui";import"@vueuse/core";import"date-fns";import{AsyncQueue as s}from"../useAsyncQueue/index.js";import{cloneDeep as o,isFunction as a}from"lodash-es";import"@vueuse/shared";import"../selectHooks/useSearchContent.js";import"@vicons/ionicons5";let u=null;const i={method:"post",url:"",primaryKeyUrl:"",mergeUrl:""},c={url:{get:"/fdp-api/fdp/aiRec/search",post:"/fdp-api/fdp/aiRec/sendBehaviorData",delete:"/fdp-api/fdp/aiRec/delete"},getRecommendIds:()=>({})};function l(){return{getHttpInstance:function(){return u},registGlobHttpInstance:function(e){u=e},registGlobRecommendInfo:function(e){Object.assign(c,e)},registGlobSearchInfo:function(e){Object.assign(i,e)},getSearchRequestInfo:function(){return{...i}},getRecommendRequestInfo:function(){return o(c)}}}function f(o,u){const{getHttpInstance:i}=l();let c=null;return{create:function(l=3,f){const m=new s({name:"FormRenderAsyncQueue",uniqueData:u.value,parallelism:l,async processor({key:r,mergeUrl:s,method:u="post",cache:p,params:d,url:h,payload:R},g,y){var w,b,q,v;const S=null!=(w=n(o))?w:i();if(!S)return console.log("before use http feature, you should regist http instance by useFormRequest.registGlobHttpInstance()"),g(),void y();try{let n;if(f&&a(f.beforeRequest)&&(d=null!=(b=f.beforeRequest(r,d,R))?b:{}),s){(!c||Object.keys(c.waitingRequestParams).length>=10)&&(c=function(e,t,r,n,s){const o=new Promise(((s,a)=>{n.parallelism=1e3,setTimeout((async()=>{try{s(await e[r](t,o.waitingRequestParams))}catch(e){a(e)}}),10)})).finally((()=>{c=null,n.parallelism=s}));return o.waitingRequestParams={},o}(S,s,u,m,l)),c.waitingRequestParams[r]=d;const t=await c;n=e(t)?{...t,map:null!=(v=null==(q=t.map)?void 0:q[r])?v:{rows:[]}}:{}}else n=await S[u](h,d);f&&a(f.afterRequest)&&(n=f.afterRequest(r,n,R),t(n)&&(n=await n)),g(void 0,Array.isArray(n)?n:[]),!p&&y()}catch(e){g(new Error(`Request error => ${e}`)),y()}},getKey:({url:e,method:t="post",cache:n,params:s})=>n?e+t+JSON.stringify(s||{}):r()});return m}}}function m(t){if(!e(t))throw t;return r=t,Reflect.has(r,"map")&&Reflect.has(r,"result")?function(e){const{result:t,map:r}=e;if("SUCCESS"!==t)throw e;return r.rows}(t):function(e){return Reflect.has(e,"result")&&Reflect.has(e,"obj")}(t)?function(t){const{obj:r,result:n}=t;if("SUCCESS"!==n||!e(r))throw t;return Object.entries(r).reduce(((e,[t,r])=>(r.forEach((r=>e.push({...r,type:t}))),e)),[])}(t):function(e){return Reflect.has(e,"data")&&Reflect.has(e,"success")}(t)?function(e){const{data:t,success:r}=e;if(!r)throw e;return t}(t):[];var r}export{m as presetRequestHandler,f as useFormAsyncQueue,l as useFormRequest};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../utils/index.js";import{
|
|
1
|
+
import"../utils/index.js";import"naive-ui";import{computed as e,ref as t,watch as r,unref as n}from"vue";import"@vueuse/core";import"date-fns";import{isEqual as i,noop as o,isString as a,isNumber as l,isEmpty as u,isFunction as s,cloneDeep as c,omit as d,isArray as v}from"lodash-es";import{useFormRequest as p}from"./useFormRequest/index.js";import"@vueuse/shared";import"./selectHooks/useSearchContent.js";import"@vicons/ionicons5";function h(h,y,{asyncQueue:f,fieldKey:m,getRequestPayload:k=o}){const g=e({get:()=>h.value,set(e){i(e,h.value)||y("update:value",e)}}),w=t(!1),_=t([]),b=e((()=>{var e,t,r;return null!=(r=null==(t=null==(e=h.wordbook)?void 0:e.show_key)?void 0:t[0])?r:h.labelField})),O=e((()=>{var e,t;return null!=(t=null==(e=h.wordbook)?void 0:e.value_key)?t:h.valueField})),L=e((()=>{var e,t;return null==(t=null==(e=h.wordbook)?void 0:e.render_key)?void 0:t[0]})),j=e((()=>{var e;return(null==(e=h.wordbook)?void 0:e.level_num)||1/0})),C=function(e,t,r){return{transformListToChildren(e){if(!e.length)return[];const t=[(e=c(e))[0]];let r=e[0];for(let t=1;t<e.length;t++){const n=e[t];n&&(r.children=[n],n.parent=r,r=n)}return[e,t]},getNodeDepth(e){let t=1,r=e.parent;for(;r;)t++,r=r.parent;return t},enrichChildOption(e,t,r){return{...e,parent:t,isLeaf:this.getNodeDepth(t)+1>=r}},enrichKeywordOption:(e,n)=>(e.__keyword=!!n,e.isLeaf=!!n,n&&r.value&&e[r.value]&&(e[t.value]=e[r.value]),e),sortOptionWithIdList:(t,r)=>r.map((r=>t.find((t=>t[e.value]===r)))),generateOptionWithIdList(t,r,n){let i=t[0];return{options:r.reduce(((e,r,a)=>{const l=o(t,r);return 0===a?(i=l,[l]):(Object.assign(l,{parent:i,isLeaf:a+1>=n}),i.children=[l],i=l,e)}),[]),lastOption:i};function o(t,r){return t.find((t=>t[e.value]===r))}},parseLinkFromString2List:e=>e.split("_").filter((e=>e)),isClickNodeCheckbox:e=>e&&!e.__keyword&&e.isLeaf,createConfigObject:(t,r,n)=>r?t.conObj||[]:n?[{con:"EQ",is_compare_field:!1,field_key:t.level_key,value:n[e.value]}]:t.conObjFirstLevel||[],createOptionValue(e){const t=[];let r=e;for(;r;)t.unshift(d(r,["parent","isLeaf","__keyword","children"])),r=r.parent;return t},shouldInitOptionList:(t,r,n)=>v(t)&&!u(t)&&t.every((t=>t[e.value]))&&!r&&!n}}(O,b,L),{getSearchRequestInfo:K}=p(),I=t(150),R=t();async function x(e,t,r=!0){var i,o;if(I.value=t&&(null==(i=R.value)?void 0:i.getWidth())||150,C.shouldInitOptionList(g.value,e,t)){const[e,t]=C.transformListToChildren(g.value),r=e[Math.max(0,e.length-2)];if(g.value.length>1){_.value=t;const r=e[Math.max(0,e.length-2)];return await x(r,void 0,!1),r}if(null==(o=_.value)?void 0:o.length)return r}try{return C.isClickNodeCheckbox(e)?c(e):e?e.__keyword?async function(){var t;if(!a(e.id_link))return Promise.reject(`id_link isn't string "${e.id_link}"`);const r=C.parseLinkFromString2List(e.id_link);l(j.value)&&j.value!==1/0&&r.splice(j.value);const i=await async function(e){if(!K().primaryKeyUrl)return[];try{return await f.addAsync(t(h.wordbook,h.autograph,e,n(m)))}catch(e){a(e)&&console.error(e)}function t(e,t,r,n){const i=K();return{key:n,params:{autograph:t,tableId:e.id,primaryKeyValue:r.join(","),page:1},...i,url:i.primaryKeyUrl,cache:h.requestCache,payload:{field:{},labelKey:b.value,valueKey:O.value}}}}(r);if(!i)return Promise.reject("fetchPrimaryKeyValue failed");const{lastOption:o,options:s}=C.generateOptionWithIdList(i,r,j.value);if(s.length<j.value&&(await x(o),u(o.children)))return g.value=C.sortOptionWithIdList(i,r),w.value=!1,Promise.reject("lastOption.children is empty");return _.value=s,null==(t=R.value)||t.setCursor(o),o}():async function(){const t=await f.addAsync(d(h.wordbook,h.autograph,e,n(m)));if(!t.length)return r?c(e):Promise.reject("childrenList is empty");e.children=t.map((t=>C.enrichChildOption(t,e,j.value)))}():async function(){var r;const i=await f.addAsync(d(h.wordbook,h.autograph,e,n(m)));_.value=i.map((e=>C.enrichKeywordOption(e,t))),t&&(null==(r=R.value)||r.setCursor(_.value[0]))}()}catch(e){a(e)&&console.error(e)}function c(e){return g.value=C.createOptionValue(e),w.value=!1,Promise.reject("update value success, no need to continue")}function d(e,r,n,i){const o={autograph:()=>r,wordbookId:"id",wordbookType:"type",fieldKeys:()=>e.search_key?JSON.stringify(e.search_key):void 0,conObj:()=>JSON.stringify(C.createConfigObject(e,t,n)),primaryKey:"primary_key",levelKey:"level_key",keyword:()=>t,page:()=>1},l=Object.entries(o).reduce(((t,[r,n])=>(t[r]=a(n)?e[n]:s(n)?n():void 0,t)),{});return{...K(),params:l,key:i,cache:h.requestCache,payload:{...k(),labelKey:b.value,valueKey:O.value}}}}return r((()=>h.wordbook),((e,t)=>{i(e,t)||(_.value=[],e&&(g.value||!h.lazyRequest)&&x())}),{immediate:!0}),{valueRef:g,labelKey:b,valueKey:O,optionsRef:_,showRef:w,fetchData:x,menuWidth:I,searchCascaderRef:R}}export{h as useLevelSearchCascader};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{checkInSetupEnv as r,hex2rgba as o}from"../utils/index.js";import{
|
|
1
|
+
import{checkInSetupEnv as r,hex2rgba as o}from"../utils/index.js";import{useThemeVars as t}from"naive-ui";import{inject as i,computed as e,unref as c}from"vue";function n(n,u){r();const a=t(),m=i("themeOverridesInjectRef",{});return e((()=>{var r;const t=u?c(m)[u]:null,i=null!=(r=a.value.primaryColor)?r:"#5585f5";return{...n,"--c-primary-color":i,"--c-primary-color-opacity1":l(...o(i),.1),"--c-primary-color-opacity2":l(...o(i),.2),...t}}))}function l(r,o,t,i,e=1){return`rgb(${Math.ceil(c(r))},${Math.ceil(c(o))},${Math.ceil(c(t))})`;function c(r){return r+(255-r)*(1-e)}}export{l as createOpacityColor,n as useTheme};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.2.5-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.2.5-beta.5",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.5-beta.5",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/es/shared/utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getCurrentInstance as t,defineComponent as e,provide as n,createVNode as r}from"vue";import{isObject as o}from"@vue/shared";import{useMemoize as i}from"@vueuse/core";import{isString as u,isNumber as c,isArray as s,isFunction as f}from"lodash-es";import a from"../package.json.js";export{getBindEventSettingTrigger,getDateOperationalFormHandler,getOperationalFormHandler,isConditionsMatchSqlExpression,isMatchLowCodeCondition,isMatchLowCodeConditionsWithSqlExpression,isMatchNewLowCodeConditionsWithSqlExpression}from"./business.js";function l(t,e,n="children",r){let o=!1;function i(){o=!0}!function t(e,n,r="children",u,c=0){r=h(r),e=h(e);for(let s=0;s<e.length;s++){if(n(e[s],i,u,c),o)return;for(let i=0;i<r.length;i++){const u=e[s][r[i]];if(Array.isArray(u)&&t(u,n,r,e[s],c+1),o)return}}}(t,e,n,r,0)}function d(t,e,n=e.name,r){if(!n)throw new Error(`[CUI]: invalid component name for ${e}`);const{components:i={}}=t._context;i[n]||(!Reflect.get(t,"__cnhis_version")&&o(a)&&Reflect.set(t,"__cnhis_version",a.version),r?r():t.component(n,e))}function p(t){if(!u(t))return;const e=t.match(/[Hms:]+/);return e?e[0]:void 0}function h(t){return Array.isArray(t)?t:[t]}function m(){return`key${"xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}`}const x={a:7.7,b:8.6,c:7.7,d:8.6,e:7.7,f:5,g:8.6,h:8.2,i:3.3,j:3.3,k:7.6,l:3.5,m:12.1,n:8.2,o:8.2,p:8.6,q:8.6,r:5.4,s:7.1,t:5,u:8.2,v:7.6,w:10.9,x:7.3,y:7.6,z:7.6,A:9.43,B:9.33,C:9.93,D:10,E:8.27,F:8.1,G:10.4,H:10.4,I:3.7,J:7.5,K:9.2,L:7.9,M:12.4,N:10.4,O:10.8,P:8.9,Q:10.8,R:9.1,S:8.8,T:8.9,U:10.4,V:9.4,W:13.5,X:9.4,Y:9.1,Z:9.1,".":4.03,",":4.03,"(":5.17,")":5.17,"-":7.51,"+":7.51,"/":4.11,"\\":4.11,"%":12.68,"‰":17.75},g=/\d/,v=/[\u4e00-\u9fa5():,。]/;function y(t){return x[t]?x[t]:g.test(t)?8.9:v.test(t)?13.95:void 0}const w=i((function(t){if(!t)return 0;let e="";return[...t].reduce(((t,n)=>{const r=e;return e=n," "===n?" "===r?t:t+4:t+(y(n)||6)}),0)})),E=Object.seal(Object.create(null));function O(t,e){return function t(e,n){return o(e)?s(e)?e.map((e=>t(e,n))):Object.entries(e).reduce(((e,[r,i])=>(n.includes(r)||(o(i)&&!f(i)?e[r]=t(i,n):e[r]=i),e)),{}):e}(t,e)}function b(t){return Object.values(t).reduce(((t,e)=>Object.assign(t,e)),{})}function j(t,e){if(!t)return t;if(e(t))return t;let n=t.parentElement;for(;n&&!e(n);)n=n.parentElement;return n}function C(t,e="px"){if(
|
|
1
|
+
import{getCurrentInstance as t,defineComponent as e,provide as n,createVNode as r}from"vue";import{isObject as o}from"@vue/shared";import{useMemoize as i}from"@vueuse/core";import{isString as u,isNumber as c,isArray as s,isFunction as f}from"lodash-es";import a from"../package.json.js";export{getBindEventSettingTrigger,getDateOperationalFormHandler,getOperationalFormHandler,isConditionsMatchSqlExpression,isMatchLowCodeCondition,isMatchLowCodeConditionsWithSqlExpression,isMatchNewLowCodeConditionsWithSqlExpression}from"./business.js";function l(t,e,n="children",r){let o=!1;function i(){o=!0}!function t(e,n,r="children",u,c=0){r=h(r),e=h(e);for(let s=0;s<e.length;s++){if(n(e[s],i,u,c),o)return;for(let i=0;i<r.length;i++){const u=e[s][r[i]];if(Array.isArray(u)&&t(u,n,r,e[s],c+1),o)return}}}(t,e,n,r,0)}function d(t,e,n=e.name,r){if(!n)throw new Error(`[CUI]: invalid component name for ${e}`);const{components:i={}}=t._context;i[n]||(!Reflect.get(t,"__cnhis_version")&&o(a)&&Reflect.set(t,"__cnhis_version",a.version),r?r():t.component(n,e))}function p(t){if(!u(t))return;const e=t.match(/[Hms:]+/);return e?e[0]:void 0}function h(t){return Array.isArray(t)?t:[t]}function m(){return`key${"xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}`}const x={a:7.7,b:8.6,c:7.7,d:8.6,e:7.7,f:5,g:8.6,h:8.2,i:3.3,j:3.3,k:7.6,l:3.5,m:12.1,n:8.2,o:8.2,p:8.6,q:8.6,r:5.4,s:7.1,t:5,u:8.2,v:7.6,w:10.9,x:7.3,y:7.6,z:7.6,A:9.43,B:9.33,C:9.93,D:10,E:8.27,F:8.1,G:10.4,H:10.4,I:3.7,J:7.5,K:9.2,L:7.9,M:12.4,N:10.4,O:10.8,P:8.9,Q:10.8,R:9.1,S:8.8,T:8.9,U:10.4,V:9.4,W:13.5,X:9.4,Y:9.1,Z:9.1,".":4.03,",":4.03,"(":5.17,")":5.17,"-":7.51,"+":7.51,"/":4.11,"\\":4.11,"%":12.68,"‰":17.75},g=/\d/,v=/[\u4e00-\u9fa5():,。]/;function y(t){return x[t]?x[t]:g.test(t)?8.9:v.test(t)?13.95:void 0}const w=i((function(t){if(!t)return 0;let e="";return[...t].reduce(((t,n)=>{const r=e;return e=n," "===n?" "===r?t:t+4:t+(y(n)||6)}),0)})),E=Object.seal(Object.create(null));function O(t,e){return function t(e,n){return o(e)?s(e)?e.map((e=>t(e,n))):Object.entries(e).reduce(((e,[r,i])=>(n.includes(r)||(o(i)&&!f(i)?e[r]=t(i,n):e[r]=i),e)),{}):e}(t,e)}function b(t){return Object.values(t).reduce(((t,e)=>Object.assign(t,e)),{})}function j(t,e){if(!t)return t;if(e(t))return t;let n=t.parentElement;for(;n&&!e(n);)n=n.parentElement;return n}function C(t,e="px"){if(c(t))return`${t}${e}`;if(!t)return"";if(u(t))return t.endsWith(e)?t:`${t}${e}`;throw new Error(`invalid width value ${t}, it need to be a string or number!`)}function S(t,e){return t.some((t=>e.includes(t)))}const M=i((t=>{try{return JSON.parse(t)}catch(t){return{}}}),{getKey:t=>t});function $(t,e){if(!o(t))return t;const n={...t};for(let t=0;t<e.length;t++)Reflect.deleteProperty(n,e[t]);return n}function _(e){if(!t())throw new Error(e||"can't use this hook out of setup environment")}function I(t,e=1){const[n,r,o,i,u]=t.match(/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i)||[];if(!n)return[255,255,255,e];const s=u&&parseInt(u,16)/255;return[parseInt(r,16),parseInt(o,16),parseInt(i,16),+(c(s)?s.toFixed(2):e)]}function A(t){return e({setup(e,{slots:o}){let i=(null==t?void 0:t.parent)&&Reflect.get(t.parent,"provides");const u=[];for(;i;)Object.entries(i).forEach((([t,e])=>{u.includes(t)||(u.push(t),n(t,e))})),i=Object.getPrototypeOf(i);return()=>{var t;return r("div",null,[null==(t=o.default)?void 0:t.call(o)])}}})}const H=i((function(t,e){return!(!u(e)||!u(t))&&e.split(",").some((e=>e.trim().includes(t)))}),{getKey:(...t)=>t.reduce(((t,e)=>String(t)+"_"+String(e)),"")});function L(t){try{return t instanceof HTMLElement}catch(e){return o(t)&&1===t.nodeType&&o(t.style)&&o(t.ownerDocument)}}function R(t){let e=0;return function t(n,r=0){n.forEach((n=>{n.children?t(n.children,r+1):e=Math.max(e,r)}))}(t),e}export{E as DMZ,h as arrayed,_ as checkInSetupEnv,A as createProviderWrapper,O as deepOmit,j as findAncestor,p as generateTimeFormat,R as getArrDepth,y as getCharWidth,w as getStringWidth,I as hex2rgba,L as isHTMLElement,M as jsonParse,H as keywordMatcher,d as safeComponentRegister,b as separateMetaModule,$ as shallowOmit,S as targetStringIncludes,l as traverse,m as uuidGenerator,C as widthAppend};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.2.5-beta.
|
|
3
|
+
"version": "3.2.5-beta.5",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"iOS 7",
|
|
72
72
|
"last 3 iOS versions"
|
|
73
73
|
],
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "d4ab6c177af870a0789a1593baaf1bae32179e29"
|
|
75
75
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import r from"./pagerScroll.vue2.js";import e from"../../../../../_virtual/_plugin-vue_export-helper.js";var l=e(r,[["__file","pagerScroll.vue"]]);export{l as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{defineComponent as e,inject as l,computed as t,ref as r,onMounted as a,nextTick as n,unref as o,openBlock as u,createElementBlock as c,normalizeStyle as i,createElementVNode as s,createCommentVNode as v}from"vue";import{widthAppend as p}from"../../../../../shared/utils/index.js";import{useElementSize as d,useThrottleFn as f,useEventListener as g}from"@vueuse/core";import{InjectionIhoTableGlobProps as h}from"../../constants/index.js";import{useTableContext as m}from"../../hooks/useTableContext.js";import{isPagerScrollEnable as y,isTreeTable as w,scrollStateMap as I}from"./utils.js";var b=e({__name:"pagerScroll",setup(e){const{configRef:b,$table:x,eventListener:T}=m(),D=l(h),S=t((()=>y(b.value))),_=r(),P=t((()=>{var e,l,t,r,a,n;const o=null!=(l=null==(e=b.value.rowConfig)?void 0:e.height)?l:36;if(w(b.value)){const e=null!=(t=b.value.treeConfig.children)?t:"children";return o*(null!=(r=D.tableData.reduce(((l,t)=>{var r;return l+((null==(r=t[e])?void 0:r.length)||0)+1}),0))?r:0)}return o*(null!=(n=null==(a=D.tableData)?void 0:a.length)?n:0)})),j=r(null),U=r(null),{height:k}=d(j),{height:q}=d(U);a((()=>{S.value&&b.value.uuid&&function(){const e=document.querySelector(`#${b.value.uuid} .vxe-table--main-wrapper`);if(!e)return;j.value=e.querySelector(".vxe-table--body-wrapper"),U.value=e.querySelector(".vxe-table--header-wrapper")}()})),T.addEventListener("scroll",f((({scrollTop:e})=>{var l,t;if(E||C)return;const r=I.getItemFromUUID(b.value.uuid);if(!r.capacityInfo||!k.value)return;const a=(r.capacityInfo[r.currentPage||0].percent||0)*(e/k.value);if(r.currentPage){const e=r.capacityInfo.slice(0,r.currentPage).reduce(((e,l)=>e+l.percent),0)+a;null==(l=_.value)||l.scrollTo({top:e*P.value})}else null==(t=_.value)||t.scrollTo({top:a*P.value})}),100));let C=!1;const W=f((async function(){var e,l,t,r,a,o;C=!0,setTimeout((()=>{C=!1}),100);const u=_.value;if(!u||!b.value.uuid)return;const c=u.scrollTop/u.scrollHeight,i=I.getItemFromUUID(b.value.uuid);let s=0,v=0;const p=null==(e=i.capacityInfo)?void 0:e.findIndex((e=>{if(s+=e.percent,s>=c)return v=1-(s-c)/e.percent,!0}));if(-1===p)return;p!==i.currentPage&&(i.currentPage=p,(null==(l=i.capacityInfo)?void 0:l[p])&&(await x.value.loadData([]),await x.value.loadData(i.capacityInfo[p].pageData),null==(t=x.value)||t.setAllTreeExpand(!0),await n()));const d=(null!=(a=null==(r=j.value)?void 0:r.scrollHeight)?a:0)*v;null==(o=x.value)||o.scrollTo(null,d)}),50);let E=!1;g(window,"mousedown",(()=>{E=!0})),g(window,"mouseup",(()=>{E=!1}));const F=function(){E&&W()};return(e,l)=>o(S)?(u(),c("div",{key:0,class:"iho-table__pagerScrollWrapper",style:i({height:o(p)(o(k)),top:o(p)(o(q))}),ref_key:"scrollWrapper",ref:_,onWheel:l[0]||(l[0]=(...e)=>o(W)&&o(W)(...e)),onScroll:F},[s("div",{class:"iho-table__pagerScrollPlaceholder",style:i({height:o(p)(o(P))})},null,4)],36)):v("v-if",!0)}});export{b as default};
|