uicore-ts 1.1.18 → 1.1.22
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/UIImageView.d.ts +2 -2
- package/compiledScripts/UIImageView.js +9 -9
- package/compiledScripts/UIImageView.js.map +2 -2
- package/compiledScripts/UIKeyValueSorter.d.ts +4 -4
- package/compiledScripts/UIKeyValueSorter.js.map +1 -1
- package/compiledScripts/UITableView.d.ts +1 -1
- package/compiledScripts/UITableView.js +8 -8
- package/compiledScripts/UITableView.js.map +2 -2
- package/compiledScripts/UITextView.d.ts +3 -3
- package/compiledScripts/UITextView.js +36 -36
- package/compiledScripts/UITextView.js.map +2 -2
- package/compiledScripts/UIView.d.ts +4 -4
- package/compiledScripts/UIView.js +64 -64
- package/compiledScripts/UIView.js.map +2 -2
- package/package.json +1 -1
- package/scripts/UIImageView.ts +2 -2
- package/scripts/UIKeyValueSorter.ts +2 -2
- package/scripts/UITableView.ts +1 -1
- package/scripts/UITextView.ts +5 -5
- package/scripts/UIView.ts +4 -4
|
@@ -93,6 +93,70 @@ const _UIView = class extends import_UIObject.UIObject {
|
|
|
93
93
|
this._isCBEditorTemporaryMovable = import_UIObject.NO;
|
|
94
94
|
this._intrinsicSizesCache = {};
|
|
95
95
|
this.controlEvent = _UIView.controlEvent;
|
|
96
|
+
this.intrinsicContentSizeWithConstraints = (constrainingHeight = 0, constrainingWidth = 0) => {
|
|
97
|
+
const cacheKey = "h_" + constrainingHeight + "__w_" + constrainingWidth;
|
|
98
|
+
const cachedResult = this._intrinsicSizesCache[cacheKey];
|
|
99
|
+
if (cachedResult) {
|
|
100
|
+
return cachedResult;
|
|
101
|
+
}
|
|
102
|
+
const result = new import_UIRectangle.UIRectangle(0, 0, 0, 0);
|
|
103
|
+
if (this.rootView.forceIntrinsicSizeZero) {
|
|
104
|
+
return result;
|
|
105
|
+
}
|
|
106
|
+
let temporarilyInViewTree = import_UIObject.NO;
|
|
107
|
+
let nodeAboveThisView = null;
|
|
108
|
+
if (!this.isMemberOfViewTree) {
|
|
109
|
+
document.body.appendChild(this.viewHTMLElement);
|
|
110
|
+
temporarilyInViewTree = import_UIObject.YES;
|
|
111
|
+
nodeAboveThisView = this.viewHTMLElement.nextSibling;
|
|
112
|
+
}
|
|
113
|
+
const height = this.style.height;
|
|
114
|
+
const width = this.style.width;
|
|
115
|
+
this.style.height = "" + constrainingHeight;
|
|
116
|
+
this.style.width = "" + constrainingWidth;
|
|
117
|
+
const left = this.style.left;
|
|
118
|
+
const right = this.style.right;
|
|
119
|
+
const bottom = this.style.bottom;
|
|
120
|
+
const top = this.style.top;
|
|
121
|
+
this.style.left = "";
|
|
122
|
+
this.style.right = "";
|
|
123
|
+
this.style.bottom = "";
|
|
124
|
+
this.style.top = "";
|
|
125
|
+
const resultHeight = this.viewHTMLElement.scrollHeight;
|
|
126
|
+
const whiteSpace = this.style.whiteSpace;
|
|
127
|
+
this.style.whiteSpace = "nowrap";
|
|
128
|
+
const resultWidth = this.viewHTMLElement.scrollWidth;
|
|
129
|
+
this.style.whiteSpace = whiteSpace;
|
|
130
|
+
this.style.height = height;
|
|
131
|
+
this.style.width = width;
|
|
132
|
+
this.style.left = left;
|
|
133
|
+
this.style.right = right;
|
|
134
|
+
this.style.bottom = bottom;
|
|
135
|
+
this.style.top = top;
|
|
136
|
+
if (temporarilyInViewTree) {
|
|
137
|
+
document.body.removeChild(this.viewHTMLElement);
|
|
138
|
+
if (this.superview) {
|
|
139
|
+
if (nodeAboveThisView) {
|
|
140
|
+
this.superview.viewHTMLElement.insertBefore(this.viewHTMLElement, nodeAboveThisView);
|
|
141
|
+
} else {
|
|
142
|
+
this.superview.viewHTMLElement.appendChild(this.viewHTMLElement);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
result.height = resultHeight;
|
|
147
|
+
result.width = resultWidth;
|
|
148
|
+
this._intrinsicSizesCache[cacheKey] = result.copy();
|
|
149
|
+
return result;
|
|
150
|
+
};
|
|
151
|
+
this.intrinsicContentWidth = (constrainingHeight = 0) => {
|
|
152
|
+
return this.intrinsicContentSizeWithConstraints(constrainingHeight).width;
|
|
153
|
+
};
|
|
154
|
+
this.intrinsicContentHeight = (constrainingWidth = 0) => {
|
|
155
|
+
return this.intrinsicContentSizeWithConstraints(void 0, constrainingWidth).height;
|
|
156
|
+
};
|
|
157
|
+
this.intrinsicContentSize = () => {
|
|
158
|
+
return import_UIObject.nil;
|
|
159
|
+
};
|
|
96
160
|
_UIView._UIViewIndex = _UIView.nextIndex;
|
|
97
161
|
this._UIViewIndex = _UIView._UIViewIndex;
|
|
98
162
|
this._styleClasses = [];
|
|
@@ -2096,70 +2160,6 @@ const _UIView = class extends import_UIObject.UIObject {
|
|
|
2096
2160
|
rectangleFromView(rectangle, view) {
|
|
2097
2161
|
return view.rectangleInView(rectangle, this);
|
|
2098
2162
|
}
|
|
2099
|
-
intrinsicContentSizeWithConstraints(constrainingHeight = 0, constrainingWidth = 0) {
|
|
2100
|
-
const cacheKey = "h_" + constrainingHeight + "__w_" + constrainingWidth;
|
|
2101
|
-
const cachedResult = this._intrinsicSizesCache[cacheKey];
|
|
2102
|
-
if (cachedResult) {
|
|
2103
|
-
return cachedResult;
|
|
2104
|
-
}
|
|
2105
|
-
const result = new import_UIRectangle.UIRectangle(0, 0, 0, 0);
|
|
2106
|
-
if (this.rootView.forceIntrinsicSizeZero) {
|
|
2107
|
-
return result;
|
|
2108
|
-
}
|
|
2109
|
-
let temporarilyInViewTree = import_UIObject.NO;
|
|
2110
|
-
let nodeAboveThisView = null;
|
|
2111
|
-
if (!this.isMemberOfViewTree) {
|
|
2112
|
-
document.body.appendChild(this.viewHTMLElement);
|
|
2113
|
-
temporarilyInViewTree = import_UIObject.YES;
|
|
2114
|
-
nodeAboveThisView = this.viewHTMLElement.nextSibling;
|
|
2115
|
-
}
|
|
2116
|
-
const height = this.style.height;
|
|
2117
|
-
const width = this.style.width;
|
|
2118
|
-
this.style.height = "" + constrainingHeight;
|
|
2119
|
-
this.style.width = "" + constrainingWidth;
|
|
2120
|
-
const left = this.style.left;
|
|
2121
|
-
const right = this.style.right;
|
|
2122
|
-
const bottom = this.style.bottom;
|
|
2123
|
-
const top = this.style.top;
|
|
2124
|
-
this.style.left = "";
|
|
2125
|
-
this.style.right = "";
|
|
2126
|
-
this.style.bottom = "";
|
|
2127
|
-
this.style.top = "";
|
|
2128
|
-
const resultHeight = this.viewHTMLElement.scrollHeight;
|
|
2129
|
-
const whiteSpace = this.style.whiteSpace;
|
|
2130
|
-
this.style.whiteSpace = "nowrap";
|
|
2131
|
-
const resultWidth = this.viewHTMLElement.scrollWidth;
|
|
2132
|
-
this.style.whiteSpace = whiteSpace;
|
|
2133
|
-
this.style.height = height;
|
|
2134
|
-
this.style.width = width;
|
|
2135
|
-
this.style.left = left;
|
|
2136
|
-
this.style.right = right;
|
|
2137
|
-
this.style.bottom = bottom;
|
|
2138
|
-
this.style.top = top;
|
|
2139
|
-
if (temporarilyInViewTree) {
|
|
2140
|
-
document.body.removeChild(this.viewHTMLElement);
|
|
2141
|
-
if (this.superview) {
|
|
2142
|
-
if (nodeAboveThisView) {
|
|
2143
|
-
this.superview.viewHTMLElement.insertBefore(this.viewHTMLElement, nodeAboveThisView);
|
|
2144
|
-
} else {
|
|
2145
|
-
this.superview.viewHTMLElement.appendChild(this.viewHTMLElement);
|
|
2146
|
-
}
|
|
2147
|
-
}
|
|
2148
|
-
}
|
|
2149
|
-
result.height = resultHeight;
|
|
2150
|
-
result.width = resultWidth;
|
|
2151
|
-
this._intrinsicSizesCache[cacheKey] = result.copy();
|
|
2152
|
-
return result;
|
|
2153
|
-
}
|
|
2154
|
-
intrinsicContentWidth(constrainingHeight = 0) {
|
|
2155
|
-
return this.intrinsicContentSizeWithConstraints(constrainingHeight).width;
|
|
2156
|
-
}
|
|
2157
|
-
intrinsicContentHeight(constrainingWidth = 0) {
|
|
2158
|
-
return this.intrinsicContentSizeWithConstraints(void 0, constrainingWidth).height;
|
|
2159
|
-
}
|
|
2160
|
-
intrinsicContentSize() {
|
|
2161
|
-
return import_UIObject.nil;
|
|
2162
|
-
}
|
|
2163
2163
|
};
|
|
2164
2164
|
let UIView = _UIView;
|
|
2165
2165
|
UIView._UIViewIndex = -1;
|