@allurereport/web-components 3.3.1 → 3.4.1

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,5 +1,5 @@
1
1
  import * as preact from 'preact';
2
- import { SVGAttributes, ComponentChild, JSX, FunctionalComponent, HTMLAttributes, VNode, ComponentChildren, FunctionComponent, ComponentProps } from 'preact';
2
+ import { SVGAttributes, ComponentChild, Ref, FunctionalComponent, JSX, HTMLAttributes, VNode, ComponentChildren, FunctionComponent, ComponentProps } from 'preact';
3
3
  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';
@@ -11,7 +11,7 @@ import { Options } from 'sortablejs';
11
11
  import { ChartMode, PieChartValues, TreeMapNode, ChartType, StabilityDistributionChartData, TestBaseGrowthDynamicsChartData, StatusAgePyramidChartData, StatusTransitionsChartData, DurationsChartData, TrSeveritiesChartData, DurationDynamicsChartData } from '@allurereport/charts-api';
12
12
  import { Serie as Serie$1 } from '@/components/Charts/TrendChart';
13
13
  import { AxisProps } from '@nivo/axes';
14
- import { Serie as Serie$2, Datum as Datum$1, LineSvgProps, Point } from '@nivo/line';
14
+ import { Datum as Datum$1, LineSvgProps, Point, Serie as Serie$2 } from '@nivo/line';
15
15
  import { ScaleSymlogSpec, ScaleSpec } from '@nivo/scales';
16
16
  import { Margin } from '@nivo/core';
17
17
  import { LegendProps, AnchoredContinuousColorsLegendProps } from '@nivo/legends';
@@ -135,6 +135,8 @@ type BaseBtnProps = {
135
135
  leadingSlot?: ComponentChild;
136
136
  trailingSlot?: ComponentChild;
137
137
  isLink?: boolean;
138
+ isTextTruncated?: boolean;
139
+ textRef?: Ref<HTMLSpanElement>;
138
140
  };
139
141
  type ButtonProps = Omit<BaseBtnProps, "text" | "isIconButton" | "isDropdownButton" | "rounded" | "isLink"> & Pick<Required<BaseBtnProps>, "text">;
140
142
  declare const Button: (props: ButtonProps) => preact.JSX.Element;
@@ -204,6 +206,14 @@ declare const useTooltip: <TriggerRef extends HTMLElement = HTMLElement, Tooltip
204
206
  }) => void;
205
207
  declare const TooltipWrapper: FunctionalComponent<TooltipWrapperProps>;
206
208
 
209
+ type UseElementTruncationOptions = {
210
+ observeResize?: boolean;
211
+ };
212
+ declare const useElementTruncation: <T extends HTMLElement>(dependencies: ReadonlyArray<unknown>, options?: UseElementTruncationOptions) => {
213
+ ref: (node: T | null) => void;
214
+ isTruncated: boolean;
215
+ };
216
+
207
217
  interface StoreSignalState<T> {
208
218
  error?: string;
209
219
  loading: boolean;
@@ -286,13 +296,14 @@ interface ModalDataProps<T = any> {
286
296
  }
287
297
  interface ModalTranslations {
288
298
  tooltipPreview: string;
299
+ tooltipSyntaxHighlight?: string;
289
300
  tooltipDownload: string;
290
301
  openInNewTabButton: string;
291
302
  }
292
303
  interface ModalTranslationsProps {
293
304
  translations: ModalTranslations;
294
305
  }
295
- declare const Modal: ({ data, isModalOpen, preview, component, attachments, closeModal, translations, title, }: ModalDataProps & ModalTranslationsProps) => preact.JSX.Element | null;
306
+ declare const Modal: ({ data, isModalOpen, preview: initialPreview, component, attachments, closeModal, translations, title, }: ModalDataProps & ModalTranslationsProps) => preact.JSX.Element | null;
296
307
 
297
308
  interface TreeProps {
298
309
  statistic?: Statistic;
@@ -388,11 +399,14 @@ type I18nProp$a = {
388
399
  interface AttachmentTestStepResultProps {
389
400
  item: AttachmentTestStepResult;
390
401
  previewable?: boolean;
402
+ highlightCode?: boolean;
391
403
  i18n?: I18nProp$a;
392
404
  }
393
405
  declare const Attachment: (props: AttachmentTestStepResultProps) => preact.JSX.Element | null;
394
406
 
395
- declare const AttachmentCode: (props: AttachmentProps) => preact.JSX.Element | null;
407
+ declare const AttachmentCode: (props: AttachmentProps & {
408
+ highlight?: boolean;
409
+ }) => preact.JSX.Element | null;
396
410
 
397
411
  type HtmlAttachmentPreviewProps = {
398
412
  attachment: {
@@ -869,5 +883,5 @@ type Props = {
869
883
  };
870
884
  declare const EmptyView: FunctionalComponent<Props>;
871
885
 
872
- export { ArrowButton, Attachment, AttachmentCode, AttachmentEmpty, AttachmentImage, 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, IconButton, IconLabel, ImageDiff, Label, LanguagePicker, Link, Loadable, 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, useSuccessRateDistributionColors, useTheme, useTooltip };
886
+ export { ArrowButton, Attachment, AttachmentCode, AttachmentEmpty, AttachmentImage, 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, IconButton, IconLabel, ImageDiff, Label, LanguagePicker, Link, Loadable, 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 };
873
887
  export type { Datum, GridItemProps, GridProps, HeatMapProps, HeatMapWidgetProps, LanguagePickerProps, MeshTrendChartProps, ModalDataProps, ModalGalleryProps, ModalTranslations, ModalTranslationsProps, ParentLabelControlOptions, ReportSummaryCardProps, ResponsiveTreeChartProps, Serie, Slice, SlicesTrendChartProps, SymlogScaleOptions, TagProps, TagSkin, Theme, ThemeButtonProps, TreeMapChartNode, TreeMapChartProps, TreeMapChartWidgetProps, TrendChartKindConfig, TrendChartProps, TrendChartSliceClickHandler, TrendChartSliceTouchHandler };