@burdenoff/microfe-movethewheels 2026.1017.12 → 2026.1017.14

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 (29) hide show
  1. package/dist/MoveTheWheelsRoot.js +7 -0
  2. package/dist/MoveTheWheelsRoutes.js +39 -35
  3. package/dist/components/pallet-preview/PalletPreviewResults.js +189 -0
  4. package/dist/generated/pallet-preview-operations.d.ts +273 -0
  5. package/dist/hooks/usePalletPreview.js +86 -0
  6. package/dist/movethewheels/components/pallet-preview/PalletPreviewResults.d.ts +6 -0
  7. package/dist/movethewheels/hooks/usePalletPreview.d.ts +98 -0
  8. package/dist/movethewheels/pages/PalletPreviewPage.d.ts +1 -0
  9. package/dist/movethewheels/utils/graphqlClient.d.ts +4 -0
  10. package/dist/movethewheels/utils/palletPreviewInput.d.ts +54 -0
  11. package/dist/movethewheels/utils/palletPreviewResponse.d.ts +7 -0
  12. package/dist/pages/PalletPreviewPage.js +501 -0
  13. package/dist/pages/WarehousesPage.js +83 -78
  14. package/dist/src/generated/pallet-preview-operations.js +594 -0
  15. package/dist/utils/graphqlClient.js +27 -19
  16. package/dist/utils/palletPreviewInput.js +138 -0
  17. package/dist/utils/palletPreviewResponse.js +191 -0
  18. package/package.json +5 -4
  19. package/src/generated/pallet-preview-operations.ts +204 -0
  20. package/src/movethewheels/MoveTheWheelsRoot.tsx +7 -0
  21. package/src/movethewheels/MoveTheWheelsRoutes.tsx +2 -0
  22. package/src/movethewheels/components/pallet-preview/PalletPreviewResults.tsx +220 -0
  23. package/src/movethewheels/hooks/usePalletPreview.ts +114 -0
  24. package/src/movethewheels/pages/PalletPreviewPage.tsx +588 -0
  25. package/src/movethewheels/pages/WarehousesPage.tsx +9 -1
  26. package/src/movethewheels/utils/graphqlClient.ts +19 -2
  27. package/src/movethewheels/utils/palletPreviewInput.ts +199 -0
  28. package/src/movethewheels/utils/palletPreviewResponse.ts +256 -0
  29. package/src/operations/pallet-preview/preview.graphql +26 -0
@@ -0,0 +1,594 @@
1
+ //#region src/generated/pallet-preview-operations.ts
2
+ var e = {
3
+ kind: "Document",
4
+ definitions: [{
5
+ kind: "OperationDefinition",
6
+ operation: "query",
7
+ name: {
8
+ kind: "Name",
9
+ value: "MtwPalletGeometryPreview"
10
+ },
11
+ variableDefinitions: [{
12
+ kind: "VariableDefinition",
13
+ variable: {
14
+ kind: "Variable",
15
+ name: {
16
+ kind: "Name",
17
+ value: "input"
18
+ }
19
+ },
20
+ type: {
21
+ kind: "NonNullType",
22
+ type: {
23
+ kind: "NamedType",
24
+ name: {
25
+ kind: "Name",
26
+ value: "MtwPalletGeometryPreviewInput"
27
+ }
28
+ }
29
+ }
30
+ }],
31
+ selectionSet: {
32
+ kind: "SelectionSet",
33
+ selections: [{
34
+ kind: "Field",
35
+ name: {
36
+ kind: "Name",
37
+ value: "mtwPalletGeometryPreview"
38
+ },
39
+ arguments: [{
40
+ kind: "Argument",
41
+ name: {
42
+ kind: "Name",
43
+ value: "input"
44
+ },
45
+ value: {
46
+ kind: "Variable",
47
+ name: {
48
+ kind: "Name",
49
+ value: "input"
50
+ }
51
+ }
52
+ }],
53
+ selectionSet: {
54
+ kind: "SelectionSet",
55
+ selections: [
56
+ {
57
+ kind: "Field",
58
+ name: {
59
+ kind: "Name",
60
+ value: "classification"
61
+ }
62
+ },
63
+ {
64
+ kind: "Field",
65
+ name: {
66
+ kind: "Name",
67
+ value: "method"
68
+ }
69
+ },
70
+ {
71
+ kind: "Field",
72
+ name: {
73
+ kind: "Name",
74
+ value: "units"
75
+ }
76
+ },
77
+ {
78
+ kind: "Field",
79
+ name: {
80
+ kind: "Name",
81
+ value: "layoutStatus"
82
+ }
83
+ },
84
+ {
85
+ kind: "Field",
86
+ name: {
87
+ kind: "Name",
88
+ value: "requestedQuantity"
89
+ }
90
+ },
91
+ {
92
+ kind: "Field",
93
+ name: {
94
+ kind: "Name",
95
+ value: "placedQuantity"
96
+ }
97
+ },
98
+ {
99
+ kind: "Field",
100
+ name: {
101
+ kind: "Name",
102
+ value: "requestedPayloadMassG"
103
+ }
104
+ },
105
+ {
106
+ kind: "Field",
107
+ name: {
108
+ kind: "Name",
109
+ value: "requestedGrossMassG"
110
+ }
111
+ },
112
+ {
113
+ kind: "Field",
114
+ name: {
115
+ kind: "Name",
116
+ value: "placements"
117
+ },
118
+ selectionSet: {
119
+ kind: "SelectionSet",
120
+ selections: [
121
+ {
122
+ kind: "Field",
123
+ name: {
124
+ kind: "Name",
125
+ value: "packageId"
126
+ }
127
+ },
128
+ {
129
+ kind: "Field",
130
+ name: {
131
+ kind: "Name",
132
+ value: "unit"
133
+ }
134
+ },
135
+ {
136
+ kind: "Field",
137
+ name: {
138
+ kind: "Name",
139
+ value: "yawDegrees"
140
+ }
141
+ },
142
+ {
143
+ kind: "Field",
144
+ name: {
145
+ kind: "Name",
146
+ value: "xMm"
147
+ }
148
+ },
149
+ {
150
+ kind: "Field",
151
+ name: {
152
+ kind: "Name",
153
+ value: "yMm"
154
+ }
155
+ },
156
+ {
157
+ kind: "Field",
158
+ name: {
159
+ kind: "Name",
160
+ value: "zMm"
161
+ }
162
+ },
163
+ {
164
+ kind: "Field",
165
+ name: {
166
+ kind: "Name",
167
+ value: "widthMm"
168
+ }
169
+ },
170
+ {
171
+ kind: "Field",
172
+ name: {
173
+ kind: "Name",
174
+ value: "lengthMm"
175
+ }
176
+ },
177
+ {
178
+ kind: "Field",
179
+ name: {
180
+ kind: "Name",
181
+ value: "heightMm"
182
+ }
183
+ }
184
+ ]
185
+ }
186
+ },
187
+ {
188
+ kind: "Field",
189
+ name: {
190
+ kind: "Name",
191
+ value: "unplaced"
192
+ },
193
+ selectionSet: {
194
+ kind: "SelectionSet",
195
+ selections: [{
196
+ kind: "Field",
197
+ name: {
198
+ kind: "Name",
199
+ value: "packageId"
200
+ }
201
+ }, {
202
+ kind: "Field",
203
+ name: {
204
+ kind: "Name",
205
+ value: "quantity"
206
+ }
207
+ }]
208
+ }
209
+ },
210
+ {
211
+ kind: "Field",
212
+ name: {
213
+ kind: "Name",
214
+ value: "bounds"
215
+ },
216
+ selectionSet: {
217
+ kind: "SelectionSet",
218
+ selections: [
219
+ {
220
+ kind: "Field",
221
+ name: {
222
+ kind: "Name",
223
+ value: "placedContainment"
224
+ },
225
+ selectionSet: {
226
+ kind: "SelectionSet",
227
+ selections: [{
228
+ kind: "Field",
229
+ name: {
230
+ kind: "Name",
231
+ value: "status"
232
+ }
233
+ }, {
234
+ kind: "Field",
235
+ name: {
236
+ kind: "Name",
237
+ value: "reason"
238
+ }
239
+ }]
240
+ }
241
+ },
242
+ {
243
+ kind: "Field",
244
+ name: {
245
+ kind: "Name",
246
+ value: "placedNonOverlap"
247
+ },
248
+ selectionSet: {
249
+ kind: "SelectionSet",
250
+ selections: [{
251
+ kind: "Field",
252
+ name: {
253
+ kind: "Name",
254
+ value: "status"
255
+ }
256
+ }, {
257
+ kind: "Field",
258
+ name: {
259
+ kind: "Name",
260
+ value: "reason"
261
+ }
262
+ }]
263
+ }
264
+ },
265
+ {
266
+ kind: "Field",
267
+ name: {
268
+ kind: "Name",
269
+ value: "permittedUprightYaw"
270
+ },
271
+ selectionSet: {
272
+ kind: "SelectionSet",
273
+ selections: [{
274
+ kind: "Field",
275
+ name: {
276
+ kind: "Name",
277
+ value: "status"
278
+ }
279
+ }, {
280
+ kind: "Field",
281
+ name: {
282
+ kind: "Name",
283
+ value: "reason"
284
+ }
285
+ }]
286
+ }
287
+ },
288
+ {
289
+ kind: "Field",
290
+ name: {
291
+ kind: "Name",
292
+ value: "reportedSingleLayerHeight"
293
+ },
294
+ selectionSet: {
295
+ kind: "SelectionSet",
296
+ selections: [{
297
+ kind: "Field",
298
+ name: {
299
+ kind: "Name",
300
+ value: "status"
301
+ }
302
+ }, {
303
+ kind: "Field",
304
+ name: {
305
+ kind: "Name",
306
+ value: "reason"
307
+ }
308
+ }]
309
+ }
310
+ },
311
+ {
312
+ kind: "Field",
313
+ name: {
314
+ kind: "Name",
315
+ value: "palletPayloadMass"
316
+ },
317
+ selectionSet: {
318
+ kind: "SelectionSet",
319
+ selections: [{
320
+ kind: "Field",
321
+ name: {
322
+ kind: "Name",
323
+ value: "status"
324
+ }
325
+ }, {
326
+ kind: "Field",
327
+ name: {
328
+ kind: "Name",
329
+ value: "reason"
330
+ }
331
+ }]
332
+ }
333
+ },
334
+ {
335
+ kind: "Field",
336
+ name: {
337
+ kind: "Name",
338
+ value: "palletFootprintWithinLoadEnvelope"
339
+ },
340
+ selectionSet: {
341
+ kind: "SelectionSet",
342
+ selections: [{
343
+ kind: "Field",
344
+ name: {
345
+ kind: "Name",
346
+ value: "status"
347
+ }
348
+ }, {
349
+ kind: "Field",
350
+ name: {
351
+ kind: "Name",
352
+ value: "reason"
353
+ }
354
+ }]
355
+ }
356
+ },
357
+ {
358
+ kind: "Field",
359
+ name: {
360
+ kind: "Name",
361
+ value: "loadedPalletGrossMass"
362
+ },
363
+ selectionSet: {
364
+ kind: "SelectionSet",
365
+ selections: [{
366
+ kind: "Field",
367
+ name: {
368
+ kind: "Name",
369
+ value: "status"
370
+ }
371
+ }, {
372
+ kind: "Field",
373
+ name: {
374
+ kind: "Name",
375
+ value: "reason"
376
+ }
377
+ }]
378
+ }
379
+ }
380
+ ]
381
+ }
382
+ },
383
+ {
384
+ kind: "Field",
385
+ name: {
386
+ kind: "Name",
387
+ value: "unsupported"
388
+ },
389
+ selectionSet: {
390
+ kind: "SelectionSet",
391
+ selections: [
392
+ {
393
+ kind: "Field",
394
+ name: {
395
+ kind: "Name",
396
+ value: "additionalPackingGeometry"
397
+ }
398
+ },
399
+ {
400
+ kind: "Field",
401
+ name: {
402
+ kind: "Name",
403
+ value: "handling"
404
+ }
405
+ },
406
+ {
407
+ kind: "Field",
408
+ name: {
409
+ kind: "Name",
410
+ value: "securing"
411
+ }
412
+ },
413
+ {
414
+ kind: "Field",
415
+ name: {
416
+ kind: "Name",
417
+ value: "centreOfGravityAndStability"
418
+ }
419
+ },
420
+ {
421
+ kind: "Field",
422
+ name: {
423
+ kind: "Name",
424
+ value: "supportAndFloorContactLoads"
425
+ }
426
+ },
427
+ {
428
+ kind: "Field",
429
+ name: {
430
+ kind: "Name",
431
+ value: "loadingAndUnloadingPath"
432
+ }
433
+ },
434
+ {
435
+ kind: "Field",
436
+ name: {
437
+ kind: "Name",
438
+ value: "segregationAndCargoCompatibility"
439
+ }
440
+ }
441
+ ]
442
+ }
443
+ },
444
+ {
445
+ kind: "Field",
446
+ name: {
447
+ kind: "Name",
448
+ value: "sources"
449
+ },
450
+ selectionSet: {
451
+ kind: "SelectionSet",
452
+ selections: [
453
+ {
454
+ kind: "Field",
455
+ name: {
456
+ kind: "Name",
457
+ value: "packages"
458
+ },
459
+ selectionSet: {
460
+ kind: "SelectionSet",
461
+ selections: [{
462
+ kind: "Field",
463
+ name: {
464
+ kind: "Name",
465
+ value: "packageId"
466
+ }
467
+ }, {
468
+ kind: "Field",
469
+ name: {
470
+ kind: "Name",
471
+ value: "source"
472
+ },
473
+ selectionSet: {
474
+ kind: "SelectionSet",
475
+ selections: [{
476
+ kind: "Field",
477
+ name: {
478
+ kind: "Name",
479
+ value: "reference"
480
+ }
481
+ }, {
482
+ kind: "Field",
483
+ name: {
484
+ kind: "Name",
485
+ value: "version"
486
+ }
487
+ }]
488
+ }
489
+ }]
490
+ }
491
+ },
492
+ {
493
+ kind: "Field",
494
+ name: {
495
+ kind: "Name",
496
+ value: "pallet"
497
+ },
498
+ selectionSet: {
499
+ kind: "SelectionSet",
500
+ selections: [{
501
+ kind: "Field",
502
+ name: {
503
+ kind: "Name",
504
+ value: "reference"
505
+ }
506
+ }, {
507
+ kind: "Field",
508
+ name: {
509
+ kind: "Name",
510
+ value: "version"
511
+ }
512
+ }]
513
+ }
514
+ },
515
+ {
516
+ kind: "Field",
517
+ name: {
518
+ kind: "Name",
519
+ value: "loadEnvelope"
520
+ },
521
+ selectionSet: {
522
+ kind: "SelectionSet",
523
+ selections: [{
524
+ kind: "Field",
525
+ name: {
526
+ kind: "Name",
527
+ value: "reference"
528
+ }
529
+ }, {
530
+ kind: "Field",
531
+ name: {
532
+ kind: "Name",
533
+ value: "version"
534
+ }
535
+ }]
536
+ }
537
+ },
538
+ {
539
+ kind: "Field",
540
+ name: {
541
+ kind: "Name",
542
+ value: "additionalPacking"
543
+ },
544
+ selectionSet: {
545
+ kind: "SelectionSet",
546
+ selections: [{
547
+ kind: "Field",
548
+ name: {
549
+ kind: "Name",
550
+ value: "reference"
551
+ }
552
+ }, {
553
+ kind: "Field",
554
+ name: {
555
+ kind: "Name",
556
+ value: "version"
557
+ }
558
+ }]
559
+ }
560
+ },
561
+ {
562
+ kind: "Field",
563
+ name: {
564
+ kind: "Name",
565
+ value: "clearance"
566
+ },
567
+ selectionSet: {
568
+ kind: "SelectionSet",
569
+ selections: [{
570
+ kind: "Field",
571
+ name: {
572
+ kind: "Name",
573
+ value: "reference"
574
+ }
575
+ }, {
576
+ kind: "Field",
577
+ name: {
578
+ kind: "Name",
579
+ value: "version"
580
+ }
581
+ }]
582
+ }
583
+ }
584
+ ]
585
+ }
586
+ }
587
+ ]
588
+ }
589
+ }]
590
+ }
591
+ }]
592
+ };
593
+ //#endregion
594
+ export { e as MtwPalletGeometryPreviewDocument };
@@ -29,8 +29,10 @@ async function m(e, i, a, o = "RETRY_TRANSIENT", s) {
29
29
  query: i,
30
30
  variables: a
31
31
  }), u = n(c.apiGatewayUrl);
32
+ if (c.signal?.aborted) throw new DOMException("Request cancelled", "AbortError");
32
33
  await f();
33
34
  try {
35
+ if (c.signal?.aborted) throw new DOMException("Request cancelled", "AbortError");
34
36
  let e = typeof window < "u" ? await t({
35
37
  url: new URL(u, typeof document < "u" && document.baseURI || window.location.href).toString(),
36
38
  authToken: c.authToken ?? "",
@@ -48,7 +50,7 @@ async function m(e, i, a, o = "RETRY_TRANSIENT", s) {
48
50
  ...c.tenantId ? { "x-tenant-id": c.tenantId } : {},
49
51
  ...c.actorId ? { "x-actor-id": c.actorId } : {},
50
52
  ...c.actorId ? { "x-actor-type": "user" } : {}
51
- }, l, o === "SINGLE_ATTEMPT" ? 0 : r, e?.assertCurrent ?? (() => {}), o === "SINGLE_ATTEMPT" ? s : void 0);
53
+ }, l, o === "SINGLE_ATTEMPT" ? 0 : r, e?.assertCurrent ?? (() => {}), o === "SINGLE_ATTEMPT" ? s : void 0, c.signal, c.validateResponse);
52
54
  } finally {
53
55
  p();
54
56
  }
@@ -66,45 +68,51 @@ async function h(t, n) {
66
68
  function g(e, t) {
67
69
  return typeof e != "object" || !e || Array.isArray(e) || "errors" in e && (!Array.isArray(e.errors) || e.errors.length !== 0) || !("data" in e) || typeof e.data != "object" || e.data === null || Array.isArray(e.data) ? !1 : Object.keys(e.data).length === 1 && Object.hasOwn(e.data, t);
68
70
  }
69
- async function _(t, n, r, l, u, d) {
70
- let f = /* @__PURE__ */ Error("GraphQL request failed");
71
- for (let p = 0; p <= l; p += 1) {
72
- let m = p < l;
73
- p > 0 && await c(Math.min(250 * 2 ** (p - 1), 2e3) + Math.floor(Math.random() * 150)), u();
74
- let _ = new AbortController(), v = setTimeout(() => _.abort(), i);
71
+ async function _(t, n, r, l, u, d, f, p) {
72
+ let m = /* @__PURE__ */ Error("GraphQL request failed");
73
+ for (let _ = 0; _ <= l; _ += 1) {
74
+ let v = _ < l;
75
+ if (_ > 0 && await c(Math.min(250 * 2 ** (_ - 1), 2e3) + Math.floor(Math.random() * 150)), f?.aborted) throw new DOMException("Request cancelled", "AbortError");
76
+ u();
77
+ let y = new AbortController(), b = setTimeout(() => y.abort(), i), x = () => y.abort();
78
+ f?.addEventListener("abort", x, { once: !0 });
75
79
  try {
80
+ if (f?.aborted) throw new DOMException("Request cancelled", "AbortError");
76
81
  let i = await fetch(t, {
77
82
  method: "POST",
78
83
  headers: n,
79
84
  body: r,
80
- signal: _.signal
85
+ signal: y.signal
81
86
  });
82
87
  if (!i.ok) {
83
- if (f = (o(i.status) ? null : await h(i, d)) ?? /* @__PURE__ */ Error(`GraphQL request failed with status ${i.status}`), m && o(i.status)) continue;
84
- throw f;
88
+ if (m = (o(i.status) ? null : await h(i, d)) ?? /* @__PURE__ */ Error(`GraphQL request failed with status ${i.status}`), v && o(i.status)) continue;
89
+ throw m;
85
90
  }
86
- let s = await i.json(), c = e(s, i.status, d);
91
+ let s = await i.json();
92
+ p?.(s);
93
+ let c = e(s, i.status, d);
87
94
  if (c) throw c;
88
95
  if (d && !g(s, d)) throw Error("The order write response could not be confirmed.");
89
96
  if (s.errors?.length) {
90
97
  let e = s.errors.map((e) => e.message ?? "Unknown GraphQL error").join("; ");
91
- if (f = Error(e), m && s.errors.some((e) => a(e.message))) continue;
92
- throw f;
98
+ if (m = Error(e), v && s.errors.some((e) => a(e.message))) continue;
99
+ throw m;
93
100
  }
94
101
  if (!s.data) {
95
- if (f = /* @__PURE__ */ Error("GraphQL response did not include data"), m) continue;
96
- throw f;
102
+ if (m = /* @__PURE__ */ Error("GraphQL response did not include data"), v) continue;
103
+ throw m;
97
104
  }
98
105
  return s.data;
99
106
  } catch (e) {
107
+ if (f?.aborted) throw new DOMException("Request cancelled", "AbortError");
100
108
  let t = s(e), n = t ? `GraphQL request timed out after ${i}ms` : e instanceof Error ? e.message : String(e);
101
- if (f = !t && e instanceof Error ? e : Error(n), m && (t || a(n) || e instanceof TypeError)) continue;
102
- throw f;
109
+ if (m = !t && e instanceof Error ? e : Error(n), v && (t || a(n) || e instanceof TypeError)) continue;
110
+ throw m;
103
111
  } finally {
104
- clearTimeout(v);
112
+ clearTimeout(b), f?.removeEventListener("abort", x);
105
113
  }
106
114
  }
107
- throw f;
115
+ throw m;
108
116
  }
109
117
  //#endregion
110
118
  export { m as executeGraphQL, n as resolveGraphqlUrl };