@mongodb-js/compass-web 0.25.1 → 0.26.1

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.
@@ -256,7 +256,7 @@ export declare const CompassExperimentationProvider: React_2.FC<{
256
256
  }>;
257
257
 
258
258
  /** @public */
259
- export declare const CompassWeb: ({ appName, orgId, projectId, darkMode, initialAutoconnectId, initialWorkspace, onActiveWorkspaceTabChange, initialPreferences, onLog, onDebug, onTrack, onOpenConnectViaModal, onFailToLoadConnections, }: CompassWebProps) => React_2.JSX.Element;
259
+ export declare const CompassWeb: ({ appName, orgId, projectId, darkMode, initialAutoconnectId, initialWorkspace, onActiveWorkspaceTabChange, initialPreferences, onLog, onDebug, onTrack, onOpenConnectViaModal, onFailToLoadConnections, onBeforeUnloadCallbackRequest, }: CompassWebProps) => React_2.JSX.Element;
260
260
 
261
261
  /** @public */
262
262
  export declare type CompassWebProps = {
@@ -296,9 +296,9 @@ export declare type CompassWebProps = {
296
296
  * communicate current workspace back to the parent component for example to
297
297
  * sync router with the current active workspace
298
298
  */
299
- onActiveWorkspaceTabChange<WS extends WorkspaceTab>(ws: WS | null, collectionInfo: WS extends {
299
+ onActiveWorkspaceTabChange: <WS extends WorkspaceTab>(ws: WS | null, collectionInfo: WS extends {
300
300
  type: 'Collection';
301
- } ? CollectionTabInfo | null : never): void;
301
+ } ? CollectionTabInfo | null : never) => void;
302
302
  /**
303
303
  * Set of initial preferences to override default values
304
304
  */
@@ -326,6 +326,12 @@ export declare type CompassWebProps = {
326
326
  * Callback prop called when connections fail to load
327
327
  */
328
328
  onFailToLoadConnections: (err: Error) => void;
329
+ /**
330
+ * Callback that will get passed another callback function that, when called,
331
+ * would return back true or false depending on whether or not tabs can be
332
+ * safely closed without losing any important unsaved changes
333
+ */
334
+ onBeforeUnloadCallbackRequest?: (canCloseCallback: () => boolean) => void;
329
335
  };
330
336
 
331
337
  /**
@@ -941,7 +947,12 @@ declare interface ExperimentSDKContextType<T extends TypeData> {
941
947
  */
942
948
  declare type ExperimentSDKProviderProps<T extends TypeData> = React.PropsWithChildren<ExperimentSDKContextType<T>>;
943
949
 
944
- declare enum ExperimentTestName {
950
+ export declare enum ExperimentTestGroup {
951
+ mockDataGeneratorVariant = "mockDataGeneratorVariant",
952
+ mockDataGeneratorControl = "mockDataGeneratorControl"
953
+ }
954
+
955
+ export declare enum ExperimentTestName {
945
956
  earlyJourneyIndexesGuidance = "EARLY_JOURNEY_INDEXES_GUIDANCE_20250328",
946
957
  mockDataGenerator = "MOCK_DATA_GENERATOR_20251001"
947
958
  }
@@ -1042,6 +1053,7 @@ declare type InternalUserPreferences = {
1042
1053
  userCreatedAt: number;
1043
1054
  enableConnectInNewWindow: boolean;
1044
1055
  showEndOfLifeConnectionModal: boolean;
1056
+ zoomLevel?: number;
1045
1057
  };
1046
1058
 
1047
1059
  /**