@hivegpt/hiveai-angular 0.0.362 → 0.0.363
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/bundles/hivegpt-hiveai-angular.umd.js +11 -14
- package/bundles/hivegpt-hiveai-angular.umd.js.map +1 -1
- package/bundles/hivegpt-hiveai-angular.umd.min.js +1 -1
- package/bundles/hivegpt-hiveai-angular.umd.min.js.map +1 -1
- package/esm2015/lib/components/translations/translation.service.js +9 -13
- package/fesm2015/hivegpt-hiveai-angular.js +9 -12
- package/fesm2015/hivegpt-hiveai-angular.js.map +1 -1
- package/hivegpt-hiveai-angular.metadata.json +1 -1
- package/lib/components/translations/translation.service.d.ts +0 -2
- package/lib/components/translations/translation.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common/http'), require('@angular/core'), require('@angular/
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@hivegpt/hiveai-angular', ['exports', '@angular/common/http', '@angular/core', '@angular/
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.hivegpt = global.hivegpt || {}, global.hivegpt["hiveai-angular"] = {}), global.ng.common.http, global.ng.core, global.ng.
|
|
5
|
-
})(this, (function (exports, i1, i0,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common/http'), require('@angular/core'), require('@angular/platform-browser'), require('rxjs'), require('rxjs/operators'), require('ngx-socket-io'), require('@angular/forms'), require('microsoft-cognitiveservices-speech-sdk'), require('marked'), require('@angular/common'), require('@angular/material/icon'), require('@angular/material/sidenav'), require('ngx-quill')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@hivegpt/hiveai-angular', ['exports', '@angular/common/http', '@angular/core', '@angular/platform-browser', 'rxjs', 'rxjs/operators', 'ngx-socket-io', '@angular/forms', 'microsoft-cognitiveservices-speech-sdk', 'marked', '@angular/common', '@angular/material/icon', '@angular/material/sidenav', 'ngx-quill'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.hivegpt = global.hivegpt || {}, global.hivegpt["hiveai-angular"] = {}), global.ng.common.http, global.ng.core, global.ng.platformBrowser, global.rxjs, global.rxjs.operators, global.ngxSocketIo, global.ng.forms, global.SpeechSDK, global.marked, global.ng.common, global.ng.material.icon, global.ng.material.sidenav, global.ngxQuill));
|
|
5
|
+
})(this, (function (exports, i1, i0, platformBrowser, rxjs, operators, ngxSocketIo, forms, SpeechSDK, marked, common, icon, sidenav, ngxQuill) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -536,9 +536,7 @@
|
|
|
536
536
|
};
|
|
537
537
|
|
|
538
538
|
var TranslationService = /** @class */ (function () {
|
|
539
|
-
|
|
540
|
-
function TranslationService(platformId) {
|
|
541
|
-
this.platformId = platformId;
|
|
539
|
+
function TranslationService() {
|
|
542
540
|
this.eventId = null;
|
|
543
541
|
this.translationsData = [
|
|
544
542
|
{
|
|
@@ -723,6 +721,8 @@
|
|
|
723
721
|
},
|
|
724
722
|
];
|
|
725
723
|
}
|
|
724
|
+
// optional: helps with SSR safety if you use Angular Universal
|
|
725
|
+
// constructor(@Inject(PLATFORM_ID) private platformId: Object) {}
|
|
726
726
|
TranslationService.prototype.setEventId = function (id) {
|
|
727
727
|
this.eventId = id;
|
|
728
728
|
};
|
|
@@ -740,22 +740,19 @@
|
|
|
740
740
|
TranslationService.prototype.getLang = function (eventId) {
|
|
741
741
|
var suffix = eventId ? "-" + eventId : '';
|
|
742
742
|
var storageKey = "defaultLanguage" + suffix;
|
|
743
|
-
if (
|
|
744
|
-
|
|
745
|
-
}
|
|
743
|
+
// if (isPlatformBrowser(this.platformId)) {
|
|
744
|
+
return localStorage.getItem(storageKey) || 'en';
|
|
745
|
+
// }
|
|
746
746
|
return 'en'; // SSR fallback
|
|
747
747
|
};
|
|
748
748
|
return TranslationService;
|
|
749
749
|
}());
|
|
750
|
-
TranslationService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function TranslationService_Factory() { return new TranslationService(
|
|
750
|
+
TranslationService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function TranslationService_Factory() { return new TranslationService(); }, token: TranslationService, providedIn: "root" });
|
|
751
751
|
TranslationService.decorators = [
|
|
752
752
|
{ type: i0.Injectable, args: [{
|
|
753
753
|
providedIn: 'root',
|
|
754
754
|
},] }
|
|
755
755
|
];
|
|
756
|
-
TranslationService.ctorParameters = function () { return [
|
|
757
|
-
{ type: Object, decorators: [{ type: i0.Inject, args: [i0.PLATFORM_ID,] }] }
|
|
758
|
-
]; };
|
|
759
756
|
|
|
760
757
|
var formatHoursAndMinutes = function (date) {
|
|
761
758
|
var hours = date.getHours() % 12;
|