widgetastic.patternfly5 24.4.15.0__py3-none-any.whl → 25.1.24.0__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: widgetastic.patternfly5
3
- Version: 24.4.15.0
3
+ Version: 25.1.24.0
4
4
  Summary: Patternfly5 widget library for Widgetastic.
5
5
  Project-URL: repository, https://github.com/RedHatQE/widgetastic.patternfly5
6
6
  Maintainer-email: Nikhil Dhandre <ndhandre@redhat.com>, Egor Shamardin <eshamard@redhat.com>, Mike Shriver <mshriver@redhat.com>
@@ -104,6 +104,7 @@ itteration of [widgetastic.patternfly4](https://github.com/RedHatQE/widgetastic.
104
104
 
105
105
  ### Charts:
106
106
  - [bullet-chart](https://www.patternfly.org/charts/bullet-chart)
107
+ - [boxplot-chart](https://www.patternfly.org/charts/box-plot-chart)
107
108
  - [donut-chart](https://www.patternfly.org/charts/donut-chart)
108
109
  - [legends](https://www.patternfly.org/charts/legends)
109
110
  - [line-chart](https://www.patternfly.org/charts/line-chart)
@@ -1,6 +1,8 @@
1
- widgetastic_patternfly5/__init__.py,sha256=tYIOwdzFaAxtzk9xRM89MgeYNQrEqGKl8jpbMry1zTg,4792
1
+ widgetastic_patternfly5/__init__.py,sha256=YeVCoYFKRjU7Jgm8iYlikzG_aUfdPr--ayP4i_KrKuY,4859
2
2
  widgetastic_patternfly5/ouia.py,sha256=DCVMYscDvvhDbYlyfEnuaS1yUAqQ8Ty3sV50tZkXQHI,4299
3
3
  widgetastic_patternfly5/charts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ widgetastic_patternfly5/charts/alerts_timeline_chart.py,sha256=U7hJvxAG1Wgj9WFt5QxAmLh9cJm2qzs2YHs2wfEW0Pk,2377
5
+ widgetastic_patternfly5/charts/boxplot_chart.py,sha256=6Ek6gwbmwNeazy-5o2fVfvkjpd6bhbTyitiPomvLBts,405
4
6
  widgetastic_patternfly5/charts/bullet_chart.py,sha256=G7-U1l9d8VlkiPKc3IfFtcleHAmM5WXsfAKwiyw5DEg,3737
5
7
  widgetastic_patternfly5/charts/donut_chart.py,sha256=phPoVkvxdfUqxsHB8uWvdFUhWGT3ECi89J8H7VCySx4,2693
6
8
  widgetastic_patternfly5/charts/legend.py,sha256=fhAg-FhsWpvi91BZ29EztKO3QfANRW-hnfzIkq45q3Y,2983
@@ -38,7 +40,7 @@ widgetastic_patternfly5/components/menus/menu.py,sha256=0cUb5V1y3RgRpdAB8DlPIL9O
38
40
  widgetastic_patternfly5/components/menus/menu_toggle.py,sha256=PBwNvg6E2RPdCG6ALBUqyTZxCwThJgk5S-9ghTiZ9hM,1029
39
41
  widgetastic_patternfly5/components/menus/options_menu.py,sha256=43D0_JHeY-kPORQi54NL9OVmcMyAolVnI4dqHpo5omY,1353
40
42
  widgetastic_patternfly5/components/menus/select.py,sha256=D4M5XUsiQVye97dClWra1c6rD0M-HM4wVJ2VdVFM0F0,6537
41
- widgetastic.patternfly5-24.4.15.0.dist-info/METADATA,sha256=lxzOzvnP6ACqHBqvWNCJ74O3nEAesZJlyiQw5KvtEK0,6857
42
- widgetastic.patternfly5-24.4.15.0.dist-info/WHEEL,sha256=xl5aZkiJYVTjhVaiADvIe6UeUVylGNomrxKZ0Zda1CE,87
43
- widgetastic.patternfly5-24.4.15.0.dist-info/licenses/LICENSE,sha256=nDhhj8jp0XsTdmvWpTWFpOKVn0LPXPb6ecA9zFF3Exk,576
44
- widgetastic.patternfly5-24.4.15.0.dist-info/RECORD,,
43
+ widgetastic.patternfly5-25.1.24.0.dist-info/METADATA,sha256=UghSZ34wny32rW5NAY_n8MdGqPDXCa_hIku9knDTa3k,6925
44
+ widgetastic.patternfly5-25.1.24.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
45
+ widgetastic.patternfly5-25.1.24.0.dist-info/licenses/LICENSE,sha256=nDhhj8jp0XsTdmvWpTWFpOKVn0LPXPb6ecA9zFF3Exk,576
46
+ widgetastic.patternfly5-25.1.24.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.23.0
2
+ Generator: hatchling 1.27.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,3 +1,4 @@
1
+ from .charts.boxplot_chart import BoxPlotChart
1
2
  from .charts.bullet_chart import BulletChart
2
3
  from .charts.donut_chart import DonutChart
3
4
  from .charts.legend import DataPoint
@@ -72,6 +73,7 @@ from .components.title import Title
72
73
  __all__ = [
73
74
  "Alert",
74
75
  "BreadCrumb",
76
+ "BoxPlotChart",
75
77
  "BulletChart",
76
78
  "Button",
77
79
  "CalendarMonth",
@@ -0,0 +1,65 @@
1
+ from widgetastic_patternfly5.charts.line_chart import LineChart
2
+
3
+
4
+ class AlertsTimelineChart(LineChart):
5
+ """Represents the Patternfly Alerts Timeline.
6
+
7
+ https://v5-archive.patternfly.org/charts/bar-chart/#alerts-timeline
8
+
9
+ Args:
10
+ id: If you want to look the input up by id, use this parameter, pass the id.
11
+ locator: If you have specific locator else it will take pf-chart.
12
+ """
13
+
14
+ Y_AXIS_ROW = "./*[name()='svg']/*[name()='g'][3]/*[name()='g']"
15
+ Y_AXIS_ROW_LINE = "./*[name()='path']"
16
+
17
+ TOOLTIP = "./*[name()='svg']/*[name()='g'][5]"
18
+ TOOLTIP_X_AXIS_LABLE = None
19
+ TOOLTIP_LABLES = None
20
+ TOOLTIP_VALUES = ".//*[name()='text']/*[name()='tspan']"
21
+
22
+ @property
23
+ def _y_axis_labels_map(self):
24
+ """Labels and its webelements in the Y axis
25
+ NOTE: Y labels might not match the number of rows in Y axes.
26
+ """
27
+ return {self.browser.text(el): el for el in self.browser.elements(self.Y_AXIS_LABELS)}
28
+
29
+ @property
30
+ def labels_y_axis(self):
31
+ """Return Y-Axis labels."""
32
+ return list(self._y_axis_labels_map.keys())
33
+
34
+ @property
35
+ def _y_axis_map(self):
36
+ """Dict with Y axis row number as key and the contained lines in each row as values."""
37
+ y_axis_rows_els = self.browser.elements(self.Y_AXIS_ROW)
38
+ y_axis_map = {}
39
+ for row_n, row_el in enumerate(y_axis_rows_els):
40
+ y_axis_map[row_n] = self.browser.elements(self.Y_AXIS_ROW_LINE, parent=row_el)
41
+ return y_axis_map
42
+
43
+ def read(self):
44
+ """Read chart data."""
45
+ _data = []
46
+
47
+ for lines_el in self._y_axis_map.values():
48
+ _row_data = []
49
+ for line_el in lines_el:
50
+ self.browser.move_to_element(line_el)
51
+ self.browser.click(line_el)
52
+ tooltip_el = self.browser.wait_for_element(self.TOOLTIP)
53
+
54
+ label_data = {}
55
+ value_els = self.browser.elements(self.TOOLTIP_VALUES, parent=tooltip_el)
56
+ for value_el in value_els:
57
+ key, value = self.browser.text(value_el).lower().split(": ")
58
+ label_data[key] = value
59
+
60
+ _row_data.append(label_data)
61
+ _data.append(_row_data)
62
+
63
+ # Just move cursor to avoid mismatch of legend and tooltip text.
64
+ self.root_browser.move_to_element(".//body")
65
+ return _data
@@ -0,0 +1,12 @@
1
+ from widgetastic_patternfly5.charts.line_chart import LineChart
2
+
3
+
4
+ class BoxPlotChart(LineChart):
5
+ """Represents the Patternfly Boxplot Chart.
6
+
7
+ https://patternfly-react-main.surge.sh/charts/box-plot-chart#embedded-legend
8
+
9
+ Args:
10
+ id: If you want to look the input up by id, use this parameter, pass the id.
11
+ locator: If you have specific locator else it will take pf-chart.
12
+ """