uicore-ts 1.1.128 → 1.1.141
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/compiledScripts/UIRectangle.d.ts +1 -1
- package/compiledScripts/UIRectangle.js +2 -1
- package/compiledScripts/UIRectangle.js.map +2 -2
- package/compiledScripts/UITableView.d.ts +1 -1
- package/compiledScripts/UITableView.js +3 -2
- package/compiledScripts/UITableView.js.map +2 -2
- package/compiledScripts/UIView.d.ts +7 -0
- package/compiledScripts/UIView.js +10 -1
- package/compiledScripts/UIView.js.map +2 -2
- package/package.json +1 -1
- package/scripts/UIRectangle.ts +2 -1
- package/scripts/UITableView.ts +3 -2
- package/scripts/UIView.ts +15 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uicore-ts",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.141",
|
|
4
4
|
"description": "UICore is a library to build native-like user interfaces using pure Typescript. No HTML is needed at all. Components are described as TS classes and all user interactions are handled explicitly. This library is strongly inspired by the UIKit framework that is used in IOS. In addition, UICore has tools to handle URL based routing, array sorting and filtering and adds a number of other utilities for convenience.",
|
|
5
5
|
"main": "compiledScripts/index.js",
|
|
6
6
|
"types": "compiledScripts/index.d.ts",
|
package/scripts/UIRectangle.ts
CHANGED
|
@@ -917,8 +917,9 @@ export class UIRectangle extends UIObject {
|
|
|
917
917
|
}
|
|
918
918
|
|
|
919
919
|
|
|
920
|
-
assignedAsFrameOfView(view: UIView) {
|
|
920
|
+
assignedAsFrameOfView(view: UIView, isWeakFrame = view.hasWeakFrame) {
|
|
921
921
|
view.frame = this
|
|
922
|
+
view.hasWeakFrame = isWeakFrame
|
|
922
923
|
return this
|
|
923
924
|
}
|
|
924
925
|
|
package/scripts/UITableView.ts
CHANGED
|
@@ -197,6 +197,7 @@ export class UITableView extends UINativeScrollView {
|
|
|
197
197
|
invalidateSizeOfRowWithIndex(index: number, animateChange = NO) {
|
|
198
198
|
if (this._rowPositions?.[index]) {
|
|
199
199
|
this._rowPositions[index].isValid = NO
|
|
200
|
+
this._rowPositions.slice(index, -1).everyElement.isValid = NO
|
|
200
201
|
}
|
|
201
202
|
this._highestValidRowPositionIndex = Math.min(this._highestValidRowPositionIndex, index - 1)
|
|
202
203
|
this._needsDrawingOfVisibleRowsBeforeLayout = YES
|
|
@@ -624,8 +625,8 @@ export class UITableView extends UINativeScrollView {
|
|
|
624
625
|
}
|
|
625
626
|
|
|
626
627
|
|
|
627
|
-
override
|
|
628
|
-
super.
|
|
628
|
+
override clearIntrinsicSizeCache() {
|
|
629
|
+
super.clearIntrinsicSizeCache()
|
|
629
630
|
this.invalidateSizeOfRowWithIndex(0)
|
|
630
631
|
}
|
|
631
632
|
|
package/scripts/UIView.ts
CHANGED
|
@@ -1130,6 +1130,20 @@ export class UIView extends UIObject {
|
|
|
1130
1130
|
}
|
|
1131
1131
|
}
|
|
1132
1132
|
|
|
1133
|
+
// If YES, then the view is not counted in intrinsic content size calculation.
|
|
1134
|
+
// This should be used for things like background views that just take the shape of the parent view.
|
|
1135
|
+
hasWeakFrame = NO
|
|
1136
|
+
// Set view as having a weak frame and set the frame.
|
|
1137
|
+
public set weakFrame(rectangle: UIRectangle & { zIndex?: number }) {
|
|
1138
|
+
this.hasWeakFrame = YES
|
|
1139
|
+
this.frame = rectangle
|
|
1140
|
+
}
|
|
1141
|
+
// Set view as having a strong frame and set the frame.
|
|
1142
|
+
public set strongFrame(rectangle: UIRectangle & { zIndex?: number }) {
|
|
1143
|
+
this.hasWeakFrame = NO
|
|
1144
|
+
this.frame = rectangle
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1133
1147
|
|
|
1134
1148
|
setFrame(rectangle: UIRectangle & { zIndex?: number }, zIndex = 0, performUncheckedLayout = NO) {
|
|
1135
1149
|
|
|
@@ -3763,7 +3777,7 @@ export class UIView extends UIObject {
|
|
|
3763
3777
|
|
|
3764
3778
|
const framePoints: UIPoint[] = []
|
|
3765
3779
|
this.subviews.forEach(subview => {
|
|
3766
|
-
if (subview == this._loadingView) {
|
|
3780
|
+
if (subview == this._loadingView || subview.hasWeakFrame) {
|
|
3767
3781
|
return
|
|
3768
3782
|
}
|
|
3769
3783
|
subview.layoutIfNeeded()
|