@elite.framework/ng.core 2.0.22 → 2.0.24

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,9 +2,9 @@ import * as rxjs from 'rxjs';
2
2
  import { Observable, Subscription, PartialObserver, BehaviorSubject } from 'rxjs';
3
3
  import { HttpClient, HttpRequest, HttpErrorResponse } from '@angular/common/http';
4
4
  import * as _elite_framework_ng_core_models from '@elite.framework/ng.core/models';
5
- import { Root, Rest, PaginatedResult, ApplicationLocalizationRequestDto, ApplicationLocalizationDto, ApplicationConfigurationRequestOptions, ApplicationConfigurationDto, ApplicationGlobalFeatureConfigurationDto, RedirectTo, RedirectToFn, CurrentTenantDto, Session, Localization, LocalizationWithDefault, ApplicationLocalizationResourceDto, Nav, Route as Route$1, Environment, TenantLoginInfoDto, NavItem, SortableItem, UserMenu } from '@elite.framework/ng.core/models';
5
+ import { Root, Rest, PaginatedResult, ApplicationLocalizationRequestDto, ApplicationLocalizationDto, ApplicationConfigurationRequestOptions, ApplicationConfigurationDto, ApplicationGlobalFeatureConfigurationDto, RedirectTo, RedirectToFn, CurrentTenantDto, Session, Localization, LocalizationWithDefault, ApplicationLocalizationResourceDto, Nav, Route as Route$1, Environment, TenantLoginInfoDto, NavItem, SortableItem, UserMenu, ReplaceableComponents } from '@elite.framework/ng.core/models';
6
6
  import * as i0 from '@angular/core';
7
- import { InjectionToken, Injector, OnDestroy, Type } from '@angular/core';
7
+ import { InjectionToken, Injector, OnDestroy, Type, NgZone } from '@angular/core';
8
8
  import * as qs from 'qs';
9
9
  import * as express_serve_static_core from 'express-serve-static-core';
10
10
  import { Request } from 'express';
@@ -12,7 +12,7 @@ import { TranslateService } from '@ngx-translate/core';
12
12
  import { SweetAlertResult, SweetAlertOptions, SweetAlertIcon } from 'sweetalert2';
13
13
  import { CanActivateFn, CanActivateChildFn, CanMatchFn, Router, ActivatedRouteSnapshot, RouterStateSnapshot, Route, TitleStrategy, RouterEvent, Event, NavigationCancel, NavigationEnd, NavigationError, NavigationStart } from '@angular/router';
14
14
  import { Title } from '@angular/platform-browser';
15
- import { TreeNode, RouteGroup } from '@elite.framework/ng.core/utils';
15
+ import { TreeNode, RouteGroup, InternalStore } from '@elite.framework/ng.core/utils';
16
16
 
17
17
  declare class RestService {
18
18
  protected options: Root;
@@ -1488,6 +1488,60 @@ declare class UserMenuService extends AbstractMenuService<UserMenu> {
1488
1488
  static ɵprov: i0.ɵɵInjectableDeclaration<UserMenuService>;
1489
1489
  }
1490
1490
 
1491
+ declare class ReplaceableComponentsService {
1492
+ private ngZone;
1493
+ private router;
1494
+ private readonly store;
1495
+ get replaceableComponents$(): Observable<ReplaceableComponents.ReplaceableComponent[]>;
1496
+ get replaceableComponents(): ReplaceableComponents.ReplaceableComponent[];
1497
+ get onUpdate$(): Observable<ReplaceableComponents.ReplaceableComponent[]>;
1498
+ constructor(ngZone: NgZone, router: Router);
1499
+ add(replaceableComponent: ReplaceableComponents.ReplaceableComponent, reload?: boolean): void;
1500
+ get(replaceableComponentKey: string): ReplaceableComponents.ReplaceableComponent | undefined;
1501
+ get$(replaceableComponentKey: string): Observable<ReplaceableComponents.ReplaceableComponent | undefined>;
1502
+ static ɵfac: i0.ɵɵFactoryDeclaration<ReplaceableComponentsService, never>;
1503
+ static ɵprov: i0.ɵɵInjectableDeclaration<ReplaceableComponentsService>;
1504
+ }
1505
+
1506
+ interface HttpWaitState {
1507
+ requests: HttpRequest<any>[];
1508
+ filteredRequests: Array<HttpRequestInfo>;
1509
+ }
1510
+ interface HttpRequestInfo {
1511
+ method: string;
1512
+ endpoint: string;
1513
+ }
1514
+ declare class HttpWaitService {
1515
+ protected store: InternalStore<HttpWaitState>;
1516
+ private delay;
1517
+ private destroy$;
1518
+ constructor(injector: Injector);
1519
+ getLoading(): boolean;
1520
+ getLoading$(): rxjs.Observable<boolean>;
1521
+ updateLoading$(): rxjs.Observable<boolean>;
1522
+ clearLoading(): void;
1523
+ addRequest(request: HttpRequest<any>): void;
1524
+ deleteRequest(request: HttpRequest<any>): void;
1525
+ addFilter(request: HttpRequestInfo | HttpRequestInfo[]): void;
1526
+ removeFilter(request: HttpRequestInfo | HttpRequestInfo[]): void;
1527
+ private applyFilter;
1528
+ private isSameRequest;
1529
+ static ɵfac: i0.ɵɵFactoryDeclaration<HttpWaitService, never>;
1530
+ static ɵprov: i0.ɵɵInjectableDeclaration<HttpWaitService>;
1531
+ }
1532
+
1533
+ declare class WindowService {
1534
+ readonly document: Document;
1535
+ readonly window: (Window & typeof globalThis) | null;
1536
+ readonly navigator: Navigator | undefined;
1537
+ copyToClipboard(text: string): Promise<void> | any;
1538
+ open(url?: string | URL, target?: string, features?: string): Window | any;
1539
+ reloadPage(): void;
1540
+ downloadBlob(blob: Blob, fileName: string): void;
1541
+ static ɵfac: i0.ɵɵFactoryDeclaration<WindowService, never>;
1542
+ static ɵprov: i0.ɵɵInjectableDeclaration<WindowService>;
1543
+ }
1544
+
1491
1545
  declare const SORT_COMPARE_FUNC: InjectionToken<(a: SortableItem, b: SortableItem) => number>;
1492
1546
  declare function compareFuncFactory(): (a: SortableItem | any, b: SortableItem | any) => 1 | -1 | 0;
1493
1547
 
@@ -1499,5 +1553,9 @@ declare function localeInitializer(): Promise<unknown>;
1499
1553
  declare function getCurrentTenancyNameFromUrl(tenantKey: string): string | null;
1500
1554
  declare function parseTenantFromUrl(injector: Injector): Promise<void | TenantLoginInfoDto>;
1501
1555
 
1502
- export { AbstractMenuService, AbstractNavTreeService, AbstractTreeService, ApplicationConfigurationService, ApplicationLocalizationService, BaseService, ConfigStateService, EnvironmentService, FrameworkTitleStrategy, GenericService, HttpErrorReporterService, IdParserService, LocalStorageListenerService, LocalStorageService, LocalizationService, LogLevel, LoggerService, MultiTenancyService, NavItemsService, NavigationEvent, NgxPermissionsGuard, PermissionCheckerService, QueryParser, REQUEST, RestService, RouterEvents, RouterWaitService, RoutesHandler, RoutesService, SORT_COMPARE_FUNC, SessionStateService, SsrCookieService, SubscriptionService, SwalService, UserMenuService, compareFuncFactory, getCurrentTenancyNameFromUrl, getInitialData, getRemoteEnv, isUndefinedOrEmptyString, localeInitializer, ngxPermissionsGuard, parseTenantFromUrl };
1503
- export type { AggregateConfig, CrudService, FilterCondition, FilterGroup, GroupingConfig, ILoggerService, LegacyLanguageDto, NavigationEventKey, NgxPermissionsData, QueryParameters, ResourceDto, RouterWaitState, SelectConfig };
1556
+ declare function findRoute(routesService: RoutesService, path: string): TreeNode<Route$1> | null;
1557
+ declare function getRoutePath(router: Router, url?: string): string;
1558
+ declare function reloadRoute(router: Router, ngZone: NgZone): void;
1559
+
1560
+ export { AbstractMenuService, AbstractNavTreeService, AbstractTreeService, ApplicationConfigurationService, ApplicationLocalizationService, BaseService, ConfigStateService, EnvironmentService, FrameworkTitleStrategy, GenericService, HttpErrorReporterService, HttpWaitService, IdParserService, LocalStorageListenerService, LocalStorageService, LocalizationService, LogLevel, LoggerService, MultiTenancyService, NavItemsService, NavigationEvent, NgxPermissionsGuard, PermissionCheckerService, QueryParser, REQUEST, ReplaceableComponentsService, RestService, RouterEvents, RouterWaitService, RoutesHandler, RoutesService, SORT_COMPARE_FUNC, SessionStateService, SsrCookieService, SubscriptionService, SwalService, UserMenuService, WindowService, compareFuncFactory, findRoute, getCurrentTenancyNameFromUrl, getInitialData, getRemoteEnv, getRoutePath, isUndefinedOrEmptyString, localeInitializer, ngxPermissionsGuard, parseTenantFromUrl, reloadRoute };
1561
+ export type { AggregateConfig, CrudService, FilterCondition, FilterGroup, GroupingConfig, HttpRequestInfo, HttpWaitState, ILoggerService, LegacyLanguageDto, NavigationEventKey, NgxPermissionsData, QueryParameters, ResourceDto, RouterWaitState, SelectConfig };
package/tokens/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import { InjectionToken } from '@angular/core';
2
2
  import { Root, Localization, PipeToLoginFn, CheckAuthenticationStateFn } from '@elite.framework/ng.core/models';
3
3
  import { BehaviorSubject } from 'rxjs';
4
4
  import { QueueManager } from '@elite.framework/ng.core/utils';
5
- import { HttpErrorResponse } from '@angular/common/http';
5
+ import { HttpErrorResponse, HttpContextToken } from '@angular/common/http';
6
6
 
7
7
  type AppInitErrorFn = (error: any) => void;
8
8
  declare const APP_INIT_ERROR_HANDLERS: InjectionToken<AppInitErrorFn[]>;
@@ -33,5 +33,9 @@ declare const DISABLE_PROJECT_NAME: InjectionToken<boolean>;
33
33
 
34
34
  declare const TENANT_NOT_FOUND_BY_NAME: InjectionToken<(HttpErrorResponse: HttpErrorResponse) => void>;
35
35
 
36
- export { APP_INIT_ERROR_HANDLERS, CHECK_AUTHENTICATION_STATE_FN_KEY, COOKIE_LANGUAGE_KEY, CORE_OPTIONS, DISABLE_PROJECT_NAME, DYNAMIC_LAYOUTS_TOKEN, INCUDE_LOCALIZATION_RESOURCES_TOKEN, LOCALIZATIONS, OTHERS_GROUP, PIPE_TO_LOGIN_FN_KEY, QUEUE_MANAGER, TENANT_KEY, TENANT_NOT_FOUND_BY_NAME, coreOptionsFactory, localizationContributor, localizations$ };
36
+ declare const NAVIGATE_TO_MANAGE_PROFILE: InjectionToken<() => void>;
37
+
38
+ declare const IS_EXTERNAL_REQUEST: HttpContextToken<boolean>;
39
+
40
+ export { APP_INIT_ERROR_HANDLERS, CHECK_AUTHENTICATION_STATE_FN_KEY, COOKIE_LANGUAGE_KEY, CORE_OPTIONS, DISABLE_PROJECT_NAME, DYNAMIC_LAYOUTS_TOKEN, INCUDE_LOCALIZATION_RESOURCES_TOKEN, IS_EXTERNAL_REQUEST, LOCALIZATIONS, NAVIGATE_TO_MANAGE_PROFILE, OTHERS_GROUP, PIPE_TO_LOGIN_FN_KEY, QUEUE_MANAGER, TENANT_KEY, TENANT_NOT_FOUND_BY_NAME, coreOptionsFactory, localizationContributor, localizations$ };
37
41
  export type { AppInitErrorFn };
package/utils/index.d.ts CHANGED
@@ -2,6 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import * as i1 from '@angular/common';
3
3
  import { DeepPartial, ApplicationLocalizationConfigurationDto } from '@elite.framework/ng.core/models';
4
4
  import * as rxjs from 'rxjs';
5
+ import { HttpParameterCodec } from '@angular/common/http';
5
6
 
6
7
  declare class UtilsModule {
7
8
  static ɵfac: i0.ɵɵFactoryDeclaration<UtilsModule, never>;
@@ -98,5 +99,13 @@ type NodeValue<T extends object, F extends (...args: any) => any> = F extends un
98
99
 
99
100
  declare function pushValueTo<T>(array: T[]): (element: T) => T[];
100
101
 
101
- export { BaseTreeNode, DefaultQueueManager, InternalStore, UtilsModule, checkHasProp, createGroupMap, createLocalizationPipeKeyGenerator, createLocalizer, createLocalizerWithFallback, createMapFromList, createTokenParser, createTreeFromList, createTreeNodeFilterCreator, deepMerge, escapeHtmlChars, exists, getLocaleDirection, interpolate, isArray, isBoolean, isFunction, isNode, isNullOrEmpty, isNullOrUndefined, isObject, isObjectAndNotArray, isObjectAndNotArrayNotNode, isPlainObject, isPromise, isString, isUndefinedOrEmptyString, noop, notEmptyValue, pushValueTo, transformStringToArray };
102
+ declare function getPathName(url: string): string;
103
+ declare class WebHttpUrlEncodingCodec implements HttpParameterCodec {
104
+ encodeKey(k: string): string;
105
+ encodeValue(v: string): string;
106
+ decodeKey(k: string): string;
107
+ decodeValue(v: string): string;
108
+ }
109
+
110
+ export { BaseTreeNode, DefaultQueueManager, InternalStore, UtilsModule, WebHttpUrlEncodingCodec, checkHasProp, createGroupMap, createLocalizationPipeKeyGenerator, createLocalizer, createLocalizerWithFallback, createMapFromList, createTokenParser, createTreeFromList, createTreeNodeFilterCreator, deepMerge, escapeHtmlChars, exists, getLocaleDirection, getPathName, interpolate, isArray, isBoolean, isFunction, isNode, isNullOrEmpty, isNullOrUndefined, isObject, isObjectAndNotArray, isObjectAndNotArrayNotNode, isPlainObject, isPromise, isString, isUndefinedOrEmptyString, noop, notEmptyValue, pushValueTo, transformStringToArray };
102
111
  export type { NodeKey, NodeValue, QueueManager, RouteGroup, TreeNode };