new-front-common-library 0.0.21 → 0.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.
@@ -12,6 +12,8 @@ import { CommonApiService } from "../../services/api/common-api.service";
12
12
  import { SessionStorageService } from "../../services/storage/session-storage.service";
13
13
  import { PermissionsService } from "../../permissions/permissions.service";
14
14
  import { Config } from "../../config";
15
+ import { LangService } from "../../services/translate-language/lang.service";
16
+ import { ElasticsearchService } from "../../services/elasticsearch/elasticsearch.service";
15
17
  import * as i0 from "@angular/core";
16
18
  export declare class HeaderComponent implements OnInit, PermissionsInterface {
17
19
  private router;
@@ -24,6 +26,8 @@ export declare class HeaderComponent implements OnInit, PermissionsInterface {
24
26
  private permissionsService;
25
27
  private overlayContainer;
26
28
  private cookieService;
29
+ private langService;
30
+ private elasticsearchService;
27
31
  private config;
28
32
  theme: string;
29
33
  user: AuthUserModel;
@@ -36,7 +40,8 @@ export declare class HeaderComponent implements OnInit, PermissionsInterface {
36
40
  env: string;
37
41
  historyList: any[];
38
42
  private readonly apiUrl;
39
- constructor(router: Router, localStorageEvents: LocalStorageEventsService, localStorage: LocalStorageService, toasterService: ToasterEventsService, translate: TranslateService, commonApiService: CommonApiService, sessionStorageService: SessionStorageService, permissionsService: PermissionsService, overlayContainer: OverlayContainer, cookieService: CookieService, config: Config);
43
+ documents: any[];
44
+ constructor(router: Router, localStorageEvents: LocalStorageEventsService, localStorage: LocalStorageService, toasterService: ToasterEventsService, translate: TranslateService, commonApiService: CommonApiService, sessionStorageService: SessionStorageService, permissionsService: PermissionsService, overlayContainer: OverlayContainer, cookieService: CookieService, langService: LangService, elasticsearchService: ElasticsearchService, config: Config);
40
45
  ngOnInit(): void;
41
46
  onWindowScroll(): void;
42
47
  emitToggleMenuEvent(): void;
@@ -48,6 +53,8 @@ export declare class HeaderComponent implements OnInit, PermissionsInterface {
48
53
  stopIdentityTheft(): void;
49
54
  navigate(module: string, route: string): void;
50
55
  getHistory(): void;
56
+ switchLang(lang: any): void;
57
+ rapidSearch(event: any): void;
51
58
  static ɵfac: i0.ɵɵFactoryDeclaration<HeaderComponent, never>;
52
59
  static ɵcmp: i0.ɵɵComponentDeclaration<HeaderComponent, "sc-header", never, {}, { "toogleMenuEvent": "toogleMenuEvent"; }, never, never>;
53
60
  }
@@ -31,4 +31,9 @@ export declare const de: {
31
31
  'COMMON.HEADER.CREATION.CREATION_CESS': string;
32
32
  'COMMON.HEADER.CONNECTED_AS': string;
33
33
  'COMMON.HEADER.STOP': string;
34
+ 'COMMON.HEADER.PARAMETERS.THEME': string;
35
+ 'COMMON.HEADER.PARAMETERS.TITLE.LANGUAGES': string;
36
+ 'COMMON.HEADER.PARAMETERS.TITLE.LANGUAGES.FRENCH': string;
37
+ 'COMMON.HEADER.PARAMETERS.TITLE.LANGUAGES.ENGLISH': string;
38
+ 'COMMON.HEADER.PARAMETERS.TITLE.LANGUAGES.DEUTCH': string;
34
39
  };
@@ -31,4 +31,9 @@ export declare const en: {
31
31
  'COMMON.HEADER.CREATION.CREATION_CESS': string;
32
32
  'COMMON.HEADER.CONNECTED_AS': string;
33
33
  'COMMON.HEADER.STOP': string;
34
+ 'COMMON.HEADER.PARAMETERS.THEME': string;
35
+ 'COMMON.HEADER.PARAMETERS.TITLE.LANGUAGES': string;
36
+ 'COMMON.HEADER.PARAMETERS.TITLE.LANGUAGES.FRENCH': string;
37
+ 'COMMON.HEADER.PARAMETERS.TITLE.LANGUAGES.ENGLISH': string;
38
+ 'COMMON.HEADER.PARAMETERS.TITLE.LANGUAGES.DEUTCH': string;
34
39
  };
@@ -31,4 +31,9 @@ export declare const fr: {
31
31
  'COMMON.HEADER.CREATION.CREATION_CESS': string;
32
32
  'COMMON.HEADER.CONNECTED_AS': string;
33
33
  'COMMON.HEADER.STOP': string;
34
+ 'COMMON.HEADER.PARAMETERS.THEME': string;
35
+ 'COMMON.HEADER.PARAMETERS.TITLE.LANGUAGES': string;
36
+ 'COMMON.HEADER.PARAMETERS.TITLE.LANGUAGES.FRENCH': string;
37
+ 'COMMON.HEADER.PARAMETERS.TITLE.LANGUAGES.ENGLISH': string;
38
+ 'COMMON.HEADER.PARAMETERS.TITLE.LANGUAGES.DEUTCH': string;
34
39
  };
@@ -0,0 +1,18 @@
1
+ import { TranslateService } from '@ngx-translate/core';
2
+ import { HttpClient } from '@angular/common/http';
3
+ import { Observable } from 'rxjs';
4
+ import { SearchResponse } from 'elasticsearch';
5
+ import * as i0 from "@angular/core";
6
+ export declare class ElasticsearchService {
7
+ private translateService;
8
+ private http;
9
+ private elasticAPI;
10
+ private client;
11
+ constructor(translateService: TranslateService, http: HttpClient);
12
+ private getElasticsearchClient;
13
+ getDocuments<T>(text: string, documentIndex?: string | Array<string>): Observable<SearchResponse<T>>;
14
+ getDocumentsContent<T>(searchResponse: SearchResponse<T>): Array<T>;
15
+ rapidSearch(text: string): Observable<any[]>;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<ElasticsearchService, never>;
17
+ static ɵprov: i0.ɵɵInjectableDeclaration<ElasticsearchService>;
18
+ }
@@ -0,0 +1,14 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { TranslateService } from '@ngx-translate/core';
3
+ import { LocalStorageService } from "../storage/local-storage.service";
4
+ import * as i0 from "@angular/core";
5
+ export declare class LangService {
6
+ private translate;
7
+ private localStorage;
8
+ switchLangEmitter: EventEmitter<any>;
9
+ constructor(translate: TranslateService, localStorage: LocalStorageService);
10
+ translateLanguage(): void;
11
+ switchLang(): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<LangService, never>;
13
+ static ɵprov: i0.ɵɵInjectableDeclaration<LangService>;
14
+ }
@@ -1,7 +1,6 @@
1
1
  import { Config } from './config';
2
2
  import { ModuleWithProviders } from '@angular/core';
3
- import { TranslateService } from '@ngx-translate/core';
4
- import { LocalStorageService } from './services/storage/local-storage.service';
3
+ import { LangService } from "./services/translate-language/lang.service";
5
4
  import * as i0 from "@angular/core";
6
5
  import * as i1 from "./directives/my-number-formatter-directive";
7
6
  import * as i2 from "./pipes/capitalizefirst.pipe";
@@ -36,13 +35,13 @@ import * as i30 from "@angular/material/icon";
36
35
  import * as i31 from "@angular/material/menu";
37
36
  import * as i32 from "@angular/material/divider";
38
37
  import * as i33 from "@angular/flex-layout";
38
+ import * as i34 from "@angular/material/autocomplete";
39
39
  export declare class UtilModule {
40
- private translate;
41
- private localStorage;
40
+ private langService;
42
41
  static forRoot(config?: Config): ModuleWithProviders<UtilModule>;
43
42
  static forChild(config?: Config): ModuleWithProviders<UtilModule>;
44
- constructor(translate: TranslateService, localStorage: LocalStorageService);
43
+ constructor(langService: LangService);
45
44
  static ɵfac: i0.ɵɵFactoryDeclaration<UtilModule, never>;
46
- static ɵmod: i0.ɵɵNgModuleDeclaration<UtilModule, [typeof i1.MyNumberFormatterDirective, typeof i2.CapitalizefirstPipe, typeof i3.SpacesNumberPipe, typeof i4.SanitizeHtml, typeof i5.DisplayNullPipe, typeof i6.FormatNumberInput, typeof i7.LocalDatePipe, typeof i8.MyNumberPipe, typeof i9.TrimStringPipe, typeof i10.CommonTranslatePipe, typeof i11.MyDialogPopupLoginComponent, typeof i12.OverlayComponent, typeof i13.HeaderComponent, typeof i14.SubHeaderComponent], [typeof i15.MatInputModule, typeof i16.MatSelectModule, typeof i17.MatTableModule, typeof i18.MatTooltipModule, typeof i19.MatButtonModule, typeof i20.MatToolbarModule, typeof i21.MatFormFieldModule, typeof i22.CommonModule, typeof i23.TranslateModule, typeof i24.MatCardModule, typeof i25.MatDialogModule, typeof i26.NgxPermissionsModule, typeof i27.MatProgressSpinnerModule, typeof i28.RouterModule, typeof i29.ReactiveFormsModule, typeof i19.MatButtonModule, typeof i29.FormsModule, typeof i30.MatIconModule, typeof i31.MatMenuModule, typeof i20.MatToolbarModule, typeof i32.MatDividerModule, typeof i33.FlexLayoutModule], [typeof i1.MyNumberFormatterDirective, typeof i2.CapitalizefirstPipe, typeof i3.SpacesNumberPipe, typeof i4.SanitizeHtml, typeof i5.DisplayNullPipe, typeof i6.FormatNumberInput, typeof i7.LocalDatePipe, typeof i8.MyNumberPipe, typeof i9.TrimStringPipe, typeof i13.HeaderComponent, typeof i12.OverlayComponent, typeof i14.SubHeaderComponent]>;
45
+ static ɵmod: i0.ɵɵNgModuleDeclaration<UtilModule, [typeof i1.MyNumberFormatterDirective, typeof i2.CapitalizefirstPipe, typeof i3.SpacesNumberPipe, typeof i4.SanitizeHtml, typeof i5.DisplayNullPipe, typeof i6.FormatNumberInput, typeof i7.LocalDatePipe, typeof i8.MyNumberPipe, typeof i9.TrimStringPipe, typeof i10.CommonTranslatePipe, typeof i11.MyDialogPopupLoginComponent, typeof i12.OverlayComponent, typeof i13.HeaderComponent, typeof i14.SubHeaderComponent], [typeof i15.MatInputModule, typeof i16.MatSelectModule, typeof i17.MatTableModule, typeof i18.MatTooltipModule, typeof i19.MatButtonModule, typeof i20.MatToolbarModule, typeof i21.MatFormFieldModule, typeof i22.CommonModule, typeof i23.TranslateModule, typeof i24.MatCardModule, typeof i25.MatDialogModule, typeof i26.NgxPermissionsModule, typeof i27.MatProgressSpinnerModule, typeof i28.RouterModule, typeof i29.ReactiveFormsModule, typeof i19.MatButtonModule, typeof i29.FormsModule, typeof i30.MatIconModule, typeof i31.MatMenuModule, typeof i20.MatToolbarModule, typeof i32.MatDividerModule, typeof i33.FlexLayoutModule, typeof i34.MatAutocompleteModule], [typeof i1.MyNumberFormatterDirective, typeof i2.CapitalizefirstPipe, typeof i3.SpacesNumberPipe, typeof i4.SanitizeHtml, typeof i5.DisplayNullPipe, typeof i6.FormatNumberInput, typeof i7.LocalDatePipe, typeof i8.MyNumberPipe, typeof i9.TrimStringPipe, typeof i13.HeaderComponent, typeof i12.OverlayComponent, typeof i14.SubHeaderComponent]>;
47
46
  static ɵinj: i0.ɵɵInjectorDeclaration<UtilModule>;
48
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "new-front-common-library",
3
- "version": "0.0.21",
3
+ "version": "0.0.25",
4
4
  "Dependencies": {
5
5
  "@angular/common": "^12.2.0",
6
6
  "@angular/core": "^12.2.0",
@@ -15,7 +15,8 @@
15
15
  "codelyzer": "^6.0.2",
16
16
  "crypto-js": "^4.1.1",
17
17
  "ngx-cookie-service": "^12.0.3",
18
- "ngx-permissions": "^8.1.1"
18
+ "ngx-permissions": "^8.1.1",
19
+ "@types/elasticsearch": "5.0.40"
19
20
  },
20
21
  "main": "bundles/new-front-common-library.umd.js",
21
22
  "module": "fesm2015/new-front-common-library.js",
package/public-api.d.ts CHANGED
@@ -29,6 +29,7 @@ export * from './lib/util/services/guard/login.guard';
29
29
  export * from './lib/util/services/form-action/form-actions-events.service';
30
30
  export * from './lib/util/services/api/common-api.service';
31
31
  export * from './lib/util/services/history/history.service';
32
+ export * from './lib/util/services/translate-language/lang.service';
32
33
  export * from './lib/util/date/PeriodModel';
33
34
  export * from './lib/util/pipes/capitalizefirst.pipe';
34
35
  export * from './lib/util/services/interceptor/auth.interceptor';