@burdenoff/microfe-movethewheels 2026.1016.2 → 2026.1016.3

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 (31) hide show
  1. package/dist/components/freight-cost/FreightCommercialEditor.js +217 -0
  2. package/dist/components/freight-cost/FreightCommercialFactEditor.js +217 -0
  3. package/dist/components/freight-cost/FreightCommercialHistory.js +115 -0
  4. package/dist/components/freight-cost/FreightDraftForm.js +106 -91
  5. package/dist/components/freight-cost/FreightHistory.js +42 -40
  6. package/dist/generated/freight-cost-operations.d.ts +959 -0
  7. package/dist/hooks/useFreightRecoveryAction.js +20 -20
  8. package/dist/movethewheels/components/freight-cost/FreightCommercialEditor.d.ts +8 -0
  9. package/dist/movethewheels/components/freight-cost/FreightCommercialFactEditor.d.ts +8 -0
  10. package/dist/movethewheels/components/freight-cost/FreightCommercialHistory.d.ts +4 -0
  11. package/dist/movethewheels/components/freight-cost/FreightDraftForm.d.ts +4 -2
  12. package/dist/movethewheels/components/freight-cost/FreightHistory.d.ts +2 -2
  13. package/dist/movethewheels/utils/freightCommercial.d.ts +44 -0
  14. package/dist/pages/FreightEstimatePage.js +96 -92
  15. package/dist/src/generated/freight-cost-operations.js +495 -6
  16. package/dist/utils/freightAcknowledgement.js +6 -5
  17. package/dist/utils/freightCommercial.js +194 -0
  18. package/dist/utils/freightRecovery.js +22 -22
  19. package/package.json +4 -3
  20. package/src/generated/freight-cost-operations.ts +831 -1
  21. package/src/movethewheels/components/freight-cost/FreightCommercialEditor.tsx +236 -0
  22. package/src/movethewheels/components/freight-cost/FreightCommercialFactEditor.tsx +258 -0
  23. package/src/movethewheels/components/freight-cost/FreightCommercialHistory.tsx +90 -0
  24. package/src/movethewheels/components/freight-cost/FreightDraftForm.tsx +33 -4
  25. package/src/movethewheels/components/freight-cost/FreightHistory.tsx +4 -2
  26. package/src/movethewheels/hooks/useFreightRecoveryAction.ts +2 -1
  27. package/src/movethewheels/pages/FreightEstimatePage.tsx +14 -7
  28. package/src/movethewheels/utils/freightAcknowledgement.ts +3 -1
  29. package/src/movethewheels/utils/freightCommercial.ts +388 -0
  30. package/src/movethewheels/utils/freightRecovery.ts +6 -2
  31. package/src/operations/freight-cost/commercial.graphql +483 -0
@@ -1,6 +1,493 @@
1
1
  import { gql as e } from "@apollo/client";
2
2
  //#region src/generated/freight-cost-operations.ts
3
3
  var t = e`
4
+ fragment CommercialProvenance on MtwFreightCommercialProvenance {
5
+ sourceReference
6
+ sourceRevision
7
+ observedAt
8
+ evidenceLinks {
9
+ fileId
10
+ versionId
11
+ }
12
+ }
13
+ `, n = e`
14
+ mutation SaveFreightCommercialCosts($input: SaveMtwFreightEstimateInput!) {
15
+ saveMtwFreightEstimate(input: $input) {
16
+ id
17
+ shipmentId
18
+ estimateReference
19
+ version
20
+ previousVersionId
21
+ shipmentCapture {
22
+ shipmentNumber
23
+ primaryMode
24
+ capturedUpdatedAt
25
+ }
26
+ facts {
27
+ kind
28
+ title
29
+ commercialScope
30
+ sourceReference
31
+ sourceRevision
32
+ pricingAt
33
+ quotedAt
34
+ validFrom
35
+ validUntil
36
+ reportingCurrency {
37
+ code
38
+ minorUnitDigits
39
+ }
40
+ rounding
41
+ lines {
42
+ id
43
+ category
44
+ description
45
+ payerReference
46
+ payerLabel
47
+ disposition
48
+ inclusionParentLineId
49
+ currency {
50
+ code
51
+ minorUnitDigits
52
+ }
53
+ amountBasis
54
+ quantity
55
+ unit
56
+ unitRateMajor
57
+ amountMinor
58
+ zeroReason
59
+ sourceReference
60
+ sourceRevision
61
+ }
62
+ requirements {
63
+ category
64
+ status
65
+ reason
66
+ sourceReference
67
+ sourceRevision
68
+ }
69
+ fx {
70
+ fromCurrency {
71
+ code
72
+ minorUnitDigits
73
+ }
74
+ toCurrency {
75
+ code
76
+ minorUnitDigits
77
+ }
78
+ rate
79
+ observedAt
80
+ effectiveFrom
81
+ effectiveUntil
82
+ sourceReference
83
+ sourceRevision
84
+ }
85
+ }
86
+ totals {
87
+ completeRelativeToDeclarations
88
+ reportingTotalMinor
89
+ subtotals {
90
+ currency {
91
+ code
92
+ minorUnitDigits
93
+ }
94
+ payerReference
95
+ payerLabel
96
+ knownAmountMinor
97
+ totalAmountMinor
98
+ }
99
+ lines {
100
+ id
101
+ nativeAmountMinor
102
+ reportingAmountMinor
103
+ roundedToZero
104
+ }
105
+ reasons {
106
+ code
107
+ lineId
108
+ detail
109
+ }
110
+ warnings {
111
+ code
112
+ lineId
113
+ detail
114
+ }
115
+ }
116
+ evidence {
117
+ fileId
118
+ versionId
119
+ sha256Hash
120
+ checkedAt
121
+ }
122
+ recordedAt
123
+ createdBy
124
+ actorProvenance
125
+ onBehalfOf
126
+ validityAtRead
127
+ commercialCapture {
128
+ schemaVersion
129
+ selectedLegs {
130
+ id
131
+ expectedUpdatedAt
132
+ }
133
+ origin {
134
+ status
135
+ value {
136
+ kind
137
+ label
138
+ jurisdictionLabel
139
+ }
140
+ reason
141
+ provenance {
142
+ ...CommercialProvenance
143
+ }
144
+ }
145
+ destination {
146
+ status
147
+ value {
148
+ kind
149
+ label
150
+ jurisdictionLabel
151
+ }
152
+ reason
153
+ provenance {
154
+ ...CommercialProvenance
155
+ }
156
+ }
157
+ carrier {
158
+ status
159
+ value {
160
+ reference
161
+ label
162
+ }
163
+ reason
164
+ provenance {
165
+ ...CommercialProvenance
166
+ }
167
+ }
168
+ service {
169
+ status
170
+ value
171
+ reason
172
+ provenance {
173
+ ...CommercialProvenance
174
+ }
175
+ }
176
+ cargo {
177
+ status
178
+ value {
179
+ classificationLabel
180
+ description
181
+ }
182
+ reason
183
+ provenance {
184
+ ...CommercialProvenance
185
+ }
186
+ }
187
+ weight {
188
+ status
189
+ value {
190
+ amount
191
+ unit
192
+ zeroReason
193
+ }
194
+ reason
195
+ provenance {
196
+ ...CommercialProvenance
197
+ }
198
+ }
199
+ volume {
200
+ status
201
+ value {
202
+ amount
203
+ unit
204
+ zeroReason
205
+ }
206
+ reason
207
+ provenance {
208
+ ...CommercialProvenance
209
+ }
210
+ }
211
+ equipment {
212
+ status
213
+ value {
214
+ typeLabel
215
+ count
216
+ }
217
+ reason
218
+ provenance {
219
+ ...CommercialProvenance
220
+ }
221
+ }
222
+ ownerShipment {
223
+ shipmentId
224
+ updatedAt
225
+ primaryMode
226
+ }
227
+ ownerLegs {
228
+ id
229
+ updatedAt
230
+ legNumber
231
+ mode
232
+ carrierId
233
+ carrierName
234
+ weightKg
235
+ volumeCbm
236
+ containerType
237
+ containerCount
238
+ }
239
+ }
240
+ }
241
+ }
242
+ ${t}`, r = e`
243
+ query FreightCommercialVersion($shipmentId: ID!, $id: ID!) {
244
+ mtwFreightEstimateVersion(shipmentId: $shipmentId, id: $id) {
245
+ id
246
+ shipmentId
247
+ estimateReference
248
+ version
249
+ previousVersionId
250
+ shipmentCapture {
251
+ shipmentNumber
252
+ primaryMode
253
+ capturedUpdatedAt
254
+ }
255
+ facts {
256
+ kind
257
+ title
258
+ commercialScope
259
+ sourceReference
260
+ sourceRevision
261
+ pricingAt
262
+ quotedAt
263
+ validFrom
264
+ validUntil
265
+ reportingCurrency {
266
+ code
267
+ minorUnitDigits
268
+ }
269
+ rounding
270
+ lines {
271
+ id
272
+ category
273
+ description
274
+ payerReference
275
+ payerLabel
276
+ disposition
277
+ inclusionParentLineId
278
+ currency {
279
+ code
280
+ minorUnitDigits
281
+ }
282
+ amountBasis
283
+ quantity
284
+ unit
285
+ unitRateMajor
286
+ amountMinor
287
+ zeroReason
288
+ sourceReference
289
+ sourceRevision
290
+ }
291
+ requirements {
292
+ category
293
+ status
294
+ reason
295
+ sourceReference
296
+ sourceRevision
297
+ }
298
+ fx {
299
+ fromCurrency {
300
+ code
301
+ minorUnitDigits
302
+ }
303
+ toCurrency {
304
+ code
305
+ minorUnitDigits
306
+ }
307
+ rate
308
+ observedAt
309
+ effectiveFrom
310
+ effectiveUntil
311
+ sourceReference
312
+ sourceRevision
313
+ }
314
+ }
315
+ totals {
316
+ completeRelativeToDeclarations
317
+ reportingTotalMinor
318
+ subtotals {
319
+ currency {
320
+ code
321
+ minorUnitDigits
322
+ }
323
+ payerReference
324
+ payerLabel
325
+ knownAmountMinor
326
+ totalAmountMinor
327
+ }
328
+ lines {
329
+ id
330
+ nativeAmountMinor
331
+ reportingAmountMinor
332
+ roundedToZero
333
+ }
334
+ reasons {
335
+ code
336
+ lineId
337
+ detail
338
+ }
339
+ warnings {
340
+ code
341
+ lineId
342
+ detail
343
+ }
344
+ }
345
+ evidence {
346
+ fileId
347
+ versionId
348
+ sha256Hash
349
+ checkedAt
350
+ }
351
+ recordedAt
352
+ createdBy
353
+ actorProvenance
354
+ onBehalfOf
355
+ validityAtRead
356
+ commercialCapture {
357
+ schemaVersion
358
+ selectedLegs {
359
+ id
360
+ expectedUpdatedAt
361
+ }
362
+ origin {
363
+ status
364
+ value {
365
+ kind
366
+ label
367
+ jurisdictionLabel
368
+ }
369
+ reason
370
+ provenance {
371
+ ...CommercialProvenance
372
+ }
373
+ }
374
+ destination {
375
+ status
376
+ value {
377
+ kind
378
+ label
379
+ jurisdictionLabel
380
+ }
381
+ reason
382
+ provenance {
383
+ ...CommercialProvenance
384
+ }
385
+ }
386
+ carrier {
387
+ status
388
+ value {
389
+ reference
390
+ label
391
+ }
392
+ reason
393
+ provenance {
394
+ ...CommercialProvenance
395
+ }
396
+ }
397
+ service {
398
+ status
399
+ value
400
+ reason
401
+ provenance {
402
+ ...CommercialProvenance
403
+ }
404
+ }
405
+ cargo {
406
+ status
407
+ value {
408
+ classificationLabel
409
+ description
410
+ }
411
+ reason
412
+ provenance {
413
+ ...CommercialProvenance
414
+ }
415
+ }
416
+ weight {
417
+ status
418
+ value {
419
+ amount
420
+ unit
421
+ zeroReason
422
+ }
423
+ reason
424
+ provenance {
425
+ ...CommercialProvenance
426
+ }
427
+ }
428
+ volume {
429
+ status
430
+ value {
431
+ amount
432
+ unit
433
+ zeroReason
434
+ }
435
+ reason
436
+ provenance {
437
+ ...CommercialProvenance
438
+ }
439
+ }
440
+ equipment {
441
+ status
442
+ value {
443
+ typeLabel
444
+ count
445
+ }
446
+ reason
447
+ provenance {
448
+ ...CommercialProvenance
449
+ }
450
+ }
451
+ ownerShipment {
452
+ shipmentId
453
+ updatedAt
454
+ primaryMode
455
+ }
456
+ ownerLegs {
457
+ id
458
+ updatedAt
459
+ legNumber
460
+ mode
461
+ carrierId
462
+ carrierName
463
+ weightKg
464
+ volumeCbm
465
+ containerType
466
+ containerCount
467
+ }
468
+ }
469
+ }
470
+ }
471
+ ${t}`, i = e`
472
+ query FreightCommercialLegs($shipmentId: ID!, $pagination: PaginationInput!) {
473
+ shipment(id: $shipmentId) {
474
+ id
475
+ legs(pagination: $pagination) {
476
+ id
477
+ shipmentId
478
+ updatedAt
479
+ legNumber
480
+ mode
481
+ carrierId
482
+ carrierName
483
+ weightKg
484
+ volumeCbm
485
+ containerType
486
+ containerCount
487
+ }
488
+ }
489
+ }
490
+ `, a = e`
4
491
  query FreightShipments($pagination: PaginationInput) {
5
492
  shipments(pagination: $pagination) {
6
493
  id
@@ -11,7 +498,7 @@ var t = e`
11
498
  }
12
499
  shipmentsCount
13
500
  }
14
- `, n = e`
501
+ `, o = e`
15
502
  query FreightShipment($id: ID!) {
16
503
  shipment(id: $id) {
17
504
  id
@@ -21,7 +508,7 @@ var t = e`
21
508
  status
22
509
  }
23
510
  }
24
- `, r = e`
511
+ `, s = e`
25
512
  query FreightHistory($shipmentId: ID!, $estimateReference: String, $pagination: MtwContainerPagination) {
26
513
  mtwFreightEstimatePage(
27
514
  shipmentId: $shipmentId
@@ -55,7 +542,8 @@ var t = e`
55
542
  nextOffset
56
543
  }
57
544
  }
58
- `, i = e`
545
+ `;
546
+ e`
59
547
  query FreightVersion($shipmentId: ID!, $id: ID!) {
60
548
  mtwFreightEstimateVersion(shipmentId: $shipmentId, id: $id) {
61
549
  id
@@ -171,7 +659,8 @@ var t = e`
171
659
  validityAtRead
172
660
  }
173
661
  }
174
- `, a = e`
662
+ `;
663
+ var c = e`
175
664
  query PreviewFreightCosts($input: MtwFreightFactsInput!) {
176
665
  previewMtwFreightTotal(input: $input) {
177
666
  completeRelativeToDeclarations
@@ -204,7 +693,7 @@ var t = e`
204
693
  }
205
694
  }
206
695
  }
207
- `, o = e`
696
+ `, l = e`
208
697
  mutation SaveFreightCosts($input: SaveMtwFreightEstimateInput!) {
209
698
  saveMtwFreightEstimate(input: $input) {
210
699
  id
@@ -322,4 +811,4 @@ var t = e`
322
811
  }
323
812
  `;
324
813
  //#endregion
325
- export { r as FreightHistoryDocument, n as FreightShipmentDocument, t as FreightShipmentsDocument, i as FreightVersionDocument, a as PreviewFreightCostsDocument, o as SaveFreightCostsDocument };
814
+ export { i as FreightCommercialLegsDocument, r as FreightCommercialVersionDocument, s as FreightHistoryDocument, o as FreightShipmentDocument, a as FreightShipmentsDocument, c as PreviewFreightCostsDocument, n as SaveFreightCommercialCostsDocument, l as SaveFreightCostsDocument };
@@ -1,8 +1,9 @@
1
+ import { matchesCommercialCapture as e } from "./freightCommercial.js";
1
2
  //#region src/movethewheels/utils/freightAcknowledgement.ts
2
- function e(e, t) {
3
- if (typeof e != "object" || !e || !("saveMtwFreightEstimate" in e) || typeof e.saveMtwFreightEstimate != "object" || e.saveMtwFreightEstimate === null) return !1;
4
- let n = e.saveMtwFreightEstimate;
5
- return "id" in n && typeof n.id == "string" && n.id.trim().length > 0 && "shipmentId" in n && n.shipmentId === t.shipmentId && "estimateReference" in n && n.estimateReference === t.estimateReference && "version" in n && Number.isInteger(t.expectedVersion) && typeof t.expectedVersion == "number" && t.expectedVersion >= 0 && n.version === t.expectedVersion + 1 && "previousVersionId" in n && n.previousVersionId === t.expectedPreviousVersionId;
3
+ function t(t, n) {
4
+ if (typeof t != "object" || !t || !("saveMtwFreightEstimate" in t) || typeof t.saveMtwFreightEstimate != "object" || t.saveMtwFreightEstimate === null) return !1;
5
+ let r = t.saveMtwFreightEstimate;
6
+ return "id" in r && typeof r.id == "string" && r.id.trim().length > 0 && "shipmentId" in r && r.shipmentId === n.shipmentId && "estimateReference" in r && r.estimateReference === n.estimateReference && "version" in r && Number.isInteger(n.expectedVersion) && typeof n.expectedVersion == "number" && n.expectedVersion >= 0 && r.version === n.expectedVersion + 1 && "previousVersionId" in r && r.previousVersionId === n.expectedPreviousVersionId && (n.commercialCapture == null || e(r, n));
6
7
  }
7
8
  //#endregion
8
- export { e as matchesFreightAcknowledgement };
9
+ export { t as matchesFreightAcknowledgement };