@jield/solodb-react-components 1.0.13 → 1.0.15

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.
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+ type ErrorBoundaryProps = {
3
+ fallback?: React.ReactNode;
4
+ children: React.ReactNode;
5
+ };
6
+ type ErrorBoundaryState = {
7
+ hasError: boolean;
8
+ error?: Error;
9
+ };
10
+ declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
11
+ constructor(props: ErrorBoundaryProps);
12
+ static getDerivedStateFromError(error: Error): ErrorBoundaryState;
13
+ componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void;
14
+ handleReset: () => void;
15
+ render(): import("react/jsx-runtime").JSX.Element;
16
+ }
17
+ export default ErrorBoundary;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ interface LoadingComponentProps {
3
+ message?: string;
4
+ }
5
+ /**
6
+ * A reusable loading component that displays a spinner and optional message
7
+ * @param message - Optional custom message to display (defaults to translated "Loading...")
8
+ */
9
+ declare const LoadingComponent: React.FC<LoadingComponentProps>;
10
+ export default LoadingComponent;
@@ -1,5 +1,7 @@
1
1
  import { Run } from '@jield/solodb-typescript-core';
2
- export default function SelectRunWithQrScanner({ setRun, runsList }: {
3
- setRun: (run: Run) => void;
2
+ export default function NavigateInRunWithQrScanner({ runsList, setRun, setRunStepPartId, setRunPartId, }: {
4
3
  runsList: Run[];
4
+ setRun: (run: Run) => void;
5
+ setRunStepPartId?: (stepPart: number) => void;
6
+ setRunPartId?: (part: number) => void;
5
7
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,14 @@
1
+ import { default as React } from 'react';
1
2
  import { Run, RunStep, RunStepPart, RunPart } from '@jield/solodb-typescript-core';
2
- declare const RunPartsProductionRun: ({ run, runStep, runStepParts, runParts, refetchFn, }: {
3
+ type Props = {
3
4
  run: Run;
4
5
  runStep: RunStep;
5
6
  runStepParts?: RunStepPart[];
6
7
  runParts?: RunPart[];
7
8
  refetchFn?: () => void;
8
- }) => import("react/jsx-runtime").JSX.Element;
9
+ toggleRunPartRef?: React.RefObject<{
10
+ setPart: (part: number) => void;
11
+ } | null>;
12
+ };
13
+ declare const RunPartsProductionRun: ({ run, runStep, runStepParts, runParts, refetchFn, toggleRunPartRef, }: Props) => import("react/jsx-runtime").JSX.Element;
9
14
  export default RunPartsProductionRun;
@@ -1,9 +1,13 @@
1
1
  import { Run, RunStep, RunStepPart } from '@jield/solodb-typescript-core';
2
- declare const RunPartsResearchRun: ({ run, runStep, runStepParts, editable, refetchFn, }: {
2
+ type Props = {
3
3
  run: Run;
4
4
  runStep: RunStep;
5
5
  runStepParts?: RunStepPart[];
6
6
  editable?: boolean;
7
7
  refetchFn?: () => void;
8
- }) => import("react/jsx-runtime").JSX.Element | null;
8
+ toggleRunStepPartRef?: React.RefObject<{
9
+ setPart: (part: number) => void;
10
+ } | null>;
11
+ };
12
+ declare const RunPartsResearchRun: ({ run: _run, runStep, runStepParts, editable, refetchFn, toggleRunStepPartRef, }: Props) => import("react/jsx-runtime").JSX.Element | null;
9
13
  export default RunPartsResearchRun;
@@ -1,5 +1,9 @@
1
1
  import { RunStep } from '@jield/solodb-typescript-core';
2
- export default function StepRemark({ runStep, reloadRunStep }: {
2
+ type StepRemarkProps = {
3
3
  runStep?: RunStep;
4
4
  reloadRunStep?: () => void;
5
- }): import("react/jsx-runtime").JSX.Element;
5
+ title?: string;
6
+ titleClassName?: string;
7
+ };
8
+ export default function StepRemark({ runStep, reloadRunStep, title, titleClassName, }: StepRemarkProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -1,7 +1,14 @@
1
1
  import { Run, RunStep } from '@jield/solodb-typescript-core';
2
- export default function RunStepExecuteMinimal({ run, runStep, showOnlyEmphasizedParameters, reloadRunStepFn, }: {
2
+ import { default as React } from 'react';
3
+ export default function RunStepExecuteMinimal({ run, runStep, showOnlyEmphasizedParameters, reloadRunStepFn, toggleRunStepPartRef, toggleRunPartRef, }: {
3
4
  run: Run;
4
5
  runStep: RunStep;
5
6
  showOnlyEmphasizedParameters: boolean;
6
7
  reloadRunStepFn: () => void;
8
+ toggleRunStepPartRef?: React.RefObject<{
9
+ setPart: (part: number) => void;
10
+ } | null>;
11
+ toggleRunPartRef?: React.RefObject<{
12
+ setPart: (part: number) => void;
13
+ } | null>;
7
14
  }): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- .equipment_container{padding:10px;border:5px solid black;margin:10px}
1
+ .equipment_container{padding:10px;border:5px solid black;margin:10px}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:400px;padding:20px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0,0,0,.1);border-radius:50%;border-top:4px solid #0d6efd;animation:spin 1s linear infinite;margin-bottom:10px}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jield/solodb-react-components",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "type": "module",
5
5
  "repository": "jield-webdev/solodb-react-components",
6
6
  "main": "./dist/index.cjs",
@@ -27,7 +27,7 @@
27
27
  "coverage": "vitest run --coverage"
28
28
  },
29
29
  "dependencies": {
30
- "@jield/solodb-typescript-core": "^1.0.6",
30
+ "@jield/solodb-typescript-core": "^1.0.8",
31
31
  "@testing-library/dom": "^10.4.1",
32
32
  "moment": "^2.30.1",
33
33
  "moment-timezone": "^0.6.0",