Skip to content
This repository was archived by the owner on May 3, 2023. It is now read-only.

Commit 2971115

Browse files
authored
Merge pull request #2 from NativeScript/feat/ns7
fix: NativeClass decorator and es2017 build for ns 7
2 parents cda8b61 + d5dab3c commit 2971115

File tree

8 files changed

+20
-16
lines changed

8 files changed

+20
-16
lines changed

src-angular/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// <reference path="references.d.ts" />
21
import { NgModule, Directive } from '@angular/core';
32
import { registerElement } from '@nativescript/angular';
43
import { UIChartsView } from '@nativescript/ui-charts';

src-angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"@nativescript/angular": "rc",
3030
"@nativescript/core": "rc",
3131
"cpy-cli": "~3.1.1",
32-
"@nativescript/ui-charts": "file:../src",
32+
"@nativescript/ui-charts": "latest",
3333
"ng-packagr": "~10.0.0",
3434
"rxjs": "^6.6.0",
3535
"typescript": "~3.9.0",

src-angular/references.d.ts

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

src/options-handlers/helpers/_helpers.common.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export declare const typesMap: {
6262
HIDataLabels: (options: any) => java.util.ArrayList<any>;
6363
HIExporting: (options: any) => any;
6464
HIFunction: (options: any) => com.highsoft.highcharts.core.HIFunction | HIFunction;
65+
HIHover: (options: any) => any;
6566
HILabel: (options: any) => any;
6667
HILabels: (options: any) => any;
6768
HILayoutAlgorithm: (options: any) => any;
@@ -74,13 +75,16 @@ export declare const typesMap: {
7475
HIPoint: (options: any) => any;
7576
HIPopup: (options: any) => any;
7677
HIPlotOptions: (options: any) => any;
78+
HIPlotBands: (options: any) => any;
79+
HIPlotLines: (options: any) => any;
7780
HIResetZoomButton: (options: any) => any;
7881
HIScrollablePlotArea: (options: any) => any;
7982
HISeries: (options: any) => any;
8083
HIShapes: (options: any) => any;
8184
HIStackLabels: (options: any) => any;
8285
HIStates: (options: any) => any;
8386
HISubtitle: (options: any) => any;
87+
HITime: (options: any) => any;
8488
HITitle: (options: any) => any;
8589
HITheme: (options: any) => any;
8690
HITooltip: (options: any) => any;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export declare function plotLinesHandler(plotLinesOptions: any): any;
1+
export declare function plotLinesHandler(plotLineOptions: any): any;

src/package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nativescript/ui-charts",
3-
"version": "0.0.4",
3+
"version": "0.0.5",
44
"description": "Nativescript wrapper for Highcharts iOS and Android SDKs",
55
"main": "ui-charts",
66
"typings": "index.d.ts",
@@ -15,7 +15,7 @@
1515
"url": "git+https://github.com/NativeScript/nativescript-ui-charts.git"
1616
},
1717
"scripts": {
18-
"tsc": "npm i && tsc",
18+
"tsc": "npm i && ts-patch install && tsc",
1919
"build": "npm run tsc && npm run build.native && npm run build.angular && mv \"$(npm pack | tail -n 1)\" nativescript-ui-charts.tgz",
2020
"build.angular": "cd ../src-angular && npm run build",
2121
"build.native": "node scripts/build-native.js",
@@ -29,7 +29,7 @@
2929
"demo-angular.android": "npm i && cd ../demo-angular && tns run android --no-hmr",
3030
"demo-angular.reset": "cd ../demo-angular && npx rimraf -- hooks node_modules platforms package-lock.json",
3131
"plugin.prepare": "npm run build && cd ../demo && tns plugin remove @nativescript/ui-charts && tns plugin add ../src && cd ../demo-angular && tns plugin remove @nativescript/ui-charts && tns plugin add ../src",
32-
"clean": "npm run demo.reset && npm run demo-angular.reset && npx rimraf -- node_modules package-lock.json angular && npm i"
32+
"clean": "npm run demo.reset && npm run demo-angular.reset && npx rimraf node_modules package-lock.json angular && npm run tsc"
3333
},
3434
"keywords": [
3535
"NativeScript",
@@ -58,14 +58,16 @@
5858
"homepage": "https://github.com/NativeScript/nativescript-ui-charts",
5959
"devDependencies": {
6060
"@nativescript/core": "rc",
61+
"@nativescript/webpack": "~2.1.0",
6162
"nativescript-vue": "^2.7.0",
6263
"prompt": "^1.0.0",
6364
"rimraf": "^3.0.2",
6465
"semver": "^7.3.2",
6566
"@nativescript/types": "rc",
6667
"tslint": "^6.1.2",
68+
"ts-node": "^9.0.0",
69+
"ts-patch": "~1.3.0",
6770
"typescript": "~3.9.0"
6871
},
69-
"dependencies": {},
7072
"bootstrapper": "nativescript-plugin-seed"
7173
}

src/tsconfig.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"compilerOptions": {
33
"noEmitHelpers": true,
4-
"target": "es5",
5-
"module": "commonjs",
4+
"target": "es2017",
5+
"module": "esnext",
66
"declaration": true,
77
"noImplicitAny": false,
88
"noImplicitUseStrict": true,
@@ -17,12 +17,14 @@
1717
"skipLibCheck": true,
1818
"skipDefaultLibCheck": true,
1919
"lib": [
20-
"es6",
20+
"es2017",
2121
"dom"
22+
],
23+
"plugins": [
24+
{ "transform": "@nativescript/webpack/transformers/ns-transform-native-classes", "type": "raw" }
2225
]
2326
},
2427
"exclude": [
25-
"node_modules",
26-
"node_modules/@nativescript/types"
28+
"node_modules"
2729
]
2830
}

src/ui-charts.ios.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export class UIChartsView extends UIChartsViewBase {
7171
}
7272
}
7373

74+
@NativeClass()
7475
class HighchartsViewDelegateImpl
7576
extends NSObject // native delegates mostly always extend NSObject
7677
implements HIChartViewDelegate {

0 commit comments

Comments
 (0)