@stemy/ngx-utils 17.0.0 → 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.
@@ -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 { IGlobalTemplates } from "../common-types";
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: IGlobalTemplates;
5
+ readonly globalTemplates: GlobalTemplateService;
6
6
  readonly template: TemplateRef<any>;
7
7
  id: string;
8
- constructor(globalTemplates: IGlobalTemplates, template: TemplateRef<any>);
8
+ constructor(globalTemplates: GlobalTemplateService, template: TemplateRef<any>);
9
9
  ngOnInit(): void;
10
10
  ngOnDestroy(): void;
11
11
  static ɵfac: i0.ɵɵFactoryDeclaration<GlobalTemplateDirective, never>;
@@ -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 { IGlobalTemplates } from "../common-types";
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: IGlobalTemplates;
6
+ protected globalTemplates: GlobalTemplateService;
7
7
  protected templatesUpdated: Subscription;
8
8
  protected cachedTemplateId: string;
9
9
  protected cachedTemplate: TemplateRef<any>;
10
- constructor(globalTemplates: IGlobalTemplates);
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, IGlobalTemplates } from "../common-types";
2
+ import { GlobalComponentModifier } from "../common-types";
3
3
  import * as i0 from "@angular/core";
4
- export declare class GlobalTemplateService implements IGlobalTemplates {
4
+ export declare class GlobalTemplateService {
5
5
  readonly templatesUpdated: EventEmitter<void>;
6
6
  protected globalTemplates: {
7
7
  [id: string]: TemplateRef<any>;
@@ -1,6 +1,6 @@
1
1
  import { Injector, NgZone } from "@angular/core";
2
- import { ActivatedRouteSnapshot, ChildrenOutletContexts, Data, Event, NavigationExtras, Params, Route, Router, UrlSegment, UrlTree } from "@angular/router";
3
- import { BehaviorSubject, Subscription } from "rxjs";
2
+ import { ActivatedRouteSnapshot, ChildrenOutletContexts, Data, NavigationExtras, Params, Route, Router, UrlSegment, UrlTree } from "@angular/router";
3
+ import { BehaviorSubject, Observer, Subscription } from "rxjs";
4
4
  import { IRoute, NavigationUrlParam } from "../common-types";
5
5
  import { UniversalService } from "./universal.service";
6
6
  import * as i0 from "@angular/core";
@@ -14,19 +14,19 @@ export interface IStateInfo {
14
14
  segments: UrlSegment[];
15
15
  components: any[];
16
16
  }
17
- export declare class StateService extends BehaviorSubject<any> {
17
+ export declare class StateService {
18
18
  readonly injector: Injector;
19
19
  readonly zone: NgZone;
20
20
  readonly universal: UniversalService;
21
21
  readonly router: Router;
22
22
  readonly contexts: ChildrenOutletContexts;
23
23
  readonly globalExtras: NavigationExtras;
24
- private shot;
25
- private comp;
26
- private stateInfo;
24
+ protected $snapshot: BehaviorSubject<ActivatedRouteSnapshot>;
25
+ protected $component: BehaviorSubject<any>;
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;
@@ -40,10 +40,10 @@ export declare class StateService extends BehaviorSubject<any> {
40
40
  navigateByUrl(url: string | UrlTree, navigationExtras?: NavigationExtras): Promise<boolean>;
41
41
  navigate(url: NavigationUrlParam, navigationExtras?: NavigationExtras): Promise<boolean>;
42
42
  open(url: NavigationUrlParam, target?: string, navigationExtras?: NavigationExtras): Promise<boolean>;
43
- subscribeImmediately(next?: (value: ActivatedRouteSnapshot) => void, error?: (error: any) => void, complete?: () => void): Subscription;
43
+ subscribeImmediately(next?: (value: ActivatedRouteSnapshot) => void, error?: (error: any) => void): Subscription;
44
+ subscribe(osOrNext?: Partial<Observer<ActivatedRouteSnapshot>> | ((value: ActivatedRouteSnapshot) => void)): Subscription;
44
45
  protected openInNewWindow(tree: UrlTree, target: string): boolean;
45
46
  protected createUrlTree(url: NavigationUrlParam, extras?: NavigationExtras): [UrlTree, NavigationExtras];
46
- protected handleRouterEvent: (event: Event) => void;
47
47
  static ɵfac: i0.ɵɵFactoryDeclaration<StateService, [null, null, null, { optional: true; }, { optional: true; }]>;
48
48
  static ɵprov: i0.ɵɵInjectableDeclaration<StateService>;
49
49
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stemy/ngx-utils",
3
- "version": "17.0.0",
3
+ "version": "17.1.0",
4
4
  "license": "MIT",
5
5
  "public": true,
6
6
  "repository": "https://github.com/stemyke/ngx-utils.git",
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, IGlobalTemplates, GLOBAL_TEMPLATES, AppInitializerFunc, IModuleConfig, ValuedPromise } from "./ngx-utils/common-types";
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";