bm-core-ui 2.7.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/CHANGELOG.md +1624 -0
- package/LICENSE +21 -0
- package/README.md +145 -0
- package/build/@types/index.d.ts +14078 -0
- package/build/BMCodeEditor/BMCodeEditor.js +707 -0
- package/build/BMCollectionView/BMCollectionView.js +5861 -0
- package/build/BMCollectionView/BMCollectionViewCell.js +688 -0
- package/build/BMCollectionView/BMCollectionViewFlowLayout.js +4467 -0
- package/build/BMCollectionView/BMCollectionViewLayout.js +830 -0
- package/build/BMCollectionView/BMCollectionViewLayoutAttributes.js +673 -0
- package/build/BMCollectionView/BMCollectionViewMasonryLayout.js +491 -0
- package/build/BMCollectionView/BMCollectionViewStackLayout.js +634 -0
- package/build/BMCollectionView/BMCollectionViewTileLayout.js +1121 -0
- package/build/BMCoreUI.css +2833 -0
- package/build/BMView/BMAttributedLabelView.js +310 -0
- package/build/BMView/BMLayoutConstraint_v2.5.js +1813 -0
- package/build/BMView/BMLayoutGuide.js +192 -0
- package/build/BMView/BMLayoutSizeClass.js +466 -0
- package/build/BMView/BMMenu.js +574 -0
- package/build/BMView/BMScrollView.js +247 -0
- package/build/BMView/BMTextField.js +512 -0
- package/build/BMView/BMTextFieldDelegate.js +71 -0
- package/build/BMView/BMView_v2.5.js +3572 -0
- package/build/BMView/BMViewport.js +221 -0
- package/build/BMViewLayoutEditor/BMLayoutEditor.js +6117 -0
- package/build/BMViewLayoutEditor/BMLayoutEditorConstraintSettings.js +417 -0
- package/build/BMViewLayoutEditor/BMLayoutEditorDelegate.js +59 -0
- package/build/BMViewLayoutEditor/BMLayoutEditorSettingCells.js +1653 -0
- package/build/BMViewLayoutEditor/BMLayoutEditorSettings.js +1480 -0
- package/build/BMViewLayoutEditor/BMLayoutEditorSettingsComplexCells.js +431 -0
- package/build/BMViewLayoutEditor/BMLayoutEditorSettingsDelegate.js +46 -0
- package/build/BMViewLayoutEditor/BMLayoutEditorVariablesController.js +460 -0
- package/build/BMViewLayoutEditor/BMLayoutEditorViewGroupSettings.js +293 -0
- package/build/BMViewLayoutEditor/BMLayoutEditorViewSettings.js +382 -0
- package/build/BMViewLayoutEditor/BMLayoutVariableProvider.js +202 -0
- package/build/BMWindow/BMConfirmationPopup.js +477 -0
- package/build/BMWindow/BMKeyboardShortcut.js +151 -0
- package/build/BMWindow/BMPopover/BMPopover.js +492 -0
- package/build/BMWindow/BMToolWindow.js +71 -0
- package/build/BMWindow/BMWindow.js +2000 -0
- package/build/Core/BMAnimationContext.js +1181 -0
- package/build/Core/BMColor.js +991 -0
- package/build/Core/BMCoreUI.js +470 -0
- package/build/Core/BMFunctionCollection.js +110 -0
- package/build/Core/BMIndexPath.js +165 -0
- package/build/Core/BMInset.js +138 -0
- package/build/Core/BMKeyPath.js +100 -0
- package/build/Core/BMPoint.js +291 -0
- package/build/Core/BMRect.js +556 -0
- package/build/Core/BMSize.js +137 -0
- package/build/iScroll/LICENSE +22 -0
- package/build/iScroll/iscroll-probe.js +2154 -0
- package/build/images/AlignBottom.png +0 -0
- package/build/images/AlignCenterX.png +0 -0
- package/build/images/AlignCenterY.png +0 -0
- package/build/images/AlignLeading.png +0 -0
- package/build/images/AlignTop.png +0 -0
- package/build/images/AlignTrailing.png +0 -0
- package/build/images/AllConstraints.png +0 -0
- package/build/images/BottomConstraint.png +0 -0
- package/build/images/CenterXConstraint.png +0 -0
- package/build/images/CenterYConstraint.png +0 -0
- package/build/images/CoreUI2.png +0 -0
- package/build/images/CoreUI2@2x.png +0 -0
- package/build/images/Desktop.png +0 -0
- package/build/images/DesktopMini.png +0 -0
- package/build/images/EqualHeight.png +0 -0
- package/build/images/EqualHorizontalSpacing.png +0 -0
- package/build/images/EqualHorizontalSpacingInSuperview.png +0 -0
- package/build/images/EqualVerticalSpacing.png +0 -0
- package/build/images/EqualVerticalSpacingInSuperview.png +0 -0
- package/build/images/EqualWidth.png +0 -0
- package/build/images/HeightConstraint.png +0 -0
- package/build/images/InactiveConstraints.png +0 -0
- package/build/images/Layout.png +0 -0
- package/build/images/LayoutVariables.png +0 -0
- package/build/images/LeftConstraint.png +0 -0
- package/build/images/OwnConstraints.png +0 -0
- package/build/images/Phone.png +0 -0
- package/build/images/PhoneLandscape.png +0 -0
- package/build/images/PhoneLandscapeMini.png +0 -0
- package/build/images/PhoneMini.png +0 -0
- package/build/images/PhonePortrait.png +0 -0
- package/build/images/PhonePortraitMini.png +0 -0
- package/build/images/Properties.png +0 -0
- package/build/images/RightConstraint.png +0 -0
- package/build/images/SubviewConstraints.png +0 -0
- package/build/images/Tablet.png +0 -0
- package/build/images/TabletLandscape.png +0 -0
- package/build/images/TabletLandscapeMini.png +0 -0
- package/build/images/TabletMini.png +0 -0
- package/build/images/TabletPortrait.png +0 -0
- package/build/images/TabletPortraitMini.png +0 -0
- package/build/images/TopConstraint.png +0 -0
- package/build/images/WidthConstraint.png +0 -0
- package/build/index.js +40 -0
- package/lib/@types/BMCoreUI.min.d.ts +14078 -0
- package/lib/BMCoreUI.min.js +1 -0
- package/package.json +58 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
import {YES, NO, BMExtend} from '../Core/BMCoreUI'
|
|
4
|
+
import {BMWindow} from './BMWindow'
|
|
5
|
+
|
|
6
|
+
// @type BMToolWindow extends BMWindow
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* A tool window is a subclass of `BMWindow` that manages the display and lifecycle of a tool window.
|
|
10
|
+
* Tool windows are utility windows that are associated with a window and are only visible when their
|
|
11
|
+
* associated window is the key window.
|
|
12
|
+
* Tool windows always float above their key window and cannot be minimized.
|
|
13
|
+
* Whenever their associated window becomes the key window, its tool windows are considered to be key windows.
|
|
14
|
+
* Whenever their associated window resigns its key window status, its tool windows are hidden.
|
|
15
|
+
*/
|
|
16
|
+
export function BMToolWindow() {} // <constructor>
|
|
17
|
+
|
|
18
|
+
BMToolWindow.prototype = BMExtend(Object.create(BMWindow.prototype), {
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Controls whether this tool window opens automatically whenever its owning window is opened.
|
|
22
|
+
* When this property is set to `YES`, whever the parent window is opened, this tool window will also open.
|
|
23
|
+
*
|
|
24
|
+
* Otherwise this tool window will remain hidden until its `bringToFrontAnimated` method is invoked.
|
|
25
|
+
*/
|
|
26
|
+
opensAutomatically: YES, // <Boolean>
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Initializes this tool window with the given frame and associates it with the given window.
|
|
30
|
+
* @param frame <BMRect> The window's frame.
|
|
31
|
+
* {
|
|
32
|
+
* @param forWindow <BMWindow> The window to which this tool window will be associated.
|
|
33
|
+
* }
|
|
34
|
+
* @return <BMToolWindow> This tool window.
|
|
35
|
+
*/
|
|
36
|
+
initWithFrame(frame, {forWindow: window}) {
|
|
37
|
+
this._toolWindow = YES;
|
|
38
|
+
|
|
39
|
+
BMWindow.prototype.initWithFrame.call(this, frame, {toolbar: YES, modal: NO});
|
|
40
|
+
|
|
41
|
+
this.node.classList.add('BMToolWindow');
|
|
42
|
+
window._toolWindows.push(this);
|
|
43
|
+
|
|
44
|
+
// If the window is the key window, make this tool window visible
|
|
45
|
+
if (BMWindow._keyWindow == window) this.bringToFrontAnimated(YES);
|
|
46
|
+
|
|
47
|
+
return this;
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
becomeKeyWindow() {
|
|
51
|
+
// This operation is a no-op for tool windows
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
resignKeyWindow() {
|
|
55
|
+
// This operation is a no-op for tool windows
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Creates and returns a tool window with the given frame and associates it with the given window.
|
|
61
|
+
* @param frame <BMRect> The window's frame.
|
|
62
|
+
* {
|
|
63
|
+
* @param forWindow <BMWindow> The window to which this tool window will be associated.
|
|
64
|
+
* }
|
|
65
|
+
* @return <BMToolWindow> This tool window.
|
|
66
|
+
*/
|
|
67
|
+
BMToolWindow.toolWindowWithFrame = function (frame, {forWindow}) {
|
|
68
|
+
return (new BMToolWindow).initWithFrame(frame, {forWindow});
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// @endtype
|