|
1 | | - |
2 | 1 | { |
3 | | - "name": "react-native-imui", |
4 | | - "version": "1.0.3", |
5 | | - "description": "react-native im ui", |
6 | | - "main": "index.js", |
7 | | - "scripts": { |
8 | | - "test": "echo \"Error: no test specified\" && exit 1" |
| 2 | + "_args": [ |
| 3 | + [ |
| 4 | + { |
| 5 | + "raw": "react-native-imui@git+https://github.com/reactnativecomponent/react-native-imui.git", |
| 6 | + "scope": null, |
| 7 | + "escapedName": "react-native-imui", |
| 8 | + "name": "react-native-imui", |
| 9 | + "rawSpec": "git+https://github.com/reactnativecomponent/react-native-imui.git", |
| 10 | + "spec": "git+https://github.com/reactnativecomponent/react-native-imui.git", |
| 11 | + "type": "hosted", |
| 12 | + "hosted": { |
| 13 | + "type": "github", |
| 14 | + "ssh": "[email protected]:reactnativecomponent/react-native-imui.git", |
| 15 | + "sshUrl": "git+ssh://[email protected]/reactnativecomponent/react-native-imui.git", |
| 16 | + "httpsUrl": "git+https://github.com/reactnativecomponent/react-native-imui.git", |
| 17 | + "gitUrl": "git://github.com/reactnativecomponent/react-native-imui.git", |
| 18 | + "shortcut": "github:reactnativecomponent/react-native-imui", |
| 19 | + "directUrl": "https://raw.githubusercontent.com/reactnativecomponent/react-native-imui/master/package.json" |
| 20 | + } |
| 21 | + }, |
| 22 | + "/Users/dowin/KinoooProject/CompanyApp/react-native-wallet" |
| 23 | + ] |
| 24 | + ], |
| 25 | + "_from": "git+https://github.com/reactnativecomponent/react-native-imui.git", |
| 26 | + |
| 27 | + "_inCache": true, |
| 28 | + "_location": "/react-native-imui", |
| 29 | + "_phantomChildren": {}, |
| 30 | + "_requested": { |
| 31 | + "raw": "react-native-imui@git+https://github.com/reactnativecomponent/react-native-imui.git", |
| 32 | + "scope": null, |
| 33 | + "escapedName": "react-native-imui", |
| 34 | + "name": "react-native-imui", |
| 35 | + "rawSpec": "git+https://github.com/reactnativecomponent/react-native-imui.git", |
| 36 | + "spec": "git+https://github.com/reactnativecomponent/react-native-imui.git", |
| 37 | + "type": "hosted", |
| 38 | + "hosted": { |
| 39 | + "type": "github", |
| 40 | + "ssh": "[email protected]:reactnativecomponent/react-native-imui.git", |
| 41 | + "sshUrl": "git+ssh://[email protected]/reactnativecomponent/react-native-imui.git", |
| 42 | + "httpsUrl": "git+https://github.com/reactnativecomponent/react-native-imui.git", |
| 43 | + "gitUrl": "git://github.com/reactnativecomponent/react-native-imui.git", |
| 44 | + "shortcut": "github:reactnativecomponent/react-native-imui", |
| 45 | + "directUrl": "https://raw.githubusercontent.com/reactnativecomponent/react-native-imui/master/package.json" |
| 46 | + } |
9 | 47 | }, |
| 48 | + "_requiredBy": [ |
| 49 | + "/" |
| 50 | + ], |
| 51 | + "_resolved": "git+https://github.com/reactnativecomponent/react-native-imui.git#8615656d916352a430e4a6312b4357ac5d6b04f6", |
| 52 | + "_shasum": "335e972a8a57c354ee30da9d8466d91d7e4a12aa", |
| 53 | + "_shrinkwrap": null, |
| 54 | + "_spec": "react-native-imui@git+https://github.com/reactnativecomponent/react-native-imui.git", |
| 55 | + "_where": "/Users/dowin/KinoooProject/CompanyApp/react-native-wallet", |
| 56 | + "author": "", |
| 57 | + "bugs": { |
| 58 | + "url": "https://github.com/reactnativecomponent/react-native-imui/issues" |
| 59 | + }, |
| 60 | + "dependencies": {}, |
| 61 | + "description": "react-native im ui", |
| 62 | + "devDependencies": {}, |
| 63 | + "gitHead": "8615656d916352a430e4a6312b4357ac5d6b04f6", |
| 64 | + "homepage": "https://github.com/reactnativecomponent/react-native-imui#readme", |
10 | 65 | "keywords": [ |
11 | 66 | "react-native" |
12 | 67 | ], |
13 | | - "repository" : |
14 | | - { "type" : "git", |
15 | | - "url" : "https://github.com/reactnativecomponent/react-native-imui.git" |
16 | | - }, |
17 | | - "author": "", |
18 | 68 | "license": "", |
| 69 | + "main": "index.js", |
| 70 | + "name": "react-native-imui", |
| 71 | + "optionalDependencies": {}, |
19 | 72 | "peerDependencies": { |
20 | 73 | "react-native": ">=0.47.0" |
21 | | - } |
| 74 | + }, |
| 75 | + "readme": "# ReactNative IMUI\n项目fork自 jpush 的 [Aurora IMUI](https://github.com/jpush/aurora-imui/tree/master/ReactNative)\n\n## 使用\n参考[demo](https://github.com/reactnativecomponent/react-native-chat-demo)\n## 安装\n\n```\nnpm install react-native-imui --save\n```\n `settings.gradle` 中的引用路径:\n```\ninclude ':app', ':react-native-imui'\nproject(':react-native-imui').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-imui/android')\ninclude ':react-native-imui:chatinput'\ninclude ':react-native-imui:messagelist'\ninclude ':react-native-imui:popuptool'\ninclude ':react-native-imui:emoji'\ninclude ':react-native-imui:photoViewPagerview'\ninclude ':react-native-imui:photoViewPagerview:photodraweeview'\n```\n\n然后在 app 的 `build.gradle`中引用:\n\n```\ndependencies {\n compile project(':react-native-imui')\n}\n```\n\n**注意事项(Android):我们使用了 support v4, v7 25.3.1 版本,因此需要将你的 build.gradle 中 buildToolsVersion 及 compiledSdkVersion 改为 25 以上。可以参考 demo 的配置。**\n\n## 配置\n\n- ### Android\n\n - 引入 Package:\n\n > MainApplication.java\n\n ```\n import cn.jiguang.imui.messagelist.ReactIMUIPackage;\n ...\n\n @Override\n protected List<ReactPackage> getPackages() {\n return Arrays.<ReactPackage>asList(\n new MainReactPackage(),\n new ReactIMUIPackage()\n );\n }\n ```\n\n\n\n- ### iOS\n - Find PROJECT -> TARGETS -> General -> Embedded Binaries and add RCTAuroraIMUI.framework\n - 把 `iOSResourcePacket` 目录`NIMKitEmoticon.bundle`拖到Xcode`Resources`目录下\n - 把 `iOSResourcePacket` 目录`IMGS`拖到Xcode`Images.xcassets`下\n\n## 数据格式\n\n使用 MessageList,你需要定义 `message` 对象和 `fromUser` 对象。\n\n- `message` 对象格式:\n\n**status 必须为以下四个值之一: \"send_succeed\", \"send_failed\", \"send_going\", \"download_failed\",如果没有定义这个属性, 默认值是 \"send_succeed\".**\n\n ```\n message = { // text message\n msgId: \"msgid\",\n status: \"send_going\",\n msgType: \"text\",\n isOutgoing: true,\n text: \"text\"\n fromUser: {}\n}\n\nmessage = { // image message\n msgId: \"msgid\",\n msgType: \"image\",\n isOutGoing: true,\n progress: \"progress string\"\n mediaPath: \"image path\"\n fromUser: {}\n}\n\n\nmessage = { // voice message\n msgId: \"msgid\",\n msgType: \"voice\",\n isOutGoing: true,\n duration: number, // 注意这个值有用户自己设置时长,单位秒\n mediaPath: \"voice path\"\n fromUser: {}\n}\n\nmessage = { // video message\n msgId: \"msgid\",\n status: \"send_failed\",\n msgType: \"video\",\n isOutGoing: true,\n druation: number\n mediaPath: \"voice path\"\n fromUser: {}\n}\n\nmessage = { // event message\n msgId: \"msgid\",\n msgType: \"event\",\n text: \"the event text\"\n}\n ```\n\n- `fromUser` 对象格式:\n\n ```\n fromUser = {\n userId: \"\"\n displayName: \"\"\n avatarPath: \"avatar image path\"\n }\n ```\n\n", |
| 76 | + "readmeFilename": "README.md", |
| 77 | + "repository": { |
| 78 | + "type": "git", |
| 79 | + "url": "git+https://github.com/reactnativecomponent/react-native-imui.git" |
| 80 | + }, |
| 81 | + "scripts": { |
| 82 | + "test": "echo \"Error: no test specified\" && exit 1" |
| 83 | + }, |
| 84 | + "version": "1.0.3" |
22 | 85 | } |
0 commit comments