@olenbetong/synergi-react 2.3.5 → 2.3.7

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.
@@ -117,9 +117,5 @@ export function DateNavigator({ date: dateProp, defaultDate, disableTodayButton,
117
117
  updateDate(new Date(dateUtc + oneDay * modifier));
118
118
  }
119
119
  }
120
- return (
121
- // biome-ignore lint/a11y/noNoninteractiveTabindex: I hate this component
122
- // biome-ignore lint/a11y/noStaticElementInteractions: legacy component
123
- // biome-ignore lint/a11y/useAriaPropsSupportedByRole: legacy component
124
- _jsxs("div", { className: "ObDateNavigator-root", onKeyDown: handleKeyDown, tabIndex: 0, "aria-label": "Date navigator", children: [_jsx(Arrow, { direction: "left", onClick: () => updateDate(new Date(dateUtc - oneDay)), disabled: disablePrev }), _jsx("div", { className: "ObDateNavigator-date", children: text }), _jsx(Arrow, { direction: "right", onClick: () => updateDate(new Date(dateUtc + oneDay)), disabled: disableNext }), !disableTodayButton && (_jsx("button", { type: "button", className: "ObDateNavigator-today btn-reset", onClick: jumpToToday, children: getLocalizedString("Today") })), _jsx("div", { "aria-live": "polite", ref: liveRef, style: { position: "absolute", left: "-9999px" } })] }));
120
+ return (_jsxs("div", { className: "ObDateNavigator-root", onKeyDown: handleKeyDown, tabIndex: 0, "aria-label": "Date navigator", children: [_jsx(Arrow, { direction: "left", onClick: () => updateDate(new Date(dateUtc - oneDay)), disabled: disablePrev }), _jsx("div", { className: "ObDateNavigator-date", children: text }), _jsx(Arrow, { direction: "right", onClick: () => updateDate(new Date(dateUtc + oneDay)), disabled: disableNext }), !disableTodayButton && (_jsx("button", { type: "button", className: "ObDateNavigator-today btn-reset", onClick: jumpToToday, children: getLocalizedString("Today") })), _jsx("div", { "aria-live": "polite", ref: liveRef, style: { position: "absolute", left: "-9999px" } })] }));
125
121
  }
@@ -36,9 +36,7 @@ settingsStore.keys().then((keys) => Promise.allSettled(keys
36
36
  }
37
37
  }))));
38
38
  const Divider = forwardRef(function Divider(props, ref) {
39
- return (
40
- // biome-ignore lint/a11y/useSemanticElements: NO!
41
- _jsx("div", { className: clsx("ObSplitContainer-divider", props.className), tabIndex: 0, ref: ref, role: "separator", "aria-orientation": props.direction, "aria-valuemin": props.min, "aria-valuemax": props.max, "aria-valuenow": props.size, children: _jsx("span", { children: "\u2022\u2022\u2022" }) }));
39
+ return (_jsx("div", { className: clsx("ObSplitContainer-divider", props.className), tabIndex: 0, ref: ref, role: "separator", "aria-orientation": props.direction, "aria-valuemin": props.min, "aria-valuemax": props.max, "aria-valuenow": props.size, children: _jsx("span", { children: "\u2022\u2022\u2022" }) }));
42
40
  });
43
41
  function SplitRoot({ className, direction, ...props }) {
44
42
  return _jsx("div", { className: clsx(className, "ObSplitContainer-root", direction), ...props });
@@ -6,9 +6,7 @@ export const ValueToggleGroup = forwardRef(function ValueToggleGroup({ options,
6
6
  let randomId = useId();
7
7
  let groupName = name || `toggle-${id ?? randomId}`;
8
8
  let isControlled = value !== undefined;
9
- return (
10
- // biome-ignore lint/a11y/noNoninteractiveElementToInteractiveRole: legacy component
11
- _jsx("fieldset", { className: clsx("ObValueToggleGroup", orientation, className), role: "radiogroup", ref: ref, style: style, children: options.map((opt) => {
9
+ return (_jsx("fieldset", { className: clsx("ObValueToggleGroup", orientation, className), role: "radiogroup", ref: ref, style: style, children: options.map((opt) => {
12
10
  return (_jsxs("label", { className: clsx("ObValueToggleOption", { disabled: opt.disabled }), children: [_jsx("input", { type: "radio", name: groupName, value: opt.value, checked: isControlled ? value === opt.value : undefined, defaultChecked: !isControlled ? defaultValue === opt.value : undefined, onChange: () => onChange?.(opt.value), disabled: opt.disabled }), _jsx("span", { className: "ObValueToggleLabel", children: opt.label ?? opt.value })] }, opt.value));
13
11
  }) }));
14
12
  });
@@ -3,7 +3,12 @@ import { Grid, Typography } from "@mui/material";
3
3
  import { getLocalizedString } from "@olenbetong/appframe-core";
4
4
  import { Link } from "@olenbetong/appframe-mui";
5
5
  function SummaryItem({ col, label, children, em, align, padding }) {
6
- return (_jsxs(Grid, { size: col, sx: { p: padding ?? 2, borderBottom: (t) => `1px solid ${t.palette.divider}` }, children: [label && (_jsx(Typography, { variant: "body1", fontSize: "0.9rem", fontWeight: 500, mb: 1, textAlign: align, children: getLocalizedString(label) })), children && (_jsx(Typography, { fontSize: em ? "1.4rem" : "0.9rem", whiteSpace: "pre-line", fontWeight: em ? 600 : undefined, textAlign: align, children: children }))] }));
6
+ return (_jsxs(Grid, { size: col, sx: { p: padding ?? 2, borderBottom: (t) => `1px solid ${t.palette.divider}` }, children: [label && (_jsx(Typography, { variant: "body1", sx: { fontSize: "0.9rem", fontWeight: 500, mb: 1, textAlign: align }, children: getLocalizedString(label) })), children && (_jsx(Typography, { sx: {
7
+ fontSize: em ? "1.4rem" : "0.9rem",
8
+ fontWeight: em ? 600 : undefined,
9
+ textAlign: align,
10
+ whiteSpace: "pre-line",
11
+ }, children: children }))] }));
7
12
  }
8
13
  export function ElementDamagesItem({ record, linkToDamage }) {
9
14
  return (_jsxs(_Fragment, { children: [_jsx(SummaryItem, { col: 1.5, children: linkToDamage ? (_jsx(Link, { href: "#", onClick: (e) => {
@@ -6,5 +6,5 @@ export function DuplicatePhoneViewItem({ record, linkToDamage }) {
6
6
  if (linkToDamage) {
7
7
  window.location.href = `${record.ID}`;
8
8
  }
9
- }, children: _jsxs(CardContent, { children: [_jsx(Typography, { sx: { fontSize: 14 }, color: "text.secondary", gutterBottom: true, children: record.Date.toLocaleDateString() }), _jsxs(Typography, { variant: "h5", mb: 1.5, children: [record.ElementID, " - ", record.DisplayName] }), _jsxs(Typography, { children: [getLocalizedString("Description"), ":"] }), _jsx(Typography, { mb: 1.5, color: "text.secondary", children: record.Description }), _jsxs(Typography, { children: [getLocalizedString("Cause"), ": "] }), _jsx(Typography, { mb: 1.5, color: "text.secondary", children: record.Cause }), _jsxs(Typography, { children: [getLocalizedString("Action"), ": "] }), _jsx(Typography, { mb: 1.5, color: "text.secondary", children: record.Action })] }) }));
9
+ }, children: _jsxs(CardContent, { children: [_jsx(Typography, { sx: { fontSize: 14 }, color: "text.secondary", gutterBottom: true, children: record.Date.toLocaleDateString() }), _jsxs(Typography, { variant: "h5", sx: { mb: 1.5 }, children: [record.ElementID, " - ", record.DisplayName] }), _jsxs(Typography, { children: [getLocalizedString("Description"), ":"] }), _jsx(Typography, { sx: { mb: 1.5 }, color: "text.secondary", children: record.Description }), _jsxs(Typography, { children: [getLocalizedString("Cause"), ": "] }), _jsx(Typography, { sx: { mb: 1.5 }, color: "text.secondary", children: record.Cause }), _jsxs(Typography, { children: [getLocalizedString("Action"), ": "] }), _jsx(Typography, { sx: { mb: 1.5 }, color: "text.secondary", children: record.Action })] }) }));
10
10
  }
@@ -41,5 +41,5 @@ export function RegisterFix({ value, defaultValue, onFix, edit }) {
41
41
  alert(error.message);
42
42
  }
43
43
  }
44
- return (_jsxs(_Fragment, { children: [edit ? (_jsx(Button, { loading: loading, loadingPosition: "end", endIcon: _jsx(CheckIcon, {}), onClick: handleRegisterFix, disabled: !!fixValue?.RegisteredFix, variant: "contained", children: getLocalizedString("Register fix") })) : (_jsx(FormControlLabel, { control: _jsx(Checkbox, {}), label: getLocalizedString("Register fixed"), name: "RegisteredFix", id: "NewElementDamage_RegisteredFix" })), fixValue?.RegisteredFix && (_jsx(Typography, { mb: 1.5, color: "text.secondary", children: localize `Registered fix by ${fixValue.RegisteredFixFullName ?? fixValue.RegisteredFixBy} on the ${formatter.format(fixValue.RegisteredFix)}` }))] }));
44
+ return (_jsxs(_Fragment, { children: [edit ? (_jsx(Button, { loading: loading, loadingPosition: "end", endIcon: _jsx(CheckIcon, {}), onClick: handleRegisterFix, disabled: !!fixValue?.RegisteredFix, variant: "contained", children: getLocalizedString("Register fix") })) : (_jsx(FormControlLabel, { control: _jsx(Checkbox, {}), label: getLocalizedString("Register fixed"), name: "RegisteredFix", id: "NewElementDamage_RegisteredFix" })), fixValue?.RegisteredFix && (_jsx(Typography, { sx: { mb: 1.5 }, color: "text.secondary", children: localize `Registered fix by ${fixValue.RegisteredFixFullName ?? fixValue.RegisteredFixBy} on the ${formatter.format(fixValue.RegisteredFix)}` }))] }));
45
45
  }
@@ -22,7 +22,7 @@ export function BarcodeScanner({ onRead }) {
22
22
  position: "relative",
23
23
  bgcolor: "black",
24
24
  height: "100%",
25
- }, children: [_jsxs(Box, { height: "100%", ref: readerRoot, children: [_jsx(Box, { component: "video", className: "dbrScanner-video", playsInline: true, sx: frameSx }), _jsx(Box, { component: "canvas", sx: frameSx, width: "1280", height: "720", ref: canvas }), error && _jsx(ErrorIcon, { ...error })] }), _jsxs(Box, { sx: {
25
+ }, children: [_jsxs(Box, { sx: { height: "100%" }, ref: readerRoot, children: [_jsx(Box, { component: "video", className: "dbrScanner-video", playsInline: true, sx: frameSx }), _jsx(Box, { component: "canvas", sx: frameSx, width: "1280", height: "720", ref: canvas }), error && _jsx(ErrorIcon, { ...error })] }), _jsxs(Box, { sx: {
26
26
  display: "flex",
27
27
  alignItems: "center",
28
28
  justifyContent: "space-between",
@@ -26,10 +26,15 @@ export function AddElementHIDScanner({ onScan }) {
26
26
  };
27
27
  }, []);
28
28
  useHIDScanner(onScan, enabled);
29
- return (_jsx(Box, { height: "100%", bgcolor: "#ddd", display: "flex", alignItems: "center", justifyContent: "center", tabIndex: 0, ref: root, sx: {
29
+ return (_jsx(Box, { sx: {
30
+ height: "100%",
31
+ bgcolor: "#ddd",
32
+ display: "flex",
33
+ alignItems: "center",
34
+ justifyContent: "center",
30
35
  backgroundImage: enabled ? "linear-gradient(var(--angle), #777, #bbb, #777)" : "none",
31
36
  animation: enabled ? "MovingBackground 8s linear infinite" : "none",
32
- }, children: enabled ? (_jsxs("span", { children: [getLocalizedString("Listening for scanned elements"), "..."] })) : (_jsx(Button, { variant: "contained", onClick: () => {
37
+ }, tabIndex: 0, ref: root, children: enabled ? (_jsxs("span", { children: [getLocalizedString("Listening for scanned elements"), "..."] })) : (_jsx(Button, { variant: "contained", onClick: () => {
33
38
  if (root.current)
34
39
  root.current.focus();
35
40
  }, children: getLocalizedString("Start listening") })) }));
@@ -72,7 +72,7 @@ export function ElementLookupDialog(props) {
72
72
  }
73
73
  return (_jsx(ResponsiveDialog, { open: open, onClose: onClose, slotProps: {
74
74
  paper: { sx: { overflow: "hidden" } },
75
- }, children: _jsxs(Box, { display: "flex", flexDirection: "column", maxHeight: "100%", overflow: "hidden", flexGrow: 1, children: [_jsxs(Tabs, { value: tab, onChange: (_, newTab) => setTab(newTab), variant: "fullWidth", sx: { flexShrink: 0 }, children: [props.mode !== "search" && _jsx(Tab, { icon: _jsx(Edit, {}), label: getLocalizedString("Manual"), value: "manual" }), _jsx(Tab, { icon: _jsx(TapAndPlay, {}), label: getLocalizedString("Scanner"), value: "scanner" }), _jsx(Tab, { icon: _jsx(QrCodeScanner, {}), label: getLocalizedString("Camera"), value: "camera" })] }), tab === "camera" && (_jsx(Box, { flexBasis: "12rem", flexGrow: 1, flexShrink: 2, children: _jsx(BarcodeScanner, { onRead: (element) => handleElementAdd(element, "camera-barcode") }) })), tab === "manual" && (_jsx(Box, { p: 2, children: _jsx(AddElementManualForm, { onAdd: (element) => handleElementAdd(element, "manual"), allowEmptyElement: props.allowEmptyElement }) })), tab === "scanner" && (_jsx(Box, { flexBasis: "12rem", flexGrow: 1, flexShrink: 2, children: _jsx(AddElementHIDScanner, { onScan: (element) => handleElementAdd(element, element.startsWith(Giai.BARCODE_PREFIX) ? "hid-barcode" : "hid-rfid") }) })), _jsxs(Box, { flex: "3 1 14rem", overflow: "auto", children: [props.mode === "multi" && (_jsx(Alert, { icon: false, severity: "info", sx: { justifyContent: "center", py: 0, position: "sticky", top: 0, zIndex: 1 }, slotProps: {
75
+ }, children: _jsxs(Box, { sx: { display: "flex", flexDirection: "column", maxHeight: "100%", overflow: "hidden", flexGrow: 1 }, children: [_jsxs(Tabs, { value: tab, onChange: (_, newTab) => setTab(newTab), variant: "fullWidth", sx: { flexShrink: 0 }, children: [props.mode !== "search" && _jsx(Tab, { icon: _jsx(Edit, {}), label: getLocalizedString("Manual"), value: "manual" }), _jsx(Tab, { icon: _jsx(TapAndPlay, {}), label: getLocalizedString("Scanner"), value: "scanner" }), _jsx(Tab, { icon: _jsx(QrCodeScanner, {}), label: getLocalizedString("Camera"), value: "camera" })] }), tab === "camera" && (_jsx(Box, { sx: { flexBasis: "12rem", flexGrow: 1, flexShrink: 2 }, children: _jsx(BarcodeScanner, { onRead: (element) => handleElementAdd(element, "camera-barcode") }) })), tab === "manual" && (_jsx(Box, { sx: { p: 2 }, children: _jsx(AddElementManualForm, { onAdd: (element) => handleElementAdd(element, "manual"), allowEmptyElement: props.allowEmptyElement }) })), tab === "scanner" && (_jsx(Box, { sx: { flexBasis: "12rem", flexGrow: 1, flexShrink: 2 }, children: _jsx(AddElementHIDScanner, { onScan: (element) => handleElementAdd(element, element.startsWith(Giai.BARCODE_PREFIX) ? "hid-barcode" : "hid-rfid") }) })), _jsxs(Box, { sx: { flex: "3 1 14rem", overflow: "auto" }, children: [props.mode === "multi" && (_jsx(Alert, { icon: false, severity: "info", sx: { justifyContent: "center", py: 0, position: "sticky", top: 0, zIndex: 1 }, slotProps: {
76
76
  message: { sx: { py: 0.5 } },
77
77
  }, children: localize `${elements.length} elements selected` })), _jsx(List, { disablePadding: true, children: elements.map(({ element }) => (_jsx(ListItem, { "data-elementid": element.ElementID, secondaryAction: _jsx(Button, { color: "error", variant: "outlined", onClick: () => {
78
78
  setElements((current) => props.mode === "multi" ? current.filter((e) => e.element.ElementID !== element.ElementID) : []);
@@ -31,9 +31,11 @@ export function ProjectSelect({ className, disabled, id, names, onChange, readOn
31
31
  return new Set([...nameCount.entries()].filter(([, count]) => count > 1).map(([name]) => name));
32
32
  }, [projects]);
33
33
  return (_jsxs(_Fragment, { children: [_jsx(Autocomplete, { sx: sx, autoHighlight: true, autoSelect: true, clearOnEscape: true, className: className, options: projects, disabled: disabled, getOptionLabel: (option) => option?.ProjectID !== undefined ? `${option.ProjectID}: ${option.ProjectName}` : "", isOptionEqualToValue: (option, value) => option.Domain === value.Domain && option.ProjectID === value.ProjectID, onChange: (_, value) => handleSelect(value), onClose: () => setQuery(""), value: value !== undefined ? value : selected, renderInput: (params) => (_jsx(TextField, { ...params, label: label ? label : getLocalizedString("Project ID"), id: id ?? "ProjectLookup", fullWidth: true, slotProps: {
34
+ input: params.slotProps?.input,
35
+ inputLabel: params.slotProps?.inputLabel,
34
36
  htmlInput: {
35
37
  readOnly,
36
- ...params.inputProps,
38
+ ...params.slotProps?.htmlInput,
37
39
  },
38
40
  }, autoComplete: "off", variant: "filled", required: required, onChange: (evt) => setQuery(evt.target.value), value: query })), renderOption: (props, option) => {
39
41
  let isDuplicated = option.ProjectName && duplicatedNames.has(option.ProjectName);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olenbetong/synergi-react",
3
- "version": "2.3.5",
3
+ "version": "2.3.7",
4
4
  "description": "Standalone React component for SynergiWeb and Partner Portal",
5
5
  "type": "module",
6
6
  "exports": {
@@ -39,8 +39,8 @@
39
39
  "localforage": "^1.10.0",
40
40
  "mitt": "^3.0.1",
41
41
  "@olenbetong/appframe-core": "2.11.10",
42
- "@olenbetong/appframe-mui": "6.0.9",
43
- "@olenbetong/appframe-react": "1.21.23"
42
+ "@olenbetong/appframe-react": "1.21.23",
43
+ "@olenbetong/appframe-mui": "6.0.11"
44
44
  },
45
45
  "repository": {
46
46
  "type": "git",
@@ -16,16 +16,18 @@ function SummaryItem({ col, label, children, em, align, padding }: SummaryItemPr
16
16
  return (
17
17
  <Grid size={col} sx={{ p: padding ?? 2, borderBottom: (t) => `1px solid ${t.palette.divider}` }}>
18
18
  {label && (
19
- <Typography variant="body1" fontSize="0.9rem" fontWeight={500} mb={1} textAlign={align}>
19
+ <Typography variant="body1" sx={{ fontSize: "0.9rem", fontWeight: 500, mb: 1, textAlign: align }}>
20
20
  {getLocalizedString(label)}
21
21
  </Typography>
22
22
  )}
23
23
  {children && (
24
24
  <Typography
25
- fontSize={em ? "1.4rem" : "0.9rem"}
26
- whiteSpace="pre-line"
27
- fontWeight={em ? 600 : undefined}
28
- textAlign={align}
25
+ sx={{
26
+ fontSize: em ? "1.4rem" : "0.9rem",
27
+ fontWeight: em ? 600 : undefined,
28
+ textAlign: align,
29
+ whiteSpace: "pre-line",
30
+ }}
29
31
  >
30
32
  {children}
31
33
  </Typography>
@@ -21,22 +21,22 @@ export function DuplicatePhoneViewItem({ record, linkToDamage }: DuplicatePhoneV
21
21
  <Typography sx={{ fontSize: 14 }} color="text.secondary" gutterBottom>
22
22
  {record.Date.toLocaleDateString()}
23
23
  </Typography>
24
- <Typography variant="h5" mb={1.5}>
24
+ <Typography variant="h5" sx={{ mb: 1.5 }}>
25
25
  {record.ElementID} - {record.DisplayName}
26
26
  </Typography>
27
27
 
28
28
  <Typography>{getLocalizedString("Description")}:</Typography>
29
- <Typography mb={1.5} color="text.secondary">
29
+ <Typography sx={{ mb: 1.5 }} color="text.secondary">
30
30
  {record.Description}
31
31
  </Typography>
32
32
 
33
33
  <Typography>{getLocalizedString("Cause")}: </Typography>
34
- <Typography mb={1.5} color="text.secondary">
34
+ <Typography sx={{ mb: 1.5 }} color="text.secondary">
35
35
  {record.Cause}
36
36
  </Typography>
37
37
 
38
38
  <Typography>{getLocalizedString("Action")}: </Typography>
39
- <Typography mb={1.5} color="text.secondary">
39
+ <Typography sx={{ mb: 1.5 }} color="text.secondary">
40
40
  {record.Action}
41
41
  </Typography>
42
42
  </CardContent>
@@ -91,7 +91,7 @@ export function RegisterFix({ value, defaultValue, onFix, edit }: RegisterFixPro
91
91
  )}
92
92
 
93
93
  {fixValue?.RegisteredFix && (
94
- <Typography mb={1.5} color="text.secondary">
94
+ <Typography sx={{ mb: 1.5 }} color="text.secondary">
95
95
  {localize`Registered fix by ${fixValue.RegisteredFixFullName ?? fixValue.RegisteredFixBy} on the ${formatter.format(fixValue.RegisteredFix)}`}
96
96
  </Typography>
97
97
  )}
@@ -39,7 +39,7 @@ export function BarcodeScanner({ onRead }: BarcodeScannerProps) {
39
39
  height: "100%",
40
40
  }}
41
41
  >
42
- <Box height="100%" ref={readerRoot}>
42
+ <Box sx={{ height: "100%" }} ref={readerRoot}>
43
43
  <Box component="video" className="dbrScanner-video" playsInline sx={frameSx} />
44
44
  <Box component="canvas" sx={frameSx} width="1280" height="720" ref={canvas} />
45
45
  {error && <ErrorIcon {...error} />}
@@ -38,17 +38,17 @@ export function AddElementHIDScanner({ onScan }: { onScan: (id: string) => void
38
38
 
39
39
  return (
40
40
  <Box
41
- height="100%"
42
- bgcolor="#ddd"
43
- display="flex"
44
- alignItems="center"
45
- justifyContent="center"
46
- tabIndex={0}
47
- ref={root}
48
41
  sx={{
42
+ height: "100%",
43
+ bgcolor: "#ddd",
44
+ display: "flex",
45
+ alignItems: "center",
46
+ justifyContent: "center",
49
47
  backgroundImage: enabled ? "linear-gradient(var(--angle), #777, #bbb, #777)" : "none",
50
48
  animation: enabled ? "MovingBackground 8s linear infinite" : "none",
51
49
  }}
50
+ tabIndex={0}
51
+ ref={root}
52
52
  >
53
53
  {enabled ? (
54
54
  <span>{getLocalizedString("Listening for scanned elements")}...</span>
@@ -6,7 +6,7 @@ export function useHIDScanner(onRead: (value: string) => void, enabled = false)
6
6
 
7
7
  let hexKeys = "ABCDEFabcdefxX0123456789";
8
8
  let buffer = "";
9
- let clearBufferTimeout: NodeJS.Timeout;
9
+ let clearBufferTimeout: number;
10
10
 
11
11
  function handleKeyDownEvent(event: KeyboardEvent) {
12
12
  if (hexKeys.includes(event.key)) {
@@ -116,19 +116,19 @@ export function ElementLookupDialog(props: ElementLookupDialogProps) {
116
116
  paper: { sx: { overflow: "hidden" } },
117
117
  }}
118
118
  >
119
- <Box display="flex" flexDirection="column" maxHeight="100%" overflow="hidden" flexGrow={1}>
119
+ <Box sx={{ display: "flex", flexDirection: "column", maxHeight: "100%", overflow: "hidden", flexGrow: 1 }}>
120
120
  <Tabs value={tab} onChange={(_, newTab) => setTab(newTab)} variant="fullWidth" sx={{ flexShrink: 0 }}>
121
121
  {props.mode !== "search" && <Tab icon={<Edit />} label={getLocalizedString("Manual")} value="manual" />}
122
122
  <Tab icon={<TapAndPlay />} label={getLocalizedString("Scanner")} value="scanner" />
123
123
  <Tab icon={<QrCodeScanner />} label={getLocalizedString("Camera")} value="camera" />
124
124
  </Tabs>
125
125
  {tab === "camera" && (
126
- <Box flexBasis="12rem" flexGrow={1} flexShrink={2}>
126
+ <Box sx={{ flexBasis: "12rem", flexGrow: 1, flexShrink: 2 }}>
127
127
  <BarcodeScanner onRead={(element) => handleElementAdd(element, "camera-barcode")} />
128
128
  </Box>
129
129
  )}
130
130
  {tab === "manual" && (
131
- <Box p={2}>
131
+ <Box sx={{ p: 2 }}>
132
132
  <AddElementManualForm
133
133
  onAdd={(element) => handleElementAdd(element, "manual")}
134
134
  allowEmptyElement={props.allowEmptyElement}
@@ -136,7 +136,7 @@ export function ElementLookupDialog(props: ElementLookupDialogProps) {
136
136
  </Box>
137
137
  )}
138
138
  {tab === "scanner" && (
139
- <Box flexBasis="12rem" flexGrow={1} flexShrink={2}>
139
+ <Box sx={{ flexBasis: "12rem", flexGrow: 1, flexShrink: 2 }}>
140
140
  <AddElementHIDScanner
141
141
  onScan={(element) =>
142
142
  handleElementAdd(element, element.startsWith(Giai.BARCODE_PREFIX) ? "hid-barcode" : "hid-rfid")
@@ -145,7 +145,7 @@ export function ElementLookupDialog(props: ElementLookupDialogProps) {
145
145
  </Box>
146
146
  )}
147
147
 
148
- <Box flex="3 1 14rem" overflow="auto">
148
+ <Box sx={{ flex: "3 1 14rem", overflow: "auto" }}>
149
149
  {props.mode === "multi" && (
150
150
  <Alert
151
151
  icon={false}
@@ -96,9 +96,11 @@ export function ProjectSelect({
96
96
  id={id ?? "ProjectLookup"}
97
97
  fullWidth
98
98
  slotProps={{
99
+ input: params.slotProps?.input,
100
+ inputLabel: params.slotProps?.inputLabel,
99
101
  htmlInput: {
100
102
  readOnly,
101
- ...params.inputProps,
103
+ ...params.slotProps?.htmlInput,
102
104
  },
103
105
  }}
104
106
  autoComplete="off"
package/src/global.d.ts CHANGED
@@ -1,2 +1,5 @@
1
1
  /// <reference path="@olenbetong/appframe-core" />
2
2
  /// <reference path="@olenbetong/appframe-data" />
3
+
4
+ declare module "*.css" {}
5
+ declare module "*.scss" {}