@stemy/ngx-utils 19.6.10 → 19.6.12

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.
@@ -23,11 +23,14 @@ export interface TypedTokenProvider<T> {
23
23
  }
24
24
  export type TypedProvider<T> = TypedFactoryProvider<T> | TypedValueProvider<T> | TypedExistingProvider<T> | TypedClassProvider<T> | TypedTokenProvider<T> | Type<T>;
25
25
  export type CachedFactory<T> = (injector: Injector) => ReadonlyArray<T>;
26
- export interface IResolveFactory {
27
- func: Function;
28
- type?: any;
26
+ export interface ResolveFactory<T = any> {
27
+ type?: Function;
28
+ func: (...args: any[]) => T;
29
29
  params?: any[];
30
30
  }
31
+ export interface IResolveFactory extends Omit<ResolveFactory, "func"> {
32
+ func: Function;
33
+ }
31
34
  export declare class CanvasColor {
32
35
  r: number;
33
36
  g: number;
@@ -89,7 +92,7 @@ export interface IAuthService {
89
92
  export type RouteValidator = (auth: IAuthService, route?: IRoute, next?: ActivatedRouteSnapshot) => Promise<boolean>;
90
93
  export interface IRouteData extends Data {
91
94
  returnState?: string[];
92
- guards?: Array<IResolveFactory | RouteValidator>;
95
+ guards?: Array<ResolveFactory<RouteValidator> | RouteValidator>;
93
96
  }
94
97
  export interface IRoute extends Route {
95
98
  data?: IRouteData;
@@ -67,8 +67,8 @@ import { UnorderedListComponent } from "./components/unordered-list/unordered-li
67
67
  import { UploadComponent } from "./components/upload/upload.component";
68
68
  export declare const pipes: (typeof FilterPipe | typeof FormatNumberPipe | typeof GlobalTemplatePipe | typeof IncludesPipe | typeof ReducePipe | typeof RoundPipe | typeof SafeHtmlPipe | typeof TranslatePipe)[];
69
69
  export declare const directives: (typeof AsyncMethodBase | typeof AsyncMethodTargetDirective | typeof BackgroundDirective | typeof ComponentLoaderDirective | typeof DynamicTableTemplateDirective | typeof GlobalTemplateDirective | typeof IconDirective | typeof NgxTemplateOutletDirective | typeof PaginationDirective | typeof PaginationItemDirective | typeof ResourceIfDirective | typeof StickyDirective | typeof StickyClassDirective | typeof DropdownDirective | typeof DropdownContentDirective | typeof TabsItemDirective | typeof UnorderedListItemDirective | typeof UnorderedListTemplateDirective)[];
70
- export declare const components: (typeof ChipsComponent | typeof CloseBtnComponent | typeof DropListComponent | typeof DynamicTableComponent | typeof PaginationMenuComponent | typeof InteractiveCanvasComponent | typeof InteractiveCircleComponent | typeof InteractiveRectComponent | typeof UnorderedListComponent | typeof UploadComponent)[];
71
- export declare const providers: (typeof FilterPipe | typeof FormatNumberPipe | typeof GlobalTemplatePipe | typeof IncludesPipe | typeof ReducePipe | typeof RoundPipe | typeof SafeHtmlPipe | typeof TranslatePipe | typeof BaseHttpClient | typeof BaseHttpService | typeof AuthGuard | typeof AclService | typeof StaticAuthService | typeof ConfigService | typeof BaseDialogService | typeof ErrorHandlerService | typeof EventsService | typeof FormatterService | typeof GlobalTemplateService | typeof IconService | typeof StaticLanguageService | typeof OpenApiService | typeof PromiseService | typeof SocketService | typeof StateService | typeof StorageService | typeof BaseToasterService | typeof CacheService | typeof ComponentLoaderService | typeof TranslatedUrlSerializer | typeof UniversalService | typeof WasmService | typeof DeviceDetectorService | {
70
+ export declare const components: (typeof ChipsComponent | typeof CloseBtnComponent | typeof DropListComponent | typeof DynamicTableComponent | typeof InteractiveCanvasComponent | typeof InteractiveCircleComponent | typeof InteractiveRectComponent | typeof PaginationMenuComponent | typeof UnorderedListComponent | typeof UploadComponent)[];
71
+ export declare const providers: (typeof UniversalService | typeof StateService | typeof AuthGuard | typeof BaseHttpClient | typeof StorageService | typeof EventsService | typeof CacheService | typeof BaseHttpService | typeof WasmService | typeof AclService | typeof StaticAuthService | typeof ConfigService | typeof BaseDialogService | typeof ErrorHandlerService | typeof FormatterService | typeof GlobalTemplateService | typeof IconService | typeof StaticLanguageService | typeof OpenApiService | typeof BaseToasterService | typeof ComponentLoaderService | typeof TranslatedUrlSerializer | typeof PromiseService | typeof SocketService | typeof FilterPipe | typeof FormatNumberPipe | typeof GlobalTemplatePipe | typeof IncludesPipe | typeof ReducePipe | typeof RoundPipe | typeof SafeHtmlPipe | typeof TranslatePipe | typeof DeviceDetectorService | {
72
72
  provide: import("@angular/core").InjectionToken<import("@angular/platform-browser").EventManagerPlugin[]>;
73
73
  useClass: typeof DragDropEventPlugin;
74
74
  multi: boolean;
@@ -1,9 +1,9 @@
1
1
  import "reflect-metadata";
2
2
  import { Injector } from "@angular/core";
3
- import { IResolveFactory } from "../common-types";
3
+ import { ResolveFactory } from "../common-types";
4
4
  export declare class ReflectUtils {
5
5
  static defineMetadata(key: string, data: any, target: any, name?: string): void;
6
6
  static getMetadata(key: string, target: any, name?: string): any;
7
7
  static getOwnMetadata(key: string, target: any, name?: string): any;
8
- static resolve<T>(obj: IResolveFactory | T, injector: Injector): T;
8
+ static resolve<T>(obj: T, injector: Injector): T extends ResolveFactory<infer R> ? R : T;
9
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stemy/ngx-utils",
3
- "version": "19.6.10",
3
+ "version": "19.6.12",
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,6 +1,6 @@
1
1
  import "zone.js";
2
2
  export { MaybePromise, MaybeArray, KeysOfType, ObjOfType, StringKeys, CapitalizeFirst, CamelJoin, PrefixedPick } from "./ngx-utils/helper-types";
3
- export { DurationUnit, TypedFactoryProvider, TypedValueProvider, TypedExistingProvider, TypedClassProvider, TypedTokenProvider, TypedProvider, CachedFactory, IResolveFactory, CanvasColor, IIconService, ITranslation, ITranslations, ILanguageSetting, ILanguageSettings, ILanguageService, IUserData, IAuthService, RouteValidator, IRouteData, IRoute, IAclComponent, IDialogButtonConfig, IDialogConfig, IConfirmMessageConfig, IConfirmDialogConfig, IDialogService, IPromiseService, IWasi, IWasmExports, IWasm, IWasmAsync, IRouteStateInfo, NavigationUrlParam, StorageMode, ToastType, IToasterService, IAsyncMessage, AsyncMethod, IconMap, IconProps, ButtonType, ButtonSize, ButtonProps, TabValue, TabOption, ChipValue, ChipStatus, ChipOption, DropdownAttachTo, UnorderedListTemplate, UnorderedListTemplates, UnorderedListStyle, UploadType, IFileUploadResult, IFileUploadProcess, IAjaxRequestDetails, AjaxRequestCallback, ScriptType, ILoadableElement, ILoaderPromises, ISearchObservable, FactoryDependencies, ObjectType, ITimer, IExtraProperties, IGroupMap, TranslationQuery, IPageInfo, IPaginationData, PaginationDataLoader, PaginationItemContext, IPoint, IShape, CanvasItemShape, CanvasItemDirection, InteractiveCanvas, InteractiveCanvasItem, InteractiveDrawFn, InteractivePanEvent, InteractiveCanvasPointer, HttpRequestHeaders, HttpRequestQuery, HttpClientRequestOptions, HttpRequestOptions, UploadData, IIssueContext, IProgress, ProgressListener, CacheExpireMode, IHttpService, IApiService, DynamicSchemaRef, OpenApiSchemaProperty, OpenApiSchema, OpenApiSchemas, TableFilterType, ITableOrders, ITableColumn, ITableColumns, TableColumns, ITableTemplate, ITableTemplates, ITableDataQuery, TableDataLoader, DragDropEvent, DragEventHandler, ITableDragEvent, DynamicTableDragHandler, ResourceIfContext, CssSelector, CssSelectorList, DynamicComponentLocation, DynamicModuleInfo, DynamicEntryComponents, IConfiguration, IConfigService, ResizeEventStrategy, ErrorHandlerCallback, GlobalComponentModifier, AppInitializerFunc, IModuleConfig, ValuedPromise } from "./ngx-utils/common-types";
3
+ export { DurationUnit, TypedFactoryProvider, TypedValueProvider, TypedExistingProvider, TypedClassProvider, TypedTokenProvider, TypedProvider, CachedFactory, ResolveFactory, IResolveFactory, CanvasColor, IIconService, ITranslation, ITranslations, ILanguageSetting, ILanguageSettings, ILanguageService, IUserData, IAuthService, RouteValidator, IRouteData, IRoute, IAclComponent, IDialogButtonConfig, IDialogConfig, IConfirmMessageConfig, IConfirmDialogConfig, IDialogService, IPromiseService, IWasi, IWasmExports, IWasm, IWasmAsync, IRouteStateInfo, NavigationUrlParam, StorageMode, ToastType, IToasterService, IAsyncMessage, AsyncMethod, IconMap, IconProps, ButtonType, ButtonSize, ButtonProps, TabValue, TabOption, ChipValue, ChipStatus, ChipOption, DropdownAttachTo, UnorderedListTemplate, UnorderedListTemplates, UnorderedListStyle, UploadType, IFileUploadResult, IFileUploadProcess, IAjaxRequestDetails, AjaxRequestCallback, ScriptType, ILoadableElement, ILoaderPromises, ISearchObservable, FactoryDependencies, ObjectType, ITimer, IExtraProperties, IGroupMap, TranslationQuery, IPageInfo, IPaginationData, PaginationDataLoader, PaginationItemContext, IPoint, IShape, CanvasItemShape, CanvasItemDirection, InteractiveCanvas, InteractiveCanvasItem, InteractiveDrawFn, InteractivePanEvent, InteractiveCanvasPointer, HttpRequestHeaders, HttpRequestQuery, HttpClientRequestOptions, HttpRequestOptions, UploadData, IIssueContext, IProgress, ProgressListener, CacheExpireMode, IHttpService, IApiService, DynamicSchemaRef, OpenApiSchemaProperty, OpenApiSchema, OpenApiSchemas, TableFilterType, ITableOrders, ITableColumn, ITableColumns, TableColumns, ITableTemplate, ITableTemplates, ITableDataQuery, TableDataLoader, DragDropEvent, DragEventHandler, ITableDragEvent, DynamicTableDragHandler, ResourceIfContext, CssSelector, CssSelectorList, DynamicComponentLocation, DynamicModuleInfo, DynamicEntryComponents, IConfiguration, IConfigService, ResizeEventStrategy, ErrorHandlerCallback, GlobalComponentModifier, AppInitializerFunc, IModuleConfig, ValuedPromise } from "./ngx-utils/common-types";
4
4
  export { ICON_TYPE, ICON_MAP, BUTTON_TYPE, ERROR_HANDLER, STATIC_SCHEMAS, RESIZE_STRATEGY, RESIZE_DELAY, ROOT_ELEMENT, SCRIPT_PARAMS, BASE_CONFIG, CONFIG_SERVICE, APP_BASE_URL, API_SERVICE, EXPRESS_REQUEST, WASI_IMPLEMENTATION, PROMISE_SERVICE, DIALOG_SERVICE, TOASTER_SERVICE, AUTH_SERVICE, LANGUAGE_SERVICE, ICON_SERVICE, OPTIONS_TOKEN } from "./ngx-utils/tokens";
5
5
  export { AjaxRequestHandler } from "./ngx-utils/utils/ajax-request-handler";
6
6
  export { ArrayUtils } from "./ngx-utils/utils/array.utils";