@onecx/angular-accelerator 6.23.0 → 6.23.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) {
@@ -6301,35 +6301,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
6301
6301
  }]
6302
6302
  }] });
6303
6303
 
6304
- /**
6305
- * @deprecated Use DynamicLocaleId from @onecx/angular-utils instead
6306
- */
6307
- class DynamicLocaleId {
6308
- constructor(userService) {
6309
- this.userService = userService;
6310
- Object.getOwnPropertyNames(String.prototype).forEach((k) => {
6311
- if (k != 'valueOf' && k != 'length') {
6312
- ;
6313
- this[k] = function (...args) {
6314
- const str = this.valueOf();
6315
- return str[k](...args);
6316
- };
6317
- }
6318
- });
6319
- }
6320
- valueOf() {
6321
- return this.userService.lang$.getValue();
6322
- }
6323
- get length() {
6324
- return this.valueOf().length;
6325
- }
6326
- }
6327
-
6328
6304
  class AngularAcceleratorMissingTranslationHandler extends MultiLanguageMissingTranslationHandler {
6329
6305
  }
6330
6306
  function appInitializer(userService) {
6331
6307
  return async () => {
6332
- await firstValueFrom(userService.lang$.pipe(skip(1)));
6308
+ const lang = await firstValueFrom(userService.lang$.pipe(skip(1)));
6309
+ try {
6310
+ await localeLoaders[lang]?.().then(data => registerLocaleData(data.default ?? data));
6311
+ }
6312
+ catch (error) {
6313
+ console.warn(`Could not load locale data for '${lang}'. Angular pipes may not format correctly.`, error);
6314
+ }
6333
6315
  };
6334
6316
  }
6335
6317
  class AngularAcceleratorModule {