Skip to content

Commit cf642fe

Browse files
authored
Merge pull request #268 from aspnetboilerplate/pr/265
Fixes #265
2 parents 6745e78 + 2c7e82e commit cf642fe

File tree

22 files changed

+998
-1491
lines changed

22 files changed

+998
-1491
lines changed

angular/angular.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
"node_modules/bootstrap/dist/js/bootstrap.js",
5151
"node_modules/lodash/lodash.min.js",
5252
"node_modules/moment/min/moment.min.js",
53-
"node_modules/signalr/jquery.signalR.js",
5453
"node_modules/@aspnet/signalr/dist/browser/signalr.min.js",
5554
"node_modules/toastr/toastr.js",
5655
"node_modules/sweetalert/dist/sweetalert.min.js",
@@ -143,7 +142,6 @@
143142
"node_modules/bootstrap/dist/js/bootstrap.js",
144143
"node_modules/lodash/lodash.min.js",
145144
"node_modules/moment/min/moment.min.js",
146-
"node_modules/signalr/jquery.signalR.js",
147145
"node_modules/@aspnet/signalr/dist/browser/signalr.min.js",
148146
"node_modules/toastr/toastr.js",
149147
"node_modules/sweetalert/dist/sweetalert.min.js",
@@ -248,4 +246,4 @@
248246
"prefix": "app"
249247
}
250248
}
251-
}
249+
}

angular/nswag/service.config.nswag

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
1+
{
22
"runtime": "Default",
33
"swaggerGenerator": {
44
"fromSwagger": {
@@ -14,7 +14,10 @@
1414
"typeScriptVersion": 2.0,
1515
"template": "Angular",
1616
"promiseType": "Promise",
17-
"httpClass": "HttpClient",
17+
"httpClass": "HttpClient",
18+
"useSingletonProvider": false,
19+
"injectionTokenType": "InjectionToken",
20+
"rxJsVersion": 6.0,
1821
"dateTimeType": "MomentJS",
1922
"nullValue": "Undefined",
2023
"generateClientClasses": true,
@@ -36,10 +39,11 @@
3639
"excludedTypeNames": [],
3740
"handleReferences": false,
3841
"generateConstructorInterface": true,
42+
"convertConstructorInterfaceData": false,
3943
"importRequiredTypes": true,
4044
"useGetBaseUrlMethod": false,
4145
"baseUrlTokenName": "API_BASE_URL",
42-
"injectionTokenType": "InjectionToken",
46+
"queryNullValue": "",
4347
"output": "../src/shared/service-proxies/service-proxies.ts"
4448
},
4549
"swaggerToCSharpClient": {
@@ -55,30 +59,41 @@
5559
"httpClientType": "System.Net.Http.HttpClient",
5660
"useHttpRequestMessageCreationMethod": false,
5761
"useBaseUrl": true,
62+
"generateBaseUrlProperty": true,
5863
"generateSyncMethods": false,
64+
"exposeJsonSerializerSettings": false,
5965
"clientClassAccessModifier": "public",
66+
"typeAccessModifier": "public",
6067
"generateContractsOutput": false,
6168
"parameterDateTimeFormat": "s",
6269
"generateUpdateJsonSerializerSettingsMethod": true,
6370
"serializeTypeInformation": false,
71+
"queryNullValue": "",
6472
"className": "{controller}Client",
65-
"namespace": "MyNamespace",
73+
"operationGenerationMode": "MultipleClientsFromOperationId",
6674
"generateOptionalParameters": false,
75+
"generateJsonMethods": true,
76+
"parameterArrayType": "System.Collections.Generic.IEnumerable",
77+
"parameterDictionaryType": "System.Collections.Generic.IDictionary",
78+
"responseArrayType": "System.Collections.ObjectModel.ObservableCollection",
79+
"responseDictionaryType": "System.Collections.Generic.Dictionary",
80+
"wrapResponses": false,
81+
"generateResponseClasses": true,
82+
"responseClass": "SwaggerResponse",
83+
"namespace": "MyNamespace",
6784
"requiredPropertiesMustBeDefined": true,
6885
"dateType": "System.DateTime",
6986
"dateTimeType": "System.DateTime",
7087
"timeType": "System.TimeSpan",
7188
"timeSpanType": "System.TimeSpan",
7289
"arrayType": "System.Collections.ObjectModel.ObservableCollection",
7390
"dictionaryType": "System.Collections.Generic.Dictionary",
91+
"arrayBaseType": "System.Collections.ObjectModel.ObservableCollection",
92+
"dictionaryBaseType": "System.Collections.Generic.Dictionary",
7493
"classStyle": "Inpc",
75-
"operationGenerationMode": "MultipleClientsFromOperationId",
7694
"generateDefaultValues": true,
7795
"generateDataAnnotations": true,
7896
"excludedTypeNames": [],
79-
"wrapResponses": false,
80-
"generateResponseClasses": true,
81-
"responseClass": "SwaggerResponse",
8297
"handleReferences": false,
8398
"generateImmutableArrayProperties": false,
8499
"generateImmutableDictionaryProperties": false,
@@ -87,31 +102,39 @@
87102
"swaggerToCSharpController": {
88103
"controllerStyle": "Partial",
89104
"useCancellationToken": false,
105+
"aspNetNamespace": "System.Web.Http",
90106
"className": "{controller}",
91-
"namespace": "MyNamespace",
107+
"operationGenerationMode": "MultipleClientsFromOperationId",
92108
"additionalNamespaceUsages": [
93109
"System.Web.Http"
94110
],
95111
"generateOptionalParameters": false,
112+
"generateJsonMethods": true,
113+
"parameterArrayType": "System.Collections.Generic.IEnumerable",
114+
"parameterDictionaryType": "System.Collections.Generic.IDictionary",
115+
"responseArrayType": "System.Collections.ObjectModel.ObservableCollection",
116+
"responseDictionaryType": "System.Collections.Generic.Dictionary",
117+
"wrapResponses": false,
118+
"generateResponseClasses": true,
119+
"responseClass": "SwaggerResponse",
120+
"namespace": "MyNamespace",
96121
"requiredPropertiesMustBeDefined": true,
97122
"dateType": "System.DateTime",
98123
"dateTimeType": "System.DateTime",
99124
"timeType": "System.TimeSpan",
100125
"timeSpanType": "System.TimeSpan",
101126
"arrayType": "System.Collections.Generic.IEnumerable",
102127
"dictionaryType": "System.Collections.Generic.Dictionary",
128+
"arrayBaseType": "System.Collections.ObjectModel.ObservableCollection",
129+
"dictionaryBaseType": "System.Collections.Generic.Dictionary",
103130
"classStyle": "Inpc",
104-
"operationGenerationMode": "MultipleClientsFromOperationId",
105131
"generateDefaultValues": true,
106132
"generateDataAnnotations": true,
107133
"excludedTypeNames": [],
108-
"wrapResponses": false,
109-
"generateResponseClasses": true,
110-
"responseClass": "SwaggerResponse",
111134
"handleReferences": false,
112135
"generateImmutableArrayProperties": false,
113136
"generateImmutableDictionaryProperties": false,
114137
"output": null
115138
}
116139
}
117-
}
140+
}

angular/package.json

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
},
1414
"private": true,
1515
"dependencies": {
16-
"@angular/animations": "^6.0.3",
17-
"@angular/common": "^6.0.3",
18-
"@angular/compiler": "^6.0.3",
19-
"@angular/core": "^6.0.3",
20-
"@angular/forms": "^6.0.3",
21-
"@angular/http": "^6.0.3",
22-
"@angular/platform-browser": "^6.0.3",
23-
"@angular/platform-browser-dynamic": "^6.0.3",
24-
"@angular/router": "^6.0.3",
16+
"@angular/animations": "^6.0.5",
17+
"@angular/common": "^6.0.5",
18+
"@angular/compiler": "^6.0.5",
19+
"@angular/core": "^6.0.5",
20+
"@angular/forms": "^6.0.5",
21+
"@angular/http": "^6.0.5",
22+
"@angular/platform-browser": "^6.0.5",
23+
"@angular/platform-browser-dynamic": "^6.0.5",
24+
"@angular/router": "^6.0.5",
2525
"@aspnet/signalr": "^1.0.0",
2626
"@types/bootstrap": "^3.3.33",
2727
"@types/jquery": "^3.2.12",
@@ -30,7 +30,6 @@
3030
"@types/lodash": "^4.14.62",
3131
"@types/moment": "^2.13.0",
3232
"@types/moment-timezone": "^0.2.34",
33-
"@types/signalr": "^2.2.33",
3433
"@types/toastr": "^2.1.33",
3534
"abp-ng2-module": "^3.0.0",
3635
"abp-web-resources": "^3.7.0",
@@ -53,13 +52,12 @@
5352
"moment": "^2.18.1",
5453
"moment-timezone": "^0.5.13",
5554
"morris.js": "^0.5.0",
56-
"ngx-bootstrap": "^2.0.2",
55+
"ngx-bootstrap": "^3.0.0",
5756
"ngx-pagination": "^3.0.3",
5857
"node-waves": "^0.7.5",
5958
"push.js": "1.0.4",
6059
"raphael": "^2.2.7",
6160
"rxjs": "^6.2.0",
62-
"signalr": "^2.2.1",
6361
"simple-line-icons": "^2.4.1",
6462
"spin.js": "^2.3.2",
6563
"sweetalert": "^2.0.8",
@@ -70,12 +68,12 @@
7068
"rxjs-compat": "^6.0.0-rc.0"
7169
},
7270
"devDependencies": {
73-
"@angular/cli": "^6.0.3",
74-
"@angular/compiler-cli": "^6.0.3",
71+
"@angular/cli": "^6.0.8",
72+
"@angular/compiler-cli": "^6.0.5",
7573
"@angularclass/hmr": "^2.1.3",
7674
"@types/jasmine": "^2.5.38",
7775
"@types/node": "^8.0.27",
78-
"codelyzer": "^3.1.2",
76+
"codelyzer": "^4.0.1",
7977
"jasmine-core": "^2.5.2",
8078
"jasmine-spec-reporter": "^4.2.1",
8179
"karma": "^1.4.1",
@@ -84,11 +82,11 @@
8482
"karma-coverage-istanbul-reporter": "^1.3.0",
8583
"karma-jasmine": "^1.1.0",
8684
"karma-jasmine-html-reporter": "^0.2.2",
87-
"nswag": "^11.12.7",
85+
"nswag": "^11.17.10",
8886
"protractor": "^5.1.1",
8987
"ts-node": "^3.3.0",
9088
"tslint": "^5.7.0",
9189
"typescript": "2.7.2",
92-
"@angular-devkit/build-angular": "~0.6.3"
90+
"@angular-devkit/build-angular": "~0.6.8"
9391
}
9492
}

angular/src/app/app.component.ts

Lines changed: 29 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,43 @@
1-
import { Component, ViewContainerRef, Injector, OnInit, AfterViewInit } from '@angular/core';
1+
import { Component, ViewContainerRef, Injector, OnInit, AfterViewInit } from '@angular/core';
22
import { AppConsts } from '@shared/AppConsts';
33
import { AppComponentBase } from '@shared/app-component-base';
44

5-
import { SignalRHelper } from '@shared/helpers/SignalRHelper';
65
import { SignalRAspNetCoreHelper } from '@shared/helpers/SignalRAspNetCoreHelper';
76

87
@Component({
9-
templateUrl: './app.component.html'
8+
templateUrl: './app.component.html'
109
})
1110
export class AppComponent extends AppComponentBase implements OnInit, AfterViewInit {
1211

13-
private viewContainerRef: ViewContainerRef;
12+
private viewContainerRef: ViewContainerRef;
1413

15-
constructor(
16-
injector: Injector
17-
) {
18-
super(injector);
19-
}
14+
constructor(
15+
injector: Injector
16+
) {
17+
super(injector);
18+
}
2019

21-
ngOnInit(): void {
22-
if (this.appSession.application.features['SignalR']) {
23-
if (this.appSession.application.features['SignalR.AspNetCore']) {
20+
ngOnInit(): void {
2421
SignalRAspNetCoreHelper.initSignalR();
25-
} else {
26-
SignalRHelper.initSignalR();
27-
}
22+
23+
abp.event.on('abp.notifications.received', userNotification => {
24+
abp.notifications.showUiNotifyForUserNotification(userNotification);
25+
26+
//Desktop notification
27+
Push.create("AbpZeroTemplate", {
28+
body: userNotification.notification.data.message,
29+
icon: abp.appPath + 'assets/app-logo-small.png',
30+
timeout: 6000,
31+
onClick: function () {
32+
window.focus();
33+
this.close();
34+
}
35+
});
36+
});
2837
}
2938

30-
abp.event.on('abp.notifications.received', userNotification => {
31-
abp.notifications.showUiNotifyForUserNotification(userNotification);
32-
33-
//Desktop notification
34-
Push.create("AbpZeroTemplate", {
35-
body: userNotification.notification.data.message,
36-
icon: abp.appPath + 'assets/app-logo-small.png',
37-
timeout: 6000,
38-
onClick: function () {
39-
window.focus();
40-
this.close();
41-
}
42-
});
43-
});
44-
}
45-
46-
ngAfterViewInit(): void {
47-
($ as any).AdminBSB.activateAll();
48-
($ as any).AdminBSB.activateDemo();
49-
}
50-
}
39+
ngAfterViewInit(): void {
40+
($ as any).AdminBSB.activateAll();
41+
($ as any).AdminBSB.activateDemo();
42+
}
43+
}

angular/src/shared/helpers/SignalRHelper.ts

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

0 commit comments

Comments
 (0)