@onekeyfe/react-native-auto-size-input 1.1.28 → 1.1.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/com/margelo/nitro/autosizeinput/AutoSizeInput.kt +242 -67
- package/ios/AutoSizeInput.swift +75 -4
- package/lib/nitrogen/generated/android/c++/JHybridAutoSizeInputSpec.cpp +27 -0
- package/lib/nitrogen/generated/android/c++/JHybridAutoSizeInputSpec.hpp +6 -0
- package/lib/nitrogen/generated/android/c++/views/JHybridAutoSizeInputStateUpdater.cpp +12 -0
- package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/autosizeinput/HybridAutoSizeInputSpec.kt +18 -0
- package/lib/nitrogen/generated/ios/c++/HybridAutoSizeInputSpecSwift.hpp +21 -0
- package/lib/nitrogen/generated/ios/c++/views/HybridAutoSizeInputComponent.mm +15 -0
- package/lib/nitrogen/generated/ios/swift/HybridAutoSizeInputSpec.swift +3 -0
- package/lib/nitrogen/generated/ios/swift/HybridAutoSizeInputSpec_cxx.swift +72 -0
- package/lib/nitrogen/generated/shared/c++/HybridAutoSizeInputSpec.cpp +6 -0
- package/lib/nitrogen/generated/shared/c++/HybridAutoSizeInputSpec.hpp +6 -0
- package/lib/nitrogen/generated/shared/c++/views/HybridAutoSizeInputComponent.cpp +36 -0
- package/lib/nitrogen/generated/shared/c++/views/HybridAutoSizeInputComponent.hpp +3 -0
- package/lib/nitrogen/generated/shared/json/AutoSizeInputConfig.json +3 -0
- package/lib/typescript/src/AutoSizeInput.nitro.d.ts +3 -0
- package/lib/typescript/src/AutoSizeInput.nitro.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JHybridAutoSizeInputSpec.cpp +27 -0
- package/nitrogen/generated/android/c++/JHybridAutoSizeInputSpec.hpp +6 -0
- package/nitrogen/generated/android/c++/views/JHybridAutoSizeInputStateUpdater.cpp +12 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/autosizeinput/HybridAutoSizeInputSpec.kt +18 -0
- package/nitrogen/generated/ios/c++/HybridAutoSizeInputSpecSwift.hpp +21 -0
- package/nitrogen/generated/ios/c++/views/HybridAutoSizeInputComponent.mm +15 -0
- package/nitrogen/generated/ios/swift/HybridAutoSizeInputSpec.swift +3 -0
- package/nitrogen/generated/ios/swift/HybridAutoSizeInputSpec_cxx.swift +72 -0
- package/nitrogen/generated/shared/c++/HybridAutoSizeInputSpec.cpp +6 -0
- package/nitrogen/generated/shared/c++/HybridAutoSizeInputSpec.hpp +6 -0
- package/nitrogen/generated/shared/c++/views/HybridAutoSizeInputComponent.cpp +36 -0
- package/nitrogen/generated/shared/c++/views/HybridAutoSizeInputComponent.hpp +3 -0
- package/nitrogen/generated/shared/json/AutoSizeInputConfig.json +3 -0
- package/package.json +1 -1
- package/src/AutoSizeInput.nitro.ts +7 -0
|
@@ -252,6 +252,33 @@ namespace margelo::nitro::autosizeinput {
|
|
|
252
252
|
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JDouble> /* suffixMarginLeft */)>("setSuffixMarginLeft");
|
|
253
253
|
method(_javaPart, suffixMarginLeft.has_value() ? jni::JDouble::valueOf(suffixMarginLeft.value()) : nullptr);
|
|
254
254
|
}
|
|
255
|
+
std::optional<bool> JHybridAutoSizeInputSpec::getShowBorder() {
|
|
256
|
+
static const auto method = javaClassStatic()->getMethod<jni::local_ref<jni::JBoolean>()>("getShowBorder");
|
|
257
|
+
auto __result = method(_javaPart);
|
|
258
|
+
return __result != nullptr ? std::make_optional(static_cast<bool>(__result->value())) : std::nullopt;
|
|
259
|
+
}
|
|
260
|
+
void JHybridAutoSizeInputSpec::setShowBorder(std::optional<bool> showBorder) {
|
|
261
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JBoolean> /* showBorder */)>("setShowBorder");
|
|
262
|
+
method(_javaPart, showBorder.has_value() ? jni::JBoolean::valueOf(showBorder.value()) : nullptr);
|
|
263
|
+
}
|
|
264
|
+
std::optional<std::string> JHybridAutoSizeInputSpec::getInputBackgroundColor() {
|
|
265
|
+
static const auto method = javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getInputBackgroundColor");
|
|
266
|
+
auto __result = method(_javaPart);
|
|
267
|
+
return __result != nullptr ? std::make_optional(__result->toStdString()) : std::nullopt;
|
|
268
|
+
}
|
|
269
|
+
void JHybridAutoSizeInputSpec::setInputBackgroundColor(const std::optional<std::string>& inputBackgroundColor) {
|
|
270
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JString> /* inputBackgroundColor */)>("setInputBackgroundColor");
|
|
271
|
+
method(_javaPart, inputBackgroundColor.has_value() ? jni::make_jstring(inputBackgroundColor.value()) : nullptr);
|
|
272
|
+
}
|
|
273
|
+
std::optional<bool> JHybridAutoSizeInputSpec::getContentAutoWidth() {
|
|
274
|
+
static const auto method = javaClassStatic()->getMethod<jni::local_ref<jni::JBoolean>()>("getContentAutoWidth");
|
|
275
|
+
auto __result = method(_javaPart);
|
|
276
|
+
return __result != nullptr ? std::make_optional(static_cast<bool>(__result->value())) : std::nullopt;
|
|
277
|
+
}
|
|
278
|
+
void JHybridAutoSizeInputSpec::setContentAutoWidth(std::optional<bool> contentAutoWidth) {
|
|
279
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JBoolean> /* contentAutoWidth */)>("setContentAutoWidth");
|
|
280
|
+
method(_javaPart, contentAutoWidth.has_value() ? jni::JBoolean::valueOf(contentAutoWidth.value()) : nullptr);
|
|
281
|
+
}
|
|
255
282
|
std::optional<std::function<void(const std::string& /* text */)>> JHybridAutoSizeInputSpec::getOnChangeText() {
|
|
256
283
|
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JFunc_void_std__string::javaobject>()>("getOnChangeText_cxx");
|
|
257
284
|
auto __result = method(_javaPart);
|
|
@@ -96,6 +96,12 @@ namespace margelo::nitro::autosizeinput {
|
|
|
96
96
|
void setPrefixMarginRight(std::optional<double> prefixMarginRight) override;
|
|
97
97
|
std::optional<double> getSuffixMarginLeft() override;
|
|
98
98
|
void setSuffixMarginLeft(std::optional<double> suffixMarginLeft) override;
|
|
99
|
+
std::optional<bool> getShowBorder() override;
|
|
100
|
+
void setShowBorder(std::optional<bool> showBorder) override;
|
|
101
|
+
std::optional<std::string> getInputBackgroundColor() override;
|
|
102
|
+
void setInputBackgroundColor(const std::optional<std::string>& inputBackgroundColor) override;
|
|
103
|
+
std::optional<bool> getContentAutoWidth() override;
|
|
104
|
+
void setContentAutoWidth(std::optional<bool> contentAutoWidth) override;
|
|
99
105
|
std::optional<std::function<void(const std::string& /* text */)>> getOnChangeText() override;
|
|
100
106
|
void setOnChangeText(const std::optional<std::function<void(const std::string& /* text */)>>& onChangeText) override;
|
|
101
107
|
std::optional<std::function<void()>> getOnFocus() override;
|
|
@@ -128,6 +128,18 @@ void JHybridAutoSizeInputStateUpdater::updateViewProps(jni::alias_ref<jni::JClas
|
|
|
128
128
|
view->setSuffixMarginLeft(props.suffixMarginLeft.value);
|
|
129
129
|
// TODO: Set isDirty = false
|
|
130
130
|
}
|
|
131
|
+
if (props.showBorder.isDirty) {
|
|
132
|
+
view->setShowBorder(props.showBorder.value);
|
|
133
|
+
// TODO: Set isDirty = false
|
|
134
|
+
}
|
|
135
|
+
if (props.inputBackgroundColor.isDirty) {
|
|
136
|
+
view->setInputBackgroundColor(props.inputBackgroundColor.value);
|
|
137
|
+
// TODO: Set isDirty = false
|
|
138
|
+
}
|
|
139
|
+
if (props.contentAutoWidth.isDirty) {
|
|
140
|
+
view->setContentAutoWidth(props.contentAutoWidth.value);
|
|
141
|
+
// TODO: Set isDirty = false
|
|
142
|
+
}
|
|
131
143
|
if (props.onChangeText.isDirty) {
|
|
132
144
|
view->setOnChangeText(props.onChangeText.value);
|
|
133
145
|
// TODO: Set isDirty = false
|
|
@@ -180,6 +180,24 @@ abstract class HybridAutoSizeInputSpec: HybridView() {
|
|
|
180
180
|
@set:Keep
|
|
181
181
|
abstract var suffixMarginLeft: Double?
|
|
182
182
|
|
|
183
|
+
@get:DoNotStrip
|
|
184
|
+
@get:Keep
|
|
185
|
+
@set:DoNotStrip
|
|
186
|
+
@set:Keep
|
|
187
|
+
abstract var showBorder: Boolean?
|
|
188
|
+
|
|
189
|
+
@get:DoNotStrip
|
|
190
|
+
@get:Keep
|
|
191
|
+
@set:DoNotStrip
|
|
192
|
+
@set:Keep
|
|
193
|
+
abstract var inputBackgroundColor: String?
|
|
194
|
+
|
|
195
|
+
@get:DoNotStrip
|
|
196
|
+
@get:Keep
|
|
197
|
+
@set:DoNotStrip
|
|
198
|
+
@set:Keep
|
|
199
|
+
abstract var contentAutoWidth: Boolean?
|
|
200
|
+
|
|
183
201
|
abstract var onChangeText: ((text: String) -> Unit)?
|
|
184
202
|
|
|
185
203
|
private var onChangeText_cxx: Func_void_std__string?
|
|
@@ -219,6 +219,27 @@ namespace margelo::nitro::autosizeinput {
|
|
|
219
219
|
inline void setSuffixMarginLeft(std::optional<double> suffixMarginLeft) noexcept override {
|
|
220
220
|
_swiftPart.setSuffixMarginLeft(suffixMarginLeft);
|
|
221
221
|
}
|
|
222
|
+
inline std::optional<bool> getShowBorder() noexcept override {
|
|
223
|
+
auto __result = _swiftPart.getShowBorder();
|
|
224
|
+
return __result;
|
|
225
|
+
}
|
|
226
|
+
inline void setShowBorder(std::optional<bool> showBorder) noexcept override {
|
|
227
|
+
_swiftPart.setShowBorder(showBorder);
|
|
228
|
+
}
|
|
229
|
+
inline std::optional<std::string> getInputBackgroundColor() noexcept override {
|
|
230
|
+
auto __result = _swiftPart.getInputBackgroundColor();
|
|
231
|
+
return __result;
|
|
232
|
+
}
|
|
233
|
+
inline void setInputBackgroundColor(const std::optional<std::string>& inputBackgroundColor) noexcept override {
|
|
234
|
+
_swiftPart.setInputBackgroundColor(inputBackgroundColor);
|
|
235
|
+
}
|
|
236
|
+
inline std::optional<bool> getContentAutoWidth() noexcept override {
|
|
237
|
+
auto __result = _swiftPart.getContentAutoWidth();
|
|
238
|
+
return __result;
|
|
239
|
+
}
|
|
240
|
+
inline void setContentAutoWidth(std::optional<bool> contentAutoWidth) noexcept override {
|
|
241
|
+
_swiftPart.setContentAutoWidth(contentAutoWidth);
|
|
242
|
+
}
|
|
222
243
|
inline std::optional<std::function<void(const std::string& /* text */)>> getOnChangeText() noexcept override {
|
|
223
244
|
auto __result = _swiftPart.getOnChangeText();
|
|
224
245
|
return __result;
|
|
@@ -186,6 +186,21 @@ using namespace margelo::nitro::autosizeinput::views;
|
|
|
186
186
|
swiftPart.setSuffixMarginLeft(newViewProps.suffixMarginLeft.value);
|
|
187
187
|
newViewProps.suffixMarginLeft.isDirty = false;
|
|
188
188
|
}
|
|
189
|
+
// showBorder: optional
|
|
190
|
+
if (newViewProps.showBorder.isDirty) {
|
|
191
|
+
swiftPart.setShowBorder(newViewProps.showBorder.value);
|
|
192
|
+
newViewProps.showBorder.isDirty = false;
|
|
193
|
+
}
|
|
194
|
+
// inputBackgroundColor: optional
|
|
195
|
+
if (newViewProps.inputBackgroundColor.isDirty) {
|
|
196
|
+
swiftPart.setInputBackgroundColor(newViewProps.inputBackgroundColor.value);
|
|
197
|
+
newViewProps.inputBackgroundColor.isDirty = false;
|
|
198
|
+
}
|
|
199
|
+
// contentAutoWidth: optional
|
|
200
|
+
if (newViewProps.contentAutoWidth.isDirty) {
|
|
201
|
+
swiftPart.setContentAutoWidth(newViewProps.contentAutoWidth.value);
|
|
202
|
+
newViewProps.contentAutoWidth.isDirty = false;
|
|
203
|
+
}
|
|
189
204
|
// onChangeText: optional
|
|
190
205
|
if (newViewProps.onChangeText.isDirty) {
|
|
191
206
|
swiftPart.setOnChangeText(newViewProps.onChangeText.value);
|
|
@@ -34,6 +34,9 @@ public protocol HybridAutoSizeInputSpec_protocol: HybridObject, HybridView {
|
|
|
34
34
|
var selectionColor: String? { get set }
|
|
35
35
|
var prefixMarginRight: Double? { get set }
|
|
36
36
|
var suffixMarginLeft: Double? { get set }
|
|
37
|
+
var showBorder: Bool? { get set }
|
|
38
|
+
var inputBackgroundColor: String? { get set }
|
|
39
|
+
var contentAutoWidth: Bool? { get set }
|
|
37
40
|
var onChangeText: ((_ text: String) -> Void)? { get set }
|
|
38
41
|
var onFocus: (() -> Void)? { get set }
|
|
39
42
|
var onBlur: (() -> Void)? { get set }
|
|
@@ -631,6 +631,78 @@ open class HybridAutoSizeInputSpec_cxx {
|
|
|
631
631
|
}
|
|
632
632
|
}
|
|
633
633
|
|
|
634
|
+
public final var showBorder: bridge.std__optional_bool_ {
|
|
635
|
+
@inline(__always)
|
|
636
|
+
get {
|
|
637
|
+
return { () -> bridge.std__optional_bool_ in
|
|
638
|
+
if let __unwrappedValue = self.__implementation.showBorder {
|
|
639
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
640
|
+
} else {
|
|
641
|
+
return .init()
|
|
642
|
+
}
|
|
643
|
+
}()
|
|
644
|
+
}
|
|
645
|
+
@inline(__always)
|
|
646
|
+
set {
|
|
647
|
+
self.__implementation.showBorder = { () -> Bool? in
|
|
648
|
+
if bridge.has_value_std__optional_bool_(newValue) {
|
|
649
|
+
let __unwrapped = bridge.get_std__optional_bool_(newValue)
|
|
650
|
+
return __unwrapped
|
|
651
|
+
} else {
|
|
652
|
+
return nil
|
|
653
|
+
}
|
|
654
|
+
}()
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
public final var inputBackgroundColor: bridge.std__optional_std__string_ {
|
|
659
|
+
@inline(__always)
|
|
660
|
+
get {
|
|
661
|
+
return { () -> bridge.std__optional_std__string_ in
|
|
662
|
+
if let __unwrappedValue = self.__implementation.inputBackgroundColor {
|
|
663
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
664
|
+
} else {
|
|
665
|
+
return .init()
|
|
666
|
+
}
|
|
667
|
+
}()
|
|
668
|
+
}
|
|
669
|
+
@inline(__always)
|
|
670
|
+
set {
|
|
671
|
+
self.__implementation.inputBackgroundColor = { () -> String? in
|
|
672
|
+
if bridge.has_value_std__optional_std__string_(newValue) {
|
|
673
|
+
let __unwrapped = bridge.get_std__optional_std__string_(newValue)
|
|
674
|
+
return String(__unwrapped)
|
|
675
|
+
} else {
|
|
676
|
+
return nil
|
|
677
|
+
}
|
|
678
|
+
}()
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
public final var contentAutoWidth: bridge.std__optional_bool_ {
|
|
683
|
+
@inline(__always)
|
|
684
|
+
get {
|
|
685
|
+
return { () -> bridge.std__optional_bool_ in
|
|
686
|
+
if let __unwrappedValue = self.__implementation.contentAutoWidth {
|
|
687
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
688
|
+
} else {
|
|
689
|
+
return .init()
|
|
690
|
+
}
|
|
691
|
+
}()
|
|
692
|
+
}
|
|
693
|
+
@inline(__always)
|
|
694
|
+
set {
|
|
695
|
+
self.__implementation.contentAutoWidth = { () -> Bool? in
|
|
696
|
+
if bridge.has_value_std__optional_bool_(newValue) {
|
|
697
|
+
let __unwrapped = bridge.get_std__optional_bool_(newValue)
|
|
698
|
+
return __unwrapped
|
|
699
|
+
} else {
|
|
700
|
+
return nil
|
|
701
|
+
}
|
|
702
|
+
}()
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
|
|
634
706
|
public final var onChangeText: bridge.std__optional_std__function_void_const_std__string_____text______ {
|
|
635
707
|
@inline(__always)
|
|
636
708
|
get {
|
|
@@ -60,6 +60,12 @@ namespace margelo::nitro::autosizeinput {
|
|
|
60
60
|
prototype.registerHybridSetter("prefixMarginRight", &HybridAutoSizeInputSpec::setPrefixMarginRight);
|
|
61
61
|
prototype.registerHybridGetter("suffixMarginLeft", &HybridAutoSizeInputSpec::getSuffixMarginLeft);
|
|
62
62
|
prototype.registerHybridSetter("suffixMarginLeft", &HybridAutoSizeInputSpec::setSuffixMarginLeft);
|
|
63
|
+
prototype.registerHybridGetter("showBorder", &HybridAutoSizeInputSpec::getShowBorder);
|
|
64
|
+
prototype.registerHybridSetter("showBorder", &HybridAutoSizeInputSpec::setShowBorder);
|
|
65
|
+
prototype.registerHybridGetter("inputBackgroundColor", &HybridAutoSizeInputSpec::getInputBackgroundColor);
|
|
66
|
+
prototype.registerHybridSetter("inputBackgroundColor", &HybridAutoSizeInputSpec::setInputBackgroundColor);
|
|
67
|
+
prototype.registerHybridGetter("contentAutoWidth", &HybridAutoSizeInputSpec::getContentAutoWidth);
|
|
68
|
+
prototype.registerHybridSetter("contentAutoWidth", &HybridAutoSizeInputSpec::setContentAutoWidth);
|
|
63
69
|
prototype.registerHybridGetter("onChangeText", &HybridAutoSizeInputSpec::getOnChangeText);
|
|
64
70
|
prototype.registerHybridSetter("onChangeText", &HybridAutoSizeInputSpec::setOnChangeText);
|
|
65
71
|
prototype.registerHybridGetter("onFocus", &HybridAutoSizeInputSpec::getOnFocus);
|
|
@@ -92,6 +92,12 @@ namespace margelo::nitro::autosizeinput {
|
|
|
92
92
|
virtual void setPrefixMarginRight(std::optional<double> prefixMarginRight) = 0;
|
|
93
93
|
virtual std::optional<double> getSuffixMarginLeft() = 0;
|
|
94
94
|
virtual void setSuffixMarginLeft(std::optional<double> suffixMarginLeft) = 0;
|
|
95
|
+
virtual std::optional<bool> getShowBorder() = 0;
|
|
96
|
+
virtual void setShowBorder(std::optional<bool> showBorder) = 0;
|
|
97
|
+
virtual std::optional<std::string> getInputBackgroundColor() = 0;
|
|
98
|
+
virtual void setInputBackgroundColor(const std::optional<std::string>& inputBackgroundColor) = 0;
|
|
99
|
+
virtual std::optional<bool> getContentAutoWidth() = 0;
|
|
100
|
+
virtual void setContentAutoWidth(std::optional<bool> contentAutoWidth) = 0;
|
|
95
101
|
virtual std::optional<std::function<void(const std::string& /* text */)>> getOnChangeText() = 0;
|
|
96
102
|
virtual void setOnChangeText(const std::optional<std::function<void(const std::string& /* text */)>>& onChangeText) = 0;
|
|
97
103
|
virtual std::optional<std::function<void()>> getOnFocus() = 0;
|
|
@@ -255,6 +255,36 @@ namespace margelo::nitro::autosizeinput::views {
|
|
|
255
255
|
throw std::runtime_error(std::string("AutoSizeInput.suffixMarginLeft: ") + exc.what());
|
|
256
256
|
}
|
|
257
257
|
}()),
|
|
258
|
+
showBorder([&]() -> CachedProp<std::optional<bool>> {
|
|
259
|
+
try {
|
|
260
|
+
const react::RawValue* rawValue = rawProps.at("showBorder", nullptr, nullptr);
|
|
261
|
+
if (rawValue == nullptr) return sourceProps.showBorder;
|
|
262
|
+
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
263
|
+
return CachedProp<std::optional<bool>>::fromRawValue(*runtime, value, sourceProps.showBorder);
|
|
264
|
+
} catch (const std::exception& exc) {
|
|
265
|
+
throw std::runtime_error(std::string("AutoSizeInput.showBorder: ") + exc.what());
|
|
266
|
+
}
|
|
267
|
+
}()),
|
|
268
|
+
inputBackgroundColor([&]() -> CachedProp<std::optional<std::string>> {
|
|
269
|
+
try {
|
|
270
|
+
const react::RawValue* rawValue = rawProps.at("inputBackgroundColor", nullptr, nullptr);
|
|
271
|
+
if (rawValue == nullptr) return sourceProps.inputBackgroundColor;
|
|
272
|
+
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
273
|
+
return CachedProp<std::optional<std::string>>::fromRawValue(*runtime, value, sourceProps.inputBackgroundColor);
|
|
274
|
+
} catch (const std::exception& exc) {
|
|
275
|
+
throw std::runtime_error(std::string("AutoSizeInput.inputBackgroundColor: ") + exc.what());
|
|
276
|
+
}
|
|
277
|
+
}()),
|
|
278
|
+
contentAutoWidth([&]() -> CachedProp<std::optional<bool>> {
|
|
279
|
+
try {
|
|
280
|
+
const react::RawValue* rawValue = rawProps.at("contentAutoWidth", nullptr, nullptr);
|
|
281
|
+
if (rawValue == nullptr) return sourceProps.contentAutoWidth;
|
|
282
|
+
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
283
|
+
return CachedProp<std::optional<bool>>::fromRawValue(*runtime, value, sourceProps.contentAutoWidth);
|
|
284
|
+
} catch (const std::exception& exc) {
|
|
285
|
+
throw std::runtime_error(std::string("AutoSizeInput.contentAutoWidth: ") + exc.what());
|
|
286
|
+
}
|
|
287
|
+
}()),
|
|
258
288
|
onChangeText([&]() -> CachedProp<std::optional<std::function<void(const std::string& /* text */)>>> {
|
|
259
289
|
try {
|
|
260
290
|
const react::RawValue* rawValue = rawProps.at("onChangeText", nullptr, nullptr);
|
|
@@ -321,6 +351,9 @@ namespace margelo::nitro::autosizeinput::views {
|
|
|
321
351
|
selectionColor(other.selectionColor),
|
|
322
352
|
prefixMarginRight(other.prefixMarginRight),
|
|
323
353
|
suffixMarginLeft(other.suffixMarginLeft),
|
|
354
|
+
showBorder(other.showBorder),
|
|
355
|
+
inputBackgroundColor(other.inputBackgroundColor),
|
|
356
|
+
contentAutoWidth(other.contentAutoWidth),
|
|
324
357
|
onChangeText(other.onChangeText),
|
|
325
358
|
onFocus(other.onFocus),
|
|
326
359
|
onBlur(other.onBlur),
|
|
@@ -351,6 +384,9 @@ namespace margelo::nitro::autosizeinput::views {
|
|
|
351
384
|
case hashString("selectionColor"): return true;
|
|
352
385
|
case hashString("prefixMarginRight"): return true;
|
|
353
386
|
case hashString("suffixMarginLeft"): return true;
|
|
387
|
+
case hashString("showBorder"): return true;
|
|
388
|
+
case hashString("inputBackgroundColor"): return true;
|
|
389
|
+
case hashString("contentAutoWidth"): return true;
|
|
354
390
|
case hashString("onChangeText"): return true;
|
|
355
391
|
case hashString("onFocus"): return true;
|
|
356
392
|
case hashString("onBlur"): return true;
|
|
@@ -66,6 +66,9 @@ namespace margelo::nitro::autosizeinput::views {
|
|
|
66
66
|
CachedProp<std::optional<std::string>> selectionColor;
|
|
67
67
|
CachedProp<std::optional<double>> prefixMarginRight;
|
|
68
68
|
CachedProp<std::optional<double>> suffixMarginLeft;
|
|
69
|
+
CachedProp<std::optional<bool>> showBorder;
|
|
70
|
+
CachedProp<std::optional<std::string>> inputBackgroundColor;
|
|
71
|
+
CachedProp<std::optional<bool>> contentAutoWidth;
|
|
69
72
|
CachedProp<std::optional<std::function<void(const std::string& /* text */)>>> onChangeText;
|
|
70
73
|
CachedProp<std::optional<std::function<void()>>> onFocus;
|
|
71
74
|
CachedProp<std::optional<std::function<void()>>> onBlur;
|
|
@@ -23,6 +23,9 @@ export interface AutoSizeInputProps extends HybridViewProps {
|
|
|
23
23
|
selectionColor?: string;
|
|
24
24
|
prefixMarginRight?: number;
|
|
25
25
|
suffixMarginLeft?: number;
|
|
26
|
+
showBorder?: boolean;
|
|
27
|
+
inputBackgroundColor?: string;
|
|
28
|
+
contentAutoWidth?: boolean;
|
|
26
29
|
onChangeText?: (text: string) => void;
|
|
27
30
|
onFocus?: () => void;
|
|
28
31
|
onBlur?: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoSizeInput.nitro.d.ts","sourceRoot":"","sources":["../../../src/AutoSizeInput.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,eAAe,EAChB,MAAM,4BAA4B,CAAC;AAEpC,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IAEzD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAG1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAGnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IAGxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAG1B,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC7D,KAAK,IAAI,IAAI,CAAC;IACd,IAAI,IAAI,IAAI,CAAC;CACd;AAED,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,kBAAkB,EAAE,oBAAoB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"AutoSizeInput.nitro.d.ts","sourceRoot":"","sources":["../../../src/AutoSizeInput.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,eAAe,EAChB,MAAM,4BAA4B,CAAC;AAEpC,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IAEzD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAG1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAGnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IAGxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAG1B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAG9B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAG3B,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC7D,KAAK,IAAI,IAAI,CAAC;IACd,IAAI,IAAI,IAAI,CAAC;CACd;AAED,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,kBAAkB,EAAE,oBAAoB,CAAC,CAAC"}
|
|
@@ -252,6 +252,33 @@ namespace margelo::nitro::autosizeinput {
|
|
|
252
252
|
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JDouble> /* suffixMarginLeft */)>("setSuffixMarginLeft");
|
|
253
253
|
method(_javaPart, suffixMarginLeft.has_value() ? jni::JDouble::valueOf(suffixMarginLeft.value()) : nullptr);
|
|
254
254
|
}
|
|
255
|
+
std::optional<bool> JHybridAutoSizeInputSpec::getShowBorder() {
|
|
256
|
+
static const auto method = javaClassStatic()->getMethod<jni::local_ref<jni::JBoolean>()>("getShowBorder");
|
|
257
|
+
auto __result = method(_javaPart);
|
|
258
|
+
return __result != nullptr ? std::make_optional(static_cast<bool>(__result->value())) : std::nullopt;
|
|
259
|
+
}
|
|
260
|
+
void JHybridAutoSizeInputSpec::setShowBorder(std::optional<bool> showBorder) {
|
|
261
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JBoolean> /* showBorder */)>("setShowBorder");
|
|
262
|
+
method(_javaPart, showBorder.has_value() ? jni::JBoolean::valueOf(showBorder.value()) : nullptr);
|
|
263
|
+
}
|
|
264
|
+
std::optional<std::string> JHybridAutoSizeInputSpec::getInputBackgroundColor() {
|
|
265
|
+
static const auto method = javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getInputBackgroundColor");
|
|
266
|
+
auto __result = method(_javaPart);
|
|
267
|
+
return __result != nullptr ? std::make_optional(__result->toStdString()) : std::nullopt;
|
|
268
|
+
}
|
|
269
|
+
void JHybridAutoSizeInputSpec::setInputBackgroundColor(const std::optional<std::string>& inputBackgroundColor) {
|
|
270
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JString> /* inputBackgroundColor */)>("setInputBackgroundColor");
|
|
271
|
+
method(_javaPart, inputBackgroundColor.has_value() ? jni::make_jstring(inputBackgroundColor.value()) : nullptr);
|
|
272
|
+
}
|
|
273
|
+
std::optional<bool> JHybridAutoSizeInputSpec::getContentAutoWidth() {
|
|
274
|
+
static const auto method = javaClassStatic()->getMethod<jni::local_ref<jni::JBoolean>()>("getContentAutoWidth");
|
|
275
|
+
auto __result = method(_javaPart);
|
|
276
|
+
return __result != nullptr ? std::make_optional(static_cast<bool>(__result->value())) : std::nullopt;
|
|
277
|
+
}
|
|
278
|
+
void JHybridAutoSizeInputSpec::setContentAutoWidth(std::optional<bool> contentAutoWidth) {
|
|
279
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JBoolean> /* contentAutoWidth */)>("setContentAutoWidth");
|
|
280
|
+
method(_javaPart, contentAutoWidth.has_value() ? jni::JBoolean::valueOf(contentAutoWidth.value()) : nullptr);
|
|
281
|
+
}
|
|
255
282
|
std::optional<std::function<void(const std::string& /* text */)>> JHybridAutoSizeInputSpec::getOnChangeText() {
|
|
256
283
|
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JFunc_void_std__string::javaobject>()>("getOnChangeText_cxx");
|
|
257
284
|
auto __result = method(_javaPart);
|
|
@@ -96,6 +96,12 @@ namespace margelo::nitro::autosizeinput {
|
|
|
96
96
|
void setPrefixMarginRight(std::optional<double> prefixMarginRight) override;
|
|
97
97
|
std::optional<double> getSuffixMarginLeft() override;
|
|
98
98
|
void setSuffixMarginLeft(std::optional<double> suffixMarginLeft) override;
|
|
99
|
+
std::optional<bool> getShowBorder() override;
|
|
100
|
+
void setShowBorder(std::optional<bool> showBorder) override;
|
|
101
|
+
std::optional<std::string> getInputBackgroundColor() override;
|
|
102
|
+
void setInputBackgroundColor(const std::optional<std::string>& inputBackgroundColor) override;
|
|
103
|
+
std::optional<bool> getContentAutoWidth() override;
|
|
104
|
+
void setContentAutoWidth(std::optional<bool> contentAutoWidth) override;
|
|
99
105
|
std::optional<std::function<void(const std::string& /* text */)>> getOnChangeText() override;
|
|
100
106
|
void setOnChangeText(const std::optional<std::function<void(const std::string& /* text */)>>& onChangeText) override;
|
|
101
107
|
std::optional<std::function<void()>> getOnFocus() override;
|
|
@@ -128,6 +128,18 @@ void JHybridAutoSizeInputStateUpdater::updateViewProps(jni::alias_ref<jni::JClas
|
|
|
128
128
|
view->setSuffixMarginLeft(props.suffixMarginLeft.value);
|
|
129
129
|
// TODO: Set isDirty = false
|
|
130
130
|
}
|
|
131
|
+
if (props.showBorder.isDirty) {
|
|
132
|
+
view->setShowBorder(props.showBorder.value);
|
|
133
|
+
// TODO: Set isDirty = false
|
|
134
|
+
}
|
|
135
|
+
if (props.inputBackgroundColor.isDirty) {
|
|
136
|
+
view->setInputBackgroundColor(props.inputBackgroundColor.value);
|
|
137
|
+
// TODO: Set isDirty = false
|
|
138
|
+
}
|
|
139
|
+
if (props.contentAutoWidth.isDirty) {
|
|
140
|
+
view->setContentAutoWidth(props.contentAutoWidth.value);
|
|
141
|
+
// TODO: Set isDirty = false
|
|
142
|
+
}
|
|
131
143
|
if (props.onChangeText.isDirty) {
|
|
132
144
|
view->setOnChangeText(props.onChangeText.value);
|
|
133
145
|
// TODO: Set isDirty = false
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/autosizeinput/HybridAutoSizeInputSpec.kt
CHANGED
|
@@ -180,6 +180,24 @@ abstract class HybridAutoSizeInputSpec: HybridView() {
|
|
|
180
180
|
@set:Keep
|
|
181
181
|
abstract var suffixMarginLeft: Double?
|
|
182
182
|
|
|
183
|
+
@get:DoNotStrip
|
|
184
|
+
@get:Keep
|
|
185
|
+
@set:DoNotStrip
|
|
186
|
+
@set:Keep
|
|
187
|
+
abstract var showBorder: Boolean?
|
|
188
|
+
|
|
189
|
+
@get:DoNotStrip
|
|
190
|
+
@get:Keep
|
|
191
|
+
@set:DoNotStrip
|
|
192
|
+
@set:Keep
|
|
193
|
+
abstract var inputBackgroundColor: String?
|
|
194
|
+
|
|
195
|
+
@get:DoNotStrip
|
|
196
|
+
@get:Keep
|
|
197
|
+
@set:DoNotStrip
|
|
198
|
+
@set:Keep
|
|
199
|
+
abstract var contentAutoWidth: Boolean?
|
|
200
|
+
|
|
183
201
|
abstract var onChangeText: ((text: String) -> Unit)?
|
|
184
202
|
|
|
185
203
|
private var onChangeText_cxx: Func_void_std__string?
|
|
@@ -219,6 +219,27 @@ namespace margelo::nitro::autosizeinput {
|
|
|
219
219
|
inline void setSuffixMarginLeft(std::optional<double> suffixMarginLeft) noexcept override {
|
|
220
220
|
_swiftPart.setSuffixMarginLeft(suffixMarginLeft);
|
|
221
221
|
}
|
|
222
|
+
inline std::optional<bool> getShowBorder() noexcept override {
|
|
223
|
+
auto __result = _swiftPart.getShowBorder();
|
|
224
|
+
return __result;
|
|
225
|
+
}
|
|
226
|
+
inline void setShowBorder(std::optional<bool> showBorder) noexcept override {
|
|
227
|
+
_swiftPart.setShowBorder(showBorder);
|
|
228
|
+
}
|
|
229
|
+
inline std::optional<std::string> getInputBackgroundColor() noexcept override {
|
|
230
|
+
auto __result = _swiftPart.getInputBackgroundColor();
|
|
231
|
+
return __result;
|
|
232
|
+
}
|
|
233
|
+
inline void setInputBackgroundColor(const std::optional<std::string>& inputBackgroundColor) noexcept override {
|
|
234
|
+
_swiftPart.setInputBackgroundColor(inputBackgroundColor);
|
|
235
|
+
}
|
|
236
|
+
inline std::optional<bool> getContentAutoWidth() noexcept override {
|
|
237
|
+
auto __result = _swiftPart.getContentAutoWidth();
|
|
238
|
+
return __result;
|
|
239
|
+
}
|
|
240
|
+
inline void setContentAutoWidth(std::optional<bool> contentAutoWidth) noexcept override {
|
|
241
|
+
_swiftPart.setContentAutoWidth(contentAutoWidth);
|
|
242
|
+
}
|
|
222
243
|
inline std::optional<std::function<void(const std::string& /* text */)>> getOnChangeText() noexcept override {
|
|
223
244
|
auto __result = _swiftPart.getOnChangeText();
|
|
224
245
|
return __result;
|
|
@@ -186,6 +186,21 @@ using namespace margelo::nitro::autosizeinput::views;
|
|
|
186
186
|
swiftPart.setSuffixMarginLeft(newViewProps.suffixMarginLeft.value);
|
|
187
187
|
newViewProps.suffixMarginLeft.isDirty = false;
|
|
188
188
|
}
|
|
189
|
+
// showBorder: optional
|
|
190
|
+
if (newViewProps.showBorder.isDirty) {
|
|
191
|
+
swiftPart.setShowBorder(newViewProps.showBorder.value);
|
|
192
|
+
newViewProps.showBorder.isDirty = false;
|
|
193
|
+
}
|
|
194
|
+
// inputBackgroundColor: optional
|
|
195
|
+
if (newViewProps.inputBackgroundColor.isDirty) {
|
|
196
|
+
swiftPart.setInputBackgroundColor(newViewProps.inputBackgroundColor.value);
|
|
197
|
+
newViewProps.inputBackgroundColor.isDirty = false;
|
|
198
|
+
}
|
|
199
|
+
// contentAutoWidth: optional
|
|
200
|
+
if (newViewProps.contentAutoWidth.isDirty) {
|
|
201
|
+
swiftPart.setContentAutoWidth(newViewProps.contentAutoWidth.value);
|
|
202
|
+
newViewProps.contentAutoWidth.isDirty = false;
|
|
203
|
+
}
|
|
189
204
|
// onChangeText: optional
|
|
190
205
|
if (newViewProps.onChangeText.isDirty) {
|
|
191
206
|
swiftPart.setOnChangeText(newViewProps.onChangeText.value);
|
|
@@ -34,6 +34,9 @@ public protocol HybridAutoSizeInputSpec_protocol: HybridObject, HybridView {
|
|
|
34
34
|
var selectionColor: String? { get set }
|
|
35
35
|
var prefixMarginRight: Double? { get set }
|
|
36
36
|
var suffixMarginLeft: Double? { get set }
|
|
37
|
+
var showBorder: Bool? { get set }
|
|
38
|
+
var inputBackgroundColor: String? { get set }
|
|
39
|
+
var contentAutoWidth: Bool? { get set }
|
|
37
40
|
var onChangeText: ((_ text: String) -> Void)? { get set }
|
|
38
41
|
var onFocus: (() -> Void)? { get set }
|
|
39
42
|
var onBlur: (() -> Void)? { get set }
|
|
@@ -631,6 +631,78 @@ open class HybridAutoSizeInputSpec_cxx {
|
|
|
631
631
|
}
|
|
632
632
|
}
|
|
633
633
|
|
|
634
|
+
public final var showBorder: bridge.std__optional_bool_ {
|
|
635
|
+
@inline(__always)
|
|
636
|
+
get {
|
|
637
|
+
return { () -> bridge.std__optional_bool_ in
|
|
638
|
+
if let __unwrappedValue = self.__implementation.showBorder {
|
|
639
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
640
|
+
} else {
|
|
641
|
+
return .init()
|
|
642
|
+
}
|
|
643
|
+
}()
|
|
644
|
+
}
|
|
645
|
+
@inline(__always)
|
|
646
|
+
set {
|
|
647
|
+
self.__implementation.showBorder = { () -> Bool? in
|
|
648
|
+
if bridge.has_value_std__optional_bool_(newValue) {
|
|
649
|
+
let __unwrapped = bridge.get_std__optional_bool_(newValue)
|
|
650
|
+
return __unwrapped
|
|
651
|
+
} else {
|
|
652
|
+
return nil
|
|
653
|
+
}
|
|
654
|
+
}()
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
public final var inputBackgroundColor: bridge.std__optional_std__string_ {
|
|
659
|
+
@inline(__always)
|
|
660
|
+
get {
|
|
661
|
+
return { () -> bridge.std__optional_std__string_ in
|
|
662
|
+
if let __unwrappedValue = self.__implementation.inputBackgroundColor {
|
|
663
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
664
|
+
} else {
|
|
665
|
+
return .init()
|
|
666
|
+
}
|
|
667
|
+
}()
|
|
668
|
+
}
|
|
669
|
+
@inline(__always)
|
|
670
|
+
set {
|
|
671
|
+
self.__implementation.inputBackgroundColor = { () -> String? in
|
|
672
|
+
if bridge.has_value_std__optional_std__string_(newValue) {
|
|
673
|
+
let __unwrapped = bridge.get_std__optional_std__string_(newValue)
|
|
674
|
+
return String(__unwrapped)
|
|
675
|
+
} else {
|
|
676
|
+
return nil
|
|
677
|
+
}
|
|
678
|
+
}()
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
public final var contentAutoWidth: bridge.std__optional_bool_ {
|
|
683
|
+
@inline(__always)
|
|
684
|
+
get {
|
|
685
|
+
return { () -> bridge.std__optional_bool_ in
|
|
686
|
+
if let __unwrappedValue = self.__implementation.contentAutoWidth {
|
|
687
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
688
|
+
} else {
|
|
689
|
+
return .init()
|
|
690
|
+
}
|
|
691
|
+
}()
|
|
692
|
+
}
|
|
693
|
+
@inline(__always)
|
|
694
|
+
set {
|
|
695
|
+
self.__implementation.contentAutoWidth = { () -> Bool? in
|
|
696
|
+
if bridge.has_value_std__optional_bool_(newValue) {
|
|
697
|
+
let __unwrapped = bridge.get_std__optional_bool_(newValue)
|
|
698
|
+
return __unwrapped
|
|
699
|
+
} else {
|
|
700
|
+
return nil
|
|
701
|
+
}
|
|
702
|
+
}()
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
|
|
634
706
|
public final var onChangeText: bridge.std__optional_std__function_void_const_std__string_____text______ {
|
|
635
707
|
@inline(__always)
|
|
636
708
|
get {
|
|
@@ -60,6 +60,12 @@ namespace margelo::nitro::autosizeinput {
|
|
|
60
60
|
prototype.registerHybridSetter("prefixMarginRight", &HybridAutoSizeInputSpec::setPrefixMarginRight);
|
|
61
61
|
prototype.registerHybridGetter("suffixMarginLeft", &HybridAutoSizeInputSpec::getSuffixMarginLeft);
|
|
62
62
|
prototype.registerHybridSetter("suffixMarginLeft", &HybridAutoSizeInputSpec::setSuffixMarginLeft);
|
|
63
|
+
prototype.registerHybridGetter("showBorder", &HybridAutoSizeInputSpec::getShowBorder);
|
|
64
|
+
prototype.registerHybridSetter("showBorder", &HybridAutoSizeInputSpec::setShowBorder);
|
|
65
|
+
prototype.registerHybridGetter("inputBackgroundColor", &HybridAutoSizeInputSpec::getInputBackgroundColor);
|
|
66
|
+
prototype.registerHybridSetter("inputBackgroundColor", &HybridAutoSizeInputSpec::setInputBackgroundColor);
|
|
67
|
+
prototype.registerHybridGetter("contentAutoWidth", &HybridAutoSizeInputSpec::getContentAutoWidth);
|
|
68
|
+
prototype.registerHybridSetter("contentAutoWidth", &HybridAutoSizeInputSpec::setContentAutoWidth);
|
|
63
69
|
prototype.registerHybridGetter("onChangeText", &HybridAutoSizeInputSpec::getOnChangeText);
|
|
64
70
|
prototype.registerHybridSetter("onChangeText", &HybridAutoSizeInputSpec::setOnChangeText);
|
|
65
71
|
prototype.registerHybridGetter("onFocus", &HybridAutoSizeInputSpec::getOnFocus);
|
|
@@ -92,6 +92,12 @@ namespace margelo::nitro::autosizeinput {
|
|
|
92
92
|
virtual void setPrefixMarginRight(std::optional<double> prefixMarginRight) = 0;
|
|
93
93
|
virtual std::optional<double> getSuffixMarginLeft() = 0;
|
|
94
94
|
virtual void setSuffixMarginLeft(std::optional<double> suffixMarginLeft) = 0;
|
|
95
|
+
virtual std::optional<bool> getShowBorder() = 0;
|
|
96
|
+
virtual void setShowBorder(std::optional<bool> showBorder) = 0;
|
|
97
|
+
virtual std::optional<std::string> getInputBackgroundColor() = 0;
|
|
98
|
+
virtual void setInputBackgroundColor(const std::optional<std::string>& inputBackgroundColor) = 0;
|
|
99
|
+
virtual std::optional<bool> getContentAutoWidth() = 0;
|
|
100
|
+
virtual void setContentAutoWidth(std::optional<bool> contentAutoWidth) = 0;
|
|
95
101
|
virtual std::optional<std::function<void(const std::string& /* text */)>> getOnChangeText() = 0;
|
|
96
102
|
virtual void setOnChangeText(const std::optional<std::function<void(const std::string& /* text */)>>& onChangeText) = 0;
|
|
97
103
|
virtual std::optional<std::function<void()>> getOnFocus() = 0;
|