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) {
34
34
}
35
35
36
36
//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
+ }
39
68
}
40
69
41
70
}
Original file line number Diff line number Diff line change 10
10
const acorn = require ( 'acorn' ) ;
11
11
const jsx = require ( 'acorn-jsx' ) ;
12
12
13
+
13
14
const JSXParser = acorn . Parser . extend ( jsx ( ) ) ;
14
15
15
16
/**
Original file line number Diff line number Diff line change 38
38
*
39
39
*/
40
40
41
+
42
+
41
43
declare module "reactime" {
42
44
function linkFiber (
43
45
container : HTMLElement ,
44
46
) : void ;
45
47
export = linkFiber ;
46
48
}
49
+
50
+
You can’t perform that action at this time.
0 commit comments