wacom 21.2.1 → 21.2.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.
@@ -1,7 +1,7 @@
1
1
  import * as i1$2 from '@angular/common';
2
2
  import { isPlatformBrowser, DOCUMENT, CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { inject, PLATFORM_ID, DestroyRef, signal, computed, Injectable, ChangeDetectorRef, InjectionToken, Inject, Optional, input, ElementRef, afterNextRender, effect, Directive, Pipe, output, isSignal, ApplicationRef, EnvironmentInjector, createComponent, makeEnvironmentProviders, NgModule } from '@angular/core';
4
+ import { inject, PLATFORM_ID, DestroyRef, signal, computed, Injectable, ChangeDetectorRef, InjectionToken, Inject, Optional, makeEnvironmentProviders, provideEnvironmentInitializer, input, ElementRef, afterNextRender, effect, Directive, Pipe, output, isSignal, ApplicationRef, EnvironmentInjector, createComponent, NgModule } from '@angular/core';
5
5
  import { take, firstValueFrom, Subject, skip, takeUntil, share, filter, map, Observable, merge, combineLatest, timeout, ReplaySubject, EMPTY, defer, from, switchMap } from 'rxjs';
6
6
  import { toObservable } from '@angular/core/rxjs-interop';
7
7
  import * as i1 from '@angular/common/http';
@@ -2954,28 +2954,6 @@ class TranslationService {
2954
2954
  },
2955
2955
  });
2956
2956
  }
2957
- /**
2958
- * Persists the current in-memory translations into the internal store.
2959
- *
2960
- * The payload is derived from `_signalTranslates` by materializing each signal's
2961
- * current value at the time of saving.
2962
- *
2963
- * Side effects:
2964
- * - Writes to storage via `StoreService.setJson`.
2965
- *
2966
- * Intended usage:
2967
- * - Called after `setMany()` and `setOne()` to keep storage in sync.
2968
- */
2969
- _updateStorageTranslations() {
2970
- const translations = [];
2971
- for (const sourceText in this._signalTranslates) {
2972
- translations.push({
2973
- text: this._signalTranslates[sourceText](),
2974
- sourceText,
2975
- });
2976
- }
2977
- this._storeService.setJson('translations', translations);
2978
- }
2979
2957
  /**
2980
2958
  * Returns a reactive translation signal for the given source text.
2981
2959
  *
@@ -3060,6 +3038,28 @@ class TranslationService {
3060
3038
  }
3061
3039
  this._signalTranslates[sourceText].set(text);
3062
3040
  }
3041
+ /**
3042
+ * Persists the current in-memory translations into the internal store.
3043
+ *
3044
+ * The payload is derived from `_signalTranslates` by materializing each signal's
3045
+ * current value at the time of saving.
3046
+ *
3047
+ * Side effects:
3048
+ * - Writes to storage via `StoreService.setJson`.
3049
+ *
3050
+ * Intended usage:
3051
+ * - Called after `setMany()` and `setOne()` to keep storage in sync.
3052
+ */
3053
+ _updateStorageTranslations() {
3054
+ const translations = [];
3055
+ for (const sourceText in this._signalTranslates) {
3056
+ translations.push({
3057
+ text: this._signalTranslates[sourceText](),
3058
+ sourceText,
3059
+ });
3060
+ }
3061
+ this._storeService.setJson('translations', translations);
3062
+ }
3063
3063
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: TranslationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3064
3064
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: TranslationService, providedIn: 'root' }); }
3065
3065
  }
@@ -3068,6 +3068,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImpor
3068
3068
  args: [{ providedIn: 'root' }]
3069
3069
  }], ctorParameters: () => [] });
3070
3070
 
3071
+ function provideTranslation(translations = []) {
3072
+ return makeEnvironmentProviders([
3073
+ provideEnvironmentInitializer(() => {
3074
+ if (!translations.length) {
3075
+ return;
3076
+ }
3077
+ inject(TranslationService).setMany(translations);
3078
+ }),
3079
+ ]);
3080
+ }
3081
+
3071
3082
  class TranslateDirective {
3072
3083
  constructor() {
3073
3084
  this._platformId = inject(PLATFORM_ID);
@@ -4742,5 +4753,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImpor
4742
4753
  * Generated bundle index. Do not edit.
4743
4754
  */
4744
4755
 
4745
- export { ArrPipe, CONFIG_TOKEN, ClickOutsideDirective, CoreService, CrudComponent, CrudService, DEFAULT_CONFIG, DEFAULT_HTTP_CONFIG, DEFAULT_NETWORK_CONFIG, DomService, EmitterService, HttpService, ManualDisabledDirective, ManualNameDirective, ManualReadonlyDirective, ManualTypeDirective, MetaGuard, MetaService, MongodatePipe, NETWORK_CONFIG, NetworkService, NumberPipe, PaginationPipe, RtcService, SafePipe, SearchPipe, SocketService, SplicePipe, SplitPipe, StoreService, ThemeService, TimeService, TranslateDirective, TranslatePipe, TranslationService, UtilService, WacomModule, provideWacom };
4756
+ export { ArrPipe, CONFIG_TOKEN, ClickOutsideDirective, CoreService, CrudComponent, CrudService, DEFAULT_CONFIG, DEFAULT_HTTP_CONFIG, DEFAULT_NETWORK_CONFIG, DomService, EmitterService, HttpService, ManualDisabledDirective, ManualNameDirective, ManualReadonlyDirective, ManualTypeDirective, MetaGuard, MetaService, MongodatePipe, NETWORK_CONFIG, NetworkService, NumberPipe, PaginationPipe, RtcService, SafePipe, SearchPipe, SocketService, SplicePipe, SplitPipe, StoreService, ThemeService, TimeService, TranslateDirective, TranslatePipe, TranslationService, UtilService, WacomModule, provideTranslation, provideWacom };
4746
4757
  //# sourceMappingURL=wacom.mjs.map