{"version":3,"file":"siemens-element-ng-localization.mjs","sources":["../../../../projects/element-ng/localization/si-locale-store.ts","../../../../projects/element-ng/localization/si-locale.service.ts","../../../../projects/element-ng/localization/si-locale-id.ts","../../../../projects/element-ng/localization/si-directionality.ts","../../../../projects/element-ng/localization/index.ts","../../../../projects/element-ng/localization/siemens-element-ng-localization.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { Observable, of } from 'rxjs';\n\nexport abstract class SiLocaleStore {\n  abstract get locale(): string | undefined;\n  abstract saveLocale(locale: string): Observable<boolean>;\n}\n\nexport const SI_LOCALE_LOCAL_STORAGE_KEY = 'lang';\n\nexport class SiDefaultLocaleStore extends SiLocaleStore {\n  constructor(private isBrowser: boolean) {\n    super();\n  }\n\n  get locale(): string | undefined {\n    if (this.isBrowser) {\n      return localStorage.getItem(SI_LOCALE_LOCAL_STORAGE_KEY) ?? undefined;\n    } else {\n      return undefined;\n    }\n  }\n\n  saveLocale(locale: string): Observable<boolean> {\n    if (this.isBrowser) {\n      localStorage.setItem(SI_LOCALE_LOCAL_STORAGE_KEY, locale);\n      return of(true);\n    } else {\n      return of(false);\n    }\n  }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { isPlatformBrowser } from '@angular/common';\nimport { inject, Injectable, InjectionToken, PLATFORM_ID } from '@angular/core';\nimport {\n  getBrowserCultureLanguage,\n  getBrowserLanguage,\n  injectSiTranslateService\n} from '@siemens/element-translate-ng/translate';\nimport { BehaviorSubject, ReplaySubject } from 'rxjs';\nimport { first } from 'rxjs/operators';\n\nimport { SiDefaultLocaleStore, SiLocaleStore } from './si-locale-store';\n\nexport const SI_LOCALE_STORE = new InjectionToken<string>('SI_LOCALE_STORE');\nexport const SI_LOCALE_CONFIG = new InjectionToken<SiLocaleConfig>('SI_LOCALE_CONFIG');\n\n// this is a function because Angular compiler exports arrows for no good reason\n// eslint-disable-next-line prefer-arrow/prefer-arrow-functions\nfunction defaultLocaleInitializer(localeId: string): Promise<void> {\n  if (localeId === 'en') {\n    return Promise.resolve();\n  } else {\n    return Promise.reject();\n  }\n}\n\nexport interface SiLocaleConfig {\n  /**\n   * The default locale to be used, when no user preference\n   * available and the browser language is not part of the\n   * available languages.\n   */\n  defaultLocale?: string;\n  /**\n   * The list of available locales (e.g. en, fr, de, en-GB, de-AT)\n   */\n  availableLocales?: string[];\n  /**\n   * The localeInitializer function is invoked on every locale change.\n   * Make sure to invoke `registerLocaleData` with the locale to enable\n   * the Angular localization.\n   */\n  localeInitializer?: (localeId: string) => Promise<any>;\n  /**\n   * Set to true to also enable the default language on ngx-translate. When true,\n   * ngx-translate will use a translate value from the default language when a required\n   * value is not available in the current language. But note, this will also enforce\n   * to load the default language translation file into the application, even if a different\n   * locale is active. In other words, the application start time increases.\n   */\n  fallbackEnabled?: boolean;\n  /**\n   * Default is false and defines that on setting a new locale, the locale is stored and the\n   * browser is reloaded. When changing to true, window reload is not invoked, but angular\n   * pure pipes like DatePipe will not work.\n   */\n  dynamicLanguageChange?: boolean;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class SiLocaleService {\n  /**\n   * Holds the used locale definition like en, de, or en-US.\n   */\n  readonly locale$: BehaviorSubject<string>;\n  /**\n   * Emits to indicate that the localization package (e.g. \\@angular/common/locales/$\\{localeId\\})\n   * is loaded and registered. Emits after calling `localeInitializer` from the `config` object.\n   */\n  readonly localePackageLoaded$ = new ReplaySubject<void>(1);\n\n  private _nextLocale!: string;\n  private isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n  private translate = injectSiTranslateService();\n  private localeStore =\n    inject(SiLocaleStore, { optional: true }) ?? new SiDefaultLocaleStore(this.isBrowser);\n  /**\n   * The config for the local service.\n   */\n  config = inject(SI_LOCALE_CONFIG, { optional: true }) ?? {\n    availableLocales: ['en'],\n    defaultLocale: 'en',\n    localeInitializer: defaultLocaleInitializer,\n    fallbackEnabled: false,\n    dynamicLanguageChange: false\n  };\n\n  constructor() {\n    if (!this.config.defaultLocale) {\n      if (this.config.availableLocales && this.config.availableLocales.length > 0) {\n        this.config.defaultLocale = this.config.availableLocales[0];\n      } else {\n        this.config.defaultLocale = 'en';\n      }\n    }\n\n    if (!this.config.availableLocales || this.config.availableLocales.length === 0) {\n      this.config.availableLocales = [this.config.defaultLocale];\n    }\n    // Also adds all locales to the translate service to enable\n    // components working with the translate service directly to still work.\n    this.translate.availableLanguages = this.config.availableLocales;\n\n    this.config.localeInitializer ??= defaultLocaleInitializer;\n    this.config.fallbackEnabled ??= false;\n    this.config.dynamicLanguageChange ??= false;\n\n    const savedLocale = this.localeStore.locale;\n    // The following check is important. We do not control the store and when it comes from\n    // a remove backend, someone might give us a locale that we do not understand. In this\n    // case we switch to the default.\n    let initialLocale;\n    const browserCultureLang = getBrowserCultureLanguage();\n    const browserLang = getBrowserLanguage();\n    const currentLanguage = this.translate.currentLanguage;\n    if (this.hasLocale(savedLocale)) {\n      initialLocale = savedLocale!;\n    } else if (currentLanguage) {\n      initialLocale = currentLanguage;\n    } else if (this.hasLocale(browserCultureLang)) {\n      initialLocale = browserCultureLang!;\n    } else if (this.hasLocale(browserLang)) {\n      initialLocale = browserLang!;\n    } else {\n      initialLocale = this.config.defaultLocale;\n    }\n    this.locale$ = new BehaviorSubject<string>(initialLocale);\n    this.doSetLocale(initialLocale);\n\n    // If a user changes the language on the translate service directly,\n    // we synchronize the change again.\n    this.translate.translationChange.subscribe(() => {\n      const current = this.translate.currentLanguage;\n      if (current) {\n        this.locale = current;\n      }\n    });\n\n    if (this.config.fallbackEnabled) {\n      this.translate.setDefaultLanguage(this.config.defaultLocale);\n    }\n  }\n\n  /**\n   * Sets a new locale to the locale service and also to the translate\n   * service.\n   * @throws An error if the new value is not configured in the available locales\n   * or if the new locale cannot be saved, an error is thrown.\n   */\n  set locale(value: string) {\n    if (value === this.locale$.value || value === this._nextLocale) {\n      return;\n    }\n    if (!this.hasLocale(value)) {\n      throw new Error(`The value ${value} does not exist in the available locales.`);\n    }\n    this.localeStore\n      .saveLocale(value)\n      .pipe(first())\n      .subscribe({\n        next: (saveSucceed: boolean) => {\n          if (saveSucceed) {\n            if (this.config.dynamicLanguageChange) {\n              this.doSetLocale(value);\n            } else if (this.isBrowser) {\n              window.location.reload();\n            }\n          } else {\n            throw new Error(`Could not save new locale ${value}.`);\n          }\n        },\n        error: () => {\n          throw new Error(`Could not save new locale ${value}.`);\n        }\n      });\n  }\n\n  get locale(): string {\n    return this.locale$.value;\n  }\n\n  private doSetLocale(value: string): void {\n    this._nextLocale = value;\n    this.config.localeInitializer!(value).then(\n      () => {\n        this.localePackageLoaded$.next();\n        this.translate\n          .setCurrentLanguage(value)\n          .pipe(first())\n          .subscribe(() => {\n            if (this.locale$.value !== value) {\n              this.locale$.next(value);\n            }\n          });\n      },\n      () => {\n        console.error(\n          `Could not initialize new locale ${value}. Setting default locale ${this.config.defaultLocale}`\n        );\n        // Initialization of locale rejected. Setting default locale.\n        this.translate\n          .setCurrentLanguage(this.config.defaultLocale!)\n          .pipe(first())\n          .subscribe(() => {\n            if (this.locale$.value !== this.config.defaultLocale!) {\n              this.locale$.next(this.config.defaultLocale!);\n            }\n          });\n      }\n    );\n  }\n\n  /**\n   * Test if the given locale is part of the available locales.\n   * @param locale - The locale to be tested.\n   */\n  hasLocale(locale?: string): boolean {\n    if (locale) {\n      return this.config.availableLocales!.includes(locale);\n    }\n    return false;\n  }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { inject, Injectable } from '@angular/core';\n\nimport { SiLocaleService } from './si-locale.service';\n\n/**\n * The SiLocaleId is used to provide a locale id from the translate service\n * to the angular localization. The Angular services call toString or valueOf\n * so that the current locale of the translation service is provided. The Intl.\n * library does not invoke toString() and using the value directly in Intl\n * formatting results always having the `en` locale. Thus, when using the SiLocaleId\n * in other services, make sure to use the `toString()` method before.\n */\n@Injectable()\nexport class SiLocaleId extends String {\n  protected service: SiLocaleService;\n\n  // the constructor is needed for unknown reasons. w/o the inject() fails\n  constructor() {\n    super();\n    this.service = inject(SiLocaleService);\n  }\n\n  /**\n   * Outputs the locale id as a string.\n   */\n  override toString(): string {\n    return this.service.locale === 'template' ? 'en' : this.service.locale;\n  }\n\n  override valueOf(): string {\n    return this.toString();\n  }\n\n  override toLowerCase(): string {\n    return this.toString().toLowerCase();\n  }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { Direction, Directionality } from '@angular/cdk/bidi';\nimport { EventEmitter, Injectable, signal } from '@angular/core';\nimport { isRTL } from '@siemens/element-ng/common';\n\n/**\n * Provider for dynamic CDK directionality.\n *\n * CDK per default evaluates directionality once during initialization. This is a problem when\n * switching language later in the lifecycle. This provider can be used to make this dynamic.\n * To use, simply provide this in the `ApplicationConfig`:\n *\n * ```ts\n * import { Directionality } from '@angular/cdk/bidi';\n * import { SiDirectionality } from '@siemens/element-ng/localization';\n *\n * ...\n * export const APP_CONFIG: ApplicationConfig = {\n *   providers: [\n *     { provide: Directionality, useClass: SiDirectionality },\n *     ...\n *   ]\n * }\n *\n * bootstrapApplication(AppComponent, APP_CONFIG)\n *    ...\n *\n * ```\n */\n\n@Injectable()\nexport class SiDirectionality implements Directionality {\n  readonly change = new EventEmitter<Direction>();\n\n  /** @defaultValue 'ltr' */\n  readonly valueSignal = signal<Direction>('ltr');\n\n  get value(): Direction {\n    const dir = isRTL() ? 'rtl' : 'ltr';\n    this.valueSignal.set(dir);\n    return dir;\n  }\n\n  /** @internal */\n  // eslint-disable-next-line @angular-eslint/use-lifecycle-interface, @angular-eslint/no-empty-lifecycle-method\n  ngOnDestroy(): void {\n    // empty, from Directionality\n  }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-locale-id';\nexport * from './si-locale-store';\nexport * from './si-locale.service';\nexport * from './si-directionality';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport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