bm-core-ui 2.7.0 → 2.8.3
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/CHANGELOG.md +147 -0
- package/build/@types/index.d.ts +672 -92
- package/build/BMCodeEditor/BMCodeEditor.js +24 -27
- package/build/BMCollectionView/BMCollectionView.js +404 -55
- package/build/BMCollectionView/BMCollectionViewFlowLayout.js +423 -33
- package/build/BMCollectionView/BMCollectionViewLayout.js +158 -0
- package/build/BMCollectionView/BMCollectionViewMasonryLayout.js +145 -5
- package/build/BMCollectionView/BMCollectionViewTileLayout.js +147 -2
- package/build/BMCoreUI.css +60 -10
- package/build/BMView/BMMenu.js +155 -8
- package/build/BMView/BMTextField.js +25 -14
- package/build/BMView/BMView_v2.5.js +205 -3
- package/build/BMViewLayoutEditor/BMLayoutEditor.js +188 -168
- package/build/BMViewLayoutEditor/BMLayoutEditorSettingCells.js +2 -2
- package/build/BMWindow/BMConfirmationPopup.js +15 -0
- package/build/BMWindow/BMKeyboardShortcut.js +122 -3
- package/build/BMWindow/BMWindow.js +25 -90
- package/build/Core/BMAnimationContext.js +0 -4
- package/build/Core/BMCoreUI.js +9 -1
- package/lib/@types/BMCoreUI.min.d.ts +672 -92
- package/lib/BMCoreUI.min.js +1 -1
- package/package.json +1 -1
|
@@ -241,6 +241,12 @@ declare function BMUUIDMake(): string;
|
|
|
241
241
|
*
|
|
242
242
|
*/
|
|
243
243
|
declare class BMHTMLEntity {
|
|
244
|
+
/**
|
|
245
|
+
* The HTML entity representing the control key.
|
|
246
|
+
*
|
|
247
|
+
*/
|
|
248
|
+
static Control: BMHTMLEntity;
|
|
249
|
+
|
|
244
250
|
/**
|
|
245
251
|
* The HTML entity representing the bowen knot Command symbol.
|
|
246
252
|
*
|
|
@@ -277,6 +283,12 @@ declare class BMHTMLEntity {
|
|
|
277
283
|
*/
|
|
278
284
|
static Return: BMHTMLEntity;
|
|
279
285
|
|
|
286
|
+
/**
|
|
287
|
+
* The HTML entity representing the Escape symbol.
|
|
288
|
+
*
|
|
289
|
+
*/
|
|
290
|
+
static Escape: BMHTMLEntity;
|
|
291
|
+
|
|
280
292
|
private constructor();
|
|
281
293
|
}
|
|
282
294
|
|
|
@@ -3501,7 +3513,6 @@ declare class BMViewLayoutQueue {
|
|
|
3501
3513
|
*
|
|
3502
3514
|
* Views are usually not constructed using any constructor function. Instead, their lifecycle is managed by CoreUI.
|
|
3503
3515
|
* You obtain views by invoking the static `viewForNode(_)` method on the `BMView` type.
|
|
3504
|
-
* It is also not necessary to invoke any destruction method when the DOM nodes managed by views are removed.
|
|
3505
3516
|
*
|
|
3506
3517
|
* To extend from BMView and create a view subtype, extend from the BMView prototype, then, when requesting views use
|
|
3507
3518
|
* `BMView.viewForNode.call(MyCustomViewType, node)`. Note that if the node already had
|
|
@@ -3671,6 +3682,24 @@ declare class BMView {
|
|
|
3671
3682
|
private _layoutVariableValuesForViewport(): Dictionary<number>;
|
|
3672
3683
|
|
|
3673
3684
|
|
|
3685
|
+
/**
|
|
3686
|
+
* Registers a keyboard shortcut that can be activated when the given node has keyboard focus.
|
|
3687
|
+
* @param shortcut The shortcut to register.
|
|
3688
|
+
* @param forNode The DOM node for which the shortcut should be registered.
|
|
3689
|
+
*
|
|
3690
|
+
*/
|
|
3691
|
+
static registerKeyboardShortcut (shortcut: BMKeyboardShortcut, {forNode: forNode}: {forNode: DOMNode}): void;
|
|
3692
|
+
|
|
3693
|
+
|
|
3694
|
+
/**
|
|
3695
|
+
* Unregisters a keyboard shortcut. If this keyboard shortcut had not been previously registered, this method does nothing.
|
|
3696
|
+
* @param shortcut The keyboard shortcut to unregister.
|
|
3697
|
+
* @param forNode The DOM node for which the shortcut should be unregistered.
|
|
3698
|
+
*
|
|
3699
|
+
*/
|
|
3700
|
+
static unregisterKeyboardShortcut (shortcut: BMKeyboardShortcut, {forNode: forNode}: {forNode: DOMNode}): void;
|
|
3701
|
+
|
|
3702
|
+
|
|
3674
3703
|
/**
|
|
3675
3704
|
* Used when releasing an entire view hierarchy.
|
|
3676
3705
|
* Releases this view without affecting constraints or the DOM.
|
|
@@ -3802,8 +3831,6 @@ declare class BMView {
|
|
|
3802
3831
|
|
|
3803
3832
|
/**
|
|
3804
3833
|
* The layout queue on which this view processes its layout passes.
|
|
3805
|
-
* If this property is modified while this view had already registered a layout pass with a different queue,
|
|
3806
|
-
* that layout pass will still run on that queue the next time it is drained.
|
|
3807
3834
|
*
|
|
3808
3835
|
*/
|
|
3809
3836
|
layoutQueue: BMViewLayoutQueue;
|
|
@@ -4404,6 +4431,60 @@ declare class BMView {
|
|
|
4404
4431
|
valueForLayoutVariable(variable: string): number | null | undefined;
|
|
4405
4432
|
|
|
4406
4433
|
|
|
4434
|
+
/**
|
|
4435
|
+
* The keyboard shortcuts that have been registered to this view.
|
|
4436
|
+
*
|
|
4437
|
+
*/
|
|
4438
|
+
private _keyboardShortcuts: Dictionary<string, [BMKeyboardShortcut]>;
|
|
4439
|
+
|
|
4440
|
+
/**
|
|
4441
|
+
* Registers a keyboard shortcut that can be activated when this view has keyboard focus.
|
|
4442
|
+
* @param shortcut The keyboard shortcut to register.
|
|
4443
|
+
*
|
|
4444
|
+
*/
|
|
4445
|
+
registerKeyboardShortcut(shortcut: BMKeyboardShortcut): void;
|
|
4446
|
+
|
|
4447
|
+
|
|
4448
|
+
/**
|
|
4449
|
+
* Unregisters a keyboard shortcut. If this keyboard shortcut had not been previously registered, this method does nothing.
|
|
4450
|
+
* @param shortcut The keyboard shortcut to unregister.
|
|
4451
|
+
*
|
|
4452
|
+
*/
|
|
4453
|
+
unregisterKeyboardShortcut(shortcut: BMKeyboardShortcut): void;
|
|
4454
|
+
|
|
4455
|
+
|
|
4456
|
+
/**
|
|
4457
|
+
* If keyboard shortcuts have been registered on this view, this method will be invoked to identify
|
|
4458
|
+
* and handle key presses. Subclasses that override this method should invoke the base implementation to allow
|
|
4459
|
+
* keyboard shortcuts to be handled correctly.
|
|
4460
|
+
* @param event The event that triggered this action.
|
|
4461
|
+
*
|
|
4462
|
+
*/
|
|
4463
|
+
keyPressedWithEvent(event: KeyboardEvent): void;
|
|
4464
|
+
|
|
4465
|
+
|
|
4466
|
+
/**
|
|
4467
|
+
* Set to `YES` if keyboard shortcuts are enabled.
|
|
4468
|
+
*
|
|
4469
|
+
*/
|
|
4470
|
+
private _keyboardShortcutsEnabled: boolean;
|
|
4471
|
+
|
|
4472
|
+
/**
|
|
4473
|
+
* Enables keyboard shortcut handling. This makes the view's `node` focusable and attaches
|
|
4474
|
+
* the relevant event handlers to it.
|
|
4475
|
+
*
|
|
4476
|
+
*/
|
|
4477
|
+
private _enableKeyboardShortcuts(): void;
|
|
4478
|
+
|
|
4479
|
+
|
|
4480
|
+
/**
|
|
4481
|
+
* Disables keyboard shortcut handling. This detaches the relevant event handlers from this view's `node`.
|
|
4482
|
+
* The node's `tabIndex` property will not be cleared by this method.
|
|
4483
|
+
*
|
|
4484
|
+
*/
|
|
4485
|
+
private _disableKeyboardShortcuts(): void;
|
|
4486
|
+
|
|
4487
|
+
|
|
4407
4488
|
/**
|
|
4408
4489
|
* An internal list of layout constraints that affect this view. This array will contain both constraints having
|
|
4409
4490
|
* this view as the source view and constraints having this view as the target view. It also contains constraints
|
|
@@ -5202,6 +5283,12 @@ declare class BMTextField extends BMView {
|
|
|
5202
5283
|
*/
|
|
5203
5284
|
usesSuggestions: boolean;
|
|
5204
5285
|
|
|
5286
|
+
/**
|
|
5287
|
+
* The maximum number of suggestions that will be visible when the autocomplete menu is open.
|
|
5288
|
+
*
|
|
5289
|
+
*/
|
|
5290
|
+
maxSuggestions: number;
|
|
5291
|
+
|
|
5205
5292
|
/**
|
|
5206
5293
|
* An optional delegate that can be used to respond to various callbacks from the text field.
|
|
5207
5294
|
*
|
|
@@ -5342,6 +5429,15 @@ declare class BMLayoutEditor extends BMWindow {
|
|
|
5342
5429
|
initWithView(view: BMView, {layoutVariableProvider: layoutVariableProvider}?: {layoutVariableProvider?: BMLayoutVariableProvider | null | undefined}): BMLayoutEditor;
|
|
5343
5430
|
|
|
5344
5431
|
|
|
5432
|
+
/**
|
|
5433
|
+
* Prepares the given view for being edited by setting up the appropriate event handlers and
|
|
5434
|
+
* adding the required controls to the view's node.
|
|
5435
|
+
* @param view The view to prepare.
|
|
5436
|
+
*
|
|
5437
|
+
*/
|
|
5438
|
+
private _prepareView(view: BMView): void;
|
|
5439
|
+
|
|
5440
|
+
|
|
5345
5441
|
/**
|
|
5346
5442
|
* Is set to `YES` while this layout editor is full screen.
|
|
5347
5443
|
*
|
|
@@ -7967,6 +8063,18 @@ declare class BMMenu {
|
|
|
7967
8063
|
*/
|
|
7968
8064
|
private _sourceNodeDisplacement?: number | null | undefined;
|
|
7969
8065
|
|
|
8066
|
+
/**
|
|
8067
|
+
* The index of the currently highlighted menu item.
|
|
8068
|
+
*
|
|
8069
|
+
*/
|
|
8070
|
+
private _highlightedIndex: number;
|
|
8071
|
+
|
|
8072
|
+
/**
|
|
8073
|
+
* The DOM node that was focused when this alert was opened.
|
|
8074
|
+
*
|
|
8075
|
+
*/
|
|
8076
|
+
private readonly _previouslyActiveNode: any;
|
|
8077
|
+
|
|
7970
8078
|
/**
|
|
7971
8079
|
* Initializes this menu with the specified items.
|
|
7972
8080
|
* The menu will be hidden by default; the method showAtPoint(_) should be used to make the menu visible.
|
|
@@ -8036,6 +8144,38 @@ declare class BMMenu {
|
|
|
8036
8144
|
closeAnimated(animated?: boolean | null | undefined): void;
|
|
8037
8145
|
|
|
8038
8146
|
|
|
8147
|
+
/**
|
|
8148
|
+
* Invoked when the up arrow is pressed.
|
|
8149
|
+
* @param event The event that triggered this action.
|
|
8150
|
+
*
|
|
8151
|
+
*/
|
|
8152
|
+
arrowUpPressedWithEvent(event: KeyboardEvent): void;
|
|
8153
|
+
|
|
8154
|
+
|
|
8155
|
+
/**
|
|
8156
|
+
* Invoked when the down arrow is pressed.
|
|
8157
|
+
* @param event The event that triggered this action.
|
|
8158
|
+
*
|
|
8159
|
+
*/
|
|
8160
|
+
arrowDownPressedWithEvent(event: KeyboardEvent): void;
|
|
8161
|
+
|
|
8162
|
+
|
|
8163
|
+
/**
|
|
8164
|
+
* Invoked when the tab key is pressed.
|
|
8165
|
+
* @param event The event that triggered this action.
|
|
8166
|
+
*
|
|
8167
|
+
*/
|
|
8168
|
+
tabPressedWithEvent(event: KeyboardEvent): void;
|
|
8169
|
+
|
|
8170
|
+
|
|
8171
|
+
/**
|
|
8172
|
+
* Invoked when the escape key is pressed.
|
|
8173
|
+
* @param event The event that triggered this action.
|
|
8174
|
+
*
|
|
8175
|
+
*/
|
|
8176
|
+
escapePressedWithEvent(event: KeyboardEvent): void;
|
|
8177
|
+
|
|
8178
|
+
|
|
8039
8179
|
/**
|
|
8040
8180
|
* Constructs and returns a menu with the specified items.
|
|
8041
8181
|
* The menu will be hidden by default; the method `openAtPoint(_)` should be used to make the menu visible.
|
|
@@ -8811,22 +8951,24 @@ declare var BMCellMakeForCollectionView: any;
|
|
|
8811
8951
|
*
|
|
8812
8952
|
*
|
|
8813
8953
|
* Creating a subtype of the `BMCollectionViewLayout` type can be achieved in several ways:
|
|
8814
|
-
*
|
|
8954
|
+
*
|
|
8955
|
+
*
|
|
8815
8956
|
* * Create a type whose prototype inherits the `BMCollectionViewLayout` prototype, e.g.:
|
|
8816
|
-
*
|
|
8957
|
+
* ```
|
|
8817
8958
|
* MyCollectionViewLayout.prototype = Object.create(BMCollectionViewLayout.prototype, {
|
|
8818
8959
|
* // MyCollectionViewLayout prototype methods and properties here
|
|
8819
8960
|
* });
|
|
8820
|
-
*
|
|
8961
|
+
* ```
|
|
8821
8962
|
*
|
|
8822
8963
|
* * Create a type whose prototype copies the properties of `BMCollectionViewLayout`'s prototype, e.g.:
|
|
8823
|
-
*
|
|
8964
|
+
* ```
|
|
8824
8965
|
* BMExtend(MyCollectionViewLayout.prototype, BMCollectionViewLayout.prototype, {
|
|
8825
8966
|
* // MyCollectionViewLayout prototype methods and properties here
|
|
8826
8967
|
* });
|
|
8827
|
-
*
|
|
8968
|
+
* ```
|
|
8828
8969
|
*
|
|
8829
|
-
*
|
|
8970
|
+
*
|
|
8971
|
+
*
|
|
8830
8972
|
*
|
|
8831
8973
|
* All layout objects should inherit from the `BMCollectionViewLayout` prototype.
|
|
8832
8974
|
*
|
|
@@ -8931,6 +9073,87 @@ declare class BMCollectionViewLayout {
|
|
|
8931
9073
|
applyUpdates(): void;
|
|
8932
9074
|
|
|
8933
9075
|
|
|
9076
|
+
/**
|
|
9077
|
+
* Invoked by the collection view to obtain the first index path in the layout.
|
|
9078
|
+
* The default implementation returns the first index path in the data set.
|
|
9079
|
+
* @return The first index path, or `undefined` if no index path exists.
|
|
9080
|
+
*
|
|
9081
|
+
*/
|
|
9082
|
+
firstIndexPath(): BMIndexPath | null | undefined;
|
|
9083
|
+
|
|
9084
|
+
|
|
9085
|
+
/**
|
|
9086
|
+
* Invoked by the collection to obtain the index path that is visually to the left of the given index path.
|
|
9087
|
+
*
|
|
9088
|
+
* Subclasses may override this method to return an appropriate index path.
|
|
9089
|
+
* If the given index path is at the left edge of the content area, the same index path should be returned.
|
|
9090
|
+
*
|
|
9091
|
+
* The default implementation returns the previous index path in the data set.
|
|
9092
|
+
* @param indexPath The starting index path.
|
|
9093
|
+
* @return The index path to the left of the starting index path.
|
|
9094
|
+
*
|
|
9095
|
+
*/
|
|
9096
|
+
indexPathToTheLeftOfIndexPath(indexPath: BMIndexPath): BMIndexPath;
|
|
9097
|
+
|
|
9098
|
+
|
|
9099
|
+
/**
|
|
9100
|
+
* Invoked by the collection to obtain the index path that is visually on top of the given index path.
|
|
9101
|
+
*
|
|
9102
|
+
* Subclasses may override this method to return an appropriate index path.
|
|
9103
|
+
* If the given index path is at the top edge of the content area, the same index path should be returned.
|
|
9104
|
+
*
|
|
9105
|
+
* The default implementation returns the result of calling `indexPathToTheLeftOfIndexPath`.
|
|
9106
|
+
* @param indexPath The starting index path.
|
|
9107
|
+
* @return The index path above the starting index path.
|
|
9108
|
+
*
|
|
9109
|
+
*/
|
|
9110
|
+
indexPathAboveIndexPath(indexPath: BMIndexPath): BMIndexPath;
|
|
9111
|
+
|
|
9112
|
+
|
|
9113
|
+
/**
|
|
9114
|
+
* Invoked by the collection to obtain the index path that is visually to the right of the given index path.
|
|
9115
|
+
*
|
|
9116
|
+
* Subclasses may override this method to return an appropriate index path.
|
|
9117
|
+
* If the given index path is at the right edge of the content area, the same index path should be returned.
|
|
9118
|
+
*
|
|
9119
|
+
* The default implementation returns the next index path in the data set.
|
|
9120
|
+
* @param indexPath The starting index path.
|
|
9121
|
+
* @return The index path to the right of the starting index path.
|
|
9122
|
+
*
|
|
9123
|
+
*/
|
|
9124
|
+
indexPathToTheRightOfIndexPath(indexPath: BMIndexPath): BMIndexPath;
|
|
9125
|
+
|
|
9126
|
+
|
|
9127
|
+
/**
|
|
9128
|
+
* Invoked by the collection view to obtain the index path that is visually below the given index path.
|
|
9129
|
+
*
|
|
9130
|
+
* Subclasses may override this method to return an appropriate index path.
|
|
9131
|
+
* If the given index path is at the bottom edge of the content area, the same index path should be returned.
|
|
9132
|
+
*
|
|
9133
|
+
* The default implementation returns the result of calling `indexPathToTheRightOfIndexPath`.
|
|
9134
|
+
* @param indexPath The starting index path.
|
|
9135
|
+
* @return The index path below the starting index path.
|
|
9136
|
+
*
|
|
9137
|
+
*/
|
|
9138
|
+
indexPathBelowIndexPath(indexPath: BMIndexPath): BMIndexPath;
|
|
9139
|
+
|
|
9140
|
+
|
|
9141
|
+
/**
|
|
9142
|
+
* Invoked by the collection view to obtain a list of index paths that are visually between
|
|
9143
|
+
* the two given index paths.
|
|
9144
|
+
*
|
|
9145
|
+
* The default implementation returns a list containing the index paths from the data set that
|
|
9146
|
+
* start at the given index path, stopping at the target index path.
|
|
9147
|
+
*
|
|
9148
|
+
* The starting and ending index paths should be included in the result.
|
|
9149
|
+
* @param indexPath The starting index path.
|
|
9150
|
+
* @param toIndexPath The ending index path.
|
|
9151
|
+
* @return An array of index paths.
|
|
9152
|
+
*
|
|
9153
|
+
*/
|
|
9154
|
+
indexPathsFromIndexPath(indexPath: BMIndexPath, {toIndexPath: toIndexPath}: {toIndexPath: BMIndexPath}): BMIndexPath[];
|
|
9155
|
+
|
|
9156
|
+
|
|
8934
9157
|
/**
|
|
8935
9158
|
* Will be invoked by the collection before it updates to a new data set.
|
|
8936
9159
|
* Until collectionViewDidStartUpdates() is invoked, it is recommended that the layout object should be able to produce both the
|
|
@@ -9686,106 +9909,118 @@ declare class BMCollectionViewTreeLayout extends BMCollectionViewLayout {
|
|
|
9686
9909
|
}
|
|
9687
9910
|
|
|
9688
9911
|
|
|
9912
|
+
/**
|
|
9913
|
+
* Controls how cells are distributed within their row.
|
|
9914
|
+
*
|
|
9915
|
+
*/
|
|
9689
9916
|
declare class BMCollectionViewFlowLayoutGravity {
|
|
9690
|
-
|
|
9691
9917
|
/**
|
|
9692
9918
|
* The cells will flow to the center of the row with no spacing between them.
|
|
9693
9919
|
*
|
|
9694
9920
|
*/
|
|
9695
|
-
|
|
9921
|
+
static Center: BMCollectionViewFlowLayoutGravity;
|
|
9696
9922
|
|
|
9697
9923
|
/**
|
|
9698
9924
|
* The cells will be aligned to the start of the row.
|
|
9699
9925
|
*
|
|
9700
9926
|
*/
|
|
9701
|
-
|
|
9927
|
+
static Start: BMCollectionViewFlowLayoutGravity;
|
|
9702
9928
|
|
|
9703
9929
|
/**
|
|
9704
9930
|
* The cells will be aligned to the end of the row.
|
|
9705
9931
|
*
|
|
9706
9932
|
*/
|
|
9707
|
-
|
|
9933
|
+
static End: BMCollectionViewFlowLayoutGravity;
|
|
9708
9934
|
|
|
9709
9935
|
/**
|
|
9710
9936
|
* The cells will flow to the edges of the row with equal spacing between them.
|
|
9711
9937
|
*
|
|
9712
9938
|
*/
|
|
9713
|
-
|
|
9939
|
+
static Edge: BMCollectionViewFlowLayoutGravity;
|
|
9714
9940
|
|
|
9715
9941
|
/**
|
|
9716
9942
|
* The cells will flow such that they have equal spacing between them and the row edges.
|
|
9717
9943
|
*
|
|
9718
9944
|
*/
|
|
9719
|
-
|
|
9945
|
+
static Spaced: BMCollectionViewFlowLayoutGravity;
|
|
9720
9946
|
|
|
9721
9947
|
/**
|
|
9722
9948
|
* The cells will flow such that they will have no spacing between them.
|
|
9723
9949
|
* If the cells in a row do not occupy the entire horizontal alrea of that row, they will be expanded proportionally until they do.
|
|
9724
9950
|
*
|
|
9725
9951
|
*/
|
|
9726
|
-
|
|
9727
|
-
}
|
|
9952
|
+
static Expand: BMCollectionViewFlowLayoutGravity;
|
|
9728
9953
|
|
|
9954
|
+
private constructor();
|
|
9955
|
+
}
|
|
9729
9956
|
|
|
9957
|
+
/**
|
|
9958
|
+
* Controls how cells will be aligned within their row.
|
|
9959
|
+
*
|
|
9960
|
+
*/
|
|
9730
9961
|
declare class BMCollectionViewFlowLayoutAlignment {
|
|
9731
|
-
|
|
9732
9962
|
/**
|
|
9733
9963
|
* @deprecated Use `Start`
|
|
9734
9964
|
* The cells will be aligned to the starting edge of the row.
|
|
9735
9965
|
*
|
|
9736
9966
|
*/
|
|
9737
|
-
|
|
9967
|
+
static Top: BMCollectionViewFlowLayoutAlignment;
|
|
9738
9968
|
|
|
9739
9969
|
/**
|
|
9740
9970
|
* The cells will be aligned to the start of the row.
|
|
9741
9971
|
*
|
|
9742
9972
|
*/
|
|
9743
|
-
|
|
9973
|
+
static Start: BMCollectionViewFlowLayoutAlignment;
|
|
9744
9974
|
|
|
9745
9975
|
/**
|
|
9746
9976
|
* The cells will be aligned to the center of the row.
|
|
9747
9977
|
*
|
|
9748
9978
|
*/
|
|
9749
|
-
|
|
9979
|
+
static Center: BMCollectionViewFlowLayoutAlignment;
|
|
9750
9980
|
|
|
9751
9981
|
/**
|
|
9752
9982
|
* @deprecated Use `End`
|
|
9753
9983
|
* The cells will be aligned to the end of the row.
|
|
9754
9984
|
*
|
|
9755
9985
|
*/
|
|
9756
|
-
|
|
9986
|
+
static Bottom: BMCollectionViewFlowLayoutAlignment;
|
|
9757
9987
|
|
|
9758
9988
|
/**
|
|
9759
9989
|
* The cells will be aligned to the end of the row.
|
|
9760
9990
|
*
|
|
9761
9991
|
*/
|
|
9762
|
-
|
|
9992
|
+
static End: BMCollectionViewFlowLayoutAlignment;
|
|
9763
9993
|
|
|
9764
9994
|
/**
|
|
9765
9995
|
* The cells will expand to fit the entire height of the row.
|
|
9766
9996
|
*
|
|
9767
9997
|
*/
|
|
9768
|
-
|
|
9769
|
-
}
|
|
9998
|
+
static Expand: BMCollectionViewFlowLayoutAlignment;
|
|
9770
9999
|
|
|
10000
|
+
private constructor();
|
|
10001
|
+
}
|
|
9771
10002
|
|
|
10003
|
+
/**
|
|
10004
|
+
* An enum containing the possible orientations that the flow layout can use.
|
|
10005
|
+
*
|
|
10006
|
+
*/
|
|
9772
10007
|
declare class BMCollectionViewFlowLayoutOrientation {
|
|
9773
|
-
|
|
9774
10008
|
/**
|
|
9775
10009
|
* Indicates that the flow layout will arrange cells primarily along the horizontal axis.
|
|
9776
10010
|
* When the orientation is set to this value the flow layout will scroll horizontally.
|
|
9777
10011
|
*
|
|
9778
10012
|
*/
|
|
9779
|
-
|
|
10013
|
+
static Horizontal: BMCollectionViewFlowLayoutOrientation;
|
|
9780
10014
|
|
|
9781
10015
|
/**
|
|
9782
10016
|
* Indicates that the flow layout will arrange cells primarily along the vertical axis.
|
|
9783
10017
|
* When the orientation is set to this value the tile flow will scroll vertically.
|
|
9784
10018
|
*
|
|
9785
10019
|
*/
|
|
9786
|
-
|
|
9787
|
-
}
|
|
10020
|
+
static Vertical: BMCollectionViewFlowLayoutOrientation;
|
|
9788
10021
|
|
|
10022
|
+
private constructor();
|
|
10023
|
+
}
|
|
9789
10024
|
|
|
9790
10025
|
/**
|
|
9791
10026
|
* The flow layout arranges cells in a horiztonally (TO DO) or vertically scrolling container.
|
|
@@ -9936,10 +10171,14 @@ declare class BMCollectionViewFlowLayout extends BMCollectionViewLayout {
|
|
|
9936
10171
|
* When using automatic cell sizes, the generator will yield execution and only calculate portions of the layout on demand.
|
|
9937
10172
|
* With the exeption of the first invocation, it is required to pass an index path to the iterator's `next` method. The layout process
|
|
9938
10173
|
* will continue until it fully lays out the cell for that index path, at which point it will yield again.
|
|
9939
|
-
* @param useOffset
|
|
10174
|
+
* @param useOffset When set to `YES` the layout will take the scrollbar size into account.
|
|
10175
|
+
* @param targetRect When computing a layout using automatic cell sizes, this is an optional rect up to which
|
|
10176
|
+
* to measure cells. This is reserved for when this is invoked as a delegate.
|
|
10177
|
+
* @param targetIndexPath When computing a layout using automatic cell sizes, this is an optional index path up to which
|
|
10178
|
+
* to measure cells. This is reserved for when this is invoked as a delegate.
|
|
9940
10179
|
*
|
|
9941
10180
|
*/
|
|
9942
|
-
*_prepareLayoutWithScrollbarOffsetGenerator(useOffset: boolean): void;
|
|
10181
|
+
*_prepareLayoutWithScrollbarOffsetGenerator(useOffset: boolean, {targetRect: targetRect, targetIndexPath: targetIndexPath}?: {targetRect?: BMRect | null | undefined, targetIndexPath?: BMIndexPath | null | undefined}): void;
|
|
9943
10182
|
|
|
9944
10183
|
|
|
9945
10184
|
/**
|
|
@@ -10037,6 +10276,46 @@ declare class BMCollectionViewFlowLayout extends BMCollectionViewLayout {
|
|
|
10037
10276
|
computedAttributesForElementsInRect(rect: BMRect, {usingCache: usingCache}?: {usingCache?: any | null | undefined}): BMCollectionViewLayoutAttributes[];
|
|
10038
10277
|
|
|
10039
10278
|
|
|
10279
|
+
/**
|
|
10280
|
+
* Returns the index path that is above the given index path in a cached layout.
|
|
10281
|
+
* In a horizontal layout this returns the index path that is to the left of the given index path.
|
|
10282
|
+
* @param indexPath The index path to start from.
|
|
10283
|
+
* @return The index path above the given one.
|
|
10284
|
+
*
|
|
10285
|
+
*/
|
|
10286
|
+
private _cachedIndexPathAboveIndexPath(indexPath: BMIndexPath): BMIndexPath;
|
|
10287
|
+
|
|
10288
|
+
|
|
10289
|
+
/**
|
|
10290
|
+
* Returns the index path that is above the given index path in a computed layout.
|
|
10291
|
+
* In a horizontal layout this returns the index path that is to the left of the given index path.
|
|
10292
|
+
* @param indexPath The index path to start from.
|
|
10293
|
+
* @return The index path above the given one.
|
|
10294
|
+
*
|
|
10295
|
+
*/
|
|
10296
|
+
private _computedIndexPathAboveIndexPath(indexPath: BMIndexPath): BMIndexPath;
|
|
10297
|
+
|
|
10298
|
+
|
|
10299
|
+
/**
|
|
10300
|
+
* Returns the index path that is below the given index path in a cached layout.
|
|
10301
|
+
* In a horizontal layout this returns the index path that is to the right of the given index path.
|
|
10302
|
+
* @param indexPath The index path to start from.
|
|
10303
|
+
* @return The index path below the given one.
|
|
10304
|
+
*
|
|
10305
|
+
*/
|
|
10306
|
+
private _cachedIndexPathBelowIndexPath(indexPath: BMIndexPath): BMIndexPath;
|
|
10307
|
+
|
|
10308
|
+
|
|
10309
|
+
/**
|
|
10310
|
+
* Returns the index path that is below the given index path in a computed layout.
|
|
10311
|
+
* In a horizontal layout this returns the index path that is to the left of the given index path.
|
|
10312
|
+
* @param indexPath The index path to start from.
|
|
10313
|
+
* @return The index path below the given one.
|
|
10314
|
+
*
|
|
10315
|
+
*/
|
|
10316
|
+
private _computedIndexPathBelowIndexPath(indexPath: BMIndexPath): BMIndexPath;
|
|
10317
|
+
|
|
10318
|
+
|
|
10040
10319
|
/**
|
|
10041
10320
|
* Constructs and returns a new flow layout.
|
|
10042
10321
|
* @return A flow layout.
|
|
@@ -10131,11 +10410,23 @@ declare class BMCollectionViewMasonryLayout extends BMCollectionViewLayout {
|
|
|
10131
10410
|
|
|
10132
10411
|
/**
|
|
10133
10412
|
* Retrieves the cached attributes for the cell at the given index path.
|
|
10413
|
+
* @param indexPath The cell's index path.
|
|
10414
|
+
* @param usingCache Defaults to this layout's current cache. The cache object to use.
|
|
10415
|
+
* @return The layout attributes if the index path exists in the data set, `undefined` otherwise.
|
|
10416
|
+
*
|
|
10417
|
+
*/
|
|
10418
|
+
cachedAttributesForCellAtIndexPath(indexPath: BMIndexPath, {usingCache: usingCache}?: {usingCache?: any | null | undefined}): BMCollectionViewLayoutAttributes | null | undefined;
|
|
10419
|
+
|
|
10420
|
+
|
|
10421
|
+
/**
|
|
10422
|
+
* Retrieves the cached attributes for the cell at the given index path and information about
|
|
10423
|
+
* the column it is on.
|
|
10134
10424
|
* @param indexPath The cell's index path.
|
|
10135
10425
|
* @param usingCache Defaults to this layout's current cache. The cache object to use.
|
|
10426
|
+
* @return An object that describes the requested attributes and its position in the layout.
|
|
10136
10427
|
*
|
|
10137
10428
|
*/
|
|
10138
|
-
|
|
10429
|
+
private _extendedCachedAttributesForCellAtIndexPath(indexPath: BMIndexPath, {usingCache: usingCache}?: {usingCache?: any | null | undefined}): any | null | undefined;
|
|
10139
10430
|
|
|
10140
10431
|
|
|
10141
10432
|
/**
|
|
@@ -10822,6 +11113,12 @@ declare class BMCollectionView<T = any> extends BMView {
|
|
|
10822
11113
|
*/
|
|
10823
11114
|
readonly bounds: BMRect;
|
|
10824
11115
|
|
|
11116
|
+
/**
|
|
11117
|
+
* A rect that represents the part of the bounds that are visible on screen.
|
|
11118
|
+
*
|
|
11119
|
+
*/
|
|
11120
|
+
readonly visibleBounds: BMRect;
|
|
11121
|
+
|
|
10825
11122
|
/**
|
|
10826
11123
|
* The number of pixels by which to extend the bounds to preload layout attributes and render off-screen elements.
|
|
10827
11124
|
* Higher values will create more cells and reduce the flickering at high scroll speeds, but will use more memory and processing time.
|
|
@@ -10953,6 +11250,12 @@ declare class BMCollectionView<T = any> extends BMView {
|
|
|
10953
11250
|
*/
|
|
10954
11251
|
assignsReuseIdentifierAsClass: boolean;
|
|
10955
11252
|
|
|
11253
|
+
/**
|
|
11254
|
+
* Defaults to `YES`. When set to `NO`, keyboard navigation is disabled.
|
|
11255
|
+
*
|
|
11256
|
+
*/
|
|
11257
|
+
supportsKeyboardNavigation: boolean;
|
|
11258
|
+
|
|
10956
11259
|
/**
|
|
10957
11260
|
* Registers a class to be used when creating cells with the given reuse identifier.
|
|
10958
11261
|
* This does not affect already existing cells, but newly created cells with the given identifier will be created
|
|
@@ -11494,6 +11797,77 @@ declare class BMCollectionView<T = any> extends BMView {
|
|
|
11494
11797
|
cellWasRightClicked(cell: BMCollectionViewCell, {withEvent: withEvent}: {withEvent: Event}): boolean | null | undefined;
|
|
11495
11798
|
|
|
11496
11799
|
|
|
11800
|
+
/**
|
|
11801
|
+
* An array that contains the registered keyboard navigation shortcuts.
|
|
11802
|
+
*
|
|
11803
|
+
*/
|
|
11804
|
+
private _keyboardNavigationShortcuts: BMKeyboardShortcut[];
|
|
11805
|
+
|
|
11806
|
+
/**
|
|
11807
|
+
* @protected
|
|
11808
|
+
* Configures the keyboard shortcuts used by the collection view for highlighting.
|
|
11809
|
+
* Subclasses overriding this may invoke the superclass implementation to retain the default keyboard
|
|
11810
|
+
* shortcuts.
|
|
11811
|
+
*
|
|
11812
|
+
*/
|
|
11813
|
+
configureKeyboardShortcuts(): void;
|
|
11814
|
+
|
|
11815
|
+
|
|
11816
|
+
/**
|
|
11817
|
+
* @protected
|
|
11818
|
+
* Removes the keyboard shortcuts used by the collection view for highlighting.
|
|
11819
|
+
* Subclasses overriding this should invoke the superclass implementation to remove the default keyboard
|
|
11820
|
+
* shortcuts.
|
|
11821
|
+
*
|
|
11822
|
+
*/
|
|
11823
|
+
disableKeyboardShortcuts(): void;
|
|
11824
|
+
|
|
11825
|
+
|
|
11826
|
+
/**
|
|
11827
|
+
* Invoked when an arrow key is pressed on the keyboard while this collection view has keyboard focus.
|
|
11828
|
+
* @param event The keyboard event that triggered this action.
|
|
11829
|
+
*
|
|
11830
|
+
*/
|
|
11831
|
+
private _keyboardArrowPressedWithEvent(event: KeyboardEvent): void;
|
|
11832
|
+
|
|
11833
|
+
|
|
11834
|
+
/**
|
|
11835
|
+
* The index path, if any, of the cell that is currently receiving keyboard focus.
|
|
11836
|
+
*
|
|
11837
|
+
* Setting this property to a valid index path will cause the relevant cell to become highlighted.
|
|
11838
|
+
* Additionally, setting this property to `undefined` will clear the highlighted cell.
|
|
11839
|
+
*
|
|
11840
|
+
*/
|
|
11841
|
+
highlightedIndexPath?: BMIndexPath<T> | null | undefined;
|
|
11842
|
+
|
|
11843
|
+
/**
|
|
11844
|
+
* Highlights the given index path.
|
|
11845
|
+
* @param indexPath The index path to highlight.
|
|
11846
|
+
* @param withEvent The event that triggered this action, if any.
|
|
11847
|
+
*
|
|
11848
|
+
*/
|
|
11849
|
+
private _highlightIndexPath(indexPath: BMIndexPath, {withEvent: withEvent}?: {withEvent?: UIEvent | null | undefined}): void;
|
|
11850
|
+
|
|
11851
|
+
|
|
11852
|
+
/**
|
|
11853
|
+
* Checks if the cell at the specified index path is highlighted.
|
|
11854
|
+
* @param indexPath The index path. This will be loosely compared to the highlighted index path.
|
|
11855
|
+
* @return YES if the cell is highlighted, NO otherwise.
|
|
11856
|
+
*
|
|
11857
|
+
*/
|
|
11858
|
+
isCellAtIndexPathHighlighted(indexPath: BMIndexPath<T>): boolean;
|
|
11859
|
+
|
|
11860
|
+
|
|
11861
|
+
/**
|
|
11862
|
+
* Invoked when an arrow is pressed while this collection view has keyboard focus.
|
|
11863
|
+
* Highlights the index path to the specified direction of the currently highlighted index path.
|
|
11864
|
+
* @param arrow The key code of the keyboard arrow that was pressed.
|
|
11865
|
+
* @param withEvent The event that triggerred this action.
|
|
11866
|
+
*
|
|
11867
|
+
*/
|
|
11868
|
+
keyboardArrowPressed(arrow: string, {withEvent: withEvent}: {withEvent: KeyboardEvent}): void;
|
|
11869
|
+
|
|
11870
|
+
|
|
11497
11871
|
/**
|
|
11498
11872
|
* The list of selected index paths.
|
|
11499
11873
|
* The index paths in the selection are all strictly compared to the index paths in the data set.
|
|
@@ -11503,7 +11877,7 @@ declare class BMCollectionView<T = any> extends BMView {
|
|
|
11503
11877
|
selectedIndexPaths: BMIndexPath<T>[];
|
|
11504
11878
|
|
|
11505
11879
|
/**
|
|
11506
|
-
* Invoked by the collection view during an update to refresh the index paths of the selected cells.
|
|
11880
|
+
* Invoked by the collection view during an update to refresh the index paths of the selected and highlighted cells.
|
|
11507
11881
|
* Index paths that are no longer in the data set will be removed and all other index paths will be updated
|
|
11508
11882
|
* to the correct section and row indexes.
|
|
11509
11883
|
*
|
|
@@ -11638,10 +12012,10 @@ declare class BMCollectionView<T = any> extends BMView {
|
|
|
11638
12012
|
* Should be invoked to cause the collection view to scroll to the cell at the specified index path.
|
|
11639
12013
|
* Optionally, this scrolling may be animated.
|
|
11640
12014
|
* @param indexPath The index path of the cell to scroll to.
|
|
11641
|
-
* @param withVerticalGravity Defaults to
|
|
12015
|
+
* @param withVerticalGravity Defaults to a value depending on where the cell is positioned. The scroll gravity to use,
|
|
11642
12016
|
* which controls where on the screen the cell should appear after the scrolling operation
|
|
11643
12017
|
* completes.
|
|
11644
|
-
* @param horizontalGravity Defaults to
|
|
12018
|
+
* @param horizontalGravity Defaults to a value depending on where the cell is positioned. The scroll gravity to use,
|
|
11645
12019
|
* which controls where on the screen the cell should appear after the scrolling operation
|
|
11646
12020
|
* completes.
|
|
11647
12021
|
* @param animated Defaults to `NO`. If set to `YES`, the scroll will be animated, otherwise it will be
|
|
@@ -11657,10 +12031,10 @@ declare class BMCollectionView<T = any> extends BMView {
|
|
|
11657
12031
|
* Optionally, this scrolling may be animated.
|
|
11658
12032
|
* @param identifier The supplementary view's type identifier.
|
|
11659
12033
|
* @param atIndexPath The index path of the supplementary view to scroll to.
|
|
11660
|
-
* @param verticalGravity Defaults to
|
|
12034
|
+
* @param verticalGravity Defaults to a value depending on where the cell is positioned. The scroll gravity to use,
|
|
11661
12035
|
* which controls where on the screen the cell should appear after the scrolling operation
|
|
11662
12036
|
* completes.
|
|
11663
|
-
* @param horizontalGravity Defaults to
|
|
12037
|
+
* @param horizontalGravity Defaults to a value depending on where the cell is positioned. The scroll gravity to use,
|
|
11664
12038
|
* which controls where on the screen the cell should appear after the scrolling operation
|
|
11665
12039
|
* completes.
|
|
11666
12040
|
* @param animated Defaults to NO. If set to YES, the scroll will be animated, otherwise it will be
|
|
@@ -12171,6 +12545,68 @@ declare interface BMCollectionViewDelegate {
|
|
|
12171
12545
|
collectionViewDidDeselectCellAtIndexPath?(collectionView: BMCollectionView, indexPath: BMIndexPath): void;
|
|
12172
12546
|
|
|
12173
12547
|
|
|
12548
|
+
/**
|
|
12549
|
+
* Invoked by the collection view whenever any arrow key is pressed to determine if it should process that event and highlight
|
|
12550
|
+
* an appropriate cell.
|
|
12551
|
+
*
|
|
12552
|
+
* Delegates can implement this method to control when keyboard events should be handled, for example to disallow handling the
|
|
12553
|
+
* left and right arrow keys when the event originates from an input element.
|
|
12554
|
+
* @param collectionView The calling collection view.
|
|
12555
|
+
* @param key The code of the key that was pressed.
|
|
12556
|
+
* @param withEvent The keyboard event that triggered this action.
|
|
12557
|
+
*
|
|
12558
|
+
*/
|
|
12559
|
+
collectionViewShouldHighlightCellForArrowKey?(collectionView: BMCollectionView, key: string, {withEvent: withEvent}: {withEvent: KeyboardEvent}): void;
|
|
12560
|
+
|
|
12561
|
+
|
|
12562
|
+
/**
|
|
12563
|
+
* Invoked by the collection view to verify if a cell can be highlighted.
|
|
12564
|
+
*
|
|
12565
|
+
* If this method is not implemented by the delegate object, the collection view will assume that any cell may be highlighted.
|
|
12566
|
+
* @param collectionView The calling collection view.
|
|
12567
|
+
* @param indexPath The cell's index path or `undefined` if the highlighted index path should be cleared.
|
|
12568
|
+
* @param withEvent If the cell should be highlighted because of an event, this represents the event
|
|
12569
|
+
* for which the cell should be highlighted.
|
|
12570
|
+
* @return `YES` if the cell can be highlighted, `NO` otherwise.
|
|
12571
|
+
*
|
|
12572
|
+
*/
|
|
12573
|
+
collectionViewCanHighlightCellAtIndexPath?(collectionView: BMCollectionView, indexPath?: BMIndexPath | null | undefined, {withEvent: withEvent}?: {withEvent?: Event | null | undefined}): boolean;
|
|
12574
|
+
|
|
12575
|
+
|
|
12576
|
+
/**
|
|
12577
|
+
* Invoked by the collection view whenever any cell was highlighted.
|
|
12578
|
+
* @param collectionView The calling collection view.
|
|
12579
|
+
* @param indexPath The cell's index path or `undefined` if the highlighted index path was cleared.
|
|
12580
|
+
* @param withEvent If the cell was highlighted because of an event, this represents the event
|
|
12581
|
+
* for which the cell was highlighted.
|
|
12582
|
+
*
|
|
12583
|
+
*/
|
|
12584
|
+
collectionViewDidHighlightCellAtIndexPath?(collectionView: BMCollectionView, indexPath: BMIndexPath, {withEvent: withEvent}?: {withEvent?: Event | null | undefined}): void;
|
|
12585
|
+
|
|
12586
|
+
|
|
12587
|
+
/**
|
|
12588
|
+
* Invoked by the collection view whenever any cell is no longer highlighted.
|
|
12589
|
+
* @param collectionView The calling collection view.
|
|
12590
|
+
* @param indexPath The cell's index path.
|
|
12591
|
+
* @param withEvent If the cell was dehighlighted because of an event, this represents the event
|
|
12592
|
+
* for which the cell was dehighlighted.
|
|
12593
|
+
*
|
|
12594
|
+
*/
|
|
12595
|
+
collectionViewDidDehighlightCellAtIndexPath?(collectionView: BMCollectionView, indexPath: BMIndexPath, {withEvent: withEvent}?: {withEvent?: Event | null | undefined}): void;
|
|
12596
|
+
|
|
12597
|
+
|
|
12598
|
+
/**
|
|
12599
|
+
* Invoked by a collection view after highlighting a cell that it is not visible on screen to determine
|
|
12600
|
+
* if it should scroll to reveal that cell.
|
|
12601
|
+
*
|
|
12602
|
+
* When this method is not implemented, the default behaviour is to scroll to off-screen cells that are highlighted.
|
|
12603
|
+
* @param collectionView The calling collection view.
|
|
12604
|
+
* @param indexPath The index path that was just highlighted.
|
|
12605
|
+
*
|
|
12606
|
+
*/
|
|
12607
|
+
collectionViewShouldScrollToHighlightedCellAtIndexPath?(collectionView: BMCollectionView, indexPath: BMIndexPath): void;
|
|
12608
|
+
|
|
12609
|
+
|
|
12174
12610
|
/**
|
|
12175
12611
|
* Invoked by the collection view before running the initial presentation animation. Delegate objects can implement this method
|
|
12176
12612
|
* to customize the animation's parameters.
|
|
@@ -12211,11 +12647,11 @@ declare interface BMCollectionViewDelegate {
|
|
|
12211
12647
|
* until the collection view is certain that a second click will not follow fast enough to trigger a double click.
|
|
12212
12648
|
* @param collectionView The calling collection view.
|
|
12213
12649
|
* @param cell The cell that triggered this event.
|
|
12214
|
-
* @param withEvent The
|
|
12650
|
+
* @param withEvent The event that triggered this action.
|
|
12215
12651
|
* @return Defaults to NO. If set to YES the collection view will track double clicks for this event.
|
|
12216
12652
|
*
|
|
12217
12653
|
*/
|
|
12218
|
-
collectionViewCanDoubleClickCell?(collectionView: BMCollectionView, cell: BMCollectionViewCell, {withEvent: withEvent}: {withEvent:
|
|
12654
|
+
collectionViewCanDoubleClickCell?(collectionView: BMCollectionView, cell: BMCollectionViewCell, {withEvent: withEvent}: {withEvent: UIEvent}): boolean | null | undefined;
|
|
12219
12655
|
|
|
12220
12656
|
|
|
12221
12657
|
/**
|
|
@@ -12226,11 +12662,11 @@ declare interface BMCollectionViewDelegate {
|
|
|
12226
12662
|
* By default, when returning NO or nothing from this method, the collection view will togle the selection state of the clicked cell.
|
|
12227
12663
|
* @param collectionView The calling collection view.
|
|
12228
12664
|
* @param cell The cell that triggered this event.
|
|
12229
|
-
* @param withEvent The
|
|
12665
|
+
* @param withEvent The event that triggered this action.
|
|
12230
12666
|
* @return Defaults to NO. If set to YES the default actions will be suppressed for this event.
|
|
12231
12667
|
*
|
|
12232
12668
|
*/
|
|
12233
|
-
collectionViewCellWasClicked?(collectionView: BMCollectionView, cell: BMCollectionViewCell, {withEvent: withEvent}: {withEvent:
|
|
12669
|
+
collectionViewCellWasClicked?(collectionView: BMCollectionView, cell: BMCollectionViewCell, {withEvent: withEvent}: {withEvent: UIEvent}): boolean | null | undefined;
|
|
12234
12670
|
|
|
12235
12671
|
|
|
12236
12672
|
/**
|
|
@@ -12240,11 +12676,11 @@ declare interface BMCollectionViewDelegate {
|
|
|
12240
12676
|
* and prevent the default actions from occuring.
|
|
12241
12677
|
* @param collectionView The calling collection view.
|
|
12242
12678
|
* @param cell The cell that triggered this event.
|
|
12243
|
-
* @param withEvent The
|
|
12679
|
+
* @param withEvent The event that triggered this action.
|
|
12244
12680
|
* @return Defaults to NO. If set to YES the default actions will be suppressed for this event.
|
|
12245
12681
|
*
|
|
12246
12682
|
*/
|
|
12247
|
-
collectionViewCellWasDoubleClicked?(collectionView: BMCollectionView, cell: BMCollectionViewCell, {withEvent: withEvent}: {withEvent:
|
|
12683
|
+
collectionViewCellWasDoubleClicked?(collectionView: BMCollectionView, cell: BMCollectionViewCell, {withEvent: withEvent}: {withEvent: UIEvent}): boolean | null | undefined;
|
|
12248
12684
|
|
|
12249
12685
|
|
|
12250
12686
|
/**
|
|
@@ -12254,11 +12690,11 @@ declare interface BMCollectionViewDelegate {
|
|
|
12254
12690
|
* and prevent the default actions from occuring.
|
|
12255
12691
|
* @param collectionView The calling collection view.
|
|
12256
12692
|
* @param cell The cell that triggered this event.
|
|
12257
|
-
* @param withEvent The
|
|
12693
|
+
* @param withEvent The event that triggered this action.
|
|
12258
12694
|
* @return Defaults to NO. If set to YES the default actions will be suppressed for this event.
|
|
12259
12695
|
*
|
|
12260
12696
|
*/
|
|
12261
|
-
collectionViewCellWasLongClicked?(collectionView: BMCollectionView, cell: BMCollectionViewCell, {withEvent: withEvent}: {withEvent:
|
|
12697
|
+
collectionViewCellWasLongClicked?(collectionView: BMCollectionView, cell: BMCollectionViewCell, {withEvent: withEvent}: {withEvent: UIEvent}): boolean | null | undefined;
|
|
12262
12698
|
|
|
12263
12699
|
|
|
12264
12700
|
/**
|
|
@@ -12269,11 +12705,11 @@ declare interface BMCollectionViewDelegate {
|
|
|
12269
12705
|
* By default, when returning NO or nothing from this method, the browser's default context menu will appear.
|
|
12270
12706
|
* @param collectionView The calling collection view.
|
|
12271
12707
|
* @param cell The cell that triggered this event.
|
|
12272
|
-
* @param withEvent The
|
|
12708
|
+
* @param withEvent The event that triggered this action.
|
|
12273
12709
|
* @return Defaults to NO. If set to YES the default actions will be suppressed for this event.
|
|
12274
12710
|
*
|
|
12275
12711
|
*/
|
|
12276
|
-
collectionViewCellWasRightClicked?(collectionView: BMCollectionView, cell: BMCollectionViewCell, {withEvent: withEvent}: {withEvent:
|
|
12712
|
+
collectionViewCellWasRightClicked?(collectionView: BMCollectionView, cell: BMCollectionViewCell, {withEvent: withEvent}: {withEvent: UIEvent}): boolean | null | undefined;
|
|
12277
12713
|
|
|
12278
12714
|
|
|
12279
12715
|
/**
|
|
@@ -12842,12 +13278,6 @@ declare class BMWindow extends BMView {
|
|
|
12842
13278
|
*/
|
|
12843
13279
|
private _toolWindows: BMToolWindow[];
|
|
12844
13280
|
|
|
12845
|
-
/**
|
|
12846
|
-
* The keyboard shortcuts that have been registered to this window.
|
|
12847
|
-
*
|
|
12848
|
-
*/
|
|
12849
|
-
private _keyboardShortcuts: BMKeyboardShortcut[];
|
|
12850
|
-
|
|
12851
13281
|
/**
|
|
12852
13282
|
* Initializes this window with the given screen area.
|
|
12853
13283
|
* @param frame The frame.
|
|
@@ -12868,38 +13298,6 @@ declare class BMWindow extends BMView {
|
|
|
12868
13298
|
private _viewportDidResize(event: Event): void;
|
|
12869
13299
|
|
|
12870
13300
|
|
|
12871
|
-
/**
|
|
12872
|
-
* Registers a keyboard shortcut that can be activated when this window is the key window.
|
|
12873
|
-
* @param shortcut The keyboard shortcut to register.
|
|
12874
|
-
*
|
|
12875
|
-
*/
|
|
12876
|
-
registerKeyboardShortcut(shortcut: BMKeyboardShortcut): void;
|
|
12877
|
-
|
|
12878
|
-
|
|
12879
|
-
/**
|
|
12880
|
-
* Unregisters a keyboard shortcut. If this keyboard shortcut had not been previously registered, this method does nothing.
|
|
12881
|
-
* @param shortcut The keyboard shortcut to unregister.
|
|
12882
|
-
*
|
|
12883
|
-
*/
|
|
12884
|
-
unregisterKeyboardShortcut(shortcut: BMKeyboardShortcut): void;
|
|
12885
|
-
|
|
12886
|
-
|
|
12887
|
-
/**
|
|
12888
|
-
* If keyboard shortcuts have been registered on this window, this method will be invoked to identify
|
|
12889
|
-
* and handle key presses. Subclasses that override this method should invoke the base implementation to allow
|
|
12890
|
-
* keyboard shortcuts to be handled correctly.
|
|
12891
|
-
* @param event The event that triggered this action.
|
|
12892
|
-
*
|
|
12893
|
-
*/
|
|
12894
|
-
keyPressedWithEvent(event: KeyboardEvent): void;
|
|
12895
|
-
|
|
12896
|
-
|
|
12897
|
-
/**
|
|
12898
|
-
* Set to `YES` if keyboard shortcuts are enabled.
|
|
12899
|
-
*
|
|
12900
|
-
*/
|
|
12901
|
-
private _keyboardShortcutsEnabled: boolean;
|
|
12902
|
-
|
|
12903
13301
|
/**
|
|
12904
13302
|
* Enables keyboard shortcut handling. This makes the window's `node` focusable and attaches
|
|
12905
13303
|
* the relevant event handlers to it. If this window is the key window and the keyboard focus
|
|
@@ -12909,13 +13307,6 @@ declare class BMWindow extends BMView {
|
|
|
12909
13307
|
private _enableKeyboardShortcuts(): void;
|
|
12910
13308
|
|
|
12911
13309
|
|
|
12912
|
-
/**
|
|
12913
|
-
* Disables keyboard shortcut handling. This detaches the relevant event handlers from this window's `node`.
|
|
12914
|
-
*
|
|
12915
|
-
*/
|
|
12916
|
-
private _disableKeyboardShortcuts(): void;
|
|
12917
|
-
|
|
12918
|
-
|
|
12919
13310
|
/**
|
|
12920
13311
|
* If this window is visible, this method dismisses it. Otherwise the window is made visible.
|
|
12921
13312
|
* @param animated Defaults to `YES`. If set to `YES`, this change will be animated, otherwise it will be instant.
|
|
@@ -13622,6 +14013,12 @@ declare class BMAlertPopup extends BMWindow {
|
|
|
13622
14013
|
*/
|
|
13623
14014
|
positiveActionText: string;
|
|
13624
14015
|
|
|
14016
|
+
/**
|
|
14017
|
+
* The DOM node that was focused when this alert was opened.
|
|
14018
|
+
*
|
|
14019
|
+
*/
|
|
14020
|
+
private readonly _previouslyActiveNode: any;
|
|
14021
|
+
|
|
13625
14022
|
/**
|
|
13626
14023
|
* Designated initializer. Initializes this alert popup with the given labels.
|
|
13627
14024
|
* @param title The popup's title.
|
|
@@ -13737,6 +14134,189 @@ declare class BMConfirmationPopup extends BMAlertPopup {
|
|
|
13737
14134
|
}
|
|
13738
14135
|
|
|
13739
14136
|
|
|
14137
|
+
declare class BMKeyboardShortcutModifier {
|
|
14138
|
+
/**
|
|
14139
|
+
* Represents the command key on macOS and iOS, windows key on Windows and meta key on Linux.
|
|
14140
|
+
*
|
|
14141
|
+
*/
|
|
14142
|
+
static Command: BMKeyboardShortcutModifier;
|
|
14143
|
+
|
|
14144
|
+
/**
|
|
14145
|
+
* Represents the option key on macOS and alt on other systems.
|
|
14146
|
+
*
|
|
14147
|
+
*/
|
|
14148
|
+
static Option: BMKeyboardShortcutModifier;
|
|
14149
|
+
|
|
14150
|
+
/**
|
|
14151
|
+
* Represents the shit key.
|
|
14152
|
+
*
|
|
14153
|
+
*/
|
|
14154
|
+
static Shift: BMKeyboardShortcutModifier;
|
|
14155
|
+
|
|
14156
|
+
/**
|
|
14157
|
+
* Represents the control key.
|
|
14158
|
+
*
|
|
14159
|
+
*/
|
|
14160
|
+
static Control: BMKeyboardShortcutModifier;
|
|
14161
|
+
|
|
14162
|
+
/**
|
|
14163
|
+
* Represents the command key on macOS and iOS and control key on other systems.
|
|
14164
|
+
*
|
|
14165
|
+
*/
|
|
14166
|
+
static System: BMKeyboardShortcutModifier;
|
|
14167
|
+
|
|
14168
|
+
private constructor();
|
|
14169
|
+
}
|
|
14170
|
+
|
|
14171
|
+
/**
|
|
14172
|
+
* A keyboard shortcut object describes the keys that must be pressed for a keyboard shortcut to trigger as
|
|
14173
|
+
* well as what should happen when that shortcut is triggered.
|
|
14174
|
+
*
|
|
14175
|
+
*/
|
|
14176
|
+
declare class BMKeyboardShortcut {
|
|
14177
|
+
|
|
14178
|
+
/**
|
|
14179
|
+
* The key that should be pressed for this keyboard shortcut.
|
|
14180
|
+
*
|
|
14181
|
+
*/
|
|
14182
|
+
readonly keyCode: string;
|
|
14183
|
+
|
|
14184
|
+
/**
|
|
14185
|
+
* An optional array of keyboard modifiers that must be pressed
|
|
14186
|
+
* together with the key in order to trigger the shortcut.
|
|
14187
|
+
*
|
|
14188
|
+
*/
|
|
14189
|
+
readonly modifiers: BMKeyboardShortcutModifier[];
|
|
14190
|
+
|
|
14191
|
+
/**
|
|
14192
|
+
* A bitmap describing the modifiers that should be active.
|
|
14193
|
+
*
|
|
14194
|
+
*/
|
|
14195
|
+
private _modifierBitmap: number;
|
|
14196
|
+
|
|
14197
|
+
/**
|
|
14198
|
+
* The object which will handle this keyboard shortcut.
|
|
14199
|
+
*
|
|
14200
|
+
*/
|
|
14201
|
+
target: any;
|
|
14202
|
+
|
|
14203
|
+
/**
|
|
14204
|
+
* The name of the method that will be invoked on the target object when this keyboard
|
|
14205
|
+
* shortcut is triggered. This method will receive the keyboard event that triggered
|
|
14206
|
+
* this action as its single parameter.
|
|
14207
|
+
*
|
|
14208
|
+
*/
|
|
14209
|
+
action: string;
|
|
14210
|
+
|
|
14211
|
+
/**
|
|
14212
|
+
* When set to `YES`, the default action of the event that triggers this keyboard shortcut will be prevented.
|
|
14213
|
+
*
|
|
14214
|
+
*/
|
|
14215
|
+
preventsDefault: boolean;
|
|
14216
|
+
|
|
14217
|
+
/**
|
|
14218
|
+
* Designated initializer. Initializes this keyboard shortcut with the given key and optional modifiers, as well as
|
|
14219
|
+
* the target and action that will handle it.
|
|
14220
|
+
*
|
|
14221
|
+
* In order to be triggered, this keyboard shortcut must be registered with an event handler such as a window
|
|
14222
|
+
* that can receive keyboard focus and keypress events.
|
|
14223
|
+
* @param key The key that should be pressed for this keyboard shortcut. This maps to the `code` property of keyboard events.
|
|
14224
|
+
* @param modifiers Defaults to an empty array. An optional array of keyboard modifiers that must be active.
|
|
14225
|
+
* for the keyboard shortcut to fire.
|
|
14226
|
+
* @param target The object that will handle this keyboard shortcut action.
|
|
14227
|
+
* @param action The name of a method on the target object that will be invoked when this
|
|
14228
|
+
* keyboard shortcut is triggered. That method will receive the keyboard event as its single parameter.
|
|
14229
|
+
* @param preventsDefault Defaults to `NO`. When set to `YES`, the default action of the event that triggers this keyboard shortcut will be prevented.
|
|
14230
|
+
* @return This keyboard shortcut.
|
|
14231
|
+
*
|
|
14232
|
+
*/
|
|
14233
|
+
initWithKeyCode(key: string, {modifiers: modifiers, target: target, action: action, preventsDefault: preventsDefault}: {modifiers?: BMKeyboardShortcutModifier[] | null | undefined, target: any, action: string, preventsDefault?: boolean | null | undefined}): BMKeyboardShortcut;
|
|
14234
|
+
|
|
14235
|
+
|
|
14236
|
+
/**
|
|
14237
|
+
* Initializes this keyboard shortcut with the given keyboard event. If the event includes the control or command keys, these may be converted
|
|
14238
|
+
* into a system key modifier based on the current platform.
|
|
14239
|
+
* @param event The keyboard event from which this keyboard shortcut should be initialized.
|
|
14240
|
+
* @param target The object that will handle this keyboard shortcut action.
|
|
14241
|
+
* @param action The name of a method on the target object that will be invoked when this
|
|
14242
|
+
* keyboard shortcut is triggered. That method will receive the keyboard event as its single parameter.
|
|
14243
|
+
* @param preventsDefault Defaults to `NO`. When set to `YES`, the default action of the event that triggers this keyboard shortcut will be prevented.
|
|
14244
|
+
*
|
|
14245
|
+
*
|
|
14246
|
+
*/
|
|
14247
|
+
initWithKeyboardEvent(event: KeyboardEvent, {target: target, action: action, preventsDefault: preventsDefault}: {target: any, action: string, preventsDefault?: boolean | null | undefined}): void;
|
|
14248
|
+
|
|
14249
|
+
|
|
14250
|
+
/**
|
|
14251
|
+
* Initializes this keyboard shortcut with the given serialized object representation. A callback is used to
|
|
14252
|
+
* convert from the target object ID to an actual target object.
|
|
14253
|
+
* @param shortcut A serialized keyboard shortcut.
|
|
14254
|
+
* @param targetID A callback that is invoked with the target ID and should return
|
|
14255
|
+
* the target object which will handle the keyboard shortcut.
|
|
14256
|
+
* @return This keyboard shortcut.
|
|
14257
|
+
*
|
|
14258
|
+
*/
|
|
14259
|
+
initWithSerializedKeyboardShortcut(shortcut: any, {targetID: targetID}: {targetID: (($0: string) => any)}): any;
|
|
14260
|
+
|
|
14261
|
+
|
|
14262
|
+
/**
|
|
14263
|
+
* Returns an object representation of this keyboard shortcut that can be used with `JSON.stringify` to
|
|
14264
|
+
* serialize this keyboard shortcut.
|
|
14265
|
+
* @param ID A string that identifies the target object and can be used when recreating
|
|
14266
|
+
* the keyboard shortcut instance.
|
|
14267
|
+
* @return An object that can be used with `JSON.stringify`.
|
|
14268
|
+
*
|
|
14269
|
+
*/
|
|
14270
|
+
serializedKeyboardShortcutWithTargetID(ID: string): any;
|
|
14271
|
+
|
|
14272
|
+
|
|
14273
|
+
/**
|
|
14274
|
+
* Constructs and returns a keyboard shortcut with the given key and optional modifiers, as well as
|
|
14275
|
+
* the target and action that will handle it.
|
|
14276
|
+
*
|
|
14277
|
+
* In order to be triggered, this keyboard shortcut must be registered with an event handler such as a window
|
|
14278
|
+
* that can receive keyboard focus and keypress events.
|
|
14279
|
+
* @param key The key that should be pressed for this keyboard shortcut. This maps to the `code` property of keyboard events.
|
|
14280
|
+
* @param modifiers Defaults to an empty array. An optional array of keyboard modifiers that must be active.
|
|
14281
|
+
* for the keyboard shortcut to fire.
|
|
14282
|
+
* @param target The object that will handle this keyboard shortcut action.
|
|
14283
|
+
* @param action The name of a method on the target object that will be invoked when this
|
|
14284
|
+
* keyboard shortcut is triggered. That method will receive the keyboard event as its single parameter.
|
|
14285
|
+
* @param preventsDefault Defaults to `NO`. When set to `YES`, the default action of the event that triggers this keyboard shortcut will be prevented.
|
|
14286
|
+
* @return A keyboard shortcut.
|
|
14287
|
+
*
|
|
14288
|
+
*/
|
|
14289
|
+
static keyboardShortcutWithKeyCode (key: string, {modifiers: modifiers, target: target, action: action, preventsDefault: preventsDefault}: {modifiers?: BMKeyboardShortcutModifier[] | null | undefined, target: any, action: string, preventsDefault?: boolean | null | undefined}): BMKeyboardShortcut;
|
|
14290
|
+
|
|
14291
|
+
|
|
14292
|
+
/**
|
|
14293
|
+
* Constructs and returns a keyboard shortcut with the given keyboard event. If the event includes the control or command keys, these may be converted
|
|
14294
|
+
* into a system key modifier based on the current platform.
|
|
14295
|
+
* @param event The keyboard event from which this keyboard shortcut should be initialized.
|
|
14296
|
+
* @param target The object that will handle this keyboard shortcut action.
|
|
14297
|
+
* @param action The name of a method on the target object that will be invoked when this
|
|
14298
|
+
* keyboard shortcut is triggered. That method will receive the keyboard event as its single parameter.
|
|
14299
|
+
* @param preventsDefault Defaults to `NO`. When set to `YES`, the default action of the event that triggers this keyboard shortcut will be prevented.
|
|
14300
|
+
*
|
|
14301
|
+
*
|
|
14302
|
+
*/
|
|
14303
|
+
static keyboardShortcutWithKeyboardEvent (event: KeyboardEvent, {target: target, action: action, preventsDefault: preventsDefault}: {target: any, action: string, preventsDefault?: boolean | null | undefined}): void;
|
|
14304
|
+
|
|
14305
|
+
|
|
14306
|
+
/**
|
|
14307
|
+
* Constructs and returns keyboard shortcut with the given serialized object representation. A callback is used to
|
|
14308
|
+
* convert from the target object ID to an actual target object.
|
|
14309
|
+
* @param shortcut A serialized keyboard shortcut.
|
|
14310
|
+
* @param targetID A callback that is invoked with the target ID and should return
|
|
14311
|
+
* the target object which will handle the keyboard shortcut.
|
|
14312
|
+
* @return A keyboard shortcut.
|
|
14313
|
+
*
|
|
14314
|
+
*/
|
|
14315
|
+
static keyboardShortcutWithSerializedKeyboardShortcut (shortcut: any, {targetID: targetID}: {targetID: (($0: string) => any)}): any;
|
|
14316
|
+
|
|
14317
|
+
}
|
|
14318
|
+
|
|
14319
|
+
|
|
13740
14320
|
/**
|
|
13741
14321
|
* @deprecated - This enum will be removed in a future version
|
|
13742
14322
|
* ---
|