@corva/ui 3.77.0-5 → 3.77.0-6
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/cjs-bundle/clients/jsonApi/index.js +1 -1
- package/cjs-bundle/clients/jsonApi/index.js.map +1 -1
- package/cjs-bundle/components/AddComment/Popover.js +1 -1
- package/cjs-bundle/components/AddComment/Popover.js.map +1 -1
- package/cjs-bundle/components/AddComment/components/Content.js +1 -1
- package/cjs-bundle/components/AddComment/components/Content.js.map +1 -1
- package/cjs-bundle/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js +1 -1
- package/cjs-bundle/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js.map +1 -1
- package/cjs-bundle/components/Annotations/components/AnnotationsList/index.js +1 -1
- package/cjs-bundle/components/Annotations/components/AnnotationsList/index.js.map +1 -1
- package/cjs-bundle/components/AssetsMultipleSelector/AssetsMultipleSelector.js +1 -1
- package/cjs-bundle/components/AssetsMultipleSelector/AssetsMultipleSelector.js.map +1 -1
- package/cjs-bundle/components/Attachment/index.js +1 -1
- package/cjs-bundle/components/Attachment/index.js.map +1 -1
- package/cjs-bundle/components/BICOffsetPickerDialog/components/Map/Map.js +1 -1
- package/cjs-bundle/components/BICOffsetPickerDialog/components/Map/Map.js.map +1 -1
- package/cjs-bundle/components/BICOffsetPickerDialog/components/WellSection/index.js +1 -1
- package/cjs-bundle/components/BICOffsetPickerDialog/components/WellSection/index.js.map +1 -1
- package/cjs-bundle/components/BICOffsetPickerDialog/index.js +1 -1
- package/cjs-bundle/components/BICOffsetPickerDialog/index.js.map +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js.map +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
- package/cjs-bundle/components/CollapsableSidebar.js +1 -1
- package/cjs-bundle/components/CollapsableSidebar.js.map +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js.map +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js.map +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js.map +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus.js.map +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/PriorityMenus.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/PriorityMenus.js.map +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js.map +1 -1
- package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/IsolatedPage.js +1 -1
- package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/IsolatedPage.js.map +1 -1
- package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/effects/useXProps.js.map +1 -1
- package/cjs-bundle/components/DocumentViewer/DocumentViewer.js +1 -1
- package/cjs-bundle/components/DocumentViewer/DocumentViewer.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
- package/cjs-bundle/components/EmbeddedApp/EmbeddedApp.js +1 -1
- package/cjs-bundle/components/EmbeddedApp/EmbeddedApp.js.map +1 -1
- package/cjs-bundle/components/FeedItem/FeedItem.js +1 -1
- package/cjs-bundle/components/FeedItem/FeedItem.js.map +1 -1
- package/cjs-bundle/components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.js +1 -1
- package/cjs-bundle/components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.js.map +1 -1
- package/cjs-bundle/components/FeedItem/components/Content.js +1 -1
- package/cjs-bundle/components/FeedItem/components/Content.js.map +1 -1
- package/cjs-bundle/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.js +1 -1
- package/cjs-bundle/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.js.map +1 -1
- package/cjs-bundle/components/FeedItem/feedItemTypes/WellPlanFeedItem/index.js +1 -1
- package/cjs-bundle/components/FeedItem/feedItemTypes/WellPlanFeedItem/index.js.map +1 -1
- package/cjs-bundle/components/FilesLoaderV2/utils.js +1 -1
- package/cjs-bundle/components/FilesLoaderV2/utils.js.map +1 -1
- package/cjs-bundle/components/GradientManager/GradientManager.js +1 -1
- package/cjs-bundle/components/GradientManager/GradientManager.js.map +1 -1
- package/cjs-bundle/components/GradientManager/GradientSelect.js +1 -1
- package/cjs-bundle/components/GradientManager/GradientSelect.js.map +1 -1
- package/cjs-bundle/components/InfiniteList/index.js +1 -1
- package/cjs-bundle/components/InfiniteList/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellMap/OffsetWellMap.js +1 -1
- package/cjs-bundle/components/OffsetWellMap/OffsetWellMap.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/OffsetWellPickerDialog.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/OffsetWellPickerDialog.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Map/Map.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Map/Map.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/constants.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/constants.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/effects/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/effects/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/Map.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/Map.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/constants.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/constants.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/effects/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/effects/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/OffsetWellPickerV5.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/OffsetWellPickerV5.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/Filter.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/Filter.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useMapTooltipState.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useMapTooltipState.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useOffsetWellMapState.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useOffsetWellMapState.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useSelectionToolOrchestration.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useSelectionToolOrchestration.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/utils/well-markers-utils.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/utils/well-markers-utils.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/OffsetWellPickerV5WithStore.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/OffsetWellPickerV5WithStore.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/CompanySafeguardWrapper/CompanySafeguardWrapper.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/CompanySafeguardWrapper/CompanySafeguardWrapper.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/UserSettingsWrapper/UserSettingsWrapper.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/UserSettingsWrapper/UserSettingsWrapper.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/hooks/useAdvancedSearchHandler.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/hooks/useAdvancedSearchHandler.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/constants.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/constants.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/wellTransformations.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/wellTransformations.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/hooks/useAutoSyncOffsetWells.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/hooks/useAutoSyncOffsetWells.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/hooks/useIsAdmin.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/hooks/useIsAdmin.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/hooks/useLimitNotification.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/hooks/useLimitNotification.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/stores/idas-resync-store/createIdasResyncController.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/stores/idas-resync-store/createIdasResyncController.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/utils/getCoordinatedWells.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/utils/getCoordinatedWells.js.map +1 -1
- package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js +1 -1
- package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
- package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
- package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js.map +1 -1
- package/cjs-bundle/components/RealTimeValuesSidebar/SidebarFooter.js +1 -1
- package/cjs-bundle/components/RealTimeValuesSidebar/SidebarFooter.js.map +1 -1
- package/cjs-bundle/componentsV2/AppFooter/DqPopover/DqPopover.js +1 -1
- package/cjs-bundle/componentsV2/AppFooter/DqPopover/DqPopover.js.map +1 -1
- package/cjs-bundle/componentsV2/AppHeader/AppAssets/utils.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/AppAssets/utils.js.map +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.js.map +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/AppTitle/AppTitle.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/AppTitle/AppTitle.js.map +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/AssetSelector/AssetSelector.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/AssetSelector/AssetSelector.js.map +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js.map +1 -1
- package/cjs-bundle/componentsV2/AppPanel/AppPanelDisplay.js +1 -1
- package/cjs-bundle/componentsV2/AppPanel/AppPanelDisplay.js.map +1 -1
- package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/Map/Map.js +1 -1
- package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/Map/Map.js.map +1 -1
- package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/hooks/useNonActivePads.js +1 -1
- package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/hooks/useNonActivePads.js.map +1 -1
- package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/hooks/usePadsByRadius.js +1 -1
- package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/hooks/usePadsByRadius.js.map +1 -1
- package/cjs-bundle/componentsV2/FilesDropzone/utils.js +1 -1
- package/cjs-bundle/componentsV2/FilesDropzone/utils.js.map +1 -1
- package/cjs-bundle/componentsV2/FilesLoader/utils.js +1 -1
- package/cjs-bundle/componentsV2/FilesLoader/utils.js.map +1 -1
- package/cjs-bundle/componentsV2/IndicatorLive/IndicatorLive.js.map +1 -1
- package/cjs-bundle/componentsV2/PadModeSelect/PadModeSelect.js +1 -1
- package/cjs-bundle/componentsV2/PadModeSelect/PadModeSelect.js.map +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/PublishModal/PublishModal.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/PublishModal/PublishModal.js.map +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/ShareModal/ShareModal.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/ShareModal/ShareModal.js.map +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useCopyTemplate.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useCopyTemplate.js.map +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useCreateTemplate.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useCreateTemplate.js.map +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useDeleteFolder.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useDeleteFolder.js.map +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useDeleteTemplate.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useDeleteTemplate.js.map +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useExportTemplate.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useExportTemplate.js.map +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useImportTemplate.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useImportTemplate.js.map +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useInitialize.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useInitialize.js.map +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useMoveToFolder.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useMoveToFolder.js.map +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/usePublishTemplate.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/usePublishTemplate.js.map +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useRevertToOriginal.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useRevertToOriginal.js.map +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useShareTemplate.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useShareTemplate.js.map +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUnfollowTemplate.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUnfollowTemplate.js.map +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUpdateFolderName.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUpdateFolderName.js.map +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUpdateTemplateName.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUpdateTemplateName.js.map +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Toggle/Toggle.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Toggle/Toggle.js.map +1 -1
- package/cjs-bundle/componentsV2/TextInputBase/TextInputBase.js +1 -1
- package/cjs-bundle/componentsV2/TextInputBase/TextInputBase.js.map +1 -1
- package/cjs-bundle/componentsV2/TextInputNext/TextInputNext.js +1 -1
- package/cjs-bundle/componentsV2/TextInputNext/TextInputNext.js.map +1 -1
- package/cjs-bundle/componentsV2/WellArchivedMessage/WellArchivedMessage.js +1 -1
- package/cjs-bundle/componentsV2/WellArchivedMessage/WellArchivedMessage.js.map +1 -1
- package/cjs-bundle/constants/notifications.js +1 -1
- package/cjs-bundle/constants/notifications.js.map +1 -1
- package/cjs-bundle/effects/useGlobalOffsetWellsSync.js +1 -1
- package/cjs-bundle/effects/useGlobalOffsetWellsSync.js.map +1 -1
- package/cjs-bundle/effects/useSharedDCStore.js +1 -1
- package/cjs-bundle/effects/useSharedDCStore.js.map +1 -1
- package/cjs-bundle/testing/AppTestWrapper/AppTestWrapper.js +1 -1
- package/cjs-bundle/testing/AppTestWrapper/AppTestWrapper.js.map +1 -1
- package/cjs-bundle/utils/DrillstringUtils.js +1 -1
- package/cjs-bundle/utils/DrillstringUtils.js.map +1 -1
- package/cjs-bundle/utils/apps.js +1 -1
- package/cjs-bundle/utils/apps.js.map +1 -1
- package/cjs-bundle/utils/convert.js +1 -1
- package/cjs-bundle/utils/convert.js.map +1 -1
- package/cjs-bundle/utils/devcenter.js +1 -1
- package/cjs-bundle/utils/devcenter.js.map +1 -1
- package/cjs-bundle/utils/index.js +1 -1
- package/cjs-bundle/utils/index.js.map +1 -1
- package/cjs-bundle/utils/lasParser.js +1 -1
- package/cjs-bundle/utils/lasParser.js.map +1 -1
- package/cjs-bundle/utils/time.js.map +1 -1
- package/clients/jsonApi/index.js +1 -1
- package/clients/jsonApi/index.js.map +1 -1
- package/components/AddComment/Popover.js +1 -1
- package/components/AddComment/Popover.js.map +1 -1
- package/components/AddComment/components/Content.js +1 -1
- package/components/AddComment/components/Content.js.map +1 -1
- package/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js +1 -1
- package/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js.map +1 -1
- package/components/Annotations/components/AnnotationsList/index.js +1 -1
- package/components/Annotations/components/AnnotationsList/index.js.map +1 -1
- package/components/AssetsMultipleSelector/AssetsMultipleSelector.js +1 -1
- package/components/AssetsMultipleSelector/AssetsMultipleSelector.js.map +1 -1
- package/components/Attachment/index.js +1 -1
- package/components/Attachment/index.js.map +1 -1
- package/components/BICOffsetPickerDialog/components/Map/Map.js +1 -1
- package/components/BICOffsetPickerDialog/components/Map/Map.js.map +1 -1
- package/components/BICOffsetPickerDialog/components/WellSection/index.js +1 -1
- package/components/BICOffsetPickerDialog/components/WellSection/index.js.map +1 -1
- package/components/BICOffsetPickerDialog/index.js +1 -1
- package/components/BICOffsetPickerDialog/index.js.map +1 -1
- package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
- package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
- package/components/Casing/CasingTableV2/components/Component.js +1 -1
- package/components/Casing/CasingTableV2/components/Component.js.map +1 -1
- package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
- package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
- package/components/CollapsableSidebar.js +1 -1
- package/components/CollapsableSidebar.js.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus.js.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus.js.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js.map +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/IsolatedPage.d.ts.map +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/IsolatedPage.js +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/IsolatedPage.js.map +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/effects/useXProps.d.ts.map +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/effects/useXProps.js.map +1 -1
- package/components/DocumentViewer/DocumentViewer.js +1 -1
- package/components/DocumentViewer/DocumentViewer.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
- package/components/EmbeddedApp/EmbeddedApp.d.ts.map +1 -1
- package/components/EmbeddedApp/EmbeddedApp.js +1 -1
- package/components/EmbeddedApp/EmbeddedApp.js.map +1 -1
- package/components/FeedItem/FeedItem.js +1 -1
- package/components/FeedItem/FeedItem.js.map +1 -1
- package/components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.js +1 -1
- package/components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.js.map +1 -1
- package/components/FeedItem/components/Content.d.ts.map +1 -1
- package/components/FeedItem/components/Content.js +1 -1
- package/components/FeedItem/components/Content.js.map +1 -1
- package/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.d.ts.map +1 -1
- package/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.js +1 -1
- package/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.js.map +1 -1
- package/components/FeedItem/feedItemTypes/WellPlanFeedItem/index.d.ts.map +1 -1
- package/components/FeedItem/feedItemTypes/WellPlanFeedItem/index.js +1 -1
- package/components/FeedItem/feedItemTypes/WellPlanFeedItem/index.js.map +1 -1
- package/components/FilesLoaderV2/utils.js +1 -1
- package/components/FilesLoaderV2/utils.js.map +1 -1
- package/components/GradientManager/GradientManager.js +1 -1
- package/components/GradientManager/GradientManager.js.map +1 -1
- package/components/GradientManager/GradientSelect.js +1 -1
- package/components/GradientManager/GradientSelect.js.map +1 -1
- package/components/InfiniteList/index.d.ts.map +1 -1
- package/components/InfiniteList/index.js +1 -1
- package/components/InfiniteList/index.js.map +1 -1
- package/components/OffsetWellMap/OffsetWellMap.js +1 -1
- package/components/OffsetWellMap/OffsetWellMap.js.map +1 -1
- package/components/OffsetWellPickerV2/OffsetWellPickerDialog.js +1 -1
- package/components/OffsetWellPickerV2/OffsetWellPickerDialog.js.map +1 -1
- package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
- package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
- package/components/OffsetWellPickerV2/components/Map/Map.js +1 -1
- package/components/OffsetWellPickerV2/components/Map/Map.js.map +1 -1
- package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
- package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
- package/components/OffsetWellPickerV2/constants.js +1 -1
- package/components/OffsetWellPickerV2/constants.js.map +1 -1
- package/components/OffsetWellPickerV2/effects/index.js +1 -1
- package/components/OffsetWellPickerV2/effects/index.js.map +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/Map.js +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/Map.js.map +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/constants.js +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/constants.js.map +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/effects/index.js +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/effects/index.js.map +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
- package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
- package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
- package/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
- package/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
- package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
- package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
- package/components/OffsetWellPickerV3/index.js +1 -1
- package/components/OffsetWellPickerV3/index.js.map +1 -1
- package/components/OffsetWellPickerV5/OffsetWellPickerV5.js +1 -1
- package/components/OffsetWellPickerV5/OffsetWellPickerV5.js.map +1 -1
- package/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js +1 -1
- package/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js.map +1 -1
- package/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js +1 -1
- package/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Filter/Filter.js +1 -1
- package/components/OffsetWellPickerV5/components/Filter/Filter.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js +1 -1
- package/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js +1 -1
- package/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js +1 -1
- package/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useMapTooltipState.js +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useMapTooltipState.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useOffsetWellMapState.js +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useOffsetWellMapState.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useSelectionToolOrchestration.js +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useSelectionToolOrchestration.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/utils/well-markers-utils.js +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/utils/well-markers-utils.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/OffsetWellPickerV5WithStore.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/OffsetWellPickerV5WithStore.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/CompanySafeguardWrapper/CompanySafeguardWrapper.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/CompanySafeguardWrapper/CompanySafeguardWrapper.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/UserSettingsWrapper/UserSettingsWrapper.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/UserSettingsWrapper/UserSettingsWrapper.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/hooks/useAdvancedSearchHandler.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/hooks/useAdvancedSearchHandler.js.map +1 -1
- package/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js +1 -1
- package/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js.map +1 -1
- package/components/OffsetWellPickerV5/constants.js +1 -1
- package/components/OffsetWellPickerV5/constants.js.map +1 -1
- package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.js +1 -1
- package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.js.map +1 -1
- package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.js +1 -1
- package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.js.map +1 -1
- package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/wellTransformations.js +1 -1
- package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/wellTransformations.js.map +1 -1
- package/components/OffsetWellPickerV5/hooks/useAutoSyncOffsetWells.js +1 -1
- package/components/OffsetWellPickerV5/hooks/useAutoSyncOffsetWells.js.map +1 -1
- package/components/OffsetWellPickerV5/hooks/useIsAdmin.js +1 -1
- package/components/OffsetWellPickerV5/hooks/useIsAdmin.js.map +1 -1
- package/components/OffsetWellPickerV5/hooks/useLimitNotification.js +1 -1
- package/components/OffsetWellPickerV5/hooks/useLimitNotification.js.map +1 -1
- package/components/OffsetWellPickerV5/stores/idas-resync-store/createIdasResyncController.js +1 -1
- package/components/OffsetWellPickerV5/stores/idas-resync-store/createIdasResyncController.js.map +1 -1
- package/components/OffsetWellPickerV5/utils/getCoordinatedWells.d.ts.map +1 -1
- package/components/OffsetWellPickerV5/utils/getCoordinatedWells.js +1 -1
- package/components/OffsetWellPickerV5/utils/getCoordinatedWells.js.map +1 -1
- package/components/PadOffsetsPicker/StagesSelector.js +1 -1
- package/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
- package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
- package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js.map +1 -1
- package/components/RealTimeValuesSidebar/SidebarFooter.js +1 -1
- package/components/RealTimeValuesSidebar/SidebarFooter.js.map +1 -1
- package/componentsV2/AppFooter/DqPopover/DqPopover.js +1 -1
- package/componentsV2/AppFooter/DqPopover/DqPopover.js.map +1 -1
- package/componentsV2/AppHeader/AppAssets/utils.js +1 -1
- package/componentsV2/AppHeader/AppAssets/utils.js.map +1 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.js +1 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.js.map +1 -1
- package/componentsV2/AppHeader/V3/AppTitle/AppTitle.js +1 -1
- package/componentsV2/AppHeader/V3/AppTitle/AppTitle.js.map +1 -1
- package/componentsV2/AppHeader/V3/AssetSelector/AssetSelector.js +1 -1
- package/componentsV2/AppHeader/V3/AssetSelector/AssetSelector.js.map +1 -1
- package/componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js +1 -1
- package/componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js.map +1 -1
- package/componentsV2/AppPanel/AppPanelDisplay.js +1 -1
- package/componentsV2/AppPanel/AppPanelDisplay.js.map +1 -1
- package/componentsV2/CompletionsOffsetWellPicker/Map/Map.js +1 -1
- package/componentsV2/CompletionsOffsetWellPicker/Map/Map.js.map +1 -1
- package/componentsV2/CompletionsOffsetWellPicker/hooks/useNonActivePads.js +1 -1
- package/componentsV2/CompletionsOffsetWellPicker/hooks/useNonActivePads.js.map +1 -1
- package/componentsV2/CompletionsOffsetWellPicker/hooks/usePadsByRadius.js +1 -1
- package/componentsV2/CompletionsOffsetWellPicker/hooks/usePadsByRadius.js.map +1 -1
- package/componentsV2/FilesDropzone/utils.js +1 -1
- package/componentsV2/FilesDropzone/utils.js.map +1 -1
- package/componentsV2/FilesLoader/utils.js +1 -1
- package/componentsV2/FilesLoader/utils.js.map +1 -1
- package/componentsV2/IndicatorLive/IndicatorLive.d.ts.map +1 -1
- package/componentsV2/IndicatorLive/IndicatorLive.js.map +1 -1
- package/componentsV2/PadModeSelect/PadModeSelect.js +1 -1
- package/componentsV2/PadModeSelect/PadModeSelect.js.map +1 -1
- package/componentsV2/TemplatesControl/PublishModal/PublishModal.js +1 -1
- package/componentsV2/TemplatesControl/PublishModal/PublishModal.js.map +1 -1
- package/componentsV2/TemplatesControl/ShareModal/ShareModal.js +1 -1
- package/componentsV2/TemplatesControl/ShareModal/ShareModal.js.map +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/useCopyTemplate.js +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/useCopyTemplate.js.map +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/useCreateTemplate.js +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/useCreateTemplate.js.map +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/useDeleteFolder.js +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/useDeleteFolder.js.map +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/useDeleteTemplate.js +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/useDeleteTemplate.js.map +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/useExportTemplate.js +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/useExportTemplate.js.map +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/useImportTemplate.js +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/useImportTemplate.js.map +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/useInitialize.js +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/useInitialize.js.map +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/useMoveToFolder.js +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/useMoveToFolder.js.map +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/usePublishTemplate.js +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/usePublishTemplate.js.map +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/useRevertToOriginal.js +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/useRevertToOriginal.js.map +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/useShareTemplate.js +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/useShareTemplate.js.map +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/useUnfollowTemplate.js +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/useUnfollowTemplate.js.map +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/useUpdateFolderName.js +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/useUpdateFolderName.js.map +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/useUpdateTemplateName.js +1 -1
- package/componentsV2/TemplatesControl/Store/hooks/useUpdateTemplateName.js.map +1 -1
- package/componentsV2/TemplatesControl/Toggle/Toggle.js +1 -1
- package/componentsV2/TemplatesControl/Toggle/Toggle.js.map +1 -1
- package/componentsV2/TextInputBase/TextInputBase.js +1 -1
- package/componentsV2/TextInputBase/TextInputBase.js.map +1 -1
- package/componentsV2/TextInputNext/TextInputNext.js +1 -1
- package/componentsV2/TextInputNext/TextInputNext.js.map +1 -1
- package/componentsV2/WellArchivedMessage/WellArchivedMessage.js +1 -1
- package/componentsV2/WellArchivedMessage/WellArchivedMessage.js.map +1 -1
- package/constants/assets.d.ts +40 -1
- package/constants/assets.d.ts.map +1 -1
- package/constants/bha.d.ts +4 -4
- package/constants/notifications.d.ts +5 -2
- package/constants/notifications.d.ts.map +1 -1
- package/constants/notifications.js +1 -1
- package/constants/notifications.js.map +1 -1
- package/effects/useGlobalOffsetWellsSync.js +1 -1
- package/effects/useGlobalOffsetWellsSync.js.map +1 -1
- package/effects/useSharedDCStore.js +1 -1
- package/effects/useSharedDCStore.js.map +1 -1
- package/mcp-server/server.mjs +49 -91
- package/package.json +1 -2
- package/testing/AppTestWrapper/AppTestWrapper.js +1 -1
- package/testing/AppTestWrapper/AppTestWrapper.js.map +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/utils/DrillstringUtils.d.ts.map +1 -1
- package/utils/DrillstringUtils.js +1 -1
- package/utils/DrillstringUtils.js.map +1 -1
- package/utils/apps.js +1 -1
- package/utils/apps.js.map +1 -1
- package/utils/convert.d.ts +0 -19
- package/utils/convert.d.ts.map +1 -1
- package/utils/convert.js +1 -1
- package/utils/convert.js.map +1 -1
- package/utils/devcenter.d.ts.map +1 -1
- package/utils/devcenter.js +1 -1
- package/utils/devcenter.js.map +1 -1
- package/utils/index.d.ts +4 -4
- package/utils/index.d.ts.map +1 -1
- package/utils/index.js +1 -1
- package/utils/index.js.map +1 -1
- package/utils/lasParser.d.ts.map +1 -1
- package/utils/lasParser.js +1 -1
- package/utils/lasParser.js.map +1 -1
- package/utils/time.d.ts.map +1 -1
- package/utils/time.js.map +1 -1
- package/utils/HeatmapUtils.d.ts +0 -1
- package/utils/HeatmapUtils.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrillstringUtils.d.ts","sourceRoot":"","sources":["../../src/utils/DrillstringUtils.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DrillstringUtils.d.ts","sourceRoot":"","sources":["../../src/utils/DrillstringUtils.js"],"names":[],"mappings":"AAuHA,wBAAgB,WAAW,CAAC,GAAG,KAAA,WAE9B;AAED,wBAAgB,aAAa,CAAC,GAAG,KAAA,EAAE,GAAG,KAAA,EAAE,GAAG,KAAA,EAAE,EAAE,cAAqB,EAAE;;CAAK,WAc1E;AAED,wBAAgB,mBAAmB,CAAC,EAAE,KAAA,EAAE,EAAE,KAAA,EAAE,YAAY,KAAA,WAevD;AAED,wBAAgB,QAAQ,CAAC,UAAU,KAAA;;;;SA8hBlC;AAED,wBAAgB,+BAA+B,CAAC,MAAM,KAAA,OA6HrD;AAED,wBAAgB,IAAI,CAAC,GAAG,KAAA,EAAE,QAAQ,KAAA,EAAE,IAAI,KAAA,EAAE,SAAS,SAAI,iBAQtD;AAED,wBAAgB,uBAAuB,CAAC,MAAM,KAAA,OAiH7C;AAED,wBAAgB,IAAI,CAAC,GAAG,KAAA,EAAE,QAAQ,KAAA,EAAE,IAAI,KAAA,EAAE,SAAS,SAAI,OAKtD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"lodash/set";import i from"lodash/get";import r from"moment";import{getUnitPreference as s,convertValue as o,getUnitDisplay as n}from"./convert.js";function a(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function l(t){for(var i=1;i<arguments.length;i++){var r=null!=arguments[i]?arguments[i]:{};i%2?a(Object(r),!0).forEach((function(i){e(t,i,r[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function _(e){return null==e||""===e}function h(e,t,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=r.isMinInclusive,o=void 0===s||s,n=parseFloat(e);return!Number.isNaN(n)&&(!(o&&n<t||!o&&n<=t)&&!(i&&n>i))}function g(e,t,i){var r=s("shortLength"),n=e,a=t;"in"!==r&&(n=o(e,"shortLength",r,"in"),a=o(t,"shortLength",r,"in"));var l=2.673*(a*a-n*n),_="in"!==r?o(l,"massPerLength","lb-ft"):l;return i>=.5*_&&i<=1.5*_}function m(e){var t=e.toJS().data,i=t.id,s=t.start_timestamp_str,a=t.start_depth,l=t.components,_=n("shortLength"),m=n("length"),d={general:{},components:{},specificErrors:{}},u=l.filter((function(e){return"bit"===e.family})),f=u.length>0?u[0].size:null,b=l.filter((function(e){return"mwd"===e.family&&e.has_gamma_sensor})),p=!1;if(isValueEmpty(i)&&(d.id="It should not be empty.",p=!0),s&&!r(new Date(s)).isValid()&&(p=!0,d.start_timestamp="Invalid Date."),Number.isFinite(a)){var v=o(0,"length","ft"),z=o(55e3,"length","ft"),w=o(1,"length","ft");(a<=v||a>z)&&(p=!0,d.start_depth="Should be a positive number ".concat(v.toFixed(2),"~").concat(z.toFixed(2)," (").concat(m,")")),a===w&&(p=!0,d.start_depth="Should not be equal to ".concat(w," (").concat(m,")"))}else p=!0,d.start_depth="It should not be empty.";for(var L=0;L<l.length;L+=1){var y=void 0,x=void 0,F=void 0,j=void 0,I=void 0,O=void 0,V=void 0,E=void 0,q=void 0,D=void 0,P=void 0,k=void 0,S=void 0,N=void 0,R=void 0,T=l[L],B={};switch(T.family){case"ct":y=o(0,"shortLength","in"),F=o(100,"shortLength","in"),x=o(1,"shortLength","in"),j=o(100,"shortLength","in"),N=o(0,"shortLength","in"),R=o(500,"shortLength","in"),V=o(0,"length","ft");break;case"dp":case"hwdp":y=o(1,"shortLength","in"),F=o(7,"shortLength","in"),x=o(2,"shortLength","in"),j=o(8,"shortLength","in"),E=o(1,"shortLength","in"),q=o(7,"shortLength","in"),D=o(2,"shortLength","in"),P=o(10,"shortLength","in"),V=o(0,"length","ft");break;case"dc":y=o(.5,"shortLength","in"),F=o(7,"shortLength","in"),x=o(2,"shortLength","in"),j=o(13,"shortLength","in"),V=o(0,"length","ft");break;case"stabilizer":case"ags":default:y=o(0,"shortLength","in"),F=o(100,"shortLength","in"),x=o(1,"shortLength","in"),j=o(100,"shortLength","in"),V=o(0,"length","ft");break;case"pdm":x=o(2,"shortLength","in"),j=o(15,"shortLength","in"),y=o(0,"shortLength","in"),F=o(12,"shortLength","in"),V=o(4,"length","ft"),S=0;break;case"mwd":case"agitator":case"rss":x=o(2,"shortLength","in"),j=o(13,"shortLength","in"),y=o(0,"shortLength","in"),F=o(12,"shortLength","in"),V=o(1,"length","ft"),k=0;break;case"ur":y=o(0,"shortLength","in"),F=o(50,"shortLength","in"),x=o(1,"shortLength","in"),j=o(50,"shortLength","in"),I=o(1,"shortLength","in"),O=o(50,"shortLength","in");case"bit":}if(isValueEmpty(y)||isValueEmpty(x)||(h(T.inner_diameter,y,F)||(B.inner_diameter="".concat(y.toFixed(1),"~").concat(F.toFixed(1)," (").concat(_,")"),p=!0),h(T.outer_diameter,x,j)||(B.outer_diameter="".concat(x.toFixed(1),"~").concat(j.toFixed(1)," (").concat(_,")"),p=!0),h(T.inner_diameter,y,F)&&h(T.outer_diameter,x,j)&&!h(T.inner_diameter,y,T.outer_diameter)&&(B.outer_diameter="O.D > I.D",p=!0),!B.outer_diameter&&f&&+T.outer_diameter+o(.1,"shortLength","in")>f&&(B.outer_diameter=" O.D + 0.1 < Bit Size",p=!0),h(T.linear_weight,0)||(B.linear_weight="Invalid value",p=!0),"dp"!==T.family&&"hwdp"!==T.family&&"dc"!==T.family&&"ct"!==T.family&&"ur"!==T.family||B.inner_diameter||B.outer_diameter||B.linear_weight||g(T.inner_diameter,T.outer_diameter,T.linear_weight)||(B.linear_weight="Invalid range",p=!0)),"ur"===T.family&&(h(T.ur_opened_od,I,O)?T.ur_opened_od<f&&(B.ur_opened_od="Max O.D (Opened) >= Bit Size",p=!0):(B.ur_opened_od="".concat(I.toFixed(1),"~").concat(O.toFixed(1)," (").concat(_,")"),p=!0)),isValueEmpty(E)||isValueEmpty(D)||(h(T.inner_diameter_tooljoint,E,q)||(B.inner_diameter_tooljoint="".concat(E.toFixed(1),"~").concat(q.toFixed(1)," (").concat(_,")"),p=!0),h(T.outer_diameter_tooljoint,D,P)||(B.outer_diameter_tooljoint="".concat(D.toFixed(1),"~").concat(P.toFixed(1)," (").concat(_,")"),p=!0),h(T.outer_diameter_tooljoint,T.outer_diameter,P)||(B.outer_diameter_tooljoint="Tool Joint O.D >= O.D",p=!0)),isValueEmpty(V)||h(T.length,V)||(B.length="Invalid value",p=!0),isValueEmpty(T.length_tooljoint)||isValueEmpty(T.component_length)||+T.length_tooljoint>+T.component_length&&(B.length_tooljoint="Tool Joint Length < Component Length",p=!0),T.off_bottom_pressure_loss&&T.off_bottom_pressure_loss.length>0){B.off_bottom_pressure_loss={};for(var J=0;J<T.off_bottom_pressure_loss.length;J+=1){var M=T.off_bottom_pressure_loss[J];B.off_bottom_pressure_loss[J]={},isValueEmpty(M.flow_rate)&&(B.off_bottom_pressure_loss[J].flow_rate="flow rate is required.",p=!0),isValueEmpty(M.pressure_loss)&&(B.off_bottom_pressure_loss[J].pressure_loss="pressure loss is required.",p=!0),isValueEmpty(S)||h(M.pressure_loss,S,null,{isMinInclusive:!1})||(B.off_bottom_pressure_loss[J].pressure_loss="Invalid range",p=!0)}}if(T.pressure_loss&&T.pressure_loss.length>0){B.pressure_loss={};for(var C=0;C<T.pressure_loss.length;C+=1){var A=T.pressure_loss[C];B.pressure_loss[C]={},isValueEmpty(A.flow_rate)&&(B.pressure_loss[C].flow_rate="flow rate is required.",p=!0),isValueEmpty(A.pressure_loss)&&(B.pressure_loss[C].pressure_loss="pressure loss is required.",p=!0),isValueEmpty(k)||h(A.pressure_loss,k,null,{isMinInclusive:!1})||(B.pressure_loss[C].pressure_loss="Invalid range",p=!0)}}if(T.has_stabilizer&&T.stabilizer){var G=o(0,"shortLength","in"),H=o(100,"shortLength","in"),K=o(1,"shortLength","in"),Q=o(100,"shortLength","in"),U=o(0,"length","ft");h(T.stabilizer.inner_diameter,G,H)&&h(T.stabilizer.outer_diameter,K,Q)&&!h(T.stabilizer.inner_diameter,y,T.stabilizer.outer_diameter)&&(B.stabilizer_outer_diameter="O.D > I.D",p=!0),h(T.stabilizer.inner_diameter,G,H)||(B.stabilizer_inner_diameter="".concat(G.toFixed(1),"~").concat(H.toFixed(1)," (").concat(_,")"),p=!0),h(T.stabilizer.outer_diameter,K,Q)||(B.stabilizer_outer_diameter="".concat(K.toFixed(1),"~").concat(Q.toFixed(1)," (").concat(_,")"),p=!0),isValueEmpty(U)||h(T.stabilizer.length,U)||(B.stabilizer_length="Invalid value",p=!0),isValueEmpty(T.stabilizer.linear_weight)&&(B.stabilizer_linear_weight="Invalid value",p=!0),!B.stabilizer_outer_diameter&&f&&+T.stabilizer.outer_diameter+o(.1,"shortLength","in")>f&&(B.stabilizer_outer_diameter=" O.D + 0.1 < Bit Size",p=!0)}if("ct"===T.family&&(h(T.reel_diameter,N,R)||(B.reel_diameter="".concat(N.toFixed(1),"~").concat(R.toFixed(1)," (").concat(_,")"),p=!0)),"bit"===T.family){var W=c(1,"shortLength","in"),X=W*W*0,Y=W*W*20;h(T.tfa,X,Y)||(B.tfa="TFA must be ".concat(X.toFixed(2),"~").concat(20..toFixed(2)),p=!0)}if("rss"===T.family&&(h(T.flow_loss_percentage,0,10)||(B.flow_loss_percentage="It must be ".concat(0,"~").concat(10),p=!0)),"mwd"===T.family&&(b.length>1?(B.gamma_sensor_to_bit_distance="Only 1 gamma sensor allowed. Currently ".concat(b.length),p=!0):T.has_gamma_sensor&&!Number.isFinite(T.gamma_sensor_to_bit_distance)&&(B.gamma_sensor_to_bit_distance="This field is required.",p=!0),T.has_survey_sensor&&!Number.isFinite(T.bit_to_survey_distance)?(B.bit_to_survey_distance="This field is required.",p=!0):T.has_survey_sensor&&T.bit_to_survey_distance<=0?(B.bit_to_survey_distance="Should be a positive number.",p=!0):T.has_survey_sensor&&T.bit_to_survey_distance>150&&(B.bit_to_survey_distance="Should be less then 150.",p=!0),T.has_directional_sensor&&!Number.isFinite(T.directional_sensor_to_bit_distance)?(B.directional_sensor_to_bit_distance="This field is required.",p=!0):T.has_directional_sensor&&T.directional_sensor_to_bit_distance<=0?(B.directional_sensor_to_bit_distance="Should be a positive number.",p=!0):T.has_directional_sensor&&T.directional_sensor_to_bit_distance>150&&(B.directional_sensor_to_bit_distance="Should be less then 150.",p=!0)),"pdm"===T.family){var Z=void 0,$=void 0;h(T.number_rotor_lobes,1,10)||(B.number_rotor_lobes="It must be ".concat(1,"~").concat(10),p=!0),h(T.number_stator_lobes,2,10)||(B.number_stator_lobes="It must be ".concat(2,"~").concat(10),p=!0),h(T.rpg,0,10)||(B.rpg="It must be ".concat(0,"~").concat(10),p=!0),Z=o(0,"force","klbf"),$=o(200,"force","klbf"),isValueEmpty(T.max_weight_on_bit)||h(T.max_weight_on_bit,Z,$)||(B.max_weight_on_bit="It must be ".concat($.toFixed(2),"~").concat($.toFixed(2)),p=!0),Z=o(0,"volumeFlowRate","gal/min"),$=o(2500,"volumeFlowRate","gal/min"),h(T.min_standard_flowrate,Z,$)||(B.min_standard_flowrate="It must be ".concat(Z.toFixed(2),"~").concat($.toFixed(2)),p=!0),h(T.max_standard_flowrate,Z,$)||(B.max_standard_flowrate="It must be ".concat(Z.toFixed(2),"~").concat($.toFixed(2)),p=!0),Z=o(0,"pressure","psi"),$=o(3e3,"pressure","psi"),h(T.max_operating_differential_pressure,Z,$)||(B.max_operating_differential_pressure="It must be ".concat(Z.toFixed(2),"~").concat($.toFixed(2)),p=!0),Z=o(0,"torque","ft-klbf"),$=o(40,"torque","ft-klbf"),h(T.torque_at_max_operating_differential_pressure,Z,$)||(B.torque_at_max_operating_differential_pressure="It must be ".concat(Z.toFixed(2),"~").concat($.toFixed(2)),p=!0),h(T.flow_loss_percentage,0,20)||(B.flow_loss_percentage="It must be ".concat(0,"~").concat(20),p=!0)}d.components[T.id]=B}return 1!==u.length&&(d.general.bit_count='Number of "BIT" components is invalid.',p=!0),1===u.length&&"bit"!==l[l.length-1].family&&"bit"!==l[0].family&&(d.general.bit_position='"BIT" category should be on the bottom of the list.',p=!0),p?d:null}function d(e){var s=i(e,["data","components"]);"bit"===i(s,[0,"family"])&&(s=s.reverse().map((function(e,t){return l(l({},e),{},{order:t})})),e=t(e,["data","components"],s));var o=e.toJS().data,n=o.start_timestamp_str&&r(new Date(o.start_timestamp_str));return n&&n.isValid()&&(o.start_timestamp=n.unix()),delete o.start_timestamp_str,o.start_depth=u(o.start_depth,"length","ft"),o.components=o.components.map((function(e){var t=Object.assign({},e);if(t.inner_diameter=u(t.inner_diameter,"shortLength","in"),t.outer_diameter=u(t.outer_diameter,"shortLength","in",4),t.linear_weight=u(t.linear_weight,"massPerLength","lb-ft"),t.weight=u(t.weight,"mass","lb"),t.length=u(t.length,"length","ft"),t.component_length=u(t.component_length,"length","ft"),t.outer_diameter_tooljoint=u(t.outer_diameter_tooljoint,"shortLength","in"),t.inner_diameter_tooljoint=u(t.inner_diameter_tooljoint,"shortLength","in"),t.length_tooljoint=u(t.length_tooljoint,"length","ft"),"bit"===t.family||"ur"===t.family){var i=u(1,"shortLength","in");if(t.size=u(t.size,"shortLength","in",3),t.nozzle_sizes&&t.nozzle_sizes.length>0)for(var r=0;r<t.nozzle_sizes.length;r+=1){var s=t.nozzle_sizes[r];s.size=1!==i?32*u(s.size,"shortLength","in"):s.size}t.tfa=1!==i?t.tfa*(i*i):t.tfa}if("pdm"===t.family){if(t.max_weight_on_bit=u(t.max_weight_on_bit,"force","klbf"),t.min_standard_flowrate=u(t.min_standard_flowrate,"volumeFlowRate","gal/min"),t.max_standard_flowrate=u(t.max_standard_flowrate,"volumeFlowRate","gal/min"),t.max_operating_differential_pressure=u(t.max_operating_differential_pressure,"pressure","psi"),t.torque_at_max_operating_differential_pressure=u(t.torque_at_max_operating_differential_pressure,"torque","ft-klbf",3),t.rpg=u(t.rpg,"revolutionPerVolume","rpg"),t.off_bottom_pressure_loss&&t.off_bottom_pressure_loss.length>0)for(var o=0;o<t.off_bottom_pressure_loss.length;o+=1){var n=t.off_bottom_pressure_loss[o];n.flow_rate=u(n.flow_rate,"volumeFlowRate","gal/min"),n.pressure_loss=u(n.pressure_loss,"pressure","psi")}t.has_stabilizer||delete t.stabilizer,t.stabilizer&&(t.stabilizer.inner_diameter=t.stabilizer.inner_diameter&&u(t.stabilizer.inner_diameter,"shortLength","in"),t.stabilizer.outer_diameter=t.stabilizer.outer_diameter&&u(t.stabilizer.outer_diameter,"shortLength","in"),t.stabilizer.linear_weight=t.stabilizer.linear_weight&&u(t.stabilizer.linear_weight,"massPerLength","lb-ft"),t.stabilizer.weight=t.stabilizer.weight&&u(t.stabilizer.weight,"mass","lb"),t.stabilizer.length=t.length&&u(t.stabilizer.length,"length","ft"),t.stabilizer.gauge_od=t.stabilizer.gauge_od&&u(t.stabilizer.gauge_od,"shortLength","in"),t.stabilizer.gauge_length=t.stabilizer.gauge_length&&u(t.stabilizer.gauge_length,"shortLength","in"),t.stabilizer.blade_width=t.stabilizer.blade_width&&u(t.stabilizer.blade_width,"shortLength","in"),t.stabilizer.stab_centerpoint_to_bit=t.stabilizer.stab_centerpoint_to_bit&&u(t.stabilizer.stab_centerpoint_to_bit,"length","ft"))}if("stabilizer"!==t.family&&"ags"!==t.family||(t.gauge_od=u(t.gauge_od,"shortLength","in"),t.gauge_length=u(t.gauge_length,"shortLength","in"),t.blade_width=u(t.blade_width,"shortLength","in")),("mwd"===t.family||"rss"===t.family||"agitator"===t.family)&&t.pressure_loss&&t.pressure_loss.length>0)for(var a=0;a<t.pressure_loss.length;a+=1){var l=t.pressure_loss[a];l.flow_rate=u(l.flow_rate,"volumeFlowRate","gal/min"),l.pressure_loss=u(l.pressure_loss,"pressure","psi")}return"bit"!==t.family&&delete t.bit_type,!t.has_gamma_sensor&&Number.isFinite(t.gamma_sensor_to_bit_distance)&&delete t.gamma_sensor_to_bit_distance,!t.has_survey_sensor&&Number.isFinite(t.bit_to_survey_distance)&&delete t.bit_to_survey_distance,!t.has_directional_sensor&&Number.isFinite(t.directional_sensor_to_bit_distance)&&delete t.directional_sensor_to_bit_distance,delete t.c_length,t})),l(l({},e),{},{data:o})}function u(e,t,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2;return null==e?null:t&&i?parseFloat(o(e,t,s(t),i,r)):parseFloat(e)}function f(e){var t=e.toJS().data,i=t.components;if(t.start_depth=c(t.start_depth,"length","ft"),i.length>0)if("bit"===i[0].family){i[0].c_length=i[0].length||0;for(var r=1;r<i.length;r+=1)i[r].c_length=parseFloat(i[r-1].c_length)+parseFloat(i[r].length||0)}else{var s=i.length-1;i[s].c_length=i[s].length||0;for(var o=s-1;o>=0;o-=1)i[o].c_length=parseFloat(i[o+1].c_length)+parseFloat(i[o].length||0)}for(var n=0;n<i.length;n+=1){var a=i[n];if(a.inner_diameter=c(a.inner_diameter,"shortLength","in"),a.outer_diameter=c(a.outer_diameter,"shortLength","in",4),a.linear_weight=c(a.linear_weight,"massPerLength","lb-ft"),a.weight=c(a.weight,"mass","lb"),a.length=c(a.length,"length","ft"),a.component_length=c(a.component_length,"length","ft"),a.outer_diameter_tooljoint=c(a.outer_diameter_tooljoint,"shortLength","in"),a.inner_diameter_tooljoint=c(a.inner_diameter_tooljoint,"shortLength","in"),a.length_tooljoint=c(a.length_tooljoint,"length","ft"),a.c_length=c(a.c_length,"length","ft"),a.gamma_sensor_to_bit_distance=c(a.gamma_sensor_to_bit_distance,"length","ft"),"bit"===a.family||"ur"===a.family){var _=c(1,"shortLength","in");if(a.size=c(a.size,"shortLength","in"),a.nozzle_sizes&&a.nozzle_sizes.length>0)for(var h=0;h<a.nozzle_sizes.length;h+=1){var g=a.nozzle_sizes[h];g.size=1!==_?c(g.size,"shortLength","in")/32:g.size}a.tfa=1!==_?a.tfa*(_*_):a.tfa}if("pdm"===a.family){if(a.max_weight_on_bit=c(a.max_weight_on_bit,"force","klbf"),a.min_standard_flowrate=c(a.min_standard_flowrate,"volumeFlowRate","gal/min"),a.max_standard_flowrate=c(a.max_standard_flowrate,"volumeFlowRate","gal/min"),a.max_operating_differential_pressure=c(a.max_operating_differential_pressure,"pressure","psi"),a.torque_at_max_operating_differential_pressure=c(a.torque_at_max_operating_differential_pressure,"torque","ft-klbf",3),a.off_bottom_pressure_loss&&a.off_bottom_pressure_loss.length>0)for(var m=0;m<a.off_bottom_pressure_loss.length;m+=1){var d=a.off_bottom_pressure_loss[m];d.flow_rate=c(d.flow_rate,"volumeFlowRate","gal/min"),d.pressure_loss=c(d.pressure_loss,"pressure","psi")}a.rpg=c(a.rpg,"revolutionPerVolume","rpg"),a.has_stabilizer&&a.stabilizer&&(a.stabilizer.inner_diameter=c(a.stabilizer.inner_diameter,"shortLength","in"),a.stabilizer.outer_diameter=c(a.stabilizer.outer_diameter,"shortLength","in"),a.stabilizer.linear_weight=c(a.stabilizer.linear_weight,"massPerLength","lb-ft"),a.stabilizer.weight=c(a.stabilizer.weight,"mass","lb"),a.stabilizer.length=c(a.stabilizer.length,"length","ft"),a.stabilizer.gauge_od=c(a.stabilizer.gauge_od,"shortLength","in"),a.stabilizer.gauge_length=c(a.stabilizer.gauge_length,"shortLength","in"),a.stabilizer.blade_width=c(a.stabilizer.blade_width,"shortLength","in"),a.stabilizer.stab_centerpoint_to_bit=c(a.stabilizer.stab_centerpoint_to_bit,"length","ft"))}if("stabilizer"!==a.family&&"ags"!==a.family||(a.gauge_od=c(a.gauge_od,"shortLength","in"),a.gauge_length=c(a.gauge_length,"shortLength","in"),a.blade_width=c(a.blade_width,"shortLength","in")),("mwd"===a.family||"rss"===a.family||"agitator"===a.family)&&a.pressure_loss&&a.pressure_loss.length>0)for(var u=0;u<a.pressure_loss.length;u+=1){var f=a.pressure_loss[u];f.flow_rate=c(f.flow_rate,"volumeFlowRate","gal/min"),f.pressure_loss=c(f.pressure_loss,"pressure","psi")}}return l(l({},e),{},{data:t})}function c(e,t,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2;return 0===e||e?t&&i?o(e,t,i,null,r):e:null}export{d as convertRecordBackToImperialUnit,f as convertRecordtoPrefUnit,u as ctoi,c as ctop,g as isValidLinearWeight,h as isValidNumber,_ as sValueEmpty,m as validate};
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"lodash/set";import i from"lodash/get";import r from"lodash/cloneDeep";import s from"moment";import{getUnitPreference as o,convertValue as n,getUnitDisplay as a}from"./convert.js";function l(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function _(t){for(var i=1;i<arguments.length;i++){var r=null!=arguments[i]?arguments[i]:{};i%2?l(Object(r),!0).forEach((function(i){e(t,i,r[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function h(e){return null==e||""===e}function g(e,t,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=r.isMinInclusive,o=void 0===s||s,n=parseFloat(e);return!Number.isNaN(n)&&(!(o&&n<t||!o&&n<=t)&&!(i&&n>i))}function m(e,t,i){var r=o("shortLength"),s=e,a=t;"in"!==r&&(s=n(e,"shortLength",r,"in"),a=n(t,"shortLength",r,"in"));var l=2.673*(a*a-s*s),_="in"!==r?n(l,"massPerLength","lb-ft"):l;return i>=.5*_&&i<=1.5*_}function d(e){var t=e.data,i=t.id,r=t.start_timestamp_str,o=t.start_depth,l=t.components,_=a("shortLength"),h=a("length"),d={general:{},components:{},specificErrors:{}},u=l.filter((function(e){return"bit"===e.family})),f=u.length>0?u[0].size:null,c=l.filter((function(e){return"mwd"===e.family&&e.has_gamma_sensor})),p=!1;if(isValueEmpty(i)&&(d.id="It should not be empty.",p=!0),r&&!s(new Date(r)).isValid()&&(p=!0,d.start_timestamp="Invalid Date."),Number.isFinite(o)){var v=n(0,"length","ft"),z=n(55e3,"length","ft"),w=n(1,"length","ft");(o<=v||o>z)&&(p=!0,d.start_depth="Should be a positive number ".concat(v.toFixed(2),"~").concat(z.toFixed(2)," (").concat(h,")")),o===w&&(p=!0,d.start_depth="Should not be equal to ".concat(w," (").concat(h,")"))}else p=!0,d.start_depth="It should not be empty.";for(var L=0;L<l.length;L+=1){var y=void 0,x=void 0,F=void 0,j=void 0,I=void 0,O=void 0,V=void 0,E=void 0,q=void 0,D=void 0,P=void 0,k=void 0,N=void 0,S=void 0,R=void 0,T=l[L],B={};switch(T.family){case"ct":y=n(0,"shortLength","in"),F=n(100,"shortLength","in"),x=n(1,"shortLength","in"),j=n(100,"shortLength","in"),S=n(0,"shortLength","in"),R=n(500,"shortLength","in"),V=n(0,"length","ft");break;case"dp":case"hwdp":y=n(1,"shortLength","in"),F=n(7,"shortLength","in"),x=n(2,"shortLength","in"),j=n(8,"shortLength","in"),E=n(1,"shortLength","in"),q=n(7,"shortLength","in"),D=n(2,"shortLength","in"),P=n(10,"shortLength","in"),V=n(0,"length","ft");break;case"dc":y=n(.5,"shortLength","in"),F=n(7,"shortLength","in"),x=n(2,"shortLength","in"),j=n(13,"shortLength","in"),V=n(0,"length","ft");break;case"stabilizer":case"ags":default:y=n(0,"shortLength","in"),F=n(100,"shortLength","in"),x=n(1,"shortLength","in"),j=n(100,"shortLength","in"),V=n(0,"length","ft");break;case"pdm":x=n(2,"shortLength","in"),j=n(15,"shortLength","in"),y=n(0,"shortLength","in"),F=n(12,"shortLength","in"),V=n(4,"length","ft"),N=0;break;case"mwd":case"agitator":case"rss":x=n(2,"shortLength","in"),j=n(13,"shortLength","in"),y=n(0,"shortLength","in"),F=n(12,"shortLength","in"),V=n(1,"length","ft"),k=0;break;case"ur":y=n(0,"shortLength","in"),F=n(50,"shortLength","in"),x=n(1,"shortLength","in"),j=n(50,"shortLength","in"),I=n(1,"shortLength","in"),O=n(50,"shortLength","in");case"bit":}if(isValueEmpty(y)||isValueEmpty(x)||(g(T.inner_diameter,y,F)||(B.inner_diameter="".concat(y.toFixed(1),"~").concat(F.toFixed(1)," (").concat(_,")"),p=!0),g(T.outer_diameter,x,j)||(B.outer_diameter="".concat(x.toFixed(1),"~").concat(j.toFixed(1)," (").concat(_,")"),p=!0),g(T.inner_diameter,y,F)&&g(T.outer_diameter,x,j)&&!g(T.inner_diameter,y,T.outer_diameter)&&(B.outer_diameter="O.D > I.D",p=!0),!B.outer_diameter&&f&&+T.outer_diameter+n(.1,"shortLength","in")>f&&(B.outer_diameter=" O.D + 0.1 < Bit Size",p=!0),g(T.linear_weight,0)||(B.linear_weight="Invalid value",p=!0),"dp"!==T.family&&"hwdp"!==T.family&&"dc"!==T.family&&"ct"!==T.family&&"ur"!==T.family||B.inner_diameter||B.outer_diameter||B.linear_weight||m(T.inner_diameter,T.outer_diameter,T.linear_weight)||(B.linear_weight="Invalid range",p=!0)),"ur"===T.family&&(g(T.ur_opened_od,I,O)?T.ur_opened_od<f&&(B.ur_opened_od="Max O.D (Opened) >= Bit Size",p=!0):(B.ur_opened_od="".concat(I.toFixed(1),"~").concat(O.toFixed(1)," (").concat(_,")"),p=!0)),isValueEmpty(E)||isValueEmpty(D)||(g(T.inner_diameter_tooljoint,E,q)||(B.inner_diameter_tooljoint="".concat(E.toFixed(1),"~").concat(q.toFixed(1)," (").concat(_,")"),p=!0),g(T.outer_diameter_tooljoint,D,P)||(B.outer_diameter_tooljoint="".concat(D.toFixed(1),"~").concat(P.toFixed(1)," (").concat(_,")"),p=!0),g(T.outer_diameter_tooljoint,T.outer_diameter,P)||(B.outer_diameter_tooljoint="Tool Joint O.D >= O.D",p=!0)),isValueEmpty(V)||g(T.length,V)||(B.length="Invalid value",p=!0),isValueEmpty(T.length_tooljoint)||isValueEmpty(T.component_length)||+T.length_tooljoint>+T.component_length&&(B.length_tooljoint="Tool Joint Length < Component Length",p=!0),T.off_bottom_pressure_loss&&T.off_bottom_pressure_loss.length>0){B.off_bottom_pressure_loss={};for(var M=0;M<T.off_bottom_pressure_loss.length;M+=1){var C=T.off_bottom_pressure_loss[M];B.off_bottom_pressure_loss[M]={},isValueEmpty(C.flow_rate)&&(B.off_bottom_pressure_loss[M].flow_rate="flow rate is required.",p=!0),isValueEmpty(C.pressure_loss)&&(B.off_bottom_pressure_loss[M].pressure_loss="pressure loss is required.",p=!0),isValueEmpty(N)||g(C.pressure_loss,N,null,{isMinInclusive:!1})||(B.off_bottom_pressure_loss[M].pressure_loss="Invalid range",p=!0)}}if(T.pressure_loss&&T.pressure_loss.length>0){B.pressure_loss={};for(var J=0;J<T.pressure_loss.length;J+=1){var A=T.pressure_loss[J];B.pressure_loss[J]={},isValueEmpty(A.flow_rate)&&(B.pressure_loss[J].flow_rate="flow rate is required.",p=!0),isValueEmpty(A.pressure_loss)&&(B.pressure_loss[J].pressure_loss="pressure loss is required.",p=!0),isValueEmpty(k)||g(A.pressure_loss,k,null,{isMinInclusive:!1})||(B.pressure_loss[J].pressure_loss="Invalid range",p=!0)}}if(T.has_stabilizer&&T.stabilizer){var G=n(0,"shortLength","in"),H=n(100,"shortLength","in"),K=n(1,"shortLength","in"),Q=n(100,"shortLength","in"),U=n(0,"length","ft");g(T.stabilizer.inner_diameter,G,H)&&g(T.stabilizer.outer_diameter,K,Q)&&!g(T.stabilizer.inner_diameter,y,T.stabilizer.outer_diameter)&&(B.stabilizer_outer_diameter="O.D > I.D",p=!0),g(T.stabilizer.inner_diameter,G,H)||(B.stabilizer_inner_diameter="".concat(G.toFixed(1),"~").concat(H.toFixed(1)," (").concat(_,")"),p=!0),g(T.stabilizer.outer_diameter,K,Q)||(B.stabilizer_outer_diameter="".concat(K.toFixed(1),"~").concat(Q.toFixed(1)," (").concat(_,")"),p=!0),isValueEmpty(U)||g(T.stabilizer.length,U)||(B.stabilizer_length="Invalid value",p=!0),isValueEmpty(T.stabilizer.linear_weight)&&(B.stabilizer_linear_weight="Invalid value",p=!0),!B.stabilizer_outer_diameter&&f&&+T.stabilizer.outer_diameter+n(.1,"shortLength","in")>f&&(B.stabilizer_outer_diameter=" O.D + 0.1 < Bit Size",p=!0)}if("ct"===T.family&&(g(T.reel_diameter,S,R)||(B.reel_diameter="".concat(S.toFixed(1),"~").concat(R.toFixed(1)," (").concat(_,")"),p=!0)),"bit"===T.family){var W=b(1,"shortLength","in"),X=W*W*0,Y=W*W*20;g(T.tfa,X,Y)||(B.tfa="TFA must be ".concat(X.toFixed(2),"~").concat(20..toFixed(2)),p=!0)}if("rss"===T.family&&(g(T.flow_loss_percentage,0,10)||(B.flow_loss_percentage="It must be ".concat(0,"~").concat(10),p=!0)),"mwd"===T.family&&(c.length>1?(B.gamma_sensor_to_bit_distance="Only 1 gamma sensor allowed. Currently ".concat(c.length),p=!0):T.has_gamma_sensor&&!Number.isFinite(T.gamma_sensor_to_bit_distance)&&(B.gamma_sensor_to_bit_distance="This field is required.",p=!0),T.has_survey_sensor&&!Number.isFinite(T.bit_to_survey_distance)?(B.bit_to_survey_distance="This field is required.",p=!0):T.has_survey_sensor&&T.bit_to_survey_distance<=0?(B.bit_to_survey_distance="Should be a positive number.",p=!0):T.has_survey_sensor&&T.bit_to_survey_distance>150&&(B.bit_to_survey_distance="Should be less then 150.",p=!0),T.has_directional_sensor&&!Number.isFinite(T.directional_sensor_to_bit_distance)?(B.directional_sensor_to_bit_distance="This field is required.",p=!0):T.has_directional_sensor&&T.directional_sensor_to_bit_distance<=0?(B.directional_sensor_to_bit_distance="Should be a positive number.",p=!0):T.has_directional_sensor&&T.directional_sensor_to_bit_distance>150&&(B.directional_sensor_to_bit_distance="Should be less then 150.",p=!0)),"pdm"===T.family){var Z=void 0,$=void 0;g(T.number_rotor_lobes,1,10)||(B.number_rotor_lobes="It must be ".concat(1,"~").concat(10),p=!0),g(T.number_stator_lobes,2,10)||(B.number_stator_lobes="It must be ".concat(2,"~").concat(10),p=!0),g(T.rpg,0,10)||(B.rpg="It must be ".concat(0,"~").concat(10),p=!0),Z=n(0,"force","klbf"),$=n(200,"force","klbf"),isValueEmpty(T.max_weight_on_bit)||g(T.max_weight_on_bit,Z,$)||(B.max_weight_on_bit="It must be ".concat($.toFixed(2),"~").concat($.toFixed(2)),p=!0),Z=n(0,"volumeFlowRate","gal/min"),$=n(2500,"volumeFlowRate","gal/min"),g(T.min_standard_flowrate,Z,$)||(B.min_standard_flowrate="It must be ".concat(Z.toFixed(2),"~").concat($.toFixed(2)),p=!0),g(T.max_standard_flowrate,Z,$)||(B.max_standard_flowrate="It must be ".concat(Z.toFixed(2),"~").concat($.toFixed(2)),p=!0),Z=n(0,"pressure","psi"),$=n(3e3,"pressure","psi"),g(T.max_operating_differential_pressure,Z,$)||(B.max_operating_differential_pressure="It must be ".concat(Z.toFixed(2),"~").concat($.toFixed(2)),p=!0),Z=n(0,"torque","ft-klbf"),$=n(40,"torque","ft-klbf"),g(T.torque_at_max_operating_differential_pressure,Z,$)||(B.torque_at_max_operating_differential_pressure="It must be ".concat(Z.toFixed(2),"~").concat($.toFixed(2)),p=!0),g(T.flow_loss_percentage,0,20)||(B.flow_loss_percentage="It must be ".concat(0,"~").concat(20),p=!0)}d.components[T.id]=B}return 1!==u.length&&(d.general.bit_count='Number of "BIT" components is invalid.',p=!0),1===u.length&&"bit"!==l[l.length-1].family&&"bit"!==l[0].family&&(d.general.bit_position='"BIT" category should be on the bottom of the list.',p=!0),p?d:null}function u(e){var o=i(e,["data","components"]);"bit"===i(o,[0,"family"])&&(o=o.reverse().map((function(e,t){return _(_({},e),{},{order:t})})),e=t(e,["data","components"],o));var n=r(e).data,a=n.start_timestamp_str&&s(new Date(n.start_timestamp_str));return a&&a.isValid()&&(n.start_timestamp=a.unix()),delete n.start_timestamp_str,n.start_depth=f(n.start_depth,"length","ft"),n.components=n.components.map((function(e){var t=Object.assign({},e);if(t.inner_diameter=f(t.inner_diameter,"shortLength","in"),t.outer_diameter=f(t.outer_diameter,"shortLength","in",4),t.linear_weight=f(t.linear_weight,"massPerLength","lb-ft"),t.weight=f(t.weight,"mass","lb"),t.length=f(t.length,"length","ft"),t.component_length=f(t.component_length,"length","ft"),t.outer_diameter_tooljoint=f(t.outer_diameter_tooljoint,"shortLength","in"),t.inner_diameter_tooljoint=f(t.inner_diameter_tooljoint,"shortLength","in"),t.length_tooljoint=f(t.length_tooljoint,"length","ft"),"bit"===t.family||"ur"===t.family){var i=f(1,"shortLength","in");if(t.size=f(t.size,"shortLength","in",3),t.nozzle_sizes&&t.nozzle_sizes.length>0)for(var r=0;r<t.nozzle_sizes.length;r+=1){var s=t.nozzle_sizes[r];s.size=1!==i?32*f(s.size,"shortLength","in"):s.size}t.tfa=1!==i?t.tfa*(i*i):t.tfa}if("pdm"===t.family){if(t.max_weight_on_bit=f(t.max_weight_on_bit,"force","klbf"),t.min_standard_flowrate=f(t.min_standard_flowrate,"volumeFlowRate","gal/min"),t.max_standard_flowrate=f(t.max_standard_flowrate,"volumeFlowRate","gal/min"),t.max_operating_differential_pressure=f(t.max_operating_differential_pressure,"pressure","psi"),t.torque_at_max_operating_differential_pressure=f(t.torque_at_max_operating_differential_pressure,"torque","ft-klbf",3),t.rpg=f(t.rpg,"revolutionPerVolume","rpg"),t.off_bottom_pressure_loss&&t.off_bottom_pressure_loss.length>0)for(var o=0;o<t.off_bottom_pressure_loss.length;o+=1){var n=t.off_bottom_pressure_loss[o];n.flow_rate=f(n.flow_rate,"volumeFlowRate","gal/min"),n.pressure_loss=f(n.pressure_loss,"pressure","psi")}t.has_stabilizer||delete t.stabilizer,t.stabilizer&&(t.stabilizer.inner_diameter=t.stabilizer.inner_diameter&&f(t.stabilizer.inner_diameter,"shortLength","in"),t.stabilizer.outer_diameter=t.stabilizer.outer_diameter&&f(t.stabilizer.outer_diameter,"shortLength","in"),t.stabilizer.linear_weight=t.stabilizer.linear_weight&&f(t.stabilizer.linear_weight,"massPerLength","lb-ft"),t.stabilizer.weight=t.stabilizer.weight&&f(t.stabilizer.weight,"mass","lb"),t.stabilizer.length=t.length&&f(t.stabilizer.length,"length","ft"),t.stabilizer.gauge_od=t.stabilizer.gauge_od&&f(t.stabilizer.gauge_od,"shortLength","in"),t.stabilizer.gauge_length=t.stabilizer.gauge_length&&f(t.stabilizer.gauge_length,"shortLength","in"),t.stabilizer.blade_width=t.stabilizer.blade_width&&f(t.stabilizer.blade_width,"shortLength","in"),t.stabilizer.stab_centerpoint_to_bit=t.stabilizer.stab_centerpoint_to_bit&&f(t.stabilizer.stab_centerpoint_to_bit,"length","ft"))}if("stabilizer"!==t.family&&"ags"!==t.family||(t.gauge_od=f(t.gauge_od,"shortLength","in"),t.gauge_length=f(t.gauge_length,"shortLength","in"),t.blade_width=f(t.blade_width,"shortLength","in")),("mwd"===t.family||"rss"===t.family||"agitator"===t.family)&&t.pressure_loss&&t.pressure_loss.length>0)for(var a=0;a<t.pressure_loss.length;a+=1){var l=t.pressure_loss[a];l.flow_rate=f(l.flow_rate,"volumeFlowRate","gal/min"),l.pressure_loss=f(l.pressure_loss,"pressure","psi")}return"bit"!==t.family&&delete t.bit_type,!t.has_gamma_sensor&&Number.isFinite(t.gamma_sensor_to_bit_distance)&&delete t.gamma_sensor_to_bit_distance,!t.has_survey_sensor&&Number.isFinite(t.bit_to_survey_distance)&&delete t.bit_to_survey_distance,!t.has_directional_sensor&&Number.isFinite(t.directional_sensor_to_bit_distance)&&delete t.directional_sensor_to_bit_distance,delete t.c_length,t})),_(_({},e),{},{data:n})}function f(e,t,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2;return null==e?null:t&&i?parseFloat(n(e,t,o(t),i,r)):parseFloat(e)}function c(e){var t=r(e).data,i=t.components;if(t.start_depth=b(t.start_depth,"length","ft"),i.length>0)if("bit"===i[0].family){i[0].c_length=i[0].length||0;for(var s=1;s<i.length;s+=1)i[s].c_length=parseFloat(i[s-1].c_length)+parseFloat(i[s].length||0)}else{var o=i.length-1;i[o].c_length=i[o].length||0;for(var n=o-1;n>=0;n-=1)i[n].c_length=parseFloat(i[n+1].c_length)+parseFloat(i[n].length||0)}for(var a=0;a<i.length;a+=1){var l=i[a];if(l.inner_diameter=b(l.inner_diameter,"shortLength","in"),l.outer_diameter=b(l.outer_diameter,"shortLength","in",4),l.linear_weight=b(l.linear_weight,"massPerLength","lb-ft"),l.weight=b(l.weight,"mass","lb"),l.length=b(l.length,"length","ft"),l.component_length=b(l.component_length,"length","ft"),l.outer_diameter_tooljoint=b(l.outer_diameter_tooljoint,"shortLength","in"),l.inner_diameter_tooljoint=b(l.inner_diameter_tooljoint,"shortLength","in"),l.length_tooljoint=b(l.length_tooljoint,"length","ft"),l.c_length=b(l.c_length,"length","ft"),l.gamma_sensor_to_bit_distance=b(l.gamma_sensor_to_bit_distance,"length","ft"),"bit"===l.family||"ur"===l.family){var h=b(1,"shortLength","in");if(l.size=b(l.size,"shortLength","in"),l.nozzle_sizes&&l.nozzle_sizes.length>0)for(var g=0;g<l.nozzle_sizes.length;g+=1){var m=l.nozzle_sizes[g];m.size=1!==h?b(m.size,"shortLength","in")/32:m.size}l.tfa=1!==h?l.tfa*(h*h):l.tfa}if("pdm"===l.family){if(l.max_weight_on_bit=b(l.max_weight_on_bit,"force","klbf"),l.min_standard_flowrate=b(l.min_standard_flowrate,"volumeFlowRate","gal/min"),l.max_standard_flowrate=b(l.max_standard_flowrate,"volumeFlowRate","gal/min"),l.max_operating_differential_pressure=b(l.max_operating_differential_pressure,"pressure","psi"),l.torque_at_max_operating_differential_pressure=b(l.torque_at_max_operating_differential_pressure,"torque","ft-klbf",3),l.off_bottom_pressure_loss&&l.off_bottom_pressure_loss.length>0)for(var d=0;d<l.off_bottom_pressure_loss.length;d+=1){var u=l.off_bottom_pressure_loss[d];u.flow_rate=b(u.flow_rate,"volumeFlowRate","gal/min"),u.pressure_loss=b(u.pressure_loss,"pressure","psi")}l.rpg=b(l.rpg,"revolutionPerVolume","rpg"),l.has_stabilizer&&l.stabilizer&&(l.stabilizer.inner_diameter=b(l.stabilizer.inner_diameter,"shortLength","in"),l.stabilizer.outer_diameter=b(l.stabilizer.outer_diameter,"shortLength","in"),l.stabilizer.linear_weight=b(l.stabilizer.linear_weight,"massPerLength","lb-ft"),l.stabilizer.weight=b(l.stabilizer.weight,"mass","lb"),l.stabilizer.length=b(l.stabilizer.length,"length","ft"),l.stabilizer.gauge_od=b(l.stabilizer.gauge_od,"shortLength","in"),l.stabilizer.gauge_length=b(l.stabilizer.gauge_length,"shortLength","in"),l.stabilizer.blade_width=b(l.stabilizer.blade_width,"shortLength","in"),l.stabilizer.stab_centerpoint_to_bit=b(l.stabilizer.stab_centerpoint_to_bit,"length","ft"))}if("stabilizer"!==l.family&&"ags"!==l.family||(l.gauge_od=b(l.gauge_od,"shortLength","in"),l.gauge_length=b(l.gauge_length,"shortLength","in"),l.blade_width=b(l.blade_width,"shortLength","in")),("mwd"===l.family||"rss"===l.family||"agitator"===l.family)&&l.pressure_loss&&l.pressure_loss.length>0)for(var f=0;f<l.pressure_loss.length;f+=1){var c=l.pressure_loss[f];c.flow_rate=b(c.flow_rate,"volumeFlowRate","gal/min"),c.pressure_loss=b(c.pressure_loss,"pressure","psi")}}return _(_({},e),{},{data:t})}function b(e,t,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2;return 0===e||e?t&&i?n(e,t,i,null,r):e:null}export{u as convertRecordBackToImperialUnit,c as convertRecordtoPrefUnit,f as ctoi,b as ctop,m as isValidLinearWeight,g as isValidNumber,h as sValueEmpty,d as validate};
|
|
2
2
|
//# sourceMappingURL=DrillstringUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrillstringUtils.js","sources":["../../src/utils/DrillstringUtils.js"],"sourcesContent":["/************ deprecated DO NOT USE IT ************************/\n/************ new version in drillstring folder */\n/* eslint-disable camelcase */\nimport set from 'lodash/set';\nimport get from 'lodash/get';\nimport moment from 'moment';\n\nimport { getUnitPreference, convertValue, getUnitDisplay } from './convert';\n\nconst ALLOWED_DIFF_OD_BIT_SIZE = 0.1;\n\nconst DEF_MIN_ID = 0;\nconst DEF_MAX_ID = 100;\nconst DEF_MIN_OD = 1;\nconst DEF_MAX_OD = 100;\nconst DEF_MIN_LENGTH = 0;\n\nconst UR_MIN_ID = 0;\nconst UR_MAX_ID = 50;\nconst UR_MIN_BODY_OD = 1;\nconst UR_MAX_BODY_OD = 50;\nconst UR_MIN_OPENED_OD = 1;\nconst UR_MAX_OPENED_OD = 50;\n\nconst CT_MIN_ID = 0;\nconst CT_MAX_ID = 100;\nconst CT_MIN_OD = 1;\nconst CT_MAX_OD = 100;\nconst CT_MIN_RD = 0;\nconst CT_MAX_RD = 500;\nconst CT_MIN_LENGTH = 0;\n\nconst DP_MIN_ID = 1;\nconst DP_MAX_ID = 7;\nconst DP_MIN_OD = 2;\nconst DP_MAX_OD = 8;\nconst DP_MIN_TJ_ID = 1;\nconst DP_MAX_TJ_ID = 7;\nconst DP_MIN_TJ_OD = 2;\nconst DP_MAX_TJ_OD = 10;\nconst DP_MIN_LENGTH = 0;\n\nconst HWDP_MIN_ID = 1;\nconst HWDP_MAX_ID = 7;\nconst HWDP_MIN_OD = 2;\nconst HWDP_MAX_OD = 8;\nconst HWDP_MIN_TJ_ID = 1;\nconst HWDP_MAX_TJ_ID = 7;\nconst HWDP_MIN_TJ_OD = 2;\nconst HWDP_MAX_TJ_OD = 10;\nconst HWDP_MIN_LENGTH = 0;\n\nconst DC_MIN_ID = 0.5;\nconst DC_MAX_ID = 7;\nconst DC_MIN_OD = 2;\nconst DC_MAX_OD = 13;\nconst DC_MIN_LENGTH = 0;\n\nconst STABLE_MIN_ID = 0;\nconst STABLE_MAX_ID = 100;\nconst STABLE_MIN_OD = 1;\nconst STABLE_MAX_OD = 100;\nconst STABLE_MIN_LENGTH = 0;\n\nconst PDM_MIN_OD = 2;\nconst PDM_MAX_OD = 15;\nconst PDM_MIN_ID = 0;\nconst PDM_MAX_ID = 12;\nconst PDM_MIN_LENGTH = 4;\n\nconst PDM_MIN_STATOR = 2;\nconst PDM_MAX_STATOR = 10;\nconst PDM_MIN_ROTOR = 1;\nconst PDM_MAX_ROTOR = 10;\nconst PDM_MIN_RPG = 0;\nconst PDM_MAX_RPG = 10;\nconst PDM_MIN_WOB = 0;\nconst PDM_MAX_WOB = 200;\nconst PDM_MIN_FLOW_RANGE = 0;\nconst PDM_MAX_FLOW_RANGE = 2500;\nconst PDM_MIN_MODP = 0;\nconst PDM_MAX_MODP = 3000;\nconst PDM_MIN_TMODP = 0;\nconst PDM_MAX_TMODP = 40;\nconst PDM_MIN_FLOW_LOSS = 0;\nconst PDM_MAX_FLOW_LOSS = 20;\nconst PDM_MIN_OFF_BOTTOM_PRESSURE_LOSS = 0;\n\nconst MWD_MIN_ID = 0;\nconst MWD_MAX_ID = 12;\nconst MWD_MIN_OD = 2;\nconst MWD_MAX_OD = 13;\nconst MWD_MIN_LENGTH = 1.0;\nconst MWD_MIN_PRESSURE_LOSS = 0;\n\nconst RSS_MIN_ID = 0;\nconst RSS_MAX_ID = 12;\nconst RSS_MIN_OD = 2;\nconst RSS_MAX_OD = 13;\nconst RSS_MIN_LENGTH = 1.0;\nconst RSS_MIN_FLOW_LOSS = 0;\nconst RSS_MAX_FLOW_LOSS = 10;\nconst RSS_MIN_PRESSURE_LOSS = 0;\n\nconst AGITATOR_MIN_ID = 0;\nconst AGITATOR_MAX_ID = 12;\nconst AGITATOR_MIN_OD = 2;\nconst AGITATOR_MAX_OD = 13;\nconst AGITATOR_MIN_LENGTH = 1.0;\nconst AGITATOR_MIN_PRESSURE_LOSS = 0;\n\nconst BIT_MIN_TFA = 0;\nconst BIT_MAX_TFA = 20;\n\nconst DEPTH_IN_HOLE_MIN = 0;\nconst DEPTH_IN_HOLE_MAX = 55000;\nconst DEPTH_IN_HOLE_PROHIBITED = 1;\n\nexport function sValueEmpty(val) {\n return val === null || typeof val === 'undefined' || val === '';\n}\n\nexport function isValidNumber(num, min, max, { isMinInclusive = true } = {}) {\n const parsedNum = parseFloat(num);\n if (Number.isNaN(parsedNum)) {\n return false;\n }\n if ((isMinInclusive && parsedNum < min) || (!isMinInclusive && parsedNum <= min)) {\n return false;\n }\n\n if (max && parsedNum > max) {\n return false;\n }\n\n return true;\n}\n\nexport function isValidLinearWeight(id, od, linearWeight) {\n const prefShortLengthUnit = getUnitPreference('shortLength');\n let convertedId = id;\n let convertedOd = od;\n if (prefShortLengthUnit !== 'in') {\n convertedId = convertValue(id, 'shortLength', prefShortLengthUnit, 'in');\n convertedOd = convertValue(od, 'shortLength', prefShortLengthUnit, 'in');\n }\n\n const estimation = 2.673 * (convertedOd * convertedOd - convertedId * convertedId);\n\n const convertedEstimation =\n prefShortLengthUnit !== 'in' ? convertValue(estimation, 'massPerLength', 'lb-ft') : estimation;\n\n return linearWeight >= convertedEstimation * 0.5 && linearWeight <= convertedEstimation * 1.5;\n}\n\nexport function validate(recordData) {\n const {\n data: { id, start_timestamp_str, start_depth, components },\n } = recordData.toJS();\n const shortLengthUnitDisplay = getUnitDisplay('shortLength');\n const lengthUnitDisplay = getUnitDisplay('length');\n const errors = {\n general: {},\n components: {},\n specificErrors: {},\n };\n const bitComponents = components.filter(comp => comp.family === 'bit');\n const bitSize = bitComponents.length > 0 ? bitComponents[0].size : null;\n const mwdHavingGamma = components.filter(comp => comp.family === 'mwd' && comp.has_gamma_sensor);\n let hasFormErrors = false;\n\n if (isValueEmpty(id)) {\n errors.id = 'It should not be empty.';\n hasFormErrors = true;\n }\n\n if (start_timestamp_str && !moment(new Date(start_timestamp_str)).isValid()) {\n hasFormErrors = true;\n errors.start_timestamp = 'Invalid Date.';\n }\n\n if (Number.isFinite(start_depth)) {\n const minDepth = convertValue(DEPTH_IN_HOLE_MIN, 'length', 'ft');\n const maxDepth = convertValue(DEPTH_IN_HOLE_MAX, 'length', 'ft');\n const prohibitedDepth = convertValue(DEPTH_IN_HOLE_PROHIBITED, 'length', 'ft');\n if (start_depth <= minDepth || start_depth > maxDepth) {\n hasFormErrors = true;\n errors.start_depth = `Should be a positive number ${minDepth.toFixed(2)}~${maxDepth.toFixed(\n 2\n )} (${lengthUnitDisplay})`;\n }\n if (start_depth === prohibitedDepth) {\n hasFormErrors = true;\n errors.start_depth = `Should not be equal to ${prohibitedDepth} (${lengthUnitDisplay})`;\n }\n } else {\n hasFormErrors = true;\n errors.start_depth = 'It should not be empty.';\n }\n\n for (let i = 0; i < components.length; i += 1) {\n let min_id;\n let min_od;\n let max_id;\n let max_od;\n let min_opened_od;\n let max_opened_od;\n let min_length;\n let min_tj_id;\n let max_tj_id;\n let min_tj_od;\n let max_tj_od;\n let min_pressure_loss;\n let min_off_bottom_pressure_loss;\n let min_rd;\n let max_rd;\n\n const comp = components[i];\n const error = {};\n switch (comp.family) {\n case 'ct':\n min_id = convertValue(CT_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(CT_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(CT_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(CT_MAX_OD, 'shortLength', 'in');\n min_rd = convertValue(CT_MIN_RD, 'shortLength', 'in');\n max_rd = convertValue(CT_MAX_RD, 'shortLength', 'in');\n min_length = convertValue(CT_MIN_LENGTH, 'length', 'ft');\n break;\n\n case 'dp':\n min_id = convertValue(DP_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(DP_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(DP_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(DP_MAX_OD, 'shortLength', 'in');\n min_tj_id = convertValue(DP_MIN_TJ_ID, 'shortLength', 'in');\n max_tj_id = convertValue(DP_MAX_TJ_ID, 'shortLength', 'in');\n min_tj_od = convertValue(DP_MIN_TJ_OD, 'shortLength', 'in');\n max_tj_od = convertValue(DP_MAX_TJ_OD, 'shortLength', 'in');\n min_length = convertValue(DP_MIN_LENGTH, 'length', 'ft');\n break;\n\n case 'hwdp':\n min_id = convertValue(HWDP_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(HWDP_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(HWDP_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(HWDP_MAX_OD, 'shortLength', 'in');\n min_tj_id = convertValue(HWDP_MIN_TJ_ID, 'shortLength', 'in');\n max_tj_id = convertValue(HWDP_MAX_TJ_ID, 'shortLength', 'in');\n min_tj_od = convertValue(HWDP_MIN_TJ_OD, 'shortLength', 'in');\n max_tj_od = convertValue(HWDP_MAX_TJ_OD, 'shortLength', 'in');\n min_length = convertValue(HWDP_MIN_LENGTH, 'length', 'ft');\n break;\n\n case 'dc':\n min_id = convertValue(DC_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(DC_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(DC_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(DC_MAX_OD, 'shortLength', 'in');\n min_length = convertValue(DC_MIN_LENGTH, 'length', 'ft');\n break;\n\n case 'stabilizer':\n case 'ags':\n min_id = convertValue(STABLE_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(STABLE_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(STABLE_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(STABLE_MAX_OD, 'shortLength', 'in');\n min_length = convertValue(STABLE_MIN_LENGTH, 'length', 'ft');\n break;\n\n case 'pdm':\n min_od = convertValue(PDM_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(PDM_MAX_OD, 'shortLength', 'in');\n min_id = convertValue(PDM_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(PDM_MAX_ID, 'shortLength', 'in');\n min_length = convertValue(PDM_MIN_LENGTH, 'length', 'ft');\n min_off_bottom_pressure_loss = PDM_MIN_OFF_BOTTOM_PRESSURE_LOSS;\n break;\n\n case 'mwd':\n min_od = convertValue(MWD_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(MWD_MAX_OD, 'shortLength', 'in');\n min_id = convertValue(MWD_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(MWD_MAX_ID, 'shortLength', 'in');\n min_length = convertValue(MWD_MIN_LENGTH, 'length', 'ft');\n min_pressure_loss = MWD_MIN_PRESSURE_LOSS;\n break;\n\n case 'agitator':\n min_od = convertValue(AGITATOR_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(AGITATOR_MAX_OD, 'shortLength', 'in');\n min_id = convertValue(AGITATOR_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(AGITATOR_MAX_ID, 'shortLength', 'in');\n min_length = convertValue(AGITATOR_MIN_LENGTH, 'length', 'ft');\n min_pressure_loss = AGITATOR_MIN_PRESSURE_LOSS;\n break;\n\n case 'rss':\n min_od = convertValue(RSS_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(RSS_MAX_OD, 'shortLength', 'in');\n min_id = convertValue(RSS_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(RSS_MAX_ID, 'shortLength', 'in');\n min_length = convertValue(RSS_MIN_LENGTH, 'length', 'ft');\n min_pressure_loss = RSS_MIN_PRESSURE_LOSS;\n break;\n\n case 'ur':\n min_id = convertValue(UR_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(UR_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(UR_MIN_BODY_OD, 'shortLength', 'in');\n max_od = convertValue(UR_MAX_BODY_OD, 'shortLength', 'in');\n min_opened_od = convertValue(UR_MIN_OPENED_OD, 'shortLength', 'in');\n max_opened_od = convertValue(UR_MAX_OPENED_OD, 'shortLength', 'in');\n break;\n\n case 'bit':\n break;\n\n default:\n min_id = convertValue(DEF_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(DEF_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(DEF_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(DEF_MAX_OD, 'shortLength', 'in');\n min_length = convertValue(DEF_MIN_LENGTH, 'length', 'ft');\n break;\n }\n\n if (!isValueEmpty(min_id) && !isValueEmpty(min_od)) {\n if (!isValidNumber(comp.inner_diameter, min_id, max_id)) {\n error.inner_diameter = `${min_id.toFixed(1)}~${max_id.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.outer_diameter, min_od, max_od)) {\n error.outer_diameter = `${min_od.toFixed(1)}~${max_od.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n\n if (\n isValidNumber(comp.inner_diameter, min_id, max_id) &&\n isValidNumber(comp.outer_diameter, min_od, max_od) &&\n !isValidNumber(comp.inner_diameter, min_id, comp.outer_diameter)\n ) {\n error.outer_diameter = 'O.D > I.D';\n hasFormErrors = true;\n }\n\n if (!error.outer_diameter && bitSize) {\n if (\n +comp.outer_diameter + convertValue(ALLOWED_DIFF_OD_BIT_SIZE, 'shortLength', 'in') >\n bitSize\n ) {\n error.outer_diameter = ' O.D + 0.1 < Bit Size';\n hasFormErrors = true;\n }\n }\n\n // only check validity of linear weight when family is not bit\n if (!isValidNumber(comp.linear_weight, 0)) {\n error.linear_weight = 'Invalid value';\n hasFormErrors = true;\n }\n\n if (\n comp.family === 'dp' ||\n comp.family === 'hwdp' ||\n comp.family === 'dc' ||\n comp.family === 'ct' ||\n comp.family === 'ur'\n ) {\n if (!error.inner_diameter && !error.outer_diameter && !error.linear_weight) {\n if (!isValidLinearWeight(comp.inner_diameter, comp.outer_diameter, comp.linear_weight)) {\n error.linear_weight = 'Invalid range';\n hasFormErrors = true;\n }\n }\n }\n }\n if (comp.family === 'ur') {\n if (!isValidNumber(comp.ur_opened_od, min_opened_od, max_opened_od)) {\n error.ur_opened_od = `${min_opened_od.toFixed(1)}~${max_opened_od.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n } else if (comp.ur_opened_od < bitSize) {\n error.ur_opened_od = 'Max O.D (Opened) >= Bit Size';\n hasFormErrors = true;\n }\n }\n\n if (!isValueEmpty(min_tj_id) && !isValueEmpty(min_tj_od)) {\n if (!isValidNumber(comp.inner_diameter_tooljoint, min_tj_id, max_tj_id)) {\n error.inner_diameter_tooljoint = `${min_tj_id.toFixed(1)}~${max_tj_id.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.outer_diameter_tooljoint, min_tj_od, max_tj_od)) {\n error.outer_diameter_tooljoint = `${min_tj_od.toFixed(1)}~${max_tj_od.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.outer_diameter_tooljoint, comp.outer_diameter, max_tj_od)) {\n error.outer_diameter_tooljoint = 'Tool Joint O.D >= O.D';\n hasFormErrors = true;\n }\n }\n\n if (!isValueEmpty(min_length)) {\n if (!isValidNumber(comp.length, min_length)) {\n error.length = 'Invalid value';\n hasFormErrors = true;\n }\n }\n\n if (!isValueEmpty(comp.length_tooljoint) && !isValueEmpty(comp.component_length)) {\n if (+comp.length_tooljoint > +comp.component_length) {\n error.length_tooljoint = 'Tool Joint Length < Component Length';\n hasFormErrors = true;\n }\n }\n\n if (comp.off_bottom_pressure_loss && comp.off_bottom_pressure_loss.length > 0) {\n error.off_bottom_pressure_loss = {};\n for (let j = 0; j < comp.off_bottom_pressure_loss.length; j += 1) {\n const obpsItem = comp.off_bottom_pressure_loss[j];\n error.off_bottom_pressure_loss[j] = {};\n if (isValueEmpty(obpsItem.flow_rate)) {\n error.off_bottom_pressure_loss[j].flow_rate = 'flow rate is required.';\n hasFormErrors = true;\n }\n if (isValueEmpty(obpsItem.pressure_loss)) {\n error.off_bottom_pressure_loss[j].pressure_loss = 'pressure loss is required.';\n hasFormErrors = true;\n }\n if (\n !isValueEmpty(min_off_bottom_pressure_loss) &&\n !isValidNumber(obpsItem.pressure_loss, min_off_bottom_pressure_loss, null, {\n isMinInclusive: false,\n })\n ) {\n error.off_bottom_pressure_loss[j].pressure_loss = 'Invalid range';\n hasFormErrors = true;\n }\n }\n }\n\n if (comp.pressure_loss && comp.pressure_loss.length > 0) {\n error.pressure_loss = {};\n for (let j = 0; j < comp.pressure_loss.length; j += 1) {\n const pressureLossItem = comp.pressure_loss[j];\n error.pressure_loss[j] = {};\n if (isValueEmpty(pressureLossItem.flow_rate)) {\n error.pressure_loss[j].flow_rate = 'flow rate is required.';\n hasFormErrors = true;\n }\n if (isValueEmpty(pressureLossItem.pressure_loss)) {\n error.pressure_loss[j].pressure_loss = 'pressure loss is required.';\n hasFormErrors = true;\n }\n if (\n !isValueEmpty(min_pressure_loss) &&\n !isValidNumber(pressureLossItem.pressure_loss, min_pressure_loss, null, {\n isMinInclusive: false,\n })\n ) {\n error.pressure_loss[j].pressure_loss = 'Invalid range';\n hasFormErrors = true;\n }\n }\n }\n\n if (comp.has_stabilizer && comp.stabilizer) {\n const stab_min_id = convertValue(STABLE_MIN_ID, 'shortLength', 'in');\n const stab_max_id = convertValue(STABLE_MAX_ID, 'shortLength', 'in');\n const stab_min_od = convertValue(STABLE_MIN_OD, 'shortLength', 'in');\n const stab_max_od = convertValue(STABLE_MAX_OD, 'shortLength', 'in');\n const stab_min_length = convertValue(STABLE_MIN_LENGTH, 'length', 'ft');\n\n if (\n isValidNumber(comp.stabilizer.inner_diameter, stab_min_id, stab_max_id) &&\n isValidNumber(comp.stabilizer.outer_diameter, stab_min_od, stab_max_od) &&\n !isValidNumber(comp.stabilizer.inner_diameter, min_id, comp.stabilizer.outer_diameter)\n ) {\n error.stabilizer_outer_diameter = 'O.D > I.D';\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.stabilizer.inner_diameter, stab_min_id, stab_max_id)) {\n error.stabilizer_inner_diameter = `${stab_min_id.toFixed(1)}~${stab_max_id.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n if (!isValidNumber(comp.stabilizer.outer_diameter, stab_min_od, stab_max_od)) {\n error.stabilizer_outer_diameter = `${stab_min_od.toFixed(1)}~${stab_max_od.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n if (!isValueEmpty(stab_min_length)) {\n if (!isValidNumber(comp.stabilizer.length, stab_min_length)) {\n error.stabilizer_length = 'Invalid value';\n hasFormErrors = true;\n }\n }\n if (isValueEmpty(comp.stabilizer.linear_weight)) {\n error.stabilizer_linear_weight = 'Invalid value';\n hasFormErrors = true;\n }\n if (!error.stabilizer_outer_diameter && bitSize) {\n if (\n +comp.stabilizer.outer_diameter +\n convertValue(ALLOWED_DIFF_OD_BIT_SIZE, 'shortLength', 'in') >\n bitSize\n ) {\n error.stabilizer_outer_diameter = ' O.D + 0.1 < Bit Size';\n hasFormErrors = true;\n }\n }\n }\n\n // specificErrors\n if (comp.family === 'ct') {\n if (!isValidNumber(comp.reel_diameter, min_rd, max_rd)) {\n error.reel_diameter = `${min_rd.toFixed(1)}~${max_rd.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n }\n\n if (comp.family === 'bit') {\n const ratio = ctop(1, 'shortLength', 'in');\n const lowerLimit = BIT_MIN_TFA * (ratio * ratio);\n const upperLimit = BIT_MAX_TFA * (ratio * ratio);\n if (!isValidNumber(comp.tfa, lowerLimit, upperLimit)) {\n error.tfa = `TFA must be ${lowerLimit.toFixed(2)}~${BIT_MAX_TFA.toFixed(2)}`;\n hasFormErrors = true;\n }\n }\n\n if (comp.family === 'rss') {\n if (!isValidNumber(comp.flow_loss_percentage, RSS_MIN_FLOW_LOSS, RSS_MAX_FLOW_LOSS)) {\n error.flow_loss_percentage = `It must be ${RSS_MIN_FLOW_LOSS}~${RSS_MAX_FLOW_LOSS}`;\n hasFormErrors = true;\n }\n }\n\n if (comp.family === 'mwd') {\n if (mwdHavingGamma.length > 1) {\n error.gamma_sensor_to_bit_distance = `Only 1 gamma sensor allowed. Currently ${mwdHavingGamma.length}`;\n hasFormErrors = true;\n } else if (comp.has_gamma_sensor && !Number.isFinite(comp.gamma_sensor_to_bit_distance)) {\n error.gamma_sensor_to_bit_distance = 'This field is required.';\n hasFormErrors = true;\n }\n\n if (comp.has_survey_sensor && !Number.isFinite(comp.bit_to_survey_distance)) {\n error.bit_to_survey_distance = 'This field is required.';\n hasFormErrors = true;\n } else if (comp.has_survey_sensor && comp.bit_to_survey_distance <= 0) {\n error.bit_to_survey_distance = 'Should be a positive number.';\n hasFormErrors = true;\n } else if (comp.has_survey_sensor && comp.bit_to_survey_distance > 150) {\n error.bit_to_survey_distance = 'Should be less then 150.';\n hasFormErrors = true;\n }\n\n if (\n comp.has_directional_sensor &&\n !Number.isFinite(comp.directional_sensor_to_bit_distance)\n ) {\n error.directional_sensor_to_bit_distance = 'This field is required.';\n hasFormErrors = true;\n } else if (comp.has_directional_sensor && comp.directional_sensor_to_bit_distance <= 0) {\n error.directional_sensor_to_bit_distance = 'Should be a positive number.';\n hasFormErrors = true;\n } else if (comp.has_directional_sensor && comp.directional_sensor_to_bit_distance > 150) {\n error.directional_sensor_to_bit_distance = 'Should be less then 150.';\n hasFormErrors = true;\n }\n }\n\n if (comp.family === 'pdm') {\n let pdmFieldUnitLower;\n let pdmFieldUnitUpper;\n\n if (!isValidNumber(comp.number_rotor_lobes, PDM_MIN_ROTOR, PDM_MAX_ROTOR)) {\n error.number_rotor_lobes = `It must be ${PDM_MIN_ROTOR}~${PDM_MAX_ROTOR}`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.number_stator_lobes, PDM_MIN_STATOR, PDM_MAX_STATOR)) {\n error.number_stator_lobes = `It must be ${PDM_MIN_STATOR}~${PDM_MAX_STATOR}`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.rpg, PDM_MIN_RPG, PDM_MAX_RPG)) {\n error.rpg = `It must be ${PDM_MIN_RPG}~${PDM_MAX_RPG}`;\n hasFormErrors = true;\n }\n\n pdmFieldUnitLower = convertValue(PDM_MIN_WOB, 'force', 'klbf');\n pdmFieldUnitUpper = convertValue(PDM_MAX_WOB, 'force', 'klbf');\n if (\n !isValueEmpty(comp.max_weight_on_bit) &&\n !isValidNumber(comp.max_weight_on_bit, pdmFieldUnitLower, pdmFieldUnitUpper)\n ) {\n error.max_weight_on_bit = `It must be ${pdmFieldUnitUpper.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n hasFormErrors = true;\n }\n\n pdmFieldUnitLower = convertValue(PDM_MIN_FLOW_RANGE, 'volumeFlowRate', 'gal/min');\n pdmFieldUnitUpper = convertValue(PDM_MAX_FLOW_RANGE, 'volumeFlowRate', 'gal/min');\n if (!isValidNumber(comp.min_standard_flowrate, pdmFieldUnitLower, pdmFieldUnitUpper)) {\n error.min_standard_flowrate = `It must be ${pdmFieldUnitLower.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.max_standard_flowrate, pdmFieldUnitLower, pdmFieldUnitUpper)) {\n error.max_standard_flowrate = `It must be ${pdmFieldUnitLower.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n hasFormErrors = true;\n }\n\n pdmFieldUnitLower = convertValue(PDM_MIN_MODP, 'pressure', 'psi');\n pdmFieldUnitUpper = convertValue(PDM_MAX_MODP, 'pressure', 'psi');\n if (\n !isValidNumber(\n comp.max_operating_differential_pressure,\n pdmFieldUnitLower,\n pdmFieldUnitUpper\n )\n ) {\n error.max_operating_differential_pressure = `It must be ${pdmFieldUnitLower.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n hasFormErrors = true;\n }\n\n pdmFieldUnitLower = convertValue(PDM_MIN_TMODP, 'torque', 'ft-klbf');\n pdmFieldUnitUpper = convertValue(PDM_MAX_TMODP, 'torque', 'ft-klbf');\n if (\n !isValidNumber(\n comp.torque_at_max_operating_differential_pressure,\n pdmFieldUnitLower,\n pdmFieldUnitUpper\n )\n ) {\n error.torque_at_max_operating_differential_pressure = `It must be ${pdmFieldUnitLower.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.flow_loss_percentage, PDM_MIN_FLOW_LOSS, PDM_MAX_FLOW_LOSS)) {\n error.flow_loss_percentage = `It must be ${PDM_MIN_FLOW_LOSS}~${PDM_MAX_FLOW_LOSS}`;\n hasFormErrors = true;\n }\n }\n\n errors.components[comp.id] = error;\n }\n\n if (bitComponents.length !== 1) {\n errors.general.bit_count = 'Number of \"BIT\" components is invalid.';\n hasFormErrors = true;\n }\n\n if (\n bitComponents.length === 1 &&\n components[components.length - 1].family !== 'bit' &&\n components[0].family !== 'bit'\n ) {\n // bit should be top or bottom\n errors.general.bit_position = '\"BIT\" category should be on the bottom of the list.';\n hasFormErrors = true;\n }\n\n if (hasFormErrors) {\n return errors;\n }\n return null;\n}\n\nexport function convertRecordBackToImperialUnit(record) {\n // if bit is top, reverse the components;\n let components = get(record, ['data', 'components']);\n if (get(components, [0, 'family']) === 'bit') {\n components = components.reverse().map((comp, idx) => ({ ...comp, order: idx }));\n record = set(record, ['data', 'components'], components); // eslint-disable-line no-param-reassign\n }\n\n const { data } = record.toJS();\n const objStartTime = data.start_timestamp_str && moment(new Date(data.start_timestamp_str));\n if (objStartTime && objStartTime.isValid()) {\n data.start_timestamp = objStartTime.unix();\n }\n delete data.start_timestamp_str;\n\n data.start_depth = ctoi(data.start_depth, 'length', 'ft');\n data.components = data.components.map(component => {\n const cc = Object.assign({}, component);\n cc.inner_diameter = ctoi(cc.inner_diameter, 'shortLength', 'in');\n cc.outer_diameter = ctoi(cc.outer_diameter, 'shortLength', 'in', 4);\n cc.linear_weight = ctoi(cc.linear_weight, 'massPerLength', 'lb-ft');\n cc.weight = ctoi(cc.weight, 'mass', 'lb');\n cc.length = ctoi(cc.length, 'length', 'ft');\n cc.component_length = ctoi(cc.component_length, 'length', 'ft');\n cc.outer_diameter_tooljoint = ctoi(cc.outer_diameter_tooljoint, 'shortLength', 'in');\n cc.inner_diameter_tooljoint = ctoi(cc.inner_diameter_tooljoint, 'shortLength', 'in');\n cc.length_tooljoint = ctoi(cc.length_tooljoint, 'length', 'ft');\n\n if (cc.family === 'bit' || cc.family === 'ur') {\n const ratio = ctoi(1, 'shortLength', 'in');\n cc.size = ctoi(cc.size, 'shortLength', 'in', 3);\n if (cc.nozzle_sizes && cc.nozzle_sizes.length > 0) {\n for (let j = 0; j < cc.nozzle_sizes.length; j += 1) {\n const item = cc.nozzle_sizes[j];\n item.size = ratio !== 1 ? ctoi(item.size, 'shortLength', 'in') * 32 : item.size;\n }\n }\n cc.tfa = ratio !== 1 ? cc.tfa * (ratio * ratio) : cc.tfa;\n }\n\n if (cc.family === 'pdm') {\n cc.max_weight_on_bit = ctoi(cc.max_weight_on_bit, 'force', 'klbf');\n cc.min_standard_flowrate = ctoi(cc.min_standard_flowrate, 'volumeFlowRate', 'gal/min');\n cc.max_standard_flowrate = ctoi(cc.max_standard_flowrate, 'volumeFlowRate', 'gal/min');\n cc.max_operating_differential_pressure = ctoi(\n cc.max_operating_differential_pressure,\n 'pressure',\n 'psi'\n );\n cc.torque_at_max_operating_differential_pressure = ctoi(\n cc.torque_at_max_operating_differential_pressure,\n 'torque',\n 'ft-klbf',\n 3\n );\n cc.rpg = ctoi(cc.rpg, 'revolutionPerVolume', 'rpg');\n\n if (cc.off_bottom_pressure_loss && cc.off_bottom_pressure_loss.length > 0) {\n for (let j = 0; j < cc.off_bottom_pressure_loss.length; j += 1) {\n const item = cc.off_bottom_pressure_loss[j];\n item.flow_rate = ctoi(item.flow_rate, 'volumeFlowRate', 'gal/min');\n item.pressure_loss = ctoi(item.pressure_loss, 'pressure', 'psi');\n }\n }\n if (!cc.has_stabilizer) {\n delete cc.stabilizer;\n }\n if (cc.stabilizer) {\n cc.stabilizer.inner_diameter =\n cc.stabilizer.inner_diameter && ctoi(cc.stabilizer.inner_diameter, 'shortLength', 'in');\n cc.stabilizer.outer_diameter =\n cc.stabilizer.outer_diameter && ctoi(cc.stabilizer.outer_diameter, 'shortLength', 'in');\n cc.stabilizer.linear_weight =\n cc.stabilizer.linear_weight &&\n ctoi(cc.stabilizer.linear_weight, 'massPerLength', 'lb-ft');\n cc.stabilizer.weight = cc.stabilizer.weight && ctoi(cc.stabilizer.weight, 'mass', 'lb');\n cc.stabilizer.length = cc.length && ctoi(cc.stabilizer.length, 'length', 'ft');\n cc.stabilizer.gauge_od =\n cc.stabilizer.gauge_od && ctoi(cc.stabilizer.gauge_od, 'shortLength', 'in');\n cc.stabilizer.gauge_length =\n cc.stabilizer.gauge_length && ctoi(cc.stabilizer.gauge_length, 'shortLength', 'in');\n cc.stabilizer.blade_width =\n cc.stabilizer.blade_width && ctoi(cc.stabilizer.blade_width, 'shortLength', 'in');\n cc.stabilizer.stab_centerpoint_to_bit =\n cc.stabilizer.stab_centerpoint_to_bit &&\n ctoi(cc.stabilizer.stab_centerpoint_to_bit, 'length', 'ft');\n }\n }\n\n if (cc.family === 'stabilizer' || cc.family === 'ags') {\n cc.gauge_od = ctoi(cc.gauge_od, 'shortLength', 'in');\n cc.gauge_length = ctoi(cc.gauge_length, 'shortLength', 'in');\n cc.blade_width = ctoi(cc.blade_width, 'shortLength', 'in');\n }\n\n if (cc.family === 'mwd' || cc.family === 'rss' || cc.family === 'agitator') {\n if (cc.pressure_loss && cc.pressure_loss.length > 0) {\n for (let j = 0; j < cc.pressure_loss.length; j += 1) {\n const item = cc.pressure_loss[j];\n item.flow_rate = ctoi(item.flow_rate, 'volumeFlowRate', 'gal/min');\n item.pressure_loss = ctoi(item.pressure_loss, 'pressure', 'psi');\n }\n }\n }\n\n if (cc.family !== 'bit') {\n delete cc.bit_type;\n }\n if (!cc.has_gamma_sensor && Number.isFinite(cc.gamma_sensor_to_bit_distance)) {\n delete cc.gamma_sensor_to_bit_distance;\n }\n if (!cc.has_survey_sensor && Number.isFinite(cc.bit_to_survey_distance)) {\n delete cc.bit_to_survey_distance;\n }\n if (!cc.has_directional_sensor && Number.isFinite(cc.directional_sensor_to_bit_distance)) {\n delete cc.directional_sensor_to_bit_distance;\n }\n delete cc.c_length;\n return cc;\n });\n\n return {\n ...record,\n data,\n };\n}\n\nexport function ctoi(val, unitType, unit, precision = 2) {\n if (val === null || typeof val === 'undefined') {\n return null;\n }\n if (!unitType || !unit) {\n return parseFloat(val);\n }\n return parseFloat(convertValue(val, unitType, getUnitPreference(unitType), unit, precision));\n}\n\nexport function convertRecordtoPrefUnit(record) {\n const { data } = record.toJS();\n const { components } = data;\n data.start_depth = ctop(data.start_depth, 'length', 'ft');\n\n if (components.length > 0) {\n if (components[0].family === 'bit') {\n components[0].c_length = components[0].length || 0;\n for (let i = 1; i < components.length; i += 1) {\n components[i].c_length =\n parseFloat(components[i - 1].c_length) + parseFloat(components[i].length || 0);\n }\n } else {\n const lastIndex = components.length - 1;\n components[lastIndex].c_length = components[lastIndex].length || 0;\n for (let i = lastIndex - 1; i >= 0; i -= 1) {\n components[i].c_length =\n parseFloat(components[i + 1].c_length) + parseFloat(components[i].length || 0);\n }\n }\n }\n\n for (let i = 0; i < components.length; i += 1) {\n const comp = components[i];\n comp.inner_diameter = ctop(comp.inner_diameter, 'shortLength', 'in');\n comp.outer_diameter = ctop(comp.outer_diameter, 'shortLength', 'in', 4);\n comp.linear_weight = ctop(comp.linear_weight, 'massPerLength', 'lb-ft');\n comp.weight = ctop(comp.weight, 'mass', 'lb');\n comp.length = ctop(comp.length, 'length', 'ft');\n comp.component_length = ctop(comp.component_length, 'length', 'ft');\n comp.outer_diameter_tooljoint = ctop(comp.outer_diameter_tooljoint, 'shortLength', 'in');\n comp.inner_diameter_tooljoint = ctop(comp.inner_diameter_tooljoint, 'shortLength', 'in');\n comp.length_tooljoint = ctop(comp.length_tooljoint, 'length', 'ft');\n\n comp.c_length = ctop(comp.c_length, 'length', 'ft');\n comp.gamma_sensor_to_bit_distance = ctop(comp.gamma_sensor_to_bit_distance, 'length', 'ft');\n\n if (comp.family === 'bit' || comp.family === 'ur') {\n const ratio = ctop(1, 'shortLength', 'in');\n comp.size = ctop(comp.size, 'shortLength', 'in');\n if (comp.nozzle_sizes && comp.nozzle_sizes.length > 0) {\n for (let j = 0; j < comp.nozzle_sizes.length; j += 1) {\n const item = comp.nozzle_sizes[j];\n item.size = ratio !== 1 ? ctop(item.size, 'shortLength', 'in') / 32 : item.size;\n }\n }\n comp.tfa = ratio !== 1 ? comp.tfa * (ratio * ratio) : comp.tfa;\n }\n\n if (comp.family === 'pdm') {\n comp.max_weight_on_bit = ctop(comp.max_weight_on_bit, 'force', 'klbf');\n comp.min_standard_flowrate = ctop(comp.min_standard_flowrate, 'volumeFlowRate', 'gal/min');\n comp.max_standard_flowrate = ctop(comp.max_standard_flowrate, 'volumeFlowRate', 'gal/min');\n comp.max_operating_differential_pressure = ctop(\n comp.max_operating_differential_pressure,\n 'pressure',\n 'psi'\n );\n comp.torque_at_max_operating_differential_pressure = ctop(\n comp.torque_at_max_operating_differential_pressure,\n 'torque',\n 'ft-klbf',\n 3\n );\n if (comp.off_bottom_pressure_loss && comp.off_bottom_pressure_loss.length > 0) {\n for (let j = 0; j < comp.off_bottom_pressure_loss.length; j += 1) {\n const item = comp.off_bottom_pressure_loss[j];\n item.flow_rate = ctop(item.flow_rate, 'volumeFlowRate', 'gal/min');\n item.pressure_loss = ctop(item.pressure_loss, 'pressure', 'psi');\n }\n }\n comp.rpg = ctop(comp.rpg, 'revolutionPerVolume', 'rpg');\n if (comp.has_stabilizer && comp.stabilizer) {\n comp.stabilizer.inner_diameter = ctop(comp.stabilizer.inner_diameter, 'shortLength', 'in');\n comp.stabilizer.outer_diameter = ctop(comp.stabilizer.outer_diameter, 'shortLength', 'in');\n comp.stabilizer.linear_weight = ctop(\n comp.stabilizer.linear_weight,\n 'massPerLength',\n 'lb-ft'\n );\n comp.stabilizer.weight = ctop(comp.stabilizer.weight, 'mass', 'lb');\n comp.stabilizer.length = ctop(comp.stabilizer.length, 'length', 'ft');\n comp.stabilizer.gauge_od = ctop(comp.stabilizer.gauge_od, 'shortLength', 'in');\n comp.stabilizer.gauge_length = ctop(comp.stabilizer.gauge_length, 'shortLength', 'in');\n comp.stabilizer.blade_width = ctop(comp.stabilizer.blade_width, 'shortLength', 'in');\n comp.stabilizer.stab_centerpoint_to_bit = ctop(\n comp.stabilizer.stab_centerpoint_to_bit,\n 'length',\n 'ft'\n );\n }\n }\n\n if (comp.family === 'stabilizer' || comp.family === 'ags') {\n comp.gauge_od = ctop(comp.gauge_od, 'shortLength', 'in');\n comp.gauge_length = ctop(comp.gauge_length, 'shortLength', 'in');\n comp.blade_width = ctop(comp.blade_width, 'shortLength', 'in');\n }\n\n if (comp.family === 'mwd' || comp.family === 'rss' || comp.family === 'agitator') {\n if (comp.pressure_loss && comp.pressure_loss.length > 0) {\n for (let j = 0; j < comp.pressure_loss.length; j += 1) {\n const item = comp.pressure_loss[j];\n item.flow_rate = ctop(item.flow_rate, 'volumeFlowRate', 'gal/min');\n item.pressure_loss = ctop(item.pressure_loss, 'pressure', 'psi');\n }\n }\n }\n }\n return {\n ...record,\n data,\n };\n}\n\nexport function ctop(val, unitType, unit, precision = 2) {\n if (val !== 0 && !val) {\n return null;\n }\n return unitType && unit ? convertValue(val, unitType, unit, null, precision) : val;\n}\n"],"names":["sValueEmpty","val","isValidNumber","num","min","max","_ref","arguments","length","undefined","_ref$isMinInclusive","isMinInclusive","parsedNum","parseFloat","Number","isNaN","isValidLinearWeight","id","od","linearWeight","prefShortLengthUnit","getUnitPreference","convertedId","convertedOd","convertValue","estimation","convertedEstimation","validate","recordData","_recordData$toJS$data","toJS","data","start_timestamp_str","start_depth","components","shortLengthUnitDisplay","getUnitDisplay","lengthUnitDisplay","errors","general","specificErrors","bitComponents","filter","comp","family","bitSize","size","mwdHavingGamma","has_gamma_sensor","hasFormErrors","isValueEmpty","moment","Date","isValid","start_timestamp","isFinite","minDepth","maxDepth","prohibitedDepth","concat","toFixed","i","min_id","min_od","max_id","max_od","min_opened_od","max_opened_od","min_length","min_tj_id","max_tj_id","min_tj_od","max_tj_od","min_pressure_loss","min_off_bottom_pressure_loss","min_rd","max_rd","error","inner_diameter","outer_diameter","linear_weight","ur_opened_od","inner_diameter_tooljoint","outer_diameter_tooljoint","length_tooljoint","component_length","off_bottom_pressure_loss","j","obpsItem","flow_rate","pressure_loss","pressureLossItem","has_stabilizer","stabilizer","stab_min_id","stab_max_id","stab_min_od","stab_max_od","stab_min_length","stabilizer_outer_diameter","stabilizer_inner_diameter","stabilizer_length","stabilizer_linear_weight","reel_diameter","ratio","ctop","lowerLimit","upperLimit","tfa","flow_loss_percentage","gamma_sensor_to_bit_distance","has_survey_sensor","bit_to_survey_distance","has_directional_sensor","directional_sensor_to_bit_distance","pdmFieldUnitLower","pdmFieldUnitUpper","number_rotor_lobes","number_stator_lobes","rpg","max_weight_on_bit","min_standard_flowrate","max_standard_flowrate","max_operating_differential_pressure","torque_at_max_operating_differential_pressure","bit_count","bit_position","convertRecordBackToImperialUnit","record","get","reverse","map","idx","_objectSpread","order","set","objStartTime","unix","ctoi","component","cc","Object","assign","weight","nozzle_sizes","item","gauge_od","gauge_length","blade_width","stab_centerpoint_to_bit","bit_type","c_length","unitType","unit","precision","convertRecordtoPrefUnit","lastIndex"],"mappings":"qxBAsHO,SAASA,EAAYC,GAC1B,OAAOA,SAAsD,KAARA,CACvD,CAEO,SAASC,EAAcC,EAAKC,EAAKC,GAAqC,IAAAC,EAAAC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAJ,CAAE,EAAAG,EAAAJ,EAA5BK,eAAAA,cAAqBD,EAC5DE,EAAYC,WAAWV,GAC7B,OAAIW,OAAOC,MAAMH,OAGZD,GAAkBC,EAAYR,IAAUO,GAAkBC,GAAaR,MAIxEC,GAAOO,EAAYP,GAKzB,CAEO,SAASW,EAAoBC,EAAIC,EAAIC,GAC1C,IAAMC,EAAsBC,EAAkB,eAC1CC,EAAcL,EACdM,EAAcL,EACU,OAAxBE,IACFE,EAAcE,EAAaP,EAAI,cAAeG,EAAqB,MACnEG,EAAcC,EAAaN,EAAI,cAAeE,EAAqB,OAGrE,IAAMK,EAAa,OAASF,EAAcA,EAAcD,EAAcA,GAEhEI,EACoB,OAAxBN,EAA+BI,EAAaC,EAAY,gBAAiB,SAAWA,EAEtF,OAAON,GAAsC,GAAtBO,GAA6BP,GAAsC,IAAtBO,CACtE,CAEO,SAASC,EAASC,GACvB,IAEqBC,EAAjBD,EAAWE,OADbC,KAAQd,IAAAA,GAAIe,IAAAA,oBAAqBC,IAAAA,YAAaC,IAAAA,WAE1CC,EAAyBC,EAAe,eACxCC,EAAoBD,EAAe,UACnCE,EAAS,CACbC,QAAS,CAAE,EACXL,WAAY,CAAE,EACdM,eAAgB,CAAC,GAEbC,EAAgBP,EAAWQ,QAAO,SAAAC,GAAI,MAAoB,QAAhBA,EAAKC,UAC/CC,EAAUJ,EAAcjC,OAAS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AAK,EAAG,CACrD,IAAM0D,EAAOtG,EAAK+C,cAAcH,GAChC0D,EAAKxD,UAAYgB,EAAKwC,EAAKxD,UAAW,iBAAkB,WACxDwD,EAAKvD,cAAgBe,EAAKwC,EAAKvD,cAAe,WAAY,MAC5D,CAGN,CACA,OAAA2C,EAAAA,EAAA,CAAA,EACKL,GAAM,CAAA,EAAA,CACTjG,KAAAA,GAEJ,CAEO,SAAS0E,EAAKxG,EAAKuJ,EAAUC,GAAqB,IAAfC,yDAAY,EACpD,OAAY,IAARzJ,GAAcA,EAGXuJ,GAAYC,EAAOjI,EAAavB,EAAKuJ,EAAUC,EAAM,KAAMC,GAAazJ,EAFtE,IAGX"}
|
|
1
|
+
{"version":3,"file":"DrillstringUtils.js","sources":["../../src/utils/DrillstringUtils.js"],"sourcesContent":["/************ deprecated DO NOT USE IT ************************/\n/************ new version in drillstring folder */\n/* eslint-disable camelcase */\nimport set from 'lodash/set';\nimport get from 'lodash/get';\nimport cloneDeep from 'lodash/cloneDeep';\nimport moment from 'moment';\n\nimport { getUnitPreference, convertValue, getUnitDisplay } from './convert';\n\nconst ALLOWED_DIFF_OD_BIT_SIZE = 0.1;\n\nconst DEF_MIN_ID = 0;\nconst DEF_MAX_ID = 100;\nconst DEF_MIN_OD = 1;\nconst DEF_MAX_OD = 100;\nconst DEF_MIN_LENGTH = 0;\n\nconst UR_MIN_ID = 0;\nconst UR_MAX_ID = 50;\nconst UR_MIN_BODY_OD = 1;\nconst UR_MAX_BODY_OD = 50;\nconst UR_MIN_OPENED_OD = 1;\nconst UR_MAX_OPENED_OD = 50;\n\nconst CT_MIN_ID = 0;\nconst CT_MAX_ID = 100;\nconst CT_MIN_OD = 1;\nconst CT_MAX_OD = 100;\nconst CT_MIN_RD = 0;\nconst CT_MAX_RD = 500;\nconst CT_MIN_LENGTH = 0;\n\nconst DP_MIN_ID = 1;\nconst DP_MAX_ID = 7;\nconst DP_MIN_OD = 2;\nconst DP_MAX_OD = 8;\nconst DP_MIN_TJ_ID = 1;\nconst DP_MAX_TJ_ID = 7;\nconst DP_MIN_TJ_OD = 2;\nconst DP_MAX_TJ_OD = 10;\nconst DP_MIN_LENGTH = 0;\n\nconst HWDP_MIN_ID = 1;\nconst HWDP_MAX_ID = 7;\nconst HWDP_MIN_OD = 2;\nconst HWDP_MAX_OD = 8;\nconst HWDP_MIN_TJ_ID = 1;\nconst HWDP_MAX_TJ_ID = 7;\nconst HWDP_MIN_TJ_OD = 2;\nconst HWDP_MAX_TJ_OD = 10;\nconst HWDP_MIN_LENGTH = 0;\n\nconst DC_MIN_ID = 0.5;\nconst DC_MAX_ID = 7;\nconst DC_MIN_OD = 2;\nconst DC_MAX_OD = 13;\nconst DC_MIN_LENGTH = 0;\n\nconst STABLE_MIN_ID = 0;\nconst STABLE_MAX_ID = 100;\nconst STABLE_MIN_OD = 1;\nconst STABLE_MAX_OD = 100;\nconst STABLE_MIN_LENGTH = 0;\n\nconst PDM_MIN_OD = 2;\nconst PDM_MAX_OD = 15;\nconst PDM_MIN_ID = 0;\nconst PDM_MAX_ID = 12;\nconst PDM_MIN_LENGTH = 4;\n\nconst PDM_MIN_STATOR = 2;\nconst PDM_MAX_STATOR = 10;\nconst PDM_MIN_ROTOR = 1;\nconst PDM_MAX_ROTOR = 10;\nconst PDM_MIN_RPG = 0;\nconst PDM_MAX_RPG = 10;\nconst PDM_MIN_WOB = 0;\nconst PDM_MAX_WOB = 200;\nconst PDM_MIN_FLOW_RANGE = 0;\nconst PDM_MAX_FLOW_RANGE = 2500;\nconst PDM_MIN_MODP = 0;\nconst PDM_MAX_MODP = 3000;\nconst PDM_MIN_TMODP = 0;\nconst PDM_MAX_TMODP = 40;\nconst PDM_MIN_FLOW_LOSS = 0;\nconst PDM_MAX_FLOW_LOSS = 20;\nconst PDM_MIN_OFF_BOTTOM_PRESSURE_LOSS = 0;\n\nconst MWD_MIN_ID = 0;\nconst MWD_MAX_ID = 12;\nconst MWD_MIN_OD = 2;\nconst MWD_MAX_OD = 13;\nconst MWD_MIN_LENGTH = 1.0;\nconst MWD_MIN_PRESSURE_LOSS = 0;\n\nconst RSS_MIN_ID = 0;\nconst RSS_MAX_ID = 12;\nconst RSS_MIN_OD = 2;\nconst RSS_MAX_OD = 13;\nconst RSS_MIN_LENGTH = 1.0;\nconst RSS_MIN_FLOW_LOSS = 0;\nconst RSS_MAX_FLOW_LOSS = 10;\nconst RSS_MIN_PRESSURE_LOSS = 0;\n\nconst AGITATOR_MIN_ID = 0;\nconst AGITATOR_MAX_ID = 12;\nconst AGITATOR_MIN_OD = 2;\nconst AGITATOR_MAX_OD = 13;\nconst AGITATOR_MIN_LENGTH = 1.0;\nconst AGITATOR_MIN_PRESSURE_LOSS = 0;\n\nconst BIT_MIN_TFA = 0;\nconst BIT_MAX_TFA = 20;\n\nconst DEPTH_IN_HOLE_MIN = 0;\nconst DEPTH_IN_HOLE_MAX = 55000;\nconst DEPTH_IN_HOLE_PROHIBITED = 1;\n\nexport function sValueEmpty(val) {\n return val === null || typeof val === 'undefined' || val === '';\n}\n\nexport function isValidNumber(num, min, max, { isMinInclusive = true } = {}) {\n const parsedNum = parseFloat(num);\n if (Number.isNaN(parsedNum)) {\n return false;\n }\n if ((isMinInclusive && parsedNum < min) || (!isMinInclusive && parsedNum <= min)) {\n return false;\n }\n\n if (max && parsedNum > max) {\n return false;\n }\n\n return true;\n}\n\nexport function isValidLinearWeight(id, od, linearWeight) {\n const prefShortLengthUnit = getUnitPreference('shortLength');\n let convertedId = id;\n let convertedOd = od;\n if (prefShortLengthUnit !== 'in') {\n convertedId = convertValue(id, 'shortLength', prefShortLengthUnit, 'in');\n convertedOd = convertValue(od, 'shortLength', prefShortLengthUnit, 'in');\n }\n\n const estimation = 2.673 * (convertedOd * convertedOd - convertedId * convertedId);\n\n const convertedEstimation =\n prefShortLengthUnit !== 'in' ? convertValue(estimation, 'massPerLength', 'lb-ft') : estimation;\n\n return linearWeight >= convertedEstimation * 0.5 && linearWeight <= convertedEstimation * 1.5;\n}\n\nexport function validate(recordData) {\n const {\n data: { id, start_timestamp_str, start_depth, components },\n } = recordData;\n const shortLengthUnitDisplay = getUnitDisplay('shortLength');\n const lengthUnitDisplay = getUnitDisplay('length');\n const errors = {\n general: {},\n components: {},\n specificErrors: {},\n };\n const bitComponents = components.filter(comp => comp.family === 'bit');\n const bitSize = bitComponents.length > 0 ? bitComponents[0].size : null;\n const mwdHavingGamma = components.filter(comp => comp.family === 'mwd' && comp.has_gamma_sensor);\n let hasFormErrors = false;\n\n if (isValueEmpty(id)) {\n errors.id = 'It should not be empty.';\n hasFormErrors = true;\n }\n\n if (start_timestamp_str && !moment(new Date(start_timestamp_str)).isValid()) {\n hasFormErrors = true;\n errors.start_timestamp = 'Invalid Date.';\n }\n\n if (Number.isFinite(start_depth)) {\n const minDepth = convertValue(DEPTH_IN_HOLE_MIN, 'length', 'ft');\n const maxDepth = convertValue(DEPTH_IN_HOLE_MAX, 'length', 'ft');\n const prohibitedDepth = convertValue(DEPTH_IN_HOLE_PROHIBITED, 'length', 'ft');\n if (start_depth <= minDepth || start_depth > maxDepth) {\n hasFormErrors = true;\n errors.start_depth = `Should be a positive number ${minDepth.toFixed(2)}~${maxDepth.toFixed(\n 2\n )} (${lengthUnitDisplay})`;\n }\n if (start_depth === prohibitedDepth) {\n hasFormErrors = true;\n errors.start_depth = `Should not be equal to ${prohibitedDepth} (${lengthUnitDisplay})`;\n }\n } else {\n hasFormErrors = true;\n errors.start_depth = 'It should not be empty.';\n }\n\n for (let i = 0; i < components.length; i += 1) {\n let min_id;\n let min_od;\n let max_id;\n let max_od;\n let min_opened_od;\n let max_opened_od;\n let min_length;\n let min_tj_id;\n let max_tj_id;\n let min_tj_od;\n let max_tj_od;\n let min_pressure_loss;\n let min_off_bottom_pressure_loss;\n let min_rd;\n let max_rd;\n\n const comp = components[i];\n const error = {};\n switch (comp.family) {\n case 'ct':\n min_id = convertValue(CT_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(CT_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(CT_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(CT_MAX_OD, 'shortLength', 'in');\n min_rd = convertValue(CT_MIN_RD, 'shortLength', 'in');\n max_rd = convertValue(CT_MAX_RD, 'shortLength', 'in');\n min_length = convertValue(CT_MIN_LENGTH, 'length', 'ft');\n break;\n\n case 'dp':\n min_id = convertValue(DP_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(DP_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(DP_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(DP_MAX_OD, 'shortLength', 'in');\n min_tj_id = convertValue(DP_MIN_TJ_ID, 'shortLength', 'in');\n max_tj_id = convertValue(DP_MAX_TJ_ID, 'shortLength', 'in');\n min_tj_od = convertValue(DP_MIN_TJ_OD, 'shortLength', 'in');\n max_tj_od = convertValue(DP_MAX_TJ_OD, 'shortLength', 'in');\n min_length = convertValue(DP_MIN_LENGTH, 'length', 'ft');\n break;\n\n case 'hwdp':\n min_id = convertValue(HWDP_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(HWDP_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(HWDP_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(HWDP_MAX_OD, 'shortLength', 'in');\n min_tj_id = convertValue(HWDP_MIN_TJ_ID, 'shortLength', 'in');\n max_tj_id = convertValue(HWDP_MAX_TJ_ID, 'shortLength', 'in');\n min_tj_od = convertValue(HWDP_MIN_TJ_OD, 'shortLength', 'in');\n max_tj_od = convertValue(HWDP_MAX_TJ_OD, 'shortLength', 'in');\n min_length = convertValue(HWDP_MIN_LENGTH, 'length', 'ft');\n break;\n\n case 'dc':\n min_id = convertValue(DC_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(DC_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(DC_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(DC_MAX_OD, 'shortLength', 'in');\n min_length = convertValue(DC_MIN_LENGTH, 'length', 'ft');\n break;\n\n case 'stabilizer':\n case 'ags':\n min_id = convertValue(STABLE_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(STABLE_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(STABLE_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(STABLE_MAX_OD, 'shortLength', 'in');\n min_length = convertValue(STABLE_MIN_LENGTH, 'length', 'ft');\n break;\n\n case 'pdm':\n min_od = convertValue(PDM_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(PDM_MAX_OD, 'shortLength', 'in');\n min_id = convertValue(PDM_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(PDM_MAX_ID, 'shortLength', 'in');\n min_length = convertValue(PDM_MIN_LENGTH, 'length', 'ft');\n min_off_bottom_pressure_loss = PDM_MIN_OFF_BOTTOM_PRESSURE_LOSS;\n break;\n\n case 'mwd':\n min_od = convertValue(MWD_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(MWD_MAX_OD, 'shortLength', 'in');\n min_id = convertValue(MWD_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(MWD_MAX_ID, 'shortLength', 'in');\n min_length = convertValue(MWD_MIN_LENGTH, 'length', 'ft');\n min_pressure_loss = MWD_MIN_PRESSURE_LOSS;\n break;\n\n case 'agitator':\n min_od = convertValue(AGITATOR_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(AGITATOR_MAX_OD, 'shortLength', 'in');\n min_id = convertValue(AGITATOR_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(AGITATOR_MAX_ID, 'shortLength', 'in');\n min_length = convertValue(AGITATOR_MIN_LENGTH, 'length', 'ft');\n min_pressure_loss = AGITATOR_MIN_PRESSURE_LOSS;\n break;\n\n case 'rss':\n min_od = convertValue(RSS_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(RSS_MAX_OD, 'shortLength', 'in');\n min_id = convertValue(RSS_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(RSS_MAX_ID, 'shortLength', 'in');\n min_length = convertValue(RSS_MIN_LENGTH, 'length', 'ft');\n min_pressure_loss = RSS_MIN_PRESSURE_LOSS;\n break;\n\n case 'ur':\n min_id = convertValue(UR_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(UR_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(UR_MIN_BODY_OD, 'shortLength', 'in');\n max_od = convertValue(UR_MAX_BODY_OD, 'shortLength', 'in');\n min_opened_od = convertValue(UR_MIN_OPENED_OD, 'shortLength', 'in');\n max_opened_od = convertValue(UR_MAX_OPENED_OD, 'shortLength', 'in');\n break;\n\n case 'bit':\n break;\n\n default:\n min_id = convertValue(DEF_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(DEF_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(DEF_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(DEF_MAX_OD, 'shortLength', 'in');\n min_length = convertValue(DEF_MIN_LENGTH, 'length', 'ft');\n break;\n }\n\n if (!isValueEmpty(min_id) && !isValueEmpty(min_od)) {\n if (!isValidNumber(comp.inner_diameter, min_id, max_id)) {\n error.inner_diameter = `${min_id.toFixed(1)}~${max_id.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.outer_diameter, min_od, max_od)) {\n error.outer_diameter = `${min_od.toFixed(1)}~${max_od.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n\n if (\n isValidNumber(comp.inner_diameter, min_id, max_id) &&\n isValidNumber(comp.outer_diameter, min_od, max_od) &&\n !isValidNumber(comp.inner_diameter, min_id, comp.outer_diameter)\n ) {\n error.outer_diameter = 'O.D > I.D';\n hasFormErrors = true;\n }\n\n if (!error.outer_diameter && bitSize) {\n if (\n +comp.outer_diameter + convertValue(ALLOWED_DIFF_OD_BIT_SIZE, 'shortLength', 'in') >\n bitSize\n ) {\n error.outer_diameter = ' O.D + 0.1 < Bit Size';\n hasFormErrors = true;\n }\n }\n\n // only check validity of linear weight when family is not bit\n if (!isValidNumber(comp.linear_weight, 0)) {\n error.linear_weight = 'Invalid value';\n hasFormErrors = true;\n }\n\n if (\n comp.family === 'dp' ||\n comp.family === 'hwdp' ||\n comp.family === 'dc' ||\n comp.family === 'ct' ||\n comp.family === 'ur'\n ) {\n if (!error.inner_diameter && !error.outer_diameter && !error.linear_weight) {\n if (!isValidLinearWeight(comp.inner_diameter, comp.outer_diameter, comp.linear_weight)) {\n error.linear_weight = 'Invalid range';\n hasFormErrors = true;\n }\n }\n }\n }\n if (comp.family === 'ur') {\n if (!isValidNumber(comp.ur_opened_od, min_opened_od, max_opened_od)) {\n error.ur_opened_od = `${min_opened_od.toFixed(1)}~${max_opened_od.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n } else if (comp.ur_opened_od < bitSize) {\n error.ur_opened_od = 'Max O.D (Opened) >= Bit Size';\n hasFormErrors = true;\n }\n }\n\n if (!isValueEmpty(min_tj_id) && !isValueEmpty(min_tj_od)) {\n if (!isValidNumber(comp.inner_diameter_tooljoint, min_tj_id, max_tj_id)) {\n error.inner_diameter_tooljoint = `${min_tj_id.toFixed(1)}~${max_tj_id.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.outer_diameter_tooljoint, min_tj_od, max_tj_od)) {\n error.outer_diameter_tooljoint = `${min_tj_od.toFixed(1)}~${max_tj_od.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.outer_diameter_tooljoint, comp.outer_diameter, max_tj_od)) {\n error.outer_diameter_tooljoint = 'Tool Joint O.D >= O.D';\n hasFormErrors = true;\n }\n }\n\n if (!isValueEmpty(min_length)) {\n if (!isValidNumber(comp.length, min_length)) {\n error.length = 'Invalid value';\n hasFormErrors = true;\n }\n }\n\n if (!isValueEmpty(comp.length_tooljoint) && !isValueEmpty(comp.component_length)) {\n if (+comp.length_tooljoint > +comp.component_length) {\n error.length_tooljoint = 'Tool Joint Length < Component Length';\n hasFormErrors = true;\n }\n }\n\n if (comp.off_bottom_pressure_loss && comp.off_bottom_pressure_loss.length > 0) {\n error.off_bottom_pressure_loss = {};\n for (let j = 0; j < comp.off_bottom_pressure_loss.length; j += 1) {\n const obpsItem = comp.off_bottom_pressure_loss[j];\n error.off_bottom_pressure_loss[j] = {};\n if (isValueEmpty(obpsItem.flow_rate)) {\n error.off_bottom_pressure_loss[j].flow_rate = 'flow rate is required.';\n hasFormErrors = true;\n }\n if (isValueEmpty(obpsItem.pressure_loss)) {\n error.off_bottom_pressure_loss[j].pressure_loss = 'pressure loss is required.';\n hasFormErrors = true;\n }\n if (\n !isValueEmpty(min_off_bottom_pressure_loss) &&\n !isValidNumber(obpsItem.pressure_loss, min_off_bottom_pressure_loss, null, {\n isMinInclusive: false,\n })\n ) {\n error.off_bottom_pressure_loss[j].pressure_loss = 'Invalid range';\n hasFormErrors = true;\n }\n }\n }\n\n if (comp.pressure_loss && comp.pressure_loss.length > 0) {\n error.pressure_loss = {};\n for (let j = 0; j < comp.pressure_loss.length; j += 1) {\n const pressureLossItem = comp.pressure_loss[j];\n error.pressure_loss[j] = {};\n if (isValueEmpty(pressureLossItem.flow_rate)) {\n error.pressure_loss[j].flow_rate = 'flow rate is required.';\n hasFormErrors = true;\n }\n if (isValueEmpty(pressureLossItem.pressure_loss)) {\n error.pressure_loss[j].pressure_loss = 'pressure loss is required.';\n hasFormErrors = true;\n }\n if (\n !isValueEmpty(min_pressure_loss) &&\n !isValidNumber(pressureLossItem.pressure_loss, min_pressure_loss, null, {\n isMinInclusive: false,\n })\n ) {\n error.pressure_loss[j].pressure_loss = 'Invalid range';\n hasFormErrors = true;\n }\n }\n }\n\n if (comp.has_stabilizer && comp.stabilizer) {\n const stab_min_id = convertValue(STABLE_MIN_ID, 'shortLength', 'in');\n const stab_max_id = convertValue(STABLE_MAX_ID, 'shortLength', 'in');\n const stab_min_od = convertValue(STABLE_MIN_OD, 'shortLength', 'in');\n const stab_max_od = convertValue(STABLE_MAX_OD, 'shortLength', 'in');\n const stab_min_length = convertValue(STABLE_MIN_LENGTH, 'length', 'ft');\n\n if (\n isValidNumber(comp.stabilizer.inner_diameter, stab_min_id, stab_max_id) &&\n isValidNumber(comp.stabilizer.outer_diameter, stab_min_od, stab_max_od) &&\n !isValidNumber(comp.stabilizer.inner_diameter, min_id, comp.stabilizer.outer_diameter)\n ) {\n error.stabilizer_outer_diameter = 'O.D > I.D';\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.stabilizer.inner_diameter, stab_min_id, stab_max_id)) {\n error.stabilizer_inner_diameter = `${stab_min_id.toFixed(1)}~${stab_max_id.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n if (!isValidNumber(comp.stabilizer.outer_diameter, stab_min_od, stab_max_od)) {\n error.stabilizer_outer_diameter = `${stab_min_od.toFixed(1)}~${stab_max_od.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n if (!isValueEmpty(stab_min_length)) {\n if (!isValidNumber(comp.stabilizer.length, stab_min_length)) {\n error.stabilizer_length = 'Invalid value';\n hasFormErrors = true;\n }\n }\n if (isValueEmpty(comp.stabilizer.linear_weight)) {\n error.stabilizer_linear_weight = 'Invalid value';\n hasFormErrors = true;\n }\n if (!error.stabilizer_outer_diameter && bitSize) {\n if (\n +comp.stabilizer.outer_diameter +\n convertValue(ALLOWED_DIFF_OD_BIT_SIZE, 'shortLength', 'in') >\n bitSize\n ) {\n error.stabilizer_outer_diameter = ' O.D + 0.1 < Bit Size';\n hasFormErrors = true;\n }\n }\n }\n\n // specificErrors\n if (comp.family === 'ct') {\n if (!isValidNumber(comp.reel_diameter, min_rd, max_rd)) {\n error.reel_diameter = `${min_rd.toFixed(1)}~${max_rd.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n }\n\n if (comp.family === 'bit') {\n const ratio = ctop(1, 'shortLength', 'in');\n const lowerLimit = BIT_MIN_TFA * (ratio * ratio);\n const upperLimit = BIT_MAX_TFA * (ratio * ratio);\n if (!isValidNumber(comp.tfa, lowerLimit, upperLimit)) {\n error.tfa = `TFA must be ${lowerLimit.toFixed(2)}~${BIT_MAX_TFA.toFixed(2)}`;\n hasFormErrors = true;\n }\n }\n\n if (comp.family === 'rss') {\n if (!isValidNumber(comp.flow_loss_percentage, RSS_MIN_FLOW_LOSS, RSS_MAX_FLOW_LOSS)) {\n error.flow_loss_percentage = `It must be ${RSS_MIN_FLOW_LOSS}~${RSS_MAX_FLOW_LOSS}`;\n hasFormErrors = true;\n }\n }\n\n if (comp.family === 'mwd') {\n if (mwdHavingGamma.length > 1) {\n error.gamma_sensor_to_bit_distance = `Only 1 gamma sensor allowed. Currently ${mwdHavingGamma.length}`;\n hasFormErrors = true;\n } else if (comp.has_gamma_sensor && !Number.isFinite(comp.gamma_sensor_to_bit_distance)) {\n error.gamma_sensor_to_bit_distance = 'This field is required.';\n hasFormErrors = true;\n }\n\n if (comp.has_survey_sensor && !Number.isFinite(comp.bit_to_survey_distance)) {\n error.bit_to_survey_distance = 'This field is required.';\n hasFormErrors = true;\n } else if (comp.has_survey_sensor && comp.bit_to_survey_distance <= 0) {\n error.bit_to_survey_distance = 'Should be a positive number.';\n hasFormErrors = true;\n } else if (comp.has_survey_sensor && comp.bit_to_survey_distance > 150) {\n error.bit_to_survey_distance = 'Should be less then 150.';\n hasFormErrors = true;\n }\n\n if (\n comp.has_directional_sensor &&\n !Number.isFinite(comp.directional_sensor_to_bit_distance)\n ) {\n error.directional_sensor_to_bit_distance = 'This field is required.';\n hasFormErrors = true;\n } else if (comp.has_directional_sensor && comp.directional_sensor_to_bit_distance <= 0) {\n error.directional_sensor_to_bit_distance = 'Should be a positive number.';\n hasFormErrors = true;\n } else if (comp.has_directional_sensor && comp.directional_sensor_to_bit_distance > 150) {\n error.directional_sensor_to_bit_distance = 'Should be less then 150.';\n hasFormErrors = true;\n }\n }\n\n if (comp.family === 'pdm') {\n let pdmFieldUnitLower;\n let pdmFieldUnitUpper;\n\n if (!isValidNumber(comp.number_rotor_lobes, PDM_MIN_ROTOR, PDM_MAX_ROTOR)) {\n error.number_rotor_lobes = `It must be ${PDM_MIN_ROTOR}~${PDM_MAX_ROTOR}`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.number_stator_lobes, PDM_MIN_STATOR, PDM_MAX_STATOR)) {\n error.number_stator_lobes = `It must be ${PDM_MIN_STATOR}~${PDM_MAX_STATOR}`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.rpg, PDM_MIN_RPG, PDM_MAX_RPG)) {\n error.rpg = `It must be ${PDM_MIN_RPG}~${PDM_MAX_RPG}`;\n hasFormErrors = true;\n }\n\n pdmFieldUnitLower = convertValue(PDM_MIN_WOB, 'force', 'klbf');\n pdmFieldUnitUpper = convertValue(PDM_MAX_WOB, 'force', 'klbf');\n if (\n !isValueEmpty(comp.max_weight_on_bit) &&\n !isValidNumber(comp.max_weight_on_bit, pdmFieldUnitLower, pdmFieldUnitUpper)\n ) {\n error.max_weight_on_bit = `It must be ${pdmFieldUnitUpper.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n hasFormErrors = true;\n }\n\n pdmFieldUnitLower = convertValue(PDM_MIN_FLOW_RANGE, 'volumeFlowRate', 'gal/min');\n pdmFieldUnitUpper = convertValue(PDM_MAX_FLOW_RANGE, 'volumeFlowRate', 'gal/min');\n if (!isValidNumber(comp.min_standard_flowrate, pdmFieldUnitLower, pdmFieldUnitUpper)) {\n error.min_standard_flowrate = `It must be ${pdmFieldUnitLower.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.max_standard_flowrate, pdmFieldUnitLower, pdmFieldUnitUpper)) {\n error.max_standard_flowrate = `It must be ${pdmFieldUnitLower.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n hasFormErrors = true;\n }\n\n pdmFieldUnitLower = convertValue(PDM_MIN_MODP, 'pressure', 'psi');\n pdmFieldUnitUpper = convertValue(PDM_MAX_MODP, 'pressure', 'psi');\n if (\n !isValidNumber(\n comp.max_operating_differential_pressure,\n pdmFieldUnitLower,\n pdmFieldUnitUpper\n )\n ) {\n error.max_operating_differential_pressure = `It must be ${pdmFieldUnitLower.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n hasFormErrors = true;\n }\n\n pdmFieldUnitLower = convertValue(PDM_MIN_TMODP, 'torque', 'ft-klbf');\n pdmFieldUnitUpper = convertValue(PDM_MAX_TMODP, 'torque', 'ft-klbf');\n if (\n !isValidNumber(\n comp.torque_at_max_operating_differential_pressure,\n pdmFieldUnitLower,\n pdmFieldUnitUpper\n )\n ) {\n error.torque_at_max_operating_differential_pressure = `It must be ${pdmFieldUnitLower.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.flow_loss_percentage, PDM_MIN_FLOW_LOSS, PDM_MAX_FLOW_LOSS)) {\n error.flow_loss_percentage = `It must be ${PDM_MIN_FLOW_LOSS}~${PDM_MAX_FLOW_LOSS}`;\n hasFormErrors = true;\n }\n }\n\n errors.components[comp.id] = error;\n }\n\n if (bitComponents.length !== 1) {\n errors.general.bit_count = 'Number of \"BIT\" components is invalid.';\n hasFormErrors = true;\n }\n\n if (\n bitComponents.length === 1 &&\n components[components.length - 1].family !== 'bit' &&\n components[0].family !== 'bit'\n ) {\n // bit should be top or bottom\n errors.general.bit_position = '\"BIT\" category should be on the bottom of the list.';\n hasFormErrors = true;\n }\n\n if (hasFormErrors) {\n return errors;\n }\n return null;\n}\n\nexport function convertRecordBackToImperialUnit(record) {\n // if bit is top, reverse the components;\n let components = get(record, ['data', 'components']);\n if (get(components, [0, 'family']) === 'bit') {\n components = components.reverse().map((comp, idx) => ({ ...comp, order: idx }));\n record = set(record, ['data', 'components'], components); // eslint-disable-line no-param-reassign\n }\n\n const { data } = cloneDeep(record);\n const objStartTime = data.start_timestamp_str && moment(new Date(data.start_timestamp_str));\n if (objStartTime && objStartTime.isValid()) {\n data.start_timestamp = objStartTime.unix();\n }\n delete data.start_timestamp_str;\n\n data.start_depth = ctoi(data.start_depth, 'length', 'ft');\n data.components = data.components.map(component => {\n const cc = Object.assign({}, component);\n cc.inner_diameter = ctoi(cc.inner_diameter, 'shortLength', 'in');\n cc.outer_diameter = ctoi(cc.outer_diameter, 'shortLength', 'in', 4);\n cc.linear_weight = ctoi(cc.linear_weight, 'massPerLength', 'lb-ft');\n cc.weight = ctoi(cc.weight, 'mass', 'lb');\n cc.length = ctoi(cc.length, 'length', 'ft');\n cc.component_length = ctoi(cc.component_length, 'length', 'ft');\n cc.outer_diameter_tooljoint = ctoi(cc.outer_diameter_tooljoint, 'shortLength', 'in');\n cc.inner_diameter_tooljoint = ctoi(cc.inner_diameter_tooljoint, 'shortLength', 'in');\n cc.length_tooljoint = ctoi(cc.length_tooljoint, 'length', 'ft');\n\n if (cc.family === 'bit' || cc.family === 'ur') {\n const ratio = ctoi(1, 'shortLength', 'in');\n cc.size = ctoi(cc.size, 'shortLength', 'in', 3);\n if (cc.nozzle_sizes && cc.nozzle_sizes.length > 0) {\n for (let j = 0; j < cc.nozzle_sizes.length; j += 1) {\n const item = cc.nozzle_sizes[j];\n item.size = ratio !== 1 ? ctoi(item.size, 'shortLength', 'in') * 32 : item.size;\n }\n }\n cc.tfa = ratio !== 1 ? cc.tfa * (ratio * ratio) : cc.tfa;\n }\n\n if (cc.family === 'pdm') {\n cc.max_weight_on_bit = ctoi(cc.max_weight_on_bit, 'force', 'klbf');\n cc.min_standard_flowrate = ctoi(cc.min_standard_flowrate, 'volumeFlowRate', 'gal/min');\n cc.max_standard_flowrate = ctoi(cc.max_standard_flowrate, 'volumeFlowRate', 'gal/min');\n cc.max_operating_differential_pressure = ctoi(\n cc.max_operating_differential_pressure,\n 'pressure',\n 'psi'\n );\n cc.torque_at_max_operating_differential_pressure = ctoi(\n cc.torque_at_max_operating_differential_pressure,\n 'torque',\n 'ft-klbf',\n 3\n );\n cc.rpg = ctoi(cc.rpg, 'revolutionPerVolume', 'rpg');\n\n if (cc.off_bottom_pressure_loss && cc.off_bottom_pressure_loss.length > 0) {\n for (let j = 0; j < cc.off_bottom_pressure_loss.length; j += 1) {\n const item = cc.off_bottom_pressure_loss[j];\n item.flow_rate = ctoi(item.flow_rate, 'volumeFlowRate', 'gal/min');\n item.pressure_loss = ctoi(item.pressure_loss, 'pressure', 'psi');\n }\n }\n if (!cc.has_stabilizer) {\n delete cc.stabilizer;\n }\n if (cc.stabilizer) {\n cc.stabilizer.inner_diameter =\n cc.stabilizer.inner_diameter && ctoi(cc.stabilizer.inner_diameter, 'shortLength', 'in');\n cc.stabilizer.outer_diameter =\n cc.stabilizer.outer_diameter && ctoi(cc.stabilizer.outer_diameter, 'shortLength', 'in');\n cc.stabilizer.linear_weight =\n cc.stabilizer.linear_weight &&\n ctoi(cc.stabilizer.linear_weight, 'massPerLength', 'lb-ft');\n cc.stabilizer.weight = cc.stabilizer.weight && ctoi(cc.stabilizer.weight, 'mass', 'lb');\n cc.stabilizer.length = cc.length && ctoi(cc.stabilizer.length, 'length', 'ft');\n cc.stabilizer.gauge_od =\n cc.stabilizer.gauge_od && ctoi(cc.stabilizer.gauge_od, 'shortLength', 'in');\n cc.stabilizer.gauge_length =\n cc.stabilizer.gauge_length && ctoi(cc.stabilizer.gauge_length, 'shortLength', 'in');\n cc.stabilizer.blade_width =\n cc.stabilizer.blade_width && ctoi(cc.stabilizer.blade_width, 'shortLength', 'in');\n cc.stabilizer.stab_centerpoint_to_bit =\n cc.stabilizer.stab_centerpoint_to_bit &&\n ctoi(cc.stabilizer.stab_centerpoint_to_bit, 'length', 'ft');\n }\n }\n\n if (cc.family === 'stabilizer' || cc.family === 'ags') {\n cc.gauge_od = ctoi(cc.gauge_od, 'shortLength', 'in');\n cc.gauge_length = ctoi(cc.gauge_length, 'shortLength', 'in');\n cc.blade_width = ctoi(cc.blade_width, 'shortLength', 'in');\n }\n\n if (cc.family === 'mwd' || cc.family === 'rss' || cc.family === 'agitator') {\n if (cc.pressure_loss && cc.pressure_loss.length > 0) {\n for (let j = 0; j < cc.pressure_loss.length; j += 1) {\n const item = cc.pressure_loss[j];\n item.flow_rate = ctoi(item.flow_rate, 'volumeFlowRate', 'gal/min');\n item.pressure_loss = ctoi(item.pressure_loss, 'pressure', 'psi');\n }\n }\n }\n\n if (cc.family !== 'bit') {\n delete cc.bit_type;\n }\n if (!cc.has_gamma_sensor && Number.isFinite(cc.gamma_sensor_to_bit_distance)) {\n delete cc.gamma_sensor_to_bit_distance;\n }\n if (!cc.has_survey_sensor && Number.isFinite(cc.bit_to_survey_distance)) {\n delete cc.bit_to_survey_distance;\n }\n if (!cc.has_directional_sensor && Number.isFinite(cc.directional_sensor_to_bit_distance)) {\n delete cc.directional_sensor_to_bit_distance;\n }\n delete cc.c_length;\n return cc;\n });\n\n return {\n ...record,\n data,\n };\n}\n\nexport function ctoi(val, unitType, unit, precision = 2) {\n if (val === null || typeof val === 'undefined') {\n return null;\n }\n if (!unitType || !unit) {\n return parseFloat(val);\n }\n return parseFloat(convertValue(val, unitType, getUnitPreference(unitType), unit, precision));\n}\n\nexport function convertRecordtoPrefUnit(record) {\n const { data } = cloneDeep(record);\n const { components } = data;\n data.start_depth = ctop(data.start_depth, 'length', 'ft');\n\n if (components.length > 0) {\n if (components[0].family === 'bit') {\n components[0].c_length = components[0].length || 0;\n for (let i = 1; i < components.length; i += 1) {\n components[i].c_length =\n parseFloat(components[i - 1].c_length) + parseFloat(components[i].length || 0);\n }\n } else {\n const lastIndex = components.length - 1;\n components[lastIndex].c_length = components[lastIndex].length || 0;\n for (let i = lastIndex - 1; i >= 0; i -= 1) {\n components[i].c_length =\n parseFloat(components[i + 1].c_length) + parseFloat(components[i].length || 0);\n }\n }\n }\n\n for (let i = 0; i < components.length; i += 1) {\n const comp = components[i];\n comp.inner_diameter = ctop(comp.inner_diameter, 'shortLength', 'in');\n comp.outer_diameter = ctop(comp.outer_diameter, 'shortLength', 'in', 4);\n comp.linear_weight = ctop(comp.linear_weight, 'massPerLength', 'lb-ft');\n comp.weight = ctop(comp.weight, 'mass', 'lb');\n comp.length = ctop(comp.length, 'length', 'ft');\n comp.component_length = ctop(comp.component_length, 'length', 'ft');\n comp.outer_diameter_tooljoint = ctop(comp.outer_diameter_tooljoint, 'shortLength', 'in');\n comp.inner_diameter_tooljoint = ctop(comp.inner_diameter_tooljoint, 'shortLength', 'in');\n comp.length_tooljoint = ctop(comp.length_tooljoint, 'length', 'ft');\n\n comp.c_length = ctop(comp.c_length, 'length', 'ft');\n comp.gamma_sensor_to_bit_distance = ctop(comp.gamma_sensor_to_bit_distance, 'length', 'ft');\n\n if (comp.family === 'bit' || comp.family === 'ur') {\n const ratio = ctop(1, 'shortLength', 'in');\n comp.size = ctop(comp.size, 'shortLength', 'in');\n if (comp.nozzle_sizes && comp.nozzle_sizes.length > 0) {\n for (let j = 0; j < comp.nozzle_sizes.length; j += 1) {\n const item = comp.nozzle_sizes[j];\n item.size = ratio !== 1 ? ctop(item.size, 'shortLength', 'in') / 32 : item.size;\n }\n }\n comp.tfa = ratio !== 1 ? comp.tfa * (ratio * ratio) : comp.tfa;\n }\n\n if (comp.family === 'pdm') {\n comp.max_weight_on_bit = ctop(comp.max_weight_on_bit, 'force', 'klbf');\n comp.min_standard_flowrate = ctop(comp.min_standard_flowrate, 'volumeFlowRate', 'gal/min');\n comp.max_standard_flowrate = ctop(comp.max_standard_flowrate, 'volumeFlowRate', 'gal/min');\n comp.max_operating_differential_pressure = ctop(\n comp.max_operating_differential_pressure,\n 'pressure',\n 'psi'\n );\n comp.torque_at_max_operating_differential_pressure = ctop(\n comp.torque_at_max_operating_differential_pressure,\n 'torque',\n 'ft-klbf',\n 3\n );\n if (comp.off_bottom_pressure_loss && comp.off_bottom_pressure_loss.length > 0) {\n for (let j = 0; j < comp.off_bottom_pressure_loss.length; j += 1) {\n const item = comp.off_bottom_pressure_loss[j];\n item.flow_rate = ctop(item.flow_rate, 'volumeFlowRate', 'gal/min');\n item.pressure_loss = ctop(item.pressure_loss, 'pressure', 'psi');\n }\n }\n comp.rpg = ctop(comp.rpg, 'revolutionPerVolume', 'rpg');\n if (comp.has_stabilizer && comp.stabilizer) {\n comp.stabilizer.inner_diameter = ctop(comp.stabilizer.inner_diameter, 'shortLength', 'in');\n comp.stabilizer.outer_diameter = ctop(comp.stabilizer.outer_diameter, 'shortLength', 'in');\n comp.stabilizer.linear_weight = ctop(\n comp.stabilizer.linear_weight,\n 'massPerLength',\n 'lb-ft'\n );\n comp.stabilizer.weight = ctop(comp.stabilizer.weight, 'mass', 'lb');\n comp.stabilizer.length = ctop(comp.stabilizer.length, 'length', 'ft');\n comp.stabilizer.gauge_od = ctop(comp.stabilizer.gauge_od, 'shortLength', 'in');\n comp.stabilizer.gauge_length = ctop(comp.stabilizer.gauge_length, 'shortLength', 'in');\n comp.stabilizer.blade_width = ctop(comp.stabilizer.blade_width, 'shortLength', 'in');\n comp.stabilizer.stab_centerpoint_to_bit = ctop(\n comp.stabilizer.stab_centerpoint_to_bit,\n 'length',\n 'ft'\n );\n }\n }\n\n if (comp.family === 'stabilizer' || comp.family === 'ags') {\n comp.gauge_od = ctop(comp.gauge_od, 'shortLength', 'in');\n comp.gauge_length = ctop(comp.gauge_length, 'shortLength', 'in');\n comp.blade_width = ctop(comp.blade_width, 'shortLength', 'in');\n }\n\n if (comp.family === 'mwd' || comp.family === 'rss' || comp.family === 'agitator') {\n if (comp.pressure_loss && comp.pressure_loss.length > 0) {\n for (let j = 0; j < comp.pressure_loss.length; j += 1) {\n const item = comp.pressure_loss[j];\n item.flow_rate = ctop(item.flow_rate, 'volumeFlowRate', 'gal/min');\n item.pressure_loss = ctop(item.pressure_loss, 'pressure', 'psi');\n }\n }\n }\n }\n return {\n ...record,\n data,\n };\n}\n\nexport function ctop(val, unitType, unit, precision = 2) {\n if (val !== 0 && !val) {\n return null;\n }\n return unitType && unit ? convertValue(val, unitType, unit, null, precision) : val;\n}\n"],"names":["sValueEmpty","val","isValidNumber","num","min","max","_ref","arguments","length","undefined","_ref$isMinInclusive","isMinInclusive","parsedNum","parseFloat","Number","isNaN","isValidLinearWeight","id","od","linearWeight","prefShortLengthUnit","getUnitPreference","convertedId","convertedOd","convertValue","estimation","convertedEstimation","validate","recordData","data","start_timestamp_str","start_depth","components","shortLengthUnitDisplay","getUnitDisplay","lengthUnitDisplay","errors","general","specificErrors","bitComponents","filter","comp","family","bitSize","size","mwdHavingGamma","has_gamma_sensor","hasFormErrors","isValueEmpty","moment","Date","isValid","start_timestamp","isFinite","minDepth","maxDepth","prohibitedDepth","concat","toFixed","i","min_id","min_od","max_id","max_od","min_opened_od","max_opened_od","min_length","min_tj_id","max_tj_id","min_tj_od","max_tj_od","min_pressure_loss","min_off_bottom_pressure_loss","min_rd","max_rd","error","inner_diameter","outer_diameter","linear_weight","ur_opened_od","inner_diameter_tooljoint","outer_diameter_tooljoint","length_tooljoint","component_length","off_bottom_pressure_loss","j","obpsItem","flow_rate","pressure_loss","pressureLossItem","has_stabilizer","stabilizer","stab_min_id","stab_max_id","stab_min_od","stab_max_od","stab_min_length","stabilizer_outer_diameter","stabilizer_inner_diameter","stabilizer_length","stabilizer_linear_weight","reel_diameter","ratio","ctop","lowerLimit","upperLimit","tfa","flow_loss_percentage","gamma_sensor_to_bit_distance","has_survey_sensor","bit_to_survey_distance","has_directional_sensor","directional_sensor_to_bit_distance","pdmFieldUnitLower","pdmFieldUnitUpper","number_rotor_lobes","number_stator_lobes","rpg","max_weight_on_bit","min_standard_flowrate","max_standard_flowrate","max_operating_differential_pressure","torque_at_max_operating_differential_pressure","bit_count","bit_position","convertRecordBackToImperialUnit","record","get","reverse","map","idx","_objectSpread","order","set","cloneDeep","objStartTime","unix","ctoi","component","cc","Object","assign","weight","nozzle_sizes","item","gauge_od","gauge_length","bl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D,cAAe,WAAY,MAC5D,CAGN,CACA,OAAA2C,EAAAA,EAAA,CAAA,EACKL,GAAM,CAAA,EAAA,CACTjG,KAAAA,GAEJ,CAEO,SAAS0E,EAAKtG,EAAKsJ,EAAUC,GAAqB,IAAfC,yDAAY,EACpD,OAAY,IAARxJ,GAAcA,EAGXsJ,GAAYC,EAAOhI,EAAavB,EAAKsJ,EAAUC,EAAM,KAAMC,GAAaxJ,EAFtE,IAGX"}
|
package/utils/apps.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"
|
|
1
|
+
import"../components/UserMention/utils/index.js";import"@babel/runtime/helpers/defineProperty";import"./convert.js";import"../constants/completion.js";import"moment";import"../constants/alerts.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"./casing/validation.js";import"@babel/runtime/helpers/slicedToArray";import"lodash/mean";import"lodash";import"../constants/streamSourceType.js";import"lodash/get";import"file-saver";import"query-string";import"../constants/goals.js";import"../constants/segment.js";import{DEFAULT_GRID_LAYOUT_PADDING as t,GRID_ROW_HEIGHT as o,GRID_COLUMN_SIZES as s}from"../constants/apps.js";import"../constants/drillstring.js";import"../constants/appPackages.js";import"../constants/notifications.js";import"../constants/feed.js";import"../constants/bha.js";import"../constants/corvaCompanyId.js";import"../components/GradientManager/configuration/constants.js";import"./drillstring/conversion.js";import"lodash/set";import"lodash/cloneDeep";import"@babel/runtime/helpers/toConsumableArray";import"lodash/isNumber";import"lodash/has";import"./ga.js";import"./goalsConfig/goalsConfig.js";import"./lasParser.js";import"./main.js";import"./metrics/metricsConfig.js";import{isMobileDetected as r,isNativeDetected as i}from"./mobileDetect.js";import"./feed.js";import"./reports.js";import"moment-timezone";import"@babel/runtime/helpers/typeof";import"./dashboardReports.js";import"./env.js";import"file-extension";import"image-extensions";import"video-extensions";import"./jsonaDataFormatter.js";import"./bha.js";import"jsona";import"../clients/jsonApi/index.js";import"@babel/runtime/helpers/objectWithoutProperties";import"classnames";import"./charts/Styles.scss.js";import"./getSingleAsset.js";var e=function(e){var n=e.coordinates,m=e.dashboardWidth,p=e.isMaximized;return{pixelHeight:p?window.innerHeight-2*t:n.h*(o+t)-t,pixelWidth:p||r||i?m-2*t:(m-t)*n.w/s.large-t}};export{e as getAppSize};
|
|
2
2
|
//# sourceMappingURL=apps.js.map
|
package/utils/apps.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apps.js","sources":["../../src/utils/apps.js"],"sourcesContent":["import { mobileDetect } from '~/utils';\nimport { GRID_ROW_HEIGHT, GRID_COLUMN_SIZES, DEFAULT_GRID_LAYOUT_PADDING } from '~/constants/apps';\n\n// NOTE: Returns precise pixel sizes\nexport const getAppSize = ({ coordinates, dashboardWidth, isMaximized }) => {\n return {\n pixelHeight: isMaximized\n ? window.innerHeight - DEFAULT_GRID_LAYOUT_PADDING * 2\n : coordinates.h * (GRID_ROW_HEIGHT + DEFAULT_GRID_LAYOUT_PADDING) -\n DEFAULT_GRID_LAYOUT_PADDING,\n pixelWidth:\n isMaximized || mobileDetect.isMobileDetected || mobileDetect.isNativeDetected\n ? dashboardWidth - DEFAULT_GRID_LAYOUT_PADDING * 2\n : ((dashboardWidth - DEFAULT_GRID_LAYOUT_PADDING) * coordinates.w) /\n GRID_COLUMN_SIZES.large -\n DEFAULT_GRID_LAYOUT_PADDING,\n };\n};\n"],"names":["getAppSize","_ref","coordinates","dashboardWidth","isMaximized","pixelHeight","window","innerHeight","DEFAULT_GRID_LAYOUT_PADDING","h","GRID_ROW_HEIGHT","pixelWidth","mobileDetect","w","GRID_COLUMN_SIZES","large"],"mappings":"
|
|
1
|
+
{"version":3,"file":"apps.js","sources":["../../src/utils/apps.js"],"sourcesContent":["import { mobileDetect } from '~/utils';\nimport { GRID_ROW_HEIGHT, GRID_COLUMN_SIZES, DEFAULT_GRID_LAYOUT_PADDING } from '~/constants/apps';\n\n// NOTE: Returns precise pixel sizes\nexport const getAppSize = ({ coordinates, dashboardWidth, isMaximized }) => {\n return {\n pixelHeight: isMaximized\n ? window.innerHeight - DEFAULT_GRID_LAYOUT_PADDING * 2\n : coordinates.h * (GRID_ROW_HEIGHT + DEFAULT_GRID_LAYOUT_PADDING) -\n DEFAULT_GRID_LAYOUT_PADDING,\n pixelWidth:\n isMaximized || mobileDetect.isMobileDetected || mobileDetect.isNativeDetected\n ? dashboardWidth - DEFAULT_GRID_LAYOUT_PADDING * 2\n : ((dashboardWidth - DEFAULT_GRID_LAYOUT_PADDING) * coordinates.w) /\n GRID_COLUMN_SIZES.large -\n DEFAULT_GRID_LAYOUT_PADDING,\n };\n};\n"],"names":["getAppSize","_ref","coordinates","dashboardWidth","isMaximized","pixelHeight","window","innerHeight","DEFAULT_GRID_LAYOUT_PADDING","h","GRID_ROW_HEIGHT","pixelWidth","mobileDetect","w","GRID_COLUMN_SIZES","large"],"mappings":"quDAIaA,IAAAA,EAAa,SAAkDC,GAAA,IAA/CC,IAAAA,YAAaC,IAAAA,eAAgBC,IAAAA,YACxD,MAAO,CACLC,YAAaD,EACTE,OAAOC,YAA4C,EAA9BC,EACrBN,EAAYO,GAAKC,EAAkBF,GACnCA,EACJG,WACEP,GAAeQ,GAAiCA,EAC5CT,EAA+C,EAA9BK,GACfL,EAAiBK,GAA+BN,EAAYW,EAC5DC,EAAkBC,MACpBP,EAEV"}
|
package/utils/convert.d.ts
CHANGED
|
@@ -123,25 +123,6 @@ export declare const getDefaultImperialUnit: (unitType: any) => any;
|
|
|
123
123
|
* @return {number}
|
|
124
124
|
*/
|
|
125
125
|
export declare const convertValue: (value: number, unitType: string, from: string, to?: string, precision?: number) => number;
|
|
126
|
-
/**
|
|
127
|
-
* Converts a key in an immutable list of immutables.
|
|
128
|
-
* @param {*} immt The list of maps/lists containing values that we want to convert
|
|
129
|
-
* @param {string} key The key in each sub-iterable that we want to convert
|
|
130
|
-
* @param {string} unitType The class of unit such as volume, length, mass, etc.
|
|
131
|
-
* @param {string} from The specific unit such as m, gal, lb, etc.
|
|
132
|
-
* @param {string} to (optional) the unit that we want to convert the value to.
|
|
133
|
-
* @param {number} precision to round to the value
|
|
134
|
-
* @returns {*} Immutable
|
|
135
|
-
*/
|
|
136
|
-
export declare const convertImmutables: (immt: any, key: string, unitType: string, from: string, to?: string, precision?: number) => any;
|
|
137
|
-
/**
|
|
138
|
-
* convertImmutablesByBatch is the expansion of convertImmutables
|
|
139
|
-
* It allows you to convert the immutables by multiple keys/units at once.
|
|
140
|
-
*
|
|
141
|
-
* @param {*} immt immutable you want to convert
|
|
142
|
-
* @param {*} conversionRules is the array of conversion to be done { key, unitType, from, to }
|
|
143
|
-
*/
|
|
144
|
-
export declare const convertImmutablesByBatch: (immt: any, conversionRules: any) => any;
|
|
145
126
|
/**
|
|
146
127
|
* Converts a property in a simple array of js objects or arrays.
|
|
147
128
|
* @param {number[][]} iterable The array of iterables containing values that we want to convert
|
package/utils/convert.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../src/utils/convert.js"],"names":[],"mappings":"AA2BA,eAAO,MAAM,eAAe;;;;;;GAAyB,CAAC;AAEtD,eAAO,MAAM,eAAe,WAA0B,CAAC;AA2BvD;;;;;GAKG;AACH,eAAO,MAAM,eAAe,oGAHzB;IAAyC,SAAS,EAA1C,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAC9B;IAAyC,YAAY,EAA7C,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAChC;CAAA,SAqBA,CAAC;AAEF,wBAAgB,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE3B;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,WAAW,UAAA,cAQvD;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,aAHnB,MAAM,KACJ,MAE2D,CAAC;AAEzE;;;;GAIG;AACH,eAAO,MAAM,cAAc,SAHhB,MAAM,KACJ,MAAM,EAUlB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AJhB,MAAM,WACN,MAAM,KACJ,MAiBZ,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,wBAAuC,CAAC;AAE3E;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,UARd,MAAM,YACN,MAAM,QACN,MAAM,OACN,MAAM,cACN,MAAM,KAEL,MAoBX,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,aAPd,MAAM,EAAE,EAAE,mBACV,MAAM,YACN,MAAM,QACN,MAAM,OACN,MAAM,yBACJ,MAAM,EAAE,EAepB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,aAHjB,MAAM,KACJ,MASZ,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,aAHf,MAAM,KACJ,MASZ,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kBAAkB,aAVpB,MAAM,KACL;IACN,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAA;CAOpB,CAAC"}
|
package/utils/convert.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import r from"@babel/runtime/helpers/defineProperty";import n from"corva-convert-units";import{sortBy as t,uniqBy as e,mapValues as i}from"lodash";import{IMPERIAL_UNITS as o,METRIC_UNITS as u,UNIT_DEFINITIONS as c,UNIT_TYPES_DEFINITIONS_MAP as a}from"./constants/units.js";function l(r,n){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable}))),t.push.apply(t,e)}return t}function s(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?l(Object(e),!0).forEach((function(t){r(n,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):l(Object(e)).forEach((function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))}))}return n}var v={imperial:o,metric:u,custom:s({},o)},f=[],m={},d=function(){return c},p=function(){return v.custom};var b=function(r){var n,t=r.userUnits,e=void 0===t?{}:t,u=r.companyUnits,c=void 0===u?{}:u,a=r.companyCustomUnitSystem,l=void 0===a?{}:a,d=r.userCustomUnitSystem,p=void 0===d?{}:d,b=r.companyCustomUnits;v.custom=s(s(s(s(s({},o),c),l),e),p),b&&(m=i(b||{},(function(r,n){var t=r.measures;return{display:r.name,imperial:n,measures:t.map((function(r){return{abbr:r.abbr,display:r.name,measure:r.abbr,plural:r.name,singular:r.name,system:"custom"}})),metric:n,origin:n,type:n}}))),n=v.custom,f.forEach((function(r){return r(n)}))};function g(){return v.custom}function y(r){return f.push(r),function(){f=f.filter((function(n){return n!==r}))}}var h=function(r){return v.custom[r]},O=function(r){var e,i=a[r];return i?t(n().list(i.origin),"abbr"):(null===(e=m[r])||void 0===e?void 0:e.measures)||[]},j=function(r){var n=O(r);return e(n,"abbr")},P=function(){return"custom"},w=function(r){var t,e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=null===(t=a[r])||void 0===t?void 0:t.origin,u=n(void 0,o);if(null===i&&(i=v.custom[r]),u.getUnit(i))return u.describe(i).display;var c=null===(e=O(r).find((function(r){return r.measure===i})))||void 0===e?void 0:e.display;return c||i},U=function(r){return v.imperial[r]},D=function(r,t,e){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2;if(!r||!e||e===o||m[t])return r;if(null===o&&(!(o=h(t))||e===o))return r;var c=null===(i=a[t])||void 0===i?void 0:i.origin,l=n(r,c).from(e).to(o);return Number.isFinite(l)?Math.round(l*Math.pow(10,u))/Math.pow(10,u):l},S=function(
|
|
1
|
+
import r from"@babel/runtime/helpers/defineProperty";import n from"corva-convert-units";import{sortBy as t,uniqBy as e,mapValues as i}from"lodash";import{IMPERIAL_UNITS as o,METRIC_UNITS as u,UNIT_DEFINITIONS as c,UNIT_TYPES_DEFINITIONS_MAP as a}from"./constants/units.js";function l(r,n){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable}))),t.push.apply(t,e)}return t}function s(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?l(Object(e),!0).forEach((function(t){r(n,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):l(Object(e)).forEach((function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))}))}return n}var v={imperial:o,metric:u,custom:s({},o)},f=[],m={},d=function(){return c},p=function(){return v.custom};var b=function(r){var n,t=r.userUnits,e=void 0===t?{}:t,u=r.companyUnits,c=void 0===u?{}:u,a=r.companyCustomUnitSystem,l=void 0===a?{}:a,d=r.userCustomUnitSystem,p=void 0===d?{}:d,b=r.companyCustomUnits;v.custom=s(s(s(s(s({},o),c),l),e),p),b&&(m=i(b||{},(function(r,n){var t=r.measures;return{display:r.name,imperial:n,measures:t.map((function(r){return{abbr:r.abbr,display:r.name,measure:r.abbr,plural:r.name,singular:r.name,system:"custom"}})),metric:n,origin:n,type:n}}))),n=v.custom,f.forEach((function(r){return r(n)}))};function g(){return v.custom}function y(r){return f.push(r),function(){f=f.filter((function(n){return n!==r}))}}var h=function(r){return v.custom[r]},O=function(r){var e,i=a[r];return i?t(n().list(i.origin),"abbr"):(null===(e=m[r])||void 0===e?void 0:e.measures)||[]},j=function(r){var n=O(r);return e(n,"abbr")},P=function(){return"custom"},w=function(r){var t,e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=null===(t=a[r])||void 0===t?void 0:t.origin,u=n(void 0,o);if(null===i&&(i=v.custom[r]),u.getUnit(i))return u.describe(i).display;var c=null===(e=O(r).find((function(r){return r.measure===i})))||void 0===e?void 0:e.display;return c||i},U=function(r){return v.imperial[r]},D=function(r,t,e){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2;if(!r||!e||e===o||m[t])return r;if(null===o&&(!(o=h(t))||e===o))return r;var c=null===(i=a[t])||void 0===i?void 0:i.origin,l=n(r,c).from(e).to(o);return Number.isFinite(l)?Math.round(l*Math.pow(10,u))/Math.pow(10,u):l},S=function(){for(var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0,e=arguments.length>3?arguments[3]:void 0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:2,u=0;u<r.length;u+=1)r[u][n]=D(r[u][n],t,e,i,o);return r},C=function(r){var t,e=null===(t=a[r])||void 0===t?void 0:t.origin;return m[r]?w(r):n(void 0,e).describe(h(r)).singular},E=function(r){var t,e=null===(t=a[r])||void 0===t?void 0:t.origin;return m[r]?w(r):n(void 0,e).describe(h(r)).plural},M=function(r){var t,e=null===(t=a[r])||void 0===t?void 0:t.origin;return n(void 0,e).describe(r)};export{S as convertArray,D as convertValue,d as getAllUnitTypes,U as getDefaultImperialUnit,p as getDefaultUnits,j as getUniqueUnitsByType,M as getUnitDescription,w as getUnitDisplay,E as getUnitPlural,h as getUnitPreference,C as getUnitSingular,P as getUnitSystem,O as getUnitsByType,g as getUserUnits,y as subscribeForUserUnitsUpdates,b as updateUserUnits};
|
|
2
2
|
//# sourceMappingURL=convert.js.map
|
package/utils/convert.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert.js","sources":["../../src/utils/convert.js"],"sourcesContent":["/* eslint-disable no-param-reassign */\nimport convert from 'corva-convert-units';\nimport { mapValues, sortBy, uniqBy } from 'lodash';\n\nimport {\n IMPERIAL_UNITS,\n METRIC_UNITS,\n UNIT_DEFINITIONS,\n UNIT_TYPES_DEFINITIONS_MAP,\n} from './constants/units';\n\nconst DEFAULT_PRECISION = 2;\nconst UNIT_SYSTEM_TYPES = {\n custom: 'custom',\n default: 'imperial',\n};\n\nconst units = {\n imperial: IMPERIAL_UNITS,\n metric: METRIC_UNITS,\n custom: { ...IMPERIAL_UNITS },\n};\n\nconst unitSystem = UNIT_SYSTEM_TYPES.custom;\nlet userUnitsUpdatesSubscribers = [];\nlet customUnitDefinitions = {};\n\nexport const getAllUnitTypes = () => UNIT_DEFINITIONS;\n\nexport const getDefaultUnits = () => units[unitSystem];\n\nconst normalizeCompanyCustomUnits = customUnits =>\n mapValues(customUnits || {}, ({ measures, name }, type) => ({\n display: name,\n imperial: type,\n measures: measures.map(measure => ({\n abbr: measure.abbr,\n display: measure.name,\n measure: measure.abbr,\n plural: measure.name,\n singular: measure.name,\n system: 'custom',\n })),\n metric: type,\n origin: type,\n type,\n }));\n\n/**\n * Adds platform notification toast\n * @param {object} newUnits\n */\nfunction notifyAboutUserUnitsUpdate(newUnits) {\n userUnitsUpdatesSubscribers.forEach(callback => callback(newUnits));\n}\n\n/**\n * Updates current custom unit system with user data\n * @param {object} userData\n * @param {Record<string, string>} userData.userUnits\n * @param {Record<string, string>} userData.companyUnits\n */\nexport const updateUserUnits = ({\n userUnits = {},\n companyUnits = {},\n companyCustomUnitSystem = {},\n userCustomUnitSystem = {},\n companyCustomUnits,\n}) => {\n units.custom = {\n ...IMPERIAL_UNITS,\n ...companyUnits,\n ...companyCustomUnitSystem,\n ...userUnits,\n ...userCustomUnitSystem,\n };\n\n if (companyCustomUnits) {\n customUnitDefinitions = normalizeCompanyCustomUnits(companyCustomUnits);\n }\n\n notifyAboutUserUnitsUpdate(units.custom);\n};\n\nexport function getUserUnits() {\n return units.custom;\n}\n\n/**\n * Used for DC Isolated App container\n * @param {Function} newCallback\n */\nexport function subscribeForUserUnitsUpdates(newCallback) {\n userUnitsUpdatesSubscribers.push(newCallback);\n\n return () => {\n userUnitsUpdatesSubscribers = userUnitsUpdatesSubscribers.filter(\n callback => callback !== newCallback\n );\n };\n}\n\n/**\n * Retrieves a unit of a given type by current unit system\n * @param {string} unitType length, mass, volume, etc\n * @returns {string}\n */\nexport const getUnitPreference = unitType => units[unitSystem][unitType];\n\n/**\n * Lists all the units of a specific type\n * @param {string} type\n * @returns {Object[]}\n */\nexport const getUnitsByType = type => {\n const definition = UNIT_TYPES_DEFINITIONS_MAP[type];\n\n if (definition) {\n return sortBy(convert().list(definition.origin), 'abbr');\n }\n // NOTE: Look up in custom company units\n return customUnitDefinitions[type]?.measures || [];\n};\n\n/**\n * Returns unique units list for some measurements that use same units for imperial and metric system\n * @param {string} type\n * @returns {Object[]}\n */\nexport const getUniqueUnitsByType = type => {\n const definition = getUnitsByType(type);\n\n return uniqBy(definition, 'abbr');\n};\n\n/**\n * @deprecated - unit system can be custom, better to use convert functions\n */\nexport const getUnitSystem = () => unitSystem;\n\n/**\n * Retrieves the unit display name for a given unit type\n * @param {string} unitType length, mass, volume, etc\n * @param {string} [unitTo=null]\n * @returns {string}\n */\nexport const getUnitDisplay = (unitType, unitTo = null) => {\n const measure = UNIT_TYPES_DEFINITIONS_MAP[unitType]?.origin;\n const convertedValue = convert(undefined, measure);\n if (unitTo === null) {\n unitTo = units.custom[unitType];\n }\n if (convertedValue.getUnit(unitTo)) {\n return convertedValue.describe(unitTo).display;\n }\n\n const customUnitDisplay = getUnitsByType(unitType).find(\n ({ measure }) => measure === unitTo\n )?.display;\n\n return customUnitDisplay || unitTo;\n};\n\n/**\n * @deprecated - should not depends on imperial system only, because we have mixed unit system\n * Retrieves the unit display name for imperial unit type\n * @param unitType length, mass, volume, etc\n * @returns string\n */\nexport const getDefaultImperialUnit = unitType => units.imperial[unitType];\n\n/**\n * Converts a single value\n * @param {number} value The value we want converted.\n * @param {string} unitType The class of unit such as volume, length, mass, etc.\n * @param {string} from The specific unit such as m, gal, lb, etc.\n * @param {string} to (optional) the unit that we want to convert the value to.\n * @param {number} precision to round to the value\n * May be passed in my ConvertList\n * @return {number}\n */\nexport const convertValue = (value, unitType, from, to = null, precision = DEFAULT_PRECISION) => {\n if (!value || !from || from === to || !!customUnitDefinitions[unitType]) {\n return value;\n }\n\n if (to === null) {\n to = getUnitPreference(unitType);\n if (!to || from === to) {\n return value;\n }\n }\n\n const measure = UNIT_TYPES_DEFINITIONS_MAP[unitType]?.origin;\n const convertedValue = convert(value, measure).from(from).to(to);\n\n return Number.isFinite(convertedValue)\n ? Math.round(convertedValue * 10 ** precision) / 10 ** precision\n : convertedValue;\n};\n\n/**\n * Converts a key in an immutable list of immutables.\n * @param {*} immt The list of maps/lists containing values that we want to convert\n * @param {string} key The key in each sub-iterable that we want to convert\n * @param {string} unitType The class of unit such as volume, length, mass, etc.\n * @param {string} from The specific unit such as m, gal, lb, etc.\n * @param {string} to (optional) the unit that we want to convert the value to.\n * @param {number} precision to round to the value\n * @returns {*} Immutable\n */\nexport const convertImmutables = (\n immt,\n key,\n unitType,\n from,\n to = null,\n precision = DEFAULT_PRECISION\n) =>\n immt.map(currentUnitMap => {\n const convertedValue = convertValue(currentUnitMap.get(key), unitType, from, to, precision);\n return currentUnitMap.set(key, convertedValue);\n });\n\n/**\n * convertImmutablesByBatch is the expansion of convertImmutables\n * It allows you to convert the immutables by multiple keys/units at once.\n *\n * @param {*} immt immutable you want to convert\n * @param {*} conversionRules is the array of conversion to be done { key, unitType, from, to }\n */\nexport const convertImmutablesByBatch = (immt, conversionRules) =>\n immt.map(item =>\n conversionRules.reduce((convertingItem, conversionRule) => {\n const { key, unitType, from, to, precision } = conversionRule;\n const val = convertingItem.get(key);\n const convertedValue = convertValue(val, unitType, from, to, precision);\n return convertingItem.set(key, convertedValue);\n }, item)\n );\n\n/**\n * Converts a property in a simple array of js objects or arrays.\n * @param {number[][]} iterable The array of iterables containing values that we want to convert\n * @param {string} key The key in each sub-element that we want to convert\n * @param {string} unitType The class of unit such as volume, length, mass, etc.\n * @param {string} from The specific unit such as m, gal, lb, etc.\n * @param {string} to (optional) the unit that we want to convert the value to.\n * @returns {number[][]}\n */\nexport const convertArray = (\n iterable = [],\n key,\n unitType,\n from,\n to = null,\n precision = DEFAULT_PRECISION\n) => {\n for (let i = 0; i < iterable.length; i += 1) {\n iterable[i][key] = convertValue(iterable[i][key], unitType, from, to, precision);\n }\n\n return iterable;\n};\n\n/**\n * Retrieves the full name for a given unit type, singular\n * @param {string} unitType length, mass, volume, etc\n * @returns {string}\n */\nexport const getUnitSingular = unitType => {\n const measure = UNIT_TYPES_DEFINITIONS_MAP[unitType]?.origin;\n if (customUnitDefinitions[unitType]) {\n return getUnitDisplay(unitType);\n }\n\n return convert(undefined, measure).describe(getUnitPreference(unitType)).singular;\n};\n\n/**\n * Retrieves the full name for a given unit type, plural\n * @param {string} unitType length, mass, volume, etc\n * @returns {string}\n */\nexport const getUnitPlural = unitType => {\n const measure = UNIT_TYPES_DEFINITIONS_MAP[unitType]?.origin;\n if (customUnitDefinitions[unitType]) {\n return getUnitDisplay(unitType);\n }\n\n return convert(undefined, measure).describe(getUnitPreference(unitType)).plural;\n};\n\n/**\n * Retrieves unit data\n *\n * @param {string} unitType length, mass, volume, etc\n * @return {{\n * abbr: string,\n * measure: string,\n * system: string,\n * singular: string,\n * plural: string,\n * display: string\n * }}\n */\nexport const getUnitDescription = unitType => {\n const measure = UNIT_TYPES_DEFINITIONS_MAP[unitType]?.origin;\n\n return convert(undefined, measure).describe(unitType);\n};\n"],"names":["units","imperial","IMPERIAL_UNITS","metric","METRIC_UNITS","custom","userUnitsUpdatesSubscribers","customUnitDefinitions","getAllUnitTypes","UNIT_DEFINITIONS","getDefaultUnits","updateUserUnits","_ref2","newUnits","_ref2$userUnits","userUnits","_ref2$companyUnits","companyUnits","_ref2$companyCustomUn","companyCustomUnitSystem","_ref2$userCustomUnitS","userCustomUnitSystem","companyCustomUnits","mapValues","type","measures","display","name","map","measure","abbr","plural","singular","system","origin","forEach","callback","getUserUnits","subscribeForUserUnitsUpdates","newCallback","push","filter","getUnitPreference","unitType","getUnitsByType","_customUnitDefinition","definition","UNIT_TYPES_DEFINITIONS_MAP","sortBy","convert","list","getUniqueUnitsByType","uniqBy","getUnitSystem","getUnitDisplay","_UNIT_TYPES_DEFINITIO","_getUnitsByType$find","unitTo","convertedValue","undefined","getUnit","describe","customUnitDisplay","find","_ref3","getDefaultImperialUnit","convertValue","value","from","_UNIT_TYPES_DEFINITIO2","to","precision","Number","isFinite","Math","round","pow","convertImmutables","immt","key","currentUnitMap","get","set","convertImmutablesByBatch","conversionRules","item","reduce","convertingItem","conversionRule","val","convertArray","iterable","arguments","length","i","getUnitSingular","_UNIT_TYPES_DEFINITIO3","getUnitPlural","_UNIT_TYPES_DEFINITIO4","getUnitDescription","_UNIT_TYPES_DEFINITIO5"],"mappings":"g1BAWA,IAMMA,EAAQ,CACZC,SAAUC,EACVC,OAAQC,EACRC,YAAaH,IAIXI,EAA8B,GAC9BC,EAAwB,CAAA,EAEfC,EAAkB,WAAH,OAASC,CAAgB,EAExCC,EAAkB,WAAH,OAASV,EAAgB,MAAC,EAiCzCW,IAAAA,EAAkB,SAMzBC,GAAA,IAhB8BC,EAgB9BC,EAAAF,EALJG,UAAAA,OAAS,IAAAD,EAAG,CAAE,EAAAA,EAAAE,EAAAJ,EACdK,aAAAA,OAAY,IAAAD,EAAG,CAAE,EAAAA,EAAAE,EAAAN,EACjBO,wBAAAA,OAAuB,IAAAD,EAAG,CAAE,EAAAA,EAAAE,EAAAR,EAC5BS,qBAAAA,OAAoB,IAAAD,EAAG,CAAE,EAAAA,EACzBE,IAAAA,mBAEAtB,EAAMK,OACDH,EAAAA,EAAAA,EAAAA,EAAAA,EAAAA,CAAAA,EAAAA,GACAe,GACAE,GACAJ,GACAM,GAGDC,IACFf,EA9CFgB,EA8CsDD,GA9C7B,CAAE,GAAE,WAAqBE,GAAI,IAAtBC,IAAAA,SAAc,MAAc,CAC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ACJ,EAWUK,EAAe,WAQ1B,IADG,IANHC,yDAAW,GACXZ,EAAGa,UAAAC,OAAA,EAAAD,UAAA,QAAAjC,EACHhB,EAAQiD,UAAAC,OAAA,EAAAD,UAAA,QAAAjC,EACRS,EAAIwB,UAAAC,OAAA,EAAAD,UAAA,QAAAjC,EACJW,yDAAK,KACLC,yDArPwB,EAuPfuB,EAAI,EAAGA,EAAIH,EAASE,OAAQC,GAAK,EACxCH,EAASG,GAAGf,GAAOb,EAAayB,EAASG,GAAGf,GAAMpC,EAAUyB,EAAME,EAAIC,GAGxE,OAAOoB,CACT,EAOaI,EAAkB,SAAApD,GAAY,IAAAqD,EACnCnE,EAA8C,UAApCkB,EAA2BJ,UAAS,IAAAqD,OAAA,EAApCA,EAAsC9D,OACtD,OAAI3B,EAAsBoC,GACjBW,EAAeX,GAGjBM,OAAQU,EAAW9B,GAASgC,SAASnB,EAAkBC,IAAWX,QAC3E,EAOaiE,EAAgB,SAAAtD,GAAY,IAAAuD,EACjCrE,EAA8C,UAApCkB,EAA2BJ,UAAS,IAAAuD,OAAA,EAApCA,EAAsChE,OACtD,OAAI3B,EAAsBoC,GACjBW,EAAeX,GAGjBM,OAAQU,EAAW9B,GAASgC,SAASnB,EAAkBC,IAAWZ,MAC3E,EAeaoE,EAAqB,SAAAxD,GAAY,IAAAyD,EACtCvE,EAA8C,UAApCkB,EAA2BJ,UAAS,IAAAyD,OAAA,EAApCA,EAAsClE,OAEtD,OAAOe,OAAQU,EAAW9B,GAASgC,SAASlB,EAC9C"}
|
|
1
|
+
{"version":3,"file":"convert.js","sources":["../../src/utils/convert.js"],"sourcesContent":["/* eslint-disable no-param-reassign */\nimport convert from 'corva-convert-units';\nimport { mapValues, sortBy, uniqBy } from 'lodash';\n\nimport {\n IMPERIAL_UNITS,\n METRIC_UNITS,\n UNIT_DEFINITIONS,\n UNIT_TYPES_DEFINITIONS_MAP,\n} from './constants/units';\n\nconst DEFAULT_PRECISION = 2;\nconst UNIT_SYSTEM_TYPES = {\n custom: 'custom',\n default: 'imperial',\n};\n\nconst units = {\n imperial: IMPERIAL_UNITS,\n metric: METRIC_UNITS,\n custom: { ...IMPERIAL_UNITS },\n};\n\nconst unitSystem = UNIT_SYSTEM_TYPES.custom;\nlet userUnitsUpdatesSubscribers = [];\nlet customUnitDefinitions = {};\n\nexport const getAllUnitTypes = () => UNIT_DEFINITIONS;\n\nexport const getDefaultUnits = () => units[unitSystem];\n\nconst normalizeCompanyCustomUnits = customUnits =>\n mapValues(customUnits || {}, ({ measures, name }, type) => ({\n display: name,\n imperial: type,\n measures: measures.map(measure => ({\n abbr: measure.abbr,\n display: measure.name,\n measure: measure.abbr,\n plural: measure.name,\n singular: measure.name,\n system: 'custom',\n })),\n metric: type,\n origin: type,\n type,\n }));\n\n/**\n * Adds platform notification toast\n * @param {object} newUnits\n */\nfunction notifyAboutUserUnitsUpdate(newUnits) {\n userUnitsUpdatesSubscribers.forEach(callback => callback(newUnits));\n}\n\n/**\n * Updates current custom unit system with user data\n * @param {object} userData\n * @param {Record<string, string>} userData.userUnits\n * @param {Record<string, string>} userData.companyUnits\n */\nexport const updateUserUnits = ({\n userUnits = {},\n companyUnits = {},\n companyCustomUnitSystem = {},\n userCustomUnitSystem = {},\n companyCustomUnits,\n}) => {\n units.custom = {\n ...IMPERIAL_UNITS,\n ...companyUnits,\n ...companyCustomUnitSystem,\n ...userUnits,\n ...userCustomUnitSystem,\n };\n\n if (companyCustomUnits) {\n customUnitDefinitions = normalizeCompanyCustomUnits(companyCustomUnits);\n }\n\n notifyAboutUserUnitsUpdate(units.custom);\n};\n\nexport function getUserUnits() {\n return units.custom;\n}\n\n/**\n * Used for DC Isolated App container\n * @param {Function} newCallback\n */\nexport function subscribeForUserUnitsUpdates(newCallback) {\n userUnitsUpdatesSubscribers.push(newCallback);\n\n return () => {\n userUnitsUpdatesSubscribers = userUnitsUpdatesSubscribers.filter(\n callback => callback !== newCallback\n );\n };\n}\n\n/**\n * Retrieves a unit of a given type by current unit system\n * @param {string} unitType length, mass, volume, etc\n * @returns {string}\n */\nexport const getUnitPreference = unitType => units[unitSystem][unitType];\n\n/**\n * Lists all the units of a specific type\n * @param {string} type\n * @returns {Object[]}\n */\nexport const getUnitsByType = type => {\n const definition = UNIT_TYPES_DEFINITIONS_MAP[type];\n\n if (definition) {\n return sortBy(convert().list(definition.origin), 'abbr');\n }\n // NOTE: Look up in custom company units\n return customUnitDefinitions[type]?.measures || [];\n};\n\n/**\n * Returns unique units list for some measurements that use same units for imperial and metric system\n * @param {string} type\n * @returns {Object[]}\n */\nexport const getUniqueUnitsByType = type => {\n const definition = getUnitsByType(type);\n\n return uniqBy(definition, 'abbr');\n};\n\n/**\n * @deprecated - unit system can be custom, better to use convert functions\n */\nexport const getUnitSystem = () => unitSystem;\n\n/**\n * Retrieves the unit display name for a given unit type\n * @param {string} unitType length, mass, volume, etc\n * @param {string} [unitTo=null]\n * @returns {string}\n */\nexport const getUnitDisplay = (unitType, unitTo = null) => {\n const measure = UNIT_TYPES_DEFINITIONS_MAP[unitType]?.origin;\n const convertedValue = convert(undefined, measure);\n if (unitTo === null) {\n unitTo = units.custom[unitType];\n }\n if (convertedValue.getUnit(unitTo)) {\n return convertedValue.describe(unitTo).display;\n }\n\n const customUnitDisplay = getUnitsByType(unitType).find(\n ({ measure }) => measure === unitTo\n )?.display;\n\n return customUnitDisplay || unitTo;\n};\n\n/**\n * @deprecated - should not depends on imperial system only, because we have mixed unit system\n * Retrieves the unit display name for imperial unit type\n * @param unitType length, mass, volume, etc\n * @returns string\n */\nexport const getDefaultImperialUnit = unitType => units.imperial[unitType];\n\n/**\n * Converts a single value\n * @param {number} value The value we want converted.\n * @param {string} unitType The class of unit such as volume, length, mass, etc.\n * @param {string} from The specific unit such as m, gal, lb, etc.\n * @param {string} to (optional) the unit that we want to convert the value to.\n * @param {number} precision to round to the value\n * May be passed in my ConvertList\n * @return {number}\n */\nexport const convertValue = (value, unitType, from, to = null, precision = DEFAULT_PRECISION) => {\n if (!value || !from || from === to || !!customUnitDefinitions[unitType]) {\n return value;\n }\n\n if (to === null) {\n to = getUnitPreference(unitType);\n if (!to || from === to) {\n return value;\n }\n }\n\n const measure = UNIT_TYPES_DEFINITIONS_MAP[unitType]?.origin;\n const convertedValue = convert(value, measure).from(from).to(to);\n\n return Number.isFinite(convertedValue)\n ? Math.round(convertedValue * 10 ** precision) / 10 ** precision\n : convertedValue;\n};\n\n/**\n * Converts a property in a simple array of js objects or arrays.\n * @param {number[][]} iterable The array of iterables containing values that we want to convert\n * @param {string} key The key in each sub-element that we want to convert\n * @param {string} unitType The class of unit such as volume, length, mass, etc.\n * @param {string} from The specific unit such as m, gal, lb, etc.\n * @param {string} to (optional) the unit that we want to convert the value to.\n * @returns {number[][]}\n */\nexport const convertArray = (\n iterable = [],\n key,\n unitType,\n from,\n to = null,\n precision = DEFAULT_PRECISION\n) => {\n for (let i = 0; i < iterable.length; i += 1) {\n iterable[i][key] = convertValue(iterable[i][key], unitType, from, to, precision);\n }\n\n return iterable;\n};\n\n/**\n * Retrieves the full name for a given unit type, singular\n * @param {string} unitType length, mass, volume, etc\n * @returns {string}\n */\nexport const getUnitSingular = unitType => {\n const measure = UNIT_TYPES_DEFINITIONS_MAP[unitType]?.origin;\n if (customUnitDefinitions[unitType]) {\n return getUnitDisplay(unitType);\n }\n\n return convert(undefined, measure).describe(getUnitPreference(unitType)).singular;\n};\n\n/**\n * Retrieves the full name for a given unit type, plural\n * @param {string} unitType length, mass, volume, etc\n * @returns {string}\n */\nexport const getUnitPlural = unitType => {\n const measure = UNIT_TYPES_DEFINITIONS_MAP[unitType]?.origin;\n if (customUnitDefinitions[unitType]) {\n return getUnitDisplay(unitType);\n }\n\n return convert(undefined, measure).describe(getUnitPreference(unitType)).plural;\n};\n\n/**\n * Retrieves unit data\n *\n * @param {string} unitType length, mass, volume, etc\n * @return {{\n * abbr: string,\n * measure: string,\n * system: string,\n * singular: string,\n * plural: string,\n * display: string\n * }}\n */\nexport const getUnitDescription = unitType => {\n const measure = UNIT_TYPES_DEFINITIONS_MAP[unitType]?.origin;\n\n return convert(undefined, measure).describe(unitType);\n};\n"],"names":["units","imperial","IMPERIAL_UNITS","metric","METRIC_UNITS","custom","userUnitsUpdatesSubscribers","customUnitDefinitions","getAllUnitTypes","UNIT_DEFINITIONS","getDefaultUnits","updateUserUnits","_ref2","newUnits","_ref2$userUnits","userUnits","_ref2$companyUnits","companyUnits","_ref2$companyCustomUn","companyCustomUnitSystem","_ref2$userCustomUnitS","userCustomUnitSystem","companyCustomUnits","mapValues","type","measures","display","name","map","measure","abbr","plural","singular","system","origin","forEach","callback","getUserUnits","subscribeForUserUnitsUpdates","newCallback","push","filter","getUnitPreference","unitType","getUnitsByType","_customUnitDefinition","definition","UNIT_TYPES_DEFINITIONS_MAP","sortBy","convert","list","getUniqueUnitsByType","uniqBy","getUnitSystem","getUnitDisplay","_UNIT_TYPES_DEFINITIO","_getUnitsByType$find","unitTo","convertedValue","undefined","getUnit","describe","customUnitDisplay","find","_ref3","getDefaultImperialUnit","convertValue","value","from","_UNIT_TYPES_DEFINITIO2","to","precision","Number","isFinite","Math","round","pow","convertArray","iterable","key","arguments","length","i","getUnitSingular","_UNIT_TYPES_DEFINITIO3","getUnitPlural","_UNIT_TYPES_DEFINITIO4","getUnitDescription","_UNIT_TYPES_DEFINITIO5"],"mappings":"g1BAWA,IAMMA,EAAQ,CACZC,SAAUC,EACVC,OAAQC,EACRC,YAAaH,IAIXI,EAA8B,GAC9BC,EAAwB,CAAA,EAEfC,EAAkB,WAAH,OAASC,CAAgB,EAExCC,EAAkB,WAAH,OAASV,EAAgB,MAAC,EAiCzCW,IAAAA,EAAkB,SAMzBC,GAAA,IAhB8BC,EAgB9BC,EAAAF,EALJG,UAAAA,OAAS,IAAAD,EAAG,CAAE,EAAAA,EAAAE,EAAAJ,EACdK,aAAAA,OAAY,IAAAD,EAAG,CAAE,EAAAA,EAAAE,EAAAN,EACjBO,wBAAAA,OAAuB,IAAAD,EAAG,CAAE,E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AAIC,GAGxE,OAAOO,CACT,EAOaK,EAAkB,SAAAxC,GAAY,IAAAyC,EACnCvD,EAA8C,UAApCkB,EAA2BJ,UAAS,IAAAyC,OAAA,EAApCA,EAAsClD,OACtD,OAAI3B,EAAsBoC,GACjBW,EAAeX,GAGjBM,OAAQU,EAAW9B,GAASgC,SAASnB,EAAkBC,IAAWX,QAC3E,EAOaqD,EAAgB,SAAA1C,GAAY,IAAA2C,EACjCzD,EAA8C,UAApCkB,EAA2BJ,UAAS,IAAA2C,OAAA,EAApCA,EAAsCpD,OACtD,OAAI3B,EAAsBoC,GACjBW,EAAeX,GAGjBM,OAAQU,EAAW9B,GAASgC,SAASnB,EAAkBC,IAAWZ,MAC3E,EAeawD,EAAqB,SAAA5C,GAAY,IAAA6C,EACtC3D,EAA8C,UAApCkB,EAA2BJ,UAAS,IAAA6C,OAAA,EAApCA,EAAsCtD,OAEtD,OAAOe,OAAQU,EAAW9B,GAASgC,SAASlB,EAC9C"}
|
package/utils/devcenter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devcenter.d.ts","sourceRoot":"","sources":["../../src/utils/devcenter.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"devcenter.d.ts","sourceRoot":"","sources":["../../src/utils/devcenter.js"],"names":[],"mappings":"AAKA,eAAO,MAAM,iBAAiB,eAAe,CAAC;AAE9C,eAAO,MAAM,gBAAgB;;;;SAI5B,CAAC;AACF,eAAO,MAAM,cAAc,yCACY,CAAC;AAExC,wBAAgB,qBAAqB,CAAC,WAAW,KAAA;;;QAY3C,QAAQ;QACR,KAAK;;EAGV;AAED,eAAO,MAAM,qBAAqB,oCACiC,CAAC;AAEpE,eAAO,MAAM,UAAU,mBAAsE,CAAC;AAE9F,eAAO,MAAM,cAAc,uBAAgE,CAAC;AAE5F,eAAO,MAAM,2BAA2B,oCAAoC,CAAC;AAE7E,eAAO,MAAM,eAAe,uDACqE,CAAC;AAElG,eAAO,MAAM,aAAa,mBAoBzB,CAAC;AAEF,eAAO,MAAM,UAAU,uBAAmD,CAAC;AAI3E,eAAO,MAAM,mCAAmC,0BACU,CAAC"}
|