rx-compo 1.0.73 → 1.0.74

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
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("rx-compo/lib/utils/with-install"),t=require("vue"),o=require("@vueuse/core"),r=require("rx-compo/lib/components/RxInput"),l=require("rx-compo/lib/components/RxTooltip"),n=require("rx-compo/lib/components/RxScrollbar"),a=require("lodash-es"),c=require("element-plus"),i=require("@element-plus/icons-vue"),p=require("rx-compo/lib/components/RxFormSelect"),s=require("rx-compo/lib/components/RxDatePicker");const u={columns:{type:Array,default:[]}},m={useSearchValue:{type:[Array,String,Number,Boolean,Object],default:""},component:{type:String,default:""},componentProps:{type:Object,default:void 0}},d={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"}}};var x=t.defineComponent({name:"RxFormPlusInput",components:{RxInput:r.RxInput,RxTooltip:l.RxTooltip,RxScrollbar:n.RxScrollbar,Search:i.Search,ElIcon:c.ElIcon},props:d,setup(e,{attrs:r,emit:l}){const n=o.useVModel(e,"useSearchValue",l),{clickRef:c,rxInputRef:i,rxFormItemRef:p,setClickRef:s}=(e=>{const o=t.ref(!1),r=t.ref(),l=t.ref();return{clickRef:o,rxInputRef:r,rxFormItemRef:l,getClickRef:function(){return o.value},setClickRef:function(e){o.value=e}}})(),{getRxToolTipConfig:u,updateRxToolTipConfig:m}=function(e,o,r){const l=t.ref();return{updateRxToolTipConfig:function(){const{toolTipConfig:o}=e,n=r.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.ref();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:a,content:c.value})},getRxToolTipConfig:()=>l.value}}(e,0,p);return((e,r,l,n)=>{o.onClickOutside(l,(()=>r(!1))),t.watch((()=>n),(()=>{t.nextTick((()=>{e()}))}),{deep:!0,immediate:!0})})(m,s,i,c),{clickRef:c,useSearchValueLocal:n,rxInputRef:i,rxFormItemRef:p,getRxToolTipConfig:u,setClickRef:s,isEmpty:a.isEmpty}}});const f={ref:"rxFormItemRef"},g={class:"cursor-pointer h-[32px] rounded-[4px] px-[8px] py-[5px] inline-block group hover:bg-[#F5F6F7]"},h={class:"text-[14px] leading-[22px] text-[#8B9199]"};x.render=function(e,o,r,l,n,a){const c=t.resolveComponent("RxInput"),i=t.resolveComponent("Search"),p=t.resolveComponent("el-icon"),s=t.resolveComponent("RxScrollbar"),u=t.resolveComponent("RxTooltip");return t.openBlock(),t.createElementBlock("div",f,[t.createCommentVNode(" 输入状态 "),e.clickRef?(t.openBlock(),t.createElementBlock("div",{key:0,ref:"rxInputRef",class:t.normalizeClass(e.rxInputStyleCustom)},[e.clickRef?(t.openBlock(),t.createBlock(c,t.mergeProps({key:0,"prefix-icon":"Search"},{...e.$attrs,...e.$props},{modelValue:e.useSearchValueLocal,"onUpdate:modelValue":o[0]||(o[0]=t=>e.useSearchValueLocal=t)}),null,16,["modelValue"])):t.createCommentVNode("v-if",!0)],2)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createCommentVNode(" 极值、有值、hover/点击、无操作 "),t.createElementVNode("div",g,[t.createVNode(u,t.mergeProps({disabled:e.isEmpty(e.useSearchValueLocal)},e.getRxToolTipConfig()),{default:t.withCtx((()=>[t.createCommentVNode(" 值 "),e.isEmpty(e.useSearchValueLocal)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createCommentVNode(" 标题 "),t.createElementVNode("div",{class:"flex items-center space-x-1",onClick:o[2]||(o[2]=t=>e.setClickRef(!0))},[t.createElementVNode("p",h,t.toDisplayString(e.$attrs.label),1),t.createVNode(p,{color:"#5C6781"},{default:t.withCtx((()=>[t.createVNode(i)])),_:1})])],2112)):(t.openBlock(),t.createElementBlock("div",{key:0,class:"flex items-center space-x-1 group",onClick:o[1]||(o[1]=t=>e.setClickRef(!0))},[t.createElementVNode("p",{class:t.normalizeClass(["text-[14px] leading-[22px] text-[#0F1114] group-hover:text-[#3370FF]",e.rxOutSideStyleCustom])},t.toDisplayString(e.useSearchValueLocal),3),t.createVNode(p,{color:"#0F1114",class:"group-hover:text-[#3370FF]"},{default:t.withCtx((()=>[t.createVNode(i)])),_:1})]))])),content:t.withCtx((()=>[t.createElementVNode("div",{style:t.normalizeStyle(e.getRxToolTipConfig().style)},[t.createVNode(s,{"max-height":e.getRxToolTipConfig().style.maxHeight},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.useSearchValueLocal),1)])),_:1},8,["max-height"])],4)])),_:1},16,["disabled"])])],2112))],512)},x.__file="packages/components/RxFormPlusBeta/src/components/formInput/index.vue";const C={useSearchValue:{type:Array,default:[]},rxOutSideStyleCustom:{type:String,default:"!max-w-[68px] truncate"},toolTipConfig:{type:Object,default:{placement:"top"}},rxFormSelectOptions:{type:Array,default:[]}};var R=t.defineComponent({name:"RxFormPlusSelect",components:{RxTooltip:l.RxTooltip,RxScrollbar:n.RxScrollbar,RxFormSelect:p.RxFormSelect,ArrowDownBold:i.ArrowDownBold,ArrowUpBold:i.ArrowUpBold,ElIcon:c.ElIcon},props:C,setup(e,{attrs:r,emit:l}){const n=o.useVModel(e,"useSearchValue",l),{rxSelectRef:c,rxFormItemRef:p,searchValueComputed:s,formSelectText:u,setPopoverStatus:m,getPopoverStatus:d}=((e,o)=>{const r=t.ref(!1);return{rxSelectRef:t.ref(),rxFormItemRef:t.ref(),searchValueComputed:t.computed((()=>a.map(e.useSearchValue,(e=>e.label)).toString())),formSelectText:t.computed((()=>o.multiple?`已选${e.useSearchValue.length}项`:e.useSearchValue[0].value)),popoverStatus:r,setPopoverStatus:e=>r.value=e,getPopoverStatus:()=>r.value}})(e,r),{getRxToolTipConfig:x,updateRxToolTipConfig:f}=function(e,o){const r=t.ref();return{getRxToolTipConfig:()=>r.value,updateRxToolTipConfig:function(){const{toolTipConfig:t}=e,l=o.value.getBoundingClientRect(),n={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:n})}}}(e,p);return((e,o)=>{t.watch((()=>o.useSearchValue),(()=>{t.nextTick((()=>{e()}))}),{deep:!0,immediate:!0})})(f,e),{useSearchValueLocal:n,rxSelectRef:c,rxFormItemRef:p,searchValueComputed:s,formSelectText:u,ArrowDownBold:i.ArrowDownBold,ArrowUpBold:i.ArrowUpBold,getRxToolTipConfig:x,isEmpty:a.isEmpty,setPopoverStatus:m,getPopoverStatus:d}}});const S={ref:"rxFormItemRef"},k={class:"h-[32px] rounded-[4px] px-[8px] py-[5px] inline-block group hover:bg-[#F5F6F7]"},V={key:0,class:"flex items-center space-x-1 cursor-pointer group"},v={class:"flex items-center space-x-1 cursor-pointer"},y={class:"text-[14px] leading-[22px] text-[#8B9199]"};R.render=function(e,o,r,l,n,a){const c=t.resolveComponent("ArrowUpBold"),i=t.resolveComponent("ArrowDownBold"),p=t.resolveComponent("el-icon"),s=t.resolveComponent("RxFormSelect"),u=t.resolveComponent("RxScrollbar"),m=t.resolveComponent("RxTooltip");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createCommentVNode(" {{ $attrs }} "),t.createElementVNode("div",S,[t.createElementVNode("div",k,[t.createVNode(m,t.mergeProps({disabled:e.isEmpty(e.useSearchValueLocal)},e.getRxToolTipConfig()),{default:t.withCtx((()=>[t.createVNode(s,t.mergeProps({trigger:"click",teleported:!0},{...e.$attrs,...e.$props},{modelValue:e.useSearchValueLocal,"onUpdate:modelValue":o[0]||(o[0]=t=>e.useSearchValueLocal=t),onShow:o[1]||(o[1]=t=>e.setPopoverStatus(!0)),onHide:o[2]||(o[2]=t=>e.setPopoverStatus(!1))}),{default:t.withCtx((()=>[t.createCommentVNode(" 值 "),e.isEmpty(e.useSearchValueLocal)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createCommentVNode(" 标题 "),t.createElementVNode("div",v,[t.createElementVNode("p",y,t.toDisplayString(e.$attrs.label),1),t.createVNode(p,{size:12,color:"#5C6781"},{default:t.withCtx((()=>[e.getPopoverStatus()?(t.openBlock(),t.createBlock(c,{key:0})):(t.openBlock(),t.createBlock(i,{key:1}))])),_:1})])],2112)):(t.openBlock(),t.createElementBlock("div",V,[t.createElementVNode("p",{class:t.normalizeClass(["text-[14px] leading-[22px] text-[#0F1114] group-hover:text-[#3370FF]",e.rxOutSideStyleCustom])},t.toDisplayString(e.formSelectText),3),t.createVNode(p,{size:12,color:"#0F1114",class:"group-hover:text-[#3370FF]"},{default:t.withCtx((()=>[e.getPopoverStatus()?(t.openBlock(),t.createBlock(c,{key:0})):(t.openBlock(),t.createBlock(i,{key:1}))])),_:1})]))])),_:1},16,["modelValue"])])),content:t.withCtx((()=>[t.createElementVNode("div",{style:t.normalizeStyle(e.getRxToolTipConfig().style)},[t.createVNode(u,{"max-height":e.getRxToolTipConfig().style.maxHeight},{default:t.withCtx((()=>[t.createElementVNode("p",null,t.toDisplayString(e.$attrs.label)+":",1),t.createTextVNode(" "+t.toDisplayString(e.searchValueComputed),1)])),_:1},8,["max-height"])],4)])),_:1},16,["disabled"])])],512)],2112)},R.__file="packages/components/RxFormPlusBeta/src/components/formSelect/index.vue";const F={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 T(e){return e.replace(/-/g,"/")}function P(e,t){if(a.isEmpty(e.useSearchValue))return t.placeholder;if(a.includes(["datetimerange","daterange","monthrange"],e.rxDatePickerOptions.type)){return`${T(e.useSearchValue[0])}~${T(e.useSearchValue[1])}`}return`${e.useSearchValue}`}var B=t.defineComponent({name:"RxFormPlusDatePicker",components:{RxDatePicker:s.RxDatePicker,RxTooltip:l.RxTooltip,RxScrollbar:n.RxScrollbar,Calendar:i.Calendar,ElIcon:c.ElIcon},props:F,setup(e,{attrs:r,emit:l}){const n=o.useVModel(e,"useSearchValue",l),{rxDatePickerRef:c,rxDatePickerComponentsRef:i,rxFormItemRef:p,datePickerFormat:s}=((e,o)=>{const r=t.ref(),l=t.ref(),n=t.ref();return{rxDatePickerRef:r,datePickerFormat:t.computed((()=>P(e,o))),rxFormItemRef:l,rxDatePickerComponentsRef:n}})(e,r),{getRxToolTipConfig:u,updateRxToolTipConfig:m}=function(e,o,r){const l=t.ref();return{getRxToolTipConfig:()=>l.value,updateRxToolTipConfig:function(){const{toolTipConfig:n}=e,{width:a}=r.value.getBoundingClientRect(),c={width:(null==n?void 0:n.tooltipWidth)?n.tooltipWidth:`${a}px`,maxHeight:(null==n?void 0:n.maxHeight)?n.maxHeight:"80px"},i=t.ref();if(null==n?void 0:n.content){const{content:e}=n;i.value=e}else i.value=P(e,o);l.value=Object.assign(Object.assign({},n),{style:c,content:i.value})}}}(e,r,p),{handleOpenRxDatePicker:d}=((e,o,r)=>(t.watch((()=>o.useSearchValue),(()=>{t.nextTick((()=>{e()}))}),{deep:!0,immediate:!0}),{handleOpenRxDatePicker:function(){t.nextTick((()=>{r.value.rxDatePickerRef.focus()}))}}))(m,e,i);return{useSearchValueLocal:n,rxDatePickerRef:c,datePickerFormat:s,rxFormItemRef:p,rxDatePickerComponentsRef:i,getRxToolTipConfig:u,handleOpenRxDatePicker:d,isEmpty:a.isEmpty}}});const N={ref:"rxFormItemRef",class:"rounded-[4px] px-[8px] py-[5px] group hover:bg-[#F5F6F7]"},E={class:"w-0 h-0 overflow-hidden",ref:"rxDatePickerRef"},b={class:"text-[14px] leading-[22px] text-[#8B9199]"};B.render=function(e,o,r,l,n,a){const c=t.resolveComponent("RxDatePicker"),i=t.resolveComponent("Calendar"),p=t.resolveComponent("el-icon"),s=t.resolveComponent("RxScrollbar"),u=t.resolveComponent("RxTooltip");return t.openBlock(),t.createElementBlock("div",N,[t.createVNode(u,t.normalizeProps(t.guardReactiveProps(e.getRxToolTipConfig())),{default:t.withCtx((()=>[t.createElementVNode("div",{class:"flex items-center space-x-1 cursor-pointer",onClick:o[1]||(o[1]=(...t)=>e.handleOpenRxDatePicker&&e.handleOpenRxDatePicker(...t))},[t.createCommentVNode(" 隐藏控件 "),t.createElementVNode("div",E,[t.createVNode(c,t.mergeProps({ref:"rxDatePickerComponentsRef",modelValue:e.useSearchValueLocal,"onUpdate:modelValue":o[0]||(o[0]=t=>e.useSearchValueLocal=t)},{...e.$attrs,...e.$props,...e.$props.rxDatePickerOptions}),null,16,["modelValue"])],512),t.createCommentVNode(" 值 "),e.isEmpty(e.useSearchValue)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createCommentVNode(" 标题 "),t.createElementVNode("p",b,t.toDisplayString(e.$attrs.label),1),t.createVNode(p,{color:"#5C6781"},{default:t.withCtx((()=>[t.createVNode(i)])),_:1})],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("p",{class:t.normalizeClass(["text-[14px] leading-[22px] text-[#0F1114] group-hover:text-[#3370FF]",e.rxOutSideStyleCustom])},t.toDisplayString(e.datePickerFormat),3),t.createVNode(p,{class:"text-[14px] leading-[22px] text-[#0F1114] group-hover:text-[#3370FF]",color:"#0F1114"},{default:t.withCtx((()=>[t.createVNode(i)])),_:1})],64))])])),content:t.withCtx((()=>[t.createElementVNode("div",{style:t.normalizeStyle(e.getRxToolTipConfig().style)},[t.createVNode(s,{"max-height":e.getRxToolTipConfig().style.maxHeight},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.datePickerFormat),1)])),_:1},8,["max-height"])],4)])),_:1},16)],512)},B.__file="packages/components/RxFormPlusBeta/src/components/formDatePicker/index.vue";const w=new Map;function D(e,t){w.set(e,t)}D("RxFormPlusInput",x),D("RxFormPlusSelect",R),D("RxFormPlusDatePicker",B);var I={add:D,del:function(e){w.delete(e)},get:function(e){return e&&w.get(e)||e}},O=t.defineComponent({name:"FormComponent",props:m,setup(e,{emit:r}){const l=I.get(e.component),n=o.useVModel(e,"useSearchValue",r);return{componentLocal:l,componentPropsLocal:t.computed((()=>e.componentProps)),useSearchValueLocal:n}}});O.render=function(e,o,r,l,n,a){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.componentLocal),t.normalizeProps(t.guardReactiveProps({...e.$attrs,...e.$props,...e.componentPropsLocal})),null,16)},O.__file="packages/components/RxFormPlusBeta/src/components/formComponent/index.vue";var _=t.defineComponent({name:"RxFormPlusBeta",components:{FormComponent:O},props:u,setup:()=>({})});const L={class:"flex items-center space-x-2"};_.render=function(e,o,r,l,n,a){const c=t.resolveComponent("form-component");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createCommentVNode(" {{ columns }} "),t.createElementVNode("div",L,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,((e,o)=>(t.openBlock(),t.createElementBlock("div",{key:o},[t.createVNode(c,t.mergeProps(e,{useSearchValue:e.useSearchValue,"onUpdate:useSearchValue":t=>e.useSearchValue=t}),null,16,["useSearchValue","onUpdate:useSearchValue"])])))),128))])],2112)},_.__file="packages/components/RxFormPlusBeta/src/RxFormPlusBeta.vue";const $=e.withInstall(_);exports.RxFormPlusBeta=$,exports.default=$;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("rx-compo/lib/utils/with-install"),t=require("vue"),o=require("@vueuse/core"),r=require("rx-compo/lib/components/RxInput"),l=require("rx-compo/lib/components/RxTooltip"),n=require("rx-compo/lib/components/RxScrollbar"),a=require("lodash-es"),c=require("element-plus"),i=require("@element-plus/icons-vue"),s=require("rx-compo/lib/components/RxFormSelect"),p=require("rx-compo/lib/components/RxDatePicker");const u={columns:{type:Array,default:[]}},m={useSearchValue:{type:[Array,String,Number,Boolean,Object],default:""},component:{type:String,default:""},componentProps:{type:Object,default:void 0}},d={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 x=Symbol();function f(e){return function(e,o=Symbol(),r={}){const{readonly:l=!0,createProvider:n=!1,native:a=!1}=r,c=t.reactive(e),i=l?t.readonly(c):c;return!n&&t.provide(o,a?e:i),{state:c}}(e,x)}function g(){return function(e=Symbol(),o){return t.inject(e,o||{})}(x)}var h=t.defineComponent({name:"RxFormPlusInput",components:{RxInput:r.RxInput,RxTooltip:l.RxTooltip,RxScrollbar:n.RxScrollbar,Search:i.Search,ElIcon:c.ElIcon},props:d,setup(e,{attrs:r,emit:l}){const n=o.useVModel(e,"useSearchValue",l),{clickRef:c,rxInputRef:i,rxFormItemRef:s,setClickRef:p}=(e=>{const o=t.ref(!1),r=t.ref(),l=t.ref();return{clickRef:o,rxInputRef:r,rxFormItemRef:l,getClickRef:function(){return o.value},setClickRef:function(e){o.value=e}}})(),{getRxToolTipConfig:u,updateRxToolTipConfig:m}=function(e,o,r){const l=t.ref();function n(){const{toolTipConfig:o}=e,n=r.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.ref();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:a,content:c.value})}return t.nextTick((()=>n())),{updateRxToolTipConfig:n,getRxToolTipConfig:()=>l.value}}(e,0,s);return((e,r,l,n,a)=>{const c=g(),i=o.useDebounceFn((()=>{c.handleSearchCallBack()}),1e3);o.onClickOutside(l,(()=>r(!1))),t.watch((()=>n),(()=>{t.nextTick((()=>{e()}))}),{deep:!0}),t.watch((()=>a.useSearchValue),(()=>{t.nextTick((()=>{e(),i()}))}),{deep:!0})})(m,p,i,c,e),{clickRef:c,useSearchValueLocal:n,rxInputRef:i,rxFormItemRef:s,getRxToolTipConfig:u,setClickRef:p,isEmpty:a.isEmpty}}});const C={ref:"rxFormItemRef"},S={class:"flex items-center"},k={class:"cursor-pointer h-[32px] rounded-[4px] px-[8px] py-[5px] inline-block group hover:bg-[#F5F6F7]"},R={class:"text-[14px] leading-[22px] text-[#8B9199]"};h.render=function(e,o,r,l,n,a){const c=t.resolveComponent("Search"),i=t.resolveComponent("el-icon"),s=t.resolveComponent("RxInput"),p=t.resolveComponent("RxScrollbar"),u=t.resolveComponent("RxTooltip");return t.openBlock(),t.createElementBlock("div",C,[t.createCommentVNode(" 输入状态 "),e.clickRef?(t.openBlock(),t.createElementBlock("div",{key:0,ref:"rxInputRef",class:t.normalizeClass(e.rxInputStyleCustom)},[e.clickRef?(t.openBlock(),t.createBlock(s,t.mergeProps({key:0},{...e.$attrs,...e.$props},{modelValue:e.useSearchValueLocal,"onUpdate:modelValue":o[0]||(o[0]=t=>e.useSearchValueLocal=t)}),{prefix:t.withCtx((()=>[t.createElementVNode("div",S,[t.createVNode(i,{color:"#5C6781"},{default:t.withCtx((()=>[t.createVNode(c)])),_:1})])])),_:1},16,["modelValue"])):t.createCommentVNode("v-if",!0)],2)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createCommentVNode(" 极值、有值、hover/点击、无操作 "),t.createElementVNode("div",k,[t.createVNode(u,t.mergeProps({disabled:e.isEmpty(e.useSearchValueLocal)},e.getRxToolTipConfig()),{default:t.withCtx((()=>[t.createCommentVNode(" 值 "),e.isEmpty(e.useSearchValueLocal)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createCommentVNode(" 标题 "),t.createElementVNode("div",{class:"flex items-center space-x-1",onClick:o[2]||(o[2]=t=>e.setClickRef(!0))},[t.createElementVNode("p",R,t.toDisplayString(e.$attrs.label),1),t.createVNode(i,{color:"#5C6781"},{default:t.withCtx((()=>[t.createVNode(c)])),_:1})])],2112)):(t.openBlock(),t.createElementBlock("div",{key:0,class:"flex items-center space-x-1 group",onClick:o[1]||(o[1]=t=>e.setClickRef(!0))},[t.createElementVNode("p",{class:t.normalizeClass(["text-[14px] leading-[22px] text-[#0F1114] group-hover:text-[#3370FF]",e.rxOutSideStyleCustom])},t.toDisplayString(e.useSearchValueLocal),3),t.createVNode(i,{color:"#0F1114",class:"group-hover:text-[#3370FF]"},{default:t.withCtx((()=>[t.createVNode(c)])),_:1})]))])),content:t.withCtx((()=>[t.createElementVNode("div",{style:t.normalizeStyle(e.getRxToolTipConfig().style)},[t.createVNode(p,{"max-height":e.getRxToolTipConfig().style.maxHeight},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.useSearchValueLocal),1)])),_:1},8,["max-height"])],4)])),_:1},16,["disabled"])])],2112))],512)},h.__file="packages/components/RxFormPlusBeta/src/components/formInput/index.vue";const v={useSearchValue:{type:Array,default:[]},rxOutSideStyleCustom:{type:String,default:"!max-w-[68px] truncate"},toolTipConfig:{type:Object,default:{placement:"top"}},rxFormSelectOptions:{type:Array,default:[]}};var V=t.defineComponent({name:"RxFormPlusSelect",components:{RxTooltip:l.RxTooltip,RxScrollbar:n.RxScrollbar,RxFormSelect:s.RxFormSelect,ArrowDownBold:i.ArrowDownBold,ArrowUpBold:i.ArrowUpBold,ElIcon:c.ElIcon},props:v,setup(e,{attrs:r,emit:l}){const n=o.useVModel(e,"useSearchValue",l),{rxSelectRef:c,rxFormItemRef:s,searchValueComputed:p,formSelectText:u,setPopoverStatus:m,getPopoverStatus:d}=((e,o)=>{const r=t.ref(!1);return{rxSelectRef:t.ref(),rxFormItemRef:t.ref(),searchValueComputed:t.computed((()=>a.map(e.useSearchValue,(e=>e.label)).toString())),formSelectText:t.computed((()=>o.multiple?`已选${e.useSearchValue.length}项`:e.useSearchValue[0].value)),popoverStatus:r,setPopoverStatus:e=>r.value=e,getPopoverStatus:()=>r.value}})(e,r),{getRxToolTipConfig:x,updateRxToolTipConfig:f}=function(e,o){const r=t.ref();function l(){const{toolTipConfig:t}=e,l=o.value.getBoundingClientRect(),n={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:n})}return t.nextTick((()=>l())),{getRxToolTipConfig:()=>r.value,updateRxToolTipConfig:l}}(e,s);return((e,r)=>{const l=g(),n=o.useDebounceFn((()=>{l.handleSearchCallBack()}),1e3);t.watch((()=>r.useSearchValue),(()=>{t.nextTick((()=>{e(),n()}))}),{deep:!0})})(f,e),{useSearchValueLocal:n,rxSelectRef:c,rxFormItemRef:s,searchValueComputed:p,formSelectText:u,ArrowDownBold:i.ArrowDownBold,ArrowUpBold:i.ArrowUpBold,getRxToolTipConfig:x,isEmpty:a.isEmpty,setPopoverStatus:m,getPopoverStatus:d}}});const y={ref:"rxFormItemRef"},T={class:"h-[32px] rounded-[4px] px-[8px] py-[5px] inline-block group hover:bg-[#F5F6F7]"},F={key:0,class:"flex items-center space-x-1 cursor-pointer group"},B={class:"flex items-center space-x-1 cursor-pointer"},P={class:"text-[14px] leading-[22px] text-[#8B9199]"};V.render=function(e,o,r,l,n,a){const c=t.resolveComponent("ArrowUpBold"),i=t.resolveComponent("ArrowDownBold"),s=t.resolveComponent("el-icon"),p=t.resolveComponent("RxFormSelect"),u=t.resolveComponent("RxScrollbar"),m=t.resolveComponent("RxTooltip");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createCommentVNode(" {{ $attrs }} "),t.createElementVNode("div",y,[t.createElementVNode("div",T,[t.createVNode(m,t.mergeProps({disabled:e.isEmpty(e.useSearchValueLocal)},e.getRxToolTipConfig()),{default:t.withCtx((()=>[t.createVNode(p,t.mergeProps({trigger:"click",teleported:!0},{...e.$attrs,...e.$props},{modelValue:e.useSearchValueLocal,"onUpdate:modelValue":o[0]||(o[0]=t=>e.useSearchValueLocal=t),onShow:o[1]||(o[1]=t=>e.setPopoverStatus(!0)),onHide:o[2]||(o[2]=t=>e.setPopoverStatus(!1))}),{default:t.withCtx((()=>[t.createCommentVNode(" 值 "),e.isEmpty(e.useSearchValueLocal)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createCommentVNode(" 标题 "),t.createElementVNode("div",B,[t.createElementVNode("p",P,t.toDisplayString(e.$attrs.label),1),t.createVNode(s,{size:12,color:"#5C6781"},{default:t.withCtx((()=>[e.getPopoverStatus()?(t.openBlock(),t.createBlock(c,{key:0})):(t.openBlock(),t.createBlock(i,{key:1}))])),_:1})])],2112)):(t.openBlock(),t.createElementBlock("div",F,[t.createElementVNode("p",{class:t.normalizeClass(["text-[14px] leading-[22px] text-[#0F1114] group-hover:text-[#3370FF]",e.rxOutSideStyleCustom])},t.toDisplayString(e.formSelectText),3),t.createVNode(s,{size:12,color:"#0F1114",class:"group-hover:text-[#3370FF]"},{default:t.withCtx((()=>[e.getPopoverStatus()?(t.openBlock(),t.createBlock(c,{key:0})):(t.openBlock(),t.createBlock(i,{key:1}))])),_:1})]))])),_:1},16,["modelValue"])])),content:t.withCtx((()=>[t.createElementVNode("div",{style:t.normalizeStyle(e.getRxToolTipConfig().style)},[t.createVNode(u,{"max-height":e.getRxToolTipConfig().style.maxHeight},{default:t.withCtx((()=>[t.createElementVNode("p",null,t.toDisplayString(e.$attrs.label)+":",1),t.createTextVNode(" "+t.toDisplayString(e.searchValueComputed),1)])),_:1},8,["max-height"])],4)])),_:1},16,["disabled"])])],512)],2112)},V.__file="packages/components/RxFormPlusBeta/src/components/formSelect/index.vue";const N={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 b(e){return e.replace(/-/g,"/")}function w(e,t){if(a.isEmpty(e.useSearchValue))return t.placeholder;if(a.includes(["datetimerange","daterange","monthrange"],e.rxDatePickerOptions.type)){return`${b(e.useSearchValue[0])}~${b(e.useSearchValue[1])}`}return`${e.useSearchValue}`}var E=t.defineComponent({name:"RxFormPlusDatePicker",components:{RxDatePicker:p.RxDatePicker,RxTooltip:l.RxTooltip,RxScrollbar:n.RxScrollbar,Calendar:i.Calendar,ElIcon:c.ElIcon},props:N,setup(e,{attrs:r,emit:l}){const n=o.useVModel(e,"useSearchValue",l),{rxDatePickerRef:c,rxDatePickerComponentsRef:i,rxFormItemRef:s,datePickerFormat:p}=((e,o)=>{const r=t.ref(),l=t.ref(),n=t.ref();return{rxDatePickerRef:r,datePickerFormat:t.computed((()=>w(e,o))),rxFormItemRef:l,rxDatePickerComponentsRef:n}})(e,r),{getRxToolTipConfig:u,updateRxToolTipConfig:m}=function(e,o,r){const l=t.ref();function n(){const{toolTipConfig:n}=e,{width:a}=r.value.getBoundingClientRect(),c={width:(null==n?void 0:n.tooltipWidth)?n.tooltipWidth:`${a}px`,maxHeight:(null==n?void 0:n.maxHeight)?n.maxHeight:"80px"},i=t.ref();if(null==n?void 0:n.content){const{content:e}=n;i.value=e}else i.value=w(e,o);l.value=Object.assign(Object.assign({},n),{style:c,content:i.value})}return t.nextTick((()=>n())),{getRxToolTipConfig:()=>l.value,updateRxToolTipConfig:n}}(e,r,s),{handleOpenRxDatePicker:d}=((e,r,l)=>{const n=g(),a=o.useDebounceFn((()=>{n.handleSearchCallBack()}),1e3);return t.watch((()=>r.useSearchValue),(()=>{t.nextTick((()=>{e(),a()}))}),{deep:!0}),{handleOpenRxDatePicker:function(){t.nextTick((()=>{l.value.rxDatePickerRef.focus()}))}}})(m,e,i);return{useSearchValueLocal:n,rxDatePickerRef:c,datePickerFormat:p,rxFormItemRef:s,rxDatePickerComponentsRef:i,getRxToolTipConfig:u,handleOpenRxDatePicker:d,isEmpty:a.isEmpty}}});const D={ref:"rxFormItemRef",class:"rounded-[4px] px-[8px] py-[5px] group hover:bg-[#F5F6F7]"},I={class:"w-0 h-0 overflow-hidden",ref:"rxDatePickerRef"},O={class:"text-[14px] leading-[22px] text-[#8B9199]"};E.render=function(e,o,r,l,n,a){const c=t.resolveComponent("RxDatePicker"),i=t.resolveComponent("Calendar"),s=t.resolveComponent("el-icon"),p=t.resolveComponent("RxScrollbar"),u=t.resolveComponent("RxTooltip");return t.openBlock(),t.createElementBlock("div",D,[t.createVNode(u,t.normalizeProps(t.guardReactiveProps(e.getRxToolTipConfig())),{default:t.withCtx((()=>[t.createElementVNode("div",{class:"flex items-center space-x-1 cursor-pointer",onClick:o[1]||(o[1]=(...t)=>e.handleOpenRxDatePicker&&e.handleOpenRxDatePicker(...t))},[t.createCommentVNode(" 隐藏控件 "),t.createElementVNode("div",I,[t.createVNode(c,t.mergeProps({ref:"rxDatePickerComponentsRef",modelValue:e.useSearchValueLocal,"onUpdate:modelValue":o[0]||(o[0]=t=>e.useSearchValueLocal=t)},{...e.$attrs,...e.$props,...e.$props.rxDatePickerOptions}),null,16,["modelValue"])],512),t.createCommentVNode(" 值 "),e.isEmpty(e.useSearchValue)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createCommentVNode(" 标题 "),t.createElementVNode("p",O,t.toDisplayString(e.$attrs.label),1),t.createVNode(s,{color:"#5C6781"},{default:t.withCtx((()=>[t.createVNode(i)])),_:1})],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("p",{class:t.normalizeClass(["text-[14px] leading-[22px] text-[#0F1114] group-hover:text-[#3370FF]",e.rxOutSideStyleCustom])},t.toDisplayString(e.datePickerFormat),3),t.createVNode(s,{class:"text-[14px] leading-[22px] text-[#0F1114] group-hover:text-[#3370FF]",color:"#0F1114"},{default:t.withCtx((()=>[t.createVNode(i)])),_:1})],64))])])),content:t.withCtx((()=>[t.createElementVNode("div",{style:t.normalizeStyle(e.getRxToolTipConfig().style)},[t.createVNode(p,{"max-height":e.getRxToolTipConfig().style.maxHeight},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.datePickerFormat),1)])),_:1},8,["max-height"])],4)])),_:1},16)],512)},E.__file="packages/components/RxFormPlusBeta/src/components/formDatePicker/index.vue";const _=new Map;function L(e,t){_.set(e,t)}L("RxFormPlusInput",h),L("RxFormPlusSelect",V),L("RxFormPlusDatePicker",E);var $={add:L,del:function(e){_.delete(e)},get:function(e){return e&&_.get(e)||e}},A=t.defineComponent({name:"FormComponent",props:m,setup(e,{emit:r}){const l=$.get(e.component),n=o.useVModel(e,"useSearchValue",r);return{componentLocal:l,componentPropsLocal:t.computed((()=>e.componentProps)),useSearchValueLocal:n}}});A.render=function(e,o,r,l,n,a){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.componentLocal),t.normalizeProps(t.guardReactiveProps({...e.$attrs,...e.$props,...e.componentPropsLocal})),null,16)},A.__file="packages/components/RxFormPlusBeta/src/components/formComponent/index.vue";var j=t.defineComponent({name:"RxFormPlusBeta",components:{FormComponent:A},props:u,emits:["handleSearch"],setup(e,{emit:t,expose:o}){const r=()=>t("handleSearch",e);return f({handleSearchCallBack:r}),o({handleSearchCallBack:r}),{}}});const H={class:"flex items-center space-x-2"};j.render=function(e,o,r,l,n,a){const c=t.resolveComponent("form-component");return t.openBlock(),t.createElementBlock("div",H,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,((e,o)=>(t.openBlock(),t.createElementBlock("div",{key:o},[t.createVNode(c,t.mergeProps(e,{useSearchValue:e.useSearchValue,"onUpdate:useSearchValue":t=>e.useSearchValue=t}),null,16,["useSearchValue","onUpdate:useSearchValue"])])))),128))])},j.__file="packages/components/RxFormPlusBeta/src/RxFormPlusBeta.vue";const q=e.withInstall(j);exports.RxFormPlusBeta=q,exports.default=q;
@@ -3,12 +3,14 @@ declare const _default: import("vue").DefineComponent<{
3
3
  type: ArrayConstructor;
4
4
  default: any[];
5
5
  };
6
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
6
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "handleSearch"[], "handleSearch", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
7
7
  columns: {
8
8
  type: ArrayConstructor;
9
9
  default: any[];
10
10
  };
11
- }>>, {
11
+ }>> & {
12
+ onHandleSearch?: (...args: any[]) => any;
13
+ }, {
12
14
  columns: unknown[];
13
15
  }>;
14
16
  export default _default;
@@ -1,2 +1,3 @@
1
1
  import { Ref } from 'vue';
2
- export declare const useController: (updateRxToolTipConfig: Function, setClickRef: Function, rxInputRef: any, clickRef: Ref<boolean>) => {};
2
+ import type { RxFormInputPropsType } from '../props';
3
+ export declare const useController: (updateRxToolTipConfig: Function, setClickRef: Function, rxInputRef: any, clickRef: Ref<boolean>, props: RxFormInputPropsType) => {};
@@ -0,0 +1,10 @@
1
+ import { InjectionKey } from 'vue';
2
+ export interface CreateContextOptions {
3
+ readonly?: boolean;
4
+ createProvider?: boolean;
5
+ native?: boolean;
6
+ }
7
+ export declare function createContext<T>(context: any, key?: InjectionKey<T>, options?: CreateContextOptions): {
8
+ state: any;
9
+ };
10
+ export declare function useContext<T>(key: InjectionKey<T>, native?: boolean): T;
@@ -0,0 +1,4 @@
1
+ export declare function createFormPlusBetaProviderContext(context: any): {
2
+ state: any;
3
+ };
4
+ export declare function useFormPlusBetaProviderContext(): any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rx-compo",
3
- "version": "1.0.73",
3
+ "version": "1.0.74",
4
4
  "private": false,
5
5
  "description": "components for ruixue",
6
6
  "main": "lib/index.js",