bm-core-ui 2.12.0-beta.13 → 2.12.0-beta.14

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.
@@ -9825,6 +9825,15 @@ declare class BMMenuItem {
9825
9825
  */
9826
9826
  CSSClass?: string | null | undefined;
9827
9827
 
9828
+ /**
9829
+ * Updates the CSS class on this item's node.
9830
+ * @param fromClass The currently applied CSS classes.
9831
+ * @param toClass The new classes to apply.
9832
+ *
9833
+ */
9834
+ private _updateCSSClass(fromClass: string, {toClass}: {toClass: string}): void;
9835
+
9836
+
9828
9837
  /**
9829
9838
  * An optional key sequence that may be used to select this menu item via a keyboard shortcut.
9830
9839
  * Updates to this property do not take effect while a menu displaying this menu item is open.
@@ -9838,6 +9847,14 @@ declare class BMMenuItem {
9838
9847
  */
9839
9848
  hintHTML?: string | null | undefined;
9840
9849
 
9850
+ /**
9851
+ * Updates this item's HTML hint node with the specified hint.
9852
+ * @param hint The hint to use.
9853
+ *
9854
+ */
9855
+ private _setHintHTML(hint: string): void;
9856
+
9857
+
9841
9858
  /**
9842
9859
  * The node that represents this menu item, available while its menu
9843
9860
  * is open.
@@ -9845,6 +9862,20 @@ declare class BMMenuItem {
9845
9862
  */
9846
9863
  private _node?: DOMNode | null | undefined;
9847
9864
 
9865
+ /**
9866
+ * The node that represents this menu item's icon, available while its menu
9867
+ * is open.
9868
+ *
9869
+ */
9870
+ private _iconNode?: DOMNode | null | undefined;
9871
+
9872
+ /**
9873
+ * The node that represents this menu item's title, available while its menu
9874
+ * is open.
9875
+ *
9876
+ */
9877
+ private _nameNode?: DOMNode | null | undefined;
9878
+
9848
9879
  /**
9849
9880
  * Defaults to `YES`. Controls whether this menu item is enabled. If this menu
9850
9881
  * item is not enabled, it can not be highlighted or selected.
@@ -9853,6 +9884,57 @@ declare class BMMenuItem {
9853
9884
  enabled: boolean;
9854
9885
 
9855
9886
  /**
9887
+ * Updates the enabled state of this menu item's node.
9888
+ * @param enabled Whether the item is enabled.
9889
+ *
9890
+ */
9891
+ private _setEnabled(enabled: boolean): void;
9892
+
9893
+
9894
+ /**
9895
+ * The currently active replacement menu item, if any.
9896
+ *
9897
+ */
9898
+ private _replacementItem?: BMMenuItem | null | undefined;
9899
+
9900
+ /**
9901
+ * Causes this menu item to instead display the specified menu item instead.
9902
+ * @param item The replacement menu item, or `undefined` to restore
9903
+ * this menu item.
9904
+ * @return `YES` if a replacement occurred, `NO` otherwise.
9905
+ *
9906
+ */
9907
+ private _setReplacementItem(item?: BMMenuItem | null | undefined): boolean;
9908
+
9909
+
9910
+ /**
9911
+ * Contains the replacement menu items and their modifiers.
9912
+ *
9913
+ */
9914
+ private _overrideMenuItems: Dictionary< {item: BMMenuItem, priority: number}>;
9915
+
9916
+ /**
9917
+ * Registers a menu item that will replace this menu item in an open menu when the
9918
+ * specified keyboard modifiers are held.
9919
+ * @param item The replacement menu item to add.
9920
+ * @param forModifiers An array of modifiers that must be held for the
9921
+ * replacement item to be selected.
9922
+ *
9923
+ */
9924
+ addOverrideMenuItem(item: BMMenuItem, {forModifiers}: {forModifiers: BMKeyboardShortcutModifier[]}): void;
9925
+
9926
+
9927
+ /**
9928
+ * Unregisters the replacement menu item when the specified keyboard modifiers are held.
9929
+ * Has no effect if a replacement menu item was not set for the specified modifiers.
9930
+ * @param modifiers The keyboard modifiers.
9931
+ *
9932
+ */
9933
+ removeOverrideMenuItemForModifiers(modifiers: BMKeyboardShortcutModifier[]): void;
9934
+
9935
+
9936
+ /**
9937
+ * Designated initializer.
9856
9938
  * Constructs and returns a menu item with the given name.
9857
9939
  * Optionally, the menu item may have an icon associated with it as well as an
9858
9940
  * action that is invoked when the item is selected.
@@ -10041,6 +10123,28 @@ declare class BMMenu {
10041
10123
  initWithItems(items: BMMenuItem[]): BMMenu;
10042
10124
 
10043
10125
 
10126
+ /**
10127
+ * The current modifier bitmap.
10128
+ *
10129
+ */
10130
+ _modifierBitmap: number;
10131
+
10132
+ /**
10133
+ * Invoked to handle the specified keyboard event.
10134
+ * @param event The event that triggered this action.
10135
+ *
10136
+ */
10137
+ handleEvent(event: KeyboardEvent): void;
10138
+
10139
+
10140
+ /**
10141
+ * Updates the modifier bitmap based on the specified event.
10142
+ * @param event The event describing the currently pressed modifier keys.
10143
+ *
10144
+ */
10145
+ private _updateModifierBitmapWithEvent(event: Event): void;
10146
+
10147
+
10044
10148
  /**
10045
10149
  * Invoked by CoreUI to build the menu node.
10046
10150
  *
@@ -10100,6 +10204,12 @@ declare class BMMenu {
10100
10204
  openFromNode(node: DOMNode, {animated, kind}?: {animated?: boolean | null | undefined, kind?: BMMenuKind | null | undefined}): Promise<void>;
10101
10205
 
10102
10206
 
10207
+ /**
10208
+ * The rect around which this menu is positioned.
10209
+ *
10210
+ */
10211
+ private _rect?: BMRect | null | undefined;
10212
+
10103
10213
  /**
10104
10214
  * Animatable. Shows this menu at the specified point. The coordinates of this point are relative to the viewport.
10105
10215
  * @param point The point at which to show this menu.
@@ -10113,6 +10223,14 @@ declare class BMMenu {
10113
10223
  openAtPoint(point: BMPoint, {animated, kind}?: {animated?: boolean | null | undefined, kind?: BMMenuKind | null | undefined}): void;
10114
10224
 
10115
10225
 
10226
+ /**
10227
+ * Updates this menu's position around the specified rect.
10228
+ * @param rect The rect around which to position this menu.
10229
+ *
10230
+ */
10231
+ private _setAnchorRect(rect: BMRect): void;
10232
+
10233
+
10116
10234
  /**
10117
10235
  * Shows this menu at an appropriate position around the given rect. The coordinates of this rect
10118
10236
  * are relative to the viewport.