@react-native-ohos/react-native-text-input-mask 3.1.6-rc.4 → 3.1.6-rc.5

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.
Files changed (51) hide show
  1. package/.eslintrc +16 -0
  2. package/.gitattributes +1 -0
  3. package/.mtslconfig.json +1 -0
  4. package/OAT.xml +79 -0
  5. package/README.md +6 -8
  6. package/dist/index.d.ts +0 -2
  7. package/dist/index.js +6 -25
  8. package/dist/index.js.map +1 -1
  9. package/dist/src/RNNativeTextInputMask.d.ts +0 -1
  10. package/dist/src/RNNativeTextInputMask.js.map +1 -1
  11. package/dist/src/index.harmony.d.ts +0 -1
  12. package/dist/src/index.harmony.js +0 -3
  13. package/dist/src/index.harmony.js.map +1 -1
  14. package/dist/tsconfig.tsbuildinfo +1 -1
  15. package/harmony/text_input_mask/Index.ets +3 -1
  16. package/harmony/text_input_mask/oh-package.json5 +2 -2
  17. package/harmony/text_input_mask/src/main/cpp/RNTextInputMask.cpp +64 -95
  18. package/harmony/text_input_mask/src/main/cpp/RNTextInputMask.h +10 -9
  19. package/harmony/text_input_mask/src/main/cpp/RNTextInputMaskPackage.h +4 -2
  20. package/harmony/text_input_mask/src/main/cpp/common/Compiler.h +84 -81
  21. package/harmony/text_input_mask/src/main/cpp/common/FormatError.h +5 -5
  22. package/harmony/text_input_mask/src/main/cpp/common/FormatSanitizer.h +26 -28
  23. package/harmony/text_input_mask/src/main/cpp/common/Mask.h +48 -45
  24. package/harmony/text_input_mask/src/main/cpp/common/RTLMask.h +18 -20
  25. package/harmony/text_input_mask/src/main/cpp/common/model/AffinityCalculationStrategy.h +23 -19
  26. package/harmony/text_input_mask/src/main/cpp/common/model/CaretString.h +11 -13
  27. package/harmony/text_input_mask/src/main/cpp/common/model/CaretStringIterator.h +9 -10
  28. package/harmony/text_input_mask/src/main/cpp/common/model/Next.h +8 -8
  29. package/harmony/text_input_mask/src/main/cpp/common/model/Notation.h +11 -11
  30. package/harmony/text_input_mask/src/main/cpp/common/model/RTLCaretStringIterator.h +2 -2
  31. package/harmony/text_input_mask/src/main/cpp/common/model/State.h +43 -32
  32. package/harmony/text_input_mask/src/main/cpp/common/model/common.h +19 -11
  33. package/harmony/text_input_mask/src/main/ets/{RNTextInputMaskPackage.ts → RNTextInputMaskPackage.ets} +2 -1
  34. package/harmony/text_input_mask/src/main/ets/RNTextInputMaskTurboModle.ts +0 -4
  35. package/harmony/text_input_mask/src/ohosTest/ets/test/Ability.test.ets +41 -0
  36. package/harmony/text_input_mask/src/ohosTest/ets/test/List.test.ets +11 -0
  37. package/harmony/text_input_mask/src/ohosTest/module.json5 +13 -0
  38. package/harmony/text_input_mask/src/test/List.test.ets +11 -0
  39. package/harmony/text_input_mask/src/test/LocalUnit.test.ets +39 -0
  40. package/harmony/text_input_mask.har +0 -0
  41. package/index.tsx +5 -24
  42. package/package.json +17 -11
  43. package/src/RNNativeTextInputMask.ts +0 -1
  44. package/src/index.harmony.ts +0 -3
  45. package/tsconfig.json +43 -0
  46. package/README.OpenSource +0 -11
  47. package/dist/babel.config.d.ts +0 -7
  48. package/dist/babel.config.js +0 -16
  49. package/dist/babel.config.js.map +0 -1
  50. package/harmony/text_input_mask/BuildProfile.ets +0 -17
  51. /package/harmony/text_input_mask/{ts.ts → ts.ets} +0 -0
package/package.json CHANGED
@@ -1,22 +1,30 @@
1
1
  {
2
2
  "name": "@react-native-ohos/react-native-text-input-mask",
3
- "version": "3.1.6-rc.4",
3
+ "version": "3.1.6-rc.5",
4
4
  "description": "Text input mask for React Native.",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
7
7
  "repository": {
8
8
  "type": "git",
9
- "url": "https://gitcode.com/openharmony-sig/rntpc_react-native-text-input-mask.git"
9
+ "url": "https://gitcode.com/openharmony-sig/rntpc_react-native-text-input-mask"
10
10
  },
11
11
  "keywords": [
12
12
  "react",
13
13
  "native",
14
14
  "mask",
15
15
  "text input",
16
+ "android",
17
+ "ios",
16
18
  "harmony"
17
19
  ],
18
20
  "harmony": {
19
- "alias":"react-native-text-input-mask"
21
+ "alias":"react-native-text-input-mask",
22
+ "autolinking": {
23
+ "etsPackageClassName":"RNTextInputMaskPackage",
24
+ "cppPackageClassName":"RNTextInputMaskPackage",
25
+ "cmakeLibraryTargetName": "text_input_mask",
26
+ "ohPackageName": "@react-native-ohos/react-native-text-input-mask"
27
+ }
20
28
  },
21
29
  "scripts": {
22
30
  "prepublish": "npx tsc"
@@ -27,22 +35,20 @@
27
35
  "devDependencies": {
28
36
  "@react-native-community/eslint-config": "3.2.0",
29
37
  "@types/react": "^18.2.12",
30
- "react-native": "^0.77.1",
38
+ "react-native": "^0.71.10",
31
39
  "tslib": "^2.5.3",
32
40
  "typescript": "^5.1.3"
33
41
  },
34
- "files": [
35
- "src",
36
- "harmony",
37
- "dist",
38
- "index.tsx"
39
- ],
40
42
  "peerDependencies": {
41
43
  "react-native": ">=0.69.0"
42
44
  },
45
+ "publishConfig": {
46
+ "registry": "https://registry.npmjs.org/",
47
+ "access": "public"
48
+ },
43
49
  "author": "Martin Treurnicht",
44
50
  "bugs": {
45
51
  "url": "https://gitcode.com/openharmony-sig/rntpc_react-native-text-input-mask/issues"
46
52
  },
47
- "homepage": "https://gitcode.com/openharmony-sig/rntpc_react-native-text-input-mask/tree/br_rnoh0.77#readme"
53
+ "homepage": "https://gitcode.com/openharmony-sig/rntpc_react-native-text-input-mask"
48
54
  }
@@ -137,7 +137,6 @@ export interface Spec extends TurboModule {
137
137
  mask (mask: string, value: string, autocomplete: boolean) :Promise<string>,
138
138
  unmask (mask: string, value: string, autocomplete: boolean): Promise<string>,
139
139
  setMask (reactNode: number, primaryFormat: string, options?: MaskOptions): void;
140
- unmaskWithRightToLeft (mask: string, value: string, autocomplete: boolean, rightToLeft: boolean): Promise<string>;
141
140
  }
142
141
 
143
142
  export default TurboModuleRegistry.get<Spec>('RNTextInputMask') as Spec ;
@@ -139,9 +139,6 @@ class HarmonyTextInputMask {
139
139
  static setMask(reactNode: number, primaryFormat: string, options?: MaskOptions): void {
140
140
  RNNativeTextInputMask.setMask(reactNode, primaryFormat, options)
141
141
  }
142
- static unmaskWithRightToLeft(mask: string, value: string, autocomplete: boolean, rightToLeft: boolean): Promise<string> {
143
- return RNNativeTextInputMask.unmaskWithRightToLeft(mask, value, autocomplete, rightToLeft);
144
- }
145
142
  }
146
143
  console.log("======HarmonyTextInputMask=",HarmonyTextInputMask)
147
144
  export default HarmonyTextInputMask;
package/tsconfig.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "compilerOptions": {
3
+ /* Basic Options */
4
+ "incremental": true /* Enable incremental compilation */,
5
+ "target": "ES6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
6
+ // "module": "es2015", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
7
+ "lib": [
8
+ "esnext"
9
+ ] /* Specify library files to be included in the compilation. */,
10
+ "allowJs": true /* Allow javascript files to be compiled. */,
11
+ "jsx": "react-native" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */,
12
+ "declaration": true /* Generates corresponding '.d.ts' file. */,
13
+ "sourceMap": true /* Generates corresponding '.map' file. */,
14
+ "importHelpers": true /* Import emit helpers from 'tslib'. */,
15
+ "outDir": "dist",
16
+ /* Strict Type-Checking Options */
17
+ "strict": true /* Enable all strict type-checking options. */,
18
+ "noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
19
+
20
+ /* Additional Checks */
21
+ "noUnusedLocals": true /* Report errors on unused locals. */,
22
+ "noUnusedParameters": true /* Report errors on unused parameters. */,
23
+ "noImplicitReturns": true /* Report error when not all code paths in function return a value. */,
24
+ "noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */,
25
+
26
+ /* Module Resolution Options */
27
+ "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
28
+ "allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */,
29
+ "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
30
+ // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
31
+
32
+ /* Experimental Options */
33
+ "experimentalDecorators": true /* Enables experimental support for ES7 decorators. */,
34
+ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
35
+
36
+ /* Other Options */
37
+ "allowUnreachableCode": false /* Do not report errors on unreachable code. */,
38
+ "skipLibCheck": true /* https://github.com/DefinitelyTyped/DefinitelyTyped/issues/24573 */
39
+
40
+ },
41
+ // "included":["src/"],
42
+ "exclude":["node_modules","harmony"]
43
+ }
package/README.OpenSource DELETED
@@ -1,11 +0,0 @@
1
- [
2
- {
3
- "Name": "react-native-text-input-mask",
4
- "License": "MIT License",
5
- "License File": " LICENSE ",
6
- "Version Number": "3.1.5",
7
- "Owner" : "xiafeng@huawei.com",
8
- "Upstream URL": "https://github.com/react-native-text-input-mask/react-native-text-input-mask",
9
- "Description": "Text input mask for React Native on iOS and Android."
10
- }
11
- ]
@@ -1,7 +0,0 @@
1
- export let presets: string[];
2
- export let plugins: (string | {
3
- alias: {
4
- '@react-native-community/push-notification-ios': string;
5
- };
6
- cwd: string;
7
- })[][];
@@ -1,16 +0,0 @@
1
- "use strict";
2
- module.exports = {
3
- presets: ['module:metro-react-native-babel-preset'],
4
- plugins: [
5
- [
6
- 'module-resolver',
7
- {
8
- alias: {
9
- '@react-native-community/push-notification-ios': './js',
10
- },
11
- cwd: 'babelrc',
12
- },
13
- ],
14
- ],
15
- };
16
- //# sourceMappingURL=babel.config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"babel.config.js","sourceRoot":"","sources":["../babel.config.js"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,GAAG;IACf,OAAO,EAAE,CAAC,wCAAwC,CAAC;IACnD,OAAO,EAAE;QACP;YACE,iBAAiB;YACjB;gBACE,KAAK,EAAE;oBACL,+CAA+C,EAAE,MAAM;iBACxD;gBACD,GAAG,EAAE,SAAS;aACf;SACF;KACF;CACF,CAAC"}
@@ -1,17 +0,0 @@
1
- /**
2
- * Use these variables when you tailor your ArkTS code. They must be of the const type.
3
- */
4
- export const HAR_VERSION = '3.1.6-rc.2';
5
- export const BUILD_MODE_NAME = 'debug';
6
- export const DEBUG = true;
7
- export const TARGET_NAME = 'default';
8
-
9
- /**
10
- * BuildProfile Class is used only for compatibility purposes.
11
- */
12
- export default class BuildProfile {
13
- static readonly HAR_VERSION = HAR_VERSION;
14
- static readonly BUILD_MODE_NAME = BUILD_MODE_NAME;
15
- static readonly DEBUG = DEBUG;
16
- static readonly TARGET_NAME = TARGET_NAME;
17
- }
File without changes