@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.
- package/bundles/stemy-ngx-utils.umd.js +22 -10
- package/bundles/stemy-ngx-utils.umd.js.map +1 -1
- package/esm2015/ngx-utils/common-types.js +2 -1
- package/esm2015/ngx-utils/directives/async-method.directive.js +7 -3
- package/esm2015/ngx-utils/directives/global-template.directive.js +8 -8
- package/esm2015/ngx-utils/ngx-utils.module.js +6 -2
- package/esm2015/ngx-utils/pipes/global-template.pipe.js +7 -5
- package/esm2015/ngx-utils/services/global-template.service.js +2 -2
- package/esm2015/public_api.js +2 -2
- package/fesm2015/stemy-ngx-utils.js +22 -11
- package/fesm2015/stemy-ngx-utils.js.map +1 -1
- package/ngx-utils/common-types.d.ts +10 -0
- package/ngx-utils/directives/async-method.directive.d.ts +1 -1
- package/ngx-utils/directives/global-template.directive.d.ts +3 -3
- package/ngx-utils/pipes/global-template.pipe.d.ts +3 -3
- package/ngx-utils/services/global-template.service.d.ts +2 -2
- package/package.json +1 -1
- package/public_api.d.ts +1 -1
- package/stemy-ngx-utils.metadata.json +1 -1
|
@@ -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> {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { OnDestroy, OnInit, TemplateRef } from "@angular/core";
|
|
2
|
-
import {
|
|
2
|
+
import { IGlobalTemplates } from "../common-types";
|
|
3
3
|
export declare class GlobalTemplateDirective implements OnInit, OnDestroy {
|
|
4
|
-
readonly
|
|
4
|
+
readonly globalTemplates: IGlobalTemplates;
|
|
5
5
|
readonly template: TemplateRef<any>;
|
|
6
6
|
id: string;
|
|
7
|
-
constructor(
|
|
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 {
|
|
3
|
+
import { IGlobalTemplates } from "../common-types";
|
|
4
4
|
export declare class GlobalTemplatePipe implements PipeTransform, OnInit, OnDestroy {
|
|
5
|
-
protected globalTemplates:
|
|
5
|
+
protected globalTemplates: IGlobalTemplates;
|
|
6
6
|
protected templatesUpdated: Subscription;
|
|
7
7
|
protected cachedTemplateId: string;
|
|
8
8
|
protected cachedTemplate: TemplateRef<any>;
|
|
9
|
-
constructor(globalTemplates:
|
|
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
|
-
|
|
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
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";
|