@corva/ui 3.73.0-3 → 3.73.0-4

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 (48) hide show
  1. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  2. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
  3. package/cjs-bundle/components/OffsetWellPickerV5/OffsetWellPickerV5.js +1 -1
  4. package/cjs-bundle/components/OffsetWellPickerV5/OffsetWellPickerV5.js.map +1 -1
  5. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-selection/useWellReconciliation.js +1 -1
  6. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-selection/useWellReconciliation.js.map +1 -1
  7. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-selection/useWellSelection.js +1 -1
  8. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-selection/useWellSelection.js.map +1 -1
  9. package/cjs-bundle/componentsV2/AppCommonsProvider/AppCommonsContext.js.map +1 -1
  10. package/cjs-bundle/componentsV2/AppCommonsProvider/utils.js +1 -1
  11. package/cjs-bundle/componentsV2/AppCommonsProvider/utils.js.map +1 -1
  12. package/cjs-bundle/effects/useGlobalOffsetWellsSync.js +1 -1
  13. package/cjs-bundle/effects/useGlobalOffsetWellsSync.js.map +1 -1
  14. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.d.ts.map +1 -1
  15. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  16. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
  17. package/components/OffsetWellPickerV4/OffsetWellPickerV4.d.ts.map +1 -1
  18. package/components/OffsetWellPickerV4/effects/index.d.ts +1 -0
  19. package/components/OffsetWellPickerV4/effects/index.d.ts.map +1 -1
  20. package/components/OffsetWellPickerV4/effects/useBootstrapSelectedWells.d.ts +15 -0
  21. package/components/OffsetWellPickerV4/effects/useBootstrapSelectedWells.d.ts.map +1 -0
  22. package/components/OffsetWellPickerV4/utils/mergeInitSelectedWells.d.ts +103 -0
  23. package/components/OffsetWellPickerV4/utils/mergeInitSelectedWells.d.ts.map +1 -0
  24. package/components/OffsetWellPickerV5/OffsetWellPickerV5.d.ts.map +1 -1
  25. package/components/OffsetWellPickerV5/OffsetWellPickerV5.js +1 -1
  26. package/components/OffsetWellPickerV5/OffsetWellPickerV5.js.map +1 -1
  27. package/components/OffsetWellPickerV5/hooks/use-well-selection/useWellReconciliation.d.ts +3 -3
  28. package/components/OffsetWellPickerV5/hooks/use-well-selection/useWellReconciliation.d.ts.map +1 -1
  29. package/components/OffsetWellPickerV5/hooks/use-well-selection/useWellReconciliation.js +1 -1
  30. package/components/OffsetWellPickerV5/hooks/use-well-selection/useWellReconciliation.js.map +1 -1
  31. package/components/OffsetWellPickerV5/hooks/use-well-selection/useWellSelection.d.ts.map +1 -1
  32. package/components/OffsetWellPickerV5/hooks/use-well-selection/useWellSelection.js +1 -1
  33. package/components/OffsetWellPickerV5/hooks/use-well-selection/useWellSelection.js.map +1 -1
  34. package/components/OffsetWellPickerV5/hooks/use-well-selection/useWellSelection.types.d.ts +0 -1
  35. package/components/OffsetWellPickerV5/hooks/use-well-selection/useWellSelection.types.d.ts.map +1 -1
  36. package/componentsV2/AppCommonsProvider/AppCommonsContext.d.ts +2 -0
  37. package/componentsV2/AppCommonsProvider/AppCommonsContext.d.ts.map +1 -1
  38. package/componentsV2/AppCommonsProvider/AppCommonsContext.js.map +1 -1
  39. package/componentsV2/AppCommonsProvider/utils.d.ts +1 -1
  40. package/componentsV2/AppCommonsProvider/utils.d.ts.map +1 -1
  41. package/componentsV2/AppCommonsProvider/utils.js +1 -1
  42. package/componentsV2/AppCommonsProvider/utils.js.map +1 -1
  43. package/effects/useGlobalOffsetWellsSync.d.ts.map +1 -1
  44. package/effects/useGlobalOffsetWellsSync.js +1 -1
  45. package/effects/useGlobalOffsetWellsSync.js.map +1 -1
  46. package/mcp-server/server.mjs +1 -1
  47. package/package.json +1 -1
  48. package/tsconfig.tsbuildinfo +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"useWellSelection.js","sources":["../../../../../../src/components/OffsetWellPickerV5/hooks/use-well-selection/useWellSelection.ts"],"sourcesContent":["import { useState, useRef, useCallback, useMemo } from 'react';\n\nimport { ALL_SECTION_KEY } from '../../constants';\nimport type { OffsetWell } from '../../OffsetWellPickerV5.types';\nimport type { SelectionZone } from '../../types/SelectionZone';\n\nimport type { UseWellSelectionParams, UseWellSelectionReturn } from './useWellSelection.types';\nimport { useFilterPruneEffect } from './useFilterPruneEffect';\nimport { useWellReconciliation } from './useWellReconciliation';\nimport { useSelectionHandlers } from './useSelectionHandlers';\n\n/**\n * Manages well selection state, reconciliation with external settings,\n * and all selection handlers (single, all, batch, section, zone).\n */\nexport const useWellSelection = (params: UseWellSelectionParams): UseWellSelectionReturn => {\n const {\n subjectWellId,\n subjectWell,\n wells,\n filteredWells,\n externalOffsets,\n rawWellsWithSubject,\n offsetSettings,\n maxOffsetWellNumber,\n maxOffsetSize,\n open,\n isAllWellsLoaded,\n fetchSearchedWells,\n filters,\n filterMutationSeq,\n lastFilterMutationSource,\n includeHidden,\n } = params;\n\n const [selectedWells, setSelectedWells] = useState<OffsetWell[]>([]);\n const hasUserSelectionEditsRef = useRef(false);\n const searchGenerationRef = useRef(0);\n\n const [currentSelectionZone, setCurrentSelectionZone] = useState<SelectionZone | null>(\n () => offsetSettings?.lastSelectionZone ?? null\n );\n const [selectedWellSection, setSelectedWellSection] = useState(\n offsetSettings?.wellSection || ALL_SECTION_KEY\n );\n const [loadingAssetIds, setLoadingAssetIds] = useState<number[]>([]);\n\n useFilterPruneEffect({\n filterMutationSeq,\n lastFilterMutationSource,\n open,\n filters,\n includeHidden,\n subjectWellId,\n setSelectedWells,\n setCurrentSelectionZone,\n hasUserSelectionEditsRef,\n });\n\n const { isReconciled } = useWellReconciliation({\n subjectWell,\n wells,\n offsetSettings,\n open,\n isAllWellsLoaded,\n fetchSearchedWells,\n setSelectedWells,\n hasUserSelectionEditsRef,\n });\n\n const handlers = useSelectionHandlers({\n subjectWell,\n wells,\n filteredWells,\n externalOffsets,\n rawWellsWithSubject,\n maxOffsetWellNumber,\n maxOffsetSize,\n fetchSearchedWells,\n setSelectedWells,\n setCurrentSelectionZone,\n setSelectedWellSection,\n hasUserSelectionEditsRef,\n });\n\n const markUserEdit = useCallback(() => {\n hasUserSelectionEditsRef.current = true;\n }, []);\n\n // Bumps a generation counter so any in-flight `useAdvancedSearchHandler` work\n // resolving after this call can detect the abandon and skip its state writes.\n const abandonPendingSearch = useCallback(() => {\n searchGenerationRef.current += 1;\n }, []);\n\n const selectedWellsCount = useMemo(() => {\n if (selectedWells.find(well => well.id === subjectWellId)) return selectedWells.length - 1;\n return selectedWells.length;\n }, [selectedWells, subjectWellId]);\n\n const selectedWellIds = useMemo(() => selectedWells.map(({ id }) => id), [selectedWells]);\n\n return {\n selectedWells,\n setSelectedWells,\n selectedWellsCount,\n selectedWellIds,\n isReconciled,\n currentSelectionZone,\n setCurrentSelectionZone,\n selectedWellSection,\n setSelectedWellSection,\n loadingAssetIds,\n setLoadingAssetIds,\n searchGenerationRef,\n hasUserSelectionEditsRef,\n markUserEdit,\n abandonPendingSearch,\n ...handlers,\n };\n};\n"],"names":["params","subjectWellId","subjectWell","wells","filteredWells","externalOffsets","rawWellsWithSubject","offsetSettings","maxOffsetWellNumber","maxOffsetSize","open","isAllWellsLoaded","fetchSearchedWells","filters","filterMutationSeq","lastFilterMutationSource","includeHidden","useState","_useState2","_slicedToArray","_useState","selectedWells","setSelectedWells","hasUserSelectionEditsRef","useRef","searchGenerationRef","_useState3","_offsetSettings$lastS","lastSelectionZone","_useState4","currentSelectionZone","setCurrentSelectionZone","_useState5","wellSection","ALL_SECTION_KEY","_useState6","selectedWellSection","setSelectedWellSection","_useState8","_useState7","loadingAssetIds","setLoadingAssetIds","useFilterPruneEffect","isReconciled","useWellReconciliation","handlers","useSelectionHandlers","markUserEdit","useCallback","current","abandonPendingSearch","selectedWellsCount","useMemo","find","well","id","length","selectedWellIds","map","_ref","_objectSpread"],"mappings":"uqBAegC,SAACA,GAC/B,IACEC,EAgBED,EAhBFC,cACAC,EAeEF,EAfFE,YACAC,EAcEH,EAdFG,MACAC,EAaEJ,EAbFI,cACAC,EAYEL,EAZFK,gBACAC,EAWEN,EAXFM,oBACAC,EAUEP,EAVFO,eACAC,EASER,EATFQ,oBACAC,EAQET,EARFS,cACAC,EAOEV,EAPFU,KACAC,EAMEX,EANFW,iBACAC,EAKEZ,EALFY,mBACAC,EAIEb,EAJFa,QACAC,EAGEd,EAHFc,kBACAC,EAEEf,EAFFe,yBACAC,EACEhB,EADFgB,cAGwCC,EAAAA,EAAQA,SAAe,IAAGC,EAAAC,EAAAA,QAAAC,EAAA,GAA7DC,EAAaH,EAAA,GAAEI,EAAgBJ,EAAA,GAChCK,EAA2BC,UAAO,GAClCC,EAAsBD,SAAO,GAEnCE,EAAwDT,EAAAA,UACtD,WAAA,IAAAU,EAAA,eAAMpB,EAAAA,aAAc,EAAdA,EAAgBqB,iCAAqB,QAC5CC,EAAAV,EAAAA,QAAAO,EAAA,GAFMI,EAAoBD,EAAA,GAAEE,EAAuBF,EAAA,GAGpDG,EAAsDf,EAAAA,UACpDV,aAAAA,EAAAA,EAAgB0B,cAAeC,EAAAA,iBAChCC,EAAAhB,EAAAA,QAAAa,EAAA,GAFMI,EAAmBD,EAAA,GAAEE,EAAsBF,EAAA,GAGJlB,EAAAA,EAAQA,SAAW,IAAGqB,EAAAnB,EAAAA,QAAAoB,EAAA,GAA7DC,EAAeF,EAAA,GAAEG,EAAkBH,EAAA,GAE1CI,uBAAqB,CACnB5B,kBAAAA,EACAC,yBAAAA,EACAL,KAAAA,EACAG,QAAAA,EACAG,cAAAA,EACAf,cAAAA,EACAqB,iBAAAA,EACAS,wBAAAA,EACAR,yBAAAA,IAGF,IAAQoB,EAAiBC,EAAAA,sBAAsB,CAC7C1C,YAAAA,EACAC,MAAAA,EACAI,eAAAA,EACAG,KAAAA,EACAC,iBAAAA,EACAC,mBAAAA,EACAU,iBAAAA,EACAC,yBAAAA,IARMoB,aAWFE,EAAWC,EAAAA,qBAAqB,CACpC5C,YAAAA,EACAC,MAAAA,EACAC,cAAAA,EACAC,gBAAAA,EACAC,oBAAAA,EACAE,oBAAAA,EACAC,cAAAA,EACAG,mBAAAA,EACAU,iBAAAA,EACAS,wBAAAA,EACAM,uBAAAA,EACAd,yBAAAA,IAGIwB,EAAeC,EAAAA,aAAY,WAC/BzB,EAAyB0B,SAAU,CACpC,GAAE,IAIGC,EAAuBF,EAAAA,aAAY,WACvCvB,EAAoBwB,SAAW,CAChC,GAAE,IAEGE,EAAqBC,EAAAA,SAAQ,WACjC,OAAI/B,EAAcgC,MAAK,SAAAC,GAAI,OAAIA,EAAKC,KAAOtD,CAAa,IAAUoB,EAAcmC,OAAS,EAClFnC,EAAcmC,MACvB,GAAG,CAACnC,EAAepB,IAEbwD,EAAkBL,EAAAA,SAAQ,WAAA,OAAM/B,EAAcqC,KAAI,SAAAC,GAAK,SAAFJ,QAAc,CAAClC,IAE1E,8WAAAuC,CAAA,CACEvC,cAAAA,EACAC,iBAAAA,EACA6B,mBAAAA,EACAM,gBAAAA,EACAd,aAAAA,EACAb,qBAAAA,EACAC,wBAAAA,EACAK,oBAAAA,EACAC,uBAAAA,EACAG,gBAAAA,EACAC,mBAAAA,EACAhB,oBAAAA,EACAF,yBAAAA,EACAwB,aAAAA,EACAG,qBAAAA,GACGL,EAEP"}
1
+ {"version":3,"file":"useWellSelection.js","sources":["../../../../../../src/components/OffsetWellPickerV5/hooks/use-well-selection/useWellSelection.ts"],"sourcesContent":["import { useState, useRef, useCallback, useMemo } from 'react';\n\nimport { ALL_SECTION_KEY } from '../../constants';\nimport type { OffsetWell } from '../../OffsetWellPickerV5.types';\nimport type { SelectionZone } from '../../types/SelectionZone';\n\nimport type { UseWellSelectionParams, UseWellSelectionReturn } from './useWellSelection.types';\nimport { useFilterPruneEffect } from './useFilterPruneEffect';\nimport { useWellReconciliation } from './useWellReconciliation';\nimport { useSelectionHandlers } from './useSelectionHandlers';\n\n/**\n * Manages well selection state, reconciliation with external settings,\n * and all selection handlers (single, all, batch, section, zone).\n */\nexport const useWellSelection = (params: UseWellSelectionParams): UseWellSelectionReturn => {\n const {\n subjectWellId,\n subjectWell,\n wells,\n filteredWells,\n externalOffsets,\n rawWellsWithSubject,\n offsetSettings,\n maxOffsetWellNumber,\n maxOffsetSize,\n open,\n fetchSearchedWells,\n filters,\n filterMutationSeq,\n lastFilterMutationSource,\n includeHidden,\n } = params;\n\n const [selectedWells, setSelectedWells] = useState<OffsetWell[]>([]);\n const hasUserSelectionEditsRef = useRef(false);\n const searchGenerationRef = useRef(0);\n\n const [currentSelectionZone, setCurrentSelectionZone] = useState<SelectionZone | null>(\n () => offsetSettings?.lastSelectionZone ?? null\n );\n const [selectedWellSection, setSelectedWellSection] = useState(\n offsetSettings?.wellSection || ALL_SECTION_KEY\n );\n const [loadingAssetIds, setLoadingAssetIds] = useState<number[]>([]);\n\n useFilterPruneEffect({\n filterMutationSeq,\n lastFilterMutationSource,\n open,\n filters,\n includeHidden,\n subjectWellId,\n setSelectedWells,\n setCurrentSelectionZone,\n hasUserSelectionEditsRef,\n });\n\n const { isReconciled } = useWellReconciliation({\n subjectWell,\n wells,\n offsetSettings,\n open,\n fetchSearchedWells,\n setSelectedWells,\n hasUserSelectionEditsRef,\n });\n\n const handlers = useSelectionHandlers({\n subjectWell,\n wells,\n filteredWells,\n externalOffsets,\n rawWellsWithSubject,\n maxOffsetWellNumber,\n maxOffsetSize,\n fetchSearchedWells,\n setSelectedWells,\n setCurrentSelectionZone,\n setSelectedWellSection,\n hasUserSelectionEditsRef,\n });\n\n const markUserEdit = useCallback(() => {\n hasUserSelectionEditsRef.current = true;\n }, []);\n\n // Bumps a generation counter so any in-flight `useAdvancedSearchHandler` work\n // resolving after this call can detect the abandon and skip its state writes.\n const abandonPendingSearch = useCallback(() => {\n searchGenerationRef.current += 1;\n }, []);\n\n const selectedWellsCount = useMemo(() => {\n if (selectedWells.find(well => well.id === subjectWellId)) return selectedWells.length - 1;\n return selectedWells.length;\n }, [selectedWells, subjectWellId]);\n\n const selectedWellIds = useMemo(() => selectedWells.map(({ id }) => id), [selectedWells]);\n\n return {\n selectedWells,\n setSelectedWells,\n selectedWellsCount,\n selectedWellIds,\n isReconciled,\n currentSelectionZone,\n setCurrentSelectionZone,\n selectedWellSection,\n setSelectedWellSection,\n loadingAssetIds,\n setLoadingAssetIds,\n searchGenerationRef,\n hasUserSelectionEditsRef,\n markUserEdit,\n abandonPendingSearch,\n ...handlers,\n };\n};\n"],"names":["params","subjectWellId","subjectWell","wells","filteredWells","externalOffsets","rawWellsWithSubject","offsetSettings","maxOffsetWellNumber","maxOffsetSize","open","fetchSearchedWells","filters","filterMutationSeq","lastFilterMutationSource","includeHidden","useState","_useState2","_slicedToArray","_useState","selectedWells","setSelectedWells","hasUserSelectionEditsRef","useRef","searchGenerationRef","_useState3","_offsetSettings$lastS","lastSelectionZone","_useState4","currentSelectionZone","setCurrentSelectionZone","_useState5","wellSection","ALL_SECTION_KEY","_useState6","selectedWellSection","setSelectedWellSection","_useState8","_useState7","loadingAssetIds","setLoadingAssetIds","useFilterPruneEffect","isReconciled","useWellReconciliation","handlers","useSelectionHandlers","markUserEdit","useCallback","current","abandonPendingSearch","selectedWellsCount","useMemo","find","well","id","length","selectedWellIds","map","_ref","_objectSpread"],"mappings":"uqBAegC,SAACA,GAC/B,IACEC,EAeED,EAfFC,cACAC,EAcEF,EAdFE,YACAC,EAaEH,EAbFG,MACAC,EAYEJ,EAZFI,cACAC,EAWEL,EAXFK,gBACAC,EAUEN,EAVFM,oBACAC,EASEP,EATFO,eACAC,EAQER,EARFQ,oBACAC,EAOET,EAPFS,cACAC,EAMEV,EANFU,KACAC,EAKEX,EALFW,mBACAC,EAIEZ,EAJFY,QACAC,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WACvCvB,EAAoBwB,SAAW,CAChC,GAAE,IAEGE,EAAqBC,EAAAA,SAAQ,WACjC,OAAI/B,EAAcgC,MAAK,SAAAC,GAAI,OAAIA,EAAKC,KAAOrD,CAAa,IAAUmB,EAAcmC,OAAS,EAClFnC,EAAcmC,MACvB,GAAG,CAACnC,EAAenB,IAEbuD,EAAkBL,EAAAA,SAAQ,WAAA,OAAM/B,EAAcqC,KAAI,SAAAC,GAAK,SAAFJ,QAAc,CAAClC,IAE1E,8WAAAuC,CAAA,CACEvC,cAAAA,EACAC,iBAAAA,EACA6B,mBAAAA,EACAM,gBAAAA,EACAd,aAAAA,EACAb,qBAAAA,EACAC,wBAAAA,EACAK,oBAAAA,EACAC,uBAAAA,EACAG,gBAAAA,EACAC,mBAAAA,EACAhB,oBAAAA,EACAF,yBAAAA,EACAwB,aAAAA,EACAG,qBAAAA,GACGL,EAEP"}
@@ -1 +1 @@
1
- {"version":3,"file":"AppCommonsContext.js","sources":["../../../../src/componentsV2/AppCommonsProvider/AppCommonsContext.ts"],"sourcesContent":["import { ComponentType, createContext, ReactNode, useContext } from 'react';\n\nimport { App, AppSettings, Asset, FracFleet, InterventionUnit, User, Well } from '../../types';\n\nexport type GlobalOffsetWell = {\n id: number;\n [key: string]: unknown;\n};\n\n// ⚠️⚠️⚠️ Mentioned in storybook, please update when editing this type\n// Used in AppTestWrapper\nexport type AppCommonsContextType = {\n maximized: boolean;\n appId: number;\n app: App;\n appKey: string;\n appName: string;\n appSettings?: AppSettings;\n onSettingChange: (key: string, value: unknown) => void;\n onSettingsChange: (value: unknown) => void;\n\n well?: Well;\n rig?: Asset;\n fracFleet?: FracFleet;\n interventionUnit?: InterventionUnit;\n wells?: Well[];\n\n // Passed down from corva-web-frontend. May not exist, so everything must be optional\n dashboardMeta?: {\n isMultiAsset?: boolean;\n isMultiWell?: boolean;\n isChiplessDashboard?: boolean;\n };\n appHeadersV3Enabled?: boolean;\n // [REACT-18-MIGRATION-TAG] PLT-3099: true when the app renders in-process on the host\n // (the platform isolation decision from DevCenterIsolatedApp); iframe realms leave it unset.\n isNonIsolatedApp?: boolean;\n disableAppAssetSelection?: boolean;\n isMultiRig?: boolean;\n currentUser?: User;\n globalOffsetWells?: GlobalOffsetWell[];\n globalOffsetWellsVersion?: number;\n removeApp?: () => void;\n};\n\nexport type AppCommonsContextTypeInternal = AppCommonsContextType & {\n setMaximized: (maximized: boolean) => void;\n appData?: unknown;\n layoutEnvironment?: { type?: string };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n appSettingsComponent?: ComponentType<any>;\n toggleAnnotationsList?: () => void;\n onHelpCenterClick?: () => void;\n secondaryMenuItems?: { title: ReactNode; onClick?: () => void; icon?: ReactNode }[];\n isInsideNewMobileApp?: boolean;\n reloadApp?: () => void;\n};\n\nexport const AppCommonsContext = createContext<AppCommonsContextTypeInternal>(\n // TODO provide defaults\n null as unknown as AppCommonsContextTypeInternal\n);\n\nexport const useAppCommonsInternal = () => useContext(AppCommonsContext);\n\nexport const useAppCommons = () => useContext(AppCommonsContext) as AppCommonsContextType;\n"],"names":["AppCommonsContext","createContext","useContext"],"mappings":"2FA0DaA,EAAoBC,EAAaA,cAE5C,wDAK2B,WAAH,OAASC,EAAAA,WAAWF,EAAkB,gCAF3B,WAAH,OAASE,EAAAA,WAAWF,EAAkB"}
1
+ {"version":3,"file":"AppCommonsContext.js","sources":["../../../../src/componentsV2/AppCommonsProvider/AppCommonsContext.ts"],"sourcesContent":["import { ComponentType, createContext, ReactNode, useContext } from 'react';\n\nimport { App, AppSettings, Asset, FracFleet, InterventionUnit, User, Well } from '../../types';\n\nexport type GlobalOffsetWell = {\n id: number;\n [key: string]: unknown;\n};\n\n// ⚠️⚠️⚠️ Mentioned in storybook, please update when editing this type\n// Used in AppTestWrapper\nexport type AppCommonsContextType = {\n maximized: boolean;\n appId: number;\n app: App;\n appKey: string;\n appName: string;\n appSettings?: AppSettings;\n onSettingChange: (key: string, value: unknown) => void;\n onSettingsChange: (value: unknown) => void;\n\n well?: Well;\n rig?: Asset;\n fracFleet?: FracFleet;\n interventionUnit?: InterventionUnit;\n wells?: Well[];\n\n // Passed down from corva-web-frontend. May not exist, so everything must be optional\n dashboardMeta?: {\n isMultiAsset?: boolean;\n isMultiWell?: boolean;\n isChiplessDashboard?: boolean;\n globalOffsetWellsToken?: number;\n };\n appHeadersV3Enabled?: boolean;\n // [REACT-18-MIGRATION-TAG] PLT-3099: true when the app renders in-process on the host\n // (the platform isolation decision from DevCenterIsolatedApp); iframe realms leave it unset.\n isNonIsolatedApp?: boolean;\n disableAppAssetSelection?: boolean;\n isMultiRig?: boolean;\n currentUser?: User;\n globalOffsetWells?: GlobalOffsetWell[];\n globalOffsetWellsVersion?: number;\n globalOffsetWellsToken?: number;\n removeApp?: () => void;\n};\n\nexport type AppCommonsContextTypeInternal = AppCommonsContextType & {\n setMaximized: (maximized: boolean) => void;\n appData?: unknown;\n layoutEnvironment?: { type?: string };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n appSettingsComponent?: ComponentType<any>;\n toggleAnnotationsList?: () => void;\n onHelpCenterClick?: () => void;\n secondaryMenuItems?: { title: ReactNode; onClick?: () => void; icon?: ReactNode }[];\n isInsideNewMobileApp?: boolean;\n reloadApp?: () => void;\n};\n\nexport const AppCommonsContext = createContext<AppCommonsContextTypeInternal>(\n // TODO provide defaults\n null as unknown as AppCommonsContextTypeInternal\n);\n\nexport const useAppCommonsInternal = () => useContext(AppCommonsContext);\n\nexport const useAppCommons = () => useContext(AppCommonsContext) as AppCommonsContextType;\n"],"names":["AppCommonsContext","createContext","useContext"],"mappings":"2FA4DaA,EAAoBC,EAAaA,cAE5C,wDAK2B,WAAH,OAASC,EAAAA,WAAWF,EAAkB,gCAF3B,WAAH,OAASE,EAAAA,WAAWF,EAAkB"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");exports.useAppCommonsValue=function(t){var n=t.app,a=t.onAppRemove,p=t.onHelpCenterClick,i=t.appId,s=t.appSettings,o=t.appSettingsComponent,l=t.appData,r=t.isInsideNewMobileApp,d=t.onSettingChange,g=t.onSettingsChange,m=t.appHeadersV3Enabled,u=t.isNonIsolatedApp,c=t.disableAppAssetSelection,A=t.isMultiRig,b=void 0!==A&&A,f=t.rig,M=t.maximized,C=t.setMaximized,v=t.fracFleet,S=t.dashboardMeta,I=t.well,y=t.wells,h=t.toggleAnnotationsList,w=t.layoutEnvironment,x=t.secondaryMenuItems,N=t.currentUser,O=t.appKey,V=t.appName,z=t.interventionUnit,E=t.globalOffsetWells,H=t.globalOffsetWellsVersion,U=t.reloadApp;return e.useMemo((function(){return{app:n,appKey:O,appName:V,onHelpCenterClick:p,removeApp:a,appId:i,appSettings:s,appSettingsComponent:o,appData:l,isInsideNewMobileApp:r,onSettingChange:d,onSettingsChange:g,appHeadersV3Enabled:m,isNonIsolatedApp:u,disableAppAssetSelection:c,isMultiRig:b,rig:f,maximized:M,setMaximized:C,fracFleet:v,dashboardMeta:S,well:I,wells:y,toggleAnnotationsList:h,layoutEnvironment:w,secondaryMenuItems:x,currentUser:N,interventionUnit:z,globalOffsetWells:E,globalOffsetWellsVersion:H,reloadApp:U}}),[n,O,V,p,a,i,s,o,l,r,d,g,m,u,c,b,f,M,C,v,S,I,y,h,w,x,N,z,E,H,U])};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");exports.useAppCommonsValue=function(t){var n=t.app,a=t.onAppRemove,s=t.onHelpCenterClick,p=t.appId,l=t.appSettings,o=t.appSettingsComponent,i=t.appData,r=t.isInsideNewMobileApp,d=t.onSettingChange,g=t.onSettingsChange,m=t.appHeadersV3Enabled,u=t.isNonIsolatedApp,f=t.disableAppAssetSelection,b=t.isMultiRig,c=void 0!==b&&b,A=t.rig,M=t.maximized,C=t.setMaximized,v=t.fracFleet,S=t.dashboardMeta,I=t.well,y=t.wells,O=t.toggleAnnotationsList,h=t.layoutEnvironment,w=t.secondaryMenuItems,x=t.currentUser,N=t.appKey,W=t.appName,V=t.interventionUnit,k=t.globalOffsetWells,z=t.globalOffsetWellsVersion,E=t.globalOffsetWellsToken,H=t.reloadApp;return e.useMemo((function(){return{app:n,appKey:N,appName:W,onHelpCenterClick:s,removeApp:a,appId:p,appSettings:l,appSettingsComponent:o,appData:i,isInsideNewMobileApp:r,onSettingChange:d,onSettingsChange:g,appHeadersV3Enabled:m,isNonIsolatedApp:u,disableAppAssetSelection:f,isMultiRig:c,rig:A,maximized:M,setMaximized:C,fracFleet:v,dashboardMeta:S,well:I,wells:y,toggleAnnotationsList:O,layoutEnvironment:h,secondaryMenuItems:w,currentUser:x,interventionUnit:V,globalOffsetWells:k,globalOffsetWellsVersion:z,globalOffsetWellsToken:E,reloadApp:H}}),[n,N,W,s,a,p,l,o,i,r,d,g,m,u,f,c,A,M,C,v,S,I,y,O,h,w,x,V,k,z,E,H])};
2
2
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../../../../src/componentsV2/AppCommonsProvider/utils.ts"],"sourcesContent":["import { useMemo } from 'react';\n\nimport { AppCommonsContextTypeInternal } from './AppCommonsContext';\n\nexport type OwnAppCommonsContextType = Omit<\n AppCommonsContextTypeInternal,\n 'appKey' | 'appName' | 'removeApp'\n> & { onAppRemove?: AppCommonsContextTypeInternal['removeApp'] };\n\ntype UseAppCommonsValueParam = OwnAppCommonsContextType & {\n appKey: string;\n appName: string;\n};\n\nexport const useAppCommonsValue = ({\n app,\n onAppRemove,\n onHelpCenterClick,\n appId,\n appSettings,\n appSettingsComponent,\n appData,\n isInsideNewMobileApp,\n onSettingChange,\n onSettingsChange,\n appHeadersV3Enabled,\n isNonIsolatedApp,\n disableAppAssetSelection,\n isMultiRig = false,\n rig,\n maximized,\n setMaximized,\n fracFleet,\n dashboardMeta,\n well,\n wells,\n toggleAnnotationsList,\n layoutEnvironment,\n secondaryMenuItems,\n currentUser,\n appKey,\n appName,\n interventionUnit,\n globalOffsetWells,\n globalOffsetWellsVersion,\n reloadApp,\n}: UseAppCommonsValueParam) => {\n return useMemo(\n (): AppCommonsContextTypeInternal => ({\n app,\n appKey,\n appName,\n onHelpCenterClick,\n removeApp: onAppRemove,\n appId,\n appSettings,\n appSettingsComponent,\n appData,\n isInsideNewMobileApp,\n onSettingChange,\n onSettingsChange,\n appHeadersV3Enabled,\n isNonIsolatedApp,\n disableAppAssetSelection,\n isMultiRig,\n rig,\n maximized,\n setMaximized,\n fracFleet,\n dashboardMeta,\n well,\n wells,\n toggleAnnotationsList,\n layoutEnvironment,\n secondaryMenuItems,\n currentUser,\n interventionUnit,\n globalOffsetWells,\n globalOffsetWellsVersion,\n reloadApp,\n }),\n [\n app,\n appKey,\n appName,\n onHelpCenterClick,\n onAppRemove,\n appId,\n appSettings,\n appSettingsComponent,\n appData,\n isInsideNewMobileApp,\n onSettingChange,\n onSettingsChange,\n appHeadersV3Enabled,\n isNonIsolatedApp,\n disableAppAssetSelection,\n isMultiRig,\n rig,\n maximized,\n setMaximized,\n fracFleet,\n dashboardMeta,\n well,\n wells,\n toggleAnnotationsList,\n layoutEnvironment,\n secondaryMenuItems,\n currentUser,\n interventionUnit,\n globalOffsetWells,\n globalOffsetWellsVersion,\n reloadApp,\n ]\n );\n};\n"],"names":["_ref","app","onAppRemove","onHelpCenterClick","appId","appSettings","appSettingsComponent","appData","isInsideNewMobileApp","onSettingChange","onSettingsChange","appHeadersV3Enabled","isNonIsolatedApp","disableAppAssetSelection","_ref$isMultiRig","isMultiRig","rig","maximized","setMaximized","fracFleet","dashboardMeta","well","wells","toggleAnnotationsList","layoutEnvironment","secondaryMenuItems","currentUser","appKey","appName","interventionUnit","globalOffsetWells","globalOffsetWellsVersion","reloadApp","useMemo","removeApp"],"mappings":"sHAckC,SAgCHA,GAAA,IA/B7BC,IAAAA,IACAC,IAAAA,YACAC,IAAAA,kBACAC,IAAAA,MACAC,IAAAA,YACAC,IAAAA,qBACAC,IAAAA,QACAC,IAAAA,qBACAC,IAAAA,gBACAC,IAAAA,iBACAC,IAAAA,oBACAC,IAAAA,iBACAC,IAAAA,yBAAwBC,EAAAd,EACxBe,WAAAA,cAAkBD,EAClBE,IAAAA,IACAC,IAAAA,UACAC,IAAAA,aACAC,IAAAA,UACAC,IAAAA,cACAC,IAAAA,KACAC,IAAAA,MACAC,IAAAA,sBACAC,IAAAA,kBACAC,IAAAA,mBACAC,IAAAA,YACAC,IAAAA,OACAC,IAAAA,QACAC,IAAAA,iBACAC,IAAAA,kBACAC,IAAAA,yBACAC,IAAAA,UAEA,OAAOC,EAAOA,SACZ,WAAA,MAAsC,CACpChC,IAAAA,EACA0B,OAAAA,EACAC,QAAAA,EACAzB,kBAAAA,EACA+B,UAAWhC,EACXE,MAAAA,EACAC,YAAAA,EACAC,qBAAAA,EACAC,QAAAA,EACAC,qBAAAA,EACAC,gBAAAA,EACAC,iBAAAA,EACAC,oBAAAA,EACAC,iBAAAA,EACAC,yBAAAA,EACAE,WAAAA,EACAC,IAAAA,EACAC,UAAAA,EACAC,aAAAA,EACAC,UAAAA,EACAC,cAAAA,EACAC,KAAAA,EACAC,MAAAA,EACAC,sBAAAA,EACAC,kBAAAA,EACAC,mBAAAA,EACAC,YAAAA,EACAG,iBAAAA,EACAC,kBAAAA,EACAC,yBAAAA,EACAC,UAAAA,EACD,GACD,CACE/B,EACA0B,EACAC,EACAzB,EACAD,EACAE,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAE,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAG,EACAC,EACAC,EACAC,GAGN"}
1
+ {"version":3,"file":"utils.js","sources":["../../../../src/componentsV2/AppCommonsProvider/utils.ts"],"sourcesContent":["import { useMemo } from 'react';\n\nimport { AppCommonsContextTypeInternal } from './AppCommonsContext';\n\nexport type OwnAppCommonsContextType = Omit<\n AppCommonsContextTypeInternal,\n 'appKey' | 'appName' | 'removeApp'\n> & { onAppRemove?: AppCommonsContextTypeInternal['removeApp'] };\n\ntype UseAppCommonsValueParam = OwnAppCommonsContextType & {\n appKey: string;\n appName: string;\n};\n\nexport const useAppCommonsValue = ({\n app,\n onAppRemove,\n onHelpCenterClick,\n appId,\n appSettings,\n appSettingsComponent,\n appData,\n isInsideNewMobileApp,\n onSettingChange,\n onSettingsChange,\n appHeadersV3Enabled,\n isNonIsolatedApp,\n disableAppAssetSelection,\n isMultiRig = false,\n rig,\n maximized,\n setMaximized,\n fracFleet,\n dashboardMeta,\n well,\n wells,\n toggleAnnotationsList,\n layoutEnvironment,\n secondaryMenuItems,\n currentUser,\n appKey,\n appName,\n interventionUnit,\n globalOffsetWells,\n globalOffsetWellsVersion,\n globalOffsetWellsToken,\n reloadApp,\n}: UseAppCommonsValueParam) => {\n return useMemo(\n (): AppCommonsContextTypeInternal => ({\n app,\n appKey,\n appName,\n onHelpCenterClick,\n removeApp: onAppRemove,\n appId,\n appSettings,\n appSettingsComponent,\n appData,\n isInsideNewMobileApp,\n onSettingChange,\n onSettingsChange,\n appHeadersV3Enabled,\n isNonIsolatedApp,\n disableAppAssetSelection,\n isMultiRig,\n rig,\n maximized,\n setMaximized,\n fracFleet,\n dashboardMeta,\n well,\n wells,\n toggleAnnotationsList,\n layoutEnvironment,\n secondaryMenuItems,\n currentUser,\n interventionUnit,\n globalOffsetWells,\n globalOffsetWellsVersion,\n globalOffsetWellsToken,\n reloadApp,\n }),\n [\n app,\n appKey,\n appName,\n onHelpCenterClick,\n onAppRemove,\n appId,\n appSettings,\n appSettingsComponent,\n appData,\n isInsideNewMobileApp,\n onSettingChange,\n onSettingsChange,\n appHeadersV3Enabled,\n isNonIsolatedApp,\n disableAppAssetSelection,\n isMultiRig,\n rig,\n maximized,\n setMaximized,\n fracFleet,\n dashboardMeta,\n well,\n wells,\n toggleAnnotationsList,\n layoutEnvironment,\n secondaryMenuItems,\n currentUser,\n interventionUnit,\n globalOffsetWells,\n globalOffsetWellsVersion,\n globalOffsetWellsToken,\n reloadApp,\n ]\n );\n};\n"],"names":["_ref","app","onAppRemove","onHelpCenterClick","appId","appSettings","appSettingsComponent","appData","isInsideNewMobileApp","onSettingChange","onSettingsChange","appHeadersV3Enabled","isNonIsolatedApp","disableAppAssetSelection","_ref$isMultiRig","isMultiRig","rig","maximized","setMaximized","fracFleet","dashboardMeta","well","wells","toggleAnnotationsList","layoutEnvironment","secondaryMenuItems","currentUser","appKey","appName","interventionUnit","globalOffsetWells","globalOffsetWellsVersion","globalOffsetWellsToken","reloadApp","useMemo","removeApp"],"mappings":"sHAckC,SAiCHA,GAAA,IAhC7BC,IAAAA,IACAC,IAAAA,YACAC,IAAAA,kBACAC,IAAAA,MACAC,IAAAA,YACAC,IAAAA,qBACAC,IAAAA,QACAC,IAAAA,qBACAC,IAAAA,gBACAC,IAAAA,iBACAC,IAAAA,oBACAC,IAAAA,iBACAC,IAAAA,yBAAwBC,EAAAd,EACxBe,WAAAA,cAAkBD,EAClBE,IAAAA,IACAC,IAAAA,UACAC,IAAAA,aACAC,IAAAA,UACAC,IAAAA,cACAC,IAAAA,KACAC,IAAAA,MACAC,IAAAA,sBACAC,IAAAA,kBACAC,IAAAA,mBACAC,IAAAA,YACAC,IAAAA,OACAC,IAAAA,QACAC,IAAAA,iBACAC,IAAAA,kBACAC,IAAAA,yBACAC,IAAAA,uBACAC,IAAAA,UAEA,OAAOC,EAAOA,SACZ,WAAA,MAAsC,CACpCjC,IAAAA,EACA0B,OAAAA,EACAC,QAAAA,EACAzB,kBAAAA,EACAgC,UAAWjC,EACXE,MAAAA,EACAC,YAAAA,EACAC,qBAAAA,EACAC,QAAAA,EACAC,qBAAAA,EACAC,gBAAAA,EACAC,iBAAAA,EACAC,oBAAAA,EACAC,iBAAAA,EACAC,yBAAAA,EACAE,WAAAA,EACAC,IAAAA,EACAC,UAAAA,EACAC,aAAAA,EACAC,UAAAA,EACAC,cAAAA,EACAC,KAAAA,EACAC,MAAAA,EACAC,sBAAAA,EACAC,kBAAAA,EACAC,mBAAAA,EACAC,YAAAA,EACAG,iBAAAA,EACAC,kBAAAA,EACAC,yBAAAA,EACAC,uBAAAA,EACAC,UAAAA,EACD,GACD,CACEhC,EACA0B,EACAC,EACAzB,EACAD,EACAE,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAE,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAG,EACAC,EACAC,EACAC,EACAC,GAGN"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),r=require("react");require("../clients/subscriptions/constants.js"),require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("querystring"),require("uuid/v1"),require("lodash"),require("../clients/subscriptions.v1.js"),require("../clients/jsonApi/index.js"),require("../clients/subscriptions/subscriptions-client.factory.js"),require("immutable"),require("query-string"),require("../constants/goals.js"),require("../constants/segment.js"),require("../constants/alerts.js"),require("../constants/apps.js"),require("../constants/drillstring.js"),require("../constants/completion.js"),require("../constants/appPackages.js"),require("../constants/notifications.js"),require("../constants/feed.js"),require("../constants/bha.js"),require("../constants/corvaCompanyId.js"),require("../components/GradientManager/configuration/constants.js"),require("../utils/index.js"),require("uuid"),require("jsona"),require("../utils/env.js"),require("../components/StatusBadge/constants.js"),require("@babel/runtime/helpers/toConsumableArray"),require("lodash/set"),require("lodash/get"),require("lodash/unset"),require("moment"),require("../clients/api/apiCore.js"),require("../clients/constants.js"),require("../clients/sso/auth0.js"),require("../clients/sso/oauth2.js"),require("../clients/api/rateLimiter.js"),require("lodash/isEmpty"),require("lodash/sortBy"),require("../constants/streamSourceType.js"),require("../components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js"),require("../componentsV2/AppCommonsProvider/AppCommonsProvider.js");var t=require("../componentsV2/AppCommonsProvider/AppCommonsContext.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("../componentsV2/AppSettings/AppSettingsPinningContext.js");var n=s(e);function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);r&&(s=s.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,s)}return t}function o(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?i(Object(t),!0).forEach((function(r){n.default(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}exports.useGlobalOffsetWellsSync=function(e,s,n){var i=t.useAppCommons(),u=null==i?void 0:i.globalOffsetWells,c=null==i?void 0:i.globalOffsetWellsVersion,a=r.useRef();r.useEffect((function(){if(u&&Array.isArray(u)&&void 0!==c)if(void 0!==a.current){if(a.current!==c){a.current=c;var r=u.slice(0,n),t=r.map((function(e){return e.id}));s(o(o({},e||{}),{},{selectedWellIds:t}),r)}}else a.current=c}),[c,u,n,e,s])};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),r=require("react");require("../clients/subscriptions/constants.js"),require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("querystring"),require("uuid/v1"),require("lodash"),require("../clients/subscriptions.v1.js"),require("../clients/jsonApi/index.js"),require("../clients/subscriptions/subscriptions-client.factory.js"),require("immutable"),require("query-string"),require("../constants/goals.js"),require("../constants/segment.js"),require("../constants/alerts.js"),require("../constants/apps.js"),require("../constants/drillstring.js"),require("../constants/completion.js"),require("../constants/appPackages.js"),require("../constants/notifications.js"),require("../constants/feed.js"),require("../constants/bha.js"),require("../constants/corvaCompanyId.js"),require("../components/GradientManager/configuration/constants.js"),require("../utils/index.js"),require("uuid"),require("jsona"),require("../utils/env.js"),require("../components/StatusBadge/constants.js"),require("@babel/runtime/helpers/toConsumableArray"),require("lodash/set"),require("lodash/get"),require("lodash/unset"),require("moment"),require("../clients/api/apiCore.js"),require("../clients/constants.js"),require("../clients/sso/auth0.js"),require("../clients/sso/oauth2.js"),require("../clients/api/rateLimiter.js"),require("lodash/isEmpty"),require("lodash/sortBy"),require("../constants/streamSourceType.js"),require("../components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js"),require("../componentsV2/AppCommonsProvider/AppCommonsProvider.js");var t=require("../componentsV2/AppCommonsProvider/AppCommonsContext.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("../componentsV2/AppSettings/AppSettingsPinningContext.js");var n=s(e);function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);r&&(s=s.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,s)}return t}function o(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?i(Object(t),!0).forEach((function(r){n.default(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}exports.useGlobalOffsetWellsSync=function(e,s,n){var i,u,l=t.useAppCommons(),a=null==l?void 0:l.globalOffsetWells,c=null==l?void 0:l.globalOffsetWellsVersion,p=null!==(i=null==l?void 0:l.globalOffsetWellsToken)&&void 0!==i?i:null==l||null===(u=l.dashboardMeta)||void 0===u?void 0:u.globalOffsetWellsToken,q=r.useRef(),d=r.useRef();r.useEffect((function(){if(a&&Array.isArray(a)){var r=a.slice(0,n),t=r.map((function(e){return e.id})),i=e||{};if(void 0!==p)return q.current=c,i.globalOffsetWellsAppliedToken===p?void(d.current=void 0):void(d.current!==p&&(d.current=p,s(o(o({},i),{},{selectedWellIds:t,globalOffsetWellsAppliedToken:p}),r)));void 0!==c&&(void 0!==q.current?q.current!==c&&(q.current=c,s(o(o({},i),{},{selectedWellIds:t}),r)):q.current=c)}}),[p,c,a,n,e,s])};
2
2
  //# sourceMappingURL=useGlobalOffsetWellsSync.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useGlobalOffsetWellsSync.js","sources":["../../../src/effects/useGlobalOffsetWellsSync.js"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\nimport { useAppCommons } from '~/effects';\n\nexport const useGlobalOffsetWellsSync = (offsetSettings, onChange, maxOffsetWellNumber) => {\n const appCommons = useAppCommons();\n const globalOffsetWells = appCommons?.globalOffsetWells;\n const globalOffsetWellsVersion = appCommons?.globalOffsetWellsVersion;\n const prevVersionRef = useRef();\n\n useEffect(() => {\n if (!globalOffsetWells || !Array.isArray(globalOffsetWells)) return;\n if (globalOffsetWellsVersion === undefined) return;\n\n if (prevVersionRef.current === undefined) {\n prevVersionRef.current = globalOffsetWellsVersion;\n return;\n }\n\n if (prevVersionRef.current === globalOffsetWellsVersion) return;\n prevVersionRef.current = globalOffsetWellsVersion;\n const globalOffsetWellsTrimmed = globalOffsetWells.slice(0, maxOffsetWellNumber);\n\n const currentIds = globalOffsetWellsTrimmed.map(w => w.id);\n const baseSettings = offsetSettings || {};\n\n onChange({ ...baseSettings, selectedWellIds: currentIds }, globalOffsetWellsTrimmed);\n }, [globalOffsetWellsVersion, globalOffsetWells, maxOffsetWellNumber, offsetSettings, onChange]);\n};\n"],"names":["offsetSettings","onChange","maxOffsetWellNumber","appCommons","useAppCommons","globalOffsetWells","globalOffsetWellsVersion","prevVersionRef","useRef","useEffect","Array","isArray","undefined","current","globalOffsetWellsTrimmed","slice","currentIds","map","w","id","selectedWellIds"],"mappings":"0jFAIwC,SAACA,EAAgBC,EAAUC,GACjE,IAAMC,EAAaC,EAAAA,gBACbC,EAAoBF,aAAAA,EAAAA,EAAYE,kBAChCC,EAA2BH,aAAAA,EAAAA,EAAYG,yBACvCC,EAAiBC,EAAAA,SAEvBC,EAAAA,WAAU,WACR,GAAKJ,GAAsBK,MAAMC,QAAQN,SACRO,IAA7BN,EAEJ,QAA+BM,IAA3BL,EAAeM,SAKnB,GAAIN,EAAeM,UAAYP,EAA/B,CACAC,EAAeM,QAAUP,EACzB,IAAMQ,EAA2BT,EAAkBU,MAAM,EAAGb,GAEtDc,EAAaF,EAAyBG,KAAI,SAAAC,GAAC,OAAIA,EAAEC,MAGvDlB,SAFqBD,GAAkB,IAEb,CAAA,EAAA,CAAEoB,gBAAiBJ,IAAcF,EAPF,OAJvDP,EAAeM,QAAUP,CAY7B,GAAG,CAACA,EAA0BD,EAAmBH,EAAqBF,EAAgBC,GACxF"}
1
+ {"version":3,"file":"useGlobalOffsetWellsSync.js","sources":["../../../src/effects/useGlobalOffsetWellsSync.js"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\nimport { useAppCommons } from '~/effects';\n\nexport const useGlobalOffsetWellsSync = (offsetSettings, onChange, maxOffsetWellNumber) => {\n const appCommons = useAppCommons();\n const globalOffsetWells = appCommons?.globalOffsetWells;\n const globalOffsetWellsVersion = appCommons?.globalOffsetWellsVersion;\n const globalOffsetWellsToken =\n appCommons?.globalOffsetWellsToken ?? appCommons?.dashboardMeta?.globalOffsetWellsToken;\n const prevVersionRef = useRef();\n const lastEmittedTokenRef = useRef();\n\n useEffect(() => {\n if (!globalOffsetWells || !Array.isArray(globalOffsetWells)) return;\n\n const globalOffsetWellsTrimmed = globalOffsetWells.slice(0, maxOffsetWellNumber);\n const globalIds = globalOffsetWellsTrimmed.map(w => w.id);\n const baseSettings = offsetSettings || {};\n\n // Level-triggered: adopt when platform token differs from last applied token.\n // Token mode is exclusive — never falls through to the legacy version path,\n // so version bumps cannot clobber a user edit made under an adopted token.\n if (globalOffsetWellsToken !== undefined) {\n prevVersionRef.current = globalOffsetWellsVersion;\n\n const appliedToken = baseSettings.globalOffsetWellsAppliedToken;\n\n if (appliedToken === globalOffsetWellsToken) {\n // Adoption landed in settings — re-arm so a later settings clobber\n // (e.g. template load restoring a stale token) re-adopts\n lastEmittedTokenRef.current = undefined;\n return;\n }\n\n if (lastEmittedTokenRef.current !== globalOffsetWellsToken) {\n lastEmittedTokenRef.current = globalOffsetWellsToken;\n\n onChange(\n {\n ...baseSettings,\n selectedWellIds: globalIds,\n globalOffsetWellsAppliedToken: globalOffsetWellsToken,\n },\n globalOffsetWellsTrimmed\n );\n }\n return;\n }\n\n // Legacy: react only to version bumps after mount\n if (globalOffsetWellsVersion === undefined) return;\n\n if (prevVersionRef.current === undefined) {\n prevVersionRef.current = globalOffsetWellsVersion;\n return;\n }\n\n if (prevVersionRef.current === globalOffsetWellsVersion) return;\n prevVersionRef.current = globalOffsetWellsVersion;\n\n onChange({ ...baseSettings, selectedWellIds: globalIds }, globalOffsetWellsTrimmed);\n }, [\n globalOffsetWellsToken,\n globalOffsetWellsVersion,\n globalOffsetWells,\n maxOffsetWellNumber,\n offsetSettings,\n onChange,\n ]);\n};\n"],"names":["offsetSettings","onChange","maxOffsetWellNumber","_appCommons$globalOff","_appCommons$dashboard","appCommons","useAppCommons","globalOffsetWells","globalOffsetWellsVersion","globalOffsetWellsToken","dashboardMeta","prevVersionRef","useRef","lastEmittedTokenRef","useEffect","Array","isArray","globalOffsetWellsTrimmed","slice","globalIds","map","w","id","baseSettings","undefined","current","globalOffsetWellsAppliedToken","selectedWellIds"],"mappings":"0jFAIwC,SAACA,EAAgBC,EAAUC,GAAwB,IAAAC,EAAAC,EACnFC,EAAaC,EAAAA,gBACbC,EAAoBF,aAAAA,EAAAA,EAAYE,kBAChCC,EAA2BH,aAAAA,EAAAA,EAAYG,yBACvCC,UACJJ,EAAAA,aAAU,EAAVA,EAAYI,sCAA0BJ,SAAyB,QAAzBA,EAAAA,EAAYK,qBAAa,IAAAN,OAAzBC,EAAAD,EAA2BK,uBAC7DE,EAAiBC,EAAAA,SACjBC,EAAsBD,EAAAA,SAE5BE,EAAAA,WAAU,WACR,GAAKP,GAAsBQ,MAAMC,QAAQT,GAAzC,CAEA,IAAMU,EAA2BV,EAAkBW,MAAM,EAAGhB,GACtDiB,EAAYF,EAAyBG,KAAI,SAAAC,GAAC,OAAIA,EAAEC,MAChDC,EAAevB,GAAkB,GAKvC,QAA+BwB,IAA3Bf,EAKF,OAJAE,EAAec,QAAUjB,EAEJe,EAAaG,gCAEbjB,OAGnBI,EAAoBY,aAAUD,QAI5BX,EAAoBY,UAAYhB,IAClCI,EAAoBY,QAAUhB,EAE9BR,SAEOsB,GAAY,CAAA,EAAA,CACfI,gBAAiBR,EACjBO,8BAA+BjB,IAEjCQ,UAO2BO,IAA7BhB,SAE2BgB,IAA3Bb,EAAec,QAKfd,EAAec,UAAYjB,IAC/BG,EAAec,QAAUjB,EAEzBP,SAAcsB,GAAY,CAAA,EAAA,CAAEI,gBAAiBR,IAAaF,IAPxDN,EAAec,QAAUjB,EAxCkC,CAgD/D,GAAG,CACDC,EACAD,EACAD,EACAL,EACAF,EACAC,GAEJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"DevCenterAppContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js"],"names":[],"mappings":"AAgDA,iBAAS,qBAAqB,CAAC,EAC7B,eAAe,EACf,cAAc,EACd,GAAG,EACH,KAAK,EACL,SAAS,EACT,WAAW,EACX,mCAAmC,EACnC,WAAW,EACX,eAAe,EACf,wBAAwB,EACxB,iBAAiB,EAGjB,gBAAwB,EACxB,sBAAsB,EACtB,iBAAiB,EACjB,mBAA0B,EAC1B,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,YAAmB,EACnB,wBAA+B,EAC/B,SAAS,EACT,uCAAuC,EACvC,aAAa,EACb,SAAqB,EACrB,WAAW,GACZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAA,+BA8RA;eAEc,qBAAqB"}
1
+ {"version":3,"file":"DevCenterAppContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js"],"names":[],"mappings":"AAgDA,iBAAS,qBAAqB,CAAC,EAC7B,eAAe,EACf,cAAc,EACd,GAAG,EACH,KAAK,EACL,SAAS,EACT,WAAW,EACX,mCAAmC,EACnC,WAAW,EACX,eAAe,EACf,wBAAwB,EACxB,iBAAiB,EAGjB,gBAAwB,EACxB,sBAAsB,EACtB,iBAAiB,EACjB,mBAA0B,EAC1B,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,YAAmB,EACnB,wBAA+B,EAC/B,SAAS,EACT,uCAAuC,EACvC,aAAa,EACb,SAAqB,EACrB,WAAW,GACZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAA,+BA+RA;eAEc,qBAAqB"}
@@ -1,2 +1,2 @@
1
- import o from"@babel/runtime/helpers/defineProperty";import s from"@babel/runtime/helpers/slicedToArray";import{useContext as t,useState as n,useMemo as e}from"react";import i from"classnames";import{pickBy as p,pick as r,noop as c}from"lodash";import{useTheme as m}from"@material-ui/core";import{BugReport as a}from"@material-ui/icons";import l from"../AppContext.js";import{DevCenterRouterContext as d}from"../DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router-dom";import"query-string";import{jsx as u,jsxs as j,Fragment as A}from"react/jsx-runtime";import g from"./effects/useAppSettings.js";import C from"./effects/useAnnotationsList.js";import I from"./effects/useAnnotationsData.js";import V from"./effects/useAppMaximized.js";import h from"./components/AppActions/AppActions.js";import v from"./components/AppSettingsDialog/AppSettingsDialog.js";import"./components/AppSettingsDialog/components/RemoveAppButton.js";import"./components/AppSettingsDialog/components/SettingsAccordion.js";import"./components/AnnotationsButton/AnnotationsButton.js";import{NonPriorityMenus as S}from"./components/NonPriorityMenus/NonPriorityMenus.js";import f from"./components/FullscreenButton/FullscreenButton.js";import"./components/AppInfoMessage/AppInfoMessage.js";import b from"./components/DevCenterAppView/DevCenterAppView.js";import{DcFullscreenElemsCoordinatorProvider as D}from"./components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"./components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"./components/IsInsideIsolatedDcAppProvider/IsInsideIsolatedDcAppProvider.js";import P from"./components/RestoreAppSizeButton/index.js";import{getAppVersion as x,getAppAvailability as M}from"./utils.js";import y from"./components/PriorityMenus/PriorityMenus.js";import{CommentsSwitchProvider as T}from"./components/CommentsSwitch/CommentsSwitchProvider.js";import{CommentsSwitchButton as L}from"./components/CommentsSwitch/CommentsSwitchButton.js";import k from"./DevCenterAppContainer.scss.js";import{isInsideNewMobileApp as H,isNativeDetected as B,isMobileDetected as O}from"../../../utils/mobileDetect.js";import F from"../../Icons/AnnotationIcon.js";import w from"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import{AnnotationsProvider as R}from"../../Annotations/AnnotationsContext.js";import"../../Toaster/Toaster.js";import{ToastContainer as z}from"../../Toaster/ToastContainer.js";import"../../../clients/subscriptions/constants.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../clients/subscriptions.v1.js";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions/subscriptions-client.factory.js";import E from"../../../effects/useDevCenterApp.js";import"../../../utils/index.js";import"uuid";import"jsona";import"../../../constants/segment.js";import"../../../utils/env.js";import{DEV_CENTER_CLI_APP_ID as q}from"../../../constants/devcenter.js";import"../../../constants/goals.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"../../StatusBadge/constants.js";import"@babel/runtime/helpers/toConsumableArray";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../clients/api/apiCore.js";import"../../../clients/constants.js";import"../../../clients/sso/auth0.js";import"../../../clients/sso/oauth2.js";import"../../../clients/api/rateLimiter.js";import"lodash/isEmpty";import"lodash/sortBy";import"../../../constants/streamSourceType.js";import"./components/CommentsSwitch/CommentsSwitchContext.js";import{AppCommonsProvider as U}from"../../../componentsV2/AppCommonsProvider/AppCommonsProvider.js";import"../../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../../componentsV2/AppSettings/AppSettingsPinningContext.js";import{getAppSegment as W,isDCAppMultiRig as _,getAppName as N,getTimestampFromQuery as G}from"../../../utils/devcenter.js";import{HelpCenterIcon as K}from"../../HelpCenter/HelpCenterIcon.js";import"../../../componentsV2/Text/Text.js";import"../../../componentsV2/Grid/Grid.js";import"../../../componentsV2/Grid/Cell.js";import"../../../componentsV2/Header/Header.scss.js";import"../../../componentsV2/Button/Button.js";import{ButtonIcon as Z}from"../../../componentsV2/ButtonIcon/ButtonIcon.js";import{Tooltip as J}from"../../../componentsV2/Tooltip/Tooltip.js";import"../../../componentsV2/Popover/Popover.js";import"../../../componentsV2/PopoverPanel/PopoverPanel.js";import"../../../componentsV2/Radio/Radio.js";import"../../../componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.scss.js";import"../../../componentsV2/Checkbox/Checkbox.js";import"../../../componentsV2/TextInput/TextInput.js";import"../../../componentsV2/TextInputNext/TextInputNext.js";import"../../../componentsV2/Label/Label.js";import"../../../componentsV2/TextEndTruncated/TextEndTruncated.scss.js";import"../../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.constants.js";import"../../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.scss.js";import"../../../componentsV2/TextLink/TextLink.js";import"../../../componentsV2/Chip/Chip.js";import"../../../componentsV2/ChipAlert/ChipAlert.js";import"../../../componentsV2/ChipIndicator/ChipIndicator.js";import"../../../componentsV2/Avatar/Avatar.js";import"../../../componentsV2/AvatarGroup/AvatarGroup.js";import"@material-ui/lab";import"../../../componentsV2/ToggleButtons/ToggleButtons.scss.js";import"../../../componentsV2/Paper/Paper.js";import"../../../componentsV2/ModalWindow/ModalWindow.js";import"../../../componentsV2/Modal/Modal.scss.js";import"../../../componentsV2/Menu/Menu.js";import"@icon-park/react/es/all";import"../../../icons/IconParkProvider.js";import"../../../icons/customIcons/icons/AddMessage.js";import"../../../icons/customIcons/icons/DragOne.js";import"../../../icons/customIcons/icons/Attention.js";import"../../../icons/customIcons/icons/Collapse.js";import"../../../icons/customIcons/icons/Dashboard.js";import"../../../icons/customIcons/icons/Expand.js";import"../../../icons/customIcons/icons/FolderClosed.js";import"../../../icons/customIcons/icons/FolderClosedFilled.js";import"../../../icons/customIcons/icons/FolderOpened.js";import"../../../icons/customIcons/icons/GreaterOrEqual.js";import"../../../icons/customIcons/icons/LessOrEqual.js";import"../../../icons/customIcons/icons/Search.js";import"../../../icons/customIcons/icons/SearchOne.js";import"../../../icons/customIcons/icons/Wellhub.js";import"../../../icons/customIcons/icons/MultiRuler.js";import"../../../icons/customIcons/icons/Checkbox.js";import"../../../icons/customIcons/icons/CheckboxChecked.js";import"../../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../../icons/customIcons/icons/Radio.js";import"../../../icons/customIcons/icons/RadioChecked.js";import"../../../icons/customIcons/icons/SimulFrac.js";import"../../../icons/customIcons/icons/ZipperFrac.js";import"../../../icons/customIcons/icons/CautionFilled.js";import"../../../icons/customIcons/icons/MoreApp.js";import"../../../icons/customIcons/icons/Pad.js";import"../../../icons/customIcons/icons/DrilloutUnit.js";import"../../../icons/customIcons/icons/FracFleet.js";import"../../../icons/customIcons/icons/Global.js";import"../../../icons/customIcons/icons/Program.js";import"../../../icons/customIcons/icons/Rig.js";import"../../../icons/customIcons/icons/Well.js";import"../../../icons/customIcons/icons/Gap.js";import"../../../icons/customIcons/icons/Pin.js";import"../../../icons/customIcons/icons/CloseOneFilled.js";import"../../../icons/customIcons/icons/AttentionFilled.js";import"../../../icons/customIcons/icons/CheckOneFilled.js";import"../../../icons/customIcons/icons/Archive.js";import"../../../icons/customIcons/icons/ArchiveCancel.js";import"../../../icons/customIcons/icons/Unarchive.js";import"../../../icons/customIcons/icons/Archived.js";import"../../../icons/customIcons/icons/InterventionUnit.js";import"../../../icons/customIcons/icons/CloudDelete.js";import"../../../icons/customIcons/icons/Lasso.js";import"../../../icons/customIcons/icons/Radius.js";import"../../../icons/customIcons/icons/ErrorOps.js";import"../../../icons/customIcons/icons/DataTypeOps.js";import"../../../icons/customIcons/icons/FalsePositiveOps.js";import"../../../icons/customIcons/icons/CalibrationOps.js";import"../../../icons/customIcons/icons/CriticalOps.js";import"../../../icons/customIcons/icons/Company.js";import"../../../icons/customIcons/icons/ArchiveOne.js";import"../../../icons/customIcons/icons/ParseBotFusion.js";import"../../../icons/customIcons/icons/Connect.js";import"../../../icons/customIcons/icons/PuzzleOne.js";import"../../../icons/customIcons/icons/Feed.js";import"../../../icons/customIcons/icons/Prompt.js";import"../../../icons/customIcons/icons/Companies.js";import"../../../icons/customIcons/icons/ClipboardAi.js";import"../../../icons/customIcons/icons/Key.js";import"../../../icons/customIcons/icons/AtSignCrossed.js";import"../../../icons/customIcons/icons/MappingManual.js";import"../../../icons/customIcons/icons/Mapping.js";import"../../../icons/customIcons/icons/Metrics.js";import"../../../icons/customIcons/icons/Drops.js";import"../../../icons/customIcons/icons/ClipboardSearch.js";import"../../../icons/customIcons/icons/Template.js";import"../../../icons/customIcons/icons/ClipboardMetrics.js";import"../../../icons/customIcons/icons/ClipboardBuilder.js";import"../../../icons/customIcons/icons/UnitConversion.js";import"../../../icons/customIcons/icons/NPT.js";import"../../../icons/customIcons/icons/GuidedFrac.js";import"../../../componentsV2/utils.js";import"../../../componentsV2/Hint/Hint.scss.js";import"../../../componentsV2/Counter/Counter.js";import"../../../componentsV2/BadgeBase/BadgeBase.scss.js";import"../../../componentsV2/TemplatesControl/TemplatesControl.js";import"zustand";import"../../../componentsV2/TemplatesControl/utils.js";import"../../../componentsV2/TemplatesControl/icons/folder/index.js";import"../../../componentsV2/TemplatesControl/Store/utils.js";import"../../../componentsV2/TemplatesControl/types.js";import"../../../permissions/PermissionsContext.js";import"../../../permissions/constants/index.js";import"../../../permissions/withPermissionsHOC.js";import"../../../permissions/ProvidePermissions.js";import"../../../componentsV2/BadgeDot/BadgeDot.scss.js";import"../../../componentsV2/LoaderLinear/LoaderLinear.scss.js";import"../../../componentsV2/LoaderLogo/LoaderLogo.constants.js";import"../../../componentsV2/LoaderLogo/LoaderLogo.scss.js";import"../../../componentsV2/Switch/Switch.js";import"../../../componentsV2/Tabs/Tabs.js";import"../../../componentsV2/EmptyState/EmptyState.scss.js";import"../../../componentsV2/FileIcon/FileIcon.js";import"../../../componentsV2/Tag/Tag.js";import"react-dropzone";import"../../../componentsV2/FilesDropzone/FilesDropzone.scss.js";import"../../../componentsV2/FilesLoader/FilesLoader.scss.js";import"file-extension";import"image-extensions";import"video-extensions";import"../../../componentsV2/FilesProcessor/FilesProcessor.scss.js";import"../../../componentsV2/Skeleton/Skeleton.scss.js";import"../../../utils/main.js";import"../../../componentsV2/CopyToClipboard/CopyToClipboard.scss.js";import"../../../componentsV2/Stepper/Step/Step.scss.js";import"../../../componentsV2/Stepper/Stepper.scss.js";import"../../../componentsV2/ButtonLive/ButtonLive.js";import"../../../componentsV2/ButtonText/ButtonText.js";import"../../../componentsV2/IndicatorLive/IndicatorLive.js";import"../../../componentsV2/Accordion/Accordion.scss.js";import"../../../componentsV2/Breadcrumbs/Breadcrumbs.scss.js";import"../../../componentsV2/BadgeComment/BadgeComment.js";import"../../../componentsV2/AppContainer/AppContainer.js";import"../../../componentsV2/AppContainer/AppContainer.constants.js";import"../../../componentsV2/AppFooter/AppFooter.js";import"../../../componentsV2/AppHeader/AppHeader.constants.js";import"../../../componentsV2/AppHeader/AppBadge/AppBadge.scss.js";import"../../../componentsV2/AppHeader/AppAssets/utils.js";import"../../../componentsV2/AppHeader/AppAssets/AppAssets.scss.js";import"../../PadModeSelect/PadModeSelect.js";import"../../../componentsV2/AppHeader/PadMode/PadMode.scss.js";import"../../../componentsV2/PadModeSelect/PadModeSelect.js";import"../../../componentsV2/PadModeSelect/PadModeSelect.constants.js";import"../../../componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js";import"../../../componentsV2/UniversalLink/UniversalLink.scss.js";import"../../../componentsV2/AppHeader/V3/AssetChips/AssetChips.scss.js";import"../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.js";import"../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.constants.js";import"../../../componentsV2/AppFooter/DqPopover/DqStatusIcon/DqStatusIcon.js";import"../../../componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.scss.js";import"../../../componentsV2/AppDqPopover/DqAlert/DqAlert.scss.js";import"../../../componentsV2/AppDqPopover/DqAsset/DqAsset.scss.js";import"../../../componentsV2/AppDqPopover/AppDqPopover.scss.js";import"../../AppIcon/AppIcon.js";import"../../../utils/getSingleAsset.js";import"../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorChip/AssetSelectorChip.js";import"../../../componentsV2/AppHeader/V3/AssetSelector/constants.js";import"../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/AssetSelectorSelect.scss.js";import"../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/loadAssets.js";import"../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelector.scss.js";import"../../../componentsV2/AppHeader/V3/AppTitle/AppTitle.constants.js";import"../../../componentsV2/AppHeader/V3/AppTitle/AppTitle.scss.js";import"../../../componentsV2/AppHeader/V3/constants.scss.js";import"@babel/runtime/helpers/typeof";import"../../../componentsV2/AppHeader/V3/SettingsButton/SettingsButton.js";import"../../../componentsV2/AppHeader/V3/SettingsButton/SettingsButton.constants.js";import"../../../componentsV2/AppSettings/AppSettings.js";import"../../../componentsV2/AppSettings/AppSettings.constants.js";import"../../../componentsV2/AppSizeProvider/AppSizeProvider.js";import"../../../componentsV2/AppHeader/V3/Actions/Actions.constants.js";import"../../../componentsV2/AppHeader/V3/Actions/Actions.scss.js";import"../../../componentsV2/AppHeader/V3/AppHeaderV3.scss.js";import"../../../componentsV2/AppHeader/AppHeader.scss.js";import"../../../componentsV2/OffsetWellsButton/OffsetWellsButton.js";import"../../../componentsV2/ChartAxisExtreme/ChartAxisExtreme.scss.js";import"highcharts";import"../../../componentsV2/ChartAxisExtreme/ChartAxisExtremeDragTracker.js";import"../../../componentsV2/Autocomplete/Autocomplete.js";import"../../../componentsV2/Select/Select.js";import"../../../componentsV2/AppSettingsDivider/AppSettingsDivider.scss.js";import"../../../componentsV2/WellArchivedMessage/WellArchivedMessage.js";import"../../../componentsV2/DatePicker/DatePicker.js";import"../../../componentsV2/DragHandle/DragHandle.js";import"../../../componentsV2/CompletionsOffsetWellPicker/CompletionsOffsetWellPicker.js";import"../../../componentsV2/Slider/constants.js";import"../../../componentsV2/Slider/components/SliderThumb.js";import"../../../componentsV2/Slider/Slider.scss.js";import"../../../componentsV2/SliderAdvanced/SliderAdvanced.js";import"react-color";import"../../../componentsV2/ColorPicker/Swatches/Swatches.scss.js";import"../../../componentsV2/ColorPicker/OpacityDragtracker/OpacityDragTracker.scss.js";import"../../../componentsV2/ColorPicker/ColorPicker.scss.js";import"../../../componentsV2/ChartHelper/ChartHelper.scss.js";import"../../../componentsV2/Hotkey/Hotkey.js";import{showSuccessNotification as Q}from"../../../utils/notificationToasts.js";function X(o,s){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);s&&(n=n.filter((function(s){return Object.getOwnPropertyDescriptor(o,s).enumerable}))),t.push.apply(t,n)}return t}function Y(s){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X(Object(n),!0).forEach((function(t){o(s,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach((function(o){Object.defineProperty(s,o,Object.getOwnPropertyDescriptor(n,o))}))}return s}var $=B||O,oo="DevCenter_AppContainer";function so(o){var O,X,so,to,no,eo,io,po,ro,co,mo,ao,lo,uo,jo,Ao=o.CLIAppComponent,go=o.CLIAppSettings,Co=o.app,Io=o.appId,Vo=o.className,ho=o.coordinates,vo=o.currentDashboardAppsLastAnnotations,So=o.currentUser,fo=o.devCenterRouter,bo=o.disableAppAssetSelection,Do=o.isActionsDisabled,Po=o.isNonIsolatedApp,xo=void 0!==Po&&Po,Mo=o.isSettingsDialogHidden,yo=o.layoutEnvironment,To=o.onAppContainerClick,Lo=void 0===To?c:To,ko=o.onAppRemove,Ho=o.onReportBugClick,Bo=o.onCloneDashboard,Oo=o.onHelpCenterClick,Fo=o.onIsMaximizedChange,wo=o.onSettingChange,Ro=o.onSettingsChange,zo=o.openIntercom,Eo=void 0===zo?c:zo,qo=o.setIsFullscreenModalMode,Uo=void 0===qo?c:qo,Wo=o.timestamp,_o=o.updateCurrentDashboardAppLastAnnotation,No=o.dashboardMeta,Go=o.reloadApp,Ko=void 0===Go?void 0:Go,Zo=o.chatActions,Jo=t(l),Qo=m(),Xo=n([]),Yo=s(Xo,2),$o=Yo[0],os=Yo[1],ss=n([]),ts=s(ss,2),ns=ts[0],es=ts[1],is=null!==(O=null==Jo?void 0:Jo[Io||Co.id])&&void 0!==O?O:{isLoading:!0},ps=null===(X=Co.package)||void 0===X||null===(so=X.manifest)||void 0===so?void 0:so.application,rs=W(Co),cs=!(null==No||!No.isChiplessDashboard),ms=_({uiSettings:null==ps?void 0:ps.ui,isChiplessDashboard:cs}),as=!(null==ps||null===(to=ps.ui)||void 0===to||!to.enable_comments),ls=N(Co),ds=V({onIsMaximizedChange:Fo,devCenterRouter:fo,appId:Io}),us=ds.isMaximized,js=ds.setIsMaximized,As=Wo||G(null===(no=fo.location.query)||void 0===no?void 0:no.query),gs=Co.id===q,Cs=gs&&$?Y(Y({},ho),{},{w:12}):ho,Is=x(Co),Vs=E({CLIAppComponent:Ao,CLIAppSettings:go,app:Co,version:Is}),hs=Vs.isLoading,vs=Vs.AppSettings,Ss=Vs.AppComponent,fs=g({setIsFullscreenModalMode:Uo}),bs=fs.isAppSettingsDialogOpened,Ds=fs.toggleAppSettingsDialog,Ps=C(),xs=Ps.isAnnotationsListOpened,Ms=Ps.toggleAnnotationsList,ys=hs||!So||!ms&&is.isLoading,Ts=I({app:Co,appData:is,currentDashboardAppsLastAnnotations:vo}),Ls=Ts.appLastAnnotation,ks=Ts.assetCompanyId,Hs=Ts.assetIdForAnnotation,Bs=Ts.isAppSupportsAnnotations,Os=p(r(is,["well","rig","fracFleet","wells","interventionUnit"]),Boolean),Fs=e((function(){return null==ns?void 0:ns.map((function(o){return Y(Y({},o),{},{onClick:function(){var s;null===(s=o.onClick)||void 0===s||s.call(o),o.to&&fo.push(o.to)}})}))}),[ns,fo]),ws=!(null==Co||null===(eo=Co.package)||void 0===eo||null===(io=eo.manifest)||void 0===io||null===(po=io.application)||void 0===po||null===(ro=po.ui)||void 0===ro||!ro.use_app_header_v3),Rs=!(null==(lo=fo)||null===(uo=lo.location)||void 0===uo||null===(jo=uo.pathname)||void 0===jo||!jo.startsWith("/home"));return u(d.Provider,{value:fo,children:u(D,{setIsFullscreenModalMode:Uo,children:u(U,Y(Y({maximized:us,setMaximized:js,appId:null==Co||null===(co=Co.app)||void 0===co?void 0:co.id,app:Co,appSettings:Co.settings,onSettingChange:wo,onSettingsChange:Ro,appHeadersV3Enabled:ws,isNonIsolatedApp:xo,disableAppAssetSelection:bo,isMultiRig:ms,currentUser:So,appData:is,layoutEnvironment:yo,appSettingsComponent:vs,dashboardMeta:No,toggleAnnotationsList:Bs?Ms:void 0,onHelpCenterClick:Oo,secondaryMenuItems:Fs,onAppRemove:ko,isInsideNewMobileApp:H,globalOffsetWells:null==No?void 0:No.globalOffsetWells,globalOffsetWellsVersion:null==No?void 0:No.globalOffsetWellsVersion,reloadApp:Ko},Os),{},{children:u(T,{children:j("div",{className:i("dc-app-container",H&&"dc-app-container--inside-new-mobile-app",Rs&&"dc-app-container--inside-home-page",Vo,us&&"dc-app-container__maximized",Qo.isLightTheme&&"dc-app-container__light-theme",k.container),"data-testid":"".concat(oo,"_").concat(ls),onClick:function(){return Lo()},children:[u(z,{}),u("div",{className:k.containerContent,children:u(b,{AppComponent:Ss,app:Co,appData:Os,isAppLoading:hs,availability:M(Co.availability,So.company.with_subscription),isCLIApp:gs,isLoading:ys,isMultiRig:ms,layoutEnvironment:yo,openIntercom:Eo,segment:rs,toggleAppSettingsDialog:Ds,appProps:{coordinates:Cs,currentUser:So,devCenterRouter:fo,onSettingChange:wo,onSettingsChange:Ro,segment:rs,setIsFullscreenModalMode:Uo,setIsMaximized:js,setMainMenuItems:os,setSecondaryMenuItems:es,toggleAppSettingsDialog:Ds,appHeaderProps:Y({app:Co,appLastAnnotation:Ls,appSettings:Co.settings,coordinates:Cs,currentUser:So,isMaximized:us,layoutEnvironment:yo,onSettingChange:wo,toggleAnnotationsList:Ms,updateCurrentDashboardAppLastAnnotation:_o},Os),isNative:B,layoutEnvironment:yo,timestamp:As,chatActions:Zo}})}),bs&&u(v,{AppSettingsComponent:vs,app:Co,appData:is,appName:ls,currentUser:So,disableAppAssetSelection:bo,isMultiRig:ms,isSettingsDialogHidden:Mo,layoutEnvironment:yo,onAppRemove:ko,onCloneDashboard:Bo,onSettingChange:wo,onSettingsChange:Ro,openIntercom:Eo,rigId:null!==(mo=null===(ao=is.rig)||void 0===ao?void 0:ao.id)&&void 0!==mo?mo:null,timestamp:As,toggleAppSettingsDialog:Ds}),xs&&u(R,{children:u(w,{appId:Co.app.id,appSettings:Co.settings,appTitle:ls,assetCompanyId:ks,assetId:Hs,currentUser:So,onClose:Ms,showSuccessNotification:Q})}),us&&!ws&&u(P,{setIsMaximized:js}),!Do&&(!ws||ys)&&j(h,{children:[as&&u(L,{currentUser:So}),Bs&&u(J,{title:"Add Annotation",placement:"top",disabled:!!$,children:u(Z,{size:"small",type:"tertiaryBg",onClick:Ms,testId:"".concat(oo,"_addAnnotation"),children:u(F,{})})}),Ho&&!gs&&u(J,{title:"Report A Bug",placement:"top",disabled:!!$,children:u(Z,{size:"small",type:"tertiaryBg",onClick:function(){return Ho()},children:u(a,{})})}),u(J,{placement:"top",disabled:!!$||gs,title:"Help Center",children:u(Z,{testId:"".concat(oo,"_helpContent"),onClick:function(){return Oo()},disabled:gs,size:"small",type:"tertiaryBg",children:u(K,{appId:Co.app.id,helpContentUpdatedAt:Co.help_content_updated_at})})}),!$||us||H?j(A,{children:[u(y,{menuItems:$o,devCenterRouter:fo,isMobileView:$}),u(S,{devCenterRouter:fo,isMaximized:us,isMobileView:$,menuItems:ns,setIsFullscreenModalMode:Uo,setIsMaximized:js,toggleAppSettingsDialog:Ds})]}):u(f,{setIsMaximized:js})]})]})})}))})})}export{so as default};
1
+ import o from"@babel/runtime/helpers/defineProperty";import s from"@babel/runtime/helpers/slicedToArray";import{useContext as t,useState as n,useMemo as e}from"react";import i from"classnames";import{pickBy as p,pick as r,noop as c}from"lodash";import{useTheme as m}from"@material-ui/core";import{BugReport as a}from"@material-ui/icons";import l from"../AppContext.js";import{DevCenterRouterContext as d}from"../DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router-dom";import"query-string";import{jsx as u,jsxs as j,Fragment as A}from"react/jsx-runtime";import g from"./effects/useAppSettings.js";import C from"./effects/useAnnotationsList.js";import I from"./effects/useAnnotationsData.js";import V from"./effects/useAppMaximized.js";import v from"./components/AppActions/AppActions.js";import h from"./components/AppSettingsDialog/AppSettingsDialog.js";import"./components/AppSettingsDialog/components/RemoveAppButton.js";import"./components/AppSettingsDialog/components/SettingsAccordion.js";import"./components/AnnotationsButton/AnnotationsButton.js";import{NonPriorityMenus as S}from"./components/NonPriorityMenus/NonPriorityMenus.js";import f from"./components/FullscreenButton/FullscreenButton.js";import"./components/AppInfoMessage/AppInfoMessage.js";import b from"./components/DevCenterAppView/DevCenterAppView.js";import{DcFullscreenElemsCoordinatorProvider as D}from"./components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"./components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"./components/IsInsideIsolatedDcAppProvider/IsInsideIsolatedDcAppProvider.js";import P from"./components/RestoreAppSizeButton/index.js";import{getAppVersion as x,getAppAvailability as M}from"./utils.js";import T from"./components/PriorityMenus/PriorityMenus.js";import{CommentsSwitchProvider as y}from"./components/CommentsSwitch/CommentsSwitchProvider.js";import{CommentsSwitchButton as L}from"./components/CommentsSwitch/CommentsSwitchButton.js";import k from"./DevCenterAppContainer.scss.js";import{isInsideNewMobileApp as H,isNativeDetected as O,isMobileDetected as B}from"../../../utils/mobileDetect.js";import F from"../../Icons/AnnotationIcon.js";import w from"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import{AnnotationsProvider as R}from"../../Annotations/AnnotationsContext.js";import"../../Toaster/Toaster.js";import{ToastContainer as z}from"../../Toaster/ToastContainer.js";import"../../../clients/subscriptions/constants.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../clients/subscriptions.v1.js";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions/subscriptions-client.factory.js";import E from"../../../effects/useDevCenterApp.js";import"../../../utils/index.js";import"uuid";import"jsona";import"../../../constants/segment.js";import"../../../utils/env.js";import{DEV_CENTER_CLI_APP_ID as q}from"../../../constants/devcenter.js";import"../../../constants/goals.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"../../StatusBadge/constants.js";import"@babel/runtime/helpers/toConsumableArray";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../clients/api/apiCore.js";import"../../../clients/constants.js";import"../../../clients/sso/auth0.js";import"../../../clients/sso/oauth2.js";import"../../../clients/api/rateLimiter.js";import"lodash/isEmpty";import"lodash/sortBy";import"../../../constants/streamSourceType.js";import"./components/CommentsSwitch/CommentsSwitchContext.js";import{AppCommonsProvider as W}from"../../../componentsV2/AppCommonsProvider/AppCommonsProvider.js";import"../../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../../componentsV2/AppSettings/AppSettingsPinningContext.js";import{getAppSegment as U,isDCAppMultiRig as _,getAppName as N,getTimestampFromQuery as G}from"../../../utils/devcenter.js";import{HelpCenterIcon as K}from"../../HelpCenter/HelpCenterIcon.js";import"../../../componentsV2/Text/Text.js";import"../../../componentsV2/Grid/Grid.js";import"../../../componentsV2/Grid/Cell.js";import"../../../componentsV2/Header/Header.scss.js";import"../../../componentsV2/Button/Button.js";import{ButtonIcon as Z}from"../../../componentsV2/ButtonIcon/ButtonIcon.js";import{Tooltip as J}from"../../../componentsV2/Tooltip/Tooltip.js";import"../../../componentsV2/Popover/Popover.js";import"../../../componentsV2/PopoverPanel/PopoverPanel.js";import"../../../componentsV2/Radio/Radio.js";import"../../../componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.scss.js";import"../../../componentsV2/Checkbox/Checkbox.js";import"../../../componentsV2/TextInput/TextInput.js";import"../../../componentsV2/TextInputNext/TextInputNext.js";import"../../../componentsV2/Label/Label.js";import"../../../componentsV2/TextEndTruncated/TextEndTruncated.scss.js";import"../../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.constants.js";import"../../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.scss.js";import"../../../componentsV2/TextLink/TextLink.js";import"../../../componentsV2/Chip/Chip.js";import"../../../componentsV2/ChipAlert/ChipAlert.js";import"../../../componentsV2/ChipIndicator/ChipIndicator.js";import"../../../componentsV2/Avatar/Avatar.js";import"../../../componentsV2/AvatarGroup/AvatarGroup.js";import"@material-ui/lab";import"../../../componentsV2/ToggleButtons/ToggleButtons.scss.js";import"../../../componentsV2/Paper/Paper.js";import"../../../componentsV2/ModalWindow/ModalWindow.js";import"../../../componentsV2/Modal/Modal.scss.js";import"../../../componentsV2/Menu/Menu.js";import"@icon-park/react/es/all";import"../../../icons/IconParkProvider.js";import"../../../icons/customIcons/icons/AddMessage.js";import"../../../icons/customIcons/icons/DragOne.js";import"../../../icons/customIcons/icons/Attention.js";import"../../../icons/customIcons/icons/Collapse.js";import"../../../icons/customIcons/icons/Dashboard.js";import"../../../icons/customIcons/icons/Expand.js";import"../../../icons/customIcons/icons/FolderClosed.js";import"../../../icons/customIcons/icons/FolderClosedFilled.js";import"../../../icons/customIcons/icons/FolderOpened.js";import"../../../icons/customIcons/icons/GreaterOrEqual.js";import"../../../icons/customIcons/icons/LessOrEqual.js";import"../../../icons/customIcons/icons/Search.js";import"../../../icons/customIcons/icons/SearchOne.js";import"../../../icons/customIcons/icons/Wellhub.js";import"../../../icons/customIcons/icons/MultiRuler.js";import"../../../icons/customIcons/icons/Checkbox.js";import"../../../icons/customIcons/icons/CheckboxChecked.js";import"../../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../../icons/customIcons/icons/Radio.js";import"../../../icons/customIcons/icons/RadioChecked.js";import"../../../icons/customIcons/icons/SimulFrac.js";import"../../../icons/customIcons/icons/ZipperFrac.js";import"../../../icons/customIcons/icons/CautionFilled.js";import"../../../icons/customIcons/icons/MoreApp.js";import"../../../icons/customIcons/icons/Pad.js";import"../../../icons/customIcons/icons/DrilloutUnit.js";import"../../../icons/customIcons/icons/FracFleet.js";import"../../../icons/customIcons/icons/Global.js";import"../../../icons/customIcons/icons/Program.js";import"../../../icons/customIcons/icons/Rig.js";import"../../../icons/customIcons/icons/Well.js";import"../../../icons/customIcons/icons/Gap.js";import"../../../icons/customIcons/icons/Pin.js";import"../../../icons/customIcons/icons/CloseOneFilled.js";import"../../../icons/customIcons/icons/AttentionFilled.js";import"../../../icons/customIcons/icons/CheckOneFilled.js";import"../../../icons/customIcons/icons/Archive.js";import"../../../icons/customIcons/icons/ArchiveCancel.js";import"../../../icons/customIcons/icons/Unarchive.js";import"../../../icons/customIcons/icons/Archived.js";import"../../../icons/customIcons/icons/InterventionUnit.js";import"../../../icons/customIcons/icons/CloudDelete.js";import"../../../icons/customIcons/icons/Lasso.js";import"../../../icons/customIcons/icons/Radius.js";import"../../../icons/customIcons/icons/ErrorOps.js";import"../../../icons/customIcons/icons/DataTypeOps.js";import"../../../icons/customIcons/icons/FalsePositiveOps.js";import"../../../icons/customIcons/icons/CalibrationOps.js";import"../../../icons/customIcons/icons/CriticalOps.js";import"../../../icons/customIcons/icons/Company.js";import"../../../icons/customIcons/icons/ArchiveOne.js";import"../../../icons/customIcons/icons/ParseBotFusion.js";import"../../../icons/customIcons/icons/Connect.js";import"../../../icons/customIcons/icons/PuzzleOne.js";import"../../../icons/customIcons/icons/Feed.js";import"../../../icons/customIcons/icons/Prompt.js";import"../../../icons/customIcons/icons/Companies.js";import"../../../icons/customIcons/icons/ClipboardAi.js";import"../../../icons/customIcons/icons/Key.js";import"../../../icons/customIcons/icons/AtSignCrossed.js";import"../../../icons/customIcons/icons/MappingManual.js";import"../../../icons/customIcons/icons/Mapping.js";import"../../../icons/customIcons/icons/Metrics.js";import"../../../icons/customIcons/icons/Drops.js";import"../../../icons/customIcons/icons/ClipboardSearch.js";import"../../../icons/customIcons/icons/Template.js";import"../../../icons/customIcons/icons/ClipboardMetrics.js";import"../../../icons/customIcons/icons/ClipboardBuilder.js";import"../../../icons/customIcons/icons/UnitConversion.js";import"../../../icons/customIcons/icons/NPT.js";import"../../../icons/customIcons/icons/GuidedFrac.js";import"../../../componentsV2/utils.js";import"../../../componentsV2/Hint/Hint.scss.js";import"../../../componentsV2/Counter/Counter.js";import"../../../componentsV2/BadgeBase/BadgeBase.scss.js";import"../../../componentsV2/TemplatesControl/TemplatesControl.js";import"zustand";import"../../../componentsV2/TemplatesControl/utils.js";import"../../../componentsV2/TemplatesControl/icons/folder/index.js";import"../../../componentsV2/TemplatesControl/Store/utils.js";import"../../../componentsV2/TemplatesControl/types.js";import"../../../permissions/PermissionsContext.js";import"../../../permissions/constants/index.js";import"../../../permissions/withPermissionsHOC.js";import"../../../permissions/ProvidePermissions.js";import"../../../componentsV2/BadgeDot/BadgeDot.scss.js";import"../../../componentsV2/LoaderLinear/LoaderLinear.scss.js";import"../../../componentsV2/LoaderLogo/LoaderLogo.constants.js";import"../../../componentsV2/LoaderLogo/LoaderLogo.scss.js";import"../../../componentsV2/Switch/Switch.js";import"../../../componentsV2/Tabs/Tabs.js";import"../../../componentsV2/EmptyState/EmptyState.scss.js";import"../../../componentsV2/FileIcon/FileIcon.js";import"../../../componentsV2/Tag/Tag.js";import"react-dropzone";import"../../../componentsV2/FilesDropzone/FilesDropzone.scss.js";import"../../../componentsV2/FilesLoader/FilesLoader.scss.js";import"file-extension";import"image-extensions";import"video-extensions";import"../../../componentsV2/FilesProcessor/FilesProcessor.scss.js";import"../../../componentsV2/Skeleton/Skeleton.scss.js";import"../../../utils/main.js";import"../../../componentsV2/CopyToClipboard/CopyToClipboard.scss.js";import"../../../componentsV2/Stepper/Step/Step.scss.js";import"../../../componentsV2/Stepper/Stepper.scss.js";import"../../../componentsV2/ButtonLive/ButtonLive.js";import"../../../componentsV2/ButtonText/ButtonText.js";import"../../../componentsV2/IndicatorLive/IndicatorLive.js";import"../../../componentsV2/Accordion/Accordion.scss.js";import"../../../componentsV2/Breadcrumbs/Breadcrumbs.scss.js";import"../../../componentsV2/BadgeComment/BadgeComment.js";import"../../../componentsV2/AppContainer/AppContainer.js";import"../../../componentsV2/AppContainer/AppContainer.constants.js";import"../../../componentsV2/AppFooter/AppFooter.js";import"../../../componentsV2/AppHeader/AppHeader.constants.js";import"../../../componentsV2/AppHeader/AppBadge/AppBadge.scss.js";import"../../../componentsV2/AppHeader/AppAssets/utils.js";import"../../../componentsV2/AppHeader/AppAssets/AppAssets.scss.js";import"../../PadModeSelect/PadModeSelect.js";import"../../../componentsV2/AppHeader/PadMode/PadMode.scss.js";import"../../../componentsV2/PadModeSelect/PadModeSelect.js";import"../../../componentsV2/PadModeSelect/PadModeSelect.constants.js";import"../../../componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js";import"../../../componentsV2/UniversalLink/UniversalLink.scss.js";import"../../../componentsV2/AppHeader/V3/AssetChips/AssetChips.scss.js";import"../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.js";import"../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.constants.js";import"../../../componentsV2/AppFooter/DqPopover/DqStatusIcon/DqStatusIcon.js";import"../../../componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.scss.js";import"../../../componentsV2/AppDqPopover/DqAlert/DqAlert.scss.js";import"../../../componentsV2/AppDqPopover/DqAsset/DqAsset.scss.js";import"../../../componentsV2/AppDqPopover/AppDqPopover.scss.js";import"../../AppIcon/AppIcon.js";import"../../../utils/getSingleAsset.js";import"../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorChip/AssetSelectorChip.js";import"../../../componentsV2/AppHeader/V3/AssetSelector/constants.js";import"../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/AssetSelectorSelect.scss.js";import"../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/loadAssets.js";import"../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelector.scss.js";import"../../../componentsV2/AppHeader/V3/AppTitle/AppTitle.constants.js";import"../../../componentsV2/AppHeader/V3/AppTitle/AppTitle.scss.js";import"../../../componentsV2/AppHeader/V3/constants.scss.js";import"@babel/runtime/helpers/typeof";import"../../../componentsV2/AppHeader/V3/SettingsButton/SettingsButton.js";import"../../../componentsV2/AppHeader/V3/SettingsButton/SettingsButton.constants.js";import"../../../componentsV2/AppSettings/AppSettings.js";import"../../../componentsV2/AppSettings/AppSettings.constants.js";import"../../../componentsV2/AppSizeProvider/AppSizeProvider.js";import"../../../componentsV2/AppHeader/V3/Actions/Actions.constants.js";import"../../../componentsV2/AppHeader/V3/Actions/Actions.scss.js";import"../../../componentsV2/AppHeader/V3/AppHeaderV3.scss.js";import"../../../componentsV2/AppHeader/AppHeader.scss.js";import"../../../componentsV2/OffsetWellsButton/OffsetWellsButton.js";import"../../../componentsV2/ChartAxisExtreme/ChartAxisExtreme.scss.js";import"highcharts";import"../../../componentsV2/ChartAxisExtreme/ChartAxisExtremeDragTracker.js";import"../../../componentsV2/Autocomplete/Autocomplete.js";import"../../../componentsV2/Select/Select.js";import"../../../componentsV2/AppSettingsDivider/AppSettingsDivider.scss.js";import"../../../componentsV2/WellArchivedMessage/WellArchivedMessage.js";import"../../../componentsV2/DatePicker/DatePicker.js";import"../../../componentsV2/DragHandle/DragHandle.js";import"../../../componentsV2/CompletionsOffsetWellPicker/CompletionsOffsetWellPicker.js";import"../../../componentsV2/Slider/constants.js";import"../../../componentsV2/Slider/components/SliderThumb.js";import"../../../componentsV2/Slider/Slider.scss.js";import"../../../componentsV2/SliderAdvanced/SliderAdvanced.js";import"react-color";import"../../../componentsV2/ColorPicker/Swatches/Swatches.scss.js";import"../../../componentsV2/ColorPicker/OpacityDragtracker/OpacityDragTracker.scss.js";import"../../../componentsV2/ColorPicker/ColorPicker.scss.js";import"../../../componentsV2/ChartHelper/ChartHelper.scss.js";import"../../../componentsV2/Hotkey/Hotkey.js";import{showSuccessNotification as Q}from"../../../utils/notificationToasts.js";function X(o,s){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);s&&(n=n.filter((function(s){return Object.getOwnPropertyDescriptor(o,s).enumerable}))),t.push.apply(t,n)}return t}function Y(s){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X(Object(n),!0).forEach((function(t){o(s,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach((function(o){Object.defineProperty(s,o,Object.getOwnPropertyDescriptor(n,o))}))}return s}var $=O||B,oo="DevCenter_AppContainer";function so(o){var B,X,so,to,no,eo,io,po,ro,co,mo,ao,lo,uo,jo,Ao=o.CLIAppComponent,go=o.CLIAppSettings,Co=o.app,Io=o.appId,Vo=o.className,vo=o.coordinates,ho=o.currentDashboardAppsLastAnnotations,So=o.currentUser,fo=o.devCenterRouter,bo=o.disableAppAssetSelection,Do=o.isActionsDisabled,Po=o.isNonIsolatedApp,xo=void 0!==Po&&Po,Mo=o.isSettingsDialogHidden,To=o.layoutEnvironment,yo=o.onAppContainerClick,Lo=void 0===yo?c:yo,ko=o.onAppRemove,Ho=o.onReportBugClick,Oo=o.onCloneDashboard,Bo=o.onHelpCenterClick,Fo=o.onIsMaximizedChange,wo=o.onSettingChange,Ro=o.onSettingsChange,zo=o.openIntercom,Eo=void 0===zo?c:zo,qo=o.setIsFullscreenModalMode,Wo=void 0===qo?c:qo,Uo=o.timestamp,_o=o.updateCurrentDashboardAppLastAnnotation,No=o.dashboardMeta,Go=o.reloadApp,Ko=void 0===Go?void 0:Go,Zo=o.chatActions,Jo=t(l),Qo=m(),Xo=n([]),Yo=s(Xo,2),$o=Yo[0],os=Yo[1],ss=n([]),ts=s(ss,2),ns=ts[0],es=ts[1],is=null!==(B=null==Jo?void 0:Jo[Io||Co.id])&&void 0!==B?B:{isLoading:!0},ps=null===(X=Co.package)||void 0===X||null===(so=X.manifest)||void 0===so?void 0:so.application,rs=U(Co),cs=!(null==No||!No.isChiplessDashboard),ms=_({uiSettings:null==ps?void 0:ps.ui,isChiplessDashboard:cs}),as=!(null==ps||null===(to=ps.ui)||void 0===to||!to.enable_comments),ls=N(Co),ds=V({onIsMaximizedChange:Fo,devCenterRouter:fo,appId:Io}),us=ds.isMaximized,js=ds.setIsMaximized,As=Uo||G(null===(no=fo.location.query)||void 0===no?void 0:no.query),gs=Co.id===q,Cs=gs&&$?Y(Y({},vo),{},{w:12}):vo,Is=x(Co),Vs=E({CLIAppComponent:Ao,CLIAppSettings:go,app:Co,version:Is}),vs=Vs.isLoading,hs=Vs.AppSettings,Ss=Vs.AppComponent,fs=g({setIsFullscreenModalMode:Wo}),bs=fs.isAppSettingsDialogOpened,Ds=fs.toggleAppSettingsDialog,Ps=C(),xs=Ps.isAnnotationsListOpened,Ms=Ps.toggleAnnotationsList,Ts=vs||!So||!ms&&is.isLoading,ys=I({app:Co,appData:is,currentDashboardAppsLastAnnotations:ho}),Ls=ys.appLastAnnotation,ks=ys.assetCompanyId,Hs=ys.assetIdForAnnotation,Os=ys.isAppSupportsAnnotations,Bs=p(r(is,["well","rig","fracFleet","wells","interventionUnit"]),Boolean),Fs=e((function(){return null==ns?void 0:ns.map((function(o){return Y(Y({},o),{},{onClick:function(){var s;null===(s=o.onClick)||void 0===s||s.call(o),o.to&&fo.push(o.to)}})}))}),[ns,fo]),ws=!(null==Co||null===(eo=Co.package)||void 0===eo||null===(io=eo.manifest)||void 0===io||null===(po=io.application)||void 0===po||null===(ro=po.ui)||void 0===ro||!ro.use_app_header_v3),Rs=!(null==(lo=fo)||null===(uo=lo.location)||void 0===uo||null===(jo=uo.pathname)||void 0===jo||!jo.startsWith("/home"));return u(d.Provider,{value:fo,children:u(D,{setIsFullscreenModalMode:Wo,children:u(W,Y(Y({maximized:us,setMaximized:js,appId:null==Co||null===(co=Co.app)||void 0===co?void 0:co.id,app:Co,appSettings:Co.settings,onSettingChange:wo,onSettingsChange:Ro,appHeadersV3Enabled:ws,isNonIsolatedApp:xo,disableAppAssetSelection:bo,isMultiRig:ms,currentUser:So,appData:is,layoutEnvironment:To,appSettingsComponent:hs,dashboardMeta:No,toggleAnnotationsList:Os?Ms:void 0,onHelpCenterClick:Bo,secondaryMenuItems:Fs,onAppRemove:ko,isInsideNewMobileApp:H,globalOffsetWells:null==No?void 0:No.globalOffsetWells,globalOffsetWellsVersion:null==No?void 0:No.globalOffsetWellsVersion,globalOffsetWellsToken:null==No?void 0:No.globalOffsetWellsToken,reloadApp:Ko},Bs),{},{children:u(y,{children:j("div",{className:i("dc-app-container",H&&"dc-app-container--inside-new-mobile-app",Rs&&"dc-app-container--inside-home-page",Vo,us&&"dc-app-container__maximized",Qo.isLightTheme&&"dc-app-container__light-theme",k.container),"data-testid":"".concat(oo,"_").concat(ls),onClick:function(){return Lo()},children:[u(z,{}),u("div",{className:k.containerContent,children:u(b,{AppComponent:Ss,app:Co,appData:Bs,isAppLoading:vs,availability:M(Co.availability,So.company.with_subscription),isCLIApp:gs,isLoading:Ts,isMultiRig:ms,layoutEnvironment:To,openIntercom:Eo,segment:rs,toggleAppSettingsDialog:Ds,appProps:{coordinates:Cs,currentUser:So,devCenterRouter:fo,onSettingChange:wo,onSettingsChange:Ro,segment:rs,setIsFullscreenModalMode:Wo,setIsMaximized:js,setMainMenuItems:os,setSecondaryMenuItems:es,toggleAppSettingsDialog:Ds,appHeaderProps:Y({app:Co,appLastAnnotation:Ls,appSettings:Co.settings,coordinates:Cs,currentUser:So,isMaximized:us,layoutEnvironment:To,onSettingChange:wo,toggleAnnotationsList:Ms,updateCurrentDashboardAppLastAnnotation:_o},Bs),isNative:O,layoutEnvironment:To,timestamp:As,chatActions:Zo}})}),bs&&u(h,{AppSettingsComponent:hs,app:Co,appData:is,appName:ls,currentUser:So,disableAppAssetSelection:bo,isMultiRig:ms,isSettingsDialogHidden:Mo,layoutEnvironment:To,onAppRemove:ko,onCloneDashboard:Oo,onSettingChange:wo,onSettingsChange:Ro,openIntercom:Eo,rigId:null!==(mo=null===(ao=is.rig)||void 0===ao?void 0:ao.id)&&void 0!==mo?mo:null,timestamp:As,toggleAppSettingsDialog:Ds}),xs&&u(R,{children:u(w,{appId:Co.app.id,appSettings:Co.settings,appTitle:ls,assetCompanyId:ks,assetId:Hs,currentUser:So,onClose:Ms,showSuccessNotification:Q})}),us&&!ws&&u(P,{setIsMaximized:js}),!Do&&(!ws||Ts)&&j(v,{children:[as&&u(L,{currentUser:So}),Os&&u(J,{title:"Add Annotation",placement:"top",disabled:!!$,children:u(Z,{size:"small",type:"tertiaryBg",onClick:Ms,testId:"".concat(oo,"_addAnnotation"),children:u(F,{})})}),Ho&&!gs&&u(J,{title:"Report A Bug",placement:"top",disabled:!!$,children:u(Z,{size:"small",type:"tertiaryBg",onClick:function(){return Ho()},children:u(a,{})})}),u(J,{placement:"top",disabled:!!$||gs,title:"Help Center",children:u(Z,{testId:"".concat(oo,"_helpContent"),onClick:function(){return Bo()},disabled:gs,size:"small",type:"tertiaryBg",children:u(K,{appId:Co.app.id,helpContentUpdatedAt:Co.help_content_updated_at})})}),!$||us||H?j(A,{children:[u(T,{menuItems:$o,devCenterRouter:fo,isMobileView:$}),u(S,{devCenterRouter:fo,isMaximized:us,isMobileView:$,menuItems:ns,setIsFullscreenModalMode:Wo,setIsMaximized:js,toggleAppSettingsDialog:Ds})]}):u(f,{setIsMaximized:js})]})]})})}))})})}export{so as default};
2
2
  //# sourceMappingURL=DevCenterAppContainer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DevCenterAppContainer.js","sources":["../../../../src/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport { useContext, useMemo, useState } from 'react';\nimport classNames from 'classnames';\nimport { noop, pick, pickBy } from 'lodash';\nimport { useTheme } from '@material-ui/core';\nimport { BugReport as BugReportIcon } from '@material-ui/icons';\n\nimport AppContext from '../AppContext';\nimport { DevCenterRouterContext } from '../DevCenterRouterContext';\n\nimport { useAnnotationsData, useAnnotationsList, useAppMaximized, useAppSettings } from './effects';\nimport {\n AppActions,\n AppSettingsDialog,\n DcFullscreenElemsCoordinatorProvider,\n DevCenterAppView,\n FullscreenButton,\n NonPriorityMenus,\n} from './components';\nimport RestoreAppSizeButton from './components/RestoreAppSizeButton';\nimport { getAppAvailability, getAppVersion } from './utils';\nimport PriorityMenus from './components/PriorityMenus';\nimport { CommentsSwitchButton, CommentsSwitchProvider } from './components/CommentsSwitch';\n\nimport styles from './DevCenterAppContainer.scss';\n\nimport { isInsideNewMobileApp, isMobileDetected, isNativeDetected } from '~/utils/mobileDetect';\nimport AnnotationIcon from '~components/Icons/AnnotationIcon';\nimport { AnnotationsList, AnnotationsProvider } from '~/components/Annotations';\nimport { ToastContainer } from '~/components/Toaster';\nimport { useDevCenterApp } from '~/effects';\nimport { DEV_CENTER_CLI_APP_ID } from '~/constants';\nimport {\n getAppName,\n getAppSegment,\n getTimestampFromQuery,\n isDCAppMultiRig,\n} from '~/utils/devcenter';\nimport { showSuccessNotification } from '~/utils';\nimport { HelpCenterIcon } from '~/components/HelpCenter';\nimport { ButtonIcon, Tooltip } from '~/componentsV2';\nimport { AppCommonsProvider } from '~/componentsV2/AppCommonsProvider';\n\nconst isMobileView = isNativeDetected || isMobileDetected;\nconst PAGE_NAME = 'DevCenter_AppContainer';\n\nconst isHomePage = router => !!router?.location?.pathname?.startsWith('/home');\n\nfunction DevCenterAppContainer({\n CLIAppComponent,\n CLIAppSettings,\n app,\n appId,\n className,\n coordinates,\n currentDashboardAppsLastAnnotations,\n currentUser,\n devCenterRouter,\n disableAppAssetSelection,\n isActionsDisabled,\n // [REACT-18-MIGRATION-TAG] PLT-3099: the platform's isolation decision, passed only by the\n // in-process branch of DevCenterIsolatedApp; iframe mounts leave it false.\n isNonIsolatedApp = false,\n isSettingsDialogHidden,\n layoutEnvironment,\n onAppContainerClick = noop,\n onAppRemove,\n onReportBugClick,\n onCloneDashboard,\n onHelpCenterClick,\n onIsMaximizedChange,\n onSettingChange,\n onSettingsChange,\n openIntercom = noop,\n setIsFullscreenModalMode = noop,\n timestamp,\n updateCurrentDashboardAppLastAnnotation,\n dashboardMeta,\n reloadApp = undefined,\n chatActions,\n}) {\n const appsData = useContext(AppContext);\n const theme = useTheme();\n const [mainMenuItems, setMainMenuItems] = useState([]);\n const [secondaryMenuItems, setSecondaryMenuItems] = useState([]);\n const appData = appsData?.[appId || app.id] ?? {\n isLoading: true,\n };\n const application = app.package?.manifest?.application;\n const segment = getAppSegment(app);\n const appIsChiplessDashboard = !!dashboardMeta?.isChiplessDashboard;\n const isMultiRig = isDCAppMultiRig({\n uiSettings: application?.ui,\n isChiplessDashboard: appIsChiplessDashboard,\n });\n const areCommentsEnabled = !!application?.ui?.enable_comments;\n const appName = getAppName(app);\n const { isMaximized, setIsMaximized } = useAppMaximized({\n onIsMaximizedChange,\n devCenterRouter,\n appId,\n });\n\n // Note: we need to pass timestamp directly for apps that are embedded in isolated apps\n const appTimestamp = timestamp || getTimestampFromQuery(devCenterRouter.location.query?.query);\n const isCLIApp = app.id === DEV_CENTER_CLI_APP_ID;\n const updatedCoordinates = isCLIApp && isMobileView ? { ...coordinates, w: 12 } : coordinates;\n const version = getAppVersion(app);\n\n const {\n isLoading: isAppLoading,\n AppSettings,\n AppComponent,\n } = useDevCenterApp({\n CLIAppComponent,\n CLIAppSettings,\n app,\n version,\n });\n\n const { isAppSettingsDialogOpened, toggleAppSettingsDialog } = useAppSettings({\n setIsFullscreenModalMode,\n });\n const { isAnnotationsListOpened, toggleAnnotationsList } = useAnnotationsList();\n\n const isLoading = isAppLoading || !currentUser || (!isMultiRig && appData.isLoading);\n\n const { appLastAnnotation, assetCompanyId, assetIdForAnnotation, isAppSupportsAnnotations } =\n useAnnotationsData({\n app,\n appData,\n currentDashboardAppsLastAnnotations,\n });\n\n const filteredAppData = pickBy(\n pick(appData, ['well', 'rig', 'fracFleet', 'wells', 'interventionUnit']),\n Boolean\n );\n\n const simplifiedSecondaryMenuItems = useMemo(\n () =>\n secondaryMenuItems?.map(item => ({\n ...item,\n onClick: () => {\n item.onClick?.();\n if (item.to) {\n devCenterRouter.push(item.to);\n }\n },\n })),\n [secondaryMenuItems, devCenterRouter]\n );\n\n const appHeadersV3Enabled = !!app?.package?.manifest?.application?.ui?.use_app_header_v3;\n const isInsideHomePage = isHomePage(devCenterRouter);\n\n // ⚠️⚠️⚠️ When adding/changing providers, also add them to/change /src/testing/AppTestWrapper\n return (\n <DevCenterRouterContext.Provider value={devCenterRouter}>\n <DcFullscreenElemsCoordinatorProvider setIsFullscreenModalMode={setIsFullscreenModalMode}>\n <AppCommonsProvider\n maximized={isMaximized}\n setMaximized={setIsMaximized}\n appId={app?.app?.id}\n app={app}\n appSettings={app.settings}\n onSettingChange={onSettingChange}\n onSettingsChange={onSettingsChange}\n appHeadersV3Enabled={appHeadersV3Enabled}\n isNonIsolatedApp={isNonIsolatedApp}\n disableAppAssetSelection={disableAppAssetSelection}\n isMultiRig={isMultiRig}\n currentUser={currentUser}\n appData={appData}\n layoutEnvironment={layoutEnvironment}\n appSettingsComponent={AppSettings}\n dashboardMeta={dashboardMeta}\n toggleAnnotationsList={isAppSupportsAnnotations ? toggleAnnotationsList : undefined}\n onHelpCenterClick={onHelpCenterClick}\n secondaryMenuItems={simplifiedSecondaryMenuItems}\n onAppRemove={onAppRemove}\n isInsideNewMobileApp={isInsideNewMobileApp}\n globalOffsetWells={dashboardMeta?.globalOffsetWells}\n globalOffsetWellsVersion={dashboardMeta?.globalOffsetWellsVersion}\n reloadApp={reloadApp}\n {...filteredAppData}\n >\n <CommentsSwitchProvider>\n <div\n className={classNames(\n 'dc-app-container',\n isInsideNewMobileApp && 'dc-app-container--inside-new-mobile-app',\n isInsideHomePage && 'dc-app-container--inside-home-page',\n className,\n // This class is applied so that DC apps developers can style their content\n // when an app is in fullscreen\n isMaximized && 'dc-app-container__maximized',\n theme.isLightTheme && 'dc-app-container__light-theme',\n styles.container\n )}\n data-testid={`${PAGE_NAME}_${appName}`}\n // It's important to call it without native event because it's passed through iframe\n onClick={() => onAppContainerClick()}\n >\n <ToastContainer />\n <div className={styles.containerContent}>\n <DevCenterAppView\n AppComponent={AppComponent}\n app={app}\n appData={filteredAppData}\n isAppLoading={isAppLoading}\n availability={getAppAvailability(\n app.availability,\n currentUser.company.with_subscription\n )}\n isCLIApp={isCLIApp}\n isLoading={isLoading}\n isMultiRig={isMultiRig}\n layoutEnvironment={layoutEnvironment}\n openIntercom={openIntercom}\n segment={segment}\n toggleAppSettingsDialog={toggleAppSettingsDialog}\n appProps={{\n coordinates: updatedCoordinates,\n currentUser,\n devCenterRouter,\n onSettingChange,\n onSettingsChange,\n segment,\n setIsFullscreenModalMode,\n setIsMaximized,\n setMainMenuItems,\n setSecondaryMenuItems,\n toggleAppSettingsDialog,\n // TODO remove when componentsV2 AppHeader is used everywhere\n appHeaderProps: {\n app,\n appLastAnnotation,\n appSettings: app.settings,\n coordinates: updatedCoordinates,\n currentUser,\n isMaximized,\n layoutEnvironment,\n onSettingChange,\n toggleAnnotationsList,\n updateCurrentDashboardAppLastAnnotation,\n ...filteredAppData,\n },\n isNative: isNativeDetected,\n layoutEnvironment,\n timestamp: appTimestamp,\n chatActions,\n }}\n />\n </div>\n {isAppSettingsDialogOpened && (\n <AppSettingsDialog\n AppSettingsComponent={AppSettings}\n app={app}\n appData={appData}\n appName={appName}\n currentUser={currentUser}\n disableAppAssetSelection={disableAppAssetSelection}\n isMultiRig={isMultiRig}\n isSettingsDialogHidden={isSettingsDialogHidden}\n layoutEnvironment={layoutEnvironment}\n onAppRemove={onAppRemove}\n onCloneDashboard={onCloneDashboard}\n onSettingChange={onSettingChange}\n onSettingsChange={onSettingsChange}\n openIntercom={openIntercom}\n rigId={appData.rig?.id ?? null}\n timestamp={appTimestamp}\n toggleAppSettingsDialog={toggleAppSettingsDialog}\n />\n )}\n {isAnnotationsListOpened && (\n <AnnotationsProvider>\n <AnnotationsList\n appId={app.app.id}\n appSettings={app.settings}\n appTitle={appName}\n assetCompanyId={assetCompanyId}\n assetId={assetIdForAnnotation}\n currentUser={currentUser}\n onClose={toggleAnnotationsList}\n showSuccessNotification={showSuccessNotification}\n />\n </AnnotationsProvider>\n )}\n {isMaximized && !appHeadersV3Enabled && (\n <RestoreAppSizeButton setIsMaximized={setIsMaximized} />\n )}\n\n {!isActionsDisabled && (!appHeadersV3Enabled || isLoading) && (\n <AppActions>\n {areCommentsEnabled && <CommentsSwitchButton currentUser={currentUser} />}\n\n {isAppSupportsAnnotations && (\n <Tooltip title=\"Add Annotation\" placement=\"top\" disabled={!!isMobileView}>\n <ButtonIcon\n size=\"small\"\n type=\"tertiaryBg\"\n onClick={toggleAnnotationsList}\n testId={`${PAGE_NAME}_addAnnotation`}\n >\n <AnnotationIcon />\n </ButtonIcon>\n </Tooltip>\n )}\n\n {onReportBugClick && !isCLIApp && (\n <Tooltip title=\"Report A Bug\" placement=\"top\" disabled={!!isMobileView}>\n <ButtonIcon size=\"small\" type=\"tertiaryBg\" onClick={() => onReportBugClick()}>\n <BugReportIcon />\n </ButtonIcon>\n </Tooltip>\n )}\n\n <Tooltip\n placement=\"top\"\n disabled={!!isMobileView || isCLIApp}\n title=\"Help Center\"\n >\n <ButtonIcon\n testId={`${PAGE_NAME}_helpContent`}\n onClick={() => onHelpCenterClick()}\n disabled={isCLIApp}\n size=\"small\"\n type=\"tertiaryBg\"\n >\n <HelpCenterIcon\n appId={app.app.id}\n helpContentUpdatedAt={app.help_content_updated_at}\n />\n </ButtonIcon>\n </Tooltip>\n\n {isMobileView && !isMaximized && !isInsideNewMobileApp ? (\n <FullscreenButton setIsMaximized={setIsMaximized} />\n ) : (\n <>\n <PriorityMenus\n menuItems={mainMenuItems}\n devCenterRouter={devCenterRouter}\n isMobileView={isMobileView}\n />\n <NonPriorityMenus\n devCenterRouter={devCenterRouter}\n isMaximized={isMaximized}\n isMobileView={isMobileView}\n menuItems={secondaryMenuItems}\n setIsFullscreenModalMode={setIsFullscreenModalMode}\n setIsMaximized={setIsMaximized}\n toggleAppSettingsDialog={toggleAppSettingsDialog}\n />\n </>\n )}\n </AppActions>\n )}\n </div>\n </CommentsSwitchProvider>\n </AppCommonsProvider>\n </DcFullscreenElemsCoordinatorProvider>\n </DevCenterRouterContext.Provider>\n );\n}\n\nexport default DevCenterAppContainer;\n"],"names":["isMobileView","isNativeDetected","isMobileDetected","PAGE_NAME","DevCenterAppContainer","_ref","_appsData","_app$package","_app$package$manifest","_application$ui","_devCenterRouter$loca","_app$package2","_app$package2$manifes","_app$package2$manifes2","_app$package2$manifes3","_app$app","_appData$rig$id","_appData$rig","router","_router$location","_router$location$path","CLIAppComponent","CLIAppSettings","app","appId","className","coordinates","currentDashboardAppsLastAnnotations","currentUser","devCenterRouter","disableAppAssetSelection","isActionsDisabled","_ref$isNonIsolatedApp","isNonIsolatedApp","isSettingsDialogHidden","layoutEnvironment","_ref$onAppContainerCl","onAppContainerClick","noop","onAppRemove","onReportBugClick","onCloneDashboard","onHelpCenterClick","onIsMaximizedChange","onSettingChange","onSettingsChange","_ref$openIntercom","openIntercom","_ref$setIsFullscreenM","setIsFullscreenModalMode","timestamp","updateCurrentDashboardAppLastAnnotation","dashboardMeta","_ref$reloadApp","reloadApp","undefined","chatActions","appsData","useContext","AppContext","theme","useTheme","useState","_useState2","_slicedToArray","_useState","mainMenuItems","setMainMenuItems","_useState4","_useState3","secondaryMenuItems","setSecondaryMenuItems","appData","id","isLoading","application","package","manifest","segment","getAppSegment","appIsChiplessDashboard","isChiplessDashboard","isMultiRig","isDCAppMultiRig","uiSettings","ui","areCommentsEnabled","enable_comments","appName","getAppName","_useAppMaximized","useAppMaximized","isMaximized","setIsMaximized","appTimestamp","getTimestampFromQuery","location","query","isCLIApp","DEV_CENTER_CLI_APP_ID","updatedCoordinates","w","version","getAppVersion","_useDevCenterApp","useDevCenterApp","isAppLoading","AppSettings","AppComponent","_useAppSettings","useAppSettings","isAppSettingsDialogOpened","toggleAppSettingsDialog","_useAnnotationsList","useAnnotationsList","isAnnotationsListOpened","toggleAnnotationsList","_useAnnotationsData","useAnnotationsData","appLastAnnotation","assetCompanyId","assetIdForAnnotation","isAppSupportsAnnotations","filteredAppData","pickBy","pick","Boolean","simplifiedSecondaryMenuItems","useMemo","map","item","_objectSpread","onClick","_item$onClick","call","to","push","appHeadersV3Enabled","use_app_header_v3","isInsideHomePage","pathname","startsWith","_jsx","DevCenterRouterContext","Provider","value","children","DcFullscreenElemsCoordinatorProvider","AppCommonsProvider","maximized","setMaximized","appSettings","settings","appSettingsComponent","isInsideNewMobileApp","globalOffsetWells","globalOffsetWellsVersion","CommentsSwitchProvider","_jsxs","classNames","isLightTheme","styles","container","ToastContainer","containerContent","DevCenterAppView","availability","getAppAvailability","company","with_subscription","appProps","appHeaderProps","isNative","AppSettingsDialog","AppSettingsComponent","rigId","rig","AnnotationsProvider","AnnotationsList","appTitle","assetId","onClose","showSuccessNotification","RestoreAppSizeButton","AppActions","CommentsSwitchButton","Tooltip","title","placement","disabled","ButtonIcon","size","type","testId","concat","AnnotationIcon","BugReportIcon","HelpCenterIcon","helpContentUpdatedAt","help_content_updated_at","_Fragment","PriorityMenus","menuItems","NonPriorityMenus","FullscreenButton"],"mappings":"0phBA2CA,IAAMA,EAAeC,GAAoBC,EACnCC,GAAY,yBAIlB,SAASC,GAgCNC,GAAA,IAAAC,EAAAC,EAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAlCgBC,GAAMC,GAAAC,GAGvBC,KAAAA,gBACAC,KAAAA,eACAC,KAAAA,IACAC,KAAAA,MACAC,KAAAA,UACAC,KAAAA,YACAC,KAAAA,oCACAC,KAAAA,YACAC,KAAAA,gBACAC,KAAAA,yBACAC,KAAAA,kBAAiBC,GAAA3B,EAGjB4B,iBAAAA,gBAAwBD,GACxBE,KAAAA,uBACAC,KAAAA,kBAAiBC,GAAA/B,EACjBgC,oBAAAA,eAAsBC,EAAIF,GAC1BG,KAAAA,YACAC,KAAAA,iBACAC,KAAAA,iBACAC,KAAAA,kBACAC,KAAAA,oBACAC,KAAAA,gBACAC,KAAAA,iBAAgBC,GAAAzC,EAChB0C,aAAAA,eAAeT,EAAIQ,GAAAE,GAAA3C,EACnB4C,yBAAAA,eAA2BX,EAAIU,GAC/BE,KAAAA,UACAC,KAAAA,wCACAC,KAAAA,cAAaC,GAAAhD,EACbiD,UAAAA,oBAAY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AM5F,IAAmB,EAAA0G,SAC3EJ,EAACsD,EAAa,QAKpBtD,EAAC4C,EAAO,CACNE,UAAU,MACVC,WAAY7L,GAAgBkG,GAC5ByF,MAAM,cAAazC,SAEnBJ,EAACgD,EAAU,CACTG,OAAM,GAAAC,OAAK/L,GAAwB,gBACnCiI,QAAS,WAAA,OAAM1F,IAAoB,EACnCmJ,SAAU3F,GACV6F,KAAK,QACLC,KAAK,aAAY9C,SAEjBJ,EAACuD,EAAc,CACb7K,MAAOD,GAAIA,IAAIkD,GACf6H,qBAAsB/K,GAAIgL,+BAK/BvM,GAAiB4F,IAAgB8D,EAGhCI,EAAA0C,EAAA,CAAAtD,SAAA,CACEJ,EAAC2D,EAAa,CACZC,UAAWxI,GACXrC,gBAAiBA,GACjB7B,aAAcA,IAEhB8I,EAAC6D,EAAgB,CACf9K,gBAAiBA,GACjB+D,YAAaA,GACb5F,aAAcA,EACd0M,UAAWpI,GACXrB,yBAA0BA,GAC1B4C,eAAgBA,GAChBmB,wBAAyBA,QAf7B8B,EAAC8D,EAAgB,CAAC/G,eAAgBA,mBA2BtD"}
1
+ {"version":3,"file":"DevCenterAppContainer.js","sources":["../../../../src/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport { useContext, useMemo, useState } from 'react';\nimport classNames from 'classnames';\nimport { noop, pick, pickBy } from 'lodash';\nimport { useTheme } from '@material-ui/core';\nimport { BugReport as BugReportIcon } from '@material-ui/icons';\n\nimport AppContext from '../AppContext';\nimport { DevCenterRouterContext } from '../DevCenterRouterContext';\n\nimport { useAnnotationsData, useAnnotationsList, useAppMaximized, useAppSettings } from './effects';\nimport {\n AppActions,\n AppSettingsDialog,\n DcFullscreenElemsCoordinatorProvider,\n DevCenterAppView,\n FullscreenButton,\n NonPriorityMenus,\n} from './components';\nimport RestoreAppSizeButton from './components/RestoreAppSizeButton';\nimport { getAppAvailability, getAppVersion } from './utils';\nimport PriorityMenus from './components/PriorityMenus';\nimport { CommentsSwitchButton, CommentsSwitchProvider } from './components/CommentsSwitch';\n\nimport styles from './DevCenterAppContainer.scss';\n\nimport { isInsideNewMobileApp, isMobileDetected, isNativeDetected } from '~/utils/mobileDetect';\nimport AnnotationIcon from '~components/Icons/AnnotationIcon';\nimport { AnnotationsList, AnnotationsProvider } from '~/components/Annotations';\nimport { ToastContainer } from '~/components/Toaster';\nimport { useDevCenterApp } from '~/effects';\nimport { DEV_CENTER_CLI_APP_ID } from '~/constants';\nimport {\n getAppName,\n getAppSegment,\n getTimestampFromQuery,\n isDCAppMultiRig,\n} from '~/utils/devcenter';\nimport { showSuccessNotification } from '~/utils';\nimport { HelpCenterIcon } from '~/components/HelpCenter';\nimport { ButtonIcon, Tooltip } from '~/componentsV2';\nimport { AppCommonsProvider } from '~/componentsV2/AppCommonsProvider';\n\nconst isMobileView = isNativeDetected || isMobileDetected;\nconst PAGE_NAME = 'DevCenter_AppContainer';\n\nconst isHomePage = router => !!router?.location?.pathname?.startsWith('/home');\n\nfunction DevCenterAppContainer({\n CLIAppComponent,\n CLIAppSettings,\n app,\n appId,\n className,\n coordinates,\n currentDashboardAppsLastAnnotations,\n currentUser,\n devCenterRouter,\n disableAppAssetSelection,\n isActionsDisabled,\n // [REACT-18-MIGRATION-TAG] PLT-3099: the platform's isolation decision, passed only by the\n // in-process branch of DevCenterIsolatedApp; iframe mounts leave it false.\n isNonIsolatedApp = false,\n isSettingsDialogHidden,\n layoutEnvironment,\n onAppContainerClick = noop,\n onAppRemove,\n onReportBugClick,\n onCloneDashboard,\n onHelpCenterClick,\n onIsMaximizedChange,\n onSettingChange,\n onSettingsChange,\n openIntercom = noop,\n setIsFullscreenModalMode = noop,\n timestamp,\n updateCurrentDashboardAppLastAnnotation,\n dashboardMeta,\n reloadApp = undefined,\n chatActions,\n}) {\n const appsData = useContext(AppContext);\n const theme = useTheme();\n const [mainMenuItems, setMainMenuItems] = useState([]);\n const [secondaryMenuItems, setSecondaryMenuItems] = useState([]);\n const appData = appsData?.[appId || app.id] ?? {\n isLoading: true,\n };\n const application = app.package?.manifest?.application;\n const segment = getAppSegment(app);\n const appIsChiplessDashboard = !!dashboardMeta?.isChiplessDashboard;\n const isMultiRig = isDCAppMultiRig({\n uiSettings: application?.ui,\n isChiplessDashboard: appIsChiplessDashboard,\n });\n const areCommentsEnabled = !!application?.ui?.enable_comments;\n const appName = getAppName(app);\n const { isMaximized, setIsMaximized } = useAppMaximized({\n onIsMaximizedChange,\n devCenterRouter,\n appId,\n });\n\n // Note: we need to pass timestamp directly for apps that are embedded in isolated apps\n const appTimestamp = timestamp || getTimestampFromQuery(devCenterRouter.location.query?.query);\n const isCLIApp = app.id === DEV_CENTER_CLI_APP_ID;\n const updatedCoordinates = isCLIApp && isMobileView ? { ...coordinates, w: 12 } : coordinates;\n const version = getAppVersion(app);\n\n const {\n isLoading: isAppLoading,\n AppSettings,\n AppComponent,\n } = useDevCenterApp({\n CLIAppComponent,\n CLIAppSettings,\n app,\n version,\n });\n\n const { isAppSettingsDialogOpened, toggleAppSettingsDialog } = useAppSettings({\n setIsFullscreenModalMode,\n });\n const { isAnnotationsListOpened, toggleAnnotationsList } = useAnnotationsList();\n\n const isLoading = isAppLoading || !currentUser || (!isMultiRig && appData.isLoading);\n\n const { appLastAnnotation, assetCompanyId, assetIdForAnnotation, isAppSupportsAnnotations } =\n useAnnotationsData({\n app,\n appData,\n currentDashboardAppsLastAnnotations,\n });\n\n const filteredAppData = pickBy(\n pick(appData, ['well', 'rig', 'fracFleet', 'wells', 'interventionUnit']),\n Boolean\n );\n\n const simplifiedSecondaryMenuItems = useMemo(\n () =>\n secondaryMenuItems?.map(item => ({\n ...item,\n onClick: () => {\n item.onClick?.();\n if (item.to) {\n devCenterRouter.push(item.to);\n }\n },\n })),\n [secondaryMenuItems, devCenterRouter]\n );\n\n const appHeadersV3Enabled = !!app?.package?.manifest?.application?.ui?.use_app_header_v3;\n const isInsideHomePage = isHomePage(devCenterRouter);\n\n // ⚠️⚠️⚠️ When adding/changing providers, also add them to/change /src/testing/AppTestWrapper\n return (\n <DevCenterRouterContext.Provider value={devCenterRouter}>\n <DcFullscreenElemsCoordinatorProvider setIsFullscreenModalMode={setIsFullscreenModalMode}>\n <AppCommonsProvider\n maximized={isMaximized}\n setMaximized={setIsMaximized}\n appId={app?.app?.id}\n app={app}\n appSettings={app.settings}\n onSettingChange={onSettingChange}\n onSettingsChange={onSettingsChange}\n appHeadersV3Enabled={appHeadersV3Enabled}\n isNonIsolatedApp={isNonIsolatedApp}\n disableAppAssetSelection={disableAppAssetSelection}\n isMultiRig={isMultiRig}\n currentUser={currentUser}\n appData={appData}\n layoutEnvironment={layoutEnvironment}\n appSettingsComponent={AppSettings}\n dashboardMeta={dashboardMeta}\n toggleAnnotationsList={isAppSupportsAnnotations ? toggleAnnotationsList : undefined}\n onHelpCenterClick={onHelpCenterClick}\n secondaryMenuItems={simplifiedSecondaryMenuItems}\n onAppRemove={onAppRemove}\n isInsideNewMobileApp={isInsideNewMobileApp}\n globalOffsetWells={dashboardMeta?.globalOffsetWells}\n globalOffsetWellsVersion={dashboardMeta?.globalOffsetWellsVersion}\n globalOffsetWellsToken={dashboardMeta?.globalOffsetWellsToken}\n reloadApp={reloadApp}\n {...filteredAppData}\n >\n <CommentsSwitchProvider>\n <div\n className={classNames(\n 'dc-app-container',\n isInsideNewMobileApp && 'dc-app-container--inside-new-mobile-app',\n isInsideHomePage && 'dc-app-container--inside-home-page',\n className,\n // This class is applied so that DC apps developers can style their content\n // when an app is in fullscreen\n isMaximized && 'dc-app-container__maximized',\n theme.isLightTheme && 'dc-app-container__light-theme',\n styles.container\n )}\n data-testid={`${PAGE_NAME}_${appName}`}\n // It's important to call it without native event because it's passed through iframe\n onClick={() => onAppContainerClick()}\n >\n <ToastContainer />\n <div className={styles.containerContent}>\n <DevCenterAppView\n AppComponent={AppComponent}\n app={app}\n appData={filteredAppData}\n isAppLoading={isAppLoading}\n availability={getAppAvailability(\n app.availability,\n currentUser.company.with_subscription\n )}\n isCLIApp={isCLIApp}\n isLoading={isLoading}\n isMultiRig={isMultiRig}\n layoutEnvironment={layoutEnvironment}\n openIntercom={openIntercom}\n segment={segment}\n toggleAppSettingsDialog={toggleAppSettingsDialog}\n appProps={{\n coordinates: updatedCoordinates,\n currentUser,\n devCenterRouter,\n onSettingChange,\n onSettingsChange,\n segment,\n setIsFullscreenModalMode,\n setIsMaximized,\n setMainMenuItems,\n setSecondaryMenuItems,\n toggleAppSettingsDialog,\n // TODO remove when componentsV2 AppHeader is used everywhere\n appHeaderProps: {\n app,\n appLastAnnotation,\n appSettings: app.settings,\n coordinates: updatedCoordinates,\n currentUser,\n isMaximized,\n layoutEnvironment,\n onSettingChange,\n toggleAnnotationsList,\n updateCurrentDashboardAppLastAnnotation,\n ...filteredAppData,\n },\n isNative: isNativeDetected,\n layoutEnvironment,\n timestamp: appTimestamp,\n chatActions,\n }}\n />\n </div>\n {isAppSettingsDialogOpened && (\n <AppSettingsDialog\n AppSettingsComponent={AppSettings}\n app={app}\n appData={appData}\n appName={appName}\n currentUser={currentUser}\n disableAppAssetSelection={disableAppAssetSelection}\n isMultiRig={isMultiRig}\n isSettingsDialogHidden={isSettingsDialogHidden}\n layoutEnvironment={layoutEnvironment}\n onAppRemove={onAppRemove}\n onCloneDashboard={onCloneDashboard}\n onSettingChange={onSettingChange}\n onSettingsChange={onSettingsChange}\n openIntercom={openIntercom}\n rigId={appData.rig?.id ?? null}\n timestamp={appTimestamp}\n toggleAppSettingsDialog={toggleAppSettingsDialog}\n />\n )}\n {isAnnotationsListOpened && (\n <AnnotationsProvider>\n <AnnotationsList\n appId={app.app.id}\n appSettings={app.settings}\n appTitle={appName}\n assetCompanyId={assetCompanyId}\n assetId={assetIdForAnnotation}\n currentUser={currentUser}\n onClose={toggleAnnotationsList}\n showSuccessNotification={showSuccessNotification}\n />\n </AnnotationsProvider>\n )}\n {isMaximized && !appHeadersV3Enabled && (\n <RestoreAppSizeButton setIsMaximized={setIsMaximized} />\n )}\n\n {!isActionsDisabled && (!appHeadersV3Enabled || isLoading) && (\n <AppActions>\n {areCommentsEnabled && <CommentsSwitchButton currentUser={currentUser} />}\n\n {isAppSupportsAnnotations && (\n <Tooltip title=\"Add Annotation\" placement=\"top\" disabled={!!isMobileView}>\n <ButtonIcon\n size=\"small\"\n type=\"tertiaryBg\"\n onClick={toggleAnnotationsList}\n testId={`${PAGE_NAME}_addAnnotation`}\n >\n <AnnotationIcon />\n </ButtonIcon>\n </Tooltip>\n )}\n\n {onReportBugClick && !isCLIApp && (\n <Tooltip title=\"Report A Bug\" placement=\"top\" disabled={!!isMobileView}>\n <ButtonIcon size=\"small\" type=\"tertiaryBg\" onClick={() => onReportBugClick()}>\n <BugReportIcon />\n </ButtonIcon>\n </Tooltip>\n )}\n\n <Tooltip\n placement=\"top\"\n disabled={!!isMobileView || isCLIApp}\n title=\"Help Center\"\n >\n <ButtonIcon\n testId={`${PAGE_NAME}_helpContent`}\n onClick={() => onHelpCenterClick()}\n disabled={isCLIApp}\n size=\"small\"\n type=\"tertiaryBg\"\n >\n <HelpCenterIcon\n appId={app.app.id}\n helpContentUpdatedAt={app.help_content_updated_at}\n />\n </ButtonIcon>\n </Tooltip>\n\n {isMobileView && !isMaximized && !isInsideNewMobileApp ? (\n <FullscreenButton setIsMaximized={setIsMaximized} />\n ) : (\n <>\n <PriorityMenus\n menuItems={mainMenuItems}\n devCenterRouter={devCenterRouter}\n isMobileView={isMobileView}\n />\n <NonPriorityMenus\n devCenterRouter={devCenterRouter}\n isMaximized={isMaximized}\n isMobileView={isMobileView}\n menuItems={secondaryMenuItems}\n setIsFullscreenModalMode={setIsFullscreenModalMode}\n setIsMaximized={setIsMaximized}\n toggleAppSettingsDialog={toggleAppSettingsDialog}\n />\n </>\n )}\n </AppActions>\n )}\n </div>\n </CommentsSwitchProvider>\n </AppCommonsProvider>\n </DcFullscreenElemsCoordinatorProvider>\n </DevCenterRouterContext.Provider>\n );\n}\n\nexport default DevCenterAppContainer;\n"],"names":["isMobileView","isNativeDetected","isMobileDetected","PAGE_NAME","DevCenterAppContainer","_ref","_appsData","_app$package","_app$package$manifest","_application$ui","_devCenterRouter$loca","_app$package2","_app$package2$manifes","_app$package2$manifes2","_app$package2$manifes3","_app$app","_appData$rig$id","_appData$rig","router","_router$location","_router$location$path","CLIAppComponent","CLIAppSettings","app","appId","className","coordinates","currentDashboardAppsLastAnnotations","currentUser","devCenterRouter","disableAppAssetSelection","isActionsDisabled","_ref$isNonIsolatedApp","isNonIsolatedApp","isSettingsDialogHidden","layoutEnvironment","_ref$onAppContainerCl","onAppContainerClick","noop","onAppRemove","onReportBugClick","onCloneDashboard","onHelpCenterClick","onIsMaximizedChange","onSettingChange","onSettingsChange","_ref$openIntercom","openIntercom","_ref$setIsFullscreenM","setIsFullscreenModalMode","timestamp","updateCurrentDashboardAppLastAnnotation","dashboardMeta","_ref$reloadApp","reloadApp","undefined","chatActions","appsData","useContext","AppContext","theme","useTheme","useState","_useState2","_slicedToArray","_useState","mainMenuItems","setMainMenuItems","_useState4","_useState3","secondaryMenuItems","setSecondaryMenuItems","appData","id","isLoading","application","package","manifest","segment","getAppSegment","appIsChiplessDashboard","isChiplessDashboard","isMultiRig","isDCAppMultiRig","uiSettings","ui","areCommentsEnabled","enable_comments","appName","getAppName","_useAppMaximized","useAppMaximized","isMaximized","setIsMaximized","appTimestamp","getTimestampFromQuery","location","query","isCLIApp","DEV_CENTER_CLI_APP_ID","updatedCoordinates","w","version","getAppVersion","_useDevCenterApp","useDevCenterApp","isAppLoading","AppSettings","AppComponent","_useAppSettings","useAppSettings","isAppSettingsDialogOpened","toggleAppSettingsDialog","_useAnnotationsList","useAnnotationsList","isAnnotationsListOpened","toggleAnnotationsList","_useAnnotationsData","useAnnotationsData","appLastAnnotation","assetCompanyId","assetIdForAnnotation","isAppSupportsAnnotations","filteredAppData","pickBy","pick","Boolean","simplifiedSecondaryMenuItems","useMemo","map","item","_objectSpread","onClick","_item$onClick","call","to","push","appHeadersV3Enabled","use_app_header_v3","isInsideHomePage","pathname","startsWith","_jsx","DevCenterRouterContext","Provider","value","children","DcFullscreenElemsCoordinatorProvider","AppCommonsProvider","maximized","setMaximized","appSettings","settings","appSettingsComponent","isInsideNewMobileApp","globalOffsetWells","globalOffsetWellsVersion","globalOffsetWellsToken","CommentsSwitchProvider","_jsxs","classNames","isLightTheme","styles","container","ToastContainer","containerContent","DevCenterAppView","availability","getAppAvailability","company","with_subscription","appProps","appHeaderProps","isNative","AppSettingsDialog","AppSettingsComponent","rigId","rig","AnnotationsProvider","AnnotationsList","appTitle","assetId","onClose","showSuccessNotification","RestoreAppSizeButton","AppActions","CommentsSwitchButton","Tooltip","title","placement","disabled","ButtonIcon","size","type","testId","concat","AnnotationIcon","BugReportIcon","HelpCenterIcon","helpContentUpdatedAt","help_content_updated_at","_Fragment","PriorityMenus","menuItems","NonPriorityMenus","FullscreenButton"],"mappings":"0phBA2CA,IAAMA,EAAeC,GAAoBC,EACnCC,GAAY,yBAIlB,SAASC,GAgCNC,GAAA,IAAAC,EAAAC,EAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAlCgBC,GAAMC,GAAAC,GAGvBC,KAAAA,gBACAC,KAAAA,eACAC,KAAAA,IACAC,KAAAA,MACAC,KAAAA,UACAC,KAAAA,YACAC,KAAAA,oCACAC,KAAAA,YACAC,KAAAA,gBACAC,KAAAA,yBACAC,KAAAA,kBAAiBC,GAAA3B,EAGjB4B,iBAAAA,gBAAwBD,GACxBE,KAAAA,uBACAC,KAAAA,kBAAiBC,GAAA/B,EACjBgC,oBAAAA,eAAsBC,EAAIF,GAC1BG,KAAAA,YACAC,KAAAA,iBACAC,KAAAA,iBACAC,KAAAA,kBACAC,KAAAA,oBACAC,KAAAA,gBACAC,KAAAA,iBAAgBC,GAAAzC,EAChB0C,aAAAA,eAAeT,EAAIQ,GAAAE,GAAA3C,EACnB4C,yBAAAA,eAA2BX,EAAIU,GAC/BE,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MAAM,eAAeC,UAAU,MAAMC,WAAY9L,EAAakJ,SACrEJ,EAACiD,EAAU,CAACC,KAAK,QAAQC,KAAK,aAAa7D,QAAS,WAAA,OAAM5F,IAAmB,EAAA0G,SAC3EJ,EAACuD,EAAa,QAKpBvD,EAAC6C,EAAO,CACNE,UAAU,MACVC,WAAY9L,GAAgBkG,GAC5B0F,MAAM,cAAa1C,SAEnBJ,EAACiD,EAAU,CACTG,OAAM,GAAAC,OAAKhM,GAAwB,gBACnCiI,QAAS,WAAA,OAAM1F,IAAoB,EACnCoJ,SAAU5F,GACV8F,KAAK,QACLC,KAAK,aAAY/C,SAEjBJ,EAACwD,EAAc,CACb9K,MAAOD,GAAIA,IAAIkD,GACf8H,qBAAsBhL,GAAIiL,+BAK/BxM,GAAiB4F,IAAgB8D,EAGhCK,EAAA0C,EAAA,CAAAvD,SAAA,CACEJ,EAAC4D,EAAa,CACZC,UAAWzI,GACXrC,gBAAiBA,GACjB7B,aAAcA,IAEhB8I,EAAC8D,EAAgB,CACf/K,gBAAiBA,GACjB+D,YAAaA,GACb5F,aAAcA,EACd2M,UAAWrI,GACXrB,yBAA0BA,GAC1B4C,eAAgBA,GAChBmB,wBAAyBA,QAf7B8B,EAAC+D,EAAgB,CAAChH,eAAgBA,mBA2BtD"}
@@ -1 +1 @@
1
- {"version":3,"file":"OffsetWellPickerV4.d.ts","sourceRoot":"","sources":["../../../src/components/OffsetWellPickerV4/OffsetWellPickerV4.js"],"names":[],"mappings":"AAwDA;;GAEG;AACH,QAAA,MAAM,kBAAkB,EAFd,KAAK,CAAC,EAAE,CAAC,OAAO,4BAA4B,EAAE,uBAAuB,CAszB9E,CAAC;eAEa,kBAAkB"}
1
+ {"version":3,"file":"OffsetWellPickerV4.d.ts","sourceRoot":"","sources":["../../../src/components/OffsetWellPickerV4/OffsetWellPickerV4.js"],"names":[],"mappings":"AA0DA;;GAEG;AACH,QAAA,MAAM,kBAAkB,EAFd,KAAK,CAAC,EAAE,CAAC,OAAO,4BAA4B,EAAE,uBAAuB,CA+xB9E,CAAC;eAEa,kBAAkB"}
@@ -10,4 +10,5 @@ export * from './useAssetsData';
10
10
  export * from './useTableColumns';
11
11
  export * from './useCompanyProvider';
12
12
  export * from './useCompanies';
13
+ export * from './useBootstrapSelectedWells';
13
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/index.js"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,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,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/index.js"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,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,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { fetchWellsByIds as defaultFetchWellsByIds } from '../utils/apiCalls';
2
+ /**
3
+ * Hydrates selectedWells from selectedWellIds when the modal opens.
4
+ * Must not mark bootstrap complete while closed — apps keep the picker mounted
5
+ * with open=false, and a one-shot skip permanently blocks selection hydration.
6
+ */
7
+ export declare function useBootstrapSelectedWells({ open, selectedWellIds, selectedWells, setSelectedWells, subjectWell, fetchWellsByIds, }: {
8
+ fetchWellsByIds?: typeof defaultFetchWellsByIds | undefined;
9
+ open: any;
10
+ selectedWellIds: any;
11
+ selectedWells: any;
12
+ setSelectedWells: any;
13
+ subjectWell: any;
14
+ }): void;
15
+ //# sourceMappingURL=useBootstrapSelectedWells.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBootstrapSelectedWells.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/useBootstrapSelectedWells.js"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,IAAI,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE9E;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,IAAI,EACJ,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,eAAwC,GACzC;;;;;;;CAAA,QA6CA"}
@@ -0,0 +1,103 @@
1
+ /**
2
+ * Merges wells found in the loaded dataset with a previously bootstrapped
3
+ * selection. The loaded set is often incomplete (company/viewport), so a
4
+ * replace would wipe selected wells that are not in the current fetch.
5
+ */
6
+ export declare function mergeInitSelectedWells(prev: any, wells: any, selectedIds: any, subjectWell: any): {
7
+ toString: () => string;
8
+ charAt: (pos: number) => string;
9
+ charCodeAt: (index: number) => number;
10
+ concat: (...strings: string[]) => string;
11
+ indexOf: (searchString: string, position?: number) => number;
12
+ lastIndexOf: (searchString: string, position?: number) => number;
13
+ localeCompare: {
14
+ (that: string): number;
15
+ (that: string, locales?: string | string[], options?: Intl.CollatorOptions): number;
16
+ (that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number;
17
+ };
18
+ match: {
19
+ (regexp: string | RegExp): RegExpMatchArray | null;
20
+ (matcher: {
21
+ [Symbol.match](string: string): RegExpMatchArray | null;
22
+ }): RegExpMatchArray | null;
23
+ };
24
+ replace: {
25
+ (searchValue: string | RegExp, replaceValue: string): string;
26
+ (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
27
+ (searchValue: {
28
+ [Symbol.replace](string: string, replaceValue: string): string;
29
+ }, replaceValue: string): string;
30
+ (searchValue: {
31
+ [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string;
32
+ }, replacer: (substring: string, ...args: any[]) => string): string;
33
+ };
34
+ search: {
35
+ (regexp: string | RegExp): number;
36
+ (searcher: {
37
+ [Symbol.search](string: string): number;
38
+ }): number;
39
+ };
40
+ slice: (start?: number, end?: number) => string;
41
+ split: {
42
+ (separator: string | RegExp, limit?: number): string[];
43
+ (splitter: {
44
+ [Symbol.split](string: string, limit?: number): string[];
45
+ }, limit?: number): string[];
46
+ };
47
+ substring: (start: number, end?: number) => string;
48
+ toLowerCase: () => string;
49
+ toLocaleLowerCase: {
50
+ (locales?: string | string[]): string;
51
+ (locales?: Intl.LocalesArgument): string;
52
+ };
53
+ toUpperCase: () => string;
54
+ toLocaleUpperCase: {
55
+ (locales?: string | string[]): string;
56
+ (locales?: Intl.LocalesArgument): string;
57
+ };
58
+ trim: () => string;
59
+ readonly length: number;
60
+ substr: (from: number, length?: number) => string;
61
+ valueOf: () => string;
62
+ codePointAt: (pos: number) => number | undefined;
63
+ includes: (searchString: string, position?: number) => boolean;
64
+ endsWith: (searchString: string, endPosition?: number) => boolean;
65
+ normalize: {
66
+ (form: "NFC" | "NFD" | "NFKC" | "NFKD"): string;
67
+ (form?: string): string;
68
+ };
69
+ repeat: (count: number) => string;
70
+ startsWith: (searchString: string, position?: number) => boolean;
71
+ anchor: (name: string) => string;
72
+ big: () => string;
73
+ blink: () => string;
74
+ bold: () => string;
75
+ fixed: () => string;
76
+ fontcolor: (color: string) => string;
77
+ fontsize: {
78
+ (size: number): string;
79
+ (size: string): string;
80
+ };
81
+ italics: () => string;
82
+ link: (url: string) => string;
83
+ small: () => string;
84
+ strike: () => string;
85
+ sub: () => string;
86
+ sup: () => string;
87
+ [Symbol.iterator]: () => StringIterator<string>;
88
+ padStart: (targetLength: number, padString?: string) => string;
89
+ padEnd: (targetLength: number, padString?: string) => string;
90
+ trimEnd: () => string;
91
+ trimStart: () => string;
92
+ trimLeft: () => string;
93
+ trimRight: () => string;
94
+ matchAll: (regexp: RegExp) => RegExpStringIterator<RegExpExecArray>;
95
+ replaceAll: {
96
+ (searchValue: string | RegExp, replaceValue: string): string;
97
+ (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
98
+ };
99
+ at: (index: number) => string | undefined;
100
+ isWellFormed: () => boolean;
101
+ toWellFormed: () => string;
102
+ }[];
103
+ //# sourceMappingURL=mergeInitSelectedWells.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mergeInitSelectedWells.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/utils/mergeInitSelectedWells.js"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,KAAA,EAAE,KAAK,KAAA,EAAE,WAAW,KAAA,EAAE,WAAW,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAO3E"}
@@ -1 +1 @@
1
- {"version":3,"file":"OffsetWellPickerV5.d.ts","sourceRoot":"","sources":["../../../src/components/OffsetWellPickerV5/OffsetWellPickerV5.tsx"],"names":[],"mappings":"AAmCA,eAAO,MAAM,kBAAkB,+CAua9B,CAAC"}
1
+ {"version":3,"file":"OffsetWellPickerV5.d.ts","sourceRoot":"","sources":["../../../src/components/OffsetWellPickerV5/OffsetWellPickerV5.tsx"],"names":[],"mappings":"AAmCA,eAAO,MAAM,kBAAkB,+CAsa9B,CAAC"}