coer-elements 2.0.21 → 2.0.22
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/components/lib/coer-button/coer-button.component.d.ts +1 -1
- package/components/lib/coer-datebox/coer-datebox.component.d.ts +1 -1
- package/components/lib/coer-dropdown/coer-dropdown.component.d.ts +1 -1
- package/components/lib/coer-grid/coer-grid.component.d.ts +3 -1
- package/components/lib/coer-grid/coer-grid.extension.d.ts +2 -2
- package/components/lib/coer-numberbox/coer-numberbox.component.d.ts +1 -1
- package/components/lib/coer-secretbox/coer-secretbox.component.d.ts +1 -1
- package/components/lib/coer-textarea/coer-textarea.component.d.ts +1 -1
- package/components/lib/coer-textbox/coer-textbox.component.d.ts +1 -1
- package/fesm2022/coer-elements-components.mjs +32 -28
- package/fesm2022/coer-elements-components.mjs.map +1 -1
- package/fesm2022/coer-elements-extensions.mjs +9 -9
- package/fesm2022/coer-elements-extensions.mjs.map +1 -1
- package/fesm2022/coer-elements-guards.mjs +8 -8
- package/fesm2022/coer-elements-guards.mjs.map +1 -1
- package/fesm2022/coer-elements-interceptors.mjs +2 -2
- package/fesm2022/coer-elements-interceptors.mjs.map +1 -1
- package/fesm2022/coer-elements-pages.mjs +16 -16
- package/fesm2022/coer-elements-pages.mjs.map +1 -1
- package/fesm2022/coer-elements-pipes.mjs +2 -2
- package/fesm2022/coer-elements-pipes.mjs.map +1 -1
- package/fesm2022/coer-elements-services.mjs +2 -2
- package/fesm2022/coer-elements-services.mjs.map +1 -1
- package/fesm2022/coer-elements-tools.mjs +329 -367
- package/fesm2022/coer-elements-tools.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/coer-elements.css +27 -1
- package/styles/icons.scss +11 -1
- package/styles/index.scss +1 -1
- package/svg/array.svg +3 -0
- package/svg/bulb-light-idea-fill.svg +3 -0
- package/tools/lib/breadcrumbs.tools.d.ts +11 -10
- package/tools/lib/coer-alert/coer-alert.component.d.ts +8 -10
- package/tools/lib/coer-grid.templates.d.ts +4 -4
- package/tools/lib/collections.tools.d.ts +13 -0
- package/tools/lib/colors.tools.d.ts +7 -2
- package/tools/lib/control-value.tools.d.ts +13 -12
- package/tools/lib/date-time.tools.d.ts +8 -7
- package/tools/lib/files.tools.d.ts +1 -1
- package/tools/lib/{elements-html.tools.d.ts → html-elements.tools.d.ts} +6 -6
- package/tools/lib/numbers.tools.d.ts +9 -0
- package/tools/lib/screen.tools.d.ts +7 -2
- package/tools/lib/section.tools.d.ts +20 -9
- package/tools/lib/service.tools.d.ts +11 -10
- package/tools/lib/source.tools.d.ts +9 -8
- package/tools/lib/{string.tools.d.ts → strings.tools.d.ts} +2 -1
- package/tools/lib/tools.d.ts +8 -23
- package/tools/lib/user.class.d.ts +6 -5
- package/tools/public-api.d.ts +4 -2
- /package/styles/{cursores.scss → cursors.scss} +0 -0
- /package/svg/{house.svg → house-fill.svg} +0 -0
package/package.json
CHANGED
package/styles/coer-elements.css
CHANGED
@@ -2931,7 +2931,33 @@ aside.toast-container > * {
|
|
2931
2931
|
mask-position: center !important;
|
2932
2932
|
display: inline-block !important;
|
2933
2933
|
background-color: currentColor !important;
|
2934
|
-
mask-image: url("../svg/house.svg");
|
2934
|
+
mask-image: url("../svg/house-fill.svg");
|
2935
|
+
}
|
2936
|
+
|
2937
|
+
.coer-icon-bulb-idea-fill {
|
2938
|
+
min-width: 5px !important;
|
2939
|
+
min-height: 5px !important;
|
2940
|
+
width: 1em !important;
|
2941
|
+
height: 1em !important;
|
2942
|
+
mask-size: contain !important;
|
2943
|
+
mask-repeat: no-repeat !important;
|
2944
|
+
mask-position: center !important;
|
2945
|
+
display: inline-block !important;
|
2946
|
+
background-color: currentColor !important;
|
2947
|
+
mask-image: url("../svg/bulb-light-idea-fill.svg");
|
2948
|
+
}
|
2949
|
+
|
2950
|
+
.coer-icon-array {
|
2951
|
+
min-width: 5px !important;
|
2952
|
+
min-height: 5px !important;
|
2953
|
+
width: 1em !important;
|
2954
|
+
height: 1em !important;
|
2955
|
+
mask-size: contain !important;
|
2956
|
+
mask-repeat: no-repeat !important;
|
2957
|
+
mask-position: center !important;
|
2958
|
+
display: inline-block !important;
|
2959
|
+
background-color: currentColor !important;
|
2960
|
+
mask-image: url("../svg/array.svg");
|
2935
2961
|
}
|
2936
2962
|
|
2937
2963
|
.flex-wrap {
|
package/styles/icons.scss
CHANGED
@@ -16,5 +16,15 @@
|
|
16
16
|
|
17
17
|
.coer-icon-house-fill {
|
18
18
|
@include Icon();
|
19
|
-
mask-image: url('../svg/house.svg');
|
19
|
+
mask-image: url('../svg/house-fill.svg');
|
20
|
+
}
|
21
|
+
|
22
|
+
.coer-icon-bulb-idea-fill {
|
23
|
+
@include Icon();
|
24
|
+
mask-image: url('../svg/bulb-light-idea-fill.svg');
|
25
|
+
}
|
26
|
+
|
27
|
+
.coer-icon-array {
|
28
|
+
@include Icon();
|
29
|
+
mask-image: url('../svg/array.svg');
|
20
30
|
}
|
package/styles/index.scss
CHANGED
package/svg/array.svg
ADDED
@@ -0,0 +1,3 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2048 2048">
|
2
|
+
<path d="M 75 2.485 C 54.999 6.476, 34.636 18.812, 21.833 34.693 C 12.101 46.765, 6.908 57.221, 2.940 72.736 C 1.018 80.248, 0.994 92.316, 0.998 1022.544 C 1.002 1652.647, 1.338 1966.525, 2.013 1970.122 C 9.202 2008.404, 37.650 2037.459, 75.877 2045.562 C 85.804 2047.666, 472.222 2047.689, 483.213 2045.586 C 500.981 2042.187, 518.838 2032.451, 532 2018.985 C 556.053 1994.379, 564.474 1960.470, 554.612 1927.939 C 546.548 1901.340, 527.443 1879.993, 501.692 1868.807 C 484.071 1861.154, 495.378 1861.658, 332.750 1861.280 L 187 1860.942 187 1024 L 187 187.058 332.750 186.720 C 495.270 186.343, 484.092 186.837, 501.566 179.247 C 514.158 173.778, 524.285 166.640, 533.639 156.642 C 555.121 133.682, 563.521 101.912, 555.944 72.278 C 551.216 53.785, 544.433 41.528, 532 29.009 C 518.552 15.468, 500.765 5.772, 483.213 2.414 C 472.723 0.407, 85.077 0.474, 75 2.485 M 1564 2.498 C 1523.110 10.742, 1491.920 46.041, 1489.336 87 C 1486.502 131.924, 1515.169 171.813, 1558.930 183.836 L 1568.500 186.465 1714.750 186.770 L 1861 187.075 1861 1024.009 L 1861 1860.943 1714.750 1861.252 L 1568.500 1861.561 1560.107 1863.799 C 1528.507 1872.228, 1503.763 1895.121, 1494.019 1924.941 C 1489.715 1938.113, 1488.308 1951.234, 1489.819 1964.109 C 1494.264 2002, 1519.373 2031.956, 1556.500 2043.662 L 1565.500 2046.500 1768 2046.500 L 1970.500 2046.500 1978 2044.145 C 1996.779 2038.248, 2009.503 2030.560, 2021.381 2017.933 C 2031.402 2007.281, 2037.877 1996.555, 2042.636 1982.726 L 2046.500 1971.500 2046.771 1029 C 2046.960 369.528, 2046.724 84.417, 2045.983 79.563 C 2041.888 52.734, 2024.743 27.350, 2001.500 13.703 C 1993.465 8.986, 1979.219 3.628, 1970.566 2.069 C 1961.112 0.366, 1572.543 0.776, 1564 2.498 M 559 1024 L 559 1117 652 1117 L 745 1117 745 1024 L 745 931 652 931 L 559 931 559 1024 M 931 1024 L 931 1117 1024 1117 L 1117 1117 1117 1024 L 1117 931 1024 931 L 931 931 931 1024 M 1303 1024 L 1303 1117 1396 1117 L 1489 1117 1489 1024 L 1489 931 1396 931 L 1303 931 1303 1024"/>
|
3
|
+
</svg>
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="202" height="165" viewBox="0 0 202 165" version="1.1">
|
2
|
+
<path d="M 14.635 5.073 C 11.219 7.759, 11.038 12.768, 14.250 15.718 C 18.088 19.244, 32.164 28, 33.993 28 C 34.949 28, 36.916 27.067, 38.365 25.927 C 41.781 23.241, 41.962 18.232, 38.750 15.282 C 34.912 11.756, 20.836 3, 19.007 3 C 18.051 3, 16.084 3.933, 14.635 5.073 M 90.131 4.541 C 79.108 6.933, 71.574 11.173, 63.096 19.758 C 50.918 32.089, 46.342 44.023, 47.283 60.999 C 47.954 73.104, 50.478 80.348, 57.584 90.553 C 68.414 106.107, 72.976 113.492, 74.674 118.214 L 76.395 123 101.453 123 L 126.510 123 128.762 117.192 C 131.073 111.233, 135.382 104.310, 145.193 90.793 C 152.321 80.974, 155.036 73.285, 155.717 60.999 C 156.658 44.023, 152.082 32.089, 139.904 19.758 C 131.293 11.038, 123.894 6.931, 112.412 4.499 C 103.999 2.717, 98.491 2.727, 90.131 4.541 M 174.378 8.107 C 163.604 15.092, 162 16.711, 162 20.602 C 162 24.095, 165.698 28, 169.007 28 C 170.836 28, 184.912 19.244, 188.750 15.718 C 191.962 12.768, 191.781 7.759, 188.365 5.073 C 186.916 3.933, 184.949 3, 183.993 3 C 183.038 3, 178.711 5.298, 174.378 8.107 M 96.455 25.455 C 94.011 27.898, 94 28.002, 94 48 C 94 67.998, 94.011 68.102, 96.455 70.545 C 97.805 71.895, 100.075 73, 101.500 73 C 102.925 73, 105.195 71.895, 106.545 70.545 C 108.989 68.102, 109 67.998, 109 48 C 109 28.002, 108.989 27.898, 106.545 25.455 C 105.195 24.105, 102.925 23, 101.500 23 C 100.075 23, 97.805 24.105, 96.455 25.455 M 4.635 55.073 C 2.724 56.576, 2 58.067, 2 60.500 C 2 62.933, 2.724 64.424, 4.635 65.927 C 6.960 67.757, 8.647 68, 19 68 C 29.353 68, 31.040 67.757, 33.365 65.927 C 37.009 63.061, 37.009 57.939, 33.365 55.073 C 31.040 53.243, 29.353 53, 19 53 C 8.647 53, 6.960 53.243, 4.635 55.073 M 169.635 55.073 C 167.724 56.576, 167 58.067, 167 60.500 C 167 62.933, 167.724 64.424, 169.635 65.927 C 171.960 67.757, 173.647 68, 184 68 C 194.353 68, 196.040 67.757, 198.365 65.927 C 200.276 64.424, 201 62.933, 201 60.500 C 201 58.067, 200.276 56.576, 198.365 55.073 C 196.040 53.243, 194.353 53, 184 53 C 173.647 53, 171.960 53.243, 169.635 55.073 M 95.831 84.530 C 89.917 87.741, 90.045 98.420, 96.034 101.517 C 104.995 106.151, 114.083 98.841, 110.994 89.483 C 109.076 83.671, 101.792 81.292, 95.831 84.530 M 24.378 98.107 C 13.604 105.092, 12 106.711, 12 110.602 C 12 114.095, 15.698 118, 19.007 118 C 20.836 118, 34.912 109.244, 38.750 105.718 C 41.962 102.768, 41.781 97.759, 38.365 95.073 C 36.916 93.933, 34.949 93, 33.993 93 C 33.038 93, 28.711 95.298, 24.378 98.107 M 164.635 95.073 C 161.219 97.759, 161.038 102.768, 164.250 105.718 C 168.088 109.244, 182.164 118, 183.993 118 C 184.949 118, 186.916 117.067, 188.365 115.927 C 191.781 113.241, 191.962 108.232, 188.750 105.282 C 184.912 101.756, 170.836 93, 169.007 93 C 168.051 93, 166.084 93.933, 164.635 95.073 M 77 137.634 C 77 144.265, 78.812 149.421, 82.768 154.042 C 87.933 160.076, 93.106 162.379, 101.500 162.379 C 109.894 162.379, 115.067 160.076, 120.232 154.042 C 124.188 149.421, 126 144.265, 126 137.634 L 126 133 101.500 133 L 77 133 77 137.634" stroke="none" fill="#000000" fill-rule="evenodd"/>
|
3
|
+
</svg>
|
@@ -1,20 +1,21 @@
|
|
1
1
|
import { IAppSource } from "coer-elements/interfaces";
|
2
|
+
/** Controls the breadcrumbs in sessionStorage */
|
2
3
|
export declare class Breadcrumbs {
|
3
4
|
private static readonly storage;
|
4
|
-
/** */
|
5
|
+
/** Add a breadcrumb */
|
5
6
|
static Add(page: string, path: string): void;
|
6
|
-
/** */
|
7
|
+
/** Get the breadcrumbs */
|
7
8
|
static Get(): IAppSource[];
|
8
|
-
/** */
|
9
|
+
/** Get the first breadcrumb */
|
9
10
|
static GetFirst(): IAppSource | null;
|
10
|
-
/** */
|
11
|
+
/** Get the last breadcrumb */
|
11
12
|
static GetLast(): IAppSource | null;
|
12
13
|
/** */
|
13
|
-
static Save
|
14
|
-
/** */
|
15
|
-
static
|
16
|
-
/** */
|
17
|
-
static
|
18
|
-
/** */
|
14
|
+
private static Save;
|
15
|
+
/** Removes one breadcrumb by route */
|
16
|
+
static RemoveByPath(path: string): void;
|
17
|
+
/** Update the last breadcrumb */
|
18
|
+
static UpdateLast(page: string, path: string): void;
|
19
|
+
/** Remove the last breadcrumb */
|
19
20
|
static RemoveLast(): void;
|
20
21
|
}
|
@@ -1,23 +1,21 @@
|
|
1
1
|
import * as i0 from "@angular/core";
|
2
2
|
export declare class CoerAlert {
|
3
|
-
/** */
|
3
|
+
/** Use this alert to issue a success message */
|
4
4
|
Success(message?: string | null, title?: string | null, icon?: string | null, autohide?: number | null): void;
|
5
|
-
/** */
|
5
|
+
/** Use this alert to issue a error or danger */
|
6
6
|
Error(message?: string | null, title?: string | null, icon?: string | null, autohide?: number | null): void;
|
7
|
-
/** */
|
7
|
+
/** Use this alert to broadcast an informational message */
|
8
8
|
Info(message?: string | null, title?: string | null, icon?: string | null, autohide?: number | null): void;
|
9
|
-
/** */
|
9
|
+
/** Use this alert to issue a warning message */
|
10
10
|
Warning(message?: string | null, title?: string | null, icon?: string | null, autohide?: number | null): void;
|
11
|
-
/** */
|
12
|
-
protected Close(alert: 'alert-success' | 'alert-error' | 'alert-info' | 'alert-warning'): Promise<void>;
|
13
|
-
/** */
|
11
|
+
/** Use this alert to confirm a user action */
|
14
12
|
Confirm(message?: string, alertType?: 'warning' | 'danger' | 'success' | 'info', icon?: string | null): Promise<boolean>;
|
15
13
|
/** */
|
16
|
-
|
14
|
+
protected _Close(alert: 'alert-success' | 'alert-error' | 'alert-info' | 'alert-warning'): Promise<void>;
|
17
15
|
/** */
|
18
|
-
private
|
16
|
+
private _SetIcon;
|
19
17
|
/** */
|
20
|
-
private
|
18
|
+
private _SetAutoHide;
|
21
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<CoerAlert, never>;
|
22
20
|
static ɵcmp: i0.ɵɵComponentDeclaration<CoerAlert, "coer-alert", never, {}, {}, never, never, true, never>;
|
23
21
|
}
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { IGridCoerSwitch, IGridCoerTextBox, IGridItem } from "coer-elements/interfaces";
|
2
2
|
export declare const GridTemplates: {
|
3
|
-
/**
|
3
|
+
/** Set Active/Disabled values, template for boolean property */
|
4
4
|
isActiveTemplate: (item: IGridItem<any>) => string;
|
5
|
-
/**
|
5
|
+
/** Enable switch by row, template for boolean property */
|
6
6
|
coerSwitchTemplate: (item: IGridItem<any>) => IGridCoerSwitch;
|
7
|
-
/**
|
7
|
+
/** Enable textbox by row, template for text property */
|
8
8
|
coerTextboxTemplate: (item: IGridItem<any>) => IGridCoerTextBox;
|
9
|
-
/** Template for
|
9
|
+
/** Template for icons */
|
10
10
|
coerIconTemplate: (icon: string, color?: string) => string;
|
11
11
|
};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/** Provides several methods for collection manipulation */
|
2
|
+
export declare class Collections {
|
3
|
+
/** Set an index and concat more arrays of the same type */
|
4
|
+
static SetIndex<T>(array: T[], ...args: T[][]): T[];
|
5
|
+
/** Sort an array in ascending order by property */
|
6
|
+
static SortBy<T>(array: T[], property: string, propertyType?: 'string' | 'number'): T[];
|
7
|
+
/** Sort an array in descending order by property */
|
8
|
+
static SortByDesc<T>(array: T[], property: string, propertyType?: 'string' | 'number'): T[];
|
9
|
+
/** */
|
10
|
+
static Distinct<T>(array: T[], ...args: T[][]): T[];
|
11
|
+
/** */
|
12
|
+
static Except<T>(array: T[], filter: any[], ...properties: string[]): T[];
|
13
|
+
}
|
@@ -1,11 +1,16 @@
|
|
1
1
|
import { IActionColors, IAppColors, IFixedColors } from "coer-elements/interfaces";
|
2
|
+
/** class to work with colors */
|
2
3
|
export declare class Colors {
|
4
|
+
/** Provides the fixed colors set by the coer-elements library */
|
3
5
|
static get fixedColors(): IFixedColors;
|
6
|
+
/** Provides the action colors set in the application */
|
4
7
|
static get actionColors(): IActionColors;
|
8
|
+
/** Provides the colors of the application */
|
5
9
|
static get appColors(): IAppColors;
|
6
|
-
|
10
|
+
/** Get Hexadecimal color */
|
11
|
+
static ToHexadecimal(red: number, green: number, blue: number, alpha?: number): string;
|
7
12
|
/** Returns a random color in hexadecimal
|
8
13
|
public static GetRandomColorHex = (): string => "#xxxxxx".replace(/x/g, () => (Math.random() * 16 | 0).toString(16)); */
|
9
14
|
/** Returns the number of colors requested */
|
10
|
-
static
|
15
|
+
static GetColorList(quantity: number): string[];
|
11
16
|
}
|
@@ -4,22 +4,23 @@ export declare const CONTROL_VALUE: <T>(component: T) => {
|
|
4
4
|
useExisting: import("@angular/core").Type<any>;
|
5
5
|
multi: boolean;
|
6
6
|
};
|
7
|
-
|
8
|
-
|
7
|
+
/** Implements the ControlValueAccessor interface to build a components */
|
8
|
+
export declare abstract class ControlValue implements ControlValueAccessor {
|
9
9
|
private _isTouched;
|
10
|
-
protected _UpdateValue: Function;
|
11
10
|
private _IsTouched;
|
11
|
+
protected _UpdateValue: Function;
|
12
|
+
/** Current value of the component */
|
13
|
+
protected _value: any;
|
14
|
+
/** Property to validate if the component has been touched */
|
12
15
|
get isTouched(): boolean;
|
13
|
-
/** */
|
14
|
-
protected SetValue(value: any): void;
|
15
|
-
/** */
|
16
|
-
SetTouched(isTouched: boolean): void;
|
17
|
-
/** */
|
16
|
+
/** Sets the value of the component when it is created */
|
18
17
|
writeValue(value: any): void;
|
19
|
-
/** */
|
18
|
+
/** Sets the value of the component when it is updated */
|
20
19
|
registerOnChange(callback: Function): void;
|
21
|
-
/** */
|
20
|
+
/** Sets the component's touched status when it is updated */
|
22
21
|
registerOnTouched(callback: Function): void;
|
23
|
-
/** */
|
24
|
-
|
22
|
+
/** Sets the value of the component */
|
23
|
+
protected SetValue(value: any): void;
|
24
|
+
/** Sets whether the component has been touched */
|
25
|
+
SetTouched(isTouched: boolean): void;
|
25
26
|
}
|
@@ -1,14 +1,15 @@
|
|
1
1
|
import moment from "moment";
|
2
|
-
|
2
|
+
/** Provides several methods for dates manipulation */
|
3
|
+
export declare class Dates {
|
3
4
|
/** Get UTC Offset */
|
4
5
|
static GetOffset(): number;
|
5
6
|
/** YYYY-MM-DD HH:mm:ss */
|
6
7
|
static GetCurrentDateTime(): string;
|
7
8
|
/** YYYY-MM-DD HH:mm:ss */
|
8
9
|
static GetFormatDB(date: string | Date | moment.Moment): string;
|
9
|
-
/** Convert UTC Date to Local Zone */
|
10
|
+
/** Convert UTC Date to Local Zone. YYYY-MM-DD HH:mm:ss */
|
10
11
|
static ToLocalZone(date: string | Date | moment.Moment): string;
|
11
|
-
/** Convert Local Zone Date to UTC */
|
12
|
+
/** Convert Local Zone Date to UTC. YYYY-MM-DD HH:mm:ss */
|
12
13
|
static ToUTC(date: string | Date | moment.Moment): string;
|
13
14
|
/** MMM, DD YYYY */
|
14
15
|
static GetDateFormat(date: string | Date | moment.Moment): string;
|
@@ -16,8 +17,8 @@ export declare class DateTime {
|
|
16
17
|
static GetDateTimeFormat(date: string | Date | moment.Moment): string;
|
17
18
|
/** */
|
18
19
|
static IsValidDate(date: string | Date | moment.Moment): boolean;
|
19
|
-
/** */
|
20
|
-
static SetFirstHour(date
|
21
|
-
/** */
|
22
|
-
static SetLastHour(date
|
20
|
+
/** YYYY-MM-DD HH:mm:ss */
|
21
|
+
static SetFirstHour(date: string | Date | moment.Moment): string;
|
22
|
+
/** YYYY-MM-DD HH:mm:ss */
|
23
|
+
static SetLastHour(date: string | Date | moment.Moment): string;
|
23
24
|
}
|
@@ -2,7 +2,7 @@ export declare class Files {
|
|
2
2
|
static readonly EXCEL_EXTENSIONS: string[];
|
3
3
|
/** Get Extension File */
|
4
4
|
static GetExtension(file: File): string | null;
|
5
|
-
/**
|
5
|
+
/** */
|
6
6
|
static IsExcel(file: File): boolean;
|
7
7
|
/** Read excel file */
|
8
8
|
static ReadExcel<T>(file: File): Promise<{
|
@@ -1,16 +1,16 @@
|
|
1
|
-
export declare class
|
1
|
+
export declare class HTMLElements {
|
2
2
|
/** */
|
3
3
|
static GetElement: (selector: string) => HTMLElement | null;
|
4
4
|
/** */
|
5
|
-
static
|
5
|
+
static GetCssValueBySelector: (selector: string, style: string) => string;
|
6
6
|
/** */
|
7
|
-
static GetCssValue: (element:
|
8
|
-
/**
|
7
|
+
static GetCssValue: (element: HTMLElement | null, style: string) => string;
|
8
|
+
/** Gets the width of the element in px */
|
9
9
|
static GetElementWidth: (element: HTMLElement | null | undefined, ...args: (number | HTMLElement | null | undefined)[]) => string;
|
10
|
-
/**
|
10
|
+
/** Gets the height of the element in px */
|
11
11
|
static GetElementHeight: (element: HTMLElement | null | undefined, ...args: (number | HTMLElement | null | undefined)[]) => string;
|
12
12
|
/** */
|
13
13
|
static IsInvalidElement: (element: any) => boolean;
|
14
|
-
/**
|
14
|
+
/** Gets the color of the element in hexadecimal */
|
15
15
|
static GetElementColor: (element: HTMLElement | null | undefined) => string;
|
16
16
|
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/** Provides several methods for string manipulation */
|
2
|
+
export declare class Numbers {
|
3
|
+
/** Validates if the value is a numeric type */
|
4
|
+
static IsNumber(value: any): boolean;
|
5
|
+
/** Validates if the value isn't a numeric type */
|
6
|
+
static IsNotNumber(value: any): boolean;
|
7
|
+
/** Return a string with numeric format */
|
8
|
+
static GetNumericFormat(value: string | number | null | undefined, decimals?: number): string;
|
9
|
+
}
|
@@ -1,13 +1,18 @@
|
|
1
1
|
import { IScreenSize } from "coer-elements/interfaces";
|
2
2
|
import { Observable } from "rxjs";
|
3
3
|
export declare class Screen {
|
4
|
+
/** Gets the width of the browser window */
|
4
5
|
static get WINDOW_WIDTH(): number;
|
6
|
+
/** Gets the height of the screen window */
|
5
7
|
static get WINDOW_HEIGHT(): number;
|
8
|
+
/** Gets the width of the device screen */
|
6
9
|
static get DEVICE_WIDTH(): number;
|
10
|
+
/** Gets the height of the device screen */
|
7
11
|
static get DEVICE_HEIGHT(): number;
|
12
|
+
/** gets the breakpoint based on the width of the browsing window */
|
8
13
|
static get BREAKPOINT(): 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
9
|
-
/** */
|
14
|
+
/** Provides an observable for screen resizing */
|
10
15
|
static Resize: Observable<IScreenSize>;
|
11
|
-
/** */
|
16
|
+
/** Provides an observable for the browser buttons */
|
12
17
|
static BackButtonBrowser: Observable<string>;
|
13
18
|
}
|
@@ -1,33 +1,44 @@
|
|
1
|
-
import { Router } from '@angular/router';
|
2
1
|
import { AfterViewInit, OnDestroy } from '@angular/core';
|
3
2
|
import { CoerAlert } from './coer-alert/coer-alert.component';
|
3
|
+
import { Router } from '@angular/router';
|
4
4
|
import * as i0 from "@angular/core";
|
5
|
-
|
5
|
+
/** Use this component to extend the functionality of a page section. */
|
6
|
+
export declare abstract class Section<T> implements AfterViewInit, OnDestroy {
|
7
|
+
/** */
|
6
8
|
protected readonly alert: CoerAlert;
|
9
|
+
/** */
|
7
10
|
protected readonly router: Router;
|
11
|
+
/** */
|
8
12
|
isLoading: import("@angular/core").InputSignal<boolean>;
|
13
|
+
/** */
|
9
14
|
isUpdate: import("@angular/core").InputSignal<boolean>;
|
15
|
+
/** */
|
10
16
|
onReady: import("@angular/core").OutputEmitterRef<void>;
|
17
|
+
/** */
|
11
18
|
onDestroy: import("@angular/core").OutputEmitterRef<any>;
|
19
|
+
/** */
|
12
20
|
onIsLoading: import("@angular/core").OutputEmitterRef<boolean>;
|
21
|
+
/** */
|
13
22
|
onUpdated: import("@angular/core").OutputEmitterRef<T | null>;
|
23
|
+
/** */
|
14
24
|
protected enableAnimations: boolean;
|
25
|
+
/** */
|
15
26
|
protected isReadySection: boolean;
|
16
27
|
ngAfterViewInit(): Promise<void>;
|
17
28
|
ngOnDestroy(): void;
|
18
29
|
/** Main method. Starts after ngAfterViewInit() */
|
19
30
|
protected RunSection(): void;
|
20
|
-
/** */
|
21
|
-
protected Log(value: any,
|
22
|
-
|
23
|
-
protected coerSwitchTemplate: (item: import("coer-elements/interfaces").IGridItem<any>) => import("coer-elements/interfaces").IGridCoerSwitch;
|
24
|
-
protected coerTextboxTemplate: (item: import("coer-elements/interfaces").IGridItem<any>) => import("coer-elements/interfaces").IGridCoerTextBox;
|
25
|
-
protected coerIconTemplate: (icon: string, color?: string) => string;
|
31
|
+
/** Emit a console.log() */
|
32
|
+
protected Log(value: any, logName?: string | null): void;
|
33
|
+
/** Returns true if the value is null or undefined, false otherwise */
|
26
34
|
protected IsNull: (value: any) => boolean;
|
35
|
+
/** Returns true if the value is not null or undefined, false otherwise */
|
27
36
|
protected IsNotNull: (value: any) => boolean;
|
37
|
+
/** Returns true if the value is null or undefined or is an empty string or contains only whitespace, false otherwise */
|
28
38
|
protected IsOnlyWhiteSpace: (value: any) => boolean;
|
39
|
+
/** Returns true if it has a string value and is not all whitespace, false otherwise */
|
29
40
|
protected IsNotOnlyWhiteSpace: (value: any) => boolean;
|
30
|
-
|
41
|
+
/** */
|
31
42
|
protected IsInvalidElement: (element: any) => boolean;
|
32
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<Section<any>, never>;
|
33
44
|
static ɵcmp: i0.ɵɵComponentDeclaration<Section<any>, "ng-component", never, { "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "isUpdate": { "alias": "isUpdate"; "required": false; "isSignal": true; }; }, { "onReady": "onReady"; "onDestroy": "onDestroy"; "onIsLoading": "onIsLoading"; "onUpdated": "onUpdated"; }, never, never, true, never>;
|
@@ -2,10 +2,11 @@ import { HttpClient } from "@angular/common/http";
|
|
2
2
|
import { CoerAlert } from "./coer-alert/coer-alert.component";
|
3
3
|
import { IHttpRequest, IHttpResponse } from "coer-elements/interfaces";
|
4
4
|
import { Subscription } from "rxjs";
|
5
|
-
|
5
|
+
/** Provides several methods for handling http requests */
|
6
|
+
export declare abstract class Service {
|
6
7
|
protected readonly alert: CoerAlert;
|
7
8
|
protected readonly http: HttpClient;
|
8
|
-
protected
|
9
|
+
protected readonly HTTP_CODE: {
|
9
10
|
Ok: number;
|
10
11
|
Created: number;
|
11
12
|
NoContent: number;
|
@@ -24,21 +25,21 @@ export declare class Service {
|
|
24
25
|
private _PUT$;
|
25
26
|
private _PATCH$;
|
26
27
|
private _DELETE$;
|
27
|
-
/** */
|
28
|
+
/** Clear and release a subscription */
|
28
29
|
protected ReleaseSubscription(subscription: Subscription): void;
|
29
|
-
/**
|
30
|
+
/** Generates a GET http request */
|
30
31
|
protected HTTP_GET<T>(request: IHttpRequest<T>, cancelPrevious?: boolean): Promise<IHttpResponse<T>>;
|
31
|
-
/**
|
32
|
+
/** Generates a POST http request */
|
32
33
|
protected HTTP_POST<T>(request: IHttpRequest<T>, cancelPrevious?: boolean): Promise<IHttpResponse<T>>;
|
33
|
-
/**
|
34
|
+
/** Generates a PUT http request */
|
34
35
|
protected HTTP_PUT<T>(request: IHttpRequest<T>, cancelPrevious?: boolean): Promise<IHttpResponse<void>>;
|
35
|
-
/**
|
36
|
+
/** Generates a PATCH http request */
|
36
37
|
protected HTTP_PATCH<T>(request: IHttpRequest<T>, cancelPrevious?: boolean): Promise<IHttpResponse<void>>;
|
37
|
-
/**
|
38
|
+
/** Generates a DELETE http request */
|
38
39
|
protected HTTP_DELETE<T>(request: IHttpRequest<T>, cancelPrevious?: boolean): Promise<IHttpResponse<void>>;
|
39
|
-
/** */
|
40
|
+
/** Download a csv file from browser */
|
40
41
|
protected DOWNLOAD_CSV(buffer: ArrayBuffer, fileName?: string): Blob;
|
41
|
-
/** */
|
42
|
+
/** Download a txt file from browser */
|
42
43
|
protected DOWNLOAD_TXT(buffer: ArrayBuffer, fileName?: string): Blob;
|
43
44
|
/** */
|
44
45
|
private AlertError;
|
@@ -1,20 +1,21 @@
|
|
1
1
|
import { IAppSource } from "coer-elements/interfaces";
|
2
|
+
/** Controls source information in sessionStorage */
|
2
3
|
export declare class Source {
|
3
4
|
private static readonly storage;
|
4
|
-
/** */
|
5
|
-
static Set(
|
5
|
+
/** Save the source to sessionStorage and add the breadcrumb */
|
6
|
+
static Set(pageName: string): void;
|
6
7
|
/** */
|
7
8
|
private static Save;
|
8
|
-
/** */
|
9
|
+
/** Get the source from sessionStorage */
|
9
10
|
static Get(): IAppSource | null;
|
10
|
-
/** */
|
11
|
+
/** Gets the first breadcrumb from sessionStorage */
|
11
12
|
static GetRoot(): IAppSource | null;
|
12
|
-
/** */
|
13
|
+
/** Save the pageResponse to sessionStorage */
|
13
14
|
static SetPageResponse<T>(pageResponse: T): void;
|
14
|
-
/** */
|
15
|
+
/** Gets the pageResponse from sessionStorage */
|
15
16
|
static GetPageResponse<T>(): T | null;
|
16
|
-
/** */
|
17
|
+
/** Remove the pageResponse from sessionStorage */
|
17
18
|
static ClearPageResponse(): void;
|
18
|
-
/** */
|
19
|
+
/** Remove the sessionStorage */
|
19
20
|
static Reset(): void;
|
20
21
|
}
|
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
/** Provides several methods for string manipulation */
|
2
|
+
export declare class Strings {
|
2
3
|
/** Sets the first character to lowercase */
|
3
4
|
static FirstCharToLower(value: string | number | null | undefined): string;
|
4
5
|
/** Sets the first character to uppercase */
|
package/tools/lib/tools.d.ts
CHANGED
@@ -1,38 +1,23 @@
|
|
1
|
+
/** Generic Methods */
|
1
2
|
export declare const Tools: {
|
2
|
-
/**
|
3
|
+
/** Generates a guid */
|
3
4
|
GetGuid: (seed?: string) => string;
|
4
5
|
/** Returns true if the value is null or undefined, false otherwise */
|
5
6
|
IsNull: (value: any) => boolean;
|
6
7
|
/** Returns true if the value is not null or undefined, false otherwise */
|
7
8
|
IsNotNull: (value: any) => boolean;
|
8
|
-
/** Returns true if the value is null or undefined or contains only whitespace, false otherwise */
|
9
|
+
/** Returns true if the value is null or undefined or is an empty string or contains only whitespace, false otherwise */
|
9
10
|
IsOnlyWhiteSpace: (value: any) => boolean;
|
10
|
-
/** Returns true if has string value and is not
|
11
|
+
/** Returns true if it has a string value and is not all whitespace, false otherwise */
|
11
12
|
IsNotOnlyWhiteSpace: (value: any) => boolean;
|
12
|
-
/**
|
13
|
-
AvoidNull: <T>(value: T | null | undefined, type?: "string" | "number" | "boolean"
|
13
|
+
/** Avoids null value and responds with the specified type */
|
14
|
+
AvoidNull: <T>(value: T | null | undefined, type?: "string" | "number" | "boolean") => T;
|
14
15
|
/** Break reference of a object or array */
|
15
16
|
BreakReference: <T>(object: T) => T;
|
16
17
|
/** Get properties of an object */
|
17
|
-
GetPropertyList: <T>(object: T | null | undefined) => string[];
|
18
|
-
/**
|
19
|
-
* Set an index and merge more arrays of the same type
|
20
|
-
* */
|
21
|
-
SetIndex: <T>(array: T[], ...args: T[][]) => T[];
|
22
|
-
/** Sort an array in ascending order by property */
|
23
|
-
SortBy: <T>(array: T[], property: string, propertyType?: "string" | "number") => T[];
|
24
|
-
/** Sort an array in descending order by property */
|
25
|
-
SortByDesc: <T>(array: T[], property: string, propertyType?: "string" | "number") => T[];
|
26
|
-
/** Return a string with forman numeric */
|
27
|
-
GetNumericFormat: (value: string | number | null | undefined, decimals?: number) => string;
|
18
|
+
GetPropertyList: <T extends object | null | undefined>(object: T | null | undefined) => string[];
|
28
19
|
/** Wait the time indicated */
|
29
20
|
Sleep: (milliseconds?: number, reference?: string | null) => Promise<void>;
|
30
|
-
/** */
|
31
|
-
Distinct: <T>(array: T[], ...args: T[][]) => T[];
|
32
|
-
/** */
|
33
|
-
Except: <T>(array: T[], filter: any[], ...properties: string[]) => T[];
|
34
|
-
/** */
|
35
|
-
IsNumber: (value: any) => boolean;
|
36
|
-
/** */
|
21
|
+
/** Send text to the computer's clipboard */
|
37
22
|
Clipboard: (text: string, message?: string, title?: string) => void;
|
38
23
|
};
|
@@ -1,12 +1,13 @@
|
|
1
1
|
import { IUserLoginResponse } from "coer-elements/interfaces";
|
2
|
+
/** Controls user information in localStorage */
|
2
3
|
export declare class User {
|
3
4
|
private static readonly storage;
|
4
|
-
/** */
|
5
|
+
/** Save the user to localStorage */
|
5
6
|
static Set(user: IUserLoginResponse): void;
|
6
|
-
/** */
|
7
|
+
/** Get the user from localStorage */
|
7
8
|
static Get(): IUserLoginResponse | null;
|
8
|
-
/** */
|
9
|
-
static
|
10
|
-
/** */
|
9
|
+
/** Validates if the user and the jwt exist in the localStorage */
|
10
|
+
static IsLogIn(): boolean;
|
11
|
+
/** Removes data from localStorage and sessionStorage, except for the user and navigate to root */
|
11
12
|
static LogOut(): void;
|
12
13
|
}
|
package/tools/public-api.d.ts
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
export * from './lib/coer-alert/coer-alert.component';
|
2
2
|
export * from './lib/breadcrumbs.tools';
|
3
3
|
export * from './lib/coer-grid.templates';
|
4
|
+
export * from './lib/collections.tools';
|
4
5
|
export * from './lib/colors.tools';
|
5
6
|
export * from './lib/control-value.tools';
|
6
7
|
export * from './lib/date-time.tools';
|
7
|
-
export * from './lib/elements
|
8
|
+
export * from './lib/html-elements.tools';
|
8
9
|
export * from './lib/files.tools';
|
9
10
|
export * from './lib/user.class';
|
10
11
|
export * from './lib/filters.tools';
|
11
12
|
export * from './lib/menu.tools';
|
13
|
+
export * from './lib/numbers.tools';
|
12
14
|
export * from './lib/page.tools';
|
13
15
|
export * from './lib/screen.tools';
|
14
16
|
export * from './lib/section.tools';
|
15
17
|
export * from './lib/service.tools';
|
16
18
|
export * from './lib/source.tools';
|
17
|
-
export * from './lib/
|
19
|
+
export * from './lib/strings.tools';
|
18
20
|
export * from './lib/tools';
|
File without changes
|
File without changes
|