bm-core-ui 2.9.1 → 2.9.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/build/@types/index.d.ts +328 -309
- package/build/BMCollectionView/BMCollectionView.js +4 -4
- package/build/BMCollectionView/BMCollectionViewFlowLayout.js +29 -2
- package/build/BMView/BMView_v2.5.js +4 -2
- package/build/BMWindow/BMWindow.js +1 -0
- package/build/Core/BMCoreUI.js +2 -2
- package/lib/@types/BMCoreUI.min.d.ts +330 -311
- package/lib/BMCoreUI.min.js +1 -1
- package/package.json +2 -1
- package/build/BMView/BMViewShadow.js +0 -101
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "bm-core-ui",
|
|
3
3
|
"packageName": "BMCoreUI",
|
|
4
4
|
"moduleName": "BMCoreUI",
|
|
5
|
-
"version": "2.9.
|
|
5
|
+
"version": "2.9.3",
|
|
6
6
|
"description": "A collection of reusable UI classes.",
|
|
7
7
|
"thingworxServer": "http://localhost:8915",
|
|
8
8
|
"thingworxUser": "Administrator",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
25
25
|
"build": "gulp --p",
|
|
26
26
|
"buildProduction": "gulp --p",
|
|
27
|
+
"buildLibrary": "gulp --l",
|
|
27
28
|
"buildDebug": "gulp",
|
|
28
29
|
"upload": "gulp upload",
|
|
29
30
|
"uploadProduction": "gulp upload --p"
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
//@ts-check
|
|
2
|
-
|
|
3
|
-
//@type BMViewShadow
|
|
4
|
-
|
|
5
|
-
import { BMCopyProperties, YES } from "../Core/BMCoreUI";
|
|
6
|
-
import { BMRectMakeWithNodeFrame } from "../Core/BMRect";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* A view shadow represents a copy of a view's DOM nodes, without any event handlers attached
|
|
10
|
-
* that is always positioned absolutely. View shadows are created by invoking `retainShadow` on a view
|
|
11
|
-
* and are typically used for animations where it is needed for the view to move outside of its
|
|
12
|
-
* container.
|
|
13
|
-
*
|
|
14
|
-
* A view may only have a single shadow active at a time.
|
|
15
|
-
*/
|
|
16
|
-
export class BMViewShadow {
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* The DOM node rendered by this view shadow.
|
|
20
|
-
*/
|
|
21
|
-
_node; // <DOMNode>
|
|
22
|
-
|
|
23
|
-
get node() {
|
|
24
|
-
return this._node;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Animatable. The view shadow's frame, relative to the viewport.
|
|
29
|
-
*/
|
|
30
|
-
_frame; // <BMRect>
|
|
31
|
-
|
|
32
|
-
get frame() {
|
|
33
|
-
return this._frame;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
set frame(frame) {
|
|
37
|
-
this._frame = frame.copy();
|
|
38
|
-
|
|
39
|
-
BMCopyProperties(this._node, {
|
|
40
|
-
left: `${frame.left}px`,
|
|
41
|
-
top: `${frame.top}px`,
|
|
42
|
-
width: `${frame.width}px`,
|
|
43
|
-
height: `${frame.height}px`
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* The shadow's retain count.
|
|
49
|
-
*/
|
|
50
|
-
_retainCount = 0; // <Number>
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Initializes this view shadow by copying the DOM content of
|
|
54
|
-
* the specified view.
|
|
55
|
-
* @param view <BMView> The view whose DOM content should be copied.
|
|
56
|
-
* @returns <BMViewShadow> This view shadow.
|
|
57
|
-
*/
|
|
58
|
-
initWithView(view) {
|
|
59
|
-
this._node = view.node.copy(YES);
|
|
60
|
-
|
|
61
|
-
this._node.classList.add('BMViewShadow');
|
|
62
|
-
|
|
63
|
-
// Make this node shadow occupy the same position as the original node
|
|
64
|
-
const frame = BMRectMakeWithNodeFrame(view.node);
|
|
65
|
-
|
|
66
|
-
// In scrolling containers, the view may often get cut off, which will cause
|
|
67
|
-
// incorrect sizes to be reported by the bounding client rect
|
|
68
|
-
frame.size.width = view.node.offsetWidth;
|
|
69
|
-
frame.size.height = view.node.offsetHeight;
|
|
70
|
-
|
|
71
|
-
this.frame = frame;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Retains this view shadow, increasing its retain count by 1.
|
|
76
|
-
*
|
|
77
|
-
* This method must be invoked before this view shadow is used as part of any animation
|
|
78
|
-
* or interaction. When it is no longer needed, the implementation should invoke the
|
|
79
|
-
* `release` method.
|
|
80
|
-
*/
|
|
81
|
-
retain() {
|
|
82
|
-
this._retainCount++;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Releases this view shadow, decreasing its retain count by 1.
|
|
87
|
-
*
|
|
88
|
-
* This method must be invoked whenever this view shadow is no longer needed.
|
|
89
|
-
* When the retain count reaches 0, this view shadow will be removed from the document.
|
|
90
|
-
*/
|
|
91
|
-
release() {
|
|
92
|
-
this._retainCount--;
|
|
93
|
-
|
|
94
|
-
if (!this._retainCount) {
|
|
95
|
-
this._node.remove();
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
//@endtype
|