intelica-library-ui 0.1.24 → 0.1.25
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/intelica-library-ui.mjs +1128 -3
- package/fesm2022/intelica-library-ui.mjs.map +1 -1
- package/lib/components/paginator/paginator.component.d.ts +40 -0
- package/lib/components/search/enums/search.enum.d.ts +5 -0
- package/lib/components/search/model/search.model.d.ts +7 -0
- package/lib/components/search/search.component.d.ts +102 -0
- package/lib/components/table/column.component.d.ts +17 -0
- package/lib/components/table/model/search.model.d.ts +5 -0
- package/lib/components/table/table.component.d.ts +50 -0
- package/lib/constants/format-date.constants.d.ts +12 -0
- package/lib/directives/positive-number.directive.d.ts +9 -0
- package/lib/services/shared.service.d.ts +82 -0
- package/package.json +1 -1
- package/public-api.d.ts +3 -0
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, inject, Injectable, signal, Pipe } from '@angular/core';
|
|
2
|
+
import { Component, inject, Injectable, signal, Pipe, TemplateRef, ContentChild, Input, Directive, EventEmitter, forwardRef, Output, HostListener, ContentChildren, ViewChild } from '@angular/core';
|
|
3
3
|
import { getCookie, Cookies, setCookie } from 'typescript-cookie';
|
|
4
4
|
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
5
|
-
import { BehaviorSubject, catchError, throwError, from, switchMap } from 'rxjs';
|
|
5
|
+
import { BehaviorSubject, catchError, throwError, from, switchMap, Subject } from 'rxjs';
|
|
6
6
|
import Swal from 'sweetalert2';
|
|
7
|
+
import * as i1$1 from '@angular/common';
|
|
8
|
+
import { CommonModule } from '@angular/common';
|
|
9
|
+
import * as i2$2 from 'primeng/table';
|
|
10
|
+
import { TableModule } from 'primeng/table';
|
|
11
|
+
import { BadgeModule } from 'primeng/badge';
|
|
12
|
+
import { Popover } from 'primeng/popover';
|
|
13
|
+
import * as i4 from 'primeng/tooltip';
|
|
14
|
+
import { TooltipModule } from 'primeng/tooltip';
|
|
15
|
+
import * as i1 from '@angular/forms';
|
|
16
|
+
import { FormBuilder, FormsModule, ReactiveFormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
17
|
+
import * as i2 from 'primeng/radiobutton';
|
|
18
|
+
import { RadioButtonModule } from 'primeng/radiobutton';
|
|
19
|
+
import { InputText } from 'primeng/inputtext';
|
|
20
|
+
import * as i2$1 from 'primeng/button';
|
|
21
|
+
import { ButtonModule } from 'primeng/button';
|
|
22
|
+
import moment from 'moment';
|
|
23
|
+
import * as _ from 'lodash';
|
|
24
|
+
import * as i3 from 'primeng/api';
|
|
7
25
|
|
|
8
26
|
class IntelicaLibraryUiComponent {
|
|
9
27
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: IntelicaLibraryUiComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -379,9 +397,1116 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
379
397
|
args: [{ selector: "app-spinner", imports: [], template: "@if (isLoading()){\r\n<div id=\"overlay\">\r\n\t<div class=\"loading\">\r\n\t\t<div class=\"content-center\">\r\n\t\t\t<img alt=\"Intelica\" [src]=\"LoadingLogo\" />\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n}\r\n", styles: ["#overlay{position:fixed;display:block;width:100%;height:100%;inset:0;background-color:#00000080;z-index:9999;cursor:pointer}.loading{height:100vh;width:100%;position:fixed;top:0;left:0;text-align:center;background-color:#d9d9d8f2}.loading img{width:150px}.content-center{left:50%;top:50%;position:absolute;transform:translate(-50%,-50%);width:90%}\n"] }]
|
|
380
398
|
}] });
|
|
381
399
|
|
|
400
|
+
class ColumnComponent {
|
|
401
|
+
field;
|
|
402
|
+
header;
|
|
403
|
+
sortable = false;
|
|
404
|
+
width;
|
|
405
|
+
className;
|
|
406
|
+
headerTooltip = "";
|
|
407
|
+
headerTooltipPosition = "top";
|
|
408
|
+
tooltip = "";
|
|
409
|
+
tooltipPosition = "top";
|
|
410
|
+
showIndex = false;
|
|
411
|
+
templateRef;
|
|
412
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
413
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.1", type: ColumnComponent, isStandalone: true, selector: "intelica-column", inputs: { field: "field", header: "header", sortable: "sortable", width: "width", className: "className", headerTooltip: "headerTooltip", headerTooltipPosition: "headerTooltipPosition", tooltip: "tooltip", tooltipPosition: "tooltipPosition", showIndex: "showIndex" }, queries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0 });
|
|
414
|
+
}
|
|
415
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ColumnComponent, decorators: [{
|
|
416
|
+
type: Directive,
|
|
417
|
+
args: [{ selector: "intelica-column" }]
|
|
418
|
+
}], propDecorators: { field: [{
|
|
419
|
+
type: Input
|
|
420
|
+
}], header: [{
|
|
421
|
+
type: Input
|
|
422
|
+
}], sortable: [{
|
|
423
|
+
type: Input
|
|
424
|
+
}], width: [{
|
|
425
|
+
type: Input
|
|
426
|
+
}], className: [{
|
|
427
|
+
type: Input
|
|
428
|
+
}], headerTooltip: [{
|
|
429
|
+
type: Input
|
|
430
|
+
}], headerTooltipPosition: [{
|
|
431
|
+
type: Input
|
|
432
|
+
}], tooltip: [{
|
|
433
|
+
type: Input
|
|
434
|
+
}], tooltipPosition: [{
|
|
435
|
+
type: Input
|
|
436
|
+
}], showIndex: [{
|
|
437
|
+
type: Input
|
|
438
|
+
}], templateRef: [{
|
|
439
|
+
type: ContentChild,
|
|
440
|
+
args: [TemplateRef]
|
|
441
|
+
}] } });
|
|
442
|
+
|
|
443
|
+
var SearchInputEnum;
|
|
444
|
+
(function (SearchInputEnum) {
|
|
445
|
+
SearchInputEnum["OperatorId"] = "operatorId";
|
|
446
|
+
SearchInputEnum["FieldId"] = "fieldId";
|
|
447
|
+
SearchInputEnum["SearchText"] = "searchText";
|
|
448
|
+
})(SearchInputEnum || (SearchInputEnum = {}));
|
|
449
|
+
|
|
450
|
+
class SearchComponent {
|
|
451
|
+
/**
|
|
452
|
+
* Indica el componente del que proviene.
|
|
453
|
+
* @type {string}
|
|
454
|
+
*/
|
|
455
|
+
ComponentId = "";
|
|
456
|
+
/**
|
|
457
|
+
* Opciones para campos de búsqueda.
|
|
458
|
+
* @type {{ id: number; value: string }[]}
|
|
459
|
+
*/
|
|
460
|
+
SearchFieldOptions;
|
|
461
|
+
/**
|
|
462
|
+
* Indica si realizar la búsqueda al soltar una tecla.
|
|
463
|
+
* @type {boolean}
|
|
464
|
+
*/
|
|
465
|
+
SearchOnKeyup;
|
|
466
|
+
/**
|
|
467
|
+
* @deprecated No debe ser utilizado. Es sólo para uso interno y no para módulos.
|
|
468
|
+
* @type {boolean}
|
|
469
|
+
* @default false
|
|
470
|
+
*/
|
|
471
|
+
SimpleSearchInput = false;
|
|
472
|
+
/**
|
|
473
|
+
* Placeholder para el componente de búsqueda.
|
|
474
|
+
* @type {string}
|
|
475
|
+
*/
|
|
476
|
+
Placeholder = "";
|
|
477
|
+
/**
|
|
478
|
+
* Evento emitido al realizar una búsqueda.
|
|
479
|
+
* @type {EventEmitter<{ operatorId: number; operatorText: string, fieldId: number, fieldText: string, searchText: string }>}
|
|
480
|
+
*/
|
|
481
|
+
OnSearchEvent = new EventEmitter();
|
|
482
|
+
FormBuilder = inject(FormBuilder);
|
|
483
|
+
// Option!: string;
|
|
484
|
+
// Placeholder!: string;
|
|
485
|
+
/**
|
|
486
|
+
* Indica si el dropdown está abierto
|
|
487
|
+
* @type {boolean}
|
|
488
|
+
* @default false
|
|
489
|
+
*/
|
|
490
|
+
IsDropdownOpen = false;
|
|
491
|
+
/**
|
|
492
|
+
* Formulario para manejar los parámetros de búsqueda
|
|
493
|
+
* @type {FormGroup}
|
|
494
|
+
*/
|
|
495
|
+
SearchForm;
|
|
496
|
+
/**
|
|
497
|
+
* Suscripción a los valores del formulario.
|
|
498
|
+
* @type {Subscription}
|
|
499
|
+
*/
|
|
500
|
+
FormValuesSubscription;
|
|
501
|
+
/**
|
|
502
|
+
* Opciones para operadores de búsqueda.
|
|
503
|
+
* @type {{ id: number; value: string }[]}
|
|
504
|
+
*/
|
|
505
|
+
SearchOperatorOptions;
|
|
506
|
+
/**
|
|
507
|
+
* Función llamada cuando cambia el valor del campo de búsqueda.
|
|
508
|
+
* @type {() => void}
|
|
509
|
+
*/
|
|
510
|
+
OnChange = () => { };
|
|
511
|
+
/**
|
|
512
|
+
* Función llamada cuando el componente de búsqueda es tocado.
|
|
513
|
+
* @type {() => void}
|
|
514
|
+
*/
|
|
515
|
+
OnTouched = () => { };
|
|
516
|
+
constructor() { }
|
|
517
|
+
ngOnInit() {
|
|
518
|
+
this.SearchForm = this.FormBuilder.group({
|
|
519
|
+
operatorId: 0,
|
|
520
|
+
fieldId: 0,
|
|
521
|
+
searchText: "",
|
|
522
|
+
});
|
|
523
|
+
this.FormValuesSubscription = this.SearchForm.valueChanges.subscribe(value => {
|
|
524
|
+
this.OnChange(value);
|
|
525
|
+
});
|
|
526
|
+
//loadTerms
|
|
527
|
+
if (this.Placeholder === "")
|
|
528
|
+
this.Placeholder = "Search a value in";
|
|
529
|
+
this.SearchOperatorOptions ??= this.GetSearchOperatorOptions();
|
|
530
|
+
this.SearchFieldOptions ??= this.GetSearchFieldOptions();
|
|
531
|
+
this.InitializeForm();
|
|
532
|
+
}
|
|
533
|
+
ngOnDestroy() {
|
|
534
|
+
this.FormValuesSubscription.unsubscribe();
|
|
535
|
+
}
|
|
536
|
+
InitializeForm() {
|
|
537
|
+
this.SearchForm.setValue({
|
|
538
|
+
operatorId: this.SearchOperatorOptions[0].id,
|
|
539
|
+
fieldId: this.SearchFieldOptions.length > 0 ? this.SearchFieldOptions[0].id : 0,
|
|
540
|
+
searchText: "",
|
|
541
|
+
});
|
|
542
|
+
}
|
|
543
|
+
DropDownChange(isOpen) {
|
|
544
|
+
this.IsDropdownOpen = isOpen;
|
|
545
|
+
}
|
|
546
|
+
OnSearchEnter() {
|
|
547
|
+
if (!this.SearchOnKeyup)
|
|
548
|
+
this.OnSearch();
|
|
549
|
+
}
|
|
550
|
+
OnSearchKeyup() {
|
|
551
|
+
if (this.SearchOnKeyup)
|
|
552
|
+
this.OnSearch();
|
|
553
|
+
}
|
|
554
|
+
OnSearch() {
|
|
555
|
+
const value = this.SearchForm.value;
|
|
556
|
+
value.operatorText = this.SearchOperatorOptions.find(o => o.id === value.operatorId)?.value || "";
|
|
557
|
+
value.fieldText = this.SearchFieldOptions.find(f => f.id === value.fieldId)?.value || "";
|
|
558
|
+
this.OnChange(value);
|
|
559
|
+
this.OnTouched();
|
|
560
|
+
this.OnSearchEvent.emit(value);
|
|
561
|
+
}
|
|
562
|
+
ClearSearchText(emitEvent = true) {
|
|
563
|
+
this.SearchForm.get(SearchInputEnum.SearchText)?.setValue("");
|
|
564
|
+
if (emitEvent) {
|
|
565
|
+
this.OnSearch();
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
get HasSearchText() {
|
|
569
|
+
const searchText = this.SearchForm.get(SearchInputEnum.SearchText)?.value;
|
|
570
|
+
return searchText && searchText.length > 0;
|
|
571
|
+
}
|
|
572
|
+
GetSelectedOperatorValue() {
|
|
573
|
+
const selectedId = this.SearchForm.get(SearchInputEnum.OperatorId)?.value;
|
|
574
|
+
const selectedItem = this.SearchOperatorOptions?.find(item => item.id === selectedId);
|
|
575
|
+
return selectedItem ? selectedItem.value : "";
|
|
576
|
+
}
|
|
577
|
+
GetSelectedFieldValue() {
|
|
578
|
+
const selectedId = this.SearchForm.get(SearchInputEnum.FieldId)?.value;
|
|
579
|
+
const selectedItem = this.SearchFieldOptions?.find(item => item.id === selectedId);
|
|
580
|
+
return selectedItem ? selectedItem.value : "";
|
|
581
|
+
}
|
|
582
|
+
GetSelectedValues() {
|
|
583
|
+
return `${this.GetSelectedOperatorValue()}, ${this.GetSelectedFieldValue()}`;
|
|
584
|
+
}
|
|
585
|
+
SetSearchTextValue(text) {
|
|
586
|
+
this.SearchForm.get(SearchInputEnum.SearchText)?.setValue(text);
|
|
587
|
+
}
|
|
588
|
+
SetOperatorValue(value) {
|
|
589
|
+
this.SearchForm.get(SearchInputEnum.OperatorId)?.setValue(value ?? 0);
|
|
590
|
+
}
|
|
591
|
+
SetFieldValue(value) {
|
|
592
|
+
this.SearchForm.get(SearchInputEnum.FieldId)?.setValue(value ?? 0);
|
|
593
|
+
}
|
|
594
|
+
GetSearchOperatorOptions() {
|
|
595
|
+
return [
|
|
596
|
+
{ id: 0, value: "Contains" },
|
|
597
|
+
{ id: 1, value: "Exact" },
|
|
598
|
+
{ id: 2, value: "Begin" },
|
|
599
|
+
{ id: 3, value: "Ends" },
|
|
600
|
+
];
|
|
601
|
+
}
|
|
602
|
+
GetSearchFieldOptions() {
|
|
603
|
+
return [
|
|
604
|
+
{ id: 0, value: "code" },
|
|
605
|
+
{ id: 1, value: "name" },
|
|
606
|
+
];
|
|
607
|
+
}
|
|
608
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
609
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: SearchComponent, isStandalone: true, selector: "intelica-search", inputs: { ComponentId: "ComponentId", SearchFieldOptions: "SearchFieldOptions", SearchOnKeyup: "SearchOnKeyup", SimpleSearchInput: "SimpleSearchInput", Placeholder: "Placeholder" }, outputs: { OnSearchEvent: "OnSearch" }, providers: [
|
|
610
|
+
{
|
|
611
|
+
provide: NG_VALUE_ACCESSOR,
|
|
612
|
+
useExisting: forwardRef(() => SearchComponent),
|
|
613
|
+
},
|
|
614
|
+
], ngImport: i0, template: "<form [formGroup]=\"SearchForm\">\r\n\t<div class=\"prSearchBar\">\r\n\t\t<div class=\"prSearchBar__dropdown\" (click)=\"op.toggle($event)\">\r\n\t\t\t<div class=\"prSearchBar__dropdown--label\" [pTooltip]=\"GetSelectedValues()\" tooltipPosition=\"top\">{{ GetSelectedFieldValue() }}</div>\r\n\t\t\t<div class=\"prSearchBar__dropdown--icon\">\r\n\t\t\t\t<i [ngClass]=\"IsDropdownOpen ? 'icon-arrow-up' : 'icon-arrow-down'\"></i>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<p-popover #op (onShow)=\"DropDownChange(true)\" (onHide)=\"DropDownChange(false)\" class=\"prSearchBar__popover\">\r\n\t\t\t<div class=\"searchDropDown\">\r\n\t\t\t\t<div class=\"searchDropDown__group\">\r\n\t\t\t\t\t<div class=\"searchDropDown__title\">Select an operator</div>\r\n\t\t\t\t\t<div class=\"searchDropDown__listOption\">\r\n\t\t\t\t\t\t@for ( option of SearchOperatorOptions ; track option.id; let index = $index){\r\n\t\t\t\t\t\t<div class=\"searchDropDown__option\">\r\n\t\t\t\t\t\t\t<p-radiobutton [inputId]=\"ComponentId + option.id\" class=\"prRadioButton\" [value]=\"option.id\" formControlName=\"operatorId\" (change)=\"OnSearchKeyup()\" />\r\n\t\t\t\t\t\t\t<label [for]=\"ComponentId + option.id\" class=\"prRadioButton--label\">{{ option.value }}</label>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<hr />\r\n\t\t\t\t<div class=\"searchDropDown__group\">\r\n\t\t\t\t\t<div class=\"searchDropDown__title\">Select a field</div>\r\n\t\t\t\t\t@for ( option of SearchFieldOptions ; track option.id; let index = $index){\r\n\t\t\t\t\t<div class=\"searchDropDown__option\">\r\n\t\t\t\t\t\t<p-radiobutton [inputId]=\"ComponentId + 'fieldId_' + option.id\" class=\"prRadioButton\" [value]=\"option.id\" formControlName=\"fieldId\" (change)=\"OnSearchKeyup()\" />\r\n\t\t\t\t\t\t<label [for]=\"ComponentId + 'fieldId_' + option.id\" class=\"prRadioButton--label\">{{ option.value }}</label>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t}\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</p-popover>\r\n\t\t<div class=\"prSearchBar__content\">\r\n\t\t\t<div class=\"prSearchBar__btn\">\r\n\t\t\t\t<button pButton type=\"button\" class=\"prSearchBar__btn-action\" (click)=\"ClearSearchText()\" *ngIf=\"HasSearchText\">\r\n\t\t\t\t\t<i class=\"icon-times\"></i>\r\n\t\t\t\t</button>\r\n\t\t\t\t<button pButton type=\"button\" class=\"prSearchBar__btn-action\" (click)=\"OnSearch()\">\r\n\t\t\t\t\t<i class=\"icon-search\"></i>\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\t\t\t<input pInputText type=\"text\" class=\"prSearchBar__input\" formControlName=\"searchText\" [placeholder]=\"Placeholder\" (keyup.enter)=\"OnSearchEnter()\" (keyup)=\"OnSearchKeyup()\" />\r\n\t\t</div>\r\n\t</div>\r\n</form>\r\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: RadioButtonModule }, { kind: "component", type: i2.RadioButton, selector: "p-radioButton, p-radiobutton, p-radio-button", inputs: ["value", "formControlName", "name", "disabled", "variant", "size", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "autofocus", "binary"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }] });
|
|
615
|
+
}
|
|
616
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SearchComponent, decorators: [{
|
|
617
|
+
type: Component,
|
|
618
|
+
args: [{ selector: "intelica-search", imports: [FormsModule, ReactiveFormsModule, RadioButtonModule, Popover, InputText, CommonModule, TooltipModule], providers: [
|
|
619
|
+
{
|
|
620
|
+
provide: NG_VALUE_ACCESSOR,
|
|
621
|
+
useExisting: forwardRef(() => SearchComponent),
|
|
622
|
+
},
|
|
623
|
+
], template: "<form [formGroup]=\"SearchForm\">\r\n\t<div class=\"prSearchBar\">\r\n\t\t<div class=\"prSearchBar__dropdown\" (click)=\"op.toggle($event)\">\r\n\t\t\t<div class=\"prSearchBar__dropdown--label\" [pTooltip]=\"GetSelectedValues()\" tooltipPosition=\"top\">{{ GetSelectedFieldValue() }}</div>\r\n\t\t\t<div class=\"prSearchBar__dropdown--icon\">\r\n\t\t\t\t<i [ngClass]=\"IsDropdownOpen ? 'icon-arrow-up' : 'icon-arrow-down'\"></i>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<p-popover #op (onShow)=\"DropDownChange(true)\" (onHide)=\"DropDownChange(false)\" class=\"prSearchBar__popover\">\r\n\t\t\t<div class=\"searchDropDown\">\r\n\t\t\t\t<div class=\"searchDropDown__group\">\r\n\t\t\t\t\t<div class=\"searchDropDown__title\">Select an operator</div>\r\n\t\t\t\t\t<div class=\"searchDropDown__listOption\">\r\n\t\t\t\t\t\t@for ( option of SearchOperatorOptions ; track option.id; let index = $index){\r\n\t\t\t\t\t\t<div class=\"searchDropDown__option\">\r\n\t\t\t\t\t\t\t<p-radiobutton [inputId]=\"ComponentId + option.id\" class=\"prRadioButton\" [value]=\"option.id\" formControlName=\"operatorId\" (change)=\"OnSearchKeyup()\" />\r\n\t\t\t\t\t\t\t<label [for]=\"ComponentId + option.id\" class=\"prRadioButton--label\">{{ option.value }}</label>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<hr />\r\n\t\t\t\t<div class=\"searchDropDown__group\">\r\n\t\t\t\t\t<div class=\"searchDropDown__title\">Select a field</div>\r\n\t\t\t\t\t@for ( option of SearchFieldOptions ; track option.id; let index = $index){\r\n\t\t\t\t\t<div class=\"searchDropDown__option\">\r\n\t\t\t\t\t\t<p-radiobutton [inputId]=\"ComponentId + 'fieldId_' + option.id\" class=\"prRadioButton\" [value]=\"option.id\" formControlName=\"fieldId\" (change)=\"OnSearchKeyup()\" />\r\n\t\t\t\t\t\t<label [for]=\"ComponentId + 'fieldId_' + option.id\" class=\"prRadioButton--label\">{{ option.value }}</label>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t}\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</p-popover>\r\n\t\t<div class=\"prSearchBar__content\">\r\n\t\t\t<div class=\"prSearchBar__btn\">\r\n\t\t\t\t<button pButton type=\"button\" class=\"prSearchBar__btn-action\" (click)=\"ClearSearchText()\" *ngIf=\"HasSearchText\">\r\n\t\t\t\t\t<i class=\"icon-times\"></i>\r\n\t\t\t\t</button>\r\n\t\t\t\t<button pButton type=\"button\" class=\"prSearchBar__btn-action\" (click)=\"OnSearch()\">\r\n\t\t\t\t\t<i class=\"icon-search\"></i>\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\t\t\t<input pInputText type=\"text\" class=\"prSearchBar__input\" formControlName=\"searchText\" [placeholder]=\"Placeholder\" (keyup.enter)=\"OnSearchEnter()\" (keyup)=\"OnSearchKeyup()\" />\r\n\t\t</div>\r\n\t</div>\r\n</form>\r\n" }]
|
|
624
|
+
}], ctorParameters: () => [], propDecorators: { ComponentId: [{
|
|
625
|
+
type: Input
|
|
626
|
+
}], SearchFieldOptions: [{
|
|
627
|
+
type: Input
|
|
628
|
+
}], SearchOnKeyup: [{
|
|
629
|
+
type: Input
|
|
630
|
+
}], SimpleSearchInput: [{
|
|
631
|
+
type: Input
|
|
632
|
+
}], Placeholder: [{
|
|
633
|
+
type: Input
|
|
634
|
+
}], OnSearchEvent: [{
|
|
635
|
+
type: Output,
|
|
636
|
+
args: ["OnSearch"]
|
|
637
|
+
}] } });
|
|
638
|
+
|
|
639
|
+
class PositiveNumberDirective {
|
|
640
|
+
el;
|
|
641
|
+
constructor(el) {
|
|
642
|
+
this.el = el;
|
|
643
|
+
}
|
|
644
|
+
onInputChange(event) {
|
|
645
|
+
const initalValue = this.el.nativeElement.value;
|
|
646
|
+
this.el.nativeElement.value = initalValue.replace(/[^0-9]*/g, "");
|
|
647
|
+
if (initalValue !== this.el.nativeElement.value) {
|
|
648
|
+
event.stopPropagation();
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: PositiveNumberDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
652
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.1", type: PositiveNumberDirective, isStandalone: true, selector: "[positiveNumber]", host: { listeners: { "input": "onInputChange($event)" } }, ngImport: i0 });
|
|
653
|
+
}
|
|
654
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: PositiveNumberDirective, decorators: [{
|
|
655
|
+
type: Directive,
|
|
656
|
+
args: [{
|
|
657
|
+
selector: "[positiveNumber]",
|
|
658
|
+
}]
|
|
659
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { onInputChange: [{
|
|
660
|
+
type: HostListener,
|
|
661
|
+
args: ["input", ["$event"]]
|
|
662
|
+
}] } });
|
|
663
|
+
|
|
664
|
+
class PaginatorComponent {
|
|
665
|
+
/**
|
|
666
|
+
* Número total de elementos que se están paginando.
|
|
667
|
+
* @type {number}
|
|
668
|
+
*/
|
|
669
|
+
TotalItems = 0;
|
|
670
|
+
/**
|
|
671
|
+
* Página actual.
|
|
672
|
+
* @type {number}
|
|
673
|
+
*/
|
|
674
|
+
CurrentPage = 1;
|
|
675
|
+
/**
|
|
676
|
+
* Número de elementos por página.
|
|
677
|
+
* @type {number}
|
|
678
|
+
* @default 10
|
|
679
|
+
*/
|
|
680
|
+
ItemsPerPage = 10;
|
|
681
|
+
/**
|
|
682
|
+
* Evento emitido cuando cambia la página.
|
|
683
|
+
* @type {EventEmitter<any>}
|
|
684
|
+
*/
|
|
685
|
+
PageChange = new EventEmitter();
|
|
686
|
+
/**
|
|
687
|
+
* Número total de páginas calculado internamente.
|
|
688
|
+
* @type {number}
|
|
689
|
+
*/
|
|
690
|
+
TotalPages = 1;
|
|
691
|
+
ngOnChanges(changes) {
|
|
692
|
+
this.TotalPageCalculator();
|
|
693
|
+
}
|
|
694
|
+
TotalPageCalculator() {
|
|
695
|
+
this.TotalPages = Math.ceil(this.TotalItems / this.ItemsPerPage);
|
|
696
|
+
}
|
|
697
|
+
GoToFirstPage() {
|
|
698
|
+
this.CurrentPage = 1;
|
|
699
|
+
this.EmitPageChange();
|
|
700
|
+
}
|
|
701
|
+
GoToPreviousPage() {
|
|
702
|
+
const pageNumber = Number(this.CurrentPage);
|
|
703
|
+
this.CurrentPage = isNaN(pageNumber) || pageNumber === 0 ? 1 : pageNumber;
|
|
704
|
+
if (this.CurrentPage > 1)
|
|
705
|
+
this.CurrentPage -= 1;
|
|
706
|
+
this.EmitPageChange();
|
|
707
|
+
}
|
|
708
|
+
GoToNextPage() {
|
|
709
|
+
const pageNumber = Number(this.CurrentPage);
|
|
710
|
+
this.CurrentPage = isNaN(pageNumber) ? 0 : pageNumber;
|
|
711
|
+
if (this.CurrentPage < this.TotalPages)
|
|
712
|
+
this.CurrentPage += 1;
|
|
713
|
+
this.EmitPageChange();
|
|
714
|
+
}
|
|
715
|
+
GoToLastPage() {
|
|
716
|
+
this.CurrentPage = this.TotalPages;
|
|
717
|
+
this.EmitPageChange();
|
|
718
|
+
}
|
|
719
|
+
EmitPageChange() {
|
|
720
|
+
this.PageChange.emit(this.CurrentPage);
|
|
721
|
+
}
|
|
722
|
+
onKeyUp(event) {
|
|
723
|
+
const eventValue = event.target.value;
|
|
724
|
+
if (eventValue === "" || isNaN(parseInt(eventValue)) || eventValue === "0" || eventValue.indexOf("-") >= 0) {
|
|
725
|
+
this.CurrentPage = 1;
|
|
726
|
+
this.EmitPageChange();
|
|
727
|
+
return;
|
|
728
|
+
}
|
|
729
|
+
this.CurrentPage = parseInt(eventValue);
|
|
730
|
+
if (this.CurrentPage > this.TotalPages) {
|
|
731
|
+
this.CurrentPage = this.TotalPages;
|
|
732
|
+
}
|
|
733
|
+
this.EmitPageChange();
|
|
734
|
+
}
|
|
735
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: PaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
736
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: PaginatorComponent, isStandalone: true, selector: "intelica-paginator", inputs: { TotalItems: "TotalItems", CurrentPage: "CurrentPage", ItemsPerPage: "ItemsPerPage" }, outputs: { PageChange: "PageChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"prPaginator\">\r\n\t<span class=\"prPaginator__info\">{{ TotalItems }} Records</span>\r\n\t<div class=\"prPaginator__controls\">\r\n\t\t<button pButton type=\"button\" class=\"prPaginator__btn prPaginator__btn--first\" [disabled]=\"CurrentPage === 1\" (click)=\"GoToFirstPage()\"></button>\r\n\t\t<button pButton type=\"button\" class=\"prPaginator__btn prPaginator__btn--previous\" [disabled]=\"CurrentPage === 1\" (click)=\"GoToPreviousPage()\"></button>\r\n\t\t<input pInputText type=\"text\" (keydown.enter)=\"$event.preventDefault()\" [(ngModel)]=\"CurrentPage\" positiveNumber class=\"prPaginator__input\" (keyup.enter)=\"onKeyUp($event)\" />\r\n\t\t<span class=\"prPaginator__total\">Of {{ TotalPages }}</span>\r\n\t\t<button pButton type=\"button\" class=\"prPaginator__btn prPaginator__btn--next\" [disabled]=\"CurrentPage === TotalPages\" (click)=\"GoToNextPage()\"></button>\r\n\t\t<button pButton type=\"button\" class=\"prPaginator__btn prPaginator__btn--last\" [disabled]=\"CurrentPage === TotalPages\" (click)=\"GoToLastPage()\"></button>\r\n\t</div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "directive", type: PositiveNumberDirective, selector: "[positiveNumber]" }] });
|
|
737
|
+
}
|
|
738
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: PaginatorComponent, decorators: [{
|
|
739
|
+
type: Component,
|
|
740
|
+
args: [{ selector: "intelica-paginator", imports: [FormsModule, ButtonModule, PositiveNumberDirective], template: "<div class=\"prPaginator\">\r\n\t<span class=\"prPaginator__info\">{{ TotalItems }} Records</span>\r\n\t<div class=\"prPaginator__controls\">\r\n\t\t<button pButton type=\"button\" class=\"prPaginator__btn prPaginator__btn--first\" [disabled]=\"CurrentPage === 1\" (click)=\"GoToFirstPage()\"></button>\r\n\t\t<button pButton type=\"button\" class=\"prPaginator__btn prPaginator__btn--previous\" [disabled]=\"CurrentPage === 1\" (click)=\"GoToPreviousPage()\"></button>\r\n\t\t<input pInputText type=\"text\" (keydown.enter)=\"$event.preventDefault()\" [(ngModel)]=\"CurrentPage\" positiveNumber class=\"prPaginator__input\" (keyup.enter)=\"onKeyUp($event)\" />\r\n\t\t<span class=\"prPaginator__total\">Of {{ TotalPages }}</span>\r\n\t\t<button pButton type=\"button\" class=\"prPaginator__btn prPaginator__btn--next\" [disabled]=\"CurrentPage === TotalPages\" (click)=\"GoToNextPage()\"></button>\r\n\t\t<button pButton type=\"button\" class=\"prPaginator__btn prPaginator__btn--last\" [disabled]=\"CurrentPage === TotalPages\" (click)=\"GoToLastPage()\"></button>\r\n\t</div>\r\n</div>\r\n" }]
|
|
741
|
+
}], propDecorators: { TotalItems: [{
|
|
742
|
+
type: Input
|
|
743
|
+
}], CurrentPage: [{
|
|
744
|
+
type: Input
|
|
745
|
+
}], ItemsPerPage: [{
|
|
746
|
+
type: Input
|
|
747
|
+
}], PageChange: [{
|
|
748
|
+
type: Output
|
|
749
|
+
}] } });
|
|
750
|
+
|
|
751
|
+
class FormatDateConstants {
|
|
752
|
+
static DMYY = "d/M/yy";
|
|
753
|
+
static MMYY = "MMMM yyyy";
|
|
754
|
+
static YYMD = "yyMd";
|
|
755
|
+
static DMYY_MOMENT = "D/M/YY";
|
|
756
|
+
static YYMD_MOMENT = "YYMD";
|
|
757
|
+
static DDMMYYYY = "dd_MM_YYYY";
|
|
758
|
+
static DDMMYYYY_ = "DD/MM/YYYY";
|
|
759
|
+
static YYYYMMDD = "YYYY-MM-DD";
|
|
760
|
+
static YYYYMMDD_ = "yyyyMMdd";
|
|
761
|
+
static YYYYMMDD_SLASH = "YYYY/MM/DD";
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
class SharedService {
|
|
765
|
+
location;
|
|
766
|
+
configObservable = new Subject();
|
|
767
|
+
isLoading = new BehaviorSubject(false);
|
|
768
|
+
isLoadingHeader = new BehaviorSubject(true);
|
|
769
|
+
isExpandedContent = new BehaviorSubject(false);
|
|
770
|
+
isLoadingPageInfo = new BehaviorSubject(true);
|
|
771
|
+
notifyProfileType = new Subject();
|
|
772
|
+
charges = 0;
|
|
773
|
+
showHelper = new BehaviorSubject(false);
|
|
774
|
+
headerPathName = new BehaviorSubject([]);
|
|
775
|
+
pageId = 0;
|
|
776
|
+
openActionMenu$ = new Subject();
|
|
777
|
+
months = {
|
|
778
|
+
en: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
|
|
779
|
+
es: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"],
|
|
780
|
+
};
|
|
781
|
+
subtitleDescriptionNotification$;
|
|
782
|
+
constructor(location) {
|
|
783
|
+
this.location = location;
|
|
784
|
+
}
|
|
785
|
+
///METODOS GLOBALS.
|
|
786
|
+
IsNumberRate(n) {
|
|
787
|
+
return !isNaN(parseFloat(n)) && !isNaN(n - 0);
|
|
788
|
+
}
|
|
789
|
+
RemovePercentage(string) {
|
|
790
|
+
if (string.length > 0) {
|
|
791
|
+
if (string.startsWith("%"))
|
|
792
|
+
string = string.substring(1);
|
|
793
|
+
let last = string.length - 1;
|
|
794
|
+
if (string.endsWith("%"))
|
|
795
|
+
string = string.substring(0, last);
|
|
796
|
+
}
|
|
797
|
+
return string;
|
|
798
|
+
}
|
|
799
|
+
GetTotalAmountByCrncy(col, listGeneral) {
|
|
800
|
+
return listGeneral.reduce((a, b) => a + (b[col] || 0), 0);
|
|
801
|
+
}
|
|
802
|
+
GetTotalAverageByColumn(col, listGeneral) {
|
|
803
|
+
return listGeneral.reduce((a, b) => a + (b[col] || 0), 0) / (listGeneral.length || 1);
|
|
804
|
+
}
|
|
805
|
+
GetTotalByGroup(col, listGeneral, groupBy) {
|
|
806
|
+
if (!groupBy?.length)
|
|
807
|
+
return [listGeneral.reduce((a, b) => a + (b[col] || 0), 0)];
|
|
808
|
+
let result = listGeneral.reduce((acc, item) => {
|
|
809
|
+
const groupKey = groupBy.map(prop => item[prop]).join("||");
|
|
810
|
+
acc[groupKey] = (acc[groupKey] || 0) + item[col];
|
|
811
|
+
return acc;
|
|
812
|
+
}, {});
|
|
813
|
+
const propiedades = Object.keys(result).sort();
|
|
814
|
+
const indexGroup = groupBy.indexOf(col);
|
|
815
|
+
if (indexGroup != -1)
|
|
816
|
+
return propiedades.map(propiedad => propiedad.split("||")[indexGroup]);
|
|
817
|
+
return propiedades.map(propiedad => result[propiedad]);
|
|
818
|
+
}
|
|
819
|
+
TransformNegative(value) {
|
|
820
|
+
value = value?.toString() ?? "0.00";
|
|
821
|
+
if (value?.indexOf("-") > -1)
|
|
822
|
+
return "(" + value.replace("-", "") + ")";
|
|
823
|
+
else
|
|
824
|
+
return value.toString();
|
|
825
|
+
}
|
|
826
|
+
FormatNumber(value, decimalMax, decimalMin) {
|
|
827
|
+
return value.toLocaleString("en-US", { maximumFractionDigits: decimalMax, minimumFractionDigits: decimalMin });
|
|
828
|
+
}
|
|
829
|
+
ClickOutSideValidator(event) {
|
|
830
|
+
let res = false;
|
|
831
|
+
if (event !== undefined) {
|
|
832
|
+
const src = event.srcElement;
|
|
833
|
+
res = src.id !== "button-alignment" && !this.CheckParents(src, 0);
|
|
834
|
+
}
|
|
835
|
+
return res;
|
|
836
|
+
}
|
|
837
|
+
CheckParents(src, c) {
|
|
838
|
+
var ids = [];
|
|
839
|
+
ids.push("HamburgerMenu");
|
|
840
|
+
var strings = [];
|
|
841
|
+
strings.push("swal2-container");
|
|
842
|
+
if (src.className.includes("backdrop-visible"))
|
|
843
|
+
return false;
|
|
844
|
+
var res = ids.some(function (v) {
|
|
845
|
+
return src.id === v;
|
|
846
|
+
});
|
|
847
|
+
if (!res && (src.tagName === "BODY" || src.parentElement === null) && c === 0) {
|
|
848
|
+
res = true;
|
|
849
|
+
}
|
|
850
|
+
if (!res &&
|
|
851
|
+
strings.some(function (v) {
|
|
852
|
+
return src.classList.contains(v);
|
|
853
|
+
}))
|
|
854
|
+
res = true;
|
|
855
|
+
if (src.parentElement && !res) {
|
|
856
|
+
c++;
|
|
857
|
+
res = this.CheckParents(src.parentElement, c);
|
|
858
|
+
}
|
|
859
|
+
return res;
|
|
860
|
+
}
|
|
861
|
+
GetTitleByRegionOrCountry(CurrentGroup, Current, field) {
|
|
862
|
+
return CurrentGroup ? CurrentGroup.groupName + " - " + Current[field] : Current[field];
|
|
863
|
+
}
|
|
864
|
+
GetTitleByBank(ListGeneralCountryAll, CurrentBank) {
|
|
865
|
+
return ListGeneralCountryAll.length > 1 ? CurrentBank.groupName + " - " + CurrentBank.countryName + " - " + CurrentBank.bankNameCommercial : CurrentBank.bankNameCommercial;
|
|
866
|
+
}
|
|
867
|
+
Roundgen(value, precision) {
|
|
868
|
+
var multiplier = Math.pow(10, precision || 0);
|
|
869
|
+
return Math.round(value * multiplier) / multiplier;
|
|
870
|
+
}
|
|
871
|
+
ReturnAmountPercen(amount) {
|
|
872
|
+
if (isNaN(amount))
|
|
873
|
+
amount = 0;
|
|
874
|
+
let resultado = "";
|
|
875
|
+
let AmountStr = amount === 0 ? "0" : amount.toLocaleString("en-US", { maximumFractionDigits: 1, minimumFractionDigits: 1 });
|
|
876
|
+
if (AmountStr.indexOf(".0") !== -1)
|
|
877
|
+
AmountStr = amount.toLocaleString("en-US", { maximumFractionDigits: 0, minimumFractionDigits: 0 });
|
|
878
|
+
if (amount < 0 && parseInt(amount.toString()) * -1 === 0) {
|
|
879
|
+
resultado = amount.toLocaleString("en-US", { maximumFractionDigits: 1, minimumFractionDigits: 1 }).replace("-", "(") + "%)";
|
|
880
|
+
}
|
|
881
|
+
else if (amount < 0)
|
|
882
|
+
resultado = AmountStr.replace("-", "(") + "%)";
|
|
883
|
+
else
|
|
884
|
+
resultado = AmountStr + "%";
|
|
885
|
+
if (Number.NEGATIVE_INFINITY === amount || Number.POSITIVE_INFINITY === amount)
|
|
886
|
+
resultado = "";
|
|
887
|
+
return resultado;
|
|
888
|
+
}
|
|
889
|
+
ReturAmountFormat(amount) {
|
|
890
|
+
if (isNaN(amount))
|
|
891
|
+
amount = 0;
|
|
892
|
+
amount = this.Roundgen(amount, 2);
|
|
893
|
+
let resultado = "";
|
|
894
|
+
if (amount < 0 && parseInt(amount.toString()) * -1 === 0)
|
|
895
|
+
resultado = amount.toString().replace("-", "(") + ")";
|
|
896
|
+
else if (amount < 0 && amount > -1000) {
|
|
897
|
+
resultado = this.Roundgen(amount, 0).toString().replace("-", "(") + ")";
|
|
898
|
+
}
|
|
899
|
+
else if (amount < 0 && -1000000000 >= amount) {
|
|
900
|
+
resultado =
|
|
901
|
+
this.Roundgen(amount / 1000000000, 1)
|
|
902
|
+
.toString()
|
|
903
|
+
.replace("-", "(") + " B)";
|
|
904
|
+
}
|
|
905
|
+
else if (amount < 0 && -1000000 >= amount) {
|
|
906
|
+
resultado =
|
|
907
|
+
this.Roundgen(amount / 1000000, 1)
|
|
908
|
+
.toString()
|
|
909
|
+
.replace("-", "(") + " M)";
|
|
910
|
+
}
|
|
911
|
+
else if (amount < 0) {
|
|
912
|
+
resultado =
|
|
913
|
+
this.Roundgen(amount / 1000, 1)
|
|
914
|
+
.toString()
|
|
915
|
+
.replace("-", "(") + " K)";
|
|
916
|
+
}
|
|
917
|
+
else if (amount < 1000)
|
|
918
|
+
resultado = this.Roundgen(amount, 1).toString();
|
|
919
|
+
else if (1000000000 < amount)
|
|
920
|
+
resultado = this.Roundgen(amount / 1000000000, 1).toString() + " B";
|
|
921
|
+
else if (1000000 < amount)
|
|
922
|
+
resultado = this.Roundgen(amount / 1000000, 1).toString() + " M";
|
|
923
|
+
else
|
|
924
|
+
resultado = this.Roundgen(amount / 1000, 1).toString() + " K";
|
|
925
|
+
if (resultado.indexOf(".") === -1 && amount !== 0) {
|
|
926
|
+
let a = resultado;
|
|
927
|
+
let b = ".0";
|
|
928
|
+
let output = a + b;
|
|
929
|
+
if (resultado.indexOf(" ") !== -1) {
|
|
930
|
+
let position = resultado.indexOf(" ");
|
|
931
|
+
output = [a.slice(0, position), b, a.slice(position)].join("");
|
|
932
|
+
}
|
|
933
|
+
else if (resultado.indexOf(" ") === -1 && resultado.indexOf(")") !== -1) {
|
|
934
|
+
let position = resultado.indexOf(")");
|
|
935
|
+
output = [a.slice(0, position), b, a.slice(position)].join("");
|
|
936
|
+
}
|
|
937
|
+
resultado = output;
|
|
938
|
+
}
|
|
939
|
+
return resultado;
|
|
940
|
+
}
|
|
941
|
+
DownloadFile(fileName, blob) {
|
|
942
|
+
const nav = window.navigator;
|
|
943
|
+
if (nav.msSaveOrOpenBlob) {
|
|
944
|
+
nav.msSaveOrOpenBlob(blob, fileName);
|
|
945
|
+
}
|
|
946
|
+
else {
|
|
947
|
+
const link = document.createElement("a");
|
|
948
|
+
link.setAttribute("type", "hidden");
|
|
949
|
+
link.download = fileName;
|
|
950
|
+
link.href = window.URL.createObjectURL(blob.body);
|
|
951
|
+
document.body.appendChild(link);
|
|
952
|
+
link.click();
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
ViewFile(response) {
|
|
956
|
+
const a = document.createElement("a");
|
|
957
|
+
a.setAttribute("style", "display:none;");
|
|
958
|
+
document.body.appendChild(a);
|
|
959
|
+
a.href = URL.createObjectURL(response.body);
|
|
960
|
+
a.target = "_blank";
|
|
961
|
+
a.click();
|
|
962
|
+
document.body.removeChild(a);
|
|
963
|
+
}
|
|
964
|
+
GetNumberCurrency(amount) {
|
|
965
|
+
return amount === 0 ? "0" : amount.toLocaleString("en-US", { maximumFractionDigits: 2, minimumFractionDigits: 2 });
|
|
966
|
+
}
|
|
967
|
+
CountDecimals(param) {
|
|
968
|
+
if (Math.floor(param) === param)
|
|
969
|
+
return 0;
|
|
970
|
+
return param.toString().split(".")[1].length || 0;
|
|
971
|
+
}
|
|
972
|
+
IsEmpty(value) {
|
|
973
|
+
return value === null || value === "" || value === undefined;
|
|
974
|
+
}
|
|
975
|
+
GroupByColumn(data, columnGroup) {
|
|
976
|
+
let colUnique = [];
|
|
977
|
+
if (columnGroup != "") {
|
|
978
|
+
colUnique = [
|
|
979
|
+
...new Set(data.map(item => {
|
|
980
|
+
return item[columnGroup];
|
|
981
|
+
})),
|
|
982
|
+
].filter(unique => !this.IsEmpty(unique));
|
|
983
|
+
}
|
|
984
|
+
else {
|
|
985
|
+
colUnique = [
|
|
986
|
+
...new Set(data.map(item => {
|
|
987
|
+
return item;
|
|
988
|
+
})),
|
|
989
|
+
].filter(unique => !this.IsEmpty(unique));
|
|
990
|
+
}
|
|
991
|
+
return colUnique;
|
|
992
|
+
}
|
|
993
|
+
GetRoswpanbyData(column, index, data) {
|
|
994
|
+
let ValOfAgruppated = null;
|
|
995
|
+
let rowspanI = 1;
|
|
996
|
+
for (let i = index - 1; i < data.length; i++) {
|
|
997
|
+
let val = data[i][column];
|
|
998
|
+
if (ValOfAgruppated == null) {
|
|
999
|
+
ValOfAgruppated = val;
|
|
1000
|
+
}
|
|
1001
|
+
else if (val !== null && ValOfAgruppated == val) {
|
|
1002
|
+
rowspanI++;
|
|
1003
|
+
}
|
|
1004
|
+
else if (val !== null && ValOfAgruppated != val) {
|
|
1005
|
+
ValOfAgruppated = null;
|
|
1006
|
+
return rowspanI;
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
return rowspanI;
|
|
1010
|
+
}
|
|
1011
|
+
FormatterStringJsonByKey(data, key, separador) {
|
|
1012
|
+
let result = "";
|
|
1013
|
+
let colUnique = [];
|
|
1014
|
+
data.forEach(element => {
|
|
1015
|
+
colUnique.push(element[key]);
|
|
1016
|
+
});
|
|
1017
|
+
result = colUnique.join(separador);
|
|
1018
|
+
return result;
|
|
1019
|
+
}
|
|
1020
|
+
GroupByKey(xs, key) {
|
|
1021
|
+
return xs.reduce(function (rv, x) {
|
|
1022
|
+
(rv[x[key]] = rv[x[key]] || []).push(x);
|
|
1023
|
+
return rv;
|
|
1024
|
+
}, {});
|
|
1025
|
+
}
|
|
1026
|
+
LoadProjectsCss(route) {
|
|
1027
|
+
const elements = this.CheckProjectsCss(route);
|
|
1028
|
+
if (elements.length === 0) {
|
|
1029
|
+
const node = document.createElement("link");
|
|
1030
|
+
node.href = "./assets/css/projects/" + route + ".css";
|
|
1031
|
+
node.rel = "stylesheet";
|
|
1032
|
+
document.getElementsByTagName("head")[0].appendChild(node);
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
RemoveProjectsCss(route) {
|
|
1036
|
+
const elements = this.CheckProjectsCss(route);
|
|
1037
|
+
elements.forEach(element => {
|
|
1038
|
+
document.getElementsByTagName("head")[0].removeChild(element);
|
|
1039
|
+
});
|
|
1040
|
+
}
|
|
1041
|
+
CheckProjectsCss(route) {
|
|
1042
|
+
const parent = document.getElementsByTagName("head")[0];
|
|
1043
|
+
const elements = [];
|
|
1044
|
+
parent.childNodes.forEach((element) => {
|
|
1045
|
+
var a = element;
|
|
1046
|
+
if (element.nodeName === "LINK") {
|
|
1047
|
+
var elemethref = element["href"];
|
|
1048
|
+
if (elemethref && elemethref.indexOf(route) > 0) {
|
|
1049
|
+
elements.push(element);
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
});
|
|
1053
|
+
return elements;
|
|
1054
|
+
}
|
|
1055
|
+
CountDecimalsDigits(numero) {
|
|
1056
|
+
if (this.IsEmpty(numero))
|
|
1057
|
+
return 0;
|
|
1058
|
+
numero = parseFloat(numero);
|
|
1059
|
+
let arrayNumero = numero.toString().split(".");
|
|
1060
|
+
numero = arrayNumero.length > 1 ? arrayNumero[1] : "";
|
|
1061
|
+
return numero.length;
|
|
1062
|
+
}
|
|
1063
|
+
GetMaxNumberDecimals(data, key) {
|
|
1064
|
+
let arrCountDecimals = [];
|
|
1065
|
+
data.forEach(element => {
|
|
1066
|
+
let decimals = this.CountDecimalsDigits(element[key]);
|
|
1067
|
+
arrCountDecimals.push(decimals);
|
|
1068
|
+
});
|
|
1069
|
+
var maxDecimal = Math.max(...arrCountDecimals);
|
|
1070
|
+
return maxDecimal;
|
|
1071
|
+
}
|
|
1072
|
+
SetHeaderPathName(name) {
|
|
1073
|
+
this.headerPathName.next(name);
|
|
1074
|
+
}
|
|
1075
|
+
FormatDate(date, format) {
|
|
1076
|
+
return moment(date).format(format);
|
|
1077
|
+
}
|
|
1078
|
+
CopyTo(src, dest) {
|
|
1079
|
+
Object.keys(src).forEach(property => {
|
|
1080
|
+
dest[property] = src[property];
|
|
1081
|
+
});
|
|
1082
|
+
}
|
|
1083
|
+
IsValidEmail(email) {
|
|
1084
|
+
const emailPattern = /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/;
|
|
1085
|
+
return emailPattern.test(email);
|
|
1086
|
+
}
|
|
1087
|
+
IsGuid(str) {
|
|
1088
|
+
const guidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
1089
|
+
return guidRegex.test(str);
|
|
1090
|
+
}
|
|
1091
|
+
ContainsSpecialCharacters(str) {
|
|
1092
|
+
const specialCharacter = /^[^\\/?%*:|"<>]+$/;
|
|
1093
|
+
return !specialCharacter.test(str);
|
|
1094
|
+
}
|
|
1095
|
+
IsNumber(value) {
|
|
1096
|
+
return /^-?\d+(\.\d+)?$/.test(value);
|
|
1097
|
+
}
|
|
1098
|
+
CalculatePreviousDate(date, monthsAgo) {
|
|
1099
|
+
date.setMonth(date.getMonth() - monthsAgo);
|
|
1100
|
+
const newDate = moment(date).format(FormatDateConstants.DMYY_MOMENT);
|
|
1101
|
+
return newDate;
|
|
1102
|
+
}
|
|
1103
|
+
GetFilteredSearchKey(listTempAll, key, value, operatorId) {
|
|
1104
|
+
let listFilter = [];
|
|
1105
|
+
switch (operatorId) {
|
|
1106
|
+
case 0: //'Contains'
|
|
1107
|
+
let word = value.split("&", 100);
|
|
1108
|
+
let count = 0;
|
|
1109
|
+
let listTemp;
|
|
1110
|
+
if (word.length > 1) {
|
|
1111
|
+
word.forEach((element) => {
|
|
1112
|
+
if (count === 0) {
|
|
1113
|
+
listTemp = listTempAll.filter(a => a[key]?.toString()?.toLowerCase().includes(element.toLowerCase()));
|
|
1114
|
+
}
|
|
1115
|
+
else {
|
|
1116
|
+
listTemp = listTemp.filter((a) => a[key]?.toString()?.toLowerCase().includes(element.toLowerCase()));
|
|
1117
|
+
}
|
|
1118
|
+
count++;
|
|
1119
|
+
});
|
|
1120
|
+
listFilter = listTemp;
|
|
1121
|
+
}
|
|
1122
|
+
else {
|
|
1123
|
+
listFilter = listTempAll.filter(a => a[key]?.toString()?.toLowerCase().includes(value));
|
|
1124
|
+
}
|
|
1125
|
+
break;
|
|
1126
|
+
case 1: //'Exact'
|
|
1127
|
+
listFilter = value ? listTempAll.filter(a => a[key]?.toString()?.toLowerCase() === value) : listTempAll;
|
|
1128
|
+
break;
|
|
1129
|
+
case 2: //'Begin'
|
|
1130
|
+
listFilter = listTempAll.filter(a => a[key]?.toString()?.toLowerCase().startsWith(value));
|
|
1131
|
+
break;
|
|
1132
|
+
case 3: //'Ends'
|
|
1133
|
+
listFilter = listTempAll.filter(a => a[key]?.toString()?.toLowerCase().endsWith(value));
|
|
1134
|
+
break;
|
|
1135
|
+
default:
|
|
1136
|
+
listFilter = listTempAll.filter(a => a[key]?.toString()?.toLowerCase().includes(value));
|
|
1137
|
+
break;
|
|
1138
|
+
}
|
|
1139
|
+
return listFilter;
|
|
1140
|
+
}
|
|
1141
|
+
GetFilteredSearchKeyV2(listTempAll, key, value, operatorId, subKey = null) {
|
|
1142
|
+
if (value.length == 0)
|
|
1143
|
+
return listTempAll;
|
|
1144
|
+
if (!listTempAll || !key || value == null)
|
|
1145
|
+
return [];
|
|
1146
|
+
let listFilter = listTempAll;
|
|
1147
|
+
value = value.toString().toLowerCase();
|
|
1148
|
+
const words = value.includes("&") ? value.split("&").filter(Boolean) : [value];
|
|
1149
|
+
const filterFunction = (item) => {
|
|
1150
|
+
const itemValue = item[key]?.toString()?.toLowerCase();
|
|
1151
|
+
switch (operatorId) {
|
|
1152
|
+
case 0: // 'Contains'
|
|
1153
|
+
return words.every((word) => itemValue?.includes(word));
|
|
1154
|
+
case 1: // 'Exact'
|
|
1155
|
+
return itemValue === value;
|
|
1156
|
+
case 2: // 'Begin'
|
|
1157
|
+
return itemValue?.startsWith(value);
|
|
1158
|
+
case 3: // 'Ends'
|
|
1159
|
+
return itemValue?.endsWith(value);
|
|
1160
|
+
default:
|
|
1161
|
+
return itemValue?.includes(value);
|
|
1162
|
+
}
|
|
1163
|
+
};
|
|
1164
|
+
if (subKey) {
|
|
1165
|
+
// Filtrar primero a nivel de sublista
|
|
1166
|
+
listFilter = listFilter.map(filter => {
|
|
1167
|
+
return {
|
|
1168
|
+
...filter,
|
|
1169
|
+
[subKey]: filter[subKey]?.filter((item) => filterFunction(item)),
|
|
1170
|
+
};
|
|
1171
|
+
});
|
|
1172
|
+
// Filtrar luego la lista principal basado en si la sublista contiene elementos
|
|
1173
|
+
listFilter = listFilter.filter(filter => filter[subKey].length > 0);
|
|
1174
|
+
}
|
|
1175
|
+
else {
|
|
1176
|
+
// Filtrar solo la lista principal
|
|
1177
|
+
listFilter = listFilter.filter(filterFunction);
|
|
1178
|
+
}
|
|
1179
|
+
return listFilter;
|
|
1180
|
+
}
|
|
1181
|
+
TransformArrayToHashTable(arr, getKey) {
|
|
1182
|
+
//example of Use:
|
|
1183
|
+
// this.transformArrayToHashTable<any,string>([{id:1,prop1:"prop1Value"}],(o)=>o.id.toString())
|
|
1184
|
+
const hashTable = {};
|
|
1185
|
+
arr.forEach((object) => (hashTable[getKey(object)] = object));
|
|
1186
|
+
return hashTable;
|
|
1187
|
+
}
|
|
1188
|
+
TransformArrayToMap(arr, getKey) {
|
|
1189
|
+
//example of Use:
|
|
1190
|
+
// this.transformArrayToMap<string,any>([{id:1,prop1:"prop1Value"}],(o)=>o.id.toString())
|
|
1191
|
+
return new Map(arr.map(obj => [getKey(obj), obj]));
|
|
1192
|
+
}
|
|
1193
|
+
UrlHasQaUatSubdomain() {
|
|
1194
|
+
const { hostname } = new URL(window.location.href);
|
|
1195
|
+
const [subdomain] = hostname.split(".");
|
|
1196
|
+
return ["qa", "uat"].includes(subdomain);
|
|
1197
|
+
}
|
|
1198
|
+
UrlHasQaSubdomain() {
|
|
1199
|
+
const { hostname } = new URL(window.location.href);
|
|
1200
|
+
const [subdomain] = hostname.split(".");
|
|
1201
|
+
return ["qa"].includes(subdomain);
|
|
1202
|
+
}
|
|
1203
|
+
GetLastSegmentUrl() {
|
|
1204
|
+
const segments = this.location.path().split("/");
|
|
1205
|
+
const lastSegment = segments[segments.length - 1];
|
|
1206
|
+
const numberMappings = {
|
|
1207
|
+
"0": "intelica-allocated",
|
|
1208
|
+
"1": "penalty-summary",
|
|
1209
|
+
};
|
|
1210
|
+
// Verifica si lastSegment es un número y si tiene un mapeo correspondiente
|
|
1211
|
+
if (!isNaN(Number(lastSegment)) && numberMappings.hasOwnProperty(lastSegment))
|
|
1212
|
+
return numberMappings[lastSegment];
|
|
1213
|
+
else
|
|
1214
|
+
return lastSegment;
|
|
1215
|
+
}
|
|
1216
|
+
OnChangeMultiple($event, selectDescription) {
|
|
1217
|
+
let select = $event != null ? $event.element.ej2_instances[0] : null;
|
|
1218
|
+
if (select?.value.length > 0) {
|
|
1219
|
+
select.viewWrapper.innerHTML = `${select.value.length} ${selectDescription}`;
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
RemoveParamsAndSegments(url) {
|
|
1223
|
+
// Remover parámetros de consultanom
|
|
1224
|
+
const urlWithoutParams = url.split("?")[0];
|
|
1225
|
+
// Remover segmentos de ruta dinámicos
|
|
1226
|
+
const regex = /\/\d+(?=\/|$)(?!$)/g; // Encuentra segmentos de ruta que consisten en números
|
|
1227
|
+
return urlWithoutParams.replace(regex, "");
|
|
1228
|
+
}
|
|
1229
|
+
OpenActionMenu() {
|
|
1230
|
+
this.openActionMenu$.next(true);
|
|
1231
|
+
}
|
|
1232
|
+
AbbreviateNumber(number, fixed = 2) {
|
|
1233
|
+
if (number == 0.0 || number == 0 || number == 0.0) {
|
|
1234
|
+
return "0";
|
|
1235
|
+
}
|
|
1236
|
+
let formatCant = "";
|
|
1237
|
+
let numberOriginal = number;
|
|
1238
|
+
if (number < 0) {
|
|
1239
|
+
number = Math.abs(number);
|
|
1240
|
+
}
|
|
1241
|
+
if (number >= 1000 && number < 1000000) {
|
|
1242
|
+
number = parseFloat((number / 1000).toFixed(fixed));
|
|
1243
|
+
formatCant = " K";
|
|
1244
|
+
}
|
|
1245
|
+
else if (number >= 1000000 && number < 1000000000) {
|
|
1246
|
+
number = parseFloat((number / 1000000).toFixed(fixed));
|
|
1247
|
+
formatCant = " M";
|
|
1248
|
+
}
|
|
1249
|
+
else if (number >= 1000000000 && number <= 1000000000000) {
|
|
1250
|
+
number = parseFloat((number / 1000000000).toFixed(fixed));
|
|
1251
|
+
formatCant = " B";
|
|
1252
|
+
}
|
|
1253
|
+
else {
|
|
1254
|
+
number = this.NumberFormatByNumberCriteria(number, fixed);
|
|
1255
|
+
}
|
|
1256
|
+
return numberOriginal < 0 ? `(${number}${formatCant})` : `${number}${formatCant}`;
|
|
1257
|
+
}
|
|
1258
|
+
NumberFormatByNumberCriteria(number, fixed = 4) {
|
|
1259
|
+
const rounded = (Math.round(number * Math.pow(10, fixed)) / Math.pow(10, fixed)).toFixed(fixed);
|
|
1260
|
+
return rounded;
|
|
1261
|
+
}
|
|
1262
|
+
FormatPercentage(number, decimal = 2) {
|
|
1263
|
+
let numberInit = number;
|
|
1264
|
+
if (number < 0)
|
|
1265
|
+
number = Math.abs(number);
|
|
1266
|
+
number = parseFloat(number.toFixed(decimal));
|
|
1267
|
+
let finalNumber = `${number.toLocaleString("en-US")}%`;
|
|
1268
|
+
return numberInit < 0 ? `(${finalNumber})` : `${finalNumber}`;
|
|
1269
|
+
}
|
|
1270
|
+
GetMonthName(monthIndex, lang = "en") {
|
|
1271
|
+
return this.months[lang][monthIndex];
|
|
1272
|
+
}
|
|
1273
|
+
FormatNumberWithSuffix(number, decimalPlaces = 0) {
|
|
1274
|
+
if (number === 0) {
|
|
1275
|
+
return "0";
|
|
1276
|
+
}
|
|
1277
|
+
const isNegative = number < 0;
|
|
1278
|
+
const absoluteValue = Math.abs(number);
|
|
1279
|
+
const scaledNumber = parseFloat((absoluteValue / 1000).toFixed(decimalPlaces)).toLocaleString("en-US");
|
|
1280
|
+
const suffix = " K";
|
|
1281
|
+
return isNegative ? `(${scaledNumber}${suffix})` : `${scaledNumber}${suffix}`;
|
|
1282
|
+
}
|
|
1283
|
+
//SYNFCUNTION
|
|
1284
|
+
GenerateGUID() {
|
|
1285
|
+
let uuid = "", i, random;
|
|
1286
|
+
for (i = 0; i < 32; i++) {
|
|
1287
|
+
random = (Math.random() * 16) | 0;
|
|
1288
|
+
if (i === 8 || i === 12 || i === 16 || i === 20) {
|
|
1289
|
+
uuid += "-";
|
|
1290
|
+
}
|
|
1291
|
+
uuid += (i === 12 ? 4 : i === 16 ? (random & 3) | 8 : random).toString(16);
|
|
1292
|
+
}
|
|
1293
|
+
return uuid;
|
|
1294
|
+
}
|
|
1295
|
+
AttachDataLabelClickEvent(chartElementId, dataArray, onClickCallback) {
|
|
1296
|
+
const chartElement = document.getElementById(chartElementId);
|
|
1297
|
+
if (!chartElement) {
|
|
1298
|
+
return;
|
|
1299
|
+
}
|
|
1300
|
+
const dataLabels = chartElement.querySelectorAll('[id*="_DataLabel_"]');
|
|
1301
|
+
const dataLabelsArray = Array.prototype.slice.call(dataLabels);
|
|
1302
|
+
dataLabelsArray.forEach((label, index) => {
|
|
1303
|
+
// Calcula el índice ajustado para obtener el dato correcto
|
|
1304
|
+
const adjustedIndex = index % dataArray.length;
|
|
1305
|
+
label.addEventListener("click", () => {
|
|
1306
|
+
const clickedData = dataArray[adjustedIndex];
|
|
1307
|
+
if (clickedData) {
|
|
1308
|
+
onClickCallback(clickedData);
|
|
1309
|
+
}
|
|
1310
|
+
});
|
|
1311
|
+
});
|
|
1312
|
+
}
|
|
1313
|
+
FormatNumberAbsolute(number) {
|
|
1314
|
+
const isNegative = number < 0;
|
|
1315
|
+
if (number < 0) {
|
|
1316
|
+
number = Math.abs(number);
|
|
1317
|
+
}
|
|
1318
|
+
let finalNumber = `${number.toLocaleString("en-US")}`;
|
|
1319
|
+
return isNegative ? `(${finalNumber})` : `${finalNumber}`;
|
|
1320
|
+
}
|
|
1321
|
+
SortRecursive(data, column, criteria) {
|
|
1322
|
+
return _.orderBy(data.map(item => {
|
|
1323
|
+
Object.keys(item).forEach(key => {
|
|
1324
|
+
if (Array.isArray(item[key])) {
|
|
1325
|
+
item[key] = this.SortRecursive(item[key], column, criteria);
|
|
1326
|
+
}
|
|
1327
|
+
});
|
|
1328
|
+
return item;
|
|
1329
|
+
}), [(elm) => (typeof elm[column] === "string" ? elm[column].toLowerCase() : elm[column])], [criteria]);
|
|
1330
|
+
}
|
|
1331
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SharedService, deps: [{ token: i1$1.Location }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1332
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SharedService, providedIn: "root" });
|
|
1333
|
+
}
|
|
1334
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SharedService, decorators: [{
|
|
1335
|
+
type: Injectable,
|
|
1336
|
+
args: [{
|
|
1337
|
+
providedIn: "root",
|
|
1338
|
+
}]
|
|
1339
|
+
}], ctorParameters: () => [{ type: i1$1.Location }] });
|
|
1340
|
+
|
|
1341
|
+
class TableComponent {
|
|
1342
|
+
SharedService = inject(SharedService);
|
|
1343
|
+
ComponentId = "";
|
|
1344
|
+
ListData = [];
|
|
1345
|
+
ShowSearch = false;
|
|
1346
|
+
ListSearchOptions = [];
|
|
1347
|
+
ShowPagination = false;
|
|
1348
|
+
RowsPerPage = 10;
|
|
1349
|
+
ShowCheckbox = false;
|
|
1350
|
+
ListDataSelected = [];
|
|
1351
|
+
SelectedIdentifier = null;
|
|
1352
|
+
ColumnList = [];
|
|
1353
|
+
ListDataFilter = [];
|
|
1354
|
+
ListDataTable = [];
|
|
1355
|
+
ListDataSelectedFilter = [];
|
|
1356
|
+
ListDataSelectedTemp = [];
|
|
1357
|
+
ListSearchOptionsSimple = [];
|
|
1358
|
+
TotalRecords = 0;
|
|
1359
|
+
CurrentPage = 1;
|
|
1360
|
+
SortOrder = 1;
|
|
1361
|
+
SortField = null;
|
|
1362
|
+
EmmitSelectedItem = new EventEmitter();
|
|
1363
|
+
PaginatorTable;
|
|
1364
|
+
SearchTable;
|
|
1365
|
+
Columns;
|
|
1366
|
+
constructor() { }
|
|
1367
|
+
ngOnChanges(changes) {
|
|
1368
|
+
this.LoadSearchOptions();
|
|
1369
|
+
this.ExecuteSearch({});
|
|
1370
|
+
this.ValidateSelect();
|
|
1371
|
+
}
|
|
1372
|
+
ngAfterContentInit() {
|
|
1373
|
+
this.ColumnList = this.Columns.toArray();
|
|
1374
|
+
}
|
|
1375
|
+
LoadSearchOptions() {
|
|
1376
|
+
this.ListSearchOptionsSimple = this.ListSearchOptions.map(item => ({
|
|
1377
|
+
id: item.id,
|
|
1378
|
+
value: item.name,
|
|
1379
|
+
}));
|
|
1380
|
+
}
|
|
1381
|
+
OnSort(field) {
|
|
1382
|
+
if (this.SortField === field) {
|
|
1383
|
+
this.SortOrder *= -1;
|
|
1384
|
+
}
|
|
1385
|
+
else {
|
|
1386
|
+
this.SortField = field;
|
|
1387
|
+
this.SortOrder = 1;
|
|
1388
|
+
}
|
|
1389
|
+
this.SortPages();
|
|
1390
|
+
}
|
|
1391
|
+
OnPageChange(pageIndex) {
|
|
1392
|
+
this.CurrentPage = pageIndex;
|
|
1393
|
+
this.UpdatePages();
|
|
1394
|
+
}
|
|
1395
|
+
ExecuteSearch(event) {
|
|
1396
|
+
this.ListDataFilter = [...this.ListData];
|
|
1397
|
+
if (event?.searchText !== undefined && event?.searchText !== "" && this.ListSearchOptions.length > 0) {
|
|
1398
|
+
let Search = event.searchText?.trim()?.toLowerCase();
|
|
1399
|
+
let searchValue = this.ListSearchOptions.find(item => item.id === event.fieldId)?.field || "code";
|
|
1400
|
+
this.ListDataFilter = this.SharedService.GetFilteredSearchKey([...this.ListData], searchValue, Search, event.operatorId);
|
|
1401
|
+
if (this.PaginatorTable) {
|
|
1402
|
+
this.PaginatorTable.CurrentPage = 1;
|
|
1403
|
+
this.CurrentPage = 1;
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
this.SortPages();
|
|
1407
|
+
}
|
|
1408
|
+
SortPages() {
|
|
1409
|
+
const order = this.SortOrder === 1 ? "asc" : "desc";
|
|
1410
|
+
const field = this.SortField;
|
|
1411
|
+
this.ListDataFilter = this.SharedService.SortRecursive([...this.ListDataFilter], field, order);
|
|
1412
|
+
this.UpdatePages();
|
|
1413
|
+
}
|
|
1414
|
+
UpdatePages() {
|
|
1415
|
+
if (this.ShowPagination) {
|
|
1416
|
+
this.TotalRecords = this.ListDataFilter.length;
|
|
1417
|
+
const start = (this.CurrentPage - 1) * this.RowsPerPage;
|
|
1418
|
+
const end = start + this.RowsPerPage;
|
|
1419
|
+
this.ListDataTable = this.ListDataFilter.slice(start, end);
|
|
1420
|
+
}
|
|
1421
|
+
else {
|
|
1422
|
+
this.ListDataTable = this.ListDataFilter;
|
|
1423
|
+
}
|
|
1424
|
+
if (this.ShowCheckbox)
|
|
1425
|
+
this.ListDataSelectedFilter = [...this.ListDataSelectedTemp];
|
|
1426
|
+
}
|
|
1427
|
+
ValidateSelect() {
|
|
1428
|
+
if (!this.SelectedIdentifier && this.ShowCheckbox) {
|
|
1429
|
+
this.ShowCheckbox = false;
|
|
1430
|
+
return;
|
|
1431
|
+
}
|
|
1432
|
+
const selectedIds = new Set(this.ListDataSelected.map(item => item[this.SelectedIdentifier]));
|
|
1433
|
+
this.ListDataSelectedTemp = this.ListData.filter(item => selectedIds.has(item[this.SelectedIdentifier]));
|
|
1434
|
+
this.ListDataSelectedFilter = [...this.ListDataSelectedTemp];
|
|
1435
|
+
}
|
|
1436
|
+
SelectAll(event) {
|
|
1437
|
+
if (!this.SelectedIdentifier && this.ShowCheckbox)
|
|
1438
|
+
return;
|
|
1439
|
+
if (event.checked) {
|
|
1440
|
+
const idsSelected = new Set(this.ListDataSelectedTemp.map(item => item[this.SelectedIdentifier]));
|
|
1441
|
+
this.ListDataFilter.forEach(item => {
|
|
1442
|
+
if (!idsSelected.has(item[this.SelectedIdentifier])) {
|
|
1443
|
+
this.ListDataSelectedTemp.push(item);
|
|
1444
|
+
}
|
|
1445
|
+
});
|
|
1446
|
+
}
|
|
1447
|
+
else {
|
|
1448
|
+
const idsSelected = new Set(this.ListDataFilter.map(item => item[this.SelectedIdentifier]));
|
|
1449
|
+
this.ListDataSelectedTemp = this.ListDataSelectedTemp.filter(item => !idsSelected.has(item[this.SelectedIdentifier]));
|
|
1450
|
+
}
|
|
1451
|
+
this.EmmitSelectedItem.emit(this.ListDataSelectedTemp);
|
|
1452
|
+
}
|
|
1453
|
+
OnRowSelect(event) {
|
|
1454
|
+
if (!this.SelectedIdentifier && this.ShowCheckbox)
|
|
1455
|
+
return;
|
|
1456
|
+
const selectedItem = event.data;
|
|
1457
|
+
const exists = this.ListDataSelectedTemp.some(item => item[this.SelectedIdentifier] === selectedItem[this.SelectedIdentifier]);
|
|
1458
|
+
if (!exists) {
|
|
1459
|
+
this.ListDataSelectedTemp.push(selectedItem);
|
|
1460
|
+
}
|
|
1461
|
+
this.EmmitSelectedItem.emit(this.ListDataSelectedTemp);
|
|
1462
|
+
}
|
|
1463
|
+
OnRowUnselect(event) {
|
|
1464
|
+
if (!this.SelectedIdentifier && this.ShowCheckbox)
|
|
1465
|
+
return;
|
|
1466
|
+
const unselectedItem = event.data;
|
|
1467
|
+
this.ListDataSelectedTemp = this.ListDataSelectedTemp.filter(item => item[this.SelectedIdentifier] !== unselectedItem[this.SelectedIdentifier]);
|
|
1468
|
+
this.EmmitSelectedItem.emit(this.ListDataSelectedTemp);
|
|
1469
|
+
}
|
|
1470
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1471
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: TableComponent, isStandalone: true, selector: "intelica-table", inputs: { ComponentId: "ComponentId", ListData: "ListData", ShowSearch: "ShowSearch", ListSearchOptions: "ListSearchOptions", ShowPagination: "ShowPagination", RowsPerPage: "RowsPerPage", ShowCheckbox: "ShowCheckbox", ListDataSelected: "ListDataSelected", SelectedIdentifier: "SelectedIdentifier" }, outputs: { EmmitSelectedItem: "EmmitSelectedItem" }, queries: [{ propertyName: "Columns", predicate: ColumnComponent }], viewQueries: [{ propertyName: "PaginatorTable", first: true, predicate: ["paginatorTable"], descendants: true }, { propertyName: "SearchTable", first: true, predicate: ["searchTable"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"prTable\">\r\n\t<div class=\"prTableTools\">\r\n\t\t<intelica-search\r\n\t\t\t#searchTable\r\n\t\t\t*ngIf=\"ShowSearch\"\r\n\t\t\t[ComponentId]=\"ComponentId + 'Search'\"\r\n\t\t\t(OnSearch)=\"ExecuteSearch($event)\"\r\n\t\t\t[SearchFieldOptions]=\"ListSearchOptionsSimple\"\r\n\t\t\t[SearchOnKeyup]=\"false\"\r\n\t\t\t[SimpleSearchInput]=\"false\"\r\n\t\t></intelica-search>\r\n\t\t<intelica-paginator #paginatorTable *ngIf=\"ShowPagination\" [TotalItems]=\"ListDataFilter.length\" [ItemsPerPage]=\"RowsPerPage\" (PageChange)=\"OnPageChange($event)\"></intelica-paginator>\r\n\t</div>\r\n\t<p-table\r\n\t\tclass=\"prTableBasic\"\r\n\t\t[value]=\"ListDataTable\"\r\n\t\tresponsiveLayout=\"scroll\"\r\n\t\t[(selection)]=\"ListDataSelectedFilter\"\r\n\t\t(onHeaderCheckboxToggle)=\"SelectAll($event)\"\r\n\t\t(onRowSelect)=\"OnRowSelect($event)\"\r\n\t\t(onRowUnselect)=\"OnRowUnselect($event)\"\r\n\t>\r\n\t\t<!-- Encabezados -->\r\n\t\t<ng-template pTemplate=\"header\">\r\n\t\t\t<tr>\r\n\t\t\t\t<th *ngFor=\"let col of ColumnList\" [class]=\"col.className\" [pSortableColumn]=\"col.sortable ? col.field : ''\" [style.width]=\"col.width\" (click)=\"OnSort(col.field)\">\r\n\t\t\t\t\t<span pTooltip=\"{{ col.headerTooltip }}\" tooltipPosition=\"{{ col.headerTooltipPosition }}\">\r\n\t\t\t\t\t\t{{ col.header }}\r\n\t\t\t\t\t</span>\r\n\t\t\t\t\t<p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n\t\t\t\t</th>\r\n\t\t\t\t<th *ngIf=\"ShowCheckbox\" class=\"text-center\" style=\"width: 4%\">\r\n\t\t\t\t\t<p-tableHeaderCheckbox class=\"prCheckbox\" [ngClass]=\"{ 'prCheckbox--indeterminate': ListDataSelectedTemp.length > 0 && ListDataSelectedTemp.length < ListDataFilter.length }\" />\r\n\t\t\t\t</th>\r\n\t\t\t</tr>\r\n\t\t</ng-template>\r\n\r\n\t\t<!-- Cuerpo de la tabla -->\r\n\t\t<ng-template pTemplate=\"body\" let-rowData let-rowIndex=\"rowIndex\">\r\n\t\t\t<tr>\r\n\t\t\t\t<td *ngFor=\"let col of ColumnList; let i = index\" [ngClass]=\"col.className\">\r\n\t\t\t\t\t<ng-container *ngIf=\"col.showIndex; else columnContent\">\r\n\t\t\t\t\t\t{{ rowIndex + 1 + (CurrentPage - 1) * RowsPerPage }}\r\n\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t<ng-template #columnContent>\r\n\t\t\t\t\t\t<ng-container *ngIf=\"col.templateRef; else defaultContent\">\r\n\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"></ng-container>\r\n\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t<ng-template #defaultContent>\r\n\t\t\t\t\t\t\t<span pTooltip=\"{{ rowData[col.tooltip] }}\" tooltipPosition=\"{{ col.tooltipPosition }}\">\r\n\t\t\t\t\t\t\t\t{{ rowData[col.field] }}\r\n\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td *ngIf=\"ShowCheckbox\" class=\"text-center\">\r\n\t\t\t\t\t<p-tableCheckbox [value]=\"rowData\" class=\"prCheckbox\" />\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</ng-template>\r\n\t</p-table>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SearchComponent, selector: "intelica-search", inputs: ["ComponentId", "SearchFieldOptions", "SearchOnKeyup", "SimpleSearchInput", "Placeholder"], outputs: ["OnSearch"] }, { kind: "component", type: PaginatorComponent, selector: "intelica-paginator", inputs: ["TotalItems", "CurrentPage", "ItemsPerPage"], outputs: ["PageChange"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i2$2.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i2$2.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i2$2.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i2$2.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i2$2.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "ngmodule", type: BadgeModule }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }] });
|
|
1472
|
+
}
|
|
1473
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TableComponent, decorators: [{
|
|
1474
|
+
type: Component,
|
|
1475
|
+
args: [{ selector: "intelica-table", standalone: true, imports: [CommonModule, SearchComponent, PaginatorComponent, TableModule, BadgeModule, Popover, ColumnComponent, TooltipModule], template: "<div class=\"prTable\">\r\n\t<div class=\"prTableTools\">\r\n\t\t<intelica-search\r\n\t\t\t#searchTable\r\n\t\t\t*ngIf=\"ShowSearch\"\r\n\t\t\t[ComponentId]=\"ComponentId + 'Search'\"\r\n\t\t\t(OnSearch)=\"ExecuteSearch($event)\"\r\n\t\t\t[SearchFieldOptions]=\"ListSearchOptionsSimple\"\r\n\t\t\t[SearchOnKeyup]=\"false\"\r\n\t\t\t[SimpleSearchInput]=\"false\"\r\n\t\t></intelica-search>\r\n\t\t<intelica-paginator #paginatorTable *ngIf=\"ShowPagination\" [TotalItems]=\"ListDataFilter.length\" [ItemsPerPage]=\"RowsPerPage\" (PageChange)=\"OnPageChange($event)\"></intelica-paginator>\r\n\t</div>\r\n\t<p-table\r\n\t\tclass=\"prTableBasic\"\r\n\t\t[value]=\"ListDataTable\"\r\n\t\tresponsiveLayout=\"scroll\"\r\n\t\t[(selection)]=\"ListDataSelectedFilter\"\r\n\t\t(onHeaderCheckboxToggle)=\"SelectAll($event)\"\r\n\t\t(onRowSelect)=\"OnRowSelect($event)\"\r\n\t\t(onRowUnselect)=\"OnRowUnselect($event)\"\r\n\t>\r\n\t\t<!-- Encabezados -->\r\n\t\t<ng-template pTemplate=\"header\">\r\n\t\t\t<tr>\r\n\t\t\t\t<th *ngFor=\"let col of ColumnList\" [class]=\"col.className\" [pSortableColumn]=\"col.sortable ? col.field : ''\" [style.width]=\"col.width\" (click)=\"OnSort(col.field)\">\r\n\t\t\t\t\t<span pTooltip=\"{{ col.headerTooltip }}\" tooltipPosition=\"{{ col.headerTooltipPosition }}\">\r\n\t\t\t\t\t\t{{ col.header }}\r\n\t\t\t\t\t</span>\r\n\t\t\t\t\t<p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n\t\t\t\t</th>\r\n\t\t\t\t<th *ngIf=\"ShowCheckbox\" class=\"text-center\" style=\"width: 4%\">\r\n\t\t\t\t\t<p-tableHeaderCheckbox class=\"prCheckbox\" [ngClass]=\"{ 'prCheckbox--indeterminate': ListDataSelectedTemp.length > 0 && ListDataSelectedTemp.length < ListDataFilter.length }\" />\r\n\t\t\t\t</th>\r\n\t\t\t</tr>\r\n\t\t</ng-template>\r\n\r\n\t\t<!-- Cuerpo de la tabla -->\r\n\t\t<ng-template pTemplate=\"body\" let-rowData let-rowIndex=\"rowIndex\">\r\n\t\t\t<tr>\r\n\t\t\t\t<td *ngFor=\"let col of ColumnList; let i = index\" [ngClass]=\"col.className\">\r\n\t\t\t\t\t<ng-container *ngIf=\"col.showIndex; else columnContent\">\r\n\t\t\t\t\t\t{{ rowIndex + 1 + (CurrentPage - 1) * RowsPerPage }}\r\n\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t<ng-template #columnContent>\r\n\t\t\t\t\t\t<ng-container *ngIf=\"col.templateRef; else defaultContent\">\r\n\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"></ng-container>\r\n\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t<ng-template #defaultContent>\r\n\t\t\t\t\t\t\t<span pTooltip=\"{{ rowData[col.tooltip] }}\" tooltipPosition=\"{{ col.tooltipPosition }}\">\r\n\t\t\t\t\t\t\t\t{{ rowData[col.field] }}\r\n\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td *ngIf=\"ShowCheckbox\" class=\"text-center\">\r\n\t\t\t\t\t<p-tableCheckbox [value]=\"rowData\" class=\"prCheckbox\" />\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</ng-template>\r\n\t</p-table>\r\n</div>\r\n" }]
|
|
1476
|
+
}], ctorParameters: () => [], propDecorators: { ComponentId: [{
|
|
1477
|
+
type: Input
|
|
1478
|
+
}], ListData: [{
|
|
1479
|
+
type: Input
|
|
1480
|
+
}], ShowSearch: [{
|
|
1481
|
+
type: Input
|
|
1482
|
+
}], ListSearchOptions: [{
|
|
1483
|
+
type: Input
|
|
1484
|
+
}], ShowPagination: [{
|
|
1485
|
+
type: Input
|
|
1486
|
+
}], RowsPerPage: [{
|
|
1487
|
+
type: Input
|
|
1488
|
+
}], ShowCheckbox: [{
|
|
1489
|
+
type: Input
|
|
1490
|
+
}], ListDataSelected: [{
|
|
1491
|
+
type: Input
|
|
1492
|
+
}], SelectedIdentifier: [{
|
|
1493
|
+
type: Input
|
|
1494
|
+
}], EmmitSelectedItem: [{
|
|
1495
|
+
type: Output
|
|
1496
|
+
}], PaginatorTable: [{
|
|
1497
|
+
type: ViewChild,
|
|
1498
|
+
args: ["paginatorTable"]
|
|
1499
|
+
}], SearchTable: [{
|
|
1500
|
+
type: ViewChild,
|
|
1501
|
+
args: ["searchTable"]
|
|
1502
|
+
}], Columns: [{
|
|
1503
|
+
type: ContentChildren,
|
|
1504
|
+
args: [ColumnComponent]
|
|
1505
|
+
}] } });
|
|
1506
|
+
|
|
382
1507
|
/**
|
|
383
1508
|
* Generated bundle index. Do not edit.
|
|
384
1509
|
*/
|
|
385
1510
|
|
|
386
|
-
export { ConfigService, CookieAttributesGeneral, ErrorInterceptor, FeatureFlagService, GlobalFeatureFlagService, GlobalTermService, InitializeConfigService, IntelicaLibraryUiComponent, LanguageService, RefreshTokenInterceptor, SpinnerComponent, SpinnerService, SweetAlertService, TermPipe, TermService };
|
|
1511
|
+
export { ColumnComponent, ConfigService, CookieAttributesGeneral, ErrorInterceptor, FeatureFlagService, GlobalFeatureFlagService, GlobalTermService, InitializeConfigService, IntelicaLibraryUiComponent, LanguageService, RefreshTokenInterceptor, SpinnerComponent, SpinnerService, SweetAlertService, TableComponent, TermPipe, TermService };
|
|
387
1512
|
//# sourceMappingURL=intelica-library-ui.mjs.map
|