@allurereport/web-components 3.0.0-beta.9 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.d.ts +608 -44
  3. package/dist/index.js +16 -14
  4. package/dist/index.js.map +1 -1
  5. package/dist/mixins.scss +8 -8
  6. package/package.json +62 -29
  7. package/dist/components/Button/index.d.ts +0 -29
  8. package/dist/components/Button/index.d.ts.map +0 -1
  9. package/dist/components/Counter/index.d.ts +0 -10
  10. package/dist/components/Counter/index.d.ts.map +0 -1
  11. package/dist/components/Label/index.d.ts +0 -3
  12. package/dist/components/Label/index.d.ts.map +0 -1
  13. package/dist/components/Link/index.d.ts +0 -9
  14. package/dist/components/Link/index.d.ts.map +0 -1
  15. package/dist/components/Loadable/index.d.ts +0 -16
  16. package/dist/components/Loadable/index.d.ts.map +0 -1
  17. package/dist/components/Menu/index.d.ts +0 -37
  18. package/dist/components/Menu/index.d.ts.map +0 -1
  19. package/dist/components/PageLoader/index.d.ts +0 -2
  20. package/dist/components/PageLoader/index.d.ts.map +0 -1
  21. package/dist/components/SearchBox/index.d.ts +0 -11
  22. package/dist/components/SearchBox/index.d.ts.map +0 -1
  23. package/dist/components/Spinner/index.d.ts +0 -5
  24. package/dist/components/Spinner/index.d.ts.map +0 -1
  25. package/dist/components/SuccessRatePieChart/index.d.ts +0 -13
  26. package/dist/components/SuccessRatePieChart/index.d.ts.map +0 -1
  27. package/dist/components/SvgIcon/index.d.ts +0 -65
  28. package/dist/components/SvgIcon/index.d.ts.map +0 -1
  29. package/dist/components/Toggle/index.d.ts +0 -9
  30. package/dist/components/Toggle/index.d.ts.map +0 -1
  31. package/dist/components/Tooltip/index.d.ts +0 -14
  32. package/dist/components/Tooltip/index.d.ts.map +0 -1
  33. package/dist/components/TrendChart/index.d.ts +0 -25
  34. package/dist/components/TrendChart/index.d.ts.map +0 -1
  35. package/dist/components/Typography/index.d.ts +0 -28
  36. package/dist/components/Typography/index.d.ts.map +0 -1
  37. package/dist/hooks/useDebouncedCallback.d.ts +0 -2
  38. package/dist/hooks/useDebouncedCallback.d.ts.map +0 -1
  39. package/dist/index.d.ts.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,17 +1,40 @@
1
1
  import * as preact from 'preact';
2
2
  import { JSX, FunctionalComponent, VNode, ComponentChildren, FunctionComponent } from 'preact';
3
3
  import { Signal } from '@preact/signals';
4
- import { TestStatus } from '@allurereport/core-api';
4
+ import { AttachmentTestStepResult, Statistic, TestStatus, TestStatusTransition, SeverityLevel, TestResult } from '@allurereport/core-api';
5
+ import { RecursiveTree, Status } from 'global';
6
+ import * as preact_compat from 'preact/compat';
7
+ import { HTMLAttributes, CSSProperties } from 'preact/compat';
8
+ import { Options } from 'sortablejs';
9
+ import { LangLocale, TreeMapTooltipAccessor } from '@allurereport/web-commons';
10
+ import { ChartMode, PieChartValues, TreeMapNode, ChartType, StabilityDistributionChartData, TestBaseGrowthDynamicsChartData, FBSUAgePyramidChartData, StatusTransitionsChartData, DurationsChartData, TrSeveritiesChartData, DurationDynamicsChartData } from '@allurereport/charts-api';
11
+ import { Serie as Serie$1 } from '@/components/Charts/TrendChart';
5
12
  import { AxisProps } from '@nivo/axes';
6
- import { LegendProps } from '@nivo/legends';
7
- import { LineSvgProps } from '@nivo/line';
8
- import { CSSProperties } from 'preact/compat';
13
+ import { Serie as Serie$2, Datum as Datum$1, LineSvgProps, Point } from '@nivo/line';
14
+ import { ScaleSymlogSpec, ScaleSpec } from '@nivo/scales';
15
+ import { Margin } from '@nivo/core';
16
+ import { LegendProps, AnchoredContinuousColorsLegendProps } from '@nivo/legends';
17
+ import { DefaultTreeMapDatum, TreeMapSvgProps } from '@nivo/treemap';
18
+ import { HeatMapDatum, DefaultHeatMapDatum, HeatMapSvgProps } from '@nivo/heatmap';
9
19
 
10
20
  declare const allureIcons: {
21
+ amazon: string;
11
22
  arrowsChevronDown: string;
23
+ azure: string;
24
+ bitbucket: string;
25
+ circleci: string;
26
+ draggable: string;
27
+ drone: string;
28
+ environment: string;
12
29
  github: string;
30
+ gitlab: string;
31
+ jenkins: string;
13
32
  lineAlertsAlertCircle: string;
33
+ lineAlertsFixed: string;
34
+ lineAlertsMalfunctioned: string;
35
+ lineAlertsNew: string;
14
36
  lineAlertsNotificationBox: string;
37
+ lineAlertsRegressed: string;
15
38
  lineArrowsChevronDown: string;
16
39
  lineArrowsChevronDownDouble: string;
17
40
  lineArrowsChevronRight: string;
@@ -24,6 +47,7 @@ declare const allureIcons: {
24
47
  lineArrowsSortLineDesc: string;
25
48
  lineArrowsSwitchVertical1: string;
26
49
  lineChartsBarChartSquare: string;
50
+ lineChartsTimeline: string;
27
51
  lineDevBug2: string;
28
52
  lineDevCodeSquare: string;
29
53
  lineDevDataflow3: string;
@@ -32,44 +56,58 @@ declare const allureIcons: {
32
56
  lineFilesFileAttachment2: string;
33
57
  lineFilesFolder: string;
34
58
  lineGeneralCheck: string;
59
+ lineGeneralCheckCircle: string;
35
60
  lineGeneralChecklist3: string;
36
61
  lineGeneralCopy3: string;
37
62
  lineGeneralDownloadCloud: string;
38
63
  lineGeneralEqual: string;
39
64
  lineGeneralEye: string;
65
+ lineGeneralHelpCircle: string;
40
66
  lineGeneralHomeLine: string;
67
+ lineGeneralInfoCircle: string;
41
68
  lineGeneralLink1: string;
42
69
  lineGeneralLinkExternal: string;
70
+ lineGeneralMinusCircle: string;
43
71
  lineGeneralSearchMd: string;
44
72
  lineGeneralSettings1: string;
73
+ lineGeneralXCircle: string;
45
74
  lineGeneralXClose: string;
46
75
  lineGeneralZap: string;
47
76
  lineHelpersFlag: string;
48
77
  lineHelpersPlayCircle: string;
49
78
  lineIconBomb2: string;
50
79
  lineImagesImage: string;
80
+ lineLayoutsColumn2: string;
81
+ lineLayoutsLayoutTop: string;
82
+ lineLayoutsMaximize2: string;
83
+ lineLayoutsMinimize2: string;
51
84
  lineSecurityKey: string;
52
85
  lineShapesDotCircle: string;
53
86
  lineShapesMoon: string;
54
87
  lineShapesSun: string;
88
+ lineShapesThemeAuto: string;
55
89
  lineTimeClockStopwatch: string;
90
+ playwrightLogo: string;
56
91
  reportLogo: string;
57
92
  solidAlertCircle: string;
58
93
  solidCheckCircle: string;
59
94
  solidHelpCircle: string;
60
95
  solidMinusCircle: string;
96
+ solidPlusCircle: string;
61
97
  solidXCircle: string;
62
98
  spinner: string;
99
+ testNew: string;
63
100
  view: string;
64
101
  viewOff: string;
65
102
  };
66
103
  type SvgIconProps = Omit<JSX.HTMLAttributes<SVGElement>, "className" | "id" | "size" | "inline"> & {
67
- size?: "xs" | "s" | "m";
68
- className?: string;
69
- id: string;
70
- inline?: boolean;
104
+ "size"?: "xs" | "s" | "m";
105
+ "className"?: string;
106
+ "id": string;
107
+ "inline"?: boolean;
108
+ "data-testid"?: string;
71
109
  };
72
- declare const SvgIcon: ({ id, size, inline, className }: SvgIconProps) => JSX.Element;
110
+ declare const SvgIcon: ({ id, size, inline, className, "data-testid": dataTestId, ...restProps }: SvgIconProps) => JSX.Element;
73
111
 
74
112
  type BaseBtnProps = {
75
113
  text?: string;
@@ -87,6 +125,8 @@ type BaseBtnProps = {
87
125
  isDisabled?: boolean;
88
126
  isActive?: boolean;
89
127
  focusable?: boolean;
128
+ href?: string;
129
+ target?: HTMLAnchorElement["target"];
90
130
  className?: string;
91
131
  dataTestId?: string;
92
132
  };
@@ -94,7 +134,7 @@ type ButtonProps = Omit<BaseBtnProps, "text" | "isIconButton" | "isDropdownButto
94
134
  declare const Button: (props: ButtonProps) => preact.JSX.Element;
95
135
  type IconButtonProps = Omit<BaseBtnProps, "text" | "icon" | "autoFocus" | "fullWidth" | "isIconButton" | "isDropdownButton"> & Pick<Required<BaseBtnProps>, "icon">;
96
136
  declare const IconButton: (props: IconButtonProps) => preact.JSX.Element;
97
- type DropdownButtonProps = Omit<BaseBtnProps, "type" | "autoFocus" | "isDropdownButton" | "isIconButton" | "text" | "icon" | "isActive"> & Pick<Required<BaseBtnProps>, "text"> & {
137
+ type DropdownButtonProps = Omit<BaseBtnProps, "type" | "autoFocus" | "isDropdownButton" | "isIconButton" | "text" | "isActive"> & Pick<Required<BaseBtnProps>, "text"> & {
98
138
  isExpanded?: boolean;
99
139
  };
100
140
  declare const DropdownButton: (props: DropdownButtonProps) => preact.JSX.Element;
@@ -132,14 +172,15 @@ type HeadingProps = {
132
172
  declare const Heading: FunctionalComponent<HeadingProps>;
133
173
 
134
174
  interface TooltipWrapperProps {
135
- tooltipText?: string;
136
- tooltipTextAfterClick?: string;
137
- tooltipComponent?: FunctionalComponent | VNode;
138
- children: VNode;
139
- placement?: "top" | "bottom" | "left" | "right";
140
- triggerMode?: "hover" | "click";
141
- autoHideDelay?: number;
142
- isTriggerActive?: boolean;
175
+ "tooltipText"?: string;
176
+ "tooltipTextAfterClick"?: string;
177
+ "tooltipComponent"?: FunctionalComponent | VNode;
178
+ "children": VNode;
179
+ "placement"?: "top" | "bottom" | "left" | "right";
180
+ "triggerMode"?: "hover" | "click";
181
+ "autoHideDelay"?: number;
182
+ "isTriggerActive"?: boolean;
183
+ "data-testid"?: string;
143
184
  }
144
185
  declare const TooltipWrapper: FunctionalComponent<TooltipWrapperProps>;
145
186
 
@@ -159,7 +200,7 @@ declare const Loadable: <T, K = T>(props: LoadableProps<T, K>) => JSX.Element |
159
200
 
160
201
  declare const PageLoader: () => preact.JSX.Element;
161
202
 
162
- type Props$4 = {
203
+ type Props$e = {
163
204
  placeholder?: string;
164
205
  invalid?: string;
165
206
  error?: string;
@@ -167,7 +208,7 @@ type Props$4 = {
167
208
  onChange: (value: string) => void;
168
209
  changeDebounce?: number;
169
210
  };
170
- declare const SearchBox: (props: Props$4) => preact.JSX.Element;
211
+ declare const SearchBox: (props: Props$e) => preact.JSX.Element;
171
212
 
172
213
  declare const Menu: {
173
214
  (props: {
@@ -198,62 +239,585 @@ type ItemProps = {
198
239
  closeMenuOnClick?: boolean;
199
240
  ariaLabel?: string;
200
241
  setIsOpened?: (isOpened: boolean) => void;
242
+ dataTestId?: string;
243
+ };
244
+
245
+ interface ArrowButtonProps {
246
+ isOpened?: boolean;
247
+ iconSize?: "m" | "xs" | "s";
248
+ buttonSize?: "m" | "xs" | "s";
249
+ className?: string;
250
+ icon?: string;
251
+ onClick?: VoidFunction;
252
+ tag?: keyof JSX.IntrinsicElements;
253
+ }
254
+ declare const ArrowButton: FunctionalComponent<ArrowButtonProps>;
255
+
256
+ type ModalGalleryProps = {
257
+ attachments: AttachmentTestStepResult[] | undefined;
258
+ };
259
+ interface ModalDataProps<T = any> {
260
+ data?: T;
261
+ component: VNode;
262
+ preview?: boolean;
263
+ isModalOpen?: boolean;
264
+ closeModal?: () => void;
265
+ attachments?: AttachmentTestStepResult[];
266
+ title?: string;
267
+ }
268
+ interface ModalTranslations {
269
+ tooltipPreview: string;
270
+ tooltipDownload: string;
271
+ openInNewTabButton: string;
272
+ }
273
+ interface ModalTranslationsProps {
274
+ translations: ModalTranslations;
275
+ }
276
+ declare const Modal: ({ data, isModalOpen, preview, component, attachments, closeModal, translations, title, }: ModalDataProps & ModalTranslationsProps) => preact.JSX.Element | null;
277
+
278
+ interface TreeProps {
279
+ statistic?: Statistic;
280
+ reportStatistic?: Statistic;
281
+ tree: RecursiveTree;
282
+ name?: string;
283
+ root?: boolean;
284
+ statusFilter?: Status;
285
+ collapsedTrees: Set<string>;
286
+ toggleTree: (id: string) => void;
287
+ navigateTo: (id: string) => void;
288
+ routeId?: string;
289
+ }
290
+ declare const Tree: FunctionalComponent<TreeProps>;
291
+
292
+ interface TreeHeaderProps {
293
+ statistic?: Statistic;
294
+ reportStatistic?: Statistic;
295
+ categoryTitle: string;
296
+ isOpened: boolean;
297
+ toggleTree: () => void;
298
+ statusFilter?: Status;
299
+ }
300
+ declare const TreeHeader: FunctionComponent<TreeHeaderProps>;
301
+
302
+ interface TreeSectionProps {
303
+ title: string;
304
+ isOpened: boolean;
305
+ toggleTree: () => void;
306
+ icon?: string;
307
+ }
308
+ declare const TreeSection: FunctionComponent<TreeSectionProps>;
309
+
310
+ interface TreeItemProps {
311
+ name: string;
312
+ status: TestStatus;
313
+ duration?: number;
314
+ retriesCount?: number;
315
+ flaky?: boolean;
316
+ transition?: TestStatusTransition;
317
+ transitionTooltip?: string;
318
+ id: string;
319
+ groupOrder: number;
320
+ marked?: boolean;
321
+ navigateTo: (id: string) => void;
322
+ }
323
+ declare const TreeItem: FunctionComponent<TreeItemProps>;
324
+
325
+ interface TestStatusIconProps {
326
+ status?: TestStatus;
327
+ className?: string;
328
+ classNameIcon?: string;
329
+ }
330
+ declare const TreeItemIcon: FunctionalComponent<TestStatusIconProps>;
331
+
332
+ interface TreeStatusBarProps {
333
+ statistic?: Statistic;
334
+ reportStatistic?: Statistic;
335
+ maxWidth?: number;
336
+ minWidth?: number;
337
+ offset?: number;
338
+ statusFilter?: Status;
339
+ }
340
+ declare const TreeStatusBar: FunctionalComponent<TreeStatusBarProps>;
341
+
342
+ interface AttachmentTestStepResultProps {
343
+ item: AttachmentTestStepResult;
344
+ previewable?: boolean;
345
+ }
346
+ declare const Attachment: FunctionalComponent<AttachmentTestStepResultProps>;
347
+
348
+ declare const AttachmentCode: FunctionalComponent<{
349
+ item: AttachmentTestStepResult;
350
+ attachment: {
351
+ text?: string;
352
+ };
353
+ }>;
354
+
355
+ type HtmlAttachmentPreviewProps = {
356
+ attachment: {
357
+ text: string;
358
+ };
201
359
  };
360
+ declare const HtmlPreview: FunctionalComponent<HtmlAttachmentPreviewProps>;
202
361
 
203
- type Props$3 = {
362
+ declare const AttachmentImage: FunctionalComponent<{
363
+ attachment: {
364
+ img: string;
365
+ originalFileName: string;
366
+ };
367
+ }>;
368
+
369
+ declare const AttachmentVideo: FunctionalComponent<{
370
+ attachment: {
371
+ src: string;
372
+ contentType?: string;
373
+ };
374
+ }>;
375
+
376
+ declare const AttachmentEmpty: ({ children }: {
377
+ children: ComponentChildren;
378
+ }) => preact.JSX.Element;
379
+
380
+ declare const CodeViewer: FunctionalComponent<{
381
+ code?: string;
382
+ children?: ComponentChildren;
383
+ className?: string;
384
+ }>;
385
+
386
+ type Props$d = {
204
387
  size?: "s" | "m" | "l";
205
388
  count: number;
206
389
  truncateCount?: boolean;
207
390
  status?: TestStatus;
208
391
  };
209
- declare const Counter: (props: Props$3) => preact.JSX.Element;
392
+ declare const Counter: (props: Props$d) => preact.JSX.Element;
210
393
 
211
- type Props$2 = {
394
+ type Props$c = {
212
395
  value: boolean;
213
396
  label: string;
214
397
  onChange: (value: boolean) => void;
215
398
  focusable?: boolean;
216
399
  };
217
- declare const Toggle: (props: Props$2) => preact.JSX.Element;
400
+ declare const Toggle: (props: Props$c) => preact.JSX.Element;
218
401
 
219
- type Props$1 = {
402
+ type Props$b = {
220
403
  href?: string;
221
404
  children: ComponentChildren;
222
405
  onClick?: (e: MouseEvent) => void;
223
406
  };
224
- declare const Link: (props: Props$1) => preact.JSX.Element;
407
+ declare const Link: (props: Props$b) => preact.JSX.Element;
408
+
409
+ declare const Label: FunctionComponent;
225
410
 
226
- type Slice = {
411
+ type StatusLabelProps = {
227
412
  status: TestStatus;
228
- count: number;
229
- d: string;
413
+ className?: string;
230
414
  };
231
- type Props = {
232
- slices: Slice[];
233
- percentage: number;
415
+ declare const StatusLabel: FunctionalComponent<StatusLabelProps>;
416
+
417
+ declare const ReportLogoFull: (props: {
418
+ className?: string;
419
+ }) => preact.JSX.Element;
420
+
421
+ declare const ReportLogo: (props: {
422
+ className?: string;
423
+ logo?: string;
424
+ }) => preact.JSX.Element;
425
+
426
+ interface WidgetProps {
427
+ title?: string;
428
+ centerContent?: boolean;
429
+ dropShadow?: boolean;
430
+ }
431
+ declare const Widget: FunctionalComponent<WidgetProps>;
432
+
433
+ type TagSkin = "successful" | "failed" | "warning" | "neutral" | "successful-light" | "failed-light" | "warning-light" | "neutral-light";
434
+ interface TagProps {
435
+ "className"?: string;
436
+ "skin"?: TagSkin;
437
+ "data-testid"?: string;
438
+ }
439
+ declare const Tag: FunctionComponent<TagProps>;
440
+
441
+ type GridKind = "default" | "swap";
442
+ interface GridProps extends HTMLAttributes<HTMLDivElement> {
443
+ options?: Options;
444
+ kind?: GridKind;
445
+ className?: string;
446
+ }
447
+ declare const Grid: FunctionComponent<GridProps>;
448
+
449
+ interface GridItemProps extends HTMLAttributes<HTMLDivElement> {
450
+ className?: string;
451
+ dndEnabled?: boolean;
452
+ }
453
+ declare const GridItem: FunctionComponent<GridItemProps>;
454
+
455
+ interface LanguagePickerProps {
456
+ locale: LangLocale;
457
+ setLocale: (locale: LangLocale) => void;
458
+ availableLocales?: LangLocale[];
459
+ }
460
+ declare const LanguagePicker: ({ locale, setLocale, availableLocales }: LanguagePickerProps) => preact.JSX.Element;
461
+
462
+ type Theme = "light" | "dark" | "auto";
463
+ interface ThemeButtonProps {
464
+ theme: Theme;
465
+ getTheme: () => void;
466
+ toggleTheme: () => void;
467
+ }
468
+ declare const ThemeButton: ({ theme, toggleTheme, getTheme }: ThemeButtonProps) => preact.JSX.Element;
469
+
470
+ type Props$a = {
471
+ icon: string;
472
+ tooltip?: string;
473
+ className?: string;
474
+ style?: "primary" | "secondary";
234
475
  };
235
- declare const SuccessRatePieChart: (props: Props) => preact.JSX.Element;
476
+ declare const IconLabel: FunctionalComponent<Props$a>;
236
477
 
237
- declare const Label: FunctionComponent;
478
+ interface TrendChartWidgetPropsTranslations {
479
+ "no-results": string;
480
+ }
481
+ interface TrendChartWidgetProps<TSlice = {
482
+ metadata: {
483
+ executionId: string;
484
+ };
485
+ }> {
486
+ title: string;
487
+ mode: ChartMode;
488
+ items: readonly Serie$1[];
489
+ slices: readonly TSlice[];
490
+ min: number;
491
+ max: number;
492
+ height?: CSSProperties["height"];
493
+ width?: CSSProperties["width"];
494
+ rootAriaLabel?: string;
495
+ translations: TrendChartWidgetPropsTranslations;
496
+ dropShadow?: boolean;
497
+ }
498
+ declare const TrendChartWidget: ({ title, mode, items, slices, min, max, height, width, rootAriaLabel, translations, }: TrendChartWidgetProps) => preact_compat.JSX.Element;
499
+
500
+ type SuccessRatePieChartProps = PieChartValues & {
501
+ className?: string;
502
+ };
503
+ declare const SuccessRatePieChart: ({ slices, percentage, className }: SuccessRatePieChartProps) => preact.JSX.Element;
238
504
 
239
- interface TrendChartDataItem {
505
+ type Datum = Omit<Datum$1, "x" | "y"> & {
240
506
  x: string | number | Date;
241
507
  y: number;
508
+ };
509
+ type Serie = Omit<Serie$2, "id" | "data"> & {
510
+ id: string | number;
511
+ data: readonly Datum[];
512
+ };
513
+ type BaseLineSvgProps = Omit<LineSvgProps, "useMesh" | "enableSlices">;
514
+ declare enum TrendChartKind {
515
+ Mesh = "Mesh",
516
+ SlicesX = "SlicesX",
517
+ SlicesY = "SlicesY"
242
518
  }
243
- interface TrendChartData {
519
+ type TrendChartKindConfig = Pick<LineSvgProps, "useMesh" | "enableSlices">;
520
+ type SymlogScaleOptions = Pick<ScaleSymlogSpec, "constant" | "reverse">;
521
+ interface Slice {
244
522
  id: string;
245
- data: TrendChartDataItem[];
523
+ height: number;
524
+ width: number;
525
+ x: number;
526
+ y: number;
527
+ x0: number;
528
+ y0: number;
529
+ points: Point[];
246
530
  }
247
- interface TrendChartProps extends Partial<LineSvgProps> {
248
- data: TrendChartData[];
249
- rootArialLabel: string;
531
+ type TrendChartSliceClickHandler = (slice: Slice, event: MouseEvent) => void;
532
+ type TrendChartSliceTouchHandler = (slice: Slice, event: TouchEvent) => void;
533
+ interface BaseTrendChartProps extends Omit<BaseLineSvgProps, "onClick" | "onTouchEnd" | "axisBottom"> {
534
+ rootAriaLabel?: string;
535
+ emptyLabel?: string;
536
+ emptyAriaLabel?: string;
250
537
  width?: CSSProperties["width"];
251
538
  height?: CSSProperties["height"];
539
+ axisBottom?: Omit<AxisProps, "tickValues">;
540
+ }
541
+ interface MeshTrendChartProps extends BaseTrendChartProps {
542
+ kind: TrendChartKind.Mesh;
543
+ onClick?: (point: Point, event: MouseEvent) => void;
544
+ onTouchEnd?: (point: Point, event: TouchEvent) => void;
252
545
  }
546
+ interface SlicesTrendChartProps extends BaseTrendChartProps {
547
+ kind: TrendChartKind.SlicesX | TrendChartKind.SlicesY;
548
+ onSliceClick?: TrendChartSliceClickHandler;
549
+ onSliceTouchEnd?: TrendChartSliceTouchHandler;
550
+ }
551
+ type TrendChartProps = MeshTrendChartProps | SlicesTrendChartProps;
552
+
553
+ declare const TrendChart: FunctionalComponent<TrendChartProps>;
554
+
253
555
  declare const defaultTrendChartLegendConfig: LegendProps;
254
- declare const defaultAxisBottomConfig: AxisProps;
255
- declare const defaultAxisLeftConfig: AxisProps;
556
+ declare const defaultTrendChartAxisBottomConfig: AxisProps;
557
+ declare const defaultTrendChartAxisLeftConfig: AxisProps;
558
+ declare const defaultTrendChartMarginConfig: Margin;
559
+ declare const defaultTrendChartXScaleConfig: ScaleSpec;
560
+ declare const defaultTrendChartYScaleConfig: ScaleSpec;
256
561
  declare const defaultTrendChartConfig: Partial<LineSvgProps>;
257
- declare const TrendChart: FunctionalComponent<TrendChartProps>;
258
562
 
259
- export { Button, Code, Counter, DropdownButton, Heading, IconButton, Label, Link, Loadable, Menu, PageLoader, SearchBox, Spinner, SuccessRatePieChart, SvgIcon, Text, Toggle, TooltipWrapper, TrendChart, type TrendChartData, type TrendChartDataItem, type TrendChartProps, allureIcons, defaultAxisBottomConfig, defaultAxisLeftConfig, defaultTrendChartConfig, defaultTrendChartLegendConfig };
563
+ declare const makeSymlogScale: (min: number, max: number, options?: SymlogScaleOptions) => ScaleSymlogSpec;
564
+ declare const makeSymlogScaleBySeries: (series: Serie[], options?: SymlogScaleOptions) => ScaleSymlogSpec;
565
+
566
+ type ResponsiveTreeChartProps<Datum extends DefaultTreeMapDatum = TreeMapNode> = Omit<TreeMapSvgProps<Datum>, "width" | "height">;
567
+ interface ParentLabelControlOptions {
568
+ parentSkipSize?: number;
569
+ }
570
+ type BaseTreeMapChartProps<Datum extends DefaultTreeMapDatum = TreeMapNode> = Omit<ResponsiveTreeChartProps<Datum>, "colors" | "tooltip"> & ParentLabelControlOptions;
571
+ interface TreeMapChartProps<Datum extends DefaultTreeMapDatum = TreeMapNode> extends BaseTreeMapChartProps<Datum> {
572
+ width?: CSSProperties["width"];
573
+ height?: CSSProperties["height"];
574
+ rootAriaLabel?: string;
575
+ emptyLabel?: string;
576
+ emptyAriaLabel?: string;
577
+ showLegend?: boolean;
578
+ legendMinValue?: number;
579
+ legendMaxValue?: number;
580
+ colors: (value: number, domain?: number[]) => string;
581
+ formatLegend?: (value: number) => string;
582
+ legendDomain?: number[];
583
+ tooltipRows?: TreeMapTooltipAccessor;
584
+ }
585
+ type TreeMapChartNode = DefaultTreeMapDatum;
586
+
587
+ declare const TreeMapChart: FunctionalComponent<TreeMapChartProps & {
588
+ labelColor?: (node: any) => string;
589
+ }>;
590
+
591
+ declare const defaultTreeChartConfig: Partial<ResponsiveTreeChartProps<DefaultTreeMapDatum>>;
592
+
593
+ interface TreeMapChartWidgetProps extends Omit<TreeMapChartProps, "colors"> {
594
+ title: string;
595
+ colors: (value: number, domain?: number[]) => string;
596
+ formatLegend?: (value: number) => string;
597
+ translations: Record<string, string>;
598
+ showLegend?: boolean;
599
+ domain?: number[];
600
+ legendDomain?: number[];
601
+ }
602
+
603
+ declare const TreeMapChartWidget: FunctionalComponent<TreeMapChartWidgetProps & {
604
+ chartType: ChartType.CoverageDiff | ChartType.SuccessRateDistribution;
605
+ }>;
606
+
607
+ declare const useCoverageDiffColors: (theme?: string) => (value: number) => string;
608
+ declare const useSuccessRateDistributionColors: (theme?: string) => (value: number) => string;
609
+ declare const useCoverageDiffTextColors: (theme?: string) => (value: number) => string;
610
+
611
+ type ResponsiveHeatMapProps<Datum extends HeatMapDatum = DefaultHeatMapDatum, ExtraProps extends object = Record<string, unknown>> = Omit<HeatMapSvgProps<Datum, ExtraProps>, "width" | "height">;
612
+ type BaseHeatMapProps<Datum extends HeatMapDatum = DefaultHeatMapDatum, ExtraProps extends object = Record<string, unknown>> = Omit<ResponsiveHeatMapProps<Datum, ExtraProps>, "width" | "height" | "colors">;
613
+ interface HeatMapProps<Datum extends HeatMapDatum = DefaultHeatMapDatum, ExtraProps extends object = Record<string, unknown>> extends BaseHeatMapProps<Datum, ExtraProps> {
614
+ width?: CSSProperties["width"];
615
+ height?: CSSProperties["height"];
616
+ rootAriaLabel?: string;
617
+ emptyLabel?: string;
618
+ emptyAriaLabel?: string;
619
+ }
620
+ type HeatMapLegendConfig = Omit<AnchoredContinuousColorsLegendProps, "scale" | "containerWidth" | "containerHeight">;
621
+
622
+ declare const HeatMap: FunctionalComponent<HeatMapProps>;
623
+
624
+ declare const defaultHeatMapMarginConfig: {
625
+ top: number;
626
+ right: number;
627
+ bottom: number;
628
+ left: number;
629
+ };
630
+ declare const DEFAULT_HEAT_MAP_EMPTY_COLOR = "#E0E0E0";
631
+ declare const DEFAULT_HEAT_MAP_HEIGHT = 400;
632
+ declare const DEFAULT_HEAT_MAP_WIDTH = "100%";
633
+ declare const DEFAULT_HEAT_MAP_EMPTY_LABEL = "No data available";
634
+ declare const DEFAULT_HEAT_MAP_EMPTY_ARIA_LABEL = "No data available";
635
+ declare const DEFAULT_HEAT_MAP_X_INNER_PADDING = 0.05;
636
+ declare const DEFAULT_HEAT_MAP_Y_INNER_PADDING = 0.05;
637
+ declare const DEFAULT_HEAT_MAP_FORCE_SQUARE = true;
638
+ declare const DEFAULT_HEAT_MAP_VALUE_FORMAT = ">-.2%";
639
+ declare const defaultHeatMapAxisLeftConfig: AxisProps;
640
+ declare const defaultHeatMapAxisTopConfig: AxisProps;
641
+ declare const defaultHeatMapLegendConfig: HeatMapLegendConfig;
642
+
643
+ interface HeatMapWidgetProps extends HeatMapProps {
644
+ title: string;
645
+ translations: Record<string, string>;
646
+ }
647
+
648
+ declare const HeatMapWidget: FunctionalComponent<HeatMapWidgetProps>;
649
+
650
+ type I18nKeys$8 = "no-results" | "legend.stabilityRate";
651
+ type I18nProp$8 = (key: I18nKeys$8, props?: Record<string, unknown>) => string;
652
+ type Props$9 = Omit<StabilityDistributionChartData, "type"> & {
653
+ i18n: I18nProp$8;
654
+ };
655
+
656
+ declare const StabilityDistributionWidget: FunctionalComponent<Props$9>;
657
+
658
+ type I18nKeys$7 = `status.new${TestStatus}` | `status.removed${TestStatus}` | "legend.trend" | "no-history" | "no-results" | "ticks.current" | "ticks.history" | "tooltips.current" | "tooltips.history";
659
+ type I18nProp$7 = (key: I18nKeys$7, props?: Record<string, unknown>) => string;
660
+ type Props$8 = Omit<TestBaseGrowthDynamicsChartData, "type"> & {
661
+ i18n: I18nProp$7;
662
+ };
663
+
664
+ declare const TestBaseGrowthDynamicsChartWidget: FunctionalComponent<Props$8>;
665
+
666
+ type FBSUStatus = Exclude<TestStatus, "passed">;
667
+ type I18nKeys$6 = `status.${FBSUStatus}` | "no-history" | "no-results" | "ticks.current" | "ticks.history" | "tooltips.current" | "tooltips.history";
668
+ type I18nProp$6 = (key: I18nKeys$6, props?: Record<string, unknown>) => string;
669
+ type Props$7 = Omit<FBSUAgePyramidChartData, "type" | "statuses"> & {
670
+ i18n: I18nProp$6;
671
+ statuses: FBSUStatus[];
672
+ };
673
+
674
+ declare const FBSUAgePyramidChartWidget: FunctionalComponent<Props$7>;
675
+
676
+ type Props$6 = {
677
+ data: {
678
+ layer: string;
679
+ testCount: number;
680
+ successRate: number;
681
+ percentage: number;
682
+ }[];
683
+ title: string;
684
+ translations: Record<string, string>;
685
+ width?: JSX.CSSProperties["width"];
686
+ height?: JSX.CSSProperties["height"];
687
+ };
688
+ declare const TestingPyramidWidget: (props: Props$6) => JSX.Element;
689
+
690
+ type I18nKeys$5 = "status.passed" | "status.failed" | "status.skipped" | "status.unknown" | "status.broken" | "percentage" | "of" | "tests.new" | "tests.flaky" | "tests.retries" | "total";
691
+ type I18nProp$5 = (key: I18nKeys$5, props?: Record<string, unknown>) => string;
692
+ type Props$5 = {
693
+ title?: string;
694
+ i18n?: I18nProp$5;
695
+ data: Statistic;
696
+ statuses?: TestStatus[];
697
+ metric?: TestStatus;
698
+ };
699
+
700
+ declare const CurrentStatusChartWidget: FunctionalComponent<Props$5>;
701
+
702
+ type I18nKeys$4 = "status.passed" | "status.failed" | "status.skipped" | "status.unknown" | "status.broken" | "no-history" | "no-results" | "ticks.current" | "ticks.history" | "tooltips.current" | "tooltips.history";
703
+ type I18nProp$4 = (key: I18nKeys$4, props?: Record<string, unknown>) => string;
704
+ type Props$4 = {
705
+ title?: string;
706
+ data: {
707
+ statistic: Statistic;
708
+ id: string;
709
+ timestamp: number;
710
+ name: string;
711
+ }[];
712
+ limit?: number;
713
+ statuses?: TestStatus[];
714
+ i18n: I18nProp$4;
715
+ };
716
+
717
+ declare const StatusDynamicsChartWidget: FunctionalComponent<Props$4>;
718
+
719
+ type I18nKeys$3 = "transitions.new" | "transitions.fixed" | "transitions.regressed" | "transitions.malfunctioned" | "legend.trend" | "no-history" | "no-results" | "ticks.current" | "ticks.history" | "tooltips.current" | "tooltips.history";
720
+ type I18nProp$3 = (key: I18nKeys$3, props?: Record<string, unknown>) => string;
721
+ type Props$3 = Omit<StatusTransitionsChartData, "type"> & {
722
+ statuses?: TestStatus[];
723
+ i18n: I18nProp$3;
724
+ };
725
+
726
+ declare const StatusTransitionsChartWidget: FunctionalComponent<Props$3>;
727
+
728
+ type I18nKeys$2 = "no-history" | "no-results" | "ticks.durationRange" | "tooltips.durationRange" | "legend.value" | "legend.total";
729
+ type I18nProp$2 = (key: I18nKeys$2, props?: Record<string, unknown>) => string;
730
+ type Props$2 = Omit<DurationsChartData, "type"> & {
731
+ i18n: I18nProp$2;
732
+ };
733
+
734
+ declare const DurationsChartWidget: FunctionalComponent<Props$2>;
735
+
736
+ type I18nKeys$1 = `status.${TestStatus}` | `severity.${SeverityLevel | "unset"}` | "no-results" | "ticks.current";
737
+ type I18nProp$1 = (key: I18nKeys$1, props?: Record<string, unknown>) => string;
738
+ type Props$1 = Omit<TrSeveritiesChartData, "type"> & {
739
+ i18n: I18nProp$1;
740
+ };
741
+
742
+ declare const TrSeveritiesChartWidget: FunctionalComponent<Props$1>;
743
+
744
+ type I18nKeys = "no-results" | "durations.sequential" | "durations.duration" | "durations.speedup" | "ticks.current" | "ticks.history" | "tooltips.current" | "tooltips.history" | "legend.duration" | "legend.speedup";
745
+ type I18nProp = (key: I18nKeys, props?: Record<string, unknown>) => string;
746
+ type Props = Omit<DurationDynamicsChartData, "type"> & {
747
+ i18n: I18nProp;
748
+ };
749
+
750
+ declare const DurationDynamicsChartWidget: FunctionalComponent<Props>;
751
+
752
+ type TimlineTr = Pick<TestResult, "id" | "name" | "status" | "flaky" | "hidden" | "labels" | "environment" | "start" | "stop" | "duration" | "historyId">;
753
+ type TimelineSegment = {
754
+ timeRange: [Date, Date];
755
+ val: number;
756
+ status: "failed" | "broken" | "passed" | "skipped" | "unknown";
757
+ hidden?: boolean;
758
+ label: string;
759
+ labelGroup: string[];
760
+ id: string;
761
+ };
762
+ type TimelineDataGroup = {
763
+ id: string;
764
+ name: string;
765
+ segments: TimelineSegment[];
766
+ };
767
+ type TimelineData = TimelineDataGroup[];
768
+ type TimelineChartData = TimlineTr[];
769
+
770
+ type TimelineProps = {
771
+ data?: TimelineData;
772
+ width?: number;
773
+ enableAnimations?: boolean;
774
+ translations: {
775
+ empty: string;
776
+ selected: (props: {
777
+ count: number;
778
+ percentage: string;
779
+ minDuration: string;
780
+ maxDuration: string;
781
+ }) => string;
782
+ };
783
+ };
784
+ declare const Timeline: FunctionComponent<Omit<TimelineProps, "data"> & {
785
+ data: TimelineChartData;
786
+ dataId: string;
787
+ }>;
788
+
789
+ type ReportSummaryCardProps = {
790
+ href: string;
791
+ name: string;
792
+ status: TestStatus;
793
+ stats: Statistic;
794
+ newTests: any[];
795
+ retryTests: any[];
796
+ flakyTests: any[];
797
+ duration: number;
798
+ plugin?: string;
799
+ createdAt?: number;
800
+ localeIso?: string;
801
+ locales?: {
802
+ in?: string;
803
+ new?: string;
804
+ flaky?: string;
805
+ retry?: string;
806
+ total?: string;
807
+ failed?: string;
808
+ broken?: string;
809
+ passed?: string;
810
+ skipped?: string;
811
+ unknown?: string;
812
+ };
813
+ };
814
+ declare const ReportSummaryCard: FunctionalComponent<ReportSummaryCardProps>;
815
+
816
+ declare const useTheme: () => string;
817
+ declare const ThemeProvider: (props: {
818
+ children: ComponentChildren;
819
+ theme: string;
820
+ }) => preact.JSX.Element;
821
+
822
+ export { ArrowButton, Attachment, AttachmentCode, AttachmentEmpty, AttachmentImage, AttachmentVideo, Button, Code, CodeViewer, Counter, CurrentStatusChartWidget, DEFAULT_HEAT_MAP_EMPTY_ARIA_LABEL, DEFAULT_HEAT_MAP_EMPTY_COLOR, DEFAULT_HEAT_MAP_EMPTY_LABEL, DEFAULT_HEAT_MAP_FORCE_SQUARE, DEFAULT_HEAT_MAP_HEIGHT, DEFAULT_HEAT_MAP_VALUE_FORMAT, DEFAULT_HEAT_MAP_WIDTH, DEFAULT_HEAT_MAP_X_INNER_PADDING, DEFAULT_HEAT_MAP_Y_INNER_PADDING, DropdownButton, DurationDynamicsChartWidget, DurationsChartWidget, FBSUAgePyramidChartWidget, Grid, GridItem, Heading, HeatMap, HeatMapWidget, HtmlPreview, IconButton, IconLabel, Label, LanguagePicker, Link, Loadable, Menu, Modal, PageLoader, ReportLogo, ReportLogoFull, ReportSummaryCard, SearchBox, Spinner, StabilityDistributionWidget, StatusDynamicsChartWidget, StatusLabel, StatusTransitionsChartWidget, SuccessRatePieChart, SvgIcon, Tag, TestBaseGrowthDynamicsChartWidget, TestingPyramidWidget, Text, ThemeButton, ThemeProvider, Timeline, Toggle, TooltipWrapper, TrSeveritiesChartWidget, Tree, TreeHeader, TreeItem, TreeItemIcon, TreeMapChart, TreeMapChartWidget, TreeSection, TreeStatusBar, TrendChart, TrendChartKind, TrendChartWidget, Widget, allureIcons, defaultHeatMapAxisLeftConfig, defaultHeatMapAxisTopConfig, defaultHeatMapLegendConfig, defaultHeatMapMarginConfig, defaultTreeChartConfig, defaultTrendChartAxisBottomConfig, defaultTrendChartAxisLeftConfig, defaultTrendChartConfig, defaultTrendChartLegendConfig, defaultTrendChartMarginConfig, defaultTrendChartXScaleConfig, defaultTrendChartYScaleConfig, makeSymlogScale, makeSymlogScaleBySeries, useCoverageDiffColors, useCoverageDiffTextColors, useSuccessRateDistributionColors, useTheme };
823
+ export type { Datum, GridItemProps, GridProps, HeatMapProps, HeatMapWidgetProps, LanguagePickerProps, MeshTrendChartProps, ModalDataProps, ModalGalleryProps, ModalTranslations, ModalTranslationsProps, ParentLabelControlOptions, ReportSummaryCardProps, ResponsiveTreeChartProps, Serie, Slice, SlicesTrendChartProps, SymlogScaleOptions, TagProps, TagSkin, Theme, ThemeButtonProps, TreeMapChartNode, TreeMapChartProps, TreeMapChartWidgetProps, TrendChartKindConfig, TrendChartProps, TrendChartSliceClickHandler, TrendChartSliceTouchHandler };