@gooddata/sdk-ui-kit 10.28.0-alpha.3 → 10.28.0-alpha.30

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.
Files changed (151) hide show
  1. package/esm/@ui/@types/size.d.ts +4 -0
  2. package/esm/@ui/@types/size.d.ts.map +1 -1
  3. package/esm/@ui/@types/size.js +1 -0
  4. package/esm/@ui/@types/size.js.map +1 -1
  5. package/esm/@ui/UiChip/UiChip.d.ts +2 -1
  6. package/esm/@ui/UiChip/UiChip.d.ts.map +1 -1
  7. package/esm/@ui/UiChip/UiChip.js +2 -2
  8. package/esm/@ui/UiChip/UiChip.js.map +1 -1
  9. package/esm/@ui/UiFocusTrap/UiFocusTrap.d.ts.map +1 -1
  10. package/esm/@ui/UiFocusTrap/UiFocusTrap.js +4 -1
  11. package/esm/@ui/UiFocusTrap/UiFocusTrap.js.map +1 -1
  12. package/esm/@ui/UiIconButton/UiIconButton.d.ts +2 -2
  13. package/esm/@ui/UiIconButton/UiIconButton.d.ts.map +1 -1
  14. package/esm/@ui/UiIconButton/UiIconButton.js +23 -2
  15. package/esm/@ui/UiIconButton/UiIconButton.js.map +1 -1
  16. package/esm/@ui/UiMenu/UiMenu.d.ts +1 -1
  17. package/esm/@ui/UiMenu/UiMenu.d.ts.map +1 -1
  18. package/esm/@ui/UiMenu/UiMenu.js +26 -6
  19. package/esm/@ui/UiMenu/UiMenu.js.map +1 -1
  20. package/esm/@ui/UiMenu/components/Item.d.ts +4 -0
  21. package/esm/@ui/UiMenu/components/Item.d.ts.map +1 -0
  22. package/esm/@ui/UiMenu/components/Item.js +26 -0
  23. package/esm/@ui/UiMenu/components/Item.js.map +1 -0
  24. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuContent.d.ts +10 -0
  25. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuContent.d.ts.map +1 -0
  26. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuContent.js +29 -0
  27. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuContent.js.map +1 -0
  28. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuContentItem.d.ts +12 -0
  29. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuContentItem.d.ts.map +1 -0
  30. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuContentItem.js +60 -0
  31. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuContentItem.js.map +1 -0
  32. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuGroupItem.d.ts +7 -0
  33. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuGroupItem.d.ts.map +1 -0
  34. package/esm/@ui/UiMenu/{defaults/DefaultUiMenuGroupItemComponent.js → components/defaults/DefaultUiMenuGroupItem.js} +5 -5
  35. package/esm/@ui/UiMenu/{defaults/DefaultUiMenuGroupItemComponent.js.map → components/defaults/DefaultUiMenuGroupItem.js.map} +1 -1
  36. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuHeader.d.ts +8 -0
  37. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuHeader.d.ts.map +1 -0
  38. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuHeader.js +44 -0
  39. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuHeader.js.map +1 -0
  40. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuInteractiveItem.d.ts +11 -0
  41. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuInteractiveItem.d.ts.map +1 -0
  42. package/esm/@ui/UiMenu/{defaults/DefaultUiMenuInteractiveItemComponent.js → components/defaults/DefaultUiMenuInteractiveItem.js} +7 -7
  43. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuInteractiveItem.js.map +1 -0
  44. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuStaticItem.d.ts +8 -0
  45. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuStaticItem.d.ts.map +1 -0
  46. package/esm/@ui/UiMenu/{defaults/DefaultUiMenuStaticItemComponent.js → components/defaults/DefaultUiMenuStaticItem.js} +3 -3
  47. package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuStaticItem.js.map +1 -0
  48. package/esm/@ui/UiMenu/context.d.ts +6 -2
  49. package/esm/@ui/UiMenu/context.d.ts.map +1 -1
  50. package/esm/@ui/UiMenu/context.js +10 -0
  51. package/esm/@ui/UiMenu/context.js.map +1 -1
  52. package/esm/@ui/UiMenu/hooks.d.ts +10 -4
  53. package/esm/@ui/UiMenu/hooks.d.ts.map +1 -1
  54. package/esm/@ui/UiMenu/hooks.js +86 -35
  55. package/esm/@ui/UiMenu/hooks.js.map +1 -1
  56. package/esm/@ui/UiMenu/itemUtils.d.ts +60 -1
  57. package/esm/@ui/UiMenu/itemUtils.d.ts.map +1 -1
  58. package/esm/@ui/UiMenu/itemUtils.js +69 -1
  59. package/esm/@ui/UiMenu/itemUtils.js.map +1 -1
  60. package/esm/@ui/UiMenu/types.d.ts +65 -18
  61. package/esm/@ui/UiMenu/types.d.ts.map +1 -1
  62. package/esm/Button/Button.d.ts.map +1 -1
  63. package/esm/Button/Button.js +2 -2
  64. package/esm/Button/Button.js.map +1 -1
  65. package/esm/Button/typings.d.ts +1 -0
  66. package/esm/Button/typings.d.ts.map +1 -1
  67. package/esm/Dropdown/Dropdown.d.ts +1 -0
  68. package/esm/Dropdown/Dropdown.d.ts.map +1 -1
  69. package/esm/Dropdown/Dropdown.js +19 -19
  70. package/esm/Dropdown/Dropdown.js.map +1 -1
  71. package/esm/Header/generateHeaderAccountMenuItems.d.ts +0 -4
  72. package/esm/Header/generateHeaderAccountMenuItems.d.ts.map +1 -1
  73. package/esm/Header/generateHeaderAccountMenuItems.js +2 -6
  74. package/esm/Header/generateHeaderAccountMenuItems.js.map +1 -1
  75. package/esm/List/MenuList.d.ts.map +1 -1
  76. package/esm/List/MenuList.js +2 -2
  77. package/esm/List/MenuList.js.map +1 -1
  78. package/esm/List/guid.d.ts.map +1 -1
  79. package/esm/List/guid.js +5 -2
  80. package/esm/List/guid.js.map +1 -1
  81. package/esm/Menu/menuOpener/MenuOpener.js +2 -2
  82. package/esm/Menu/menuOpener/MenuOpener.js.map +1 -1
  83. package/esm/Overlay/Overlay.d.ts.map +1 -1
  84. package/esm/Overlay/Overlay.js +6 -2
  85. package/esm/Overlay/Overlay.js.map +1 -1
  86. package/esm/RecurrenceForm/DateTime.d.ts +1 -0
  87. package/esm/RecurrenceForm/DateTime.d.ts.map +1 -1
  88. package/esm/RecurrenceForm/DateTime.js +2 -2
  89. package/esm/RecurrenceForm/DateTime.js.map +1 -1
  90. package/esm/RecurrenceForm/Recurrence.d.ts +1 -0
  91. package/esm/RecurrenceForm/Recurrence.d.ts.map +1 -1
  92. package/esm/RecurrenceForm/Recurrence.js +2 -2
  93. package/esm/RecurrenceForm/Recurrence.js.map +1 -1
  94. package/esm/RecurrenceForm/RecurrenceForm.d.ts +1 -0
  95. package/esm/RecurrenceForm/RecurrenceForm.d.ts.map +1 -1
  96. package/esm/RecurrenceForm/RecurrenceForm.js +3 -3
  97. package/esm/RecurrenceForm/RecurrenceForm.js.map +1 -1
  98. package/esm/RecurrenceForm/RepeatTypeSelect.d.ts +1 -0
  99. package/esm/RecurrenceForm/RepeatTypeSelect.d.ts.map +1 -1
  100. package/esm/RecurrenceForm/RepeatTypeSelect.js +2 -2
  101. package/esm/RecurrenceForm/RepeatTypeSelect.js.map +1 -1
  102. package/esm/Timepicker/Timepicker.d.ts +1 -0
  103. package/esm/Timepicker/Timepicker.d.ts.map +1 -1
  104. package/esm/Timepicker/Timepicker.js +2 -2
  105. package/esm/Timepicker/Timepicker.js.map +1 -1
  106. package/esm/ZoomContext/ZoomContext.js +6 -6
  107. package/esm/ZoomContext/ZoomContext.js.map +1 -1
  108. package/esm/index.d.ts +10 -4
  109. package/esm/index.d.ts.map +1 -1
  110. package/esm/index.js +8 -2
  111. package/esm/index.js.map +1 -1
  112. package/esm/responsive/useMediaQuery.d.ts.map +1 -1
  113. package/esm/responsive/useMediaQuery.js +3 -1
  114. package/esm/responsive/useMediaQuery.js.map +1 -1
  115. package/esm/sdk-ui-kit.d.ts +243 -65
  116. package/esm/syntaxHighlightingInput/SyntaxHighlightingInput.d.ts +7 -5
  117. package/esm/syntaxHighlightingInput/SyntaxHighlightingInput.d.ts.map +1 -1
  118. package/esm/syntaxHighlightingInput/SyntaxHighlightingInput.js +2 -1
  119. package/esm/syntaxHighlightingInput/SyntaxHighlightingInput.js.map +1 -1
  120. package/esm/syntaxHighlightingInput/hooks/useCodemirror.d.ts +3 -1
  121. package/esm/syntaxHighlightingInput/hooks/useCodemirror.d.ts.map +1 -1
  122. package/esm/syntaxHighlightingInput/hooks/useCodemirror.js +26 -1
  123. package/esm/syntaxHighlightingInput/hooks/useCodemirror.js.map +1 -1
  124. package/esm/utils/domUtilities.d.ts +6 -0
  125. package/esm/utils/domUtilities.d.ts.map +1 -1
  126. package/esm/utils/domUtilities.js +8 -0
  127. package/esm/utils/domUtilities.js.map +1 -1
  128. package/esm/utils/useAutofocusOnMount.d.ts +7 -0
  129. package/esm/utils/useAutofocusOnMount.d.ts.map +1 -0
  130. package/esm/utils/useAutofocusOnMount.js +40 -0
  131. package/esm/utils/useAutofocusOnMount.js.map +1 -0
  132. package/package.json +9 -8
  133. package/src/@ui/UiMenu/UiMenu.scss +15 -7
  134. package/styles/css/header.css.map +1 -1
  135. package/styles/css/main.css +14 -7
  136. package/styles/css/main.css.map +1 -1
  137. package/styles/css/shareDialogSelectControl.css.map +1 -1
  138. package/styles/scss/header.scss +2 -4
  139. package/styles/scss/shareDialogSelectControl.scss +0 -1
  140. package/esm/@ui/UiMenu/defaults/DefaultUiMenuGroupItemComponent.d.ts +0 -7
  141. package/esm/@ui/UiMenu/defaults/DefaultUiMenuGroupItemComponent.d.ts.map +0 -1
  142. package/esm/@ui/UiMenu/defaults/DefaultUiMenuHeaderComponent.d.ts +0 -9
  143. package/esm/@ui/UiMenu/defaults/DefaultUiMenuHeaderComponent.d.ts.map +0 -1
  144. package/esm/@ui/UiMenu/defaults/DefaultUiMenuHeaderComponent.js +0 -39
  145. package/esm/@ui/UiMenu/defaults/DefaultUiMenuHeaderComponent.js.map +0 -1
  146. package/esm/@ui/UiMenu/defaults/DefaultUiMenuInteractiveItemComponent.d.ts +0 -11
  147. package/esm/@ui/UiMenu/defaults/DefaultUiMenuInteractiveItemComponent.d.ts.map +0 -1
  148. package/esm/@ui/UiMenu/defaults/DefaultUiMenuInteractiveItemComponent.js.map +0 -1
  149. package/esm/@ui/UiMenu/defaults/DefaultUiMenuStaticItemComponent.d.ts +0 -8
  150. package/esm/@ui/UiMenu/defaults/DefaultUiMenuStaticItemComponent.d.ts.map +0 -1
  151. package/esm/@ui/UiMenu/defaults/DefaultUiMenuStaticItemComponent.js.map +0 -1
@@ -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 function DefaultUiMenuInteractiveItemComponent<T extends IUiMenuItemData = object>({ item, isFocused, onSelect, }: UiMenuInteractiveItemProps<T>): React_2.ReactNode;
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 DefaultUiMenuStaticItemComponent: React_2.MemoExoticComponent<(<T extends IUiMenuItemData = object>({ item }: UiMenuStaticItemProps<T>) => React_2.ReactElement)>;
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
@@ -746,6 +784,18 @@ export declare const FilterLabel: React_2.FC<WithIntlProps<IFilterLabelProps & W
746
784
  WrappedComponent: React_2.ComponentType<IFilterLabelProps & WrappedComponentProps>;
747
785
  };
748
786
 
787
+ /**
788
+ * Finds an interactive menu item that matches the predicate.
789
+ * @internal
790
+ */
791
+ export declare const findInteractiveItem: <T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[], predicate: (item: IUiMenuInteractiveItem<T>) => boolean) => IUiMenuInteractiveItem<T>;
792
+
793
+ /**
794
+ * Recursively finds an item in the menu tree that matches the predicate.
795
+ * @internal
796
+ */
797
+ export declare const findItem: <T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[], predicate: (item: IUiMenuItem<T>) => boolean) => IUiMenuItem<T>;
798
+
749
799
  /**
750
800
  * @internal
751
801
  */
@@ -812,11 +862,6 @@ export declare const GD_COLOR_STATE_HOVER = "#94a1ad";
812
862
  */
813
863
  export declare const GD_COLOR_WHITE = "#fff";
814
864
 
815
- /**
816
- * @internal
817
- */
818
- export declare function generateHeaderAccountMenuItems(workspacePermissions: IWorkspacePermissions, uiSettings: IUiSettings, workspaceId?: string, showOnlyLogoutItem?: boolean, featureFlags?: ISettings): IHeaderMenuItem[];
819
-
820
865
  /**
821
866
  * @internal
822
867
  */
@@ -842,6 +887,17 @@ export declare function generateHeaderStaticHelpMenuItems(documentationUrl?: str
842
887
  */
843
888
  export declare function generateSupportUrl(projectId?: string, sessionId?: string, userEmail?: string, url?: string): string;
844
889
 
890
+ /**
891
+ * Gets the closest focusable sibling item in the specified direction.
892
+ * @internal
893
+ */
894
+ export declare const getClosestFocusableSibling: <T extends IUiMenuItemData = object>(args: {
895
+ items: IUiMenuItem<T>[];
896
+ isItemFocusable: (item: IUiMenuItem<T>) => boolean;
897
+ itemId?: string;
898
+ direction: "forward" | "backward";
899
+ }) => IUiMenuItem<T>;
900
+
845
901
  /**
846
902
  * This function transforms a color palette into an array of max ten colors which is used
847
903
  * to render the color palette in styling picker.
@@ -897,6 +953,36 @@ export declare const getGranteeItemTestId: (grantee: GranteeItem, prefix?: "opti
897
953
  */
898
954
  export declare const getHeightWithUnitsForEmbedCode: (codeOption: EmbedOptionsType) => string | number;
899
955
 
956
+ /**
957
+ * Gets an interactive menu item by its ID.
958
+ * @internal
959
+ */
960
+ export declare const getInteractiveItem: <T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[], itemId: string) => IUiMenuInteractiveItem<T>;
961
+
962
+ /**
963
+ * Gets a menu item by its ID.
964
+ * @internal
965
+ */
966
+ export declare const getItem: <T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[], itemId: string) => IUiMenuItem<T>;
967
+
968
+ /**
969
+ * Gets the interactive parent of a menu item.
970
+ * @internal
971
+ */
972
+ export declare const getItemInteractiveParent: <T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[], itemId: string) => IUiMenuInteractiveItem<T>;
973
+
974
+ /**
975
+ * Gets all items under a specific interactive parent item.
976
+ * @internal
977
+ */
978
+ export declare const getItemsByInteractiveParent: <T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[], parentId?: string) => IUiMenuItem<T>[];
979
+
980
+ /**
981
+ * Gets all next sibling items of a menu item with wraparound.
982
+ * @internal
983
+ */
984
+ export declare const getNextSiblings: <T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[], itemId: string) => IUiMenuItem<T>[];
985
+
900
986
  /**
901
987
  * @internal
902
988
  */
@@ -929,11 +1015,28 @@ export declare type GetPositionedSelfRegion = {
929
1015
  alignPoint: IAlignPoint;
930
1016
  };
931
1017
 
1018
+ /**
1019
+ * Gets all previous sibling items of a menu item with wraparound.
1020
+ * @internal
1021
+ */
1022
+ export declare const getPreviousSiblings: <T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[], itemId: string) => IUiMenuItem<T>[];
1023
+
932
1024
  /**
933
1025
  * @internal
934
1026
  */
935
1027
  export declare function getRecommendedDateDataset<T extends IDateDataset>(items: T[]): T;
936
1028
 
1029
+ /**
1030
+ * @internal
1031
+ */
1032
+ export declare const getSelectedMenuId: <T extends IUiMenuItemData = object, M = object>(context: IUiMenuContext<T, M>) => string | undefined;
1033
+
1034
+ /**
1035
+ * Gets all sibling items of a menu item.
1036
+ * @internal
1037
+ */
1038
+ export declare const getSiblingItems: <T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[], itemId: string) => IUiMenuItem<T>[];
1039
+
937
1040
  /**
938
1041
  * @internal
939
1042
  */
@@ -1399,6 +1502,7 @@ export declare interface IButtonAccessibilityConfig extends IAccessibilityConfig
1399
1502
  */
1400
1503
  export declare interface IButtonProps {
1401
1504
  id?: string;
1505
+ dataId?: string;
1402
1506
  className?: string;
1403
1507
  disabled?: boolean;
1404
1508
  tabIndex?: number;
@@ -1940,6 +2044,7 @@ export declare interface IDropdownButtonRenderProps {
1940
2044
  toggleDropdown: (desiredState?: boolean | unknown) => void;
1941
2045
  ariaAttributes: {
1942
2046
  role: "button" | string;
2047
+ "data-popupId": string;
1943
2048
  } & Pick<React_2.AriaAttributes, "aria-haspopup" | "aria-expanded" | "aria-controls">;
1944
2049
  }
1945
2050
 
@@ -3712,6 +3817,7 @@ export declare interface IRecurrenceFormProps {
3712
3817
  showInheritValue?: boolean;
3713
3818
  isWhiteLabeled?: boolean;
3714
3819
  onRecurrenceDropdownOpen?: () => void;
3820
+ closeDropdownsOnParentScroll?: boolean;
3715
3821
  }
3716
3822
 
3717
3823
  /**
@@ -3735,6 +3841,7 @@ export declare interface IRecurrenceProps {
3735
3841
  showTimezoneInOccurrence?: boolean;
3736
3842
  isWhiteLabeled?: boolean;
3737
3843
  onRecurrenceDropdownOpen?: () => void;
3844
+ closeOnParentScroll?: boolean;
3738
3845
  }
3739
3846
 
3740
3847
  /**
@@ -4296,15 +4403,16 @@ export declare interface ISubMenuProps extends IMenuStateConfig, Partial<IMenuPo
4296
4403
  */
4297
4404
  export declare interface ISyntaxHighlightingInputProps {
4298
4405
  value: string;
4406
+ label?: string;
4407
+ disabled?: boolean;
4408
+ className?: string;
4409
+ placeholder?: string;
4410
+ extensions?: Extension[];
4299
4411
  onChange: (value: string) => void;
4300
4412
  onApi?: (view: EditorView | null) => void;
4301
4413
  onCursor?: (from: number, to: number) => void;
4302
4414
  onKeyDown?: (event: KeyboardEvent, view: EditorView) => boolean;
4303
- placeholder?: string;
4304
- label?: string;
4305
- extensions?: Extension[];
4306
- className?: string;
4307
- disabled?: boolean;
4415
+ onCompletion?: CompletionSource;
4308
4416
  }
4309
4417
 
4310
4418
  /**
@@ -4385,6 +4493,7 @@ export declare interface ITimepickerOwnProps {
4385
4493
  skipNormalizeTime?: boolean;
4386
4494
  timeAnchor?: number;
4387
4495
  timeFormat?: string;
4496
+ closeOnParentScroll?: boolean;
4388
4497
  }
4389
4498
 
4390
4499
  /**
@@ -4459,21 +4568,63 @@ export declare interface IUiListboxStaticItem<T> {
4459
4568
  /**
4460
4569
  * @internal
4461
4570
  */
4462
- export declare interface IUiMenuContext<T extends IUiMenuItemData = object> extends IUiMenuPluggableComponents<T> {
4571
+ export declare type IUiMenuContentItem<T extends IUiMenuItemData = object> = {
4572
+ type: "content";
4573
+ id: string;
4574
+ stringTitle: string;
4575
+ isDisabled?: boolean;
4576
+ showComponentOnly?: boolean;
4577
+ data: T["content"];
4578
+ Component: React_2.ComponentType<{
4579
+ onBack: () => void;
4580
+ onClose: () => void;
4581
+ }>;
4582
+ };
4583
+
4584
+ /**
4585
+ * @internal
4586
+ */
4587
+ export declare interface IUiMenuContentItemProps<T extends IUiMenuItemData = object> {
4588
+ item: IUiMenuContentItem<T>;
4589
+ isFocused: boolean;
4590
+ onSelect: () => void;
4591
+ }
4592
+
4593
+ /**
4594
+ * @internal
4595
+ */
4596
+ export declare interface IUiMenuContentItemWrapperProps<T extends IUiMenuItemData = object> {
4597
+ item: IUiMenuContentItem<T>;
4598
+ }
4599
+
4600
+ /**
4601
+ * @internal
4602
+ */
4603
+ export declare interface IUiMenuContentProps<T extends IUiMenuItemData = object> {
4604
+ item: IUiMenuContentItem<T>;
4605
+ }
4606
+
4607
+ /**
4608
+ * @internal
4609
+ */
4610
+ export declare interface IUiMenuContext<T extends IUiMenuItemData = object, M = object> extends IUiMenuPluggableComponents<T> {
4463
4611
  items: IUiMenuItem<T>[];
4464
- focusedItem: IUiMenuInteractiveItem<T> | undefined;
4465
- onSelect: (item: IUiMenuInteractiveItem<T> | undefined) => void;
4612
+ focusedItem: IUiMenuFocusableItem<T> | undefined;
4613
+ shownCustomContentItemId?: string;
4614
+ setShownCustomContentItemId: React_2.Dispatch<React_2.SetStateAction<string | undefined>>;
4615
+ onSelect: (item: IUiMenuFocusableItem<T> | undefined) => void;
4466
4616
  onClose?: () => void;
4467
4617
  setFocusedId: React_2.Dispatch<React_2.SetStateAction<string | undefined>>;
4468
4618
  isItemFocusable: (item: IUiMenuItem<T>) => boolean;
4469
4619
  controlType: IUiMenuControlType;
4470
4620
  setControlType: React_2.Dispatch<React_2.SetStateAction<IUiMenuControlType>>;
4471
4621
  scrollToView: (element: HTMLElement | null) => void;
4472
- makeItemId: (item: IUiMenuItem<T>) => string;
4622
+ makeItemId: (item: IUiMenuItem<T>) => string | undefined;
4473
4623
  itemClassName?: ((item: IUiMenuItem<T>) => string | undefined) | string;
4474
- ItemComponent: React_2.ComponentType<UiMenuItemProps<T>>;
4624
+ ItemComponent: React_2.ComponentType<IUiMenuItemProps<T>>;
4475
4625
  menuComponentRef: React_2.RefObject<HTMLElement>;
4476
4626
  itemsContainerRef: React_2.RefObject<HTMLElement>;
4627
+ menuCtxData?: M;
4477
4628
  }
4478
4629
 
4479
4630
  /**
@@ -4481,6 +4632,11 @@ export declare interface IUiMenuContext<T extends IUiMenuItemData = object> exte
4481
4632
  */
4482
4633
  export declare type IUiMenuControlType = "keyboard" | "mouse" | "unknown";
4483
4634
 
4635
+ /**
4636
+ * @internal
4637
+ */
4638
+ export declare type IUiMenuFocusableItem<T extends IUiMenuItemData = object> = IUiMenuInteractiveItem<T> | IUiMenuContentItem<T>;
4639
+
4484
4640
  /**
4485
4641
  * @internal
4486
4642
  */
@@ -4492,6 +4648,13 @@ export declare type IUiMenuGroupItem<T extends IUiMenuItemData = object> = {
4492
4648
  subItems: IUiMenuItem<T>[];
4493
4649
  };
4494
4650
 
4651
+ /**
4652
+ * @internal
4653
+ */
4654
+ export declare interface IUiMenuGroupItemProps<T extends IUiMenuItemData = object> {
4655
+ item: IUiMenuGroupItem<T>;
4656
+ }
4657
+
4495
4658
  /**
4496
4659
  * @internal
4497
4660
  */
@@ -4507,7 +4670,23 @@ export declare type IUiMenuInteractiveItem<T extends IUiMenuItemData = object> =
4507
4670
  /**
4508
4671
  * @internal
4509
4672
  */
4510
- export declare type IUiMenuItem<T extends IUiMenuItemData = object> = IUiMenuStaticItem<T> | IUiMenuInteractiveItem<T> | IUiMenuGroupItem<T>;
4673
+ export declare interface IUiMenuInteractiveItemProps<T extends IUiMenuItemData = object> {
4674
+ item: IUiMenuInteractiveItem<T>;
4675
+ isFocused: boolean;
4676
+ onSelect: () => void;
4677
+ }
4678
+
4679
+ /**
4680
+ * @internal
4681
+ */
4682
+ export declare interface IUiMenuInteractiveItemWrapperProps<T extends IUiMenuItemData = object> {
4683
+ item: IUiMenuInteractiveItem<T>;
4684
+ }
4685
+
4686
+ /**
4687
+ * @internal
4688
+ */
4689
+ export declare type IUiMenuItem<T extends IUiMenuItemData = object> = IUiMenuStaticItem<T> | IUiMenuInteractiveItem<T> | IUiMenuGroupItem<T> | IUiMenuContentItem<T>;
4511
4690
 
4512
4691
  /**
4513
4692
  * @internal
@@ -4516,15 +4695,25 @@ export declare type IUiMenuItemData = {
4516
4695
  [type in IUiMenuItem<any>["type"]]?: unknown;
4517
4696
  };
4518
4697
 
4698
+ /**
4699
+ * @internal
4700
+ */
4701
+ export declare interface IUiMenuItemProps<T extends IUiMenuItemData = object> {
4702
+ item: IUiMenuItem<T>;
4703
+ }
4704
+
4519
4705
  /**
4520
4706
  * @internal
4521
4707
  */
4522
4708
  export declare interface IUiMenuPluggableComponents<T extends IUiMenuItemData = object> {
4523
- InteractiveItemComponent: React_2.ComponentType<UiMenuInteractiveItemProps<T>>;
4524
- InteractiveItemWrapperComponent: React_2.ComponentType<UiMenuInteractiveItemWrapperProps<T>>;
4525
- GroupItemComponent: React_2.ComponentType<UiMenuGroupItemProps<T>>;
4526
- StaticItemComponent: React_2.ComponentType<UiMenuStaticItemProps<T>>;
4527
- MenuHeaderComponent: React_2.ComponentType;
4709
+ InteractiveItem: React_2.ComponentType<IUiMenuInteractiveItemProps<T>>;
4710
+ InteractiveItemWrapper: React_2.ComponentType<IUiMenuInteractiveItemWrapperProps<T>>;
4711
+ GroupItem: React_2.ComponentType<IUiMenuGroupItemProps<T>>;
4712
+ StaticItem: React_2.ComponentType<IUiMenuStaticItemProps<T>>;
4713
+ ContentItemWrapper: React_2.ComponentType<IUiMenuContentItemWrapperProps<T>>;
4714
+ ContentItem: React_2.ComponentType<IUiMenuContentItemProps<T>>;
4715
+ Content: React_2.ComponentType<IUiMenuContentProps<T>>;
4716
+ MenuHeader: React_2.ComponentType;
4528
4717
  }
4529
4718
 
4530
4719
  /**
@@ -4536,6 +4725,13 @@ export declare type IUiMenuStaticItem<T extends IUiMenuItemData = object> = {
4536
4725
  data: T["static"];
4537
4726
  };
4538
4727
 
4728
+ /**
4729
+ * @internal
4730
+ */
4731
+ export declare interface IUiMenuStaticItemProps<T extends IUiMenuItemData = object> {
4732
+ item: IUiMenuStaticItem<T>;
4733
+ }
4734
+
4539
4735
  /**
4540
4736
  * @internal
4541
4737
  */
@@ -5265,6 +5461,11 @@ export declare type SizeMedium = "medium";
5265
5461
  */
5266
5462
  export declare type SizeSmall = "small";
5267
5463
 
5464
+ /**
5465
+ * @internal
5466
+ */
5467
+ export declare type SizeXSmall = "xsmall";
5468
+
5268
5469
  /**
5269
5470
  * @internal
5270
5471
  */
@@ -5496,6 +5697,11 @@ export declare type TStylingEditorDialogFooterProps = {
5496
5697
  */
5497
5698
  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
5699
 
5700
+ /**
5701
+ * @internal
5702
+ */
5703
+ export declare const typedUiMenuContextStore: <T extends IUiMenuItemData = object, M = object>() => IContextStore<IUiMenuContext<T, M>>;
5704
+
5499
5705
  /**
5500
5706
  * @internal
5501
5707
  */
@@ -5531,7 +5737,7 @@ export declare interface UiButtonProps {
5531
5737
  /**
5532
5738
  * @internal
5533
5739
  */
5534
- export declare const UiChip: ({ label, tag, isDeletable, isActive, isLocked, iconBefore, onClick, onDelete, accessibilityConfig, }: UiChipProps) => React_2.JSX.Element;
5740
+ export declare const UiChip: ({ label, tag, isDeletable, isActive, isLocked, iconBefore, onClick, onDelete, onDeleteKeyDown, accessibilityConfig, }: UiChipProps) => React_2.JSX.Element;
5535
5741
 
5536
5742
  /**
5537
5743
  * @internal
@@ -5545,6 +5751,7 @@ export declare interface UiChipProps {
5545
5751
  iconBefore?: IconType;
5546
5752
  onClick?: () => void;
5547
5753
  onDelete?: () => void;
5754
+ onDeleteKeyDown?: (event: React_2.KeyboardEvent<HTMLButtonElement>) => void;
5548
5755
  accessibilityConfig?: IUiChipAccessibilityConfig;
5549
5756
  }
5550
5757
 
@@ -5598,7 +5805,7 @@ export declare const UiIconButton: React_2.ForwardRefExoticComponent<UiIconButto
5598
5805
  export declare interface UiIconButtonProps {
5599
5806
  icon: IconType;
5600
5807
  label: string;
5601
- size?: SizeSmall | SizeMedium | SizeLarge;
5808
+ size?: SizeXSmall | SizeSmall | SizeMedium | SizeLarge;
5602
5809
  variant?: VariantPrimary | VariantSecondary | VariantTertiary | VariantPopOut | VariantDanger;
5603
5810
  isDisabled?: boolean;
5604
5811
  onClick?: (e: React_2.MouseEvent<HTMLButtonElement>) => void;
@@ -5670,47 +5877,18 @@ export declare interface UiListboxStaticItemProps<T> {
5670
5877
  *
5671
5878
  * @internal
5672
5879
  */
5673
- export declare function UiMenu<T extends IUiMenuItemData = object>(props: UiMenuProps<T>): React_2.ReactNode;
5674
-
5675
- /**
5676
- * @internal
5677
- */
5678
- export declare interface UiMenuGroupItemProps<T extends IUiMenuItemData = object> {
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
- }
5880
+ export declare function UiMenu<T extends IUiMenuItemData = object, M extends object = object>(props: UiMenuProps<T, M>): React_2.ReactNode;
5704
5881
 
5705
5882
  /**
5706
5883
  * @internal
5707
5884
  */
5708
- export declare interface UiMenuProps<T extends IUiMenuItemData = object> extends Partial<IUiMenuPluggableComponents<T>> {
5885
+ export declare interface UiMenuProps<T extends IUiMenuItemData = object, M = object> extends Partial<IUiMenuPluggableComponents<T>> {
5709
5886
  items: IUiMenuItem<T>[];
5710
- className?: string;
5887
+ className?: ((context: IUiMenuContext<T>) => string | undefined) | string;
5711
5888
  itemClassName?: ((item: IUiMenuItem<T>) => string | undefined) | string;
5712
5889
  maxWidth?: number;
5713
5890
  onSelect?: (item: IUiMenuInteractiveItem<T>) => void;
5891
+ onLevelChange?: (level: number, item?: IUiMenuContentItem<T> | IUiMenuInteractiveItem<T>) => void;
5714
5892
  onClose?: () => void;
5715
5893
  onUnhandledKeyDown?: (event: React_2.KeyboardEvent, context: IUiMenuContext<T>) => void;
5716
5894
  shouldKeyboardActionPreventDefault?: boolean;
@@ -5718,13 +5896,7 @@ export declare interface UiMenuProps<T extends IUiMenuItemData = object> extends
5718
5896
  shouldCloseOnSelect?: boolean;
5719
5897
  isDisabledFocusable?: boolean;
5720
5898
  ariaAttributes: Omit<IDropdownBodyRenderProps["ariaAttributes"], "role">;
5721
- }
5722
-
5723
- /**
5724
- * @internal
5725
- */
5726
- export declare interface UiMenuStaticItemProps<T extends IUiMenuItemData = object> {
5727
- item: IUiMenuStaticItem<T>;
5899
+ menuCtxData?: M;
5728
5900
  }
5729
5901
 
5730
5902
  /**
@@ -5801,6 +5973,12 @@ export declare type UnitsType = "px" | "%" | "rem" | "em";
5801
5973
  */
5802
5974
  export declare const unrelatedHeader: IDateDatasetHeader;
5803
5975
 
5976
+ /**
5977
+ * Unwraps items from group containers into a flat array.
5978
+ * @internal
5979
+ */
5980
+ export declare function unwrapGroupItems<T extends IUiMenuItemData = object>(items: IUiMenuItem<T>[]): IUiMenuItem<T>[];
5981
+
5804
5982
  /**
5805
5983
  * A helper hook to provide not just state/setState pair but also a debounced version of the state.
5806
5984
  * @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
- placeholder?: string;
14
- label?: string;
15
- extensions?: Extension[];
16
- className?: string;
17
- disabled?: boolean;
19
+ onCompletion?: CompletionSource;
18
20
  }
19
21
  /**
20
22
  * @internal
@@ -1 +1 @@
1
- {"version":3,"file":"SyntaxHighlightingInput.d.ts","sourceRoot":"","sources":["../../src/syntaxHighlightingInput/SyntaxHighlightingInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,KAAK,OAAO,CAAC;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CA2B3E,CAAC"}
1
+ {"version":3,"file":"SyntaxHighlightingInput.d.ts","sourceRoot":"","sources":["../../src/syntaxHighlightingInput/SyntaxHighlightingInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,KAAK,OAAO,CAAC;IAChE,YAAY,CAAC,EAAE,gBAAgB,CAAC;CACnC;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CA6B3E,CAAC"}
@@ -6,7 +6,7 @@ import { useCodemirror } from "./hooks/useCodemirror.js";
6
6
  * @internal
7
7
  */
8
8
  export const SyntaxHighlightingInput = (props) => {
9
- const { value, label, placeholder, onApi, onChange, onCursor, onKeyDown, className, extensions = [], disabled, } = props;
9
+ const { value, label, placeholder, onApi, onChange, onCursor, onKeyDown, onCompletion, className, extensions = [], disabled, } = props;
10
10
  const { editorRef } = useCodemirror({
11
11
  placeholderText: placeholder,
12
12
  label,
@@ -17,6 +17,7 @@ export const SyntaxHighlightingInput = (props) => {
17
17
  onApi,
18
18
  onChange,
19
19
  onKeyDown,
20
+ onCompletion,
20
21
  });
21
22
  return React.createElement("div", { className: cx(className, "gd-input-syntax-highlighting-input"), ref: editorRef });
22
23
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SyntaxHighlightingInput.js","sourceRoot":"","sources":["../../src/syntaxHighlightingInput/SyntaxHighlightingInput.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,YAAY,CAAC;AAG5B,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAkBzD;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAA4C,CAAC,KAAK,EAAE,EAAE;IACtF,MAAM,EACF,KAAK,EACL,KAAK,EACL,WAAW,EACX,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EACT,UAAU,GAAG,EAAE,EACf,QAAQ,GACX,GAAG,KAAK,CAAC;IAEV,MAAM,EAAE,SAAS,EAAE,GAAG,aAAa,CAAC;QAChC,eAAe,EAAE,WAAW;QAC5B,KAAK;QACL,UAAU;QACV,QAAQ;QACR,KAAK;QACL,QAAQ;QACR,KAAK;QACL,QAAQ;QACR,SAAS;KACZ,CAAC,CAAC;IAEH,OAAO,6BAAK,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,oCAAoC,CAAC,EAAE,GAAG,EAAE,SAAS,GAAI,CAAC;AACnG,CAAC,CAAC"}
1
+ {"version":3,"file":"SyntaxHighlightingInput.js","sourceRoot":"","sources":["../../src/syntaxHighlightingInput/SyntaxHighlightingInput.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,YAAY,CAAC;AAK5B,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAmBzD;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAA4C,CAAC,KAAK,EAAE,EAAE;IACtF,MAAM,EACF,KAAK,EACL,KAAK,EACL,WAAW,EACX,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,SAAS,EACT,UAAU,GAAG,EAAE,EACf,QAAQ,GACX,GAAG,KAAK,CAAC;IAEV,MAAM,EAAE,SAAS,EAAE,GAAG,aAAa,CAAC;QAChC,eAAe,EAAE,WAAW;QAC5B,KAAK;QACL,UAAU;QACV,QAAQ;QACR,KAAK;QACL,QAAQ;QACR,KAAK;QACL,QAAQ;QACR,SAAS;QACT,YAAY;KACf,CAAC,CAAC;IAEH,OAAO,6BAAK,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,oCAAoC,CAAC,EAAE,GAAG,EAAE,SAAS,GAAI,CAAC;AACnG,CAAC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { MutableRefObject } from "react";
2
2
  import { Extension } from "@codemirror/state";
3
3
  import { EditorView } from "@codemirror/view";
4
+ import { CompletionSource } from "@codemirror/autocomplete";
4
5
  export interface IUseCodemirrorProps {
5
6
  value?: string;
6
7
  label?: string;
@@ -10,9 +11,10 @@ export interface IUseCodemirrorProps {
10
11
  onChange: (value: string) => void;
11
12
  onApi?: (view: EditorView | null) => void;
12
13
  onCursor?: (from: number, to: number) => void;
14
+ onCompletion?: CompletionSource;
13
15
  onKeyDown?: (event: KeyboardEvent, view: EditorView) => boolean;
14
16
  }
15
- export declare function useCodemirror({ value, label, disabled, placeholderText, extensions, onApi, onKeyDown, onCursor, onChange, }: IUseCodemirrorProps): {
17
+ export declare function useCodemirror({ value, label, disabled, placeholderText, extensions, onCompletion, onApi, onKeyDown, onCursor, onChange, }: IUseCodemirrorProps): {
16
18
  editorRef: MutableRefObject<HTMLDivElement>;
17
19
  viewRef: MutableRefObject<EditorView>;
18
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useCodemirror.d.ts","sourceRoot":"","sources":["../../../src/syntaxHighlightingInput/hooks/useCodemirror.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAA8B,MAAM,OAAO,CAAC;AACrE,OAAO,EAA6C,SAAS,EAAe,MAAM,mBAAmB,CAAC;AACtG,OAAO,EAAE,UAAU,EAAmC,MAAM,kBAAkB,CAAC;AAgB/E,MAAM,WAAW,mBAAmB;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,KAAK,OAAO,CAAC;CACnE;AAED,wBAAgB,aAAa,CAAC,EAC1B,KAAU,EACV,KAAK,EACL,QAAQ,EACR,eAAe,EACf,UAAU,EACV,KAAK,EACL,SAAS,EACT,QAAQ,EACR,QAAQ,GACX,EAAE,mBAAmB;;;EAiGrB"}
1
+ {"version":3,"file":"useCodemirror.d.ts","sourceRoot":"","sources":["../../../src/syntaxHighlightingInput/hooks/useCodemirror.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAA8B,MAAM,OAAO,CAAC;AACrE,OAAO,EAA6C,SAAS,EAAe,MAAM,mBAAmB,CAAC;AACtG,OAAO,EAAE,UAAU,EAAmC,MAAM,kBAAkB,CAAC;AAG/E,OAAO,EAAkB,gBAAgB,EAAoB,MAAM,0BAA0B,CAAC;AAc9F,MAAM,WAAW,mBAAmB;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,KAAK,OAAO,CAAC;CACnE;AAED,wBAAgB,aAAa,CAAC,EAC1B,KAAU,EACV,KAAK,EACL,QAAQ,EACR,eAAe,EACf,UAAU,EACV,YAAY,EACZ,KAAK,EACL,SAAS,EACT,QAAQ,EACR,QAAQ,GACX,EAAE,mBAAmB;;;EA2HrB"}