x-tql-service 1.19.4
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/README.md +24 -0
- package/fesm2022/x-tql-service.mjs +2232 -0
- package/fesm2022/x-tql-service.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/constants/error-status.enum.d.ts +5 -0
- package/lib/constants/index.d.ts +5 -0
- package/lib/constants/key.constant.d.ts +12 -0
- package/lib/constants/language.constant.d.ts +14 -0
- package/lib/constants/map.constant.d.ts +25 -0
- package/lib/constants/mics.constant.d.ts +9 -0
- package/lib/controllers/dialog/tql-dialog-controller.service.d.ts +28 -0
- package/lib/controllers/index.d.ts +5 -0
- package/lib/controllers/route/tql-route-controller.service.d.ts +6 -0
- package/lib/controllers/site-map/tql-site-map-controller.service.d.ts +23 -0
- package/lib/controllers/table/tql-table-controller.service.d.ts +11 -0
- package/lib/controllers/toast/tql-toast-controller.service.d.ts +19 -0
- package/lib/interceptor/index.d.ts +1 -0
- package/lib/interceptor/tql-api.interceptor.d.ts +17 -0
- package/lib/models/default/default-component.d.ts +55 -0
- package/lib/models/default/default-dialog-component.d.ts +35 -0
- package/lib/models/default/default-directive.d.ts +7 -0
- package/lib/models/default/default-map-component.d.ts +19 -0
- package/lib/models/default/default-model.d.ts +68 -0
- package/lib/models/default/default-model.interface.d.ts +5 -0
- package/lib/models/default/dynamic-model.d.ts +11 -0
- package/lib/models/index.d.ts +9 -0
- package/lib/models/payload.model.d.ts +33 -0
- package/lib/models/ws-payload.model.d.ts +13 -0
- package/lib/services/api/tql-api-lib.service.d.ts +81 -0
- package/lib/services/config/tql-global-config.service.d.ts +9 -0
- package/lib/services/error-handler/tql-error-handler.service.d.ts +69 -0
- package/lib/services/index.d.ts +7 -0
- package/lib/services/log/tql-logger.service.d.ts +23 -0
- package/lib/services/translate/tql-translate.service.d.ts +64 -0
- package/lib/services/utils/tql-utils.service.d.ts +138 -0
- package/lib/services/ws/tql-ws.service.d.ts +123 -0
- package/lib/tql-service.module.d.ts +8 -0
- package/package.json +23 -0
- package/public-api.d.ts +6 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Injector } from '@angular/core';
|
|
2
|
+
import { DefaultComponent } from './default-component';
|
|
3
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class DefaultDialogComponent extends DefaultComponent {
|
|
6
|
+
dialogRef: MatDialogRef<any>;
|
|
7
|
+
_Injector?: Injector | undefined;
|
|
8
|
+
static DEFAULT_WIDTH: any;
|
|
9
|
+
static DEFAULT_HEIGHT: any;
|
|
10
|
+
constructor(dialogRef: MatDialogRef<any>, _Injector?: Injector | undefined, ...args: unknown[]);
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @param arg
|
|
14
|
+
*/
|
|
15
|
+
onCancel(arg?: any): void;
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @private
|
|
19
|
+
*/
|
|
20
|
+
onClose(): void;
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @private
|
|
24
|
+
* @param arg
|
|
25
|
+
*/
|
|
26
|
+
onOk(arg?: any): void;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DefaultDialogComponent, never>;
|
|
28
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DefaultDialogComponent, never, never, {}, {}, never, never, true, never>;
|
|
29
|
+
}
|
|
30
|
+
export declare namespace DefaultDialogComponent {
|
|
31
|
+
enum State {
|
|
32
|
+
OPENING = 0,
|
|
33
|
+
CLOSED = 1
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DefaultComponent } from './default-component';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class DefaultDirective extends DefaultComponent {
|
|
4
|
+
constructor();
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DefaultDirective, never>;
|
|
6
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DefaultDirective, never, never, {}, {}, never, never, true, never>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DefaultComponent } from './default-component';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class DefaultMapComponent extends DefaultComponent {
|
|
4
|
+
DEFAULT_ZOOM: number;
|
|
5
|
+
styles: any;
|
|
6
|
+
center: any;
|
|
7
|
+
zoom: any;
|
|
8
|
+
bounds: any;
|
|
9
|
+
google: any;
|
|
10
|
+
constructor();
|
|
11
|
+
/**
|
|
12
|
+
* reset map
|
|
13
|
+
*/
|
|
14
|
+
resetMapBounds(): void;
|
|
15
|
+
setMapBounds(map: any, points?: any[], minZoom?: number | null): void;
|
|
16
|
+
getCenterOfArray(points?: any[]): any;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DefaultMapComponent, never>;
|
|
18
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DefaultMapComponent, never, never, {}, {}, never, never, true, never>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { IDefaultModel } from './default-model.interface';
|
|
2
|
+
export declare class DefaultModel implements IDefaultModel {
|
|
3
|
+
/**
|
|
4
|
+
* all keys are in lowercase
|
|
5
|
+
* @type {{}}
|
|
6
|
+
* @private
|
|
7
|
+
*/
|
|
8
|
+
_data: any;
|
|
9
|
+
/**
|
|
10
|
+
* all keys are raw
|
|
11
|
+
* @type {{}}
|
|
12
|
+
* @private
|
|
13
|
+
*/
|
|
14
|
+
_raw: any;
|
|
15
|
+
_idKey: string;
|
|
16
|
+
_id: any;
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @param _data
|
|
20
|
+
* @param idKey
|
|
21
|
+
* @param isAutoAssign
|
|
22
|
+
*/
|
|
23
|
+
constructor(_data?: any, idKey?: string, isAutoAssign?: boolean, isAssignRawData?: boolean);
|
|
24
|
+
/**
|
|
25
|
+
* get value of id
|
|
26
|
+
* @return {any}
|
|
27
|
+
*/
|
|
28
|
+
getId(): string | number | null;
|
|
29
|
+
setId(id: string | number | null): void;
|
|
30
|
+
/**
|
|
31
|
+
* delete object property
|
|
32
|
+
* @param key: string
|
|
33
|
+
*/
|
|
34
|
+
deleteProperty(key: string): void;
|
|
35
|
+
/**
|
|
36
|
+
* get key of id
|
|
37
|
+
* @returns {string}
|
|
38
|
+
*/
|
|
39
|
+
getIdKey(): string;
|
|
40
|
+
/**
|
|
41
|
+
* get value of _data by key
|
|
42
|
+
* @param key: string
|
|
43
|
+
* @returns {any}
|
|
44
|
+
*/
|
|
45
|
+
getValue(key: string): any;
|
|
46
|
+
/**
|
|
47
|
+
* set value of _data by key & value of this object's attribute if existed
|
|
48
|
+
* @param key: string
|
|
49
|
+
* @param value: string
|
|
50
|
+
* @returns {any}
|
|
51
|
+
*/
|
|
52
|
+
setValue(key: string, value: any): any;
|
|
53
|
+
/**
|
|
54
|
+
* get raw value of _data by key
|
|
55
|
+
* @param key: string
|
|
56
|
+
* @returns {any}
|
|
57
|
+
*/
|
|
58
|
+
getRawValue(key: string): any;
|
|
59
|
+
/**
|
|
60
|
+
* set value of _data by key
|
|
61
|
+
* @param key: string
|
|
62
|
+
* @param value: string
|
|
63
|
+
* @returns {any}
|
|
64
|
+
*/
|
|
65
|
+
setRawValue(key: string, value: any): any;
|
|
66
|
+
static describe(instance: any): Array<string>;
|
|
67
|
+
}
|
|
68
|
+
export declare namespace DefaultModel { }
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Type } from '@angular/core';
|
|
2
|
+
export interface IDynamicComponentModel {
|
|
3
|
+
data?: any;
|
|
4
|
+
reset?(): void;
|
|
5
|
+
onDataChange?(): void;
|
|
6
|
+
}
|
|
7
|
+
export declare class DynamicDataModel {
|
|
8
|
+
component: Type<IDynamicComponentModel>;
|
|
9
|
+
data: any;
|
|
10
|
+
constructor(component: Type<IDynamicComponentModel>, data?: any);
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './default/default-model.interface';
|
|
2
|
+
export * from './default/default-model';
|
|
3
|
+
export * from './default/default-component';
|
|
4
|
+
export * from './default/default-directive';
|
|
5
|
+
export * from './default/default-dialog-component';
|
|
6
|
+
export * from './default/dynamic-model';
|
|
7
|
+
export * from './default/default-map-component';
|
|
8
|
+
export * from './payload.model';
|
|
9
|
+
export * from './ws-payload.model';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { IDefaultModelConstructor } from './default/default-model.interface';
|
|
2
|
+
export declare class PayloadModel {
|
|
3
|
+
query: string;
|
|
4
|
+
objectName: string | undefined;
|
|
5
|
+
objectPath: string | undefined;
|
|
6
|
+
objectClass: IDefaultModelConstructor | undefined;
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param query
|
|
10
|
+
* @param objectName
|
|
11
|
+
* @param objectClass
|
|
12
|
+
* @param objectPath
|
|
13
|
+
*/
|
|
14
|
+
constructor(query: string, objectName?: string, objectPath?: string, objectClass?: IDefaultModelConstructor);
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @param params
|
|
18
|
+
* @returns {string}
|
|
19
|
+
*/
|
|
20
|
+
buildPayload(params?: any[]): string;
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @param dataObject
|
|
24
|
+
* @returns {string}
|
|
25
|
+
*/
|
|
26
|
+
buildPayloadWithObject(dataObject: any): string;
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @param array
|
|
30
|
+
* @returns {any[]}
|
|
31
|
+
*/
|
|
32
|
+
parse(array?: never[]): any[];
|
|
33
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare class WSPayloadModel {
|
|
2
|
+
id: string;
|
|
3
|
+
query: string;
|
|
4
|
+
$promise: Promise<any>;
|
|
5
|
+
promiseResolve: Function;
|
|
6
|
+
constructor(query: string, params?: string[], id?: string);
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param data
|
|
10
|
+
* @returns {boolean}
|
|
11
|
+
*/
|
|
12
|
+
resolve(data: any): boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { PayloadModel } from '../../models';
|
|
3
|
+
import { TqlErrorHandlerService } from '../error-handler/tql-error-handler.service';
|
|
4
|
+
import { TqlLoggerService } from '../log/tql-logger.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class TqlApiLibService extends TqlLoggerService {
|
|
7
|
+
private _HttpClient;
|
|
8
|
+
private _TqlErrorHandlerService;
|
|
9
|
+
private _default_url;
|
|
10
|
+
constructor(_HttpClient: HttpClient, _TqlErrorHandlerService: TqlErrorHandlerService);
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @param url
|
|
14
|
+
*/
|
|
15
|
+
initialize(url: string): void;
|
|
16
|
+
/**
|
|
17
|
+
* reset all subscription
|
|
18
|
+
*/
|
|
19
|
+
reset(): void;
|
|
20
|
+
/**
|
|
21
|
+
* get url
|
|
22
|
+
* @returns string
|
|
23
|
+
*/
|
|
24
|
+
getUrl(): string;
|
|
25
|
+
/**
|
|
26
|
+
* Execute payload
|
|
27
|
+
* @param payload: Payload
|
|
28
|
+
* @param headers: Headers of query
|
|
29
|
+
* @param url: URL custom (optional)
|
|
30
|
+
* @returns {Promise<T | string>}
|
|
31
|
+
* @param params
|
|
32
|
+
* @param contentType
|
|
33
|
+
*/
|
|
34
|
+
execute(payload: PayloadModel, params?: any[], headers?: any, url?: string, contentType?: string): Promise<any>;
|
|
35
|
+
/**
|
|
36
|
+
* Execute http client
|
|
37
|
+
* @param payload: Payload
|
|
38
|
+
* @param headers: Headers of query
|
|
39
|
+
* @param url: URL custom (optional)
|
|
40
|
+
* @param params
|
|
41
|
+
* @param contentType
|
|
42
|
+
* @returns {Observable<T | string>}
|
|
43
|
+
*/
|
|
44
|
+
executeHttpClient(payload: PayloadModel, params?: any[], headers?: any, url?: string, contentType?: string): import("rxjs").Observable<any>;
|
|
45
|
+
get(url: string, contentType?: string, headers?: any): Promise<string | undefined>;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @param payload
|
|
49
|
+
* @param params
|
|
50
|
+
* @param headers
|
|
51
|
+
* @param url
|
|
52
|
+
* @param contentType
|
|
53
|
+
* @return {Promise<{data: any[], raw: {}} | {data: any[], raw: {}}>}
|
|
54
|
+
*/
|
|
55
|
+
findRaw(payload: PayloadModel, params?: any, headers?: {}, url?: string, contentType?: string): Promise<{
|
|
56
|
+
data: any[];
|
|
57
|
+
raw: {};
|
|
58
|
+
}>;
|
|
59
|
+
/**
|
|
60
|
+
* find management and convert to management model
|
|
61
|
+
* @param payload: Payload
|
|
62
|
+
* @param params: any
|
|
63
|
+
* @param headers: any
|
|
64
|
+
* @param url: string
|
|
65
|
+
* @param contentType
|
|
66
|
+
* @return {Promise<any[]>}
|
|
67
|
+
*/
|
|
68
|
+
find(payload: PayloadModel, params?: any, headers?: {}, url?: string, contentType?: string): Promise<any[]>;
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
* @param payload
|
|
72
|
+
* @param params
|
|
73
|
+
* @param headers
|
|
74
|
+
* @param url
|
|
75
|
+
* @param contentType
|
|
76
|
+
* @returns {Promise<{}>}
|
|
77
|
+
*/
|
|
78
|
+
post(payload: PayloadModel, params?: any, headers?: {}, url?: string, contentType?: string): Promise<{}>;
|
|
79
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TqlApiLibService, never>;
|
|
80
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TqlApiLibService>;
|
|
81
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class TqlGlobalConfigService {
|
|
3
|
+
private externalConfig;
|
|
4
|
+
private config;
|
|
5
|
+
constructor(externalConfig: any);
|
|
6
|
+
getConfig(): any;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TqlGlobalConfigService, [{ optional: true; }]>;
|
|
8
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TqlGlobalConfigService>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Injector } from '@angular/core';
|
|
2
|
+
import { TqlToastControllerService } from '../../controllers';
|
|
3
|
+
import { HttpErrorResponse } from '@angular/common/http';
|
|
4
|
+
import { TqlLoggerService } from '../log/tql-logger.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class TqlErrorHandlerService extends TqlLoggerService {
|
|
7
|
+
_TqlToastControllerService: TqlToastControllerService;
|
|
8
|
+
constructor(_Injector?: Injector);
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* @param error
|
|
12
|
+
* @returns {EErrorStatus.FORBIDDEN | null}
|
|
13
|
+
*/
|
|
14
|
+
handleHttpError(error: HttpErrorResponse): any;
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @param response
|
|
18
|
+
* @returns {boolean}
|
|
19
|
+
*/
|
|
20
|
+
handleSimpleResponse(response: any): boolean;
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @param response
|
|
24
|
+
* @returns {boolean}
|
|
25
|
+
*/
|
|
26
|
+
handleAPIResponseMessage(response: any): boolean;
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @param response
|
|
30
|
+
* @returns {boolean}
|
|
31
|
+
*/
|
|
32
|
+
handleCreate(response: any): boolean;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @param response
|
|
36
|
+
* @returns {boolean}
|
|
37
|
+
*/
|
|
38
|
+
handleUpdate(response: any): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* show message base on status
|
|
41
|
+
* @param event
|
|
42
|
+
* @return {boolean}
|
|
43
|
+
*/
|
|
44
|
+
handleStatusMessage(event: TqlErrorHandlerService.IStatusMessage): boolean;
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @param message
|
|
48
|
+
*/
|
|
49
|
+
_showSuccessMessage(message: any): void;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @param message
|
|
53
|
+
*/
|
|
54
|
+
_showErrorMessage(message?: string): void;
|
|
55
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TqlErrorHandlerService, never>;
|
|
56
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TqlErrorHandlerService>;
|
|
57
|
+
}
|
|
58
|
+
export declare namespace TqlErrorHandlerService {
|
|
59
|
+
enum EErrorStatus {
|
|
60
|
+
FORBIDDEN = 0,
|
|
61
|
+
SUCCESS = "Success",
|
|
62
|
+
ERROR = "Error"
|
|
63
|
+
}
|
|
64
|
+
interface IStatusMessage {
|
|
65
|
+
status: boolean;
|
|
66
|
+
message: string;
|
|
67
|
+
data?: any;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './utils/tql-utils.service';
|
|
2
|
+
export * from './error-handler/tql-error-handler.service';
|
|
3
|
+
export * from './log/tql-logger.service';
|
|
4
|
+
export * from './api/tql-api-lib.service';
|
|
5
|
+
export * from './ws/tql-ws.service';
|
|
6
|
+
export * from './translate/tql-translate.service';
|
|
7
|
+
export * from './config/tql-global-config.service';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BehaviorSubject } from 'rxjs';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class TqlLoggerService {
|
|
4
|
+
log$: BehaviorSubject<string>;
|
|
5
|
+
constructor();
|
|
6
|
+
/**
|
|
7
|
+
* log result
|
|
8
|
+
* @param data: any
|
|
9
|
+
*/
|
|
10
|
+
_logResult(...data: any): void;
|
|
11
|
+
/**
|
|
12
|
+
* log error
|
|
13
|
+
* @param error: any
|
|
14
|
+
*/
|
|
15
|
+
_logError(...error: any): void;
|
|
16
|
+
/**
|
|
17
|
+
* log message
|
|
18
|
+
* @param message
|
|
19
|
+
*/
|
|
20
|
+
log(message: any): void;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TqlLoggerService, never>;
|
|
22
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TqlLoggerService>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Injector } from '@angular/core';
|
|
3
|
+
import { MissingTranslationHandler, MissingTranslationHandlerParams, TranslateLoader } from '@ngx-translate/core';
|
|
4
|
+
import { BehaviorSubject, Observable, Subject } from 'rxjs';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class TqlTranslateService {
|
|
7
|
+
private http;
|
|
8
|
+
private injector;
|
|
9
|
+
constructor(http: HttpClient, injector: Injector);
|
|
10
|
+
translationDataLoaded$: BehaviorSubject<any>;
|
|
11
|
+
translationData: {
|
|
12
|
+
key: string;
|
|
13
|
+
data: any;
|
|
14
|
+
}[];
|
|
15
|
+
loaded$(): Subject<any>;
|
|
16
|
+
getDataTranslate(keyLang: string): Observable<any>;
|
|
17
|
+
translateGG(text: string): Observable<string>;
|
|
18
|
+
saveTextTranslate(rs: string, text: string): void;
|
|
19
|
+
static getDataLocalStorage(): any;
|
|
20
|
+
getLanguage(): string;
|
|
21
|
+
static getLanguage(): string;
|
|
22
|
+
static getJsonLocalStorage(keyLang?: string): any;
|
|
23
|
+
static updateKeyLanguage(keyLang: string): void;
|
|
24
|
+
static updateJsonDataLocalStorage(dataTranslate: any): void;
|
|
25
|
+
instant(data: string): Promise<any>;
|
|
26
|
+
static getTranslateHighCharts(type: string): any;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TqlTranslateService, never>;
|
|
28
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TqlTranslateService>;
|
|
29
|
+
}
|
|
30
|
+
export declare namespace TqlTranslateService {
|
|
31
|
+
class MyMissingTranslationHandler implements MissingTranslationHandler {
|
|
32
|
+
private _TqlTranslateService;
|
|
33
|
+
constructor(_TqlTranslateService: TqlTranslateService);
|
|
34
|
+
handle(params: MissingTranslationHandlerParams): any;
|
|
35
|
+
}
|
|
36
|
+
function HandleMyMissing(_TqlTranslateService: TqlTranslateService): MyMissingTranslationHandler;
|
|
37
|
+
function HttpLoaderFactory(_TqlTranslateService: TqlTranslateService): MultiTranslateHttpLoader;
|
|
38
|
+
class MultiTranslateHttpLoader implements TranslateLoader {
|
|
39
|
+
private _TqlTranslateService;
|
|
40
|
+
constructor(_TqlTranslateService: TqlTranslateService);
|
|
41
|
+
getTranslation(): Observable<any>;
|
|
42
|
+
}
|
|
43
|
+
function initializeTranslations(_TqlTranslateService: TqlTranslateService): () => Promise<any>;
|
|
44
|
+
const languageHighChart: {
|
|
45
|
+
lang: {
|
|
46
|
+
thousandsSep: string;
|
|
47
|
+
shortMonths: any;
|
|
48
|
+
months: any;
|
|
49
|
+
weekdays: any;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export declare class GoogleObj {
|
|
54
|
+
q: string;
|
|
55
|
+
readonly source: string;
|
|
56
|
+
target: string;
|
|
57
|
+
readonly format: string;
|
|
58
|
+
constructor(q: string);
|
|
59
|
+
}
|
|
60
|
+
export interface ITranslateDataLocalStorage {
|
|
61
|
+
key: string;
|
|
62
|
+
'en-US': any;
|
|
63
|
+
'pt-BR': any;
|
|
64
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { DatePipe } from '@angular/common';
|
|
2
|
+
import { ActivatedRouteSnapshot } from '@angular/router';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class TqlUtilsService {
|
|
5
|
+
static _DatePipe: DatePipe;
|
|
6
|
+
constructor();
|
|
7
|
+
/**
|
|
8
|
+
* replace all {find} inside {str} by {replace}
|
|
9
|
+
* @param text: string
|
|
10
|
+
* @param find: string
|
|
11
|
+
* @param replace: string
|
|
12
|
+
* @returns any
|
|
13
|
+
*/
|
|
14
|
+
static replaceAll(text: any, find: any, replace: any): string;
|
|
15
|
+
/**
|
|
16
|
+
* replace all with params
|
|
17
|
+
* param format: {number}
|
|
18
|
+
* @param text
|
|
19
|
+
* @param params
|
|
20
|
+
* @returns {string}
|
|
21
|
+
*/
|
|
22
|
+
static replaceWithParams(text: string, params: string[]): string;
|
|
23
|
+
/**
|
|
24
|
+
* check if is array, if is not, return [value]
|
|
25
|
+
* @param value: string
|
|
26
|
+
* @returns any
|
|
27
|
+
*/
|
|
28
|
+
static toArray(value: any): any[];
|
|
29
|
+
/**
|
|
30
|
+
* parse string to object
|
|
31
|
+
* @param xmlString: string
|
|
32
|
+
* @param callback: function
|
|
33
|
+
* @returns Promise<any>
|
|
34
|
+
*/
|
|
35
|
+
static parseXml(xmlString: any, callback?: (rs: any) => void): Promise<any>;
|
|
36
|
+
/**
|
|
37
|
+
* Clean management response
|
|
38
|
+
* @param data: management response
|
|
39
|
+
* @returns any
|
|
40
|
+
*/
|
|
41
|
+
static transferData(data: any): any;
|
|
42
|
+
/**
|
|
43
|
+
* Check and convert management
|
|
44
|
+
* @param data: Data response
|
|
45
|
+
* @param modelType: Model type
|
|
46
|
+
* @param key: If model type of management response other than model type (optional)
|
|
47
|
+
* @returns Model[]
|
|
48
|
+
*/
|
|
49
|
+
static convertData(data: any, modelType: any, key?: null): any[];
|
|
50
|
+
/**
|
|
51
|
+
* Convert management to Model Type
|
|
52
|
+
* ! { Model.name } is undefined in run build
|
|
53
|
+
* @param data: Data response
|
|
54
|
+
* @param modelType: Model type
|
|
55
|
+
* @param key: If model type of management response other than model type (optional)
|
|
56
|
+
* @returns Model[]
|
|
57
|
+
*/
|
|
58
|
+
static convert(data: any, modelType: any, key: any): any[];
|
|
59
|
+
static jsonToModel(data: any, modelType: any): any[];
|
|
60
|
+
static signData(data: any, model: any, keyRepresent: any, key: any): any;
|
|
61
|
+
/**
|
|
62
|
+
* Return true if response is successful
|
|
63
|
+
* @param data: management
|
|
64
|
+
* @param path: string
|
|
65
|
+
* @returns ({message: undefined, status: boolean} | boolean | {message: undefined, status: boolean})
|
|
66
|
+
*/
|
|
67
|
+
static isSuccess(data: any, path?: string): boolean | any;
|
|
68
|
+
/**
|
|
69
|
+
* Return true if response is failed
|
|
70
|
+
* @param data: management
|
|
71
|
+
* @returns boolean
|
|
72
|
+
*/
|
|
73
|
+
static isError(data: any): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* check if management is empty
|
|
76
|
+
* @param data: string
|
|
77
|
+
* @returns boolean
|
|
78
|
+
*/
|
|
79
|
+
static isEmpty(data: any): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* get file extension
|
|
82
|
+
* @param fileName: string
|
|
83
|
+
* @returns any
|
|
84
|
+
*/
|
|
85
|
+
static getFileExtension(fileName: string): string | undefined;
|
|
86
|
+
/**
|
|
87
|
+
* set string to clipboard
|
|
88
|
+
* @param str: string
|
|
89
|
+
*/
|
|
90
|
+
static copyStringToClipboard(str: any): void;
|
|
91
|
+
/**
|
|
92
|
+
* get enum key by its value
|
|
93
|
+
* @param myEnum
|
|
94
|
+
* @param enumValue
|
|
95
|
+
* @param isCaseSensitive
|
|
96
|
+
* @return {null}
|
|
97
|
+
*/
|
|
98
|
+
static getEnumKeyByEnumValue(myEnum: any, enumValue: any, isCaseSensitive?: boolean): string | null;
|
|
99
|
+
/**
|
|
100
|
+
* shorten number
|
|
101
|
+
* @param value
|
|
102
|
+
* @returns {any}
|
|
103
|
+
*/
|
|
104
|
+
static abbreviateNumber(value: any): string;
|
|
105
|
+
/**
|
|
106
|
+
* convert json to tree
|
|
107
|
+
* @param json
|
|
108
|
+
* @param key
|
|
109
|
+
* @returns {any}
|
|
110
|
+
*/
|
|
111
|
+
static jsonToTree(data: any): any;
|
|
112
|
+
/**
|
|
113
|
+
* swap element in array
|
|
114
|
+
* @param array
|
|
115
|
+
* @param firstIndex
|
|
116
|
+
* @param secondIndex
|
|
117
|
+
*/
|
|
118
|
+
static swap(array: any[], firstIndex: number, secondIndex: number): void;
|
|
119
|
+
static isObject(data: any): boolean;
|
|
120
|
+
static isArray(data: any): boolean;
|
|
121
|
+
static buildTreeFromChild(child: any): any;
|
|
122
|
+
static traversalTree(list: any[], callback: Function, parent?: any): void;
|
|
123
|
+
static traversalTreeReverse(node: any, callback: Function): void;
|
|
124
|
+
static findNodeOfTree(list: any[], condition: Function): any;
|
|
125
|
+
static filterNodeOfTree(list: any[], condition: Function): any;
|
|
126
|
+
/**
|
|
127
|
+
* get parent route when using in guard
|
|
128
|
+
* @param route
|
|
129
|
+
*/
|
|
130
|
+
static getRedirectToRoute(route: ActivatedRouteSnapshot): string[];
|
|
131
|
+
static getResolvedUrl(route: ActivatedRouteSnapshot): string;
|
|
132
|
+
static getUrlFromSegments(segments: any[] | undefined): string;
|
|
133
|
+
static clearLineBreakR(s: string): string;
|
|
134
|
+
static transferToCapitalText(s: string, exceptions?: object): any;
|
|
135
|
+
static parsePayloadWithObject(query: string, dataObject: any): string;
|
|
136
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TqlUtilsService, never>;
|
|
137
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TqlUtilsService>;
|
|
138
|
+
}
|