@tenancy.nz/reports 1.1.3 → 1.1.4
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/cjs/ReportFooter.cjs +21 -9
- package/dist/cjs/ReportHeader.cjs +51 -37
- package/dist/esm/ReportFooter.js +21 -9
- package/dist/esm/ReportHeader.js +51 -37
- package/package.json +5 -5
|
@@ -3,19 +3,31 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var ui = require('@tenancy.nz/ui');
|
|
7
6
|
|
|
7
|
+
var styles = {
|
|
8
|
+
container: {
|
|
9
|
+
marginTop: "24px",
|
|
10
|
+
color: "#595959",
|
|
11
|
+
width: "100%"
|
|
12
|
+
},
|
|
13
|
+
text: {
|
|
14
|
+
fontStyle: "italic",
|
|
15
|
+
color: "inherit",
|
|
16
|
+
fontWeight: "300",
|
|
17
|
+
fontSize: "14px",
|
|
18
|
+
lineHeight: "1.43",
|
|
19
|
+
fontFamily: "inherit",
|
|
20
|
+
margin: "0",
|
|
21
|
+
padding: "0"
|
|
22
|
+
}
|
|
23
|
+
};
|
|
8
24
|
function ReportFooter(_ref) {
|
|
9
25
|
var eventData = _ref.eventData;
|
|
10
26
|
var text = eventData.text;
|
|
11
|
-
return /* @__PURE__ */React.createElement(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
as: "div",
|
|
16
|
-
variant: "body2",
|
|
17
|
-
weight: "300",
|
|
18
|
-
italic: true
|
|
27
|
+
return /* @__PURE__ */React.createElement("div", {
|
|
28
|
+
style: styles.container
|
|
29
|
+
}, /* @__PURE__ */React.createElement("div", {
|
|
30
|
+
style: styles.text
|
|
19
31
|
}, text || "This PDF is for - purposes."));
|
|
20
32
|
}
|
|
21
33
|
|
|
@@ -3,52 +3,66 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var ui = require('@tenancy.nz/ui');
|
|
7
6
|
|
|
7
|
+
var styles = {
|
|
8
|
+
container: {
|
|
9
|
+
marginBottom: "24px",
|
|
10
|
+
borderBottom: "1px solid #E0E0E0",
|
|
11
|
+
paddingBottom: "8px",
|
|
12
|
+
display: "flex",
|
|
13
|
+
alignItems: "flex-start",
|
|
14
|
+
color: "#0e0044",
|
|
15
|
+
width: "100%"
|
|
16
|
+
},
|
|
17
|
+
heading: {
|
|
18
|
+
fontSize: "32px",
|
|
19
|
+
fontWeight: "700",
|
|
20
|
+
padding: "0",
|
|
21
|
+
margin: "0 0 8px 0",
|
|
22
|
+
lineHeight: "1.3",
|
|
23
|
+
color: "inherit",
|
|
24
|
+
fontFamily: "inherit"
|
|
25
|
+
},
|
|
26
|
+
subheading: {
|
|
27
|
+
fontSize: "17px",
|
|
28
|
+
fontWeight: "500",
|
|
29
|
+
padding: "0",
|
|
30
|
+
margin: "0",
|
|
31
|
+
lineHeight: "1.3",
|
|
32
|
+
color: "inherit",
|
|
33
|
+
fontFamily: "inherit"
|
|
34
|
+
},
|
|
35
|
+
imgContainer: {
|
|
36
|
+
width: "150px",
|
|
37
|
+
height: "35px"
|
|
38
|
+
},
|
|
39
|
+
img: {
|
|
40
|
+
maxWidth: "100%",
|
|
41
|
+
maxHeight: "100%"
|
|
42
|
+
}
|
|
43
|
+
};
|
|
8
44
|
function ReportHeader(_ref) {
|
|
9
45
|
var eventData = _ref.eventData;
|
|
10
46
|
var heading = eventData.heading,
|
|
11
47
|
subheading = eventData.subheading,
|
|
12
48
|
logo = eventData.logo;
|
|
13
|
-
return /* @__PURE__ */React.createElement(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
container: true,
|
|
19
|
-
spacing: 6
|
|
20
|
-
}, /* @__PURE__ */React.createElement(ui.Grid, {
|
|
21
|
-
item: true,
|
|
22
|
-
xs: 8
|
|
23
|
-
}, /* @__PURE__ */React.createElement(ui.Heading, {
|
|
24
|
-
as: "h1",
|
|
25
|
-
weight: "700",
|
|
26
|
-
sx: {
|
|
27
|
-
mb: "8px"
|
|
28
|
-
}
|
|
29
|
-
}, heading), subheading && /* @__PURE__ */React.createElement(ui.Heading, {
|
|
30
|
-
as: "h5",
|
|
31
|
-
weight: "500"
|
|
32
|
-
}, subheading)), /* @__PURE__ */React.createElement(ui.Grid, {
|
|
33
|
-
item: true,
|
|
34
|
-
xs: 4,
|
|
35
|
-
sx: {
|
|
36
|
-
display: "flex",
|
|
37
|
-
justifyContent: "flex-end"
|
|
38
|
-
}
|
|
39
|
-
}, logo && /* @__PURE__ */React.createElement(ui.Box, {
|
|
40
|
-
sx: {
|
|
41
|
-
width: "150px",
|
|
42
|
-
height: "35px",
|
|
43
|
-
"> img": {
|
|
44
|
-
maxWidth: "100%",
|
|
45
|
-
maxHeight: "100%"
|
|
46
|
-
}
|
|
49
|
+
return /* @__PURE__ */React.createElement("div", {
|
|
50
|
+
style: styles.container
|
|
51
|
+
}, /* @__PURE__ */React.createElement("div", {
|
|
52
|
+
style: {
|
|
53
|
+
width: "100%"
|
|
47
54
|
}
|
|
55
|
+
}, /* @__PURE__ */React.createElement("h1", {
|
|
56
|
+
style: styles.heading
|
|
57
|
+
}, heading), /* @__PURE__ */React.createElement("h5", {
|
|
58
|
+
style: styles.subheading
|
|
59
|
+
}, subheading)), /* @__PURE__ */React.createElement("div", {
|
|
60
|
+
style: styles.imgContainer
|
|
48
61
|
}, /* @__PURE__ */React.createElement("img", {
|
|
49
62
|
src: logo,
|
|
50
|
-
alt: "Tenancy"
|
|
51
|
-
|
|
63
|
+
alt: "Tenancy",
|
|
64
|
+
style: styles.img
|
|
65
|
+
})));
|
|
52
66
|
}
|
|
53
67
|
|
|
54
68
|
exports.default = ReportHeader;
|
package/dist/esm/ReportFooter.js
CHANGED
|
@@ -1,17 +1,29 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Box, Text } from '@tenancy.nz/ui';
|
|
3
2
|
|
|
3
|
+
var styles = {
|
|
4
|
+
container: {
|
|
5
|
+
marginTop: "24px",
|
|
6
|
+
color: "#595959",
|
|
7
|
+
width: "100%"
|
|
8
|
+
},
|
|
9
|
+
text: {
|
|
10
|
+
fontStyle: "italic",
|
|
11
|
+
color: "inherit",
|
|
12
|
+
fontWeight: "300",
|
|
13
|
+
fontSize: "14px",
|
|
14
|
+
lineHeight: "1.43",
|
|
15
|
+
fontFamily: "inherit",
|
|
16
|
+
margin: "0",
|
|
17
|
+
padding: "0"
|
|
18
|
+
}
|
|
19
|
+
};
|
|
4
20
|
function ReportFooter(_ref) {
|
|
5
21
|
var eventData = _ref.eventData;
|
|
6
22
|
var text = eventData.text;
|
|
7
|
-
return /* @__PURE__ */React.createElement(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
as: "div",
|
|
12
|
-
variant: "body2",
|
|
13
|
-
weight: "300",
|
|
14
|
-
italic: true
|
|
23
|
+
return /* @__PURE__ */React.createElement("div", {
|
|
24
|
+
style: styles.container
|
|
25
|
+
}, /* @__PURE__ */React.createElement("div", {
|
|
26
|
+
style: styles.text
|
|
15
27
|
}, text || "This PDF is for - purposes."));
|
|
16
28
|
}
|
|
17
29
|
|
package/dist/esm/ReportHeader.js
CHANGED
|
@@ -1,50 +1,64 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Box, Grid, Heading } from '@tenancy.nz/ui';
|
|
3
2
|
|
|
3
|
+
var styles = {
|
|
4
|
+
container: {
|
|
5
|
+
marginBottom: "24px",
|
|
6
|
+
borderBottom: "1px solid #E0E0E0",
|
|
7
|
+
paddingBottom: "8px",
|
|
8
|
+
display: "flex",
|
|
9
|
+
alignItems: "flex-start",
|
|
10
|
+
color: "#0e0044",
|
|
11
|
+
width: "100%"
|
|
12
|
+
},
|
|
13
|
+
heading: {
|
|
14
|
+
fontSize: "32px",
|
|
15
|
+
fontWeight: "700",
|
|
16
|
+
padding: "0",
|
|
17
|
+
margin: "0 0 8px 0",
|
|
18
|
+
lineHeight: "1.3",
|
|
19
|
+
color: "inherit",
|
|
20
|
+
fontFamily: "inherit"
|
|
21
|
+
},
|
|
22
|
+
subheading: {
|
|
23
|
+
fontSize: "17px",
|
|
24
|
+
fontWeight: "500",
|
|
25
|
+
padding: "0",
|
|
26
|
+
margin: "0",
|
|
27
|
+
lineHeight: "1.3",
|
|
28
|
+
color: "inherit",
|
|
29
|
+
fontFamily: "inherit"
|
|
30
|
+
},
|
|
31
|
+
imgContainer: {
|
|
32
|
+
width: "150px",
|
|
33
|
+
height: "35px"
|
|
34
|
+
},
|
|
35
|
+
img: {
|
|
36
|
+
maxWidth: "100%",
|
|
37
|
+
maxHeight: "100%"
|
|
38
|
+
}
|
|
39
|
+
};
|
|
4
40
|
function ReportHeader(_ref) {
|
|
5
41
|
var eventData = _ref.eventData;
|
|
6
42
|
var heading = eventData.heading,
|
|
7
43
|
subheading = eventData.subheading,
|
|
8
44
|
logo = eventData.logo;
|
|
9
|
-
return /* @__PURE__ */React.createElement(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
container: true,
|
|
15
|
-
spacing: 6
|
|
16
|
-
}, /* @__PURE__ */React.createElement(Grid, {
|
|
17
|
-
item: true,
|
|
18
|
-
xs: 8
|
|
19
|
-
}, /* @__PURE__ */React.createElement(Heading, {
|
|
20
|
-
as: "h1",
|
|
21
|
-
weight: "700",
|
|
22
|
-
sx: {
|
|
23
|
-
mb: "8px"
|
|
24
|
-
}
|
|
25
|
-
}, heading), subheading && /* @__PURE__ */React.createElement(Heading, {
|
|
26
|
-
as: "h5",
|
|
27
|
-
weight: "500"
|
|
28
|
-
}, subheading)), /* @__PURE__ */React.createElement(Grid, {
|
|
29
|
-
item: true,
|
|
30
|
-
xs: 4,
|
|
31
|
-
sx: {
|
|
32
|
-
display: "flex",
|
|
33
|
-
justifyContent: "flex-end"
|
|
34
|
-
}
|
|
35
|
-
}, logo && /* @__PURE__ */React.createElement(Box, {
|
|
36
|
-
sx: {
|
|
37
|
-
width: "150px",
|
|
38
|
-
height: "35px",
|
|
39
|
-
"> img": {
|
|
40
|
-
maxWidth: "100%",
|
|
41
|
-
maxHeight: "100%"
|
|
42
|
-
}
|
|
45
|
+
return /* @__PURE__ */React.createElement("div", {
|
|
46
|
+
style: styles.container
|
|
47
|
+
}, /* @__PURE__ */React.createElement("div", {
|
|
48
|
+
style: {
|
|
49
|
+
width: "100%"
|
|
43
50
|
}
|
|
51
|
+
}, /* @__PURE__ */React.createElement("h1", {
|
|
52
|
+
style: styles.heading
|
|
53
|
+
}, heading), /* @__PURE__ */React.createElement("h5", {
|
|
54
|
+
style: styles.subheading
|
|
55
|
+
}, subheading)), /* @__PURE__ */React.createElement("div", {
|
|
56
|
+
style: styles.imgContainer
|
|
44
57
|
}, /* @__PURE__ */React.createElement("img", {
|
|
45
58
|
src: logo,
|
|
46
|
-
alt: "Tenancy"
|
|
47
|
-
|
|
59
|
+
alt: "Tenancy",
|
|
60
|
+
style: styles.img
|
|
61
|
+
})));
|
|
48
62
|
}
|
|
49
63
|
|
|
50
64
|
export { ReportHeader as default };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tenancy.nz/reports",
|
|
3
3
|
"description": "React UI reporting components.",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.4",
|
|
5
5
|
"author": "TPS <https://www.tenancy.co.nz>",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"type": "module",
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
"peerDependencies": {
|
|
15
15
|
"react": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
16
16
|
"react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
17
|
-
"@tenancy.nz/feature-ui": "1.1.
|
|
18
|
-
"@tenancy.nz/ui": "1.1.
|
|
17
|
+
"@tenancy.nz/feature-ui": "1.1.4",
|
|
18
|
+
"@tenancy.nz/ui": "1.1.4"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@tenancy.nz/ui": "1.1.
|
|
22
|
-
"@tenancy.nz/
|
|
21
|
+
"@tenancy.nz/feature-ui": "1.1.4",
|
|
22
|
+
"@tenancy.nz/ui": "1.1.4"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"react-uid": "^2.4.0"
|