@iternio/react-native-auto-play 0.3.11 → 0.3.12
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/README.md +60 -2
- package/android/src/automotive/AndroidManifest.xml +1 -0
- package/android/src/main/AndroidManifest.xml +1 -0
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAutoPlay.kt +91 -0
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/VoiceInputManager.kt +214 -0
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/template/MapTemplate.kt +2 -1
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/template/Parser.kt +108 -38
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/utils/BitmapCache.kt +14 -0
- package/ios/extensions/NitroImageExtensions.swift +10 -1
- package/ios/hybrid/HybridAutoPlay.swift +51 -4
- package/ios/templates/GridTemplate.swift +7 -0
- package/ios/templates/MapTemplate.swift +14 -0
- package/ios/templates/Parser.swift +91 -4
- package/ios/utils/VoiceInputManager.swift +233 -0
- package/lib/specs/AutoPlay.nitro.d.ts +31 -1
- package/lib/types/Image.d.ts +13 -0
- package/lib/utils/NitroImage.d.ts +6 -1
- package/lib/utils/NitroImage.js +7 -0
- package/nitrogen/generated/android/ReactNativeAutoPlay+autolinking.cmake +1 -1
- package/nitrogen/generated/android/c++/JGridTemplateConfig.hpp +3 -1
- package/nitrogen/generated/android/c++/JHybridAutoPlaySpec.cpp +48 -1
- package/nitrogen/generated/android/c++/JHybridAutoPlaySpec.hpp +4 -0
- package/nitrogen/generated/android/c++/JHybridClusterSpec.cpp +4 -0
- package/nitrogen/generated/android/c++/JHybridGridTemplateSpec.cpp +5 -1
- package/nitrogen/generated/android/c++/JHybridInformationTemplateSpec.cpp +5 -1
- package/nitrogen/generated/android/c++/JHybridListTemplateSpec.cpp +5 -1
- package/nitrogen/generated/android/c++/JHybridMapTemplateSpec.cpp +5 -1
- package/nitrogen/generated/android/c++/JHybridMessageTemplateSpec.cpp +5 -1
- package/nitrogen/generated/android/c++/JHybridSearchTemplateSpec.cpp +5 -1
- package/nitrogen/generated/android/c++/JHybridSignInTemplateSpec.cpp +5 -1
- package/nitrogen/generated/android/c++/JImageLane.hpp +2 -0
- package/nitrogen/generated/android/c++/JInformationTemplateConfig.hpp +3 -1
- package/nitrogen/generated/android/c++/JLaneGuidance.hpp +2 -0
- package/nitrogen/generated/android/c++/JListTemplateConfig.hpp +3 -1
- package/nitrogen/generated/android/c++/JMapTemplateConfig.hpp +3 -1
- package/nitrogen/generated/android/c++/JMessageTemplateConfig.hpp +7 -5
- package/nitrogen/generated/android/c++/JNitroAction.hpp +7 -5
- package/nitrogen/generated/android/c++/JNitroAttributedString.hpp +2 -0
- package/nitrogen/generated/android/c++/JNitroAttributedStringImage.hpp +2 -0
- package/nitrogen/generated/android/c++/JNitroBaseMapTemplateConfig.hpp +3 -1
- package/nitrogen/generated/android/c++/JNitroGridButton.hpp +2 -0
- package/nitrogen/generated/android/c++/JNitroImage.cpp +6 -2
- package/nitrogen/generated/android/c++/JNitroImage.hpp +19 -2
- package/nitrogen/generated/android/c++/JNitroManeuver.hpp +3 -1
- package/nitrogen/generated/android/c++/JNitroMapButton.hpp +2 -0
- package/nitrogen/generated/android/c++/JNitroMessageManeuver.hpp +7 -5
- package/nitrogen/generated/android/c++/JNitroNavigationAlert.hpp +7 -5
- package/nitrogen/generated/android/c++/JNitroRoutingManeuver.hpp +7 -5
- package/nitrogen/generated/android/c++/JNitroRow.hpp +7 -5
- package/nitrogen/generated/android/c++/JNitroSection.hpp +3 -1
- package/nitrogen/generated/android/c++/JPreferredImageLane.hpp +2 -0
- package/nitrogen/generated/android/c++/JRemoteImage.hpp +68 -0
- package/nitrogen/generated/android/c++/JSearchTemplateConfig.hpp +3 -1
- package/nitrogen/generated/android/c++/JSignInTemplateConfig.hpp +3 -1
- package/nitrogen/generated/android/c++/JVariant_GlyphImage_AssetImage_RemoteImage.cpp +30 -0
- package/nitrogen/generated/android/c++/JVariant_GlyphImage_AssetImage_RemoteImage.hpp +92 -0
- package/nitrogen/generated/android/c++/JVariant_PreferredImageLane_ImageLane.hpp +2 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAutoPlaySpec.kt +17 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/MessageTemplateConfig.kt +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroAction.kt +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroImage.kt +14 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroMessageManeuver.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroNavigationAlert.kt +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroRoutingManeuver.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroRow.kt +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/RemoteImage.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/{Variant_GlyphImage_AssetImage.kt → Variant_GlyphImage_AssetImage_RemoteImage.kt} +20 -8
- package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Bridge.cpp +16 -8
- package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Bridge.hpp +156 -79
- package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Umbrella.hpp +4 -0
- package/nitrogen/generated/ios/c++/HybridAutoPlaySpecSwift.hpp +37 -0
- package/nitrogen/generated/ios/c++/HybridCarPlayDashboardSpecSwift.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridClusterSpecSwift.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridGridTemplateSpecSwift.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridInformationTemplateSpecSwift.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridListTemplateSpecSwift.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridMapTemplateSpecSwift.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridMessageTemplateSpecSwift.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridSearchTemplateSpecSwift.hpp +3 -0
- package/nitrogen/generated/ios/swift/Func_void_std__shared_ptr_ArrayBuffer_.swift +46 -0
- package/nitrogen/generated/ios/swift/HybridAutoPlaySpec.swift +4 -0
- package/nitrogen/generated/ios/swift/HybridAutoPlaySpec_cxx.swift +82 -0
- package/nitrogen/generated/ios/swift/ImageLane.swift +9 -4
- package/nitrogen/generated/ios/swift/MessageTemplateConfig.swift +16 -11
- package/nitrogen/generated/ios/swift/NitroAction.swift +16 -11
- package/nitrogen/generated/ios/swift/NitroAttributedStringImage.swift +9 -4
- package/nitrogen/generated/ios/swift/NitroCarPlayDashboardButton.swift +9 -4
- package/nitrogen/generated/ios/swift/NitroGridButton.swift +9 -4
- package/nitrogen/generated/ios/swift/NitroImage.swift +2 -1
- package/nitrogen/generated/ios/swift/NitroMapButton.swift +9 -4
- package/nitrogen/generated/ios/swift/NitroMessageManeuver.swift +16 -11
- package/nitrogen/generated/ios/swift/NitroNavigationAlert.swift +16 -11
- package/nitrogen/generated/ios/swift/NitroRoutingManeuver.swift +25 -15
- package/nitrogen/generated/ios/swift/NitroRow.swift +16 -11
- package/nitrogen/generated/ios/swift/PreferredImageLane.swift +9 -4
- package/nitrogen/generated/ios/swift/RemoteImage.swift +58 -0
- package/nitrogen/generated/ios/swift/{Variant_GlyphImage_AssetImage.swift → Variant_GlyphImage_AssetImage_RemoteImage.swift} +4 -3
- package/nitrogen/generated/shared/c++/HybridAutoPlaySpec.cpp +4 -0
- package/nitrogen/generated/shared/c++/HybridAutoPlaySpec.hpp +5 -0
- package/nitrogen/generated/shared/c++/ImageLane.hpp +8 -5
- package/nitrogen/generated/shared/c++/MessageTemplateConfig.hpp +8 -5
- package/nitrogen/generated/shared/c++/NitroAction.hpp +8 -5
- package/nitrogen/generated/shared/c++/NitroAttributedStringImage.hpp +8 -5
- package/nitrogen/generated/shared/c++/NitroCarPlayDashboardButton.hpp +8 -5
- package/nitrogen/generated/shared/c++/NitroGridButton.hpp +8 -5
- package/nitrogen/generated/shared/c++/NitroMapButton.hpp +8 -5
- package/nitrogen/generated/shared/c++/NitroMessageManeuver.hpp +8 -5
- package/nitrogen/generated/shared/c++/NitroNavigationAlert.hpp +8 -5
- package/nitrogen/generated/shared/c++/NitroRoutingManeuver.hpp +12 -9
- package/nitrogen/generated/shared/c++/NitroRow.hpp +8 -5
- package/nitrogen/generated/shared/c++/PreferredImageLane.hpp +8 -5
- package/nitrogen/generated/shared/c++/RemoteImage.hpp +94 -0
- package/package.json +1 -1
- package/src/specs/AutoPlay.nitro.ts +39 -1
- package/src/types/Image.ts +14 -0
- package/src/utils/NitroImage.ts +15 -1
- package/nitrogen/generated/android/c++/JVariant_GlyphImage_AssetImage.cpp +0 -26
- package/nitrogen/generated/android/c++/JVariant_GlyphImage_AssetImage.hpp +0 -75
|
@@ -15,8 +15,10 @@
|
|
|
15
15
|
#include "JAssetImage.hpp"
|
|
16
16
|
#include "JGlyphImage.hpp"
|
|
17
17
|
#include "JNitroColor.hpp"
|
|
18
|
-
#include "
|
|
18
|
+
#include "JRemoteImage.hpp"
|
|
19
|
+
#include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
|
|
19
20
|
#include "NitroColor.hpp"
|
|
21
|
+
#include "RemoteImage.hpp"
|
|
20
22
|
#include <optional>
|
|
21
23
|
#include <string>
|
|
22
24
|
#include <variant>
|
|
@@ -44,8 +46,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
44
46
|
jni::local_ref<jni::JString> title = this->getFieldValue(fieldTitle);
|
|
45
47
|
static const auto fieldText = clazz->getField<jni::JString>("text");
|
|
46
48
|
jni::local_ref<jni::JString> text = this->getFieldValue(fieldText);
|
|
47
|
-
static const auto fieldImage = clazz->getField<
|
|
48
|
-
jni::local_ref<
|
|
49
|
+
static const auto fieldImage = clazz->getField<JVariant_GlyphImage_AssetImage_RemoteImage>("image");
|
|
50
|
+
jni::local_ref<JVariant_GlyphImage_AssetImage_RemoteImage> image = this->getFieldValue(fieldImage);
|
|
49
51
|
static const auto fieldCardBackgroundColor = clazz->getField<JNitroColor>("cardBackgroundColor");
|
|
50
52
|
jni::local_ref<JNitroColor> cardBackgroundColor = this->getFieldValue(fieldCardBackgroundColor);
|
|
51
53
|
return NitroMessageManeuver(
|
|
@@ -62,14 +64,14 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
62
64
|
*/
|
|
63
65
|
[[maybe_unused]]
|
|
64
66
|
static jni::local_ref<JNitroMessageManeuver::javaobject> fromCpp(const NitroMessageManeuver& value) {
|
|
65
|
-
using JSignature = JNitroMessageManeuver(jni::alias_ref<jni::JString>, jni::alias_ref<jni::JString>, jni::alias_ref<
|
|
67
|
+
using JSignature = JNitroMessageManeuver(jni::alias_ref<jni::JString>, jni::alias_ref<jni::JString>, jni::alias_ref<JVariant_GlyphImage_AssetImage_RemoteImage>, jni::alias_ref<JNitroColor>);
|
|
66
68
|
static const auto clazz = javaClassStatic();
|
|
67
69
|
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
68
70
|
return create(
|
|
69
71
|
clazz,
|
|
70
72
|
jni::make_jstring(value.title),
|
|
71
73
|
value.text.has_value() ? jni::make_jstring(value.text.value()) : nullptr,
|
|
72
|
-
value.image.has_value() ?
|
|
74
|
+
value.image.has_value() ? JVariant_GlyphImage_AssetImage_RemoteImage::fromCpp(value.image.value()) : nullptr,
|
|
73
75
|
JNitroColor::fromCpp(value.cardBackgroundColor)
|
|
74
76
|
);
|
|
75
77
|
}
|
|
@@ -28,9 +28,11 @@
|
|
|
28
28
|
#include "JGlyphImage.hpp"
|
|
29
29
|
#include "JNavigationAlertAction.hpp"
|
|
30
30
|
#include "JNitroColor.hpp"
|
|
31
|
-
#include "
|
|
31
|
+
#include "JRemoteImage.hpp"
|
|
32
|
+
#include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
|
|
32
33
|
#include "NavigationAlertAction.hpp"
|
|
33
34
|
#include "NitroColor.hpp"
|
|
35
|
+
#include "RemoteImage.hpp"
|
|
34
36
|
#include <NitroModules/JNICallable.hpp>
|
|
35
37
|
#include <functional>
|
|
36
38
|
#include <optional>
|
|
@@ -62,8 +64,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
62
64
|
jni::local_ref<JAutoText> title = this->getFieldValue(fieldTitle);
|
|
63
65
|
static const auto fieldSubtitle = clazz->getField<JAutoText>("subtitle");
|
|
64
66
|
jni::local_ref<JAutoText> subtitle = this->getFieldValue(fieldSubtitle);
|
|
65
|
-
static const auto fieldImage = clazz->getField<
|
|
66
|
-
jni::local_ref<
|
|
67
|
+
static const auto fieldImage = clazz->getField<JVariant_GlyphImage_AssetImage_RemoteImage>("image");
|
|
68
|
+
jni::local_ref<JVariant_GlyphImage_AssetImage_RemoteImage> image = this->getFieldValue(fieldImage);
|
|
67
69
|
static const auto fieldPrimaryAction = clazz->getField<JNavigationAlertAction>("primaryAction");
|
|
68
70
|
jni::local_ref<JNavigationAlertAction> primaryAction = this->getFieldValue(fieldPrimaryAction);
|
|
69
71
|
static const auto fieldSecondaryAction = clazz->getField<JNavigationAlertAction>("secondaryAction");
|
|
@@ -112,7 +114,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
112
114
|
*/
|
|
113
115
|
[[maybe_unused]]
|
|
114
116
|
static jni::local_ref<JNitroNavigationAlert::javaobject> fromCpp(const NitroNavigationAlert& value) {
|
|
115
|
-
using JSignature = JNitroNavigationAlert(double, jni::alias_ref<JAutoText>, jni::alias_ref<JAutoText>, jni::alias_ref<
|
|
117
|
+
using JSignature = JNitroNavigationAlert(double, jni::alias_ref<JAutoText>, jni::alias_ref<JAutoText>, jni::alias_ref<JVariant_GlyphImage_AssetImage_RemoteImage>, jni::alias_ref<JNavigationAlertAction>, jni::alias_ref<JNavigationAlertAction>, double, jni::alias_ref<JFunc_void::javaobject>, jni::alias_ref<JFunc_void_AlertDismissalReason::javaobject>, double);
|
|
116
118
|
static const auto clazz = javaClassStatic();
|
|
117
119
|
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
118
120
|
return create(
|
|
@@ -120,7 +122,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
120
122
|
value.id,
|
|
121
123
|
JAutoText::fromCpp(value.title),
|
|
122
124
|
value.subtitle.has_value() ? JAutoText::fromCpp(value.subtitle.value()) : nullptr,
|
|
123
|
-
value.image.has_value() ?
|
|
125
|
+
value.image.has_value() ? JVariant_GlyphImage_AssetImage_RemoteImage::fromCpp(value.image.value()) : nullptr,
|
|
124
126
|
JNavigationAlertAction::fromCpp(value.primaryAction),
|
|
125
127
|
value.secondaryAction.has_value() ? JNavigationAlertAction::fromCpp(value.secondaryAction.value()) : nullptr,
|
|
126
128
|
value.durationMs,
|
|
@@ -37,10 +37,11 @@
|
|
|
37
37
|
#include "JOffRampType.hpp"
|
|
38
38
|
#include "JOnRampType.hpp"
|
|
39
39
|
#include "JPreferredImageLane.hpp"
|
|
40
|
+
#include "JRemoteImage.hpp"
|
|
40
41
|
#include "JTrafficSide.hpp"
|
|
41
42
|
#include "JTravelEstimates.hpp"
|
|
42
43
|
#include "JTurnType.hpp"
|
|
43
|
-
#include "
|
|
44
|
+
#include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
|
|
44
45
|
#include "JVariant_PreferredImageLane_ImageLane.hpp"
|
|
45
46
|
#include "KeepType.hpp"
|
|
46
47
|
#include "LaneGuidance.hpp"
|
|
@@ -51,6 +52,7 @@
|
|
|
51
52
|
#include "OffRampType.hpp"
|
|
52
53
|
#include "OnRampType.hpp"
|
|
53
54
|
#include "PreferredImageLane.hpp"
|
|
55
|
+
#include "RemoteImage.hpp"
|
|
54
56
|
#include "TrafficSide.hpp"
|
|
55
57
|
#include "TravelEstimates.hpp"
|
|
56
58
|
#include "TurnType.hpp"
|
|
@@ -84,8 +86,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
84
86
|
jni::local_ref<jni::JArrayClass<JNitroAttributedString>> attributedInstructionVariants = this->getFieldValue(fieldAttributedInstructionVariants);
|
|
85
87
|
static const auto fieldSymbolImage = clazz->getField<JNitroImage>("symbolImage");
|
|
86
88
|
jni::local_ref<JNitroImage> symbolImage = this->getFieldValue(fieldSymbolImage);
|
|
87
|
-
static const auto fieldJunctionImage = clazz->getField<
|
|
88
|
-
jni::local_ref<
|
|
89
|
+
static const auto fieldJunctionImage = clazz->getField<JVariant_GlyphImage_AssetImage_RemoteImage>("junctionImage");
|
|
90
|
+
jni::local_ref<JVariant_GlyphImage_AssetImage_RemoteImage> junctionImage = this->getFieldValue(fieldJunctionImage);
|
|
89
91
|
static const auto fieldTurnType = clazz->getField<JTurnType>("turnType");
|
|
90
92
|
jni::local_ref<JTurnType> turnType = this->getFieldValue(fieldTurnType);
|
|
91
93
|
static const auto fieldAngle = clazz->getField<jni::JDouble>("angle");
|
|
@@ -170,7 +172,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
170
172
|
*/
|
|
171
173
|
[[maybe_unused]]
|
|
172
174
|
static jni::local_ref<JNitroRoutingManeuver::javaobject> fromCpp(const NitroRoutingManeuver& value) {
|
|
173
|
-
using JSignature = JNitroRoutingManeuver(jni::alias_ref<jni::JArrayClass<JNitroAttributedString>>, jni::alias_ref<JNitroImage>, jni::alias_ref<
|
|
175
|
+
using JSignature = JNitroRoutingManeuver(jni::alias_ref<jni::JArrayClass<JNitroAttributedString>>, jni::alias_ref<JNitroImage>, jni::alias_ref<JVariant_GlyphImage_AssetImage_RemoteImage>, jni::alias_ref<JTurnType>, jni::alias_ref<jni::JDouble>, jni::alias_ref<jni::JArrayDouble>, jni::alias_ref<jni::JDouble>, jni::alias_ref<JOffRampType>, jni::alias_ref<JOnRampType>, jni::alias_ref<JForkType>, jni::alias_ref<JKeepType>, jni::alias_ref<JLaneGuidance>, jni::alias_ref<JNitroColor>, jni::alias_ref<jni::JString>, jni::alias_ref<JTravelEstimates>, jni::alias_ref<JTrafficSide>, jni::alias_ref<JManeuverType>, jni::alias_ref<jni::JArrayClass<jni::JString>>, jni::alias_ref<jni::JString>);
|
|
174
176
|
static const auto clazz = javaClassStatic();
|
|
175
177
|
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
176
178
|
return create(
|
|
@@ -186,7 +188,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
186
188
|
return __array;
|
|
187
189
|
}(),
|
|
188
190
|
JNitroImage::fromCpp(value.symbolImage),
|
|
189
|
-
value.junctionImage.has_value() ?
|
|
191
|
+
value.junctionImage.has_value() ? JVariant_GlyphImage_AssetImage_RemoteImage::fromCpp(value.junctionImage.value()) : nullptr,
|
|
190
192
|
value.turnType.has_value() ? JTurnType::fromCpp(value.turnType.value()) : nullptr,
|
|
191
193
|
value.angle.has_value() ? jni::JDouble::valueOf(value.angle.value()) : nullptr,
|
|
192
194
|
value.elementAngles.has_value() ? [&]() {
|
|
@@ -22,8 +22,10 @@
|
|
|
22
22
|
#include "JFunc_void_std__optional_bool_.hpp"
|
|
23
23
|
#include "JGlyphImage.hpp"
|
|
24
24
|
#include "JNitroColor.hpp"
|
|
25
|
-
#include "
|
|
25
|
+
#include "JRemoteImage.hpp"
|
|
26
|
+
#include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
|
|
26
27
|
#include "NitroColor.hpp"
|
|
28
|
+
#include "RemoteImage.hpp"
|
|
27
29
|
#include <NitroModules/JNICallable.hpp>
|
|
28
30
|
#include <functional>
|
|
29
31
|
#include <optional>
|
|
@@ -57,8 +59,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
57
59
|
jni::local_ref<jni::JBoolean> browsable = this->getFieldValue(fieldBrowsable);
|
|
58
60
|
static const auto fieldEnabled = clazz->getField<jboolean>("enabled");
|
|
59
61
|
jboolean enabled = this->getFieldValue(fieldEnabled);
|
|
60
|
-
static const auto fieldImage = clazz->getField<
|
|
61
|
-
jni::local_ref<
|
|
62
|
+
static const auto fieldImage = clazz->getField<JVariant_GlyphImage_AssetImage_RemoteImage>("image");
|
|
63
|
+
jni::local_ref<JVariant_GlyphImage_AssetImage_RemoteImage> image = this->getFieldValue(fieldImage);
|
|
62
64
|
static const auto fieldChecked = clazz->getField<jni::JBoolean>("checked");
|
|
63
65
|
jni::local_ref<jni::JBoolean> checked = this->getFieldValue(fieldChecked);
|
|
64
66
|
static const auto fieldOnPress = clazz->getField<JFunc_void_std__optional_bool_::javaobject>("onPress");
|
|
@@ -91,7 +93,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
91
93
|
*/
|
|
92
94
|
[[maybe_unused]]
|
|
93
95
|
static jni::local_ref<JNitroRow::javaobject> fromCpp(const NitroRow& value) {
|
|
94
|
-
using JSignature = JNitroRow(jni::alias_ref<JAutoText>, jni::alias_ref<JAutoText>, jni::alias_ref<jni::JBoolean>, jboolean, jni::alias_ref<
|
|
96
|
+
using JSignature = JNitroRow(jni::alias_ref<JAutoText>, jni::alias_ref<JAutoText>, jni::alias_ref<jni::JBoolean>, jboolean, jni::alias_ref<JVariant_GlyphImage_AssetImage_RemoteImage>, jni::alias_ref<jni::JBoolean>, jni::alias_ref<JFunc_void_std__optional_bool_::javaobject>, jni::alias_ref<jni::JBoolean>);
|
|
95
97
|
static const auto clazz = javaClassStatic();
|
|
96
98
|
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
97
99
|
return create(
|
|
@@ -100,7 +102,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
100
102
|
value.detailedText.has_value() ? JAutoText::fromCpp(value.detailedText.value()) : nullptr,
|
|
101
103
|
value.browsable.has_value() ? jni::JBoolean::valueOf(value.browsable.value()) : nullptr,
|
|
102
104
|
value.enabled,
|
|
103
|
-
value.image.has_value() ?
|
|
105
|
+
value.image.has_value() ? JVariant_GlyphImage_AssetImage_RemoteImage::fromCpp(value.image.value()) : nullptr,
|
|
104
106
|
value.checked.has_value() ? jni::JBoolean::valueOf(value.checked.value()) : nullptr,
|
|
105
107
|
value.onPress.has_value() ? JFunc_void_std__optional_bool__cxx::fromCpp(value.onPress.value()) : nullptr,
|
|
106
108
|
value.selected.has_value() ? jni::JBoolean::valueOf(value.selected.value()) : nullptr
|
|
@@ -24,10 +24,12 @@
|
|
|
24
24
|
#include "JNitroColor.hpp"
|
|
25
25
|
#include "JNitroRow.hpp"
|
|
26
26
|
#include "JNitroSectionType.hpp"
|
|
27
|
-
#include "
|
|
27
|
+
#include "JRemoteImage.hpp"
|
|
28
|
+
#include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
|
|
28
29
|
#include "NitroColor.hpp"
|
|
29
30
|
#include "NitroRow.hpp"
|
|
30
31
|
#include "NitroSectionType.hpp"
|
|
32
|
+
#include "RemoteImage.hpp"
|
|
31
33
|
#include <NitroModules/JNICallable.hpp>
|
|
32
34
|
#include <functional>
|
|
33
35
|
#include <optional>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRemoteImage.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "RemoteImage.hpp"
|
|
12
|
+
|
|
13
|
+
#include "JNitroColor.hpp"
|
|
14
|
+
#include "NitroColor.hpp"
|
|
15
|
+
#include <optional>
|
|
16
|
+
#include <string>
|
|
17
|
+
|
|
18
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
19
|
+
|
|
20
|
+
using namespace facebook;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The C++ JNI bridge between the C++ struct "RemoteImage" and the the Kotlin data class "RemoteImage".
|
|
24
|
+
*/
|
|
25
|
+
struct JRemoteImage final: public jni::JavaClass<JRemoteImage> {
|
|
26
|
+
public:
|
|
27
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/swe/iternio/reactnativeautoplay/RemoteImage;";
|
|
28
|
+
|
|
29
|
+
public:
|
|
30
|
+
/**
|
|
31
|
+
* Convert this Java/Kotlin-based struct to the C++ struct RemoteImage by copying all values to C++.
|
|
32
|
+
*/
|
|
33
|
+
[[maybe_unused]]
|
|
34
|
+
[[nodiscard]]
|
|
35
|
+
RemoteImage toCpp() const {
|
|
36
|
+
static const auto clazz = javaClassStatic();
|
|
37
|
+
static const auto fieldUri = clazz->getField<jni::JString>("uri");
|
|
38
|
+
jni::local_ref<jni::JString> uri = this->getFieldValue(fieldUri);
|
|
39
|
+
static const auto fieldColor = clazz->getField<JNitroColor>("color");
|
|
40
|
+
jni::local_ref<JNitroColor> color = this->getFieldValue(fieldColor);
|
|
41
|
+
static const auto fieldTimeoutMs = clazz->getField<jni::JDouble>("timeoutMs");
|
|
42
|
+
jni::local_ref<jni::JDouble> timeoutMs = this->getFieldValue(fieldTimeoutMs);
|
|
43
|
+
return RemoteImage(
|
|
44
|
+
uri->toStdString(),
|
|
45
|
+
color != nullptr ? std::make_optional(color->toCpp()) : std::nullopt,
|
|
46
|
+
timeoutMs != nullptr ? std::make_optional(timeoutMs->value()) : std::nullopt
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
public:
|
|
51
|
+
/**
|
|
52
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
53
|
+
*/
|
|
54
|
+
[[maybe_unused]]
|
|
55
|
+
static jni::local_ref<JRemoteImage::javaobject> fromCpp(const RemoteImage& value) {
|
|
56
|
+
using JSignature = JRemoteImage(jni::alias_ref<jni::JString>, jni::alias_ref<JNitroColor>, jni::alias_ref<jni::JDouble>);
|
|
57
|
+
static const auto clazz = javaClassStatic();
|
|
58
|
+
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
59
|
+
return create(
|
|
60
|
+
clazz,
|
|
61
|
+
jni::make_jstring(value.uri),
|
|
62
|
+
value.color.has_value() ? JNitroColor::fromCpp(value.color.value()) : nullptr,
|
|
63
|
+
value.timeoutMs.has_value() ? jni::JDouble::valueOf(value.timeoutMs.value()) : nullptr
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
} // namespace margelo::nitro::swe::iternio::reactnativeautoplay
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
#include "JNitroRow.hpp"
|
|
32
32
|
#include "JNitroSection.hpp"
|
|
33
33
|
#include "JNitroSectionType.hpp"
|
|
34
|
-
#include "
|
|
34
|
+
#include "JRemoteImage.hpp"
|
|
35
|
+
#include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
|
|
35
36
|
#include "NitroAction.hpp"
|
|
36
37
|
#include "NitroActionType.hpp"
|
|
37
38
|
#include "NitroAlignment.hpp"
|
|
@@ -40,6 +41,7 @@
|
|
|
40
41
|
#include "NitroRow.hpp"
|
|
41
42
|
#include "NitroSection.hpp"
|
|
42
43
|
#include "NitroSectionType.hpp"
|
|
44
|
+
#include "RemoteImage.hpp"
|
|
43
45
|
#include <NitroModules/JNICallable.hpp>
|
|
44
46
|
#include <functional>
|
|
45
47
|
#include <optional>
|
|
@@ -32,9 +32,10 @@
|
|
|
32
32
|
#include "JNitroColor.hpp"
|
|
33
33
|
#include "JPinSignIn.hpp"
|
|
34
34
|
#include "JQrSignIn.hpp"
|
|
35
|
+
#include "JRemoteImage.hpp"
|
|
35
36
|
#include "JSignInMethods.hpp"
|
|
36
37
|
#include "JTextInputType.hpp"
|
|
37
|
-
#include "
|
|
38
|
+
#include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
|
|
38
39
|
#include "JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn.hpp"
|
|
39
40
|
#include "KeyboardType.hpp"
|
|
40
41
|
#include "NitroAction.hpp"
|
|
@@ -44,6 +45,7 @@
|
|
|
44
45
|
#include "NitroColor.hpp"
|
|
45
46
|
#include "PinSignIn.hpp"
|
|
46
47
|
#include "QrSignIn.hpp"
|
|
48
|
+
#include "RemoteImage.hpp"
|
|
47
49
|
#include "SignInMethods.hpp"
|
|
48
50
|
#include "TextInputType.hpp"
|
|
49
51
|
#include <NitroModules/JNICallable.hpp>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JVariant_GlyphImage_AssetImage_RemoteImage.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
11
|
+
/**
|
|
12
|
+
* Converts JVariant_GlyphImage_AssetImage_RemoteImage to std::variant<GlyphImage, AssetImage, RemoteImage>
|
|
13
|
+
*/
|
|
14
|
+
std::variant<GlyphImage, AssetImage, RemoteImage> JVariant_GlyphImage_AssetImage_RemoteImage::toCpp() const {
|
|
15
|
+
if (isInstanceOf(JVariant_GlyphImage_AssetImage_RemoteImage_impl::First::javaClassStatic())) {
|
|
16
|
+
// It's a `GlyphImage`
|
|
17
|
+
auto jniValue = static_cast<const JVariant_GlyphImage_AssetImage_RemoteImage_impl::First*>(this)->getValue();
|
|
18
|
+
return jniValue->toCpp();
|
|
19
|
+
} else if (isInstanceOf(JVariant_GlyphImage_AssetImage_RemoteImage_impl::Second::javaClassStatic())) {
|
|
20
|
+
// It's a `AssetImage`
|
|
21
|
+
auto jniValue = static_cast<const JVariant_GlyphImage_AssetImage_RemoteImage_impl::Second*>(this)->getValue();
|
|
22
|
+
return jniValue->toCpp();
|
|
23
|
+
} else if (isInstanceOf(JVariant_GlyphImage_AssetImage_RemoteImage_impl::Third::javaClassStatic())) {
|
|
24
|
+
// It's a `RemoteImage`
|
|
25
|
+
auto jniValue = static_cast<const JVariant_GlyphImage_AssetImage_RemoteImage_impl::Third*>(this)->getValue();
|
|
26
|
+
return jniValue->toCpp();
|
|
27
|
+
}
|
|
28
|
+
throw std::invalid_argument("Variant is unknown Kotlin instance!");
|
|
29
|
+
}
|
|
30
|
+
} // namespace margelo::nitro::swe::iternio::reactnativeautoplay
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JVariant_GlyphImage_AssetImage_RemoteImage.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <variant>
|
|
12
|
+
|
|
13
|
+
#include "GlyphImage.hpp"
|
|
14
|
+
#include "AssetImage.hpp"
|
|
15
|
+
#include "RemoteImage.hpp"
|
|
16
|
+
#include <variant>
|
|
17
|
+
#include "JGlyphImage.hpp"
|
|
18
|
+
#include "NitroColor.hpp"
|
|
19
|
+
#include "JNitroColor.hpp"
|
|
20
|
+
#include <optional>
|
|
21
|
+
#include "JAssetImage.hpp"
|
|
22
|
+
#include <string>
|
|
23
|
+
#include "JRemoteImage.hpp"
|
|
24
|
+
|
|
25
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
26
|
+
|
|
27
|
+
using namespace facebook;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The C++ JNI bridge between the C++ std::variant and the Java class "Variant_GlyphImage_AssetImage_RemoteImage".
|
|
31
|
+
*/
|
|
32
|
+
class JVariant_GlyphImage_AssetImage_RemoteImage: public jni::JavaClass<JVariant_GlyphImage_AssetImage_RemoteImage> {
|
|
33
|
+
public:
|
|
34
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/swe/iternio/reactnativeautoplay/Variant_GlyphImage_AssetImage_RemoteImage;";
|
|
35
|
+
|
|
36
|
+
static jni::local_ref<JVariant_GlyphImage_AssetImage_RemoteImage> create_0(jni::alias_ref<JGlyphImage> value) {
|
|
37
|
+
static const auto method = javaClassStatic()->getStaticMethod<JVariant_GlyphImage_AssetImage_RemoteImage(jni::alias_ref<JGlyphImage>)>("create");
|
|
38
|
+
return method(javaClassStatic(), value);
|
|
39
|
+
}
|
|
40
|
+
static jni::local_ref<JVariant_GlyphImage_AssetImage_RemoteImage> create_1(jni::alias_ref<JAssetImage> value) {
|
|
41
|
+
static const auto method = javaClassStatic()->getStaticMethod<JVariant_GlyphImage_AssetImage_RemoteImage(jni::alias_ref<JAssetImage>)>("create");
|
|
42
|
+
return method(javaClassStatic(), value);
|
|
43
|
+
}
|
|
44
|
+
static jni::local_ref<JVariant_GlyphImage_AssetImage_RemoteImage> create_2(jni::alias_ref<JRemoteImage> value) {
|
|
45
|
+
static const auto method = javaClassStatic()->getStaticMethod<JVariant_GlyphImage_AssetImage_RemoteImage(jni::alias_ref<JRemoteImage>)>("create");
|
|
46
|
+
return method(javaClassStatic(), value);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
static jni::local_ref<JVariant_GlyphImage_AssetImage_RemoteImage> fromCpp(const std::variant<GlyphImage, AssetImage, RemoteImage>& variant) {
|
|
50
|
+
switch (variant.index()) {
|
|
51
|
+
case 0: return create_0(JGlyphImage::fromCpp(std::get<0>(variant)));
|
|
52
|
+
case 1: return create_1(JAssetImage::fromCpp(std::get<1>(variant)));
|
|
53
|
+
case 2: return create_2(JRemoteImage::fromCpp(std::get<2>(variant)));
|
|
54
|
+
default: throw std::invalid_argument("Variant holds unknown index! (" + std::to_string(variant.index()) + ")");
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
[[nodiscard]] std::variant<GlyphImage, AssetImage, RemoteImage> toCpp() const;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
namespace JVariant_GlyphImage_AssetImage_RemoteImage_impl {
|
|
62
|
+
class First final: public jni::JavaClass<First, JVariant_GlyphImage_AssetImage_RemoteImage> {
|
|
63
|
+
public:
|
|
64
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/swe/iternio/reactnativeautoplay/Variant_GlyphImage_AssetImage_RemoteImage$First;";
|
|
65
|
+
|
|
66
|
+
[[nodiscard]] jni::local_ref<JGlyphImage> getValue() const {
|
|
67
|
+
static const auto field = javaClassStatic()->getField<JGlyphImage>("value");
|
|
68
|
+
return getFieldValue(field);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
class Second final: public jni::JavaClass<Second, JVariant_GlyphImage_AssetImage_RemoteImage> {
|
|
73
|
+
public:
|
|
74
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/swe/iternio/reactnativeautoplay/Variant_GlyphImage_AssetImage_RemoteImage$Second;";
|
|
75
|
+
|
|
76
|
+
[[nodiscard]] jni::local_ref<JAssetImage> getValue() const {
|
|
77
|
+
static const auto field = javaClassStatic()->getField<JAssetImage>("value");
|
|
78
|
+
return getFieldValue(field);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
class Third final: public jni::JavaClass<Third, JVariant_GlyphImage_AssetImage_RemoteImage> {
|
|
83
|
+
public:
|
|
84
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/swe/iternio/reactnativeautoplay/Variant_GlyphImage_AssetImage_RemoteImage$Third;";
|
|
85
|
+
|
|
86
|
+
[[nodiscard]] jni::local_ref<JRemoteImage> getValue() const {
|
|
87
|
+
static const auto field = javaClassStatic()->getField<JRemoteImage>("value");
|
|
88
|
+
return getFieldValue(field);
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
} // namespace JVariant_GlyphImage_AssetImage_RemoteImage_impl
|
|
92
|
+
} // namespace margelo::nitro::swe::iternio::reactnativeautoplay
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
#include "JPreferredImageLane.hpp"
|
|
17
17
|
#include "GlyphImage.hpp"
|
|
18
18
|
#include "AssetImage.hpp"
|
|
19
|
+
#include "RemoteImage.hpp"
|
|
19
20
|
#include "JNitroImage.hpp"
|
|
20
21
|
#include "JGlyphImage.hpp"
|
|
21
22
|
#include "NitroColor.hpp"
|
|
@@ -23,6 +24,7 @@
|
|
|
23
24
|
#include <optional>
|
|
24
25
|
#include "JAssetImage.hpp"
|
|
25
26
|
#include <string>
|
|
27
|
+
#include "JRemoteImage.hpp"
|
|
26
28
|
#include <vector>
|
|
27
29
|
#include "JImageLane.hpp"
|
|
28
30
|
|
|
@@ -11,6 +11,7 @@ import androidx.annotation.Keep
|
|
|
11
11
|
import com.facebook.jni.HybridData
|
|
12
12
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
13
13
|
import com.margelo.nitro.core.Promise
|
|
14
|
+
import com.margelo.nitro.core.ArrayBuffer
|
|
14
15
|
import com.margelo.nitro.core.HybridObject
|
|
15
16
|
|
|
16
17
|
/**
|
|
@@ -56,6 +57,22 @@ abstract class HybridAutoPlaySpec: HybridObject() {
|
|
|
56
57
|
return Func_void_java(__result)
|
|
57
58
|
}
|
|
58
59
|
|
|
60
|
+
@DoNotStrip
|
|
61
|
+
@Keep
|
|
62
|
+
abstract fun hasVoiceInputPermission(): Boolean
|
|
63
|
+
|
|
64
|
+
@DoNotStrip
|
|
65
|
+
@Keep
|
|
66
|
+
abstract fun requestVoiceInputPermission(): Promise<Boolean>
|
|
67
|
+
|
|
68
|
+
@DoNotStrip
|
|
69
|
+
@Keep
|
|
70
|
+
abstract fun startVoiceInput(silenceThresholdMs: Double?, maxDurationMs: Double?, listeningText: String?): Promise<ArrayBuffer>
|
|
71
|
+
|
|
72
|
+
@DoNotStrip
|
|
73
|
+
@Keep
|
|
74
|
+
abstract fun stopVoiceInput(): Unit
|
|
75
|
+
|
|
59
76
|
@DoNotStrip
|
|
60
77
|
@Keep
|
|
61
78
|
abstract fun setRootTemplate(templateId: String): Promise<Unit>
|
|
@@ -52,7 +52,7 @@ data class MessageTemplateConfig(
|
|
|
52
52
|
val actions: Array<NitroAction>?,
|
|
53
53
|
@DoNotStrip
|
|
54
54
|
@Keep
|
|
55
|
-
val image:
|
|
55
|
+
val image: Variant_GlyphImage_AssetImage_RemoteImage?,
|
|
56
56
|
@DoNotStrip
|
|
57
57
|
@Keep
|
|
58
58
|
val mapConfig: NitroBaseMapTemplateConfig?
|
|
@@ -60,7 +60,7 @@ data class MessageTemplateConfig(
|
|
|
60
60
|
/**
|
|
61
61
|
* Create a new instance of MessageTemplateConfig from Kotlin
|
|
62
62
|
*/
|
|
63
|
-
constructor(id: String, onWillAppear: ((animated: Boolean?) -> Unit)?, onWillDisappear: ((animated: Boolean?) -> Unit)?, onDidAppear: ((animated: Boolean?) -> Unit)?, onDidDisappear: ((animated: Boolean?) -> Unit)?, onPopped: (() -> Unit)?, autoDismissMs: Double?, headerActions: Array<NitroAction>?, title: AutoText?, message: AutoText, actions: Array<NitroAction>?, image:
|
|
63
|
+
constructor(id: String, onWillAppear: ((animated: Boolean?) -> Unit)?, onWillDisappear: ((animated: Boolean?) -> Unit)?, onDidAppear: ((animated: Boolean?) -> Unit)?, onDidDisappear: ((animated: Boolean?) -> Unit)?, onPopped: (() -> Unit)?, autoDismissMs: Double?, headerActions: Array<NitroAction>?, title: AutoText?, message: AutoText, actions: Array<NitroAction>?, image: Variant_GlyphImage_AssetImage_RemoteImage?, mapConfig: NitroBaseMapTemplateConfig?):
|
|
64
64
|
this(id, onWillAppear?.let { Func_void_std__optional_bool__java(it) }, onWillDisappear?.let { Func_void_std__optional_bool__java(it) }, onDidAppear?.let { Func_void_std__optional_bool__java(it) }, onDidDisappear?.let { Func_void_std__optional_bool__java(it) }, onPopped?.let { Func_void_java(it) }, autoDismissMs, headerActions, title, message, actions, image, mapConfig)
|
|
65
65
|
|
|
66
66
|
companion object {
|
|
@@ -71,7 +71,7 @@ data class MessageTemplateConfig(
|
|
|
71
71
|
@Keep
|
|
72
72
|
@Suppress("unused")
|
|
73
73
|
@JvmStatic
|
|
74
|
-
private fun fromCpp(id: String, onWillAppear: Func_void_std__optional_bool_?, onWillDisappear: Func_void_std__optional_bool_?, onDidAppear: Func_void_std__optional_bool_?, onDidDisappear: Func_void_std__optional_bool_?, onPopped: Func_void?, autoDismissMs: Double?, headerActions: Array<NitroAction>?, title: AutoText?, message: AutoText, actions: Array<NitroAction>?, image:
|
|
74
|
+
private fun fromCpp(id: String, onWillAppear: Func_void_std__optional_bool_?, onWillDisappear: Func_void_std__optional_bool_?, onDidAppear: Func_void_std__optional_bool_?, onDidDisappear: Func_void_std__optional_bool_?, onPopped: Func_void?, autoDismissMs: Double?, headerActions: Array<NitroAction>?, title: AutoText?, message: AutoText, actions: Array<NitroAction>?, image: Variant_GlyphImage_AssetImage_RemoteImage?, mapConfig: NitroBaseMapTemplateConfig?): MessageTemplateConfig {
|
|
75
75
|
return MessageTemplateConfig(id, onWillAppear, onWillDisappear, onDidAppear, onDidDisappear, onPopped, autoDismissMs, headerActions, title, message, actions, image, mapConfig)
|
|
76
76
|
}
|
|
77
77
|
}
|
|
@@ -22,7 +22,7 @@ data class NitroAction(
|
|
|
22
22
|
val title: String?,
|
|
23
23
|
@DoNotStrip
|
|
24
24
|
@Keep
|
|
25
|
-
val image:
|
|
25
|
+
val image: Variant_GlyphImage_AssetImage_RemoteImage?,
|
|
26
26
|
@DoNotStrip
|
|
27
27
|
@Keep
|
|
28
28
|
val enabled: Boolean?,
|
|
@@ -45,7 +45,7 @@ data class NitroAction(
|
|
|
45
45
|
/**
|
|
46
46
|
* Create a new instance of NitroAction from Kotlin
|
|
47
47
|
*/
|
|
48
|
-
constructor(title: String?, image:
|
|
48
|
+
constructor(title: String?, image: Variant_GlyphImage_AssetImage_RemoteImage?, enabled: Boolean?, onPress: () -> Unit, type: NitroActionType, alignment: NitroAlignment?, flags: Double?, style: NitroButtonStyle?):
|
|
49
49
|
this(title, image, enabled, Func_void_java(onPress), type, alignment, flags, style)
|
|
50
50
|
|
|
51
51
|
companion object {
|
|
@@ -56,7 +56,7 @@ data class NitroAction(
|
|
|
56
56
|
@Keep
|
|
57
57
|
@Suppress("unused")
|
|
58
58
|
@JvmStatic
|
|
59
|
-
private fun fromCpp(title: String?, image:
|
|
59
|
+
private fun fromCpp(title: String?, image: Variant_GlyphImage_AssetImage_RemoteImage?, enabled: Boolean?, onPress: Func_void, type: NitroActionType, alignment: NitroAlignment?, flags: Double?, style: NitroButtonStyle?): NitroAction {
|
|
60
60
|
return NitroAction(title, image, enabled, onPress, type, alignment, flags, style)
|
|
61
61
|
}
|
|
62
62
|
}
|
|
@@ -11,7 +11,7 @@ import com.facebook.proguard.annotations.DoNotStrip
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Represents the TypeScript variant "GlyphImage | AssetImage".
|
|
14
|
+
* Represents the TypeScript variant "GlyphImage | AssetImage | RemoteImage".
|
|
15
15
|
*/
|
|
16
16
|
@Suppress("ClassName")
|
|
17
17
|
@DoNotStrip
|
|
@@ -20,11 +20,15 @@ sealed class NitroImage {
|
|
|
20
20
|
data class First(@DoNotStrip val value: GlyphImage): NitroImage()
|
|
21
21
|
@DoNotStrip
|
|
22
22
|
data class Second(@DoNotStrip val value: AssetImage): NitroImage()
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
data class Third(@DoNotStrip val value: RemoteImage): NitroImage()
|
|
23
25
|
|
|
24
26
|
val isFirst: Boolean
|
|
25
27
|
get() = this is First
|
|
26
28
|
val isSecond: Boolean
|
|
27
29
|
get() = this is Second
|
|
30
|
+
val isThird: Boolean
|
|
31
|
+
get() = this is Third
|
|
28
32
|
|
|
29
33
|
fun asFirstOrNull(): GlyphImage? {
|
|
30
34
|
val value = (this as? First)?.value ?: return null
|
|
@@ -34,11 +38,16 @@ sealed class NitroImage {
|
|
|
34
38
|
val value = (this as? Second)?.value ?: return null
|
|
35
39
|
return value
|
|
36
40
|
}
|
|
41
|
+
fun asThirdOrNull(): RemoteImage? {
|
|
42
|
+
val value = (this as? Third)?.value ?: return null
|
|
43
|
+
return value
|
|
44
|
+
}
|
|
37
45
|
|
|
38
|
-
inline fun <R> match(first: (GlyphImage) -> R, second: (AssetImage) -> R): R {
|
|
46
|
+
inline fun <R> match(first: (GlyphImage) -> R, second: (AssetImage) -> R, third: (RemoteImage) -> R): R {
|
|
39
47
|
return when (this) {
|
|
40
48
|
is First -> first(value)
|
|
41
49
|
is Second -> second(value)
|
|
50
|
+
is Third -> third(value)
|
|
42
51
|
}
|
|
43
52
|
}
|
|
44
53
|
|
|
@@ -49,5 +58,8 @@ sealed class NitroImage {
|
|
|
49
58
|
@JvmStatic
|
|
50
59
|
@DoNotStrip
|
|
51
60
|
fun create(value: AssetImage): NitroImage = Second(value)
|
|
61
|
+
@JvmStatic
|
|
62
|
+
@DoNotStrip
|
|
63
|
+
fun create(value: RemoteImage): NitroImage = Third(value)
|
|
52
64
|
}
|
|
53
65
|
}
|
|
@@ -25,7 +25,7 @@ data class NitroMessageManeuver(
|
|
|
25
25
|
val text: String?,
|
|
26
26
|
@DoNotStrip
|
|
27
27
|
@Keep
|
|
28
|
-
val image:
|
|
28
|
+
val image: Variant_GlyphImage_AssetImage_RemoteImage?,
|
|
29
29
|
@DoNotStrip
|
|
30
30
|
@Keep
|
|
31
31
|
val cardBackgroundColor: NitroColor
|
|
@@ -40,7 +40,7 @@ data class NitroMessageManeuver(
|
|
|
40
40
|
@Keep
|
|
41
41
|
@Suppress("unused")
|
|
42
42
|
@JvmStatic
|
|
43
|
-
private fun fromCpp(title: String, text: String?, image:
|
|
43
|
+
private fun fromCpp(title: String, text: String?, image: Variant_GlyphImage_AssetImage_RemoteImage?, cardBackgroundColor: NitroColor): NitroMessageManeuver {
|
|
44
44
|
return NitroMessageManeuver(title, text, image, cardBackgroundColor)
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -28,7 +28,7 @@ data class NitroNavigationAlert(
|
|
|
28
28
|
val subtitle: AutoText?,
|
|
29
29
|
@DoNotStrip
|
|
30
30
|
@Keep
|
|
31
|
-
val image:
|
|
31
|
+
val image: Variant_GlyphImage_AssetImage_RemoteImage?,
|
|
32
32
|
@DoNotStrip
|
|
33
33
|
@Keep
|
|
34
34
|
val primaryAction: NavigationAlertAction,
|
|
@@ -51,7 +51,7 @@ data class NitroNavigationAlert(
|
|
|
51
51
|
/**
|
|
52
52
|
* Create a new instance of NitroNavigationAlert from Kotlin
|
|
53
53
|
*/
|
|
54
|
-
constructor(id: Double, title: AutoText, subtitle: AutoText?, image:
|
|
54
|
+
constructor(id: Double, title: AutoText, subtitle: AutoText?, image: Variant_GlyphImage_AssetImage_RemoteImage?, primaryAction: NavigationAlertAction, secondaryAction: NavigationAlertAction?, durationMs: Double, onWillShow: (() -> Unit)?, onDidDismiss: ((reason: AlertDismissalReason) -> Unit)?, priority: Double):
|
|
55
55
|
this(id, title, subtitle, image, primaryAction, secondaryAction, durationMs, onWillShow?.let { Func_void_java(it) }, onDidDismiss?.let { Func_void_AlertDismissalReason_java(it) }, priority)
|
|
56
56
|
|
|
57
57
|
companion object {
|
|
@@ -62,7 +62,7 @@ data class NitroNavigationAlert(
|
|
|
62
62
|
@Keep
|
|
63
63
|
@Suppress("unused")
|
|
64
64
|
@JvmStatic
|
|
65
|
-
private fun fromCpp(id: Double, title: AutoText, subtitle: AutoText?, image:
|
|
65
|
+
private fun fromCpp(id: Double, title: AutoText, subtitle: AutoText?, image: Variant_GlyphImage_AssetImage_RemoteImage?, primaryAction: NavigationAlertAction, secondaryAction: NavigationAlertAction?, durationMs: Double, onWillShow: Func_void?, onDidDismiss: Func_void_AlertDismissalReason?, priority: Double): NitroNavigationAlert {
|
|
66
66
|
return NitroNavigationAlert(id, title, subtitle, image, primaryAction, secondaryAction, durationMs, onWillShow, onDidDismiss, priority)
|
|
67
67
|
}
|
|
68
68
|
}
|