@burdenoff/microfe-movethewheels 2026.930.5 → 2026.1010.2
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/dist/MoveTheWheelsRoot.js +177 -102
- package/dist/MoveTheWheelsRoutes.js +55 -11
- package/dist/_virtual/_rolldown/runtime.js +1 -1
- package/dist/components/ContainerEvidencePicker.js +143 -0
- package/dist/components/FreeTimeAgreementForm.js +496 -0
- package/dist/components/ReturnInstructionForm.js +108 -0
- package/dist/components/ReuseControls.js +91 -0
- package/dist/components/ReusePermissionForm.js +114 -0
- package/dist/components/ReuseProposalForm.js +455 -0
- package/dist/components/ReuseSourceFields.js +78 -0
- package/dist/components/consolidation/ConsolidationHistory.js +244 -0
- package/dist/components/consolidation/ConsolidationLotEditor.js +133 -0
- package/dist/components/consolidation/ConsolidationManifestWorkbench.js +143 -0
- package/dist/components/consolidation/ConsolidationPlanForm.js +172 -0
- package/dist/components/consolidation/ConsolidationPlanWorkbench.js +321 -0
- package/dist/components/consolidation/ConsolidationReportForm.js +94 -0
- package/dist/components/consolidation/ConsolidationReportsWorkbench.js +195 -0
- package/dist/components/consolidation/ConsolidationSummary.js +76 -0
- package/dist/components/consolidation/OriginalConsolidationHistory.js +112 -0
- package/dist/components/freight-cost/FreightDraftForm.js +213 -0
- package/dist/components/freight-cost/FreightFields.js +70 -0
- package/dist/components/freight-cost/FreightFxEditor.js +90 -0
- package/dist/components/freight-cost/FreightHistory.js +164 -0
- package/dist/components/freight-cost/FreightLineEditor.js +191 -0
- package/dist/components/freight-cost/FreightScopeEditor.js +72 -0
- package/dist/components/freight-cost/FreightTotals.js +66 -0
- package/dist/components/logistics-procedure/ProcedureDecisionForm.js +197 -0
- package/dist/components/logistics-procedure/ProcedureFields.js +31 -0
- package/dist/components/logistics-procedure/ProcedureHistory.js +177 -0
- package/dist/components/logistics-procedure/ProcedurePolicyForm.js +227 -0
- package/dist/components/logistics-procedure/ProcedurePolicyWorkbench.js +155 -0
- package/dist/components/logistics-procedure/ProcedureReviewWorkbench.js +221 -0
- package/dist/components/logistics-procedure/ProcedureRunWorkbench.js +190 -0
- package/dist/components/logistics-procedure/ProcedureSubjectPicker.js +130 -0
- package/dist/components/pending-pick/PendingPickDraft.js +84 -0
- package/dist/components/pending-pick/PendingPickHistory.js +113 -0
- package/dist/components/pending-pick/PickCapture.js +166 -0
- package/dist/components/pending-pick/PickLineSelection.js +111 -0
- package/dist/components/stock-binding/StockAssessmentDraft.js +48 -0
- package/dist/components/stock-binding/StockAssessmentHistory.js +61 -0
- package/dist/components/stock-binding/StockAssessmentSummary.js +199 -0
- package/dist/components/stock-binding/StockFactForm.js +232 -0
- package/dist/components/stock-observation/StockIssueForm.js +148 -0
- package/dist/components/stock-observation/StockIssueHistory.js +116 -0
- package/dist/components/stock-observation/StockIssueReadPanel.js +70 -0
- package/dist/components/trip-utilization/TripReportForm.js +118 -0
- package/dist/components/trip-utilization/TripReportHistory.js +54 -0
- package/dist/components/trip-utilization/TripReportSummary.js +216 -0
- package/dist/components/trip-utilization/TripSegmentFields.js +166 -0
- package/dist/generated/consolidation-operations.d.ts +1060 -0
- package/dist/generated/container-condition-operations.d.ts +868 -0
- package/dist/generated/container-operations.d.ts +356 -0
- package/dist/generated/empty-reuse-operations.d.ts +1578 -0
- package/dist/generated/free-time-operations.d.ts +938 -0
- package/dist/generated/freight-cost-operations.d.ts +716 -0
- package/dist/generated/logistics-procedure-operations.d.ts +938 -0
- package/dist/generated/pending-pick-operations.d.ts +1969 -0
- package/dist/generated/stock-binding-operations.d.ts +930 -0
- package/dist/generated/stock-observation-operations.d.ts +476 -0
- package/dist/generated/trip-utilization-operations.d.ts +651 -0
- package/dist/generated/wspace-operations.d.ts +143 -50
- package/dist/hooks/useConsolidationAction.js +119 -0
- package/dist/hooks/useContainerCondition.js +105 -0
- package/dist/hooks/useContainerLifecycle.js +192 -0
- package/dist/hooks/useEmptyReuseAction.js +45 -0
- package/dist/hooks/useFreightRecoveryAction.js +117 -0
- package/dist/hooks/useMultiModalShipments.js +1 -1
- package/dist/hooks/useProcedureAction.js +119 -0
- package/dist/hooks/useProcedureSelection.js +53 -0
- package/dist/hooks/useReuseRecoveryAction.js +116 -0
- package/dist/movethewheels/components/ContainerEvidencePicker.d.ts +10 -0
- package/dist/movethewheels/components/FreeTimeAgreementForm.d.ts +14 -0
- package/dist/movethewheels/components/ReturnInstructionForm.d.ts +8 -0
- package/dist/movethewheels/components/ReuseControls.d.ts +42 -0
- package/dist/movethewheels/components/ReusePermissionForm.d.ts +9 -0
- package/dist/movethewheels/components/ReuseProposalForm.d.ts +11 -0
- package/dist/movethewheels/components/ReuseSourceFields.d.ts +9 -0
- package/dist/movethewheels/components/consolidation/ConsolidationHistory.d.ts +13 -0
- package/dist/movethewheels/components/consolidation/ConsolidationLotEditor.d.ts +6 -0
- package/dist/movethewheels/components/consolidation/ConsolidationManifestWorkbench.d.ts +8 -0
- package/dist/movethewheels/components/consolidation/ConsolidationPlanForm.d.ts +8 -0
- package/dist/movethewheels/components/consolidation/ConsolidationPlanWorkbench.d.ts +5 -0
- package/dist/movethewheels/components/consolidation/ConsolidationReportForm.d.ts +9 -0
- package/dist/movethewheels/components/consolidation/ConsolidationReportsWorkbench.d.ts +7 -0
- package/dist/movethewheels/components/consolidation/ConsolidationSummary.d.ts +6 -0
- package/dist/movethewheels/components/consolidation/OriginalConsolidationHistory.d.ts +8 -0
- package/dist/movethewheels/components/freight-cost/FreightDraftForm.d.ts +8 -0
- package/dist/movethewheels/components/freight-cost/FreightFields.d.ts +23 -0
- package/dist/movethewheels/components/freight-cost/FreightFxEditor.d.ts +6 -0
- package/dist/movethewheels/components/freight-cost/FreightHistory.d.ts +5 -0
- package/dist/movethewheels/components/freight-cost/FreightLineEditor.d.ts +8 -0
- package/dist/movethewheels/components/freight-cost/FreightScopeEditor.d.ts +6 -0
- package/dist/movethewheels/components/freight-cost/FreightTotals.d.ts +6 -0
- package/dist/movethewheels/components/logistics-procedure/ProcedureDecisionForm.d.ts +20 -0
- package/dist/movethewheels/components/logistics-procedure/ProcedureFields.d.ts +17 -0
- package/dist/movethewheels/components/logistics-procedure/ProcedureHistory.d.ts +7 -0
- package/dist/movethewheels/components/logistics-procedure/ProcedurePolicyForm.d.ts +10 -0
- package/dist/movethewheels/components/logistics-procedure/ProcedurePolicyWorkbench.d.ts +5 -0
- package/dist/movethewheels/components/logistics-procedure/ProcedureReviewWorkbench.d.ts +5 -0
- package/dist/movethewheels/components/logistics-procedure/ProcedureRunWorkbench.d.ts +6 -0
- package/dist/movethewheels/components/logistics-procedure/ProcedureSubjectPicker.d.ts +7 -0
- package/dist/movethewheels/components/pending-pick/PendingPickDraft.d.ts +16 -0
- package/dist/movethewheels/components/pending-pick/PendingPickHistory.d.ts +5 -0
- package/dist/movethewheels/components/pending-pick/PickCapture.d.ts +6 -0
- package/dist/movethewheels/components/pending-pick/PickLineSelection.d.ts +17 -0
- package/dist/movethewheels/components/stock-binding/StockAssessmentDraft.d.ts +13 -0
- package/dist/movethewheels/components/stock-binding/StockAssessmentHistory.d.ts +18 -0
- package/dist/movethewheels/components/stock-binding/StockAssessmentSummary.d.ts +9 -0
- package/dist/movethewheels/components/stock-binding/StockFactForm.d.ts +6 -0
- package/dist/movethewheels/components/stock-observation/StockIssueForm.d.ts +7 -0
- package/dist/movethewheels/components/stock-observation/StockIssueHistory.d.ts +7 -0
- package/dist/movethewheels/components/stock-observation/StockIssueReadPanel.d.ts +5 -0
- package/dist/movethewheels/components/trip-utilization/TripReportForm.d.ts +6 -0
- package/dist/movethewheels/components/trip-utilization/TripReportHistory.d.ts +14 -0
- package/dist/movethewheels/components/trip-utilization/TripReportSummary.d.ts +5 -0
- package/dist/movethewheels/components/trip-utilization/TripSegmentFields.d.ts +9 -0
- package/dist/movethewheels/hooks/useConsolidationAction.d.ts +19 -0
- package/dist/movethewheels/hooks/useContainerCondition.d.ts +21 -0
- package/dist/movethewheels/hooks/useContainerLifecycle.d.ts +40 -0
- package/dist/movethewheels/hooks/useEmptyReuseAction.d.ts +14 -0
- package/dist/movethewheels/hooks/useFreightRecoveryAction.d.ts +23 -0
- package/dist/movethewheels/hooks/useProcedureAction.d.ts +18 -0
- package/dist/movethewheels/hooks/useProcedureSelection.d.ts +51 -0
- package/dist/movethewheels/hooks/useReuseRecoveryAction.d.ts +18 -0
- package/dist/movethewheels/pages/ConsolidationPage.d.ts +1 -0
- package/dist/movethewheels/pages/ContainerConditionPage.d.ts +1 -0
- package/dist/movethewheels/pages/ContainersPage.d.ts +2 -0
- package/dist/movethewheels/pages/EmptyReusePage.d.ts +1 -0
- package/dist/movethewheels/pages/FreeTimePage.d.ts +1 -0
- package/dist/movethewheels/pages/FreightEstimatePage.d.ts +1 -0
- package/dist/movethewheels/pages/LogisticsProceduresPage.d.ts +1 -0
- package/dist/movethewheels/pages/PendingPickPage.d.ts +1 -0
- package/dist/movethewheels/pages/StockBindingPage.d.ts +1 -0
- package/dist/movethewheels/pages/StockObservationsPage.d.ts +1 -0
- package/dist/movethewheels/pages/TripUtilizationPage.d.ts +1 -0
- package/dist/movethewheels/utils/consolidationHistoryTarget.d.ts +12 -0
- package/dist/movethewheels/utils/consolidationInput.d.ts +15 -0
- package/dist/movethewheels/utils/consolidationLot.d.ts +3 -0
- package/dist/movethewheels/utils/consolidationPins.d.ts +20 -0
- package/dist/movethewheels/utils/consolidationRecovery.d.ts +5 -0
- package/dist/movethewheels/utils/consolidationReportHead.d.ts +5 -0
- package/dist/movethewheels/utils/freeTimeDate.d.ts +1 -0
- package/dist/movethewheels/utils/freightAcknowledgement.d.ts +2 -0
- package/dist/movethewheels/utils/freightDraft.d.ts +36 -0
- package/dist/movethewheels/utils/freightRecovery.d.ts +5 -0
- package/dist/movethewheels/utils/graphqlClient.d.ts +2 -1
- package/dist/movethewheels/utils/pendingPickDraft.d.ts +8 -0
- package/dist/movethewheels/utils/procedureInput.d.ts +18 -0
- package/dist/movethewheels/utils/procedureRecovery.d.ts +5 -0
- package/dist/movethewheels/utils/reuseAttempt.d.ts +7 -0
- package/dist/movethewheels/utils/reuseForm.d.ts +6 -0
- package/dist/movethewheels/utils/reuseRecovery.d.ts +26 -0
- package/dist/movethewheels/utils/stockBindingForm.d.ts +23 -0
- package/dist/movethewheels/utils/stockBindingLabels.d.ts +10 -0
- package/dist/movethewheels/utils/stockObservationForm.d.ts +5 -0
- package/dist/movethewheels/utils/tripDraftContext.d.ts +25 -0
- package/dist/movethewheels/utils/tripUtilizationForm.d.ts +6 -0
- package/dist/node_modules/@react-leaflet/core/lib/component.js +5 -5
- package/dist/node_modules/fast-equals/dist/es/index.js +87 -74
- package/dist/node_modules/leaflet/dist/leaflet-src.js +8 -5
- package/dist/node_modules/lodash/_Stack.js +2 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/clipboard-list.js +35 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/repeat-2.js +22 -0
- package/dist/node_modules/react-leaflet/lib/MapContainer.js +3 -3
- package/dist/node_modules/react-smooth/es6/Animate.js +2 -2
- package/dist/node_modules/recharts/es6/cartesian/Area.js +13 -13
- package/dist/node_modules/recharts/es6/cartesian/Bar.js +9 -9
- package/dist/node_modules/recharts/es6/cartesian/Brush.js +12 -12
- package/dist/node_modules/recharts/es6/cartesian/CartesianAxis.js +7 -7
- package/dist/node_modules/recharts/es6/cartesian/CartesianGrid.js +13 -13
- package/dist/node_modules/recharts/es6/cartesian/ErrorBar.js +4 -4
- package/dist/node_modules/recharts/es6/cartesian/Line.js +10 -10
- package/dist/node_modules/recharts/es6/cartesian/ReferenceArea.js +3 -3
- package/dist/node_modules/recharts/es6/cartesian/ReferenceDot.js +3 -3
- package/dist/node_modules/recharts/es6/cartesian/ReferenceLine.js +4 -4
- package/dist/node_modules/recharts/es6/cartesian/XAxis.js +3 -3
- package/dist/node_modules/recharts/es6/cartesian/YAxis.js +3 -3
- package/dist/node_modules/recharts/es6/chart/AccessibilityManager.js +1 -1
- package/dist/node_modules/recharts/es6/chart/generateCategoricalChart.js +22 -22
- package/dist/node_modules/recharts/es6/component/Cursor.js +1 -1
- package/dist/node_modules/recharts/es6/component/DefaultLegendContent.js +11 -11
- package/dist/node_modules/recharts/es6/component/DefaultTooltipContent.js +6 -6
- package/dist/node_modules/recharts/es6/component/Label.js +14 -14
- package/dist/node_modules/recharts/es6/component/LabelList.js +6 -6
- package/dist/node_modules/recharts/es6/component/Legend.js +5 -5
- package/dist/node_modules/recharts/es6/component/ResponsiveContainer.js +3 -3
- package/dist/node_modules/recharts/es6/component/Text.js +2 -2
- package/dist/node_modules/recharts/es6/component/Tooltip.js +3 -3
- package/dist/node_modules/recharts/es6/component/TooltipBoundingBox.js +2 -2
- package/dist/node_modules/recharts/es6/container/Layer.js +2 -2
- package/dist/node_modules/recharts/es6/container/Surface.js +2 -2
- package/dist/node_modules/recharts/es6/context/chartLayoutContext.js +2 -2
- package/dist/node_modules/recharts/es6/polar/Pie.js +13 -13
- package/dist/node_modules/recharts/es6/polar/PolarAngleAxis.js +8 -8
- package/dist/node_modules/recharts/es6/polar/PolarRadiusAxis.js +6 -6
- package/dist/node_modules/recharts/es6/shape/Cross.js +1 -1
- package/dist/node_modules/recharts/es6/shape/Curve.js +1 -1
- package/dist/node_modules/recharts/es6/shape/Dot.js +1 -1
- package/dist/node_modules/recharts/es6/shape/Polygon.js +4 -4
- package/dist/node_modules/recharts/es6/shape/Rectangle.js +4 -4
- package/dist/node_modules/recharts/es6/shape/Sector.js +1 -1
- package/dist/node_modules/recharts/es6/shape/Symbols.js +1 -1
- package/dist/node_modules/recharts/es6/shape/Trapezoid.js +4 -4
- package/dist/node_modules/recharts/es6/util/ActiveShapeUtils.js +9 -9
- package/dist/node_modules/recharts/es6/util/BarUtils.js +1 -1
- package/dist/node_modules/recharts/es6/util/CartesianUtils.js +1 -1
- package/dist/node_modules/recharts/es6/util/PolarUtils.js +1 -1
- package/dist/node_modules/recharts/es6/util/ReactUtils.js +2 -2
- package/dist/node_modules/recharts/es6/util/ReduceCSSCalc.js +1 -1
- package/dist/node_modules/recharts/es6/util/types.js +1 -1
- package/dist/node_modules/{react-is → recharts/node_modules/react-is}/cjs/react-is.development.js +2 -2
- package/dist/node_modules/{react-is → recharts/node_modules/react-is}/cjs/react-is.production.min.js +2 -2
- package/dist/node_modules/{react-is → recharts/node_modules/react-is}/index.js +2 -2
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +97 -18
- package/dist/node_modules/zustand/esm/middleware.js +2 -2
- package/dist/pages/ConsolidationPage.js +76 -0
- package/dist/pages/ContainerConditionPage.js +972 -0
- package/dist/pages/ContainersPage.js +522 -0
- package/dist/pages/EmptyReusePage.js +777 -0
- package/dist/pages/FreeTimePage.js +657 -0
- package/dist/pages/FreightEstimatePage.js +284 -0
- package/dist/pages/LogisticsProceduresPage.js +100 -0
- package/dist/pages/PendingPickPage.js +155 -0
- package/dist/pages/StockBindingPage.js +236 -0
- package/dist/pages/StockObservationsPage.js +168 -0
- package/dist/pages/TripUtilizationPage.js +227 -0
- package/dist/src/generated/consolidation-operations.js +505 -0
- package/dist/src/generated/container-condition-operations.js +208 -0
- package/dist/src/generated/container-operations.js +101 -0
- package/dist/src/generated/empty-reuse-operations.js +749 -0
- package/dist/src/generated/free-time-operations.js +235 -0
- package/dist/src/generated/freight-cost-operations.js +325 -0
- package/dist/src/generated/logistics-procedure-operations.js +362 -0
- package/dist/src/generated/pending-pick-operations.js +1128 -0
- package/dist/src/generated/stock-binding-operations.js +175 -0
- package/dist/src/generated/stock-observation-operations.js +93 -0
- package/dist/src/generated/trip-utilization-operations.js +140 -0
- package/dist/src/generated/wspace-operations.js +708 -0
- package/dist/utils/consolidationHistoryTarget.js +27 -0
- package/dist/utils/consolidationInput.js +21 -0
- package/dist/utils/consolidationLot.js +29 -0
- package/dist/utils/consolidationPins.js +13 -0
- package/dist/utils/consolidationRecovery.js +40 -0
- package/dist/utils/consolidationReportHead.js +18 -0
- package/dist/utils/freeTimeDate.js +26 -0
- package/dist/utils/freightAcknowledgement.js +8 -0
- package/dist/utils/freightDraft.js +125 -0
- package/dist/utils/freightRecovery.js +36 -0
- package/dist/utils/graphqlClient.js +28 -28
- package/dist/utils/pendingPickDraft.js +46 -0
- package/dist/utils/procedureInput.js +43 -0
- package/dist/utils/procedureRecovery.js +42 -0
- package/dist/utils/reuseAttempt.js +20 -0
- package/dist/utils/reuseForm.js +25 -0
- package/dist/utils/reuseRecovery.js +71 -0
- package/dist/utils/stockBindingForm.js +142 -0
- package/dist/utils/stockBindingLabels.js +23 -0
- package/dist/utils/stockObservationForm.js +55 -0
- package/dist/utils/tripDraftContext.js +19 -0
- package/dist/utils/tripUtilizationForm.js +60 -0
- package/package.json +20 -5
- package/src/generated/consolidation-operations.ts +1138 -0
- package/src/generated/container-condition-operations.ts +771 -0
- package/src/generated/container-operations.ts +376 -0
- package/src/generated/empty-reuse-operations.ts +1648 -0
- package/src/generated/free-time-operations.ts +814 -0
- package/src/generated/freight-cost-operations.ts +753 -0
- package/src/generated/logistics-procedure-operations.ts +1047 -0
- package/src/generated/pending-pick-operations.ts +1508 -0
- package/src/generated/stock-binding-operations.ts +631 -0
- package/src/generated/stock-observation-operations.ts +373 -0
- package/src/generated/trip-utilization-operations.ts +500 -0
- package/src/generated/wspace-operations.ts +116 -0
- package/src/movethewheels/MoveTheWheelsRoot.tsx +79 -0
- package/src/movethewheels/MoveTheWheelsRoutes.tsx +22 -0
- package/src/movethewheels/components/ContainerEvidencePicker.tsx +146 -0
- package/src/movethewheels/components/FreeTimeAgreementForm.tsx +483 -0
- package/src/movethewheels/components/ReturnInstructionForm.tsx +102 -0
- package/src/movethewheels/components/ReuseControls.tsx +138 -0
- package/src/movethewheels/components/ReusePermissionForm.tsx +123 -0
- package/src/movethewheels/components/ReuseProposalForm.tsx +484 -0
- package/src/movethewheels/components/ReuseSourceFields.tsx +80 -0
- package/src/movethewheels/components/consolidation/ConsolidationHistory.tsx +159 -0
- package/src/movethewheels/components/consolidation/ConsolidationLotEditor.tsx +144 -0
- package/src/movethewheels/components/consolidation/ConsolidationManifestWorkbench.tsx +168 -0
- package/src/movethewheels/components/consolidation/ConsolidationPlanForm.tsx +185 -0
- package/src/movethewheels/components/consolidation/ConsolidationPlanWorkbench.tsx +395 -0
- package/src/movethewheels/components/consolidation/ConsolidationReportForm.tsx +124 -0
- package/src/movethewheels/components/consolidation/ConsolidationReportsWorkbench.tsx +233 -0
- package/src/movethewheels/components/consolidation/ConsolidationSummary.tsx +84 -0
- package/src/movethewheels/components/consolidation/OriginalConsolidationHistory.tsx +133 -0
- package/src/movethewheels/components/freight-cost/FreightDraftForm.tsx +224 -0
- package/src/movethewheels/components/freight-cost/FreightFields.tsx +91 -0
- package/src/movethewheels/components/freight-cost/FreightFxEditor.tsx +98 -0
- package/src/movethewheels/components/freight-cost/FreightHistory.tsx +91 -0
- package/src/movethewheels/components/freight-cost/FreightLineEditor.tsx +192 -0
- package/src/movethewheels/components/freight-cost/FreightScopeEditor.tsx +64 -0
- package/src/movethewheels/components/freight-cost/FreightTotals.tsx +68 -0
- package/src/movethewheels/components/logistics-procedure/ProcedureDecisionForm.tsx +204 -0
- package/src/movethewheels/components/logistics-procedure/ProcedureFields.tsx +43 -0
- package/src/movethewheels/components/logistics-procedure/ProcedureHistory.tsx +102 -0
- package/src/movethewheels/components/logistics-procedure/ProcedurePolicyForm.tsx +226 -0
- package/src/movethewheels/components/logistics-procedure/ProcedurePolicyWorkbench.tsx +174 -0
- package/src/movethewheels/components/logistics-procedure/ProcedureReviewWorkbench.tsx +278 -0
- package/src/movethewheels/components/logistics-procedure/ProcedureRunWorkbench.tsx +292 -0
- package/src/movethewheels/components/logistics-procedure/ProcedureSubjectPicker.tsx +111 -0
- package/src/movethewheels/components/pending-pick/PendingPickDraft.tsx +82 -0
- package/src/movethewheels/components/pending-pick/PendingPickHistory.tsx +93 -0
- package/src/movethewheels/components/pending-pick/PickCapture.tsx +70 -0
- package/src/movethewheels/components/pending-pick/PickLineSelection.tsx +130 -0
- package/src/movethewheels/components/stock-binding/StockAssessmentDraft.tsx +52 -0
- package/src/movethewheels/components/stock-binding/StockAssessmentHistory.tsx +56 -0
- package/src/movethewheels/components/stock-binding/StockAssessmentSummary.tsx +108 -0
- package/src/movethewheels/components/stock-binding/StockFactForm.tsx +186 -0
- package/src/movethewheels/components/stock-observation/StockIssueForm.tsx +103 -0
- package/src/movethewheels/components/stock-observation/StockIssueHistory.tsx +96 -0
- package/src/movethewheels/components/stock-observation/StockIssueReadPanel.tsx +72 -0
- package/src/movethewheels/components/trip-utilization/TripReportForm.tsx +116 -0
- package/src/movethewheels/components/trip-utilization/TripReportHistory.tsx +51 -0
- package/src/movethewheels/components/trip-utilization/TripReportSummary.tsx +127 -0
- package/src/movethewheels/components/trip-utilization/TripSegmentFields.tsx +118 -0
- package/src/movethewheels/hooks/useConsolidationAction.ts +196 -0
- package/src/movethewheels/hooks/useContainerCondition.ts +129 -0
- package/src/movethewheels/hooks/useContainerLifecycle.ts +291 -0
- package/src/movethewheels/hooks/useEmptyReuseAction.ts +72 -0
- package/src/movethewheels/hooks/useFreightRecoveryAction.ts +201 -0
- package/src/movethewheels/hooks/useMultiModalShipments.ts +2 -1
- package/src/movethewheels/hooks/useProcedureAction.ts +196 -0
- package/src/movethewheels/hooks/useProcedureSelection.ts +75 -0
- package/src/movethewheels/hooks/useReuseRecoveryAction.ts +192 -0
- package/src/movethewheels/pages/ConsolidationPage.tsx +70 -0
- package/src/movethewheels/pages/ContainerConditionPage.tsx +959 -0
- package/src/movethewheels/pages/ContainersPage.tsx +490 -0
- package/src/movethewheels/pages/EmptyReusePage.tsx +823 -0
- package/src/movethewheels/pages/FreeTimePage.tsx +720 -0
- package/src/movethewheels/pages/FreightEstimatePage.tsx +353 -0
- package/src/movethewheels/pages/LogisticsProceduresPage.tsx +86 -0
- package/src/movethewheels/pages/PendingPickPage.tsx +226 -0
- package/src/movethewheels/pages/StockBindingPage.tsx +299 -0
- package/src/movethewheels/pages/StockObservationsPage.tsx +181 -0
- package/src/movethewheels/pages/TripUtilizationPage.tsx +315 -0
- package/src/movethewheels/utils/consolidationHistoryTarget.ts +39 -0
- package/src/movethewheels/utils/consolidationInput.ts +70 -0
- package/src/movethewheels/utils/consolidationLot.ts +24 -0
- package/src/movethewheels/utils/consolidationPins.ts +52 -0
- package/src/movethewheels/utils/consolidationRecovery.ts +88 -0
- package/src/movethewheels/utils/consolidationReportHead.ts +29 -0
- package/src/movethewheels/utils/freeTimeDate.ts +31 -0
- package/src/movethewheels/utils/freightAcknowledgement.ts +31 -0
- package/src/movethewheels/utils/freightDraft.ts +170 -0
- package/src/movethewheels/utils/freightRecovery.ts +79 -0
- package/src/movethewheels/utils/graphqlClient.ts +14 -5
- package/src/movethewheels/utils/pendingPickDraft.ts +61 -0
- package/src/movethewheels/utils/procedureInput.ts +98 -0
- package/src/movethewheels/utils/procedureRecovery.ts +92 -0
- package/src/movethewheels/utils/reuseAttempt.ts +29 -0
- package/src/movethewheels/utils/reuseForm.ts +30 -0
- package/src/movethewheels/utils/reuseRecovery.ts +151 -0
- package/src/movethewheels/utils/stockBindingForm.ts +209 -0
- package/src/movethewheels/utils/stockBindingLabels.ts +41 -0
- package/src/movethewheels/utils/stockObservationForm.ts +73 -0
- package/src/movethewheels/utils/tripDraftContext.ts +61 -0
- package/src/movethewheels/utils/tripUtilizationForm.ts +105 -0
- package/src/operations/condition/container-condition.graphql +41 -0
- package/src/operations/consolidation/consolidation.graphql +490 -0
- package/src/operations/container/container-lifecycle.graphql +80 -0
- package/src/operations/empty-reuse/empty-reuse.graphql +737 -0
- package/src/operations/free-time/free-time.graphql +47 -0
- package/src/operations/freight-cost/freight.graphql +6 -0
- package/src/operations/logistics-procedure/procedure.graphql +15 -0
- package/src/operations/pending-pick/pending-pick.graphql +1122 -0
- package/src/operations/stock-binding/stock-binding.graphql +160 -0
- package/src/operations/stock-observation/stock-observation.graphql +20 -0
- package/src/operations/trip-utilization/trip-utilization.graphql +126 -0
- package/src/operations/wspace/container-evidence.graphql +6 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { localProcedureInstant as e, object as t } from "./procedureInput.js";
|
|
2
|
+
//#region src/movethewheels/utils/consolidationInput.ts
|
|
3
|
+
var n = e;
|
|
4
|
+
function r(e) {
|
|
5
|
+
return e.trim() || null;
|
|
6
|
+
}
|
|
7
|
+
function i(e) {
|
|
8
|
+
let t = e.trim();
|
|
9
|
+
if (!t) return null;
|
|
10
|
+
if (!/^(?:0|[1-9]\d{0,19})(?:\.\d{1,6})?$/.test(t)) throw Error("Use a nonnegative decimal with at most six decimal places.");
|
|
11
|
+
return t;
|
|
12
|
+
}
|
|
13
|
+
function a(e, t) {
|
|
14
|
+
return e?.id === t?.id && e?.version === t?.version;
|
|
15
|
+
}
|
|
16
|
+
function o(e, n, r) {
|
|
17
|
+
let i = e["facts" in n ? "saveMtwConsolidationPlan" : "kind" in n ? "recordMtwConsolidationObservation" : "saveMtwConsolidationManifest"];
|
|
18
|
+
return !t(i) || typeof i.id != "string" || !i.id.trim() || i.createdBy !== r || typeof n.expectedVersion != "number" || !Number.isInteger(n.expectedVersion) || n.expectedVersion < 0 || i.version !== n.expectedVersion + 1 || i.previousVersionId !== n.expectedPreviousVersionId ? !1 : "facts" in n ? i.shipmentId === n.shipmentId && i.cycleId === n.cycleId && i.planReference === n.planReference && t(i.sourceCapture) && i.sourceCapture.shipmentUpdatedAt === n.expectedShipmentUpdatedAt && i.sourceCapture.cycleVersion === n.expectedCycleVersion : "kind" in n ? i.planId === n.planId && i.lotId === n.lotId && i.kind === n.kind && i.issueReference === n.issueReference && i.reportedQuantity === n.reportedQuantity && Number.isInteger(i.receiptSequence) : i.planId === n.planId && i.observationSequence === n.expectedObservationSequence && t(i.snapshot) && i.snapshot.planId === n.planId && i.snapshot.observationSequence === n.expectedObservationSequence;
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { o as consolidationAcknowledgement, n as consolidationInstant, i as consolidationQuantity, r as nullableText, a as sameConsolidationPin };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region src/movethewheels/utils/consolidationLot.ts
|
|
2
|
+
function e() {
|
|
3
|
+
return {
|
|
4
|
+
id: crypto.randomUUID(),
|
|
5
|
+
supplierReference: "",
|
|
6
|
+
lotReference: "",
|
|
7
|
+
consignmentReference: "",
|
|
8
|
+
sourceRevision: "",
|
|
9
|
+
quantityBasis: "UNKNOWN",
|
|
10
|
+
unitReference: null,
|
|
11
|
+
unitRevision: null,
|
|
12
|
+
balanceRevision: null,
|
|
13
|
+
reportedAvailableQuantity: null,
|
|
14
|
+
plannedQuantity: null,
|
|
15
|
+
grossKg: null,
|
|
16
|
+
cubeM3: null,
|
|
17
|
+
originReference: null,
|
|
18
|
+
destinationReference: null,
|
|
19
|
+
importerReference: null,
|
|
20
|
+
transportReference: null,
|
|
21
|
+
documentReference: null,
|
|
22
|
+
source: {
|
|
23
|
+
reference: null,
|
|
24
|
+
revision: null
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { e as emptyConsolidationLot };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { sameConsolidationPin as e } from "./consolidationInput.js";
|
|
2
|
+
//#region src/movethewheels/utils/consolidationPins.ts
|
|
3
|
+
function t(e, t, n) {
|
|
4
|
+
return !!t && !!n && t.id === e.shipmentId && t.updatedAt === e.shipmentUpdatedAt && n.id === e.cycleId && n.containerId === e.containerId && n.shipmentId === e.shipmentId && n.version === e.cycleVersion && n.status === "OPEN";
|
|
5
|
+
}
|
|
6
|
+
function n(t, n) {
|
|
7
|
+
if (!e(t, n)) throw Error("Recorded history changed. Refresh and review before opening a new form.");
|
|
8
|
+
}
|
|
9
|
+
function r(e, t, n) {
|
|
10
|
+
return t?.id === e && !n.some((t) => t.id === e) ? t : null;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { n as assertConsolidationPredecessor, t as matchesConsolidationContext, r as offPageConsolidationContainer };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { RecordConsolidationObservationDocument as e, SaveConsolidationManifestDocument as t, SaveConsolidationPlanDocument as n } from "../src/generated/consolidation-operations.js";
|
|
2
|
+
import { print as r } from "graphql";
|
|
3
|
+
//#region src/movethewheels/utils/consolidationRecovery.ts
|
|
4
|
+
var i = "movethewheels.consolidation.unresolved.v1";
|
|
5
|
+
function a(i) {
|
|
6
|
+
if (!i || new TextEncoder().encode(i).byteLength > 2e5) return null;
|
|
7
|
+
try {
|
|
8
|
+
let a = JSON.parse(i);
|
|
9
|
+
if (typeof a != "object" || !a || !("version" in a) || a.version !== 1 || !("scope" in a) || !("input" in a) || !("operation" in a) || typeof a.operation != "string" || ![
|
|
10
|
+
n,
|
|
11
|
+
e,
|
|
12
|
+
t
|
|
13
|
+
].some((e) => r(e) === a.operation) || !("key" in a) || typeof a.key != "string" || !a.key || a.key.length > 200 || !("success" in a) || typeof a.success != "string" || a.success.length > 500 || typeof a.input != "object" || a.input === null || Array.isArray(a.input) || typeof a.scope != "object" || a.scope === null) return null;
|
|
14
|
+
let o = a.scope;
|
|
15
|
+
return !("actorId" in o) || typeof o.actorId != "string" || !o.actorId || !("workspaceId" in o) || typeof o.workspaceId != "string" || !o.workspaceId || !("tenantId" in o) || typeof o.tenantId != "string" || !("organizationId" in o) || typeof o.organizationId != "string" || !o.organizationId || !("gateway" in o) || typeof o.gateway != "string" || !("projectId" in o) || o.projectId !== null && typeof o.projectId != "string" ? null : {
|
|
16
|
+
version: 1,
|
|
17
|
+
scope: {
|
|
18
|
+
actorId: o.actorId,
|
|
19
|
+
workspaceId: o.workspaceId,
|
|
20
|
+
tenantId: o.tenantId,
|
|
21
|
+
organizationId: o.organizationId,
|
|
22
|
+
gateway: o.gateway,
|
|
23
|
+
projectId: o.projectId
|
|
24
|
+
},
|
|
25
|
+
operation: a.operation,
|
|
26
|
+
input: structuredClone(a.input),
|
|
27
|
+
key: a.key,
|
|
28
|
+
success: a.success
|
|
29
|
+
};
|
|
30
|
+
} catch {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function o(e) {
|
|
35
|
+
let t = JSON.stringify(e);
|
|
36
|
+
if (!a(t)) throw Error("Cannot safely retain this consolidation request. Nothing was sent.");
|
|
37
|
+
return t;
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { i as CONSOLIDATION_RECOVERY_STORAGE, a as decodeConsolidationRecovery, o as encodeConsolidationRecovery };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ConsolidationObservationsDocument as e } from "../src/generated/consolidation-operations.js";
|
|
2
|
+
//#region src/movethewheels/utils/consolidationReportHead.ts
|
|
3
|
+
async function t(t, n, r, i) {
|
|
4
|
+
for (let a = 0; a < 500; a += 25) {
|
|
5
|
+
let o = await t(e, {
|
|
6
|
+
planId: n,
|
|
7
|
+
pagination: {
|
|
8
|
+
limit: 25,
|
|
9
|
+
offset: a
|
|
10
|
+
}
|
|
11
|
+
}), s = o.mtwConsolidationObservationPage.items.find((e) => e.lotId === r && e.kind === i);
|
|
12
|
+
if (s) return s;
|
|
13
|
+
if (!o.mtwConsolidationObservationPage.hasMore) return null;
|
|
14
|
+
}
|
|
15
|
+
throw Error("History exceeds the supported review window. No report will be sent.");
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { t as findConsolidationReportHead };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//#region src/movethewheels/utils/freeTimeDate.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
let t = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.\d{1,3})?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/i.exec(e);
|
|
4
|
+
if (!t) throw Error("Use an ISO date and time with seconds and Z or an explicit timezone offset.");
|
|
5
|
+
let n = Number(t[1]), r = Number(t[2]), i = Number(t[3]), a = [
|
|
6
|
+
31,
|
|
7
|
+
n % 4 == 0 && (n % 100 != 0 || n % 400 == 0) ? 29 : 28,
|
|
8
|
+
31,
|
|
9
|
+
30,
|
|
10
|
+
31,
|
|
11
|
+
30,
|
|
12
|
+
31,
|
|
13
|
+
31,
|
|
14
|
+
30,
|
|
15
|
+
31,
|
|
16
|
+
30,
|
|
17
|
+
31
|
|
18
|
+
];
|
|
19
|
+
if (r < 1 || r > 12 || i < 1 || i > (a[r - 1] ?? 0) || Number(t[4]) > 23 || Number(t[5]) > 59 || Number(t[6]) > 59) throw Error("Enter a real calendar date and time; invalid dates are not moved to another day.");
|
|
20
|
+
if (!/(?:Z|[+-]\d{2}:\d{2})$/i.test(e)) throw Error("Include Z or an explicit timezone offset.");
|
|
21
|
+
let o = new Date(e);
|
|
22
|
+
if (!Number.isFinite(o.getTime())) throw Error("Enter a valid time with an explicit timezone.");
|
|
23
|
+
return o.toISOString();
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { e as freeTimeIso };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#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;
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { e as matchesFreightAcknowledgement };
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
//#region src/movethewheels/utils/freightDraft.ts
|
|
2
|
+
var e = [
|
|
3
|
+
"BASE_FREIGHT",
|
|
4
|
+
"FUEL",
|
|
5
|
+
"PRE_CARRIAGE",
|
|
6
|
+
"ON_CARRIAGE",
|
|
7
|
+
"ORIGIN_HANDLING",
|
|
8
|
+
"DESTINATION_HANDLING",
|
|
9
|
+
"INSURANCE",
|
|
10
|
+
"ACCESSORIAL",
|
|
11
|
+
"TAX_ESTIMATE",
|
|
12
|
+
"DUTY_ESTIMATE",
|
|
13
|
+
"BROKER",
|
|
14
|
+
"FREE_TIME_EXPOSURE",
|
|
15
|
+
"OTHER"
|
|
16
|
+
], t = (e) => e.toLowerCase().replaceAll("_", " ").replace(/^./, (e) => e.toUpperCase()), n = (e) => e.trim() || null;
|
|
17
|
+
function r(e, t) {
|
|
18
|
+
if (!e.trim()) return null;
|
|
19
|
+
if (!/^(0|[1-9][0-9]{0,19})(\.[0-9]+)?$/.test(e) || !Number.isInteger(t) || t < 0 || t > 4) throw Error("Use a nonnegative decimal amount in the stated currency convention.");
|
|
20
|
+
let [n, r = ""] = e.split(".");
|
|
21
|
+
if (r.length > t) throw Error("The sourced amount has more decimal places than the recorded currency convention.");
|
|
22
|
+
return (BigInt(n) * 10n ** BigInt(t) + BigInt(r.padEnd(t, "0") || "0")).toString();
|
|
23
|
+
}
|
|
24
|
+
function i(e) {
|
|
25
|
+
return typeof e == "string" && /^(0|[1-9][0-9]{0,19})(\.[0-9]{1,18})?$/.test(e) && BigInt(e.replace(".", "")) === 0n;
|
|
26
|
+
}
|
|
27
|
+
function a(e, t) {
|
|
28
|
+
if (e == null) return "Unknown";
|
|
29
|
+
let n = BigInt(e).toString().padStart(t + 1, "0");
|
|
30
|
+
return t ? `${n.slice(0, -t)}.${n.slice(-t)}` : n;
|
|
31
|
+
}
|
|
32
|
+
function o(e) {
|
|
33
|
+
let t = new Date(e);
|
|
34
|
+
if (!e || !Number.isFinite(t.getTime())) throw Error("Choose a valid date and time.");
|
|
35
|
+
let n = t.toISOString();
|
|
36
|
+
if (!/^[0-9]{4}-/.test(n)) throw Error("Use a four-digit year.");
|
|
37
|
+
return n;
|
|
38
|
+
}
|
|
39
|
+
function s(e) {
|
|
40
|
+
let t = new Date(e);
|
|
41
|
+
return (/* @__PURE__ */ new Date(t.getTime() - t.getTimezoneOffset() * 6e4)).toISOString().slice(0, 19);
|
|
42
|
+
}
|
|
43
|
+
function c() {
|
|
44
|
+
return {
|
|
45
|
+
id: crypto.randomUUID(),
|
|
46
|
+
category: "BASE_FREIGHT",
|
|
47
|
+
description: "Base freight",
|
|
48
|
+
payerReference: null,
|
|
49
|
+
payerLabel: null,
|
|
50
|
+
disposition: "UNKNOWN",
|
|
51
|
+
inclusionParentLineId: null,
|
|
52
|
+
currency: {
|
|
53
|
+
code: "USD",
|
|
54
|
+
minorUnitDigits: 2
|
|
55
|
+
},
|
|
56
|
+
amountBasis: "UNKNOWN",
|
|
57
|
+
quantity: null,
|
|
58
|
+
unit: null,
|
|
59
|
+
unitRateMajor: null,
|
|
60
|
+
amountMinor: null,
|
|
61
|
+
zeroReason: null,
|
|
62
|
+
sourceReference: null,
|
|
63
|
+
sourceRevision: null
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function l() {
|
|
67
|
+
return {
|
|
68
|
+
kind: "ESTIMATE",
|
|
69
|
+
title: "Freight cost estimate",
|
|
70
|
+
commercialScope: "",
|
|
71
|
+
sourceReference: "",
|
|
72
|
+
sourceRevision: "",
|
|
73
|
+
pricingAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
74
|
+
quotedAt: null,
|
|
75
|
+
validFrom: null,
|
|
76
|
+
validUntil: null,
|
|
77
|
+
reportingCurrency: null,
|
|
78
|
+
rounding: "HALF_UP_LINE",
|
|
79
|
+
lines: [c()],
|
|
80
|
+
requirements: e.map((e) => ({
|
|
81
|
+
category: e,
|
|
82
|
+
status: "UNKNOWN",
|
|
83
|
+
reason: null,
|
|
84
|
+
sourceReference: null,
|
|
85
|
+
sourceRevision: null
|
|
86
|
+
})),
|
|
87
|
+
fx: []
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
function u() {
|
|
91
|
+
let e = (/* @__PURE__ */ new Date()).toISOString();
|
|
92
|
+
return {
|
|
93
|
+
fromCurrency: {
|
|
94
|
+
code: "USD",
|
|
95
|
+
minorUnitDigits: 2
|
|
96
|
+
},
|
|
97
|
+
toCurrency: {
|
|
98
|
+
code: "EUR",
|
|
99
|
+
minorUnitDigits: 2
|
|
100
|
+
},
|
|
101
|
+
rate: "",
|
|
102
|
+
observedAt: e,
|
|
103
|
+
effectiveFrom: e,
|
|
104
|
+
effectiveUntil: e,
|
|
105
|
+
sourceReference: "",
|
|
106
|
+
sourceRevision: ""
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
function d(e, t, n) {
|
|
110
|
+
return t?.id === e.shipmentId && t.updatedAt === e.shipmentUpdatedAt && (n?.id ?? null) === e.previousId && (n?.version ?? 0) === e.version;
|
|
111
|
+
}
|
|
112
|
+
function f(e, t, n, r, i) {
|
|
113
|
+
if (!d(e, t, n)) throw Error("The shipment or cost history changed. Refresh and review before starting a new draft.");
|
|
114
|
+
return {
|
|
115
|
+
shipmentId: e.shipmentId,
|
|
116
|
+
estimateReference: e.estimateReference,
|
|
117
|
+
expectedShipmentUpdatedAt: e.shipmentUpdatedAt,
|
|
118
|
+
expectedPreviousVersionId: e.previousId,
|
|
119
|
+
expectedVersion: e.version,
|
|
120
|
+
facts: structuredClone(r),
|
|
121
|
+
evidence: structuredClone(i)
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
//#endregion
|
|
125
|
+
export { r as fixedFreightMinor, e as freightCategories, o as freightInstant, t as freightLabel, s as freightLocalTime, a as freightMoney, n as freightNullable, d as freightPinMatches, f as freightSaveInput, i as isFreightDecimalZero, l as newFreightFacts, u as newFreightFx, c as newFreightLine };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { SaveFreightCostsDocument as e } from "../src/generated/freight-cost-operations.js";
|
|
2
|
+
import { print as t } from "graphql";
|
|
3
|
+
//#region src/movethewheels/utils/freightRecovery.ts
|
|
4
|
+
var n = "movethewheels.freight.unresolved.v1";
|
|
5
|
+
function r(n) {
|
|
6
|
+
if (!n || new TextEncoder().encode(n).byteLength > 2e5) return null;
|
|
7
|
+
try {
|
|
8
|
+
let r = JSON.parse(n);
|
|
9
|
+
if (typeof r != "object" || !r || !("version" in r) || r.version !== 1 || !("scope" in r) || !("input" in r) || !("operation" in r) || r.operation !== t(e) || !("key" in r) || typeof r.key != "string" || !r.key || r.key.length > 200 || !("success" in r) || typeof r.success != "string" || r.success.length > 500 || typeof r.input != "object" || r.input === null || Array.isArray(r.input) || typeof r.scope != "object" || r.scope === null) return null;
|
|
10
|
+
let i = r.scope;
|
|
11
|
+
return !("actorId" in i) || typeof i.actorId != "string" || !i.actorId || !("workspaceId" in i) || typeof i.workspaceId != "string" || !i.workspaceId || !("tenantId" in i) || typeof i.tenantId != "string" || !("organizationId" in i) || typeof i.organizationId != "string" || !i.organizationId || !("gateway" in i) || typeof i.gateway != "string" || !("projectId" in i) || i.projectId !== null && typeof i.projectId != "string" ? null : {
|
|
12
|
+
version: 1,
|
|
13
|
+
scope: {
|
|
14
|
+
actorId: i.actorId,
|
|
15
|
+
workspaceId: i.workspaceId,
|
|
16
|
+
tenantId: i.tenantId,
|
|
17
|
+
organizationId: i.organizationId,
|
|
18
|
+
gateway: i.gateway,
|
|
19
|
+
projectId: i.projectId
|
|
20
|
+
},
|
|
21
|
+
operation: r.operation,
|
|
22
|
+
input: structuredClone(r.input),
|
|
23
|
+
key: r.key,
|
|
24
|
+
success: r.success
|
|
25
|
+
};
|
|
26
|
+
} catch {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function i(e) {
|
|
31
|
+
let t = JSON.stringify(e);
|
|
32
|
+
if (!r(t)) throw Error("Cannot safely retain this freight request. Nothing was sent.");
|
|
33
|
+
return t;
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { n as FREIGHT_RECOVERY_STORAGE, r as decodeFreightRecovery, i as encodeFreightRecovery };
|
|
@@ -22,22 +22,22 @@ function d() {
|
|
|
22
22
|
let e = l.shift();
|
|
23
23
|
e ? e() : --c;
|
|
24
24
|
}
|
|
25
|
-
async function f(
|
|
26
|
-
let
|
|
25
|
+
async function f(n, r, i, a = "RETRY_TRANSIENT") {
|
|
26
|
+
let o = e(n.apiGatewayUrl), s = {
|
|
27
27
|
"content-type": "application/json",
|
|
28
|
-
...
|
|
29
|
-
...
|
|
30
|
-
...
|
|
31
|
-
...
|
|
32
|
-
...
|
|
33
|
-
...
|
|
34
|
-
},
|
|
35
|
-
query:
|
|
36
|
-
variables:
|
|
28
|
+
...n.authToken ? { Authorization: `Bearer ${n.authToken}` } : {},
|
|
29
|
+
...n.workspaceToken ? { "X-Workspace-Authorization": `Bearer ${n.workspaceToken}` } : {},
|
|
30
|
+
...n.workspaceId ? { "x-workspace-id": n.workspaceId } : {},
|
|
31
|
+
...n.tenantId ? { "x-tenant-id": n.tenantId } : {},
|
|
32
|
+
...n.actorId ? { "x-actor-id": n.actorId } : {},
|
|
33
|
+
...n.actorId ? { "x-actor-type": "user" } : {}
|
|
34
|
+
}, c = JSON.stringify({
|
|
35
|
+
query: r,
|
|
36
|
+
variables: i
|
|
37
37
|
});
|
|
38
38
|
await u();
|
|
39
39
|
try {
|
|
40
|
-
return await m(
|
|
40
|
+
return await m(o, s, c, a === "SINGLE_ATTEMPT" ? 0 : t);
|
|
41
41
|
} finally {
|
|
42
42
|
d();
|
|
43
43
|
}
|
|
@@ -50,35 +50,35 @@ async function p(e) {
|
|
|
50
50
|
return null;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
async function m(e, s, c) {
|
|
53
|
+
async function m(e, t, s, c) {
|
|
54
54
|
let l = /* @__PURE__ */ Error("GraphQL request failed");
|
|
55
|
-
for (let u = 0; u <=
|
|
56
|
-
let d = u <
|
|
55
|
+
for (let u = 0; u <= c; u += 1) {
|
|
56
|
+
let d = u < c;
|
|
57
57
|
u > 0 && await o(Math.min(250 * 2 ** (u - 1), 2e3) + Math.floor(Math.random() * 150));
|
|
58
58
|
let f = new AbortController(), m = setTimeout(() => f.abort(), n);
|
|
59
59
|
try {
|
|
60
|
-
let
|
|
60
|
+
let n = await fetch(e, {
|
|
61
61
|
method: "POST",
|
|
62
|
-
headers:
|
|
63
|
-
body:
|
|
62
|
+
headers: t,
|
|
63
|
+
body: s,
|
|
64
64
|
signal: f.signal
|
|
65
65
|
});
|
|
66
|
-
if (!
|
|
67
|
-
let e = i(
|
|
68
|
-
if (l = Error(e ?? `GraphQL request failed with status ${
|
|
66
|
+
if (!n.ok) {
|
|
67
|
+
let e = i(n.status) ? null : await p(n);
|
|
68
|
+
if (l = Error(e ?? `GraphQL request failed with status ${n.status}`), d && i(n.status)) continue;
|
|
69
69
|
throw l;
|
|
70
70
|
}
|
|
71
|
-
let
|
|
72
|
-
if (
|
|
73
|
-
let e =
|
|
74
|
-
if (l = Error(e), d &&
|
|
71
|
+
let a = await n.json();
|
|
72
|
+
if (a.errors?.length) {
|
|
73
|
+
let e = a.errors.map((e) => e.message ?? "Unknown GraphQL error").join("; ");
|
|
74
|
+
if (l = Error(e), d && a.errors.some((e) => r(e.message))) continue;
|
|
75
75
|
throw l;
|
|
76
76
|
}
|
|
77
|
-
if (!
|
|
77
|
+
if (!a.data) {
|
|
78
78
|
if (l = /* @__PURE__ */ Error("GraphQL response did not include data"), d) continue;
|
|
79
79
|
throw l;
|
|
80
80
|
}
|
|
81
|
-
return
|
|
81
|
+
return a.data;
|
|
82
82
|
} catch (e) {
|
|
83
83
|
let t = a(e), i = t ? `GraphQL request timed out after ${n}ms` : e instanceof Error ? e.message : String(e);
|
|
84
84
|
if (l = !t && e instanceof Error ? e : Error(i), d && (t || r(i) || e instanceof TypeError)) continue;
|
|
@@ -90,4 +90,4 @@ async function m(e, s, c) {
|
|
|
90
90
|
throw l;
|
|
91
91
|
}
|
|
92
92
|
//#endregion
|
|
93
|
-
export { f as executeGraphQL };
|
|
93
|
+
export { f as executeGraphQL, e as resolveGraphqlUrl };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
//#region src/movethewheels/utils/pendingPickDraft.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
return {
|
|
4
|
+
inventoryItemId: e.inventoryItemId,
|
|
5
|
+
expectedCargoItemId: e.cargoItemId,
|
|
6
|
+
expectedWarehouseId: e.warehouseId,
|
|
7
|
+
expectedLocationId: e.locationId,
|
|
8
|
+
expectedInventoryUpdatedAt: e.inventoryUpdatedAt,
|
|
9
|
+
expectedCargoUpdatedAt: e.cargoUpdatedAt,
|
|
10
|
+
expectedWarehouseUpdatedAt: e.warehouseUpdatedAt,
|
|
11
|
+
expectedLocationUpdatedAt: e.locationUpdatedAt,
|
|
12
|
+
expectedCompositionEpoch: e.compositionEpoch,
|
|
13
|
+
expectedRecordedAssessmentId: e.recordedProfile?.id ?? null,
|
|
14
|
+
expectedApplicableAssessmentId: e.applicableProfile?.id ?? null,
|
|
15
|
+
expectedObservationSequence: e.observationSequence
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function t(t) {
|
|
19
|
+
return JSON.stringify(["source", "destination"].map((n) => {
|
|
20
|
+
let r = n === "source" ? t.source : t.destination;
|
|
21
|
+
return {
|
|
22
|
+
pin: e(r),
|
|
23
|
+
issues: r.unresolvedObservationIds,
|
|
24
|
+
gaps: r.reviewGaps
|
|
25
|
+
};
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
function n(t, n, r) {
|
|
29
|
+
let i = Number(n);
|
|
30
|
+
if (!/^[1-9]\d*$/.test(n) || !Number.isSafeInteger(i) || i > 2147483647) throw Error("Enter a positive whole count up to 2147483647.");
|
|
31
|
+
let a = r.trim();
|
|
32
|
+
if (!a || a.length > 1e3) throw Error("Enter a reason up to 1000 characters.");
|
|
33
|
+
let o = e(t.source), s = e(t.destination);
|
|
34
|
+
if (o.inventoryItemId === s.inventoryItemId || o.expectedLocationId === s.expectedLocationId || o.expectedWarehouseId !== s.expectedWarehouseId || o.expectedCargoItemId !== s.expectedCargoItemId) throw Error("Choose two distinct bins for the same cargo and warehouse.");
|
|
35
|
+
return {
|
|
36
|
+
source: o,
|
|
37
|
+
destination: s,
|
|
38
|
+
requestedQuantity: i,
|
|
39
|
+
note: a
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function r(e, n) {
|
|
43
|
+
return e === t(n);
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { t as pendingContextSignature, n as pendingPickInput, r as pendingPickMatches };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
//#region src/movethewheels/utils/procedureInput.ts
|
|
2
|
+
var e = [
|
|
3
|
+
"RETURN_INSTRUCTION_REVIEW",
|
|
4
|
+
"CONDITION_HOLDS_REVIEW",
|
|
5
|
+
"BOOKING_ROAD_RETURN_REVIEW"
|
|
6
|
+
], t = {
|
|
7
|
+
RETURN_INSTRUCTION_REVIEW: "Return instruction",
|
|
8
|
+
CONDITION_HOLDS_REVIEW: "Condition and holds",
|
|
9
|
+
BOOKING_ROAD_RETURN_REVIEW: "Booking, road access and retained return"
|
|
10
|
+
};
|
|
11
|
+
function n(e) {
|
|
12
|
+
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
13
|
+
}
|
|
14
|
+
function r(e, t, r) {
|
|
15
|
+
let i = e["templateReference" in t ? "publishMtwProcedureVersion" : "expectedCycleVersion" in t ? "startMtwProcedureExecution" : t.stepDecisionId ? t.kind ? "recordMtwProcedureDeviation" : "revokeMtwProcedureDeviation" : "recordMtwProcedureStep"];
|
|
16
|
+
return !n(i) || typeof i.id != "string" || !i.id ? !1 : "expectedCycleVersion" in t ? i.executorActorId === r && i.proposalId === t.proposalId && i.procedureVersionId === t.procedureVersionId && n(i.subject) && i.subject.cycleVersion === t.expectedCycleVersion && i.subject.proposalRevision === t.expectedProposalRevision : typeof t.expectedVersion != "number" || i.version !== t.expectedVersion + 1 ? !1 : "templateReference" in t ? i.templateReference === t.templateReference && i.previousVersionId === t.expectedPreviousId && i.kind === t.kind : i.executionId === t.executionId && (t.stepDecisionId ? i.stepDecisionId === t.stepDecisionId && i.previousDeviationId === t.expectedPreviousId : i.step === t.step && i.previousDecisionId === t.expectedPreviousId) && i.kind === (t.kind ?? "REVOKED");
|
|
17
|
+
}
|
|
18
|
+
function i(e) {
|
|
19
|
+
if (!/^\d{4}-\d\d-\d\dT\d\d:\d\d(?::\d\d(?:\.\d{1,3})?)?$/.test(e)) throw Error("Enter a complete local date and time.");
|
|
20
|
+
let t = new Date(e);
|
|
21
|
+
if (!Number.isFinite(t.valueOf())) throw Error("Enter a valid date and time.");
|
|
22
|
+
let n = (e) => String(e).padStart(2, "0");
|
|
23
|
+
if (`${t.getFullYear()}-${n(t.getMonth() + 1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}` !== e.slice(0, 16)) throw Error("This local time is invalid or skipped by daylight saving.");
|
|
24
|
+
return t.toISOString();
|
|
25
|
+
}
|
|
26
|
+
function a(e) {
|
|
27
|
+
if (e.declaredJurisdictions.length < 1 || e.declaredJurisdictions.length > 10 || new Set(e.declaredJurisdictions).size !== e.declaredJurisdictions.length) throw Error("Enter one to ten distinct jurisdiction references.");
|
|
28
|
+
return {
|
|
29
|
+
handoffLocationReference: e.handoffLocationReference,
|
|
30
|
+
equipmentType: e.equipmentType,
|
|
31
|
+
cargoCategory: e.cargoCategory,
|
|
32
|
+
equipmentOwnerReference: e.equipmentOwnerReference,
|
|
33
|
+
declaredLaneReference: e.declaredLaneReference,
|
|
34
|
+
declaredJurisdictions: [...e.declaredJurisdictions],
|
|
35
|
+
sourceReference: e.sourceReference,
|
|
36
|
+
sourceRevision: e.sourceRevision
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function o(e, t) {
|
|
40
|
+
return e?.id === t?.id && e?.version === t?.version;
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { o as chainMatches, i as localProcedureInstant, n as object, r as procedureAcknowledgement, e as procedureSteps, a as scopeInput, t as stepLabel };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { PublishProcedureDocument as e, RecordProcedureDeviationDocument as t, RecordProcedureStepDocument as n, RevokeProcedureDeviationDocument as r, StartProcedureDocument as i } from "../src/generated/logistics-procedure-operations.js";
|
|
2
|
+
import { print as a } from "graphql";
|
|
3
|
+
//#region src/movethewheels/utils/procedureRecovery.ts
|
|
4
|
+
var o = "movethewheels.procedure.unresolved.v1";
|
|
5
|
+
function s(o) {
|
|
6
|
+
if (!o || new TextEncoder().encode(o).byteLength > 2e5) return null;
|
|
7
|
+
try {
|
|
8
|
+
let s = JSON.parse(o);
|
|
9
|
+
if (typeof s != "object" || !s || !("version" in s) || s.version !== 1 || !("scope" in s) || !("input" in s) || !("operation" in s) || typeof s.operation != "string" || ![
|
|
10
|
+
e,
|
|
11
|
+
i,
|
|
12
|
+
n,
|
|
13
|
+
t,
|
|
14
|
+
r
|
|
15
|
+
].some((e) => a(e) === s.operation) || !("key" in s) || typeof s.key != "string" || !s.key || s.key.length > 200 || !("success" in s) || typeof s.success != "string" || s.success.length > 500 || typeof s.input != "object" || s.input === null || Array.isArray(s.input) || typeof s.scope != "object" || s.scope === null) return null;
|
|
16
|
+
let c = s.scope;
|
|
17
|
+
return !("actorId" in c) || typeof c.actorId != "string" || !c.actorId || !("workspaceId" in c) || typeof c.workspaceId != "string" || !c.workspaceId || !("tenantId" in c) || typeof c.tenantId != "string" || !("organizationId" in c) || typeof c.organizationId != "string" || !c.organizationId || !("gateway" in c) || typeof c.gateway != "string" || !("projectId" in c) || c.projectId !== null && typeof c.projectId != "string" ? null : {
|
|
18
|
+
version: 1,
|
|
19
|
+
scope: {
|
|
20
|
+
actorId: c.actorId,
|
|
21
|
+
workspaceId: c.workspaceId,
|
|
22
|
+
tenantId: c.tenantId,
|
|
23
|
+
organizationId: c.organizationId,
|
|
24
|
+
gateway: c.gateway,
|
|
25
|
+
projectId: c.projectId
|
|
26
|
+
},
|
|
27
|
+
operation: s.operation,
|
|
28
|
+
input: structuredClone(s.input),
|
|
29
|
+
key: s.key,
|
|
30
|
+
success: s.success
|
|
31
|
+
};
|
|
32
|
+
} catch {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function c(e) {
|
|
37
|
+
let t = JSON.stringify(e);
|
|
38
|
+
if (!s(t)) throw Error("Cannot safely retain this procedure request. Nothing was sent.");
|
|
39
|
+
return t;
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { o as PROCEDURE_RECOVERY_STORAGE, s as decodeProcedureRecovery, c as encodeProcedureRecovery };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region src/movethewheels/utils/reuseAttempt.ts
|
|
2
|
+
function e(e, t, n, r) {
|
|
3
|
+
let i = Object.fromEntries(Object.entries(n).filter(([e]) => ![
|
|
4
|
+
"expectedVersion",
|
|
5
|
+
"expectedCycleVersion",
|
|
6
|
+
"expectedProposalRevision",
|
|
7
|
+
"expectedRouteUpdatedAt",
|
|
8
|
+
"expectedVehicleUpdatedAt"
|
|
9
|
+
].includes(e))), a = JSON.stringify({
|
|
10
|
+
operation: t,
|
|
11
|
+
input: i
|
|
12
|
+
});
|
|
13
|
+
return e?.fingerprint === a ? e : {
|
|
14
|
+
fingerprint: a,
|
|
15
|
+
input: structuredClone(n),
|
|
16
|
+
key: r()
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { e as reuseAttempt };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { freeTimeIso as e } from "./freeTimeDate.js";
|
|
2
|
+
//#region src/movethewheels/utils/reuseForm.ts
|
|
3
|
+
function t(e, t) {
|
|
4
|
+
return String(e.get(t) ?? "").trim();
|
|
5
|
+
}
|
|
6
|
+
function n(e, n) {
|
|
7
|
+
let r = t(e, n);
|
|
8
|
+
if (!/^\d+$/.test(r) || !Number.isSafeInteger(Number(r)) || Number(r) > 2147483647) throw Error(`${n}: enter a whole number between 0 and 2147483647.`);
|
|
9
|
+
return Number(r);
|
|
10
|
+
}
|
|
11
|
+
function r(n, r, i) {
|
|
12
|
+
if (t(n, `${r}.recorded`) !== "yes") return;
|
|
13
|
+
let a = n.getAll(`${r}.evidence`).map((e) => String(e));
|
|
14
|
+
if (!a.length || a.some((e) => !i.some((t) => t.versionId === e))) throw Error(`Select current proposal evidence for ${r}.`);
|
|
15
|
+
return {
|
|
16
|
+
sourceReference: t(n, `${r}.reference`),
|
|
17
|
+
sourceRevision: t(n, `${r}.revision`),
|
|
18
|
+
observedAt: e(t(n, `${r}.observed`)),
|
|
19
|
+
validFrom: e(t(n, `${r}.from`)),
|
|
20
|
+
validUntil: e(t(n, `${r}.until`)),
|
|
21
|
+
evidenceVersionIds: a
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { r as readReuseSource, n as reuseInteger, t as reuseText };
|