@corva/ui 3.45.0 → 3.45.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/cjs-bundle/components/OffsetWellPickerV5/OffsetWellPickerV5.js +1 -1
  2. package/cjs-bundle/components/OffsetWellPickerV5/OffsetWellPickerV5.js.map +1 -1
  3. package/cjs-bundle/components/OffsetWellPickerV5/api/shared/fetchers/getAllAssets.js +2 -0
  4. package/cjs-bundle/components/OffsetWellPickerV5/api/shared/fetchers/getAllAssets.js.map +1 -0
  5. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/AppHeader.js +1 -1
  6. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/AppHeader.js.map +1 -1
  7. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/AppHeader.module.css.js +1 -1
  8. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/LoadAllWellsToggle.js +2 -0
  9. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/LoadAllWellsToggle.js.map +1 -0
  10. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/Filter.js +1 -1
  11. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/Filter.js.map +1 -1
  12. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/OffsetWellMap.js +1 -1
  13. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHints.js +1 -1
  14. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/constants.js +1 -1
  15. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useBoxSelection.js +1 -1
  16. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useWellMarkers.js +1 -1
  17. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/utils/getClusterColorExpression.js +2 -0
  18. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/utils/getClusterColorExpression.js.map +1 -0
  19. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/WellsMap.js +1 -1
  20. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.js +1 -1
  21. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
  22. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/OffsetWellsTable.js.map +1 -1
  23. package/cjs-bundle/components/OffsetWellPickerV5/effects/useAllWells/useAllWells.js +2 -0
  24. package/cjs-bundle/components/OffsetWellPickerV5/effects/useAllWells/useAllWells.js.map +1 -0
  25. package/cjs-bundle/components/OffsetWellPickerV5/effects/useAllWellsCache/constants.js +2 -0
  26. package/cjs-bundle/components/OffsetWellPickerV5/effects/useAllWellsCache/constants.js.map +1 -0
  27. package/cjs-bundle/components/OffsetWellPickerV5/effects/useAllWellsCache/useAllWellsCache.js +2 -0
  28. package/cjs-bundle/components/OffsetWellPickerV5/effects/useAllWellsCache/useAllWellsCache.js.map +1 -0
  29. package/cjs-bundle/components/OffsetWellPickerV5/effects/useCompanies.js +1 -1
  30. package/cjs-bundle/components/OffsetWellPickerV5/effects/useCompanies.js.map +1 -1
  31. package/cjs-bundle/components/OffsetWellPickerV5/effects/useLoadAllWellsCompanySafeguard.js +2 -0
  32. package/cjs-bundle/components/OffsetWellPickerV5/effects/useLoadAllWellsCompanySafeguard.js.map +1 -0
  33. package/cjs-bundle/components/OffsetWellPickerV5/effects/useViewportWells/fetchTile.js +1 -1
  34. package/cjs-bundle/components/OffsetWellPickerV5/effects/useViewportWells/processQueue.js +1 -1
  35. package/cjs-bundle/components/OffsetWellPickerV5/effects/useViewportWells/processQueue.js.map +1 -1
  36. package/cjs-bundle/components/OffsetWellPickerV5/effects/useViewportWells/useViewportWells.js +1 -1
  37. package/cjs-bundle/components/OffsetWellPickerV5/stores/filter-store/utils/normalizeFilters.js +1 -1
  38. package/cjs-bundle/components/OffsetWellPickerV5/stores/picker-props-store/PickerPropsStoreProvider.js +1 -1
  39. package/cjs-bundle/components/OffsetWellPickerV5/stores/picker-props-store/createPickerPropsStore.js +1 -1
  40. package/cjs-bundle/components/OffsetWellPickerV5/stores/picker-props-store/utils/getEffectiveIsLoadAllWells.js +2 -0
  41. package/cjs-bundle/components/OffsetWellPickerV5/stores/picker-props-store/utils/getEffectiveIsLoadAllWells.js.map +1 -0
  42. package/components/OffsetWellPickerV5/OffsetWellPickerV5.d.ts.map +1 -1
  43. package/components/OffsetWellPickerV5/OffsetWellPickerV5.js +1 -1
  44. package/components/OffsetWellPickerV5/OffsetWellPickerV5.js.map +1 -1
  45. package/components/OffsetWellPickerV5/OffsetWellPickerV5.types.d.ts +3 -0
  46. package/components/OffsetWellPickerV5/OffsetWellPickerV5.types.d.ts.map +1 -1
  47. package/components/OffsetWellPickerV5/api/index.d.ts +2 -0
  48. package/components/OffsetWellPickerV5/api/index.d.ts.map +1 -1
  49. package/components/OffsetWellPickerV5/api/shared/fetchers/getAllAssets.d.ts +16 -0
  50. package/components/OffsetWellPickerV5/api/shared/fetchers/getAllAssets.d.ts.map +1 -0
  51. package/components/OffsetWellPickerV5/api/shared/fetchers/getAllAssets.js +2 -0
  52. package/components/OffsetWellPickerV5/api/shared/fetchers/getAllAssets.js.map +1 -0
  53. package/components/OffsetWellPickerV5/components/AppHeader/AppHeader.d.ts +15 -23
  54. package/components/OffsetWellPickerV5/components/AppHeader/AppHeader.d.ts.map +1 -1
  55. package/components/OffsetWellPickerV5/components/AppHeader/AppHeader.js +1 -1
  56. package/components/OffsetWellPickerV5/components/AppHeader/AppHeader.js.map +1 -1
  57. package/components/OffsetWellPickerV5/components/AppHeader/AppHeader.module.css.js +1 -1
  58. package/components/OffsetWellPickerV5/components/AppHeader/LoadAllWellsToggle.d.ts +6 -0
  59. package/components/OffsetWellPickerV5/components/AppHeader/LoadAllWellsToggle.d.ts.map +1 -0
  60. package/components/OffsetWellPickerV5/components/AppHeader/LoadAllWellsToggle.js +2 -0
  61. package/components/OffsetWellPickerV5/components/AppHeader/LoadAllWellsToggle.js.map +1 -0
  62. package/components/OffsetWellPickerV5/components/AppHeader/index.d.ts +1 -1
  63. package/components/OffsetWellPickerV5/components/AppHeader/index.d.ts.map +1 -1
  64. package/components/OffsetWellPickerV5/components/Filter/Filter.d.ts +2 -1
  65. package/components/OffsetWellPickerV5/components/Filter/Filter.d.ts.map +1 -1
  66. package/components/OffsetWellPickerV5/components/Filter/Filter.js +1 -1
  67. package/components/OffsetWellPickerV5/components/Filter/Filter.js.map +1 -1
  68. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/OffsetWellMap.d.ts +2 -0
  69. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/OffsetWellMap.d.ts.map +1 -1
  70. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/OffsetWellMap.js +1 -1
  71. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHints.d.ts +1 -0
  72. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHints.d.ts.map +1 -1
  73. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHints.js +1 -1
  74. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/constants.d.ts +43 -2
  75. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/constants.d.ts.map +1 -1
  76. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/constants.js +1 -1
  77. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useBoxSelection.d.ts +3 -1
  78. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useBoxSelection.d.ts.map +1 -1
  79. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useBoxSelection.js +1 -1
  80. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useWellMarkers.d.ts +5 -0
  81. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useWellMarkers.d.ts.map +1 -1
  82. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useWellMarkers.js +1 -1
  83. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/utils/getClusterColorExpression.d.ts +12 -0
  84. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/utils/getClusterColorExpression.d.ts.map +1 -0
  85. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/utils/getClusterColorExpression.js +2 -0
  86. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/utils/getClusterColorExpression.js.map +1 -0
  87. package/components/OffsetWellPickerV5/components/Map/WellsMap.d.ts +2 -0
  88. package/components/OffsetWellPickerV5/components/Map/WellsMap.d.ts.map +1 -1
  89. package/components/OffsetWellPickerV5/components/Map/WellsMap.js +1 -1
  90. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.js +1 -1
  91. package/components/OffsetWellPickerV5/components/OffsetWellsTable/OffsetWellsTable.d.ts.map +1 -1
  92. package/components/OffsetWellPickerV5/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
  93. package/components/OffsetWellPickerV5/components/OffsetWellsTable/OffsetWellsTable.js.map +1 -1
  94. package/components/OffsetWellPickerV5/effects/index.d.ts +1 -0
  95. package/components/OffsetWellPickerV5/effects/index.d.ts.map +1 -1
  96. package/components/OffsetWellPickerV5/effects/useAllWells/index.d.ts +2 -0
  97. package/components/OffsetWellPickerV5/effects/useAllWells/index.d.ts.map +1 -0
  98. package/components/OffsetWellPickerV5/effects/useAllWells/useAllWells.d.ts +2 -0
  99. package/components/OffsetWellPickerV5/effects/useAllWells/useAllWells.d.ts.map +1 -0
  100. package/components/OffsetWellPickerV5/effects/useAllWells/useAllWells.js +2 -0
  101. package/components/OffsetWellPickerV5/effects/useAllWells/useAllWells.js.map +1 -0
  102. package/components/OffsetWellPickerV5/effects/useAllWellsCache/constants.d.ts +7 -0
  103. package/components/OffsetWellPickerV5/effects/useAllWellsCache/constants.d.ts.map +1 -0
  104. package/components/OffsetWellPickerV5/effects/useAllWellsCache/constants.js +2 -0
  105. package/components/OffsetWellPickerV5/effects/useAllWellsCache/constants.js.map +1 -0
  106. package/components/OffsetWellPickerV5/effects/useAllWellsCache/index.d.ts +2 -0
  107. package/components/OffsetWellPickerV5/effects/useAllWellsCache/index.d.ts.map +1 -0
  108. package/components/OffsetWellPickerV5/effects/useAllWellsCache/types.d.ts +13 -0
  109. package/components/OffsetWellPickerV5/effects/useAllWellsCache/types.d.ts.map +1 -0
  110. package/components/OffsetWellPickerV5/effects/useAllWellsCache/useAllWellsCache.d.ts +33 -0
  111. package/components/OffsetWellPickerV5/effects/useAllWellsCache/useAllWellsCache.d.ts.map +1 -0
  112. package/components/OffsetWellPickerV5/effects/useAllWellsCache/useAllWellsCache.js +2 -0
  113. package/components/OffsetWellPickerV5/effects/useAllWellsCache/useAllWellsCache.js.map +1 -0
  114. package/components/OffsetWellPickerV5/effects/useCompanies.d.ts +1 -0
  115. package/components/OffsetWellPickerV5/effects/useCompanies.d.ts.map +1 -1
  116. package/components/OffsetWellPickerV5/effects/useCompanies.js +1 -1
  117. package/components/OffsetWellPickerV5/effects/useCompanies.js.map +1 -1
  118. package/components/OffsetWellPickerV5/effects/useLoadAllWellsCompanySafeguard.d.ts +26 -0
  119. package/components/OffsetWellPickerV5/effects/useLoadAllWellsCompanySafeguard.d.ts.map +1 -0
  120. package/components/OffsetWellPickerV5/effects/useLoadAllWellsCompanySafeguard.js +2 -0
  121. package/components/OffsetWellPickerV5/effects/useLoadAllWellsCompanySafeguard.js.map +1 -0
  122. package/components/OffsetWellPickerV5/effects/useViewportWells/fetchTile.d.ts +1 -11
  123. package/components/OffsetWellPickerV5/effects/useViewportWells/fetchTile.d.ts.map +1 -1
  124. package/components/OffsetWellPickerV5/effects/useViewportWells/fetchTile.js +1 -1
  125. package/components/OffsetWellPickerV5/effects/useViewportWells/processQueue.d.ts +3 -13
  126. package/components/OffsetWellPickerV5/effects/useViewportWells/processQueue.d.ts.map +1 -1
  127. package/components/OffsetWellPickerV5/effects/useViewportWells/processQueue.js +1 -1
  128. package/components/OffsetWellPickerV5/effects/useViewportWells/processQueue.js.map +1 -1
  129. package/components/OffsetWellPickerV5/effects/useViewportWells/types.d.ts +1 -4
  130. package/components/OffsetWellPickerV5/effects/useViewportWells/types.d.ts.map +1 -1
  131. package/components/OffsetWellPickerV5/effects/useViewportWells/useViewportWells.d.ts +1 -5
  132. package/components/OffsetWellPickerV5/effects/useViewportWells/useViewportWells.d.ts.map +1 -1
  133. package/components/OffsetWellPickerV5/effects/useViewportWells/useViewportWells.js +1 -1
  134. package/components/OffsetWellPickerV5/stores/filter-store/types.d.ts +1 -0
  135. package/components/OffsetWellPickerV5/stores/filter-store/types.d.ts.map +1 -1
  136. package/components/OffsetWellPickerV5/stores/filter-store/utils/normalizeFilters.d.ts +1 -1
  137. package/components/OffsetWellPickerV5/stores/filter-store/utils/normalizeFilters.d.ts.map +1 -1
  138. package/components/OffsetWellPickerV5/stores/filter-store/utils/normalizeFilters.js +1 -1
  139. package/components/OffsetWellPickerV5/stores/filter-store/utils/normalizeFilters.js.map +1 -1
  140. package/components/OffsetWellPickerV5/stores/picker-props-store/PickerPropsStoreProvider.d.ts.map +1 -1
  141. package/components/OffsetWellPickerV5/stores/picker-props-store/PickerPropsStoreProvider.js +1 -1
  142. package/components/OffsetWellPickerV5/stores/picker-props-store/createPickerPropsStore.d.ts +14 -0
  143. package/components/OffsetWellPickerV5/stores/picker-props-store/createPickerPropsStore.d.ts.map +1 -1
  144. package/components/OffsetWellPickerV5/stores/picker-props-store/createPickerPropsStore.js +1 -1
  145. package/components/OffsetWellPickerV5/stores/picker-props-store/utils/getEffectiveIsLoadAllWells.d.ts +8 -0
  146. package/components/OffsetWellPickerV5/stores/picker-props-store/utils/getEffectiveIsLoadAllWells.d.ts.map +1 -0
  147. package/components/OffsetWellPickerV5/stores/picker-props-store/utils/getEffectiveIsLoadAllWells.js +2 -0
  148. package/components/OffsetWellPickerV5/stores/picker-props-store/utils/getEffectiveIsLoadAllWells.js.map +1 -0
  149. package/mcp-server/index.mjs +14 -0
  150. package/mcp-server/index.mjs.map +1 -1
  151. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- import{__assign as e}from'./../../../../../ext-esm/tslib/tslib.es6.js';import{jsxs as o,jsx as i}from"react/jsx-runtime";import{forwardRef as t,useRef as r,useState as s,useCallback as l,useMemo as n,useImperativeHandle as a}from"react";import c,{Source as d,Layer as u,Popup as f}from"@vis.gl/react-mapbox";import p from"classnames";import m from"@turf/bbox";import"mapbox-gl/dist/mapbox-gl.css";import{usePickerPropsStore as g}from"../../../stores/picker-props-store/usePickerPropsStore.js";import{useTileLoading as h}from"../../../effects/useTileLoading.js";import{useViewStore as v}from"../../../stores/view-store/useViewStore.js";import{useFilterStore as S}from"../../../stores/filter-store/useFilterStore.js";import"../../../stores/selection-tool-store/SelectionToolStoreContext.js";import"../../../stores/selection-tool-store/SelectionToolStoreProvider.js";import"zustand";import{useSelectionToolStore as y}from"../../../stores/selection-tool-store/useSelectionToolStore.js";import{DEFAULT_RADIUS_MILES as j}from"../../../constants.js";import{enforceZoomLimitIfNeeded as w}from"../../../utils/tile-math.js";import{calculatePolygonCentroid as W}from"../../../utils/calculatePolygonCentroid.js";import{getStatusColor as b}from"./utils/getStatusColor.js";import{getGhostZoneBounds as C}from"./utils/getGhostZoneBounds.js";import{RadiusInput as I}from"./components/RadiusInput/RadiusInput.js";import{MapControls as M}from"./components/MapControls/MapControls.js";import{GhostSelectionZone as k}from"./components/GhostSelectionZone/GhostSelectionZone.js";import{WellTooltip as L}from"./components/WellTooltip/WellTooltip.js";import{SubjectWellMarker as D}from"./components/SubjectWellMarker/SubjectWellMarker.js";import{LayerSwitcher as P}from"./components/LayerSwitcher/LayerSwitcher.js";import{DrawControl as R}from"./components/DrawControl/DrawControl.js";import{ScaleIndicator as O}from"./components/ScaleIndicator/ScaleIndicator.js";import{BoxSelectionOverlay as H}from"./components/BoxSelectionOverlay/BoxSelectionOverlay.js";import{MapHints as x}from"./components/MapHints/MapHints.js";import{ConfirmationPopup as T}from"./components/ConfirmationPopup/ConfirmationPopup.js";import{useMapViewState as Z}from"./hooks/useMapViewState.js";import{useRadiusCircle as A}from"./hooks/useRadiusCircle.js";import{useMapBounds as N}from"./hooks/useMapBounds.js";import{useWellMarkers as B}from"./hooks/useWellMarkers.js";import{useTooltip as E}from"./hooks/useTooltip.js";import{useTooltipAnchor as G,TOOLTIP_DIMENSIONS as V}from"./hooks/useTooltipAnchor.js";import{useLassoSelection as z}from"./hooks/useLassoSelection.js";import{useLassoKeyboardHandlers as F}from"./hooks/useLassoKeyboardHandlers.js";import{useBoxSelection as J}from"./hooks/useBoxSelection.js";import{useElementSize as K}from"./hooks/useElementSize.js";import{useRadiusDrawing as U}from"./hooks/useRadiusDrawing.js";import{useRadiusKeyboardHandlers as _}from"./hooks/useRadiusKeyboardHandlers.js";import{useSyncViewportBounds as q}from"./hooks/useSyncViewportBounds.js";import{useLoadingTilesGeoJSON as Q}from"./hooks/useLoadingTilesGeoJSON.js";import{useConfirmationPopupPosition as X}from"./hooks/useConfirmationPopupPosition.js";import{useZoomLimitState as Y}from"./hooks/useZoomLimitState.js";import{useSelectionToast as $}from"./hooks/useSelectionToast.js";import{toCoordinates as ee}from"./utils/toCoordinates.js";import{MapConfig as oe}from"./constants.js";import{SelectionToast as ie}from"./components/SelectionToast/SelectionToast.js";import te from"./OffsetWellMap.module.css.js";import{LoaderLinear as re}from"../../../../../componentsV2/LoaderLinear/LoaderLinear.js";import{MAP_BOX_ACCESS_TOKEN as se}from"../../../../../config/mapbox/index.js";var le=t((function(t,le){var ne,ae,ce,de,ue,fe=t.subjectWell,pe=void 0===fe?null:fe,me=t.wells,ge=t.offsetWellIds,he=t.handleChangeOffsetWell,ve=t.onBatchSelectWells,Se=t.activeWellId,ye=t.isClickable,je=void 0===ye||ye,we=t.selectionZone,We=t.onSelectionZoneConfirm,be=t.classes,Ce=void 0===be?{}:be,Ie=g((function(e){return e.isViewOnly})),Me=null!==(ne=S((function(e){var o;return null===(o=e.filters)||void 0===o?void 0:o.radius})))&&void 0!==ne?ne:j,ke=null!==(ae=S((function(e){var o;return null===(o=e.filters)||void 0===o?void 0:o.selectionMode})))&&void 0!==ae?ae:"radius",Le=S((function(e){var o;return null===(o=e.filters)||void 0===o?void 0:o.polygonCoords})),De=S((function(e){return e.setSelectionMode})),Pe=S((function(e){return e.setPolygonCoords})),Re=v((function(e){return e.mapStyle})),Oe=v((function(e){return e.setMapStyle})),He=y((function(e){return e.mode})),xe=y((function(e){return e.setMode})),Te="radius"===He,Ze="lasso"===ke,Ae=Le&&Le.length>=3,Ne="satellite"===Re,Be=h(),Ee=Y(),Ge=r(null),Ve=r(null),ze=s(!1),Fe=ze[0],Je=ze[1],Ke=s(!1),Ue=Ke[0],_e=Ke[1],qe=s(!1),Qe=qe[0],Xe=qe[1],Ye=$(),$e=Ye.toast,eo=Ye.showSelectionResult,oo=l((function(){_e(!0)}),[]);q(Ge,Ue);var io=n((function(){var e,o=null===(e=null==pe?void 0:pe.topHole)||void 0===e?void 0:e.coordinates;return o?ee(o):null}),[pe]),to=Z(Ge,io),ro=to.viewState,so=to.distance,lo=to.handleMove,no=to.handleZoomIn,ao=to.handleZoomOut,co=to.canZoomIn,uo=to.canZoomOut,fo=r(null),po=(null==pe?void 0:pe.id)===Se,mo=l((function(e){ve(e.map((function(e){return{id:e}})),(function(e){eo(e),e.added>0&&fo.current&&(null==We||We(fo.current)),fo.current=null}))}),[ve,eo,We]),go=null!==(ce=null==pe?void 0:pe.id)&&void 0!==ce?ce:null,ho=U({mapRef:Ge,isActive:Te,wells:me,onWellsSelected:mo,subjectWellId:go}),vo=ho.radiusState,So=ho.radiusMiles,yo=ho.setRadiusMiles,jo=ho.wellsInRadiusCount,wo=ho.previewCircle,Wo=ho.isHoveringEdge,bo=ho.isHoveringInside,Co=ho.isDragging,Io=ho.handlers,Mo=ho.confirm,ko=ho.cancel,Lo=Te&&("drawing"===vo.phase||"confirming"===vo.phase),Do=l((function(){Ze?((!Le||Le.length<3)&&Pe(void 0),De("radius")):(Te&&xe("none"),De("lasso"))}),[Ze,Te,Le,De,Pe,xe]),Po=l((function(){Te?xe("none"):(Ze&&De("radius"),xe("radius"))}),[Te,Ze,xe,De]),Ro=l((function(e){Pe(e)}),[Pe]),Oo=l((function(e){ve(e.map((function(e){return{id:e}})),(function(e){eo(e,"selected"),e.added>0&&fo.current&&(null==We||We(fo.current)),fo.current=null}))}),[ve,eo,We]),Ho=z({mapRef:Ge,isActive:Ze,isMapReady:Ue,hasInitialPolygon:!!Ae,onPolygonChange:Ro,wellsLayerId:oe.LayerIds.Wells,wells:me,onWellsSelected:Oo,onDeactivate:function(){return De("radius")},subjectWellId:go}),xo=Ho.lassoState,To=Ho.isDrawing,Zo=Ho.drawingPointCount,Ao=Ho.isEditingPolygon,No=Ho.isEditingVertices,Bo=Ho.isActivelyEditing,Eo=Ho.wellsInPolygonCount,Go=Ho.drawRef,Vo=Ho.handleDrawCreate,zo=Ho.handleDrawUpdate,Fo=Ho.handleDrawDelete,Jo=Ho.handleModeChange,Ko=Ho.handleSelectionChange,Uo=Ho.discardDrawing,_o=Ho.completeDrawing,qo=Ho.deletePolygon,Qo=Ho.confirm,Xo=Ho.cancel;F({isLassoActive:Ze,isDrawing:To,drawingPointCount:Zo,isEditingPolygon:Ao,discardDrawing:Uo,completeDrawing:_o,deletePolygon:qo});var Yo=J({mapRef:Ge,isEnabled:!Ie&&Ue&&!To&&!Ao&&!No,offsetWellIds:ge,subjectWellId:go,onBatchSelectWells:ve,onSelectionComplete:eo}),$o=Yo.boxState,ei=Yo.wellsInBoxCount,oi=Yo.isShiftHeld,ii=Yo.shouldSuppressClickRef,ti=n((function(){return!(!Te||"idle"===vo.phase)||!(!Ze||!To&&"idle"===xo.phase)}),[Te,vo.phase,Ze,To,xo.phase]),ri=we&&!ti,si=l((function(){"confirming"===vo.phase&&(fo.current={type:"radius",radius:vo.radiusMiles,center:vo.center}),Mo()}),[Mo,vo]);_({isRadiusActive:Te,radiusPhase:vo.phase,confirm:si,cancel:ko});var li=l((function(){if("confirming"===xo.phase&&xo.polygon.length>=3){var e=W(xo.polygon);e&&(fo.current={type:"polygon",polygonCoords:xo.polygon,center:e})}Qo()}),[Qo,xo]),ni=E(),ai=ni.hoveredWell,ci=ni.showTooltip,di=ni.hideTooltip,ui=K(),fi=ui.ref,pi=ui.width,mi=ui.height,gi=G({mapRef:Ge,coords:null!==(de=null==ai?void 0:ai.coords)&&void 0!==de?de:null,isSubjectWell:null!==(ue=null==ai?void 0:ai.isSubjectWell)&&void 0!==ue&&ue,isViewOnly:Ie,isClickable:je,hintsWidth:pi,hintsHeight:mi}),hi=gi.anchor,vi=gi.offset,Si=X({mapRef:Ge,radiusState:vo,lassoState:xo,isRadiusMode:Te}).coordinates,yi=l((function(){return Xe(!0)}),[]),ji=l((function(){return Xe(!1)}),[]),wi=n((function(){if(Te){if(Co)return"grabbing";if("placing-center"===vo.phase)return"crosshair";if("drawing"===vo.phase)return"grabbing";if("confirming"===vo.phase)return Wo?"ew-resize":bo?"grab":ai?"pointer":"default"}return!oi||$o.isActive||To||Ao||No?$o.isActive?"crosshair":Ze?ai?"pointer":"confirming"!==xo.phase||Ao||No?void 0:"grab":Qe?"grabbing":ai?"pointer":"grab":"crosshair"}),[Te,Co,vo.phase,Wo,bo,oi,$o.isActive,Ze,xo.phase,ai,Qe,To,Ao,No]),Wi=A({subjectWellCoords:io,radiusMiles:Me}).circleGeoJSON,bi=Q(),Ci=B({wells:me,offsetWellIds:ge,activeWellId:null!=Se?Se:null,subjectWell:pe,mapStyle:Re}),Ii=Ci.wellsGeoJSON,Mi=Ci.highlightGeoJSON,ki=Ci.activeHighlightGeoJSON,Li=l((function(){var e,o=null===(e=Ge.current)||void 0===e?void 0:e.getMap();if(o){var i=function(e){var i=e[0],t=e[1],r=e[2],s=e[3];o.fitBounds([[i,t],[r,s]],{padding:5,duration:300}),o.once("moveend",(function(){return w(o)}))};if(we){var t=C(we);if(t)return void i(t.bounds)}if(Wi){i(r=m(Wi))}else{if(io)return o.flyTo({center:[io.longitude,io.latitude],duration:300}),void o.once("moveend",(function(){return w(o)}));if(Ii&&Ii.features.length>0){var r,s=(r=m(Ii))[0],l=r[1],n=r[2],a=r[3];o.fitBounds([[s,l],[n,a]],{padding:20,duration:300}),o.once("moveend",(function(){return w(o)}))}}}}),[we,Wi,io,Ii]);N({mapRef:Ge,circleGeoJSON:Wi,selectionMode:ke,wellsGeoJSON:Ii,subjectWell:pe,subjectWellCoords:io,radius:Me,isMapReady:Ue,initialZoomRef:Ve,ghostZone:we}),a(le,(function(){return{flyToWell:function(e){var o,i=Ge.current;if(i&&Ue){var t=me.find((function(o){return o.id===e}));if(null===(o=null==t?void 0:t.topHole)||void 0===o?void 0:o.coordinates){var r=t.topHole.coordinates,s=r[0],l=r[1];i.easeTo({center:[l,s],duration:300})}}}}}),[me,Ue]);var Di=l((function(e){var o;if(!Ie)if(ii.current)ii.current=!1;else if(Te)Io.handleMapClick(e);else{var i=e.features;if(null==i?void 0:i.length){var t=i[0];if((null===(o=t.layer)||void 0===o?void 0:o.id)===oe.LayerIds.Wells){var r=t.properties;if(r){var s=r.isOffsetWell,l={id:r.id,name:r.name,formation:r.formation,totalDepth:r.totalDepth,rigReleaseDate:r.rigReleaseDate};he(l,!s)}}}}}),[Ie,ii,Te,Io,he]),Pi=l((function(e){Te&&Io.handleMouseMove(e);var o=e.features;if(null==o?void 0:o.length){var i=o[0],t=i.properties;if(t&&"Point"===i.geometry.type){var r=i.geometry.coordinates,s=r[0],l={latitude:r[1],longitude:s},n={id:t.id,name:t.name,formation:t.formation,status:t.status,totalDepth:t.totalDepth,rigReleaseDate:t.rigReleaseDate};ci({well:n,isOffsetWell:t.isOffsetWell,isSubjectWell:t.isSubjectWell,coords:l})}}else Fe||di()}),[ci,di,Fe,Te,Io]),Ri=l((function(){di()}),[di]),Oi=l((function(e){Te&&Io.handleMouseDown(e)}),[Te,Io]),Hi=l((function(){Je(!0),pe&&io&&ci({well:pe,isOffsetWell:!1,isSubjectWell:!0,coords:io})}),[pe,io,ci]),xi=l((function(){Je(!1),di()}),[di]),Ti=n((function(){return Te?"radius":Ze&&!$o.isActive&&(!oi||To||Ao||No)?"lasso":"box"}),[Te,Ze,$o.isActive,oi,To,Ao,No]);return o("div",{className:p(te.mapView,Ce.root),children:[o(c,e({ref:Ge},ro,{onMove:lo,onLoad:oo,mapboxAccessToken:se,mapStyle:oe.Styles[Re],style:{borderRadius:"8px"},scrollZoom:!0,doubleClickZoom:!0,boxZoom:!1,attributionControl:!1,interactiveLayerIds:[oe.LayerIds.Wells],onClick:Di,onMouseMove:Pi,onMouseLeave:Ri,onDblClick:no,onDragStart:yi,onDragEnd:ji,onMouseDown:Oi,cursor:wi,children:[Be&&!Ee&&i(re,{type:"fancy",size:"medium",className:te.mapLoader}),i(d,{id:oe.SourceIds.Wells,type:"geojson",data:Ii,children:i(u,{id:oe.LayerIds.Wells,type:"circle",paint:{"circle-radius":oe.Markers.WellSize,"circle-color":["get","color"],"circle-stroke-color":["coalesce",["get","strokeColor"],"transparent"],"circle-stroke-width":["get","strokeWidth"]}})}),ri&&i(k,{zone:we,mapStyle:Re}),i(d,{id:oe.SourceIds.LoadingTiles,type:"geojson",data:Ee?{type:"FeatureCollection",features:[]}:bi,children:i(u,{id:oe.LayerIds.LoadingTilesFill,type:"fill",beforeId:oe.LayerIds.Wells,paint:{"fill-color":"rgba(33, 33, 33, 0.60)","fill-antialias":!1}})}),Te&&wo&&o(d,{id:oe.SourceIds.RadiusDrawingPreview,type:"geojson",data:wo,children:[i(u,{id:oe.LayerIds.RadiusDrawingPreviewFill,type:"fill",beforeId:oe.LayerIds.Wells,paint:{"fill-color":oe.SelectionColors[Re].fill,"fill-opacity":"confirming"===vo.phase?1:.5}}),i(u,{id:oe.LayerIds.RadiusDrawingPreviewStroke,type:"line",beforeId:oe.LayerIds.Wells,paint:{"line-color":oe.SelectionColors[Re].border,"line-width":Wo||Co?oe.SelectionColors[Re].borderWidth+2:oe.SelectionColors[Re].borderWidth,"line-dasharray":"drawing"===vo.phase?[4,2]:[1,0]}})]}),Mi.features.length>0&&i(d,{id:oe.SourceIds.WellHighlights,type:"geojson",data:Mi,children:i(u,{id:oe.LayerIds.WellHighlights,type:"circle",beforeId:oe.LayerIds.Wells,paint:{"circle-radius":oe.Markers.HighlightSize,"circle-color":["get","color"],"circle-opacity":.16}})}),ki&&!po&&i(d,{id:oe.SourceIds.ActiveHighlight,type:"geojson",data:ki,children:i(u,{id:oe.LayerIds.ActiveHighlight,type:"circle",beforeId:oe.LayerIds.Wells,paint:{"circle-radius":oe.Markers.HighlightSize,"circle-color":["get","color"],"circle-opacity":["case",["get","isOffsetWell"],.24,.08]}})}),i(d,{id:oe.SourceIds.HoverHighlight,type:"geojson",data:{type:"FeatureCollection",features:ai&&!ai.isSubjectWell?[{type:"Feature",geometry:{type:"Point",coordinates:[ai.coords.longitude,ai.coords.latitude]},properties:{color:b({status:ai.well.status,mapStyle:Re,state:"hovered",isSubjectWell:!1}).fill,isOffsetWell:ai.isOffsetWell}}]:[]},children:i(u,{id:oe.LayerIds.HoverHighlight,type:"circle",beforeId:oe.LayerIds.Wells,paint:{"circle-radius":oe.Markers.HighlightSize,"circle-color":["get","color"],"circle-opacity":["case",["get","isOffsetWell"],.24,.08]}})}),Ze&&Ue&&i(R,{mapStyle:Re,initialPolygon:Le,onDrawCreate:Vo,onDrawUpdate:zo,onDrawDelete:Fo,onModeChange:Jo,onSelectionChange:Ko,drawRef:Go},Re),io&&pe&&i(D,{coordinates:io,onMouseEnter:Hi,onMouseLeave:xi}),ai&&i(f,{longitude:ai.coords.longitude,latitude:ai.coords.latitude,closeButton:!1,closeOnClick:!1,anchor:hi,offset:vi,maxWidth:"".concat(V.maxWidth,"px"),className:te.popup,children:i(L,{well:ai.well,isOffsetWell:ai.isOffsetWell,isSubjectWell:ai.isSubjectWell,isViewOnly:Ie,isClickable:je})}),Si&&!Bo&&i(T,{coordinates:Si,wellCount:Te?jo:Eo,onConfirm:Te?si:li,onCancel:Te?ko:Xo,isSatellite:Ne})]})),Lo&&null!==So&&i(I,{radius:So,editable:!0,isSatellite:Ne,onChange:yo,className:te.radiusFilter}),i(M,{onZoomIn:no,onZoomOut:ao,onResetZoom:Li,canZoomIn:co,canZoomOut:uo,isRadiusActive:Te,onRadiusToggle:Po,isLassoActive:Ze,onLassoToggle:Do,isSatellite:Ne,className:te.mapControls}),i(O,{distance:so,className:te.scaleIndicator}),i(P,{mapStyle:Re,onChange:Oe,className:te.layerSwitcher}),!Ie&&i(x,{ref:fi,mode:Ti,isBoxActive:$o.isActive,hasCircle:!1,isDrawing:To,pointCount:Zo,isEditingPolygon:Ao,isEditingVertices:No,hasPolygon:!!Ae,showBoxSelectionHint:!Ie,isTooZoomedOut:Ee,lassoPhase:xo.phase,radiusPhase:vo.phase,isSatellite:Ne,className:te.mapHints}),$o.isActive&&i(H,{startPoint:$o.startPoint,endPoint:$o.endPoint,wellsCount:ei,isSatellite:Ne}),$e&&i("div",{className:te.toastWrapper,children:i(ie,{message:$e.message,variant:$e.variant})})]})}));le.displayName="OffsetWellMap";export{le as OffsetWellMap};
1
+ import{__assign as e}from'./../../../../../ext-esm/tslib/tslib.es6.js';import{jsxs as o,jsx as t}from"react/jsx-runtime";import{forwardRef as i,useRef as l,useState as r,useCallback as s,useMemo as n,useEffect as a,useImperativeHandle as c}from"react";import d,{Source as u,Layer as p,Popup as f}from"@vis.gl/react-mapbox";import m from"classnames";import g from"@turf/bbox";import"mapbox-gl/dist/mapbox-gl.css";import{usePickerPropsStore as h}from"../../../stores/picker-props-store/usePickerPropsStore.js";import{useTileLoading as v}from"../../../effects/useTileLoading.js";import{useViewStore as y}from"../../../stores/view-store/useViewStore.js";import{useFilterStore as S}from"../../../stores/filter-store/useFilterStore.js";import"../../../stores/selection-tool-store/SelectionToolStoreContext.js";import"../../../stores/selection-tool-store/SelectionToolStoreProvider.js";import"zustand";import{useSelectionToolStore as W}from"../../../stores/selection-tool-store/useSelectionToolStore.js";import{DEFAULT_RADIUS_MILES as j}from"../../../constants.js";import{enforceZoomLimitIfNeeded as C}from"../../../utils/tile-math.js";import{calculatePolygonCentroid as w}from"../../../utils/calculatePolygonCentroid.js";import{getStatusColor as b}from"./utils/getStatusColor.js";import{getGhostZoneBounds as I}from"./utils/getGhostZoneBounds.js";import{getClusterColorExpression as L}from"./utils/getClusterColorExpression.js";import{RadiusInput as k}from"./components/RadiusInput/RadiusInput.js";import{MapControls as M}from"./components/MapControls/MapControls.js";import{GhostSelectionZone as R}from"./components/GhostSelectionZone/GhostSelectionZone.js";import{WellTooltip as D}from"./components/WellTooltip/WellTooltip.js";import{SubjectWellMarker as P}from"./components/SubjectWellMarker/SubjectWellMarker.js";import{LayerSwitcher as x}from"./components/LayerSwitcher/LayerSwitcher.js";import{DrawControl as O}from"./components/DrawControl/DrawControl.js";import{ScaleIndicator as Z}from"./components/ScaleIndicator/ScaleIndicator.js";import{BoxSelectionOverlay as H}from"./components/BoxSelectionOverlay/BoxSelectionOverlay.js";import{MapHints as T}from"./components/MapHints/MapHints.js";import{ConfirmationPopup as A}from"./components/ConfirmationPopup/ConfirmationPopup.js";import{useMapViewState as N}from"./hooks/useMapViewState.js";import{useRadiusCircle as z}from"./hooks/useRadiusCircle.js";import{useMapBounds as B}from"./hooks/useMapBounds.js";import{useWellMarkers as E}from"./hooks/useWellMarkers.js";import{useTooltip as G}from"./hooks/useTooltip.js";import{useTooltipAnchor as U,TOOLTIP_DIMENSIONS as V}from"./hooks/useTooltipAnchor.js";import{useLassoSelection as J}from"./hooks/useLassoSelection.js";import{useLassoKeyboardHandlers as _}from"./hooks/useLassoKeyboardHandlers.js";import{useBoxSelection as F}from"./hooks/useBoxSelection.js";import{useElementSize as K}from"./hooks/useElementSize.js";import{useRadiusDrawing as q}from"./hooks/useRadiusDrawing.js";import{useRadiusKeyboardHandlers as Q}from"./hooks/useRadiusKeyboardHandlers.js";import{useSyncViewportBounds as X}from"./hooks/useSyncViewportBounds.js";import{useLoadingTilesGeoJSON as Y}from"./hooks/useLoadingTilesGeoJSON.js";import{useConfirmationPopupPosition as $}from"./hooks/useConfirmationPopupPosition.js";import{useZoomLimitState as ee}from"./hooks/useZoomLimitState.js";import{useSelectionToast as oe}from"./hooks/useSelectionToast.js";import{toCoordinates as te}from"./utils/toCoordinates.js";import{MapConfig as ie,ClusterConfig as le,ClusterStatusProperties as re}from"./constants.js";import{SelectionToast as se}from"./components/SelectionToast/SelectionToast.js";import ne from"./OffsetWellMap.module.css.js";import{LoaderLinear as ae}from"../../../../../componentsV2/LoaderLinear/LoaderLinear.js";import{MAP_BOX_ACCESS_TOKEN as ce}from"../../../../../config/mapbox/index.js";var de=i((function(i,de){var ue,pe,fe,me,ge,he=i.subjectWell,ve=void 0===he?null:he,ye=i.wells,Se=i.offsetWellIds,We=i.handleChangeOffsetWell,je=i.onBatchSelectWells,Ce=i.activeWellId,we=i.isClickable,be=void 0===we||we,Ie=i.selectionZone,Le=i.onSelectionZoneConfirm,ke=i.shouldRecenter,Me=i.onRecenterComplete,Re=i.classes,De=void 0===Re?{}:Re,Pe=h((function(e){return e.isViewOnly})),xe=null!==(ue=S((function(e){var o;return null===(o=e.filters)||void 0===o?void 0:o.radius})))&&void 0!==ue?ue:j,Oe=null!==(pe=S((function(e){var o;return null===(o=e.filters)||void 0===o?void 0:o.selectionMode})))&&void 0!==pe?pe:"radius",Ze=S((function(e){var o;return null===(o=e.filters)||void 0===o?void 0:o.polygonCoords})),He=S((function(e){return e.setSelectionMode})),Te=S((function(e){return e.setPolygonCoords})),Ae=y((function(e){return e.mapStyle})),Ne=y((function(e){return e.setMapStyle})),ze=W((function(e){return e.mode})),Be=W((function(e){return e.setMode})),Ee="radius"===ze,Ge="lasso"===Oe,Ue=Ze&&Ze.length>=3,Ve="satellite"===Ae,Je=v(),_e=ee(),Fe=h((function(e){return e.isLoadAllWells})),Ke=h((function(e){return e.allWellsLoadProgress})),qe=Fe&&Ke&&!Ke.isComplete,Qe=l(null),Xe=l(null),Ye=r(!1),$e=Ye[0],eo=Ye[1],oo=r(!1),to=oo[0],io=oo[1],lo=r(!1),ro=lo[0],so=lo[1],no=oe(),ao=no.toast,co=no.showSelectionResult,uo=s((function(){io(!0)}),[]);X(Qe,to);var po=n((function(){var e,o=null===(e=null==ve?void 0:ve.topHole)||void 0===e?void 0:e.coordinates;return o?te(o):null}),[ve]),fo=N(Qe,po),mo=fo.viewState,go=fo.distance,ho=fo.handleMove,vo=fo.handleZoomIn,yo=fo.handleZoomOut,So=fo.canZoomIn,Wo=fo.canZoomOut,jo=l(null),Co=(null==ve?void 0:ve.id)===Ce,wo=s((function(e){je(e.map((function(e){return{id:e}})),(function(e){co(e),e.added>0&&jo.current&&(null==Le||Le(jo.current)),jo.current=null}))}),[je,co,Le]),bo=null!==(fe=null==ve?void 0:ve.id)&&void 0!==fe?fe:null,Io=q({mapRef:Qe,isActive:Ee,wells:ye,onWellsSelected:wo,subjectWellId:bo}),Lo=Io.radiusState,ko=Io.radiusMiles,Mo=Io.setRadiusMiles,Ro=Io.wellsInRadiusCount,Do=Io.previewCircle,Po=Io.isHoveringEdge,xo=Io.isHoveringInside,Oo=Io.isDragging,Zo=Io.handlers,Ho=Io.confirm,To=Io.cancel,Ao=Ee&&("drawing"===Lo.phase||"confirming"===Lo.phase),No=s((function(){Ge?((!Ze||Ze.length<3)&&Te(void 0),He("radius")):(Ee&&Be("none"),He("lasso"))}),[Ge,Ee,Ze,He,Te,Be]),zo=s((function(){Ee?Be("none"):(Ge&&He("radius"),Be("radius"))}),[Ee,Ge,Be,He]),Bo=s((function(e){Te(e)}),[Te]),Eo=s((function(e){je(e.map((function(e){return{id:e}})),(function(e){co(e,"selected"),e.added>0&&jo.current&&(null==Le||Le(jo.current)),jo.current=null}))}),[je,co,Le]),Go=J({mapRef:Qe,isActive:Ge,isMapReady:to,hasInitialPolygon:!!Ue,onPolygonChange:Bo,wellsLayerId:ie.LayerIds.Wells,wells:ye,onWellsSelected:Eo,onDeactivate:function(){return He("radius")},subjectWellId:bo}),Uo=Go.lassoState,Vo=Go.isDrawing,Jo=Go.drawingPointCount,_o=Go.isEditingPolygon,Fo=Go.isEditingVertices,Ko=Go.isActivelyEditing,qo=Go.wellsInPolygonCount,Qo=Go.drawRef,Xo=Go.handleDrawCreate,Yo=Go.handleDrawUpdate,$o=Go.handleDrawDelete,et=Go.handleModeChange,ot=Go.handleSelectionChange,tt=Go.discardDrawing,it=Go.completeDrawing,lt=Go.deletePolygon,rt=Go.confirm,st=Go.cancel;_({isLassoActive:Ge,isDrawing:Vo,drawingPointCount:Jo,isEditingPolygon:_o,discardDrawing:tt,completeDrawing:it,deletePolygon:lt});var nt=F({mapRef:Qe,isEnabled:!Pe&&to&&!Vo&&!_o&&!Fo,wells:ye,offsetWellIds:Se,subjectWellId:bo,onBatchSelectWells:je,onSelectionComplete:co}),at=nt.boxState,ct=nt.wellsInBoxCount,dt=nt.isShiftHeld,ut=nt.shouldSuppressClickRef,pt=n((function(){var e=Ee&&"idle"!==Lo.phase,o=Ge&&(Vo||"idle"!==Uo.phase);return e||o}),[Ee,Lo.phase,Ge,Vo,Uo.phase]),ft=Ie&&!pt,mt=s((function(){"confirming"===Lo.phase&&(jo.current={type:"radius",radius:Lo.radiusMiles,center:Lo.center}),Ho()}),[Ho,Lo]);Q({isRadiusActive:Ee,radiusPhase:Lo.phase,confirm:mt,cancel:To});var gt=s((function(){if("confirming"===Uo.phase&&Uo.polygon.length>=3){var e=w(Uo.polygon);e&&(jo.current={type:"polygon",polygonCoords:Uo.polygon,center:e})}rt()}),[rt,Uo]),ht=G(),vt=ht.hoveredWell,yt=ht.showTooltip,St=ht.hideTooltip,Wt=K(),jt=Wt.ref,Ct=Wt.width,wt=Wt.height,bt=U({mapRef:Qe,coords:null!==(me=null==vt?void 0:vt.coords)&&void 0!==me?me:null,isSubjectWell:null!==(ge=null==vt?void 0:vt.isSubjectWell)&&void 0!==ge&&ge,isViewOnly:Pe,isClickable:be,hintsWidth:Ct,hintsHeight:wt}),It=bt.anchor,Lt=bt.offset,kt=$({mapRef:Qe,radiusState:Lo,lassoState:Uo,isRadiusMode:Ee}).coordinates,Mt=s((function(){return so(!0)}),[]),Rt=s((function(){return so(!1)}),[]),Dt=n((function(){if(Ee){if(Oo||"drawing"===Lo.phase)return"grabbing";if("placing-center"===Lo.phase)return"crosshair";if("confirming"===Lo.phase)return Po?"ew-resize":xo?"grab":vt?"pointer":"default"}return dt&&!at.isActive&&!Vo&&!_o&&!Fo||at.isActive?"crosshair":Ge?vt?"pointer":"confirming"===Uo.phase&&!_o&&!Fo?"grab":void 0:ro?"grabbing":vt?"pointer":"grab"}),[Ee,Oo,Lo.phase,Po,xo,dt,at.isActive,Ge,Uo.phase,vt,ro,Vo,_o,Fo]),Pt=z({subjectWellCoords:po,radiusMiles:xe}).circleGeoJSON,xt=Y(),Ot=E({wells:ye,offsetWellIds:Se,activeWellId:null!=Ce?Ce:null,subjectWell:ve,mapStyle:Ae}),Zt=Ot.wellsGeoJSON,Ht=Ot.clusterableWellsGeoJSON,Tt=Ot.selectedWellsGeoJSON,At=Ot.highlightGeoJSON,Nt=Ot.activeHighlightGeoJSON,zt=n((function(){return L(Ae)}),[Ae]),Bt=s((function(){var e,o=null===(e=Qe.current)||void 0===e?void 0:e.getMap();if(o){var t=function(e){var t=e[0],i=e[1],l=e[2],r=e[3];o.fitBounds([[t,i],[l,r]],{padding:5,duration:300}),o.once("moveend",(function(){return C(o)}))};if(Ie){var i=I(Ie);if(i)return void t(i.bounds)}if(Pt){t(l=g(Pt))}else{if(po)return o.flyTo({center:[po.longitude,po.latitude],duration:300}),void o.once("moveend",(function(){return C(o)}));if(Zt&&Zt.features.length>0){var l,r=(l=g(Zt))[0],s=l[1],n=l[2],a=l[3];o.fitBounds([[r,s],[n,a]],{padding:20,duration:300}),o.once("moveend",(function(){return C(o)}))}}}}),[Ie,Pt,po,Zt]);a((function(){ke&&to&&(Bt(),null==Me||Me())}),[ke,to,Bt,Me]),B({mapRef:Qe,circleGeoJSON:Pt,selectionMode:Oe,wellsGeoJSON:Zt,subjectWell:ve,subjectWellCoords:po,radius:xe,isMapReady:to,initialZoomRef:Xe,ghostZone:Ie}),c(de,(function(){return{flyToWell:function(o){var t,i=Qe.current;if(i&&to){var l=ye.find((function(e){return e.id===o}));if(null===(t=null==l?void 0:l.topHole)||void 0===t?void 0:t.coordinates){var r=l.topHole.coordinates,s=r[0],n=r[1],a=i.getZoom(),c=Se.includes(o),d=le.clusterMaxZoom+3,u=!c&&a<d;i.easeTo(e(e({center:[n,s]},u&&{zoom:d}),{duration:300}))}}}}}),[ye,to,Se]);var Et=s((function(e){var o,t,i;if(!Pe)if(ut.current)ut.current=!1;else if(Ee)Zo.handleMapClick(e);else{var l=e.features;if(null==l?void 0:l.length){var r=l[0],s=null===(o=r.layer)||void 0===o?void 0:o.id;if(s!==ie.LayerIds.WellsClusters){if(s===ie.LayerIds.WellsUnclustered||s===ie.LayerIds.SelectedWells){var n=r.properties;if(n){var a=n.isOffsetWell,c={id:n.id,name:n.name,formation:n.formation,totalDepth:n.totalDepth,rigReleaseDate:n.rigReleaseDate};We(c,!a)}}}else{var d=null===(t=Qe.current)||void 0===t?void 0:t.getMap(),u=null===(i=r.properties)||void 0===i?void 0:i.cluster_id;if(d&&void 0!==u&&"Point"===r.geometry.type){var p=r.geometry.coordinates,f=p[0],m=p[1],g=d.getSource(ie.SourceIds.WellsClustered);g&&g.getClusterExpansionZoom(u,(function(e,o){e||void 0===o||d.easeTo({center:[f,m],zoom:(null!=o?o:0)+.5,duration:300})}))}}}}}),[Pe,ut,Ee,Zo,We]),Gt=s((function(e){var o;Ee&&Zo.handleMouseMove(e);var t=e.features;if(null==t?void 0:t.length){var i=t[0];if((null===(o=i.layer)||void 0===o?void 0:o.id)!==ie.LayerIds.WellsClusters){var l=i.properties;if(l&&"Point"===i.geometry.type){var r=i.geometry.coordinates,s=r[0],n={latitude:r[1],longitude:s},a={id:l.id,name:l.name,formation:l.formation,status:l.status,totalDepth:l.totalDepth,rigReleaseDate:l.rigReleaseDate};yt({well:a,isOffsetWell:l.isOffsetWell,isSubjectWell:l.isSubjectWell,coords:n})}}else St()}else $e||St()}),[yt,St,$e,Ee,Zo]),Ut=s((function(){St()}),[St]),Vt=s((function(e){Ee&&Zo.handleMouseDown(e)}),[Ee,Zo]),Jt=s((function(){eo(!0),ve&&po&&yt({well:ve,isOffsetWell:!1,isSubjectWell:!0,coords:po})}),[ve,po,yt]),_t=s((function(){eo(!1),St()}),[St]),Ft=n((function(){if(Ee)return"radius";var e=Vo||_o||Fo;return Ge&&!at.isActive&&(!dt||e)?"lasso":"box"}),[Ee,Ge,at.isActive,dt,Vo,_o,Fo]);return o("div",{className:m(ne.mapView,De.root),children:[o(d,e({ref:Qe},mo,{onMove:ho,onLoad:uo,mapboxAccessToken:ce,mapStyle:ie.Styles[Ae],style:{borderRadius:"8px"},scrollZoom:!0,doubleClickZoom:!0,boxZoom:!1,attributionControl:!1,interactiveLayerIds:[ie.LayerIds.WellsClusters,ie.LayerIds.WellsUnclustered,ie.LayerIds.SelectedWells],onClick:Et,onMouseMove:Gt,onMouseLeave:Ut,onDblClick:vo,onDragStart:Mt,onDragEnd:Rt,onMouseDown:Vt,cursor:Dt,children:[(Je&&!_e||qe)&&t(ae,{type:"fancy",size:"medium",className:ne.mapLoader}),o(u,{id:ie.SourceIds.WellsClustered,type:"geojson",data:Ht,cluster:!0,clusterMaxZoom:le.clusterMaxZoom,clusterRadius:le.clusterRadius,clusterProperties:re,children:[t(p,{id:ie.LayerIds.WellsClusters,type:"circle",filter:["has","point_count"],paint:{"circle-color":zt,"circle-radius":le.CircleRadius}}),t(p,{id:ie.LayerIds.WellsClusterCount,type:"symbol",filter:["has","point_count"],layout:{"text-field":["case",[">=",["get","point_count"],1e3],["concat",["to-string",["/",["round",["/",["get","point_count"],100]],10]],"k"],["to-string",["get","point_count"]]],"text-font":le.Label.font,"text-size":le.Label.size,"text-letter-spacing":le.Label.letterSpacing,"text-offset":le.Label.offset,"text-allow-overlap":!0},paint:{"text-color":le.Label.color}}),t(p,{id:ie.LayerIds.WellsUnclustered,type:"circle",filter:["!",["has","point_count"]],paint:{"circle-radius":ie.Markers.WellSize,"circle-color":["get","color"],"circle-stroke-color":["coalesce",["get","strokeColor"],"transparent"],"circle-stroke-width":["get","strokeWidth"]}})]}),t(u,{id:ie.SourceIds.SelectedWells,type:"geojson",data:Tt,children:t(p,{id:ie.LayerIds.SelectedWells,type:"circle",paint:{"circle-radius":ie.Markers.WellSize,"circle-color":["get","color"],"circle-stroke-color":["coalesce",["get","strokeColor"],"transparent"],"circle-stroke-width":["get","strokeWidth"]}})}),ft&&t(R,{zone:Ie,mapStyle:Ae}),t(u,{id:ie.SourceIds.LoadingTiles,type:"geojson",data:_e||Fe?{type:"FeatureCollection",features:[]}:xt,children:t(p,{id:ie.LayerIds.LoadingTilesFill,type:"fill",beforeId:ie.LayerIds.WellsUnclustered,paint:{"fill-color":"rgba(33, 33, 33, 0.60)","fill-antialias":!1}})}),Ee&&Do&&o(u,{id:ie.SourceIds.RadiusDrawingPreview,type:"geojson",data:Do,children:[t(p,{id:ie.LayerIds.RadiusDrawingPreviewFill,type:"fill",beforeId:ie.LayerIds.WellsUnclustered,paint:{"fill-color":ie.SelectionColors[Ae].fill,"fill-opacity":"confirming"===Lo.phase?1:.5}}),t(p,{id:ie.LayerIds.RadiusDrawingPreviewStroke,type:"line",beforeId:ie.LayerIds.WellsUnclustered,paint:{"line-color":ie.SelectionColors[Ae].border,"line-width":Po||Oo?ie.SelectionColors[Ae].borderWidth+2:ie.SelectionColors[Ae].borderWidth,"line-dasharray":"drawing"===Lo.phase?[4,2]:[1,0]}})]}),At.features.length>0&&t(u,{id:ie.SourceIds.WellHighlights,type:"geojson",data:At,children:t(p,{id:ie.LayerIds.WellHighlights,type:"circle",beforeId:ie.LayerIds.WellsUnclustered,paint:{"circle-radius":ie.Markers.HighlightSize,"circle-color":["get","color"],"circle-opacity":.16}})}),Nt&&!Co&&t(u,{id:ie.SourceIds.ActiveHighlight,type:"geojson",data:Nt,children:t(p,{id:ie.LayerIds.ActiveHighlight,type:"circle",beforeId:ie.LayerIds.WellsUnclustered,paint:{"circle-radius":ie.Markers.HighlightSize,"circle-color":["get","color"],"circle-opacity":["case",["get","isOffsetWell"],.24,.08]}})}),t(u,{id:ie.SourceIds.HoverHighlight,type:"geojson",data:{type:"FeatureCollection",features:vt&&!vt.isSubjectWell?[{type:"Feature",geometry:{type:"Point",coordinates:[vt.coords.longitude,vt.coords.latitude]},properties:{color:b({status:vt.well.status,mapStyle:Ae,state:"hovered",isSubjectWell:!1}).fill,isOffsetWell:vt.isOffsetWell}}]:[]},children:t(p,{id:ie.LayerIds.HoverHighlight,type:"circle",beforeId:ie.LayerIds.WellsUnclustered,paint:{"circle-radius":ie.Markers.HighlightSize,"circle-color":["get","color"],"circle-opacity":["case",["get","isOffsetWell"],.24,.08]}})}),Ge&&to&&t(O,{mapStyle:Ae,initialPolygon:Ze,onDrawCreate:Xo,onDrawUpdate:Yo,onDrawDelete:$o,onModeChange:et,onSelectionChange:ot,drawRef:Qo},Ae),po&&ve&&t(P,{coordinates:po,onMouseEnter:Jt,onMouseLeave:_t}),vt&&t(f,{longitude:vt.coords.longitude,latitude:vt.coords.latitude,closeButton:!1,closeOnClick:!1,anchor:It,offset:Lt,maxWidth:"".concat(V.maxWidth,"px"),className:ne.popup,children:t(D,{well:vt.well,isOffsetWell:vt.isOffsetWell,isSubjectWell:vt.isSubjectWell,isViewOnly:Pe,isClickable:be})}),kt&&!Ko&&t(A,{coordinates:kt,wellCount:Ee?Ro:qo,onConfirm:Ee?mt:gt,onCancel:Ee?To:st,isSatellite:Ve})]})),Ao&&null!==ko&&t(k,{radius:ko,editable:!0,isSatellite:Ve,onChange:Mo,className:ne.radiusFilter}),t(M,{onZoomIn:vo,onZoomOut:yo,onResetZoom:Bt,canZoomIn:So,canZoomOut:Wo,isRadiusActive:Ee,onRadiusToggle:zo,isLassoActive:Ge,onLassoToggle:No,isSatellite:Ve,className:ne.mapControls}),t(Z,{distance:go,className:ne.scaleIndicator}),t(x,{mapStyle:Ae,onChange:Ne,className:ne.layerSwitcher}),!Pe&&t(T,{ref:jt,mode:Ft,isBoxActive:at.isActive,hasCircle:!1,isDrawing:Vo,pointCount:Jo,isEditingPolygon:_o,isEditingVertices:Fo,hasPolygon:!!Ue,showBoxSelectionHint:!Pe,isTooZoomedOut:_e,isLoadAllWells:Fe,lassoPhase:Uo.phase,radiusPhase:Lo.phase,isSatellite:Ve,className:ne.mapHints}),at.isActive&&t(H,{startPoint:at.startPoint,endPoint:at.endPoint,wellsCount:ct,isSatellite:Ve}),ao&&t("div",{className:ne.toastWrapper,children:t(se,{message:ao.message,variant:ao.variant})})]})}));de.displayName="OffsetWellMap";export{de as OffsetWellMap};
2
2
  //# sourceMappingURL=OffsetWellMap.js.map
@@ -13,6 +13,7 @@ type MapHintsProps = {
13
13
  hasPolygon?: boolean;
14
14
  showBoxSelectionHint?: boolean;
15
15
  isTooZoomedOut?: boolean;
16
+ isLoadAllWells?: boolean;
16
17
  isSatellite?: boolean;
17
18
  className?: string;
18
19
  };
@@ -1 +1 @@
1
- {"version":3,"file":"MapHints.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHints.tsx"],"names":[],"mappings":"AASA,KAAK,WAAW,GAAG,MAAM,GAAG,gBAAgB,GAAG,SAAS,GAAG,YAAY,CAAC;AACxE,KAAK,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,YAAY,CAAC;AAEpD,KAAK,aAAa,GAAG;IACnB,IAAI,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;IAEjC,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAoQF,eAAO,MAAM,QAAQ,0GAoEpB,CAAC"}
1
+ {"version":3,"file":"MapHints.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHints.tsx"],"names":[],"mappings":"AASA,KAAK,WAAW,GAAG,MAAM,GAAG,gBAAgB,GAAG,SAAS,GAAG,YAAY,CAAC;AACxE,KAAK,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,YAAY,CAAC;AAEpD,KAAK,aAAa,GAAG;IACnB,IAAI,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;IAEjC,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAoQF,eAAO,MAAM,QAAQ,0GAqEpB,CAAC"}
@@ -1,2 +1,2 @@
1
- import{jsxs as e,jsx as i,Fragment as t}from"react/jsx-runtime";import{forwardRef as o,useMemo as s}from"react";import l from"classnames";import{CursorIcon as n}from"./components/CursorIcon.js";import{KeyboardKey as r}from"./components/KeyboardKey.js";import{HintItem as a}from"./components/HintItem.js";import c from"./MapHints.module.css.js";import{AttentionIcon as d}from"../../../../../../../icons/iconParkIcons.js";var p=function(o){var s=o.isActive,l=o.hasCircle,c=o.isSatellite;return s?i(a,{icon:i(n,{type:"default"}),text:"Release click to finalize selection",isSatellite:c}):e(t,{children:[l&&i(a,{icon:i(n,{type:"grabbing"}),text:"Drag circle edge to resize radius",isSatellite:c}),i(a,{prefix:"Hold",keyboardKey:i(r,{children:"Shift"}),suffix:"+ drag to select wells",isSatellite:c})]})},f=function(e){var o=e.phase,l=e.isDrawing,c=e.pointCount,d=e.isEditingPolygon,p=e.isEditingVertices,f=e.hasPolygon,u=e.showBoxSelectionHint,g=e.isSatellite,h=s((function(){var e=[];return l?0===c?e.push(i(a,{icon:i(n,{type:"cross"}),text:"Click on map to start drawing",isSatellite:g},"start-drawing")):c<3?e.push(i(a,{icon:i(n,{type:"cross"}),text:"Add at least 3 points to create selection",isSatellite:g},"add-points")):e.push(i(a,{prefix:"Press",keyboardKey:i(r,{children:"Enter"}),suffix:"to apply selection",isSatellite:g},"apply-selection")):p?(e.push(i(a,{icon:i(n,{type:"grabbing"}),text:"Drag points to reshape",isSatellite:g},"drag-points")),e.push(i(a,{prefix:"Press",keyboardKey:i(r,{children:"Delete"}),suffix:"to remove",isSatellite:g},"delete-polygon"))):d?(e.push(i(a,{icon:i(n,{type:"grabbing"}),text:"Drag to move",isSatellite:g},"drag-to-move")),e.push(i(a,{prefix:"Press",keyboardKey:i(r,{children:"Delete"}),suffix:"to remove",isSatellite:g},"delete-polygon")),e.push(i(a,{icon:i(n,{type:"default"}),text:"Click again to reshape",isSatellite:g},"reshape"))):("confirming"===o||f)&&e.push(i(a,{icon:i(n,{type:"default"}),text:"Click on selection to modify",isSatellite:g},"modify-selection")),u&&f&&!d&&!p&&e.push(i(a,{prefix:"Hold",keyboardKey:i(r,{children:"Shift"}),suffix:"+ drag to select wells",isSatellite:g},"box-selection")),e}),[l,c,d,p,o,f,u,g]);return 0===h.length?null:i(t,{children:h})},u=function(o){var s=o.phase,l=o.isSatellite;return"idle"===s?null:"placing-center"===s?e(t,{children:[i(a,{icon:i(n,{type:"cross"}),text:"Click on map to place center point",isSatellite:l}),i(a,{prefix:"Press",keyboardKey:i(r,{children:"Esc"}),suffix:"to cancel",isSatellite:l})]}):"drawing"===s?e(t,{children:[i(a,{icon:i(n,{type:"grabbing"}),text:"Drag to set radius",isSatellite:l}),i(a,{prefix:"Press",keyboardKey:i(r,{children:"Esc"}),suffix:"to cancel",isSatellite:l})]}):"confirming"===s?e(t,{children:[i(a,{icon:i(n,{type:"grabbing"}),text:"Drag edge to resize, drag inside to move",isSatellite:l}),i(a,{prefix:"Press",keyboardKey:i(r,{children:"Enter"}),suffix:"to confirm,",isSatellite:l}),i(a,{keyboardKey:i(r,{children:"Esc"}),suffix:"to cancel",isSatellite:l})]}):null},g=o((function(t,o){var s=t.mode,n=t.isBoxActive,r=void 0!==n&&n,g=t.hasCircle,h=void 0!==g&&g,y=t.radiusPhase,m=void 0===y?"idle":y,x=t.lassoPhase,S=void 0===x?"idle":x,v=t.isDrawing,b=void 0!==v&&v,k=t.pointCount,P=void 0===k?0:k,w=t.isEditingPolygon,C=void 0!==w&&w,E=t.isEditingVertices,K=void 0!==E&&E,D=t.hasPolygon,H=void 0!==D&&D,j=t.showBoxSelectionHint,z=void 0!==j&&j,A=t.isTooZoomedOut,B=void 0!==A&&A,I=t.isSatellite,N=void 0!==I&&I,V=t.className,M="box"===s?i(p,{isActive:r,hasCircle:h,isSatellite:N}):"radius"===s?i(u,{phase:m,isSatellite:N}):i(f,{phase:S,isDrawing:b,pointCount:P,isEditingPolygon:C,isEditingVertices:K,hasPolygon:H,showBoxSelectionHint:z,isSatellite:N});return"lasso"!==s&&"radius"!==s||M?e("div",{ref:o,className:l(c.mapHints,V),children:[B&&i(a,{icon:i(d,{size:16}),text:"Zoom in to load wells",isSatellite:N}),M]}):null}));g.displayName="MapHints";export{g as MapHints};
1
+ import{jsxs as e,jsx as i,Fragment as t}from"react/jsx-runtime";import{forwardRef as o,useMemo as s}from"react";import l from"classnames";import{CursorIcon as n}from"./components/CursorIcon.js";import{KeyboardKey as r}from"./components/KeyboardKey.js";import{HintItem as a}from"./components/HintItem.js";import c from"./MapHints.module.css.js";import{AttentionIcon as d}from"../../../../../../../icons/iconParkIcons.js";var p=function(o){var s=o.isActive,l=o.hasCircle,c=o.isSatellite;return s?i(a,{icon:i(n,{type:"default"}),text:"Release click to finalize selection",isSatellite:c}):e(t,{children:[l&&i(a,{icon:i(n,{type:"grabbing"}),text:"Drag circle edge to resize radius",isSatellite:c}),i(a,{prefix:"Hold",keyboardKey:i(r,{children:"Shift"}),suffix:"+ drag to select wells",isSatellite:c})]})},f=function(e){var o=e.phase,l=e.isDrawing,c=e.pointCount,d=e.isEditingPolygon,p=e.isEditingVertices,f=e.hasPolygon,u=e.showBoxSelectionHint,g=e.isSatellite,h=s((function(){var e=[];return l?0===c?e.push(i(a,{icon:i(n,{type:"cross"}),text:"Click on map to start drawing",isSatellite:g},"start-drawing")):c<3?e.push(i(a,{icon:i(n,{type:"cross"}),text:"Add at least 3 points to create selection",isSatellite:g},"add-points")):e.push(i(a,{prefix:"Press",keyboardKey:i(r,{children:"Enter"}),suffix:"to apply selection",isSatellite:g},"apply-selection")):p?(e.push(i(a,{icon:i(n,{type:"grabbing"}),text:"Drag points to reshape",isSatellite:g},"drag-points")),e.push(i(a,{prefix:"Press",keyboardKey:i(r,{children:"Delete"}),suffix:"to remove",isSatellite:g},"delete-polygon"))):d?(e.push(i(a,{icon:i(n,{type:"grabbing"}),text:"Drag to move",isSatellite:g},"drag-to-move")),e.push(i(a,{prefix:"Press",keyboardKey:i(r,{children:"Delete"}),suffix:"to remove",isSatellite:g},"delete-polygon")),e.push(i(a,{icon:i(n,{type:"default"}),text:"Click again to reshape",isSatellite:g},"reshape"))):("confirming"===o||f)&&e.push(i(a,{icon:i(n,{type:"default"}),text:"Click on selection to modify",isSatellite:g},"modify-selection")),u&&f&&!d&&!p&&e.push(i(a,{prefix:"Hold",keyboardKey:i(r,{children:"Shift"}),suffix:"+ drag to select wells",isSatellite:g},"box-selection")),e}),[l,c,d,p,o,f,u,g]);return 0===h.length?null:i(t,{children:h})},u=function(o){var s=o.phase,l=o.isSatellite;return"idle"===s?null:"placing-center"===s?e(t,{children:[i(a,{icon:i(n,{type:"cross"}),text:"Click on map to place center point",isSatellite:l}),i(a,{prefix:"Press",keyboardKey:i(r,{children:"Esc"}),suffix:"to cancel",isSatellite:l})]}):"drawing"===s?e(t,{children:[i(a,{icon:i(n,{type:"grabbing"}),text:"Drag to set radius",isSatellite:l}),i(a,{prefix:"Press",keyboardKey:i(r,{children:"Esc"}),suffix:"to cancel",isSatellite:l})]}):"confirming"===s?e(t,{children:[i(a,{icon:i(n,{type:"grabbing"}),text:"Drag edge to resize, drag inside to move",isSatellite:l}),i(a,{prefix:"Press",keyboardKey:i(r,{children:"Enter"}),suffix:"to confirm,",isSatellite:l}),i(a,{keyboardKey:i(r,{children:"Esc"}),suffix:"to cancel",isSatellite:l})]}):null},g=o((function(t,o){var s=t.mode,n=t.isBoxActive,r=void 0!==n&&n,g=t.hasCircle,h=void 0!==g&&g,y=t.radiusPhase,m=void 0===y?"idle":y,x=t.lassoPhase,S=void 0===x?"idle":x,v=t.isDrawing,b=void 0!==v&&v,k=t.pointCount,P=void 0===k?0:k,w=t.isEditingPolygon,C=void 0!==w&&w,E=t.isEditingVertices,K=void 0!==E&&E,D=t.hasPolygon,H=void 0!==D&&D,j=t.showBoxSelectionHint,A=void 0!==j&&j,z=t.isTooZoomedOut,B=void 0!==z&&z,I=t.isLoadAllWells,N=void 0!==I&&I,V=t.isSatellite,M=void 0!==V&&V,Z=t.className,L="box"===s?i(p,{isActive:r,hasCircle:h,isSatellite:M}):"radius"===s?i(u,{phase:m,isSatellite:M}):i(f,{phase:S,isDrawing:b,pointCount:P,isEditingPolygon:C,isEditingVertices:K,hasPolygon:H,showBoxSelectionHint:A,isSatellite:M});return"lasso"!==s&&"radius"!==s||L?e("div",{ref:o,className:l(c.mapHints,Z),children:[B&&!N&&i(a,{icon:i(d,{size:16}),text:"Zoom in to load wells",isSatellite:M}),L]}):null}));g.displayName="MapHints";export{g as MapHints};
2
2
  //# sourceMappingURL=MapHints.js.map
@@ -1,6 +1,6 @@
1
- import { ExpressionSpecification } from 'mapbox-gl';
1
+ import type { ExpressionSpecification } from 'mapbox-gl';
2
2
  import { WellStatus } from '../../../constants';
3
- import { Coordinates } from './OffsetWellMap.types';
3
+ import type { Coordinates } from './OffsetWellMap.types';
4
4
  export type WellStatusValue = typeof WellStatus[keyof typeof WellStatus];
5
5
  export type WellMarkerState = 'default' | 'hovered' | 'selected';
6
6
  export type MapStyleValue = 'dark' | 'satellite';
@@ -33,6 +33,41 @@ export declare const StatusColors: StatusColorsByMapStyle;
33
33
  */
34
34
  export declare const WellMarkerSize: ExpressionSpecification;
35
35
  export declare const HighlightMarkerSize: ExpressionSpecification;
36
+ /**
37
+ * Cluster configuration for Mapbox GL native clustering.
38
+ *
39
+ * Clustering improves performance when displaying 60k+ wells by:
40
+ * - Reducing draw calls at low zoom levels (60k → ~350)
41
+ * - Grouping nearby points into cluster circles with counts
42
+ * - Automatically expanding clusters as user zooms in
43
+ *
44
+ * Selected/offset wells are never clustered - they use a separate non-clustered source.
45
+ */
46
+ export declare const ClusterConfig: {
47
+ /** Stop clustering at this zoom level (wells become individual at zoom 9+) */
48
+ readonly clusterMaxZoom: 9;
49
+ /** Cluster points within this pixel radius */
50
+ readonly clusterRadius: 75;
51
+ /** Dynamic circle radius based on cluster point count */
52
+ readonly CircleRadius: ExpressionSpecification;
53
+ /** Dynamic circle color based on cluster point count (fallback) */
54
+ readonly CircleColor: ExpressionSpecification;
55
+ /** Cluster label styling */
56
+ readonly Label: {
57
+ readonly font: string[];
58
+ readonly size: 14;
59
+ readonly letterSpacing: -0.014;
60
+ readonly offset: [number, number];
61
+ readonly color: "#141414";
62
+ };
63
+ };
64
+ /**
65
+ * Cluster properties for counting well statuses within each cluster.
66
+ *
67
+ * Each property uses a reducer expression that sums up wells of each status type.
68
+ * These counts are used to determine the cluster color based on the most frequent status.
69
+ */
70
+ export declare const ClusterStatusProperties: Record<string, ExpressionSpecification>;
36
71
  export declare const MapConfig: {
37
72
  readonly DefaultCoords: Coordinates;
38
73
  readonly Zoom: {
@@ -67,6 +102,10 @@ export declare const MapConfig: {
67
102
  };
68
103
  readonly LayerIds: {
69
104
  readonly Wells: "wells-layer";
105
+ readonly WellsClusters: "wells-clusters-layer";
106
+ readonly WellsClusterCount: "wells-cluster-count-layer";
107
+ readonly WellsUnclustered: "wells-unclustered-layer";
108
+ readonly SelectedWells: "selected-wells-layer";
70
109
  readonly RadiusCircleFill: "radius-circle-fill";
71
110
  readonly RadiusCircleStroke: "radius-circle-stroke";
72
111
  readonly RadiusCirclePreviewFill: "radius-circle-preview-fill";
@@ -86,6 +125,8 @@ export declare const MapConfig: {
86
125
  };
87
126
  readonly SourceIds: {
88
127
  readonly Wells: "wells";
128
+ readonly WellsClustered: "wells-clustered";
129
+ readonly SelectedWells: "selected-wells";
89
130
  readonly RadiusCircle: "radius-circle";
90
131
  readonly RadiusCirclePreview: "radius-circle-preview";
91
132
  readonly RadiusDrawingPreview: "radius-drawing-preview";
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../src/components/OffsetWellPickerV5/components/Map/OffsetWellMap/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,MAAM,MAAM,eAAe,GAAG,OAAO,UAAU,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAEzE,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAEjE,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,WAAW,CAAC;AAEjD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAAC;AAE9E,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,eAAe,EAAE,oBAAoB,CAAC,CAAC;AAEpF,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,aAAa,EAAE,uBAAuB,CAAC,CAAC;AAEpF,eAAO,MAAM,YAAY,EAAE,sBAuD1B,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,cAAc,EAAE,uBAY5B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,uBAYjC,CAAC;AAEF,eAAO,MAAM,SAAS;4BAC6C,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsEpE,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../src/components/OffsetWellPickerV5/components/Map/OffsetWellMap/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAEzD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,MAAM,eAAe,GAAG,OAAO,UAAU,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAEzE,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAEjE,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,WAAW,CAAC;AAEjD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAAC;AAE9E,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,eAAe,EAAE,oBAAoB,CAAC,CAAC;AAEpF,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,aAAa,EAAE,uBAAuB,CAAC,CAAC;AAEpF,eAAO,MAAM,YAAY,EAAE,sBAuD1B,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,cAAc,EAAE,uBAY5B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,uBAYjC,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa;IACxB,8EAA8E;;IAE9E,8CAA8C;;IAG9C,yDAAyD;2BASpD,uBAAuB;IAE5B,mEAAmE;0BAS9D,uBAAuB;IAE5B,4BAA4B;;uBAE0B,MAAM,EAAE;;;yBAGvC,CAAC,MAAM,EAAE,MAAM,CAAC;;;CAG/B,CAAC;AAOX;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAK3E,CAAC;AAEF,eAAO,MAAM,SAAS;4BAC6C,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4EpE,CAAC"}
@@ -1,2 +1,2 @@
1
- var e={satellite:{active:{default:{fill:"rgba(168, 255, 61, 0.8)",stroke:"rgba(56, 102, 0, 0.64)"},hovered:{fill:"#A8FF3D",stroke:"rgba(56, 102, 0, 0.64)"},selected:{fill:"#A8FF3D",stroke:"rgba(56, 102, 0, 0.64)"}},paused:{default:{fill:"rgba(255, 246, 108, 0.8)",stroke:"rgba(102, 96, 10, 0.64)"},hovered:{fill:"#FFF66C",stroke:"rgba(102, 96, 10, 0.64)"},selected:{fill:"#FFF66C",stroke:"rgba(102, 96, 10, 0.64)"}},complete:{default:{fill:"rgba(111, 200, 255, 0.8)",stroke:"rgba(8, 85, 132, 0.64)"},hovered:{fill:"#6FC8FF",stroke:"rgba(8, 85, 132, 0.64)"},selected:{fill:"#6FC8FF",stroke:"rgba(8, 85, 132, 0.64)"}},idle:{default:{fill:"rgba(173, 173, 255, 0.8)",stroke:"rgba(64, 64, 131, 0.64)"},hovered:{fill:"#ADADFF",stroke:"rgba(64, 64, 131, 0.64)"},selected:{fill:"#ADADFF",stroke:"rgba(64, 64, 131, 0.64)"}},unknown:{default:{fill:"rgba(255, 255, 255, 0.8)",stroke:"rgba(82, 82, 82, 0.64)"},hovered:{fill:"#FFFFFF",stroke:"rgba(82, 82, 82, 0.64)"},selected:{fill:"#FFFFFF",stroke:"rgba(82, 82, 82, 0.64)"}}},dark:{active:{default:{fill:"rgba(168, 255, 61, 0.5)"},hovered:{fill:"rgba(150, 241, 38, 0.8)"},selected:{fill:"#A8FF3D"}},paused:{default:{fill:"rgba(255, 246, 108, 0.5)"},hovered:{fill:"rgba(255, 246, 108, 0.8)"},selected:{fill:"#FFF66C"}},complete:{default:{fill:"rgba(118, 194, 255, 0.8)"},hovered:{fill:"rgba(118, 194, 255, 0.8)"},selected:{fill:"#76C2FF"}},idle:{default:{fill:"rgba(173, 173, 255, 0.5)"},hovered:{fill:"rgba(173, 173, 255, 0.8)"},selected:{fill:"#ADADFF"}},unknown:{default:{fill:"rgba(255, 255, 255, 0.5)"},hovered:{fill:"rgba(255, 255, 255, 0.8)"},selected:{fill:"#FFFFFF"}}}},l=["interpolate",["linear"],["zoom"],1,1,8,3,12,5,18,8],i=["interpolate",["linear"],["zoom"],1,2,8,8,12,16,18,20],r={DefaultCoords:{latitude:29.749907,longitude:-95.358421},Zoom:{Initial:8.5,Max:18,Min:1},Radius:{Max:3e3,Min:.01},Markers:{WellSize:l,HighlightSize:i},Colors:{OffsetWell:"#03BCD4",RadiusCircle:"#03BCD4",DefaultWell:"#BDBDBD"},SelectionColors:{dark:{border:"#03BCD4",fill:"rgba(3, 188, 212, 0.08)",borderWidth:1},satellite:{border:"#FFE679",fill:"rgba(255, 193, 7, 0.08)",borderWidth:2}},LayerIds:{Wells:"wells-layer",RadiusCircleFill:"radius-circle-fill",RadiusCircleStroke:"radius-circle-stroke",RadiusCirclePreviewFill:"radius-circle-preview-fill",RadiusCirclePreviewStroke:"radius-circle-preview-stroke",RadiusDrawingPreviewFill:"radius-drawing-preview-fill",RadiusDrawingPreviewStroke:"radius-drawing-preview-stroke",WellHighlights:"well-highlights-layer",ActiveHighlight:"active-highlight-layer",HoverHighlight:"hover-highlight-layer",DrawPolygonFill:"gl-draw-polygon-fill",DrawLines:"gl-draw-lines",DrawVertexOuter:"gl-draw-vertex-outer",DrawMidpoint:"gl-draw-midpoint",LoadingTilesFill:"loading-tiles-fill",GhostZoneFill:"ghost-zone-fill",GhostZoneStroke:"ghost-zone-stroke"},SourceIds:{Wells:"wells",RadiusCircle:"radius-circle",RadiusCirclePreview:"radius-circle-preview",RadiusDrawingPreview:"radius-drawing-preview",WellHighlights:"well-highlights",ActiveHighlight:"active-highlight",HoverHighlight:"hover-highlight",LoadingTiles:"loading-tiles",GhostZone:"ghost-zone"},Styles:{dark:"mapbox://styles/mapbox/dark-v9",satellite:"mapbox://styles/mapbox/satellite-v9"}};export{i as HighlightMarkerSize,r as MapConfig,e as StatusColors,l as WellMarkerSize};
1
+ var e={satellite:{active:{default:{fill:"rgba(168, 255, 61, 0.8)",stroke:"rgba(56, 102, 0, 0.64)"},hovered:{fill:"#A8FF3D",stroke:"rgba(56, 102, 0, 0.64)"},selected:{fill:"#A8FF3D",stroke:"rgba(56, 102, 0, 0.64)"}},paused:{default:{fill:"rgba(255, 246, 108, 0.8)",stroke:"rgba(102, 96, 10, 0.64)"},hovered:{fill:"#FFF66C",stroke:"rgba(102, 96, 10, 0.64)"},selected:{fill:"#FFF66C",stroke:"rgba(102, 96, 10, 0.64)"}},complete:{default:{fill:"rgba(111, 200, 255, 0.8)",stroke:"rgba(8, 85, 132, 0.64)"},hovered:{fill:"#6FC8FF",stroke:"rgba(8, 85, 132, 0.64)"},selected:{fill:"#6FC8FF",stroke:"rgba(8, 85, 132, 0.64)"}},idle:{default:{fill:"rgba(173, 173, 255, 0.8)",stroke:"rgba(64, 64, 131, 0.64)"},hovered:{fill:"#ADADFF",stroke:"rgba(64, 64, 131, 0.64)"},selected:{fill:"#ADADFF",stroke:"rgba(64, 64, 131, 0.64)"}},unknown:{default:{fill:"rgba(255, 255, 255, 0.8)",stroke:"rgba(82, 82, 82, 0.64)"},hovered:{fill:"#FFFFFF",stroke:"rgba(82, 82, 82, 0.64)"},selected:{fill:"#FFFFFF",stroke:"rgba(82, 82, 82, 0.64)"}}},dark:{active:{default:{fill:"rgba(168, 255, 61, 0.5)"},hovered:{fill:"rgba(150, 241, 38, 0.8)"},selected:{fill:"#A8FF3D"}},paused:{default:{fill:"rgba(255, 246, 108, 0.5)"},hovered:{fill:"rgba(255, 246, 108, 0.8)"},selected:{fill:"#FFF66C"}},complete:{default:{fill:"rgba(118, 194, 255, 0.8)"},hovered:{fill:"rgba(118, 194, 255, 0.8)"},selected:{fill:"#76C2FF"}},idle:{default:{fill:"rgba(173, 173, 255, 0.5)"},hovered:{fill:"rgba(173, 173, 255, 0.8)"},selected:{fill:"#ADADFF"}},unknown:{default:{fill:"rgba(255, 255, 255, 0.5)"},hovered:{fill:"rgba(255, 255, 255, 0.8)"},selected:{fill:"#FFFFFF"}}}},l=["interpolate",["linear"],["zoom"],1,1,8,3,12,5,18,8],i=["interpolate",["linear"],["zoom"],1,2,8,8,12,16,18,20],r={clusterMaxZoom:9,clusterRadius:75,CircleRadius:["step",["get","point_count"],15,100,20,1e3,25],CircleColor:["step",["get","point_count"],"#51bbd6",100,"#f1f075",1e3,"#f28cb1"],Label:{font:["Roboto Medium","Arial Unicode MS Bold"],size:14,letterSpacing:-.014,offset:[0,.15],color:"#141414"}},t=Object.fromEntries(["active","paused","complete","idle","unknown"].map((function(e){return["count_".concat(e),["+",["case",["==",["get","status"],e],1,0]]]}))),a={DefaultCoords:{latitude:29.749907,longitude:-95.358421},Zoom:{Initial:8.5,Max:18,Min:1},Radius:{Max:3e3,Min:.01},Markers:{WellSize:l,HighlightSize:i},Colors:{OffsetWell:"#03BCD4",RadiusCircle:"#03BCD4",DefaultWell:"#BDBDBD"},SelectionColors:{dark:{border:"#03BCD4",fill:"rgba(3, 188, 212, 0.08)",borderWidth:1},satellite:{border:"#FFE679",fill:"rgba(255, 193, 7, 0.08)",borderWidth:2}},LayerIds:{Wells:"wells-layer",WellsClusters:"wells-clusters-layer",WellsClusterCount:"wells-cluster-count-layer",WellsUnclustered:"wells-unclustered-layer",SelectedWells:"selected-wells-layer",RadiusCircleFill:"radius-circle-fill",RadiusCircleStroke:"radius-circle-stroke",RadiusCirclePreviewFill:"radius-circle-preview-fill",RadiusCirclePreviewStroke:"radius-circle-preview-stroke",RadiusDrawingPreviewFill:"radius-drawing-preview-fill",RadiusDrawingPreviewStroke:"radius-drawing-preview-stroke",WellHighlights:"well-highlights-layer",ActiveHighlight:"active-highlight-layer",HoverHighlight:"hover-highlight-layer",DrawPolygonFill:"gl-draw-polygon-fill",DrawLines:"gl-draw-lines",DrawVertexOuter:"gl-draw-vertex-outer",DrawMidpoint:"gl-draw-midpoint",LoadingTilesFill:"loading-tiles-fill",GhostZoneFill:"ghost-zone-fill",GhostZoneStroke:"ghost-zone-stroke"},SourceIds:{Wells:"wells",WellsClustered:"wells-clustered",SelectedWells:"selected-wells",RadiusCircle:"radius-circle",RadiusCirclePreview:"radius-circle-preview",RadiusDrawingPreview:"radius-drawing-preview",WellHighlights:"well-highlights",ActiveHighlight:"active-highlight",HoverHighlight:"hover-highlight",LoadingTiles:"loading-tiles",GhostZone:"ghost-zone"},Styles:{dark:"mapbox://styles/mapbox/dark-v9",satellite:"mapbox://styles/mapbox/satellite-v9"}};export{r as ClusterConfig,t as ClusterStatusProperties,i as HighlightMarkerSize,a as MapConfig,e as StatusColors,l as WellMarkerSize};
2
2
  //# sourceMappingURL=constants.js.map
@@ -1,5 +1,6 @@
1
1
  import { RefObject } from 'react';
2
2
  import type { MapRef } from '@vis.gl/react-mapbox';
3
+ import type { OffsetWell } from '../../../../OffsetWellPickerV5.types';
3
4
  type Point = {
4
5
  x: number;
5
6
  y: number;
@@ -16,6 +17,7 @@ type BatchSelectResult = {
16
17
  type UseBoxSelectionParams = {
17
18
  mapRef: RefObject<MapRef | null>;
18
19
  isEnabled: boolean;
20
+ wells: OffsetWell[];
19
21
  offsetWellIds: number[];
20
22
  subjectWellId: number | null;
21
23
  onBatchSelectWells: (wells: {
@@ -29,6 +31,6 @@ type UseBoxSelectionReturn = {
29
31
  isShiftHeld: boolean;
30
32
  shouldSuppressClickRef: React.MutableRefObject<boolean>;
31
33
  };
32
- export declare const useBoxSelection: ({ mapRef, isEnabled, offsetWellIds, subjectWellId, onBatchSelectWells, onSelectionComplete, }: UseBoxSelectionParams) => UseBoxSelectionReturn;
34
+ export declare const useBoxSelection: ({ mapRef, isEnabled, wells, offsetWellIds, subjectWellId, onBatchSelectWells, onSelectionComplete, }: UseBoxSelectionParams) => UseBoxSelectionReturn;
33
35
  export {};
34
36
  //# sourceMappingURL=useBoxSelection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useBoxSelection.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useBoxSelection.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAInD,KAAK,KAAK,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtC,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,KAAK,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,KAAK,GAAG,IAAI,CAAC;CACxB,CAAC;AAEF,KAAK,iBAAiB,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,KAAK,qBAAqB,GAAG;IAC3B,MAAM,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACjC,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,kBAAkB,EAAE,CAClB,KAAK,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,EAAE,EACvB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,KAC7C,IAAI,CAAC;IACV,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;CAC3D,CAAC;AAEF,KAAK,qBAAqB,GAAG;IAC3B,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,OAAO,CAAC;IACrB,sBAAsB,EAAE,KAAK,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;CACzD,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,+FAO7B,qBAAqB,KAAG,qBA+P1B,CAAC"}
1
+ {"version":3,"file":"useBoxSelection.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useBoxSelection.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAIvE,KAAK,KAAK,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtC,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,KAAK,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,KAAK,GAAG,IAAI,CAAC;CACxB,CAAC;AAEF,KAAK,iBAAiB,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,KAAK,qBAAqB,GAAG;IAC3B,MAAM,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACjC,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,kBAAkB,EAAE,CAClB,KAAK,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,EAAE,EACvB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,KAC7C,IAAI,CAAC;IACV,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;CAC3D,CAAC;AAEF,KAAK,qBAAqB,GAAG;IAC3B,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,OAAO,CAAC;IACrB,sBAAsB,EAAE,KAAK,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;CACzD,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,sGAQ7B,qBAAqB,KAAG,qBAwN1B,CAAC"}
@@ -1,2 +1,2 @@
1
- import{__assign as t}from'./../../../../../../ext-esm/tslib/tslib.es6.js';import{useState as e,useRef as n,useEffect as r,useCallback as i}from"react";import{MapConfig as u}from"../constants.js";var o=function(o){var a=o.mapRef,l=o.isEnabled,c=o.offsetWellIds,s=o.subjectWellId,d=o.onBatchSelectWells,v=o.onSelectionComplete,m=e(!1),f=m[0],p=m[1],y=e({isActive:!1,startPoint:null,endPoint:null}),h=y[0],x=y[1],P=e([]),M=P[0],g=P[1],L=n(null),E=n(!1),S=n(!1),w=n(c);w.current=c;var A=n(s);A.current=s;var k=n(d);k.current=d;var C=n(v);C.current=v,r((function(){var t=function(t){"Shift"!==t.key||t.repeat||p(!0)},e=function(t){"Shift"===t.key&&(p(!1),x({isActive:!1,startPoint:null,endPoint:null}),g([]))};return document.addEventListener("keydown",t),document.addEventListener("keyup",e),function(){document.removeEventListener("keydown",t),document.removeEventListener("keyup",e)}}),[]);var R=i((function(t,e){var n,r=null===(n=a.current)||void 0===n?void 0:n.getMap();if(!r)return[];var i=[[Math.min(t.x,e.x),Math.min(t.y,e.y)],[Math.max(t.x,e.x),Math.max(t.y,e.y)]],o=r.queryRenderedFeatures(i,{layers:[u.LayerIds.Wells]}),l=new Set(w.current),c=A.current,s=o.map((function(t){var e;return null===(e=t.properties)||void 0===e?void 0:e.id})).filter((function(t){return null!=t&&(!l.has(t)&&t!==c)}));return Array.from(new Set(s))}),[a]),b=i((function(t,e){var n,r=null===(n=a.current)||void 0===n?void 0:n.getMap();if(!r)return[];var i=[[Math.min(t.x,e.x),Math.min(t.y,e.y)],[Math.max(t.x,e.x),Math.max(t.y,e.y)]],o=r.queryRenderedFeatures(i,{layers:[u.LayerIds.Wells]}),l=A.current,c=o.map((function(t){var e;return null===(e=t.properties)||void 0===e?void 0:e.id})).filter((function(t){return null!=t&&t!==l}));return Array.from(new Set(c))}),[a]),I=i((function(t){if(t.shiftKey&&L.current){t.preventDefault(),t.stopPropagation();var e=L.current.getBoundingClientRect(),n={x:t.clientX-e.left,y:t.clientY-e.top};x({isActive:!0,startPoint:n,endPoint:n})}}),[]),W=i((function(e){x((function(n){if(!n.isActive||!n.startPoint||!L.current)return n;var r=L.current.getBoundingClientRect(),i={x:Math.max(0,Math.min(e.clientX-r.left,r.width)),y:Math.max(0,Math.min(e.clientY-r.top,r.height))},u=R(n.startPoint,i);return g(u),t(t({},n),{endPoint:i})}))}),[R]),B=i((function(){x((function(t){if(!t.isActive||!t.startPoint||!t.endPoint)return{isActive:!1,startPoint:null,endPoint:null};var e=b(t.startPoint,t.endPoint);if(e.length>0&&!S.current){S.current=!0,E.current=!0;var n=e.map((function(t){return{id:t}}));k.current(n,(function(t){var e;null===(e=C.current)||void 0===e||e.call(C,t),S.current=!1}))}return g([]),{isActive:!1,startPoint:null,endPoint:null}}))}),[b]);return r((function(){var t,e=null===(t=a.current)||void 0===t?void 0:t.getMap();if(e&&l){var n=e.getCanvas();return L.current=n,n.addEventListener("mousedown",I),document.addEventListener("mousemove",W),document.addEventListener("mouseup",B),function(){n.removeEventListener("mousedown",I),document.removeEventListener("mousemove",W),document.removeEventListener("mouseup",B),L.current=null}}}),[a,l,I,W,B]),{boxState:h,wellsInBoxCount:M.length,isShiftHeld:f,shouldSuppressClickRef:E}};export{o as useBoxSelection};
1
+ import{__assign as t}from'./../../../../../../ext-esm/tslib/tslib.es6.js';import{useState as n,useRef as e,useEffect as r,useCallback as i}from"react";import{getWellsInPolygon as u}from"../../../../utils/selection-geometry.js";var o=function(o){var l=o.mapRef,a=o.isEnabled,c=o.wells,d=o.offsetWellIds,s=o.subjectWellId,v=o.onBatchSelectWells,m=o.onSelectionComplete,f=n(!1),p=f[0],h=f[1],g=n({isActive:!1,startPoint:null,endPoint:null}),x=g[0],y=g[1],P=n([]),M=P[0],E=P[1],L=e(null),w=e(!1),S=e(!1),j=e(d);j.current=d;var k=e(s);k.current=s;var A=e(v);A.current=v;var C=e(m);C.current=m,r((function(){var t=function(t){"Shift"!==t.key||t.repeat||h(!0)},n=function(t){"Shift"===t.key&&(h(!1),y({isActive:!1,startPoint:null,endPoint:null}),E([]))};return document.addEventListener("keydown",t),document.addEventListener("keyup",n),function(){document.removeEventListener("keydown",t),document.removeEventListener("keyup",n)}}),[]);var b=i((function(t,n){var e,r=null===(e=l.current)||void 0===e?void 0:e.getMap();if(!r)return null;var i=r.unproject([Math.min(t.x,n.x),Math.max(t.y,n.y)]),u=r.unproject([Math.max(t.x,n.x),Math.min(t.y,n.y)]),o=r.unproject([Math.min(t.x,n.x),Math.min(t.y,n.y)]),a=r.unproject([Math.max(t.x,n.x),Math.max(t.y,n.y)]);return[{latitude:o.lat,longitude:o.lng},{latitude:u.lat,longitude:u.lng},{latitude:a.lat,longitude:a.lng},{latitude:i.lat,longitude:i.lng}]}),[l]),B=i((function(t,n){var e,r=b(t,n);return r?u(c,r,null!==(e=k.current)&&void 0!==e?e:void 0).map((function(t){return t.id})):[]}),[b,c]),R=i((function(t){if(t.shiftKey&&L.current){t.preventDefault(),t.stopPropagation();var n=L.current.getBoundingClientRect(),e={x:t.clientX-n.left,y:t.clientY-n.top};y({isActive:!0,startPoint:e,endPoint:e})}}),[]),I=i((function(n){y((function(e){if(!e.isActive||!e.startPoint||!L.current)return e;var r=L.current.getBoundingClientRect(),i={x:Math.max(0,Math.min(n.clientX-r.left,r.width)),y:Math.max(0,Math.min(n.clientY-r.top,r.height))},u=B(e.startPoint,i),o=new Set(j.current),l=u.filter((function(t){return!o.has(t)}));return E(l),t(t({},e),{endPoint:i})}))}),[B]),W=i((function(){y((function(t){if(!t.isActive||!t.startPoint||!t.endPoint)return{isActive:!1,startPoint:null,endPoint:null};var n=B(t.startPoint,t.endPoint);if(n.length>0&&!S.current){S.current=!0,w.current=!0;var e=n.map((function(t){return{id:t}}));A.current(e,(function(t){var n;null===(n=C.current)||void 0===n||n.call(C,t),S.current=!1}))}return E([]),{isActive:!1,startPoint:null,endPoint:null}}))}),[B]);return r((function(){var t,n=null===(t=l.current)||void 0===t?void 0:t.getMap();if(n&&a){var e=n.getCanvas();return L.current=e,e.addEventListener("mousedown",R),document.addEventListener("mousemove",I),document.addEventListener("mouseup",W),function(){e.removeEventListener("mousedown",R),document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",W),L.current=null}}}),[l,a,R,I,W]),{boxState:x,wellsInBoxCount:M.length,isShiftHeld:p,shouldSuppressClickRef:w}};export{o as useBoxSelection};
2
2
  //# sourceMappingURL=useBoxSelection.js.map
@@ -23,7 +23,12 @@ type UseWellMarkersParams = {
23
23
  mapStyle: MapStyleValue;
24
24
  };
25
25
  type UseWellMarkersReturn = {
26
+ /** All wells GeoJSON (for backward compatibility with existing features) */
26
27
  wellsGeoJSON: WellFeatureCollection;
28
+ /** Non-selected wells that can be clustered */
29
+ clusterableWellsGeoJSON: WellFeatureCollection;
30
+ /** Selected/offset wells that should never be clustered */
31
+ selectedWellsGeoJSON: WellFeatureCollection;
27
32
  highlightGeoJSON: WellFeatureCollection;
28
33
  activeHighlightGeoJSON: WellFeatureCollection | null;
29
34
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useWellMarkers.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useWellMarkers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEjE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAS3D,MAAM,MAAM,qBAAqB,GAAG;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,OAAO,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,KAAK,EAAE,qBAAqB,CAAC,CAAC;AAChE,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAC,KAAK,EAAE,qBAAqB,CAAC,CAAC;AAEpF,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,QAAQ,EAAE,aAAa,CAAC;CACzB,CAAC;AAEF,KAAK,oBAAoB,GAAG;IAC1B,YAAY,EAAE,qBAAqB,CAAC;IACpC,gBAAgB,EAAE,qBAAqB,CAAC;IACxC,sBAAsB,EAAE,qBAAqB,GAAG,IAAI,CAAC;CACtD,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,gEAM5B,oBAAoB,KAAG,oBAmGzB,CAAC"}
1
+ {"version":3,"file":"useWellMarkers.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useWellMarkers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEjE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAS3D,MAAM,MAAM,qBAAqB,GAAG;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,OAAO,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,KAAK,EAAE,qBAAqB,CAAC,CAAC;AAChE,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAC,KAAK,EAAE,qBAAqB,CAAC,CAAC;AAEpF,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,QAAQ,EAAE,aAAa,CAAC;CACzB,CAAC;AAEF,KAAK,oBAAoB,GAAG;IAC1B,4EAA4E;IAC5E,YAAY,EAAE,qBAAqB,CAAC;IACpC,+CAA+C;IAC/C,uBAAuB,EAAE,qBAAqB,CAAC;IAC/C,2DAA2D;IAC3D,oBAAoB,EAAE,qBAAqB,CAAC;IAC5C,gBAAgB,EAAE,qBAAqB,CAAC;IACxC,sBAAsB,EAAE,qBAAqB,GAAG,IAAI,CAAC;CACtD,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,gEAM5B,oBAAoB,KAAG,oBAqIzB,CAAC"}
@@ -1,2 +1,2 @@
1
- import{__spreadArray as e}from'./../../../../../../ext-esm/tslib/tslib.es6.js';import{useMemo as t}from"react";import{toCoordinates as i}from"../utils/toCoordinates.js";import{toMapboxCoords as o}from"../utils/toMapboxCoords.js";import{getStatusColor as l}from"../utils/getStatusColor.js";import{mapbox as r}from"../../../../../../utils/index.js";var s=r.isValidCoordinates,u=function(r){var u=r.wells,n=r.offsetWellIds,a=r.activeWellId,d=r.subjectWell,f=r.mapStyle,p="satellite"===f,c=t((function(){var t=[],r=[],a=[];return u.forEach((function(e){e.id!==(null==d?void 0:d.id)&&(e.id&&n.includes(e.id)?r.push(e):a.push(e))})),e(e([],a,!0),r,!0).forEach((function(e){var r,u=null===(r=null==e?void 0:e.topHole)||void 0===r?void 0:r.coordinates;if(u&&s(u)){var a=i(u),c=(null==d?void 0:d.id)===e.id,m=!!e.id&&(n.includes(e.id)&&!c),v=m?"selected":"default",h=l({status:e.status,mapStyle:f,state:v,isSubjectWell:c});t.push({type:"Feature",geometry:{type:"Point",coordinates:o(a)},properties:{id:e.id||0,name:e.name||"",status:e.status||"unknown",totalDepth:e.totalDepth,rigReleaseDate:e.rigReleaseDate,isOffsetWell:m,isSubjectWell:c,color:h.fill,strokeColor:p&&h.stroke?h.stroke:null,strokeWidth:p?1:0}})}})),{type:"FeatureCollection",features:t}}),[u,n,d,f,p]),m=t((function(){return{type:"FeatureCollection",features:c.features.filter((function(e){return e.properties.isOffsetWell}))}}),[c]),v=t((function(){if(!a||a===(null==d?void 0:d.id))return null;var e=c.features.find((function(e){return e.properties.id===a}));return e?{type:"FeatureCollection",features:[e]}:null}),[c,a,null==d?void 0:d.id]);return{wellsGeoJSON:c,highlightGeoJSON:m,activeHighlightGeoJSON:v}};export{u as useWellMarkers};
1
+ import{__spreadArray as e}from'./../../../../../../ext-esm/tslib/tslib.es6.js';import{useMemo as t}from"react";import{toCoordinates as l}from"../utils/toCoordinates.js";import{toMapboxCoords as o}from"../utils/toMapboxCoords.js";import{getStatusColor as r}from"../utils/getStatusColor.js";import{mapbox as s}from"../../../../../../utils/index.js";var i=s.isValidCoordinates,u=function(s){var u=s.wells,n=s.offsetWellIds,a=s.activeWellId,f=s.subjectWell,d=s.mapStyle,c="satellite"===d,p=t((function(){return new Set(n)}),[n]),h=t((function(){var t=[],s=[],n=[];return u.forEach((function(e){e.id!==(null==f?void 0:f.id)&&(e.id&&p.has(e.id)?s.push(e):n.push(e))})),e(e([],n,!0),s,!0).forEach((function(e){var s,u=null===(s=null==e?void 0:e.topHole)||void 0===s?void 0:s.coordinates;if(u&&i(u)){var n=l(u),a=(null==f?void 0:f.id)===e.id,h=!!e.id&&(p.has(e.id)&&!a),m=h?"selected":"default",v=r({status:e.status,mapStyle:d,state:m,isSubjectWell:a});t.push({type:"Feature",geometry:{type:"Point",coordinates:o(n)},properties:{id:e.id||0,name:e.name||"",status:e.status||"unknown",totalDepth:e.totalDepth,rigReleaseDate:e.rigReleaseDate,isOffsetWell:h,isSubjectWell:a,color:v.fill,strokeColor:c&&v.stroke?v.stroke:null,strokeWidth:c?1:0}})}})),{type:"FeatureCollection",features:t}}),[u,p,f,d,c]),m=t((function(){var e=[],t=[];return h.features.forEach((function(l){l.properties.isOffsetWell?t.push(l):e.push(l)})),{clusterableWellsGeoJSON:{type:"FeatureCollection",features:e},selectedWellsGeoJSON:{type:"FeatureCollection",features:t}}}),[h]),v=m.clusterableWellsGeoJSON,S=m.selectedWellsGeoJSON,W=t((function(){return{type:"FeatureCollection",features:h.features.filter((function(e){return e.properties.isOffsetWell}))}}),[h]),O=t((function(){if(!a||a===(null==f?void 0:f.id))return null;var e=h.features.find((function(e){return e.properties.id===a}));return e?{type:"FeatureCollection",features:[e]}:null}),[h,a,null==f?void 0:f.id]);return{wellsGeoJSON:h,clusterableWellsGeoJSON:v,selectedWellsGeoJSON:S,highlightGeoJSON:W,activeHighlightGeoJSON:O}};export{u as useWellMarkers};
2
2
  //# sourceMappingURL=useWellMarkers.js.map
@@ -0,0 +1,12 @@
1
+ import type { ExpressionSpecification } from 'mapbox-gl';
2
+ import { MapStyleValue } from '../constants';
3
+ /**
4
+ * Builds a Mapbox expression that determines cluster color based on the most frequent well status.
5
+ *
6
+ * The expression compares counts of each status (count_active, count_paused, etc.)
7
+ * and returns the fill color for the status with the highest count.
8
+ *
9
+ * Priority order for tie-breaking: active > paused > complete > idle > unknown
10
+ */
11
+ export declare const getClusterColorExpression: (mapStyle: MapStyleValue) => ExpressionSpecification;
12
+ //# sourceMappingURL=getClusterColorExpression.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getClusterColorExpression.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/OffsetWellPickerV5/components/Map/OffsetWellMap/utils/getClusterColorExpression.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAEzD,OAAO,EAAgB,aAAa,EAAmB,MAAM,cAAc,CAAC;AA8B5E;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,GAAI,UAAU,aAAa,KAAG,uBAwBnE,CAAC"}
@@ -0,0 +1,2 @@
1
+ import{__spreadArray as t}from'./../../../../../../ext-esm/tslib/tslib.es6.js';import{StatusColors as n}from"../constants.js";var e=["active","paused","complete","idle","unknown"],o=function(t,e){return n[t][e].default.fill},r=function(n){var r=[];e.slice(0,-1).forEach((function(c,u){var a=e.slice(u+1);r.push(function(n,e){var o=e.map((function(t){return[">=",["get","count_".concat(n)],["get","count_".concat(t)]]}));return 1===o.length?o[0]:t(["all"],o,!0)}(c,a),o(n,c))}));var c=e[e.length-1];return t(t(["case"],r,!0),[o(n,c)],!1)};export{r as getClusterColorExpression};
2
+ //# sourceMappingURL=getClusterColorExpression.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,8BAA8B,gDAAmD;"}
@@ -18,6 +18,8 @@ type WellsMapProps = {
18
18
  activeWellId?: number | null;
19
19
  selectionZone?: SelectionZone | null;
20
20
  onSelectionZoneConfirm?: (zone: SelectionZone) => void;
21
+ shouldRecenter?: boolean;
22
+ onRecenterComplete?: () => void;
21
23
  };
22
24
  export declare const WellsMap: import("react").ForwardRefExoticComponent<WellsMapProps & import("react").RefAttributes<OffsetWellMapHandle>>;
23
25
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"WellsMap.d.ts","sourceRoot":"","sources":["../../../../../src/components/OffsetWellPickerV5/components/Map/WellsMap.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,EAAiB,mBAAmB,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAIxF,KAAK,iBAAiB,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,KAAK,aAAa,GAAG;IACnB,WAAW,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IACjC,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,sBAAsB,EAAE,CAAC,IAAI,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,EAAE,UAAU,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9E,kBAAkB,EAAE,CAClB,KAAK,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,EAAE,EACvB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,KAC7C,IAAI,CAAC;IACV,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,aAAa,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IACrC,sBAAsB,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;CACxD,CAAC;AAEF,eAAO,MAAM,QAAQ,+GAgCpB,CAAC"}
1
+ {"version":3,"file":"WellsMap.d.ts","sourceRoot":"","sources":["../../../../../src/components/OffsetWellPickerV5/components/Map/WellsMap.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,EAAiB,mBAAmB,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAIxF,KAAK,iBAAiB,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,KAAK,aAAa,GAAG;IACnB,WAAW,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IACjC,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,sBAAsB,EAAE,CAAC,IAAI,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,EAAE,UAAU,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9E,kBAAkB,EAAE,CAClB,KAAK,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,EAAE,EACvB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,KAC7C,IAAI,CAAC;IACV,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,aAAa,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IACrC,sBAAsB,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACvD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,QAAQ,+GAoCpB,CAAC"}
@@ -1,2 +1,2 @@
1
- import{jsx as e}from"react/jsx-runtime";import{forwardRef as l}from"react";import{OffsetWellMap as o}from"./OffsetWellMap/OffsetWellMap.js";import n from"./WellsMap.module.css.js";var t=l((function(l,t){var a=l.subjectWell,s=void 0===a?null:a,i=l.wells,r=l.offsetWellIds,f=l.mapHidden,m=l.handleChangeOffsetWell,c=l.onBatchSelectWells,d=l.activeWellId,p=void 0===d?null:d,W=l.selectionZone,u=l.onSelectionZoneConfirm;return e("div",{className:f?n.mapContainerHidden:n.mapContainer,children:e(o,{ref:t,subjectWell:s,wells:i,offsetWellIds:r,handleChangeOffsetWell:m,onBatchSelectWells:c,activeWellId:p,selectionZone:W,onSelectionZoneConfirm:u,classes:{root:n.mapRoot,map:n.mapMain}})})}));t.displayName="WellsMap";export{t as WellsMap};
1
+ import{jsx as e}from"react/jsx-runtime";import{forwardRef as l}from"react";import{OffsetWellMap as o}from"./OffsetWellMap/OffsetWellMap.js";import n from"./WellsMap.module.css.js";var t=l((function(l,t){var s=l.subjectWell,a=void 0===s?null:s,r=l.wells,i=l.offsetWellIds,c=l.mapHidden,m=l.handleChangeOffsetWell,f=l.onBatchSelectWells,d=l.activeWellId,p=void 0===d?null:d,W=l.selectionZone,u=l.onSelectionZoneConfirm,h=l.shouldRecenter,C=l.onRecenterComplete;return e("div",{className:c?n.mapContainerHidden:n.mapContainer,children:e(o,{ref:t,subjectWell:a,wells:r,offsetWellIds:i,handleChangeOffsetWell:m,onBatchSelectWells:f,activeWellId:p,selectionZone:W,onSelectionZoneConfirm:u,shouldRecenter:h,onRecenterComplete:C,classes:{root:n.mapRoot,map:n.mapMain}})})}));t.displayName="WellsMap";export{t as WellsMap};
2
2
  //# sourceMappingURL=WellsMap.js.map
@@ -1,2 +1,2 @@
1
- import e from"@babel/runtime/helpers/slicedToArray";import{useState as t,useRef as r,useEffect as o,useMemo as s}from"react";import i from"prop-types";import{get as n}from"lodash";import{withStyles as a,Tooltip as p,makeStyles as l,Chip as c,Input as m}from"@material-ui/core";import d from"@material-ui/icons/Close";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/regenerator";import"uuid";import"@babel/runtime/helpers/toConsumableArray";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../../../clients/jsonApi/index.js";import"../../../../../clients/subscriptions/constants.js";import"../../../../../clients/subscriptions.v1.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"../../../constants.js";import"../../../api/shared/dataFormatter.js";import"../../../utils/wellTransformations.js";import"zustand";import"../../../stores/picker-props-store/PickerPropsStoreContext.js";import{jsxs as u,jsx as f,Fragment as h}from"react/jsx-runtime";import"../../../../../utils/index.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"../../../../../constants/corvaCompanyId.js";import"../../../../GradientManager/configuration/constants.js";import"react-virtualized";import{useAssetsData as g}from"../../../effects/useAssetsData.js";import"../../../../../permissions/PermissionsContext.js";import"../../../../../permissions/constants/index.js";import"../../../../../permissions/withPermissionsHOC.js";import"../../../../../permissions/ProvidePermissions.js";import"lodash/debounce";import"@mapbox/tilebelt";import"../../../stores/viewport-store/ViewportStoreContext.js";import"lz-string";import"../../../stores/viewport-store/ViewportStoreProvider.js";import"lodash/isEqual";import"@turf/bbox";import"@turf/circle";import"../../../stores/filter-store/FilterStoreContext.js";import{AssetTypesSection as x}from"./AssetTypesSection.js";import{AssetResultSection as b}from"./AssetResultSection.js";import{SEARCH_CATEGORIES as j,CATEGORY_KEY_VALUES as y}from"./constants.js";var C=a((function(){return{tooltip:{backgroundColor:"#414141",color:"#ffffff",fontSize:"11px",lineHeight:"16px",borderRadius:"4px",boxShadow:"0px 4px 4px rgba(0, 0, 0, 0.12)",padding:"4px"}}}))(p),I=l((function(e){return{wrapper:{width:function(e){return e.searchWidth||"auto"},display:"flex",flexDirection:"column",padding:16},inputWrapper:{display:"flex",width:"auto",margin:"0 8px 8px",alignItems:"center",flexWrap:"nowrap",justifyContent:"space-between"},selectedChip:{height:"24px",margin:"4px"},selectedChipDeleteIcon:{width:"16px",height:"16px",color:e.palette.primary.text6,"&:hover":{color:e.palette.primary.text1}},selectedLabel:{fontWeight:400,fontSize:"16px",lineHeight:"22px",color:e.palette.primary.text1,whiteSpace:"nowrap",paddingLeft:"4px",paddingRight:"8px"},disabledIcon:{width:"16px",height:"16px",color:e.palette.primary.text6,opacity:.4},closeIconButton:{padding:0,"&:hover $closeIcon":{color:e.palette.primary.text1}},searchInput:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",borderBottom:"2px solid #03BCD4"},closeIcon:{color:e.palette.primary.text6,fontSize:"18px"}}})),v=function(i){var a=i.companyIds,p=i.subjectWellId,l=i.value,v=i.selectedWellIds,A=i.onChange,w=i.searchWidth,W=i.onClose,S=i.loadingAssetIds,k=t(null),P=e(k,2),R=P[0],D=P[1],z=t(null),T=e(z,2),q=T[0],N=T[1],L=t(1),O=e(L,2),B=O[0],F=O[1],H=I({searchWidth:w}),_=r();o((function(){N(l)}),[l]);var G=g(q,R,B,a,v),K=e(G,2),U=K[0],V=K[1],E=s((function(){return R&&V&&0!==V.length?V[0][1].filter((function(e){return e.checked})).length:0}),[R,V]);return u("div",{className:H.wrapper,children:[f("div",{className:H.inputWrapper,children:u("div",{className:H.searchInput,children:[R&&u(h,{children:[f(c,{"data-not-migrated-muichip":!0,classes:{root:H.selectedChip,deleteIcon:H.selectedChipDeleteIcon},label:n(j,[R,"labelPlural"],"Assets"),deleteIcon:f(d,{}),onDelete:function(){D(null)}}),E>0&&u("span",{className:H.selectedLabel,children:[E," Selected"]})]}),f(m,{"data-testid":"".concat("AutoCompleteAssetSearch","_searchInput"),inputRef:_,autoFocus:!0,disableUnderline:!0,fullWidth:!0,value:q||"",placeholder:"Search for Wells ...",onChange:function(e){var t=e.target.value;_.current.focus(),N(t),F(1)},onKeyUp:function(t){var r=t.target.value,o=t.keyCode,s=y.find((function(t){var o=e(t,2);return o[0],o[1].autoCategorizedKey===r.trim().toLowerCase()}));if(s&&(13===o||32===o))return N(""),D(s[0]),void F(1);""===r&&8===o&&(D(null),F(1))}}),f(C,{title:"Clear",children:f(d,{className:R||q?H.selectedChipDeleteIcon:H.disabledIcon,onClick:function(){N(""),D(null),F(1),W()}})})]})}),!R&&!q&&f(x,{onClickAssetType:function(e){_.current.focus(),D(e),F(1)}}),(R||q)&&f(b,{subjectWellId:p,page:B,assetType:R,loading:U,groupedAssets:V,onClickAsset:function(e,t){t===j.rig.name?A(!e.checked,[e.redirectAssetId],t,[e.asset_id]):A(!e.checked,[e.redirectAssetId],t)},onClickAllAsset:function(e,t){var r=V[0][1];t===j.rig.name?A(e,r.map((function(e){return e.redirectAssetId})),t,r.map((function(e){return e.asset_id}))):A(e,r.map((function(e){return e.redirectAssetId})),t)},onScrollReached:function(e){"top"===e&&B>1&&F((function(e){return e-1})),"bottom"===e&&F((function(e){return e+1}))},loadingAssetIds:S})]})};v.propTypes={subjectWellId:i.number.isRequired,companyIds:i.arrayOf(i.number),value:i.string.isRequired,selectedWellIds:i.arrayOf(i.number).isRequired,onChange:i.func.isRequired,searchWidth:i.number,onClose:i.func.isRequired,loadingAssetIds:i.arrayOf(i.number)},v.defaultProps={companyIds:null,searchWidth:null,loadingAssetIds:[]};export{v as AutoCompleteAssetSearch};
1
+ import e from"@babel/runtime/helpers/slicedToArray";import{useState as t,useRef as r,useEffect as o,useMemo as s}from"react";import i from"prop-types";import{get as n}from"lodash";import{withStyles as a,Tooltip as p,makeStyles as l,Chip as c,Input as m}from"@material-ui/core";import d from"@material-ui/icons/Close";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/regenerator";import"uuid";import"@babel/runtime/helpers/toConsumableArray";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../../../clients/jsonApi/index.js";import"../../../../../clients/subscriptions/constants.js";import"../../../../../clients/subscriptions.v1.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"../../../constants.js";import"../../../api/shared/dataFormatter.js";import"../../../utils/wellTransformations.js";import"zustand";import"../../../stores/picker-props-store/PickerPropsStoreContext.js";import{jsxs as u,jsx as f,Fragment as h}from"react/jsx-runtime";import"../../../../../utils/index.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"../../../../../constants/corvaCompanyId.js";import"../../../../GradientManager/configuration/constants.js";import"react-virtualized";import{useAssetsData as g}from"../../../effects/useAssetsData.js";import"../../../../../permissions/PermissionsContext.js";import"../../../../../permissions/constants/index.js";import"../../../../../permissions/withPermissionsHOC.js";import"../../../../../permissions/ProvidePermissions.js";import"lodash/debounce";import"lodash/isEqual";import"@mapbox/tilebelt";import"../../../stores/viewport-store/ViewportStoreContext.js";import"../../../stores/filter-store/FilterStoreContext.js";import"lz-string";import"../../../stores/viewport-store/ViewportStoreProvider.js";import"@turf/bbox";import"@turf/circle";import{AssetTypesSection as x}from"./AssetTypesSection.js";import{AssetResultSection as b}from"./AssetResultSection.js";import{SEARCH_CATEGORIES as j,CATEGORY_KEY_VALUES as y}from"./constants.js";var C=a((function(){return{tooltip:{backgroundColor:"#414141",color:"#ffffff",fontSize:"11px",lineHeight:"16px",borderRadius:"4px",boxShadow:"0px 4px 4px rgba(0, 0, 0, 0.12)",padding:"4px"}}}))(p),I=l((function(e){return{wrapper:{width:function(e){return e.searchWidth||"auto"},display:"flex",flexDirection:"column",padding:16},inputWrapper:{display:"flex",width:"auto",margin:"0 8px 8px",alignItems:"center",flexWrap:"nowrap",justifyContent:"space-between"},selectedChip:{height:"24px",margin:"4px"},selectedChipDeleteIcon:{width:"16px",height:"16px",color:e.palette.primary.text6,"&:hover":{color:e.palette.primary.text1}},selectedLabel:{fontWeight:400,fontSize:"16px",lineHeight:"22px",color:e.palette.primary.text1,whiteSpace:"nowrap",paddingLeft:"4px",paddingRight:"8px"},disabledIcon:{width:"16px",height:"16px",color:e.palette.primary.text6,opacity:.4},closeIconButton:{padding:0,"&:hover $closeIcon":{color:e.palette.primary.text1}},searchInput:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",borderBottom:"2px solid #03BCD4"},closeIcon:{color:e.palette.primary.text6,fontSize:"18px"}}})),v=function(i){var a=i.companyIds,p=i.subjectWellId,l=i.value,v=i.selectedWellIds,A=i.onChange,w=i.searchWidth,W=i.onClose,S=i.loadingAssetIds,k=t(null),P=e(k,2),R=P[0],D=P[1],z=t(null),T=e(z,2),q=T[0],N=T[1],L=t(1),O=e(L,2),B=O[0],F=O[1],H=I({searchWidth:w}),_=r();o((function(){N(l)}),[l]);var G=g(q,R,B,a,v),K=e(G,2),U=K[0],V=K[1],E=s((function(){return R&&V&&0!==V.length?V[0][1].filter((function(e){return e.checked})).length:0}),[R,V]);return u("div",{className:H.wrapper,children:[f("div",{className:H.inputWrapper,children:u("div",{className:H.searchInput,children:[R&&u(h,{children:[f(c,{"data-not-migrated-muichip":!0,classes:{root:H.selectedChip,deleteIcon:H.selectedChipDeleteIcon},label:n(j,[R,"labelPlural"],"Assets"),deleteIcon:f(d,{}),onDelete:function(){D(null)}}),E>0&&u("span",{className:H.selectedLabel,children:[E," Selected"]})]}),f(m,{"data-testid":"".concat("AutoCompleteAssetSearch","_searchInput"),inputRef:_,autoFocus:!0,disableUnderline:!0,fullWidth:!0,value:q||"",placeholder:"Search for Wells ...",onChange:function(e){var t=e.target.value;_.current.focus(),N(t),F(1)},onKeyUp:function(t){var r=t.target.value,o=t.keyCode,s=y.find((function(t){var o=e(t,2);return o[0],o[1].autoCategorizedKey===r.trim().toLowerCase()}));if(s&&(13===o||32===o))return N(""),D(s[0]),void F(1);""===r&&8===o&&(D(null),F(1))}}),f(C,{title:"Clear",children:f(d,{className:R||q?H.selectedChipDeleteIcon:H.disabledIcon,onClick:function(){N(""),D(null),F(1),W()}})})]})}),!R&&!q&&f(x,{onClickAssetType:function(e){_.current.focus(),D(e),F(1)}}),(R||q)&&f(b,{subjectWellId:p,page:B,assetType:R,loading:U,groupedAssets:V,onClickAsset:function(e,t){t===j.rig.name?A(!e.checked,[e.redirectAssetId],t,[e.asset_id]):A(!e.checked,[e.redirectAssetId],t)},onClickAllAsset:function(e,t){var r=V[0][1];t===j.rig.name?A(e,r.map((function(e){return e.redirectAssetId})),t,r.map((function(e){return e.asset_id}))):A(e,r.map((function(e){return e.redirectAssetId})),t)},onScrollReached:function(e){"top"===e&&B>1&&F((function(e){return e-1})),"bottom"===e&&F((function(e){return e+1}))},loadingAssetIds:S})]})};v.propTypes={subjectWellId:i.number.isRequired,companyIds:i.arrayOf(i.number),value:i.string.isRequired,selectedWellIds:i.arrayOf(i.number).isRequired,onChange:i.func.isRequired,searchWidth:i.number,onClose:i.func.isRequired,loadingAssetIds:i.arrayOf(i.number)},v.defaultProps={companyIds:null,searchWidth:null,loadingAssetIds:[]};export{v as AutoCompleteAssetSearch};
2
2
  //# sourceMappingURL=AutoCompleteAssetSearch.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OffsetWellsTable.d.ts","sourceRoot":"","sources":["../../../../../src/components/OffsetWellPickerV5/components/OffsetWellsTable/OffsetWellsTable.js"],"names":[],"mappings":"AAkMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAgE;sBAjM1C,YAAY"}
1
+ {"version":3,"file":"OffsetWellsTable.d.ts","sourceRoot":"","sources":["../../../../../src/components/OffsetWellPickerV5/components/OffsetWellsTable/OffsetWellsTable.js"],"names":[],"mappings":"AAwMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAgE;sBAvM1C,YAAY"}
@@ -1,2 +1,2 @@
1
- import{memo as e,useRef as i,useMemo as l,useLayoutEffect as r,useCallback as t}from"react";import s from"prop-types";import{uniqBy as o}from"lodash";import{Table as n,TableBody as a,TableRow as u,TableCell as c}from"@material-ui/core";import{ColumnType as m,METRICS_LIST as f,EXPANDED_WELL_NAME_WIDTH as d,TableColumns as p}from"../../constants.js";import{useDeferredLoading as h}from"../../effects/useDeferredLoading.js";import{useRowReorderAnimation as W}from"../../effects/useRowReorderAnimation.js";import{getIsImperial as b}from"../../utils/getIsImperial.js";import{useViewStore as R}from"../../stores/view-store/useViewStore.js";import{useViewportStore as w}from"../../stores/viewport-store/useViewportStore.js";import{OffsetWellsTableRow as y}from"./OffsetWellsTableRow.js";import{SkeletonTableRow as S}from"./SkeletonTableRow.js";import g from"./OffsetWellsTable.module.css.js";import{jsx as C,jsxs as q}from"react/jsx-runtime";var v=function(e){var s=e.isTableLoading,v=e.subjectWellId,O=e.columnsWithDict,N=e.wells,j=e.metricsKeys,I=e.handleChangeOffsetWell,L=e.isLimitedOffsetWells,T=e.maxOffsetWellNumber,x=e.wellSections,A=e.setActiveWellId,k=e.onRowClick,V=e.taScores,D=e.isWellSectionColumnVisible,K=e.isLastWell,E=e.loadingWellIds,F=e.scrollContainerRef,B=e.isAnimatingRef,M=R((function(e){return e.isHScrollMoved})),H=R((function(e){return e.isWellNameExpand})),P=w((function(e){return e.isAnyTileLoading()})),z=h(P).isLoading,G=i(),J=l((function(){return o(N,"id")}),[N]),Q=l((function(){return J.map((function(e){return e.id}))}),[J]),U=W(Q,F,B),X=U.tableBodyRef,Y=U.registerRow,Z=U.capturePositions,$=l((function(){return b()}),[]),_=null==O?void 0:O.some((function(e){return e.key===m.company})),ee=(null==V?void 0:V.length)>0,ie=s||z,le=l((function(){var e=new Map(f.map((function(e){return[e.key,e]})));return(j||[]).map((function(i){return e.get(i)})).filter(Boolean)}),[j]),re=l((function(){return H?d-58:p[0].minWidth[j.length]-58}),[H,null==j?void 0:j.length]);r((function(){if(G.current){var e=G.current.querySelectorAll(".".concat(g.wellNameFixed));M?e.forEach((function(e){return e.classList.remove(g.noShadow)})):e.forEach((function(e){return e.classList.add(g.noShadow)}))}}),[M,J]);var te=t((function(e,i){i&&Z(),I(e,i)}),[Z,I]),se=t((function(e){G.current=e,X(e)}),[X]);return O?C("div",{className:g.offsetWellsTable,children:C("div",{className:g.bodyTableWrapper,children:C(n,{"aria-label":"ows table body",innerRef:se,className:g.bodyTable,children:q(a,{children:[J.map((function(e){return C(y,{columnsWithDict:O,subjectWellId:v,data:e,metricsKeys:j,metricsColumns:le,handleChangeOffsetWell:te,wellNameStyle:g.wellNameFixed,wellNameWidth:re,isImperial:$,isLimitedOffsetWells:L,maxOffsetWellNumber:T,wellSections:x,setActiveWellId:A,onRowClick:k,taScores:V,isWellSectionColumnVisible:D,loadingWellIds:E,registerRow:Y},e.id)})),!K&&C(S,{columnsWithDict:O,metricsKeys:j,hasCompanyColumn:_,hasTaColumn:ee,isWellSectionColumnVisible:D,wellNameStyle:g.wellNameFixed}),ie&&Array.from({length:10}).map((function(e,i){return C(S,{columnsWithDict:O,metricsKeys:j,hasCompanyColumn:_,hasTaColumn:ee,isWellSectionColumnVisible:D,wellNameStyle:g.wellNameFixed},"skeleton-".concat(i))})),C(u,{children:C(c,{className:g.bottomShadow})})]})})})}):null};v.propTypes={isTableLoading:s.bool.isRequired,subjectWellId:s.number.isRequired,columnsWithDict:s.arrayOf(s.shape({})).isRequired,wells:s.arrayOf(s.shape({})).isRequired,metricsKeys:s.arrayOf(s.string).isRequired,handleChangeOffsetWell:s.func.isRequired,isLimitedOffsetWells:s.bool.isRequired,maxOffsetWellNumber:s.number.isRequired,wellSections:s.arrayOf(s.shape({})).isRequired,setActiveWellId:s.func.isRequired,onRowClick:s.func.isRequired,taScores:s.arrayOf(s.shape({})).isRequired,isWellSectionColumnVisible:s.bool.isRequired,isLastWell:s.bool.isRequired,loadingWellIds:s.instanceOf(Set).isRequired,scrollContainerRef:s.shape({current:s.instanceOf(Element)}).isRequired,isAnimatingRef:s.shape({current:s.bool}).isRequired};var O=e(v);export{O as OffsetWellsTable};
1
+ import{memo as e,useRef as i,useMemo as l,useLayoutEffect as r,useCallback as s}from"react";import t from"prop-types";import{uniqBy as o}from"lodash";import{Table as n,TableBody as a,TableRow as u,TableCell as c}from"@material-ui/core";import{ColumnType as m,METRICS_LIST as f,EXPANDED_WELL_NAME_WIDTH as d,TableColumns as p}from"../../constants.js";import{useDeferredLoading as W}from"../../effects/useDeferredLoading.js";import{useRowReorderAnimation as h}from"../../effects/useRowReorderAnimation.js";import{getIsImperial as b}from"../../utils/getIsImperial.js";import{usePickerPropsStore as R}from"../../stores/picker-props-store/usePickerPropsStore.js";import{useViewStore as w}from"../../stores/view-store/useViewStore.js";import{useViewportStore as y}from"../../stores/viewport-store/useViewportStore.js";import{OffsetWellsTableRow as S}from"./OffsetWellsTableRow.js";import{SkeletonTableRow as g}from"./SkeletonTableRow.js";import C from"./OffsetWellsTable.module.css.js";import{jsx as q,jsxs as v}from"react/jsx-runtime";var O=function(e){var t=e.isTableLoading,O=e.subjectWellId,N=e.columnsWithDict,j=e.wells,L=e.metricsKeys,I=e.handleChangeOffsetWell,T=e.isLimitedOffsetWells,x=e.maxOffsetWellNumber,A=e.wellSections,k=e.setActiveWellId,V=e.onRowClick,D=e.taScores,K=e.isWellSectionColumnVisible,E=e.isLastWell,F=e.loadingWellIds,P=e.scrollContainerRef,B=e.isAnimatingRef,M=R((function(e){return e.isLoadAllWells})),H=R((function(e){return e.allWellsLoadProgress})),z=M&&H&&!H.isComplete,G=w((function(e){return e.isHScrollMoved})),J=w((function(e){return e.isWellNameExpand})),Q=y((function(e){return e.isAnyTileLoading()})),U=W(Q).isLoading,X=i(),Y=l((function(){return o(j,"id")}),[j]),Z=l((function(){return Y.map((function(e){return e.id}))}),[Y]),$=h(Z,P,B),_=$.tableBodyRef,ee=$.registerRow,ie=$.capturePositions,le=l((function(){return b()}),[]),re=null==N?void 0:N.some((function(e){return e.key===m.company})),se=(null==D?void 0:D.length)>0,te=t||U||z,oe=l((function(){var e=new Map(f.map((function(e){return[e.key,e]})));return(L||[]).map((function(i){return e.get(i)})).filter(Boolean)}),[L]),ne=l((function(){return J?d-58:p[0].minWidth[L.length]-58}),[J,null==L?void 0:L.length]);r((function(){if(X.current){var e=X.current.querySelectorAll(".".concat(C.wellNameFixed));G?e.forEach((function(e){return e.classList.remove(C.noShadow)})):e.forEach((function(e){return e.classList.add(C.noShadow)}))}}),[G,Y]);var ae=s((function(e,i){i&&ie(),I(e,i)}),[ie,I]),ue=s((function(e){X.current=e,_(e)}),[_]);return N?q("div",{className:C.offsetWellsTable,children:q("div",{className:C.bodyTableWrapper,children:q(n,{"aria-label":"ows table body",innerRef:ue,className:C.bodyTable,children:v(a,{children:[Y.map((function(e){return q(S,{columnsWithDict:N,subjectWellId:O,data:e,metricsKeys:L,metricsColumns:oe,handleChangeOffsetWell:ae,wellNameStyle:C.wellNameFixed,wellNameWidth:ne,isImperial:le,isLimitedOffsetWells:T,maxOffsetWellNumber:x,wellSections:A,setActiveWellId:k,onRowClick:V,taScores:D,isWellSectionColumnVisible:K,loadingWellIds:F,registerRow:ee},e.id)})),!E&&q(g,{columnsWithDict:N,metricsKeys:L,hasCompanyColumn:re,hasTaColumn:se,isWellSectionColumnVisible:K,wellNameStyle:C.wellNameFixed}),te&&Array.from({length:10}).map((function(e,i){return q(g,{columnsWithDict:N,metricsKeys:L,hasCompanyColumn:re,hasTaColumn:se,isWellSectionColumnVisible:K,wellNameStyle:C.wellNameFixed},"skeleton-".concat(i))})),q(u,{children:q(c,{className:C.bottomShadow})})]})})})}):null};O.propTypes={isTableLoading:t.bool.isRequired,subjectWellId:t.number.isRequired,columnsWithDict:t.arrayOf(t.shape({})).isRequired,wells:t.arrayOf(t.shape({})).isRequired,metricsKeys:t.arrayOf(t.string).isRequired,handleChangeOffsetWell:t.func.isRequired,isLimitedOffsetWells:t.bool.isRequired,maxOffsetWellNumber:t.number.isRequired,wellSections:t.arrayOf(t.shape({})).isRequired,setActiveWellId:t.func.isRequired,onRowClick:t.func.isRequired,taScores:t.arrayOf(t.shape({})).isRequired,isWellSectionColumnVisible:t.bool.isRequired,isLastWell:t.bool.isRequired,loadingWellIds:t.instanceOf(Set).isRequired,scrollContainerRef:t.shape({current:t.instanceOf(Element)}).isRequired,isAnimatingRef:t.shape({current:t.bool}).isRequired};var N=e(O);export{N as OffsetWellsTable};
2
2
  //# sourceMappingURL=OffsetWellsTable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OffsetWellsTable.js","sources":["../../../../../src/components/OffsetWellPickerV5/components/OffsetWellsTable/OffsetWellsTable.js"],"sourcesContent":["import { memo, useCallback, useLayoutEffect, useMemo, useRef } from 'react';\nimport PropTypes from 'prop-types';\nimport { uniqBy } from 'lodash';\nimport { Table, TableBody, TableCell, TableRow } from '@material-ui/core';\n\nimport { ColumnType, EXPANDED_WELL_NAME_WIDTH, METRICS_LIST, TableColumns } from '../../constants';\nimport { useDeferredLoading } from '../../effects/useDeferredLoading';\nimport { useRowReorderAnimation } from '../../effects/useRowReorderAnimation';\nimport { getIsImperial } from '../../utils/getIsImperial';\nimport { useViewStore } from '../../stores/view-store/useViewStore';\nimport { useViewportStore } from '../../stores/viewport-store/useViewportStore';\n\nimport { OffsetWellsTableRow } from './OffsetWellsTableRow';\nimport { SkeletonTableRow } from './SkeletonTableRow';\n\nimport styles from './OffsetWellsTable.module.css';\n\nconst SKELETON_ROW_COUNT = 10;\n\nconst DIFF_WELL_NAME_WIDTH = 58;\n\nconst OffsetWellsTableComponent = ({\n isTableLoading,\n subjectWellId,\n columnsWithDict,\n wells: updatedWells,\n metricsKeys,\n handleChangeOffsetWell,\n isLimitedOffsetWells,\n maxOffsetWellNumber,\n wellSections,\n setActiveWellId,\n onRowClick,\n taScores,\n isWellSectionColumnVisible,\n isLastWell,\n loadingWellIds,\n scrollContainerRef,\n isAnimatingRef,\n}) => {\n const isHScrollMoved = useViewStore(state => state.isHScrollMoved);\n const isWellNameExpand = useViewStore(state => state.isWellNameExpand);\n const isAnyTileLoading = useViewportStore(state => state.isAnyTileLoading());\n const { isLoading: isDeferredTileLoading } = useDeferredLoading(isAnyTileLoading);\n /** @type {ReturnType<typeof useRef<HTMLElement>>} */\n const bodyTableRef = useRef();\n\n const uniqWells = useMemo(() => uniqBy(updatedWells, 'id'), [updatedWells]);\n\n const wellIds = useMemo(() => uniqWells.map(well => well.id), [uniqWells]);\n\n const { tableBodyRef, registerRow, capturePositions } = useRowReorderAnimation(\n wellIds,\n scrollContainerRef,\n isAnimatingRef\n );\n\n const isImperial = useMemo(() => getIsImperial(), []);\n\n const hasCompanyColumn = columnsWithDict?.some(col => col.key === ColumnType.company);\n const hasTaColumn = taScores?.length > 0;\n\n // Show skeleton rows when loading (fills remaining space below existing wells)\n // Use deferred tile loading to catch loading state even during debounce window\n const showSkeletonRows = isTableLoading || isDeferredTileLoading;\n\n const metricsColumns = useMemo(() => {\n // NOTE: Pay attention to the order of metrics and duplication\n const metricsMap = new Map(METRICS_LIST.map(item => [item.key, item]));\n return (metricsKeys || []).map(key => metricsMap.get(key)).filter(Boolean);\n }, [metricsKeys]);\n\n const wellNameWidth = useMemo(() => {\n if (isWellNameExpand) return EXPANDED_WELL_NAME_WIDTH - DIFF_WELL_NAME_WIDTH;\n return TableColumns[0].minWidth[metricsKeys.length] - DIFF_WELL_NAME_WIDTH;\n }, [isWellNameExpand, metricsKeys?.length]);\n\n // NOTE: Remove shadow from column - Body table only now\n useLayoutEffect(() => {\n if (!bodyTableRef.current) return;\n\n // Body table\n const bodyColumns = bodyTableRef.current.querySelectorAll(`.${styles.wellNameFixed}`);\n\n if (!isHScrollMoved) {\n bodyColumns.forEach(th => th.classList.add(styles.noShadow));\n } else {\n bodyColumns.forEach(th => th.classList.remove(styles.noShadow));\n }\n // TODO: Check reference stability. Initially had bodyTableRef.current\n }, [isHScrollMoved, uniqWells]);\n\n const handleChangeOffsetWellWithAnimation = useCallback(\n (well, checked) => {\n if (checked) {\n capturePositions();\n }\n handleChangeOffsetWell(well, checked);\n },\n [capturePositions, handleChangeOffsetWell]\n );\n\n const combinedTableRef = useCallback(\n node => {\n bodyTableRef.current = node;\n tableBodyRef(node);\n },\n [tableBodyRef]\n );\n\n if (!columnsWithDict) return null;\n\n return (\n <div className={styles.offsetWellsTable}>\n <div className={styles.bodyTableWrapper}>\n <Table aria-label=\"ows table body\" innerRef={combinedTableRef} className={styles.bodyTable}>\n <TableBody>\n {uniqWells.map(well => (\n <OffsetWellsTableRow\n key={well.id}\n columnsWithDict={columnsWithDict}\n subjectWellId={subjectWellId}\n data={well}\n metricsKeys={metricsKeys}\n metricsColumns={metricsColumns}\n handleChangeOffsetWell={handleChangeOffsetWellWithAnimation}\n wellNameStyle={styles.wellNameFixed}\n wellNameWidth={wellNameWidth}\n isImperial={isImperial}\n isLimitedOffsetWells={isLimitedOffsetWells}\n maxOffsetWellNumber={maxOffsetWellNumber}\n wellSections={wellSections}\n setActiveWellId={setActiveWellId}\n onRowClick={onRowClick}\n taScores={taScores}\n isWellSectionColumnVisible={isWellSectionColumnVisible}\n loadingWellIds={loadingWellIds}\n registerRow={registerRow}\n />\n ))}\n {/* Show 1 skeleton row when more wells are pending render */}\n {!isLastWell && (\n <SkeletonTableRow\n columnsWithDict={columnsWithDict}\n metricsKeys={metricsKeys}\n hasCompanyColumn={hasCompanyColumn}\n hasTaColumn={hasTaColumn}\n isWellSectionColumnVisible={isWellSectionColumnVisible}\n wellNameStyle={styles.wellNameFixed}\n />\n )}\n {/* Skeleton rows to fill remaining space when loading */}\n {showSkeletonRows &&\n Array.from({ length: SKELETON_ROW_COUNT }).map((_, index) => (\n <SkeletonTableRow\n key={`skeleton-${index}`}\n columnsWithDict={columnsWithDict}\n metricsKeys={metricsKeys}\n hasCompanyColumn={hasCompanyColumn}\n hasTaColumn={hasTaColumn}\n isWellSectionColumnVisible={isWellSectionColumnVisible}\n wellNameStyle={styles.wellNameFixed}\n />\n ))}\n <TableRow>\n <TableCell className={styles.bottomShadow} />\n </TableRow>\n </TableBody>\n </Table>\n </div>\n </div>\n );\n};\n\nOffsetWellsTableComponent.propTypes = {\n isTableLoading: PropTypes.bool.isRequired,\n subjectWellId: PropTypes.number.isRequired,\n columnsWithDict: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n wells: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n metricsKeys: PropTypes.arrayOf(PropTypes.string).isRequired,\n handleChangeOffsetWell: PropTypes.func.isRequired,\n isLimitedOffsetWells: PropTypes.bool.isRequired,\n maxOffsetWellNumber: PropTypes.number.isRequired,\n wellSections: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n setActiveWellId: PropTypes.func.isRequired,\n onRowClick: PropTypes.func.isRequired,\n taScores: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n isWellSectionColumnVisible: PropTypes.bool.isRequired,\n isLastWell: PropTypes.bool.isRequired,\n loadingWellIds: PropTypes.instanceOf(Set).isRequired,\n scrollContainerRef: PropTypes.shape({ current: PropTypes.instanceOf(Element) }).isRequired,\n isAnimatingRef: PropTypes.shape({ current: PropTypes.bool }).isRequired,\n};\n\nexport const OffsetWellsTable = memo(OffsetWellsTableComponent);\n"],"names":["OffsetWellsTableComponent","_ref","isTableLoading","subjectWellId","columnsWithDict","updatedWells","wells","metricsKeys","handleChangeOffsetWell","isLimitedOffsetWells","maxOffsetWellNumber","wellSections","setActiveWellId","onRowClick","taScores","isWellSectionColumnVisible","isLastWell","loadingWellIds","scrollContainerRef","isAnimatingRef","isHScrollMoved","useViewStore","state","isWellNameExpand","isAnyTileLoading","useViewportStore","isDeferredTileLoading","useDeferredLoading","isLoading","bodyTableRef","useRef","uniqWells","useMemo","uniqBy","wellIds","map","well","id","_useRowReorderAnimati","useRowReorderAnimation","tableBodyRef","registerRow","capturePositions","isImperial","getIsImperial","hasCompanyColumn","some","col","key","ColumnType","company","hasTaColumn","length","showSkeletonRows","metricsColumns","metricsMap","Map","METRICS_LIST","item","get","filter","Boolean","wellNameWidth","EXPANDED_WELL_NAME_WIDTH","TableColumns","minWidth","useLayoutEffect","current","bodyColumns","querySelectorAll","styles","wellNameFixed","forEach","th","classList","remove","noShadow","add","handleChangeOffsetWellWithAnimation","useCallback","checked","combinedTableRef","node","_jsx","className","offsetWellsTable","children","bodyTableWrapper","Table","innerRef","bodyTable","_jsxs","TableBody","OffsetWellsTableRow","data","wellNameStyle","SkeletonTableRow","Array","from","_","index","concat","TableRow","TableCell","bottomShadow","propTypes","PropTypes","bool","isRequired","number","arrayOf","shape","string","func","instanceOf","Set","Element","OffsetWellsTable","memo"],"mappings":"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"}
1
+ {"version":3,"file":"OffsetWellsTable.js","sources":["../../../../../src/components/OffsetWellPickerV5/components/OffsetWellsTable/OffsetWellsTable.js"],"sourcesContent":["import { memo, useCallback, useLayoutEffect, useMemo, useRef } from 'react';\nimport PropTypes from 'prop-types';\nimport { uniqBy } from 'lodash';\nimport { Table, TableBody, TableCell, TableRow } from '@material-ui/core';\n\nimport { ColumnType, EXPANDED_WELL_NAME_WIDTH, METRICS_LIST, TableColumns } from '../../constants';\nimport { useDeferredLoading } from '../../effects/useDeferredLoading';\nimport { useRowReorderAnimation } from '../../effects/useRowReorderAnimation';\nimport { getIsImperial } from '../../utils/getIsImperial';\nimport { usePickerPropsStore } from '../../stores/picker-props-store/usePickerPropsStore';\nimport { useViewStore } from '../../stores/view-store/useViewStore';\nimport { useViewportStore } from '../../stores/viewport-store/useViewportStore';\n\nimport { OffsetWellsTableRow } from './OffsetWellsTableRow';\nimport { SkeletonTableRow } from './SkeletonTableRow';\n\nimport styles from './OffsetWellsTable.module.css';\n\nconst SKELETON_ROW_COUNT = 10;\n\nconst DIFF_WELL_NAME_WIDTH = 58;\n\nconst OffsetWellsTableComponent = ({\n isTableLoading,\n subjectWellId,\n columnsWithDict,\n wells: updatedWells,\n metricsKeys,\n handleChangeOffsetWell,\n isLimitedOffsetWells,\n maxOffsetWellNumber,\n wellSections,\n setActiveWellId,\n onRowClick,\n taScores,\n isWellSectionColumnVisible,\n isLastWell,\n loadingWellIds,\n scrollContainerRef,\n isAnimatingRef,\n}) => {\n const isLoadAllWells = usePickerPropsStore(state => state.isLoadAllWells);\n const allWellsLoadProgress = usePickerPropsStore(state => state.allWellsLoadProgress);\n const isAllWellsLoading =\n isLoadAllWells && allWellsLoadProgress && !allWellsLoadProgress.isComplete;\n const isHScrollMoved = useViewStore(state => state.isHScrollMoved);\n const isWellNameExpand = useViewStore(state => state.isWellNameExpand);\n const isAnyTileLoading = useViewportStore(state => state.isAnyTileLoading());\n const { isLoading: isDeferredTileLoading } = useDeferredLoading(isAnyTileLoading);\n /** @type {ReturnType<typeof useRef<HTMLElement>>} */\n const bodyTableRef = useRef();\n\n const uniqWells = useMemo(() => uniqBy(updatedWells, 'id'), [updatedWells]);\n\n const wellIds = useMemo(() => uniqWells.map(well => well.id), [uniqWells]);\n\n const { tableBodyRef, registerRow, capturePositions } = useRowReorderAnimation(\n wellIds,\n scrollContainerRef,\n isAnimatingRef\n );\n\n const isImperial = useMemo(() => getIsImperial(), []);\n\n const hasCompanyColumn = columnsWithDict?.some(col => col.key === ColumnType.company);\n const hasTaColumn = taScores?.length > 0;\n\n // Show skeleton rows when loading (fills remaining space below existing wells)\n // Use deferred tile loading to catch loading state even during debounce window\n // Also show skeletons during all-wells mode loading (when tiles are cleared)\n const showSkeletonRows = isTableLoading || isDeferredTileLoading || isAllWellsLoading;\n\n const metricsColumns = useMemo(() => {\n // NOTE: Pay attention to the order of metrics and duplication\n const metricsMap = new Map(METRICS_LIST.map(item => [item.key, item]));\n return (metricsKeys || []).map(key => metricsMap.get(key)).filter(Boolean);\n }, [metricsKeys]);\n\n const wellNameWidth = useMemo(() => {\n if (isWellNameExpand) return EXPANDED_WELL_NAME_WIDTH - DIFF_WELL_NAME_WIDTH;\n return TableColumns[0].minWidth[metricsKeys.length] - DIFF_WELL_NAME_WIDTH;\n }, [isWellNameExpand, metricsKeys?.length]);\n\n // NOTE: Remove shadow from column - Body table only now\n useLayoutEffect(() => {\n if (!bodyTableRef.current) return;\n\n // Body table\n const bodyColumns = bodyTableRef.current.querySelectorAll(`.${styles.wellNameFixed}`);\n\n if (!isHScrollMoved) {\n bodyColumns.forEach(th => th.classList.add(styles.noShadow));\n } else {\n bodyColumns.forEach(th => th.classList.remove(styles.noShadow));\n }\n // TODO: Check reference stability. Initially had bodyTableRef.current\n }, [isHScrollMoved, uniqWells]);\n\n const handleChangeOffsetWellWithAnimation = useCallback(\n (well, checked) => {\n if (checked) {\n capturePositions();\n }\n handleChangeOffsetWell(well, checked);\n },\n [capturePositions, handleChangeOffsetWell]\n );\n\n const combinedTableRef = useCallback(\n node => {\n bodyTableRef.current = node;\n tableBodyRef(node);\n },\n [tableBodyRef]\n );\n\n if (!columnsWithDict) return null;\n\n return (\n <div className={styles.offsetWellsTable}>\n <div className={styles.bodyTableWrapper}>\n <Table aria-label=\"ows table body\" innerRef={combinedTableRef} className={styles.bodyTable}>\n <TableBody>\n {uniqWells.map(well => (\n <OffsetWellsTableRow\n key={well.id}\n columnsWithDict={columnsWithDict}\n subjectWellId={subjectWellId}\n data={well}\n metricsKeys={metricsKeys}\n metricsColumns={metricsColumns}\n handleChangeOffsetWell={handleChangeOffsetWellWithAnimation}\n wellNameStyle={styles.wellNameFixed}\n wellNameWidth={wellNameWidth}\n isImperial={isImperial}\n isLimitedOffsetWells={isLimitedOffsetWells}\n maxOffsetWellNumber={maxOffsetWellNumber}\n wellSections={wellSections}\n setActiveWellId={setActiveWellId}\n onRowClick={onRowClick}\n taScores={taScores}\n isWellSectionColumnVisible={isWellSectionColumnVisible}\n loadingWellIds={loadingWellIds}\n registerRow={registerRow}\n />\n ))}\n {/* Show 1 skeleton row when more wells are pending render */}\n {!isLastWell && (\n <SkeletonTableRow\n columnsWithDict={columnsWithDict}\n metricsKeys={metricsKeys}\n hasCompanyColumn={hasCompanyColumn}\n hasTaColumn={hasTaColumn}\n isWellSectionColumnVisible={isWellSectionColumnVisible}\n wellNameStyle={styles.wellNameFixed}\n />\n )}\n {/* Skeleton rows to fill remaining space when loading */}\n {showSkeletonRows &&\n Array.from({ length: SKELETON_ROW_COUNT }).map((_, index) => (\n <SkeletonTableRow\n key={`skeleton-${index}`}\n columnsWithDict={columnsWithDict}\n metricsKeys={metricsKeys}\n hasCompanyColumn={hasCompanyColumn}\n hasTaColumn={hasTaColumn}\n isWellSectionColumnVisible={isWellSectionColumnVisible}\n wellNameStyle={styles.wellNameFixed}\n />\n ))}\n <TableRow>\n <TableCell className={styles.bottomShadow} />\n </TableRow>\n </TableBody>\n </Table>\n </div>\n </div>\n );\n};\n\nOffsetWellsTableComponent.propTypes = {\n isTableLoading: PropTypes.bool.isRequired,\n subjectWellId: PropTypes.number.isRequired,\n columnsWithDict: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n wells: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n metricsKeys: PropTypes.arrayOf(PropTypes.string).isRequired,\n handleChangeOffsetWell: PropTypes.func.isRequired,\n isLimitedOffsetWells: PropTypes.bool.isRequired,\n maxOffsetWellNumber: PropTypes.number.isRequired,\n wellSections: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n setActiveWellId: PropTypes.func.isRequired,\n onRowClick: PropTypes.func.isRequired,\n taScores: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n isWellSectionColumnVisible: PropTypes.bool.isRequired,\n isLastWell: PropTypes.bool.isRequired,\n loadingWellIds: PropTypes.instanceOf(Set).isRequired,\n scrollContainerRef: PropTypes.shape({ current: PropTypes.instanceOf(Element) }).isRequired,\n isAnimatingRef: PropTypes.shape({ current: PropTypes.bool }).isRequired,\n};\n\nexport const OffsetWellsTable = memo(OffsetWellsTableComponent);\n"],"names":["OffsetWellsTableComponent","_ref","isTableLoading","subjectWellId","columnsWithDict","updatedWells","wells","metricsKeys","handleChangeOffsetWell","isLimitedOffsetWells","maxOffsetWellNumber","wellSections","setActiveWellId","onRowClick","taScores","isWellSectionColumnVisible","isLastWell","loadingWellIds","scrollContainerRef","isAnimatingRef","isLoadAllWells","usePickerPropsStore","state","allWellsLoadProgress","isAllWellsLoading","isComplete","isHScrollMoved","useViewStore","isWellNameExpand","isAnyTileLoading","useViewportStore","isDeferredTileLoading","useDeferredLoading","isLoading","bodyTableRef","useRef","uniqWells","useMemo","uniqBy","wellIds","map","well","id","_useRowReorderAnimati","useRowReorderAnimation","tableBodyRef","registerRow","capturePositions","isImperial","getIsImperial","hasCompanyColumn","some","col","key","ColumnType","company","hasTaColumn","length","showSkeletonRows","metricsColumns","metricsMap","Map","METRICS_LIST","item","get","filter","Boolean","wellNameWidth","EXPANDED_WELL_NAME_WIDTH","TableColumns","minWidth","useLayoutEffect","current","bodyColumns","querySelectorAll","styles","wellNameFixed","forEach","th","classList","remove","noShadow","add","handleChangeOffsetWellWithAnimation","useCallback","checked","combinedTableRef","node","_jsx","className","offsetWellsTable","children","bodyTableWrapper","Table","innerRef","bodyTable","_jsxs","TableBody","OffsetWellsTableRow","data","wellNameStyle","SkeletonTableRow","Array","from","_","index","concat","TableRow","TableCell","bottomShadow","propTypes","PropTypes","bool","isRequired","number","arrayOf","shape","string","func","instanceOf","Set","Element","OffsetWellsTable","memo"],"mappings":"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"}
@@ -14,4 +14,5 @@ export * from './useViewportWells';
14
14
  export * from './useTileLoading';
15
15
  export * from './useDeferredLoading';
16
16
  export * from './useInitialBounds';
17
+ export * from './useLoadAllWellsCompanySafeguard';
17
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV5/effects/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV5/effects/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mCAAmC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { useAllWells } from './useAllWells';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/OffsetWellPickerV5/effects/useAllWells/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const useAllWells: (enabled: boolean, isSafeguardReady: boolean) => void;
2
+ //# sourceMappingURL=useAllWells.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAllWells.d.ts","sourceRoot":"","sources":["../../../../../src/components/OffsetWellPickerV5/effects/useAllWells/useAllWells.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,WAAW,GAAI,SAAS,OAAO,EAAE,kBAAkB,OAAO,KAAG,IA8JzE,CAAC"}