@launchdarkly/toolbar 1.5.0 → 2.0.0-beta.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.
- package/cdn/toolbar.min.js +6 -6
- package/dist/core/services/DevServerClient.d.ts +1 -4
- package/dist/core/services/FlagStateManager.d.ts +3 -0
- package/dist/core/ui/Toolbar/Header/Header.css.d.ts +2 -0
- package/dist/core/ui/Toolbar/Header/Header.d.ts +0 -1
- package/dist/core/ui/Toolbar/LaunchDarklyToolbar.d.ts +1 -0
- package/dist/core/ui/Toolbar/TabContent/SettingsTabContent.d.ts +0 -2
- package/dist/core/ui/Toolbar/components/ExpandedToolbarContent.d.ts +0 -2
- package/dist/core/ui/Toolbar/components/Feedback/Feedback.css.d.ts +9 -0
- package/dist/core/ui/Toolbar/components/Feedback/Feedback.d.ts +7 -0
- package/dist/core/ui/Toolbar/components/LoginScreen.css.d.ts +14 -0
- package/dist/core/ui/Toolbar/components/LoginScreen.d.ts +10 -0
- package/dist/core/ui/Toolbar/components/TabContentRenderer.d.ts +0 -2
- package/dist/core/ui/Toolbar/components/icons/LaunchDarklyIcon.d.ts +2 -1
- package/dist/core/ui/Toolbar/components/icons/ThumbDownIcon.d.ts +5 -0
- package/dist/core/ui/Toolbar/components/icons/ThumbUpIcon.d.ts +5 -0
- package/dist/core/ui/Toolbar/components/icons/index.d.ts +2 -0
- package/dist/core/ui/Toolbar/components/index.d.ts +1 -0
- package/dist/core/ui/Toolbar/context/ActiveTabProvider.d.ts +10 -0
- package/dist/core/ui/Toolbar/context/ApiProvider.d.ts +5 -1
- package/dist/core/ui/Toolbar/context/AuthProvider.d.ts +1 -0
- package/dist/core/ui/Toolbar/context/DevServerProvider.d.ts +1 -5
- package/dist/core/ui/Toolbar/context/FlagsProvider.d.ts +12 -0
- package/dist/core/ui/Toolbar/context/IFrameProvider.d.ts +13 -11
- package/dist/core/ui/Toolbar/context/ProjectProvider.d.ts +16 -0
- package/dist/core/ui/Toolbar/context/index.d.ts +1 -0
- package/dist/core/ui/Toolbar/hooks/useToolbarState.d.ts +0 -4
- package/dist/core/ui/Toolbar/types/ldApi.d.ts +40 -0
- package/dist/core/ui/Toolbar/utils/localStorage.d.ts +0 -4
- package/dist/core/utils/analytics.d.ts +25 -0
- package/dist/index.cjs +1 -3
- package/dist/index.cjs.map +1 -1
- package/dist/js/index.js +1 -3
- package/dist/js/index.js.map +1 -1
- package/dist/types/analytics.d.ts +1 -0
- package/dist/types/config.d.ts +11 -1
- package/package.json +1 -1
|
@@ -21,14 +21,11 @@ export interface Override {
|
|
|
21
21
|
export declare class DevServerClient {
|
|
22
22
|
private baseUrl;
|
|
23
23
|
private projectKey;
|
|
24
|
-
constructor(baseUrl: string, projectKey
|
|
25
|
-
setProjectKey(projectKey: string): void;
|
|
26
|
-
getProjectKey(): string | null;
|
|
24
|
+
constructor(baseUrl: string, projectKey: string);
|
|
27
25
|
getProjectData(): Promise<DevServerProjectResponse>;
|
|
28
26
|
setOverride(flagKey: string, value: any): Promise<{
|
|
29
27
|
override: boolean;
|
|
30
28
|
value: any;
|
|
31
29
|
}>;
|
|
32
30
|
clearOverride(flagKey: string): Promise<void>;
|
|
33
|
-
getAvailableProjects(): Promise<string[]>;
|
|
34
31
|
}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { DevServerClient } from './DevServerClient';
|
|
2
2
|
import { EnhancedFlag } from '../types/devServer';
|
|
3
|
+
import { ApiFlag } from '../ui/Toolbar/types/ldApi';
|
|
3
4
|
export declare class FlagStateManager {
|
|
4
5
|
private devServerClient;
|
|
5
6
|
private listeners;
|
|
7
|
+
private apiFlags;
|
|
6
8
|
constructor(devServerClient: DevServerClient);
|
|
7
9
|
getEnhancedFlags(): Promise<Record<string, EnhancedFlag>>;
|
|
8
10
|
private formatFlagName;
|
|
9
11
|
private determineFlagType;
|
|
10
12
|
setOverride(flagKey: string, value: any): Promise<void>;
|
|
11
13
|
clearOverride(flagKey: string): Promise<void>;
|
|
14
|
+
setApiFlags(apiFlags: ApiFlag[]): void;
|
|
12
15
|
subscribe(listener: (flags: Record<string, EnhancedFlag>) => void): () => void;
|
|
13
16
|
private notifyListeners;
|
|
14
17
|
destroy(): void;
|
|
@@ -16,3 +16,5 @@ export declare const searchFieldWrapperSvg: string;
|
|
|
16
16
|
export declare const searchWrapper: string;
|
|
17
17
|
export declare const environmentWrapper: string;
|
|
18
18
|
export declare const icon: string;
|
|
19
|
+
export declare const environmentLabelWrapper: string;
|
|
20
|
+
export declare const environmentTooltip: string;
|
|
@@ -18,5 +18,6 @@ export interface LaunchDarklyToolbarProps {
|
|
|
18
18
|
pollIntervalInMs?: number;
|
|
19
19
|
position?: ToolbarPosition;
|
|
20
20
|
domId: string;
|
|
21
|
+
clientSideId?: string;
|
|
21
22
|
}
|
|
22
23
|
export declare function LaunchDarklyToolbar(props: LaunchDarklyToolbarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -5,8 +5,6 @@ interface SettingsTabContentProps {
|
|
|
5
5
|
onToggleReloadOnFlagChange: () => void;
|
|
6
6
|
isAutoCollapseEnabled: boolean;
|
|
7
7
|
onToggleAutoCollapse: () => void;
|
|
8
|
-
optInToNewFeatures: boolean;
|
|
9
|
-
onToggleOptInToNewFeatures: () => void;
|
|
10
8
|
}
|
|
11
9
|
export declare function SettingsTabContent(props: SettingsTabContentProps): import("react/jsx-runtime").JSX.Element;
|
|
12
10
|
export {};
|
|
@@ -20,8 +20,6 @@ interface ExpandedToolbarContentProps {
|
|
|
20
20
|
onHeaderMouseDown?: (event: React.MouseEvent) => void;
|
|
21
21
|
reloadOnFlagChangeIsEnabled: boolean;
|
|
22
22
|
onToggleReloadOnFlagChange: () => void;
|
|
23
|
-
optInToNewFeatures: boolean;
|
|
24
|
-
onToggleOptInToNewFeatures: () => void;
|
|
25
23
|
}
|
|
26
24
|
export declare const ExpandedToolbarContent: React.ForwardRefExoticComponent<ExpandedToolbarContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
27
25
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const feedbackContainer: string;
|
|
2
|
+
export declare const title: string;
|
|
3
|
+
export declare const sentimentContainer: string;
|
|
4
|
+
export declare const sentimentButton: string;
|
|
5
|
+
export declare const commentForm: string;
|
|
6
|
+
export declare const textField: string;
|
|
7
|
+
export declare const submitButton: string;
|
|
8
|
+
export declare const successMessage: string;
|
|
9
|
+
export declare const successIcon: string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FeedbackSentiment } from '../../../../../types/analytics';
|
|
2
|
+
interface FeedbackProps {
|
|
3
|
+
onSubmit: (feedback: string, sentiment: FeedbackSentiment) => void;
|
|
4
|
+
title?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function Feedback(props: FeedbackProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const loginContainer: string;
|
|
2
|
+
export declare const loginHeader: string;
|
|
3
|
+
export declare const headerLogo: string;
|
|
4
|
+
export declare const loginMainContent: string;
|
|
5
|
+
export declare const closeButtonArea: string;
|
|
6
|
+
export declare const actionButton: string;
|
|
7
|
+
export declare const loginContent: string;
|
|
8
|
+
export declare const title: string;
|
|
9
|
+
export declare const description: string;
|
|
10
|
+
export declare const errorMessage: string;
|
|
11
|
+
export declare const loginButton: string;
|
|
12
|
+
export declare const spinner: string;
|
|
13
|
+
export declare const helpText: string;
|
|
14
|
+
export declare const helpLink: string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface LoginScreenProps {
|
|
2
|
+
onClose: () => void;
|
|
3
|
+
onLogin: () => void;
|
|
4
|
+
onMouseDown?: (event: React.MouseEvent) => void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Login screen component that prompts users to authenticate with LaunchDarkly
|
|
8
|
+
*/
|
|
9
|
+
export declare function LoginScreen(props: LoginScreenProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -11,8 +11,6 @@ interface TabContentRendererProps {
|
|
|
11
11
|
onToggleReloadOnFlagChange: () => void;
|
|
12
12
|
isAutoCollapseEnabled: boolean;
|
|
13
13
|
onToggleAutoCollapse: () => void;
|
|
14
|
-
optInToNewFeatures: boolean;
|
|
15
|
-
onToggleOptInToNewFeatures: () => void;
|
|
16
14
|
}
|
|
17
15
|
export declare function TabContentRenderer(props: TabContentRendererProps): import("react/jsx-runtime").JSX.Element | null;
|
|
18
16
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
interface LaunchDarklyIconProps {
|
|
2
2
|
className?: string;
|
|
3
|
+
onMouseDown?: (event: React.MouseEvent) => void;
|
|
3
4
|
}
|
|
4
|
-
export declare function LaunchDarklyIcon({ className }: LaunchDarklyIconProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function LaunchDarklyIcon({ className, onMouseDown }: LaunchDarklyIconProps): import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
export {};
|
|
@@ -13,3 +13,5 @@ export { CancelIcon } from './CancelIcon';
|
|
|
13
13
|
export { StarIcon } from './StarIcon';
|
|
14
14
|
export { StarOutlineIcon } from './StarOutlineIcon';
|
|
15
15
|
export { PersonPassword } from './PersonPassword';
|
|
16
|
+
export { ThumbUpIcon } from './ThumbUpIcon';
|
|
17
|
+
export { ThumbDownIcon } from './ThumbDownIcon';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { ActionButtonsContainer } from './ActionButtonsContainer';
|
|
2
|
+
export { LoginScreen } from './LoginScreen';
|
|
2
3
|
export { CircleLogo } from './CircleLogo';
|
|
3
4
|
export { ConnectionStatus } from './ConnectionStatus';
|
|
4
5
|
export { DoNotTrackWarning } from './DoNotTrackWarning';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ActiveTabId } from '../types/toolbar';
|
|
2
|
+
type ActiveTabContextType = {
|
|
3
|
+
activeTab: ActiveTabId;
|
|
4
|
+
setActiveTab: (tab: ActiveTabId) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare function ActiveTabProvider({ children }: {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function useActiveTabContext(): ActiveTabContextType;
|
|
10
|
+
export {};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { FlagsPaginationParams, FlagsResponse, ApiFlag, ProjectsResponse } from '../types/ldApi';
|
|
1
2
|
interface ApiProviderContextValue {
|
|
2
|
-
|
|
3
|
+
apiReady: boolean;
|
|
4
|
+
getFlag: (flagKey: string) => Promise<ApiFlag>;
|
|
5
|
+
getProjects: () => Promise<ProjectsResponse>;
|
|
6
|
+
getFlags: (projectKey: string, params?: FlagsPaginationParams) => Promise<FlagsResponse>;
|
|
3
7
|
}
|
|
4
8
|
export interface ApiProviderProps {
|
|
5
9
|
children: React.ReactNode;
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import type { FC, ReactNode } from 'react';
|
|
2
2
|
import { LdToolbarConfig, ToolbarState } from '../../../types/devServer';
|
|
3
3
|
interface DevServerContextValue {
|
|
4
|
-
state: ToolbarState
|
|
5
|
-
availableProjects: string[];
|
|
6
|
-
currentProjectKey: string | null;
|
|
7
|
-
};
|
|
4
|
+
state: ToolbarState;
|
|
8
5
|
setOverride: (flagKey: string, value: any) => Promise<void>;
|
|
9
6
|
clearOverride: (flagKey: string) => Promise<void>;
|
|
10
7
|
clearAllOverrides: () => Promise<void>;
|
|
11
8
|
refresh: () => Promise<void>;
|
|
12
|
-
switchProject: (projectKey: string) => Promise<void>;
|
|
13
9
|
}
|
|
14
10
|
export declare const useDevServerContext: () => DevServerContextValue;
|
|
15
11
|
export interface DevServerProviderProps {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ApiFlag, FlagsResponse } from '../types/ldApi';
|
|
2
|
+
type FlagsContextType = {
|
|
3
|
+
flags: ApiFlag[];
|
|
4
|
+
loading: boolean;
|
|
5
|
+
getProjectFlags: (projectKey: string) => Promise<FlagsResponse>;
|
|
6
|
+
resetFlags: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const FlagsProvider: ({ children }: {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const useFlagsContext: () => FlagsContextType;
|
|
12
|
+
export {};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
export declare const IFRAME_COMMANDS: {
|
|
3
|
+
LOGOUT: string;
|
|
4
|
+
GET_PROJECTS: string;
|
|
5
|
+
GET_FLAGS: string;
|
|
6
|
+
GET_FLAG: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const getResponseTopic: (command: string) => string;
|
|
9
|
+
export declare const getErrorTopic: (command: string) => string;
|
|
10
|
+
export declare const IFRAME_EVENTS: {
|
|
11
|
+
AUTHENTICATED: string;
|
|
12
|
+
AUTH_REQUIRED: string;
|
|
13
|
+
AUTH_ERROR: string;
|
|
14
|
+
API_READY: string;
|
|
13
15
|
};
|
|
14
16
|
interface IFrameProviderProps {
|
|
15
17
|
children: React.ReactNode;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ApiProject, ProjectsResponse } from '../types/ldApi';
|
|
2
|
+
type ProjectContextType = {
|
|
3
|
+
projectKey: string;
|
|
4
|
+
setProjectKey: (projectKey: string) => void;
|
|
5
|
+
getProjects: () => Promise<ProjectsResponse>;
|
|
6
|
+
projects: ApiProject[];
|
|
7
|
+
loading: boolean;
|
|
8
|
+
};
|
|
9
|
+
interface ProjectProviderProps {
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
clientSideId?: string;
|
|
12
|
+
providedProjectKey?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const ProjectProvider: ({ children, clientSideId, providedProjectKey }: ProjectProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function useProjectContext(): ProjectContextType;
|
|
16
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { DevServerProvider, useDevServerContext } from './DevServerProvider';
|
|
2
2
|
export { SearchProvider, useSearchContext } from './SearchProvider';
|
|
3
|
+
export { ActiveTabProvider, useActiveTabContext } from './ActiveTabProvider';
|
|
3
4
|
export { ToolbarUIProvider, useToolbarUIContext } from './ToolbarUIProvider';
|
|
4
5
|
export { FlagSdkOverrideProvider, useFlagSdkOverrideContext, type LocalFlag, type FlagSdkOverrideContextType, } from './FlagSdkOverrideProvider';
|
|
5
6
|
export { AnalyticsProvider, useAnalytics } from './AnalyticsProvider';
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import { ActiveTabId } from '../types';
|
|
3
3
|
export interface UseToolbarStateProps {
|
|
4
|
-
defaultActiveTab: ActiveTabId;
|
|
5
4
|
domId: string;
|
|
6
5
|
}
|
|
7
6
|
export interface UseToolbarStateReturn {
|
|
8
7
|
isExpanded: boolean;
|
|
9
|
-
activeTab: ActiveTabId;
|
|
10
8
|
previousTab: ActiveTabId;
|
|
11
9
|
isAnimating: boolean;
|
|
12
10
|
searchIsExpanded: boolean;
|
|
@@ -14,14 +12,12 @@ export interface UseToolbarStateReturn {
|
|
|
14
12
|
hasBeenExpanded: boolean;
|
|
15
13
|
reloadOnFlagChangeIsEnabled: boolean;
|
|
16
14
|
isAutoCollapseEnabled: boolean;
|
|
17
|
-
optInToNewFeatures: boolean;
|
|
18
15
|
toolbarRef: React.RefObject<HTMLDivElement | null>;
|
|
19
16
|
handleTabChange: (tabId: string) => void;
|
|
20
17
|
handleClose: () => void;
|
|
21
18
|
handleSearch: (newSearchTerm: string) => void;
|
|
22
19
|
handleToggleReloadOnFlagChange: () => void;
|
|
23
20
|
handleToggleAutoCollapse: () => void;
|
|
24
|
-
handleToggleOptInToNewFeatures: () => void;
|
|
25
21
|
handleCircleClick: () => void;
|
|
26
22
|
setIsAnimating: Dispatch<SetStateAction<boolean>>;
|
|
27
23
|
setSearchIsExpanded: Dispatch<SetStateAction<boolean>>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface ApiProject {
|
|
2
|
+
_id: string;
|
|
3
|
+
key: string;
|
|
4
|
+
name: string;
|
|
5
|
+
environments: ApiEnvironment[];
|
|
6
|
+
}
|
|
7
|
+
export interface ApiEnvironment {
|
|
8
|
+
_id: string;
|
|
9
|
+
key: string;
|
|
10
|
+
name: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ApiFlag {
|
|
13
|
+
archived: boolean;
|
|
14
|
+
clientSideAvailability: {
|
|
15
|
+
usingEnvironmentId: boolean;
|
|
16
|
+
usingMobileKey: boolean;
|
|
17
|
+
};
|
|
18
|
+
customProperties: Record<string, any>;
|
|
19
|
+
description: string;
|
|
20
|
+
key: string;
|
|
21
|
+
kind: 'boolean' | 'string' | 'number' | 'object' | 'multivariate';
|
|
22
|
+
name: string;
|
|
23
|
+
variations: ApiVariation[];
|
|
24
|
+
}
|
|
25
|
+
export interface ApiVariation {
|
|
26
|
+
_id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
value: any;
|
|
29
|
+
}
|
|
30
|
+
export interface FlagsResponse {
|
|
31
|
+
items: ApiFlag[];
|
|
32
|
+
}
|
|
33
|
+
export interface ProjectsResponse {
|
|
34
|
+
items: ApiProject[];
|
|
35
|
+
}
|
|
36
|
+
export interface FlagsPaginationParams {
|
|
37
|
+
limit?: number;
|
|
38
|
+
offset?: number;
|
|
39
|
+
query?: string;
|
|
40
|
+
}
|
|
@@ -3,14 +3,12 @@ export declare const TOOLBAR_STORAGE_KEYS: {
|
|
|
3
3
|
readonly SETTINGS: "ld-toolbar-settings";
|
|
4
4
|
readonly DISABLED: "ld-toolbar-disabled";
|
|
5
5
|
readonly PROJECT: "ld-toolbar-project";
|
|
6
|
-
readonly OPT_IN_TO_NEW_FEATURES: "ld-toolbar-opt-in-to-new-features";
|
|
7
6
|
readonly STARRED_FLAGS: "ld-toolbar-starred-flags";
|
|
8
7
|
};
|
|
9
8
|
export interface ToolbarSettings {
|
|
10
9
|
position: ToolbarPosition;
|
|
11
10
|
reloadOnFlagChange: boolean;
|
|
12
11
|
autoCollapse: boolean;
|
|
13
|
-
optInToNewFeatures: boolean;
|
|
14
12
|
}
|
|
15
13
|
export declare const DEFAULT_SETTINGS: ToolbarSettings;
|
|
16
14
|
export declare function saveToolbarPosition(position: ToolbarPosition): void;
|
|
@@ -19,7 +17,5 @@ export declare function saveToolbarAutoCollapse(autoCollapse: boolean): void;
|
|
|
19
17
|
export declare function loadToolbarAutoCollapse(): boolean;
|
|
20
18
|
export declare function saveReloadOnFlagChange(isReloadOnFlagChange: boolean): void;
|
|
21
19
|
export declare function loadReloadOnFlagChange(): boolean;
|
|
22
|
-
export declare function saveOptInToNewFeatures(optInToNewFeatures: boolean): void;
|
|
23
|
-
export declare function loadOptInToNewFeatures(): boolean;
|
|
24
20
|
export declare function loadStarredFlags(): Set<string>;
|
|
25
21
|
export declare function saveStarredFlags(starredFlags: Set<string>): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { LDClient } from 'launchdarkly-js-client-sdk';
|
|
2
|
+
import type { FeedbackSentiment } from '../../types/analytics';
|
|
2
3
|
import { ToolbarMode } from '../ui/Toolbar/types';
|
|
3
4
|
export declare const ANALYTICS_EVENT_PREFIX = "ld.toolbar";
|
|
4
5
|
/**
|
|
@@ -61,12 +62,36 @@ export declare class ToolbarAnalytics {
|
|
|
61
62
|
* Track Reload on Flag Change toggles
|
|
62
63
|
*/
|
|
63
64
|
trackReloadOnFlagChangeToggle(enabled: boolean): void;
|
|
65
|
+
/**
|
|
66
|
+
* Track successful login
|
|
67
|
+
*/
|
|
68
|
+
trackLoginSuccess(): void;
|
|
69
|
+
/**
|
|
70
|
+
* Track when user closes the login screen without logging in
|
|
71
|
+
*/
|
|
72
|
+
trackLoginCancelled(): void;
|
|
73
|
+
/**
|
|
74
|
+
* Track when user logs out
|
|
75
|
+
*/
|
|
76
|
+
trackLogout(): void;
|
|
77
|
+
/**
|
|
78
|
+
* Track authentication errors
|
|
79
|
+
*/
|
|
80
|
+
trackAuthError(error: unknown): void;
|
|
64
81
|
/**
|
|
65
82
|
* Track project switching in dev server mode
|
|
66
83
|
*/
|
|
67
84
|
trackProjectSwitch(fromProject: string, toProject: string): void;
|
|
85
|
+
/**
|
|
86
|
+
* Track API errors
|
|
87
|
+
*/
|
|
88
|
+
trackApiError(error: unknown): void;
|
|
68
89
|
/**
|
|
69
90
|
* Track refresh button clicks in dev server mode
|
|
70
91
|
*/
|
|
71
92
|
trackRefresh(): void;
|
|
93
|
+
/**
|
|
94
|
+
* Track user feedback
|
|
95
|
+
*/
|
|
96
|
+
trackFeedback(feedback: string, sentiment: FeedbackSentiment): void;
|
|
72
97
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -552,9 +552,7 @@ async function lazyLoad(signal, url) {
|
|
|
552
552
|
throw new Error(`Could not load LaunchDarkly developer toolbar bundle from ${url}`);
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
|
-
var package_namespaceObject = {
|
|
556
|
-
rE: "1.5.0"
|
|
557
|
-
};
|
|
555
|
+
var package_namespaceObject = JSON.parse('{"rE":"2.0.0-beta.1"}');
|
|
558
556
|
function useLaunchDarklyToolbar(args) {
|
|
559
557
|
const { toolbarBundleUrl, enabled, ...initConfig } = args;
|
|
560
558
|
const configRef = (0, external_react_namespaceObject.useRef)(null);
|