File tree Expand file tree Collapse file tree 6 files changed +26
-24
lines changed Expand file tree Collapse file tree 6 files changed +26
-24
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,8 @@ export default {
44
44
const child = defaultSlots [ i ] ;
45
45
let isRoot ;
46
46
if ( process . env . COMPILER === 'react' ) {
47
- const tag = child . type && child . type . name ;
48
- if ( tag === 'F7FabButtons' ) isRoot = true ;
47
+ const tag = child . type && ( child . type . displayName || child . type . name ) ;
48
+ if ( tag === 'F7FabButtons' || tag === 'f7-fab-buttons' ) isRoot = true ;
49
49
}
50
50
if ( process . env . COMPILER === 'vue' ) {
51
51
if ( child . tag && child . tag . indexOf ( 'fab-buttons' ) >= 0 ) isRoot = true ;
Original file line number Diff line number Diff line change @@ -123,13 +123,13 @@ export default {
123
123
flattenSlots . forEach ( ( child ) => {
124
124
if ( typeof child === 'undefined' ) return ;
125
125
if ( process . env . COMPILER === 'react' ) {
126
- const tag = child . type && child . type . name ;
127
- if ( tag === 'F7Input' ) {
126
+ const tag = child . type && ( child . type . displayName || child . type . name ) ;
127
+ if ( tag === 'F7Input' || tag === 'f7-input' ) {
128
128
hasInput = true ;
129
129
if ( child . props && child . props . info ) hasInputInfo = true ;
130
130
if ( child . props && child . props . errorMessage && child . props . errorMessageForce ) hasInputErrorMessage = true ;
131
131
}
132
- if ( tag === 'F7Label' ) {
132
+ if ( tag === 'F7Label' || tag === 'f7-label' ) {
133
133
if ( child . props && child . props . inline ) hasInlineLabel = true ;
134
134
}
135
135
}
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ export default {
57
57
if ( typeof child === 'undefined' ) return ;
58
58
let tag ;
59
59
if ( process . env . COMPILER === 'react' ) {
60
- tag = child . type && child . type . name ;
60
+ tag = child . type && ( child . type . displayName || child . type . name ) ;
61
61
if ( ! tag && typeof child . type === 'string' ) {
62
62
tag = child . type ;
63
63
}
@@ -67,13 +67,15 @@ export default {
67
67
}
68
68
69
69
if (
70
- ( ! tag && process . env . COMPILER === 'react' ) ||
71
- ( tag && ! (
72
- tag === 'li' ||
73
- tag === 'F7ListItem' ||
74
- tag === 'F7ListButton' ||
75
- tag . indexOf ( 'list-item' ) >= 0 ||
76
- tag . indexOf ( 'list-button' ) >= 0
70
+ ( ! tag && process . env . COMPILER === 'react' )
71
+ || ( tag && ! (
72
+ tag === 'li'
73
+ || tag === 'F7ListItem'
74
+ || tag === 'F7ListButton'
75
+ || tag . indexOf ( 'list-item' ) >= 0
76
+ || tag . indexOf ( 'list-button' ) >= 0
77
+ || tag . indexOf ( 'f7-list-item' ) >= 0
78
+ || tag . indexOf ( 'f7-list-button' ) >= 0
77
79
) )
78
80
) {
79
81
if ( wasUlChild ) rootChildrenAfterList . push ( child ) ;
Original file line number Diff line number Diff line change @@ -88,11 +88,11 @@ export default {
88
88
if ( typeof child === 'undefined' ) return ;
89
89
let tag ;
90
90
tag = child . tag ; // phenome-vue-line
91
- tag = child . type && child . type . name ; // phenome-react-line
91
+ tag = child . type && ( child . type . displayName || child . type . name ) ; // phenome-react-line
92
92
93
- if ( tag && ( tag . indexOf ( 'messagebar-attachments' ) >= 0 || tag === 'F7MessagebarAttachments' ) ) {
93
+ if ( tag && ( tag . indexOf ( 'messagebar-attachments' ) >= 0 || tag === 'F7MessagebarAttachments' || tag === 'f7-messagebar-attachments' ) ) {
94
94
messagebarAttachmentsEl = child ;
95
- } else if ( tag && ( tag . indexOf ( 'messagebar-sheet' ) >= 0 || tag === 'F7MessagebarSheet' ) ) {
95
+ } else if ( tag && ( tag . indexOf ( 'messagebar-sheet' ) >= 0 || tag === 'F7MessagebarSheet' || tag === 'f7-messagebar-sheet' ) ) {
96
96
messagebarSheetEl = child ;
97
97
} else {
98
98
innerEndEls . push ( child ) ;
@@ -125,11 +125,11 @@ export default {
125
125
/>
126
126
{ slotsAfterArea }
127
127
</ div >
128
- { ( ( sendLink && sendLink . length > 0 ) || slotsSendLink ) &&
128
+ { ( ( sendLink && sendLink . length > 0 ) || slotsSendLink ) && (
129
129
< F7Link onClick = { self . onClickBound } >
130
130
{ slotsSendLink || sendLink }
131
131
</ F7Link >
132
- }
132
+ ) }
133
133
{ slotsInnerEnd }
134
134
{ innerEndEls }
135
135
</ div >
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ export default {
84
84
// phenome-vue-next-line
85
85
fixedTags = ( 'navbar toolbar tabbar subnavbar searchbar messagebar fab list-index' ) . split ( ' ' ) ;
86
86
// phenome-react-next-line
87
- fixedTags = ( 'Navbar Toolbar Tabbar Subnavbar Searchbar Messagebar Fab ListIndex ' ) . split ( ' ' ) . map ( tagName => `F7 ${ tagName } ` ) ;
87
+ fixedTags = ( 'navbar toolbar tabbar subnavbar searchbar messagebar fab list-index ' ) . split ( ' ' ) . map ( tagName => `f7- ${ tagName } ` ) ;
88
88
89
89
let hasSubnavbar ;
90
90
let hasMessages ;
@@ -96,13 +96,13 @@ export default {
96
96
if ( typeof child === 'undefined' ) return ;
97
97
let isFixedTag = false ;
98
98
if ( process . env . COMPILER === 'react' ) {
99
- const tag = child . type && child . type . name ;
99
+ const tag = child . type && ( child . type . displayName || child . type . name ) ;
100
100
if ( ! tag ) {
101
101
if ( needsPageContent ) staticList . push ( child ) ;
102
102
return ;
103
103
}
104
- if ( tag === 'F7Subnavbar' ) hasSubnavbar = true ;
105
- if ( typeof hasMessages === 'undefined' && tag === 'F7Messages' ) hasMessages = true ;
104
+ if ( tag === 'F7Subnavbar' || tag === 'f7-subnavbar' ) hasSubnavbar = true ;
105
+ if ( typeof hasMessages === 'undefined' && ( tag === 'F7Messages' || tag === 'f7-messages' ) ) hasMessages = true ;
106
106
if ( fixedTags . indexOf ( tag ) >= 0 ) {
107
107
isFixedTag = true ;
108
108
}
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export default {
24
24
// phenome-vue-next-line
25
25
fixedTags = ( 'navbar toolbar tabbar subnavbar searchbar messagebar fab list-index' ) . split ( ' ' ) ;
26
26
// phenome-react-next-line
27
- fixedTags = ( 'Navbar Toolbar Tabbar Subnavbar Searchbar Messagebar Fab ListIndex ' ) . split ( ' ' ) . map ( tagName => `F7 ${ tagName } ` ) ;
27
+ fixedTags = ( 'navbar toolbar tabbar subnavbar searchbar messagebar fab list-index ' ) . split ( ' ' ) . map ( tagName => `f7- ${ tagName } ` ) ;
28
28
29
29
const slotsDefault = self . slots . default ;
30
30
@@ -33,7 +33,7 @@ export default {
33
33
if ( typeof child === 'undefined' ) return ;
34
34
let isFixedTag = false ;
35
35
if ( process . env . COMPILER === 'react' ) {
36
- const tag = child . type && child . type . name ;
36
+ const tag = child . type && ( child . type . displayName || child . type . name ) ;
37
37
if ( ! tag ) {
38
38
return ;
39
39
}
You can’t perform that action at this time.
0 commit comments