@tantawowa/hosanna-ui 2.2.0 → 2.3.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/dist-manifest.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"artifact": "npm-sdk",
|
|
4
4
|
"packageName": "@tantawowa/hosanna-ui",
|
|
5
|
-
"version": "2.
|
|
6
|
-
"sourceCommit": "
|
|
5
|
+
"version": "2.3.0",
|
|
6
|
+
"sourceCommit": "2658c60ab7e6b4fe34c153733453a796cb608164",
|
|
7
7
|
"files": [
|
|
8
8
|
{
|
|
9
9
|
"path": "LICENSE",
|
|
@@ -2635,7 +2635,7 @@
|
|
|
2635
2635
|
},
|
|
2636
2636
|
{
|
|
2637
2637
|
"path": "src/hosanna-ui/views/lib/BaseView.ts",
|
|
2638
|
-
"sha256": "
|
|
2638
|
+
"sha256": "e3cac2af9a73e78e11e91fac0c5c170a8f6096b3c0a6d3c604e910df8b5b865c"
|
|
2639
2639
|
},
|
|
2640
2640
|
{
|
|
2641
2641
|
"path": "src/hosanna-ui/views/lib/BuildConfig.ts",
|
package/package.json
CHANGED
|
@@ -1189,25 +1189,54 @@ export class BaseView<T extends ViewState, R extends ISGNGroup = ISGNGroup> impl
|
|
|
1189
1189
|
}
|
|
1190
1190
|
|
|
1191
1191
|
try {
|
|
1192
|
+
const hasPending = this.isDirty;
|
|
1192
1193
|
for (const field in newState) {
|
|
1193
1194
|
const newValue = newState[field];
|
|
1194
1195
|
const oldValue = (this.state as JsonData)[field];
|
|
1195
|
-
const fieldType = typeof newValue;
|
|
1196
|
-
|
|
1197
|
-
// console.debug(`Checking field: ${field}, type: ${fieldType}`);
|
|
1198
1196
|
|
|
1199
|
-
//
|
|
1200
|
-
if (
|
|
1197
|
+
// Fast-path nullish values before calling typeof (hs_typeof on Roku).
|
|
1198
|
+
if (newValue == undefined) {
|
|
1199
|
+
if (oldValue != undefined) {
|
|
1200
|
+
return field;
|
|
1201
|
+
}
|
|
1202
|
+
// An incoming removal must also cancel a callback queued earlier in this frame.
|
|
1203
|
+
if (hasPending) {
|
|
1204
|
+
const pendingValue = (this.pendingState as JsonData)[field];
|
|
1205
|
+
if (pendingValue != undefined) {
|
|
1206
|
+
if (typeof pendingValue === 'function') {
|
|
1207
|
+
return field;
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1201
1211
|
continue;
|
|
1202
1212
|
}
|
|
1203
1213
|
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
const newU = newValue == undefined;
|
|
1207
|
-
const oldU = oldValue == undefined;
|
|
1208
|
-
if (newU !== oldU) {
|
|
1214
|
+
if (oldValue == undefined) {
|
|
1215
|
+
if (!hasPending) {
|
|
1209
1216
|
return field;
|
|
1210
1217
|
}
|
|
1218
|
+
if (typeof newValue === 'function') {
|
|
1219
|
+
const pendingValue = (this.pendingState as JsonData)[field];
|
|
1220
|
+
if (pendingValue != undefined) {
|
|
1221
|
+
if (typeof pendingValue === 'function') {
|
|
1222
|
+
continue;
|
|
1223
|
+
}
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
return field;
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
const fieldType = typeof newValue;
|
|
1230
|
+
|
|
1231
|
+
// Skip callback identity changes unless a same-frame removal queued undefined.
|
|
1232
|
+
if (fieldType === 'function') {
|
|
1233
|
+
if (hasPending) {
|
|
1234
|
+
if (this.pendingState.hasOwnProperty(field)) {
|
|
1235
|
+
if ((this.pendingState as JsonData)[field] == undefined) {
|
|
1236
|
+
return field;
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1211
1240
|
continue;
|
|
1212
1241
|
}
|
|
1213
1242
|
|