Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: NS7 #113

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion demo-glasses/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@angular/platform-browser-dynamic": "~11.0.0",
"@angular/router": "~11.0.0",
"@nativescript/angular": "~11.0.0",
"nativescript-ar": "file:../publish/package/nativescript-ar-1.1.0.tgz",
"nativescript-ar": "file:../publish/package/nativescript-ar-2.0.0.tgz",
"nativescript-pager": "~11.0.10",
"nativescript-theme-core": "^2.0.24",
"reflect-metadata": "~0.1.12",
Expand Down
3 changes: 2 additions & 1 deletion demo-glasses/src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ In many cases you may want to use the NativeScript core theme instead
of writing your own CSS rules. For a full list of class names in the theme
refer to http://docs.nativescript.org/ui/theme.
*/
@import '~nativescript-theme-core/css/core.light.css';
@import '@nativescript/theme/core';
@import '@nativescript/theme/default';

/*
For example, the following CSS rule changes the font size of all UI
Expand Down
7 changes: 0 additions & 7 deletions demo-pokemon/App_Resources/iOS/build.xcconfig

This file was deleted.

11 changes: 11 additions & 0 deletions demo-pokemon/nativescript.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { NativeScriptConfig } from '@nativescript/core'

export default {
id: 'org.nativescript.plugindemo.ar.ng.pokemon',
appPath: 'src',
appResourcesPath: 'App_Resources',
android: {
v8Flags: '--expose_gc',
markingMode: 'none',
},
} as NativeScriptConfig
4 changes: 0 additions & 4 deletions demo-pokemon/nsconfig.json

This file was deleted.

49 changes: 21 additions & 28 deletions demo-pokemon/package.json
Original file line number Diff line number Diff line change
@@ -1,46 +1,39 @@
{
"nativescript": {
"id": "org.nativescript.plugindemo.ar.ng.pokemon",
"tns-android": {
"version": "6.1.2"
},
"tns-ios": {
"version": "6.1.1"
}
},
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"repository": "<fill-your-repository-here>",
"scripts": {
"lint": "tslint \"src/**/*.ts\""
},
"dependencies": {
"@angular/animations": "~11.0.0",
"@angular/common": "~11.0.0",
"@angular/compiler": "~11.0.0",
"@angular/core": "~11.0.0",
"@angular/forms": "~11.0.0",
"@angular/platform-browser": "~11.0.0",
"@angular/platform-browser-dynamic": "~11.0.0",
"@angular/router": "~11.0.0",
"@nativescript/angular": "~11.0.0",
"nativescript-ar": "file:../publish/package/nativescript-ar-1.1.0.tgz",
"nativescript-theme-core": "^2.0.24",
"nativescript-ui-sidedrawer": "~7.0.2",
"@angular/animations": "~11.2.7",
"@angular/common": "~11.2.7",
"@angular/compiler": "~11.2.7",
"@angular/core": "~11.2.7",
"@angular/forms": "~11.2.7",
"@angular/platform-browser": "~11.2.7",
"@angular/platform-browser-dynamic": "~11.2.7",
"@angular/router": "~11.2.7",
"@nativescript/angular": "~11.8.0",
"@nativescript/core": "~8.0.0",
"@nativescript/theme": "~3.0.1",
"nativescript-ar": "file:../publish/package/nativescript-ar-2.0.0.tgz",
"nativescript-ui-sidedrawer": "~9.0.3",
"reflect-metadata": "~0.1.12",
"rxjs": "^6.4.0",
"@nativescript/core": "^7.0.13",
"zone.js": "~0.9.1"
"zone.js": "~0.11.1"
},
"devDependencies": {
"@angular/compiler-cli": "~11.0.0",
"@ngtools/webpack": "~11.0.0",
"@angular/compiler-cli": "~11.2.7",
"@nativescript/ios": "8.0.0",
"@nativescript/webpack": "~5.0.0-beta.0",
"@ngtools/webpack": "~11.2.6",
"codelyzer": "~4.5.0",
"nativescript-dev-webpack": "~1.2.0",
"node-sass": "^4.7.1",
"tslint": "~5.19.0",
"typescript": "~3.5.3"
"typescript": "~4.0.0"
},
"gitHead": "5fa096231ded5351b53700f0d111d60160e52ebc",
"readme": "NativeScript Application"
"readme": "NativeScript Application",
"main": "./src/main.ts"
}
3 changes: 2 additions & 1 deletion demo-pokemon/src/_app-variables.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Import the theme’s variables. If you’re using a color scheme
// other than “light”, switch the path to the alternative scheme,
// for example '~nativescript-theme-core/scss/dark'.
@import '~nativescript-theme-core/scss/light';
@import '@nativescript/theme/core';
@import '@nativescript/theme/default';

// Custom colors
$background-dark: #F8F8F8 !default;
Expand Down
4 changes: 2 additions & 2 deletions demo-pokemon/src/app.android.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
@import 'app-variables';

// Import the theme’s main ruleset - both index and platform specific.
@import '~nativescript-theme-core/scss/index';
@import '~nativescript-theme-core/scss/platforms/index.android';
@import '@nativescript/theme/core';
@import '@nativescript/theme/default';

// Import common styles
@import 'app-common';
Expand Down
4 changes: 2 additions & 2 deletions demo-pokemon/src/app.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
@import 'app-variables';

// Import the theme’s main ruleset - both index and platform specific.
@import '~nativescript-theme-core/scss/index';
@import '~nativescript-theme-core/scss/platforms/index.ios';
@import '@nativescript/theme/core';
@import '@nativescript/theme/default';

// Import common styles
@import 'app-common';
Expand Down
10 changes: 5 additions & 5 deletions demo-pokemon/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { NativeScriptRouterModule } from "@nativescript/angular";

const routes: Routes = [
{path: "", redirectTo: "/home", pathMatch: "full"},
{path: "home", loadChildren: "~/app/home/home.module#HomeModule"},
{path: "augment-card", loadChildren: "~/app/augment-card/augment-card.module#AugmentCardModule"},
{path: "search-by-card", loadChildren: "~/app/search-by-card/search-by-card.module#SearchByCardModule"},
{path: "try-before-you-buy", loadChildren: "~/app/try-before-you-buy/try-before-you-buy.module#TryBeforeYouBuyModule"},
{path: "settings", loadChildren: "~/app/settings/settings.module#SettingsModule"}
{path: "home", loadChildren: () => import("../app/home/home.module").then(m=>m.HomeModule)},
{path: "augment-card", loadChildren: () => import("../app/augment-card/augment-card.module").then(m=>m.AugmentCardModule)},
{path: "search-by-card", loadChildren: () => import("../app/search-by-card/search-by-card.module").then(m=>m.SearchByCardModule)},
{path: "try-before-you-buy", loadChildren: () => import("../app/try-before-you-buy/try-before-you-buy.module").then(m=>m.TryBeforeYouBuyModule)},
{path: "settings", loadChildren: () => import("../app/settings/settings.module").then(m=>m.SettingsModule)}
];

@NgModule({
Expand Down
4 changes: 2 additions & 2 deletions demo-pokemon/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
import { NativeScriptModule, registerElement } from "@nativescript/angular";
import { NativeScriptUISideDrawerModule } from "nativescript-ui-sidedrawer/angular";
import { PokemonDataService } from "~/app/pokemon-data/pokemon-data-service";
import { PokemonFavoritesService } from "~/app/pokemon-data/pokemon-favorites-service";
import { PokemonDataService } from "../app/pokemon-data/pokemon-data-service";
import { PokemonFavoritesService } from "../app/pokemon-data/pokemon-favorites-service";
import { AppRoutingModule } from "./app-routing.module";
import { AppComponent } from "./app.component";

Expand Down
6 changes: 3 additions & 3 deletions demo-pokemon/src/app/augment-card/augment-card.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { Component } from "@angular/core";
import { RouterExtensions } from "@nativescript/angular";
import { ARCommonNode, ARTrackingImageDetectedEventData } from "nativescript-ar";
import { isIOS } from "@nativescript/core";
import { PokemonDataService } from "~/app/pokemon-data/pokemon-data-service";
import { PokemonFavoritesService } from "~/app/pokemon-data/pokemon-favorites-service";
import { PokemonDataService } from "../../app/pokemon-data/pokemon-data-service";
import { PokemonFavoritesService } from "../../app/pokemon-data/pokemon-favorites-service";

@Component({
selector: "AugmentCard",
Expand Down Expand Up @@ -68,7 +68,7 @@ export class AugmentCardComponent {
const rotateDegreesPerSecond = 60;
interval = setInterval(() => {
nodeInteraction.node.rotateBy({x: 0, y: rotateDegreesPerSecond / fps, z: 0});
}, 1000 / fps);
}, 1000 / fps) as any;
}
}
});
Expand Down
3 changes: 2 additions & 1 deletion demo-pokemon/src/app/home/home.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { HomeComponent } from "./home.component";
],
schemas: [
NO_ERRORS_SCHEMA
]
],
providers: []
})
export class HomeModule { }
2 changes: 1 addition & 1 deletion demo-pokemon/src/app/pokemon-data/pokemon-data-service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from "@angular/core";
import { knownFolders } from "@nativescript/core";
import { PokemonFavoritesService } from "~/app/pokemon-data/pokemon-favorites-service";
import { PokemonFavoritesService } from "../../app/pokemon-data/pokemon-favorites-service";
import { Pokemon } from "./pokemon";

@Injectable()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Component, OnDestroy } from "@angular/core";
import { ActivatedRoute } from "@angular/router";
import { RouterExtensions } from "@nativescript/angular";
import { Pokemon } from "~/app/pokemon-data/pokemon";
import { PokemonDataService } from "~/app/pokemon-data/pokemon-data-service";
import { Pokemon } from "../../../app/pokemon-data/pokemon";
import { PokemonDataService } from "../../../app/pokemon-data/pokemon-data-service";

@Component({
selector: "PokemonSearchResult",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NgModule } from "@angular/core";
import { Routes } from "@angular/router";
import { NativeScriptRouterModule } from "@nativescript/angular";
import { PokemonSearchResultComponent } from "~/app/search-by-card/pokemon-search-result/pokemon-search-result.component";
import { PokemonSearchResultComponent } from "../../app/search-by-card/pokemon-search-result/pokemon-search-result.component";
import { SearchByCardComponent } from "./search-by-card.component";

const routes: Routes = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { RouterExtensions } from "@nativescript/angular";
import { ARTrackingImageDetectedEventData } from "nativescript-ar";
import { RadSideDrawer } from "nativescript-ui-sidedrawer";
import { View, Application } from "@nativescript/core";
import { Pokemon } from "~/app/pokemon-data/pokemon";
import { PokemonDataService } from "~/app/pokemon-data/pokemon-data-service";
import { PokemonFavoritesService } from "~/app/pokemon-data/pokemon-favorites-service";
import { Pokemon } from "../../app/pokemon-data/pokemon";
import { PokemonDataService } from "../../app/pokemon-data/pokemon-data-service";
import { PokemonFavoritesService } from "../../app/pokemon-data/pokemon-favorites-service";

const DEFAULT_SCAN_HINT = "Scan a Pokémon card";

Expand Down
2 changes: 0 additions & 2 deletions demo-pokemon/src/app/search-by-card/search-by-card.module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
import { NativeScriptCommonModule } from "@nativescript/angular";
import { PokemonSearchResultComponent } from "./pokemon-search-result/pokemon-search-result.component";
import { SearchByCardRoutingModule } from "./search-by-card-routing.module";
import { SearchByCardComponent } from "./search-by-card.component";

Expand All @@ -11,7 +10,6 @@ import { SearchByCardComponent } from "./search-by-card.component";
],
declarations: [
SearchByCardComponent,
PokemonSearchResultComponent
],
schemas: [
NO_ERRORS_SCHEMA
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NgModule } from "@angular/core";
import { Routes } from "@angular/router";
import { NativeScriptRouterModule } from "@nativescript/angular";
import { TryBeforeYouBuyComponent } from "~/app/try-before-you-buy/try-before-you-buy.component";
import { TryBeforeYouBuyComponent } from "../../app/try-before-you-buy/try-before-you-buy.component";

const routes: Routes = [
{path: "", component: TryBeforeYouBuyComponent}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Component, OnInit } from "@angular/core";
import { RouterExtensions } from "@nativescript/angular";
import { AR, ARCommonNode, ARMaterial, ARPlaneTappedEventData } from "nativescript-ar";
import { Color, Action, isIOS } from "@nativescript/core";
import { Pokemon } from "~/app/pokemon-data/pokemon";
import { PokemonDataService } from "~/app/pokemon-data/pokemon-data-service";
import { PokemonFavoritesService } from "~/app/pokemon-data/pokemon-favorites-service";
import { Color, Dialogs, isIOS } from "@nativescript/core";
import { Pokemon } from "../../app/pokemon-data/pokemon";
import { PokemonDataService } from "../../app/pokemon-data/pokemon-data-service";
import { PokemonFavoritesService } from "../../app/pokemon-data/pokemon-favorites-service";

@Component({
selector: "TryBeforeYouBuy",
Expand Down Expand Up @@ -71,7 +71,7 @@ export class TryBeforeYouBuyComponent implements OnInit {
private async pokemonPicker(): Promise<Pokemon> {
const options: Array<string> = [];
this.pokemonList.map(p => options.push(p.name));
const pickedItem: string = await Action("Pick a Pokémon", "Cancel", options);
const pickedItem: string = await Dialogs.action("Pick a Pokémon", "Cancel", options);
return this.pokemonList[options.indexOf(pickedItem)];
}
}
7 changes: 0 additions & 7 deletions demo-pokemon/src/package.json

This file was deleted.

13 changes: 8 additions & 5 deletions demo-pokemon/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"module": "esnext",
"target": "es2017",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"noEmitHelpers": true,
Expand All @@ -10,7 +10,8 @@
"lib": [
"es6",
"dom",
"es2015.iterable"
"es2015.iterable",
"es2017"
],
"baseUrl": ".",
"paths": {
Expand All @@ -20,10 +21,12 @@
"*": [
"./node_modules/*"
]
}
},
"moduleResolution": "node",
"removeComments": false
},
"exclude": [
"node_modules",
"platforms"
]
}
}
7 changes: 0 additions & 7 deletions demo-pokemon/tsconfig.tns.json

This file was deleted.

Loading