@allurereport/web-components 3.0.0-beta.10 → 3.0.0-beta.11

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 (32) hide show
  1. package/dist/components/ArrowButton/index.d.ts +1 -0
  2. package/dist/components/ArrowButton/index.d.ts.map +1 -1
  3. package/dist/components/Button/index.d.ts +1 -1
  4. package/dist/components/Button/index.d.ts.map +1 -1
  5. package/dist/components/Modal/index.d.ts +1 -1
  6. package/dist/components/Modal/index.d.ts.map +1 -1
  7. package/dist/components/ReportLogo/index.d.ts +5 -0
  8. package/dist/components/ReportLogo/index.d.ts.map +1 -0
  9. package/dist/components/ReportLogoFull/index.d.ts +4 -0
  10. package/dist/components/ReportLogoFull/index.d.ts.map +1 -0
  11. package/dist/components/StatusLabel/index.d.ts +8 -0
  12. package/dist/components/StatusLabel/index.d.ts.map +1 -0
  13. package/dist/components/SuccessRatePieChart/index.d.ts +12 -4
  14. package/dist/components/SuccessRatePieChart/index.d.ts.map +1 -1
  15. package/dist/components/SvgIcon/index.d.ts +4 -0
  16. package/dist/components/SvgIcon/index.d.ts.map +1 -1
  17. package/dist/components/Tree/Tree.d.ts +4 -7
  18. package/dist/components/Tree/Tree.d.ts.map +1 -1
  19. package/dist/components/Tree/TreeHeader.d.ts +3 -5
  20. package/dist/components/Tree/TreeHeader.d.ts.map +1 -1
  21. package/dist/components/Tree/TreeSection.d.ts +10 -0
  22. package/dist/components/Tree/TreeSection.d.ts.map +1 -0
  23. package/dist/components/Tree/TreeStatusBar.d.ts +14 -0
  24. package/dist/components/Tree/TreeStatusBar.d.ts.map +1 -0
  25. package/dist/components/Tree/index.d.ts +2 -0
  26. package/dist/components/Tree/index.d.ts.map +1 -1
  27. package/dist/index.css +1 -1
  28. package/dist/index.d.ts +71 -21
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +4 -4
  31. package/dist/index.js.map +1 -1
  32. package/package.json +3 -3
package/dist/index.d.ts CHANGED
@@ -2,8 +2,7 @@ import * as preact from 'preact';
2
2
  import { JSX, FunctionalComponent, VNode, ComponentChildren, FunctionComponent } from 'preact';
3
3
  import { Signal } from '@preact/signals';
4
4
  import { AttachmentTestStepResult, Statistic, TestStatus } from '@allurereport/core-api';
5
- import { RecursiveTree, Status, TreeFiltersState } from 'global';
6
- import { StoreSignalState as StoreSignalState$1 } from '@/components/Loadable';
5
+ import { RecursiveTree, Status } from 'global';
7
6
  export { Attachment } from '@/components/Attachment/Attachment';
8
7
  export { AttachmentCode } from '@/components/Attachment/AttachmentCode';
9
8
  export { HtmlPreview } from '@/components/Attachment/HtmlPreview';
@@ -18,6 +17,7 @@ import { CSSProperties } from 'preact/compat';
18
17
 
19
18
  declare const allureIcons: {
20
19
  arrowsChevronDown: string;
20
+ environment: string;
21
21
  github: string;
22
22
  lineAlertsAlertCircle: string;
23
23
  lineAlertsNotificationBox: string;
@@ -59,11 +59,14 @@ declare const allureIcons: {
59
59
  lineImagesImage: string;
60
60
  lineLayoutsColumn2: string;
61
61
  lineLayoutsLayoutTop: string;
62
+ lineLayoutsMaximize2: string;
63
+ lineLayoutsMinimize2: string;
62
64
  lineSecurityKey: string;
63
65
  lineShapesDotCircle: string;
64
66
  lineShapesMoon: string;
65
67
  lineShapesSun: string;
66
68
  lineTimeClockStopwatch: string;
69
+ playwrightLogo: string;
67
70
  reportLogo: string;
68
71
  solidAlertCircle: string;
69
72
  solidCheckCircle: string;
@@ -105,7 +108,7 @@ type ButtonProps = Omit<BaseBtnProps, "text" | "isIconButton" | "isDropdownButto
105
108
  declare const Button: (props: ButtonProps) => preact.JSX.Element;
106
109
  type IconButtonProps = Omit<BaseBtnProps, "text" | "icon" | "autoFocus" | "fullWidth" | "isIconButton" | "isDropdownButton"> & Pick<Required<BaseBtnProps>, "icon">;
107
110
  declare const IconButton: (props: IconButtonProps) => preact.JSX.Element;
108
- type DropdownButtonProps = Omit<BaseBtnProps, "type" | "autoFocus" | "isDropdownButton" | "isIconButton" | "text" | "icon" | "isActive"> & Pick<Required<BaseBtnProps>, "text"> & {
111
+ type DropdownButtonProps = Omit<BaseBtnProps, "type" | "autoFocus" | "isDropdownButton" | "isIconButton" | "text" | "isActive"> & Pick<Required<BaseBtnProps>, "text"> & {
109
112
  isExpanded?: boolean;
110
113
  };
111
114
  declare const DropdownButton: (props: DropdownButtonProps) => preact.JSX.Element;
@@ -170,7 +173,7 @@ declare const Loadable: <T, K = T>(props: LoadableProps<T, K>) => JSX.Element |
170
173
 
171
174
  declare const PageLoader: () => preact.JSX.Element;
172
175
 
173
- type Props$4 = {
176
+ type Props$3 = {
174
177
  placeholder?: string;
175
178
  invalid?: string;
176
179
  error?: string;
@@ -178,7 +181,7 @@ type Props$4 = {
178
181
  onChange: (value: string) => void;
179
182
  changeDebounce?: number;
180
183
  };
181
- declare const SearchBox: (props: Props$4) => preact.JSX.Element;
184
+ declare const SearchBox: (props: Props$3) => preact.JSX.Element;
182
185
 
183
186
  declare const Menu: {
184
187
  (props: {
@@ -211,11 +214,21 @@ type ItemProps = {
211
214
  setIsOpened?: (isOpened: boolean) => void;
212
215
  };
213
216
 
217
+ interface ArrowButtonProps {
218
+ isOpened?: boolean;
219
+ iconSize?: "m" | "xs" | "s";
220
+ buttonSize?: "m" | "xs" | "s";
221
+ className?: string;
222
+ icon?: string;
223
+ onClick?: VoidFunction;
224
+ }
225
+ declare const ArrowButton: FunctionalComponent<ArrowButtonProps>;
226
+
214
227
  type ModalGalleryProps = {
215
228
  attachments: AttachmentTestStepResult[] | undefined;
216
229
  };
217
230
  interface ModalDataProps<T = any> {
218
- data: T;
231
+ data?: T;
219
232
  component: VNode;
220
233
  preview?: boolean;
221
234
  isModalOpen?: boolean;
@@ -235,6 +248,7 @@ declare const Modal: ({ data, isModalOpen, preview, component, attachments, clos
235
248
 
236
249
  interface TreeProps {
237
250
  statistic?: Statistic;
251
+ reportStatistic?: Statistic;
238
252
  tree: RecursiveTree;
239
253
  name?: string;
240
254
  root?: boolean;
@@ -243,21 +257,27 @@ interface TreeProps {
243
257
  toggleTree: (id: string) => void;
244
258
  navigateTo: (id: string) => void;
245
259
  routeId?: string;
246
- statsStore: Signal<StoreSignalState$1<Statistic>>;
247
- treeFiltersStore: Signal<TreeFiltersState>;
248
260
  }
249
- declare const Tree: FunctionComponent<TreeProps>;
261
+ declare const Tree: FunctionalComponent<TreeProps>;
250
262
 
251
263
  interface TreeHeaderProps {
252
264
  statistic?: Statistic;
265
+ reportStatistic?: Statistic;
253
266
  categoryTitle: string;
254
267
  isOpened: boolean;
255
268
  toggleTree: () => void;
256
- statsStore: Signal<StoreSignalState$1<Statistic>>;
257
- treeFiltersStore: TreeFiltersState;
269
+ statusFilter?: Status;
258
270
  }
259
271
  declare const TreeHeader: FunctionComponent<TreeHeaderProps>;
260
272
 
273
+ interface TreeSectionProps {
274
+ title: string;
275
+ isOpened: boolean;
276
+ toggleTree: () => void;
277
+ icon?: string;
278
+ }
279
+ declare const TreeSection: FunctionComponent<TreeSectionProps>;
280
+
261
281
  interface TreeItemProps {
262
282
  name: string;
263
283
  status: TestStatus;
@@ -276,39 +296,54 @@ interface TestStatusIconProps {
276
296
  }
277
297
  declare const TreeItemIcon: FunctionalComponent<TestStatusIconProps>;
278
298
 
279
- type Props$3 = {
299
+ interface TreeStatusBarProps {
300
+ statistic?: Statistic;
301
+ reportStatistic?: Statistic;
302
+ maxWidth?: number;
303
+ minWidth?: number;
304
+ offset?: number;
305
+ statusFilter?: Status;
306
+ }
307
+ declare const TreeStatusBar: FunctionalComponent<TreeStatusBarProps>;
308
+
309
+ type Props$2 = {
280
310
  size?: "s" | "m" | "l";
281
311
  count: number;
282
312
  truncateCount?: boolean;
283
313
  status?: TestStatus;
284
314
  };
285
- declare const Counter: (props: Props$3) => preact.JSX.Element;
315
+ declare const Counter: (props: Props$2) => preact.JSX.Element;
286
316
 
287
- type Props$2 = {
317
+ type Props$1 = {
288
318
  value: boolean;
289
319
  label: string;
290
320
  onChange: (value: boolean) => void;
291
321
  focusable?: boolean;
292
322
  };
293
- declare const Toggle: (props: Props$2) => preact.JSX.Element;
323
+ declare const Toggle: (props: Props$1) => preact.JSX.Element;
294
324
 
295
- type Props$1 = {
325
+ type Props = {
296
326
  href?: string;
297
327
  children: ComponentChildren;
298
328
  onClick?: (e: MouseEvent) => void;
299
329
  };
300
- declare const Link: (props: Props$1) => preact.JSX.Element;
330
+ declare const Link: (props: Props) => preact.JSX.Element;
301
331
 
302
332
  type Slice = {
303
333
  status: TestStatus;
304
334
  count: number;
305
335
  d: string;
306
336
  };
307
- type Props = {
308
- slices: Slice[];
337
+ type SuccessRatePieChartData = {
309
338
  percentage: number;
339
+ slices: Slice[];
340
+ };
341
+ type SuccessRatePieChartProps = SuccessRatePieChartData & {
342
+ className?: string;
310
343
  };
311
- declare const SuccessRatePieChart: (props: Props) => preact.JSX.Element;
344
+ declare const getPercentage: (value: number, total: number) => number;
345
+ declare const getChartData: (stats: Statistic) => SuccessRatePieChartData;
346
+ declare const SuccessRatePieChart: ({ slices, percentage, className }: SuccessRatePieChartProps) => preact.JSX.Element;
312
347
 
313
348
  declare const Label: FunctionComponent;
314
349
 
@@ -332,4 +367,19 @@ declare const defaultAxisLeftConfig: AxisProps;
332
367
  declare const defaultTrendChartConfig: Partial<LineSvgProps>;
333
368
  declare const TrendChart: FunctionalComponent<TrendChartProps>;
334
369
 
335
- export { Button, Code, Counter, DropdownButton, Heading, IconButton, Label, Link, Loadable, Menu, Modal, type ModalDataProps, type ModalGalleryProps, type ModalTranslations, type ModalTranslationsProps, PageLoader, SearchBox, Spinner, SuccessRatePieChart, SvgIcon, Text, Toggle, TooltipWrapper, Tree, TreeHeader, TreeItem, TreeItemIcon, TrendChart, type TrendChartData, type TrendChartDataItem, type TrendChartProps, allureIcons, defaultAxisBottomConfig, defaultAxisLeftConfig, defaultTrendChartConfig, defaultTrendChartLegendConfig };
370
+ type StatusLabelProps = {
371
+ status: TestStatus;
372
+ className?: string;
373
+ };
374
+ declare const StatusLabel: FunctionalComponent<StatusLabelProps>;
375
+
376
+ declare const ReportLogoFull: (props: {
377
+ className?: string;
378
+ }) => preact.JSX.Element;
379
+
380
+ declare const ReportLogo: (props: {
381
+ className?: string;
382
+ logo?: string;
383
+ }) => preact.JSX.Element;
384
+
385
+ export { ArrowButton, Button, Code, Counter, DropdownButton, Heading, IconButton, Label, Link, Loadable, Menu, Modal, type ModalDataProps, type ModalGalleryProps, type ModalTranslations, type ModalTranslationsProps, PageLoader, ReportLogo, ReportLogoFull, SearchBox, Spinner, StatusLabel, SuccessRatePieChart, SvgIcon, Text, Toggle, TooltipWrapper, Tree, TreeHeader, TreeItem, TreeItemIcon, TreeSection, TreeStatusBar, TrendChart, type TrendChartData, type TrendChartDataItem, type TrendChartProps, allureIcons, defaultAxisBottomConfig, defaultAxisLeftConfig, defaultTrendChartConfig, defaultTrendChartLegendConfig, getChartData, getPercentage };
@@ -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,sBAAsB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,cAAc,oBAAoB,CAAC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