@jield/solodb-react-components 1.0.28 → 1.0.31
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 +27 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10953 -10923
- 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/runPartIndicator.d.ts +1 -2
- package/dist/modules/run/components/shared/parts/runPartList.d.ts +1 -2
- 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/element/runPartProductionTableRow.d.ts +1 -3
- 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 +7 -6
- package/dist/modules/run/utils/parseScannerForRun.d.ts +6 -0
- package/dist/modules/run/utils/runStepPartCache.d.ts +3 -1
- 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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RunPart, RunStep } from '@jield/solodb-typescript-core';
|
|
2
|
-
declare const RunPartIndicator: ({ runPart, statusClass, withTrayCell, allowCreate, hasStepPart, isSelected, runStep,
|
|
2
|
+
declare const RunPartIndicator: ({ runPart, statusClass, withTrayCell, allowCreate, hasStepPart, isSelected, runStep, }: {
|
|
3
3
|
runPart: RunPart | null;
|
|
4
4
|
statusClass?: string;
|
|
5
5
|
withTrayCell?: boolean;
|
|
@@ -7,6 +7,5 @@ declare const RunPartIndicator: ({ runPart, statusClass, withTrayCell, allowCrea
|
|
|
7
7
|
hasStepPart?: boolean;
|
|
8
8
|
isSelected?: boolean;
|
|
9
9
|
runStep?: RunStep;
|
|
10
|
-
reloadFn?: () => void;
|
|
11
10
|
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
12
11
|
export default RunPartIndicator;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { RunStep, RunPart, RunStepPart, Run } from '@jield/solodb-typescript-core';
|
|
2
|
-
export declare const RunPartList: ({ step, parts, stepParts, run,
|
|
2
|
+
export declare const RunPartList: ({ step, parts, stepParts, run, }: {
|
|
3
3
|
step: RunStep;
|
|
4
4
|
parts: RunPart[];
|
|
5
5
|
stepParts: RunStepPart[];
|
|
6
6
|
run: Run;
|
|
7
|
-
reloadFn?: () => void;
|
|
8
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -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;
|
package/dist/modules/run/components/shared/parts_table/element/runPartProductionTableRow.d.ts
CHANGED
|
@@ -6,9 +6,7 @@ type Props = {
|
|
|
6
6
|
runStepParts: RunStepPart[];
|
|
7
7
|
canInit: boolean;
|
|
8
8
|
runStep: RunStep;
|
|
9
|
-
refetchFn?: () => void;
|
|
10
9
|
dropdown: boolean;
|
|
11
|
-
onRunStepPartUpdated?: (runStepPart: RunStepPart) => void;
|
|
12
10
|
};
|
|
13
|
-
declare const RunStepPartProductionTableRow: (
|
|
11
|
+
declare const RunStepPartProductionTableRow: ({ runPart, partIsSelected, setPartAsSelected, runStepParts, canInit, runStep, dropdown, }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
14
12
|
export default RunStepPartProductionTableRow;
|
|
@@ -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;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { RunStepPartActionEnum, RunStepPart, RunStep } from '@jield/solodb-typescript-core';
|
|
2
|
-
export interface UsePartActionsOptions
|
|
1
|
+
import { RunStepPartActionEnum, RunStepPart, RunStep, RunPart } from '@jield/solodb-typescript-core';
|
|
2
|
+
export interface UsePartActionsOptions {
|
|
3
3
|
runStep: RunStep;
|
|
4
|
-
parts:
|
|
4
|
+
parts: RunStepPart[] | RunPart[];
|
|
5
5
|
selectedParts: Map<number, boolean>;
|
|
6
|
-
|
|
7
|
-
getRunStepPart
|
|
6
|
+
getRunPart?: (part: RunStepPart) => number;
|
|
7
|
+
getRunStepPart?: (part: RunPart) => 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
|
|
21
|
+
export declare function usePartActions({ runStep, parts, selectedParts, getRunPart, getRunStepPart, refetchFn, actionsFromScanner, }: UsePartActionsOptions): UsePartActionsResult;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { QueryClient } from '@tanstack/react-query';
|
|
2
|
-
import { RunStepPart, RunStepPartActionEnum } from '@jield/solodb-typescript-core';
|
|
2
|
+
import { RunStep, RunStepPart, RunStepPartActionEnum } from '@jield/solodb-typescript-core';
|
|
3
3
|
type UpdateRunStepPartCacheOptions = {
|
|
4
4
|
runStepPart: RunStepPart;
|
|
5
5
|
action: RunStepPartActionEnum;
|
|
6
6
|
latestAction?: RunStepPart["latest_action"] | null;
|
|
7
7
|
};
|
|
8
8
|
export declare const updateRunStepPartCache: (queryClient: QueryClient, options: UpdateRunStepPartCacheOptions) => void;
|
|
9
|
+
export declare const updateRunStepPartCacheByRunStep: (queryClient: QueryClient, runStep: RunStep, options: UpdateRunStepPartCacheOptions) => void;
|
|
10
|
+
export declare const upsertRunStepPartCache: (queryClient: QueryClient, runStep: RunStep, runStepPart: RunStepPart) => void;
|
|
9
11
|
export {};
|
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.31",
|
|
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.23",
|
|
31
31
|
"@testing-library/dom": "^10.4.1",
|
|
32
32
|
"moment": "^2.30.1",
|
|
33
33
|
"moment-timezone": "^0.6.0",
|