bm-core-ui 2.8.3 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/@types/index.d.ts +321 -29
- package/build/BMCollectionView/BMCollectionView.js +29 -12
- package/build/BMCollectionView/BMCollectionViewFlowLayout.js +53 -11
- package/build/BMCollectionView/BMCollectionViewLayout.js +4 -1
- package/build/BMCoreUI.css +136 -12
- package/build/BMView/BMLayoutConstraint_v2.5.js +1 -1
- package/build/BMView/BMMenu.js +789 -64
- package/build/BMView/BMScrollView.js +1 -1
- package/build/BMView/BMTextFieldDelegate.js +6 -6
- package/build/BMViewLayoutEditor/BMLayoutEditorViewSettings.js +5 -2
- package/build/BMWindow/BMConfirmationPopup.js +21 -1
- package/build/BMWindow/BMPopover/BMPopover.js +310 -52
- package/build/BMWindow/BMWindow.js +57 -16
- package/lib/@types/BMCoreUI.min.d.ts +321 -29
- package/lib/BMCoreUI.min.js +1 -1
- package/package.json +1 -1
- package/CHANGELOG.md +0 -1771
- package/build/BMViewLayoutEditor/BMLayoutEditorDelegate.js +0 -59
- package/build/BMViewLayoutEditor/BMLayoutEditorSettingsDelegate.js +0 -46
- package/build/BMViewLayoutEditor/BMLayoutVariableProvider.js +0 -202
|
@@ -2828,7 +2828,7 @@ declare class BMLayoutConstraintKind {
|
|
|
2828
2828
|
* A constraint is a linear equation that takes the form of
|
|
2829
2829
|
* ```js
|
|
2830
2830
|
* view2.attribute2 + constant
|
|
2831
|
-
* ``
|
|
2831
|
+
* ``
|
|
2832
2832
|
* where the equals sign can be replaced with an inequality sign as needed.
|
|
2833
2833
|
* Note that despite looking like an assignment statement, the constraint expression is a mathematical equation and the layout
|
|
2834
2834
|
* system may choose to modify either side (or even both) of the equation to fulfill the constraint's requirements.
|
|
@@ -5046,7 +5046,7 @@ declare class BMScrollView extends BMView {
|
|
|
5046
5046
|
|
|
5047
5047
|
|
|
5048
5048
|
/**
|
|
5049
|
-
* Invoked whenever the iScroll instance managing this scroll view's scrolling
|
|
5049
|
+
* Invoked whenever the iScroll instance managing this scroll view's scrolling.
|
|
5050
5050
|
*
|
|
5051
5051
|
*/
|
|
5052
5052
|
private _iScrollDidScroll(): void;
|
|
@@ -7947,12 +7947,37 @@ declare class BMMenuItem {
|
|
|
7947
7947
|
*/
|
|
7948
7948
|
readonly action?: (($0: BMMenuItem) => void) | null | undefined;
|
|
7949
7949
|
|
|
7950
|
+
/**
|
|
7951
|
+
* An optional submenu that opens from this menu item.
|
|
7952
|
+
*
|
|
7953
|
+
*/
|
|
7954
|
+
readonly submenu?: BMMenu | null | undefined;
|
|
7955
|
+
|
|
7956
|
+
/**
|
|
7957
|
+
* Whether this menu item is a separator.
|
|
7958
|
+
*
|
|
7959
|
+
*/
|
|
7960
|
+
readonly isSeparator: boolean;
|
|
7961
|
+
|
|
7950
7962
|
/**
|
|
7951
7963
|
* Additional, arbitrary information associated with this menu item.
|
|
7952
7964
|
*
|
|
7953
7965
|
*/
|
|
7954
7966
|
userInfo?: any | null | undefined;
|
|
7955
7967
|
|
|
7968
|
+
/**
|
|
7969
|
+
* Additional CSS classes to apply to this item's node.
|
|
7970
|
+
*
|
|
7971
|
+
*/
|
|
7972
|
+
CSSClass?: string | null | undefined;
|
|
7973
|
+
|
|
7974
|
+
/**
|
|
7975
|
+
* The node that represents this menu item, available while its menu
|
|
7976
|
+
* is open.
|
|
7977
|
+
*
|
|
7978
|
+
*/
|
|
7979
|
+
private _node?: DOMNode | null | undefined;
|
|
7980
|
+
|
|
7956
7981
|
/**
|
|
7957
7982
|
* Constructs and returns a menu item with the given name.
|
|
7958
7983
|
* Optionally, the menu item may have an icon associated with it as well as an
|
|
@@ -7963,11 +7988,12 @@ declare class BMMenuItem {
|
|
|
7963
7988
|
*
|
|
7964
7989
|
* @param action If specified, this is a function that will be invoked when this menu item is selected.
|
|
7965
7990
|
* This function will receive the selected menu item as a parameter.
|
|
7991
|
+
* @param submenu Optional. If specified, this represents a menu that opens from this menu item.
|
|
7966
7992
|
* @param userInfo Optional. If specified, this represents additional arbitrary data attached to this menu item.
|
|
7967
7993
|
* @return This menu item.
|
|
7968
7994
|
*
|
|
7969
7995
|
*/
|
|
7970
|
-
initWithName(name: string, {icon: icon, action: action, userInfo: userInfo}?: {icon?: string | null | undefined, action?: (($0: BMMenuItem) => void) | null | undefined, userInfo?: any | null | undefined}): BMMenuItem;
|
|
7996
|
+
initWithName(name: string, {icon: icon, action: action, submenu: submenu, userInfo: userInfo}?: {icon?: string | null | undefined, action?: (($0: BMMenuItem) => void) | null | undefined, submenu?: BMMenu | null | undefined, userInfo?: any | null | undefined}): BMMenuItem;
|
|
7971
7997
|
|
|
7972
7998
|
|
|
7973
7999
|
/**
|
|
@@ -7980,10 +8006,12 @@ declare class BMMenuItem {
|
|
|
7980
8006
|
*
|
|
7981
8007
|
* @param action If specified, this is a function that will be invoked when this menu item is selected.
|
|
7982
8008
|
* This function will receive the selected menu item as a parameter.
|
|
8009
|
+
* @param submenu Optional. If specified, this represents a menu that opens from this menu item.
|
|
8010
|
+
* @param userInfo Optional. If specified, this represents additional arbitrary data attached to this menu item.
|
|
7983
8011
|
* @return A menu item.
|
|
7984
8012
|
*
|
|
7985
8013
|
*/
|
|
7986
|
-
static menuItemWithName (name: string, {icon: icon, action: action}?: {icon?: string | null | undefined, action?: (($0: BMMenuItem) => void) | null | undefined}): BMMenuItem;
|
|
8014
|
+
static menuItemWithName (name: string, {icon: icon, action: action, submenu: submenu, userInfo: userInfo}?: {icon?: string | null | undefined, action?: (($0: BMMenuItem) => void) | null | undefined, submenu?: BMMenu | null | undefined, userInfo?: any | null | undefined}): BMMenuItem;
|
|
7987
8015
|
|
|
7988
8016
|
|
|
7989
8017
|
/**
|
|
@@ -8022,7 +8050,6 @@ declare class BMMenu {
|
|
|
8022
8050
|
|
|
8023
8051
|
/**
|
|
8024
8052
|
* A custom list of CSS classes to add to the menu DOM node.
|
|
8025
|
-
* This only has effect when set before the menu is opened.
|
|
8026
8053
|
*
|
|
8027
8054
|
*/
|
|
8028
8055
|
CSSClass: string;
|
|
@@ -8064,16 +8091,54 @@ declare class BMMenu {
|
|
|
8064
8091
|
private _sourceNodeDisplacement?: number | null | undefined;
|
|
8065
8092
|
|
|
8066
8093
|
/**
|
|
8067
|
-
* The
|
|
8094
|
+
* The source node horizontal displacement, used while the menu is visible.
|
|
8068
8095
|
*
|
|
8069
8096
|
*/
|
|
8070
|
-
private
|
|
8097
|
+
private _sourceNodeHorizontalDisplacement?: number | null | undefined;
|
|
8071
8098
|
|
|
8072
8099
|
/**
|
|
8073
8100
|
* The DOM node that was focused when this alert was opened.
|
|
8074
8101
|
*
|
|
8075
8102
|
*/
|
|
8076
|
-
private
|
|
8103
|
+
private _previouslyActiveNode: DOMNode;
|
|
8104
|
+
|
|
8105
|
+
/**
|
|
8106
|
+
* The submenu currently displayed, if any.
|
|
8107
|
+
*
|
|
8108
|
+
*/
|
|
8109
|
+
private _submenu?: BMMenu | null | undefined;
|
|
8110
|
+
|
|
8111
|
+
/**
|
|
8112
|
+
* The menu that opened this menu, if any.
|
|
8113
|
+
*
|
|
8114
|
+
*/
|
|
8115
|
+
private _supermenu?: BMMenu | null | undefined;
|
|
8116
|
+
|
|
8117
|
+
/**
|
|
8118
|
+
* The menu's frame, relative to the viewport, available while this menu is visible.
|
|
8119
|
+
*
|
|
8120
|
+
*/
|
|
8121
|
+
readonly frame?: BMRect | null | undefined;
|
|
8122
|
+
|
|
8123
|
+
/**
|
|
8124
|
+
* The index of the currently highlighted menu item.
|
|
8125
|
+
*
|
|
8126
|
+
*/
|
|
8127
|
+
highlightedIndex: number;
|
|
8128
|
+
|
|
8129
|
+
/**
|
|
8130
|
+
* Set to `YES` while delaying events due to a submenu having
|
|
8131
|
+
* been recently activated.
|
|
8132
|
+
*
|
|
8133
|
+
*/
|
|
8134
|
+
private _delaysEvents: boolean;
|
|
8135
|
+
|
|
8136
|
+
/**
|
|
8137
|
+
* Controls whether the closing animation should be delayed to allow time
|
|
8138
|
+
* for the selection animation to play on the selected menu item.
|
|
8139
|
+
*
|
|
8140
|
+
*/
|
|
8141
|
+
_delaysClosing: boolean;
|
|
8077
8142
|
|
|
8078
8143
|
/**
|
|
8079
8144
|
* Initializes this menu with the specified items.
|
|
@@ -8094,6 +8159,16 @@ declare class BMMenu {
|
|
|
8094
8159
|
private _renderMenu(): void;
|
|
8095
8160
|
|
|
8096
8161
|
|
|
8162
|
+
/**
|
|
8163
|
+
* Invoked by CoreUI to build the menu node, in the specified container.
|
|
8164
|
+
* @param container The container node in which to render the menu.
|
|
8165
|
+
* If not specified, a new container will be created
|
|
8166
|
+
* for this menu.
|
|
8167
|
+
*
|
|
8168
|
+
*/
|
|
8169
|
+
private _renderMenuWithContainer(container?: DOMNode | null | undefined): void;
|
|
8170
|
+
|
|
8171
|
+
|
|
8097
8172
|
/**
|
|
8098
8173
|
* Invoked by CoreUI to build the menu item nodes displayed by this menu.
|
|
8099
8174
|
*
|
|
@@ -8135,13 +8210,53 @@ declare class BMMenu {
|
|
|
8135
8210
|
|
|
8136
8211
|
|
|
8137
8212
|
/**
|
|
8138
|
-
*
|
|
8139
|
-
*
|
|
8213
|
+
* Shows this menu at an appropriate position around the given rect. The coordinates of this rect
|
|
8214
|
+
* are relative to the viewport.
|
|
8215
|
+
* @param rect The rect around which to show this menu.
|
|
8216
|
+
* @param animated Defaults to `NO`. If set to `YES`, this change will be animated.
|
|
8140
8217
|
* If this method is invoked from within an animation context, the value of this parameter is ignored
|
|
8141
8218
|
* and the values of the current animation context are used.
|
|
8219
|
+
*
|
|
8220
|
+
* @param kind Defaults to `Menu`. The kind of menu.
|
|
8221
|
+
*
|
|
8222
|
+
*/
|
|
8223
|
+
private _openAroundRect(rect: BMRect, {animated: animated, kind: kind}?: {animated?: boolean | null | undefined, kind?: BMMenuKind | null | undefined}): void;
|
|
8224
|
+
|
|
8225
|
+
|
|
8226
|
+
/**
|
|
8227
|
+
* Opens the submenu for the given menu item.
|
|
8228
|
+
* @param item The item whose submenu should be opened.
|
|
8229
|
+
* @param animated Defaults to `YES`. If set to `YES` this change will be animated.
|
|
8230
|
+
* @param delaysEvents Defaults to `NO`. If set to `YES`, mouse events on the current menu will be
|
|
8231
|
+
* temporarily suspended, allowing the pointer to move over other menu items
|
|
8232
|
+
* without closing the submenu.
|
|
8233
|
+
* @param acquireFocus Defaults to `NO`. If set to `YES`, the submenu will acquire keyboard focus upon
|
|
8234
|
+
* opening. Otherwise, this menu will retain keyboard focus.
|
|
8142
8235
|
*
|
|
8143
8236
|
*/
|
|
8144
|
-
|
|
8237
|
+
private _openSubmenuForMenuItem(item: BMMenuItem, {animated: animated, delaysEvents: delaysEvents, acquireFocus: acquireFocus}?: {animated?: boolean | null | undefined, delaysEvents?: boolean | null | undefined, acquireFocus?: boolean | null | undefined}): void;
|
|
8238
|
+
|
|
8239
|
+
|
|
8240
|
+
/**
|
|
8241
|
+
* Temporarily prevents menu items from being highlighted, while the mouse
|
|
8242
|
+
* pointer moves towards the specified submenu.
|
|
8243
|
+
* @param submenu The submenu for which to delay events.
|
|
8244
|
+
* @param item The item from which the submenu opened.
|
|
8245
|
+
*
|
|
8246
|
+
*/
|
|
8247
|
+
private _delayEventsForSubmenu(submenu: BMMenu, {item: item}: {item: BMMenuItem}): void;
|
|
8248
|
+
|
|
8249
|
+
|
|
8250
|
+
/**
|
|
8251
|
+
* Dismisses this menu, if it is visible.
|
|
8252
|
+
* @param animated Defaults to `YES`. If set to `YES`, this change will be animated.
|
|
8253
|
+
* If this method is invoked from within an animation context, the value of this parameter is ignored
|
|
8254
|
+
* and the values of the current animation context are used.
|
|
8255
|
+
* @param withSupermenu Defaults to `NO`. If set to `YES` and this menu is displayed as a submenu, its supermenus
|
|
8256
|
+
* will also close.
|
|
8257
|
+
*
|
|
8258
|
+
*/
|
|
8259
|
+
closeAnimated(animated?: boolean | null | undefined, {withSupermenu: withSupermenu}?: {withSupermenu?: boolean | null | undefined}): void;
|
|
8145
8260
|
|
|
8146
8261
|
|
|
8147
8262
|
/**
|
|
@@ -8160,6 +8275,30 @@ declare class BMMenu {
|
|
|
8160
8275
|
arrowDownPressedWithEvent(event: KeyboardEvent): void;
|
|
8161
8276
|
|
|
8162
8277
|
|
|
8278
|
+
/**
|
|
8279
|
+
* Invoked when the right arrow is pressed.
|
|
8280
|
+
* @param event The event that triggered this action.
|
|
8281
|
+
*
|
|
8282
|
+
*/
|
|
8283
|
+
arrowRightPressedWithEvent(event: KeyboardEvent): void;
|
|
8284
|
+
|
|
8285
|
+
|
|
8286
|
+
/**
|
|
8287
|
+
* Invoked when the left arrow is pressed.
|
|
8288
|
+
* @param event The event that triggered this action.
|
|
8289
|
+
*
|
|
8290
|
+
*/
|
|
8291
|
+
arrowLeftPressedWithEvent(event: KeyboardEvent): void;
|
|
8292
|
+
|
|
8293
|
+
|
|
8294
|
+
/**
|
|
8295
|
+
* Invoked when the return or spacebar key is pressed.
|
|
8296
|
+
* @param event The event that triggered this action.
|
|
8297
|
+
*
|
|
8298
|
+
*/
|
|
8299
|
+
returnPressedWithEvent(event: KeyboardEvent): void;
|
|
8300
|
+
|
|
8301
|
+
|
|
8163
8302
|
/**
|
|
8164
8303
|
* Invoked when the tab key is pressed.
|
|
8165
8304
|
* @param event The event that triggered this action.
|
|
@@ -8191,7 +8330,69 @@ declare class BMMenu {
|
|
|
8191
8330
|
|
|
8192
8331
|
|
|
8193
8332
|
/**
|
|
8194
|
-
* The specification for a `
|
|
8333
|
+
* The specification for a `BMMenuDelegate` object, which can optionally be used in conjunction with `BMTextField` objects and will receive various
|
|
8334
|
+
* callbacks related to the text field's lifecycle.
|
|
8335
|
+
*
|
|
8336
|
+
*/
|
|
8337
|
+
declare interface BMMenuDelegate {
|
|
8338
|
+
|
|
8339
|
+
/**
|
|
8340
|
+
* Invoked by menus when they are about to be opened. This method is invoked before
|
|
8341
|
+
* any associated animation runs and before the actual content is rendered.
|
|
8342
|
+
* @param menu The calling menu.
|
|
8343
|
+
*
|
|
8344
|
+
*/
|
|
8345
|
+
menuWillOpen?(menu: BMMenu): void;
|
|
8346
|
+
|
|
8347
|
+
|
|
8348
|
+
/**
|
|
8349
|
+
* Invoked by menus when they are about to be closed. This method is invoked before
|
|
8350
|
+
* any associated animation runs.
|
|
8351
|
+
* @param menu The calling menu.
|
|
8352
|
+
*
|
|
8353
|
+
*/
|
|
8354
|
+
menuWillClose?(menu: BMMenu): void;
|
|
8355
|
+
|
|
8356
|
+
|
|
8357
|
+
/**
|
|
8358
|
+
* Invoked by menus after they are closed. This method is invoked after
|
|
8359
|
+
* any associated animation runs and after their contents are removed from the document.
|
|
8360
|
+
* @param menu The calling menu.
|
|
8361
|
+
*
|
|
8362
|
+
*/
|
|
8363
|
+
menuDidClose?(menu: BMMenu): void;
|
|
8364
|
+
|
|
8365
|
+
|
|
8366
|
+
/**
|
|
8367
|
+
* Invoked by menus whenever a menu item is about to be selected.
|
|
8368
|
+
* Delegates can implement this method to control whether the manu item may be selected or not.
|
|
8369
|
+
*
|
|
8370
|
+
* Returning `YES` from this method will cause the item to be selected and the menu to close.
|
|
8371
|
+
* Returning `NO` from this method will prevent the menu item from being selected and the menu will not close.
|
|
8372
|
+
*
|
|
8373
|
+
* If this method is not implemented, all menu items may be selected.
|
|
8374
|
+
*
|
|
8375
|
+
* @param menu The menu on which the item is about to be selected.
|
|
8376
|
+
* @param item The menu item that is about to be selected.
|
|
8377
|
+
* @return `YES` if the menu item should be selected, `NO` otherwise.
|
|
8378
|
+
*
|
|
8379
|
+
*/
|
|
8380
|
+
menuShouldSelectItem?(menu: BMMenu, item: BMMenuItem): boolean;
|
|
8381
|
+
|
|
8382
|
+
|
|
8383
|
+
/**
|
|
8384
|
+
* Invoked by menus whenever a menu item has been selected.
|
|
8385
|
+
* @param menu The menu on which the item was selected.
|
|
8386
|
+
* @param item The menu item that was selected.
|
|
8387
|
+
*
|
|
8388
|
+
*/
|
|
8389
|
+
menuDidSelectItem?(menu: BMMenu, item: BMMenuItem): void;
|
|
8390
|
+
|
|
8391
|
+
}
|
|
8392
|
+
|
|
8393
|
+
|
|
8394
|
+
/**
|
|
8395
|
+
* The specification for a `BMTextFieldDelegate` object, which can optionally be used in conjunction with `BMTextField` objects and will receive various
|
|
8195
8396
|
* callbacks related to the text field's lifecycle.
|
|
8196
8397
|
*
|
|
8197
8398
|
*/
|
|
@@ -8204,7 +8405,7 @@ declare interface BMTextFieldDelegate {
|
|
|
8204
8405
|
*
|
|
8205
8406
|
* If this method is not implemented, suggestions and autocomplete will not be available.
|
|
8206
8407
|
* @param textField The calling text field.
|
|
8207
|
-
* @param text
|
|
8408
|
+
* @param text The text for which to obtain suggestions.
|
|
8208
8409
|
* @return An array of string suggestions.
|
|
8209
8410
|
*
|
|
8210
8411
|
*/
|
|
@@ -8240,7 +8441,7 @@ declare interface BMTextFieldDelegate {
|
|
|
8240
8441
|
/**
|
|
8241
8442
|
* Invoked whenever the contents in this text field change for any reason. This can be because of an input event,
|
|
8242
8443
|
* the user pasting text or a suggestion being selected.
|
|
8243
|
-
* Note that this method will not be invoked when
|
|
8444
|
+
* Note that this method will not be invoked when programatically setting the input node's `value`.
|
|
8244
8445
|
*
|
|
8245
8446
|
* Delegate objects can implement this method in place of standard event listeners to handle changes to this text field.
|
|
8246
8447
|
* The contents of the text field can be retrieved via the standard `value` property on the text field's node.
|
|
@@ -8253,9 +8454,9 @@ declare interface BMTextFieldDelegate {
|
|
|
8253
8454
|
/**
|
|
8254
8455
|
* Invoked whenever the user presses the return key while the text field has keyboard focus.
|
|
8255
8456
|
*
|
|
8256
|
-
* Delegate objects can implement this method to customize the behaviour when the user presses the return key and also control
|
|
8257
|
-
* The default action for pressing the return key is to cause the text field to
|
|
8258
|
-
* highlighted suggestion.
|
|
8457
|
+
* Delegate objects can implement this method to customize the behaviour when the user presses the return key and also control
|
|
8458
|
+
* whether the default action will take place. The default action for pressing the return key is to cause the text field to
|
|
8459
|
+
* resign keyboard focus. If suggestions are used, the return key will also fill in the currently highlighted suggestion.
|
|
8259
8460
|
* @param textField The calling text field.
|
|
8260
8461
|
* @return Defaults to `YES`. If set to `YES`, the standard behaviour will be invoked.
|
|
8261
8462
|
*
|
|
@@ -9431,10 +9632,11 @@ declare class BMCollectionViewLayout {
|
|
|
9431
9632
|
* Layout objects should return YES from this method if the new bounds require a new layout.
|
|
9432
9633
|
* The default implementation returns NO in all cases.
|
|
9433
9634
|
* @param bounds The new bounds.
|
|
9635
|
+
* @param fromBounds The previous bounds.
|
|
9434
9636
|
* @return True if the new frame requires a new layout, false otherwise.
|
|
9435
9637
|
*
|
|
9436
9638
|
*/
|
|
9437
|
-
shouldInvalidateLayoutForBoundsChange(bounds: BMRect): boolean;
|
|
9639
|
+
shouldInvalidateLayoutForBoundsChange(bounds: BMRect, {fromBounds: fromBounds}: {fromBounds: BMRect}): boolean;
|
|
9438
9640
|
|
|
9439
9641
|
|
|
9440
9642
|
/**
|
|
@@ -12438,9 +12640,10 @@ declare interface BMCollectionViewDelegate {
|
|
|
12438
12640
|
* Invoked by the collection view whenever the bounds change.
|
|
12439
12641
|
* @param collectionView The calling collection view.
|
|
12440
12642
|
* @param newBounds The new bounds.
|
|
12643
|
+
* @param fromBounds The previous bounds.
|
|
12441
12644
|
*
|
|
12442
12645
|
*/
|
|
12443
|
-
collectionViewBoundsDidChange?(collectionView: BMCollectionView, newBounds: BMRect): void;
|
|
12646
|
+
collectionViewBoundsDidChange?(collectionView: BMCollectionView, newBounds: BMRect, {fromBounds: fromBounds}: {fromBounds: BMRect}): void;
|
|
12444
12647
|
|
|
12445
12648
|
|
|
12446
12649
|
/**
|
|
@@ -13367,6 +13570,14 @@ declare class BMWindow extends BMView {
|
|
|
13367
13570
|
dismissAnimated(animated?: boolean | null | undefined, {toRect: toRect, toNode: toNode, completionHandler: completionHandler}?: {toRect?: BMRect | null | undefined, toNode?: DOMNode | null | undefined, completionHandler?: (() => void) | null | undefined}): void;
|
|
13368
13571
|
|
|
13369
13572
|
|
|
13573
|
+
/**
|
|
13574
|
+
* Invoked after this window closes. Subclasses overriding this method must invoked
|
|
13575
|
+
* the superclass method at some point in their implementation.
|
|
13576
|
+
*
|
|
13577
|
+
*/
|
|
13578
|
+
windowDidClose(): void;
|
|
13579
|
+
|
|
13580
|
+
|
|
13370
13581
|
/**
|
|
13371
13582
|
* Minimizes this window. This method will raise an error if this window is modal.
|
|
13372
13583
|
* If this window is already minimized, this method will have no effect.
|
|
@@ -13744,6 +13955,38 @@ declare interface BMCodeEditorDelegate {
|
|
|
13744
13955
|
}
|
|
13745
13956
|
|
|
13746
13957
|
|
|
13958
|
+
/**
|
|
13959
|
+
* Constants describing the position where the indicator appears on its popover.
|
|
13960
|
+
*
|
|
13961
|
+
*/
|
|
13962
|
+
declare class BMPopoverIndicatorDirection {
|
|
13963
|
+
/**
|
|
13964
|
+
* Causes the popover indicator to appear on the top edge of the popover.
|
|
13965
|
+
*
|
|
13966
|
+
*/
|
|
13967
|
+
static Top: BMPopoverIndicatorDirection;
|
|
13968
|
+
|
|
13969
|
+
/**
|
|
13970
|
+
* Causes the popover indicator to appear on the bottom edge of the popover.
|
|
13971
|
+
*
|
|
13972
|
+
*/
|
|
13973
|
+
static Bottom: BMPopoverIndicatorDirection;
|
|
13974
|
+
|
|
13975
|
+
/**
|
|
13976
|
+
* Causes the popover indicator to appear on the left edge of the popover.
|
|
13977
|
+
*
|
|
13978
|
+
*/
|
|
13979
|
+
static Left: BMPopoverIndicatorDirection;
|
|
13980
|
+
|
|
13981
|
+
/**
|
|
13982
|
+
* Causes the popover indicator to appear on the right edge of the popover.
|
|
13983
|
+
*
|
|
13984
|
+
*/
|
|
13985
|
+
static Right: BMPopoverIndicatorDirection;
|
|
13986
|
+
|
|
13987
|
+
private constructor();
|
|
13988
|
+
}
|
|
13989
|
+
|
|
13747
13990
|
/**
|
|
13748
13991
|
* The popover is a kind of window that is visually linked to a source element.
|
|
13749
13992
|
* Unlike windows, popovers are always modal.
|
|
@@ -13874,12 +14117,31 @@ declare class BMPopover extends BMWindow {
|
|
|
13874
14117
|
*/
|
|
13875
14118
|
private _contentViewBottomConstraint: BMLayoutConstraint;
|
|
13876
14119
|
|
|
14120
|
+
/**
|
|
14121
|
+
* The content view's left edge constraint.
|
|
14122
|
+
*
|
|
14123
|
+
*/
|
|
14124
|
+
private _contentViewLeftConstraint: BMLayoutConstraint;
|
|
14125
|
+
|
|
14126
|
+
/**
|
|
14127
|
+
* The content view's right edge constraint.
|
|
14128
|
+
*
|
|
14129
|
+
*/
|
|
14130
|
+
private _contentViewRightConstraint: BMLayoutConstraint;
|
|
14131
|
+
|
|
13877
14132
|
/**
|
|
13878
14133
|
* The computed height of the indicator.
|
|
13879
14134
|
*
|
|
13880
14135
|
*/
|
|
13881
14136
|
readonly _indicatorHeight: number;
|
|
13882
14137
|
|
|
14138
|
+
/**
|
|
14139
|
+
* An array that specifies the permitted indicator directions that this popover
|
|
14140
|
+
* may use and the priority in which they will be evaluated.
|
|
14141
|
+
*
|
|
14142
|
+
*/
|
|
14143
|
+
permittedDirections: BMPopoverIndicatorDirection[];
|
|
14144
|
+
|
|
13883
14145
|
/**
|
|
13884
14146
|
* Designated initializer. Initializes this popover with the given size.
|
|
13885
14147
|
*
|
|
@@ -13899,21 +14161,45 @@ declare class BMPopover extends BMWindow {
|
|
|
13899
14161
|
private _updatePosition(): void;
|
|
13900
14162
|
|
|
13901
14163
|
|
|
14164
|
+
/**
|
|
14165
|
+
* Determines the direction that the popover should appear in order to fit best around the given point.
|
|
14166
|
+
* The popover will verify directions in the order specified by the `permittedDirections` property.
|
|
14167
|
+
* If none of the permitted indicator directions would fit the popover in the viewport, the first
|
|
14168
|
+
* specified direction is returned.
|
|
14169
|
+
* @param point The anchor point to check against.
|
|
14170
|
+
* @return The direction that best fits.
|
|
14171
|
+
*
|
|
14172
|
+
*/
|
|
14173
|
+
private _directionAroundPoint(point: BMPoint): BMPopoverIndicatorDirection;
|
|
14174
|
+
|
|
14175
|
+
|
|
14176
|
+
/**
|
|
14177
|
+
* Determines the direction that the popover should appear in order to fit best around the given rect.
|
|
14178
|
+
* The popover will verify directions in the order specified by the `permittedDirections` property.
|
|
14179
|
+
* If none of the permitted indicator directions would fit the popover in the viewport, the first
|
|
14180
|
+
* specified direction is returned.
|
|
14181
|
+
* @param rect The anchor rect to check against.
|
|
14182
|
+
* @return The direction that best fits.
|
|
14183
|
+
*
|
|
14184
|
+
*/
|
|
14185
|
+
private _directionAroundRect(rect: BMRect): BMPopoverIndicatorDirection;
|
|
14186
|
+
|
|
14187
|
+
|
|
13902
14188
|
/**
|
|
13903
14189
|
* Builds the SVG path definition for a popover with the given frame. Note that the indicator will be positioned inside the frame, which will push the usable
|
|
13904
14190
|
* area of the frame downwards.
|
|
13905
|
-
* @param frame
|
|
13906
|
-
* @param
|
|
13907
|
-
* @param radius
|
|
13908
|
-
* @param inset
|
|
13909
|
-
* @param
|
|
13910
|
-
*
|
|
13911
|
-
*
|
|
13912
|
-
* @param
|
|
14191
|
+
* @param frame The popover's frame.
|
|
14192
|
+
* @param indicatorSize Defaults to `8`. The size of the popover's indicator.
|
|
14193
|
+
* @param radius Defaults to `4`. Controls how rounded the corners are.
|
|
14194
|
+
* @param inset Defaults to `0`. An optional inset to apply to the path.
|
|
14195
|
+
* @param position Defaults to half of the frame's width. The position along the edge of the frame on which to place the indicator.
|
|
14196
|
+
* This coordinate is relative to the popover's frame and represents the center position of the indicator.
|
|
14197
|
+
* This position should not overlap the specified corner radius.
|
|
14198
|
+
* @param direction Defaults to `.Top`. Controls where the indicator will be placed relative to the popover.
|
|
13913
14199
|
* @return The SVG path.
|
|
13914
14200
|
*
|
|
13915
14201
|
*/
|
|
13916
|
-
private _pathForPopoverWithFrame(frame: BMRect, {
|
|
14202
|
+
private _pathForPopoverWithFrame(frame: BMRect, {indicatorSize: indicatorSize, radius: radius, inset: inset, position: position, direction: direction}?: {indicatorSize?: number | null | undefined, radius?: number | null | undefined, inset?: number | null | undefined, position?: number | null | undefined, direction?: BMPopoverIndicatorDirection | null | undefined}): string;
|
|
13917
14203
|
|
|
13918
14204
|
|
|
13919
14205
|
/**
|
|
@@ -14017,7 +14303,13 @@ declare class BMAlertPopup extends BMWindow {
|
|
|
14017
14303
|
* The DOM node that was focused when this alert was opened.
|
|
14018
14304
|
*
|
|
14019
14305
|
*/
|
|
14020
|
-
private
|
|
14306
|
+
private _previouslyActiveNode: DOMNode;
|
|
14307
|
+
|
|
14308
|
+
/**
|
|
14309
|
+
* A handler that is invoked when the window resizes, used to reposition this window.
|
|
14310
|
+
*
|
|
14311
|
+
*/
|
|
14312
|
+
private _centerHandler: (() => void);
|
|
14021
14313
|
|
|
14022
14314
|
/**
|
|
14023
14315
|
* Designated initializer. Initializes this alert popup with the given labels.
|