react-native-macos 0.66.48 → 0.66.49
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/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/Modules/RCTUIManager.m +19 -10
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/package.json +1 -1
- package/template/package.json +1 -1
package/React/Base/RCTVersion.m
CHANGED
|
@@ -1501,6 +1501,7 @@ RCT_EXPORT_METHOD(clearJSResponder)
|
|
|
1501
1501
|
static NSMutableDictionary<NSString *, id> *moduleConstantsForComponent(
|
|
1502
1502
|
NSMutableDictionary<NSString *, NSDictionary *> *directEvents,
|
|
1503
1503
|
NSMutableDictionary<NSString *, NSDictionary *> *bubblingEvents,
|
|
1504
|
+
NSMutableDictionary<NSString *, NSString *> *registrationCache, // TODO(macOS GH#774)
|
|
1504
1505
|
RCTComponentData *componentData)
|
|
1505
1506
|
{
|
|
1506
1507
|
NSMutableDictionary<NSString *, id> *moduleConstants = [NSMutableDictionary new];
|
|
@@ -1520,6 +1521,8 @@ static NSMutableDictionary<NSString *, id> *moduleConstantsForComponent(
|
|
|
1520
1521
|
moduleConstants[@"bubblingEventTypes"] = bubblingEventTypes;
|
|
1521
1522
|
moduleConstants[@"directEventTypes"] = directEventTypes;
|
|
1522
1523
|
|
|
1524
|
+
NSString *componentName = [componentData name]; // TODO(macOS GH#774)
|
|
1525
|
+
|
|
1523
1526
|
// Add direct events
|
|
1524
1527
|
for (NSString *eventName in viewConfig[@"directEvents"]) {
|
|
1525
1528
|
if (!directEvents[eventName]) {
|
|
@@ -1530,11 +1533,13 @@ static NSMutableDictionary<NSString *, id> *moduleConstantsForComponent(
|
|
|
1530
1533
|
directEventTypes[eventName] = directEvents[eventName];
|
|
1531
1534
|
if (RCT_DEBUG && bubblingEvents[eventName]) {
|
|
1532
1535
|
RCTLogError(
|
|
1533
|
-
@"Component '%@' re-registered bubbling event '%@' as a "
|
|
1536
|
+
@"Component '%@' re-registered bubbling event '%@' (originally registered by '%@') as a "
|
|
1534
1537
|
"direct event",
|
|
1535
|
-
|
|
1536
|
-
eventName
|
|
1538
|
+
componentName,
|
|
1539
|
+
eventName,
|
|
1540
|
+
registrationCache[eventName] ?: @"<unknown>"); // TODO(macOS GH#774)
|
|
1537
1541
|
}
|
|
1542
|
+
registrationCache[eventName] = componentName; // TODO(macOS GH#774)
|
|
1538
1543
|
}
|
|
1539
1544
|
|
|
1540
1545
|
// Add bubbling events
|
|
@@ -1551,11 +1556,13 @@ static NSMutableDictionary<NSString *, id> *moduleConstantsForComponent(
|
|
|
1551
1556
|
bubblingEventTypes[eventName] = bubblingEvents[eventName];
|
|
1552
1557
|
if (RCT_DEBUG && directEvents[eventName]) {
|
|
1553
1558
|
RCTLogError(
|
|
1554
|
-
@"Component '%@' re-registered direct event '%@' as a "
|
|
1559
|
+
@"Component '%@' re-registered direct event '%@' (originally registered by '%@') as a "
|
|
1555
1560
|
"bubbling event",
|
|
1556
|
-
|
|
1557
|
-
eventName
|
|
1561
|
+
componentName,
|
|
1562
|
+
eventName,
|
|
1563
|
+
registrationCache[eventName] ?: @"<unknown>"); // TODO(macOS GH#774)
|
|
1558
1564
|
}
|
|
1565
|
+
registrationCache[eventName] = componentName; // TODO(macOS GH#774)
|
|
1559
1566
|
}
|
|
1560
1567
|
|
|
1561
1568
|
return moduleConstants;
|
|
@@ -1571,12 +1578,13 @@ static NSMutableDictionary<NSString *, id> *moduleConstantsForComponent(
|
|
|
1571
1578
|
NSMutableDictionary<NSString *, NSDictionary *> *constants = [NSMutableDictionary new];
|
|
1572
1579
|
NSMutableDictionary<NSString *, NSDictionary *> *directEvents = [NSMutableDictionary new];
|
|
1573
1580
|
NSMutableDictionary<NSString *, NSDictionary *> *bubblingEvents = [NSMutableDictionary new];
|
|
1581
|
+
NSMutableDictionary<NSString *, NSString *> *registrationCache = [NSMutableDictionary new]; // TODO(macOS GH#774)
|
|
1574
1582
|
|
|
1575
1583
|
[_componentDataByName
|
|
1576
1584
|
enumerateKeysAndObjectsUsingBlock:^(NSString *name, RCTComponentData *componentData, __unused BOOL *stop) {
|
|
1577
1585
|
RCTAssert(!constants[name], @"UIManager already has constants for %@", componentData.name);
|
|
1578
1586
|
NSMutableDictionary<NSString *, id> *moduleConstants =
|
|
1579
|
-
moduleConstantsForComponent(directEvents, bubblingEvents, componentData);
|
|
1587
|
+
moduleConstantsForComponent(directEvents, bubblingEvents, registrationCache, componentData); // TODO(macOS GH#774)
|
|
1580
1588
|
constants[name] = moduleConstants;
|
|
1581
1589
|
}];
|
|
1582
1590
|
|
|
@@ -1621,10 +1629,11 @@ RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(lazilyLoadView : (NSString *)name)
|
|
|
1621
1629
|
bridge:self.bridge
|
|
1622
1630
|
eventDispatcher:self.bridge.eventDispatcher];
|
|
1623
1631
|
_componentDataByName[componentData.name] = componentData;
|
|
1624
|
-
NSMutableDictionary *directEvents = [NSMutableDictionary new];
|
|
1625
|
-
NSMutableDictionary *bubblingEvents = [NSMutableDictionary new];
|
|
1632
|
+
NSMutableDictionary<NSString *, NSDictionary *> *directEvents = [NSMutableDictionary new];
|
|
1633
|
+
NSMutableDictionary<NSString *, NSDictionary *> *bubblingEvents = [NSMutableDictionary new];
|
|
1634
|
+
NSMutableDictionary<NSString *, NSString *> *registrationCache = [NSMutableDictionary new]; // TODO(macOS GH#774)
|
|
1626
1635
|
NSMutableDictionary<NSString *, id> *moduleConstants =
|
|
1627
|
-
moduleConstantsForComponent(directEvents, bubblingEvents, componentData);
|
|
1636
|
+
moduleConstantsForComponent(directEvents, bubblingEvents, registrationCache, componentData); // TODO(macOS GH#774)
|
|
1628
1637
|
return @{
|
|
1629
1638
|
@"viewConfig" : moduleConstants,
|
|
1630
1639
|
};
|
package/package.json
CHANGED