rx-compo 1.0.74 → 1.0.76

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.
@@ -1 +1 @@
1
- import{withInstall as e}from"rx-compo/es/utils/with-install";import{ref as t,reactive as o,readonly as r,provide as l,inject as a,watch as n,nextTick as c,defineComponent as u,resolveComponent as i,openBlock as s,createElementBlock as p,createCommentVNode as x,normalizeClass as m,createBlock as d,mergeProps as f,withCtx as g,createElementVNode as h,createVNode as S,Fragment as R,toDisplayString as v,normalizeStyle as y,createTextVNode as C,computed as k,normalizeProps as F,guardReactiveProps as T,resolveDynamicComponent as P,renderList as V}from"vue";import{useDebounceFn as b,onClickOutside as D,useVModel as O}from"@vueuse/core";import{RxInput as I}from"rx-compo/es/components/RxInput";import{RxTooltip as B}from"rx-compo/es/components/RxTooltip";import{RxScrollbar as _}from"rx-compo/es/components/RxScrollbar";import{isEmpty as w,map as $,includes as L}from"lodash-es";import{ElIcon as j}from"element-plus";import{Search as H,ArrowDownBold as A,ArrowUpBold as E,Calendar as U}from"@element-plus/icons-vue";import{RxFormSelect as Y}from"rx-compo/es/components/RxFormSelect";import{RxDatePicker as W}from"rx-compo/es/components/RxDatePicker";const M={columns:{type:Array,default:[]}},N={useSearchValue:{type:[Array,String,Number,Boolean,Object],default:""},component:{type:String,default:""},componentProps:{type:Object,default:void 0}},z={useSearchValue:{type:[Array,String,Number,Boolean,Object],default:""},rxInputStyleCustom:{type:String,default:"!max-w-[150px] inline-block"},rxOutSideStyleCustom:{type:String,default:"!max-w-[68px] truncate"},toolTipConfig:{type:Object,default:{placement:"top"}}};const q=Symbol();function G(e){return function(e,t=Symbol(),a={}){const{readonly:n=!0,createProvider:c=!1,native:u=!1}=a,i=o(e),s=n?r(i):i;return!c&&l(t,u?e:s),{state:i}}(e,q)}function J(){return function(e=Symbol(),t){return a(e,t||{})}(q)}var K=u({name:"RxFormPlusInput",components:{RxInput:I,RxTooltip:B,RxScrollbar:_,Search:H,ElIcon:j},props:z,setup(e,{attrs:o,emit:r}){const l=O(e,"useSearchValue",r),{clickRef:a,rxInputRef:u,rxFormItemRef:i,setClickRef:s}=(e=>{const o=t(!1),r=t(),l=t();return{clickRef:o,rxInputRef:r,rxFormItemRef:l,getClickRef:function(){return o.value},setClickRef:function(e){o.value=e}}})(),{getRxToolTipConfig:p,updateRxToolTipConfig:x}=function(e,o,r){const l=t();function a(){const{toolTipConfig:o}=e,a=r.value.getBoundingClientRect(),n={width:(null==o?void 0:o.tooltipWidth)?o.tooltipWidth:`${null==a?void 0:a.width}px`,maxHeight:(null==o?void 0:o.maxHeight)?o.maxHeight:"80px"},c=t();if(null==o?void 0:o.content){const{content:e}=o;c.value=e}else c.value=e.useSearchValue;l.value=Object.assign(Object.assign({},o),{style:n,content:c.value})}return c((()=>a())),{updateRxToolTipConfig:a,getRxToolTipConfig:()=>l.value}}(e,0,i);return((e,t,o,r,l)=>{const a=J(),u=b((()=>{a.handleSearchCallBack()}),1e3);D(o,(()=>t(!1))),n((()=>r),(()=>{c((()=>{e()}))}),{deep:!0}),n((()=>l.useSearchValue),(()=>{c((()=>{e(),u()}))}),{deep:!0})})(x,s,u,a,e),{clickRef:a,useSearchValueLocal:l,rxInputRef:u,rxFormItemRef:i,getRxToolTipConfig:p,setClickRef:s,isEmpty:w}}});const Q={ref:"rxFormItemRef"},X={class:"flex items-center"},Z={class:"cursor-pointer h-[32px] rounded-[4px] px-[8px] py-[5px] inline-block group hover:bg-[#F5F6F7]"},ee={class:"text-[14px] leading-[22px] text-[#8B9199]"};K.render=function(e,t,o,r,l,a){const n=i("Search"),c=i("el-icon"),u=i("RxInput"),k=i("RxScrollbar"),F=i("RxTooltip");return s(),p("div",Q,[x(" 输入状态 "),e.clickRef?(s(),p("div",{key:0,ref:"rxInputRef",class:m(e.rxInputStyleCustom)},[e.clickRef?(s(),d(u,f({key:0},{...e.$attrs,...e.$props},{modelValue:e.useSearchValueLocal,"onUpdate:modelValue":t[0]||(t[0]=t=>e.useSearchValueLocal=t)}),{prefix:g((()=>[h("div",X,[S(c,{color:"#5C6781"},{default:g((()=>[S(n)])),_:1})])])),_:1},16,["modelValue"])):x("v-if",!0)],2)):(s(),p(R,{key:1},[x(" 极值、有值、hover/点击、无操作 "),h("div",Z,[S(F,f({disabled:e.isEmpty(e.useSearchValueLocal)},e.getRxToolTipConfig()),{default:g((()=>[x(" 值 "),e.isEmpty(e.useSearchValueLocal)?(s(),p(R,{key:1},[x(" 标题 "),h("div",{class:"flex items-center space-x-1",onClick:t[2]||(t[2]=t=>e.setClickRef(!0))},[h("p",ee,v(e.$attrs.label),1),S(c,{color:"#5C6781"},{default:g((()=>[S(n)])),_:1})])],2112)):(s(),p("div",{key:0,class:"flex items-center space-x-1 group",onClick:t[1]||(t[1]=t=>e.setClickRef(!0))},[h("p",{class:m(["text-[14px] leading-[22px] text-[#0F1114] group-hover:text-[#3370FF]",e.rxOutSideStyleCustom])},v(e.useSearchValueLocal),3),S(c,{color:"#0F1114",class:"group-hover:text-[#3370FF]"},{default:g((()=>[S(n)])),_:1})]))])),content:g((()=>[h("div",{style:y(e.getRxToolTipConfig().style)},[S(k,{"max-height":e.getRxToolTipConfig().style.maxHeight},{default:g((()=>[C(v(e.useSearchValueLocal),1)])),_:1},8,["max-height"])],4)])),_:1},16,["disabled"])])],2112))],512)},K.__file="packages/components/RxFormPlusBeta/src/components/formInput/index.vue";var te=u({name:"RxFormPlusSelect",components:{RxTooltip:B,RxScrollbar:_,RxFormSelect:Y,ArrowDownBold:A,ArrowUpBold:E,ElIcon:j},props:{useSearchValue:{type:Array,default:[]},rxOutSideStyleCustom:{type:String,default:"!max-w-[68px] truncate"},toolTipConfig:{type:Object,default:{placement:"top"}},rxFormSelectOptions:{type:Array,default:[]}},setup(e,{attrs:o,emit:r}){const l=O(e,"useSearchValue",r),{rxSelectRef:a,rxFormItemRef:u,searchValueComputed:i,formSelectText:s,setPopoverStatus:p,getPopoverStatus:x}=((e,o)=>{const r=t(!1);return{rxSelectRef:t(),rxFormItemRef:t(),searchValueComputed:k((()=>$(e.useSearchValue,(e=>e.label)).toString())),formSelectText:k((()=>o.multiple?`已选${e.useSearchValue.length}项`:e.useSearchValue[0].value)),popoverStatus:r,setPopoverStatus:e=>r.value=e,getPopoverStatus:()=>r.value}})(e,o),{getRxToolTipConfig:m,updateRxToolTipConfig:d}=function(e,o){const r=t();function l(){const{toolTipConfig:t}=e,l=o.value.getBoundingClientRect(),a={width:(null==t?void 0:t.tooltipWidth)?t.tooltipWidth:`${null==l?void 0:l.width}px`,maxHeight:(null==t?void 0:t.maxHeight)?t.maxHeight:"80px"};r.value=Object.assign(Object.assign({},t),{style:a})}return c((()=>l())),{getRxToolTipConfig:()=>r.value,updateRxToolTipConfig:l}}(e,u);return((e,t)=>{const o=J(),r=b((()=>{o.handleSearchCallBack()}),1e3);n((()=>t.useSearchValue),(()=>{c((()=>{e(),r()}))}),{deep:!0})})(d,e),{useSearchValueLocal:l,rxSelectRef:a,rxFormItemRef:u,searchValueComputed:i,formSelectText:s,ArrowDownBold:A,ArrowUpBold:E,getRxToolTipConfig:m,isEmpty:w,setPopoverStatus:p,getPopoverStatus:x}}});const oe={ref:"rxFormItemRef"},re={class:"h-[32px] rounded-[4px] px-[8px] py-[5px] inline-block group hover:bg-[#F5F6F7]"},le={key:0,class:"flex items-center space-x-1 cursor-pointer group"},ae={class:"flex items-center space-x-1 cursor-pointer"},ne={class:"text-[14px] leading-[22px] text-[#8B9199]"};te.render=function(e,t,o,r,l,a){const n=i("ArrowUpBold"),c=i("ArrowDownBold"),u=i("el-icon"),k=i("RxFormSelect"),F=i("RxScrollbar"),T=i("RxTooltip");return s(),p(R,null,[x(" {{ $attrs }} "),h("div",oe,[h("div",re,[S(T,f({disabled:e.isEmpty(e.useSearchValueLocal)},e.getRxToolTipConfig()),{default:g((()=>[S(k,f({trigger:"click",teleported:!0},{...e.$attrs,...e.$props},{modelValue:e.useSearchValueLocal,"onUpdate:modelValue":t[0]||(t[0]=t=>e.useSearchValueLocal=t),onShow:t[1]||(t[1]=t=>e.setPopoverStatus(!0)),onHide:t[2]||(t[2]=t=>e.setPopoverStatus(!1))}),{default:g((()=>[x(" 值 "),e.isEmpty(e.useSearchValueLocal)?(s(),p(R,{key:1},[x(" 标题 "),h("div",ae,[h("p",ne,v(e.$attrs.label),1),S(u,{size:12,color:"#5C6781"},{default:g((()=>[e.getPopoverStatus()?(s(),d(n,{key:0})):(s(),d(c,{key:1}))])),_:1})])],2112)):(s(),p("div",le,[h("p",{class:m(["text-[14px] leading-[22px] text-[#0F1114] group-hover:text-[#3370FF]",e.rxOutSideStyleCustom])},v(e.formSelectText),3),S(u,{size:12,color:"#0F1114",class:"group-hover:text-[#3370FF]"},{default:g((()=>[e.getPopoverStatus()?(s(),d(n,{key:0})):(s(),d(c,{key:1}))])),_:1})]))])),_:1},16,["modelValue"])])),content:g((()=>[h("div",{style:y(e.getRxToolTipConfig().style)},[S(F,{"max-height":e.getRxToolTipConfig().style.maxHeight},{default:g((()=>[h("p",null,v(e.$attrs.label)+":",1),C(" "+v(e.searchValueComputed),1)])),_:1},8,["max-height"])],4)])),_:1},16,["disabled"])])],512)],2112)},te.__file="packages/components/RxFormPlusBeta/src/components/formSelect/index.vue";const ce={useSearchValue:{type:[Array,String,Number,Date],default:""},rxOutSideStyleCustom:{type:String,default:""},toolTipConfig:{type:Object,default:{placement:"top",disabled:!0}},rxDatePickerOptions:{type:Object,default:{type:"daterange",format:"YYYY/MM/DD",valueFormat:"YYYY-MM-DD",teleported:!1}}};function ue(e){return e.replace(/-/g,"/")}function ie(e,t){if(w(e.useSearchValue))return t.placeholder;if(L(["datetimerange","daterange","monthrange"],e.rxDatePickerOptions.type)){return`${ue(e.useSearchValue[0])}~${ue(e.useSearchValue[1])}`}return`${e.useSearchValue}`}var se=u({name:"RxFormPlusDatePicker",components:{RxDatePicker:W,RxTooltip:B,RxScrollbar:_,Calendar:U,ElIcon:j},props:ce,setup(e,{attrs:o,emit:r}){const l=O(e,"useSearchValue",r),{rxDatePickerRef:a,rxDatePickerComponentsRef:u,rxFormItemRef:i,datePickerFormat:s}=((e,o)=>{const r=t(),l=t(),a=t();return{rxDatePickerRef:r,datePickerFormat:k((()=>ie(e,o))),rxFormItemRef:l,rxDatePickerComponentsRef:a}})(e,o),{getRxToolTipConfig:p,updateRxToolTipConfig:x}=function(e,o,r){const l=t();function a(){const{toolTipConfig:a}=e,{width:n}=r.value.getBoundingClientRect(),c={width:(null==a?void 0:a.tooltipWidth)?a.tooltipWidth:`${n}px`,maxHeight:(null==a?void 0:a.maxHeight)?a.maxHeight:"80px"},u=t();if(null==a?void 0:a.content){const{content:e}=a;u.value=e}else u.value=ie(e,o);l.value=Object.assign(Object.assign({},a),{style:c,content:u.value})}return c((()=>a())),{getRxToolTipConfig:()=>l.value,updateRxToolTipConfig:a}}(e,o,i),{handleOpenRxDatePicker:m}=((e,t,o)=>{const r=J(),l=b((()=>{r.handleSearchCallBack()}),1e3);return n((()=>t.useSearchValue),(()=>{c((()=>{e(),l()}))}),{deep:!0}),{handleOpenRxDatePicker:function(){c((()=>{o.value.rxDatePickerRef.focus()}))}}})(x,e,u);return{useSearchValueLocal:l,rxDatePickerRef:a,datePickerFormat:s,rxFormItemRef:i,rxDatePickerComponentsRef:u,getRxToolTipConfig:p,handleOpenRxDatePicker:m,isEmpty:w}}});const pe={ref:"rxFormItemRef",class:"rounded-[4px] px-[8px] py-[5px] group hover:bg-[#F5F6F7]"},xe={class:"w-0 h-0 overflow-hidden",ref:"rxDatePickerRef"},me={class:"text-[14px] leading-[22px] text-[#8B9199]"};se.render=function(e,t,o,r,l,a){const n=i("RxDatePicker"),c=i("Calendar"),u=i("el-icon"),d=i("RxScrollbar"),k=i("RxTooltip");return s(),p("div",pe,[S(k,F(T(e.getRxToolTipConfig())),{default:g((()=>[h("div",{class:"flex items-center space-x-1 cursor-pointer",onClick:t[1]||(t[1]=(...t)=>e.handleOpenRxDatePicker&&e.handleOpenRxDatePicker(...t))},[x(" 隐藏控件 "),h("div",xe,[S(n,f({ref:"rxDatePickerComponentsRef",modelValue:e.useSearchValueLocal,"onUpdate:modelValue":t[0]||(t[0]=t=>e.useSearchValueLocal=t)},{...e.$attrs,...e.$props,...e.$props.rxDatePickerOptions}),null,16,["modelValue"])],512),x(" 值 "),e.isEmpty(e.useSearchValue)?(s(),p(R,{key:1},[x(" 标题 "),h("p",me,v(e.$attrs.label),1),S(u,{color:"#5C6781"},{default:g((()=>[S(c)])),_:1})],64)):(s(),p(R,{key:0},[h("p",{class:m(["text-[14px] leading-[22px] text-[#0F1114] group-hover:text-[#3370FF]",e.rxOutSideStyleCustom])},v(e.datePickerFormat),3),S(u,{class:"text-[14px] leading-[22px] text-[#0F1114] group-hover:text-[#3370FF]",color:"#0F1114"},{default:g((()=>[S(c)])),_:1})],64))])])),content:g((()=>[h("div",{style:y(e.getRxToolTipConfig().style)},[S(d,{"max-height":e.getRxToolTipConfig().style.maxHeight},{default:g((()=>[C(v(e.datePickerFormat),1)])),_:1},8,["max-height"])],4)])),_:1},16)],512)},se.__file="packages/components/RxFormPlusBeta/src/components/formDatePicker/index.vue";const de=new Map;function fe(e,t){de.set(e,t)}fe("RxFormPlusInput",K),fe("RxFormPlusSelect",te),fe("RxFormPlusDatePicker",se);var ge={add:fe,del:function(e){de.delete(e)},get:function(e){return e&&de.get(e)||e}},he=u({name:"FormComponent",props:N,setup(e,{emit:t}){const o=ge.get(e.component),r=O(e,"useSearchValue",t);return{componentLocal:o,componentPropsLocal:k((()=>e.componentProps)),useSearchValueLocal:r}}});he.render=function(e,t,o,r,l,a){return s(),d(P(e.componentLocal),F(T({...e.$attrs,...e.$props,...e.componentPropsLocal})),null,16)},he.__file="packages/components/RxFormPlusBeta/src/components/formComponent/index.vue";var Se=u({name:"RxFormPlusBeta",components:{FormComponent:he},props:M,emits:["handleSearch"],setup(e,{emit:t,expose:o}){const r=()=>t("handleSearch",e);return G({handleSearchCallBack:r}),o({handleSearchCallBack:r}),{}}});const Re={class:"flex items-center space-x-2"};Se.render=function(e,t,o,r,l,a){const n=i("form-component");return s(),p("div",Re,[(s(!0),p(R,null,V(e.columns,((e,t)=>(s(),p("div",{key:t},[S(n,f(e,{useSearchValue:e.useSearchValue,"onUpdate:useSearchValue":t=>e.useSearchValue=t}),null,16,["useSearchValue","onUpdate:useSearchValue"])])))),128))])},Se.__file="packages/components/RxFormPlusBeta/src/RxFormPlusBeta.vue";const ve=e(Se);export{ve as RxFormPlusBeta,ve as default};
1
+ import{withInstall as e}from"rx-compo/es/utils/with-install";import{ref as t,reactive as o,readonly as l,provide as r,inject as a,watch as n,nextTick as c,defineComponent as u,resolveComponent as i,openBlock as s,createElementBlock as p,createCommentVNode as x,normalizeClass as m,createBlock as d,mergeProps as f,withCtx as g,createElementVNode as h,createVNode as R,Fragment as S,toDisplayString as v,normalizeStyle as y,createTextVNode as C,computed as k,normalizeProps as F,guardReactiveProps as T,resolveDynamicComponent as P,renderList as V}from"vue";import{useDebounceFn as b,onClickOutside as D,useVModel as O}from"@vueuse/core";import{RxInput as I}from"rx-compo/es/components/RxInput";import{RxTooltip as B}from"rx-compo/es/components/RxTooltip";import{RxScrollbar as _}from"rx-compo/es/components/RxScrollbar";import{isEmpty as w,map as L,includes as $}from"lodash-es";import{ElIcon as j}from"element-plus";import{Search as H,ArrowDownBold as A,ArrowUpBold as E,Calendar as U}from"@element-plus/icons-vue";import{RxFormSelect as Y}from"rx-compo/es/components/RxFormSelect";import{RxDatePicker as W}from"rx-compo/es/components/RxDatePicker";const M={columns:{type:Array,default:[]},customClass:{type:String,default:"space-x-8"}},N={useSearchValue:{type:[Array,String,Number,Boolean,Object],default:""},component:{type:String,default:""},componentProps:{type:Object,default:void 0}},z={useSearchValue:{type:[Array,String,Number,Boolean,Object],default:""},rxInputStyleCustom:{type:String,default:"!max-w-[150px] inline-block"},rxOutSideStyleCustom:{type:String,default:"!max-w-[68px] truncate"},toolTipConfig:{type:Object,default:{placement:"top"}}};const q=Symbol();function G(e){return function(e,t=Symbol(),a={}){const{readonly:n=!0,createProvider:c=!1,native:u=!1}=a,i=o(e),s=n?l(i):i;return!c&&r(t,u?e:s),{state:i}}(e,q)}function J(){return function(e=Symbol(),t){return a(e,t||{})}(q)}var K=u({name:"RxFormPlusInput",components:{RxInput:I,RxTooltip:B,RxScrollbar:_,Search:H,ElIcon:j},props:z,setup(e,{attrs:o,emit:l}){const r=O(e,"useSearchValue",l),{clickRef:a,rxInputRef:u,rxFormItemRef:i,setClickRef:s}=(e=>{const o=t(!1),l=t(),r=t();return{clickRef:o,rxInputRef:l,rxFormItemRef:r,getClickRef:function(){return o.value},setClickRef:function(e){o.value=e}}})(),{getRxToolTipConfig:p,updateRxToolTipConfig:x}=function(e,o,l){const r=t();function a(){const{toolTipConfig:o}=e,a=l.value.getBoundingClientRect(),n={width:(null==o?void 0:o.tooltipWidth)?o.tooltipWidth:`${null==a?void 0:a.width}px`,maxHeight:(null==o?void 0:o.maxHeight)?o.maxHeight:"80px"},c=t();if(null==o?void 0:o.content){const{content:e}=o;c.value=e}else c.value=e.useSearchValue;r.value=Object.assign(Object.assign({},o),{style:n,content:c.value})}return c((()=>a())),{updateRxToolTipConfig:a,getRxToolTipConfig:()=>r.value}}(e,0,i);return((e,t,o,l,r)=>{const a=J(),u=b((function(){a.handleSearchCallBack()}),1e3);D(o,(()=>t(!1))),n((()=>l),(()=>{c((()=>{e()}))}),{deep:!0}),n((()=>r.useSearchValue),(()=>{c((()=>{e()})),u()}),{deep:!0})})(x,s,u,a,e),{clickRef:a,useSearchValueLocal:r,rxInputRef:u,rxFormItemRef:i,getRxToolTipConfig:p,setClickRef:s,isEmpty:w}}});const Q={ref:"rxFormItemRef"},X={class:"flex items-center"},Z={class:"cursor-pointer h-[32px] flex items-center rounded-[4px] px-[8px] py-[5px] inline-block group hover:bg-[#F5F6F7]"},ee={class:"text-[14px] leading-[22px] text-[#8B9199]"};K.render=function(e,t,o,l,r,a){const n=i("Search"),c=i("el-icon"),u=i("RxInput"),k=i("RxScrollbar"),F=i("RxTooltip");return s(),p("div",Q,[x(" 输入状态 "),e.clickRef?(s(),p("div",{key:0,ref:"rxInputRef",class:m(e.rxInputStyleCustom)},[e.clickRef?(s(),d(u,f({key:0},{...e.$attrs,...e.$props},{modelValue:e.useSearchValueLocal,"onUpdate:modelValue":t[0]||(t[0]=t=>e.useSearchValueLocal=t)}),{prefix:g((()=>[h("div",X,[R(c,{color:"#5C6781"},{default:g((()=>[R(n)])),_:1})])])),_:1},16,["modelValue"])):x("v-if",!0)],2)):(s(),p(S,{key:1},[x(" 极值、有值、hover/点击、无操作 "),h("div",Z,[R(F,f({disabled:e.isEmpty(e.useSearchValueLocal)},e.getRxToolTipConfig()),{default:g((()=>[x(" 值 "),e.isEmpty(e.useSearchValueLocal)?(s(),p(S,{key:1},[x(" 标题 "),h("div",{class:"flex items-center space-x-1",onClick:t[2]||(t[2]=t=>e.setClickRef(!0))},[h("p",ee,v(e.$attrs.label),1),R(c,{color:"#5C6781"},{default:g((()=>[R(n)])),_:1})])],2112)):(s(),p("div",{key:0,class:"flex items-center space-x-1 group",onClick:t[1]||(t[1]=t=>e.setClickRef(!0))},[h("p",{class:m(["text-[14px] leading-[22px] text-[#0F1114] group-hover:text-[#3370FF]",e.rxOutSideStyleCustom])},v(e.useSearchValueLocal),3),R(c,{color:"#0F1114",class:"group-hover:text-[#3370FF]"},{default:g((()=>[R(n)])),_:1})]))])),content:g((()=>[h("div",{style:y(e.getRxToolTipConfig().style)},[R(k,{"max-height":e.getRxToolTipConfig().style.maxHeight},{default:g((()=>[C(v(e.useSearchValueLocal),1)])),_:1},8,["max-height"])],4)])),_:1},16,["disabled"])])],2112))],512)},K.__file="packages/components/RxFormPlusBeta/src/components/formInput/index.vue";var te=u({name:"RxFormPlusSelect",components:{RxTooltip:B,RxScrollbar:_,RxFormSelect:Y,ArrowDownBold:A,ArrowUpBold:E,ElIcon:j},props:{useSearchValue:{type:Array,default:[]},rxOutSideStyleCustom:{type:String,default:"!max-w-[68px] truncate"},toolTipConfig:{type:Object,default:{placement:"top"}},rxFormSelectOptions:{type:Array,default:[]}},setup(e,{attrs:o,emit:l}){const r=O(e,"useSearchValue",l),{rxSelectRef:a,rxFormItemRef:u,searchValueComputed:i,formSelectText:s,setPopoverStatus:p,getPopoverStatus:x}=((e,o)=>{const l=t(!1);return{rxSelectRef:t(),rxFormItemRef:t(),searchValueComputed:k((()=>L(e.useSearchValue,(e=>e.label)).toString())),formSelectText:k((()=>o.multiple?`已选${e.useSearchValue.length}项`:e.useSearchValue[0].value)),popoverStatus:l,setPopoverStatus:e=>l.value=e,getPopoverStatus:()=>l.value}})(e,o),{getRxToolTipConfig:m,updateRxToolTipConfig:d}=function(e,o){const l=t();function r(){const{toolTipConfig:t}=e,r=o.value.getBoundingClientRect(),a={width:(null==t?void 0:t.tooltipWidth)?t.tooltipWidth:`${null==r?void 0:r.width}px`,maxHeight:(null==t?void 0:t.maxHeight)?t.maxHeight:"80px"};l.value=Object.assign(Object.assign({},t),{style:a})}return c((()=>r())),{getRxToolTipConfig:()=>l.value,updateRxToolTipConfig:r}}(e,u);return((e,t)=>{const o=J(),l=b((function(){o.handleSearchCallBack()}),1e3);n((()=>t.useSearchValue),(()=>{c((()=>{e()})),l()}),{deep:!0})})(d,e),{useSearchValueLocal:r,rxSelectRef:a,rxFormItemRef:u,searchValueComputed:i,formSelectText:s,ArrowDownBold:A,ArrowUpBold:E,getRxToolTipConfig:m,isEmpty:w,setPopoverStatus:p,getPopoverStatus:x}}});const oe={ref:"rxFormItemRef"},le={class:"h-[32px] flex items-center rounded-[4px] px-[8px] py-[5px] inline-block group hover:bg-[#F5F6F7]"},re={key:0,class:"flex items-center space-x-1 cursor-pointer group"},ae={class:"flex items-center space-x-1 cursor-pointer"},ne={class:"text-[14px] leading-[22px] text-[#8B9199]"};te.render=function(e,t,o,l,r,a){const n=i("ArrowUpBold"),c=i("ArrowDownBold"),u=i("el-icon"),k=i("RxFormSelect"),F=i("RxScrollbar"),T=i("RxTooltip");return s(),p(S,null,[x(" {{ $attrs }} "),h("div",oe,[h("div",le,[R(T,f({disabled:e.isEmpty(e.useSearchValueLocal)},e.getRxToolTipConfig()),{default:g((()=>[R(k,f({trigger:"click",teleported:!0},{...e.$attrs,...e.$props},{modelValue:e.useSearchValueLocal,"onUpdate:modelValue":t[0]||(t[0]=t=>e.useSearchValueLocal=t),onShow:t[1]||(t[1]=t=>e.setPopoverStatus(!0)),onHide:t[2]||(t[2]=t=>e.setPopoverStatus(!1))}),{default:g((()=>[x(" 值 "),e.isEmpty(e.useSearchValueLocal)?(s(),p(S,{key:1},[x(" 标题 "),h("div",ae,[h("p",ne,v(e.$attrs.label),1),R(u,{size:12,color:"#5C6781"},{default:g((()=>[e.getPopoverStatus()?(s(),d(n,{key:0})):(s(),d(c,{key:1}))])),_:1})])],2112)):(s(),p("div",re,[h("p",{class:m(["text-[14px] leading-[22px] text-[#0F1114] group-hover:text-[#3370FF]",e.rxOutSideStyleCustom])},v(e.formSelectText),3),R(u,{size:12,color:"#0F1114",class:"group-hover:text-[#3370FF]"},{default:g((()=>[e.getPopoverStatus()?(s(),d(n,{key:0})):(s(),d(c,{key:1}))])),_:1})]))])),_:1},16,["modelValue"])])),content:g((()=>[h("div",{style:y(e.getRxToolTipConfig().style)},[R(F,{"max-height":e.getRxToolTipConfig().style.maxHeight},{default:g((()=>[h("p",null,v(e.$attrs.label)+":",1),C(" "+v(e.searchValueComputed),1)])),_:1},8,["max-height"])],4)])),_:1},16,["disabled"])])],512)],2112)},te.__file="packages/components/RxFormPlusBeta/src/components/formSelect/index.vue";const ce={useSearchValue:{type:[Array,String,Number,Date],default:""},rxOutSideStyleCustom:{type:String,default:""},toolTipConfig:{type:Object,default:{placement:"top",disabled:!0}},rxDatePickerOptions:{type:Object,default:{type:"daterange",format:"YYYY/MM/DD",valueFormat:"YYYY-MM-DD",teleported:!1}}};function ue(e){return e.replace(/-/g,"/")}function ie(e,t){if(w(e.useSearchValue))return t.placeholder;if($(["datetimerange","daterange","monthrange"],e.rxDatePickerOptions.type)){return`${ue(e.useSearchValue[0])}~${ue(e.useSearchValue[1])}`}return`${e.useSearchValue}`}var se=u({name:"RxFormPlusDatePicker",components:{RxDatePicker:W,RxTooltip:B,RxScrollbar:_,Calendar:U,ElIcon:j},props:ce,setup(e,{attrs:o,emit:l}){const r=O(e,"useSearchValue",l),{rxDatePickerRef:a,rxDatePickerComponentsRef:u,rxFormItemRef:i,datePickerFormat:s}=((e,o)=>{const l=t(),r=t(),a=t();return{rxDatePickerRef:l,datePickerFormat:k((()=>ie(e,o))),rxFormItemRef:r,rxDatePickerComponentsRef:a}})(e,o),{getRxToolTipConfig:p,updateRxToolTipConfig:x}=function(e,o,l){const r=t();function a(){const{toolTipConfig:a}=e,{width:n}=l.value.getBoundingClientRect(),c={width:(null==a?void 0:a.tooltipWidth)?a.tooltipWidth:`${n}px`,maxHeight:(null==a?void 0:a.maxHeight)?a.maxHeight:"80px"},u=t();if(null==a?void 0:a.content){const{content:e}=a;u.value=e}else u.value=ie(e,o);r.value=Object.assign(Object.assign({},a),{style:c,content:u.value})}return c((()=>a())),{getRxToolTipConfig:()=>r.value,updateRxToolTipConfig:a}}(e,o,i),{handleOpenRxDatePicker:m}=((e,t,o)=>{const l=J(),r=b((function(){l.handleSearchCallBack()}),1e3);return n((()=>t.useSearchValue),(()=>{c((()=>{e()})),r()}),{deep:!0}),{handleOpenRxDatePicker:function(){c((()=>{o.value.rxDatePickerRef.focus()}))}}})(x,e,u);return{useSearchValueLocal:r,rxDatePickerRef:a,datePickerFormat:s,rxFormItemRef:i,rxDatePickerComponentsRef:u,getRxToolTipConfig:p,handleOpenRxDatePicker:m,isEmpty:w}}});const pe={ref:"rxFormItemRef",class:"rounded-[4px] px-[8px] py-[5px] group hover:bg-[#F5F6F7] h-[32px] flex items-center"},xe={class:"w-0 h-0 overflow-hidden",ref:"rxDatePickerRef"},me={class:"text-[14px] leading-[22px] text-[#8B9199]"};se.render=function(e,t,o,l,r,a){const n=i("RxDatePicker"),c=i("Calendar"),u=i("el-icon"),d=i("RxScrollbar"),k=i("RxTooltip");return s(),p("div",pe,[R(k,F(T(e.getRxToolTipConfig())),{default:g((()=>[h("div",{class:"flex items-center space-x-1 cursor-pointer",onClick:t[1]||(t[1]=(...t)=>e.handleOpenRxDatePicker&&e.handleOpenRxDatePicker(...t))},[x(" 隐藏控件 "),h("div",xe,[R(n,f({ref:"rxDatePickerComponentsRef",modelValue:e.useSearchValueLocal,"onUpdate:modelValue":t[0]||(t[0]=t=>e.useSearchValueLocal=t)},{...e.$attrs,...e.$props,...e.$props.rxDatePickerOptions}),null,16,["modelValue"])],512),x(" 值 "),e.isEmpty(e.useSearchValue)?(s(),p(S,{key:1},[x(" 标题 "),h("p",me,v(e.$attrs.label),1),R(u,{color:"#5C6781"},{default:g((()=>[R(c)])),_:1})],64)):(s(),p(S,{key:0},[h("p",{class:m(["text-[14px] leading-[22px] text-[#0F1114] group-hover:text-[#3370FF]",e.rxOutSideStyleCustom])},v(e.datePickerFormat),3),R(u,{class:"text-[14px] leading-[22px] text-[#0F1114] group-hover:text-[#3370FF]",color:"#0F1114"},{default:g((()=>[R(c)])),_:1})],64))])])),content:g((()=>[h("div",{style:y(e.getRxToolTipConfig().style)},[R(d,{"max-height":e.getRxToolTipConfig().style.maxHeight},{default:g((()=>[C(v(e.datePickerFormat),1)])),_:1},8,["max-height"])],4)])),_:1},16)],512)},se.__file="packages/components/RxFormPlusBeta/src/components/formDatePicker/index.vue";const de=new Map;function fe(e,t){de.set(e,t)}fe("RxFormPlusInput",K),fe("RxFormPlusSelect",te),fe("RxFormPlusDatePicker",se);var ge={add:fe,del:function(e){de.delete(e)},get:function(e){return e&&de.get(e)||e}},he=u({name:"FormComponent",props:N,setup(e,{emit:t}){const o=ge.get(e.component),l=O(e,"useSearchValue",t);return{componentLocal:o,componentPropsLocal:k((()=>e.componentProps)),useSearchValueLocal:l}}});he.render=function(e,t,o,l,r,a){return s(),d(P(e.componentLocal),F(T({...e.$attrs,...e.$props,...e.componentPropsLocal})),null,16)},he.__file="packages/components/RxFormPlusBeta/src/components/formComponent/index.vue";var Re=u({name:"RxFormPlusBeta",components:{FormComponent:he},props:M,emits:["handleSearch"],setup(e,{emit:t,expose:o}){const l=()=>t("handleSearch",e);return G({handleSearchCallBack:l}),o({handleSearchCallBack:l}),{}}});Re.render=function(e,t,o,l,r,a){const n=i("form-component");return s(),p("div",{class:m(["flex items-center",e.customClass])},[(s(!0),p(S,null,V(e.columns,(e=>(s(),p(S,null,[e.component?(s(),p("div",{key:e,class:m(e.componentLayoutClass)},[(s(),d(n,f({key:e},e,{modelValue:e.useSearchValue,"onUpdate:modelValue":t=>e.useSearchValue=t}),null,16,["modelValue","onUpdate:modelValue"]))],2)):x("v-if",!0)],64)))),256))],2)},Re.__file="packages/components/RxFormPlusBeta/src/RxFormPlusBeta.vue";const Se=e(Re);export{Se as RxFormPlusBeta,Se as default};
@@ -1,9 +1,13 @@
1
1
  import type { ExtractPropTypes, DefineComponent } from 'vue';
2
2
  export declare const RxFormPlusBetaProps: {
3
3
  columns: {
4
- type: ArrayConstructor;
4
+ type: any;
5
5
  default: any[];
6
6
  };
7
+ customClass: {
8
+ type: StringConstructor;
9
+ default: string;
10
+ };
7
11
  };
8
12
  export declare type RxFormPlusBetaPropsType = ExtractPropTypes<typeof RxFormPlusBetaProps>;
9
13
  export declare type RxFormPlusBetaComponent = DefineComponent<typeof RxFormPlusBetaProps>;
@@ -1,16 +1,25 @@
1
1
  declare const _default: import("vue").DefineComponent<{
2
2
  columns: {
3
- type: ArrayConstructor;
3
+ type: any;
4
4
  default: any[];
5
5
  };
6
+ customClass: {
7
+ type: StringConstructor;
8
+ default: string;
9
+ };
6
10
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "handleSearch"[], "handleSearch", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
7
11
  columns: {
8
- type: ArrayConstructor;
12
+ type: any;
9
13
  default: any[];
10
14
  };
15
+ customClass: {
16
+ type: StringConstructor;
17
+ default: string;
18
+ };
11
19
  }>> & {
12
20
  onHandleSearch?: (...args: any[]) => any;
13
21
  }, {
14
- columns: unknown[];
22
+ customClass: string;
23
+ columns: any;
15
24
  }>;
16
25
  export default _default;