@olenbetong/synergi-react 4.2.3 → 4.2.5
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 +7 -7
- package/src/chrome/AppShell/index.tsx +29 -29
- package/src/chrome/openReport.ts +34 -34
- package/src/colorScheme.ts +81 -81
- package/src/components/DateNavigator/index.tsx +186 -186
- package/src/components/FilePond.tsx +312 -312
- package/src/components/ImageEditor/ImageEditor.tsx +348 -348
- package/src/components/ImageEditor/index.ts +9 -9
- package/src/components/ImageEditor/plugins/cropPlugin/CropOverlay.tsx +165 -165
- package/src/components/ImageEditor/plugins/cropPlugin/CropToolbar.tsx +48 -48
- package/src/components/ImageEditor/plugins/cropPlugin/useCropTool.ts +405 -405
- package/src/components/ImageEditor/plugins/redactPlugin/RedactToolbar.tsx +47 -47
- package/src/components/ImageEditor/plugins/zoomPlugin/ZoomContext.tsx +23 -23
- package/src/components/ImageEditor/plugins/zoomPlugin/ZoomControls.tsx +40 -40
- package/src/components/ImageEditor/useActiveTool.ts +21 -21
- package/src/components/ImageEditor/useEdgeDetection.ts +319 -319
- package/src/components/ImageEditor/useImageHistory.ts +197 -197
- package/src/components/ImageEditor/useOpenCV.ts +184 -184
- package/src/components/LinkedCardList/index.scss +95 -95
- package/src/components/MergeProgressDialog/index.tsx +249 -249
- package/src/components/PageBanner/index.tsx +80 -80
- package/src/components/PdfViewer/PdfViewer.tsx +158 -158
- package/src/components/ProgressBar/index.scss +96 -96
- package/src/components/SplitContainer/index.tsx +333 -333
- package/src/components/Toolbar/index.tsx +232 -232
- package/src/designsystemet-web-types.d.ts +24 -24
- package/src/elements/ElementDamage/DamageFormButtons.tsx +35 -35
- package/src/elements/ElementDamage/DescriptionInput.tsx +120 -120
- package/src/elements/ElementDamage/DuplicateDamage/DesktopView.tsx +82 -82
- package/src/elements/ElementDamage/DuplicateDamage/DublicateElementDamageDialog.tsx +67 -67
- package/src/elements/ElementDamage/DuplicateDamage/PhoneView.tsx +45 -45
- package/src/elements/ElementDamage/ElementNumberTextField.tsx +41 -41
- package/src/elements/ElementDamage/RegisterFix.tsx +100 -100
- package/src/elements/ElementDamage/SubmitButtons.tsx +40 -40
- package/src/elements/ElementDamage/TransportElementSelect.tsx +52 -52
- package/src/elements/ElementLookup.tsx +123 -123
- package/src/elements/ElementLookupDialog/BarcodeScanner/decoder.ts +32 -32
- package/src/elements/ElementLookupDialog/BarcodeScanner/decoders/dbr.ts +118 -118
- package/src/elements/ElementLookupDialog/BarcodeScanner/decoders/native.ts +103 -103
- package/src/elements/ElementLookupDialog/BarcodeScanner/decoders/zxing.ts +95 -95
- package/src/elements/ElementLookupDialog/BarcodeScanner/decoders.test.ts +118 -118
- package/src/elements/ElementLookupDialog/BarcodeScanner/duplicateFilter.ts +21 -21
- package/src/elements/ElementLookupDialog/BarcodeScanner/index.tsx +90 -90
- package/src/elements/ElementLookupDialog/BarcodeScanner/useScanner.ts +280 -280
- package/src/elements/ElementLookupDialog/HIDScanner/index.tsx +67 -67
- package/src/elements/ElementLookupDialog/Manual/ManualForm.tsx +141 -141
- package/src/elements/ElementLookupDialog/index.tsx +226 -226
- package/src/elements/ElementLookupDialog/utils/Giai.ts +209 -209
- package/src/elements/ProjectSelect.tsx +130 -130
- package/src/elements/index.ts +15 -15
- package/src/filter/index.ts +34 -34
- package/src/i18n.ts +13 -13
- package/src/index.ts +77 -77
- package/src/mui/MuiThemeProvider.tsx +174 -174
- package/src/mui/index.ts +1 -1
- package/src/test/setup.ts +8 -8
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
import "./index.css";
|
|
2
|
-
|
|
3
|
-
import { Box, Button } from "@mui/material";
|
|
4
|
-
|
|
5
|
-
import { useEffect, useRef, useState } from "react";
|
|
6
|
-
|
|
7
|
-
import { useHIDScanner } from "./useHIDScanner";
|
|
8
|
-
import { getLocalizedString } from "../../../i18n.js";
|
|
9
|
-
|
|
10
|
-
export function AddElementHIDScanner({ onScan }: { onScan: (id: string) => void }) {
|
|
11
|
-
let [enabled, setEnabled] = useState(false);
|
|
12
|
-
let root = useRef<HTMLDivElement>(null);
|
|
13
|
-
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
if (!root.current) return;
|
|
16
|
-
|
|
17
|
-
let rootElem = root.current;
|
|
18
|
-
|
|
19
|
-
function handleFocus() {
|
|
20
|
-
setEnabled(true);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function handleBlur() {
|
|
24
|
-
setEnabled(false);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
rootElem.addEventListener("focus", handleFocus);
|
|
28
|
-
rootElem.addEventListener("blur", handleBlur);
|
|
29
|
-
rootElem.focus();
|
|
30
|
-
|
|
31
|
-
return () => {
|
|
32
|
-
rootElem.removeEventListener("focus", handleFocus);
|
|
33
|
-
rootElem.removeEventListener("blur", handleBlur);
|
|
34
|
-
};
|
|
35
|
-
}, []);
|
|
36
|
-
|
|
37
|
-
useHIDScanner(onScan, enabled);
|
|
38
|
-
|
|
39
|
-
return (
|
|
40
|
-
<Box
|
|
41
|
-
sx={{
|
|
42
|
-
height: "100%",
|
|
43
|
-
bgcolor: "#ddd",
|
|
44
|
-
display: "flex",
|
|
45
|
-
alignItems: "center",
|
|
46
|
-
justifyContent: "center",
|
|
47
|
-
backgroundImage: enabled ? "linear-gradient(var(--angle), #777, #bbb, #777)" : "none",
|
|
48
|
-
animation: enabled ? "MovingBackground 8s linear infinite" : "none",
|
|
49
|
-
}}
|
|
50
|
-
tabIndex={0}
|
|
51
|
-
ref={root}
|
|
52
|
-
>
|
|
53
|
-
{enabled ? (
|
|
54
|
-
<span>{getLocalizedString("Listening for scanned elements")}...</span>
|
|
55
|
-
) : (
|
|
56
|
-
<Button
|
|
57
|
-
variant="contained"
|
|
58
|
-
onClick={() => {
|
|
59
|
-
if (root.current) root.current.focus();
|
|
60
|
-
}}
|
|
61
|
-
>
|
|
62
|
-
{getLocalizedString("Start listening")}
|
|
63
|
-
</Button>
|
|
64
|
-
)}
|
|
65
|
-
</Box>
|
|
66
|
-
);
|
|
67
|
-
}
|
|
1
|
+
import "./index.css";
|
|
2
|
+
|
|
3
|
+
import { Box, Button } from "@mui/material";
|
|
4
|
+
|
|
5
|
+
import { useEffect, useRef, useState } from "react";
|
|
6
|
+
|
|
7
|
+
import { useHIDScanner } from "./useHIDScanner";
|
|
8
|
+
import { getLocalizedString } from "../../../i18n.js";
|
|
9
|
+
|
|
10
|
+
export function AddElementHIDScanner({ onScan }: { onScan: (id: string) => void }) {
|
|
11
|
+
let [enabled, setEnabled] = useState(false);
|
|
12
|
+
let root = useRef<HTMLDivElement>(null);
|
|
13
|
+
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
if (!root.current) return;
|
|
16
|
+
|
|
17
|
+
let rootElem = root.current;
|
|
18
|
+
|
|
19
|
+
function handleFocus() {
|
|
20
|
+
setEnabled(true);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function handleBlur() {
|
|
24
|
+
setEnabled(false);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
rootElem.addEventListener("focus", handleFocus);
|
|
28
|
+
rootElem.addEventListener("blur", handleBlur);
|
|
29
|
+
rootElem.focus();
|
|
30
|
+
|
|
31
|
+
return () => {
|
|
32
|
+
rootElem.removeEventListener("focus", handleFocus);
|
|
33
|
+
rootElem.removeEventListener("blur", handleBlur);
|
|
34
|
+
};
|
|
35
|
+
}, []);
|
|
36
|
+
|
|
37
|
+
useHIDScanner(onScan, enabled);
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<Box
|
|
41
|
+
sx={{
|
|
42
|
+
height: "100%",
|
|
43
|
+
bgcolor: "#ddd",
|
|
44
|
+
display: "flex",
|
|
45
|
+
alignItems: "center",
|
|
46
|
+
justifyContent: "center",
|
|
47
|
+
backgroundImage: enabled ? "linear-gradient(var(--angle), #777, #bbb, #777)" : "none",
|
|
48
|
+
animation: enabled ? "MovingBackground 8s linear infinite" : "none",
|
|
49
|
+
}}
|
|
50
|
+
tabIndex={0}
|
|
51
|
+
ref={root}
|
|
52
|
+
>
|
|
53
|
+
{enabled ? (
|
|
54
|
+
<span>{getLocalizedString("Listening for scanned elements")}...</span>
|
|
55
|
+
) : (
|
|
56
|
+
<Button
|
|
57
|
+
variant="contained"
|
|
58
|
+
onClick={() => {
|
|
59
|
+
if (root.current) root.current.focus();
|
|
60
|
+
}}
|
|
61
|
+
>
|
|
62
|
+
{getLocalizedString("Start listening")}
|
|
63
|
+
</Button>
|
|
64
|
+
)}
|
|
65
|
+
</Box>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
@@ -1,141 +1,141 @@
|
|
|
1
|
-
import Add from "@mui/icons-material/Add";
|
|
2
|
-
import { Alert, Button, TextField } from "@mui/material";
|
|
3
|
-
import { useId, useRef, useState } from "react";
|
|
4
|
-
import type { ProjectsRecord } from "../../data/dsProjects";
|
|
5
|
-
import { ProjectSelect } from "../../ProjectSelect";
|
|
6
|
-
import { type ElementDetails, getElement } from "../getElement";
|
|
7
|
-
import { getLocalizedString } from "../../../i18n.js";
|
|
8
|
-
|
|
9
|
-
const isElementsOnly = /^([a-z]{2,4}[\s]*[0-9]{4,8}[\s,]*)+$/i;
|
|
10
|
-
const matchElements = /([a-z]{2,4}[\s]*[0-9]{4,8})/gi;
|
|
11
|
-
|
|
12
|
-
export type ProjectRecordBase = {
|
|
13
|
-
Domain: string;
|
|
14
|
-
ProjectID: string;
|
|
15
|
-
ProjectName?: string;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export type AddElementManualFormProps = {
|
|
19
|
-
onAdd: (element: string | ElementDetails) => Promise<void>;
|
|
20
|
-
mode?: "single" | "multi";
|
|
21
|
-
defaultProject?: ProjectRecordBase;
|
|
22
|
-
allowEmptyElement?: boolean;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export function AddElementManualForm({
|
|
26
|
-
onAdd,
|
|
27
|
-
mode,
|
|
28
|
-
defaultProject,
|
|
29
|
-
allowEmptyElement = false,
|
|
30
|
-
}: AddElementManualFormProps) {
|
|
31
|
-
let id = useId();
|
|
32
|
-
let buttonRef = useRef<HTMLButtonElement>(null);
|
|
33
|
-
let [working, setWorking] = useState(false);
|
|
34
|
-
let [elementId, setElementId] = useState<string>("");
|
|
35
|
-
let [project, setProject] = useState<Partial<ProjectsRecord> | null>(defaultProject ?? null);
|
|
36
|
-
|
|
37
|
-
async function handleSubmit(evt: React.FormEvent<HTMLFormElement>) {
|
|
38
|
-
try {
|
|
39
|
-
evt.preventDefault();
|
|
40
|
-
evt.stopPropagation();
|
|
41
|
-
let formData = new FormData(evt.target as HTMLFormElement);
|
|
42
|
-
let elements = formData.get("ElementID");
|
|
43
|
-
let domain = formData.get("Domain");
|
|
44
|
-
let project: ProjectsRecord = JSON.parse(formData.get("Project") as string);
|
|
45
|
-
|
|
46
|
-
if (allowEmptyElement) {
|
|
47
|
-
if (!project.ProjectID) {
|
|
48
|
-
alert(getLocalizedString("Project is required"));
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
} else {
|
|
52
|
-
if (!project.ProjectID || !domain || !elements) {
|
|
53
|
-
let warning = getLocalizedString(
|
|
54
|
-
mode === "multi" ? "Project and elements are required" : "Project and element are required",
|
|
55
|
-
);
|
|
56
|
-
alert(warning);
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
if (elements) {
|
|
62
|
-
setWorking(true);
|
|
63
|
-
let record = (elements as string)
|
|
64
|
-
.match(matchElements)
|
|
65
|
-
?.map((elementId) => elementId.replace(/\s+/g, ""))
|
|
66
|
-
.map((elementId) =>
|
|
67
|
-
getElement({ projectId: project.ProjectID as string, elementId: elementId }, { mode: "manual" }),
|
|
68
|
-
);
|
|
69
|
-
|
|
70
|
-
if (!record) {
|
|
71
|
-
alert(getLocalizedString("Invalid elements"));
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
let loaded = (await Promise.all(record)).map((record) => onAdd(record));
|
|
76
|
-
await Promise.all(loaded);
|
|
77
|
-
setWorking(false);
|
|
78
|
-
} else {
|
|
79
|
-
onAdd({
|
|
80
|
-
PrimKey: "",
|
|
81
|
-
Domain: domain?.toString() ?? "",
|
|
82
|
-
Created: project?.Created,
|
|
83
|
-
ProjectID: project.ProjectID,
|
|
84
|
-
ProjectName: project.ProjectName,
|
|
85
|
-
ProjectDomain: project.Domain,
|
|
86
|
-
ElementID: "",
|
|
87
|
-
DisplayName: "",
|
|
88
|
-
GiaiUri: "",
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
} catch (error) {
|
|
92
|
-
setWorking(false);
|
|
93
|
-
alert((error as Error).message);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
return (
|
|
98
|
-
<form id={id} onSubmit={handleSubmit} method="post">
|
|
99
|
-
<Alert severity="warning" sx={{ mb: 2 }}>
|
|
100
|
-
{getLocalizedString(
|
|
101
|
-
"Manually entering elements is a major source of errors. Only use this as a last resort. If the camera or scanner is not working, please contact the IT department.",
|
|
102
|
-
)}
|
|
103
|
-
</Alert>
|
|
104
|
-
|
|
105
|
-
<input type="hidden" name="Project" value={project ? JSON.stringify(project) : ""} />
|
|
106
|
-
|
|
107
|
-
<ProjectSelect
|
|
108
|
-
onChange={(project) => (project ? setProject(project) : setProject(null))}
|
|
109
|
-
value={project}
|
|
110
|
-
id="AddElement_Project"
|
|
111
|
-
/>
|
|
112
|
-
|
|
113
|
-
<TextField
|
|
114
|
-
variant="filled"
|
|
115
|
-
fullWidth
|
|
116
|
-
autoComplete="off"
|
|
117
|
-
margin="normal"
|
|
118
|
-
name="ElementID"
|
|
119
|
-
id="AddElement_ElementID"
|
|
120
|
-
label={getLocalizedString("Element ID")}
|
|
121
|
-
value={elementId}
|
|
122
|
-
onChange={(evt) => setElementId(evt.target.value)}
|
|
123
|
-
/>
|
|
124
|
-
|
|
125
|
-
<Button
|
|
126
|
-
form={id}
|
|
127
|
-
ref={buttonRef}
|
|
128
|
-
color="primary"
|
|
129
|
-
variant="contained"
|
|
130
|
-
size="large"
|
|
131
|
-
type="submit"
|
|
132
|
-
disabled={(!allowEmptyElement && !isElementsOnly.test(elementId)) || working}
|
|
133
|
-
loading={working}
|
|
134
|
-
loadingPosition="end"
|
|
135
|
-
endIcon={<Add />}
|
|
136
|
-
>
|
|
137
|
-
{getLocalizedString("Add")}
|
|
138
|
-
</Button>
|
|
139
|
-
</form>
|
|
140
|
-
);
|
|
141
|
-
}
|
|
1
|
+
import Add from "@mui/icons-material/Add";
|
|
2
|
+
import { Alert, Button, TextField } from "@mui/material";
|
|
3
|
+
import { useId, useRef, useState } from "react";
|
|
4
|
+
import type { ProjectsRecord } from "../../data/dsProjects";
|
|
5
|
+
import { ProjectSelect } from "../../ProjectSelect";
|
|
6
|
+
import { type ElementDetails, getElement } from "../getElement";
|
|
7
|
+
import { getLocalizedString } from "../../../i18n.js";
|
|
8
|
+
|
|
9
|
+
const isElementsOnly = /^([a-z]{2,4}[\s]*[0-9]{4,8}[\s,]*)+$/i;
|
|
10
|
+
const matchElements = /([a-z]{2,4}[\s]*[0-9]{4,8})/gi;
|
|
11
|
+
|
|
12
|
+
export type ProjectRecordBase = {
|
|
13
|
+
Domain: string;
|
|
14
|
+
ProjectID: string;
|
|
15
|
+
ProjectName?: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type AddElementManualFormProps = {
|
|
19
|
+
onAdd: (element: string | ElementDetails) => Promise<void>;
|
|
20
|
+
mode?: "single" | "multi";
|
|
21
|
+
defaultProject?: ProjectRecordBase;
|
|
22
|
+
allowEmptyElement?: boolean;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export function AddElementManualForm({
|
|
26
|
+
onAdd,
|
|
27
|
+
mode,
|
|
28
|
+
defaultProject,
|
|
29
|
+
allowEmptyElement = false,
|
|
30
|
+
}: AddElementManualFormProps) {
|
|
31
|
+
let id = useId();
|
|
32
|
+
let buttonRef = useRef<HTMLButtonElement>(null);
|
|
33
|
+
let [working, setWorking] = useState(false);
|
|
34
|
+
let [elementId, setElementId] = useState<string>("");
|
|
35
|
+
let [project, setProject] = useState<Partial<ProjectsRecord> | null>(defaultProject ?? null);
|
|
36
|
+
|
|
37
|
+
async function handleSubmit(evt: React.FormEvent<HTMLFormElement>) {
|
|
38
|
+
try {
|
|
39
|
+
evt.preventDefault();
|
|
40
|
+
evt.stopPropagation();
|
|
41
|
+
let formData = new FormData(evt.target as HTMLFormElement);
|
|
42
|
+
let elements = formData.get("ElementID");
|
|
43
|
+
let domain = formData.get("Domain");
|
|
44
|
+
let project: ProjectsRecord = JSON.parse(formData.get("Project") as string);
|
|
45
|
+
|
|
46
|
+
if (allowEmptyElement) {
|
|
47
|
+
if (!project.ProjectID) {
|
|
48
|
+
alert(getLocalizedString("Project is required"));
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
} else {
|
|
52
|
+
if (!project.ProjectID || !domain || !elements) {
|
|
53
|
+
let warning = getLocalizedString(
|
|
54
|
+
mode === "multi" ? "Project and elements are required" : "Project and element are required",
|
|
55
|
+
);
|
|
56
|
+
alert(warning);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (elements) {
|
|
62
|
+
setWorking(true);
|
|
63
|
+
let record = (elements as string)
|
|
64
|
+
.match(matchElements)
|
|
65
|
+
?.map((elementId) => elementId.replace(/\s+/g, ""))
|
|
66
|
+
.map((elementId) =>
|
|
67
|
+
getElement({ projectId: project.ProjectID as string, elementId: elementId }, { mode: "manual" }),
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
if (!record) {
|
|
71
|
+
alert(getLocalizedString("Invalid elements"));
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
let loaded = (await Promise.all(record)).map((record) => onAdd(record));
|
|
76
|
+
await Promise.all(loaded);
|
|
77
|
+
setWorking(false);
|
|
78
|
+
} else {
|
|
79
|
+
onAdd({
|
|
80
|
+
PrimKey: "",
|
|
81
|
+
Domain: domain?.toString() ?? "",
|
|
82
|
+
Created: project?.Created,
|
|
83
|
+
ProjectID: project.ProjectID,
|
|
84
|
+
ProjectName: project.ProjectName,
|
|
85
|
+
ProjectDomain: project.Domain,
|
|
86
|
+
ElementID: "",
|
|
87
|
+
DisplayName: "",
|
|
88
|
+
GiaiUri: "",
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
} catch (error) {
|
|
92
|
+
setWorking(false);
|
|
93
|
+
alert((error as Error).message);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return (
|
|
98
|
+
<form id={id} onSubmit={handleSubmit} method="post">
|
|
99
|
+
<Alert severity="warning" sx={{ mb: 2 }}>
|
|
100
|
+
{getLocalizedString(
|
|
101
|
+
"Manually entering elements is a major source of errors. Only use this as a last resort. If the camera or scanner is not working, please contact the IT department.",
|
|
102
|
+
)}
|
|
103
|
+
</Alert>
|
|
104
|
+
|
|
105
|
+
<input type="hidden" name="Project" value={project ? JSON.stringify(project) : ""} />
|
|
106
|
+
|
|
107
|
+
<ProjectSelect
|
|
108
|
+
onChange={(project) => (project ? setProject(project) : setProject(null))}
|
|
109
|
+
value={project}
|
|
110
|
+
id="AddElement_Project"
|
|
111
|
+
/>
|
|
112
|
+
|
|
113
|
+
<TextField
|
|
114
|
+
variant="filled"
|
|
115
|
+
fullWidth
|
|
116
|
+
autoComplete="off"
|
|
117
|
+
margin="normal"
|
|
118
|
+
name="ElementID"
|
|
119
|
+
id="AddElement_ElementID"
|
|
120
|
+
label={getLocalizedString("Element ID")}
|
|
121
|
+
value={elementId}
|
|
122
|
+
onChange={(evt) => setElementId(evt.target.value)}
|
|
123
|
+
/>
|
|
124
|
+
|
|
125
|
+
<Button
|
|
126
|
+
form={id}
|
|
127
|
+
ref={buttonRef}
|
|
128
|
+
color="primary"
|
|
129
|
+
variant="contained"
|
|
130
|
+
size="large"
|
|
131
|
+
type="submit"
|
|
132
|
+
disabled={(!allowEmptyElement && !isElementsOnly.test(elementId)) || working}
|
|
133
|
+
loading={working}
|
|
134
|
+
loadingPosition="end"
|
|
135
|
+
endIcon={<Add />}
|
|
136
|
+
>
|
|
137
|
+
{getLocalizedString("Add")}
|
|
138
|
+
</Button>
|
|
139
|
+
</form>
|
|
140
|
+
);
|
|
141
|
+
}
|