This file contains hidden or 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
/* GLOBAL FONT DEFINITIONS | |
************************************/ | |
@font-face { | |
font-family: 'OptionSansMediumRegular'; | |
src: url('fonts/optionsansmedium-webfont.eot'); | |
src: local('☺'), url('fonts/optionsansmedium-webfont.woff') format('woff'), url('fonts/optionsansmedium-webfont.ttf') format('truetype'), url('fonts/optionsansmedium-webfont.svg#webfontAy7aGrJL') format('svg'); | |
font-weight: normal; | |
font-style: normal; | |
} |
This file contains hidden or 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
<!--[if (IE 8)|(IE 9)]> | |
if(isProduction) { | |
<script src="/components/infowrap-xdomain/dist/0.5/xdomain.min.js" data-slave="https://api.infowrap.com/compatibility/proxy.html"></script> | |
} else if(isStaging) { | |
<script src="/components/infowrap-xdomain/dist/0.5/xdomain.min.js" data-slave="https://api-staging.infowrap.com/compatibility/proxy-staging.html"></script> | |
} | |
<![endif]--> |
This file contains hidden or 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
// angular | |
import {Component} from '@angular/core'; | |
@Component({ | |
moduleId: module.id, | |
selector: 'app', | |
template: ` | |
<StackLayout> | |
<page-router-outlet></page-router-outlet> | |
</StackLayout> |
This file contains hidden or 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
// angular | |
import {Component, ViewEncapsulation} from '@angular/core'; | |
declare var Reflect: any; | |
const _reflect: any = Reflect; | |
// Usage: | |
// @BaseComponent({ etc... }) | |
export function BaseComponent(metadata: any = {}) { |
This file contains hidden or 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
var core_1 = require('@angular/core'); | |
var elementRegistry = require('nativescript-angular/element-registry'); | |
var _1 = require('./../'); | |
var layout_base_1 = require('ui/layouts/layout-base'); | |
var observable_array_1 = require('data/observable-array'); | |
var ListItemContext = (function (_super) { | |
__extends(ListItemContext, _super); | |
function ListItemContext($implicit, item, index, even, odd) { | |
_super.call(this, item); | |
this.$implicit = $implicit; |
This file contains hidden or 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
/** | |
* Add this to your app's SharedModule declarations | |
*/ | |
import { Directive, ElementRef, Input } from '@angular/core'; | |
// nativescript | |
import { View } from 'tns-core-modules/ui/core/view'; | |
import { Animation, AnimationDefinition } from 'tns-core-modules/ui/animation'; |
This file contains hidden or 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 { isIOS } from 'tns-core-modules/platform'; | |
let iPhoneX; | |
export function isIPhoneX() { | |
if (isIOS) { | |
if (typeof iPhoneX === 'undefined') { | |
const _SYS_NAMELEN: number = 256; | |
const buffer: any = interop.alloc(5 * _SYS_NAMELEN); |
This file contains hidden or 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
export function fixAndroidScrollMomentum(listview: ListView) { | |
if (android.os.Build.VERSION.SDK_INT !== 28) { | |
return; | |
} | |
// suppress the default momentum behaviour | |
listview.android.setVelocityScale(0); | |
// stores the last 5 move events in this array | |
let lastMoveEvents = []; | |
(<any>listview).on(GestureTypes.touch, (args, b) => { | |
if (args.action === 'up') { |
This file contains hidden or 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
// /xplat/nativescript/core/core.module.ts | |
import { MobileStorageService } from './services/mobile-storage.service'; | |
// Add this to providers, for example: | |
@NgModule({ | |
imports: [ | |
NativeScriptModule, | |
... | |
CoreModule.forRoot([ |
This file contains hidden or 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
const { join, relative, resolve, sep, dirname } = require('path'); | |
const webpack = require('webpack'); | |
const nsWebpack = require('nativescript-dev-webpack'); | |
const nativescriptTarget = require('nativescript-dev-webpack/nativescript-target'); | |
const { | |
nsReplaceBootstrap | |
} = require('nativescript-dev-webpack/transformers/ns-replace-bootstrap'); | |
const { | |
nsReplaceLazyLoader |
OlderNewer