├── .czrc ├── .eslintignore ├── .eslintrc.json ├── .github └── workflows │ └── npm-publish.yml ├── .gitignore ├── .vscode └── settings.json ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── demo-ts ├── .editorconfig ├── .gitignore ├── App_Resources │ ├── Android │ │ ├── app.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ ├── drawable-hdpi │ │ │ ├── background.png │ │ │ └── logo.png │ │ │ ├── drawable-ldpi │ │ │ ├── background.png │ │ │ └── logo.png │ │ │ ├── drawable-mdpi │ │ │ ├── background.png │ │ │ └── logo.png │ │ │ ├── drawable-nodpi │ │ │ └── splash_screen.xml │ │ │ ├── drawable-xhdpi │ │ │ ├── background.png │ │ │ └── logo.png │ │ │ ├── drawable-xxhdpi │ │ │ ├── background.png │ │ │ └── logo.png │ │ │ ├── drawable-xxxhdpi │ │ │ ├── background.png │ │ │ └── logo.png │ │ │ ├── drawable │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ └── ic_launcher.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── values-v21 │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ │ ├── values-v29 │ │ │ └── styles.xml │ │ │ └── values │ │ │ ├── colors.xml │ │ │ ├── ic_launcher_background.xml │ │ │ └── styles.xml │ └── iOS │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── icon-1024.png │ │ │ ├── icon-20.png │ │ │ ├── icon-20@2x.png │ │ │ ├── icon-20@3x.png │ │ │ ├── icon-29.png │ │ │ ├── icon-29@2x.png │ │ │ ├── icon-29@3x.png │ │ │ ├── icon-40.png │ │ │ ├── icon-40@2x.png │ │ │ ├── icon-40@3x.png │ │ │ ├── icon-60@2x.png │ │ │ ├── icon-60@3x.png │ │ │ ├── icon-76.png │ │ │ ├── icon-76@2x.png │ │ │ └── icon-83.5@2x.png │ │ ├── Contents.json │ │ ├── LaunchScreen.AspectFill.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchScreen-AspectFill.png │ │ │ ├── LaunchScreen-AspectFill@2x.png │ │ │ └── LaunchScreen-AspectFill@3x.png │ │ └── LaunchScreen.Center.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchScreen-Center.png │ │ │ ├── LaunchScreen-Center@2x.png │ │ │ └── LaunchScreen-Center@3x.png │ │ ├── Info.plist │ │ ├── LaunchScreen.storyboard │ │ └── build.xcconfig ├── app │ ├── app-root.xml │ ├── app.css │ ├── app.ts │ ├── main-page.ts │ ├── main-page.xml │ └── main-view-model.ts ├── nativescript.config.ts ├── package.json ├── references.d.ts ├── tsconfig.json └── webpack.config.js ├── demo ├── .editorconfig ├── App_Resources │ ├── Android │ │ ├── app.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ ├── drawable-hdpi │ │ │ ├── background.png │ │ │ └── logo.png │ │ │ ├── drawable-ldpi │ │ │ ├── background.png │ │ │ └── logo.png │ │ │ ├── drawable-mdpi │ │ │ ├── background.png │ │ │ └── logo.png │ │ │ ├── drawable-nodpi │ │ │ └── splash_screen.xml │ │ │ ├── drawable-xhdpi │ │ │ ├── background.png │ │ │ └── logo.png │ │ │ ├── drawable-xxhdpi │ │ │ ├── background.png │ │ │ └── logo.png │ │ │ ├── drawable-xxxhdpi │ │ │ ├── background.png │ │ │ └── logo.png │ │ │ ├── drawable │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ └── ic_launcher.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── values-v21 │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ │ ├── values-v29 │ │ │ └── styles.xml │ │ │ └── values │ │ │ ├── colors.xml │ │ │ ├── ic_launcher_background.xml │ │ │ └── styles.xml │ └── iOS │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── icon-1024.png │ │ │ ├── icon-20.png │ │ │ ├── icon-20@2x.png │ │ │ ├── icon-20@3x.png │ │ │ ├── icon-29.png │ │ │ ├── icon-29@2x.png │ │ │ ├── icon-29@3x.png │ │ │ ├── icon-40.png │ │ │ ├── icon-40@2x.png │ │ │ ├── icon-40@3x.png │ │ │ ├── icon-60@2x.png │ │ │ ├── icon-60@3x.png │ │ │ ├── icon-76.png │ │ │ ├── icon-76@2x.png │ │ │ └── icon-83.5@2x.png │ │ ├── Contents.json │ │ ├── LaunchScreen.AspectFill.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchScreen-AspectFill.png │ │ │ ├── LaunchScreen-AspectFill@2x.png │ │ │ └── LaunchScreen-AspectFill@3x.png │ │ └── LaunchScreen.Center.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchScreen-Center.png │ │ │ ├── LaunchScreen-Center@2x.png │ │ │ └── LaunchScreen-Center@3x.png │ │ ├── Info.plist │ │ ├── LaunchScreen.storyboard │ │ └── build.xcconfig ├── app │ ├── app-root.xml │ ├── app.css │ ├── app.js │ ├── main-page.js │ ├── main-page.xml │ └── main-view-model.js ├── jsconfig.json ├── nativescript.config.ts ├── package.json └── webpack.config.js ├── package.json └── src ├── .npmignore ├── functions ├── classes.ts ├── identifiers.ts ├── index.ts ├── properties.ts ├── styles.ts ├── tags.ts ├── types.ts └── val-pairs.ts ├── helpers ├── get-child-views.ts ├── index.ts └── show-error.ts ├── index.ts ├── models ├── getters.ts ├── index.ts ├── is-checked.ts └── val-pair.ts ├── package-lock.json ├── package.json ├── rollup.config.js └── tsconfig.json /.czrc: -------------------------------------------------------------------------------- 1 | { 2 | "path": "cz-conventional-changelog" 3 | } 4 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | # Folders 2 | node_modules/ 3 | dist/ 4 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "@typescript-eslint/parser", 3 | "parserOptions": { 4 | "sourceType": "module", 5 | "ecmaVersion": 2015 6 | }, 7 | "plugins": [ 8 | "@nativescript" 9 | ], 10 | "extends": [ 11 | "plugin:@nativescript/recommended" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /.github/workflows/npm-publish.yml: -------------------------------------------------------------------------------- 1 | ## 2 | # Publish package to NPM 3 | # @see https://docs.github.com/en/actions/guides/publishing-nodejs-packages 4 | # @see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions 5 | # @see https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions 6 | # @see https://docs.github.com/en/actions/reference/events-that-trigger-workflows 7 | # @see https://snyk.io/blog/github-actions-to-securely-publish-npm-packages/ 8 | ## 9 | 10 | name: Publish package to NPM 11 | 12 | on: 13 | workflow_dispatch: 14 | release: 15 | types: [created] 16 | 17 | jobs: 18 | publish: 19 | runs-on: ubuntu-latest 20 | 21 | env: 22 | MAIN_FOLDER: ./src 23 | 24 | defaults: 25 | run: 26 | working-directory: ${{ env.MAIN_FOLDER }} 27 | 28 | steps: 29 | - uses: actions/checkout@v2 30 | 31 | - name: Build on Node.js 32 | uses: actions/setup-node@v2 33 | with: 34 | node-version: '16' 35 | registry-url: 'https://registry.npmjs.org' 36 | 37 | - name: Copy README into main folder 38 | working-directory: ./ 39 | run: cp -v README.md ${{ format('{0}/README.md', env.MAIN_FOLDER) }} 40 | 41 | - name: Install package dependencies 42 | run: npm ci --ignore-scripts 43 | 44 | - name: Compile TS files to JS files 45 | run: npm run build --if-present 46 | 47 | - name: Publish package to NPM 48 | run: npm publish --ignore-scripts --access public 49 | env: 50 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} 51 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Folders 2 | .vscode/ 3 | dist/ 4 | hooks/ 5 | node_modules/ 6 | platforms/ 7 | schema/ 8 | 9 | # Files 10 | *.map 11 | .DS_Store 12 | .env 13 | package-lock.json 14 | !src/package-lock.json 15 | !.vscode/settings.json 16 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "eslint.validate": [ 3 | "typescript", 4 | "javascript" 5 | ], 6 | "eslint.workingDirectories": [ 7 | "./src" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | 1. **Fork** the repo on GitHub 4 | 2. **Clone** the project to your own machine 5 | 3. **Commit** changes to your own branch 6 | 4. **Push** your work back up to your fork 7 | 5. Submit a **Pull request** so that we can review your changes 8 | 9 | > Be sure to merge the latest from "upstream" before making a pull request! 10 | 11 | ## How to run the project locally on your machine? 12 | 13 | 1. Install dependencies in root folder, src folder and demo folder with `npm install` on each folder. 14 | 2. Start an Android emulator or iOS simulator. 15 | 3. From root folder, run `npm run dev` in a terminal tab. 16 | 4. From root folder, run `npm run debug:android -- --path demo` (or `npm run debug:ios -- --path demo`) in another terminal tab. 17 | 18 | > You have to be careful with the update of dependencies, this can cause a certain number of errors, especially related to TypeScript. 19 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Benjamin Grand 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NativeScript Getters Plugin 2 | 3 | ![NPM version](https://img.shields.io/npm/v/nativescript-getters) 4 | ![NPM bundle size](https://img.shields.io/bundlephobia/min/nativescript-getters) 5 | ![NPM total downloads](https://img.shields.io/npm/dt/nativescript-getters) 6 | ![GitHub last commit](https://img.shields.io/github/last-commit/bgrand-ch/nativescript-getters) 7 | 8 | A NativeScript plugin that adds six new getters – in addition to the native `getViewById` method – to retrieve one or more views by tag, type, class, property, value pair or style. 9 | 10 | ## Getting Started 11 | 12 | ### Prerequisites 13 | 14 | #### Basics 15 | 16 | - NativeScript installed and configured. (see [CLI setup](https://docs.nativescript.org/environment-setup.html)) 17 | - An IDE with intelligent code completion. (see [VS Code](https://docs.nativescript.org/development-workflow.html#visual-studio-code)) 18 | - A functional project to use the plugin. (see [app templates](https://docs.nativescript.org/development-workflow.html#create)) 19 | 20 | #### Minimum versions 21 | 22 | - [@nativescript/core](https://docs.nativescript.org/development-workflow.html#updating), 7.0.0 or higher 23 | - [@nativescript/android](https://docs.nativescript.org/development-workflow.html#upgrading-platforms), 7.0.0 or higher 24 | - [@nativescript/ios](https://docs.nativescript.org/development-workflow.html#upgrading-platforms), 7.0.0 or higher 25 | - ECMAScript, 2015 (ES6) or higher 26 | 27 | ### Installation 28 | 29 | In Command prompt or Terminal navigate to your application root folder and run one of the following commands to install the plugin. (see [docs](https://docs.nativescript.org/development-workflow.html#plugins)) 30 | 31 | ```shell 32 | ns plugin add nativescript-getters 33 | ``` 34 | 35 | or 36 | 37 | ```shell 38 | npm install --save nativescript-getters 39 | ``` 40 | 41 | > The `--save` flag will add the plugin as dependency in your `package.json` file. 42 | 43 | ## Usage 44 | 45 | Import the plugin at the top of your JavaScript or TypeScript file. It can be imported only once into the application entry point file. (see [docs](https://v7.docs.nativescript.org/core-concepts/application-architecture#entry-point)) 46 | 47 | ```typescript 48 | import 'nativescript-getters' 49 | ``` 50 | 51 | > New methods have been added into the Frame, Page, layouts, tabs and texts classes. (see [methods](#methods)) 52 | 53 | ### Examples 54 | 55 | #### Get views by tags 56 | 57 | ```typescript 58 | export function navigatingTo(args: EventData) { 59 | const page = args.object 60 | const actionBar = page.getViewsByTags('ActionBar')[0] // case sensitive 61 | const foundViews = page.getViewsByTags('Label', 'Button') 62 | 63 | console.log('action bar:', actionBar) 64 | console.log('found views:', foundViews) 65 | } 66 | ``` 67 | 68 | The list of possible tags can be found on the [modules page](https://v7.docs.nativescript.org/api-reference/modules.html) of the NativeScript API documentation. (see "Classes") 69 | 70 | #### Get views by types 71 | 72 | ```typescript 73 | export function navigatingTo(args: EventData) { 74 | const page = args.object 75 | const layouts = page.getViewsByTypes('layout') 76 | const foundViews = page.getViewsByTypes('field', 'list') 77 | 78 | console.log('layouts:', layouts) 79 | console.log('found views:', foundViews) 80 | } 81 | ``` 82 | 83 | The list of available types: `bar`, `picker`, `view`, `layout`, `list`, `text`, `tab`, `field` and `form`. (see [types.ts](https://github.com/bgrand-ch/nativescript-getters/blob/main/src/functions/types.ts)) 84 | 85 | #### Get views by classes 86 | 87 | ```typescript 88 | export function navigatingTo(args: EventData) { 89 | const page = args.object 90 | const mainTitle = page.getViewsByClasses('h1')[0] 91 | const foundViews = page.getViewsByClasses('text-primary', 'font-italic') 92 | 93 | console.log('main title:', mainTitle) 94 | console.log('found views:', foundViews) 95 | } 96 | ``` 97 | 98 | #### Get views by identifiers 99 | 100 | ```typescript 101 | export function navigatingTo(args: EventData) { 102 | const page = args.object 103 | const debugIds = page.getViewsByIdentifiers('debug') // alias: getViewsByIds('debug') 104 | const foundViews = page.getViewsByIdentifiers('my-id', 'another-id') 105 | 106 | console.log('debug ids:', debugIds) 107 | console.log('found views:', foundViews) 108 | } 109 | ``` 110 | 111 | #### Get views by properties 112 | 113 | ```typescript 114 | export function navigatingTo(args: EventData) { 115 | const page = args.object 116 | const texts = page.getViewsByProperties('text') // alias: getViewsByProps('text') 117 | const foundViews = page.getViewsByProperties('columns', 'width') 118 | 119 | console.log('texts:', texts) 120 | console.log('found views:', foundViews) 121 | } 122 | ``` 123 | 124 | The list of possible property names can be found on the [view page](https://v7.docs.nativescript.org/api-reference/classes/view.html) of the NativeScript API documentation. 125 | 126 | #### Get views by val pairs 127 | 128 | ```typescript 129 | export function navigatingTo(args: EventData) { 130 | const page = args.object 131 | const welcomeTexts = page.getViewsByValPairs( 132 | { name: 'text', value: 'Welcome' } 133 | ) 134 | const foundViews = page.getViewsByValPairs( 135 | { name: 'columns', value: 'auto' }, 136 | { name: 'width', value: '210' } 137 | ) 138 | 139 | console.log('welcome texts:', welcomeTexts) 140 | console.log('found views:', foundViews) 141 | } 142 | ``` 143 | 144 | The list of possible property names and their values can be found on the [view page](https://v7.docs.nativescript.org/api-reference/classes/view.html) of the NativeScript API documentation. 145 | 146 | #### Get views by styles 147 | 148 | ```typescript 149 | export function navigatingTo(args: EventData) { 150 | const page = args.object 151 | const redViews = page.getViewsByStyles( 152 | { name: 'background', value: 'FF0000' } 153 | ) 154 | const foundViews = page.getViewsByStyles( 155 | { name: 'visibility', value: 'collapsed' }, 156 | { name: 'opacity', value: '0.5' } 157 | ) 158 | 159 | console.log('red views:', redViews) 160 | console.log('found views:', foundViews) 161 | } 162 | ``` 163 | 164 | > Note: The color name (example: red or white) is converted by NativeScript to hexadecimal. 165 | 166 | The list of possible styles can be found on the [style page](https://v7.docs.nativescript.org/api-reference/classes/style.html) of the NativeScript API documentation. 167 | 168 | ### Example in stand-alone mode 169 | 170 | ```typescript 171 | import { getViewsByTags } from 'nativescript-getters' 172 | 173 | export function standaloneMode(view: View) { 174 | const foundViews = getViewsByTags.call(view, 'Label', 'Button') 175 | 176 | console.log('found views:', foundViews) 177 | } 178 | ``` 179 | 180 | More info about `call()`: 181 | 182 | - [Difference between call, apply and bind](https://dev.to/hebashakeel/difference-between-call-apply-and-bind-4p98), by [@hebashakeel](https://twitter.com/hebashakeel) 183 | - [Function.prototype.call()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call), by [@MozDevNet](https://twitter.com/MozDevNet) 184 | 185 | ## API 186 | 187 | ### Methods 188 | 189 | All methods **return an array of [views](https://v7.docs.nativescript.org/api-reference/classes/view.html)**, except for the native method [`getViewById`](https://v7.docs.nativescript.org/api-reference/classes/view.html#getviewbyid). 190 | 191 | Name | Parameter(s) | Returns 192 | :--- | :----------- | :----- 193 | `getViewsByTags` | `...tagNames: string[]` | `View[]` 194 | `getViewsByTypes` | `...typeNames: string[]` | `View[]` 195 | `getViewsByClasses` | `...classNames: string[]` | `View[]` 196 | `getViewsByIdentifiers`
_Alias: getViewsByIds_ | `...idNames: string[]` | `View[]` 197 | `getViewsByProperties`
_Alias: getViewsByProps_ | `...propNames: string[]` | `View[]` 198 | `getViewsByValPairs` | `...valPairs: ValPair[]`
_ValPair: { name: string, value: string }_ | `View[]` 199 | `getViewsByStyles` | `...styles: ValPair[]`
_ValPair: { name: string, value: string }_ | `View[]` 200 | 201 | ### Native method 202 | 203 | The native method **returns only a [view](https://v7.docs.nativescript.org/api-reference/classes/view.html)**. Its name is written in the singular (`getView`...). 204 | 205 | Name | Parameter | Returns 206 | :--- | :-------- | :----- 207 | `getViewById` | `idName: string` | `View` 208 | 209 | ## Known issues 210 | 211 | ### VSCode IntelliSense 212 | 213 | If the following **TypeScript declaration error occurs**, you need to open the application entry point file (**and keep it open**) or click on the tab of the file already open. 214 | 215 | ``` 216 | Property 'getViewsBy...' does not exist on type 'View'. ts(2339) 217 | ``` 218 | 219 | VSCode IntelliSense now remembers the entry point of the application and recognizes the declaration of new methods. 220 | 221 | ### Vue.js 222 | 223 | The plugin may not work properly with these symlinked. It is because webpack resolves symlinks to their real locations by default. 224 | 225 | A workaround for this issue is to manually disable symlinks resolution in webpack: 226 | 227 | ```javascript 228 | const config = { 229 | resolve: { 230 | // resolve symlinks to symlinked modules 231 | symlinks: false 232 | } 233 | } 234 | ``` 235 | 236 | ## Question? Idea? 237 | 238 | If you have a question about how `nativescript-getters` works or an idea to improve it, the [Discussions](https://github.com/bgrand-ch/nativescript-getters/discussions) tab in GitHub is the place to be. 239 | 240 | However, if you get an error, you should open an [issue](https://github.com/bgrand-ch/nativescript-getters/issues). 241 | 242 | ## Contributing 243 | 244 | See [CONTRIBUTING](https://github.com/bgrand-ch/nativescript-getters/blob/main/CONTRIBUTING.md) for more information. 245 | 246 | ## License 247 | 248 | Distributed under the MIT License. See [LICENSE](https://github.com/bgrand-ch/nativescript-getters/blob/main/LICENSE.md) for more information. 249 | 250 | ## Contact 251 | 252 | Benjamin Grand [@bgrand_ch](https://twitter.com/bgrand_ch) 253 | -------------------------------------------------------------------------------- /demo-ts/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | trim_trailing_whitespace = true 7 | charset = utf-8 8 | 9 | [*.json] 10 | indent_style = space 11 | indent_size = 2 12 | 13 | [*.js] 14 | indent_style = space 15 | indent_size = 2 16 | 17 | [*.ts] 18 | indent_style = space 19 | indent_size = 2 -------------------------------------------------------------------------------- /demo-ts/.gitignore: -------------------------------------------------------------------------------- 1 | # NativeScript 2 | hooks/ 3 | node_modules/ 4 | platforms/ 5 | 6 | # Logs 7 | logs 8 | *.log 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | 13 | # General 14 | .DS_Store 15 | .AppleDouble 16 | .LSOverride 17 | .idea 18 | .cloud 19 | .project 20 | tmp/ 21 | typings/ 22 | 23 | # Visual Studio Code 24 | .vscode/* 25 | !.vscode/settings.json 26 | !.vscode/tasks.json 27 | !.vscode/launch.json 28 | !.vscode/extensions.json 29 | -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/app.gradle: -------------------------------------------------------------------------------- 1 | // Add your native dependencies here: 2 | 3 | // Uncomment to add recyclerview-v7 dependency 4 | //dependencies { 5 | // implementation 'com.android.support:recyclerview-v7:+' 6 | //} 7 | 8 | // If you want to add something to be applied before applying plugins' include.gradle files 9 | // e.g. project.ext.googlePlayServicesVersion = "15.0.1" 10 | // create a file named before-plugins.gradle in the current directory and place it there 11 | 12 | android { 13 | defaultConfig { 14 | minSdkVersion 17 15 | generatedDensities = [] 16 | } 17 | aaptOptions { 18 | additionalParameters "--no-version-vectors" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/src/main/res/drawable-hdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/Android/src/main/res/drawable-hdpi/background.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/src/main/res/drawable-hdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/Android/src/main/res/drawable-hdpi/logo.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/src/main/res/drawable-ldpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/Android/src/main/res/drawable-ldpi/background.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/src/main/res/drawable-ldpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/Android/src/main/res/drawable-ldpi/logo.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/src/main/res/drawable-mdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/Android/src/main/res/drawable-mdpi/background.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/src/main/res/drawable-mdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/Android/src/main/res/drawable-mdpi/logo.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/src/main/res/drawable-xhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/Android/src/main/res/drawable-xhdpi/background.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/src/main/res/drawable/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/Android/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/Android/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/Android/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/Android/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/Android/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/src/main/res/values-v21/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #65ADF1 4 | -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 13 | 14 | 15 | 18 | 19 | 20 | 23 | 24 | 28 | -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/src/main/res/values-v29/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 11 | 12 | -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #F5F5F5 4 | #757575 5 | #65ADF1 6 | #272734 7 | -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /demo-ts/App_Resources/Android/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 17 | 18 | 20 | 21 | 22 | 29 | 30 | 32 | 33 | 34 | 39 | 40 | 42 | 43 | -------------------------------------------------------------------------------- /demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "icon-20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "icon-20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "icon-29.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "icon-29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "icon-29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "icon-40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "icon-40@3x.png", 43 | "scale" : "3x" 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" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "icon-20.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "icon-20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "icon-29.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "icon-29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "icon-40.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "icon-40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "icon-76.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "icon-76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "icon-83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "icon-1024.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } -------------------------------------------------------------------------------- /demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /demo-ts/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 | "filename" : "LaunchScreen-AspectFill@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /demo-ts/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png -------------------------------------------------------------------------------- /demo-ts/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 | "filename" : "LaunchScreen-Center@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /demo-ts/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png -------------------------------------------------------------------------------- /demo-ts/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgrand-ch/nativescript-getters/6386ac86497c70b5470ecd254b39c82516bb3bc6/demo-ts/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png -------------------------------------------------------------------------------- /demo-ts/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-ts/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 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /demo-ts/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 you need to specify your development team. 5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID; 6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 7 | -------------------------------------------------------------------------------- /demo-ts/app/app-root.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /demo-ts/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. You can learn more about the 10 | NativeScript core theme at https://github.com/nativescript/theme 11 | The imported CSS rules must precede all other types of rules. 12 | */ 13 | @import '@nativescript/theme/css/core.css'; 14 | @import '@nativescript/theme/css/default.css'; 15 | 16 | /* Place any CSS rules you want to apply on both iOS and Android here. 17 | This is where the vast majority of your CSS code goes. */ 18 | 19 | /* 20 | The following CSS rule changes the font size of all Buttons that have the 21 | '-primary' class modifier. 22 | */ 23 | Button.-primary { 24 | font-size: 18; 25 | } 26 | -------------------------------------------------------------------------------- /demo-ts/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 { Application } from '@nativescript/core' 8 | import 'nativescript-getters' 9 | 10 | Application.run({ moduleName: 'app-root' }) 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-ts/app/main-page.ts: -------------------------------------------------------------------------------- 1 | /* 2 | In NativeScript, a file with the same name as an XML file is known as 3 | a code-behind file. The code-behind is a great place to place your view 4 | logic, and to set up your page’s data binding. 5 | */ 6 | 7 | import { EventData, Page } from '@nativescript/core' 8 | import { HelloWorldModel } from './main-view-model' 9 | 10 | // Event handler for Page 'navigatingTo' event attached in main-page.xml 11 | export function navigatingTo(args: EventData) { 12 | /* 13 | This gets a reference this page’s UI component. You can 14 | view the API reference of the Page to see what’s available at 15 | https://docs.nativescript.org/api-reference/classes/_ui_page_.page.html 16 | */ 17 | const page = args.object 18 | 19 | // const foundViews = page.getViewsByTags('Button') 20 | // console.log('foundViews:', foundViews) 21 | // const buttonStyle = foundViews[0].style.background 22 | // console.log('buttonStyle:', buttonStyle) 23 | 24 | const foundViews = page.getViewsByTypes('form', 'layout') 25 | console.log('foundViews:', foundViews) 26 | 27 | /* 28 | A page’s bindingContext is an object that should be used to perform 29 | data binding between XML markup and TypeScript code. Properties 30 | on the bindingContext can be accessed using the {{ }} syntax in XML. 31 | In this example, the {{ message }} and {{ onTap }} bindings are resolved 32 | against the object returned by createViewModel(). 33 | 34 | You can learn more about data binding in NativeScript at 35 | https://docs.nativescript.org/core-concepts/data-binding. 36 | */ 37 | page.bindingContext = new HelloWorldModel() 38 | } 39 | -------------------------------------------------------------------------------- /demo-ts/app/main-page.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 12 | 13 | 14 | 25 | 26 |