Skip to content

Commit 10b9253

Browse files
committed
chore: reorganise exports
1 parent 1090095 commit 10b9253

16 files changed

+60
-31
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "@nativescript/angular/element-registry";

nativescript-angular-package/index.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1-
export * from "@nativescript/angular";
1+
export * from "@nativescript/angular";
2+
export * from "@nativescript/angular/forms";
3+
export * from "@nativescript/angular/router";
4+
export * from "@nativescript/angular/file-system/ns-file-system";
5+
export * from "@nativescript/angular/modal-dialog";
6+
export * from "@nativescript/angular/forms/value-accessors/base-value-accessor";
7+
export * from "@nativescript/angular/trace";
8+
export * from "@nativescript/angular/renderer";
9+
export * from "@nativescript/angular/view-util";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "@nativescript/angular/platform-providers";
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "@nativescript/angular/renderer";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "@nativescript/angular/resource-loader";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "@nativescript/angular/router/ns-route-reuse-strategy";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "@nativescript/angular/router/ns-router-link";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "@nativescript/angular/view-util";

nativescript-angular/common.ts

+2
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,5 @@ import { NS_DIRECTIVES } from "./directives";
3838
})
3939
export class NativeScriptCommonModule {
4040
}
41+
42+
export * from "./directives";
+18-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ListViewComponent } from "./list-view-comp";
2-
import { TemplateKeyDirective } from "./templated-items-comp";
2+
import { TemplateKeyDirective, SetupItemViewArgs } from "./templated-items-comp";
33
import { TabViewDirective, TabViewItemDirective } from "./tab-view";
44
import {
55
ActionBarComponent,
@@ -8,22 +8,25 @@ import {
88
NavigationButtonDirective
99
} from "./action-bar";
1010
import { AndroidFilterComponent, IosFilterComponent } from "./platform-filters";
11+
import { ModalDialogHost, ModalDialogOptions, ModalDialogParams, ModalDialogService } from "./dialogs";
1112

12-
export { ListViewComponent } from "./list-view-comp";
13-
export { SetupItemViewArgs, TemplateKeyDirective } from "./templated-items-comp";
14-
15-
export { TabViewDirective, TabViewItemDirective } from "./tab-view";
16-
export {
13+
export const NS_DIRECTIVES = [
14+
ListViewComponent,
15+
TemplateKeyDirective,
16+
TabViewDirective,
17+
TabViewItemDirective,
1718
ActionBarComponent,
1819
ActionBarScope,
1920
ActionItemDirective,
20-
NavigationButtonDirective
21-
} from "./action-bar";
22-
export { AndroidFilterComponent, IosFilterComponent } from "./platform-filters";
21+
NavigationButtonDirective,
22+
AndroidFilterComponent,
23+
IosFilterComponent,
24+
];
2325

24-
export const NS_DIRECTIVES = [
26+
export {
2527
ListViewComponent,
2628
TemplateKeyDirective,
29+
SetupItemViewArgs,
2730
TabViewDirective,
2831
TabViewItemDirective,
2932
ActionBarComponent,
@@ -32,4 +35,8 @@ export const NS_DIRECTIVES = [
3235
NavigationButtonDirective,
3336
AndroidFilterComponent,
3437
IosFilterComponent,
35-
];
38+
ModalDialogHost,
39+
ModalDialogOptions,
40+
ModalDialogParams,
41+
ModalDialogService
42+
};

nativescript-angular/forms/forms.module.ts

+9
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ export const FORMS_DIRECTIVES = [
1818
NumberValueAccessor,
1919
];
2020

21+
export {
22+
TextValueAccessor,
23+
CheckedValueAccessor,
24+
DateValueAccessor,
25+
TimeValueAccessor,
26+
SelectedIndexValueAccessor,
27+
NumberValueAccessor
28+
};
29+
2130
@NgModule({
2231
declarations: FORMS_DIRECTIVES,
2332
providers: [

nativescript-angular/index.ts

+1-12
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,11 @@ import "tns-core-modules/application";
33
export * from "./platform-common";
44
export * from "./platform";
55
export * from "./platform-static";
6-
export * from "./router";
7-
export * from "./forms";
8-
export * from "./directives";
9-
export * from "./common/detached-loader";
10-
export * from "./trace";
116
export * from "./platform-providers";
12-
export * from "./file-system/ns-file-system";
13-
export * from "./modal-dialog";
14-
export * from "./renderer";
15-
export * from "./view-util";
167
export * from "./resource-loader";
178

189
export * from "./nativescript.module";
19-
export * from "./platform";
10+
export * from "./common";
2011

2112
export {
2213
ViewClass,
@@ -27,5 +18,3 @@ export {
2718
isKnownView,
2819
registerElement,
2920
} from "./element-registry";
30-
31-
export * from "./forms/value-accessors/base-value-accessor";

nativescript-angular/nativescript.module.ts

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ export function errorHandlerFactory() {
3333
return new ErrorHandler();
3434
}
3535

36+
export { DetachedLoader };
37+
3638
@NgModule({
3739
declarations: [
3840
DetachedLoader,

nativescript-angular/router/router.module.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ export { PageRoute } from "./page-router-outlet";
1616
export { RouterExtensions } from "./router-extensions";
1717
export { NSModuleFactoryLoader } from "./ns-module-factory-loader";
1818

19-
export { NSRouterLink } from "./ns-router-link";
20-
export { NSRouterLinkActive } from "./ns-router-link-active";
21-
export { PageRouterOutlet } from "./page-router-outlet";
22-
export { NSEmptyOutletComponent } from "./ns-empty-outlet.component";
23-
export { NSLocationStrategy } from "./ns-location-strategy";
19+
export { NSRouterLink, NSRouterLinkActive, PageRouterOutlet, NSEmptyOutletComponent, NSLocationStrategy };
2420

2521
const ROUTER_DIRECTIVES = [NSRouterLink, NSRouterLinkActive, PageRouterOutlet, NSEmptyOutletComponent];
2622

tests/package.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
22
"nativescript": {
3-
"id": "org.nativescript.ngtests"
3+
"id": "org.nativescript.ngtests",
4+
"tns-ios": {
5+
"version": "6.1.1"
6+
},
7+
"tns-android": {
8+
"version": "6.1.2"
9+
}
410
},
511
"name": "ngtests",
612
"version": "1.0.0",
@@ -27,7 +33,7 @@
2733
"@angular/platform-browser": "~8.2.0",
2834
"@angular/platform-browser-dynamic": "~8.2.0",
2935
"@angular/router": "~8.2.0",
30-
"nativescript-angular": "../nativescript-angular",
36+
"nativescript-angular": "../nativescript-angular-package",
3137
"nativescript-unit-test-runner": "0.7.0",
3238
"rxjs": "^6.4.0",
3339
"tns-core-modules": "next",

tests/tsconfig.json

+3
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,13 @@
2323
}
2424
},
2525
"include": [
26+
"../nativescript-angular-package",
2627
"../nativescript-angular",
2728
"**/*"
2829
],
2930
"exclude": [
31+
"../nativescript-angular-package/node_modules",
32+
"../nativescript-angular-package/**/*.d.ts",
3033
"../nativescript-angular/node_modules",
3134
"../nativescript-angular/**/*.d.ts",
3235
"node_modules",

0 commit comments

Comments
 (0)