@dataclouder/ngx-core 0.1.38 → 0.1.40
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 +241 -164
- package/fesm2022/dataclouder-ngx-core.mjs.map +1 -1
- package/index.d.ts +35 -42
- package/package.json +1 -1
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, Component, inject, output, 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
|
|
|
@@ -95,39 +95,19 @@ const sortTypes = [
|
|
|
95
95
|
{ name: 'Populares', code: 'popular', sort: { takenCount: -1 } },
|
|
96
96
|
];
|
|
97
97
|
|
|
98
|
-
|
|
99
|
-
class DCFilterBarComponent {
|
|
98
|
+
class DcListFilterDialogComponent {
|
|
100
99
|
constructor() {
|
|
101
100
|
this.fb = inject(FormBuilder);
|
|
102
|
-
|
|
103
|
-
this.
|
|
104
|
-
this.
|
|
105
|
-
// public userService = inject(UserService);
|
|
106
|
-
// Inputs
|
|
107
|
-
this.customFilters = [];
|
|
108
|
-
this.isAdmin = false;
|
|
109
|
-
// Outputs
|
|
110
|
-
this.onFilterAction = output();
|
|
111
|
-
this.onChangeSort = output();
|
|
112
|
-
this.onNew = output();
|
|
101
|
+
this.ref = inject(DynamicDialogRef);
|
|
102
|
+
this.config = inject(DynamicDialogConfig);
|
|
103
|
+
this.customFilters = this.config.data.customFilters || [];
|
|
113
104
|
this.availibleFilters = availibleFilters;
|
|
114
105
|
this.sortOptions = sortOptions;
|
|
115
|
-
this.isSearchVisible = false;
|
|
116
|
-
this.isFilterVisible = false;
|
|
117
|
-
this.placeholder = '';
|
|
118
|
-
this.filter = { ...DEFAULT_FILTERS };
|
|
119
106
|
this.selectedFilters = [];
|
|
120
107
|
this.selectedSort = null;
|
|
121
108
|
this.dateRange = [];
|
|
122
|
-
}
|
|
123
|
-
ngOnInit() {
|
|
124
109
|
this.buildCustomFiltersForm();
|
|
125
110
|
}
|
|
126
|
-
ngOnChanges(changes) {
|
|
127
|
-
if (changes['customFilters']) {
|
|
128
|
-
this.buildCustomFiltersForm();
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
111
|
buildCustomFiltersForm() {
|
|
132
112
|
const formControls = {};
|
|
133
113
|
for (const filter of this.customFilters) {
|
|
@@ -135,18 +115,55 @@ class DCFilterBarComponent {
|
|
|
135
115
|
}
|
|
136
116
|
this.customFiltersForm = this.fb.group(formControls);
|
|
137
117
|
}
|
|
138
|
-
|
|
139
|
-
|
|
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
|
+
});
|
|
140
136
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
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 };
|
|
144
162
|
}
|
|
145
163
|
createNew() {
|
|
146
|
-
console.log('createNew from core components');
|
|
147
164
|
this.onNew.emit('new');
|
|
148
165
|
}
|
|
149
|
-
search(text
|
|
166
|
+
search(text) {
|
|
150
167
|
if (!text) {
|
|
151
168
|
this.placeholder = '';
|
|
152
169
|
this.clearFilters();
|
|
@@ -156,42 +173,47 @@ class DCFilterBarComponent {
|
|
|
156
173
|
}
|
|
157
174
|
this.isSearchVisible = false;
|
|
158
175
|
}
|
|
159
|
-
|
|
160
|
-
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.)
|
|
161
202
|
this.doItemAction({ action: 'filterChange', item: this.filter });
|
|
162
203
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
const activeFilters = Object.entries(customFilterValues).reduce((acc, [key, value]) => {
|
|
166
|
-
if (value !== null && value !== undefined && value !== '') {
|
|
167
|
-
acc[key] = value;
|
|
168
|
-
}
|
|
169
|
-
return acc;
|
|
170
|
-
}, {});
|
|
171
|
-
this.filter.filters = { ...this.filter.filters, ...activeFilters };
|
|
204
|
+
clearFilters() {
|
|
205
|
+
this.filter = { ...DEFAULT_FILTERS };
|
|
172
206
|
this.doItemAction({ action: 'filterChange', item: this.filter });
|
|
173
|
-
this.isFilterVisible = false;
|
|
174
207
|
}
|
|
175
208
|
doItemAction(filterEvent) {
|
|
176
209
|
this.onFilterAction.emit(filterEvent);
|
|
177
210
|
}
|
|
178
211
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DCFilterBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
179
|
-
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\" (click)=\"search(placeholder)\" />\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 }); }
|
|
180
213
|
}
|
|
181
214
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DCFilterBarComponent, decorators: [{
|
|
182
215
|
type: Component,
|
|
183
|
-
args: [{ selector: 'dc-filter-bar', standalone: true, imports: [
|
|
184
|
-
FormsModule,
|
|
185
|
-
ReactiveFormsModule,
|
|
186
|
-
ButtonModule,
|
|
187
|
-
DialogModule,
|
|
188
|
-
SelectModule,
|
|
189
|
-
MultiSelectModule,
|
|
190
|
-
DatePickerModule,
|
|
191
|
-
InputTextModule,
|
|
192
|
-
InputGroupModule,
|
|
193
|
-
InputGroupAddonModule,
|
|
194
|
-
], 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\" (click)=\"search(placeholder)\" />\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"] }]
|
|
195
217
|
}], propDecorators: { customFilters: [{
|
|
196
218
|
type: Input
|
|
197
219
|
}], isAdmin: [{
|
|
@@ -309,7 +331,7 @@ class DCProgressToastComponent {
|
|
|
309
331
|
this.processClosed.emit();
|
|
310
332
|
}
|
|
311
333
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DCProgressToastComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
312
|
-
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"] }] }); }
|
|
313
335
|
}
|
|
314
336
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DCProgressToastComponent, decorators: [{
|
|
315
337
|
type: Component,
|
|
@@ -486,7 +508,7 @@ class LoadingBarComponent {
|
|
|
486
508
|
this.loadingBarService = inject(LoadingBarService);
|
|
487
509
|
}
|
|
488
510
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: LoadingBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
489
|
-
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"] }] }); }
|
|
490
512
|
}
|
|
491
513
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: LoadingBarComponent, decorators: [{
|
|
492
514
|
type: Component,
|
|
@@ -513,6 +535,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
513
535
|
}]
|
|
514
536
|
}] });
|
|
515
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
|
+
*/
|
|
516
547
|
class QuickTableComponent {
|
|
517
548
|
constructor() {
|
|
518
549
|
// Inputs
|
|
@@ -609,6 +640,24 @@ class QuickTableComponent {
|
|
|
609
640
|
options: uniqueTags,
|
|
610
641
|
};
|
|
611
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
|
+
}
|
|
612
661
|
});
|
|
613
662
|
}
|
|
614
663
|
this.filters.set(filterObj);
|
|
@@ -636,13 +685,22 @@ class QuickTableComponent {
|
|
|
636
685
|
console.log(filteredData);
|
|
637
686
|
this._tableData.set(filteredData);
|
|
638
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
|
+
}
|
|
639
696
|
}
|
|
640
697
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: QuickTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
641
|
-
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 }); }
|
|
642
699
|
}
|
|
643
700
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: QuickTableComponent, decorators: [{
|
|
644
701
|
type: Component,
|
|
645
702
|
args: [{ selector: 'app-quick-table', imports: [
|
|
703
|
+
CommonModule,
|
|
646
704
|
CardModule,
|
|
647
705
|
ButtonModule,
|
|
648
706
|
SpeedDialModule,
|
|
@@ -654,7 +712,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
654
712
|
TagModule,
|
|
655
713
|
SelectModule,
|
|
656
714
|
MultiSelectModule,
|
|
657
|
-
], 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"] }]
|
|
658
716
|
}], ctorParameters: () => [], propDecorators: { tableRef: [{
|
|
659
717
|
type: ViewChild,
|
|
660
718
|
args: ['tableRef']
|
|
@@ -711,7 +769,7 @@ class DcAuditableViewerComponent {
|
|
|
711
769
|
</div>
|
|
712
770
|
</p-fieldset>
|
|
713
771
|
}
|
|
714
|
-
`, 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" }] }); }
|
|
715
773
|
}
|
|
716
774
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcAuditableViewerComponent, decorators: [{
|
|
717
775
|
type: Component,
|
|
@@ -774,7 +832,7 @@ class DcExtensionsViewerComponent {
|
|
|
774
832
|
this.data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
775
833
|
}
|
|
776
834
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcExtensionsViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
777
|
-
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" }] }); }
|
|
778
836
|
}
|
|
779
837
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcExtensionsViewerComponent, decorators: [{
|
|
780
838
|
type: Component,
|
|
@@ -791,7 +849,7 @@ class DcLearnableViewerComponent {
|
|
|
791
849
|
this.data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
792
850
|
}
|
|
793
851
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcLearnableViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
794
|
-
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" }] }); }
|
|
795
853
|
}
|
|
796
854
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcLearnableViewerComponent, decorators: [{
|
|
797
855
|
type: Component,
|
|
@@ -808,7 +866,7 @@ class DcManageableViewerComponent {
|
|
|
808
866
|
this.data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
809
867
|
}
|
|
810
868
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcManageableViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
811
|
-
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" }] }); }
|
|
812
870
|
}
|
|
813
871
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcManageableViewerComponent, decorators: [{
|
|
814
872
|
type: Component,
|
|
@@ -825,7 +883,7 @@ class DcReactionsViewerComponent {
|
|
|
825
883
|
this.data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
826
884
|
}
|
|
827
885
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcReactionsViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
828
|
-
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" }] }); }
|
|
829
887
|
}
|
|
830
888
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcReactionsViewerComponent, decorators: [{
|
|
831
889
|
type: Component,
|
|
@@ -848,7 +906,7 @@ class DcManageableFormComponent {
|
|
|
848
906
|
];
|
|
849
907
|
}
|
|
850
908
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcManageableFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
851
|
-
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"] }] }); }
|
|
852
910
|
}
|
|
853
911
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcManageableFormComponent, decorators: [{
|
|
854
912
|
type: Component,
|
|
@@ -877,7 +935,7 @@ class DcTagsFormComponent {
|
|
|
877
935
|
this.arrayForm.removeAt(index);
|
|
878
936
|
}
|
|
879
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 }); }
|
|
880
|
-
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: [
|
|
881
939
|
{
|
|
882
940
|
provide: ControlContainer,
|
|
883
941
|
useFactory: () => inject(ControlContainer, { skipSelf: true }),
|
|
@@ -899,7 +957,7 @@ class DcLearnableFormComponent {
|
|
|
899
957
|
this.form = input.required(...(ngDevMode ? [{ debugName: "form" }] : []));
|
|
900
958
|
}
|
|
901
959
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcLearnableFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
902
|
-
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" }] }); }
|
|
903
961
|
}
|
|
904
962
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DcLearnableFormComponent, decorators: [{
|
|
905
963
|
type: Component,
|
|
@@ -1055,18 +1113,19 @@ class EntityBaseListComponent extends PaginationBase {
|
|
|
1055
1113
|
if (!item) {
|
|
1056
1114
|
return;
|
|
1057
1115
|
}
|
|
1116
|
+
const id = item?._id || item?.id;
|
|
1058
1117
|
switch (action) {
|
|
1059
1118
|
case 'view':
|
|
1060
|
-
this.router.navigate(['./details',
|
|
1119
|
+
this.router.navigate(['./details', id], { relativeTo: this.route });
|
|
1061
1120
|
break;
|
|
1062
1121
|
case 'edit':
|
|
1063
|
-
this.router.navigate(['./edit',
|
|
1122
|
+
this.router.navigate(['./edit', id], { relativeTo: this.route });
|
|
1064
1123
|
break;
|
|
1065
1124
|
case 'delete':
|
|
1066
1125
|
const confirmed = confirm(`Are you sure you want to delete this item?`);
|
|
1067
1126
|
if (confirmed) {
|
|
1068
1127
|
try {
|
|
1069
|
-
await this.entityCommunicationService.remove(
|
|
1128
|
+
await this.entityCommunicationService.remove(id);
|
|
1070
1129
|
}
|
|
1071
1130
|
catch (error) {
|
|
1072
1131
|
console.error('Error deleting item', error);
|
|
@@ -1077,7 +1136,7 @@ class EntityBaseListComponent extends PaginationBase {
|
|
|
1077
1136
|
}
|
|
1078
1137
|
break;
|
|
1079
1138
|
case 'clone':
|
|
1080
|
-
await this.entityCommunicationService.clone(
|
|
1139
|
+
await this.entityCommunicationService.clone(id);
|
|
1081
1140
|
await this.loadData(); // Refresh list
|
|
1082
1141
|
break;
|
|
1083
1142
|
default:
|
|
@@ -1133,8 +1192,10 @@ class EntityBaseFormComponent {
|
|
|
1133
1192
|
this.route = inject(ActivatedRoute);
|
|
1134
1193
|
this.router = inject(Router);
|
|
1135
1194
|
this.toastService = inject(TOAST_ALERTS_TOKEN, { optional: true });
|
|
1195
|
+
this.id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : []));
|
|
1136
1196
|
this.entity = signal(undefined, ...(ngDevMode ? [{ debugName: "entity" }] : []));
|
|
1137
|
-
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" }] : []));
|
|
1138
1199
|
this.loadEntityEffect = effect(async () => {
|
|
1139
1200
|
const id = this.entityId();
|
|
1140
1201
|
if (id) {
|
|
@@ -1154,9 +1215,10 @@ class EntityBaseFormComponent {
|
|
|
1154
1215
|
// if there is no id, we create a new entity
|
|
1155
1216
|
try {
|
|
1156
1217
|
const newEntity = await this.entityCommunicationService.createOrUpdate({});
|
|
1157
|
-
|
|
1218
|
+
const id = newEntity?._id || newEntity?.['id'];
|
|
1219
|
+
if (id) {
|
|
1158
1220
|
// we replace the url to avoid creating a new entity when the user goes back
|
|
1159
|
-
this.router.navigate([
|
|
1221
|
+
this.router.navigate([id], { relativeTo: this.route, replaceUrl: true });
|
|
1160
1222
|
}
|
|
1161
1223
|
}
|
|
1162
1224
|
catch (err) {
|
|
@@ -1204,7 +1266,7 @@ class EntityBaseFormComponent {
|
|
|
1204
1266
|
return this.entityCommunicationService.partialUpdate(this.entityId(), dirtyValues);
|
|
1205
1267
|
}
|
|
1206
1268
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: EntityBaseFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1207
|
-
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 }); }
|
|
1208
1270
|
}
|
|
1209
1271
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: EntityBaseFormComponent, decorators: [{
|
|
1210
1272
|
type: Directive
|
|
@@ -1484,7 +1546,7 @@ const LANGUAGES = {
|
|
|
1484
1546
|
},
|
|
1485
1547
|
status: 'commingsoon',
|
|
1486
1548
|
speakers: 25000000,
|
|
1487
|
-
releaseDate: '2025-
|
|
1549
|
+
releaseDate: '2025-11-03',
|
|
1488
1550
|
},
|
|
1489
1551
|
zh: {
|
|
1490
1552
|
nativeName: '中文 (Zhōngwén)',
|
|
@@ -1501,7 +1563,7 @@ const LANGUAGES = {
|
|
|
1501
1563
|
},
|
|
1502
1564
|
status: 'commingsoon',
|
|
1503
1565
|
speakers: 1120000000,
|
|
1504
|
-
releaseDate: '2025-
|
|
1566
|
+
releaseDate: '2025-11-10',
|
|
1505
1567
|
},
|
|
1506
1568
|
ru: {
|
|
1507
1569
|
nativeName: 'Русский (Russkiy)',
|
|
@@ -1518,7 +1580,7 @@ const LANGUAGES = {
|
|
|
1518
1580
|
},
|
|
1519
1581
|
status: 'commingsoon',
|
|
1520
1582
|
speakers: 258000000,
|
|
1521
|
-
releaseDate: '2025-
|
|
1583
|
+
releaseDate: '2025-11-17',
|
|
1522
1584
|
},
|
|
1523
1585
|
ko: {
|
|
1524
1586
|
nativeName: '한국어 (Hangugeo)',
|
|
@@ -1535,7 +1597,7 @@ const LANGUAGES = {
|
|
|
1535
1597
|
},
|
|
1536
1598
|
status: 'commingsoon',
|
|
1537
1599
|
speakers: 82000000,
|
|
1538
|
-
releaseDate: '2025-
|
|
1600
|
+
releaseDate: '2025-11-24',
|
|
1539
1601
|
},
|
|
1540
1602
|
pl: {
|
|
1541
1603
|
nativeName: 'Polski',
|
|
@@ -1552,7 +1614,7 @@ const LANGUAGES = {
|
|
|
1552
1614
|
},
|
|
1553
1615
|
status: 'commingsoon',
|
|
1554
1616
|
speakers: 40000000,
|
|
1555
|
-
releaseDate: '2025-
|
|
1617
|
+
releaseDate: '2025-12-01',
|
|
1556
1618
|
},
|
|
1557
1619
|
sv: {
|
|
1558
1620
|
nativeName: 'Svenska',
|
|
@@ -1569,7 +1631,7 @@ const LANGUAGES = {
|
|
|
1569
1631
|
},
|
|
1570
1632
|
status: 'commingsoon',
|
|
1571
1633
|
speakers: 10000000,
|
|
1572
|
-
releaseDate: '2025-
|
|
1634
|
+
releaseDate: '2025-12-08',
|
|
1573
1635
|
},
|
|
1574
1636
|
tr: {
|
|
1575
1637
|
nativeName: 'Türkçe',
|
|
@@ -1586,7 +1648,7 @@ const LANGUAGES = {
|
|
|
1586
1648
|
},
|
|
1587
1649
|
status: 'commingsoon',
|
|
1588
1650
|
speakers: 88000000,
|
|
1589
|
-
releaseDate: '2025-
|
|
1651
|
+
releaseDate: '2025-12-15',
|
|
1590
1652
|
},
|
|
1591
1653
|
ar: {
|
|
1592
1654
|
nativeName: 'العربية (Al-Arabiyyah)',
|
|
@@ -1629,7 +1691,7 @@ const LANGUAGES = {
|
|
|
1629
1691
|
},
|
|
1630
1692
|
status: 'commingsoon',
|
|
1631
1693
|
speakers: 422000000,
|
|
1632
|
-
releaseDate: '2025-
|
|
1694
|
+
releaseDate: '2025-12-22',
|
|
1633
1695
|
},
|
|
1634
1696
|
vi: {
|
|
1635
1697
|
nativeName: 'Tiếng Việt',
|
|
@@ -1646,7 +1708,7 @@ const LANGUAGES = {
|
|
|
1646
1708
|
},
|
|
1647
1709
|
status: 'commingsoon',
|
|
1648
1710
|
speakers: 90000000,
|
|
1649
|
-
releaseDate: '2025-
|
|
1711
|
+
releaseDate: '2025-12-29',
|
|
1650
1712
|
},
|
|
1651
1713
|
id: {
|
|
1652
1714
|
nativeName: 'Bahasa Indonesia',
|
|
@@ -1663,7 +1725,7 @@ const LANGUAGES = {
|
|
|
1663
1725
|
},
|
|
1664
1726
|
status: 'commingsoon',
|
|
1665
1727
|
speakers: 199000000,
|
|
1666
|
-
releaseDate: '
|
|
1728
|
+
releaseDate: '2026-01-05',
|
|
1667
1729
|
},
|
|
1668
1730
|
da: {
|
|
1669
1731
|
nativeName: 'Dansk',
|
|
@@ -1680,7 +1742,7 @@ const LANGUAGES = {
|
|
|
1680
1742
|
},
|
|
1681
1743
|
status: 'commingsoon',
|
|
1682
1744
|
speakers: 6000000,
|
|
1683
|
-
releaseDate: '
|
|
1745
|
+
releaseDate: '2026-01-12',
|
|
1684
1746
|
},
|
|
1685
1747
|
no: {
|
|
1686
1748
|
nativeName: 'Norsk',
|
|
@@ -1697,7 +1759,7 @@ const LANGUAGES = {
|
|
|
1697
1759
|
},
|
|
1698
1760
|
status: 'commingsoon',
|
|
1699
1761
|
speakers: 5300000,
|
|
1700
|
-
releaseDate: '
|
|
1762
|
+
releaseDate: '2026-01-19',
|
|
1701
1763
|
},
|
|
1702
1764
|
fi: {
|
|
1703
1765
|
nativeName: 'Suomi',
|
|
@@ -1714,7 +1776,7 @@ const LANGUAGES = {
|
|
|
1714
1776
|
},
|
|
1715
1777
|
status: 'commingsoon',
|
|
1716
1778
|
speakers: 5400000,
|
|
1717
|
-
releaseDate: '
|
|
1779
|
+
releaseDate: '2026-01-26',
|
|
1718
1780
|
},
|
|
1719
1781
|
cs: {
|
|
1720
1782
|
nativeName: 'Čeština',
|
|
@@ -1731,7 +1793,7 @@ const LANGUAGES = {
|
|
|
1731
1793
|
},
|
|
1732
1794
|
status: 'commingsoon',
|
|
1733
1795
|
speakers: 10700000,
|
|
1734
|
-
releaseDate: '
|
|
1796
|
+
releaseDate: '2026-02-02',
|
|
1735
1797
|
},
|
|
1736
1798
|
el: {
|
|
1737
1799
|
nativeName: 'Ελληνικά (Elliniká)',
|
|
@@ -1748,7 +1810,7 @@ const LANGUAGES = {
|
|
|
1748
1810
|
},
|
|
1749
1811
|
status: 'commingsoon',
|
|
1750
1812
|
speakers: 13500000,
|
|
1751
|
-
releaseDate: '
|
|
1813
|
+
releaseDate: '2026-02-09',
|
|
1752
1814
|
},
|
|
1753
1815
|
hu: {
|
|
1754
1816
|
nativeName: 'Magyar',
|
|
@@ -1765,7 +1827,7 @@ const LANGUAGES = {
|
|
|
1765
1827
|
},
|
|
1766
1828
|
status: 'commingsoon',
|
|
1767
1829
|
speakers: 13000000,
|
|
1768
|
-
releaseDate: '
|
|
1830
|
+
releaseDate: '2026-02-16',
|
|
1769
1831
|
},
|
|
1770
1832
|
ro: {
|
|
1771
1833
|
nativeName: 'Română',
|
|
@@ -1782,7 +1844,7 @@ const LANGUAGES = {
|
|
|
1782
1844
|
},
|
|
1783
1845
|
status: 'commingsoon',
|
|
1784
1846
|
speakers: 24000000,
|
|
1785
|
-
releaseDate: '
|
|
1847
|
+
releaseDate: '2026-02-23',
|
|
1786
1848
|
},
|
|
1787
1849
|
uk: {
|
|
1788
1850
|
nativeName: 'Українська (Ukrainska)',
|
|
@@ -1799,7 +1861,7 @@ const LANGUAGES = {
|
|
|
1799
1861
|
},
|
|
1800
1862
|
status: 'commingsoon',
|
|
1801
1863
|
speakers: 33000000,
|
|
1802
|
-
releaseDate: '
|
|
1864
|
+
releaseDate: '2026-03-02',
|
|
1803
1865
|
},
|
|
1804
1866
|
he: {
|
|
1805
1867
|
nativeName: 'עברית (Ivrit)',
|
|
@@ -1816,7 +1878,7 @@ const LANGUAGES = {
|
|
|
1816
1878
|
},
|
|
1817
1879
|
status: 'commingsoon',
|
|
1818
1880
|
speakers: 9000000,
|
|
1819
|
-
releaseDate: '
|
|
1881
|
+
releaseDate: '2026-03-09',
|
|
1820
1882
|
},
|
|
1821
1883
|
th: {
|
|
1822
1884
|
nativeName: 'ภาษาไทย (Phasa Thai)',
|
|
@@ -1833,7 +1895,7 @@ const LANGUAGES = {
|
|
|
1833
1895
|
},
|
|
1834
1896
|
status: 'commingsoon',
|
|
1835
1897
|
speakers: 69000000,
|
|
1836
|
-
releaseDate: '
|
|
1898
|
+
releaseDate: '2026-03-16',
|
|
1837
1899
|
},
|
|
1838
1900
|
hi: {
|
|
1839
1901
|
nativeName: 'हिन्दी (Hindī)',
|
|
@@ -1850,7 +1912,7 @@ const LANGUAGES = {
|
|
|
1850
1912
|
},
|
|
1851
1913
|
status: 'commingsoon',
|
|
1852
1914
|
speakers: 602000000,
|
|
1853
|
-
releaseDate: '
|
|
1915
|
+
releaseDate: '2026-03-23',
|
|
1854
1916
|
},
|
|
1855
1917
|
ca: {
|
|
1856
1918
|
nativeName: 'Català',
|
|
@@ -1867,7 +1929,7 @@ const LANGUAGES = {
|
|
|
1867
1929
|
},
|
|
1868
1930
|
status: 'commingsoon',
|
|
1869
1931
|
speakers: 10000000,
|
|
1870
|
-
releaseDate: '
|
|
1932
|
+
releaseDate: '2026-03-30',
|
|
1871
1933
|
},
|
|
1872
1934
|
bg: {
|
|
1873
1935
|
nativeName: 'Български (Balgarski)',
|
|
@@ -1884,7 +1946,7 @@ const LANGUAGES = {
|
|
|
1884
1946
|
},
|
|
1885
1947
|
status: 'commingsoon',
|
|
1886
1948
|
speakers: 9000000,
|
|
1887
|
-
releaseDate: '
|
|
1949
|
+
releaseDate: '2026-04-06',
|
|
1888
1950
|
},
|
|
1889
1951
|
eo: {
|
|
1890
1952
|
nativeName: 'Esperanto',
|
|
@@ -1901,7 +1963,7 @@ const LANGUAGES = {
|
|
|
1901
1963
|
},
|
|
1902
1964
|
status: 'commingsoon',
|
|
1903
1965
|
speakers: 2000000,
|
|
1904
|
-
releaseDate: '
|
|
1966
|
+
releaseDate: '2026-04-13',
|
|
1905
1967
|
},
|
|
1906
1968
|
ia: {
|
|
1907
1969
|
nativeName: 'Interlingua',
|
|
@@ -1918,7 +1980,7 @@ const LANGUAGES = {
|
|
|
1918
1980
|
},
|
|
1919
1981
|
status: 'commingsoon',
|
|
1920
1982
|
speakers: 1500,
|
|
1921
|
-
releaseDate: '
|
|
1983
|
+
releaseDate: '2026-04-20',
|
|
1922
1984
|
},
|
|
1923
1985
|
hr: {
|
|
1924
1986
|
nativeName: 'Hrvatski',
|
|
@@ -1935,7 +1997,7 @@ const LANGUAGES = {
|
|
|
1935
1997
|
},
|
|
1936
1998
|
status: 'commingsoon',
|
|
1937
1999
|
speakers: 5700000,
|
|
1938
|
-
releaseDate: '
|
|
2000
|
+
releaseDate: '2026-04-27',
|
|
1939
2001
|
},
|
|
1940
2002
|
sk: {
|
|
1941
2003
|
nativeName: 'Slovenčina',
|
|
@@ -1952,7 +2014,7 @@ const LANGUAGES = {
|
|
|
1952
2014
|
},
|
|
1953
2015
|
status: 'commingsoon',
|
|
1954
2016
|
speakers: 5400000,
|
|
1955
|
-
releaseDate: '
|
|
2017
|
+
releaseDate: '2026-05-04',
|
|
1956
2018
|
},
|
|
1957
2019
|
fil: {
|
|
1958
2020
|
nativeName: 'Filipino',
|
|
@@ -1969,7 +2031,7 @@ const LANGUAGES = {
|
|
|
1969
2031
|
},
|
|
1970
2032
|
status: 'commingsoon',
|
|
1971
2033
|
speakers: 109000000,
|
|
1972
|
-
releaseDate: '
|
|
2034
|
+
releaseDate: '2026-05-11',
|
|
1973
2035
|
},
|
|
1974
2036
|
tl: {
|
|
1975
2037
|
// Tagalog often used as base for Filipino, but distinct ISO code
|
|
@@ -1987,7 +2049,7 @@ const LANGUAGES = {
|
|
|
1987
2049
|
},
|
|
1988
2050
|
status: 'commingsoon',
|
|
1989
2051
|
speakers: 109000000,
|
|
1990
|
-
releaseDate: '
|
|
2052
|
+
releaseDate: '2026-05-18',
|
|
1991
2053
|
},
|
|
1992
2054
|
lt: {
|
|
1993
2055
|
nativeName: 'Lietuvių',
|
|
@@ -2004,7 +2066,7 @@ const LANGUAGES = {
|
|
|
2004
2066
|
},
|
|
2005
2067
|
status: 'commingsoon',
|
|
2006
2068
|
speakers: 2800000,
|
|
2007
|
-
releaseDate: '
|
|
2069
|
+
releaseDate: '2026-05-25',
|
|
2008
2070
|
},
|
|
2009
2071
|
lv: {
|
|
2010
2072
|
nativeName: 'Latviešu',
|
|
@@ -2021,7 +2083,7 @@ const LANGUAGES = {
|
|
|
2021
2083
|
},
|
|
2022
2084
|
status: 'commingsoon',
|
|
2023
2085
|
speakers: 1900000,
|
|
2024
|
-
releaseDate: '
|
|
2086
|
+
releaseDate: '2026-06-01',
|
|
2025
2087
|
},
|
|
2026
2088
|
sl: {
|
|
2027
2089
|
nativeName: 'Slovenščina',
|
|
@@ -2038,7 +2100,7 @@ const LANGUAGES = {
|
|
|
2038
2100
|
},
|
|
2039
2101
|
status: 'commingsoon',
|
|
2040
2102
|
speakers: 2500000,
|
|
2041
|
-
releaseDate: '
|
|
2103
|
+
releaseDate: '2026-06-08',
|
|
2042
2104
|
},
|
|
2043
2105
|
et: {
|
|
2044
2106
|
nativeName: 'Eesti',
|
|
@@ -2055,7 +2117,7 @@ const LANGUAGES = {
|
|
|
2055
2117
|
},
|
|
2056
2118
|
status: 'commingsoon',
|
|
2057
2119
|
speakers: 1100000,
|
|
2058
|
-
releaseDate: '
|
|
2120
|
+
releaseDate: '2026-06-15',
|
|
2059
2121
|
},
|
|
2060
2122
|
ms: {
|
|
2061
2123
|
nativeName: 'Bahasa Melayu',
|
|
@@ -2072,7 +2134,7 @@ const LANGUAGES = {
|
|
|
2072
2134
|
},
|
|
2073
2135
|
status: 'commingsoon',
|
|
2074
2136
|
speakers: 290000000,
|
|
2075
|
-
releaseDate: '
|
|
2137
|
+
releaseDate: '2026-06-22',
|
|
2076
2138
|
},
|
|
2077
2139
|
sw: {
|
|
2078
2140
|
nativeName: 'Kiswahili',
|
|
@@ -2089,7 +2151,7 @@ const LANGUAGES = {
|
|
|
2089
2151
|
},
|
|
2090
2152
|
status: 'commingsoon',
|
|
2091
2153
|
speakers: 200000000,
|
|
2092
|
-
releaseDate: '
|
|
2154
|
+
releaseDate: '2026-06-29',
|
|
2093
2155
|
},
|
|
2094
2156
|
fa: {
|
|
2095
2157
|
nativeName: 'فارسی (Fārsī)',
|
|
@@ -2106,7 +2168,7 @@ const LANGUAGES = {
|
|
|
2106
2168
|
},
|
|
2107
2169
|
status: 'commingsoon',
|
|
2108
2170
|
speakers: 110000000,
|
|
2109
|
-
releaseDate: '
|
|
2171
|
+
releaseDate: '2026-07-06',
|
|
2110
2172
|
},
|
|
2111
2173
|
bn: {
|
|
2112
2174
|
nativeName: 'বাংলা (Bangla)',
|
|
@@ -2492,7 +2554,7 @@ class PromptComponent {
|
|
|
2492
2554
|
this.ref.close(null);
|
|
2493
2555
|
}
|
|
2494
2556
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: PromptComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2495
|
-
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"] }] }); }
|
|
2496
2558
|
}
|
|
2497
2559
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: PromptComponent, decorators: [{
|
|
2498
2560
|
type: Component,
|
|
@@ -2535,13 +2597,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
2535
2597
|
}]
|
|
2536
2598
|
}] });
|
|
2537
2599
|
|
|
2538
|
-
const AppHttpCode = {
|
|
2539
|
-
GoodRefreshToken: 211,
|
|
2540
|
-
GoodPlanExpired: 212,
|
|
2541
|
-
ErrorRefreshToken: 411,
|
|
2542
|
-
GoodWelcome: 213, // welcome to premium
|
|
2543
|
-
ErrorAndLogout: 412,
|
|
2544
|
-
};
|
|
2545
2600
|
/**
|
|
2546
2601
|
* Injection token for HttpCoreService configuration
|
|
2547
2602
|
*/
|
|
@@ -2604,7 +2659,7 @@ class HttpCoreService {
|
|
|
2604
2659
|
try {
|
|
2605
2660
|
const url = this.getHostUrl(host) + '/' + service;
|
|
2606
2661
|
const dataPlain = this.toPlainObject(data);
|
|
2607
|
-
const response$ = this.httpClient.post(url, dataPlain).pipe(
|
|
2662
|
+
const response$ = this.httpClient.post(url, dataPlain).pipe(catchError(this.handleRequestError.bind(this)));
|
|
2608
2663
|
const result = await lastValueFrom(response$);
|
|
2609
2664
|
this.isLoading.set(false);
|
|
2610
2665
|
return result;
|
|
@@ -2614,6 +2669,15 @@ class HttpCoreService {
|
|
|
2614
2669
|
throw error;
|
|
2615
2670
|
}
|
|
2616
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
|
+
}
|
|
2617
2681
|
async putHttp({ service, data, host }) {
|
|
2618
2682
|
this.isLoading.set(true);
|
|
2619
2683
|
try {
|
|
@@ -2648,6 +2712,17 @@ class HttpCoreService {
|
|
|
2648
2712
|
throw error;
|
|
2649
2713
|
}
|
|
2650
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
|
+
}
|
|
2651
2726
|
async deleteHttp({ service, host }) {
|
|
2652
2727
|
this.isLoading.set(true);
|
|
2653
2728
|
try {
|
|
@@ -2685,7 +2760,7 @@ class HttpCoreService {
|
|
|
2685
2760
|
try {
|
|
2686
2761
|
const url = `${baseUrl}/${service}`;
|
|
2687
2762
|
const dataPlain = this.toPlainObject(data);
|
|
2688
|
-
const response$ = this.httpClient.post(url, dataPlain).pipe(
|
|
2763
|
+
const response$ = this.httpClient.post(url, dataPlain).pipe(catchError(this.handleRequestError.bind(this)));
|
|
2689
2764
|
const result = await lastValueFrom(response$);
|
|
2690
2765
|
this.isLoading.set(false);
|
|
2691
2766
|
return result;
|
|
@@ -2977,19 +3052,26 @@ class HttpCoreService {
|
|
|
2977
3052
|
*/
|
|
2978
3053
|
handleRequestError(error) {
|
|
2979
3054
|
this.isLoading.set(false);
|
|
3055
|
+
let appException = null;
|
|
2980
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) {
|
|
2981
3063
|
console.error(error.error);
|
|
2982
|
-
const errorMessage =
|
|
2983
|
-
const subtitle =
|
|
3064
|
+
const errorMessage = appException?.error_message || 'An error occurred';
|
|
3065
|
+
const subtitle = appException?.explanation || 'Please try again later';
|
|
2984
3066
|
this.toastService.error({ title: errorMessage, subtitle });
|
|
2985
3067
|
}
|
|
2986
|
-
// Set the last error
|
|
2987
|
-
if (
|
|
3068
|
+
// Set the last error, not sure if this is still neeed, to keep track of the last error.
|
|
3069
|
+
if (appException) {
|
|
2988
3070
|
this.lastError.set({
|
|
2989
|
-
error_message:
|
|
2990
|
-
explanation:
|
|
3071
|
+
error_message: appException.error_message || 'An error occurred',
|
|
3072
|
+
explanation: appException.explanation || 'Please try again later',
|
|
2991
3073
|
status: error.status,
|
|
2992
|
-
code:
|
|
3074
|
+
code: appException.statusCode,
|
|
2993
3075
|
});
|
|
2994
3076
|
}
|
|
2995
3077
|
else {
|
|
@@ -3027,14 +3109,6 @@ class HttpCoreService {
|
|
|
3027
3109
|
}
|
|
3028
3110
|
return this.handleRequestError(error);
|
|
3029
3111
|
}
|
|
3030
|
-
/**
|
|
3031
|
-
* Check the status of a response
|
|
3032
|
-
* @param response The response to check
|
|
3033
|
-
*/
|
|
3034
|
-
checkResponseStatus(response) {
|
|
3035
|
-
// Implement any response status checking logic here
|
|
3036
|
-
// For example, check for specific status codes or error messages
|
|
3037
|
-
}
|
|
3038
3112
|
/**
|
|
3039
3113
|
* Convert an object to a plain object
|
|
3040
3114
|
* @param obj The object to convert
|
|
@@ -3120,6 +3194,10 @@ class EntityCommunicationService {
|
|
|
3120
3194
|
findOne(id) {
|
|
3121
3195
|
return this.httpService.getHttp({ service: `api/${this.serviceName}/${id}`, host: this.customHost });
|
|
3122
3196
|
}
|
|
3197
|
+
findOneByQuery(query, projection) {
|
|
3198
|
+
// Can find only one with query and projection, query can be id. { id: 'id' }
|
|
3199
|
+
return this.httpService.postHttp({ service: `api/${this.serviceName}/find-one`, data: { query, projection }, host: this.customHost });
|
|
3200
|
+
}
|
|
3123
3201
|
createOrUpdate(entity) {
|
|
3124
3202
|
// if Id is present then in object, then Update all props in the object
|
|
3125
3203
|
return this.httpService.postHttp({ service: `api/${this.serviceName}`, data: entity, host: this.customHost });
|
|
@@ -3202,7 +3280,6 @@ const APP_CONFIG = new InjectionToken('app.config');
|
|
|
3202
3280
|
class AppConfigService {
|
|
3203
3281
|
constructor() {
|
|
3204
3282
|
this.config = inject(APP_CONFIG);
|
|
3205
|
-
this.config.kbhost = 'http://localhost:3000';
|
|
3206
3283
|
}
|
|
3207
3284
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AppConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3208
3285
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AppConfigService, providedIn: 'root' }); }
|
|
@@ -3212,7 +3289,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
3212
3289
|
args: [{
|
|
3213
3290
|
providedIn: 'root',
|
|
3214
3291
|
}]
|
|
3215
|
-
}]
|
|
3292
|
+
}] });
|
|
3216
3293
|
|
|
3217
3294
|
class AudioNotificationService {
|
|
3218
3295
|
playFinishNotification() {
|
|
@@ -3315,5 +3392,5 @@ const CharacterEventActions = [
|
|
|
3315
3392
|
* Generated bundle index. Do not edit.
|
|
3316
3393
|
*/
|
|
3317
3394
|
|
|
3318
|
-
export { APP_CONFIG, AppConfigService,
|
|
3395
|
+
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 };
|
|
3319
3396
|
//# sourceMappingURL=dataclouder-ngx-core.mjs.map
|