@stemy/ngx-utils 12.0.1 → 12.0.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,6 +1,6 @@
1
1
  import { EventEmitter, InjectionToken, Injector, NgZone, Provider, TemplateRef, Type } from "@angular/core";
2
2
  import { HttpClient, HttpErrorResponse, HttpHeaders } from "@angular/common/http";
3
- import { ActivatedRouteSnapshot, Data, Route } from "@angular/router";
3
+ import { ActivatedRouteSnapshot, Data, Route, UrlTree } from "@angular/router";
4
4
  import { Request } from "express";
5
5
  export interface IResolveFactory {
6
6
  func: Function;
@@ -75,6 +75,7 @@ export interface IRouteStateInfo {
75
75
  first: boolean;
76
76
  component?: any;
77
77
  }
78
+ export declare type NavigationUrlParam = any[] | string | UrlTree;
78
79
  export declare enum StorageMode {
79
80
  Local = 0,
80
81
  Session = 1
@@ -49,7 +49,7 @@ import { UnorderedListComponent } from "./components/unordered-list/unordered-li
49
49
  export declare const pipes: (typeof FilterPipe | typeof FormatNumberPipe | typeof GlobalTemplatePipe | typeof ReducePipe | typeof RoundPipe | typeof SafeHtmlPipe | typeof TranslatePipe)[];
50
50
  export declare const directives: (typeof AsyncMethodDirective | typeof BackgroundDirective | typeof DynamicTableTemplateDirective | typeof GlobalTemplateDirective | typeof IconDirective | typeof NgxTemplateOutletDirective | typeof PaginationDirective | typeof PaginationItemDirective | typeof ResourceIfDirective | typeof StickyDirective | typeof UnorderedListItemDirective | typeof UnorderedListTemplateDirective | typeof StickyClassDirective)[];
51
51
  export declare const components: (typeof UnorderedListComponent | typeof DynamicTableComponent | typeof PaginationMenuComponent)[];
52
- export declare const providers: (typeof StateService | typeof AuthGuard | typeof UniversalService | typeof AclService | typeof BaseHttpClient | typeof StorageService | typeof BaseHttpService | 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 | {
52
+ export declare const providers: (typeof UniversalService | typeof StateService | typeof AuthGuard | typeof AclService | typeof BaseHttpClient | typeof StorageService | typeof BaseHttpService | 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 | {
53
53
  provide: import("@angular/core").InjectionToken<import("@angular/platform-browser").ɵangular_packages_platform_browser_platform_browser_g[]>;
54
54
  useClass: typeof ResizeEventPlugin;
55
55
  multi: boolean;
@@ -1,7 +1,8 @@
1
1
  import { Injector, NgZone } from "@angular/core";
2
- import { ActivatedRouteSnapshot, Data, NavigationExtras, Params, Route, Router, UrlSegment, UrlTree } from "@angular/router";
2
+ import { ActivatedRouteSnapshot, Data, Event, NavigationExtras, Params, Route, Router, UrlSegment, UrlTree } from "@angular/router";
3
3
  import { BehaviorSubject, Subscription } from "rxjs";
4
- import { IRoute } from "../common-types";
4
+ import { IRoute, NavigationUrlParam } from "../common-types";
5
+ import { UniversalService } from "./universal.service";
5
6
  export declare const emptySnapshot: ActivatedRouteSnapshot;
6
7
  export declare const emptyData: Data;
7
8
  export declare const emptyParams: Params;
@@ -15,6 +16,7 @@ export interface IStateInfo {
15
16
  export declare class StateService extends BehaviorSubject<any> {
16
17
  readonly injector: Injector;
17
18
  readonly zone: NgZone;
19
+ readonly universal: UniversalService;
18
20
  readonly router: Router;
19
21
  readonly globalExtras: NavigationExtras;
20
22
  private shot;
@@ -32,10 +34,13 @@ export declare class StateService extends BehaviorSubject<any> {
32
34
  get urlSegments(): UrlSegment[];
33
35
  get components(): any[];
34
36
  get routerConfig(): IRoute[];
35
- constructor(injector: Injector, zone: NgZone, router?: Router);
37
+ constructor(injector: Injector, zone: NgZone, universal: UniversalService, router?: Router);
36
38
  reload(): Promise<any>;
37
- navigate(commands: any[], extras?: NavigationExtras): Promise<boolean>;
38
- navigateByUrl(url: string | UrlTree, extras?: NavigationExtras): Promise<boolean>;
39
+ navigateByUrl(url: string | UrlTree, navigationExtras?: NavigationExtras): Promise<boolean>;
40
+ navigate(url: NavigationUrlParam, navigationExtras?: NavigationExtras): Promise<boolean>;
41
+ open(url: NavigationUrlParam, target?: string, navigationExtras?: NavigationExtras): Promise<boolean>;
39
42
  subscribeImmediately(next?: (value: ActivatedRouteSnapshot) => void, error?: (error: any) => void, complete?: () => void): Subscription;
40
- private handleRouterEvent;
43
+ protected openInNewWindow(tree: UrlTree, target: string): boolean;
44
+ protected createUrlTree(url: NavigationUrlParam, extras?: NavigationExtras): [UrlTree, NavigationExtras];
45
+ protected handleRouterEvent: (event: Event) => void;
41
46
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stemy/ngx-utils",
3
- "version": "12.0.1",
3
+ "version": "12.0.2",
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 { IResolveFactory, CanvasColor, IIconService, ICON_SERVICE, ITranslation, ITranslations, ILanguageSettings, ILanguageService, LANGUAGE_SERVICE, IAuthService, RouteValidator, IRouteData, IRoute, AUTH_SERVICE, IAclComponent, IPromiseService, PROMISE_SERVICE, IRouteStateInfo, StorageMode, IToasterService, TOASTER_SERVICE, IAsyncMessage, AsyncMethod, UnorederedListTemplate, UnorderedListTemplates, UnorderedListStyle, IAjaxRequestDetails, AjaxRequestCallback, IScriptPromises, IStylePromises, ISearchObservable, FactoryDependencies, 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, ITableColumns, ITableTemplate, ITableTemplates, TableDataLoader, ResourceIfContext, IConfiguration, IConfigService, CONFIG_SERVICE, BASE_CONFIG, SCRIPT_PARAMS, ROOT_ELEMENT, ErrorHandlerCallback, ERROR_HANDLER, AppInitializerFunc, IModuleConfig, ValuedPromise } from "./ngx-utils/common-types";
1
+ export { IResolveFactory, CanvasColor, IIconService, ICON_SERVICE, ITranslation, ITranslations, ILanguageSettings, ILanguageService, LANGUAGE_SERVICE, IAuthService, RouteValidator, IRouteData, IRoute, AUTH_SERVICE, IAclComponent, IPromiseService, PROMISE_SERVICE, IRouteStateInfo, NavigationUrlParam, StorageMode, IToasterService, TOASTER_SERVICE, IAsyncMessage, AsyncMethod, UnorederedListTemplate, UnorderedListTemplates, UnorderedListStyle, IAjaxRequestDetails, AjaxRequestCallback, IScriptPromises, IStylePromises, ISearchObservable, FactoryDependencies, 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, ITableColumns, ITableTemplate, ITableTemplates, TableDataLoader, ResourceIfContext, IConfiguration, IConfigService, CONFIG_SERVICE, BASE_CONFIG, SCRIPT_PARAMS, ROOT_ELEMENT, ErrorHandlerCallback, ERROR_HANDLER, AppInitializerFunc, IModuleConfig, ValuedPromise } from "./ngx-utils/common-types";
2
2
  export { AjaxRequestHandler } from "./ngx-utils/utils/ajax-request-handler";
3
3
  export { ObjectUtils } from "./ngx-utils/utils/object.utils";
4
4
  export { DateUtils } from "./ngx-utils/utils/date.utils";