File tree Expand file tree Collapse file tree 3 files changed +36
-2
lines changed
Expand file tree Collapse file tree 3 files changed +36
-2
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,37 @@ function clusterDataPopulate(props) {
3434 }
3535
3636 //we'll first handle AtomSelectors
37- if ( ! Object . entries ( props [ 0 ] . atomSelectors ) . length === 0 ) {
38-
37+ if ( Object . entries ( props [ 0 ] . atomSelectors ) . length !== 0 ) {
38+ if ( ! clusterData . children ) clusterData . children = [ ]
39+ for ( let key in props [ 0 ] . atomSelectors ) {
40+ let outerobj = { }
41+ outerobj . name = key
42+
43+ if ( props [ 0 ] . atomSelectors [ key ] . length ) {
44+ for ( let i = 0 ; i < props [ 0 ] . atomSelectors [ key ] . length ; i ++ ) {
45+ if ( ! outerobj . children ) outerobj . children = [ ]
46+ let innerobj = { }
47+ innerobj . name = props [ 0 ] . atomSelectors [ key ] [ i ]
48+
49+ //if atoms contain components
50+ if ( atomCompObj [ props [ 0 ] . atomSelectors [ key ] [ i ] ] ) {
51+ for ( let j = 0 ; j < atomCompObj [ props [ 0 ] . atomSelectors [ key ] [ i ] ] . length ; j ++ ) {
52+ if ( ! innerobj . children ) innerobj . children = [ ]
53+ innerobj . children . push ( { name :atomCompObj [ props [ 0 ] . atomSelectors [ key ] [ i ] ] } )
54+ }
55+ }
56+
57+ outerobj . children . push ( innerobj )
58+ //selector to component directly
59+ if ( atomCompObj [ key ] ) {
60+ outerobj . children . push ( { name :key } )
61+ }
62+
63+
64+ }
65+ }
66+
67+ }
3968 }
4069
4170}
Original file line number Diff line number Diff line change 1010const acorn = require ( 'acorn' ) ;
1111const jsx = require ( 'acorn-jsx' ) ;
1212
13+
1314const JSXParser = acorn . Parser . extend ( jsx ( ) ) ;
1415
1516/**
Original file line number Diff line number Diff line change 3838 *
3939 */
4040
41+
42+
4143declare module "reactime" {
4244 function linkFiber (
4345 container : HTMLElement ,
4446 ) : void ;
4547 export = linkFiber ;
4648}
49+
50+
You can’t perform that action at this time.
0 commit comments