@stemy/ngx-utils 12.0.2 → 12.0.5

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.
@@ -278,6 +278,15 @@ export declare const SCRIPT_PARAMS: InjectionToken<any>;
278
278
  export declare const ROOT_ELEMENT: InjectionToken<HTMLElement>;
279
279
  export declare type ErrorHandlerCallback = (error: string) => any;
280
280
  export declare const ERROR_HANDLER: InjectionToken<ErrorHandlerCallback>;
281
+ export declare type GlobalComponentModifier = (component: any) => any;
282
+ export interface IGlobalTemplates {
283
+ readonly templatesUpdated: EventEmitter<void>;
284
+ get(id: string, component?: any): TemplateRef<any>;
285
+ add(id: string, template: TemplateRef<any>): void;
286
+ remove(id: string): void;
287
+ addComponentModifier(id: string, modifier: GlobalComponentModifier): void;
288
+ }
289
+ export declare const GLOBAL_TEMPLATES: InjectionToken<ErrorHandlerCallback>;
281
290
  export declare type AppInitializerFunc = () => Promise<void> | void;
282
291
  export interface IModuleConfig {
283
292
  apiService?: Type<IApiService>;
@@ -287,6 +296,7 @@ export interface IModuleConfig {
287
296
  toasterService?: Type<IToasterService>;
288
297
  promiseService?: Type<IPromiseService>;
289
298
  configService?: Type<IConfigService>;
299
+ globalTemplates?: Type<IGlobalTemplates>;
290
300
  initializeApp?: (injector: Injector) => AppInitializerFunc;
291
301
  }
292
302
  export declare class ValuedPromise<T> extends Promise<T> {
@@ -12,5 +12,5 @@ export declare class AsyncMethodDirective {
12
12
  get isLoading(): boolean;
13
13
  constructor(toaster: IToasterService);
14
14
  click(): void;
15
- callMethod(): void;
15
+ callMethod(): boolean;
16
16
  }
@@ -1,10 +1,10 @@
1
1
  import { OnDestroy, OnInit, TemplateRef } from "@angular/core";
2
- import { GlobalTemplateService } from "../services/global-template.service";
2
+ import { IGlobalTemplates } from "../common-types";
3
3
  export declare class GlobalTemplateDirective implements OnInit, OnDestroy {
4
- readonly globalTemplateService: GlobalTemplateService;
4
+ readonly globalTemplates: IGlobalTemplates;
5
5
  readonly template: TemplateRef<any>;
6
6
  id: string;
7
- constructor(globalTemplateService: GlobalTemplateService, template: TemplateRef<any>);
7
+ constructor(globalTemplates: IGlobalTemplates, template: TemplateRef<any>);
8
8
  ngOnInit(): void;
9
9
  ngOnDestroy(): void;
10
10
  }
@@ -1,12 +1,12 @@
1
1
  import { OnDestroy, OnInit, PipeTransform, TemplateRef } from "@angular/core";
2
2
  import { Subscription } from "rxjs";
3
- import { GlobalTemplateService } from "../services/global-template.service";
3
+ import { IGlobalTemplates } from "../common-types";
4
4
  export declare class GlobalTemplatePipe implements PipeTransform, OnInit, OnDestroy {
5
- protected globalTemplates: GlobalTemplateService;
5
+ protected globalTemplates: IGlobalTemplates;
6
6
  protected templatesUpdated: Subscription;
7
7
  protected cachedTemplateId: string;
8
8
  protected cachedTemplate: TemplateRef<any>;
9
- constructor(globalTemplates: GlobalTemplateService);
9
+ constructor(globalTemplates: IGlobalTemplates);
10
10
  ngOnInit(): void;
11
11
  ngOnDestroy(): void;
12
12
  transform(templateId: string, component?: any): TemplateRef<string>;
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter, TemplateRef } from "@angular/core";
2
- export declare type GlobalComponentModifier = (component: any) => any;
3
- export declare class GlobalTemplateService {
2
+ import { GlobalComponentModifier, IGlobalTemplates } from "../common-types";
3
+ export declare class GlobalTemplateService implements IGlobalTemplates {
4
4
  readonly templatesUpdated: EventEmitter<void>;
5
5
  protected globalTemplates: {
6
6
  [id: string]: TemplateRef<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stemy/ngx-utils",
3
- "version": "12.0.2",
3
+ "version": "12.0.5",
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, 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";
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, 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 { ObjectUtils } from "./ngx-utils/utils/object.utils";
4
4
  export { DateUtils } from "./ngx-utils/utils/date.utils";