1- import { defineComponent , pushScopeId , popScopeId , openBlock , createBlock , Fragment , renderList , createVNode , createCommentVNode , withScopeId , Text , resolveComponent , withDirectives , renderSlot , vShow , resolveDynamicComponent , createTextVNode , toDisplayString } from 'vue' ;
1+ import { defineComponent , pushScopeId , popScopeId , openBlock , createElementBlock , Fragment , renderList , createElementVNode , createCommentVNode , Text , resolveComponent , withDirectives , normalizeStyle , renderSlot , normalizeProps , guardReactiveProps , createVNode , vShow , createBlock , resolveDynamicComponent , createTextVNode , toDisplayString } from 'vue' ;
22
33function E ( ) {
44 // Keep this empty so it's easier to inherit from
@@ -70,11 +70,13 @@ tinyEmitter.TinyEmitter = TinyEmitter;
7070
7171var instance = new tinyEmitter ( ) ;
7272
73+ var emitter = instance ;
74+
7375var eventHub = {
74- $on : ( ...args ) => instance . on ( ...args ) ,
75- $once : ( ...args ) => instance . once ( ...args ) ,
76- $off : ( ...args ) => instance . off ( ...args ) ,
77- $emit : ( ...args ) => instance . emit ( ...args )
76+ $on : ( ...args ) => emitter . on ( ...args ) ,
77+ $once : ( ...args ) => emitter . once ( ...args ) ,
78+ $off : ( ...args ) => emitter . off ( ...args ) ,
79+ $emit : ( ...args ) => emitter . emit ( ...args )
7880} ;
7981
8082const SPINNERS = [ 'bubbles' , 'circles' , 'spiral' , 'wavedots' ] ;
@@ -89,8 +91,6 @@ var script$1 = /* #__PURE__ */defineComponent({
8991 }
9092} ) ;
9193
92- const _withId$1 = /*#__PURE__*/ withScopeId ( "data-v-18ae5a62" ) ;
93-
9494pushScopeId ( "data-v-18ae5a62" ) ;
9595
9696const _hoisted_1$1 = {
@@ -101,7 +101,7 @@ const _hoisted_2$1 = {
101101 key : 1 ,
102102 class : "loading-bubbles"
103103} ;
104- const _hoisted_3 = {
104+ const _hoisted_3$1 = {
105105 key : 2 ,
106106 class : "loading-circles"
107107} ;
@@ -116,24 +116,24 @@ const _hoisted_5 = {
116116
117117popScopeId ( ) ;
118118
119- const render$1 = /*#__PURE__*/ _withId$1 ( ( _ctx , _cache , $props , $setup , $data , $options ) => {
120- return _ctx . spinnerView === 'default' ? ( openBlock ( ) , createBlock ( "i" , _hoisted_1$1 ) ) : _ctx . spinnerView === 'bubbles' ? ( openBlock ( ) , createBlock ( "span" , _hoisted_2$1 , [ ( openBlock ( ) , createBlock ( Fragment , null , renderList ( 8 , x => {
121- return createVNode ( "span" , {
119+ function render$1 ( _ctx , _cache , $props , $setup , $data , $options ) {
120+ return _ctx . spinnerView === 'default' ? ( openBlock ( ) , createElementBlock ( "i" , _hoisted_1$1 ) ) : _ctx . spinnerView === 'bubbles' ? ( openBlock ( ) , createElementBlock ( "span" , _hoisted_2$1 , [ ( openBlock ( ) , createElementBlock ( Fragment , null , renderList ( 8 , x => {
121+ return createElementVNode ( "span" , {
122122 class : "bubble-item" ,
123123 key : x
124124 } ) ;
125- } ) , 64 ) ) ] ) ) : _ctx . spinnerView === 'circles' ? ( openBlock ( ) , createBlock ( "span" , _hoisted_3 , [ ( openBlock ( ) , createBlock ( Fragment , null , renderList ( 8 , x => {
126- return createVNode ( "span" , {
125+ } ) , 64 ) ) ] ) ) : _ctx . spinnerView === 'circles' ? ( openBlock ( ) , createElementBlock ( "span" , _hoisted_3$1 , [ ( openBlock ( ) , createElementBlock ( Fragment , null , renderList ( 8 , x => {
126+ return createElementVNode ( "span" , {
127127 class : "circle-item" ,
128128 key : x
129129 } ) ;
130- } ) , 64 ) ) ] ) ) : _ctx . spinnerView === 'spiral' ? ( openBlock ( ) , createBlock ( "i" , _hoisted_4 ) ) : _ctx . spinnerView === 'wavedots' ? ( openBlock ( ) , createBlock ( "span" , _hoisted_5 , [ ( openBlock ( ) , createBlock ( Fragment , null , renderList ( 5 , x => {
131- return createVNode ( "span" , {
130+ } ) , 64 ) ) ] ) ) : _ctx . spinnerView === 'spiral' ? ( openBlock ( ) , createElementBlock ( "i" , _hoisted_4 ) ) : _ctx . spinnerView === 'wavedots' ? ( openBlock ( ) , createElementBlock ( "span" , _hoisted_5 , [ ( openBlock ( ) , createElementBlock ( Fragment , null , renderList ( 5 , x => {
131+ return createElementVNode ( "span" , {
132132 class : "wave-item" ,
133133 key : x
134134 } ) ;
135135 } ) , 64 ) ) ] ) ) : createCommentVNode ( "" , true ) ;
136- } ) ;
136+ }
137137
138138function styleInject ( css , ref ) {
139139 if ( ref === void 0 ) ref = { } ;
@@ -446,8 +446,7 @@ var script = /* #__PURE__ */defineComponent({
446446 const name = kebabCase ( key ) ;
447447
448448 if ( // no slot and the configured default slot is not a Vue component
449- ! this . $slots [ name ] && ! config . slots [ key ] . render || // has slot and slot is pure text node
450- this . $slots [ name ] && this . $slots [ name ] ( ) [ 0 ] . type === Text ) {
449+ ! this . $slots [ name ] && ! config . slots [ key ] . render || this . $slots [ name ] && this . $slots [ name ] ( ) [ 0 ] . type === Text ) {
451450 // only apply default styles for pure text slot
452451 styles [ key ] = SLOT_STYLES ;
453452 }
@@ -681,58 +680,58 @@ var script = /* #__PURE__ */defineComponent({
681680
682681} ) ;
683682
684- const _withId = /*#__PURE__*/ withScopeId ( "data-v-ce57e962" ) ;
685-
686683pushScopeId ( "data-v-ce57e962" ) ;
687684
688685const _hoisted_1 = {
689686 class : "infinite-loading-container"
690687} ;
691688
692- const _hoisted_2 = /*#__PURE__*/ createVNode ( "br" , null , null , - 1 ) ;
689+ const _hoisted_2 = /*#__PURE__*/ createElementVNode ( "br" , null , null , - 1 ) ;
690+
691+ const _hoisted_3 = [ "textContent" ] ;
693692
694693popScopeId ( ) ;
695694
696- const render = /*#__PURE__*/ _withId ( ( _ctx , _cache , $props , $setup , $data , $options ) => {
695+ function render ( _ctx , _cache , $props , $setup , $data , $options ) {
697696 const _component_spinner = resolveComponent ( "spinner" ) ;
698697
699- return openBlock ( ) , createBlock ( "div" , _hoisted_1 , [ withDirectives ( createVNode ( "div" , {
698+ return openBlock ( ) , createElementBlock ( "div" , _hoisted_1 , [ withDirectives ( createElementVNode ( "div" , {
700699 class : "infinite-status-prompt" ,
701- style : _ctx . slotStyles . spinner
702- } , [ renderSlot ( _ctx . $slots , "spinner" , {
700+ style : normalizeStyle ( _ctx . slotStyles . spinner )
701+ } , [ renderSlot ( _ctx . $slots , "spinner" , normalizeProps ( guardReactiveProps ( {
703702 isFirstLoad : _ctx . isFirstLoad
704- } , ( ) => [ createVNode ( _component_spinner , {
703+ } ) ) , ( ) => [ createVNode ( _component_spinner , {
705704 spinner : _ctx . spinner
706- } , null , 8 , [ "spinner" ] ) ] ) ] , 4 ) , [ [ vShow , _ctx . isShowSpinner ] ] ) , withDirectives ( createVNode ( "div" , {
705+ } , null , 8 , [ "spinner" ] ) ] ) ] , 4 ) , [ [ vShow , _ctx . isShowSpinner ] ] ) , withDirectives ( createElementVNode ( "div" , {
707706 class : "infinite-status-prompt" ,
708- style : _ctx . slotStyles . noResults
707+ style : normalizeStyle ( _ctx . slotStyles . noResults )
709708 } , [ renderSlot ( _ctx . $slots , "no-results" , { } , ( ) => [ _ctx . slots . noResults . render ? ( openBlock ( ) , createBlock ( resolveDynamicComponent ( _ctx . slots . noResults ) , {
710709 key : 0
711- } ) ) : ( openBlock ( ) , createBlock ( Fragment , {
710+ } ) ) : ( openBlock ( ) , createElementBlock ( Fragment , {
712711 key : 1
713- } , [ createTextVNode ( toDisplayString ( _ctx . slots . noResults ) , 1 ) ] , 64 ) ) ] ) ] , 4 ) , [ [ vShow , _ctx . isShowNoResults ] ] ) , withDirectives ( createVNode ( "div" , {
712+ } , [ createTextVNode ( toDisplayString ( _ctx . slots . noResults ) , 1 ) ] , 64 ) ) ] ) ] , 4 ) , [ [ vShow , _ctx . isShowNoResults ] ] ) , withDirectives ( createElementVNode ( "div" , {
714713 class : "infinite-status-prompt" ,
715- style : _ctx . slotStyles . noMore
714+ style : normalizeStyle ( _ctx . slotStyles . noMore )
716715 } , [ renderSlot ( _ctx . $slots , "no-more" , { } , ( ) => [ _ctx . slots . noMore . render ? ( openBlock ( ) , createBlock ( resolveDynamicComponent ( _ctx . slots . noMore ) , {
717716 key : 0
718- } ) ) : ( openBlock ( ) , createBlock ( Fragment , {
717+ } ) ) : ( openBlock ( ) , createElementBlock ( Fragment , {
719718 key : 1
720- } , [ createTextVNode ( toDisplayString ( _ctx . slots . noMore ) , 1 ) ] , 64 ) ) ] ) ] , 4 ) , [ [ vShow , _ctx . isShowNoMore ] ] ) , withDirectives ( createVNode ( "div" , {
719+ } , [ createTextVNode ( toDisplayString ( _ctx . slots . noMore ) , 1 ) ] , 64 ) ) ] ) ] , 4 ) , [ [ vShow , _ctx . isShowNoMore ] ] ) , withDirectives ( createElementVNode ( "div" , {
721720 class : "infinite-status-prompt" ,
722- style : _ctx . slotStyles . error
721+ style : normalizeStyle ( _ctx . slotStyles . error )
723722 } , [ renderSlot ( _ctx . $slots , "error" , {
724723 trigger : _ctx . attemptLoad
725724 } , ( ) => [ _ctx . slots . error . render ? ( openBlock ( ) , createBlock ( resolveDynamicComponent ( _ctx . slots . error ) , {
726725 key : 0 ,
727726 trigger : _ctx . attemptLoad
728- } , null , 8 , [ "trigger" ] ) ) : ( openBlock ( ) , createBlock ( Fragment , {
727+ } , null , 8 , [ "trigger" ] ) ) : ( openBlock ( ) , createElementBlock ( Fragment , {
729728 key : 1
730- } , [ createTextVNode ( toDisplayString ( _ctx . slots . error ) + " " , 1 ) , _hoisted_2 , createVNode ( "button" , {
729+ } , [ createTextVNode ( toDisplayString ( _ctx . slots . error ) + " " , 1 ) , _hoisted_2 , createElementVNode ( "button" , {
731730 class : "btn-try-infinite" ,
732- onClick : _cache [ 1 ] || ( _cache [ 1 ] = ( ...args ) => _ctx . attemptLoad && _ctx . attemptLoad ( ...args ) ) ,
731+ onClick : _cache [ 0 ] || ( _cache [ 0 ] = ( ...args ) => _ctx . attemptLoad && _ctx . attemptLoad ( ...args ) ) ,
733732 textContent : toDisplayString ( _ctx . slots . errorBtnText )
734- } , null , 8 , [ "textContent" ] ) ] , 64 ) ) ] ) ] , 4 ) , [ [ vShow , _ctx . isShowError ] ] ) ] ) ;
735- } ) ;
733+ } , null , 8 , _hoisted_3 ) ] , 64 ) ) ] ) ] , 4 ) , [ [ vShow , _ctx . isShowError ] ] ) ] ) ;
734+ }
736735
737736var css_248z = ".infinite-loading-container[data-v-ce57e962] {\n clear: both;\n text-align: center;\n}\n.infinite-loading-container[data-v-ce57e962] *[class^=loading-] {\n display: inline-block;\n margin: 5px 0;\n width: 28px;\n height: 28px;\n font-size: 28px;\n line-height: 28px;\n border-radius: 50%;\n}\n.btn-try-infinite[data-v-ce57e962] {\n margin-top: 5px;\n padding: 5px 10px;\n color: #999;\n font-size: 14px;\n line-height: 1;\n background: transparent;\n border: 1px solid #ccc;\n border-radius: 3px;\n outline: none;\n cursor: pointer;\n}\n.btn-try-infinite[data-v-ce57e962]:not(:active):hover {\n opacity: 0.8;\n}\n" ;
738737styleInject ( css_248z ) ;
@@ -757,4 +756,4 @@ var entry_esm = /* #__PURE__ */(() => {
757756// also be used as directives, etc. - eg. import { RollupDemoDirective } from 'rollup-demo';
758757// export const RollupDemoDirective = directive;
759758
760- export default entry_esm ;
759+ export { entry_esm as default } ;
0 commit comments