@allurereport/web-components 3.16.0 → 3.17.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.
- package/dist/index.css +1 -1
- package/dist/index.d.ts +51 -35
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import * as preact from 'preact';
|
|
2
2
|
import { SVGAttributes, JSX, ComponentChild, Ref, FunctionalComponent, HTMLAttributes, VNode, ComponentChildren, FunctionComponent, ComponentProps } from 'preact';
|
|
3
|
-
import { TextProps as TextProps$1 } from '@/components/Typography';
|
|
4
3
|
import { Placement } from '@floating-ui/dom';
|
|
5
4
|
import * as preact_compat from 'preact/compat';
|
|
6
5
|
import { MutableRefObject, HTMLAttributes as HTMLAttributes$1, CSSProperties } from 'preact/compat';
|
|
7
6
|
import { Signal } from '@preact/signals';
|
|
8
|
-
import { AttachmentTestStepResult, DefaultTreeGroup, TestStatus,
|
|
9
|
-
import { Status as Status$1 } from 'global';
|
|
7
|
+
import { AttachmentTestStepResult, DefaultTreeGroup, TestStatus, ResolutionCategory, TestStatusTransition, Statistic, SeverityLevel, TestResult } from '@allurereport/core-api';
|
|
10
8
|
import { AttachmentData, LangLocale, TreeMapTooltipAccessor } from '@allurereport/web-commons';
|
|
11
9
|
import { Options } from 'sortablejs';
|
|
12
10
|
import { ChartMode, PieChartValues, TreeMapNode, ChartType, StabilityDistributionChartData, TestBaseGrowthDynamicsChartData, StatusAgePyramidChartData, StatusTransitionsChartData, DurationsChartData, TrSeveritiesChartData, DurationDynamicsChartData } from '@allurereport/charts-api';
|
|
13
|
-
import { Serie as Serie$1 } from '@/components/Charts/TrendChart';
|
|
14
11
|
import { AxisProps } from '@nivo/axes';
|
|
15
|
-
import { Datum as Datum$1, LineSvgProps, Point, Serie as Serie$
|
|
12
|
+
import { Datum as Datum$1, LineSvgProps, Point, Serie as Serie$1 } from '@nivo/line';
|
|
16
13
|
import { ScaleSymlogSpec, ScaleSpec } from '@nivo/scales';
|
|
17
14
|
import { Margin } from '@nivo/core';
|
|
18
15
|
import { LegendProps, AnchoredContinuousColorsLegendProps } from '@nivo/legends';
|
|
@@ -184,7 +181,7 @@ type HeadingProps = {
|
|
|
184
181
|
} & Omit<HTMLAttributes, "size" | "className" | "tag">;
|
|
185
182
|
declare const Heading: FunctionalComponent<HeadingProps>;
|
|
186
183
|
|
|
187
|
-
type LinkifiedTextProps<Tag extends keyof preact.JSX.IntrinsicElements = "span"> = Omit<TextProps
|
|
184
|
+
type LinkifiedTextProps<Tag extends keyof preact.JSX.IntrinsicElements = "span"> = Omit<TextProps<Tag>, "children"> & {
|
|
188
185
|
text: string;
|
|
189
186
|
};
|
|
190
187
|
declare const LinkifiedText: <Tag extends keyof preact.JSX.IntrinsicElements = "span">({ text, ...textProps }: LinkifiedTextProps<Tag>) => preact.JSX.Element;
|
|
@@ -323,6 +320,22 @@ type RecursiveTree = DefaultTreeGroup & {
|
|
|
323
320
|
trees: RecursiveTree[];
|
|
324
321
|
};
|
|
325
322
|
|
|
323
|
+
type TreeLeaf = {
|
|
324
|
+
id: string;
|
|
325
|
+
nodeId: string;
|
|
326
|
+
name: string;
|
|
327
|
+
status?: TestStatus;
|
|
328
|
+
duration?: number;
|
|
329
|
+
groupOrder?: number;
|
|
330
|
+
flaky?: boolean;
|
|
331
|
+
retry?: boolean;
|
|
332
|
+
retriesCount?: number;
|
|
333
|
+
resolution?: ResolutionCategory;
|
|
334
|
+
transition?: TestStatusTransition;
|
|
335
|
+
transitionTooltip?: string;
|
|
336
|
+
tooltips?: Record<string, string>;
|
|
337
|
+
};
|
|
338
|
+
|
|
326
339
|
interface TreeProps {
|
|
327
340
|
statistic?: Statistic;
|
|
328
341
|
reportStatistic?: Statistic;
|
|
@@ -370,6 +383,7 @@ interface TreeItemProps {
|
|
|
370
383
|
duration?: number;
|
|
371
384
|
retriesCount?: number;
|
|
372
385
|
flaky?: boolean;
|
|
386
|
+
resolution?: ResolutionCategory;
|
|
373
387
|
transition?: TestStatusTransition;
|
|
374
388
|
transitionTooltip?: string;
|
|
375
389
|
id: string;
|
|
@@ -395,7 +409,7 @@ interface TreeStatusBarProps {
|
|
|
395
409
|
maxWidth?: number;
|
|
396
410
|
minWidth?: number;
|
|
397
411
|
offset?: number;
|
|
398
|
-
statusFilter?: Status
|
|
412
|
+
statusFilter?: Status;
|
|
399
413
|
}
|
|
400
414
|
declare const TreeStatusBar: FunctionalComponent<TreeStatusBarProps>;
|
|
401
415
|
|
|
@@ -561,38 +575,11 @@ type Props$b = {
|
|
|
561
575
|
};
|
|
562
576
|
declare const IconLabel: FunctionalComponent<Props$b>;
|
|
563
577
|
|
|
564
|
-
interface TrendChartWidgetPropsTranslations {
|
|
565
|
-
"no-results": string;
|
|
566
|
-
}
|
|
567
|
-
interface TrendChartWidgetProps<TSlice = {
|
|
568
|
-
metadata: {
|
|
569
|
-
executionId: string;
|
|
570
|
-
};
|
|
571
|
-
}> {
|
|
572
|
-
title: string;
|
|
573
|
-
mode: ChartMode;
|
|
574
|
-
items: readonly Serie$1[];
|
|
575
|
-
slices: readonly TSlice[];
|
|
576
|
-
min: number;
|
|
577
|
-
max: number;
|
|
578
|
-
height?: CSSProperties["height"];
|
|
579
|
-
width?: CSSProperties["width"];
|
|
580
|
-
rootAriaLabel?: string;
|
|
581
|
-
translations: TrendChartWidgetPropsTranslations;
|
|
582
|
-
dropShadow?: boolean;
|
|
583
|
-
}
|
|
584
|
-
declare const TrendChartWidget: ({ title, mode, items, slices, min, max, height, width, rootAriaLabel, translations, }: TrendChartWidgetProps) => preact_compat.JSX.Element;
|
|
585
|
-
|
|
586
|
-
type SuccessRatePieChartProps = PieChartValues & {
|
|
587
|
-
className?: string;
|
|
588
|
-
};
|
|
589
|
-
declare const SuccessRatePieChart: ({ slices, percentage, className }: SuccessRatePieChartProps) => preact.JSX.Element;
|
|
590
|
-
|
|
591
578
|
type Datum = Omit<Datum$1, "x" | "y"> & {
|
|
592
579
|
x: string | number | Date;
|
|
593
580
|
y: number;
|
|
594
581
|
};
|
|
595
|
-
type Serie = Omit<Serie$
|
|
582
|
+
type Serie = Omit<Serie$1, "id" | "data"> & {
|
|
596
583
|
id: string | number;
|
|
597
584
|
data: readonly Datum[];
|
|
598
585
|
};
|
|
@@ -649,6 +636,33 @@ declare const defaultTrendChartConfig: Partial<LineSvgProps>;
|
|
|
649
636
|
declare const makeSymlogScale: (min: number, max: number, options?: SymlogScaleOptions) => ScaleSymlogSpec;
|
|
650
637
|
declare const makeSymlogScaleBySeries: (series: Serie[], options?: SymlogScaleOptions) => ScaleSymlogSpec;
|
|
651
638
|
|
|
639
|
+
interface TrendChartWidgetPropsTranslations {
|
|
640
|
+
"no-results": string;
|
|
641
|
+
}
|
|
642
|
+
interface TrendChartWidgetProps<TSlice = {
|
|
643
|
+
metadata: {
|
|
644
|
+
executionId: string;
|
|
645
|
+
};
|
|
646
|
+
}> {
|
|
647
|
+
title: string;
|
|
648
|
+
mode: ChartMode;
|
|
649
|
+
items: readonly Serie[];
|
|
650
|
+
slices: readonly TSlice[];
|
|
651
|
+
min: number;
|
|
652
|
+
max: number;
|
|
653
|
+
height?: CSSProperties["height"];
|
|
654
|
+
width?: CSSProperties["width"];
|
|
655
|
+
rootAriaLabel?: string;
|
|
656
|
+
translations: TrendChartWidgetPropsTranslations;
|
|
657
|
+
dropShadow?: boolean;
|
|
658
|
+
}
|
|
659
|
+
declare const TrendChartWidget: ({ title, mode, items, slices, min, max, height, width, rootAriaLabel, translations, }: TrendChartWidgetProps) => preact_compat.JSX.Element;
|
|
660
|
+
|
|
661
|
+
type SuccessRatePieChartProps = PieChartValues & {
|
|
662
|
+
className?: string;
|
|
663
|
+
};
|
|
664
|
+
declare const SuccessRatePieChart: ({ slices, percentage, className }: SuccessRatePieChartProps) => preact.JSX.Element;
|
|
665
|
+
|
|
652
666
|
type ResponsiveTreeChartProps<Datum extends DefaultTreeMapDatum = TreeMapNode> = Omit<TreeMapSvgProps<Datum>, "width" | "height">;
|
|
653
667
|
interface ParentLabelControlOptions {
|
|
654
668
|
parentSkipSize?: number;
|
|
@@ -848,6 +862,7 @@ type TimelineSegment = {
|
|
|
848
862
|
label: string;
|
|
849
863
|
labelGroup: string[];
|
|
850
864
|
id: string;
|
|
865
|
+
testResultId: string;
|
|
851
866
|
};
|
|
852
867
|
type TimelineDataGroup = {
|
|
853
868
|
id: string;
|
|
@@ -861,6 +876,7 @@ type TimelineProps = {
|
|
|
861
876
|
data?: TimelineData;
|
|
862
877
|
width?: number;
|
|
863
878
|
enableAnimations?: boolean;
|
|
879
|
+
onTestResultClick?: (testResultId: string) => void;
|
|
864
880
|
translations: {
|
|
865
881
|
empty: string;
|
|
866
882
|
selected: (props: {
|