@factor_ec/utils 5.0.8 → 6.0.0
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 +1 -1
- package/fesm2022/factor_ec-utils.mjs +1089 -457
- package/fesm2022/factor_ec-utils.mjs.map +1 -1
- package/package.json +5 -12
- package/types/factor_ec-utils.d.ts +894 -0
- package/index.d.ts +0 -5
- package/lib/array.service.d.ts +0 -6
- package/lib/color.service.d.ts +0 -58
- package/lib/csv.service.d.ts +0 -88
- package/lib/date.service.d.ts +0 -6
- package/lib/file-picker.service.d.ts +0 -10
- package/lib/files.service.d.ts +0 -14
- package/lib/google-tag-manager.service.d.ts +0 -18
- package/lib/graphql.service.d.ts +0 -12
- package/lib/models/auth-token-payload.d.ts +0 -6
- package/lib/models/auth-token.d.ts +0 -4
- package/lib/models/currency.d.ts +0 -6
- package/lib/models/error.d.ts +0 -6
- package/lib/models/language.d.ts +0 -4
- package/lib/models/login.d.ts +0 -4
- package/lib/models/operation.d.ts +0 -4
- package/lib/models/option.d.ts +0 -5
- package/lib/models/user.d.ts +0 -5
- package/lib/object.service.d.ts +0 -7
- package/lib/storage.service.d.ts +0 -12
- package/lib/string.service.d.ts +0 -19
- package/lib/validators/ec/identification-type.d.ts +0 -1
- package/lib/validators/ec/identification-validator.d.ts +0 -2
- package/public-api.d.ts +0 -22
package/index.d.ts
DELETED
package/lib/array.service.d.ts
DELETED
package/lib/color.service.d.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class ColorService {
|
|
3
|
-
L: number[];
|
|
4
|
-
S: number[];
|
|
5
|
-
hueRanges: {
|
|
6
|
-
min: number;
|
|
7
|
-
max: number;
|
|
8
|
-
}[];
|
|
9
|
-
constructor();
|
|
10
|
-
/**
|
|
11
|
-
* BKDR Hash (modified version)
|
|
12
|
-
*
|
|
13
|
-
* @param str string to hash
|
|
14
|
-
*/
|
|
15
|
-
hash(str: string): number;
|
|
16
|
-
/**
|
|
17
|
-
* Convert RGB Array to HEX
|
|
18
|
-
*
|
|
19
|
-
* @param RGBArray - [R, G, B]
|
|
20
|
-
* @returns 6 digits hex starting with #
|
|
21
|
-
*/
|
|
22
|
-
rgb2hex(RGBArray: number[]): string;
|
|
23
|
-
/**
|
|
24
|
-
* Convert HSL to RGB
|
|
25
|
-
*
|
|
26
|
-
* @see {@link http://zh.wikipedia.org/wiki/HSL和HSV色彩空间} for further information.
|
|
27
|
-
* @param H Hue ∈ [0, 360)
|
|
28
|
-
* @param S Saturation ∈ [0, 1]
|
|
29
|
-
* @param L Lightness ∈ [0, 1]
|
|
30
|
-
* @returns R, G, B ∈ [0, 255]
|
|
31
|
-
*/
|
|
32
|
-
hsl2rgb(H: number, S: number, L: number): number[];
|
|
33
|
-
/**
|
|
34
|
-
* Returns the hash in [h, s, l].
|
|
35
|
-
* Note that H ∈ [0, 360); S ∈ [0, 1]; L ∈ [0, 1];
|
|
36
|
-
*
|
|
37
|
-
* @param str string to hash
|
|
38
|
-
* @returns [h, s, l]
|
|
39
|
-
*/
|
|
40
|
-
hsl(str: string): any[];
|
|
41
|
-
/**
|
|
42
|
-
* Returns the hash in [r, g, b].
|
|
43
|
-
* Note that R, G, B ∈ [0, 255]
|
|
44
|
-
*
|
|
45
|
-
* @param str string to hash
|
|
46
|
-
* @returns [r, g, b]
|
|
47
|
-
*/
|
|
48
|
-
rgb(str: string): number[];
|
|
49
|
-
/**
|
|
50
|
-
* Returns the hash in hex
|
|
51
|
-
*
|
|
52
|
-
* @param str string to hash
|
|
53
|
-
* @returns hex with #
|
|
54
|
-
*/
|
|
55
|
-
hex(str: string): string;
|
|
56
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ColorService, never>;
|
|
57
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ColorService>;
|
|
58
|
-
}
|
package/lib/csv.service.d.ts
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export interface CsvParsed {
|
|
3
|
-
header: string[];
|
|
4
|
-
content: string[][];
|
|
5
|
-
}
|
|
6
|
-
export interface Options {
|
|
7
|
-
filename: string;
|
|
8
|
-
fieldSeparator: string;
|
|
9
|
-
quoteStrings: string;
|
|
10
|
-
decimalSeparator: string;
|
|
11
|
-
showLabels: boolean;
|
|
12
|
-
showTitle: boolean;
|
|
13
|
-
title: string;
|
|
14
|
-
useTextFile: boolean;
|
|
15
|
-
useBom: boolean;
|
|
16
|
-
headers: string[];
|
|
17
|
-
useKeysAsHeaders: boolean;
|
|
18
|
-
}
|
|
19
|
-
export declare class CsvConfigConsts {
|
|
20
|
-
static EOL: string;
|
|
21
|
-
static BOM: string;
|
|
22
|
-
static DEFAULT_FIELD_SEPARATOR: string;
|
|
23
|
-
static DEFAULT_DECIMAL_SEPARATOR: string;
|
|
24
|
-
static DEFAULT_QUOTE: string;
|
|
25
|
-
static DEFAULT_SHOW_TITLE: boolean;
|
|
26
|
-
static DEFAULT_TITLE: string;
|
|
27
|
-
static DEFAULT_FILENAME: string;
|
|
28
|
-
static DEFAULT_SHOW_LABELS: boolean;
|
|
29
|
-
static DEFAULT_USE_TEXT_FILE: boolean;
|
|
30
|
-
static DEFAULT_USE_BOM: boolean;
|
|
31
|
-
static DEFAULT_HEADER: string[];
|
|
32
|
-
static DEFAULT_KEYS_AS_HEADERS: boolean;
|
|
33
|
-
}
|
|
34
|
-
export declare const ConfigDefaults: Options;
|
|
35
|
-
export declare class CsvService {
|
|
36
|
-
private _data;
|
|
37
|
-
private _options;
|
|
38
|
-
private _csv;
|
|
39
|
-
get options(): Options;
|
|
40
|
-
set options(options: Partial<Options>);
|
|
41
|
-
constructor();
|
|
42
|
-
/**
|
|
43
|
-
* Generate and Download Csv
|
|
44
|
-
*/
|
|
45
|
-
generate(jsonData: any, shouldReturnCsv?: boolean): void | any;
|
|
46
|
-
/**
|
|
47
|
-
* Create Headers
|
|
48
|
-
*/
|
|
49
|
-
private _getHeaders;
|
|
50
|
-
/**
|
|
51
|
-
* Create Body
|
|
52
|
-
*/
|
|
53
|
-
private _getBody;
|
|
54
|
-
/**
|
|
55
|
-
* Format Data
|
|
56
|
-
* @param {any} data
|
|
57
|
-
*/
|
|
58
|
-
private _formatData;
|
|
59
|
-
/**
|
|
60
|
-
* Check if is Float
|
|
61
|
-
* @param {any} input
|
|
62
|
-
*/
|
|
63
|
-
private _isFloat;
|
|
64
|
-
/**
|
|
65
|
-
* Parse the collection given to it
|
|
66
|
-
*
|
|
67
|
-
* @private
|
|
68
|
-
* @param {*} jsonData
|
|
69
|
-
* @returns {any[]}
|
|
70
|
-
* @memberof ExportToCsv
|
|
71
|
-
*/
|
|
72
|
-
private _parseData;
|
|
73
|
-
/**
|
|
74
|
-
* Convet to Object
|
|
75
|
-
* @param {any} val
|
|
76
|
-
*/
|
|
77
|
-
toObject(val: any): any;
|
|
78
|
-
/**
|
|
79
|
-
* Assign data to new Object
|
|
80
|
-
* @param {any} target
|
|
81
|
-
* @param {any[]} ...source
|
|
82
|
-
*/
|
|
83
|
-
objectAssign(target: any, ...source: any[]): any;
|
|
84
|
-
read(csvContent: string): CsvParsed;
|
|
85
|
-
parseLine(csvLine: string): string[];
|
|
86
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CsvService, never>;
|
|
87
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CsvService>;
|
|
88
|
-
}
|
package/lib/date.service.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class FilePickerService {
|
|
3
|
-
private pickerClosed;
|
|
4
|
-
open(options?: {
|
|
5
|
-
accept?: string;
|
|
6
|
-
multiple?: boolean;
|
|
7
|
-
}): Promise<any[] | null>;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FilePickerService, never>;
|
|
9
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<FilePickerService>;
|
|
10
|
-
}
|
package/lib/files.service.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class FilesService {
|
|
3
|
-
private callback;
|
|
4
|
-
private fileInput;
|
|
5
|
-
private pickerClosed;
|
|
6
|
-
constructor();
|
|
7
|
-
private loadValue;
|
|
8
|
-
open(callback?: Function, options?: {
|
|
9
|
-
accept?: string;
|
|
10
|
-
multiple?: boolean;
|
|
11
|
-
}): void;
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FilesService, never>;
|
|
13
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<FilesService>;
|
|
14
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Router } from '@angular/router';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class GoogleTagManagerService {
|
|
4
|
-
private platformId;
|
|
5
|
-
router: Router;
|
|
6
|
-
trackingId: string;
|
|
7
|
-
constructor(platformId: Object, router: Router);
|
|
8
|
-
appendTrackingCode(trackingId: string, options?: {
|
|
9
|
-
environment?: {
|
|
10
|
-
auth: string;
|
|
11
|
-
preview: string;
|
|
12
|
-
};
|
|
13
|
-
}): void;
|
|
14
|
-
addVariable(variable: any): void;
|
|
15
|
-
private initSubscribers;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GoogleTagManagerService, never>;
|
|
17
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<GoogleTagManagerService>;
|
|
18
|
-
}
|
package/lib/graphql.service.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class GraphqlService {
|
|
3
|
-
private apollo;
|
|
4
|
-
private stringService;
|
|
5
|
-
mutation(operation: 'create' | 'update' | 'delete', type: string, entity: any): Promise<unknown>;
|
|
6
|
-
parseQuery(query: {
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
}): any;
|
|
9
|
-
parseEdges(edges: any): any[];
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GraphqlService, never>;
|
|
11
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<GraphqlService>;
|
|
12
|
-
}
|
package/lib/models/currency.d.ts
DELETED
package/lib/models/error.d.ts
DELETED
package/lib/models/language.d.ts
DELETED
package/lib/models/login.d.ts
DELETED
package/lib/models/option.d.ts
DELETED
package/lib/models/user.d.ts
DELETED
package/lib/object.service.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class ObjectService {
|
|
3
|
-
filterNullProperties(obj: any): any;
|
|
4
|
-
deepMerge(target: any, source: any): any;
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ObjectService, never>;
|
|
6
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ObjectService>;
|
|
7
|
-
}
|
package/lib/storage.service.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class StorageService {
|
|
3
|
-
private platformId;
|
|
4
|
-
memoryStorage: any;
|
|
5
|
-
constructor(platformId: Object);
|
|
6
|
-
private getValue;
|
|
7
|
-
delete(key: string, storage?: 'local' | 'session' | 'memory'): void;
|
|
8
|
-
get(key: string, storage?: 'local' | 'session' | 'memory'): any;
|
|
9
|
-
set(key: string, value: any, storage?: 'local' | 'session' | 'memory'): void;
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<StorageService, never>;
|
|
11
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<StorageService>;
|
|
12
|
-
}
|
package/lib/string.service.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class StringService {
|
|
3
|
-
decodeHTML(text: string): string;
|
|
4
|
-
/**
|
|
5
|
-
* Normaliza un texto para evitar el Case y los acentos
|
|
6
|
-
* @param text texto a normalizar
|
|
7
|
-
* @returns texto normalizado
|
|
8
|
-
*/
|
|
9
|
-
normalize(text: string): string;
|
|
10
|
-
normalizeName(text: string): string;
|
|
11
|
-
/**
|
|
12
|
-
* Te da el tiempo en milisegundos que toma leer un texto dado
|
|
13
|
-
* @param text texto a leer
|
|
14
|
-
* @return number Tiempo en milisegundos
|
|
15
|
-
*/
|
|
16
|
-
calculateReadingTime(text: string): number;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<StringService, never>;
|
|
18
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<StringService>;
|
|
19
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getIdentificationType(number: string): string | null;
|
package/public-api.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export * from './lib/array.service';
|
|
2
|
-
export * from './lib/color.service';
|
|
3
|
-
export * from './lib/csv.service';
|
|
4
|
-
export * from './lib/date.service';
|
|
5
|
-
export * from './lib/files.service';
|
|
6
|
-
export * from './lib/file-picker.service';
|
|
7
|
-
export * from './lib/google-tag-manager.service';
|
|
8
|
-
export * from './lib/graphql.service';
|
|
9
|
-
export * from './lib/object.service';
|
|
10
|
-
export * from './lib/storage.service';
|
|
11
|
-
export * from './lib/string.service';
|
|
12
|
-
export * from './lib/models/auth-token-payload';
|
|
13
|
-
export * from './lib/models/auth-token';
|
|
14
|
-
export * from './lib/models/currency';
|
|
15
|
-
export * from './lib/models/error';
|
|
16
|
-
export * from './lib/models/language';
|
|
17
|
-
export * from './lib/models/login';
|
|
18
|
-
export * from './lib/models/operation';
|
|
19
|
-
export * from './lib/models/option';
|
|
20
|
-
export * from './lib/models/user';
|
|
21
|
-
export * from './lib/validators/ec/identification-type';
|
|
22
|
-
export * from './lib/validators/ec/identification-validator';
|