@seedtactics/insight-client 16.8.2 → 16.8.4-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.
@@ -48,6 +48,7 @@ import { useAtomValue } from "jotai";
48
48
  import { fmsInformation } from "../network/server-settings.js";
49
49
  import { basketDisplayName, loadStationDisplayName } from "../cell-status/station-cycles.js";
50
50
  import { filterRemoveAddQueue } from "./log-entry-queue-filter.js";
51
+ import { basketContainerName } from "./log-entry-container-name.js";
51
52
  const ColoredSpan = styled("span", { shouldForwardProp: (prop) => prop.toString()[0] !== "$" })(({ $type }) => {
52
53
  switch ($type) {
53
54
  case "machine":
@@ -87,11 +88,15 @@ function logType(entry, fmsInfo) {
87
88
  return `${basketName} Cycle`;
88
89
  case api.LogType.BasketInLocation:
89
90
  if (entry.startofcycle) {
90
- return "Depart";
91
+ return "Arrive";
91
92
  }
92
93
  else {
93
- return "Arrive";
94
+ return "Depart";
94
95
  }
96
+ case api.LogType.BasketIdentityHint:
97
+ return `${basketName} Identity Hint`;
98
+ case api.LogType.BasketContentSnapshot:
99
+ return `${basketName} Content Snapshot`;
95
100
  case api.LogType.MachineCycle:
96
101
  if (entry.startofcycle) {
97
102
  return "Start Cycle";
@@ -182,7 +187,7 @@ function display(props, fmsInfo) {
182
187
  return (_jsxs("span", { children: [displayMat(entry.material), " on", " ", _jsxs(ColoredSpan, { $type: "pallet", children: ["pallet ", entry.pal] }), " at", " ", _jsx(ColoredSpan, { $type: "loadStation", children: loadStationDisplayName(entry.locnum, fmsInfo.loadStationNames) })] }));
183
188
  case api.LogType.BasketLoadUnload: {
184
189
  const basketName = basketDisplayName(fmsInfo.basketName);
185
- return (_jsxs("span", { children: [displayMat(entry.material), " ", entry.program === "LOAD" ? "loaded onto" : "unloaded from", " ", _jsxs(ColoredSpan, { $type: "pallet", children: [basketName, " ", entry.pal] }), " ", "at", " ", _jsx(ColoredSpan, { $type: "loadStation", children: loadStationDisplayName(entry.locnum, fmsInfo.loadStationNames) })] }));
190
+ return (_jsxs("span", { children: [displayMat(entry.material), " ", entry.program === "LOAD" ? "loaded onto" : "unloaded from", " ", _jsx(ColoredSpan, { $type: "pallet", children: basketContainerName(entry, basketName) }), " at", " ", _jsx(ColoredSpan, { $type: "loadStation", children: loadStationDisplayName(entry.locnum, fmsInfo.loadStationNames) })] }));
186
191
  }
187
192
  case api.LogType.BasketCycle: {
188
193
  const basketName = basketDisplayName(fmsInfo.basketName);
@@ -190,18 +195,28 @@ function display(props, fmsInfo) {
190
195
  return (_jsxs("span", { children: [basketName, " ", entry.pal, " started cycle"] }));
191
196
  }
192
197
  else {
193
- return (_jsxs("span", { children: [basketName, " ", entry.pal, " completed cycle"] }));
198
+ return (_jsxs("span", { children: [basketName, " ", entry.pal, " completed cycle", entry.containerIds && entry.containerIds.length > 0
199
+ ? ` from ${entry.containerIds.length} UUID fragment${entry.containerIds.length === 1 ? "" : "s"}`
200
+ : ""] }));
194
201
  }
195
202
  }
196
203
  case api.LogType.BasketInLocation: {
197
204
  const basketName = basketDisplayName(fmsInfo.basketName);
198
205
  if (entry.startofcycle) {
199
- return (_jsxs("span", { children: [basketName, " ", entry.pal, " departed from ", entry.loc, entry.locnum > 0 ? ` position ${entry.locnum}` : ""] }));
206
+ return (_jsxs("span", { children: [basketContainerName(entry, basketName), " arrived at ", entry.loc, entry.locnum > 0 ? ` position ${entry.locnum}` : ""] }));
200
207
  }
201
208
  else {
202
- return (_jsxs("span", { children: [basketName, " ", entry.pal, " arrived at ", entry.loc, entry.locnum > 0 ? ` position ${entry.locnum}` : ""] }));
209
+ return (_jsxs("span", { children: [basketContainerName(entry, basketName), " departed from ", entry.loc, entry.locnum > 0 ? ` position ${entry.locnum}` : ""] }));
203
210
  }
204
211
  }
212
+ case api.LogType.BasketIdentityHint: {
213
+ const basketName = basketDisplayName(fmsInfo.basketName);
214
+ return (_jsxs("span", { children: [basketContainerName(entry, basketName), " presently associated with ", basketName, " ", entry.pal] }));
215
+ }
216
+ case api.LogType.BasketContentSnapshot: {
217
+ const basketName = basketDisplayName(fmsInfo.basketName);
218
+ return (_jsxs("span", { children: [basketContainerName(entry, basketName), " contained ", displayMat(entry.material)] }));
219
+ }
205
220
  case api.LogType.MachineCycle:
206
221
  return (_jsxs("span", { children: [displayMat(entry.material), " on", " ", _jsxs(ColoredSpan, { $type: "pallet", children: ["pallet ", entry.pal] }), " at", " ", _jsxs(ColoredSpan, { $type: "machine", children: [entry.loc, " ", entry.locnum.toString()] }), entry.program && entry.program !== "" ? (_jsxs("span", { children: [" with program ", entry.program] })) : undefined] }));
207
222
  case api.LogType.PartMark:
@@ -0,0 +1,4 @@
1
+ import * as api from "../network/api.js";
2
+ type ContainerNameEntry = Readonly<Pick<api.ILogEntry, "pal" | "containerId">>;
3
+ export declare function basketContainerName(entry: ContainerNameEntry, basketName: string): string;
4
+ export {};
@@ -0,0 +1,7 @@
1
+ export function basketContainerName(entry, basketName) {
2
+ if (entry.containerId)
3
+ return `${basketName} fragment ${entry.containerId.slice(0, 8)}`;
4
+ if (entry.pal > 0)
5
+ return `${basketName} ${entry.pal}`;
6
+ return basketName;
7
+ }
package/dist/index.html CHANGED
@@ -44,7 +44,7 @@
44
44
  }
45
45
  }
46
46
  </style>
47
- <script type="module" crossorigin src="/assets/index-BDPKYaRT.js"></script>
47
+ <script type="module" crossorigin src="/assets/index-4ivKxo2f.js"></script>
48
48
  <link rel="stylesheet" crossorigin href="/assets/index-CbqW4-gR.css">
49
49
  </head>
50
50
  <body>
@@ -221,6 +221,8 @@ export declare class LogEntry implements ILogEntry {
221
221
  loc: string;
222
222
  locnum: number;
223
223
  pal: number;
224
+ containerId?: string | undefined;
225
+ containerIds?: string[] | undefined;
224
226
  program: string;
225
227
  result: string;
226
228
  elapsed: string;
@@ -243,6 +245,8 @@ export interface ILogEntry {
243
245
  loc: string;
244
246
  locnum: number;
245
247
  pal: number;
248
+ containerId?: string | undefined;
249
+ containerIds?: string[] | undefined;
246
250
  program: string;
247
251
  result: string;
248
252
  elapsed: string;
@@ -301,7 +305,9 @@ export declare enum LogType {
301
305
  CancelRebooking = "CancelRebooking",
302
306
  BasketLoadUnload = "BasketLoadUnload",
303
307
  BasketCycle = "BasketCycle",
304
- BasketInLocation = "BasketInLocation"
308
+ BasketInLocation = "BasketInLocation",
309
+ BasketIdentityHint = "BasketIdentityHint",
310
+ BasketContentSnapshot = "BasketContentSnapshot"
305
311
  }
306
312
  export declare class ToolUse implements IToolUse {
307
313
  tool: string;
@@ -454,6 +460,9 @@ export interface IHoldPattern {
454
460
  holdUnholdPatternRepeats: boolean;
455
461
  }
456
462
  export declare class ProcessInfo implements IProcessInfo {
463
+ extraFields?: {
464
+ [key: string]: number;
465
+ } | undefined;
457
466
  basketLoadStations?: number[] | undefined;
458
467
  expectedBasketLoadTime?: string | undefined;
459
468
  basketUnloadStations?: number[] | undefined;
@@ -465,6 +474,9 @@ export declare class ProcessInfo implements IProcessInfo {
465
474
  toJSON(data?: any): any;
466
475
  }
467
476
  export interface IProcessInfo {
477
+ extraFields?: {
478
+ [key: string]: number;
479
+ } | undefined;
468
480
  basketLoadStations?: number[] | undefined;
469
481
  expectedBasketLoadTime?: string | undefined;
470
482
  basketUnloadStations?: number[] | undefined;
@@ -2386,6 +2386,12 @@ export class LogEntry {
2386
2386
  this.loc = _data["loc"];
2387
2387
  this.locnum = _data["locnum"];
2388
2388
  this.pal = _data["pal"];
2389
+ this.containerId = _data["containerId"];
2390
+ if (Array.isArray(_data["containerIds"])) {
2391
+ this.containerIds = [];
2392
+ for (let item of _data["containerIds"])
2393
+ this.containerIds.push(item);
2394
+ }
2389
2395
  this.program = _data["program"];
2390
2396
  this.result = _data["result"];
2391
2397
  this.elapsed = _data["elapsed"];
@@ -2424,6 +2430,12 @@ export class LogEntry {
2424
2430
  data["loc"] = this.loc;
2425
2431
  data["locnum"] = this.locnum;
2426
2432
  data["pal"] = this.pal;
2433
+ data["containerId"] = this.containerId;
2434
+ if (Array.isArray(this.containerIds)) {
2435
+ data["containerIds"] = [];
2436
+ for (let item of this.containerIds)
2437
+ data["containerIds"].push(item);
2438
+ }
2427
2439
  data["program"] = this.program;
2428
2440
  data["result"] = this.result;
2429
2441
  data["elapsed"] = this.elapsed;
@@ -2510,6 +2522,8 @@ export var LogType;
2510
2522
  LogType["BasketLoadUnload"] = "BasketLoadUnload";
2511
2523
  LogType["BasketCycle"] = "BasketCycle";
2512
2524
  LogType["BasketInLocation"] = "BasketInLocation";
2525
+ LogType["BasketIdentityHint"] = "BasketIdentityHint";
2526
+ LogType["BasketContentSnapshot"] = "BasketContentSnapshot";
2513
2527
  })(LogType || (LogType = {}));
2514
2528
  export class ToolUse {
2515
2529
  constructor(data) {
@@ -2903,6 +2917,13 @@ export class ProcessInfo {
2903
2917
  }
2904
2918
  init(_data) {
2905
2919
  if (_data) {
2920
+ if (_data["ExtraFields"]) {
2921
+ this.extraFields = {};
2922
+ for (let key in _data["ExtraFields"]) {
2923
+ if (_data["ExtraFields"].hasOwnProperty(key))
2924
+ this.extraFields[key] = _data["ExtraFields"][key];
2925
+ }
2926
+ }
2906
2927
  if (Array.isArray(_data["BasketLoadStations"])) {
2907
2928
  this.basketLoadStations = [];
2908
2929
  for (let item of _data["BasketLoadStations"])
@@ -2930,6 +2951,13 @@ export class ProcessInfo {
2930
2951
  }
2931
2952
  toJSON(data) {
2932
2953
  data = typeof data === "object" ? data : {};
2954
+ if (this.extraFields) {
2955
+ data["ExtraFields"] = {};
2956
+ for (let key in this.extraFields) {
2957
+ if (this.extraFields.hasOwnProperty(key))
2958
+ data["ExtraFields"][key] = this.extraFields[key];
2959
+ }
2960
+ }
2933
2961
  if (Array.isArray(this.basketLoadStations)) {
2934
2962
  data["BasketLoadStations"] = [];
2935
2963
  for (let item of this.basketLoadStations)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seedtactics/insight-client",
3
- "version": "16.8.2",
3
+ "version": "16.8.4-beta.0",
4
4
  "license": "BSD-3-Clause",
5
5
  "repository": {
6
6
  "url": "https://github.com/SeedTactics/fms-insight"