@sheetxl/utils-react 0.7.22 → 0.7.23-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/cjs/C7jPCqFJNiWyD2pr.cjs +1 -0
- package/browser/cjs/CyWMySHsu-RvsIGs.cjs +1 -0
- package/browser/cjs/DZSvmqU8nRas1uz6.cjs +1 -0
- package/browser/cjs/index.cjs +5 -7
- package/browser/esm/BlY25fmBdmHNyBqo.mjs +139 -0
- package/browser/esm/CQUN3sZz7IrPMYIa.mjs +2171 -0
- package/browser/esm/DpI3aVOBON4B0xID.mjs +390 -0
- package/browser/esm/index.mjs +6128 -1806
- package/licenses/dependencies.txt +246 -39
- package/node/esm/B8EaqTMia4qMXy5z.mjs +139 -0
- package/node/esm/D9Xo9E4JB3ReeH-J.mjs +2171 -0
- package/node/esm/index.mjs +5141 -1774
- package/package.json +8 -5
- package/types/index.d.ts +2 -2043
- package/types/src/animation/AnimationModeContext.d.ts +10 -0
- package/types/src/animation/AnimationModeContext.d.ts.map +1 -0
- package/types/src/animation/index.d.ts +3 -0
- package/types/src/animation/index.d.ts.map +1 -0
- package/types/src/animation/useAnimatedMeasure.d.ts +39 -0
- package/types/src/animation/useAnimatedMeasure.d.ts.map +1 -0
- package/types/src/command/ActivationTracker.d.ts +53 -0
- package/types/src/command/ActivationTracker.d.ts.map +1 -0
- package/types/src/command/CommandAnchorProvider.d.ts +64 -0
- package/types/src/command/CommandAnchorProvider.d.ts.map +1 -0
- package/types/src/command/CommandButtonEntryLabel.d.ts +25 -0
- package/types/src/command/CommandButtonEntryLabel.d.ts.map +1 -0
- package/types/src/command/CommandButtonRegistry.d.ts +159 -0
- package/types/src/command/CommandButtonRegistry.d.ts.map +1 -0
- package/types/src/command/CommandButtonRegistryContext.d.ts +35 -0
- package/types/src/command/CommandButtonRegistryContext.d.ts.map +1 -0
- package/types/src/command/CommandCatalog.d.ts +155 -0
- package/types/src/command/CommandCatalog.d.ts.map +1 -0
- package/types/src/command/CommandCatalogResource.d.ts +7 -0
- package/types/src/command/CommandCatalogResource.d.ts.map +1 -0
- package/types/src/command/CommandCatalogService.d.ts +61 -0
- package/types/src/command/CommandCatalogService.d.ts.map +1 -0
- package/types/src/command/CommandChainContext.d.ts +32 -0
- package/types/src/command/CommandChainContext.d.ts.map +1 -0
- package/types/src/command/CommandFallbackContext.d.ts +30 -0
- package/types/src/command/CommandFallbackContext.d.ts.map +1 -0
- package/types/src/command/CommandFocusContext.d.ts +21 -0
- package/types/src/command/CommandFocusContext.d.ts.map +1 -0
- package/types/src/command/CommandRegistry.d.ts +164 -0
- package/types/src/command/CommandRegistry.d.ts.map +1 -0
- package/types/src/command/CommandRegistryContext.d.ts +16 -0
- package/types/src/command/CommandRegistryContext.d.ts.map +1 -0
- package/types/src/command/CommandResolver.d.ts +162 -0
- package/types/src/command/CommandResolver.d.ts.map +1 -0
- package/types/src/command/CommandScope.d.ts +343 -0
- package/types/src/command/CommandScope.d.ts.map +1 -0
- package/types/src/command/CommandScopeContext.d.ts +205 -0
- package/types/src/command/CommandScopeContext.d.ts.map +1 -0
- package/types/src/command/FocusActivation.d.ts +140 -0
- package/types/src/command/FocusActivation.d.ts.map +1 -0
- package/types/src/command/ICommand.d.ts +31 -0
- package/types/src/command/ICommand.d.ts.map +1 -0
- package/types/src/command/ICommandDefinition.d.ts +82 -0
- package/types/src/command/ICommandDefinition.d.ts.map +1 -0
- package/types/src/command/KeyBindingDispatcher.d.ts +150 -0
- package/types/src/command/KeyBindingDispatcher.d.ts.map +1 -0
- package/types/src/command/LayerActivation.d.ts +45 -0
- package/types/src/command/LayerActivation.d.ts.map +1 -0
- package/types/src/command/Types.d.ts +80 -0
- package/types/src/command/Types.d.ts.map +1 -0
- package/types/src/command/createResolvedCommand.d.ts +91 -0
- package/types/src/command/createResolvedCommand.d.ts.map +1 -0
- package/types/src/command/index.d.ts +26 -0
- package/types/src/command/index.d.ts.map +1 -0
- package/types/src/command/reduceDefinitions.d.ts +33 -0
- package/types/src/command/reduceDefinitions.d.ts.map +1 -0
- package/types/src/command/useCommands.d.ts +22 -0
- package/types/src/command/useCommands.d.ts.map +1 -0
- package/types/src/command/useContributeCommands.d.ts +18 -0
- package/types/src/command/useContributeCommands.d.ts.map +1 -0
- package/types/src/components/FocusKeyNavigation.d.ts +22 -0
- package/types/src/components/FocusKeyNavigation.d.ts.map +1 -0
- package/types/src/components/ITooltip.d.ts +38 -0
- package/types/src/components/ITooltip.d.ts.map +1 -0
- package/types/src/components/RoundedTab.d.ts +26 -0
- package/types/src/components/RoundedTab.d.ts.map +1 -0
- package/types/src/components/index.d.ts +4 -0
- package/types/src/components/index.d.ts.map +1 -0
- package/types/src/error/ErrorPanel.d.ts +14 -0
- package/types/src/error/ErrorPanel.d.ts.map +1 -0
- package/types/src/error/ReactErrorBoundary.d.ts +7 -0
- package/types/src/error/ReactErrorBoundary.d.ts.map +1 -0
- package/types/src/error/UncaughtErrorBoundary.d.ts +5 -0
- package/types/src/error/UncaughtErrorBoundary.d.ts.map +1 -0
- package/types/src/error/index.d.ts +4 -0
- package/types/src/error/index.d.ts.map +1 -0
- package/types/src/float/FloatPanel.d.ts +57 -0
- package/types/src/float/FloatPanel.d.ts.map +1 -0
- package/types/src/float/FloatPopper.d.ts +85 -0
- package/types/src/float/FloatPopper.d.ts.map +1 -0
- package/types/src/float/FloatPopup.d.ts +19 -0
- package/types/src/float/FloatPopup.d.ts.map +1 -0
- package/types/src/float/FloatProvider.d.ts +60 -0
- package/types/src/float/FloatProvider.d.ts.map +1 -0
- package/types/src/float/FloatStackContext.d.ts +25 -0
- package/types/src/float/FloatStackContext.d.ts.map +1 -0
- package/types/src/float/FloatTooltip.d.ts +22 -0
- package/types/src/float/FloatTooltip.d.ts.map +1 -0
- package/types/src/float/FloatUtils.d.ts +55 -0
- package/types/src/float/FloatUtils.d.ts.map +1 -0
- package/types/src/float/_FloatUtils.d.ts +51 -0
- package/types/src/float/_FloatUtils.d.ts.map +1 -0
- package/types/src/float/index.d.ts +9 -0
- package/types/src/float/index.d.ts.map +1 -0
- package/types/src/float/useFloatStack.d.ts +92 -0
- package/types/src/float/useFloatStack.d.ts.map +1 -0
- package/types/src/hooks/LanguageState.d.ts +15 -0
- package/types/src/hooks/LanguageState.d.ts.map +1 -0
- package/types/src/hooks/index.d.ts +19 -0
- package/types/src/hooks/index.d.ts.map +1 -0
- package/types/src/hooks/useBoundSyncExternalStore.d.ts +23 -0
- package/types/src/hooks/useBoundSyncExternalStore.d.ts.map +1 -0
- package/types/src/hooks/useCallbackRef.d.ts +11 -0
- package/types/src/hooks/useCallbackRef.d.ts.map +1 -0
- package/types/src/hooks/useDevicePixelRatio.d.ts +37 -0
- package/types/src/hooks/useDevicePixelRatio.d.ts.map +1 -0
- package/types/src/hooks/useEditMode.d.ts +66 -0
- package/types/src/hooks/useEditMode.d.ts.map +1 -0
- package/types/src/hooks/useGlobalClipboard.d.ts +7 -0
- package/types/src/hooks/useGlobalClipboard.d.ts.map +1 -0
- package/types/src/hooks/useId.d.ts +9 -0
- package/types/src/hooks/useId.d.ts.map +1 -0
- package/types/src/hooks/useImperativeElement.d.ts +3 -0
- package/types/src/hooks/useImperativeElement.d.ts.map +1 -0
- package/types/src/hooks/useLanguage.d.ts +13 -0
- package/types/src/hooks/useLanguage.d.ts.map +1 -0
- package/types/src/hooks/useMouseDownAndHoldListener.d.ts +13 -0
- package/types/src/hooks/useMouseDownAndHoldListener.d.ts.map +1 -0
- package/types/src/hooks/useNotifier.d.ts +330 -0
- package/types/src/hooks/useNotifier.d.ts.map +1 -0
- package/types/src/hooks/useOnClickOrFocusAway.d.ts +8 -0
- package/types/src/hooks/useOnClickOrFocusAway.d.ts.map +1 -0
- package/types/src/hooks/useOptionalBoundSyncExternalStore.d.ts +20 -0
- package/types/src/hooks/useOptionalBoundSyncExternalStore.d.ts.map +1 -0
- package/types/src/hooks/useOptionalSyncExternalStore.d.ts +18 -0
- package/types/src/hooks/useOptionalSyncExternalStore.d.ts.map +1 -0
- package/types/src/hooks/useSynchronizedPointerHandler.d.ts +54 -0
- package/types/src/hooks/useSynchronizedPointerHandler.d.ts.map +1 -0
- package/types/src/hooks/useTextareaCaretRect.d.ts +85 -0
- package/types/src/hooks/useTextareaCaretRect.d.ts.map +1 -0
- package/types/src/hooks/useTraceUpdate.d.ts +2 -0
- package/types/src/hooks/useTraceUpdate.d.ts.map +1 -0
- package/types/src/hooks/useTranslator.d.ts +32 -0
- package/types/src/hooks/useTranslator.d.ts.map +1 -0
- package/types/src/icons/DynamicIcon.d.ts +17 -0
- package/types/src/icons/DynamicIcon.d.ts.map +1 -0
- package/types/src/icons/DynamicIconService.d.ts +39 -0
- package/types/src/icons/DynamicIconService.d.ts.map +1 -0
- package/types/src/icons/ErrorIcon.d.ts +6 -0
- package/types/src/icons/ErrorIcon.d.ts.map +1 -0
- package/types/src/icons/Types.d.ts +81 -0
- package/types/src/icons/Types.d.ts.map +1 -0
- package/types/src/icons/WalkingIcon.d.ts +27 -0
- package/types/src/icons/WalkingIcon.d.ts.map +1 -0
- package/types/src/icons/_Utils.d.ts +3 -0
- package/types/src/icons/_Utils.d.ts.map +1 -0
- package/types/src/icons/index.d.ts +5 -0
- package/types/src/icons/index.d.ts.map +1 -0
- package/types/src/icons/packs/Base.d.ts +4 -0
- package/types/src/icons/packs/Base.d.ts.map +1 -0
- package/types/src/icons/packs/Conditional.d.ts +4 -0
- package/types/src/icons/packs/Conditional.d.ts.map +1 -0
- package/types/src/index.d.ts +18 -0
- package/types/src/index.d.ts.map +1 -0
- package/types/src/loading/LoadingPanel.d.ts +31 -0
- package/types/src/loading/LoadingPanel.d.ts.map +1 -0
- package/types/src/loading/index.d.ts +2 -0
- package/types/src/loading/index.d.ts.map +1 -0
- package/types/src/persistence/InMemoryStore.d.ts +12 -0
- package/types/src/persistence/InMemoryStore.d.ts.map +1 -0
- package/types/src/persistence/LocalStorageStore.d.ts +15 -0
- package/types/src/persistence/LocalStorageStore.d.ts.map +1 -0
- package/types/src/persistence/PersistenceStateProvider.d.ts +3 -0
- package/types/src/persistence/PersistenceStateProvider.d.ts.map +1 -0
- package/types/src/persistence/Types.d.ts +95 -0
- package/types/src/persistence/Types.d.ts.map +1 -0
- package/types/src/persistence/_Context.d.ts +9 -0
- package/types/src/persistence/_Context.d.ts.map +1 -0
- package/types/src/persistence/index.d.ts +6 -0
- package/types/src/persistence/index.d.ts.map +1 -0
- package/types/src/persistence/usePersistenceState.d.ts +33 -0
- package/types/src/persistence/usePersistenceState.d.ts.map +1 -0
- package/types/src/react-resizable/Resizable.d.ts +30 -0
- package/types/src/react-resizable/Resizable.d.ts.map +1 -0
- package/types/src/react-resizable/ResizableBox.d.ts +18 -0
- package/types/src/react-resizable/ResizableBox.d.ts.map +1 -0
- package/types/src/react-resizable/index.d.ts +11 -0
- package/types/src/react-resizable/index.d.ts.map +1 -0
- package/types/src/react-resizable/propTypes.d.ts +56 -0
- package/types/src/react-resizable/propTypes.d.ts.map +1 -0
- package/types/src/react-resizable/utils.d.ts +3 -0
- package/types/src/react-resizable/utils.d.ts.map +1 -0
- package/types/src/scroll/AxisViewport.d.ts +73 -0
- package/types/src/scroll/AxisViewport.d.ts.map +1 -0
- package/types/src/scroll/IScrollPane.d.ts +63 -0
- package/types/src/scroll/IScrollPane.d.ts.map +1 -0
- package/types/src/scroll/IScrollbar.d.ts +94 -0
- package/types/src/scroll/IScrollbar.d.ts.map +1 -0
- package/types/src/scroll/NativeScrollbar.d.ts +7 -0
- package/types/src/scroll/NativeScrollbar.d.ts.map +1 -0
- package/types/src/scroll/ScrollButton.d.ts +29 -0
- package/types/src/scroll/ScrollButton.d.ts.map +1 -0
- package/types/src/scroll/ScrollPane.d.ts +4 -0
- package/types/src/scroll/ScrollPane.d.ts.map +1 -0
- package/types/src/scroll/Scrollbar.d.ts +4 -0
- package/types/src/scroll/Scrollbar.d.ts.map +1 -0
- package/types/src/scroll/TouchThumbContext.d.ts +93 -0
- package/types/src/scroll/TouchThumbContext.d.ts.map +1 -0
- package/types/src/scroll/TouchThumbHandle.d.ts +64 -0
- package/types/src/scroll/TouchThumbHandle.d.ts.map +1 -0
- package/types/src/scroll/TrackDrag.d.ts +107 -0
- package/types/src/scroll/TrackDrag.d.ts.map +1 -0
- package/types/src/scroll/Utils.d.ts +8 -0
- package/types/src/scroll/Utils.d.ts.map +1 -0
- package/types/src/scroll/Viewport.d.ts +285 -0
- package/types/src/scroll/Viewport.d.ts.map +1 -0
- package/types/src/scroll/VirtualScrollbar.d.ts +49 -0
- package/types/src/scroll/VirtualScrollbar.d.ts.map +1 -0
- package/types/src/scroll/index.d.ts +14 -0
- package/types/src/scroll/index.d.ts.map +1 -0
- package/types/src/scroll/scrollbarTheming.d.ts +27 -0
- package/types/src/scroll/scrollbarTheming.d.ts.map +1 -0
- package/types/src/scroll/useWheelScroll.d.ts +27 -0
- package/types/src/scroll/useWheelScroll.d.ts.map +1 -0
- package/types/src/scroller/Scroller.d.ts +260 -0
- package/types/src/scroller/Scroller.d.ts.map +1 -0
- package/types/src/scroller/animate.d.ts +30 -0
- package/types/src/scroller/animate.d.ts.map +1 -0
- package/types/src/scroller/index.d.ts +2 -0
- package/types/src/scroller/index.d.ts.map +1 -0
- package/types/src/singletonHook/components/SingleItemContainer.d.ts +6 -0
- package/types/src/singletonHook/components/SingleItemContainer.d.ts.map +1 -0
- package/types/src/singletonHook/components/SingletonHooksContainer.d.ts +7 -0
- package/types/src/singletonHook/components/SingletonHooksContainer.d.ts.map +1 -0
- package/types/src/singletonHook/index.d.ts +11 -0
- package/types/src/singletonHook/index.d.ts.map +1 -0
- package/types/src/singletonHook/singletonHook.d.ts +6 -0
- package/types/src/singletonHook/singletonHook.d.ts.map +1 -0
- package/types/src/singletonHook/utils/env.d.ts +4 -0
- package/types/src/singletonHook/utils/env.d.ts.map +1 -0
- package/types/src/singletonHook/utils/env.native.d.ts +1 -0
- package/types/src/singletonHook/utils/env.native.d.ts.map +1 -0
- package/types/src/singletonHook/utils/warning.d.ts +2 -0
- package/types/src/singletonHook/utils/warning.d.ts.map +1 -0
- package/types/src/splitPane/SplitPane.d.ts +91 -0
- package/types/src/splitPane/SplitPane.d.ts.map +1 -0
- package/types/src/splitPane/SplitPaneResizer.d.ts +11 -0
- package/types/src/splitPane/SplitPaneResizer.d.ts.map +1 -0
- package/types/src/splitPane/index.d.ts +3 -0
- package/types/src/splitPane/index.d.ts.map +1 -0
- package/types/src/theme/TokenTheme.d.ts +196 -0
- package/types/src/theme/TokenTheme.d.ts.map +1 -0
- package/types/src/theme/TokenThemeProvider.d.ts +97 -0
- package/types/src/theme/TokenThemeProvider.d.ts.map +1 -0
- package/types/src/theme/buildThemeCSS.d.ts +54 -0
- package/types/src/theme/buildThemeCSS.d.ts.map +1 -0
- package/types/src/theme/createThemeVars.d.ts +15 -0
- package/types/src/theme/createThemeVars.d.ts.map +1 -0
- package/types/src/theme/defaultTheme.d.ts +15 -0
- package/types/src/theme/defaultTheme.d.ts.map +1 -0
- package/types/src/theme/index.d.ts +9 -0
- package/types/src/theme/index.d.ts.map +1 -0
- package/types/src/theme/resolveTokens.d.ts +21 -0
- package/types/src/theme/resolveTokens.d.ts.map +1 -0
- package/types/src/theme/themeAttrs.d.ts +32 -0
- package/types/src/theme/themeAttrs.d.ts.map +1 -0
- package/types/src/theme/useResolvedThemeMode.d.ts +17 -0
- package/types/src/theme/useResolvedThemeMode.d.ts.map +1 -0
- package/types/src/types/Types.d.ts +71 -0
- package/types/src/types/Types.d.ts.map +1 -0
- package/types/src/types/index.d.ts +2 -0
- package/types/src/types/index.d.ts.map +1 -0
- package/types/src/utils/FullScreenPortal.d.ts +6 -0
- package/types/src/utils/FullScreenPortal.d.ts.map +1 -0
- package/types/src/utils/PinchZoom.d.ts +3 -0
- package/types/src/utils/PinchZoom.d.ts.map +1 -0
- package/types/src/utils/ReactUtils.d.ts +134 -0
- package/types/src/utils/ReactUtils.d.ts.map +1 -0
- package/types/src/utils/index.d.ts +4 -0
- package/types/src/utils/index.d.ts.map +1 -0
- package/types/src/utils/useFullScreen.d.ts +47 -0
- package/types/src/utils/useFullScreen.d.ts.map +1 -0
- package/browser/cjs/O75UN37bxYdOt58p.cjs +0 -6
- package/browser/esm/r7vPXPCC6zFI-B4m.mjs +0 -12
- package/node/assets/style.css +0 -1
- package/node/esm/CJ8rg6a2gULy0991.mjs +0 -12
package/types/index.d.ts
CHANGED
|
@@ -1,2043 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { DefaultNotifier } from '@sheetxl/utils';
|
|
4
|
-
import { DependencyList } from 'react';
|
|
5
|
-
import { Direction } from '@sheetxl/utils';
|
|
6
|
-
import { EditModeHandler } from '@sheetxl/utils';
|
|
7
|
-
import { INotifier } from '@sheetxl/utils';
|
|
8
|
-
import { JSX } from 'react/jsx-runtime';
|
|
9
|
-
import { NotifierOptions } from '@sheetxl/utils';
|
|
10
|
-
import { ReactNode } from 'react';
|
|
11
|
-
import { ReferenceableClipboard } from '@sheetxl/utils';
|
|
12
|
-
import { RemoveListener } from '@sheetxl/utils';
|
|
13
|
-
import { Size } from '@sheetxl/utils';
|
|
14
|
-
import { TopLeft } from '@sheetxl/utils';
|
|
15
|
-
import { UndoManager } from '@sheetxl/utils';
|
|
16
|
-
|
|
17
|
-
declare type BaseGlyph = {
|
|
18
|
-
tags?: string[];
|
|
19
|
-
rtlMirror?: boolean;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
declare function boundPixel(cssPoint: number, _increase?: boolean, _absOffset?: number): number;
|
|
23
|
-
|
|
24
|
-
export declare type CellFinder = (activeCoords: CellCoords, isContentfulCell: IsContentfulCell | undefined, hiddenAt: HiddenHeadersAt | undefined, direction: Direction, first: boolean, limit: number) => number;
|
|
25
|
-
|
|
26
|
-
export declare type ClickOrFocusAwayListener = (event: globalThis.MouseEvent | globalThis.KeyboardEvent) => void;
|
|
27
|
-
|
|
28
|
-
export declare interface ClickOrFocusAwayOptions {
|
|
29
|
-
mouseEvents?: boolean;
|
|
30
|
-
focusEvents?: boolean;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* A default implementation of ICommand
|
|
35
|
-
*/
|
|
36
|
-
export declare class Command<STATE extends any = void, CONTEXT extends any = void> implements ICommand<STATE, CONTEXT> {
|
|
37
|
-
protected _key: string;
|
|
38
|
-
protected _target: ICommand.ITarget | (() => ICommand.ITarget);
|
|
39
|
-
protected _label: ICommand.DynamicValue<string, CONTEXT>;
|
|
40
|
-
protected _scopedLabels?: Record<string, ICommand.DynamicValue<string, CONTEXT>>;
|
|
41
|
-
protected _description?: ICommand.DynamicValue<string, CONTEXT>;
|
|
42
|
-
protected _icon: ICommand.DynamicValue<React.ReactElement | string, CONTEXT>;
|
|
43
|
-
protected _tags: ICommand.DynamicValue<string[], CONTEXT>;
|
|
44
|
-
protected _shortcut: ICommand.DynamicValue<IKeyStroke | IKeyStroke[] | null, CONTEXT>;
|
|
45
|
-
protected _disabled: ICommand.DynamicValue<boolean, CONTEXT>;
|
|
46
|
-
protected _state: STATE;
|
|
47
|
-
protected _context: CONTEXT;
|
|
48
|
-
protected _callback: ICommand.Callback<STATE>;
|
|
49
|
-
protected _listenersProperties: Set<ICommand.PropertyListener<STATE, CONTEXT>>;
|
|
50
|
-
protected _listenersExecute: Set<ICommand.Hook<STATE, CONTEXT>>;
|
|
51
|
-
constructor(key: string, target: ICommand.ITarget | (() => ICommand.ITarget) | null, props?: ICommand.Properties<STATE, CONTEXT>, callback?: ICommand.Callback<STATE>);
|
|
52
|
-
/** @inheritdoc ICommand.getKey */
|
|
53
|
-
getKey(): string;
|
|
54
|
-
protected _resolve<T = any>(value: ICommand.DynamicValue<T, CONTEXT>, scopedContext?: CONTEXT | (() => CONTEXT)): T;
|
|
55
|
-
/** @inheritdoc ICommand.getTarget */
|
|
56
|
-
getTarget(): ICommand.ITarget;
|
|
57
|
-
/** @inheritdoc ICommand.getLabel */
|
|
58
|
-
getLabel(scope?: string, scopedContext?: CONTEXT): string;
|
|
59
|
-
/** @inheritdoc ICommand.getDescription */
|
|
60
|
-
getDescription(context?: ICommand.DynamicContext<CONTEXT>): string;
|
|
61
|
-
/** @inheritdoc ICommand.getTags */
|
|
62
|
-
getTags(context?: ICommand.DynamicContext<CONTEXT>): string[];
|
|
63
|
-
/** @inheritdoc ICommand.getIcon */
|
|
64
|
-
getIcon(context?: ICommand.DynamicContext<CONTEXT>): React.ReactElement | string;
|
|
65
|
-
/** @inheritdoc ICommand.getShortcut */
|
|
66
|
-
getShortcut(): IKeyStroke | readonly IKeyStroke[];
|
|
67
|
-
/** @inheritdoc ICommand.disabled */
|
|
68
|
-
disabled(): boolean;
|
|
69
|
-
/** @inheritdoc ICommand.getState */
|
|
70
|
-
getState(): STATE;
|
|
71
|
-
/** @inheritdoc ICommand.getContext */
|
|
72
|
-
getContext(): CONTEXT;
|
|
73
|
-
/** @inheritdoc ICommand.execute */
|
|
74
|
-
execute(args: STATE, hook?: ICommand.Hook<STATE, CONTEXT>): Promise<boolean>;
|
|
75
|
-
/** @inheritdoc ICommand.addPropertyListener */
|
|
76
|
-
addPropertyListener(listener: ICommand.PropertyListener<STATE, CONTEXT>, fireOnListen?: boolean): RemoveListener;
|
|
77
|
-
/** @inheritdoc ICommand.addExecuteListener */
|
|
78
|
-
addExecuteListener(listener: ICommand.Hook<STATE, CONTEXT>): RemoveListener;
|
|
79
|
-
protected _notifyExecute(args: STATE): void;
|
|
80
|
-
protected _notifyError(error: any, args: STATE): void;
|
|
81
|
-
/** @inheritdoc ICommand.updateCallback */
|
|
82
|
-
updateCallback(callback: ICommand.Callback<STATE>): ICommand<STATE, CONTEXT>;
|
|
83
|
-
/** @inheritdoc ICommand.update */
|
|
84
|
-
update(props: ICommand.Properties<STATE, CONTEXT>): ICommand<STATE, CONTEXT>;
|
|
85
|
-
protected _notifyPropertyChange(props: ICommand.Properties<STATE, CONTEXT>): void;
|
|
86
|
-
protected _applyProps(props: ICommand.Properties<STATE, CONTEXT>): ICommand.Properties<STATE, CONTEXT>;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export declare interface CommandButtonOptions<STATE = any, CONTEXT = any> extends Omit<React.HTMLAttributes<HTMLElement>, "color" | "label"> {
|
|
90
|
-
/**
|
|
91
|
-
* Allow for listeners against a specific buttons execute rather then the command.
|
|
92
|
-
* Useful when knowing the specific button that executed a command is required.
|
|
93
|
-
* (For example when closing menus or restoring focus)
|
|
94
|
-
*/
|
|
95
|
-
commandHook?: ICommand.Hook<STATE, CONTEXT>;
|
|
96
|
-
/**
|
|
97
|
-
* Optional string to enable the command label to be configured based on the scope of how it is being used.
|
|
98
|
-
*/
|
|
99
|
-
scope?: string;
|
|
100
|
-
icon?: React.ReactNode | ((command: ICommand) => React.ReactNode);
|
|
101
|
-
label?: React.ReactNode | ((command: ICommand) => React.ReactNode);
|
|
102
|
-
/**
|
|
103
|
-
* The shortcut to display.
|
|
104
|
-
*
|
|
105
|
-
* @remarks
|
|
106
|
-
* This is display only and doesn't actually track the shortcut.
|
|
107
|
-
* Override the display for the shortcut on the command (if available).
|
|
108
|
-
*/
|
|
109
|
-
shortcut?: IKeyStroke | IKeyStroke[];
|
|
110
|
-
selected?: boolean;
|
|
111
|
-
disabled?: boolean;
|
|
112
|
-
disableHover?: boolean;
|
|
113
|
-
/**
|
|
114
|
-
* Tooltip properties. If this is specified then the tooltips are used.
|
|
115
|
-
* Do not provide a child as this component will be the child.
|
|
116
|
-
*/
|
|
117
|
-
propsTooltip?: any;
|
|
118
|
-
/**
|
|
119
|
-
* How the button will be styles.
|
|
120
|
-
* @defaultValue CommandButtonType.Toolbar
|
|
121
|
-
*/
|
|
122
|
-
variant?: CommandButtonType;
|
|
123
|
-
/**
|
|
124
|
-
* Optional state for this specific command button.
|
|
125
|
-
* @defaultValue to undefined
|
|
126
|
-
*/
|
|
127
|
-
commandState?: STATE;
|
|
128
|
-
context?: CONTEXT;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
export declare interface CommandButtonProps<STATE = any, CONTEXT = any> extends CommandButtonOptions {
|
|
132
|
-
command: ICommand<STATE, CONTEXT>;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export declare type CommandButtonRefAttribute = {
|
|
136
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Follow useCommandsButtons. pattern createCommandButtonSet
|
|
141
|
-
*
|
|
142
|
-
* Use ProviderContext or just set a singleton. (research why/which)
|
|
143
|
-
*
|
|
144
|
-
* Register icon, label, description
|
|
145
|
-
* { commandManager.createButton( commands.getCommand('formatAlignLeftToggle'), CommandButtonType.TOOLBAR ) }
|
|
146
|
-
*
|
|
147
|
-
* Register factory for each type of Command
|
|
148
|
-
* Register configuration for each key
|
|
149
|
-
*
|
|
150
|
-
* When registering to a component also
|
|
151
|
-
*
|
|
152
|
-
*/
|
|
153
|
-
export declare const CommandButtonType: {
|
|
154
|
-
/**
|
|
155
|
-
* Suitable for toolbars. Click to open, click to close, generally disabled as icon
|
|
156
|
-
*/
|
|
157
|
-
readonly Toolbar: "toolbar";
|
|
158
|
-
/**
|
|
159
|
-
* Suitable for menus. HoverIn to open, hover leave to close, generally disabled as icon and text
|
|
160
|
-
*/
|
|
161
|
-
readonly Menuitem: "menuitem";
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
export declare type CommandButtonType = typeof CommandButtonType[keyof typeof CommandButtonType];
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Default implementation of `ICommands.IGroup`.
|
|
168
|
-
*/
|
|
169
|
-
export declare class CommandGroup implements ICommands.IGroup {
|
|
170
|
-
protected _target: ICommand.ITarget | (() => ICommand.ITarget);
|
|
171
|
-
protected _groupKey: string;
|
|
172
|
-
protected _root: CommandGroup | null;
|
|
173
|
-
protected _parent: CommandGroup | null;
|
|
174
|
-
protected _focused: CommandGroup;
|
|
175
|
-
protected _nodes: Map<string, CommandGroup>;
|
|
176
|
-
protected _uuid: string;
|
|
177
|
-
protected _children: Map<string, ICommands.IGroup>;
|
|
178
|
-
protected _commandsByKey: Map<string, ICommand<any, any>>;
|
|
179
|
-
protected _commandsByShortcut: Map<string, string>;
|
|
180
|
-
protected _listeners: Set<ICommands.IListener>;
|
|
181
|
-
protected _listenersByKey: Map<string, Set<ICommands.IListener> | null>;
|
|
182
|
-
protected _unListenersByCommand: Map<ICommand, RemoveListener>;
|
|
183
|
-
protected _commandsPropertyListener: ICommand.PropertyListener<any, any>;
|
|
184
|
-
constructor(target: ICommand.ITarget | (() => ICommand.ITarget), groupKey?: string);
|
|
185
|
-
private _getCommand;
|
|
186
|
-
/** {@inheritDoc ICommands.IGroup.getCommand} */
|
|
187
|
-
getCommand(key: string, _ignoreActive?: boolean): ICommand<any, any>;
|
|
188
|
-
/** {@inheritDoc ICommands.IGroup.createChildGroup} */
|
|
189
|
-
createChildGroup(target: ICommand.ITarget | (() => ICommand.ITarget), when: string, replace?: boolean): ICommands.IGroup;
|
|
190
|
-
/** {@inheritDoc ICommands.IGroup.getKey} */
|
|
191
|
-
getKey(): string;
|
|
192
|
-
/** {@inheritDoc ICommands.IGroup.getGroup} */
|
|
193
|
-
getGroup(key: string): ICommands.IGroup | null;
|
|
194
|
-
protected _addCommands(commands: readonly ICommand<any, any>[], replace?: boolean): void;
|
|
195
|
-
/** {@inheritDoc ICommands.IGroup.removeFromParent} */
|
|
196
|
-
removeFromParent(): void;
|
|
197
|
-
/** {@inheritDoc ICommands.IGroup.addCommands} */
|
|
198
|
-
addCommands(commands: readonly ICommand<any, any>[], replace?: boolean): void;
|
|
199
|
-
/** {@inheritDoc ICommands.IGroup.getActive} */
|
|
200
|
-
getActive(): ICommands.IGroup;
|
|
201
|
-
/** {@inheritDoc ICommands.IGroup.activate} */
|
|
202
|
-
activate(groupKey?: string): void;
|
|
203
|
-
/** {@inheritDoc ICommands.IGroup.findCommandByEvent} */
|
|
204
|
-
findCommandByEvent(e: React.KeyboardEvent): ICommand | null;
|
|
205
|
-
/** {@inheritDoc ICommands.IGroup.dispatchToFocusedCommand} */
|
|
206
|
-
dispatchToFocusedCommand(e: React.KeyboardEvent): boolean;
|
|
207
|
-
/** {@inheritDoc ICommands.IGroup.getRoot} */
|
|
208
|
-
getRoot(): ICommands.IGroup;
|
|
209
|
-
/** {@inheritDoc ICommands.IGroup.getParent} */
|
|
210
|
-
getParent(): ICommands.IGroup | null;
|
|
211
|
-
/** {@inheritDoc ICommands.IGroup.addListener} */
|
|
212
|
-
addListener(listener: ICommands.IListener, options?: ICommands.IListenerOptions): RemoveListener;
|
|
213
|
-
protected _notifyCommands(listeners: Set<ICommands.IListener>, key: keyof ICommands.IListener, args?: any): void;
|
|
214
|
-
protected _notify(key: keyof ICommands.IListener, args?: any): void;
|
|
215
|
-
/** {@inheritDoc ICommands.IGroup.getAllCommands} */
|
|
216
|
-
getAllCommands(): {
|
|
217
|
-
command: ICommand<any, any>;
|
|
218
|
-
groupKey: string;
|
|
219
|
-
}[];
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
export declare interface CopyPasteProps {
|
|
223
|
-
source: ReferenceableClipboard.Source;
|
|
224
|
-
target?: ReferenceableClipboard.Target;
|
|
225
|
-
commands?: ICommands.IGroup;
|
|
226
|
-
/**
|
|
227
|
-
* Called when the clipboard is updated.
|
|
228
|
-
* @param reference If `null` then the clipboard was cleared.
|
|
229
|
-
*/
|
|
230
|
-
onClipboardUpdate?: (reference: ReferenceableClipboard.ReferenceItem | null) => void;
|
|
231
|
-
/**
|
|
232
|
-
* Called after paste has been called.
|
|
233
|
-
*/
|
|
234
|
-
onPaste?: (reference: ReferenceableClipboard.ReferenceItem, args: ReferenceableClipboard.PasteOptions) => void;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
export declare interface CopyPasteResults {
|
|
238
|
-
copy: (args?: ReferenceableClipboard.CopyOptions) => void;
|
|
239
|
-
paste: (args?: ReferenceableClipboard.PasteOptions) => void;
|
|
240
|
-
/**
|
|
241
|
-
* The clipboard used. Generally the `InternalClipboard.Global`.
|
|
242
|
-
*/
|
|
243
|
-
clipboard: ReferenceableClipboard;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
export declare function createDynamicIconService(): {
|
|
247
|
-
register: (key: IconPackKey, packOrLoader: IconPack | IconPackInput | PackLoader) => void;
|
|
248
|
-
prefetch: (keys?: IconPackKey | IconPackKey[]) => Promise<void>;
|
|
249
|
-
setActive: (packKey: IconPackKey) => void;
|
|
250
|
-
getActive: () => IconPackKey;
|
|
251
|
-
resolve: (key: IconGlyphKey, o?: ResolveOptions) => Promise<IconGlyphPackPair | null>;
|
|
252
|
-
registerAlias: (packKey: IconPackKey, fromKey: IconGlyphKey, toKey: IconGlyphKey) => void;
|
|
253
|
-
has: (key: IconGlyphKey, o?: ResolveOptions) => boolean;
|
|
254
|
-
getPack: (packKey?: IconPackKey) => IconPack;
|
|
255
|
-
hasPack: (packKey: IconPackKey) => boolean;
|
|
256
|
-
listPacks: () => IconPackKey[];
|
|
257
|
-
listIcons: (packKey: IconPackKey) => string[];
|
|
258
|
-
addActiveListener: (cb: (key: IconPackKey) => void) => RemoveListener;
|
|
259
|
-
};
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* Creates a React synthetic event from a native DOM event.
|
|
263
|
-
*
|
|
264
|
-
* @remarks
|
|
265
|
-
* This helper creates a synthetic event wrapper that mimics React's SyntheticEvent behavior,
|
|
266
|
-
* including proper type inference for specific event types (PointerEvent, MouseEvent, etc.).
|
|
267
|
-
*
|
|
268
|
-
* @template T - The element type (extends Element)
|
|
269
|
-
* @template E - The native event type (extends Event)
|
|
270
|
-
*
|
|
271
|
-
* @param event - The native DOM event to wrap
|
|
272
|
-
* @param currentTarget - Optional override for currentTarget (useful for portals/delegated events)
|
|
273
|
-
*
|
|
274
|
-
* @returns A React synthetic event with all standard properties and methods
|
|
275
|
-
*
|
|
276
|
-
* @example
|
|
277
|
-
* ```typescript
|
|
278
|
-
* // Basic usage
|
|
279
|
-
* const syntheticEvent = createSyntheticEvent<HTMLDivElement, PointerEvent>(nativePointerEvent);
|
|
280
|
-
*
|
|
281
|
-
* // With custom currentTarget (for portals)
|
|
282
|
-
* const syntheticEvent = createSyntheticEvent<HTMLDivElement, PointerEvent>(
|
|
283
|
-
* nativePointerEvent,
|
|
284
|
-
* portalElement
|
|
285
|
-
* );
|
|
286
|
-
* ```
|
|
287
|
-
*/
|
|
288
|
-
declare const createSyntheticEvent: <T extends Element, E extends Event, R extends React.SyntheticEvent<T, E>>(event: E, currentTarget?: EventTarget & T) => R;
|
|
289
|
-
|
|
290
|
-
export declare const defaultCreateScrollCorner: (size: Size) => JSX.Element;
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* TODO - implement styling support similar to other scroll buttons. Currently hardcoded
|
|
294
|
-
*/
|
|
295
|
-
export declare const defaultCreateScrollEdgeButton: (props: ScrollButtonProps) => default_2.ReactElement;
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* Relies on external styling. Follows the styling of scrollbars pattern.
|
|
299
|
-
* @see https://css-tricks.com/custom-scrollbars-in-webkit/
|
|
300
|
-
* class of scrollbar-button, vertical or horizontal, end
|
|
301
|
-
*/
|
|
302
|
-
export declare const defaultCreateScrollEndButton: (props: ScrollButtonProps) => default_2.ReactElement;
|
|
303
|
-
|
|
304
|
-
/**
|
|
305
|
-
* Relies on external styling. Follows the styling of scrollbars pattern. @see https://css-tricks.com/custom-scrollbars-in-webkit/
|
|
306
|
-
* class of scrollbar-button, vertical or horizontal, end
|
|
307
|
-
*/
|
|
308
|
-
export declare const defaultCreateScrollStartButton: (props: ScrollButtonProps) => default_2.ReactElement;
|
|
309
|
-
|
|
310
|
-
export declare const DefaultDynamicIconService: {
|
|
311
|
-
register: (key: IconPackKey, packOrLoader: IconPack | IconPackInput | PackLoader) => void;
|
|
312
|
-
prefetch: (keys?: IconPackKey | IconPackKey[]) => Promise<void>;
|
|
313
|
-
setActive: (packKey: IconPackKey) => void;
|
|
314
|
-
getActive: () => IconPackKey;
|
|
315
|
-
resolve: (key: IconGlyphKey, o?: ResolveOptions) => Promise<IconGlyphPackPair | null>;
|
|
316
|
-
registerAlias: (packKey: IconPackKey, fromKey: IconGlyphKey, toKey: IconGlyphKey) => void;
|
|
317
|
-
has: (key: IconGlyphKey, o?: ResolveOptions) => boolean;
|
|
318
|
-
getPack: (packKey?: IconPackKey) => IconPack;
|
|
319
|
-
hasPack: (packKey: IconPackKey) => boolean;
|
|
320
|
-
listPacks: () => IconPackKey[];
|
|
321
|
-
listIcons: (packKey: IconPackKey) => string[];
|
|
322
|
-
addActiveListener: (cb: (key: IconPackKey) => void) => RemoveListener;
|
|
323
|
-
};
|
|
324
|
-
|
|
325
|
-
export declare class DefaultReactNotifier extends DefaultNotifier implements IReactNotifier {
|
|
326
|
-
/** @inheritdoc IReactNotifier.setOverrides */
|
|
327
|
-
setOverrides(overrides: Partial<IReactNotifier> | null): void;
|
|
328
|
-
/** @inheritdoc IReactNotifier.getDelegate */
|
|
329
|
-
getDelegate(): Partial<IReactNotifier> | null;
|
|
330
|
-
/** @inheritdoc IReactNotifier.showMessage */
|
|
331
|
-
showMessage(message: string | default_2.ReactNode, options?: EnqueueNotifierOptions): void;
|
|
332
|
-
/** @inheritdoc IReactNotifier.showBusy */
|
|
333
|
-
showBusy(message: string | default_2.ReactNode, options?: ShowBusyOptions): (Promise<() => void>) | (() => void);
|
|
334
|
-
/** @inheritdoc IReactNotifier.showWindow */
|
|
335
|
-
showWindow(type: string, options?: ShowWindowOptions): Promise<HTMLElement>;
|
|
336
|
-
/** @inheritdoc IReactNotifier.showError */
|
|
337
|
-
showError(error: any): void;
|
|
338
|
-
/** @inheritdoc IReactNotifier.showOptions */
|
|
339
|
-
showOptions(options: ShowOptionsOptions): Promise<string>;
|
|
340
|
-
/** @inheritdoc IReactNotifier.showInput */
|
|
341
|
-
showInput(options: ShowInputOptions): Promise<InputResults>;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
declare const defaultRenderScrollbar: (props: ScrollbarProps) => JSX.Element;
|
|
345
|
-
|
|
346
|
-
/**
|
|
347
|
-
* Re-export detectIt.
|
|
348
|
-
*
|
|
349
|
-
* @returns The `detect-it` library.
|
|
350
|
-
*/
|
|
351
|
-
declare function detectIt(): {
|
|
352
|
-
supportsPassiveEvents: boolean;
|
|
353
|
-
supportsPointerEvents: boolean;
|
|
354
|
-
supportsTouchEvents: boolean;
|
|
355
|
-
deviceType: 'mouseOnly' | 'touchOnly' | 'hybrid';
|
|
356
|
-
primaryInput: 'mouse' | 'touch';
|
|
357
|
-
};
|
|
358
|
-
|
|
359
|
-
export declare interface DevicePixelRatioOptions {
|
|
360
|
-
/**
|
|
361
|
-
* Default DPR to use if browser does not support the `devicePixelRatio`
|
|
362
|
-
* property, or when rendering on server
|
|
363
|
-
*
|
|
364
|
-
* @defaultValue `1`
|
|
365
|
-
*/
|
|
366
|
-
defaultDpr?: number;
|
|
367
|
-
/**
|
|
368
|
-
* Whether or not to round the number down to the closest integer
|
|
369
|
-
*
|
|
370
|
-
* @defaultValue `true`
|
|
371
|
-
*/
|
|
372
|
-
round?: boolean;
|
|
373
|
-
/**
|
|
374
|
-
* Maximum DPR to return (set to `2` to only generate 1 and 2)
|
|
375
|
-
*
|
|
376
|
-
* @defaultValue `3`
|
|
377
|
-
*/
|
|
378
|
-
maxDpr?: number;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
export declare const DynamicIcon: default_2.MemoExoticComponent<(props: DynamicIconProps) => JSX.Element>;
|
|
382
|
-
|
|
383
|
-
export declare interface DynamicIconProps extends default_2.HTMLAttributes<HTMLElement> {
|
|
384
|
-
iconKey?: IconGlyphKey;
|
|
385
|
-
packKey?: IconPackKey;
|
|
386
|
-
className?: string;
|
|
387
|
-
style?: default_2.CSSProperties;
|
|
388
|
-
/** Sets wrapper font-size; children scale to 1em */
|
|
389
|
-
size?: string | number;
|
|
390
|
-
title?: string;
|
|
391
|
-
role?: 'img' | 'presentation' | string;
|
|
392
|
-
ariaHidden?: boolean;
|
|
393
|
-
/** Extra props forwarded to React glyphs (if the glyph is of type `react`) */
|
|
394
|
-
propsSource?: unknown;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
export declare type EmojiGlyph = BaseGlyph & {
|
|
398
|
-
emoji: string | {
|
|
399
|
-
text: string;
|
|
400
|
-
};
|
|
401
|
-
};
|
|
402
|
-
|
|
403
|
-
export declare type EmojiInput = {
|
|
404
|
-
text: string;
|
|
405
|
-
} | string;
|
|
406
|
-
|
|
407
|
-
declare const EmptyCssProperties: React.CSSProperties;
|
|
408
|
-
|
|
409
|
-
/**
|
|
410
|
-
* Configuration for non-blocking notifications.
|
|
411
|
-
*/
|
|
412
|
-
export declare interface EnqueueNotifierOptions extends NotifierOptions {
|
|
413
|
-
/**
|
|
414
|
-
* A hint for decorations of the message.
|
|
415
|
-
*/
|
|
416
|
-
type?: NotifierType;
|
|
417
|
-
/**
|
|
418
|
-
* Passed directly to the Snackbar component.
|
|
419
|
-
*/
|
|
420
|
-
enqueueProps?: Record<string, any>;
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
/**
|
|
424
|
-
* Props for an Error Panel
|
|
425
|
-
*/
|
|
426
|
-
export declare interface ErrorPanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
427
|
-
/**
|
|
428
|
-
* The error to show
|
|
429
|
-
*/
|
|
430
|
-
error: any;
|
|
431
|
-
/**
|
|
432
|
-
* Ref to the element.
|
|
433
|
-
*/
|
|
434
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
/**
|
|
438
|
-
* Simple panel to trigger various error scenarios for testing error boundaries and logging.
|
|
439
|
-
*/
|
|
440
|
-
export declare const ErrorTestPanel: () => JSX.Element;
|
|
441
|
-
|
|
442
|
-
declare const focusableNodeNames: Set<string>;
|
|
443
|
-
|
|
444
|
-
/**
|
|
445
|
-
* Wrap around a div to allow. This will navigate through enabled divs with tabindex (but only one level deep)
|
|
446
|
-
* It uses the current layout to determine navigation
|
|
447
|
-
* TODO - we need to find an
|
|
448
|
-
* tab/shift-tab navigation
|
|
449
|
-
* arrow key navigation
|
|
450
|
-
*
|
|
451
|
-
* another option is to use rowindex/columnIndex attributes?
|
|
452
|
-
*
|
|
453
|
-
* default direction (for tab)
|
|
454
|
-
*/
|
|
455
|
-
export declare const FocusKeyNavigation: default_2.FC<FocusKeyNavigationProps>;
|
|
456
|
-
|
|
457
|
-
export declare interface FocusKeyNavigationProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
458
|
-
refFocusStart?: default_2.RefObject<HTMLElement>;
|
|
459
|
-
/**
|
|
460
|
-
* If tab and all tabIndices are the same which direction should the tab scan. Note - shift tab will go the opposite direction
|
|
461
|
-
*/
|
|
462
|
-
tabForward?: Direction;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
export declare interface FocusWindowOptions extends FocusOptions {
|
|
466
|
-
/**
|
|
467
|
-
* Allows for a specific component to be selected.
|
|
468
|
-
*
|
|
469
|
-
* @remarks
|
|
470
|
-
* If a string is provided this will be used as a querySelector to find the initial focusable component.
|
|
471
|
-
*/
|
|
472
|
-
selection?: string;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
export declare interface FullscreenPortalRoot {
|
|
476
|
-
getPortalContainer: () => Element;
|
|
477
|
-
isFullscreen: boolean;
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
/**
|
|
481
|
-
* Returns the current device pixel ratio (DPR) given the passed options
|
|
482
|
-
*
|
|
483
|
-
* @param options
|
|
484
|
-
* @returns current device pixel ratio
|
|
485
|
-
*/
|
|
486
|
-
export declare function getDevicePixelRatio(options?: DevicePixelRatioOptions): number;
|
|
487
|
-
|
|
488
|
-
/**
|
|
489
|
-
* scan all elements until we find one in the given direction
|
|
490
|
-
* Note - only horizontal at the moment
|
|
491
|
-
*/
|
|
492
|
-
declare const getScrollTo: (currentLocation: number, boundary: number, children: any, isLeft: boolean, defaultValue?: number) => number;
|
|
493
|
-
|
|
494
|
-
export declare interface HiddenHeadersAt {
|
|
495
|
-
/**
|
|
496
|
-
* A called back to traverse hidden headers
|
|
497
|
-
*/
|
|
498
|
-
(index: number, reverse?: boolean): number;
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
export declare const HorizontalAlignment: {
|
|
502
|
-
/**
|
|
503
|
-
* Aligned based on the data value.
|
|
504
|
-
* Text data is left-aligned. Numbers, dates, and times are right-aligned. Boolean types are centered.
|
|
505
|
-
*/
|
|
506
|
-
readonly General: "general";
|
|
507
|
-
readonly Left: "left";
|
|
508
|
-
readonly Right: "right";
|
|
509
|
-
readonly Center: "center";
|
|
510
|
-
readonly Justify: "justify";
|
|
511
|
-
readonly Fill: "fill";
|
|
512
|
-
/** Not Supported */
|
|
513
|
-
readonly Distributed: "distributed";
|
|
514
|
-
/** Not Supported */
|
|
515
|
-
readonly CenterContinuous: "centerContinuous";
|
|
516
|
-
};
|
|
517
|
-
|
|
518
|
-
export declare type HorizontalAlignment = typeof HorizontalAlignment[keyof typeof HorizontalAlignment];
|
|
519
|
-
|
|
520
|
-
export declare interface ICellLayout {
|
|
521
|
-
/**
|
|
522
|
-
* Returns the offset given an index.
|
|
523
|
-
*/
|
|
524
|
-
getColOffset: ItemSizer;
|
|
525
|
-
/**
|
|
526
|
-
* Returns the index given an offset.
|
|
527
|
-
*/
|
|
528
|
-
getColIndex: ItemSizer;
|
|
529
|
-
/**
|
|
530
|
-
* Returns the offset given an index.
|
|
531
|
-
*/
|
|
532
|
-
getRowOffset: ItemSizer;
|
|
533
|
-
/**
|
|
534
|
-
* Returns the index given an offset.
|
|
535
|
-
*/
|
|
536
|
-
getRowIndex: ItemSizer;
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
export declare interface ICommand<STATE extends any = any, CONTEXT extends any = void> {
|
|
540
|
-
/**
|
|
541
|
-
* A unique key for the command. This is how the command is identified
|
|
542
|
-
* within the CommandTree
|
|
543
|
-
*
|
|
544
|
-
* @remarks
|
|
545
|
-
* Immutable
|
|
546
|
-
*/
|
|
547
|
-
getKey(): string;
|
|
548
|
-
/**
|
|
549
|
-
* The target that the command operates on.
|
|
550
|
-
*/
|
|
551
|
-
getTarget(): ICommand.ITarget;
|
|
552
|
-
/**
|
|
553
|
-
* Indicates if the command is disabled.
|
|
554
|
-
*/
|
|
555
|
-
disabled(): boolean;
|
|
556
|
-
/**
|
|
557
|
-
* Called to execute the command.
|
|
558
|
-
*
|
|
559
|
-
* @param args Optional arguments for the command.
|
|
560
|
-
*/
|
|
561
|
-
execute(args?: STATE, hook?: ICommand.Hook<STATE, CONTEXT>): Promise<boolean>;
|
|
562
|
-
/**
|
|
563
|
-
* Represents the model state.
|
|
564
|
-
*/
|
|
565
|
-
getState(): STATE;
|
|
566
|
-
/**
|
|
567
|
-
* The current view context associated with the command.
|
|
568
|
-
*/
|
|
569
|
-
getContext(): CONTEXT;
|
|
570
|
-
/**
|
|
571
|
-
* Additional information that may be needed to render or make decisions about setting state.
|
|
572
|
-
*/
|
|
573
|
-
update(props: ICommand.Properties<STATE, CONTEXT>): ICommand<STATE, CONTEXT>;
|
|
574
|
-
/**
|
|
575
|
-
* Update the callback function for the command.
|
|
576
|
-
* @param callback
|
|
577
|
-
*/
|
|
578
|
-
updateCallback(callback: ICommand.Callback<STATE>): ICommand<STATE, CONTEXT>;
|
|
579
|
-
/**
|
|
580
|
-
* Add a listener that will be called when command properties have changed
|
|
581
|
-
*/
|
|
582
|
-
addPropertyListener(listener: ICommand.PropertyListener<STATE, CONTEXT>, fireOnListen?: boolean): RemoveListener;
|
|
583
|
-
/**
|
|
584
|
-
* Add a listener that will be called when the command is executed
|
|
585
|
-
* @param listener
|
|
586
|
-
*/
|
|
587
|
-
addExecuteListener(listener: ICommand.Hook<STATE, CONTEXT>): RemoveListener;
|
|
588
|
-
/**
|
|
589
|
-
* Get the shortcut(s) associated with the command.
|
|
590
|
-
*/
|
|
591
|
-
getShortcut(): IKeyStroke | readonly IKeyStroke[];
|
|
592
|
-
/**
|
|
593
|
-
* Get the label associated with the command.
|
|
594
|
-
*/
|
|
595
|
-
getLabel(scope?: string, context?: ICommand.DynamicContext<CONTEXT>): string;
|
|
596
|
-
/**
|
|
597
|
-
* Get the tags associated with the command.
|
|
598
|
-
*/
|
|
599
|
-
getTags(context?: ICommand.DynamicContext<CONTEXT>): string[];
|
|
600
|
-
/**
|
|
601
|
-
* Get the description associated with the command.
|
|
602
|
-
*/
|
|
603
|
-
getDescription(context?: ICommand.DynamicContext<CONTEXT>): string;
|
|
604
|
-
/**
|
|
605
|
-
* Get the icon associated with the command.
|
|
606
|
-
*/
|
|
607
|
-
getIcon(context?: ICommand.DynamicContext<CONTEXT>): React.ReactElement | string;
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
/**
|
|
611
|
-
* @see
|
|
612
|
-
* ### **Interface**
|
|
613
|
-
*
|
|
614
|
-
* {@link ICommand}
|
|
615
|
-
*/
|
|
616
|
-
export declare namespace ICommand {
|
|
617
|
-
/**
|
|
618
|
-
* Used to interactive with a dom element.
|
|
619
|
-
*
|
|
620
|
-
* @remarks
|
|
621
|
-
* * When dispatching keystrokes the target is used to determine if the keystroke
|
|
622
|
-
* can be consumed by the element.
|
|
623
|
-
* * Many commands will refocus the target after they have completed. The target focus will be called.
|
|
624
|
-
*/
|
|
625
|
-
export interface ITarget {
|
|
626
|
-
/**
|
|
627
|
-
* Used to determine if a dom element is contained with the group.
|
|
628
|
-
*
|
|
629
|
-
* @param element
|
|
630
|
-
*
|
|
631
|
-
* @remarks
|
|
632
|
-
* This is used for validating keystrokes and focus traversal.
|
|
633
|
-
*/
|
|
634
|
-
contains(element: Node | null): boolean;
|
|
635
|
-
/**
|
|
636
|
-
* Called after a command is executed.
|
|
637
|
-
*/
|
|
638
|
-
focus(): void;
|
|
639
|
-
}
|
|
640
|
-
/**
|
|
641
|
-
* The callback function for a command.
|
|
642
|
-
*
|
|
643
|
-
* @remarks
|
|
644
|
-
* When
|
|
645
|
-
*/
|
|
646
|
-
export interface Callback<STATE extends any = void> {
|
|
647
|
-
(args?: STATE, command?: ICommand<STATE, unknown>): void | boolean | Promise<boolean> | Promise<void>;
|
|
648
|
-
}
|
|
649
|
-
export type DynamicContext<CONTEXT> = CONTEXT | (() => CONTEXT);
|
|
650
|
-
export type DynamicValue<T, CONTEXT> = T | ((context?: DynamicContext<CONTEXT>) => T);
|
|
651
|
-
/**
|
|
652
|
-
* Properties that can be updated on a command.
|
|
653
|
-
*/
|
|
654
|
-
export interface Properties<STATE extends any = void, CONTEXT extends any = void> {
|
|
655
|
-
disabled?: boolean | (() => boolean);
|
|
656
|
-
/**
|
|
657
|
-
* Values associated with the command model.
|
|
658
|
-
*/
|
|
659
|
-
state?: STATE;
|
|
660
|
-
/**
|
|
661
|
-
* View specific context values
|
|
662
|
-
*/
|
|
663
|
-
context?: DynamicContext<CONTEXT>;
|
|
664
|
-
shortcut?: IKeyStroke | IKeyStroke[] | (() => IKeyStroke);
|
|
665
|
-
label?: DynamicValue<string, CONTEXT>;
|
|
666
|
-
tags?: DynamicValue<string[], CONTEXT>;
|
|
667
|
-
/**
|
|
668
|
-
* The ability to override labels for specific context. Useful for content menus
|
|
669
|
-
* For example 'Rename Sheet' command might only want to be displayed as 'Rename' in the content menu.
|
|
670
|
-
*/
|
|
671
|
-
scopedLabels?: Record<string, DynamicValue<string, CONTEXT>>;
|
|
672
|
-
description?: DynamicValue<string, CONTEXT>;
|
|
673
|
-
icon?: DynamicValue<React.ReactNode, CONTEXT>;
|
|
674
|
-
}
|
|
675
|
-
export interface PropertyListener<STATE extends any, CONTEXT extends any> {
|
|
676
|
-
/**
|
|
677
|
-
* Called when command properties have changed.
|
|
678
|
-
*/
|
|
679
|
-
(props: ICommand.Properties<STATE, CONTEXT>, command: ICommand<STATE, CONTEXT>): void;
|
|
680
|
-
}
|
|
681
|
-
/**
|
|
682
|
-
* A hook that can be passed to a command execute function.
|
|
683
|
-
*/
|
|
684
|
-
export interface Hook<STATE extends any, CONTEXT extends any = void> {
|
|
685
|
-
/**
|
|
686
|
-
* If implemented will be called when execute is called. If a promise is return if will wait until
|
|
687
|
-
* this is completed.
|
|
688
|
-
*
|
|
689
|
-
* @param command
|
|
690
|
-
* @param args
|
|
691
|
-
*/
|
|
692
|
-
beforeExecute?(command: ICommand<STATE, CONTEXT>, args: STATE): Promise<boolean | void> | boolean | void;
|
|
693
|
-
/**
|
|
694
|
-
* Called when a command has been executed successful.
|
|
695
|
-
*/
|
|
696
|
-
onExecute?(command: ICommand<STATE, CONTEXT>, args: STATE): void;
|
|
697
|
-
/**
|
|
698
|
-
* Called when a command failed to executed successfully.
|
|
699
|
-
*/
|
|
700
|
-
onError?(command: ICommand<STATE, CONTEXT>, error: any, args: STATE): void;
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
export declare interface ICommandListener<STATE extends any, CONTEXT extends any = void> extends ICommand.Hook<STATE, CONTEXT> {
|
|
705
|
-
onChange?(command: ICommand<STATE, CONTEXT>): void;
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
export declare interface ICommandListenerOptions {
|
|
709
|
-
fireOnCommandChange: boolean;
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
/**
|
|
713
|
-
* The ICommands namespace contains interfaces for managing collections of commands and
|
|
714
|
-
* dispatching keystrokes to the most specific command.
|
|
715
|
-
*
|
|
716
|
-
* @remarks
|
|
717
|
-
* This is done by creating a hierarchy of command groups and tracking the 'most focused' group.
|
|
718
|
-
* All keystrokes will walk up the commands groups until a command is found.
|
|
719
|
-
*
|
|
720
|
-
*/
|
|
721
|
-
export declare namespace ICommands {
|
|
722
|
-
export interface IListener {
|
|
723
|
-
/**
|
|
724
|
-
* Called when the active group has changed.
|
|
725
|
-
* @param source
|
|
726
|
-
*/
|
|
727
|
-
onActiveChange?(source: ICommands.IGroup): void;
|
|
728
|
-
/**
|
|
729
|
-
* Called when a command has changed.
|
|
730
|
-
* @param source
|
|
731
|
-
* @param command
|
|
732
|
-
*
|
|
733
|
-
* @remarks
|
|
734
|
-
* For this to be enabled the keys must be provided in the {@link ICommands.IListenerOptions}.
|
|
735
|
-
*/
|
|
736
|
-
onCommandChange?(source: ICommands.IGroup, command: ICommand): void;
|
|
737
|
-
/**
|
|
738
|
-
* Called when any change to the resolvable commands has occurred.
|
|
739
|
-
*
|
|
740
|
-
* @remarks
|
|
741
|
-
* This can be either due to changed the active or commands were added
|
|
742
|
-
*/
|
|
743
|
-
onGroupChange?(source: ICommands.IGroup): void;
|
|
744
|
-
}
|
|
745
|
-
export interface IListenerOptions {
|
|
746
|
-
/**
|
|
747
|
-
* If provided then the onCommandChange will be called when the command changes.
|
|
748
|
-
*/
|
|
749
|
-
keys?: string[];
|
|
750
|
-
}
|
|
751
|
-
/**
|
|
752
|
-
* Contains commands and child command maps.
|
|
753
|
-
*/
|
|
754
|
-
export interface ILookup {
|
|
755
|
-
/**
|
|
756
|
-
* Return a command that matches the key.
|
|
757
|
-
*
|
|
758
|
-
* @remarks
|
|
759
|
-
* Search both the current and any child commands groups that are actives.
|
|
760
|
-
*/
|
|
761
|
-
getCommand(key: string): ICommand<any, any>;
|
|
762
|
-
}
|
|
763
|
-
/**
|
|
764
|
-
* A command group is a collection of commands and child command groups.
|
|
765
|
-
*/
|
|
766
|
-
export interface IGroup extends ICommands.ILookup {
|
|
767
|
-
/**
|
|
768
|
-
* Create a new map to add Commands.
|
|
769
|
-
*
|
|
770
|
-
* @param target {@link ICommand.ITarget}.
|
|
771
|
-
* @param groupKey String description describing the reason for the group. This is presented to the user in the shortcut UI.
|
|
772
|
-
* @param replace If `true` replace the existing commands. If `false` ignores duplicates. If unspecified a warning will be logged for duplicates.
|
|
773
|
-
*/
|
|
774
|
-
createChildGroup(target: ICommand.ITarget | (() => ICommand.ITarget), groupKey: string, replace?: boolean): ICommands.IGroup;
|
|
775
|
-
/**
|
|
776
|
-
* Returns the keys associated with the group
|
|
777
|
-
*/
|
|
778
|
-
getKey(): string;
|
|
779
|
-
/**
|
|
780
|
-
* Remove the command group from the parent.
|
|
781
|
-
* @remarks
|
|
782
|
-
* If this is the root this operation will have no effect
|
|
783
|
-
*/
|
|
784
|
-
removeFromParent(): void;
|
|
785
|
-
/**
|
|
786
|
-
* Returns a group for the given when string.
|
|
787
|
-
*/
|
|
788
|
-
getGroup(key: string): ICommands.IGroup | null;
|
|
789
|
-
/**
|
|
790
|
-
* Add a collection of commands to the group.
|
|
791
|
-
* @param commands The commands to add.
|
|
792
|
-
* @param replace If `true` replace the existing commands. If `false` ignores duplicates. If unspecified a warning will be logged for duplicates.
|
|
793
|
-
* @remarks
|
|
794
|
-
* Set the commands for the current node.
|
|
795
|
-
*/
|
|
796
|
-
addCommands(commands: readonly ICommand<any, any>[], replace?: boolean): void;
|
|
797
|
-
/**
|
|
798
|
-
* Set the command group to the 'focused group.
|
|
799
|
-
* @param key The key of the group to activate. If not provided then the current group is activated.
|
|
800
|
-
*/
|
|
801
|
-
activate(key?: string): void;
|
|
802
|
-
/**
|
|
803
|
-
* Return the active group.
|
|
804
|
-
*
|
|
805
|
-
* @remarks
|
|
806
|
-
* This is the group that the dispatch will start from.
|
|
807
|
-
*/
|
|
808
|
-
getActive(): ICommands.IGroup;
|
|
809
|
-
/**
|
|
810
|
-
*
|
|
811
|
-
* @param e The keyboard event to dispatch
|
|
812
|
-
*/
|
|
813
|
-
dispatchToFocusedCommand(e: React.KeyboardEvent): boolean;
|
|
814
|
-
/**
|
|
815
|
-
* Returns the top most commands group.
|
|
816
|
-
*
|
|
817
|
-
* @remarks
|
|
818
|
-
* If root then will return return itself.
|
|
819
|
-
*/
|
|
820
|
-
getRoot(): ICommands.IGroup;
|
|
821
|
-
/**
|
|
822
|
-
* Returns the parent command group.
|
|
823
|
-
*
|
|
824
|
-
* @remarks
|
|
825
|
-
* If root then will return return itself.
|
|
826
|
-
*/
|
|
827
|
-
getParent(): ICommands.IGroup | null;
|
|
828
|
-
/**
|
|
829
|
-
* Add listener.
|
|
830
|
-
*/
|
|
831
|
-
addListener(listener: ICommands.IListener, options?: ICommands.IListenerOptions): RemoveListener;
|
|
832
|
-
/**
|
|
833
|
-
* Returns a list of all commands in the group and all children commands.
|
|
834
|
-
* @remarks
|
|
835
|
-
* This does not return parent commands.
|
|
836
|
-
*/
|
|
837
|
-
getAllCommands(): {
|
|
838
|
-
command: ICommand<any, any>;
|
|
839
|
-
groupKey: string;
|
|
840
|
-
}[];
|
|
841
|
-
/**
|
|
842
|
-
* Return a command that matched the keyboard event or `null` if no command was found.
|
|
843
|
-
*
|
|
844
|
-
* @param e The keyboard event.
|
|
845
|
-
*/
|
|
846
|
-
findCommandByEvent(e: React.KeyboardEvent): ICommand | null;
|
|
847
|
-
}
|
|
848
|
-
}
|
|
849
|
-
|
|
850
|
-
export declare interface ICommandsListeners<STATE extends any, CONTEXT extends any = void> extends ICommand.Hook<STATE, CONTEXT> {
|
|
851
|
-
/**
|
|
852
|
-
* Called when either the command group is updated or if keys are provided then the commands as well.
|
|
853
|
-
*
|
|
854
|
-
* @param commands
|
|
855
|
-
*/
|
|
856
|
-
onChange?(commands: ICommands.IGroup): void;
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
export declare type IconGlyph = SvgGlyph | UrlGlyph | EmojiGlyph | ReactGlyph;
|
|
860
|
-
|
|
861
|
-
export declare type IconGlyphInput = ({
|
|
862
|
-
svg: SvgSourceInput;
|
|
863
|
-
}) | ({
|
|
864
|
-
url: UrlInput;
|
|
865
|
-
} & BaseGlyph) | ({
|
|
866
|
-
emoji: EmojiInput;
|
|
867
|
-
} & BaseGlyph) | ({
|
|
868
|
-
react: ReactInput;
|
|
869
|
-
} & BaseGlyph);
|
|
870
|
-
|
|
871
|
-
export declare type IconGlyphKey = string;
|
|
872
|
-
|
|
873
|
-
export declare interface IconGlyphPackPair {
|
|
874
|
-
glyph: IconGlyph;
|
|
875
|
-
pack: IconPack;
|
|
876
|
-
packKey: string;
|
|
877
|
-
}
|
|
878
|
-
|
|
879
|
-
export declare interface IconPack {
|
|
880
|
-
icons: Readonly<Record<IconGlyphKey, IconGlyph>>;
|
|
881
|
-
meta: IconPackMeta;
|
|
882
|
-
}
|
|
883
|
-
|
|
884
|
-
export declare interface IconPackInput {
|
|
885
|
-
icons: IconsInputRecord;
|
|
886
|
-
meta?: Partial<IconPackMeta>;
|
|
887
|
-
overrides?: Record<IconPackKey, IconsInputRecord>;
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
export declare type IconPackKey = string;
|
|
891
|
-
|
|
892
|
-
export declare interface IconPackMeta {
|
|
893
|
-
label: string;
|
|
894
|
-
version: string;
|
|
895
|
-
license: string;
|
|
896
|
-
defaultViewBox: string;
|
|
897
|
-
extends: IconPackKey[];
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
export declare type IconPath = {
|
|
901
|
-
d: string;
|
|
902
|
-
className?: string;
|
|
903
|
-
fill?: string;
|
|
904
|
-
stroke?: string;
|
|
905
|
-
opacity?: number | string;
|
|
906
|
-
fillRule?: "nonzero" | "evenodd";
|
|
907
|
-
clipRule?: "nonzero" | "evenodd";
|
|
908
|
-
};
|
|
909
|
-
|
|
910
|
-
export declare type IconsInputRecord = Readonly<Record<IconGlyphKey, IconGlyphInput>>;
|
|
911
|
-
|
|
912
|
-
export declare interface IKeyStroke {
|
|
913
|
-
readonly key: string;
|
|
914
|
-
readonly modifiers?: KeyModifiers[];
|
|
915
|
-
}
|
|
916
|
-
|
|
917
|
-
/** In-memory state (default fallback / SSR-safe) */
|
|
918
|
-
export declare class InMemoryStore implements PersistenceStore {
|
|
919
|
-
private store;
|
|
920
|
-
/** {@inheritDoc PersistenceStore.getItem} */
|
|
921
|
-
getItem(k: string): Promise<string>;
|
|
922
|
-
/** {@inheritDoc PersistenceStore.setItem} */
|
|
923
|
-
setItem(k: string, v: string): Promise<void>;
|
|
924
|
-
/** {@inheritDoc PersistenceStore.removeItem} */
|
|
925
|
-
removeItem(k: string): Promise<void>;
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
export declare interface InputResults {
|
|
929
|
-
input: string;
|
|
930
|
-
option: string;
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
export declare interface InputValidationResults {
|
|
934
|
-
valid: boolean;
|
|
935
|
-
message?: string;
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
/**
|
|
939
|
-
* Interface that provides popups for the user.
|
|
940
|
-
*/
|
|
941
|
-
export declare interface IReactNotifier extends INotifier {
|
|
942
|
-
/**
|
|
943
|
-
* Useful when informing the user of something but are not expecting a response.
|
|
944
|
-
*/
|
|
945
|
-
showMessage: (message: string | default_2.ReactNode, options?: EnqueueNotifierOptions) => void;
|
|
946
|
-
/**
|
|
947
|
-
* Should return error object exception.
|
|
948
|
-
*
|
|
949
|
-
* @param error The error to show
|
|
950
|
-
*/
|
|
951
|
-
showError: (error: Error | string) => void;
|
|
952
|
-
/**
|
|
953
|
-
* Useful when performing a long running operation and you want to inform the user.
|
|
954
|
-
*
|
|
955
|
-
* A return type of a handler will be returned to allow for hideBusy.
|
|
956
|
-
* If multiple calls are made the consumer should continue to indicated blocked
|
|
957
|
-
* until all calls have been hideBusy.
|
|
958
|
-
*/
|
|
959
|
-
showBusy: (message: string | default_2.ReactNode, options?: ShowBusyOptions) => (Promise<() => void>) | (() => void);
|
|
960
|
-
/**
|
|
961
|
-
* Show a dialog for a given type.
|
|
962
|
-
*
|
|
963
|
-
* @param type
|
|
964
|
-
* @param options
|
|
965
|
-
*/
|
|
966
|
-
showWindow: (type: string, options?: ShowWindowOptions) => Promise<HTMLElement>;
|
|
967
|
-
/**
|
|
968
|
-
* Provide a user with a list of options to choose from.
|
|
969
|
-
* @param options
|
|
970
|
-
*/
|
|
971
|
-
showOptions: (options: ShowOptionsOptions) => Promise<string>;
|
|
972
|
-
/**
|
|
973
|
-
* Provider a user with a way to enter a text input.
|
|
974
|
-
* @param options
|
|
975
|
-
*/
|
|
976
|
-
showInput: (options: ShowInputOptions) => Promise<InputResults>;
|
|
977
|
-
}
|
|
978
|
-
|
|
979
|
-
export declare interface IsContentfulCell {
|
|
980
|
-
(coords: CellCoords): boolean;
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
export declare interface IScrollbarAttributes extends HTMLDivElement {
|
|
984
|
-
isScrollbar: () => true;
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
export declare interface IScrollbarElement extends IScrollbarAttributes, HTMLDivElement {
|
|
988
|
-
}
|
|
989
|
-
|
|
990
|
-
export declare interface IScrollPaneAttributes {
|
|
991
|
-
isScrollPane: () => true;
|
|
992
|
-
}
|
|
993
|
-
|
|
994
|
-
export declare interface IScrollPaneElement extends HTMLDivElement, IScrollPaneAttributes {
|
|
995
|
-
}
|
|
996
|
-
|
|
997
|
-
export declare interface IShowToolTipProperties {
|
|
998
|
-
/**
|
|
999
|
-
* The anchor for the tooltip. x,y are required
|
|
1000
|
-
* but width and height can also be provided.
|
|
1001
|
-
*/
|
|
1002
|
-
anchor: {
|
|
1003
|
-
x: number;
|
|
1004
|
-
y: number;
|
|
1005
|
-
width?: number;
|
|
1006
|
-
height?: number;
|
|
1007
|
-
};
|
|
1008
|
-
/**
|
|
1009
|
-
* The value to display. This is either a string or a react element
|
|
1010
|
-
*/
|
|
1011
|
-
display?: string | default_2.ReactElement;
|
|
1012
|
-
/**
|
|
1013
|
-
* Purely suggestion only
|
|
1014
|
-
* If not specified then the consumer will determine
|
|
1015
|
-
*/
|
|
1016
|
-
placement?: ToolTipPlacement;
|
|
1017
|
-
}
|
|
1018
|
-
|
|
1019
|
-
export declare interface ISplitPaneElement extends HTMLDivElement, SplitPaneAttributes {
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
export declare type ItemSizer = (index: number) => number;
|
|
1023
|
-
|
|
1024
|
-
export declare const KeyCodes: {
|
|
1025
|
-
readonly BackSpace: 8;
|
|
1026
|
-
readonly Tab: 9;
|
|
1027
|
-
readonly Clear: 12;
|
|
1028
|
-
readonly Enter: 13;
|
|
1029
|
-
readonly Shift: 16;
|
|
1030
|
-
readonly Control: 17;
|
|
1031
|
-
readonly Alt: 18;
|
|
1032
|
-
readonly Pause: 19;
|
|
1033
|
-
readonly CapsLock: 20;
|
|
1034
|
-
readonly Escape: 27;
|
|
1035
|
-
readonly Space: 32;
|
|
1036
|
-
readonly PageUp: 33;
|
|
1037
|
-
readonly PageDown: 34;
|
|
1038
|
-
readonly End: 35;
|
|
1039
|
-
readonly Home: 36;
|
|
1040
|
-
readonly Left: 37;
|
|
1041
|
-
readonly Up: 38;
|
|
1042
|
-
readonly Right: 39;
|
|
1043
|
-
readonly Down: 40;
|
|
1044
|
-
readonly Insert: 45;
|
|
1045
|
-
readonly Delete: 46;
|
|
1046
|
-
readonly Digit_8: 56;
|
|
1047
|
-
readonly Y: 89;
|
|
1048
|
-
readonly Z: 90;
|
|
1049
|
-
readonly Meta: 91;
|
|
1050
|
-
readonly F1: 112;
|
|
1051
|
-
readonly F2: 113;
|
|
1052
|
-
readonly F3: 114;
|
|
1053
|
-
readonly F4: 115;
|
|
1054
|
-
readonly F5: 116;
|
|
1055
|
-
readonly F6: 117;
|
|
1056
|
-
readonly F7: 118;
|
|
1057
|
-
readonly F8: 119;
|
|
1058
|
-
readonly F9: 120;
|
|
1059
|
-
readonly F10: 121;
|
|
1060
|
-
readonly F11: 122;
|
|
1061
|
-
readonly F12: 123;
|
|
1062
|
-
readonly NumLock: 144;
|
|
1063
|
-
readonly ScrollLock: 145;
|
|
1064
|
-
readonly BackSlash: 220;
|
|
1065
|
-
readonly Slash: 191;
|
|
1066
|
-
readonly BracketRight: 221;
|
|
1067
|
-
readonly BracketLeft: 219;
|
|
1068
|
-
/** Android/IME composition key - used when virtual keyboards send composite input */
|
|
1069
|
-
readonly Composition: 229;
|
|
1070
|
-
};
|
|
1071
|
-
|
|
1072
|
-
export declare type KeyCodes = typeof KeyCodes[keyof typeof KeyCodes];
|
|
1073
|
-
|
|
1074
|
-
export declare const KeyModifiers: {
|
|
1075
|
-
readonly Shift: "shift";
|
|
1076
|
-
readonly Alt: "alt";
|
|
1077
|
-
readonly Ctrl: "ctrl";
|
|
1078
|
-
readonly Meta: "meta";
|
|
1079
|
-
};
|
|
1080
|
-
|
|
1081
|
-
export declare type KeyModifiers = typeof KeyModifiers[keyof typeof KeyModifiers];
|
|
1082
|
-
|
|
1083
|
-
/**
|
|
1084
|
-
* Props for LoadingPanel
|
|
1085
|
-
*/
|
|
1086
|
-
export declare interface LoadingPanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
1087
|
-
/**
|
|
1088
|
-
* A delay for showing the loading panel.
|
|
1089
|
-
*
|
|
1090
|
-
* @remarks
|
|
1091
|
-
* This helps prevent flicker if loading is very fast.
|
|
1092
|
-
*/
|
|
1093
|
-
transitionDelay?: string;
|
|
1094
|
-
/**
|
|
1095
|
-
* Whether the background should be transparent.
|
|
1096
|
-
*
|
|
1097
|
-
* @defaultValue false
|
|
1098
|
-
*/
|
|
1099
|
-
transparentBackground?: boolean;
|
|
1100
|
-
/**
|
|
1101
|
-
* Optional callback when mounted
|
|
1102
|
-
*/
|
|
1103
|
-
onMount?: () => void;
|
|
1104
|
-
/**
|
|
1105
|
-
* Optional callback when unmounted
|
|
1106
|
-
*/
|
|
1107
|
-
onUnmount?: () => void;
|
|
1108
|
-
/**
|
|
1109
|
-
* Ref to the element.
|
|
1110
|
-
*/
|
|
1111
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
/** LocalStorage state with cross-tab sync */
|
|
1115
|
-
export declare class LocalStorageStore implements PersistenceStore {
|
|
1116
|
-
private storage;
|
|
1117
|
-
constructor(storage?: Storage);
|
|
1118
|
-
/** {@inheritDoc PersistenceStore.getItem} */
|
|
1119
|
-
getItem(k: string): Promise<string>;
|
|
1120
|
-
/** {@inheritDoc PersistenceStore.setItem} */
|
|
1121
|
-
setItem(k: string, v: string): Promise<void>;
|
|
1122
|
-
/** {@inheritDoc PersistenceStore.removeItem} */
|
|
1123
|
-
removeItem(k: string): Promise<void>;
|
|
1124
|
-
/** {@inheritDoc PersistenceStore.subscribe} */
|
|
1125
|
-
subscribe?(onExternalChange: (changedKey: string) => void): () => void;
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
export declare const MouseButtonCodes: {
|
|
1129
|
-
readonly Left: 1;
|
|
1130
|
-
readonly Middle: 2;
|
|
1131
|
-
readonly Right: 3;
|
|
1132
|
-
};
|
|
1133
|
-
|
|
1134
|
-
export declare type MouseButtonCodes = typeof MouseButtonCodes[keyof typeof MouseButtonCodes];
|
|
1135
|
-
|
|
1136
|
-
export declare const NotifierProvider: default_2.FC<NotifierProviderProps>;
|
|
1137
|
-
|
|
1138
|
-
/**
|
|
1139
|
-
* Context provider for notifications. Allows custom notification implementations
|
|
1140
|
-
* to be provided to components within the provider tree.
|
|
1141
|
-
*
|
|
1142
|
-
* @example
|
|
1143
|
-
* ```tsx
|
|
1144
|
-
* const customNotifier = {
|
|
1145
|
-
* showMessage: (message) => toast(message),
|
|
1146
|
-
* showError: (error) => toast.error(error),
|
|
1147
|
-
* // ... other methods
|
|
1148
|
-
* };
|
|
1149
|
-
*
|
|
1150
|
-
* <NotifierProvider notifier={customNotifier}>
|
|
1151
|
-
* <App />
|
|
1152
|
-
* </NotifierProvider>
|
|
1153
|
-
* ```
|
|
1154
|
-
*/
|
|
1155
|
-
export declare interface NotifierProviderProps {
|
|
1156
|
-
children: ReactNode;
|
|
1157
|
-
notifier: IReactNotifier;
|
|
1158
|
-
}
|
|
1159
|
-
|
|
1160
|
-
/**
|
|
1161
|
-
* Indicates the type of notification.
|
|
1162
|
-
*/
|
|
1163
|
-
export declare const NotifierType: {
|
|
1164
|
-
readonly Default: "default";
|
|
1165
|
-
readonly Error: "error";
|
|
1166
|
-
readonly Success: "success";
|
|
1167
|
-
readonly Warning: "warning";
|
|
1168
|
-
readonly Info: "info";
|
|
1169
|
-
};
|
|
1170
|
-
|
|
1171
|
-
export declare type NotifierType = typeof NotifierType[keyof typeof NotifierType];
|
|
1172
|
-
|
|
1173
|
-
export declare type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
|
|
1174
|
-
|
|
1175
|
-
declare type PackLoader = () => Promise<IconPack | IconPackInput | PackModule>;
|
|
1176
|
-
|
|
1177
|
-
declare type PackModule = {
|
|
1178
|
-
readonly default: IconPack | IconPackInput;
|
|
1179
|
-
} & Record<string, unknown>;
|
|
1180
|
-
|
|
1181
|
-
export declare type PersistenceProviderProps = {
|
|
1182
|
-
/**
|
|
1183
|
-
* Storage backend to use
|
|
1184
|
-
*/
|
|
1185
|
-
store: PersistenceStore;
|
|
1186
|
-
/**
|
|
1187
|
-
* Namespace prefix for all keys
|
|
1188
|
-
*
|
|
1189
|
-
* @defaultValue none
|
|
1190
|
-
*/
|
|
1191
|
-
namespace?: string;
|
|
1192
|
-
serializer?: PersistenceSerializer;
|
|
1193
|
-
debounceMs?: number;
|
|
1194
|
-
crossTabSync?: boolean;
|
|
1195
|
-
/**
|
|
1196
|
-
* Children elements that will have access to the persistence context.
|
|
1197
|
-
*
|
|
1198
|
-
* @remarks
|
|
1199
|
-
* Required for provider
|
|
1200
|
-
*/
|
|
1201
|
-
children: React.ReactNode;
|
|
1202
|
-
};
|
|
1203
|
-
|
|
1204
|
-
export declare type PersistenceSerializer<T = any> = {
|
|
1205
|
-
parse: (raw: string | null) => T;
|
|
1206
|
-
stringify: (val: T) => string;
|
|
1207
|
-
};
|
|
1208
|
-
|
|
1209
|
-
export declare type PersistenceStateOptions<T = any> = {
|
|
1210
|
-
/**
|
|
1211
|
-
* Convert the value to/from a string for storage
|
|
1212
|
-
*
|
|
1213
|
-
* @defaultValue JSON
|
|
1214
|
-
*/
|
|
1215
|
-
serializer?: PersistenceSerializer<T>;
|
|
1216
|
-
version?: number;
|
|
1217
|
-
migrate?: (oldValue: unknown, oldVersion: number | undefined) => T;
|
|
1218
|
-
lazy?: boolean;
|
|
1219
|
-
};
|
|
1220
|
-
|
|
1221
|
-
export declare function PersistenceStateProvider(props: PersistenceProviderProps): JSX.Element;
|
|
1222
|
-
|
|
1223
|
-
export declare type PersistenceStateSetter<T> = (next: T | ((prev: T) => T)) => void;
|
|
1224
|
-
|
|
1225
|
-
/**
|
|
1226
|
-
* Primary interface for storing retrieving key/value pairs
|
|
1227
|
-
*/
|
|
1228
|
-
export declare interface PersistenceStore {
|
|
1229
|
-
/**
|
|
1230
|
-
* Retrieves the value associated with the given key.
|
|
1231
|
-
*
|
|
1232
|
-
* @param key The key to retrieve.
|
|
1233
|
-
*/
|
|
1234
|
-
getItem(key: string): Promise<string | null>;
|
|
1235
|
-
/**
|
|
1236
|
-
* Sets the value for the given key.
|
|
1237
|
-
*
|
|
1238
|
-
* @param key The key to set.
|
|
1239
|
-
* @param value The value to associate with the key.
|
|
1240
|
-
*/
|
|
1241
|
-
setItem(key: string, value: string): Promise<void>;
|
|
1242
|
-
/**
|
|
1243
|
-
* Removes the value associated with the given key.
|
|
1244
|
-
*
|
|
1245
|
-
* @param key The key to remove.
|
|
1246
|
-
*/
|
|
1247
|
-
removeItem(key: string): Promise<void>;
|
|
1248
|
-
/**
|
|
1249
|
-
* Subscribes to external changes for cross-tab synchronization.
|
|
1250
|
-
*
|
|
1251
|
-
* @param onExternalChange Callback invoked when a key changes externally.
|
|
1252
|
-
*
|
|
1253
|
-
* @remarks
|
|
1254
|
-
* Not all state implementations support cross-tab subscription (may no-op)
|
|
1255
|
-
*/
|
|
1256
|
-
subscribe?(onExternalChange: (changedKey: string) => void): () => void;
|
|
1257
|
-
}
|
|
1258
|
-
|
|
1259
|
-
/**
|
|
1260
|
-
* If returns false don't setup the other listeners
|
|
1261
|
-
*/
|
|
1262
|
-
export declare type PointerDownListener = (event: default_2.PointerEvent<Element>) => void;
|
|
1263
|
-
|
|
1264
|
-
export declare interface PointerHandlerOptions<T extends Element = Element> {
|
|
1265
|
-
/**
|
|
1266
|
-
* If returns false then other events will not be fired
|
|
1267
|
-
*/
|
|
1268
|
-
onPointerDown: (event: default_2.PointerEvent<T>, modifiers: PointerModifiers) => boolean | void;
|
|
1269
|
-
/**
|
|
1270
|
-
* If the Pointer has moved or it the Pointer was held for a period of timerContinuous.
|
|
1271
|
-
*/
|
|
1272
|
-
onPointerMoveOrWait?: (event: default_2.PointerEvent<T>, modifiers: PointerModifiers, originalEvent: default_2.PointerEvent<T>) => void;
|
|
1273
|
-
/**
|
|
1274
|
-
* Called when Pointer is released. This is different than the regular
|
|
1275
|
-
* Pointer up in that it will be called even if the Pointer is released
|
|
1276
|
-
* when outside the component.
|
|
1277
|
-
*/
|
|
1278
|
-
onPointerUp?: (event: default_2.PointerEvent<T>, modifiers: PointerModifiers, originalEvent: default_2.PointerEvent<T>) => void;
|
|
1279
|
-
timerInitial?: number;
|
|
1280
|
-
timerContinuous?: number;
|
|
1281
|
-
/**
|
|
1282
|
-
* If this is being used for a touch device then this should be true. This will
|
|
1283
|
-
* prevent the default touch events from being fired (by calling defaultPrevent during the capture phase).
|
|
1284
|
-
* @default false
|
|
1285
|
-
*/
|
|
1286
|
-
processTouch?: boolean;
|
|
1287
|
-
/**
|
|
1288
|
-
* If true the touch events will be consumed and not propagated.
|
|
1289
|
-
* @default true
|
|
1290
|
-
*/
|
|
1291
|
-
consumeTouch?: boolean;
|
|
1292
|
-
}
|
|
1293
|
-
|
|
1294
|
-
/**
|
|
1295
|
-
* The pointer modifiers are used because pointer events and keyboard events
|
|
1296
|
-
* both have modifiers but pointer events are not updated with a keyboard event
|
|
1297
|
-
* is pressed.
|
|
1298
|
-
*/
|
|
1299
|
-
export declare interface PointerModifiers {
|
|
1300
|
-
ctrlKey: boolean;
|
|
1301
|
-
shiftKey: boolean;
|
|
1302
|
-
altKey: boolean;
|
|
1303
|
-
metaKey: boolean;
|
|
1304
|
-
}
|
|
1305
|
-
|
|
1306
|
-
export declare const ReactErrorBoundary: default_2.FC<{
|
|
1307
|
-
children: ReactNode;
|
|
1308
|
-
}>;
|
|
1309
|
-
|
|
1310
|
-
export declare type ReactGlyph<P extends ReactIconProps = ReactIconProps> = BaseGlyph & {
|
|
1311
|
-
react: ReactInput<P>;
|
|
1312
|
-
};
|
|
1313
|
-
|
|
1314
|
-
export declare interface ReactIconProps extends React.HTMLAttributes<HTMLElement> {
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
export declare type ReactInput<P extends ReactIconProps = ReactIconProps> = (props: P) => React.ReactNode;
|
|
1318
|
-
|
|
1319
|
-
export declare namespace ReactUtils {
|
|
1320
|
-
export {
|
|
1321
|
-
detectIt,
|
|
1322
|
-
boundPixel,
|
|
1323
|
-
focusableNodeNames,
|
|
1324
|
-
EmptyCssProperties,
|
|
1325
|
-
toPrettyKeyCode,
|
|
1326
|
-
createSyntheticEvent
|
|
1327
|
-
}
|
|
1328
|
-
}
|
|
1329
|
-
|
|
1330
|
-
export declare interface RepeatClickOptions {
|
|
1331
|
-
timerInitial?: number;
|
|
1332
|
-
timerContinuous?: number;
|
|
1333
|
-
}
|
|
1334
|
-
|
|
1335
|
-
export declare interface ResolveOptions {
|
|
1336
|
-
packKey?: IconPackKey;
|
|
1337
|
-
}
|
|
1338
|
-
|
|
1339
|
-
export declare const RoundedTab: default_2.FC<RoundedTabProps>;
|
|
1340
|
-
|
|
1341
|
-
export declare interface RoundedTabProps extends default_2.HTMLAttributes<HTMLElement> {
|
|
1342
|
-
radius?: number;
|
|
1343
|
-
strokeWidth?: number;
|
|
1344
|
-
strokeColor?: string;
|
|
1345
|
-
}
|
|
1346
|
-
|
|
1347
|
-
export declare type ScrollableViewport = {
|
|
1348
|
-
left: number;
|
|
1349
|
-
top: number;
|
|
1350
|
-
width: number;
|
|
1351
|
-
height: number;
|
|
1352
|
-
totalWidth: number;
|
|
1353
|
-
totalHeight: number;
|
|
1354
|
-
};
|
|
1355
|
-
|
|
1356
|
-
export declare const Scrollbar: default_2.NamedExoticComponent<Omit<ScrollbarProps, "ref"> & default_2.RefAttributes<IScrollbarElement>>;
|
|
1357
|
-
|
|
1358
|
-
export declare const ScrollbarOrientation: {
|
|
1359
|
-
readonly Horizontal: "horizontal";
|
|
1360
|
-
readonly Vertical: "vertical";
|
|
1361
|
-
};
|
|
1362
|
-
|
|
1363
|
-
export declare type ScrollbarOrientation = typeof ScrollbarOrientation[keyof typeof ScrollbarOrientation];
|
|
1364
|
-
|
|
1365
|
-
export declare interface ScrollbarProps extends default_2.HTMLAttributes<HTMLElement> {
|
|
1366
|
-
offset: number;
|
|
1367
|
-
viewportSize: number;
|
|
1368
|
-
totalSize: number;
|
|
1369
|
-
orientation: ScrollbarOrientation;
|
|
1370
|
-
onScrollOffset: (offset: number, viewportSize: number, totalSize: number) => void;
|
|
1371
|
-
/**
|
|
1372
|
-
* Add custom scrollButtons.
|
|
1373
|
-
* This should only be set to true if you have used css styling to hide the default scrollButtons
|
|
1374
|
-
* using:
|
|
1375
|
-
::-webkit-scrollbar-button: {
|
|
1376
|
-
display: 'none'
|
|
1377
|
-
}
|
|
1378
|
-
*
|
|
1379
|
-
* @defaultValue false
|
|
1380
|
-
*/
|
|
1381
|
-
showCustomScrollButtons?: boolean;
|
|
1382
|
-
/**
|
|
1383
|
-
* The minimum size of the thumb in pixels.
|
|
1384
|
-
*
|
|
1385
|
-
* @defaultValue 24
|
|
1386
|
-
*/
|
|
1387
|
-
minThumbSize?: number;
|
|
1388
|
-
/**
|
|
1389
|
-
* The maximum size of the thumb in pixels.
|
|
1390
|
-
*
|
|
1391
|
-
* @defaultValue undefined (no maximum size)
|
|
1392
|
-
*/
|
|
1393
|
-
maxThumbSize?: number;
|
|
1394
|
-
/**
|
|
1395
|
-
* The amount to increment the scroll position when the scroll button is clicked.
|
|
1396
|
-
* This can be a fixed number or a function that takes the current offset, viewport size,
|
|
1397
|
-
* and total size and returns the increment amount.
|
|
1398
|
-
*/
|
|
1399
|
-
scrollButtonIncrement?: number | ((offset: number, viewport: number, totalSize: number) => number);
|
|
1400
|
-
scrollButtonInitialRepeatDelay?: number;
|
|
1401
|
-
scrollButtonAdditionalRepeatDelay?: number;
|
|
1402
|
-
renderScrollButtonStart?: (props: ScrollButtonProps) => default_2.ReactElement;
|
|
1403
|
-
renderScrollButtonEnd?: (props: ScrollButtonProps) => default_2.ReactElement;
|
|
1404
|
-
propsTouchThumb?: Partial<TouchThumbHandleProps>;
|
|
1405
|
-
propsThumb?: default_2.HTMLAttributes<HTMLElement>;
|
|
1406
|
-
/**
|
|
1407
|
-
* Reference to the underling element
|
|
1408
|
-
*/
|
|
1409
|
-
ref?: default_2.Ref<IScrollbarElement>;
|
|
1410
|
-
}
|
|
1411
|
-
|
|
1412
|
-
export declare interface ScrollButtonProps extends default_2.HTMLAttributes<any> {
|
|
1413
|
-
orientation?: ScrollbarOrientation;
|
|
1414
|
-
disabled?: boolean;
|
|
1415
|
-
onMouseUp: (e: default_2.MouseEvent<any>) => void;
|
|
1416
|
-
onMouseLeave: (e: default_2.MouseEvent<any>) => void;
|
|
1417
|
-
onMouseDown: (e: default_2.MouseEvent<any>) => void;
|
|
1418
|
-
onClick?: (e: default_2.MouseEvent<any>) => void;
|
|
1419
|
-
ref?: default_2.Ref<any>;
|
|
1420
|
-
}
|
|
1421
|
-
|
|
1422
|
-
export declare const ScrollPane: default_2.NamedExoticComponent<Omit<ScrollPaneProps, "ref"> & default_2.RefAttributes<IScrollPaneElement>>;
|
|
1423
|
-
|
|
1424
|
-
/**
|
|
1425
|
-
* Properties for the ScrollPane
|
|
1426
|
-
*/
|
|
1427
|
-
export declare interface ScrollPaneProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
1428
|
-
viewport: ScrollableViewport;
|
|
1429
|
-
onScrollViewport?: (scrollPoint: Partial<TopLeft>) => void;
|
|
1430
|
-
showHorizontalScrollbar?: boolean;
|
|
1431
|
-
showVerticalScrollbar?: boolean;
|
|
1432
|
-
createScrollCorner?: (size: Size) => React.ReactNode;
|
|
1433
|
-
renderScrollbarHorizontal?: (props: ScrollbarProps) => React.ReactNode;
|
|
1434
|
-
renderScrollbarVertical?: (props: ScrollbarProps) => React.ReactNode;
|
|
1435
|
-
/**
|
|
1436
|
-
* By default the ScrollPane will listen for events on all of the children of the ScrollPane but this
|
|
1437
|
-
* allows for a custom element to be specified. Useful when the ScrollPane has some elements
|
|
1438
|
-
* that should not be touch enabled (for example headers)
|
|
1439
|
-
*/
|
|
1440
|
-
touchElement?: HTMLElement;
|
|
1441
|
-
/**
|
|
1442
|
-
* If touch is disabled.
|
|
1443
|
-
* @defaultValue false unless no touch events are detected
|
|
1444
|
-
*/
|
|
1445
|
-
disableTouch?: boolean;
|
|
1446
|
-
/**
|
|
1447
|
-
* Reference to the scroll pane element
|
|
1448
|
-
*/
|
|
1449
|
-
ref?: React.Ref<IScrollPaneElement>;
|
|
1450
|
-
}
|
|
1451
|
-
|
|
1452
|
-
export declare interface ScrollState extends TopLeft {
|
|
1453
|
-
horizontalScrollDirection: Direction | null;
|
|
1454
|
-
verticalScrollDirection: Direction | null;
|
|
1455
|
-
}
|
|
1456
|
-
|
|
1457
|
-
export declare namespace ScrollUtils {
|
|
1458
|
-
export {
|
|
1459
|
-
getScrollTo,
|
|
1460
|
-
defaultRenderScrollbar
|
|
1461
|
-
}
|
|
1462
|
-
}
|
|
1463
|
-
|
|
1464
|
-
export declare interface ShowBusyOptions {
|
|
1465
|
-
icon?: default_2.ReactNode;
|
|
1466
|
-
}
|
|
1467
|
-
|
|
1468
|
-
export declare interface ShowInputOptions<T = string, C = any> extends ShowOptionsOptions<T, C> {
|
|
1469
|
-
/**
|
|
1470
|
-
* Css style for input
|
|
1471
|
-
*/
|
|
1472
|
-
propsInput?: default_2.HTMLAttributes<HTMLInputElement | HTMLTextAreaElement>;
|
|
1473
|
-
inputLabel?: string;
|
|
1474
|
-
inputType?: 'text' | 'password' | 'email' | 'number' | 'search' | 'tel' | 'url';
|
|
1475
|
-
inputPlaceHolder?: string;
|
|
1476
|
-
onInput?: (input?: T, option?: string) => void | Promise<void>;
|
|
1477
|
-
/**
|
|
1478
|
-
* Call when an option is selected. If false is returned, the the
|
|
1479
|
-
* dialog will not close. INotifier is not provided but can
|
|
1480
|
-
* be supplied via the textFieldProps helperText property.
|
|
1481
|
-
* @remarks
|
|
1482
|
-
* Optional the textProps can be updated via the textFieldProps argument
|
|
1483
|
-
*/
|
|
1484
|
-
onValidateInput?: (input?: T, option?: string) => InputValidationResults | Promise<InputValidationResults>;
|
|
1485
|
-
}
|
|
1486
|
-
|
|
1487
|
-
/**
|
|
1488
|
-
* Configuration for an options dialog.
|
|
1489
|
-
*/
|
|
1490
|
-
export declare interface ShowOptionsOptions<T = any, C = any> extends ShowWindowOptions<T, C> {
|
|
1491
|
-
/**
|
|
1492
|
-
* The options as a list of strings
|
|
1493
|
-
*/
|
|
1494
|
-
options?: string[];
|
|
1495
|
-
/**
|
|
1496
|
-
* The title of the options panel
|
|
1497
|
-
*/
|
|
1498
|
-
title?: string;
|
|
1499
|
-
/**
|
|
1500
|
-
* Display text information for the user to make a decision.
|
|
1501
|
-
*/
|
|
1502
|
-
description?: string;
|
|
1503
|
-
/**
|
|
1504
|
-
* Display an icon next to the description for additional context
|
|
1505
|
-
*
|
|
1506
|
-
* @remarks
|
|
1507
|
-
* Not yet implemented
|
|
1508
|
-
*/
|
|
1509
|
-
icon?: default_2.ReactNode | string;
|
|
1510
|
-
/**
|
|
1511
|
-
* Allows for the option will be the default selected option and the enter key trigger.
|
|
1512
|
-
* @defaultValue The first option
|
|
1513
|
-
*/
|
|
1514
|
-
defaultOption?: string;
|
|
1515
|
-
/**
|
|
1516
|
-
* Allows for the cancel option to be specified. Allow for special styling.
|
|
1517
|
-
* @defaultValue 'Cancel'
|
|
1518
|
-
*/
|
|
1519
|
-
cancelOption?: string;
|
|
1520
|
-
/**
|
|
1521
|
-
* Call when an option is selected.
|
|
1522
|
-
* @remarks
|
|
1523
|
-
* It is possible that the option can be both a cancel and a default option.
|
|
1524
|
-
*/
|
|
1525
|
-
onOption?: (option: string, isCancel: boolean, isDefault: boolean) => void;
|
|
1526
|
-
/**
|
|
1527
|
-
* Hook for create custom options buttons
|
|
1528
|
-
* @param props
|
|
1529
|
-
*
|
|
1530
|
-
* @remarks
|
|
1531
|
-
* The option is passed as the `children` prop and as the second argument
|
|
1532
|
-
*/
|
|
1533
|
-
createOptionsButton?: (option: string, props: default_2.HTMLAttributes<HTMLButtonElement> & default_2.Attributes, isDefaultOption: boolean) => default_2.ReactNode;
|
|
1534
|
-
/**
|
|
1535
|
-
* Call when an option is selected. If false is returned, the the
|
|
1536
|
-
* dialog will not close. INotifier is not provided but can
|
|
1537
|
-
* be supplied via the textFieldProps helperText property.
|
|
1538
|
-
*/
|
|
1539
|
-
onValidateOption?: (option?: string) => boolean | Promise<boolean>;
|
|
1540
|
-
}
|
|
1541
|
-
|
|
1542
|
-
export declare interface ShowWindowOptions<T = any, C = any> {
|
|
1543
|
-
/**
|
|
1544
|
-
* A value the window can use to display.
|
|
1545
|
-
*/
|
|
1546
|
-
initialValue?: T;
|
|
1547
|
-
context?: () => C;
|
|
1548
|
-
/**
|
|
1549
|
-
* Query selector for the element to focus on show.
|
|
1550
|
-
*/
|
|
1551
|
-
autoFocus?: boolean | string | FocusWindowOptions;
|
|
1552
|
-
/**
|
|
1553
|
-
* Allow for tracking of key down events.
|
|
1554
|
-
*
|
|
1555
|
-
* @param e
|
|
1556
|
-
* @returns
|
|
1557
|
-
*/
|
|
1558
|
-
onKeyDown?: (e: default_2.KeyboardEvent) => void;
|
|
1559
|
-
/**
|
|
1560
|
-
* If true show a backdrop.
|
|
1561
|
-
*
|
|
1562
|
-
* @remarks
|
|
1563
|
-
* Our movable menu achieves modality without a background by listens to global clicks (and focus)
|
|
1564
|
-
* @defaultValue false
|
|
1565
|
-
*/
|
|
1566
|
-
isModal?: boolean;
|
|
1567
|
-
/**
|
|
1568
|
-
* If true the window will not be automatically destroyed when closed.
|
|
1569
|
-
*/
|
|
1570
|
-
disableAutoDestroy?: boolean;
|
|
1571
|
-
}
|
|
1572
|
-
|
|
1573
|
-
/**
|
|
1574
|
-
* A simple command that does not maintain state or context.
|
|
1575
|
-
*/
|
|
1576
|
-
export declare class SimpleCommand extends Command<void, void> {
|
|
1577
|
-
}
|
|
1578
|
-
|
|
1579
|
-
/**
|
|
1580
|
-
* SplitPane
|
|
1581
|
-
* A component can have two children and will add a resizer between the two.
|
|
1582
|
-
* @remarks
|
|
1583
|
-
*
|
|
1584
|
-
* Because this component measures the elements (both panes and the resizer) it is important
|
|
1585
|
-
* that none of these have margins or paddings. If these are required then use a nested element.
|
|
1586
|
-
*/
|
|
1587
|
-
export declare const SplitPane: default_2.NamedExoticComponent<Omit<SplitPaneProps, "ref"> & default_2.RefAttributes<ISplitPaneElement>>;
|
|
1588
|
-
|
|
1589
|
-
export declare interface SplitPaneAttributes {
|
|
1590
|
-
/**
|
|
1591
|
-
* Programmatic api to set the position. Can be either a string with px or %.
|
|
1592
|
-
* If it is a number it will be interpreted based on whether there is a fixed pane or not.
|
|
1593
|
-
* @param position - Pixels as `string` or a percent as a `number`.
|
|
1594
|
-
*/
|
|
1595
|
-
setPosition: (position: string | number) => void;
|
|
1596
|
-
isSplitPane: () => true;
|
|
1597
|
-
}
|
|
1598
|
-
|
|
1599
|
-
export declare interface SplitPaneProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
1600
|
-
/**
|
|
1601
|
-
* The elementBefore the divider.
|
|
1602
|
-
*/
|
|
1603
|
-
elementBefore?: default_2.ReactElement<any>;
|
|
1604
|
-
/**
|
|
1605
|
-
* The element after the divider.
|
|
1606
|
-
*/
|
|
1607
|
-
elementAfter?: default_2.ReactElement<any>;
|
|
1608
|
-
/**
|
|
1609
|
-
* If the fixedPane is set resizing will keep one the sizes.
|
|
1610
|
-
*
|
|
1611
|
-
* @remarks
|
|
1612
|
-
* When set the default position to be interpreted as pixels.
|
|
1613
|
-
*/
|
|
1614
|
-
fixedPane?: 'before' | 'after' | null;
|
|
1615
|
-
/**
|
|
1616
|
-
* The position. Can be either a string with px or %.
|
|
1617
|
-
* If it is a number it will be interpreted based on whether there is a fixed pane or not.
|
|
1618
|
-
*/
|
|
1619
|
-
position?: number | string;
|
|
1620
|
-
/**
|
|
1621
|
-
* The minimum size. Can be either a string with px or %.
|
|
1622
|
-
* If it is a number it will be interpreted based on whether there is a fixed pane or not.
|
|
1623
|
-
*/
|
|
1624
|
-
minBefore?: number | string;
|
|
1625
|
-
/**
|
|
1626
|
-
* The minimum size. Can be either a string with px or %.
|
|
1627
|
-
* If it is a number it will be interpreted based on whether there is a fixed pane or not.
|
|
1628
|
-
*/
|
|
1629
|
-
maxBefore?: number | string;
|
|
1630
|
-
/**
|
|
1631
|
-
* The minimum size. Can be either a string with px or %.
|
|
1632
|
-
* If it is a number it will be interpreted based on whether there is a fixed pane or not.
|
|
1633
|
-
*/
|
|
1634
|
-
minAfter?: number | string;
|
|
1635
|
-
/**
|
|
1636
|
-
* The minimum size. Can be either a string with px or %.
|
|
1637
|
-
* If it is a number it will be interpreted based on whether there is a fixed pane or not.
|
|
1638
|
-
*/
|
|
1639
|
-
maxAfter?: number | string;
|
|
1640
|
-
/**
|
|
1641
|
-
* When the position has been changed.
|
|
1642
|
-
* @remarks This is not fired during drag.
|
|
1643
|
-
* @param position
|
|
1644
|
-
*/
|
|
1645
|
-
onPositionChange?: (position: {
|
|
1646
|
-
pixels: number;
|
|
1647
|
-
percent: number;
|
|
1648
|
-
}) => void;
|
|
1649
|
-
/**
|
|
1650
|
-
* Determine the direction of the scrollPane
|
|
1651
|
-
*/
|
|
1652
|
-
splitDirection?: 'row' | 'column';
|
|
1653
|
-
disabled?: boolean;
|
|
1654
|
-
propsResizer?: SplitPaneResizerProps;
|
|
1655
|
-
propsPane?: default_2.HTMLAttributes<HTMLElement>;
|
|
1656
|
-
propsPaneBefore?: default_2.HTMLAttributes<HTMLElement>;
|
|
1657
|
-
propsPaneAfter?: default_2.HTMLAttributes<HTMLElement>;
|
|
1658
|
-
onDragStart?: () => void;
|
|
1659
|
-
onDragResize?: (position: number) => void;
|
|
1660
|
-
onDragFinish?: (position: number) => void;
|
|
1661
|
-
renderResizer?: (props: SplitPaneResizerProps) => default_2.ReactElement;
|
|
1662
|
-
/**
|
|
1663
|
-
* A ref that points to the HTMLDivElement.
|
|
1664
|
-
*/
|
|
1665
|
-
ref?: default_2.Ref<ISplitPaneElement>;
|
|
1666
|
-
}
|
|
1667
|
-
|
|
1668
|
-
export declare const SplitPaneResizer: (props: SplitPaneResizerProps) => default_2.ReactElement;
|
|
1669
|
-
|
|
1670
|
-
export declare interface SplitPaneResizerProps extends default_2.HTMLAttributes<HTMLDivElement>, default_2.Attributes {
|
|
1671
|
-
splitDirection?: 'row' | 'column';
|
|
1672
|
-
disabled?: boolean;
|
|
1673
|
-
paddingBefore?: number;
|
|
1674
|
-
paddingAfter?: number;
|
|
1675
|
-
propsHitArea?: default_2.HTMLAttributes<HTMLDivElement>;
|
|
1676
|
-
ref?: default_2.Ref<HTMLDivElement>;
|
|
1677
|
-
}
|
|
1678
|
-
|
|
1679
|
-
export declare interface Style {
|
|
1680
|
-
stroke?: string;
|
|
1681
|
-
strokeLeftColor?: string;
|
|
1682
|
-
strokeTopColor?: string;
|
|
1683
|
-
strokeRightColor?: string;
|
|
1684
|
-
strokeBottomColor?: string;
|
|
1685
|
-
strokeWidth?: number;
|
|
1686
|
-
strokeTopWidth?: number;
|
|
1687
|
-
strokeRightWidth?: number;
|
|
1688
|
-
strokeBottomWidth?: number;
|
|
1689
|
-
strokeLeftWidth?: number;
|
|
1690
|
-
strokeStyle?: string;
|
|
1691
|
-
}
|
|
1692
|
-
|
|
1693
|
-
export declare type SvgDef = {
|
|
1694
|
-
paths: IconPath[];
|
|
1695
|
-
viewBox?: string;
|
|
1696
|
-
};
|
|
1697
|
-
|
|
1698
|
-
export declare type SvgGlyph = BaseGlyph & {
|
|
1699
|
-
svg: SvgSource;
|
|
1700
|
-
};
|
|
1701
|
-
|
|
1702
|
-
export declare type SvgRender = (props: React.HTMLAttributes<SVGElement>) => React.ReactNode;
|
|
1703
|
-
|
|
1704
|
-
export declare type SvgSource = SvgDef | SvgRender;
|
|
1705
|
-
|
|
1706
|
-
export declare type SvgSourceInput = (SvgDef & BaseGlyph) | SvgRender | IconPath[] | string[] | string;
|
|
1707
|
-
|
|
1708
|
-
export declare interface TextSelectionRange {
|
|
1709
|
-
start: number;
|
|
1710
|
-
end: number;
|
|
1711
|
-
direction?: 'forward' | 'backward' | 'none';
|
|
1712
|
-
}
|
|
1713
|
-
|
|
1714
|
-
export declare const ToolTipPlacement: {
|
|
1715
|
-
readonly BottomEnd: "bottom-end";
|
|
1716
|
-
readonly BottomStart: "bottom-start";
|
|
1717
|
-
readonly Bottom: "bottom";
|
|
1718
|
-
readonly LeftEnd: "left-end";
|
|
1719
|
-
readonly LeftStart: "left-start";
|
|
1720
|
-
readonly Left: "left";
|
|
1721
|
-
readonly RightEnd: "right-end";
|
|
1722
|
-
readonly RightStart: "right-start";
|
|
1723
|
-
readonly Right: "right";
|
|
1724
|
-
readonly TopEnd: "top-end";
|
|
1725
|
-
readonly TopStart: "top-start";
|
|
1726
|
-
readonly Top: "top";
|
|
1727
|
-
};
|
|
1728
|
-
|
|
1729
|
-
export declare type ToolTipPlacement = typeof ToolTipPlacement[keyof typeof ToolTipPlacement];
|
|
1730
|
-
|
|
1731
|
-
declare const toPrettyKeyCode: (key: string) => string;
|
|
1732
|
-
|
|
1733
|
-
export declare const toShortcutString: (keyStroke: IKeyStroke, modifierSymbol?: boolean) => string;
|
|
1734
|
-
|
|
1735
|
-
declare interface TouchThumbHandleAttributes {
|
|
1736
|
-
}
|
|
1737
|
-
|
|
1738
|
-
declare interface TouchThumbHandleElement extends HTMLDivElement, TouchThumbHandleAttributes {
|
|
1739
|
-
}
|
|
1740
|
-
|
|
1741
|
-
declare interface TouchThumbHandleProps extends default_2.HTMLAttributes<HTMLElement> {
|
|
1742
|
-
/**
|
|
1743
|
-
* The orientation of the scrollbar.
|
|
1744
|
-
*/
|
|
1745
|
-
orientation: ScrollbarOrientation;
|
|
1746
|
-
/**
|
|
1747
|
-
* Possible anchors are. If 'l', 't', 'r', or 'b', then it will center along view the view.
|
|
1748
|
-
*
|
|
1749
|
-
* @remarks
|
|
1750
|
-
* Determines not only the position but the event that is fired.
|
|
1751
|
-
*/
|
|
1752
|
-
size?: number;
|
|
1753
|
-
borderColor?: string;
|
|
1754
|
-
backgroundColor?: string;
|
|
1755
|
-
borderWidth?: number;
|
|
1756
|
-
fillColor?: string;
|
|
1757
|
-
/**
|
|
1758
|
-
* Indicate that a touch handling is being used
|
|
1759
|
-
*/
|
|
1760
|
-
currentTouchAnchor?: string;
|
|
1761
|
-
/**
|
|
1762
|
-
* If provided then touch control will walk the parent hierarchy
|
|
1763
|
-
* to find the absolute scroll position
|
|
1764
|
-
*/
|
|
1765
|
-
elementParent?: HTMLElement;
|
|
1766
|
-
/**
|
|
1767
|
-
* Use to add create the portal
|
|
1768
|
-
* @defaultValue document.body
|
|
1769
|
-
*/
|
|
1770
|
-
elementRoot?: HTMLElement;
|
|
1771
|
-
key?: string;
|
|
1772
|
-
offset?: number;
|
|
1773
|
-
/**
|
|
1774
|
-
* Ref for the TouchThumbHandle element
|
|
1775
|
-
*/
|
|
1776
|
-
ref?: default_2.Ref<TouchThumbHandleElement>;
|
|
1777
|
-
}
|
|
1778
|
-
|
|
1779
|
-
export declare const UncaughtErrorBoundary: default_2.FC<{
|
|
1780
|
-
children: default_2.ReactNode;
|
|
1781
|
-
}>;
|
|
1782
|
-
|
|
1783
|
-
export declare interface UndoContext {
|
|
1784
|
-
readonly undoManager: UndoManager;
|
|
1785
|
-
}
|
|
1786
|
-
|
|
1787
|
-
export declare interface UndoManagerProps {
|
|
1788
|
-
manager: UndoManager;
|
|
1789
|
-
/**
|
|
1790
|
-
* Not allow to invoke undo/redo
|
|
1791
|
-
* Interesting.... Because this is sharable and not scoped to an object it's not clear the best
|
|
1792
|
-
* way to disable/protect a sheet. Excel clears the undo stack!
|
|
1793
|
-
*/
|
|
1794
|
-
disabled?: boolean;
|
|
1795
|
-
commands?: ICommands.IGroup;
|
|
1796
|
-
}
|
|
1797
|
-
|
|
1798
|
-
export declare interface UndoManagerResults {
|
|
1799
|
-
/**
|
|
1800
|
-
* Call undo manager via command
|
|
1801
|
-
*/
|
|
1802
|
-
undo: (count?: number) => void;
|
|
1803
|
-
/**
|
|
1804
|
-
* Call undo manager via command
|
|
1805
|
-
*/
|
|
1806
|
-
redo: (count?: number) => void;
|
|
1807
|
-
}
|
|
1808
|
-
|
|
1809
|
-
export declare type UrlGlyph = BaseGlyph & {
|
|
1810
|
-
url: {
|
|
1811
|
-
src: string;
|
|
1812
|
-
};
|
|
1813
|
-
};
|
|
1814
|
-
|
|
1815
|
-
export declare type UrlInput = {
|
|
1816
|
-
src: string;
|
|
1817
|
-
} | string;
|
|
1818
|
-
|
|
1819
|
-
/**
|
|
1820
|
-
* Enhanced version of useMeasure that provides real-time measurements during animations.
|
|
1821
|
-
*
|
|
1822
|
-
* Use for components that don't sit within the component hierarchy but could be animated.
|
|
1823
|
-
* (for examples portal elements; menus, tooltips)
|
|
1824
|
-
*
|
|
1825
|
-
* Unlike the standard useMeasure hook which relies on ResizeObserver (which doesn't trigger
|
|
1826
|
-
* during CSS transform animations), this hook actively monitors element bounds using
|
|
1827
|
-
* requestAnimationFrame and CSS animation/transition events.
|
|
1828
|
-
*
|
|
1829
|
-
* @remarks
|
|
1830
|
-
* - Monitors all bounds properties: x, y, width, height, top, left, right, bottom
|
|
1831
|
-
* - Detects animations on the element itself and all parent elements
|
|
1832
|
-
* - Uses both position polling and event-based detection for optimal performance
|
|
1833
|
-
* - Automatically stops monitoring when animations complete to save resources
|
|
1834
|
-
*
|
|
1835
|
-
* @example
|
|
1836
|
-
* ```tsx
|
|
1837
|
-
* const [ref, bounds] = useAnimatedMeasure<HTMLDivElement>();
|
|
1838
|
-
*
|
|
1839
|
-
* return (
|
|
1840
|
-
* <div ref={ref} style={{ transform: 'translateX(100px)' }}>
|
|
1841
|
-
* Position: {bounds?.x}, {bounds?.y}
|
|
1842
|
-
* </div>
|
|
1843
|
-
* );
|
|
1844
|
-
* ```
|
|
1845
|
-
*/
|
|
1846
|
-
export declare function useAnimatedMeasure<T extends Element = HTMLDivElement>(options?: UseAnimatedMeasureOptions): readonly [(node: T | null) => void, UseMeasureRect];
|
|
1847
|
-
|
|
1848
|
-
export declare interface UseAnimatedMeasureOptions {
|
|
1849
|
-
/** Threshold in pixels for detecting bounds changes (default: 0.1) */
|
|
1850
|
-
threshold?: number;
|
|
1851
|
-
/** Number of frames without movement to consider animation stopped (default: 3) */
|
|
1852
|
-
stillnessThreshold?: number;
|
|
1853
|
-
/** Maximum parent elements to monitor for animations (default: 50) */
|
|
1854
|
-
maxHierarchyDepth?: number;
|
|
1855
|
-
}
|
|
1856
|
-
|
|
1857
|
-
/**
|
|
1858
|
-
* This is a callback hook that is similar to useCallback except in
|
|
1859
|
-
* one important way. When it's dependencies change it does
|
|
1860
|
-
* NOT update the callback handler itself. Useful
|
|
1861
|
-
* in the instance where you want to pass a callback and
|
|
1862
|
-
* want to avoid have stale values do to closure but don't
|
|
1863
|
-
* want a re-render to occur.
|
|
1864
|
-
*/
|
|
1865
|
-
export declare const useCallbackRef: <T extends (...args: any[]) => any>(callback: T, deps: DependencyList) => T;
|
|
1866
|
-
|
|
1867
|
-
/**
|
|
1868
|
-
* Useful for capture command changes. This can be used with an @see ICommand.Hook or without.
|
|
1869
|
-
* If used with then will call the function. If not then a change will force a re-render.
|
|
1870
|
-
|
|
1871
|
-
* @param command
|
|
1872
|
-
* @param listener
|
|
1873
|
-
*/
|
|
1874
|
-
export declare function useCommand<STATE = any, CONTEXT = any>(command: ICommand<STATE, CONTEXT> | ICommand<STATE, CONTEXT>[], listener?: ICommandListener<STATE, CONTEXT>): number;
|
|
1875
|
-
|
|
1876
|
-
/**
|
|
1877
|
-
* Useful for capture command changes. This can be used with an @see ICommand.Hook or without.
|
|
1878
|
-
* If used with then will call the function. If not then a change will force a re-render.
|
|
1879
|
-
*
|
|
1880
|
-
* @param commands
|
|
1881
|
-
* @param keys
|
|
1882
|
-
* @param listener
|
|
1883
|
-
* @param deps Optional dependencies to trigger a re-render
|
|
1884
|
-
*
|
|
1885
|
-
* @remarks
|
|
1886
|
-
* A change to the commands, keys, or listeners will not trigger a rerender. The deps argument can be used.
|
|
1887
|
-
*/
|
|
1888
|
-
export declare function useCommands<STATE extends any, CONTEXT extends any = void>(commands: ICommands.IGroup, keys?: string[], listener?: ICommandsListeners<STATE, CONTEXT>, deps?: React.DependencyList): ICommand<STATE, CONTEXT>[];
|
|
1889
|
-
|
|
1890
|
-
/**
|
|
1891
|
-
* Copy paste hook.
|
|
1892
|
-
*/
|
|
1893
|
-
export declare const useCopyPaste: (props: CopyPasteProps) => CopyPasteResults;
|
|
1894
|
-
|
|
1895
|
-
/**
|
|
1896
|
-
* Get the device pixel ratio, potentially rounded and capped.
|
|
1897
|
-
* Will emit new values if it changes.
|
|
1898
|
-
*
|
|
1899
|
-
* @param options
|
|
1900
|
-
* @returns The current device pixel ratio, or the default if none can be resolved
|
|
1901
|
-
*/
|
|
1902
|
-
export declare function useDevicePixelRatio(options?: DevicePixelRatioOptions): number;
|
|
1903
|
-
|
|
1904
|
-
export declare const useEditMode: () => EditModeHandler;
|
|
1905
|
-
|
|
1906
|
-
export declare function useFullscreenPortal(): FullscreenPortalRoot;
|
|
1907
|
-
|
|
1908
|
-
export declare const useGlobalClipboard: any;
|
|
1909
|
-
|
|
1910
|
-
/**
|
|
1911
|
-
* Uses React 18's built-in `useId()` when available, or falls back to a
|
|
1912
|
-
* slightly less performant (requiring a double render) implementation for
|
|
1913
|
-
* earlier React versions.
|
|
1914
|
-
*
|
|
1915
|
-
* @see {@link https://movable-ui.com/docs/useId}
|
|
1916
|
-
*/
|
|
1917
|
-
export declare const useId: any;
|
|
1918
|
-
|
|
1919
|
-
export declare function useImperativeElement<R extends T, A = any, T = HTMLElement & A>(refForwarded: React.Ref<R>, attributeFn?: () => Partial<A>, deps?: DependencyList): React.RefObject<R>;
|
|
1920
|
-
|
|
1921
|
-
declare type UseMeasureRect = Pick<DOMRectReadOnly, 'x' | 'y' | 'top' | 'left' | 'right' | 'bottom' | 'height' | 'width'>;
|
|
1922
|
-
|
|
1923
|
-
/**
|
|
1924
|
-
* Simple hook that calls onMouseDown at intervals until mouse is up.
|
|
1925
|
-
*
|
|
1926
|
-
* @remarks
|
|
1927
|
-
* Fires the original mouse down event so preventDefault should be ignored or treated accordingly.
|
|
1928
|
-
*/
|
|
1929
|
-
export declare function useMouseDownAndHoldListener(onPointerDown: (event: default_2.PointerEvent<Element>) => boolean | void, options?: RepeatClickOptions): (event: default_2.PointerEvent<Element>) => void;
|
|
1930
|
-
|
|
1931
|
-
/**
|
|
1932
|
-
* Hook to access the notification system. Uses the notifier from the nearest
|
|
1933
|
-
* NotifierProvider, or falls back to the default ReactNotifier singleton if
|
|
1934
|
-
* no provider is found.
|
|
1935
|
-
*
|
|
1936
|
-
* @returns The notification interface
|
|
1937
|
-
*
|
|
1938
|
-
* @example
|
|
1939
|
-
* ```tsx
|
|
1940
|
-
* function MyComponent() {
|
|
1941
|
-
* const notifier = useNotifier();
|
|
1942
|
-
*
|
|
1943
|
-
* const handleClick = () => {
|
|
1944
|
-
* notifier.showMessage('Hello World!', { type: NotifierType.Success });
|
|
1945
|
-
* };
|
|
1946
|
-
*
|
|
1947
|
-
* return <button onClick={handleClick}>Show INotifier</button>;
|
|
1948
|
-
* }
|
|
1949
|
-
* ```
|
|
1950
|
-
*/
|
|
1951
|
-
export declare const useNotifier: () => IReactNotifier;
|
|
1952
|
-
|
|
1953
|
-
export declare function useOnClickOrFocusAway(ref: default_2.RefObject<any>, listenerArg: ClickOrFocusAwayListener, options?: ClickOrFocusAwayOptions): void;
|
|
1954
|
-
|
|
1955
|
-
export declare function usePersistenceState<T = unknown>(key: string, defaultValue?: T | (() => T), opts?: PersistenceStateOptions<T>): [T, PersistenceStateSetter<T>, () => void];
|
|
1956
|
-
|
|
1957
|
-
/**
|
|
1958
|
-
* This hook will respond on Pointer down and then continue to fire events
|
|
1959
|
-
* until the Pointer is released.
|
|
1960
|
-
*
|
|
1961
|
-
* Returns PointerDownListener that should be added to the
|
|
1962
|
-
* source component's onPointerDown event handler.
|
|
1963
|
-
*/
|
|
1964
|
-
export declare function useSynchronizedPointerHandler(options: PointerHandlerOptions): PointerDownListener;
|
|
1965
|
-
|
|
1966
|
-
export declare function useTraceUpdate(props: any, enabled?: boolean): void;
|
|
1967
|
-
|
|
1968
|
-
/**
|
|
1969
|
-
* Undo manager hook
|
|
1970
|
-
*/
|
|
1971
|
-
export declare const useUndoManager: ({ manager, commands: commandsParent, disabled: propDisabled, }: UndoManagerProps) => UndoManagerResults;
|
|
1972
|
-
|
|
1973
|
-
/**
|
|
1974
|
-
* The virtual scrollbar is for very large scroll area.
|
|
1975
|
-
* Browsers have issues with more than divs more than 6m pixels width/height (which by most account is reasonable).
|
|
1976
|
-
*
|
|
1977
|
-
* This virtualScrollbar also has an elastic component that allows the scrollbar to shrink to its minSize
|
|
1978
|
-
* for easier scrolling for large virtual areas with small content areas. (Similar to excel desktop)
|
|
1979
|
-
*
|
|
1980
|
-
* Note -
|
|
1981
|
-
* Because of the virtual nature of the scrollbar the onScroll method is disabled
|
|
1982
|
-
* and onScrollOffset must be used.
|
|
1983
|
-
*/
|
|
1984
|
-
export declare const VirtualScrollbar: default_2.NamedExoticComponent<Omit<VirtualScrollbarProps, "ref"> & default_2.RefAttributes<IScrollbarElement>>;
|
|
1985
|
-
|
|
1986
|
-
export declare interface VirtualScrollbarProps extends Omit<ScrollbarProps, "onScroll"> {
|
|
1987
|
-
/**
|
|
1988
|
-
* Amount of scrollbar between minSize and totalSize. This is mean to show that there is more scroll area.
|
|
1989
|
-
* @defaultValue 100
|
|
1990
|
-
*/
|
|
1991
|
-
endGap?: number;
|
|
1992
|
-
/**
|
|
1993
|
-
* If this is the minimum scrollbar size.
|
|
1994
|
-
* By default this is the bottom of the viewport but can be extended.
|
|
1995
|
-
* @defaultValue 0
|
|
1996
|
-
*/
|
|
1997
|
-
minSize?: number;
|
|
1998
|
-
/**
|
|
1999
|
-
* Determines the increment amount when the scrollbar has been dragged to the end but is not scrolled to total size.
|
|
2000
|
-
* @defaultValue 100;
|
|
2001
|
-
*/
|
|
2002
|
-
endScrollIncrement?: number;
|
|
2003
|
-
/**
|
|
2004
|
-
* The max size of the area before scaling is implemented.
|
|
2005
|
-
* @defaultValue 1000000
|
|
2006
|
-
*/
|
|
2007
|
-
scaleLimit?: number;
|
|
2008
|
-
/**
|
|
2009
|
-
* The factor amount for physical scaling
|
|
2010
|
-
* @defaultValue 100
|
|
2011
|
-
*/
|
|
2012
|
-
scaleFactor?: number;
|
|
2013
|
-
/**
|
|
2014
|
-
* The default precision. This is a factor of the scale factor.
|
|
2015
|
-
* @defaultValue 50
|
|
2016
|
-
*/
|
|
2017
|
-
precisionFactor?: number;
|
|
2018
|
-
renderScrollbar?: (props: ScrollbarProps) => default_2.ReactNode;
|
|
2019
|
-
}
|
|
2020
|
-
|
|
2021
|
-
export declare function WalkingIcon(props: WalkingIconProps): JSX.Element;
|
|
2022
|
-
|
|
2023
|
-
/**
|
|
2024
|
-
* This wraps an icon with a walking stroke animation.
|
|
2025
|
-
*
|
|
2026
|
-
* @remarks
|
|
2027
|
-
* This requires a 'delegating' glyph icons to passed.
|
|
2028
|
-
* This will then use CSS animation to create a walking stroke effect.
|
|
2029
|
-
*/
|
|
2030
|
-
export declare interface WalkingIconProps extends DynamicIconProps {
|
|
2031
|
-
/** The key of the icon this must be available in the DynamicIconService. */
|
|
2032
|
-
iconKey: IconGlyphKey;
|
|
2033
|
-
/** Animate the stroke marching effect. */
|
|
2034
|
-
isWalking: boolean;
|
|
2035
|
-
/** Map the accent layer to a semantic token; defaults to "info". */
|
|
2036
|
-
themedType?: "accent" | "success" | "info" | "warn" | "error";
|
|
2037
|
-
/** Animation speed in milliseconds. */
|
|
2038
|
-
speed?: number;
|
|
2039
|
-
dashGap?: number;
|
|
2040
|
-
dashLength?: number;
|
|
2041
|
-
}
|
|
2042
|
-
|
|
2043
|
-
export { }
|
|
1
|
+
export * from './src/index'
|
|
2
|
+
export {}
|