@jield/solodb-react-components 1.0.28 → 1.0.29
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.js +7419 -7405
- package/dist/index.js.map +1 -1
- package/dist/modules/core/contexts/scanner/ScannerContext.d.ts +3 -2
- package/dist/modules/run/components/run/steps/element/stepDetails.d.ts +2 -4
- package/dist/modules/run/components/shared/parts_table/element/partActionsButtons.d.ts +14 -0
- package/dist/modules/run/components/shared/parts_table/element/runPartProductionActionsButtons.d.ts +2 -2
- package/dist/modules/run/components/shared/parts_table/runPartsQrFlow.d.ts +2 -4
- package/dist/modules/run/components/shared/parts_table/runPartsRegularFlow.d.ts +2 -4
- package/dist/modules/run/hooks/run/parts/usePartActions.d.ts +2 -1
- package/dist/modules/run/utils/parseScannerForRun.d.ts +6 -0
- package/package.json +2 -2
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { ScannedKeysType } from '../../../run/utils/parseScannerForRun';
|
|
1
2
|
export interface ScannerContext {
|
|
2
3
|
lastlyReadedKeys: string;
|
|
3
|
-
addCallbackFn: (id: string, fun: (readedKeys: string) => void) => void;
|
|
4
|
-
removeCallbackFn: (id: string) => void;
|
|
4
|
+
addCallbackFn: (type: ScannedKeysType, id: string, fun: (readedKeys: string) => void) => void;
|
|
5
|
+
removeCallbackFn: (type: ScannedKeysType, id: string) => void;
|
|
5
6
|
addReadingCallbackFn: (id: string, fun: (readingKeys: string) => void) => void;
|
|
6
7
|
removeReadingCallbackFn: (id: string) => void;
|
|
7
8
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { RunStep,
|
|
2
|
-
export default function StepDetails({ run, step,
|
|
1
|
+
import { RunStep, Run } from '@jield/solodb-typescript-core';
|
|
2
|
+
export default function StepDetails({ run, step, refetchFn, }: {
|
|
3
3
|
run?: Run;
|
|
4
4
|
step: RunStep;
|
|
5
|
-
stepParts: RunStepPart[];
|
|
6
|
-
parts: RunPart[];
|
|
7
5
|
refetchFn?: (keys: any[]) => void;
|
|
8
6
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RunStepPartActionEnum } from '@jield/solodb-typescript-core';
|
|
2
|
+
export interface PartActionsDropdownProps {
|
|
3
|
+
availableActions: Set<RunStepPartActionEnum>;
|
|
4
|
+
onActionSelected: (action: RunStepPartActionEnum) => void;
|
|
5
|
+
showInitAction?: boolean;
|
|
6
|
+
onInitSelected?: () => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Dropdown component for bulk part actions
|
|
10
|
+
*
|
|
11
|
+
* Renders a dropdown menu with available actions (Start, Finish, Failed, Repair, Testing, Rework)
|
|
12
|
+
* and optionally an Init action for production runs.
|
|
13
|
+
*/
|
|
14
|
+
export declare const PartActionsButtons: ({ availableActions, onActionSelected, showInitAction, onInitSelected, }: PartActionsDropdownProps) => import("react/jsx-runtime").JSX.Element | null;
|
package/dist/modules/run/components/shared/parts_table/element/runPartProductionActionsButtons.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ type Props = {
|
|
|
6
6
|
runStepPartAction: RunStepPartActionEnum;
|
|
7
7
|
}) => void;
|
|
8
8
|
};
|
|
9
|
-
declare const
|
|
10
|
-
export default
|
|
9
|
+
declare const RunPartProductionActionsButtons: ({ runStepPart, setRunStepPartAction }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default RunPartProductionActionsButtons;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { Run, RunStep
|
|
1
|
+
import { Run, RunStep } from '@jield/solodb-typescript-core';
|
|
2
2
|
type Props = {
|
|
3
3
|
run: Run;
|
|
4
4
|
runStep: RunStep;
|
|
5
|
-
runStepParts?: RunStepPart[];
|
|
6
|
-
runParts?: RunPart[];
|
|
7
5
|
refetchFn?: () => void;
|
|
8
6
|
};
|
|
9
|
-
declare const RunPartsQrFlow: ({ run, runStep,
|
|
7
|
+
declare const RunPartsQrFlow: ({ run, runStep, refetchFn }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
8
|
export default RunPartsQrFlow;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { Run,
|
|
1
|
+
import { Run, RunStep } from '@jield/solodb-typescript-core';
|
|
2
2
|
type Props = {
|
|
3
3
|
run: Run;
|
|
4
4
|
runStep: RunStep;
|
|
5
|
-
runStepParts?: RunStepPart[];
|
|
6
|
-
runParts?: RunPart[];
|
|
7
5
|
refetchFn?: () => void;
|
|
8
6
|
};
|
|
9
|
-
declare const RunPartsRegularFlow: ({ run, runStep,
|
|
7
|
+
declare const RunPartsRegularFlow: ({ run, runStep, refetchFn }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
8
|
export default RunPartsRegularFlow;
|
|
@@ -6,6 +6,7 @@ export interface UsePartActionsOptions<T> {
|
|
|
6
6
|
getPartId: (part: T) => number;
|
|
7
7
|
getRunStepPart: (part: T) => RunStepPart | undefined;
|
|
8
8
|
refetchFn?: () => void;
|
|
9
|
+
actionsFromScanner?: boolean;
|
|
9
10
|
}
|
|
10
11
|
export interface UsePartActionsResult {
|
|
11
12
|
performActionToSelectedParts: (action: RunStepPartActionEnum) => void;
|
|
@@ -17,4 +18,4 @@ export interface UsePartActionsResult {
|
|
|
17
18
|
* @param options Configuration object with parts, selection state, and action mappings
|
|
18
19
|
* @returns Functions for performing and querying available actions
|
|
19
20
|
*/
|
|
20
|
-
export declare function usePartActions<T>({ runStep, parts, selectedParts, getPartId, getRunStepPart, refetchFn, }: UsePartActionsOptions<T>): UsePartActionsResult;
|
|
21
|
+
export declare function usePartActions<T>({ runStep, parts, selectedParts, getPartId, getRunStepPart, refetchFn, actionsFromScanner, }: UsePartActionsOptions<T>): UsePartActionsResult;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jield/solodb-react-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.29",
|
|
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.
|
|
30
|
+
"@jield/solodb-typescript-core": "^1.0.22",
|
|
31
31
|
"@testing-library/dom": "^10.4.1",
|
|
32
32
|
"moment": "^2.30.1",
|
|
33
33
|
"moment-timezone": "^0.6.0",
|