@bizdoc/core 3.6.6 → 3.6.7
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/fesm2022/bizdoc-core.mjs +19 -17
- package/fesm2022/bizdoc-core.mjs.map +1 -1
- package/index.d.ts +6 -2
- package/package.json +1 -1
package/fesm2022/bizdoc-core.mjs
CHANGED
@@ -14,7 +14,7 @@ import { Loader } from '@googlemaps/js-api-loader';
|
|
14
14
|
import * as firebase from 'firebase/app';
|
15
15
|
import { getMessaging, deleteToken, getToken } from 'firebase/messaging';
|
16
16
|
import * as i1 from '@angular/common/http';
|
17
|
-
import { HttpRequest, HttpResponse, HttpEventType, HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
17
|
+
import { HttpRequest, HttpResponse, HttpEventType, HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi, withFetch } from '@angular/common/http';
|
18
18
|
import * as i2 from 'ngx-cookie-service';
|
19
19
|
import { CookieService } from 'ngx-cookie-service';
|
20
20
|
import * as i7 from '@angular/material/icon';
|
@@ -1105,12 +1105,16 @@ function SessionProviderFactory(provider) {
|
|
1105
1105
|
return () => provider.prepare();
|
1106
1106
|
}
|
1107
1107
|
class SessionService {
|
1108
|
+
/**
|
1109
|
+
*
|
1110
|
+
* @returns
|
1111
|
+
*/
|
1108
1112
|
prepare() {
|
1109
|
-
('serviceWorker' in navigator) && this._loadServiceWorker();
|
1110
1113
|
const promises = [];
|
1114
|
+
('serviceWorker' in navigator) && this._loadServiceWorker();
|
1111
1115
|
this._config.maps && promises.push(this._loadGoogleMaps());
|
1112
1116
|
promises.push(this._changeTheme(this.theme));
|
1113
|
-
return
|
1117
|
+
return Promise.all(promises);
|
1114
1118
|
}
|
1115
1119
|
constructor(_config, _http, _cookies, _hub, iconRegistry, sanitizer) {
|
1116
1120
|
this._config = _config;
|
@@ -2630,9 +2634,10 @@ const STRINGS = {
|
|
2630
2634
|
}
|
2631
2635
|
};
|
2632
2636
|
|
2633
|
-
const CLDR_FILES
|
2637
|
+
const CLDR_FILES = ['cldr-data/main/{0}/ca-gregorian.json', 'cldr-data/main/{0}/numbers.json', 'cldr-data/main/{0}/timeZoneNames.json',
|
2638
|
+
'cldr-data/main/{0}/currencies.json', 'cldr-data/supplemental/numberingSystems.json'];
|
2634
2639
|
function TranslateProviderFactory(provider) {
|
2635
|
-
return () => provider.cldr(
|
2640
|
+
return () => provider.cldr();
|
2636
2641
|
}
|
2637
2642
|
class TranslateService {
|
2638
2643
|
static set(resources) {
|
@@ -2683,10 +2688,10 @@ class TranslateService {
|
|
2683
2688
|
});
|
2684
2689
|
_session.loaded.subscribe(() => this._gender = this._session.gender);
|
2685
2690
|
}
|
2686
|
-
cldr(
|
2691
|
+
cldr() {
|
2687
2692
|
if ('en' === this._session.language)
|
2688
2693
|
return Promise.resolve();
|
2689
|
-
const observables =
|
2694
|
+
const observables = CLDR_FILES.map(f => this._http.get('/assets/i18n/' + f.replace('{0}', this.culture)).pipe(tap(loadCldr)));
|
2690
2695
|
return firstValueFrom(forkJoin(observables));
|
2691
2696
|
}
|
2692
2697
|
get(key, ...args) {
|
@@ -6311,7 +6316,6 @@ const AXIS_SPECIAL_CHARS = /[\.;#\-,\!]/;
|
|
6311
6316
|
/** allowed characters for axis value / collection / range / pattern. */
|
6312
6317
|
//\pL
|
6313
6318
|
const AXIS_VALUE_PATTERN = /^((!?\w+(\,\w+)*)|(!?\w+\-\w+)|(!?[\w\.\*\#]+))([;]((!?\w+(\,\w+)*)|(!?\w+\-\w+)|(!?[\w\.\*\#]+)))*$/;
|
6314
|
-
const CLDR_FILES = ['cldr-data/main/{0}/currencies.json', 'cldr-data/main/{0}/ca-gregorian.json', 'cldr-data/main/{0}/numbers.json', 'cldr-data/main/{0}/timeZoneNames.json', 'cldr-data/supplemental/numberingSystems.json'];
|
6315
6319
|
/** query cube */
|
6316
6320
|
class CubeService {
|
6317
6321
|
// ctor
|
@@ -11803,8 +11807,6 @@ class CubePivotComponent {
|
|
11803
11807
|
this.explore.emit({ axes });
|
11804
11808
|
}
|
11805
11809
|
async exportToExcel(title) {
|
11806
|
-
if (this.currencyCode && this.currencyCode !== DEFAULT_CURRENCY)
|
11807
|
-
await this._translate.cldr(this._session.language, CLDR_FILES);
|
11808
11810
|
if (this.chartType)
|
11809
11811
|
this._exportExcel(title);
|
11810
11812
|
else
|
@@ -21731,7 +21733,7 @@ class BizDocApp {
|
|
21731
21733
|
const doc = document.getElementsByTagName('html')[0], body = doc.getElementsByTagName('body')[0];
|
21732
21734
|
doc.lang = _session.language;
|
21733
21735
|
if (_session.inverse) {
|
21734
|
-
document.dir = doc.dir = body.dir =
|
21736
|
+
document.dir = doc.dir = body.dir = _session.direction;
|
21735
21737
|
enableRtl();
|
21736
21738
|
}
|
21737
21739
|
this._session.refresh().subscribe(this._initialize.bind(this));
|
@@ -31450,12 +31452,12 @@ class SharedModule {
|
|
31450
31452
|
AccountService, ChatService, ChatInfo,
|
31451
31453
|
GuideService,
|
31452
31454
|
BizDocComponentFactoryResolver, PromptService, TranslateService,
|
31453
|
-
provideHttpClient(withInterceptorsFromDi()),
|
31455
|
+
provideHttpClient(withInterceptorsFromDi(), withFetch()),
|
31454
31456
|
//{ provide: LOCALE_ID, useClass: SessionService.getLocale() },
|
31455
31457
|
{ provide: MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: { appearance: 'outline' } },
|
31456
31458
|
{ provide: HTTP_INTERCEPTORS, useClass: AppHttpInterceptor, multi: true },
|
31457
|
-
provideAppInitializer(
|
31458
|
-
provideAppInitializer(
|
31459
|
+
provideAppInitializer(() => inject(TranslateService).cldr()),
|
31460
|
+
provideAppInitializer(() => inject(SessionService).prepare()),
|
31459
31461
|
], imports: [
|
31460
31462
|
//SpContainer,
|
31461
31463
|
DayJsModule,
|
@@ -31594,12 +31596,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImpor
|
|
31594
31596
|
AccountService, ChatService, ChatInfo,
|
31595
31597
|
GuideService,
|
31596
31598
|
BizDocComponentFactoryResolver, PromptService, TranslateService,
|
31597
|
-
provideHttpClient(withInterceptorsFromDi()),
|
31599
|
+
provideHttpClient(withInterceptorsFromDi(), withFetch()),
|
31598
31600
|
//{ provide: LOCALE_ID, useClass: SessionService.getLocale() },
|
31599
31601
|
{ provide: MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: { appearance: 'outline' } },
|
31600
31602
|
{ provide: HTTP_INTERCEPTORS, useClass: AppHttpInterceptor, multi: true },
|
31601
|
-
provideAppInitializer(
|
31602
|
-
provideAppInitializer(
|
31603
|
+
provideAppInitializer(() => inject(TranslateService).cldr()),
|
31604
|
+
provideAppInitializer(() => inject(SessionService).prepare()),
|
31603
31605
|
],
|
31604
31606
|
exports: [
|
31605
31607
|
OptionsComponent, //SpContainer,
|