@iternio/react-native-auto-play 0.5.14-beta.1 → 0.6.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/README.md +214 -29
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/AndroidAutoSession.kt +5 -0
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridMapTemplate.kt +9 -2
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/NativeBackdrop.kt +40 -0
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/VirtualRenderer.kt +52 -0
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/template/GridTemplate.kt +47 -13
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/template/Parser.kt +21 -2
- package/ios/Types.swift +3 -0
- package/ios/extensions/UIImage+Toggle.swift +5 -2
- package/ios/hybrid/HybridAutoPlay.swift +28 -16
- package/ios/hybrid/HybridMapTemplate.swift +22 -5
- package/ios/scenes/AutoPlayInterfaceController.swift +261 -72
- package/ios/templates/AutoPlayMapPanelDelegate.swift +190 -0
- package/ios/templates/AutoPlayTemplate.swift +24 -2
- package/ios/templates/GridTemplate.swift +57 -57
- package/ios/templates/InformationTemplate.swift +84 -9
- package/ios/templates/ListTemplate.swift +66 -11
- package/ios/templates/MapTemplate.swift +83 -68
- package/ios/templates/MessageTemplate.swift +72 -6
- package/ios/templates/Parser.swift +564 -69
- package/ios/templates/SearchTemplate.swift +1 -1
- package/ios/templates/TemplateStore.swift +5 -15
- package/ios/utils/SymbolFont.swift +13 -28
- package/lib/Constants.d.ts +4 -0
- package/lib/Constants.js +6 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/specs/MapTemplate.nitro.d.ts +3 -1
- package/lib/templates/GridTemplate.d.ts +23 -3
- package/lib/templates/GridTemplate.js +8 -0
- package/lib/templates/InformationTemplate.d.ts +38 -12
- package/lib/templates/ListTemplate.d.ts +16 -47
- package/lib/templates/MapTemplate.d.ts +26 -2
- package/lib/templates/MapTemplate.js +16 -2
- package/lib/templates/MessageTemplate.d.ts +52 -11
- package/lib/templates/MessageTemplate.js +1 -1
- package/lib/utils/NitroOptionsPanel.d.ts +103 -0
- package/lib/utils/NitroOptionsPanel.js +63 -0
- package/lib/utils/NitroSection.d.ts +89 -2
- package/lib/utils/NitroSection.js +49 -2
- package/nitrogen/generated/android/ReactNativeAutoPlay+autolinking.cmake +1 -0
- package/nitrogen/generated/android/c++/JChargingConnector.hpp +79 -0
- package/nitrogen/generated/android/c++/JGridImageSize.hpp +64 -0
- package/nitrogen/generated/android/c++/JGridTemplateConfig.hpp +7 -1
- package/nitrogen/generated/android/c++/JHybridGridTemplateSpec.cpp +4 -0
- package/nitrogen/generated/android/c++/JHybridInformationTemplateSpec.cpp +12 -0
- package/nitrogen/generated/android/c++/JHybridListTemplateSpec.cpp +12 -0
- package/nitrogen/generated/android/c++/JHybridMapTemplateSpec.cpp +78 -3
- package/nitrogen/generated/android/c++/JHybridMapTemplateSpec.hpp +2 -1
- package/nitrogen/generated/android/c++/JHybridSearchTemplateSpec.cpp +12 -0
- package/nitrogen/generated/android/c++/JInformationTemplateConfig.hpp +6 -0
- package/nitrogen/generated/android/c++/JListImageType.hpp +67 -0
- package/nitrogen/generated/android/c++/JListTemplateConfig.hpp +6 -0
- package/nitrogen/generated/android/c++/JNitroChargerLocation.hpp +115 -0
- package/nitrogen/generated/android/c++/JNitroChargerOutlet.hpp +82 -0
- package/nitrogen/generated/android/c++/JNitroOptionsPanelChargerSection.hpp +112 -0
- package/nitrogen/generated/android/c++/JNitroOptionsPanelConfig.hpp +157 -0
- package/nitrogen/generated/android/c++/JNitroOptionsPanelGridSection.hpp +102 -0
- package/nitrogen/generated/android/c++/JNitroOptionsPanelSection.cpp +30 -0
- package/nitrogen/generated/android/c++/JNitroOptionsPanelSection.hpp +129 -0
- package/nitrogen/generated/android/c++/JNitroRow.hpp +33 -3
- package/nitrogen/generated/android/c++/JNitroSection.hpp +6 -0
- package/nitrogen/generated/android/c++/JSearchTemplateConfig.hpp +6 -0
- package/nitrogen/generated/android/c++/JWaypointCoordinate.hpp +65 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/ChargingConnector.kt +30 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/GridImageSize.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/GridTemplateConfig.kt +9 -4
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridMapTemplateSpec.kt +5 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/ListImageType.kt +26 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroChargerLocation.kt +90 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroChargerOutlet.kt +70 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroOptionsPanelChargerSection.kt +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroOptionsPanelConfig.kt +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroOptionsPanelGridSection.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroOptionsPanelSection.kt +75 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroRow.kt +36 -6
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/WaypointCoordinate.kt +61 -0
- package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Bridge.hpp +174 -0
- package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Umbrella.hpp +27 -0
- package/nitrogen/generated/ios/c++/HybridGridTemplateSpecSwift.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridInformationTemplateSpecSwift.hpp +9 -0
- package/nitrogen/generated/ios/c++/HybridListTemplateSpecSwift.hpp +9 -0
- package/nitrogen/generated/ios/c++/HybridMapTemplateSpecSwift.hpp +47 -1
- package/nitrogen/generated/ios/c++/HybridSearchTemplateSpecSwift.hpp +9 -0
- package/nitrogen/generated/ios/swift/ChargingConnector.swift +68 -0
- package/nitrogen/generated/ios/swift/GridImageSize.swift +48 -0
- package/nitrogen/generated/ios/swift/GridTemplateConfig.swift +12 -1
- package/nitrogen/generated/ios/swift/HybridMapTemplateSpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridMapTemplateSpec_cxx.swift +31 -4
- package/nitrogen/generated/ios/swift/ListImageType.swift +52 -0
- package/nitrogen/generated/ios/swift/NitroChargerLocation.swift +161 -0
- package/nitrogen/generated/ios/swift/NitroChargerOutlet.swift +65 -0
- package/nitrogen/generated/ios/swift/NitroOptionsPanelChargerSection.swift +64 -0
- package/nitrogen/generated/ios/swift/NitroOptionsPanelConfig.swift +94 -0
- package/nitrogen/generated/ios/swift/NitroOptionsPanelGridSection.swift +53 -0
- package/nitrogen/generated/ios/swift/NitroOptionsPanelSection.swift +32 -0
- package/nitrogen/generated/ios/swift/NitroRow.swift +81 -1
- package/nitrogen/generated/ios/swift/WaypointCoordinate.swift +52 -0
- package/nitrogen/generated/shared/c++/ChargingConnector.hpp +104 -0
- package/nitrogen/generated/shared/c++/GridImageSize.hpp +84 -0
- package/nitrogen/generated/shared/c++/GridTemplateConfig.hpp +8 -1
- package/nitrogen/generated/shared/c++/HybridMapTemplateSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridMapTemplateSpec.hpp +5 -1
- package/nitrogen/generated/shared/c++/ListImageType.hpp +88 -0
- package/nitrogen/generated/shared/c++/NitroChargerLocation.hpp +131 -0
- package/nitrogen/generated/shared/c++/NitroChargerOutlet.hpp +98 -0
- package/nitrogen/generated/shared/c++/NitroOptionsPanelChargerSection.hpp +98 -0
- package/nitrogen/generated/shared/c++/NitroOptionsPanelConfig.hpp +107 -0
- package/nitrogen/generated/shared/c++/NitroOptionsPanelGridSection.hpp +91 -0
- package/nitrogen/generated/shared/c++/NitroRow.hpp +39 -2
- package/nitrogen/generated/shared/c++/WaypointCoordinate.hpp +91 -0
- package/package.json +1 -1
- package/src/Constants.ts +9 -0
- package/src/index.ts +1 -0
- package/src/specs/MapTemplate.nitro.ts +3 -1
- package/src/templates/GridTemplate.ts +38 -3
- package/src/templates/InformationTemplate.ts +60 -29
- package/src/templates/ListTemplate.ts +27 -55
- package/src/templates/MapTemplate.ts +60 -2
- package/src/templates/MessageTemplate.ts +71 -24
- package/src/utils/NitroOptionsPanel.ts +218 -0
- package/src/utils/NitroSection.ts +160 -5
|
@@ -102,6 +102,30 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class Maneuve
|
|
|
102
102
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct TripConfig; }
|
|
103
103
|
// Forward declaration of `ManeuverState` to properly resolve imports.
|
|
104
104
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class ManeuverState; }
|
|
105
|
+
// Forward declaration of `NitroOptionsPanelConfig` to properly resolve imports.
|
|
106
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroOptionsPanelConfig; }
|
|
107
|
+
// Forward declaration of `NitroSection` to properly resolve imports.
|
|
108
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroSection; }
|
|
109
|
+
// Forward declaration of `NitroOptionsPanelGridSection` to properly resolve imports.
|
|
110
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroOptionsPanelGridSection; }
|
|
111
|
+
// Forward declaration of `NitroOptionsPanelChargerSection` to properly resolve imports.
|
|
112
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroOptionsPanelChargerSection; }
|
|
113
|
+
// Forward declaration of `NitroRow` to properly resolve imports.
|
|
114
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroRow; }
|
|
115
|
+
// Forward declaration of `ListImageType` to properly resolve imports.
|
|
116
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class ListImageType; }
|
|
117
|
+
// Forward declaration of `WaypointCoordinate` to properly resolve imports.
|
|
118
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct WaypointCoordinate; }
|
|
119
|
+
// Forward declaration of `NitroSectionType` to properly resolve imports.
|
|
120
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroSectionType; }
|
|
121
|
+
// Forward declaration of `NitroGridButton` to properly resolve imports.
|
|
122
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroGridButton; }
|
|
123
|
+
// Forward declaration of `NitroChargerOutlet` to properly resolve imports.
|
|
124
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroChargerOutlet; }
|
|
125
|
+
// Forward declaration of `ChargingConnector` to properly resolve imports.
|
|
126
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class ChargingConnector; }
|
|
127
|
+
// Forward declaration of `NitroChargerLocation` to properly resolve imports.
|
|
128
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroChargerLocation; }
|
|
105
129
|
|
|
106
130
|
#include "MapTemplateConfig.hpp"
|
|
107
131
|
#include <string>
|
|
@@ -154,6 +178,18 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class Maneuve
|
|
|
154
178
|
#include "ManeuverType.hpp"
|
|
155
179
|
#include "TripConfig.hpp"
|
|
156
180
|
#include "ManeuverState.hpp"
|
|
181
|
+
#include "NitroOptionsPanelConfig.hpp"
|
|
182
|
+
#include "NitroSection.hpp"
|
|
183
|
+
#include "NitroOptionsPanelGridSection.hpp"
|
|
184
|
+
#include "NitroOptionsPanelChargerSection.hpp"
|
|
185
|
+
#include "NitroRow.hpp"
|
|
186
|
+
#include "ListImageType.hpp"
|
|
187
|
+
#include "WaypointCoordinate.hpp"
|
|
188
|
+
#include "NitroSectionType.hpp"
|
|
189
|
+
#include "NitroGridButton.hpp"
|
|
190
|
+
#include "NitroChargerOutlet.hpp"
|
|
191
|
+
#include "ChargingConnector.hpp"
|
|
192
|
+
#include "NitroChargerLocation.hpp"
|
|
157
193
|
|
|
158
194
|
#include "ReactNativeAutoPlay-Swift-Cxx-Umbrella.hpp"
|
|
159
195
|
|
|
@@ -269,11 +305,13 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
269
305
|
std::rethrow_exception(__result.error());
|
|
270
306
|
}
|
|
271
307
|
}
|
|
272
|
-
inline void startNavigation(const std::string& templateId, const TripConfig& trip) override {
|
|
308
|
+
inline std::shared_ptr<Promise<void>> startNavigation(const std::string& templateId, const TripConfig& trip) override {
|
|
273
309
|
auto __result = _swiftPart.startNavigation(templateId, std::forward<decltype(trip)>(trip));
|
|
274
310
|
if (__result.hasError()) [[unlikely]] {
|
|
275
311
|
std::rethrow_exception(__result.error());
|
|
276
312
|
}
|
|
313
|
+
auto __value = std::move(__result.value());
|
|
314
|
+
return __value;
|
|
277
315
|
}
|
|
278
316
|
inline void stopNavigation(const std::string& templateId) override {
|
|
279
317
|
auto __result = _swiftPart.stopNavigation(templateId);
|
|
@@ -287,6 +325,14 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
287
325
|
std::rethrow_exception(__result.error());
|
|
288
326
|
}
|
|
289
327
|
}
|
|
328
|
+
inline std::shared_ptr<Promise<void>> updateOptionsPanel(const std::string& templateId, const std::optional<NitroOptionsPanelConfig>& config) override {
|
|
329
|
+
auto __result = _swiftPart.updateOptionsPanel(templateId, config);
|
|
330
|
+
if (__result.hasError()) [[unlikely]] {
|
|
331
|
+
std::rethrow_exception(__result.error());
|
|
332
|
+
}
|
|
333
|
+
auto __value = std::move(__result.value());
|
|
334
|
+
return __value;
|
|
335
|
+
}
|
|
290
336
|
|
|
291
337
|
private:
|
|
292
338
|
ReactNativeAutoPlay::HybridMapTemplateSpec_cxx _swiftPart;
|
|
@@ -40,6 +40,12 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class Distanc
|
|
|
40
40
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroSection; }
|
|
41
41
|
// Forward declaration of `NitroRow` to properly resolve imports.
|
|
42
42
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroRow; }
|
|
43
|
+
// Forward declaration of `ListImageType` to properly resolve imports.
|
|
44
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class ListImageType; }
|
|
45
|
+
// Forward declaration of `WaypointCoordinate` to properly resolve imports.
|
|
46
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct WaypointCoordinate; }
|
|
47
|
+
// Forward declaration of `DurationWithTimeZone` to properly resolve imports.
|
|
48
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct DurationWithTimeZone; }
|
|
43
49
|
// Forward declaration of `NitroSectionType` to properly resolve imports.
|
|
44
50
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroSectionType; }
|
|
45
51
|
|
|
@@ -62,6 +68,9 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroSe
|
|
|
62
68
|
#include "DistanceUnits.hpp"
|
|
63
69
|
#include "NitroSection.hpp"
|
|
64
70
|
#include "NitroRow.hpp"
|
|
71
|
+
#include "ListImageType.hpp"
|
|
72
|
+
#include "WaypointCoordinate.hpp"
|
|
73
|
+
#include "DurationWithTimeZone.hpp"
|
|
65
74
|
#include "NitroSectionType.hpp"
|
|
66
75
|
#include <NitroModules/Promise.hpp>
|
|
67
76
|
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ChargingConnector.swift
|
|
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
|
+
/**
|
|
9
|
+
* Represents the JS union `ChargingConnector`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias ChargingConnector = margelo.nitro.swe.iternio.reactnativeautoplay.ChargingConnector
|
|
12
|
+
|
|
13
|
+
public extension ChargingConnector {
|
|
14
|
+
/**
|
|
15
|
+
* Get a ChargingConnector for the given String value, or
|
|
16
|
+
* return `nil` if the given value was invalid/unknown.
|
|
17
|
+
*/
|
|
18
|
+
init?(fromString string: String) {
|
|
19
|
+
switch string {
|
|
20
|
+
case "ccs1":
|
|
21
|
+
self = .ccs1
|
|
22
|
+
case "ccs2":
|
|
23
|
+
self = .ccs2
|
|
24
|
+
case "j1772":
|
|
25
|
+
self = .j1772
|
|
26
|
+
case "chaDeMo":
|
|
27
|
+
self = .chademo
|
|
28
|
+
case "mennekes":
|
|
29
|
+
self = .mennekes
|
|
30
|
+
case "gbtDC":
|
|
31
|
+
self = .gbtdc
|
|
32
|
+
case "gbtAC":
|
|
33
|
+
self = .gbtac
|
|
34
|
+
case "nacsDC":
|
|
35
|
+
self = .nacsdc
|
|
36
|
+
case "nacsAC":
|
|
37
|
+
self = .nacsac
|
|
38
|
+
default:
|
|
39
|
+
return nil
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Get the String value this ChargingConnector represents.
|
|
45
|
+
*/
|
|
46
|
+
var stringValue: String {
|
|
47
|
+
switch self {
|
|
48
|
+
case .ccs1:
|
|
49
|
+
return "ccs1"
|
|
50
|
+
case .ccs2:
|
|
51
|
+
return "ccs2"
|
|
52
|
+
case .j1772:
|
|
53
|
+
return "j1772"
|
|
54
|
+
case .chademo:
|
|
55
|
+
return "chaDeMo"
|
|
56
|
+
case .mennekes:
|
|
57
|
+
return "mennekes"
|
|
58
|
+
case .gbtdc:
|
|
59
|
+
return "gbtDC"
|
|
60
|
+
case .gbtac:
|
|
61
|
+
return "gbtAC"
|
|
62
|
+
case .nacsdc:
|
|
63
|
+
return "nacsDC"
|
|
64
|
+
case .nacsac:
|
|
65
|
+
return "nacsAC"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// GridImageSize.swift
|
|
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
|
+
/**
|
|
9
|
+
* Represents the JS union `GridImageSize`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias GridImageSize = margelo.nitro.swe.iternio.reactnativeautoplay.GridImageSize
|
|
12
|
+
|
|
13
|
+
public extension GridImageSize {
|
|
14
|
+
/**
|
|
15
|
+
* Get a GridImageSize for the given String value, or
|
|
16
|
+
* return `nil` if the given value was invalid/unknown.
|
|
17
|
+
*/
|
|
18
|
+
init?(fromString string: String) {
|
|
19
|
+
switch string {
|
|
20
|
+
case "unset":
|
|
21
|
+
self = .unset
|
|
22
|
+
case "large":
|
|
23
|
+
self = .large
|
|
24
|
+
case "medium":
|
|
25
|
+
self = .medium
|
|
26
|
+
case "small":
|
|
27
|
+
self = .small
|
|
28
|
+
default:
|
|
29
|
+
return nil
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Get the String value this GridImageSize represents.
|
|
35
|
+
*/
|
|
36
|
+
var stringValue: String {
|
|
37
|
+
switch self {
|
|
38
|
+
case .unset:
|
|
39
|
+
return "unset"
|
|
40
|
+
case .large:
|
|
41
|
+
return "large"
|
|
42
|
+
case .medium:
|
|
43
|
+
return "medium"
|
|
44
|
+
case .small:
|
|
45
|
+
return "small"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -18,7 +18,7 @@ public extension GridTemplateConfig {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `GridTemplateConfig`.
|
|
20
20
|
*/
|
|
21
|
-
init(id: String, onWillAppear: ((_ animated: Bool?) -> Void)?, onWillDisappear: ((_ animated: Bool?) -> Void)?, onDidAppear: ((_ animated: Bool?) -> Void)?, onDidDisappear: ((_ animated: Bool?) -> Void)?, onPopped: (() -> Void)?, autoDismissMs: Double?, headerActions: [NitroAction]?, title: AutoText, buttons: [NitroGridButton], mapConfig: NitroBaseMapTemplateConfig?) {
|
|
21
|
+
init(id: String, onWillAppear: ((_ animated: Bool?) -> Void)?, onWillDisappear: ((_ animated: Bool?) -> Void)?, onDidAppear: ((_ animated: Bool?) -> Void)?, onDidDisappear: ((_ animated: Bool?) -> Void)?, onPopped: (() -> Void)?, autoDismissMs: Double?, headerActions: [NitroAction]?, title: AutoText, buttons: [NitroGridButton], imageSize: GridImageSize?, mapConfig: NitroBaseMapTemplateConfig?) {
|
|
22
22
|
self.init(std.string(id), { () -> bridge.std__optional_std__function_void_std__optional_bool_____animated______ in
|
|
23
23
|
if let __unwrappedValue = onWillAppear {
|
|
24
24
|
return bridge.create_std__optional_std__function_void_std__optional_bool_____animated______({ () -> bridge.Func_void_std__optional_bool_ in
|
|
@@ -88,6 +88,12 @@ public extension GridTemplateConfig {
|
|
|
88
88
|
__vector.push_back(__item)
|
|
89
89
|
}
|
|
90
90
|
return __vector
|
|
91
|
+
}(), { () -> bridge.std__optional_GridImageSize_ in
|
|
92
|
+
if let __unwrappedValue = imageSize {
|
|
93
|
+
return bridge.create_std__optional_GridImageSize_(__unwrappedValue)
|
|
94
|
+
} else {
|
|
95
|
+
return .init()
|
|
96
|
+
}
|
|
91
97
|
}(), { () -> bridge.std__optional_NitroBaseMapTemplateConfig_ in
|
|
92
98
|
if let __unwrappedValue = mapConfig {
|
|
93
99
|
return bridge.create_std__optional_NitroBaseMapTemplateConfig_(__unwrappedValue)
|
|
@@ -245,6 +251,11 @@ public extension GridTemplateConfig {
|
|
|
245
251
|
return self.__buttons.map({ __item in __item })
|
|
246
252
|
}
|
|
247
253
|
|
|
254
|
+
@inline(__always)
|
|
255
|
+
var imageSize: GridImageSize? {
|
|
256
|
+
return self.__imageSize.value
|
|
257
|
+
}
|
|
258
|
+
|
|
248
259
|
@inline(__always)
|
|
249
260
|
var mapConfig: NitroBaseMapTemplateConfig? {
|
|
250
261
|
return self.__mapConfig.value
|
|
@@ -23,9 +23,10 @@ public protocol HybridMapTemplateSpec_protocol: HybridObject {
|
|
|
23
23
|
func updateVisibleTravelEstimate(templateId: String, visibleTravelEstimate: VisibleTravelEstimate) throws -> Void
|
|
24
24
|
func updateTravelEstimates(templateId: String, steps: [TripPoint]) throws -> Void
|
|
25
25
|
func updateManeuvers(templateId: String, maneuvers: NitroManeuver) throws -> Void
|
|
26
|
-
func startNavigation(templateId: String, trip: TripConfig) throws -> Void
|
|
26
|
+
func startNavigation(templateId: String, trip: TripConfig) throws -> Promise<Void>
|
|
27
27
|
func stopNavigation(templateId: String) throws -> Void
|
|
28
28
|
func setManeuverState(templateId: String, state: ManeuverState) throws -> Void
|
|
29
|
+
func updateOptionsPanel(templateId: String, config: NitroOptionsPanelConfig?) throws -> Promise<Void>
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
public extension HybridMapTemplateSpec_protocol {
|
|
@@ -288,13 +288,21 @@ open class HybridMapTemplateSpec_cxx {
|
|
|
288
288
|
}
|
|
289
289
|
|
|
290
290
|
@inline(__always)
|
|
291
|
-
public final func startNavigation(templateId: std.string, trip: TripConfig) -> bridge.
|
|
291
|
+
public final func startNavigation(templateId: std.string, trip: TripConfig) -> bridge.Result_std__shared_ptr_Promise_void___ {
|
|
292
292
|
do {
|
|
293
|
-
try self.__implementation.startNavigation(templateId: String(templateId), trip: trip)
|
|
294
|
-
|
|
293
|
+
let __result = try self.__implementation.startNavigation(templateId: String(templateId), trip: trip)
|
|
294
|
+
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_void__ in
|
|
295
|
+
let __promise = bridge.create_std__shared_ptr_Promise_void__()
|
|
296
|
+
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_void__(__promise)
|
|
297
|
+
__result
|
|
298
|
+
.then({ __result in __promiseHolder.resolve() })
|
|
299
|
+
.catch({ __error in __promiseHolder.reject(__error.toCpp()) })
|
|
300
|
+
return __promise
|
|
301
|
+
}()
|
|
302
|
+
return bridge.create_Result_std__shared_ptr_Promise_void___(__resultCpp)
|
|
295
303
|
} catch (let __error) {
|
|
296
304
|
let __exceptionPtr = __error.toCpp()
|
|
297
|
-
return bridge.
|
|
305
|
+
return bridge.create_Result_std__shared_ptr_Promise_void___(__exceptionPtr)
|
|
298
306
|
}
|
|
299
307
|
}
|
|
300
308
|
|
|
@@ -319,4 +327,23 @@ open class HybridMapTemplateSpec_cxx {
|
|
|
319
327
|
return bridge.create_Result_void_(__exceptionPtr)
|
|
320
328
|
}
|
|
321
329
|
}
|
|
330
|
+
|
|
331
|
+
@inline(__always)
|
|
332
|
+
public final func updateOptionsPanel(templateId: std.string, config: bridge.std__optional_NitroOptionsPanelConfig_) -> bridge.Result_std__shared_ptr_Promise_void___ {
|
|
333
|
+
do {
|
|
334
|
+
let __result = try self.__implementation.updateOptionsPanel(templateId: String(templateId), config: config.value)
|
|
335
|
+
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_void__ in
|
|
336
|
+
let __promise = bridge.create_std__shared_ptr_Promise_void__()
|
|
337
|
+
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_void__(__promise)
|
|
338
|
+
__result
|
|
339
|
+
.then({ __result in __promiseHolder.resolve() })
|
|
340
|
+
.catch({ __error in __promiseHolder.reject(__error.toCpp()) })
|
|
341
|
+
return __promise
|
|
342
|
+
}()
|
|
343
|
+
return bridge.create_Result_std__shared_ptr_Promise_void___(__resultCpp)
|
|
344
|
+
} catch (let __error) {
|
|
345
|
+
let __exceptionPtr = __error.toCpp()
|
|
346
|
+
return bridge.create_Result_std__shared_ptr_Promise_void___(__exceptionPtr)
|
|
347
|
+
}
|
|
348
|
+
}
|
|
322
349
|
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ListImageType.swift
|
|
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
|
+
/**
|
|
9
|
+
* Represents the JS union `ListImageType`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias ListImageType = margelo.nitro.swe.iternio.reactnativeautoplay.ListImageType
|
|
12
|
+
|
|
13
|
+
public extension ListImageType {
|
|
14
|
+
/**
|
|
15
|
+
* Get a ListImageType for the given String value, or
|
|
16
|
+
* return `nil` if the given value was invalid/unknown.
|
|
17
|
+
*/
|
|
18
|
+
init?(fromString string: String) {
|
|
19
|
+
switch string {
|
|
20
|
+
case "large":
|
|
21
|
+
self = .large
|
|
22
|
+
case "medium":
|
|
23
|
+
self = .medium
|
|
24
|
+
case "small":
|
|
25
|
+
self = .small
|
|
26
|
+
case "extra_small":
|
|
27
|
+
self = .extraSmall
|
|
28
|
+
case "icon":
|
|
29
|
+
self = .icon
|
|
30
|
+
default:
|
|
31
|
+
return nil
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Get the String value this ListImageType represents.
|
|
37
|
+
*/
|
|
38
|
+
var stringValue: String {
|
|
39
|
+
switch self {
|
|
40
|
+
case .large:
|
|
41
|
+
return "large"
|
|
42
|
+
case .medium:
|
|
43
|
+
return "medium"
|
|
44
|
+
case .small:
|
|
45
|
+
return "small"
|
|
46
|
+
case .extraSmall:
|
|
47
|
+
return "extra_small"
|
|
48
|
+
case .icon:
|
|
49
|
+
return "icon"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroChargerLocation.swift
|
|
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
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents an instance of `NitroChargerLocation`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias NitroChargerLocation = margelo.nitro.swe.iternio.reactnativeautoplay.NitroChargerLocation
|
|
14
|
+
|
|
15
|
+
public extension NitroChargerLocation {
|
|
16
|
+
private typealias bridge = margelo.nitro.swe.iternio.reactnativeautoplay.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `NitroChargerLocation`.
|
|
20
|
+
*/
|
|
21
|
+
init(name: String?, address: String?, coordinate: WaypointCoordinate, distance: Distance, duration: DurationWithTimeZone, visible: Bool?, image: Variant_GlyphImage_AssetImage_RemoteImage?, onPress: (() -> Void)?) {
|
|
22
|
+
self.init({ () -> bridge.std__optional_std__string_ in
|
|
23
|
+
if let __unwrappedValue = name {
|
|
24
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
25
|
+
} else {
|
|
26
|
+
return .init()
|
|
27
|
+
}
|
|
28
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
29
|
+
if let __unwrappedValue = address {
|
|
30
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
31
|
+
} else {
|
|
32
|
+
return .init()
|
|
33
|
+
}
|
|
34
|
+
}(), coordinate, distance, duration, { () -> bridge.std__optional_bool_ in
|
|
35
|
+
if let __unwrappedValue = visible {
|
|
36
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
37
|
+
} else {
|
|
38
|
+
return .init()
|
|
39
|
+
}
|
|
40
|
+
}(), { () -> bridge.std__optional_std__variant_GlyphImage__AssetImage__RemoteImage__ in
|
|
41
|
+
if let __unwrappedValue = image {
|
|
42
|
+
return bridge.create_std__optional_std__variant_GlyphImage__AssetImage__RemoteImage__({ () -> bridge.std__variant_GlyphImage__AssetImage__RemoteImage_ in
|
|
43
|
+
switch __unwrappedValue {
|
|
44
|
+
case .first(let __value):
|
|
45
|
+
return bridge.create_std__variant_GlyphImage__AssetImage__RemoteImage_(__value)
|
|
46
|
+
case .second(let __value):
|
|
47
|
+
return bridge.create_std__variant_GlyphImage__AssetImage__RemoteImage_(__value)
|
|
48
|
+
case .third(let __value):
|
|
49
|
+
return bridge.create_std__variant_GlyphImage__AssetImage__RemoteImage_(__value)
|
|
50
|
+
}
|
|
51
|
+
}().variant)
|
|
52
|
+
} else {
|
|
53
|
+
return .init()
|
|
54
|
+
}
|
|
55
|
+
}(), { () -> bridge.std__optional_std__function_void____ in
|
|
56
|
+
if let __unwrappedValue = onPress {
|
|
57
|
+
return bridge.create_std__optional_std__function_void____({ () -> bridge.Func_void in
|
|
58
|
+
let __closureWrapper = Func_void(__unwrappedValue)
|
|
59
|
+
return bridge.create_Func_void(__closureWrapper.toUnsafe())
|
|
60
|
+
}())
|
|
61
|
+
} else {
|
|
62
|
+
return .init()
|
|
63
|
+
}
|
|
64
|
+
}())
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@inline(__always)
|
|
68
|
+
var name: String? {
|
|
69
|
+
return { () -> String? in
|
|
70
|
+
if bridge.has_value_std__optional_std__string_(self.__name) {
|
|
71
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__name)
|
|
72
|
+
return String(__unwrapped)
|
|
73
|
+
} else {
|
|
74
|
+
return nil
|
|
75
|
+
}
|
|
76
|
+
}()
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@inline(__always)
|
|
80
|
+
var address: String? {
|
|
81
|
+
return { () -> String? in
|
|
82
|
+
if bridge.has_value_std__optional_std__string_(self.__address) {
|
|
83
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__address)
|
|
84
|
+
return String(__unwrapped)
|
|
85
|
+
} else {
|
|
86
|
+
return nil
|
|
87
|
+
}
|
|
88
|
+
}()
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@inline(__always)
|
|
92
|
+
var coordinate: WaypointCoordinate {
|
|
93
|
+
return self.__coordinate
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@inline(__always)
|
|
97
|
+
var distance: Distance {
|
|
98
|
+
return self.__distance
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@inline(__always)
|
|
102
|
+
var duration: DurationWithTimeZone {
|
|
103
|
+
return self.__duration
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@inline(__always)
|
|
107
|
+
var visible: Bool? {
|
|
108
|
+
return { () -> Bool? in
|
|
109
|
+
if bridge.has_value_std__optional_bool_(self.__visible) {
|
|
110
|
+
let __unwrapped = bridge.get_std__optional_bool_(self.__visible)
|
|
111
|
+
return __unwrapped
|
|
112
|
+
} else {
|
|
113
|
+
return nil
|
|
114
|
+
}
|
|
115
|
+
}()
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@inline(__always)
|
|
119
|
+
var image: Variant_GlyphImage_AssetImage_RemoteImage? {
|
|
120
|
+
return { () -> Variant_GlyphImage_AssetImage_RemoteImage? in
|
|
121
|
+
if bridge.has_value_std__optional_std__variant_GlyphImage__AssetImage__RemoteImage__(self.__image) {
|
|
122
|
+
let __unwrapped = bridge.get_std__optional_std__variant_GlyphImage__AssetImage__RemoteImage__(self.__image)
|
|
123
|
+
return { () -> Variant_GlyphImage_AssetImage_RemoteImage in
|
|
124
|
+
let __variant = bridge.std__variant_GlyphImage__AssetImage__RemoteImage_(__unwrapped)
|
|
125
|
+
switch __variant.index() {
|
|
126
|
+
case 0:
|
|
127
|
+
let __actual = __variant.get_0()
|
|
128
|
+
return .first(__actual)
|
|
129
|
+
case 1:
|
|
130
|
+
let __actual = __variant.get_1()
|
|
131
|
+
return .second(__actual)
|
|
132
|
+
case 2:
|
|
133
|
+
let __actual = __variant.get_2()
|
|
134
|
+
return .third(__actual)
|
|
135
|
+
default:
|
|
136
|
+
fatalError("Variant can never have index \(__variant.index())!")
|
|
137
|
+
}
|
|
138
|
+
}()
|
|
139
|
+
} else {
|
|
140
|
+
return nil
|
|
141
|
+
}
|
|
142
|
+
}()
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
@inline(__always)
|
|
146
|
+
var onPress: (() -> Void)? {
|
|
147
|
+
return { () -> (() -> Void)? in
|
|
148
|
+
if bridge.has_value_std__optional_std__function_void____(self.__onPress) {
|
|
149
|
+
let __unwrapped = bridge.get_std__optional_std__function_void____(self.__onPress)
|
|
150
|
+
return { () -> () -> Void in
|
|
151
|
+
let __wrappedFunction = bridge.wrap_Func_void(__unwrapped)
|
|
152
|
+
return { () -> Void in
|
|
153
|
+
__wrappedFunction.call()
|
|
154
|
+
}
|
|
155
|
+
}()
|
|
156
|
+
} else {
|
|
157
|
+
return nil
|
|
158
|
+
}
|
|
159
|
+
}()
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroChargerOutlet.swift
|
|
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
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents an instance of `NitroChargerOutlet`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias NitroChargerOutlet = margelo.nitro.swe.iternio.reactnativeautoplay.NitroChargerOutlet
|
|
14
|
+
|
|
15
|
+
public extension NitroChargerOutlet {
|
|
16
|
+
private typealias bridge = margelo.nitro.swe.iternio.reactnativeautoplay.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `NitroChargerOutlet`.
|
|
20
|
+
*/
|
|
21
|
+
init(connector: ChargingConnector, voltage: Double, powerKw: Double, onPress: (() -> Void)?) {
|
|
22
|
+
self.init(connector, voltage, powerKw, { () -> bridge.std__optional_std__function_void____ in
|
|
23
|
+
if let __unwrappedValue = onPress {
|
|
24
|
+
return bridge.create_std__optional_std__function_void____({ () -> bridge.Func_void in
|
|
25
|
+
let __closureWrapper = Func_void(__unwrappedValue)
|
|
26
|
+
return bridge.create_Func_void(__closureWrapper.toUnsafe())
|
|
27
|
+
}())
|
|
28
|
+
} else {
|
|
29
|
+
return .init()
|
|
30
|
+
}
|
|
31
|
+
}())
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@inline(__always)
|
|
35
|
+
var connector: ChargingConnector {
|
|
36
|
+
return self.__connector
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@inline(__always)
|
|
40
|
+
var voltage: Double {
|
|
41
|
+
return self.__voltage
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@inline(__always)
|
|
45
|
+
var powerKw: Double {
|
|
46
|
+
return self.__powerKw
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@inline(__always)
|
|
50
|
+
var onPress: (() -> Void)? {
|
|
51
|
+
return { () -> (() -> Void)? in
|
|
52
|
+
if bridge.has_value_std__optional_std__function_void____(self.__onPress) {
|
|
53
|
+
let __unwrapped = bridge.get_std__optional_std__function_void____(self.__onPress)
|
|
54
|
+
return { () -> () -> Void in
|
|
55
|
+
let __wrappedFunction = bridge.wrap_Func_void(__unwrapped)
|
|
56
|
+
return { () -> Void in
|
|
57
|
+
__wrappedFunction.call()
|
|
58
|
+
}
|
|
59
|
+
}()
|
|
60
|
+
} else {
|
|
61
|
+
return nil
|
|
62
|
+
}
|
|
63
|
+
}()
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroOptionsPanelChargerSection.swift
|
|
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
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents an instance of `NitroOptionsPanelChargerSection`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias NitroOptionsPanelChargerSection = margelo.nitro.swe.iternio.reactnativeautoplay.NitroOptionsPanelChargerSection
|
|
14
|
+
|
|
15
|
+
public extension NitroOptionsPanelChargerSection {
|
|
16
|
+
private typealias bridge = margelo.nitro.swe.iternio.reactnativeautoplay.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `NitroOptionsPanelChargerSection`.
|
|
20
|
+
*/
|
|
21
|
+
init(title: String?, outlets: [NitroChargerOutlet], location: NitroChargerLocation?) {
|
|
22
|
+
self.init({ () -> bridge.std__optional_std__string_ in
|
|
23
|
+
if let __unwrappedValue = title {
|
|
24
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
25
|
+
} else {
|
|
26
|
+
return .init()
|
|
27
|
+
}
|
|
28
|
+
}(), { () -> bridge.std__vector_NitroChargerOutlet_ in
|
|
29
|
+
var __vector = bridge.create_std__vector_NitroChargerOutlet_(outlets.count)
|
|
30
|
+
for __item in outlets {
|
|
31
|
+
__vector.push_back(__item)
|
|
32
|
+
}
|
|
33
|
+
return __vector
|
|
34
|
+
}(), { () -> bridge.std__optional_NitroChargerLocation_ in
|
|
35
|
+
if let __unwrappedValue = location {
|
|
36
|
+
return bridge.create_std__optional_NitroChargerLocation_(__unwrappedValue)
|
|
37
|
+
} else {
|
|
38
|
+
return .init()
|
|
39
|
+
}
|
|
40
|
+
}())
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@inline(__always)
|
|
44
|
+
var title: String? {
|
|
45
|
+
return { () -> String? in
|
|
46
|
+
if bridge.has_value_std__optional_std__string_(self.__title) {
|
|
47
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__title)
|
|
48
|
+
return String(__unwrapped)
|
|
49
|
+
} else {
|
|
50
|
+
return nil
|
|
51
|
+
}
|
|
52
|
+
}()
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@inline(__always)
|
|
56
|
+
var outlets: [NitroChargerOutlet] {
|
|
57
|
+
return self.__outlets.map({ __item in __item })
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@inline(__always)
|
|
61
|
+
var location: NitroChargerLocation? {
|
|
62
|
+
return self.__location.value
|
|
63
|
+
}
|
|
64
|
+
}
|