@onehat/ui 0.3.278 → 0.3.280

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/ui",
3
- "version": "0.3.278",
3
+ "version": "0.3.280",
4
4
  "description": "Base UI for OneHat apps",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -12,6 +12,7 @@ import {
12
12
  } from '../../Constants/UiModes.js';
13
13
  import Form from '../Form/Form.js';
14
14
  import withComponent from '../Hoc/withComponent.js';
15
+ import testProps from '../../Functions/testProps.js';
15
16
  import ChartLine from '../Icons/ChartLine.js';
16
17
  import Pdf from '../Icons/Pdf.js';
17
18
  import Excel from '../Icons/Excel.js';
@@ -86,7 +87,8 @@ function Report(props) {
86
87
 
87
88
  if (!disableExcel) {
88
89
  buttons.push({
89
- key: 'ExcelBtn',
90
+ ...testProps('excelBtn'),
91
+ key: 'excelBtn',
90
92
  text: 'Download Excel',
91
93
  leftIcon: <Icon as={Excel} size="md" color="#fff" />,
92
94
  onPress: (data) => getReport(EXCEL, data),
@@ -95,6 +97,7 @@ function Report(props) {
95
97
  }
96
98
  if (!disablePdf) {
97
99
  buttons.push({
100
+ ...testProps('pdfBtn'),
98
101
  key: 'pdfBtn',
99
102
  text: 'Download PDF',
100
103
  leftIcon: <Icon as={Pdf} size="md" color="#fff" />,
@@ -102,7 +105,7 @@ function Report(props) {
102
105
  ml: 1,
103
106
  });
104
107
  }
105
- return <Column w="100%" borderWidth={1} borderColor="primary.300" pt={4} mb={3}>
108
+ return <Column {...testProps('Report-' + reportId)} w="100%" borderWidth={1} borderColor="primary.300" pt={4} mb={3}>
106
109
  <Row>
107
110
  {icon && <Column>{icon}</Column>}
108
111
  <Column flex={1}>
@@ -23,6 +23,9 @@ function ManagerScreen(props) {
23
23
  title,
24
24
  sideModeComponent,
25
25
  fullModeComponent,
26
+
27
+ // withComponent
28
+ self,
26
29
  } = props,
27
30
  styles = UiGlobals.styles,
28
31
  id = props.id || props.self?.path,
@@ -85,7 +88,7 @@ function ManagerScreen(props) {
85
88
  };
86
89
  }
87
90
 
88
- return <Column maxHeight="100vh" overflow="hidden" flex={1} w="100%" onLayout={onLayout}>
91
+ return <Column {...testProps(self)} maxHeight="100vh" overflow="hidden" flex={1} w="100%" onLayout={onLayout}>
89
92
  <Row
90
93
  h="80px"
91
94
  py={2}