@stemy/ngx-utils 17.0.1 → 17.1.0
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/esm2022/ngx-utils/common-types.mjs +1 -2
- package/esm2022/ngx-utils/directives/global-template.directive.mjs +6 -8
- package/esm2022/ngx-utils/ngx-utils.imports.mjs +2 -1
- package/esm2022/ngx-utils/ngx-utils.module.mjs +72 -71
- package/esm2022/ngx-utils/pipes/global-template.pipe.mjs +6 -8
- package/esm2022/ngx-utils/services/global-template.service.mjs +1 -1
- package/esm2022/ngx-utils/services/state.service.mjs +31 -30
- package/esm2022/public_api.mjs +2 -2
- package/fesm2022/stemy-ngx-utils.mjs +106 -109
- package/fesm2022/stemy-ngx-utils.mjs.map +1 -1
- package/ngx-utils/common-types.d.ts +0 -9
- package/ngx-utils/directives/global-template.directive.d.ts +3 -3
- package/ngx-utils/ngx-utils.imports.d.ts +1 -1
- package/ngx-utils/ngx-utils.module.d.ts +3 -1
- package/ngx-utils/pipes/global-template.pipe.d.ts +3 -3
- package/ngx-utils/services/global-template.service.d.ts +2 -2
- package/ngx-utils/services/state.service.d.ts +4 -5
- package/package.json +1 -1
- package/public_api.d.ts +1 -1
|
@@ -349,14 +349,6 @@ export declare const RESIZE_STRATEGY: InjectionToken<ResizeEventStrategy>;
|
|
|
349
349
|
export type ErrorHandlerCallback = (error: string) => any;
|
|
350
350
|
export declare const ERROR_HANDLER: InjectionToken<ErrorHandlerCallback>;
|
|
351
351
|
export type GlobalComponentModifier = (component: any) => any;
|
|
352
|
-
export interface IGlobalTemplates {
|
|
353
|
-
readonly templatesUpdated: EventEmitter<void>;
|
|
354
|
-
get(id: string, component?: any): TemplateRef<any>;
|
|
355
|
-
add(id: string, template: TemplateRef<any>): void;
|
|
356
|
-
remove(id: string): void;
|
|
357
|
-
addComponentModifier(id: string, modifier: GlobalComponentModifier): void;
|
|
358
|
-
}
|
|
359
|
-
export declare const GLOBAL_TEMPLATES: InjectionToken<ErrorHandlerCallback>;
|
|
360
352
|
export type AppInitializerFunc = () => Promise<void> | void;
|
|
361
353
|
export interface IModuleConfig {
|
|
362
354
|
apiService?: Type<IApiService>;
|
|
@@ -366,7 +358,6 @@ export interface IModuleConfig {
|
|
|
366
358
|
toasterService?: Type<IToasterService>;
|
|
367
359
|
promiseService?: Type<IPromiseService>;
|
|
368
360
|
configService?: Type<IConfigService>;
|
|
369
|
-
globalTemplates?: Type<IGlobalTemplates>;
|
|
370
361
|
wasiImplementation?: Type<IWasi>;
|
|
371
362
|
initializeApp?: (injector: Injector) => AppInitializerFunc;
|
|
372
363
|
baseUrl?: (injector: Injector) => string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { OnDestroy, OnInit, TemplateRef } from "@angular/core";
|
|
2
|
-
import {
|
|
2
|
+
import { GlobalTemplateService } from "../services/global-template.service";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class GlobalTemplateDirective implements OnInit, OnDestroy {
|
|
5
|
-
readonly globalTemplates:
|
|
5
|
+
readonly globalTemplates: GlobalTemplateService;
|
|
6
6
|
readonly template: TemplateRef<any>;
|
|
7
7
|
id: string;
|
|
8
|
-
constructor(globalTemplates:
|
|
8
|
+
constructor(globalTemplates: GlobalTemplateService, template: TemplateRef<any>);
|
|
9
9
|
ngOnInit(): void;
|
|
10
10
|
ngOnDestroy(): void;
|
|
11
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<GlobalTemplateDirective, never>;
|
|
@@ -50,7 +50,7 @@ import { UnorderedListComponent } from "./components/unordered-list/unordered-li
|
|
|
50
50
|
export declare const pipes: (typeof FilterPipe | typeof FormatNumberPipe | typeof GlobalTemplatePipe | typeof ReducePipe | typeof RoundPipe | typeof SafeHtmlPipe | typeof TranslatePipe)[];
|
|
51
51
|
export declare const directives: (typeof AsyncMethodBase | typeof BackgroundDirective | typeof DynamicTableTemplateDirective | typeof GlobalTemplateDirective | typeof IconDirective | typeof NgxTemplateOutletDirective | typeof PaginationDirective | typeof PaginationItemDirective | typeof ResourceIfDirective | typeof StickyDirective | typeof StickyClassDirective | typeof UnorderedListItemDirective | typeof UnorderedListTemplateDirective)[];
|
|
52
52
|
export declare const components: (typeof UnorderedListComponent | typeof DynamicTableComponent | typeof PaginationMenuComponent)[];
|
|
53
|
-
export declare const providers: (typeof
|
|
53
|
+
export declare const providers: (typeof UniversalService | typeof StateService | typeof AuthGuard | typeof BaseHttpClient | typeof StorageService | typeof BaseHttpService | typeof WasmService | typeof AclService | typeof StaticAuthService | typeof ConfigService | typeof ErrorHandlerService | typeof EventsService | typeof FormatterService | typeof GlobalTemplateService | typeof IconService | typeof StaticLanguageService | typeof OpenApiService | typeof ConsoleToasterService | typeof TranslatedUrlSerializer | typeof PromiseService | typeof FilterPipe | typeof FormatNumberPipe | typeof GlobalTemplatePipe | typeof ReducePipe | typeof RoundPipe | typeof SafeHtmlPipe | typeof TranslatePipe | typeof DeviceDetectorService | {
|
|
54
54
|
provide: import("@angular/core").InjectionToken<import("@angular/platform-browser").EventManagerPlugin[]>;
|
|
55
55
|
useClass: typeof ResizeEventPlugin;
|
|
56
56
|
multi: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ModuleWithProviders } from "@angular/core";
|
|
1
|
+
import { EnvironmentProviders, ModuleWithProviders } from "@angular/core";
|
|
2
2
|
import { IModuleConfig } from "./common-types";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
import * as i1 from "./pipes/chunk.pipe";
|
|
@@ -50,7 +50,9 @@ import * as i46 from "@angular/forms";
|
|
|
50
50
|
export declare function loadBaseUrl(): string;
|
|
51
51
|
export declare function loadBaseHref(baseUrl: string): string;
|
|
52
52
|
export declare class NgxUtilsModule {
|
|
53
|
+
private static getProviders;
|
|
53
54
|
static forRoot(config?: IModuleConfig): ModuleWithProviders<NgxUtilsModule>;
|
|
55
|
+
static provideUtils(config?: IModuleConfig): EnvironmentProviders;
|
|
54
56
|
constructor();
|
|
55
57
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxUtilsModule, never>;
|
|
56
58
|
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxUtilsModule, [typeof i1.ChunkPipe, typeof i2.EntriesPipe, typeof i3.ExtraItemPropertiesPipe, typeof i4.FilterPipe, typeof i5.FindPipe, typeof i6.FormatNumberPipe, typeof i7.GetOffsetPipe, typeof i8.GetTypePipe, typeof i9.GlobalTemplatePipe, typeof i10.GroupByPipe, typeof i11.IsTypePipe, typeof i12.JoinPipe, typeof i13.KeysPipe, typeof i14.MapPipe, typeof i15.MaxPipe, typeof i16.MinPipe, typeof i17.PopPipe, typeof i18.ReducePipe, typeof i19.RemapPipe, typeof i20.ReplacePipe, typeof i21.ReversePipe, typeof i22.RoundPipe, typeof i23.SafeHtmlPipe, typeof i24.ShiftPipe, typeof i25.SplitPipe, typeof i26.TranslatePipe, typeof i27.ValuesPipe, typeof i28.AsyncMethodBase, typeof i29.AsyncMethodDirective, typeof i30.BackgroundDirective, typeof i31.DynamicTableTemplateDirective, typeof i32.GlobalTemplateDirective, typeof i33.IconDirective, typeof i34.NgxTemplateOutletDirective, typeof i35.PaginationDirective, typeof i36.PaginationItemDirective, typeof i37.ResourceIfDirective, typeof i38.StickyDirective, typeof i39.StickyClassDirective, typeof i40.UnorderedListItemDirective, typeof i41.UnorderedListTemplateDirective, typeof i42.DynamicTableComponent, typeof i43.PaginationMenuComponent, typeof i44.UnorderedListComponent], [typeof i45.CommonModule, typeof i46.FormsModule], [typeof i1.ChunkPipe, typeof i2.EntriesPipe, typeof i3.ExtraItemPropertiesPipe, typeof i4.FilterPipe, typeof i5.FindPipe, typeof i6.FormatNumberPipe, typeof i7.GetOffsetPipe, typeof i8.GetTypePipe, typeof i9.GlobalTemplatePipe, typeof i10.GroupByPipe, typeof i11.IsTypePipe, typeof i12.JoinPipe, typeof i13.KeysPipe, typeof i14.MapPipe, typeof i15.MaxPipe, typeof i16.MinPipe, typeof i17.PopPipe, typeof i18.ReducePipe, typeof i19.RemapPipe, typeof i20.ReplacePipe, typeof i21.ReversePipe, typeof i22.RoundPipe, typeof i23.SafeHtmlPipe, typeof i24.ShiftPipe, typeof i25.SplitPipe, typeof i26.TranslatePipe, typeof i27.ValuesPipe, typeof i28.AsyncMethodBase, typeof i29.AsyncMethodDirective, typeof i30.BackgroundDirective, typeof i31.DynamicTableTemplateDirective, typeof i32.GlobalTemplateDirective, typeof i33.IconDirective, typeof i34.NgxTemplateOutletDirective, typeof i35.PaginationDirective, typeof i36.PaginationItemDirective, typeof i37.ResourceIfDirective, typeof i38.StickyDirective, typeof i39.StickyClassDirective, typeof i40.UnorderedListItemDirective, typeof i41.UnorderedListTemplateDirective, typeof i42.DynamicTableComponent, typeof i43.PaginationMenuComponent, typeof i44.UnorderedListComponent, typeof i46.FormsModule]>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { OnDestroy, OnInit, PipeTransform, TemplateRef } from "@angular/core";
|
|
2
2
|
import { Subscription } from "rxjs";
|
|
3
|
-
import {
|
|
3
|
+
import { GlobalTemplateService } from "../services/global-template.service";
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class GlobalTemplatePipe implements PipeTransform, OnInit, OnDestroy {
|
|
6
|
-
protected globalTemplates:
|
|
6
|
+
protected globalTemplates: GlobalTemplateService;
|
|
7
7
|
protected templatesUpdated: Subscription;
|
|
8
8
|
protected cachedTemplateId: string;
|
|
9
9
|
protected cachedTemplate: TemplateRef<any>;
|
|
10
|
-
constructor(globalTemplates:
|
|
10
|
+
constructor(globalTemplates: GlobalTemplateService);
|
|
11
11
|
ngOnInit(): void;
|
|
12
12
|
ngOnDestroy(): void;
|
|
13
13
|
transform(templateId: string, component?: any): TemplateRef<string>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventEmitter, TemplateRef } from "@angular/core";
|
|
2
|
-
import { GlobalComponentModifier
|
|
2
|
+
import { GlobalComponentModifier } from "../common-types";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class GlobalTemplateService
|
|
4
|
+
export declare class GlobalTemplateService {
|
|
5
5
|
readonly templatesUpdated: EventEmitter<void>;
|
|
6
6
|
protected globalTemplates: {
|
|
7
7
|
[id: string]: TemplateRef<any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Injector, NgZone } from "@angular/core";
|
|
2
|
-
import { ActivatedRouteSnapshot, ChildrenOutletContexts, Data,
|
|
2
|
+
import { ActivatedRouteSnapshot, ChildrenOutletContexts, Data, NavigationExtras, Params, Route, Router, UrlSegment, UrlTree } from "@angular/router";
|
|
3
3
|
import { BehaviorSubject, Observer, Subscription } from "rxjs";
|
|
4
4
|
import { IRoute, NavigationUrlParam } from "../common-types";
|
|
5
5
|
import { UniversalService } from "./universal.service";
|
|
@@ -21,12 +21,12 @@ export declare class StateService {
|
|
|
21
21
|
readonly router: Router;
|
|
22
22
|
readonly contexts: ChildrenOutletContexts;
|
|
23
23
|
readonly globalExtras: NavigationExtras;
|
|
24
|
-
protected
|
|
25
|
-
protected
|
|
24
|
+
protected $snapshot: BehaviorSubject<ActivatedRouteSnapshot>;
|
|
25
|
+
protected $component: BehaviorSubject<any>;
|
|
26
26
|
protected stateInfo: IStateInfo;
|
|
27
27
|
static toPath(route: Route, params: any): string;
|
|
28
|
-
get component(): any;
|
|
29
28
|
get snapshot(): ActivatedRouteSnapshot;
|
|
29
|
+
get component(): any;
|
|
30
30
|
get route(): IRoute;
|
|
31
31
|
get data(): Data;
|
|
32
32
|
get params(): Params;
|
|
@@ -44,7 +44,6 @@ export declare class StateService {
|
|
|
44
44
|
subscribe(osOrNext?: Partial<Observer<ActivatedRouteSnapshot>> | ((value: ActivatedRouteSnapshot) => void)): Subscription;
|
|
45
45
|
protected openInNewWindow(tree: UrlTree, target: string): boolean;
|
|
46
46
|
protected createUrlTree(url: NavigationUrlParam, extras?: NavigationExtras): [UrlTree, NavigationExtras];
|
|
47
|
-
protected handleRouterEvent: (event: NavigationEnd) => void;
|
|
48
47
|
static ɵfac: i0.ɵɵFactoryDeclaration<StateService, [null, null, null, { optional: true; }, { optional: true; }]>;
|
|
49
48
|
static ɵprov: i0.ɵɵInjectableDeclaration<StateService>;
|
|
50
49
|
}
|
package/package.json
CHANGED
package/public_api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { TypedFactoryProvider, TypedValueProvider, CachedProvider, CachedFactory, OPTIONS_TOKEN, IResolveFactory, CanvasColor, IIconService, ICON_SERVICE, ITranslation, ITranslations, ILanguageSetting, ILanguageSettings, ILanguageService, LANGUAGE_SERVICE, IAuthService, RouteValidator, IRouteData, IRoute, AUTH_SERVICE, IAclComponent, IPromiseService, PROMISE_SERVICE, IWasi, IWasmExports, IWasm, IWasmAsync, WASI_IMPLEMENTATION, IRouteStateInfo, NavigationUrlParam, StorageMode, IToasterService, TOASTER_SERVICE, IAsyncMessage, AsyncMethod, UnorderedListTemplate, UnorderedListTemplates, UnorderedListStyle, IAjaxRequestDetails, AjaxRequestCallback, ScriptType, IScriptPromises, IStylePromises, ISearchObservable, FactoryDependencies, ObjectType, ITimer, IExtraProperties, IGroupMap, TranslationQuery, IPageInfo, IPaginationData, PaginationDataLoader, PaginationItemContext, IHttpHeaders, IHttpParams, IRequestOptions, IIssueContext, IProgress, ProgressListener, PromiseExecutor, HttpPromise, IHttpService, EXPRESS_REQUEST, IApiService, API_SERVICE, IOpenApiSchemaProperty, IOpenApiSchema, IOpenApiSchemas, ITableOrders, ITableColumn, ITableColumns, TableColumns, ITableTemplate, ITableTemplates, ITableDataQuery, TableDataLoader, ResourceIfContext, APP_BASE_URL, IConfiguration, IConfigService, CONFIG_SERVICE, BASE_CONFIG, SCRIPT_PARAMS, ROOT_ELEMENT, RESIZE_DELAY, ResizeEventStrategy, RESIZE_STRATEGY, ErrorHandlerCallback, ERROR_HANDLER, GlobalComponentModifier,
|
|
1
|
+
export { TypedFactoryProvider, TypedValueProvider, CachedProvider, CachedFactory, OPTIONS_TOKEN, IResolveFactory, CanvasColor, IIconService, ICON_SERVICE, ITranslation, ITranslations, ILanguageSetting, ILanguageSettings, ILanguageService, LANGUAGE_SERVICE, IAuthService, RouteValidator, IRouteData, IRoute, AUTH_SERVICE, IAclComponent, IPromiseService, PROMISE_SERVICE, IWasi, IWasmExports, IWasm, IWasmAsync, WASI_IMPLEMENTATION, IRouteStateInfo, NavigationUrlParam, StorageMode, IToasterService, TOASTER_SERVICE, IAsyncMessage, AsyncMethod, UnorderedListTemplate, UnorderedListTemplates, UnorderedListStyle, IAjaxRequestDetails, AjaxRequestCallback, ScriptType, IScriptPromises, IStylePromises, ISearchObservable, FactoryDependencies, ObjectType, ITimer, IExtraProperties, IGroupMap, TranslationQuery, IPageInfo, IPaginationData, PaginationDataLoader, PaginationItemContext, IHttpHeaders, IHttpParams, IRequestOptions, IIssueContext, IProgress, ProgressListener, PromiseExecutor, HttpPromise, IHttpService, EXPRESS_REQUEST, IApiService, API_SERVICE, IOpenApiSchemaProperty, IOpenApiSchema, IOpenApiSchemas, ITableOrders, ITableColumn, ITableColumns, TableColumns, ITableTemplate, ITableTemplates, ITableDataQuery, TableDataLoader, ResourceIfContext, APP_BASE_URL, IConfiguration, IConfigService, CONFIG_SERVICE, BASE_CONFIG, SCRIPT_PARAMS, ROOT_ELEMENT, RESIZE_DELAY, ResizeEventStrategy, RESIZE_STRATEGY, ErrorHandlerCallback, ERROR_HANDLER, GlobalComponentModifier, AppInitializerFunc, IModuleConfig, ValuedPromise } from "./ngx-utils/common-types";
|
|
2
2
|
export { AjaxRequestHandler } from "./ngx-utils/utils/ajax-request-handler";
|
|
3
3
|
export { ArrayUtils } from "./ngx-utils/utils/array.utils";
|
|
4
4
|
export { AuthGuard } from "./ngx-utils/utils/auth.guard";
|