This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="../../../../references.d.ts" /> | |
import {Injectable} from '@angular/core'; | |
import * as application from 'application'; | |
import {WebViewHeader} from './webview-header.abstract.service'; | |
declare const NSHTTPCookie; | |
declare const NSDictionary; | |
@Injectable() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="../../../../references.d.ts" /> | |
import {Injectable} from '@angular/core'; | |
import * as application from 'application'; | |
import {WebViewHeader} from './webview-header.abstract.service'; | |
declare const android; | |
@Injectable() | |
export class AndroidWebviewHeader extends WebViewHeader { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"watch":{ | |
"run_android":{ | |
"patterns":[ | |
"app" | |
], | |
"extensions":"ts,html,scss", | |
"quiet":true | |
}, | |
"run_ios":{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"watch": { | |
"run_android": { | |
"patterns": [ | |
"app" | |
], | |
"extensions": "ts,html,scss", | |
"quiet": true | |
}, | |
"run_ios": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Component} from '@angular/core'; | |
import {DialogButtonPosition} from './modules/dialog/models/DialogButtonPosition.model'; | |
import {DialogConfiguration} from './modules/dialog/models/DialogConfiguration.model'; | |
import {DialogSettings} from './modules/dialog/models/DialogSettings.model'; | |
import {Dialog} from './modules/dialog/services/Dialog.service'; | |
@Component({ selector : 'tbody', templateUrl : './app.component.html', styleUrls : [ './app.component.css' ] }) | |
export class AppComponent { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {async, TestBed} from '@angular/core/testing'; | |
import {AppComponent} from './app.component'; | |
describe('AppComponent', () => { | |
beforeEach(async(() => { | |
TestBed | |
.configureTestingModule({ | |
declarations: [AppComponent], | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
function WebView() { | |
var _this = _super.call(this) || this; | |
var configuration = WKWebViewConfiguration.new(); | |
_this._delegate = WKNavigationDelegateImpl.initWithOwner(new WeakRef(_this)); | |
var jScript | |
= 'var meta = document.createElement(\'meta\'); meta.setAttribute(\'name\', \'viewport\'); meta.setAttribute(\'content\', \'initial-scale=1.0\'); document.getElementsByTagName(\'head\')[0].appendChild(meta);'; | |
var cookieScript = ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Keyboard up event on ios | |
if (application.ios) { | |
// First Event is Catched before the Keyboard Jumps Up | |
// We Save the Height of the Keyboard for the Positioning of the LayoutElement | |
application.ios.addNotificationObserver(UIKeyboardWillShowNotification, (event) => { | |
// console.log('WillShow', typeof event.userInfo, event.userInfo.valueForKey(UIKeyboardFrameEndUserInfoKey).CGRectValue.size.height); | |
// console.log(this.textView.ios.contentSize); | |
this.contentSizeStartValue = event.userInfo.valueForKey(UIKeyboardFrameEndUserInfoKey).CGRectValue.size.height + 10; | |
}); | |
// Second Event is Catched when the Keyboard is Up to Reposition our Element |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Keyboard up event on ios | |
if (application.ios) { | |
// First Event is Catched before the Keyboard Jumps Up | |
// We Save the Height of the Keyboard for the Positioning of the LayoutElement | |
application.ios.addNotificationObserver(UIKeyboardWillShowNotification, (event) => { | |
// console.log('WillShow', typeof event.userInfo, event.userInfo.valueForKey(UIKeyboardFrameEndUserInfoKey).CGRectValue.size.height); | |
// console.log(this.textView.ios.contentSize); | |
this.contentSizeStartValue = event.userInfo.valueForKey(UIKeyboardFrameEndUserInfoKey).CGRectValue.size.height + 10; | |
}); | |
// Second Event is Catched when the Keyboard is Up to Reposition our Element |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public textChanged(): void { | |
if (isIOS) { | |
if (this.textView) { | |
if (this.textView.ios.contentSize.height > (100)) { | |
this.textViewHeight = 100; | |
this.textHeight = this.textView.ios.contentSize.height = 100 + this.contentSizeStartValue | |
} else { | |
this.textViewHeight = this.textView.ios.contentSize.height; | |
this.textHeight = this.contentSizeStartValue + this.textView.ios.contentSize.height; | |
} |
OlderNewer