@dataclouder/ngx-core 0.2.1 → 0.2.3
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, Component, Injectable, inject, ChangeDetectionStrategy, output, Input, HostListener, ChangeDetectorRef, signal, Pipe, effect, ViewChild, Directive, InjectionToken, computed, Optional, Inject } from '@angular/core';
|
|
2
|
+
import { input, Component, Injectable, inject, ChangeDetectionStrategy, output, Input, HostListener, ChangeDetectorRef, signal, Pipe, effect, ViewChild, Directive, InjectionToken, computed, untracked, 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';
|
|
@@ -58,14 +58,14 @@ import { Capacitor } from '@capacitor/core';
|
|
|
58
58
|
|
|
59
59
|
class EmptyStateComponent {
|
|
60
60
|
constructor() {
|
|
61
|
-
this.headingText = input('No existe el recurso que buscas', ...(ngDevMode ? [{ debugName: "headingText" }] : []));
|
|
62
|
-
this.subHeadingText = input('Intenta más tarde', ...(ngDevMode ? [{ debugName: "subHeadingText" }] : []));
|
|
63
|
-
this.mainIconSrcString = input('img/empty-states/empty-box.png', ...(ngDevMode ? [{ debugName: "mainIconSrcString" }] : []));
|
|
61
|
+
this.headingText = input('No existe el recurso que buscas', ...(ngDevMode ? [{ debugName: "headingText" }] : /* istanbul ignore next */ []));
|
|
62
|
+
this.subHeadingText = input('Intenta más tarde', ...(ngDevMode ? [{ debugName: "subHeadingText" }] : /* istanbul ignore next */ []));
|
|
63
|
+
this.mainIconSrcString = input('img/empty-states/empty-box.png', ...(ngDevMode ? [{ debugName: "mainIconSrcString" }] : /* istanbul ignore next */ []));
|
|
64
64
|
}
|
|
65
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
66
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
65
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: EmptyStateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
66
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: EmptyStateComponent, isStandalone: true, selector: "dc-empty-state", inputs: { headingText: { classPropertyName: "headingText", publicName: "headingText", isSignal: true, isRequired: false, transformFunction: null }, subHeadingText: { classPropertyName: "subHeadingText", publicName: "subHeadingText", isSignal: true, isRequired: false, transformFunction: null }, mainIconSrcString: { classPropertyName: "mainIconSrcString", publicName: "mainIconSrcString", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"empty-state-container\">\n @if (headingText()) {\n <h5 class=\"text-center\">{{ headingText() }}</h5>\n }\n <img width=\"180px\" class=\"image-empty-state\" [src]=\"mainIconSrcString()\" />\n @if (subHeadingText()) {\n <h6 class=\"text-center\">{{ subHeadingText() }}</h6>\n }\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:block;width:100%;height:100%}.empty-state-container{padding:20px;text-align:center;height:100%;flex-direction:column;display:flex;align-items:center}.empty-state-container .image-empty-state{filter:grayscale(40%);margin:15px 0}.empty-state-container h5{margin-bottom:10px}.empty-state-container h6{color:var(--text-color-secondary);margin-top:0}\n"] }); }
|
|
67
67
|
}
|
|
68
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: EmptyStateComponent, decorators: [{
|
|
69
69
|
type: Component,
|
|
70
70
|
args: [{ selector: 'dc-empty-state', standalone: true, imports: [], template: "<div class=\"empty-state-container\">\n @if (headingText()) {\n <h5 class=\"text-center\">{{ headingText() }}</h5>\n }\n <img width=\"180px\" class=\"image-empty-state\" [src]=\"mainIconSrcString()\" />\n @if (subHeadingText()) {\n <h6 class=\"text-center\">{{ subHeadingText() }}</h6>\n }\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:block;width:100%;height:100%}.empty-state-container{padding:20px;text-align:center;height:100%;flex-direction:column;display:flex;align-items:center}.empty-state-container .image-empty-state{filter:grayscale(40%);margin:15px 0}.empty-state-container h5{margin-bottom:10px}.empty-state-container h6{color:var(--text-color-secondary);margin-top:0}\n"] }]
|
|
71
71
|
}], propDecorators: { headingText: [{ type: i0.Input, args: [{ isSignal: true, alias: "headingText", required: false }] }], subHeadingText: [{ type: i0.Input, args: [{ isSignal: true, alias: "subHeadingText", required: false }] }], mainIconSrcString: [{ type: i0.Input, args: [{ isSignal: true, alias: "mainIconSrcString", required: false }] }] } });
|
|
@@ -207,10 +207,10 @@ class FilterService {
|
|
|
207
207
|
return '$eq';
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
211
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
210
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: FilterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
211
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: FilterService, providedIn: 'root' }); }
|
|
212
212
|
}
|
|
213
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
213
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: FilterService, decorators: [{
|
|
214
214
|
type: Injectable,
|
|
215
215
|
args: [{
|
|
216
216
|
providedIn: 'root',
|
|
@@ -285,10 +285,10 @@ class DcListFilterDialogComponent {
|
|
|
285
285
|
quickFilters: this.selectedFilters,
|
|
286
286
|
});
|
|
287
287
|
}
|
|
288
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
289
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
288
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DcListFilterDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
289
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", 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 [showClear]=\"true\"\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],[formArray],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: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "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", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i4.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", "motionOptions"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
290
290
|
}
|
|
291
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
291
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DcListFilterDialogComponent, decorators: [{
|
|
292
292
|
type: Component,
|
|
293
293
|
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 [showClear]=\"true\"\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"] }]
|
|
294
294
|
}], ctorParameters: () => [] });
|
|
@@ -299,8 +299,8 @@ class DCFilterBarComponent {
|
|
|
299
299
|
this.dialogService = inject(DialogService);
|
|
300
300
|
this.filterService = inject(FilterService);
|
|
301
301
|
// Signal Inputs
|
|
302
|
-
this.items = input([], ...(ngDevMode ? [{ debugName: "items" }] : []));
|
|
303
|
-
this.options = input({ showCreateButton: true }, ...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
302
|
+
this.items = input([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
303
|
+
this.options = input({ showCreateButton: true }, ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
304
304
|
// Inputs
|
|
305
305
|
this.customFilters = [];
|
|
306
306
|
this.customSortOptions = [];
|
|
@@ -427,10 +427,10 @@ class DCFilterBarComponent {
|
|
|
427
427
|
doItemAction(filterEvent) {
|
|
428
428
|
this.onFilterAction.emit(filterEvent);
|
|
429
429
|
}
|
|
430
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
431
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
430
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DCFilterBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
431
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", 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 }, customSortOptions: { classPropertyName: "customSortOptions", publicName: "customSortOptions", isSignal: false, isRequired: false, transformFunction: null }, isAdmin: { classPropertyName: "isAdmin", publicName: "isAdmin", isSignal: false, isRequired: false, transformFunction: null }, persistenceKey: { classPropertyName: "persistenceKey", publicName: "persistenceKey", 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 }\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: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i3$1.Dialog, selector: "p-dialog", inputs: ["hostName", "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", "maskMotionOptions", "motionOptions", "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: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: InputGroupModule }, { kind: "component", type: i5.InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["styleClass"] }, { kind: "ngmodule", type: InputGroupAddonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
432
432
|
}
|
|
433
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
433
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DCFilterBarComponent, decorators: [{
|
|
434
434
|
type: Component,
|
|
435
435
|
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 }\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"] }]
|
|
436
436
|
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], customFilters: [{
|
|
@@ -471,10 +471,10 @@ class ConfirmComponent {
|
|
|
471
471
|
confirm() {
|
|
472
472
|
this.ref.close(true);
|
|
473
473
|
}
|
|
474
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
475
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
474
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ConfirmComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
475
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: ConfirmComponent, isStandalone: true, selector: "app-confirm", inputs: { title: "title", message: "message", warning: "warning", oneBotton: "oneBotton", acceptText: "acceptText", cancelText: "cancelText", piIcon: "piIcon" }, host: { listeners: { "window:keyup.enter": "onEnter($event)", "window:keyup.escape": "onEscapte($event)" } }, ngImport: i0, template: "<div class=\"form-input-card\">\n <p-message severity=\"secondary\"> {{ title }}</p-message>\n\n <div style=\"text-align: center; padding: 1rem\">\n <i style=\"font-size: 4rem; color: #ff0040\" class=\"pi {{ piIcon }}\"></i>\n </div>\n\n <div>{{ message }} </div>\n\n @if (warning) {\n <p-message severity=\"warn\">\n <i class=\"pi pi-exclamation-triangle\"></i>\n {{ warning }}</p-message\n >\n }\n\n <br /><br />\n\n <div>\n <div style=\"float: right\">\n @if (oneBotton) {\n <p-button label=\"Ok\" (click)=\"confirm()\"></p-button>\n }\n </div>\n\n @if (!oneBotton) {\n <div class=\"options\">\n <p-button [label]=\"cancelText\" (click)=\"cancel()\" severity=\"secondary\"></p-button>\n <p-button [label]=\"acceptText\" (click)=\"confirm()\" severity=\"danger\"></p-button>\n </div>\n }\n </div>\n </div>\n", styles: [".options{display:flex;justify-content:space-between}.subtext{color:#353535;font-size:small}nb-card{min-width:50vw;max-width:88vw;max-height:90vh}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { 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", "motionOptions"], outputs: ["onClose"] }] }); }
|
|
476
476
|
}
|
|
477
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
477
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ConfirmComponent, decorators: [{
|
|
478
478
|
type: Component,
|
|
479
479
|
args: [{ selector: 'app-confirm', standalone: true, imports: [ButtonModule, MessageModule], template: "<div class=\"form-input-card\">\n <p-message severity=\"secondary\"> {{ title }}</p-message>\n\n <div style=\"text-align: center; padding: 1rem\">\n <i style=\"font-size: 4rem; color: #ff0040\" class=\"pi {{ piIcon }}\"></i>\n </div>\n\n <div>{{ message }} </div>\n\n @if (warning) {\n <p-message severity=\"warn\">\n <i class=\"pi pi-exclamation-triangle\"></i>\n {{ warning }}</p-message\n >\n }\n\n <br /><br />\n\n <div>\n <div style=\"float: right\">\n @if (oneBotton) {\n <p-button label=\"Ok\" (click)=\"confirm()\"></p-button>\n }\n </div>\n\n @if (!oneBotton) {\n <div class=\"options\">\n <p-button [label]=\"cancelText\" (click)=\"cancel()\" severity=\"secondary\"></p-button>\n <p-button [label]=\"acceptText\" (click)=\"confirm()\" severity=\"danger\"></p-button>\n </div>\n }\n </div>\n </div>\n", styles: [".options{display:flex;justify-content:space-between}.subtext{color:#353535;font-size:small}nb-card{min-width:50vw;max-width:88vw;max-height:90vh}\n"] }]
|
|
480
480
|
}], ctorParameters: () => [], propDecorators: { title: [{
|
|
@@ -504,7 +504,7 @@ class DCProgressToastComponent {
|
|
|
504
504
|
this.messageService = inject(MessageService);
|
|
505
505
|
this.cdr = inject(ChangeDetectorRef);
|
|
506
506
|
this.visible = false;
|
|
507
|
-
this.progress = input(0, ...(ngDevMode ? [{ debugName: "progress" }] : []));
|
|
507
|
+
this.progress = input(0, ...(ngDevMode ? [{ debugName: "progress" }] : /* istanbul ignore next */ []));
|
|
508
508
|
this.processCompleted = output();
|
|
509
509
|
this.processClosed = output();
|
|
510
510
|
}
|
|
@@ -553,10 +553,10 @@ class DCProgressToastComponent {
|
|
|
553
553
|
this.messageService.clear('confirm');
|
|
554
554
|
this.processClosed.emit();
|
|
555
555
|
}
|
|
556
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
557
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
556
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DCProgressToastComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
557
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.5", 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: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "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", "motionOptions", "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"] }] }); }
|
|
558
558
|
}
|
|
559
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
559
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DCProgressToastComponent, decorators: [{
|
|
560
560
|
type: Component,
|
|
561
561
|
args: [{ selector: 'dc-progress-toast', standalone: true, providers: [MessageService], imports: [ButtonModule, ToastModule, ProgressBarModule, Toast, ButtonModule, ProgressBar], 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" }]
|
|
562
562
|
}], ctorParameters: () => [], propDecorators: { visible: [{
|
|
@@ -573,13 +573,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
|
|
|
573
573
|
class LoadingBarService {
|
|
574
574
|
constructor() {
|
|
575
575
|
/** Flag indicating whether the loading bar is currently visible */
|
|
576
|
-
this.isShowing = signal(false, ...(ngDevMode ? [{ debugName: "isShowing" }] : []));
|
|
576
|
+
this.isShowing = signal(false, ...(ngDevMode ? [{ debugName: "isShowing" }] : /* istanbul ignore next */ []));
|
|
577
577
|
/** Current progress value (0-100) for determinate mode */
|
|
578
|
-
this.progress = signal(0, ...(ngDevMode ? [{ debugName: "progress" }] : []));
|
|
578
|
+
this.progress = signal(0, ...(ngDevMode ? [{ debugName: "progress" }] : /* istanbul ignore next */ []));
|
|
579
579
|
/** The current display mode of the loading bar */
|
|
580
|
-
this.mode = signal(null, ...(ngDevMode ? [{ debugName: "mode" }] : []));
|
|
580
|
+
this.mode = signal(null, ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
581
581
|
/** The color of the loading bar (can be a theme color name or hex value) */
|
|
582
|
-
this.color = signal('primary', ...(ngDevMode ? [{ debugName: "color" }] : []));
|
|
582
|
+
this.color = signal('primary', ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
583
583
|
}
|
|
584
584
|
/**
|
|
585
585
|
* Shows the loading bar in determinate mode with 0% progress.
|
|
@@ -716,10 +716,10 @@ class LoadingBarService {
|
|
|
716
716
|
}
|
|
717
717
|
}, intervalMs);
|
|
718
718
|
}
|
|
719
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
720
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
719
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LoadingBarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
720
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LoadingBarService, providedIn: 'root' }); }
|
|
721
721
|
}
|
|
722
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
722
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LoadingBarService, decorators: [{
|
|
723
723
|
type: Injectable,
|
|
724
724
|
args: [{
|
|
725
725
|
providedIn: 'root',
|
|
@@ -730,10 +730,10 @@ class LoadingBarComponent {
|
|
|
730
730
|
constructor() {
|
|
731
731
|
this.loadingBarService = inject(LoadingBarService);
|
|
732
732
|
}
|
|
733
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
734
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
733
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LoadingBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
734
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", 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"] }] }); }
|
|
735
735
|
}
|
|
736
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
736
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LoadingBarComponent, decorators: [{
|
|
737
737
|
type: Component,
|
|
738
738
|
args: [{ selector: 'dc-loading-bar', standalone: true, providers: [MessageService], imports: [ButtonModule, ToastModule, ProgressBarModule, ButtonModule, ProgressBar], template: "@if (loadingBarService.isShowing()) {\n<p-progressbar [color]=\"loadingBarService.color()\" [mode]=\"loadingBarService.mode()\" [style]=\"{ height: '4px' }\" [value]=\"loadingBarService.progress()\" />\n}\n" }]
|
|
739
739
|
}] });
|
|
@@ -747,10 +747,10 @@ class GetPathPipe {
|
|
|
747
747
|
}
|
|
748
748
|
return value;
|
|
749
749
|
}
|
|
750
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
751
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
750
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: GetPathPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
751
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.5", ngImport: i0, type: GetPathPipe, isStandalone: true, name: "getPath" }); }
|
|
752
752
|
}
|
|
753
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
753
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: GetPathPipe, decorators: [{
|
|
754
754
|
type: Pipe,
|
|
755
755
|
args: [{
|
|
756
756
|
name: 'getPath',
|
|
@@ -770,18 +770,18 @@ Outputs
|
|
|
770
770
|
class QuickTableComponent {
|
|
771
771
|
constructor() {
|
|
772
772
|
// Inputs
|
|
773
|
-
this.columns = input([], ...(ngDevMode ? [{ debugName: "columns" }] : []));
|
|
774
|
-
this.tableData = input([], ...(ngDevMode ? [{ debugName: "tableData" }] : [])); // This is the backup data
|
|
773
|
+
this.columns = input([], ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
|
|
774
|
+
this.tableData = input([], ...(ngDevMode ? [{ debugName: "tableData" }] : /* istanbul ignore next */ [])); // This is the backup data
|
|
775
775
|
// Default action is only select
|
|
776
|
-
this.actions = input([], ...(ngDevMode ? [{ debugName: "actions" }] : []));
|
|
776
|
+
this.actions = input([], ...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
|
|
777
777
|
// Outputs
|
|
778
778
|
this.onAction = output();
|
|
779
779
|
// Signals States
|
|
780
|
-
this._columns = signal([], ...(ngDevMode ? [{ debugName: "_columns" }] : []));
|
|
781
|
-
this._tableData = signal([], ...(ngDevMode ? [{ debugName: "_tableData" }] : []));
|
|
782
|
-
this._actions = signal([], ...(ngDevMode ? [{ debugName: "_actions" }] : []));
|
|
783
|
-
this.filters = signal({}, ...(ngDevMode ? [{ debugName: "filters" }] : []));
|
|
784
|
-
this.globalFilterFields = signal([], ...(ngDevMode ? [{ debugName: "globalFilterFields" }] : []));
|
|
780
|
+
this._columns = signal([], ...(ngDevMode ? [{ debugName: "_columns" }] : /* istanbul ignore next */ []));
|
|
781
|
+
this._tableData = signal([], ...(ngDevMode ? [{ debugName: "_tableData" }] : /* istanbul ignore next */ []));
|
|
782
|
+
this._actions = signal([], ...(ngDevMode ? [{ debugName: "_actions" }] : /* istanbul ignore next */ []));
|
|
783
|
+
this.filters = signal({}, ...(ngDevMode ? [{ debugName: "filters" }] : /* istanbul ignore next */ []));
|
|
784
|
+
this.globalFilterFields = signal([], ...(ngDevMode ? [{ debugName: "globalFilterFields" }] : /* istanbul ignore next */ []));
|
|
785
785
|
this.tableColumns = [];
|
|
786
786
|
effect(() => {
|
|
787
787
|
this.initializeTableColumns();
|
|
@@ -917,10 +917,10 @@ class QuickTableComponent {
|
|
|
917
917
|
this._tableData.set(filteredData);
|
|
918
918
|
}
|
|
919
919
|
}
|
|
920
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
921
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.2", 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: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "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", "motionOptions"], outputs: ["onShow", "onHide"] }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i4$1.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "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", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i8.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", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "pipe", type: GetPathPipe, name: "getPath" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
920
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: QuickTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
921
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", 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: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "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", "motionOptions"], outputs: ["onShow", "onHide"] }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i4$1.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "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", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i8.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", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "pipe", type: GetPathPipe, name: "getPath" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
922
922
|
}
|
|
923
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
923
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: QuickTableComponent, decorators: [{
|
|
924
924
|
type: Component,
|
|
925
925
|
args: [{ selector: 'app-quick-table', imports: [
|
|
926
926
|
CommonModule,
|
|
@@ -943,10 +943,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
|
|
|
943
943
|
|
|
944
944
|
class DcAuditableViewerComponent {
|
|
945
945
|
constructor() {
|
|
946
|
-
this.data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
946
|
+
this.data = input.required(...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
947
947
|
}
|
|
948
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
949
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
948
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DcAuditableViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
949
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: DcAuditableViewerComponent, isStandalone: true, selector: "dc-auditable-viewer", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
950
950
|
@if (data(); as audit) {
|
|
951
951
|
<p-fieldset legend="Audit Information" [toggleable]="true" [collapsed]="true">
|
|
952
952
|
<div class="grid text-sm">
|
|
@@ -994,7 +994,7 @@ class DcAuditableViewerComponent {
|
|
|
994
994
|
}
|
|
995
995
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FieldsetModule }, { kind: "component", type: i1$2.Fieldset, selector: "p-fieldset", inputs: ["legend", "toggleable", "style", "styleClass", "transitionOptions", "motionOptions", "collapsed"], 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", "disabled", "removable", "removeIcon", "chipProps"], outputs: ["onRemove", "onImageError"] }, { kind: "ngmodule", type: AvatarModule }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }] }); }
|
|
996
996
|
}
|
|
997
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
997
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DcAuditableViewerComponent, decorators: [{
|
|
998
998
|
type: Component,
|
|
999
999
|
args: [{
|
|
1000
1000
|
selector: 'dc-auditable-viewer',
|
|
@@ -1052,12 +1052,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
|
|
|
1052
1052
|
|
|
1053
1053
|
class DcExtensionsViewerComponent {
|
|
1054
1054
|
constructor() {
|
|
1055
|
-
this.data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
1055
|
+
this.data = input.required(...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
1056
1056
|
}
|
|
1057
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1058
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
1057
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DcExtensionsViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1058
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.5", 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" }] }); }
|
|
1059
1059
|
}
|
|
1060
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1060
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DcExtensionsViewerComponent, decorators: [{
|
|
1061
1061
|
type: Component,
|
|
1062
1062
|
args: [{
|
|
1063
1063
|
selector: 'dc-extensions-viewer',
|
|
@@ -1069,12 +1069,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
|
|
|
1069
1069
|
|
|
1070
1070
|
class DcLearnableViewerComponent {
|
|
1071
1071
|
constructor() {
|
|
1072
|
-
this.data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
1072
|
+
this.data = input.required(...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
1073
1073
|
}
|
|
1074
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1075
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
1074
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DcLearnableViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1075
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.5", 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" }] }); }
|
|
1076
1076
|
}
|
|
1077
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1077
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DcLearnableViewerComponent, decorators: [{
|
|
1078
1078
|
type: Component,
|
|
1079
1079
|
args: [{
|
|
1080
1080
|
selector: 'dc-learnable-viewer',
|
|
@@ -1086,12 +1086,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
|
|
|
1086
1086
|
|
|
1087
1087
|
class DcManageableViewerComponent {
|
|
1088
1088
|
constructor() {
|
|
1089
|
-
this.data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
1089
|
+
this.data = input.required(...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
1090
1090
|
}
|
|
1091
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1092
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
1091
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DcManageableViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1092
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.5", 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" }] }); }
|
|
1093
1093
|
}
|
|
1094
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1094
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DcManageableViewerComponent, decorators: [{
|
|
1095
1095
|
type: Component,
|
|
1096
1096
|
args: [{
|
|
1097
1097
|
selector: 'dc-manageable-viewer',
|
|
@@ -1103,12 +1103,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
|
|
|
1103
1103
|
|
|
1104
1104
|
class DcReactionsViewerComponent {
|
|
1105
1105
|
constructor() {
|
|
1106
|
-
this.data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
1106
|
+
this.data = input.required(...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
1107
1107
|
}
|
|
1108
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1109
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
1108
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DcReactionsViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1109
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.5", 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" }] }); }
|
|
1110
1110
|
}
|
|
1111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DcReactionsViewerComponent, decorators: [{
|
|
1112
1112
|
type: Component,
|
|
1113
1113
|
args: [{
|
|
1114
1114
|
selector: 'dc-reactions-viewer',
|
|
@@ -1120,7 +1120,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
|
|
|
1120
1120
|
|
|
1121
1121
|
class DcManageableFormComponent {
|
|
1122
1122
|
constructor() {
|
|
1123
|
-
this.form = input.required(...(ngDevMode ? [{ debugName: "form" }] : []));
|
|
1123
|
+
this.form = input.required(...(ngDevMode ? [{ debugName: "form" }] : /* istanbul ignore next */ []));
|
|
1124
1124
|
this.statusOptions = [
|
|
1125
1125
|
{ label: '✍️ Borrador', value: 'draft' },
|
|
1126
1126
|
{ label: '📝 En Revisión', value: 'review' },
|
|
@@ -1128,17 +1128,17 @@ class DcManageableFormComponent {
|
|
|
1128
1128
|
{ label: '🗑️ Archivado', value: 'archived' },
|
|
1129
1129
|
];
|
|
1130
1130
|
}
|
|
1131
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1132
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
1131
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DcManageableFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1132
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.5", 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],[formArray],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: ["hostName", "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", "motionOptions"], 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", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }] }); }
|
|
1133
1133
|
}
|
|
1134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1134
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DcManageableFormComponent, decorators: [{
|
|
1135
1135
|
type: Component,
|
|
1136
1136
|
args: [{ selector: 'dc-manageable-form', standalone: true, imports: [ReactiveFormsModule, CardModule, CheckboxModule, SelectModule, TooltipModule], 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" }]
|
|
1137
1137
|
}], propDecorators: { form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: true }] }] } });
|
|
1138
1138
|
|
|
1139
1139
|
class DcTagsFormComponent {
|
|
1140
1140
|
constructor() {
|
|
1141
|
-
this.form = input.required(...(ngDevMode ? [{ debugName: "form" }] : []));
|
|
1141
|
+
this.form = input.required(...(ngDevMode ? [{ debugName: "form" }] : /* istanbul ignore next */ []));
|
|
1142
1142
|
this.newTagControl = new FormControl('');
|
|
1143
1143
|
}
|
|
1144
1144
|
get arrayForm() {
|
|
@@ -1154,15 +1154,15 @@ class DcTagsFormComponent {
|
|
|
1154
1154
|
removeTag(index) {
|
|
1155
1155
|
this.arrayForm.removeAt(index);
|
|
1156
1156
|
}
|
|
1157
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1158
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
1157
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DcTagsFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1158
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: DcTagsFormComponent, isStandalone: true, selector: "dc-tags-form", inputs: { form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: true, transformFunction: null } }, 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],[formArray],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: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i4$1.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: ChipModule }, { kind: "component", type: i3$3.Chip, selector: "p-chip", inputs: ["label", "icon", "image", "alt", "styleClass", "disabled", "removable", "removeIcon", "chipProps"], outputs: ["onRemove", "onImageError"] }], viewProviders: [
|
|
1159
1159
|
{
|
|
1160
1160
|
provide: ControlContainer,
|
|
1161
1161
|
useFactory: () => inject(ControlContainer, { skipSelf: true }),
|
|
1162
1162
|
},
|
|
1163
1163
|
] }); }
|
|
1164
1164
|
}
|
|
1165
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1165
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DcTagsFormComponent, decorators: [{
|
|
1166
1166
|
type: Component,
|
|
1167
1167
|
args: [{ selector: 'dc-tags-form', standalone: true, imports: [CommonModule, ReactiveFormsModule, ButtonModule, InputTextModule, ChipModule], viewProviders: [
|
|
1168
1168
|
{
|
|
@@ -1174,12 +1174,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
|
|
|
1174
1174
|
|
|
1175
1175
|
class DcLearnableFormComponent {
|
|
1176
1176
|
constructor() {
|
|
1177
|
-
this.form = input.required(...(ngDevMode ? [{ debugName: "form" }] : []));
|
|
1177
|
+
this.form = input.required(...(ngDevMode ? [{ debugName: "form" }] : /* istanbul ignore next */ []));
|
|
1178
1178
|
}
|
|
1179
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1180
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
1179
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DcLearnableFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1180
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.5", 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 [form]=\"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],[formArray],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", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: DcTagsFormComponent, selector: "dc-tags-form", inputs: ["form"] }] }); }
|
|
1181
1181
|
}
|
|
1182
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1182
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DcLearnableFormComponent, decorators: [{
|
|
1183
1183
|
type: Component,
|
|
1184
1184
|
args: [{ selector: 'dc-learnable-form', standalone: true, imports: [ReactiveFormsModule, CardModule, InputNumberModule, TooltipModule, DcTagsFormComponent], 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 [form]=\"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"] }]
|
|
1185
1185
|
}], propDecorators: { form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: true }] }] } });
|
|
@@ -1200,22 +1200,22 @@ class PaginationBase {
|
|
|
1200
1200
|
* Available actions for items.
|
|
1201
1201
|
* Must be implemented by child classes.
|
|
1202
1202
|
*/
|
|
1203
|
-
this.actions = input(...(ngDevMode ? [undefined, { debugName: "actions" }] : []));
|
|
1203
|
+
this.actions = input(...(ngDevMode ? [undefined, { debugName: "actions" }] : /* istanbul ignore next */ []));
|
|
1204
1204
|
/**
|
|
1205
1205
|
* Event emitted when an action is performed on an item.
|
|
1206
1206
|
* Emits an object containing the item and the action that was triggered.
|
|
1207
1207
|
*/
|
|
1208
1208
|
this.onAction = output();
|
|
1209
1209
|
/** Current first record index for the paginator */
|
|
1210
|
-
this.first = signal(0, ...(ngDevMode ? [{ debugName: "first" }] : []));
|
|
1210
|
+
this.first = signal(0, ...(ngDevMode ? [{ debugName: "first" }] : /* istanbul ignore next */ []));
|
|
1211
1211
|
/** Number of rows to display per page */
|
|
1212
|
-
this.rows = signal(10, ...(ngDevMode ? [{ debugName: "rows" }] : []));
|
|
1212
|
+
this.rows = signal(10, ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
1213
1213
|
/** Total number of records available */
|
|
1214
|
-
this.totalRecords = signal(0, ...(ngDevMode ? [{ debugName: "totalRecords" }] : []));
|
|
1214
|
+
this.totalRecords = signal(0, ...(ngDevMode ? [{ debugName: "totalRecords" }] : /* istanbul ignore next */ []));
|
|
1215
1215
|
/** Current view mode, either cards or table */
|
|
1216
|
-
this.viewMode = signal('table', ...(ngDevMode ? [{ debugName: "viewMode" }] : []));
|
|
1216
|
+
this.viewMode = signal('table', ...(ngDevMode ? [{ debugName: "viewMode" }] : /* istanbul ignore next */ []));
|
|
1217
1217
|
/** Loading state indicator */
|
|
1218
|
-
this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
|
|
1218
|
+
this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
|
|
1219
1219
|
/** Available button actions for items */
|
|
1220
1220
|
this.buttonActions = [];
|
|
1221
1221
|
/**
|
|
@@ -1227,7 +1227,7 @@ class PaginationBase {
|
|
|
1227
1227
|
rowsPerPage: 10,
|
|
1228
1228
|
sort: { _id: -1 },
|
|
1229
1229
|
filters: {}
|
|
1230
|
-
}, ...(ngDevMode ? [{ debugName: "filterConfig" }] : []));
|
|
1230
|
+
}, ...(ngDevMode ? [{ debugName: "filterConfig" }] : /* istanbul ignore next */ []));
|
|
1231
1231
|
this.route = inject(ActivatedRoute);
|
|
1232
1232
|
this.router = inject(Router);
|
|
1233
1233
|
this.initializePagination();
|
|
@@ -1284,10 +1284,10 @@ class PaginationBase {
|
|
|
1284
1284
|
console.log('actionEvent on pagination', actionEvent);
|
|
1285
1285
|
this.onAction.emit(actionEvent);
|
|
1286
1286
|
}
|
|
1287
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1288
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
1287
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PaginationBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1288
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.5", type: PaginationBase, isStandalone: true, inputs: { actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction" }, ngImport: i0 }); }
|
|
1289
1289
|
}
|
|
1290
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1290
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PaginationBase, decorators: [{
|
|
1291
1291
|
type: Directive
|
|
1292
1292
|
}], ctorParameters: () => [], propDecorators: { actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], onAction: [{ type: i0.Output, args: ["onAction"] }] } });
|
|
1293
1293
|
|
|
@@ -1298,23 +1298,25 @@ class EntityBaseListComponent extends PaginationBase {
|
|
|
1298
1298
|
this.router = inject(Router);
|
|
1299
1299
|
this.route = inject(ActivatedRoute);
|
|
1300
1300
|
// Inputs & Outputs
|
|
1301
|
-
this.initialViewType = input('card', ...(ngDevMode ? [{ debugName: "initialViewType" }] : []));
|
|
1302
|
-
this.onlyView = input(false, ...(ngDevMode ? [{ debugName: "onlyView" }] : []));
|
|
1301
|
+
this.initialViewType = input('card', ...(ngDevMode ? [{ debugName: "initialViewType" }] : /* istanbul ignore next */ []));
|
|
1302
|
+
this.onlyView = input(false, ...(ngDevMode ? [{ debugName: "onlyView" }] : /* istanbul ignore next */ []));
|
|
1303
1303
|
// Outputs
|
|
1304
1304
|
this.onSelect = output();
|
|
1305
1305
|
// Writable Signals for component state
|
|
1306
|
-
this.items = signal([], ...(ngDevMode ? [{ debugName: "items" }] : []));
|
|
1307
|
-
this.totalRecordsSignal = signal(0, ...(ngDevMode ? [{ debugName: "totalRecordsSignal" }] : []));
|
|
1306
|
+
this.items = signal([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
1307
|
+
this.totalRecordsSignal = signal(0, ...(ngDevMode ? [{ debugName: "totalRecordsSignal" }] : /* istanbul ignore next */ []));
|
|
1308
1308
|
// Public properties for configuration
|
|
1309
1309
|
this.filterBarOptions = { showActions: true, showCreateButton: true, showViewButton: true };
|
|
1310
1310
|
this.columns = [];
|
|
1311
|
-
this.viewType = signal(this.initialViewType(), ...(ngDevMode ? [{ debugName: "viewType" }] : []));
|
|
1311
|
+
this.viewType = signal(this.initialViewType(), ...(ngDevMode ? [{ debugName: "viewType" }] : /* istanbul ignore next */ []));
|
|
1312
1312
|
effect(() => {
|
|
1313
1313
|
// Keep the parent's totalRecords in sync with our signal
|
|
1314
1314
|
this.totalRecords.set(this.totalRecordsSignal());
|
|
1315
1315
|
});
|
|
1316
1316
|
}
|
|
1317
1317
|
async ngOnInit() {
|
|
1318
|
+
this.entityCommunicationService.currentMode.set('list');
|
|
1319
|
+
this.entityCommunicationService.currentEntity.set(undefined);
|
|
1318
1320
|
await this.loadData();
|
|
1319
1321
|
}
|
|
1320
1322
|
async loadData() {
|
|
@@ -1379,10 +1381,10 @@ class EntityBaseListComponent extends PaginationBase {
|
|
|
1379
1381
|
// this.handleCustomAction(actionEvent);
|
|
1380
1382
|
}
|
|
1381
1383
|
}
|
|
1382
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1383
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
1384
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: EntityBaseListComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1385
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.5", type: EntityBaseListComponent, isStandalone: true, inputs: { initialViewType: { classPropertyName: "initialViewType", publicName: "initialViewType", isSignal: true, isRequired: false, transformFunction: null }, onlyView: { classPropertyName: "onlyView", publicName: "onlyView", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSelect: "onSelect" }, usesInheritance: true, ngImport: i0 }); }
|
|
1384
1386
|
}
|
|
1385
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1387
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: EntityBaseListComponent, decorators: [{
|
|
1386
1388
|
type: Directive
|
|
1387
1389
|
}], ctorParameters: () => [], propDecorators: { initialViewType: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialViewType", required: false }] }], onlyView: [{ type: i0.Input, args: [{ isSignal: true, alias: "onlyView", required: false }] }], onSelect: [{ type: i0.Output, args: ["onSelect"] }] } });
|
|
1388
1390
|
|
|
@@ -1393,13 +1395,13 @@ class EntityBaseListV2Component extends PaginationBase {
|
|
|
1393
1395
|
this.router = inject(Router);
|
|
1394
1396
|
this.route = inject(ActivatedRoute);
|
|
1395
1397
|
// Inputs & Outputs
|
|
1396
|
-
this.initialViewType = input('card', ...(ngDevMode ? [{ debugName: "initialViewType" }] : []));
|
|
1397
|
-
this.onlyView = input(false, ...(ngDevMode ? [{ debugName: "onlyView" }] : []));
|
|
1398
|
+
this.initialViewType = input('card', ...(ngDevMode ? [{ debugName: "initialViewType" }] : /* istanbul ignore next */ []));
|
|
1399
|
+
this.onlyView = input(false, ...(ngDevMode ? [{ debugName: "onlyView" }] : /* istanbul ignore next */ []));
|
|
1398
1400
|
// Outputs
|
|
1399
1401
|
this.onSelect = output();
|
|
1400
1402
|
// Writable Signals for component state
|
|
1401
|
-
this.items = signal([], ...(ngDevMode ? [{ debugName: "items" }] : []));
|
|
1402
|
-
this.totalRecordsSignal = signal(0, ...(ngDevMode ? [{ debugName: "totalRecordsSignal" }] : []));
|
|
1403
|
+
this.items = signal([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
1404
|
+
this.totalRecordsSignal = signal(0, ...(ngDevMode ? [{ debugName: "totalRecordsSignal" }] : /* istanbul ignore next */ []));
|
|
1403
1405
|
// Public properties for configuration
|
|
1404
1406
|
this.filterBarOptions = { showActions: true, showCreateButton: true, showViewButton: true };
|
|
1405
1407
|
this.columns = [];
|
|
@@ -1415,7 +1417,7 @@ class EntityBaseListV2Component extends PaginationBase {
|
|
|
1415
1417
|
},
|
|
1416
1418
|
payload: {},
|
|
1417
1419
|
};
|
|
1418
|
-
this.viewType = signal(this.initialViewType(), ...(ngDevMode ? [{ debugName: "viewType" }] : []));
|
|
1420
|
+
this.viewType = signal(this.initialViewType(), ...(ngDevMode ? [{ debugName: "viewType" }] : /* istanbul ignore next */ []));
|
|
1419
1421
|
effect(() => {
|
|
1420
1422
|
// Keep the parent's totalRecords in sync with our signal
|
|
1421
1423
|
this.totalRecords.set(this.totalRecordsSignal());
|
|
@@ -1425,6 +1427,8 @@ class EntityBaseListV2Component extends PaginationBase {
|
|
|
1425
1427
|
// Initialize mongoState from PaginationBase defaults if needed
|
|
1426
1428
|
this.mongoState.options.limit = this.rows();
|
|
1427
1429
|
this.mongoState.options.skip = this.first();
|
|
1430
|
+
this.entityCommunicationService.currentMode.set('list');
|
|
1431
|
+
this.entityCommunicationService.currentEntity.set(undefined);
|
|
1428
1432
|
await this.loadData();
|
|
1429
1433
|
}
|
|
1430
1434
|
async loadData() {
|
|
@@ -1562,10 +1566,10 @@ class EntityBaseListV2Component extends PaginationBase {
|
|
|
1562
1566
|
this.mongoState.options.skip = 0;
|
|
1563
1567
|
this.loadData();
|
|
1564
1568
|
}
|
|
1565
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1566
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
1569
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: EntityBaseListV2Component, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1570
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.5", type: EntityBaseListV2Component, isStandalone: true, inputs: { initialViewType: { classPropertyName: "initialViewType", publicName: "initialViewType", isSignal: true, isRequired: false, transformFunction: null }, onlyView: { classPropertyName: "onlyView", publicName: "onlyView", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSelect: "onSelect" }, usesInheritance: true, ngImport: i0 }); }
|
|
1567
1571
|
}
|
|
1568
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1572
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: EntityBaseListV2Component, decorators: [{
|
|
1569
1573
|
type: Directive
|
|
1570
1574
|
}], ctorParameters: () => [], propDecorators: { initialViewType: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialViewType", required: false }] }], onlyView: [{ type: i0.Input, args: [{ isSignal: true, alias: "onlyView", required: false }] }], onSelect: [{ type: i0.Output, args: ["onSelect"] }] } });
|
|
1571
1575
|
|
|
@@ -1611,13 +1615,17 @@ class EntityBaseFormComponent {
|
|
|
1611
1615
|
this.route = inject(ActivatedRoute);
|
|
1612
1616
|
this.router = inject(Router);
|
|
1613
1617
|
this.toastService = inject(TOAST_ALERTS_TOKEN, { optional: true });
|
|
1614
|
-
this.id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : []));
|
|
1615
|
-
this.entityInput = input(undefined, { ...(ngDevMode ? { debugName: "entityInput" } : {}), alias: 'entity' });
|
|
1616
|
-
this.entity = signal(undefined, ...(ngDevMode ? [{ debugName: "entity" }] : []));
|
|
1618
|
+
this.id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
1619
|
+
this.entityInput = input(undefined, { ...(ngDevMode ? { debugName: "entityInput" } : /* istanbul ignore next */ {}), alias: 'entity' });
|
|
1620
|
+
this.entity = signal(undefined, ...(ngDevMode ? [{ debugName: "entity" }] : /* istanbul ignore next */ []));
|
|
1617
1621
|
this.entityIdFromUrl = toSignal(this.route.paramMap.pipe(map((params) => params.get('id'))));
|
|
1618
|
-
this.entityId = computed(() => this.id() ?? this.entityIdFromUrl(), ...(ngDevMode ? [{ debugName: "entityId" }] : []));
|
|
1619
|
-
this.useFakeSave = input(false, ...(ngDevMode ? [{ debugName: "useFakeSave" }] : [])); // dont actually save if the father component that is in charge of save.
|
|
1622
|
+
this.entityId = computed(() => this.id() ?? this.entityIdFromUrl(), ...(ngDevMode ? [{ debugName: "entityId" }] : /* istanbul ignore next */ []));
|
|
1623
|
+
this.useFakeSave = input(false, ...(ngDevMode ? [{ debugName: "useFakeSave" }] : /* istanbul ignore next */ [])); // dont actually save if the father component that is in charge of save.
|
|
1620
1624
|
this.fakeSaved = output();
|
|
1625
|
+
this._stateSyncEffect = effect(() => {
|
|
1626
|
+
untracked(() => this.entityCommunicationService.currentMode.set('form'));
|
|
1627
|
+
this.entityCommunicationService.currentEntity.set(this.entity());
|
|
1628
|
+
}, { ...(ngDevMode ? { debugName: "_stateSyncEffect" } : /* istanbul ignore next */ {}), allowSignalWrites: true });
|
|
1621
1629
|
this.loadEntityEffect = effect(() => {
|
|
1622
1630
|
const entityFromInput = this.entityInput();
|
|
1623
1631
|
if (entityFromInput) {
|
|
@@ -1632,7 +1640,7 @@ class EntityBaseFormComponent {
|
|
|
1632
1640
|
else if (!this.useFakeSave()) {
|
|
1633
1641
|
this.createNewEntity();
|
|
1634
1642
|
}
|
|
1635
|
-
}, { ...(ngDevMode ? { debugName: "loadEntityEffect" } : {}), allowSignalWrites: true });
|
|
1643
|
+
}, { ...(ngDevMode ? { debugName: "loadEntityEffect" } : /* istanbul ignore next */ {}), allowSignalWrites: true });
|
|
1636
1644
|
this.defaultNewObject = {};
|
|
1637
1645
|
}
|
|
1638
1646
|
async save() {
|
|
@@ -1712,13 +1720,63 @@ class EntityBaseFormComponent {
|
|
|
1712
1720
|
console.error('Error creating new entity', err);
|
|
1713
1721
|
}
|
|
1714
1722
|
}
|
|
1715
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1716
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
1723
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: EntityBaseFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1724
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.5", type: EntityBaseFormComponent, isStandalone: true, inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, entityInput: { classPropertyName: "entityInput", publicName: "entity", isSignal: true, isRequired: false, transformFunction: null }, useFakeSave: { classPropertyName: "useFakeSave", publicName: "useFakeSave", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { fakeSaved: "fakeSaved" }, ngImport: i0 }); }
|
|
1717
1725
|
}
|
|
1718
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1726
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: EntityBaseFormComponent, decorators: [{
|
|
1719
1727
|
type: Directive
|
|
1720
1728
|
}], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], entityInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "entity", required: false }] }], useFakeSave: [{ type: i0.Input, args: [{ isSignal: true, alias: "useFakeSave", required: false }] }], fakeSaved: [{ type: i0.Output, args: ["fakeSaved"] }] } });
|
|
1721
1729
|
|
|
1730
|
+
class EntityBaseDetailComponent {
|
|
1731
|
+
constructor() {
|
|
1732
|
+
this.route = inject(ActivatedRoute);
|
|
1733
|
+
this.toastService = inject(TOAST_ALERTS_TOKEN, { optional: true });
|
|
1734
|
+
this.id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
1735
|
+
this.entity = signal(undefined, ...(ngDevMode ? [{ debugName: "entity" }] : /* istanbul ignore next */ []));
|
|
1736
|
+
this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
|
|
1737
|
+
this.entityIdFromUrl = toSignal(this.route.paramMap.pipe(map((params) => params.get('id') ?? undefined)));
|
|
1738
|
+
this.entityId = computed(() => this.id() ?? this.entityIdFromUrl(), ...(ngDevMode ? [{ debugName: "entityId" }] : /* istanbul ignore next */ []));
|
|
1739
|
+
this._loadEffect = effect(() => {
|
|
1740
|
+
const id = this.entityId();
|
|
1741
|
+
untracked(() => this.entityCommunicationService.currentMode.set('detail'));
|
|
1742
|
+
if (id) {
|
|
1743
|
+
this.loadEntity(id);
|
|
1744
|
+
}
|
|
1745
|
+
}, { ...(ngDevMode ? { debugName: "_loadEffect" } : /* istanbul ignore next */ {}), allowSignalWrites: true });
|
|
1746
|
+
}
|
|
1747
|
+
/** Called after the entity is successfully loaded. Override to react (e.g. load related data). */
|
|
1748
|
+
onEntityLoaded(_entity) { }
|
|
1749
|
+
async loadEntity(id) {
|
|
1750
|
+
try {
|
|
1751
|
+
this.isLoading.set(true);
|
|
1752
|
+
const loaded = await this.entityCommunicationService.findOne(id);
|
|
1753
|
+
if (loaded) {
|
|
1754
|
+
this.entity.set(loaded);
|
|
1755
|
+
this.entityCommunicationService.currentEntity.set(loaded);
|
|
1756
|
+
this.onEntityLoaded(loaded);
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1759
|
+
catch (err) {
|
|
1760
|
+
this.toastService?.error({ title: 'Error', subtitle: 'Error loading entity' });
|
|
1761
|
+
console.error('Error loading entity', err);
|
|
1762
|
+
}
|
|
1763
|
+
finally {
|
|
1764
|
+
this.isLoading.set(false);
|
|
1765
|
+
}
|
|
1766
|
+
}
|
|
1767
|
+
reload() {
|
|
1768
|
+
const id = this.entityId();
|
|
1769
|
+
if (id) {
|
|
1770
|
+
this.loadEntity(id);
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: EntityBaseDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1774
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.5", type: EntityBaseDetailComponent, isStandalone: true, inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
1775
|
+
}
|
|
1776
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: EntityBaseDetailComponent, decorators: [{
|
|
1777
|
+
type: Directive
|
|
1778
|
+
}], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }] } });
|
|
1779
|
+
|
|
1722
1780
|
var EModelQuality;
|
|
1723
1781
|
(function (EModelQuality) {
|
|
1724
1782
|
EModelQuality["FAST"] = "fast";
|
|
@@ -2928,10 +2986,10 @@ class LangDescTranslation {
|
|
|
2928
2986
|
const validLang = lang === 'es' ? 'es' : 'en';
|
|
2929
2987
|
return getLangDesc(value, validLang);
|
|
2930
2988
|
}
|
|
2931
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2932
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
2989
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LangDescTranslation, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
2990
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.5", ngImport: i0, type: LangDescTranslation, isStandalone: true, name: "langDesc" }); }
|
|
2933
2991
|
}
|
|
2934
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2992
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LangDescTranslation, decorators: [{
|
|
2935
2993
|
type: Pipe,
|
|
2936
2994
|
args: [{
|
|
2937
2995
|
name: 'langDesc',
|
|
@@ -2947,10 +3005,10 @@ class FlagPipe {
|
|
|
2947
3005
|
const code = langCodeMap[lang] || lang;
|
|
2948
3006
|
return LANGUAGES[code]?.flag || '';
|
|
2949
3007
|
}
|
|
2950
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2951
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
3008
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: FlagPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3009
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.5", ngImport: i0, type: FlagPipe, isStandalone: true, name: "flagEmoji" }); }
|
|
2952
3010
|
}
|
|
2953
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3011
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: FlagPipe, decorators: [{
|
|
2954
3012
|
type: Pipe,
|
|
2955
3013
|
args: [{
|
|
2956
3014
|
name: 'flagEmoji',
|
|
@@ -2990,10 +3048,10 @@ class ConfirmService {
|
|
|
2990
3048
|
});
|
|
2991
3049
|
return firstValueFrom(dialogRef.onClose);
|
|
2992
3050
|
}
|
|
2993
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2994
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
3051
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ConfirmService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3052
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ConfirmService, providedIn: 'root' }); }
|
|
2995
3053
|
}
|
|
2996
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3054
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ConfirmService, decorators: [{
|
|
2997
3055
|
type: Injectable,
|
|
2998
3056
|
args: [{
|
|
2999
3057
|
providedIn: 'root',
|
|
@@ -3004,11 +3062,11 @@ class PromptComponent {
|
|
|
3004
3062
|
constructor() {
|
|
3005
3063
|
this.ref = inject(DynamicDialogRef);
|
|
3006
3064
|
this.config = inject(DynamicDialogConfig);
|
|
3007
|
-
this.title = signal('Prompt', ...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
3008
|
-
this.message = signal('', ...(ngDevMode ? [{ debugName: "message" }] : []));
|
|
3009
|
-
this.acceptText = signal('Accept', ...(ngDevMode ? [{ debugName: "acceptText" }] : []));
|
|
3010
|
-
this.cancelText = signal('Cancel', ...(ngDevMode ? [{ debugName: "cancelText" }] : []));
|
|
3011
|
-
this.inputValue = signal('', ...(ngDevMode ? [{ debugName: "inputValue" }] : []));
|
|
3065
|
+
this.title = signal('Prompt', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
3066
|
+
this.message = signal('', ...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
|
|
3067
|
+
this.acceptText = signal('Accept', ...(ngDevMode ? [{ debugName: "acceptText" }] : /* istanbul ignore next */ []));
|
|
3068
|
+
this.cancelText = signal('Cancel', ...(ngDevMode ? [{ debugName: "cancelText" }] : /* istanbul ignore next */ []));
|
|
3069
|
+
this.inputValue = signal('', ...(ngDevMode ? [{ debugName: "inputValue" }] : /* istanbul ignore next */ []));
|
|
3012
3070
|
}
|
|
3013
3071
|
ngOnInit() {
|
|
3014
3072
|
this.title.set(this.config.data?.title || 'Prompt');
|
|
@@ -3024,10 +3082,10 @@ class PromptComponent {
|
|
|
3024
3082
|
cancel() {
|
|
3025
3083
|
this.ref.close(null);
|
|
3026
3084
|
}
|
|
3027
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3028
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
3085
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PromptComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3086
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.5", 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: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "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", "motionOptions"], outputs: ["onClose"] }, { kind: "ngmodule", type: TextareaModule }, { kind: "directive", type: i4$4.Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["pTextareaPT", "pTextareaUnstyled", "autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }] }); }
|
|
3029
3087
|
}
|
|
3030
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3088
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PromptComponent, decorators: [{
|
|
3031
3089
|
type: Component,
|
|
3032
3090
|
args: [{ selector: 'dc-prompt', standalone: true, imports: [CommonModule, ButtonModule, InputTextModule, FormsModule, MessageModule, TextareaModule], 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" }]
|
|
3033
3091
|
}] });
|
|
@@ -3058,10 +3116,10 @@ class PromptService {
|
|
|
3058
3116
|
// Return the result when the dialog closes
|
|
3059
3117
|
return firstValueFrom(dialogRef.onClose);
|
|
3060
3118
|
}
|
|
3061
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3062
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
3119
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PromptService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3120
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PromptService, providedIn: 'root' }); }
|
|
3063
3121
|
}
|
|
3064
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PromptService, decorators: [{
|
|
3065
3123
|
type: Injectable,
|
|
3066
3124
|
args: [{
|
|
3067
3125
|
providedIn: 'root',
|
|
@@ -3081,8 +3139,8 @@ class HttpCoreService {
|
|
|
3081
3139
|
this.httpClient = inject(HttpClient);
|
|
3082
3140
|
this.toastService = inject(TOAST_ALERTS_TOKEN);
|
|
3083
3141
|
// Use signals for reactive state
|
|
3084
|
-
this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
|
|
3085
|
-
this.lastError = signal(null, ...(ngDevMode ? [{ debugName: "lastError" }] : []));
|
|
3142
|
+
this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
|
|
3143
|
+
this.lastError = signal(null, ...(ngDevMode ? [{ debugName: "lastError" }] : /* istanbul ignore next */ []));
|
|
3086
3144
|
if (config && config.primaryUrl) {
|
|
3087
3145
|
this.config = {
|
|
3088
3146
|
defaultHost: 'primary',
|
|
@@ -3536,6 +3594,9 @@ class HttpCoreService {
|
|
|
3536
3594
|
const subtitle = appException?.explanation || 'Please try again later';
|
|
3537
3595
|
this.toastService.error({ title: errorMessage, subtitle });
|
|
3538
3596
|
}
|
|
3597
|
+
else if (error.status === 0) {
|
|
3598
|
+
this.toastService.error({ title: 'No server connection', subtitle: 'Please check your network and try again, or verify that the server is running at ' + error?.url });
|
|
3599
|
+
}
|
|
3539
3600
|
// Set the last error, not sure if this is still neeed, to keep track of the last error.
|
|
3540
3601
|
if (appException) {
|
|
3541
3602
|
this.lastError.set({
|
|
@@ -3547,8 +3608,8 @@ class HttpCoreService {
|
|
|
3547
3608
|
}
|
|
3548
3609
|
else {
|
|
3549
3610
|
this.lastError.set({
|
|
3550
|
-
error_message: error.message || 'An error occurred',
|
|
3551
|
-
explanation: 'Please try again later',
|
|
3611
|
+
error_message: error.status === 0 ? 'No server connection' : error.message || 'An error occurred',
|
|
3612
|
+
explanation: error.status === 0 ? 'Please check your network and try again.' : 'Please try again later',
|
|
3552
3613
|
status: error.status,
|
|
3553
3614
|
});
|
|
3554
3615
|
}
|
|
@@ -3638,10 +3699,10 @@ class HttpCoreService {
|
|
|
3638
3699
|
return throwError(() => err);
|
|
3639
3700
|
}));
|
|
3640
3701
|
}
|
|
3641
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3642
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
3702
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: HttpCoreService, deps: [{ token: HTTP_CORE_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3703
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: HttpCoreService, providedIn: 'root' }); }
|
|
3643
3704
|
}
|
|
3644
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3705
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: HttpCoreService, decorators: [{
|
|
3645
3706
|
type: Injectable,
|
|
3646
3707
|
args: [{
|
|
3647
3708
|
providedIn: 'root',
|
|
@@ -3657,6 +3718,8 @@ class EntityCommunicationService {
|
|
|
3657
3718
|
constructor(serviceName) {
|
|
3658
3719
|
this.serviceName = serviceName;
|
|
3659
3720
|
this.httpService = inject(HttpCoreService);
|
|
3721
|
+
this.currentEntity = signal(undefined, ...(ngDevMode ? [{ debugName: "currentEntity" }] : /* istanbul ignore next */ []));
|
|
3722
|
+
this.currentMode = signal(undefined, ...(ngDevMode ? [{ debugName: "currentMode" }] : /* istanbul ignore next */ []));
|
|
3660
3723
|
// this.customHost = customHost;
|
|
3661
3724
|
}
|
|
3662
3725
|
findAll(query = {}) {
|
|
@@ -3697,21 +3760,44 @@ class EntityCommunicationService {
|
|
|
3697
3760
|
createOperation(payload) {
|
|
3698
3761
|
return this.createOrUpdate(payload);
|
|
3699
3762
|
}
|
|
3700
|
-
query(filterConfig) {
|
|
3701
|
-
|
|
3702
|
-
}
|
|
3763
|
+
// query(filterConfig: FiltersConfig): Promise<IFilterQueryResponse<T>> {
|
|
3764
|
+
// return this.httpService.postHttp<IFilterQueryResponse<T>>({ service: `api/${this.serviceName}/query`, data: filterConfig, host: this.customHost });
|
|
3765
|
+
// }
|
|
3703
3766
|
/**
|
|
3704
|
-
|
|
3705
|
-
|
|
3767
|
+
* @deprecated This was changed to use operation() method., refactor your code to use operation.
|
|
3768
|
+
*/
|
|
3769
|
+
async query(filterConfig) {
|
|
3770
|
+
const options = {};
|
|
3771
|
+
if (filterConfig.rowsPerPage) {
|
|
3772
|
+
options.limit = filterConfig.rowsPerPage;
|
|
3773
|
+
if (filterConfig.page !== undefined) {
|
|
3774
|
+
options.skip = filterConfig.page * filterConfig.rowsPerPage;
|
|
3775
|
+
}
|
|
3776
|
+
}
|
|
3777
|
+
if (filterConfig.sort) {
|
|
3778
|
+
options.sort = filterConfig.sort;
|
|
3779
|
+
}
|
|
3780
|
+
const rows = await this.operation({
|
|
3781
|
+
action: 'find',
|
|
3782
|
+
query: filterConfig.filters || {},
|
|
3783
|
+
projection: filterConfig.returnProps,
|
|
3784
|
+
options: options,
|
|
3785
|
+
});
|
|
3786
|
+
return {
|
|
3787
|
+
rows,
|
|
3788
|
+
count: rows.length, // Note: This is the count of currently returned rows, not the total unpaginated count.
|
|
3789
|
+
skip: options.skip || 0,
|
|
3790
|
+
};
|
|
3791
|
+
}
|
|
3706
3792
|
update(id, update) {
|
|
3707
3793
|
return this.operation({ action: 'updateOne', query: { _id: id }, payload: update });
|
|
3708
3794
|
}
|
|
3709
|
-
/**
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
updateOneOperation(id, payload) {
|
|
3713
|
-
|
|
3714
|
-
}
|
|
3795
|
+
// /**
|
|
3796
|
+
// * @deprecated Use createOrUpdate or updateOne instead.
|
|
3797
|
+
// */
|
|
3798
|
+
// updateOneOperation(id: string, payload: any): Promise<T> {
|
|
3799
|
+
// return this.update(id, payload);
|
|
3800
|
+
// }
|
|
3715
3801
|
partialUpdate(id, partialUpdates) {
|
|
3716
3802
|
// In backend object is flattened, so Convert nested objects to dot notation eg. { "video.captions.remotion": captions.captions }
|
|
3717
3803
|
// return this.operation({ action: 'updateOne', query: { _id: id }, payload: partialUpdates });
|
|
@@ -3733,24 +3819,63 @@ class EntityCommunicationService {
|
|
|
3733
3819
|
getFixedQuery() {
|
|
3734
3820
|
return {};
|
|
3735
3821
|
}
|
|
3822
|
+
/**
|
|
3823
|
+
* Executes a single database operation through a flexible interface provided by the backend's `@dataclouder/nest-mongo` ecosystem.
|
|
3824
|
+
* By leveraging this endpoint, clients can safely execute any common MongoDB operation by passing the appropriate configuration.
|
|
3825
|
+
*
|
|
3826
|
+
* @param params - The payload containing the operation details.
|
|
3827
|
+
* @param params.action - The database action to perform. Valid options are:
|
|
3828
|
+
* - `'findOne'`: Fetch the first document matching `query`.
|
|
3829
|
+
* - `'find'`: Retrieve multiple documents matching `query` (supports `projection` and `options`).
|
|
3830
|
+
* - `'create'`: Insert a new document utilizing `payload`.
|
|
3831
|
+
* - `'updateOne'`: Modify the first document matching `query` using update operators in `payload`.
|
|
3832
|
+
* - `'updateMany'`: Modify all documents matching `query` using `payload`.
|
|
3833
|
+
* - `'deleteOne'`: Remove the first document matching `query`.
|
|
3834
|
+
* - `'deleteMany'`: Remove all documents matching `query`.
|
|
3835
|
+
* - `'aggregate'`: Run an aggregation pipeline provided in `payload` as an array.
|
|
3836
|
+
* - `'clone'`: Create a copy of a document identified by `query`, overriding properties with `payload`.
|
|
3837
|
+
* @param params.query - The MongoDB query used to select documents (e.g., `{ status: "active" }`).
|
|
3838
|
+
* @param params.payload - The data for `create`, `updateOne`, `updateMany` (update operators), or the aggregation pipeline array.
|
|
3839
|
+
* @param params.projection - Specifies the fields to return for `find` or `findOne` (e.g., `{ name: 1, email: 1 }`).
|
|
3840
|
+
* @param params.options - Additional options for `find` operations like `limit`, `skip`, or `sort` (e.g., `{ limit: 10 }`).
|
|
3841
|
+
*
|
|
3842
|
+
* @example
|
|
3843
|
+
* // Find multiple documents
|
|
3844
|
+
* this.operation({
|
|
3845
|
+
* action: 'find',
|
|
3846
|
+
* query: { status: 'active' },
|
|
3847
|
+
* projection: { name: 1 },
|
|
3848
|
+
* options: { limit: 10, sort: { createdAt: -1 } }
|
|
3849
|
+
* });
|
|
3850
|
+
*
|
|
3851
|
+
* @example
|
|
3852
|
+
* // Update a single document
|
|
3853
|
+
* this.operation({
|
|
3854
|
+
* action: 'updateOne',
|
|
3855
|
+
* query: { _id: '123' },
|
|
3856
|
+
* payload: { $set: { status: 'inactive' } }
|
|
3857
|
+
* });
|
|
3858
|
+
*
|
|
3859
|
+
* @returns A Promise resolving to the result of the database operation.
|
|
3860
|
+
*/
|
|
3736
3861
|
operation(params) {
|
|
3737
3862
|
return this.httpService.postHttp({ service: `api/${this.serviceName}/operation`, data: params, host: this.customHost });
|
|
3738
3863
|
}
|
|
3739
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3740
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
3864
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: EntityCommunicationService, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3865
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: EntityCommunicationService }); }
|
|
3741
3866
|
}
|
|
3742
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3867
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: EntityCommunicationService, decorators: [{
|
|
3743
3868
|
type: Injectable
|
|
3744
3869
|
}], ctorParameters: () => [{ type: undefined }] });
|
|
3745
3870
|
|
|
3746
3871
|
class UiStateService {
|
|
3747
3872
|
constructor() {
|
|
3748
|
-
this.chatDrawerVisible = signal(false, ...(ngDevMode ? [{ debugName: "chatDrawerVisible" }] : []));
|
|
3873
|
+
this.chatDrawerVisible = signal(false, ...(ngDevMode ? [{ debugName: "chatDrawerVisible" }] : /* istanbul ignore next */ []));
|
|
3749
3874
|
}
|
|
3750
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3751
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
3875
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: UiStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3876
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: UiStateService, providedIn: 'root' }); }
|
|
3752
3877
|
}
|
|
3753
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3878
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: UiStateService, decorators: [{
|
|
3754
3879
|
type: Injectable,
|
|
3755
3880
|
args: [{
|
|
3756
3881
|
providedIn: 'root',
|
|
@@ -3793,10 +3918,10 @@ class FormUtilsService {
|
|
|
3793
3918
|
formArray.push(this.fb.control(value));
|
|
3794
3919
|
});
|
|
3795
3920
|
}
|
|
3796
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3797
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
3921
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: FormUtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3922
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: FormUtilsService, providedIn: 'root' }); }
|
|
3798
3923
|
}
|
|
3799
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3924
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: FormUtilsService, decorators: [{
|
|
3800
3925
|
type: Injectable,
|
|
3801
3926
|
args: [{
|
|
3802
3927
|
providedIn: 'root',
|
|
@@ -3808,10 +3933,10 @@ class AppConfigService {
|
|
|
3808
3933
|
constructor() {
|
|
3809
3934
|
this.config = inject(APP_CONFIG);
|
|
3810
3935
|
}
|
|
3811
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3812
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
3936
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3937
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppConfigService, providedIn: 'root' }); }
|
|
3813
3938
|
}
|
|
3814
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3939
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppConfigService, decorators: [{
|
|
3815
3940
|
type: Injectable,
|
|
3816
3941
|
args: [{
|
|
3817
3942
|
providedIn: 'root',
|
|
@@ -3824,10 +3949,10 @@ class AudioNotificationService {
|
|
|
3824
3949
|
audio.load();
|
|
3825
3950
|
audio.play();
|
|
3826
3951
|
}
|
|
3827
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3828
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
3952
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AudioNotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3953
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AudioNotificationService, providedIn: 'root' }); }
|
|
3829
3954
|
}
|
|
3830
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3955
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AudioNotificationService, decorators: [{
|
|
3831
3956
|
type: Injectable,
|
|
3832
3957
|
args: [{
|
|
3833
3958
|
providedIn: 'root',
|
|
@@ -3837,7 +3962,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
|
|
|
3837
3962
|
class MobileService {
|
|
3838
3963
|
constructor() {
|
|
3839
3964
|
this.router = inject(Router);
|
|
3840
|
-
this.hasReponsiveView = signal(false, ...(ngDevMode ? [{ debugName: "hasReponsiveView" }] : []));
|
|
3965
|
+
this.hasReponsiveView = signal(false, ...(ngDevMode ? [{ debugName: "hasReponsiveView" }] : /* istanbul ignore next */ []));
|
|
3841
3966
|
this.mobileWidthThreshold = 768; // Adjust the threshold as needed
|
|
3842
3967
|
this.responsibleWidthThreshold = 994;
|
|
3843
3968
|
// Initialize signal with current window width check
|
|
@@ -3913,10 +4038,10 @@ class MobileService {
|
|
|
3913
4038
|
this.isMobileAgent = false;
|
|
3914
4039
|
}
|
|
3915
4040
|
}
|
|
3916
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3917
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
4041
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: MobileService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4042
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: MobileService, providedIn: 'root' }); }
|
|
3918
4043
|
}
|
|
3919
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
4044
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: MobileService, decorators: [{
|
|
3920
4045
|
type: Injectable,
|
|
3921
4046
|
args: [{
|
|
3922
4047
|
providedIn: 'root',
|
|
@@ -4008,5 +4133,5 @@ const CharacterEventActions = [
|
|
|
4008
4133
|
* Generated bundle index. Do not edit.
|
|
4009
4134
|
*/
|
|
4010
4135
|
|
|
4011
|
-
export { APP_CONFIG, AppConfigService, AudioNotificationService, AudioSpeed, AudioSpeedReverse, CharacterEventActions, ChatUserSettings, ConfirmComponent, ConfirmService, DCFilterBarComponent, DCProgressToastComponent, DcAuditableViewerComponent, DcExtensionsViewerComponent, DcLearnableFormComponent, DcLearnableViewerComponent, DcManageableFormComponent, DcManageableViewerComponent, DcReactionsViewerComponent, DcTagsFormComponent, EModelQuality, EmptyStateComponent, EntityBaseFormComponent, EntityBaseListComponent, EntityBaseListV2Component, EntityCommunicationService, FlagPipe, FormUtilsService, GetPathPipe, HTTP_CORE_CONFIG, HttpCoreService, IAIModel, LANGUAGES, LangDescTranslation, LoadingBarComponent, LoadingBarService, MobileService, ModelQualityOptions, MoodState, MoodStateOptions, OptionValue, PaginationBase, PromptService, QuickTableComponent, SUPPORTED_LANGUAGES, TOAST_ALERTS_TOKEN, ToastAlertsAbstractService, UiStateService, availibleFilters, extractJsonFromString, formatCamelCaseString, getLangDesc, getSupportedLanguageOptions, provideToastAlert, sortOptions, sortTypes };
|
|
4136
|
+
export { APP_CONFIG, AppConfigService, AudioNotificationService, AudioSpeed, AudioSpeedReverse, CharacterEventActions, ChatUserSettings, ConfirmComponent, ConfirmService, DCFilterBarComponent, DCProgressToastComponent, DcAuditableViewerComponent, DcExtensionsViewerComponent, DcLearnableFormComponent, DcLearnableViewerComponent, DcManageableFormComponent, DcManageableViewerComponent, DcReactionsViewerComponent, DcTagsFormComponent, EModelQuality, EmptyStateComponent, EntityBaseDetailComponent, EntityBaseFormComponent, EntityBaseListComponent, EntityBaseListV2Component, EntityCommunicationService, FlagPipe, FormUtilsService, GetPathPipe, HTTP_CORE_CONFIG, HttpCoreService, IAIModel, LANGUAGES, LangDescTranslation, LoadingBarComponent, LoadingBarService, MobileService, ModelQualityOptions, MoodState, MoodStateOptions, OptionValue, PaginationBase, PromptService, QuickTableComponent, SUPPORTED_LANGUAGES, TOAST_ALERTS_TOKEN, ToastAlertsAbstractService, UiStateService, availibleFilters, extractJsonFromString, formatCamelCaseString, getLangDesc, getSupportedLanguageOptions, provideToastAlert, sortOptions, sortTypes };
|
|
4012
4137
|
//# sourceMappingURL=dataclouder-ngx-core.mjs.map
|