@jield/solodb-react-components 1.0.20 → 1.0.22

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,12 @@
1
+ import { RunPart, RunStep } from '@jield/solodb-typescript-core';
2
+ declare const RunPartIndicator: ({ runPart, statusClass, withTrayCell, allowCreate, hasStepPart, isSelected, runStep, reloadFn, }: {
3
+ runPart: RunPart | null;
4
+ statusClass?: string;
5
+ withTrayCell?: boolean;
6
+ allowCreate?: boolean;
7
+ hasStepPart?: boolean;
8
+ isSelected?: boolean;
9
+ runStep?: RunStep;
10
+ reloadFn?: () => void;
11
+ }) => import("react/jsx-runtime").JSX.Element | null;
12
+ export default RunPartIndicator;
@@ -1,7 +1,8 @@
1
1
  import { RunStep, RunPart, RunStepPart, Run } from '@jield/solodb-typescript-core';
2
- export declare const PartsBadgesTrayed: ({ step, parts, stepParts, run, }: {
2
+ export declare const RunPartList: ({ step, parts, stepParts, run, reloadFn, }: {
3
3
  step: RunStep;
4
4
  parts: RunPart[];
5
5
  stepParts: RunStepPart[];
6
6
  run: Run;
7
+ reloadFn?: () => void;
7
8
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { RunPart, RunStepPart, RunStep } from '@jield/solodb-typescript-core';
2
- declare const RunStepPartProductionTableRow: ({ runPart, runStepParts, runStep, refetchFn, partIsSelected, setPartAsSelected, dropdown, }: {
2
+ declare const RunStepPartProductionTableRow: ({ runPart, runStepParts, runStep, refetchFn, partIsSelected, setPartAsSelected, dropdown, layout, onRunStepPartUpdated, }: {
3
3
  runPart: RunPart;
4
4
  runStepParts: RunStepPart[];
5
5
  runStep: RunStep;
@@ -7,5 +7,7 @@ declare const RunStepPartProductionTableRow: ({ runPart, runStepParts, runStep,
7
7
  partIsSelected?: boolean;
8
8
  setPartAsSelected?: (partID: number) => void;
9
9
  dropdown?: boolean;
10
+ layout?: "default" | "research";
11
+ onRunStepPartUpdated?: (runStepPart: RunStepPart) => void;
10
12
  }) => import("react/jsx-runtime").JSX.Element;
11
13
  export default RunStepPartProductionTableRow;
@@ -1,3 +1,4 @@
1
+ import { RefObject } from 'react';
1
2
  import { Run, RunStep, RunStepPart } from '@jield/solodb-typescript-core';
2
3
  type Props = {
3
4
  run: Run;
@@ -5,7 +6,7 @@ type Props = {
5
6
  runStepParts?: RunStepPart[];
6
7
  editable?: boolean;
7
8
  refetchFn?: () => void;
8
- toggleRunStepPartRef?: React.RefObject<{
9
+ toggleRunStepPartRef?: RefObject<{
9
10
  setPart: (part: number) => void;
10
11
  } | null>;
11
12
  };
@@ -0,0 +1,9 @@
1
+ import { QueryClient } from '@tanstack/react-query';
2
+ import { RunStepPart, RunStepPartActionEnum } from '@jield/solodb-typescript-core';
3
+ type UpdateRunStepPartCacheOptions = {
4
+ runStepPart: RunStepPart;
5
+ action: RunStepPartActionEnum;
6
+ latestAction?: RunStepPart["latest_action"] | null;
7
+ };
8
+ export declare const updateRunStepPartCache: (queryClient: QueryClient, options: UpdateRunStepPartCacheOptions) => void;
9
+ export {};
@@ -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-wrap:wrap;gap:12px}.tray-grid-wrapper{display:flex;flex-direction:column;gap:6px}.tray-grid__label{font-size:.85rem;font-weight:600;color:#6c757d}.tray-grid{--tray-columns: 1;--tray-rows: 1;--tray-gap: 6px;--tray-padding: 8px;--tray-cell-min-height: 30px;--tray-border-color: #dee2e6;--tray-bg: #f8f9fa;--tray-cell-radius: 6px;display:grid;grid-template-columns:repeat(var(--tray-columns),minmax(0,1fr));grid-template-rows:repeat(var(--tray-rows),minmax(var(--tray-cell-min-height),auto));gap:var(--tray-gap);padding:var(--tray-padding);background:var(--tray-bg);border-radius:8px}.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-min-height);background:transparent;border:none;border-radius:var(--tray-cell-radius);font-size:.75rem;color:#212529;text-align:center;padding:2px 4px}.tray-grid__cell--empty{background:transparent}.tray-grid__cell--inactive{background:#e9ecef}.tray-grid__cell--idle{background:#adb5bd}.tray-grid__cell--started{background:#90ffea}.tray-grid__cell--processed{background:#9be7b3}.tray-grid__cell--failed{background:#f4a1a1}.tray-grid__cell-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
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}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jield/solodb-react-components",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
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.15",
30
+ "@jield/solodb-typescript-core": "^1.0.17",
31
31
  "@testing-library/dom": "^10.4.1",
32
32
  "moment": "^2.30.1",
33
33
  "moment-timezone": "^0.6.0",
@@ -1,6 +0,0 @@
1
- import { RunPart, RunStepPart, RunStep } from '@jield/solodb-typescript-core';
2
- export default function RunPartStepPart({ runPart, runStepParts, runStep, }: {
3
- runPart: RunPart;
4
- runStepParts: RunStepPart[];
5
- runStep: RunStep;
6
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- import { RunStep, RunPart, RunStepPart } from '@jield/solodb-typescript-core';
2
- export declare const PartBadgesProductionRun: ({ runStep, parts, runStepParts, reloadFn, }: {
3
- runStep: RunStep;
4
- parts: RunPart[];
5
- runStepParts: RunStepPart[];
6
- reloadFn?: () => void;
7
- }) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- import { RunStep, RunPart, RunStepPart } from '@jield/solodb-typescript-core';
2
- export declare const PartsBadgesResearchRun: ({ step, parts, stepParts, }: {
3
- step: RunStep;
4
- parts: RunPart[];
5
- stepParts: RunStepPart[];
6
- }) => import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- import { RunPart, RunStepPart, RunStep } from '@jield/solodb-typescript-core';
2
- declare const RunStepPartProductionBadge: ({ runPart, runStepParts, runStep, reloadFn, }: {
3
- runPart: RunPart;
4
- runStepParts: RunStepPart[];
5
- runStep: RunStep;
6
- reloadFn?: () => void;
7
- }) => import("react/jsx-runtime").JSX.Element;
8
- export default RunStepPartProductionBadge;