├── .github ├── issue_template.md └── pull_request_template.md ├── .gitignore ├── .travis.yml ├── .vscode └── settings.json ├── LICENSE ├── README.md ├── demo-ng ├── .editorconfig ├── .gitignore ├── App_Resources │ ├── Android │ │ ├── app.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ ├── drawable-hdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-ldpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-mdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-nodpi │ │ │ └── splash_screen.xml │ │ │ ├── drawable-xhdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-xxhdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-xxxhdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── values-v21 │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ │ ├── values-v29 │ │ │ └── styles.xml │ │ │ └── values │ │ │ ├── colors.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 ├── angular.json ├── nativescript.config.ts ├── package-lock.json ├── package.json ├── references.d.ts ├── src │ ├── app.css │ ├── app │ │ ├── app-routing.module.ts │ │ ├── app.component.html │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ └── modal │ │ │ ├── modal.component.css │ │ │ ├── modal.component.html │ │ │ ├── modal.component.ts │ │ │ └── modal.module.ts │ └── main.ts ├── tsconfig.json ├── tsfmt.json └── webpack.config.js ├── demo ├── .editorconfig ├── app │ ├── App_Resources │ │ ├── Android │ │ │ ├── app.gradle │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── res │ │ │ │ ├── drawable-hdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── drawable-ldpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── drawable-mdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── drawable-nodpi │ │ │ │ └── splash_screen.xml │ │ │ │ ├── drawable-xhdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── drawable-xxxhdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── values-v21 │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ │ └── values │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ └── iOS │ │ │ ├── Assets.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── Contents.json │ │ │ │ ├── icon-29.png │ │ │ │ ├── icon-29@2x.png │ │ │ │ ├── icon-29@3x.png │ │ │ │ ├── icon-40.png │ │ │ │ ├── icon-40@2x.png │ │ │ │ ├── icon-40@3x.png │ │ │ │ ├── icon-50.png │ │ │ │ ├── icon-50@2x.png │ │ │ │ ├── icon-57.png │ │ │ │ ├── icon-57@2x.png │ │ │ │ ├── icon-60@2x.png │ │ │ │ ├── icon-60@3x.png │ │ │ │ ├── icon-72.png │ │ │ │ ├── icon-72@2x.png │ │ │ │ ├── icon-76.png │ │ │ │ ├── icon-76@2x.png │ │ │ │ └── icon-83.5@2x.png │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.launchimage │ │ │ │ ├── Contents.json │ │ │ │ ├── Default-568h@2x.png │ │ │ │ ├── Default-667h@2x.png │ │ │ │ ├── Default-736h@3x.png │ │ │ │ ├── Default-Landscape.png │ │ │ │ ├── Default-Landscape@2x.png │ │ │ │ ├── Default-Landscape@3x.png │ │ │ │ ├── Default-Portrait.png │ │ │ │ ├── Default-Portrait@2x.png │ │ │ │ ├── Default.png │ │ │ │ └── Default@2x.png │ │ │ ├── LaunchScreen.AspectFill.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── LaunchScreen-AspectFill.png │ │ │ │ └── LaunchScreen-AspectFill@2x.png │ │ │ └── LaunchScreen.Center.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── LaunchScreen-Center.png │ │ │ │ └── LaunchScreen-Center@2x.png │ │ │ ├── Info.plist │ │ │ ├── LaunchScreen.storyboard │ │ │ └── build.xcconfig │ ├── app.ts │ ├── main-page.ts │ ├── main-page.xml │ ├── modal.css │ ├── modal.ts │ └── modal.xml ├── nativescript.config.ts ├── package-lock.json ├── package.json ├── references.d.ts ├── tsconfig.json └── webpack.config.js ├── publish ├── pack.sh ├── package-lock.json ├── package.json └── publish.sh ├── src ├── .editorconfig ├── .npmignore ├── index.d.ts ├── index.ts ├── modal-stack.ts ├── package-lock.json ├── package.json ├── references.d.ts ├── tsconfig.json ├── vue-windowed-modal.ts ├── windowed-modal.android.ts ├── windowed-modal.common.ts ├── windowed-modal.d.ts └── windowed-modal.ios.ts └── tslint.json /.github/issue_template.md: -------------------------------------------------------------------------------- 1 | ### Make sure to check the demo app(s) for sample usage 2 | 3 | ### Make sure to check the existing issues in this repository 4 | 5 | ### If the demo apps cannot help and there is no issue for your problem, tell us about it 6 | Please, ensure your title is less than 63 characters long and starts with a capital 7 | letter. 8 | 9 | ### Which platform(s) does your issue occur on? 10 | - iOS/Android/Both 11 | - iOS/Android versions 12 | - emulator or device. What type of device? 13 | 14 | ### Please, provide the following version numbers that your issue occurs with: 15 | 16 | - CLI: (run `tns --version` to fetch it) 17 | - Cross-platform modules: (check the 'version' attribute in the 18 | `node_modules/tns-core-modules/package.json` file in your project) 19 | - Runtime(s): (look for the `"tns-android"` and `"tns-ios"` properties in the `package.json` file of your project) 20 | - Plugin(s): (look for the version numbers in the `package.json` file of your 21 | project and paste your dependencies and devDependencies here) 22 | 23 | ### Please, tell us how to recreate the issue in as much detail as possible. 24 | Describe the steps to reproduce it. 25 | 26 | ### Is there any code involved? 27 | - provide a code example to recreate the problem 28 | - (EVEN BETTER) provide a .zip with application or refer to a repository with application where the problem is reproducible. 29 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | ## PR Checklist 11 | 12 | - [ ] The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/CONTRIBUTING.md#commit-messages. 13 | - [ ] There is an issue for the bug/feature this PR is for. To avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it. 14 | - [ ] All existing tests are passing 15 | - [ ] Tests for the changes are included 16 | 17 | ## What is the current behavior? 18 | 19 | 20 | ## What is the new behavior? 21 | 22 | 23 | Fixes/Implements/Closes #[Issue Number]. 24 | 25 | 26 | 27 | 36 | 37 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .DS_Store 3 | *.esm.json 4 | *.js 5 | *.js.map 6 | *.log 7 | src/*.d.ts 8 | !src/index.d.ts 9 | !src/references.d.ts 10 | !src/scripts/*.js 11 | node_modules 12 | publish/src 13 | publish/package 14 | 15 | demo/*.d.ts 16 | !demo/references.d.ts 17 | demo/lib 18 | demo/platforms 19 | demo/report/report.html 20 | demo/report/stats.json 21 | 22 | demo-ng/*.d.ts 23 | !demo-ng/references.d.ts 24 | demo-ng/lib 25 | demo-ng/platforms 26 | demo-ng/report/report.html 27 | demo-ng/report/stats.json 28 | 29 | .vscode/* 30 | !.vscode/settings.json 31 | !.vscode/tasks.json 32 | !.vscode/launch.json 33 | !.vscode/extensions.json -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | notifications: 2 | email: 3 | on_success: never 4 | on_failure: change 5 | 6 | matrix: 7 | include: 8 | - stage: "Build Plugin" 9 | language: node_js 10 | os: linux 11 | node_js: "12" 12 | before_install: echo 13 | install: cd src && npm ci && cd .. 14 | script: cd src && npm run ci.build 15 | 16 | - stage: "Lint" 17 | language: node_js 18 | os: linux 19 | node_js: "12" 20 | before_install: echo 21 | install: cd src && npm ci && cd .. 22 | script: cd src && npm run ci.tslint 23 | 24 | - stage: "Demo" 25 | os: osx 26 | env: 27 | - Platform="iOS" 28 | osx_image: xcode12.2 29 | language: node_js 30 | node_js: "12" 31 | jdk: oraclejdk8 32 | script: cd demo && tns build ios --env.uglify 33 | - language: android 34 | os: linux 35 | env: 36 | - Platform="Android" 37 | jdk: oraclejdk8 38 | script: cd demo && tns build android --env.uglify 39 | 40 | - stage: "Demo Angular" 41 | os: osx 42 | env: 43 | - Platform="iOS" 44 | osx_image: xcode12.2 45 | language: node_js 46 | node_js: "12" 47 | jdk: oraclejdk8 48 | script: cd demo-ng && tns build ios --env.uglify 49 | - language: android 50 | os: linux 51 | env: 52 | - Platform="Android" 53 | jdk: oraclejdk8 54 | script: cd demo-ng && tns build android --env.uglify 55 | 56 | before_install: 57 | - sudo pip install --ignore-installed --upgrade six # https://github.com/NativeScript/nativescript-cli/issues/3534 58 | - nvm install 12 59 | 60 | install: 61 | - echo no | npm install -g nativescript 62 | - tns usage-reporting disable 63 | - tns error-reporting disable 64 | - cd src && npm ci && cd .. 65 | 66 | android: 67 | components: 68 | - tools 69 | - platform-tools 70 | - build-tools-28.0.3 71 | - android-28 72 | - android-21 73 | - extra-android-m2repository 74 | - sys-img-armeabi-v7a-android-21 75 | licenses: 76 | - "android-sdk-preview-license-52d11cd2" 77 | - "android-sdk-license-.+" 78 | - "google-gdk-license-.+" 79 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.exclude": { 3 | "**/*.js": { 4 | "when": "$(basename).ts", 5 | }, 6 | "**/*.map": { 7 | "when": "$(basename)", 8 | }, 9 | "**/*.css": { 10 | "when": "$(basename).scss" 11 | }, 12 | "**/node_modules/": true, 13 | "demo/platforms": true, 14 | "demo-ng/platforms": true 15 | }, 16 | "typescript.tsdk": "node_modules\\typescript\\lib", 17 | "typescript.preferences.quoteStyle": "double", 18 | "editor.codeActionsOnSave": { 19 | "source.organizeImports": true 20 | }, 21 | "tslint.configFile": "./tslint.json", 22 | "tslint.autoFixOnSave": true, 23 | "tslint.enable": true 24 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright (c) 2015-2018 Telerik EAD 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Nativescript Windowed Modal ![apple](https://cdn3.iconfinder.com/data/icons/picons-social/57/16-apple-32.png) ![android](https://cdn4.iconfinder.com/data/icons/logos-3/228/android-32.png) 2 | 3 | [![npm version](https://badge.fury.io/js/nativescript-windowed-modal.svg)](http://badge.fury.io/js/nativescript-windowed-modal) 4 | [![npm downloads](https://img.shields.io/npm/dm/nativescript-windowed-modal.svg)](http://badge.fury.io/js/nativescript-windowed-modal) 5 | [![Build Status](https://travis-ci.com/mukaschultze/nativescript-windowed-modal.svg?branch=master)](https://travis-ci.com/mukaschultze/nativescript-windowed-modal) 6 | [![Nativescript Dependency](https://img.shields.io/npm/dependency-version/nativescript-windowed-modal/dev/@nativescript/core)](https://www.npmjs.com/package/@nativescript/core) 7 | [![Visitors](https://visitor-badge.glitch.me/badge?page_id=mukaschultze/nativescript-windowed-modal)](https://github.com/mukaschultze/nativescript-windowed-modal) 8 | 9 | This plugin overrides the `showModal()` from nativescript, making modals look and behave the same on Android and iOS. 10 | 11 | ## Installation 12 | 13 | ```cmd 14 | tns plugin add nativescript-windowed-modal 15 | ``` 16 | 17 | ## Usage 18 | 19 | ### Code 20 | 21 | Call the `overrideModalViewMethod()` once before starting the app and register the layout element: 22 | 23 | #### Javascript 24 | 25 | ```js 26 | var windowedModal = require("nativescript-windowed-modal") 27 | windowedModal.overrideModalViewMethod() 28 | ``` 29 | 30 | #### Typescript+Angular 31 | 32 | ```ts 33 | import { ExtendedShowModalOptions, ModalStack, overrideModalViewMethod } from "nativescript-windowed-modal" 34 | 35 | overrideModalViewMethod() 36 | registerElement("ModalStack", () => ModalStack) 37 | ``` 38 | 39 | You can pass extended options like this: 40 | 41 | ```ts 42 | mainPage.showModal("./modal", { 43 | context: "I'm the context", 44 | closeCallback: (response: string) => console.log("Modal response: " + response), 45 | dimAmount: 0.5 // Sets the alpha of the background dim 46 | } as ExtendedShowModalOptions) 47 | ``` 48 | 49 | #### NativeScript-Vue 50 | 51 | ```js 52 | // main.js 53 | import { ModalStack, overrideModalViewMethod, VueWindowedModal } from "nativescript-windowed-modal" 54 | 55 | overrideModalViewMethod() 56 | Vue.registerElement("ModalStack", () => ModalStack) 57 | Vue.use(VueWindowedModal) 58 | ``` 59 | 60 | You can pass extended options like this: 61 | 62 | ```html 63 | 78 | ``` 79 | 80 | ### Properties 81 | 82 | #### [ExtendedShowModalOptions](../master/src/windowed-modal.common.ts#L13) 83 | 84 | | Property | Type | Platform | Default | Description | 85 | | ---------- | ------ | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 86 | | dimAmount? | number | both | 0.5 | Controls the alpha value of the dimming color. On Android, setting this to 0 disables the fade in animation. On iOS this value will be replaced with the alpha of the background color if it is set. | 87 | 88 | #### [ModalStack](../master/src/modal-stack.ts#L8) 89 | 90 | | Property | Type | Platform | Default | Description | 91 | | ------------------ | ------- | -------- | ------- | ---------------------------------------------------------------------------------------- | 92 | | dismissEnabled | boolean | both | true | If set to true, the modal is allowed to close when touching outside of the content frame | 93 | | verticalPosition | string | both | middle | Uses the same options as VerticalAlignment ("top" - "middle" - "bottom" - "stretch") | 94 | | horizontalPosition | string | both | center | Uses the same options as HorizontalAlignment ("left" - "center" - "right" - "stretch") | 95 | 96 | ### Layout 97 | 98 | Wrap your modal component with a `ModalStack` tag to layout the elements in a consistent way across platforms, it will also allows you to dismiss the modal when touching outsite of the frame: 99 | 100 | #### XML 101 | 102 | ```xml 103 | 104 | 105 | 106 | 108 | 109 | 110 | ``` 111 | 112 | #### HTML (Angular) 113 | 114 | ```html 115 | 116 | 117 | 118 | 119 | 120 | ``` 121 | 122 | ### Style 123 | 124 | You may want to create the `.modal` and `.modal-container` classes in your .css to set margins, aligment and background color: 125 | 126 | ```css 127 | .modal { 128 | margin: 20; 129 | margin-top: 35; 130 | border-radius: 8; 131 | horizontal-align: center; 132 | vertical-align: middle; 133 | background-color: white; 134 | } 135 | 136 | .modal-container { 137 | padding: 25; 138 | padding-bottom: 10; 139 | } 140 | ``` 141 | 142 | ## Running the demo app 143 | 144 | 1. Clone this repo 145 | 2. `cd src` 146 | 3. `npm run demo.android`, `npm run demo.ios`, `npm run demo.ng.android`, or `npm run demo.ng.ios` 147 | 148 | ## Known Issues 149 | 150 | - Padding won't apply on children of the `ModalStack`, wrapping them with a `StackLayout` fixes the problem; 151 | - Auto width is kinda buggy on some situations, set a fixed width for children of `ModalStack` when possible; 152 | 153 | ## License 154 | 155 | Apache License Version 2.0, January 2004 156 | -------------------------------------------------------------------------------- /demo-ng/.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 | [*.ts] 14 | indent_style = space 15 | indent_size = 4 16 | -------------------------------------------------------------------------------- /demo-ng/.gitignore: -------------------------------------------------------------------------------- 1 | # NativeScript 2 | hooks/ 3 | node_modules/ 4 | platforms/ 5 | 6 | # NativeScript Template 7 | *.js.map 8 | *.js 9 | !ngcc.config.js 10 | !webpack.config.js 11 | 12 | # Logs 13 | logs 14 | *.log 15 | npm-debug.log* 16 | yarn-debug.log* 17 | yarn-error.log* 18 | 19 | # General 20 | .DS_Store 21 | .AppleDouble 22 | .LSOverride 23 | .idea 24 | .cloud 25 | .project 26 | tmp/ 27 | typings/ 28 | 29 | # Visual Studio Code 30 | .vscode/* 31 | !.vscode/settings.json 32 | !.vscode/tasks.json 33 | !.vscode/launch.json 34 | !.vscode/extensions.json 35 | -------------------------------------------------------------------------------- /demo-ng/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-ng/App_Resources/Android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 14 | 15 | 16 | 17 | 23 | 24 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-hdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/Android/src/main/res/drawable-hdpi/background.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/Android/src/main/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-hdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/Android/src/main/res/drawable-hdpi/logo.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-ldpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/Android/src/main/res/drawable-ldpi/background.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/Android/src/main/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-ldpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/Android/src/main/res/drawable-ldpi/logo.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-mdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/Android/src/main/res/drawable-mdpi/background.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/Android/src/main/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-mdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/Android/src/main/res/drawable-mdpi/logo.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-xhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/Android/src/main/res/drawable-xhdpi/background.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/values-v21/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3d5afe 4 | -------------------------------------------------------------------------------- /demo-ng/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-ng/App_Resources/Android/src/main/res/values-v29/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 11 | 12 | -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #F5F5F5 4 | #757575 5 | #33B5E5 6 | #272734 7 | -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 18 | 19 | 21 | 22 | 23 | 31 | 32 | 34 | 35 | 36 | 42 | 43 | 45 | 46 | -------------------------------------------------------------------------------- /demo-ng/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-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /demo-ng/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-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png -------------------------------------------------------------------------------- /demo-ng/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-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png -------------------------------------------------------------------------------- /demo-ng/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-ng/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-ng/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 | -------------------------------------------------------------------------------- /demo-ng/angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "cli": { 6 | "defaultCollection": "@nativescript/schematics" 7 | }, 8 | "projects": { 9 | "hello-world": { 10 | "root": "", 11 | "sourceRoot": "src", 12 | "projectType": "application", 13 | "prefix": "ns" 14 | } 15 | }, 16 | "defaultProject": "hello-world" 17 | } 18 | -------------------------------------------------------------------------------- /demo-ng/nativescript.config.ts: -------------------------------------------------------------------------------- 1 | import { NativeScriptConfig } from "@nativescript/core"; 2 | 3 | export default { 4 | id: "org.nativescript.demong", 5 | appResourcesPath: "App_Resources", 6 | android: { 7 | v8Flags: "--expose_gc", 8 | markingMode: "none", 9 | }, 10 | } as NativeScriptConfig; 11 | -------------------------------------------------------------------------------- /demo-ng/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@nativescript/template-hello-world-ng", 3 | "main": "main.js", 4 | "version": "7.0.2", 5 | "author": "NativeScript Team ", 6 | "description": "NativeScript Application", 7 | "license": "SEE LICENSE IN ", 8 | "publishConfig": { 9 | "access": "public" 10 | }, 11 | "keywords": [ 12 | "nativescript", 13 | "mobile", 14 | "angular", 15 | "{N}", 16 | "template" 17 | ], 18 | "repository": "", 19 | "bugs": { 20 | "url": "https://github.com/NativeScript/NativeScript/issues" 21 | }, 22 | "scripts": { 23 | "ngcc": "ngcc --properties es2015 module main --first-only", 24 | "postinstall": "npm run ngcc" 25 | }, 26 | "dependencies": { 27 | "@angular/animations": "~10.1.0", 28 | "@angular/common": "~10.1.0", 29 | "@angular/compiler": "~10.1.0", 30 | "@angular/core": "~10.1.0", 31 | "@angular/forms": "~10.1.0", 32 | "@angular/platform-browser": "~10.1.0", 33 | "@angular/platform-browser-dynamic": "~10.1.0", 34 | "@angular/router": "~10.1.0", 35 | "@nativescript/angular": "~10.1.0", 36 | "@nativescript/core": "~7.0.0", 37 | "@nativescript/theme": "~2.3.0", 38 | "nativescript-windowed-modal": "file:../src", 39 | "reflect-metadata": "~0.1.12", 40 | "rxjs": "^6.6.0", 41 | "zone.js": "~0.11.1" 42 | }, 43 | "devDependencies": { 44 | "@angular/compiler-cli": "~10.1.0", 45 | "@nativescript/android": "7.0.0", 46 | "@nativescript/types": "~7.0.0", 47 | "@nativescript/webpack": "~3.0.0", 48 | "@ngtools/webpack": "~10.1.0", 49 | "typescript": "~3.9.0" 50 | }, 51 | "private": "true", 52 | "readme": "NativeScript Application" 53 | } 54 | -------------------------------------------------------------------------------- /demo-ng/references.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /demo-ng/src/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 | -------------------------------------------------------------------------------- /demo-ng/src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from "@angular/core"; 2 | import { Routes } from "@angular/router"; 3 | import { NativeScriptRouterModule } from "@nativescript/angular"; 4 | 5 | const routes: Routes = []; 6 | 7 | @NgModule({ 8 | imports: [NativeScriptRouterModule.forRoot(routes)], 9 | exports: [NativeScriptRouterModule], 10 | }) 11 | export class AppRoutingModule { } 12 | -------------------------------------------------------------------------------- /demo-ng/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /demo-ng/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, ViewContainerRef } from "@angular/core"; 2 | import { ModalDialogService } from "@nativescript/angular"; 3 | import { ModalComponent } from "./modal/modal.component"; 4 | 5 | @Component({ 6 | selector: "ns-app", 7 | templateUrl: "./app.component.html", 8 | }) 9 | export class AppComponent { 10 | 11 | constructor( 12 | private modalService: ModalDialogService, 13 | private vcRef: ViewContainerRef, 14 | ) { } 15 | 16 | async openModal1() { 17 | const response = await this.modalService.showModal(ModalComponent, { 18 | context: { 19 | message: "I'm the context", 20 | }, 21 | fullscreen: false, 22 | viewContainerRef: this.vcRef, 23 | }); 24 | console.log("Modal response: " + response); 25 | } 26 | 27 | async openModal2() { 28 | const response = await this.modalService.showModal(ModalComponent, { 29 | context: { 30 | dim: "#00000000", 31 | message: "I'm the context", 32 | }, 33 | fullscreen: false, 34 | viewContainerRef: this.vcRef, 35 | dimAmount: 0.05, 36 | } as any); 37 | console.log("Modal response: " + response); 38 | } 39 | 40 | async openModal3() { 41 | const response = await this.modalService.showModal(ModalComponent, { 42 | context: { 43 | dim: "#5C00FFDD", 44 | message: "I'm the context", 45 | }, 46 | fullscreen: false, 47 | viewContainerRef: this.vcRef, 48 | dimAmount: 0.1, 49 | } as any); 50 | console.log("Modal response: " + response); 51 | } 52 | 53 | async openModal4() { 54 | const response = await this.modalService.showModal(ModalComponent, { 55 | context: { 56 | dim: "#FFFF0000", 57 | message: "I'm the context", 58 | }, 59 | fullscreen: false, 60 | viewContainerRef: this.vcRef, 61 | }); 62 | console.log("Modal response: " + response); 63 | } 64 | 65 | async openModal5() { 66 | const response = await this.modalService.showModal(ModalComponent, { 67 | context: { 68 | dim: "#5C00FFDD", 69 | message: "I'm the context", 70 | }, 71 | fullscreen: true, 72 | viewContainerRef: this.vcRef, 73 | }); 74 | console.log("Modal response: " + response); 75 | } 76 | 77 | async openModal6() { 78 | const response = await this.modalService.showModal(ModalComponent, { 79 | context: { 80 | message: "I'm the context", 81 | }, 82 | fullscreen: true, 83 | viewContainerRef: this.vcRef, 84 | }); 85 | console.log("Modal response: " + response); 86 | } 87 | 88 | } 89 | -------------------------------------------------------------------------------- /demo-ng/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core"; 2 | import { NativeScriptModule } from "@nativescript/angular"; 3 | import { AppRoutingModule } from "./app-routing.module"; 4 | import { AppComponent } from "./app.component"; 5 | import { ModalModule } from "./modal/modal.module"; 6 | 7 | // Uncomment and add to NgModule imports if you need to use two-way binding 8 | // import { NativeScriptFormsModule } from "nativescript-angular/forms"; 9 | 10 | // Uncomment and add to NgModule imports if you need to use the HttpClient wrapper 11 | // import { NativeScriptHttpClientModule } from "nativescript-angular/http-client"; 12 | 13 | @NgModule({ 14 | bootstrap: [ 15 | AppComponent, 16 | ], 17 | imports: [ 18 | NativeScriptModule, 19 | AppRoutingModule, 20 | ModalModule, 21 | ], 22 | declarations: [ 23 | AppComponent, 24 | ], 25 | providers: [], 26 | schemas: [ 27 | NO_ERRORS_SCHEMA, 28 | ], 29 | }) 30 | /* 31 | Pass your application module to the bootstrapModule function located in main.ts to start your app 32 | */ 33 | export class AppModule { } 34 | -------------------------------------------------------------------------------- /demo-ng/src/app/modal/modal.component.css: -------------------------------------------------------------------------------- 1 | /* Add mobile styles for the component here. */ 2 | -------------------------------------------------------------------------------- /demo-ng/src/app/modal/modal.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /demo-ng/src/app/modal/modal.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from "@angular/core"; 2 | import { ModalDialogParams } from "@nativescript/angular"; 3 | 4 | @Component({ 5 | selector: "ns-modal", 6 | templateUrl: "./modal.component.html", 7 | styleUrls: ["./modal.component.css"], 8 | }) 9 | export class ModalComponent { 10 | 11 | bgColor; 12 | 13 | constructor(private params: ModalDialogParams) { 14 | this.bgColor = params.context.dim; 15 | } 16 | 17 | buttonTap() { 18 | this.params.closeCallback("Return response here"); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /demo-ng/src/app/modal/modal.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core"; 2 | import { NativeScriptCommonModule } from "@nativescript/angular"; 3 | import { ModalComponent } from "./modal.component"; 4 | 5 | @NgModule({ 6 | declarations: [ 7 | ModalComponent, 8 | ], 9 | exports: [ 10 | ModalComponent, 11 | ], 12 | entryComponents: [ 13 | ModalComponent, 14 | ], 15 | imports: [ 16 | NativeScriptCommonModule, 17 | ], 18 | schemas: [NO_ERRORS_SCHEMA], 19 | }) 20 | export class ModalModule { } 21 | -------------------------------------------------------------------------------- /demo-ng/src/main.ts: -------------------------------------------------------------------------------- 1 | // this import should be first in order to load some required settings (like globals and reflect-metadata) 2 | import { platformNativeScriptDynamic, registerElement } from "@nativescript/angular"; 3 | import { ModalStack, overrideModalViewMethod } from "nativescript-windowed-modal"; 4 | import { AppModule } from "./app/app.module"; 5 | 6 | overrideModalViewMethod(); 7 | registerElement("ModalStack", () => ModalStack as any); 8 | 9 | // A traditional NativeScript application starts by initializing global objects, 10 | // setting up global CSS rules, creating, and navigating to the main page. 11 | // Angular applications need to take care of their own initialization: 12 | // modules, components, directives, routes, DI providers. 13 | // A NativeScript Angular app needs to make both paradigms work together, 14 | // so we provide a wrapper platform object, platformNativeScriptDynamic, 15 | // that sets up a NativeScript application and can bootstrap the Angular framework. 16 | platformNativeScriptDynamic().bootstrapModule(AppModule); 17 | -------------------------------------------------------------------------------- /demo-ng/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "ESNext", 4 | "target": "es2015", 5 | "moduleResolution": "node", 6 | "experimentalDecorators": true, 7 | "emitDecoratorMetadata": true, 8 | "noEmitHelpers": true, 9 | "noEmitOnError": true, 10 | "skipLibCheck": true, 11 | "lib": [ 12 | "es2018", "es2017", "dom", "es6" 13 | ], 14 | "baseUrl": ".", 15 | "paths": { 16 | "~/*": [ 17 | "app/*" 18 | ] 19 | } 20 | }, 21 | "include": [ 22 | "src/tests/**/*.ts", 23 | "src/**/*.ios.ts", 24 | "src/**/*.android.ts", 25 | "../src" 26 | ], 27 | "files": [ 28 | "./references.d.ts", 29 | "./src/main.ts" 30 | ], 31 | "exclude": [ 32 | "node_modules", 33 | "platforms", 34 | "e2e" 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /demo-ng/tsfmt.json: -------------------------------------------------------------------------------- 1 | { 2 | "indentSize": 2, 3 | "tabSize": 2 4 | } 5 | -------------------------------------------------------------------------------- /demo-ng/webpack.config.js: -------------------------------------------------------------------------------- 1 | const { join, relative, resolve, sep, dirname } = require('path'); 2 | const fs = require('fs'); 3 | 4 | const webpack = require('webpack'); 5 | const nsWebpack = require('@nativescript/webpack'); 6 | const nativescriptTarget = require('@nativescript/webpack/nativescript-target'); 7 | const { 8 | nsSupportHmrNg 9 | } = require('@nativescript/webpack/transformers/ns-support-hmr-ng'); 10 | const { nsTransformNativeClassesNg } = require("@nativescript/webpack/transformers/ns-transform-native-classes-ng"); 11 | const { 12 | getMainModulePath 13 | } = require('@nativescript/webpack/utils/ast-utils'); 14 | const { getNoEmitOnErrorFromTSConfig, getCompilerOptionsFromTSConfig } = require("@nativescript/webpack/utils/tsconfig-utils"); 15 | const { CleanWebpackPlugin } = require('clean-webpack-plugin'); 16 | const CopyWebpackPlugin = require('copy-webpack-plugin'); 17 | const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer'); 18 | const { 19 | NativeScriptWorkerPlugin 20 | } = require('nativescript-worker-loader/NativeScriptWorkerPlugin'); 21 | const TerserPlugin = require('terser-webpack-plugin'); 22 | const { 23 | getAngularCompilerPlugin 24 | } = require('@nativescript/webpack/plugins/NativeScriptAngularCompilerPlugin'); 25 | const hashSalt = Date.now().toString(); 26 | 27 | module.exports = env => { 28 | // Add your custom Activities, Services and other Android app components here. 29 | const appComponents = [ 30 | "@nativescript/core/ui/frame", "@nativescript/core/ui/frame/activity" 31 | ]; 32 | 33 | const platform = env && ((env.android && 'android') || (env.ios && 'ios')); 34 | if (!platform) { 35 | throw new Error('You need to provide a target platform!'); 36 | } 37 | 38 | const AngularCompilerPlugin = getAngularCompilerPlugin(platform); 39 | const projectRoot = __dirname; 40 | 41 | // Default destination inside platforms//... 42 | const dist = resolve( 43 | projectRoot, 44 | nsWebpack.getAppPath(platform, projectRoot) 45 | ); 46 | 47 | const { 48 | // The 'appPath' and 'appResourcesPath' values are fetched from 49 | // the nsconfig.json configuration file 50 | // when bundling with `tns run android|ios --bundle`. 51 | appPath = 'src', 52 | appResourcesPath = 'App_Resources', 53 | 54 | // You can provide the following flags when running 'tns run android|ios' 55 | snapshot, // --env.snapshot, 56 | production, // --env.production 57 | uglify, // --env.uglify 58 | report, // --env.report 59 | sourceMap, // --env.sourceMap 60 | hiddenSourceMap, // --env.hiddenSourceMap 61 | hmr, // --env.hmr, 62 | unitTesting, // --env.unitTesting 63 | testing, // --env.testing 64 | verbose, // --env.verbose 65 | ci, // --env.ci 66 | snapshotInDocker, // --env.snapshotInDocker 67 | skipSnapshotTools, // --env.skipSnapshotTools 68 | compileSnapshot // --env.compileSnapshot 69 | } = env; 70 | 71 | const useLibs = compileSnapshot; 72 | const isAnySourceMapEnabled = !!sourceMap || !!hiddenSourceMap; 73 | const externals = nsWebpack.getConvertedExternals(env.externals); 74 | const appFullPath = resolve(projectRoot, appPath); 75 | const appResourcesFullPath = resolve(projectRoot, appResourcesPath); 76 | let tsConfigName = 'tsconfig.json'; 77 | let tsConfigTnsName = 'tsconfig.tns.json'; 78 | let tsConfigPath = resolve(projectRoot, tsConfigName); 79 | const tsConfigTnsPath = resolve(projectRoot, tsConfigTnsName); 80 | if (fs.existsSync(tsConfigTnsPath)) { 81 | // still support shared angular app configurations 82 | tsConfigName = tsConfigTnsName; 83 | tsConfigPath = tsConfigTnsPath; 84 | } 85 | const entryModule = `${nsWebpack.getEntryModule(appFullPath, platform)}.ts`; 86 | const entryPath = `.${sep}${entryModule}`; 87 | const entries = { bundle: entryPath }; 88 | const areCoreModulesExternal = 89 | Array.isArray(env.externals) && 90 | env.externals.some(e => e.indexOf('@nativescript') > -1); 91 | if (platform === 'ios' && !areCoreModulesExternal && !testing) { 92 | entries['tns_modules/@nativescript/core/inspector_modules'] = 93 | 'inspector_modules'; 94 | } 95 | 96 | const compilerOptions = getCompilerOptionsFromTSConfig(tsConfigPath); 97 | nsWebpack.processTsPathsForScopedModules({ compilerOptions }); 98 | nsWebpack.processTsPathsForScopedAngular({ compilerOptions }); 99 | 100 | const ngCompilerTransformers = [nsTransformNativeClassesNg]; 101 | const additionalLazyModuleResources = []; 102 | 103 | const copyIgnore = { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }; 104 | const copyTargets = [ 105 | { from: 'assets/**', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }, 106 | { from: 'fonts/**', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }, 107 | ]; 108 | 109 | if (!production) { 110 | // for development purposes only 111 | // for example, include mock json folder 112 | // copyTargets.push({ from: 'tools/mockdata', to: 'assets/mockdata' }); 113 | 114 | if (hmr) { 115 | ngCompilerTransformers.push(nsSupportHmrNg); 116 | } 117 | } 118 | 119 | // when "@angular/core" is external, it's not included in the bundles. In this way, it will be used 120 | // directly from node_modules and the Angular modules loader won't be able to resolve the lazy routes 121 | // fixes https://github.com/NativeScript/nativescript-cli/issues/4024 122 | if (env.externals && env.externals.indexOf('@angular/core') > -1) { 123 | const appModuleRelativePath = getMainModulePath( 124 | resolve(appFullPath, entryModule), 125 | tsConfigName 126 | ); 127 | if (appModuleRelativePath) { 128 | const appModuleFolderPath = dirname( 129 | resolve(appFullPath, appModuleRelativePath) 130 | ); 131 | // include the new lazy loader path in the allowed ones 132 | additionalLazyModuleResources.push(appModuleFolderPath); 133 | } 134 | } 135 | 136 | const ngCompilerPlugin = new AngularCompilerPlugin({ 137 | hostReplacementPaths: nsWebpack.getResolver([platform, 'tns']), 138 | platformTransformers: ngCompilerTransformers.map(t => 139 | t(() => ngCompilerPlugin, resolve(appFullPath, entryModule), projectRoot) 140 | ), 141 | mainPath: join(appFullPath, entryModule), 142 | tsConfigPath, 143 | skipCodeGeneration: false, 144 | sourceMap: !!isAnySourceMapEnabled, 145 | additionalLazyModuleResources: additionalLazyModuleResources, 146 | compilerOptions: { paths: compilerOptions.paths } 147 | }); 148 | 149 | let sourceMapFilename = nsWebpack.getSourceMapFilename( 150 | hiddenSourceMap, 151 | __dirname, 152 | dist 153 | ); 154 | 155 | const itemsToClean = [`${dist}/**/*`]; 156 | if (platform === 'android') { 157 | itemsToClean.push( 158 | `${join( 159 | projectRoot, 160 | 'platforms', 161 | 'android', 162 | 'app', 163 | 'src', 164 | 'main', 165 | 'assets', 166 | 'snapshots' 167 | )}` 168 | ); 169 | itemsToClean.push( 170 | `${join( 171 | projectRoot, 172 | 'platforms', 173 | 'android', 174 | 'app', 175 | 'build', 176 | 'configurations', 177 | 'nativescript-android-snapshot' 178 | )}` 179 | ); 180 | } 181 | 182 | const noEmitOnErrorFromTSConfig = getNoEmitOnErrorFromTSConfig(tsConfigName); 183 | 184 | nsWebpack.processAppComponents(appComponents, platform); 185 | const config = { 186 | mode: production ? 'production' : 'development', 187 | context: appFullPath, 188 | externals, 189 | watchOptions: { 190 | ignored: [ 191 | appResourcesFullPath, 192 | // Don't watch hidden files 193 | '**/.*' 194 | ] 195 | }, 196 | target: nativescriptTarget, 197 | entry: entries, 198 | output: { 199 | pathinfo: false, 200 | path: dist, 201 | sourceMapFilename, 202 | libraryTarget: 'commonjs2', 203 | filename: '[name].js', 204 | globalObject: 'global', 205 | hashSalt 206 | }, 207 | resolve: { 208 | extensions: ['.ts', '.js', '.scss', '.css'], 209 | // Resolve {N} system modules from @nativescript/core 210 | modules: [ 211 | resolve(__dirname, 'node_modules/@nativescript/core'), 212 | resolve(__dirname, 'node_modules'), 213 | 'node_modules/@nativescript/core', 214 | 'node_modules' 215 | ], 216 | alias: { 217 | '~/package.json': resolve(projectRoot, 'package.json'), 218 | '~': appFullPath, 219 | "tns-core-modules": "@nativescript/core", 220 | "nativescript-angular": "@nativescript/angular" 221 | }, 222 | symlinks: true 223 | }, 224 | resolveLoader: { 225 | symlinks: false 226 | }, 227 | node: { 228 | // Disable node shims that conflict with NativeScript 229 | http: false, 230 | timers: false, 231 | setImmediate: false, 232 | fs: 'empty', 233 | __dirname: false 234 | }, 235 | devtool: hiddenSourceMap 236 | ? 'hidden-source-map' 237 | : sourceMap 238 | ? 'inline-source-map' 239 | : 'none', 240 | optimization: { 241 | runtimeChunk: 'single', 242 | noEmitOnErrors: noEmitOnErrorFromTSConfig, 243 | splitChunks: { 244 | cacheGroups: { 245 | vendor: { 246 | name: 'vendor', 247 | chunks: 'all', 248 | test: (module, chunks) => { 249 | const moduleName = module.nameForCondition 250 | ? module.nameForCondition() 251 | : ''; 252 | return ( 253 | /[\\/]node_modules[\\/]/.test(moduleName) || 254 | appComponents.some(comp => comp === moduleName) 255 | ); 256 | }, 257 | enforce: true 258 | } 259 | } 260 | }, 261 | minimize: !!uglify, 262 | minimizer: [ 263 | new TerserPlugin({ 264 | parallel: true, 265 | cache: !ci, 266 | sourceMap: isAnySourceMapEnabled, 267 | terserOptions: { 268 | output: { 269 | comments: false, 270 | semicolons: !isAnySourceMapEnabled 271 | }, 272 | compress: { 273 | // The Android SBG has problems parsing the output 274 | // when these options are enabled 275 | collapse_vars: platform !== 'android', 276 | sequences: platform !== 'android', 277 | // custom 278 | drop_console: true, 279 | drop_debugger: true, 280 | ecma: 6, 281 | keep_infinity: platform === 'android', // for Chrome/V8 282 | reduce_funcs: platform !== 'android', // for Chrome/V8 283 | global_defs: { 284 | __UGLIFIED__: true 285 | } 286 | }, 287 | // custom 288 | ecma: 6, 289 | safari10: platform !== 'android' 290 | } 291 | }) 292 | ] 293 | }, 294 | module: { 295 | rules: [ 296 | { 297 | include: join(appFullPath, entryPath), 298 | use: [ 299 | // Require all Android app components 300 | platform === 'android' && { 301 | loader: '@nativescript/webpack/helpers/android-app-components-loader', 302 | options: { modules: appComponents } 303 | }, 304 | 305 | { 306 | loader: '@nativescript/webpack/bundle-config-loader', 307 | options: { 308 | angular: true, 309 | loadCss: !snapshot, // load the application css if in debug mode 310 | unitTesting, 311 | appFullPath, 312 | projectRoot, 313 | ignoredFiles: nsWebpack.getUserDefinedEntries(entries, platform) 314 | } 315 | } 316 | ].filter(loader => !!loader) 317 | }, 318 | 319 | { test: /\.html$|\.xml$/, use: 'raw-loader' }, 320 | 321 | { 322 | test: /[\/|\\]app\.css$/, 323 | use: [ 324 | '@nativescript/webpack/helpers/style-hot-loader', 325 | { 326 | loader: "@nativescript/webpack/helpers/css2json-loader", 327 | options: { useForImports: true } 328 | }, 329 | ], 330 | }, 331 | { 332 | test: /[\/|\\]app\.scss$/, 333 | use: [ 334 | '@nativescript/webpack/helpers/style-hot-loader', 335 | { 336 | loader: "@nativescript/webpack/helpers/css2json-loader", 337 | options: { useForImports: true } 338 | }, 339 | 'sass-loader', 340 | ], 341 | }, 342 | 343 | // Angular components reference css files and their imports using raw-loader 344 | { test: /\.css$/, exclude: /[\/|\\]app\.css$/, use: 'raw-loader' }, 345 | { 346 | test: /\.scss$/, 347 | exclude: /[\/|\\]app\.scss$/, 348 | use: ['raw-loader', 'resolve-url-loader', 'sass-loader'] 349 | }, 350 | 351 | { 352 | test: /(?:\.ngfactory\.js|\.ngstyle\.js|\.ts)$/, 353 | use: [ 354 | '@nativescript/webpack/helpers/moduleid-compat-loader', 355 | '@nativescript/webpack/helpers/lazy-ngmodule-hot-loader', 356 | '@ngtools/webpack' 357 | ] 358 | }, 359 | 360 | // Mark files inside `@angular/core` as using SystemJS style dynamic imports. 361 | // Removing this will cause deprecation warnings to appear. 362 | { 363 | test: /[\/\\]@angular[\/\\]core[\/\\].+\.js$/, 364 | parser: { system: true } 365 | } 366 | ] 367 | }, 368 | plugins: [ 369 | // Define useful constants like TNS_WEBPACK 370 | new webpack.DefinePlugin({ 371 | 'global.TNS_WEBPACK': 'true', 372 | 'global.isAndroid': platform === 'android', 373 | 'global.isIOS': platform === 'ios', 374 | process: 'global.process' 375 | }), 376 | // Remove all files from the out dir. 377 | new CleanWebpackPlugin({ 378 | cleanOnceBeforeBuildPatterns: itemsToClean, 379 | verbose: !!verbose 380 | }), 381 | // Copy assets 382 | new CopyWebpackPlugin({ 383 | patterns: copyTargets, 384 | }), 385 | new nsWebpack.GenerateNativeScriptEntryPointsPlugin('bundle'), 386 | // For instructions on how to set up workers with webpack 387 | // check out https://github.com/nativescript/worker-loader 388 | new NativeScriptWorkerPlugin(), 389 | ngCompilerPlugin, 390 | // Does IPC communication with the {N} CLI to notify events when running in watch mode. 391 | new nsWebpack.WatchStateLoggerPlugin() 392 | ] 393 | }; 394 | 395 | if (report) { 396 | // Generate report files for bundles content 397 | config.plugins.push( 398 | new BundleAnalyzerPlugin({ 399 | analyzerMode: 'static', 400 | openAnalyzer: false, 401 | generateStatsFile: true, 402 | reportFilename: resolve(projectRoot, 'report', `report.html`), 403 | statsFilename: resolve(projectRoot, 'report', `stats.json`) 404 | }) 405 | ); 406 | } 407 | 408 | if (snapshot) { 409 | config.plugins.push( 410 | new nsWebpack.NativeScriptSnapshotPlugin({ 411 | chunk: 'vendor', 412 | angular: true, 413 | requireModules: [ 414 | 'reflect-metadata', 415 | '@angular/platform-browser', 416 | '@angular/core', 417 | '@angular/common', 418 | '@angular/router', 419 | '@nativescript/angular' 420 | ], 421 | projectRoot, 422 | webpackConfig: config, 423 | snapshotInDocker, 424 | skipSnapshotTools, 425 | useLibs 426 | }) 427 | ); 428 | } 429 | 430 | if (!production && hmr) { 431 | config.plugins.push(new webpack.HotModuleReplacementPlugin()); 432 | } 433 | 434 | return config; 435 | }; 436 | -------------------------------------------------------------------------------- /demo/.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 | [*.ts] 14 | indent_style = space 15 | indent_size = 4 16 | -------------------------------------------------------------------------------- /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/src/main/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/src/main/res/drawable-hdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/values-v21/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3d5afe 4 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | 14 | 15 | 16 | 19 | 20 | 23 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #F5F5F5 4 | #757575 5 | #33B5E5 6 | #272734 7 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 18 | 19 | 21 | 22 | 23 | 31 | 32 | 34 | 35 | 36 | 42 | 43 | 45 | 46 | -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "29x29", 5 | "idiom" : "iphone", 6 | "filename" : "icon-29.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "29x29", 11 | "idiom" : "iphone", 12 | "filename" : "icon-29@2x.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "icon-29@3x.png", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "size" : "40x40", 23 | "idiom" : "iphone", 24 | "filename" : "icon-40@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "icon-40@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "57x57", 35 | "idiom" : "iphone", 36 | "filename" : "icon-57.png", 37 | "scale" : "1x" 38 | }, 39 | { 40 | "size" : "57x57", 41 | "idiom" : "iphone", 42 | "filename" : "icon-57@2x.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "icon-60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "icon-60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "29x29", 59 | "idiom" : "ipad", 60 | "filename" : "icon-29.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "29x29", 65 | "idiom" : "ipad", 66 | "filename" : "icon-29@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "40x40", 71 | "idiom" : "ipad", 72 | "filename" : "icon-40.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "40x40", 77 | "idiom" : "ipad", 78 | "filename" : "icon-40@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "50x50", 83 | "idiom" : "ipad", 84 | "filename" : "icon-50.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "50x50", 89 | "idiom" : "ipad", 90 | "filename" : "icon-50@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "72x72", 95 | "idiom" : "ipad", 96 | "filename" : "icon-72.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "72x72", 101 | "idiom" : "ipad", 102 | "filename" : "icon-72@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "76x76", 107 | "idiom" : "ipad", 108 | "filename" : "icon-76.png", 109 | "scale" : "1x" 110 | }, 111 | { 112 | "size" : "76x76", 113 | "idiom" : "ipad", 114 | "filename" : "icon-76@2x.png", 115 | "scale" : "2x" 116 | }, 117 | { 118 | "size" : "83.5x83.5", 119 | "idiom" : "ipad", 120 | "filename" : "icon-83.5@2x.png", 121 | "scale" : "2x" 122 | } 123 | ], 124 | "info" : { 125 | "version" : 1, 126 | "author" : "xcode" 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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 | } 7 | -------------------------------------------------------------------------------- /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 | } 159 | -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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 | } 23 | -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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 | } 23 | -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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/mukaschultze/nativescript-windowed-modal/509dbef8d6be99c329f7ba5ef41f6df2a50e5475/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 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 5 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 6 | -------------------------------------------------------------------------------- /demo/app/app.ts: -------------------------------------------------------------------------------- 1 | import { Application } from "@nativescript/core"; 2 | import { overrideModalViewMethod } from "nativescript-windowed-modal"; 3 | 4 | overrideModalViewMethod(); 5 | Application.run({ moduleName: "main-page" }); 6 | -------------------------------------------------------------------------------- /demo/app/main-page.ts: -------------------------------------------------------------------------------- 1 | import { EventData, Page } from "@nativescript/core"; 2 | import { ExtendedShowModalOptions } from "nativescript-windowed-modal/windowed-modal.common"; 3 | 4 | let mainPage: Page; 5 | 6 | export function pageLoaded(args: EventData) { 7 | mainPage = args.object as Page; 8 | } 9 | 10 | export function openModal1() { 11 | mainPage.showModal("./modal", { 12 | context: { 13 | message: "I'm the context", 14 | }, 15 | fullscreen: false, 16 | closeCallback: (response: string) => { 17 | // Response will be undefined if the modal was 18 | // closed by a touch outside of the frame 19 | console.log("Modal response: " + response); 20 | }, 21 | }); 22 | } 23 | 24 | export function openModal2() { 25 | mainPage.showModal("./modal", { 26 | context: { 27 | dim: "#00000000", 28 | message: "I'm the context", 29 | }, 30 | fullscreen: false, 31 | closeCallback: (response: string) => { 32 | // Response will be undefined if the modal was 33 | // closed by a touch outside of the frame 34 | console.log("Modal response: " + response); 35 | }, 36 | dimAmount: 0.05, 37 | } as ExtendedShowModalOptions); 38 | } 39 | 40 | export function openModal3() { 41 | mainPage.showModal("./modal", { 42 | context: { 43 | dim: "#5C00FFDD", 44 | message: "I'm the context", 45 | }, 46 | fullscreen: false, 47 | dimAmount: 0.1, 48 | closeCallback: (response: string) => { 49 | // Response will be undefined if the modal was 50 | // closed by a touch outside of the frame 51 | console.log("Modal response: " + response); 52 | }, 53 | } as ExtendedShowModalOptions); 54 | } 55 | 56 | export function openModal4() { 57 | mainPage.showModal("./modal", { 58 | context: { 59 | dim: "#FFFF0000", 60 | message: "I'm the context", 61 | }, 62 | fullscreen: false, 63 | closeCallback: (response: string) => { 64 | // Response will be undefined if the modal was 65 | // closed by a touch outside of the frame 66 | console.log("Modal response: " + response); 67 | }, 68 | }); 69 | } 70 | 71 | export function openModal5() { 72 | mainPage.showModal("./modal", { 73 | context: { 74 | dim: "#5C00FFDD", 75 | message: "I'm the context", 76 | }, 77 | fullscreen: true, 78 | closeCallback: (response: string) => { 79 | // Response will be undefined if the modal was 80 | // closed by a touch outside of the frame 81 | console.log("Modal response: " + response); 82 | }, 83 | }); 84 | } 85 | 86 | export function openModal6() { 87 | mainPage.showModal("./modal", { 88 | context: { 89 | message: "I'm the context", 90 | }, 91 | fullscreen: true, 92 | closeCallback: (response: string) => { 93 | // Response will be undefined if the modal was 94 | // closed by a touch outside of the frame 95 | console.log("Modal response: " + response); 96 | }, 97 | }); 98 | } 99 | -------------------------------------------------------------------------------- /demo/app/main-page.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 |