@olenbetong/synergi-react 2.5.1 → 2.5.3
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/es/components/AppMenu/index.d.ts +1 -1
- package/es/components/AppMenu/index.js +1 -1
- package/es/components/AppShell/index.d.ts +1 -1
- package/es/components/Checkbox/index.js +1 -1
- package/es/components/ColorCard/index.d.ts +6 -6
- package/es/components/DateNavigator/index.d.ts +1 -1
- package/es/components/FilePond.d.ts +1 -1
- package/es/components/ImageEditor/DragHandle.d.ts +1 -1
- package/es/components/ImageEditor/EdgeHandle.d.ts +1 -1
- package/es/components/ImageEditor/ImageEditor.js +1 -1
- package/es/components/ImageEditor/ResponsiveButton.d.ts +1 -1
- package/es/components/ImageEditor/defaultPlugins.d.ts +1 -1
- package/es/components/ImageEditor/plugins/cropPlugin/CropContext.d.ts +1 -1
- package/es/components/ImageEditor/plugins/cropPlugin/CropOverlay.d.ts +1 -1
- package/es/components/ImageEditor/plugins/cropPlugin/CropOverlay.js +1 -1
- package/es/components/ImageEditor/plugins/cropPlugin/CropToolbar.d.ts +1 -1
- package/es/components/ImageEditor/plugins/cropPlugin/CropToolbar.js +1 -1
- package/es/components/ImageEditor/plugins/cropPlugin/useCropTool.js +2 -2
- package/es/components/ImageEditor/plugins/redactPlugin/RedactContext.d.ts +1 -1
- package/es/components/ImageEditor/plugins/redactPlugin/RedactOverlay.d.ts +1 -1
- package/es/components/ImageEditor/plugins/redactPlugin/RedactOverlay.js +1 -1
- package/es/components/ImageEditor/plugins/redactPlugin/RedactToolbar.d.ts +1 -1
- package/es/components/ImageEditor/plugins/redactPlugin/RedactToolbar.js +1 -1
- package/es/components/ImageEditor/plugins/zoomPlugin/ZoomCanvas.d.ts +1 -1
- package/es/components/ImageEditor/plugins/zoomPlugin/ZoomContext.d.ts +1 -1
- package/es/components/ImageEditor/plugins/zoomPlugin/ZoomControls.d.ts +1 -1
- package/es/components/ImageEditor/plugins/zoomPlugin/ZoomControls.js +1 -1
- package/es/components/LinkedCardList/index.d.ts +3 -3
- package/es/components/MergeProgressDialog/index.d.ts +1 -1
- package/es/components/MergeProgressDialog/index.js +2 -2
- package/es/components/PageBanner/index.d.ts +4 -4
- package/es/components/PdfViewer/PdfViewer.d.ts +1 -1
- package/es/components/Portal/index.d.ts +1 -1
- package/es/components/Portal/index.js +1 -1
- package/es/components/Sidebar/index.d.ts +1 -1
- package/es/components/Sidebar/index.js +2 -2
- package/es/components/Spinner/index.d.ts +1 -1
- package/es/components/SplitContainer/index.d.ts +1 -1
- package/es/components/Toolbar/index.d.ts +1 -1
- package/es/elements/ElementDamage/DamageFormButtons.d.ts +1 -1
- package/es/elements/ElementDamage/DamageFormButtons.js +1 -1
- package/es/elements/ElementDamage/DescriptionInput.d.ts +1 -1
- package/es/elements/ElementDamage/DescriptionInput.js +1 -1
- package/es/elements/ElementDamage/DuplicateDamage/DesktopView.d.ts +2 -2
- package/es/elements/ElementDamage/DuplicateDamage/DesktopView.js +1 -1
- package/es/elements/ElementDamage/DuplicateDamage/DublicateElementDamageDialog.d.ts +1 -1
- package/es/elements/ElementDamage/DuplicateDamage/DublicateElementDamageDialog.js +1 -1
- package/es/elements/ElementDamage/DuplicateDamage/PhoneView.d.ts +1 -1
- package/es/elements/ElementDamage/ElementNumberTextField.d.ts +1 -1
- package/es/elements/ElementDamage/HiddenDamageFields.d.ts +1 -1
- package/es/elements/ElementDamage/HiddenDamageFields.js +1 -1
- package/es/elements/ElementDamage/RegisterFix.d.ts +1 -1
- package/es/elements/ElementDamage/RegisterFix.js +1 -1
- package/es/elements/ElementDamage/SubmitButtons.d.ts +1 -1
- package/es/elements/ElementDamage/TransportElementSelect.d.ts +1 -1
- package/es/elements/ElementDamage/TransportElementSelect.js +1 -1
- package/es/elements/ElementLookup.d.ts +1 -1
- package/es/elements/ElementLookup.js +1 -1
- package/es/elements/ElementLookupDialog/BarcodeScanner/DeadIcon.d.ts +1 -1
- package/es/elements/ElementLookupDialog/BarcodeScanner/Error.d.ts +1 -1
- package/es/elements/ElementLookupDialog/BarcodeScanner/index.d.ts +1 -1
- package/es/elements/ElementLookupDialog/HIDScanner/index.d.ts +1 -1
- package/es/elements/ElementLookupDialog/HIDScanner/index.js +1 -1
- package/es/elements/ElementLookupDialog/Manual/ManualForm.d.ts +1 -1
- package/es/elements/ElementLookupDialog/index.d.ts +1 -1
- package/es/elements/ProjectSelect.d.ts +1 -1
- package/es/elements/ProjectSelect.js +1 -1
- package/es/useTranslation/index.js +1 -1
- package/package.json +8 -8
- package/src/components/AppMenu/index.tsx +1 -1
- package/src/components/Checkbox/index.tsx +1 -1
- package/src/components/DateNavigator/index.tsx +3 -3
- package/src/components/ImageEditor/plugins/cropPlugin/useCropTool.ts +2 -2
- package/src/components/MergeProgressDialog/index.tsx +1 -1
- package/src/components/Portal/index.tsx +1 -1
- package/src/components/Sidebar/index.tsx +2 -2
- package/src/components/SplitContainer/index.tsx +1 -1
- package/src/components/Toolbar/index.tsx +1 -1
- package/src/components/ValueToggleGroup/index.tsx +1 -1
- package/src/useTranslation/index.ts +1 -1
|
@@ -9,4 +9,4 @@ export type AppMenuArticle = {
|
|
|
9
9
|
export type AppMenuProps = {
|
|
10
10
|
dataObject: DataObject<AppMenuArticle>;
|
|
11
11
|
};
|
|
12
|
-
export declare function AppMenu({ dataObject }: AppMenuProps): import("react
|
|
12
|
+
export declare function AppMenu({ dataObject }: AppMenuProps): import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import "./AppMenu.css";
|
|
3
3
|
import { useData, useLoading } from "@olenbetong/appframe-react";
|
|
4
4
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
@@ -2,4 +2,4 @@ import { type ReactNode } from "react";
|
|
|
2
2
|
export type AppShellProps = {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
};
|
|
5
|
-
export declare function AppShell({ children }: AppShellProps): import("react
|
|
5
|
+
export declare function AppShell({ children }: AppShellProps): import("react").JSX.Element;
|
|
@@ -10,7 +10,7 @@ export const Checkbox = forwardRef(function Checkbox({ className, disabled = fal
|
|
|
10
10
|
inputId = id ?? inputId;
|
|
11
11
|
let inputIdRef = `#${inputId}`;
|
|
12
12
|
let input = useRef(null);
|
|
13
|
-
//
|
|
13
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps -- Ref object
|
|
14
14
|
useEffect(() => {
|
|
15
15
|
if (typeof ref === "function") {
|
|
16
16
|
ref(input.current);
|
|
@@ -3,14 +3,14 @@ export type ColorCardProps = Pick<React.HTMLAttributes<HTMLDivElement>, "id" | "
|
|
|
3
3
|
as?: "a" | "div" | "button" | "span" | "section" | "article";
|
|
4
4
|
href?: string;
|
|
5
5
|
};
|
|
6
|
-
export declare function ColorCard({ as: Component, children, className, href, ...other }: ColorCardProps): import("react
|
|
7
|
-
export declare function CardStepList({ children, className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react
|
|
8
|
-
export declare function CardStep({ children, className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react
|
|
6
|
+
export declare function ColorCard({ as: Component, children, className, href, ...other }: ColorCardProps): import("react").JSX.Element;
|
|
7
|
+
export declare function CardStepList({ children, className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
8
|
+
export declare function CardStep({ children, className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
9
9
|
export declare function CardColumn({ children, className, minor, ...other }: React.HTMLAttributes<HTMLDivElement> & {
|
|
10
10
|
minor?: boolean;
|
|
11
|
-
}): import("react
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
12
|
export declare function CardDetail({ children, className, label, primary, ...other }: React.HTMLAttributes<HTMLDivElement> & {
|
|
13
13
|
label?: React.ReactNode;
|
|
14
14
|
primary?: boolean;
|
|
15
|
-
}): import("react
|
|
16
|
-
export declare function CardLabel({ children, className, ...other }: React.HTMLAttributes<HTMLDivElement>): import("react
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
export declare function CardLabel({ children, className, ...other }: React.HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
@@ -7,4 +7,4 @@ export type DateNavigatorProps = {
|
|
|
7
7
|
minDate?: Date | string | number;
|
|
8
8
|
maxDate?: Date | string | number;
|
|
9
9
|
};
|
|
10
|
-
export declare function DateNavigator({ date: dateProp, defaultDate, disableTodayButton, onChange, minDate: minDateProp, maxDate: maxDateProp, }: DateNavigatorProps): import("react
|
|
10
|
+
export declare function DateNavigator({ date: dateProp, defaultDate, disableTodayButton, onChange, minDate: minDateProp, maxDate: maxDateProp, }: DateNavigatorProps): import("react").JSX.Element;
|
|
@@ -41,4 +41,4 @@ type FileStoreDataObjectRecord = {
|
|
|
41
41
|
Damage: boolean;
|
|
42
42
|
DamageID: number | null;
|
|
43
43
|
};
|
|
44
|
-
export declare function FilePond<T extends FileStoreDataObjectRecord>({ dataObject, fields, onUploadStart, onFileUploaded, onFinishedUploads, onFileRemoved, onError, fieldName, filePondOptions, primKey, attachmentPrimKeys, whereClause, inputRef: inputRefProp, ...props }: FilePondProps<T>): import("react
|
|
44
|
+
export declare function FilePond<T extends FileStoreDataObjectRecord>({ dataObject, fields, onUploadStart, onFileUploaded, onFinishedUploads, onFileRemoved, onError, fieldName, filePondOptions, primKey, attachmentPrimKeys, whereClause, inputRef: inputRefProp, ...props }: FilePondProps<T>): import("react").JSX.Element;
|
|
@@ -10,5 +10,5 @@ interface Props {
|
|
|
10
10
|
* Absolutely-positioned draggable corner handle.
|
|
11
11
|
* Position is in CSS pixels relative to the nearest `position: relative` ancestor.
|
|
12
12
|
*/
|
|
13
|
-
export declare function DragHandle({ x, y, onChange, containerWidth, containerHeight }: Props): import("react
|
|
13
|
+
export declare function DragHandle({ x, y, onChange, containerWidth, containerHeight }: Props): import("react").JSX.Element;
|
|
14
14
|
export {};
|
|
@@ -12,5 +12,5 @@ interface Props {
|
|
|
12
12
|
* Tracks the pointer delta so both corners on this edge move by the same amount,
|
|
13
13
|
* preserving the edge angle.
|
|
14
14
|
*/
|
|
15
|
-
export declare function EdgeHandle({ x, y, axis, onChange }: Props): import("react
|
|
15
|
+
export declare function EdgeHandle({ x, y, axis, onChange }: Props): import("react").JSX.Element;
|
|
16
16
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import ArrowBackIcon from "@mui/icons-material/ArrowBack";
|
|
3
3
|
import CheckIcon from "@mui/icons-material/Check";
|
|
4
4
|
import RedoIcon from "@mui/icons-material/Redo";
|
|
@@ -7,5 +7,5 @@ interface Props {
|
|
|
7
7
|
isSmall: boolean;
|
|
8
8
|
}
|
|
9
9
|
/** Renders a labelled Button on large screens and a Tooltip-wrapped IconButton on small ones. */
|
|
10
|
-
export declare function ResponsiveButton({ icon, label, onClick, disabled, isSmall }: Props): import("react
|
|
10
|
+
export declare function ResponsiveButton({ icon, label, onClick, disabled, isSmall }: Props): import("react").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/** Default set of image editing plugins in display order. */
|
|
2
|
-
export declare const defaultPlugins: (import("./types.js").
|
|
2
|
+
export declare const defaultPlugins: (import("./types.js").ActionPlugin | import("./types.js").ToolPlugin)[];
|
|
3
3
|
/** Default view plugin providing zoom and pan. */
|
|
4
4
|
export declare const defaultViewPlugin: import("./types.js").ViewPlugin;
|
|
@@ -5,6 +5,6 @@ interface CropContextValue extends CropToolState {
|
|
|
5
5
|
onApply: (blob: Blob, actions: EditAction[]) => void;
|
|
6
6
|
onCancel: () => void;
|
|
7
7
|
}
|
|
8
|
-
export declare function CropProvider({ imageUrl, onApply, onCancel, children }: ToolProviderProps): import("react
|
|
8
|
+
export declare function CropProvider({ imageUrl, onApply, onCancel, children }: ToolProviderProps): import("react").JSX.Element;
|
|
9
9
|
export declare function useCropContext(): CropContextValue;
|
|
10
10
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Canvas-area overlay for the crop tool. Reads all state from CropContext. */
|
|
2
|
-
export declare function CropOverlay(): import("react
|
|
2
|
+
export declare function CropOverlay(): import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Alert, CircularProgress, Typography } from "@mui/material";
|
|
3
3
|
import { getLocalizedString } from "@olenbetong/appframe-core";
|
|
4
4
|
import { CropCanvas } from "../../CropCanvas.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Toolbar shown while the crop tool is active. Reads state from CropContext. */
|
|
2
|
-
export declare function CropToolbar(): import("react
|
|
2
|
+
export declare function CropToolbar(): import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import CheckIcon from "@mui/icons-material/Check";
|
|
3
3
|
import CloseIcon from "@mui/icons-material/Close";
|
|
4
4
|
import { Button, CircularProgress } from "@mui/material";
|
|
@@ -86,7 +86,7 @@ export function useCropTool(imageUrl, enabled) {
|
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
/** Loads the image at native resolution, maps relative corners, and warps. */
|
|
89
|
-
//
|
|
89
|
+
// oxlint-disable-next-line typescript/no-explicit-any -- OpenCV.js types
|
|
90
90
|
function cropImageAtFullResolution(cv, imageUrl, relCorners) {
|
|
91
91
|
return new Promise((resolve, reject) => {
|
|
92
92
|
let img = new Image();
|
|
@@ -106,7 +106,7 @@ function cropImageAtFullResolution(cv, imageUrl, relCorners) {
|
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
108
|
/** Performs a perspective warp using OpenCV.js. */
|
|
109
|
-
//
|
|
109
|
+
// oxlint-disable-next-line typescript/no-explicit-any -- OpenCV.js types
|
|
110
110
|
function perspectiveCrop(cv, srcCanvas, corners) {
|
|
111
111
|
let [tl, tr, br, bl] = corners;
|
|
112
112
|
let outW = Math.round(Math.max(Math.hypot(tr.x - tl.x, tr.y - tl.y), Math.hypot(br.x - bl.x, br.y - bl.y)));
|
|
@@ -5,6 +5,6 @@ interface RedactContextValue extends RedactToolState {
|
|
|
5
5
|
onApply: (blob: Blob, actions: EditAction[]) => void;
|
|
6
6
|
onCancel: () => void;
|
|
7
7
|
}
|
|
8
|
-
export declare function RedactProvider({ imageUrl, onApply, onCancel, children }: ToolProviderProps): import("react
|
|
8
|
+
export declare function RedactProvider({ imageUrl, onApply, onCancel, children }: ToolProviderProps): import("react").JSX.Element;
|
|
9
9
|
export declare function useRedactContext(): RedactContextValue;
|
|
10
10
|
export {};
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* Uses an SVG layer over the image for drawing; blur preview uses SVG feGaussianBlur
|
|
4
4
|
* so the live preview matches the final applied output.
|
|
5
5
|
*/
|
|
6
|
-
export declare function RedactOverlay(): import("react
|
|
6
|
+
export declare function RedactOverlay(): import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useZoom } from "../zoomPlugin/ZoomContext.js";
|
|
3
3
|
import { useRedactContext } from "./RedactContext.js";
|
|
4
4
|
import { normRect } from "./useRedactTool.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Toolbar shown while the redact tool is active. Reads state from RedactContext. */
|
|
2
|
-
export declare function RedactToolbar(): import("react
|
|
2
|
+
export declare function RedactToolbar(): import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import CheckIcon from "@mui/icons-material/Check";
|
|
3
3
|
import CloseIcon from "@mui/icons-material/Close";
|
|
4
4
|
import DeleteSweepIcon from "@mui/icons-material/DeleteSweep";
|
|
@@ -16,5 +16,5 @@ interface Props {
|
|
|
16
16
|
* • 2-finger pinch + translate: simultaneous zoom + pan anchored at midpoint
|
|
17
17
|
* • 1-finger drag (when panEnabled): pan
|
|
18
18
|
*/
|
|
19
|
-
export declare function ZoomCanvas({ children, panEnabled }: Props): import("react
|
|
19
|
+
export declare function ZoomCanvas({ children, panEnabled }: Props): import("react").JSX.Element;
|
|
20
20
|
export {};
|
|
@@ -2,5 +2,5 @@ interface Props {
|
|
|
2
2
|
disabled?: boolean;
|
|
3
3
|
isSmall?: boolean;
|
|
4
4
|
}
|
|
5
|
-
export declare function ZoomControls({ disabled, isSmall }: Props): import("react
|
|
5
|
+
export declare function ZoomControls({ disabled, isSmall }: Props): import("react").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import ZoomInIcon from "@mui/icons-material/ZoomIn";
|
|
3
3
|
import ZoomInMapIcon from "@mui/icons-material/ZoomInMap";
|
|
4
4
|
import ZoomOutIcon from "@mui/icons-material/ZoomOut";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./index.css";
|
|
2
|
-
export declare function LinkedList({ children, className, ...other }: React.HTMLProps<HTMLUListElement>): import("react
|
|
2
|
+
export declare function LinkedList({ children, className, ...other }: React.HTMLProps<HTMLUListElement>): import("react").JSX.Element;
|
|
3
3
|
export declare function LinkedListItem({ children, className, label, ...other }: React.HTMLProps<HTMLLIElement> & {
|
|
4
4
|
label: React.ReactNode;
|
|
5
|
-
}): import("react
|
|
5
|
+
}): import("react").JSX.Element;
|
|
6
6
|
export declare function Card({ as, children, className, ...other }: React.HTMLProps<HTMLDivElement> & {
|
|
7
7
|
as?: any;
|
|
8
|
-
}): import("react
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -5,4 +5,4 @@ export type MergeProgressDialogProps = {
|
|
|
5
5
|
getMergerId: () => Promise<string | number>;
|
|
6
6
|
mergeType?: "pdf" | "zip";
|
|
7
7
|
};
|
|
8
|
-
export declare function MergeProgressDialog({ open, onClose, getMergerId, mergeType }: MergeProgressDialogProps): import("react
|
|
8
|
+
export declare function MergeProgressDialog({ open, onClose, getMergerId, mergeType }: MergeProgressDialogProps): import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Button, DialogActions, LinearProgress, Link, Typography } from "@mui/material";
|
|
3
3
|
import { getLocalizedString } from "@olenbetong/appframe-core";
|
|
4
4
|
import { ResponsiveDialog } from "@olenbetong/appframe-mui";
|
|
@@ -23,7 +23,7 @@ export function MergeProgressDialog({ open, onClose, getMergerId, mergeType = "p
|
|
|
23
23
|
return () => clearInterval(timer);
|
|
24
24
|
}, [phase.kind]);
|
|
25
25
|
// Start the merge job each time the dialog opens
|
|
26
|
-
//
|
|
26
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps -- intentionally only re-runs on open change
|
|
27
27
|
useEffect(() => {
|
|
28
28
|
if (!open)
|
|
29
29
|
return;
|
|
@@ -3,20 +3,20 @@ import React from "react";
|
|
|
3
3
|
export type PageBannerProps = React.HTMLProps<HTMLDivElement> & {
|
|
4
4
|
as?: "header" | "section" | "div";
|
|
5
5
|
};
|
|
6
|
-
export declare function PageBanner({ as, className, children, ...other }: PageBannerProps):
|
|
6
|
+
export declare function PageBanner({ as, className, children, ...other }: PageBannerProps): React.JSX.Element;
|
|
7
7
|
export type BannerImageProps = React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>;
|
|
8
8
|
export declare const BannerImage: React.ForwardRefExoticComponent<Omit<BannerImageProps, "ref"> & React.RefAttributes<HTMLImageElement>>;
|
|
9
9
|
export type TabListProps = Pick<React.HTMLProps<HTMLDivElement>, "id" | "className" | "children"> & {
|
|
10
10
|
as?: "ul" | "ol" | "nav" | "div" | "span";
|
|
11
11
|
sticky?: boolean;
|
|
12
12
|
};
|
|
13
|
-
export declare function TabList({ as, className, children, sticky, ...other }: TabListProps):
|
|
13
|
+
export declare function TabList({ as, className, children, sticky, ...other }: TabListProps): React.JSX.Element;
|
|
14
14
|
export type TabProps = Pick<React.HTMLProps<HTMLDivElement>, "id" | "className" | "children"> & {
|
|
15
15
|
active?: boolean;
|
|
16
16
|
as?: "a" | "li" | "div" | "span";
|
|
17
17
|
};
|
|
18
|
-
export declare function Tab({ active, as, className, children, ...other }: TabProps):
|
|
18
|
+
export declare function Tab({ active, as, className, children, ...other }: TabProps): React.JSX.Element;
|
|
19
19
|
export type TitleProps = Pick<React.HTMLProps<HTMLDivElement>, "id" | "className" | "children"> & {
|
|
20
20
|
as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div" | "span" | "p";
|
|
21
21
|
};
|
|
22
|
-
export declare function Title({ as, className, children, ...other }: TitleProps):
|
|
22
|
+
export declare function Title({ as, className, children, ...other }: TitleProps): React.JSX.Element;
|
|
@@ -3,5 +3,5 @@ type PdfViewerProps = {
|
|
|
3
3
|
url?: string;
|
|
4
4
|
file?: string | Blob | ArrayBuffer;
|
|
5
5
|
};
|
|
6
|
-
export declare function PdfViewer({ url, file }: PdfViewerProps): import("react
|
|
6
|
+
export declare function PdfViewer({ url, file }: PdfViewerProps): import("react").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -3,4 +3,4 @@ export type PortalProps = {
|
|
|
3
3
|
root?: string;
|
|
4
4
|
type?: string;
|
|
5
5
|
};
|
|
6
|
-
export declare function Portal({ children, root, type }: PortalProps): import("react
|
|
6
|
+
export declare function Portal({ children, root, type }: PortalProps): import("react").JSX.Element;
|
|
@@ -9,7 +9,7 @@ export function Portal({ children, root, type = "div" }) {
|
|
|
9
9
|
const forceUpdate = useForceUpdate();
|
|
10
10
|
const mountNode = useRef(null);
|
|
11
11
|
const portalNode = useRef(null);
|
|
12
|
-
//
|
|
12
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps -- because reasons
|
|
13
13
|
useEffect(() => {
|
|
14
14
|
const ownerDocument = mountNode.current?.ownerDocument;
|
|
15
15
|
if (ownerDocument && !portalNode.current) {
|
|
@@ -6,4 +6,4 @@ export type SidebarProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
6
6
|
pullRight?: boolean;
|
|
7
7
|
shadow?: boolean;
|
|
8
8
|
};
|
|
9
|
-
export declare function Sidebar(props: SidebarProps): import("react
|
|
9
|
+
export declare function Sidebar(props: SidebarProps): import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import "./index.css";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { useEffect, useRef, useState } from "react";
|
|
@@ -23,7 +23,7 @@ export function Sidebar(props) {
|
|
|
23
23
|
element?.addEventListener("transitionend", toggleHiddenContent);
|
|
24
24
|
return () => element?.removeEventListener("transitionend", toggleHiddenContent);
|
|
25
25
|
}, [open]);
|
|
26
|
-
//
|
|
26
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps -- TODO
|
|
27
27
|
useEffect(() => {
|
|
28
28
|
function handleCloseSidebar(evt) {
|
|
29
29
|
if (evt.key === "Escape") {
|
|
@@ -19,4 +19,4 @@ export type SplitContainerProps = {
|
|
|
19
19
|
*/
|
|
20
20
|
id?: string;
|
|
21
21
|
};
|
|
22
|
-
export declare function SplitContainer({ className, children, direction, fixedPanel, panelClassName, defaultFixedSize, layoutVersion, min, max, id, }: SplitContainerProps):
|
|
22
|
+
export declare function SplitContainer({ className, children, direction, fixedPanel, panelClassName, defaultFixedSize, layoutVersion, min, max, id, }: SplitContainerProps): React.JSX.Element;
|
|
@@ -12,4 +12,4 @@ export type BreadcrumbItem = {
|
|
|
12
12
|
export type ToolbarBreadcrumbsProps = {
|
|
13
13
|
items: BreadcrumbItem[];
|
|
14
14
|
};
|
|
15
|
-
export declare function ToolbarBreadcrumbs({ items }: ToolbarBreadcrumbsProps): import("react
|
|
15
|
+
export declare function ToolbarBreadcrumbs({ items }: ToolbarBreadcrumbsProps): import("react").JSX.Element;
|
|
@@ -5,5 +5,5 @@ type DamageFormButtonsProps = {
|
|
|
5
5
|
handleDelete: () => void;
|
|
6
6
|
handleCancel: () => void;
|
|
7
7
|
};
|
|
8
|
-
export declare function DamageFormButtonsProps({ isEdit, loading, uploadingFile, handleDelete, handleCancel, }: DamageFormButtonsProps): import("react
|
|
8
|
+
export declare function DamageFormButtonsProps({ isEdit, loading, uploadingFile, handleDelete, handleCancel, }: DamageFormButtonsProps): import("react").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Add from "@mui/icons-material/Add";
|
|
3
3
|
import { Button } from "@mui/material";
|
|
4
4
|
import { getLocalizedString } from "@olenbetong/appframe-core";
|
|
@@ -12,5 +12,5 @@ type DescriptionInputProps = {
|
|
|
12
12
|
onCopyPrevDamage?: (value: DescriptionInputType) => void;
|
|
13
13
|
onChange?: (value: DescriptionInputType) => void;
|
|
14
14
|
};
|
|
15
|
-
export declare function DescriptionInput({ value, defaultValue, descriptionOptions, storageNamespace, onCopyPrevDamage, onChange, }: DescriptionInputProps): import("react
|
|
15
|
+
export declare function DescriptionInput({ value, defaultValue, descriptionOptions, storageNamespace, onCopyPrevDamage, onChange, }: DescriptionInputProps): import("react").JSX.Element;
|
|
16
16
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Autocomplete, Button, TextField } from "@mui/material";
|
|
3
3
|
import { getLocalizedString } from "@olenbetong/appframe-core";
|
|
4
4
|
import { useEffect, useRef, useState } from "react";
|
|
@@ -3,6 +3,6 @@ type ElementDamagesItemProps = {
|
|
|
3
3
|
record: DamagesRecord;
|
|
4
4
|
linkToDamage: boolean;
|
|
5
5
|
};
|
|
6
|
-
export declare function ElementDamagesItem({ record, linkToDamage }: ElementDamagesItemProps): import("react
|
|
7
|
-
export declare function ElementDamagesHeader(): import("react
|
|
6
|
+
export declare function ElementDamagesItem({ record, linkToDamage }: ElementDamagesItemProps): import("react").JSX.Element;
|
|
7
|
+
export declare function ElementDamagesHeader(): import("react").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Grid, Typography } from "@mui/material";
|
|
3
3
|
import { getLocalizedString } from "@olenbetong/appframe-core";
|
|
4
4
|
import { Link } from "@olenbetong/appframe-mui";
|
|
@@ -7,5 +7,5 @@ type DuplicateElementDamageDialogProps = {
|
|
|
7
7
|
loading: boolean;
|
|
8
8
|
linkToDamage: boolean;
|
|
9
9
|
};
|
|
10
|
-
export declare function DuplicateElementDamageDialog({ open, onClose, record, onRegisterAnyway, loading, linkToDamage, }: DuplicateElementDamageDialogProps): import("react
|
|
10
|
+
export declare function DuplicateElementDamageDialog({ open, onClose, record, onRegisterAnyway, loading, linkToDamage, }: DuplicateElementDamageDialogProps): import("react").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Add from "@mui/icons-material/Add";
|
|
3
3
|
import { Button, Dialog, DialogActions, DialogContent, DialogTitle, Grid, useMediaQuery } from "@mui/material";
|
|
4
4
|
import { getLocalizedString } from "@olenbetong/appframe-core";
|
|
@@ -3,5 +3,5 @@ type DuplicatePhoneViewItemProps = {
|
|
|
3
3
|
record: DamagesRecord;
|
|
4
4
|
linkToDamage: boolean;
|
|
5
5
|
};
|
|
6
|
-
export declare function DuplicatePhoneViewItem({ record, linkToDamage }: DuplicatePhoneViewItemProps): import("react
|
|
6
|
+
export declare function DuplicatePhoneViewItem({ record, linkToDamage }: DuplicatePhoneViewItemProps): import("react").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -6,5 +6,5 @@ type ElementNumberTextFieldProps = {
|
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
sx?: SxProps<Theme>;
|
|
8
8
|
};
|
|
9
|
-
export declare function ElementNumberTextField({ value, defaultValue, onChange, disabled, sx }: ElementNumberTextFieldProps): import("react
|
|
9
|
+
export declare function ElementNumberTextField({ value, defaultValue, onChange, disabled, sx }: ElementNumberTextFieldProps): import("react").JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -2,5 +2,5 @@ type HiddenDamageFieldsProps = {
|
|
|
2
2
|
primKey: string;
|
|
3
3
|
ID: number;
|
|
4
4
|
};
|
|
5
|
-
export declare function HiddenDamageFields({ primKey, ID }: HiddenDamageFieldsProps): import("react
|
|
5
|
+
export declare function HiddenDamageFields({ primKey, ID }: HiddenDamageFieldsProps): import("react").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
export function HiddenDamageFields({ primKey, ID }) {
|
|
3
3
|
return (_jsxs(_Fragment, { children: [_jsx("input", { type: "hidden", name: "PrimKey", value: primKey }), _jsx("input", { type: "hidden", name: "ID", value: ID })] }));
|
|
4
4
|
}
|
|
@@ -10,5 +10,5 @@ type RegisterFixProps = {
|
|
|
10
10
|
onFix?: (ID: number) => void;
|
|
11
11
|
edit?: boolean;
|
|
12
12
|
};
|
|
13
|
-
export declare function RegisterFix({ value, defaultValue, onFix, edit }: RegisterFixProps): import("react
|
|
13
|
+
export declare function RegisterFix({ value, defaultValue, onFix, edit }: RegisterFixProps): import("react").JSX.Element;
|
|
14
14
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import CheckIcon from "@mui/icons-material/Check";
|
|
3
3
|
import { Button, Checkbox, FormControlLabel, Typography } from "@mui/material";
|
|
4
4
|
import { getLocalizedString, localize } from "@olenbetong/appframe-core";
|
|
@@ -16,5 +16,5 @@ type SubmitButtonsProps = {
|
|
|
16
16
|
onCancel?: () => void;
|
|
17
17
|
onSubmit?: () => void;
|
|
18
18
|
};
|
|
19
|
-
export declare function SubmitButtons({ edit, loading, onDelete, onCancel, onSubmit, sx }: SubmitButtonsProps): import("react
|
|
19
|
+
export declare function SubmitButtons({ edit, loading, onDelete, onCancel, onSubmit, sx }: SubmitButtonsProps): import("react").JSX.Element;
|
|
20
20
|
export {};
|
|
@@ -3,5 +3,5 @@ type TransportElementSelectProps = {
|
|
|
3
3
|
elements: TransportElementsRecord[];
|
|
4
4
|
onSelect: (element: TransportElementsRecord) => void;
|
|
5
5
|
};
|
|
6
|
-
export declare function TransportElementSelect({ elements, onSelect }: TransportElementSelectProps): import("react
|
|
6
|
+
export declare function TransportElementSelect({ elements, onSelect }: TransportElementSelectProps): import("react").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import DropDownArrowIcon from "@mui/icons-material/KeyboardArrowDown";
|
|
3
3
|
import { Button, ListItemText, Menu, MenuItem } from "@mui/material";
|
|
4
4
|
import { getLocalizedString } from "@olenbetong/appframe-core";
|
|
@@ -19,4 +19,4 @@ export type ElementLookupProps = {
|
|
|
19
19
|
onChange?: (value: Element | null) => void;
|
|
20
20
|
onDialogChange?: (open: boolean) => void;
|
|
21
21
|
};
|
|
22
|
-
export declare function ElementLookup({ value, defaultValue, ref, elementIDRequired, openLookupDialogIcon, onChange, onDialogChange, }: ElementLookupProps): import("react
|
|
22
|
+
export declare function ElementLookup({ value, defaultValue, ref, elementIDRequired, openLookupDialogIcon, onChange, onDialogChange, }: ElementLookupProps): import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import SearchIcon from "@mui/icons-material/Search";
|
|
3
3
|
import { IconButton, TextField } from "@mui/material";
|
|
4
4
|
import { getLocalizedString } from "@olenbetong/appframe-core";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type SvgIconProps } from "@mui/material";
|
|
2
|
-
export declare function Dead(props: SvgIconProps): import("react
|
|
2
|
+
export declare function Dead(props: SvgIconProps): import("react").JSX.Element;
|
|
@@ -7,4 +7,4 @@ declare global {
|
|
|
7
7
|
export type BarcodeScannerProps = {
|
|
8
8
|
onRead: (barcode: string) => void;
|
|
9
9
|
};
|
|
10
|
-
export declare function BarcodeScanner({ onRead }: BarcodeScannerProps): import("react
|
|
10
|
+
export declare function BarcodeScanner({ onRead }: BarcodeScannerProps): import("react").JSX.Element;
|
|
@@ -10,4 +10,4 @@ export type AddElementManualFormProps = {
|
|
|
10
10
|
defaultProject?: ProjectRecordBase;
|
|
11
11
|
allowEmptyElement?: boolean;
|
|
12
12
|
};
|
|
13
|
-
export declare function AddElementManualForm({ onAdd, mode, defaultProject, allowEmptyElement, }: AddElementManualFormProps): import("react
|
|
13
|
+
export declare function AddElementManualForm({ onAdd, mode, defaultProject, allowEmptyElement, }: AddElementManualFormProps): import("react").JSX.Element;
|
|
@@ -21,5 +21,5 @@ export type ElementLookupDialogMultiModeProps = ElementLookupDialogSharedProps &
|
|
|
21
21
|
onAdd: (element: AddElement[]) => Promise<void>;
|
|
22
22
|
};
|
|
23
23
|
export type ElementLookupDialogProps = ElementLookupDialogSingleModeProps | ElementLookupDialogMultiModeProps;
|
|
24
|
-
export declare function ElementLookupDialog(props: ElementLookupDialogProps): import("react
|
|
24
|
+
export declare function ElementLookupDialog(props: ElementLookupDialogProps): import("react").JSX.Element;
|
|
25
25
|
export {};
|
|
@@ -19,5 +19,5 @@ type ProjectSelectProps = {
|
|
|
19
19
|
sx?: SxProps<Theme> | undefined;
|
|
20
20
|
report?: boolean;
|
|
21
21
|
};
|
|
22
|
-
export declare function ProjectSelect({ className, disabled, id, names, onChange, readOnly, required, defaultValue, value, label, sx, report, }: ProjectSelectProps): import("react
|
|
22
|
+
export declare function ProjectSelect({ className, disabled, id, names, onChange, readOnly, required, defaultValue, value, label, sx, report, }: ProjectSelectProps): import("react").JSX.Element;
|
|
23
23
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Autocomplete, ListItem, ListItemText, TextField } from "@mui/material";
|
|
3
3
|
import { getLocalizedString } from "@olenbetong/appframe-core";
|
|
4
4
|
import { useDataWithFilter, useDebounce } from "@olenbetong/appframe-react";
|
|
@@ -27,7 +27,7 @@ export function useTranslation(text, targetLanguage, apiKey) {
|
|
|
27
27
|
let [from, setSourceLang] = useState(null);
|
|
28
28
|
let [isTranslating, setIsTranslating] = useState(false);
|
|
29
29
|
let textRef = useRef(text);
|
|
30
|
-
//
|
|
30
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps -- this is a way of resetting the state so we don't show outdated translations when the text changes
|
|
31
31
|
useEffect(() => {
|
|
32
32
|
textRef.current = text;
|
|
33
33
|
return () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@olenbetong/synergi-react",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.3",
|
|
4
4
|
"description": "Standalone React component for SynergiWeb and Partner Portal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@mui/material": ">=9.0.0",
|
|
26
|
-
"react": ">=
|
|
27
|
-
"react-dom": ">=
|
|
26
|
+
"react": ">=19.2.7",
|
|
27
|
+
"react-dom": ">=19.2.7"
|
|
28
28
|
},
|
|
29
29
|
"sideEffects": false,
|
|
30
30
|
"dependencies": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"filepond-plugin-image-exif-orientation": "^1.0.11",
|
|
37
37
|
"filepond-plugin-image-preview": "^4.6.12",
|
|
38
38
|
"filepond-plugin-image-resize": "^2.0.10",
|
|
39
|
-
"filepond-plugin-image-transform": "^3.8.
|
|
39
|
+
"filepond-plugin-image-transform": "^3.8.8",
|
|
40
40
|
"localforage": "^1.10.0",
|
|
41
41
|
"mitt": "^3.0.1",
|
|
42
42
|
"pdf-lib": "^1.17.1",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"react-pdf": "^10.4.1",
|
|
45
45
|
"@olenbetong/appframe-core": "2.11.10",
|
|
46
46
|
"@olenbetong/appframe-data": "1.5.0",
|
|
47
|
-
"@olenbetong/appframe-react": "1.
|
|
48
|
-
"@olenbetong/appframe-mui": "6.
|
|
47
|
+
"@olenbetong/appframe-react": "1.23.0",
|
|
48
|
+
"@olenbetong/appframe-mui": "6.4.0"
|
|
49
49
|
},
|
|
50
50
|
"repository": {
|
|
51
51
|
"type": "git",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
]
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"react": "19.2.
|
|
63
|
-
"react-dom": "19.2.
|
|
62
|
+
"react": "19.2.7",
|
|
63
|
+
"react-dom": "19.2.7",
|
|
64
64
|
"replace-in-files": "^3.0.0"
|
|
65
65
|
},
|
|
66
66
|
"optionalDependencies": {},
|
|
@@ -124,7 +124,7 @@ export function AppMenu({ dataObject }: AppMenuProps) {
|
|
|
124
124
|
</svg>
|
|
125
125
|
</button>
|
|
126
126
|
|
|
127
|
-
{/*
|
|
127
|
+
{/* oxlint-disable-next-line jsx-a11y/click-events-have-key-events -- backdrop click handled via mouse coords */}
|
|
128
128
|
<dialog
|
|
129
129
|
ref={dialogRef}
|
|
130
130
|
className="app-menu-dialog"
|
|
@@ -39,7 +39,7 @@ export const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(function Che
|
|
|
39
39
|
let inputIdRef = `#${inputId}`;
|
|
40
40
|
let input = useRef<HTMLInputElement>(null);
|
|
41
41
|
|
|
42
|
-
//
|
|
42
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps -- Ref object
|
|
43
43
|
useEffect(() => {
|
|
44
44
|
if (typeof ref === "function") {
|
|
45
45
|
ref(input.current);
|
|
@@ -168,9 +168,9 @@ export function DateNavigator({
|
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
return (
|
|
171
|
-
//
|
|
172
|
-
//
|
|
173
|
-
//
|
|
171
|
+
// oxlint-disable-next-line jsx-a11y/no-noninteractive-tabindex -- I hate this component
|
|
172
|
+
// oxlint-disable-next-line jsx-a11y/no-static-element-interactions -- legacy component
|
|
173
|
+
// oxlint-disable-next-line jsx-a11y/role-supports-aria-props -- legacy component
|
|
174
174
|
<div className="ObDateNavigator-root" onKeyDown={handleKeyDown} tabIndex={0} aria-label="Date navigator">
|
|
175
175
|
<Arrow direction="left" onClick={() => updateDate(new Date(dateUtc - oneDay))} disabled={disablePrev} />
|
|
176
176
|
<div className="ObDateNavigator-date">{text}</div>
|
|
@@ -120,7 +120,7 @@ export function useCropTool(imageUrl: string, enabled: boolean): CropToolState {
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
/** Loads the image at native resolution, maps relative corners, and warps. */
|
|
123
|
-
//
|
|
123
|
+
// oxlint-disable-next-line typescript/no-explicit-any -- OpenCV.js types
|
|
124
124
|
function cropImageAtFullResolution(cv: any, imageUrl: string, relCorners: Quad): Promise<Blob> {
|
|
125
125
|
return new Promise((resolve, reject) => {
|
|
126
126
|
let img = new Image();
|
|
@@ -141,7 +141,7 @@ function cropImageAtFullResolution(cv: any, imageUrl: string, relCorners: Quad):
|
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
/** Performs a perspective warp using OpenCV.js. */
|
|
144
|
-
//
|
|
144
|
+
// oxlint-disable-next-line typescript/no-explicit-any -- OpenCV.js types
|
|
145
145
|
function perspectiveCrop(cv: any, srcCanvas: HTMLCanvasElement, corners: Quad): Promise<Blob> {
|
|
146
146
|
let [tl, tr, br, bl] = corners;
|
|
147
147
|
let outW = Math.round(Math.max(Math.hypot(tr.x - tl.x, tr.y - tl.y), Math.hypot(br.x - bl.x, br.y - bl.y)));
|
|
@@ -38,7 +38,7 @@ export function MergeProgressDialog({ open, onClose, getMergerId, mergeType = "p
|
|
|
38
38
|
}, [phase.kind]);
|
|
39
39
|
|
|
40
40
|
// Start the merge job each time the dialog opens
|
|
41
|
-
//
|
|
41
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps -- intentionally only re-runs on open change
|
|
42
42
|
useEffect(() => {
|
|
43
43
|
if (!open) return;
|
|
44
44
|
|
|
@@ -18,7 +18,7 @@ export function Portal({ children, root, type = "div" }: PortalProps) {
|
|
|
18
18
|
const mountNode = useRef<HTMLDivElement>(null);
|
|
19
19
|
const portalNode = useRef<HTMLElement | null>(null);
|
|
20
20
|
|
|
21
|
-
//
|
|
21
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps -- because reasons
|
|
22
22
|
useEffect(() => {
|
|
23
23
|
const ownerDocument = mountNode.current?.ownerDocument;
|
|
24
24
|
if (ownerDocument && !portalNode.current) {
|
|
@@ -49,7 +49,7 @@ export function Sidebar(props: SidebarProps) {
|
|
|
49
49
|
return () => element?.removeEventListener("transitionend", toggleHiddenContent);
|
|
50
50
|
}, [open]);
|
|
51
51
|
|
|
52
|
-
//
|
|
52
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps -- TODO
|
|
53
53
|
useEffect(() => {
|
|
54
54
|
function handleCloseSidebar(evt: KeyboardEvent) {
|
|
55
55
|
if (evt.key === "Escape") {
|
|
@@ -106,7 +106,7 @@ export function Sidebar(props: SidebarProps) {
|
|
|
106
106
|
>
|
|
107
107
|
{(open || !hidden) && children}
|
|
108
108
|
</div>
|
|
109
|
-
{/**
|
|
109
|
+
{/** oxlint-disable-next-line jsx-a11y/no-static-element-interactions -- legacy component */}
|
|
110
110
|
<div
|
|
111
111
|
role="presentation"
|
|
112
112
|
tabIndex={-1}
|
|
@@ -67,7 +67,7 @@ type DividerProps = {
|
|
|
67
67
|
|
|
68
68
|
const Divider = forwardRef<HTMLDivElement, DividerProps>(function Divider(props: DividerProps, ref) {
|
|
69
69
|
return (
|
|
70
|
-
//
|
|
70
|
+
// oxlint-disable-next-line jsx-a11y/prefer-tag-over-role -- NO!
|
|
71
71
|
<div
|
|
72
72
|
className={clsx("ObSplitContainer-divider", props.className)}
|
|
73
73
|
tabIndex={0}
|
|
@@ -94,7 +94,7 @@ function BreadcrumbsInner({ items }: ToolbarBreadcrumbsProps) {
|
|
|
94
94
|
{overflowOpen && (
|
|
95
95
|
<ul className="ob-breadcrumbs__overflow-menu" role="menu">
|
|
96
96
|
{hiddenItems.map((item, index) => (
|
|
97
|
-
//
|
|
97
|
+
// oxlint-disable-next-line react/no-array-index-key -- stable list with no reordering
|
|
98
98
|
<li key={index} role="menuitem">
|
|
99
99
|
{item.href ? <a href={item.href}>{item.label}</a> : <span>{item.label}</span>}
|
|
100
100
|
</li>
|
|
@@ -30,7 +30,7 @@ export const ValueToggleGroup = forwardRef<HTMLFieldSetElement, ValueToggleGroup
|
|
|
30
30
|
let isControlled = value !== undefined;
|
|
31
31
|
|
|
32
32
|
return (
|
|
33
|
-
//
|
|
33
|
+
// oxlint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role -- legacy component
|
|
34
34
|
<fieldset className={clsx("ObValueToggleGroup", orientation, className)} role="radiogroup" ref={ref} style={style}>
|
|
35
35
|
{options.map((opt) => {
|
|
36
36
|
return (
|
|
@@ -35,7 +35,7 @@ export function useTranslation(text: string, targetLanguage: string, apiKey: str
|
|
|
35
35
|
let [isTranslating, setIsTranslating] = useState(false);
|
|
36
36
|
let textRef = useRef(text);
|
|
37
37
|
|
|
38
|
-
//
|
|
38
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps -- this is a way of resetting the state so we don't show outdated translations when the text changes
|
|
39
39
|
useEffect(() => {
|
|
40
40
|
textRef.current = text;
|
|
41
41
|
return () => {
|