react-native-nitro-input 0.3.8 → 0.4.1
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/CHANGELOG.md +105 -0
- package/README.md +6 -1
- package/android/src/main/java/com/margelo/nitro/nitroinput/DigitSlots.kt +143 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroInputMeasure.kt +52 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroInputView.kt +80 -80
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroNumberView.kt +18 -18
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroTextView.kt +14 -14
- package/android/src/main/java/com/margelo/nitro/nitroinput/InputFonts.kt +244 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/InputSizing.kt +404 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/NitroInputView.kt +168 -338
- package/android/src/main/java/com/margelo/nitro/nitroinput/NitroNumberView.kt +178 -30
- package/ios/HybridNitroInputView.swift +73 -75
- package/ios/HybridNitroNumberView.swift +18 -18
- package/ios/HybridNitroTextView.swift +14 -14
- package/ios/InputSizing.swift +628 -0
- package/ios/NitroInputView.swift +180 -209
- package/ios/NitroNumberView.swift +98 -23
- package/lib/commonjs/nitrogen/generated/shared/json/NitroInputViewConfig.json +14 -8
- package/lib/commonjs/nitrogen/generated/shared/json/NitroNumberViewConfig.json +6 -6
- package/lib/commonjs/nitrogen/generated/shared/json/NitroTextViewConfig.json +6 -6
- package/lib/commonjs/src/NitroInput.js +166 -23
- package/lib/commonjs/src/NitroNumber.js +1 -1
- package/lib/commonjs/src/NitroText.js +6 -6
- package/lib/commonjs/src/specs/NitroInputMeasure.nitro.js +2 -0
- package/lib/module/nitrogen/generated/shared/json/NitroInputViewConfig.json +14 -8
- package/lib/module/nitrogen/generated/shared/json/NitroNumberViewConfig.json +6 -6
- package/lib/module/nitrogen/generated/shared/json/NitroTextViewConfig.json +6 -6
- package/lib/module/src/NitroInput.js +167 -24
- package/lib/module/src/NitroNumber.js +1 -1
- package/lib/module/src/NitroText.js +6 -6
- package/lib/module/src/specs/NitroInputMeasure.nitro.js +1 -0
- package/lib/typescript/src/NitroInput.d.ts +20 -16
- package/lib/typescript/src/specs/NitroInput.nitro.d.ts +21 -8
- package/lib/typescript/src/specs/NitroInputMeasure.nitro.d.ts +69 -0
- package/lib/typescript/src/specs/NitroNumber.nitro.d.ts +6 -6
- package/lib/typescript/src/specs/NitroText.nitro.d.ts +6 -6
- package/nitro.json +10 -0
- package/nitrogen/generated/android/NitroInput+autolinking.cmake +2 -0
- package/nitrogen/generated/android/NitroInputOnLoad.cpp +16 -0
- package/nitrogen/generated/android/c++/JHybridNitroInputMeasureSpec.cpp +93 -0
- package/nitrogen/generated/android/c++/JHybridNitroInputMeasureSpec.hpp +63 -0
- package/nitrogen/generated/android/c++/JHybridNitroInputViewSpec.cpp +94 -40
- package/nitrogen/generated/android/c++/JHybridNitroInputViewSpec.hpp +28 -16
- package/nitrogen/generated/android/c++/JHybridNitroNumberViewSpec.cpp +30 -30
- package/nitrogen/generated/android/c++/JHybridNitroNumberViewSpec.hpp +12 -12
- package/nitrogen/generated/android/c++/JHybridNitroTextViewSpec.cpp +30 -30
- package/nitrogen/generated/android/c++/JHybridNitroTextViewSpec.hpp +12 -12
- package/nitrogen/generated/android/c++/JNitroInputSize.hpp +61 -0
- package/nitrogen/generated/android/c++/JNitroInputSizing.hpp +292 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroInputViewStateUpdater.cpp +54 -24
- package/nitrogen/generated/android/c++/views/JHybridNitroNumberViewStateUpdater.cpp +18 -18
- package/nitrogen/generated/android/c++/views/JHybridNitroTextViewStateUpdater.cpp +18 -18
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroInputMeasureSpec.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroInputViewSpec.kt +44 -8
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroNumberViewSpec.kt +6 -6
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroTextViewSpec.kt +6 -6
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroInputSize.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroInputSizing.kt +256 -0
- package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Bridge.cpp +17 -0
- package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Bridge.hpp +29 -0
- package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Umbrella.hpp +11 -0
- package/nitrogen/generated/ios/NitroInputAutolinking.mm +8 -0
- package/nitrogen/generated/ios/NitroInputAutolinking.swift +12 -0
- package/nitrogen/generated/ios/c++/HybridNitroInputMeasureSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNitroInputMeasureSpecSwift.hpp +112 -0
- package/nitrogen/generated/ios/c++/HybridNitroInputViewSpecSwift.hpp +68 -32
- package/nitrogen/generated/ios/c++/HybridNitroNumberViewSpecSwift.hpp +24 -24
- package/nitrogen/generated/ios/c++/HybridNitroTextViewSpecSwift.hpp +24 -24
- package/nitrogen/generated/ios/c++/views/HybridNitroInputViewComponent.mm +68 -32
- package/nitrogen/generated/ios/c++/views/HybridNitroNumberViewComponent.mm +24 -24
- package/nitrogen/generated/ios/c++/views/HybridNitroTextViewComponent.mm +24 -24
- package/nitrogen/generated/ios/swift/HybridNitroInputMeasureSpec.swift +55 -0
- package/nitrogen/generated/ios/swift/HybridNitroInputMeasureSpec_cxx.swift +138 -0
- package/nitrogen/generated/ios/swift/HybridNitroInputViewSpec.swift +14 -8
- package/nitrogen/generated/ios/swift/HybridNitroInputViewSpec_cxx.swift +90 -24
- package/nitrogen/generated/ios/swift/HybridNitroNumberViewSpec.swift +6 -6
- package/nitrogen/generated/ios/swift/HybridNitroNumberViewSpec_cxx.swift +18 -18
- package/nitrogen/generated/ios/swift/HybridNitroTextViewSpec.swift +6 -6
- package/nitrogen/generated/ios/swift/HybridNitroTextViewSpec_cxx.swift +18 -18
- package/nitrogen/generated/ios/swift/NitroInputSize.swift +34 -0
- package/nitrogen/generated/ios/swift/NitroInputSizing.swift +252 -0
- package/nitrogen/generated/shared/c++/HybridNitroInputMeasureSpec.cpp +21 -0
- package/nitrogen/generated/shared/c++/HybridNitroInputMeasureSpec.hpp +66 -0
- package/nitrogen/generated/shared/c++/HybridNitroInputViewSpec.cpp +28 -16
- package/nitrogen/generated/shared/c++/HybridNitroInputViewSpec.hpp +28 -16
- package/nitrogen/generated/shared/c++/HybridNitroNumberViewSpec.cpp +12 -12
- package/nitrogen/generated/shared/c++/HybridNitroNumberViewSpec.hpp +12 -12
- package/nitrogen/generated/shared/c++/HybridNitroTextViewSpec.cpp +12 -12
- package/nitrogen/generated/shared/c++/HybridNitroTextViewSpec.hpp +12 -12
- package/nitrogen/generated/shared/c++/NitroInputSize.hpp +87 -0
- package/nitrogen/generated/shared/c++/NitroInputSizing.hpp +271 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroInputViewComponent.cpp +28 -16
- package/nitrogen/generated/shared/c++/views/HybridNitroInputViewComponent.hpp +42 -24
- package/nitrogen/generated/shared/c++/views/HybridNitroNumberViewComponent.cpp +12 -12
- package/nitrogen/generated/shared/c++/views/HybridNitroNumberViewComponent.hpp +18 -18
- package/nitrogen/generated/shared/c++/views/HybridNitroTextViewComponent.cpp +12 -12
- package/nitrogen/generated/shared/c++/views/HybridNitroTextViewComponent.hpp +18 -18
- package/nitrogen/generated/shared/json/NitroInputViewConfig.json +14 -8
- package/nitrogen/generated/shared/json/NitroNumberViewConfig.json +6 -6
- package/nitrogen/generated/shared/json/NitroTextViewConfig.json +6 -6
- package/package.json +4 -2
- package/src/NitroInput.tsx +215 -64
- package/src/NitroNumber.tsx +6 -6
- package/src/NitroText.tsx +6 -6
- package/src/specs/NitroInput.nitro.ts +21 -8
- package/src/specs/NitroInputMeasure.nitro.ts +78 -0
- package/src/specs/NitroNumber.nitro.ts +6 -6
- package/src/specs/NitroText.nitro.ts +6 -6
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroInputSize.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
namespace margelo::nitro::nitroinput {
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* A struct which can be represented as a JavaScript object (NitroInputSize).
|
|
39
|
+
*/
|
|
40
|
+
struct NitroInputSize final {
|
|
41
|
+
public:
|
|
42
|
+
double width SWIFT_PRIVATE;
|
|
43
|
+
double height SWIFT_PRIVATE;
|
|
44
|
+
|
|
45
|
+
public:
|
|
46
|
+
NitroInputSize() = default;
|
|
47
|
+
explicit NitroInputSize(double width, double height): width(width), height(height) {}
|
|
48
|
+
|
|
49
|
+
public:
|
|
50
|
+
friend bool operator==(const NitroInputSize& lhs, const NitroInputSize& rhs) = default;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
} // namespace margelo::nitro::nitroinput
|
|
54
|
+
|
|
55
|
+
namespace margelo::nitro {
|
|
56
|
+
|
|
57
|
+
// C++ NitroInputSize <> JS NitroInputSize (object)
|
|
58
|
+
template <>
|
|
59
|
+
struct JSIConverter<margelo::nitro::nitroinput::NitroInputSize> final {
|
|
60
|
+
static inline margelo::nitro::nitroinput::NitroInputSize fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
61
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
62
|
+
return margelo::nitro::nitroinput::NitroInputSize(
|
|
63
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "width"))),
|
|
64
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "height")))
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::nitroinput::NitroInputSize& arg) {
|
|
68
|
+
jsi::Object obj(runtime);
|
|
69
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "width"), JSIConverter<double>::toJSI(runtime, arg.width));
|
|
70
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "height"), JSIConverter<double>::toJSI(runtime, arg.height));
|
|
71
|
+
return obj;
|
|
72
|
+
}
|
|
73
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
74
|
+
if (!value.isObject()) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
jsi::Object obj = value.getObject(runtime);
|
|
78
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "width")))) return false;
|
|
82
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "height")))) return false;
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroInputSizing.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
30
|
+
|
|
31
|
+
// Forward declaration of `NitroInputMode` to properly resolve imports.
|
|
32
|
+
namespace margelo::nitro::nitroinput { enum class NitroInputMode; }
|
|
33
|
+
// Forward declaration of `NitroInputSignPlacement` to properly resolve imports.
|
|
34
|
+
namespace margelo::nitro::nitroinput { enum class NitroInputSignPlacement; }
|
|
35
|
+
// Forward declaration of `NitroInputNotation` to properly resolve imports.
|
|
36
|
+
namespace margelo::nitro::nitroinput { struct NitroInputNotation; }
|
|
37
|
+
// Forward declaration of `NitroInputMaskAffinity` to properly resolve imports.
|
|
38
|
+
namespace margelo::nitro::nitroinput { enum class NitroInputMaskAffinity; }
|
|
39
|
+
// Forward declaration of `NitroInputTextCase` to properly resolve imports.
|
|
40
|
+
namespace margelo::nitro::nitroinput { enum class NitroInputTextCase; }
|
|
41
|
+
// Forward declaration of `NitroInputCharacterMapping` to properly resolve imports.
|
|
42
|
+
namespace margelo::nitro::nitroinput { struct NitroInputCharacterMapping; }
|
|
43
|
+
// Forward declaration of `NitroInputVariant` to properly resolve imports.
|
|
44
|
+
namespace margelo::nitro::nitroinput { enum class NitroInputVariant; }
|
|
45
|
+
// Forward declaration of `NitroInputLabelBehavior` to properly resolve imports.
|
|
46
|
+
namespace margelo::nitro::nitroinput { enum class NitroInputLabelBehavior; }
|
|
47
|
+
|
|
48
|
+
#include <string>
|
|
49
|
+
#include "NitroInputMode.hpp"
|
|
50
|
+
#include "NitroInputSignPlacement.hpp"
|
|
51
|
+
#include "NitroInputNotation.hpp"
|
|
52
|
+
#include <vector>
|
|
53
|
+
#include "NitroInputMaskAffinity.hpp"
|
|
54
|
+
#include "NitroInputTextCase.hpp"
|
|
55
|
+
#include "NitroInputCharacterMapping.hpp"
|
|
56
|
+
#include "NitroInputVariant.hpp"
|
|
57
|
+
#include "NitroInputLabelBehavior.hpp"
|
|
58
|
+
|
|
59
|
+
namespace margelo::nitro::nitroinput {
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* A struct which can be represented as a JavaScript object (NitroInputSizing).
|
|
63
|
+
*/
|
|
64
|
+
struct NitroInputSizing final {
|
|
65
|
+
public:
|
|
66
|
+
std::string text SWIFT_PRIVATE;
|
|
67
|
+
NitroInputMode mode SWIFT_PRIVATE;
|
|
68
|
+
bool plain SWIFT_PRIVATE;
|
|
69
|
+
bool multiline SWIFT_PRIVATE;
|
|
70
|
+
bool secureTextEntry SWIFT_PRIVATE;
|
|
71
|
+
double maxLength SWIFT_PRIVATE;
|
|
72
|
+
double fractionDigits SWIFT_PRIVATE;
|
|
73
|
+
double maxIntegerDigits SWIFT_PRIVATE;
|
|
74
|
+
std::string groupingSeparator SWIFT_PRIVATE;
|
|
75
|
+
std::string decimalSeparator SWIFT_PRIVATE;
|
|
76
|
+
std::string prefix SWIFT_PRIVATE;
|
|
77
|
+
std::string suffix SWIFT_PRIVATE;
|
|
78
|
+
NitroInputSignPlacement signPlacement SWIFT_PRIVATE;
|
|
79
|
+
std::string placeholder SWIFT_PRIVATE;
|
|
80
|
+
std::string mask SWIFT_PRIVATE;
|
|
81
|
+
std::vector<NitroInputNotation> maskNotations SWIFT_PRIVATE;
|
|
82
|
+
bool maskAutocomplete SWIFT_PRIVATE;
|
|
83
|
+
bool maskAutoSkip SWIFT_PRIVATE;
|
|
84
|
+
std::vector<std::string> maskAffinityFormats SWIFT_PRIVATE;
|
|
85
|
+
NitroInputMaskAffinity maskAffinityStrategy SWIFT_PRIVATE;
|
|
86
|
+
NitroInputTextCase maskTextCase SWIFT_PRIVATE;
|
|
87
|
+
std::vector<NitroInputCharacterMapping> maskCharacterMap SWIFT_PRIVATE;
|
|
88
|
+
std::string maskSlotPlaceholder SWIFT_PRIVATE;
|
|
89
|
+
bool keepPlaceholder SWIFT_PRIVATE;
|
|
90
|
+
double textSize SWIFT_PRIVATE;
|
|
91
|
+
double textLineHeight SWIFT_PRIVATE;
|
|
92
|
+
double prefixFontSize SWIFT_PRIVATE;
|
|
93
|
+
double suffixFontSize SWIFT_PRIVATE;
|
|
94
|
+
double textWeight SWIFT_PRIVATE;
|
|
95
|
+
std::string textFamily SWIFT_PRIVATE;
|
|
96
|
+
double textLetterSpacing SWIFT_PRIVATE;
|
|
97
|
+
bool tabularNums SWIFT_PRIVATE;
|
|
98
|
+
bool slotDigits SWIFT_PRIVATE;
|
|
99
|
+
double prefixSpacing SWIFT_PRIVATE;
|
|
100
|
+
double suffixSpacing SWIFT_PRIVATE;
|
|
101
|
+
bool allowFontScaling SWIFT_PRIVATE;
|
|
102
|
+
double maxFontSizeMultiplier SWIFT_PRIVATE;
|
|
103
|
+
NitroInputVariant variant SWIFT_PRIVATE;
|
|
104
|
+
std::string label SWIFT_PRIVATE;
|
|
105
|
+
NitroInputLabelBehavior labelBehavior SWIFT_PRIVATE;
|
|
106
|
+
double labelFontSize SWIFT_PRIVATE;
|
|
107
|
+
double cornerRadius SWIFT_PRIVATE;
|
|
108
|
+
|
|
109
|
+
public:
|
|
110
|
+
NitroInputSizing() = default;
|
|
111
|
+
explicit NitroInputSizing(std::string text, NitroInputMode mode, bool plain, bool multiline, bool secureTextEntry, double maxLength, double fractionDigits, double maxIntegerDigits, std::string groupingSeparator, std::string decimalSeparator, std::string prefix, std::string suffix, NitroInputSignPlacement signPlacement, std::string placeholder, std::string mask, std::vector<NitroInputNotation> maskNotations, bool maskAutocomplete, bool maskAutoSkip, std::vector<std::string> maskAffinityFormats, NitroInputMaskAffinity maskAffinityStrategy, NitroInputTextCase maskTextCase, std::vector<NitroInputCharacterMapping> maskCharacterMap, std::string maskSlotPlaceholder, bool keepPlaceholder, double textSize, double textLineHeight, double prefixFontSize, double suffixFontSize, double textWeight, std::string textFamily, double textLetterSpacing, bool tabularNums, bool slotDigits, double prefixSpacing, double suffixSpacing, bool allowFontScaling, double maxFontSizeMultiplier, NitroInputVariant variant, std::string label, NitroInputLabelBehavior labelBehavior, double labelFontSize, double cornerRadius): text(text), mode(mode), plain(plain), multiline(multiline), secureTextEntry(secureTextEntry), maxLength(maxLength), fractionDigits(fractionDigits), maxIntegerDigits(maxIntegerDigits), groupingSeparator(groupingSeparator), decimalSeparator(decimalSeparator), prefix(prefix), suffix(suffix), signPlacement(signPlacement), placeholder(placeholder), mask(mask), maskNotations(maskNotations), maskAutocomplete(maskAutocomplete), maskAutoSkip(maskAutoSkip), maskAffinityFormats(maskAffinityFormats), maskAffinityStrategy(maskAffinityStrategy), maskTextCase(maskTextCase), maskCharacterMap(maskCharacterMap), maskSlotPlaceholder(maskSlotPlaceholder), keepPlaceholder(keepPlaceholder), textSize(textSize), textLineHeight(textLineHeight), prefixFontSize(prefixFontSize), suffixFontSize(suffixFontSize), textWeight(textWeight), textFamily(textFamily), textLetterSpacing(textLetterSpacing), tabularNums(tabularNums), slotDigits(slotDigits), prefixSpacing(prefixSpacing), suffixSpacing(suffixSpacing), allowFontScaling(allowFontScaling), maxFontSizeMultiplier(maxFontSizeMultiplier), variant(variant), label(label), labelBehavior(labelBehavior), labelFontSize(labelFontSize), cornerRadius(cornerRadius) {}
|
|
112
|
+
|
|
113
|
+
public:
|
|
114
|
+
friend bool operator==(const NitroInputSizing& lhs, const NitroInputSizing& rhs) = default;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
} // namespace margelo::nitro::nitroinput
|
|
118
|
+
|
|
119
|
+
namespace margelo::nitro {
|
|
120
|
+
|
|
121
|
+
// C++ NitroInputSizing <> JS NitroInputSizing (object)
|
|
122
|
+
template <>
|
|
123
|
+
struct JSIConverter<margelo::nitro::nitroinput::NitroInputSizing> final {
|
|
124
|
+
static inline margelo::nitro::nitroinput::NitroInputSizing fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
125
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
126
|
+
return margelo::nitro::nitroinput::NitroInputSizing(
|
|
127
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "text"))),
|
|
128
|
+
JSIConverter<margelo::nitro::nitroinput::NitroInputMode>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "mode"))),
|
|
129
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "plain"))),
|
|
130
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "multiline"))),
|
|
131
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "secureTextEntry"))),
|
|
132
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maxLength"))),
|
|
133
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "fractionDigits"))),
|
|
134
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maxIntegerDigits"))),
|
|
135
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "groupingSeparator"))),
|
|
136
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "decimalSeparator"))),
|
|
137
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "prefix"))),
|
|
138
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "suffix"))),
|
|
139
|
+
JSIConverter<margelo::nitro::nitroinput::NitroInputSignPlacement>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "signPlacement"))),
|
|
140
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "placeholder"))),
|
|
141
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "mask"))),
|
|
142
|
+
JSIConverter<std::vector<margelo::nitro::nitroinput::NitroInputNotation>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maskNotations"))),
|
|
143
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maskAutocomplete"))),
|
|
144
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maskAutoSkip"))),
|
|
145
|
+
JSIConverter<std::vector<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maskAffinityFormats"))),
|
|
146
|
+
JSIConverter<margelo::nitro::nitroinput::NitroInputMaskAffinity>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maskAffinityStrategy"))),
|
|
147
|
+
JSIConverter<margelo::nitro::nitroinput::NitroInputTextCase>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maskTextCase"))),
|
|
148
|
+
JSIConverter<std::vector<margelo::nitro::nitroinput::NitroInputCharacterMapping>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maskCharacterMap"))),
|
|
149
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maskSlotPlaceholder"))),
|
|
150
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "keepPlaceholder"))),
|
|
151
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "textSize"))),
|
|
152
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "textLineHeight"))),
|
|
153
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "prefixFontSize"))),
|
|
154
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "suffixFontSize"))),
|
|
155
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "textWeight"))),
|
|
156
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "textFamily"))),
|
|
157
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "textLetterSpacing"))),
|
|
158
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "tabularNums"))),
|
|
159
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "slotDigits"))),
|
|
160
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "prefixSpacing"))),
|
|
161
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "suffixSpacing"))),
|
|
162
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "allowFontScaling"))),
|
|
163
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maxFontSizeMultiplier"))),
|
|
164
|
+
JSIConverter<margelo::nitro::nitroinput::NitroInputVariant>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "variant"))),
|
|
165
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "label"))),
|
|
166
|
+
JSIConverter<margelo::nitro::nitroinput::NitroInputLabelBehavior>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "labelBehavior"))),
|
|
167
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "labelFontSize"))),
|
|
168
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "cornerRadius")))
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::nitroinput::NitroInputSizing& arg) {
|
|
172
|
+
jsi::Object obj(runtime);
|
|
173
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "text"), JSIConverter<std::string>::toJSI(runtime, arg.text));
|
|
174
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "mode"), JSIConverter<margelo::nitro::nitroinput::NitroInputMode>::toJSI(runtime, arg.mode));
|
|
175
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "plain"), JSIConverter<bool>::toJSI(runtime, arg.plain));
|
|
176
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "multiline"), JSIConverter<bool>::toJSI(runtime, arg.multiline));
|
|
177
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "secureTextEntry"), JSIConverter<bool>::toJSI(runtime, arg.secureTextEntry));
|
|
178
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "maxLength"), JSIConverter<double>::toJSI(runtime, arg.maxLength));
|
|
179
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "fractionDigits"), JSIConverter<double>::toJSI(runtime, arg.fractionDigits));
|
|
180
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "maxIntegerDigits"), JSIConverter<double>::toJSI(runtime, arg.maxIntegerDigits));
|
|
181
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "groupingSeparator"), JSIConverter<std::string>::toJSI(runtime, arg.groupingSeparator));
|
|
182
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "decimalSeparator"), JSIConverter<std::string>::toJSI(runtime, arg.decimalSeparator));
|
|
183
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "prefix"), JSIConverter<std::string>::toJSI(runtime, arg.prefix));
|
|
184
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "suffix"), JSIConverter<std::string>::toJSI(runtime, arg.suffix));
|
|
185
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "signPlacement"), JSIConverter<margelo::nitro::nitroinput::NitroInputSignPlacement>::toJSI(runtime, arg.signPlacement));
|
|
186
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "placeholder"), JSIConverter<std::string>::toJSI(runtime, arg.placeholder));
|
|
187
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "mask"), JSIConverter<std::string>::toJSI(runtime, arg.mask));
|
|
188
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "maskNotations"), JSIConverter<std::vector<margelo::nitro::nitroinput::NitroInputNotation>>::toJSI(runtime, arg.maskNotations));
|
|
189
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "maskAutocomplete"), JSIConverter<bool>::toJSI(runtime, arg.maskAutocomplete));
|
|
190
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "maskAutoSkip"), JSIConverter<bool>::toJSI(runtime, arg.maskAutoSkip));
|
|
191
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "maskAffinityFormats"), JSIConverter<std::vector<std::string>>::toJSI(runtime, arg.maskAffinityFormats));
|
|
192
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "maskAffinityStrategy"), JSIConverter<margelo::nitro::nitroinput::NitroInputMaskAffinity>::toJSI(runtime, arg.maskAffinityStrategy));
|
|
193
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "maskTextCase"), JSIConverter<margelo::nitro::nitroinput::NitroInputTextCase>::toJSI(runtime, arg.maskTextCase));
|
|
194
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "maskCharacterMap"), JSIConverter<std::vector<margelo::nitro::nitroinput::NitroInputCharacterMapping>>::toJSI(runtime, arg.maskCharacterMap));
|
|
195
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "maskSlotPlaceholder"), JSIConverter<std::string>::toJSI(runtime, arg.maskSlotPlaceholder));
|
|
196
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "keepPlaceholder"), JSIConverter<bool>::toJSI(runtime, arg.keepPlaceholder));
|
|
197
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "textSize"), JSIConverter<double>::toJSI(runtime, arg.textSize));
|
|
198
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "textLineHeight"), JSIConverter<double>::toJSI(runtime, arg.textLineHeight));
|
|
199
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "prefixFontSize"), JSIConverter<double>::toJSI(runtime, arg.prefixFontSize));
|
|
200
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "suffixFontSize"), JSIConverter<double>::toJSI(runtime, arg.suffixFontSize));
|
|
201
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "textWeight"), JSIConverter<double>::toJSI(runtime, arg.textWeight));
|
|
202
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "textFamily"), JSIConverter<std::string>::toJSI(runtime, arg.textFamily));
|
|
203
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "textLetterSpacing"), JSIConverter<double>::toJSI(runtime, arg.textLetterSpacing));
|
|
204
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "tabularNums"), JSIConverter<bool>::toJSI(runtime, arg.tabularNums));
|
|
205
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "slotDigits"), JSIConverter<bool>::toJSI(runtime, arg.slotDigits));
|
|
206
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "prefixSpacing"), JSIConverter<double>::toJSI(runtime, arg.prefixSpacing));
|
|
207
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "suffixSpacing"), JSIConverter<double>::toJSI(runtime, arg.suffixSpacing));
|
|
208
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "allowFontScaling"), JSIConverter<bool>::toJSI(runtime, arg.allowFontScaling));
|
|
209
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "maxFontSizeMultiplier"), JSIConverter<double>::toJSI(runtime, arg.maxFontSizeMultiplier));
|
|
210
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "variant"), JSIConverter<margelo::nitro::nitroinput::NitroInputVariant>::toJSI(runtime, arg.variant));
|
|
211
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "label"), JSIConverter<std::string>::toJSI(runtime, arg.label));
|
|
212
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "labelBehavior"), JSIConverter<margelo::nitro::nitroinput::NitroInputLabelBehavior>::toJSI(runtime, arg.labelBehavior));
|
|
213
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "labelFontSize"), JSIConverter<double>::toJSI(runtime, arg.labelFontSize));
|
|
214
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "cornerRadius"), JSIConverter<double>::toJSI(runtime, arg.cornerRadius));
|
|
215
|
+
return obj;
|
|
216
|
+
}
|
|
217
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
218
|
+
if (!value.isObject()) {
|
|
219
|
+
return false;
|
|
220
|
+
}
|
|
221
|
+
jsi::Object obj = value.getObject(runtime);
|
|
222
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
223
|
+
return false;
|
|
224
|
+
}
|
|
225
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "text")))) return false;
|
|
226
|
+
if (!JSIConverter<margelo::nitro::nitroinput::NitroInputMode>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "mode")))) return false;
|
|
227
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "plain")))) return false;
|
|
228
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "multiline")))) return false;
|
|
229
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "secureTextEntry")))) return false;
|
|
230
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maxLength")))) return false;
|
|
231
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "fractionDigits")))) return false;
|
|
232
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maxIntegerDigits")))) return false;
|
|
233
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "groupingSeparator")))) return false;
|
|
234
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "decimalSeparator")))) return false;
|
|
235
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "prefix")))) return false;
|
|
236
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "suffix")))) return false;
|
|
237
|
+
if (!JSIConverter<margelo::nitro::nitroinput::NitroInputSignPlacement>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "signPlacement")))) return false;
|
|
238
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "placeholder")))) return false;
|
|
239
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "mask")))) return false;
|
|
240
|
+
if (!JSIConverter<std::vector<margelo::nitro::nitroinput::NitroInputNotation>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maskNotations")))) return false;
|
|
241
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maskAutocomplete")))) return false;
|
|
242
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maskAutoSkip")))) return false;
|
|
243
|
+
if (!JSIConverter<std::vector<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maskAffinityFormats")))) return false;
|
|
244
|
+
if (!JSIConverter<margelo::nitro::nitroinput::NitroInputMaskAffinity>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maskAffinityStrategy")))) return false;
|
|
245
|
+
if (!JSIConverter<margelo::nitro::nitroinput::NitroInputTextCase>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maskTextCase")))) return false;
|
|
246
|
+
if (!JSIConverter<std::vector<margelo::nitro::nitroinput::NitroInputCharacterMapping>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maskCharacterMap")))) return false;
|
|
247
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maskSlotPlaceholder")))) return false;
|
|
248
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "keepPlaceholder")))) return false;
|
|
249
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "textSize")))) return false;
|
|
250
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "textLineHeight")))) return false;
|
|
251
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "prefixFontSize")))) return false;
|
|
252
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "suffixFontSize")))) return false;
|
|
253
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "textWeight")))) return false;
|
|
254
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "textFamily")))) return false;
|
|
255
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "textLetterSpacing")))) return false;
|
|
256
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "tabularNums")))) return false;
|
|
257
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "slotDigits")))) return false;
|
|
258
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "prefixSpacing")))) return false;
|
|
259
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "suffixSpacing")))) return false;
|
|
260
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "allowFontScaling")))) return false;
|
|
261
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maxFontSizeMultiplier")))) return false;
|
|
262
|
+
if (!JSIConverter<margelo::nitro::nitroinput::NitroInputVariant>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "variant")))) return false;
|
|
263
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "label")))) return false;
|
|
264
|
+
if (!JSIConverter<margelo::nitro::nitroinput::NitroInputLabelBehavior>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "labelBehavior")))) return false;
|
|
265
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "labelFontSize")))) return false;
|
|
266
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "cornerRadius")))) return false;
|
|
267
|
+
return true;
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
} // namespace margelo::nitro
|
|
@@ -56,7 +56,9 @@ namespace margelo::nitro::nitroinput::views {
|
|
|
56
56
|
signPlacement(nitro::ReactProp<NitroInputSignPlacement>::fromRawValue("NitroInputView", "signPlacement", rawProps, sourceProps.signPlacement)),
|
|
57
57
|
prefixAlign(nitro::ReactProp<NitroInputAffixAlign>::fromRawValue("NitroInputView", "prefixAlign", rawProps, sourceProps.prefixAlign)),
|
|
58
58
|
suffixAlign(nitro::ReactProp<NitroInputAffixAlign>::fromRawValue("NitroInputView", "suffixAlign", rawProps, sourceProps.suffixAlign)),
|
|
59
|
-
|
|
59
|
+
textLetterSpacing(nitro::ReactProp<double>::fromRawValue("NitroInputView", "textLetterSpacing", rawProps, sourceProps.textLetterSpacing)),
|
|
60
|
+
tabularNums(nitro::ReactProp<bool>::fromRawValue("NitroInputView", "tabularNums", rawProps, sourceProps.tabularNums)),
|
|
61
|
+
slotDigits(nitro::ReactProp<bool>::fromRawValue("NitroInputView", "slotDigits", rawProps, sourceProps.slotDigits)),
|
|
60
62
|
prefixSpacing(nitro::ReactProp<double>::fromRawValue("NitroInputView", "prefixSpacing", rawProps, sourceProps.prefixSpacing)),
|
|
61
63
|
suffixSpacing(nitro::ReactProp<double>::fromRawValue("NitroInputView", "suffixSpacing", rawProps, sourceProps.suffixSpacing)),
|
|
62
64
|
prefixOffset(nitro::ReactProp<double>::fromRawValue("NitroInputView", "prefixOffset", rawProps, sourceProps.prefixOffset)),
|
|
@@ -67,12 +69,12 @@ namespace margelo::nitro::nitroinput::views {
|
|
|
67
69
|
easing(nitro::ReactProp<NitroInputEasing>::fromRawValue("NitroInputView", "easing", rawProps, sourceProps.easing)),
|
|
68
70
|
bounce(nitro::ReactProp<double>::fromRawValue("NitroInputView", "bounce", rawProps, sourceProps.bounce)),
|
|
69
71
|
effect(nitro::ReactProp<NitroInputEffect>::fromRawValue("NitroInputView", "effect", rawProps, sourceProps.effect)),
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
textSize(nitro::ReactProp<double>::fromRawValue("NitroInputView", "textSize", rawProps, sourceProps.textSize)),
|
|
73
|
+
textLineHeight(nitro::ReactProp<double>::fromRawValue("NitroInputView", "textLineHeight", rawProps, sourceProps.textLineHeight)),
|
|
74
|
+
textWeight(nitro::ReactProp<double>::fromRawValue("NitroInputView", "textWeight", rawProps, sourceProps.textWeight)),
|
|
75
|
+
textFamily(nitro::ReactProp<std::string>::fromRawValue("NitroInputView", "textFamily", rawProps, sourceProps.textFamily)),
|
|
76
|
+
textColor(nitro::ReactProp<double>::fromRawValue("NitroInputView", "textColor", rawProps, sourceProps.textColor)),
|
|
77
|
+
textAlignment(nitro::ReactProp<NitroInputTextAlign>::fromRawValue("NitroInputView", "textAlignment", rawProps, sourceProps.textAlignment)),
|
|
76
78
|
rightToLeft(nitro::ReactProp<bool>::fromRawValue("NitroInputView", "rightToLeft", rawProps, sourceProps.rightToLeft)),
|
|
77
79
|
caretColor(nitro::ReactProp<double>::fromRawValue("NitroInputView", "caretColor", rawProps, sourceProps.caretColor)),
|
|
78
80
|
selectionColor(nitro::ReactProp<double>::fromRawValue("NitroInputView", "selectionColor", rawProps, sourceProps.selectionColor)),
|
|
@@ -88,7 +90,11 @@ namespace margelo::nitro::nitroinput::views {
|
|
|
88
90
|
editable(nitro::ReactProp<bool>::fromRawValue("NitroInputView", "editable", rawProps, sourceProps.editable)),
|
|
89
91
|
multiline(nitro::ReactProp<bool>::fromRawValue("NitroInputView", "multiline", rawProps, sourceProps.multiline)),
|
|
90
92
|
numberOfLines(nitro::ReactProp<double>::fromRawValue("NitroInputView", "numberOfLines", rawProps, sourceProps.numberOfLines)),
|
|
91
|
-
|
|
93
|
+
textVerticalAlignment(nitro::ReactProp<NitroInputTextAlignVertical>::fromRawValue("NitroInputView", "textVerticalAlignment", rawProps, sourceProps.textVerticalAlignment)),
|
|
94
|
+
textInsetLeft(nitro::ReactProp<double>::fromRawValue("NitroInputView", "textInsetLeft", rawProps, sourceProps.textInsetLeft)),
|
|
95
|
+
textInsetTop(nitro::ReactProp<double>::fromRawValue("NitroInputView", "textInsetTop", rawProps, sourceProps.textInsetTop)),
|
|
96
|
+
textInsetRight(nitro::ReactProp<double>::fromRawValue("NitroInputView", "textInsetRight", rawProps, sourceProps.textInsetRight)),
|
|
97
|
+
textInsetBottom(nitro::ReactProp<double>::fromRawValue("NitroInputView", "textInsetBottom", rawProps, sourceProps.textInsetBottom)),
|
|
92
98
|
scrollEnabled(nitro::ReactProp<bool>::fromRawValue("NitroInputView", "scrollEnabled", rawProps, sourceProps.scrollEnabled)),
|
|
93
99
|
autoFocus(nitro::ReactProp<bool>::fromRawValue("NitroInputView", "autoFocus", rawProps, sourceProps.autoFocus)),
|
|
94
100
|
fieldTestID(nitro::ReactProp<std::string>::fromRawValue("NitroInputView", "fieldTestID", rawProps, sourceProps.fieldTestID)),
|
|
@@ -165,7 +171,9 @@ namespace margelo::nitro::nitroinput::views {
|
|
|
165
171
|
case hashString("signPlacement"): return true;
|
|
166
172
|
case hashString("prefixAlign"): return true;
|
|
167
173
|
case hashString("suffixAlign"): return true;
|
|
168
|
-
case hashString("
|
|
174
|
+
case hashString("textLetterSpacing"): return true;
|
|
175
|
+
case hashString("tabularNums"): return true;
|
|
176
|
+
case hashString("slotDigits"): return true;
|
|
169
177
|
case hashString("prefixSpacing"): return true;
|
|
170
178
|
case hashString("suffixSpacing"): return true;
|
|
171
179
|
case hashString("prefixOffset"): return true;
|
|
@@ -176,12 +184,12 @@ namespace margelo::nitro::nitroinput::views {
|
|
|
176
184
|
case hashString("easing"): return true;
|
|
177
185
|
case hashString("bounce"): return true;
|
|
178
186
|
case hashString("effect"): return true;
|
|
179
|
-
case hashString("
|
|
180
|
-
case hashString("
|
|
181
|
-
case hashString("
|
|
182
|
-
case hashString("
|
|
183
|
-
case hashString("
|
|
184
|
-
case hashString("
|
|
187
|
+
case hashString("textSize"): return true;
|
|
188
|
+
case hashString("textLineHeight"): return true;
|
|
189
|
+
case hashString("textWeight"): return true;
|
|
190
|
+
case hashString("textFamily"): return true;
|
|
191
|
+
case hashString("textColor"): return true;
|
|
192
|
+
case hashString("textAlignment"): return true;
|
|
185
193
|
case hashString("rightToLeft"): return true;
|
|
186
194
|
case hashString("caretColor"): return true;
|
|
187
195
|
case hashString("selectionColor"): return true;
|
|
@@ -197,7 +205,11 @@ namespace margelo::nitro::nitroinput::views {
|
|
|
197
205
|
case hashString("editable"): return true;
|
|
198
206
|
case hashString("multiline"): return true;
|
|
199
207
|
case hashString("numberOfLines"): return true;
|
|
200
|
-
case hashString("
|
|
208
|
+
case hashString("textVerticalAlignment"): return true;
|
|
209
|
+
case hashString("textInsetLeft"): return true;
|
|
210
|
+
case hashString("textInsetTop"): return true;
|
|
211
|
+
case hashString("textInsetRight"): return true;
|
|
212
|
+
case hashString("textInsetBottom"): return true;
|
|
201
213
|
case hashString("scrollEnabled"): return true;
|
|
202
214
|
case hashString("autoFocus"): return true;
|
|
203
215
|
case hashString("fieldTestID"): return true;
|
|
@@ -98,7 +98,9 @@ namespace margelo::nitro::nitroinput::views {
|
|
|
98
98
|
nitro::ReactProp<NitroInputSignPlacement> signPlacement;
|
|
99
99
|
nitro::ReactProp<NitroInputAffixAlign> prefixAlign;
|
|
100
100
|
nitro::ReactProp<NitroInputAffixAlign> suffixAlign;
|
|
101
|
-
nitro::ReactProp<double>
|
|
101
|
+
nitro::ReactProp<double> textLetterSpacing;
|
|
102
|
+
nitro::ReactProp<bool> tabularNums;
|
|
103
|
+
nitro::ReactProp<bool> slotDigits;
|
|
102
104
|
nitro::ReactProp<double> prefixSpacing;
|
|
103
105
|
nitro::ReactProp<double> suffixSpacing;
|
|
104
106
|
nitro::ReactProp<double> prefixOffset;
|
|
@@ -109,12 +111,12 @@ namespace margelo::nitro::nitroinput::views {
|
|
|
109
111
|
nitro::ReactProp<NitroInputEasing> easing;
|
|
110
112
|
nitro::ReactProp<double> bounce;
|
|
111
113
|
nitro::ReactProp<NitroInputEffect> effect;
|
|
112
|
-
nitro::ReactProp<double>
|
|
113
|
-
nitro::ReactProp<double>
|
|
114
|
-
nitro::ReactProp<double>
|
|
115
|
-
nitro::ReactProp<std::string>
|
|
116
|
-
nitro::ReactProp<double>
|
|
117
|
-
nitro::ReactProp<NitroInputTextAlign>
|
|
114
|
+
nitro::ReactProp<double> textSize;
|
|
115
|
+
nitro::ReactProp<double> textLineHeight;
|
|
116
|
+
nitro::ReactProp<double> textWeight;
|
|
117
|
+
nitro::ReactProp<std::string> textFamily;
|
|
118
|
+
nitro::ReactProp<double> textColor;
|
|
119
|
+
nitro::ReactProp<NitroInputTextAlign> textAlignment;
|
|
118
120
|
nitro::ReactProp<bool> rightToLeft;
|
|
119
121
|
nitro::ReactProp<double> caretColor;
|
|
120
122
|
nitro::ReactProp<double> selectionColor;
|
|
@@ -130,7 +132,11 @@ namespace margelo::nitro::nitroinput::views {
|
|
|
130
132
|
nitro::ReactProp<bool> editable;
|
|
131
133
|
nitro::ReactProp<bool> multiline;
|
|
132
134
|
nitro::ReactProp<double> numberOfLines;
|
|
133
|
-
nitro::ReactProp<NitroInputTextAlignVertical>
|
|
135
|
+
nitro::ReactProp<NitroInputTextAlignVertical> textVerticalAlignment;
|
|
136
|
+
nitro::ReactProp<double> textInsetLeft;
|
|
137
|
+
nitro::ReactProp<double> textInsetTop;
|
|
138
|
+
nitro::ReactProp<double> textInsetRight;
|
|
139
|
+
nitro::ReactProp<double> textInsetBottom;
|
|
134
140
|
nitro::ReactProp<bool> scrollEnabled;
|
|
135
141
|
nitro::ReactProp<bool> autoFocus;
|
|
136
142
|
nitro::ReactProp<std::string> fieldTestID;
|
|
@@ -207,7 +213,9 @@ namespace margelo::nitro::nitroinput::views {
|
|
|
207
213
|
signPlacement.hasSameValue(other.signPlacement) &&
|
|
208
214
|
prefixAlign.hasSameValue(other.prefixAlign) &&
|
|
209
215
|
suffixAlign.hasSameValue(other.suffixAlign) &&
|
|
210
|
-
|
|
216
|
+
textLetterSpacing.hasSameValue(other.textLetterSpacing) &&
|
|
217
|
+
tabularNums.hasSameValue(other.tabularNums) &&
|
|
218
|
+
slotDigits.hasSameValue(other.slotDigits) &&
|
|
211
219
|
prefixSpacing.hasSameValue(other.prefixSpacing) &&
|
|
212
220
|
suffixSpacing.hasSameValue(other.suffixSpacing) &&
|
|
213
221
|
prefixOffset.hasSameValue(other.prefixOffset) &&
|
|
@@ -218,12 +226,12 @@ namespace margelo::nitro::nitroinput::views {
|
|
|
218
226
|
easing.hasSameValue(other.easing) &&
|
|
219
227
|
bounce.hasSameValue(other.bounce) &&
|
|
220
228
|
effect.hasSameValue(other.effect) &&
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
229
|
+
textSize.hasSameValue(other.textSize) &&
|
|
230
|
+
textLineHeight.hasSameValue(other.textLineHeight) &&
|
|
231
|
+
textWeight.hasSameValue(other.textWeight) &&
|
|
232
|
+
textFamily.hasSameValue(other.textFamily) &&
|
|
233
|
+
textColor.hasSameValue(other.textColor) &&
|
|
234
|
+
textAlignment.hasSameValue(other.textAlignment) &&
|
|
227
235
|
rightToLeft.hasSameValue(other.rightToLeft) &&
|
|
228
236
|
caretColor.hasSameValue(other.caretColor) &&
|
|
229
237
|
selectionColor.hasSameValue(other.selectionColor) &&
|
|
@@ -239,7 +247,11 @@ namespace margelo::nitro::nitroinput::views {
|
|
|
239
247
|
editable.hasSameValue(other.editable) &&
|
|
240
248
|
multiline.hasSameValue(other.multiline) &&
|
|
241
249
|
numberOfLines.hasSameValue(other.numberOfLines) &&
|
|
242
|
-
|
|
250
|
+
textVerticalAlignment.hasSameValue(other.textVerticalAlignment) &&
|
|
251
|
+
textInsetLeft.hasSameValue(other.textInsetLeft) &&
|
|
252
|
+
textInsetTop.hasSameValue(other.textInsetTop) &&
|
|
253
|
+
textInsetRight.hasSameValue(other.textInsetRight) &&
|
|
254
|
+
textInsetBottom.hasSameValue(other.textInsetBottom) &&
|
|
243
255
|
scrollEnabled.hasSameValue(other.scrollEnabled) &&
|
|
244
256
|
autoFocus.hasSameValue(other.autoFocus) &&
|
|
245
257
|
fieldTestID.hasSameValue(other.fieldTestID) &&
|
|
@@ -317,7 +329,9 @@ namespace margelo::nitro::nitroinput::views {
|
|
|
317
329
|
signPlacement.isProvided() ||
|
|
318
330
|
prefixAlign.isProvided() ||
|
|
319
331
|
suffixAlign.isProvided() ||
|
|
320
|
-
|
|
332
|
+
textLetterSpacing.isProvided() ||
|
|
333
|
+
tabularNums.isProvided() ||
|
|
334
|
+
slotDigits.isProvided() ||
|
|
321
335
|
prefixSpacing.isProvided() ||
|
|
322
336
|
suffixSpacing.isProvided() ||
|
|
323
337
|
prefixOffset.isProvided() ||
|
|
@@ -328,12 +342,12 @@ namespace margelo::nitro::nitroinput::views {
|
|
|
328
342
|
easing.isProvided() ||
|
|
329
343
|
bounce.isProvided() ||
|
|
330
344
|
effect.isProvided() ||
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
345
|
+
textSize.isProvided() ||
|
|
346
|
+
textLineHeight.isProvided() ||
|
|
347
|
+
textWeight.isProvided() ||
|
|
348
|
+
textFamily.isProvided() ||
|
|
349
|
+
textColor.isProvided() ||
|
|
350
|
+
textAlignment.isProvided() ||
|
|
337
351
|
rightToLeft.isProvided() ||
|
|
338
352
|
caretColor.isProvided() ||
|
|
339
353
|
selectionColor.isProvided() ||
|
|
@@ -349,7 +363,11 @@ namespace margelo::nitro::nitroinput::views {
|
|
|
349
363
|
editable.isProvided() ||
|
|
350
364
|
multiline.isProvided() ||
|
|
351
365
|
numberOfLines.isProvided() ||
|
|
352
|
-
|
|
366
|
+
textVerticalAlignment.isProvided() ||
|
|
367
|
+
textInsetLeft.isProvided() ||
|
|
368
|
+
textInsetTop.isProvided() ||
|
|
369
|
+
textInsetRight.isProvided() ||
|
|
370
|
+
textInsetBottom.isProvided() ||
|
|
353
371
|
scrollEnabled.isProvided() ||
|
|
354
372
|
autoFocus.isProvided() ||
|
|
355
373
|
fieldTestID.isProvided() ||
|