Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into pr/122
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanWalker committed Jul 17, 2024
2 parents a490a3f + d18b459 commit abbe4b0
Show file tree
Hide file tree
Showing 69 changed files with 6,680 additions and 7,405 deletions.
11 changes: 9 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,19 @@
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"rules": {}
"rules": {
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
"rules": {
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
}
]
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ Thumbs.db

.angular
/.env

.nx/cache
.nx/workspace-data
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@
**/apps/*nativescript/tools/**/*
**/apps/*nativescript/src/assets/*.css
**/xplat/nativescript/scss/fonticons/*.css
**/xplat/nativescript*/plugins/**/*
**/xplat/nativescript*/plugins/**/*
/.nx/cache
/.nx/workspace-data
61 changes: 61 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,64 @@
## [18.0.1](https://github.com/NativeScript/angular/compare/18.0.0...18.0.1) (2024-06-04)


### Features

* 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))



# [18.0.0](https://github.com/NativeScript/angular/compare/17.1.1...18.0.0) (2024-05-26)


### Features

* Angular 18 support ([#134](https://github.com/NativeScript/angular/issues/134)) ([4f6e156](https://github.com/NativeScript/angular/commit/4f6e156dc4cda0f1159ab3ef9125596ea0e1531a))



## [17.1.1](https://github.com/NativeScript/angular/compare/17.1.0...17.1.1) (2024-05-10)


### Bug Fixes

* InjectableAnimationEngine constructor optional scheduler ([58d2254](https://github.com/NativeScript/angular/commit/58d2254b4a5a6340684dc93f6ee74f67514a0867))



# [17.1.0](https://github.com/NativeScript/angular/compare/17.0.0...17.1.0) (2024-05-10)


### Bug Fixes

* animations ([#132](https://github.com/NativeScript/angular/issues/132)) ([ad576bf](https://github.com/NativeScript/angular/commit/ad576bfea2830637933bb1fe5d90bd97e2b187c8))
* InjectableAnimationEngine constructor ([c5f3a45](https://github.com/NativeScript/angular/commit/c5f3a450fe8fcce6e7108b2ab6ee2d2517db8978))



# [17.0.0](https://github.com/NativeScript/angular/compare/16.0.1...17.0.0) (2023-11-08)


### Features

* added control flow syntax example ([bff2380](https://github.com/NativeScript/angular/commit/bff23800271aab56f1d4017108c53a3b8dd8987c))
* Angular 17 support ([#124](https://github.com/NativeScript/angular/issues/124)) ([308b3b5](https://github.com/NativeScript/angular/commit/308b3b5243dc2c2cac59395ea238071f6b16de48))



## [16.0.1](https://github.com/NativeScript/angular/compare/16.0.0...16.0.1) (2023-10-10)


### Bug Fixes

* **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)


### Features

* visionos platform filter ([#123](https://github.com/NativeScript/angular/issues/123)) ([b760502](https://github.com/NativeScript/angular/commit/b76050215ba04091b8df7d5b04b265a26a33b7fc))



# [16.0.0](https://github.com/NativeScript/angular/compare/15.2.0...16.0.0) (2023-05-15)


Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @nativescript/angular

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

Clean and setup workspace:

Expand Down
6 changes: 4 additions & 2 deletions apps/nativescript-demo-ng/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "../../.eslintrc.json",
"ignorePatterns": ["!**/*", "node_modules/**/*"],
"ignorePatterns": ["!**/*", "node_modules/**/*", "platforms/**/*"],
"overrides": [
{
"files": ["*.ts"],
Expand All @@ -24,7 +24,9 @@
"prefix": "",
"style": "kebab-case"
}
]
],
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-vars": "warn"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ns_primary">#F5F5F5</color>
<color name="ns_primaryDark">#757575</color>
<color name="ns_primaryDark">#a6120d</color>
<color name="ns_accent">#33B5E5</color>
<color name="ns_blue">#272734</color>
</resources>
2 changes: 1 addition & 1 deletion apps/nativescript-demo-ng/nativescript.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default {
discardUncaughtJsExceptions: true,
},
ios: {
discardUncaughtJsExceptions: true,
discardUncaughtJsExceptions: false,
},
appPath: 'src',
cli: {
Expand Down
9 changes: 3 additions & 6 deletions apps/nativescript-demo-ng/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@
"name": "demong",
"main": "./src/main.ts",
"description": "NativeScript Application",
"scripts": {
"postinstall": "node ./tools/xplat-postinstall.js"
},
"dependencies": {
"@nativescript/core": "file:../../node_modules/@nativescript/core",
"@nativescript-community/ui-material-bottom-navigation": "^7.1.3"
"@nativescript-community/ui-material-bottom-navigation": "^7.2.0"
},
"devDependencies": {
"@nativescript/android": "~8.5.0",
"@nativescript/ios": "~8.5.0",
"@nativescript/android": "~8.7.0",
"@nativescript/ios": "~8.7.0",
"@nativescript/unit-test-runner": "^3.0.1"
}
}
9 changes: 3 additions & 6 deletions apps/nativescript-demo-ng/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"sourceRoot": "apps/nativescript-demo-ng/src",
"projectType": "application",
"prefix": "nativescript",
"tags": [],
"generators": {
"@schematics/angular:component": {
"styleext": "scss"
Expand Down Expand Up @@ -65,10 +66,7 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"options": {
"lintFilePatterns": ["apps/nativescript-demo-ng/**/*.ts", "apps/nativescript-demo-ng/src/**/*.html"]
}
"executor": "@nx/eslint:lint"
},
"test": {
"executor": "@nativescript/nx:test",
Expand All @@ -85,6 +83,5 @@
}
}
}
},
"tags": []
}
}
10 changes: 1 addition & 9 deletions apps/nativescript-demo-ng/references.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,2 @@
/* eslint-disable @typescript-eslint/triple-slash-reference */
/// <reference path="../../node_modules/@nativescript/types-ios/index.d.ts" />
/// <reference path="../../node_modules/@nativescript/types-android/lib/android-29.d.ts" />

declare namespace NodeJS {
interface Global {
__runtimeVersion: any;
TNS_ENV: string;
}
}
/// <reference path="../../references.d.ts" />
11 changes: 11 additions & 0 deletions apps/nativescript-demo-ng/src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ refer to http://docs.nativescript.org/ui/theme.
@import '@nativescript/theme/css/core.css';
@import '@nativescript/theme/css/default.css';

Button {
border: 0;
background-color: transparent;
text-transform: none;
min-width: 0;
min-height: 0;
android-elevation: 0;
android-dynamic-elevation-offset: 0;
color: #fff;
}

.h1 {
font-weight: bold;
margin: 10 0 0;
Expand Down
6 changes: 3 additions & 3 deletions apps/nativescript-demo-ng/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { NgModule } from '@angular/core';
import { NativeScriptRouterModule, NSEmptyOutletComponent } from '@nativescript/angular';
import { Routes } from '@angular/router';
import { NativeScriptRouterModule } from '@nativescript/angular';

import { ItemsComponent } from './item/items.component';
import { ItemDetailComponent } from './item/item-detail.component';
import { ItemsComponent } from './item/items.component';
// import { HomeComponent } from './home/home.component';
// import { BootGuardService } from './boot-guard.service';

Expand All @@ -21,7 +21,7 @@ const routes: Routes = [
// {
// path: 'home',
// component: HomeComponent,
// canActivate: [BootGuardService],
// canActivate: [() => Promise.resolve(true)],
// children: [
// {
// path: 'start',
Expand Down
4 changes: 2 additions & 2 deletions apps/nativescript-demo-ng/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Component, ViewContainerRef } from '@angular/core';
import { Component, ViewContainerRef, OnInit, OnDestroy } from '@angular/core';

// registerElement('ns-app', () => GridLayout);
@Component({
selector: 'ns-app',
moduleId: module.id,
templateUrl: './app.component.html',
})
export class AppComponent {
export class AppComponent implements OnInit, OnDestroy {
constructor(private vcRef: ViewContainerRef) {}
ngOnInit() {
console.log('ngOnInit');
Expand Down
4 changes: 2 additions & 2 deletions apps/nativescript-demo-ng/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
import { NativeScriptModule, NativeScriptCommonModule, NativeScriptHttpClientModule, NativeDialogModule } from '@nativescript/angular';
import { NativeDialogModule, NativeScriptHttpClientModule, NativeScriptModule } from '@nativescript/angular';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { ItemsComponent } from './item/items.component';
import { ItemDetailComponent } from './item/item-detail.component';
import { ItemsComponent } from './item/items.component';
import { ModalComponent } from './modal/modal.component';

/**
Expand Down
17 changes: 0 additions & 17 deletions apps/nativescript-demo-ng/src/app/boot-guard.service.ts

This file was deleted.

6 changes: 3 additions & 3 deletions apps/nativescript-demo-ng/src/app/home/home.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, NgZone } from '@angular/core';
import { Component, NgZone, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { RouterExtensions } from '@nativescript/angular';
import { Page, TabView } from '@nativescript/core';
Expand All @@ -8,7 +8,7 @@ import { Page, TabView } from '@nativescript/core';
selector: 'demo-home',
templateUrl: './home.component.html',
})
export class HomeComponent {
export class HomeComponent implements OnInit {
tabItems: { [key: string]: { index: number; title?: string; iconSource?: string; textTransform?: string } } = {};
private _tabs = ['start'];
private _hasInitTab: { start?: boolean } = {};
Expand All @@ -20,7 +20,7 @@ export class HomeComponent {
private _activeRoute: ActivatedRoute,
private _page: Page,
private _ngRouter: Router,
private _router: RouterExtensions
private _router: RouterExtensions,
) {
this._initMenu();
}
Expand Down
64 changes: 42 additions & 22 deletions apps/nativescript-demo-ng/src/app/item/item.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,50 @@ import { Item } from './item';
})
export class ItemService {
private items = new Array<Item>(
{ id: 1, name: 'Ter Stegen', role: 'Goalkeeper' },
{ id: 3, name: 'Piqué', role: 'Defender' },
{ id: 4, name: 'I. Rakitic', role: 'Midfielder' },
{ id: 5, name: 'Sergio', role: 'Midfielder' },
{ id: 6, name: 'Denis Suárez', role: 'Midfielder' },
{ id: 7, name: 'Arda', role: 'Midfielder' },
{ id: 8, name: 'A. Iniesta', role: 'Midfielder' },
{ id: 9, name: 'Suárez', role: 'Forward' },
{ id: 10, name: 'Messi', role: 'Forward' },
{ id: 11, name: 'Neymar', role: 'Forward' },
{ id: 12, name: 'Rafinha', role: 'Midfielder' },
{ id: 13, name: 'Cillessen', role: 'Goalkeeper' },
{ id: 14, name: 'Mascherano', role: 'Defender' },
{ id: 17, name: 'Paco Alcácer', role: 'Forward' },
{ id: 18, name: 'Jordi Alba', role: 'Defender' },
{ id: 19, name: 'Digne', role: 'Defender' },
{ id: 20, name: 'Sergi Roberto', role: 'Midfielder' },
{ id: 21, name: 'André Gomes', role: 'Midfielder' },
{ id: 22, name: 'Aleix Vidal', role: 'Midfielder' },
{ id: 23, name: 'Umtiti', role: 'Defender' },
{ id: 24, name: 'Mathieu', role: 'Defender' },
{ id: 25, name: 'Masip', role: 'Goalkeeper' }
{ id: 1, name: 'Minko Gechev', role: 'Goalkeeper' },
{ id: 3, name: 'Pawel Kozlowski', role: 'Defender' },
{ id: 4, name: 'Alex Rickabaugh', role: 'Midfielder' },
{ id: 5, name: 'Jessica Janiuk', role: 'Midfielder' },
{ id: 6, name: 'Emma Twersky', role: 'Midfielder' },
{ id: 7, name: 'Joey Perrott', role: 'Midfielder' },
{ id: 8, name: 'Dylan Hunn', role: 'Midfielder' },
{ id: 9, name: 'intermediate,', role: 'Forward' },
{ id: 10, name: 'and advanced programmers.', role: 'Forward' },
{ id: 11, name: 'Celebrate web tech', role: 'Forward' },
{ id: 12, name: 'with native platform tech.', role: 'Midfielder' },
{ id: 13, name: 'Find', role: 'Goalkeeper' },
{ id: 14, name: 'wonderful learning', role: 'Defender' },
{ id: 17, name: 'learning', role: 'Forward' },
{ id: 18, name: 'resources', role: 'Defender' },
{ id: 19, name: 'across', role: 'Defender' },
{ id: 20, name: 'the', role: 'Midfielder' },
{ id: 21, name: 'entire', role: 'Midfielder' },
{ id: 22, name: 'web', role: 'Midfielder' },
{ id: 23, name: 'community', role: 'Defender' },
{ id: 24, name: 'to', role: 'Defender' },
{ id: 25, name: 'Get Started!', role: 'Goalkeeper' }
);

flavors = [
{
color: '#087ea4',
logo: '~/assets/react.png'
},
{
color: '#2c4f7c',
logo: '~/assets/solid.png'
},
{
color: '#b7462a',
logo: '~/assets/svelte.png'
},
{
color: '#286f47',
logo: '~/assets/vue.png'
}
];
currentFlavor = 0;

getItems(): Array<Item> {
return this.items;
}
Expand Down
Loading

0 comments on commit abbe4b0

Please sign in to comment.