Skip to content

Commit 0a81077

Browse files
committed
chore: NativeScript 8 cleanup
1 parent dd89f45 commit 0a81077

File tree

14 files changed

+15955
-170
lines changed

14 files changed

+15955
-170
lines changed

demo-ng/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"@angular/platform-browser": "~11.2.0",
1010
"@angular/platform-browser-dynamic": "~11.2.0",
1111
"@angular/router": "~11.2.0",
12-
"@nativescript/core": "8.0.0-alpha.2",
13-
"@nativescript/angular": "~11.0.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",

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": "8.0.0-alpha.2",
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": "8.0.0-alpha.2",
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": "8.0.0-alpha.2",
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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@
5858
"@commitlint/cli": "^12.0.1",
5959
"@commitlint/config-conventional": "^12.0.1",
6060
"@nativescript-community/text": "^1.4.9",
61-
"@nativescript/angular": "~11.0.0",
62-
"@nativescript/core": "8.0.0-alpha.2",
61+
"@nativescript/angular": "ns8",
62+
"@nativescript/core": "8.0.0-alpha.8",
6363
"@nativescript/eslint-plugin": "0.0.1",
6464
"@nativescript/hook": "~2.0.0",
65-
"@nativescript/types": "7.2.0",
65+
"@nativescript/types": "7.3.0",
6666
"@nativescript/webpack": "~4.0.1",
6767
"@types/node": "~14.14.35",
6868
"@typescript-eslint/eslint-plugin": "4.18.0",

src/bottom-navigation/index.android.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
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, Enums } from '@nativescript/core';
7+
import { Application, CSSType, Color, Font, Frame, ImageSource, Utils, View, Enums } from '@nativescript/core';
88
import { getTransformedText } from '@nativescript/core/ui/text-base';
99
export { TabContentItem, TabStrip, TabStripItem };
1010

src/bottom-navigation/index.ios.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
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, Enums } from '@nativescript/core';
8+
import { CSSType, Color, Device, Font, Frame, IOSHelper, ImageSource, Property, Utils, View, booleanConverter, Enums } from '@nativescript/core';
99
import { getTransformedText } from '@nativescript/core/ui/text-base';
1010
import { iOSNativeHelper } from '@nativescript/core/utils';
1111
export { TabContentItem, TabStrip, TabStripItem };

src/core/android/utils.ts

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,55 +58,91 @@ export const stateSets = {
5858
if (!this._PRESSED_STATE_SET) {
5959
this._PRESSED_STATE_SET = createNativeArray(state.pressed);
6060
}
61+
<<<<<<< HEAD
6162
return this._PRESSED_STATE_SET as Array<number>;
63+
=======
64+
return this._PRESSED_STATE_SET as androidNative.Array<number>;
65+
>>>>>>> chore: NativeScript 8 cleanup
6266
},
6367
get HOVERED_FOCUSED_STATE_SET() {
6468
if (!this._HOVERED_FOCUSED_STATE_SET) {
6569
this._HOVERED_FOCUSED_STATE_SET = createNativeArray(state.hovered, state.focused);
6670
}
71+
<<<<<<< HEAD
6772
return this._PRESSED_STATE_SET as Array<number>;
73+
=======
74+
return this._PRESSED_STATE_SET as androidNative.Array<number>;
75+
>>>>>>> chore: NativeScript 8 cleanup
6876
},
6977
get FOCUSED_STATE_SET() {
7078
if (!this._FOCUSED_STATE_SET) {
7179
this._FOCUSED_STATE_SET = createNativeArray(state.focused);
7280
}
81+
<<<<<<< HEAD
7382
return this._FOCUSED_STATE_SET as Array<number>;
83+
=======
84+
return this._FOCUSED_STATE_SET as androidNative.Array<number>;
85+
>>>>>>> chore: NativeScript 8 cleanup
7486
},
7587
get HOVERED_STATE_SET() {
7688
if (!this._HOVERED_STATE_SET) {
7789
this._HOVERED_STATE_SET = createNativeArray(state.hovered);
7890
}
91+
<<<<<<< HEAD
7992
return this._HOVERED_STATE_SET as Array<number>;
93+
=======
94+
return this._HOVERED_STATE_SET as androidNative.Array<number>;
95+
>>>>>>> chore: NativeScript 8 cleanup
8096
},
8197
get SELECTED_PRESSED_STATE_SET() {
8298
if (!this._SELECTED_PRESSED_STATE_SET) {
8399
this._SELECTED_PRESSED_STATE_SET = createNativeArray(state.enabled, state.pressed);
84100
}
101+
<<<<<<< HEAD
85102
return this._SELECTED_PRESSED_STATE_SET as Array<number>;
103+
=======
104+
return this._SELECTED_PRESSED_STATE_SET as androidNative.Array<number>;
105+
>>>>>>> chore: NativeScript 8 cleanup
86106
},
87107
get SELECTED_HOVERED_FOCUSED_STATE_SET() {
88108
if (!this._SELECTED_HOVERED_FOCUSED_STATE_SET) {
89109
this._SELECTED_HOVERED_FOCUSED_STATE_SET = createNativeArray(state.selected, state.hovered, state.focused);
90110
}
111+
<<<<<<< HEAD
91112
return this._SELECTED_HOVERED_FOCUSED_STATE_SET as Array<number>;
113+
=======
114+
return this._SELECTED_HOVERED_FOCUSED_STATE_SET as androidNative.Array<number>;
115+
>>>>>>> chore: NativeScript 8 cleanup
92116
},
93117
get SELECTED_FOCUSED_STATE_SET() {
94118
if (!this._SELECTED_FOCUSED_STATE_SET) {
95119
this._SELECTED_FOCUSED_STATE_SET = createNativeArray(state.selected, state.focused);
96120
}
121+
<<<<<<< HEAD
97122
return this._SELECTED_FOCUSED_STATE_SET as Array<number>;
123+
=======
124+
return this._SELECTED_FOCUSED_STATE_SET as androidNative.Array<number>;
125+
>>>>>>> chore: NativeScript 8 cleanup
98126
},
99127
get SELECTED_HOVERED_STATE_SET() {
100128
if (!this._SELECTED_HOVERED_STATE_SET) {
101129
this._SELECTED_HOVERED_STATE_SET = createNativeArray(state.selected, state.hovered);
102130
}
131+
<<<<<<< HEAD
103132
return this._SELECTED_HOVERED_STATE_SET as Array<number>;
133+
=======
134+
return this._SELECTED_HOVERED_STATE_SET as androidNative.Array<number>;
135+
>>>>>>> chore: NativeScript 8 cleanup
104136
},
105137
get SELECTED_STATE_SET() {
106138
if (!this._SELECTED_STATE_SET) {
107139
this._SELECTED_STATE_SET = createNativeArray(state.selected);
108140
}
141+
<<<<<<< HEAD
109142
return this._SELECTED_STATE_SET as Array<number>;
143+
=======
144+
return this._SELECTED_STATE_SET as androidNative.Array<number>;
145+
>>>>>>> chore: NativeScript 8 cleanup
110146
},
111147
get BACKGROUND_DEFAULT_STATE_1() {
112148
if (!this._BACKGROUND_DEFAULT_STATE_1) {
@@ -118,31 +154,51 @@ export const stateSets = {
118154
if (!this._BACKGROUND_DEFAULT_STATE_1_SET) {
119155
this._BACKGROUND_DEFAULT_STATE_1_SET = createNativeArray(state.enabled);
120156
}
157+
<<<<<<< HEAD
121158
return this._BACKGROUND_DEFAULT_STATE_1_SET as Array<number>;
159+
=======
160+
return this._BACKGROUND_DEFAULT_STATE_1_SET as androidNative.Array<number>;
161+
>>>>>>> chore: NativeScript 8 cleanup
122162
},
123163
get BACKGROUND_SELECTED_STATE() {
124164
if (!this._BACKGROUND_SELECTED_STATE) {
125165
this._BACKGROUND_SELECTED_STATE = createNativeArray(state.window_focused, state.enabled, state.pressed);
126166
}
167+
<<<<<<< HEAD
127168
return this._BACKGROUND_SELECTED_STATE as Array<number>;
169+
=======
170+
return this._BACKGROUND_SELECTED_STATE as androidNative.Array<number>;
171+
>>>>>>> chore: NativeScript 8 cleanup
128172
},
129173
get BACKGROUND_CHECKED_STATE() {
130174
if (!this._BACKGROUND_CHECKED_STATE) {
131175
this._BACKGROUND_CHECKED_STATE = createNativeArray(state.window_focused, state.enabled, state.checked);
132176
}
177+
<<<<<<< HEAD
133178
return this._BACKGROUND_CHECKED_STATE as Array<number>;
179+
=======
180+
return this._BACKGROUND_CHECKED_STATE as androidNative.Array<number>;
181+
>>>>>>> chore: NativeScript 8 cleanup
134182
},
135183
get BACKGROUND_FOCUSED_STATE() {
136184
if (!this._BACKGROUND_FOCUSED_STATE) {
137185
this._BACKGROUND_FOCUSED_STATE = createNativeArray(state.focused, state.window_focused, state.enabled);
138186
}
187+
<<<<<<< HEAD
139188
return this._BACKGROUND_FOCUSED_STATE as Array<number>;
189+
=======
190+
return this._BACKGROUND_FOCUSED_STATE as androidNative.Array<number>;
191+
>>>>>>> chore: NativeScript 8 cleanup
140192
},
141193
get BACKGROUND_DISABLED_STATE() {
142194
if (!this._BACKGROUND_DISABLED_STATE) {
143195
this._BACKGROUND_DISABLED_STATE = createNativeArray(-state.enabled);
144196
}
197+
<<<<<<< HEAD
145198
return this._BACKGROUND_DISABLED_STATE as Array<number>;
199+
=======
200+
return this._BACKGROUND_DISABLED_STATE as androidNative.Array<number>;
201+
>>>>>>> chore: NativeScript 8 cleanup
146202
}
147203
};
148204

src/core/index.d.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
<<<<<<< HEAD
12
/**
23
* Material Core component
34
* @module @nativescript-community/ui-material-core
45
*/
56

67
import { Color, LengthPercentUnit, PercentLength } from '@nativescript/core';
8+
=======
9+
import { Color, CoreTypes, PercentLength } from '@nativescript/core';
10+
>>>>>>> chore: NativeScript 8 cleanup
711

812
declare module '@nativescript/core/ui/core/view' {
913
interface View {
@@ -20,11 +24,11 @@ export interface TypographyOptions {
2024
import { CornerFamily } from './index.common';
2125
export { CornerFamily };
2226
export interface ShapeProperties {
23-
cornerSize?: number | LengthPercentUnit;
24-
cornerSizeTopRight?: number | LengthPercentUnit;
25-
cornerSizeBottomLeft?: number | LengthPercentUnit;
26-
cornerSizeTopLeft?: number | LengthPercentUnit;
27-
cornerSizeBottomRight?: number | LengthPercentUnit;
27+
cornerSize?: number | CoreTypes.LengthPercentUnit;
28+
cornerSizeTopRight?: number | CoreTypes.LengthPercentUnit;
29+
cornerSizeBottomLeft?: number | CoreTypes.LengthPercentUnit;
30+
cornerSizeTopLeft?: number | CoreTypes.LengthPercentUnit;
31+
cornerSizeBottomRight?: number | CoreTypes.LengthPercentUnit;
2832
cornerFamily?: CornerFamily;
2933
cornerFamilyTopLeft?: CornerFamily;
3034
cornerFamilyTopRight?: CornerFamily;

src/core/index.ios.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
Color,
55
ControlStateChangeListener,
66
GestureTypes,
7-
LengthPercentUnit,
7+
CoreTypes,
88
TouchAction,
99
TouchGestureEventData,
1010
Utils,
@@ -26,7 +26,7 @@ function createCornerFamily(cornerFamily: CornerFamily): MDCShapeCornerFamily {
2626
return MDCShapeCornerFamily.Rounded;
2727
}
2828
}
29-
function cornerTreatment(cornerFamily: CornerFamily, cornerSize: number | LengthPercentUnit) {
29+
function cornerTreatment(cornerFamily: CornerFamily, cornerSize: number | CoreTypes.LengthPercentUnit) {
3030
let corner: MDCCornerTreatment;
3131
if (typeof cornerSize === 'object') {
3232
if (cornerFamily === CornerFamily.CUT) {

0 commit comments

Comments
 (0)