@dataclouder/ngx-core 0.1.37 → 0.1.39
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/dataclouder-ngx-core.mjs +415 -193
- package/fesm2022/dataclouder-ngx-core.mjs.map +1 -1
- package/index.d.ts +97 -42
- package/package.json +1 -1
|
@@ -1,77 +1,73 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input,
|
|
2
|
+
import { input, Component, inject, ChangeDetectionStrategy, output, Input, HostListener, ChangeDetectorRef, Injectable, Pipe, signal, effect, ViewChild, Directive, InjectionToken, computed, Optional, Inject } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/forms';
|
|
4
4
|
import { FormBuilder, FormsModule, ReactiveFormsModule, FormControl, ControlContainer, FormGroup, FormArray } from '@angular/forms';
|
|
5
5
|
import * as i2 from 'primeng/button';
|
|
6
6
|
import { ButtonModule } from 'primeng/button';
|
|
7
|
-
import * as
|
|
7
|
+
import * as i3$1 from 'primeng/dialog';
|
|
8
8
|
import { DialogModule } from 'primeng/dialog';
|
|
9
|
-
import * as
|
|
10
|
-
import { SelectModule } from 'primeng/select';
|
|
11
|
-
import * as i6 from 'primeng/multiselect';
|
|
12
|
-
import { MultiSelectModule } from 'primeng/multiselect';
|
|
13
|
-
import * as i7 from 'primeng/datepicker';
|
|
14
|
-
import { DatePickerModule } from 'primeng/datepicker';
|
|
15
|
-
import * as i8 from 'primeng/inputtext';
|
|
9
|
+
import * as i4$1 from 'primeng/inputtext';
|
|
16
10
|
import { InputTextModule } from 'primeng/inputtext';
|
|
17
|
-
import * as
|
|
11
|
+
import * as i5$1 from 'primeng/inputgroup';
|
|
18
12
|
import { InputGroupModule } from 'primeng/inputgroup';
|
|
19
13
|
import { InputGroupAddonModule } from 'primeng/inputgroupaddon';
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
14
|
+
import { DynamicDialogRef, DynamicDialogConfig, DialogService } from 'primeng/dynamicdialog';
|
|
15
|
+
import * as i3 from 'primeng/select';
|
|
16
|
+
import { SelectModule } from 'primeng/select';
|
|
17
|
+
import * as i4 from 'primeng/multiselect';
|
|
18
|
+
import { MultiSelectModule } from 'primeng/multiselect';
|
|
19
|
+
import * as i5 from 'primeng/datepicker';
|
|
20
|
+
import { DatePickerModule } from 'primeng/datepicker';
|
|
23
21
|
import * as i2$1 from 'primeng/message';
|
|
24
22
|
import { MessageModule } from 'primeng/message';
|
|
25
|
-
import * as
|
|
23
|
+
import * as i2$3 from 'primeng/api';
|
|
24
|
+
import { MessageService, FilterMatchMode } from 'primeng/api';
|
|
25
|
+
import * as i3$2 from 'primeng/progressbar';
|
|
26
26
|
import { ProgressBarModule, ProgressBar } from 'primeng/progressbar';
|
|
27
27
|
import * as i2$2 from 'primeng/toast';
|
|
28
28
|
import { ToastModule, Toast } from 'primeng/toast';
|
|
29
|
+
import * as i1$1 from '@angular/common';
|
|
30
|
+
import { CommonModule } from '@angular/common';
|
|
29
31
|
import { CardModule } from 'primeng/card';
|
|
30
32
|
import { RouterModule, ActivatedRoute, Router } from '@angular/router';
|
|
31
33
|
import { SpeedDialModule } from 'primeng/speeddial';
|
|
32
34
|
import { PaginatorModule } from 'primeng/paginator';
|
|
33
|
-
import * as
|
|
35
|
+
import * as i4$2 from 'primeng/table';
|
|
34
36
|
import { TableModule } from 'primeng/table';
|
|
35
37
|
import { get } from 'lodash';
|
|
36
|
-
import * as
|
|
38
|
+
import * as i6 from 'primeng/tag';
|
|
37
39
|
import { TagModule } from 'primeng/tag';
|
|
38
|
-
import * as i1$2 from '
|
|
39
|
-
import { CommonModule } from '@angular/common';
|
|
40
|
-
import * as i1$1 from 'primeng/fieldset';
|
|
40
|
+
import * as i1$2 from 'primeng/fieldset';
|
|
41
41
|
import { FieldsetModule } from 'primeng/fieldset';
|
|
42
42
|
import * as i3$3 from 'primeng/chip';
|
|
43
43
|
import { ChipModule } from 'primeng/chip';
|
|
44
44
|
import { AvatarModule } from 'primeng/avatar';
|
|
45
|
-
import * as i2$
|
|
45
|
+
import * as i2$4 from 'primeng/checkbox';
|
|
46
46
|
import { CheckboxModule } from 'primeng/checkbox';
|
|
47
|
-
import * as i4$
|
|
47
|
+
import * as i4$3 from 'primeng/tooltip';
|
|
48
48
|
import { TooltipModule } from 'primeng/tooltip';
|
|
49
|
-
import * as i2$
|
|
49
|
+
import * as i2$5 from 'primeng/inputnumber';
|
|
50
50
|
import { InputNumberModule } from 'primeng/inputnumber';
|
|
51
51
|
import { toSignal } from '@angular/core/rxjs-interop';
|
|
52
52
|
import { map } from 'rxjs/operators';
|
|
53
|
-
import { firstValueFrom,
|
|
54
|
-
import * as i4$
|
|
53
|
+
import { firstValueFrom, catchError, lastValueFrom, tap, throwError, map as map$1 } from 'rxjs';
|
|
54
|
+
import * as i4$4 from 'primeng/textarea';
|
|
55
55
|
import { TextareaModule } from 'primeng/textarea';
|
|
56
56
|
import { HttpClient, HttpEventType } from '@angular/common/http';
|
|
57
57
|
|
|
58
58
|
class EmptyStateComponent {
|
|
59
59
|
constructor() {
|
|
60
|
-
this.headingText = 'No existe el recurso que buscas';
|
|
61
|
-
this.subHeadingText = 'Intenta más tarde';
|
|
60
|
+
this.headingText = input('No existe el recurso que buscas', ...(ngDevMode ? [{ debugName: "headingText" }] : []));
|
|
61
|
+
this.subHeadingText = input('Intenta más tarde', ...(ngDevMode ? [{ debugName: "subHeadingText" }] : []));
|
|
62
62
|
this.mainIconSrcString = input('assets/img/empty-states/empty-box.png', ...(ngDevMode ? [{ debugName: "mainIconSrcString" }] : []));
|
|
63
63
|
}
|
|
64
64
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: EmptyStateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
65
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: EmptyStateComponent, isStandalone: true, selector: "dc-empty-state", inputs: { headingText: { classPropertyName: "headingText", publicName: "headingText", isSignal:
|
|
65
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: EmptyStateComponent, isStandalone: true, selector: "dc-empty-state", inputs: { headingText: { classPropertyName: "headingText", publicName: "headingText", isSignal: true, isRequired: false, transformFunction: null }, subHeadingText: { classPropertyName: "subHeadingText", publicName: "subHeadingText", isSignal: true, isRequired: false, transformFunction: null }, mainIconSrcString: { classPropertyName: "mainIconSrcString", publicName: "mainIconSrcString", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"empty-state-container\">\n @if (headingText()) {\n <h5 class=\"text-center\">{{ headingText() }}</h5>\n }\n <img width=\"180px\" class=\"image-empty-state\" [src]=\"mainIconSrcString()\" />\n @if (subHeadingText()) {\n <h6 class=\"text-center\">{{ subHeadingText() }}</h6>\n }\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:block;width:100%;height:100%}.empty-state-container{padding:20px;text-align:center;height:100%;flex-direction:column;display:flex;align-items:center}.empty-state-container .image-empty-state{filter:grayscale(40%);margin:15px 0}.empty-state-container h5{margin-bottom:10px}.empty-state-container h6{color:var(--text-color-secondary);margin-top:0}\n"] }); }
|
|
66
66
|
}
|
|
67
67
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: EmptyStateComponent, decorators: [{
|
|
68
68
|
type: Component,
|
|
69
|
-
args: [{ selector: 'dc-empty-state', standalone: true, imports: [], template: "<div class=\"
|
|
70
|
-
}]
|
|
71
|
-
type: Input
|
|
72
|
-
}], subHeadingText: [{
|
|
73
|
-
type: Input
|
|
74
|
-
}] } });
|
|
69
|
+
args: [{ selector: 'dc-empty-state', standalone: true, imports: [], template: "<div class=\"empty-state-container\">\n @if (headingText()) {\n <h5 class=\"text-center\">{{ headingText() }}</h5>\n }\n <img width=\"180px\" class=\"image-empty-state\" [src]=\"mainIconSrcString()\" />\n @if (subHeadingText()) {\n <h6 class=\"text-center\">{{ subHeadingText() }}</h6>\n }\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:block;width:100%;height:100%}.empty-state-container{padding:20px;text-align:center;height:100%;flex-direction:column;display:flex;align-items:center}.empty-state-container .image-empty-state{filter:grayscale(40%);margin:15px 0}.empty-state-container h5{margin-bottom:10px}.empty-state-container h6{color:var(--text-color-secondary);margin-top:0}\n"] }]
|
|
70
|
+
}] });
|
|
75
71
|
|
|
76
72
|
const availibleFilters = [
|
|
77
73
|
{ name: 'Tomadas', code: 'taken' },
|
|
@@ -99,39 +95,19 @@ const sortTypes = [
|
|
|
99
95
|
{ name: 'Populares', code: 'popular', sort: { takenCount: -1 } },
|
|
100
96
|
];
|
|
101
97
|
|
|
102
|
-
|
|
103
|
-
class DCFilterBarComponent {
|
|
98
|
+
class DcListFilterDialogComponent {
|
|
104
99
|
constructor() {
|
|
105
100
|
this.fb = inject(FormBuilder);
|
|
106
|
-
|
|
107
|
-
this.
|
|
108
|
-
this.
|
|
109
|
-
// public userService = inject(UserService);
|
|
110
|
-
// Inputs
|
|
111
|
-
this.customFilters = [];
|
|
112
|
-
this.isAdmin = false;
|
|
113
|
-
// Outputs
|
|
114
|
-
this.onFilterAction = output();
|
|
115
|
-
this.onChangeSort = output();
|
|
116
|
-
this.onNew = output();
|
|
101
|
+
this.ref = inject(DynamicDialogRef);
|
|
102
|
+
this.config = inject(DynamicDialogConfig);
|
|
103
|
+
this.customFilters = this.config.data.customFilters || [];
|
|
117
104
|
this.availibleFilters = availibleFilters;
|
|
118
105
|
this.sortOptions = sortOptions;
|
|
119
|
-
this.isSearchVisible = false;
|
|
120
|
-
this.isFilterVisible = false;
|
|
121
|
-
this.placeholder = '';
|
|
122
|
-
this.filter = { ...DEFAULT_FILTERS };
|
|
123
106
|
this.selectedFilters = [];
|
|
124
107
|
this.selectedSort = null;
|
|
125
108
|
this.dateRange = [];
|
|
126
|
-
}
|
|
127
|
-
ngOnInit() {
|
|
128
109
|
this.buildCustomFiltersForm();
|
|
129
110
|
}
|
|
130
|
-
ngOnChanges(changes) {
|
|
131
|
-
if (changes['customFilters']) {
|
|
132
|
-
this.buildCustomFiltersForm();
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
111
|
buildCustomFiltersForm() {
|
|
136
112
|
const formControls = {};
|
|
137
113
|
for (const filter of this.customFilters) {
|
|
@@ -139,18 +115,55 @@ class DCFilterBarComponent {
|
|
|
139
115
|
}
|
|
140
116
|
this.customFiltersForm = this.fb.group(formControls);
|
|
141
117
|
}
|
|
142
|
-
|
|
143
|
-
|
|
118
|
+
clearFilters() {
|
|
119
|
+
this.ref.close({ action: 'clear' });
|
|
120
|
+
}
|
|
121
|
+
applyFilters() {
|
|
122
|
+
const customFilterValues = this.customFiltersForm.value;
|
|
123
|
+
const activeFilters = Object.entries(customFilterValues).reduce((acc, [key, value]) => {
|
|
124
|
+
if (value !== null && value !== undefined && value !== '') {
|
|
125
|
+
acc[key] = value;
|
|
126
|
+
}
|
|
127
|
+
return acc;
|
|
128
|
+
}, {});
|
|
129
|
+
this.ref.close({
|
|
130
|
+
action: 'apply',
|
|
131
|
+
filters: activeFilters,
|
|
132
|
+
sort: this.selectedSort,
|
|
133
|
+
dateRange: this.dateRange,
|
|
134
|
+
quickFilters: this.selectedFilters,
|
|
135
|
+
});
|
|
144
136
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
137
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcListFilterDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
138
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: DcListFilterDialogComponent, isStandalone: true, selector: "dc-list-filter-dialog", ngImport: i0, template: "<div class=\"filter-dialog-content flex flex-col justify-between h-full\">\n <!-- Filters Content -->\n <div>\n <!-- Sort Options -->\n <div class=\"field\">\n <label class=\"font-semibold block mb-2\">Ordenar por</label>\n <p-select [options]=\"sortOptions\" [(ngModel)]=\"selectedSort\" optionLabel=\"label\" [style]=\"{ width: '100%' }\" placeholder=\"Seleccionar orden\"> </p-select>\n </div>\n\n <p-multiselect [options]=\"availibleFilters\" [(ngModel)]=\"selectedFilters\" optionLabel=\"name\" placeholder=\"Filtros R\u00E1pidos\" [maxSelectedLabels]=\"3\" />\n\n <!-- Date Filter -->\n <div class=\"field\">\n <label class=\"font-semibold block mb-2\">Rango de fechas</label>\n <p-datepicker\n [(ngModel)]=\"dateRange\"\n selectionMode=\"range\"\n [showButtonBar]=\"true\"\n [style]=\"{ width: '100%' }\"\n placeholder=\"Seleccionar fechas\"\n dateFormat=\"dd/mm/yy\">\n </p-datepicker>\n </div>\n\n @if (customFilters?.length > 0) {\n <form [formGroup]=\"customFiltersForm\">\n <h4>Filtros Personalizados</h4>\n @for (customFilter of customFilters; track customFilter.field) {\n <div class=\"field\">\n <label class=\"font-semibold block mb-2\">{{ customFilter.name }}</label>\n @switch (customFilter.type) { @case ('select') {\n <p-select\n [options]=\"customFilter.options\"\n [formControlName]=\"customFilter.field\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [style]=\"{ width: '100%' }\"\n placeholder=\"Seleccionar {{ customFilter.name }}\" />\n } @case ('string') {\n <input type=\"text\" pInputText [formControlName]=\"customFilter.field\" class=\"w-full\" />\n } @case ('date') {\n <p-datepicker [formControlName]=\"customFilter.field\" [style]=\"{ width: '100%' }\" dateFormat=\"dd/mm/yy\"></p-datepicker>\n } }\n </div>\n }\n </form>\n }\n </div>\n\n <!-- Action Buttons -->\n <div>\n <div class=\"flex justify-end gap-2\">\n <p-button label=\"Limpiar\" icon=\"pi pi-trash\" (click)=\"clearFilters()\" styleClass=\"p-button-text\"> </p-button>\n <p-button label=\"Aplicar\" icon=\"pi pi-check\" (click)=\"applyFilters()\" severity=\"primary\"> </p-button>\n </div>\n </div>\n</div>\n", styles: [":host ::ng-deep .filter-dialog-content{display:flex;flex-direction:column;gap:1.5rem;padding:1.5rem}\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: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { 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: ButtonModule }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: DialogModule }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i3.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i4.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "styleClass", "panelStyle", "panelStyleClass", "inputId", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "dataKey", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "placeholder", "options", "filterValue", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus", "highlightOnSelect", "size", "variant", "fluid", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i5.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
139
|
+
}
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcListFilterDialogComponent, decorators: [{
|
|
141
|
+
type: Component,
|
|
142
|
+
args: [{ selector: 'dc-list-filter-dialog', standalone: true, imports: [FormsModule, ReactiveFormsModule, ButtonModule, DialogModule, SelectModule, MultiSelectModule, DatePickerModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"filter-dialog-content flex flex-col justify-between h-full\">\n <!-- Filters Content -->\n <div>\n <!-- Sort Options -->\n <div class=\"field\">\n <label class=\"font-semibold block mb-2\">Ordenar por</label>\n <p-select [options]=\"sortOptions\" [(ngModel)]=\"selectedSort\" optionLabel=\"label\" [style]=\"{ width: '100%' }\" placeholder=\"Seleccionar orden\"> </p-select>\n </div>\n\n <p-multiselect [options]=\"availibleFilters\" [(ngModel)]=\"selectedFilters\" optionLabel=\"name\" placeholder=\"Filtros R\u00E1pidos\" [maxSelectedLabels]=\"3\" />\n\n <!-- Date Filter -->\n <div class=\"field\">\n <label class=\"font-semibold block mb-2\">Rango de fechas</label>\n <p-datepicker\n [(ngModel)]=\"dateRange\"\n selectionMode=\"range\"\n [showButtonBar]=\"true\"\n [style]=\"{ width: '100%' }\"\n placeholder=\"Seleccionar fechas\"\n dateFormat=\"dd/mm/yy\">\n </p-datepicker>\n </div>\n\n @if (customFilters?.length > 0) {\n <form [formGroup]=\"customFiltersForm\">\n <h4>Filtros Personalizados</h4>\n @for (customFilter of customFilters; track customFilter.field) {\n <div class=\"field\">\n <label class=\"font-semibold block mb-2\">{{ customFilter.name }}</label>\n @switch (customFilter.type) { @case ('select') {\n <p-select\n [options]=\"customFilter.options\"\n [formControlName]=\"customFilter.field\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [style]=\"{ width: '100%' }\"\n placeholder=\"Seleccionar {{ customFilter.name }}\" />\n } @case ('string') {\n <input type=\"text\" pInputText [formControlName]=\"customFilter.field\" class=\"w-full\" />\n } @case ('date') {\n <p-datepicker [formControlName]=\"customFilter.field\" [style]=\"{ width: '100%' }\" dateFormat=\"dd/mm/yy\"></p-datepicker>\n } }\n </div>\n }\n </form>\n }\n </div>\n\n <!-- Action Buttons -->\n <div>\n <div class=\"flex justify-end gap-2\">\n <p-button label=\"Limpiar\" icon=\"pi pi-trash\" (click)=\"clearFilters()\" styleClass=\"p-button-text\"> </p-button>\n <p-button label=\"Aplicar\" icon=\"pi pi-check\" (click)=\"applyFilters()\" severity=\"primary\"> </p-button>\n </div>\n </div>\n</div>\n", styles: [":host ::ng-deep .filter-dialog-content{display:flex;flex-direction:column;gap:1.5rem;padding:1.5rem}\n"] }]
|
|
143
|
+
}], ctorParameters: () => [] });
|
|
144
|
+
|
|
145
|
+
const DEFAULT_FILTERS = { filters: {}, page: 0, rowsPerPage: 10, sort: { _id: -1 } };
|
|
146
|
+
class DCFilterBarComponent {
|
|
147
|
+
constructor() {
|
|
148
|
+
this.dialogService = inject(DialogService);
|
|
149
|
+
// Signal Inputs
|
|
150
|
+
this.items = input([], ...(ngDevMode ? [{ debugName: "items" }] : []));
|
|
151
|
+
this.options = input({ showCreateButton: true }, ...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
152
|
+
// Inputs
|
|
153
|
+
this.customFilters = [];
|
|
154
|
+
this.isAdmin = false;
|
|
155
|
+
// Outputs
|
|
156
|
+
this.onFilterAction = output();
|
|
157
|
+
this.onNew = output();
|
|
158
|
+
// Internal State
|
|
159
|
+
this.isSearchVisible = false;
|
|
160
|
+
this.placeholder = '';
|
|
161
|
+
this.filter = { ...DEFAULT_FILTERS };
|
|
148
162
|
}
|
|
149
163
|
createNew() {
|
|
150
|
-
console.log('createNew from core components');
|
|
151
164
|
this.onNew.emit('new');
|
|
152
165
|
}
|
|
153
|
-
search(text
|
|
166
|
+
search(text) {
|
|
154
167
|
if (!text) {
|
|
155
168
|
this.placeholder = '';
|
|
156
169
|
this.clearFilters();
|
|
@@ -160,42 +173,47 @@ class DCFilterBarComponent {
|
|
|
160
173
|
}
|
|
161
174
|
this.isSearchVisible = false;
|
|
162
175
|
}
|
|
163
|
-
|
|
164
|
-
this.
|
|
176
|
+
openFilterDialog() {
|
|
177
|
+
const ref = this.dialogService.open(DcListFilterDialogComponent, {
|
|
178
|
+
header: 'Filtros',
|
|
179
|
+
width: '70vw',
|
|
180
|
+
height: '70vh',
|
|
181
|
+
contentStyle: { 'max-height': '90vh', overflow: 'auto', 'min-height': '500px', height: '100%' },
|
|
182
|
+
data: { customFilters: this.customFilters },
|
|
183
|
+
closable: true,
|
|
184
|
+
modal: true,
|
|
185
|
+
maximizable: true,
|
|
186
|
+
});
|
|
187
|
+
ref.onClose.subscribe((result) => {
|
|
188
|
+
if (result) {
|
|
189
|
+
if (result.action === 'clear') {
|
|
190
|
+
this.clearFilters();
|
|
191
|
+
}
|
|
192
|
+
else if (result.action === 'apply') {
|
|
193
|
+
this.applyFilters(result);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
applyFilters(result) {
|
|
199
|
+
const newFilters = { ...this.filter.filters, ...result.filters };
|
|
200
|
+
this.filter = { ...this.filter, filters: newFilters };
|
|
201
|
+
// Handle other filter types from result if necessary (sort, dateRange, etc.)
|
|
165
202
|
this.doItemAction({ action: 'filterChange', item: this.filter });
|
|
166
203
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
const activeFilters = Object.entries(customFilterValues).reduce((acc, [key, value]) => {
|
|
170
|
-
if (value !== null && value !== undefined && value !== '') {
|
|
171
|
-
acc[key] = value;
|
|
172
|
-
}
|
|
173
|
-
return acc;
|
|
174
|
-
}, {});
|
|
175
|
-
this.filter.filters = { ...this.filter.filters, ...activeFilters };
|
|
204
|
+
clearFilters() {
|
|
205
|
+
this.filter = { ...DEFAULT_FILTERS };
|
|
176
206
|
this.doItemAction({ action: 'filterChange', item: this.filter });
|
|
177
|
-
this.isFilterVisible = false;
|
|
178
207
|
}
|
|
179
208
|
doItemAction(filterEvent) {
|
|
180
209
|
this.onFilterAction.emit(filterEvent);
|
|
181
210
|
}
|
|
182
211
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DCFilterBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
183
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: DCFilterBarComponent, isStandalone: true, selector: "dc-filter-bar", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, customFilters: { classPropertyName: "customFilters", publicName: "customFilters", isSignal: false, isRequired: false, transformFunction: null }, isAdmin: { classPropertyName: "isAdmin", publicName: "isAdmin", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { onFilterAction: "onFilterAction", onChangeSort: "onChangeSort", onNew: "onNew" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"background-bar\">\n <div class=\"button-flex\">\n <p-button icon=\"pi pi-search\" label=\"buscar\" severity=\"secondary\" (click)=\"isSearchVisible = true\" />\n\n @if (isAdmin) {\n <span class=\"admin\">\n <i style=\"position: absolute; right: -5px; top: -5px; z-index: 2; color: grey\" class=\"pi pi-key\"></i>\n <p-button icon=\"pi pi-plus\" label=\"Crear Nueva\" severity=\"secondary\" (click)=\"createNew()\" />\n </span>\n }\n </div>\n\n @if (isAdmin) {\n <p-button icon=\"pi pi-objects-column\" variant=\"text\" (click)=\"doItemAction({ action: 'changeView', item: null })\" severity=\"secondary\"></p-button>\n } @if(options()?.showActions){ @for(item of items(); track $index) {\n <p-button [icon]=\"item.icon\" variant=\"text\" (click)=\"doItemAction({ action: item.title, item: item })\" severity=\"secondary\"></p-button>\n } @if(isAdmin) {\n <div class=\"button-flex\">\n <p-button icon=\"pi pi-filter\" label=\"Filtrar\" severity=\"secondary\" (click)=\"isFilterVisible = true\" />\n </div>\n } }\n</div>\n\n@if (placeholder) {\n<span class=\"search-flex\" (click)=\"search(null)\"> <i class=\"pi pi-times\"></i>{{ placeholder }} </span>\n}\n\n<p-dialog [(visible)]=\"isSearchVisible\" [dismissableMask]=\"true\" [modal]=\"true\" [showHeader]=\"false\" (onHide)=\"isSearchVisible = false\">\n <h4>Qu\u00E9 vamos a buscar? (Enter)</h4>\n <div>\n <p-inputgroup>\n <input (keydown.enter)=\"search(placeholder)\" type=\"text\" pInputText [(ngModel)]=\"placeholder\" />\n\n <p-button label=\"Buscar\" icon=\"pi pi-search\" />\n </p-inputgroup>\n </div>\n</p-dialog>\n\n<p-dialog [(visible)]=\"isFilterVisible\" [modal]=\"true\" [style]=\"{ width: '70vw', height: '70vh' }\" [header]=\"'Filtros'\">\n <div class=\"flex flex-column gap-4\">\n <!-- Sort Options -->\n <div class=\"field\">\n <label class=\"font-semibold block mb-2\">Ordenar por</label>\n <p-select [options]=\"sortOptions\" [(ngModel)]=\"selectedSort\" optionLabel=\"label\" [style]=\"{ width: '100%' }\" placeholder=\"Seleccionar orden\"> </p-select>\n </div>\n\n <p-multiselect\n [options]=\"availibleFilters\"\n [(ngModel)]=\"selectedFilters\"\n optionLabel=\"name\"\n placeholder=\"Filtros R\u00E1pidos\"\n [maxSelectedLabels]=\"3\"\n styleClass=\"w-full md:w-80\" />\n\n <!-- Date Filter -->\n <div class=\"field\">\n <label class=\"font-semibold block mb-2\">Rango de fechas</label>\n <p-datepicker\n [(ngModel)]=\"dateRange\"\n selectionMode=\"range\"\n [showButtonBar]=\"true\"\n [style]=\"{ width: '100%' }\"\n placeholder=\"Seleccionar fechas\"\n dateFormat=\"dd/mm/yy\">\n </p-datepicker>\n </div>\n\n @if (customFilters?.length > 0) {\n <form [formGroup]=\"customFiltersForm\">\n <h4>Filtros Personalizados</h4>\n @for (customFilter of customFilters; track customFilter.field) {\n <div class=\"field\">\n <label class=\"font-semibold block mb-2\">{{ customFilter.name }}</label>\n @switch (customFilter.type) { @case ('select') {\n <p-select\n [options]=\"customFilter.options\"\n [formControlName]=\"customFilter.field\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [style]=\"{ width: '100%' }\"\n placeholder=\"Seleccionar {{ customFilter.name }}\" />\n } @case ('string') {\n <input type=\"text\" pInputText [formControlName]=\"customFilter.field\" class=\"w-full\" />\n } @case ('date') {\n <p-datepicker [formControlName]=\"customFilter.field\" [style]=\"{ width: '100%' }\" dateFormat=\"dd/mm/yy\"></p-datepicker>\n } }\n </div>\n }\n </form>\n }\n\n <!-- Recent/All Toggle -->\n </div>\n\n <ng-template pTemplate=\"footer\">\n <div class=\"flex justify-content-end gap-2\">\n <p-button label=\"Limpiar\" icon=\"pi pi-trash\" (click)=\"clearFilters()\" styleClass=\"p-button-text\"> </p-button>\n <p-button label=\"Aplicar\" icon=\"pi pi-check\" (click)=\"applyFilters()\" severity=\"primary\"> </p-button>\n </div>\n </ng-template>\n</p-dialog>\n", styles: [":host{display:block}.admin{margin-left:10px;position:relative}.background-bar{background-color:var(--p-primary-color);display:flex;border-radius:10px;justify-content:space-between;padding:10px}.button-flex{display:flex;margin-right:10px}.white{color:#fff}.search-flex{margin-left:10px}.search-dialog{width:750px;-webkit-backdrop-filter:blur(70px);backdrop-filter:blur(70px)}.border-none{border:none}.bg-black-alpha-50{background-color:var(--p-primary-color)}\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: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { 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: ButtonModule }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i4.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "appendTo", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i5.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i6.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "styleClass", "panelStyle", "panelStyleClass", "inputId", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "dataKey", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "placeholder", "options", "filterValue", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus", "highlightOnSelect", "size", "variant", "fluid", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i7.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i8.InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: InputGroupModule }, { kind: "component", type: i9.InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["styleClass"] }, { kind: "ngmodule", type: InputGroupAddonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
212
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: DCFilterBarComponent, isStandalone: true, selector: "dc-filter-bar", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, customFilters: { classPropertyName: "customFilters", publicName: "customFilters", isSignal: false, isRequired: false, transformFunction: null }, isAdmin: { classPropertyName: "isAdmin", publicName: "isAdmin", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { onFilterAction: "onFilterAction", onNew: "onNew" }, providers: [DialogService], ngImport: i0, template: "<div class=\"background-bar\">\n <div class=\"button-flex\">\n <p-button icon=\"pi pi-search\" label=\"buscar\" severity=\"secondary\" (click)=\"isSearchVisible = true\" />\n\n @if (isAdmin) {\n <span class=\"admin\">\n <i style=\"position: absolute; right: -5px; top: -5px; z-index: 2; color: grey\" class=\"pi pi-key\"></i>\n <p-button icon=\"pi pi-plus\" label=\"Crear Nueva\" severity=\"secondary\" (click)=\"createNew()\" />\n </span>\n }\n </div>\n\n @if (isAdmin) {\n <p-button icon=\"pi pi-objects-column\" variant=\"text\" (click)=\"doItemAction({ action: 'changeView', item: null })\" severity=\"secondary\"></p-button>\n } @if(options()?.showActions){ @for(item of items(); track $index) {\n <p-button [icon]=\"item.icon\" variant=\"text\" (click)=\"doItemAction({ action: item.title, item: item })\" severity=\"secondary\"></p-button>\n } @if(isAdmin) {\n <div class=\"button-flex\">\n <p-button icon=\"pi pi-filter\" label=\"Filtrar\" severity=\"secondary\" (click)=\"openFilterDialog()\" />\n </div>\n } }\n</div>\n\n@if (placeholder) {\n<span class=\"search-flex\" (click)=\"search(null)\"> <i class=\"pi pi-times\"></i>{{ placeholder }} </span>\n}\n\n<p-dialog [(visible)]=\"isSearchVisible\" [dismissableMask]=\"true\" [modal]=\"true\" [showHeader]=\"false\" (onHide)=\"isSearchVisible = false\">\n <h4>Qu\u00E9 vamos a buscar? (Enter)</h4>\n <div>\n <p-inputgroup>\n <input (keydown.enter)=\"search(placeholder)\" type=\"text\" pInputText [(ngModel)]=\"placeholder\" />\n\n <p-button label=\"Buscar\" icon=\"pi pi-search\" (click)=\"search(placeholder)\" />\n </p-inputgroup>\n </div>\n</p-dialog>\n", styles: [":host{display:block}.admin{margin-left:10px;position:relative}.background-bar{background-color:var(--p-primary-color);display:flex;border-radius:10px;justify-content:space-between;padding:10px}.button-flex{display:flex;margin-right:10px}.white{color:#fff}.search-flex{margin-left:10px}.search-dialog{width:750px;-webkit-backdrop-filter:blur(70px);backdrop-filter:blur(70px)}.border-none{border:none}.bg-black-alpha-50{background-color:var(--p-primary-color)}\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: "component", type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i3$1.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "appendTo", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i4$1.InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: InputGroupModule }, { kind: "component", type: i5$1.InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["styleClass"] }, { kind: "ngmodule", type: InputGroupAddonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
184
213
|
}
|
|
185
214
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DCFilterBarComponent, decorators: [{
|
|
186
215
|
type: Component,
|
|
187
|
-
args: [{ selector: 'dc-filter-bar', standalone: true, imports: [
|
|
188
|
-
FormsModule,
|
|
189
|
-
ReactiveFormsModule,
|
|
190
|
-
ButtonModule,
|
|
191
|
-
DialogModule,
|
|
192
|
-
SelectModule,
|
|
193
|
-
MultiSelectModule,
|
|
194
|
-
DatePickerModule,
|
|
195
|
-
InputTextModule,
|
|
196
|
-
InputGroupModule,
|
|
197
|
-
InputGroupAddonModule,
|
|
198
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"background-bar\">\n <div class=\"button-flex\">\n <p-button icon=\"pi pi-search\" label=\"buscar\" severity=\"secondary\" (click)=\"isSearchVisible = true\" />\n\n @if (isAdmin) {\n <span class=\"admin\">\n <i style=\"position: absolute; right: -5px; top: -5px; z-index: 2; color: grey\" class=\"pi pi-key\"></i>\n <p-button icon=\"pi pi-plus\" label=\"Crear Nueva\" severity=\"secondary\" (click)=\"createNew()\" />\n </span>\n }\n </div>\n\n @if (isAdmin) {\n <p-button icon=\"pi pi-objects-column\" variant=\"text\" (click)=\"doItemAction({ action: 'changeView', item: null })\" severity=\"secondary\"></p-button>\n } @if(options()?.showActions){ @for(item of items(); track $index) {\n <p-button [icon]=\"item.icon\" variant=\"text\" (click)=\"doItemAction({ action: item.title, item: item })\" severity=\"secondary\"></p-button>\n } @if(isAdmin) {\n <div class=\"button-flex\">\n <p-button icon=\"pi pi-filter\" label=\"Filtrar\" severity=\"secondary\" (click)=\"isFilterVisible = true\" />\n </div>\n } }\n</div>\n\n@if (placeholder) {\n<span class=\"search-flex\" (click)=\"search(null)\"> <i class=\"pi pi-times\"></i>{{ placeholder }} </span>\n}\n\n<p-dialog [(visible)]=\"isSearchVisible\" [dismissableMask]=\"true\" [modal]=\"true\" [showHeader]=\"false\" (onHide)=\"isSearchVisible = false\">\n <h4>Qu\u00E9 vamos a buscar? (Enter)</h4>\n <div>\n <p-inputgroup>\n <input (keydown.enter)=\"search(placeholder)\" type=\"text\" pInputText [(ngModel)]=\"placeholder\" />\n\n <p-button label=\"Buscar\" icon=\"pi pi-search\" />\n </p-inputgroup>\n </div>\n</p-dialog>\n\n<p-dialog [(visible)]=\"isFilterVisible\" [modal]=\"true\" [style]=\"{ width: '70vw', height: '70vh' }\" [header]=\"'Filtros'\">\n <div class=\"flex flex-column gap-4\">\n <!-- Sort Options -->\n <div class=\"field\">\n <label class=\"font-semibold block mb-2\">Ordenar por</label>\n <p-select [options]=\"sortOptions\" [(ngModel)]=\"selectedSort\" optionLabel=\"label\" [style]=\"{ width: '100%' }\" placeholder=\"Seleccionar orden\"> </p-select>\n </div>\n\n <p-multiselect\n [options]=\"availibleFilters\"\n [(ngModel)]=\"selectedFilters\"\n optionLabel=\"name\"\n placeholder=\"Filtros R\u00E1pidos\"\n [maxSelectedLabels]=\"3\"\n styleClass=\"w-full md:w-80\" />\n\n <!-- Date Filter -->\n <div class=\"field\">\n <label class=\"font-semibold block mb-2\">Rango de fechas</label>\n <p-datepicker\n [(ngModel)]=\"dateRange\"\n selectionMode=\"range\"\n [showButtonBar]=\"true\"\n [style]=\"{ width: '100%' }\"\n placeholder=\"Seleccionar fechas\"\n dateFormat=\"dd/mm/yy\">\n </p-datepicker>\n </div>\n\n @if (customFilters?.length > 0) {\n <form [formGroup]=\"customFiltersForm\">\n <h4>Filtros Personalizados</h4>\n @for (customFilter of customFilters; track customFilter.field) {\n <div class=\"field\">\n <label class=\"font-semibold block mb-2\">{{ customFilter.name }}</label>\n @switch (customFilter.type) { @case ('select') {\n <p-select\n [options]=\"customFilter.options\"\n [formControlName]=\"customFilter.field\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [style]=\"{ width: '100%' }\"\n placeholder=\"Seleccionar {{ customFilter.name }}\" />\n } @case ('string') {\n <input type=\"text\" pInputText [formControlName]=\"customFilter.field\" class=\"w-full\" />\n } @case ('date') {\n <p-datepicker [formControlName]=\"customFilter.field\" [style]=\"{ width: '100%' }\" dateFormat=\"dd/mm/yy\"></p-datepicker>\n } }\n </div>\n }\n </form>\n }\n\n <!-- Recent/All Toggle -->\n </div>\n\n <ng-template pTemplate=\"footer\">\n <div class=\"flex justify-content-end gap-2\">\n <p-button label=\"Limpiar\" icon=\"pi pi-trash\" (click)=\"clearFilters()\" styleClass=\"p-button-text\"> </p-button>\n <p-button label=\"Aplicar\" icon=\"pi pi-check\" (click)=\"applyFilters()\" severity=\"primary\"> </p-button>\n </div>\n </ng-template>\n</p-dialog>\n", styles: [":host{display:block}.admin{margin-left:10px;position:relative}.background-bar{background-color:var(--p-primary-color);display:flex;border-radius:10px;justify-content:space-between;padding:10px}.button-flex{display:flex;margin-right:10px}.white{color:#fff}.search-flex{margin-left:10px}.search-dialog{width:750px;-webkit-backdrop-filter:blur(70px);backdrop-filter:blur(70px)}.border-none{border:none}.bg-black-alpha-50{background-color:var(--p-primary-color)}\n"] }]
|
|
216
|
+
args: [{ selector: 'dc-filter-bar', standalone: true, imports: [FormsModule, ButtonModule, DialogModule, InputTextModule, InputGroupModule, InputGroupAddonModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [DialogService], template: "<div class=\"background-bar\">\n <div class=\"button-flex\">\n <p-button icon=\"pi pi-search\" label=\"buscar\" severity=\"secondary\" (click)=\"isSearchVisible = true\" />\n\n @if (isAdmin) {\n <span class=\"admin\">\n <i style=\"position: absolute; right: -5px; top: -5px; z-index: 2; color: grey\" class=\"pi pi-key\"></i>\n <p-button icon=\"pi pi-plus\" label=\"Crear Nueva\" severity=\"secondary\" (click)=\"createNew()\" />\n </span>\n }\n </div>\n\n @if (isAdmin) {\n <p-button icon=\"pi pi-objects-column\" variant=\"text\" (click)=\"doItemAction({ action: 'changeView', item: null })\" severity=\"secondary\"></p-button>\n } @if(options()?.showActions){ @for(item of items(); track $index) {\n <p-button [icon]=\"item.icon\" variant=\"text\" (click)=\"doItemAction({ action: item.title, item: item })\" severity=\"secondary\"></p-button>\n } @if(isAdmin) {\n <div class=\"button-flex\">\n <p-button icon=\"pi pi-filter\" label=\"Filtrar\" severity=\"secondary\" (click)=\"openFilterDialog()\" />\n </div>\n } }\n</div>\n\n@if (placeholder) {\n<span class=\"search-flex\" (click)=\"search(null)\"> <i class=\"pi pi-times\"></i>{{ placeholder }} </span>\n}\n\n<p-dialog [(visible)]=\"isSearchVisible\" [dismissableMask]=\"true\" [modal]=\"true\" [showHeader]=\"false\" (onHide)=\"isSearchVisible = false\">\n <h4>Qu\u00E9 vamos a buscar? (Enter)</h4>\n <div>\n <p-inputgroup>\n <input (keydown.enter)=\"search(placeholder)\" type=\"text\" pInputText [(ngModel)]=\"placeholder\" />\n\n <p-button label=\"Buscar\" icon=\"pi pi-search\" (click)=\"search(placeholder)\" />\n </p-inputgroup>\n </div>\n</p-dialog>\n", styles: [":host{display:block}.admin{margin-left:10px;position:relative}.background-bar{background-color:var(--p-primary-color);display:flex;border-radius:10px;justify-content:space-between;padding:10px}.button-flex{display:flex;margin-right:10px}.white{color:#fff}.search-flex{margin-left:10px}.search-dialog{width:750px;-webkit-backdrop-filter:blur(70px);backdrop-filter:blur(70px)}.border-none{border:none}.bg-black-alpha-50{background-color:var(--p-primary-color)}\n"] }]
|
|
199
217
|
}], propDecorators: { customFilters: [{
|
|
200
218
|
type: Input
|
|
201
219
|
}], isAdmin: [{
|
|
@@ -313,7 +331,7 @@ class DCProgressToastComponent {
|
|
|
313
331
|
this.processClosed.emit();
|
|
314
332
|
}
|
|
315
333
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DCProgressToastComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
316
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.6", type: DCProgressToastComponent, isStandalone: true, selector: "dc-progress-toast", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: false, isRequired: false, transformFunction: null }, progress: { classPropertyName: "progress", publicName: "progress", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { processCompleted: "processCompleted", processClosed: "processClosed" }, providers: [MessageService], usesOnChanges: true, ngImport: i0, template: "<div class=\"card flex justify-center\">\n <p-toast position=\"top-center\" key=\"confirm\" (onClose)=\"onClose()\" [baseZIndex]=\"9000\">\n <ng-template let-message #headless let-closeFn=\"closeFn\">\n <section style=\"padding: 15px\">\n <div>\n <i class=\"pi pi-cloud-upload\"></i>\n <span>{{ message.summary }}</span>\n </div>\n <div>\n <p-progressbar [value]=\"progress()\" [showValue]=\"false\" [style]=\"{ height: '6px' }\" />\n\n <label style=\"color: beige\">{{ progress() }}% uploaded</label>\n </div>\n <div>\n <p-button label=\"Another Upload?\" (click)=\"closeFn($event)\" size=\"small\" />\n <p-button label=\"Cancel\" (click)=\"closeFn($event)\" size=\"small\" />\n </div>\n </section>\n </ng-template>\n </p-toast>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: ToastModule }, { kind: "component", type: i2$2.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "ngmodule", type: ProgressBarModule }, { kind: "component", type: i3$
|
|
334
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.6", type: DCProgressToastComponent, isStandalone: true, selector: "dc-progress-toast", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: false, isRequired: false, transformFunction: null }, progress: { classPropertyName: "progress", publicName: "progress", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { processCompleted: "processCompleted", processClosed: "processClosed" }, providers: [MessageService], usesOnChanges: true, ngImport: i0, template: "<div class=\"card flex justify-center\">\n <p-toast position=\"top-center\" key=\"confirm\" (onClose)=\"onClose()\" [baseZIndex]=\"9000\">\n <ng-template let-message #headless let-closeFn=\"closeFn\">\n <section style=\"padding: 15px\">\n <div>\n <i class=\"pi pi-cloud-upload\"></i>\n <span>{{ message.summary }}</span>\n </div>\n <div>\n <p-progressbar [value]=\"progress()\" [showValue]=\"false\" [style]=\"{ height: '6px' }\" />\n\n <label style=\"color: beige\">{{ progress() }}% uploaded</label>\n </div>\n <div>\n <p-button label=\"Another Upload?\" (click)=\"closeFn($event)\" size=\"small\" />\n <p-button label=\"Cancel\" (click)=\"closeFn($event)\" size=\"small\" />\n </div>\n </section>\n </ng-template>\n </p-toast>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: ToastModule }, { kind: "component", type: i2$2.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "ngmodule", type: ProgressBarModule }, { kind: "component", type: i3$2.ProgressBar, selector: "p-progressBar, p-progressbar, p-progress-bar", inputs: ["value", "showValue", "styleClass", "valueStyleClass", "unit", "mode", "color"] }] }); }
|
|
317
335
|
}
|
|
318
336
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DCProgressToastComponent, decorators: [{
|
|
319
337
|
type: Component,
|
|
@@ -490,7 +508,7 @@ class LoadingBarComponent {
|
|
|
490
508
|
this.loadingBarService = inject(LoadingBarService);
|
|
491
509
|
}
|
|
492
510
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: LoadingBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
493
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: LoadingBarComponent, isStandalone: true, selector: "dc-loading-bar", providers: [MessageService], ngImport: i0, template: "@if (loadingBarService.isShowing) {\n<p-progressbar [color]=\"loadingBarService.color\" [mode]=\"loadingBarService.mode\" [style]=\"{ height: '4px' }\" [value]=\"loadingBarService.progress\" />\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: ToastModule }, { kind: "ngmodule", type: ProgressBarModule }, { kind: "component", type: i3$
|
|
511
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: LoadingBarComponent, isStandalone: true, selector: "dc-loading-bar", providers: [MessageService], ngImport: i0, template: "@if (loadingBarService.isShowing) {\n<p-progressbar [color]=\"loadingBarService.color\" [mode]=\"loadingBarService.mode\" [style]=\"{ height: '4px' }\" [value]=\"loadingBarService.progress\" />\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: ToastModule }, { kind: "ngmodule", type: ProgressBarModule }, { kind: "component", type: i3$2.ProgressBar, selector: "p-progressBar, p-progressbar, p-progress-bar", inputs: ["value", "showValue", "styleClass", "valueStyleClass", "unit", "mode", "color"] }] }); }
|
|
494
512
|
}
|
|
495
513
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: LoadingBarComponent, decorators: [{
|
|
496
514
|
type: Component,
|
|
@@ -517,6 +535,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
517
535
|
}]
|
|
518
536
|
}] });
|
|
519
537
|
|
|
538
|
+
/*
|
|
539
|
+
READ the Quick Table MD to more info how to use
|
|
540
|
+
Inputs
|
|
541
|
+
columns: PColumn[];
|
|
542
|
+
tableData: any[];
|
|
543
|
+
actions: MenuItem[];
|
|
544
|
+
Outputs
|
|
545
|
+
onAction: OnActionEvent;
|
|
546
|
+
*/
|
|
520
547
|
class QuickTableComponent {
|
|
521
548
|
constructor() {
|
|
522
549
|
// Inputs
|
|
@@ -613,6 +640,24 @@ class QuickTableComponent {
|
|
|
613
640
|
options: uniqueTags,
|
|
614
641
|
};
|
|
615
642
|
}
|
|
643
|
+
else if (col.type === 'select') {
|
|
644
|
+
let options = col.options;
|
|
645
|
+
if (!options) {
|
|
646
|
+
const uniqueOptions = Array.from(new Set(this.tableData().map((item) => item[col.field])));
|
|
647
|
+
options = uniqueOptions.map((option) => ({ label: option, value: option }));
|
|
648
|
+
}
|
|
649
|
+
filterObj[col.field] = {
|
|
650
|
+
value: null,
|
|
651
|
+
matchMode: FilterMatchMode.EQUALS,
|
|
652
|
+
options: options,
|
|
653
|
+
};
|
|
654
|
+
}
|
|
655
|
+
else if (col.type === 'boolean') {
|
|
656
|
+
filterObj[col.field] = {
|
|
657
|
+
value: null,
|
|
658
|
+
matchMode: FilterMatchMode.EQUALS,
|
|
659
|
+
};
|
|
660
|
+
}
|
|
616
661
|
});
|
|
617
662
|
}
|
|
618
663
|
this.filters.set(filterObj);
|
|
@@ -640,13 +685,22 @@ class QuickTableComponent {
|
|
|
640
685
|
console.log(filteredData);
|
|
641
686
|
this._tableData.set(filteredData);
|
|
642
687
|
}
|
|
688
|
+
else if (type === 'select') {
|
|
689
|
+
if (!value) {
|
|
690
|
+
this._tableData.set(this.tableData());
|
|
691
|
+
return;
|
|
692
|
+
}
|
|
693
|
+
const filteredData = this.tableData().filter((item) => item[column] === value);
|
|
694
|
+
this._tableData.set(filteredData);
|
|
695
|
+
}
|
|
643
696
|
}
|
|
644
697
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: QuickTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
645
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: QuickTableComponent, isStandalone: true, selector: "app-quick-table", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, tableData: { classPropertyName: "tableData", publicName: "tableData", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction" }, viewQueries: [{ propertyName: "tableRef", first: true, predicate: ["tableRef"], descendants: true }], ngImport: i0, template: "<p-table\n [tableStyle]=\"{ 'min-width': '20rem' }\"\n #tableRef\n [value]=\"_tableData()\"\n [columns]=\"_columns()\"\n [globalFilterFields]=\"globalFilterFields()\"\n [filters]=\"filters()\"\n (onFilter)=\"onFilterLocal($event)\">\n <ng-template pTemplate=\"caption\">\n <div class=\"flex justify-content-between align-items-center\">\n <h5 class=\"m-0\">Table Data</h5>\n <span class=\"p-input-icon-left\">\n <i class=\"pi pi-search\"></i>\n <input pInputText type=\"text\" (input)=\"onGlobalFilter($event)\" placeholder=\"Search keyword\" />\n </span>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n @for (column of columns; track column) {\n <th [pSortableColumn]=\"column.field\">{{ column.header }} <p-sortIcon [field]=\"column.field\"></p-sortIcon></th>\n }\n </tr>\n <tr>\n @for (column of columns; track column) { @if(column.type === 'tags') {\n <th>\n <p-multiselect\n [options]=\"filters()?.[column.field]?.['options']\"\n placeholder=\"Selecciona\"\n (onChange)=\"filterOutsideTable('tags', column.field, $event.value)\"\n [style]=\"{ minWidth: '14rem' }\"\n [panelStyle]=\"{ minWidth: '16rem' }\">\n <ng-template let-option #item>\n <div class=\"flex items-center gap-2\">\n <span>{{ option }}</span>\n </div>\n </ng-template>\n </p-multiselect>\n </th>\n\n } @else {\n <th>\n <p-columnFilter [type]=\"getFilterType(column)\" [field]=\"column.field\" placeholder=\"Search\" [showMenu]=\"false\"></p-columnFilter>\n </th>\n } }\n </tr>\n </ng-template>\n <!-- @if(tableData()){ -->\n <ng-template pTemplate=\"body\" let-item let-columns=\"columns\">\n <tr>\n @for (column of columns; track column) {\n <td>\n @if(column.type === 'image'){\n <div class=\"image-container\">\n <img [src]=\"item | getPath: column\" alt=\"Image\" class=\"image\" />\n </div>\n } @else if(column.type === 'tags') {\n <div class=\"tags-container\">\n @for (tag of item[column.field]; track tag) {\n <p-tag [rounded]=\"true\" [value]=\"tag\"></p-tag>\n }\n </div>\n } @else if(column.type === 'actions') {\n <div style=\"display: flex; gap: 2px\">\n @for (actionBtn of _actions(); track actionBtn) {\n <p-button (click)=\"selectItem(item, actionBtn)\" [icon]=\"actionBtn.icon\" [severity]=\"actionBtn['severity']\" />\n }\n </div>\n } @else {\n <span>{{ item | getPath: column}} </span>\n }\n </td>\n }\n </tr>\n </ng-template>\n <!-- } -->\n</p-table>\n", styles: [":host{display:block;height:100%;overflow:auto}.generic-list-container{display:flex;flex-direction:column;height:100%}.generic-list-content{margin-top:10px;flex:1;overflow-y:auto;padding-bottom:10px}.card-source{margin-bottom:10px;position:relative}.paginator-container{margin-top:auto;padding-top:10px}.image-container{width:50px;height:50px;border-radius:50%;overflow:hidden;display:flex;justify-content:center;align-items:center}.image-container img{width:100%;height:100%;object-fit:cover}\n"], dependencies: [{ kind: "ngmodule", type: CardModule }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: SpeedDialModule }, { kind: "ngmodule", type: PaginatorModule }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i3$2.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "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", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "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$2.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i3$2.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i3$2.ColumnFilter, selector: "p-columnFilter, p-column-filter, p-columnfilter", inputs: ["field", "type", "display", "showMenu", "matchMode", "operator", "showOperator", "showClearButton", "showApplyButton", "showMatchModes", "showAddButton", "hideOnClear", "placeholder", "matchModeOptions", "maxConstraints", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "locale", "localeMatcher", "currency", "currencyDisplay", "filterOn", "useGrouping", "showButtons", "ariaLabel", "filterButtonProps"], outputs: ["onShow", "onHide"] }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i8.InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: TagModule }, { kind: "component", type: i5$1.Tag, selector: "p-tag", inputs: ["styleClass", "severity", "value", "icon", "rounded"] }, { kind: "ngmodule", type: SelectModule }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i6.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "styleClass", "panelStyle", "panelStyleClass", "inputId", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "dataKey", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "placeholder", "options", "filterValue", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus", "highlightOnSelect", "size", "variant", "fluid", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "pipe", type: GetPathPipe, name: "getPath" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
698
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: QuickTableComponent, isStandalone: true, selector: "app-quick-table", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, tableData: { classPropertyName: "tableData", publicName: "tableData", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction" }, viewQueries: [{ propertyName: "tableRef", first: true, predicate: ["tableRef"], descendants: true }], ngImport: i0, template: "<p-table\n [tableStyle]=\"{ 'min-width': '20rem' }\"\n #tableRef\n [value]=\"_tableData()\"\n [columns]=\"_columns()\"\n [globalFilterFields]=\"globalFilterFields()\"\n [filters]=\"filters()\"\n (onFilter)=\"onFilterLocal($event)\">\n <ng-template pTemplate=\"caption\">\n <div class=\"flex justify-content-between align-items-center\">\n <h5 class=\"m-0\">Table Data</h5>\n <span class=\"p-input-icon-left\">\n <i class=\"pi pi-search\"></i>\n <input pInputText type=\"text\" (input)=\"onGlobalFilter($event)\" placeholder=\"Search keyword\" />\n </span>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n @for (column of columns; track column) {\n <th [pSortableColumn]=\"column.field\">{{ column.header }} <p-sortIcon [field]=\"column.field\"></p-sortIcon></th>\n }\n </tr>\n <tr>\n @for (column of columns; track column) { @if(column.type === 'tags') {\n <th>\n <p-multiselect\n [options]=\"filters()?.[column.field]?.['options']\"\n placeholder=\"Selecciona\"\n (onChange)=\"filterOutsideTable('tags', column.field, $event.value)\"\n [style]=\"{ minWidth: '14rem' }\"\n [panelStyle]=\"{ minWidth: '16rem' }\">\n <ng-template let-option #item>\n <div class=\"flex items-center gap-2\">\n <span>{{ option }}</span>\n </div>\n </ng-template>\n </p-multiselect>\n </th>\n\n } @else if(column.type === 'select') {\n <th>\n <p-select\n [options]=\"filters()?.[column.field]?.['options']\"\n placeholder=\"Selecciona\"\n (onChange)=\"filterOutsideTable('select', column.field, $event.value)\"\n [style]=\"{ minWidth: '14rem' }\"\n [showClear]=\"true\"></p-select>\n </th>\n } @else if(column.type === 'boolean') {\n <th>\n <p-columnFilter [type]=\"'boolean'\" [field]=\"column.field\"></p-columnFilter>\n </th>\n } @else if(column.type === 'numeric') {\n <th>\n <!-- <p-columnFilter [type]=\"'numeric'\" [field]=\"column.field\"></p-columnFilter> -->\n </th>\n } @else {\n <th>\n <p-columnFilter [type]=\"getFilterType(column)\" [field]=\"column.field\" placeholder=\"Search\" [showMenu]=\"false\"></p-columnFilter>\n </th>\n } }\n </tr>\n </ng-template>\n <!-- @if(tableData()){ -->\n <ng-template pTemplate=\"body\" let-item let-columns=\"columns\">\n <tr>\n @for (column of columns; track column) {\n <td>\n @if(column.type === 'image'){\n <div class=\"image-container\">\n <img [src]=\"item | getPath: column\" alt=\"Image\" class=\"image\" />\n </div>\n } @else if(column.type === 'tags') {\n <div class=\"tags-container\">\n @for (tag of item[column.field]; track tag) {\n <p-tag [rounded]=\"true\" [value]=\"tag\"></p-tag>\n }\n </div>\n } @else if(column.type === 'actions') {\n <div style=\"display: flex; gap: 2px\">\n @for (actionBtn of _actions(); track actionBtn) {\n <p-button (click)=\"selectItem(item, actionBtn)\" [icon]=\"actionBtn.icon\" [severity]=\"actionBtn['severity']\" />\n }\n </div>\n } @else if(column.type === 'boolean') {\n <i\n class=\"pi\"\n [ngClass]=\"{\n 'text-green-500 pi-check-circle': column.reverse ? !(item | getPath: column) : (item | getPath: column),\n 'text-red-500 pi-times-circle': column.reverse ? (item | getPath: column) : !(item | getPath: column)\n }\"></i>\n } @else {\n <span>{{ item | getPath: column}} </span>\n }\n </td>\n }\n </tr>\n </ng-template>\n <!-- } -->\n</p-table>\n", styles: [":host{display:block;height:100%;overflow:auto}.generic-list-container{display:flex;flex-direction:column;height:100%}.generic-list-content{margin-top:10px;flex:1;overflow-y:auto;padding-bottom:10px}.card-source{margin-bottom:10px;position:relative}.paginator-container{margin-top:auto;padding-top:10px}.image-container{width:50px;height:50px;border-radius:50%;overflow:hidden;display:flex;justify-content:center;align-items:center}.image-container img{width:100%;height:100%;object-fit:cover}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: CardModule }, { kind: "directive", type: i2$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: SpeedDialModule }, { kind: "ngmodule", type: PaginatorModule }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i4$2.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "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", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "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: i4$2.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i4$2.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i4$2.ColumnFilter, selector: "p-columnFilter, p-column-filter, p-columnfilter", inputs: ["field", "type", "display", "showMenu", "matchMode", "operator", "showOperator", "showClearButton", "showApplyButton", "showMatchModes", "showAddButton", "hideOnClear", "placeholder", "matchModeOptions", "maxConstraints", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "locale", "localeMatcher", "currency", "currencyDisplay", "filterOn", "useGrouping", "showButtons", "ariaLabel", "filterButtonProps"], outputs: ["onShow", "onHide"] }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i4$1.InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: TagModule }, { kind: "component", type: i6.Tag, selector: "p-tag", inputs: ["styleClass", "severity", "value", "icon", "rounded"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i3.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i4.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "styleClass", "panelStyle", "panelStyleClass", "inputId", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "dataKey", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "placeholder", "options", "filterValue", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus", "highlightOnSelect", "size", "variant", "fluid", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "pipe", type: GetPathPipe, name: "getPath" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
646
699
|
}
|
|
647
700
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: QuickTableComponent, decorators: [{
|
|
648
701
|
type: Component,
|
|
649
702
|
args: [{ selector: 'app-quick-table', imports: [
|
|
703
|
+
CommonModule,
|
|
650
704
|
CardModule,
|
|
651
705
|
ButtonModule,
|
|
652
706
|
SpeedDialModule,
|
|
@@ -658,7 +712,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
658
712
|
TagModule,
|
|
659
713
|
SelectModule,
|
|
660
714
|
MultiSelectModule,
|
|
661
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<p-table\n [tableStyle]=\"{ 'min-width': '20rem' }\"\n #tableRef\n [value]=\"_tableData()\"\n [columns]=\"_columns()\"\n [globalFilterFields]=\"globalFilterFields()\"\n [filters]=\"filters()\"\n (onFilter)=\"onFilterLocal($event)\">\n <ng-template pTemplate=\"caption\">\n <div class=\"flex justify-content-between align-items-center\">\n <h5 class=\"m-0\">Table Data</h5>\n <span class=\"p-input-icon-left\">\n <i class=\"pi pi-search\"></i>\n <input pInputText type=\"text\" (input)=\"onGlobalFilter($event)\" placeholder=\"Search keyword\" />\n </span>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n @for (column of columns; track column) {\n <th [pSortableColumn]=\"column.field\">{{ column.header }} <p-sortIcon [field]=\"column.field\"></p-sortIcon></th>\n }\n </tr>\n <tr>\n @for (column of columns; track column) { @if(column.type === 'tags') {\n <th>\n <p-multiselect\n [options]=\"filters()?.[column.field]?.['options']\"\n placeholder=\"Selecciona\"\n (onChange)=\"filterOutsideTable('tags', column.field, $event.value)\"\n [style]=\"{ minWidth: '14rem' }\"\n [panelStyle]=\"{ minWidth: '16rem' }\">\n <ng-template let-option #item>\n <div class=\"flex items-center gap-2\">\n <span>{{ option }}</span>\n </div>\n </ng-template>\n </p-multiselect>\n </th>\n\n } @else {\n <th>\n <p-columnFilter [type]=\"getFilterType(column)\" [field]=\"column.field\" placeholder=\"Search\" [showMenu]=\"false\"></p-columnFilter>\n </th>\n } }\n </tr>\n </ng-template>\n <!-- @if(tableData()){ -->\n <ng-template pTemplate=\"body\" let-item let-columns=\"columns\">\n <tr>\n @for (column of columns; track column) {\n <td>\n @if(column.type === 'image'){\n <div class=\"image-container\">\n <img [src]=\"item | getPath: column\" alt=\"Image\" class=\"image\" />\n </div>\n } @else if(column.type === 'tags') {\n <div class=\"tags-container\">\n @for (tag of item[column.field]; track tag) {\n <p-tag [rounded]=\"true\" [value]=\"tag\"></p-tag>\n }\n </div>\n } @else if(column.type === 'actions') {\n <div style=\"display: flex; gap: 2px\">\n @for (actionBtn of _actions(); track actionBtn) {\n <p-button (click)=\"selectItem(item, actionBtn)\" [icon]=\"actionBtn.icon\" [severity]=\"actionBtn['severity']\" />\n }\n </div>\n } @else {\n <span>{{ item | getPath: column}} </span>\n }\n </td>\n }\n </tr>\n </ng-template>\n <!-- } -->\n</p-table>\n", styles: [":host{display:block;height:100%;overflow:auto}.generic-list-container{display:flex;flex-direction:column;height:100%}.generic-list-content{margin-top:10px;flex:1;overflow-y:auto;padding-bottom:10px}.card-source{margin-bottom:10px;position:relative}.paginator-container{margin-top:auto;padding-top:10px}.image-container{width:50px;height:50px;border-radius:50%;overflow:hidden;display:flex;justify-content:center;align-items:center}.image-container img{width:100%;height:100%;object-fit:cover}\n"] }]
|
|
715
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<p-table\n [tableStyle]=\"{ 'min-width': '20rem' }\"\n #tableRef\n [value]=\"_tableData()\"\n [columns]=\"_columns()\"\n [globalFilterFields]=\"globalFilterFields()\"\n [filters]=\"filters()\"\n (onFilter)=\"onFilterLocal($event)\">\n <ng-template pTemplate=\"caption\">\n <div class=\"flex justify-content-between align-items-center\">\n <h5 class=\"m-0\">Table Data</h5>\n <span class=\"p-input-icon-left\">\n <i class=\"pi pi-search\"></i>\n <input pInputText type=\"text\" (input)=\"onGlobalFilter($event)\" placeholder=\"Search keyword\" />\n </span>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n @for (column of columns; track column) {\n <th [pSortableColumn]=\"column.field\">{{ column.header }} <p-sortIcon [field]=\"column.field\"></p-sortIcon></th>\n }\n </tr>\n <tr>\n @for (column of columns; track column) { @if(column.type === 'tags') {\n <th>\n <p-multiselect\n [options]=\"filters()?.[column.field]?.['options']\"\n placeholder=\"Selecciona\"\n (onChange)=\"filterOutsideTable('tags', column.field, $event.value)\"\n [style]=\"{ minWidth: '14rem' }\"\n [panelStyle]=\"{ minWidth: '16rem' }\">\n <ng-template let-option #item>\n <div class=\"flex items-center gap-2\">\n <span>{{ option }}</span>\n </div>\n </ng-template>\n </p-multiselect>\n </th>\n\n } @else if(column.type === 'select') {\n <th>\n <p-select\n [options]=\"filters()?.[column.field]?.['options']\"\n placeholder=\"Selecciona\"\n (onChange)=\"filterOutsideTable('select', column.field, $event.value)\"\n [style]=\"{ minWidth: '14rem' }\"\n [showClear]=\"true\"></p-select>\n </th>\n } @else if(column.type === 'boolean') {\n <th>\n <p-columnFilter [type]=\"'boolean'\" [field]=\"column.field\"></p-columnFilter>\n </th>\n } @else if(column.type === 'numeric') {\n <th>\n <!-- <p-columnFilter [type]=\"'numeric'\" [field]=\"column.field\"></p-columnFilter> -->\n </th>\n } @else {\n <th>\n <p-columnFilter [type]=\"getFilterType(column)\" [field]=\"column.field\" placeholder=\"Search\" [showMenu]=\"false\"></p-columnFilter>\n </th>\n } }\n </tr>\n </ng-template>\n <!-- @if(tableData()){ -->\n <ng-template pTemplate=\"body\" let-item let-columns=\"columns\">\n <tr>\n @for (column of columns; track column) {\n <td>\n @if(column.type === 'image'){\n <div class=\"image-container\">\n <img [src]=\"item | getPath: column\" alt=\"Image\" class=\"image\" />\n </div>\n } @else if(column.type === 'tags') {\n <div class=\"tags-container\">\n @for (tag of item[column.field]; track tag) {\n <p-tag [rounded]=\"true\" [value]=\"tag\"></p-tag>\n }\n </div>\n } @else if(column.type === 'actions') {\n <div style=\"display: flex; gap: 2px\">\n @for (actionBtn of _actions(); track actionBtn) {\n <p-button (click)=\"selectItem(item, actionBtn)\" [icon]=\"actionBtn.icon\" [severity]=\"actionBtn['severity']\" />\n }\n </div>\n } @else if(column.type === 'boolean') {\n <i\n class=\"pi\"\n [ngClass]=\"{\n 'text-green-500 pi-check-circle': column.reverse ? !(item | getPath: column) : (item | getPath: column),\n 'text-red-500 pi-times-circle': column.reverse ? (item | getPath: column) : !(item | getPath: column)\n }\"></i>\n } @else {\n <span>{{ item | getPath: column}} </span>\n }\n </td>\n }\n </tr>\n </ng-template>\n <!-- } -->\n</p-table>\n", styles: [":host{display:block;height:100%;overflow:auto}.generic-list-container{display:flex;flex-direction:column;height:100%}.generic-list-content{margin-top:10px;flex:1;overflow-y:auto;padding-bottom:10px}.card-source{margin-bottom:10px;position:relative}.paginator-container{margin-top:auto;padding-top:10px}.image-container{width:50px;height:50px;border-radius:50%;overflow:hidden;display:flex;justify-content:center;align-items:center}.image-container img{width:100%;height:100%;object-fit:cover}\n"] }]
|
|
662
716
|
}], ctorParameters: () => [], propDecorators: { tableRef: [{
|
|
663
717
|
type: ViewChild,
|
|
664
718
|
args: ['tableRef']
|
|
@@ -715,7 +769,7 @@ class DcAuditableViewerComponent {
|
|
|
715
769
|
</div>
|
|
716
770
|
</p-fieldset>
|
|
717
771
|
}
|
|
718
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FieldsetModule }, { kind: "component", type: i1$
|
|
772
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FieldsetModule }, { kind: "component", type: i1$2.Fieldset, selector: "p-fieldset", inputs: ["legend", "toggleable", "collapsed", "style", "styleClass", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "ngmodule", type: TagModule }, { kind: "component", type: i6.Tag, selector: "p-tag", inputs: ["styleClass", "severity", "value", "icon", "rounded"] }, { kind: "ngmodule", type: ChipModule }, { kind: "component", type: i3$3.Chip, selector: "p-chip", inputs: ["label", "icon", "image", "alt", "styleClass", "removable", "removeIcon", "chipProps"], outputs: ["onRemove", "onImageError"] }, { kind: "ngmodule", type: AvatarModule }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }] }); }
|
|
719
773
|
}
|
|
720
774
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcAuditableViewerComponent, decorators: [{
|
|
721
775
|
type: Component,
|
|
@@ -778,7 +832,7 @@ class DcExtensionsViewerComponent {
|
|
|
778
832
|
this.data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
779
833
|
}
|
|
780
834
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcExtensionsViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
781
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.6", type: DcExtensionsViewerComponent, isStandalone: true, selector: "dc-extensions-viewer", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `<pre>{{ data() | json }}</pre>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$
|
|
835
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.6", type: DcExtensionsViewerComponent, isStandalone: true, selector: "dc-extensions-viewer", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `<pre>{{ data() | json }}</pre>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.JsonPipe, name: "json" }] }); }
|
|
782
836
|
}
|
|
783
837
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcExtensionsViewerComponent, decorators: [{
|
|
784
838
|
type: Component,
|
|
@@ -795,7 +849,7 @@ class DcLearnableViewerComponent {
|
|
|
795
849
|
this.data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
796
850
|
}
|
|
797
851
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcLearnableViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
798
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.6", type: DcLearnableViewerComponent, isStandalone: true, selector: "dc-learnable-viewer", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `<pre>{{ data() | json }}</pre>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$
|
|
852
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.6", type: DcLearnableViewerComponent, isStandalone: true, selector: "dc-learnable-viewer", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `<pre>{{ data() | json }}</pre>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.JsonPipe, name: "json" }] }); }
|
|
799
853
|
}
|
|
800
854
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcLearnableViewerComponent, decorators: [{
|
|
801
855
|
type: Component,
|
|
@@ -812,7 +866,7 @@ class DcManageableViewerComponent {
|
|
|
812
866
|
this.data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
813
867
|
}
|
|
814
868
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcManageableViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
815
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.6", type: DcManageableViewerComponent, isStandalone: true, selector: "dc-manageable-viewer", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `<pre>{{ data() | json }}</pre>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$
|
|
869
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.6", type: DcManageableViewerComponent, isStandalone: true, selector: "dc-manageable-viewer", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `<pre>{{ data() | json }}</pre>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.JsonPipe, name: "json" }] }); }
|
|
816
870
|
}
|
|
817
871
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcManageableViewerComponent, decorators: [{
|
|
818
872
|
type: Component,
|
|
@@ -829,7 +883,7 @@ class DcReactionsViewerComponent {
|
|
|
829
883
|
this.data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
830
884
|
}
|
|
831
885
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcReactionsViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
832
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.6", type: DcReactionsViewerComponent, isStandalone: true, selector: "dc-reactions-viewer", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `<pre>{{ data() | json }}</pre>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$
|
|
886
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.6", type: DcReactionsViewerComponent, isStandalone: true, selector: "dc-reactions-viewer", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `<pre>{{ data() | json }}</pre>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.JsonPipe, name: "json" }] }); }
|
|
833
887
|
}
|
|
834
888
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcReactionsViewerComponent, decorators: [{
|
|
835
889
|
type: Component,
|
|
@@ -852,7 +906,7 @@ class DcManageableFormComponent {
|
|
|
852
906
|
];
|
|
853
907
|
}
|
|
854
908
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcManageableFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
855
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.6", type: DcManageableFormComponent, isStandalone: true, selector: "dc-manageable-form", inputs: { form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div [formGroup]=\"form()\">\n <div style=\"display: flex; justify-content: space-between\">\n <div class=\"form-field checkbox\">\n <label>\n <p-checkbox [binary]=\"true\" formControlName=\"isPublic\" />\n Public <span pTooltip=\"Is this content visible to all users?\">\u2139\uFE0F</span>\n </label>\n </div>\n\n <div class=\"form-field\">\n <label for=\"status\">Status <span pTooltip=\"Status of the content\">\u2139\uFE0F</span></label>\n <p-select\n id=\"status\"\n [options]=\"statusOptions\"\n formControlName=\"status\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [placeholder]=\"'Select Status'\"></p-select>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { 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: CardModule }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i2$
|
|
909
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.6", type: DcManageableFormComponent, isStandalone: true, selector: "dc-manageable-form", inputs: { form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div [formGroup]=\"form()\">\n <div style=\"display: flex; justify-content: space-between\">\n <div class=\"form-field checkbox\">\n <label>\n <p-checkbox [binary]=\"true\" formControlName=\"isPublic\" />\n Public <span pTooltip=\"Is this content visible to all users?\">\u2139\uFE0F</span>\n </label>\n </div>\n\n <div class=\"form-field\">\n <label for=\"status\">Status <span pTooltip=\"Status of the content\">\u2139\uFE0F</span></label>\n <p-select\n id=\"status\"\n [options]=\"statusOptions\"\n formControlName=\"status\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [placeholder]=\"'Select Status'\"></p-select>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { 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: CardModule }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i2$4.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i3.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4$3.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo"] }] }); }
|
|
856
910
|
}
|
|
857
911
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcManageableFormComponent, decorators: [{
|
|
858
912
|
type: Component,
|
|
@@ -881,7 +935,7 @@ class DcTagsFormComponent {
|
|
|
881
935
|
this.arrayForm.removeAt(index);
|
|
882
936
|
}
|
|
883
937
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcTagsFormComponent, deps: [{ token: i1.ControlContainer }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
884
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: DcTagsFormComponent, isStandalone: true, selector: "dc-tags-form", ngImport: i0, template: "<div [formGroup]=\"form\">\n <div formArrayName=\"tags\">\n <div class=\"flex flex-wrap gap-2\">\n @for (tagControl of arrayForm.controls; track tagControl; let i = $index) {\n <p-chip [label]=\"tagControl.value\" [removable]=\"true\" (onRemove)=\"removeTag(i)\"></p-chip>\n }\n </div>\n </div>\n</div>\n\n<div class=\"flex mt-2\">\n <input pInputText type=\"text\" [formControl]=\"newTagControl\" placeholder=\"New tag\" (keydown.enter)=\"addTag(); $event.preventDefault()\" />\n <p-button label=\"Add Tag\" icon=\"pi pi-plus\" (click)=\"addTag()\" [disabled]=\"!newTagControl.value\"></p-button>\n</div>\n", styles: [".tag-field{display:flex;align-items:center;margin-bottom:.5rem}.tag-field input{margin-right:.5rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type:
|
|
938
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: DcTagsFormComponent, isStandalone: true, selector: "dc-tags-form", ngImport: i0, template: "<div [formGroup]=\"form\">\n <div formArrayName=\"tags\">\n <div class=\"flex flex-wrap gap-2\">\n @for (tagControl of arrayForm.controls; track tagControl; let i = $index) {\n <p-chip [label]=\"tagControl.value\" [removable]=\"true\" (onRemove)=\"removeTag(i)\"></p-chip>\n }\n </div>\n </div>\n</div>\n\n<div class=\"flex mt-2\">\n <input pInputText type=\"text\" [formControl]=\"newTagControl\" placeholder=\"New tag\" (keydown.enter)=\"addTag(); $event.preventDefault()\" />\n <p-button label=\"Add Tag\" icon=\"pi pi-plus\" (click)=\"addTag()\" [disabled]=\"!newTagControl.value\"></p-button>\n</div>\n", styles: [".tag-field{display:flex;align-items:center;margin-bottom:.5rem}.tag-field input{margin-right:.5rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i4$1.InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: ChipModule }, { kind: "component", type: i3$3.Chip, selector: "p-chip", inputs: ["label", "icon", "image", "alt", "styleClass", "removable", "removeIcon", "chipProps"], outputs: ["onRemove", "onImageError"] }], viewProviders: [
|
|
885
939
|
{
|
|
886
940
|
provide: ControlContainer,
|
|
887
941
|
useFactory: () => inject(ControlContainer, { skipSelf: true }),
|
|
@@ -903,7 +957,7 @@ class DcLearnableFormComponent {
|
|
|
903
957
|
this.form = input.required(...(ngDevMode ? [{ debugName: "form" }] : []));
|
|
904
958
|
}
|
|
905
959
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcLearnableFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
906
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.6", type: DcLearnableFormComponent, isStandalone: true, selector: "dc-learnable-form", inputs: { form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div [formGroup]=\"form()\">\n <div class=\"form-grid\">\n <div class=\"row\">\n <div class=\"form-field\">\n <label for=\"level\">Level <span pTooltip=\"Difficulty level\">\u2139\uFE0F</span></label>\n <p-inputNumber id=\"level\" formControlName=\"level\" [min]=\"0\" [max]=\"10\"></p-inputNumber>\n </div>\n <div class=\"form-field\">\n <label for=\"takenCount\">Taken Count <span pTooltip=\"How many times this has been taken\">\u2139\uFE0F</span></label>\n <p-inputNumber id=\"takenCount\" formControlName=\"takenCount\" [min]=\"0\"></p-inputNumber>\n </div>\n </div>\n <div class=\"form-field\">\n <label for=\"tags\">Tags <span pTooltip=\"Relevant tags for this content\">\u2139\uFE0F</span></label>\n <dc-tags-form />\n </div>\n </div>\n</div>\n", styles: [".form-grid{display:grid;gap:1rem}.row{display:grid;grid-template-columns:repeat(2,1fr);gap:1rem}.form-field{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { 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: CardModule }, { kind: "ngmodule", type: InputNumberModule }, { kind: "component", type: i2$
|
|
960
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.6", type: DcLearnableFormComponent, isStandalone: true, selector: "dc-learnable-form", inputs: { form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div [formGroup]=\"form()\">\n <div class=\"form-grid\">\n <div class=\"row\">\n <div class=\"form-field\">\n <label for=\"level\">Level <span pTooltip=\"Difficulty level\">\u2139\uFE0F</span></label>\n <p-inputNumber id=\"level\" formControlName=\"level\" [min]=\"0\" [max]=\"10\"></p-inputNumber>\n </div>\n <div class=\"form-field\">\n <label for=\"takenCount\">Taken Count <span pTooltip=\"How many times this has been taken\">\u2139\uFE0F</span></label>\n <p-inputNumber id=\"takenCount\" formControlName=\"takenCount\" [min]=\"0\"></p-inputNumber>\n </div>\n </div>\n <div class=\"form-field\">\n <label for=\"tags\">Tags <span pTooltip=\"Relevant tags for this content\">\u2139\uFE0F</span></label>\n <dc-tags-form />\n </div>\n </div>\n</div>\n", styles: [".form-grid{display:grid;gap:1rem}.row{display:grid;grid-template-columns:repeat(2,1fr);gap:1rem}.form-field{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { 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: CardModule }, { kind: "ngmodule", type: InputNumberModule }, { kind: "component", type: i2$5.InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4$3.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo"] }, { kind: "component", type: DcTagsFormComponent, selector: "dc-tags-form" }] }); }
|
|
907
961
|
}
|
|
908
962
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcLearnableFormComponent, decorators: [{
|
|
909
963
|
type: Component,
|
|
@@ -1059,18 +1113,19 @@ class EntityBaseListComponent extends PaginationBase {
|
|
|
1059
1113
|
if (!item) {
|
|
1060
1114
|
return;
|
|
1061
1115
|
}
|
|
1116
|
+
const id = item?._id || item?.id;
|
|
1062
1117
|
switch (action) {
|
|
1063
1118
|
case 'view':
|
|
1064
|
-
this.router.navigate(['./details',
|
|
1119
|
+
this.router.navigate(['./details', id], { relativeTo: this.route });
|
|
1065
1120
|
break;
|
|
1066
1121
|
case 'edit':
|
|
1067
|
-
this.router.navigate(['./edit',
|
|
1122
|
+
this.router.navigate(['./edit', id], { relativeTo: this.route });
|
|
1068
1123
|
break;
|
|
1069
1124
|
case 'delete':
|
|
1070
1125
|
const confirmed = confirm(`Are you sure you want to delete this item?`);
|
|
1071
1126
|
if (confirmed) {
|
|
1072
1127
|
try {
|
|
1073
|
-
await this.entityCommunicationService.remove(
|
|
1128
|
+
await this.entityCommunicationService.remove(id);
|
|
1074
1129
|
}
|
|
1075
1130
|
catch (error) {
|
|
1076
1131
|
console.error('Error deleting item', error);
|
|
@@ -1081,7 +1136,7 @@ class EntityBaseListComponent extends PaginationBase {
|
|
|
1081
1136
|
}
|
|
1082
1137
|
break;
|
|
1083
1138
|
case 'clone':
|
|
1084
|
-
await this.entityCommunicationService.clone(
|
|
1139
|
+
await this.entityCommunicationService.clone(id);
|
|
1085
1140
|
await this.loadData(); // Refresh list
|
|
1086
1141
|
break;
|
|
1087
1142
|
default:
|
|
@@ -1137,8 +1192,10 @@ class EntityBaseFormComponent {
|
|
|
1137
1192
|
this.route = inject(ActivatedRoute);
|
|
1138
1193
|
this.router = inject(Router);
|
|
1139
1194
|
this.toastService = inject(TOAST_ALERTS_TOKEN, { optional: true });
|
|
1195
|
+
this.id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : []));
|
|
1140
1196
|
this.entity = signal(undefined, ...(ngDevMode ? [{ debugName: "entity" }] : []));
|
|
1141
|
-
this.
|
|
1197
|
+
this.entityIdFromUrl = toSignal(this.route.paramMap.pipe(map((params) => params.get('id'))));
|
|
1198
|
+
this.entityId = computed(() => this.id() ?? this.entityIdFromUrl(), ...(ngDevMode ? [{ debugName: "entityId" }] : []));
|
|
1142
1199
|
this.loadEntityEffect = effect(async () => {
|
|
1143
1200
|
const id = this.entityId();
|
|
1144
1201
|
if (id) {
|
|
@@ -1158,9 +1215,10 @@ class EntityBaseFormComponent {
|
|
|
1158
1215
|
// if there is no id, we create a new entity
|
|
1159
1216
|
try {
|
|
1160
1217
|
const newEntity = await this.entityCommunicationService.createOrUpdate({});
|
|
1161
|
-
|
|
1218
|
+
const id = newEntity?._id || newEntity?.['id'];
|
|
1219
|
+
if (id) {
|
|
1162
1220
|
// we replace the url to avoid creating a new entity when the user goes back
|
|
1163
|
-
this.router.navigate([
|
|
1221
|
+
this.router.navigate([id], { relativeTo: this.route, replaceUrl: true });
|
|
1164
1222
|
}
|
|
1165
1223
|
}
|
|
1166
1224
|
catch (err) {
|
|
@@ -1208,7 +1266,7 @@ class EntityBaseFormComponent {
|
|
|
1208
1266
|
return this.entityCommunicationService.partialUpdate(this.entityId(), dirtyValues);
|
|
1209
1267
|
}
|
|
1210
1268
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: EntityBaseFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1211
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1269
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.6", type: EntityBaseFormComponent, isStandalone: true, inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
1212
1270
|
}
|
|
1213
1271
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: EntityBaseFormComponent, decorators: [{
|
|
1214
1272
|
type: Directive
|
|
@@ -1345,6 +1403,7 @@ const LANGUAGES = {
|
|
|
1345
1403
|
flag: '🇺🇸', // Using US flag as a primary example
|
|
1346
1404
|
flagImg: 'assets/flags/us.svg',
|
|
1347
1405
|
code: 'en',
|
|
1406
|
+
defaultLocale: 'en-US',
|
|
1348
1407
|
i: 1,
|
|
1349
1408
|
llmKnowledge: 100,
|
|
1350
1409
|
countries: ['United Kingdom', 'United States', 'Canada', 'Australia', 'New Zealand', 'Ireland', 'South Africa', 'India', 'and many others.'],
|
|
@@ -1360,6 +1419,7 @@ const LANGUAGES = {
|
|
|
1360
1419
|
flag: '🇪🇸', // Using Spain flag as a primary example
|
|
1361
1420
|
flagImg: 'assets/flags/es.svg',
|
|
1362
1421
|
code: 'es',
|
|
1422
|
+
defaultLocale: 'es-ES',
|
|
1363
1423
|
i: 2,
|
|
1364
1424
|
llmKnowledge: 99,
|
|
1365
1425
|
countries: [
|
|
@@ -1396,6 +1456,7 @@ const LANGUAGES = {
|
|
|
1396
1456
|
flag: '🇩🇪',
|
|
1397
1457
|
flagImg: 'assets/flags/de.svg',
|
|
1398
1458
|
code: 'de',
|
|
1459
|
+
defaultLocale: 'de-DE',
|
|
1399
1460
|
i: 3,
|
|
1400
1461
|
llmKnowledge: 97,
|
|
1401
1462
|
countries: ['Germany', 'Austria', 'Switzerland', 'Belgium', 'Luxembourg', 'Liechtenstein.'],
|
|
@@ -1411,6 +1472,7 @@ const LANGUAGES = {
|
|
|
1411
1472
|
flag: '🇫🇷',
|
|
1412
1473
|
flagImg: 'assets/flags/fr.svg',
|
|
1413
1474
|
code: 'fr',
|
|
1475
|
+
defaultLocale: 'fr-FR',
|
|
1414
1476
|
i: 4,
|
|
1415
1477
|
llmKnowledge: 96,
|
|
1416
1478
|
countries: ['France', 'Canada', 'Belgium', 'Switzerland', 'Haiti', 'Ivory Coast', 'Senegal', 'Cameroon', 'Madagascar', 'and many others.'],
|
|
@@ -1426,6 +1488,7 @@ const LANGUAGES = {
|
|
|
1426
1488
|
flag: '🇮🇹',
|
|
1427
1489
|
flagImg: 'assets/flags/it.svg',
|
|
1428
1490
|
code: 'it',
|
|
1491
|
+
defaultLocale: 'it-IT',
|
|
1429
1492
|
i: 6,
|
|
1430
1493
|
llmKnowledge: 93,
|
|
1431
1494
|
countries: ['Italy', 'Switzerland', 'San Marino', 'Vatican City.'],
|
|
@@ -1441,6 +1504,7 @@ const LANGUAGES = {
|
|
|
1441
1504
|
flag: '🇧🇷',
|
|
1442
1505
|
flagImg: 'assets/flags/br.svg',
|
|
1443
1506
|
code: 'pt',
|
|
1507
|
+
defaultLocale: 'pt-BR',
|
|
1444
1508
|
i: 7,
|
|
1445
1509
|
llmKnowledge: 92,
|
|
1446
1510
|
countries: ['Portugal', 'Brazil', 'Angola', 'Mozambique', 'Cape Verde', 'Guinea-Bissau', 'Sao Tome and Principe', 'East Timor', 'Macau.'],
|
|
@@ -1456,6 +1520,7 @@ const LANGUAGES = {
|
|
|
1456
1520
|
flag: '🇯🇵',
|
|
1457
1521
|
flagImg: 'assets/flags/jp.svg',
|
|
1458
1522
|
code: 'ja',
|
|
1523
|
+
defaultLocale: 'ja-JP',
|
|
1459
1524
|
i: 8,
|
|
1460
1525
|
llmKnowledge: 91,
|
|
1461
1526
|
countries: ['Japan.'],
|
|
@@ -1471,6 +1536,7 @@ const LANGUAGES = {
|
|
|
1471
1536
|
flag: '🇳🇱',
|
|
1472
1537
|
flagImg: 'assets/flags/nl.svg',
|
|
1473
1538
|
code: 'nl',
|
|
1539
|
+
defaultLocale: 'nl-NL',
|
|
1474
1540
|
i: 9,
|
|
1475
1541
|
llmKnowledge: 90,
|
|
1476
1542
|
countries: ['Netherlands', 'Belgium', 'Suriname', 'Aruba', 'Curaçao', 'Sint Maarten.'],
|
|
@@ -1480,13 +1546,14 @@ const LANGUAGES = {
|
|
|
1480
1546
|
},
|
|
1481
1547
|
status: 'commingsoon',
|
|
1482
1548
|
speakers: 25000000,
|
|
1483
|
-
releaseDate: '2025-
|
|
1549
|
+
releaseDate: '2025-11-03',
|
|
1484
1550
|
},
|
|
1485
1551
|
zh: {
|
|
1486
1552
|
nativeName: '中文 (Zhōngwén)',
|
|
1487
1553
|
flag: '🇨🇳',
|
|
1488
1554
|
flagImg: 'assets/flags/cn.svg',
|
|
1489
1555
|
code: 'zh',
|
|
1556
|
+
defaultLocale: 'zh-CN',
|
|
1490
1557
|
i: 5,
|
|
1491
1558
|
llmKnowledge: 94,
|
|
1492
1559
|
countries: ['China', 'Singapore', 'Taiwan.'],
|
|
@@ -1496,13 +1563,14 @@ const LANGUAGES = {
|
|
|
1496
1563
|
},
|
|
1497
1564
|
status: 'commingsoon',
|
|
1498
1565
|
speakers: 1120000000,
|
|
1499
|
-
releaseDate: '2025-
|
|
1566
|
+
releaseDate: '2025-11-10',
|
|
1500
1567
|
},
|
|
1501
1568
|
ru: {
|
|
1502
1569
|
nativeName: 'Русский (Russkiy)',
|
|
1503
1570
|
flag: '🇷🇺',
|
|
1504
1571
|
flagImg: 'assets/flags/ru.svg',
|
|
1505
1572
|
code: 'ru',
|
|
1573
|
+
defaultLocale: 'ru-RU',
|
|
1506
1574
|
i: 10, // Adjusted index
|
|
1507
1575
|
llmKnowledge: 89,
|
|
1508
1576
|
countries: ['Russia', 'Belarus', 'Kazakhstan', 'Kyrgyzstan', 'Tajikistan (co-official)', 'Abkhazia', 'South Ossetia', 'Transnistria.'],
|
|
@@ -1512,13 +1580,14 @@ const LANGUAGES = {
|
|
|
1512
1580
|
},
|
|
1513
1581
|
status: 'commingsoon',
|
|
1514
1582
|
speakers: 258000000,
|
|
1515
|
-
releaseDate: '2025-
|
|
1583
|
+
releaseDate: '2025-11-17',
|
|
1516
1584
|
},
|
|
1517
1585
|
ko: {
|
|
1518
1586
|
nativeName: '한국어 (Hangugeo)',
|
|
1519
1587
|
flag: '🇰🇷',
|
|
1520
1588
|
flagImg: 'assets/flags/kr.svg',
|
|
1521
1589
|
code: 'ko',
|
|
1590
|
+
defaultLocale: 'ko-KR',
|
|
1522
1591
|
i: 11,
|
|
1523
1592
|
llmKnowledge: 87,
|
|
1524
1593
|
countries: ['South Korea', 'North Korea.'],
|
|
@@ -1528,13 +1597,14 @@ const LANGUAGES = {
|
|
|
1528
1597
|
},
|
|
1529
1598
|
status: 'commingsoon',
|
|
1530
1599
|
speakers: 82000000,
|
|
1531
|
-
releaseDate: '2025-
|
|
1600
|
+
releaseDate: '2025-11-24',
|
|
1532
1601
|
},
|
|
1533
1602
|
pl: {
|
|
1534
1603
|
nativeName: 'Polski',
|
|
1535
1604
|
flag: '🇵🇱',
|
|
1536
1605
|
flagImg: 'assets/flags/pl.svg',
|
|
1537
1606
|
code: 'pl',
|
|
1607
|
+
defaultLocale: 'pl-PL',
|
|
1538
1608
|
i: 12,
|
|
1539
1609
|
llmKnowledge: 86,
|
|
1540
1610
|
countries: ['Poland.'],
|
|
@@ -1544,13 +1614,14 @@ const LANGUAGES = {
|
|
|
1544
1614
|
},
|
|
1545
1615
|
status: 'commingsoon',
|
|
1546
1616
|
speakers: 40000000,
|
|
1547
|
-
releaseDate: '2025-
|
|
1617
|
+
releaseDate: '2025-12-01',
|
|
1548
1618
|
},
|
|
1549
1619
|
sv: {
|
|
1550
1620
|
nativeName: 'Svenska',
|
|
1551
1621
|
flag: '🇸🇪',
|
|
1552
1622
|
flagImg: 'assets/flags/se.svg',
|
|
1553
1623
|
code: 'sv',
|
|
1624
|
+
defaultLocale: 'sv-SE',
|
|
1554
1625
|
i: 13,
|
|
1555
1626
|
llmKnowledge: 85,
|
|
1556
1627
|
countries: ['Sweden', 'Finland (co-official).'],
|
|
@@ -1560,13 +1631,14 @@ const LANGUAGES = {
|
|
|
1560
1631
|
},
|
|
1561
1632
|
status: 'commingsoon',
|
|
1562
1633
|
speakers: 10000000,
|
|
1563
|
-
releaseDate: '2025-
|
|
1634
|
+
releaseDate: '2025-12-08',
|
|
1564
1635
|
},
|
|
1565
1636
|
tr: {
|
|
1566
1637
|
nativeName: 'Türkçe',
|
|
1567
1638
|
flag: '🇹🇷',
|
|
1568
1639
|
flagImg: 'assets/flags/tr.svg',
|
|
1569
1640
|
code: 'tr',
|
|
1641
|
+
defaultLocale: 'tr-TR',
|
|
1570
1642
|
i: 14,
|
|
1571
1643
|
llmKnowledge: 84,
|
|
1572
1644
|
countries: ['Turkey', 'Cyprus (North).'],
|
|
@@ -1576,13 +1648,14 @@ const LANGUAGES = {
|
|
|
1576
1648
|
},
|
|
1577
1649
|
status: 'commingsoon',
|
|
1578
1650
|
speakers: 88000000,
|
|
1579
|
-
releaseDate: '2025-
|
|
1651
|
+
releaseDate: '2025-12-15',
|
|
1580
1652
|
},
|
|
1581
1653
|
ar: {
|
|
1582
1654
|
nativeName: 'العربية (Al-Arabiyyah)',
|
|
1583
1655
|
flag: '🇸🇦',
|
|
1584
1656
|
flagImg: 'assets/flags/sa.svg',
|
|
1585
1657
|
code: 'ar',
|
|
1658
|
+
defaultLocale: 'ar-SA',
|
|
1586
1659
|
i: 15,
|
|
1587
1660
|
llmKnowledge: 83,
|
|
1588
1661
|
countries: [
|
|
@@ -1618,13 +1691,14 @@ const LANGUAGES = {
|
|
|
1618
1691
|
},
|
|
1619
1692
|
status: 'commingsoon',
|
|
1620
1693
|
speakers: 422000000,
|
|
1621
|
-
releaseDate: '2025-
|
|
1694
|
+
releaseDate: '2025-12-22',
|
|
1622
1695
|
},
|
|
1623
1696
|
vi: {
|
|
1624
1697
|
nativeName: 'Tiếng Việt',
|
|
1625
1698
|
flag: '🇻🇳',
|
|
1626
1699
|
flagImg: 'assets/flags/vn.svg',
|
|
1627
1700
|
code: 'vi',
|
|
1701
|
+
defaultLocale: 'vi-VN',
|
|
1628
1702
|
i: 16,
|
|
1629
1703
|
llmKnowledge: 82,
|
|
1630
1704
|
countries: ['Vietnam.'],
|
|
@@ -1634,13 +1708,14 @@ const LANGUAGES = {
|
|
|
1634
1708
|
},
|
|
1635
1709
|
status: 'commingsoon',
|
|
1636
1710
|
speakers: 90000000,
|
|
1637
|
-
releaseDate: '2025-
|
|
1711
|
+
releaseDate: '2025-12-29',
|
|
1638
1712
|
},
|
|
1639
1713
|
id: {
|
|
1640
1714
|
nativeName: 'Bahasa Indonesia',
|
|
1641
1715
|
flag: '🇮🇩',
|
|
1642
1716
|
flagImg: 'assets/flags/id.svg',
|
|
1643
1717
|
code: 'id',
|
|
1718
|
+
defaultLocale: 'id-ID',
|
|
1644
1719
|
i: 17,
|
|
1645
1720
|
llmKnowledge: 81,
|
|
1646
1721
|
countries: ['Indonesia.'],
|
|
@@ -1650,13 +1725,14 @@ const LANGUAGES = {
|
|
|
1650
1725
|
},
|
|
1651
1726
|
status: 'commingsoon',
|
|
1652
1727
|
speakers: 199000000,
|
|
1653
|
-
releaseDate: '
|
|
1728
|
+
releaseDate: '2026-01-05',
|
|
1654
1729
|
},
|
|
1655
1730
|
da: {
|
|
1656
1731
|
nativeName: 'Dansk',
|
|
1657
1732
|
flag: '🇩🇰',
|
|
1658
1733
|
flagImg: 'assets/flags/dk.svg',
|
|
1659
1734
|
code: 'da',
|
|
1735
|
+
defaultLocale: 'da-DK',
|
|
1660
1736
|
i: 18,
|
|
1661
1737
|
llmKnowledge: 80,
|
|
1662
1738
|
countries: ['Denmark', 'Faroe Islands (co-official)', 'Greenland (co-official).'],
|
|
@@ -1666,13 +1742,14 @@ const LANGUAGES = {
|
|
|
1666
1742
|
},
|
|
1667
1743
|
status: 'commingsoon',
|
|
1668
1744
|
speakers: 6000000,
|
|
1669
|
-
releaseDate: '
|
|
1745
|
+
releaseDate: '2026-01-12',
|
|
1670
1746
|
},
|
|
1671
1747
|
no: {
|
|
1672
1748
|
nativeName: 'Norsk',
|
|
1673
1749
|
flag: '🇳🇴',
|
|
1674
1750
|
flagImg: 'assets/flags/no.svg',
|
|
1675
1751
|
code: 'no',
|
|
1752
|
+
defaultLocale: 'no-NO',
|
|
1676
1753
|
i: 19,
|
|
1677
1754
|
llmKnowledge: 79,
|
|
1678
1755
|
countries: ['Norway.'],
|
|
@@ -1682,13 +1759,14 @@ const LANGUAGES = {
|
|
|
1682
1759
|
},
|
|
1683
1760
|
status: 'commingsoon',
|
|
1684
1761
|
speakers: 5300000,
|
|
1685
|
-
releaseDate: '
|
|
1762
|
+
releaseDate: '2026-01-19',
|
|
1686
1763
|
},
|
|
1687
1764
|
fi: {
|
|
1688
1765
|
nativeName: 'Suomi',
|
|
1689
1766
|
flag: '🇫🇮',
|
|
1690
1767
|
flagImg: 'assets/flags/fi.svg',
|
|
1691
1768
|
code: 'fi',
|
|
1769
|
+
defaultLocale: 'fi-FI',
|
|
1692
1770
|
i: 20,
|
|
1693
1771
|
llmKnowledge: 78,
|
|
1694
1772
|
countries: ['Finland.'],
|
|
@@ -1698,13 +1776,14 @@ const LANGUAGES = {
|
|
|
1698
1776
|
},
|
|
1699
1777
|
status: 'commingsoon',
|
|
1700
1778
|
speakers: 5400000,
|
|
1701
|
-
releaseDate: '
|
|
1779
|
+
releaseDate: '2026-01-26',
|
|
1702
1780
|
},
|
|
1703
1781
|
cs: {
|
|
1704
1782
|
nativeName: 'Čeština',
|
|
1705
1783
|
flag: '🇨🇿',
|
|
1706
1784
|
flagImg: 'assets/flags/cz.svg',
|
|
1707
1785
|
code: 'cs',
|
|
1786
|
+
defaultLocale: 'cs-CZ',
|
|
1708
1787
|
i: 21,
|
|
1709
1788
|
llmKnowledge: 77,
|
|
1710
1789
|
countries: ['Czech Republic.'],
|
|
@@ -1714,13 +1793,14 @@ const LANGUAGES = {
|
|
|
1714
1793
|
},
|
|
1715
1794
|
status: 'commingsoon',
|
|
1716
1795
|
speakers: 10700000,
|
|
1717
|
-
releaseDate: '
|
|
1796
|
+
releaseDate: '2026-02-02',
|
|
1718
1797
|
},
|
|
1719
1798
|
el: {
|
|
1720
1799
|
nativeName: 'Ελληνικά (Elliniká)',
|
|
1721
1800
|
flag: '🇬🇷',
|
|
1722
1801
|
flagImg: 'assets/flags/gr.svg',
|
|
1723
1802
|
code: 'el',
|
|
1803
|
+
defaultLocale: 'el-GR',
|
|
1724
1804
|
i: 22,
|
|
1725
1805
|
llmKnowledge: 76,
|
|
1726
1806
|
countries: ['Greece', 'Cyprus.'],
|
|
@@ -1730,13 +1810,14 @@ const LANGUAGES = {
|
|
|
1730
1810
|
},
|
|
1731
1811
|
status: 'commingsoon',
|
|
1732
1812
|
speakers: 13500000,
|
|
1733
|
-
releaseDate: '
|
|
1813
|
+
releaseDate: '2026-02-09',
|
|
1734
1814
|
},
|
|
1735
1815
|
hu: {
|
|
1736
1816
|
nativeName: 'Magyar',
|
|
1737
1817
|
flag: '🇭🇺',
|
|
1738
1818
|
flagImg: 'assets/flags/hu.svg',
|
|
1739
1819
|
code: 'hu',
|
|
1820
|
+
defaultLocale: 'hu-HU',
|
|
1740
1821
|
i: 23,
|
|
1741
1822
|
llmKnowledge: 75,
|
|
1742
1823
|
countries: ['Hungary.'],
|
|
@@ -1746,13 +1827,14 @@ const LANGUAGES = {
|
|
|
1746
1827
|
},
|
|
1747
1828
|
status: 'commingsoon',
|
|
1748
1829
|
speakers: 13000000,
|
|
1749
|
-
releaseDate: '
|
|
1830
|
+
releaseDate: '2026-02-16',
|
|
1750
1831
|
},
|
|
1751
1832
|
ro: {
|
|
1752
1833
|
nativeName: 'Română',
|
|
1753
1834
|
flag: '🇷🇴',
|
|
1754
1835
|
flagImg: 'assets/flags/ro.svg',
|
|
1755
1836
|
code: 'ro',
|
|
1837
|
+
defaultLocale: 'ro-RO',
|
|
1756
1838
|
i: 24,
|
|
1757
1839
|
llmKnowledge: 74,
|
|
1758
1840
|
countries: ['Romania', 'Moldova (as Moldovan).'],
|
|
@@ -1762,13 +1844,14 @@ const LANGUAGES = {
|
|
|
1762
1844
|
},
|
|
1763
1845
|
status: 'commingsoon',
|
|
1764
1846
|
speakers: 24000000,
|
|
1765
|
-
releaseDate: '
|
|
1847
|
+
releaseDate: '2026-02-23',
|
|
1766
1848
|
},
|
|
1767
1849
|
uk: {
|
|
1768
1850
|
nativeName: 'Українська (Ukrainska)',
|
|
1769
1851
|
flag: '🇺🇦',
|
|
1770
1852
|
flagImg: 'assets/flags/ua.svg',
|
|
1771
1853
|
code: 'uk',
|
|
1854
|
+
defaultLocale: 'uk-UA',
|
|
1772
1855
|
i: 25,
|
|
1773
1856
|
llmKnowledge: 73,
|
|
1774
1857
|
countries: ['Ukraine.'],
|
|
@@ -1778,13 +1861,14 @@ const LANGUAGES = {
|
|
|
1778
1861
|
},
|
|
1779
1862
|
status: 'commingsoon',
|
|
1780
1863
|
speakers: 33000000,
|
|
1781
|
-
releaseDate: '
|
|
1864
|
+
releaseDate: '2026-03-02',
|
|
1782
1865
|
},
|
|
1783
1866
|
he: {
|
|
1784
1867
|
nativeName: 'עברית (Ivrit)',
|
|
1785
1868
|
flag: '🇮🇱',
|
|
1786
1869
|
flagImg: 'assets/flags/il.svg',
|
|
1787
1870
|
code: 'he',
|
|
1871
|
+
defaultLocale: 'he-IL',
|
|
1788
1872
|
i: 26,
|
|
1789
1873
|
llmKnowledge: 72,
|
|
1790
1874
|
countries: ['Israel.'],
|
|
@@ -1794,13 +1878,14 @@ const LANGUAGES = {
|
|
|
1794
1878
|
},
|
|
1795
1879
|
status: 'commingsoon',
|
|
1796
1880
|
speakers: 9000000,
|
|
1797
|
-
releaseDate: '
|
|
1881
|
+
releaseDate: '2026-03-09',
|
|
1798
1882
|
},
|
|
1799
1883
|
th: {
|
|
1800
1884
|
nativeName: 'ภาษาไทย (Phasa Thai)',
|
|
1801
1885
|
flag: '🇹🇭',
|
|
1802
1886
|
flagImg: 'assets/flags/th.svg',
|
|
1803
1887
|
code: 'th',
|
|
1888
|
+
defaultLocale: 'th-TH',
|
|
1804
1889
|
i: 27,
|
|
1805
1890
|
llmKnowledge: 71,
|
|
1806
1891
|
countries: ['Thailand.'],
|
|
@@ -1810,13 +1895,14 @@ const LANGUAGES = {
|
|
|
1810
1895
|
},
|
|
1811
1896
|
status: 'commingsoon',
|
|
1812
1897
|
speakers: 69000000,
|
|
1813
|
-
releaseDate: '
|
|
1898
|
+
releaseDate: '2026-03-16',
|
|
1814
1899
|
},
|
|
1815
1900
|
hi: {
|
|
1816
1901
|
nativeName: 'हिन्दी (Hindī)',
|
|
1817
1902
|
flag: '🇮🇳',
|
|
1818
1903
|
flagImg: 'assets/flags/in.svg',
|
|
1819
1904
|
code: 'hi',
|
|
1905
|
+
defaultLocale: 'hi-IN',
|
|
1820
1906
|
i: 28,
|
|
1821
1907
|
llmKnowledge: 70,
|
|
1822
1908
|
countries: ['India (co-official)', 'Fiji (co-official).'],
|
|
@@ -1826,13 +1912,14 @@ const LANGUAGES = {
|
|
|
1826
1912
|
},
|
|
1827
1913
|
status: 'commingsoon',
|
|
1828
1914
|
speakers: 602000000,
|
|
1829
|
-
releaseDate: '
|
|
1915
|
+
releaseDate: '2026-03-23',
|
|
1830
1916
|
},
|
|
1831
1917
|
ca: {
|
|
1832
1918
|
nativeName: 'Català',
|
|
1833
1919
|
flag: '🇪🇸',
|
|
1834
1920
|
flagImg: 'assets/flags/es.svg',
|
|
1835
1921
|
code: 'ca',
|
|
1922
|
+
defaultLocale: 'ca-ES',
|
|
1836
1923
|
i: 29,
|
|
1837
1924
|
llmKnowledge: 69,
|
|
1838
1925
|
countries: ['Spain (Catalonia, Valencia, Balearic Islands)', 'Andorra.'],
|
|
@@ -1842,13 +1929,14 @@ const LANGUAGES = {
|
|
|
1842
1929
|
},
|
|
1843
1930
|
status: 'commingsoon',
|
|
1844
1931
|
speakers: 10000000,
|
|
1845
|
-
releaseDate: '
|
|
1932
|
+
releaseDate: '2026-03-30',
|
|
1846
1933
|
},
|
|
1847
1934
|
bg: {
|
|
1848
1935
|
nativeName: 'Български (Balgarski)',
|
|
1849
1936
|
flag: '🇧🇬',
|
|
1850
1937
|
flagImg: 'assets/flags/bg.svg',
|
|
1851
1938
|
code: 'bg',
|
|
1939
|
+
defaultLocale: 'bg-BG',
|
|
1852
1940
|
i: 30,
|
|
1853
1941
|
llmKnowledge: 68,
|
|
1854
1942
|
countries: ['Bulgaria.'],
|
|
@@ -1858,13 +1946,14 @@ const LANGUAGES = {
|
|
|
1858
1946
|
},
|
|
1859
1947
|
status: 'commingsoon',
|
|
1860
1948
|
speakers: 9000000,
|
|
1861
|
-
releaseDate: '
|
|
1949
|
+
releaseDate: '2026-04-06',
|
|
1862
1950
|
},
|
|
1863
1951
|
eo: {
|
|
1864
1952
|
nativeName: 'Esperanto',
|
|
1865
1953
|
flag: '🇺🇳', // Usando la bandera de la ONU por su naturaleza internacional
|
|
1866
1954
|
flagImg: 'assets/flags/eo.svg',
|
|
1867
1955
|
code: 'eo',
|
|
1956
|
+
defaultLocale: 'eo',
|
|
1868
1957
|
i: 59,
|
|
1869
1958
|
llmKnowledge: 90,
|
|
1870
1959
|
countries: ['Worldwide (constructed language)'],
|
|
@@ -1874,13 +1963,14 @@ const LANGUAGES = {
|
|
|
1874
1963
|
},
|
|
1875
1964
|
status: 'commingsoon',
|
|
1876
1965
|
speakers: 2000000,
|
|
1877
|
-
releaseDate: '
|
|
1966
|
+
releaseDate: '2026-04-13',
|
|
1878
1967
|
},
|
|
1879
1968
|
ia: {
|
|
1880
1969
|
nativeName: 'Interlingua',
|
|
1881
1970
|
flag: '🇺🇳', // Usando la bandera de la ONU por su naturaleza internacional
|
|
1882
1971
|
flagImg: 'assets/flags/ia.svg',
|
|
1883
1972
|
code: 'ia',
|
|
1973
|
+
defaultLocale: 'ia',
|
|
1884
1974
|
i: 60,
|
|
1885
1975
|
llmKnowledge: 85,
|
|
1886
1976
|
countries: ['Worldwide (constructed language)'],
|
|
@@ -1890,13 +1980,14 @@ const LANGUAGES = {
|
|
|
1890
1980
|
},
|
|
1891
1981
|
status: 'commingsoon',
|
|
1892
1982
|
speakers: 1500,
|
|
1893
|
-
releaseDate: '
|
|
1983
|
+
releaseDate: '2026-04-20',
|
|
1894
1984
|
},
|
|
1895
1985
|
hr: {
|
|
1896
1986
|
nativeName: 'Hrvatski',
|
|
1897
1987
|
flag: '🇭🇷',
|
|
1898
1988
|
flagImg: 'assets/flags/hr.svg',
|
|
1899
1989
|
code: 'hr',
|
|
1990
|
+
defaultLocale: 'hr-HR',
|
|
1900
1991
|
i: 31,
|
|
1901
1992
|
llmKnowledge: 67,
|
|
1902
1993
|
countries: ['Croatia', 'Bosnia and Herzegovina (co-official)', 'Serbia (Vojvodina).'],
|
|
@@ -1906,13 +1997,14 @@ const LANGUAGES = {
|
|
|
1906
1997
|
},
|
|
1907
1998
|
status: 'commingsoon',
|
|
1908
1999
|
speakers: 5700000,
|
|
1909
|
-
releaseDate: '
|
|
2000
|
+
releaseDate: '2026-04-27',
|
|
1910
2001
|
},
|
|
1911
2002
|
sk: {
|
|
1912
2003
|
nativeName: 'Slovenčina',
|
|
1913
2004
|
flag: '🇸🇰',
|
|
1914
2005
|
flagImg: 'assets/flags/sk.svg',
|
|
1915
2006
|
code: 'sk',
|
|
2007
|
+
defaultLocale: 'sk-SK',
|
|
1916
2008
|
i: 32,
|
|
1917
2009
|
llmKnowledge: 66,
|
|
1918
2010
|
countries: ['Slovakia.'],
|
|
@@ -1922,13 +2014,14 @@ const LANGUAGES = {
|
|
|
1922
2014
|
},
|
|
1923
2015
|
status: 'commingsoon',
|
|
1924
2016
|
speakers: 5400000,
|
|
1925
|
-
releaseDate: '
|
|
2017
|
+
releaseDate: '2026-05-04',
|
|
1926
2018
|
},
|
|
1927
2019
|
fil: {
|
|
1928
2020
|
nativeName: 'Filipino',
|
|
1929
2021
|
flag: '🇵🇭',
|
|
1930
2022
|
flagImg: 'assets/flags/ph.svg',
|
|
1931
2023
|
code: 'fil',
|
|
2024
|
+
defaultLocale: 'fil-PH',
|
|
1932
2025
|
i: 33,
|
|
1933
2026
|
llmKnowledge: 65,
|
|
1934
2027
|
countries: ['Philippines (co-official).'],
|
|
@@ -1938,7 +2031,7 @@ const LANGUAGES = {
|
|
|
1938
2031
|
},
|
|
1939
2032
|
status: 'commingsoon',
|
|
1940
2033
|
speakers: 109000000,
|
|
1941
|
-
releaseDate: '
|
|
2034
|
+
releaseDate: '2026-05-11',
|
|
1942
2035
|
},
|
|
1943
2036
|
tl: {
|
|
1944
2037
|
// Tagalog often used as base for Filipino, but distinct ISO code
|
|
@@ -1946,6 +2039,7 @@ const LANGUAGES = {
|
|
|
1946
2039
|
flag: '🇵🇭',
|
|
1947
2040
|
flagImg: 'assets/flags/ph.svg',
|
|
1948
2041
|
code: 'tl',
|
|
2042
|
+
defaultLocale: 'tl-PH',
|
|
1949
2043
|
i: 34,
|
|
1950
2044
|
llmKnowledge: 64,
|
|
1951
2045
|
countries: ['Philippines (base of Filipino).'],
|
|
@@ -1955,13 +2049,14 @@ const LANGUAGES = {
|
|
|
1955
2049
|
},
|
|
1956
2050
|
status: 'commingsoon',
|
|
1957
2051
|
speakers: 109000000,
|
|
1958
|
-
releaseDate: '
|
|
2052
|
+
releaseDate: '2026-05-18',
|
|
1959
2053
|
},
|
|
1960
2054
|
lt: {
|
|
1961
2055
|
nativeName: 'Lietuvių',
|
|
1962
2056
|
flag: '🇱🇹',
|
|
1963
2057
|
flagImg: 'assets/flags/lt.svg',
|
|
1964
2058
|
code: 'lt',
|
|
2059
|
+
defaultLocale: 'lt-LT',
|
|
1965
2060
|
i: 35,
|
|
1966
2061
|
llmKnowledge: 63,
|
|
1967
2062
|
countries: ['Lithuania.'],
|
|
@@ -1971,13 +2066,14 @@ const LANGUAGES = {
|
|
|
1971
2066
|
},
|
|
1972
2067
|
status: 'commingsoon',
|
|
1973
2068
|
speakers: 2800000,
|
|
1974
|
-
releaseDate: '
|
|
2069
|
+
releaseDate: '2026-05-25',
|
|
1975
2070
|
},
|
|
1976
2071
|
lv: {
|
|
1977
2072
|
nativeName: 'Latviešu',
|
|
1978
2073
|
flag: '🇱🇻',
|
|
1979
2074
|
flagImg: 'assets/flags/lv.svg',
|
|
1980
2075
|
code: 'lv',
|
|
2076
|
+
defaultLocale: 'lv-LV',
|
|
1981
2077
|
i: 36,
|
|
1982
2078
|
llmKnowledge: 62,
|
|
1983
2079
|
countries: ['Latvia.'],
|
|
@@ -1987,13 +2083,14 @@ const LANGUAGES = {
|
|
|
1987
2083
|
},
|
|
1988
2084
|
status: 'commingsoon',
|
|
1989
2085
|
speakers: 1900000,
|
|
1990
|
-
releaseDate: '
|
|
2086
|
+
releaseDate: '2026-06-01',
|
|
1991
2087
|
},
|
|
1992
2088
|
sl: {
|
|
1993
2089
|
nativeName: 'Slovenščina',
|
|
1994
2090
|
flag: '🇸🇮',
|
|
1995
2091
|
flagImg: 'assets/flags/si.svg',
|
|
1996
2092
|
code: 'sl',
|
|
2093
|
+
defaultLocale: 'sl-SI',
|
|
1997
2094
|
i: 37,
|
|
1998
2095
|
llmKnowledge: 61,
|
|
1999
2096
|
countries: ['Slovenia.'],
|
|
@@ -2003,13 +2100,14 @@ const LANGUAGES = {
|
|
|
2003
2100
|
},
|
|
2004
2101
|
status: 'commingsoon',
|
|
2005
2102
|
speakers: 2500000,
|
|
2006
|
-
releaseDate: '
|
|
2103
|
+
releaseDate: '2026-06-08',
|
|
2007
2104
|
},
|
|
2008
2105
|
et: {
|
|
2009
2106
|
nativeName: 'Eesti',
|
|
2010
2107
|
flag: '🇪🇪',
|
|
2011
2108
|
flagImg: 'assets/flags/ee.svg',
|
|
2012
2109
|
code: 'et',
|
|
2110
|
+
defaultLocale: 'et-EE',
|
|
2013
2111
|
i: 38,
|
|
2014
2112
|
llmKnowledge: 60,
|
|
2015
2113
|
countries: ['Estonia.'],
|
|
@@ -2019,13 +2117,14 @@ const LANGUAGES = {
|
|
|
2019
2117
|
},
|
|
2020
2118
|
status: 'commingsoon',
|
|
2021
2119
|
speakers: 1100000,
|
|
2022
|
-
releaseDate: '
|
|
2120
|
+
releaseDate: '2026-06-15',
|
|
2023
2121
|
},
|
|
2024
2122
|
ms: {
|
|
2025
2123
|
nativeName: 'Bahasa Melayu',
|
|
2026
2124
|
flag: '🇲🇾',
|
|
2027
2125
|
flagImg: 'assets/flags/my.svg',
|
|
2028
2126
|
code: 'ms',
|
|
2127
|
+
defaultLocale: 'ms-MY',
|
|
2029
2128
|
i: 39,
|
|
2030
2129
|
llmKnowledge: 59,
|
|
2031
2130
|
countries: ['Malaysia', 'Brunei', 'Singapore (co-official).'],
|
|
@@ -2035,13 +2134,14 @@ const LANGUAGES = {
|
|
|
2035
2134
|
},
|
|
2036
2135
|
status: 'commingsoon',
|
|
2037
2136
|
speakers: 290000000,
|
|
2038
|
-
releaseDate: '
|
|
2137
|
+
releaseDate: '2026-06-22',
|
|
2039
2138
|
},
|
|
2040
2139
|
sw: {
|
|
2041
2140
|
nativeName: 'Kiswahili',
|
|
2042
2141
|
flag: '🇹🇿',
|
|
2043
2142
|
flagImg: 'assets/flags/tz.svg',
|
|
2044
2143
|
code: 'sw',
|
|
2144
|
+
defaultLocale: 'sw-TZ',
|
|
2045
2145
|
i: 40,
|
|
2046
2146
|
llmKnowledge: 58,
|
|
2047
2147
|
countries: ['Tanzania', 'Kenya', 'Uganda', 'Rwanda', 'Democratic Republic of the Congo (national language).'],
|
|
@@ -2051,13 +2151,14 @@ const LANGUAGES = {
|
|
|
2051
2151
|
},
|
|
2052
2152
|
status: 'commingsoon',
|
|
2053
2153
|
speakers: 200000000,
|
|
2054
|
-
releaseDate: '
|
|
2154
|
+
releaseDate: '2026-06-29',
|
|
2055
2155
|
},
|
|
2056
2156
|
fa: {
|
|
2057
2157
|
nativeName: 'فارسی (Fārsī)',
|
|
2058
2158
|
flag: '🇮🇷',
|
|
2059
2159
|
flagImg: 'assets/flags/ir.svg',
|
|
2060
2160
|
code: 'fa',
|
|
2161
|
+
defaultLocale: 'fa-IR',
|
|
2061
2162
|
i: 41,
|
|
2062
2163
|
llmKnowledge: 57,
|
|
2063
2164
|
countries: ['Iran', 'Afghanistan (as Dari)', 'Tajikistan (as Tajik).'],
|
|
@@ -2067,13 +2168,14 @@ const LANGUAGES = {
|
|
|
2067
2168
|
},
|
|
2068
2169
|
status: 'commingsoon',
|
|
2069
2170
|
speakers: 110000000,
|
|
2070
|
-
releaseDate: '
|
|
2171
|
+
releaseDate: '2026-07-06',
|
|
2071
2172
|
},
|
|
2072
2173
|
bn: {
|
|
2073
2174
|
nativeName: 'বাংলা (Bangla)',
|
|
2074
2175
|
flag: '🇧🇩',
|
|
2075
2176
|
flagImg: 'assets/flags/bd.svg',
|
|
2076
2177
|
code: 'bn',
|
|
2178
|
+
defaultLocale: 'bn-BD',
|
|
2077
2179
|
i: 42,
|
|
2078
2180
|
llmKnowledge: 56,
|
|
2079
2181
|
countries: ['Bangladesh', 'India (West Bengal, Tripura).'],
|
|
@@ -2089,6 +2191,7 @@ const LANGUAGES = {
|
|
|
2089
2191
|
flag: '🇵🇰',
|
|
2090
2192
|
flagImg: 'assets/flags/pk.svg',
|
|
2091
2193
|
code: 'ur',
|
|
2194
|
+
defaultLocale: 'ur-PK',
|
|
2092
2195
|
i: 43,
|
|
2093
2196
|
llmKnowledge: 55,
|
|
2094
2197
|
countries: ['Pakistan (co-official)', 'India (recognized).'],
|
|
@@ -2104,6 +2207,7 @@ const LANGUAGES = {
|
|
|
2104
2207
|
flag: '🇷🇸',
|
|
2105
2208
|
flagImg: 'assets/flags/rs.svg',
|
|
2106
2209
|
code: 'sr',
|
|
2210
|
+
defaultLocale: 'sr-RS',
|
|
2107
2211
|
i: 44,
|
|
2108
2212
|
llmKnowledge: 54,
|
|
2109
2213
|
countries: ['Serbia', 'Bosnia and Herzegovina (co-official)', 'Montenegro (co-official)', 'Kosovo (co-official).'],
|
|
@@ -2119,6 +2223,7 @@ const LANGUAGES = {
|
|
|
2119
2223
|
flag: '🇮🇸',
|
|
2120
2224
|
flagImg: 'assets/flags/is.svg',
|
|
2121
2225
|
code: 'is',
|
|
2226
|
+
defaultLocale: 'is-IS',
|
|
2122
2227
|
i: 45,
|
|
2123
2228
|
llmKnowledge: 53,
|
|
2124
2229
|
countries: ['Iceland.'],
|
|
@@ -2134,6 +2239,7 @@ const LANGUAGES = {
|
|
|
2134
2239
|
flag: '🇱🇰',
|
|
2135
2240
|
flagImg: 'assets/flags/lk.svg',
|
|
2136
2241
|
code: 'ta',
|
|
2242
|
+
defaultLocale: 'ta-LK',
|
|
2137
2243
|
i: 46,
|
|
2138
2244
|
llmKnowledge: 52,
|
|
2139
2245
|
countries: ['Sri Lanka', 'Singapore', 'India (Tamil Nadu, Puducherry).'],
|
|
@@ -2149,6 +2255,7 @@ const LANGUAGES = {
|
|
|
2149
2255
|
flag: '🇮🇳',
|
|
2150
2256
|
flagImg: 'assets/flags/in.svg',
|
|
2151
2257
|
code: 'mr',
|
|
2258
|
+
defaultLocale: 'mr-IN',
|
|
2152
2259
|
i: 47,
|
|
2153
2260
|
llmKnowledge: 51,
|
|
2154
2261
|
countries: ['India (Maharashtra).'],
|
|
@@ -2164,6 +2271,7 @@ const LANGUAGES = {
|
|
|
2164
2271
|
flag: '🇲🇲',
|
|
2165
2272
|
flagImg: 'assets/flags/mm.svg',
|
|
2166
2273
|
code: 'my',
|
|
2274
|
+
defaultLocale: 'my-MM',
|
|
2167
2275
|
i: 48,
|
|
2168
2276
|
llmKnowledge: 50,
|
|
2169
2277
|
countries: ['Myanmar.'],
|
|
@@ -2179,6 +2287,7 @@ const LANGUAGES = {
|
|
|
2179
2287
|
flag: '🏴',
|
|
2180
2288
|
flagImg: 'assets/flags/cy.svg',
|
|
2181
2289
|
code: 'cy',
|
|
2290
|
+
defaultLocale: 'cy-GB',
|
|
2182
2291
|
i: 49,
|
|
2183
2292
|
llmKnowledge: 49,
|
|
2184
2293
|
countries: ['United Kingdom (Wales).'],
|
|
@@ -2194,6 +2303,7 @@ const LANGUAGES = {
|
|
|
2194
2303
|
flag: '🇳🇬',
|
|
2195
2304
|
flagImg: 'assets/flags/ng.svg',
|
|
2196
2305
|
code: 'ha',
|
|
2306
|
+
defaultLocale: 'ha-NG',
|
|
2197
2307
|
i: 50,
|
|
2198
2308
|
llmKnowledge: 48,
|
|
2199
2309
|
countries: ['Nigeria (major language)', 'Niger', 'Ghana', 'Cameroon', 'Benin', 'Chad', 'Sudan.'],
|
|
@@ -2209,6 +2319,7 @@ const LANGUAGES = {
|
|
|
2209
2319
|
flag: '🇪🇸',
|
|
2210
2320
|
flagImg: 'assets/flags/es.svg',
|
|
2211
2321
|
code: 'eu',
|
|
2322
|
+
defaultLocale: 'eu-ES',
|
|
2212
2323
|
i: 51,
|
|
2213
2324
|
llmKnowledge: 47,
|
|
2214
2325
|
countries: ['Spain (Basque Country, Navarre)', 'France (French Basque Country).'],
|
|
@@ -2224,6 +2335,7 @@ const LANGUAGES = {
|
|
|
2224
2335
|
flag: '🇮🇪',
|
|
2225
2336
|
flagImg: 'assets/flags/ie.svg',
|
|
2226
2337
|
code: 'ga',
|
|
2338
|
+
defaultLocale: 'ga-IE',
|
|
2227
2339
|
i: 52,
|
|
2228
2340
|
llmKnowledge: 46,
|
|
2229
2341
|
countries: ['Ireland', 'United Kingdom (Northern Ireland).'],
|
|
@@ -2239,6 +2351,7 @@ const LANGUAGES = {
|
|
|
2239
2351
|
flag: '🇵🇰',
|
|
2240
2352
|
flagImg: 'assets/flags/pk.svg',
|
|
2241
2353
|
code: 'sd',
|
|
2354
|
+
defaultLocale: 'sd-PK',
|
|
2242
2355
|
i: 53,
|
|
2243
2356
|
llmKnowledge: 45,
|
|
2244
2357
|
countries: ['Pakistan (Sindh)', 'India (recognized).'],
|
|
@@ -2254,6 +2367,7 @@ const LANGUAGES = {
|
|
|
2254
2367
|
flag: '🇪🇹',
|
|
2255
2368
|
flagImg: 'assets/flags/et.svg',
|
|
2256
2369
|
code: 'am',
|
|
2370
|
+
defaultLocale: 'am-ET',
|
|
2257
2371
|
i: 54,
|
|
2258
2372
|
llmKnowledge: 44,
|
|
2259
2373
|
countries: ['Ethiopia.'],
|
|
@@ -2269,6 +2383,7 @@ const LANGUAGES = {
|
|
|
2269
2383
|
flag: '🇮🇩',
|
|
2270
2384
|
flagImg: 'assets/flags/id.svg',
|
|
2271
2385
|
code: 'jv',
|
|
2386
|
+
defaultLocale: 'jv-ID',
|
|
2272
2387
|
i: 55,
|
|
2273
2388
|
llmKnowledge: 43,
|
|
2274
2389
|
countries: ['Indonesia (important regional language).'],
|
|
@@ -2284,6 +2399,7 @@ const LANGUAGES = {
|
|
|
2284
2399
|
flag: '🇰🇭',
|
|
2285
2400
|
flagImg: 'assets/flags/kh.svg',
|
|
2286
2401
|
code: 'km',
|
|
2402
|
+
defaultLocale: 'km-KH',
|
|
2287
2403
|
i: 56,
|
|
2288
2404
|
llmKnowledge: 42,
|
|
2289
2405
|
countries: ['Cambodia.'],
|
|
@@ -2299,6 +2415,7 @@ const LANGUAGES = {
|
|
|
2299
2415
|
flag: '🇳🇬',
|
|
2300
2416
|
flagImg: 'assets/flags/ng.svg',
|
|
2301
2417
|
code: 'yo',
|
|
2418
|
+
defaultLocale: 'yo-NG',
|
|
2302
2419
|
i: 57,
|
|
2303
2420
|
llmKnowledge: 41,
|
|
2304
2421
|
countries: ['Nigeria', 'Benin', 'Togo.'],
|
|
@@ -2314,6 +2431,7 @@ const LANGUAGES = {
|
|
|
2314
2431
|
flag: '🇪🇸',
|
|
2315
2432
|
flagImg: 'assets/flags/es.svg',
|
|
2316
2433
|
code: 'gl',
|
|
2434
|
+
defaultLocale: 'gl-ES',
|
|
2317
2435
|
i: 58,
|
|
2318
2436
|
llmKnowledge: 40,
|
|
2319
2437
|
countries: ['Spain (Galicia).'],
|
|
@@ -2325,7 +2443,7 @@ const LANGUAGES = {
|
|
|
2325
2443
|
speakers: 2400000,
|
|
2326
2444
|
},
|
|
2327
2445
|
};
|
|
2328
|
-
function getLangDesc(langCode, lang) {
|
|
2446
|
+
function getLangDesc(langCode, lang = 'en') {
|
|
2329
2447
|
return LANGUAGES[langCode]?.translations[lang] || langCode;
|
|
2330
2448
|
}
|
|
2331
2449
|
function getSupportedLanguageOptions(lang = 'es') {
|
|
@@ -2436,7 +2554,7 @@ class PromptComponent {
|
|
|
2436
2554
|
this.ref.close(null);
|
|
2437
2555
|
}
|
|
2438
2556
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: PromptComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2439
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.6", type: PromptComponent, isStandalone: true, selector: "dc-prompt", ngImport: i0, template: "<div class=\"form-input-card p-4\">\n <p-message severity=\"secondary\"> {{ title() }}</p-message>\n\n <div class=\"my-4\">{{ message() }}</div>\n\n <div class=\"p-field mb-4\">\n <textarea rows=\"5\" cols=\"30\" pTextarea [(ngModel)]=\"inputValue\" class=\"w-full\"></textarea>\n </div>\n\n <div class=\"flex justify-content-end gap-2\">\n <p-button [label]=\"cancelText()\" (click)=\"cancel()\" severity=\"secondary\"></p-button>\n <p-button [label]=\"acceptText()\" (click)=\"accept()\"></p-button>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: InputTextModule }, { 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: MessageModule }, { kind: "component", type: i2$1.Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }, { kind: "ngmodule", type: TextareaModule }, { kind: "directive", type: i4$
|
|
2557
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.6", type: PromptComponent, isStandalone: true, selector: "dc-prompt", ngImport: i0, template: "<div class=\"form-input-card p-4\">\n <p-message severity=\"secondary\"> {{ title() }}</p-message>\n\n <div class=\"my-4\">{{ message() }}</div>\n\n <div class=\"p-field mb-4\">\n <textarea rows=\"5\" cols=\"30\" pTextarea [(ngModel)]=\"inputValue\" class=\"w-full\"></textarea>\n </div>\n\n <div class=\"flex justify-content-end gap-2\">\n <p-button [label]=\"cancelText()\" (click)=\"cancel()\" severity=\"secondary\"></p-button>\n <p-button [label]=\"acceptText()\" (click)=\"accept()\"></p-button>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: InputTextModule }, { 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: MessageModule }, { kind: "component", type: i2$1.Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }, { kind: "ngmodule", type: TextareaModule }, { kind: "directive", type: i4$4.Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }] }); }
|
|
2440
2558
|
}
|
|
2441
2559
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: PromptComponent, decorators: [{
|
|
2442
2560
|
type: Component,
|
|
@@ -2541,7 +2659,7 @@ class HttpCoreService {
|
|
|
2541
2659
|
try {
|
|
2542
2660
|
const url = this.getHostUrl(host) + '/' + service;
|
|
2543
2661
|
const dataPlain = this.toPlainObject(data);
|
|
2544
|
-
const response$ = this.httpClient.post(url, dataPlain).pipe(
|
|
2662
|
+
const response$ = this.httpClient.post(url, dataPlain).pipe(catchError(this.handleRequestError.bind(this)));
|
|
2545
2663
|
const result = await lastValueFrom(response$);
|
|
2546
2664
|
this.isLoading.set(false);
|
|
2547
2665
|
return result;
|
|
@@ -2551,6 +2669,15 @@ class HttpCoreService {
|
|
|
2551
2669
|
throw error;
|
|
2552
2670
|
}
|
|
2553
2671
|
}
|
|
2672
|
+
postHttp$({ service, data, host }) {
|
|
2673
|
+
this.isLoading.set(true);
|
|
2674
|
+
const url = this.getHostUrl(host) + '/' + service;
|
|
2675
|
+
const dataPlain = this.toPlainObject(data);
|
|
2676
|
+
return this.httpClient.post(url, dataPlain).pipe(tap(() => this.isLoading.set(false)), catchError((err) => {
|
|
2677
|
+
this.isLoading.set(false);
|
|
2678
|
+
return this.handleRequestError(err);
|
|
2679
|
+
}));
|
|
2680
|
+
}
|
|
2554
2681
|
async putHttp({ service, data, host }) {
|
|
2555
2682
|
this.isLoading.set(true);
|
|
2556
2683
|
try {
|
|
@@ -2585,6 +2712,17 @@ class HttpCoreService {
|
|
|
2585
2712
|
throw error;
|
|
2586
2713
|
}
|
|
2587
2714
|
}
|
|
2715
|
+
getHttp$({ service, host, skipErrorHandling = false }) {
|
|
2716
|
+
this.isLoading.set(true);
|
|
2717
|
+
const url = this.getHostUrl(host) + '/' + service;
|
|
2718
|
+
return this.httpClient.get(url).pipe(tap(() => this.isLoading.set(false)), catchError((err) => {
|
|
2719
|
+
this.isLoading.set(false);
|
|
2720
|
+
if (!skipErrorHandling) {
|
|
2721
|
+
return this.handleRequestError(err);
|
|
2722
|
+
}
|
|
2723
|
+
return throwError(() => err);
|
|
2724
|
+
}));
|
|
2725
|
+
}
|
|
2588
2726
|
async deleteHttp({ service, host }) {
|
|
2589
2727
|
this.isLoading.set(true);
|
|
2590
2728
|
try {
|
|
@@ -2622,7 +2760,7 @@ class HttpCoreService {
|
|
|
2622
2760
|
try {
|
|
2623
2761
|
const url = `${baseUrl}/${service}`;
|
|
2624
2762
|
const dataPlain = this.toPlainObject(data);
|
|
2625
|
-
const response$ = this.httpClient.post(url, dataPlain).pipe(
|
|
2763
|
+
const response$ = this.httpClient.post(url, dataPlain).pipe(catchError(this.handleRequestError.bind(this)));
|
|
2626
2764
|
const result = await lastValueFrom(response$);
|
|
2627
2765
|
this.isLoading.set(false);
|
|
2628
2766
|
return result;
|
|
@@ -2772,6 +2910,7 @@ class HttpCoreService {
|
|
|
2772
2910
|
}
|
|
2773
2911
|
/**
|
|
2774
2912
|
* Upload a file to the specified service
|
|
2913
|
+
* @Deprecated use postFile
|
|
2775
2914
|
* @param service The service endpoint
|
|
2776
2915
|
* @param file The file to upload
|
|
2777
2916
|
* @param metadata Optional metadata to send with the file
|
|
@@ -2798,6 +2937,34 @@ class HttpCoreService {
|
|
|
2798
2937
|
throw error;
|
|
2799
2938
|
}
|
|
2800
2939
|
}
|
|
2940
|
+
/**
|
|
2941
|
+
* Upload a file to the specified service
|
|
2942
|
+
* @param service The service endpoint
|
|
2943
|
+
* @param file The file to upload
|
|
2944
|
+
* @param metadata Optional metadata to send with the file
|
|
2945
|
+
* @param host The host to use (primary or secondary)
|
|
2946
|
+
* @returns A promise with the response
|
|
2947
|
+
*/
|
|
2948
|
+
async postFile({ service, file, metadata, host }) {
|
|
2949
|
+
this.isLoading.set(true);
|
|
2950
|
+
try {
|
|
2951
|
+
const url = this.getHostUrl(host) + '/' + service;
|
|
2952
|
+
const formData = new FormData();
|
|
2953
|
+
formData.append('file', file);
|
|
2954
|
+
let headers = {};
|
|
2955
|
+
if (metadata) {
|
|
2956
|
+
headers = { metadata: JSON.stringify(metadata) };
|
|
2957
|
+
}
|
|
2958
|
+
const response$ = this.httpClient.post(url, formData, { headers });
|
|
2959
|
+
const result = await lastValueFrom(response$);
|
|
2960
|
+
this.isLoading.set(false);
|
|
2961
|
+
return result;
|
|
2962
|
+
}
|
|
2963
|
+
catch (error) {
|
|
2964
|
+
this.isLoading.set(false);
|
|
2965
|
+
throw error;
|
|
2966
|
+
}
|
|
2967
|
+
}
|
|
2801
2968
|
/**
|
|
2802
2969
|
* Download a file from the specified service
|
|
2803
2970
|
* @param service The service endpoint
|
|
@@ -2885,19 +3052,26 @@ class HttpCoreService {
|
|
|
2885
3052
|
*/
|
|
2886
3053
|
handleRequestError(error) {
|
|
2887
3054
|
this.isLoading.set(false);
|
|
3055
|
+
let appException = null;
|
|
2888
3056
|
if (error?.error?.type === 'AppException') {
|
|
3057
|
+
appException = error?.error;
|
|
3058
|
+
}
|
|
3059
|
+
else if (error?.error?.exception?.error_message) {
|
|
3060
|
+
appException = error?.error?.exception;
|
|
3061
|
+
}
|
|
3062
|
+
if (appException) {
|
|
2889
3063
|
console.error(error.error);
|
|
2890
|
-
const errorMessage =
|
|
2891
|
-
const subtitle =
|
|
3064
|
+
const errorMessage = appException?.error_message || 'An error occurred';
|
|
3065
|
+
const subtitle = appException?.explanation || 'Please try again later';
|
|
2892
3066
|
this.toastService.error({ title: errorMessage, subtitle });
|
|
2893
3067
|
}
|
|
2894
|
-
// Set the last error
|
|
2895
|
-
if (
|
|
3068
|
+
// Set the last error, not sure if this is still neeed, to keep track of the last error.
|
|
3069
|
+
if (appException) {
|
|
2896
3070
|
this.lastError.set({
|
|
2897
|
-
error_message:
|
|
2898
|
-
explanation:
|
|
3071
|
+
error_message: appException.error_message || 'An error occurred',
|
|
3072
|
+
explanation: appException.explanation || 'Please try again later',
|
|
2899
3073
|
status: error.status,
|
|
2900
|
-
code:
|
|
3074
|
+
code: appException.statusCode,
|
|
2901
3075
|
});
|
|
2902
3076
|
}
|
|
2903
3077
|
else {
|
|
@@ -2935,14 +3109,6 @@ class HttpCoreService {
|
|
|
2935
3109
|
}
|
|
2936
3110
|
return this.handleRequestError(error);
|
|
2937
3111
|
}
|
|
2938
|
-
/**
|
|
2939
|
-
* Check the status of a response
|
|
2940
|
-
* @param response The response to check
|
|
2941
|
-
*/
|
|
2942
|
-
checkResponseStatus(response) {
|
|
2943
|
-
// Implement any response status checking logic here
|
|
2944
|
-
// For example, check for specific status codes or error messages
|
|
2945
|
-
}
|
|
2946
3112
|
/**
|
|
2947
3113
|
* Convert an object to a plain object
|
|
2948
3114
|
* @param obj The object to convert
|
|
@@ -3035,6 +3201,11 @@ class EntityCommunicationService {
|
|
|
3035
3201
|
query(filterConfig) {
|
|
3036
3202
|
return this.httpService.postHttp({ service: `api/${this.serviceName}/query`, data: filterConfig, host: this.customHost });
|
|
3037
3203
|
}
|
|
3204
|
+
update(id, update) {
|
|
3205
|
+
// NEW METHOD, i'm not used yet.
|
|
3206
|
+
// Este método da más control porque no esta validado, puede actualizar por ejemplo un objeto anidado 'assets.motions' o creo que tambien mandando el update de mongo {$push...}
|
|
3207
|
+
return this.httpService.putHttp({ service: `api/${this.serviceName}/${id}`, data: update, host: this.customHost });
|
|
3208
|
+
}
|
|
3038
3209
|
partialUpdate(id, partialUpdates) {
|
|
3039
3210
|
// In backend object is flattened, so Convert nested objects to dot notation eg. { "video.captions.remotion": captions.captions }
|
|
3040
3211
|
return this.httpService.putHttp({ service: `api/${this.serviceName}/${id}`, data: partialUpdates, host: this.customHost });
|
|
@@ -3105,7 +3276,6 @@ const APP_CONFIG = new InjectionToken('app.config');
|
|
|
3105
3276
|
class AppConfigService {
|
|
3106
3277
|
constructor() {
|
|
3107
3278
|
this.config = inject(APP_CONFIG);
|
|
3108
|
-
this.config.kbhost = 'http://localhost:3000';
|
|
3109
3279
|
}
|
|
3110
3280
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AppConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3111
3281
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AppConfigService, providedIn: 'root' }); }
|
|
@@ -3115,46 +3285,98 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
3115
3285
|
args: [{
|
|
3116
3286
|
providedIn: 'root',
|
|
3117
3287
|
}]
|
|
3118
|
-
}]
|
|
3288
|
+
}] });
|
|
3289
|
+
|
|
3290
|
+
class AudioNotificationService {
|
|
3291
|
+
playFinishNotification() {
|
|
3292
|
+
const audio = new Audio('assets/sounds/accomplished.mp3');
|
|
3293
|
+
audio.load();
|
|
3294
|
+
audio.play();
|
|
3295
|
+
}
|
|
3296
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AudioNotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3297
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AudioNotificationService, providedIn: 'root' }); }
|
|
3298
|
+
}
|
|
3299
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AudioNotificationService, decorators: [{
|
|
3300
|
+
type: Injectable,
|
|
3301
|
+
args: [{
|
|
3302
|
+
providedIn: 'root',
|
|
3303
|
+
}]
|
|
3304
|
+
}] });
|
|
3119
3305
|
|
|
3306
|
+
var MoodState;
|
|
3307
|
+
(function (MoodState) {
|
|
3308
|
+
MoodState["HAPPY"] = "happy";
|
|
3309
|
+
MoodState["SAD"] = "sad";
|
|
3310
|
+
MoodState["ANGRY"] = "angry";
|
|
3311
|
+
MoodState["FEAR"] = "fear";
|
|
3312
|
+
MoodState["SURPRISED"] = "surprised";
|
|
3313
|
+
MoodState["DISGUSTED"] = "disgusted";
|
|
3314
|
+
MoodState["PROUD"] = "proud";
|
|
3315
|
+
MoodState["ASHAMED"] = "ashamed";
|
|
3316
|
+
MoodState["GUILTY"] = "guilty";
|
|
3317
|
+
MoodState["JEALOUS"] = "jealous";
|
|
3318
|
+
MoodState["LOVE"] = "love";
|
|
3319
|
+
MoodState["CONTEMPT"] = "contempt";
|
|
3320
|
+
MoodState["COMIC"] = "comic";
|
|
3321
|
+
MoodState["BLUSHING"] = "blushing";
|
|
3322
|
+
MoodState["CONFUSED"] = "confused";
|
|
3323
|
+
MoodState["CURIOUS"] = "curious";
|
|
3324
|
+
MoodState["BORED"] = "bored";
|
|
3325
|
+
MoodState["FRUSTRATED"] = "frustrated";
|
|
3326
|
+
MoodState["OVERWHELMED"] = "overwhelmed";
|
|
3327
|
+
MoodState["FOCUSED"] = "focused";
|
|
3328
|
+
MoodState["CHALLENGE"] = "challenge";
|
|
3329
|
+
MoodState["SERIOUS"] = "serious";
|
|
3330
|
+
MoodState["SLEEPY"] = "sleepy";
|
|
3331
|
+
MoodState["HORNY"] = "horny";
|
|
3332
|
+
MoodState["ANXIOUS"] = "anxious";
|
|
3333
|
+
MoodState["RELAXED"] = "relaxed";
|
|
3334
|
+
})(MoodState || (MoodState = {}));
|
|
3120
3335
|
const MoodStateOptions = [
|
|
3121
3336
|
// Emociones básicas y fundamentales
|
|
3122
|
-
{ value:
|
|
3123
|
-
{ value:
|
|
3124
|
-
{ value:
|
|
3125
|
-
{ value:
|
|
3126
|
-
{ value:
|
|
3127
|
-
{ value:
|
|
3337
|
+
{ value: MoodState.HAPPY, label: '1) Alegría - Felicidad, gozo, satisfacción', emoji: '😊' },
|
|
3338
|
+
{ value: MoodState.SAD, label: '2) Tristeza - Pena, melancolía, desánimo', emoji: '😢' },
|
|
3339
|
+
{ value: MoodState.ANGRY, label: '3) Enojo - Ira, furia, irritación', emoji: '😠' },
|
|
3340
|
+
{ value: MoodState.FEAR, label: '4) Miedo - Temor, pánico, terror', emoji: '😨' },
|
|
3341
|
+
{ value: MoodState.SURPRISED, label: '5) Sorpresa - Asombro, desconcierto', emoji: '😮' },
|
|
3342
|
+
{ value: MoodState.DISGUSTED, label: '6) Asco - Repugnancia, aversión', emoji: '🤢' },
|
|
3128
3343
|
// { value: 'excited', label: '27) Entusiasmo - Emoción, euforia, anticipación' },
|
|
3129
3344
|
// Emociones sociales y autoconscientes
|
|
3130
|
-
{ value:
|
|
3131
|
-
{ value:
|
|
3132
|
-
{ value:
|
|
3133
|
-
{ value:
|
|
3134
|
-
{ value:
|
|
3345
|
+
{ value: MoodState.PROUD, label: '7) Orgullo - Satisfacción por logros propios o ajenos', emoji: '😎' },
|
|
3346
|
+
{ value: MoodState.ASHAMED, label: '8) Vergüenza - Humillado', emoji: '😰' },
|
|
3347
|
+
{ value: MoodState.GUILTY, label: '9) Culpa - Remordimiento, arrepentimiento', emoji: '😔' },
|
|
3348
|
+
{ value: MoodState.JEALOUS, label: '10) Celos - Envidia, desconfianza', emoji: '😒' },
|
|
3349
|
+
{ value: MoodState.LOVE, label: '11) Amor - Cariño, afecto, ternura', emoji: '❤️' },
|
|
3135
3350
|
// { value: 'grateful', label: '12) Agradecimiento - Gratitud, aprecio' },
|
|
3136
|
-
{ value:
|
|
3137
|
-
{ value:
|
|
3138
|
-
{ value:
|
|
3351
|
+
{ value: MoodState.CONTEMPT, label: '30) Desprecio - Desdén, menosprecio', emoji: '🙃' },
|
|
3352
|
+
{ value: MoodState.COMIC, label: '32) Cómico - Divertido, gracioso', emoji: '😂' },
|
|
3353
|
+
{ value: MoodState.BLUSHING, label: '33) Apenado - Sonrojado, avergonzado', emoji: '😳' },
|
|
3139
3354
|
// Estados cognitivos y mentales
|
|
3140
3355
|
// { value: 'neutral', label: '13) Neutral - Calma, imparcialidad' },
|
|
3141
|
-
{ value:
|
|
3142
|
-
{ value:
|
|
3143
|
-
{ value:
|
|
3356
|
+
{ value: MoodState.CONFUSED, label: '14) Confusión - Desorientación, perplejidad', emoji: '😕' },
|
|
3357
|
+
{ value: MoodState.CURIOUS, label: '15) Curiosidad - Interés, intriga, exploración', emoji: '🤔' },
|
|
3358
|
+
{ value: MoodState.BORED, label: '16) Aburrimiento - Desinterés, tedio, apatía', emoji: '😑' },
|
|
3144
3359
|
// { value: 'hopeful', label: '17) Esperanza - Optimismo, fe, expectativa positiva' },
|
|
3145
|
-
{ value:
|
|
3146
|
-
{ value:
|
|
3360
|
+
{ value: MoodState.FRUSTRATED, label: '18) Frustración - Decepción, impotencia', emoji: '😤' },
|
|
3361
|
+
{ value: MoodState.OVERWHELMED, label: '19) Abrumado - Agobio, exceso de carga', emoji: '😫' },
|
|
3147
3362
|
// { value: 'lonely', label: '20) Soledad - Aislamiento, desamparo' },
|
|
3148
|
-
{ value:
|
|
3149
|
-
{ value:
|
|
3363
|
+
{ value: MoodState.FOCUSED, label: '21) Concentración - Enfoque, atención plena', emoji: '🤓' },
|
|
3364
|
+
{ value: MoodState.CHALLENGE, label: '28) Desafío - Reto, provocación, competitividad', emoji: '😏' },
|
|
3150
3365
|
// { value: 'satisfied', label: '29) Satisfacción - Contentamiento, plenitud' },
|
|
3151
|
-
{ value:
|
|
3366
|
+
{ value: MoodState.SERIOUS, label: '31) Serenidad - Actitud seria', emoji: '😐' },
|
|
3152
3367
|
// Estados corporales y fisiológicos
|
|
3153
|
-
{ value:
|
|
3368
|
+
{ value: MoodState.SLEEPY, label: '22) Cansancio - Somnolencia, agotamiento, fatiga', emoji: '😴' },
|
|
3154
3369
|
// { value: 'energetic', label: '23) Energía - Vitalidad, vigor, dinamismo' },
|
|
3155
|
-
{ value:
|
|
3156
|
-
{ value:
|
|
3157
|
-
{ value:
|
|
3370
|
+
{ value: MoodState.HORNY, label: '24) Excitación sexual - Lujuria, deseo sexual', emoji: '😈' },
|
|
3371
|
+
{ value: MoodState.ANXIOUS, label: '25) Ansiedad - Nerviosismo, preocupación, inquietud', emoji: '😟' },
|
|
3372
|
+
{ value: MoodState.RELAXED, label: '26) Relajación - Paz, serenidad, tranquilidad', emoji: '😌' },
|
|
3373
|
+
];
|
|
3374
|
+
|
|
3375
|
+
const CharacterEventActions = [
|
|
3376
|
+
// Emociones básicas y fundamentales
|
|
3377
|
+
{ value: 'intro', label: 'Al iniciar la conversación' },
|
|
3378
|
+
{ value: 'outro', label: 'Al finalizar la conversación' },
|
|
3379
|
+
{ value: 'goalCompleted', label: 'Al completar el objetivo' },
|
|
3158
3380
|
];
|
|
3159
3381
|
|
|
3160
3382
|
/*
|
|
@@ -3166,5 +3388,5 @@ const MoodStateOptions = [
|
|
|
3166
3388
|
* Generated bundle index. Do not edit.
|
|
3167
3389
|
*/
|
|
3168
3390
|
|
|
3169
|
-
export { APP_CONFIG, AppConfigService, AudioSpeed, AudioSpeedReverse, ChatUserSettings, ConfirmComponent, ConfirmService, DCFilterBarComponent, DCProgressToastComponent, DcAuditableViewerComponent, DcExtensionsViewerComponent, DcLearnableFormComponent, DcLearnableViewerComponent, DcManageableFormComponent, DcManageableViewerComponent, DcReactionsViewerComponent, EModelQuality, EmptyStateComponent, EntityBaseFormComponent, EntityBaseListComponent, EntityCommunicationService, FlagPipe, FormUtilsService, GetPathPipe, HTTP_CORE_CONFIG, HttpCoreService, IAIModel, LANGUAGES, LangDescTranslation, LoadingBarComponent, LoadingBarService, ModelQualityOptions, MoodStateOptions, OptionValue, PaginationBase, PromptService, QuickTableComponent, SUPPORTED_LANGUAGES, TOAST_ALERTS_TOKEN, ToastAlertsAbstractService, UiStateService, availibleFilters, extractJsonFromString, formatCamelCaseString, getLangDesc, getSupportedLanguageOptions, provideToastAlert, sortOptions, sortTypes };
|
|
3391
|
+
export { APP_CONFIG, AppConfigService, AudioNotificationService, AudioSpeed, AudioSpeedReverse, CharacterEventActions, ChatUserSettings, ConfirmComponent, ConfirmService, DCFilterBarComponent, DCProgressToastComponent, DcAuditableViewerComponent, DcExtensionsViewerComponent, DcLearnableFormComponent, DcLearnableViewerComponent, DcManageableFormComponent, DcManageableViewerComponent, DcReactionsViewerComponent, EModelQuality, EmptyStateComponent, EntityBaseFormComponent, EntityBaseListComponent, EntityCommunicationService, FlagPipe, FormUtilsService, GetPathPipe, HTTP_CORE_CONFIG, HttpCoreService, IAIModel, LANGUAGES, LangDescTranslation, LoadingBarComponent, LoadingBarService, ModelQualityOptions, MoodState, MoodStateOptions, OptionValue, PaginationBase, PromptService, QuickTableComponent, SUPPORTED_LANGUAGES, TOAST_ALERTS_TOKEN, ToastAlertsAbstractService, UiStateService, availibleFilters, extractJsonFromString, formatCamelCaseString, getLangDesc, getSupportedLanguageOptions, provideToastAlert, sortOptions, sortTypes };
|
|
3170
3392
|
//# sourceMappingURL=dataclouder-ngx-core.mjs.map
|