@iternio/react-native-auto-play 0.0.2 → 0.0.3
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/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/AndroidAutoSession.kt +2 -0
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/{hybrid/HybridAutoPlay.kt → HybridAutoPlay.kt} +20 -20
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/{hybrid/HybridSearchTemplate.kt → HybridSearchTemplate.kt} +3 -3
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/VirtualRenderer.kt +1 -1
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/template/GridTemplate.kt +1 -16
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/template/InformationTemplate.kt +1 -14
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/template/ListTemplate.kt +1 -16
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/template/MapTemplate.kt +5 -1
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/template/MessageTemplate.kt +1 -16
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/template/Parser.kt +58 -17
- package/ios/Types.swift +1 -0
- package/ios/hybrid/HybridAutoPlay.swift +5 -4
- package/ios/hybrid/HybridGridTemplate.swift +3 -6
- package/ios/hybrid/HybridInformationTemplate.swift +9 -9
- package/ios/hybrid/HybridListTemplate.swift +3 -6
- package/ios/hybrid/HybridMapTemplate.swift +21 -16
- package/ios/hybrid/HybridSearchTemplate.swift +7 -11
- package/ios/templates/AutoPlayTemplate.swift +31 -48
- package/ios/templates/GridTemplate.swift +31 -22
- package/ios/templates/InformationTemplate.swift +29 -21
- package/ios/templates/ListTemplate.swift +29 -20
- package/ios/templates/MapTemplate.swift +162 -61
- package/ios/templates/MessageTemplate.swift +19 -12
- package/ios/templates/SearchTemplate.swift +17 -25
- package/ios/templates/TemplateStore.swift +3 -3
- package/ios/utils/RootModule.swift +36 -38
- package/lib/templates/MapTemplate.d.ts +14 -3
- package/lib/templates/Template.d.ts +1 -0
- package/lib/types/Button.d.ts +5 -4
- package/lib/types/Maneuver.d.ts +3 -1
- package/lib/utils/NitroMapButton.d.ts +2 -2
- package/lib/utils/NitroMapButton.js +4 -9
- package/nitrogen/generated/android/ReactNativeAutoPlayOnLoad.cpp +2 -0
- package/nitrogen/generated/android/c++/JFunc_void_bool.hpp +74 -0
- package/nitrogen/generated/android/c++/JGridTemplateConfig.hpp +1 -0
- package/nitrogen/generated/android/c++/JHybridGridTemplateSpec.cpp +1 -0
- package/nitrogen/generated/android/c++/JHybridInformationTemplateSpec.cpp +2 -0
- package/nitrogen/generated/android/c++/JHybridListTemplateSpec.cpp +2 -0
- package/nitrogen/generated/android/c++/JHybridMapTemplateSpec.cpp +3 -2
- package/nitrogen/generated/android/c++/JHybridMessageTemplateSpec.cpp +2 -0
- package/nitrogen/generated/android/c++/JInformationTemplateConfig.hpp +2 -0
- package/nitrogen/generated/android/c++/JListTemplateConfig.hpp +2 -0
- package/nitrogen/generated/android/c++/JMapTemplateConfig.hpp +31 -11
- package/nitrogen/generated/android/c++/JMessageTemplateConfig.hpp +2 -0
- package/nitrogen/generated/android/c++/JNitroBaseMapTemplateConfig.hpp +17 -1
- package/nitrogen/generated/android/c++/JNitroMapButton.hpp +9 -9
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_bool.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/MapTemplateConfig.kt +12 -6
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroBaseMapTemplateConfig.kt +7 -4
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroMapButton.kt +5 -5
- package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Bridge.cpp +8 -0
- package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Bridge.hpp +37 -0
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +47 -0
- package/nitrogen/generated/ios/swift/MapTemplateConfig.swift +70 -6
- package/nitrogen/generated/ios/swift/NitroBaseMapTemplateConfig.swift +42 -1
- package/nitrogen/generated/ios/swift/NitroMapButton.swift +54 -54
- package/nitrogen/generated/shared/c++/MapTemplateConfig.hpp +14 -6
- package/nitrogen/generated/shared/c++/NitroBaseMapTemplateConfig.hpp +5 -1
- package/nitrogen/generated/shared/c++/NitroMapButton.hpp +10 -10
- package/package.json +1 -1
- package/src/templates/MapTemplate.ts +32 -12
- package/src/templates/Template.ts +1 -0
- package/src/types/Button.ts +5 -4
- package/src/types/Maneuver.ts +1 -1
- package/src/utils/NitroMapButton.ts +6 -14
- /package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/{hybrid/HybridAndroidAutoTelemetry.kt → HybridAndroidAutoTelemetry.kt} +0 -0
- /package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/{hybrid/HybridCluster.kt → HybridCluster.kt} +0 -0
- /package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/{hybrid/HybridGridTemplate.kt → HybridGridTemplate.kt} +0 -0
- /package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/{hybrid/HybridInformationTemplate.kt → HybridInformationTemplate.kt} +0 -0
- /package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/{hybrid/HybridListTemplate.kt → HybridListTemplate.kt} +0 -0
- /package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/{hybrid/HybridMapTemplate.kt → HybridMapTemplate.kt} +0 -0
- /package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/{hybrid/HybridMessageTemplate.kt → HybridMessageTemplate.kt} +0 -0
|
@@ -18,23 +18,23 @@ public extension NitroMapButton {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `NitroMapButton`.
|
|
20
20
|
*/
|
|
21
|
-
init(type: NitroMapButtonType, image:
|
|
22
|
-
self.init(type, { () -> bridge.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
init(type: NitroMapButtonType, image: NitroImage, onPress: (() -> Void)?) {
|
|
22
|
+
self.init(type, { () -> bridge.std__variant_GlyphImage__AssetImage_ in
|
|
23
|
+
switch image {
|
|
24
|
+
case .first(let __value):
|
|
25
|
+
return bridge.create_std__variant_GlyphImage__AssetImage_(__value)
|
|
26
|
+
case .second(let __value):
|
|
27
|
+
return bridge.create_std__variant_GlyphImage__AssetImage_(__value)
|
|
28
|
+
}
|
|
29
|
+
}().variant, { () -> bridge.std__optional_std__function_void____ in
|
|
30
|
+
if let __unwrappedValue = onPress {
|
|
31
|
+
return bridge.create_std__optional_std__function_void____({ () -> bridge.Func_void in
|
|
32
|
+
let __closureWrapper = Func_void(__unwrappedValue)
|
|
33
|
+
return bridge.create_Func_void(__closureWrapper.toUnsafe())
|
|
34
|
+
}())
|
|
32
35
|
} else {
|
|
33
36
|
return .init()
|
|
34
37
|
}
|
|
35
|
-
}(), { () -> bridge.Func_void in
|
|
36
|
-
let __closureWrapper = Func_void(onPress)
|
|
37
|
-
return bridge.create_Func_void(__closureWrapper.toUnsafe())
|
|
38
38
|
}())
|
|
39
39
|
}
|
|
40
40
|
|
|
@@ -49,64 +49,64 @@ public extension NitroMapButton {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
var image:
|
|
52
|
+
var image: NitroImage {
|
|
53
53
|
@inline(__always)
|
|
54
54
|
get {
|
|
55
|
-
return { () ->
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
let
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
return .second(__actual)
|
|
67
|
-
default:
|
|
68
|
-
fatalError("Variant can never have index \(__variant.index())!")
|
|
69
|
-
}
|
|
70
|
-
}()
|
|
71
|
-
} else {
|
|
72
|
-
return nil
|
|
55
|
+
return { () -> NitroImage in
|
|
56
|
+
let __variant = bridge.std__variant_GlyphImage__AssetImage_(self.__image)
|
|
57
|
+
switch __variant.index() {
|
|
58
|
+
case 0:
|
|
59
|
+
let __actual = __variant.get_0()
|
|
60
|
+
return .first(__actual)
|
|
61
|
+
case 1:
|
|
62
|
+
let __actual = __variant.get_1()
|
|
63
|
+
return .second(__actual)
|
|
64
|
+
default:
|
|
65
|
+
fatalError("Variant can never have index \(__variant.index())!")
|
|
73
66
|
}
|
|
74
67
|
}()
|
|
75
68
|
}
|
|
76
69
|
@inline(__always)
|
|
77
70
|
set {
|
|
78
|
-
self.__image = { () -> bridge.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
case .second(let __value):
|
|
85
|
-
return bridge.create_std__variant_GlyphImage__AssetImage_(__value)
|
|
86
|
-
}
|
|
87
|
-
}().variant)
|
|
88
|
-
} else {
|
|
89
|
-
return .init()
|
|
71
|
+
self.__image = { () -> bridge.std__variant_GlyphImage__AssetImage_ in
|
|
72
|
+
switch newValue {
|
|
73
|
+
case .first(let __value):
|
|
74
|
+
return bridge.create_std__variant_GlyphImage__AssetImage_(__value)
|
|
75
|
+
case .second(let __value):
|
|
76
|
+
return bridge.create_std__variant_GlyphImage__AssetImage_(__value)
|
|
90
77
|
}
|
|
91
|
-
}()
|
|
78
|
+
}().variant
|
|
92
79
|
}
|
|
93
80
|
}
|
|
94
81
|
|
|
95
|
-
var onPress: () -> Void {
|
|
82
|
+
var onPress: (() -> Void)? {
|
|
96
83
|
@inline(__always)
|
|
97
84
|
get {
|
|
98
|
-
return { () -> () -> Void in
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
85
|
+
return { () -> (() -> Void)? in
|
|
86
|
+
if bridge.has_value_std__optional_std__function_void____(self.__onPress) {
|
|
87
|
+
let __unwrapped = bridge.get_std__optional_std__function_void____(self.__onPress)
|
|
88
|
+
return { () -> () -> Void in
|
|
89
|
+
let __wrappedFunction = bridge.wrap_Func_void(__unwrapped)
|
|
90
|
+
return { () -> Void in
|
|
91
|
+
__wrappedFunction.call()
|
|
92
|
+
}
|
|
93
|
+
}()
|
|
94
|
+
} else {
|
|
95
|
+
return nil
|
|
102
96
|
}
|
|
103
97
|
}()
|
|
104
98
|
}
|
|
105
99
|
@inline(__always)
|
|
106
100
|
set {
|
|
107
|
-
self.__onPress = { () -> bridge.
|
|
108
|
-
let
|
|
109
|
-
|
|
101
|
+
self.__onPress = { () -> bridge.std__optional_std__function_void____ in
|
|
102
|
+
if let __unwrappedValue = newValue {
|
|
103
|
+
return bridge.create_std__optional_std__function_void____({ () -> bridge.Func_void in
|
|
104
|
+
let __closureWrapper = Func_void(__unwrappedValue)
|
|
105
|
+
return bridge.create_Func_void(__closureWrapper.toUnsafe())
|
|
106
|
+
}())
|
|
107
|
+
} else {
|
|
108
|
+
return .init()
|
|
109
|
+
}
|
|
110
110
|
}()
|
|
111
111
|
}
|
|
112
112
|
}
|
|
@@ -59,7 +59,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
59
59
|
std::optional<std::function<void()>> onPopped SWIFT_PRIVATE;
|
|
60
60
|
std::optional<double> autoDismissMs SWIFT_PRIVATE;
|
|
61
61
|
std::optional<VisibleTravelEstimate> visibleTravelEstimate SWIFT_PRIVATE;
|
|
62
|
-
std::optional<std::function<void(const Point& /* translation */, const std::optional<Point>& /* velocity */)>>
|
|
62
|
+
std::optional<std::function<void(const Point& /* translation */, const std::optional<Point>& /* velocity */)>> onDidPan SWIFT_PRIVATE;
|
|
63
63
|
std::optional<std::function<void(const Point& /* center */, double /* scale */)>> onDidUpdateZoomGestureWithCenter SWIFT_PRIVATE;
|
|
64
64
|
std::optional<std::function<void(const Point& /* center */)>> onClick SWIFT_PRIVATE;
|
|
65
65
|
std::optional<std::function<void(const Point& /* center */)>> onDoubleClick SWIFT_PRIVATE;
|
|
@@ -68,10 +68,12 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
68
68
|
std::optional<std::function<void()>> onAutoDriveEnabled SWIFT_PRIVATE;
|
|
69
69
|
std::optional<std::vector<NitroMapButton>> mapButtons SWIFT_PRIVATE;
|
|
70
70
|
std::optional<std::vector<NitroAction>> headerActions SWIFT_PRIVATE;
|
|
71
|
+
std::optional<double> panButtonScrollPercentage SWIFT_PRIVATE;
|
|
72
|
+
std::optional<std::function<void(bool /* isPanningInterfaceVisible */)>> onDidChangePanningInterface SWIFT_PRIVATE;
|
|
71
73
|
|
|
72
74
|
public:
|
|
73
75
|
MapTemplateConfig() = default;
|
|
74
|
-
explicit MapTemplateConfig(std::string id, std::optional<std::function<void(std::optional<bool> /* animated */)>> onWillAppear, std::optional<std::function<void(std::optional<bool> /* animated */)>> onWillDisappear, std::optional<std::function<void(std::optional<bool> /* animated */)>> onDidAppear, std::optional<std::function<void(std::optional<bool> /* animated */)>> onDidDisappear, std::optional<std::function<void()>> onPopped, std::optional<double> autoDismissMs, std::optional<VisibleTravelEstimate> visibleTravelEstimate, std::optional<std::function<void(const Point& /* translation */, const std::optional<Point>& /* velocity */)>>
|
|
76
|
+
explicit MapTemplateConfig(std::string id, std::optional<std::function<void(std::optional<bool> /* animated */)>> onWillAppear, std::optional<std::function<void(std::optional<bool> /* animated */)>> onWillDisappear, std::optional<std::function<void(std::optional<bool> /* animated */)>> onDidAppear, std::optional<std::function<void(std::optional<bool> /* animated */)>> onDidDisappear, std::optional<std::function<void()>> onPopped, std::optional<double> autoDismissMs, std::optional<VisibleTravelEstimate> visibleTravelEstimate, std::optional<std::function<void(const Point& /* translation */, const std::optional<Point>& /* velocity */)>> onDidPan, std::optional<std::function<void(const Point& /* center */, double /* scale */)>> onDidUpdateZoomGestureWithCenter, std::optional<std::function<void(const Point& /* center */)>> onClick, std::optional<std::function<void(const Point& /* center */)>> onDoubleClick, std::optional<std::function<void(ColorScheme /* colorScheme */)>> onAppearanceDidChange, std::function<void()> onStopNavigation, std::optional<std::function<void()>> onAutoDriveEnabled, std::optional<std::vector<NitroMapButton>> mapButtons, std::optional<std::vector<NitroAction>> headerActions, std::optional<double> panButtonScrollPercentage, std::optional<std::function<void(bool /* isPanningInterfaceVisible */)>> onDidChangePanningInterface): id(id), onWillAppear(onWillAppear), onWillDisappear(onWillDisappear), onDidAppear(onDidAppear), onDidDisappear(onDidDisappear), onPopped(onPopped), autoDismissMs(autoDismissMs), visibleTravelEstimate(visibleTravelEstimate), onDidPan(onDidPan), onDidUpdateZoomGestureWithCenter(onDidUpdateZoomGestureWithCenter), onClick(onClick), onDoubleClick(onDoubleClick), onAppearanceDidChange(onAppearanceDidChange), onStopNavigation(onStopNavigation), onAutoDriveEnabled(onAutoDriveEnabled), mapButtons(mapButtons), headerActions(headerActions), panButtonScrollPercentage(panButtonScrollPercentage), onDidChangePanningInterface(onDidChangePanningInterface) {}
|
|
75
77
|
};
|
|
76
78
|
|
|
77
79
|
} // namespace margelo::nitro::swe::iternio::reactnativeautoplay
|
|
@@ -92,7 +94,7 @@ namespace margelo::nitro {
|
|
|
92
94
|
JSIConverter<std::optional<std::function<void()>>>::fromJSI(runtime, obj.getProperty(runtime, "onPopped")),
|
|
93
95
|
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "autoDismissMs")),
|
|
94
96
|
JSIConverter<std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::VisibleTravelEstimate>>::fromJSI(runtime, obj.getProperty(runtime, "visibleTravelEstimate")),
|
|
95
|
-
JSIConverter<std::optional<std::function<void(const margelo::nitro::swe::iternio::reactnativeautoplay::Point&, const std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::Point>&)>>>::fromJSI(runtime, obj.getProperty(runtime, "
|
|
97
|
+
JSIConverter<std::optional<std::function<void(const margelo::nitro::swe::iternio::reactnativeautoplay::Point&, const std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::Point>&)>>>::fromJSI(runtime, obj.getProperty(runtime, "onDidPan")),
|
|
96
98
|
JSIConverter<std::optional<std::function<void(const margelo::nitro::swe::iternio::reactnativeautoplay::Point&, double)>>>::fromJSI(runtime, obj.getProperty(runtime, "onDidUpdateZoomGestureWithCenter")),
|
|
97
99
|
JSIConverter<std::optional<std::function<void(const margelo::nitro::swe::iternio::reactnativeautoplay::Point&)>>>::fromJSI(runtime, obj.getProperty(runtime, "onClick")),
|
|
98
100
|
JSIConverter<std::optional<std::function<void(const margelo::nitro::swe::iternio::reactnativeautoplay::Point&)>>>::fromJSI(runtime, obj.getProperty(runtime, "onDoubleClick")),
|
|
@@ -100,7 +102,9 @@ namespace margelo::nitro {
|
|
|
100
102
|
JSIConverter<std::function<void()>>::fromJSI(runtime, obj.getProperty(runtime, "onStopNavigation")),
|
|
101
103
|
JSIConverter<std::optional<std::function<void()>>>::fromJSI(runtime, obj.getProperty(runtime, "onAutoDriveEnabled")),
|
|
102
104
|
JSIConverter<std::optional<std::vector<margelo::nitro::swe::iternio::reactnativeautoplay::NitroMapButton>>>::fromJSI(runtime, obj.getProperty(runtime, "mapButtons")),
|
|
103
|
-
JSIConverter<std::optional<std::vector<margelo::nitro::swe::iternio::reactnativeautoplay::NitroAction>>>::fromJSI(runtime, obj.getProperty(runtime, "headerActions"))
|
|
105
|
+
JSIConverter<std::optional<std::vector<margelo::nitro::swe::iternio::reactnativeautoplay::NitroAction>>>::fromJSI(runtime, obj.getProperty(runtime, "headerActions")),
|
|
106
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "panButtonScrollPercentage")),
|
|
107
|
+
JSIConverter<std::optional<std::function<void(bool)>>>::fromJSI(runtime, obj.getProperty(runtime, "onDidChangePanningInterface"))
|
|
104
108
|
);
|
|
105
109
|
}
|
|
106
110
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::swe::iternio::reactnativeautoplay::MapTemplateConfig& arg) {
|
|
@@ -113,7 +117,7 @@ namespace margelo::nitro {
|
|
|
113
117
|
obj.setProperty(runtime, "onPopped", JSIConverter<std::optional<std::function<void()>>>::toJSI(runtime, arg.onPopped));
|
|
114
118
|
obj.setProperty(runtime, "autoDismissMs", JSIConverter<std::optional<double>>::toJSI(runtime, arg.autoDismissMs));
|
|
115
119
|
obj.setProperty(runtime, "visibleTravelEstimate", JSIConverter<std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::VisibleTravelEstimate>>::toJSI(runtime, arg.visibleTravelEstimate));
|
|
116
|
-
obj.setProperty(runtime, "
|
|
120
|
+
obj.setProperty(runtime, "onDidPan", JSIConverter<std::optional<std::function<void(const margelo::nitro::swe::iternio::reactnativeautoplay::Point&, const std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::Point>&)>>>::toJSI(runtime, arg.onDidPan));
|
|
117
121
|
obj.setProperty(runtime, "onDidUpdateZoomGestureWithCenter", JSIConverter<std::optional<std::function<void(const margelo::nitro::swe::iternio::reactnativeautoplay::Point&, double)>>>::toJSI(runtime, arg.onDidUpdateZoomGestureWithCenter));
|
|
118
122
|
obj.setProperty(runtime, "onClick", JSIConverter<std::optional<std::function<void(const margelo::nitro::swe::iternio::reactnativeautoplay::Point&)>>>::toJSI(runtime, arg.onClick));
|
|
119
123
|
obj.setProperty(runtime, "onDoubleClick", JSIConverter<std::optional<std::function<void(const margelo::nitro::swe::iternio::reactnativeautoplay::Point&)>>>::toJSI(runtime, arg.onDoubleClick));
|
|
@@ -122,6 +126,8 @@ namespace margelo::nitro {
|
|
|
122
126
|
obj.setProperty(runtime, "onAutoDriveEnabled", JSIConverter<std::optional<std::function<void()>>>::toJSI(runtime, arg.onAutoDriveEnabled));
|
|
123
127
|
obj.setProperty(runtime, "mapButtons", JSIConverter<std::optional<std::vector<margelo::nitro::swe::iternio::reactnativeautoplay::NitroMapButton>>>::toJSI(runtime, arg.mapButtons));
|
|
124
128
|
obj.setProperty(runtime, "headerActions", JSIConverter<std::optional<std::vector<margelo::nitro::swe::iternio::reactnativeautoplay::NitroAction>>>::toJSI(runtime, arg.headerActions));
|
|
129
|
+
obj.setProperty(runtime, "panButtonScrollPercentage", JSIConverter<std::optional<double>>::toJSI(runtime, arg.panButtonScrollPercentage));
|
|
130
|
+
obj.setProperty(runtime, "onDidChangePanningInterface", JSIConverter<std::optional<std::function<void(bool)>>>::toJSI(runtime, arg.onDidChangePanningInterface));
|
|
125
131
|
return obj;
|
|
126
132
|
}
|
|
127
133
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -140,7 +146,7 @@ namespace margelo::nitro {
|
|
|
140
146
|
if (!JSIConverter<std::optional<std::function<void()>>>::canConvert(runtime, obj.getProperty(runtime, "onPopped"))) return false;
|
|
141
147
|
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "autoDismissMs"))) return false;
|
|
142
148
|
if (!JSIConverter<std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::VisibleTravelEstimate>>::canConvert(runtime, obj.getProperty(runtime, "visibleTravelEstimate"))) return false;
|
|
143
|
-
if (!JSIConverter<std::optional<std::function<void(const margelo::nitro::swe::iternio::reactnativeautoplay::Point&, const std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::Point>&)>>>::canConvert(runtime, obj.getProperty(runtime, "
|
|
149
|
+
if (!JSIConverter<std::optional<std::function<void(const margelo::nitro::swe::iternio::reactnativeautoplay::Point&, const std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::Point>&)>>>::canConvert(runtime, obj.getProperty(runtime, "onDidPan"))) return false;
|
|
144
150
|
if (!JSIConverter<std::optional<std::function<void(const margelo::nitro::swe::iternio::reactnativeautoplay::Point&, double)>>>::canConvert(runtime, obj.getProperty(runtime, "onDidUpdateZoomGestureWithCenter"))) return false;
|
|
145
151
|
if (!JSIConverter<std::optional<std::function<void(const margelo::nitro::swe::iternio::reactnativeautoplay::Point&)>>>::canConvert(runtime, obj.getProperty(runtime, "onClick"))) return false;
|
|
146
152
|
if (!JSIConverter<std::optional<std::function<void(const margelo::nitro::swe::iternio::reactnativeautoplay::Point&)>>>::canConvert(runtime, obj.getProperty(runtime, "onDoubleClick"))) return false;
|
|
@@ -149,6 +155,8 @@ namespace margelo::nitro {
|
|
|
149
155
|
if (!JSIConverter<std::optional<std::function<void()>>>::canConvert(runtime, obj.getProperty(runtime, "onAutoDriveEnabled"))) return false;
|
|
150
156
|
if (!JSIConverter<std::optional<std::vector<margelo::nitro::swe::iternio::reactnativeautoplay::NitroMapButton>>>::canConvert(runtime, obj.getProperty(runtime, "mapButtons"))) return false;
|
|
151
157
|
if (!JSIConverter<std::optional<std::vector<margelo::nitro::swe::iternio::reactnativeautoplay::NitroAction>>>::canConvert(runtime, obj.getProperty(runtime, "headerActions"))) return false;
|
|
158
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "panButtonScrollPercentage"))) return false;
|
|
159
|
+
if (!JSIConverter<std::optional<std::function<void(bool)>>>::canConvert(runtime, obj.getProperty(runtime, "onDidChangePanningInterface"))) return false;
|
|
152
160
|
return true;
|
|
153
161
|
}
|
|
154
162
|
};
|
|
@@ -43,6 +43,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
43
43
|
public:
|
|
44
44
|
std::optional<std::vector<NitroMapButton>> mapButtons SWIFT_PRIVATE;
|
|
45
45
|
std::optional<std::vector<NitroAction>> headerActions SWIFT_PRIVATE;
|
|
46
|
+
std::optional<std::function<void(bool /* isPanningInterfaceVisible */)>> onDidChangePanningInterface SWIFT_PRIVATE;
|
|
46
47
|
std::optional<std::function<void(std::optional<bool> /* animated */)>> onWillAppear SWIFT_PRIVATE;
|
|
47
48
|
std::optional<std::function<void(std::optional<bool> /* animated */)>> onWillDisappear SWIFT_PRIVATE;
|
|
48
49
|
std::optional<std::function<void(std::optional<bool> /* animated */)>> onDidAppear SWIFT_PRIVATE;
|
|
@@ -52,7 +53,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
52
53
|
|
|
53
54
|
public:
|
|
54
55
|
NitroBaseMapTemplateConfig() = default;
|
|
55
|
-
explicit NitroBaseMapTemplateConfig(std::optional<std::vector<NitroMapButton>> mapButtons, std::optional<std::vector<NitroAction>> headerActions, std::optional<std::function<void(std::optional<bool> /* animated */)>> onWillAppear, std::optional<std::function<void(std::optional<bool> /* animated */)>> onWillDisappear, std::optional<std::function<void(std::optional<bool> /* animated */)>> onDidAppear, std::optional<std::function<void(std::optional<bool> /* animated */)>> onDidDisappear, std::optional<std::function<void()>> onPopped, std::optional<double> autoDismissMs): mapButtons(mapButtons), headerActions(headerActions), onWillAppear(onWillAppear), onWillDisappear(onWillDisappear), onDidAppear(onDidAppear), onDidDisappear(onDidDisappear), onPopped(onPopped), autoDismissMs(autoDismissMs) {}
|
|
56
|
+
explicit NitroBaseMapTemplateConfig(std::optional<std::vector<NitroMapButton>> mapButtons, std::optional<std::vector<NitroAction>> headerActions, std::optional<std::function<void(bool /* isPanningInterfaceVisible */)>> onDidChangePanningInterface, std::optional<std::function<void(std::optional<bool> /* animated */)>> onWillAppear, std::optional<std::function<void(std::optional<bool> /* animated */)>> onWillDisappear, std::optional<std::function<void(std::optional<bool> /* animated */)>> onDidAppear, std::optional<std::function<void(std::optional<bool> /* animated */)>> onDidDisappear, std::optional<std::function<void()>> onPopped, std::optional<double> autoDismissMs): mapButtons(mapButtons), headerActions(headerActions), onDidChangePanningInterface(onDidChangePanningInterface), onWillAppear(onWillAppear), onWillDisappear(onWillDisappear), onDidAppear(onDidAppear), onDidDisappear(onDidDisappear), onPopped(onPopped), autoDismissMs(autoDismissMs) {}
|
|
56
57
|
};
|
|
57
58
|
|
|
58
59
|
} // namespace margelo::nitro::swe::iternio::reactnativeautoplay
|
|
@@ -67,6 +68,7 @@ namespace margelo::nitro {
|
|
|
67
68
|
return margelo::nitro::swe::iternio::reactnativeautoplay::NitroBaseMapTemplateConfig(
|
|
68
69
|
JSIConverter<std::optional<std::vector<margelo::nitro::swe::iternio::reactnativeautoplay::NitroMapButton>>>::fromJSI(runtime, obj.getProperty(runtime, "mapButtons")),
|
|
69
70
|
JSIConverter<std::optional<std::vector<margelo::nitro::swe::iternio::reactnativeautoplay::NitroAction>>>::fromJSI(runtime, obj.getProperty(runtime, "headerActions")),
|
|
71
|
+
JSIConverter<std::optional<std::function<void(bool)>>>::fromJSI(runtime, obj.getProperty(runtime, "onDidChangePanningInterface")),
|
|
70
72
|
JSIConverter<std::optional<std::function<void(std::optional<bool>)>>>::fromJSI(runtime, obj.getProperty(runtime, "onWillAppear")),
|
|
71
73
|
JSIConverter<std::optional<std::function<void(std::optional<bool>)>>>::fromJSI(runtime, obj.getProperty(runtime, "onWillDisappear")),
|
|
72
74
|
JSIConverter<std::optional<std::function<void(std::optional<bool>)>>>::fromJSI(runtime, obj.getProperty(runtime, "onDidAppear")),
|
|
@@ -79,6 +81,7 @@ namespace margelo::nitro {
|
|
|
79
81
|
jsi::Object obj(runtime);
|
|
80
82
|
obj.setProperty(runtime, "mapButtons", JSIConverter<std::optional<std::vector<margelo::nitro::swe::iternio::reactnativeautoplay::NitroMapButton>>>::toJSI(runtime, arg.mapButtons));
|
|
81
83
|
obj.setProperty(runtime, "headerActions", JSIConverter<std::optional<std::vector<margelo::nitro::swe::iternio::reactnativeautoplay::NitroAction>>>::toJSI(runtime, arg.headerActions));
|
|
84
|
+
obj.setProperty(runtime, "onDidChangePanningInterface", JSIConverter<std::optional<std::function<void(bool)>>>::toJSI(runtime, arg.onDidChangePanningInterface));
|
|
82
85
|
obj.setProperty(runtime, "onWillAppear", JSIConverter<std::optional<std::function<void(std::optional<bool>)>>>::toJSI(runtime, arg.onWillAppear));
|
|
83
86
|
obj.setProperty(runtime, "onWillDisappear", JSIConverter<std::optional<std::function<void(std::optional<bool>)>>>::toJSI(runtime, arg.onWillDisappear));
|
|
84
87
|
obj.setProperty(runtime, "onDidAppear", JSIConverter<std::optional<std::function<void(std::optional<bool>)>>>::toJSI(runtime, arg.onDidAppear));
|
|
@@ -97,6 +100,7 @@ namespace margelo::nitro {
|
|
|
97
100
|
}
|
|
98
101
|
if (!JSIConverter<std::optional<std::vector<margelo::nitro::swe::iternio::reactnativeautoplay::NitroMapButton>>>::canConvert(runtime, obj.getProperty(runtime, "mapButtons"))) return false;
|
|
99
102
|
if (!JSIConverter<std::optional<std::vector<margelo::nitro::swe::iternio::reactnativeautoplay::NitroAction>>>::canConvert(runtime, obj.getProperty(runtime, "headerActions"))) return false;
|
|
103
|
+
if (!JSIConverter<std::optional<std::function<void(bool)>>>::canConvert(runtime, obj.getProperty(runtime, "onDidChangePanningInterface"))) return false;
|
|
100
104
|
if (!JSIConverter<std::optional<std::function<void(std::optional<bool>)>>>::canConvert(runtime, obj.getProperty(runtime, "onWillAppear"))) return false;
|
|
101
105
|
if (!JSIConverter<std::optional<std::function<void(std::optional<bool>)>>>::canConvert(runtime, obj.getProperty(runtime, "onWillDisappear"))) return false;
|
|
102
106
|
if (!JSIConverter<std::optional<std::function<void(std::optional<bool>)>>>::canConvert(runtime, obj.getProperty(runtime, "onDidAppear"))) return false;
|
|
@@ -34,8 +34,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AssetImage;
|
|
|
34
34
|
#include "GlyphImage.hpp"
|
|
35
35
|
#include "AssetImage.hpp"
|
|
36
36
|
#include <variant>
|
|
37
|
-
#include <optional>
|
|
38
37
|
#include <functional>
|
|
38
|
+
#include <optional>
|
|
39
39
|
|
|
40
40
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
41
41
|
|
|
@@ -45,12 +45,12 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
45
45
|
struct NitroMapButton {
|
|
46
46
|
public:
|
|
47
47
|
NitroMapButtonType type SWIFT_PRIVATE;
|
|
48
|
-
std::
|
|
49
|
-
std::function<void()
|
|
48
|
+
std::variant<GlyphImage, AssetImage> image SWIFT_PRIVATE;
|
|
49
|
+
std::optional<std::function<void()>> onPress SWIFT_PRIVATE;
|
|
50
50
|
|
|
51
51
|
public:
|
|
52
52
|
NitroMapButton() = default;
|
|
53
|
-
explicit NitroMapButton(NitroMapButtonType type, std::
|
|
53
|
+
explicit NitroMapButton(NitroMapButtonType type, std::variant<GlyphImage, AssetImage> image, std::optional<std::function<void()>> onPress): type(type), image(image), onPress(onPress) {}
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
} // namespace margelo::nitro::swe::iternio::reactnativeautoplay
|
|
@@ -64,15 +64,15 @@ namespace margelo::nitro {
|
|
|
64
64
|
jsi::Object obj = arg.asObject(runtime);
|
|
65
65
|
return margelo::nitro::swe::iternio::reactnativeautoplay::NitroMapButton(
|
|
66
66
|
JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::NitroMapButtonType>::fromJSI(runtime, obj.getProperty(runtime, "type")),
|
|
67
|
-
JSIConverter<std::
|
|
68
|
-
JSIConverter<std::function<void()
|
|
67
|
+
JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage>>::fromJSI(runtime, obj.getProperty(runtime, "image")),
|
|
68
|
+
JSIConverter<std::optional<std::function<void()>>>::fromJSI(runtime, obj.getProperty(runtime, "onPress"))
|
|
69
69
|
);
|
|
70
70
|
}
|
|
71
71
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::swe::iternio::reactnativeautoplay::NitroMapButton& arg) {
|
|
72
72
|
jsi::Object obj(runtime);
|
|
73
73
|
obj.setProperty(runtime, "type", JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::NitroMapButtonType>::toJSI(runtime, arg.type));
|
|
74
|
-
obj.setProperty(runtime, "image", JSIConverter<std::
|
|
75
|
-
obj.setProperty(runtime, "onPress", JSIConverter<std::function<void()
|
|
74
|
+
obj.setProperty(runtime, "image", JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage>>::toJSI(runtime, arg.image));
|
|
75
|
+
obj.setProperty(runtime, "onPress", JSIConverter<std::optional<std::function<void()>>>::toJSI(runtime, arg.onPress));
|
|
76
76
|
return obj;
|
|
77
77
|
}
|
|
78
78
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -84,8 +84,8 @@ namespace margelo::nitro {
|
|
|
84
84
|
return false;
|
|
85
85
|
}
|
|
86
86
|
if (!JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::NitroMapButtonType>::canConvert(runtime, obj.getProperty(runtime, "type"))) return false;
|
|
87
|
-
if (!JSIConverter<std::
|
|
88
|
-
if (!JSIConverter<std::function<void()
|
|
87
|
+
if (!JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage>>::canConvert(runtime, obj.getProperty(runtime, "image"))) return false;
|
|
88
|
+
if (!JSIConverter<std::optional<std::function<void()>>>::canConvert(runtime, obj.getProperty(runtime, "onPress"))) return false;
|
|
89
89
|
return true;
|
|
90
90
|
}
|
|
91
91
|
};
|
package/package.json
CHANGED
|
@@ -31,12 +31,7 @@ const HybridMapTemplate = NitroModules.createHybridObject<NitroMapTemplate>('Map
|
|
|
31
31
|
export type Point = { x: number; y: number };
|
|
32
32
|
export type VisibleTravelEstimate = 'first' | 'last';
|
|
33
33
|
|
|
34
|
-
export type HeaderActionsAndroidMap<T> =
|
|
35
|
-
| [ActionButtonAndroid<T>, ActionButtonAndroid<T>, ActionButtonAndroid<T>, ActionButtonAndroid<T>]
|
|
36
|
-
| [ActionButtonAndroid<T>, ActionButtonAndroid<T>, ActionButtonAndroid<T>]
|
|
37
|
-
| [ActionButtonAndroid<T>, ActionButtonAndroid<T>]
|
|
38
|
-
| [ActionButtonAndroid<T>];
|
|
39
|
-
|
|
34
|
+
export type HeaderActionsAndroidMap<T> = Array<ActionButtonAndroid<T>> & { length: 1 | 2 | 3 | 4 };
|
|
40
35
|
export interface NavigationAlertCallbacks {
|
|
41
36
|
dismiss: CleanupCallback;
|
|
42
37
|
update: (title: AutoText, subtitle?: AutoText) => void;
|
|
@@ -53,7 +48,7 @@ export interface NitroMapTemplateConfig extends TemplateConfig, NitroBaseMapTemp
|
|
|
53
48
|
* @param translation distance in pixels along the x & y axis that has been scrolled since the last touch position during the scroll event
|
|
54
49
|
* @param velocity the velocity of the pan gesture, iOS only
|
|
55
50
|
*/
|
|
56
|
-
|
|
51
|
+
onDidPan?: (translation: Point, velocity?: Point) => void;
|
|
57
52
|
|
|
58
53
|
/**
|
|
59
54
|
* callback for pinch to zoom gesture
|
|
@@ -86,13 +81,36 @@ export interface NitroMapTemplateConfig extends TemplateConfig, NitroBaseMapTemp
|
|
|
86
81
|
|
|
87
82
|
mapButtons?: Array<NitroMapButton>;
|
|
88
83
|
headerActions?: Array<NitroAction>;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* specify the percentage of screen height/width the pan button should scroll
|
|
87
|
+
* @namespace iOS
|
|
88
|
+
*/
|
|
89
|
+
panButtonScrollPercentage?:
|
|
90
|
+
| 0
|
|
91
|
+
| 0.05
|
|
92
|
+
| 0.1
|
|
93
|
+
| 0.15
|
|
94
|
+
| 0.2
|
|
95
|
+
| 0.25
|
|
96
|
+
| 0.3
|
|
97
|
+
| 0.35
|
|
98
|
+
| 0.4
|
|
99
|
+
| 0.45
|
|
100
|
+
| 0.5
|
|
101
|
+
| 0.55
|
|
102
|
+
| 0.6
|
|
103
|
+
| 0.65
|
|
104
|
+
| 0.7
|
|
105
|
+
| 0.75
|
|
106
|
+
| 0.8
|
|
107
|
+
| 0.85
|
|
108
|
+
| 0.9
|
|
109
|
+
| 0.95
|
|
110
|
+
| 1;
|
|
89
111
|
}
|
|
90
112
|
|
|
91
|
-
export type MapButtons<T> =
|
|
92
|
-
| [MapButton<T>, MapButton<T>, MapButton<T>, MapButton<T> | MapPanButton<T>]
|
|
93
|
-
| [MapButton<T>, MapButton<T>, MapButton<T> | MapPanButton<T>]
|
|
94
|
-
| [MapButton<T>, MapButton<T> | MapPanButton<T>]
|
|
95
|
-
| [MapButton<T> | MapPanButton<T>];
|
|
113
|
+
export type MapButtons<T> = Array<MapButton<T> | MapPanButton> & { length: 1 | 2 | 3 | 4 };
|
|
96
114
|
|
|
97
115
|
export type MapHeaderActions<T> = {
|
|
98
116
|
android?: HeaderActionsAndroidMap<T>;
|
|
@@ -102,6 +120,8 @@ export type MapHeaderActions<T> = {
|
|
|
102
120
|
export type BaseMapTemplateConfig<T> = {
|
|
103
121
|
/**
|
|
104
122
|
* buttons that represent actions on the map template, usually on the bottom right corner
|
|
123
|
+
* @namespace Android - adding a pan button will always make the pan button the first one
|
|
124
|
+
* @namespace iOS - the pan button can be on any position
|
|
105
125
|
*/
|
|
106
126
|
mapButtons?: MapButtons<T>;
|
|
107
127
|
|
|
@@ -69,6 +69,7 @@ export interface TemplateConfig {
|
|
|
69
69
|
export interface NitroBaseMapTemplateConfig extends TemplateConfig {
|
|
70
70
|
mapButtons?: Array<NitroMapButton>;
|
|
71
71
|
headerActions?: Array<NitroAction>;
|
|
72
|
+
onDidChangePanningInterface?: (isPanningInterfaceVisible: boolean) => void;
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
export class Template<TemplateConfigType, ActionsType> {
|
package/src/types/Button.ts
CHANGED
|
@@ -9,12 +9,13 @@ export type MapButton<T = unknown> = {
|
|
|
9
9
|
export type ButtonStyle = 'normal' | 'confirm' | 'cancel';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* this
|
|
13
|
-
* @namespace Android
|
|
12
|
+
* pressing this button will bring up the system default pan interface
|
|
13
|
+
* @namespace Android - this button might not be shown, usually when the device has a touch screen
|
|
14
|
+
* @namespace iOS - this button will always be shown, no matter if the device has a touch screen or not
|
|
14
15
|
*/
|
|
15
|
-
export type MapPanButton
|
|
16
|
+
export type MapPanButton = {
|
|
16
17
|
type: 'pan';
|
|
17
|
-
|
|
18
|
+
image: AutoImage;
|
|
18
19
|
};
|
|
19
20
|
|
|
20
21
|
type BaseButton<T = unknown> = {
|
package/src/types/Maneuver.ts
CHANGED
|
@@ -6,8 +6,8 @@ type NitroMapButtonType = 'pan' | 'custom';
|
|
|
6
6
|
|
|
7
7
|
export type NitroMapButton = {
|
|
8
8
|
type: NitroMapButtonType;
|
|
9
|
-
image
|
|
10
|
-
onPress
|
|
9
|
+
image: NitroImage;
|
|
10
|
+
onPress?: () => void;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
const convert = <T>(template: T, mapButtons?: MapButtons<T>): Array<NitroMapButton> | undefined => {
|
|
@@ -16,16 +16,8 @@ const convert = <T>(template: T, mapButtons?: MapButtons<T>): Array<NitroMapButt
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
return mapButtons?.map<NitroMapButton>((button) => {
|
|
19
|
-
const {
|
|
20
|
-
|
|
21
|
-
if (button.type === 'pan') {
|
|
22
|
-
if (Platform.OS === 'android') {
|
|
23
|
-
return { type: 'pan', onPress: () => onPress(template) };
|
|
24
|
-
}
|
|
25
|
-
throw new Error(
|
|
26
|
-
'unsupported platform, pan button can be used on Android only! Use a custom button instead.'
|
|
27
|
-
);
|
|
28
|
-
}
|
|
19
|
+
const { type } = button;
|
|
20
|
+
const onPress = button.type === 'custom' ? () => button.onPress(template) : undefined;
|
|
29
21
|
|
|
30
22
|
if (button.image.type === 'glyph') {
|
|
31
23
|
const backgroundColor =
|
|
@@ -39,14 +31,14 @@ const convert = <T>(template: T, mapButtons?: MapButtons<T>): Array<NitroMapButt
|
|
|
39
31
|
|
|
40
32
|
return {
|
|
41
33
|
type,
|
|
42
|
-
onPress
|
|
34
|
+
onPress,
|
|
43
35
|
image: NitroImageUtil.convert({ ...button.image, backgroundColor, fontScale }),
|
|
44
36
|
};
|
|
45
37
|
}
|
|
46
38
|
|
|
47
39
|
return {
|
|
48
40
|
type,
|
|
49
|
-
onPress
|
|
41
|
+
onPress,
|
|
50
42
|
image: NitroImageUtil.convert(button.image),
|
|
51
43
|
};
|
|
52
44
|
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|