bm-core-ui 2.11.9-beta.2 → 2.12.0-beta.4

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.
Files changed (60) hide show
  1. package/README.md +1 -1
  2. package/build/@types/index.d.ts +2194 -94
  3. package/build/BMCollectionView/BMCollectionView.js +977 -196
  4. package/build/BMCollectionView/BMCollectionViewFlowLayout.js +11 -4
  5. package/build/BMCoreUI.css +133 -2
  6. package/build/BMView/BMDragSession.js +1150 -0
  7. package/build/BMView/BMDragSessionActions.js +121 -0
  8. package/build/BMView/BMDragSessionPreview.js +1631 -0
  9. package/build/BMView/BMLayoutConstraint_v2.5.js +14 -59
  10. package/build/BMView/BMView_v2.5.js +34 -3
  11. package/build/BMWindow/BMPopover/BMPopover.js +35 -20
  12. package/build/BMWindow/BMToolWindow.js +29 -1
  13. package/build/BMWindow/BMWindow.js +128 -65
  14. package/build/images/AlignBottom.png +0 -0
  15. package/build/images/AlignCenterX.png +0 -0
  16. package/build/images/AlignCenterY.png +0 -0
  17. package/build/images/AlignLeading.png +0 -0
  18. package/build/images/AlignTop.png +0 -0
  19. package/build/images/AlignTrailing.png +0 -0
  20. package/build/images/AllConstraints.png +0 -0
  21. package/build/images/BottomConstraint.png +0 -0
  22. package/build/images/CenterXConstraint.png +0 -0
  23. package/build/images/CenterYConstraint.png +0 -0
  24. package/build/images/CoreUI2.png +0 -0
  25. package/build/images/CoreUI2@2x.png +0 -0
  26. package/build/images/Desktop.png +0 -0
  27. package/build/images/DesktopMini.png +0 -0
  28. package/build/images/EqualHeight.png +0 -0
  29. package/build/images/EqualHorizontalSpacing.png +0 -0
  30. package/build/images/EqualHorizontalSpacingInSuperview.png +0 -0
  31. package/build/images/EqualVerticalSpacing.png +0 -0
  32. package/build/images/EqualVerticalSpacingInSuperview.png +0 -0
  33. package/build/images/EqualWidth.png +0 -0
  34. package/build/images/HeightConstraint.png +0 -0
  35. package/build/images/InactiveConstraints.png +0 -0
  36. package/build/images/Layout.png +0 -0
  37. package/build/images/LayoutVariables.png +0 -0
  38. package/build/images/LeftConstraint.png +0 -0
  39. package/build/images/OwnConstraints.png +0 -0
  40. package/build/images/Phone.png +0 -0
  41. package/build/images/PhoneLandscape.png +0 -0
  42. package/build/images/PhoneLandscapeMini.png +0 -0
  43. package/build/images/PhoneMini.png +0 -0
  44. package/build/images/PhonePortrait.png +0 -0
  45. package/build/images/PhonePortraitMini.png +0 -0
  46. package/build/images/Properties.png +0 -0
  47. package/build/images/RightConstraint.png +0 -0
  48. package/build/images/SubviewConstraints.png +0 -0
  49. package/build/images/Tablet.png +0 -0
  50. package/build/images/TabletLandscape.png +0 -0
  51. package/build/images/TabletLandscapeMini.png +0 -0
  52. package/build/images/TabletMini.png +0 -0
  53. package/build/images/TabletPortrait.png +0 -0
  54. package/build/images/TabletPortraitMini.png +0 -0
  55. package/build/images/TopConstraint.png +0 -0
  56. package/build/images/WidthConstraint.png +0 -0
  57. package/build/index.js +4 -0
  58. package/lib/@types/BMCoreUI.min.d.ts +2194 -94
  59. package/lib/BMCoreUI.min.js +1 -1
  60. package/package.json +2 -2
@@ -1670,6 +1670,11 @@ BMCollectionViewFlowLayout.prototype = BMExtend(Object.create(BMCollectionViewLa
1670
1670
  return this._prepareLayoutWithScrollbarOffset(NO);
1671
1671
  },
1672
1672
 
1673
+ /**
1674
+ * Set to `YES` while the current layout is using scrollbar offsets, `NO` otherwise.
1675
+ */
1676
+ _usingScrollbarOffset: NO, // <Boolean>
1677
+
1673
1678
  /**
1674
1679
  * Prepares the layout, optionally taking the scrollbar size into account.
1675
1680
  * @param useOffset <Boolean> When set to `YES` the layout will take the scrollbar size into account.
@@ -1680,6 +1685,8 @@ BMCollectionViewFlowLayout.prototype = BMExtend(Object.create(BMCollectionViewLa
1680
1685
  return;
1681
1686
  }
1682
1687
 
1688
+ this._usingScrollbarOffset = useOffset;
1689
+
1683
1690
  // When the scrollbar offset is used, invalidate any measurement that exceeds the available space.
1684
1691
  if (this._expectedCellSize && this._collectionView.scrollBarSize) {
1685
1692
  switch (this.orientation) {
@@ -1794,11 +1801,11 @@ BMCollectionViewFlowLayout.prototype = BMExtend(Object.create(BMCollectionViewLa
1794
1801
  // is measured up to at least the current collection view bounds
1795
1802
  if (this._expectedCellSize && this._copy) {
1796
1803
  target = target || {};
1797
- if (target.targetRect) {
1798
- target.targetRect = target.targetRect.rectByUnionWithRect(this.collectionView.bounds)
1804
+ if (target.rect) {
1805
+ target.rect = target.rect.rectByUnionWithRect(this.collectionView.bounds)
1799
1806
  }
1800
1807
  else {
1801
- target.targetRect = this.collectionView.bounds;
1808
+ target.rect = this.collectionView.bounds;
1802
1809
  }
1803
1810
  }
1804
1811
 
@@ -3087,7 +3094,7 @@ BMCollectionViewFlowLayout.prototype = BMExtend(Object.create(BMCollectionViewLa
3087
3094
  return [BMLayoutConstraint.constraintWithView(cell, {
3088
3095
  attribute: BMLayoutAttribute.Width,
3089
3096
  relatedBy: BMLayoutConstraintRelation.LessThanOrEquals,
3090
- constant: this.collectionView.frame.size.width - this.sectionInsets.left - this.sectionInsets.right
3097
+ constant: this.collectionView.frame.size.width - this.sectionInsets.left - this.sectionInsets.right - (this._usingScrollbarOffset ? this.collectionView.scrollBarSize : 0)
3091
3098
  })]
3092
3099
  },
3093
3100
 
@@ -1,14 +1,25 @@
1
1
  /* MARK: Collection view */
2
2
 
3
- .BMCollectionViewCellDragging {
3
+ .BMCollectionViewCellDragging:not(.BMAnimationNode) {
4
4
  opacity: .5 !important;
5
5
  }
6
6
 
7
+ .BMCollectionViewCellInserting {
8
+ visibility: hidden !important;
9
+ opacity: 0 !important;
10
+ }
11
+
12
+ .BMAnimationNode {
13
+ position: fixed !important;
14
+ z-index: 999998 !important;
15
+ pointer-events: none;
16
+ }
17
+
7
18
  .BMDragShadow .BMRipple {
8
19
  visibility: hidden !important;
9
20
  }
10
21
 
11
- .BMDragShadow {
22
+ .BMDragShadow, .BMAnimationNode {
12
23
  backface-visibility: hidden;
13
24
  -webkit-backface-visibility: hidden;
14
25
  }
@@ -54,6 +65,126 @@
54
65
  font-weight: bolder;
55
66
  }
56
67
 
68
+ /* MARK: Drag Session */
69
+
70
+ .BMDragSessionIndicatorContainer {
71
+ position: fixed;
72
+ pointer-events: none;
73
+
74
+ top: 0;
75
+ left: 0;
76
+ width: 100vw;
77
+ height: 100vh;
78
+
79
+ display: flex;
80
+ align-items: center;
81
+ justify-content: center;
82
+
83
+ z-index: 999999 !important;
84
+ }
85
+
86
+ .BMDragSessionIndicator {
87
+ background-color: rgba(0, 128, 255, 1);
88
+
89
+ color: white;
90
+ font-family: -apple-system, BlinkMacSystemFont, Roboto, 'Segoe UI', sans-serif !important;
91
+ font-size: 18px !important;
92
+ font-weight: bold !important;
93
+
94
+ padding-left: 16px;
95
+ padding-right: 16px;
96
+
97
+ height: 24px;
98
+ border-radius: 12px;
99
+
100
+ position: relative;
101
+ display: flex;
102
+ align-items: center;
103
+ justify-content: center;
104
+
105
+ box-shadow: 0px 4px 12px rgba(0, 0, 0, .33);
106
+
107
+ pointer-events: none;
108
+ transition: background-color .3s cubic-bezier(0.455, 0.03, 0.515, 0.955);
109
+ }
110
+
111
+ .BMDragSessionIndicatorBlue {
112
+ background-color: rgba(0, 128, 255, 1);
113
+ }
114
+
115
+ .BMDragSessionIndicatorRed {
116
+ background-color: rgba(220, 30, 0, 1);
117
+ }
118
+
119
+ .BMDragSessionIndicatorYellow {
120
+ background-color: rgb(255, 183, 0);
121
+ }
122
+
123
+ .BMDragSessionIndicatorGray {
124
+ background-color: rgb(108, 119, 124);
125
+ }
126
+
127
+ .BMDragSessionIndicatorGreen {
128
+ background-color: rgba(0, 200, 60, 1);
129
+ }
130
+
131
+ .BMDragSessionIndicatorIcon {
132
+ width: 16px;
133
+ height: 16px;
134
+
135
+ margin-right: 8px;
136
+
137
+ opacity: 1;
138
+
139
+ transition:
140
+ width .3s cubic-bezier(0.455, 0.03, 0.515, 0.955),
141
+ height .3s cubic-bezier(0.455, 0.03, 0.515, 0.955),
142
+ margin-right .3s cubic-bezier(0.455, 0.03, 0.515, 0.955),
143
+ opacity .3s cubic-bezier(0.455, 0.03, 0.515, 0.955);
144
+ }
145
+
146
+ .BMDragSessionIndicatorIcon.BMDragSessionIndicatorIconHidden {
147
+ width: 0;
148
+ height: 0;
149
+ margin-right: 0;
150
+ opacity: 0;
151
+ }
152
+
153
+ .BMDragSessionIndicatorItemCount {
154
+ transition: width .3s cubic-bezier(0.455, 0.03, 0.515, 0.955);
155
+ }
156
+
157
+ .BMDragSessionIndicatorMessage {
158
+ white-space: nowrap;
159
+ font-size: 16px !important;
160
+ font-weight: 500;
161
+
162
+ margin-left: 8px;
163
+
164
+ opacity: 1;
165
+
166
+ transition:
167
+ width .3s cubic-bezier(0.455, 0.03, 0.515, 0.955),
168
+ margin-left .3s cubic-bezier(0.455, 0.03, 0.515, 0.955),
169
+ opacity .3s cubic-bezier(0.455, 0.03, 0.515, 0.955);
170
+ }
171
+
172
+ .BMDragSessionIndicatorMessage.BMDragSessionIndicatorMessageHidden {
173
+ width: 0px;
174
+ opacity: 0;
175
+ margin-left: 0;
176
+ }
177
+
178
+ .BMDragSessionIndicatorMessage.BMDragSessionIndicatorMessageMeasurement {
179
+ transition: none;
180
+ visibility: hidden;
181
+
182
+ font-family: -apple-system, BlinkMacSystemFont, Roboto, 'Segoe UI', sans-serif !important;
183
+ font-size: 16px !important;
184
+
185
+ position: absolute;
186
+ }
187
+
57
188
  /* MARK: Layout Guide */
58
189
 
59
190
  .BMLayoutGuideMask {