├── .github ├── issue_template.md └── pull_request_template.md ├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── README.md ├── demo ├── app │ ├── App_Resources │ │ ├── Android │ │ │ ├── app.gradle │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── res │ │ │ │ ├── drawable-hdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── drawable-ldpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── drawable-mdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── drawable-nodpi │ │ │ │ └── splash_screen.xml │ │ │ │ ├── drawable-xhdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── drawable-xxxhdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── values-v21 │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ │ └── values │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ └── iOS │ │ │ ├── Assets.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── Contents.json │ │ │ │ ├── icon-29.png │ │ │ │ ├── icon-29@2x.png │ │ │ │ ├── icon-29@3x.png │ │ │ │ ├── icon-40.png │ │ │ │ ├── icon-40@2x.png │ │ │ │ ├── icon-40@3x.png │ │ │ │ ├── icon-50.png │ │ │ │ ├── icon-50@2x.png │ │ │ │ ├── icon-57.png │ │ │ │ ├── icon-57@2x.png │ │ │ │ ├── icon-60@2x.png │ │ │ │ ├── icon-60@3x.png │ │ │ │ ├── icon-72.png │ │ │ │ ├── icon-72@2x.png │ │ │ │ ├── icon-76.png │ │ │ │ ├── icon-76@2x.png │ │ │ │ └── icon-83.5@2x.png │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.launchimage │ │ │ │ ├── Contents.json │ │ │ │ ├── Default-568h@2x.png │ │ │ │ ├── Default-667h@2x.png │ │ │ │ ├── Default-736h@3x.png │ │ │ │ ├── Default-Landscape.png │ │ │ │ ├── Default-Landscape@2x.png │ │ │ │ ├── Default-Landscape@3x.png │ │ │ │ ├── Default-Portrait.png │ │ │ │ ├── Default-Portrait@2x.png │ │ │ │ ├── Default.png │ │ │ │ └── Default@2x.png │ │ │ ├── LaunchScreen.AspectFill.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── LaunchScreen-AspectFill.png │ │ │ │ └── LaunchScreen-AspectFill@2x.png │ │ │ └── LaunchScreen.Center.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── LaunchScreen-Center.png │ │ │ │ └── LaunchScreen-Center@2x.png │ │ │ ├── Info.plist │ │ │ ├── LaunchScreen.storyboard │ │ │ └── build.xcconfig │ ├── app.css │ ├── app.ts │ ├── main-page.ts │ ├── main-page.xml │ ├── main-view-model.ts │ ├── package.json │ ├── root-page.xml │ ├── search │ │ ├── search-page.ts │ │ ├── search-page.xml │ │ └── search-view-model.ts │ └── tests │ │ └── tests.js ├── karma.conf.js ├── package.json ├── references.d.ts ├── tsconfig.json └── tsconfig.tns.json ├── publish ├── CHANGELOG.md ├── pack.sh ├── package.json └── publish.sh ├── src ├── .npmignore ├── couchbase-plugin.android.ts ├── couchbase-plugin.common.ts ├── couchbase-plugin.ios.ts ├── index.d.ts ├── package.json ├── platforms │ ├── android │ │ ├── fancycouchbase-release.aar │ │ └── include.gradle │ └── ios │ │ └── Podfile ├── references.d.ts ├── scripts │ └── build-native.js ├── tsconfig.json └── typings │ ├── android.d.ts │ └── objc!CouchbaseLite.d.ts └── tslint.json /.github/issue_template.md: -------------------------------------------------------------------------------- 1 | ### Make sure to check the demo app(s) for sample usage 2 | 3 | ### Make sure to check the existing issues in this repository 4 | 5 | ### If the demo apps cannot help and there is no issue for your problem, tell us about it 6 | Please, ensure your title is less than 63 characters long and starts with a capital 7 | letter. 8 | 9 | ### Which platform(s) does your issue occur on? 10 | - iOS/Android/Both 11 | - iOS/Android versions 12 | - emulator or device. What type of device? 13 | 14 | ### Please, provide the following version numbers that your issue occurs with: 15 | 16 | - CLI: (run `tns --version` to fetch it) 17 | - Cross-platform modules: (check the 'version' attribute in the 18 | `node_modules/tns-core-modules/package.json` file in your project) 19 | - Runtime(s): (look for the `"tns-android"` and `"tns-ios"` properties in the `package.json` file of your project) 20 | - Plugin(s): (look for the version numbers in the `package.json` file of your 21 | project and paste your dependencies and devDependencies here) 22 | 23 | ### Please, tell us how to recreate the issue in as much detail as possible. 24 | Describe the steps to reproduce it. 25 | 26 | ### Is there any code involved? 27 | - provide a code example to recreate the problem 28 | - (EVEN BETTER) provide a .zip with application or refer to a repository with application where the problem is reproducible. 29 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | ## PR Checklist 11 | 12 | - [ ] The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/CONTRIBUTING.md#commit-messages. 13 | - [ ] There is an issue for the bug/feature this PR is for. To avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it. 14 | - [ ] All existing tests are passing 15 | - [ ] Tests for the changes are included 16 | 17 | ## What is the current behavior? 18 | 19 | 20 | ## What is the new behavior? 21 | 22 | 23 | Fixes/Implements/Closes #[Issue Number]. 24 | 25 | 26 | 27 | 36 | 37 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | .idea 3 | *.DS_Store 4 | *.esm.json 5 | *.js 6 | *.js.map 7 | *.log 8 | src/*.d.ts 9 | !src/index.d.ts 10 | !src/references.d.ts 11 | !src/scripts/*.js 12 | !seed-tests/*.js 13 | seed-tests/seed-copy/**/*.* 14 | seed-tests/seed-copy-new-git-repo/**/*.* 15 | !demo/karma.conf.js 16 | !demo/app/tests/*.js 17 | demo/*.d.ts 18 | !demo/references.d.ts 19 | demo/lib 20 | demo/platforms 21 | node_modules 22 | publish/src 23 | publish/package 24 | demo/report/report.html 25 | demo/report/stats.json 26 | package-lock.json 27 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | matrix: 2 | include: 3 | - stage: "Lint" 4 | language: node_js 5 | os: linux 6 | node_js: "8" 7 | script: cd src && npm run ci.tslint && cd ../demo && npm run ci.tslint 8 | - stage: "WebPack, Build and Test" 9 | os: osx 10 | env: 11 | - WebPack="iOS" 12 | osx_image: xcode9.2 13 | language: node_js 14 | node_js: "8" 15 | jdk: oraclejdk8 16 | script: cd demo && npm run build.plugin && npm i && tns build ios --bundle --env.uglify 17 | - language: android 18 | os: linux 19 | env: 20 | - WebPack="Android" 21 | jdk: oraclejdk8 22 | before_install: nvm install 8 23 | script: cd demo && npm run build.plugin && npm i && tns build android --bundle --env.uglify --env.snapshot 24 | - language: android 25 | env: 26 | - BuildAndroid="26" 27 | os: linux 28 | jdk: oraclejdk8 29 | before_install: nvm install stable 30 | script: 31 | - cd src && npm i && npm run tsc && cd ../demo && tns build android 32 | - os: osx 33 | env: 34 | - BuildiOS="11" 35 | - Xcode="9.2" 36 | osx_image: xcode9.2 37 | language: node_js 38 | node_js: "8" 39 | jdk: oraclejdk8 40 | script: 41 | - cd src && npm i && npm run tsc && cd ../demo && tns build ios 42 | - os: linux 43 | language: android 44 | dist: precise 45 | sudo: required 46 | jdk: oraclejdk8 47 | before_script: 48 | - echo no | android create avd --force -n test -t android-21 -b armeabi-v7a 49 | - emulator -avd test -no-audio -no-window & 50 | - android-wait-for-emulator 51 | before_install: 52 | - nvm install 8 53 | script: cd src && npm run test.android 54 | - os: osx 55 | language: node_js 56 | node_js: "8" 57 | jdk: oraclejdk8 58 | osx_image: xcode9.2 59 | script: cd src && npm run test.ios 60 | 61 | android: 62 | components: 63 | - tools 64 | - platform-tools 65 | - build-tools-26.0.1 66 | - android-26 67 | - android-23 68 | - extra-android-m2repository 69 | - sys-img-armeabi-v7a-android-21 70 | 71 | install: 72 | - echo no | npm install -g nativescript 73 | - tns usage-reporting disable 74 | - tns error-reporting disable -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | ## [0.9.1](https://github.com/triniwiz/nativescript-couchbase-plugin/tree/0.9.1) (2019-04-04) 4 | [Full Changelog](https://github.com/triniwiz/nativescript-couchbase-plugin/compare/v0.9.0...0.9.1) 5 | 6 | **Fixed bugs:** 7 | 8 | - Serialize comparison values [\#18](https://github.com/triniwiz/nativescript-couchbase-plugin/issues/18) 9 | 10 | **Merged pull requests:** 11 | 12 | - Update README.md [\#17](https://github.com/triniwiz/nativescript-couchbase-plugin/pull/17) ([cfjedimaster](https://github.com/cfjedimaster)) 13 | 14 | ## [v0.9.0](https://github.com/triniwiz/nativescript-couchbase-plugin/tree/v0.9.0) (2019-01-22) 15 | [Full Changelog](https://github.com/triniwiz/nativescript-couchbase-plugin/compare/v0.8.1...v0.9.0) 16 | 17 | ## [v0.8.1](https://github.com/triniwiz/nativescript-couchbase-plugin/tree/v0.8.1) (2019-01-22) 18 | [Full Changelog](https://github.com/triniwiz/nativescript-couchbase-plugin/compare/v0.8.0...v0.8.1) 19 | 20 | **Implemented enhancements:** 21 | 22 | - Add blob/attachment [\#2](https://github.com/triniwiz/nativescript-couchbase-plugin/issues/2) 23 | 24 | ## [v0.8.0](https://github.com/triniwiz/nativescript-couchbase-plugin/tree/v0.8.0) (2019-01-22) 25 | [Full Changelog](https://github.com/triniwiz/nativescript-couchbase-plugin/compare/v0.7.0...v0.8.0) 26 | 27 | **Merged pull requests:** 28 | 29 | - Fix logical type check [\#13](https://github.com/triniwiz/nativescript-couchbase-plugin/pull/13) ([jerbob92](https://github.com/jerbob92)) 30 | - Fix bug in operator support for iOS [\#12](https://github.com/triniwiz/nativescript-couchbase-plugin/pull/12) ([jerbob92](https://github.com/jerbob92)) 31 | - Add missing float in number support [\#11](https://github.com/triniwiz/nativescript-couchbase-plugin/pull/11) ([jerbob92](https://github.com/jerbob92)) 32 | 33 | ## [v0.7.0](https://github.com/triniwiz/nativescript-couchbase-plugin/tree/v0.7.0) (2019-01-22) 34 | [Full Changelog](https://github.com/triniwiz/nativescript-couchbase-plugin/compare/v0.6.0...v0.7.0) 35 | 36 | **Merged pull requests:** 37 | 38 | - Add support for long/float/double [\#10](https://github.com/triniwiz/nativescript-couchbase-plugin/pull/10) ([jerbob92](https://github.com/jerbob92)) 39 | 40 | ## [v0.6.0](https://github.com/triniwiz/nativescript-couchbase-plugin/tree/v0.6.0) (2019-01-10) 41 | [Full Changelog](https://github.com/triniwiz/nativescript-couchbase-plugin/compare/v0.5.0...v0.6.0) 42 | 43 | **Closed issues:** 44 | 45 | - Receiving this error when attempting to use this plugin? [\#8](https://github.com/triniwiz/nativescript-couchbase-plugin/issues/8) 46 | 47 | **Merged pull requests:** 48 | 49 | - Add support for inBatch [\#9](https://github.com/triniwiz/nativescript-couchbase-plugin/pull/9) ([jerbob92](https://github.com/jerbob92)) 50 | 51 | ## [v0.5.0](https://github.com/triniwiz/nativescript-couchbase-plugin/tree/v0.5.0) (2018-11-30) 52 | [Full Changelog](https://github.com/triniwiz/nativescript-couchbase-plugin/compare/v0.4.1...v0.5.0) 53 | 54 | **Merged pull requests:** 55 | 56 | - Feature/fix null values [\#7](https://github.com/triniwiz/nativescript-couchbase-plugin/pull/7) ([jerbob92](https://github.com/jerbob92)) 57 | - Fix limit/offset query [\#6](https://github.com/triniwiz/nativescript-couchbase-plugin/pull/6) ([jerbob92](https://github.com/jerbob92)) 58 | - fixed error with not implemented abstract methods [\#5](https://github.com/triniwiz/nativescript-couchbase-plugin/pull/5) ([elcreator](https://github.com/elcreator)) 59 | 60 | ## [v0.4.1](https://github.com/triniwiz/nativescript-couchbase-plugin/tree/v0.4.1) (2018-11-29) 61 | [Full Changelog](https://github.com/triniwiz/nativescript-couchbase-plugin/compare/v0.4.0...v0.4.1) 62 | 63 | **Implemented enhancements:** 64 | 65 | - Add Query method [\#1](https://github.com/triniwiz/nativescript-couchbase-plugin/issues/1) 66 | 67 | ## [v0.4.0](https://github.com/triniwiz/nativescript-couchbase-plugin/tree/v0.4.0) (2018-11-29) 68 | [Full Changelog](https://github.com/triniwiz/nativescript-couchbase-plugin/compare/v0.3.2...v0.4.0) 69 | 70 | **Fixed bugs:** 71 | 72 | - Need Basic Authentication [\#4](https://github.com/triniwiz/nativescript-couchbase-plugin/issues/4) 73 | - Typo in source code [\#3](https://github.com/triniwiz/nativescript-couchbase-plugin/issues/3) 74 | 75 | ## [v0.3.2](https://github.com/triniwiz/nativescript-couchbase-plugin/tree/v0.3.2) (2018-10-23) 76 | [Full Changelog](https://github.com/triniwiz/nativescript-couchbase-plugin/compare/v0.0.1...v0.3.2) 77 | 78 | ## [v0.0.1](https://github.com/triniwiz/nativescript-couchbase-plugin/tree/v0.0.1) (2018-10-17) 79 | 80 | 81 | \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright (c) 2015-2018 Telerik EAD 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![npm](https://img.shields.io/npm/v/nativescript-couchbase-plugin.svg)](https://www.npmjs.com/package/nativescript-couchbase-plugin) 2 | [![npm](https://img.shields.io/npm/dt/nativescript-couchbase-plugin.svg?label=npm%20downloads)](https://www.npmjs.com/package/nativescript-couchbase-plugin) 3 | [![Build Status](https://travis-ci.org/triniwiz/nativescript-couchbase-plugin.svg?branch=master)](https://travis-ci.org/triniwiz/nativescript-couchbase-plugin) 4 | 5 | # NativeScript-Couchbase 6 | 7 | **The source is now managed at** https://github.com/triniwiz/nativescript-plugins 8 | 9 | ## Installation 10 | 11 | `tns plugin add nativescript-couchbase-plugin` 12 | 13 | ## Usage 14 | **Note Android min-sdk is 19** 15 | 16 | 17 | ```ts 18 | import { Couchbase, ConcurrencyMode } from 'nativescript-couchbase-plugin'; 19 | const database = new Couchbase('my-database'); 20 | 21 | const documentId = database.createDocument({ 22 | "firstname": "O", 23 | "lastname": "Fortune", 24 | "address": { 25 | "country": "Trinidad and Tobago" 26 | }, 27 | "twitter": "https://www.twitter.com/triniwiz" 28 | }); 29 | 30 | const person = database.getDocument(documentId); 31 | 32 | 33 | database.updateDocument(documentId, { 34 | "firstname": "Osei", 35 | "lastname": "Fortune", 36 | "twitter": "https://www.twitter.com/triniwiz" 37 | }); 38 | 39 | // Default concurrency mode is FailOnConflict if you don't pass it 40 | const isDeleted = database.deleteDocument(documentId, ConcurrencyMode.FailOnConflict); 41 | ``` 42 | 43 | ### Synchronization with Couchbase Sync Gateway and Couchbase Server 44 | 45 | ```ts 46 | import { Couchbase } from 'nativescript-couchbase-plugin'; 47 | const database = new Couchbase('my-database'); 48 | 49 | const push = database.createPushReplication( 50 | 'ws://sync-gateway-host:4984/my-database' 51 | ); 52 | push.setUserNameAndPassword("user","password"); 53 | const pull = database.createPullReplication( 54 | 'ws://sync-gateway-host:4984/my-database' 55 | ); 56 | pull.setSessionId("SomeId"); 57 | pull.setSessionIdAndCookieName("SomeId","SomeCookieName"); 58 | 59 | push.setContinuous(true); 60 | pull.setContinuous(true); 61 | push.start(); 62 | pull.start(); 63 | ``` 64 | 65 | ### Listening for Changes 66 | 67 | ```ts 68 | database.addDatabaseChangeListener(function(changes) { 69 | for (var i = 0; i < changes.length; i++) { 70 | const documentId = changes[i]; 71 | console.log(documentId); 72 | } 73 | }); 74 | ``` 75 | 76 | ### Query 77 | 78 | ```ts 79 | const results = database.query({ 80 | select: [], // Leave empty to query for all 81 | from: 'otherDatabaseName', // Omit or set null to use current db 82 | where: [{ property: 'firstName', comparison: 'equalTo', value: 'Osei' }], 83 | order: [{ property: 'firstName', direction: 'desc' }], 84 | limit: 2 85 | }); 86 | ``` 87 | 88 | ### Transactions 89 | Using the method `inBatch` to run group of database operations in a batch/transaction. Use this when performing bulk write operations like multiple inserts/updates; it saves the overhead of multiple database commits, greatly improving performance. 90 | 91 | ```ts 92 | import { Couchbase } from 'nativescript-couchbase-plugin'; 93 | const database = new Couchbase('my-database'); 94 | 95 | database.inBatch(() => { 96 | const documentId = database.createDocument({ 97 | "firstname": "O", 98 | "lastname": "Fortune", 99 | "address": { 100 | "country": "Trinidad and Tobago" 101 | } 102 | "twitter": "https://www.twitter.com/triniwiz" 103 | }); 104 | 105 | const person = database.getDocument(documentId); 106 | 107 | 108 | database.updateDocument(documentId, { 109 | "firstname": "Osei", 110 | "lastname": "Fortune", 111 | "twitter": "https://www.twitter.com/triniwiz" 112 | }); 113 | 114 | const isDeleted = database.deleteDocument(documentId); 115 | }); 116 | ``` 117 | 118 | ## API 119 | 120 | ## License 121 | 122 | Apache License Version 2.0, January 2004 123 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/app.gradle: -------------------------------------------------------------------------------- 1 | // Add your native dependencies here: 2 | 3 | // Uncomment to add recyclerview-v7 dependency 4 | //dependencies { 5 | // compile 'com.android.support:recyclerview-v7:+' 6 | //} 7 | 8 | android { 9 | defaultConfig { 10 | generatedDensities = [] 11 | } 12 | aaptOptions { 13 | additionalParameters "--no-version-vectors" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 28 | 29 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/values-v21/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3d5afe 4 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | 14 | 15 | 16 | 19 | 20 | 23 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #F5F5F5 4 | #757575 5 | #33B5E5 6 | #272734 7 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 18 | 19 | 21 | 22 | 23 | 31 | 32 | 34 | 35 | 36 | 42 | 43 | 45 | 46 | -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "29x29", 5 | "idiom" : "iphone", 6 | "filename" : "icon-29.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "29x29", 11 | "idiom" : "iphone", 12 | "filename" : "icon-29@2x.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "icon-29@3x.png", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "size" : "40x40", 23 | "idiom" : "iphone", 24 | "filename" : "icon-40@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "icon-40@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "57x57", 35 | "idiom" : "iphone", 36 | "filename" : "icon-57.png", 37 | "scale" : "1x" 38 | }, 39 | { 40 | "size" : "57x57", 41 | "idiom" : "iphone", 42 | "filename" : "icon-57@2x.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "icon-60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "icon-60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "29x29", 59 | "idiom" : "ipad", 60 | "filename" : "icon-29.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "29x29", 65 | "idiom" : "ipad", 66 | "filename" : "icon-29@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "40x40", 71 | "idiom" : "ipad", 72 | "filename" : "icon-40.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "40x40", 77 | "idiom" : "ipad", 78 | "filename" : "icon-40@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "50x50", 83 | "idiom" : "ipad", 84 | "filename" : "icon-50.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "50x50", 89 | "idiom" : "ipad", 90 | "filename" : "icon-50@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "72x72", 95 | "idiom" : "ipad", 96 | "filename" : "icon-72.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "72x72", 101 | "idiom" : "ipad", 102 | "filename" : "icon-72@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "76x76", 107 | "idiom" : "ipad", 108 | "filename" : "icon-76.png", 109 | "scale" : "1x" 110 | }, 111 | { 112 | "size" : "76x76", 113 | "idiom" : "ipad", 114 | "filename" : "icon-76@2x.png", 115 | "scale" : "2x" 116 | }, 117 | { 118 | "size" : "83.5x83.5", 119 | "idiom" : "ipad", 120 | "filename" : "icon-83.5@2x.png", 121 | "scale" : "2x" 122 | } 123 | ], 124 | "info" : { 125 | "version" : 1, 126 | "author" : "xcode" 127 | } 128 | } -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "extent" : "full-screen", 5 | "idiom" : "iphone", 6 | "subtype" : "736h", 7 | "filename" : "Default-736h@3x.png", 8 | "minimum-system-version" : "8.0", 9 | "orientation" : "portrait", 10 | "scale" : "3x" 11 | }, 12 | { 13 | "extent" : "full-screen", 14 | "idiom" : "iphone", 15 | "subtype" : "736h", 16 | "filename" : "Default-Landscape@3x.png", 17 | "minimum-system-version" : "8.0", 18 | "orientation" : "landscape", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "extent" : "full-screen", 23 | "idiom" : "iphone", 24 | "subtype" : "667h", 25 | "filename" : "Default-667h@2x.png", 26 | "minimum-system-version" : "8.0", 27 | "orientation" : "portrait", 28 | "scale" : "2x" 29 | }, 30 | { 31 | "orientation" : "portrait", 32 | "idiom" : "iphone", 33 | "filename" : "Default@2x.png", 34 | "extent" : "full-screen", 35 | "minimum-system-version" : "7.0", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "extent" : "full-screen", 40 | "idiom" : "iphone", 41 | "subtype" : "retina4", 42 | "filename" : "Default-568h@2x.png", 43 | "minimum-system-version" : "7.0", 44 | "orientation" : "portrait", 45 | "scale" : "2x" 46 | }, 47 | { 48 | "orientation" : "portrait", 49 | "idiom" : "ipad", 50 | "filename" : "Default-Portrait.png", 51 | "extent" : "full-screen", 52 | "minimum-system-version" : "7.0", 53 | "scale" : "1x" 54 | }, 55 | { 56 | "orientation" : "landscape", 57 | "idiom" : "ipad", 58 | "filename" : "Default-Landscape.png", 59 | "extent" : "full-screen", 60 | "minimum-system-version" : "7.0", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "orientation" : "portrait", 65 | "idiom" : "ipad", 66 | "filename" : "Default-Portrait@2x.png", 67 | "extent" : "full-screen", 68 | "minimum-system-version" : "7.0", 69 | "scale" : "2x" 70 | }, 71 | { 72 | "orientation" : "landscape", 73 | "idiom" : "ipad", 74 | "filename" : "Default-Landscape@2x.png", 75 | "extent" : "full-screen", 76 | "minimum-system-version" : "7.0", 77 | "scale" : "2x" 78 | }, 79 | { 80 | "orientation" : "portrait", 81 | "idiom" : "iphone", 82 | "filename" : "Default.png", 83 | "extent" : "full-screen", 84 | "scale" : "1x" 85 | }, 86 | { 87 | "orientation" : "portrait", 88 | "idiom" : "iphone", 89 | "filename" : "Default@2x.png", 90 | "extent" : "full-screen", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "orientation" : "portrait", 95 | "idiom" : "iphone", 96 | "filename" : "Default-568h@2x.png", 97 | "extent" : "full-screen", 98 | "subtype" : "retina4", 99 | "scale" : "2x" 100 | }, 101 | { 102 | "orientation" : "portrait", 103 | "idiom" : "ipad", 104 | "extent" : "to-status-bar", 105 | "scale" : "1x" 106 | }, 107 | { 108 | "orientation" : "portrait", 109 | "idiom" : "ipad", 110 | "filename" : "Default-Portrait.png", 111 | "extent" : "full-screen", 112 | "scale" : "1x" 113 | }, 114 | { 115 | "orientation" : "landscape", 116 | "idiom" : "ipad", 117 | "extent" : "to-status-bar", 118 | "scale" : "1x" 119 | }, 120 | { 121 | "orientation" : "landscape", 122 | "idiom" : "ipad", 123 | "filename" : "Default-Landscape.png", 124 | "extent" : "full-screen", 125 | "scale" : "1x" 126 | }, 127 | { 128 | "orientation" : "portrait", 129 | "idiom" : "ipad", 130 | "extent" : "to-status-bar", 131 | "scale" : "2x" 132 | }, 133 | { 134 | "orientation" : "portrait", 135 | "idiom" : "ipad", 136 | "filename" : "Default-Portrait@2x.png", 137 | "extent" : "full-screen", 138 | "scale" : "2x" 139 | }, 140 | { 141 | "orientation" : "landscape", 142 | "idiom" : "ipad", 143 | "extent" : "to-status-bar", 144 | "scale" : "2x" 145 | }, 146 | { 147 | "orientation" : "landscape", 148 | "idiom" : "ipad", 149 | "filename" : "Default-Landscape@2x.png", 150 | "extent" : "full-screen", 151 | "scale" : "2x" 152 | } 153 | ], 154 | "info" : { 155 | "version" : 1, 156 | "author" : "xcode" 157 | } 158 | } -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-AspectFill.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-AspectFill@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-Center.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-Center@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-couchbase-plugin/7e12fe59e3fbe09436acef1ca5528bf3a7eba50c/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiresFullScreen 28 | 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | NSAppTransportSecurity 47 | 48 | 49 | NSAllowsArbitraryLoads 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/build.xcconfig: -------------------------------------------------------------------------------- 1 | // You can add custom settings here 2 | // for example you can uncomment the following line to force distribution code signing 3 | // CODE_SIGN_IDENTITY = iPhone Distribution 4 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 5 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 6 | -------------------------------------------------------------------------------- /demo/app/app.css: -------------------------------------------------------------------------------- 1 | @import '~nativescript-theme-core/css/core.light.css'; 2 | -------------------------------------------------------------------------------- /demo/app/app.ts: -------------------------------------------------------------------------------- 1 | import * as application from 'tns-core-modules/application'; 2 | application.run({ moduleName: 'root-page' }); 3 | -------------------------------------------------------------------------------- /demo/app/main-page.ts: -------------------------------------------------------------------------------- 1 | import * as observable from 'tns-core-modules/data/observable'; 2 | import * as pages from 'tns-core-modules/ui/page'; 3 | import { HelloWorldModel } from './main-view-model'; 4 | import { topmost } from 'tns-core-modules/ui/frame'; 5 | let vm; 6 | let page: pages.Page; 7 | // Event handler for Page 'loaded' event attached in main-page.xml 8 | export function pageLoaded(args: observable.EventData) { 9 | vm = new HelloWorldModel(); 10 | page = args.object as pages.Page; 11 | page.bindingContext = vm; 12 | page.getViewById('input').on('textChange', (args: any) => { 13 | vm.set('input', args.object.text); 14 | }); 15 | } 16 | 17 | export function addNew(args) { 18 | vm.addItem(); 19 | const input = page.getViewById('input') as any; 20 | if (input) { 21 | input.text = ''; 22 | } 23 | } 24 | 25 | export function goToSearch(args) { 26 | topmost().navigate('search/search-page'); 27 | } 28 | -------------------------------------------------------------------------------- /demo/app/main-page.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 |