@chen834921478/react-native-select-contact 1.6.3
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/.github/workflows/npm-publish.yml +33 -0
- package/CHANGELOG.md +57 -0
- package/RCTSelectContact.podspec +23 -0
- package/README.md +177 -0
- package/android/build.gradle +52 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/android/gradlew +188 -0
- package/android/gradlew.bat +100 -0
- package/android/keystores/BUCK +8 -0
- package/android/keystores/debug.keystore.properties +4 -0
- package/android/src/main/AndroidManifest.xml +6 -0
- package/android/src/main/java/com/streem/selectcontact/SelectContactModule.java +271 -0
- package/android/src/main/java/com/streem/selectcontact/SelectContactPackage.java +25 -0
- package/android/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/android/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/android/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/android/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/android/src/main/res/values/strings.xml +3 -0
- package/android/src/main/res/values/styles.xml +8 -0
- package/index.js +204 -0
- package/ios/RCTSelectContact/RCTSelectContact.h +13 -0
- package/ios/RCTSelectContact/RCTSelectContact.m +107 -0
- package/ios/SelectContact.xcodeproj/project.pbxproj +291 -0
- package/ios/SelectContact.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/ios/SelectContact.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/ios/SelectContact.xcodeproj/project.xcworkspace/xcuserdata/oliverjacobs.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/SelectContact.xcodeproj/project.xcworkspace/xcuserdata/seanadkinson.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/SelectContact.xcodeproj/xcshareddata/xcschemes/SelectContact.xcscheme +115 -0
- package/ios/SelectContact.xcodeproj/xcuserdata/oliverjacobs.xcuserdatad/xcschemes/RCTContactsWrapper.xcscheme +80 -0
- package/ios/SelectContact.xcodeproj/xcuserdata/oliverjacobs.xcuserdatad/xcschemes/xcschememanagement.plist +37 -0
- package/ios/SelectContact.xcodeproj/xcuserdata/seanadkinson.xcuserdatad/xcschemes/RCTSelectContact.xcscheme +80 -0
- package/ios/SelectContact.xcodeproj/xcuserdata/seanadkinson.xcuserdatad/xcschemes/xcschememanagement.plist +27 -0
- package/license.txt +21 -0
- package/package.json +44 -0
- package/react-native-select-contact.podspec +19 -0
- package/selectContact.d.ts +62 -0
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@chen834921478/react-native-select-contact",
|
|
3
|
+
"description": "A react native company to select a contact from your phone's contact list",
|
|
4
|
+
"version": "1.6.3",
|
|
5
|
+
"nativePackage": true,
|
|
6
|
+
"typings": "./selectContact.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"start": "node node_modules/react-native/local-cli/cli.js start"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/chen834921478/react-native-select-contact"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"react",
|
|
16
|
+
"react-native",
|
|
17
|
+
"contacts",
|
|
18
|
+
"address book",
|
|
19
|
+
"people",
|
|
20
|
+
"select contact"
|
|
21
|
+
],
|
|
22
|
+
"author": {
|
|
23
|
+
"name": "Streem (originally LynxIT iDigital)"
|
|
24
|
+
},
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/chen834921478/react-native-select-contact/issues"
|
|
28
|
+
},
|
|
29
|
+
"homepage": "https://github.com/chen834921478/react-native-select-contact",
|
|
30
|
+
"maintainers": [
|
|
31
|
+
{
|
|
32
|
+
"name": "Sean Adkinson"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"react-native": ">=0.51.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"react-native": ">=0.51.0"
|
|
40
|
+
},
|
|
41
|
+
"optionalDependencies": {
|
|
42
|
+
"react-native-action-sheet": "^2.2.0"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
require 'json'
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
|
+
|
|
5
|
+
Pod::Spec.new do |s|
|
|
6
|
+
s.name = package['name']
|
|
7
|
+
s.version = package['version']
|
|
8
|
+
s.summary = package['description']
|
|
9
|
+
s.license = package['license']
|
|
10
|
+
|
|
11
|
+
s.authors = package['author']
|
|
12
|
+
s.homepage = package['homepage']
|
|
13
|
+
s.platforms = { :ios => "9.0" }
|
|
14
|
+
|
|
15
|
+
s.source = { :git => "https://github.com/streem/react-native-select-contact.git", :tag => "v#{s.version}" }
|
|
16
|
+
s.source_files = "ios/**/*.{h,m}"
|
|
17
|
+
|
|
18
|
+
s.dependency 'React-Core'
|
|
19
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
|
|
2
|
+
export function selectContact(textOptions? : TextOptions): Promise<Contact | null>;
|
|
3
|
+
export function selectContactPhone(textOptions? : TextOptions): Promise<ContactPhoneSelection | null>;
|
|
4
|
+
export function selectContactEmail(textOptions? : TextOptions): Promise<ContactEmailSelection | null>;
|
|
5
|
+
export function selectContactPostalAddress(textOptions? : TextOptions): Promise<ContactPostalAddressSelection | null>;
|
|
6
|
+
|
|
7
|
+
export interface PhoneEntry {
|
|
8
|
+
number: string,
|
|
9
|
+
type: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface EmailEntry {
|
|
13
|
+
address: string,
|
|
14
|
+
type: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface AddressEntry {
|
|
18
|
+
formattedAddress: string, // android only
|
|
19
|
+
type: string, // android only
|
|
20
|
+
street: string,
|
|
21
|
+
city: string,
|
|
22
|
+
state: string,
|
|
23
|
+
postalCode: string,
|
|
24
|
+
isoCountryCode: string
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface Contact {
|
|
28
|
+
recordId: string,
|
|
29
|
+
name: string,
|
|
30
|
+
phones: PhoneEntry[],
|
|
31
|
+
emails: EmailEntry[],
|
|
32
|
+
postalAddresses: AddressEntry[]
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface ContactPhoneSelection {
|
|
36
|
+
contact: Contact,
|
|
37
|
+
selectedPhone: PhoneEntry
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface ContactEmailSelection {
|
|
41
|
+
contact: Contact,
|
|
42
|
+
selectedEmail: EmailEntry
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface ContactPostalAddressSelection {
|
|
46
|
+
contact: Contact,
|
|
47
|
+
selectedAddress: AddressEntry
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface TextOptions {
|
|
51
|
+
cancel: String,
|
|
52
|
+
selectPhone: String,
|
|
53
|
+
selectPostalAddress: String,
|
|
54
|
+
selectEmail: String,
|
|
55
|
+
errorNoPhoneNumbersTitle: String,
|
|
56
|
+
errorNoPhoneNumbersBody: String,
|
|
57
|
+
errorNoAddressTitle: String,
|
|
58
|
+
errorNoAddressBody: String,
|
|
59
|
+
errorNoEmailTitle: String,
|
|
60
|
+
errorNoEmailBody: String,
|
|
61
|
+
errorOpenTwice: String,
|
|
62
|
+
}
|