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' ;
2
2
3
3
function E ( ) {
4
4
// Keep this empty so it's easier to inherit from
@@ -70,11 +70,13 @@ tinyEmitter.TinyEmitter = TinyEmitter;
70
70
71
71
var instance = new tinyEmitter ( ) ;
72
72
73
+ var emitter = instance ;
74
+
73
75
var 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 )
78
80
} ;
79
81
80
82
const SPINNERS = [ 'bubbles' , 'circles' , 'spiral' , 'wavedots' ] ;
@@ -89,8 +91,6 @@ var script$1 = /* #__PURE__ */defineComponent({
89
91
}
90
92
} ) ;
91
93
92
- const _withId$1 = /*#__PURE__*/ withScopeId ( "data-v-18ae5a62" ) ;
93
-
94
94
pushScopeId ( "data-v-18ae5a62" ) ;
95
95
96
96
const _hoisted_1$1 = {
@@ -101,7 +101,7 @@ const _hoisted_2$1 = {
101
101
key : 1 ,
102
102
class : "loading-bubbles"
103
103
} ;
104
- const _hoisted_3 = {
104
+ const _hoisted_3$1 = {
105
105
key : 2 ,
106
106
class : "loading-circles"
107
107
} ;
@@ -116,24 +116,24 @@ const _hoisted_5 = {
116
116
117
117
popScopeId ( ) ;
118
118
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" , {
122
122
class : "bubble-item" ,
123
123
key : x
124
124
} ) ;
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" , {
127
127
class : "circle-item" ,
128
128
key : x
129
129
} ) ;
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" , {
132
132
class : "wave-item" ,
133
133
key : x
134
134
} ) ;
135
135
} ) , 64 ) ) ] ) ) : createCommentVNode ( "" , true ) ;
136
- } ) ;
136
+ }
137
137
138
138
function styleInject ( css , ref ) {
139
139
if ( ref === void 0 ) ref = { } ;
@@ -446,8 +446,7 @@ var script = /* #__PURE__ */defineComponent({
446
446
const name = kebabCase ( key ) ;
447
447
448
448
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 ) {
451
450
// only apply default styles for pure text slot
452
451
styles [ key ] = SLOT_STYLES ;
453
452
}
@@ -681,58 +680,58 @@ var script = /* #__PURE__ */defineComponent({
681
680
682
681
} ) ;
683
682
684
- const _withId = /*#__PURE__*/ withScopeId ( "data-v-ce57e962" ) ;
685
-
686
683
pushScopeId ( "data-v-ce57e962" ) ;
687
684
688
685
const _hoisted_1 = {
689
686
class : "infinite-loading-container"
690
687
} ;
691
688
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" ] ;
693
692
694
693
popScopeId ( ) ;
695
694
696
- const render = /*#__PURE__*/ _withId ( ( _ctx , _cache , $props , $setup , $data , $options ) => {
695
+ function render ( _ctx , _cache , $props , $setup , $data , $options ) {
697
696
const _component_spinner = resolveComponent ( "spinner" ) ;
698
697
699
- return openBlock ( ) , createBlock ( "div" , _hoisted_1 , [ withDirectives ( createVNode ( "div" , {
698
+ return openBlock ( ) , createElementBlock ( "div" , _hoisted_1 , [ withDirectives ( createElementVNode ( "div" , {
700
699
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 ( {
703
702
isFirstLoad : _ctx . isFirstLoad
704
- } , ( ) => [ createVNode ( _component_spinner , {
703
+ } ) ) , ( ) => [ createVNode ( _component_spinner , {
705
704
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" , {
707
706
class : "infinite-status-prompt" ,
708
- style : _ctx . slotStyles . noResults
707
+ style : normalizeStyle ( _ctx . slotStyles . noResults )
709
708
} , [ renderSlot ( _ctx . $slots , "no-results" , { } , ( ) => [ _ctx . slots . noResults . render ? ( openBlock ( ) , createBlock ( resolveDynamicComponent ( _ctx . slots . noResults ) , {
710
709
key : 0
711
- } ) ) : ( openBlock ( ) , createBlock ( Fragment , {
710
+ } ) ) : ( openBlock ( ) , createElementBlock ( Fragment , {
712
711
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" , {
714
713
class : "infinite-status-prompt" ,
715
- style : _ctx . slotStyles . noMore
714
+ style : normalizeStyle ( _ctx . slotStyles . noMore )
716
715
} , [ renderSlot ( _ctx . $slots , "no-more" , { } , ( ) => [ _ctx . slots . noMore . render ? ( openBlock ( ) , createBlock ( resolveDynamicComponent ( _ctx . slots . noMore ) , {
717
716
key : 0
718
- } ) ) : ( openBlock ( ) , createBlock ( Fragment , {
717
+ } ) ) : ( openBlock ( ) , createElementBlock ( Fragment , {
719
718
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" , {
721
720
class : "infinite-status-prompt" ,
722
- style : _ctx . slotStyles . error
721
+ style : normalizeStyle ( _ctx . slotStyles . error )
723
722
} , [ renderSlot ( _ctx . $slots , "error" , {
724
723
trigger : _ctx . attemptLoad
725
724
} , ( ) => [ _ctx . slots . error . render ? ( openBlock ( ) , createBlock ( resolveDynamicComponent ( _ctx . slots . error ) , {
726
725
key : 0 ,
727
726
trigger : _ctx . attemptLoad
728
- } , null , 8 , [ "trigger" ] ) ) : ( openBlock ( ) , createBlock ( Fragment , {
727
+ } , null , 8 , [ "trigger" ] ) ) : ( openBlock ( ) , createElementBlock ( Fragment , {
729
728
key : 1
730
- } , [ createTextVNode ( toDisplayString ( _ctx . slots . error ) + " " , 1 ) , _hoisted_2 , createVNode ( "button" , {
729
+ } , [ createTextVNode ( toDisplayString ( _ctx . slots . error ) + " " , 1 ) , _hoisted_2 , createElementVNode ( "button" , {
731
730
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 ) ) ,
733
732
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
+ }
736
735
737
736
var 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" ;
738
737
styleInject ( css_248z ) ;
@@ -757,4 +756,4 @@ var entry_esm = /* #__PURE__ */(() => {
757
756
// also be used as directives, etc. - eg. import { RollupDemoDirective } from 'rollup-demo';
758
757
// export const RollupDemoDirective = directive;
759
758
760
- export default entry_esm ;
759
+ export { entry_esm as default } ;
0 commit comments