@jield/solodb-react-components 1.0.26 → 1.0.27
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/dist/index.cjs +26 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +9334 -9205
- package/dist/index.js.map +1 -1
- package/dist/modules/core/contexts/scanner/ScannerContext.d.ts +8 -0
- package/dist/modules/core/contexts/scanner/ScannerProvider.d.ts +4 -0
- package/dist/modules/run/components/shared/parts_table/runPartsProductionRun.d.ts +1 -5
- package/dist/modules/run/components/shared/parts_table/runPartsQrFlow.d.ts +1 -6
- package/dist/modules/run/components/shared/parts_table/runPartsResearchRun.d.ts +1 -5
- package/dist/modules/run/components/step/view/runStepExecuteMinimal.d.ts +1 -6
- package/dist/modules/run/hooks/run/parts/usePartSelection.d.ts +5 -9
- package/dist/modules/run/hooks/useSelectRunWithScanner.d.ts +10 -0
- package/dist/utils/notification.d.ts +9 -10
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface ScannerContext {
|
|
2
|
+
readingKeys: string;
|
|
3
|
+
readedKeys: string;
|
|
4
|
+
addCallbackFn: (id: string, fun: (readedKeys: string) => void) => void;
|
|
5
|
+
removeCallbackFn: (id: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const ScannerContext: import('react').Context<ScannerContext>;
|
|
8
|
+
export declare const useScannerContext: () => ScannerContext;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { Run, RunStep, RunStepPart, RunPart } from '@jield/solodb-typescript-core';
|
|
3
2
|
type Props = {
|
|
4
3
|
run: Run;
|
|
@@ -6,9 +5,6 @@ type Props = {
|
|
|
6
5
|
runStepParts?: RunStepPart[];
|
|
7
6
|
runParts?: RunPart[];
|
|
8
7
|
refetchFn?: () => void;
|
|
9
|
-
toggleRunPartRef?: React.RefObject<{
|
|
10
|
-
setPart: (part: number) => void;
|
|
11
|
-
} | null>;
|
|
12
8
|
};
|
|
13
|
-
declare const RunPartsProductionRun: ({ run, runStep, runStepParts, runParts, refetchFn,
|
|
9
|
+
declare const RunPartsProductionRun: ({ run, runStep, runStepParts, runParts, refetchFn, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
14
10
|
export default RunPartsProductionRun;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { Run, RunStep, RunStepPart, RunPart } from '@jield/solodb-typescript-core';
|
|
3
2
|
type Props = {
|
|
4
3
|
run: Run;
|
|
@@ -6,10 +5,6 @@ type Props = {
|
|
|
6
5
|
runStepParts?: RunStepPart[];
|
|
7
6
|
runParts?: RunPart[];
|
|
8
7
|
refetchFn?: () => void;
|
|
9
|
-
toggleRunPartRef?: React.RefObject<{
|
|
10
|
-
setPart: (part: number) => void;
|
|
11
|
-
setPartByLabel: (label: string) => void;
|
|
12
|
-
} | null>;
|
|
13
8
|
};
|
|
14
|
-
declare const RunPartsQrFlow: ({ run, runStep, runStepParts, runParts, refetchFn
|
|
9
|
+
declare const RunPartsQrFlow: ({ run, runStep, runStepParts, runParts, refetchFn }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
15
10
|
export default RunPartsQrFlow;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
1
|
import { Run, RunStep, RunStepPart } from '@jield/solodb-typescript-core';
|
|
3
2
|
type Props = {
|
|
4
3
|
run: Run;
|
|
@@ -6,9 +5,6 @@ type Props = {
|
|
|
6
5
|
runStepParts?: RunStepPart[];
|
|
7
6
|
editable?: boolean;
|
|
8
7
|
refetchFn?: () => void;
|
|
9
|
-
toggleRunStepPartRef?: RefObject<{
|
|
10
|
-
setPart: (part: number) => void;
|
|
11
|
-
} | null>;
|
|
12
8
|
};
|
|
13
|
-
declare const RunPartsResearchRun: ({ run: _run, runStep, runStepParts, editable, refetchFn,
|
|
9
|
+
declare const RunPartsResearchRun: ({ run: _run, runStep, runStepParts, editable, refetchFn, }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
14
10
|
export default RunPartsResearchRun;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { Run, RunStep } from '@jield/solodb-typescript-core';
|
|
2
|
-
|
|
3
|
-
export default function RunStepExecuteMinimal({ run, runStep, showOnlyEmphasizedParameters, reloadRunStepFn, toggleRunPartRef, }: {
|
|
2
|
+
export default function RunStepExecuteMinimal({ run, runStep, showOnlyEmphasizedParameters, reloadRunStepFn, }: {
|
|
4
3
|
run: Run;
|
|
5
4
|
runStep: RunStep;
|
|
6
5
|
showOnlyEmphasizedParameters: boolean;
|
|
7
6
|
reloadRunStepFn: () => void;
|
|
8
|
-
toggleRunPartRef?: React.RefObject<{
|
|
9
|
-
setPart: (part: number) => void;
|
|
10
|
-
setPartByLabel: (label: string) => void;
|
|
11
|
-
} | null>;
|
|
12
7
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
toggleRef?: React.Ref<{
|
|
5
|
-
setPart: (part: number) => void;
|
|
6
|
-
setPartByLabel?: (label: string) => void;
|
|
7
|
-
} | null>;
|
|
1
|
+
import { RunPart, RunStepPart } from '@jield/solodb-typescript-core';
|
|
2
|
+
export interface UsePartSelectionOptions {
|
|
3
|
+
parts: RunPart[] | RunStepPart[];
|
|
8
4
|
}
|
|
9
5
|
export interface UsePartSelectionResult {
|
|
10
6
|
selectedParts: Map<number, boolean>;
|
|
@@ -16,7 +12,7 @@ export interface UsePartSelectionResult {
|
|
|
16
12
|
/**
|
|
17
13
|
* Hook for managing part selection state across RunParts components
|
|
18
14
|
*
|
|
19
|
-
* @param options Configuration object with parts array, ID getter
|
|
15
|
+
* @param options Configuration object with parts array, ID getter
|
|
20
16
|
* @returns Object with selection state and control functions
|
|
21
17
|
*/
|
|
22
|
-
export declare function usePartSelection
|
|
18
|
+
export declare function usePartSelection({ parts }: UsePartSelectionOptions): UsePartSelectionResult;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Run } from '@jield/solodb-typescript-core';
|
|
2
|
+
export declare const enum FailStatus {
|
|
3
|
+
RunNotFound = "Run not found"
|
|
4
|
+
}
|
|
5
|
+
export default function useSelectRunWithScanner({ runsList, onFail, }: {
|
|
6
|
+
runsList: Run[];
|
|
7
|
+
onFail?: (status: FailStatus) => void;
|
|
8
|
+
}): {
|
|
9
|
+
selectedRun: Run | null;
|
|
10
|
+
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
type NotificationVariant = "success" | "danger";
|
|
3
|
-
export type
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
export type NotificationProps = {
|
|
4
|
+
notificationHeader: string;
|
|
5
|
+
notificationBody: string;
|
|
6
|
+
notificationType: NotificationVariant;
|
|
7
7
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
export default function Notification({ notification, setNotification }: NotificationProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function notification(props: NotificationProps): void;
|
|
9
|
+
export declare function NotificationProvider({ children }: {
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
13
12
|
export {};
|