wacom 21.2.0 → 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.
- package/fesm2022/wacom.mjs +42 -24
- package/fesm2022/wacom.mjs.map +1 -1
- package/package.json +1 -1
- package/types/wacom.d.ts +27 -21
package/fesm2022/wacom.mjs
CHANGED
|
@@ -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,
|
|
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';
|
|
@@ -519,10 +519,17 @@ class CrudComponent {
|
|
|
519
519
|
this.crudService = crudService;
|
|
520
520
|
this._module = module;
|
|
521
521
|
}
|
|
522
|
+
/**
|
|
523
|
+
* Allow set query customization
|
|
524
|
+
*/
|
|
525
|
+
setDocumentsQuery(query) {
|
|
526
|
+
return query;
|
|
527
|
+
}
|
|
522
528
|
/**
|
|
523
529
|
* Loads documents for a given page.
|
|
524
530
|
*/
|
|
525
531
|
setDocuments(page = this.page, query = '') {
|
|
532
|
+
query = this.setDocumentsQuery(query);
|
|
526
533
|
return new Promise((resolve) => {
|
|
527
534
|
if (this.configType === 'server') {
|
|
528
535
|
this.page = page;
|
|
@@ -2947,28 +2954,6 @@ class TranslationService {
|
|
|
2947
2954
|
},
|
|
2948
2955
|
});
|
|
2949
2956
|
}
|
|
2950
|
-
/**
|
|
2951
|
-
* Persists the current in-memory translations into the internal store.
|
|
2952
|
-
*
|
|
2953
|
-
* The payload is derived from `_signalTranslates` by materializing each signal's
|
|
2954
|
-
* current value at the time of saving.
|
|
2955
|
-
*
|
|
2956
|
-
* Side effects:
|
|
2957
|
-
* - Writes to storage via `StoreService.setJson`.
|
|
2958
|
-
*
|
|
2959
|
-
* Intended usage:
|
|
2960
|
-
* - Called after `setMany()` and `setOne()` to keep storage in sync.
|
|
2961
|
-
*/
|
|
2962
|
-
_updateStorageTranslations() {
|
|
2963
|
-
const translations = [];
|
|
2964
|
-
for (const sourceText in this._signalTranslates) {
|
|
2965
|
-
translations.push({
|
|
2966
|
-
text: this._signalTranslates[sourceText](),
|
|
2967
|
-
sourceText,
|
|
2968
|
-
});
|
|
2969
|
-
}
|
|
2970
|
-
this._storeService.setJson('translations', translations);
|
|
2971
|
-
}
|
|
2972
2957
|
/**
|
|
2973
2958
|
* Returns a reactive translation signal for the given source text.
|
|
2974
2959
|
*
|
|
@@ -3053,6 +3038,28 @@ class TranslationService {
|
|
|
3053
3038
|
}
|
|
3054
3039
|
this._signalTranslates[sourceText].set(text);
|
|
3055
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
|
+
}
|
|
3056
3063
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: TranslationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3057
3064
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: TranslationService, providedIn: 'root' }); }
|
|
3058
3065
|
}
|
|
@@ -3061,6 +3068,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImpor
|
|
|
3061
3068
|
args: [{ providedIn: 'root' }]
|
|
3062
3069
|
}], ctorParameters: () => [] });
|
|
3063
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
|
+
|
|
3064
3082
|
class TranslateDirective {
|
|
3065
3083
|
constructor() {
|
|
3066
3084
|
this._platformId = inject(PLATFORM_ID);
|
|
@@ -4735,5 +4753,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImpor
|
|
|
4735
4753
|
* Generated bundle index. Do not edit.
|
|
4736
4754
|
*/
|
|
4737
4755
|
|
|
4738
|
-
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 };
|
|
4739
4757
|
//# sourceMappingURL=wacom.mjs.map
|