@onecx/angular-accelerator 7.9.0 → 7.9.2

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.
@@ -2,4 +2,6 @@
2
2
 
3
3
  @import '/node_modules/primeflex/primeflex.scss';
4
4
 
5
- @import '../src/lib/directives/loading-indicator.directive.scss';
5
+ @import '../src/lib/directives/loading-indicator.directive.scss';
6
+
7
+ @import '../src/lib/directives/content.directive.scss';
@@ -1,14 +1,14 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { inject, ElementRef, Input, Directive, Renderer2, ViewContainerRef, TemplateRef, HostListener, EventEmitter, Output, NgZone, Injectable, Injector, LOCALE_ID, Pipe, ContentChild, ViewEncapsulation, Component, ViewChild, ContentChildren, ChangeDetectorRef, input, computed, ViewChildren, QueryList, Type, NgModule, APP_INITIALIZER } from '@angular/core';
3
3
  import { UserService, AppStateService, ConfigurationService, CONFIG_KEY, ShellCapabilityService, Capability, AppConfigService } from '@onecx/angular-integration-interface';
4
- import { HAS_PERMISSION_CHECKER, SKIP_STYLE_SCOPING, getScopeIdentifier, dataStyleIdKey, dataNoPortalLayoutStylesKey, MultiLanguageMissingTranslationHandler, providePermissionChecker, provideTranslationPathFromMeta, provideTranslationConnectionService } from '@onecx/angular-utils';
4
+ import { HAS_PERMISSION_CHECKER, SKIP_STYLE_SCOPING, getScopeIdentifier, dataStyleIdKey, dataNoPortalLayoutStylesKey, MultiLanguageMissingTranslationHandler, localeLoaders, providePermissionChecker, DynamicLocaleId, provideTranslationPathFromMeta, provideTranslationConnectionService } from '@onecx/angular-utils';
5
5
  import { BehaviorSubject, switchMap, of, from, map, filter, concat, combineLatest, startWith, debounceTime, firstValueFrom, mergeMap, first, shareReplay, withLatestFrom, ReplaySubject, timestamp, distinctUntilChanged, isObservable, skip } from 'rxjs';
6
6
  import { HttpClient } from '@angular/common/http';
7
7
  import * as i3 from '@angular/forms';
8
8
  import { FormGroupDirective, FormControlName, FormsModule, ReactiveFormsModule } from '@angular/forms';
9
9
  import { Topic, getLocation, isValidDate, getUTCDateWithoutTimezoneIssues } from '@onecx/accelerator';
10
10
  import * as i1 from '@angular/common';
11
- import { DatePipe, DecimalPipe, CurrencyPipe, formatDate, CommonModule } from '@angular/common';
11
+ import { DatePipe, DecimalPipe, CurrencyPipe, formatDate, registerLocaleData, CommonModule } from '@angular/common';
12
12
  import * as i2$1 from 'primeng/button';
13
13
  import { ButtonModule } from 'primeng/button';
14
14
  import * as i5 from 'primeng/skeleton';
@@ -164,7 +164,7 @@ class OcxContentDirective {
164
164
  }
165
165
  addContentStyles() {
166
166
  const addClasses = (classes) => this.el.nativeElement.classList.add(...classes);
167
- addClasses(['card']);
167
+ addClasses(['ocx-card']);
168
168
  }
169
169
  prependTitle() {
170
170
  if (this.titleElementId) {
@@ -6298,35 +6298,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
6298
6298
  }]
6299
6299
  }] });
6300
6300
 
6301
- /**
6302
- * @deprecated Use DynamicLocaleId from @onecx/angular-utils instead
6303
- */
6304
- class DynamicLocaleId {
6305
- constructor(userService) {
6306
- this.userService = userService;
6307
- Object.getOwnPropertyNames(String.prototype).forEach((k) => {
6308
- if (k != 'valueOf' && k != 'length') {
6309
- ;
6310
- this[k] = function (...args) {
6311
- const str = this.valueOf();
6312
- return str[k](...args);
6313
- };
6314
- }
6315
- });
6316
- }
6317
- valueOf() {
6318
- return this.userService.lang$.getValue();
6319
- }
6320
- get length() {
6321
- return this.valueOf().length;
6322
- }
6323
- }
6324
-
6325
6301
  class AngularAcceleratorMissingTranslationHandler extends MultiLanguageMissingTranslationHandler {
6326
6302
  }
6327
6303
  function appInitializer(userService) {
6328
6304
  return async () => {
6329
- await firstValueFrom(userService.lang$.pipe(skip(1)));
6305
+ const lang = await firstValueFrom(userService.lang$.pipe(skip(1)));
6306
+ try {
6307
+ await localeLoaders[lang]?.().then(data => registerLocaleData(data.default ?? data));
6308
+ }
6309
+ catch (error) {
6310
+ console.warn(`Could not load locale data for '${lang}'. Angular pipes may not format correctly.`, error);
6311
+ }
6330
6312
  };
6331
6313
  }
6332
6314
  class AngularAcceleratorModule {