├── .gitignore
├── .npmignore
├── README.md
├── couchbase.android.ts
├── couchbase.d.ts
├── couchbase.ios.ts
├── demo
├── app
│ ├── App_Resources
│ │ ├── Android
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── app.gradle
│ │ │ ├── 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
│ ├── README.md
│ ├── app.css
│ ├── app.ts
│ ├── bundle-config.ts
│ ├── package.json
│ ├── references.d.ts
│ ├── vendor-platform.android.ts
│ ├── vendor-platform.ios.ts
│ ├── vendor.ts
│ └── views
│ │ ├── create
│ │ ├── create-view-model.ts
│ │ ├── create.ts
│ │ └── create.xml
│ │ └── list
│ │ ├── list-view-model.ts
│ │ ├── list.ts
│ │ └── list.xml
├── package.json
├── references.d.ts
├── sync-gateway-config.json
└── tsconfig.json
├── ng-demo
├── app
│ ├── App_Resources
│ │ ├── Android
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── app.gradle
│ │ │ ├── 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.component.html
│ ├── app.component.ts
│ ├── app.css
│ ├── app.module.ts
│ ├── app.routing.ts
│ ├── components
│ │ ├── create
│ │ │ ├── create.component.html
│ │ │ └── create.component.ts
│ │ └── list
│ │ │ ├── list.component.html
│ │ │ └── list.component.ts
│ ├── couchbaseinstance.ts
│ ├── main.aot.ts
│ ├── main.ts
│ ├── package.json
│ ├── vendor-platform.android.ts
│ ├── vendor-platform.ios.ts
│ └── vendor.ts
├── package.json
├── references.d.ts
├── sync-gateway-config.json
├── tsconfig.aot.json
└── tsconfig.json
├── package.json
├── platforms
├── android
│ └── include.gradle
└── ios
│ ├── CouchbaseLite.framework
│ ├── CouchbaseLite
│ ├── Headers
│ │ ├── CBLAttachment.h
│ │ ├── CBLAuthenticator.h
│ │ ├── CBLDatabase.h
│ │ ├── CBLDatabaseChange.h
│ │ ├── CBLDocument.h
│ │ ├── CBLGeometry.h
│ │ ├── CBLJSON.h
│ │ ├── CBLManager.h
│ │ ├── CBLModel.h
│ │ ├── CBLModelFactory.h
│ │ ├── CBLQuery+FullTextSearch.h
│ │ ├── CBLQuery+Geo.h
│ │ ├── CBLQuery.h
│ │ ├── CBLQueryBuilder.h
│ │ ├── CBLReplication.h
│ │ ├── CBLRevision.h
│ │ ├── CBLUITableSource.h
│ │ ├── CBLView.h
│ │ ├── CouchbaseLite.h
│ │ └── MYDynamicObject.h
│ ├── Info.plist
│ └── Modules
│ │ └── module.modulemap
│ └── build.xcconfig
├── references.d.ts
└── tsconfig.json
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | hooks/
3 |
4 | demo/node_modules/
5 | demo/platforms/
6 | demo/lib
7 |
8 | ng-demo/platforms
9 | ng-demo/lib
10 |
11 | npm_debug.log
12 |
13 | .DS_Store*
14 | Thumbs.db*
15 | ~*
16 | *.js
17 | *.js.map
18 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | demo/
2 | ng-demo/
3 | dist/
4 | node_modules/
5 | *.ts
6 | !*.d.ts
7 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # This Project is No Longer Supported Or Maintained
2 |
3 | For an alternative, please visit https://github.com/triniwiz/nativescript-couchbase-plugin
4 |
5 |
6 | # Couchbase Lite Plugin for Telerik NativeScript
7 |
8 | Couchbase Lite is a NoSQL embedded database for mobile devices. It is a replacement for common database technologies like SQLite and Core Data.
9 |
10 | ## Configuration
11 |
12 | To add this plugin to your Angular or vanilla JavaScript NativeScript project, execute the following from the Terminal or Command Prompt:
13 |
14 | ```
15 | tns plugin add nativescript-couchbase
16 | ```
17 |
18 | If you wish to try either of the demo applications that are bundled with this project, execute the following after cloning the repository:
19 |
20 | ```
21 | npm install
22 | npm run deploy-android-angular
23 | ```
24 |
25 | For the third line, the list of options are:
26 |
27 | ```
28 | npm run deploy-android-angular
29 | npm run deploy-android-vanilla
30 | npm run deploy-ios-angular
31 | npm run deploy-ios-vanilla
32 | ```
33 |
34 | If you're using TypeScript and wish to make use of the type definitions for this plugin, add the following line to your project's **references.d.ts** file:
35 |
36 | ```
37 | ///
38 | ```
39 |
40 | Without the above line included, your TypeScript compiler may throw errors during the build.
41 |
42 | ## Usage
43 |
44 | ### Including the Plugin in Your Project
45 |
46 | ```javascript
47 | var couchbaseModule = require("nativescript-couchbase");
48 | ```
49 |
50 | ### Creating or Opening an Existing Database
51 |
52 | ```javascript
53 | var database = new couchbaseModule.Couchbase("test-database");
54 | ```
55 |
56 | ### Managing the Data with CRUD Operations
57 |
58 | #### Creating a New Document
59 |
60 | ```javascript
61 | var documentId = database.createDocument({
62 | "firstname": "Nic",
63 | "lastname": "Raboy",
64 | "address": {
65 | "city": "San Francisco",
66 | "state": "CA",
67 | "country": "USA"
68 | }
69 | "twitter": "https://www.twitter.com/nraboy"
70 | });
71 | ```
72 |
73 | #### Retrieving an Existing Document
74 |
75 | ```javascript
76 | var person = database.getDocument(documentId);
77 | ```
78 |
79 | #### Updating an Existing Document
80 |
81 | ```javascript
82 | database.updateDocument(documentId, {
83 | "firstname": "Nicolas",
84 | "lastname": "Raboy",
85 | "twitter": "https://www.twitter.com/nraboy"
86 | });
87 | ```
88 |
89 | #### Deleting a Document
90 |
91 | ```javascript
92 | var isDeleted = database.deleteDocument(documentId);
93 | ```
94 |
95 | ### Querying with MapReduce Views
96 |
97 | Knowing the document id isn't always an option. With this in mind, multiple documents can be queried using criteria defined in a view.
98 |
99 | #### Creating a MapReduce View
100 |
101 | A MapReduce View will emit a key-value pair. Logic can be placed around the **emitter** to make the views more specific.
102 |
103 | ```javascript
104 | database.createView("people", "1", function(document, emitter) {
105 | emitter.emit(document._id, document);
106 | });
107 | ```
108 |
109 | #### Querying a MapReduce View
110 |
111 | ```javascript
112 | var rows = database.executeQuery("people", {descending : false, limit : 20, skip : 1, startKey: "name to strat with", endKey:"name to end at"});
113 | for(var i = 0; i < rows.length; i++) {
114 | personList.push(rows[i]);
115 | }
116 | ```
117 | The available options when querying a MapReduce View are as follows:
118 |
119 | * **startKey**: the key to start at. The default value, null, means to start from the beginning.
120 |
121 | * **endKey**: the last key to return. The default value, null, means to continue to the end.
122 |
123 | * **descending**: If set to true, the keys will be returned in reverse order. (This also reverses the meanings of the startKey and endKey properties, since the query will now start at the highest keys and end at lower ones!)
124 |
125 | * **limit**: If nonzero, this is the maximum number of rows that will be returned.
126 |
127 | * **skip**: If nonzero, this many rows will be skipped (starting from the startKey if any.)
128 |
129 | ## Synchronization with Couchbase Sync Gateway and Couchbase Server
130 |
131 | Couchbase Lite can work in combination with Couchbase Sync Gateway to offer synchronization support between devices and platforms. Couchbase Sync Gateway **is not** a requirement to use Couchbase Lite if the goal is to only use it for offline purposes.
132 |
133 | Couchbase Sync Gateway can be downloaded via the [Couchbase Downloads Portal](http://www.couchbase.com/downloads) in the mobile section.
134 |
135 | A demo configuration file for Sync Gateway is included in the **demo** directory. It can be started by executing the following from a Command Prompt or Terminal:
136 |
137 | ```
138 | /path/to/sync/gateway/bin/sync_gateway /path/to/demo/sync-gateway-config.json
139 | ```
140 |
141 | In the demo configuration file, Couchbase Server is not used, but instead an in-memory database good for prototyping. It can be accessed via **http://localhost:4985/_admin/** in your web browser.
142 |
143 | To replicate between the local device and server, the following must be added to your project:
144 |
145 | ```javascript
146 | var couchbaseModule = require("nativescript-couchbase");
147 | database = new couchbaseModule.Couchbase("test-database");
148 |
149 | var push = database.createPushReplication("http://sync-gateway-host:4984/test-database");
150 | var pull = database.createPullReplication("http://sync-gateway-host:4984/test-database");
151 | push.setContinuous(true);
152 | pull.setContinuous(true);
153 | push.start();
154 | pull.start();
155 | ```
156 |
157 | Data will now continuously be replicated between the local device and Sync Gateway.
158 |
159 | ### Listening for Changes
160 |
161 | ```javascript
162 | database.addDatabaseChangeListener(function(changes) {
163 | for(var i = 0; i < changes.length; i++) {
164 | console.log(changes[i].getDocumentId());
165 | }
166 | });
167 | ```
168 |
169 | ## Plugin Development
170 |
171 | The Couchbase NativeScript plugin is under active development. Changes to the API are infrequent in the underlying Couchbase Android and Couchbase iOS SDKs so as a result changes are infrequent in the JavaScript wrapper for NativeScript.
172 |
173 | If you feel something is missing or you've found a bug, open a ticket so it can be corrected or submit a pull request and be recognized for your contributions.
174 |
--------------------------------------------------------------------------------
/couchbase.d.ts:
--------------------------------------------------------------------------------
1 | declare module "nativescript-couchbase" {
2 |
3 | export class Couchbase {
4 | constructor(databaseName: string);
5 | createDocument(data: Object, documentId?: string);
6 | getDocument(documentId: string);
7 | updateDocument(documentId: string, data: any);
8 | deleteDocument(documentId: string);
9 | destroyDatabase();
10 | createView(viewName: string, viewRevision: string, callback: any);
11 | executeQuery(viewName: string, options?: any);
12 | createPullReplication(remoteUrl: string);
13 | createPushReplication(remoteUrl: string);
14 | addDatabaseChangeListener(callback: any);
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/couchbase.ios.ts:
--------------------------------------------------------------------------------
1 | declare var CBLManager: any;
2 | declare var interop: any;
3 | declare var NSURL: any;
4 | declare var NSNotificationCenter: any;
5 | declare var NSOperationQueue: any;
6 | declare var NSJSONSerialization: any;
7 | declare var NSString: any;
8 | declare var NSJSONWritingPrettyPrinted: any;
9 | declare var NSUTF8StringEncoding: any;
10 |
11 | export class Couchbase {
12 |
13 | private manager: any;
14 | private database: any;
15 |
16 | constructor(databaseName: String){
17 | this.manager = CBLManager.sharedInstance();
18 | if (!this.manager){
19 | console.log("MANAGER ERROR:Can not create share instance of CBLManager");
20 | throw new Error("MANAGER ERROR:Can not create share instance of CBLManager");
21 | }
22 | var errorRef = new interop.Reference();
23 |
24 | this.database = this.manager.databaseNamedError(databaseName, errorRef);
25 |
26 | if (!this.database){
27 | console.log(errorRef.value);
28 | throw new Error(errorRef.value);
29 | }
30 | }
31 | createDocument(data: Object, documentId?: string){
32 | var doc = documentId == null ? this.database.createDocument() : this.database.documentWithID(documentId);
33 |
34 | var documentId: string = doc.documentID;
35 |
36 | var errorRef = new interop.Reference();
37 | var revision = doc.putPropertiesError(data, errorRef);
38 |
39 | if (!errorRef){
40 | console.log("DOCUMENT ERROR:" + errorRef.value);
41 | throw new Error("DOCUMENT ERROR:" + errorRef.value);
42 | }
43 |
44 | return documentId;
45 | }
46 |
47 | getDocument(documentId: string){
48 | var document = this.database.documentWithID(documentId);
49 | if (document && document.properties){
50 | return JSON.parse(this.mapToJson(document.properties));
51 | }
52 | return null;
53 | }
54 |
55 | updateDocument(documentId: string, data: any){
56 | var document = this.database.documentWithID(documentId);
57 | let temp: any = this.getDocument(documentId);
58 | data._id = temp._id;
59 | data._rev = temp._rev;
60 | var errorRef = new interop.Reference();
61 | var revision = document.putPropertiesError(data, errorRef);
62 |
63 | if (!errorRef){
64 | console.error("DOCUMENT ERROR", errorRef.value);
65 | throw new Error("DOCUMENT ERROR " + errorRef.value);
66 | }
67 | }
68 |
69 | deleteDocument(documentId: string){
70 | var document = this.database.documentWithID(documentId);
71 | var errorRef = new interop.Reference();
72 |
73 | document.deleteDocument(errorRef);
74 |
75 | if (!errorRef){
76 | return false;
77 | }
78 | return true;
79 | }
80 |
81 | createView(viewName: string, viewRevision: string, callback: any) {
82 | var self = this;
83 | var view = this.database.viewNamed(viewName)
84 | view.setMapBlockVersion(function(document, emit){
85 | callback(JSON.parse(self.mapToJson(document)), {
86 | emit: emit
87 | });
88 | }, viewRevision);
89 | }
90 |
91 | executeQuery(viewName: string, options?: any): Array {
92 | var view = this.database.viewNamed(viewName);
93 | var query = view.createQuery();
94 | if(options != null) {
95 | if(options.descending) {
96 | query.descending = options.descending;
97 | }
98 | if(options.limit) {
99 | query.limit = options.limit;
100 | }
101 | if(options.skip) {
102 | query.skip = options.skip;
103 | }
104 | if(options.startKey) {
105 | query.startKey = options.startKey;
106 | }
107 | if(options.endKey) {
108 | query.endKey = options.endKey;
109 | }
110 | }
111 | var errorRef = new interop.Reference();
112 | var resultSet = query.run(errorRef);
113 |
114 | var row = resultSet.nextRow();
115 |
116 | var results: Array = [];
117 |
118 | while(row){
119 | if(row.value !== null) {
120 | if(typeof row.value === "object") {
121 | results.push(JSON.parse(this.mapToJson(row.value)));
122 | } else {
123 | results.push(row.value);
124 | }
125 | }
126 | row = resultSet.nextRow();
127 | }
128 |
129 | if (!errorRef){
130 | console.log(errorRef.value);
131 | }
132 |
133 | return results;
134 | }
135 |
136 | createPullReplication(remoteUrl: string) {
137 | var url = NSURL.URLWithString(remoteUrl);
138 |
139 | var replication = this.database.createPullReplication(url);
140 |
141 | if (!replication){
142 | console.error("PULL ERROR");
143 | throw new Error("PULL ERROR");
144 | }
145 |
146 | return new Replicator(replication);
147 | }
148 |
149 | createPushReplication(remoteUrl: string) {
150 | var url = NSURL.URLWithString(remoteUrl);
151 |
152 | var replication = this.database.createPushReplication(url);
153 |
154 | if (!replication){
155 | console.error("PUSH ERROR");
156 | throw new Error("PUSH ERROR");
157 | }
158 |
159 | return new Replicator(replication);;
160 | }
161 |
162 | addDatabaseChangeListener(callback: any) {
163 | var self = this;
164 | function getter(_this: any, property: T | {(): T}): T {
165 | if (typeof property === "function") {
166 | return (<{(): T}>property).call(_this);
167 | } else {
168 | return property;
169 | }
170 | }
171 |
172 | let defaultCenter = getter(NSNotificationCenter, NSNotificationCenter.defaultCenter)
173 | let mainQueue = getter(NSOperationQueue, NSOperationQueue.mainQueue)
174 | defaultCenter.addObserverForNameObjectQueueUsingBlock(`CBLDatabaseChange`, this.database, mainQueue, function(notification){
175 | var changesList = [];
176 | if (notification.userInfo){
177 | var changes = notification.userInfo.objectForKey("changes");
178 |
179 | if (changes != null){
180 | for (var i = 0; i < changes.count; i++) {
181 | changesList.push(new DatabaseChange(changes[i]));
182 | }
183 | callback(changesList);
184 | }
185 | }
186 | });
187 | }
188 |
189 | destroyDatabase() {
190 | var errorRef = new interop.Reference();
191 |
192 | this.database.deleteDatabase(errorRef);
193 |
194 | if (!errorRef){
195 | console.error("DESTROY", errorRef.value);
196 | }
197 | }
198 |
199 | private mapToJson(properties: Object){
200 | var errorRef = new interop.Reference();
201 | var result = "";
202 | if(NSJSONSerialization.isValidJSONObject(properties)) {
203 | var data = NSJSONSerialization.dataWithJSONObjectOptionsError(properties, NSJSONWritingPrettyPrinted, errorRef);
204 | result = NSString.alloc().initWithDataEncoding(data, NSUTF8StringEncoding);
205 | } else {
206 | result = JSON.stringify(properties);
207 | }
208 | return result;
209 | }
210 |
211 | }
212 |
213 | export class Replicator {
214 |
215 | replicator: any;
216 |
217 | constructor(replicator: any) {
218 | this.replicator = replicator;
219 | }
220 |
221 | start() {
222 | this.replicator.start();
223 | }
224 |
225 | stop() {
226 | this.replicator.stop();
227 | }
228 |
229 | isRunning() {
230 | this.replicator.isRunning;
231 | }
232 |
233 | setContinuous(isContinuous: boolean) {
234 | this.replicator.continuous = isContinuous;
235 | }
236 |
237 | setCookie(name: String, value: String, path: String, expirationDate: Date, secure: boolean) {
238 | this.replicator.setCookieNamedWithValuePathExpirationDateSecure(name, value, path, expirationDate, secure);
239 | };
240 |
241 | deleteCookie(name: String) {
242 | this.replicator.deleteCookieNamed(name);
243 | }
244 | }
245 |
246 | export class DatabaseChange {
247 |
248 | change: any;
249 |
250 | constructor(change: any) {
251 | this.change = change;
252 | }
253 |
254 | getDocumentId() {
255 | return this.change.documentID;
256 | }
257 |
258 | getRevisionId() {
259 | return this.change.revisionID;
260 | }
261 |
262 | }
263 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
27 |
28 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/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 | applicationId = "org.nativescript.demo"
12 | }
13 | aaptOptions {
14 | additionalParameters "--no-version-vectors"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-hdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/demo/app/App_Resources/Android/drawable-hdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/demo/app/App_Resources/Android/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-hdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/demo/app/App_Resources/Android/drawable-hdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-ldpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/demo/app/App_Resources/Android/drawable-ldpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/demo/app/App_Resources/Android/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-ldpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/demo/app/App_Resources/Android/drawable-ldpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-mdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/demo/app/App_Resources/Android/drawable-mdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/demo/app/App_Resources/Android/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-mdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/demo/app/App_Resources/Android/drawable-mdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-nodpi/splash_screen.xml:
--------------------------------------------------------------------------------
1 |
2 | -
3 |
4 |
5 | -
6 |
7 |
8 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/demo/app/App_Resources/Android/drawable-xhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/demo/app/App_Resources/Android/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/demo/app/App_Resources/Android/drawable-xhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/demo/app/App_Resources/Android/drawable-xxhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/demo/app/App_Resources/Android/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/demo/app/App_Resources/Android/drawable-xxhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/demo/app/App_Resources/Android/drawable-xxxhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/demo/app/App_Resources/Android/drawable-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/demo/app/App_Resources/Android/drawable-xxxhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/values-v21/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3d5afe
4 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
11 |
14 |
15 |
16 |
19 |
20 |
23 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #F5F5F5
4 | #757575
5 | #33B5E5
6 | #272734
7 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/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 |
47 |
48 |
--------------------------------------------------------------------------------
/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 | // To build for device with XCode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html
5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID;
6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
7 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
8 |
--------------------------------------------------------------------------------
/demo/app/README.md:
--------------------------------------------------------------------------------
1 | # NativeScript TypeScript Template
2 |
3 | This template creates a NativeScript app with the NativeScript hello world example,
4 | however, in this template the example is built with TypeScript.
5 |
6 | You can create a new app that uses this template with either the `--template` option.
7 |
8 | ```
9 | tns create my-app-name --template tns-template-hello-world-ts
10 | ```
11 |
12 | Or the `--tsc` shorthand.
13 |
14 | ```
15 | tns create my-app-name --tsc
16 | ```
17 |
18 | > Note: Both commands will create a new NativeScript app that uses the latest version of this template published to [npm] (https://www.npmjs.com/package/tns-template-hello-world-ts).
19 |
20 | If you want to create a new app that uses the source of the template from the `master` branch, you can execute the following:
21 |
22 | ```
23 | tns create my-app-name --template https://github.com/NativeScript/template-hello-world-ts.git#master
24 | ```
25 |
--------------------------------------------------------------------------------
/demo/app/app.css:
--------------------------------------------------------------------------------
1 | /*
2 | In NativeScript, the app.css file is where you place CSS rules that
3 | you would like to apply to your entire application. Check out
4 | http://docs.nativescript.org/ui/styling for a full list of the CSS
5 | selectors and properties you can use to style UI components.
6 |
7 | /*
8 | For example, the following CSS rule changes the font size of all UI
9 | components that have the btn class name.
10 | */
11 | .btn {
12 | font-size: 18;
13 | }
14 |
15 | /*
16 | In many cases you may want to use the NativeScript core theme instead
17 | of writing your own CSS rules. For a full list of class names in the theme
18 | refer to http://docs.nativescript.org/ui/theme.
19 | */
20 | @import 'nativescript-theme-core/css/core.light.css';
21 |
--------------------------------------------------------------------------------
/demo/app/app.ts:
--------------------------------------------------------------------------------
1 | /*
2 | In NativeScript, the app.ts file is the entry point to your application.
3 | You can use this file to perform app-level initialization, but the primary
4 | purpose of the file is to pass control to the app’s first module.
5 | */
6 |
7 | import "./bundle-config";
8 | import * as app from 'application';
9 |
10 | app.start({ moduleName: 'views/list/list' });
11 |
12 | /*
13 | Do not place any code after the application has been started as it will not
14 | be executed on iOS.
15 | */
16 |
--------------------------------------------------------------------------------
/demo/app/bundle-config.ts:
--------------------------------------------------------------------------------
1 | if ((global).TNS_WEBPACK) {
2 | //registers tns-core-modules UI framework modules
3 | require("bundle-entry-points");
4 |
5 | //register application modules
6 | global.registerModule("list-page", () => require("./views/list/list"));
7 | global.registerModule("create-page", () => require("./views/create/create"));
8 | }
9 |
--------------------------------------------------------------------------------
/demo/app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "android": {
3 | "v8Flags": "--expose_gc"
4 | },
5 | "main": "app.js",
6 | "name": "tns-template-hello-world-ts",
7 | "version": "2.5.0"
8 | }
--------------------------------------------------------------------------------
/demo/app/references.d.ts:
--------------------------------------------------------------------------------
1 | /// Enable smart suggestions and completions in Visual Studio Code JavaScript projects.
--------------------------------------------------------------------------------
/demo/app/vendor-platform.android.ts:
--------------------------------------------------------------------------------
1 | //Resolve JavaScript classes that extend a Java class, and need to resolve
2 | //their JavaScript module from a bundled script. For example:
3 | //NativeScriptApplication, NativeScriptActivity, etc.
4 | //
5 | //This module gets bundled together with the rest of the app code and the
6 | //`require` calls get resolved to the correct bundling import call.
7 | //
8 | //At runtime the module gets loaded *before* the rest of the app code, so code
9 | //placed here needs to be careful about its dependencies.
10 |
11 | require("application");
12 | require("ui/frame");
13 | require("ui/frame/activity");
14 |
15 | if (global.TNS_WEBPACK) {
16 | global.__requireOverride = function (name, dir) {
17 | if (name === "./tns_modules/application/application.js") {
18 | return require("application");
19 | } else if (name === "./tns_modules/ui/frame/frame.js") {
20 | return require("ui/frame");
21 | } else if (name === "./tns_modules/ui/frame/activity.js") {
22 | return require("ui/frame/activity");
23 | }
24 | };
25 | }
26 |
--------------------------------------------------------------------------------
/demo/app/vendor-platform.ios.ts:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/demo/app/vendor-platform.ios.ts
--------------------------------------------------------------------------------
/demo/app/vendor.ts:
--------------------------------------------------------------------------------
1 | require("./vendor-platform");
2 |
3 | require("bundle-entry-points");
4 |
--------------------------------------------------------------------------------
/demo/app/views/create/create-view-model.ts:
--------------------------------------------------------------------------------
1 | import {Couchbase} from 'nativescript-couchbase';
2 | import {Observable} from 'data/observable';
3 | import {ObservableArray} from 'data/observable-array';
4 | import {topmost, goBack} from 'ui/frame';
5 |
6 | export class CreateDemo extends Observable {
7 | private database: any;
8 | private tfFirstName: any;
9 | private tfLastName: any;
10 |
11 | constructor(page: any) {
12 | super();
13 | this.database = new Couchbase("test-database");
14 |
15 | this.tfFirstName = page.getViewById("firstname");
16 | this.tfLastName = page.getViewById("lastname");
17 | }
18 |
19 | public save() {
20 | this.database.createDocument({
21 | "firstname": this.tfFirstName.text,
22 | "lastname": this.tfLastName.text
23 | });
24 | goBack();
25 | }
26 | }
--------------------------------------------------------------------------------
/demo/app/views/create/create.ts:
--------------------------------------------------------------------------------
1 | import {CreateDemo} from "./create-view-model";
2 |
3 | function pageLoaded(args) {
4 | var page = args.object;
5 | page.bindingContext = new CreateDemo(page);
6 | }
7 | exports.pageLoaded = pageLoaded;
--------------------------------------------------------------------------------
/demo/app/views/create/create.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/demo/app/views/list/list-view-model.ts:
--------------------------------------------------------------------------------
1 | import {Couchbase} from 'nativescript-couchbase';
2 | import {Observable} from 'data/observable';
3 | import {ObservableArray} from 'data/observable-array';
4 | import {topmost} from 'ui/frame';
5 |
6 | export class ListDemo extends Observable {
7 | public personList: ObservableArray;
8 | private database: any;
9 |
10 | constructor() {
11 | super();
12 | this.personList = new ObservableArray([]);
13 | this.database = new Couchbase("test-database");
14 |
15 | this.database.createView("people", "1", (document, emitter) => {
16 | emitter.emit(document._id, document);
17 | });
18 |
19 | var push = this.database.createPushReplication("http://192.168.57.1:4984/test-database");
20 | var pull = this.database.createPullReplication("http://192.168.57.1:4984/test-database");
21 |
22 | push.setContinuous(true);
23 | pull.setContinuous(true);
24 |
25 | push.start();
26 | pull.start();
27 |
28 | this.database.addDatabaseChangeListener((changes) => {
29 | var changeIndex;
30 | for (var i = 0; i < changes.length; i++) {
31 | var documentId;
32 |
33 | documentId = changes[i].getDocumentId();
34 | changeIndex = this.indexOfObjectId(documentId, this.personList);
35 | var document = this.database.getDocument(documentId);
36 |
37 | if (changeIndex == -1) {
38 | this.personList.push(document);
39 | } else {
40 | this.personList.setItem(changeIndex, document);
41 | }
42 | }
43 | });
44 |
45 | this.refresh();
46 | }
47 |
48 | public create() {
49 | topmost().navigate({ moduleName: "views/create/create" });
50 | }
51 |
52 | private refresh() {
53 | var rows = this.database.executeQuery("people");
54 | for(var i = 0; i < rows.length; i++) {
55 | this.personList.push(rows[i]);
56 | }
57 | }
58 |
59 | private indexOfObjectId(needle, haystack) {
60 | for (var i = 0; i < haystack.length; i++) {
61 | if (haystack.getItem(i) != undefined && haystack.getItem(i).hasOwnProperty("_id")) {
62 | if (haystack.getItem(i)._id == needle) {
63 | return i;
64 | }
65 | }
66 | }
67 | return -1;
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/demo/app/views/list/list.ts:
--------------------------------------------------------------------------------
1 | import {ListDemo} from "./list-view-model";
2 |
3 | function pageLoaded(args) {
4 | var page = args.object;
5 | page.bindingContext = new ListDemo();
6 | }
7 | exports.pageLoaded = pageLoaded;
--------------------------------------------------------------------------------
/demo/app/views/list/list.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/demo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": "NativeScript Application",
3 | "license": "SEE LICENSE IN ",
4 | "readme": "NativeScript Application",
5 | "repository": "",
6 | "nativescript": {
7 | "id": "org.nativescript.demo",
8 | "tns-ios": {
9 | "version": "2.5.0"
10 | },
11 | "tns-android": {
12 | "version": "2.5.0"
13 | }
14 | },
15 | "dependencies": {
16 | "nativescript-couchbase": "file:///Users/nraboy/Desktop/nativescript-couchbase",
17 | "nativescript-theme-core": "~1.0.2",
18 | "tns-core-modules": "2.5.0"
19 | },
20 | "devDependencies": {
21 | "awesome-typescript-loader": "~3.0.0-beta.9",
22 | "babel-traverse": "6.22.1",
23 | "babel-types": "6.22.0",
24 | "babylon": "6.15.0",
25 | "copy-webpack-plugin": "~3.0.1",
26 | "extract-text-webpack-plugin": "~2.0.0-beta.4",
27 | "lazy": "1.0.11",
28 | "nativescript-css-loader": "~0.26.0",
29 | "nativescript-dev-android-snapshot": "^0.*.*",
30 | "nativescript-dev-typescript": "~0.3.5",
31 | "nativescript-dev-webpack": "^0.3.2",
32 | "raw-loader": "~0.5.1",
33 | "resolve-url-loader": "~1.6.0",
34 | "typescript": "~2.1.0",
35 | "webpack": "~2.1.0-beta.27",
36 | "webpack-sources": "~0.1.3"
37 | },
38 | "scripts": {
39 | "clean-android": "tns clean-app android",
40 | "clean-ios": "tns clean-app ios",
41 | "prewebpack-android": "npm run clean-android",
42 | "prewebpack-ios": "npm run clean-ios",
43 | "webpack-android": "webpack --config=webpack.android.js --progress",
44 | "webpack-ios": "webpack --config=webpack.ios.js --progress",
45 | "prestart-android-bundle": "npm run webpack-android",
46 | "prestart-ios-bundle": "npm run webpack-ios",
47 | "start-android-bundle": "tns run android --bundle --disable-npm-install",
48 | "start-ios-bundle": "tns run ios --bundle --disable-npm-install",
49 | "prebuild-android-bundle": "npm run webpack-android",
50 | "prebuild-ios-bundle": "npm run webpack-ios",
51 | "build-android-bundle": "tns build android --bundle --disable-npm-install",
52 | "build-ios-bundle": "tns build ios --bundle --disable-npm-install"
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/demo/references.d.ts:
--------------------------------------------------------------------------------
1 | /// Needed for autocompletion and compilation.
2 | ///
--------------------------------------------------------------------------------
/demo/sync-gateway-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "log":["CRUD+", "REST+", "Changes+", "Attach+"],
3 | "databases": {
4 | "test-database": {
5 | "server":"walrus:data",
6 | "sync":`
7 | function (doc) {
8 | channel (doc.channels);
9 | }
10 | `,
11 | "users": {
12 | "GUEST": {
13 | "disabled": false,
14 | "admin_channels": ["*"]
15 | }
16 | }
17 | }
18 | },
19 | "CORS": {
20 | "Origin": ["http://localhost:8100"],
21 | "LoginOrigin": ["http://localhost:8100"],
22 | "Headers": ["Content-Type"],
23 | "MaxAge": 17280000
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/demo/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "commonjs",
4 | "target": "es5",
5 | "experimentalDecorators": true,
6 | "emitDecoratorMetadata": true,
7 | "noEmitHelpers": true,
8 | "noEmitOnError": true
9 | },
10 | "exclude": [
11 | "node_modules",
12 | "platforms",
13 | "**/*.aot.ts"
14 | ]
15 | }
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/Android/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
27 |
28 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/ng-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 | applicationId = "org.nativescript.ngdemo"
12 | }
13 | aaptOptions {
14 | additionalParameters "--no-version-vectors"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/Android/drawable-hdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/Android/drawable-hdpi/background.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/Android/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/Android/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/Android/drawable-hdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/Android/drawable-hdpi/logo.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/Android/drawable-ldpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/Android/drawable-ldpi/background.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/Android/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/Android/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/Android/drawable-ldpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/Android/drawable-ldpi/logo.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/Android/drawable-mdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/Android/drawable-mdpi/background.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/Android/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/Android/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/Android/drawable-mdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/Android/drawable-mdpi/logo.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/Android/drawable-nodpi/splash_screen.xml:
--------------------------------------------------------------------------------
1 |
2 | -
3 |
4 |
5 | -
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/Android/drawable-xhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/Android/drawable-xhdpi/background.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/Android/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/Android/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/Android/drawable-xhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/Android/drawable-xhdpi/logo.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/Android/drawable-xxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/Android/drawable-xxhdpi/background.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/Android/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/Android/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/Android/drawable-xxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/Android/drawable-xxhdpi/logo.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/Android/drawable-xxxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/Android/drawable-xxxhdpi/background.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/Android/drawable-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/Android/drawable-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/Android/drawable-xxxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/Android/drawable-xxxhdpi/logo.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/Android/values-v21/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3d5afe
4 |
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/Android/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
11 |
14 |
15 |
16 |
19 |
20 |
23 |
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/Android/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #F5F5F5
4 | #757575
5 | #33B5E5
6 | #272734
7 |
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/Android/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
18 |
19 |
21 |
22 |
23 |
31 |
32 |
34 |
35 |
36 |
42 |
43 |
45 |
46 |
--------------------------------------------------------------------------------
/ng-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 | }
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/ng-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 | }
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png
--------------------------------------------------------------------------------
/ng-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 | }
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png
--------------------------------------------------------------------------------
/ng-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 | }
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png
--------------------------------------------------------------------------------
/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/couchbaselabs/nativescript-couchbase/6515525e45dbf4df18ba0d961f540b83f3c92af2/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png
--------------------------------------------------------------------------------
/ng-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 |
47 |
48 |
--------------------------------------------------------------------------------
/ng-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 |
--------------------------------------------------------------------------------
/ng-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 | // To build for device with XCode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html
5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID;
6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
7 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
8 |
--------------------------------------------------------------------------------
/ng-demo/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/ng-demo/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from "@angular/core";
2 |
3 | @Component({
4 | selector: "ns-app",
5 | templateUrl: "app.component.html",
6 | })
7 | export class AppComponent { }
8 |
--------------------------------------------------------------------------------
/ng-demo/app/app.css:
--------------------------------------------------------------------------------
1 | /*
2 | In NativeScript, the app.css file is where you place CSS rules that
3 | you would like to apply to your entire application. Check out
4 | http://docs.nativescript.org/ui/styling for a full list of the CSS
5 | selectors and properties you can use to style UI components.
6 |
7 | /*
8 | In many cases you may want to use the NativeScript core theme instead
9 | of writing your own CSS rules. For a full list of class names in the theme
10 | refer to http://docs.nativescript.org/ui/theme.
11 | */
12 | @import 'nativescript-theme-core/css/core.light.css';
13 |
--------------------------------------------------------------------------------
/ng-demo/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
2 | import { NativeScriptModule } from "nativescript-angular/nativescript.module";
3 | import { NativeScriptFormsModule } from "nativescript-angular/forms";
4 | import { AppRoutingModule } from "./app.routing";
5 | import { AppComponent } from "./app.component";
6 |
7 | import { CouchbaseInstance } from "./couchbaseinstance";
8 | import { ListComponent } from "./components/list/list.component";
9 | import { CreateComponent } from "./components/create/create.component";
10 |
11 | @NgModule({
12 | bootstrap: [
13 | AppComponent
14 | ],
15 | imports: [
16 | NativeScriptModule,
17 | NativeScriptFormsModule,
18 | AppRoutingModule
19 | ],
20 | declarations: [
21 | AppComponent,
22 | ListComponent,
23 | CreateComponent
24 | ],
25 | providers: [
26 | CouchbaseInstance
27 | ],
28 | schemas: [
29 | NO_ERRORS_SCHEMA
30 | ]
31 | })
32 | export class AppModule { }
33 |
--------------------------------------------------------------------------------
/ng-demo/app/app.routing.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from "@angular/core";
2 | import { NativeScriptRouterModule } from "nativescript-angular/router";
3 | import { Routes } from "@angular/router";
4 |
5 | import { ListComponent } from "./components/list/list.component";
6 | import { CreateComponent } from "./components/create/create.component";
7 |
8 | export const routes: Routes = [
9 | { path: '', component: ListComponent },
10 | { path: "create", component: CreateComponent }
11 | ];
12 |
13 | @NgModule({
14 | imports: [NativeScriptRouterModule.forRoot(routes)],
15 | exports: [NativeScriptRouterModule]
16 | })
17 | export class AppRoutingModule { }
--------------------------------------------------------------------------------
/ng-demo/app/components/create/create.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/ng-demo/app/components/create/create.component.ts:
--------------------------------------------------------------------------------
1 | import {Component} from "@angular/core";
2 | import {Location} from "@angular/common";
3 | import {CouchbaseInstance} from "../../couchbaseinstance";
4 |
5 | @Component({
6 | selector: "create",
7 | templateUrl: "./components/create/create.component.html"
8 | })
9 | export class CreateComponent {
10 |
11 | private couchbaseInstance: CouchbaseInstance;
12 | private database: any;
13 | private location: Location;
14 | public firstname: string;
15 | public lastname: string;
16 |
17 | constructor(location: Location, couchbaseInstance: CouchbaseInstance) {
18 | this.database = couchbaseInstance.getDatabase();
19 | this.location = location;
20 | this.firstname = "";
21 | this.lastname = "";
22 | }
23 |
24 | save() {
25 | if(this.firstname != "" && this.lastname != "") {
26 | this.database.createDocument({
27 | "firstname": this.firstname,
28 | "lastname": this.lastname
29 | });
30 | this.location.back();
31 | }
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/ng-demo/app/components/list/list.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/ng-demo/app/components/list/list.component.ts:
--------------------------------------------------------------------------------
1 | import {Component, NgZone} from "@angular/core";
2 | import {Router} from "@angular/router";
3 | import {Location} from "@angular/common";
4 | import {CouchbaseInstance} from "../../couchbaseinstance";
5 |
6 | @Component({
7 | selector: "my-app",
8 | templateUrl: "./components/list/list.component.html",
9 | })
10 | export class ListComponent {
11 |
12 | private database: any;
13 | private router: Router;
14 | private ngZone: NgZone;
15 | public personList: Array