ngx-redi-core 21.0.0 → 21.0.2
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/fesm2022/ngx-redi-core-Helper.mjs +324 -0
- package/fesm2022/ngx-redi-core-Helper.mjs.map +1 -0
- package/fesm2022/ngx-redi-core-RediBreadCrumb.mjs +48 -0
- package/fesm2022/ngx-redi-core-RediBreadCrumb.mjs.map +1 -0
- package/fesm2022/ngx-redi-core-RediContainer.mjs +60 -0
- package/fesm2022/ngx-redi-core-RediContainer.mjs.map +1 -0
- package/fesm2022/ngx-redi-core-RediDetail.mjs +31 -0
- package/fesm2022/ngx-redi-core-RediDetail.mjs.map +1 -0
- package/fesm2022/ngx-redi-core-RediDialog.mjs +90 -0
- package/fesm2022/ngx-redi-core-RediDialog.mjs.map +1 -0
- package/fesm2022/ngx-redi-core-RediDragDrop.mjs +629 -0
- package/fesm2022/ngx-redi-core-RediDragDrop.mjs.map +1 -0
- package/fesm2022/ngx-redi-core-RediForms.mjs +141 -0
- package/fesm2022/ngx-redi-core-RediForms.mjs.map +1 -0
- package/fesm2022/ngx-redi-core-RediGrid.mjs +200 -0
- package/fesm2022/ngx-redi-core-RediGrid.mjs.map +1 -0
- package/fesm2022/ngx-redi-core-RediMenu.mjs +67 -0
- package/fesm2022/ngx-redi-core-RediMenu.mjs.map +1 -0
- package/fesm2022/ngx-redi-core-RediSemaphore.mjs +23 -0
- package/fesm2022/ngx-redi-core-RediSemaphore.mjs.map +1 -0
- package/fesm2022/ngx-redi-core-RediTable.mjs +532 -0
- package/fesm2022/ngx-redi-core-RediTable.mjs.map +1 -0
- package/fesm2022/ngx-redi-core-RediTransposeList.mjs +91 -0
- package/fesm2022/ngx-redi-core-RediTransposeList.mjs.map +1 -0
- package/fesm2022/ngx-redi-core-Security.mjs +339 -0
- package/fesm2022/ngx-redi-core-Security.mjs.map +1 -0
- package/fesm2022/ngx-redi-core.mjs +14 -0
- package/fesm2022/ngx-redi-core.mjs.map +1 -0
- package/package.json +77 -14
- package/types/ngx-redi-core-Helper.d.ts +212 -0
- package/types/ngx-redi-core-RediBreadCrumb.d.ts +14 -0
- package/types/ngx-redi-core-RediContainer.d.ts +28 -0
- package/types/ngx-redi-core-RediDetail.d.ts +25 -0
- package/types/ngx-redi-core-RediDialog.d.ts +43 -0
- package/types/ngx-redi-core-RediDragDrop.d.ts +273 -0
- package/types/ngx-redi-core-RediForms.d.ts +42 -0
- package/types/ngx-redi-core-RediGrid.d.ts +177 -0
- package/types/ngx-redi-core-RediMenu.d.ts +23 -0
- package/types/ngx-redi-core-RediSemaphore.d.ts +8 -0
- package/types/ngx-redi-core-RediTable.d.ts +242 -0
- package/types/ngx-redi-core-RediTransposeList.d.ts +25 -0
- package/types/ngx-redi-core-Security.d.ts +153 -0
- package/types/ngx-redi-core.d.ts +6 -0
- package/Helper/index.ts +0 -2
- package/Helper/ng-package.json +0 -6
- package/Helper/public-api.ts +0 -10
- package/Helper/src/helpers/bag-data-subject.service.spec.ts +0 -16
- package/Helper/src/helpers/bag-data-subject.service.ts +0 -66
- package/Helper/src/helpers/csv.service.spec.ts +0 -16
- package/Helper/src/helpers/csv.service.ts +0 -71
- package/Helper/src/helpers/data-subject.service.spec.ts +0 -16
- package/Helper/src/helpers/data-subject.service.ts +0 -53
- package/Helper/src/helpers/form-bind.service.spec.ts +0 -16
- package/Helper/src/helpers/form-bind.service.ts +0 -30
- package/Helper/src/helpers/location.service.spec.ts +0 -16
- package/Helper/src/helpers/location.service.ts +0 -27
- package/Helper/src/helpers/query-filters.service.spec.ts +0 -16
- package/Helper/src/helpers/query-filters.service.ts +0 -85
- package/Helper/src/models/interfaces/data-subject.interface.ts +0 -24
- package/Helper/src/models/interfaces/query-filters.ts +0 -34
- package/RediBreadCrumb/index.ts +0 -2
- package/RediBreadCrumb/ng-package.json +0 -6
- package/RediBreadCrumb/public-api.ts +0 -2
- package/RediBreadCrumb/src/components/redi-bread-crumb/redi-bread-crumb.component.html +0 -4
- package/RediBreadCrumb/src/components/redi-bread-crumb/redi-bread-crumb.component.scss +0 -20
- package/RediBreadCrumb/src/components/redi-bread-crumb/redi-bread-crumb.component.spec.ts +0 -23
- package/RediBreadCrumb/src/components/redi-bread-crumb/redi-bread-crumb.component.ts +0 -43
- package/RediContainer/index.ts +0 -2
- package/RediContainer/ng-package.json +0 -6
- package/RediContainer/public-api.ts +0 -6
- package/RediContainer/src/components/redi-actions-container/redi-actions-container.component.html +0 -1
- package/RediContainer/src/components/redi-actions-container/redi-actions-container.component.scss +0 -3
- package/RediContainer/src/components/redi-actions-container/redi-actions-container.component.spec.ts +0 -23
- package/RediContainer/src/components/redi-actions-container/redi-actions-container.component.ts +0 -11
- package/RediContainer/src/components/redi-body-container/redi-body-container.component.html +0 -1
- package/RediContainer/src/components/redi-body-container/redi-body-container.component.scss +0 -3
- package/RediContainer/src/components/redi-body-container/redi-body-container.component.spec.ts +0 -23
- package/RediContainer/src/components/redi-body-container/redi-body-container.component.ts +0 -11
- package/RediContainer/src/components/redi-container/redi-container.component.html +0 -10
- package/RediContainer/src/components/redi-container/redi-container.component.scss +0 -7
- package/RediContainer/src/components/redi-container/redi-container.component.spec.ts +0 -23
- package/RediContainer/src/components/redi-container/redi-container.component.ts +0 -14
- package/RediContainer/src/components/redi-subtitle-container/redi-subtitle-container.component.html +0 -1
- package/RediContainer/src/components/redi-subtitle-container/redi-subtitle-container.component.scss +0 -8
- package/RediContainer/src/components/redi-subtitle-container/redi-subtitle-container.component.spec.ts +0 -23
- package/RediContainer/src/components/redi-subtitle-container/redi-subtitle-container.component.ts +0 -11
- package/RediContainer/src/components/redi-title-container/redi-title-container.component.html +0 -6
- package/RediContainer/src/components/redi-title-container/redi-title-container.component.scss +0 -17
- package/RediContainer/src/components/redi-title-container/redi-title-container.component.spec.ts +0 -23
- package/RediContainer/src/components/redi-title-container/redi-title-container.component.ts +0 -11
- package/RediDetail/index.ts +0 -2
- package/RediDetail/ng-package.json +0 -6
- package/RediDetail/public-api.ts +0 -4
- package/RediDetail/src/components/redi-detail-object/redi-detail-object.component.html +0 -8
- package/RediDetail/src/components/redi-detail-object/redi-detail-object.component.scss +0 -28
- package/RediDetail/src/components/redi-detail-object/redi-detail-object.component.spec.ts +0 -23
- package/RediDetail/src/components/redi-detail-object/redi-detail-object.component.ts +0 -21
- package/RediDetail/src/models/interfaces/detail-item.interface.ts +0 -14
- package/RediDialog/index.ts +0 -2
- package/RediDialog/ng-package.json +0 -6
- package/RediDialog/public-api.ts +0 -4
- package/RediDialog/src/components/redi-dialog/redi-dialog.component.css +0 -15
- package/RediDialog/src/components/redi-dialog/redi-dialog.component.html +0 -10
- package/RediDialog/src/components/redi-dialog/redi-dialog.component.spec.ts +0 -23
- package/RediDialog/src/components/redi-dialog/redi-dialog.component.ts +0 -59
- package/RediDialog/src/models/dialog-data.interface.ts +0 -7
- package/RediDialog/src/services/redi-dialog.service.spec.ts +0 -16
- package/RediDialog/src/services/redi-dialog.service.ts +0 -26
- package/RediDragDrop/index.ts +0 -2
- package/RediDragDrop/ng-package.json +0 -6
- package/RediDragDrop/public-api.ts +0 -5
- package/RediDragDrop/src/assets/cloud.svg +0 -1
- package/RediDragDrop/src/assets/documento.svg +0 -1
- package/RediDragDrop/src/assets/lista.svg +0 -1
- package/RediDragDrop/src/models/classes/proceso-archivo-csv.spec.ts +0 -72
- package/RediDragDrop/src/models/classes/proceso-archivo-csv.ts +0 -133
- package/RediDragDrop/src/models/directives/drag-drop.directive.spec.ts +0 -85
- package/RediDragDrop/src/models/directives/drag-drop.directive.ts +0 -78
- package/RediDragDrop/src/modules/redi-drag-drop/redi-drag-drop.component.html +0 -52
- package/RediDragDrop/src/modules/redi-drag-drop/redi-drag-drop.component.scss +0 -125
- package/RediDragDrop/src/modules/redi-drag-drop/redi-drag-drop.component.spec.ts +0 -239
- package/RediDragDrop/src/modules/redi-drag-drop/redi-drag-drop.component.ts +0 -403
- package/RediDragDrop/src/modules/redi-drag-drop.module.ts +0 -25
- package/RediForms/index.ts +0 -2
- package/RediForms/ng-package.json +0 -6
- package/RediForms/public-api.ts +0 -4
- package/RediForms/src/directives/auto-focus.directive.spec.ts +0 -8
- package/RediForms/src/directives/auto-focus.directive.ts +0 -19
- package/RediForms/src/directives/place-holder.directive.spec.ts +0 -8
- package/RediForms/src/directives/place-holder.directive.ts +0 -26
- package/RediForms/src/helpers/form-bind.service.spec.ts +0 -16
- package/RediForms/src/helpers/form-bind.service.ts +0 -30
- package/RediForms/src/models/validators/input-validator.spec.ts +0 -7
- package/RediForms/src/models/validators/input-validator.ts +0 -61
- package/RediGrid/index.ts +0 -2
- package/RediGrid/ng-package.json +0 -6
- package/RediGrid/public-api.ts +0 -6
- package/RediGrid/src/models/interfaces/cell.ts +0 -44
- package/RediGrid/src/models/interfaces/data-grid.ts +0 -36
- package/RediGrid/src/modules/redi-grid/redi-grid.component.css +0 -123
- package/RediGrid/src/modules/redi-grid/redi-grid.component.html +0 -37
- package/RediGrid/src/modules/redi-grid/redi-grid.component.spec.ts +0 -69
- package/RediGrid/src/modules/redi-grid/redi-grid.component.ts +0 -189
- package/RediGrid/src/modules/redi-grid.module.ts +0 -22
- package/RediMenu/index.ts +0 -2
- package/RediMenu/ng-package.json +0 -6
- package/RediMenu/public-api.ts +0 -3
- package/RediMenu/src/components/redi-leading-item-menu/redi-leading-item-menu.component.html +0 -1
- package/RediMenu/src/components/redi-leading-item-menu/redi-leading-item-menu.component.scss +0 -6
- package/RediMenu/src/components/redi-leading-item-menu/redi-leading-item-menu.component.spec.ts +0 -23
- package/RediMenu/src/components/redi-leading-item-menu/redi-leading-item-menu.component.ts +0 -11
- package/RediMenu/src/components/redi-menu/redi-menu.component.html +0 -10
- package/RediMenu/src/components/redi-menu/redi-menu.component.scss +0 -24
- package/RediMenu/src/components/redi-menu/redi-menu.component.spec.ts +0 -23
- package/RediMenu/src/components/redi-menu/redi-menu.component.ts +0 -54
- package/RediSemaphore/index.ts +0 -2
- package/RediSemaphore/ng-package.json +0 -6
- package/RediSemaphore/public-api.ts +0 -2
- package/RediSemaphore/src/components/redi-semaphore/redi-semaphore.component.html +0 -1
- package/RediSemaphore/src/components/redi-semaphore/redi-semaphore.component.scss +0 -10
- package/RediSemaphore/src/components/redi-semaphore/redi-semaphore.component.spec.ts +0 -23
- package/RediSemaphore/src/components/redi-semaphore/redi-semaphore.component.ts +0 -13
- package/RediTable/index.ts +0 -2
- package/RediTable/ng-package.json +0 -6
- package/RediTable/public-api.ts +0 -8
- package/RediTable/src/components/filter-data/filter-data.component.css +0 -26
- package/RediTable/src/components/filter-data/filter-data.component.html +0 -17
- package/RediTable/src/components/filter-data/filter-data.component.spec.ts +0 -23
- package/RediTable/src/components/filter-data/filter-data.component.ts +0 -96
- package/RediTable/src/components/redi-table/redi-table.component.css +0 -194
- package/RediTable/src/components/redi-table/redi-table.component.html +0 -133
- package/RediTable/src/components/redi-table/redi-table.component.spec.ts +0 -23
- package/RediTable/src/components/redi-table/redi-table.component.ts +0 -451
- package/RediTable/src/components/redi-table-col/redi-table-col.component.css +0 -0
- package/RediTable/src/components/redi-table-col/redi-table-col.component.html +0 -1
- package/RediTable/src/components/redi-table-col/redi-table-col.component.spec.ts +0 -23
- package/RediTable/src/components/redi-table-col/redi-table-col.component.ts +0 -41
- package/RediTable/src/models/interfaces/column-definition.ts +0 -26
- package/RediTable/src/models/interfaces/data-table.ts +0 -32
- package/RediTable/src/models/interfaces/filter-item.ts +0 -5
- package/RediTable/src/models/interfaces/row-action.ts +0 -18
- package/RediTable/src/models/types/event-table.type.spec.ts +0 -7
- package/RediTable/src/models/types/event-table.type.ts +0 -3
- package/RediTransposeList/index.ts +0 -2
- package/RediTransposeList/ng-package.json +0 -6
- package/RediTransposeList/public-api.ts +0 -2
- package/RediTransposeList/src/components/redi-transpose-list/redi-transpose-list.component.html +0 -37
- package/RediTransposeList/src/components/redi-transpose-list/redi-transpose-list.component.scss +0 -92
- package/RediTransposeList/src/components/redi-transpose-list/redi-transpose-list.component.spec.ts +0 -68
- package/RediTransposeList/src/components/redi-transpose-list/redi-transpose-list.component.ts +0 -109
- package/Security/index.ts +0 -2
- package/Security/ng-package.json +0 -6
- package/Security/public-api.ts +0 -6
- package/Security/src/modules/security-web-intercept/interceptors/redi-secure.interceptor.spec.ts +0 -225
- package/Security/src/modules/security-web-intercept/interceptors/redi-secure.interceptor.ts +0 -96
- package/Security/src/modules/security-web-intercept/models/secure-factory.model.spec.ts +0 -31
- package/Security/src/modules/security-web-intercept/models/secure-factory.model.ts +0 -28
- package/Security/src/modules/security-web-intercept/models/tipo-operacion.enum.ts +0 -19
- package/Security/src/modules/security-web-intercept/services/cifrado-basico.service.spec.ts +0 -16
- package/Security/src/modules/security-web-intercept/services/cifrado-basico.service.ts +0 -53
- package/Security/src/modules/security-web-intercept/services/cifrado.service.spec.ts +0 -25
- package/Security/src/modules/security-web-intercept/services/cifrado.service.ts +0 -29
- package/Security/src/modules/security-web-intercept/services/reflection.service.spec.ts +0 -16
- package/Security/src/modules/security-web-intercept/services/reflection.service.ts +0 -122
- package/Security/src/modules/security.module.ts +0 -15
- package/ng-package.json +0 -7
- package/public-api.ts +0 -8
- package/tsconfig.lib.json +0 -14
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -14
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, Inject, inject } from '@angular/core';
|
|
3
|
+
import { Subject, map } from 'rxjs';
|
|
4
|
+
import * as i1 from '@angular/router';
|
|
5
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Servicio que provee métodos para trabajar con datos CSV
|
|
9
|
+
*/
|
|
10
|
+
class CsvService {
|
|
11
|
+
/**
|
|
12
|
+
* Genera el texto CSV a partir de un archivo
|
|
13
|
+
* @param data- Datos a construir
|
|
14
|
+
* @returns CSV texto
|
|
15
|
+
*/
|
|
16
|
+
generarCsv(data) {
|
|
17
|
+
const datos = data.map(d => {
|
|
18
|
+
return Object.values(d)
|
|
19
|
+
.filter(p => this.tipoSerializable(p))
|
|
20
|
+
.map(v => v.includes(',') ? `"${v}"` : v);
|
|
21
|
+
});
|
|
22
|
+
return `${data?.slice(0, 1)?.map((o) => {
|
|
23
|
+
return `${Object.keys(o).join(',')}\n`;
|
|
24
|
+
})}${datos.map(d => {
|
|
25
|
+
return Object.values(d).join(',');
|
|
26
|
+
}).join('\n')}`;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Método que indica si la propiedad es serializable
|
|
30
|
+
* @param propiedad - Propiedad a validar
|
|
31
|
+
* @returns True si es una propiedad serializable
|
|
32
|
+
*/
|
|
33
|
+
tipoSerializable(propiedad) {
|
|
34
|
+
return typeof (propiedad) !== 'object' &&
|
|
35
|
+
typeof (propiedad) !== 'function';
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Descarga el CSV a partir de los datos establecidos
|
|
39
|
+
* @param archivo - Nombre del archivo a descargar
|
|
40
|
+
* @param data - Arreglo de datos a descargar
|
|
41
|
+
*/
|
|
42
|
+
descargarCsv(archivo, data) {
|
|
43
|
+
const blob = new Blob([BOM_CSV, this.generarCsv(data)], { type: TYPE_CSV });
|
|
44
|
+
const link = this.generarLink(archivo, blob);
|
|
45
|
+
document.body.appendChild(link);
|
|
46
|
+
link.click();
|
|
47
|
+
document.body.removeChild(link);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Genera el link para el blob y archivo establecidos
|
|
51
|
+
* @param archivo - Nombre del archivo a descargar
|
|
52
|
+
* @param blob - Contenido del blob
|
|
53
|
+
* @returns link
|
|
54
|
+
*/
|
|
55
|
+
generarLink(archivo, blob) {
|
|
56
|
+
const link = document.createElement('a');
|
|
57
|
+
if (link.download !== undefined) {
|
|
58
|
+
link.setAttribute('href', URL.createObjectURL(blob));
|
|
59
|
+
link.setAttribute('download', archivo);
|
|
60
|
+
link.style.visibility = 'hidden';
|
|
61
|
+
}
|
|
62
|
+
return link;
|
|
63
|
+
}
|
|
64
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: CsvService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
65
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: CsvService, providedIn: 'root' }); }
|
|
66
|
+
}
|
|
67
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: CsvService, decorators: [{
|
|
68
|
+
type: Injectable,
|
|
69
|
+
args: [{
|
|
70
|
+
providedIn: 'root'
|
|
71
|
+
}]
|
|
72
|
+
}] });
|
|
73
|
+
/** Tipo MIME CSV + Encode */
|
|
74
|
+
const TYPE_CSV = 'text/csv;charset=utf-8;';
|
|
75
|
+
/** BOM CSV */
|
|
76
|
+
const BOM_CSV = new Uint8Array([0xEF, 0xBB, 0xBF]);
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Servicio para compartir datos
|
|
80
|
+
* @decorators `@Injectable`
|
|
81
|
+
*/
|
|
82
|
+
class DataSubjectService {
|
|
83
|
+
/**
|
|
84
|
+
* Crea un nuevo servicio de Datos compartidos
|
|
85
|
+
*/
|
|
86
|
+
constructor() {
|
|
87
|
+
this._data = undefined;
|
|
88
|
+
this.subject = new Subject();
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Emite los datos a los subscriptores
|
|
92
|
+
* @param data Datos a emitir
|
|
93
|
+
*/
|
|
94
|
+
broadcast(data) {
|
|
95
|
+
this._data = data;
|
|
96
|
+
this.subject.next(data);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Contiene el ultimo dato emitido
|
|
100
|
+
*/
|
|
101
|
+
get data() {
|
|
102
|
+
return this._data;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Observable que notifica los cambios
|
|
106
|
+
*/
|
|
107
|
+
get observer() {
|
|
108
|
+
return this.subject.asObservable();
|
|
109
|
+
}
|
|
110
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: DataSubjectService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
111
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: DataSubjectService, providedIn: 'root' }); }
|
|
112
|
+
}
|
|
113
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: DataSubjectService, decorators: [{
|
|
114
|
+
type: Injectable,
|
|
115
|
+
args: [{
|
|
116
|
+
providedIn: 'root'
|
|
117
|
+
}]
|
|
118
|
+
}], ctorParameters: () => [] });
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Servicio para compartir datos entre micro-fronts
|
|
122
|
+
* @decorators `@Injectable`
|
|
123
|
+
*/
|
|
124
|
+
class BagDataSubjectService {
|
|
125
|
+
/**
|
|
126
|
+
* Crea un nuevo servicio de datos compartido
|
|
127
|
+
*/
|
|
128
|
+
constructor() {
|
|
129
|
+
this.subjects = {};
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Obtiene el subjet dada un identificador
|
|
133
|
+
* @param subject Identificador
|
|
134
|
+
* @returns Servicio de datos
|
|
135
|
+
*/
|
|
136
|
+
getSubject(subject) {
|
|
137
|
+
let result = Reflect.get(this.subjects, subject);
|
|
138
|
+
if (!result) {
|
|
139
|
+
result = new DataSubjectService();
|
|
140
|
+
Reflect.defineProperty(this.subjects, subject, { value: result });
|
|
141
|
+
}
|
|
142
|
+
return result;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Asigna los datos a un servicio mediante su identificador
|
|
146
|
+
* @param subject Identificador del servicio
|
|
147
|
+
* @param data Datos a emitir
|
|
148
|
+
*/
|
|
149
|
+
setData(subject, data) {
|
|
150
|
+
return this.getSubject(subject).broadcast(data);
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Obtiene el ultimo dato del servicio especificando su identificador
|
|
154
|
+
* @param subject Identificador del servicio
|
|
155
|
+
* @returns Dato
|
|
156
|
+
*/
|
|
157
|
+
getData(subject) {
|
|
158
|
+
return this.getSubject(subject).data;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Obtiene el observable especificando el servicio
|
|
162
|
+
* @param subject Identificador del servicio
|
|
163
|
+
* @returns Observable<T>
|
|
164
|
+
*/
|
|
165
|
+
getObservable(subject) {
|
|
166
|
+
return this.getSubject(subject).observer;
|
|
167
|
+
}
|
|
168
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: BagDataSubjectService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
169
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: BagDataSubjectService, providedIn: 'root' }); }
|
|
170
|
+
}
|
|
171
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: BagDataSubjectService, decorators: [{
|
|
172
|
+
type: Injectable,
|
|
173
|
+
args: [{
|
|
174
|
+
providedIn: 'root'
|
|
175
|
+
}]
|
|
176
|
+
}], ctorParameters: () => [] });
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Servicio de filtro de datos para query params
|
|
180
|
+
* @decorators `@Injectable`
|
|
181
|
+
*/
|
|
182
|
+
class QueryFiltersService {
|
|
183
|
+
/**
|
|
184
|
+
* Crea una nueva instancia de QueryFilter
|
|
185
|
+
* @param {ActivatedRoute} rutaActiva - Servicio de ruta
|
|
186
|
+
*/
|
|
187
|
+
constructor(rutaActiva) {
|
|
188
|
+
this.rutaActiva = rutaActiva;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Obtiene los filtros de la ruta
|
|
192
|
+
* @returns Observable<QueryFilters>
|
|
193
|
+
*/
|
|
194
|
+
getQueryFilters() {
|
|
195
|
+
return this.rutaActiva.queryParams.pipe(map(queryParam => {
|
|
196
|
+
return {
|
|
197
|
+
seleccionarTodo: queryParam['seleccionar'] === '',
|
|
198
|
+
seleccionados: this.getData(queryParam, 'seleccionar'),
|
|
199
|
+
deseleccionados: this.getData(queryParam, 'deseleccionar'),
|
|
200
|
+
eliminados: this.getData(queryParam, 'eliminar'),
|
|
201
|
+
filtrados: this.getData(queryParam, 'filtrar'),
|
|
202
|
+
servicio: queryParam['bagDataSubject'] ?? ''
|
|
203
|
+
};
|
|
204
|
+
}));
|
|
205
|
+
}
|
|
206
|
+
getSnapFilters(state) {
|
|
207
|
+
let filter = Reflect.get(history.state, state);
|
|
208
|
+
if (filter) {
|
|
209
|
+
filter = {
|
|
210
|
+
seleccionarTodo: filter.seleccionarTodo ?? false,
|
|
211
|
+
seleccionados: filter.seleccionados ?? [],
|
|
212
|
+
deseleccionados: filter.deseleccionados ?? [],
|
|
213
|
+
eliminados: filter.eliminados ?? [],
|
|
214
|
+
filtrados: filter.filtrados ?? [],
|
|
215
|
+
servicio: filter.servicio ?? ''
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
return filter;
|
|
219
|
+
}
|
|
220
|
+
generateFilter(url) {
|
|
221
|
+
if (!url) {
|
|
222
|
+
return undefined;
|
|
223
|
+
}
|
|
224
|
+
let params = url.split('&')
|
|
225
|
+
.map(p => {
|
|
226
|
+
let data = p.split('=');
|
|
227
|
+
return {
|
|
228
|
+
key: data[0],
|
|
229
|
+
value: data[1] ?? ''
|
|
230
|
+
};
|
|
231
|
+
});
|
|
232
|
+
return {
|
|
233
|
+
seleccionarTodo: params.some(p => p.key === 'seleccionar' && p.value === ''),
|
|
234
|
+
seleccionados: params.find(p => p.key === 'seleccionar')?.value.split(',') ?? [],
|
|
235
|
+
deseleccionados: params.find(p => p.key === 'deseleccionar')?.value.split(',') ?? [],
|
|
236
|
+
eliminados: params.find(p => p.key === 'eliminar')?.value.split(',') ?? [],
|
|
237
|
+
filtrados: params.find(p => p.key === 'filtrar')?.value?.split(',') ?? [],
|
|
238
|
+
servicio: params.find(p => p.key === 'servicio')?.value ?? '',
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Obtiene los datos de los parámetros establecidos
|
|
243
|
+
* @param {Params} param - Parámetros
|
|
244
|
+
* @param {string} key - Clave del parámetro
|
|
245
|
+
* @returns Arreglo de parámetros
|
|
246
|
+
*/
|
|
247
|
+
getData(param, key) {
|
|
248
|
+
return param[key]?.split(',') ?? [];
|
|
249
|
+
}
|
|
250
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: QueryFiltersService, deps: [{ token: ActivatedRoute }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
251
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: QueryFiltersService, providedIn: 'root' }); }
|
|
252
|
+
}
|
|
253
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: QueryFiltersService, decorators: [{
|
|
254
|
+
type: Injectable,
|
|
255
|
+
args: [{
|
|
256
|
+
providedIn: 'root'
|
|
257
|
+
}]
|
|
258
|
+
}], ctorParameters: () => [{ type: i1.ActivatedRoute, decorators: [{
|
|
259
|
+
type: Inject,
|
|
260
|
+
args: [ActivatedRoute]
|
|
261
|
+
}] }] });
|
|
262
|
+
|
|
263
|
+
class FormBindService {
|
|
264
|
+
constructor() { }
|
|
265
|
+
setValues(entity, formGroup) {
|
|
266
|
+
if (!entity || !formGroup) {
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
let internalForm = formGroup;
|
|
270
|
+
Object.keys(entity).map(k => internalForm.get(k)?.setValue(Reflect.get(entity, k)));
|
|
271
|
+
}
|
|
272
|
+
updateValues(entity, formGroup) {
|
|
273
|
+
if (!entity || !formGroup) {
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
let internalForm = formGroup;
|
|
277
|
+
Object.keys(entity).map(k => {
|
|
278
|
+
if (internalForm.contains(k)) {
|
|
279
|
+
Reflect.set(entity, k, internalForm.get(k)?.value);
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: FormBindService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
284
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: FormBindService, providedIn: 'root' }); }
|
|
285
|
+
}
|
|
286
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: FormBindService, decorators: [{
|
|
287
|
+
type: Injectable,
|
|
288
|
+
args: [{
|
|
289
|
+
providedIn: 'root'
|
|
290
|
+
}]
|
|
291
|
+
}], ctorParameters: () => [] });
|
|
292
|
+
|
|
293
|
+
class LocationService {
|
|
294
|
+
constructor() {
|
|
295
|
+
this.router = inject(Router);
|
|
296
|
+
}
|
|
297
|
+
navigate(path) {
|
|
298
|
+
this.router.navigate(this.getRelative(path));
|
|
299
|
+
}
|
|
300
|
+
getRelative(relativePath) {
|
|
301
|
+
return this.getCurrentPath(relativePath);
|
|
302
|
+
}
|
|
303
|
+
getCurrentPath(relative) {
|
|
304
|
+
const url = (new URL(relative ?? '', window.location.href)).href;
|
|
305
|
+
const currentLocation = Reflect.get(this.router, 'location')?._basePath ?? '';
|
|
306
|
+
return url.substring(url.lastIndexOf(currentLocation) + currentLocation.length)
|
|
307
|
+
.split('/');
|
|
308
|
+
}
|
|
309
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: LocationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
310
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: LocationService, providedIn: 'root' }); }
|
|
311
|
+
}
|
|
312
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: LocationService, decorators: [{
|
|
313
|
+
type: Injectable,
|
|
314
|
+
args: [{
|
|
315
|
+
providedIn: 'root'
|
|
316
|
+
}]
|
|
317
|
+
}], ctorParameters: () => [] });
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Generated bundle index. Do not edit.
|
|
321
|
+
*/
|
|
322
|
+
|
|
323
|
+
export { BagDataSubjectService, CsvService, DataSubjectService, FormBindService, LocationService, QueryFiltersService };
|
|
324
|
+
//# sourceMappingURL=ngx-redi-core-Helper.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-redi-core-Helper.mjs","sources":["../../../projects/ngx-redi-core/Helper/src/helpers/csv.service.ts","../../../projects/ngx-redi-core/Helper/src/helpers/data-subject.service.ts","../../../projects/ngx-redi-core/Helper/src/helpers/bag-data-subject.service.ts","../../../projects/ngx-redi-core/Helper/src/helpers/query-filters.service.ts","../../../projects/ngx-redi-core/Helper/src/helpers/form-bind.service.ts","../../../projects/ngx-redi-core/Helper/src/helpers/location.service.ts","../../../projects/ngx-redi-core/Helper/ngx-redi-core-Helper.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\n/**\r\n * Servicio que provee métodos para trabajar con datos CSV\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CsvService {\r\n /**\r\n * Genera el texto CSV a partir de un archivo\r\n * @param data- Datos a construir\r\n * @returns CSV texto\r\n */\r\n public generarCsv<T extends {}>(data: Array<T>): string {\r\n const datos = data.map(d => {\r\n return Object.values(d)\r\n .filter(p => this.tipoSerializable(p))\r\n .map(v => (v as string).includes(',') ? `\"${v}\"` : v);\r\n });\r\n return `${data?.slice(0, 1)?.map((o) => {\r\n return `${Object.keys(o).join(',')}\\n`\r\n })}${datos.map(d => {\r\n return Object.values(d).join(',');\r\n }).join('\\n')}`;\r\n }\r\n\r\n /**\r\n * Método que indica si la propiedad es serializable\r\n * @param propiedad - Propiedad a validar\r\n * @returns True si es una propiedad serializable\r\n */\r\n private tipoSerializable(propiedad: unknown): boolean {\r\n return typeof (propiedad) !== 'object' &&\r\n typeof (propiedad) !== 'function';\r\n }\r\n\r\n /**\r\n * Descarga el CSV a partir de los datos establecidos\r\n * @param archivo - Nombre del archivo a descargar\r\n * @param data - Arreglo de datos a descargar\r\n */\r\n public descargarCsv<T extends {}>(archivo: string, data: Array<T>): void {\r\n const blob = new Blob([BOM_CSV, this.generarCsv(data)], { type: TYPE_CSV });\r\n const link = this.generarLink(archivo, blob);\r\n document.body.appendChild(link);\r\n link.click();\r\n document.body.removeChild(link);\r\n }\r\n\r\n /**\r\n * Genera el link para el blob y archivo establecidos\r\n * @param archivo - Nombre del archivo a descargar\r\n * @param blob - Contenido del blob\r\n * @returns link\r\n */\r\n private generarLink(archivo: string, blob: Blob): HTMLAnchorElement {\r\n const link = document.createElement('a') as HTMLAnchorElement;\r\n if (link.download !== undefined) {\r\n link.setAttribute('href', URL.createObjectURL(blob));\r\n link.setAttribute('download', archivo);\r\n link.style.visibility = 'hidden';\r\n }\r\n return link;\r\n }\r\n\r\n}\r\n\r\n/** Tipo MIME CSV + Encode */\r\nconst TYPE_CSV = 'text/csv;charset=utf-8;';\r\n/** BOM CSV */\r\nconst BOM_CSV = new Uint8Array([0xEF, 0xBB, 0xBF]);\r\n","import { Injectable } from '@angular/core';\r\nimport { Observable, Subject } from 'rxjs';\r\nimport { DataSubject } from '../models/interfaces/data-subject.interface';\r\n\r\n/**\r\n * Servicio para compartir datos\r\n * @decorators `@Injectable`\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class DataSubjectService<T> implements DataSubject<T> {\r\n /**\r\n * Crea un nuevo servicio de Datos compartidos\r\n */\r\n constructor() {\r\n this._data = undefined as T;\r\n this.subject = new Subject();\r\n }\r\n\r\n /**\r\n * Contiene el subject que emite datos\r\n */\r\n private readonly subject: Subject<T>;\r\n\r\n /**\r\n * Datos internos\r\n */\r\n private _data: T;\r\n\r\n /**\r\n * Emite los datos a los subscriptores\r\n * @param data Datos a emitir\r\n */\r\n public broadcast(data: T): void {\r\n this._data = data;\r\n this.subject.next(data);\r\n }\r\n\r\n /**\r\n * Contiene el ultimo dato emitido\r\n */\r\n public get data(): T {\r\n return this._data;\r\n }\r\n\r\n /**\r\n * Observable que notifica los cambios\r\n */\r\n public get observer(): Observable<T> {\r\n return this.subject.asObservable();\r\n }\r\n}","import { Injectable } from '@angular/core';\r\nimport { DataSubjectService } from './data-subject.service';\r\nimport { Observable } from 'rxjs';\r\n\r\n/**\r\n * Servicio para compartir datos entre micro-fronts\r\n * @decorators `@Injectable`\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class BagDataSubjectService {\r\n\r\n /**\r\n * Crea un nuevo servicio de datos compartido\r\n */\r\n constructor() {\r\n this.subjects = {};\r\n }\r\n\r\n /**\r\n * Obtiene el subjet dada un identificador\r\n * @param subject Identificador\r\n * @returns Servicio de datos\r\n */\r\n public getSubject<T>(subject: string): DataSubjectService<T> {\r\n let result = Reflect.get(this.subjects, subject);\r\n if (!result) {\r\n result = new DataSubjectService<T>();\r\n Reflect.defineProperty(this.subjects, subject, { value: result });\r\n }\r\n return result as DataSubjectService<T>;\r\n }\r\n\r\n /**\r\n * Asigna los datos a un servicio mediante su identificador\r\n * @param subject Identificador del servicio\r\n * @param data Datos a emitir\r\n */\r\n public setData<T>(subject: string, data: T): void {\r\n return this.getSubject<T>(subject).broadcast(data);\r\n }\r\n\r\n /**\r\n * Obtiene el ultimo dato del servicio especificando su identificador\r\n * @param subject Identificador del servicio\r\n * @returns Dato\r\n */\r\n public getData<T>(subject: string): T {\r\n return this.getSubject(subject).data as T;\r\n }\r\n\r\n /**\r\n * Obtiene el observable especificando el servicio\r\n * @param subject Identificador del servicio\r\n * @returns Observable<T>\r\n */\r\n public getObservable<T>(subject: string): Observable<T> {\r\n return this.getSubject(subject).observer as Observable<T>;\r\n }\r\n\r\n /**\r\n * Objeto contenedor de los subjects\r\n */\r\n private subjects: object;\r\n}","import { Inject, Injectable } from '@angular/core';\r\nimport { ActivatedRoute, Params } from '@angular/router';\r\nimport { QueryFilters } from '../models/interfaces/query-filters';\r\nimport { map, Observable } from 'rxjs';\r\n\r\n/**\r\n * Servicio de filtro de datos para query params\r\n * @decorators `@Injectable`\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class QueryFiltersService {\r\n /**\r\n * Crea una nueva instancia de QueryFilter\r\n * @param {ActivatedRoute} rutaActiva - Servicio de ruta\r\n */\r\n constructor(@Inject(ActivatedRoute) private readonly rutaActiva: ActivatedRoute) {\r\n }\r\n\r\n /**\r\n * Obtiene los filtros de la ruta\r\n * @returns Observable<QueryFilters>\r\n */\r\n public getQueryFilters(): Observable<QueryFilters> {\r\n return this.rutaActiva.queryParams.pipe(map(queryParam => {\r\n return {\r\n seleccionarTodo: queryParam['seleccionar'] === '',\r\n seleccionados: this.getData(queryParam, 'seleccionar'),\r\n deseleccionados: this.getData(queryParam, 'deseleccionar'),\r\n eliminados: this.getData(queryParam, 'eliminar'),\r\n filtrados: this.getData(queryParam, 'filtrar'),\r\n servicio: queryParam['bagDataSubject'] ?? ''\r\n } as QueryFilters;\r\n }));\r\n }\r\n\r\n\r\n public getSnapFilters(state: string): QueryFilters {\r\n let filter = Reflect.get(history.state, state);\r\n if (filter) {\r\n filter = {\r\n seleccionarTodo: filter.seleccionarTodo ?? false,\r\n seleccionados: filter.seleccionados ?? [],\r\n deseleccionados: filter.deseleccionados ?? [],\r\n eliminados: filter.eliminados ?? [],\r\n filtrados: filter.filtrados ?? [],\r\n servicio: filter.servicio ?? ''\r\n } as QueryFilters;\r\n }\r\n return filter;\r\n }\r\n\r\n public generateFilter(url: string): QueryFilters | undefined {\r\n if (!url) {\r\n return undefined;\r\n }\r\n let params = url.split('&')\r\n .map(p => {\r\n let data = p.split('=');\r\n return {\r\n key: data[0],\r\n value: data[1] ?? ''\r\n }\r\n });\r\n return {\r\n seleccionarTodo: params.some(p => p.key === 'seleccionar' && p.value === ''),\r\n seleccionados: params.find(p => p.key === 'seleccionar')?.value.split(',') ?? [],\r\n deseleccionados: params.find(p => p.key === 'deseleccionar')?.value.split(',') ?? [],\r\n eliminados: params.find(p => p.key === 'eliminar')?.value.split(',') ?? [],\r\n filtrados: params.find(p => p.key === 'filtrar')?.value?.split(',') ?? [],\r\n servicio: params.find(p => p.key === 'servicio')?.value ?? '',\r\n } as QueryFilters;\r\n }\r\n\r\n /**\r\n * Obtiene los datos de los parámetros establecidos\r\n * @param {Params} param - Parámetros\r\n * @param {string} key - Clave del parámetro\r\n * @returns Arreglo de parámetros\r\n */\r\n private getData(param: Params, key: string): Array<string> {\r\n return param[key]?.split(',') ?? [];\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { FormGroup } from '@angular/forms';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class FormBindService {\r\n\r\n constructor() { }\r\n\r\n public setValues<T extends {}>(entity: T, formGroup: unknown) {\r\n if (!entity || !formGroup) {\r\n return;\r\n }\r\n let internalForm = formGroup as FormGroup;\r\n Object.keys(entity).map(k => internalForm.get(k)?.setValue(Reflect.get(entity, k)));\r\n }\r\n\r\n public updateValues<T extends {}>(entity: T, formGroup: unknown) {\r\n if (!entity || !formGroup) {\r\n return;\r\n }\r\n let internalForm = formGroup as FormGroup;\r\n Object.keys(entity).map(k => {\r\n if (internalForm.contains(k)) {\r\n Reflect.set(entity, k, internalForm.get(k)?.value);\r\n }\r\n });\r\n }\r\n}\r\n","import { inject, Injectable } from '@angular/core';\r\nimport { Route, Router } from '@angular/router';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class LocationService {\r\n\r\n private readonly router = inject(Router);\r\n\r\n constructor() { }\r\n\r\n public navigate(path: string): void {\r\n this.router.navigate(this.getRelative(path));\r\n }\r\n\r\n public getRelative(relativePath?: string): Array<string> {\r\n return this.getCurrentPath(relativePath);\r\n }\r\n\r\n private getCurrentPath(relative: string | undefined): Array<string> {\r\n const url = (new URL(relative ?? '', window.location.href)).href;\r\n const currentLocation = Reflect.get(this.router, 'location')?._basePath ?? '';\r\n return url.substring(url.lastIndexOf(currentLocation) + currentLocation.length)\r\n .split('/');\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AACA;;AAEG;MAIU,UAAU,CAAA;AACrB;;;;AAIK;AACE,IAAA,UAAU,CAAe,IAAc,EAAA;QAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,IAAG;AACzB,YAAA,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC;iBACnB,MAAM,CAAC,CAAC,IAAI,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC;iBACpC,GAAG,CAAC,CAAC,IAAK,CAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAA,CAAA,CAAG,GAAG,CAAC,CAAC;AACzD,QAAA,CAAC,CAAC;AACF,QAAA,OAAO,CAAA,EAAG,IAAI,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,KAAI;AACrC,YAAA,OAAO,CAAA,EAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI;QACxC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAG;YACjB,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAA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AO,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC;IAC1C;AAEQ,IAAA,cAAc,CAAC,QAA4B,EAAA;AACjD,QAAA,MAAM,GAAG,GAAG,CAAC,IAAI,GAAG,CAAC,QAAQ,IAAI,EAAE,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI;AAChE,QAAA,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,SAAS,IAAI,EAAE;AAC7E,QAAA,OAAO,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,eAAe,CAAC,GAAG,eAAe,CAAC,MAAM;aAC3E,KAAK,CAAC,GAAG,CAAC;IACf;8GAnBW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAf,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cAFd,MAAM,EAAA,CAAA,CAAA;;2FAEP,eAAe,EAAA,UAAA,EAAA,CAAA;kBAH3B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACLD;;AAEG;;;;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, Component } from '@angular/core';
|
|
3
|
+
import { Router } from '@angular/router';
|
|
4
|
+
import { LocationService } from 'ngx-redi-core/Helper';
|
|
5
|
+
|
|
6
|
+
class RediBreadCrumbComponent {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.router = inject(Router);
|
|
9
|
+
this.location = inject(LocationService);
|
|
10
|
+
this.crumb = '';
|
|
11
|
+
this.router.events.subscribe(() => {
|
|
12
|
+
this.crumb = this.getCrumb(this.location.getRelative()
|
|
13
|
+
.filter(l => l), this.router.config).replaceAll('//', '');
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
getCrumb(paths, config) {
|
|
17
|
+
let path = paths?.shift();
|
|
18
|
+
let route = config?.find(r => r.path === path);
|
|
19
|
+
if (path && route) {
|
|
20
|
+
return `/${Reflect.get(route.data ?? {}, 'crumb') ?? ''}${this.getCrumb(paths, this.getChildren(route))}`;
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
route = config.find(r => r.path === '');
|
|
24
|
+
if (path && route) {
|
|
25
|
+
return this.getCrumb([path, ...paths], this.getChildren(route));
|
|
26
|
+
}
|
|
27
|
+
return '';
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
getChildren(route) {
|
|
31
|
+
return route.children ?? Reflect.get(route, '_loadedRoutes') ?? [];
|
|
32
|
+
}
|
|
33
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: RediBreadCrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
34
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: RediBreadCrumbComponent, isStandalone: true, selector: "redi-bread-crumb", ngImport: i0, template: "<div>\r\n <span class=\"material-symbols-outlined\"> home </span>\r\n <p>{{crumb}}</p>\r\n</div>", styles: ["div{color:gray;display:inline-flex}p{margin:0;padding-left:5px;align-content:end;font-size:.9em;letter-spacing:-.04rem}.material-symbols-outlined{font-variation-settings:\"FILL\" 1,\"wght\" 600,\"GRAD\" 200,\"opsz\" 24}\n"] }); }
|
|
35
|
+
}
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: RediBreadCrumbComponent, decorators: [{
|
|
37
|
+
type: Component,
|
|
38
|
+
args: [{ selector: 'redi-bread-crumb', imports: [], template: "<div>\r\n <span class=\"material-symbols-outlined\"> home </span>\r\n <p>{{crumb}}</p>\r\n</div>", styles: ["div{color:gray;display:inline-flex}p{margin:0;padding-left:5px;align-content:end;font-size:.9em;letter-spacing:-.04rem}.material-symbols-outlined{font-variation-settings:\"FILL\" 1,\"wght\" 600,\"GRAD\" 200,\"opsz\" 24}\n"] }]
|
|
39
|
+
}], ctorParameters: () => [] });
|
|
40
|
+
|
|
41
|
+
/** Componentes */
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Generated bundle index. Do not edit.
|
|
45
|
+
*/
|
|
46
|
+
|
|
47
|
+
export { RediBreadCrumbComponent };
|
|
48
|
+
//# sourceMappingURL=ngx-redi-core-RediBreadCrumb.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-redi-core-RediBreadCrumb.mjs","sources":["../../../projects/ngx-redi-core/RediBreadCrumb/src/components/redi-bread-crumb/redi-bread-crumb.component.ts","../../../projects/ngx-redi-core/RediBreadCrumb/src/components/redi-bread-crumb/redi-bread-crumb.component.html","../../../projects/ngx-redi-core/RediBreadCrumb/public-api.ts","../../../projects/ngx-redi-core/RediBreadCrumb/ngx-redi-core-RediBreadCrumb.ts"],"sourcesContent":["import { Component, inject } from '@angular/core';\r\nimport { Route, Router, Routes } from '@angular/router';\r\nimport { LocationService } from 'ngx-redi-core/Helper';\r\n\r\n@Component({\n selector: 'redi-bread-crumb',\n imports: [],\n templateUrl: './redi-bread-crumb.component.html',\n styleUrl: './redi-bread-crumb.component.scss'\n})\r\nexport class RediBreadCrumbComponent {\r\n private readonly router = inject(Router);\r\n\r\n private readonly location = inject(LocationService);\r\n\r\n public crumb: string;\r\n constructor() {\r\n this.crumb = '';\r\n this.router.events.subscribe(() => {\r\n this.crumb = this.getCrumb(this.location.getRelative()\r\n .filter(l => l), this.router.config).replaceAll('//', '');\r\n });\r\n }\r\n\r\n private getCrumb(paths: Array<string>, config: Routes): string {\r\n let path = paths?.shift();\r\n let route = config?.find(r => r.path === path);\r\n if (path && route) {\r\n return `/${Reflect.get(route.data ?? {}, 'crumb') ?? ''}${this.getCrumb(paths, this.getChildren(route))}`;\r\n }\r\n else {\r\n route = config.find(r => r.path === '');\r\n if (path && route) {\r\n return this.getCrumb([path, ...paths], this.getChildren(route));\r\n }\r\n return '';\r\n }\r\n }\r\n\r\n private getChildren(route: Route) {\r\n return route.children ?? Reflect.get(route, '_loadedRoutes') ?? [];\r\n }\r\n}\r\n","<div>\r\n <span class=\"material-symbols-outlined\"> home </span>\r\n <p>{{crumb}}</p>\r\n</div>","/** Componentes */\r\nexport * from './src/components/redi-bread-crumb/redi-bread-crumb.component';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAUa,uBAAuB,CAAA;AAMlC,IAAA,WAAA,GAAA;AALiB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAEvB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,eAAe,CAAC;AAIjD,QAAA,IAAI,CAAC,KAAK,GAAG,EAAE;QACf,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,MAAK;AAChC,YAAA,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW;iBACjD,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC;AAC7D,QAAA,CAAC,CAAC;IACJ;IAEQ,QAAQ,CAAC,KAAoB,EAAE,MAAc,EAAA;AACnD,QAAA,IAAI,IAAI,GAAG,KAAK,EAAE,KAAK,EAAE;AACzB,QAAA,IAAI,KAAK,GAAG,MAAM,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC;AAC9C,QAAA,IAAI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;;AAEG;;;;"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/material/divider';
|
|
4
|
+
import { MatDividerModule } from '@angular/material/divider';
|
|
5
|
+
|
|
6
|
+
class RediActionsContainerComponent {
|
|
7
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: RediActionsContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: RediActionsContainerComponent, isStandalone: true, selector: "redi-actions-container", ngImport: i0, template: "<ng-content></ng-content>\r\n", styles: [":host{width:auto}\n"] }); }
|
|
9
|
+
}
|
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: RediActionsContainerComponent, decorators: [{
|
|
11
|
+
type: Component,
|
|
12
|
+
args: [{ selector: 'redi-actions-container', imports: [], template: "<ng-content></ng-content>\r\n", styles: [":host{width:auto}\n"] }]
|
|
13
|
+
}] });
|
|
14
|
+
|
|
15
|
+
class RediBodyContainerComponent {
|
|
16
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: RediBodyContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
17
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: RediBodyContainerComponent, isStandalone: true, selector: "redi-body-container", ngImport: i0, template: "<ng-content></ng-content>\r\n", styles: [":host{width:auto}\n"] }); }
|
|
18
|
+
}
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: RediBodyContainerComponent, decorators: [{
|
|
20
|
+
type: Component,
|
|
21
|
+
args: [{ selector: 'redi-body-container', imports: [], template: "<ng-content></ng-content>\r\n", styles: [":host{width:auto}\n"] }]
|
|
22
|
+
}] });
|
|
23
|
+
|
|
24
|
+
class RediContainerComponent {
|
|
25
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: RediContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
26
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: RediContainerComponent, isStandalone: true, selector: "redi-container", ngImport: i0, template: "<div>\r\n <ng-content select=\"redi-title-container\"></ng-content>\r\n <mat-divider></mat-divider>\r\n</div>\r\n<div>\r\n <ng-content select=\"redi-body-container\"></ng-content>\r\n</div>\r\n<div class=\"controls\">\r\n <ng-content select=\"redi-actions-container\"></ng-content>\r\n</div>", styles: ["mat-divider{margin-bottom:37px}.controls{text-align:center}\n"], dependencies: [{ kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }] }); }
|
|
27
|
+
}
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: RediContainerComponent, decorators: [{
|
|
29
|
+
type: Component,
|
|
30
|
+
args: [{ selector: 'redi-container', imports: [
|
|
31
|
+
MatDividerModule
|
|
32
|
+
], template: "<div>\r\n <ng-content select=\"redi-title-container\"></ng-content>\r\n <mat-divider></mat-divider>\r\n</div>\r\n<div>\r\n <ng-content select=\"redi-body-container\"></ng-content>\r\n</div>\r\n<div class=\"controls\">\r\n <ng-content select=\"redi-actions-container\"></ng-content>\r\n</div>", styles: ["mat-divider{margin-bottom:37px}.controls{text-align:center}\n"] }]
|
|
33
|
+
}] });
|
|
34
|
+
|
|
35
|
+
class RediSubtitleContainerComponent {
|
|
36
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: RediSubtitleContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
37
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: RediSubtitleContainerComponent, isStandalone: true, selector: "redi-subtitle-container", ngImport: i0, template: "<ng-content></ng-content>", styles: [":host{color:#7b7b7b;font-size:1.2em;font-weight:500;margin:.5em 0 0;display:block;height:1.9em}\n"] }); }
|
|
38
|
+
}
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: RediSubtitleContainerComponent, decorators: [{
|
|
40
|
+
type: Component,
|
|
41
|
+
args: [{ selector: 'redi-subtitle-container', imports: [], template: "<ng-content></ng-content>", styles: [":host{color:#7b7b7b;font-size:1.2em;font-weight:500;margin:.5em 0 0;display:block;height:1.9em}\n"] }]
|
|
42
|
+
}] });
|
|
43
|
+
|
|
44
|
+
class RediTitleContainerComponent {
|
|
45
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: RediTitleContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
46
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: RediTitleContainerComponent, isStandalone: true, selector: "redi-title-container", ngImport: i0, template: "<span>\r\n <ng-content></ng-content>\r\n</span>\r\n<div class=\"actions\" >\r\n<ng-content select=\"redi-actions-container\"></ng-content>\r\n</div>", styles: [":host{color:#7b7b7b;display:flex;justify-content:space-between;padding-bottom:6px}:host span{margin:0 0 .2em;font:400 2rem/2.5rem Roboto,sans-serif;letter-spacing:0;display:contents}:host .actions{align-content:center}\n"] }); }
|
|
47
|
+
}
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: RediTitleContainerComponent, decorators: [{
|
|
49
|
+
type: Component,
|
|
50
|
+
args: [{ selector: 'redi-title-container', imports: [], template: "<span>\r\n <ng-content></ng-content>\r\n</span>\r\n<div class=\"actions\" >\r\n<ng-content select=\"redi-actions-container\"></ng-content>\r\n</div>", styles: [":host{color:#7b7b7b;display:flex;justify-content:space-between;padding-bottom:6px}:host span{margin:0 0 .2em;font:400 2rem/2.5rem Roboto,sans-serif;letter-spacing:0;display:contents}:host .actions{align-content:center}\n"] }]
|
|
51
|
+
}] });
|
|
52
|
+
|
|
53
|
+
/** Componentes */
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Generated bundle index. Do not edit.
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
export { RediActionsContainerComponent, RediBodyContainerComponent, RediContainerComponent, RediSubtitleContainerComponent, RediTitleContainerComponent };
|
|
60
|
+
//# sourceMappingURL=ngx-redi-core-RediContainer.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-redi-core-RediContainer.mjs","sources":["../../../projects/ngx-redi-core/RediContainer/src/components/redi-actions-container/redi-actions-container.component.ts","../../../projects/ngx-redi-core/RediContainer/src/components/redi-actions-container/redi-actions-container.component.html","../../../projects/ngx-redi-core/RediContainer/src/components/redi-body-container/redi-body-container.component.ts","../../../projects/ngx-redi-core/RediContainer/src/components/redi-body-container/redi-body-container.component.html","../../../projects/ngx-redi-core/RediContainer/src/components/redi-container/redi-container.component.ts","../../../projects/ngx-redi-core/RediContainer/src/components/redi-container/redi-container.component.html","../../../projects/ngx-redi-core/RediContainer/src/components/redi-subtitle-container/redi-subtitle-container.component.ts","../../../projects/ngx-redi-core/RediContainer/src/components/redi-subtitle-container/redi-subtitle-container.component.html","../../../projects/ngx-redi-core/RediContainer/src/components/redi-title-container/redi-title-container.component.ts","../../../projects/ngx-redi-core/RediContainer/src/components/redi-title-container/redi-title-container.component.html","../../../projects/ngx-redi-core/RediContainer/public-api.ts","../../../projects/ngx-redi-core/RediContainer/ngx-redi-core-RediContainer.ts"],"sourcesContent":["import { Component } from '@angular/core';\r\n\r\n@Component({\n selector: 'redi-actions-container',\n imports: [],\n templateUrl: './redi-actions-container.component.html',\n styleUrl: './redi-actions-container.component.scss'\n})\r\nexport class RediActionsContainerComponent {\r\n\r\n}\r\n","<ng-content></ng-content>\r\n","import { Component } from '@angular/core';\r\n\r\n@Component({\n selector: 'redi-body-container',\n imports: [],\n templateUrl: './redi-body-container.component.html',\n styleUrl: './redi-body-container.component.scss'\n})\r\nexport class RediBodyContainerComponent {\r\n\r\n}\r\n","<ng-content></ng-content>\r\n","import { Component } from '@angular/core';\r\nimport { MatDividerModule } from '@angular/material/divider';\r\n\r\n@Component({\n selector: 'redi-container',\n imports: [\n MatDividerModule\n ],\n templateUrl: './redi-container.component.html',\n styleUrl: './redi-container.component.scss'\n})\r\nexport class RediContainerComponent {\r\n\r\n}\r\n","<div>\r\n <ng-content select=\"redi-title-container\"></ng-content>\r\n <mat-divider></mat-divider>\r\n</div>\r\n<div>\r\n <ng-content select=\"redi-body-container\"></ng-content>\r\n</div>\r\n<div class=\"controls\">\r\n <ng-content select=\"redi-actions-container\"></ng-content>\r\n</div>","import { Component } from '@angular/core';\r\n\r\n@Component({\n selector: 'redi-subtitle-container',\n imports: [],\n templateUrl: './redi-subtitle-container.component.html',\n styleUrl: './redi-subtitle-container.component.scss'\n})\r\nexport class RediSubtitleContainerComponent {\r\n\r\n}\r\n","<ng-content></ng-content>","import { Component } from '@angular/core';\r\n\r\n@Component({\n selector: 'redi-title-container',\n imports: [],\n templateUrl: './redi-title-container.component.html',\n styleUrl: './redi-title-container.component.scss'\n})\r\nexport class RediTitleContainerComponent {\r\n\r\n}\r\n","<span>\r\n <ng-content></ng-content>\r\n</span>\r\n<div class=\"actions\" >\r\n<ng-content select=\"redi-actions-container\"></ng-content>\r\n</div>","/** Componentes */\r\nexport * from './src/components/redi-actions-container/redi-actions-container.component';\r\nexport * from './src/components/redi-body-container/redi-body-container.component';\r\nexport * from './src/components/redi-container/redi-container.component';\r\nexport * from './src/components/redi-subtitle-container/redi-subtitle-container.component';\r\nexport * from './src/components/redi-title-container/redi-title-container.component';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAQa,6BAA6B,CAAA;8GAA7B,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA7B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,6BAA6B,kFCR1C,+BACA,EAAA,MAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,CAAA,CAAA;;2FDOa,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBANzC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,wBAAwB,WACzB,EAAE,EAAA,QAAA,EAAA,+BAAA,EAAA,MAAA,EAAA,CAAA,qBAAA,CAAA,EAAA;;;MEIF,0BAA0B,CAAA;8GAA1B,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA1B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,0BAA0B,+ECRvC,+BACA,EAAA,MAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,CAAA,CAAA;;2FDOa,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBANtC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qBAAqB,WACtB,EAAE,EAAA,QAAA,EAAA,+BAAA,EAAA,MAAA,EAAA,CAAA,qBAAA,CAAA,EAAA;;;MEOF,sBAAsB,C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AA,EAAA,CAAA,mGAAA,CAAA,EAAA;;;MEIF,2BAA2B,CAAA;8GAA3B,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA3B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,2BAA2B,gFCRxC,yJAKM,EAAA,MAAA,EAAA,CAAA,8NAAA,CAAA,EAAA,CAAA,CAAA;;2FDGO,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBANvC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sBAAsB,WACvB,EAAE,EAAA,QAAA,EAAA,yJAAA,EAAA,MAAA,EAAA,CAAA,8NAAA,CAAA,EAAA;;;AEJf;;ACAA;;AAEG;;;;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Input, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/material/form-field';
|
|
4
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
5
|
+
import * as i2 from '@angular/common';
|
|
6
|
+
import { CommonModule } from '@angular/common';
|
|
7
|
+
|
|
8
|
+
class RediDetailObjectComponent {
|
|
9
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: RediDetailObjectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: RediDetailObjectComponent, isStandalone: true, selector: "redi-detail-object", inputs: { details: "details", itemClass: "itemClass" }, ngImport: i0, template: "<div class=\"detail\">\r\n @for (item of details; track item) {\r\n <div [ngClass]=\"itemClass\">\r\n <mat-label> {{item.label}} </mat-label>\r\n <mat-label> {{item.value}} </mat-label>\r\n </div>\r\n }\r\n</div>", styles: [".detail{display:flex;justify-content:flex-start;min-height:80px;flex-wrap:wrap;font-size:.9em;line-height:1.4em;font-weight:100}.detail div{display:grid;max-width:10.6%;min-width:10.6%;margin-right:.5%;align-content:space-between;margin-bottom:60px;min-height:5em}.detail div mat-label{overflow:hidden!important;text-overflow:ellipsis!important}.detail div mat-label:nth-child(2){font-weight:500!important;margin-top:1em}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i1.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
11
|
+
}
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: RediDetailObjectComponent, decorators: [{
|
|
13
|
+
type: Component,
|
|
14
|
+
args: [{ selector: 'redi-detail-object', imports: [
|
|
15
|
+
MatFormFieldModule,
|
|
16
|
+
CommonModule
|
|
17
|
+
], template: "<div class=\"detail\">\r\n @for (item of details; track item) {\r\n <div [ngClass]=\"itemClass\">\r\n <mat-label> {{item.label}} </mat-label>\r\n <mat-label> {{item.value}} </mat-label>\r\n </div>\r\n }\r\n</div>", styles: [".detail{display:flex;justify-content:flex-start;min-height:80px;flex-wrap:wrap;font-size:.9em;line-height:1.4em;font-weight:100}.detail div{display:grid;max-width:10.6%;min-width:10.6%;margin-right:.5%;align-content:space-between;margin-bottom:60px;min-height:5em}.detail div mat-label{overflow:hidden!important;text-overflow:ellipsis!important}.detail div mat-label:nth-child(2){font-weight:500!important;margin-top:1em}\n"] }]
|
|
18
|
+
}], propDecorators: { details: [{
|
|
19
|
+
type: Input
|
|
20
|
+
}], itemClass: [{
|
|
21
|
+
type: Input
|
|
22
|
+
}] } });
|
|
23
|
+
|
|
24
|
+
/** Componentes */
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Generated bundle index. Do not edit.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
export { RediDetailObjectComponent };
|
|
31
|
+
//# sourceMappingURL=ngx-redi-core-RediDetail.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-redi-core-RediDetail.mjs","sources":["../../../projects/ngx-redi-core/RediDetail/src/components/redi-detail-object/redi-detail-object.component.ts","../../../projects/ngx-redi-core/RediDetail/src/components/redi-detail-object/redi-detail-object.component.html","../../../projects/ngx-redi-core/RediDetail/public-api.ts","../../../projects/ngx-redi-core/RediDetail/ngx-redi-core-RediDetail.ts"],"sourcesContent":["import { Component, Input } from '@angular/core';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { DetailItem } from '../../models/interfaces/detail-item.interface';\r\nimport { CommonModule } from '@angular/common';\r\n\r\n@Component({\n selector: 'redi-detail-object',\n imports: [\n MatFormFieldModule,\n CommonModule\n ],\n templateUrl: './redi-detail-object.component.html',\n styleUrl: './redi-detail-object.component.scss'\n})\r\nexport class RediDetailObjectComponent {\r\n @Input()\r\n public details!: Array<DetailItem>;\r\n\r\n @Input()\r\n public itemClass!:string;\r\n}\r\n","<div class=\"detail\">\r\n @for (item of details; track item) {\r\n <div [ngClass]=\"itemClass\">\r\n <mat-label> {{item.label}} </mat-label>\r\n <mat-label> {{item.value}} </mat-label>\r\n </div>\r\n }\r\n</div>","/** Componentes */\r\nexport * from './src/components/redi-detail-object/redi-detail-object.component';\r\nexport * from './src/models/interfaces/detail-item.interface';\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAca,yBAAyB,CAAA;8GAAzB,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAzB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,yBAAyB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,SAAA,EAAA,WAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECdtC,gPAOM,EAAA,MAAA,EAAA,CAAA,yaAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDCE,kBAAkB,+FAClB,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAKP,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBATrC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,EAAA,OAAA,EACrB;wBACL,kBAAkB;wBAClB;AACH,qBAAA,EAAA,QAAA,EAAA,gPAAA,EAAA,MAAA,EAAA,CAAA,yaAAA,CAAA,EAAA;;sBAKF;;sBAGA;;;AElBH;;ACAA;;AAEG;;;;"}
|