@corva/ui 3.78.0-0 → 3.78.0-10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs-bundle/clients/index.js +1 -1
- package/cjs-bundle/clients/index.js.map +1 -1
- package/cjs-bundle/clients/subscriptions/constants.js +1 -1
- package/cjs-bundle/clients/subscriptions/constants.js.map +1 -1
- package/cjs-bundle/clients/subscriptions.js +1 -1
- package/cjs-bundle/clients/subscriptions.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/AssetEditor/effects/index.js +1 -1
- package/cjs-bundle/components/AssetEditor/effects/index.js.map +1 -1
- package/cjs-bundle/components/AssetEditorV2/effects/index.js +1 -1
- package/cjs-bundle/components/AssetEditorV2/effects/index.js.map +1 -1
- package/cjs-bundle/components/AssetEditorV2/effects/usePrimaryAssetSelectData.js +1 -1
- package/cjs-bundle/components/AssetEditorV2/effects/usePrimaryAssetSelectData.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/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/CommentComposer/CommentComposer.js +1 -1
- package/cjs-bundle/components/CommentComposer/CommentComposer.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/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/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js +1 -1
- package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.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/FeedItem/FeedItem.js +1 -1
- package/cjs-bundle/components/FeedItem/FeedItem.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/IconButton/index.js +1 -1
- package/cjs-bundle/components/IconButton/index.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/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/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/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/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/AdvancedSearch/hooks/useAssetsData.utils.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/hooks/useAssetsData.utils.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/hooks/useAssetsFetch.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/hooks/useAssetsFetch.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/MetricCell/MetricCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/MetricCell/MetricCell.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/hooks/use-well-data-pipeline/useAdvancedWells.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useAdvancedWells.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/useCompanyProvider.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyProvider.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useFetchSubjectWell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useFetchSubjectWell.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useSearchedWells.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useSearchedWells.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/useAllWells/useLoadAllWellsCallback.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/hooks/useAllWells/useLoadAllWellsCallback.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/hooks/useCompanies.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/hooks/useCompanies.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/hooks/useExternalOffsets.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/hooks/useExternalOffsets.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/usePinnedWells.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/hooks/usePinnedWells.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/PadModeSelect/effects/useWellStreamActivityTypeSubscription.js +1 -1
- package/cjs-bundle/components/PadModeSelect/effects/useWellStreamActivityTypeSubscription.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/PinnableFilters/effects/index.js +1 -1
- package/cjs-bundle/components/PinnableFilters/effects/index.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/components/StatusBadge/components/DQAlertsTooltip.js +1 -1
- package/cjs-bundle/components/StatusBadge/components/DQAlertsTooltip.js.map +1 -1
- package/cjs-bundle/components/TruncatedText/index.js +1 -1
- package/cjs-bundle/components/TruncatedText/index.js.map +1 -1
- package/cjs-bundle/components/index.js +1 -1
- package/cjs-bundle/componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.js +1 -1
- package/cjs-bundle/componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.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/Autocomplete/Autocomplete.js +1 -1
- package/cjs-bundle/componentsV2/Autocomplete/Autocomplete.js.map +1 -1
- package/cjs-bundle/componentsV2/Autocomplete/AutocompleteInput/AutocompleteInput.js +1 -1
- package/cjs-bundle/componentsV2/Autocomplete/AutocompleteInput/AutocompleteInput.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/InterventionEventSelector/useInterventionUnitEvents.js +1 -1
- package/cjs-bundle/componentsV2/InterventionEventSelector/useInterventionUnitEvents.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/usePublishTemplate.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/usePublishTemplate.js.map +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/utils.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Store/utils.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/config/theme/palette.mjs.js +1 -1
- package/cjs-bundle/config/theme/palette.mjs.js.map +1 -1
- package/cjs-bundle/effects/index.js +1 -1
- package/cjs-bundle/effects/subscriptions/fetchInitialSubscriptionsData.js +2 -0
- package/cjs-bundle/effects/subscriptions/fetchInitialSubscriptionsData.js.map +1 -0
- package/cjs-bundle/effects/subscriptions/useSubscriptions.v2.js +1 -1
- package/cjs-bundle/effects/subscriptions/useSubscriptions.v2.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/useSubscriptions.js +1 -1
- package/cjs-bundle/effects/useSubscriptions.js.map +1 -1
- package/cjs-bundle/effects/useWellnessAlerts.js +1 -1
- package/cjs-bundle/effects/useWellnessAlerts.js.map +1 -1
- package/cjs-bundle/permissions/constants/index.js +1 -1
- package/cjs-bundle/permissions/constants/index.js.map +1 -1
- package/cjs-bundle/styles/generatedThemesVariables.global.css.js +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/index.js +1 -1
- package/cjs-bundle/utils/index.js.map +1 -1
- package/cjs-bundle/utils/safeTemplate.js +2 -0
- package/cjs-bundle/utils/safeTemplate.js.map +1 -0
- package/clients/index.d.ts +1 -9
- package/clients/index.d.ts.map +1 -1
- package/clients/index.js +1 -1
- package/clients/index.js.map +1 -1
- package/clients/subscriptions/constants.d.ts +0 -1
- package/clients/subscriptions/constants.d.ts.map +1 -1
- package/clients/subscriptions/constants.js +1 -1
- package/clients/subscriptions/constants.js.map +1 -1
- package/clients/subscriptions.d.ts.map +1 -1
- package/clients/subscriptions.js +1 -1
- package/clients/subscriptions.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/AssetEditor/effects/index.js +1 -1
- package/components/AssetEditor/effects/index.js.map +1 -1
- package/components/AssetEditorV2/effects/index.js +1 -1
- package/components/AssetEditorV2/effects/index.js.map +1 -1
- package/components/AssetEditorV2/effects/usePrimaryAssetSelectData.js +1 -1
- package/components/AssetEditorV2/effects/usePrimaryAssetSelectData.js.map +1 -1
- package/components/Attachment/index.js +1 -1
- package/components/Attachment/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/CommentComposer/CommentComposer.js +1 -1
- package/components/CommentComposer/CommentComposer.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/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/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js.map +1 -1
- package/components/DocumentViewer/DocumentViewer.js +1 -1
- package/components/DocumentViewer/DocumentViewer.js.map +1 -1
- package/components/Drillstring/BHAComponentDetail/constants.d.ts +2 -2
- 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/FeedItem/FeedItem.js +1 -1
- package/components/FeedItem/FeedItem.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/IconButton/index.d.ts.map +1 -1
- package/components/IconButton/index.js +1 -1
- package/components/IconButton/index.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/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/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/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/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/AdvancedSearch/hooks/useAssetsData.utils.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/hooks/useAssetsData.utils.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/hooks/useAssetsFetch.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/hooks/useAssetsFetch.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/MetricCell/MetricCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/MetricCell/MetricCell.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/hooks/use-well-data-pipeline/useAdvancedWells.js +1 -1
- package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useAdvancedWells.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/useCompanyProvider.js +1 -1
- package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyProvider.js.map +1 -1
- package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useFetchSubjectWell.js +1 -1
- package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useFetchSubjectWell.js.map +1 -1
- package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useSearchedWells.js +1 -1
- package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useSearchedWells.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/useAllWells/useLoadAllWellsCallback.js +1 -1
- package/components/OffsetWellPickerV5/hooks/useAllWells/useLoadAllWellsCallback.js.map +1 -1
- package/components/OffsetWellPickerV5/hooks/useCompanies.js +1 -1
- package/components/OffsetWellPickerV5/hooks/useCompanies.js.map +1 -1
- package/components/OffsetWellPickerV5/hooks/useExternalOffsets.js +1 -1
- package/components/OffsetWellPickerV5/hooks/useExternalOffsets.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/usePinnedWells.js +1 -1
- package/components/OffsetWellPickerV5/hooks/usePinnedWells.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/PadModeSelect/effects/useWellStreamActivityTypeSubscription.js +1 -1
- package/components/PadModeSelect/effects/useWellStreamActivityTypeSubscription.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/PinnableFilters/effects/index.js +1 -1
- package/components/PinnableFilters/effects/index.js.map +1 -1
- package/components/RealTimeValuesSidebar/SidebarFooter.js +1 -1
- package/components/RealTimeValuesSidebar/SidebarFooter.js.map +1 -1
- package/components/StatusBadge/components/DQAlertsTooltip.d.ts.map +1 -1
- package/components/StatusBadge/components/DQAlertsTooltip.js +1 -1
- package/components/StatusBadge/components/DQAlertsTooltip.js.map +1 -1
- package/components/TruncatedText/index.d.ts +1 -1
- package/components/TruncatedText/index.d.ts.map +1 -1
- package/components/TruncatedText/index.js +1 -1
- package/components/TruncatedText/index.js.map +1 -1
- package/components/index.js +1 -1
- package/componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.d.ts.map +1 -1
- package/componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.js +1 -1
- package/componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.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/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/componentsV2/Autocomplete/Autocomplete.js +1 -1
- package/componentsV2/Autocomplete/Autocomplete.js.map +1 -1
- package/componentsV2/Autocomplete/AutocompleteInput/AutocompleteInput.d.ts.map +1 -1
- package/componentsV2/Autocomplete/AutocompleteInput/AutocompleteInput.js +1 -1
- package/componentsV2/Autocomplete/AutocompleteInput/AutocompleteInput.js.map +1 -1
- package/componentsV2/Autocomplete/AutocompleteNext.stories.d.ts +1 -0
- package/componentsV2/Autocomplete/AutocompleteNext.stories.d.ts.map +1 -1
- package/componentsV2/CompletionsOffsetWellPicker/Map/Map.js +1 -1
- package/componentsV2/CompletionsOffsetWellPicker/Map/Map.js.map +1 -1
- package/componentsV2/InterventionEventSelector/useInterventionUnitEvents.js +1 -1
- package/componentsV2/InterventionEventSelector/useInterventionUnitEvents.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/usePublishTemplate.d.ts.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/utils.d.ts +7 -0
- package/componentsV2/TemplatesControl/Store/utils.d.ts.map +1 -1
- package/componentsV2/TemplatesControl/Store/utils.js +1 -1
- package/componentsV2/TemplatesControl/Store/utils.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/config/theme/lightThemePalette.d.mts +4 -0
- package/config/theme/lightThemePalette.d.mts.map +1 -1
- package/config/theme/palette.d.mts +4 -0
- package/config/theme/palette.d.mts.map +1 -1
- package/config/theme/palette.mjs.js +1 -1
- package/config/theme/palette.mjs.js.map +1 -1
- package/config/theme/themeVariables.d.mts +12 -0
- package/config/theme/themeVariables.d.mts.map +1 -1
- package/effects/index.js +1 -1
- package/effects/subscriptions/fetchInitialSubscriptionsData.d.ts +23 -0
- package/effects/subscriptions/fetchInitialSubscriptionsData.d.ts.map +1 -0
- package/effects/subscriptions/fetchInitialSubscriptionsData.js +2 -0
- package/effects/subscriptions/fetchInitialSubscriptionsData.js.map +1 -0
- package/effects/subscriptions/useSubscriptions.v2.d.ts.map +1 -1
- package/effects/subscriptions/useSubscriptions.v2.js +1 -1
- package/effects/subscriptions/useSubscriptions.v2.js.map +1 -1
- package/effects/useGlobalOffsetWellsSync.js +1 -1
- package/effects/useGlobalOffsetWellsSync.js.map +1 -1
- package/effects/useSubscriptions.d.ts +1 -2
- package/effects/useSubscriptions.d.ts.map +1 -1
- package/effects/useSubscriptions.js +1 -1
- package/effects/useSubscriptions.js.map +1 -1
- package/effects/useWellnessAlerts.js +1 -1
- package/effects/useWellnessAlerts.js.map +1 -1
- package/mcp-server/server.mjs +1983 -7317
- package/package.json +1 -1
- package/permissions/constants/index.d.ts +1 -0
- package/permissions/constants/index.d.ts.map +1 -1
- package/permissions/constants/index.js +1 -1
- package/permissions/constants/index.js.map +1 -1
- package/styles/common.scss +2 -0
- package/styles/generatedThemesVariables.global.css +1 -1
- package/styles/generatedThemesVariables.global.css.js +1 -1
- package/testing/AppTestWrapper/AppTestWrapper.js +1 -1
- package/testing/AppTestWrapper/AppTestWrapper.js.map +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/utils/__tests__/safeTemplate.test.d.ts +2 -0
- package/utils/__tests__/safeTemplate.test.d.ts.map +1 -0
- package/utils/index.d.ts +1 -0
- package/utils/index.d.ts.map +1 -1
- package/utils/index.js +1 -1
- package/utils/index.js.map +1 -1
- package/utils/safeTemplate.d.ts +24 -0
- package/utils/safeTemplate.d.ts.map +1 -0
- package/utils/safeTemplate.js +2 -0
- package/utils/safeTemplate.js.map +1 -0
- package/cjs-bundle/clients/subscriptions.v1.js +0 -2
- package/cjs-bundle/clients/subscriptions.v1.js.map +0 -1
- package/cjs-bundle/effects/subscriptions/useSubscriptions.v1.js +0 -2
- package/cjs-bundle/effects/subscriptions/useSubscriptions.v1.js.map +0 -1
- package/clients/subscriptions.v1.d.ts +0 -9
- package/clients/subscriptions.v1.d.ts.map +0 -1
- package/clients/subscriptions.v1.js +0 -2
- package/clients/subscriptions.v1.js.map +0 -1
- package/effects/subscriptions/useSubscriptions.v1.d.ts +0 -24
- package/effects/subscriptions/useSubscriptions.v1.d.ts.map +0 -1
- package/effects/subscriptions/useSubscriptions.v1.js +0 -2
- package/effects/subscriptions/useSubscriptions.v1.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t from"@babel/runtime/helpers/toConsumableArray";import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/helpers/slicedToArray";import s from"@babel/runtime/regenerator";import{useState as o,useEffect as i,useRef as a}from"react";import{DEFAULT_ASSET_TYPE as c}from"../constants.js";import{formatAsset as p,isAssetOption as u,sortAsset as l,getRequestOptions as m}from"../utils/index.js";import"
|
|
1
|
+
import t from"@babel/runtime/helpers/toConsumableArray";import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/helpers/slicedToArray";import s from"@babel/runtime/regenerator";import{useState as o,useEffect as i,useRef as a}from"react";import{DEFAULT_ASSET_TYPE as c}from"../constants.js";import{formatAsset as p,isAssetOption as u,sortAsset as l,getRequestOptions as m}from"../utils/index.js";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import{mapAssetGetRequest as f}from"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions/subscriptions-client.factory.js";import"../../../clients/api/apiCore.js";import"../../../clients/constants.js";import"../../../clients/sso/auth0.js";import"../../../clients/sso/oauth2.js";import"../../../clients/api/rateLimiter.js";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/alerts.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/completion.js";import"../../../constants/appPackages.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"../../../constants/bha.js";import{ASSET_TYPES as d}from"../../../constants/assetTypes.js";import"../../../constants/corvaCompanyId.js";import"lodash";import"../../GradientManager/configuration/constants.js";import{deserializeAssetResponse as v}from"./assetResponse.js";function y(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function j(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?y(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var b=function(t){return t?t===d.intervention_unit.type?"intervention_unit_id":t:null},h=function(t){var a=t.appKey,d=t.assetType,y=t.assetId,h=t.company,g=t.parentAssetType,O=t.parentAssetId,x=t.queryParams,A=void 0===x?{}:x,I=t.assetFields,P=void 0===I?[]:I,_=t.activeWellId,w=t.isRequiredAssetId,k=o([]),T=n(k,2),q=T[0],C=T[1],R=o(!0),D=n(R,2),W=D[0],E=D[1],F=d||c;return i((function(){E(!0);var t=function(){var t=r(s.mark((function t(){var r,n,o;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=b(g),t.next=3,f(F)(j(j(j(j({},m(F,P)),{},{per_page:1e4,company:"all"!==h?h:null},r&&e({},r,O)),a&&{app_key:a}),A));case 3:n=t.sent,o=v(n).map((function(t){return p({asset:t,activeWellId:_,isRequiredAssetId:w})})).filter(u).sort(l),C(o),E(!1);case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();t()}),[d,y,g,O,a,_,h]),{assets:q,loading:W}},g=function(e,r){return e===d.pad.type?[].concat(t(r),["pad.active","pad.parent_frac_fleet_id","pad.current"]):e===d.intervention_unit.type?[].concat(t(r),["intervention_unit.active","intervention_unit.current"]):r},O=function(e){var y=e.appKey,b=e.assetType,h=e.company,O=e.groups,x=e.isRequiredAssetId,A=e.parentAssetId,I=e.parentAssetType,P=e.searchText,_=e.assetFields,w=void 0===_?[]:_,k=e.currentValue,T=e.setCurrentOption,q=e.onActiveAssetIdChange,C=o([]),R=n(C,2),D=R[0],W=R[1],E=o(!1),F=n(E,2),G=F[0],K=F[1],N=a(null),S=b||c,L=function(){var e=r(s.mark((function e(r){var n,o,i,a,c;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=(null==r?void 0:r.type)||S,o={per_page:1e4},I&&A&&(o[I]=A),h&&"all"!==h&&(o.company=h),P&&(o.search=P),y&&(o.app_key=y),N.current=h,e.next=10,f(n)(j(j({},m(n,g(n,w))),o));case 10:i=e.sent,a=v(i).map((function(t){return p({asset:t,group:null==r?void 0:r.name,isRequiredAssetId:x,isPrimaryAsset:!0})})).filter(u).sort(l),N.current===h&&W((function(e){return[].concat(t(e),t(a))})),k&&n===S&&((c=a.find((function(t){return Number(k)===t.id||t.assetId&&Number(k)===t.assetId})))&&T(c),n===d.rig.type&&q((null==c?void 0:c.activeWellId)||null)),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),console.error(e.t0);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t){return e.apply(this,arguments)}}();return i((function(){h&&W([])}),[h]),i((function(){var t=function(){var t=r(s.mark((function t(){return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,K(!0),!O){t.next=7;break}return t.next=5,Promise.all(O.map((function(t){return L(t)})));case 5:t.next=9;break;case 7:return t.next=9,L();case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(0),console.error(t.t0);case 14:return t.prev=14,K(!1),t.finish(14);case 17:case"end":return t.stop()}}),t,null,[[0,11,14,17]])})));return function(){return t.apply(this,arguments)}}();t()}),[b,I,A,h,y,null==O?void 0:O.length]),{assets:G?[]:D,loading:G}};export{O as usePrimaryAssetSelectData,h as useSecondaryAssetSelectData};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/AssetEditorV2/effects/index.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\n\nimport { AssetGroup, AssetId, AssetOption, AssetSelection } from '../types';\nimport { DEFAULT_ASSET_TYPE } from '../constants';\nimport { formatAsset, getRequestOptions, isAssetOption, sortAsset } from '../utils';\n\nimport { jsonApi } from '~/clients';\nimport { ASSET_TYPES } from '~/constants';\n\nimport { deserializeAssetResponse } from './assetResponse';\n\ntype QueryParams = Record<string, unknown>;\n\ntype UseSecondaryAssetSelectDataParams = {\n appKey?: string | null;\n assetType?: string | null;\n assetId?: AssetId | null;\n company?: AssetId | null;\n parentAssetType?: string | null;\n parentAssetId?: AssetId | null;\n queryParams?: QueryParams;\n assetFields?: string[];\n activeWellId?: AssetId | null;\n isRequiredAssetId?: boolean;\n};\n\ntype UsePrimaryAssetSelectDataParams = {\n appKey?: string | null;\n assetType?: string | null;\n company?: AssetId | null;\n groups?: AssetGroup[];\n isRequiredAssetId?: boolean;\n parentAssetId?: AssetId | null;\n parentAssetType?: string | null;\n searchText?: string;\n assetFields?: string[];\n currentValue?: AssetId | null;\n selectedGroup?: AssetGroup | null;\n setCurrentOption: (selection: AssetSelection) => void;\n onActiveAssetIdChange: (id: number | null) => void;\n};\n\nconst getParentAssetKey = (assetType?: string | null): string | null => {\n if (!assetType) return null;\n\n if (assetType === ASSET_TYPES.intervention_unit.type) {\n return 'intervention_unit_id';\n }\n\n return assetType;\n};\n\nexport const useSecondaryAssetSelectData = ({\n appKey,\n assetType,\n assetId,\n company,\n parentAssetType,\n parentAssetId,\n queryParams = {},\n assetFields = [],\n activeWellId,\n isRequiredAssetId,\n}: UseSecondaryAssetSelectDataParams): { assets: AssetOption[]; loading: boolean } => {\n const [assets, setAssets] = useState<AssetOption[]>([]);\n const [loading, setLoading] = useState(true);\n const requestAssetType = assetType || DEFAULT_ASSET_TYPE;\n\n useEffect(() => {\n setLoading(true);\n\n const loadAssets = async () => {\n const parentAssetKey = getParentAssetKey(parentAssetType);\n const response: unknown = await jsonApi.mapAssetGetRequest(requestAssetType)({\n ...getRequestOptions(requestAssetType, assetFields),\n per_page: 10000,\n company: company !== 'all' ? company : null,\n ...(parentAssetKey && { [parentAssetKey]: parentAssetId }),\n ...(appKey && { app_key: appKey }),\n ...queryParams,\n });\n\n const nextAssets = deserializeAssetResponse(response)\n .map(asset => formatAsset({ asset, activeWellId, isRequiredAssetId }))\n .filter(isAssetOption)\n .sort(sortAsset);\n\n setAssets(nextAssets);\n setLoading(false);\n };\n\n loadAssets();\n }, [assetType, assetId, parentAssetType, parentAssetId, appKey, activeWellId, company]);\n\n return { assets, loading };\n};\n\nconst getAssetFields = (assetType: string, assetFields: string[]): string[] => {\n if (assetType === ASSET_TYPES.pad.type) {\n return [...assetFields, 'pad.active', 'pad.parent_frac_fleet_id', 'pad.current'];\n }\n\n if (assetType === ASSET_TYPES.intervention_unit.type) {\n return [...assetFields, 'intervention_unit.active', 'intervention_unit.current'];\n }\n\n return assetFields;\n};\n\nexport const usePrimaryAssetSelectData = ({\n appKey,\n assetType,\n company,\n groups,\n isRequiredAssetId,\n parentAssetId,\n parentAssetType,\n searchText,\n assetFields = [],\n currentValue,\n setCurrentOption,\n onActiveAssetIdChange,\n}: UsePrimaryAssetSelectDataParams): { assets: AssetOption[]; loading: boolean } => {\n const [assets, setAssets] = useState<AssetOption[]>([]);\n const [loading, setLoading] = useState(false);\n const prevCompany = useRef<AssetId | null | undefined>(null);\n const requestAssetType = assetType || DEFAULT_ASSET_TYPE;\n\n const loadAssets = async (group?: AssetGroup) => {\n try {\n const currentAssetType = group?.type || requestAssetType;\n const requestParams: QueryParams = { per_page: 10000 };\n\n if (parentAssetType && parentAssetId) requestParams[parentAssetType] = parentAssetId;\n if (company && company !== 'all') requestParams.company = company;\n if (searchText) requestParams.search = searchText;\n if (appKey) requestParams.app_key = appKey;\n\n prevCompany.current = company;\n\n const response: unknown = await jsonApi.mapAssetGetRequest(currentAssetType)({\n ...getRequestOptions(currentAssetType, getAssetFields(currentAssetType, assetFields)),\n ...requestParams,\n });\n\n const responseAssets = deserializeAssetResponse(response)\n .map(asset =>\n formatAsset({\n asset,\n group: group?.name,\n isRequiredAssetId,\n isPrimaryAsset: true,\n })\n )\n .filter(isAssetOption)\n .sort(sortAsset);\n\n if (prevCompany.current === company) {\n setAssets(prevState => [...prevState, ...responseAssets]);\n }\n\n if (currentValue && currentAssetType === requestAssetType) {\n const currentAsset = responseAssets.find(\n asset =>\n Number(currentValue) === asset.id ||\n (asset.assetId && Number(currentValue) === asset.assetId)\n );\n\n if (currentAsset) {\n setCurrentOption(currentAsset);\n }\n\n if (currentAssetType === ASSET_TYPES.rig.type) {\n onActiveAssetIdChange(currentAsset?.activeWellId || null);\n }\n }\n } catch (error) {\n console.error(error);\n }\n };\n\n useEffect(() => {\n if (company) {\n setAssets([]);\n }\n }, [company]);\n\n useEffect(() => {\n const loadEverything = async () => {\n try {\n setLoading(true);\n\n if (groups) {\n await Promise.all(groups.map(group => loadAssets(group)));\n } else {\n await loadAssets();\n }\n } catch (error) {\n console.error(error);\n } finally {\n setLoading(false);\n }\n };\n\n loadEverything();\n }, [assetType, parentAssetType, parentAssetId, company, appKey, groups?.length]);\n\n return { assets: loading ? [] : assets, loading };\n};\n"],"names":["getParentAssetKey","assetType","ASSET_TYPES","intervention_unit","type","useSecondaryAssetSelectData","_ref","appKey","assetId","company","parentAssetType","parentAssetId","_ref$queryParams","queryParams","_ref$assetFields","assetFields","activeWellId","isRequiredAssetId","useState","_useState2","_slicedToArray","_useState","assets","setAssets","_useState4","_useState3","loading","setLoading","requestAssetType","DEFAULT_ASSET_TYPE","useEffect","loadAssets","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee","parentAssetKey","response","nextAssets","wrap","_context","prev","next","jsonApi","getRequestOptions","per_page","app_key","sent","deserializeAssetResponse","map","asset","formatAsset","filter","isAssetOption","sort","sortAsset","stop","apply","this","arguments","getAssetFields","pad","concat","_toConsumableArray","usePrimaryAssetSelectData","_ref4","groups","searchText","_ref4$assetFields","currentValue","setCurrentOption","onActiveAssetIdChange","_useState6","_useState5","_useState8","_useState7","prevCompany","useRef","_ref5","group","currentAssetType","requestParams","responseAssets","currentAsset","_context2","search","current","_objectSpread","name","isPrimaryAsset","prevState","find","Number","id","rig","t0","console","error","_callee2","_x","loadEverything","_ref6","_callee3","_context3","Promise","all","finish","length"],"mappings":"0pEA0CA,IAAMA,EAAoB,SAACC,GACzB,OAAKA,EAEDA,IAAcC,EAAYC,kBAAkBC,KACvC,uBAGFH,EANgB,IAOzB,EAEaI,EAA8B,SAW2CC,GAAA,IAVpFC,IAAAA,OACAN,IAAAA,UACAO,IAAAA,QACAC,IAAAA,QACAC,IA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A8D,EAAA7D,MAAA,KAAA,EAEF,GAFE6D,EAAA9D,KAAA,EAEnBf,GAAW,IAEPwC,EAAM,CAAAqC,EAAA7D,KAAA,EAAA,KAAA,CAAA,OAAA6D,EAAA7D,KAAA,EACF8D,QAAQC,IAAIvC,EAAOjB,KAAI,SAAA8B,GAAK,OAAIjD,EAAWiD,EAAM,KAAE,KAAA,EAAAwB,EAAA7D,KAAA,EAAA,MAAA,KAAA,EAAA,OAAA6D,EAAA7D,KAAA,EAEnDZ,IAAY,KAAA,EAAAyE,EAAA7D,KAAA,GAAA,MAAA,KAAA,GAAA6D,EAAA9D,KAAA,GAAA8D,EAAAR,GAAAQ,EAAA,MAAA,GAGpBP,QAAQC,MAAYM,EAAAR,IAAC,KAAA,GAEH,OAFGQ,EAAA9D,KAAA,GAErBf,GAAW,GAAO6E,EAAAG,OAAA,IAAA,KAAA,GAAA,IAAA,MAAA,OAAAH,EAAA/C,OAAA,GAAA8C,EAAA,KAAA,CAAA,CAAA,EAAA,GAAA,GAAA,KAErB,KAAA,OAAA,WAdmB,OAAAD,EAAA5C,MAAAC,KAAAC,UAAA,EAAA,GAgBpByC,MACC,CAACpG,EAAWS,EAAiBC,EAAeF,EAASF,EAAQ4D,aAAM,EAANA,EAAQyC,SAEjE,CAAEtF,OAAQI,EAAU,GAAKJ,EAAQI,QAAAA,EAC1C"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/AssetEditorV2/effects/index.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\n\nimport { AssetGroup, AssetId, AssetOption, AssetSelection } from '../types';\nimport { DEFAULT_ASSET_TYPE } from '../constants';\nimport { formatAsset, getRequestOptions, isAssetOption, sortAsset } from '../utils';\n\nimport { jsonApi } from '~/clients';\nimport { ASSET_TYPES } from '~/constants';\n\nimport { deserializeAssetResponse } from './assetResponse';\n\ntype QueryParams = Record<string, unknown>;\n\ntype UseSecondaryAssetSelectDataParams = {\n appKey?: string | null;\n assetType?: string | null;\n assetId?: AssetId | null;\n company?: AssetId | null;\n parentAssetType?: string | null;\n parentAssetId?: AssetId | null;\n queryParams?: QueryParams;\n assetFields?: string[];\n activeWellId?: AssetId | null;\n isRequiredAssetId?: boolean;\n};\n\ntype UsePrimaryAssetSelectDataParams = {\n appKey?: string | null;\n assetType?: string | null;\n company?: AssetId | null;\n groups?: AssetGroup[];\n isRequiredAssetId?: boolean;\n parentAssetId?: AssetId | null;\n parentAssetType?: string | null;\n searchText?: string;\n assetFields?: string[];\n currentValue?: AssetId | null;\n selectedGroup?: AssetGroup | null;\n setCurrentOption: (selection: AssetSelection) => void;\n onActiveAssetIdChange: (id: number | null) => void;\n};\n\nconst getParentAssetKey = (assetType?: string | null): string | null => {\n if (!assetType) return null;\n\n if (assetType === ASSET_TYPES.intervention_unit.type) {\n return 'intervention_unit_id';\n }\n\n return assetType;\n};\n\nexport const useSecondaryAssetSelectData = ({\n appKey,\n assetType,\n assetId,\n company,\n parentAssetType,\n parentAssetId,\n queryParams = {},\n assetFields = [],\n activeWellId,\n isRequiredAssetId,\n}: UseSecondaryAssetSelectDataParams): { assets: AssetOption[]; loading: boolean } => {\n const [assets, setAssets] = useState<AssetOption[]>([]);\n const [loading, setLoading] = useState(true);\n const requestAssetType = assetType || DEFAULT_ASSET_TYPE;\n\n useEffect(() => {\n setLoading(true);\n\n const loadAssets = async () => {\n const parentAssetKey = getParentAssetKey(parentAssetType);\n const response: unknown = await jsonApi.mapAssetGetRequest(requestAssetType)({\n ...getRequestOptions(requestAssetType, assetFields),\n per_page: 10000,\n company: company !== 'all' ? company : null,\n ...(parentAssetKey && { [parentAssetKey]: parentAssetId }),\n ...(appKey && { app_key: appKey }),\n ...queryParams,\n });\n\n const nextAssets = deserializeAssetResponse(response)\n .map(asset => formatAsset({ asset, activeWellId, isRequiredAssetId }))\n .filter(isAssetOption)\n .sort(sortAsset);\n\n setAssets(nextAssets);\n setLoading(false);\n };\n\n loadAssets();\n }, [assetType, assetId, parentAssetType, parentAssetId, appKey, activeWellId, company]);\n\n return { assets, loading };\n};\n\nconst getAssetFields = (assetType: string, assetFields: string[]): string[] => {\n if (assetType === ASSET_TYPES.pad.type) {\n return [...assetFields, 'pad.active', 'pad.parent_frac_fleet_id', 'pad.current'];\n }\n\n if (assetType === ASSET_TYPES.intervention_unit.type) {\n return [...assetFields, 'intervention_unit.active', 'intervention_unit.current'];\n }\n\n return assetFields;\n};\n\nexport const usePrimaryAssetSelectData = ({\n appKey,\n assetType,\n company,\n groups,\n isRequiredAssetId,\n parentAssetId,\n parentAssetType,\n searchText,\n assetFields = [],\n currentValue,\n setCurrentOption,\n onActiveAssetIdChange,\n}: UsePrimaryAssetSelectDataParams): { assets: AssetOption[]; loading: boolean } => {\n const [assets, setAssets] = useState<AssetOption[]>([]);\n const [loading, setLoading] = useState(false);\n const prevCompany = useRef<AssetId | null | undefined>(null);\n const requestAssetType = assetType || DEFAULT_ASSET_TYPE;\n\n const loadAssets = async (group?: AssetGroup) => {\n try {\n const currentAssetType = group?.type || requestAssetType;\n const requestParams: QueryParams = { per_page: 10000 };\n\n if (parentAssetType && parentAssetId) requestParams[parentAssetType] = parentAssetId;\n if (company && company !== 'all') requestParams.company = company;\n if (searchText) requestParams.search = searchText;\n if (appKey) requestParams.app_key = appKey;\n\n prevCompany.current = company;\n\n const response: unknown = await jsonApi.mapAssetGetRequest(currentAssetType)({\n ...getRequestOptions(currentAssetType, getAssetFields(currentAssetType, assetFields)),\n ...requestParams,\n });\n\n const responseAssets = deserializeAssetResponse(response)\n .map(asset =>\n formatAsset({\n asset,\n group: group?.name,\n isRequiredAssetId,\n isPrimaryAsset: true,\n })\n )\n .filter(isAssetOption)\n .sort(sortAsset);\n\n if (prevCompany.current === company) {\n setAssets(prevState => [...prevState, ...responseAssets]);\n }\n\n if (currentValue && currentAssetType === requestAssetType) {\n const currentAsset = responseAssets.find(\n asset =>\n Number(currentValue) === asset.id ||\n (asset.assetId && Number(currentValue) === asset.assetId)\n );\n\n if (currentAsset) {\n setCurrentOption(currentAsset);\n }\n\n if (currentAssetType === ASSET_TYPES.rig.type) {\n onActiveAssetIdChange(currentAsset?.activeWellId || null);\n }\n }\n } catch (error) {\n console.error(error);\n }\n };\n\n useEffect(() => {\n if (company) {\n setAssets([]);\n }\n }, [company]);\n\n useEffect(() => {\n const loadEverything = async () => {\n try {\n setLoading(true);\n\n if (groups) {\n await Promise.all(groups.map(group => loadAssets(group)));\n } else {\n await loadAssets();\n }\n } catch (error) {\n console.error(error);\n } finally {\n setLoading(false);\n }\n };\n\n loadEverything();\n }, [assetType, parentAssetType, parentAssetId, company, appKey, groups?.length]);\n\n return { assets: loading ? [] : assets, loading };\n};\n"],"names":["getParentAssetKey","assetType","ASSET_TYPES","intervention_unit","type","useSecondaryAssetSelectData","_ref","appKey","assetId","company","parentAssetType","parentAssetId","_ref$queryParams","queryParams","_ref$assetFields","assetFields","activeWellId","isRequiredAssetId","useState","_useState2","_slicedToArray","_useState","assets","setAssets","_useState4","_useState3","loading","setLoading","requestAssetType","DEFAULT_ASSET_TYPE","useEffect","loadAssets","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee","parentAssetKey","response","nextAssets","wrap","_context","prev","next","jsonApi","getRequestOptions","per_page","app_key","sent","deserializeAssetResponse","map","asset","formatAsset","filter","isAssetOption","sort","sortAsset","stop","apply","this","arguments","getAssetFields","pad","concat","_toConsumableArray","usePrimaryAssetSelectData","_ref4","groups","searchText","_ref4$assetFields","currentValue","setCurrentOption","onActiveAssetIdChange","_useState6","_useState5","_useState8","_useState7","prevCompany","useRef","_ref5","group","currentAssetType","requestParams","responseAssets","currentAsset","_context2","search","current","_objectSpread","name","isPrimaryAsset","prevState","find","Number","id","rig","t0","console","error","_callee2","_x","loadEverything","_ref6","_callee3","_context3","Promise","all","finish","length"],"mappings":"4iEA0CA,IAAMA,EAAoB,SAACC,GACzB,OAAKA,EAEDA,IAAcC,EAAYC,kBAAkBC,KACvC,uBAGFH,EANgB,IAOzB,EAEaI,EAA8B,SAW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SAAAoE,IAAA,OAAArE,EAAAM,MAAA,SAAAgE,GAAA,OAAA,OAAAA,EAAA9D,KAAA8D,EAAA7D,MAAA,KAAA,EAEF,GAFE6D,EAAA9D,KAAA,EAEnBf,GAAW,IAEPwC,EAAM,CAAAqC,EAAA7D,KAAA,EAAA,KAAA,CAAA,OAAA6D,EAAA7D,KAAA,EACF8D,QAAQC,IAAIvC,EAAOjB,KAAI,SAAA8B,GAAK,OAAIjD,EAAWiD,EAAM,KAAE,KAAA,EAAAwB,EAAA7D,KAAA,EAAA,MAAA,KAAA,EAAA,OAAA6D,EAAA7D,KAAA,EAEnDZ,IAAY,KAAA,EAAAyE,EAAA7D,KAAA,GAAA,MAAA,KAAA,GAAA6D,EAAA9D,KAAA,GAAA8D,EAAAR,GAAAQ,EAAA,MAAA,GAGpBP,QAAQC,MAAYM,EAAAR,IAAC,KAAA,GAEH,OAFGQ,EAAA9D,KAAA,GAErBf,GAAW,GAAO6E,EAAAG,OAAA,IAAA,KAAA,GAAA,IAAA,MAAA,OAAAH,EAAA/C,OAAA,GAAA8C,EAAA,KAAA,CAAA,CAAA,EAAA,GAAA,GAAA,KAErB,KAAA,OAAA,WAdmB,OAAAD,EAAA5C,MAAAC,KAAAC,UAAA,EAAA,GAgBpByC,MACC,CAACpG,EAAWS,EAAiBC,EAAeF,EAASF,EAAQ4D,aAAM,EAANA,EAAQyC,SAEjE,CAAEtF,OAAQI,EAAU,GAAKJ,EAAQI,QAAAA,EAC1C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/asyncToGenerator";import e from"@babel/runtime/helpers/toConsumableArray";import n from"@babel/runtime/helpers/slicedToArray";import s from"@babel/runtime/regenerator";import{useState as o,useRef as i,useEffect as a}from"react";import{isEmpty as c,uniqBy as p}from"lodash";import{DEFAULT_ASSET_TYPE as l}from"../constants.js";import{formatAsset as u,isAssetOption as m,sortAsset as f,getRequestOptions as d}from"../utils/index.js";import"
|
|
1
|
+
import t from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/asyncToGenerator";import e from"@babel/runtime/helpers/toConsumableArray";import n from"@babel/runtime/helpers/slicedToArray";import s from"@babel/runtime/regenerator";import{useState as o,useRef as i,useEffect as a}from"react";import{isEmpty as c,uniqBy as p}from"lodash";import{DEFAULT_ASSET_TYPE as l}from"../constants.js";import{formatAsset as u,isAssetOption as m,sortAsset as f,getRequestOptions as d}from"../utils/index.js";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import{mapAssetGetRequest as j,getAssets as y}from"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions/subscriptions-client.factory.js";import"../../../clients/api/apiCore.js";import"../../../clients/constants.js";import"../../../clients/sso/auth0.js";import"../../../clients/sso/oauth2.js";import"../../../clients/api/rateLimiter.js";import{PER_PAGE as b}from"../../AssetEditor/constants.js";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/alerts.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/completion.js";import"../../../constants/appPackages.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"../../../constants/bha.js";import{ASSET_TYPES as v}from"../../../constants/assetTypes.js";import"../../../constants/corvaCompanyId.js";import"../../GradientManager/configuration/constants.js";import{deserializeAssetResponse as g,getFirstIncludedId as h,getResponseData as O}from"./assetResponse.js";function A(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function P(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?A(Object(n),!0).forEach((function(e){t(r,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(n,t))}))}return r}var w=function(t){var A=t.appKey,w=t.assetType,x=t.company,I=t.groups,k=t.isRequiredAssetId,D=t.parentAssetId,_=t.parentAssetType,C=t.searchValue,T=t.assetFields,E=void 0===T?[]:T,R=t.currentValue,q=t.setCurrentOption,G=t.scrollPage,S=t.onActiveAssetIdChange,V=t.isDrillingPlatformApp,W=o([]),F=n(W,2),K=F[0],L=F[1],M=o(!1),z=n(M,2),B=z[0],H=z[1],J=i(null),N=i(null),Q=i(null),U=i(null),X=w||l,Y=X===v.pad.type?[].concat(e(E),["pad.active","pad.parent_frac_fleet_id"]):E,Z=function(){var t=r(s.mark((function t(r){var n,o,i,a,c,l=arguments;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=l.length>1&&void 0!==l[1]&&l[1],t.prev=1,o=(null==r?void 0:r.type)||X,H(!0),i={per_page:b,page:G},_&&D&&(i[_]=D),x&&"all"!==x&&(i.company=x),C&&(i.search=C),A&&(i.app_key=A),J.current=x,t.next=12,j(o)(P(P({},d(o,Y)),i));case 12:a=t.sent,c=g(a).map((function(t){return u({asset:t,group:null==r?void 0:r.name,isRequiredAssetId:k,isPrimaryAsset:!0,isDrillingPlatformApp:V})})).filter(m).sort(f),J.current===x&&L(n?function(t){return p([].concat(e(t),e(c)),"id")}:c),t.next=20;break;case 17:t.prev=17,t.t0=t.catch(1),console.error(t.t0);case 20:return t.prev=20,H(!1),t.finish(20);case 23:case"end":return t.stop()}}),t,null,[[1,17,20,23]])})));return function(r){return t.apply(this,arguments)}}(),$=function(){var t=r(s.mark((function t(){var r,e,n;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,j(X)(P(P({},d(X,Y)),{},{ids:R}));case 2:if(r=t.sent,!c(O(r))){t.next=7;break}return t.next=6,y(P(P({},d(X,Y)),{},{ids:R}));case 6:r=t.sent;case 7:e=u({asset:g(r)[0],isPrimaryAsset:!0,isRequiredAssetId:k,isDrillingPlatformApp:V}),q(e),X===v.rig.type?(n=V?h(r):(null==e?void 0:e.activeWellId)||null,S(n)):X===v.intervention_unit.type&&S((null==e?void 0:e.activeWellId)||null);case 10:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return a((function(){x&&L([])}),[x]),a((function(){var t=Q.current!==C,r=U.current!==G,e=!t&&r&&G>1&&(U.current||0)<G;t&&(Q.current=C),r&&(U.current=G),I?I.forEach((function(t){Z(t,e)})):(N.current&&N.current!==X&&L([]),N.current=X,Z(null,e))}),[w,_,D,x,A,null==I?void 0:I.length,C,G]),a((function(){R&&$()}),[]),{assets:K,loading:B}};export{w as usePrimaryAssetSelectData};
|
|
2
2
|
//# sourceMappingURL=usePrimaryAssetSelectData.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePrimaryAssetSelectData.js","sources":["../../../../src/components/AssetEditorV2/effects/usePrimaryAssetSelectData.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\nimport { isEmpty, uniqBy } from 'lodash';\n\nimport { AssetGroup, AssetId, AssetOption, AssetSelection } from '../types';\nimport { DEFAULT_ASSET_TYPE } from '../constants';\nimport { formatAsset, getRequestOptions, isAssetOption, sortAsset } from '../utils';\n\nimport { jsonApi } from '~/clients';\nimport { PER_PAGE } from '~/components/AssetEditor/constants';\nimport { ASSET_TYPES } from '~/constants';\n\nimport { deserializeAssetResponse, getFirstIncludedId, getResponseData } from './assetResponse';\n\ntype QueryParams = Record<string, unknown>;\n\ntype UsePrimaryAssetSelectDataParams = {\n appKey?: string | null;\n assetType?: string | null;\n company?: AssetId | null;\n groups?: AssetGroup[];\n isRequiredAssetId?: boolean;\n parentAssetId?: AssetId | null;\n parentAssetType?: string | null;\n searchValue?: string;\n assetFields?: string[];\n currentValue?: AssetId | null;\n selectedGroup?: AssetGroup | null;\n setCurrentOption: (selection: AssetSelection) => void;\n scrollPage: number;\n onActiveAssetIdChange: (id: number | null) => void;\n isDrillingPlatformApp?: boolean;\n};\n\nexport const usePrimaryAssetSelectData = ({\n appKey,\n assetType,\n company,\n groups,\n isRequiredAssetId,\n parentAssetId,\n parentAssetType,\n searchValue,\n assetFields = [],\n currentValue,\n setCurrentOption,\n scrollPage,\n onActiveAssetIdChange,\n isDrillingPlatformApp,\n}: UsePrimaryAssetSelectDataParams): { assets: AssetOption[]; loading: boolean } => {\n const [assets, setAssets] = useState<AssetOption[]>([]);\n const [loading, setLoading] = useState(false);\n const prevCompany = useRef<AssetId | null | undefined>(null);\n const prevAssetType = useRef<string | null>(null);\n const prevSearchValue = useRef<string | null | undefined>(null);\n const prevScrollPage = useRef<number | null>(null);\n const requestAssetType = assetType || DEFAULT_ASSET_TYPE;\n\n const assetFieldsByAssetType =\n requestAssetType === ASSET_TYPES.pad.type\n ? [...assetFields, 'pad.active', 'pad.parent_frac_fleet_id']\n : assetFields;\n\n const loadAssets = async (group?: AssetGroup | null, shouldAppend = false) => {\n try {\n const currentAssetType = group?.type || requestAssetType;\n setLoading(true);\n\n const requestParams: QueryParams = { per_page: PER_PAGE, page: scrollPage };\n\n if (parentAssetType && parentAssetId) requestParams[parentAssetType] = parentAssetId;\n if (company && company !== 'all') requestParams.company = company;\n if (searchValue) requestParams.search = searchValue;\n if (appKey) requestParams.app_key = appKey;\n\n prevCompany.current = company;\n\n const response: unknown = await jsonApi.mapAssetGetRequest(currentAssetType)({\n ...getRequestOptions(currentAssetType, assetFieldsByAssetType),\n ...requestParams,\n });\n\n const responseAssets = deserializeAssetResponse(response)\n .map(asset =>\n formatAsset({\n asset,\n group: group?.name,\n isRequiredAssetId,\n isPrimaryAsset: true,\n isDrillingPlatformApp,\n })\n )\n .filter(isAssetOption)\n .sort(sortAsset);\n\n if (prevCompany.current === company) {\n if (shouldAppend) {\n setAssets(prevState => uniqBy([...prevState, ...responseAssets], 'id'));\n } else {\n setAssets(responseAssets);\n }\n }\n } catch (error) {\n console.error(error);\n } finally {\n setLoading(false);\n }\n };\n\n const loadCurrentOption = async () => {\n let response: unknown = await jsonApi.mapAssetGetRequest(requestAssetType)({\n ...getRequestOptions(requestAssetType, assetFieldsByAssetType),\n ids: currentValue,\n });\n\n if (isEmpty(getResponseData(response))) {\n // Try to fetch the current option from v2/assets.\n response = await jsonApi.getAssets({\n ...getRequestOptions(requestAssetType, assetFieldsByAssetType),\n ids: currentValue,\n });\n }\n\n const formattedAsset = formatAsset({\n asset: deserializeAssetResponse(response)[0],\n isPrimaryAsset: true,\n isRequiredAssetId,\n isDrillingPlatformApp,\n });\n\n setCurrentOption(formattedAsset);\n\n if (requestAssetType === ASSET_TYPES.rig.type) {\n const activeWellId = isDrillingPlatformApp\n ? getFirstIncludedId(response)\n : formattedAsset?.activeWellId || null;\n\n onActiveAssetIdChange(activeWellId);\n } else if (requestAssetType === ASSET_TYPES.intervention_unit.type) {\n onActiveAssetIdChange(formattedAsset?.activeWellId || null);\n }\n };\n\n useEffect(() => {\n if (company) {\n setAssets([]);\n }\n }, [company]);\n\n useEffect(() => {\n // Reset assets instead of appending when the search value changes.\n const isSearchValueChanged = prevSearchValue.current !== searchValue;\n const isScrollPageChanged = prevScrollPage.current !== scrollPage;\n const isPagination =\n !isSearchValueChanged &&\n isScrollPageChanged &&\n scrollPage > 1 &&\n (prevScrollPage.current || 0) < scrollPage;\n\n if (isSearchValueChanged) {\n prevSearchValue.current = searchValue;\n }\n\n if (isScrollPageChanged) {\n prevScrollPage.current = scrollPage;\n }\n\n if (groups) {\n groups.forEach(group => {\n loadAssets(group, isPagination);\n });\n\n return;\n }\n\n if (prevAssetType.current && prevAssetType.current !== requestAssetType) {\n setAssets([]);\n }\n\n prevAssetType.current = requestAssetType;\n loadAssets(null, isPagination);\n }, [\n assetType,\n parentAssetType,\n parentAssetId,\n company,\n appKey,\n groups?.length,\n searchValue,\n scrollPage,\n ]);\n\n useEffect(() => {\n if (currentValue) {\n loadCurrentOption();\n }\n }, []);\n\n return { assets, loading };\n};\n"],"names":["usePrimaryAssetSelectData","_ref","appKey","assetType","company","groups","isRequiredAssetId","parentAssetId","parentAssetType","searchValue","_ref$assetFields","assetFields","currentValue","setCurrentOption","scrollPage","onActiveAssetIdChange","isDrillingPlatformApp","useState","_useState2","_slicedToArray","_useState","assets","setAssets","_useState4","_useState3","loading","setLoading","prevCompany","useRef","prevAssetType","prevSearchValue","prevScrollPage","requestAssetType","DEFAULT_ASSET_TYPE","assetFieldsByAssetType","ASSET_TYPES","pad","type","concat","_toConsumableArray","loadAssets","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","group","shouldAppend","currentAssetType","requestParams","response","responseAssets","_args","arguments","wrap","_context","prev","next","per_page","PER_PAGE","page","search","app_key","current","jsonApi","_objectSpread","getRequestOptions","sent","deserializeAssetResponse","map","asset","formatAsset","name","isPrimaryAsset","filter","isAssetOption","sort","sortAsset","prevState","uniqBy","t0","console","error","finish","stop","_callee","_x","apply","this","loadCurrentOption","_ref3","_callee2","formattedAsset","activeWellId","_context2","ids","isEmpty","getResponseData","rig","getFirstIncludedId","intervention_unit","useEffect","isSearchValueChanged","isScrollPageChanged","isPagination","forEach","length"],"mappings":"8yEAiCaA,IAAAA,EAA4B,SAe2CC,GAAA,IAdlFC,IAAAA,OACAC,IAAAA,UACAC,IAAAA,QACAC,IAAAA,OACAC,IAAAA,kBACAC,IAAAA,cACAC,IAAAA,gBACAC,IAAAA,YAAWC,EAAAT,EACXU,YAAAA,aAAc,GAAED,EAChBE,IAAAA,aACAC,IAAAA,iBACAC,IAAAA,WACAC,IAAAA,sBACAC,IAAAA,sBAE4BC,EAAAA,EAAwB,IAAGC,EAAAC,EAAAC,EAAA,GAAhDC,EAAMH,EAAA,GAAEI,EAASJ,EAAA,GACMD,EAAAA,GAAS,GAAMM,EAAAJ,EAAAK,EAAA,GAAtCC,EAAOF,EAAA,GAAEG,EAAUH,EAAA,GACpBI,EAAcC,EAAmC,MACjDC,EAAgBD,EAAsB,MACtCE,EAAkBF,EAAkC,MACpDG,EAAiBH,EAAsB,MACvCI,EAAmB7B,GAAa8B,EAEhCC,EACJF,IAAqBG,EAAYC,IAAIC,KAAI,GAAAC,OAAAC,EACjC5B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B,OAvDAgD,GAAU,WACJhG,GACFkB,EAAU,GAEd,GAAG,CAAClB,IAEJgG,GAAU,WAER,IAAMC,EAAuBvE,EAAgBgC,UAAYrD,EACnD6F,EAAsBvE,EAAe+B,UAAYhD,EACjDyF,GACHF,GACDC,GACAxF,EAAa,IACZiB,EAAe+B,SAAW,GAAKhD,EAE9BuF,IACFvE,EAAgBgC,QAAUrD,GAGxB6F,IACFvE,EAAe+B,QAAUhD,GAGvBT,EACFA,EAAOmG,SAAQ,SAAA3D,GACbL,EAAWK,EAAO0D,EACpB,KAKE1E,EAAciC,SAAWjC,EAAciC,UAAY9B,GACrDV,EAAU,IAGZO,EAAciC,QAAU9B,EACxBQ,EAAW,KAAM+D,MAChB,CACDpG,EACAK,EACAD,EACAH,EACAF,EACAG,aAAAA,EAAAA,EAAQoG,OACRhG,EACAK,IAGFsF,GAAU,WACJxF,GACF4E,GAEH,GAAE,IAEI,CAAEnE,OAAAA,EAAQI,QAAAA,EACnB"}
|
|
1
|
+
{"version":3,"file":"usePrimaryAssetSelectData.js","sources":["../../../../src/components/AssetEditorV2/effects/usePrimaryAssetSelectData.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\nimport { isEmpty, uniqBy } from 'lodash';\n\nimport { AssetGroup, AssetId, AssetOption, AssetSelection } from '../types';\nimport { DEFAULT_ASSET_TYPE } from '../constants';\nimport { formatAsset, getRequestOptions, isAssetOption, sortAsset } from '../utils';\n\nimport { jsonApi } from '~/clients';\nimport { PER_PAGE } from '~/components/AssetEditor/constants';\nimport { ASSET_TYPES } from '~/constants';\n\nimport { deserializeAssetResponse, getFirstIncludedId, getResponseData } from './assetResponse';\n\ntype QueryParams = Record<string, unknown>;\n\ntype UsePrimaryAssetSelectDataParams = {\n appKey?: string | null;\n assetType?: string | null;\n company?: AssetId | null;\n groups?: AssetGroup[];\n isRequiredAssetId?: boolean;\n parentAssetId?: AssetId | null;\n parentAssetType?: string | null;\n searchValue?: string;\n assetFields?: string[];\n currentValue?: AssetId | null;\n selectedGroup?: AssetGroup | null;\n setCurrentOption: (selection: AssetSelection) => void;\n scrollPage: number;\n onActiveAssetIdChange: (id: number | null) => void;\n isDrillingPlatformApp?: boolean;\n};\n\nexport const usePrimaryAssetSelectData = ({\n appKey,\n assetType,\n company,\n groups,\n isRequiredAssetId,\n parentAssetId,\n parentAssetType,\n searchValue,\n assetFields = [],\n currentValue,\n setCurrentOption,\n scrollPage,\n onActiveAssetIdChange,\n isDrillingPlatformApp,\n}: UsePrimaryAssetSelectDataParams): { assets: AssetOption[]; loading: boolean } => {\n const [assets, setAssets] = useState<AssetOption[]>([]);\n const [loading, setLoading] = useState(false);\n const prevCompany = useRef<AssetId | null | undefined>(null);\n const prevAssetType = useRef<string | null>(null);\n const prevSearchValue = useRef<string | null | undefined>(null);\n const prevScrollPage = useRef<number | null>(null);\n const requestAssetType = assetType || DEFAULT_ASSET_TYPE;\n\n const assetFieldsByAssetType =\n requestAssetType === ASSET_TYPES.pad.type\n ? [...assetFields, 'pad.active', 'pad.parent_frac_fleet_id']\n : assetFields;\n\n const loadAssets = async (group?: AssetGroup | null, shouldAppend = false) => {\n try {\n const currentAssetType = group?.type || requestAssetType;\n setLoading(true);\n\n const requestParams: QueryParams = { per_page: PER_PAGE, page: scrollPage };\n\n if (parentAssetType && parentAssetId) requestParams[parentAssetType] = parentAssetId;\n if (company && company !== 'all') requestParams.company = company;\n if (searchValue) requestParams.search = searchValue;\n if (appKey) requestParams.app_key = appKey;\n\n prevCompany.current = company;\n\n const response: unknown = await jsonApi.mapAssetGetRequest(currentAssetType)({\n ...getRequestOptions(currentAssetType, assetFieldsByAssetType),\n ...requestParams,\n });\n\n const responseAssets = deserializeAssetResponse(response)\n .map(asset =>\n formatAsset({\n asset,\n group: group?.name,\n isRequiredAssetId,\n isPrimaryAsset: true,\n isDrillingPlatformApp,\n })\n )\n .filter(isAssetOption)\n .sort(sortAsset);\n\n if (prevCompany.current === company) {\n if (shouldAppend) {\n setAssets(prevState => uniqBy([...prevState, ...responseAssets], 'id'));\n } else {\n setAssets(responseAssets);\n }\n }\n } catch (error) {\n console.error(error);\n } finally {\n setLoading(false);\n }\n };\n\n const loadCurrentOption = async () => {\n let response: unknown = await jsonApi.mapAssetGetRequest(requestAssetType)({\n ...getRequestOptions(requestAssetType, assetFieldsByAssetType),\n ids: currentValue,\n });\n\n if (isEmpty(getResponseData(response))) {\n // Try to fetch the current option from v2/assets.\n response = await jsonApi.getAssets({\n ...getRequestOptions(requestAssetType, assetFieldsByAssetType),\n ids: currentValue,\n });\n }\n\n const formattedAsset = formatAsset({\n asset: deserializeAssetResponse(response)[0],\n isPrimaryAsset: true,\n isRequiredAssetId,\n isDrillingPlatformApp,\n });\n\n setCurrentOption(formattedAsset);\n\n if (requestAssetType === ASSET_TYPES.rig.type) {\n const activeWellId = isDrillingPlatformApp\n ? getFirstIncludedId(response)\n : formattedAsset?.activeWellId || null;\n\n onActiveAssetIdChange(activeWellId);\n } else if (requestAssetType === ASSET_TYPES.intervention_unit.type) {\n onActiveAssetIdChange(formattedAsset?.activeWellId || null);\n }\n };\n\n useEffect(() => {\n if (company) {\n setAssets([]);\n }\n }, [company]);\n\n useEffect(() => {\n // Reset assets instead of appending when the search value changes.\n const isSearchValueChanged = prevSearchValue.current !== searchValue;\n const isScrollPageChanged = prevScrollPage.current !== scrollPage;\n const isPagination =\n !isSearchValueChanged &&\n isScrollPageChanged &&\n scrollPage > 1 &&\n (prevScrollPage.current || 0) < scrollPage;\n\n if (isSearchValueChanged) {\n prevSearchValue.current = searchValue;\n }\n\n if (isScrollPageChanged) {\n prevScrollPage.current = scrollPage;\n }\n\n if (groups) {\n groups.forEach(group => {\n loadAssets(group, isPagination);\n });\n\n return;\n }\n\n if (prevAssetType.current && prevAssetType.current !== requestAssetType) {\n setAssets([]);\n }\n\n prevAssetType.current = requestAssetType;\n loadAssets(null, isPagination);\n }, [\n assetType,\n parentAssetType,\n parentAssetId,\n company,\n appKey,\n groups?.length,\n searchValue,\n scrollPage,\n ]);\n\n useEffect(() => {\n if (currentValue) {\n loadCurrentOption();\n }\n }, []);\n\n return { assets, loading };\n};\n"],"names":["usePrimaryAssetSelectData","_ref","appKey","assetType","company","groups","isRequiredAssetId","parentAssetId","parentAssetType","searchValue","_ref$assetFields","assetFields","currentValue","setCurrentOption","scrollPage","onActiveAssetIdChange","isDrillingPlatformApp","useState","_useState2","_slicedToArray","_useState","assets","setAssets","_useState4","_useState3","loading","setLoading","prevCompany","useRef","prevAssetType","prevSearchValue","prevScrollPage","requestAssetType","DEFAULT_ASSET_TYPE","assetFieldsByAssetType","ASSET_TYPES","pad","type","concat","_toConsumableArray","loadAssets","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","group","shouldAppend","currentAssetType","requestParams","response","responseAssets","_args","arguments","wrap","_context","prev","next","per_page","PER_PAGE","page","search","app_key","current","jsonApi","_objectSpread","getRequestOptions","sent","deserializeAssetResponse","map","asset","formatAsset","name","isPrimaryAsset","filter","isAssetOption","sort","sortAsset","prevState","uniqBy","t0","console","error","finish","stop","_callee","_x","apply","this","loadCurrentOption","_ref3","_callee2","formattedAsset","activeWellId","_context2","ids","isEmpty","getResponseData","rig","getFirstIncludedId","intervention_unit","useEffect","isSearchValueChanged","isScrollPageChanged","isPagination","forEach","length"],"mappings":"gsEAiCaA,IAAAA,EAA4B,SAe2CC,GAAA,IAdlFC,IAAAA,OACAC,IAAAA,UACAC,IAAAA,QACAC,IAAAA,OACAC,IAAAA,kBACAC,IAAAA,cACAC,IAAAA,gBACAC,IAAAA,YAAWC,EAAAT,EACXU,YAAAA,aAAc,GAAED,EAChBE,IAAAA,aACAC,IAAAA,iBACAC,IAAAA,WACAC,IAAAA,sBACAC,IAAAA,sBAE4BC,EAAAA,EAAwB,IAAGC,EAAAC,EAAAC,EAAA,GAAhDC,EAAMH,EAAA,GAAEI,EAASJ,EAAA,GACMD,EAAAA,GAAS,GAAMM,EAAAJ,EAAAK,EAAA,GAAtCC,EAAOF,EAAA,GAAEG,EAAUH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AkB9D,MAC5DtB,GAAsB4E,aAAAA,EAAAA,EAAgBC,eAAgB,MACvD,KAAA,GAAA,IAAA,MAAA,OAAAC,EAAAV,OAAA,GAAAO,EACF,KAAA,OAAA,WAhCsB,OAAAD,EAAAH,MAAAC,KAAAnC,UAAA,EAAA,GAyFvB,OAvDAgD,GAAU,WACJhG,GACFkB,EAAU,GAEd,GAAG,CAAClB,IAEJgG,GAAU,WAER,IAAMC,EAAuBvE,EAAgBgC,UAAYrD,EACnD6F,EAAsBvE,EAAe+B,UAAYhD,EACjDyF,GACHF,GACDC,GACAxF,EAAa,IACZiB,EAAe+B,SAAW,GAAKhD,EAE9BuF,IACFvE,EAAgBgC,QAAUrD,GAGxB6F,IACFvE,EAAe+B,QAAUhD,GAGvBT,EACFA,EAAOmG,SAAQ,SAAA3D,GACbL,EAAWK,EAAO0D,EACpB,KAKE1E,EAAciC,SAAWjC,EAAciC,UAAY9B,GACrDV,EAAU,IAGZO,EAAciC,QAAU9B,EACxBQ,EAAW,KAAM+D,MAChB,CACDpG,EACAK,EACAD,EACAH,EACAF,EACAG,aAAAA,EAAAA,EAAQoG,OACRhG,EACAK,IAGFsF,GAAU,WACJxF,GACF4E,GAEH,GAAE,IAEI,CAAEnE,OAAAA,EAAQI,QAAAA,EACnB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"@babel/runtime/helpers/slicedToArray";import s from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/objectWithoutProperties";import{useState as i,useCallback as e}from"react";import n from"prop-types";import c from"react-player";import r from"classnames";import{withStyles as a}from"@material-ui/core/styles";import{Typography as m}from"@material-ui/core";import l from"@material-ui/icons/Image";import p from"@material-ui/icons/Fullscreen";import u from"@material-ui/core/colors/grey";import d from"../NewDocumentViewer/NewDocumentViewer.js";import{UnavailableFileIcon as h}from"../NewDocumentViewer/icons/UnavailableFileIcon.js";import{ImageViewer as j}from"../../componentsV2/ImageViewer/ImageViewer.js";import f from"./styles.css.js";import I from"../FileTypeIcon.js";import g from"../IconButton/index.js";import{isNativeDetected as v}from"../../utils/mobileDetect.js";import{getIsImage as b,getIsVideo as y}from"../../utils/fileExtension.js";import{getIsPreviewUnavailable as C}from"../../utils/filePreview.js";import{DownloadIcon as N}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/DragOne.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/SearchOne.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/InfoRounded.js";import"../../icons/customIcons/icons/FlameFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import"../../icons/customIcons/icons/Pad.js";import"../../icons/customIcons/icons/DrilloutUnit.js";import"../../icons/customIcons/icons/FracFleet.js";import"../../icons/customIcons/icons/Global.js";import"../../icons/customIcons/icons/Program.js";import"../../icons/customIcons/icons/Rig.js";import"../../icons/customIcons/icons/Well.js";import"../../icons/customIcons/icons/Gap.js";import"../../icons/customIcons/icons/Pin.js";import"../../icons/customIcons/icons/PinOne.js";import"../../icons/customIcons/icons/PinOneCrossed.js";import"../../icons/customIcons/icons/CloseOneFilled.js";import"../../icons/customIcons/icons/AttentionFilled.js";import"../../icons/customIcons/icons/CheckOneFilled.js";import"../../icons/customIcons/icons/Archive.js";import"../../icons/customIcons/icons/ArchiveCancel.js";import"../../icons/customIcons/icons/Unarchive.js";import"../../icons/customIcons/icons/Archived.js";import"../../icons/customIcons/icons/InterventionUnit.js";import"../../icons/customIcons/icons/CloudDelete.js";import"../../icons/customIcons/icons/Lasso.js";import"../../icons/customIcons/icons/Radius.js";import"../../icons/customIcons/icons/ErrorOps.js";import"../../icons/customIcons/icons/DataTypeOps.js";import"../../icons/customIcons/icons/FalsePositiveOps.js";import"../../icons/customIcons/icons/CalibrationOps.js";import"../../icons/customIcons/icons/CriticalOps.js";import"../../icons/customIcons/icons/Company.js";import"../../icons/customIcons/icons/ArchiveOne.js";import"../../icons/customIcons/icons/ParseBotFusion.js";import"../../icons/customIcons/icons/Connect.js";import"../../icons/customIcons/icons/PuzzleOne.js";import"../../icons/customIcons/icons/Feed.js";import"../../icons/customIcons/icons/Prompt.js";import"../../icons/customIcons/icons/Companies.js";import"../../icons/customIcons/icons/ClipboardAi.js";import"../../icons/customIcons/icons/Key.js";import"../../icons/customIcons/icons/AtSignCrossed.js";import"../../icons/customIcons/icons/MappingManual.js";import"../../icons/customIcons/icons/Mapping.js";import"../../icons/customIcons/icons/Metrics.js";import"../../icons/customIcons/icons/Drops.js";import"../../icons/customIcons/icons/ClipboardSearch.js";import"../../icons/customIcons/icons/Template.js";import"../../icons/customIcons/icons/ClipboardMetrics.js";import"../../icons/customIcons/icons/ClipboardBuilder.js";import"../../icons/customIcons/icons/UnitConversion.js";import"../../icons/customIcons/icons/NPT.js";import"../../icons/customIcons/icons/GuidedFrac.js";import"../../clients/subscriptions/constants.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"lodash";import"../../clients/subscriptions.v1.js";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions/subscriptions-client.factory.js";import"query-string";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/appPackages.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import"../../constants/corvaCompanyId.js";import"../GradientManager/configuration/constants.js";import w from"../../effects/useSignedURL.js";import"../UserMention/utils/index.js";import"../../utils/convert.js";import"moment";import"../../utils/casing/validation.js";import"lodash/mean";import"../../constants/streamSourceType.js";import"lodash/get";import"file-saver";import"../../utils/drillstring/conversion.js";import"lodash/set";import"lodash/cloneDeep";import"@babel/runtime/helpers/toConsumableArray";import"lodash/isNumber";import"lodash/has";import"../../utils/ga.js";import"../../utils/goalsConfig/goalsConfig.js";import"../../utils/lasParser.js";import P from"../../utils/main.js";import"../../utils/metrics/metricsConfig.js";import"../../utils/feed.js";import"../../utils/reports.js";import"moment-timezone";import"@babel/runtime/helpers/typeof";import"../../utils/dashboardReports.js";import"../../utils/env.js";import"../../utils/jsonaDataFormatter.js";import"../../utils/bha.js";import"jsona";import"../../utils/charts/Styles.scss.js";import"../../utils/getSingleAsset.js";import"uuid";import"../StatusBadge/constants.js";import"lodash/unset";import"../../clients/api/apiCore.js";import"../../clients/constants.js";import"../../clients/sso/auth0.js";import"../../clients/sso/oauth2.js";import"../../clients/api/rateLimiter.js";import"lodash/isEmpty";import"lodash/sortBy";import"../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import"../../componentsV2/AppCommonsProvider/AppCommonsProvider.js";import"../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../componentsV2/AppPanel/AppPanelsContext.js";import{jsx as O,jsxs as F,Fragment as A}from"react/jsx-runtime";var x=["displayName","fileName","attachmentSize","size","small"];function D(o,s){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(o);s&&(i=i.filter((function(s){return Object.getOwnPropertyDescriptor(o,s).enumerable}))),t.push.apply(t,i)}return t}function S(o){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?D(Object(i),!0).forEach((function(t){s(o,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):D(Object(i)).forEach((function(s){Object.defineProperty(o,s,Object.getOwnPropertyDescriptor(i,s))}))}return o}var z=u[200],W=u[400],R={label:"small",value:135},U={label:"medium",value:300},L={fileImage:function(o,s){return{maxWidth:"100%",borderRadius:4,overflow:"hidden",maxHeight:s===R.label?R.value:U.value,display:o?"initial":"none",cursor:"pointer"}},fileDownloadWrapper:{padding:"10px 10px 10px 5px",border:"1px solid #616161",borderRadius:3,maxWidth:500,width:"75%"},imagePlaceholder:{position:"relative",backgroundColor:z,borderRadius:3,marginTop:10,height:135,width:135}},k=function(o){var s,t,i=w(o.attachmentFileName)||o.attachmentUrl;return F(A,{children:[F("div",{onClick:o.openLightbox,className:f.cAttachmentImg,children:[O("img",{"data-testid":"".concat("Attachment","_image"),src:i,style:L.fileImage(!!o.imageDimensions,o.size),alt:"Attachment",onLoad:o.onImageLoaded}),O("div",{"data-testid":"".concat("Attachment","_button"),className:f.cAttachmentImgPreviwBtn,children:O(p,{})})]}),!o.imageDimensions&&O("div",{style:L.imagePlaceholder,children:O(l,{"data-testid":"".concat("Attachment","_placeholder"),className:o.classes.imageIconRoot,htmlColor:W,fontSize:"large"})}),o.lightboxIsOpen&&O(j,{src:i,onClose:o.handleLightboxClose,onOpen:o.handleLightboxOpen,width:null===(s=o.imageDimensions)||void 0===s?void 0:s.width,height:null===(t=o.imageDimensions)||void 0===t?void 0:t.height})]})},E=function(o){var s=P.getFileNameWithExtensionFromPath(o.displayName||o.attachmentUrl),t=w(o.attachmentFileName,"inline"),i=w(o.attachmentFileName,"attachment"),e=C(s);return F("div",{className:f.cAttachmentFileWrapper,children:[F("div",{className:r(f.cAttachmentFileDownloadWrapper,e&&o.classes.disabledPreview),style:L.fileDownloadWrapper,onClick:function(){e||o.openPreview()},children:[e?O(h,{className:o.classes.unavailableFileIcon}):O(I,{fileName:o.displayName||o.attachmentUrl,className:f.cAttachmentFileDownloadWrapperFileIcon,size:o.small?25:50}),F("div",{className:o.classes.titleContainer,children:[e&&O("div",{className:o.classes.caption,children:"Preview unavailable"}),O("div",{"data-testid":"".concat("Attachment","_name"),className:r(f.cAttachmentFileDownloadWrapperFileName,e&&o.classes.fileName),children:O(m,{variant:"subtitle2",noWrap:!0,className:o.classes.unavailableFileName,children:s})})]}),O(d,{fileUrl:t,classes:{root:o.classes.dialogRoot,paper:v?o.classes.nativeDialog:o.classes.dialog},fileName:s,fileSize:o.attachmentSize,onClose:o.closePreview,open:o.previewIsOpen})]}),O("a",{download:o.displayName,href:i,className:f.cAttachmentFileDownloadWrapperForm,children:O(g,{"data-testid":"".concat("Attachment","_downloadButton"),className:o.classes.downloadIcon,type:"submit",children:O(N,{size:24,className:o.classes.downloadIcon})})})]})};function M(s){var n=s.displayName,r=void 0===n?null:n,a=s.fileName,m=void 0===a?null:a,l=s.attachmentSize,p=void 0===l?void 0:l,u=s.size,d=void 0===u?U.label:u,h=s.small,j=void 0!==h&&h,I=S(S({},t(s,x)),{},{displayName:r,fileName:m,attachmentSize:p,size:d,small:j}),g=i(void 0),C=o(g,2),N=C[0],P=C[1],F=i(!1),A=o(F,2),D=A[0],z=A[1],W=i(!1),L=o(W,2),M=L[0],T=L[1],V=I.displayName||I.attachmentUrl||I.fileName,B=b(V),q=y(V),G=w(!I.attachmentUrl&&I.fileName),_=I.attachmentUrl||G,H=e((function(o){return o.preventDefault()}),[]),K=e((function(){v&&document.documentElement.addEventListener("touchmove",H,{passive:!1})}),[H]),Z=e((function(){v&&document.documentElement.removeEventListener("touchmove",H),z(!1)}),[H]),J=e((function(){return z(!0)}),[]),Q=e((function(o){var s=o.currentTarget,t=s.naturalWidth,i=s.naturalHeight;P({width:t,height:i})}),[]),X=e((function(){return T(!0)}),[]),Y=e((function(o){o.stopPropagation(),T(!1)}),[]);return B?O("div",{className:f.cAttachment,children:O(k,{size:I.size,openLightbox:J,attachmentFileName:I.fileName,attachmentUrl:I.attachmentUrl,onImageLoaded:Q,imageDimensions:N,lightboxIsOpen:D,handleLightboxOpen:K,handleLightboxClose:Z,classes:I.classes})}):q&&c.canPlay(_)?O("div",{className:f.cAttachment,children:O(c,{"data-testid":"".concat("Attachment","_player"),className:f.cAttachmentReactPlayer,url:_,config:{file:{attributes:{preload:"metadata"}}},controls:!0,height:I.size===R.label?R.value:U.value,width:null})}):O("div",{className:f.cAttachment,children:O(E,{attachmentUrl:_,attachmentFileName:I.fileName,attachmentSize:I.attachmentSize,displayName:I.displayName,openPreview:X,closePreview:Y,previewIsOpen:M,classes:I.classes,small:I.small})})}M.propTypes={attachmentUrl:n.string.isRequired,attachmentSize:n.number,displayName:n.string,fileName:n.string,size:n.oneOf([R.label,U.label]),classes:n.shape({}).isRequired,small:n.bool};var T=a((function(o){return{imageIconRoot:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},dialog:{width:"95%",height:"95%",maxWidth:"100%",position:"relative"},nativeDialog:{width:"100%",height:"100%",maxWidth:"100%",maxHeight:"100%",margin:0},dialogRoot:{backgroundColor:"rgba(0, 0, 0, 0.85)"},fileName:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",fontWeight:400},downloadIcon:{color:o.palette.primary.text3},disabledPreview:{backgroundColor:o.palette.primary.text9},unavailableFileIcon:{marginRight:12,minWidth:32},titleContainer:{display:"flex",flexDirection:"column",width:"100%"},caption:{fontSize:12,fontWeight:400,width:"fit-content"},unavailableFileName:{fontSize:12,fontWeight:400}}}))(M);export{T as default};
|
|
1
|
+
import o from"@babel/runtime/helpers/slicedToArray";import s from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/objectWithoutProperties";import{useState as i,useCallback as e}from"react";import n from"prop-types";import c from"react-player";import r from"classnames";import{withStyles as a}from"@material-ui/core/styles";import{Typography as m}from"@material-ui/core";import l from"@material-ui/icons/Image";import p from"@material-ui/icons/Fullscreen";import u from"@material-ui/core/colors/grey";import d from"../NewDocumentViewer/NewDocumentViewer.js";import{UnavailableFileIcon as h}from"../NewDocumentViewer/icons/UnavailableFileIcon.js";import{ImageViewer as j}from"../../componentsV2/ImageViewer/ImageViewer.js";import f from"./styles.css.js";import I from"../FileTypeIcon.js";import g from"../IconButton/index.js";import{isNativeDetected as v}from"../../utils/mobileDetect.js";import{getIsImage as b,getIsVideo as y}from"../../utils/fileExtension.js";import{getIsPreviewUnavailable as C}from"../../utils/filePreview.js";import{DownloadIcon as N}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/DragOne.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/SearchOne.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/InfoRounded.js";import"../../icons/customIcons/icons/FlameFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import"../../icons/customIcons/icons/Pad.js";import"../../icons/customIcons/icons/DrilloutUnit.js";import"../../icons/customIcons/icons/FracFleet.js";import"../../icons/customIcons/icons/Global.js";import"../../icons/customIcons/icons/Program.js";import"../../icons/customIcons/icons/Rig.js";import"../../icons/customIcons/icons/Well.js";import"../../icons/customIcons/icons/Gap.js";import"../../icons/customIcons/icons/Pin.js";import"../../icons/customIcons/icons/PinOne.js";import"../../icons/customIcons/icons/PinOneCrossed.js";import"../../icons/customIcons/icons/CloseOneFilled.js";import"../../icons/customIcons/icons/AttentionFilled.js";import"../../icons/customIcons/icons/CheckOneFilled.js";import"../../icons/customIcons/icons/Archive.js";import"../../icons/customIcons/icons/ArchiveCancel.js";import"../../icons/customIcons/icons/Unarchive.js";import"../../icons/customIcons/icons/Archived.js";import"../../icons/customIcons/icons/InterventionUnit.js";import"../../icons/customIcons/icons/CloudDelete.js";import"../../icons/customIcons/icons/Lasso.js";import"../../icons/customIcons/icons/Radius.js";import"../../icons/customIcons/icons/ErrorOps.js";import"../../icons/customIcons/icons/DataTypeOps.js";import"../../icons/customIcons/icons/FalsePositiveOps.js";import"../../icons/customIcons/icons/CalibrationOps.js";import"../../icons/customIcons/icons/CriticalOps.js";import"../../icons/customIcons/icons/Company.js";import"../../icons/customIcons/icons/ArchiveOne.js";import"../../icons/customIcons/icons/ParseBotFusion.js";import"../../icons/customIcons/icons/Connect.js";import"../../icons/customIcons/icons/PuzzleOne.js";import"../../icons/customIcons/icons/Feed.js";import"../../icons/customIcons/icons/Prompt.js";import"../../icons/customIcons/icons/Companies.js";import"../../icons/customIcons/icons/ClipboardAi.js";import"../../icons/customIcons/icons/Key.js";import"../../icons/customIcons/icons/AtSignCrossed.js";import"../../icons/customIcons/icons/MappingManual.js";import"../../icons/customIcons/icons/Mapping.js";import"../../icons/customIcons/icons/Metrics.js";import"../../icons/customIcons/icons/Drops.js";import"../../icons/customIcons/icons/ClipboardSearch.js";import"../../icons/customIcons/icons/Template.js";import"../../icons/customIcons/icons/ClipboardMetrics.js";import"../../icons/customIcons/icons/ClipboardBuilder.js";import"../../icons/customIcons/icons/UnitConversion.js";import"../../icons/customIcons/icons/NPT.js";import"../../icons/customIcons/icons/GuidedFrac.js";import"querystring";import"lodash";import"../../clients/subscriptions/subscriptions-client.factory.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../clients/jsonApi/index.js";import"query-string";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/appPackages.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import"../../constants/corvaCompanyId.js";import"../GradientManager/configuration/constants.js";import w from"../../effects/useSignedURL.js";import"../UserMention/utils/index.js";import"../../utils/convert.js";import"moment";import"../../utils/casing/validation.js";import"lodash/mean";import"../../constants/streamSourceType.js";import"lodash/get";import"file-saver";import"../../utils/drillstring/conversion.js";import"lodash/set";import"lodash/cloneDeep";import"@babel/runtime/helpers/toConsumableArray";import"lodash/isNumber";import"lodash/has";import"../../utils/ga.js";import"../../utils/goalsConfig/goalsConfig.js";import"../../utils/lasParser.js";import P from"../../utils/main.js";import"../../utils/metrics/metricsConfig.js";import"../../utils/feed.js";import"../../utils/reports.js";import"moment-timezone";import"@babel/runtime/helpers/typeof";import"../../utils/dashboardReports.js";import"../../utils/env.js";import"../../utils/jsonaDataFormatter.js";import"../../utils/bha.js";import"jsona";import"../../utils/charts/Styles.scss.js";import"../../utils/getSingleAsset.js";import"uuid";import"../StatusBadge/constants.js";import"lodash/unset";import"../../clients/api/apiCore.js";import"../../clients/constants.js";import"../../clients/sso/auth0.js";import"../../clients/sso/oauth2.js";import"../../clients/api/rateLimiter.js";import"lodash/isEmpty";import"lodash/sortBy";import"../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import"../../componentsV2/AppCommonsProvider/AppCommonsProvider.js";import"../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../componentsV2/AppPanel/AppPanelsContext.js";import{jsx as O,jsxs as F,Fragment as A}from"react/jsx-runtime";var x=["displayName","fileName","attachmentSize","size","small"];function D(o,s){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(o);s&&(i=i.filter((function(s){return Object.getOwnPropertyDescriptor(o,s).enumerable}))),t.push.apply(t,i)}return t}function S(o){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?D(Object(i),!0).forEach((function(t){s(o,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):D(Object(i)).forEach((function(s){Object.defineProperty(o,s,Object.getOwnPropertyDescriptor(i,s))}))}return o}var z=u[200],W=u[400],R={label:"small",value:135},U={label:"medium",value:300},L={fileImage:function(o,s){return{maxWidth:"100%",borderRadius:4,overflow:"hidden",maxHeight:s===R.label?R.value:U.value,display:o?"initial":"none",cursor:"pointer"}},fileDownloadWrapper:{padding:"10px 10px 10px 5px",border:"1px solid #616161",borderRadius:3,maxWidth:500,width:"75%"},imagePlaceholder:{position:"relative",backgroundColor:z,borderRadius:3,marginTop:10,height:135,width:135}},k=function(o){var s,t,i=w(o.attachmentFileName)||o.attachmentUrl;return F(A,{children:[F("div",{onClick:o.openLightbox,className:f.cAttachmentImg,children:[O("img",{"data-testid":"".concat("Attachment","_image"),src:i,style:L.fileImage(!!o.imageDimensions,o.size),alt:"Attachment",onLoad:o.onImageLoaded}),O("div",{"data-testid":"".concat("Attachment","_button"),className:f.cAttachmentImgPreviwBtn,children:O(p,{})})]}),!o.imageDimensions&&O("div",{style:L.imagePlaceholder,children:O(l,{"data-testid":"".concat("Attachment","_placeholder"),className:o.classes.imageIconRoot,htmlColor:W,fontSize:"large"})}),o.lightboxIsOpen&&O(j,{src:i,onClose:o.handleLightboxClose,onOpen:o.handleLightboxOpen,width:null===(s=o.imageDimensions)||void 0===s?void 0:s.width,height:null===(t=o.imageDimensions)||void 0===t?void 0:t.height})]})},E=function(o){var s=P.getFileNameWithExtensionFromPath(o.displayName||o.attachmentUrl),t=w(o.attachmentFileName,"inline"),i=w(o.attachmentFileName,"attachment"),e=C(s);return F("div",{className:f.cAttachmentFileWrapper,children:[F("div",{className:r(f.cAttachmentFileDownloadWrapper,e&&o.classes.disabledPreview),style:L.fileDownloadWrapper,onClick:function(){e||o.openPreview()},children:[e?O(h,{className:o.classes.unavailableFileIcon}):O(I,{fileName:o.displayName||o.attachmentUrl,className:f.cAttachmentFileDownloadWrapperFileIcon,size:o.small?25:50}),F("div",{className:o.classes.titleContainer,children:[e&&O("div",{className:o.classes.caption,children:"Preview unavailable"}),O("div",{"data-testid":"".concat("Attachment","_name"),className:r(f.cAttachmentFileDownloadWrapperFileName,e&&o.classes.fileName),children:O(m,{variant:"subtitle2",noWrap:!0,className:o.classes.unavailableFileName,children:s})})]}),O(d,{fileUrl:t,classes:{root:o.classes.dialogRoot,paper:v?o.classes.nativeDialog:o.classes.dialog},fileName:s,fileSize:o.attachmentSize,onClose:o.closePreview,open:o.previewIsOpen})]}),O("a",{download:o.displayName,href:i,className:f.cAttachmentFileDownloadWrapperForm,children:O(g,{"data-testid":"".concat("Attachment","_downloadButton"),className:o.classes.downloadIcon,type:"submit",children:O(N,{size:24,className:o.classes.downloadIcon})})})]})};function M(s){var n=s.displayName,r=void 0===n?null:n,a=s.fileName,m=void 0===a?null:a,l=s.attachmentSize,p=void 0===l?void 0:l,u=s.size,d=void 0===u?U.label:u,h=s.small,j=void 0!==h&&h,I=S(S({},t(s,x)),{},{displayName:r,fileName:m,attachmentSize:p,size:d,small:j}),g=i(void 0),C=o(g,2),N=C[0],P=C[1],F=i(!1),A=o(F,2),D=A[0],z=A[1],W=i(!1),L=o(W,2),M=L[0],T=L[1],V=I.displayName||I.attachmentUrl||I.fileName,B=b(V),q=y(V),G=w(!I.attachmentUrl&&I.fileName),_=I.attachmentUrl||G,H=e((function(o){return o.preventDefault()}),[]),K=e((function(){v&&document.documentElement.addEventListener("touchmove",H,{passive:!1})}),[H]),Z=e((function(){v&&document.documentElement.removeEventListener("touchmove",H),z(!1)}),[H]),J=e((function(){return z(!0)}),[]),Q=e((function(o){var s=o.currentTarget,t=s.naturalWidth,i=s.naturalHeight;P({width:t,height:i})}),[]),X=e((function(){return T(!0)}),[]),Y=e((function(o){o.stopPropagation(),T(!1)}),[]);return B?O("div",{className:f.cAttachment,children:O(k,{size:I.size,openLightbox:J,attachmentFileName:I.fileName,attachmentUrl:I.attachmentUrl,onImageLoaded:Q,imageDimensions:N,lightboxIsOpen:D,handleLightboxOpen:K,handleLightboxClose:Z,classes:I.classes})}):q&&c.canPlay(_)?O("div",{className:f.cAttachment,children:O(c,{"data-testid":"".concat("Attachment","_player"),className:f.cAttachmentReactPlayer,url:_,config:{file:{attributes:{preload:"metadata"}}},controls:!0,height:I.size===R.label?R.value:U.value,width:null})}):O("div",{className:f.cAttachment,children:O(E,{attachmentUrl:_,attachmentFileName:I.fileName,attachmentSize:I.attachmentSize,displayName:I.displayName,openPreview:X,closePreview:Y,previewIsOpen:M,classes:I.classes,small:I.small})})}M.propTypes={attachmentUrl:n.string.isRequired,attachmentSize:n.number,displayName:n.string,fileName:n.string,size:n.oneOf([R.label,U.label]),classes:n.shape({}).isRequired,small:n.bool};var T=a((function(o){return{imageIconRoot:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},dialog:{width:"95%",height:"95%",maxWidth:"100%",position:"relative"},nativeDialog:{width:"100%",height:"100%",maxWidth:"100%",maxHeight:"100%",margin:0},dialogRoot:{backgroundColor:"rgba(0, 0, 0, 0.85)"},fileName:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",fontWeight:400},downloadIcon:{color:o.palette.primary.text3},disabledPreview:{backgroundColor:o.palette.primary.text9},unavailableFileIcon:{marginRight:12,minWidth:32},titleContainer:{display:"flex",flexDirection:"column",width:"100%"},caption:{fontSize:12,fontWeight:400,width:"fit-content"},unavailableFileName:{fontSize:12,fontWeight:400}}}))(M);export{T as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/Attachment/index.js"],"sourcesContent":["import { useCallback, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport ReactPlayer from 'react-player';\nimport classNames from 'classnames';\nimport { withStyles } from '@material-ui/core/styles';\nimport { Typography } from '@material-ui/core';\nimport ImageIcon from '@material-ui/icons/Image';\nimport FullSizeIcon from '@material-ui/icons/Fullscreen';\nimport grey from '@material-ui/core/colors/grey';\n\nimport { NewDocumentViewer } from '../NewDocumentViewer';\nimport { UnavailableFileIcon } from '../NewDocumentViewer/icons/UnavailableFileIcon';\nimport { ImageViewer } from '../../componentsV2/ImageViewer';\n\nimport styles from './styles.css';\n\nimport FileTypeIcon from '~components/FileTypeIcon';\nimport IconButton from '~components/IconButton';\nimport { isNativeDetected } from '~/utils/mobileDetect';\nimport { getIsImage, getIsVideo } from '~/utils/fileExtension';\nimport { getIsPreviewUnavailable } from '~/utils/filePreview';\nimport { DownloadIcon } from '~/icons';\nimport { useSignedURL } from '~/effects';\nimport utils from '~utils/main';\n\nconst PAGE_NAME = 'Attachment';\n\nconst grey200 = grey[200];\nconst grey400 = grey[400];\n\nconst SIZES = {\n small: { label: 'small', value: 135 },\n medium: { label: 'medium', value: 300 },\n};\n\nconst style = {\n fileImage: (imageIsLoaded, size) => ({\n maxWidth: '100%',\n borderRadius: 4,\n overflow: 'hidden',\n // NOTE: Makes one-line comment with image fits into comments container. Equals to\n // imagePlaceholder height\n maxHeight: size === SIZES.small.label ? SIZES.small.value : SIZES.medium.value,\n display: imageIsLoaded ? 'initial' : 'none',\n cursor: 'pointer',\n }),\n fileDownloadWrapper: {\n padding: '10px 10px 10px 5px',\n border: `1px solid #616161`,\n borderRadius: 3,\n maxWidth: 500, // NOTE: Corresponds to react-player max width\n width: '75%',\n },\n imagePlaceholder: {\n position: 'relative',\n backgroundColor: grey200,\n borderRadius: 3,\n marginTop: 10,\n height: 135,\n width: 135,\n },\n};\n\nconst muiStyles = theme => ({\n imageIconRoot: {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n },\n dialog: {\n width: '95%',\n height: '95%',\n maxWidth: '100%',\n position: 'relative',\n },\n nativeDialog: {\n width: '100%',\n height: '100%',\n maxWidth: '100%',\n maxHeight: '100%',\n margin: 0,\n },\n dialogRoot: {\n // NOTE: Make background color similar to lightbox\n backgroundColor: 'rgba(0, 0, 0, 0.85)',\n },\n fileName: {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n fontWeight: 400,\n },\n downloadIcon: {\n color: theme.palette.primary.text3,\n },\n disabledPreview: {\n backgroundColor: theme.palette.primary.text9,\n },\n unavailableFileIcon: {\n marginRight: 12,\n minWidth: 32,\n },\n titleContainer: {\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n },\n caption: {\n fontSize: 12,\n fontWeight: 400,\n width: 'fit-content',\n },\n unavailableFileName: {\n fontSize: 12,\n fontWeight: 400,\n },\n});\n\n/* eslint-disable react/prop-types */\nconst ImageAttachment = props => {\n const downloadLink = useSignedURL(props.attachmentFileName) || props.attachmentUrl;\n\n return (\n <>\n <div onClick={props.openLightbox} className={styles.cAttachmentImg}>\n <img\n data-testid={`${PAGE_NAME}_image`}\n src={downloadLink}\n style={style.fileImage(!!props.imageDimensions, props.size)}\n alt=\"Attachment\"\n onLoad={props.onImageLoaded}\n />\n <div data-testid={`${PAGE_NAME}_button`} className={styles.cAttachmentImgPreviwBtn}>\n <FullSizeIcon />\n </div>\n </div>\n\n {!props.imageDimensions && (\n <div style={style.imagePlaceholder}>\n <ImageIcon\n data-testid={`${PAGE_NAME}_placeholder`}\n className={props.classes.imageIconRoot}\n htmlColor={grey400}\n fontSize=\"large\"\n />\n </div>\n )}\n\n {props.lightboxIsOpen && (\n <ImageViewer\n src={downloadLink}\n onClose={props.handleLightboxClose}\n onOpen={props.handleLightboxOpen}\n width={props.imageDimensions?.width}\n height={props.imageDimensions?.height}\n />\n )}\n </>\n );\n};\n\nconst FileAttachment = props => {\n const fileName = utils.getFileNameWithExtensionFromPath(props.displayName || props.attachmentUrl);\n\n const previewUrl = useSignedURL(props.attachmentFileName, 'inline');\n const downloadUrl = useSignedURL(props.attachmentFileName, 'attachment');\n\n const isPreviewUnavailable = getIsPreviewUnavailable(fileName);\n\n const handleFilePreviewOpen = () => {\n if (isPreviewUnavailable) return;\n props.openPreview();\n };\n\n return (\n <div className={styles.cAttachmentFileWrapper}>\n <div\n className={classNames(\n styles.cAttachmentFileDownloadWrapper,\n isPreviewUnavailable && props.classes.disabledPreview\n )}\n style={style.fileDownloadWrapper}\n onClick={handleFilePreviewOpen}\n >\n {isPreviewUnavailable ? (\n <UnavailableFileIcon className={props.classes.unavailableFileIcon} />\n ) : (\n <FileTypeIcon\n fileName={props.displayName || props.attachmentUrl}\n className={styles.cAttachmentFileDownloadWrapperFileIcon}\n size={props.small ? 25 : 50}\n />\n )}\n <div className={props.classes.titleContainer}>\n {isPreviewUnavailable && <div className={props.classes.caption}>Preview unavailable</div>}\n <div\n data-testid={`${PAGE_NAME}_name`}\n className={classNames(\n styles.cAttachmentFileDownloadWrapperFileName,\n isPreviewUnavailable && props.classes.fileName\n )}\n >\n <Typography variant=\"subtitle2\" noWrap className={props.classes.unavailableFileName}>\n {fileName}\n </Typography>\n </div>\n </div>\n <NewDocumentViewer\n fileUrl={previewUrl}\n classes={{\n root: props.classes.dialogRoot,\n paper: isNativeDetected ? props.classes.nativeDialog : props.classes.dialog,\n }}\n fileName={fileName}\n fileSize={props.attachmentSize}\n onClose={props.closePreview}\n open={props.previewIsOpen}\n />\n </div>\n <a\n download={props.displayName}\n href={downloadUrl}\n className={styles.cAttachmentFileDownloadWrapperForm}\n >\n <IconButton\n data-testid={`${PAGE_NAME}_downloadButton`}\n className={props.classes.downloadIcon}\n type=\"submit\"\n >\n <DownloadIcon size={24} className={props.classes.downloadIcon} />\n </IconButton>\n </a>\n </div>\n );\n};\n\n/* eslint-enable react/prop-types */\n\nfunction Attachment(rawProps) {\n const {\n displayName = null,\n fileName: attachmentFileName = null,\n attachmentSize = undefined,\n size = SIZES.medium.label,\n small = false,\n ...otherProps\n } = rawProps;\n const props = {\n ...otherProps,\n displayName,\n fileName: attachmentFileName,\n attachmentSize,\n size,\n small,\n };\n\n const [imageDimensions, setImageDimensions] = useState(undefined);\n const [isLightboxOpen, setIsLightboxOpen] = useState(false);\n const [isPreviewOpen, setIsPreviewOpen] = useState(false);\n\n const fileName = props.displayName || props.attachmentUrl || props.fileName;\n const isImage = getIsImage(fileName);\n const isVideo = getIsVideo(fileName);\n\n // Don't fetch download link if attachmentUrl is provided\n const downloadLink = useSignedURL(!props.attachmentUrl && props.fileName);\n const attachmentUrl = props.attachmentUrl || downloadLink;\n const preventIOSScroll = useCallback(e => e.preventDefault(), []);\n\n // NOTE: iOS WebView has a bug when background content of React Modal is scrollable\n // Source: https://github.com/reactjs/react-modal/issues/369\n const handleLightboxOpen = useCallback(() => {\n if (isNativeDetected) {\n // document.documentElement.style.overflowY = 'hidden';\n document.documentElement.addEventListener('touchmove', preventIOSScroll, {\n passive: false,\n });\n }\n }, [preventIOSScroll]);\n\n const handleLightboxClose = useCallback(() => {\n if (isNativeDetected) {\n // document.documentElement.style.overflowY = 'visible';\n document.documentElement.removeEventListener('touchmove', preventIOSScroll);\n }\n setIsLightboxOpen(false);\n }, [preventIOSScroll]);\n\n const openLightbox = useCallback(() => setIsLightboxOpen(true), []);\n const onImageLoaded = useCallback(e => {\n const { naturalWidth, naturalHeight } = e.currentTarget;\n setImageDimensions({ width: naturalWidth, height: naturalHeight });\n }, []);\n const openPreview = useCallback(() => setIsPreviewOpen(true), []);\n const closePreview = useCallback(e => {\n e.stopPropagation();\n setIsPreviewOpen(false);\n }, []);\n\n if (isImage)\n return (\n <div className={styles.cAttachment}>\n <ImageAttachment\n size={props.size}\n openLightbox={openLightbox}\n attachmentFileName={props.fileName}\n attachmentUrl={props.attachmentUrl}\n onImageLoaded={onImageLoaded}\n imageDimensions={imageDimensions}\n lightboxIsOpen={isLightboxOpen}\n handleLightboxOpen={handleLightboxOpen}\n handleLightboxClose={handleLightboxClose}\n classes={props.classes}\n />\n </div>\n );\n\n if (isVideo && ReactPlayer.canPlay(attachmentUrl))\n return (\n <div className={styles.cAttachment}>\n <ReactPlayer\n data-testid={`${PAGE_NAME}_player`}\n className={styles.cAttachmentReactPlayer}\n url={attachmentUrl}\n config={{ file: { attributes: { preload: 'metadata' } } }}\n controls\n height={props.size === SIZES.small.label ? SIZES.small.value : SIZES.medium.value}\n width={null}\n />\n </div>\n );\n\n return (\n <div className={styles.cAttachment}>\n <FileAttachment\n attachmentUrl={attachmentUrl}\n attachmentFileName={props.fileName}\n attachmentSize={props.attachmentSize}\n displayName={props.displayName}\n openPreview={openPreview}\n closePreview={closePreview}\n previewIsOpen={isPreviewOpen}\n classes={props.classes}\n small={props.small}\n />\n </div>\n );\n}\n\nAttachment.propTypes = {\n attachmentUrl: PropTypes.string.isRequired,\n attachmentSize: PropTypes.number,\n displayName: PropTypes.string,\n fileName: PropTypes.string,\n size: PropTypes.oneOf([SIZES.small.label, SIZES.medium.label]),\n classes: PropTypes.shape({}).isRequired,\n small: PropTypes.bool,\n};\n\nexport default withStyles(muiStyles)(Attachment);\n"],"names":["grey200","grey","grey400","SIZES","label","value","style","fileImage","imageIsLoaded","size","maxWidth","borderRadius","overflow","maxHeight","display","cursor","fileDownloadWrapper","padding","border","width","imagePlaceholder","position","backgroundColor","marginTop","height","ImageAttachment","props","_props$imageDimension","_props$imageDimension2","downloadLink","useSignedURL","attachmentFileName","attachmentUrl","_jsxs","_Fragment","children","onClick","openLightbox","className","styles","cAttachmentImg","_jsx","concat","src","imageDimensions","alt","onLoad","onImageLoaded","cAttachmentImgPreviwBtn","FullSizeIcon","ImageIcon","classes","imageIconRoot","htmlColor","fontSize","lightboxIsOpen","ImageViewer","onClose","handleLightboxClose","onOpen","handleLightboxOpen","FileAttachment","fileName","utils","getFileNameWithExtensionFromPath","displayName","previewUrl","downloadUrl","isPreviewUnavailable","getIsPreviewUnavailable","cAttachmentFileWrapper","classNames","cAttachmentFileDownloadWrapper","disabledPreview","openPreview","UnavailableFileIcon","unavailableFileIcon","FileTypeIcon","cAttachmentFileDownloadWrapperFileIcon","small","titleContainer","caption","cAttachmentFileDownloadWrapperFileName","Typography","variant","noWrap","unavailableFileName","NewDocumentViewer","fileUrl","root","dialogRoot","paper","isNativeDetected","nativeDialog","dialog","fileSize","attachmentSize","closePreview","open","previewIsOpen","download","href","cAttachmentFileDownloadWrapperForm","IconButton","downloadIcon","type","DownloadIcon","Attachment","rawProps","_rawProps$displayName","_rawProps$fileName","_rawProps$attachmentS","undefined","_rawProps$size","_rawProps$small","_excluded","useState","_useState2","_slicedToArray","_useState","setImageDimensions","_useState4","_useState3","isLightboxOpen","setIsLightboxOpen","_useState6","_useState5","isPreviewOpen","setIsPreviewOpen","isImage","getIsImage","isVideo","getIsVideo","preventIOSScroll","useCallback","e","preventDefault","document","documentElement","addEventListener","passive","removeEventListener","currentTarget","naturalWidth","naturalHeight","stopPropagation","cAttachment","ReactPlayer","canPlay","cAttachmentReactPlayer","url","config","file","attributes","preload","controls","propTypes","PropTypes","string","isRequired","number","oneOf","shape","bool","Attachment$1","withStyles","theme","top","left","transform","margin","whiteSpace","textOverflow","fontWeight","color","palette","primary","text3","text9","marginRight","minWidth","flexDirection"],"mappings":"04PAyBA,IAEMA,EAAUC,EAAK,KACfC,EAAUD,EAAK,KAEfE,EACG,CAAEC,MAAO,QAASC,MAAO,KAD5BF,EAEI,CAAEC,MAAO,SAAUC,MAAO,KAG9BC,EAAQ,CACZC,UAAW,SAACC,EAAeC,GAAI,MAAM,CACnCC,SAAU,OACVC,aAAc,EACdC,SAAU,SAGVC,UAAWJ,IAASN,EAAYC,MAAQD,EAAYE,MAAQF,EAAaE,MACzES,QAASN,EAAgB,UAAY,OACrCO,OAAQ,UACR,EACFC,oBAAqB,CACnBC,QAAS,qBACTC,OAA2B,oBAC3BP,aAAc,EACdD,SAAU,IACVS,MAAO,OAETC,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,SAAU+F,EAAUC,OACpBrJ,KAAMoJ,EAAUI,MAAM,CAAC9J,EAAYC,MAAOD,EAAaC,QACvD+C,QAAS0G,EAAUK,MAAM,CAAA,GAAIH,WAC7BhF,MAAO8E,EAAUM,MAGnB,IAAAC,EAAeC,GAzSG,SAAAC,GAAK,MAAK,CAC1BlH,cAAe,CACb/B,SAAU,WACVkJ,IAAK,MACLC,KAAM,MACNC,UAAW,yBAEb3E,OAAQ,CACN3E,MAAO,MACPK,OAAQ,MACRd,SAAU,OACVW,SAAU,YAEZwE,aAAc,CACZ1E,MAAO,OACPK,OAAQ,OACRd,SAAU,OACVG,UAAW,OACX6J,OAAQ,GAEVhF,WAAY,CAEVpE,gBAAiB,uBAEnBwC,SAAU,CACRlD,SAAU,SACV+J,WAAY,SACZC,aAAc,WACdC,WAAY,KAEdrE,aAAc,CACZsE,MAAOR,EAAMS,QAAQC,QAAQC,OAE/BxG,gBAAiB,CACfnD,gBAAiBgJ,EAAMS,QAAQC,QAAQE,OAEzCtG,oBAAqB,CACnBuG,YAAa,GACbC,SAAU,IAEZpG,eAAgB,CACdlE,QAAS,OACTuK,cAAe,SACflK,MAAO,QAET8D,QAAS,CACP3B,SAAU,GACVuH,WAAY,IACZ1J,MAAO,eAETmE,oBAAqB,CACnBhC,SAAU,GACVuH,WAAY,KAEf,GAmPcR,CAAsB1D"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Attachment/index.js"],"sourcesContent":["import { useCallback, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport ReactPlayer from 'react-player';\nimport classNames from 'classnames';\nimport { withStyles } from '@material-ui/core/styles';\nimport { Typography } from '@material-ui/core';\nimport ImageIcon from '@material-ui/icons/Image';\nimport FullSizeIcon from '@material-ui/icons/Fullscreen';\nimport grey from '@material-ui/core/colors/grey';\n\nimport { NewDocumentViewer } from '../NewDocumentViewer';\nimport { UnavailableFileIcon } from '../NewDocumentViewer/icons/UnavailableFileIcon';\nimport { ImageViewer } from '../../componentsV2/ImageViewer';\n\nimport styles from './styles.css';\n\nimport FileTypeIcon from '~components/FileTypeIcon';\nimport IconButton from '~components/IconButton';\nimport { isNativeDetected } from '~/utils/mobileDetect';\nimport { getIsImage, getIsVideo } from '~/utils/fileExtension';\nimport { getIsPreviewUnavailable } from '~/utils/filePreview';\nimport { DownloadIcon } from '~/icons';\nimport { useSignedURL } from '~/effects';\nimport utils from '~utils/main';\n\nconst PAGE_NAME = 'Attachment';\n\nconst grey200 = grey[200];\nconst grey400 = grey[400];\n\nconst SIZES = {\n small: { label: 'small', value: 135 },\n medium: { label: 'medium', value: 300 },\n};\n\nconst style = {\n fileImage: (imageIsLoaded, size) => ({\n maxWidth: '100%',\n borderRadius: 4,\n overflow: 'hidden',\n // NOTE: Makes one-line comment with image fits into comments container. Equals to\n // imagePlaceholder height\n maxHeight: size === SIZES.small.label ? SIZES.small.value : SIZES.medium.value,\n display: imageIsLoaded ? 'initial' : 'none',\n cursor: 'pointer',\n }),\n fileDownloadWrapper: {\n padding: '10px 10px 10px 5px',\n border: `1px solid #616161`,\n borderRadius: 3,\n maxWidth: 500, // NOTE: Corresponds to react-player max width\n width: '75%',\n },\n imagePlaceholder: {\n position: 'relative',\n backgroundColor: grey200,\n borderRadius: 3,\n marginTop: 10,\n height: 135,\n width: 135,\n },\n};\n\nconst muiStyles = theme => ({\n imageIconRoot: {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n },\n dialog: {\n width: '95%',\n height: '95%',\n maxWidth: '100%',\n position: 'relative',\n },\n nativeDialog: {\n width: '100%',\n height: '100%',\n maxWidth: '100%',\n maxHeight: '100%',\n margin: 0,\n },\n dialogRoot: {\n // NOTE: Make background color similar to lightbox\n backgroundColor: 'rgba(0, 0, 0, 0.85)',\n },\n fileName: {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n fontWeight: 400,\n },\n downloadIcon: {\n color: theme.palette.primary.text3,\n },\n disabledPreview: {\n backgroundColor: theme.palette.primary.text9,\n },\n unavailableFileIcon: {\n marginRight: 12,\n minWidth: 32,\n },\n titleContainer: {\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n },\n caption: {\n fontSize: 12,\n fontWeight: 400,\n width: 'fit-content',\n },\n unavailableFileName: {\n fontSize: 12,\n fontWeight: 400,\n },\n});\n\n/* eslint-disable react/prop-types */\nconst ImageAttachment = props => {\n const downloadLink = useSignedURL(props.attachmentFileName) || props.attachmentUrl;\n\n return (\n <>\n <div onClick={props.openLightbox} className={styles.cAttachmentImg}>\n <img\n data-testid={`${PAGE_NAME}_image`}\n src={downloadLink}\n style={style.fileImage(!!props.imageDimensions, props.size)}\n alt=\"Attachment\"\n onLoad={props.onImageLoaded}\n />\n <div data-testid={`${PAGE_NAME}_button`} className={styles.cAttachmentImgPreviwBtn}>\n <FullSizeIcon />\n </div>\n </div>\n\n {!props.imageDimensions && (\n <div style={style.imagePlaceholder}>\n <ImageIcon\n data-testid={`${PAGE_NAME}_placeholder`}\n className={props.classes.imageIconRoot}\n htmlColor={grey400}\n fontSize=\"large\"\n />\n </div>\n )}\n\n {props.lightboxIsOpen && (\n <ImageViewer\n src={downloadLink}\n onClose={props.handleLightboxClose}\n onOpen={props.handleLightboxOpen}\n width={props.imageDimensions?.width}\n height={props.imageDimensions?.height}\n />\n )}\n </>\n );\n};\n\nconst FileAttachment = props => {\n const fileName = utils.getFileNameWithExtensionFromPath(props.displayName || props.attachmentUrl);\n\n const previewUrl = useSignedURL(props.attachmentFileName, 'inline');\n const downloadUrl = useSignedURL(props.attachmentFileName, 'attachment');\n\n const isPreviewUnavailable = getIsPreviewUnavailable(fileName);\n\n const handleFilePreviewOpen = () => {\n if (isPreviewUnavailable) return;\n props.openPreview();\n };\n\n return (\n <div className={styles.cAttachmentFileWrapper}>\n <div\n className={classNames(\n styles.cAttachmentFileDownloadWrapper,\n isPreviewUnavailable && props.classes.disabledPreview\n )}\n style={style.fileDownloadWrapper}\n onClick={handleFilePreviewOpen}\n >\n {isPreviewUnavailable ? (\n <UnavailableFileIcon className={props.classes.unavailableFileIcon} />\n ) : (\n <FileTypeIcon\n fileName={props.displayName || props.attachmentUrl}\n className={styles.cAttachmentFileDownloadWrapperFileIcon}\n size={props.small ? 25 : 50}\n />\n )}\n <div className={props.classes.titleContainer}>\n {isPreviewUnavailable && <div className={props.classes.caption}>Preview unavailable</div>}\n <div\n data-testid={`${PAGE_NAME}_name`}\n className={classNames(\n styles.cAttachmentFileDownloadWrapperFileName,\n isPreviewUnavailable && props.classes.fileName\n )}\n >\n <Typography variant=\"subtitle2\" noWrap className={props.classes.unavailableFileName}>\n {fileName}\n </Typography>\n </div>\n </div>\n <NewDocumentViewer\n fileUrl={previewUrl}\n classes={{\n root: props.classes.dialogRoot,\n paper: isNativeDetected ? props.classes.nativeDialog : props.classes.dialog,\n }}\n fileName={fileName}\n fileSize={props.attachmentSize}\n onClose={props.closePreview}\n open={props.previewIsOpen}\n />\n </div>\n <a\n download={props.displayName}\n href={downloadUrl}\n className={styles.cAttachmentFileDownloadWrapperForm}\n >\n <IconButton\n data-testid={`${PAGE_NAME}_downloadButton`}\n className={props.classes.downloadIcon}\n type=\"submit\"\n >\n <DownloadIcon size={24} className={props.classes.downloadIcon} />\n </IconButton>\n </a>\n </div>\n );\n};\n\n/* eslint-enable react/prop-types */\n\nfunction Attachment(rawProps) {\n const {\n displayName = null,\n fileName: attachmentFileName = null,\n attachmentSize = undefined,\n size = SIZES.medium.label,\n small = false,\n ...otherProps\n } = rawProps;\n const props = {\n ...otherProps,\n displayName,\n fileName: attachmentFileName,\n attachmentSize,\n size,\n small,\n };\n\n const [imageDimensions, setImageDimensions] = useState(undefined);\n const [isLightboxOpen, setIsLightboxOpen] = useState(false);\n const [isPreviewOpen, setIsPreviewOpen] = useState(false);\n\n const fileName = props.displayName || props.attachmentUrl || props.fileName;\n const isImage = getIsImage(fileName);\n const isVideo = getIsVideo(fileName);\n\n // Don't fetch download link if attachmentUrl is provided\n const downloadLink = useSignedURL(!props.attachmentUrl && props.fileName);\n const attachmentUrl = props.attachmentUrl || downloadLink;\n const preventIOSScroll = useCallback(e => e.preventDefault(), []);\n\n // NOTE: iOS WebView has a bug when background content of React Modal is scrollable\n // Source: https://github.com/reactjs/react-modal/issues/369\n const handleLightboxOpen = useCallback(() => {\n if (isNativeDetected) {\n // document.documentElement.style.overflowY = 'hidden';\n document.documentElement.addEventListener('touchmove', preventIOSScroll, {\n passive: false,\n });\n }\n }, [preventIOSScroll]);\n\n const handleLightboxClose = useCallback(() => {\n if (isNativeDetected) {\n // document.documentElement.style.overflowY = 'visible';\n document.documentElement.removeEventListener('touchmove', preventIOSScroll);\n }\n setIsLightboxOpen(false);\n }, [preventIOSScroll]);\n\n const openLightbox = useCallback(() => setIsLightboxOpen(true), []);\n const onImageLoaded = useCallback(e => {\n const { naturalWidth, naturalHeight } = e.currentTarget;\n setImageDimensions({ width: naturalWidth, height: naturalHeight });\n }, []);\n const openPreview = useCallback(() => setIsPreviewOpen(true), []);\n const closePreview = useCallback(e => {\n e.stopPropagation();\n setIsPreviewOpen(false);\n }, []);\n\n if (isImage)\n return (\n <div className={styles.cAttachment}>\n <ImageAttachment\n size={props.size}\n openLightbox={openLightbox}\n attachmentFileName={props.fileName}\n attachmentUrl={props.attachmentUrl}\n onImageLoaded={onImageLoaded}\n imageDimensions={imageDimensions}\n lightboxIsOpen={isLightboxOpen}\n handleLightboxOpen={handleLightboxOpen}\n handleLightboxClose={handleLightboxClose}\n classes={props.classes}\n />\n </div>\n );\n\n if (isVideo && ReactPlayer.canPlay(attachmentUrl))\n return (\n <div className={styles.cAttachment}>\n <ReactPlayer\n data-testid={`${PAGE_NAME}_player`}\n className={styles.cAttachmentReactPlayer}\n url={attachmentUrl}\n config={{ file: { attributes: { preload: 'metadata' } } }}\n controls\n height={props.size === SIZES.small.label ? SIZES.small.value : SIZES.medium.value}\n width={null}\n />\n </div>\n );\n\n return (\n <div className={styles.cAttachment}>\n <FileAttachment\n attachmentUrl={attachmentUrl}\n attachmentFileName={props.fileName}\n attachmentSize={props.attachmentSize}\n displayName={props.displayName}\n openPreview={openPreview}\n closePreview={closePreview}\n previewIsOpen={isPreviewOpen}\n classes={props.classes}\n small={props.small}\n />\n </div>\n );\n}\n\nAttachment.propTypes = {\n attachmentUrl: PropTypes.string.isRequired,\n attachmentSize: PropTypes.number,\n displayName: PropTypes.string,\n fileName: PropTypes.string,\n size: PropTypes.oneOf([SIZES.small.label, SIZES.medium.label]),\n classes: PropTypes.shape({}).isRequired,\n small: PropTypes.bool,\n};\n\nexport default withStyles(muiStyles)(Attachment);\n"],"names":["grey200","grey","grey400","SIZES","label","value","style","fileImage","imageIsLoaded","size","maxWidth","borderRadius","overflow","maxHeight","display","cursor","fileDownloadWrapper","padding","border","width","imagePlaceholder","position","backgroundColor","marginTop","height","ImageAttachment","props","_props$imageDimension","_props$imageDimension2","downloadLink","useSignedURL","attachmentFileName","attachmentUrl","_jsxs","_Fragment","children","onClick","openLightbox","className","styles","cAttachmentImg","_jsx","concat","src","imageDimensions","alt","onLoad","onImageLoaded","cAttachmentImgPreviwBtn","FullSizeIcon","ImageIcon","classes","imageIconRoot","htmlColor","fontSize","lightboxIsOpen","ImageViewer","onClose","handleLightboxClose","onOpen","handleLightboxOpen","FileAttachment","fileName","utils","getFileNameWithExtensionFromPath","displayName","previewUrl","downloadUrl","isPreviewUnavailable","getIsPreviewUnavailable","cAttachmentFileWrapper","classNames","cAttachmentFileDownloadWrapper","disabledPreview","openPreview","UnavailableFileIcon","unavailableFileIcon","FileTypeIcon","cAttachmentFileDownloadWrapperFileIcon","small","titleContainer","caption","cAttachmentFileDownloadWrapperFileName","Typography","variant","noWrap","unavailableFileName","NewDocumentViewer","fileUrl","root","dialogRoot","paper","isNativeDetected","nativeDialog","dialog","fileSize","attachmentSize","closePreview","open","previewIsOpen","download","href","cAttachmentFileDownloadWrapperForm","IconButton","downloadIcon","type","DownloadIcon","Attachment","rawProps","_rawProps$displayName","_rawProps$fileName","_rawProps$attachmentS","undefined","_rawProps$size","_rawProps$small","_excluded","useState","_useState2","_slicedToArray","_useState","setImageDimensions","_useState4","_useState3","isLightboxOpen","setIsLightboxOpen","_useState6","_useState5","isPreviewOpen","setIsPreviewOpen","isImage","getIsImage","isVideo","getIsVideo","preventIOSScroll","useCallback","e","preventDefault","document","documentElement","addEventListener","passive","removeEventListener","currentTarget","naturalWidth","naturalHeight","stopPropagation","cAttachment","ReactPlayer","canPlay","cAttachmentReactPlayer","url","config","file","attributes","preload","controls","propTypes","PropTypes","string","isRequired","number","oneOf","shape","bool","Attachment$1","withStyles","theme","top","left","transform","margin","whiteSpace","textOverflow","fontWeight","color","palette","primary","text3","text9","marginRight","minWidth","flexDirection"],"mappings":"+xPAyBA,IAEMA,EAAUC,EAAK,KACfC,EAAUD,EAAK,KAEfE,EACG,CAAEC,MAAO,QAASC,MAAO,KAD5BF,EAEI,CAAEC,MAAO,SAAUC,MAAO,KAG9BC,EAAQ,CACZC,UAAW,SAACC,EAAeC,GAAI,MAAM,CACnCC,SAAU,OACVC,aAAc,EACdC,SAAU,SAGVC,UAAWJ,IAASN,EAAYC,MAAQD,EAAYE,MAAQF,EAAaE,MACzES,QAASN,EAAgB,UAAY,OACrCO,OAAQ,UACR,EACFC,oBAAqB,CACnBC,QAAS,qBACTC,OAA2B,oBAC3BP,aAAc,EACdD,SAAU,IACVS,MAAO,OAETC,iBAAkB,CAChBC,SAAU,WACVC,gBAAiBtB,EACjBW,aAAc,EACdY,UAAW,GACXC,OAAQ,IACRL,MAAO,MA6DLM,EAAkB,SAAAC,GAAS,IAAAC,EAAAC,EACzBC,EAAeC,EAAaJ,EAAMK,qBAAuBL,EAAMM,cAErE,OACEC,EAAAC,EAAA,CAAAC,SACE,CAAAF,EAAA,MAAA,CAAKG,QAASV,EAAMW,aAAcC,UAAWC,EAAOC,eAAeL,SACjE,CAAAM,EAAA,MAAA,CACE,cAAA,GAAAC,OAtGQ,aAsG0B,UAClCC,IAAKd,EAC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