Skip to content

Commit 8784270

Browse files
committed
Merge branch 'pr/255'
2 parents 1a5edb8 + 4ceb38a commit 8784270

34 files changed

+51020
-51012
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.d.ts

.eslintrc.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
extends: ['plugin:prettier/recommended'],
3-
plugins: ['prettier', '@typescript-eslint'],
3+
plugins: ['prettier', '@typescript-eslint', '@nativescript'],
44
parser: '@typescript-eslint/parser',
55
parserOptions: {
66
ecmaVersion: 2018,
@@ -12,6 +12,9 @@ module.exports = {
1212
},
1313
rules: {
1414
'prettier/prettier': 'warn',
15+
"@nativescript/no-nativescript-angular-imports": "warn",
16+
"@nativescript/no-tns-core-modules-imports": "warn",
17+
"@nativescript/no-duplicate-ns-imports": "warn",
1518
'@typescript-eslint/adjacent-overload-signatures': 'error',
1619
'@typescript-eslint/array-type': 'error',
1720
'@typescript-eslint/await-thenable': 'error',

demo-ng/package.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"description": "NativeScript Application",
33
"dependencies": {
4-
"@angular/animations": "~10.1.3",
5-
"@angular/common": "~10.1.3",
6-
"@angular/compiler": "~10.1.3",
7-
"@angular/core": "~10.1.3",
8-
"@angular/forms": "~10.1.3",
9-
"@angular/platform-browser": "~10.1.3",
10-
"@angular/platform-browser-dynamic": "~10.1.3",
11-
"@angular/router": "~10.1.3",
12-
"@nativescript/core": "~7.0.7",
13-
"@nativescript/angular": "~10.1.5",
4+
"@angular/animations": "~11.2.0",
5+
"@angular/common": "~11.2.0",
6+
"@angular/compiler": "~11.2.0",
7+
"@angular/core": "~11.2.0",
8+
"@angular/forms": "~11.2.0",
9+
"@angular/platform-browser": "~11.2.0",
10+
"@angular/platform-browser-dynamic": "~11.2.0",
11+
"@angular/router": "~11.2.0",
12+
"@nativescript/core": "8.0.0-alpha.8",
13+
"@nativescript/angular": "ns8",
1414
"@nativescript-community/ui-material-activityindicator": "file:../packages/activityindicator",
1515
"@nativescript-community/ui-material-bottomsheet": "file:../packages/bottomsheet",
1616
"@nativescript-community/ui-material-bottomnavigationbar": "file:../packages/bottomnavigationbar",
@@ -28,16 +28,16 @@
2828
"@nativescript/theme": "~3.0.0",
2929
"reflect-metadata": "~0.1.13",
3030
"rxjs": "~6.6.3",
31-
"zone.js": "~0.10.2"
31+
"zone.js": "~0.11.0"
3232
},
3333
"devDependencies": {
34-
"@angular/cli": "~10.1.3",
35-
"@angular/compiler-cli": "~10.1.3",
36-
"@nativescript/android": "7.0.0",
37-
"@nativescript/ios": "7.0.0",
38-
"@nativescript/types": "~7.0.4",
34+
"@angular/cli": "~11.2.0",
35+
"@angular/compiler-cli": "~11.2.0",
36+
"@nativescript/android": "7.0.1",
37+
"@nativescript/ios": "7.2.0",
38+
"@nativescript/types": "~7.3.0",
3939
"@nativescript/webpack": "~4.1.0",
40-
"@ngtools/webpack": "10.1.3"
40+
"@ngtools/webpack": "~11.2.0"
4141
},
4242
"gitHead": "8ab7726d1ee9991706069c1359c552e67ee0d1a4",
4343
"readme": "NativeScript Application"

demo-svelte/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"dependencies": {
3030
"@nativescript-community/ui-material-button": "file:../packages/button",
3131
"@nativescript-community/ui-material-speeddial": "file:../packages/speeddial",
32-
"@nativescript/core": "~7.0.0",
32+
"@nativescript/core": "8.0.0-alpha.8",
3333
"@nativescript/theme": "~2.3.0",
3434
"svelte-native": "~0.9.4"
3535
},

demo-vue/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"repository": "http://www.github.com/NativeScript/nativescript-ui-sidedrawer.git",
66
"dependencies": {
77
"@mdi/font": "4.9.95",
8-
"@nativescript/core": "7.3.0",
8+
"@nativescript/core": "8.0.0-alpha.8",
99
"@nativescript-community/text": "1.4.9",
1010
"@nativescript-community/ui-material-activityindicator": "file:../packages/activityindicator",
1111
"@nativescript-community/ui-material-bottom-navigation": "file:../packages/bottom-navigation",

demo/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"dependencies": {
3-
"@nativescript/core": "rc",
3+
"@nativescript/core": "8.0.0-alpha.8",
44
"@nativescript-community/ui-material-activityindicator": "file:../packages/activityindicator",
55
"@nativescript-community/ui-material-bottomsheet": "file:../packages/bottomsheet",
66
"@nativescript-community/ui-material-bottomnavigationbar": "file:../packages/bottomnavigationbar",
@@ -16,7 +16,7 @@
1616
"@nativescript-community/ui-material-textfield": "file:../packages/textfield",
1717
"@nativescript-community/ui-material-textview": "file:../packages/textview",
1818
"@nativescript/theme": "3.0.0",
19-
"nativescript-ui-listview": "7.1.0"
19+
"nativescript-ui-listview": "9.1.0"
2020
},
2121
"devDependencies": {
2222
"awesome-typescript-loader": "~5.2.1",
@@ -28,14 +28,14 @@
2828
"filewalker": "0.1.3",
2929
"lazy": "1.0.11",
3030
"nativescript-css-loader": "~0.26.1",
31-
"@nativescript/webpack": "rc",
31+
"@nativescript/webpack": "~4.1.0",
3232
"node-sass": "^4.13.0",
3333
"resolve-url-loader": "~3.1.0",
3434
"sass-loader": "^8.0.0",
35-
"@nativescript/types": "7.0.0",
35+
"@nativescript/types": "7.3.0",
3636
"ts-loader": "^6.2.1",
3737
"tslint": "~5.20.0",
38-
"typescript": "3.9.7",
38+
"typescript": "~4.0.0",
3939
"webpack": "~4.41.2",
4040
"webpack-bundle-analyzer": "^3.6.0",
4141
"webpack-sources": "~1.4.3"

package.json

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,24 @@
4646
"repository": "https://github.com/nativescript-community/ui-material-components",
4747
"readmeFilename": "README.md",
4848
"devDependencies": {
49-
"@angular/animations": "~10.1.4",
50-
"@angular/common": "~10.1.4",
51-
"@angular/compiler": "~10.1.4",
52-
"@angular/compiler-cli": "~10.1.4",
53-
"@angular/core": "~10.1.4",
54-
"@angular/forms": "~10.1.4",
55-
"@angular/platform-browser": "~10.1.4",
56-
"@angular/platform-browser-dynamic": "~10.1.4",
57-
"@angular/router": "~10.1.4",
49+
"@angular/animations": "~11.2.0",
50+
"@angular/common": "~11.2.0",
51+
"@angular/compiler": "~11.2.0",
52+
"@angular/compiler-cli": "~11.2.0",
53+
"@angular/core": "~11.2.0",
54+
"@angular/forms": "~11.2.0",
55+
"@angular/platform-browser": "~11.2.0",
56+
"@angular/platform-browser-dynamic": "~11.2.0",
57+
"@angular/router": "~11.2.0",
5858
"@commitlint/cli": "^12.0.1",
5959
"@commitlint/config-conventional": "^12.0.1",
6060
"@nativescript-community/text": "^1.4.9",
61-
"@nativescript/angular": "~10.1.7",
62-
"@nativescript/core": "7.3.0",
61+
"@nativescript/angular": "ns8",
62+
"@nativescript/core": "8.0.0-alpha.8",
63+
"@nativescript/eslint-plugin": "0.0.4",
6364
"@nativescript/hook": "~2.0.0",
6465
"@nativescript/types": "7.3.0",
65-
"@nativescript/webpack": "~4.1.0",
66+
"@nativescript/webpack": "~4.0.1",
6667
"@types/node": "~14.14.35",
6768
"@typescript-eslint/eslint-plugin": "4.18.0",
6869
"@typescript-eslint/parser": "4.18.0",
@@ -74,16 +75,16 @@
7475
"globby": "^11.0.3",
7576
"husky": "^4.3.8",
7677
"lerna": "^4.0.0",
77-
"nativescript": "7.0.11",
78+
"nativescript": "7.2.1",
7879
"nativescript-vue": "~2.8.4",
79-
"ng-packagr": "~10.1.0",
80+
"ng-packagr": "~11.2.0",
8081
"prettier": "^2.2.1",
8182
"prompt": "^1.1.0",
8283
"rimraf": "^3.0.2",
8384
"rxjs": "^6.6.6",
8485
"ts-patch": "^1.3.2",
8586
"typedoc": "^0.20.33",
86-
"typescript": "~3.9.7",
87+
"typescript": "~4.0.0",
8788
"vue": "2.6.12"
8889
},
8990
"commitlint": {
@@ -94,4 +95,4 @@
9495
"dependencies": {
9596
"ts-node": "^8.10.2"
9697
}
97-
}
98+
}

src/activityindicator/index.ios.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ export class ActivityIndicator extends ActivityIndicatorBase {
7676
// }
7777

7878
[colorProperty.setNative](value: UIColor | Color) {
79-
const color = value instanceof Color ? value.ios : value;;
79+
const color = value instanceof Color ? value.ios : value;
8080
this.nativeViewProtected.cycleColors = color ? NSArray.arrayWithObject(color) : null;
8181
// this.getColorThemer().primaryColor = value instanceof Color ? value.ios : value;
8282
// MDCActivityIndicatorColorThemer.applySemanticColorSchemeToActivityIndicator(this.getColorThemer(), this.nativeViewProtected);
8383
}
8484
[indeterminateProperty.setNative](value: boolean) {
85-
this.nativeViewProtected.indicatorMode = !!value ? MDCActivityIndicatorMode.Indeterminate : MDCActivityIndicatorMode.Determinate;
85+
this.nativeViewProtected.indicatorMode = value ? MDCActivityIndicatorMode.Indeterminate : MDCActivityIndicatorMode.Determinate;
8686
}
8787
}

src/bottom-navigation/index.android.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { TabContentItem } from '@nativescript-community/ui-material-core/tab-navigation-base/tab-content-item';
2-
import { TabNavigationBase, itemsProperty, selectedIndexProperty, tabStripProperty } from '@nativescript-community/ui-material-core/tab-navigation-base/tab-navigation-base';
2+
import { TabNavigationBase, itemsProperty, selectedIndexProperty, tabStripProperty, getIconSpecSize } from '@nativescript-community/ui-material-core/tab-navigation-base/tab-navigation-base';
33
import { TabStrip } from '@nativescript-community/ui-material-core/tab-navigation-base/tab-strip';
44
import { TabStripItem } from '@nativescript-community/ui-material-core/tab-navigation-base/tab-strip-item';
55
// Types
66
// Requires
7-
import { Application, CSSType, Color, Font, Frame, ImageSource, Utils, View, getIconSpecSize } from '@nativescript/core';
8-
import { TextTransform, getTransformedText } from '@nativescript/core/ui/text-base';
7+
import { Application, CSSType, Color, Font, Frame, ImageSource, Utils, View, Enums } from '@nativescript/core';
8+
import { getTransformedText } from '@nativescript/core/ui/text-base';
99
export { TabContentItem, TabStrip, TabStripItem };
1010

1111
// TODO: Impl trace
@@ -243,13 +243,13 @@ function iterateIndexRange(index: number, eps: number, lastIndex: number, callba
243243
@CSSType('BottomNavigation')
244244
export class BottomNavigation extends TabNavigationBase {
245245
private _contentView: org.nativescript.widgets.ContentLayout;
246-
private _contentViewId: number = -1;
246+
private _contentViewId = -1;
247247
private _bottomNavigationBar: org.nativescript.widgets.BottomNavigationBar;
248248
private _currentFragment: androidx.fragment.app.Fragment;
249249
private _currentTransaction: androidx.fragment.app.FragmentTransaction;
250250
private _attachedToWindow = false;
251251
public _originalBackground: any;
252-
private _textTransform: TextTransform = 'none';
252+
private _textTransform: Enums.TextTransformType = 'none';
253253
private _selectedItemColor: Color;
254254
private _unSelectedItemColor: Color;
255255

@@ -675,9 +675,9 @@ export class BottomNavigation extends TabNavigationBase {
675675
});
676676
}
677677

678-
private getItemLabelTextTransform(tabStripItem: TabStripItem): TextTransform {
678+
private getItemLabelTextTransform(tabStripItem: TabStripItem): Enums.TextTransformType {
679679
const nestedLabel = tabStripItem.label;
680-
let textTransform: TextTransform = null;
680+
let textTransform: Enums.TextTransformType = null;
681681
if (nestedLabel && nestedLabel.style.textTransform !== 'initial') {
682682
textTransform = nestedLabel.style.textTransform;
683683
} else if (tabStripItem.style.textTransform !== 'initial') {
@@ -924,17 +924,17 @@ export class BottomNavigation extends TabNavigationBase {
924924
tabStripItem.nativeViewProtected.setTypeface(value.getAndroidTypeface());
925925
}
926926

927-
public setTabBarItemTextTransform(tabStripItem: TabStripItem, value: TextTransform): void {
927+
public setTabBarItemTextTransform(tabStripItem: TabStripItem, value: Enums.TextTransformType): void {
928928
const titleLabel = tabStripItem.label;
929929
const title = getTransformedText(titleLabel.text, value);
930930
tabStripItem.nativeViewProtected.setText(title);
931931
}
932932

933-
public getTabBarTextTransform(): TextTransform {
933+
public getTabBarTextTransform(): Enums.TextTransformType {
934934
return this._textTransform;
935935
}
936936

937-
public setTabBarTextTransform(value: TextTransform): void {
937+
public setTabBarTextTransform(value: Enums.TextTransformType): void {
938938
const items = this.tabStrip && this.tabStrip.items;
939939
if (items) {
940940
items.forEach((tabStripItem) => {

src/bottom-navigation/index.ios.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// Types
22
import { TabContentItem } from '@nativescript-community/ui-material-core/tab-navigation-base/tab-content-item';
3-
import { TabNavigationBase, itemsProperty, selectedIndexProperty, tabStripProperty } from '@nativescript-community/ui-material-core/tab-navigation-base/tab-navigation-base';
3+
import { TabNavigationBase, itemsProperty, selectedIndexProperty, tabStripProperty, getIconSpecSize } from '@nativescript-community/ui-material-core/tab-navigation-base/tab-navigation-base';
44
import { TabStrip } from '@nativescript-community/ui-material-core/tab-navigation-base/tab-strip';
55
import { TabStripItem } from '@nativescript-community/ui-material-core/tab-navigation-base/tab-strip-item';
66
// Types
77
// Requires
8-
import { CSSType, Color, Device, Font, Frame, IOSHelper, ImageSource, Property, Utils, View, booleanConverter, getIconSpecSize } from '@nativescript/core';
9-
import { TextTransform, getTransformedText } from '@nativescript/core/ui/text-base';
8+
import { CSSType, Color, Device, Font, Frame, IOSHelper, ImageSource, Property, Utils, View, booleanConverter, Enums } from '@nativescript/core';
9+
import { getTransformedText } from '@nativescript/core/ui/text-base';
1010
import { iOSNativeHelper } from '@nativescript/core/utils';
1111
export { TabContentItem, TabStrip, TabStripItem };
1212

@@ -416,7 +416,7 @@ export class BottomNavigation extends TabNavigationBase {
416416
}
417417
}
418418

419-
private setIconColor(tabStripItem: TabStripItem, forceReload: boolean = false): void {
419+
private setIconColor(tabStripItem: TabStripItem, forceReload = false): void {
420420
if (forceReload || (!this._unSelectedItemColor && !this._selectedItemColor)) {
421421
// if selectedItemColor or unSelectedItemColor is set we don't respect the color from the style
422422
const tabStripColor = this.selectedIndex === tabStripItem._index ? this._selectedItemColor : this._unSelectedItemColor;
@@ -440,7 +440,7 @@ export class BottomNavigation extends TabNavigationBase {
440440
this.setViewAttributes(tabStripItem.nativeView, tabStripItem.label);
441441
}
442442

443-
public setTabBarItemTextTransform(tabStripItem: TabStripItem, value: TextTransform): void {
443+
public setTabBarItemTextTransform(tabStripItem: TabStripItem, value: Enums.TextTransformType): void {
444444
tabStripItem.nativeView.title = getTransformedText(tabStripItem.label.text, value);
445445
}
446446

0 commit comments

Comments
 (0)