@stemy/ngx-utils 13.6.3 → 13.6.5
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/esm2020/ngx-utils/common-types.mjs +2 -1
- package/esm2020/ngx-utils/ngx-utils.module.mjs +7 -3
- package/esm2020/ngx-utils/plugins/resize-event.plugin.mjs +13 -9
- package/esm2020/public_api.mjs +2 -2
- package/fesm2015/stemy-ngx-utils.mjs +19 -10
- package/fesm2015/stemy-ngx-utils.mjs.map +1 -1
- package/fesm2020/stemy-ngx-utils.mjs +18 -9
- package/fesm2020/stemy-ngx-utils.mjs.map +1 -1
- package/ngx-utils/common-types.d.ts +3 -0
- package/ngx-utils/plugins/resize-event.plugin.d.ts +7 -3
- package/package.json +9 -9
- package/public_api.d.ts +1 -1
|
@@ -486,6 +486,7 @@ const BASE_CONFIG = new InjectionToken("base-config");
|
|
|
486
486
|
const SCRIPT_PARAMS = new InjectionToken("script-params");
|
|
487
487
|
const ROOT_ELEMENT = new InjectionToken("app-root-element");
|
|
488
488
|
const RESIZE_DELAY = new InjectionToken("resize-event-delay");
|
|
489
|
+
const RESIZE_STRATEGY = new InjectionToken("resize-event-strategy");
|
|
489
490
|
const ERROR_HANDLER = new InjectionToken("error-handler-callback");
|
|
490
491
|
const GLOBAL_TEMPLATES = new InjectionToken("global-templates");
|
|
491
492
|
// --- Valued promise ---
|
|
@@ -3610,14 +3611,15 @@ function emptyRemove$1() {
|
|
|
3610
3611
|
function isWindow(el) {
|
|
3611
3612
|
return typeof window !== "undefined" && el === window;
|
|
3612
3613
|
}
|
|
3613
|
-
const detector = elementResizeDetectorMaker({
|
|
3614
|
-
strategy: "scroll" // For ultra performance.
|
|
3615
|
-
});
|
|
3616
3614
|
class ResizeEventPlugin extends ɵDomEventsPlugin {
|
|
3617
|
-
constructor(doc, resizeDelay, universal) {
|
|
3615
|
+
constructor(doc, resizeDelay, resizeStrategy, universal) {
|
|
3618
3616
|
super(doc);
|
|
3619
3617
|
this.resizeDelay = resizeDelay;
|
|
3618
|
+
this.resizeStrategy = resizeStrategy;
|
|
3620
3619
|
this.universal = universal;
|
|
3620
|
+
this.detector = elementResizeDetectorMaker({
|
|
3621
|
+
strategy: resizeStrategy
|
|
3622
|
+
});
|
|
3621
3623
|
}
|
|
3622
3624
|
supports(eventName) {
|
|
3623
3625
|
return eventName === ResizeEventPlugin.EVENT_NAME;
|
|
@@ -3637,7 +3639,7 @@ class ResizeEventPlugin extends ɵDomEventsPlugin {
|
|
|
3637
3639
|
element.addEventListener(eventName, cb);
|
|
3638
3640
|
}
|
|
3639
3641
|
else {
|
|
3640
|
-
detector.listenTo(element, cb);
|
|
3642
|
+
this.detector.listenTo(element, cb);
|
|
3641
3643
|
}
|
|
3642
3644
|
return () => {
|
|
3643
3645
|
try {
|
|
@@ -3645,7 +3647,7 @@ class ResizeEventPlugin extends ɵDomEventsPlugin {
|
|
|
3645
3647
|
element.removeEventListener(eventName, cb);
|
|
3646
3648
|
}
|
|
3647
3649
|
else {
|
|
3648
|
-
detector.uninstall(element);
|
|
3650
|
+
this.detector.uninstall(element);
|
|
3649
3651
|
}
|
|
3650
3652
|
}
|
|
3651
3653
|
catch (e) {
|
|
@@ -3658,7 +3660,7 @@ class ResizeEventPlugin extends ɵDomEventsPlugin {
|
|
|
3658
3660
|
}
|
|
3659
3661
|
}
|
|
3660
3662
|
ResizeEventPlugin.EVENT_NAME = "resize";
|
|
3661
|
-
ResizeEventPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ResizeEventPlugin, deps: [{ token: DOCUMENT }, { token: RESIZE_DELAY }, { token: UniversalService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3663
|
+
ResizeEventPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ResizeEventPlugin, deps: [{ token: DOCUMENT }, { token: RESIZE_DELAY }, { token: RESIZE_STRATEGY }, { token: UniversalService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3662
3664
|
ResizeEventPlugin.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ResizeEventPlugin });
|
|
3663
3665
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ResizeEventPlugin, decorators: [{
|
|
3664
3666
|
type: Injectable
|
|
@@ -3668,6 +3670,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
3668
3670
|
}] }, { type: undefined, decorators: [{
|
|
3669
3671
|
type: Inject,
|
|
3670
3672
|
args: [RESIZE_DELAY]
|
|
3673
|
+
}] }, { type: undefined, decorators: [{
|
|
3674
|
+
type: Inject,
|
|
3675
|
+
args: [RESIZE_STRATEGY]
|
|
3671
3676
|
}] }, { type: UniversalService }]; } });
|
|
3672
3677
|
|
|
3673
3678
|
function emptyRemove() {
|
|
@@ -5683,7 +5688,11 @@ class NgxUtilsModule {
|
|
|
5683
5688
|
},
|
|
5684
5689
|
{
|
|
5685
5690
|
provide: RESIZE_DELAY,
|
|
5686
|
-
useValue: (!config ? null : config.resizeDelay) ??
|
|
5691
|
+
useValue: (!config ? null : config.resizeDelay) ?? 50,
|
|
5692
|
+
},
|
|
5693
|
+
{
|
|
5694
|
+
provide: RESIZE_STRATEGY,
|
|
5695
|
+
useValue: (!config ? null : config.resizeStrategy) ?? "object",
|
|
5687
5696
|
},
|
|
5688
5697
|
{
|
|
5689
5698
|
provide: APP_INITIALIZER,
|
|
@@ -5733,5 +5742,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
5733
5742
|
* Generated bundle index. Do not edit.
|
|
5734
5743
|
*/
|
|
5735
5744
|
|
|
5736
|
-
export { API_SERVICE, APP_BASE_URL, AUTH_SERVICE, AclService, AjaxRequestHandler, ApiService, ArrayUtils, AsyncMethodBase, AsyncMethodDirective, AuthGuard, BASE_CONFIG, BackgroundDirective, BaseHttpClient, BaseHttpService, CONFIG_SERVICE, CanvasColor, CanvasUtils, ChunkPipe, Circle, ConfigService, ConsoleToasterService, DateUtils, DynamicTableComponent, DynamicTableTemplateDirective, ERROR_HANDLER, EXPRESS_REQUEST, EntriesPipe, ErrorHandlerService, EventsService, ExtraItemPropertiesPipe, FactoryDependencies, FileSystemEntry, FileUtils, FilterPipe, FindPipe, FormatNumberPipe, FormatterService, GLOBAL_TEMPLATES, GenericValue, GetOffsetPipe, GetTypePipe, GlobalTemplateDirective, GlobalTemplatePipe, GlobalTemplateService, GroupByPipe, HttpPromise, ICON_SERVICE, IConfiguration, IconDirective, IconService, Initializer, IsTypePipe, JSONfn, JoinPipe, KeysPipe, LANGUAGE_SERVICE, LanguageService, LoaderUtils, LocalHttpService, MapPipe, MathUtils, MaxPipe, MinPipe, NgxTemplateOutletDirective, NgxUtilsModule, ObjectType, ObjectUtils, ObservableUtils, OpenApiService, PROMISE_SERVICE, PaginationDirective, PaginationItemContext, PaginationItemDirective, PaginationMenuComponent, Point, PopPipe, PromiseService, RESIZE_DELAY, ROOT_ELEMENT, Rect, ReducePipe, ReflectUtils, RemapPipe, ReplacePipe, ResizeEventPlugin, ResourceIfContext, ResourceIfDirective, ReversePipe, RoundPipe, SCRIPT_PARAMS, SafeHtmlPipe, ScrollEventPlugin, SetUtils, ShiftPipe, SplitPipe, StateService, StaticAuthService, StaticLanguageService, StickyClassDirective, StickyDirective, StorageMode, StorageService, StringUtils, TOASTER_SERVICE, TimerUtils, TranslatePipe, TranslatedUrlSerializer, UniqueUtils, UniversalService, UnorderedListComponent, UnorderedListItemDirective, UnorderedListTemplateDirective, UnorederedListTemplate, ValuedPromise, ValuesPipe, Vector, WASI_IMPLEMENTATION, WasmService };
|
|
5745
|
+
export { API_SERVICE, APP_BASE_URL, AUTH_SERVICE, AclService, AjaxRequestHandler, ApiService, ArrayUtils, AsyncMethodBase, AsyncMethodDirective, AuthGuard, BASE_CONFIG, BackgroundDirective, BaseHttpClient, BaseHttpService, CONFIG_SERVICE, CanvasColor, CanvasUtils, ChunkPipe, Circle, ConfigService, ConsoleToasterService, DateUtils, DynamicTableComponent, DynamicTableTemplateDirective, ERROR_HANDLER, EXPRESS_REQUEST, EntriesPipe, ErrorHandlerService, EventsService, ExtraItemPropertiesPipe, FactoryDependencies, FileSystemEntry, FileUtils, FilterPipe, FindPipe, FormatNumberPipe, FormatterService, GLOBAL_TEMPLATES, GenericValue, GetOffsetPipe, GetTypePipe, GlobalTemplateDirective, GlobalTemplatePipe, GlobalTemplateService, GroupByPipe, HttpPromise, ICON_SERVICE, IConfiguration, IconDirective, IconService, Initializer, IsTypePipe, JSONfn, JoinPipe, KeysPipe, LANGUAGE_SERVICE, LanguageService, LoaderUtils, LocalHttpService, MapPipe, MathUtils, MaxPipe, MinPipe, NgxTemplateOutletDirective, NgxUtilsModule, ObjectType, ObjectUtils, ObservableUtils, OpenApiService, PROMISE_SERVICE, PaginationDirective, PaginationItemContext, PaginationItemDirective, PaginationMenuComponent, Point, PopPipe, PromiseService, RESIZE_DELAY, RESIZE_STRATEGY, ROOT_ELEMENT, Rect, ReducePipe, ReflectUtils, RemapPipe, ReplacePipe, ResizeEventPlugin, ResourceIfContext, ResourceIfDirective, ReversePipe, RoundPipe, SCRIPT_PARAMS, SafeHtmlPipe, ScrollEventPlugin, SetUtils, ShiftPipe, SplitPipe, StateService, StaticAuthService, StaticLanguageService, StickyClassDirective, StickyDirective, StorageMode, StorageService, StringUtils, TOASTER_SERVICE, TimerUtils, TranslatePipe, TranslatedUrlSerializer, UniqueUtils, UniversalService, UnorderedListComponent, UnorderedListItemDirective, UnorderedListTemplateDirective, UnorederedListTemplate, ValuedPromise, ValuesPipe, Vector, WASI_IMPLEMENTATION, WasmService };
|
|
5737
5746
|
//# sourceMappingURL=stemy-ngx-utils.mjs.map
|