{"_id":"@applicaster/zapp-react-dom-bridge","_rev":"5-589946c133d4f39eb83efc3e7beb474a","name":"@applicaster/zapp-react-dom-bridge","dist-tags":{"next":"1.6.1-rc.0","latest":"1.6.1-rc.0"},"versions":{"1.6.1-rc.0":{"name":"@applicaster/zapp-react-dom-bridge","version":"1.6.1-rc.0","description":"Applicaster Zapp React Native modules","main":"index.js","scripts":{"test":"jest -w=2"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+ssh://git@github.com/applicaster/zapp-react-dom.git"},"keywords":["Zapp","Applicaster","Quick-Brick","React","Native","native","modules","bridge"],"author":{"name":"Applicaster"},"license":"MIT","bugs":{"url":"https://github.com/applicaster/zapp-react-native/issues"},"homepage":"https://github.com/applicaster/zapp-react-native#readme","dependencies":{"@applicaster/zapp-pipes-dev-kit":"*"},"peerDependencies":{"react-native":"0.50.4","react-redux":"^5.0.7"},"devDependencies":{"babel-cli":"^6.26.0","babel-preset-flow":"^6.23.0","flow-bin":"^0.72.0"},"_id":"@applicaster/zapp-react-dom-bridge@1.6.1-rc.0","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"applicaster-devs","email":"technical@applicaster.com"},"dist":{"integrity":"sha512-yLXn+PCoWc5fR3TuhiUisXqOhZ5sv33c/yTwH+aE+93e2Exvj+WYJlsYzSqykOV3tVNvCOIycION7r4i70879w==","shasum":"8d3a31c59559b9fbe21c479cf0467596c375f949","tarball":"https://registry.npmjs.org/@applicaster/zapp-react-dom-bridge/-/zapp-react-dom-bridge-1.6.1-rc.0.tgz","fileCount":14,"unpackedSize":22254,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdonyCRA9TVsSAnZWagAAq1QQAJlry1/Loq/4jTDIpTnX\nEzDiM6Qn1Ig/ZCE5A+t7lWq2BKFpmUOLIKMj1PllTaUtPwxAsvVirBsI0uaK\nXew2YQyidxRoNrUv5mZGefAUcuRbAxi+ht2bmyVr+YBa14eGRpFCiHnQqxxF\nThGp5xu8SImNmyvB2nZAR+5TGakqU5G6ZzZ7j2y6UrYmIJ6Vvtm7g8hDypJh\nlMcLCd8FEpID98cgM7rG/laUfZDdS81El+cBmB5APAiHk8kbNEGwqpp5cw5v\nPvgxbnfC08PV3oIV9QFP1tcLTT5zq4ShtZmZrXSQoWZTq1oZBz0eIQamb1Z3\nYn5mPkk7+QgUVbQCXYtLfbGZVlhmpK8rZOb7iZzvnbBk/aAbDOgkP4z6Xtpc\n7LE394XDxu0v1HOGqAqke8B1ZWvMdqOJfB9oDMbFRQpZNfYFbz7K+u4IAG5O\n3YpmGxXY9ckPFKCSZP/VBc1Hfi1e/RUSySnCrcGQug5jchvvcTpH8ZNYiMnh\n2ONcBIk43I3ttYM7Zjx/nuGbfVj/lwxFnEQeUCF0w0FXyLZtDPIKyV1Vbodg\n9pQPayp4UnN9xHoWKhCT0I4Sh+fr01DLrsfbfTY33zcO0r8CW0mC8cbE297U\nE4488lVxW0A0hCxuD5jgxNyKS+Z+QflT9O3DBoyJMeLWl0yY24H/gJy7HEY1\n1jGI\r\n=WNpk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDExJUne7hgvLtDb6l/lg07OTE78wUCjS/xcyZ5SXzFXwIgVXecd9JcMOnvy//vqem3Oz+ddYJLXHnX3ZaA/3d/u6M="}]},"maintainers":[{"name":"applicaster-devs","email":"technical@applicaster.com"},{"name":"applicaster-external-devs","email":"technical@applicaster.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zapp-react-dom-bridge_1.6.1-rc.0_1551272434231_0.4089812283721799"},"_hasShrinkwrap":false}},"time":{"created":"2019-02-27T13:00:34.076Z","1.6.1-rc.0":"2019-02-27T13:00:34.373Z","modified":"2023-03-08T18:50:31.238Z"},"maintainers":[{"email":"zapp@applicaster.com","name":"zapp-ci"},{"email":"r.meirman@applicaster.com","name":"meirmanr"},{"email":"technical@applicaster.com","name":"applicaster-devs"},{"email":"technical@applicaster.com","name":"applicaster-external-devs"}],"description":"Applicaster Zapp React Native modules","homepage":"https://github.com/applicaster/zapp-react-native#readme","keywords":["Zapp","Applicaster","Quick-Brick","React","Native","native","modules","bridge"],"repository":{"type":"git","url":"git+ssh://git@github.com/applicaster/zapp-react-dom.git"},"author":{"name":"Applicaster"},"bugs":{"url":"https://github.com/applicaster/zapp-react-native/issues"},"license":"MIT","readme":"# Zapp React Native Bridge\n\n![](https://img.shields.io/badge/React%20Native-0.50.4-blue.svg)\n![](https://img.shields.io/badge/React-16.2.0-blue.svg)\n[![CircleCI](https://circleci.com/gh/applicaster/Zapp-React-Native/tree/master.svg?style=shield&circle-token=07da67c776e760b087a4cc707712cd9a9c04d1af)](https://circleci.com/gh/applicaster/Zapp-React-Native/tree/master)\n![npm version](https://badge.fury.io/js/%40applicaster%2Fzapp-react-native-bridge.svg)\n\n![logo](../../logo.png)\n\nThis package contains the interface for the Zapp App's native Module.\n\n## Available Modules\n\n### QuickBrick\n\n#### `sendQuickBrickEvent(eventName<String>, payload<Object?>)`\n\n##### Description\n\nSends an event from JS to the QuickBrick Communication Module.\n\nAvailable events :\n\n* `quickBrickReady`: no payload required. This event tells the native side that the quick brick app is ready to be presented. This event must be fired, otherwise the React Native view will not appear in the app\n\n##### Usage\n\n```javascript\nimport React from \"react\";\nimport { AppRegistry } from \"react-native\";\nimport { sendQuickBrickEvent } from \"@applicaster/zapp-react-native-bridge/QuickBrick\";\n\nimport { appLoader } from \"...\";\n\nclass App extends React.Component {\n  componentDidMount() {\n    appLoader().then(() => sendQuickBrickEvent(\"quickBrickReady\"));\n  }\n\n  render() {\n    return (\n      <View>\n        <Text>\n          This app will show when the appLoader resolves, but not before\n        </Text>\n      </View>\n    );\n  }\n}\n```\n\n#### `getAppData(): Object`\n\n##### Description\n\nThis function will return the app data constants defined on the native side. Since this is exported as Native Module constants, their access is synchronous, and don't require to use a promise or async / await\n\n##### Usage\n\n```javascript\nimport { getAppData } from \"@applicaster/zapp-react-native-bridge/QuickBrick\";\n\nconst appData = getAppData();\n// appData = { bundleIdentifier: ..., accountId: ..., ...};\n```\n\n### ZappPipes\n\n#### `bootstrapZappPipes(providers: Array<ProviderModules>): ZappPipesAdapter`\n\n##### Description\n\nBootstraps the ZappPipes adapter with the app's plugin, and returns an object which can used to perform zapp pipes requests\n\n##### Usage\n\n```javascript\n// this is an illustration of the required input - in the app, the list of providers should come from the app's plugin configuration\nimport applicasterProvider from \"@applicaster/zapp-pipes-provider-applicaster\";\nimport generalProvider from \"@applicaster/zapp-pipes-provider-general\";\n\nconst providers = [applicasterProvider, generalProvider];\n\nconst zappPipesAdapter = bootstrapZappPipes(providers);\nzappPipesAdapter.get(\n  \"general://fetchData?type=ATOM_XML&url=...\",\n  ({ code, response, url }) => {\n    // handle response\n  }\n);\n```\n\n## Contributing\n\nIn order to add a module here, simply add a folder with your native module, and document here your module and its methods\n\nTo access your module, import it with the path to your module's folder\n\n```javascript\nimport { MyAwesomeModuleFunction } from \"@applicaster/zapp-react-native-bridge/MyAwesomeModule\";\n```\n","readmeFilename":"README.md"}