@allurereport/web-components 3.0.0-beta.22 → 3.0.0-beta.24

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
@@ -1,7 +1,7 @@
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 { AttachmentTestStepResult, Statistic, TestStatus, TestStatusTransition, PieChartValues, TreeMapNode } from '@allurereport/core-api';
4
+ import { AttachmentTestStepResult, Statistic, TestStatus, TestStatusTransition, PieChartValues, TreeMapNode, TestResult } from '@allurereport/core-api';
5
5
  import { RecursiveTree, Status } from 'global';
6
6
  import * as preact_compat from 'preact/compat';
7
7
  import { HTMLAttributes, CSSProperties } from 'preact/compat';
@@ -19,22 +19,22 @@ import { DefaultTreeMapDatum, TreeMapSvgProps } from '@nivo/treemap';
19
19
  import { HeatMapDatum, DefaultHeatMapDatum, HeatMapSvgProps } from '@nivo/heatmap';
20
20
 
21
21
  declare const allureIcons: {
22
- arrowsChevronDown: string;
23
- environment: string;
24
22
  amazon: string;
23
+ arrowsChevronDown: string;
25
24
  azure: string;
26
25
  bitbucket: string;
27
26
  circleci: string;
27
+ draggable: string;
28
28
  drone: string;
29
- gitlab: string;
29
+ environment: string;
30
30
  github: string;
31
+ gitlab: string;
31
32
  jenkins: string;
32
- draggable: string;
33
33
  lineAlertsAlertCircle: string;
34
- lineAlertsNotificationBox: string;
35
- lineAlertsNew: string;
36
- lineAlertsMalfunctioned: string;
37
34
  lineAlertsFixed: string;
35
+ lineAlertsMalfunctioned: string;
36
+ lineAlertsNew: string;
37
+ lineAlertsNotificationBox: string;
38
38
  lineAlertsRegressed: string;
39
39
  lineArrowsChevronDown: string;
40
40
  lineArrowsChevronDownDouble: string;
@@ -48,6 +48,7 @@ declare const allureIcons: {
48
48
  lineArrowsSortLineDesc: string;
49
49
  lineArrowsSwitchVertical1: string;
50
50
  lineChartsBarChartSquare: string;
51
+ lineChartsTimeline: string;
51
52
  lineDevBug2: string;
52
53
  lineDevCodeSquare: string;
53
54
  lineDevDataflow3: string;
@@ -56,16 +57,21 @@ declare const allureIcons: {
56
57
  lineFilesFileAttachment2: string;
57
58
  lineFilesFolder: string;
58
59
  lineGeneralCheck: string;
60
+ lineGeneralCheckCircle: string;
59
61
  lineGeneralChecklist3: string;
60
62
  lineGeneralCopy3: string;
61
63
  lineGeneralDownloadCloud: string;
62
64
  lineGeneralEqual: string;
63
65
  lineGeneralEye: string;
66
+ lineGeneralHelpCircle: string;
64
67
  lineGeneralHomeLine: string;
68
+ lineGeneralInfoCircle: string;
65
69
  lineGeneralLink1: string;
66
70
  lineGeneralLinkExternal: string;
71
+ lineGeneralMinusCircle: string;
67
72
  lineGeneralSearchMd: string;
68
73
  lineGeneralSettings1: string;
74
+ lineGeneralXCircle: string;
69
75
  lineGeneralXClose: string;
70
76
  lineGeneralZap: string;
71
77
  lineHelpersFlag: string;
@@ -80,6 +86,7 @@ declare const allureIcons: {
80
86
  lineShapesDotCircle: string;
81
87
  lineShapesMoon: string;
82
88
  lineShapesSun: string;
89
+ lineShapesThemeAuto: string;
83
90
  lineTimeClockStopwatch: string;
84
91
  playwrightLogo: string;
85
92
  reportLogo: string;
@@ -87,17 +94,12 @@ declare const allureIcons: {
87
94
  solidCheckCircle: string;
88
95
  solidHelpCircle: string;
89
96
  solidMinusCircle: string;
90
- solidXCircle: string;
91
97
  solidPlusCircle: string;
98
+ solidXCircle: string;
92
99
  spinner: string;
100
+ testNew: string;
93
101
  view: string;
94
102
  viewOff: string;
95
- lineGeneralCheckCircle: string;
96
- lineGeneralHelpCircle: string;
97
- lineGeneralInfoCircle: string;
98
- lineGeneralMinusCircle: string;
99
- lineGeneralXCircle: string;
100
- testNew: string;
101
103
  };
102
104
  type SvgIconProps = Omit<JSX.HTMLAttributes<SVGElement>, "className" | "id" | "size" | "inline"> & {
103
105
  "size"?: "xs" | "s" | "m";
@@ -199,7 +201,7 @@ declare const Loadable: <T, K = T>(props: LoadableProps<T, K>) => JSX.Element |
199
201
 
200
202
  declare const PageLoader: () => preact.JSX.Element;
201
203
 
202
- type Props$4 = {
204
+ type Props$6 = {
203
205
  placeholder?: string;
204
206
  invalid?: string;
205
207
  error?: string;
@@ -207,7 +209,7 @@ type Props$4 = {
207
209
  onChange: (value: string) => void;
208
210
  changeDebounce?: number;
209
211
  };
210
- declare const SearchBox: (props: Props$4) => preact.JSX.Element;
212
+ declare const SearchBox: (props: Props$6) => preact.JSX.Element;
211
213
 
212
214
  declare const Menu: {
213
215
  (props: {
@@ -381,28 +383,28 @@ declare const CodeViewer: FunctionalComponent<{
381
383
  className?: string;
382
384
  }>;
383
385
 
384
- type Props$3 = {
386
+ type Props$5 = {
385
387
  size?: "s" | "m" | "l";
386
388
  count: number;
387
389
  truncateCount?: boolean;
388
390
  status?: TestStatus;
389
391
  };
390
- declare const Counter: (props: Props$3) => preact.JSX.Element;
392
+ declare const Counter: (props: Props$5) => preact.JSX.Element;
391
393
 
392
- type Props$2 = {
394
+ type Props$4 = {
393
395
  value: boolean;
394
396
  label: string;
395
397
  onChange: (value: boolean) => void;
396
398
  focusable?: boolean;
397
399
  };
398
- declare const Toggle: (props: Props$2) => preact.JSX.Element;
400
+ declare const Toggle: (props: Props$4) => preact.JSX.Element;
399
401
 
400
- type Props$1 = {
402
+ type Props$3 = {
401
403
  href?: string;
402
404
  children: ComponentChildren;
403
405
  onClick?: (e: MouseEvent) => void;
404
406
  };
405
- declare const Link: (props: Props$1) => preact.JSX.Element;
407
+ declare const Link: (props: Props$3) => preact.JSX.Element;
406
408
 
407
409
  declare const Label: FunctionComponent;
408
410
 
@@ -422,7 +424,8 @@ declare const ReportLogo: (props: {
422
424
  }) => preact.JSX.Element;
423
425
 
424
426
  interface WidgetProps {
425
- title: string;
427
+ title?: string;
428
+ centerContent?: boolean;
426
429
  }
427
430
  declare const Widget: FunctionalComponent<WidgetProps>;
428
431
 
@@ -455,7 +458,7 @@ interface LanguagePickerProps {
455
458
  }
456
459
  declare const LanguagePicker: ({ locale, setLocale, availableLocales }: LanguagePickerProps) => preact.JSX.Element;
457
460
 
458
- type Theme = "light" | "dark";
461
+ type Theme = "light" | "dark" | "auto";
459
462
  interface ThemeButtonProps {
460
463
  theme: Theme;
461
464
  getTheme: () => void;
@@ -463,6 +466,14 @@ interface ThemeButtonProps {
463
466
  }
464
467
  declare const ThemeButton: ({ theme, toggleTheme, getTheme }: ThemeButtonProps) => preact.JSX.Element;
465
468
 
469
+ type Props$2 = {
470
+ icon: string;
471
+ tooltip?: string;
472
+ className?: string;
473
+ style?: "primary" | "secondary";
474
+ };
475
+ declare const IconLabel: FunctionalComponent<Props$2>;
476
+
466
477
  interface TrendChartWidgetPropsTranslations {
467
478
  "no-results": string;
468
479
  }
@@ -701,7 +712,7 @@ interface StabilityRateDistributionWidgetProps {
701
712
 
702
713
  declare const StabilityRateDistributionWidget: FunctionalComponent<StabilityRateDistributionWidgetProps>;
703
714
 
704
- type Props = {
715
+ type Props$1 = {
705
716
  data: {
706
717
  layer: string;
707
718
  testCount: number;
@@ -713,7 +724,53 @@ type Props = {
713
724
  width?: JSX.CSSProperties["width"];
714
725
  height?: JSX.CSSProperties["height"];
715
726
  };
716
- declare const TestingPyramidWidget: (props: Props) => JSX.Element;
727
+ declare const TestingPyramidWidget: (props: Props$1) => JSX.Element;
728
+
729
+ type I18nKeys = "status.passed" | "status.failed" | "status.skipped" | "status.unknown" | "status.broken" | "percentage" | "of" | "tests.new" | "tests.flaky" | "tests.retries" | "total";
730
+ type I18nProp = (key: I18nKeys, props?: Record<string, unknown>) => string;
731
+ type Props = {
732
+ title?: string;
733
+ i18n?: I18nProp;
734
+ data: Statistic;
735
+ statuses?: TestStatus[];
736
+ metric?: TestStatus;
737
+ };
738
+
739
+ declare const CurrentStatusChartWidget: FunctionalComponent<Props>;
740
+
741
+ type TimelineSegment = {
742
+ timeRange: [Date, Date];
743
+ val: number;
744
+ status: "failed" | "broken" | "passed" | "skipped" | "unknown";
745
+ label: string;
746
+ id: string;
747
+ };
748
+ type TimelineDataGroup = {
749
+ id: string;
750
+ name: string;
751
+ segments: TimelineSegment[];
752
+ };
753
+ type TimelineData = TimelineDataGroup[];
754
+ type TimelineChartData = TestResult[];
755
+
756
+ type TimelineProps = {
757
+ data?: TimelineData;
758
+ width?: number;
759
+ enableAnimations?: boolean;
760
+ translations: {
761
+ empty: string;
762
+ selected: (props: {
763
+ count: number;
764
+ percentage: string;
765
+ minDuration: string;
766
+ maxDuration: string;
767
+ }) => string;
768
+ };
769
+ };
770
+ declare const Timeline: FunctionComponent<Omit<TimelineProps, "data"> & {
771
+ data: TimelineChartData;
772
+ dataId: string;
773
+ }>;
717
774
 
718
- export { ArrowButton, Attachment, AttachmentCode, AttachmentEmpty, AttachmentImage, AttachmentVideo, BarChart, BarChartWidget, Button, Code, CodeViewer, ComingSoonChartWidget, Counter, 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, Grid, GridItem, Heading, HeatMap, HeatMapWidget, HtmlPreview, IconButton, Label, LanguagePicker, Link, Loadable, Menu, Modal, PageLoader, ReportLogo, ReportLogoFull, SearchBox, Spinner, StabilityRateDistributionWidget, StatusLabel, SuccessRatePieChart, SvgIcon, Tag, TestingPyramidWidget, Text, ThemeButton, Toggle, TooltipWrapper, Tree, TreeHeader, TreeItem, TreeItemIcon, TreeMapChart, TreeMapChartWidget, TreeSection, TreeStatusBar, TrendChart, TrendChartKind, TrendChartWidget, Widget, allureIcons, defaultBarChartAxisBottomConfig, defaultBarChartAxisLeftConfig, defaultBarChartConfig, defaultBarChartLegendsConfig, defaultBarChartMarginConfig, defaultHeatMapAxisLeftConfig, defaultHeatMapAxisTopConfig, defaultHeatMapLegendConfig, defaultHeatMapMarginConfig, defaultTreeChartConfig, defaultTrendChartAxisBottomConfig, defaultTrendChartAxisLeftConfig, defaultTrendChartConfig, defaultTrendChartLegendConfig, defaultTrendChartMarginConfig, defaultTrendChartXScaleConfig, defaultTrendChartYScaleConfig, makeSymlogScale, makeSymlogScaleBySeries };
775
+ export { ArrowButton, Attachment, AttachmentCode, AttachmentEmpty, AttachmentImage, AttachmentVideo, BarChart, BarChartWidget, Button, Code, CodeViewer, ComingSoonChartWidget, 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, Grid, GridItem, Heading, HeatMap, HeatMapWidget, HtmlPreview, IconButton, IconLabel, Label, LanguagePicker, Link, Loadable, Menu, Modal, PageLoader, ReportLogo, ReportLogoFull, SearchBox, Spinner, StabilityRateDistributionWidget, StatusLabel, SuccessRatePieChart, SvgIcon, Tag, TestingPyramidWidget, Text, ThemeButton, Timeline, Toggle, TooltipWrapper, Tree, TreeHeader, TreeItem, TreeItemIcon, TreeMapChart, TreeMapChartWidget, TreeSection, TreeStatusBar, TrendChart, TrendChartKind, TrendChartWidget, Widget, allureIcons, defaultBarChartAxisBottomConfig, defaultBarChartAxisLeftConfig, defaultBarChartConfig, defaultBarChartLegendsConfig, defaultBarChartMarginConfig, defaultHeatMapAxisLeftConfig, defaultHeatMapAxisTopConfig, defaultHeatMapLegendConfig, defaultHeatMapMarginConfig, defaultTreeChartConfig, defaultTrendChartAxisBottomConfig, defaultTrendChartAxisLeftConfig, defaultTrendChartConfig, defaultTrendChartLegendConfig, defaultTrendChartMarginConfig, defaultTrendChartXScaleConfig, defaultTrendChartYScaleConfig, makeSymlogScale, makeSymlogScaleBySeries };
719
776
  export type { BarChartProps, BarChartWidgetProps, ComingSoonChartWidgetProps, Datum, GridItemProps, GridProps, HeatMapProps, HeatMapWidgetProps, LanguagePickerProps, MeshTrendChartProps, ModalDataProps, ModalGalleryProps, ModalTranslations, ModalTranslationsProps, ParentLabelControlOptions, ResponsiveTreeChartProps, Serie, Slice, SlicesTrendChartProps, StabilityRateDistributionWidgetProps, SymlogScaleOptions, TagProps, TagSkin, Theme, ThemeButtonProps, TreeMapChartNode, TreeMapChartProps, TreeMapChartWidgetProps, TrendChartKindConfig, TrendChartProps, TrendChartSliceClickHandler, TrendChartSliceTouchHandler };