react-native-nitro-input 0.3.0 → 0.3.2
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 +80 -0
- package/README.md +120 -5
- package/android/src/main/cpp/JMaskEngine.cpp +45 -0
- package/android/src/main/cpp/JMaskEngine.hpp +9 -0
- package/android/src/main/cpp/JReflowEngine.cpp +32 -0
- package/android/src/main/cpp/JReflowEngine.hpp +13 -0
- package/android/src/main/cpp/JRollingEngine.cpp +42 -2
- package/android/src/main/cpp/JRollingEngine.hpp +9 -1
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroInputView.kt +24 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroNumberFormatPlatform.kt +76 -1
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroNumberView.kt +88 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroTextMeasure.kt +25 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroTextView.kt +140 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/MaskEngine.kt +16 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/NitroInputPackage.kt +2 -1
- package/android/src/main/java/com/margelo/nitro/nitroinput/NitroInputView.kt +96 -6
- package/android/src/main/java/com/margelo/nitro/nitroinput/NitroNumberView.kt +388 -136
- package/android/src/main/java/com/margelo/nitro/nitroinput/NitroTextView.kt +868 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/ReflowEngine.kt +21 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/RollingEngine.kt +13 -2
- package/cpp/MaskEngine.cpp +294 -33
- package/cpp/MaskEngine.hpp +68 -0
- package/cpp/RollingEngine.cpp +92 -8
- package/cpp/RollingEngine.hpp +36 -2
- package/ios/HybridNitroInputView.swift +18 -0
- package/ios/HybridNitroNumberFormatPlatform.swift +87 -9
- package/ios/HybridNitroNumberView.swift +82 -1
- package/ios/HybridNitroTextView.swift +134 -0
- package/ios/NitroInputView.swift +125 -7
- package/ios/NitroNumberView.swift +368 -135
- package/ios/NitroTextView.swift +583 -0
- package/lib/commonjs/nitrogen/generated/shared/json/NitroInputViewConfig.json +6 -0
- package/lib/commonjs/nitrogen/generated/shared/json/NitroNumberViewConfig.json +20 -0
- package/lib/commonjs/nitrogen/generated/shared/json/NitroTextViewConfig.json +30 -0
- package/lib/commonjs/src/NitroInput.js +15 -2
- package/lib/commonjs/src/NitroNumber.js +52 -3
- package/lib/commonjs/src/NitroText.js +138 -0
- package/lib/commonjs/src/NitroTime.js +65 -0
- package/lib/commonjs/src/formatProps.js +76 -16
- package/lib/commonjs/src/index.js +6 -1
- package/lib/commonjs/src/specs/NitroText.nitro.js +2 -0
- package/lib/module/nitrogen/generated/shared/json/NitroInputViewConfig.json +6 -0
- package/lib/module/nitrogen/generated/shared/json/NitroNumberViewConfig.json +20 -0
- package/lib/module/nitrogen/generated/shared/json/NitroTextViewConfig.json +30 -0
- package/lib/module/src/NitroInput.js +15 -2
- package/lib/module/src/NitroNumber.js +53 -4
- package/lib/module/src/NitroText.js +98 -0
- package/lib/module/src/NitroTime.js +29 -0
- package/lib/module/src/formatProps.js +76 -17
- package/lib/module/src/index.js +2 -0
- package/lib/module/src/specs/NitroText.nitro.js +1 -0
- package/lib/typescript/src/NitroInput.d.ts +39 -1
- package/lib/typescript/src/NitroNumber.d.ts +79 -1
- package/lib/typescript/src/NitroText.d.ts +67 -0
- package/lib/typescript/src/NitroTime.d.ts +19 -0
- package/lib/typescript/src/formatProps.d.ts +30 -4
- package/lib/typescript/src/index.d.ts +5 -2
- package/lib/typescript/src/specs/NitroInput.nitro.d.ts +43 -0
- package/lib/typescript/src/specs/NitroNumber.nitro.d.ts +67 -0
- package/lib/typescript/src/specs/NitroText.nitro.d.ts +60 -0
- package/nitro.json +20 -0
- package/nitrogen/generated/android/NitroInput+autolinking.cmake +6 -0
- package/nitrogen/generated/android/NitroInputOnLoad.cpp +34 -0
- package/nitrogen/generated/android/c++/JHybridNitroInputViewSpec.cpp +102 -0
- package/nitrogen/generated/android/c++/JHybridNitroInputViewSpec.hpp +12 -0
- package/nitrogen/generated/android/c++/JHybridNitroNumberViewSpec.cpp +243 -0
- package/nitrogen/generated/android/c++/JHybridNitroNumberViewSpec.hpp +40 -0
- package/nitrogen/generated/android/c++/JHybridNitroTextMeasureSpec.cpp +58 -0
- package/nitrogen/generated/android/c++/JHybridNitroTextMeasureSpec.hpp +64 -0
- package/nitrogen/generated/android/c++/JHybridNitroTextViewSpec.cpp +253 -0
- package/nitrogen/generated/android/c++/JHybridNitroTextViewSpec.hpp +104 -0
- package/nitrogen/generated/android/c++/JNitroInputCharacterMapping.hpp +61 -0
- package/nitrogen/generated/android/c++/JNitroInputMaskAffinity.hpp +64 -0
- package/nitrogen/generated/android/c++/JNitroInputTextCase.hpp +61 -0
- package/nitrogen/generated/android/c++/JNitroNumberShimmerDirection.hpp +61 -0
- package/nitrogen/generated/android/c++/JNitroNumberSignDisplay.hpp +67 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroInputViewStateUpdater.cpp +30 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroNumberViewStateUpdater.cpp +100 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroTextViewStateUpdater.cpp +174 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroTextViewStateUpdater.hpp +54 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroInputViewSpec.kt +36 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroNumberViewSpec.kt +136 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroTextMeasureSpec.kt +60 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroTextViewSpec.kt +179 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroInputCharacterMapping.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroInputMaskAffinity.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroInputTextCase.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroNumberShimmerDirection.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroNumberSignDisplay.kt +26 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/views/HybridNitroTextViewManager.kt +96 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/views/HybridNitroTextViewStateUpdater.kt +23 -0
- package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Bridge.cpp +34 -0
- package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Bridge.hpp +146 -11
- package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Umbrella.hpp +25 -0
- package/nitrogen/generated/ios/NitroInputAutolinking.mm +16 -0
- package/nitrogen/generated/ios/NitroInputAutolinking.swift +24 -0
- package/nitrogen/generated/ios/c++/HybridNitroInputViewSpecSwift.hpp +50 -0
- package/nitrogen/generated/ios/c++/HybridNitroNumberViewSpecSwift.hpp +146 -0
- package/nitrogen/generated/ios/c++/HybridNitroTextMeasureSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNitroTextMeasureSpecSwift.hpp +90 -0
- package/nitrogen/generated/ios/c++/HybridNitroTextViewSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNitroTextViewSpecSwift.hpp +233 -0
- package/nitrogen/generated/ios/c++/views/HybridNitroInputViewComponent.mm +36 -0
- package/nitrogen/generated/ios/c++/views/HybridNitroNumberViewComponent.mm +120 -0
- package/nitrogen/generated/ios/c++/views/HybridNitroTextViewComponent.mm +264 -0
- package/nitrogen/generated/ios/swift/HybridNitroInputViewSpec.swift +6 -0
- package/nitrogen/generated/ios/swift/HybridNitroInputViewSpec_cxx.swift +78 -0
- package/nitrogen/generated/ios/swift/HybridNitroNumberViewSpec.swift +20 -0
- package/nitrogen/generated/ios/swift/HybridNitroNumberViewSpec_cxx.swift +493 -0
- package/nitrogen/generated/ios/swift/HybridNitroTextMeasureSpec.swift +56 -0
- package/nitrogen/generated/ios/swift/HybridNitroTextMeasureSpec_cxx.swift +150 -0
- package/nitrogen/generated/ios/swift/HybridNitroTextViewSpec.swift +75 -0
- package/nitrogen/generated/ios/swift/HybridNitroTextViewSpec_cxx.swift +608 -0
- package/nitrogen/generated/ios/swift/NitroInputCharacterMapping.swift +34 -0
- package/nitrogen/generated/ios/swift/NitroInputMaskAffinity.swift +48 -0
- package/nitrogen/generated/ios/swift/NitroInputTextCase.swift +44 -0
- package/nitrogen/generated/ios/swift/NitroNumberShimmerDirection.swift +44 -0
- package/nitrogen/generated/ios/swift/NitroNumberSignDisplay.swift +52 -0
- package/nitrogen/generated/shared/c++/HybridNitroInputViewSpec.cpp +12 -0
- package/nitrogen/generated/shared/c++/HybridNitroInputViewSpec.hpp +21 -0
- package/nitrogen/generated/shared/c++/HybridNitroNumberViewSpec.cpp +40 -0
- package/nitrogen/generated/shared/c++/HybridNitroNumberViewSpec.hpp +46 -0
- package/nitrogen/generated/shared/c++/HybridNitroTextMeasureSpec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridNitroTextMeasureSpec.hpp +63 -0
- package/nitrogen/generated/shared/c++/HybridNitroTextViewSpec.cpp +62 -0
- package/nitrogen/generated/shared/c++/HybridNitroTextViewSpec.hpp +115 -0
- package/nitrogen/generated/shared/c++/NitroInputCharacterMapping.hpp +87 -0
- package/nitrogen/generated/shared/c++/NitroInputMaskAffinity.hpp +84 -0
- package/nitrogen/generated/shared/c++/NitroInputTextCase.hpp +80 -0
- package/nitrogen/generated/shared/c++/NitroNumberShimmerDirection.hpp +80 -0
- package/nitrogen/generated/shared/c++/NitroNumberSignDisplay.hpp +88 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroInputViewComponent.cpp +12 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroInputViewComponent.hpp +21 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroNumberViewComponent.cpp +40 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroNumberViewComponent.hpp +62 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroTextViewComponent.cpp +74 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroTextViewComponent.hpp +149 -0
- package/nitrogen/generated/shared/json/NitroInputViewConfig.json +6 -0
- package/nitrogen/generated/shared/json/NitroNumberViewConfig.json +20 -0
- package/nitrogen/generated/shared/json/NitroTextViewConfig.json +30 -0
- package/package.json +2 -2
- package/src/NitroInput.tsx +73 -0
- package/src/NitroNumber.tsx +183 -9
- package/src/NitroText.tsx +166 -0
- package/src/NitroTime.tsx +68 -0
- package/src/formatProps.ts +108 -18
- package/src/index.ts +8 -0
- package/src/specs/NitroInput.nitro.ts +46 -0
- package/src/specs/NitroNumber.nitro.ts +69 -0
- package/src/specs/NitroText.nitro.ts +65 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroInputCharacterMapping.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
|
+
#include <string>
|
|
34
|
+
|
|
35
|
+
namespace margelo::nitro::nitroinput {
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* A struct which can be represented as a JavaScript object (NitroInputCharacterMapping).
|
|
39
|
+
*/
|
|
40
|
+
struct NitroInputCharacterMapping final {
|
|
41
|
+
public:
|
|
42
|
+
std::string from SWIFT_PRIVATE;
|
|
43
|
+
std::string to SWIFT_PRIVATE;
|
|
44
|
+
|
|
45
|
+
public:
|
|
46
|
+
NitroInputCharacterMapping() = default;
|
|
47
|
+
explicit NitroInputCharacterMapping(std::string from, std::string to): from(from), to(to) {}
|
|
48
|
+
|
|
49
|
+
public:
|
|
50
|
+
friend bool operator==(const NitroInputCharacterMapping& lhs, const NitroInputCharacterMapping& rhs) = default;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
} // namespace margelo::nitro::nitroinput
|
|
54
|
+
|
|
55
|
+
namespace margelo::nitro {
|
|
56
|
+
|
|
57
|
+
// C++ NitroInputCharacterMapping <> JS NitroInputCharacterMapping (object)
|
|
58
|
+
template <>
|
|
59
|
+
struct JSIConverter<margelo::nitro::nitroinput::NitroInputCharacterMapping> final {
|
|
60
|
+
static inline margelo::nitro::nitroinput::NitroInputCharacterMapping fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
61
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
62
|
+
return margelo::nitro::nitroinput::NitroInputCharacterMapping(
|
|
63
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "from"))),
|
|
64
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "to")))
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::nitroinput::NitroInputCharacterMapping& arg) {
|
|
68
|
+
jsi::Object obj(runtime);
|
|
69
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "from"), JSIConverter<std::string>::toJSI(runtime, arg.from));
|
|
70
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "to"), JSIConverter<std::string>::toJSI(runtime, arg.to));
|
|
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<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "from")))) return false;
|
|
82
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "to")))) return false;
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroInputMaskAffinity.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/NitroHash.hpp>)
|
|
11
|
+
#include <NitroModules/NitroHash.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
16
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
21
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::nitroinput {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An enum which can be represented as a JavaScript union (NitroInputMaskAffinity).
|
|
30
|
+
*/
|
|
31
|
+
enum class NitroInputMaskAffinity {
|
|
32
|
+
WHOLESTRING SWIFT_NAME(wholestring) = 0,
|
|
33
|
+
PREFIX SWIFT_NAME(prefix) = 1,
|
|
34
|
+
CAPACITY SWIFT_NAME(capacity) = 2,
|
|
35
|
+
EXTRACTEDVALUECAPACITY SWIFT_NAME(extractedvaluecapacity) = 3,
|
|
36
|
+
} CLOSED_ENUM;
|
|
37
|
+
|
|
38
|
+
} // namespace margelo::nitro::nitroinput
|
|
39
|
+
|
|
40
|
+
namespace margelo::nitro {
|
|
41
|
+
|
|
42
|
+
// C++ NitroInputMaskAffinity <> JS NitroInputMaskAffinity (union)
|
|
43
|
+
template <>
|
|
44
|
+
struct JSIConverter<margelo::nitro::nitroinput::NitroInputMaskAffinity> final {
|
|
45
|
+
static inline margelo::nitro::nitroinput::NitroInputMaskAffinity fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
46
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
47
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
48
|
+
case hashString("wholeString"): return margelo::nitro::nitroinput::NitroInputMaskAffinity::WHOLESTRING;
|
|
49
|
+
case hashString("prefix"): return margelo::nitro::nitroinput::NitroInputMaskAffinity::PREFIX;
|
|
50
|
+
case hashString("capacity"): return margelo::nitro::nitroinput::NitroInputMaskAffinity::CAPACITY;
|
|
51
|
+
case hashString("extractedValueCapacity"): return margelo::nitro::nitroinput::NitroInputMaskAffinity::EXTRACTEDVALUECAPACITY;
|
|
52
|
+
default: [[unlikely]]
|
|
53
|
+
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum NitroInputMaskAffinity - invalid value!");
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::nitroinput::NitroInputMaskAffinity arg) {
|
|
57
|
+
switch (arg) {
|
|
58
|
+
case margelo::nitro::nitroinput::NitroInputMaskAffinity::WHOLESTRING: return JSIConverter<std::string>::toJSI(runtime, "wholeString");
|
|
59
|
+
case margelo::nitro::nitroinput::NitroInputMaskAffinity::PREFIX: return JSIConverter<std::string>::toJSI(runtime, "prefix");
|
|
60
|
+
case margelo::nitro::nitroinput::NitroInputMaskAffinity::CAPACITY: return JSIConverter<std::string>::toJSI(runtime, "capacity");
|
|
61
|
+
case margelo::nitro::nitroinput::NitroInputMaskAffinity::EXTRACTEDVALUECAPACITY: return JSIConverter<std::string>::toJSI(runtime, "extractedValueCapacity");
|
|
62
|
+
default: [[unlikely]]
|
|
63
|
+
throw std::invalid_argument("Cannot convert NitroInputMaskAffinity to JS - invalid value: "
|
|
64
|
+
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
68
|
+
if (!value.isString()) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
|
|
72
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
73
|
+
case hashString("wholeString"):
|
|
74
|
+
case hashString("prefix"):
|
|
75
|
+
case hashString("capacity"):
|
|
76
|
+
case hashString("extractedValueCapacity"):
|
|
77
|
+
return true;
|
|
78
|
+
default:
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroInputTextCase.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/NitroHash.hpp>)
|
|
11
|
+
#include <NitroModules/NitroHash.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
16
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
21
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::nitroinput {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An enum which can be represented as a JavaScript union (NitroInputTextCase).
|
|
30
|
+
*/
|
|
31
|
+
enum class NitroInputTextCase {
|
|
32
|
+
NONE SWIFT_NAME(none) = 0,
|
|
33
|
+
UPPER SWIFT_NAME(upper) = 1,
|
|
34
|
+
LOWER SWIFT_NAME(lower) = 2,
|
|
35
|
+
} CLOSED_ENUM;
|
|
36
|
+
|
|
37
|
+
} // namespace margelo::nitro::nitroinput
|
|
38
|
+
|
|
39
|
+
namespace margelo::nitro {
|
|
40
|
+
|
|
41
|
+
// C++ NitroInputTextCase <> JS NitroInputTextCase (union)
|
|
42
|
+
template <>
|
|
43
|
+
struct JSIConverter<margelo::nitro::nitroinput::NitroInputTextCase> final {
|
|
44
|
+
static inline margelo::nitro::nitroinput::NitroInputTextCase fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
45
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
46
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
47
|
+
case hashString("none"): return margelo::nitro::nitroinput::NitroInputTextCase::NONE;
|
|
48
|
+
case hashString("upper"): return margelo::nitro::nitroinput::NitroInputTextCase::UPPER;
|
|
49
|
+
case hashString("lower"): return margelo::nitro::nitroinput::NitroInputTextCase::LOWER;
|
|
50
|
+
default: [[unlikely]]
|
|
51
|
+
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum NitroInputTextCase - invalid value!");
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::nitroinput::NitroInputTextCase arg) {
|
|
55
|
+
switch (arg) {
|
|
56
|
+
case margelo::nitro::nitroinput::NitroInputTextCase::NONE: return JSIConverter<std::string>::toJSI(runtime, "none");
|
|
57
|
+
case margelo::nitro::nitroinput::NitroInputTextCase::UPPER: return JSIConverter<std::string>::toJSI(runtime, "upper");
|
|
58
|
+
case margelo::nitro::nitroinput::NitroInputTextCase::LOWER: return JSIConverter<std::string>::toJSI(runtime, "lower");
|
|
59
|
+
default: [[unlikely]]
|
|
60
|
+
throw std::invalid_argument("Cannot convert NitroInputTextCase to JS - invalid value: "
|
|
61
|
+
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
65
|
+
if (!value.isString()) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
|
|
69
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
70
|
+
case hashString("none"):
|
|
71
|
+
case hashString("upper"):
|
|
72
|
+
case hashString("lower"):
|
|
73
|
+
return true;
|
|
74
|
+
default:
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroNumberShimmerDirection.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/NitroHash.hpp>)
|
|
11
|
+
#include <NitroModules/NitroHash.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
16
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
21
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::nitroinput {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An enum which can be represented as a JavaScript union (NitroNumberShimmerDirection).
|
|
30
|
+
*/
|
|
31
|
+
enum class NitroNumberShimmerDirection {
|
|
32
|
+
AUTO SWIFT_NAME(auto) = 0,
|
|
33
|
+
LTR SWIFT_NAME(ltr) = 1,
|
|
34
|
+
RTL SWIFT_NAME(rtl) = 2,
|
|
35
|
+
} CLOSED_ENUM;
|
|
36
|
+
|
|
37
|
+
} // namespace margelo::nitro::nitroinput
|
|
38
|
+
|
|
39
|
+
namespace margelo::nitro {
|
|
40
|
+
|
|
41
|
+
// C++ NitroNumberShimmerDirection <> JS NitroNumberShimmerDirection (union)
|
|
42
|
+
template <>
|
|
43
|
+
struct JSIConverter<margelo::nitro::nitroinput::NitroNumberShimmerDirection> final {
|
|
44
|
+
static inline margelo::nitro::nitroinput::NitroNumberShimmerDirection fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
45
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
46
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
47
|
+
case hashString("auto"): return margelo::nitro::nitroinput::NitroNumberShimmerDirection::AUTO;
|
|
48
|
+
case hashString("ltr"): return margelo::nitro::nitroinput::NitroNumberShimmerDirection::LTR;
|
|
49
|
+
case hashString("rtl"): return margelo::nitro::nitroinput::NitroNumberShimmerDirection::RTL;
|
|
50
|
+
default: [[unlikely]]
|
|
51
|
+
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum NitroNumberShimmerDirection - invalid value!");
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::nitroinput::NitroNumberShimmerDirection arg) {
|
|
55
|
+
switch (arg) {
|
|
56
|
+
case margelo::nitro::nitroinput::NitroNumberShimmerDirection::AUTO: return JSIConverter<std::string>::toJSI(runtime, "auto");
|
|
57
|
+
case margelo::nitro::nitroinput::NitroNumberShimmerDirection::LTR: return JSIConverter<std::string>::toJSI(runtime, "ltr");
|
|
58
|
+
case margelo::nitro::nitroinput::NitroNumberShimmerDirection::RTL: return JSIConverter<std::string>::toJSI(runtime, "rtl");
|
|
59
|
+
default: [[unlikely]]
|
|
60
|
+
throw std::invalid_argument("Cannot convert NitroNumberShimmerDirection to JS - invalid value: "
|
|
61
|
+
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
65
|
+
if (!value.isString()) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
|
|
69
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
70
|
+
case hashString("auto"):
|
|
71
|
+
case hashString("ltr"):
|
|
72
|
+
case hashString("rtl"):
|
|
73
|
+
return true;
|
|
74
|
+
default:
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroNumberSignDisplay.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/NitroHash.hpp>)
|
|
11
|
+
#include <NitroModules/NitroHash.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
16
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
21
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::nitroinput {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An enum which can be represented as a JavaScript union (NitroNumberSignDisplay).
|
|
30
|
+
*/
|
|
31
|
+
enum class NitroNumberSignDisplay {
|
|
32
|
+
AUTO SWIFT_NAME(auto) = 0,
|
|
33
|
+
ALWAYS SWIFT_NAME(always) = 1,
|
|
34
|
+
NEVER SWIFT_NAME(never) = 2,
|
|
35
|
+
EXCEPTZERO SWIFT_NAME(exceptzero) = 3,
|
|
36
|
+
NEGATIVE SWIFT_NAME(negative) = 4,
|
|
37
|
+
} CLOSED_ENUM;
|
|
38
|
+
|
|
39
|
+
} // namespace margelo::nitro::nitroinput
|
|
40
|
+
|
|
41
|
+
namespace margelo::nitro {
|
|
42
|
+
|
|
43
|
+
// C++ NitroNumberSignDisplay <> JS NitroNumberSignDisplay (union)
|
|
44
|
+
template <>
|
|
45
|
+
struct JSIConverter<margelo::nitro::nitroinput::NitroNumberSignDisplay> final {
|
|
46
|
+
static inline margelo::nitro::nitroinput::NitroNumberSignDisplay fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
47
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
48
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
49
|
+
case hashString("auto"): return margelo::nitro::nitroinput::NitroNumberSignDisplay::AUTO;
|
|
50
|
+
case hashString("always"): return margelo::nitro::nitroinput::NitroNumberSignDisplay::ALWAYS;
|
|
51
|
+
case hashString("never"): return margelo::nitro::nitroinput::NitroNumberSignDisplay::NEVER;
|
|
52
|
+
case hashString("exceptZero"): return margelo::nitro::nitroinput::NitroNumberSignDisplay::EXCEPTZERO;
|
|
53
|
+
case hashString("negative"): return margelo::nitro::nitroinput::NitroNumberSignDisplay::NEGATIVE;
|
|
54
|
+
default: [[unlikely]]
|
|
55
|
+
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum NitroNumberSignDisplay - invalid value!");
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::nitroinput::NitroNumberSignDisplay arg) {
|
|
59
|
+
switch (arg) {
|
|
60
|
+
case margelo::nitro::nitroinput::NitroNumberSignDisplay::AUTO: return JSIConverter<std::string>::toJSI(runtime, "auto");
|
|
61
|
+
case margelo::nitro::nitroinput::NitroNumberSignDisplay::ALWAYS: return JSIConverter<std::string>::toJSI(runtime, "always");
|
|
62
|
+
case margelo::nitro::nitroinput::NitroNumberSignDisplay::NEVER: return JSIConverter<std::string>::toJSI(runtime, "never");
|
|
63
|
+
case margelo::nitro::nitroinput::NitroNumberSignDisplay::EXCEPTZERO: return JSIConverter<std::string>::toJSI(runtime, "exceptZero");
|
|
64
|
+
case margelo::nitro::nitroinput::NitroNumberSignDisplay::NEGATIVE: return JSIConverter<std::string>::toJSI(runtime, "negative");
|
|
65
|
+
default: [[unlikely]]
|
|
66
|
+
throw std::invalid_argument("Cannot convert NitroNumberSignDisplay to JS - invalid value: "
|
|
67
|
+
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
71
|
+
if (!value.isString()) {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
|
|
75
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
76
|
+
case hashString("auto"):
|
|
77
|
+
case hashString("always"):
|
|
78
|
+
case hashString("never"):
|
|
79
|
+
case hashString("exceptZero"):
|
|
80
|
+
case hashString("negative"):
|
|
81
|
+
return true;
|
|
82
|
+
default:
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
} // namespace margelo::nitro
|
|
@@ -30,6 +30,12 @@ namespace margelo::nitro::nitroinput::views {
|
|
|
30
30
|
maskNotations(nitro::ReactProp<std::vector<NitroInputNotation>>::fromRawValue("NitroInputView", "maskNotations", rawProps, sourceProps.maskNotations)),
|
|
31
31
|
maskAutocomplete(nitro::ReactProp<bool>::fromRawValue("NitroInputView", "maskAutocomplete", rawProps, sourceProps.maskAutocomplete)),
|
|
32
32
|
maskAutoSkip(nitro::ReactProp<bool>::fromRawValue("NitroInputView", "maskAutoSkip", rawProps, sourceProps.maskAutoSkip)),
|
|
33
|
+
maskAffinityFormats(nitro::ReactProp<std::vector<std::string>>::fromRawValue("NitroInputView", "maskAffinityFormats", rawProps, sourceProps.maskAffinityFormats)),
|
|
34
|
+
maskAffinityStrategy(nitro::ReactProp<NitroInputMaskAffinity>::fromRawValue("NitroInputView", "maskAffinityStrategy", rawProps, sourceProps.maskAffinityStrategy)),
|
|
35
|
+
maskTextCase(nitro::ReactProp<NitroInputTextCase>::fromRawValue("NitroInputView", "maskTextCase", rawProps, sourceProps.maskTextCase)),
|
|
36
|
+
maskCharacterMap(nitro::ReactProp<std::vector<NitroInputCharacterMapping>>::fromRawValue("NitroInputView", "maskCharacterMap", rawProps, sourceProps.maskCharacterMap)),
|
|
37
|
+
maskSlotPlaceholder(nitro::ReactProp<std::string>::fromRawValue("NitroInputView", "maskSlotPlaceholder", rawProps, sourceProps.maskSlotPlaceholder)),
|
|
38
|
+
keepPlaceholder(nitro::ReactProp<bool>::fromRawValue("NitroInputView", "keepPlaceholder", rawProps, sourceProps.keepPlaceholder)),
|
|
33
39
|
groupingSeparator(nitro::ReactProp<std::string>::fromRawValue("NitroInputView", "groupingSeparator", rawProps, sourceProps.groupingSeparator)),
|
|
34
40
|
decimalSeparator(nitro::ReactProp<std::string>::fromRawValue("NitroInputView", "decimalSeparator", rawProps, sourceProps.decimalSeparator)),
|
|
35
41
|
variant(nitro::ReactProp<NitroInputVariant>::fromRawValue("NitroInputView", "variant", rawProps, sourceProps.variant)),
|
|
@@ -131,6 +137,12 @@ namespace margelo::nitro::nitroinput::views {
|
|
|
131
137
|
case hashString("maskNotations"): return true;
|
|
132
138
|
case hashString("maskAutocomplete"): return true;
|
|
133
139
|
case hashString("maskAutoSkip"): return true;
|
|
140
|
+
case hashString("maskAffinityFormats"): return true;
|
|
141
|
+
case hashString("maskAffinityStrategy"): return true;
|
|
142
|
+
case hashString("maskTextCase"): return true;
|
|
143
|
+
case hashString("maskCharacterMap"): return true;
|
|
144
|
+
case hashString("maskSlotPlaceholder"): return true;
|
|
145
|
+
case hashString("keepPlaceholder"): return true;
|
|
134
146
|
case hashString("groupingSeparator"): return true;
|
|
135
147
|
case hashString("decimalSeparator"): return true;
|
|
136
148
|
case hashString("variant"): return true;
|
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
#include "NitroInputMode.hpp"
|
|
22
22
|
#include "NitroInputNotation.hpp"
|
|
23
23
|
#include <vector>
|
|
24
|
+
#include "NitroInputMaskAffinity.hpp"
|
|
25
|
+
#include "NitroInputTextCase.hpp"
|
|
26
|
+
#include "NitroInputCharacterMapping.hpp"
|
|
24
27
|
#include "NitroInputVariant.hpp"
|
|
25
28
|
#include "NitroInputLabelBehavior.hpp"
|
|
26
29
|
#include "NitroInputSignPlacement.hpp"
|
|
@@ -69,6 +72,12 @@ namespace margelo::nitro::nitroinput::views {
|
|
|
69
72
|
nitro::ReactProp<std::vector<NitroInputNotation>> maskNotations;
|
|
70
73
|
nitro::ReactProp<bool> maskAutocomplete;
|
|
71
74
|
nitro::ReactProp<bool> maskAutoSkip;
|
|
75
|
+
nitro::ReactProp<std::vector<std::string>> maskAffinityFormats;
|
|
76
|
+
nitro::ReactProp<NitroInputMaskAffinity> maskAffinityStrategy;
|
|
77
|
+
nitro::ReactProp<NitroInputTextCase> maskTextCase;
|
|
78
|
+
nitro::ReactProp<std::vector<NitroInputCharacterMapping>> maskCharacterMap;
|
|
79
|
+
nitro::ReactProp<std::string> maskSlotPlaceholder;
|
|
80
|
+
nitro::ReactProp<bool> keepPlaceholder;
|
|
72
81
|
nitro::ReactProp<std::string> groupingSeparator;
|
|
73
82
|
nitro::ReactProp<std::string> decimalSeparator;
|
|
74
83
|
nitro::ReactProp<NitroInputVariant> variant;
|
|
@@ -170,6 +179,12 @@ namespace margelo::nitro::nitroinput::views {
|
|
|
170
179
|
maskNotations.hasSameValue(other.maskNotations) &&
|
|
171
180
|
maskAutocomplete.hasSameValue(other.maskAutocomplete) &&
|
|
172
181
|
maskAutoSkip.hasSameValue(other.maskAutoSkip) &&
|
|
182
|
+
maskAffinityFormats.hasSameValue(other.maskAffinityFormats) &&
|
|
183
|
+
maskAffinityStrategy.hasSameValue(other.maskAffinityStrategy) &&
|
|
184
|
+
maskTextCase.hasSameValue(other.maskTextCase) &&
|
|
185
|
+
maskCharacterMap.hasSameValue(other.maskCharacterMap) &&
|
|
186
|
+
maskSlotPlaceholder.hasSameValue(other.maskSlotPlaceholder) &&
|
|
187
|
+
keepPlaceholder.hasSameValue(other.keepPlaceholder) &&
|
|
173
188
|
groupingSeparator.hasSameValue(other.groupingSeparator) &&
|
|
174
189
|
decimalSeparator.hasSameValue(other.decimalSeparator) &&
|
|
175
190
|
variant.hasSameValue(other.variant) &&
|
|
@@ -272,6 +287,12 @@ namespace margelo::nitro::nitroinput::views {
|
|
|
272
287
|
maskNotations.isProvided() ||
|
|
273
288
|
maskAutocomplete.isProvided() ||
|
|
274
289
|
maskAutoSkip.isProvided() ||
|
|
290
|
+
maskAffinityFormats.isProvided() ||
|
|
291
|
+
maskAffinityStrategy.isProvided() ||
|
|
292
|
+
maskTextCase.isProvided() ||
|
|
293
|
+
maskCharacterMap.isProvided() ||
|
|
294
|
+
maskSlotPlaceholder.isProvided() ||
|
|
295
|
+
keepPlaceholder.isProvided() ||
|
|
275
296
|
groupingSeparator.isProvided() ||
|
|
276
297
|
decimalSeparator.isProvided() ||
|
|
277
298
|
variant.isProvided() ||
|
|
@@ -48,6 +48,11 @@ namespace margelo::nitro::nitroinput::views {
|
|
|
48
48
|
loading(nitro::ReactProp<std::optional<bool>>::fromRawValue("NitroNumberView", "loading", rawProps, sourceProps.loading)),
|
|
49
49
|
shimmerColor(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "shimmerColor", rawProps, sourceProps.shimmerColor)),
|
|
50
50
|
shimmerDuration(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "shimmerDuration", rawProps, sourceProps.shimmerDuration)),
|
|
51
|
+
shimmerAngle(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "shimmerAngle", rawProps, sourceProps.shimmerAngle)),
|
|
52
|
+
shimmerWidth(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "shimmerWidth", rawProps, sourceProps.shimmerWidth)),
|
|
53
|
+
shimmerBaseColor(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "shimmerBaseColor", rawProps, sourceProps.shimmerBaseColor)),
|
|
54
|
+
shimmerDirection(nitro::ReactProp<std::optional<NitroNumberShimmerDirection>>::fromRawValue("NitroNumberView", "shimmerDirection", rawProps, sourceProps.shimmerDirection)),
|
|
55
|
+
shimmerDelay(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "shimmerDelay", rawProps, sourceProps.shimmerDelay)),
|
|
51
56
|
fontSize(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "fontSize", rawProps, sourceProps.fontSize)),
|
|
52
57
|
prefixFontSize(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "prefixFontSize", rawProps, sourceProps.prefixFontSize)),
|
|
53
58
|
suffixFontSize(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "suffixFontSize", rawProps, sourceProps.suffixFontSize)),
|
|
@@ -60,6 +65,19 @@ namespace margelo::nitro::nitroinput::views {
|
|
|
60
65
|
prefixOffset(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "prefixOffset", rawProps, sourceProps.prefixOffset)),
|
|
61
66
|
suffixOffset(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "suffixOffset", rawProps, sourceProps.suffixOffset)),
|
|
62
67
|
tabularNums(nitro::ReactProp<std::optional<bool>>::fromRawValue("NitroNumberView", "tabularNums", rawProps, sourceProps.tabularNums)),
|
|
68
|
+
signDisplay(nitro::ReactProp<std::optional<NitroNumberSignDisplay>>::fromRawValue("NitroNumberView", "signDisplay", rawProps, sourceProps.signDisplay)),
|
|
69
|
+
plusSign(nitro::ReactProp<std::optional<std::string>>::fromRawValue("NitroNumberView", "plusSign", rawProps, sourceProps.plusSign)),
|
|
70
|
+
minusSign(nitro::ReactProp<std::optional<std::string>>::fromRawValue("NitroNumberView", "minusSign", rawProps, sourceProps.minusSign)),
|
|
71
|
+
digitGlyphs(nitro::ReactProp<std::optional<std::vector<std::string>>>::fromRawValue("NitroNumberView", "digitGlyphs", rawProps, sourceProps.digitGlyphs)),
|
|
72
|
+
groupingSizes(nitro::ReactProp<std::optional<std::vector<double>>>::fromRawValue("NitroNumberView", "groupingSizes", rawProps, sourceProps.groupingSizes)),
|
|
73
|
+
digitMax(nitro::ReactProp<std::optional<std::vector<double>>>::fromRawValue("NitroNumberView", "digitMax", rawProps, sourceProps.digitMax)),
|
|
74
|
+
continuous(nitro::ReactProp<std::optional<bool>>::fromRawValue("NitroNumberView", "continuous", rawProps, sourceProps.continuous)),
|
|
75
|
+
prefixColor(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "prefixColor", rawProps, sourceProps.prefixColor)),
|
|
76
|
+
suffixColor(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "suffixColor", rawProps, sourceProps.suffixColor)),
|
|
77
|
+
fractionColor(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "fractionColor", rawProps, sourceProps.fractionColor)),
|
|
78
|
+
fractionFontSize(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "fractionFontSize", rawProps, sourceProps.fractionFontSize)),
|
|
79
|
+
fractionAlign(nitro::ReactProp<std::optional<NitroNumberAffixAlign>>::fromRawValue("NitroNumberView", "fractionAlign", rawProps, sourceProps.fractionAlign)),
|
|
80
|
+
respectReduceMotion(nitro::ReactProp<std::optional<bool>>::fromRawValue("NitroNumberView", "respectReduceMotion", rawProps, sourceProps.respectReduceMotion)),
|
|
63
81
|
adjustsFontSizeToFit(nitro::ReactProp<std::optional<bool>>::fromRawValue("NitroNumberView", "adjustsFontSizeToFit", rawProps, sourceProps.adjustsFontSizeToFit)),
|
|
64
82
|
minimumFontScale(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "minimumFontScale", rawProps, sourceProps.minimumFontScale)),
|
|
65
83
|
allowFontScaling(nitro::ReactProp<std::optional<bool>>::fromRawValue("NitroNumberView", "allowFontScaling", rawProps, sourceProps.allowFontScaling)),
|
|
@@ -72,6 +90,8 @@ namespace margelo::nitro::nitroinput::views {
|
|
|
72
90
|
onSizeChange(nitro::ReactProp<std::optional<std::function<void(double /* width */, double /* height */)>>>::fromRawValue("NitroNumberView", "onSizeChange", rawProps, sourceProps.onSizeChange)),
|
|
73
91
|
onRevealEnd(nitro::ReactProp<std::optional<std::function<void()>>>::fromRawValue("NitroNumberView", "onRevealEnd", rawProps, sourceProps.onRevealEnd)),
|
|
74
92
|
onRevealMilestone(nitro::ReactProp<std::optional<std::function<void(double /* index */, double /* value */)>>>::fromRawValue("NitroNumberView", "onRevealMilestone", rawProps, sourceProps.onRevealMilestone)),
|
|
93
|
+
onAnimationStart(nitro::ReactProp<std::optional<std::function<void()>>>::fromRawValue("NitroNumberView", "onAnimationStart", rawProps, sourceProps.onAnimationStart)),
|
|
94
|
+
onAnimationEnd(nitro::ReactProp<std::optional<std::function<void(double /* value */)>>>::fromRawValue("NitroNumberView", "onAnimationEnd", rawProps, sourceProps.onAnimationEnd)),
|
|
75
95
|
hybridRef(nitro::ReactProp<std::optional<std::function<void(const std::shared_ptr<HybridNitroNumberViewSpec>& /* ref */)>>>::fromRawValue("NitroNumberView", "hybridRef", rawProps, sourceProps.hybridRef)) { }
|
|
76
96
|
|
|
77
97
|
bool HybridNitroNumberViewProps::filterObjectKeys(const std::string& propName) {
|
|
@@ -104,6 +124,11 @@ namespace margelo::nitro::nitroinput::views {
|
|
|
104
124
|
case hashString("loading"): return true;
|
|
105
125
|
case hashString("shimmerColor"): return true;
|
|
106
126
|
case hashString("shimmerDuration"): return true;
|
|
127
|
+
case hashString("shimmerAngle"): return true;
|
|
128
|
+
case hashString("shimmerWidth"): return true;
|
|
129
|
+
case hashString("shimmerBaseColor"): return true;
|
|
130
|
+
case hashString("shimmerDirection"): return true;
|
|
131
|
+
case hashString("shimmerDelay"): return true;
|
|
107
132
|
case hashString("fontSize"): return true;
|
|
108
133
|
case hashString("prefixFontSize"): return true;
|
|
109
134
|
case hashString("suffixFontSize"): return true;
|
|
@@ -116,6 +141,19 @@ namespace margelo::nitro::nitroinput::views {
|
|
|
116
141
|
case hashString("prefixOffset"): return true;
|
|
117
142
|
case hashString("suffixOffset"): return true;
|
|
118
143
|
case hashString("tabularNums"): return true;
|
|
144
|
+
case hashString("signDisplay"): return true;
|
|
145
|
+
case hashString("plusSign"): return true;
|
|
146
|
+
case hashString("minusSign"): return true;
|
|
147
|
+
case hashString("digitGlyphs"): return true;
|
|
148
|
+
case hashString("groupingSizes"): return true;
|
|
149
|
+
case hashString("digitMax"): return true;
|
|
150
|
+
case hashString("continuous"): return true;
|
|
151
|
+
case hashString("prefixColor"): return true;
|
|
152
|
+
case hashString("suffixColor"): return true;
|
|
153
|
+
case hashString("fractionColor"): return true;
|
|
154
|
+
case hashString("fractionFontSize"): return true;
|
|
155
|
+
case hashString("fractionAlign"): return true;
|
|
156
|
+
case hashString("respectReduceMotion"): return true;
|
|
119
157
|
case hashString("adjustsFontSizeToFit"): return true;
|
|
120
158
|
case hashString("minimumFontScale"): return true;
|
|
121
159
|
case hashString("allowFontScaling"): return true;
|
|
@@ -128,6 +166,8 @@ namespace margelo::nitro::nitroinput::views {
|
|
|
128
166
|
case hashString("onSizeChange"): return true;
|
|
129
167
|
case hashString("onRevealEnd"): return true;
|
|
130
168
|
case hashString("onRevealMilestone"): return true;
|
|
169
|
+
case hashString("onAnimationStart"): return true;
|
|
170
|
+
case hashString("onAnimationEnd"): return true;
|
|
131
171
|
case hashString("hybridRef"): return true;
|
|
132
172
|
default: return false;
|
|
133
173
|
}
|