@churchapps/apphelper 0.2.80 → 0.2.81
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/components/DisplayBox.d.ts.map +1 -1
- package/dist/components/DisplayBox.js +6 -10
- package/dist/components/DisplayBox.js.map +1 -1
- package/dist/components/InputBox.d.ts.map +1 -1
- package/dist/components/InputBox.js +6 -10
- package/dist/components/InputBox.js.map +1 -1
- package/package.json +1 -1
- package/src/components/DisplayBox.tsx +8 -17
- package/src/components/InputBox.tsx +9 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisplayBox.d.ts","sourceRoot":"","sources":["../../src/components/DisplayBox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,OAAO;QACf,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"file":"DisplayBox.d.ts","sourceRoot":"","sources":["../../src/components/DisplayBox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,OAAO;QACf,QAAQ,EAAE;YAAE,UAAU,EAAE,MAAM,CAAC;SAAE,CAAC;KACnC;IACD,UAAU,cAAc;QACtB,QAAQ,CAAC,EAAE;YAAE,UAAU,CAAC,EAAE,MAAM,CAAC;SAAE,CAAC;KACrC;CACF;AAGD,UAAU,KAAK;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAsBD,eAAO,MAAM,UAAU,8EA6BrB,CAAA"}
|
|
@@ -9,15 +9,9 @@ const react_1 = __importDefault(require("react"));
|
|
|
9
9
|
const material_1 = require("@mui/material");
|
|
10
10
|
const HelpIcon_1 = require("./HelpIcon");
|
|
11
11
|
const SmallButton_1 = require("./SmallButton");
|
|
12
|
-
const
|
|
13
|
-
palette: {
|
|
14
|
-
InputBox: {
|
|
15
|
-
headerText: "primary"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
});
|
|
12
|
+
const styles_1 = require("@mui/material/styles");
|
|
19
13
|
/* "& p": { color: "#666" }, */
|
|
20
|
-
const CustomContextBox = (0,
|
|
14
|
+
const CustomContextBox = (0, styles_1.styled)(material_1.Box)({
|
|
21
15
|
marginTop: 10,
|
|
22
16
|
overflowX: "hidden",
|
|
23
17
|
"& label": { color: "#999" },
|
|
@@ -36,6 +30,8 @@ const CustomContextBox = (0, material_1.styled)(material_1.Box)({
|
|
|
36
30
|
"& th:last-of-type": { paddingRight: 0 }
|
|
37
31
|
});
|
|
38
32
|
exports.DisplayBox = react_1.default.forwardRef((props, ref) => {
|
|
33
|
+
const theme = (0, styles_1.useTheme)();
|
|
34
|
+
const headerText = theme.palette.InputBox.headerText ? theme.palette.InputBox.headerText : "primary";
|
|
39
35
|
let editContent;
|
|
40
36
|
if (props.editFunction !== undefined) {
|
|
41
37
|
editContent = react_1.default.createElement(SmallButton_1.SmallButton, { icon: "edit", "aria-label": props.ariaLabel || "editButton", onClick: props.editFunction });
|
|
@@ -46,8 +42,8 @@ exports.DisplayBox = react_1.default.forwardRef((props, ref) => {
|
|
|
46
42
|
props.help && react_1.default.createElement(HelpIcon_1.HelpIcon, { article: props.help }),
|
|
47
43
|
react_1.default.createElement(material_1.Box, { sx: { display: "flex", justifyContent: "space-between", alignItems: "center" } },
|
|
48
44
|
react_1.default.createElement(material_1.Box, { sx: { display: "flex", alignItems: "center" } },
|
|
49
|
-
props.headerIcon && react_1.default.createElement(material_1.Icon, { sx: { color:
|
|
50
|
-
react_1.default.createElement(material_1.Typography, { component: "h2", sx: { display: "inline-block", marginLeft: props.headerIcon ? 1 : 0 }, variant: "h6", color:
|
|
45
|
+
props.headerIcon && react_1.default.createElement(material_1.Icon, { sx: { color: headerText } }, props.headerIcon),
|
|
46
|
+
react_1.default.createElement(material_1.Typography, { component: "h2", sx: { display: "inline-block", marginLeft: props.headerIcon ? 1 : 0 }, variant: "h6", color: headerText }, props.headerText)),
|
|
51
47
|
react_1.default.createElement(material_1.Box, null, editContent)),
|
|
52
48
|
react_1.default.createElement(CustomContextBox, { ref: ref, "data-cy": "content" }, props.children),
|
|
53
49
|
props.footerContent && (react_1.default.createElement("div", { style: { marginLeft: -16, marginRight: -16, marginBottom: -15, marginTop: 15 } }, props.footerContent))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisplayBox.js","sourceRoot":"","sources":["../../src/components/DisplayBox.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;AAEb,kDAA0B;AAC1B,
|
|
1
|
+
{"version":3,"file":"DisplayBox.js","sourceRoot":"","sources":["../../src/components/DisplayBox.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;AAEb,kDAA0B;AAC1B,4CAA6D;AAC7D,yCAAsC;AACtC,+CAA4C;AAC5C,iDAAwD;AAyBxD,+BAA+B;AAC/B,MAAM,gBAAgB,GAAG,IAAA,eAAM,EAAC,cAAG,CAAC,CAAC;IACnC,SAAS,EAAE,EAAE;IACb,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;IAC5B,MAAM,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE;IAC1B,MAAM,EAAE;QACN,aAAa,EAAE,MAAM;QACrB,YAAY,EAAE,EAAE;QAChB,KAAK,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AE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,eAAe,EAAE,UAAU,EAAE,QAAQ,EAAE;YACjF,8BAAC,cAAG,IAAC,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE;gBAC/C,KAAK,CAAC,UAAU,IAAI,8BAAC,eAAI,IAAC,EAAE,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,IAAG,KAAK,CAAC,UAAU,CAAQ;gBAC/E,8BAAC,qBAAU,IAAC,SAAS,EAAC,IAAI,EAAC,EAAE,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,OAAO,EAAC,IAAI,EAAC,KAAK,EAAE,UAAU,IAC7H,KAAK,CAAC,UAAU,CACN,CAET;YACN,8BAAC,cAAG,QACD,WAAW,CACR,CACF;QACN,8BAAC,gBAAgB,IAAC,GAAG,EAAE,GAAG,aAAU,SAAS,IAAE,KAAK,CAAC,QAAQ,CAAoB;QAChF,KAAK,CAAC,aAAa,IAAI,CAAC,uCAAK,KAAK,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,EAAE,YAAY,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,IAAG,KAAK,CAAC,aAAa,CAAO,CAAC,CACpI,CACT,CAAC;AACJ,CAAC,CAAC,CAAA;AAEF,kBAAU,CAAC,WAAW,GAAG,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputBox.d.ts","sourceRoot":"","sources":["../../src/components/InputBox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,
|
|
1
|
+
{"version":3,"file":"InputBox.d.ts","sourceRoot":"","sources":["../../src/components/InputBox.tsx"],"names":[],"mapp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
20
|
const material_1 = require("@mui/material");
|
|
21
21
|
const HelpIcon_1 = require("./HelpIcon");
|
|
22
22
|
const helpers_1 = require("../helpers");
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
InputBox: {
|
|
26
|
-
headerText: "primary"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
const CustomContextBox = (0, material_1.styled)(material_1.Box)({
|
|
23
|
+
const styles_1 = require("@mui/material/styles");
|
|
24
|
+
const CustomContextBox = (0, styles_1.styled)(material_1.Box)({
|
|
31
25
|
name: "InputBox",
|
|
32
26
|
slot: "root",
|
|
33
27
|
marginTop: 10,
|
|
@@ -45,6 +39,8 @@ const CustomContextBox = (0, material_1.styled)(material_1.Box)({
|
|
|
45
39
|
});
|
|
46
40
|
function InputBox(_a) {
|
|
47
41
|
var { mainContainerCssProps = {} } = _a, props = __rest(_a, ["mainContainerCssProps"]);
|
|
42
|
+
const theme = (0, styles_1.useTheme)();
|
|
43
|
+
const headerText = theme.palette.InputBox.headerText ? theme.palette.InputBox.headerText : "primary";
|
|
48
44
|
let buttons = [];
|
|
49
45
|
if (props.cancelFunction)
|
|
50
46
|
buttons.push(react_1.default.createElement(material_1.Button, { key: "cancel", onClick: props.cancelFunction, color: "warning", sx: { "&:focus": { outline: "none" } } }, props.cancelText || helpers_1.Locale.label("common.cancel")));
|
|
@@ -60,8 +56,8 @@ function InputBox(_a) {
|
|
|
60
56
|
props.help && react_1.default.createElement(HelpIcon_1.HelpIcon, { article: props.help }),
|
|
61
57
|
react_1.default.createElement(material_1.Box, { sx: { display: "flex", justifyContent: "space-between", alignItems: "center", position: "relative" }, "data-cy": "header" },
|
|
62
58
|
react_1.default.createElement(material_1.Box, { display: "flex", alignItems: "center" },
|
|
63
|
-
props.headerIcon && react_1.default.createElement(material_1.Icon, { sx: { color:
|
|
64
|
-
props.headerText && (react_1.default.createElement(material_1.Typography, { component: "h2", sx: { display: "inline-block", marginLeft: props.headerIcon ? 1 : 0 }, variant: "h6", color:
|
|
59
|
+
props.headerIcon && react_1.default.createElement(material_1.Icon, { sx: { color: headerText } }, props.headerIcon),
|
|
60
|
+
props.headerText && (react_1.default.createElement(material_1.Typography, { component: "h2", sx: { display: "inline-block", marginLeft: props.headerIcon ? 1 : 0 }, variant: "h6", color: headerText }, props.headerText))),
|
|
65
61
|
react_1.default.createElement(material_1.Box, null, props.headerActionContent)),
|
|
66
62
|
react_1.default.createElement(CustomContextBox, null, props.children),
|
|
67
63
|
react_1.default.createElement(material_1.Stack, { direction: "row", sx: { marginTop: 1 }, spacing: 1, justifyContent: "end" }, buttons)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputBox.js","sourceRoot":"","sources":["../../src/components/InputBox.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;AAEb,kDAA0B;AAC1B,
|
|
1
|
+
{"version":3,"file":"InputBox.js","sourceRoot":"","sources":["../../src/components/InputBox.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;AAEb,kDAA0B;AAC1B,4CAAwF;AACxF,yCAAsC;AACtC,wCAAoC;AACpC,iDAAwD;AAkCxD,MAAM,gBAAgB,GAAG,IAAA,eAAM,EAAC,cAAG,CAAC,CAAC;IACnC,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,EAAE;IACb,SAAS,EAAE,QAAQ;IACnB,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;IACxB,SAAS,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;IAC5B,MAAM,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE;IAC3B,MAAM,EAAE;QACN,YAAY,EAAE,EAAE;QAChB,KAAK,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE;KAC1B;IACD,MAAM,EAAE;QACN,KAAK,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE;KAC1B;CACF,CAAC,CAAA;AAG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CAAC,CAAC,CAAC,EAAE,EAAE,OAAO,EAAC,IAAI,EAAC,KAAK,EAAE,UAAU,IAC7H,KAAK,CAAC,UAAU,CACN,CACd,CACG;YACN,8BAAC,cAAG,QACD,KAAK,CAAC,mBAAmB,CACtB,CACF;QACN,8BAAC,gBAAgB,QAAE,KAAK,CAAC,QAAQ,CAAoB;QACrD,8BAAC,gBAAK,IAAC,SAAS,EAAC,KAAK,EAAC,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,cAAc,EAAC,KAAK,IAC1E,OAAO,CACF,CACF,CACT,CAAC;AACJ,CAAC;AApCD,4BAoCC"}
|
package/package.json
CHANGED
|
@@ -1,31 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { Paper, Box, Typography,
|
|
4
|
+
import { Paper, Box, Typography, Icon } from "@mui/material";
|
|
5
5
|
import { HelpIcon } from "./HelpIcon";
|
|
6
6
|
import { SmallButton } from "./SmallButton";
|
|
7
|
-
|
|
7
|
+
import { styled, useTheme } from '@mui/material/styles';
|
|
8
8
|
|
|
9
9
|
declare module '@mui/material/styles' {
|
|
10
10
|
interface Palette {
|
|
11
|
-
InputBox: {
|
|
12
|
-
headerText: string;
|
|
13
|
-
};
|
|
11
|
+
InputBox: { headerText: string; };
|
|
14
12
|
}
|
|
15
13
|
interface PaletteOptions {
|
|
16
|
-
InputBox?: {
|
|
17
|
-
headerText?: string;
|
|
18
|
-
};
|
|
14
|
+
InputBox?: { headerText?: string; };
|
|
19
15
|
}
|
|
20
16
|
}
|
|
21
17
|
|
|
22
|
-
const theme = createTheme({
|
|
23
|
-
palette: {
|
|
24
|
-
InputBox: {
|
|
25
|
-
headerText: "primary"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
18
|
|
|
30
19
|
interface Props {
|
|
31
20
|
id?: string,
|
|
@@ -61,6 +50,8 @@ const CustomContextBox = styled(Box)({
|
|
|
61
50
|
});
|
|
62
51
|
|
|
63
52
|
export const DisplayBox = React.forwardRef<HTMLDivElement, Props>((props, ref) => {
|
|
53
|
+
const theme = useTheme();
|
|
54
|
+
const headerText = theme.palette.InputBox.headerText ? theme.palette.InputBox.headerText : "primary";
|
|
64
55
|
|
|
65
56
|
let editContent: React.ReactNode;
|
|
66
57
|
if (props.editFunction !== undefined) {
|
|
@@ -73,8 +64,8 @@ export const DisplayBox = React.forwardRef<HTMLDivElement, Props>((props, ref) =
|
|
|
73
64
|
{props.help && <HelpIcon article={props.help} />}
|
|
74
65
|
<Box sx={{ display: "flex", justifyContent: "space-between", alignItems: "center" }}>
|
|
75
66
|
<Box sx={{ display: "flex", alignItems: "center" }}>
|
|
76
|
-
{props.headerIcon && <Icon sx={{ color:
|
|
77
|
-
<Typography component="h2" sx={{ display: "inline-block", marginLeft: props.headerIcon ? 1 : 0 }} variant="h6" color={
|
|
67
|
+
{props.headerIcon && <Icon sx={{ color: headerText }}>{props.headerIcon}</Icon>}
|
|
68
|
+
<Typography component="h2" sx={{ display: "inline-block", marginLeft: props.headerIcon ? 1 : 0 }} variant="h6" color={headerText}>
|
|
78
69
|
{props.headerText}
|
|
79
70
|
</Typography>
|
|
80
71
|
|
|
@@ -1,30 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { Paper, Box, Typography, Stack,
|
|
4
|
+
import { Paper, Box, Typography, Stack, Button, Icon, PaperProps } from "@mui/material";
|
|
5
5
|
import { HelpIcon } from "./HelpIcon";
|
|
6
6
|
import { Locale } from "../helpers";
|
|
7
|
+
import { styled, useTheme } from '@mui/material/styles';
|
|
7
8
|
|
|
8
9
|
declare module '@mui/material/styles' {
|
|
9
10
|
interface Palette {
|
|
10
|
-
InputBox: {
|
|
11
|
-
headerText: string;
|
|
12
|
-
};
|
|
11
|
+
InputBox: { headerText: string; };
|
|
13
12
|
}
|
|
14
13
|
interface PaletteOptions {
|
|
15
|
-
InputBox?: {
|
|
16
|
-
headerText?: string;
|
|
17
|
-
};
|
|
14
|
+
InputBox?: { headerText?: string; };
|
|
18
15
|
}
|
|
19
16
|
}
|
|
20
17
|
|
|
21
|
-
const theme = createTheme({
|
|
22
|
-
palette: {
|
|
23
|
-
InputBox: {
|
|
24
|
-
headerText: "primary"
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
18
|
|
|
29
19
|
interface Props {
|
|
30
20
|
id?: string;
|
|
@@ -67,6 +57,9 @@ const CustomContextBox = styled(Box)({
|
|
|
67
57
|
|
|
68
58
|
|
|
69
59
|
export function InputBox({ mainContainerCssProps = {}, ...props }: Props) {
|
|
60
|
+
const theme = useTheme();
|
|
61
|
+
const headerText = theme.palette.InputBox.headerText ? theme.palette.InputBox.headerText : "primary";
|
|
62
|
+
|
|
70
63
|
let buttons = [];
|
|
71
64
|
if (props.cancelFunction) buttons.push(<Button key="cancel" onClick={props.cancelFunction} color="warning" sx={{ "&:focus": { outline: "none" } }}>{props.cancelText || Locale.label("common.cancel")}</Button>);
|
|
72
65
|
if (props.deleteFunction) buttons.push(<Button key="delete" id="delete" variant="outlined" aria-label={props.ariaLabelDelete} onClick={props.deleteFunction} color="error" sx={{ "&:focus": { outline: "none" } }}>{props.deleteText || Locale.label("common.delete")}</Button>);
|
|
@@ -82,9 +75,9 @@ export function InputBox({ mainContainerCssProps = {}, ...props }: Props) {
|
|
|
82
75
|
{props.help && <HelpIcon article={props.help} />}
|
|
83
76
|
<Box sx={{ display: "flex", justifyContent: "space-between", alignItems: "center", position: "relative" }} data-cy="header">
|
|
84
77
|
<Box display="flex" alignItems="center">
|
|
85
|
-
{props.headerIcon && <Icon sx={{ color:
|
|
78
|
+
{props.headerIcon && <Icon sx={{ color: headerText }}>{props.headerIcon}</Icon>}
|
|
86
79
|
{props.headerText && (
|
|
87
|
-
<Typography component="h2" sx={{ display: "inline-block", marginLeft: props.headerIcon ? 1 : 0 }} variant="h6" color={
|
|
80
|
+
<Typography component="h2" sx={{ display: "inline-block", marginLeft: props.headerIcon ? 1 : 0 }} variant="h6" color={headerText}>
|
|
88
81
|
{props.headerText}
|
|
89
82
|
</Typography>
|
|
90
83
|
)}
|