mobicloud-core 1.0.244 → 1.0.246
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/mobicloud-data.service.d.ts +1 -1
- package/bundles/mobicloud-core-api.umd.js +12 -9
- package/bundles/mobicloud-core-api.umd.js.map +1 -1
- package/esm2015/api/mobicloud-data.service.js +12 -9
- package/fesm2015/mobicloud-core-api.js +11 -8
- package/fesm2015/mobicloud-core-api.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import * as signalR from "@
|
|
3
|
+
import * as signalR from "@microsoft/signalr";
|
|
4
4
|
import { MobicloudCoreService } from "mobicloud-core";
|
|
5
5
|
import { IODataResult } from "mobicloud-core";
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/common/http'), require('rxjs/operators'), require('rxjs'), require('@
|
|
3
|
-
typeof define === 'function' && define.amd ? define('mobicloud-core/api', ['exports', '@angular/core', '@angular/common', '@angular/common/http', 'rxjs/operators', 'rxjs', '@
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/common/http'), require('rxjs/operators'), require('rxjs'), require('@microsoft/signalr'), require('mobicloud-core'), require('@angular/localize/init'), require('moment')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('mobicloud-core/api', ['exports', '@angular/core', '@angular/common', '@angular/common/http', 'rxjs/operators', 'rxjs', '@microsoft/signalr', 'mobicloud-core', '@angular/localize/init', 'moment'], factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["mobicloud-core"] = global["mobicloud-core"] || {}, global["mobicloud-core"].api = {}), global.ng.core, global.ng.common, global.ng.common.http, global.rxjs.operators, global.rxjs, global.signalR, global["mobicloud-core"], global.ng.localize.init, global.moment));
|
|
5
5
|
})(this, (function (exports, i0, common, i1, operators, rxjs, signalR, i2, init, moment) { 'use strict';
|
|
6
6
|
|
|
@@ -456,7 +456,7 @@
|
|
|
456
456
|
'Access-Control-Allow-Origin': '*',
|
|
457
457
|
'Authorization': (_a = this.coreService.authorizationHeader) !== null && _a !== void 0 ? _a : ''
|
|
458
458
|
};
|
|
459
|
-
if (this.coreService.isMasterUserAuthenticated()) {
|
|
459
|
+
if (this.coreService.isMasterUserAuthenticated() || this.coreService.hasMasterOrganization()) {
|
|
460
460
|
strMasterOrganizationId = this.coreService.getMasterOrganization();
|
|
461
461
|
if (strMasterOrganizationId) {
|
|
462
462
|
headerVal['OrganizationId'] = strMasterOrganizationId;
|
|
@@ -510,13 +510,16 @@
|
|
|
510
510
|
MobiCloudDataService.prototype.createHubConnection = function (name) {
|
|
511
511
|
var _this = this;
|
|
512
512
|
var _a, _b;
|
|
513
|
-
var
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
513
|
+
var managedOrgParm = '';
|
|
514
|
+
if ((_a = this.coreService) === null || _a === void 0 ? void 0 : _a.hasMasterOrganization()) {
|
|
515
|
+
var strMasterOrganizationId = (_b = this.coreService) === null || _b === void 0 ? void 0 : _b.getMasterOrganization();
|
|
516
|
+
managedOrgParm = "?managedOrg=" + strMasterOrganizationId;
|
|
517
|
+
console.log("SignalR Master organization", strMasterOrganizationId);
|
|
518
|
+
}
|
|
518
519
|
var connection = new signalR__namespace.HubConnectionBuilder()
|
|
519
|
-
.withUrl("" + (
|
|
520
|
+
.withUrl("" + (this === null || this === void 0 ? void 0 : this.coreService.configService.getApiSiteUrl()) + name + managedOrgParm, {
|
|
521
|
+
accessTokenFactory: function () { return _this.getAccessToken(); }
|
|
522
|
+
})
|
|
520
523
|
.withAutomaticReconnect()
|
|
521
524
|
.build();
|
|
522
525
|
return connection;
|