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

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 (37) hide show
  1. package/dist/components/ArrowButton/index.d.ts +2 -1
  2. package/dist/components/ArrowButton/index.d.ts.map +1 -1
  3. package/dist/components/Attachment/Attachment.d.ts.map +1 -1
  4. package/dist/components/Charts/SuccessRatePieChart/index.d.ts.map +1 -0
  5. package/dist/components/Charts/TrendChart/TrendChart.d.ts.map +1 -0
  6. package/dist/components/Charts/TrendChart/config.d.ts.map +1 -0
  7. package/dist/components/Charts/TrendChart/constants.d.ts.map +1 -0
  8. package/dist/components/Charts/TrendChart/index.d.ts.map +1 -0
  9. package/dist/components/Charts/TrendChart/theme.d.ts.map +1 -0
  10. package/dist/components/Charts/TrendChart/types.d.ts.map +1 -0
  11. package/dist/components/Charts/TrendChart/utils.d.ts.map +1 -0
  12. package/dist/components/Charts/TrendChartWidget/index.d.ts +23 -0
  13. package/dist/components/Charts/TrendChartWidget/index.d.ts.map +1 -0
  14. package/dist/components/Widget/index.d.ts +7 -0
  15. package/dist/components/Widget/index.d.ts.map +1 -0
  16. package/dist/index.css +1 -1
  17. package/dist/index.d.ts +84 -52
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +10 -10
  20. package/dist/index.js.map +1 -1
  21. package/package.json +3 -3
  22. package/dist/components/SuccessRatePieChart/index.d.ts.map +0 -1
  23. package/dist/components/TrendChart/TrendChart.d.ts.map +0 -1
  24. package/dist/components/TrendChart/config.d.ts.map +0 -1
  25. package/dist/components/TrendChart/constants.d.ts.map +0 -1
  26. package/dist/components/TrendChart/index.d.ts.map +0 -1
  27. package/dist/components/TrendChart/theme.d.ts.map +0 -1
  28. package/dist/components/TrendChart/types.d.ts.map +0 -1
  29. package/dist/components/TrendChart/utils.d.ts.map +0 -1
  30. /package/dist/components/{SuccessRatePieChart → Charts/SuccessRatePieChart}/index.d.ts +0 -0
  31. /package/dist/components/{TrendChart → Charts/TrendChart}/TrendChart.d.ts +0 -0
  32. /package/dist/components/{TrendChart → Charts/TrendChart}/config.d.ts +0 -0
  33. /package/dist/components/{TrendChart → Charts/TrendChart}/constants.d.ts +0 -0
  34. /package/dist/components/{TrendChart → Charts/TrendChart}/index.d.ts +0 -0
  35. /package/dist/components/{TrendChart → Charts/TrendChart}/theme.d.ts +0 -0
  36. /package/dist/components/{TrendChart → Charts/TrendChart}/types.d.ts +0 -0
  37. /package/dist/components/{TrendChart → Charts/TrendChart}/utils.d.ts +0 -0
package/dist/index.d.ts CHANGED
@@ -10,14 +10,18 @@ export { AttachmentImage } from '@/components/Attachment/AttachmentImage';
10
10
  export { AttachmentVideo } from '@/components/Attachment/AttachmentVideo';
11
11
  export { AttachmentEmpty } from '@/components/Attachment/AttachmentEmpty';
12
12
  export { CodeViewer } from '@/components/Attachment/CodeViewer';
13
+ import * as preact_compat from 'preact/compat';
14
+ import { HTMLAttributes, CSSProperties } from 'preact/compat';
15
+ import { Options } from 'sortablejs';
16
+ import { LangLocale } from '@allurereport/web-commons';
17
+ import { Serie as Serie$1 } from '@/components/Charts/TrendChart';
18
+ import * as d3_shape from 'd3-shape';
19
+ import { PieArcDatum } from 'd3-shape';
13
20
  import { AxisProps } from '@nivo/axes';
14
- import { Datum as Datum$1, Serie as Serie$1, LineSvgProps, Point } from '@nivo/line';
21
+ import { Datum as Datum$1, Serie as Serie$2, LineSvgProps, Point } from '@nivo/line';
15
22
  import { ScaleSymlogSpec, ScaleSpec } from '@nivo/scales';
16
- import { CSSProperties, HTMLAttributes } from 'preact/compat';
17
23
  import { Margin } from '@nivo/core';
18
24
  import { LegendProps } from '@nivo/legends';
19
- import { Options } from 'sortablejs';
20
- import { LangLocale } from '@allurereport/web-commons';
21
25
 
22
26
  declare const allureIcons: {
23
27
  arrowsChevronDown: string;
@@ -227,6 +231,7 @@ interface ArrowButtonProps {
227
231
  className?: string;
228
232
  icon?: string;
229
233
  onClick?: VoidFunction;
234
+ tag?: keyof JSX.IntrinsicElements;
230
235
  }
231
236
  declare const ArrowButton: FunctionalComponent<ArrowButtonProps>;
232
237
 
@@ -337,6 +342,77 @@ type Props = {
337
342
  };
338
343
  declare const Link: (props: Props) => preact.JSX.Element;
339
344
 
345
+ declare const Label: FunctionComponent;
346
+
347
+ type StatusLabelProps = {
348
+ status: TestStatus;
349
+ className?: string;
350
+ };
351
+ declare const StatusLabel: FunctionalComponent<StatusLabelProps>;
352
+
353
+ declare const ReportLogoFull: (props: {
354
+ className?: string;
355
+ }) => preact.JSX.Element;
356
+
357
+ declare const ReportLogo: (props: {
358
+ className?: string;
359
+ logo?: string;
360
+ }) => preact.JSX.Element;
361
+
362
+ interface WidgetProps {
363
+ title: string;
364
+ }
365
+ declare const Widget: FunctionalComponent<WidgetProps>;
366
+
367
+ type GridKind = "default" | "swap";
368
+ interface GridProps extends HTMLAttributes<HTMLDivElement> {
369
+ options?: Options;
370
+ kind?: GridKind;
371
+ className?: string;
372
+ }
373
+ declare const Grid: FunctionComponent<GridProps>;
374
+
375
+ interface GridItemProps extends HTMLAttributes<HTMLDivElement> {
376
+ className?: string;
377
+ dndEnabled?: boolean;
378
+ }
379
+ declare const GridItem: FunctionComponent<GridItemProps>;
380
+
381
+ interface LanguagePickerProps {
382
+ locale: LangLocale;
383
+ setLocale: (locale: LangLocale) => void;
384
+ availableLocales?: LangLocale[];
385
+ }
386
+ declare const LanguagePicker: ({ locale, setLocale, availableLocales }: LanguagePickerProps) => preact.JSX.Element;
387
+
388
+ type Theme = "light" | "dark";
389
+ interface ThemeButtonProps {
390
+ theme: Theme;
391
+ getTheme: () => void;
392
+ toggleTheme: () => void;
393
+ }
394
+ declare const ThemeButton: ({ theme, toggleTheme, getTheme }: ThemeButtonProps) => preact.JSX.Element;
395
+
396
+ interface TrendChartWidgetPropsTranslations {
397
+ "no-results": string;
398
+ }
399
+ interface TrendChartWidgetProps<TSlice = {
400
+ metadata: {
401
+ executionId: string;
402
+ };
403
+ }> {
404
+ title: string;
405
+ items: readonly Serie$1[];
406
+ slices: readonly TSlice[];
407
+ min: number;
408
+ max: number;
409
+ height?: CSSProperties["height"];
410
+ width?: CSSProperties["width"];
411
+ rootAriaLabel?: string;
412
+ translations: TrendChartWidgetPropsTranslations;
413
+ }
414
+ declare const TrendChartWidget: ({ title, items, slices, min, max, height, width, rootAriaLabel, translations, }: TrendChartWidgetProps) => preact_compat.JSX.Element;
415
+
340
416
  type Slice$1 = {
341
417
  status: TestStatus;
342
418
  count: number;
@@ -349,17 +425,17 @@ type SuccessRatePieChartData = {
349
425
  type SuccessRatePieChartProps = SuccessRatePieChartData & {
350
426
  className?: string;
351
427
  };
428
+ declare const d3Arc: d3_shape.Arc<any, PieArcDatum<Slice$1>>;
429
+ declare const d3Pie: d3_shape.Pie<any, Slice$1>;
352
430
  declare const getPercentage: (value: number, total: number) => number;
353
431
  declare const getChartData: (stats: Statistic) => SuccessRatePieChartData;
354
432
  declare const SuccessRatePieChart: ({ slices, percentage, className }: SuccessRatePieChartProps) => preact.JSX.Element;
355
433
 
356
- declare const Label: FunctionComponent;
357
-
358
434
  type Datum = Omit<Datum$1, "x" | "y"> & {
359
435
  x: string | number | Date;
360
436
  y: number;
361
437
  };
362
- type Serie = Omit<Serie$1, "id" | "data"> & {
438
+ type Serie = Omit<Serie$2, "id" | "data"> & {
363
439
  id: string | number;
364
440
  data: readonly Datum[];
365
441
  };
@@ -416,48 +492,4 @@ declare const defaultTrendChartConfig: Partial<LineSvgProps>;
416
492
  declare const makeSymlogScale: (min: number, max: number, options?: SymlogScaleOptions) => ScaleSymlogSpec;
417
493
  declare const makeSymlogScaleBySeries: (series: Serie[], options?: SymlogScaleOptions) => ScaleSymlogSpec;
418
494
 
419
- type StatusLabelProps = {
420
- status: TestStatus;
421
- className?: string;
422
- };
423
- declare const StatusLabel: FunctionalComponent<StatusLabelProps>;
424
-
425
- declare const ReportLogoFull: (props: {
426
- className?: string;
427
- }) => preact.JSX.Element;
428
-
429
- declare const ReportLogo: (props: {
430
- className?: string;
431
- logo?: string;
432
- }) => preact.JSX.Element;
433
-
434
- type GridKind = "default" | "swap";
435
- interface GridProps extends HTMLAttributes<HTMLDivElement> {
436
- options?: Options;
437
- kind?: GridKind;
438
- className?: string;
439
- }
440
- declare const Grid: FunctionComponent<GridProps>;
441
-
442
- interface GridItemProps extends HTMLAttributes<HTMLDivElement> {
443
- className?: string;
444
- dndEnabled?: boolean;
445
- }
446
- declare const GridItem: FunctionComponent<GridItemProps>;
447
-
448
- interface LanguagePickerProps {
449
- locale: LangLocale;
450
- setLocale: (locale: LangLocale) => void;
451
- availableLocales?: LangLocale[];
452
- }
453
- declare const LanguagePicker: ({ locale, setLocale, availableLocales }: LanguagePickerProps) => preact.JSX.Element;
454
-
455
- type Theme = "light" | "dark";
456
- interface ThemeButtonProps {
457
- theme: Theme;
458
- getTheme: () => void;
459
- toggleTheme: () => void;
460
- }
461
- declare const ThemeButton: ({ theme, toggleTheme, getTheme }: ThemeButtonProps) => preact.JSX.Element;
462
-
463
- 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, 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, allureIcons, defaultTrendChartAxisBottomConfig, defaultTrendChartAxisLeftConfig, defaultTrendChartConfig, defaultTrendChartLegendConfig, defaultTrendChartMarginConfig, defaultTrendChartXScaleConfig, defaultTrendChartYScaleConfig, getChartData, getPercentage, makeSymlogScale, makeSymlogScaleBySeries };
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 };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAC;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAs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