@factor_ec/utils 5.0.9 → 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/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@factor_ec/utils" />
5
- export * from './public-api';
@@ -1,6 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class ArrayService {
3
- merge(arrays: any[], prop: string): any[];
4
- static ɵfac: i0.ɵɵFactoryDeclaration<ArrayService, never>;
5
- static ɵprov: i0.ɵɵInjectableDeclaration<ArrayService>;
6
- }
@@ -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
- }
@@ -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
- }
@@ -1,6 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class DateService {
3
- getDate(date: string): Date;
4
- static ɵfac: i0.ɵɵFactoryDeclaration<DateService, never>;
5
- static ɵprov: i0.ɵɵInjectableDeclaration<DateService>;
6
- }
@@ -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
- }
@@ -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
- }
@@ -1,6 +0,0 @@
1
- export interface AuthTokenPayload {
2
- exp: number;
3
- iat: string;
4
- roles: string[];
5
- username: string;
6
- }
@@ -1,4 +0,0 @@
1
- export interface AuthToken {
2
- token: string;
3
- refresh_token: string;
4
- }
@@ -1,6 +0,0 @@
1
- export interface Currency {
2
- code: string;
3
- name: string;
4
- symbol: string;
5
- decimalDigits: number;
6
- }
@@ -1,6 +0,0 @@
1
- export interface Error {
2
- code?: number;
3
- icon?: string;
4
- title?: string;
5
- message: string;
6
- }
@@ -1,4 +0,0 @@
1
- export interface Language {
2
- code: string;
3
- name: string;
4
- }
@@ -1,4 +0,0 @@
1
- export interface Login {
2
- username: string;
3
- password: string;
4
- }
@@ -1,4 +0,0 @@
1
- export interface Operation {
2
- method: 'add' | 'update' | 'delete';
3
- entity: any;
4
- }
@@ -1,5 +0,0 @@
1
- export interface Option {
2
- label: string;
3
- value: string;
4
- metadata?: any;
5
- }
@@ -1,5 +0,0 @@
1
- export interface User {
2
- username: string;
3
- firstName: string;
4
- lastName: string;
5
- }
@@ -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
- }
@@ -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
- }
@@ -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;
@@ -1,2 +0,0 @@
1
- import { ValidatorFn } from '@angular/forms';
2
- export declare function identificationValidator(type: 'cedula' | 'ruc_natural' | 'ruc_privada' | 'ruc_publica' | 'ruc' | 'id'): ValidatorFn;
package/public-api.d.ts DELETED
@@ -1,21 +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/object.service';
9
- export * from './lib/storage.service';
10
- export * from './lib/string.service';
11
- export * from './lib/models/auth-token-payload';
12
- export * from './lib/models/auth-token';
13
- export * from './lib/models/currency';
14
- export * from './lib/models/error';
15
- export * from './lib/models/language';
16
- export * from './lib/models/login';
17
- export * from './lib/models/operation';
18
- export * from './lib/models/option';
19
- export * from './lib/models/user';
20
- export * from './lib/validators/ec/identification-type';
21
- export * from './lib/validators/ec/identification-validator';