@jield/solodb-react-components 1.0.27 → 1.0.28

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.
@@ -1,8 +1,9 @@
1
1
  export interface ScannerContext {
2
- readingKeys: string;
3
- readedKeys: string;
2
+ lastlyReadedKeys: string;
4
3
  addCallbackFn: (id: string, fun: (readedKeys: string) => void) => void;
5
4
  removeCallbackFn: (id: string) => void;
5
+ addReadingCallbackFn: (id: string, fun: (readingKeys: string) => void) => void;
6
+ removeReadingCallbackFn: (id: string) => void;
6
7
  }
7
8
  export declare const ScannerContext: import('react').Context<ScannerContext>;
8
9
  export declare const useScannerContext: () => ScannerContext;
@@ -1,5 +1,5 @@
1
1
  import { EquipmentModule } from '@jield/solodb-typescript-core';
2
- export default function ModuleStatusElement({ module, refetchFn }: {
2
+ export default function ModuleStatusElement({ module, refetchFn, }: {
3
3
  module: EquipmentModule;
4
4
  refetchFn?: () => void;
5
5
  }): import("react/jsx-runtime").JSX.Element;
@@ -8,7 +8,7 @@ export interface PartActionsDropdownProps {
8
8
  /**
9
9
  * Dropdown component for bulk part actions
10
10
  *
11
- * Renders a dropdown menu with available actions (Start, Finish, Failed, Rework)
11
+ * Renders a dropdown menu with available actions (Start, Finish, Failed, Repair, Testing, Rework)
12
12
  * and optionally an Init action for production runs.
13
13
  */
14
14
  export declare const PartActionsDropdown: ({ availableActions, onActionSelected, showInitAction, onInitSelected, }: PartActionsDropdownProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -4,6 +4,13 @@ export interface PartSelectionControlsProps {
4
4
  onSelectNone: () => void;
5
5
  hasSelectedParts: boolean;
6
6
  actionsDropdown?: ReactNode;
7
+ traySelections?: {
8
+ id: number;
9
+ label: string;
10
+ partIds: number[];
11
+ allSelected: boolean;
12
+ }[];
13
+ onToggleTray?: (partIds: number[], nextSelected: boolean) => void;
7
14
  }
8
15
  /**
9
16
  * Control buttons for part selection (All/None) with optional actions dropdown
@@ -11,4 +18,4 @@ export interface PartSelectionControlsProps {
11
18
  * Renders a button group for selecting/deselecting all parts,
12
19
  * and conditionally displays an actions dropdown when parts are selected.
13
20
  */
14
- export declare const PartSelectionControls: ({ onSelectAll, onSelectNone, hasSelectedParts, actionsDropdown, }: PartSelectionControlsProps) => import("react/jsx-runtime").JSX.Element;
21
+ export declare const PartSelectionControls: ({ onSelectAll, onSelectNone, hasSelectedParts, actionsDropdown, traySelections, onToggleTray, }: PartSelectionControlsProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { RunStepPartActionEnum, RunStepPart } from '@jield/solodb-typescript-core';
2
+ type Props = {
3
+ runStepPart: RunStepPart;
4
+ setRunStepPartAction: ({ runStepPart, runStepPartAction, }: {
5
+ runStepPart: RunStepPart;
6
+ runStepPartAction: RunStepPartActionEnum;
7
+ }) => void;
8
+ };
9
+ declare const RunPartProductionActionsDropdown: ({ runStepPart, setRunStepPartAction }: Props) => import("react/jsx-runtime").JSX.Element;
10
+ export default RunPartProductionActionsDropdown;
@@ -0,0 +1,11 @@
1
+ import { RunStepPartActionEnum, RunStepPart } from '@jield/solodb-typescript-core';
2
+ type Props = {
3
+ runStepPart: RunStepPart;
4
+ createRunStepPart: () => void;
5
+ setRunStepPartAction: ({ runStepPart, runStepPartAction, }: {
6
+ runStepPart: RunStepPart;
7
+ runStepPartAction: RunStepPartActionEnum;
8
+ }) => void;
9
+ };
10
+ declare const RunPartProductionActionsDropdown: ({ runStepPart, setRunStepPartAction, createRunStepPart }: Props) => import("react/jsx-runtime").JSX.Element;
11
+ export default RunPartProductionActionsDropdown;
@@ -1,13 +1,14 @@
1
1
  import { RunPart, RunStepPart, RunStep } from '@jield/solodb-typescript-core';
2
- declare const RunStepPartProductionTableRow: ({ runPart, runStepParts, runStep, refetchFn, partIsSelected, setPartAsSelected, dropdown, layout, onRunStepPartUpdated, }: {
2
+ type Props = {
3
3
  runPart: RunPart;
4
+ partIsSelected?: boolean;
5
+ setPartAsSelected?: (partID: number) => void;
4
6
  runStepParts: RunStepPart[];
7
+ canInit: boolean;
5
8
  runStep: RunStep;
6
9
  refetchFn?: () => void;
7
- partIsSelected?: boolean;
8
- setPartAsSelected?: (partID: number) => void;
9
- dropdown?: boolean;
10
- layout?: "default" | "research";
10
+ dropdown: boolean;
11
11
  onRunStepPartUpdated?: (runStepPart: RunStepPart) => void;
12
- }) => import("react/jsx-runtime").JSX.Element;
12
+ };
13
+ declare const RunStepPartProductionTableRow: (props: Props) => import("react/jsx-runtime").JSX.Element | null;
13
14
  export default RunStepPartProductionTableRow;
@@ -0,0 +1,10 @@
1
+ import { Run, RunPart, RunStep, RunStepPart } from '@jield/solodb-typescript-core';
2
+ type Props = {
3
+ run: Run;
4
+ runStep: RunStep;
5
+ runStepParts?: RunStepPart[];
6
+ runParts?: RunPart[];
7
+ refetchFn?: () => void;
8
+ };
9
+ declare const RunPartsRegularFlow: ({ run, runStep, runStepParts, runParts, refetchFn }: Props) => import("react/jsx-runtime").JSX.Element;
10
+ export default RunPartsRegularFlow;
@@ -1,10 +1,11 @@
1
- import { RunPart, RunStepPart } from '@jield/solodb-typescript-core';
1
+ import { RunPart } from '@jield/solodb-typescript-core';
2
2
  export interface UsePartSelectionOptions {
3
- parts: RunPart[] | RunStepPart[];
3
+ parts: RunPart[];
4
4
  }
5
5
  export interface UsePartSelectionResult {
6
6
  selectedParts: Map<number, boolean>;
7
7
  setPartAsSelected: (partID: number) => void;
8
+ setPartsSelection: (partIDs: number[], nextSelected: boolean) => void;
8
9
  selectAllParts: () => void;
9
10
  selectNoneParts: () => void;
10
11
  hasSelectedParts: boolean;
@@ -1 +1 @@
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)}}.tray-grid-group{display:flex;flex-direction:row;flex-wrap:nowrap;gap:20px;align-items:flex-start;overflow-x:auto;padding-bottom:4px}.tray-grid-wrapper{display:flex;flex-direction:column;gap:10px;flex:0 0 auto}.tray-grid__label{font-size:.85rem;color:#f1f3f5;background:#33383e;border-radius:10px;padding:8px 12px;text-align:center;letter-spacing:.2px}.tray-grid{--tray-columns: 1;--tray-rows: 1;--tray-gap: 10px;--tray-padding: 0px;--tray-cell-size: 25px;--tray-cell-radius: 5px;display:grid;grid-template-columns:repeat(var(--tray-columns),minmax(var(--tray-cell-size),1fr));grid-template-rows:repeat(var(--tray-rows),minmax(var(--tray-cell-size),1fr));gap:var(--tray-gap);padding:var(--tray-padding);background:transparent;border-radius:12px}.tray-grid[data-orientation=ttb]{grid-auto-flow:column}.tray-grid__cell{display:flex;align-items:center;justify-content:center;min-height:var(--tray-cell-size);min-width:var(--tray-cell-size);background:transparent;border:none;border-radius:var(--tray-cell-radius);font-size:.85rem;color:#f8f9fa;text-align:center;padding:0}.tray-grid__cell--empty{background:transparent}.tray-grid__cell--inactive{background:#3b4148}.tray-grid__cell-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tray-grid__badge{display:inline-flex;align-items:center;justify-content:center;width:100%;min-height:var(--tray-cell-size);min-width:var(--tray-cell-size);padding:0 6px;border-radius:var(--tray-cell-radius);color:#f8f9fa;background:#3b4148;text-align:center;line-height:1}.tray-grid__badge--init{font-size:.75rem;text-transform:none;background:#3b4148;border-color:#3b4148;color:#f8f9fa}.step-part-processed{background:#0ca04b;color:#f8f9fa}.step-part-started{background:#e28b22;color:#f8f9fa}.step-part-failed{background:#c11a1a;color:#f8f9fa}.step-part-failed-other{background:#7c0c0c;color:#f8f9fa}.step-part-inactive{background:#3b4148;color:#f8f9fa}.step-part-selected{box-shadow:0 0 0 2px #0d6efd59}
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)}}.tray-grid-group{display:flex;flex-direction:row;flex-wrap:nowrap;gap:20px;align-items:flex-start;overflow-x:auto;padding-bottom:4px}.tray-grid-wrapper{display:flex;flex-direction:column;gap:10px;flex:0 0 auto}.tray-grid__label{font-size:.85rem;color:#f1f3f5;background:#33383e;border-radius:10px;padding:8px 12px;text-align:center;letter-spacing:.2px}.tray-grid{--tray-columns: 1;--tray-rows: 1;--tray-gap: 10px;--tray-padding: 0px;--tray-cell-size: 25px;--tray-cell-radius: 5px;display:grid;grid-template-columns:repeat(var(--tray-columns),minmax(var(--tray-cell-size),1fr));grid-template-rows:repeat(var(--tray-rows),minmax(var(--tray-cell-size),1fr));gap:var(--tray-gap);padding:var(--tray-padding);background:transparent;border-radius:12px}.tray-grid[data-orientation=ttb]{grid-auto-flow:column}.tray-grid__cell{display:flex;align-items:center;justify-content:center;min-height:var(--tray-cell-size);min-width:var(--tray-cell-size);background:transparent;border:none;border-radius:var(--tray-cell-radius);font-size:.85rem;color:#f8f9fa;text-align:center;padding:0}.tray-grid__cell--multi{flex-direction:column;justify-content:center;gap:4px}.tray-grid__cell--empty{background:transparent}.tray-grid__cell--inactive{background:#3b4148}.tray-grid__cell-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tray-grid__badge{display:inline-flex;align-items:center;justify-content:center;width:100%;min-height:var(--tray-cell-size);min-width:var(--tray-cell-size);padding:0 6px;border-radius:var(--tray-cell-radius);color:#f8f9fa;text-align:center;line-height:1}.tray-grid__badge--init{font-size:.75rem;text-transform:none;background:#3b4148;border-color:#3b4148;color:#f8f9fa}.step-part-processed{background:#0ca04b;color:#f8f9fa}.step-part-started{background:#e28b22;color:#f8f9fa}.step-part-failed{background:#c11a1a;color:#f8f9fa}.step-part-failed-other{background:#7c0c0c;color:#f8f9fa}.step-part-inactive{background:#3b4148;color:#f8f9fa}.step-part-selected{box-shadow:0 0 0 2px #0d6efd59}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jield/solodb-react-components",
3
- "version": "1.0.27",
3
+ "version": "1.0.28",
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.18",
30
+ "@jield/solodb-typescript-core": "^1.0.20",
31
31
  "@testing-library/dom": "^10.4.1",
32
32
  "moment": "^2.30.1",
33
33
  "moment-timezone": "^0.6.0",
@@ -1,9 +0,0 @@
1
- import { RunStepPart } from '@jield/solodb-typescript-core';
2
- declare const RunStepPartResearchTableRow: ({ runStepPart, editable, reloadFn, partIsSelected, setPartAsSelected, }: {
3
- runStepPart: RunStepPart;
4
- editable?: boolean;
5
- reloadFn?: () => void;
6
- partIsSelected?: boolean;
7
- setPartAsSelected?: (partID: number) => void;
8
- }) => import("react/jsx-runtime").JSX.Element;
9
- export default RunStepPartResearchTableRow;
@@ -1,10 +0,0 @@
1
- import { Run, RunStep, RunStepPart, RunPart } from '@jield/solodb-typescript-core';
2
- type Props = {
3
- run: Run;
4
- runStep: RunStep;
5
- runStepParts?: RunStepPart[];
6
- runParts?: RunPart[];
7
- refetchFn?: () => void;
8
- };
9
- declare const RunPartsProductionRun: ({ run, runStep, runStepParts, runParts, refetchFn, }: Props) => import("react/jsx-runtime").JSX.Element;
10
- export default RunPartsProductionRun;
@@ -1,10 +0,0 @@
1
- import { Run, RunStep, RunStepPart } from '@jield/solodb-typescript-core';
2
- type Props = {
3
- run: Run;
4
- runStep: RunStep;
5
- runStepParts?: RunStepPart[];
6
- editable?: boolean;
7
- refetchFn?: () => void;
8
- };
9
- declare const RunPartsResearchRun: ({ run: _run, runStep, runStepParts, editable, refetchFn, }: Props) => import("react/jsx-runtime").JSX.Element | null;
10
- export default RunPartsResearchRun;