@seedtactics/insight-client 16.8.4-beta.8 → 17.0.0-beta.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/README.md +21 -0
- package/dist/assets/index-BkKYqUM0.js +388 -0
- package/dist/cell-status/material-details.d.ts +19 -5
- package/dist/cell-status/material-details.js +71 -37
- package/dist/components/LogEntry.js +2 -9
- package/dist/components/log-entry-container-name.d.ts +2 -0
- package/dist/components/log-entry-container-name.js +10 -0
- package/dist/components/operations/AllMaterial.js +4 -3
- package/dist/components/station-monitor/BasketLoadStationWork.js +12 -8
- package/dist/components/station-monitor/BulkRawMaterial.js +4 -4
- package/dist/components/station-monitor/CancelLoadButton.d.ts +4 -0
- package/dist/components/station-monitor/CancelLoadButton.js +60 -0
- package/dist/components/station-monitor/Closeout.js +2 -1
- package/dist/components/station-monitor/Inspection.js +2 -1
- package/dist/components/station-monitor/InvalidateCycle.d.ts +4 -1
- package/dist/components/station-monitor/InvalidateCycle.js +104 -38
- package/dist/components/station-monitor/LoadStation.js +25 -15
- package/dist/components/station-monitor/Material.js +14 -1
- package/dist/components/station-monitor/QuarantineButton.js +160 -90
- package/dist/components/station-monitor/Queues.js +2 -1
- package/dist/components/station-monitor/QueuesAddMaterial.js +65 -57
- package/dist/components/station-monitor/SystemOverview.js +2 -1
- package/dist/components/station-monitor/Whiteboard.js +2 -2
- package/dist/data/material-operation-policy.d.ts +21 -0
- package/dist/data/material-operation-policy.js +89 -0
- package/dist/extension.d.ts +11 -0
- package/dist/extension.js +21 -0
- package/dist/index.html +1 -2
- package/dist/index.js +1 -1
- package/dist/network/api.d.ts +20 -4
- package/dist/network/api.js +163 -2
- package/dist/network/backend-mock.js +6 -0
- package/dist/network/backend.d.ts +2 -0
- package/dist/network/backend.js +2 -1
- package/package.json +12 -11
- package/dist/assets/index-DHusyIyb.js +0 -388
- package/dist/assets/manifest-BzJli0lx.webmanifest +0 -15
- package/dist/bootstrap.d.ts +0 -5
- package/dist/bootstrap.js +0 -56
- package/dist/components/station-monitor/Material.test.d.ts +0 -1
- package/dist/components/station-monitor/Material.test.js +0 -199
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"short_name": "Insight",
|
|
3
|
-
"name": "SeedTactic Insight",
|
|
4
|
-
"icons": [
|
|
5
|
-
{
|
|
6
|
-
"src": "favicon.ico",
|
|
7
|
-
"sizes": "16x16 24x24 32x32 48x48 64x64 256x256",
|
|
8
|
-
"type": "image/x-icon"
|
|
9
|
-
}
|
|
10
|
-
],
|
|
11
|
-
"start_url": "/",
|
|
12
|
-
"display": "standalone",
|
|
13
|
-
"theme_color": "#4caf50",
|
|
14
|
-
"background_color": "#4caf50"
|
|
15
|
-
}
|
package/dist/bootstrap.d.ts
DELETED
package/dist/bootstrap.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/* Copyright (c) 2026, John Lenz
|
|
2
|
-
|
|
3
|
-
All rights reserved.
|
|
4
|
-
|
|
5
|
-
Redistribution and use in source and binary forms, with or without
|
|
6
|
-
modification, are permitted provided that the following conditions are met:
|
|
7
|
-
|
|
8
|
-
* Redistributions of source code must retain the above copyright
|
|
9
|
-
notice, this list of conditions and the following disclaimer.
|
|
10
|
-
|
|
11
|
-
* Redistributions in binary form must reproduce the above
|
|
12
|
-
copyright notice, this list of conditions and the following
|
|
13
|
-
disclaimer in the documentation and/or other materials provided
|
|
14
|
-
with the distribution.
|
|
15
|
-
|
|
16
|
-
* Neither the name of John Lenz, Black Maple Software, SeedTactics,
|
|
17
|
-
nor the names of other contributors may be used to endorse or
|
|
18
|
-
promote products derived from this software without specific
|
|
19
|
-
prior written permission.
|
|
20
|
-
|
|
21
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
22
|
-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
23
|
-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
24
|
-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
25
|
-
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
26
|
-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
27
|
-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
28
|
-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
29
|
-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
30
|
-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
31
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
32
|
-
*/
|
|
33
|
-
import { createStore } from "jotai";
|
|
34
|
-
import { registerNetworkBackend } from "./network/backend.js";
|
|
35
|
-
import { fmsInformation, loadInfo } from "./network/server-settings.js";
|
|
36
|
-
import { render } from "./renderer.js";
|
|
37
|
-
/**
|
|
38
|
-
* Starts one complete FMS Insight application with optional statically composed custom pages.
|
|
39
|
-
*/
|
|
40
|
-
export async function bootstrapInsight(appProps = {}, rootElement) {
|
|
41
|
-
const root = rootElement ?? document.getElementById("root");
|
|
42
|
-
if (!root) {
|
|
43
|
-
throw new Error("Unable to start FMS Insight: no root element was provided or found");
|
|
44
|
-
}
|
|
45
|
-
registerNetworkBackend();
|
|
46
|
-
const store = createStore();
|
|
47
|
-
store.set(fmsInformation, await loadInfo());
|
|
48
|
-
render(appProps, root, store);
|
|
49
|
-
if ("serviceWorker" in navigator) {
|
|
50
|
-
void navigator.serviceWorker.getRegistrations().then((registrations) => {
|
|
51
|
-
for (const registration of registrations) {
|
|
52
|
-
void registration.unregister();
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/* Copyright (c) 2026, John Lenz
|
|
3
|
-
|
|
4
|
-
All rights reserved.
|
|
5
|
-
|
|
6
|
-
Redistribution and use in source and binary forms, with or without
|
|
7
|
-
modification, are permitted provided that the following conditions are met:
|
|
8
|
-
|
|
9
|
-
* Redistributions of source code must retain the above copyright
|
|
10
|
-
notice, this list of conditions and the following disclaimer.
|
|
11
|
-
|
|
12
|
-
* Redistributions in binary form must reproduce the above
|
|
13
|
-
copyright notice, this list of conditions and the following
|
|
14
|
-
disclaimer in the documentation and/or other materials provided
|
|
15
|
-
with the distribution.
|
|
16
|
-
|
|
17
|
-
* Neither the name of John Lenz, Black Maple Software, SeedTactics,
|
|
18
|
-
nor the names of other contributors may be used to endorse or
|
|
19
|
-
promote products derived from this software without specific
|
|
20
|
-
prior written permission.
|
|
21
|
-
|
|
22
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
23
|
-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
24
|
-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
25
|
-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
26
|
-
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
27
|
-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
28
|
-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
29
|
-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
30
|
-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
31
|
-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
32
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
33
|
-
*/
|
|
34
|
-
import { act } from "react";
|
|
35
|
-
import { Provider, createStore } from "jotai";
|
|
36
|
-
import { createRoot } from "react-dom/client";
|
|
37
|
-
import { afterEach, expect, it, vi } from "vitest";
|
|
38
|
-
import { MaterialDialog } from "./Material.js";
|
|
39
|
-
import { materialDialogOpen } from "../../cell-status/material-details.js";
|
|
40
|
-
import { ApiException } from "../../network/api.js";
|
|
41
|
-
import { registerBackend, } from "../../network/backend.js";
|
|
42
|
-
const barcode = "1111222|SO100100|10000";
|
|
43
|
-
const barcodeError = "Serial 1111222 is assigned to sales order SO100100 line 10000 which is not currently scheduled";
|
|
44
|
-
function unexpectedCall(name) {
|
|
45
|
-
throw new Error(`Unexpected backend call in MaterialDialog test: ${name}`);
|
|
46
|
-
}
|
|
47
|
-
const logBackend = {
|
|
48
|
-
get() {
|
|
49
|
-
return unexpectedCall("LogAPI.get");
|
|
50
|
-
},
|
|
51
|
-
recent() {
|
|
52
|
-
return unexpectedCall("LogAPI.recent");
|
|
53
|
-
},
|
|
54
|
-
logForMaterial() {
|
|
55
|
-
return unexpectedCall("LogAPI.logForMaterial");
|
|
56
|
-
},
|
|
57
|
-
logForMaterials() {
|
|
58
|
-
return unexpectedCall("LogAPI.logForMaterials");
|
|
59
|
-
},
|
|
60
|
-
logForSerial() {
|
|
61
|
-
return unexpectedCall("LogAPI.logForSerial");
|
|
62
|
-
},
|
|
63
|
-
materialForSerial() {
|
|
64
|
-
return unexpectedCall("LogAPI.materialForSerial");
|
|
65
|
-
},
|
|
66
|
-
setInspectionDecision() {
|
|
67
|
-
return unexpectedCall("LogAPI.setInspectionDecision");
|
|
68
|
-
},
|
|
69
|
-
recordInspectionCompleted() {
|
|
70
|
-
return unexpectedCall("LogAPI.recordInspectionCompleted");
|
|
71
|
-
},
|
|
72
|
-
recordCloseoutCompleted() {
|
|
73
|
-
return unexpectedCall("LogAPI.recordCloseoutCompleted");
|
|
74
|
-
},
|
|
75
|
-
setWorkorder() {
|
|
76
|
-
return unexpectedCall("LogAPI.setWorkorder");
|
|
77
|
-
},
|
|
78
|
-
recordOperatorNotes() {
|
|
79
|
-
return unexpectedCall("LogAPI.recordOperatorNotes");
|
|
80
|
-
},
|
|
81
|
-
recordWorkorderComment() {
|
|
82
|
-
return unexpectedCall("LogAPI.recordWorkorderComment");
|
|
83
|
-
},
|
|
84
|
-
getActiveWorkorder() {
|
|
85
|
-
return unexpectedCall("LogAPI.getActiveWorkorder");
|
|
86
|
-
},
|
|
87
|
-
cancelRebooking() {
|
|
88
|
-
return unexpectedCall("LogAPI.cancelRebooking");
|
|
89
|
-
},
|
|
90
|
-
requestRebooking() {
|
|
91
|
-
return unexpectedCall("LogAPI.requestRebooking");
|
|
92
|
-
},
|
|
93
|
-
};
|
|
94
|
-
const jobBackend = {
|
|
95
|
-
history() {
|
|
96
|
-
return unexpectedCall("JobAPI.history");
|
|
97
|
-
},
|
|
98
|
-
recent() {
|
|
99
|
-
return unexpectedCall("JobAPI.recent");
|
|
100
|
-
},
|
|
101
|
-
currentStatus() {
|
|
102
|
-
return unexpectedCall("JobAPI.currentStatus");
|
|
103
|
-
},
|
|
104
|
-
setJobComment() {
|
|
105
|
-
return unexpectedCall("JobAPI.setJobComment");
|
|
106
|
-
},
|
|
107
|
-
removeMaterialFromAllQueues() {
|
|
108
|
-
return unexpectedCall("JobAPI.removeMaterialFromAllQueues");
|
|
109
|
-
},
|
|
110
|
-
bulkRemoveMaterialFromQueues() {
|
|
111
|
-
return unexpectedCall("JobAPI.bulkRemoveMaterialFromQueues");
|
|
112
|
-
},
|
|
113
|
-
setMaterialInQueue() {
|
|
114
|
-
return unexpectedCall("JobAPI.setMaterialInQueue");
|
|
115
|
-
},
|
|
116
|
-
addUnprocessedMaterialToQueue() {
|
|
117
|
-
return unexpectedCall("JobAPI.addUnprocessedMaterialToQueue");
|
|
118
|
-
},
|
|
119
|
-
addUnallocatedCastingToQueue() {
|
|
120
|
-
return unexpectedCall("JobAPI.addUnallocatedCastingToQueue");
|
|
121
|
-
},
|
|
122
|
-
signalMaterialForQuarantine() {
|
|
123
|
-
return unexpectedCall("JobAPI.signalMaterialForQuarantine");
|
|
124
|
-
},
|
|
125
|
-
swapMaterialOnPallet() {
|
|
126
|
-
return unexpectedCall("JobAPI.swapMaterialOnPallet");
|
|
127
|
-
},
|
|
128
|
-
invalidatePalletCycle() {
|
|
129
|
-
return unexpectedCall("JobAPI.invalidatePalletCycle");
|
|
130
|
-
},
|
|
131
|
-
unscheduledRebookings() {
|
|
132
|
-
return unexpectedCall("JobAPI.unscheduledRebookings");
|
|
133
|
-
},
|
|
134
|
-
};
|
|
135
|
-
const machineBackend = {
|
|
136
|
-
getToolsInMachines() {
|
|
137
|
-
return unexpectedCall("MachineAPI.getToolsInMachines");
|
|
138
|
-
},
|
|
139
|
-
getProgramsInCellController() {
|
|
140
|
-
return unexpectedCall("MachineAPI.getProgramsInCellController");
|
|
141
|
-
},
|
|
142
|
-
getProgramRevisionContent() {
|
|
143
|
-
return unexpectedCall("MachineAPI.getProgramRevisionContent");
|
|
144
|
-
},
|
|
145
|
-
getLatestProgramRevisionContent() {
|
|
146
|
-
return unexpectedCall("MachineAPI.getLatestProgramRevisionContent");
|
|
147
|
-
},
|
|
148
|
-
getProgramRevisionsInDescendingOrderOfRevision() {
|
|
149
|
-
return unexpectedCall("MachineAPI.getProgramRevisionsInDescendingOrderOfRevision");
|
|
150
|
-
},
|
|
151
|
-
};
|
|
152
|
-
const fmsBackend = {
|
|
153
|
-
fMSInformation() {
|
|
154
|
-
return unexpectedCall("FmsAPI.fMSInformation");
|
|
155
|
-
},
|
|
156
|
-
printLabel() {
|
|
157
|
-
return unexpectedCall("FmsAPI.printLabel");
|
|
158
|
-
},
|
|
159
|
-
parseBarcode() {
|
|
160
|
-
return Promise.reject(new ApiException("An unexpected server error occurred.", 400, barcodeError, {}, null));
|
|
161
|
-
},
|
|
162
|
-
enableVerboseLoggingForFiveMinutes() {
|
|
163
|
-
return unexpectedCall("FmsAPI.enableVerboseLoggingForFiveMinutes");
|
|
164
|
-
},
|
|
165
|
-
};
|
|
166
|
-
async function flushUi() {
|
|
167
|
-
for (let i = 0; i < 3; i += 1) {
|
|
168
|
-
await act(async () => {
|
|
169
|
-
await Promise.resolve();
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
afterEach(() => {
|
|
174
|
-
document.body.innerHTML = "";
|
|
175
|
-
});
|
|
176
|
-
it("shows barcode parse errors inside the material dialog", async () => {
|
|
177
|
-
const consoleError = vi.spyOn(console, "error").mockImplementation(() => { });
|
|
178
|
-
registerBackend(logBackend, jobBackend, fmsBackend, machineBackend);
|
|
179
|
-
const store = createStore();
|
|
180
|
-
store.set(materialDialogOpen, { type: "Barcode", barcode, toQueue: null });
|
|
181
|
-
const container = document.createElement("div");
|
|
182
|
-
document.body.append(container);
|
|
183
|
-
const root = createRoot(container);
|
|
184
|
-
try {
|
|
185
|
-
await act(async () => {
|
|
186
|
-
root.render(_jsx(Provider, { store: store, children: _jsx(MaterialDialog, {}) }));
|
|
187
|
-
});
|
|
188
|
-
await flushUi();
|
|
189
|
-
expect(document.body.textContent).toContain(barcode);
|
|
190
|
-
expect(document.body.textContent).toContain(barcodeError);
|
|
191
|
-
expect(document.body.textContent).not.toContain("An unexpected server error occurred.");
|
|
192
|
-
}
|
|
193
|
-
finally {
|
|
194
|
-
await act(async () => {
|
|
195
|
-
root.unmount();
|
|
196
|
-
});
|
|
197
|
-
consoleError.mockRestore();
|
|
198
|
-
}
|
|
199
|
-
});
|