├── .gitignore ├── .travis.yml ├── .vscode ├── settings.json └── tasks.json ├── LICENSE ├── README.md ├── angular ├── index.ts └── masked-text-value-accessor.ts ├── demo-ng ├── .vscode │ ├── launch.json │ └── settings.json ├── app │ ├── App_Resources │ │ ├── Android │ │ │ ├── AndroidManifest.xml │ │ │ ├── app.gradle │ │ │ ├── drawable-hdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ ├── drawable-ldpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ ├── drawable-mdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ ├── drawable-nodpi │ │ │ │ └── splash_screen.xml │ │ │ ├── drawable-xhdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ ├── drawable-xxxhdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ ├── values-v21 │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ └── values │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ └── iOS │ │ │ ├── Assets.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── Contents.json │ │ │ │ ├── icon-29.png │ │ │ │ ├── icon-29@2x.png │ │ │ │ ├── icon-29@3x.png │ │ │ │ ├── icon-40.png │ │ │ │ ├── icon-40@2x.png │ │ │ │ ├── icon-40@3x.png │ │ │ │ ├── icon-50.png │ │ │ │ ├── icon-50@2x.png │ │ │ │ ├── icon-57.png │ │ │ │ ├── icon-57@2x.png │ │ │ │ ├── icon-60@2x.png │ │ │ │ ├── icon-60@3x.png │ │ │ │ ├── icon-72.png │ │ │ │ ├── icon-72@2x.png │ │ │ │ ├── icon-76.png │ │ │ │ ├── icon-76@2x.png │ │ │ │ └── icon-83.5@2x.png │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.launchimage │ │ │ │ ├── Contents.json │ │ │ │ ├── Default-568h@2x.png │ │ │ │ ├── Default-667h@2x.png │ │ │ │ ├── Default-736h@3x.png │ │ │ │ ├── Default-Landscape.png │ │ │ │ ├── Default-Landscape@2x.png │ │ │ │ ├── Default-Landscape@3x.png │ │ │ │ ├── Default-Portrait.png │ │ │ │ ├── Default-Portrait@2x.png │ │ │ │ ├── Default.png │ │ │ │ └── Default@2x.png │ │ │ ├── LaunchScreen.AspectFill.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── LaunchScreen-AspectFill.png │ │ │ │ └── LaunchScreen-AspectFill@2x.png │ │ │ └── LaunchScreen.Center.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── LaunchScreen-Center.png │ │ │ │ └── LaunchScreen-Center@2x.png │ │ │ ├── Info.plist │ │ │ ├── LaunchScreen.storyboard │ │ │ └── build.xcconfig │ ├── README.md │ ├── app.component.html │ ├── app.component.ts │ ├── app.css │ ├── app.module.ngfactory.d.ts │ ├── app.module.ts │ ├── app.routing.ts │ ├── main.aot.ts │ ├── main.ts │ ├── maskedtextfield │ │ ├── maskedtextfield.component.html │ │ └── maskedtextfield.component.ts │ ├── package.json │ ├── vendor-platform.android.ts │ ├── vendor-platform.ios.ts │ └── vendor.ts ├── package-lock.json ├── package.json ├── references.d.ts ├── tsconfig.json ├── tsconfig.tns.json └── webpack.config.js ├── demo ├── .vscode │ ├── launch.json │ └── settings.json ├── app │ ├── App_Resources │ │ ├── Android │ │ │ ├── AndroidManifest.xml │ │ │ ├── app.gradle │ │ │ ├── drawable-hdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ ├── drawable-ldpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ ├── drawable-mdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ ├── drawable-nodpi │ │ │ │ └── splash_screen.xml │ │ │ ├── drawable-xhdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ ├── drawable-xxxhdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ ├── values-v21 │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ └── values │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ └── iOS │ │ │ ├── Assets.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── Contents.json │ │ │ │ ├── icon-29.png │ │ │ │ ├── icon-29@2x.png │ │ │ │ ├── icon-29@3x.png │ │ │ │ ├── icon-40.png │ │ │ │ ├── icon-40@2x.png │ │ │ │ ├── icon-40@3x.png │ │ │ │ ├── icon-50.png │ │ │ │ ├── icon-50@2x.png │ │ │ │ ├── icon-57.png │ │ │ │ ├── icon-57@2x.png │ │ │ │ ├── icon-60@2x.png │ │ │ │ ├── icon-60@3x.png │ │ │ │ ├── icon-72.png │ │ │ │ ├── icon-72@2x.png │ │ │ │ ├── icon-76.png │ │ │ │ ├── icon-76@2x.png │ │ │ │ └── icon-83.5@2x.png │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.launchimage │ │ │ │ ├── Contents.json │ │ │ │ ├── Default-568h@2x.png │ │ │ │ ├── Default-667h@2x.png │ │ │ │ ├── Default-736h@3x.png │ │ │ │ ├── Default-Landscape.png │ │ │ │ ├── Default-Landscape@2x.png │ │ │ │ ├── Default-Landscape@3x.png │ │ │ │ ├── Default-Portrait.png │ │ │ │ ├── Default-Portrait@2x.png │ │ │ │ ├── Default.png │ │ │ │ └── Default@2x.png │ │ │ ├── LaunchScreen.AspectFill.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── LaunchScreen-AspectFill.png │ │ │ │ └── LaunchScreen-AspectFill@2x.png │ │ │ └── LaunchScreen.Center.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── LaunchScreen-Center.png │ │ │ │ └── LaunchScreen-Center@2x.png │ │ │ ├── Info.plist │ │ │ ├── LaunchScreen.storyboard │ │ │ └── build.xcconfig │ ├── README.md │ ├── app.css │ ├── app.ts │ ├── bundle-config.ts │ ├── main-page.ts │ ├── main-page.xml │ ├── package.json │ ├── vendor-platform.android.ts │ ├── vendor-platform.ios.ts │ └── vendor.ts ├── package-lock.json ├── package.json ├── references.d.ts ├── tsconfig.json ├── tsconfig.tns.json └── webpack.config.js ├── docs └── screenshot.jpg ├── gruntfile.js ├── masked-text-field-common.ts ├── masked-text-field.android.ts ├── masked-text-field.d.ts ├── masked-text-field.ios.ts ├── package-lock.json ├── package.json ├── references.d.ts ├── tsconfig.aot.json ├── tsconfig.json └── tslint.json /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear on external disk 35 | .Spotlight-V100 36 | .Trashes 37 | 38 | # Directories potentially created on remote AFP share 39 | .AppleDB 40 | .AppleDesktop 41 | Network Trash Folder 42 | Temporary Items 43 | .apdisk 44 | 45 | bin 46 | obj 47 | .vs 48 | .tscache 49 | *.user 50 | *.js 51 | *.map 52 | !gruntfile.js 53 | node_modules 54 | *.tmp.* 55 | demo/platforms 56 | demo/lib 57 | demo-ng/platforms 58 | demo-ng/lib 59 | !webpack.*.js 60 | report 61 | .tmp_backup -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | android: 4 | components: 5 | - tools 6 | - platform-tools 7 | - build-tools-28.0.3 8 | - android-28 9 | - extra-android-m2repository 10 | 11 | before_cache: 12 | - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock 13 | 14 | cache: 15 | directories: 16 | - .nvm 17 | - $HOME/.gradle/caches/ 18 | - $HOME/.gradle/wrapper/ 19 | 20 | install: 21 | - echo no | npm install -g nativescript 22 | - tns usage-reporting disable 23 | - tns error-reporting disable 24 | - echo no | npm install -g grunt-cli 25 | - npm install 26 | - grunt compile 27 | 28 | matrix: 29 | include: 30 | - stage: lint 31 | language: node_js 32 | os: linux 33 | node_js: "8" 34 | script: grunt lint 35 | 36 | # - stage: build 37 | # language: android 38 | # os: linux 39 | # env: 40 | # - Android="28" 41 | # jdk: oraclejdk8 42 | # before_install: nvm install 8.11.3 43 | # script: "grunt ci:build:android" 44 | 45 | # - stage: build 46 | # os: osx 47 | # env: 48 | # - iOS="10.3" 49 | # - Xcode="9.4" 50 | # osx_image: xcode9.4 51 | # language: node_js 52 | # node_js: "8" 53 | # jdk: oraclejdk8 54 | # before_install: 55 | # - pip install --upgrade pip 56 | # - pip install --user --upgrade matplotlib 57 | # - pip install six 58 | # script: "grunt ci:build:ios" 59 | 60 | # - stage: webpack 61 | # language: android 62 | # os: linux 63 | # env: 64 | # - Android="28" 65 | # - Platform="Android" 66 | # jdk: oraclejdk8 67 | # before_install: nvm install 8.11.3 68 | # script: "grunt ci:webpack:android" 69 | # 70 | # - stage: webpack 71 | # os: osx 72 | # env: 73 | # - iOS="10.3" 74 | # - Xcode="9.4" 75 | # - Platform="iOS" 76 | # osx_image: xcode9.4 77 | # language: node_js 78 | # node_js: "8" 79 | # jdk: oraclejdk8 80 | # before_install: 81 | # - pip install --upgrade pip 82 | # - pip install --user --upgrade matplotlib 83 | # - pip install six 84 | # script: "grunt ci:webpack:ios" 85 | 86 | - stage: deploy 87 | if: branch = release 88 | language: node_js 89 | node_js: "8" 90 | before_deploy: 91 | - cd bin/dist 92 | deploy: 93 | provider: npm 94 | email: "peter@tangrasoft.com" 95 | api_key: 96 | secure: "Q8m8195618Tp9YIzt6t/Yk2u0TARi4S4i2061JNkdzFg8D5Qnxj9Ea0Z6rXJeS3K248iLWBbvDww+tYKvpdySNZrCLSLIzbBlNpd9Tcg4gmaRDtG1M6WbGv9vQ3z4heSVSkCGmcIHWuBpO6cd3Tb7kYvm1RLDmL7SNbo5j8C12rLwcjORJdjh+kDhwRu4ZUguAJBJ7QVvlpIASL4KxuB4J/A3i4nsAe6RptaAw6MdwQyXDE+IyCPZh4aXshMkaOskdtDW7nzb6jbZIhhKOuBjUnF/Mhe3kFV8ohCozghnp8uIYPHC3MtrQ5mOGYbIs8SgYaItJq7llnRhQYLLCLMBJxwkFTOfMMKR/L2hmVhjeB2PVYdLUaUMjDSZBPjh0DG/s/jnpbZxwQCvpJzMhFHPWXNqA/PIeT+ZA5MoF/ofBB0TndxNFmB1Zn0krLwPkGUumaZiCogPVPktpJSZ1gKqtYercnt7oQmqsWntHH90Cl66F+3FxjEFVmZ9S5M143CmvTWaWlJJeqV6fcLY86mPPlpmtf3yCigtP4NWtbeVBD+FLInoX3bY0QmrXWB292uj7Oox1FBexICHp/EzPU8xBbo2JPV/73nW7Ppg8YKCFKVV33l+jiUnE3kMGqPqXjcY9vaoxhAjQDpbYxjiUMLln60pCbcWak8hksyrwcfNxI=" 97 | skip_cleanup: true 98 | on: 99 | branch: release 100 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings. 2 | { 3 | "files.exclude": { 4 | "**/.git": true, 5 | "**/.DS_Store": true, 6 | "demo": true, 7 | "demo-ng": true, 8 | "bin/**": true 9 | } 10 | , 11 | "typescript.tsdk": "./node_modules/typescript/lib" 12 | } -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See http://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "0.1.0", 5 | "command": "grunt", 6 | "isShellCommand": true, 7 | "args": ["--no-color"], 8 | "showOutput": "always", 9 | "tasks": [ 10 | { 11 | "taskName": "build", 12 | "args": [], 13 | "isBuildCommand": true, 14 | "problemMatcher": ["$tsc", { 15 | "base": "$tslint5", 16 | "fileLocation": "relative" 17 | }] 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /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 2017-2019 Tangra Inc. 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. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | **This repo only supports NativeScript pre-6.0. The latest version of the plugin supporting NS 6+ is availble as part of [ProPlugins](https://proplugins.org).** 2 | # NativeScript Masked Text Field widget 3 | [![Build Status](https://travis-ci.org/PeterStaev/nativescript-masked-text-field.svg?branch=master)](https://travis-ci.org/PeterStaev/nativescript-masked-text-field) 4 | [![npm downloads](https://img.shields.io/npm/dm/nativescript-masked-text-field.svg)](https://www.npmjs.com/package/nativescript-masked-text-field) 5 | [![npm downloads](https://img.shields.io/npm/dt/nativescript-masked-text-field.svg)](https://www.npmjs.com/package/nativescript-masked-text-field) 6 | [![npm](https://img.shields.io/npm/v/nativescript-masked-text-field.svg)](https://www.npmjs.com/package/nativescript-masked-text-field) 7 | 8 | A NativeScript Masked Text Field widget. The widget extends the default NativeScript TextField widget 9 | and adds ability to define masks for the input. 10 | 11 | ## Screenshot 12 | ![Screenshot of iOS and Android](https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/master/docs/screenshot.jpg) 13 | 14 | ## Installation 15 | Run the following command from the root of your project: 16 | 17 | `tns plugin add nativescript-masked-text-field` 18 | 19 | This command automatically installs the necessary files, as well as stores nativescript-masked-text-field as a dependency in your project's `package.json` file. 20 | 21 | ## Configuration 22 | There is no additional configuration needed! 23 | 24 | ## API 25 | NOTE: Since the widget extends the default TextFeild NatvieScript widget it has all the properties/events/methods of the TextField widget. The below-mentioned properties are in addition to the TextField ones 26 | 27 | ### Instance Properties 28 | * **mask** - *string* 29 | Gets or sets the mask for the text field. Possible tokens in the mask: 30 | * `0` - Digit 31 | * `9` - Digit or space 32 | * `#` - Digit or `+` or `-` 33 | * `L` - ASCII Letter 34 | * `?` - ASCII Letter or space 35 | * `&` - Non-whitepsace character 36 | * `C` - Any charcter 37 | * `A` - ASCII Letter or digit 38 | * `a` - ASCII Letter or digit or space 39 | 40 | If you want to escape any token character you can use `\` (for example `\9`) 41 | 42 | ## Usage 43 | You need to add `xmlns:mtf="nativescript-masked-text-field"` to your page tag, and then simply use `` in order to add the widget to your page. 44 | ```XML 45 | 46 | 47 | 48 | 49 | 50 | 51 | ``` 52 | 53 | ## Usage in Angular 54 | In order to be able to use the widget you just need to import `MaskedTextFieldModule` in `NgModule`: 55 | ```typescript 56 | import { MaskedTextFieldModule } from "nativescript-masked-text-field/angular"; 57 | // ...... 58 | @NgModule({ 59 | // ...... 60 | imports: [ 61 | // ...... 62 | MaskedTextFieldModule, 63 | // ...... 64 | ], 65 | // ...... 66 | }) 67 | ``` 68 | 69 | ##### Example Usage 70 | ```TypeScript 71 | // main.ts 72 | import { NgModule } from "@angular/core"; 73 | import { NativeScriptModule } from "nativescript-angular/nativescript.module"; 74 | import { platformNativeScriptDynamic } from "nativescript-angular/platform"; 75 | import { MaskedTextFieldModule } from "nativescript-masked-text-field/angular"; 76 | import { AppComponent } from "./app.component"; 77 | 78 | @NgModule({ 79 | declarations: [ AppComponent ], 80 | bootstrap: [ AppComponent ], 81 | imports: [ 82 | NativeScriptModule, 83 | MaskedTextFieldModule, 84 | ], 85 | }) 86 | class AppComponentModule { 87 | } 88 | 89 | platformNativeScriptDynamic().bootstrapModule(AppComponentModule); 90 | ``` 91 | 92 | ```HTML 93 | 94 | 95 | 96 | 97 | ``` 98 | 99 | ```TypeScript 100 | // app.component.ts 101 | import { Component } from "@angular/core"; 102 | 103 | @Component({ 104 | selector: "my-app", 105 | templateUrl:"app.component.html", 106 | }) 107 | export class AppComponent { 108 | public value = ""; 109 | } 110 | ``` 111 | 112 | ## Demos 113 | This repository includes both Angular and plain NativeScript demos. In order to run those execute the following in your shell: 114 | ```shell 115 | $ git clone https://github.com/peterstaev/nativescript-masked-text-field 116 | $ cd nativescript-masked-text-field 117 | $ npm install 118 | $ npm run demo-ios 119 | ``` 120 | This will run the plain NativeScript demo project on iOS. If you want to run it on Android simply use the `-android` instead of the `-ios` sufix. 121 | 122 | If you want to run the Angular demo simply use the `demo-ng-` prefix instead of `demo-`. 123 | 124 | ## Donate 125 | [![Donate](https://img.shields.io/badge/paypal-donate-brightgreen.svg)](https://bit.ly/2AS9QKB) 126 | 127 | `bitcoin:14fjysmpwLvSsAskvLASw6ek5XfhTzskHC` 128 | 129 | ![Donate](https://www.tangrainc.com/qr.png) 130 | -------------------------------------------------------------------------------- /angular/index.ts: -------------------------------------------------------------------------------- 1 | /*! ***************************************************************************** 2 | Copyright (c) 2019 Tangra Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ***************************************************************************** */ 16 | import { NgModule } from "@angular/core"; 17 | import { FormsModule } from "@angular/forms"; 18 | 19 | import { isKnownView, registerElement } from "nativescript-angular/element-registry"; 20 | import { NativeScriptFormsModule } from "nativescript-angular/forms"; 21 | 22 | import { MaskedTextValueAccessor } from "./masked-text-value-accessor"; 23 | 24 | if (!isKnownView("MaskedTextField")) { 25 | registerElement("MaskedTextField", () => require("../masked-text-field").MaskedTextField); 26 | } 27 | 28 | @NgModule({ 29 | declarations: [ 30 | MaskedTextValueAccessor 31 | ], 32 | providers: [], 33 | imports: [ 34 | FormsModule, 35 | NativeScriptFormsModule 36 | ], 37 | exports: [ 38 | FormsModule, 39 | MaskedTextValueAccessor 40 | ] 41 | }) 42 | export class MaskedTextFieldModule { 43 | } 44 | -------------------------------------------------------------------------------- /angular/masked-text-value-accessor.ts: -------------------------------------------------------------------------------- 1 | /*! ***************************************************************************** 2 | Copyright (c) 2019 Tangra Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ***************************************************************************** */ 16 | import { Directive, forwardRef } from "@angular/core"; 17 | import { NG_VALUE_ACCESSOR } from "@angular/forms"; 18 | 19 | import { TextValueAccessor } from "nativescript-angular/forms/value-accessors/text-value-accessor"; 20 | 21 | const MASKED_TEXT_VALUE_ACCESSOR = { 22 | provide: NG_VALUE_ACCESSOR, 23 | useExisting: forwardRef(() => MaskedTextValueAccessor), 24 | multi: true 25 | }; 26 | 27 | @Directive({ 28 | selector: 29 | "MaskedTextField[ngModel], MaskedTextField[formControlName], MaskedTextField[formControl]" + 30 | "maskedTextField[ngModel], maskedTextField[formControlName], maskedTextField[formControl]" + 31 | "masked-text-field[ngModel], masked-text-field[formControlName], masked-text-field[formControl]", 32 | providers: [MASKED_TEXT_VALUE_ACCESSOR], 33 | host: { 34 | "(blur)": "onTouched()", 35 | "(textChange)": "onChange($event.value)" 36 | } 37 | }) 38 | export class MaskedTextValueAccessor extends TextValueAccessor { 39 | // Empty as we will use the same logic as the TextValueAccessor 40 | } -------------------------------------------------------------------------------- /demo-ng/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "Launch on iOS", 6 | "type": "nativescript", 7 | "request": "launch", 8 | "platform": "ios", 9 | "appRoot": "${workspaceRoot}", 10 | "sourceMaps": true, 11 | "watch": true 12 | }, 13 | { 14 | "name": "Attach on iOS", 15 | "type": "nativescript", 16 | "request": "attach", 17 | "platform": "ios", 18 | "appRoot": "${workspaceRoot}", 19 | "sourceMaps": true, 20 | "watch": false 21 | }, 22 | { 23 | "name": "Launch on Android", 24 | "type": "nativescript", 25 | "request": "launch", 26 | "platform": "android", 27 | "appRoot": "${workspaceRoot}", 28 | "sourceMaps": true, 29 | "watch": true 30 | }, 31 | { 32 | "name": "Attach on Android", 33 | "type": "nativescript", 34 | "request": "attach", 35 | "platform": "android", 36 | "appRoot": "${workspaceRoot}", 37 | "sourceMaps": true, 38 | "watch": false 39 | } 40 | ] 41 | } -------------------------------------------------------------------------------- /demo-ng/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings. 2 | { 3 | "files.exclude": { 4 | "**/.git": true, 5 | "**/.DS_Store": true, 6 | "platforms": true, 7 | "app/**/*.js": true, 8 | "app/**/*.map": true 9 | } 10 | , 11 | "typescript.tsdk": "./node_modules/typescript/lib" 12 | } -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/Android/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 27 | 28 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /demo-ng/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 = "com.tangrainc.maskedtextfielddemong" 12 | } 13 | aaptOptions { 14 | additionalParameters "--no-version-vectors" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/Android/drawable-hdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/Android/drawable-hdpi/background.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/Android/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/Android/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/Android/drawable-hdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/Android/drawable-hdpi/logo.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/Android/drawable-ldpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/Android/drawable-ldpi/background.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/Android/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/Android/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/Android/drawable-ldpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/Android/drawable-ldpi/logo.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/Android/drawable-mdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/Android/drawable-mdpi/background.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/Android/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/Android/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/Android/drawable-mdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/Android/drawable-mdpi/logo.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/Android/drawable-nodpi/splash_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/Android/drawable-xhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/Android/drawable-xhdpi/background.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/Android/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/Android/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/Android/drawable-xhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/Android/drawable-xhdpi/logo.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/Android/drawable-xxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/Android/drawable-xxhdpi/background.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/Android/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/Android/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/Android/drawable-xxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/Android/drawable-xxhdpi/logo.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/Android/drawable-xxxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/Android/drawable-xxxhdpi/background.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/Android/drawable-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/Android/drawable-xxxhdpi/icon.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/Android/drawable-xxxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/Android/drawable-xxxhdpi/logo.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/Android/values-v21/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3d5afe 4 | -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/Android/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | 14 | 15 | 16 | 19 | 20 | 23 | -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/Android/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #F5F5F5 4 | #757575 5 | #33B5E5 6 | #272734 7 | -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/Android/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 18 | 19 | 21 | 22 | 23 | 31 | 32 | 34 | 35 | 36 | 42 | 43 | 45 | 46 | -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "29x29", 5 | "idiom" : "iphone", 6 | "filename" : "icon-29.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "29x29", 11 | "idiom" : "iphone", 12 | "filename" : "icon-29@2x.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "icon-29@3x.png", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "size" : "40x40", 23 | "idiom" : "iphone", 24 | "filename" : "icon-40@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "icon-40@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "57x57", 35 | "idiom" : "iphone", 36 | "filename" : "icon-57.png", 37 | "scale" : "1x" 38 | }, 39 | { 40 | "size" : "57x57", 41 | "idiom" : "iphone", 42 | "filename" : "icon-57@2x.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "icon-60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "icon-60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "29x29", 59 | "idiom" : "ipad", 60 | "filename" : "icon-29.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "29x29", 65 | "idiom" : "ipad", 66 | "filename" : "icon-29@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "40x40", 71 | "idiom" : "ipad", 72 | "filename" : "icon-40.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "40x40", 77 | "idiom" : "ipad", 78 | "filename" : "icon-40@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "50x50", 83 | "idiom" : "ipad", 84 | "filename" : "icon-50.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "50x50", 89 | "idiom" : "ipad", 90 | "filename" : "icon-50@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "72x72", 95 | "idiom" : "ipad", 96 | "filename" : "icon-72.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "72x72", 101 | "idiom" : "ipad", 102 | "filename" : "icon-72@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "76x76", 107 | "idiom" : "ipad", 108 | "filename" : "icon-76.png", 109 | "scale" : "1x" 110 | }, 111 | { 112 | "size" : "76x76", 113 | "idiom" : "ipad", 114 | "filename" : "icon-76@2x.png", 115 | "scale" : "2x" 116 | }, 117 | { 118 | "size" : "83.5x83.5", 119 | "idiom" : "ipad", 120 | "filename" : "icon-83.5@2x.png", 121 | "scale" : "2x" 122 | } 123 | ], 124 | "info" : { 125 | "version" : 1, 126 | "author" : "xcode" 127 | } 128 | } -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "extent" : "full-screen", 5 | "idiom" : "iphone", 6 | "subtype" : "736h", 7 | "filename" : "Default-736h@3x.png", 8 | "minimum-system-version" : "8.0", 9 | "orientation" : "portrait", 10 | "scale" : "3x" 11 | }, 12 | { 13 | "extent" : "full-screen", 14 | "idiom" : "iphone", 15 | "subtype" : "736h", 16 | "filename" : "Default-Landscape@3x.png", 17 | "minimum-system-version" : "8.0", 18 | "orientation" : "landscape", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "extent" : "full-screen", 23 | "idiom" : "iphone", 24 | "subtype" : "667h", 25 | "filename" : "Default-667h@2x.png", 26 | "minimum-system-version" : "8.0", 27 | "orientation" : "portrait", 28 | "scale" : "2x" 29 | }, 30 | { 31 | "orientation" : "portrait", 32 | "idiom" : "iphone", 33 | "filename" : "Default@2x.png", 34 | "extent" : "full-screen", 35 | "minimum-system-version" : "7.0", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "extent" : "full-screen", 40 | "idiom" : "iphone", 41 | "subtype" : "retina4", 42 | "filename" : "Default-568h@2x.png", 43 | "minimum-system-version" : "7.0", 44 | "orientation" : "portrait", 45 | "scale" : "2x" 46 | }, 47 | { 48 | "orientation" : "portrait", 49 | "idiom" : "ipad", 50 | "filename" : "Default-Portrait.png", 51 | "extent" : "full-screen", 52 | "minimum-system-version" : "7.0", 53 | "scale" : "1x" 54 | }, 55 | { 56 | "orientation" : "landscape", 57 | "idiom" : "ipad", 58 | "filename" : "Default-Landscape.png", 59 | "extent" : "full-screen", 60 | "minimum-system-version" : "7.0", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "orientation" : "portrait", 65 | "idiom" : "ipad", 66 | "filename" : "Default-Portrait@2x.png", 67 | "extent" : "full-screen", 68 | "minimum-system-version" : "7.0", 69 | "scale" : "2x" 70 | }, 71 | { 72 | "orientation" : "landscape", 73 | "idiom" : "ipad", 74 | "filename" : "Default-Landscape@2x.png", 75 | "extent" : "full-screen", 76 | "minimum-system-version" : "7.0", 77 | "scale" : "2x" 78 | }, 79 | { 80 | "orientation" : "portrait", 81 | "idiom" : "iphone", 82 | "filename" : "Default.png", 83 | "extent" : "full-screen", 84 | "scale" : "1x" 85 | }, 86 | { 87 | "orientation" : "portrait", 88 | "idiom" : "iphone", 89 | "filename" : "Default@2x.png", 90 | "extent" : "full-screen", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "orientation" : "portrait", 95 | "idiom" : "iphone", 96 | "filename" : "Default-568h@2x.png", 97 | "extent" : "full-screen", 98 | "subtype" : "retina4", 99 | "scale" : "2x" 100 | }, 101 | { 102 | "orientation" : "portrait", 103 | "idiom" : "ipad", 104 | "extent" : "to-status-bar", 105 | "scale" : "1x" 106 | }, 107 | { 108 | "orientation" : "portrait", 109 | "idiom" : "ipad", 110 | "filename" : "Default-Portrait.png", 111 | "extent" : "full-screen", 112 | "scale" : "1x" 113 | }, 114 | { 115 | "orientation" : "landscape", 116 | "idiom" : "ipad", 117 | "extent" : "to-status-bar", 118 | "scale" : "1x" 119 | }, 120 | { 121 | "orientation" : "landscape", 122 | "idiom" : "ipad", 123 | "filename" : "Default-Landscape.png", 124 | "extent" : "full-screen", 125 | "scale" : "1x" 126 | }, 127 | { 128 | "orientation" : "portrait", 129 | "idiom" : "ipad", 130 | "extent" : "to-status-bar", 131 | "scale" : "2x" 132 | }, 133 | { 134 | "orientation" : "portrait", 135 | "idiom" : "ipad", 136 | "filename" : "Default-Portrait@2x.png", 137 | "extent" : "full-screen", 138 | "scale" : "2x" 139 | }, 140 | { 141 | "orientation" : "landscape", 142 | "idiom" : "ipad", 143 | "extent" : "to-status-bar", 144 | "scale" : "2x" 145 | }, 146 | { 147 | "orientation" : "landscape", 148 | "idiom" : "ipad", 149 | "filename" : "Default-Landscape@2x.png", 150 | "extent" : "full-screen", 151 | "scale" : "2x" 152 | } 153 | ], 154 | "info" : { 155 | "version" : 1, 156 | "author" : "xcode" 157 | } 158 | } -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-AspectFill.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-AspectFill@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-Center.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-Center@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png -------------------------------------------------------------------------------- /demo-ng/app/App_Resources/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | Masked NG 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/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-ng/app/App_Resources/iOS/build.xcconfig: -------------------------------------------------------------------------------- 1 | // You can add custom settings here 2 | // for example you can uncomment the following line to force distribution code signing 3 | // CODE_SIGN_IDENTITY = iPhone Distribution 4 | // To build for device with XCode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html 5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID; 6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 7 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 8 | -------------------------------------------------------------------------------- /demo-ng/app/README.md: -------------------------------------------------------------------------------- 1 | # NativeScript Angular Template 2 | 3 | This template creates a "Hello, world" NativeScript app using TypeScript and Angular. 4 | 5 | You can create a new app that uses this template with either the `--template` option. 6 | 7 | ``` 8 | tns create my-app-name --template tns-template-hello-world-ng 9 | ``` 10 | 11 | Or the `--ng` shorthand. 12 | 13 | ``` 14 | tns create my-app-name --ng 15 | ``` 16 | 17 | > Note: Both commands will create a new NativeScript app that uses the latest version of this template published to [npm] (https://www.npmjs.com/package/tns-template-hello-world-ng). 18 | 19 | If you want to create a new app that uses the source of the template from the `master` branch, you can execute the following: 20 | 21 | ``` 22 | tns create my-app-name --template https://github.com/NativeScript/template-hello-world-ng.git#master 23 | ``` 24 | 25 | **NB:** Please, have in mind that the master branch may refer to dependencies that are not on NPM yet! 26 | -------------------------------------------------------------------------------- /demo-ng/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /demo-ng/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from "@angular/core"; 2 | 3 | @Component({ 4 | selector: "ns-app", 5 | templateUrl: "app.component.html", 6 | }) 7 | export class AppComponent { } 8 | -------------------------------------------------------------------------------- /demo-ng/app/app.css: -------------------------------------------------------------------------------- 1 | /* 2 | In NativeScript, the app.css file is where you place CSS rules that 3 | you would like to apply to your entire application. Check out 4 | http://docs.nativescript.org/ui/styling for a full list of the CSS 5 | selectors and properties you can use to style UI components. 6 | 7 | /* 8 | In many cases you may want to use the NativeScript core theme instead 9 | of writing your own CSS rules. For a full list of class names in the theme 10 | refer to http://docs.nativescript.org/ui/theme. 11 | */ 12 | @import '~nativescript-theme-core/css/core.light.css'; 13 | -------------------------------------------------------------------------------- /demo-ng/app/app.module.ngfactory.d.ts: -------------------------------------------------------------------------------- 1 | export const AppModuleNgFactory: any; -------------------------------------------------------------------------------- /demo-ng/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core"; 2 | import { NativeScriptModule } from "nativescript-angular/nativescript.module"; 3 | import { MaskedTextFieldModule } from "nativescript-masked-text-field/angular"; 4 | 5 | import { AppRoutingModule } from "./app.routing"; 6 | import { AppComponent } from "./app.component"; 7 | 8 | import { MaskedTextFieldComponent } from "./maskedtextfield/maskedtextfield.component"; 9 | 10 | @NgModule({ 11 | bootstrap: [ 12 | AppComponent 13 | ], 14 | imports: [ 15 | NativeScriptModule, 16 | MaskedTextFieldModule, 17 | AppRoutingModule 18 | ], 19 | declarations: [ 20 | AppComponent, 21 | MaskedTextFieldComponent, 22 | ], 23 | schemas: [ 24 | NO_ERRORS_SCHEMA 25 | ] 26 | }) 27 | export class AppModule { } 28 | -------------------------------------------------------------------------------- /demo-ng/app/app.routing.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from "@angular/core"; 2 | import { NativeScriptRouterModule } from "nativescript-angular/router"; 3 | import { Routes } from "@angular/router"; 4 | 5 | import { MaskedTextFieldComponent } from "./maskedtextfield/maskedtextfield.component"; 6 | 7 | const routes: Routes = [ 8 | { path: "", redirectTo: "/demo", pathMatch: "full" }, 9 | { path: "demo", component: MaskedTextFieldComponent }, 10 | ]; 11 | 12 | @NgModule({ 13 | imports: [NativeScriptRouterModule.forRoot(routes)], 14 | exports: [NativeScriptRouterModule] 15 | }) 16 | export class AppRoutingModule { } -------------------------------------------------------------------------------- /demo-ng/app/main.aot.ts: -------------------------------------------------------------------------------- 1 | // this import should be first in order to load some required settings (like globals and reflect-metadata) 2 | import { platformNativeScript } from "nativescript-angular/platform-static"; 3 | 4 | import { AppModuleNgFactory } from "./app.module.ngfactory"; 5 | 6 | platformNativeScript().bootstrapModuleFactory(AppModuleNgFactory); 7 | -------------------------------------------------------------------------------- /demo-ng/app/main.ts: -------------------------------------------------------------------------------- 1 | // this import should be first in order to load some required settings (like globals and reflect-metadata) 2 | import { platformNativeScriptDynamic } from "nativescript-angular/platform"; 3 | // import { registerElement } from "nativescript-angular/element-registry"; 4 | 5 | // registerElement("MaskedTextField", () => require("nativescript-masked-text-field/masked-text-field").MaskedTextField); 6 | 7 | import { AppModule } from "./app.module"; 8 | 9 | platformNativeScriptDynamic().bootstrapModule(AppModule); 10 | -------------------------------------------------------------------------------- /demo-ng/app/maskedtextfield/maskedtextfield.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /demo-ng/app/maskedtextfield/maskedtextfield.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from "@angular/core"; 2 | import * as dialogs from "ui/dialogs"; 3 | 4 | @Component({ 5 | selector: "mtf", 6 | moduleId: module.id, 7 | templateUrl: "./maskedtextfield.component.html" 8 | }) 9 | export class MaskedTextFieldComponent { 10 | public value: string = null; 11 | } 12 | -------------------------------------------------------------------------------- /demo-ng/app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "android": { 3 | "v8Flags": "--expose_gc" 4 | }, 5 | "main": "main.js", 6 | "name": "tns-template-hello-world-ng", 7 | "version": "3.0.0" 8 | } -------------------------------------------------------------------------------- /demo-ng/app/vendor-platform.android.ts: -------------------------------------------------------------------------------- 1 | require("application"); 2 | if (!global["__snapshot"]) { 3 | // In case snapshot generation is enabled these modules will get into the bundle 4 | // but will not be required/evaluated. 5 | // The snapshot webpack plugin will add them to the tns-java-classes.js bundle file. 6 | // This way, they will be evaluated on app start as early as possible. 7 | require("ui/frame"); 8 | require("ui/frame/activity"); 9 | } 10 | -------------------------------------------------------------------------------- /demo-ng/app/vendor-platform.ios.ts: -------------------------------------------------------------------------------- 1 | // There is a bug in angular: https://github.com/angular/angular-cli/pull/8589/files 2 | // Legendary stuff, its webpack plugin pretty much doesn't work with empty TypeScript files in v1.8.3 3 | void 0; 4 | -------------------------------------------------------------------------------- /demo-ng/app/vendor.ts: -------------------------------------------------------------------------------- 1 | // Snapshot the ~/app.css and the theme 2 | const application = require("application"); 3 | require("ui/styling/style-scope"); 4 | const appCssContext = require.context("~/", false, /^\.\/app\.(css|scss|less|sass)$/); 5 | global.registerWebpackModules(appCssContext); 6 | application.loadAppCss(); 7 | 8 | require("./vendor-platform"); 9 | 10 | require("reflect-metadata"); 11 | require("@angular/platform-browser"); 12 | require("@angular/core"); 13 | require("@angular/common"); 14 | require("@angular/forms"); 15 | require("@angular/http"); 16 | require("@angular/router"); 17 | 18 | require("nativescript-angular/platform-static"); 19 | require("nativescript-angular/forms"); 20 | require("nativescript-angular/router"); 21 | -------------------------------------------------------------------------------- /demo-ng/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "NativeScript Application", 3 | "license": "SEE LICENSE IN ", 4 | "readme": "NativeScript Application", 5 | "repository": "", 6 | "nativescript": { 7 | "id": "com.tangrainc.maskedtextfielddemong", 8 | "tns-ios": { 9 | "version": "5.0.0" 10 | }, 11 | "tns-android": { 12 | "version": "5.0.0" 13 | } 14 | }, 15 | "dependencies": { 16 | "@angular/animations": "~7.0.0", 17 | "@angular/common": "~7.0.0", 18 | "@angular/compiler": "~7.0.0", 19 | "@angular/core": "~7.0.0", 20 | "@angular/forms": "~7.0.0", 21 | "@angular/http": "~7.0.0", 22 | "@angular/platform-browser": "~7.0.0", 23 | "@angular/platform-browser-dynamic": "~7.0.0", 24 | "@angular/router": "~7.0.0", 25 | "nativescript-angular": "^7.0.3", 26 | "nativescript-masked-text-field": "file:../bin/dist", 27 | "nativescript-theme-core": "^1.0.4", 28 | "reflect-metadata": "~0.1.8", 29 | "rxjs": "^6.3.3", 30 | "tns-core-modules": "^5.0.5", 31 | "zone.js": "^0.8.26" 32 | }, 33 | "devDependencies": { 34 | "@angular/compiler-cli": "~7.0.0", 35 | "@ngtools/webpack": "~7.0.0", 36 | "babel-traverse": "6.24.1", 37 | "babel-types": "6.24.1", 38 | "babylon": "6.17.0", 39 | "lazy": "1.0.11", 40 | "nativescript-css-loader": "~0.26.0", 41 | "nativescript-dev-typescript": "^0.7.8", 42 | "nativescript-dev-webpack": "^0.18.2", 43 | "typescript": "~3.1.1" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /demo-ng/references.d.ts: -------------------------------------------------------------------------------- 1 | /// Needed for autocompletion and compilation. -------------------------------------------------------------------------------- /demo-ng/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es5", 5 | "experimentalDecorators": true, 6 | "emitDecoratorMetadata": true, 7 | "noEmitHelpers": true, 8 | "noEmitOnError": true, 9 | "lib": [ 10 | "es6", 11 | "dom", 12 | "es2015.iterable" 13 | ], 14 | "baseUrl": ".", 15 | "paths": { 16 | "*": [ 17 | "./node_modules/tns-core-modules/*", 18 | "./node_modules/*" 19 | ], 20 | "~/*": [ 21 | "app/*" 22 | ] 23 | } 24 | }, 25 | "exclude": [ 26 | "node_modules", 27 | "platforms" 28 | ] 29 | } -------------------------------------------------------------------------------- /demo-ng/tsconfig.tns.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig", 3 | "compilerOptions": { 4 | "module": "es2015", 5 | "moduleResolution": "node" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /demo-ng/webpack.config.js: -------------------------------------------------------------------------------- 1 | const { join, relative, resolve, sep } = require("path"); 2 | 3 | const webpack = require("webpack"); 4 | const nsWebpack = require("nativescript-dev-webpack"); 5 | const nativescriptTarget = require("nativescript-dev-webpack/nativescript-target"); 6 | const { nsReplaceBootstrap } = require("nativescript-dev-webpack/transformers/ns-replace-bootstrap"); 7 | const CleanWebpackPlugin = require("clean-webpack-plugin"); 8 | const CopyWebpackPlugin = require("copy-webpack-plugin"); 9 | const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer"); 10 | const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin"); 11 | const UglifyJsPlugin = require("uglifyjs-webpack-plugin"); 12 | const { AngularCompilerPlugin } = require("@ngtools/webpack"); 13 | 14 | module.exports = env => { 15 | // Add your custom Activities, Services and other Android app components here. 16 | const appComponents = [ 17 | "tns-core-modules/ui/frame", 18 | "tns-core-modules/ui/frame/activity", 19 | ]; 20 | 21 | const platform = env && (env.android && "android" || env.ios && "ios"); 22 | if (!platform) { 23 | throw new Error("You need to provide a target platform!"); 24 | } 25 | 26 | const projectRoot = __dirname; 27 | 28 | // Default destination inside platforms//... 29 | const dist = resolve(projectRoot, nsWebpack.getAppPath(platform, projectRoot)); 30 | const appResourcesPlatformDir = platform === "android" ? "Android" : "iOS"; 31 | 32 | const { 33 | // The 'appPath' and 'appResourcesPath' values are fetched from 34 | // the nsconfig.json configuration file 35 | // when bundling with `tns run android|ios --bundle`. 36 | appPath = "app", 37 | appResourcesPath = "app/App_Resources", 38 | 39 | // You can provide the following flags when running 'tns run android|ios' 40 | aot, // --env.aot 41 | snapshot, // --env.snapshot 42 | uglify, // --env.uglify 43 | report, // --env.report 44 | sourceMap, // --env.sourceMap 45 | hmr, // --env.hmr, 46 | } = env; 47 | const externals = (env.externals || []).map((e) => { // --env.externals 48 | return new RegExp(e + ".*"); 49 | }); 50 | 51 | const appFullPath = resolve(projectRoot, appPath); 52 | const appResourcesFullPath = resolve(projectRoot, appResourcesPath); 53 | 54 | const entryModule = `${nsWebpack.getEntryModule(appFullPath)}.ts`; 55 | const entryPath = `.${sep}${entryModule}`; 56 | 57 | const ngCompilerPlugin = new AngularCompilerPlugin({ 58 | hostReplacementPaths: nsWebpack.getResolver([platform, "tns"]), 59 | platformTransformers: aot ? [nsReplaceBootstrap(() => ngCompilerPlugin)] : null, 60 | mainPath: resolve(appPath, entryModule), 61 | tsConfigPath: join(__dirname, "tsconfig.tns.json"), 62 | skipCodeGeneration: !aot, 63 | sourceMap: !!sourceMap, 64 | }); 65 | 66 | const config = { 67 | mode: uglify ? "production" : "development", 68 | context: appFullPath, 69 | externals, 70 | watchOptions: { 71 | ignored: [ 72 | appResourcesFullPath, 73 | // Don't watch hidden files 74 | "**/.*", 75 | ] 76 | }, 77 | target: nativescriptTarget, 78 | entry: { 79 | bundle: entryPath, 80 | }, 81 | output: { 82 | pathinfo: false, 83 | path: dist, 84 | libraryTarget: "commonjs2", 85 | filename: "[name].js", 86 | globalObject: "global", 87 | }, 88 | resolve: { 89 | extensions: [".ts", ".js", ".scss", ".css"], 90 | // Resolve {N} system modules from tns-core-modules 91 | modules: [ 92 | resolve(__dirname, "node_modules/tns-core-modules"), 93 | resolve(__dirname, "node_modules"), 94 | "node_modules/tns-core-modules", 95 | "node_modules", 96 | ], 97 | alias: { 98 | '~': appFullPath 99 | }, 100 | symlinks: true 101 | }, 102 | resolveLoader: { 103 | symlinks: false 104 | }, 105 | node: { 106 | // Disable node shims that conflict with NativeScript 107 | "http": false, 108 | "timers": false, 109 | "setImmediate": false, 110 | "fs": "empty", 111 | "__dirname": false, 112 | }, 113 | devtool: sourceMap ? "inline-source-map" : "none", 114 | optimization: { 115 | splitChunks: { 116 | cacheGroups: { 117 | vendor: { 118 | name: "vendor", 119 | chunks: "all", 120 | test: (module, chunks) => { 121 | const moduleName = module.nameForCondition ? module.nameForCondition() : ''; 122 | return /[\\/]node_modules[\\/]/.test(moduleName) || 123 | appComponents.some(comp => comp === moduleName); 124 | }, 125 | enforce: true, 126 | }, 127 | } 128 | }, 129 | minimize: !!uglify, 130 | minimizer: [ 131 | new UglifyJsPlugin({ 132 | parallel: true, 133 | cache: true, 134 | uglifyOptions: { 135 | output: { 136 | comments: false, 137 | }, 138 | compress: { 139 | // The Android SBG has problems parsing the output 140 | // when these options are enabled 141 | 'collapse_vars': platform !== "android", 142 | sequences: platform !== "android", 143 | } 144 | } 145 | }) 146 | ], 147 | }, 148 | module: { 149 | rules: [ 150 | { 151 | test: new RegExp(entryPath), 152 | use: [ 153 | // Require all Android app components 154 | platform === "android" && { 155 | loader: "nativescript-dev-webpack/android-app-components-loader", 156 | options: { modules: appComponents } 157 | }, 158 | 159 | { 160 | loader: "nativescript-dev-webpack/bundle-config-loader", 161 | options: { 162 | angular: true, 163 | loadCss: !snapshot, // load the application css if in debug mode 164 | } 165 | }, 166 | ].filter(loader => !!loader) 167 | }, 168 | 169 | { test: /\.html$|\.xml$/, use: "raw-loader" }, 170 | 171 | // tns-core-modules reads the app.css and its imports using css-loader 172 | { 173 | test: /[\/|\\]app\.css$/, 174 | use: { 175 | loader: "css-loader", 176 | options: { minimize: false, url: false }, 177 | } 178 | }, 179 | { 180 | test: /[\/|\\]app\.scss$/, 181 | use: [ 182 | { loader: "css-loader", options: { minimize: false, url: false } }, 183 | "sass-loader" 184 | ] 185 | }, 186 | 187 | // Angular components reference css files and their imports using raw-loader 188 | { test: /\.css$/, exclude: /[\/|\\]app\.css$/, use: "raw-loader" }, 189 | { test: /\.scss$/, exclude: /[\/|\\]app\.scss$/, use: ["raw-loader", "resolve-url-loader", "sass-loader"] }, 190 | 191 | { 192 | test: /(?:\.ngfactory\.js|\.ngstyle\.js|\.ts)$/, 193 | use: [ 194 | "nativescript-dev-webpack/moduleid-compat-loader", 195 | "@ngtools/webpack", 196 | ] 197 | }, 198 | 199 | // Mark files inside `@angular/core` as using SystemJS style dynamic imports. 200 | // Removing this will cause deprecation warnings to appear. 201 | { 202 | test: /[\/\\]@angular[\/\\]core[\/\\].+\.js$/, 203 | parser: { system: true }, 204 | }, 205 | ], 206 | }, 207 | plugins: [ 208 | // Define useful constants like TNS_WEBPACK 209 | new webpack.DefinePlugin({ 210 | "global.TNS_WEBPACK": "true", 211 | "process": undefined, 212 | }), 213 | // Remove all files from the out dir. 214 | new CleanWebpackPlugin([`${dist}/**/*`]), 215 | // Copy native app resources to out dir. 216 | new CopyWebpackPlugin([ 217 | { 218 | from: `${appResourcesFullPath}/${appResourcesPlatformDir}`, 219 | to: `${dist}/App_Resources/${appResourcesPlatformDir}`, 220 | context: projectRoot 221 | }, 222 | ]), 223 | // Copy assets to out dir. Add your own globs as needed. 224 | new CopyWebpackPlugin([ 225 | { from: { glob: "fonts/**" } }, 226 | { from: { glob: "**/*.jpg" } }, 227 | { from: { glob: "**/*.png" } }, 228 | ], { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }), 229 | // Generate a bundle starter script and activate it in package.json 230 | new nsWebpack.GenerateBundleStarterPlugin([ 231 | "./vendor", 232 | "./bundle", 233 | ]), 234 | // For instructions on how to set up workers with webpack 235 | // check out https://github.com/nativescript/worker-loader 236 | new NativeScriptWorkerPlugin(), 237 | ngCompilerPlugin, 238 | // Does IPC communication with the {N} CLI to notify events when running in watch mode. 239 | new nsWebpack.WatchStateLoggerPlugin(), 240 | ], 241 | }; 242 | 243 | 244 | if (report) { 245 | // Generate report files for bundles content 246 | config.plugins.push(new BundleAnalyzerPlugin({ 247 | analyzerMode: "static", 248 | openAnalyzer: false, 249 | generateStatsFile: true, 250 | reportFilename: resolve(projectRoot, "report", `report.html`), 251 | statsFilename: resolve(projectRoot, "report", `stats.json`), 252 | })); 253 | } 254 | 255 | if (snapshot) { 256 | config.plugins.push(new nsWebpack.NativeScriptSnapshotPlugin({ 257 | chunk: "vendor", 258 | angular: true, 259 | requireModules: [ 260 | "reflect-metadata", 261 | "@angular/platform-browser", 262 | "@angular/core", 263 | "@angular/common", 264 | "@angular/router", 265 | "nativescript-angular/platform-static", 266 | "nativescript-angular/router", 267 | ], 268 | projectRoot, 269 | webpackConfig: config, 270 | })); 271 | } 272 | 273 | if (hmr) { 274 | config.plugins.push(new webpack.HotModuleReplacementPlugin()); 275 | } 276 | 277 | return config; 278 | }; 279 | -------------------------------------------------------------------------------- /demo/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "Launch on iOS", 6 | "type": "nativescript", 7 | "request": "launch", 8 | "platform": "ios", 9 | "appRoot": "${workspaceRoot}", 10 | "sourceMaps": true, 11 | "watch": true 12 | }, 13 | { 14 | "name": "Attach on iOS", 15 | "type": "nativescript", 16 | "request": "attach", 17 | "platform": "ios", 18 | "appRoot": "${workspaceRoot}", 19 | "sourceMaps": true, 20 | "watch": false 21 | }, 22 | { 23 | "name": "Launch on Android", 24 | "type": "nativescript", 25 | "request": "launch", 26 | "platform": "android", 27 | "appRoot": "${workspaceRoot}", 28 | "sourceMaps": true, 29 | "watch": true 30 | }, 31 | { 32 | "name": "Attach on Android", 33 | "type": "nativescript", 34 | "request": "attach", 35 | "platform": "android", 36 | "appRoot": "${workspaceRoot}", 37 | "sourceMaps": true, 38 | "watch": false 39 | } 40 | ] 41 | } -------------------------------------------------------------------------------- /demo/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings. 2 | { 3 | "files.exclude": { 4 | "**/.git": true, 5 | "**/.DS_Store": true, 6 | "platforms": true, 7 | "app/**/*.js.map": true, 8 | "app/**/*.js": true 9 | } 10 | , 11 | "typescript.tsdk": "./node_modules/typescript/lib" 12 | } -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 27 | 28 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /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 = "com.tangrainc.maskedtextfielddemo" 12 | } 13 | aaptOptions { 14 | additionalParameters "--no-version-vectors" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/drawable-hdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo/app/App_Resources/Android/drawable-hdpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo/app/App_Resources/Android/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/drawable-hdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo/app/App_Resources/Android/drawable-hdpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/drawable-ldpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo/app/App_Resources/Android/drawable-ldpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo/app/App_Resources/Android/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/drawable-ldpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo/app/App_Resources/Android/drawable-ldpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/drawable-mdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo/app/App_Resources/Android/drawable-mdpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo/app/App_Resources/Android/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/drawable-mdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo/app/App_Resources/Android/drawable-mdpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/drawable-nodpi/splash_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/drawable-xhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo/app/App_Resources/Android/drawable-xhdpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo/app/App_Resources/Android/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/drawable-xhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo/app/App_Resources/Android/drawable-xhdpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/drawable-xxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo/app/App_Resources/Android/drawable-xxhdpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo/app/App_Resources/Android/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/drawable-xxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo/app/App_Resources/Android/drawable-xxhdpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/drawable-xxxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo/app/App_Resources/Android/drawable-xxxhdpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/drawable-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo/app/App_Resources/Android/drawable-xxxhdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/drawable-xxxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo/app/App_Resources/Android/drawable-xxxhdpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/values-v21/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3d5afe 4 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | 14 | 15 | 16 | 19 | 20 | 23 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #F5F5F5 4 | #757575 5 | #33B5E5 6 | #272734 7 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 18 | 19 | 21 | 22 | 23 | 31 | 32 | 34 | 35 | 36 | 42 | 43 | 45 | 46 | -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "29x29", 5 | "idiom" : "iphone", 6 | "filename" : "icon-29.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "29x29", 11 | "idiom" : "iphone", 12 | "filename" : "icon-29@2x.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "icon-29@3x.png", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "size" : "40x40", 23 | "idiom" : "iphone", 24 | "filename" : "icon-40@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "icon-40@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "57x57", 35 | "idiom" : "iphone", 36 | "filename" : "icon-57.png", 37 | "scale" : "1x" 38 | }, 39 | { 40 | "size" : "57x57", 41 | "idiom" : "iphone", 42 | "filename" : "icon-57@2x.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "icon-60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "icon-60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "29x29", 59 | "idiom" : "ipad", 60 | "filename" : "icon-29.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "29x29", 65 | "idiom" : "ipad", 66 | "filename" : "icon-29@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "40x40", 71 | "idiom" : "ipad", 72 | "filename" : "icon-40.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "40x40", 77 | "idiom" : "ipad", 78 | "filename" : "icon-40@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "50x50", 83 | "idiom" : "ipad", 84 | "filename" : "icon-50.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "50x50", 89 | "idiom" : "ipad", 90 | "filename" : "icon-50@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "72x72", 95 | "idiom" : "ipad", 96 | "filename" : "icon-72.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "72x72", 101 | "idiom" : "ipad", 102 | "filename" : "icon-72@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "76x76", 107 | "idiom" : "ipad", 108 | "filename" : "icon-76.png", 109 | "scale" : "1x" 110 | }, 111 | { 112 | "size" : "76x76", 113 | "idiom" : "ipad", 114 | "filename" : "icon-76@2x.png", 115 | "scale" : "2x" 116 | }, 117 | { 118 | "size" : "83.5x83.5", 119 | "idiom" : "ipad", 120 | "filename" : "icon-83.5@2x.png", 121 | "scale" : "2x" 122 | } 123 | ], 124 | "info" : { 125 | "version" : 1, 126 | "author" : "xcode" 127 | } 128 | } -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "extent" : "full-screen", 5 | "idiom" : "iphone", 6 | "subtype" : "736h", 7 | "filename" : "Default-736h@3x.png", 8 | "minimum-system-version" : "8.0", 9 | "orientation" : "portrait", 10 | "scale" : "3x" 11 | }, 12 | { 13 | "extent" : "full-screen", 14 | "idiom" : "iphone", 15 | "subtype" : "736h", 16 | "filename" : "Default-Landscape@3x.png", 17 | "minimum-system-version" : "8.0", 18 | "orientation" : "landscape", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "extent" : "full-screen", 23 | "idiom" : "iphone", 24 | "subtype" : "667h", 25 | "filename" : "Default-667h@2x.png", 26 | "minimum-system-version" : "8.0", 27 | "orientation" : "portrait", 28 | "scale" : "2x" 29 | }, 30 | { 31 | "orientation" : "portrait", 32 | "idiom" : "iphone", 33 | "filename" : "Default@2x.png", 34 | "extent" : "full-screen", 35 | "minimum-system-version" : "7.0", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "extent" : "full-screen", 40 | "idiom" : "iphone", 41 | "subtype" : "retina4", 42 | "filename" : "Default-568h@2x.png", 43 | "minimum-system-version" : "7.0", 44 | "orientation" : "portrait", 45 | "scale" : "2x" 46 | }, 47 | { 48 | "orientation" : "portrait", 49 | "idiom" : "ipad", 50 | "filename" : "Default-Portrait.png", 51 | "extent" : "full-screen", 52 | "minimum-system-version" : "7.0", 53 | "scale" : "1x" 54 | }, 55 | { 56 | "orientation" : "landscape", 57 | "idiom" : "ipad", 58 | "filename" : "Default-Landscape.png", 59 | "extent" : "full-screen", 60 | "minimum-system-version" : "7.0", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "orientation" : "portrait", 65 | "idiom" : "ipad", 66 | "filename" : "Default-Portrait@2x.png", 67 | "extent" : "full-screen", 68 | "minimum-system-version" : "7.0", 69 | "scale" : "2x" 70 | }, 71 | { 72 | "orientation" : "landscape", 73 | "idiom" : "ipad", 74 | "filename" : "Default-Landscape@2x.png", 75 | "extent" : "full-screen", 76 | "minimum-system-version" : "7.0", 77 | "scale" : "2x" 78 | }, 79 | { 80 | "orientation" : "portrait", 81 | "idiom" : "iphone", 82 | "filename" : "Default.png", 83 | "extent" : "full-screen", 84 | "scale" : "1x" 85 | }, 86 | { 87 | "orientation" : "portrait", 88 | "idiom" : "iphone", 89 | "filename" : "Default@2x.png", 90 | "extent" : "full-screen", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "orientation" : "portrait", 95 | "idiom" : "iphone", 96 | "filename" : "Default-568h@2x.png", 97 | "extent" : "full-screen", 98 | "subtype" : "retina4", 99 | "scale" : "2x" 100 | }, 101 | { 102 | "orientation" : "portrait", 103 | "idiom" : "ipad", 104 | "extent" : "to-status-bar", 105 | "scale" : "1x" 106 | }, 107 | { 108 | "orientation" : "portrait", 109 | "idiom" : "ipad", 110 | "filename" : "Default-Portrait.png", 111 | "extent" : "full-screen", 112 | "scale" : "1x" 113 | }, 114 | { 115 | "orientation" : "landscape", 116 | "idiom" : "ipad", 117 | "extent" : "to-status-bar", 118 | "scale" : "1x" 119 | }, 120 | { 121 | "orientation" : "landscape", 122 | "idiom" : "ipad", 123 | "filename" : "Default-Landscape.png", 124 | "extent" : "full-screen", 125 | "scale" : "1x" 126 | }, 127 | { 128 | "orientation" : "portrait", 129 | "idiom" : "ipad", 130 | "extent" : "to-status-bar", 131 | "scale" : "2x" 132 | }, 133 | { 134 | "orientation" : "portrait", 135 | "idiom" : "ipad", 136 | "filename" : "Default-Portrait@2x.png", 137 | "extent" : "full-screen", 138 | "scale" : "2x" 139 | }, 140 | { 141 | "orientation" : "landscape", 142 | "idiom" : "ipad", 143 | "extent" : "to-status-bar", 144 | "scale" : "2x" 145 | }, 146 | { 147 | "orientation" : "landscape", 148 | "idiom" : "ipad", 149 | "filename" : "Default-Landscape@2x.png", 150 | "extent" : "full-screen", 151 | "scale" : "2x" 152 | } 153 | ], 154 | "info" : { 155 | "version" : 1, 156 | "author" : "xcode" 157 | } 158 | } -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-AspectFill.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-AspectFill@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-Center.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-Center@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/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 | MaskedTextField 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiresFullScreen 28 | 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/build.xcconfig: -------------------------------------------------------------------------------- 1 | // You can add custom settings here 2 | // for example you can uncomment the following line to force distribution code signing 3 | // CODE_SIGN_IDENTITY = iPhone Distribution 4 | // To build for device with XCode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html 5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID; 6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 7 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 8 | -------------------------------------------------------------------------------- /demo/app/README.md: -------------------------------------------------------------------------------- 1 | # NativeScript TypeScript Template 2 | 3 | This template creates a NativeScript app with the NativeScript hello world example, 4 | however, in this template the example is built with TypeScript. 5 | 6 | You can create a new app that uses this template with either the `--template` option. 7 | 8 | ``` 9 | tns create my-app-name --template tns-template-hello-world-ts 10 | ``` 11 | 12 | Or the `--tsc` shorthand. 13 | 14 | ``` 15 | tns create my-app-name --tsc 16 | ``` 17 | 18 | > Note: Both commands will create a new NativeScript app that uses the latest version of this template published to [npm] (https://www.npmjs.com/package/tns-template-hello-world-ts). 19 | 20 | If you want to create a new app that uses the source of the template from the `master` branch, you can execute the following: 21 | 22 | ``` 23 | tns create my-app-name --template https://github.com/NativeScript/template-hello-world-ts.git#master 24 | ``` 25 | -------------------------------------------------------------------------------- /demo/app/app.css: -------------------------------------------------------------------------------- 1 | /* 2 | In NativeScript, the app.css file is where you place CSS rules that 3 | you would like to apply to your entire application. Check out 4 | http://docs.nativescript.org/ui/styling for a full list of the CSS 5 | selectors and properties you can use to style UI components. 6 | 7 | /* 8 | For example, the following CSS rule changes the font size of all UI 9 | components that have the btn class name. 10 | */ 11 | .btn { 12 | font-size: 18; 13 | } 14 | 15 | /* 16 | In many cases you may want to use the NativeScript core theme instead 17 | of writing your own CSS rules. For a full list of class names in the theme 18 | refer to http://docs.nativescript.org/ui/theme. 19 | */ 20 | @import '~nativescript-theme-core/css/core.light.css'; 21 | -------------------------------------------------------------------------------- /demo/app/app.ts: -------------------------------------------------------------------------------- 1 | /* 2 | In NativeScript, the app.ts file is the entry point to your application. 3 | You can use this file to perform app-level initialization, but the primary 4 | purpose of the file is to pass control to the app’s first module. 5 | */ 6 | 7 | import "./bundle-config"; 8 | import * as app from 'application'; 9 | 10 | app.start({ moduleName: 'main-page' }); 11 | 12 | /* 13 | Do not place any code after the application has been started as it will not 14 | be executed on iOS. 15 | */ 16 | -------------------------------------------------------------------------------- /demo/app/bundle-config.ts: -------------------------------------------------------------------------------- 1 | if ((global).TNS_WEBPACK) { 2 | //registers tns-core-modules UI framework modules 3 | require("bundle-entry-points"); 4 | 5 | global.registerModule("nativescript-masked-text-field", () => require("nativescript-masked-text-field")); 6 | 7 | //register application modules 8 | global.registerModule("main-page", () => require("./main-page")); 9 | } 10 | -------------------------------------------------------------------------------- /demo/app/main-page.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from "data/observable"; 2 | import { EventData } from "data/observable"; 3 | import { Page } from "ui/page"; 4 | 5 | let viewModel: Observable; 6 | export function navigatingTo(args: EventData) { 7 | const page = args.object as Page; 8 | 9 | viewModel = new Observable(); 10 | viewModel.set("value", ""); 11 | page.bindingContext = viewModel; 12 | } -------------------------------------------------------------------------------- /demo/app/main-page.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /demo/app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "android": { 3 | "v8Flags": "--expose_gc" 4 | }, 5 | "main": "app.js", 6 | "name": "tns-template-hello-world-ts", 7 | "version": "3.0.0" 8 | } -------------------------------------------------------------------------------- /demo/app/vendor-platform.android.ts: -------------------------------------------------------------------------------- 1 | require("application"); 2 | if (!global["__snapshot"]) { 3 | // In case snapshot generation is enabled these modules will get into the bundle 4 | // but will not be required/evaluated. 5 | // The snapshot webpack plugin will add them to the tns-java-classes.js bundle file. 6 | // This way, they will be evaluated on app start as early as possible. 7 | require("ui/frame"); 8 | require("ui/frame/activity"); 9 | } 10 | -------------------------------------------------------------------------------- /demo/app/vendor-platform.ios.ts: -------------------------------------------------------------------------------- 1 | // There is a bug in angular: https://github.com/angular/angular-cli/pull/8589/files 2 | // Legendary stuff, its webpack plugin pretty much doesn't work with empty TypeScript files in v1.8.3 3 | void 0; 4 | -------------------------------------------------------------------------------- /demo/app/vendor.ts: -------------------------------------------------------------------------------- 1 | // Snapshot the ~/app.css and the theme 2 | const application = require("application"); 3 | require("ui/styling/style-scope"); 4 | const appCssContext = require.context("~/", false, /^\.\/app\.(css|scss|less|sass)$/); 5 | global.registerWebpackModules(appCssContext); 6 | application.loadAppCss(); 7 | 8 | require("./vendor-platform"); 9 | 10 | require("bundle-entry-points"); 11 | -------------------------------------------------------------------------------- /demo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "NativeScript Application", 3 | "license": "SEE LICENSE IN ", 4 | "readme": "NativeScript Application", 5 | "repository": "", 6 | "nativescript": { 7 | "id": "com.tangrainc.maskedtextfielddemo", 8 | "tns-ios": { 9 | "version": "5.0.0" 10 | }, 11 | "tns-android": { 12 | "version": "5.0.0" 13 | } 14 | }, 15 | "scripts": { 16 | "android": "npm uninstall nativescript-masked-text-field && tns platform clean android && tns run android", 17 | "ios": "npm uninstall nativescript-masked-text-field && tns run ios --emulator" 18 | }, 19 | "dependencies": { 20 | "nativescript-masked-text-field": "file:../bin/dist", 21 | "nativescript-theme-core": "~1.0.2", 22 | "tns-core-modules": "^5.0.5" 23 | }, 24 | "devDependencies": { 25 | "babel-traverse": "6.24.1", 26 | "babel-types": "6.24.1", 27 | "babylon": "6.17.0", 28 | "lazy": "1.0.11", 29 | "nativescript-css-loader": "~0.26.0", 30 | "nativescript-dev-typescript": "^0.7.8", 31 | "nativescript-dev-webpack": "^0.18.2", 32 | "typescript": "~3.1.6" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /demo/references.d.ts: -------------------------------------------------------------------------------- 1 | /// Needed for autocompletion and compilation. -------------------------------------------------------------------------------- /demo/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es5", 5 | "experimentalDecorators": true, 6 | "emitDecoratorMetadata": true, 7 | "noEmitHelpers": true, 8 | "noEmitOnError": true, 9 | "lib": [ 10 | "es6", 11 | "dom" 12 | ], 13 | "baseUrl": ".", 14 | "paths": { 15 | "*": [ 16 | "./node_modules/tns-core-modules/*", 17 | "./node_modules/*" 18 | ], 19 | "~/*": [ 20 | "app/*" 21 | ] 22 | } 23 | }, 24 | "exclude": [ 25 | "node_modules", 26 | "platforms", 27 | "**/*.aot.ts" 28 | ] 29 | } -------------------------------------------------------------------------------- /demo/tsconfig.tns.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig", 3 | "compilerOptions": { 4 | "module": "es2015", 5 | "moduleResolution": "node" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /demo/webpack.config.js: -------------------------------------------------------------------------------- 1 | const { join, relative, resolve, sep } = require("path"); 2 | 3 | const webpack = require("webpack"); 4 | const nsWebpack = require("nativescript-dev-webpack"); 5 | const nativescriptTarget = require("nativescript-dev-webpack/nativescript-target"); 6 | const CleanWebpackPlugin = require("clean-webpack-plugin"); 7 | const CopyWebpackPlugin = require("copy-webpack-plugin"); 8 | const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer"); 9 | const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin"); 10 | const UglifyJsPlugin = require("uglifyjs-webpack-plugin"); 11 | 12 | module.exports = env => { 13 | // Add your custom Activities, Services and other Android app components here. 14 | const appComponents = [ 15 | "tns-core-modules/ui/frame", 16 | "tns-core-modules/ui/frame/activity", 17 | ]; 18 | 19 | const platform = env && (env.android && "android" || env.ios && "ios"); 20 | if (!platform) { 21 | throw new Error("You need to provide a target platform!"); 22 | } 23 | 24 | const platforms = ["ios", "android"]; 25 | const projectRoot = __dirname; 26 | 27 | // Default destination inside platforms//... 28 | const dist = resolve(projectRoot, nsWebpack.getAppPath(platform, projectRoot)); 29 | const appResourcesPlatformDir = platform === "android" ? "Android" : "iOS"; 30 | 31 | const { 32 | // The 'appPath' and 'appResourcesPath' values are fetched from 33 | // the nsconfig.json configuration file 34 | // when bundling with `tns run android|ios --bundle`. 35 | appPath = "app", 36 | appResourcesPath = "app/App_Resources", 37 | 38 | // You can provide the following flags when running 'tns run android|ios' 39 | snapshot, // --env.snapshot 40 | uglify, // --env.uglify 41 | report, // --env.report 42 | sourceMap, // --env.sourceMap 43 | hmr, // --env.hmr, 44 | } = env; 45 | const externals = (env.externals || []).map((e) => { // --env.externals 46 | return new RegExp(e + ".*"); 47 | }); 48 | 49 | const appFullPath = resolve(projectRoot, appPath); 50 | const appResourcesFullPath = resolve(projectRoot, appResourcesPath); 51 | 52 | const entryModule = nsWebpack.getEntryModule(appFullPath); 53 | const entryPath = `.${sep}${entryModule}.ts`; 54 | 55 | const config = { 56 | mode: uglify ? "production" : "development", 57 | context: appFullPath, 58 | externals, 59 | watchOptions: { 60 | ignored: [ 61 | appResourcesFullPath, 62 | // Don't watch hidden files 63 | "**/.*", 64 | ] 65 | }, 66 | target: nativescriptTarget, 67 | entry: { 68 | bundle: entryPath, 69 | }, 70 | output: { 71 | pathinfo: false, 72 | path: dist, 73 | libraryTarget: "commonjs2", 74 | filename: "[name].js", 75 | globalObject: "global", 76 | }, 77 | resolve: { 78 | extensions: [".ts", ".js", ".scss", ".css"], 79 | // Resolve {N} system modules from tns-core-modules 80 | modules: [ 81 | resolve(__dirname, "node_modules/tns-core-modules"), 82 | resolve(__dirname, "node_modules"), 83 | "node_modules/tns-core-modules", 84 | "node_modules", 85 | ], 86 | alias: { 87 | '~': appFullPath 88 | }, 89 | // don't resolve symlinks to symlinked modules 90 | symlinks: false 91 | }, 92 | resolveLoader: { 93 | // don't resolve symlinks to symlinked loaders 94 | symlinks: false 95 | }, 96 | node: { 97 | // Disable node shims that conflict with NativeScript 98 | "http": false, 99 | "timers": false, 100 | "setImmediate": false, 101 | "fs": "empty", 102 | "__dirname": false, 103 | }, 104 | devtool: sourceMap ? "inline-source-map" : "none", 105 | optimization: { 106 | splitChunks: { 107 | cacheGroups: { 108 | vendor: { 109 | name: "vendor", 110 | chunks: "all", 111 | test: (module, chunks) => { 112 | const moduleName = module.nameForCondition ? module.nameForCondition() : ''; 113 | return /[\\/]node_modules[\\/]/.test(moduleName) || 114 | appComponents.some(comp => comp === moduleName); 115 | 116 | }, 117 | enforce: true, 118 | }, 119 | } 120 | }, 121 | minimize: !!uglify, 122 | minimizer: [ 123 | new UglifyJsPlugin({ 124 | parallel: true, 125 | cache: true, 126 | uglifyOptions: { 127 | output: { 128 | comments: false, 129 | }, 130 | compress: { 131 | // The Android SBG has problems parsing the output 132 | // when these options are enabled 133 | 'collapse_vars': platform !== "android", 134 | sequences: platform !== "android", 135 | } 136 | } 137 | }) 138 | ], 139 | }, 140 | module: { 141 | rules: [ 142 | { 143 | test: new RegExp(entryPath), 144 | use: [ 145 | // Require all Android app components 146 | platform === "android" && { 147 | loader: "nativescript-dev-webpack/android-app-components-loader", 148 | options: { modules: appComponents } 149 | }, 150 | 151 | { 152 | loader: "nativescript-dev-webpack/bundle-config-loader", 153 | options: { 154 | loadCss: !snapshot, // load the application css if in debug mode 155 | } 156 | }, 157 | ].filter(loader => !!loader) 158 | }, 159 | 160 | { 161 | test: /-page\.ts$/, 162 | use: "nativescript-dev-webpack/script-hot-loader" 163 | }, 164 | 165 | { 166 | test: /\.(css|scss)$/, 167 | use: "nativescript-dev-webpack/style-hot-loader" 168 | }, 169 | 170 | { 171 | test: /\.(html|xml)$/, 172 | use: "nativescript-dev-webpack/markup-hot-loader" 173 | }, 174 | 175 | { test: /\.(html|xml)$/, use: "nativescript-dev-webpack/xml-namespace-loader"}, 176 | 177 | { 178 | test: /\.css$/, 179 | use: { loader: "css-loader", options: { minimize: false, url: false } } 180 | }, 181 | 182 | { 183 | test: /\.scss$/, 184 | use: [ 185 | { loader: "css-loader", options: { minimize: false, url: false } }, 186 | "sass-loader" 187 | ] 188 | }, 189 | 190 | { 191 | test: /\.ts$/, 192 | use: { 193 | loader: "awesome-typescript-loader", 194 | options: { configFileName: "tsconfig.tns.json" }, 195 | } 196 | }, 197 | ] 198 | }, 199 | plugins: [ 200 | // Define useful constants like TNS_WEBPACK 201 | new webpack.DefinePlugin({ 202 | "global.TNS_WEBPACK": "true", 203 | "process": undefined, 204 | }), 205 | // Remove all files from the out dir. 206 | new CleanWebpackPlugin([ `${dist}/**/*` ]), 207 | // Copy native app resources to out dir. 208 | new CopyWebpackPlugin([ 209 | { 210 | from: `${appResourcesFullPath}/${appResourcesPlatformDir}`, 211 | to: `${dist}/App_Resources/${appResourcesPlatformDir}`, 212 | context: projectRoot 213 | }, 214 | ]), 215 | // Copy assets to out dir. Add your own globs as needed. 216 | new CopyWebpackPlugin([ 217 | { from: { glob: "fonts/**" } }, 218 | { from: { glob: "**/*.jpg" } }, 219 | { from: { glob: "**/*.png" } }, 220 | ], { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }), 221 | // Generate a bundle starter script and activate it in package.json 222 | new nsWebpack.GenerateBundleStarterPlugin([ 223 | "./vendor", 224 | "./bundle", 225 | ]), 226 | // For instructions on how to set up workers with webpack 227 | // check out https://github.com/nativescript/worker-loader 228 | new NativeScriptWorkerPlugin(), 229 | new nsWebpack.PlatformFSPlugin({ 230 | platform, 231 | platforms, 232 | }), 233 | // Does IPC communication with the {N} CLI to notify events when running in watch mode. 234 | new nsWebpack.WatchStateLoggerPlugin(), 235 | ], 236 | }; 237 | 238 | if (report) { 239 | // Generate report files for bundles content 240 | config.plugins.push(new BundleAnalyzerPlugin({ 241 | analyzerMode: "static", 242 | openAnalyzer: false, 243 | generateStatsFile: true, 244 | reportFilename: resolve(projectRoot, "report", `report.html`), 245 | statsFilename: resolve(projectRoot, "report", `stats.json`), 246 | })); 247 | } 248 | 249 | if (snapshot) { 250 | config.plugins.push(new nsWebpack.NativeScriptSnapshotPlugin({ 251 | chunk: "vendor", 252 | requireModules: [ 253 | "tns-core-modules/bundle-entry-points", 254 | ], 255 | projectRoot, 256 | webpackConfig: config, 257 | })); 258 | } 259 | 260 | if (hmr) { 261 | config.plugins.push(new webpack.HotModuleReplacementPlugin()); 262 | } 263 | 264 | 265 | return config; 266 | }; 267 | -------------------------------------------------------------------------------- /docs/screenshot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterStaev/nativescript-masked-text-field/fab6056b56623dc351d9aaedb0a4dfecd05d245a/docs/screenshot.jpg -------------------------------------------------------------------------------- /gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function (grunt) { 2 | var localConfig = { 3 | typeScriptDeclarations:[ 4 | "**/*.d.ts", 5 | "!references.d.ts", 6 | "!demo/**/*.*", 7 | "!demo-ng/**/*.*", 8 | "!node_modules/**/*.*", 9 | "!bin/**/*.*" 10 | ], 11 | outDir: "bin/dist/" 12 | } 13 | 14 | grunt.initConfig({ 15 | clean:{ 16 | build:{ 17 | src:[localConfig.outDir] 18 | } 19 | }, 20 | copy: { 21 | declarations: { 22 | src: localConfig.typeScriptDeclarations, 23 | dest: localConfig.outDir 24 | }, 25 | platforms: { 26 | files: [{ expand: true, src: ["platforms/**"], dest: localConfig.outDir }] 27 | }, 28 | packageConfig: { 29 | src: "package.json", 30 | dest: localConfig.outDir, 31 | options: { 32 | process: function (content, srcPath) { 33 | var contentAsObject = JSON.parse(content); 34 | contentAsObject.devDependencies = undefined; 35 | contentAsObject.scripts = undefined; 36 | return JSON.stringify(contentAsObject, null, "\t"); 37 | } 38 | } 39 | }, 40 | readme: { 41 | src: "README.md", 42 | dest: localConfig.outDir, 43 | options: { 44 | process: function (content, srcPath) { 45 | return content.substring(content.indexOf("\n") + 1) 46 | } 47 | } 48 | } 49 | }, 50 | exec: { 51 | tsCompile: { 52 | cmd: "./node_modules/.bin/tsc --project tsconfig.json --outDir " + localConfig.outDir 53 | }, 54 | ngCompile: { 55 | cmd: "node ./node_modules/.bin/ngc --project tsconfig.aot.json --outDir " + localConfig.outDir 56 | }, 57 | tslint: { 58 | cmd: "./node_modules/.bin/tslint --project tsconfig.json --type-check" 59 | }, 60 | checkRequiredReadmeSection: { 61 | cwd: "bin/dist", 62 | cmd: function (section) { 63 | return "cat README.md | grep -q \"# " + section + "\""; 64 | } 65 | }, 66 | checkRequiredPackageJsonSection: { 67 | cwd: "bin/dist", 68 | cmd: function (section) { 69 | return "cat package.json | grep -q \"\\\"" + section + "\\\"\""; 70 | } 71 | }, 72 | "ci-build-demo": { 73 | cmd: function (platform, demoSuffix) { 74 | return "cd demo" + (demoSuffix != "" ? "-" + demoSuffix : "") + " && npm install && tns build " + platform; 75 | } 76 | }, 77 | "ci-webpack-demo": { 78 | cmd: function (platform, demoSuffix) { 79 | return "cd demo" + (demoSuffix != "" ? "-" + demoSuffix : "") + " && npm install && tns build " + platform 80 | + " --bundle --env.uglify --env.snapshot" 81 | + (demoSuffix === "ng" ? " --env.aot" : ""); 82 | } 83 | }, 84 | npm_publish: { 85 | cmd: "npm publish", 86 | cwd: localConfig.outDir 87 | } 88 | } 89 | }); 90 | 91 | grunt.loadNpmTasks("grunt-contrib-copy"); 92 | grunt.loadNpmTasks("grunt-contrib-clean"); 93 | grunt.loadNpmTasks("grunt-exec"); 94 | 95 | grunt.registerTask("compile", [ 96 | "clean:build", 97 | "exec:tsCompile", 98 | "exec:ngCompile", 99 | "copy" 100 | ]); 101 | 102 | grunt.registerTask("build", [ 103 | "exec:tslint", 104 | "compile", 105 | "copy" 106 | ]); 107 | 108 | grunt.registerTask("ci", "Performs CI builds for the demo projects", function (action, platform) { 109 | if (!platform || platform === "") { 110 | grunt.warn("You must specify a platform (ios or android)!"); 111 | } 112 | if (!action || action === "") { 113 | grunt.warn("You must specify an action (build or webpack)!"); 114 | } 115 | 116 | var baseTask = "exec:ci-" + action.toLowerCase() + "-demo:" + platform.toLowerCase(); 117 | grunt.task.run( 118 | baseTask + ":", 119 | baseTask + ":ng" 120 | ); 121 | }); 122 | 123 | grunt.registerTask("lint", [ 124 | "exec:checkRequiredReadmeSection:Installation", 125 | "exec:checkRequiredReadmeSection:Configuration", 126 | "exec:checkRequiredReadmeSection:API", 127 | "exec:checkRequiredReadmeSection:Usage", 128 | "exec:checkRequiredPackageJsonSection:license", 129 | "exec:checkRequiredPackageJsonSection:nativescript", 130 | "exec:tslint", 131 | ]); 132 | 133 | grunt.registerTask("publish", [ 134 | "build", 135 | "lint", 136 | "exec:npm_publish" 137 | ]); 138 | }; -------------------------------------------------------------------------------- /masked-text-field-common.ts: -------------------------------------------------------------------------------- 1 | /*! ***************************************************************************** 2 | Copyright (c) 2019 Tangra Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ***************************************************************************** */ 16 | import { CSSType, CoercibleProperty, Property } from "ui/core/view"; 17 | import { TextField } from "ui/text-field"; 18 | 19 | import { MaskedTextField as MaskedTextFieldDefinition } from "."; 20 | 21 | export * from "ui/text-field"; 22 | 23 | // Dummy interface to allow call of private function in TextField 24 | export interface MaskedTextFieldBase { 25 | _setInputType(inputType: number): void; 26 | } 27 | 28 | @CSSType("MaskedTextField") 29 | export abstract class MaskedTextFieldBase extends TextField implements MaskedTextFieldDefinition { 30 | public mask: string; 31 | public text: string; 32 | 33 | public _emptyMaskedValue: string = ""; 34 | private _placeholder: string = "_"; 35 | private _tokenRulesMap: { [key: string]: RegExp } = { 36 | "0": /\d/, 37 | "9": /\d|\s/, 38 | "#": /\d|\s|\+|\-/, 39 | "L": /[a-zA-Z]/, 40 | "?": /[a-zA-Z]|\s/, 41 | "&": /\S/, 42 | "C": /./, 43 | "A": /[a-zA-Z0-9]/, 44 | "a": /[a-zA-Z0-9]|\s/ 45 | }; 46 | private _maskTokens: Array = []; 47 | 48 | public _updateMaskedText(start: number, previousCharactersCount: number, newText: string, isBackwardsIn: boolean): number { 49 | const unmaskedChangedValue = this._getUnmaskedValue(newText, start); 50 | const newMaskedValue = this._getNewMaskedValue(start, start + previousCharactersCount, unmaskedChangedValue, isBackwardsIn); 51 | 52 | // NOTE: Do not set directly the owner.text property as this will trigger an unnecessary coerce value and masking/unmasking! 53 | this._setNativeText(newMaskedValue); 54 | textProperty.nativeValueChange(this, newMaskedValue); 55 | 56 | let newCaretPosition = this._getNextRegExpToken(start, isBackwardsIn); 57 | if (newCaretPosition === -1) { 58 | // Current caret is outside RegExp token, so leave where it is currently 59 | newCaretPosition = start + (isBackwardsIn ? 1 : 0); 60 | } 61 | else { 62 | newCaretPosition = this._getNextRegExpToken(newCaretPosition + unmaskedChangedValue.length, isBackwardsIn); 63 | if (newCaretPosition === -1) { 64 | // There are no next RegExp tokens, go to end/start 65 | newCaretPosition = this._getNextRegExpToken((isBackwardsIn ? 0 : newMaskedValue.length - 1), !isBackwardsIn) 66 | + (!isBackwardsIn ? 1 : 0); 67 | } 68 | } 69 | 70 | return newCaretPosition; 71 | } 72 | 73 | public _generateMaskTokens() { 74 | const maskChars = this.mask.split(""); 75 | const emptyMaskedValueBuider: string[] = []; 76 | let isEscapeCharIn = false; 77 | 78 | this._maskTokens.length = 0; 79 | for (const char of maskChars) { 80 | if (isEscapeCharIn) { 81 | isEscapeCharIn = false; 82 | this._maskTokens.push(char); 83 | emptyMaskedValueBuider.push(char); 84 | continue; 85 | } 86 | 87 | if (char === "\\") { 88 | isEscapeCharIn = true; 89 | continue; 90 | } 91 | 92 | const tokenRule = this._tokenRulesMap[char]; 93 | this._maskTokens.push(tokenRule || char); 94 | emptyMaskedValueBuider.push(tokenRule ? this._placeholder : char); 95 | } 96 | 97 | this._emptyMaskedValue = emptyMaskedValueBuider.join(""); 98 | } 99 | 100 | public _getUnmaskedValue(value: any, startTokenIndex?: number) { 101 | if (!value) { 102 | return ""; 103 | } 104 | 105 | const resultBuilder: string[] = []; 106 | const chars = value.toString().split(""); 107 | let tokenLoop = startTokenIndex || 0; 108 | let charLoop = 0; 109 | 110 | while (tokenLoop < this._maskTokens.length && charLoop < chars.length) { 111 | const char = chars[charLoop]; 112 | const token = this._maskTokens[tokenLoop]; 113 | 114 | if (char === token || char === this._placeholder) { 115 | if (char === this._placeholder) { 116 | resultBuilder.push(this._placeholder); 117 | } 118 | tokenLoop++; 119 | charLoop++; 120 | continue; 121 | } 122 | 123 | if (token instanceof RegExp) { 124 | if (token.test(char)) { 125 | resultBuilder.push(char); 126 | tokenLoop++; 127 | } 128 | charLoop++; 129 | continue; 130 | } 131 | 132 | tokenLoop++; 133 | } 134 | 135 | return resultBuilder.join(""); 136 | } 137 | 138 | public _getNewMaskedValue(replaceStart: number, replaceEnd: number, unmaskedReplaceValue: string, isBackwardsIn?: boolean) { 139 | replaceStart = this._getNextRegExpToken(replaceStart, isBackwardsIn); 140 | if (replaceStart > replaceEnd) { 141 | replaceEnd = replaceStart; 142 | } 143 | 144 | const currentValue = this.text || this._emptyMaskedValue; 145 | const unmaskedValueAndSuffix = 146 | unmaskedReplaceValue + this._getUnmaskedValue(currentValue.substring(replaceEnd), replaceEnd); 147 | const unmaskedValueAndSuffixSplit = unmaskedValueAndSuffix.split(""); 148 | const currentValueSplit = currentValue.split(""); 149 | 150 | for (let loop = replaceStart, charLoop = 0; loop > -1 && loop < this._emptyMaskedValue.length; loop = this._getNextRegExpToken(loop + 1), charLoop++) { 151 | currentValueSplit[loop] = unmaskedValueAndSuffixSplit[charLoop] || this._placeholder; 152 | } 153 | 154 | return currentValueSplit.join(""); 155 | } 156 | 157 | protected abstract _setNativeText(value: string); 158 | 159 | private _getNextRegExpToken(start: number, isBackwardsIn?: boolean) { 160 | const step = (isBackwardsIn ? -1 : 1); 161 | 162 | for (let loop = start; loop > -1 && loop < this._maskTokens.length; loop += step) { 163 | if (this._maskTokens[loop] instanceof RegExp) { 164 | return loop; 165 | } 166 | } 167 | 168 | return -1; 169 | } 170 | } 171 | 172 | export const maskProperty = new Property({ 173 | name: "mask", 174 | defaultValue: "", 175 | valueChanged: (target, oldValue, newValue) => { 176 | target._generateMaskTokens(); 177 | } 178 | }); 179 | maskProperty.register(MaskedTextFieldBase); 180 | 181 | export const textProperty = new CoercibleProperty({ 182 | name: "text", 183 | defaultValue: null, 184 | coerceValue: (target, value) => { 185 | if (!target._emptyMaskedValue) { 186 | return value; 187 | } 188 | 189 | const unmaskedValue = target._getUnmaskedValue(value); 190 | return target._getNewMaskedValue(0, target._emptyMaskedValue.length, unmaskedValue); 191 | } 192 | }); 193 | textProperty.register(MaskedTextFieldBase); -------------------------------------------------------------------------------- /masked-text-field.android.ts: -------------------------------------------------------------------------------- 1 | /*! ***************************************************************************** 2 | Copyright (c) 2019 Tangra Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ***************************************************************************** */ 16 | import { getTransformedText } from "ui/text-base"; 17 | 18 | import { MaskedTextFieldBase, textProperty } from "./masked-text-field-common"; 19 | 20 | export * from "./masked-text-field-common"; 21 | 22 | export class MaskedTextField extends MaskedTextFieldBase { 23 | public _isChangingNativeTextIn: boolean = false; 24 | 25 | public createNativeView() { 26 | const textEdit: android.widget.EditText = super.createNativeView() as android.widget.EditText; 27 | 28 | const textWatcher = new MaskedTextFieldTextWatcher(new WeakRef(this)); 29 | textEdit.addTextChangedListener(textWatcher); 30 | (textEdit as any).textWatcher = textWatcher; 31 | 32 | // Remote the default text watcher that comes from the core modules 33 | // as it update the value in the wrong place with the wrong one 34 | textEdit.removeTextChangedListener((textEdit as any).listener); 35 | 36 | return textEdit; 37 | } 38 | 39 | public initNativeView() { 40 | super.initNativeView(); 41 | 42 | const nativeView = this.nativeView as any; 43 | nativeView.textWatcher.owner = new WeakRef(this); 44 | } 45 | 46 | public disposeNativeView() { 47 | const nativeView = this.nativeView as any; 48 | nativeView.textWatcher.owner = null; 49 | 50 | super.disposeNativeView(); 51 | } 52 | 53 | public [textProperty.getDefault]() { 54 | this.nativeView.getText(); 55 | } 56 | 57 | public [textProperty.setNative](value: string) { 58 | this._setNativeText(value); 59 | } 60 | 61 | public _setNativeText(value: string) { 62 | const stringValue = (value === null || value === undefined) ? "" : value.toString(); 63 | const transformedText = getTransformedText(stringValue, this.textTransform); 64 | 65 | this._isChangingNativeTextIn = true; 66 | this.nativeView.setText(transformedText); 67 | this._isChangingNativeTextIn = false; 68 | } 69 | 70 | public _setInputType(inputType: number) { 71 | // This is needed so remove built in number validation of android 72 | inputType = inputType 73 | & ~android.text.InputType.TYPE_NUMBER_FLAG_SIGNED 74 | & ~android.text.InputType.TYPE_NUMBER_FLAG_DECIMAL; 75 | 76 | super._setInputType(inputType); 77 | } 78 | } 79 | 80 | @Interfaces([android.text.TextWatcher]) 81 | class MaskedTextFieldTextWatcher extends java.lang.Object implements android.text.TextWatcher { 82 | 83 | constructor(private owner: WeakRef) { 84 | super(); 85 | 86 | return global.__native(this); 87 | } 88 | 89 | public beforeTextChanged(s: string /* java.lang.CharSequence */, start: number, count: number, after: number) { 90 | // NOT NEEDED 91 | } 92 | 93 | public onTextChanged(s: string /* java.lang.CharSequence */, start: number, before: number, count: number) { 94 | const owner = this.owner.get(); 95 | if (!owner._isChangingNativeTextIn && s && s.toString() !== "") { 96 | const changedText = s.toString().substr(start, count); 97 | const isBackwardsIn: boolean = (count === 0); 98 | const newCaretPosition = owner._updateMaskedText(start, before, changedText, isBackwardsIn); 99 | const editText: android.widget.EditText = owner.nativeView as android.widget.EditText; 100 | editText.setSelection(newCaretPosition); 101 | } 102 | } 103 | 104 | public afterTextChanged(s: any): void { 105 | // NOT NEEDED 106 | } 107 | } -------------------------------------------------------------------------------- /masked-text-field.d.ts: -------------------------------------------------------------------------------- 1 | /*! ***************************************************************************** 2 | Copyright (c) 2019 Tangra Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ***************************************************************************** */ 16 | import { TextField } from "ui/text-field"; 17 | 18 | export class MaskedTextField extends TextField { 19 | mask: string; 20 | } -------------------------------------------------------------------------------- /masked-text-field.ios.ts: -------------------------------------------------------------------------------- 1 | /*! ***************************************************************************** 2 | Copyright (c) 2019 Tangra Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ***************************************************************************** */ 16 | import { getTransformedText } from "ui/text-base"; 17 | 18 | import { MaskedTextFieldBase, textProperty } from "./masked-text-field-common"; 19 | 20 | export * from "./masked-text-field-common"; 21 | 22 | export class MaskedTextField extends MaskedTextFieldBase { 23 | private _delegate: any; // NOTE: This override the one in TextField so we can add our own logic! 24 | 25 | public initNativeView() { 26 | super.initNativeView(); // NOTE: This initializes this._delegate! 27 | this._delegate = MaskedTextFieldDelegate.initWithOwnerAndDefaultImplementation(new WeakRef(this), this._delegate); 28 | } 29 | 30 | public [textProperty.getDefault]() { 31 | return ""; 32 | } 33 | 34 | public [textProperty.setNative](value: string) { 35 | this._setNativeText(value); 36 | } 37 | 38 | public _setNativeText(value: string) { 39 | const style = this.style; 40 | 41 | const dict = new Map(); 42 | switch (style.textDecoration) { 43 | case "none": 44 | break; 45 | case "underline": 46 | dict.set(NSUnderlineStyleAttributeName, NSUnderlineStyle.StyleSingle); 47 | break; 48 | case "line-through": 49 | dict.set(NSStrikethroughStyleAttributeName, NSUnderlineStyle.StyleSingle); 50 | break; 51 | case "underline line-through": 52 | dict.set(NSUnderlineStyleAttributeName, NSUnderlineStyle.StyleSingle); 53 | dict.set(NSStrikethroughStyleAttributeName, NSUnderlineStyle.StyleSingle); 54 | break; 55 | default: 56 | throw new Error(`Invalid text decoration value: ${style.textDecoration}. Valid values are: 'none', 'underline', 'line-through', 'underline line-through'.`); 57 | } 58 | 59 | if (style.letterSpacing !== 0) { 60 | dict.set(NSKernAttributeName, style.letterSpacing * this.nativeView.font.pointSize); 61 | } 62 | 63 | if (style.color) { 64 | dict.set(NSForegroundColorAttributeName, style.color.ios); 65 | } 66 | 67 | const stringValue = (value === undefined || value === null) ? "" : value.toString(); 68 | const source = getTransformedText(stringValue, this.textTransform); 69 | if (dict.size > 0) { 70 | const result = NSMutableAttributedString.alloc().initWithString(source); 71 | 72 | result.setAttributesRange(dict as any, { location: 0, length: source.length }); 73 | this.nativeView.attributedText = result; 74 | } 75 | else { 76 | // Clear attributedText or text won't be affected. 77 | this.nativeView.attributedText = undefined; 78 | this.nativeView.text = source; 79 | } 80 | } 81 | } 82 | @ObjCClass(UITextFieldDelegate) 83 | class MaskedTextFieldDelegate extends NSObject implements UITextFieldDelegate { 84 | public static initWithOwnerAndDefaultImplementation(owner: WeakRef, defaultImplementation: UITextFieldDelegate): MaskedTextFieldDelegate { 85 | const delegate = MaskedTextFieldDelegate.new() as MaskedTextFieldDelegate; 86 | delegate._owner = owner; 87 | delegate._defaultImplementation = defaultImplementation; 88 | return delegate; 89 | } 90 | 91 | private _owner: WeakRef; 92 | private _defaultImplementation: UITextFieldDelegate; 93 | 94 | public textFieldShouldBeginEditing(textField: UITextField): boolean { 95 | return this._defaultImplementation.textFieldShouldBeginEditing(textField); 96 | } 97 | 98 | public textFieldDidBeginEditing(textField: UITextField) { 99 | this._defaultImplementation.textFieldDidBeginEditing(textField); 100 | textField.selectedTextRange = textField.textRangeFromPositionToPosition(textField.beginningOfDocument, textField.beginningOfDocument); 101 | } 102 | 103 | public textFieldDidEndEditing(textField: UITextField) { 104 | this._defaultImplementation.textFieldDidEndEditing(textField); 105 | } 106 | 107 | public textFieldShouldClear(textField: UITextField): boolean { 108 | return this._defaultImplementation.textFieldShouldClear(textField); 109 | } 110 | 111 | public textFieldShouldReturn(textField: UITextField): boolean { 112 | return this._defaultImplementation.textFieldShouldReturn(textField); 113 | } 114 | 115 | public textFieldShouldChangeCharactersInRangeReplacementString(textField: UITextField, range: NSRange, replacementString: string): boolean { 116 | const owner = this._owner.get(); 117 | const isBackwardsIn: boolean = (replacementString === ""); 118 | const newCaretPositionNumber = owner._updateMaskedText(range.location, range.length, replacementString, isBackwardsIn); 119 | 120 | const caretPosition = textField.positionFromPositionOffset(textField.beginningOfDocument, newCaretPositionNumber); 121 | textField.selectedTextRange = textField.textRangeFromPositionToPosition(caretPosition, caretPosition); 122 | 123 | return false; // Always return false as we change the text ourselves, so no automatic change should happen. 124 | } 125 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nativescript-masked-text-field", 3 | "version": "4.0.3", 4 | "description": "A NativeScript masked text field widget.", 5 | "main": "masked-text-field", 6 | "typings": "masked-text-field.d.ts", 7 | "nativescript": { 8 | "platforms": { 9 | "android": "5.0.0", 10 | "ios": "5.0.0" 11 | }, 12 | "plugin": { 13 | "nan": "true", 14 | "pan": "true", 15 | "core3": "true", 16 | "category": "Interface" 17 | } 18 | }, 19 | "repository": { 20 | "type": "git", 21 | "url": "https://github.com/PeterStaev/nativescript-masked-text-field" 22 | }, 23 | "scripts": { 24 | "demo-ios": "grunt build && cd demo && tns run ios", 25 | "demo-android": "grunt build && cd demo && tns run android", 26 | "demo-ng-ios": "grunt build && cd demo-ng && tns run ios", 27 | "demo-ng-android": "grunt build && cd demo-ng && tns run android" 28 | }, 29 | "keywords": [ 30 | "NativeScript", 31 | "masked input", 32 | "mask", 33 | "masked text field", 34 | "phone", 35 | "ssn", 36 | "tangra" 37 | ], 38 | "author": "Peter Staev ", 39 | "contributors": [ 40 | "newapx (https://github.com/newapx)" 41 | ], 42 | "license": "Apache-2.0", 43 | "peerDependencies": { 44 | "tns-core-modules": ">=5" 45 | }, 46 | "devDependencies": { 47 | "@angular/common": "^5.2.11", 48 | "@angular/compiler": "^5.2.11", 49 | "@angular/compiler-cli": "^5.2.11", 50 | "@angular/core": "^5.2.11", 51 | "@angular/forms": "^5.2.11", 52 | "@angular/http": "^5.2.11", 53 | "@angular/platform-browser": "^5.2.11", 54 | "@angular/platform-browser-dynamic": "^5.2.11", 55 | "@angular/router": "^5.2.11", 56 | "grunt": "1.0.1", 57 | "grunt-contrib-clean": "1.1.0", 58 | "grunt-contrib-copy": "1.0.0", 59 | "grunt-exec": "2.0.0", 60 | "nativescript-angular": "^5.3.0", 61 | "rxjs": "~5.5.0", 62 | "tns-core-modules": "^4.0.1", 63 | "tns-platform-declarations": "^4.0.0", 64 | "tslint": "~5.1.0", 65 | "typescript": "^3.1.6", 66 | "zone.js": "~0.8.9" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /references.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// -------------------------------------------------------------------------------- /tsconfig.aot.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "noEmitOnError": true, 4 | "noEmitHelpers": true, 5 | "sourceMap": false, 6 | "removeComments": true, 7 | "declaration": true, 8 | "experimentalDecorators": true, 9 | "target": "es5", 10 | "module": "commonjs", 11 | "outDir": "bin/dist", 12 | "lib": ["es6", "dom", "es2015.iterable"], 13 | "rootDir": ".", 14 | "baseUrl": ".", 15 | "paths": { 16 | "*": [ 17 | "./node_modules/tns-core-modules/*", 18 | "./node_modules/*" 19 | ] 20 | }, 21 | "emitDecoratorMetadata": true, 22 | "moduleResolution": "node" 23 | }, 24 | "files": [ 25 | "angular/index.ts" 26 | ], 27 | "angularCompilerOptions": { 28 | "skipTemplateCodegen": true 29 | } 30 | } -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "noEmitOnError": true, 4 | "noEmitHelpers": true, 5 | "sourceMap": false, 6 | "removeComments": true, 7 | "declaration": false, 8 | "experimentalDecorators": true, 9 | "target": "es5", 10 | "module": "commonjs", 11 | "outDir": "bin/dist", 12 | "lib": ["es6", "dom"], 13 | "rootDir": ".", 14 | "baseUrl": ".", 15 | "paths": { 16 | "*": [ 17 | "./node_modules/tns-core-modules/*", 18 | "./node_modules/*" 19 | ] 20 | } 21 | }, 22 | "exclude": [ 23 | "node_modules", 24 | "demo", 25 | "demo-ng", 26 | "bin" 27 | ] 28 | } -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tslint:latest", 3 | "rules": { 4 | "eofline": false, 5 | "one-line": [ "check-open-brace" ], 6 | "object-literal-sort-keys": false, 7 | "interface-name": [ true, "never-prefix" ], 8 | "max-line-length": [ false ], 9 | "variable-name": [ true, "ban-keywords" ], 10 | "prefer-for-of": true, 11 | "no-string-literal": false, 12 | "no-trailing-whitespace": false, 13 | "trailing-comma": [ 14 | true, 15 | { 16 | "multiline": "never", 17 | "singleline": "never" 18 | } 19 | ], 20 | "switch-default": false, 21 | "max-classes-per-file": [false], 22 | "no-console": [ 23 | false 24 | ], 25 | "ordered-imports": [ 26 | true, 27 | {"named-imports-order": "lowercase-last"} 28 | ], 29 | "no-unused-variable": [true], 30 | "no-bitwise": false 31 | } 32 | } --------------------------------------------------------------------------------