@allurereport/web-components 3.16.1 → 3.18.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.d.ts CHANGED
@@ -4,7 +4,7 @@ import { Placement } from '@floating-ui/dom';
4
4
  import * as preact_compat from 'preact/compat';
5
5
  import { MutableRefObject, HTMLAttributes as HTMLAttributes$1, CSSProperties } from 'preact/compat';
6
6
  import { Signal } from '@preact/signals';
7
- import { AttachmentTestStepResult, DefaultTreeGroup, TestStatus, Statistic, TestStatusTransition, SeverityLevel, TestResult } from '@allurereport/core-api';
7
+ import { AttachmentTestStepResult, DefaultTreeGroup, TestStatus, ResolutionCategory, TestStatusTransition, Statistic, SeverityLevel, TestResult } from '@allurereport/core-api';
8
8
  import { AttachmentData, LangLocale, TreeMapTooltipAccessor } from '@allurereport/web-commons';
9
9
  import { Options } from 'sortablejs';
10
10
  import { ChartMode, PieChartValues, TreeMapNode, ChartType, StabilityDistributionChartData, TestBaseGrowthDynamicsChartData, StatusAgePyramidChartData, StatusTransitionsChartData, DurationsChartData, TrSeveritiesChartData, DurationDynamicsChartData } from '@allurereport/charts-api';
@@ -320,6 +320,22 @@ type RecursiveTree = DefaultTreeGroup & {
320
320
  trees: RecursiveTree[];
321
321
  };
322
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
+
323
339
  interface TreeProps {
324
340
  statistic?: Statistic;
325
341
  reportStatistic?: Statistic;
@@ -367,6 +383,7 @@ interface TreeItemProps {
367
383
  duration?: number;
368
384
  retriesCount?: number;
369
385
  flaky?: boolean;
386
+ resolution?: ResolutionCategory;
370
387
  transition?: TestStatusTransition;
371
388
  transitionTooltip?: string;
372
389
  id: string;
@@ -418,6 +435,7 @@ type AttachmentProps = {
418
435
  i18n?: (key: any) => string;
419
436
  };
420
437
  type I18nProp$a = {
438
+ controls?: (key: string) => string;
421
439
  imageDiff: ComponentProps<typeof ImageDiff>["i18n"];
422
440
  };
423
441
 
@@ -641,10 +659,13 @@ interface TrendChartWidgetProps<TSlice = {
641
659
  }
642
660
  declare const TrendChartWidget: ({ title, mode, items, slices, min, max, height, width, rootAriaLabel, translations, }: TrendChartWidgetProps) => preact_compat.JSX.Element;
643
661
 
662
+ type SuccessRateI18n = (key: string, values?: Record<string, any>) => string;
663
+
644
664
  type SuccessRatePieChartProps = PieChartValues & {
645
665
  className?: string;
666
+ i18n?: SuccessRateI18n;
646
667
  };
647
- declare const SuccessRatePieChart: ({ slices, percentage, className }: SuccessRatePieChartProps) => preact.JSX.Element;
668
+ declare const SuccessRatePieChart: ({ slices, percentage, className, i18n, }: SuccessRatePieChartProps) => preact.JSX.Element;
648
669
 
649
670
  type ResponsiveTreeChartProps<Datum extends DefaultTreeMapDatum = TreeMapNode> = Omit<TreeMapSvgProps<Datum>, "width" | "height">;
650
671
  interface ParentLabelControlOptions {
@@ -685,6 +706,7 @@ interface TreeMapChartWidgetProps extends Omit<TreeMapChartProps, "colors"> {
685
706
 
686
707
  declare const TreeMapChartWidget: FunctionalComponent<TreeMapChartWidgetProps & {
687
708
  chartType: ChartType.CoverageDiff | ChartType.SuccessRateDistribution;
709
+ i18n?: SuccessRateI18n;
688
710
  }>;
689
711
 
690
712
  declare const useCoverageDiffColors: (theme?: string) => (value: number) => string;
@@ -761,10 +783,12 @@ type Props$7 = {
761
783
  layer: string;
762
784
  testCount: number;
763
785
  successRate: number;
786
+ eligibleCount?: number;
764
787
  percentage: number;
765
788
  }[];
766
789
  title: string;
767
790
  translations: Record<string, string>;
791
+ i18n?: SuccessRateI18n;
768
792
  width?: JSX.CSSProperties["width"];
769
793
  height?: JSX.CSSProperties["height"];
770
794
  };
@@ -845,6 +869,7 @@ type TimelineSegment = {
845
869
  label: string;
846
870
  labelGroup: string[];
847
871
  id: string;
872
+ testResultId: string;
848
873
  };
849
874
  type TimelineDataGroup = {
850
875
  id: string;
@@ -858,6 +883,7 @@ type TimelineProps = {
858
883
  data?: TimelineData;
859
884
  width?: number;
860
885
  enableAnimations?: boolean;
886
+ onTestResultClick?: (testResultId: string) => void;
861
887
  translations: {
862
888
  empty: string;
863
889
  selected: (props: {
@@ -890,7 +916,7 @@ type ReportSummary = {
890
916
  };
891
917
  type StatusI18nKeys = "status.failed" | "status.broken" | "status.passed" | "status.skipped" | "status.unknown";
892
918
  type MetadataI18nKeys = "metadata.new" | "metadata.retry" | "metadata.flaky";
893
- type I18nKeys = MetadataI18nKeys | StatusI18nKeys | "in" | "new" | "retry" | "flaky" | "total" | "createdAt";
919
+ type I18nKeys = `successRate.${string}` | MetadataI18nKeys | StatusI18nKeys | "in" | "new" | "retry" | "flaky" | "total" | "createdAt";
894
920
  type I18nProp = (key: I18nKeys, props?: Record<string, any>) => string | undefined;
895
921
 
896
922
  type ReportSummaryCardProps = {
@@ -920,4 +946,4 @@ type Props = {
920
946
  declare const EmptyView: FunctionalComponent<Props>;
921
947
 
922
948
  export { ArrowButton, Attachment, AttachmentCode, AttachmentEmpty, AttachmentImage, AttachmentTable, AttachmentVideo, Button, ButtonLink, 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, EmptyView, Grid, GridItem, Heading, HeatMap, HeatMapWidget, HtmlPreview, HttpAttachment, IconButton, IconLabel, ImageDiff, Label, LanguagePicker, Link, LinkifiedText, Loadable, MarkdownPreview, Menu, Modal, PageLoader, ReportLogo, ReportLogoFull, ReportSummaryCard, SearchBox, Spinner, StabilityDistributionWidget, StatusAgePyramidChartWidget, StatusDynamicsChartWidget, StatusLabel, StatusTransitionsChartWidget, SuccessRatePieChart, SvgIcon, Tag, TestBaseGrowthDynamicsChartWidget, TestingPyramidWidget, Text, ThemeButton, ThemeProvider, Timeline, Toggle, Tooltip, 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, useElementTruncation, useSuccessRateDistributionColors, useTheme, useTooltip };
923
- export type { Datum, GridItemProps, GridProps, HeatMapProps, HeatMapWidgetProps, LanguagePickerProps, MeshTrendChartProps, ModalDataProps, ModalGalleryProps, ModalTranslations, ModalTranslationsProps, ParentLabelControlOptions, ReportSummary, ReportSummaryCardProps, ResponsiveTreeChartProps, Serie, Slice, SlicesTrendChartProps, SymlogScaleOptions, TagProps, TagSkin, Theme, ThemeButtonProps, TreeMapChartNode, TreeMapChartProps, TreeMapChartWidgetProps, TrendChartKindConfig, TrendChartProps, TrendChartSliceClickHandler, TrendChartSliceTouchHandler };
949
+ export type { Datum, GridItemProps, GridProps, HeatMapProps, HeatMapWidgetProps, LanguagePickerProps, MeshTrendChartProps, ModalDataProps, ModalGalleryProps, ModalTranslations, ModalTranslationsProps, ParentLabelControlOptions, ReportSummary, ReportSummaryCardProps, ResponsiveTreeChartProps, Serie, Slice, SlicesTrendChartProps, SuccessRateI18n, SymlogScaleOptions, TagProps, TagSkin, Theme, ThemeButtonProps, TreeMapChartNode, TreeMapChartProps, TreeMapChartWidgetProps, TrendChartKindConfig, TrendChartProps, TrendChartSliceClickHandler, TrendChartSliceTouchHandler };