coer-elements 2.0.21 → 2.0.23

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.
Files changed (72) hide show
  1. package/components/lib/coer-card/coer-card.component.d.ts +13 -0
  2. package/components/lib/coer-grid/coer-grid.component.d.ts +3 -1
  3. package/components/lib/coer-grid/coer-grid.extension.d.ts +2 -2
  4. package/components/lib/components.module.d.ts +41 -40
  5. package/components/public-api.d.ts +1 -0
  6. package/fesm2022/coer-elements-components.mjs +59 -29
  7. package/fesm2022/coer-elements-components.mjs.map +1 -1
  8. package/fesm2022/coer-elements-extensions.mjs +9 -9
  9. package/fesm2022/coer-elements-extensions.mjs.map +1 -1
  10. package/fesm2022/coer-elements-guards.mjs +8 -8
  11. package/fesm2022/coer-elements-guards.mjs.map +1 -1
  12. package/fesm2022/coer-elements-interceptors.mjs +2 -2
  13. package/fesm2022/coer-elements-interceptors.mjs.map +1 -1
  14. package/fesm2022/coer-elements-pages.mjs +18 -18
  15. package/fesm2022/coer-elements-pages.mjs.map +1 -1
  16. package/fesm2022/coer-elements-pipes.mjs +2 -2
  17. package/fesm2022/coer-elements-pipes.mjs.map +1 -1
  18. package/fesm2022/coer-elements-services.mjs +2 -2
  19. package/fesm2022/coer-elements-services.mjs.map +1 -1
  20. package/fesm2022/coer-elements-tools.mjs +362 -407
  21. package/fesm2022/coer-elements-tools.mjs.map +1 -1
  22. package/fesm2022/coer-elements.mjs +2 -1
  23. package/fesm2022/coer-elements.mjs.map +1 -1
  24. package/fonts/consolas.ttf +0 -0
  25. package/fonts/montserrat.ttf +0 -0
  26. package/fonts/roboto-monospace.ttf +0 -0
  27. package/fonts/roboto.ttf +0 -0
  28. package/index.d.ts +1 -1
  29. package/package.json +4 -2
  30. package/styles/border.scss +30 -0
  31. package/styles/coer-elements.css +17434 -3587
  32. package/styles/colors.scss +28 -8
  33. package/styles/containers.scss +1 -1
  34. package/styles/font.scss +55 -5
  35. package/styles/icons.scss +41 -1
  36. package/styles/index.scss +4 -1
  37. package/styles/layout-flex-wrap.scss +32 -32
  38. package/styles/layout-grid.scss +12 -5
  39. package/styles/margin.scss +1 -1
  40. package/styles/padding.scss +1 -1
  41. package/styles/paragraph.scss +3 -0
  42. package/styles/position.scss +20 -4
  43. package/styles/width-height.scss +145 -0
  44. package/svg/array.svg +3 -0
  45. package/svg/bulb-light-idea-fill.svg +3 -0
  46. package/svg/css.svg +3 -0
  47. package/svg/developer.svg +3 -0
  48. package/svg/envelope.svg +3 -0
  49. package/svg/html.svg +3 -0
  50. package/svg/javascript.svg +3 -0
  51. package/svg/whatsapp.svg +3 -0
  52. package/tools/lib/breadcrumbs.tools.d.ts +11 -10
  53. package/tools/lib/coer-alert/coer-alert.component.d.ts +8 -10
  54. package/tools/lib/coer-grid.templates.d.ts +4 -4
  55. package/tools/lib/collections.tools.d.ts +13 -0
  56. package/tools/lib/colors.tools.d.ts +7 -2
  57. package/tools/lib/control-value.tools.d.ts +13 -12
  58. package/tools/lib/date-time.tools.d.ts +8 -7
  59. package/tools/lib/files.tools.d.ts +1 -1
  60. package/tools/lib/{elements-html.tools.d.ts → html-elements.tools.d.ts} +6 -6
  61. package/tools/lib/numbers.tools.d.ts +9 -0
  62. package/tools/lib/page.tools.d.ts +12 -14
  63. package/tools/lib/screen.tools.d.ts +7 -2
  64. package/tools/lib/section.tools.d.ts +19 -10
  65. package/tools/lib/service.tools.d.ts +11 -10
  66. package/tools/lib/source.tools.d.ts +9 -8
  67. package/tools/lib/{string.tools.d.ts → strings.tools.d.ts} +2 -1
  68. package/tools/lib/tools.d.ts +8 -23
  69. package/tools/lib/user.class.d.ts +6 -5
  70. package/tools/public-api.d.ts +4 -2
  71. /package/styles/{cursores.scss → cursors.scss} +0 -0
  72. /package/svg/{house.svg → house-fill.svg} +0 -0
@@ -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
- private SetIcon;
14
+ protected _Close(alert: 'alert-success' | 'alert-error' | 'alert-info' | 'alert-warning'): Promise<void>;
17
15
  /** */
18
- private SetAutoHide;
16
+ private _SetIcon;
19
17
  /** */
20
- private GetIcon;
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
- /** Template for boolean property */
3
+ /** Set Active/Disabled values, template for boolean property */
4
4
  isActiveTemplate: (item: IGridItem<any>) => string;
5
- /** Template for boolean property */
5
+ /** Enable switch by row, template for boolean property */
6
6
  coerSwitchTemplate: (item: IGridItem<any>) => IGridCoerSwitch;
7
- /** Template for text property */
7
+ /** Enable textbox by row, template for text property */
8
8
  coerTextboxTemplate: (item: IGridItem<any>) => IGridCoerTextBox;
9
- /** Template for text property */
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
- static ToHexadecimal(r: number, g: number, b: number, a?: number): string;
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 GetColorHexList(quantity: number): string[];
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
- export declare class ControlValue implements ControlValueAccessor {
8
- protected _value: any;
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
- setDisabledState(isDisabled: boolean): void;
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
- export declare class DateTime {
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?: string | Date | moment.Moment, format?: 'database' | 'display'): string;
21
- /** */
22
- static SetLastHour(date?: string | Date | moment.Moment, format?: 'database' | 'display'): string;
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
- /** Is Excel File */
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 ElementsHTML {
1
+ export declare class HTMLElements {
2
2
  /** */
3
3
  static GetElement: (selector: string) => HTMLElement | null;
4
4
  /** */
5
- static GetCssValueBy: (selector: string, style: string) => string;
5
+ static GetCssValueBySelector: (selector: string, style: string) => string;
6
6
  /** */
7
- static GetCssValue: (element: Element | null, style: string) => string;
8
- /** Get width in px */
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
- /** Get height in px */
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
- /** Get color in hexadecimal format */
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
+ }
@@ -3,10 +3,10 @@ import { AfterViewInit, OnDestroy } from '@angular/core';
3
3
  import { IBreadcrumb, IGoBack } from 'coer-elements/interfaces';
4
4
  import { CoerAlert } from './coer-alert/coer-alert.component';
5
5
  import * as i0 from "@angular/core";
6
- export declare class Page implements AfterViewInit, OnDestroy {
6
+ export declare abstract class Page implements AfterViewInit, OnDestroy {
7
7
  protected readonly alert: CoerAlert;
8
8
  protected readonly router: Router;
9
- private readonly activatedRoute;
9
+ private readonly __activatedRoute;
10
10
  /** */
11
11
  protected isUpdate: boolean;
12
12
  /** */
@@ -29,10 +29,10 @@ export declare class Page implements AfterViewInit, OnDestroy {
29
29
  protected pageFilters: any;
30
30
  /** */
31
31
  protected goBack: IGoBack;
32
- private _path;
33
- private _page;
34
- private _source;
35
- private _preventDestroy;
32
+ private __path;
33
+ private __page;
34
+ private __source;
35
+ private __preventDestroy;
36
36
  constructor(page: string);
37
37
  ngAfterViewInit(): Promise<void>;
38
38
  ngOnDestroy(): void;
@@ -68,18 +68,16 @@ export declare class Page implements AfterViewInit, OnDestroy {
68
68
  private __GetPageFilter;
69
69
  /** */
70
70
  protected RemovePageFilter(): void;
71
- /** */
72
- protected Log(value: any, log?: string | null): void;
73
- protected isActiveTemplate: (item: import("coer-elements/interfaces").IGridItem<any>) => string;
74
- protected coerSwitchTemplate: (item: import("coer-elements/interfaces").IGridItem<any>) => import("coer-elements/interfaces").IGridCoerSwitch;
75
- protected coerTextboxTemplate: (item: import("coer-elements/interfaces").IGridItem<any>) => import("coer-elements/interfaces").IGridCoerTextBox;
76
- protected coerIconTemplate: (icon: string, color?: string) => string;
71
+ /** Emit a console.log() */
72
+ protected Log(value: any, logName?: string | null): void;
73
+ /** Returns true if the value is null or undefined, false otherwise */
77
74
  protected IsNull: (value: any) => boolean;
75
+ /** Returns true if the value is not null or undefined, false otherwise */
78
76
  protected IsNotNull: (value: any) => boolean;
77
+ /** Returns true if the value is null or undefined or is an empty string or contains only whitespace, false otherwise */
79
78
  protected IsOnlyWhiteSpace: (value: any) => boolean;
79
+ /** Returns true if it has a string value and is not all whitespace, false otherwise */
80
80
  protected IsNotOnlyWhiteSpace: (value: any) => boolean;
81
- protected Sleep: (milliseconds?: number, reference?: string | null) => Promise<void>;
82
- protected IsInvalidElement: (element: any) => boolean;
83
81
  static ɵfac: i0.ɵɵFactoryDeclaration<Page, never>;
84
82
  static ɵcmp: i0.ɵɵComponentDeclaration<Page, "ng-component", never, {}, {}, never, never, true, never>;
85
83
  }
@@ -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,34 +1,43 @@
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
- export declare class Section<T> implements AfterViewInit, OnDestroy {
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, log?: string | null): void;
22
- protected isActiveTemplate: (item: import("coer-elements/interfaces").IGridItem<any>) => string;
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
- protected Sleep: (milliseconds?: number, reference?: string | null) => Promise<void>;
31
- protected IsInvalidElement: (element: any) => boolean;
32
41
  static ɵfac: i0.ɵɵFactoryDeclaration<Section<any>, never>;
33
42
  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>;
34
43
  }
@@ -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
- export declare class Service {
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 httpCode: {
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
- /** HTTP GET */
30
+ /** Generates a GET http request */
30
31
  protected HTTP_GET<T>(request: IHttpRequest<T>, cancelPrevious?: boolean): Promise<IHttpResponse<T>>;
31
- /** HTTP POST */
32
+ /** Generates a POST http request */
32
33
  protected HTTP_POST<T>(request: IHttpRequest<T>, cancelPrevious?: boolean): Promise<IHttpResponse<T>>;
33
- /** HTTP PUT */
34
+ /** Generates a PUT http request */
34
35
  protected HTTP_PUT<T>(request: IHttpRequest<T>, cancelPrevious?: boolean): Promise<IHttpResponse<void>>;
35
- /** HTTP PATCH */
36
+ /** Generates a PATCH http request */
36
37
  protected HTTP_PATCH<T>(request: IHttpRequest<T>, cancelPrevious?: boolean): Promise<IHttpResponse<void>>;
37
- /** HTTP DELETE */
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(page: string): void;
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
- export declare class StringTools {
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 */
@@ -1,38 +1,23 @@
1
+ /** Generic Methods */
1
2
  export declare const Tools: {
2
- /** Generate a Guid */
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 only whitespace, false otherwise */
11
+ /** Returns true if it has a string value and is not all whitespace, false otherwise */
11
12
  IsNotOnlyWhiteSpace: (value: any) => boolean;
12
- /** Avoid Null value */
13
- AvoidNull: <T>(value: T | null | undefined, type?: "string" | "number" | "boolean" | null) => T;
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 LogIn(): boolean;
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
  }
@@ -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-html.tools';
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/string.tools';
19
+ export * from './lib/strings.tools';
18
20
  export * from './lib/tools';
File without changes
File without changes