coer-elements 0.0.20 → 0.0.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. package/components/lib/coer-button/coer-button.component.d.ts +2 -2
  2. package/components/lib/coer-numberbox/coer-numberbox.component.d.ts +1 -1
  3. package/components/lib/coer-switch/coer-switch.component.d.ts +1 -1
  4. package/components/lib/coer-textarea/coer-textarea.component.d.ts +1 -1
  5. package/components/lib/coer-textbox/coer-textbox.component.d.ts +1 -1
  6. package/esm2022/pipes/lib/no-image.pipe.mjs +2 -2
  7. package/esm2022/public_api.mjs +1 -1
  8. package/esm2022/tools/index.mjs +3 -2
  9. package/esm2022/tools/lib/service.class.mjs +248 -0
  10. package/fesm2022/coer-elements.mjs +247 -2
  11. package/fesm2022/coer-elements.mjs.map +1 -1
  12. package/package.json +1 -1
  13. package/public_api.d.ts +1 -5
  14. package/styles/angular-material.scss +12 -0
  15. package/{src/styles → styles}/bootstrap.scss +3 -3
  16. package/tools/index.d.ts +2 -1
  17. package/tools/lib/service.class.d.ts +39 -0
  18. package/src/interfaces/index.ts +0 -49
  19. package/src/interfaces/lib/app-source.interface.ts +0 -4
  20. package/src/interfaces/lib/coer-filebox/file-image.interface.ts +0 -14
  21. package/src/interfaces/lib/coer-filebox/file.interface.ts +0 -5
  22. package/src/interfaces/lib/coer-grid/grid-button-by-row.interface.ts +0 -7
  23. package/src/interfaces/lib/coer-grid/grid-checkbox.interface.ts +0 -5
  24. package/src/interfaces/lib/coer-grid/grid-coer-numberbox.interface.ts +0 -12
  25. package/src/interfaces/lib/coer-grid/grid-coer-selectbox.interface.ts +0 -9
  26. package/src/interfaces/lib/coer-grid/grid-coer-switch.interface.ts +0 -6
  27. package/src/interfaces/lib/coer-grid/grid-coer-textbox.interface.ts +0 -11
  28. package/src/interfaces/lib/coer-grid/grid-column.interface.ts +0 -23
  29. package/src/interfaces/lib/coer-grid/grid-data-source.interface.ts +0 -6
  30. package/src/interfaces/lib/coer-grid/grid-header-button.interface.ts +0 -8
  31. package/src/interfaces/lib/coer-grid/grid-header-export-button.interface.ts +0 -10
  32. package/src/interfaces/lib/coer-grid/grid-header.interface.ts +0 -5
  33. package/src/interfaces/lib/coer-grid/grid-import.interface.ts +0 -4
  34. package/src/interfaces/lib/coer-grid/grid-input-checkbox.interface.ts +0 -5
  35. package/src/interfaces/lib/coer-grid/grid-input-switch-change.interface.ts +0 -5
  36. package/src/interfaces/lib/coer-grid/grid-input-textbox.interface.ts +0 -5
  37. package/src/interfaces/lib/coer-grid/grid-item.interface.ts +0 -5
  38. package/src/interfaces/lib/coer-grid/grid-keyup-enter.interface.ts +0 -6
  39. package/src/interfaces/lib/coer-grid/grid-length.interface.ts +0 -5
  40. package/src/interfaces/lib/coer-grid/grid-search.interface.ts +0 -4
  41. package/src/interfaces/lib/coer-grid/grid-sort.interface.ts +0 -5
  42. package/src/interfaces/lib/coer-menu/menu-option-selected.interface.ts +0 -10
  43. package/src/interfaces/lib/coer-menu/menu-selected.interface.ts +0 -11
  44. package/src/interfaces/lib/coer-menu/menu.interface.ts +0 -6
  45. package/src/interfaces/lib/coer-ref.interface.ts +0 -11
  46. package/src/interfaces/lib/page-title/breadcrumb.interface.ts +0 -6
  47. package/src/interfaces/lib/page-title/go-back.interface.ts +0 -6
  48. package/src/interfaces/lib/screen-size.interface.ts +0 -5
  49. package/src/interfaces/lib/service/http-request.interface.ts +0 -11
  50. package/src/interfaces/lib/service/http-response.interface.ts +0 -6
  51. package/src/interfaces/lib/service/patch.interface.ts +0 -5
  52. package/src/styles/angular-material.scss +0 -12
  53. /package/{src/images → images}/no-image.png +0 -0
  54. /package/{src/images → images}/no-user.png +0 -0
  55. /package/{src/styles → styles}/colors.scss +0 -0
  56. /package/{src/styles → styles}/containers.scss +0 -0
  57. /package/{src/styles → styles}/cursores.scss +0 -0
  58. /package/{src/styles → styles}/index.scss +0 -0
  59. /package/{src/styles → styles}/layout.scss +0 -0
  60. /package/{src/styles → styles}/scroll-bar.scss +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coer-elements",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
4
4
  "author": "Christian Omar Escamilla Rodríguez",
5
5
  "keywords": [
6
6
  "coer",
package/public_api.d.ts CHANGED
@@ -1,5 +1 @@
1
- export * from './components';
2
- export * from './directives';
3
- export * from './pipes';
4
- export * from './signals';
5
- export * from './tools';
1
+ export {};
@@ -0,0 +1,12 @@
1
+ /********** COER styles **********/
2
+ //@import "src/app/home/components/coer-sidenav/coer-sidenav.component.scss";
3
+ //@import "src/app/home/components/coer-tree-accordion/coer-tree-accordion.component.scss";
4
+ //@import "src/app/home/components/coer-menu-option/coer-menu-option.component.scss";
5
+ @import "../src/components/lib/coer-button/coer-button.component.scss";
6
+ @import "../src/components/lib/coer-textbox/coer-textbox.component.scss";
7
+ @import "../src/components/lib/coer-textarea/coer-textarea.component.scss";
8
+ @import "../src/components/lib/coer-selectbox/coer-selectbox.component.scss";
9
+ @import "../src/components/lib/coer-numberbox/coer-numberbox.component.scss";
10
+ @import "../src/components/lib/coer-switch/coer-switch.component.scss";
11
+ @import "../src/components/lib/coer-checkbox/coer-checkbox.component.scss";
12
+ @import "../src/components/lib/coer-tab/coer-tab.component.scss";
@@ -14,6 +14,6 @@
14
14
  height: 0px !important;
15
15
  }
16
16
 
17
- @import "../components/lib/coer-page-title/coer-page-title.component.scss";
18
- @import "../components/lib/coer-grid/coer-grid.component.scss";
19
- @import "../components/lib/coer-modal/coer-modal.component.scss";
17
+ @import "../src/components/lib/coer-page-title/coer-page-title.component.scss";
18
+ @import "../src/components/lib/coer-grid/coer-grid.component.scss";
19
+ @import "../src/components/lib/coer-modal/coer-modal.component.scss";
package/tools/index.d.ts CHANGED
@@ -2,8 +2,9 @@ export * from './lib/breadcrumbs.class';
2
2
  export * from './lib/control-value.class';
3
3
  export * from './lib/date-time.class';
4
4
  export * from './lib/files.class';
5
- export * from './lib/tools';
6
5
  export * from './lib/menu.class';
7
6
  export * from './lib/page.class';
8
7
  export * from './lib/screen.class';
8
+ export * from './lib/service.class';
9
9
  export * from './lib/source.class';
10
+ export * from './lib/tools';
@@ -0,0 +1,39 @@
1
+ import { HttpClient } from "@angular/common/http";
2
+ import { CoerAlert } from "../../components/lib/coer-alert/coer-alert.component";
3
+ import { IHttpRequest, IHttpResponse } from "../../interfaces";
4
+ export declare class Service {
5
+ protected readonly alert: CoerAlert;
6
+ protected readonly http: HttpClient;
7
+ protected httpCode: {
8
+ Ok: number;
9
+ Created: number;
10
+ NoContent: number;
11
+ BadRequest: number;
12
+ Unauthorize: number;
13
+ NotFound: number;
14
+ NotAllowed: number;
15
+ NotAcceptable: number;
16
+ Conflict: number;
17
+ PayloadTooLarge: number;
18
+ InnerError: number;
19
+ };
20
+ private _GET$;
21
+ private _POST$;
22
+ private _PUT$;
23
+ private _PATCH$;
24
+ private _DELETE$;
25
+ /** */
26
+ private ReleaseSubscription;
27
+ /** HTTP GET */
28
+ protected HTTP_GET<T>(request: IHttpRequest<T>): Promise<IHttpResponse<T>>;
29
+ /** HTTP POST */
30
+ protected HTTP_POST<T>(request: IHttpRequest<T>): Promise<IHttpResponse<T>>;
31
+ /** HTTP PUT */
32
+ protected HTTP_PUT<T>(request: IHttpRequest<T>): Promise<IHttpResponse<void>>;
33
+ /** HTTP PATCH */
34
+ protected HTTP_PATCH<T>(request: IHttpRequest<T>): Promise<IHttpResponse<void>>;
35
+ /** HTTP DELETE */
36
+ protected HTTP_DELETE<T>(request: IHttpRequest<T>): Promise<IHttpResponse<void>>;
37
+ /** */
38
+ private AlertError;
39
+ }
@@ -1,49 +0,0 @@
1
- //coer-filebox
2
- export * from './lib/coer-filebox/file-image.interface';
3
- export * from './lib/coer-filebox/file.interface';
4
-
5
- //coer-grid
6
- export * from './lib/coer-grid/grid-button-by-row.interface';
7
- export * from './lib/coer-grid/grid-checkbox.interface';
8
- export * from './lib/coer-grid/grid-coer-numberbox.interface';
9
- export * from './lib/coer-grid/grid-coer-selectbox.interface';
10
- export * from './lib/coer-grid/grid-coer-switch.interface';
11
- export * from './lib/coer-grid/grid-coer-textbox.interface';
12
- export * from './lib/coer-grid/grid-column.interface';
13
- export * from './lib/coer-grid/grid-data-source.interface';
14
- export * from './lib/coer-grid/grid-header-button.interface';
15
- export * from './lib/coer-grid/grid-header-export-button.interface';
16
- export * from './lib/coer-grid/grid-header.interface';
17
- export * from './lib/coer-grid/grid-import.interface';
18
- export * from './lib/coer-grid/grid-input-checkbox.interface';
19
- export * from './lib/coer-grid/grid-input-switch-change.interface';
20
- export * from './lib/coer-grid/grid-input-textbox.interface';
21
- export * from './lib/coer-grid/grid-item.interface';
22
- export * from './lib/coer-grid/grid-keyup-enter.interface';
23
- export * from './lib/coer-grid/grid-length.interface';
24
- export * from './lib/coer-grid/grid-search.interface';
25
- export * from './lib/coer-grid/grid-sort.interface';
26
-
27
- //coer-menu
28
- export * from './lib/coer-menu/menu-option-selected.interface';
29
- export * from './lib/coer-menu/menu-selected.interface';
30
- export * from './lib/coer-menu/menu.interface';
31
-
32
- //page-title
33
- export * from './lib/page-title/breadcrumb.interface';
34
- export * from './lib/page-title/go-back.interface';
35
-
36
- //service
37
- export * from './lib/service/http-request.interface';
38
- export * from './lib/service/http-response.interface';
39
- export * from './lib/service/patch.interface';
40
-
41
- export * from './lib/app-source.interface';
42
- export * from './lib/coer-ref.interface';
43
- export * from './lib/screen-size.interface';
44
-
45
-
46
-
47
-
48
-
49
-
@@ -1,4 +0,0 @@
1
- export interface IAppSource {
2
- page: string;
3
- path: string;
4
- }
@@ -1,14 +0,0 @@
1
- export interface IFileImage {
2
- value: string | File | null | undefined;
3
- name?: string;
4
- width?: string;
5
- maxWidth?: string;
6
- height?: string;
7
- maxHeight?: string;
8
- marginTop?: string;
9
- marginRight?: string;
10
- marginBottom?: string;
11
- marginLeft?: string;
12
- allowDelete?: boolean;
13
- allowExpand?: boolean;
14
- }
@@ -1,5 +0,0 @@
1
- export interface IFile {
2
- file: File;
3
- extension: string;
4
- base64: string | null;
5
- }
@@ -1,7 +0,0 @@
1
- import { IGridItem } from "./grid-item.interface";
2
-
3
- export interface IGridButtonByRow<T> {
4
- showEditButton?: boolean | ((item: IGridItem<T>) => boolean);
5
- showDeleteButton?: boolean | ((item: IGridItem<T>) => boolean);
6
- showGoButton?: boolean | ((item: IGridItem<T>) => boolean);
7
- }
@@ -1,5 +0,0 @@
1
- export interface IGridCheckbox {
2
- show: boolean;
3
- onlyOneCheck?: boolean;
4
- checkOnRow?: boolean;
5
- }
@@ -1,12 +0,0 @@
1
- export interface IGridCoerNumberBox {
2
- isInput: boolean;
3
- isDisabled?: boolean;
4
- isValid?: boolean;
5
- isInvalid?: boolean;
6
- selectOnFocus?: boolean;
7
- placeholder?: string;
8
- textPosition?: 'left' | 'center' | 'right';
9
- min?: number;
10
- max?: number;
11
- decimals?: number;
12
- }
@@ -1,9 +0,0 @@
1
- export interface IGridCoerSelectBox {
2
- isInput: boolean;
3
- isDisabled?: boolean;
4
- isValid?: boolean;
5
- isInvalid?: boolean;
6
- placeholder?: string;
7
- propDisplay?: string;
8
- dataSource?: any[];
9
- }
@@ -1,6 +0,0 @@
1
- export interface IGridCoerSwitch {
2
- isInput: boolean;
3
- isDisabled?: boolean;
4
- tooltip?: string;
5
- tooltipPosition?: 'top' | 'right' | 'bottom' | 'left';
6
- }
@@ -1,11 +0,0 @@
1
- export interface IGridCoerTextBox {
2
- isInput: boolean;
3
- isDisabled?: boolean;
4
- isValid?: boolean;
5
- isInvalid?: boolean;
6
- selectOnFocus?: boolean;
7
- placeholder?: string;
8
- textPosition?: 'left' | 'center' | 'right';
9
- minLength?: number;
10
- maxLength?: number;
11
- }
@@ -1,23 +0,0 @@
1
- import { IGridCoerNumberBox } from "./grid-coer-numberbox.interface";
2
- import { IGridCoerSelectBox } from "./grid-coer-selectbox.interface";
3
- import { IGridCoerSwitch } from "./grid-coer-switch.interface";
4
- import { IGridCoerTextBox } from "./grid-coer-textbox.interface";
5
- import { IGridItem } from "./grid-item.interface";
6
-
7
- export interface IGridColumn<T> {
8
- property: string;
9
- alias?: string;
10
- width?: string;
11
- textAlign?: 'left' | 'center' | 'right';
12
- colorBlue?: boolean | ((item: IGridItem<T>) => boolean);
13
- colorGreen?: boolean | ((item: IGridItem<T>) => boolean);
14
- colorYellow?: boolean | ((item: IGridItem<T>) => boolean);
15
- colorRed?: boolean | ((item: IGridItem<T>) => boolean);
16
- typeNumber?: boolean | ((item: IGridItem<T>) => boolean);
17
- typeDate?: boolean | ((item: IGridItem<T>) => boolean);
18
- template?: string | ((item: IGridItem<T>) => string);
19
- coerSwitch?: ((item: IGridItem<T>) => IGridCoerSwitch);
20
- coerTextbox?: ((item: IGridItem<T>) => IGridCoerTextBox);
21
- coerNumberbox?: ((item: IGridItem<T>) => IGridCoerNumberBox);
22
- coerSelectbox?: ((item: IGridItem<T>) => IGridCoerSelectBox);
23
- }
@@ -1,6 +0,0 @@
1
- export interface IGridDataSource {
2
- groupBy: string;
3
- indexGroup: number;
4
- length: number;
5
- rows: any[];
6
- }
@@ -1,8 +0,0 @@
1
- export interface IGridHeaderButton {
2
- show: boolean;
3
- path?: string | (string | number)[];
4
- tooltip?: string;
5
- isDisabled?: boolean;
6
- preventDefault?: boolean;
7
- Autofill?: boolean;
8
- }
@@ -1,10 +0,0 @@
1
- export interface IGridHeaderExportButton {
2
- show: boolean;
3
- path?: string | (string | number)[];
4
- tooltip?: string;
5
- isDisabled?: boolean;
6
- fileName?: string;
7
- onlyColumnFiltered?: boolean;
8
- onlyRowFiltered?: boolean;
9
- preventDefault?: boolean;
10
- }
@@ -1,5 +0,0 @@
1
- export interface IGridHeader {
2
- indexColumn: number;
3
- columnName: string;
4
- width: string;
5
- }
@@ -1,4 +0,0 @@
1
- export interface IGridImport<T> {
2
- data: T[];
3
- file: File | null;
4
- }
@@ -1,5 +0,0 @@
1
- export interface IGridInputCheckbox<T> {
2
- all: boolean;
3
- checked: boolean;
4
- rows: T[];
5
- }
@@ -1,5 +0,0 @@
1
- export interface IGridInputSwitchChange<T> {
2
- property: string;
3
- row: T;
4
- value: any;
5
- }
@@ -1,5 +0,0 @@
1
- export interface IGridInputTextbox<T> {
2
- property: string;
3
- row: T;
4
- value: any;
5
- }
@@ -1,5 +0,0 @@
1
- export interface IGridItem<T> {
2
- property: string;
3
- row: T
4
- value: any;
5
- }
@@ -1,6 +0,0 @@
1
- export interface IGridKeyupEnter {
2
- id: string;
3
- input: 'coer-textbox-search' | 'coer-textbox' | 'coer-numberbox' | 'coer-selectbox';
4
- row: any;
5
- value: any;
6
- }
@@ -1,5 +0,0 @@
1
- export interface IGridLength {
2
- dataSource: number;
3
- dataSourceFiltered: number;
4
- dataSourceSelected: number;
5
- }
@@ -1,4 +0,0 @@
1
- export interface IGridSearch {
2
- show: boolean;
3
- ignore?: boolean;
4
- }
@@ -1,5 +0,0 @@
1
- export interface IGridSort {
2
- columnName: string;
3
- direction: 'ascendant' | 'descendant' | 'none';
4
- icon: 'fa-solid fa-arrow-up-wide-short' | 'fa-solid fa-arrow-down-short-wide' | '';
5
- }
@@ -1,10 +0,0 @@
1
- import { IMenu } from "./menu.interface";
2
-
3
- export interface IMenuOptionSelected {
4
- level: number;
5
- label: string;
6
- icon: string;
7
- path: string;
8
- queryParams: string;
9
- tree: IMenu[];
10
- }
@@ -1,11 +0,0 @@
1
- import { IMenu } from "./menu.interface";
2
-
3
- export interface IMenuSelected {
4
- level: number;
5
- label: string;
6
- icon: string;
7
- isExpanded: boolean;
8
- isCollapsed: boolean;
9
- items?: IMenu[];
10
- tree: IMenu[];
11
- }
@@ -1,6 +0,0 @@
1
- export interface IMenu {
2
- label: string;
3
- icon?: string;
4
- path?: string;
5
- items?: IMenu[];
6
- }
@@ -1,11 +0,0 @@
1
- import { TemplateRef, WritableSignal } from '@angular/core';
2
-
3
- export interface ICoerRef {
4
- coerRef: WritableSignal<string>;
5
- title: WritableSignal<string>;
6
- icon: WritableSignal<string>;
7
- isDisabled: WritableSignal<boolean>;
8
- show: WritableSignal<boolean>;
9
- tooltip: WritableSignal<string>;
10
- template: TemplateRef<any>;
11
- }
@@ -1,6 +0,0 @@
1
- export interface IBreadcrumb {
2
- page: string;
3
- path?: string | null;
4
- queryParams?: any;
5
- click?: (() => any);
6
- }
@@ -1,6 +0,0 @@
1
- export interface IGoBack {
2
- show: boolean;
3
- path?: string | null;
4
- queryParams?: any;
5
- click?: (() => any);
6
- }
@@ -1,5 +0,0 @@
1
- export interface IScreenSize {
2
- width: number;
3
- height: number;
4
- breakpoin: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
5
- }
@@ -1,11 +0,0 @@
1
- import { HttpHeaders, HttpParams } from "@angular/common/http";
2
- import { IPatch } from "./patch.interface";
3
-
4
- export interface IHttpRequest<T> {
5
- url: string;
6
- body?: T | IPatch[] | {};
7
- queryParams?: HttpParams;
8
- headers?: HttpHeaders;
9
- alertSuccess?: string;
10
- alertError?: string;
11
- }
@@ -1,6 +0,0 @@
1
- export interface IHttpResponse<T> {
2
- body: T;
3
- status: number;
4
- message: string;
5
- ok: boolean;
6
- }
@@ -1,5 +0,0 @@
1
- export interface IPatch {
2
- op: 'remove' | 'add' | 'replace';
3
- path: string;
4
- value: any;
5
- }
@@ -1,12 +0,0 @@
1
- /********** COER styles **********/
2
- //@import "src/app/home/components/coer-sidenav/coer-sidenav.component.scss";
3
- //@import "src/app/home/components/coer-tree-accordion/coer-tree-accordion.component.scss";
4
- //@import "src/app/home/components/coer-menu-option/coer-menu-option.component.scss";
5
- @import "../components/lib/coer-button/coer-button.component.scss";
6
- @import "../components/lib/coer-textbox/coer-textbox.component.scss";
7
- @import "../components/lib/coer-textarea/coer-textarea.component.scss";
8
- @import "../components/lib/coer-selectbox/coer-selectbox.component.scss";
9
- @import "../components/lib/coer-numberbox/coer-numberbox.component.scss";
10
- @import "../components/lib/coer-switch/coer-switch.component.scss";
11
- @import "../components/lib/coer-checkbox/coer-checkbox.component.scss";
12
- @import "../components/lib/coer-tab/coer-tab.component.scss";
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes