@onekeyfe/react-native-chart-webview 3.0.61 → 3.0.63
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/ChartWebview.podspec +0 -3
- package/android/src/main/java/com/margelo/nitro/chartwebview/ChartWebview.kt +18 -85
- package/android/src/main/java/com/margelo/nitro/chartwebview/PooledChartWebView.kt +26 -253
- package/ios/ChartWebview.swift +31 -190
- package/lib/nitrogen/generated/android/c++/JHybridChartWebviewSpec.cpp +0 -18
- package/lib/nitrogen/generated/android/c++/JHybridChartWebviewSpec.hpp +0 -4
- package/lib/nitrogen/generated/android/c++/views/JHybridChartWebviewStateUpdater.cpp +0 -8
- package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/chartwebview/HybridChartWebviewSpec.kt +0 -12
- package/lib/nitrogen/generated/ios/c++/HybridChartWebviewSpecSwift.hpp +0 -14
- package/lib/nitrogen/generated/ios/c++/views/HybridChartWebviewComponent.mm +0 -10
- package/lib/nitrogen/generated/ios/swift/HybridChartWebviewSpec.swift +0 -2
- package/lib/nitrogen/generated/ios/swift/HybridChartWebviewSpec_cxx.swift +0 -48
- package/lib/nitrogen/generated/shared/c++/HybridChartWebviewSpec.cpp +0 -4
- package/lib/nitrogen/generated/shared/c++/HybridChartWebviewSpec.hpp +0 -4
- package/lib/nitrogen/generated/shared/c++/views/HybridChartWebviewComponent.cpp +0 -24
- package/lib/nitrogen/generated/shared/c++/views/HybridChartWebviewComponent.hpp +0 -2
- package/lib/nitrogen/generated/shared/json/ChartWebviewConfig.json +0 -2
- package/lib/nitrogen/nitrogen/generated/android/c++/JHybridChartWebviewSpec.cpp +0 -18
- package/lib/nitrogen/nitrogen/generated/android/c++/JHybridChartWebviewSpec.hpp +0 -4
- package/lib/nitrogen/nitrogen/generated/android/c++/views/JHybridChartWebviewStateUpdater.cpp +0 -8
- package/lib/nitrogen/nitrogen/generated/android/kotlin/com/margelo/nitro/chartwebview/HybridChartWebviewSpec.kt +0 -12
- package/lib/nitrogen/nitrogen/generated/ios/c++/HybridChartWebviewSpecSwift.hpp +0 -14
- package/lib/nitrogen/nitrogen/generated/ios/c++/views/HybridChartWebviewComponent.mm +0 -10
- package/lib/nitrogen/nitrogen/generated/ios/swift/HybridChartWebviewSpec.swift +0 -2
- package/lib/nitrogen/nitrogen/generated/ios/swift/HybridChartWebviewSpec_cxx.swift +0 -48
- package/lib/nitrogen/nitrogen/generated/shared/c++/HybridChartWebviewSpec.cpp +0 -4
- package/lib/nitrogen/nitrogen/generated/shared/c++/HybridChartWebviewSpec.hpp +0 -4
- package/lib/nitrogen/nitrogen/generated/shared/c++/views/HybridChartWebviewComponent.cpp +0 -24
- package/lib/nitrogen/nitrogen/generated/shared/c++/views/HybridChartWebviewComponent.hpp +0 -2
- package/lib/nitrogen/nitrogen/generated/shared/json/ChartWebviewConfig.json +0 -2
- package/lib/typescript/src/ChartWebview.nitro.d.ts +0 -2
- package/lib/typescript/src/ChartWebview.nitro.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +0 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JHybridChartWebviewSpec.cpp +0 -18
- package/nitrogen/generated/android/c++/JHybridChartWebviewSpec.hpp +0 -4
- package/nitrogen/generated/android/c++/views/JHybridChartWebviewStateUpdater.cpp +0 -8
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/chartwebview/HybridChartWebviewSpec.kt +0 -12
- package/nitrogen/generated/ios/c++/HybridChartWebviewSpecSwift.hpp +0 -14
- package/nitrogen/generated/ios/c++/views/HybridChartWebviewComponent.mm +0 -10
- package/nitrogen/generated/ios/swift/HybridChartWebviewSpec.swift +0 -2
- package/nitrogen/generated/ios/swift/HybridChartWebviewSpec_cxx.swift +0 -48
- package/nitrogen/generated/shared/c++/HybridChartWebviewSpec.cpp +0 -4
- package/nitrogen/generated/shared/c++/HybridChartWebviewSpec.hpp +0 -4
- package/nitrogen/generated/shared/c++/views/HybridChartWebviewComponent.cpp +0 -24
- package/nitrogen/generated/shared/c++/views/HybridChartWebviewComponent.hpp +0 -2
- package/nitrogen/generated/shared/json/ChartWebviewConfig.json +0 -2
- package/package.json +1 -1
- package/src/ChartWebview.nitro.ts +0 -18
|
@@ -54,8 +54,6 @@ namespace margelo::nitro::chartwebview {
|
|
|
54
54
|
virtual void setEntry(const std::optional<std::string>& entry) = 0;
|
|
55
55
|
virtual std::optional<std::string> getParamsJson() = 0;
|
|
56
56
|
virtual void setParamsJson(const std::optional<std::string>& paramsJson) = 0;
|
|
57
|
-
virtual std::optional<std::string> getAssetHost() = 0;
|
|
58
|
-
virtual void setAssetHost(const std::optional<std::string>& assetHost) = 0;
|
|
59
57
|
virtual std::optional<std::string> getBridgeScript() = 0;
|
|
60
58
|
virtual void setBridgeScript(const std::optional<std::string>& bridgeScript) = 0;
|
|
61
59
|
virtual std::optional<std::string> getReuseKey() = 0;
|
|
@@ -64,8 +62,6 @@ namespace margelo::nitro::chartwebview {
|
|
|
64
62
|
virtual void setPooled(std::optional<bool> pooled) = 0;
|
|
65
63
|
virtual std::optional<bool> getActive() = 0;
|
|
66
64
|
virtual void setActive(std::optional<bool> active) = 0;
|
|
67
|
-
virtual std::optional<bool> getWebviewDebuggingEnabled() = 0;
|
|
68
|
-
virtual void setWebviewDebuggingEnabled(std::optional<bool> webviewDebuggingEnabled) = 0;
|
|
69
65
|
virtual std::optional<std::function<void(const std::string& /* message */)>> getOnMessage() = 0;
|
|
70
66
|
virtual void setOnMessage(const std::optional<std::function<void(const std::string& /* message */)>>& onMessage) = 0;
|
|
71
67
|
virtual std::optional<std::function<void()>> getOnLoadEnd() = 0;
|
|
@@ -65,16 +65,6 @@ namespace margelo::nitro::chartwebview::views {
|
|
|
65
65
|
throw std::runtime_error(std::string("ChartWebview.paramsJson: ") + exc.what());
|
|
66
66
|
}
|
|
67
67
|
}()),
|
|
68
|
-
assetHost([&]() -> CachedProp<std::optional<std::string>> {
|
|
69
|
-
try {
|
|
70
|
-
const react::RawValue* rawValue = rawProps.at("assetHost", nullptr, nullptr);
|
|
71
|
-
if (rawValue == nullptr) return sourceProps.assetHost;
|
|
72
|
-
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
73
|
-
return CachedProp<std::optional<std::string>>::fromRawValue(*runtime, value, sourceProps.assetHost);
|
|
74
|
-
} catch (const std::exception& exc) {
|
|
75
|
-
throw std::runtime_error(std::string("ChartWebview.assetHost: ") + exc.what());
|
|
76
|
-
}
|
|
77
|
-
}()),
|
|
78
68
|
bridgeScript([&]() -> CachedProp<std::optional<std::string>> {
|
|
79
69
|
try {
|
|
80
70
|
const react::RawValue* rawValue = rawProps.at("bridgeScript", nullptr, nullptr);
|
|
@@ -115,16 +105,6 @@ namespace margelo::nitro::chartwebview::views {
|
|
|
115
105
|
throw std::runtime_error(std::string("ChartWebview.active: ") + exc.what());
|
|
116
106
|
}
|
|
117
107
|
}()),
|
|
118
|
-
webviewDebuggingEnabled([&]() -> CachedProp<std::optional<bool>> {
|
|
119
|
-
try {
|
|
120
|
-
const react::RawValue* rawValue = rawProps.at("webviewDebuggingEnabled", nullptr, nullptr);
|
|
121
|
-
if (rawValue == nullptr) return sourceProps.webviewDebuggingEnabled;
|
|
122
|
-
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
123
|
-
return CachedProp<std::optional<bool>>::fromRawValue(*runtime, value, sourceProps.webviewDebuggingEnabled);
|
|
124
|
-
} catch (const std::exception& exc) {
|
|
125
|
-
throw std::runtime_error(std::string("ChartWebview.webviewDebuggingEnabled: ") + exc.what());
|
|
126
|
-
}
|
|
127
|
-
}()),
|
|
128
108
|
onMessage([&]() -> CachedProp<std::optional<std::function<void(const std::string& /* message */)>>> {
|
|
129
109
|
try {
|
|
130
110
|
const react::RawValue* rawValue = rawProps.at("onMessage", nullptr, nullptr);
|
|
@@ -172,12 +152,10 @@ namespace margelo::nitro::chartwebview::views {
|
|
|
172
152
|
localBundle(other.localBundle),
|
|
173
153
|
entry(other.entry),
|
|
174
154
|
paramsJson(other.paramsJson),
|
|
175
|
-
assetHost(other.assetHost),
|
|
176
155
|
bridgeScript(other.bridgeScript),
|
|
177
156
|
reuseKey(other.reuseKey),
|
|
178
157
|
pooled(other.pooled),
|
|
179
158
|
active(other.active),
|
|
180
|
-
webviewDebuggingEnabled(other.webviewDebuggingEnabled),
|
|
181
159
|
onMessage(other.onMessage),
|
|
182
160
|
onLoadEnd(other.onLoadEnd),
|
|
183
161
|
onError(other.onError),
|
|
@@ -189,12 +167,10 @@ namespace margelo::nitro::chartwebview::views {
|
|
|
189
167
|
case hashString("localBundle"): return true;
|
|
190
168
|
case hashString("entry"): return true;
|
|
191
169
|
case hashString("paramsJson"): return true;
|
|
192
|
-
case hashString("assetHost"): return true;
|
|
193
170
|
case hashString("bridgeScript"): return true;
|
|
194
171
|
case hashString("reuseKey"): return true;
|
|
195
172
|
case hashString("pooled"): return true;
|
|
196
173
|
case hashString("active"): return true;
|
|
197
|
-
case hashString("webviewDebuggingEnabled"): return true;
|
|
198
174
|
case hashString("onMessage"): return true;
|
|
199
175
|
case hashString("onLoadEnd"): return true;
|
|
200
176
|
case hashString("onError"): return true;
|
|
@@ -47,12 +47,10 @@ namespace margelo::nitro::chartwebview::views {
|
|
|
47
47
|
CachedProp<std::optional<std::string>> localBundle;
|
|
48
48
|
CachedProp<std::optional<std::string>> entry;
|
|
49
49
|
CachedProp<std::optional<std::string>> paramsJson;
|
|
50
|
-
CachedProp<std::optional<std::string>> assetHost;
|
|
51
50
|
CachedProp<std::optional<std::string>> bridgeScript;
|
|
52
51
|
CachedProp<std::optional<std::string>> reuseKey;
|
|
53
52
|
CachedProp<std::optional<bool>> pooled;
|
|
54
53
|
CachedProp<std::optional<bool>> active;
|
|
55
|
-
CachedProp<std::optional<bool>> webviewDebuggingEnabled;
|
|
56
54
|
CachedProp<std::optional<std::function<void(const std::string& /* message */)>>> onMessage;
|
|
57
55
|
CachedProp<std::optional<std::function<void()>>> onLoadEnd;
|
|
58
56
|
CachedProp<std::optional<std::function<void(const std::string& /* message */)>>> onError;
|
|
@@ -8,12 +8,10 @@
|
|
|
8
8
|
"localBundle": true,
|
|
9
9
|
"entry": true,
|
|
10
10
|
"paramsJson": true,
|
|
11
|
-
"assetHost": true,
|
|
12
11
|
"bridgeScript": true,
|
|
13
12
|
"reuseKey": true,
|
|
14
13
|
"pooled": true,
|
|
15
14
|
"active": true,
|
|
16
|
-
"webviewDebuggingEnabled": true,
|
|
17
15
|
"onMessage": true,
|
|
18
16
|
"onLoadEnd": true,
|
|
19
17
|
"onError": true,
|
|
@@ -81,15 +81,6 @@ namespace margelo::nitro::chartwebview {
|
|
|
81
81
|
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JString> /* paramsJson */)>("setParamsJson");
|
|
82
82
|
method(_javaPart, paramsJson.has_value() ? jni::make_jstring(paramsJson.value()) : nullptr);
|
|
83
83
|
}
|
|
84
|
-
std::optional<std::string> JHybridChartWebviewSpec::getAssetHost() {
|
|
85
|
-
static const auto method = javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getAssetHost");
|
|
86
|
-
auto __result = method(_javaPart);
|
|
87
|
-
return __result != nullptr ? std::make_optional(__result->toStdString()) : std::nullopt;
|
|
88
|
-
}
|
|
89
|
-
void JHybridChartWebviewSpec::setAssetHost(const std::optional<std::string>& assetHost) {
|
|
90
|
-
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JString> /* assetHost */)>("setAssetHost");
|
|
91
|
-
method(_javaPart, assetHost.has_value() ? jni::make_jstring(assetHost.value()) : nullptr);
|
|
92
|
-
}
|
|
93
84
|
std::optional<std::string> JHybridChartWebviewSpec::getBridgeScript() {
|
|
94
85
|
static const auto method = javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getBridgeScript");
|
|
95
86
|
auto __result = method(_javaPart);
|
|
@@ -126,15 +117,6 @@ namespace margelo::nitro::chartwebview {
|
|
|
126
117
|
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JBoolean> /* active */)>("setActive");
|
|
127
118
|
method(_javaPart, active.has_value() ? jni::JBoolean::valueOf(active.value()) : nullptr);
|
|
128
119
|
}
|
|
129
|
-
std::optional<bool> JHybridChartWebviewSpec::getWebviewDebuggingEnabled() {
|
|
130
|
-
static const auto method = javaClassStatic()->getMethod<jni::local_ref<jni::JBoolean>()>("getWebviewDebuggingEnabled");
|
|
131
|
-
auto __result = method(_javaPart);
|
|
132
|
-
return __result != nullptr ? std::make_optional(static_cast<bool>(__result->value())) : std::nullopt;
|
|
133
|
-
}
|
|
134
|
-
void JHybridChartWebviewSpec::setWebviewDebuggingEnabled(std::optional<bool> webviewDebuggingEnabled) {
|
|
135
|
-
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JBoolean> /* webviewDebuggingEnabled */)>("setWebviewDebuggingEnabled");
|
|
136
|
-
method(_javaPart, webviewDebuggingEnabled.has_value() ? jni::JBoolean::valueOf(webviewDebuggingEnabled.value()) : nullptr);
|
|
137
|
-
}
|
|
138
120
|
std::optional<std::function<void(const std::string& /* message */)>> JHybridChartWebviewSpec::getOnMessage() {
|
|
139
121
|
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JFunc_void_std__string::javaobject>()>("getOnMessage_cxx");
|
|
140
122
|
auto __result = method(_javaPart);
|
|
@@ -58,8 +58,6 @@ namespace margelo::nitro::chartwebview {
|
|
|
58
58
|
void setEntry(const std::optional<std::string>& entry) override;
|
|
59
59
|
std::optional<std::string> getParamsJson() override;
|
|
60
60
|
void setParamsJson(const std::optional<std::string>& paramsJson) override;
|
|
61
|
-
std::optional<std::string> getAssetHost() override;
|
|
62
|
-
void setAssetHost(const std::optional<std::string>& assetHost) override;
|
|
63
61
|
std::optional<std::string> getBridgeScript() override;
|
|
64
62
|
void setBridgeScript(const std::optional<std::string>& bridgeScript) override;
|
|
65
63
|
std::optional<std::string> getReuseKey() override;
|
|
@@ -68,8 +66,6 @@ namespace margelo::nitro::chartwebview {
|
|
|
68
66
|
void setPooled(std::optional<bool> pooled) override;
|
|
69
67
|
std::optional<bool> getActive() override;
|
|
70
68
|
void setActive(std::optional<bool> active) override;
|
|
71
|
-
std::optional<bool> getWebviewDebuggingEnabled() override;
|
|
72
|
-
void setWebviewDebuggingEnabled(std::optional<bool> webviewDebuggingEnabled) override;
|
|
73
69
|
std::optional<std::function<void(const std::string& /* message */)>> getOnMessage() override;
|
|
74
70
|
void setOnMessage(const std::optional<std::function<void(const std::string& /* message */)>>& onMessage) override;
|
|
75
71
|
std::optional<std::function<void()>> getOnLoadEnd() override;
|
package/lib/nitrogen/nitrogen/generated/android/c++/views/JHybridChartWebviewStateUpdater.cpp
CHANGED
|
@@ -52,10 +52,6 @@ void JHybridChartWebviewStateUpdater::updateViewProps(jni::alias_ref<jni::JClass
|
|
|
52
52
|
view->setParamsJson(props.paramsJson.value);
|
|
53
53
|
// TODO: Set isDirty = false
|
|
54
54
|
}
|
|
55
|
-
if (props.assetHost.isDirty) {
|
|
56
|
-
view->setAssetHost(props.assetHost.value);
|
|
57
|
-
// TODO: Set isDirty = false
|
|
58
|
-
}
|
|
59
55
|
if (props.bridgeScript.isDirty) {
|
|
60
56
|
view->setBridgeScript(props.bridgeScript.value);
|
|
61
57
|
// TODO: Set isDirty = false
|
|
@@ -72,10 +68,6 @@ void JHybridChartWebviewStateUpdater::updateViewProps(jni::alias_ref<jni::JClass
|
|
|
72
68
|
view->setActive(props.active.value);
|
|
73
69
|
// TODO: Set isDirty = false
|
|
74
70
|
}
|
|
75
|
-
if (props.webviewDebuggingEnabled.isDirty) {
|
|
76
|
-
view->setWebviewDebuggingEnabled(props.webviewDebuggingEnabled.value);
|
|
77
|
-
// TODO: Set isDirty = false
|
|
78
|
-
}
|
|
79
71
|
if (props.onMessage.isDirty) {
|
|
80
72
|
view->setOnMessage(props.onMessage.value);
|
|
81
73
|
// TODO: Set isDirty = false
|
|
@@ -66,12 +66,6 @@ abstract class HybridChartWebviewSpec: HybridView() {
|
|
|
66
66
|
@set:Keep
|
|
67
67
|
abstract var paramsJson: String?
|
|
68
68
|
|
|
69
|
-
@get:DoNotStrip
|
|
70
|
-
@get:Keep
|
|
71
|
-
@set:DoNotStrip
|
|
72
|
-
@set:Keep
|
|
73
|
-
abstract var assetHost: String?
|
|
74
|
-
|
|
75
69
|
@get:DoNotStrip
|
|
76
70
|
@get:Keep
|
|
77
71
|
@set:DoNotStrip
|
|
@@ -96,12 +90,6 @@ abstract class HybridChartWebviewSpec: HybridView() {
|
|
|
96
90
|
@set:Keep
|
|
97
91
|
abstract var active: Boolean?
|
|
98
92
|
|
|
99
|
-
@get:DoNotStrip
|
|
100
|
-
@get:Keep
|
|
101
|
-
@set:DoNotStrip
|
|
102
|
-
@set:Keep
|
|
103
|
-
abstract var webviewDebuggingEnabled: Boolean?
|
|
104
|
-
|
|
105
93
|
abstract var onMessage: ((message: String) -> Unit)?
|
|
106
94
|
|
|
107
95
|
private var onMessage_cxx: Func_void_std__string?
|
|
@@ -86,13 +86,6 @@ namespace margelo::nitro::chartwebview {
|
|
|
86
86
|
inline void setParamsJson(const std::optional<std::string>& paramsJson) noexcept override {
|
|
87
87
|
_swiftPart.setParamsJson(paramsJson);
|
|
88
88
|
}
|
|
89
|
-
inline std::optional<std::string> getAssetHost() noexcept override {
|
|
90
|
-
auto __result = _swiftPart.getAssetHost();
|
|
91
|
-
return __result;
|
|
92
|
-
}
|
|
93
|
-
inline void setAssetHost(const std::optional<std::string>& assetHost) noexcept override {
|
|
94
|
-
_swiftPart.setAssetHost(assetHost);
|
|
95
|
-
}
|
|
96
89
|
inline std::optional<std::string> getBridgeScript() noexcept override {
|
|
97
90
|
auto __result = _swiftPart.getBridgeScript();
|
|
98
91
|
return __result;
|
|
@@ -121,13 +114,6 @@ namespace margelo::nitro::chartwebview {
|
|
|
121
114
|
inline void setActive(std::optional<bool> active) noexcept override {
|
|
122
115
|
_swiftPart.setActive(active);
|
|
123
116
|
}
|
|
124
|
-
inline std::optional<bool> getWebviewDebuggingEnabled() noexcept override {
|
|
125
|
-
auto __result = _swiftPart.getWebviewDebuggingEnabled();
|
|
126
|
-
return __result;
|
|
127
|
-
}
|
|
128
|
-
inline void setWebviewDebuggingEnabled(std::optional<bool> webviewDebuggingEnabled) noexcept override {
|
|
129
|
-
_swiftPart.setWebviewDebuggingEnabled(webviewDebuggingEnabled);
|
|
130
|
-
}
|
|
131
117
|
inline std::optional<std::function<void(const std::string& /* message */)>> getOnMessage() noexcept override {
|
|
132
118
|
auto __result = _swiftPart.getOnMessage();
|
|
133
119
|
return __result;
|
|
@@ -91,11 +91,6 @@ using namespace margelo::nitro::chartwebview::views;
|
|
|
91
91
|
swiftPart.setParamsJson(newViewProps.paramsJson.value);
|
|
92
92
|
newViewProps.paramsJson.isDirty = false;
|
|
93
93
|
}
|
|
94
|
-
// assetHost: optional
|
|
95
|
-
if (newViewProps.assetHost.isDirty) {
|
|
96
|
-
swiftPart.setAssetHost(newViewProps.assetHost.value);
|
|
97
|
-
newViewProps.assetHost.isDirty = false;
|
|
98
|
-
}
|
|
99
94
|
// bridgeScript: optional
|
|
100
95
|
if (newViewProps.bridgeScript.isDirty) {
|
|
101
96
|
swiftPart.setBridgeScript(newViewProps.bridgeScript.value);
|
|
@@ -116,11 +111,6 @@ using namespace margelo::nitro::chartwebview::views;
|
|
|
116
111
|
swiftPart.setActive(newViewProps.active.value);
|
|
117
112
|
newViewProps.active.isDirty = false;
|
|
118
113
|
}
|
|
119
|
-
// webviewDebuggingEnabled: optional
|
|
120
|
-
if (newViewProps.webviewDebuggingEnabled.isDirty) {
|
|
121
|
-
swiftPart.setWebviewDebuggingEnabled(newViewProps.webviewDebuggingEnabled.value);
|
|
122
|
-
newViewProps.webviewDebuggingEnabled.isDirty = false;
|
|
123
|
-
}
|
|
124
114
|
// onMessage: optional
|
|
125
115
|
if (newViewProps.onMessage.isDirty) {
|
|
126
116
|
swiftPart.setOnMessage(newViewProps.onMessage.value);
|
|
@@ -15,12 +15,10 @@ public protocol HybridChartWebviewSpec_protocol: HybridObject, HybridView {
|
|
|
15
15
|
var localBundle: String? { get set }
|
|
16
16
|
var entry: String? { get set }
|
|
17
17
|
var paramsJson: String? { get set }
|
|
18
|
-
var assetHost: String? { get set }
|
|
19
18
|
var bridgeScript: String? { get set }
|
|
20
19
|
var reuseKey: String? { get set }
|
|
21
20
|
var pooled: Bool? { get set }
|
|
22
21
|
var active: Bool? { get set }
|
|
23
|
-
var webviewDebuggingEnabled: Bool? { get set }
|
|
24
22
|
var onMessage: ((_ message: String) -> Void)? { get set }
|
|
25
23
|
var onLoadEnd: (() -> Void)? { get set }
|
|
26
24
|
var onError: ((_ message: String) -> Void)? { get set }
|
|
@@ -210,30 +210,6 @@ open class HybridChartWebviewSpec_cxx {
|
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
public final var assetHost: bridge.std__optional_std__string_ {
|
|
214
|
-
@inline(__always)
|
|
215
|
-
get {
|
|
216
|
-
return { () -> bridge.std__optional_std__string_ in
|
|
217
|
-
if let __unwrappedValue = self.__implementation.assetHost {
|
|
218
|
-
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
219
|
-
} else {
|
|
220
|
-
return .init()
|
|
221
|
-
}
|
|
222
|
-
}()
|
|
223
|
-
}
|
|
224
|
-
@inline(__always)
|
|
225
|
-
set {
|
|
226
|
-
self.__implementation.assetHost = { () -> String? in
|
|
227
|
-
if bridge.has_value_std__optional_std__string_(newValue) {
|
|
228
|
-
let __unwrapped = bridge.get_std__optional_std__string_(newValue)
|
|
229
|
-
return String(__unwrapped)
|
|
230
|
-
} else {
|
|
231
|
-
return nil
|
|
232
|
-
}
|
|
233
|
-
}()
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
|
|
237
213
|
public final var bridgeScript: bridge.std__optional_std__string_ {
|
|
238
214
|
@inline(__always)
|
|
239
215
|
get {
|
|
@@ -330,30 +306,6 @@ open class HybridChartWebviewSpec_cxx {
|
|
|
330
306
|
}
|
|
331
307
|
}
|
|
332
308
|
|
|
333
|
-
public final var webviewDebuggingEnabled: bridge.std__optional_bool_ {
|
|
334
|
-
@inline(__always)
|
|
335
|
-
get {
|
|
336
|
-
return { () -> bridge.std__optional_bool_ in
|
|
337
|
-
if let __unwrappedValue = self.__implementation.webviewDebuggingEnabled {
|
|
338
|
-
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
339
|
-
} else {
|
|
340
|
-
return .init()
|
|
341
|
-
}
|
|
342
|
-
}()
|
|
343
|
-
}
|
|
344
|
-
@inline(__always)
|
|
345
|
-
set {
|
|
346
|
-
self.__implementation.webviewDebuggingEnabled = { () -> Bool? in
|
|
347
|
-
if bridge.has_value_std__optional_bool_(newValue) {
|
|
348
|
-
let __unwrapped = bridge.get_std__optional_bool_(newValue)
|
|
349
|
-
return __unwrapped
|
|
350
|
-
} else {
|
|
351
|
-
return nil
|
|
352
|
-
}
|
|
353
|
-
}()
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
|
|
357
309
|
public final var onMessage: bridge.std__optional_std__function_void_const_std__string_____message______ {
|
|
358
310
|
@inline(__always)
|
|
359
311
|
get {
|
|
@@ -22,8 +22,6 @@ namespace margelo::nitro::chartwebview {
|
|
|
22
22
|
prototype.registerHybridSetter("entry", &HybridChartWebviewSpec::setEntry);
|
|
23
23
|
prototype.registerHybridGetter("paramsJson", &HybridChartWebviewSpec::getParamsJson);
|
|
24
24
|
prototype.registerHybridSetter("paramsJson", &HybridChartWebviewSpec::setParamsJson);
|
|
25
|
-
prototype.registerHybridGetter("assetHost", &HybridChartWebviewSpec::getAssetHost);
|
|
26
|
-
prototype.registerHybridSetter("assetHost", &HybridChartWebviewSpec::setAssetHost);
|
|
27
25
|
prototype.registerHybridGetter("bridgeScript", &HybridChartWebviewSpec::getBridgeScript);
|
|
28
26
|
prototype.registerHybridSetter("bridgeScript", &HybridChartWebviewSpec::setBridgeScript);
|
|
29
27
|
prototype.registerHybridGetter("reuseKey", &HybridChartWebviewSpec::getReuseKey);
|
|
@@ -32,8 +30,6 @@ namespace margelo::nitro::chartwebview {
|
|
|
32
30
|
prototype.registerHybridSetter("pooled", &HybridChartWebviewSpec::setPooled);
|
|
33
31
|
prototype.registerHybridGetter("active", &HybridChartWebviewSpec::getActive);
|
|
34
32
|
prototype.registerHybridSetter("active", &HybridChartWebviewSpec::setActive);
|
|
35
|
-
prototype.registerHybridGetter("webviewDebuggingEnabled", &HybridChartWebviewSpec::getWebviewDebuggingEnabled);
|
|
36
|
-
prototype.registerHybridSetter("webviewDebuggingEnabled", &HybridChartWebviewSpec::setWebviewDebuggingEnabled);
|
|
37
33
|
prototype.registerHybridGetter("onMessage", &HybridChartWebviewSpec::getOnMessage);
|
|
38
34
|
prototype.registerHybridSetter("onMessage", &HybridChartWebviewSpec::setOnMessage);
|
|
39
35
|
prototype.registerHybridGetter("onLoadEnd", &HybridChartWebviewSpec::getOnLoadEnd);
|
|
@@ -54,8 +54,6 @@ namespace margelo::nitro::chartwebview {
|
|
|
54
54
|
virtual void setEntry(const std::optional<std::string>& entry) = 0;
|
|
55
55
|
virtual std::optional<std::string> getParamsJson() = 0;
|
|
56
56
|
virtual void setParamsJson(const std::optional<std::string>& paramsJson) = 0;
|
|
57
|
-
virtual std::optional<std::string> getAssetHost() = 0;
|
|
58
|
-
virtual void setAssetHost(const std::optional<std::string>& assetHost) = 0;
|
|
59
57
|
virtual std::optional<std::string> getBridgeScript() = 0;
|
|
60
58
|
virtual void setBridgeScript(const std::optional<std::string>& bridgeScript) = 0;
|
|
61
59
|
virtual std::optional<std::string> getReuseKey() = 0;
|
|
@@ -64,8 +62,6 @@ namespace margelo::nitro::chartwebview {
|
|
|
64
62
|
virtual void setPooled(std::optional<bool> pooled) = 0;
|
|
65
63
|
virtual std::optional<bool> getActive() = 0;
|
|
66
64
|
virtual void setActive(std::optional<bool> active) = 0;
|
|
67
|
-
virtual std::optional<bool> getWebviewDebuggingEnabled() = 0;
|
|
68
|
-
virtual void setWebviewDebuggingEnabled(std::optional<bool> webviewDebuggingEnabled) = 0;
|
|
69
65
|
virtual std::optional<std::function<void(const std::string& /* message */)>> getOnMessage() = 0;
|
|
70
66
|
virtual void setOnMessage(const std::optional<std::function<void(const std::string& /* message */)>>& onMessage) = 0;
|
|
71
67
|
virtual std::optional<std::function<void()>> getOnLoadEnd() = 0;
|
|
@@ -65,16 +65,6 @@ namespace margelo::nitro::chartwebview::views {
|
|
|
65
65
|
throw std::runtime_error(std::string("ChartWebview.paramsJson: ") + exc.what());
|
|
66
66
|
}
|
|
67
67
|
}()),
|
|
68
|
-
assetHost([&]() -> CachedProp<std::optional<std::string>> {
|
|
69
|
-
try {
|
|
70
|
-
const react::RawValue* rawValue = rawProps.at("assetHost", nullptr, nullptr);
|
|
71
|
-
if (rawValue == nullptr) return sourceProps.assetHost;
|
|
72
|
-
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
73
|
-
return CachedProp<std::optional<std::string>>::fromRawValue(*runtime, value, sourceProps.assetHost);
|
|
74
|
-
} catch (const std::exception& exc) {
|
|
75
|
-
throw std::runtime_error(std::string("ChartWebview.assetHost: ") + exc.what());
|
|
76
|
-
}
|
|
77
|
-
}()),
|
|
78
68
|
bridgeScript([&]() -> CachedProp<std::optional<std::string>> {
|
|
79
69
|
try {
|
|
80
70
|
const react::RawValue* rawValue = rawProps.at("bridgeScript", nullptr, nullptr);
|
|
@@ -115,16 +105,6 @@ namespace margelo::nitro::chartwebview::views {
|
|
|
115
105
|
throw std::runtime_error(std::string("ChartWebview.active: ") + exc.what());
|
|
116
106
|
}
|
|
117
107
|
}()),
|
|
118
|
-
webviewDebuggingEnabled([&]() -> CachedProp<std::optional<bool>> {
|
|
119
|
-
try {
|
|
120
|
-
const react::RawValue* rawValue = rawProps.at("webviewDebuggingEnabled", nullptr, nullptr);
|
|
121
|
-
if (rawValue == nullptr) return sourceProps.webviewDebuggingEnabled;
|
|
122
|
-
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
123
|
-
return CachedProp<std::optional<bool>>::fromRawValue(*runtime, value, sourceProps.webviewDebuggingEnabled);
|
|
124
|
-
} catch (const std::exception& exc) {
|
|
125
|
-
throw std::runtime_error(std::string("ChartWebview.webviewDebuggingEnabled: ") + exc.what());
|
|
126
|
-
}
|
|
127
|
-
}()),
|
|
128
108
|
onMessage([&]() -> CachedProp<std::optional<std::function<void(const std::string& /* message */)>>> {
|
|
129
109
|
try {
|
|
130
110
|
const react::RawValue* rawValue = rawProps.at("onMessage", nullptr, nullptr);
|
|
@@ -172,12 +152,10 @@ namespace margelo::nitro::chartwebview::views {
|
|
|
172
152
|
localBundle(other.localBundle),
|
|
173
153
|
entry(other.entry),
|
|
174
154
|
paramsJson(other.paramsJson),
|
|
175
|
-
assetHost(other.assetHost),
|
|
176
155
|
bridgeScript(other.bridgeScript),
|
|
177
156
|
reuseKey(other.reuseKey),
|
|
178
157
|
pooled(other.pooled),
|
|
179
158
|
active(other.active),
|
|
180
|
-
webviewDebuggingEnabled(other.webviewDebuggingEnabled),
|
|
181
159
|
onMessage(other.onMessage),
|
|
182
160
|
onLoadEnd(other.onLoadEnd),
|
|
183
161
|
onError(other.onError),
|
|
@@ -189,12 +167,10 @@ namespace margelo::nitro::chartwebview::views {
|
|
|
189
167
|
case hashString("localBundle"): return true;
|
|
190
168
|
case hashString("entry"): return true;
|
|
191
169
|
case hashString("paramsJson"): return true;
|
|
192
|
-
case hashString("assetHost"): return true;
|
|
193
170
|
case hashString("bridgeScript"): return true;
|
|
194
171
|
case hashString("reuseKey"): return true;
|
|
195
172
|
case hashString("pooled"): return true;
|
|
196
173
|
case hashString("active"): return true;
|
|
197
|
-
case hashString("webviewDebuggingEnabled"): return true;
|
|
198
174
|
case hashString("onMessage"): return true;
|
|
199
175
|
case hashString("onLoadEnd"): return true;
|
|
200
176
|
case hashString("onError"): return true;
|
|
@@ -47,12 +47,10 @@ namespace margelo::nitro::chartwebview::views {
|
|
|
47
47
|
CachedProp<std::optional<std::string>> localBundle;
|
|
48
48
|
CachedProp<std::optional<std::string>> entry;
|
|
49
49
|
CachedProp<std::optional<std::string>> paramsJson;
|
|
50
|
-
CachedProp<std::optional<std::string>> assetHost;
|
|
51
50
|
CachedProp<std::optional<std::string>> bridgeScript;
|
|
52
51
|
CachedProp<std::optional<std::string>> reuseKey;
|
|
53
52
|
CachedProp<std::optional<bool>> pooled;
|
|
54
53
|
CachedProp<std::optional<bool>> active;
|
|
55
|
-
CachedProp<std::optional<bool>> webviewDebuggingEnabled;
|
|
56
54
|
CachedProp<std::optional<std::function<void(const std::string& /* message */)>>> onMessage;
|
|
57
55
|
CachedProp<std::optional<std::function<void()>>> onLoadEnd;
|
|
58
56
|
CachedProp<std::optional<std::function<void(const std::string& /* message */)>>> onError;
|
|
@@ -8,12 +8,10 @@
|
|
|
8
8
|
"localBundle": true,
|
|
9
9
|
"entry": true,
|
|
10
10
|
"paramsJson": true,
|
|
11
|
-
"assetHost": true,
|
|
12
11
|
"bridgeScript": true,
|
|
13
12
|
"reuseKey": true,
|
|
14
13
|
"pooled": true,
|
|
15
14
|
"active": true,
|
|
16
|
-
"webviewDebuggingEnabled": true,
|
|
17
15
|
"onMessage": true,
|
|
18
16
|
"onLoadEnd": true,
|
|
19
17
|
"onError": true,
|
|
@@ -4,12 +4,10 @@ export interface ChartWebviewProps extends HybridViewProps {
|
|
|
4
4
|
localBundle?: string;
|
|
5
5
|
entry?: string;
|
|
6
6
|
paramsJson?: string;
|
|
7
|
-
assetHost?: string;
|
|
8
7
|
bridgeScript?: string;
|
|
9
8
|
reuseKey?: string;
|
|
10
9
|
pooled?: boolean;
|
|
11
10
|
active?: boolean;
|
|
12
|
-
webviewDebuggingEnabled?: boolean;
|
|
13
11
|
onMessage?: (message: string) => void;
|
|
14
12
|
onLoadEnd?: () => void;
|
|
15
13
|
onError?: (message: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartWebview.nitro.d.ts","sourceRoot":"","sources":["../../../src/ChartWebview.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,eAAe,EAChB,MAAM,4BAA4B,CAAC;AAKpC,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IAGxD,GAAG,CAAC,EAAE,MAAM,CAAC;IAIb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IAIf,UAAU,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"ChartWebview.nitro.d.ts","sourceRoot":"","sources":["../../../src/ChartWebview.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,eAAe,EAChB,MAAM,4BAA4B,CAAC;AAKpC,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IAGxD,GAAG,CAAC,EAAE,MAAM,CAAC;IAIb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IAIf,UAAU,CAAC,EAAE,MAAM,CAAC;IAMpB,YAAY,CAAC,EAAE,MAAM,CAAC;IAItB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,MAAM,CAAC,EAAE,OAAO,CAAC;IAMjB,MAAM,CAAC,EAAE,OAAO,CAAC;IAIjB,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAG5D,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,MAAM,IAAI,IAAI,CAAC;IAGf,aAAa,IAAI,IAAI,CAAC;CACvB;AAED,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAAC"}
|
|
@@ -16,12 +16,10 @@ export declare function ChartWebviewView({ bridgeScript, hybridRef, onMessage, o
|
|
|
16
16
|
localBundle?: string | undefined;
|
|
17
17
|
entry?: string | undefined;
|
|
18
18
|
paramsJson?: string | undefined;
|
|
19
|
-
assetHost?: string | undefined;
|
|
20
19
|
bridgeScript?: string | undefined;
|
|
21
20
|
reuseKey?: string | undefined;
|
|
22
21
|
pooled?: boolean | undefined;
|
|
23
22
|
active?: boolean | undefined;
|
|
24
|
-
webviewDebuggingEnabled?: boolean | undefined;
|
|
25
23
|
onMessage?: NitroViewWrappedCallback<((message: string) => void) | undefined> | undefined;
|
|
26
24
|
onLoadEnd?: NitroViewWrappedCallback<(() => void) | undefined> | undefined;
|
|
27
25
|
onError?: NitroViewWrappedCallback<((message: string) => void) | undefined> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGnF,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAO3C,KAAK,oBAAoB,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,IACxD,CAAC,GACD,wBAAwB,CAAC,CAAC,CAAC,CAAC;AAEhC,KAAK,qBAAqB,GAAG,IAAI,CAC/B,iBAAiB,EACjB,WAAW,GAAG,WAAW,GAAG,SAAS,CACtC,GACC,SAAS,GAAG;IACV,SAAS,CAAC,EAAE,oBAAoB,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC,CAAC;IACrD,SAAS,CAAC,EAAE,oBAAoB,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC,CAAC;IAC5D,SAAS,CAAC,EAAE,oBAAoB,CAAC,MAAM,IAAI,CAAC,CAAC;IAC7C,OAAO,CAAC,EAAE,oBAAoB,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC,CAAC;CAC3D,CAAC;AAcJ,wBAAgB,gBAAgB,CAAC,EAC/B,YAAY,EACZ,SAAS,EACT,SAAS,EACT,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACT,EAAE,qBAAqB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGnF,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAO3C,KAAK,oBAAoB,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,IACxD,CAAC,GACD,wBAAwB,CAAC,CAAC,CAAC,CAAC;AAEhC,KAAK,qBAAqB,GAAG,IAAI,CAC/B,iBAAiB,EACjB,WAAW,GAAG,WAAW,GAAG,SAAS,CACtC,GACC,SAAS,GAAG;IACV,SAAS,CAAC,EAAE,oBAAoB,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC,CAAC;IACrD,SAAS,CAAC,EAAE,oBAAoB,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC,CAAC;IAC5D,SAAS,CAAC,EAAE,oBAAoB,CAAC,MAAM,IAAI,CAAC,CAAC;IAC7C,OAAO,CAAC,EAAE,oBAAoB,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC,CAAC;CAC3D,CAAC;AAcJ,wBAAgB,gBAAgB,CAAC,EAC/B,YAAY,EACZ,SAAS,EACT,SAAS,EACT,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACT,EAAE,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDvB"}
|
|
@@ -81,15 +81,6 @@ namespace margelo::nitro::chartwebview {
|
|
|
81
81
|
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JString> /* paramsJson */)>("setParamsJson");
|
|
82
82
|
method(_javaPart, paramsJson.has_value() ? jni::make_jstring(paramsJson.value()) : nullptr);
|
|
83
83
|
}
|
|
84
|
-
std::optional<std::string> JHybridChartWebviewSpec::getAssetHost() {
|
|
85
|
-
static const auto method = javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getAssetHost");
|
|
86
|
-
auto __result = method(_javaPart);
|
|
87
|
-
return __result != nullptr ? std::make_optional(__result->toStdString()) : std::nullopt;
|
|
88
|
-
}
|
|
89
|
-
void JHybridChartWebviewSpec::setAssetHost(const std::optional<std::string>& assetHost) {
|
|
90
|
-
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JString> /* assetHost */)>("setAssetHost");
|
|
91
|
-
method(_javaPart, assetHost.has_value() ? jni::make_jstring(assetHost.value()) : nullptr);
|
|
92
|
-
}
|
|
93
84
|
std::optional<std::string> JHybridChartWebviewSpec::getBridgeScript() {
|
|
94
85
|
static const auto method = javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getBridgeScript");
|
|
95
86
|
auto __result = method(_javaPart);
|
|
@@ -126,15 +117,6 @@ namespace margelo::nitro::chartwebview {
|
|
|
126
117
|
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JBoolean> /* active */)>("setActive");
|
|
127
118
|
method(_javaPart, active.has_value() ? jni::JBoolean::valueOf(active.value()) : nullptr);
|
|
128
119
|
}
|
|
129
|
-
std::optional<bool> JHybridChartWebviewSpec::getWebviewDebuggingEnabled() {
|
|
130
|
-
static const auto method = javaClassStatic()->getMethod<jni::local_ref<jni::JBoolean>()>("getWebviewDebuggingEnabled");
|
|
131
|
-
auto __result = method(_javaPart);
|
|
132
|
-
return __result != nullptr ? std::make_optional(static_cast<bool>(__result->value())) : std::nullopt;
|
|
133
|
-
}
|
|
134
|
-
void JHybridChartWebviewSpec::setWebviewDebuggingEnabled(std::optional<bool> webviewDebuggingEnabled) {
|
|
135
|
-
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JBoolean> /* webviewDebuggingEnabled */)>("setWebviewDebuggingEnabled");
|
|
136
|
-
method(_javaPart, webviewDebuggingEnabled.has_value() ? jni::JBoolean::valueOf(webviewDebuggingEnabled.value()) : nullptr);
|
|
137
|
-
}
|
|
138
120
|
std::optional<std::function<void(const std::string& /* message */)>> JHybridChartWebviewSpec::getOnMessage() {
|
|
139
121
|
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JFunc_void_std__string::javaobject>()>("getOnMessage_cxx");
|
|
140
122
|
auto __result = method(_javaPart);
|
|
@@ -58,8 +58,6 @@ namespace margelo::nitro::chartwebview {
|
|
|
58
58
|
void setEntry(const std::optional<std::string>& entry) override;
|
|
59
59
|
std::optional<std::string> getParamsJson() override;
|
|
60
60
|
void setParamsJson(const std::optional<std::string>& paramsJson) override;
|
|
61
|
-
std::optional<std::string> getAssetHost() override;
|
|
62
|
-
void setAssetHost(const std::optional<std::string>& assetHost) override;
|
|
63
61
|
std::optional<std::string> getBridgeScript() override;
|
|
64
62
|
void setBridgeScript(const std::optional<std::string>& bridgeScript) override;
|
|
65
63
|
std::optional<std::string> getReuseKey() override;
|
|
@@ -68,8 +66,6 @@ namespace margelo::nitro::chartwebview {
|
|
|
68
66
|
void setPooled(std::optional<bool> pooled) override;
|
|
69
67
|
std::optional<bool> getActive() override;
|
|
70
68
|
void setActive(std::optional<bool> active) override;
|
|
71
|
-
std::optional<bool> getWebviewDebuggingEnabled() override;
|
|
72
|
-
void setWebviewDebuggingEnabled(std::optional<bool> webviewDebuggingEnabled) override;
|
|
73
69
|
std::optional<std::function<void(const std::string& /* message */)>> getOnMessage() override;
|
|
74
70
|
void setOnMessage(const std::optional<std::function<void(const std::string& /* message */)>>& onMessage) override;
|
|
75
71
|
std::optional<std::function<void()>> getOnLoadEnd() override;
|
|
@@ -52,10 +52,6 @@ void JHybridChartWebviewStateUpdater::updateViewProps(jni::alias_ref<jni::JClass
|
|
|
52
52
|
view->setParamsJson(props.paramsJson.value);
|
|
53
53
|
// TODO: Set isDirty = false
|
|
54
54
|
}
|
|
55
|
-
if (props.assetHost.isDirty) {
|
|
56
|
-
view->setAssetHost(props.assetHost.value);
|
|
57
|
-
// TODO: Set isDirty = false
|
|
58
|
-
}
|
|
59
55
|
if (props.bridgeScript.isDirty) {
|
|
60
56
|
view->setBridgeScript(props.bridgeScript.value);
|
|
61
57
|
// TODO: Set isDirty = false
|
|
@@ -72,10 +68,6 @@ void JHybridChartWebviewStateUpdater::updateViewProps(jni::alias_ref<jni::JClass
|
|
|
72
68
|
view->setActive(props.active.value);
|
|
73
69
|
// TODO: Set isDirty = false
|
|
74
70
|
}
|
|
75
|
-
if (props.webviewDebuggingEnabled.isDirty) {
|
|
76
|
-
view->setWebviewDebuggingEnabled(props.webviewDebuggingEnabled.value);
|
|
77
|
-
// TODO: Set isDirty = false
|
|
78
|
-
}
|
|
79
71
|
if (props.onMessage.isDirty) {
|
|
80
72
|
view->setOnMessage(props.onMessage.value);
|
|
81
73
|
// TODO: Set isDirty = false
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/chartwebview/HybridChartWebviewSpec.kt
CHANGED
|
@@ -66,12 +66,6 @@ abstract class HybridChartWebviewSpec: HybridView() {
|
|
|
66
66
|
@set:Keep
|
|
67
67
|
abstract var paramsJson: String?
|
|
68
68
|
|
|
69
|
-
@get:DoNotStrip
|
|
70
|
-
@get:Keep
|
|
71
|
-
@set:DoNotStrip
|
|
72
|
-
@set:Keep
|
|
73
|
-
abstract var assetHost: String?
|
|
74
|
-
|
|
75
69
|
@get:DoNotStrip
|
|
76
70
|
@get:Keep
|
|
77
71
|
@set:DoNotStrip
|
|
@@ -96,12 +90,6 @@ abstract class HybridChartWebviewSpec: HybridView() {
|
|
|
96
90
|
@set:Keep
|
|
97
91
|
abstract var active: Boolean?
|
|
98
92
|
|
|
99
|
-
@get:DoNotStrip
|
|
100
|
-
@get:Keep
|
|
101
|
-
@set:DoNotStrip
|
|
102
|
-
@set:Keep
|
|
103
|
-
abstract var webviewDebuggingEnabled: Boolean?
|
|
104
|
-
|
|
105
93
|
abstract var onMessage: ((message: String) -> Unit)?
|
|
106
94
|
|
|
107
95
|
private var onMessage_cxx: Func_void_std__string?
|
|
@@ -86,13 +86,6 @@ namespace margelo::nitro::chartwebview {
|
|
|
86
86
|
inline void setParamsJson(const std::optional<std::string>& paramsJson) noexcept override {
|
|
87
87
|
_swiftPart.setParamsJson(paramsJson);
|
|
88
88
|
}
|
|
89
|
-
inline std::optional<std::string> getAssetHost() noexcept override {
|
|
90
|
-
auto __result = _swiftPart.getAssetHost();
|
|
91
|
-
return __result;
|
|
92
|
-
}
|
|
93
|
-
inline void setAssetHost(const std::optional<std::string>& assetHost) noexcept override {
|
|
94
|
-
_swiftPart.setAssetHost(assetHost);
|
|
95
|
-
}
|
|
96
89
|
inline std::optional<std::string> getBridgeScript() noexcept override {
|
|
97
90
|
auto __result = _swiftPart.getBridgeScript();
|
|
98
91
|
return __result;
|
|
@@ -121,13 +114,6 @@ namespace margelo::nitro::chartwebview {
|
|
|
121
114
|
inline void setActive(std::optional<bool> active) noexcept override {
|
|
122
115
|
_swiftPart.setActive(active);
|
|
123
116
|
}
|
|
124
|
-
inline std::optional<bool> getWebviewDebuggingEnabled() noexcept override {
|
|
125
|
-
auto __result = _swiftPart.getWebviewDebuggingEnabled();
|
|
126
|
-
return __result;
|
|
127
|
-
}
|
|
128
|
-
inline void setWebviewDebuggingEnabled(std::optional<bool> webviewDebuggingEnabled) noexcept override {
|
|
129
|
-
_swiftPart.setWebviewDebuggingEnabled(webviewDebuggingEnabled);
|
|
130
|
-
}
|
|
131
117
|
inline std::optional<std::function<void(const std::string& /* message */)>> getOnMessage() noexcept override {
|
|
132
118
|
auto __result = _swiftPart.getOnMessage();
|
|
133
119
|
return __result;
|