@elite.framework/ng.core 2.0.20 → 2.0.23

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.
Files changed (32) hide show
  1. package/abstracts/README.md +3 -0
  2. package/abstracts/index.d.ts +115 -0
  3. package/constants/README.md +3 -0
  4. package/constants/index.d.ts +347 -0
  5. package/directives/index.d.ts +45 -4
  6. package/fesm2022/elite.framework-ng.core-abstracts.mjs +196 -0
  7. package/fesm2022/elite.framework-ng.core-abstracts.mjs.map +1 -0
  8. package/fesm2022/elite.framework-ng.core-constants.mjs +365 -0
  9. package/fesm2022/elite.framework-ng.core-constants.mjs.map +1 -0
  10. package/fesm2022/elite.framework-ng.core-directives.mjs +205 -4
  11. package/fesm2022/elite.framework-ng.core-directives.mjs.map +1 -1
  12. package/fesm2022/elite.framework-ng.core-interceptors.mjs +3 -4
  13. package/fesm2022/elite.framework-ng.core-interceptors.mjs.map +1 -1
  14. package/fesm2022/elite.framework-ng.core-models.mjs +80 -1
  15. package/fesm2022/elite.framework-ng.core-models.mjs.map +1 -1
  16. package/fesm2022/elite.framework-ng.core-pipes.mjs +62 -4
  17. package/fesm2022/elite.framework-ng.core-pipes.mjs.map +1 -1
  18. package/fesm2022/elite.framework-ng.core-providers.mjs +155 -6
  19. package/fesm2022/elite.framework-ng.core-providers.mjs.map +1 -1
  20. package/fesm2022/elite.framework-ng.core-services.mjs +1728 -45
  21. package/fesm2022/elite.framework-ng.core-services.mjs.map +1 -1
  22. package/fesm2022/elite.framework-ng.core-tokens.mjs +37 -2
  23. package/fesm2022/elite.framework-ng.core-tokens.mjs.map +1 -1
  24. package/fesm2022/elite.framework-ng.core-utils.mjs +325 -1
  25. package/fesm2022/elite.framework-ng.core-utils.mjs.map +1 -1
  26. package/models/index.d.ts +483 -8
  27. package/package.json +9 -1
  28. package/pipes/index.d.ts +22 -4
  29. package/providers/index.d.ts +18 -3
  30. package/services/index.d.ts +1185 -20
  31. package/tokens/index.d.ts +36 -18
  32. package/utils/index.d.ts +94 -1
package/models/index.d.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  import { MenuItem } from 'primeng/api';
2
+ import { EventEmitter, Type, TemplateRef, Injector } from '@angular/core';
3
+ import { AuthConfig } from 'angular-oauth2-oidc';
4
+ import { Subject, UnaryFunction, Observable } from 'rxjs';
2
5
  import { HttpParameterCodec, HttpParams, HttpHeaders } from '@angular/common/http';
3
- import { ActivatedRouteSnapshot, Route, RouterStateSnapshot, NavigationExtras } from '@angular/router';
6
+ import { ActivatedRouteSnapshot, Route as Route$1, RouterStateSnapshot, NavigationExtras } from '@angular/router';
4
7
 
5
8
  interface ActionDef<T> {
6
9
  name: string;
@@ -62,16 +65,111 @@ interface ColumnDef<T> {
62
65
  fixed?: boolean;
63
66
  }
64
67
 
68
+ interface Environment {
69
+ apis: Apis;
70
+ application: ApplicationInfo;
71
+ hmr?: boolean;
72
+ test?: boolean;
73
+ localization?: {
74
+ defaultResourceName?: string;
75
+ };
76
+ oAuthConfig?: AuthConfig & {
77
+ impersonation?: Impersonation;
78
+ };
79
+ production: boolean;
80
+ remoteEnv?: RemoteEnv;
81
+ logLevel: string;
82
+ externalServices?: ExternalServices;
83
+ [key: string]: any;
84
+ }
85
+ interface ExternalServices {
86
+ sentry?: string;
87
+ logRocket?: string;
88
+ [key: string]: string | undefined;
89
+ }
90
+ interface ApplicationInfo {
91
+ name: string;
92
+ baseUrl?: string;
93
+ logoUrl?: string;
94
+ }
95
+ interface HasAdditional {
96
+ [key: string]: string;
97
+ }
98
+ interface ApiConfig extends Partial<HasAdditional> {
99
+ url: string;
100
+ rootNamespace?: string;
101
+ }
102
+ interface Apis {
103
+ [key: string]: Partial<ApiConfig>;
104
+ default: ApiConfig;
105
+ }
106
+ type customMergeFn = (localEnv: Partial<Environment>, remoteEnv: any) => Environment;
107
+ interface RemoteEnv {
108
+ url: string;
109
+ mergeStrategy: 'deepmerge' | 'overwrite' | customMergeFn;
110
+ method?: string;
111
+ headers?: Dictionary<string>;
112
+ }
113
+ interface Impersonation {
114
+ tenantImpersonation?: boolean;
115
+ userImpersonation?: boolean;
116
+ }
117
+ interface Dictionary<T = any> {
118
+ [key: string]: T;
119
+ }
120
+
65
121
  interface Root {
122
+ environment: Partial<Environment>;
66
123
  registerLocaleFn: (locale: string) => Promise<any>;
67
124
  skipGetAppConfiguration?: boolean;
68
125
  skipInitAuthService?: boolean;
69
126
  sendNullsAsQueryParam?: boolean;
70
127
  tenantKey?: string;
128
+ localizations?: Localization[];
71
129
  othersGroup?: string;
72
130
  dynamicLayouts?: Map<string, string>;
73
131
  disableProjectNameInTitle?: boolean;
74
132
  }
133
+ type ExtractFromOutput<T extends EventEmitter<any> | Subject<any>> = T extends EventEmitter<infer X> ? X : T extends Subject<infer Y> ? Y : never;
134
+ declare const enum eLayoutType {
135
+ account = "account",
136
+ application = "application",
137
+ empty = "empty"
138
+ }
139
+ declare const enum eThemeSharedComponents {
140
+ ApplicationLayoutComponent = "Theme.ApplicationLayoutComponent",
141
+ AccountLayoutComponent = "Theme.AccountLayoutComponent",
142
+ EmptyLayoutComponent = "Theme.EmptyLayoutComponent"
143
+ }
144
+ interface Nav {
145
+ name: string;
146
+ parentName?: string;
147
+ requiredPolicy?: string;
148
+ order?: number;
149
+ invisible?: boolean;
150
+ }
151
+ interface Route extends Nav {
152
+ path?: string;
153
+ layout?: eLayoutType;
154
+ iconClass?: string;
155
+ group?: string;
156
+ breadcrumbText?: string;
157
+ children?: Route[];
158
+ }
159
+ interface Tab extends Nav {
160
+ component: Type<any>;
161
+ }
162
+ interface Child {
163
+ localizations?: Localization[];
164
+ }
165
+ interface Localization {
166
+ culture: string;
167
+ resources: LocalizationResource[];
168
+ }
169
+ interface LocalizationResource {
170
+ resourceName: string;
171
+ texts: Record<string, string>;
172
+ }
75
173
  declare class ListResultDto<T> {
76
174
  items?: T[];
77
175
  constructor(initialValues?: Partial<ListResultDto<T>>);
@@ -88,6 +186,11 @@ declare class GeneralResponse<T> {
88
186
  unAuthorizedRequest?: boolean;
89
187
  constructor();
90
188
  }
189
+ interface SortableItem {
190
+ id?: string | number;
191
+ name?: string;
192
+ order?: number;
193
+ }
91
194
  declare function checkHasProp<T>(object: T, key: string | keyof T): key is keyof T;
92
195
 
93
196
  type FilterType = 'text' | 'number' | 'select' | 'date';
@@ -155,14 +258,14 @@ interface NgxRedirectToNavigationParameters {
155
258
  navigationCommands: any[] | NavigationCommandsFn;
156
259
  navigationExtras?: NavigationExtras | NavigationExtrasFn;
157
260
  }
158
- declare type OnlyFn = (route: ActivatedRouteSnapshot | Route, state?: RouterStateSnapshot) => string | string[];
159
- declare type ExceptFn = (route: ActivatedRouteSnapshot | Route, state?: RouterStateSnapshot) => string | string[];
261
+ declare type OnlyFn = (route: ActivatedRouteSnapshot | Route$1, state?: RouterStateSnapshot) => string | string[];
262
+ declare type ExceptFn = (route: ActivatedRouteSnapshot | Route$1, state?: RouterStateSnapshot) => string | string[];
160
263
  declare type RedirectTo = string | {
161
264
  [name: string]: NgxRedirectToNavigationParameters | string | RedirectToFn;
162
265
  } | NgxRedirectToNavigationParameters;
163
- declare type RedirectToFn = (rejectedPermissionName?: string, route?: ActivatedRouteSnapshot | Route, state?: RouterStateSnapshot) => RedirectTo;
164
- declare type NavigationCommandsFn = (route: ActivatedRouteSnapshot | Route, state?: RouterStateSnapshot) => any[];
165
- declare type NavigationExtrasFn = (route: ActivatedRouteSnapshot | Route, state?: RouterStateSnapshot) => NavigationExtras;
266
+ declare type RedirectToFn = (rejectedPermissionName?: string, route?: ActivatedRouteSnapshot | Route$1, state?: RouterStateSnapshot) => RedirectTo;
267
+ declare type NavigationCommandsFn = (route: ActivatedRouteSnapshot | Route$1, state?: RouterStateSnapshot) => any[];
268
+ declare type NavigationExtrasFn = (route: ActivatedRouteSnapshot | Route$1, state?: RouterStateSnapshot) => NavigationExtras;
166
269
  declare type ValidationFn = ((name?: string, store?: any) => Promise<void | string | boolean> | boolean | string[]);
167
270
  declare const DEFAULT_REDIRECT_KEY = "default";
168
271
 
@@ -171,5 +274,377 @@ interface NgxPermission {
171
274
  validationFunction?: ValidationFn;
172
275
  }
173
276
 
174
- export { AttachmentDto, DEFAULT_REDIRECT_KEY, GeneralResponse, ListResultDto, PagedResultDto, Rest, checkHasProp };
175
- export type { ActionDef, ButtonConfig, ButtonSeverity, ButtonSize, ButtonVariant, ColumnDef, ExceptFn, FilterDef, FilterType, IconPosition, NavigationCommandsFn, NavigationExtrasFn, NgxPermission, NgxPermissionsRouterData, NgxRedirectToNavigationParameters, OnlyFn, PaginatedResult, RedirectTo, RedirectToFn, Root, ValidationFn };
277
+ interface ApplicationConfigurationRequestOptions {
278
+ includeLocalizationResources: boolean;
279
+ }
280
+ interface ApplicationConfigurationDto {
281
+ localization: ApplicationLocalizationConfigurationDto;
282
+ auth: ApplicationAuthConfigurationDto;
283
+ setting: ApplicationSettingConfigurationDto;
284
+ currentUser: CurrentUserDto;
285
+ features: ApplicationFeatureConfigurationDto;
286
+ globalFeatures: ApplicationGlobalFeatureConfigurationDto;
287
+ multiTenancy: MultiTenancyInfoDto;
288
+ currentTenant: CurrentTenantDto;
289
+ timing: TimingDto;
290
+ clock: ClockDto;
291
+ extraProperties: Record<string, object>;
292
+ }
293
+ interface ApplicationAuthConfigurationDto {
294
+ grantedPolicies: Record<string, boolean>;
295
+ }
296
+ interface ApplicationSettingConfigurationDto {
297
+ values: Record<string, string>;
298
+ }
299
+ interface ApplicationFeatureConfigurationDto {
300
+ values: Record<string, string>;
301
+ }
302
+ interface ApplicationGlobalFeatureConfigurationDto {
303
+ enabledFeatures: string[];
304
+ }
305
+ interface ApplicationLocalizationConfigurationDto {
306
+ values: Record<string, Record<string, string>>;
307
+ resources: Record<string, ApplicationLocalizationResourceDto>;
308
+ languages: LanguageInfo[];
309
+ currentCulture: CurrentCultureDto;
310
+ defaultResourceName?: string;
311
+ languagesMap: Record<string, NameValue[]>;
312
+ languageFilesMap: Record<string, NameValue[]>;
313
+ }
314
+ interface ApplicationLocalizationDto {
315
+ resources: Record<string, ApplicationLocalizationResourceDto>;
316
+ currentCulture: CurrentCultureDto;
317
+ }
318
+ interface ApplicationLocalizationRequestDto {
319
+ cultureName: string;
320
+ onlyDynamics: boolean;
321
+ }
322
+ interface CurrentCultureDto {
323
+ displayName?: string;
324
+ englishName?: string;
325
+ threeLetterIsoLanguageName?: string;
326
+ twoLetterIsoLanguageName?: string;
327
+ isRightToLeft: boolean;
328
+ cultureName?: string;
329
+ name?: string;
330
+ nativeName?: string;
331
+ dateTimeFormat: DateTimeFormatDto;
332
+ }
333
+ interface LanguageInfo {
334
+ cultureName?: string;
335
+ uiCultureName?: string;
336
+ displayName?: string;
337
+ twoLetterISOLanguageName?: string;
338
+ flagIcon?: string;
339
+ }
340
+ interface DateTimeFormatDto {
341
+ calendarAlgorithmType?: string;
342
+ dateTimeFormatLong?: string;
343
+ shortDatePattern?: string;
344
+ fullDateTimePattern?: string;
345
+ dateSeparator?: string;
346
+ shortTimePattern?: string;
347
+ longTimePattern?: string;
348
+ }
349
+ declare class NameValue {
350
+ name?: any;
351
+ value?: any;
352
+ constructor(initialValues?: Partial<NameValue>);
353
+ }
354
+ interface CurrentUserDto {
355
+ isAuthenticated: boolean;
356
+ id?: string;
357
+ tenantId?: string;
358
+ impersonatorUserId?: string;
359
+ impersonatorTenantId?: string;
360
+ impersonatorUserName?: string;
361
+ impersonatorTenantName?: string;
362
+ userName?: string;
363
+ name?: string;
364
+ surName?: string;
365
+ email?: string;
366
+ emailVerified: boolean;
367
+ phoneNumber?: string;
368
+ phoneNumberVerified: boolean;
369
+ roles: string[];
370
+ }
371
+ interface CurrentTenantDto {
372
+ tenancyName?: string | undefined;
373
+ vatNo?: string | undefined;
374
+ vatCerFileUrl?: string | undefined;
375
+ tenantPhoneNumber?: string | undefined;
376
+ tenantEmail?: string | undefined;
377
+ name?: string | undefined;
378
+ logoId?: string | undefined;
379
+ logoFileType?: string | undefined;
380
+ customCssId?: string | undefined;
381
+ subscriptionEndDateUtc?: Date | undefined;
382
+ isInTrialPeriod?: boolean;
383
+ creationTime?: Date;
384
+ subscriptionDateString?: string | undefined;
385
+ creationTimeString?: string | undefined;
386
+ id?: number;
387
+ }
388
+ interface IanaTimeZone {
389
+ timeZoneName?: string;
390
+ }
391
+ interface TimeZone {
392
+ iana: IanaTimeZone;
393
+ windows: WindowsTimeZone;
394
+ }
395
+ interface TimingDto {
396
+ timeZone: TimeZone;
397
+ }
398
+ interface WindowsTimeZone {
399
+ timeZoneId?: string;
400
+ }
401
+ interface ClockDto {
402
+ kind?: string;
403
+ }
404
+ interface MultiTenancyInfoDto {
405
+ isEnabled: boolean;
406
+ }
407
+ interface LocalizationWithDefault {
408
+ key: string;
409
+ defaultValue: string;
410
+ }
411
+ interface ApplicationLocalizationResourceDto {
412
+ texts: Record<string, string>;
413
+ baseResources: string[];
414
+ }
415
+ interface ApplicationLocalizationResourceDto {
416
+ texts: Record<string, string>;
417
+ baseResources: string[];
418
+ }
419
+ type LocalizationParam = string | LocalizationWithDefault;
420
+
421
+ type DeepPartial<T> = Partible<T> extends never ? T : {
422
+ [K in keyof T]?: DeepPartial<T[K]>;
423
+ };
424
+ type Partible<T> = T extends Primitive | Array<any> | Node ? never : {
425
+ [K in keyof T]: T[K] extends Function ? never : T[K];
426
+ } extends T ? T : never;
427
+ type Primitive = undefined | null | boolean | string | number | bigint | symbol;
428
+ type InferredInstanceOf<T> = T extends Type<infer U> ? U : never;
429
+ type InferredContextOf<T> = T extends TemplateRef<infer U> ? U : never;
430
+ type Strict<Class, Contract> = Class extends Contract ? {
431
+ [K in keyof Class]: K extends keyof Contract ? Contract[K] : never;
432
+ } : Contract;
433
+
434
+ declare enum SubscriptionPaymentType {
435
+ Manual = 0,
436
+ RecurringAutomatic = 1,
437
+ RecurringManual = 2
438
+ }
439
+ declare enum PaymentPeriodType {
440
+ Daily = 1,
441
+ Weekly = 7,
442
+ Monthly = 30,
443
+ Annual = 365
444
+ }
445
+ interface EditionInfoDto {
446
+ displayName?: string | undefined;
447
+ trialDayCount?: number | undefined;
448
+ monthlyPrice?: number | undefined;
449
+ annualPrice?: number | undefined;
450
+ isHighestEdition?: boolean;
451
+ isFree?: boolean;
452
+ id?: number;
453
+ }
454
+ interface UserLoginInfoDto {
455
+ name?: string | undefined;
456
+ surname?: string | undefined;
457
+ userName?: string | undefined;
458
+ emailAddress?: string | undefined;
459
+ profilePictureId?: string | undefined;
460
+ id?: number;
461
+ }
462
+ interface TenantLoginInfoDto {
463
+ isAvailable: boolean;
464
+ tenancyName?: string | undefined;
465
+ vatNo?: string | undefined;
466
+ vatCerFileUrl?: string | undefined;
467
+ tenantPhoneNumber?: string | undefined;
468
+ tenantEmail?: string | undefined;
469
+ name?: string | undefined;
470
+ logoId?: string | undefined;
471
+ logoFileType?: string | undefined;
472
+ customCssId?: string | undefined;
473
+ subscriptionEndDateUtc?: Date | undefined;
474
+ isInTrialPeriod?: boolean;
475
+ subscriptionPaymentType?: SubscriptionPaymentType;
476
+ edition?: EditionInfoDto;
477
+ creationTime?: Date;
478
+ paymentPeriodType?: PaymentPeriodType;
479
+ subscriptionDateString?: string | undefined;
480
+ creationTimeString?: string | undefined;
481
+ id?: number;
482
+ }
483
+ interface BranchLoginInfoDto {
484
+ id?: number;
485
+ }
486
+ interface ApplicationInfoDto {
487
+ version?: string | undefined;
488
+ releaseDate?: Date;
489
+ currency?: string | undefined;
490
+ currencySign?: string | undefined;
491
+ allowTenantsToChangeEmailSettings?: boolean;
492
+ userDelegationIsEnabled?: boolean;
493
+ twoFactorCodeExpireSeconds?: number;
494
+ features?: {
495
+ [key: string]: boolean;
496
+ } | undefined;
497
+ }
498
+ declare namespace Session {
499
+ interface State {
500
+ language: string;
501
+ tenant: CurrentTenantDto | null;
502
+ user?: UserLoginInfoDto;
503
+ impersonatorUser?: UserLoginInfoDto;
504
+ impersonatorTenant?: TenantLoginInfoDto;
505
+ branch?: BranchLoginInfoDto;
506
+ impersonatorBranch?: BranchLoginInfoDto;
507
+ application?: ApplicationInfoDto;
508
+ userId: any;
509
+ tenantId: number;
510
+ branchId: null | any;
511
+ impersonatorUserId: null | any;
512
+ impersonatorTenantId: null | any;
513
+ impersonatorBranchId: null | any;
514
+ multiTenancySide: number;
515
+ isAuthenticated: boolean;
516
+ impersonatorUserName?: string;
517
+ impersonatorTenantName?: string;
518
+ userName?: string;
519
+ surName?: string;
520
+ email?: string;
521
+ emailVerified: boolean;
522
+ phoneNumber?: string;
523
+ phoneNumberVerified: boolean;
524
+ roles: string[];
525
+ }
526
+ }
527
+
528
+ type EventType = 'discovery_document_loaded' | 'jwks_load_error' | 'invalid_nonce_in_state' | 'discovery_document_load_error' | 'discovery_document_validation_error' | 'user_profile_loaded' | 'user_profile_load_error' | 'token_received' | 'token_error' | 'code_error' | 'token_refreshed' | 'token_refresh_error' | 'silent_refresh_error' | 'silently_refreshed' | 'silent_refresh_timeout' | 'token_validation_error' | 'token_expires' | 'session_changed' | 'session_error' | 'session_terminated' | 'session_unchanged' | 'logout' | 'popup_closed' | 'popup_blocked' | 'token_revoke_error';
529
+ declare abstract class AuthEvent {
530
+ readonly type: EventType;
531
+ constructor(type: EventType);
532
+ }
533
+ declare class AuthSuccessEvent extends AuthEvent {
534
+ readonly type: EventType;
535
+ readonly info?: any | undefined;
536
+ constructor(type: EventType, info?: any | undefined);
537
+ }
538
+ declare class AuthInfoEvent extends AuthEvent {
539
+ readonly type: EventType;
540
+ readonly info?: any | undefined;
541
+ constructor(type: EventType, info?: any | undefined);
542
+ }
543
+ declare class AuthErrorEvent extends AuthEvent {
544
+ readonly type: EventType;
545
+ readonly reason: object;
546
+ readonly params?: object | undefined;
547
+ constructor(type: EventType, reason: object, params?: object | undefined);
548
+ }
549
+
550
+ interface LoginParams {
551
+ username: string;
552
+ password: string;
553
+ rememberMe?: boolean;
554
+ redirectUrl?: string;
555
+ }
556
+ type PipeToLoginFn = (params: Pick<LoginParams, 'redirectUrl' | 'rememberMe'>, injector: Injector) => UnaryFunction<any, any>;
557
+ /**
558
+ * @deprecated The interface should not be used anymore.
559
+ */
560
+ type SetTokenResponseToStorageFn<T = any> = (tokenRes: T) => void;
561
+ type CheckAuthenticationStateFn = (injector: Injector) => void;
562
+ interface AuthErrorFilter<T = AuthErrorEvent> {
563
+ id: string;
564
+ executable: boolean;
565
+ execute: (event: T) => boolean;
566
+ }
567
+
568
+ interface Badge {
569
+ count?: number | Observable<number>;
570
+ color?: string;
571
+ icon?: string;
572
+ }
573
+ declare class NavItem {
574
+ id?: string | number;
575
+ name?: string;
576
+ description?: string;
577
+ badge?: Badge;
578
+ component?: Type<any>;
579
+ html?: string;
580
+ action?: () => void;
581
+ order?: number;
582
+ requiredPolicy?: string;
583
+ visible?: NavBarPropPredicate<NavItem>;
584
+ icon?: string;
585
+ constructor(props: Partial<NavItem>);
586
+ }
587
+ type NavBarPropPredicate<T> = (prop?: T, injector?: Injector) => boolean | Promise<boolean> | Observable<boolean>;
588
+
589
+ declare class UserMenu extends NavItem {
590
+ textTemplate?: UserMenuTextTemplate;
591
+ }
592
+ interface UserMenuTextTemplate {
593
+ text: string;
594
+ icon?: string;
595
+ }
596
+
597
+ declare namespace ReplaceableComponents {
598
+ interface State {
599
+ replaceableComponents: ReplaceableComponent[];
600
+ }
601
+ interface ReplaceableComponent {
602
+ component: Type<any>;
603
+ loadComponent?: () => Promise<Type<any>>;
604
+ key: string;
605
+ }
606
+ interface ReplaceableComponentLazy {
607
+ key: string;
608
+ loadComponent: () => Promise<Type<any>>;
609
+ }
610
+ interface ReplaceableTemplateDirectiveInput<I, O extends {
611
+ [K in keyof O]: EventEmitter<any> | Subject<any>;
612
+ }> {
613
+ inputs?: {
614
+ -readonly [K in keyof I]: {
615
+ value: I[K];
616
+ twoWay?: boolean;
617
+ };
618
+ };
619
+ outputs?: {
620
+ -readonly [K in keyof O]: (value: ExtractFromOutput<O[K]>) => void;
621
+ };
622
+ componentKey: string;
623
+ }
624
+ interface ReplaceableTemplateData<I, O extends {
625
+ [K in keyof O]: EventEmitter<any> | Subject<any>;
626
+ }> {
627
+ inputs: ReplaceableTemplateInputs<I>;
628
+ outputs: ReplaceableTemplateOutputs<O>;
629
+ componentKey: string;
630
+ }
631
+ type ReplaceableTemplateInputs<T> = {
632
+ [K in keyof T]: T[K];
633
+ };
634
+ type ReplaceableTemplateOutputs<T extends {
635
+ [K in keyof T]: EventEmitter<any> | Subject<any>;
636
+ }> = {
637
+ [K in keyof T]: (value: ExtractFromOutput<T[K]>) => void;
638
+ };
639
+ interface RouteData<T = any> {
640
+ key: string;
641
+ defaultComponent: Type<T>;
642
+ }
643
+ interface RouteDataLazy<T> {
644
+ key: string;
645
+ defaultLoadComponent: () => Promise<Type<T>>;
646
+ }
647
+ }
648
+
649
+ export { AttachmentDto, AuthErrorEvent, AuthEvent, AuthInfoEvent, AuthSuccessEvent, DEFAULT_REDIRECT_KEY, GeneralResponse, ListResultDto, NameValue, NavItem, PagedResultDto, PaymentPeriodType, ReplaceableComponents, Rest, Session, SubscriptionPaymentType, UserMenu, checkHasProp, eLayoutType, eThemeSharedComponents };
650
+ export type { ActionDef, ApiConfig, Apis, ApplicationAuthConfigurationDto, ApplicationConfigurationDto, ApplicationConfigurationRequestOptions, ApplicationFeatureConfigurationDto, ApplicationGlobalFeatureConfigurationDto, ApplicationInfo, ApplicationInfoDto, ApplicationLocalizationConfigurationDto, ApplicationLocalizationDto, ApplicationLocalizationRequestDto, ApplicationLocalizationResourceDto, ApplicationSettingConfigurationDto, AuthErrorFilter, Badge, BranchLoginInfoDto, ButtonConfig, ButtonSeverity, ButtonSize, ButtonVariant, CheckAuthenticationStateFn, Child, ClockDto, ColumnDef, CurrentCultureDto, CurrentTenantDto, CurrentUserDto, DateTimeFormatDto, DeepPartial, Dictionary, EditionInfoDto, Environment, EventType, ExceptFn, ExternalServices, ExtractFromOutput, FilterDef, FilterType, HasAdditional, IanaTimeZone, IconPosition, Impersonation, InferredContextOf, InferredInstanceOf, LanguageInfo, Localization, LocalizationParam, LocalizationResource, LocalizationWithDefault, LoginParams, MultiTenancyInfoDto, Nav, NavBarPropPredicate, NavigationCommandsFn, NavigationExtrasFn, NgxPermission, NgxPermissionsRouterData, NgxRedirectToNavigationParameters, OnlyFn, PaginatedResult, PipeToLoginFn, Primitive, RedirectTo, RedirectToFn, RemoteEnv, Root, Route, SetTokenResponseToStorageFn, SortableItem, Strict, Tab, TenantLoginInfoDto, TimeZone, TimingDto, UserLoginInfoDto, UserMenuTextTemplate, ValidationFn, WindowsTimeZone, customMergeFn };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elite.framework/ng.core",
3
- "version": "2.0.20",
3
+ "version": "2.0.23",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^20.1.0",
6
6
  "@angular/core": "^20.1.0"
@@ -16,6 +16,14 @@
16
16
  "types": "./index.d.ts",
17
17
  "default": "./fesm2022/elite.framework-ng.core.mjs"
18
18
  },
19
+ "./abstracts": {
20
+ "types": "./abstracts/index.d.ts",
21
+ "default": "./fesm2022/elite.framework-ng.core-abstracts.mjs"
22
+ },
23
+ "./constants": {
24
+ "types": "./constants/index.d.ts",
25
+ "default": "./fesm2022/elite.framework-ng.core-constants.mjs"
26
+ },
19
27
  "./directives": {
20
28
  "types": "./directives/index.d.ts",
21
29
  "default": "./fesm2022/elite.framework-ng.core-directives.mjs"
package/pipes/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
- import { PipeTransform } from '@angular/core';
2
+ import { PipeTransform, InjectionToken, Injector } from '@angular/core';
3
3
  import { DatePipe } from '@angular/common';
4
- import { PermissionsService } from '@elite.framework/ng.core/services';
4
+ import { PermissionCheckerService, LocalizationService } from '@elite.framework/ng.core/services';
5
+ import { LocalizationWithDefault } from '@elite.framework/ng.core/models';
5
6
 
6
7
  declare class TafqeetPipe implements PipeTransform {
7
8
  transform(value: number, currencyName?: string): string;
@@ -20,10 +21,27 @@ declare class TimeAgoWithFullDatePipe implements PipeTransform {
20
21
 
21
22
  declare class PermissionPipe implements PipeTransform {
22
23
  private permissionChecker;
23
- constructor(permissionChecker: PermissionsService);
24
+ constructor(permissionChecker: PermissionCheckerService);
24
25
  transform(permission: string): boolean;
25
26
  static ɵfac: i0.ɵɵFactoryDeclaration<PermissionPipe, never>;
26
27
  static ɵpipe: i0.ɵɵPipeDeclaration<PermissionPipe, "permission", true>;
27
28
  }
28
29
 
29
- export { PermissionPipe, TafqeetPipe, TimeAgoWithFullDatePipe };
30
+ declare const INJECTOR_PIPE_DATA_TOKEN: InjectionToken<PipeTransform>;
31
+ declare class ToInjectorPipe implements PipeTransform {
32
+ private injector;
33
+ constructor(injector: Injector);
34
+ transform(value: any, token?: InjectionToken<any>, name?: string): Injector;
35
+ static ɵfac: i0.ɵɵFactoryDeclaration<ToInjectorPipe, never>;
36
+ static ɵpipe: i0.ɵɵPipeDeclaration<ToInjectorPipe, "toInjector", true>;
37
+ }
38
+
39
+ declare class TranslatePipe implements PipeTransform {
40
+ localization: LocalizationService;
41
+ constructor(injector: Injector);
42
+ transform(value?: string | LocalizationWithDefault, ...interpolateParams: (string | string[] | undefined)[]): string;
43
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslatePipe, never>;
44
+ static ɵpipe: i0.ɵɵPipeDeclaration<TranslatePipe, "translate", true>;
45
+ }
46
+
47
+ export { INJECTOR_PIPE_DATA_TOKEN, PermissionPipe, TafqeetPipe, TimeAgoWithFullDatePipe, ToInjectorPipe, TranslatePipe };
@@ -1,6 +1,21 @@
1
+ import * as _angular_core from '@angular/core';
1
2
  import { Provider } from '@angular/core';
2
- import { EnvironmentConfig } from '@elite.framework/ng.core/tokens';
3
+ import { Root, SortableItem, Child } from '@elite.framework/ng.core/models';
3
4
 
4
- declare function provideEnvironmentConfig(config: EnvironmentConfig): Provider;
5
+ declare enum CoreFeatureKind {
6
+ Options = 0,
7
+ CompareFunctionFactory = 1,
8
+ TitleStrategy = 2
9
+ }
10
+ interface CoreFeature<KindT extends CoreFeatureKind> {
11
+ ɵkind: KindT;
12
+ ɵproviders: Provider[];
13
+ }
14
+ declare function withOptions(options?: Root): CoreFeature<CoreFeatureKind.Options>;
15
+ declare function withTitleStrategy(strategy: unknown): CoreFeature<CoreFeatureKind.TitleStrategy>;
16
+ declare function withCompareFuncFactory(factory: (a: SortableItem, b: SortableItem) => 1 | -1 | 0): CoreFeature<CoreFeatureKind.CompareFunctionFactory>;
17
+ declare function provideFrameworkCore(...features: CoreFeature<CoreFeatureKind>[]): _angular_core.EnvironmentProviders;
18
+ declare function provideAbpCoreChild(options?: Child): _angular_core.EnvironmentProviders;
5
19
 
6
- export { provideEnvironmentConfig };
20
+ export { CoreFeatureKind, provideAbpCoreChild, provideFrameworkCore, withCompareFuncFactory, withOptions, withTitleStrategy };
21
+ export type { CoreFeature };