@churchapps/apphelper 0.2.17 → 0.2.18
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.
|
@@ -7,10 +7,12 @@ interface Props {
|
|
|
7
7
|
headerText?: string;
|
|
8
8
|
help?: string;
|
|
9
9
|
saveText?: string;
|
|
10
|
+
deleteText?: string;
|
|
11
|
+
cancelText?: string;
|
|
10
12
|
headerActionContent?: React.ReactNode;
|
|
11
13
|
cancelFunction?: () => void;
|
|
12
14
|
deleteFunction?: () => void;
|
|
13
|
-
saveFunction
|
|
15
|
+
saveFunction?: () => void;
|
|
14
16
|
"data-cy"?: string;
|
|
15
17
|
className?: string;
|
|
16
18
|
isSubmitting?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputBox.d.ts","sourceRoot":"","sources":["../../src/components/InputBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAuD,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhG,UAAU,KAAK;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mBAAmB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACtC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,YAAY,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"InputBox.d.ts","sourceRoot":"","sources":["../../src/components/InputBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAuD,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhG,UAAU,KAAK;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mBAAmB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACtC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IACrC,qBAAqB,CAAC,EAAE,UAAU,CAAC;CACpC;AAiBD,wBAAgB,QAAQ,CAAC,EAAE,qBAA0B,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,qBAiCvE"}
|
|
@@ -36,11 +36,11 @@ function InputBox(_a) {
|
|
|
36
36
|
var { mainContainerCssProps = {} } = _a, props = __rest(_a, ["mainContainerCssProps"]);
|
|
37
37
|
let buttons = [];
|
|
38
38
|
if (props.cancelFunction)
|
|
39
|
-
buttons.push(react_1.default.createElement(material_1.Button, { key: "cancel", onClick: props.cancelFunction, color: "warning", sx: { "&:focus": { outline: "none" } } }, "Cancel"));
|
|
39
|
+
buttons.push(react_1.default.createElement(material_1.Button, { key: "cancel", onClick: props.cancelFunction, color: "warning", sx: { "&:focus": { outline: "none" } } }, props.cancelText || "Cancel"));
|
|
40
40
|
if (props.deleteFunction)
|
|
41
|
-
buttons.push(react_1.default.createElement(material_1.Button, { key: "delete", id: "delete", variant: "outlined", "aria-label": props.ariaLabelDelete, onClick: props.deleteFunction, color: "error", sx: { "&:focus": { outline: "none" } } }, "Delete"));
|
|
41
|
+
buttons.push(react_1.default.createElement(material_1.Button, { key: "delete", id: "delete", variant: "outlined", "aria-label": props.ariaLabelDelete, onClick: props.deleteFunction, color: "error", sx: { "&:focus": { outline: "none" } } }, props.deleteText || "Delete"));
|
|
42
42
|
if (props.saveFunction)
|
|
43
|
-
buttons.push(react_1.default.createElement(material_1.Button, { key: "save", type: props.saveButtonType || "button", variant: "contained", disableElevation: true, "aria-label": props.ariaLabelSave, onClick: props.saveFunction, disabled: props.isSubmitting, sx: { "&:focus": { outline: "none" } } }, props.saveText || "
|
|
43
|
+
buttons.push(react_1.default.createElement(material_1.Button, { key: "save", type: props.saveButtonType || "button", variant: "contained", disableElevation: true, "aria-label": props.ariaLabelSave, onClick: props.saveFunction, disabled: props.isSubmitting, sx: { "&:focus": { outline: "none" } } }, props.saveText || "Save"));
|
|
44
44
|
let classNames = ["inputBox"];
|
|
45
45
|
if (props.className) {
|
|
46
46
|
classNames.push(props.className);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputBox.js","sourceRoot":"","sources":["../../src/components/InputBox.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,4CAAgG;AAChG,yCAAsC;
|
|
1
|
+
{"version":3,"file":"InputBox.js","sourceRoot":"","sources":["../../src/components/InputBox.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,4CAAgG;AAChG,yCAAsC;AAwBtC,MAAM,gBAAgB,GAAG,IAAA,iBAAM,EAAC,cAAG,CAAC,CAAC;IACnC,SAAS,EAAE,EAAE;IACb,SAAS,EAAE,QAAQ;IACnB,KAAK,EAAE,EAAE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C,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,OAAO,EAAC,IAAI,EAAC,KAAK,EAAC,SAAS,IAC3H,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;AAjCD,4BAiCC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@churchapps/apphelper",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.18",
|
|
4
4
|
"description": "Library of helper functions for React and NextJS ChurchApps",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"react-router-dom": "^6.15.0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@churchapps/helpers": "^1.0.
|
|
37
|
+
"@churchapps/helpers": "^1.0.17",
|
|
38
38
|
"@emotion/cache": "^11.11.0",
|
|
39
39
|
"@emotion/react": "^11.11.1",
|
|
40
40
|
"@emotion/styled": "^11.11.0",
|
|
@@ -9,10 +9,12 @@ interface Props {
|
|
|
9
9
|
headerText?: string;
|
|
10
10
|
help?: string;
|
|
11
11
|
saveText?: string;
|
|
12
|
+
deleteText?: string;
|
|
13
|
+
cancelText?: string;
|
|
12
14
|
headerActionContent?: React.ReactNode;
|
|
13
15
|
cancelFunction?: () => void;
|
|
14
16
|
deleteFunction?: () => void;
|
|
15
|
-
saveFunction
|
|
17
|
+
saveFunction?: () => void;
|
|
16
18
|
"data-cy"?: string;
|
|
17
19
|
className?: string;
|
|
18
20
|
isSubmitting?: boolean;
|
|
@@ -39,9 +41,9 @@ const CustomContextBox = styled(Box)({
|
|
|
39
41
|
|
|
40
42
|
export function InputBox({ mainContainerCssProps = {}, ...props }: Props) {
|
|
41
43
|
let buttons = [];
|
|
42
|
-
if (props.cancelFunction) buttons.push(<Button key="cancel" onClick={props.cancelFunction} color="warning" sx={{ "&:focus": { outline: "none" } }}>Cancel</Button>);
|
|
43
|
-
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" } }}>Delete</Button>);
|
|
44
|
-
if (props.saveFunction) buttons.push(<Button key="save" type={props.saveButtonType || "button"} variant="contained" disableElevation aria-label={props.ariaLabelSave} onClick={props.saveFunction} disabled={props.isSubmitting} sx={{ "&:focus": { outline: "none" } }}>{props.saveText || "
|
|
44
|
+
if (props.cancelFunction) buttons.push(<Button key="cancel" onClick={props.cancelFunction} color="warning" sx={{ "&:focus": { outline: "none" } }}>{props.cancelText || "Cancel"}</Button>);
|
|
45
|
+
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 || "Delete"}</Button>);
|
|
46
|
+
if (props.saveFunction) buttons.push(<Button key="save" type={props.saveButtonType || "button"} variant="contained" disableElevation aria-label={props.ariaLabelSave} onClick={props.saveFunction} disabled={props.isSubmitting} sx={{ "&:focus": { outline: "none" } }}>{props.saveText || "Save"}</Button>);
|
|
45
47
|
|
|
46
48
|
let classNames = ["inputBox"];
|
|
47
49
|
if (props.className) {
|