@launchdarkly/toolbar 2.2.0-beta.1 → 2.2.0
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/README.md +246 -19
- package/cdn/toolbar.min.js +658 -13
- package/cdn/toolbar.min.js.LICENSE.txt +14 -0
- package/dist/angular/launchdarkly-toolbar.service.d.ts +104 -0
- package/dist/angular.cjs +439 -0
- package/dist/angular.cjs.map +1 -0
- package/dist/angular.d.ts +51 -0
- package/dist/core/index.d.ts +0 -1
- package/dist/core/services/DevServerClient.d.ts +9 -3
- package/dist/core/services/FlagStateManager.d.ts +2 -0
- package/dist/core/styles/constants.d.ts +24 -0
- package/dist/core/styles/index.d.ts +2 -0
- package/dist/core/styles/shadowDomStyles.d.ts +41 -0
- package/dist/core/tests/mocks/providers.d.ts +132 -0
- package/dist/core/ui/Buttons/IconButton.d.ts +2 -1
- package/dist/core/ui/JsonEditor/JsonEditor.d.ts +2 -1
- package/dist/core/ui/Toolbar/components/AuthenticationModal/AuthenticationModal.d.ts +1 -1
- package/dist/core/ui/Toolbar/components/CircleLogo.d.ts +1 -2
- package/dist/core/ui/Toolbar/components/{FlagKeyWithCopy.css.d.ts → CopyableText.css.d.ts} +1 -1
- package/dist/core/ui/Toolbar/components/CopyableText.d.ts +18 -0
- package/dist/core/ui/Toolbar/components/FilterOptions/FilterOptions.css.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/FilterOptions/FilterOptions.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/FilterOptions/ShareUrlButton.css.d.ts +2 -0
- package/dist/core/ui/Toolbar/components/FilterOptions/ShareUrlButton.d.ts +7 -0
- package/dist/core/ui/Toolbar/components/LoadingScreen/LoadingScreen.css.d.ts +7 -0
- package/dist/core/ui/Toolbar/components/LoadingScreen/LoadingScreen.d.ts +5 -0
- package/dist/core/ui/Toolbar/components/LoadingScreen/index.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/ShareStatePopover/ShareStatePopover.css.d.ts +10 -0
- package/dist/core/ui/Toolbar/components/ShareStatePopover/ShareStatePopover.d.ts +15 -0
- package/dist/core/ui/Toolbar/components/ShareStatePopover/index.d.ts +2 -0
- package/dist/core/ui/Toolbar/components/icons/ShareIcon.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/components/legacy/ExpandedToolbarContentLegacy.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/new/AnalyticsConsentToast/AnalyticsConsentToast.d.ts +5 -0
- package/dist/core/ui/Toolbar/components/new/AnalyticsConsentToast/AnalyticsConsentToast.module.css.d.ts +13 -0
- package/dist/core/ui/Toolbar/components/new/AnalyticsConsentToast/index.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/new/ContentActions.module.css.d.ts +4 -0
- package/dist/core/ui/Toolbar/components/new/Contexts/AddContextForm.d.ts +6 -0
- package/dist/core/ui/Toolbar/components/new/Contexts/AddContextForm.module.css.d.ts +14 -0
- package/dist/core/ui/Toolbar/components/new/Contexts/ContextItem.d.ts +9 -0
- package/dist/core/ui/Toolbar/components/new/Contexts/ContextItem.module.css.d.ts +19 -0
- package/dist/core/ui/Toolbar/components/new/Contexts/ContextList.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/new/Contexts/ContextList.module.css.d.ts +8 -0
- package/dist/core/ui/Toolbar/components/new/Contexts/ContextListContent.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/new/Contexts/index.d.ts +4 -0
- package/dist/core/ui/Toolbar/components/new/ExpandedToolbarContent.d.ts +4 -3
- package/dist/core/ui/Toolbar/components/new/FeatureFlags/FlagControls.d.ts +5 -5
- package/dist/core/ui/Toolbar/components/new/FeatureFlags/FlagItem.d.ts +2 -1
- package/dist/core/ui/Toolbar/components/new/FeatureFlags/FlagListContent.d.ts +1 -1
- package/dist/core/ui/Toolbar/components/new/FilterOverlay/FilterOverlay.module.css.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/new/Monitoring/EventsContent.module.css.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/new/Settings/Privacy/PrivacySettings.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/new/Settings/SettingsContent.module.css.d.ts +2 -0
- package/dist/core/ui/Toolbar/components/new/Settings/ShareButton.d.ts +5 -0
- package/dist/core/ui/Toolbar/components/new/Settings/ShareButton.module.css.d.ts +1 -0
- package/dist/core/ui/Toolbar/components/new/Settings/index.d.ts +1 -1
- package/dist/core/ui/Toolbar/components/new/Tooltip.d.ts +3 -1
- package/dist/core/ui/Toolbar/components/new/context/TabSearchProvider.d.ts +7 -5
- package/dist/core/ui/Toolbar/components/new/types.d.ts +2 -2
- package/dist/core/ui/Toolbar/constants/animations.d.ts +14 -0
- package/dist/core/ui/Toolbar/context/DevServerProvider.d.ts +2 -0
- package/dist/core/ui/Toolbar/context/api/ApiProvider.d.ts +1 -2
- package/dist/core/ui/Toolbar/context/api/ContextsProvider.d.ts +19 -0
- package/dist/core/ui/Toolbar/context/api/FlagsProvider.d.ts +1 -0
- package/dist/core/ui/Toolbar/context/api/index.d.ts +1 -0
- package/dist/core/ui/Toolbar/context/state/ToolbarStateProvider.d.ts +6 -0
- package/dist/core/ui/Toolbar/context/telemetry/AnalyticsPreferencesProvider.d.ts +14 -0
- package/dist/core/ui/Toolbar/context/telemetry/InternalClientProvider.d.ts +15 -1
- package/dist/core/ui/Toolbar/context/telemetry/TelemetryBundleProvider.d.ts +2 -0
- package/dist/core/ui/Toolbar/context/telemetry/index.d.ts +1 -0
- package/dist/core/ui/Toolbar/hooks/index.d.ts +2 -0
- package/dist/core/ui/Toolbar/hooks/useLocalStorage.d.ts +10 -0
- package/dist/core/ui/Toolbar/hooks/useReducedMotion.d.ts +5 -0
- package/dist/core/ui/Toolbar/hooks/useToolbarAnimations.d.ts +1 -1
- package/dist/core/ui/Toolbar/utils/context.d.ts +33 -0
- package/dist/core/ui/Toolbar/utils/localStorage.d.ts +21 -2
- package/dist/core/utils/analytics.d.ts +48 -2
- package/dist/core/utils/feedback.d.ts +18 -0
- package/dist/core/utils/urlOverrides.d.ts +105 -0
- package/dist/flags/toolbarFlags.d.ts +5 -2
- package/dist/index.cjs +10 -6
- package/dist/index.cjs.map +1 -1
- package/dist/js/374.js +446 -0
- package/dist/js/374.js.map +1 -0
- package/dist/js/816.js +56 -0
- package/dist/js/816.js.map +1 -0
- package/dist/js/96.js +38 -0
- package/dist/js/96.js.map +1 -0
- package/dist/js/angular.js +353 -0
- package/dist/js/angular.js.map +1 -0
- package/dist/js/index.js +3 -527
- package/dist/js/index.js.map +1 -1
- package/dist/js/plugins.js +1 -0
- package/dist/js/react.js +2 -0
- package/dist/js/types-entry.js +0 -0
- package/dist/js/vue.js +34 -0
- package/dist/js/vue.js.map +1 -0
- package/dist/plugins.cjs +483 -0
- package/dist/plugins.cjs.map +1 -0
- package/dist/plugins.d.ts +21 -0
- package/dist/react/useLaunchDarklyToolbar.d.ts +1 -1
- package/dist/react.cjs +127 -0
- package/dist/react.cjs.map +1 -0
- package/dist/react.d.ts +25 -0
- package/dist/types-entry.cjs +20 -0
- package/dist/types-entry.cjs.map +1 -0
- package/dist/types-entry.d.ts +12 -0
- package/dist/vue/useLaunchDarklyToolbar.d.ts +20 -0
- package/dist/vue.cjs +122 -0
- package/dist/vue.cjs.map +1 -0
- package/dist/vue.d.ts +24 -0
- package/package.json +133 -36
- package/dist/core/ui/Toolbar/components/FlagKeyWithCopy.d.ts +0 -6
- package/dist/core/ui/Toolbar/components/new/Settings/SettingsContent.d.ts +0 -1
- /package/dist/{react → core}/lazyLoadToolbar.d.ts +0 -0
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { DevServerClient } from './DevServerClient';
|
|
2
2
|
import { EnhancedFlag } from '../types/devServer';
|
|
3
3
|
import { ApiFlag } from '../ui/Toolbar/types/ldApi';
|
|
4
|
+
import type { DevServerProjectResponse } from './DevServerClient';
|
|
4
5
|
export declare class FlagStateManager {
|
|
5
6
|
private devServerClient;
|
|
6
7
|
private listeners;
|
|
7
8
|
private apiFlags;
|
|
8
9
|
constructor(devServerClient: DevServerClient);
|
|
9
10
|
getEnhancedFlags(): Promise<Record<string, EnhancedFlag>>;
|
|
11
|
+
getEnhancedFlagsFromDevServerData(devServerData: DevServerProjectResponse): Record<string, EnhancedFlag>;
|
|
10
12
|
private formatFlagName;
|
|
11
13
|
private determineFlagType;
|
|
12
14
|
setOverride(flagKey: string, value: any): Promise<void>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Style isolation constants for Shadow DOM.
|
|
3
|
+
*
|
|
4
|
+
* This module provides unique identifiers and detection patterns for toolbar styles,
|
|
5
|
+
* enabling reliable isolation from host application stylesheets.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Unique prefix for all toolbar vanilla-extract class names.
|
|
9
|
+
* This is configured in rslib.config.ts and rslib.config.cdn.ts
|
|
10
|
+
*/
|
|
11
|
+
export declare const TOOLBAR_CLASS_PREFIX = "ldtb_";
|
|
12
|
+
/**
|
|
13
|
+
* CSS comment marker injected into toolbar stylesheets.
|
|
14
|
+
* Used to identify toolbar styles during runtime interception.
|
|
15
|
+
*/
|
|
16
|
+
export declare const TOOLBAR_STYLE_MARKER = "/* LD_TOOLBAR_STYLES */";
|
|
17
|
+
/**
|
|
18
|
+
* Checks if CSS content belongs to the toolbar based on known markers.
|
|
19
|
+
* This is used for reliable style interception without false positives.
|
|
20
|
+
*
|
|
21
|
+
* @param content - CSS content to check
|
|
22
|
+
* @returns true if the content is toolbar CSS that should be moved to Shadow DOM
|
|
23
|
+
*/
|
|
24
|
+
export declare function isToolbarStyleContent(content: string): boolean;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shadow DOM Style Injection Utilities
|
|
3
|
+
*
|
|
4
|
+
* This module provides utilities for injecting styles directly into Shadow DOM,
|
|
5
|
+
* bypassing document.head entirely to prevent style conflicts with host applications.
|
|
6
|
+
*
|
|
7
|
+
* The approach uses:
|
|
8
|
+
* 1. adoptedStyleSheets (modern browsers) - Styles never touch document.head
|
|
9
|
+
* 2. Synchronous DOM interception (fallback) - Intercepts before styles are visible
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Injects CSS directly into a Shadow DOM root using the best available method.
|
|
13
|
+
*
|
|
14
|
+
* @param shadowRoot - The Shadow DOM root to inject styles into
|
|
15
|
+
* @param cssText - The CSS content to inject
|
|
16
|
+
* @returns A cleanup function to remove the styles
|
|
17
|
+
*/
|
|
18
|
+
export declare function injectStylesIntoShadowRoot(shadowRoot: ShadowRoot, cssText: string): () => void;
|
|
19
|
+
/**
|
|
20
|
+
* Creates a synchronous interceptor for styles injected into document.head.
|
|
21
|
+
* This prevents toolbar styles from ever being visible in the main document.
|
|
22
|
+
*
|
|
23
|
+
* IMPORTANT: This must be called BEFORE importing any toolbar components
|
|
24
|
+
* to intercept their style injections.
|
|
25
|
+
*
|
|
26
|
+
* @param shadowRoot - The Shadow DOM root to redirect styles to
|
|
27
|
+
* @returns A cleanup function to restore original DOM methods
|
|
28
|
+
*/
|
|
29
|
+
export declare function createStyleInterceptor(shadowRoot: ShadowRoot): () => void;
|
|
30
|
+
/**
|
|
31
|
+
* Caches a style for HMR support.
|
|
32
|
+
*/
|
|
33
|
+
export declare function cacheToolbarStyle(content: string): void;
|
|
34
|
+
/**
|
|
35
|
+
* Gets all cached toolbar styles.
|
|
36
|
+
*/
|
|
37
|
+
export declare function getCachedToolbarStyles(): string[];
|
|
38
|
+
/**
|
|
39
|
+
* Clears the style cache (useful for testing).
|
|
40
|
+
*/
|
|
41
|
+
export declare function clearToolbarStyleCache(): void;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { vi } from 'vitest';
|
|
2
|
+
/**
|
|
3
|
+
* Shared mock factory functions for provider contexts.
|
|
4
|
+
*
|
|
5
|
+
* GLOBAL MOCKS:
|
|
6
|
+
* AnalyticsPreferencesProvider is mocked globally in vitest.setup.ts.
|
|
7
|
+
* Most test files don't need to do anything - the mock is automatic.
|
|
8
|
+
*
|
|
9
|
+
* TESTING REAL IMPLEMENTATIONS:
|
|
10
|
+
* If your test file tests the REAL implementation of a provider, add this at
|
|
11
|
+
* the top of your test file:
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* vi.unmock('../ui/Toolbar/context/telemetry/AnalyticsPreferencesProvider');
|
|
15
|
+
*
|
|
16
|
+
* OVERRIDING WITH DYNAMIC VALUES:
|
|
17
|
+
* If your test needs to change mock values during execution, override the
|
|
18
|
+
* global mock with createDynamicAnalyticsPreferencesProviderMock:
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* const { getMockValue, setMockValue } = vi.hoisted(() => {
|
|
22
|
+
* let value = false;
|
|
23
|
+
* return { getMockValue: () => value, setMockValue: (v) => { value = v; } };
|
|
24
|
+
* });
|
|
25
|
+
*
|
|
26
|
+
* vi.mock('../ui/Toolbar/context/telemetry/AnalyticsPreferencesProvider', async () => {
|
|
27
|
+
* const { createDynamicAnalyticsPreferencesProviderMock } = await import('./mocks/providers');
|
|
28
|
+
* return createDynamicAnalyticsPreferencesProviderMock({ getIsOptedInToAnalytics: getMockValue });
|
|
29
|
+
* });
|
|
30
|
+
*/
|
|
31
|
+
interface AnalyticsPreferencesMock {
|
|
32
|
+
useAnalyticsPreferences: () => {
|
|
33
|
+
isOptedInToAnalytics: boolean;
|
|
34
|
+
isOptedInToEnhancedAnalytics: boolean;
|
|
35
|
+
isOptedInToSessionReplay: boolean;
|
|
36
|
+
handleToggleAnalyticsOptOut: ReturnType<typeof vi.fn>;
|
|
37
|
+
handleToggleEnhancedAnalyticsOptOut: ReturnType<typeof vi.fn>;
|
|
38
|
+
handleToggleSessionReplayOptOut: ReturnType<typeof vi.fn>;
|
|
39
|
+
};
|
|
40
|
+
AnalyticsPreferencesProvider: ({ children }: {
|
|
41
|
+
children: React.ReactNode;
|
|
42
|
+
}) => React.ReactNode;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Creates a mock for AnalyticsPreferencesProvider.
|
|
46
|
+
* Used by vitest.setup.ts for global mocking.
|
|
47
|
+
*/
|
|
48
|
+
export declare function createAnalyticsPreferencesProviderMock(overrides?: {
|
|
49
|
+
isOptedInToAnalytics?: boolean;
|
|
50
|
+
isOptedInToEnhancedAnalytics?: boolean;
|
|
51
|
+
isOptedInToSessionReplay?: boolean;
|
|
52
|
+
}): AnalyticsPreferencesMock;
|
|
53
|
+
/**
|
|
54
|
+
* Creates a mock for AnalyticsPreferencesProvider with dynamic values.
|
|
55
|
+
* Use this when you need to change mock values during test execution.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* // For dynamic isOptedInToAnalytics:
|
|
59
|
+
* let mockIsOptedIn = false;
|
|
60
|
+
* vi.mock('../ui/Toolbar/context/telemetry/AnalyticsPreferencesProvider', async () => {
|
|
61
|
+
* const { createDynamicAnalyticsPreferencesProviderMock } = await import('./mocks/providers');
|
|
62
|
+
* return createDynamicAnalyticsPreferencesProviderMock({ getIsOptedInToAnalytics: () => mockIsOptedIn });
|
|
63
|
+
* });
|
|
64
|
+
*
|
|
65
|
+
* // For dynamic isOptedInToEnhancedAnalytics:
|
|
66
|
+
* vi.mock('../ui/Toolbar/context/telemetry/AnalyticsPreferencesProvider', async () => {
|
|
67
|
+
* const { createDynamicAnalyticsPreferencesProviderMock } = await import('./mocks/providers');
|
|
68
|
+
* return createDynamicAnalyticsPreferencesProviderMock({ getIsOptedInToEnhancedAnalytics: () => mockValue });
|
|
69
|
+
* });
|
|
70
|
+
*
|
|
71
|
+
* // In tests:
|
|
72
|
+
* mockIsOptedIn = true; // Changes mock behavior
|
|
73
|
+
*/
|
|
74
|
+
export declare function createDynamicAnalyticsPreferencesProviderMock(options: {
|
|
75
|
+
getIsOptedInToAnalytics?: () => boolean;
|
|
76
|
+
getIsOptedInToEnhancedAnalytics?: () => boolean;
|
|
77
|
+
getIsOptedInToSessionReplay?: () => boolean;
|
|
78
|
+
}): AnalyticsPreferencesMock;
|
|
79
|
+
/**
|
|
80
|
+
* Creates a mock for InternalClientProvider with a customizable mock LDClient.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* const mockLDClient = { track: vi.fn(), ... };
|
|
84
|
+
* vi.mock('../../ui/Toolbar/context/telemetry/InternalClientProvider', () =>
|
|
85
|
+
* createInternalClientProviderMock(mockLDClient)
|
|
86
|
+
* );
|
|
87
|
+
*/
|
|
88
|
+
export declare function createInternalClientProviderMock(mockClient?: Record<string, unknown>): {
|
|
89
|
+
useInternalClient: () => {
|
|
90
|
+
client: Record<string, unknown> | null;
|
|
91
|
+
loading: boolean;
|
|
92
|
+
error: null;
|
|
93
|
+
updateContext: ReturnType<typeof vi.fn>;
|
|
94
|
+
};
|
|
95
|
+
InternalClientProvider: ({ children }: {
|
|
96
|
+
children: React.ReactNode;
|
|
97
|
+
}) => React.ReactNode;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Creates a mock for DevServerProvider.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* vi.mock('../../ui/Toolbar/context/DevServerProvider', () =>
|
|
104
|
+
* createDevServerProviderMock({ connectionStatus: 'connected' })
|
|
105
|
+
* );
|
|
106
|
+
*/
|
|
107
|
+
export declare function createDevServerProviderMock(overrides?: {
|
|
108
|
+
sourceEnvironmentKey?: string;
|
|
109
|
+
connectionStatus?: string;
|
|
110
|
+
flags?: Record<string, unknown>;
|
|
111
|
+
isLoading?: boolean;
|
|
112
|
+
error?: Error | null;
|
|
113
|
+
}): {
|
|
114
|
+
useDevServerContext: () => {
|
|
115
|
+
state: {
|
|
116
|
+
sourceEnvironmentKey: string;
|
|
117
|
+
connectionStatus: string;
|
|
118
|
+
flags: Record<string, unknown>;
|
|
119
|
+
lastSyncTime: number;
|
|
120
|
+
isLoading: boolean;
|
|
121
|
+
error: Error | null;
|
|
122
|
+
};
|
|
123
|
+
setOverride: ReturnType<typeof vi.fn>;
|
|
124
|
+
clearOverride: ReturnType<typeof vi.fn>;
|
|
125
|
+
clearAllOverrides: ReturnType<typeof vi.fn>;
|
|
126
|
+
refresh: ReturnType<typeof vi.fn>;
|
|
127
|
+
};
|
|
128
|
+
DevServerProvider: ({ children }: {
|
|
129
|
+
children: React.ReactNode;
|
|
130
|
+
}) => React.ReactNode;
|
|
131
|
+
};
|
|
132
|
+
export {};
|
|
@@ -2,10 +2,11 @@ import React from 'react';
|
|
|
2
2
|
interface IconButtonProps {
|
|
3
3
|
icon: React.ReactNode;
|
|
4
4
|
label: string;
|
|
5
|
-
onClick: () => void;
|
|
5
|
+
onClick: (event: React.MouseEvent) => void;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
className?: string;
|
|
8
8
|
size?: 'small' | 'medium' | 'large';
|
|
9
|
+
title?: string;
|
|
9
10
|
}
|
|
10
11
|
export declare function IconButton(props: IconButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export {};
|
|
@@ -6,12 +6,13 @@ interface JsonEditorProps {
|
|
|
6
6
|
onFocus?: () => void;
|
|
7
7
|
onBlur?: (e: React.FocusEvent<HTMLDivElement>, value: string) => void;
|
|
8
8
|
onChange?: (value: string, viewUpdate: ViewUpdate) => void;
|
|
9
|
-
onLintErrors
|
|
9
|
+
onLintErrors?: (errors: Diagnostic[]) => void;
|
|
10
10
|
initialState?: {
|
|
11
11
|
startCursorAtLine?: number;
|
|
12
12
|
autoFocus?: boolean;
|
|
13
13
|
};
|
|
14
14
|
onEditorHeightChange: (height: number) => void;
|
|
15
|
+
readOnly?: boolean;
|
|
15
16
|
}
|
|
16
17
|
export declare function JsonEditor(props: JsonEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
17
18
|
export {};
|
|
@@ -2,5 +2,5 @@ interface AuthenticationModalProps {
|
|
|
2
2
|
isOpen: boolean;
|
|
3
3
|
onClose: () => void;
|
|
4
4
|
}
|
|
5
|
-
export declare function AuthenticationModal(props: AuthenticationModalProps):
|
|
5
|
+
export declare function AuthenticationModal(props: AuthenticationModalProps): null;
|
|
6
6
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type MouseEvent } from 'react';
|
|
2
2
|
interface CircleLogoProps {
|
|
3
|
-
onClick: () => void;
|
|
4
3
|
onMouseDown: (event: MouseEvent) => void;
|
|
5
4
|
}
|
|
6
|
-
export declare const CircleLogo: import("react").ForwardRefExoticComponent<CircleLogoProps & import("react").RefAttributes<
|
|
5
|
+
export declare const CircleLogo: import("react").ForwardRefExoticComponent<CircleLogoProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
6
|
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface CopyableTextProps {
|
|
2
|
+
/** The text to display and copy to clipboard */
|
|
3
|
+
text: string;
|
|
4
|
+
/** Optional callback fired after copying (useful for analytics) */
|
|
5
|
+
onCopy?: (text: string) => void;
|
|
6
|
+
/** Custom aria-label for accessibility. Defaults to "Copy {text} to clipboard" */
|
|
7
|
+
ariaLabel?: string;
|
|
8
|
+
/** Custom title tooltip. Defaults to "Copy {text} to clipboard" */
|
|
9
|
+
title?: string;
|
|
10
|
+
/** Additional CSS class name */
|
|
11
|
+
className?: string;
|
|
12
|
+
/** Custom tooltip text shown after copying. Defaults to "Copied!" */
|
|
13
|
+
copiedMessage?: string;
|
|
14
|
+
/** Duration in ms to show the copied tooltip. Defaults to 2000 */
|
|
15
|
+
copiedDuration?: number;
|
|
16
|
+
}
|
|
17
|
+
export declare function CopyableText({ text, onCopy, ariaLabel, title, className, copiedMessage, copiedDuration, }: CopyableTextProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -5,6 +5,7 @@ export interface FilterOptionsProps {
|
|
|
5
5
|
starredCount: number;
|
|
6
6
|
onClearOverrides?: () => void;
|
|
7
7
|
onClearStarred?: () => void;
|
|
8
|
+
onShareUrl?: () => void;
|
|
8
9
|
isLoading?: boolean;
|
|
9
10
|
}
|
|
10
11
|
export declare function FilterOptions(props: FilterOptionsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const loadingContainer: string;
|
|
2
|
+
export declare const loadingHeader: string;
|
|
3
|
+
export declare const headerLogo: string;
|
|
4
|
+
export declare const loadingMainContent: string;
|
|
5
|
+
export declare const loadingContent: string;
|
|
6
|
+
export declare const spinner: string;
|
|
7
|
+
export declare const loadingText: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LoadingScreen } from './LoadingScreen';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const popover: string;
|
|
2
|
+
export declare const header: string;
|
|
3
|
+
export declare const title: string;
|
|
4
|
+
export declare const content: string;
|
|
5
|
+
export declare const description: string;
|
|
6
|
+
export declare const options: string;
|
|
7
|
+
export declare const option: string;
|
|
8
|
+
export declare const optionLabel: string;
|
|
9
|
+
export declare const count: string;
|
|
10
|
+
export declare const actions: string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface ShareStateOptions {
|
|
2
|
+
includeFlagOverrides: boolean;
|
|
3
|
+
includeContexts: boolean;
|
|
4
|
+
includeSettings: boolean;
|
|
5
|
+
}
|
|
6
|
+
interface ShareStatePopoverProps {
|
|
7
|
+
isOpen: boolean;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
onShare: (options: ShareStateOptions) => void;
|
|
10
|
+
overrideCount: number;
|
|
11
|
+
contextCount: number;
|
|
12
|
+
anchorRef?: React.RefObject<HTMLElement>;
|
|
13
|
+
}
|
|
14
|
+
export declare function ShareStatePopover(props: ShareStatePopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -23,3 +23,5 @@ export { FlaskIcon } from './FlaskIcon';
|
|
|
23
23
|
export { ExternalLinkIcon } from './ExternalLinkIcon';
|
|
24
24
|
export { CursorIcon } from './CursorIcon';
|
|
25
25
|
export { InfoIcon } from './InfoIcon';
|
|
26
|
+
export { AddIcon } from './AddIcon';
|
|
27
|
+
export { ShareIcon } from './ShareIcon';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { ActionButtonsContainer } from './legacy/ActionButtonsContainer';
|
|
2
2
|
export { CircleLogo } from './CircleLogo';
|
|
3
3
|
export { ConnectionStatus } from './ConnectionStatus';
|
|
4
|
+
export { CopyableText } from './CopyableText';
|
|
4
5
|
export { DoNotTrackWarning } from './DoNotTrackWarning';
|
|
5
6
|
export { LaunchDarklyIcon } from './icons/LaunchDarklyIcon';
|
|
6
7
|
export { StatusDot } from './StatusDot';
|
|
@@ -20,6 +20,7 @@ interface ExpandedToolbarContentProps {
|
|
|
20
20
|
onHeaderMouseDown?: (event: React.MouseEvent) => void;
|
|
21
21
|
reloadOnFlagChangeIsEnabled: boolean;
|
|
22
22
|
onToggleReloadOnFlagChange: () => void;
|
|
23
|
+
onOpenAuthModal?: () => void;
|
|
23
24
|
}
|
|
24
25
|
export declare const ExpandedToolbarContentLegacy: React.ForwardRefExoticComponent<ExpandedToolbarContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
25
26
|
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const overlay: string;
|
|
2
|
+
export declare const container: string;
|
|
3
|
+
export declare const infoIcon: string;
|
|
4
|
+
export declare const content: string;
|
|
5
|
+
export declare const textContent: string;
|
|
6
|
+
export declare const title: string;
|
|
7
|
+
export declare const description: string;
|
|
8
|
+
export declare const privacyLink: string;
|
|
9
|
+
export declare const actions: string;
|
|
10
|
+
export declare const button: string;
|
|
11
|
+
export declare const primaryButton: string;
|
|
12
|
+
export declare const closeButton: string;
|
|
13
|
+
export declare const closeIcon: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AnalyticsConsentToast } from './AnalyticsConsentToast';
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export declare const container: string;
|
|
2
|
+
export declare const searchContainer: string;
|
|
3
|
+
export declare const searchDropdown: string;
|
|
4
|
+
export declare const searchDropdownFlags: string;
|
|
5
|
+
export declare const searchDropdownLeft: string;
|
|
2
6
|
export declare const actionButton: string;
|
|
3
7
|
export declare const clearButton: string;
|
|
4
8
|
export declare const icon: string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const container: string;
|
|
2
|
+
export declare const header: string;
|
|
3
|
+
export declare const title: string;
|
|
4
|
+
export declare const closeButton: string;
|
|
5
|
+
export declare const form: string;
|
|
6
|
+
export declare const field: string;
|
|
7
|
+
export declare const label: string;
|
|
8
|
+
export declare const required: string;
|
|
9
|
+
export declare const input: string;
|
|
10
|
+
export declare const jsonEditorContainer: string;
|
|
11
|
+
export declare const errorText: string;
|
|
12
|
+
export declare const actions: string;
|
|
13
|
+
export declare const cancelButton: string;
|
|
14
|
+
export declare const submitButton: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { LDContext } from 'launchdarkly-js-client-sdk';
|
|
2
|
+
interface ContextItemProps {
|
|
3
|
+
context: LDContext;
|
|
4
|
+
isActiveContext: boolean;
|
|
5
|
+
handleHeightChange?: (index: number, height: number) => void;
|
|
6
|
+
index?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const ContextItem: import("react").NamedExoticComponent<ContextItemProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const container: string;
|
|
2
|
+
export declare const header: string;
|
|
3
|
+
export declare const containerActive: string;
|
|
4
|
+
export declare const containerClickable: string;
|
|
5
|
+
export declare const info: string;
|
|
6
|
+
export declare const nameRow: string;
|
|
7
|
+
export declare const name: string;
|
|
8
|
+
export declare const keyRow: string;
|
|
9
|
+
export declare const key: string;
|
|
10
|
+
export declare const kindBadge: string;
|
|
11
|
+
export declare const anonymousBadge: string;
|
|
12
|
+
export declare const activeDot: string;
|
|
13
|
+
export declare const actions: string;
|
|
14
|
+
export declare const deleteButton: string;
|
|
15
|
+
export declare const iconButton: string;
|
|
16
|
+
export declare const expandButton: string;
|
|
17
|
+
export declare const chevron: string;
|
|
18
|
+
export declare const chevronExpanded: string;
|
|
19
|
+
export declare const editActions: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ContextList: import("react").NamedExoticComponent<object>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const container: string;
|
|
2
|
+
export declare const statsHeader: string;
|
|
3
|
+
export declare const statsText: string;
|
|
4
|
+
export declare const addButton: string;
|
|
5
|
+
export declare const scrollContainer: string;
|
|
6
|
+
export declare const virtualInner: string;
|
|
7
|
+
export declare const loadingMore: string;
|
|
8
|
+
export declare const loadingMoreText: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ContextListContent: import("react").NamedExoticComponent<object>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { MouseEvent as ReactMouseEvent } from 'react';
|
|
2
2
|
import { TabId } from '../../types/toolbar';
|
|
3
3
|
interface ExpandedToolbarContentProps {
|
|
4
4
|
onClose?: () => void;
|
|
5
|
-
onHeaderMouseDown?: (event:
|
|
5
|
+
onHeaderMouseDown?: (event: ReactMouseEvent) => void;
|
|
6
6
|
defaultActiveTab: TabId;
|
|
7
|
+
onOpenAuthModal?: () => void;
|
|
7
8
|
}
|
|
8
|
-
export declare const ExpandedToolbarContent:
|
|
9
|
+
export declare const ExpandedToolbarContent: import("react").ForwardRefExoticComponent<ExpandedToolbarContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
10
|
export {};
|
|
@@ -4,19 +4,19 @@ interface BooleanFlagControlProps {
|
|
|
4
4
|
onOverride: (value: boolean) => void;
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
}
|
|
7
|
-
export declare
|
|
7
|
+
export declare const BooleanFlagControl: import("react").NamedExoticComponent<BooleanFlagControlProps>;
|
|
8
8
|
interface MultivariateFlagControlProps {
|
|
9
9
|
flag: NormalizedFlag;
|
|
10
10
|
onOverride: (value: any) => void;
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
}
|
|
13
|
-
export declare
|
|
13
|
+
export declare const MultivariateFlagControl: import("react").NamedExoticComponent<MultivariateFlagControlProps>;
|
|
14
14
|
interface StringNumberFlagControlProps {
|
|
15
15
|
flag: NormalizedFlag;
|
|
16
16
|
onOverride: (value: string | number) => void;
|
|
17
17
|
disabled?: boolean;
|
|
18
18
|
}
|
|
19
|
-
export declare
|
|
19
|
+
export declare const StringNumberFlagControl: import("react").NamedExoticComponent<StringNumberFlagControlProps>;
|
|
20
20
|
interface ObjectFlagControlButtonsProps {
|
|
21
21
|
isEditing: boolean;
|
|
22
22
|
onEditStart: () => void;
|
|
@@ -24,7 +24,7 @@ interface ObjectFlagControlButtonsProps {
|
|
|
24
24
|
onCancel: () => void;
|
|
25
25
|
hasErrors: boolean;
|
|
26
26
|
}
|
|
27
|
-
export declare
|
|
27
|
+
export declare const ObjectFlagControlButtons: import("react").NamedExoticComponent<ObjectFlagControlButtonsProps>;
|
|
28
28
|
interface ObjectFlagEditorProps {
|
|
29
29
|
flag: NormalizedFlag;
|
|
30
30
|
isEditing: boolean;
|
|
@@ -33,5 +33,5 @@ interface ObjectFlagEditorProps {
|
|
|
33
33
|
onLintErrors: (hasErrors: boolean) => void;
|
|
34
34
|
handleHeightChange: (height: number) => void;
|
|
35
35
|
}
|
|
36
|
-
export declare
|
|
36
|
+
export declare const ObjectFlagEditor: import("react").NamedExoticComponent<ObjectFlagEditorProps>;
|
|
37
37
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { NormalizedFlag } from './types';
|
|
2
3
|
interface FlagItemProps {
|
|
3
4
|
flag: NormalizedFlag;
|
|
@@ -7,5 +8,5 @@ interface FlagItemProps {
|
|
|
7
8
|
disabled?: boolean;
|
|
8
9
|
index: number;
|
|
9
10
|
}
|
|
10
|
-
export declare
|
|
11
|
+
export declare const FlagItem: React.NamedExoticComponent<FlagItemProps>;
|
|
11
12
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare const FlagListContent: import("react").NamedExoticComponent<object>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function PrivacySettings(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const button: string;
|