├── .gitignore ├── LICENSE ├── README.md ├── demo.gif ├── demo ├── app │ ├── App_Resources │ │ ├── Android │ │ │ ├── drawable-hdpi │ │ │ │ └── icon.png │ │ │ ├── drawable-ldpi │ │ │ │ └── icon.png │ │ │ ├── drawable-mdpi │ │ │ │ └── icon.png │ │ │ └── drawable-nodpi │ │ │ │ └── splashscreen.9.png │ │ └── 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 │ ├── LICENSE │ ├── app.css │ ├── app.ts │ ├── main-page.ts │ ├── main-page.xml │ ├── main-view-model.ts │ └── package.json ├── package.json ├── references.d.ts ├── tsconfig.json └── tsconfig.tns.json ├── publish ├── pack.sh ├── package.json └── publish.sh ├── screenshot.gif ├── src ├── .npmignore ├── index.d.ts ├── iqkeyboardmanager.android.ts ├── iqkeyboardmanager.ios.ts ├── package.json ├── platforms │ └── ios │ │ └── Podfile ├── references.d.ts └── tsconfig.json └── tslint.json /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | .idea 3 | .DS_Store 4 | *.js 5 | *.js.map 6 | *.log 7 | package-lock.json 8 | src/*.d.ts 9 | !src/index.d.ts 10 | !src/references.d.ts 11 | demo/*.d.ts 12 | !demo/references.d.ts 13 | demo/platforms 14 | node_modules 15 | publish/src 16 | publish/package 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 TJ VanToll 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NativeScript IQKeyboardManager Plugin 2 | 3 | NativeScript wrapper for the popular [IQKeyboardManager](https://cocoapods.org/pods/IQKeyboardManager) iOS framework, which provides an elegant solution for preventing the iOS keyboard from covering `UITextView` controls. 4 | 5 | ![Example of using the IQKeyBoardManager NativeScript plugin on an iOS device](screenshot.gif) 6 | 7 | ## Installation 8 | 9 | ``` 10 | $ tns plugin add nativescript-iqkeyboardmanager 11 | ``` 12 | 13 | ## Usage 14 | 15 | That's it! IQKeyboardManager takes care of all initialization when your app starts up by default. 16 | 17 | ## Advanced usage 18 | 19 | ### Grouping related textfields (previous / next buttons) 20 | If your UI layout has sibling text fields, then IQKeyboardManager is able to automatically 21 | add previous / next buttons to the accessory bar which the user can use to jump back and forth. 22 | See those < and > buttons in the video above. 23 | 24 | In case those fields were not direct siblings, until version 1.3.0 of this plugin, you had no way 25 | to force the previous / next buttons to appear. However, now you can: 26 | 27 | #### NativeScript /w XML usage 28 | Note in the example below that the two `` controls are not siblings (both have parent `` containers). Because of this, IQKeyboardManager will not automatically provide an optimized keyboard by default. 29 | 30 | However, if you surround the controls with this plugin's `` control, as the example below shows, you will continue to get an optimized keyboard as expected. 31 | 32 | ```xml 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | ``` 48 | 49 | #### NativeScript /w Angular usage 50 | In the `.modules.ts` file where you want to use this feature (or the `app.module.ts`), 51 | register the `PreviousNextView` element: 52 | 53 | ```typescript 54 | import { registerElement } from "nativescript-angular"; 55 | registerElement("PreviousNextView", () => require("nativescript-iqkeyboardmanager").PreviousNextView); 56 | ``` 57 | 58 | Then in the view, use that element like this (again, we went nuts with the ``s: 59 | 60 | ```html 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | ``` 74 | 75 | #### NativeScript /w Vue usage 76 | Vue usage is very similar to Angular usage, the only difference is in how the element is registered. Open your app's entry file, and add this: 77 | 78 | ```javascript 79 | Vue.registerElement("PreviousNextView", () => require("nativescript-iqkeyboardmanager"). PreviousNextView) 80 | ``` 81 | 82 | ### Adding a placeholder/hint on a `TextView`'s accessory bar 83 | Looking at the gif above you may notice when focusing the Email address and password fields, 84 | the placeholder/hint of those `TextField`s is shown in the accessory bar above the keyboard. 85 | 86 | But when you use a `TextView` instead of a `TextField`, the placeholder is not shown because 87 | of an iOS limitation. You can work around this limitation by using the `TextViewWithHint` 88 | provided by this plugin. So whenever you want to use a `TextView` with a placeholder, 89 | use `TextViewWithHint` instead. 90 | 91 | #### NativeScript /w XML usage 92 | 93 | ```xml 94 | 95 | 96 | 97 | 98 | 99 | 100 | ``` 101 | 102 | #### NativeScript /w Angular usage 103 | In the `.modules.ts` file where you want to use this feature (or the `app.module.ts`), 104 | register the `TextViewWithHint` element: 105 | 106 | ```typescript 107 | import { registerElement } from "nativescript-angular"; 108 | registerElement("TextViewWithHint", () => require("nativescript-iqkeyboardmanager").TextViewWithHint); 109 | ``` 110 | 111 | Then in the view, use that element like this: 112 | 113 | ```html 114 | 115 | 116 | 117 | 118 | ``` 119 | 120 | #### NativeScript /w Vue usage 121 | Vue usage is very similar to Angular usage, the only difference is in how the element is registered. Open your app's entry file, and add this: 122 | 123 | ```javascript 124 | Vue.registerElement("TextViewWithHint", () => require("nativescript-iqkeyboardmanager").TextViewWithHint) 125 | ``` 126 | 127 | ### Tweaking the appearance and behavior 128 | 129 | Start by adding the following two paths into your app’s `references.d.ts` file. (See this repo’s demo app for a specific example.) 130 | 131 | ``` 132 | /// 133 | /// 134 | ``` 135 | 136 | > **NOTE**: You might also need to `npm install --save-dev tns-platform-declarations` to bring in NativeScript’s TypeScript definitions for native iOS development. 137 | 138 | Next, initialize an instance of `IQKeyboardManager` with the following line of code. 139 | 140 | ```typescript 141 | const iqKeyboard = IQKeyboardManager.sharedManager(); 142 | ``` 143 | 144 | You now have the full IQKeyboardManager APIs available for you to use. For example you could use the following code to switch to a dark keyboard. 145 | 146 | ```typescript 147 | const iqKeyboard = IQKeyboardManager.sharedManager(); 148 | iqKeyboard.overrideKeyboardAppearance = true; 149 | iqKeyboard.keyboardAppearance = UIKeyboardAppearance.Dark; 150 | ``` 151 | 152 | For more examples of what's possible, run the demo app (shown in the gif below) and check out the [app's `main-view-model.ts` file](demo/app/main-view-model.ts). 153 | 154 | 155 | 156 | ### Multi-factor one-time code auto-fill 157 | 158 | While the following is not a feature specific to IQKeyboardManager, you are here because you want the best keyboard experience for your NativeScript app and this may be helpful to know about. 159 | 160 | iOS has a feature where a text field's QuickType search suggestion bar can suggest one-time code values for multi-factor authentication that were texted to your device. 161 | 162 | If the field is specially-identified as a one-time code field, the suggestion will appear for about 3 minutes after being received, and the user simply has to tap the suggestion to fill in the value—no short term memorization or copy/paste gestures required. Examples of message formats are: 163 | * 123456 is your App Name code. 164 | * 123456 is your App Name login code. 165 | * 123456 is your App Name verification code. 166 | 167 | To implement this functionality in your own app, first declare `UITextContentTypeOneTimeCode` near your component imports: 168 | 169 | ```typescript 170 | declare var UITextContentTypeOneTimeCode; 171 | ``` 172 | 173 | Then, set the field's `ios.textContentType` property: 174 | 175 | ```typescript 176 | // This code assumes this.page exists as a reference to the current Page. 177 | const mfaCodeField: TextField = this.page.getViewById(oneTimeCodeFieldName); 178 | if (mfaCodeField !== null && mfaCodeField.ios) { 179 | mfaCodeField.ios.textContentType = UITextContentTypeOneTimeCode; 180 | } 181 | ``` 182 | 183 | There are other `textContentType` values you might want to use. You can read more about the property in [this article](https://medium.com/developerinsider/ios12-password-autofill-automatic-strong-password-and-security-code-autofill-6e7db8da1810). 184 | 185 | ## Documentation 186 | 187 | For more details on how IQKeyboardManager works, including more detailed API documentation, refer to [the library's CocoaPod page](https://cocoapods.org/pods/IQKeyboardManager). 188 | 189 | ## Maintainers 190 | 191 | For maintainer’s of this plugin’s source code: when the [IQKeyboardManager Podfile](platforms/ios/Podfile) updates, you should generate new typings for for this plugin to reflect those changes. 192 | 193 | To do so, execute these commands. 194 | 195 | ```bash 196 | cd demo 197 | TNS_DEBUG_METADATA_PATH="$(pwd)/metadata" tns build ios 198 | TNS_TYPESCRIPT_DECLARATIONS_PATH="$(pwd)/typings" tns build ios 199 | ``` 200 | 201 | Next, locate IQKeyboardManager’s generated typings file in the `demo/typings` folder and override the `IQKeyboardManager.d.ts` file in this repo’s root. 202 | -------------------------------------------------------------------------------- /demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/demo.gif -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/demo/app/App_Resources/Android/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/demo/app/App_Resources/Android/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/demo/app/App_Resources/Android/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/demo/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png -------------------------------------------------------------------------------- /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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/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/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiresFullScreen 28 | 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/build.xcconfig: -------------------------------------------------------------------------------- 1 | // You can add custom settings here 2 | // for example you can uncomment the following line to force distribution code signing 3 | // CODE_SIGN_IDENTITY = iPhone Distribution 4 | // To build for device with Xcode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html 5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID; 6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 7 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 8 | -------------------------------------------------------------------------------- /demo/app/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Telerik AD 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /demo/app/app.css: -------------------------------------------------------------------------------- 1 | TextField, TextView { 2 | margin: 10; 3 | padding: 5; 4 | border-color: black; 5 | border-width: 1; 6 | } 7 | 8 | TextView { 9 | padding: 8; 10 | font-size: 14; 11 | } 12 | 13 | GridLayout { 14 | padding: 10; 15 | } 16 | 17 | Switch { 18 | horizontal-align: right; 19 | } 20 | 21 | Label { 22 | margin: 10 0; 23 | } 24 | 25 | Label.title { 26 | font-weight: bold; 27 | text-align: center; 28 | } 29 | 30 | Label.disabled { 31 | color: #bbb; 32 | } -------------------------------------------------------------------------------- /demo/app/app.ts: -------------------------------------------------------------------------------- 1 | import * as application from "tns-core-modules/application"; 2 | 3 | application.run({moduleName: "main-page"}); 4 | -------------------------------------------------------------------------------- /demo/app/main-page.ts: -------------------------------------------------------------------------------- 1 | import * as observable from "tns-core-modules/data/observable"; 2 | import * as pages from "tns-core-modules/ui/page"; 3 | import { HelloWorldModel } from "./main-view-model"; 4 | 5 | // Event handler for Page "loaded" event attached in main-page.xml 6 | export function pageLoaded(args: observable.EventData) { 7 | // Get the event sender 8 | let page = args.object; 9 | page.bindingContext = new HelloWorldModel(); 10 | } 11 | -------------------------------------------------------------------------------- /demo/app/main-page.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /demo/app/main-view-model.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from "tns-core-modules/data/observable"; 2 | import { isIOS } from "tns-core-modules/platform"; 3 | 4 | export class HelloWorldModel extends Observable { 5 | private iqKeyboard: IQKeyboardManager; 6 | 7 | public iqKeyboardEnabled: boolean = true; 8 | public iqKeyboardToolbarEnabled: boolean = true; 9 | public keepKeyboardOpenOnTouchOutside: boolean = true; 10 | public showHintInToolbar: boolean = true; 11 | public keyboardAppearanceDark: boolean = false; 12 | public toggleDoneButtonTextChanged: boolean = false; 13 | public increaseKeyboardDistanceFromTextField: boolean = false; 14 | 15 | public textViewText; 16 | public textViewWithHintText; 17 | 18 | constructor() { 19 | super(); 20 | if (isIOS) { 21 | this.iqKeyboard = IQKeyboardManager.sharedManager(); 22 | } 23 | 24 | // setInterval(() => { 25 | // console.log("textViewText: " + this.textViewText); 26 | // console.log("textViewWithHintText: " + this.textViewWithHintText); 27 | // }, 2000); 28 | } 29 | 30 | toggleIQKeyboard(): void { 31 | this.iqKeyboard.enable = !this.iqKeyboard.enable; 32 | } 33 | 34 | toggleIQKeyboardToolbar(): void { 35 | this.iqKeyboard.enableAutoToolbar = !this.iqKeyboard.enableAutoToolbar; 36 | } 37 | 38 | toggleKeepKeyboardOpen(): void { 39 | this.iqKeyboard.shouldResignOnTouchOutside = !this.iqKeyboard.shouldResignOnTouchOutside; 40 | } 41 | 42 | toggleShowHintInToolbar(): void { 43 | this.iqKeyboard.shouldShowTextFieldPlaceholder = !this.iqKeyboard.shouldShowTextFieldPlaceholder; 44 | } 45 | 46 | toggleKeyboardAppearance(): void { 47 | this.iqKeyboard.overrideKeyboardAppearance = true; 48 | this.iqKeyboard.keyboardAppearance = 49 | this.iqKeyboard.keyboardAppearance === UIKeyboardAppearance.Default ? UIKeyboardAppearance.Dark : UIKeyboardAppearance.Default; 50 | } 51 | 52 | toggleDoneButtonText(): void { 53 | this.iqKeyboard.toolbarDoneBarButtonItemText = this.toggleDoneButtonTextChanged ? "Ready" : "Done"; 54 | } 55 | 56 | toggleIncreaseKeyboardDistanceFromTextField(): void { 57 | this.iqKeyboard.keyboardDistanceFromTextField = this.iqKeyboard.keyboardDistanceFromTextField === 10 ? 30 : 10; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /demo/app/package.json: -------------------------------------------------------------------------------- 1 | {"name":"tns-template-hello-world","main":"app.js","jsoptions":"--expose_gc","version":"1.4.0","author":{"name":"Telerik","email":"support@telerik.com"},"description":"Nativescript hello-world project template","license":"BSD","keywords":["telerik","mobile","nativescript","{N}","tns","appbuilder","template"],"repository":{"type":"git","url":"git://github.com/NativeScript/template-hello-world.git"},"bugs":{"url":"https://github.com/NativeScript/template-hello-world/issues"},"homepage":"https://github.com/NativeScript/template-hello-world","readme":"ERROR: No README data found!","_id":"tns-template-hello-world@1.4.0","_from":"tns-template-hello-world@1.4.0"} -------------------------------------------------------------------------------- /demo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "nativescript": { 3 | "id": "org.nativescript.iqkeyboardmanagerdemo", 4 | "tns-ios": { 5 | "version": "6.2.0" 6 | }, 7 | "tns-android": { 8 | "version": "6.2.0" 9 | } 10 | }, 11 | "dependencies": { 12 | "nativescript-iqkeyboardmanager": "../src", 13 | "tns-core-modules": "~6.2.0" 14 | }, 15 | "devDependencies": { 16 | "tns-platform-declarations": "~6.2.0", 17 | "typescript": "~3.4.5", 18 | "nativescript-dev-webpack": "~1.0.0" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo/references.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// -------------------------------------------------------------------------------- /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 | "app/*" 17 | ], 18 | "*": [ 19 | "./node_modules/*" 20 | ] 21 | } 22 | }, 23 | "exclude": [ 24 | "node_modules", 25 | "platforms" 26 | ] 27 | } -------------------------------------------------------------------------------- /demo/tsconfig.tns.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig", 3 | "compilerOptions": { 4 | "module": "es2015", 5 | "moduleResolution": "node" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /publish/pack.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SOURCE_DIR=../src; 4 | TO_SOURCE_DIR=src; 5 | PACK_DIR=package; 6 | ROOT_DIR=..; 7 | PUBLISH=--publish 8 | 9 | install(){ 10 | npm i 11 | } 12 | 13 | pack() { 14 | 15 | echo 'Clearing /src and /package...' 16 | node_modules/.bin/rimraf "$TO_SOURCE_DIR" 17 | node_modules/.bin/rimraf "$PACK_DIR" 18 | 19 | # copy src 20 | echo 'Copying src...' 21 | node_modules/.bin/ncp "$SOURCE_DIR" "$TO_SOURCE_DIR" 22 | 23 | # copy README & LICENSE to src 24 | echo 'Copying README and LICENSE to /src...' 25 | node_modules/.bin/ncp "$ROOT_DIR"/LICENSE "$TO_SOURCE_DIR"/LICENSE 26 | node_modules/.bin/ncp "$ROOT_DIR"/README.md "$TO_SOURCE_DIR"/README.md 27 | 28 | # compile package and copy files required by npm 29 | echo 'Building /src...' 30 | cd "$TO_SOURCE_DIR" 31 | node_modules/.bin/tsc 32 | cd .. 33 | 34 | echo 'Creating package...' 35 | # create package dir 36 | mkdir "$PACK_DIR" 37 | 38 | # create the package 39 | cd "$PACK_DIR" 40 | npm pack ../"$TO_SOURCE_DIR" 41 | 42 | # delete source directory used to create the package 43 | cd .. 44 | node_modules/.bin/rimraf "$TO_SOURCE_DIR" 45 | } 46 | 47 | install && pack -------------------------------------------------------------------------------- /publish/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nativescript-publish", 3 | "version": "1.0.0", 4 | "description": "Publish helper", 5 | "devDependencies": { 6 | "ncp": "^2.0.0", 7 | "rimraf": "^2.5.0" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /publish/publish.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | PACK_DIR=package; 4 | 5 | publish() { 6 | cd $PACK_DIR 7 | echo 'Publishing to npm...' 8 | npm publish *.tgz 9 | } 10 | 11 | ./pack.sh && publish -------------------------------------------------------------------------------- /screenshot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tjvantoll/nativescript-IQKeyboardManager/e7d1486f2f7f4e12347e1c388d5cf57a24e67df7/screenshot.gif -------------------------------------------------------------------------------- /src/.npmignore: -------------------------------------------------------------------------------- 1 | *.map 2 | *.ts 3 | !index.d.ts 4 | tsconfig.json 5 | package-lock.json 6 | -------------------------------------------------------------------------------- /src/index.d.ts: -------------------------------------------------------------------------------- 1 | declare class PreviousNextView { 2 | } 3 | 4 | declare class TextViewWithHint { 5 | } 6 | 7 | declare const enum IQAutoToolbarManageBehaviour { 8 | 9 | BySubviews = 0, 10 | 11 | ByTag = 1, 12 | 13 | ByPosition = 2 14 | } 15 | 16 | declare class IQBarButtonItem extends UIBarButtonItem { 17 | 18 | static alloc(): IQBarButtonItem; // inherited from NSObject 19 | 20 | static appearance(): IQBarButtonItem; // inherited from UIAppearance 21 | 22 | static appearanceForTraitCollection(trait: UITraitCollection): IQBarButtonItem; // inherited from UIAppearance 23 | 24 | static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): IQBarButtonItem; // inherited from UIAppearance 25 | 26 | static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray | typeof NSObject[]): IQBarButtonItem; // inherited from UIAppearance 27 | 28 | static appearanceWhenContainedIn(ContainerClass: typeof NSObject): IQBarButtonItem; // inherited from UIAppearance 29 | 30 | static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray | typeof NSObject[]): IQBarButtonItem; // inherited from UIAppearance 31 | 32 | static new(): IQBarButtonItem; // inherited from NSObject 33 | 34 | invocation: NSInvocation; 35 | 36 | readonly isSystemItem: boolean; 37 | 38 | setTargetAction(target: any, action: string): void; 39 | } 40 | 41 | declare class IQBarButtonItemConfiguration extends NSObject { 42 | 43 | static alloc(): IQBarButtonItemConfiguration; // inherited from NSObject 44 | 45 | static new(): IQBarButtonItemConfiguration; // inherited from NSObject 46 | 47 | readonly action: string; 48 | 49 | readonly barButtonSystemItem: UIBarButtonSystemItem; 50 | 51 | readonly image: UIImage; 52 | 53 | readonly title: string; 54 | 55 | constructor(o: { barButtonSystemItem: UIBarButtonSystemItem; action: string; }); 56 | 57 | constructor(o: { image: UIImage; action: string; }); 58 | 59 | constructor(o: { title: string; action: string; }); 60 | 61 | initWithBarButtonSystemItemAction(barButtonSystemItem: UIBarButtonSystemItem, action: string): this; 62 | 63 | initWithImageAction(image: UIImage, action: string): this; 64 | 65 | initWithTitleAction(title: string, action: string): this; 66 | } 67 | 68 | declare const enum IQEnableMode { 69 | 70 | Default = 0, 71 | 72 | Enabled = 1, 73 | 74 | Disabled = 2 75 | } 76 | 77 | declare class IQKeyboardManager extends NSObject { 78 | 79 | static alloc(): IQKeyboardManager; // inherited from NSObject 80 | 81 | static new(): IQKeyboardManager; // inherited from NSObject 82 | 83 | static sharedManager(): IQKeyboardManager; 84 | 85 | readonly canGoNext: boolean; 86 | 87 | readonly canGoPrevious: boolean; 88 | 89 | readonly disabledDistanceHandlingClasses: NSMutableSet; 90 | 91 | readonly disabledToolbarClasses: NSMutableSet; 92 | 93 | readonly disabledTouchResignedClasses: NSMutableSet; 94 | 95 | enable: boolean; 96 | 97 | enableAutoToolbar: boolean; 98 | 99 | enableDebugging: boolean; 100 | 101 | readonly enabledDistanceHandlingClasses: NSMutableSet; 102 | 103 | readonly enabledToolbarClasses: NSMutableSet; 104 | 105 | readonly enabledTouchResignedClasses: NSMutableSet; 106 | 107 | keyboardAppearance: UIKeyboardAppearance; 108 | 109 | keyboardDistanceFromTextField: number; 110 | 111 | readonly keyboardShowing: boolean; 112 | 113 | layoutIfNeededOnUpdate: boolean; 114 | 115 | readonly movedDistance: number; 116 | 117 | overrideKeyboardAppearance: boolean; 118 | 119 | placeholderButtonColor: UIColor; 120 | 121 | placeholderColor: UIColor; 122 | 123 | placeholderFont: UIFont; 124 | 125 | previousNextDisplayMode: IQPreviousNextDisplayMode; 126 | 127 | readonly resignFirstResponderGesture: UITapGestureRecognizer; 128 | 129 | shouldPlayInputClicks: boolean; 130 | 131 | shouldResignOnTouchOutside: boolean; 132 | 133 | shouldShowToolbarPlaceholder: boolean; 134 | 135 | shouldToolbarUsesTextFieldTintColor: boolean; 136 | 137 | toolbarBarTintColor: UIColor; 138 | 139 | toolbarDoneBarButtonItemImage: UIImage; 140 | 141 | toolbarDoneBarButtonItemText: string; 142 | 143 | toolbarManageBehaviour: IQAutoToolbarManageBehaviour; 144 | 145 | toolbarNextBarButtonItemImage: UIImage; 146 | 147 | toolbarNextBarButtonItemText: string; 148 | 149 | toolbarPreviousBarButtonItemImage: UIImage; 150 | 151 | toolbarPreviousBarButtonItemText: string; 152 | 153 | readonly toolbarPreviousNextAllowedClasses: NSMutableSet; 154 | 155 | toolbarTintColor: UIColor; 156 | 157 | readonly touchResignedGestureIgnoreClasses: NSMutableSet; 158 | 159 | goNext(): boolean; 160 | 161 | goPrevious(): boolean; 162 | 163 | registerAllNotifications(): void; 164 | 165 | registerTextFieldViewClassDidBeginEditingNotificationNameDidEndEditingNotificationName(aClass: typeof NSObject, didBeginEditingNotificationName: string, didEndEditingNotificationName: string): void; 166 | 167 | reloadInputViews(): void; 168 | 169 | reloadLayoutIfNeeded(): void; 170 | 171 | resignFirstResponder(): boolean; 172 | 173 | unregisterAllNotifications(): void; 174 | 175 | unregisterTextFieldViewClassDidBeginEditingNotificationNameDidEndEditingNotificationName(aClass: typeof NSObject, didBeginEditingNotificationName: string, didEndEditingNotificationName: string): void; 176 | } 177 | 178 | declare var IQKeyboardManagerVersionNumber: number; 179 | 180 | declare var IQKeyboardManagerVersionString: interop.Reference; 181 | 182 | declare class IQKeyboardReturnKeyHandler extends NSObject { 183 | 184 | static alloc(): IQKeyboardReturnKeyHandler; // inherited from NSObject 185 | 186 | static new(): IQKeyboardReturnKeyHandler; // inherited from NSObject 187 | 188 | delegate: any; 189 | 190 | lastTextFieldReturnKeyType: UIReturnKeyType; 191 | 192 | constructor(o: { viewController: UIViewController; }); 193 | 194 | addResponderFromView(view: UIView): void; 195 | 196 | addTextFieldView(textFieldView: UIView): void; 197 | 198 | initWithViewController(controller: UIViewController): this; 199 | 200 | removeResponderFromView(view: UIView): void; 201 | 202 | removeTextFieldView(textFieldView: UIView): void; 203 | } 204 | 205 | declare const enum IQPreviousNextDisplayMode { 206 | 207 | Default = 0, 208 | 209 | AlwaysHide = 1, 210 | 211 | AlwaysShow = 2 212 | } 213 | 214 | declare class IQPreviousNextView extends UIView { 215 | 216 | static alloc(): IQPreviousNextView; // inherited from NSObject 217 | 218 | static appearance(): IQPreviousNextView; // inherited from UIAppearance 219 | 220 | static appearanceForTraitCollection(trait: UITraitCollection): IQPreviousNextView; // inherited from UIAppearance 221 | 222 | static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): IQPreviousNextView; // inherited from UIAppearance 223 | 224 | static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray | typeof NSObject[]): IQPreviousNextView; // inherited from UIAppearance 225 | 226 | static appearanceWhenContainedIn(ContainerClass: typeof NSObject): IQPreviousNextView; // inherited from UIAppearance 227 | 228 | static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray | typeof NSObject[]): IQPreviousNextView; // inherited from UIAppearance 229 | 230 | static new(): IQPreviousNextView; // inherited from NSObject 231 | } 232 | 233 | declare class IQTextView extends UITextView { 234 | 235 | static alloc(): IQTextView; // inherited from NSObject 236 | 237 | static appearance(): IQTextView; // inherited from UIAppearance 238 | 239 | static appearanceForTraitCollection(trait: UITraitCollection): IQTextView; // inherited from UIAppearance 240 | 241 | static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): IQTextView; // inherited from UIAppearance 242 | 243 | static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray | typeof NSObject[]): IQTextView; // inherited from UIAppearance 244 | 245 | static appearanceWhenContainedIn(ContainerClass: typeof NSObject): IQTextView; // inherited from UIAppearance 246 | 247 | static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray | typeof NSObject[]): IQTextView; // inherited from UIAppearance 248 | 249 | static new(): IQTextView; // inherited from NSObject 250 | 251 | attributedPlaceholder: NSAttributedString; 252 | 253 | placeholder: string; 254 | 255 | placeholderTextColor: UIColor; 256 | } 257 | 258 | declare class IQTitleBarButtonItem extends IQBarButtonItem { 259 | 260 | static alloc(): IQTitleBarButtonItem; // inherited from NSObject 261 | 262 | static appearance(): IQTitleBarButtonItem; // inherited from UIAppearance 263 | 264 | static appearanceForTraitCollection(trait: UITraitCollection): IQTitleBarButtonItem; // inherited from UIAppearance 265 | 266 | static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): IQTitleBarButtonItem; // inherited from UIAppearance 267 | 268 | static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray | typeof NSObject[]): IQTitleBarButtonItem; // inherited from UIAppearance 269 | 270 | static appearanceWhenContainedIn(ContainerClass: typeof NSObject): IQTitleBarButtonItem; // inherited from UIAppearance 271 | 272 | static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray | typeof NSObject[]): IQTitleBarButtonItem; // inherited from UIAppearance 273 | 274 | static new(): IQTitleBarButtonItem; // inherited from NSObject 275 | 276 | selectableTitleColor: UIColor; 277 | 278 | titleColor: UIColor; 279 | 280 | titleFont: UIFont; 281 | 282 | constructor(o: { title: string; }); 283 | 284 | initWithTitle(title: string): this; 285 | } 286 | 287 | declare class IQToolbar extends UIToolbar implements UIInputViewAudioFeedback { 288 | 289 | static alloc(): IQToolbar; // inherited from NSObject 290 | 291 | static appearance(): IQToolbar; // inherited from UIAppearance 292 | 293 | static appearanceForTraitCollection(trait: UITraitCollection): IQToolbar; // inherited from UIAppearance 294 | 295 | static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): IQToolbar; // inherited from UIAppearance 296 | 297 | static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray | typeof NSObject[]): IQToolbar; // inherited from UIAppearance 298 | 299 | static appearanceWhenContainedIn(ContainerClass: typeof NSObject): IQToolbar; // inherited from UIAppearance 300 | 301 | static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray | typeof NSObject[]): IQToolbar; // inherited from UIAppearance 302 | 303 | static new(): IQToolbar; // inherited from NSObject 304 | 305 | doneBarButton: IQBarButtonItem; 306 | 307 | fixedSpaceBarButton: IQBarButtonItem; 308 | 309 | nextBarButton: IQBarButtonItem; 310 | 311 | previousBarButton: IQBarButtonItem; 312 | 313 | readonly titleBarButton: IQTitleBarButtonItem; 314 | 315 | readonly debugDescription: string; // inherited from NSObjectProtocol 316 | 317 | readonly description: string; // inherited from NSObjectProtocol 318 | 319 | readonly enableInputClicksWhenVisible: boolean; // inherited from UIInputViewAudioFeedback 320 | 321 | readonly hash: number; // inherited from NSObjectProtocol 322 | 323 | readonly isProxy: boolean; // inherited from NSObjectProtocol 324 | 325 | readonly superclass: typeof NSObject; // inherited from NSObjectProtocol 326 | 327 | readonly; // inherited from NSObjectProtocol 328 | 329 | class(): typeof NSObject; 330 | 331 | conformsToProtocol(aProtocol: any /* Protocol */): boolean; 332 | 333 | isEqual(object: any): boolean; 334 | 335 | isKindOfClass(aClass: typeof NSObject): boolean; 336 | 337 | isMemberOfClass(aClass: typeof NSObject): boolean; 338 | 339 | performSelector(aSelector: string): any; 340 | 341 | performSelectorWithObject(aSelector: string, object: any): any; 342 | 343 | performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; 344 | 345 | respondsToSelector(aSelector: string): boolean; 346 | 347 | retainCount(): number; 348 | 349 | self(): this; 350 | } 351 | 352 | declare var kIQDoneButtonToolbarTag: number; 353 | 354 | declare var kIQPreviousNextButtonToolbarTag: number; 355 | 356 | declare var kIQUseDefaultKeyboardDistance: number; 357 | -------------------------------------------------------------------------------- /src/iqkeyboardmanager.android.ts: -------------------------------------------------------------------------------- 1 | import { ContentView } from "tns-core-modules/ui/content-view"; 2 | import { TextView } from "tns-core-modules/ui/text-view"; 3 | 4 | export class PreviousNextView extends ContentView { 5 | } 6 | 7 | export class TextViewWithHint extends TextView { 8 | } -------------------------------------------------------------------------------- /src/iqkeyboardmanager.ios.ts: -------------------------------------------------------------------------------- 1 | import { ContentView } from "tns-core-modules/ui/content-view"; 2 | import { TextView } from "tns-core-modules/ui/text-view"; 3 | 4 | export class PreviousNextView extends ContentView { 5 | createNativeView() { 6 | return IQPreviousNextView.new(); 7 | } 8 | } 9 | 10 | export class TextViewWithHint extends TextView { 11 | createNativeView() { 12 | const view = IQTextView.new(); 13 | this.nativeView = view; 14 | view.placeholder = this.hint; 15 | return view; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nativescript-iqkeyboardmanager", 3 | "version": "1.5.1", 4 | "description": "NativeScript wrapper of the popular IQKeyboardManager iOS library", 5 | "main": "iqkeyboardmanager", 6 | "typings": "index.d.ts", 7 | "nativescript": { 8 | "platforms": { 9 | "ios": "3.0.0", 10 | "android": "3.0.0" 11 | } 12 | }, 13 | "scripts": { 14 | "build": "npm i && tsc", 15 | "demo.ios": "npm run build && cd ../demo && tns run ios --emulator", 16 | "demo.ios.device": "npm run build && cd ../demo && tns run ios", 17 | "demo.android": "npm run build && cd ../demo && tns run android", 18 | "setup": "npm run build && cd ../demo && npm i", 19 | "setupandinstall": "npm i && cd ../demo && npm i && cd ../src && npm run build && cd ../demo && tns plugin add ../src && cd ../src", 20 | "tslint": "tslint --config '../tslint.json' '*.ts' --exclude '**/node_modules/**'", 21 | "tslint.demo": "tslint --config '../tslint.json' '../demo/app/*.ts' --exclude '**/node_modules/**'", 22 | "ci.tslint": "npm run tslint && npm run tslint.demo", 23 | "prepublishOnly": "npm run build", 24 | "development.setup": "npm run setup && npm link && cd ../demo && npm link nativescript-iqkeyboardmanager && cd ../src", 25 | "generate.typings.ios": "cd ../demo && TNS_DEBUG_METADATA_PATH=\"$(pwd)/metadata\" tns build ios && TNS_TYPESCRIPT_DECLARATIONS_PATH=\"$(pwd)/typings\" tns build ios" 26 | }, 27 | "repository": { 28 | "type": "git", 29 | "url": "https://github.com/tjvantoll/nativescript-IQKeyboardManager.git" 30 | }, 31 | "keywords": [ 32 | "NativeScript" 33 | ], 34 | "author": "TJ VanToll (http://tjvantoll.com/)", 35 | "license": "MIT", 36 | "contributors": [ 37 | { 38 | "name": "Eddy Verbruggen", 39 | "email": "eddyverbruggen@gmail.com" 40 | } 41 | ], 42 | "homepage": "https://github.com/tjvantoll/nativescript-IQKeyboardManager", 43 | "bugs": { 44 | "url": "https://github.com/tjvantoll/nativescript-IQKeyboardManager/issues" 45 | }, 46 | "devDependencies": { 47 | "nativescript-dev-typescript": "~0.10.0", 48 | "tns-core-modules": "~6.2.0", 49 | "tns-platform-declarations": "~6.2.0", 50 | "typescript": "3.4.5", 51 | "tslint": "^5.0.0" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/platforms/ios/Podfile: -------------------------------------------------------------------------------- 1 | # bumping beyond 6.2.0 (to at least 6.5) will break the next button for TextFields (not for TextViews) 2 | pod 'IQKeyboardManager', '~> 6.2.0' -------------------------------------------------------------------------------- /src/references.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /src/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "commonjs", 5 | "declaration": true, 6 | "removeComments": true, 7 | "noLib": false, 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "lib": [ 11 | "es6", 12 | "dom" 13 | ], 14 | "sourceMap": false, 15 | "pretty": true, 16 | "allowUnreachableCode": false, 17 | "allowUnusedLabels": false, 18 | "noEmitHelpers": true, 19 | "noEmitOnError": false, 20 | "noImplicitAny": false, 21 | "noImplicitReturns": true, 22 | "noImplicitUseStrict": false, 23 | "noFallthroughCasesInSwitch": true, 24 | "typeRoots": [ 25 | "./node_modules/@types", 26 | "./node_modules" 27 | ], 28 | "types": [ 29 | ] 30 | }, 31 | "exclude": [ 32 | "demo", 33 | "node_modules" 34 | ], 35 | "compileOnSave": false 36 | } 37 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "class-name": true, 4 | "comment-format": [ 5 | true, 6 | "check-space" 7 | ], 8 | "indent": [ 9 | true, 10 | "spaces" 11 | ], 12 | "no-duplicate-variable": true, 13 | "no-eval": true, 14 | "no-internal-module": true, 15 | "no-trailing-whitespace": true, 16 | "no-var-keyword": true, 17 | "one-line": [ 18 | true, 19 | "check-open-brace", 20 | "check-whitespace" 21 | ], 22 | "quotemark": [ 23 | false, 24 | "double" 25 | ], 26 | "semicolon": [ 27 | true, 28 | "always" 29 | ], 30 | "triple-equals": [ 31 | true, 32 | "allow-null-check" 33 | ], 34 | "typedef-whitespace": [ 35 | true, 36 | { 37 | "call-signature": "nospace", 38 | "index-signature": "nospace", 39 | "parameter": "nospace", 40 | "property-declaration": "nospace", 41 | "variable-declaration": "nospace" 42 | } 43 | ], 44 | "variable-name": [ 45 | true, 46 | "ban-keywords" 47 | ], 48 | "whitespace": [ 49 | true, 50 | "check-branch", 51 | "check-decl", 52 | "check-operator", 53 | "check-separator", 54 | "check-type" 55 | ] 56 | } 57 | } --------------------------------------------------------------------------------