@gooddata/sdk-ui-kit 10.28.0-alpha.4 → 10.28.0-alpha.41
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/esm/@ui/@types/size.d.ts +4 -0
- package/esm/@ui/@types/size.d.ts.map +1 -1
- package/esm/@ui/@types/size.js +1 -0
- package/esm/@ui/@types/size.js.map +1 -1
- package/esm/@ui/@utils/keyboardNavigation.d.ts +44 -12
- package/esm/@ui/@utils/keyboardNavigation.d.ts.map +1 -1
- package/esm/@ui/@utils/keyboardNavigation.js +55 -65
- package/esm/@ui/@utils/keyboardNavigation.js.map +1 -1
- package/esm/@ui/UiChip/UiChip.d.ts +2 -1
- package/esm/@ui/UiChip/UiChip.d.ts.map +1 -1
- package/esm/@ui/UiChip/UiChip.js +2 -2
- package/esm/@ui/UiChip/UiChip.js.map +1 -1
- package/esm/@ui/UiFocusTrap/UiFocusTrap.d.ts.map +1 -1
- package/esm/@ui/UiFocusTrap/UiFocusTrap.js +4 -1
- package/esm/@ui/UiFocusTrap/UiFocusTrap.js.map +1 -1
- package/esm/@ui/UiIconButton/UiIconButton.d.ts +2 -2
- package/esm/@ui/UiIconButton/UiIconButton.d.ts.map +1 -1
- package/esm/@ui/UiIconButton/UiIconButton.js +23 -2
- package/esm/@ui/UiIconButton/UiIconButton.js.map +1 -1
- package/esm/@ui/UiListbox/UiListbox.d.ts.map +1 -1
- package/esm/@ui/UiListbox/UiListbox.js +4 -5
- package/esm/@ui/UiListbox/UiListbox.js.map +1 -1
- package/esm/@ui/UiMenu/UiMenu.d.ts +1 -1
- package/esm/@ui/UiMenu/UiMenu.d.ts.map +1 -1
- package/esm/@ui/UiMenu/UiMenu.js +26 -6
- package/esm/@ui/UiMenu/UiMenu.js.map +1 -1
- package/esm/@ui/UiMenu/components/Item.d.ts +4 -0
- package/esm/@ui/UiMenu/components/Item.d.ts.map +1 -0
- package/esm/@ui/UiMenu/components/Item.js +26 -0
- package/esm/@ui/UiMenu/components/Item.js.map +1 -0
- package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuContent.d.ts +10 -0
- package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuContent.d.ts.map +1 -0
- package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuContent.js +29 -0
- package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuContent.js.map +1 -0
- package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuContentItem.d.ts +12 -0
- package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuContentItem.d.ts.map +1 -0
- package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuContentItem.js +60 -0
- package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuContentItem.js.map +1 -0
- package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuGroupItem.d.ts +7 -0
- package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuGroupItem.d.ts.map +1 -0
- package/esm/@ui/UiMenu/{defaults/DefaultUiMenuGroupItemComponent.js → components/defaults/DefaultUiMenuGroupItem.js} +5 -5
- package/esm/@ui/UiMenu/{defaults/DefaultUiMenuGroupItemComponent.js.map → components/defaults/DefaultUiMenuGroupItem.js.map} +1 -1
- package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuHeader.d.ts +8 -0
- package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuHeader.d.ts.map +1 -0
- package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuHeader.js +49 -0
- package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuHeader.js.map +1 -0
- package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuInteractiveItem.d.ts +11 -0
- package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuInteractiveItem.d.ts.map +1 -0
- package/esm/@ui/UiMenu/{defaults/DefaultUiMenuInteractiveItemComponent.js → components/defaults/DefaultUiMenuInteractiveItem.js} +7 -7
- package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuInteractiveItem.js.map +1 -0
- package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuStaticItem.d.ts +8 -0
- package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuStaticItem.d.ts.map +1 -0
- package/esm/@ui/UiMenu/{defaults/DefaultUiMenuStaticItemComponent.js → components/defaults/DefaultUiMenuStaticItem.js} +3 -3
- package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuStaticItem.js.map +1 -0
- package/esm/@ui/UiMenu/context.d.ts +6 -2
- package/esm/@ui/UiMenu/context.d.ts.map +1 -1
- package/esm/@ui/UiMenu/context.js +10 -0
- package/esm/@ui/UiMenu/context.js.map +1 -1
- package/esm/@ui/UiMenu/hooks.d.ts +10 -4
- package/esm/@ui/UiMenu/hooks.d.ts.map +1 -1
- package/esm/@ui/UiMenu/hooks.js +90 -37
- package/esm/@ui/UiMenu/hooks.js.map +1 -1
- package/esm/@ui/UiMenu/itemUtils.d.ts +60 -1
- package/esm/@ui/UiMenu/itemUtils.d.ts.map +1 -1
- package/esm/@ui/UiMenu/itemUtils.js +69 -1
- package/esm/@ui/UiMenu/itemUtils.js.map +1 -1
- package/esm/@ui/UiMenu/types.d.ts +65 -18
- package/esm/@ui/UiMenu/types.d.ts.map +1 -1
- package/esm/Button/Button.d.ts.map +1 -1
- package/esm/Button/Button.js +2 -2
- package/esm/Button/Button.js.map +1 -1
- package/esm/Button/typings.d.ts +1 -0
- package/esm/Button/typings.d.ts.map +1 -1
- package/esm/Dialog/DialogCloseButton.d.ts +3 -0
- package/esm/Dialog/DialogCloseButton.d.ts.map +1 -1
- package/esm/Dialog/DialogCloseButton.js +6 -2
- package/esm/Dialog/DialogCloseButton.js.map +1 -1
- package/esm/Dialog/index.d.ts +1 -0
- package/esm/Dialog/index.d.ts.map +1 -1
- package/esm/Dialog/index.js +2 -1
- package/esm/Dialog/index.js.map +1 -1
- package/esm/Dialog/typings.d.ts +3 -1
- package/esm/Dialog/typings.d.ts.map +1 -1
- package/esm/Dropdown/Dropdown.d.ts +1 -0
- package/esm/Dropdown/Dropdown.d.ts.map +1 -1
- package/esm/Dropdown/Dropdown.js +19 -19
- package/esm/Dropdown/Dropdown.js.map +1 -1
- package/esm/Header/generateHeaderAccountMenuItems.d.ts +0 -4
- package/esm/Header/generateHeaderAccountMenuItems.d.ts.map +1 -1
- package/esm/Header/generateHeaderAccountMenuItems.js +2 -6
- package/esm/Header/generateHeaderAccountMenuItems.js.map +1 -1
- package/esm/List/MenuList.d.ts.map +1 -1
- package/esm/List/MenuList.js +2 -2
- package/esm/List/MenuList.js.map +1 -1
- package/esm/List/guid.d.ts.map +1 -1
- package/esm/List/guid.js +5 -2
- package/esm/List/guid.js.map +1 -1
- package/esm/Menu/menuOpener/MenuOpener.js +2 -2
- package/esm/Menu/menuOpener/MenuOpener.js.map +1 -1
- package/esm/Overlay/Overlay.d.ts.map +1 -1
- package/esm/Overlay/Overlay.js +6 -2
- package/esm/Overlay/Overlay.js.map +1 -1
- package/esm/RecurrenceForm/DateTime.d.ts +1 -0
- package/esm/RecurrenceForm/DateTime.d.ts.map +1 -1
- package/esm/RecurrenceForm/DateTime.js +2 -2
- package/esm/RecurrenceForm/DateTime.js.map +1 -1
- package/esm/RecurrenceForm/Recurrence.d.ts +1 -0
- package/esm/RecurrenceForm/Recurrence.d.ts.map +1 -1
- package/esm/RecurrenceForm/Recurrence.js +2 -2
- package/esm/RecurrenceForm/Recurrence.js.map +1 -1
- package/esm/RecurrenceForm/RecurrenceForm.d.ts +1 -0
- package/esm/RecurrenceForm/RecurrenceForm.d.ts.map +1 -1
- package/esm/RecurrenceForm/RecurrenceForm.js +3 -3
- package/esm/RecurrenceForm/RecurrenceForm.js.map +1 -1
- package/esm/RecurrenceForm/RepeatTypeSelect.d.ts +1 -0
- package/esm/RecurrenceForm/RepeatTypeSelect.d.ts.map +1 -1
- package/esm/RecurrenceForm/RepeatTypeSelect.js +2 -2
- package/esm/RecurrenceForm/RepeatTypeSelect.js.map +1 -1
- package/esm/Timepicker/Timepicker.d.ts +1 -0
- package/esm/Timepicker/Timepicker.d.ts.map +1 -1
- package/esm/Timepicker/Timepicker.js +2 -2
- package/esm/Timepicker/Timepicker.js.map +1 -1
- package/esm/ZoomContext/ZoomContext.js +6 -6
- package/esm/ZoomContext/ZoomContext.js.map +1 -1
- package/esm/index.d.ts +14 -6
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +11 -4
- package/esm/index.js.map +1 -1
- package/esm/responsive/useMediaQuery.d.ts.map +1 -1
- package/esm/responsive/useMediaQuery.js +3 -1
- package/esm/responsive/useMediaQuery.js.map +1 -1
- package/esm/sdk-ui-kit.d.ts +311 -73
- package/esm/syntaxHighlightingInput/SyntaxHighlightingInput.d.ts +7 -5
- package/esm/syntaxHighlightingInput/SyntaxHighlightingInput.d.ts.map +1 -1
- package/esm/syntaxHighlightingInput/SyntaxHighlightingInput.js +2 -1
- package/esm/syntaxHighlightingInput/SyntaxHighlightingInput.js.map +1 -1
- package/esm/syntaxHighlightingInput/hooks/useCodemirror.d.ts +3 -1
- package/esm/syntaxHighlightingInput/hooks/useCodemirror.d.ts.map +1 -1
- package/esm/syntaxHighlightingInput/hooks/useCodemirror.js +26 -1
- package/esm/syntaxHighlightingInput/hooks/useCodemirror.js.map +1 -1
- package/esm/utils/domUtilities.d.ts +8 -1
- package/esm/utils/domUtilities.d.ts.map +1 -1
- package/esm/utils/domUtilities.js +8 -0
- package/esm/utils/domUtilities.js.map +1 -1
- package/esm/utils/useAutofocusOnMount.d.ts +7 -0
- package/esm/utils/useAutofocusOnMount.d.ts.map +1 -0
- package/esm/utils/useAutofocusOnMount.js +40 -0
- package/esm/utils/useAutofocusOnMount.js.map +1 -0
- package/package.json +9 -8
- package/src/@ui/UiMenu/UiMenu.scss +15 -7
- package/styles/css/header.css.map +1 -1
- package/styles/css/main.css +14 -7
- package/styles/css/main.css.map +1 -1
- package/styles/css/shareDialogSelectControl.css.map +1 -1
- package/styles/scss/header.scss +2 -4
- package/styles/scss/shareDialogSelectControl.scss +0 -1
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuGroupItemComponent.d.ts +0 -7
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuGroupItemComponent.d.ts.map +0 -1
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuHeaderComponent.d.ts +0 -9
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuHeaderComponent.d.ts.map +0 -1
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuHeaderComponent.js +0 -39
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuHeaderComponent.js.map +0 -1
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuInteractiveItemComponent.d.ts +0 -11
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuInteractiveItemComponent.d.ts.map +0 -1
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuInteractiveItemComponent.js.map +0 -1
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuStaticItemComponent.d.ts +0 -8
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuStaticItemComponent.d.ts.map +0 -1
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuStaticItemComponent.js.map +0 -1
package/esm/sdk-ui-kit.d.ts
CHANGED
@@ -13,6 +13,7 @@
|
|
13
13
|
|
14
14
|
import { AccessGranularPermission } from '@gooddata/sdk-model';
|
15
15
|
import { ColorFormats } from 'tinycolor2';
|
16
|
+
import { CompletionSource } from '@codemirror/autocomplete';
|
16
17
|
import { Component } from 'react';
|
17
18
|
import { CSSProperties } from 'react';
|
18
19
|
import { DebouncedFunc } from 'lodash';
|
@@ -25,6 +26,7 @@ import { IAnalyticalBackend } from '@gooddata/sdk-backend-spi';
|
|
25
26
|
import { IAuditableUsers } from '@gooddata/sdk-model';
|
26
27
|
import { IColorPalette } from '@gooddata/sdk-model';
|
27
28
|
import { IColorPaletteDefinition } from '@gooddata/sdk-model';
|
29
|
+
import { IContextStore } from '@gooddata/sdk-ui';
|
28
30
|
import { IExecutionConfig } from '@gooddata/sdk-model';
|
29
31
|
import { IFilter } from '@gooddata/sdk-model';
|
30
32
|
import { ILocale } from '@gooddata/sdk-ui';
|
@@ -560,15 +562,51 @@ export declare function DefaultUiListboxInteractiveItemComponent<T>({ item, isFo
|
|
560
562
|
export declare function DefaultUiListboxStaticItemComponent<T>({ item, }: UiListboxStaticItemProps<T>): React_2.ReactNode;
|
561
563
|
|
562
564
|
/**
|
565
|
+
* Container for rendering custom content in menu.
|
563
566
|
* @internal
|
564
567
|
*/
|
565
|
-
export declare
|
568
|
+
export declare const DefaultUiMenuContent: React_2.MemoExoticComponent<(<T extends IUiMenuItemData = object>({ item }: {
|
569
|
+
item: IUiMenuContentItem<T>;
|
570
|
+
}) => React_2.ReactElement)>;
|
571
|
+
|
572
|
+
/**
|
573
|
+
* @internal
|
574
|
+
*/
|
575
|
+
export declare function DefaultUiMenuContentItem<T extends IUiMenuItemData = object>({ item, isFocused, onSelect, }: IUiMenuContentItemProps<T>): React_2.ReactNode;
|
576
|
+
|
577
|
+
/**
|
578
|
+
* Default component for rendering content menu items.
|
579
|
+
* @internal
|
580
|
+
*/
|
581
|
+
export declare const DefaultUiMenuContentItemWrapper: React_2.MemoExoticComponent<(<T extends IUiMenuItemData = object>({ item }: IUiMenuContentItemWrapperProps<T>) => React_2.ReactElement)>;
|
582
|
+
|
583
|
+
/**
|
584
|
+
* @internal
|
585
|
+
*/
|
586
|
+
export declare function DefaultUiMenuGroupItem<T extends IUiMenuItemData = object>({ item, }: IUiMenuGroupItemProps<T>): React_2.ReactNode;
|
587
|
+
|
588
|
+
/**
|
589
|
+
* Renders the submenu header when in a submenu.
|
590
|
+
* If not in a submenu, returns null.
|
591
|
+
* @internal
|
592
|
+
*/
|
593
|
+
export declare const DefaultUiMenuHeader: React_2.FC;
|
594
|
+
|
595
|
+
/**
|
596
|
+
* @internal
|
597
|
+
*/
|
598
|
+
export declare function DefaultUiMenuInteractiveItem<T extends IUiMenuItemData = object>({ item, isFocused, onSelect, }: IUiMenuInteractiveItemProps<T>): React_2.ReactNode;
|
599
|
+
|
600
|
+
/**
|
601
|
+
* @internal
|
602
|
+
*/
|
603
|
+
export declare function DefaultUiMenuInteractiveItemWrapper<T extends IUiMenuItemData = object>({ item, }: IUiMenuInteractiveItemWrapperProps<T>): React_2.ReactNode;
|
566
604
|
|
567
605
|
/**
|
568
606
|
* By default just renders the data.
|
569
607
|
* @internal
|
570
608
|
*/
|
571
|
-
export declare const
|
609
|
+
export declare const DefaultUiMenuStaticItem: React_2.MemoExoticComponent<(<T extends IUiMenuItemData = object>({ item }: IUiMenuStaticItemProps<T>) => React_2.ReactElement)>;
|
572
610
|
|
573
611
|
/**
|
574
612
|
* @internal
|
@@ -620,6 +658,11 @@ export declare const Dialog: React_2.NamedExoticComponent<IDialogProps>;
|
|
620
658
|
*/
|
621
659
|
export declare const DialogBase: React_2.NamedExoticComponent<IDialogBaseProps>;
|
622
660
|
|
661
|
+
/**
|
662
|
+
* @internal
|
663
|
+
*/
|
664
|
+
export declare const DialogCloseButton: React_2.FC<IDialogCloseButtonProps>;
|
665
|
+
|
623
666
|
/**
|
624
667
|
* @internal
|
625
668
|
*/
|
@@ -746,6 +789,18 @@ export declare const FilterLabel: React_2.FC<WithIntlProps<IFilterLabelProps & W
|
|
746
789
|
WrappedComponent: React_2.ComponentType<IFilterLabelProps & WrappedComponentProps>;
|
747
790
|
};
|
748
791
|
|
792
|
+
/**
|
793
|
+
* Finds an interactive menu item that matches the predicate.
|
794
|
+
* @internal
|
795
|
+
*/
|
796
|
+
export declare const findInteractiveItem: <T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[], predicate: (item: IUiMenuInteractiveItem<T>) => boolean) => IUiMenuInteractiveItem<T>;
|
797
|
+
|
798
|
+
/**
|
799
|
+
* Recursively finds an item in the menu tree that matches the predicate.
|
800
|
+
* @internal
|
801
|
+
*/
|
802
|
+
export declare const findItem: <T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[], predicate: (item: IUiMenuItem<T>) => boolean) => IUiMenuItem<T>;
|
803
|
+
|
749
804
|
/**
|
750
805
|
* @internal
|
751
806
|
*/
|
@@ -812,11 +867,6 @@ export declare const GD_COLOR_STATE_HOVER = "#94a1ad";
|
|
812
867
|
*/
|
813
868
|
export declare const GD_COLOR_WHITE = "#fff";
|
814
869
|
|
815
|
-
/**
|
816
|
-
* @internal
|
817
|
-
*/
|
818
|
-
export declare function generateHeaderAccountMenuItems(workspacePermissions: IWorkspacePermissions, uiSettings: IUiSettings, workspaceId?: string, showOnlyLogoutItem?: boolean, featureFlags?: ISettings): IHeaderMenuItem[];
|
819
|
-
|
820
870
|
/**
|
821
871
|
* @internal
|
822
872
|
*/
|
@@ -842,6 +892,17 @@ export declare function generateHeaderStaticHelpMenuItems(documentationUrl?: str
|
|
842
892
|
*/
|
843
893
|
export declare function generateSupportUrl(projectId?: string, sessionId?: string, userEmail?: string, url?: string): string;
|
844
894
|
|
895
|
+
/**
|
896
|
+
* Gets the closest focusable sibling item in the specified direction.
|
897
|
+
* @internal
|
898
|
+
*/
|
899
|
+
export declare const getClosestFocusableSibling: <T extends IUiMenuItemData = object>(args: {
|
900
|
+
items: IUiMenuItem<T>[];
|
901
|
+
isItemFocusable: (item: IUiMenuItem<T>) => boolean;
|
902
|
+
itemId?: string;
|
903
|
+
direction: "forward" | "backward";
|
904
|
+
}) => IUiMenuItem<T>;
|
905
|
+
|
845
906
|
/**
|
846
907
|
* This function transforms a color palette into an array of max ten colors which is used
|
847
908
|
* to render the color palette in styling picker.
|
@@ -881,7 +942,7 @@ export declare const getDefaultEmbedTypeOptions: (embedType: EmbedType) => Embed
|
|
881
942
|
* @param element - the element to get the focusable elements from
|
882
943
|
* @returns an object containing the focusable elements, the first focusable element, and the last focusable element
|
883
944
|
*/
|
884
|
-
export declare const getFocusableElements: (element?: HTMLElement) => {
|
945
|
+
export declare const getFocusableElements: (element?: HTMLElement | null) => {
|
885
946
|
focusableElements: NodeListOf<HTMLElement>;
|
886
947
|
firstElement: HTMLElement;
|
887
948
|
lastElement: HTMLElement;
|
@@ -897,6 +958,36 @@ export declare const getGranteeItemTestId: (grantee: GranteeItem, prefix?: "opti
|
|
897
958
|
*/
|
898
959
|
export declare const getHeightWithUnitsForEmbedCode: (codeOption: EmbedOptionsType) => string | number;
|
899
960
|
|
961
|
+
/**
|
962
|
+
* Gets an interactive menu item by its ID.
|
963
|
+
* @internal
|
964
|
+
*/
|
965
|
+
export declare const getInteractiveItem: <T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[], itemId: string) => IUiMenuInteractiveItem<T>;
|
966
|
+
|
967
|
+
/**
|
968
|
+
* Gets a menu item by its ID.
|
969
|
+
* @internal
|
970
|
+
*/
|
971
|
+
export declare const getItem: <T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[], itemId: string) => IUiMenuItem<T>;
|
972
|
+
|
973
|
+
/**
|
974
|
+
* Gets the interactive parent of a menu item.
|
975
|
+
* @internal
|
976
|
+
*/
|
977
|
+
export declare const getItemInteractiveParent: <T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[], itemId: string) => IUiMenuInteractiveItem<T>;
|
978
|
+
|
979
|
+
/**
|
980
|
+
* Gets all items under a specific interactive parent item.
|
981
|
+
* @internal
|
982
|
+
*/
|
983
|
+
export declare const getItemsByInteractiveParent: <T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[], parentId?: string) => IUiMenuItem<T>[];
|
984
|
+
|
985
|
+
/**
|
986
|
+
* Gets all next sibling items of a menu item with wraparound.
|
987
|
+
* @internal
|
988
|
+
*/
|
989
|
+
export declare const getNextSiblings: <T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[], itemId: string) => IUiMenuItem<T>[];
|
990
|
+
|
900
991
|
/**
|
901
992
|
* @internal
|
902
993
|
*/
|
@@ -929,11 +1020,28 @@ export declare type GetPositionedSelfRegion = {
|
|
929
1020
|
alignPoint: IAlignPoint;
|
930
1021
|
};
|
931
1022
|
|
1023
|
+
/**
|
1024
|
+
* Gets all previous sibling items of a menu item with wraparound.
|
1025
|
+
* @internal
|
1026
|
+
*/
|
1027
|
+
export declare const getPreviousSiblings: <T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[], itemId: string) => IUiMenuItem<T>[];
|
1028
|
+
|
932
1029
|
/**
|
933
1030
|
* @internal
|
934
1031
|
*/
|
935
1032
|
export declare function getRecommendedDateDataset<T extends IDateDataset>(items: T[]): T;
|
936
1033
|
|
1034
|
+
/**
|
1035
|
+
* @internal
|
1036
|
+
*/
|
1037
|
+
export declare const getSelectedMenuId: <T extends IUiMenuItemData = object, M = object>(context: IUiMenuContext<T, M>) => string | undefined;
|
1038
|
+
|
1039
|
+
/**
|
1040
|
+
* Gets all sibling items of a menu item.
|
1041
|
+
* @internal
|
1042
|
+
*/
|
1043
|
+
export declare const getSiblingItems: <T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[], itemId: string) => IUiMenuItem<T>[];
|
1044
|
+
|
937
1045
|
/**
|
938
1046
|
* @internal
|
939
1047
|
*/
|
@@ -1399,6 +1507,7 @@ export declare interface IButtonAccessibilityConfig extends IAccessibilityConfig
|
|
1399
1507
|
*/
|
1400
1508
|
export declare interface IButtonProps {
|
1401
1509
|
id?: string;
|
1510
|
+
dataId?: string;
|
1402
1511
|
className?: string;
|
1403
1512
|
disabled?: boolean;
|
1404
1513
|
tabIndex?: number;
|
@@ -1789,7 +1898,9 @@ export declare interface IDialogBaseProps {
|
|
1789
1898
|
/**
|
1790
1899
|
* @internal
|
1791
1900
|
*/
|
1792
|
-
export declare type IDialogCloseButtonProps = Pick<IDialogBaseProps, "onClose" | "accessibilityConfig"
|
1901
|
+
export declare type IDialogCloseButtonProps = Pick<IDialogBaseProps, "onClose" | "accessibilityConfig"> & {
|
1902
|
+
className?: string;
|
1903
|
+
};
|
1793
1904
|
|
1794
1905
|
/**
|
1795
1906
|
* @internal
|
@@ -1940,6 +2051,7 @@ export declare interface IDropdownButtonRenderProps {
|
|
1940
2051
|
toggleDropdown: (desiredState?: boolean | unknown) => void;
|
1941
2052
|
ariaAttributes: {
|
1942
2053
|
role: "button" | string;
|
2054
|
+
"data-popupId": string;
|
1943
2055
|
} & Pick<React_2.AriaAttributes, "aria-haspopup" | "aria-expanded" | "aria-controls">;
|
1944
2056
|
}
|
1945
2057
|
|
@@ -2326,6 +2438,14 @@ export declare interface IGranularGranteeUser extends IGranteeBase {
|
|
2326
2438
|
inheritedPermissions: AccessGranularPermission[];
|
2327
2439
|
}
|
2328
2440
|
|
2441
|
+
/**
|
2442
|
+
* @internal
|
2443
|
+
*/
|
2444
|
+
export declare interface IHandleActionOptions {
|
2445
|
+
shouldPreventDefault?: boolean;
|
2446
|
+
shouldStopPropagation?: boolean;
|
2447
|
+
}
|
2448
|
+
|
2329
2449
|
/**
|
2330
2450
|
* @internal
|
2331
2451
|
*/
|
@@ -3235,6 +3355,11 @@ export declare interface IMetadataListProps {
|
|
3235
3355
|
list?: IMetadataObjectBase[];
|
3236
3356
|
}
|
3237
3357
|
|
3358
|
+
/**
|
3359
|
+
* @internal
|
3360
|
+
*/
|
3361
|
+
export declare type IModifier = React_2.ModifierKey | `${typeof modifierNegator}${React_2.ModifierKey}`;
|
3362
|
+
|
3238
3363
|
/**
|
3239
3364
|
* @internal
|
3240
3365
|
*/
|
@@ -3712,6 +3837,7 @@ export declare interface IRecurrenceFormProps {
|
|
3712
3837
|
showInheritValue?: boolean;
|
3713
3838
|
isWhiteLabeled?: boolean;
|
3714
3839
|
onRecurrenceDropdownOpen?: () => void;
|
3840
|
+
closeDropdownsOnParentScroll?: boolean;
|
3715
3841
|
}
|
3716
3842
|
|
3717
3843
|
/**
|
@@ -3735,6 +3861,7 @@ export declare interface IRecurrenceProps {
|
|
3735
3861
|
showTimezoneInOccurrence?: boolean;
|
3736
3862
|
isWhiteLabeled?: boolean;
|
3737
3863
|
onRecurrenceDropdownOpen?: () => void;
|
3864
|
+
closeOnParentScroll?: boolean;
|
3738
3865
|
}
|
3739
3866
|
|
3740
3867
|
/**
|
@@ -3904,6 +4031,13 @@ export declare interface IScrollGradientProps {
|
|
3904
4031
|
*/
|
3905
4032
|
export declare const isDateDatasetHeader: (obj: unknown) => obj is IDateDatasetHeader;
|
3906
4033
|
|
4034
|
+
/**
|
4035
|
+
* @internal
|
4036
|
+
* @param element - the element to test for focusability
|
4037
|
+
* @returns whether or not the supplied element is focusable
|
4038
|
+
*/
|
4039
|
+
export declare const isElementFocusable: (element?: HTMLElement | null) => boolean;
|
4040
|
+
|
3907
4041
|
/**
|
3908
4042
|
* @internal
|
3909
4043
|
*/
|
@@ -4296,15 +4430,16 @@ export declare interface ISubMenuProps extends IMenuStateConfig, Partial<IMenuPo
|
|
4296
4430
|
*/
|
4297
4431
|
export declare interface ISyntaxHighlightingInputProps {
|
4298
4432
|
value: string;
|
4433
|
+
label?: string;
|
4434
|
+
disabled?: boolean;
|
4435
|
+
className?: string;
|
4436
|
+
placeholder?: string;
|
4437
|
+
extensions?: Extension[];
|
4299
4438
|
onChange: (value: string) => void;
|
4300
4439
|
onApi?: (view: EditorView | null) => void;
|
4301
4440
|
onCursor?: (from: number, to: number) => void;
|
4302
4441
|
onKeyDown?: (event: KeyboardEvent, view: EditorView) => boolean;
|
4303
|
-
|
4304
|
-
label?: string;
|
4305
|
-
extensions?: Extension[];
|
4306
|
-
className?: string;
|
4307
|
-
disabled?: boolean;
|
4442
|
+
onCompletion?: CompletionSource;
|
4308
4443
|
}
|
4309
4444
|
|
4310
4445
|
/**
|
@@ -4385,6 +4520,7 @@ export declare interface ITimepickerOwnProps {
|
|
4385
4520
|
skipNormalizeTime?: boolean;
|
4386
4521
|
timeAnchor?: number;
|
4387
4522
|
timeFormat?: string;
|
4523
|
+
closeOnParentScroll?: boolean;
|
4388
4524
|
}
|
4389
4525
|
|
4390
4526
|
/**
|
@@ -4459,21 +4595,63 @@ export declare interface IUiListboxStaticItem<T> {
|
|
4459
4595
|
/**
|
4460
4596
|
* @internal
|
4461
4597
|
*/
|
4462
|
-
export declare
|
4598
|
+
export declare type IUiMenuContentItem<T extends IUiMenuItemData = object> = {
|
4599
|
+
type: "content";
|
4600
|
+
id: string;
|
4601
|
+
stringTitle: string;
|
4602
|
+
isDisabled?: boolean;
|
4603
|
+
showComponentOnly?: boolean;
|
4604
|
+
data: T["content"];
|
4605
|
+
Component: React_2.ComponentType<{
|
4606
|
+
onBack: () => void;
|
4607
|
+
onClose: () => void;
|
4608
|
+
}>;
|
4609
|
+
};
|
4610
|
+
|
4611
|
+
/**
|
4612
|
+
* @internal
|
4613
|
+
*/
|
4614
|
+
export declare interface IUiMenuContentItemProps<T extends IUiMenuItemData = object> {
|
4615
|
+
item: IUiMenuContentItem<T>;
|
4616
|
+
isFocused: boolean;
|
4617
|
+
onSelect: () => void;
|
4618
|
+
}
|
4619
|
+
|
4620
|
+
/**
|
4621
|
+
* @internal
|
4622
|
+
*/
|
4623
|
+
export declare interface IUiMenuContentItemWrapperProps<T extends IUiMenuItemData = object> {
|
4624
|
+
item: IUiMenuContentItem<T>;
|
4625
|
+
}
|
4626
|
+
|
4627
|
+
/**
|
4628
|
+
* @internal
|
4629
|
+
*/
|
4630
|
+
export declare interface IUiMenuContentProps<T extends IUiMenuItemData = object> {
|
4631
|
+
item: IUiMenuContentItem<T>;
|
4632
|
+
}
|
4633
|
+
|
4634
|
+
/**
|
4635
|
+
* @internal
|
4636
|
+
*/
|
4637
|
+
export declare interface IUiMenuContext<T extends IUiMenuItemData = object, M = object> extends IUiMenuPluggableComponents<T> {
|
4463
4638
|
items: IUiMenuItem<T>[];
|
4464
|
-
focusedItem:
|
4465
|
-
|
4639
|
+
focusedItem: IUiMenuFocusableItem<T> | undefined;
|
4640
|
+
shownCustomContentItemId?: string;
|
4641
|
+
setShownCustomContentItemId: React_2.Dispatch<React_2.SetStateAction<string | undefined>>;
|
4642
|
+
onSelect: (item: IUiMenuFocusableItem<T> | undefined) => void;
|
4466
4643
|
onClose?: () => void;
|
4467
4644
|
setFocusedId: React_2.Dispatch<React_2.SetStateAction<string | undefined>>;
|
4468
4645
|
isItemFocusable: (item: IUiMenuItem<T>) => boolean;
|
4469
4646
|
controlType: IUiMenuControlType;
|
4470
4647
|
setControlType: React_2.Dispatch<React_2.SetStateAction<IUiMenuControlType>>;
|
4471
4648
|
scrollToView: (element: HTMLElement | null) => void;
|
4472
|
-
makeItemId: (item: IUiMenuItem<T>) => string;
|
4649
|
+
makeItemId: (item: IUiMenuItem<T>) => string | undefined;
|
4473
4650
|
itemClassName?: ((item: IUiMenuItem<T>) => string | undefined) | string;
|
4474
|
-
ItemComponent: React_2.ComponentType<
|
4651
|
+
ItemComponent: React_2.ComponentType<IUiMenuItemProps<T>>;
|
4475
4652
|
menuComponentRef: React_2.RefObject<HTMLElement>;
|
4476
4653
|
itemsContainerRef: React_2.RefObject<HTMLElement>;
|
4654
|
+
menuCtxData?: M;
|
4477
4655
|
}
|
4478
4656
|
|
4479
4657
|
/**
|
@@ -4481,6 +4659,11 @@ export declare interface IUiMenuContext<T extends IUiMenuItemData = object> exte
|
|
4481
4659
|
*/
|
4482
4660
|
export declare type IUiMenuControlType = "keyboard" | "mouse" | "unknown";
|
4483
4661
|
|
4662
|
+
/**
|
4663
|
+
* @internal
|
4664
|
+
*/
|
4665
|
+
export declare type IUiMenuFocusableItem<T extends IUiMenuItemData = object> = IUiMenuInteractiveItem<T> | IUiMenuContentItem<T>;
|
4666
|
+
|
4484
4667
|
/**
|
4485
4668
|
* @internal
|
4486
4669
|
*/
|
@@ -4492,6 +4675,13 @@ export declare type IUiMenuGroupItem<T extends IUiMenuItemData = object> = {
|
|
4492
4675
|
subItems: IUiMenuItem<T>[];
|
4493
4676
|
};
|
4494
4677
|
|
4678
|
+
/**
|
4679
|
+
* @internal
|
4680
|
+
*/
|
4681
|
+
export declare interface IUiMenuGroupItemProps<T extends IUiMenuItemData = object> {
|
4682
|
+
item: IUiMenuGroupItem<T>;
|
4683
|
+
}
|
4684
|
+
|
4495
4685
|
/**
|
4496
4686
|
* @internal
|
4497
4687
|
*/
|
@@ -4507,7 +4697,23 @@ export declare type IUiMenuInteractiveItem<T extends IUiMenuItemData = object> =
|
|
4507
4697
|
/**
|
4508
4698
|
* @internal
|
4509
4699
|
*/
|
4510
|
-
export declare
|
4700
|
+
export declare interface IUiMenuInteractiveItemProps<T extends IUiMenuItemData = object> {
|
4701
|
+
item: IUiMenuInteractiveItem<T>;
|
4702
|
+
isFocused: boolean;
|
4703
|
+
onSelect: () => void;
|
4704
|
+
}
|
4705
|
+
|
4706
|
+
/**
|
4707
|
+
* @internal
|
4708
|
+
*/
|
4709
|
+
export declare interface IUiMenuInteractiveItemWrapperProps<T extends IUiMenuItemData = object> {
|
4710
|
+
item: IUiMenuInteractiveItem<T>;
|
4711
|
+
}
|
4712
|
+
|
4713
|
+
/**
|
4714
|
+
* @internal
|
4715
|
+
*/
|
4716
|
+
export declare type IUiMenuItem<T extends IUiMenuItemData = object> = IUiMenuStaticItem<T> | IUiMenuInteractiveItem<T> | IUiMenuGroupItem<T> | IUiMenuContentItem<T>;
|
4511
4717
|
|
4512
4718
|
/**
|
4513
4719
|
* @internal
|
@@ -4516,15 +4722,25 @@ export declare type IUiMenuItemData = {
|
|
4516
4722
|
[type in IUiMenuItem<any>["type"]]?: unknown;
|
4517
4723
|
};
|
4518
4724
|
|
4725
|
+
/**
|
4726
|
+
* @internal
|
4727
|
+
*/
|
4728
|
+
export declare interface IUiMenuItemProps<T extends IUiMenuItemData = object> {
|
4729
|
+
item: IUiMenuItem<T>;
|
4730
|
+
}
|
4731
|
+
|
4519
4732
|
/**
|
4520
4733
|
* @internal
|
4521
4734
|
*/
|
4522
4735
|
export declare interface IUiMenuPluggableComponents<T extends IUiMenuItemData = object> {
|
4523
|
-
|
4524
|
-
|
4525
|
-
|
4526
|
-
|
4527
|
-
|
4736
|
+
InteractiveItem: React_2.ComponentType<IUiMenuInteractiveItemProps<T>>;
|
4737
|
+
InteractiveItemWrapper: React_2.ComponentType<IUiMenuInteractiveItemWrapperProps<T>>;
|
4738
|
+
GroupItem: React_2.ComponentType<IUiMenuGroupItemProps<T>>;
|
4739
|
+
StaticItem: React_2.ComponentType<IUiMenuStaticItemProps<T>>;
|
4740
|
+
ContentItemWrapper: React_2.ComponentType<IUiMenuContentItemWrapperProps<T>>;
|
4741
|
+
ContentItem: React_2.ComponentType<IUiMenuContentItemProps<T>>;
|
4742
|
+
Content: React_2.ComponentType<IUiMenuContentProps<T>>;
|
4743
|
+
MenuHeader: React_2.ComponentType;
|
4528
4744
|
}
|
4529
4745
|
|
4530
4746
|
/**
|
@@ -4536,6 +4752,13 @@ export declare type IUiMenuStaticItem<T extends IUiMenuItemData = object> = {
|
|
4536
4752
|
data: T["static"];
|
4537
4753
|
};
|
4538
4754
|
|
4755
|
+
/**
|
4756
|
+
* @internal
|
4757
|
+
*/
|
4758
|
+
export declare interface IUiMenuStaticItemProps<T extends IUiMenuItemData = object> {
|
4759
|
+
item: IUiMenuStaticItem<T>;
|
4760
|
+
}
|
4761
|
+
|
4539
4762
|
/**
|
4540
4763
|
* @internal
|
4541
4764
|
*/
|
@@ -4760,19 +4983,40 @@ export declare const LocaleSetting: React_2.VFC<ILocaleSettingProps>;
|
|
4760
4983
|
/**
|
4761
4984
|
* @internal
|
4762
4985
|
*/
|
4763
|
-
export declare const
|
4986
|
+
export declare const makeKeyboardNavigation: <ActionKeysMap extends {
|
4987
|
+
[action: string]: {
|
4988
|
+
code: string | string[];
|
4989
|
+
modifiers?: IModifier[];
|
4990
|
+
}[];
|
4991
|
+
}>(actionKeysMap: ActionKeysMap) => <T extends KeyboardEvent | React_2.KeyboardEvent<Element> = React_2.KeyboardEvent<Element>>(handlers: { [action in keyof ActionKeysMap | "onUnhandledKeyDown"]?: (event: T) => void; }, options?: IHandleActionOptions) => (event: T) => void;
|
4992
|
+
|
4993
|
+
/**
|
4994
|
+
* @internal
|
4995
|
+
*/
|
4996
|
+
export declare const makeLinearKeyboardNavigation: <T extends KeyboardEvent | React_2.KeyboardEvent<Element> = React_2.KeyboardEvent<Element>>(handlers: {
|
4997
|
+
onSelect?: (event: T) => void;
|
4998
|
+
onClose?: (event: T) => void;
|
4999
|
+
onFocusPrevious?: (event: T) => void;
|
4764
5000
|
onFocusNext?: (event: T) => void;
|
5001
|
+
onFocusFirst?: (event: T) => void;
|
5002
|
+
onFocusLast?: (event: T) => void;
|
5003
|
+
onUnhandledKeyDown?: (event: T) => void;
|
5004
|
+
}, options?: IHandleActionOptions) => (event: T) => void;
|
5005
|
+
|
5006
|
+
/**
|
5007
|
+
* @internal
|
5008
|
+
*/
|
5009
|
+
export declare const makeMenuKeyboardNavigation: <T extends KeyboardEvent | React_2.KeyboardEvent<Element> = React_2.KeyboardEvent<Element>>(handlers: {
|
5010
|
+
onSelect?: (event: T) => void;
|
5011
|
+
onClose?: (event: T) => void;
|
4765
5012
|
onFocusPrevious?: (event: T) => void;
|
5013
|
+
onFocusNext?: (event: T) => void;
|
4766
5014
|
onFocusFirst?: (event: T) => void;
|
4767
5015
|
onFocusLast?: (event: T) => void;
|
4768
5016
|
onEnterLevel?: (event: T) => void;
|
4769
5017
|
onLeaveLevel?: (event: T) => void;
|
4770
|
-
onSelect?: (event: T) => void;
|
4771
|
-
onClose?: (event: T) => void;
|
4772
5018
|
onUnhandledKeyDown?: (event: T) => void;
|
4773
|
-
|
4774
|
-
shouldStopPropagation?: boolean;
|
4775
|
-
}) => (event: T) => void;
|
5019
|
+
}, options?: IHandleActionOptions) => (event: T) => void;
|
4776
5020
|
|
4777
5021
|
/**
|
4778
5022
|
* @internal
|
@@ -4828,6 +5072,11 @@ export declare const META_DATA_TIMEZONE = "Europe/Prague";
|
|
4828
5072
|
*/
|
4829
5073
|
export declare const MetadataList: React_2.FC<IMetadataListProps>;
|
4830
5074
|
|
5075
|
+
/**
|
5076
|
+
* @internal
|
5077
|
+
*/
|
5078
|
+
export declare const modifierNegator: "!";
|
5079
|
+
|
4831
5080
|
/**
|
4832
5081
|
* @internal
|
4833
5082
|
*/
|
@@ -5265,6 +5514,11 @@ export declare type SizeMedium = "medium";
|
|
5265
5514
|
*/
|
5266
5515
|
export declare type SizeSmall = "small";
|
5267
5516
|
|
5517
|
+
/**
|
5518
|
+
* @internal
|
5519
|
+
*/
|
5520
|
+
export declare type SizeXSmall = "xsmall";
|
5521
|
+
|
5268
5522
|
/**
|
5269
5523
|
* @internal
|
5270
5524
|
*/
|
@@ -5496,6 +5750,11 @@ export declare type TStylingEditorDialogFooterProps = {
|
|
5496
5750
|
*/
|
5497
5751
|
export declare type TUTMContent = "main_menu_help_documentation" | "main_menu_help_university" | "main_menu_help_community" | "main_menu_help_support" | "main_menu_help_ticket" | "main_menu_help_slack";
|
5498
5752
|
|
5753
|
+
/**
|
5754
|
+
* @internal
|
5755
|
+
*/
|
5756
|
+
export declare const typedUiMenuContextStore: <T extends IUiMenuItemData = object, M = object>() => IContextStore<IUiMenuContext<T, M>>;
|
5757
|
+
|
5499
5758
|
/**
|
5500
5759
|
* @internal
|
5501
5760
|
*/
|
@@ -5531,7 +5790,7 @@ export declare interface UiButtonProps {
|
|
5531
5790
|
/**
|
5532
5791
|
* @internal
|
5533
5792
|
*/
|
5534
|
-
export declare const UiChip: ({ label, tag, isDeletable, isActive, isLocked, iconBefore, onClick, onDelete, accessibilityConfig, }: UiChipProps) => React_2.JSX.Element;
|
5793
|
+
export declare const UiChip: ({ label, tag, isDeletable, isActive, isLocked, iconBefore, onClick, onDelete, onDeleteKeyDown, accessibilityConfig, }: UiChipProps) => React_2.JSX.Element;
|
5535
5794
|
|
5536
5795
|
/**
|
5537
5796
|
* @internal
|
@@ -5545,6 +5804,7 @@ export declare interface UiChipProps {
|
|
5545
5804
|
iconBefore?: IconType;
|
5546
5805
|
onClick?: () => void;
|
5547
5806
|
onDelete?: () => void;
|
5807
|
+
onDeleteKeyDown?: (event: React_2.KeyboardEvent<HTMLButtonElement>) => void;
|
5548
5808
|
accessibilityConfig?: IUiChipAccessibilityConfig;
|
5549
5809
|
}
|
5550
5810
|
|
@@ -5598,7 +5858,7 @@ export declare const UiIconButton: React_2.ForwardRefExoticComponent<UiIconButto
|
|
5598
5858
|
export declare interface UiIconButtonProps {
|
5599
5859
|
icon: IconType;
|
5600
5860
|
label: string;
|
5601
|
-
size?: SizeSmall | SizeMedium | SizeLarge;
|
5861
|
+
size?: SizeXSmall | SizeSmall | SizeMedium | SizeLarge;
|
5602
5862
|
variant?: VariantPrimary | VariantSecondary | VariantTertiary | VariantPopOut | VariantDanger;
|
5603
5863
|
isDisabled?: boolean;
|
5604
5864
|
onClick?: (e: React_2.MouseEvent<HTMLButtonElement>) => void;
|
@@ -5670,47 +5930,18 @@ export declare interface UiListboxStaticItemProps<T> {
|
|
5670
5930
|
*
|
5671
5931
|
* @internal
|
5672
5932
|
*/
|
5673
|
-
export declare function UiMenu<T extends IUiMenuItemData = object>(props: UiMenuProps<T>): React_2.ReactNode;
|
5933
|
+
export declare function UiMenu<T extends IUiMenuItemData = object, M extends object = object>(props: UiMenuProps<T, M>): React_2.ReactNode;
|
5674
5934
|
|
5675
5935
|
/**
|
5676
5936
|
* @internal
|
5677
5937
|
*/
|
5678
|
-
export declare interface
|
5679
|
-
item: IUiMenuGroupItem<T>;
|
5680
|
-
}
|
5681
|
-
|
5682
|
-
/**
|
5683
|
-
* @internal
|
5684
|
-
*/
|
5685
|
-
export declare interface UiMenuInteractiveItemProps<T extends IUiMenuItemData = object> {
|
5686
|
-
item: IUiMenuInteractiveItem<T>;
|
5687
|
-
isFocused: boolean;
|
5688
|
-
onSelect: () => void;
|
5689
|
-
}
|
5690
|
-
|
5691
|
-
/**
|
5692
|
-
* @internal
|
5693
|
-
*/
|
5694
|
-
export declare interface UiMenuInteractiveItemWrapperProps<T extends IUiMenuItemData = object> {
|
5695
|
-
item: IUiMenuInteractiveItem<T>;
|
5696
|
-
}
|
5697
|
-
|
5698
|
-
/**
|
5699
|
-
* @internal
|
5700
|
-
*/
|
5701
|
-
export declare interface UiMenuItemProps<T extends IUiMenuItemData = object> {
|
5702
|
-
item: IUiMenuItem<T>;
|
5703
|
-
}
|
5704
|
-
|
5705
|
-
/**
|
5706
|
-
* @internal
|
5707
|
-
*/
|
5708
|
-
export declare interface UiMenuProps<T extends IUiMenuItemData = object> extends Partial<IUiMenuPluggableComponents<T>> {
|
5938
|
+
export declare interface UiMenuProps<T extends IUiMenuItemData = object, M = object> extends Partial<IUiMenuPluggableComponents<T>> {
|
5709
5939
|
items: IUiMenuItem<T>[];
|
5710
|
-
className?: string;
|
5940
|
+
className?: ((context: IUiMenuContext<T>) => string | undefined) | string;
|
5711
5941
|
itemClassName?: ((item: IUiMenuItem<T>) => string | undefined) | string;
|
5712
5942
|
maxWidth?: number;
|
5713
5943
|
onSelect?: (item: IUiMenuInteractiveItem<T>) => void;
|
5944
|
+
onLevelChange?: (level: number, item?: IUiMenuContentItem<T> | IUiMenuInteractiveItem<T>) => void;
|
5714
5945
|
onClose?: () => void;
|
5715
5946
|
onUnhandledKeyDown?: (event: React_2.KeyboardEvent, context: IUiMenuContext<T>) => void;
|
5716
5947
|
shouldKeyboardActionPreventDefault?: boolean;
|
@@ -5718,13 +5949,7 @@ export declare interface UiMenuProps<T extends IUiMenuItemData = object> extends
|
|
5718
5949
|
shouldCloseOnSelect?: boolean;
|
5719
5950
|
isDisabledFocusable?: boolean;
|
5720
5951
|
ariaAttributes: Omit<IDropdownBodyRenderProps["ariaAttributes"], "role">;
|
5721
|
-
|
5722
|
-
|
5723
|
-
/**
|
5724
|
-
* @internal
|
5725
|
-
*/
|
5726
|
-
export declare interface UiMenuStaticItemProps<T extends IUiMenuItemData = object> {
|
5727
|
-
item: IUiMenuStaticItem<T>;
|
5952
|
+
menuCtxData?: M;
|
5728
5953
|
}
|
5729
5954
|
|
5730
5955
|
/**
|
@@ -5801,6 +6026,19 @@ export declare type UnitsType = "px" | "%" | "rem" | "em";
|
|
5801
6026
|
*/
|
5802
6027
|
export declare const unrelatedHeader: IDateDatasetHeader;
|
5803
6028
|
|
6029
|
+
/**
|
6030
|
+
* Unwraps items from group containers into a flat array.
|
6031
|
+
* @internal
|
6032
|
+
*/
|
6033
|
+
export declare function unwrapGroupItems<T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[]): IUiMenuItem<T>[];
|
6034
|
+
|
6035
|
+
/**
|
6036
|
+
* Focuses the element when it mounts.
|
6037
|
+
*
|
6038
|
+
* @internal
|
6039
|
+
*/
|
6040
|
+
export declare const useAutofocusOnMount: (timeout?: number) => (node: HTMLElement | null) => void;
|
6041
|
+
|
5804
6042
|
/**
|
5805
6043
|
* A helper hook to provide not just state/setState pair but also a debounced version of the state.
|
5806
6044
|
* @internal
|
@@ -1,20 +1,22 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import { EditorView } from "@codemirror/view";
|
3
3
|
import { Extension } from "@codemirror/state";
|
4
|
+
import { CompletionSource } from "@codemirror/autocomplete";
|
4
5
|
/**
|
5
6
|
* @internal
|
6
7
|
*/
|
7
8
|
export interface ISyntaxHighlightingInputProps {
|
8
9
|
value: string;
|
10
|
+
label?: string;
|
11
|
+
disabled?: boolean;
|
12
|
+
className?: string;
|
13
|
+
placeholder?: string;
|
14
|
+
extensions?: Extension[];
|
9
15
|
onChange: (value: string) => void;
|
10
16
|
onApi?: (view: EditorView | null) => void;
|
11
17
|
onCursor?: (from: number, to: number) => void;
|
12
18
|
onKeyDown?: (event: KeyboardEvent, view: EditorView) => boolean;
|
13
|
-
|
14
|
-
label?: string;
|
15
|
-
extensions?: Extension[];
|
16
|
-
className?: string;
|
17
|
-
disabled?: boolean;
|
19
|
+
onCompletion?: CompletionSource;
|
18
20
|
}
|
19
21
|
/**
|
20
22
|
* @internal
|