@osovitny/anatoly 2.0.23 → 2.0.25

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 (49) hide show
  1. package/bundles/osovitny-anatoly.umd.js +795 -213
  2. package/bundles/osovitny-anatoly.umd.js.map +1 -1
  3. package/bundles/osovitny-anatoly.umd.min.js +2 -3
  4. package/bundles/osovitny-anatoly.umd.min.js.map +1 -1
  5. package/esm2015/lib/core/alerts.js +52 -52
  6. package/esm2015/lib/core/consts/index.js +2 -1
  7. package/esm2015/lib/core/consts/urls.js +22 -0
  8. package/esm2015/lib/core/convert.js +31 -0
  9. package/esm2015/lib/core/core.module.js +7 -3
  10. package/esm2015/lib/core/index.js +5 -5
  11. package/esm2015/lib/core/localization/index.js +26 -0
  12. package/esm2015/lib/core/localization/localization.module.js +41 -0
  13. package/esm2015/lib/core/localization/localization.service.js +3 -3
  14. package/esm2015/lib/core/localization/localizationSettings.module.js +70 -0
  15. package/esm2015/lib/core/localization/localize.pipe.js +65 -0
  16. package/esm2015/lib/core/notifications/alerts.js +107 -0
  17. package/esm2015/lib/core/notifications/interfaces/notification.js +19 -0
  18. package/esm2015/lib/core/notifications/services/notification-service.js +230 -0
  19. package/esm2015/lib/core/subs.js +1 -1
  20. package/esm2015/lib/core/utils.js +3 -14
  21. package/esm2015/lib/data/base/base-api.service.js +26 -30
  22. package/esm2015/lib/data/consts.js +24 -0
  23. package/esm2015/lib/data/data.module.js +16 -5
  24. package/esm2015/lib/data/index.js +6 -6
  25. package/esm2015/lib/data/services/billing-api.service.js +4 -5
  26. package/esm2015/lib/ui/ui.module.js +1 -1
  27. package/esm2015/public-api.js +6 -1
  28. package/fesm2015/osovitny-anatoly.js +828 -251
  29. package/fesm2015/osovitny-anatoly.js.map +1 -1
  30. package/lib/core/consts/index.d.ts +1 -0
  31. package/lib/core/consts/urls.d.ts +3 -0
  32. package/lib/core/convert.d.ts +7 -0
  33. package/lib/core/index.d.ts +4 -4
  34. package/lib/core/localization/index.d.ts +4 -0
  35. package/lib/core/localization/localization.module.d.ts +2 -0
  36. package/lib/core/localization/localizationSettings.module.d.ts +10 -0
  37. package/lib/core/localization/localize.pipe.d.ts +7 -0
  38. package/lib/core/notifications/alerts.d.ts +9 -0
  39. package/lib/core/notifications/interfaces/notification.d.ts +10 -0
  40. package/lib/core/notifications/services/notification-service.d.ts +22 -0
  41. package/lib/core/subs.d.ts +1 -1
  42. package/lib/core/utils.d.ts +0 -5
  43. package/lib/data/base/base-api.service.d.ts +2 -3
  44. package/lib/data/consts.d.ts +4 -0
  45. package/lib/data/data.module.d.ts +1 -0
  46. package/lib/data/index.d.ts +5 -5
  47. package/osovitny-anatoly.metadata.json +1 -1
  48. package/package.json +1 -1
  49. package/public-api.d.ts +5 -0
@@ -1,9 +1,9 @@
1
1
  export { ContextInitState, AppCoreSettings } from './consts';
2
2
  export { throwIfAlreadyLoaded } from './guards/once-import.guard';
3
- export * from './alerts';
4
- export * from './utils';
5
- export * from './subs';
6
- export * from './guid';
3
+ export { Alerts } from './alerts';
4
+ export { Utils } from './utils';
5
+ export { Subs } from './subs';
6
+ export { Guid } from './guid';
7
7
  export * from './go/base-go.service';
8
8
  export * from './logging/logging.service';
9
9
  export * from './logging/globalErrorHandler';
@@ -0,0 +1,4 @@
1
+ export { LocalizePipe } from './localize.pipe';
2
+ export * from './localization.service';
3
+ export { LocalizationModule } from './localization.module';
4
+ export { LocalizationSettingsModule } from './localizationSettings.module';
@@ -0,0 +1,2 @@
1
+ export declare class LocalizationModule {
2
+ }
@@ -0,0 +1,10 @@
1
+ import { Injector } from '@angular/core';
2
+ import { HttpClient } from '@angular/common/http';
3
+ import { TranslateModule, TranslateService } from '@ngx-translate/core';
4
+ import { TranslateHttpLoader } from '@ngx-translate/http-loader';
5
+ import { LocalizationService } from './localization.service';
6
+ export declare function customTranslateLoaderFactory(http: HttpClient): TranslateHttpLoader;
7
+ export declare function localizationInitializerFactory(translate: TranslateService, localizationService: LocalizationService, injector: Injector): () => Promise<any>;
8
+ export declare const TranslateModuleAtRoot: import("@angular/core").ModuleWithProviders<TranslateModule>;
9
+ export declare class LocalizationSettingsModule {
10
+ }
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { LocalizationService } from './localization.service';
3
+ export declare class LocalizePipe implements PipeTransform {
4
+ private localizeService;
5
+ constructor(localizeService: LocalizationService);
6
+ transform(inputData: string, type: string, param2: string): string;
7
+ }
@@ -0,0 +1,9 @@
1
+ export declare class Alerts {
2
+ static success(text?: any, params?: any[], title?: any, successAction?: any): void;
3
+ static info(text: any, params?: any[], title?: any): void;
4
+ static warning(text: any, params?: any[], title?: any): void;
5
+ static error(text?: any, params?: any[], title?: any): void;
6
+ static cancel(text?: any, params?: any[], title?: any): void;
7
+ static notImplemented(): void;
8
+ static areYouSure(text: any, title?: any, confirmButtonText?: any, cancelButtonText?: any, successAction?: any, cancelAction?: any): void;
9
+ }
@@ -0,0 +1,10 @@
1
+ export interface INotification {
2
+ id?: string;
3
+ isNew: boolean;
4
+ isSession: boolean;
5
+ text?: string;
6
+ type?: string;
7
+ component?: string;
8
+ operation?: string;
9
+ createdDate?: string;
10
+ }
@@ -0,0 +1,22 @@
1
+ import { ToastrService } from 'ngx-toastr';
2
+ import { INotification } from '../interfaces/notification';
3
+ export declare class NotificationService {
4
+ private toastrService;
5
+ private _sessionNotifications;
6
+ private _serverNotifications;
7
+ readonly sessionNotifications$: import("rxjs").Observable<INotification[]>;
8
+ readonly serverNotifications$: import("rxjs").Observable<INotification[]>;
9
+ constructor(toastrService: ToastrService);
10
+ private addSessionNotification;
11
+ private addSessionNotificationToList;
12
+ removeNotification(id: string, isSession: boolean): void;
13
+ success(text?: any, params?: any[], title?: any, createSessionNotification?: boolean): void;
14
+ info(text: any, params?: any[], title?: any): void;
15
+ warning(text: any, params?: any[], title?: any): void;
16
+ error(text?: any, params?: any[], title?: any, createSessionNotification?: boolean): void;
17
+ cancel(text?: any, params?: any[], title?: any): void;
18
+ get sessionNotifications(): INotification[];
19
+ set sessionNotifications(val: INotification[]);
20
+ get serverNotifications(): INotification[];
21
+ set serverNotifications(val: INotification[]);
22
+ }
@@ -1,4 +1,4 @@
1
- import { Subscription } from "rxjs";
1
+ import { Subscription } from 'rxjs';
2
2
  export declare class Subs {
3
3
  private subs;
4
4
  constructor();
@@ -6,10 +6,5 @@ export declare class Utils {
6
6
  static downloadFile(name: string, url: string): void;
7
7
  static get localizationService(): LocalizationService;
8
8
  static getLocalizedValue(key: string, params?: any[], defaultKey?: string): string;
9
- /**
10
- * Convert date time lo local time zone value.
11
- * @param value
12
- */
13
- static convertToLocalizedDateTime(value: Date): Date;
14
9
  static downloadBlobFile(value: Blob, fileName: string): void;
15
10
  }
@@ -1,5 +1,5 @@
1
- import { HttpClient } from "@angular/common/http";
2
- import { Observable } from "rxjs";
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
3
  export declare class BaseApiService {
4
4
  protected http: HttpClient;
5
5
  protected baseUrl: string;
@@ -12,5 +12,4 @@ export declare class BaseApiService {
12
12
  getById<T>(id: any): Observable<T>;
13
13
  getAll<T>(data?: any): Observable<T[]>;
14
14
  getJsonFile(fileName: string, jsonUrl?: string, jsonVersion?: string): Observable<any[]>;
15
- getNewGuid(): Observable<string>;
16
15
  }
@@ -0,0 +1,4 @@
1
+ export declare const consts: {
2
+ billingApiPath: string;
3
+ notificationsApiPath: string;
4
+ };
@@ -1,2 +1,3 @@
1
1
  export declare class AnatolyDataModule {
2
+ constructor(parentModule: AnatolyDataModule);
2
3
  }
@@ -1,5 +1,5 @@
1
- export * from "./base/base-api.service";
2
- export * from "./base/grid/base-grid-read.service";
3
- export * from "./base/grid/base-grid-edit.service";
4
- export * from "./services/billing-api.service";
5
- export { AnatolyDataModule } from "./data.module";
1
+ export * from './base/base-api.service';
2
+ export * from './base/grid/base-grid-read.service';
3
+ export * from './base/grid/base-grid-edit.service';
4
+ export * from './services/billing-api.service';
5
+ export { AnatolyDataModule } from './data.module';
@@ -1 +1 @@
1
- {"__symbolic":"module","version":4,"exports":[{"from":"./lib/components/billing/buyaccess-button.component"},{"from":"./lib/components/billing/subscribe-plan-button.component"},{"from":"./lib/components/billing/upgrade-plan-button.component"},{"from":"./lib/components/identity/signin-button.component"},{"from":"./lib/components/identity/signout-button.component"},{"from":"./lib/components/identity/signup-button.component"},{"from":"./lib/components/content-header/content-header.component"},{"from":"./lib/components/html-editor/html-editor.component"},{"from":"./lib/components/html-editor/forms-html-editor.component"},{"from":"./lib/validation/validation-summary.component"},{"from":"./lib/validation/form-validation-summary.component"},{"from":"./lib/validation/item-validation-summary.component"},{"from":"./lib/components/base.component"},{"from":"./lib/components/base-edit.component"},{"from":"./lib/directives/native-element.directive"},{"export":[{"name":"ContextInitState","as":"ContextInitState"},{"name":"AppCoreSettings","as":"AppCoreSettings"}],"from":"./lib/consts"},{"export":[{"name":"throwIfAlreadyLoaded","as":"throwIfAlreadyLoaded"}],"from":"./lib/guards/once-import.guard"},{"export":[{"name":"AnatolyCoreModule","as":"AnatolyCoreModule"}],"from":"./lib/core.module"},{"export":[{"name":"AnatolyDataModule","as":"AnatolyDataModule"}],"from":"./lib/data.module"},{"export":[{"name":"AnatolyUIModule","as":"AnatolyUIModule"}],"from":"./lib/ui.module"}],"metadata":{},"origins":{},"importAs":"@osovitny/anatoly"}
1
+ {"__symbolic":"module","version":4,"exports":[{"from":"./lib/core/localization.service"},{"from":"./lib/components/billing/subscribe-plan-button.component"},{"from":"./lib/components/billing/upgrade-plan-button.component"},{"from":"./lib/components/identity/signin-button.component"},{"from":"./lib/components/identity/signout-button.component"},{"from":"./lib/components/identity/signup-button.component"},{"from":"./lib/components/content-header/content-header.component"},{"from":"./lib/components/html-editor/html-editor.component"},{"from":"./lib/components/html-editor/forms-html-editor.component"},{"from":"./lib/validation/validation-summary.component"},{"from":"./lib/validation/form-validation-summary.component"},{"from":"./lib/validation/item-validation-summary.component"},{"from":"./lib/components/base.component"},{"from":"./lib/components/base-edit.component"},{"from":"./lib/directives/native-element.directive"},{"export":[{"name":"ContextInitState","as":"ContextInitState"},{"name":"AppCoreSettings","as":"AppCoreSettings"}],"from":"./lib/consts"},{"export":[{"name":"throwIfAlreadyLoaded","as":"throwIfAlreadyLoaded"}],"from":"./lib/guards/once-import.guard"},{"export":[{"name":"AnatolyCoreModule","as":"AnatolyCoreModule"}],"from":"./lib/core.module"},{"export":[{"name":"AnatolyDataModule","as":"AnatolyDataModule"}],"from":"./lib/data.module"},{"export":[{"name":"AnatolyUIModule","as":"AnatolyUIModule"}],"from":"./lib/ui.module"},{"export":[{"name":"LocalizePipe","as":"LocalizePipe"}],"from":"./lib/core/localize.pipe"},{"export":[{"name":"LocalizationModule","as":"LocalizationModule"}],"from":"./lib/core/localization.module"},{"export":[{"name":"LocalizationSettingsModule","as":"LocalizationSettingsModule"}],"from":"./lib/core/localizationSettings.module"}],"metadata":{"Alerts":{"__symbolic":"class","members":{}},"Utils":{"__symbolic":"class","members":{},"statics":{"getValueByNameInQS":{"__symbolic":"function","parameters":["name"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Utils"},"member":"getValueByName"},"arguments":[{"__symbolic":"select","expression":{"__symbolic":"reference","name":"location"},"member":"search"},{"__symbolic":"reference","name":"name"}]}},"localizationService":{"__symbolic":"error","message":"Variable not initialized","line":62,"character":13}}},"Subs":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor"}],"add":[{"__symbolic":"method"}],"unsubscribe":[{"__symbolic":"method"}]}},"Guid":{"__symbolic":"class","members":{},"statics":{"newGuid":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"uuid","name":"v4","line":23,"character":11}}}}}},"origins":{"Alerts":"./lib/core/notifications/alerts","Utils":"./lib/core/utils","Subs":"./lib/core/subs","Guid":"./lib/core/guid"},"importAs":"@osovitny/anatoly"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osovitny/anatoly",
3
- "version": "2.0.23",
3
+ "version": "2.0.25",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "10.0.0",
6
6
  "@angular/core": "10.0.0"
package/public-api.d.ts CHANGED
@@ -1,3 +1,8 @@
1
1
  export * from "./lib/core";
2
2
  export * from "./lib/data";
3
3
  export * from "./lib/ui";
4
+ export * from './lib/core/localization/';
5
+ export { Alerts } from './lib/core/notifications/alerts';
6
+ export { Guid } from './lib/core/guid';
7
+ export { Subs } from './lib/core/subs';
8
+ export { Utils } from './lib/core/utils';