rx-compo 1.0.84 → 1.0.85

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 l,provide as r,inject as n,nextTick as a,watch as c,defineComponent as u,createElementVNode as i,resolveComponent as s,openBlock as p,createElementBlock as x,createCommentVNode as m,normalizeClass as d,createVNode as f,mergeProps as h,withCtx as g,Fragment as S,toDisplayString as v,normalizeStyle as R,createTextVNode as C,computed as V,createBlock as F,normalizeProps as k,guardReactiveProps as y,resolveDynamicComponent as T,renderList as P}from"vue";import{useDebounceFn as w,onClickOutside as b,useVModel as H}from"@vueuse/core";import{RxInput as B}from"rx-compo/es/components/RxInput";import{RxTooltip as O}from"rx-compo/es/components/RxTooltip";import{RxScrollbar as D}from"rx-compo/es/components/RxScrollbar";import{isEmpty as I,map as L,includes as $}from"lodash-es";import{ElIcon as _}from"element-plus";import{Search as M,ArrowDownBold as j}from"@element-plus/icons-vue";import{RxFormSelect as E}from"rx-compo/es/components/RxFormSelect";import{RxDatePicker as A}from"rx-compo/es/components/RxDatePicker";const Y={columns:{type:Array,default:[]},customClass:{type:String,default:"space-x-8"}},W={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-[84px] truncate"},toolTipConfig:{type:Object,default:{placement:"top"}},singleMode:{type:Boolean,default:!1}};const U=Symbol();function N(e){return function(e,t=Symbol(),n={}){const{readonly:a=!0,createProvider:c=!1,native:u=!1}=n,i=o(e),s=a?l(i):i;return!c&&r(t,u?e:s),{state:i}}(e,U)}function z(){return function(e=Symbol(),t){return n(e,t||{})}(U)}var q=u({name:"RxFormPlusInput",components:{RxInput:B,RxTooltip:O,RxScrollbar:D,Search:M,ElIcon:_},props:Z,setup(e,{attrs:o,emit:l}){const r=H(e,"useSearchValue",l),{clickRef:n,rxInputRef:u,rxInputOutSideRef:i,rxFormItemRef:s,setClickRef:p}=(e=>{const o=t(e.singleMode),l=t(),r=t(),n=t();return{clickRef:o,rxInputRef:l,rxInputOutSideRef:r,rxFormItemRef:n,getClickRef:function(){return o.value},setClickRef:function(e){o.value=e}}})(e),{getRxToolTipConfig:x,updateRxToolTipConfig:m}=function(e,o,l){const r=t();function n(){const{toolTipConfig:o}=e,n=l.value.getBoundingClientRect(),a={width:(null==o?void 0:o.tooltipWidth)?o.tooltipWidth:`${null==n?void 0:n.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:a,content:c.value})}return a((()=>n())),{updateRxToolTipConfig:n,getRxToolTipConfig:()=>r.value}}(e,0,s),{handleBlur:d,handleFocus:f}=((e,t,o,l,r,n)=>{const u=z(),i=w((function(){u.handleSearchCallBack()}),1e3);return b(l,(()=>{n.singleMode?t(!0):t(!1)})),c((()=>r),(()=>{a((()=>{e()}))}),{deep:!0}),{handleBlur:function(){i()},handleFocus:function(){t(!0),a((()=>{var e,t;return null===(t=null===(e=o.value)||void 0===e?void 0:e.elInputRef)||void 0===t?void 0:t.focus()}))}}})(m,p,u,i,n,e);return{clickRef:n,useSearchValueLocal:r,rxInputRef:u,rxInputOutSideRef:i,rxFormItemRef:s,getRxToolTipConfig:x,setClickRef:p,isEmpty:I,handleBlur:d,handleFocus:f}}});const G={ref:"rxFormItemRef"},J={class:"flex items-center"},K={key:0,class:"flex items-center space-x-1"},Q=i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"text-[##5C6781] group-hover:text-[#3370FF]"},[i("circle",{cx:"8",cy:"8",r:"4.1",stroke:"currentColor","stroke-width":"1.8"}),i("path",{d:"M11 11L12.5 12.5",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round"})],-1),X={class:"flex items-center space-x-1"},ee={class:"text-[14px] leading-[22px] text-[#8B9199]"},te=i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"text-[##5C6781] group-hover:text-[#3370FF]"},[i("circle",{cx:"8",cy:"8",r:"4.1",stroke:"currentColor","stroke-width":"1.8"}),i("path",{d:"M11 11L12.5 12.5",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round"})],-1);q.render=function(e,t,o,l,r,n){const a=s("Search"),c=s("el-icon"),u=s("RxInput"),V=s("RxScrollbar"),F=s("RxTooltip");return p(),x("div",G,[m(" 输入状态 "),e.clickRef?(p(),x("div",{key:0,ref:"rxInputOutSideRef",class:d(e.rxInputStyleCustom)},[f(u,h({ref:"rxInputRef"},{...e.$attrs,...e.$props},{modelValue:e.useSearchValueLocal,"onUpdate:modelValue":t[0]||(t[0]=t=>e.useSearchValueLocal=t),onBlur:e.handleBlur}),{prefix:g((()=>[i("div",J,[f(c,{color:"#5C6781"},{default:g((()=>[f(a)])),_:1})])])),_:1},16,["modelValue","onBlur"])],2)):(p(),x(S,{key:1},[m(" 极值、有值、hover/点击、无操作 "),f(F,h({disabled:e.isEmpty(e.useSearchValueLocal)},e.getRxToolTipConfig()),{default:g((()=>[i("div",{onClick:t[1]||(t[1]=(...t)=>e.handleFocus&&e.handleFocus(...t)),class:"cursor-pointer h-[32px] flex items-center rounded-[4px] px-[8px] py-[5px] inline-block group hover:bg-[#F5F6F7]"},[m(" 值 "),e.isEmpty(e.useSearchValueLocal)?(p(),x(S,{key:1},[m(" 标题 "),i("div",X,[i("p",ee,v(e.$attrs.label),1),te])],2112)):(p(),x("div",K,[i("p",{class:d(["text-[14px] leading-[22px] text-[#0F1114] group-hover:text-[#3370FF]",e.rxOutSideStyleCustom])},v(e.useSearchValueLocal),3),Q]))])])),content:g((()=>[i("div",{style:R(e.getRxToolTipConfig().style)},[f(V,{"max-height":e.getRxToolTipConfig().style.maxHeight},{default:g((()=>[i("p",null,v(e.$attrs.label)+":",1),C(" "+v(e.useSearchValueLocal),1)])),_:1},8,["max-height"])],4)])),_:1},16,["disabled"])],2112))],512)},q.__file="packages/components/RxFormPlusBeta/src/components/formInput/index.vue";const oe={useSearchValue:{type:Array,default:[]},visibleValue:{type:Boolean,default:null},rxOutSideStyleCustom:{type:String,default:"!max-w-[84px] truncate"},toolTipConfig:{type:Object,default:{placement:"top"}},rxFormSelectOptions:{type:Array,default:[]},multiple:{type:Boolean,default:!1}};var le=u({name:"RxFormPlusSelect",components:{RxTooltip:O,RxScrollbar:D,RxFormSelect:E,ArrowDownBold:j,ElIcon:_},props:oe,setup(e,{attrs:o,emit:l}){const r=H(e,"useSearchValue",l),{refFormSelectRef:n,rxSelectRef:u,rxFormItemRef:i,searchValueComputed:s,formSelectText:p,setPopoverStatus:x,getPopoverStatus:m,getRefFormSelect:d}=((e,o)=>{const l=t(),r=t(!1),n=t(),a=t(),c=V((()=>L(e.useSearchValue,(e=>e.label)).toString())),u=V((()=>o.multiple?`已选${e.useSearchValue.length}项`:e.useSearchValue[0].value));return{refFormSelectRef:l,rxSelectRef:n,rxFormItemRef:a,searchValueComputed:c,formSelectText:u,popoverStatus:r,setPopoverStatus:e=>r.value=e,getPopoverStatus:()=>r.value,getRefFormSelect:()=>l.value}})(e,o),{getRxToolTipConfig:f,updateRxToolTipConfig:h}=function(e,o){const l=t();function r(){const{toolTipConfig:t}=e,r=o.value.getBoundingClientRect(),n={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:n})}return a((()=>r())),{getRxToolTipConfig:()=>l.value,updateRxToolTipConfig:r}}(e,i),{handleSetCallBack:g,handleSetPopover:S}=((e,t,o)=>{const l=z(),r=w((function(){l.handleSearchCallBack()}),1e3);return a((()=>{var e;b(null===(e=t())||void 0===e?void 0:e.defaultSlotPopoverRef,(()=>{t().setVisiblePopover(!1)}))})),c((()=>o.useSearchValue),(()=>{a((()=>{e()})),r()}),{deep:!0}),{handleSetCallBack:function(e){o.multiple||t().setVisiblePopover(!1)},handleSetPopover:function(){t().setVisiblePopover(!0)}}})(h,d,e);return{refFormSelectRef:n,useSearchValueLocal:r,rxSelectRef:u,rxFormItemRef:i,searchValueComputed:s,formSelectText:p,ArrowDownBold:j,getRxToolTipConfig:f,isEmpty:I,setPopoverStatus:x,getPopoverStatus:m,handleSetCallBack:g,handleSetPopover:S}}});const re={ref:"rxFormItemRef"},ne={class:"text-[14px] leading-[22px] text-[#8B9199]"};le.render=function(e,t,o,l,r,n){const a=s("ArrowDownBold"),c=s("el-icon"),u=s("RxFormSelect"),V=s("RxScrollbar"),F=s("RxTooltip");return p(),x("div",re,[f(F,h({disabled:e.isEmpty(e.useSearchValueLocal)},e.getRxToolTipConfig()),{default:g((()=>[f(u,h({ref:"refFormSelectRef"},{...e.$attrs,...e.$props},{modelValue:e.useSearchValueLocal,"onUpdate:modelValue":t[1]||(t[1]=t=>e.useSearchValueLocal=t),onShow:t[2]||(t[2]=t=>e.setPopoverStatus(!0)),onHide:t[3]||(t[3]=t=>e.setPopoverStatus(!1)),onRxFormSelectClick:e.handleSetCallBack}),{default:g((()=>[i("div",{onClick:t[0]||(t[0]=(...t)=>e.handleSetPopover&&e.handleSetPopover(...t)),class:"h-[32px] flex items-center rounded-[4px] px-[8px] py-[5px] inline-block group hover:bg-[#F5F6F7] cursor-pointer space-x-1"},[m(" 值 "),e.isEmpty(e.useSearchValueLocal)?(p(),x(S,{key:1},[m(" 标题 "),i("p",ne,v(e.$attrs.label),1)],2112)):(p(),x("p",{key:0,class:d(["text-[14px] text-[#0F1114] group-hover:text-[#3370FF]",e.rxOutSideStyleCustom])},v(e.formSelectText),3)),f(c,{size:12,color:"#5C6781",class:"text-[#0F1114] group-hover:text-[#3370FF]"},{default:g((()=>[f(a,{class:d(["transition",{"-rotate-180":e.getPopoverStatus()}])},null,8,["class"])])),_:1})])])),_:1},16,["modelValue","onRxFormSelectClick"])])),content:g((()=>[i("div",{style:R(e.getRxToolTipConfig().style)},[f(V,{"max-height":e.getRxToolTipConfig().style.maxHeight},{default:g((()=>[i("p",null,v(e.$attrs.label)+":",1),C(" "+v(e.searchValueComputed),1)])),_:1},8,["max-height"])],4)])),_:1},16,["disabled"])],512)},le.__file="packages/components/RxFormPlusBeta/src/components/formSelect/index.vue";const ae={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 ce(e){return e.replace(/-/g,"/")}function ue(e,t){if(I(e.useSearchValue))return t.placeholder;if($(["datetimerange","daterange","monthrange"],e.rxDatePickerOptions.type)){return`${ce(e.useSearchValue[0])}~${ce(e.useSearchValue[1])}`}return`${e.useSearchValue}`}var ie=u({name:"RxFormPlusDatePicker",components:{RxDatePicker:A,RxTooltip:O,RxScrollbar:D},props:ae,setup(e,{attrs:o,emit:l}){const r=H(e,"useSearchValue",l),{rxDatePickerRef:n,rxDatePickerComponentsRef:u,rxFormItemRef:i,datePickerFormat:s}=((e,o)=>{const l=t(),r=t(),n=t();return{rxDatePickerRef:l,datePickerFormat:V((()=>ue(e,o))),rxFormItemRef:r,rxDatePickerComponentsRef:n}})(e,o),{getRxToolTipConfig:p,updateRxToolTipConfig:x}=function(e,o,l){const r=t();function n(){const{toolTipConfig:n}=e,{width:a}=l.value.getBoundingClientRect(),c={width:(null==n?void 0:n.tooltipWidth)?n.tooltipWidth:`${a}px`,maxHeight:(null==n?void 0:n.maxHeight)?n.maxHeight:"80px"},u=t();if(null==n?void 0:n.content){const{content:e}=n;u.value=e}else u.value=ue(e,o);r.value=Object.assign(Object.assign({},n),{style:c,content:u.value})}return a((()=>n())),{getRxToolTipConfig:()=>r.value,updateRxToolTipConfig:n}}(e,o,i),{handleOpenRxDatePicker:m}=((e,t,o)=>{const l=z(),r=w((function(){l.handleSearchCallBack()}),1e3);return c((()=>t.useSearchValue),(()=>{a((()=>{e()})),r()}),{deep:!0}),{handleOpenRxDatePicker:function(){a((()=>{o.value.rxDatePickerRef.focus()}))}}})(x,e,u);return{useSearchValueLocal:r,rxDatePickerRef:n,datePickerFormat:s,rxFormItemRef:i,rxDatePickerComponentsRef:u,getRxToolTipConfig:p,handleOpenRxDatePicker:m,isEmpty:I}}});const se={class:"w-0 h-0 overflow-hidden",ref:"rxDatePickerRef"},pe={key:0,class:"flex items-center space-x-1"},xe=i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"text-[#0F1114] group-hover:text-[#3370FF]"},[i("path",{d:"M11.5 2.4H14.3C14.4856 2.4 14.6637 2.47375 14.795 2.60502C14.9262 2.7363 15 2.91435 15 3.1V14.3C15 14.4856 14.9262 14.6637 14.795 14.795C14.6637 14.9262 14.4856 15 14.3 15H1.7C1.51435 15 1.3363 14.9262 1.20502 14.795C1.07375 14.6637 1 14.4856 1 14.3V3.1C1 2.91435 1.07375 2.7363 1.20502 2.60502C1.3363 2.47375 1.51435 2.4 1.7 2.4H4.5V1H5.9V2.4H10.1V1H11.5V2.4ZM10.1 3.8H5.9V5.2H4.5V3.8H2.4V6.6H13.6V3.8H11.5V5.2H10.1V3.8ZM13.6 8H2.4V13.6H13.6V8Z",fill:"currentColor"})],-1),me={class:"text-[14px] leading-[22px] text-[#8B9199]"},de=i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"text-[#0F1114] group-hover:text-[#3370FF]"},[i("path",{d:"M11.5 2.4H14.3C14.4856 2.4 14.6637 2.47375 14.795 2.60502C14.9262 2.7363 15 2.91435 15 3.1V14.3C15 14.4856 14.9262 14.6637 14.795 14.795C14.6637 14.9262 14.4856 15 14.3 15H1.7C1.51435 15 1.3363 14.9262 1.20502 14.795C1.07375 14.6637 1 14.4856 1 14.3V3.1C1 2.91435 1.07375 2.7363 1.20502 2.60502C1.3363 2.47375 1.51435 2.4 1.7 2.4H4.5V1H5.9V2.4H10.1V1H11.5V2.4ZM10.1 3.8H5.9V5.2H4.5V3.8H2.4V6.6H13.6V3.8H11.5V5.2H10.1V3.8ZM13.6 8H2.4V13.6H13.6V8Z",fill:"currentColor"})],-1);ie.render=function(e,t,o,l,r,n){const a=s("RxDatePicker"),c=s("RxScrollbar"),u=s("RxTooltip");return p(),F(u,k(y(e.getRxToolTipConfig())),{default:g((()=>[i("div",{onClick:t[1]||(t[1]=(...t)=>e.handleOpenRxDatePicker&&e.handleOpenRxDatePicker(...t)),ref:"rxFormItemRef",class:"rounded-[4px] px-[8px] py-[5px] group hover:bg-[#F5F6F7] h-[32px] flex items-center cursor-pointer"},[m(" 隐藏控件 "),i("div",se,[f(a,h({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),m(" 值 "),e.isEmpty(e.useSearchValue)?(p(),x(S,{key:1},[m(" 标题 "),i("p",me,v(e.$attrs.label),1),de],64)):(p(),x("div",pe,[i("p",{class:d(["text-[14px] leading-[22px] text-[#0F1114] group-hover:text-[#3370FF]",e.rxOutSideStyleCustom])},v(e.datePickerFormat),3),xe]))],512)])),content:g((()=>[i("div",{style:R(e.getRxToolTipConfig().style)},[f(c,{"max-height":e.getRxToolTipConfig().style.maxHeight},{default:g((()=>[C(v(e.datePickerFormat),1)])),_:1},8,["max-height"])],4)])),_:1},16)},ie.__file="packages/components/RxFormPlusBeta/src/components/formDatePicker/index.vue";const fe=new Map;function he(e,t){fe.set(e,t)}he("RxFormPlusInput",q),he("RxFormPlusSelect",le),he("RxFormPlusDatePicker",ie);var ge={add:he,del:function(e){fe.delete(e)},get:function(e){return e&&fe.get(e)||e}},Se=u({name:"FormComponent",props:W,setup(e,{emit:t}){const o=ge.get(e.component),l=H(e,"useSearchValue",t);return{componentLocal:o,componentPropsLocal:V((()=>e.componentProps)),useSearchValueLocal:l}}});Se.render=function(e,t,o,l,r,n){return p(),F(T(e.componentLocal),k(y({...e.$attrs,...e.$props,...e.componentPropsLocal})),null,16)},Se.__file="packages/components/RxFormPlusBeta/src/components/formComponent/index.vue";var ve=u({name:"RxFormPlusBeta",components:{FormComponent:Se},props:Y,emits:["handleSearch"],setup(e,{emit:t,expose:o}){const l=()=>t("handleSearch",e);return N({handleSearchCallBack:l}),o({handleSearchCallBack:l}),{}}});ve.render=function(e,t,o,l,r,n){const a=s("form-component");return p(),x("div",{class:d(["flex items-center",e.customClass])},[(p(!0),x(S,null,P(e.columns,(e=>(p(),x(S,null,[e.component?(p(),x("div",{key:e,class:d(e.componentLayoutClass)},[(p(),F(a,h({key:e},e,{modelValue:e.useSearchValue,"onUpdate:modelValue":t=>e.useSearchValue=t}),null,16,["modelValue","onUpdate:modelValue"]))],2)):m("v-if",!0)],64)))),256))],2)},ve.__file="packages/components/RxFormPlusBeta/src/RxFormPlusBeta.vue";const Re=e(ve);export{Re as RxFormPlusBeta,Re 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,nextTick as n,watch as c,defineComponent as u,createElementVNode as i,resolveComponent as s,openBlock as p,createElementBlock as x,createCommentVNode as m,normalizeClass as d,createVNode as f,mergeProps as h,withCtx as g,Fragment as S,toDisplayString as v,normalizeStyle as R,createTextVNode as C,computed as V,createBlock as F,normalizeProps as k,guardReactiveProps as y,resolveDynamicComponent as T,renderList as P}from"vue";import{useDebounceFn as w,onClickOutside as b,useVModel as B}from"@vueuse/core";import{RxInput as H}from"rx-compo/es/components/RxInput";import{RxTooltip as D}from"rx-compo/es/components/RxTooltip";import{RxScrollbar as O}from"rx-compo/es/components/RxScrollbar";import{isEmpty as I,map as L,includes as $,reduce as _}from"lodash-es";import{ElIcon as M}from"element-plus";import{Search as j,ArrowDownBold as E}from"@element-plus/icons-vue";import{RxFormSelect as A}from"rx-compo/es/components/RxFormSelect";import{RxDatePicker as Y}from"rx-compo/es/components/RxDatePicker";const W={columns:{type:Array,default:[]},customClass:{type:String,default:"space-x-8"}},Z={useSearchValue:{type:[Array,String,Number,Boolean,Object],default:""},component:{type:String,default:""},componentProps:{type:Object,default:void 0}},U={useSearchValue:{type:[Array,String,Number,Boolean,Object],default:""},rxInputStyleCustom:{type:String,default:"!max-w-[150px] inline-block"},rxOutSideStyleCustom:{type:String,default:"!max-w-[84px] truncate"},toolTipConfig:{type:Object,default:{placement:"top"}},singleMode:{type:Boolean,default:!1}};const N=Symbol();function z(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,N)}function q(){return function(e=Symbol(),t){return a(e,t||{})}(N)}var G=u({name:"RxFormPlusInput",components:{RxInput:H,RxTooltip:D,RxScrollbar:O,Search:j,ElIcon:M},props:U,setup(e,{attrs:o,emit:l}){const r=B(e,"useSearchValue",l),{clickRef:a,rxInputRef:u,rxInputOutSideRef:i,rxFormItemRef:s,setClickRef:p}=(e=>{const o=t(e.singleMode),l=t(),r=t(),a=t();return{clickRef:o,rxInputRef:l,rxInputOutSideRef:r,rxFormItemRef:a,getClickRef:function(){return o.value},setClickRef:function(e){o.value=e}}})(e),{getRxToolTipConfig:x,updateRxToolTipConfig:m}=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 n((()=>a())),{updateRxToolTipConfig:a,getRxToolTipConfig:()=>r.value}}(e,0,s),{handleBlur:d,handleFocus:f}=((e,t,o,l,r,a)=>{const u=q(),i=w((function(){u.handleSearchCallBack()}),1e3);return b(l,(()=>{a.singleMode?t(!0):t(!1)})),c((()=>r),(()=>{n((()=>{e()}))}),{deep:!0}),{handleBlur:function(){i()},handleFocus:function(){t(!0),n((()=>{var e,t;return null===(t=null===(e=o.value)||void 0===e?void 0:e.elInputRef)||void 0===t?void 0:t.focus()}))}}})(m,p,u,i,a,e);return{clickRef:a,useSearchValueLocal:r,rxInputRef:u,rxInputOutSideRef:i,rxFormItemRef:s,getRxToolTipConfig:x,setClickRef:p,isEmpty:I,handleBlur:d,handleFocus:f}}});const J={ref:"rxFormItemRef"},K={class:"flex items-center"},Q={key:0,class:"flex items-center space-x-1"},X=i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"text-[##5C6781] group-hover:text-[#3370FF]"},[i("circle",{cx:"8",cy:"8",r:"4.1",stroke:"currentColor","stroke-width":"1.8"}),i("path",{d:"M11 11L12.5 12.5",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round"})],-1),ee={class:"flex items-center space-x-1"},te={class:"text-[14px] leading-[22px] text-[#8B9199]"},oe=i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"text-[##5C6781] group-hover:text-[#3370FF]"},[i("circle",{cx:"8",cy:"8",r:"4.1",stroke:"currentColor","stroke-width":"1.8"}),i("path",{d:"M11 11L12.5 12.5",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round"})],-1);G.render=function(e,t,o,l,r,a){const n=s("Search"),c=s("el-icon"),u=s("RxInput"),V=s("RxScrollbar"),F=s("RxTooltip");return p(),x("div",J,[m(" 输入状态 "),e.clickRef?(p(),x("div",{key:0,ref:"rxInputOutSideRef",class:d(e.rxInputStyleCustom)},[f(u,h({ref:"rxInputRef"},{...e.$attrs,...e.$props},{modelValue:e.useSearchValueLocal,"onUpdate:modelValue":t[0]||(t[0]=t=>e.useSearchValueLocal=t),onBlur:e.handleBlur}),{prefix:g((()=>[i("div",K,[f(c,{color:"#5C6781"},{default:g((()=>[f(n)])),_:1})])])),_:1},16,["modelValue","onBlur"])],2)):(p(),x(S,{key:1},[m(" 极值、有值、hover/点击、无操作 "),f(F,h({disabled:e.isEmpty(e.useSearchValueLocal)},e.getRxToolTipConfig()),{default:g((()=>[i("div",{onClick:t[1]||(t[1]=(...t)=>e.handleFocus&&e.handleFocus(...t)),class:"cursor-pointer h-[32px] flex items-center rounded-[4px] px-[8px] py-[5px] inline-block group hover:bg-[#F5F6F7]"},[m(" 值 "),e.isEmpty(e.useSearchValueLocal)?(p(),x(S,{key:1},[m(" 标题 "),i("div",ee,[i("p",te,v(e.$attrs.label),1),oe])],2112)):(p(),x("div",Q,[i("p",{class:d(["text-[14px] leading-[22px] text-[#0F1114] group-hover:text-[#3370FF]",e.rxOutSideStyleCustom])},v(e.useSearchValueLocal),3),X]))])])),content:g((()=>[i("div",{style:R(e.getRxToolTipConfig().style)},[f(V,{"max-height":e.getRxToolTipConfig().style.maxHeight},{default:g((()=>[i("p",null,v(e.$attrs.label)+":",1),C(" "+v(e.useSearchValueLocal),1)])),_:1},8,["max-height"])],4)])),_:1},16,["disabled"])],2112))],512)},G.__file="packages/components/RxFormPlusBeta/src/components/formInput/index.vue";const le={useSearchValue:{type:Array,default:[]},visibleValue:{type:Boolean,default:null},rxOutSideStyleCustom:{type:String,default:"!max-w-[84px] truncate"},toolTipConfig:{type:Object,default:{placement:"top"}},rxFormSelectOptions:{type:Array,default:[]},multiple:{type:Boolean,default:!1}};var re=u({name:"RxFormPlusSelect",components:{RxTooltip:D,RxScrollbar:O,RxFormSelect:A,ArrowDownBold:E,ElIcon:M},props:le,setup(e,{attrs:o,emit:l}){const r=B(e,"useSearchValue",l),{refFormSelectRef:a,rxSelectRef:u,rxFormItemRef:i,searchValueComputed:s,formSelectText:p,setPopoverStatus:x,getPopoverStatus:m,getRefFormSelect:d}=((e,o)=>{const l=t(),r=t(!1),a=t(),n=t(),c=V((()=>L(e.useSearchValue,(e=>e.label)).toString())),u=V((()=>o.multiple?`已选${e.useSearchValue.length}项`:e.useSearchValue[0].value));return{refFormSelectRef:l,rxSelectRef:a,rxFormItemRef:n,searchValueComputed:c,formSelectText:u,popoverStatus:r,setPopoverStatus:e=>r.value=e,getPopoverStatus:()=>r.value,getRefFormSelect:()=>l.value}})(e,o),{getRxToolTipConfig:f,updateRxToolTipConfig:h}=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 n((()=>r())),{getRxToolTipConfig:()=>l.value,updateRxToolTipConfig:r}}(e,i),{handleSetCallBack:g,handleSetPopover:S}=((e,t,o)=>{const l=q(),r=w((function(){l.handleSearchCallBack()}),1e3);return n((()=>{var e;b(null===(e=t())||void 0===e?void 0:e.defaultSlotPopoverRef,(()=>{t().setVisiblePopover(!1)}))})),c((()=>o.useSearchValue),(()=>{n((()=>{e()})),r()}),{deep:!0}),{handleSetCallBack:function(e){o.multiple||t().setVisiblePopover(!1)},handleSetPopover:function(){t().setVisiblePopover(!0)}}})(h,d,e);return{refFormSelectRef:a,useSearchValueLocal:r,rxSelectRef:u,rxFormItemRef:i,searchValueComputed:s,formSelectText:p,ArrowDownBold:E,getRxToolTipConfig:f,isEmpty:I,setPopoverStatus:x,getPopoverStatus:m,handleSetCallBack:g,handleSetPopover:S}}});const ae={ref:"rxFormItemRef"},ne={class:"text-[14px] leading-[22px] text-[#8B9199]"};re.render=function(e,t,o,l,r,a){const n=s("ArrowDownBold"),c=s("el-icon"),u=s("RxFormSelect"),V=s("RxScrollbar"),F=s("RxTooltip");return p(),x("div",ae,[f(F,h({disabled:e.isEmpty(e.useSearchValueLocal)},e.getRxToolTipConfig()),{default:g((()=>[f(u,h({ref:"refFormSelectRef"},{...e.$attrs,...e.$props},{modelValue:e.useSearchValueLocal,"onUpdate:modelValue":t[1]||(t[1]=t=>e.useSearchValueLocal=t),onShow:t[2]||(t[2]=t=>e.setPopoverStatus(!0)),onHide:t[3]||(t[3]=t=>e.setPopoverStatus(!1)),onRxFormSelectClick:e.handleSetCallBack}),{default:g((()=>[i("div",{onClick:t[0]||(t[0]=(...t)=>e.handleSetPopover&&e.handleSetPopover(...t)),class:"h-[32px] flex items-center rounded-[4px] px-[8px] py-[5px] inline-block group hover:bg-[#F5F6F7] cursor-pointer space-x-1"},[m(" 值 "),e.isEmpty(e.useSearchValueLocal)?(p(),x(S,{key:1},[m(" 标题 "),i("p",ne,v(e.$attrs.label),1)],2112)):(p(),x("p",{key:0,class:d(["text-[14px] text-[#0F1114] group-hover:text-[#3370FF]",e.rxOutSideStyleCustom])},v(e.formSelectText),3)),f(c,{size:12,color:"#5C6781",class:"text-[#0F1114] group-hover:text-[#3370FF]"},{default:g((()=>[f(n,{class:d(["transition",{"-rotate-180":e.getPopoverStatus()}])},null,8,["class"])])),_:1})])])),_:1},16,["modelValue","onRxFormSelectClick"])])),content:g((()=>[i("div",{style:R(e.getRxToolTipConfig().style)},[f(V,{"max-height":e.getRxToolTipConfig().style.maxHeight},{default:g((()=>[i("p",null,v(e.$attrs.label)+":",1),C(" "+v(e.searchValueComputed),1)])),_:1},8,["max-height"])],4)])),_:1},16,["disabled"])],512)},re.__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(I(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:Y,RxTooltip:D,RxScrollbar:O},props:ce,setup(e,{attrs:o,emit:l}){const r=B(e,"useSearchValue",l),{rxDatePickerRef:a,rxDatePickerComponentsRef:u,rxFormItemRef:i,datePickerFormat:s}=((e,o)=>{const l=t(),r=t(),a=t();return{rxDatePickerRef:l,datePickerFormat:V((()=>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 n((()=>a())),{getRxToolTipConfig:()=>r.value,updateRxToolTipConfig:a}}(e,o,i),{handleOpenRxDatePicker:m}=((e,t,o)=>{const l=q(),r=w((function(){l.handleSearchCallBack()}),1e3);return c((()=>t.useSearchValue),(()=>{n((()=>{e()})),r()}),{deep:!0}),{handleOpenRxDatePicker:function(){n((()=>{o.value.rxDatePickerRef.focus()}))}}})(x,e,u);return{useSearchValueLocal:r,rxDatePickerRef:a,datePickerFormat:s,rxFormItemRef:i,rxDatePickerComponentsRef:u,getRxToolTipConfig:p,handleOpenRxDatePicker:m,isEmpty:I}}});const pe={class:"w-0 h-0 overflow-hidden",ref:"rxDatePickerRef"},xe={key:0,class:"flex items-center space-x-1"},me=i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"text-[#0F1114] group-hover:text-[#3370FF]"},[i("path",{d:"M11.5 2.4H14.3C14.4856 2.4 14.6637 2.47375 14.795 2.60502C14.9262 2.7363 15 2.91435 15 3.1V14.3C15 14.4856 14.9262 14.6637 14.795 14.795C14.6637 14.9262 14.4856 15 14.3 15H1.7C1.51435 15 1.3363 14.9262 1.20502 14.795C1.07375 14.6637 1 14.4856 1 14.3V3.1C1 2.91435 1.07375 2.7363 1.20502 2.60502C1.3363 2.47375 1.51435 2.4 1.7 2.4H4.5V1H5.9V2.4H10.1V1H11.5V2.4ZM10.1 3.8H5.9V5.2H4.5V3.8H2.4V6.6H13.6V3.8H11.5V5.2H10.1V3.8ZM13.6 8H2.4V13.6H13.6V8Z",fill:"currentColor"})],-1),de={class:"text-[14px] leading-[22px] text-[#8B9199]"},fe=i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"text-[#0F1114] group-hover:text-[#3370FF]"},[i("path",{d:"M11.5 2.4H14.3C14.4856 2.4 14.6637 2.47375 14.795 2.60502C14.9262 2.7363 15 2.91435 15 3.1V14.3C15 14.4856 14.9262 14.6637 14.795 14.795C14.6637 14.9262 14.4856 15 14.3 15H1.7C1.51435 15 1.3363 14.9262 1.20502 14.795C1.07375 14.6637 1 14.4856 1 14.3V3.1C1 2.91435 1.07375 2.7363 1.20502 2.60502C1.3363 2.47375 1.51435 2.4 1.7 2.4H4.5V1H5.9V2.4H10.1V1H11.5V2.4ZM10.1 3.8H5.9V5.2H4.5V3.8H2.4V6.6H13.6V3.8H11.5V5.2H10.1V3.8ZM13.6 8H2.4V13.6H13.6V8Z",fill:"currentColor"})],-1);se.render=function(e,t,o,l,r,a){const n=s("RxDatePicker"),c=s("RxScrollbar"),u=s("RxTooltip");return p(),F(u,k(y(e.getRxToolTipConfig())),{default:g((()=>[i("div",{onClick:t[1]||(t[1]=(...t)=>e.handleOpenRxDatePicker&&e.handleOpenRxDatePicker(...t)),ref:"rxFormItemRef",class:"rounded-[4px] px-[8px] py-[5px] group hover:bg-[#F5F6F7] h-[32px] flex items-center cursor-pointer"},[m(" 隐藏控件 "),i("div",pe,[f(n,h({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),m(" 值 "),e.isEmpty(e.useSearchValue)?(p(),x(S,{key:1},[m(" 标题 "),i("p",de,v(e.$attrs.label),1),fe],64)):(p(),x("div",xe,[i("p",{class:d(["text-[14px] leading-[22px] text-[#0F1114] group-hover:text-[#3370FF]",e.rxOutSideStyleCustom])},v(e.datePickerFormat),3),me]))],512)])),content:g((()=>[i("div",{style:R(e.getRxToolTipConfig().style)},[f(c,{"max-height":e.getRxToolTipConfig().style.maxHeight},{default:g((()=>[C(v(e.datePickerFormat),1)])),_:1},8,["max-height"])],4)])),_:1},16)},se.__file="packages/components/RxFormPlusBeta/src/components/formDatePicker/index.vue";const he=new Map;function ge(e,t){he.set(e,t)}ge("RxFormPlusInput",G),ge("RxFormPlusSelect",re),ge("RxFormPlusDatePicker",se);var Se={add:ge,del:function(e){he.delete(e)},get:function(e){return e&&he.get(e)||e}},ve=u({name:"FormComponent",props:Z,setup(e,{emit:t}){const o=Se.get(e.component),l=B(e,"useSearchValue",t);return{componentLocal:o,componentPropsLocal:V((()=>e.componentProps)),useSearchValueLocal:l}}});ve.render=function(e,t,o,l,r,a){return p(),F(T(e.componentLocal),k(y({...e.$attrs,...e.$props,...e.componentPropsLocal})),null,16)},ve.__file="packages/components/RxFormPlusBeta/src/components/formComponent/index.vue";var Re=u({name:"RxFormPlusBeta",components:{FormComponent:ve},props:W,emits:["handleSearch"],setup(e,{emit:t,expose:o}){const{handleSearchCallBack:l}=((e,t)=>({handleSearchCallBack:()=>{const o=_(e.columns,((e,t)=>(t.useSearchValue&&t.prop&&(e[t.prop]=t.useSearchValue),e)),{});t("handleSearch",{searchData:o})}}))(e,t);return z({handleSearchCallBack:l}),o({handleSearchCallBack:l}),{}}});Re.render=function(e,t,o,l,r,a){const n=s("form-component");return p(),x("div",{class:d(["flex items-center",e.customClass])},[(p(!0),x(S,null,P(e.columns,(e=>(p(),x(S,null,[e.component?(p(),x("div",{key:e,class:d(e.componentLayoutClass)},[(p(),F(n,h({key:e},e,{modelValue:e.useSearchValue,"onUpdate:modelValue":t=>e.useSearchValue=t}),null,16,["modelValue","onUpdate:modelValue"]))],2)):m("v-if",!0)],64)))),256))],2)},Re.__file="packages/components/RxFormPlusBeta/src/RxFormPlusBeta.vue";const Ce=e(Re);export{Ce as RxFormPlusBeta,Ce as default};
@@ -1 +1,4 @@
1
- export declare const useRxFormColumns: () => {};
1
+ import type { RxFormPlusBetaPropsType } from '../RxFormPlusBeta';
2
+ export declare const useRxFormColumns: (props: RxFormPlusBetaPropsType, emit: (...args: any[]) => void) => {
3
+ handleSearchCallBack: () => void;
4
+ };