@stemy/ngx-utils 13.6.12 → 13.6.13

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.
@@ -2,6 +2,16 @@ import { EventEmitter, InjectionToken, Injector, NgZone, Provider, TemplateRef,
2
2
  import { HttpClient, HttpErrorResponse, HttpHeaders } from "@angular/common/http";
3
3
  import { ActivatedRouteSnapshot, Data, Route, UrlTree } from "@angular/router";
4
4
  import { Request } from "express";
5
+ export interface TypedFactoryProvider<T> {
6
+ useFactory: (...args: any[]) => T;
7
+ deps: any[];
8
+ }
9
+ export interface TypedValueProvider<T> {
10
+ useValue: T;
11
+ }
12
+ export declare type CachedProvider<T> = Type<T> | TypedFactoryProvider<T> | TypedValueProvider<T>;
13
+ export declare type CachedFactory<T> = (injector: Injector) => ReadonlyArray<T>;
14
+ export declare const OPTIONS_TOKEN: InjectionToken<unknown>;
5
15
  export interface IResolveFactory {
6
16
  func: Function;
7
17
  type?: any;
@@ -1,3 +1,2 @@
1
- import { Injector, Type } from "@angular/core";
2
- export declare type CachedFactory<T> = (injector: Injector) => ReadonlyArray<T>;
3
- export declare function cachedFactory<T>(types: ReadonlyArray<Type<T>>): CachedFactory<T>;
1
+ import { CachedFactory, CachedProvider } from "../common-types";
2
+ export declare function cachedFactory<T>(providers: CachedProvider<T>[]): CachedFactory<T>;
@@ -0,0 +1,3 @@
1
+ import { Type } from "@angular/core";
2
+ import { TypedFactoryProvider } from "../common-types";
3
+ export declare function provideWithOptions<O extends Object, T = any>(type: Type<T>, options: O): TypedFactoryProvider<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stemy/ngx-utils",
3
- "version": "13.6.12",
3
+ "version": "13.6.13",
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,8 +1,8 @@
1
- export { 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, 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, 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";
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";
5
- export { CachedFactory, cachedFactory } from "./ngx-utils/utils/cached-factory";
5
+ export { cachedFactory } from "./ngx-utils/utils/cached-factory";
6
6
  export { CanvasUtils } from "./ngx-utils/utils/canvas.utils";
7
7
  export { DateUtils } from "./ngx-utils/utils/date.utils";
8
8
  export { FileUtils } from "./ngx-utils/utils/file.utils";
@@ -21,6 +21,7 @@ export { SetUtils } from "./ngx-utils/utils/set.utils";
21
21
  export { TimerUtils } from "./ngx-utils/utils/timer.utils";
22
22
  export { UniqueUtils } from "./ngx-utils/utils/unique.utils";
23
23
  export { Vector } from "./ngx-utils/utils/vector";
24
+ export { provideWithOptions } from "./ngx-utils/utils/with-options-provider";
24
25
  export { UniversalService } from "./ngx-utils/services/universal.service";
25
26
  export { WasmService } from "./ngx-utils/services/wasm.service";
26
27
  export { AclService } from "./ngx-utils/services/acl.service";