Skip to content

Commit abbe4b0

Browse files
committed
Merge remote-tracking branch 'origin/main' into pr/122
2 parents a490a3f + d18b459 commit abbe4b0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+6680
-7405
lines changed

.eslintrc.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,19 @@
1111
{
1212
"files": ["*.ts", "*.tsx"],
1313
"extends": ["plugin:@nx/typescript"],
14-
"rules": {}
14+
"rules": {
15+
"@typescript-eslint/no-inferrable-types": "off",
16+
"@typescript-eslint/no-extra-semi": "error",
17+
"no-extra-semi": "off"
18+
}
1519
},
1620
{
1721
"files": ["*.js", "*.jsx"],
1822
"extends": ["plugin:@nx/javascript"],
19-
"rules": {}
23+
"rules": {
24+
"@typescript-eslint/no-extra-semi": "error",
25+
"no-extra-semi": "off"
26+
}
2027
}
2128
]
2229
}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,6 @@ Thumbs.db
4646

4747
.angular
4848
/.env
49+
50+
.nx/cache
51+
.nx/workspace-data

.prettierignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@
1717
**/apps/*nativescript/tools/**/*
1818
**/apps/*nativescript/src/assets/*.css
1919
**/xplat/nativescript/scss/fonticons/*.css
20-
**/xplat/nativescript*/plugins/**/*
20+
**/xplat/nativescript*/plugins/**/*
21+
/.nx/cache
22+
/.nx/workspace-data

CHANGELOG.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,64 @@
1+
## [18.0.1](https://github.com/NativeScript/angular/compare/18.0.0...18.0.1) (2024-06-04)
2+
3+
4+
### Features
5+
6+
* allow tracking of dom changes and preventing events from firing during one ([#133](https://github.com/NativeScript/angular/issues/133)) ([a009096](https://github.com/NativeScript/angular/commit/a009096c7ad7944792514ba819a6f9782b690b8c))
7+
8+
9+
10+
# [18.0.0](https://github.com/NativeScript/angular/compare/17.1.1...18.0.0) (2024-05-26)
11+
12+
13+
### Features
14+
15+
* Angular 18 support ([#134](https://github.com/NativeScript/angular/issues/134)) ([4f6e156](https://github.com/NativeScript/angular/commit/4f6e156dc4cda0f1159ab3ef9125596ea0e1531a))
16+
17+
18+
19+
## [17.1.1](https://github.com/NativeScript/angular/compare/17.1.0...17.1.1) (2024-05-10)
20+
21+
22+
### Bug Fixes
23+
24+
* InjectableAnimationEngine constructor optional scheduler ([58d2254](https://github.com/NativeScript/angular/commit/58d2254b4a5a6340684dc93f6ee74f67514a0867))
25+
26+
27+
28+
# [17.1.0](https://github.com/NativeScript/angular/compare/17.0.0...17.1.0) (2024-05-10)
29+
30+
31+
### Bug Fixes
32+
33+
* animations ([#132](https://github.com/NativeScript/angular/issues/132)) ([ad576bf](https://github.com/NativeScript/angular/commit/ad576bfea2830637933bb1fe5d90bd97e2b187c8))
34+
* InjectableAnimationEngine constructor ([c5f3a45](https://github.com/NativeScript/angular/commit/c5f3a450fe8fcce6e7108b2ab6ee2d2517db8978))
35+
36+
37+
38+
# [17.0.0](https://github.com/NativeScript/angular/compare/16.0.1...17.0.0) (2023-11-08)
39+
40+
41+
### Features
42+
43+
* added control flow syntax example ([bff2380](https://github.com/NativeScript/angular/commit/bff23800271aab56f1d4017108c53a3b8dd8987c))
44+
* Angular 17 support ([#124](https://github.com/NativeScript/angular/issues/124)) ([308b3b5](https://github.com/NativeScript/angular/commit/308b3b5243dc2c2cac59395ea238071f6b16de48))
45+
46+
47+
48+
## [16.0.1](https://github.com/NativeScript/angular/compare/16.0.0...16.0.1) (2023-10-10)
49+
50+
51+
### Bug Fixes
52+
53+
* **zone-js:** polyfill for queueMicrotask ([1e3a851](https://github.com/NativeScript/angular/commit/1e3a8510f314003c023d926fd715a03097f02b74)), closes [/github.com/NativeScript/angular/issues/118#issuecomment-1605432322](https://github.com//github.com/NativeScript/angular/issues/118/issues/issuecomment-1605432322)
54+
55+
56+
### Features
57+
58+
* visionos platform filter ([#123](https://github.com/NativeScript/angular/issues/123)) ([b760502](https://github.com/NativeScript/angular/commit/b76050215ba04091b8df7d5b04b265a26a33b7fc))
59+
60+
61+
162
# [16.0.0](https://github.com/NativeScript/angular/compare/15.2.0...16.0.0) (2023-05-15)
263

364

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @nativescript/angular
22

3-
For usage with NativeScript for Angular 12, 13, 14+ projects.
3+
For usage with NativeScript for Angular projects.
44

55
Clean and setup workspace:
66

apps/nativescript-demo-ng/.eslintrc.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": "../../.eslintrc.json",
3-
"ignorePatterns": ["!**/*", "node_modules/**/*"],
3+
"ignorePatterns": ["!**/*", "node_modules/**/*", "platforms/**/*"],
44
"overrides": [
55
{
66
"files": ["*.ts"],
@@ -24,7 +24,9 @@
2424
"prefix": "",
2525
"style": "kebab-case"
2626
}
27-
]
27+
],
28+
"@typescript-eslint/no-explicit-any": "warn",
29+
"@typescript-eslint/no-unused-vars": "warn"
2830
}
2931
},
3032
{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
33
<color name="ns_primary">#F5F5F5</color>
4-
<color name="ns_primaryDark">#757575</color>
4+
<color name="ns_primaryDark">#a6120d</color>
55
<color name="ns_accent">#33B5E5</color>
66
<color name="ns_blue">#272734</color>
77
</resources>

apps/nativescript-demo-ng/nativescript.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default {
1111
discardUncaughtJsExceptions: true,
1212
},
1313
ios: {
14-
discardUncaughtJsExceptions: true,
14+
discardUncaughtJsExceptions: false,
1515
},
1616
appPath: 'src',
1717
cli: {

apps/nativescript-demo-ng/package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,13 @@
22
"name": "demong",
33
"main": "./src/main.ts",
44
"description": "NativeScript Application",
5-
"scripts": {
6-
"postinstall": "node ./tools/xplat-postinstall.js"
7-
},
85
"dependencies": {
96
"@nativescript/core": "file:../../node_modules/@nativescript/core",
10-
"@nativescript-community/ui-material-bottom-navigation": "^7.1.3"
7+
"@nativescript-community/ui-material-bottom-navigation": "^7.2.0"
118
},
129
"devDependencies": {
13-
"@nativescript/android": "~8.5.0",
14-
"@nativescript/ios": "~8.5.0",
10+
"@nativescript/android": "~8.7.0",
11+
"@nativescript/ios": "~8.7.0",
1512
"@nativescript/unit-test-runner": "^3.0.1"
1613
}
1714
}

apps/nativescript-demo-ng/project.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"sourceRoot": "apps/nativescript-demo-ng/src",
55
"projectType": "application",
66
"prefix": "nativescript",
7+
"tags": [],
78
"generators": {
89
"@schematics/angular:component": {
910
"styleext": "scss"
@@ -65,10 +66,7 @@
6566
}
6667
},
6768
"lint": {
68-
"executor": "@nx/linter:eslint",
69-
"options": {
70-
"lintFilePatterns": ["apps/nativescript-demo-ng/**/*.ts", "apps/nativescript-demo-ng/src/**/*.html"]
71-
}
69+
"executor": "@nx/eslint:lint"
7270
},
7371
"test": {
7472
"executor": "@nativescript/nx:test",
@@ -85,6 +83,5 @@
8583
}
8684
}
8785
}
88-
},
89-
"tags": []
86+
}
9087
}
Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,2 @@
11
/* eslint-disable @typescript-eslint/triple-slash-reference */
2-
/// <reference path="../../node_modules/@nativescript/types-ios/index.d.ts" />
3-
/// <reference path="../../node_modules/@nativescript/types-android/lib/android-29.d.ts" />
4-
5-
declare namespace NodeJS {
6-
interface Global {
7-
__runtimeVersion: any;
8-
TNS_ENV: string;
9-
}
10-
}
2+
/// <reference path="../../references.d.ts" />

apps/nativescript-demo-ng/src/app.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@ refer to http://docs.nativescript.org/ui/theme.
1212
@import '@nativescript/theme/css/core.css';
1313
@import '@nativescript/theme/css/default.css';
1414

15+
Button {
16+
border: 0;
17+
background-color: transparent;
18+
text-transform: none;
19+
min-width: 0;
20+
min-height: 0;
21+
android-elevation: 0;
22+
android-dynamic-elevation-offset: 0;
23+
color: #fff;
24+
}
25+
1526
.h1 {
1627
font-weight: bold;
1728
margin: 10 0 0;

apps/nativescript-demo-ng/src/app/app-routing.module.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { NgModule } from '@angular/core';
2-
import { NativeScriptRouterModule, NSEmptyOutletComponent } from '@nativescript/angular';
32
import { Routes } from '@angular/router';
3+
import { NativeScriptRouterModule } from '@nativescript/angular';
44

5-
import { ItemsComponent } from './item/items.component';
65
import { ItemDetailComponent } from './item/item-detail.component';
6+
import { ItemsComponent } from './item/items.component';
77
// import { HomeComponent } from './home/home.component';
88
// import { BootGuardService } from './boot-guard.service';
99

@@ -21,7 +21,7 @@ const routes: Routes = [
2121
// {
2222
// path: 'home',
2323
// component: HomeComponent,
24-
// canActivate: [BootGuardService],
24+
// canActivate: [() => Promise.resolve(true)],
2525
// children: [
2626
// {
2727
// path: 'start',

apps/nativescript-demo-ng/src/app/app.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { Component, ViewContainerRef } from '@angular/core';
1+
import { Component, ViewContainerRef, OnInit, OnDestroy } from '@angular/core';
22

33
// registerElement('ns-app', () => GridLayout);
44
@Component({
55
selector: 'ns-app',
66
moduleId: module.id,
77
templateUrl: './app.component.html',
88
})
9-
export class AppComponent {
9+
export class AppComponent implements OnInit, OnDestroy {
1010
constructor(private vcRef: ViewContainerRef) {}
1111
ngOnInit() {
1212
console.log('ngOnInit');

apps/nativescript-demo-ng/src/app/app.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
2-
import { NativeScriptModule, NativeScriptCommonModule, NativeScriptHttpClientModule, NativeDialogModule } from '@nativescript/angular';
2+
import { NativeDialogModule, NativeScriptHttpClientModule, NativeScriptModule } from '@nativescript/angular';
33

44
import { AppRoutingModule } from './app-routing.module';
55
import { AppComponent } from './app.component';
6-
import { ItemsComponent } from './item/items.component';
76
import { ItemDetailComponent } from './item/item-detail.component';
7+
import { ItemsComponent } from './item/items.component';
88
import { ModalComponent } from './modal/modal.component';
99

1010
/**

apps/nativescript-demo-ng/src/app/boot-guard.service.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

apps/nativescript-demo-ng/src/app/home/home.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, NgZone } from '@angular/core';
1+
import { Component, NgZone, OnInit } from '@angular/core';
22
import { ActivatedRoute, Router } from '@angular/router';
33
import { RouterExtensions } from '@nativescript/angular';
44
import { Page, TabView } from '@nativescript/core';
@@ -8,7 +8,7 @@ import { Page, TabView } from '@nativescript/core';
88
selector: 'demo-home',
99
templateUrl: './home.component.html',
1010
})
11-
export class HomeComponent {
11+
export class HomeComponent implements OnInit {
1212
tabItems: { [key: string]: { index: number; title?: string; iconSource?: string; textTransform?: string } } = {};
1313
private _tabs = ['start'];
1414
private _hasInitTab: { start?: boolean } = {};
@@ -20,7 +20,7 @@ export class HomeComponent {
2020
private _activeRoute: ActivatedRoute,
2121
private _page: Page,
2222
private _ngRouter: Router,
23-
private _router: RouterExtensions
23+
private _router: RouterExtensions,
2424
) {
2525
this._initMenu();
2626
}

apps/nativescript-demo-ng/src/app/item/item.service.ts

Lines changed: 42 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,50 @@ import { Item } from './item';
77
})
88
export class ItemService {
99
private items = new Array<Item>(
10-
{ id: 1, name: 'Ter Stegen', role: 'Goalkeeper' },
11-
{ id: 3, name: 'Piqué', role: 'Defender' },
12-
{ id: 4, name: 'I. Rakitic', role: 'Midfielder' },
13-
{ id: 5, name: 'Sergio', role: 'Midfielder' },
14-
{ id: 6, name: 'Denis Suárez', role: 'Midfielder' },
15-
{ id: 7, name: 'Arda', role: 'Midfielder' },
16-
{ id: 8, name: 'A. Iniesta', role: 'Midfielder' },
17-
{ id: 9, name: 'Suárez', role: 'Forward' },
18-
{ id: 10, name: 'Messi', role: 'Forward' },
19-
{ id: 11, name: 'Neymar', role: 'Forward' },
20-
{ id: 12, name: 'Rafinha', role: 'Midfielder' },
21-
{ id: 13, name: 'Cillessen', role: 'Goalkeeper' },
22-
{ id: 14, name: 'Mascherano', role: 'Defender' },
23-
{ id: 17, name: 'Paco Alcácer', role: 'Forward' },
24-
{ id: 18, name: 'Jordi Alba', role: 'Defender' },
25-
{ id: 19, name: 'Digne', role: 'Defender' },
26-
{ id: 20, name: 'Sergi Roberto', role: 'Midfielder' },
27-
{ id: 21, name: 'André Gomes', role: 'Midfielder' },
28-
{ id: 22, name: 'Aleix Vidal', role: 'Midfielder' },
29-
{ id: 23, name: 'Umtiti', role: 'Defender' },
30-
{ id: 24, name: 'Mathieu', role: 'Defender' },
31-
{ id: 25, name: 'Masip', role: 'Goalkeeper' }
10+
{ id: 1, name: 'Minko Gechev', role: 'Goalkeeper' },
11+
{ id: 3, name: 'Pawel Kozlowski', role: 'Defender' },
12+
{ id: 4, name: 'Alex Rickabaugh', role: 'Midfielder' },
13+
{ id: 5, name: 'Jessica Janiuk', role: 'Midfielder' },
14+
{ id: 6, name: 'Emma Twersky', role: 'Midfielder' },
15+
{ id: 7, name: 'Joey Perrott', role: 'Midfielder' },
16+
{ id: 8, name: 'Dylan Hunn', role: 'Midfielder' },
17+
{ id: 9, name: 'intermediate,', role: 'Forward' },
18+
{ id: 10, name: 'and advanced programmers.', role: 'Forward' },
19+
{ id: 11, name: 'Celebrate web tech', role: 'Forward' },
20+
{ id: 12, name: 'with native platform tech.', role: 'Midfielder' },
21+
{ id: 13, name: 'Find', role: 'Goalkeeper' },
22+
{ id: 14, name: 'wonderful learning', role: 'Defender' },
23+
{ id: 17, name: 'learning', role: 'Forward' },
24+
{ id: 18, name: 'resources', role: 'Defender' },
25+
{ id: 19, name: 'across', role: 'Defender' },
26+
{ id: 20, name: 'the', role: 'Midfielder' },
27+
{ id: 21, name: 'entire', role: 'Midfielder' },
28+
{ id: 22, name: 'web', role: 'Midfielder' },
29+
{ id: 23, name: 'community', role: 'Defender' },
30+
{ id: 24, name: 'to', role: 'Defender' },
31+
{ id: 25, name: 'Get Started!', role: 'Goalkeeper' }
3232
);
3333

34+
flavors = [
35+
{
36+
color: '#087ea4',
37+
logo: '~/assets/react.png'
38+
},
39+
{
40+
color: '#2c4f7c',
41+
logo: '~/assets/solid.png'
42+
},
43+
{
44+
color: '#b7462a',
45+
logo: '~/assets/svelte.png'
46+
},
47+
{
48+
color: '#286f47',
49+
logo: '~/assets/vue.png'
50+
}
51+
];
52+
currentFlavor = 0;
53+
3454
getItems(): Array<Item> {
3555
return this.items;
3656
}

0 commit comments

Comments
 (0)