@jield/solodb-react-components 1.2.9 → 1.3.0
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 +18 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6317 -5934
- package/dist/index.js.map +1 -1
- package/dist/modules/run/components/run/layout/elements/runLayoutTrayVisual.d.ts +2 -3
- package/dist/modules/run/components/shared/parts/runPartList/trayGrid.d.ts +2 -3
- package/dist/modules/run/components/shared/parts/runPartList.d.ts +0 -2
- package/dist/modules/run/hooks/useRun.d.ts +4 -2
- package/dist/modules/run/utils/runCache.d.ts +4 -0
- package/dist/modules/run/utils/runParts.d.ts +2 -0
- package/dist/modules/run/utils/runTrays.d.ts +26 -0
- package/dist/solodb-react-components.css +1 -1
- package/package.json +30 -29
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { RunPart, RunStep, RunStepPart } from '@jield/solodb-typescript-core';
|
|
2
|
+
import { RunTray } from '../../../../utils/runTrays';
|
|
3
3
|
export default function RunLayoutTrayVisual({ step, tray, parts, stepParts, }: {
|
|
4
4
|
step: RunStep;
|
|
5
5
|
tray: RunTray;
|
|
6
6
|
parts: RunPart[];
|
|
7
7
|
stepParts: RunStepPart[];
|
|
8
8
|
}): import("react").JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RunPart, RunStepPart } from '@jield/solodb-typescript-core';
|
|
2
|
+
import { RunTray } from '../../../../utils/runTrays';
|
|
2
3
|
import { RunPartRenderContext } from './partCell';
|
|
3
|
-
type RunTray = NonNullable<Run["run_trays"]>[number];
|
|
4
4
|
export declare const TrayGrid: ({ tray, trayParts, trayAllParts, stepParts, isSplitLevel, context, }: {
|
|
5
5
|
tray: RunTray;
|
|
6
6
|
trayParts: RunPart[];
|
|
@@ -9,4 +9,3 @@ export declare const TrayGrid: ({ tray, trayParts, trayAllParts, stepParts, isSp
|
|
|
9
9
|
isSplitLevel: boolean;
|
|
10
10
|
context: RunPartRenderContext;
|
|
11
11
|
}) => import("react").JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { Run, RunPart, RunStep, RunStepPart } from '@jield/solodb-typescript-core';
|
|
2
|
-
export declare const getTrayIdPerStepPart: (part: RunPart, stepPart: RunStepPart | null | undefined) => number;
|
|
3
|
-
export declare const groupPartsByTrayId: (parts: RunPart[], stepParts: RunStepPart[]) => Map<number, RunPart[]>;
|
|
4
2
|
export declare const RunPartList: ({ step, parts, stepParts, run, }: {
|
|
5
3
|
step: RunStep;
|
|
6
4
|
parts: RunPart[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { RunTray } from './runTrays';
|
|
3
|
+
export declare const getRunQueryKey: (runId: number) => readonly ["run", number];
|
|
4
|
+
export declare const upsertRunTrayCache: (queryClient: QueryClient, runId: number, tray: RunTray) => void;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Run, RunPart, RunStepPart, TrayType } from '@jield/solodb-typescript-core';
|
|
2
|
+
type CoreRunTray = NonNullable<Run["run_trays"]>[number];
|
|
3
|
+
export type RunTray = CoreRunTray & {
|
|
4
|
+
extra_tray_id: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const getExtraTrayId: (tray: CoreRunTray) => number;
|
|
7
|
+
export declare const PLACEHOLDER_EXTRA_TRAY_ID = -1;
|
|
8
|
+
export declare const getNormalTrays: (run: Run) => RunTray[];
|
|
9
|
+
export declare const getExtraTrays: (run: Run) => RunTray[];
|
|
10
|
+
export declare const getOrderedTrays: (run: Run) => RunTray[];
|
|
11
|
+
export declare const isPlaceholderExtraTray: (tray: RunTray) => boolean;
|
|
12
|
+
export declare const getNextExtraTrayId: (extraTrays: RunTray[]) => number;
|
|
13
|
+
export declare const buildPlaceholderExtraTray: (run: Run, extraTrayId: number) => RunTray | null;
|
|
14
|
+
export declare const resolveTrayForUpdate: (run: Run, tray: RunTray) => RunTray | null;
|
|
15
|
+
export declare const getTrayIdPerStepPart: (part: RunPart, stepPart: RunStepPart | null | undefined) => number;
|
|
16
|
+
export declare const groupPartsByTrayId: (parts: RunPart[], stepParts: RunStepPart[]) => Map<number, RunPart[]>;
|
|
17
|
+
export declare const getSlotIndex: (trayType: TrayType, row: number | null, column: number | null) => number | null;
|
|
18
|
+
export declare const getSlotPosition: (trayType: TrayType, slotIndex: number) => {
|
|
19
|
+
row: number;
|
|
20
|
+
column: number;
|
|
21
|
+
};
|
|
22
|
+
export declare const getForbiddenSlotIndices: (trayType: TrayType) => Set<number>;
|
|
23
|
+
export declare const getStepPartSlotPriority: (stepPart: RunStepPart | null | undefined) => number;
|
|
24
|
+
export declare const buildTraySlots: (trayType: TrayType, trayParts: RunPart[], stepParts: RunStepPart[]) => (RunStepPart | null)[];
|
|
25
|
+
export declare const isTrayFull: (slots: (RunStepPart | null)[], trayType: TrayType) => boolean;
|
|
26
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.equipment_container{border:5px solid #000;margin:10px;padding:10px}.loading-container{flex-direction:column;justify-content:center;align-items:center;height:100%;min-height:400px;padding:20px;display:flex}.loading-spinner{border:4px solid #0000001a;border-top-color:#0d6efd;border-radius:50%;width:40px;height:40px;margin-bottom:10px;animation:1s linear infinite spin}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.scanner-waiting-caret{margin-left:.1em;animation:1s step-end infinite scanner-caret-blink;display:inline-block}@keyframes scanner-caret-blink{50%{opacity:0}}@media (prefers-reduced-motion:reduce){.scanner-waiting-caret{animation:none}}.tray-grid-group{flex-flow:row;align-items:flex-start;gap:20px;padding-bottom:4px;display:flex;overflow-x:auto}.tray-grid-wrapper{flex-direction:column;flex:none;gap:10px;display:flex}.tray-grid__label{color:#f1f3f5;text-align:center;letter-spacing:.2px;background:#33383e;border-radius:10px;padding:8px 12px;font-size:.85rem}.tray-grid{--tray-columns:1;--tray-rows:1;--tray-gap:10px;--tray-padding:0px;--tray-cell-size:25px;--tray-cell-radius:5px;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:0 0;border-radius:12px;display:grid}.tray-grid[data-orientation=ttb]{grid-auto-flow:column}.tray-grid__cell{min-height:var(--tray-cell-size);min-width:var(--tray-cell-size);border-radius:var(--tray-cell-radius);color:#f8f9fa;text-align:center;background:0 0;border:none;justify-content:center;align-items:center;padding:0;font-size:.85rem;display:flex}.tray-grid__cell--multi{flex-direction:column;justify-content:center;gap:4px}.tray-grid__cell--empty{background:0 0}.tray-grid__cell--inactive{background:#3b4148}.tray-grid__cell-label{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.tray-grid__badge{width:100%;min-height:var(--tray-cell-size);min-width:var(--tray-cell-size);border-radius:var(--tray-cell-radius);color:#f8f9fa;text-align:center;justify-content:center;align-items:center;padding:0 6px;line-height:1;display:inline-flex}.tray-grid__badge--init{text-transform:none;color:#f8f9fa;background:#3b4148;border-color:#3b4148;font-size:.75rem}.step-part-selected{box-shadow:0 0 0 2px #0d6efd59}.tray-visual{--tray-rows:1;--tray-columns:1;flex:none}.tray-visual__frame{background:#f8f9fa;border-radius:6px;padding:12px}.tray-visual__grid{grid-template-columns:repeat(var(--tray-columns), 64px);grid-template-rows:repeat(var(--tray-rows), 64px);gap:6px;display:grid}.tray-visual__grid[data-orientation=ttb]{grid-auto-flow:column}.tray-visual__pocket{min-width:0}.tray-visual__slot{background:#fff;border:1px solid #dee2e6;border-radius:5px;flex-wrap:wrap;justify-content:center;align-items:center;gap:4px;width:100%;height:100%;padding:6px;display:flex}.tray-visual__part{text-overflow:ellipsis;cursor:grab;max-width:100%;overflow:hidden}.tray-visual__part:active{cursor:grabbing}.tray-visual__index{color:#fff;background:#8f9397;border-radius:50%;justify-content:center;align-items:center;width:28px;height:28px;font-weight:700;line-height:1;display:inline-flex}
|
|
1
|
+
.equipment_container{border:5px solid #000;margin:10px;padding:10px}.loading-container{flex-direction:column;justify-content:center;align-items:center;height:100%;min-height:400px;padding:20px;display:flex}.loading-spinner{border:4px solid #0000001a;border-top-color:#0d6efd;border-radius:50%;width:40px;height:40px;margin-bottom:10px;animation:1s linear infinite spin}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.scanner-waiting-caret{margin-left:.1em;animation:1s step-end infinite scanner-caret-blink;display:inline-block}@keyframes scanner-caret-blink{50%{opacity:0}}@media (prefers-reduced-motion:reduce){.scanner-waiting-caret{animation:none}}.tray-grid-group{flex-flow:row;align-items:flex-start;gap:20px;padding-bottom:4px;display:flex;overflow-x:auto}.tray-grid-wrapper{flex-direction:column;flex:none;gap:10px;display:flex}.tray-grid__label{color:#f1f3f5;text-align:center;letter-spacing:.2px;background:#33383e;border-radius:10px;padding:8px 12px;font-size:.85rem}.tray-grid{--tray-columns:1;--tray-rows:1;--tray-gap:10px;--tray-padding:0px;--tray-cell-size:25px;--tray-cell-radius:5px;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:0 0;border-radius:12px;display:grid}.tray-grid[data-orientation=ttb]{grid-auto-flow:column}.tray-grid__cell{min-height:var(--tray-cell-size);min-width:var(--tray-cell-size);border-radius:var(--tray-cell-radius);color:#f8f9fa;text-align:center;background:0 0;border:none;justify-content:center;align-items:center;padding:0;font-size:.85rem;display:flex}.tray-grid__cell--multi{flex-direction:column;justify-content:center;gap:4px}.tray-grid__cell--empty{background:0 0}.tray-grid__cell--inactive{background:#3b4148}.tray-grid__cell-label{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.tray-grid__badge{width:100%;min-height:var(--tray-cell-size);min-width:var(--tray-cell-size);border-radius:var(--tray-cell-radius);color:#f8f9fa;text-align:center;justify-content:center;align-items:center;padding:0 6px;line-height:1;display:inline-flex}.tray-grid__badge--init{text-transform:none;color:#f8f9fa;background:#3b4148;border-color:#3b4148;font-size:.75rem}.step-part-selected{box-shadow:0 0 0 2px #0d6efd59}.tray-visual{--tray-rows:1;--tray-columns:1;flex:none}.tray-visual__frame{background:#f8f9fa;border-radius:6px;padding:12px}.tray-visual--extra .tray-visual__frame{background:0 0;border:1px dashed #adb5bd}.tray-visual__grid{grid-template-columns:repeat(var(--tray-columns), 64px);grid-template-rows:repeat(var(--tray-rows), 64px);gap:6px;display:grid}.tray-visual__grid[data-orientation=ttb]{grid-auto-flow:column}.tray-visual__pocket{min-width:0}.tray-visual__slot{background:#fff;border:1px solid #dee2e6;border-radius:5px;flex-wrap:wrap;justify-content:center;align-items:center;gap:4px;width:100%;height:100%;padding:6px;display:flex}.tray-visual__part{text-overflow:ellipsis;cursor:grab;max-width:100%;overflow:hidden}.tray-visual__part:active{cursor:grabbing}.tray-visual__index{color:#fff;background:#8f9397;border-radius:50%;justify-content:center;align-items:center;width:28px;height:28px;font-weight:700;line-height:1;display:inline-flex}
|
|
2
2
|
/*$vite$:1*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jield/solodb-react-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": "jield-webdev/solodb-react-components",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -28,18 +28,18 @@
|
|
|
28
28
|
"coverage": "vitest run --coverage"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@jield/solodb-typescript-core": "^1.2.
|
|
31
|
+
"@jield/solodb-typescript-core": "^1.2.6",
|
|
32
32
|
"@testing-library/dom": "^10.4.1",
|
|
33
|
-
"dompurify": "^3.4.
|
|
33
|
+
"dompurify": "^3.4.14",
|
|
34
34
|
"qrcode.react": "^4.2.0",
|
|
35
35
|
"react-bootstrap": "^2.10.10",
|
|
36
|
-
"react-dropzone": "^
|
|
36
|
+
"react-dropzone": "^20.1.1",
|
|
37
37
|
"react-google-charts": "^5.2.1",
|
|
38
|
-
"react-hook-form": "^7.
|
|
39
|
-
"react-intersection-observer": "^
|
|
38
|
+
"react-hook-form": "^7.87.0",
|
|
39
|
+
"react-intersection-observer": "^11.0.1",
|
|
40
40
|
"react-markdown": "^10.1.0",
|
|
41
41
|
"react-select": "^5.10.2",
|
|
42
|
-
"yet-another-react-lightbox": "^3.32.
|
|
42
|
+
"yet-another-react-lightbox": "^3.32.2"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@tanstack/react-query": "^5.90",
|
|
@@ -51,29 +51,30 @@
|
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@originjs/vite-plugin-commonjs": "^1.0.3",
|
|
54
|
-
"@tanstack/react-query": "^5.
|
|
55
|
-
"@tanstack/react-query-devtools": "^5.
|
|
56
|
-
"@tanstack/react-table": "^
|
|
57
|
-
"@testing-library/jest-dom": "^
|
|
58
|
-
"@testing-library/react": "^16.3.
|
|
59
|
-
"@testing-library/user-event": "^14.6.
|
|
60
|
-
"@types/node": "^26.
|
|
61
|
-
"@types/react": "^19.2.
|
|
62
|
-
"@types/react-dom": "^19.2.
|
|
54
|
+
"@tanstack/react-query": "^5.102.8",
|
|
55
|
+
"@tanstack/react-query-devtools": "^5.102.8",
|
|
56
|
+
"@tanstack/react-table": "^9.2.4",
|
|
57
|
+
"@testing-library/jest-dom": "^7.0.1",
|
|
58
|
+
"@testing-library/react": "^16.3.3",
|
|
59
|
+
"@testing-library/user-event": "^14.6.7",
|
|
60
|
+
"@types/node": "^26.4.1",
|
|
61
|
+
"@types/react": "^19.2.18",
|
|
62
|
+
"@types/react-dom": "^19.2.7",
|
|
63
63
|
"@types/react-router-dom": "^5.3.3",
|
|
64
|
-
"@
|
|
65
|
-
"@
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
64
|
+
"@typescript/typescript6": "^6.0.2",
|
|
65
|
+
"@vitejs/plugin-react": "^6.1.1",
|
|
66
|
+
"@vitest/coverage-v8": "^5.0.0",
|
|
67
|
+
"axios": "^1.20.0",
|
|
68
|
+
"jsdom": "^30.0.1",
|
|
69
|
+
"prettier": "^3.9.6",
|
|
69
70
|
"prop-types": "^15.8.1",
|
|
70
|
-
"react": "^19.2.
|
|
71
|
-
"react-dom": "^19.2.
|
|
72
|
-
"react-router-dom": "^7.18.
|
|
73
|
-
"typescript": "^
|
|
74
|
-
"vite": "^8.
|
|
75
|
-
"vite-plugin-dts": "^5.0
|
|
76
|
-
"vitest": "^
|
|
71
|
+
"react": "^19.2.8",
|
|
72
|
+
"react-dom": "^19.2.8",
|
|
73
|
+
"react-router-dom": "^7.18.3",
|
|
74
|
+
"typescript": "^7.0.2",
|
|
75
|
+
"vite": "^8.2.2",
|
|
76
|
+
"vite-plugin-dts": "^5.1.0",
|
|
77
|
+
"vitest": "^5.0.0"
|
|
77
78
|
},
|
|
78
|
-
"packageManager": "yarn@4.
|
|
79
|
+
"packageManager": "yarn@4.18.0"
|
|
79
80
|
}
|