@allurereport/web-components 3.0.0-beta.15 → 3.0.0-beta.16

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,24 +1,17 @@
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 } from '@allurereport/core-api';
4
+ import { AttachmentTestStepResult, Statistic, TestStatus, TestStatusTransition } from '@allurereport/core-api';
5
5
  import { RecursiveTree, Status } from 'global';
6
- export { Attachment } from '@/components/Attachment/Attachment';
7
- export { AttachmentCode } from '@/components/Attachment/AttachmentCode';
8
- export { HtmlPreview } from '@/components/Attachment/HtmlPreview';
9
- export { AttachmentImage } from '@/components/Attachment/AttachmentImage';
10
- export { AttachmentVideo } from '@/components/Attachment/AttachmentVideo';
11
- export { AttachmentEmpty } from '@/components/Attachment/AttachmentEmpty';
12
- export { CodeViewer } from '@/components/Attachment/CodeViewer';
13
6
  import * as preact_compat from 'preact/compat';
14
7
  import { HTMLAttributes, CSSProperties } from 'preact/compat';
15
8
  import { Options } from 'sortablejs';
16
- import { LangLocale } from '@allurereport/web-commons';
9
+ import { LangLocale, ChartMode } from '@allurereport/web-commons';
17
10
  import { Serie as Serie$1 } from '@/components/Charts/TrendChart';
18
11
  import * as d3_shape from 'd3-shape';
19
12
  import { PieArcDatum } from 'd3-shape';
20
13
  import { AxisProps } from '@nivo/axes';
21
- import { Datum as Datum$1, Serie as Serie$2, LineSvgProps, Point } from '@nivo/line';
14
+ import { Serie as Serie$2, Datum as Datum$1, LineSvgProps, Point } from '@nivo/line';
22
15
  import { ScaleSymlogSpec, ScaleSpec } from '@nivo/scales';
23
16
  import { Margin } from '@nivo/core';
24
17
  import { LegendProps } from '@nivo/legends';
@@ -30,6 +23,10 @@ declare const allureIcons: {
30
23
  draggable: string;
31
24
  lineAlertsAlertCircle: string;
32
25
  lineAlertsNotificationBox: string;
26
+ lineAlertsNew: string;
27
+ lineAlertsMalfunctioned: string;
28
+ lineAlertsFixed: string;
29
+ lineAlertsRegressed: string;
33
30
  lineArrowsChevronDown: string;
34
31
  lineArrowsChevronDownDouble: string;
35
32
  lineArrowsChevronRight: string;
@@ -82,9 +79,15 @@ declare const allureIcons: {
82
79
  solidHelpCircle: string;
83
80
  solidMinusCircle: string;
84
81
  solidXCircle: string;
82
+ solidPlusCircle: string;
85
83
  spinner: string;
86
84
  view: string;
87
85
  viewOff: string;
86
+ lineGeneralCheckCircle: string;
87
+ lineGeneralHelpCircle: string;
88
+ lineGeneralInfoCircle: string;
89
+ lineGeneralMinusCircle: string;
90
+ lineGeneralXCircle: string;
88
91
  };
89
92
  type SvgIconProps = Omit<JSX.HTMLAttributes<SVGElement>, "className" | "id" | "size" | "inline"> & {
90
93
  "size"?: "xs" | "s" | "m";
@@ -111,6 +114,8 @@ type BaseBtnProps = {
111
114
  isDisabled?: boolean;
112
115
  isActive?: boolean;
113
116
  focusable?: boolean;
117
+ href?: string;
118
+ target?: HTMLAnchorElement["target"];
114
119
  className?: string;
115
120
  dataTestId?: string;
116
121
  };
@@ -295,6 +300,9 @@ interface TreeItemProps {
295
300
  duration?: number;
296
301
  retriesCount?: number;
297
302
  flaky?: boolean;
303
+ transition?: TestStatusTransition;
304
+ transitionText?: string;
305
+ transitionTooltip?: string;
298
306
  id: string;
299
307
  groupOrder: number;
300
308
  marked?: boolean;
@@ -303,7 +311,7 @@ interface TreeItemProps {
303
311
  declare const TreeItem: FunctionComponent<TreeItemProps>;
304
312
 
305
313
  interface TestStatusIconProps {
306
- status?: "failed" | "broken" | "passed" | "skipped" | "unknown";
314
+ status?: TestStatus;
307
315
  className?: string;
308
316
  classNameIcon?: string;
309
317
  }
@@ -319,6 +327,50 @@ interface TreeStatusBarProps {
319
327
  }
320
328
  declare const TreeStatusBar: FunctionalComponent<TreeStatusBarProps>;
321
329
 
330
+ interface AttachmentTestStepResultProps {
331
+ item: AttachmentTestStepResult;
332
+ previewable?: boolean;
333
+ }
334
+ declare const Attachment: FunctionalComponent<AttachmentTestStepResultProps>;
335
+
336
+ declare const AttachmentCode: FunctionalComponent<{
337
+ item: AttachmentTestStepResult;
338
+ attachment: {
339
+ text?: string;
340
+ };
341
+ }>;
342
+
343
+ type HtmlAttachmentPreviewProps = {
344
+ attachment: {
345
+ text: string;
346
+ };
347
+ };
348
+ declare const HtmlPreview: FunctionalComponent<HtmlAttachmentPreviewProps>;
349
+
350
+ declare const AttachmentImage: FunctionalComponent<{
351
+ attachment: {
352
+ img: string;
353
+ originalFileName: string;
354
+ };
355
+ }>;
356
+
357
+ declare const AttachmentVideo: FunctionalComponent<{
358
+ attachment: {
359
+ src: string;
360
+ contentType?: string;
361
+ };
362
+ }>;
363
+
364
+ declare const AttachmentEmpty: ({ children }: {
365
+ children: ComponentChildren;
366
+ }) => preact.JSX.Element;
367
+
368
+ declare const CodeViewer: FunctionalComponent<{
369
+ code?: string;
370
+ children?: ComponentChildren;
371
+ className?: string;
372
+ }>;
373
+
322
374
  type Props$2 = {
323
375
  size?: "s" | "m" | "l";
324
376
  count: number;
@@ -402,6 +454,7 @@ interface TrendChartWidgetProps<TSlice = {
402
454
  };
403
455
  }> {
404
456
  title: string;
457
+ mode: ChartMode;
405
458
  items: readonly Serie$1[];
406
459
  slices: readonly TSlice[];
407
460
  min: number;
@@ -411,7 +464,7 @@ interface TrendChartWidgetProps<TSlice = {
411
464
  rootAriaLabel?: string;
412
465
  translations: TrendChartWidgetPropsTranslations;
413
466
  }
414
- declare const TrendChartWidget: ({ title, items, slices, min, max, height, width, rootAriaLabel, translations, }: TrendChartWidgetProps) => preact_compat.JSX.Element;
467
+ declare const TrendChartWidget: ({ title, mode, items, slices, min, max, height, width, rootAriaLabel, translations, }: TrendChartWidgetProps) => preact_compat.JSX.Element;
415
468
 
416
469
  type Slice$1 = {
417
470
  status: TestStatus;
@@ -492,4 +545,5 @@ declare const defaultTrendChartConfig: Partial<LineSvgProps>;
492
545
  declare const makeSymlogScale: (min: number, max: number, options?: SymlogScaleOptions) => ScaleSymlogSpec;
493
546
  declare const makeSymlogScaleBySeries: (series: Serie[], options?: SymlogScaleOptions) => ScaleSymlogSpec;
494
547
 
495
- export { ArrowButton, Button, Code, Counter, type Datum, DropdownButton, Grid, GridItem, type GridItemProps, type GridProps, Heading, IconButton, Label, LanguagePicker, type LanguagePickerProps, Link, Loadable, Menu, type MeshTrendChartProps, Modal, type ModalDataProps, type ModalGalleryProps, type ModalTranslations, type ModalTranslationsProps, PageLoader, ReportLogo, ReportLogoFull, SearchBox, type Serie, type Slice, type SlicesTrendChartProps, Spinner, StatusLabel, SuccessRatePieChart, type SuccessRatePieChartData, SvgIcon, type SymlogScaleOptions, Text, type Theme, ThemeButton, type ThemeButtonProps, Toggle, TooltipWrapper, Tree, TreeHeader, TreeItem, TreeItemIcon, TreeSection, TreeStatusBar, TrendChart, TrendChartKind, type TrendChartKindConfig, type TrendChartProps, type TrendChartSliceClickHandler, type TrendChartSliceTouchHandler, TrendChartWidget, Widget, allureIcons, d3Arc, d3Pie, defaultTrendChartAxisBottomConfig, defaultTrendChartAxisLeftConfig, defaultTrendChartConfig, defaultTrendChartLegendConfig, defaultTrendChartMarginConfig, defaultTrendChartXScaleConfig, defaultTrendChartYScaleConfig, getChartData, getPercentage, makeSymlogScale, makeSymlogScaleBySeries };
548
+ export { ArrowButton, Attachment, AttachmentCode, AttachmentEmpty, AttachmentImage, AttachmentVideo, Button, Code, CodeViewer, Counter, DropdownButton, Grid, GridItem, Heading, HtmlPreview, IconButton, Label, LanguagePicker, Link, Loadable, Menu, Modal, PageLoader, ReportLogo, ReportLogoFull, SearchBox, Spinner, StatusLabel, SuccessRatePieChart, SvgIcon, Text, ThemeButton, Toggle, TooltipWrapper, Tree, TreeHeader, TreeItem, TreeItemIcon, TreeSection, TreeStatusBar, TrendChart, TrendChartKind, TrendChartWidget, Widget, allureIcons, d3Arc, d3Pie, defaultTrendChartAxisBottomConfig, defaultTrendChartAxisLeftConfig, defaultTrendChartConfig, defaultTrendChartLegendConfig, defaultTrendChartMarginConfig, defaultTrendChartXScaleConfig, defaultTrendChartYScaleConfig, getChartData, getPercentage, makeSymlogScale, makeSymlogScaleBySeries };
549
+ export type { Datum, GridItemProps, GridProps, LanguagePickerProps, MeshTrendChartProps, ModalDataProps, ModalGalleryProps, ModalTranslations, ModalTranslationsProps, Serie, Slice, SlicesTrendChartProps, SuccessRatePieChartData, SymlogScaleOptions, Theme, ThemeButtonProps, TrendChartKindConfig, TrendChartProps, TrendChartSliceClickHandler, TrendChartSliceTouchHandler };