@salve-software/react-native-nitro-input-mask 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/NitroInputMask.podspec +31 -0
- package/README.md +181 -0
- package/android/CMakeLists.txt +32 -0
- package/android/build.gradle +148 -0
- package/android/fix-prefab.gradle +51 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/cpp/cpp-adapter.cpp +9 -0
- package/android/src/main/java/com/nitroinputmask/NitroInputMaskContext.kt +7 -0
- package/android/src/main/java/com/nitroinputmask/NitroInputMaskModule.kt +108 -0
- package/android/src/main/java/com/nitroinputmask/NitroInputMaskPackage.kt +29 -0
- package/android/src/main/java/com/nitroinputmask/NitroInputMaskServiceModule.kt +17 -0
- package/android/src/main/java/com/nitroinputmask/NitroInputMaskTextWatcher.kt +127 -0
- package/android/src/main/java/com/nitroinputmask/engine/CursorEngine.kt +30 -0
- package/android/src/main/java/com/nitroinputmask/engine/MaskEngine.kt +261 -0
- package/android/src/main/java/com/nitroinputmask/engine/MaskEngineFactory.kt +18 -0
- package/android/src/main/java/com/nitroinputmask/engine/MaskEngineProtocol.kt +8 -0
- package/android/src/main/java/com/nitroinputmask/masks/CreditCardMaskEngine.kt +47 -0
- package/android/src/main/java/com/nitroinputmask/masks/CustomMaskEngine.kt +16 -0
- package/android/src/main/java/com/nitroinputmask/masks/DatetimeMaskEngine.kt +38 -0
- package/android/src/main/java/com/nitroinputmask/masks/MoneyMaskEngine.kt +66 -0
- package/ios/Bridge.h +8 -0
- package/ios/NitroInputMaskDelegateProxy.swift +194 -0
- package/ios/NitroInputMaskModule.swift +114 -0
- package/ios/NitroInputMaskServiceModule.swift +11 -0
- package/ios/engine/CursorEngine.swift +52 -0
- package/ios/engine/MaskEngine.swift +221 -0
- package/ios/engine/MaskEngineFactory.swift +16 -0
- package/ios/engine/MaskEngineProtocol.swift +7 -0
- package/ios/masks/CreditCardMaskEngine.swift +57 -0
- package/ios/masks/CustomMaskEngine.swift +16 -0
- package/ios/masks/DatetimeMaskEngine.swift +46 -0
- package/ios/masks/MoneyMaskEngine.swift +66 -0
- package/lib/commonjs/classes/NitroInputMaskService/NitroInputMaskService.class.js +74 -0
- package/lib/commonjs/classes/NitroInputMaskService/NitroInputMaskService.class.js.map +1 -0
- package/lib/commonjs/classes/NitroInputMaskService/index.js +13 -0
- package/lib/commonjs/classes/NitroInputMaskService/index.js.map +1 -0
- package/lib/commonjs/classes/NitroInputMaskService/types/IApplyMaskProps.js +6 -0
- package/lib/commonjs/classes/NitroInputMaskService/types/IApplyMaskProps.js.map +1 -0
- package/lib/commonjs/classes/NitroInputMaskService/types/index.js +2 -0
- package/lib/commonjs/classes/NitroInputMaskService/types/index.js.map +1 -0
- package/lib/commonjs/classes/index.js +17 -0
- package/lib/commonjs/classes/index.js.map +1 -0
- package/lib/commonjs/components/NitroInputMask/index.js +41 -0
- package/lib/commonjs/components/NitroInputMask/index.js.map +1 -0
- package/lib/commonjs/components/NitroInputMask/types/NitroInputMaskProps.js +6 -0
- package/lib/commonjs/components/NitroInputMask/types/NitroInputMaskProps.js.map +1 -0
- package/lib/commonjs/components/NitroInputMask/types/index.js +2 -0
- package/lib/commonjs/components/NitroInputMask/types/index.js.map +1 -0
- package/lib/commonjs/components/index.js +17 -0
- package/lib/commonjs/components/index.js.map +1 -0
- package/lib/commonjs/index.js +39 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/nitro-module.js +17 -0
- package/lib/commonjs/nitro-module.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/specs/nitro-input-mask-service.nitro.js +6 -0
- package/lib/commonjs/specs/nitro-input-mask-service.nitro.js.map +1 -0
- package/lib/commonjs/specs/nitro-input-mask.nitro.js +6 -0
- package/lib/commonjs/specs/nitro-input-mask.nitro.js.map +1 -0
- package/lib/commonjs/types/CreditCardMaskOptions.js +2 -0
- package/lib/commonjs/types/CreditCardMaskOptions.js.map +1 -0
- package/lib/commonjs/types/CustomMaskOptions.js +2 -0
- package/lib/commonjs/types/CustomMaskOptions.js.map +1 -0
- package/lib/commonjs/types/DatetimeMaskOptions.js +2 -0
- package/lib/commonjs/types/DatetimeMaskOptions.js.map +1 -0
- package/lib/commonjs/types/MaskConfig.js +6 -0
- package/lib/commonjs/types/MaskConfig.js.map +1 -0
- package/lib/commonjs/types/MoneyMaskOptions.js +2 -0
- package/lib/commonjs/types/MoneyMaskOptions.js.map +1 -0
- package/lib/commonjs/types/index.js +2 -0
- package/lib/commonjs/types/index.js.map +1 -0
- package/lib/module/classes/NitroInputMaskService/NitroInputMaskService.class.js +70 -0
- package/lib/module/classes/NitroInputMaskService/NitroInputMaskService.class.js.map +1 -0
- package/lib/module/classes/NitroInputMaskService/index.js +4 -0
- package/lib/module/classes/NitroInputMaskService/index.js.map +1 -0
- package/lib/module/classes/NitroInputMaskService/types/IApplyMaskProps.js +4 -0
- package/lib/module/classes/NitroInputMaskService/types/IApplyMaskProps.js.map +1 -0
- package/lib/module/classes/NitroInputMaskService/types/index.js +2 -0
- package/lib/module/classes/NitroInputMaskService/types/index.js.map +1 -0
- package/lib/module/classes/index.js +4 -0
- package/lib/module/classes/index.js.map +1 -0
- package/lib/module/components/NitroInputMask/index.js +35 -0
- package/lib/module/components/NitroInputMask/index.js.map +1 -0
- package/lib/module/components/NitroInputMask/types/NitroInputMaskProps.js +4 -0
- package/lib/module/components/NitroInputMask/types/NitroInputMaskProps.js.map +1 -0
- package/lib/module/components/NitroInputMask/types/index.js +2 -0
- package/lib/module/components/NitroInputMask/types/index.js.map +1 -0
- package/lib/module/components/index.js +4 -0
- package/lib/module/components/index.js.map +1 -0
- package/lib/module/index.js +6 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/nitro-module.js +12 -0
- package/lib/module/nitro-module.js.map +1 -0
- package/lib/module/specs/nitro-input-mask-service.nitro.js +4 -0
- package/lib/module/specs/nitro-input-mask-service.nitro.js.map +1 -0
- package/lib/module/specs/nitro-input-mask.nitro.js +4 -0
- package/lib/module/specs/nitro-input-mask.nitro.js.map +1 -0
- package/lib/module/types/CreditCardMaskOptions.js +2 -0
- package/lib/module/types/CreditCardMaskOptions.js.map +1 -0
- package/lib/module/types/CustomMaskOptions.js +2 -0
- package/lib/module/types/CustomMaskOptions.js.map +1 -0
- package/lib/module/types/DatetimeMaskOptions.js +2 -0
- package/lib/module/types/DatetimeMaskOptions.js.map +1 -0
- package/lib/module/types/MaskConfig.js +4 -0
- package/lib/module/types/MaskConfig.js.map +1 -0
- package/lib/module/types/MoneyMaskOptions.js +2 -0
- package/lib/module/types/MoneyMaskOptions.js.map +1 -0
- package/lib/module/types/index.js +2 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/typescript/src/classes/NitroInputMaskService/NitroInputMaskService.class.d.ts +50 -0
- package/lib/typescript/src/classes/NitroInputMaskService/NitroInputMaskService.class.d.ts.map +1 -0
- package/lib/typescript/src/classes/NitroInputMaskService/index.d.ts +3 -0
- package/lib/typescript/src/classes/NitroInputMaskService/index.d.ts.map +1 -0
- package/lib/typescript/src/classes/NitroInputMaskService/types/IApplyMaskProps.d.ts +5 -0
- package/lib/typescript/src/classes/NitroInputMaskService/types/IApplyMaskProps.d.ts.map +1 -0
- package/lib/typescript/src/classes/NitroInputMaskService/types/index.d.ts +2 -0
- package/lib/typescript/src/classes/NitroInputMaskService/types/index.d.ts.map +1 -0
- package/lib/typescript/src/classes/index.d.ts +2 -0
- package/lib/typescript/src/classes/index.d.ts.map +1 -0
- package/lib/typescript/src/components/NitroInputMask/index.d.ts +5 -0
- package/lib/typescript/src/components/NitroInputMask/index.d.ts.map +1 -0
- package/lib/typescript/src/components/NitroInputMask/types/NitroInputMaskProps.d.ts +4 -0
- package/lib/typescript/src/components/NitroInputMask/types/NitroInputMaskProps.d.ts.map +1 -0
- package/lib/typescript/src/components/NitroInputMask/types/index.d.ts +2 -0
- package/lib/typescript/src/components/NitroInputMask/types/index.d.ts.map +1 -0
- package/lib/typescript/src/components/index.d.ts +2 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +4 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/nitro-module.d.ts +5 -0
- package/lib/typescript/src/nitro-module.d.ts.map +1 -0
- package/lib/typescript/src/specs/nitro-input-mask-service.nitro.d.ts +9 -0
- package/lib/typescript/src/specs/nitro-input-mask-service.nitro.d.ts.map +1 -0
- package/lib/typescript/src/specs/nitro-input-mask.nitro.d.ts +23 -0
- package/lib/typescript/src/specs/nitro-input-mask.nitro.d.ts.map +1 -0
- package/lib/typescript/src/types/CreditCardMaskOptions.d.ts +5 -0
- package/lib/typescript/src/types/CreditCardMaskOptions.d.ts.map +1 -0
- package/lib/typescript/src/types/CustomMaskOptions.d.ts +4 -0
- package/lib/typescript/src/types/CustomMaskOptions.d.ts.map +1 -0
- package/lib/typescript/src/types/DatetimeMaskOptions.d.ts +4 -0
- package/lib/typescript/src/types/DatetimeMaskOptions.d.ts.map +1 -0
- package/lib/typescript/src/types/MaskConfig.d.ts +18 -0
- package/lib/typescript/src/types/MaskConfig.d.ts.map +1 -0
- package/lib/typescript/src/types/MoneyMaskOptions.d.ts +9 -0
- package/lib/typescript/src/types/MoneyMaskOptions.d.ts.map +1 -0
- package/lib/typescript/src/types/index.d.ts +6 -0
- package/lib/typescript/src/types/index.d.ts.map +1 -0
- package/nitro.json +40 -0
- package/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/android/NitroInputMask+autolinking.cmake +83 -0
- package/nitrogen/generated/android/NitroInputMask+autolinking.gradle +27 -0
- package/nitrogen/generated/android/NitroInputMaskOnLoad.cpp +70 -0
- package/nitrogen/generated/android/NitroInputMaskOnLoad.hpp +34 -0
- package/nitrogen/generated/android/c++/JHybridNitroInputMaskServiceSpec.cpp +57 -0
- package/nitrogen/generated/android/c++/JHybridNitroInputMaskServiceSpec.hpp +63 -0
- package/nitrogen/generated/android/c++/JHybridNitroInputMaskSpec.cpp +68 -0
- package/nitrogen/generated/android/c++/JHybridNitroInputMaskSpec.hpp +66 -0
- package/nitrogen/generated/android/c++/JNitroMaskOptions.hpp +94 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinputmask/HybridNitroInputMaskServiceSpec.kt +54 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinputmask/HybridNitroInputMaskSpec.kt +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinputmask/NitroInputMaskOnLoad.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinputmask/NitroMaskOptions.kt +96 -0
- package/nitrogen/generated/ios/NitroInputMask+autolinking.rb +62 -0
- package/nitrogen/generated/ios/NitroInputMask-Swift-Cxx-Bridge.cpp +50 -0
- package/nitrogen/generated/ios/NitroInputMask-Swift-Cxx-Bridge.hpp +124 -0
- package/nitrogen/generated/ios/NitroInputMask-Swift-Cxx-Umbrella.hpp +53 -0
- package/nitrogen/generated/ios/NitroInputMaskAutolinking.mm +41 -0
- package/nitrogen/generated/ios/NitroInputMaskAutolinking.swift +38 -0
- package/nitrogen/generated/ios/c++/HybridNitroInputMaskServiceSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNitroInputMaskServiceSpecSwift.hpp +85 -0
- package/nitrogen/generated/ios/c++/HybridNitroInputMaskSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNitroInputMaskSpecSwift.hpp +101 -0
- package/nitrogen/generated/ios/swift/HybridNitroInputMaskServiceSpec.swift +55 -0
- package/nitrogen/generated/ios/swift/HybridNitroInputMaskServiceSpec_cxx.swift +138 -0
- package/nitrogen/generated/ios/swift/HybridNitroInputMaskSpec.swift +58 -0
- package/nitrogen/generated/ios/swift/HybridNitroInputMaskSpec_cxx.swift +170 -0
- package/nitrogen/generated/ios/swift/NitroMaskOptions.swift +204 -0
- package/nitrogen/generated/shared/c++/HybridNitroInputMaskServiceSpec.cpp +21 -0
- package/nitrogen/generated/shared/c++/HybridNitroInputMaskServiceSpec.hpp +64 -0
- package/nitrogen/generated/shared/c++/HybridNitroInputMaskSpec.cpp +24 -0
- package/nitrogen/generated/shared/c++/HybridNitroInputMaskSpec.hpp +67 -0
- package/nitrogen/generated/shared/c++/NitroMaskOptions.hpp +120 -0
- package/package.json +136 -0
- package/src/classes/NitroInputMaskService/NitroInputMaskService.class.ts +70 -0
- package/src/classes/NitroInputMaskService/index.ts +2 -0
- package/src/classes/NitroInputMaskService/types/IApplyMaskProps.ts +3 -0
- package/src/classes/NitroInputMaskService/types/index.ts +1 -0
- package/src/classes/index.ts +1 -0
- package/src/components/NitroInputMask/index.tsx +41 -0
- package/src/components/NitroInputMask/types/NitroInputMaskProps.ts +4 -0
- package/src/components/NitroInputMask/types/index.ts +1 -0
- package/src/components/index.ts +1 -0
- package/src/index.ts +3 -0
- package/src/nitro-module.ts +14 -0
- package/src/specs/nitro-input-mask-service.nitro.ts +6 -0
- package/src/specs/nitro-input-mask.nitro.ts +25 -0
- package/src/types/CreditCardMaskOptions.ts +4 -0
- package/src/types/CustomMaskOptions.ts +3 -0
- package/src/types/DatetimeMaskOptions.ts +3 -0
- package/src/types/MaskConfig.ts +10 -0
- package/src/types/MoneyMaskOptions.ts +8 -0
- package/src/types/index.ts +5 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useEffect","useId","TextInput","nitroModule","jsx","_jsx","NitroInputMask","props","maskType","maskOptions","value","rest","resolvedMaskType","reactId","id","maskOptionsJson","JSON","stringify","attach","setValue","String","detach","updateMask","nativeID"],"sourceRoot":"../../../../src","sources":["components/NitroInputMask/index.tsx"],"mappings":";;AACA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,KAAK,QAAQ,OAAO;AAC/C,SAASC,SAAS,QAAQ,cAAc;AACxC,SAASC,WAAW,QAAQ,oBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEjD,OAAO,MAAMC,cAAc,GAAIC,KAA0B,IAAK;EAC5D,MAAM;IAAEC,QAAQ;IAAEC,WAAW;IAAEC,KAAK;IAAE,GAAGC;EAAK,CAAC,GAAGJ,KAGjD;EAED,MAAMK,gBAAgB,GAAGJ,QAAQ,IAAI,QAAQ;EAC7C,MAAMK,OAAO,GAAGZ,KAAK,CAAC,CAAC;EACvB,MAAMa,EAAE,GAAG,oBAAoBD,OAAO,EAAE;EAExC,MAAME,eAAe,GAAGC,IAAI,CAACC,SAAS,CAACR,WAAW,IAAI,CAAC,CAAC,CAAC;EAEzDT,SAAS,CAAC,MAAM;IACdG,WAAW,CAACe,MAAM,CAACJ,EAAE,EAAEF,gBAAgB,EAAEH,WAAW,IAAI,CAAC,CAAC,CAAC;IAC3D,IAAIC,KAAK,IAAI,IAAI,EAAEP,WAAW,CAACgB,QAAQ,CAACL,EAAE,EAAEM,MAAM,CAACV,KAAK,CAAC,CAAC;IAC1D,OAAO,MAAMP,WAAW,CAACkB,MAAM,CAACP,EAAE,CAAC;EACrC,CAAC,EAAE,EAAE,CAAC;EAENd,SAAS,CAAC,MAAM;IACdG,WAAW,CAACmB,UAAU,CAACR,EAAE,EAAEF,gBAAgB,EAAEH,WAAW,IAAI,CAAC,CAAC,CAAC;EACjE,CAAC,EAAE,CAACG,gBAAgB,EAAEG,eAAe,CAAC,CAAC;EAEvCf,SAAS,CAAC,MAAM;IACd,IAAIU,KAAK,IAAI,IAAI,EAAE;IACnBP,WAAW,CAACgB,QAAQ,CAACL,EAAE,EAAEM,MAAM,CAACV,KAAK,CAAC,CAAC;EACzC,CAAC,EAAE,CAACA,KAAK,CAAC,CAAC;EAEX,oBACEL,IAAA,CAACH,SAAS;IAAA,GACJS,IAAI;IACRY,QAAQ,EAAET;EAAG,CACd,CAAC;AAEN,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["components/NitroInputMask/types/NitroInputMaskProps.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["components/NitroInputMask/types/index.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA,cAAc,kBAAkB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,cAAc,cAAc;AAC5B,cAAc,WAAW;AACzB,cAAc,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { NitroModules } from 'react-native-nitro-modules';
|
|
4
|
+
export const nitroModule = NitroModules.createHybridObject('NitroInputMask');
|
|
5
|
+
let _nitroServiceModule = null;
|
|
6
|
+
export const getNitroServiceModule = () => {
|
|
7
|
+
if (!_nitroServiceModule) {
|
|
8
|
+
_nitroServiceModule = NitroModules.createHybridObject('NitroInputMaskService');
|
|
9
|
+
}
|
|
10
|
+
return _nitroServiceModule;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=nitro-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NitroModules","nitroModule","createHybridObject","_nitroServiceModule","getNitroServiceModule"],"sourceRoot":"../../src","sources":["nitro-module.ts"],"mappings":";;AAEA,SAASA,YAAY,QAAQ,4BAA4B;AAEzD,OAAO,MAAMC,WAAW,GAAGD,YAAY,CAACE,kBAAkB,CAAuB,gBAAgB,CAAC;AAClG,IAAIC,mBAAqD,GAAG,IAAI;AAEhE,OAAO,MAAMC,qBAAqB,GAAGA,CAAA,KAAM;EACzC,IAAI,CAACD,mBAAmB,EAAE;IACxBA,mBAAmB,GAAGH,YAAY,CAACE,kBAAkB,CAA4B,uBAAuB,CAAC;EAC3G;EAEA,OAAOC,mBAAmB;AAC5B,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["specs/nitro-input-mask-service.nitro.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["specs/nitro-input-mask.nitro.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/CreditCardMaskOptions.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/CustomMaskOptions.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/DatetimeMaskOptions.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/MaskConfig.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/MoneyMaskOptions.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/index.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { IApplyMaskProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Standalone service for applying input masks natively.
|
|
4
|
+
*
|
|
5
|
+
* Runs the same mask engine used by `<NitroInputMask />`, but as a
|
|
6
|
+
* plain function call — no component or ref required.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* const masked = NitroInputMaskService.applyMask({
|
|
10
|
+
* value: '12345678901',
|
|
11
|
+
* maskOptions: { mask: '999.999.999-99' },
|
|
12
|
+
* })
|
|
13
|
+
* // '123.456.789-01'
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const masked = NitroInputMaskService.applyMask({
|
|
17
|
+
* value: '123456',
|
|
18
|
+
* maskType: 'money',
|
|
19
|
+
* maskOptions: { unit: 'R$ ', precision: 2 },
|
|
20
|
+
* })
|
|
21
|
+
* // 'R$ 1.234,56'
|
|
22
|
+
*/
|
|
23
|
+
export declare class NitroInputMaskService {
|
|
24
|
+
/**
|
|
25
|
+
* Applies a mask to a string and returns the masked result.
|
|
26
|
+
*
|
|
27
|
+
* For `custom` masks, tokens are:
|
|
28
|
+
* - `9` — digit (0–9)
|
|
29
|
+
* - `A` — letter (a–z, A–Z)
|
|
30
|
+
* - `*` — letter or digit
|
|
31
|
+
* - `[n-m]` — integer in the inclusive range n–m (e.g. `[1-12]`, `[1-31]`)
|
|
32
|
+
* - Any other character — treated as a literal and inserted as-is
|
|
33
|
+
*
|
|
34
|
+
* @param props.value - The raw string to mask.
|
|
35
|
+
* @param props.maskType - The mask type: `'custom'` (default), `'money'`, `'datetime'`, `'credit-card'`.
|
|
36
|
+
* @param props.maskOptions - Options specific to the chosen mask type.
|
|
37
|
+
* @returns The masked string.
|
|
38
|
+
*
|
|
39
|
+
* @throws If `value` exceeds 1000 characters or `custom` mask exceeds 200 characters.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* NitroInputMaskService.applyMask({
|
|
43
|
+
* value: '11987654321',
|
|
44
|
+
* maskOptions: { mask: '(99) 99999-9999' },
|
|
45
|
+
* })
|
|
46
|
+
* // '(11) 98765-4321'
|
|
47
|
+
*/
|
|
48
|
+
static applyMask: (props: IApplyMaskProps) => string;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=NitroInputMaskService.class.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NitroInputMaskService.class.d.ts","sourceRoot":"","sources":["../../../../../src/classes/NitroInputMaskService/NitroInputMaskService.class.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG/C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,qBAAqB;IAChC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,MAAM,CAAC,SAAS,GAAI,OAAO,eAAe,KAAG,MAAM,CAmBlD;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/classes/NitroInputMaskService/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,+BAA+B,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IApplyMaskProps.d.ts","sourceRoot":"","sources":["../../../../../../src/classes/NitroInputMaskService/types/IApplyMaskProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,MAAM,MAAM,eAAe,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/classes/NitroInputMaskService/types/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/classes/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/NitroInputMask/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,KAA2B,MAAM,OAAO,CAAC;AAIhD,eAAO,MAAM,cAAc,GAAI,OAAO,mBAAmB,sBAiCxD,CAAA;AAED,mBAAmB,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NitroInputMaskProps.d.ts","sourceRoot":"","sources":["../../../../../../src/components/NitroInputMask/types/NitroInputMaskProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,MAAM,MAAM,mBAAmB,GAAG,cAAc,GAAG,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/NitroInputMask/types/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { NitroInputMask as NitroInputMaskModule } from './specs/nitro-input-mask.nitro';
|
|
2
|
+
import type { NitroInputMaskService as NitroInputMaskServiceSpec } from './specs/nitro-input-mask-service.nitro';
|
|
3
|
+
export declare const nitroModule: NitroInputMaskModule;
|
|
4
|
+
export declare const getNitroServiceModule: () => NitroInputMaskServiceSpec;
|
|
5
|
+
//# sourceMappingURL=nitro-module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nitro-module.d.ts","sourceRoot":"","sources":["../../../src/nitro-module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,IAAI,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAC7F,OAAO,KAAK,EAAE,qBAAqB,IAAI,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAGjH,eAAO,MAAM,WAAW,sBAA0E,CAAC;AAGnG,eAAO,MAAM,qBAAqB,iCAMjC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HybridObject } from 'react-native-nitro-modules';
|
|
2
|
+
import type { NitroMaskOptions } from './nitro-input-mask.nitro';
|
|
3
|
+
export interface NitroInputMaskService extends HybridObject<{
|
|
4
|
+
ios: 'swift';
|
|
5
|
+
android: 'kotlin';
|
|
6
|
+
}> {
|
|
7
|
+
applyMask(value: string, maskType: string, options: NitroMaskOptions): string;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=nitro-input-mask-service.nitro.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nitro-input-mask-service.nitro.d.ts","sourceRoot":"","sources":["../../../../src/specs/nitro-input-mask-service.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAEhE,MAAM,WAAW,qBAAsB,SAAQ,YAAY,CAAC;IAAE,GAAG,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,QAAQ,CAAA;CAAE,CAAC;IAC9F,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAAA;CAC9E"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { HybridObject } from 'react-native-nitro-modules';
|
|
2
|
+
export interface NitroMaskOptions {
|
|
3
|
+
mask?: string;
|
|
4
|
+
precision?: number;
|
|
5
|
+
separator?: string;
|
|
6
|
+
delimiter?: string;
|
|
7
|
+
unit?: string;
|
|
8
|
+
suffixUnit?: string;
|
|
9
|
+
zeroCents?: boolean;
|
|
10
|
+
format?: string;
|
|
11
|
+
issuer?: string;
|
|
12
|
+
obfuscated?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface NitroInputMask extends HybridObject<{
|
|
15
|
+
ios: 'swift';
|
|
16
|
+
android: 'kotlin';
|
|
17
|
+
}> {
|
|
18
|
+
attach(nativeID: string, maskType: string, options: NitroMaskOptions): void;
|
|
19
|
+
detach(nativeID: string): void;
|
|
20
|
+
updateMask(nativeID: string, maskType: string, options: NitroMaskOptions): void;
|
|
21
|
+
setValue(nativeID: string, rawValue: string): void;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=nitro-input-mask.nitro.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nitro-input-mask.nitro.d.ts","sourceRoot":"","sources":["../../../../src/specs/nitro-input-mask.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAE9D,MAAM,WAAW,gBAAgB;IAE/B,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,MAAM,WAAW,cAAe,SAAQ,YAAY,CAAC;IAAE,GAAG,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,QAAQ,CAAA;CAAE,CAAC;IACvF,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAA;IAC3E,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAA;IAC/E,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;CACnD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreditCardMaskOptions.d.ts","sourceRoot":"","sources":["../../../../src/types/CreditCardMaskOptions.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,CAAC,EAAE,oBAAoB,GAAG,MAAM,GAAG,QAAQ,CAAC;IAClD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomMaskOptions.d.ts","sourceRoot":"","sources":["../../../../src/types/CustomMaskOptions.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAA;CACb,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatetimeMaskOptions.d.ts","sourceRoot":"","sources":["../../../../src/types/DatetimeMaskOptions.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,MAAM,CAAC;CAChB,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CreditCardMaskOptions } from "./CreditCardMaskOptions";
|
|
2
|
+
import type { CustomMaskOptions } from "./CustomMaskOptions";
|
|
3
|
+
import type { DatetimeMaskOptions } from "./DatetimeMaskOptions";
|
|
4
|
+
import type { MoneyMaskOptions } from "./MoneyMaskOptions";
|
|
5
|
+
export type MaskConfig = {
|
|
6
|
+
maskType?: 'custom';
|
|
7
|
+
maskOptions: CustomMaskOptions;
|
|
8
|
+
} | {
|
|
9
|
+
maskType: 'money';
|
|
10
|
+
maskOptions?: MoneyMaskOptions;
|
|
11
|
+
} | {
|
|
12
|
+
maskType: 'datetime';
|
|
13
|
+
maskOptions: DatetimeMaskOptions;
|
|
14
|
+
} | {
|
|
15
|
+
maskType: 'credit-card';
|
|
16
|
+
maskOptions?: CreditCardMaskOptions;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=MaskConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MaskConfig.d.ts","sourceRoot":"","sources":["../../../../src/types/MaskConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,MAAM,MAAM,UAAU,GAClB;IAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAAC,WAAW,EAAE,iBAAiB,CAAA;CAAE,GACvD;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,WAAW,CAAC,EAAE,gBAAgB,CAAA;CAAE,GACrD;IAAE,QAAQ,EAAE,UAAU,CAAC;IAAC,WAAW,EAAE,mBAAmB,CAAA;CAAE,GAC1D;IAAE,QAAQ,EAAE,aAAa,CAAC;IAAC,WAAW,CAAC,EAAE,qBAAqB,CAAA;CAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MoneyMaskOptions.d.ts","sourceRoot":"","sources":["../../../../src/types/MoneyMaskOptions.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,qBAAqB,CAAC;AACzC,mBAAmB,cAAc,CAAC;AAClC,mBAAmB,oBAAoB,CAAC;AACxC,mBAAmB,yBAAyB,CAAC;AAC7C,mBAAmB,uBAAuB,CAAC"}
|
package/nitro.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://nitro.margelo.com/nitro.schema.json",
|
|
3
|
+
"cxxNamespace": [
|
|
4
|
+
"nitroinputmask"
|
|
5
|
+
],
|
|
6
|
+
"ios": {
|
|
7
|
+
"iosModuleName": "NitroInputMask"
|
|
8
|
+
},
|
|
9
|
+
"android": {
|
|
10
|
+
"androidNamespace": [
|
|
11
|
+
"nitroinputmask"
|
|
12
|
+
],
|
|
13
|
+
"androidCxxLibName": "NitroInputMask"
|
|
14
|
+
},
|
|
15
|
+
"autolinking": {
|
|
16
|
+
"NitroInputMask": {
|
|
17
|
+
"ios": {
|
|
18
|
+
"language": "swift",
|
|
19
|
+
"implementationClassName": "HybridNitroInputMaskModule"
|
|
20
|
+
},
|
|
21
|
+
"android": {
|
|
22
|
+
"language": "kotlin",
|
|
23
|
+
"implementationClassName": "HybridNitroInputMaskModule"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"NitroInputMaskService": {
|
|
27
|
+
"ios": {
|
|
28
|
+
"language": "swift",
|
|
29
|
+
"implementationClassName": "HybridNitroInputMaskServiceModule"
|
|
30
|
+
},
|
|
31
|
+
"android": {
|
|
32
|
+
"language": "kotlin",
|
|
33
|
+
"implementationClassName": "HybridNitroInputMaskServiceModule"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"ignorePaths": [
|
|
38
|
+
"**/node_modules"
|
|
39
|
+
]
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
** linguist-generated=true
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
#
|
|
2
|
+
# NitroInputMask+autolinking.cmake
|
|
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
|
+
# This is a CMake file that adds all files generated by Nitrogen
|
|
9
|
+
# to the current CMake project.
|
|
10
|
+
#
|
|
11
|
+
# To use it, add this to your CMakeLists.txt:
|
|
12
|
+
# ```cmake
|
|
13
|
+
# include(${CMAKE_SOURCE_DIR}/../nitrogen/generated/android/NitroInputMask+autolinking.cmake)
|
|
14
|
+
# ```
|
|
15
|
+
|
|
16
|
+
# Define a flag to check if we are building properly
|
|
17
|
+
add_definitions(-DBUILDING_NITROINPUTMASK_WITH_GENERATED_CMAKE_PROJECT)
|
|
18
|
+
|
|
19
|
+
# Enable Raw Props parsing in react-native (for Nitro Views)
|
|
20
|
+
add_definitions(-DRN_SERIALIZABLE_STATE)
|
|
21
|
+
|
|
22
|
+
# Add all headers that were generated by Nitrogen
|
|
23
|
+
include_directories(
|
|
24
|
+
"../nitrogen/generated/shared/c++"
|
|
25
|
+
"../nitrogen/generated/android/c++"
|
|
26
|
+
"../nitrogen/generated/android/"
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
# Add all .cpp sources that were generated by Nitrogen
|
|
30
|
+
target_sources(
|
|
31
|
+
# CMake project name (Android C++ library name)
|
|
32
|
+
NitroInputMask PRIVATE
|
|
33
|
+
# Autolinking Setup
|
|
34
|
+
../nitrogen/generated/android/NitroInputMaskOnLoad.cpp
|
|
35
|
+
# Shared Nitrogen C++ sources
|
|
36
|
+
../nitrogen/generated/shared/c++/HybridNitroInputMaskServiceSpec.cpp
|
|
37
|
+
../nitrogen/generated/shared/c++/HybridNitroInputMaskSpec.cpp
|
|
38
|
+
# Android-specific Nitrogen C++ sources
|
|
39
|
+
../nitrogen/generated/android/c++/JHybridNitroInputMaskServiceSpec.cpp
|
|
40
|
+
../nitrogen/generated/android/c++/JHybridNitroInputMaskSpec.cpp
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
# From node_modules/react-native/ReactAndroid/cmake-utils/folly-flags.cmake
|
|
44
|
+
# Used in node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake
|
|
45
|
+
target_compile_definitions(
|
|
46
|
+
NitroInputMask PRIVATE
|
|
47
|
+
-DFOLLY_NO_CONFIG=1
|
|
48
|
+
-DFOLLY_HAVE_CLOCK_GETTIME=1
|
|
49
|
+
-DFOLLY_USE_LIBCPP=1
|
|
50
|
+
-DFOLLY_CFG_NO_COROUTINES=1
|
|
51
|
+
-DFOLLY_MOBILE=1
|
|
52
|
+
-DFOLLY_HAVE_RECVMMSG=1
|
|
53
|
+
-DFOLLY_HAVE_PTHREAD=1
|
|
54
|
+
# Once we target android-23 above, we can comment
|
|
55
|
+
# the following line. NDK uses GNU style stderror_r() after API 23.
|
|
56
|
+
-DFOLLY_HAVE_XSI_STRERROR_R=1
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
# Add all libraries required by the generated specs
|
|
60
|
+
find_package(fbjni REQUIRED) # <-- Used for communication between Java <-> C++
|
|
61
|
+
find_package(ReactAndroid REQUIRED) # <-- Used to set up React Native bindings (e.g. CallInvoker/TurboModule)
|
|
62
|
+
find_package(react-native-nitro-modules REQUIRED) # <-- Used to create all HybridObjects and use the Nitro core library
|
|
63
|
+
|
|
64
|
+
# Link all libraries together
|
|
65
|
+
target_link_libraries(
|
|
66
|
+
NitroInputMask
|
|
67
|
+
fbjni::fbjni # <-- Facebook C++ JNI helpers
|
|
68
|
+
ReactAndroid::jsi # <-- RN: JSI
|
|
69
|
+
react-native-nitro-modules::NitroModules # <-- NitroModules Core :)
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
# Link react-native (different prefab between RN 0.75 and RN 0.76)
|
|
73
|
+
if(ReactAndroid_VERSION_MINOR GREATER_EQUAL 76)
|
|
74
|
+
target_link_libraries(
|
|
75
|
+
NitroInputMask
|
|
76
|
+
ReactAndroid::reactnative # <-- RN: Native Modules umbrella prefab
|
|
77
|
+
)
|
|
78
|
+
else()
|
|
79
|
+
target_link_libraries(
|
|
80
|
+
NitroInputMask
|
|
81
|
+
ReactAndroid::react_nativemodule_core # <-- RN: TurboModules Core
|
|
82
|
+
)
|
|
83
|
+
endif()
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroInputMask+autolinking.gradle
|
|
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
|
+
/// This is a Gradle file that adds all files generated by Nitrogen
|
|
9
|
+
/// to the current Gradle project.
|
|
10
|
+
///
|
|
11
|
+
/// To use it, add this to your build.gradle:
|
|
12
|
+
/// ```gradle
|
|
13
|
+
/// apply from: '../nitrogen/generated/android/NitroInputMask+autolinking.gradle'
|
|
14
|
+
/// ```
|
|
15
|
+
|
|
16
|
+
logger.warn("[NitroModules] 🔥 NitroInputMask is boosted by nitro!")
|
|
17
|
+
|
|
18
|
+
android {
|
|
19
|
+
sourceSets {
|
|
20
|
+
main {
|
|
21
|
+
java.srcDirs += [
|
|
22
|
+
// Nitrogen files
|
|
23
|
+
"${project.projectDir}/../nitrogen/generated/android/kotlin"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|