@seedtactics/insight-client 16.8.4-beta.0 → 16.8.4-beta.10

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.
Files changed (104) hide show
  1. package/README.md +21 -0
  2. package/dist/assets/index-BB3Eqktr.js +388 -0
  3. package/dist/assets/index-DXfAwuj-.css +1 -0
  4. package/dist/assets/roboto-cyrillic-300-normal-D0x1uCa7.woff +0 -0
  5. package/dist/assets/roboto-cyrillic-400-normal-BepgbcUK.woff +0 -0
  6. package/dist/assets/roboto-cyrillic-500-normal-C8ZOEKN4.woff +0 -0
  7. package/dist/assets/roboto-cyrillic-700-normal-D8g9KsRf.woff +0 -0
  8. package/dist/assets/roboto-cyrillic-ext-300-normal-C0UYUNTV.woff +0 -0
  9. package/dist/assets/roboto-cyrillic-ext-400-normal-DhDk0Xwi.woff +0 -0
  10. package/dist/assets/roboto-cyrillic-ext-500-normal-SCgicl0l.woff +0 -0
  11. package/dist/assets/roboto-cyrillic-ext-700-normal-BWOtdzfy.woff +0 -0
  12. package/dist/assets/roboto-greek-300-normal-xS8CB6LN.woff +0 -0
  13. package/dist/assets/roboto-greek-400-normal-D904r64h.woff +0 -0
  14. package/dist/assets/roboto-greek-500-normal-XBIQOowA.woff +0 -0
  15. package/dist/assets/roboto-greek-700-normal-xQsEWSIA.woff +0 -0
  16. package/dist/assets/roboto-latin-300-normal-Dqn3NW0Y.woff +0 -0
  17. package/dist/assets/roboto-latin-400-normal-D27F5sTu.woff +0 -0
  18. package/dist/assets/roboto-latin-500-normal-fsTFPL3E.woff +0 -0
  19. package/dist/assets/roboto-latin-700-normal-YuyVweIx.woff +0 -0
  20. package/dist/assets/roboto-latin-ext-300-normal-B0-sTZUp.woff +0 -0
  21. package/dist/assets/roboto-latin-ext-400-normal-CIveymTr.woff +0 -0
  22. package/dist/assets/roboto-latin-ext-500-normal-C1cK9xmS.woff +0 -0
  23. package/dist/assets/roboto-latin-ext-700-normal-BDePAh3g.woff +0 -0
  24. package/dist/assets/roboto-math-300-normal-CkwMvXpj.woff +0 -0
  25. package/dist/assets/roboto-math-400-normal-D6sS4O5l.woff +0 -0
  26. package/dist/assets/roboto-math-500-normal-BNGXE_xU.woff +0 -0
  27. package/dist/assets/roboto-math-700-normal-DbhUef31.woff +0 -0
  28. package/dist/assets/roboto-symbols-300-normal-CBIeSvs3.woff +0 -0
  29. package/dist/assets/roboto-symbols-400-normal-C7tGlxgb.woff +0 -0
  30. package/dist/assets/roboto-symbols-500-normal-DFnofPUt.woff +0 -0
  31. package/dist/assets/roboto-symbols-700-normal-C59U6HqI.woff +0 -0
  32. package/dist/assets/roboto-vietnamese-300-normal-CYjuQheQ.woff +0 -0
  33. package/dist/assets/roboto-vietnamese-400-normal-Bf76hAzZ.woff +0 -0
  34. package/dist/assets/roboto-vietnamese-500-normal-BgoYVz-9.woff +0 -0
  35. package/dist/assets/roboto-vietnamese-700-normal-kpkdMgbf.woff +0 -0
  36. package/dist/cell-status/custom-state.d.ts +9 -0
  37. package/dist/cell-status/custom-state.js +42 -0
  38. package/dist/cell-status/loading.js +5 -0
  39. package/dist/components/App.d.ts +2 -0
  40. package/dist/components/App.js +1 -1
  41. package/dist/components/LogEntry.js +2 -9
  42. package/dist/components/log-entry-container-name.d.ts +2 -0
  43. package/dist/components/log-entry-container-name.js +10 -0
  44. package/dist/components/operations/Programs.js +1 -1
  45. package/dist/components/station-monitor/BasketLoadStationWork.d.ts +15 -0
  46. package/dist/components/station-monitor/BasketLoadStationWork.js +155 -0
  47. package/dist/components/station-monitor/LoadStation.d.ts +2 -0
  48. package/dist/components/station-monitor/LoadStation.js +26 -17
  49. package/dist/components/station-monitor/Material.js +21 -4
  50. package/dist/components/station-monitor/MoveMaterialArrows.js +1 -1
  51. package/dist/components/station-monitor/QuarantineButton.js +5 -2
  52. package/dist/components/station-monitor/QueuesAddMaterial.js +2 -1
  53. package/dist/components/station-monitor/SystemOverview.js +8 -4
  54. package/dist/data/all-material-bins.js +10 -0
  55. package/dist/data/current-cycles.js +22 -20
  56. package/dist/data/move-arrows.d.ts +1 -0
  57. package/dist/data/move-arrows.js +18 -2
  58. package/dist/data/queue-material.js +2 -0
  59. package/dist/extension.d.ts +11 -0
  60. package/dist/extension.js +21 -0
  61. package/dist/index.html +2 -3
  62. package/dist/index.js +7 -15
  63. package/dist/network/api.d.ts +10 -1
  64. package/dist/network/api.js +9 -0
  65. package/dist/network/backend.d.ts +2 -0
  66. package/dist/network/backend.js +15 -9
  67. package/package.json +15 -13
  68. package/dist/assets/index-4ivKxo2f.js +0 -388
  69. package/dist/assets/index-CbqW4-gR.css +0 -1
  70. package/dist/assets/manifest-BzJli0lx.webmanifest +0 -15
  71. package/dist/assets/roboto-cyrillic-300-normal-DEFNdjk5.woff +0 -0
  72. package/dist/assets/roboto-cyrillic-400-normal-Bjg-1-sg.woff +0 -0
  73. package/dist/assets/roboto-cyrillic-500-normal-CBKMylY4.woff +0 -0
  74. package/dist/assets/roboto-cyrillic-700-normal-DhZFXDSN.woff +0 -0
  75. package/dist/assets/roboto-cyrillic-ext-300-normal-D7ank4TF.woff +0 -0
  76. package/dist/assets/roboto-cyrillic-ext-400-normal-CaK1767H.woff +0 -0
  77. package/dist/assets/roboto-cyrillic-ext-500-normal-DqF2hftb.woff +0 -0
  78. package/dist/assets/roboto-cyrillic-ext-700-normal-CI7FH63F.woff +0 -0
  79. package/dist/assets/roboto-greek-300-normal-C_Dgaih9.woff +0 -0
  80. package/dist/assets/roboto-greek-400-normal-Bb5mj_fZ.woff +0 -0
  81. package/dist/assets/roboto-greek-500-normal-oCqhoyfc.woff +0 -0
  82. package/dist/assets/roboto-greek-700-normal-DjRqqLBV.woff +0 -0
  83. package/dist/assets/roboto-latin-300-normal-BARJ-h6h.woff +0 -0
  84. package/dist/assets/roboto-latin-400-normal-DyYNIH4P.woff +0 -0
  85. package/dist/assets/roboto-latin-500-normal-DQZyH_nt.woff +0 -0
  86. package/dist/assets/roboto-latin-700-normal-DLgJJpmK.woff +0 -0
  87. package/dist/assets/roboto-latin-ext-300-normal-CTCCHkZF.woff +0 -0
  88. package/dist/assets/roboto-latin-ext-400-normal-scX0fKtV.woff +0 -0
  89. package/dist/assets/roboto-latin-ext-500-normal-Cyc0AKLz.woff +0 -0
  90. package/dist/assets/roboto-latin-ext-700-normal-BUhwtWwy.woff +0 -0
  91. package/dist/assets/roboto-math-300-normal-Ds0YpBw2.woff +0 -0
  92. package/dist/assets/roboto-math-400-normal-C9RxBKAh.woff +0 -0
  93. package/dist/assets/roboto-math-500-normal-C-7mKPO3.woff +0 -0
  94. package/dist/assets/roboto-math-700-normal-DVoD5t2k.woff +0 -0
  95. package/dist/assets/roboto-symbols-300-normal-BCnjhQd_.woff +0 -0
  96. package/dist/assets/roboto-symbols-400-normal-DLYbZahX.woff +0 -0
  97. package/dist/assets/roboto-symbols-500-normal-F7c8nfcH.woff +0 -0
  98. package/dist/assets/roboto-symbols-700-normal-BoS6HWkc.woff +0 -0
  99. package/dist/assets/roboto-vietnamese-300-normal-INUupD3o.woff +0 -0
  100. package/dist/assets/roboto-vietnamese-400-normal-DnpnVwnf.woff +0 -0
  101. package/dist/assets/roboto-vietnamese-500-normal-D380IkQ8.woff +0 -0
  102. package/dist/assets/roboto-vietnamese-700-normal-DsFyXAL4.woff +0 -0
  103. package/dist/components/station-monitor/Material.test.d.ts +0 -1
  104. package/dist/components/station-monitor/Material.test.js +0 -199
@@ -3561,6 +3561,7 @@ export class CurrentStatus {
3561
3561
  for (let item of _data["BasketMoveInstructions"])
3562
3562
  this.basketMoveInstructions.push(BasketMoveInstruction.fromJS(item));
3563
3563
  }
3564
+ this.customState = _data["CustomState"];
3564
3565
  }
3565
3566
  }
3566
3567
  static fromJS(data) {
@@ -3635,6 +3636,7 @@ export class CurrentStatus {
3635
3636
  for (let item of this.basketMoveInstructions)
3636
3637
  data["BasketMoveInstructions"].push(item ? item.toJSON() : undefined);
3637
3638
  }
3639
+ data["CustomState"] = this.customState;
3638
3640
  return data;
3639
3641
  }
3640
3642
  }
@@ -3979,11 +3981,14 @@ export class InProcessMaterialAction {
3979
3981
  init(_data) {
3980
3982
  if (_data) {
3981
3983
  this.type = _data["Type"];
3984
+ this.workId = _data["WorkId"];
3982
3985
  this.loadOntoPalletNum = _data["LoadOntoPalletNum"];
3983
3986
  this.loadOntoFace = _data["LoadOntoFace"];
3984
3987
  this.processAfterLoad = _data["ProcessAfterLoad"];
3985
3988
  this.pathAfterLoad = _data["PathAfterLoad"];
3986
3989
  this.loadFromBasketId = _data["LoadFromBasketId"];
3990
+ this.loadToBasketId = _data["LoadToBasketId"];
3991
+ this.loadToBasketSlot = _data["LoadToBasketSlot"];
3987
3992
  this.unloadIntoQueue = _data["UnloadIntoQueue"];
3988
3993
  this.unloadToBasketId = _data["UnloadToBasketId"];
3989
3994
  this.unloadToBasketSlot = _data["UnloadToBasketSlot"];
@@ -4002,11 +4007,14 @@ export class InProcessMaterialAction {
4002
4007
  toJSON(data) {
4003
4008
  data = typeof data === "object" ? data : {};
4004
4009
  data["Type"] = this.type;
4010
+ data["WorkId"] = this.workId;
4005
4011
  data["LoadOntoPalletNum"] = this.loadOntoPalletNum;
4006
4012
  data["LoadOntoFace"] = this.loadOntoFace;
4007
4013
  data["ProcessAfterLoad"] = this.processAfterLoad;
4008
4014
  data["PathAfterLoad"] = this.pathAfterLoad;
4009
4015
  data["LoadFromBasketId"] = this.loadFromBasketId;
4016
+ data["LoadToBasketId"] = this.loadToBasketId;
4017
+ data["LoadToBasketSlot"] = this.loadToBasketSlot;
4010
4018
  data["UnloadIntoQueue"] = this.unloadIntoQueue;
4011
4019
  data["UnloadToBasketId"] = this.unloadToBasketId;
4012
4020
  data["UnloadToBasketSlot"] = this.unloadToBasketSlot;
@@ -4024,6 +4032,7 @@ export var ActionType;
4024
4032
  ActionType["UnloadToInProcess"] = "UnloadToInProcess";
4025
4033
  ActionType["UnloadToCompletedMaterial"] = "UnloadToCompletedMaterial";
4026
4034
  ActionType["Machining"] = "Machining";
4035
+ ActionType["LoadingToBasket"] = "LoadingToBasket";
4027
4036
  })(ActionType || (ActionType = {}));
4028
4037
  export class QueueInfo {
4029
4038
  constructor(data) {
@@ -54,4 +54,6 @@ export declare function registerNetworkBackend(): void;
54
54
  export declare function setOtherLogBackends(servers: ReadonlyArray<string>): void;
55
55
  export declare function registerBackend(log: LogAPI, job: JobAPI, fms: FmsAPI, machine: MachineAPI): void;
56
56
  export declare function setUserToken(u: User): void;
57
+ /** Performs a request using the authenticated Insight user's bearer token, when present. */
58
+ export declare function authenticatedFetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
57
59
  export declare function instructionUrl(partName: string, type: string, matId: number, pallet: number | null, proc: number | null | undefined, operator: string | null): string;
@@ -37,6 +37,7 @@ export let LogBackend;
37
37
  export let MachineBackend;
38
38
  let otherLogServers = [];
39
39
  export let OtherLogBackends = [];
40
+ let userAccessToken;
40
41
  export function registerNetworkBackend() {
41
42
  LogBackend = new api.LogClient();
42
43
  MachineBackend = new api.MachinesClient();
@@ -54,16 +55,21 @@ export function registerBackend(log, job, fms, machine) {
54
55
  MachineBackend = machine;
55
56
  }
56
57
  export function setUserToken(u) {
57
- const token = u.access_token;
58
- function fetch(url, init) {
59
- const headers = new Headers(init?.headers);
60
- headers.set("Authorization", "Bearer " + token);
61
- return window.fetch(url, init ? { ...init, headers } : { headers });
58
+ userAccessToken = u.access_token;
59
+ const http = { fetch: authenticatedFetch };
60
+ FmsServerBackend = new api.FmsClient(undefined, http);
61
+ JobsBackend = new api.JobsClient(undefined, http);
62
+ LogBackend = new api.LogClient(undefined, http);
63
+ OtherLogBackends = otherLogServers.map((s) => new api.LogClient(s, http));
64
+ }
65
+ /** Performs a request using the authenticated Insight user's bearer token, when present. */
66
+ export function authenticatedFetch(url, init) {
67
+ const headers = new Headers(url instanceof Request ? url.headers : undefined);
68
+ new Headers(init?.headers).forEach((value, name) => headers.set(name, value));
69
+ if (userAccessToken) {
70
+ headers.set("Authorization", "Bearer " + userAccessToken);
62
71
  }
63
- FmsServerBackend = new api.FmsClient(undefined, { fetch });
64
- JobsBackend = new api.JobsClient(undefined, { fetch });
65
- LogBackend = new api.LogClient(undefined, { fetch });
66
- OtherLogBackends = otherLogServers.map((s) => new api.LogClient(s, { fetch }));
72
+ return window.fetch(url, init ? { ...init, headers } : { headers });
67
73
  }
68
74
  export function instructionUrl(partName, type, matId, pallet, proc, operator) {
69
75
  return ("/api/v1/fms/find-instructions/" +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seedtactics/insight-client",
3
- "version": "16.8.4-beta.0",
3
+ "version": "16.8.4-beta.10",
4
4
  "license": "BSD-3-Clause",
5
5
  "repository": {
6
6
  "url": "https://github.com/SeedTactics/fms-insight"
@@ -11,6 +11,7 @@
11
11
  ],
12
12
  "type": "module",
13
13
  "exports": {
14
+ "./extension": "./dist/extension.js",
14
15
  "./cell-status/*": "./dist/cell-status/*.js",
15
16
  "./components/*": "./dist/components/*.js",
16
17
  "./components/analysis/*": "./dist/components/analysis/*.js",
@@ -26,7 +27,7 @@
26
27
  "@dnd-kit/sortable": "^10.0.0",
27
28
  "@emotion/react": "^11.14.0",
28
29
  "@emotion/styled": "^11.14.1",
29
- "@fontsource/roboto": "^5.2.10",
30
+ "@fontsource/roboto": "^5.3.0",
30
31
  "@mui/icons-material": "^9.2.0",
31
32
  "@mui/material": "^9.2.0",
32
33
  "@react-spring/rafz": "^10.1.2",
@@ -41,13 +42,13 @@
41
42
  "date-fns": "^4.4.0",
42
43
  "highlight.js": "^11.11.1",
43
44
  "jdenticon": "^3.3.0",
44
- "jotai": "^2.20.1",
45
+ "jotai": "^2.20.2",
45
46
  "jotai-family": "^1.0.2",
46
47
  "jsbarcode": "^3.12.3",
47
48
  "oidc-client-ts": "^3.5.0",
48
- "react": "^19.2.7",
49
+ "react": "^19.2.8",
49
50
  "react-calendar": "^6.0.1",
50
- "react-dom": "^19.2.7",
51
+ "react-dom": "^19.2.8",
51
52
  "react-error-boundary": "^6.1.2",
52
53
  "react-resize-detector": "^12.3.0",
53
54
  "react-timeago": "^8.3.0",
@@ -60,25 +61,26 @@
60
61
  "@types/d3-sankey": "^0.12.5",
61
62
  "@types/d3-scale": "^4.0.9",
62
63
  "@types/d3-shape": "^3.1.8",
63
- "@types/node": "^26.1.1",
64
+ "@types/node": "^26.1.2",
64
65
  "@types/react": "^19.2.17",
65
66
  "@types/react-dom": "^19.2.3",
66
- "@vitejs/plugin-react": "^6.0.3",
67
+ "@vitejs/plugin-react": "^6.0.4",
67
68
  "@vitest/browser-playwright": "^4.1.10",
68
- "jsdom": "^29.1.1",
69
+ "jsdom": "^30.0.1",
69
70
  "nswag": "^14.7.1",
70
- "oxfmt": "^0.58.0",
71
- "oxlint": "^1.73.0",
72
- "oxlint-tsgolint": "^0.24.0",
71
+ "oxfmt": "^0.61.0",
72
+ "oxlint": "^1.76.0",
73
+ "oxlint-tsgolint": "^7.0.2001",
74
+ "playwright": "^1.62.0",
73
75
  "typescript": "^7.0.2",
74
- "vite": "^8.1.4",
76
+ "vite": "^8.1.5",
75
77
  "vitest": "^4.1.10",
76
78
  "vitest-browser-react": "^2.2.0"
77
79
  },
78
80
  "scripts": {
79
81
  "type-check": "tsc --noEmit --skipLibCheck",
80
82
  "lint": "oxlint --type-aware",
81
- "build": "tsc --noEmit --skipLibCheck && vite build",
83
+ "build": "vite build",
82
84
  "build:package": "tsc --project tsconfig.publish.json && cp -Tr ../../docs ./docs",
83
85
  "start": "vite",
84
86
  "test:unit": "vitest run --project unit",