1
1
import { SeriesPoint } from '@visx/shape/lib/types' ;
2
2
3
- // PerformanceVisx types
4
-
3
+ export interface ActionObj {
4
+ name : string ;
5
+ seriesName : string ;
6
+ currentTab : string ;
7
+ }
5
8
export interface Series {
6
9
data : {
7
10
barStack : ActionObj [ ] ;
8
11
} ;
9
12
name : string ;
10
13
}
11
14
12
- // interface Event {
13
- // target: EventTarget
14
- // }
15
-
16
- // interface EventTarget {
17
- // x: WithParentSizeProvidedProps,
18
- // y: OptionalKeys,
19
- // value?: idk
20
- // }
21
-
22
- export interface ActionObj {
23
- name : string ;
24
- seriesName : string ;
25
- currentTab : string ;
26
- }
27
-
28
15
export interface PerfData {
29
16
barStack : BarStackProp [ ] ;
30
17
componentData ?: Record < string , unknown > ;
31
18
maxTotalRender : number ;
32
19
}
33
20
21
+ export interface PerformanceVisxProps {
22
+ width : number ;
23
+ height : number ;
24
+ snapshots : [ ] ;
25
+ hierarchy : any ;
26
+ }
27
+
28
+ export interface TreeProps {
29
+ snapshot : {
30
+ name ?: string ;
31
+ componentData ?: object ;
32
+ state ?: string | object ;
33
+ stateSnaphot ?: object ;
34
+ children ?: any [ ] ;
35
+ } ;
36
+ }
37
+
34
38
export interface BarStackProp {
35
39
snapshotId : string ;
36
40
route : string ;
@@ -96,7 +100,7 @@ export interface BarGraphComparisonAction {
96
100
setAction : ( e : boolean | string ) => void ;
97
101
}
98
102
99
- interface StateContainerProps {
103
+ export interface StateContainerProps {
100
104
snapshot : Record <
101
105
number ,
102
106
{
@@ -128,4 +132,192 @@ export interface Obj {
128
132
branch : number ;
129
133
index : number ;
130
134
children ?: [ ] ;
135
+ }
136
+
137
+ export interface InitialStateProps {
138
+ port : null | number ;
139
+ currentTab : null | number ;
140
+ currentTitle : null | string ;
141
+ split : null | boolean ;
142
+ tabs : unknown ;
143
+ currentTabInApp : null | string ;
144
+ }
145
+
146
+ export interface DiffProps {
147
+ snapshot : { state ?: Record < string , unknown > } ;
148
+ show ?: boolean | undefined ;
149
+ }
150
+
151
+ /**
152
+ * @template ActionProps Props for the action component
153
+ */
154
+
155
+ export interface ActionProps {
156
+ key : string ;
157
+ selected : boolean ;
158
+ last : boolean ;
159
+ index : number ;
160
+ sliderIndex : number ;
161
+ dispatch : ( a : { type : string ; payload : unknown ; } ) => void ;
162
+ displayName : string ;
163
+ componentName : string ;
164
+ componentData : { actualDuration : number } | undefined ;
165
+ routePath : unknown ;
166
+ state ?: Record < string , unknown > ;
167
+ viewIndex : number | undefined ;
168
+ isCurrIndex : boolean ;
169
+ handleOnkeyDown : ( e : unknown , i : number ) => void ;
170
+ }
171
+
172
+ export interface DiffRouteProps {
173
+ snapshot : Record <
174
+ string ,
175
+ {
176
+ name ?: string ;
177
+ componentData ?: Record < string , unknown > ;
178
+ state ?: string | unknown ;
179
+ stateSnaphot ?: Record < string , unknown > ;
180
+ children ?: unknown [ ] ;
181
+ }
182
+ > ;
183
+ }
184
+
185
+ export interface HandleProps {
186
+ value : number ;
187
+ dragging : boolean ;
188
+ index : number ;
189
+ }
190
+
191
+ export interface MainSliderProps {
192
+ snapshotsLength : number ;
193
+ }
194
+
195
+ export interface DefaultMargin {
196
+ top : number ;
197
+ left : number ;
198
+ right : number ;
199
+ bottom : number ;
200
+ }
201
+
202
+ export interface StateRouteProps {
203
+ snapshot : {
204
+ name ?: string ;
205
+ componentData ?: object ;
206
+ state ?: string | object ;
207
+ stateSnaphot ?: object ;
208
+ children ?: any [ ] ;
209
+ } ;
210
+ hierarchy : any ;
211
+ snapshots : [ ] ;
212
+ viewIndex : number ;
213
+ webMetrics : object ;
214
+ currLocation : object ;
215
+ }
216
+
217
+ export interface DropdownProps {
218
+ selectedSpeed : { value : number ; label : string } ;
219
+ speeds : { value : number ; label : string } [ ] ;
220
+ setSpeed : ( ) => void ;
221
+ }
222
+
223
+ export interface TutorialProps {
224
+ dispatch : ( object ) => void ;
225
+ currentTabInApp : string ;
226
+ }
227
+
228
+ export interface TutorialState {
229
+ stepsEnabled : boolean ;
230
+ }
231
+
232
+ export interface StepsObj {
233
+ title : string ;
234
+ element ?: string ;
235
+ intro : string ;
236
+ position : string ;
237
+ }
238
+
239
+ export interface LinkControlProps {
240
+ layout : string ;
241
+ orientation : string ;
242
+ linkType : string ;
243
+ stepPercent : number ;
244
+ selectedNode : string ;
245
+ setLayout : ( layout : string ) => void ;
246
+ setOrientation : ( orientation : string ) => void ;
247
+ setLinkType : ( linkType : string ) => void ;
248
+ setStepPercent : ( percent : number ) => void ;
249
+ setSelectedNode : ( selectedNode : string ) => void ;
250
+ snapShots : Record < string , unknown > ;
251
+ } ;
252
+
253
+ export interface ControlStyles {
254
+ fontSize : string ;
255
+ padding : string ;
256
+ }
257
+
258
+ export interface DropDownStyle {
259
+ margin : string ;
260
+ fontSize : string ;
261
+ fontFamily : string ;
262
+ borderRadius : string ;
263
+ borderStyle : string ;
264
+ borderWidth : string ;
265
+ backgroundColor : string ;
266
+ color : string ;
267
+ padding : string ;
268
+ }
269
+
270
+ export interface Node {
271
+ children ?: Node [ ] ;
272
+ name ?: string
273
+ // other properties here
274
+ }
275
+
276
+ export interface LinkComponent {
277
+ layout : string ;
278
+ linkType : string ;
279
+ orientation : string ;
280
+ }
281
+
282
+ export interface LinkTypesProps {
283
+ width : number ;
284
+ height : number ;
285
+ margin ?: { top : number ; right : number ; bottom : number ; left : number } ;
286
+ snapshots : Record < string , unknown > ;
287
+ currentSnapshot ?: Record < string , unknown > ;
288
+ } ;
289
+
290
+ export interface ToolTipStyles {
291
+ defaultStyles : React . CSSProperties ;
292
+ minWidth : number ;
293
+ maxWidth : number ;
294
+ backgroundColor : string ;
295
+ color : string ;
296
+ fontSize : string ;
297
+ lineHeight : string ;
298
+ fontFamily : string ;
299
+ zIndex : number ;
300
+ pointerEvents : string ;
301
+ }
302
+
303
+ export interface OptionsCursorTrueWithMargin {
304
+ followCursor : boolean ;
305
+ shiftX : number ;
306
+ shiftY : number ;
307
+ }
308
+
309
+ export interface StatelessCleanning {
310
+ name ?: string ;
311
+ componentData ?: Record < string , unknown > ;
312
+ state ?: string | { } ;
313
+ stateSnaphot ?: Record < string , unknown > ;
314
+ children ?: StatelessCleanning [ ] ;
315
+ }
316
+
317
+ export interface Snapshots {
318
+ snapshot : number ;
319
+ component1 : number ;
320
+ component2 : number ;
321
+ component3 : number ;
322
+ 'all others' : number ;
131
323
}
0 commit comments